aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Dahlstrom <dahlstrom@google.com>2018-11-16 15:49:18 -0800
committerandroid-build-merger <android-build-merger@google.com>2018-11-16 15:49:18 -0800
commit529b8eff9ea2bfbf5dd4189c7bb9025e2a496571 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904
parentdbb134c8cac3aed820f31d2415b92cb536de79dd (diff)
parent9fc2f61f6936a82160578970d01b19b3a3355798 (diff)
downloadjdk8u_jaxws-studio-master-dev-osx.tar.gz
am: 9fc2f61f69 Change-Id: I0c7e16d51ae147377affa8c8fd766647fb97402a
-rw-r--r--.hgignore8
-rw-r--r--.hgtags688
-rw-r--r--.jcheck/conf2
-rw-r--r--ASSEMBLY_EXCEPTION27
-rw-r--r--LICENSE347
-rw-r--r--README19
-rw-r--r--THIRD_PARTY_README3574
-rw-r--r--TRADEMARK41
-rw-r--r--build.properties92
-rw-r--r--build.xml198
-rw-r--r--make/BuildJaxws.gmk113
-rw-r--r--make/Makefile49
-rw-r--r--nbproject/findbugs.settings72
-rw-r--r--nbproject/project.xml50
-rw-r--r--nbproject/sqe.properties2
-rw-r--r--src/share/jaf_classes/META-INF/mailcap.default7
-rw-r--r--src/share/jaf_classes/META-INF/mimetypes.default24
-rw-r--r--src/share/jaf_classes/com/sun/activation/registries/LogSupport.java70
-rw-r--r--src/share/jaf_classes/com/sun/activation/registries/MailcapFile.java563
-rw-r--r--src/share/jaf_classes/com/sun/activation/registries/MailcapParseException.java40
-rw-r--r--src/share/jaf_classes/com/sun/activation/registries/MailcapTokenizer.java321
-rw-r--r--src/share/jaf_classes/com/sun/activation/registries/MimeTypeEntry.java50
-rw-r--r--src/share/jaf_classes/com/sun/activation/registries/MimeTypeFile.java317
-rw-r--r--src/share/jaf_classes/javax/activation/ActivationDataFlavor.java250
-rw-r--r--src/share/jaf_classes/javax/activation/CommandInfo.java138
-rw-r--r--src/share/jaf_classes/javax/activation/CommandMap.java235
-rw-r--r--src/share/jaf_classes/javax/activation/CommandObject.java54
-rw-r--r--src/share/jaf_classes/javax/activation/DataContentHandler.java101
-rw-r--r--src/share/jaf_classes/javax/activation/DataContentHandlerFactory.java48
-rw-r--r--src/share/jaf_classes/javax/activation/DataHandler.java899
-rw-r--r--src/share/jaf_classes/javax/activation/DataSource.java86
-rw-r--r--src/share/jaf_classes/javax/activation/FileDataSource.java158
-rw-r--r--src/share/jaf_classes/javax/activation/FileTypeMap.java132
-rw-r--r--src/share/jaf_classes/javax/activation/MailcapCommandMap.java693
-rw-r--r--src/share/jaf_classes/javax/activation/MimeType.java344
-rw-r--r--src/share/jaf_classes/javax/activation/MimeTypeParameterList.java339
-rw-r--r--src/share/jaf_classes/javax/activation/MimeTypeParseException.java50
-rw-r--r--src/share/jaf_classes/javax/activation/MimetypesFileTypeMap.java328
-rw-r--r--src/share/jaf_classes/javax/activation/SecuritySupport.java131
-rw-r--r--src/share/jaf_classes/javax/activation/URLDataSource.java137
-rw-r--r--src/share/jaf_classes/javax/activation/UnsupportedDataTypeException.java57
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyle.java111
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyleFeature.java45
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/Databinding.java247
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingFactory.java105
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingMode.java37
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingModeFeature.java77
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/ExternalMetadataFeature.java163
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/JavaCallInfo.java108
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLGenerator.java73
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLResolver.java73
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BaseDistributedPropertySet.java308
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BasePropertySet.java548
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ContentType.java78
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/message/DistributedPropertySet.java81
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContext.java101
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContextFactory.java130
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/message/PropertySet.java134
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ReadOnlyPropertyException.java48
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/impl/encoding/StreamDecoderImpl.java52
-rw-r--r--src/share/jaxws_classes/com/oracle/webservices/internal/impl/internalspi/encoding/StreamDecoder.java45
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ExistingAnnotationsType.java77
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaMethod.java265
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaParam.java153
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaWsdlMappingType.java452
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ObjectFactory.java268
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingParameterStyle.java64
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingStyle.java64
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingUse.java64
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/Util.java57
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/WebParamMode.java66
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAction.java173
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAddressing.java102
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlBindingType.java95
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlFaultAction.java130
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlHandlerChain.java101
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlMTOM.java139
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlOneway.java64
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlRequestWrapper.java188
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlResponseWrapper.java188
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlSOAPBinding.java172
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlServiceMode.java104
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebEndpoint.java96
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebFault.java169
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebMethod.java172
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebParam.java244
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebResult.java208
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebService.java282
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceClient.java160
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceProvider.java192
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceRef.java248
-rw-r--r--src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/package-info.java34
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/ClassType.java49
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/CodeWriter.java114
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotatable.java65
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationArrayMember.java298
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationStringValue.java50
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationUse.java426
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationValue.java35
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationWriter.java53
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JAnonymousClass.java56
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JArray.java87
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JArrayClass.java123
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JArrayCompRef.java71
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JAssignment.java57
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JAssignmentTarget.java39
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JAtom.java43
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JBlock.java454
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JBreak.java52
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JCase.java84
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JCast.java62
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JCatchBlock.java60
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JClass.java356
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JClassAlreadyExistsException.java53
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JClassContainer.java165
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JCodeModel.java667
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JCommentPart.java137
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JConditional.java105
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JContinue.java53
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JDeclaration.java38
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JDefinedClass.java898
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JDirectClass.java82
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JDoLoop.java72
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JDocComment.java197
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JDocCommentable.java38
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JEnumConstant.java160
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JExpr.java289
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JExpression.java150
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JExpressionImpl.java165
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JFieldRef.java119
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JFieldVar.java91
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JForEach.java75
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JForLoop.java88
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JFormatter.java555
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JGenerable.java38
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JGenerifiable.java56
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JGenerifiableImpl.java79
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JInvocation.java186
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JJavaName.java252
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JLabel.java52
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JMethod.java474
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JMod.java44
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JMods.java158
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JNarrowedClass.java226
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JNullType.java64
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JOp.java254
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JPackage.java474
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JPrimitiveType.java123
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JResourceFile.java65
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JReturn.java55
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JStatement.java38
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JStringLiteral.java48
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JSwitch.java90
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JThrow.java56
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JTryBlock.java69
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JType.java182
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JTypeVar.java121
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JTypeWildcard.java109
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JVar.java216
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/JWhileLoop.java73
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/SecureLoader.java89
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/TypedAnnotationWriter.java250
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JBinaryFile.java62
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JPropertyFile.java61
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JSerializedObject.java61
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JStaticFile.java80
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JStaticJavaFile.java239
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JTextFile.java59
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/fmt/SecureLoader.java91
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/package-info.java115
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/util/ClassNameComparator.java46
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/util/EncoderFactory.java73
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/util/JavadocEscapeWriter.java85
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/util/MS1252Encoder.java223
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/util/SingleByteEncoder.java159
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/util/Surrogate.java355
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/util/UnicodeEscapeWriter.java90
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/writer/FileCodeWriter.java111
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/writer/FilterCodeWriter.java58
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/writer/ProgressCodeWriter.java72
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/writer/PrologCodeWriter.java87
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/writer/SingleStreamCodeWriter.java77
-rw-r--r--src/share/jaxws_classes/com/sun/codemodel/internal/writer/ZipCodeWriter.java77
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/Builder.java34
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/ByteArrayDataSource.java70
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/FinalArrayList.java50
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/FragmentContentHandler.java57
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/Interned.java55
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/NotNull.java43
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/Nullable.java43
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/Pool.java116
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/SAXException2.java52
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/SAXParseException2.java57
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/XMLStreamException2.java63
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/XMLStreamReaderToContentHandler.java388
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/localization/Localizable.java63
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessage.java58
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java43
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/localization/Localizer.java155
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/localization/NullLocalizable.java51
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/logging/Logger.java515
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/package-info.java29
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/tools/DefaultAuthenticator.java324
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/tools/MaskingClassLoader.java69
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/tools/ParallelWorldClassLoader.java217
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/tools/SecureLoader.java102
-rw-r--r--src/share/jaxws_classes/com/sun/istack/internal/tools/package-info.java32
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMX.java144
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXGlassfish.java318
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXUtil.java79
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/amx/BootAMXMBean.java48
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/amx/MBeanListener.java330
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Stability.java329
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Taxonomy.java48
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/PluginPoint.java54
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProvider.java39
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderInfo.java86
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManager.java137
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManagerDelegate.java40
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/Probe.java54
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeListener.java47
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeParam.java47
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeProvider.java50
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/AverageRangeStatistic.java46
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundaryStatistic.java43
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundedRangeStatistic.java33
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/CountStatistic.java38
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/RangeStatistic.java48
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Statistic.java59
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Stats.java46
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/StringStatistic.java47
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/TimeStatistic.java53
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/annotations/Reset.java44
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/AverageRangeStatisticImpl.java155
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundaryStatisticImpl.java96
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundedRangeStatisticImpl.java161
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/CountStatisticImpl.java118
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/RangeStatisticImpl.java140
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatisticImpl.java145
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatsImpl.java79
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StringStatisticImpl.java106
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/TimeStatisticImpl.java160
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/AMXClient.java274
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/AMXMBeanInterface.java75
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/AMXMetadata.java121
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/Description.java62
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/DescriptorFields.java141
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/DescriptorKey.java214
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/GmbalException.java47
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/GmbalMBean.java39
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/GmbalMBeanNOPImpl.java101
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/Impact.java60
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/IncludeSubclass.java51
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/InheritedAttribute.java74
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/InheritedAttributes.java44
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedAttribute.java80
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedData.java65
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObject.java43
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObjectManager.java371
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObjectManagerFactory.java132
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObjectManagerNOPImpl.java175
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedOperation.java46
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/NameValue.java43
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ParameterNames.java48
-rw-r--r--src/share/jaxws_classes/com/sun/org/glassfish/gmbal/util/GenericConstructor.java127
-rw-r--r--src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin1
-rw-r--r--src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin6
-rw-r--r--src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.xml.internal.ws.spi.db.BindingContextFactory2
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ConfigReader.java284
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties49
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/Messages.java55
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/NGCCRuntimeEx.java165
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGenerator.java341
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGeneratorFacade.java56
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/SecureLoader.java75
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/AnnotationParser.java145
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Const.java56
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/ErrorReceiverImpl.java87
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/InlineAnnotationReaderImpl.java175
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_de.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_es.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_fr.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_it.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ja.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ko.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_pt_BR.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_CN.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_TW.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Messages.java52
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Options.java130
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SchemaGenerator.java152
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SecureLoader.java75
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/package.html33
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/api/JXC.java45
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/api/impl/j2s/JAXBModelImpl.java194
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/api/impl/j2s/JavaCompilerImpl.java111
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/AttributesImpl.java629
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Classes.java338
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Config.java336
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventReceiver.java44
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventSource.java52
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCHandler.java193
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCInterleaveFilter.java353
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCRuntime.java557
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Schema.java331
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/config.rng131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/config.xsd67
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java517
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/Invoker.java277
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/ToolVersion.java38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/WsGen.java61
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/WsImport.java61
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/api/TJavaGeneratorExtension.java47
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenExtension.java44
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenProtocol.java53
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensible.java80
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtension.java39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensionHandler.java216
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLOperation.java43
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLParserContext.java82
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/package-info.java121
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/ProcessorException.java55
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/CustomExceptionGenerator.java160
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorBase.java244
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorConstants.java58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorException.java47
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorExtension.java80
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorUtil.java67
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JavaGeneratorExtensionFacade.java48
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JwsImplGenerator.java582
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/Names.java180
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/SeiGenerator.java491
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/ServiceGenerator.java422
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/W3CAddressingJavaGeneratorExtension.java97
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AbstractType.java145
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperation.java133
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperationType.java43
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Block.java78
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ExtendedModelVisitor.java138
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Fault.java170
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/HeaderFault.java60
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Message.java234
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Model.java158
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelException.java56
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelObject.java115
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelProperties.java76
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelVisitor.java42
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Operation.java257
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Parameter.java193
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Port.java179
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Request.java44
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Response.java74
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Service.java120
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/exporter/ExternalObject.java48
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaArrayType.java77
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaException.java39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaInterface.java166
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaMethod.java129
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaParameter.java96
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaSimpleType.java46
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureMember.java129
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureType.java175
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaType.java145
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBElementMember.java100
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBMapping.java101
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBModel.java141
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBProperty.java93
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBStructuredType.java138
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBType.java124
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeAndAnnotation.java78
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeVisitor.java37
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitMember.java85
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitStructure.java92
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/Util.java66
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/JavaSimpleTypeCreator.java121
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/Modeler.java46
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerConstants.java111
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerException.java61
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/AnnotationProcessorContext.java181
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/FaultInfo.java85
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MakeSafeTypeVisitor.java78
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MemberInfo.java79
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/ModelBuilder.java74
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeModeler.java163
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMoniker.java38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMonikerFactory.java114
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceAp.java363
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceConstants.java54
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceVisitor.java870
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceWrapperGenerator.java569
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WrapperInfo.java53
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/AccessorElement.java74
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ClassNameAllocatorImpl.java78
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ConsoleErrorReporter.java101
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/JAXBModelBuilder.java148
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ModelerUtils.java281
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/PseudoSchemaBuilder.java314
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModeler.java2821
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModelerBase.java791
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/ClassNameCollector.java260
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/DirectoryUtil.java108
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/IndentingWriter.java330
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java54
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java114
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java78
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelMessages.java480
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelerMessages.java1603
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java41
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/UtilMessages.java78
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java918
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WscompileMessages.java993
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WsdlMessages.java974
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_de.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_es.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_fr.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_it.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ja.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ko.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_pt_BR.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_CN.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_TW.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_de.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_es.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_fr.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_it.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ja.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ko.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_pt_BR.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_CN.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_TW.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_de.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_es.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_fr.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_it.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ja.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ko.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_pt_BR.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_CN.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_TW.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model.properties112
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_de.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_es.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_fr.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_it.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ja.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ko.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_pt_BR.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_CN.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_TW.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler.properties248
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_de.properties246
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_es.properties246
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_fr.properties246
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_it.properties246
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ja.properties246
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ko.properties246
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_pt_BR.properties246
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_CN.properties246
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_TW.properties246
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_de.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_es.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_fr.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_it.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ja.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ko.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_pt_BR.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_CN.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_TW.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_de.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_es.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_fr.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_it.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ja.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ko.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_pt_BR.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_CN.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_TW.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap.properties162
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_de.properties160
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_es.properties160
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_fr.properties160
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_it.properties160
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ja.properties160
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ko.properties160
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_pt_BR.properties160
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_CN.properties160
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_TW.properties160
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile.properties261
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_de.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_es.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_fr.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_it.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ja.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ko.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_pt_BR.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_CN.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_TW.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl.properties171
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_de.properties157
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_es.properties157
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_fr.properties157
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_it.properties157
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ja.properties157
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ko.properties157
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_pt_BR.properties157
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_CN.properties157
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_TW.properties157
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/spi/WSToolsObjectFactory.java100
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/spi/package-info.java32
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/util/ClassNameInfo.java73
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/util/ForkEntityResolver.java60
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLFetcher.java238
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLParseException.java46
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSToolsObjectFactoryImpl.java53
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/util/xml/XmlUtil.java63
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AbortException.java42
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AuthInfo.java67
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/BadCommandLineException.java60
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiver.java158
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiverFilter.java85
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/FilerCodeWriter.java69
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/JavaCompilerHelper.java94
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java491
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Plugin.java135
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WSCodeWriter.java60
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenOptions.java296
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java448
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportListener.java89
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java783
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java586
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/plugin/at_generated/PluginImpl.java101
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Binding.java170
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingFault.java118
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingInput.java115
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOperation.java234
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOutput.java115
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Definitions.java237
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Documentation.java52
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Fault.java167
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Import.java88
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Input.java150
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Kinds.java44
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Message.java121
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/MessagePart.java156
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Operation.java255
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/OperationStyle.java42
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Output.java149
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Port.java159
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/PortType.java156
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Service.java126
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Types.java122
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLConstants.java58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocument.java173
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitor.java70
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitorBase.java105
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPAddress.java63
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPBinding.java63
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPConstants.java46
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPOperation.java63
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlEncoded.java50
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlReplacement.java50
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/CustomName.java79
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Exception.java55
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBinding.java314
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBindingsConstants.java194
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Parameter.java103
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEConstants.java45
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEContent.java69
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEMultipartRelated.java80
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEPart.java90
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEXml.java60
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaConstants.java136
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaKinds.java48
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Binding.java40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Constants.java156
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPAddress.java63
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBinding.java78
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBody.java99
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPConstants.java259
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPFault.java100
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeader.java155
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeaderFault.java123
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPOperation.java78
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPStyle.java40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPUse.java40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/AbstractDocument.java186
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Defining.java35
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/DuplicateEntityException.java58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Elemental.java40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Entity.java105
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityAction.java35
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceAction.java37
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceValidator.java38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensibilityHelper.java76
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionImpl.java57
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitor.java38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitorBase.java43
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExternalEntityReference.java65
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GlobalEntity.java60
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GloballyKnown.java37
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Identifiable.java35
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Kind.java44
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/NoSuchEntityException.java50
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java53
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParserListener.java38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/QNameAction.java37
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/TWSDLParserContextImpl.java193
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java48
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/WSDLLocation.java91
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractExtensionHandler.java84
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractReferenceFinderImpl.java122
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Constants.java145
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java86
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMBuilder.java125
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java387
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestParser.java95
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestScanner.java176
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/HTTPExtensionHandler.java216
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/InternalizationLogic.java107
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Internalizer.java522
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/JAXWSBindingExtensionHandler.java661
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MIMEExtensionHandler.java228
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MemberSubmissionAddressingExtensionHandler.java139
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java384
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/NamespaceContextImpl.java99
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy12ExtensionHandler.java107
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy15ExtensionHandler.java107
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAP12ExtensionHandler.java109
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPEntityReferenceValidator.java217
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPExtensionHandler.java471
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Util.java181
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/VersionChecker.java136
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingExtensionHandler.java89
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingMetadataExtensionHandler.java99
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLInternalizationLogic.java151
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLParser.java1104
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WhitespaceStripper.java122
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/AbortException.java43
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/BadCommandLineException.java59
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/ClassLoaderBuilder.java122
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/ConsoleErrorReporter.java83
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/Driver.java526
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/ErrorReceiver.java172
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/Language.java37
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties251
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_es.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_it.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/Messages.java195
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/ModelLoader.java598
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/Options.java1053
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/Plugin.java245
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/ProgressCodeWriter.java74
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/SchemaCache.java76
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/SecureLoader.java103
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/XJCFacade.java104
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/XJCListener.java119
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/accessors/PluginImpl.java93
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/at_generated/PluginImpl.java115
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/code_injector/Const.java36
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/code_injector/PluginImpl.java82
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/episode/PluginImpl.java341
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/episode/package-info.java30
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/locator/SourceLocationAddOn.java93
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/sync/SynchronizedMethodAddOn.java75
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/ClassNameAllocator.java63
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/ErrorListener.java55
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/J2SJAXBModel.java82
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/JAXBModel.java59
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/JavaCompiler.java83
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/Mapping.java99
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/Property.java87
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/Reference.java106
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/S2JJAXBModel.java112
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/SchemaCompiler.java254
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/SpecVersion.java59
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/TypeAndAnnotation.java60
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/XJC.java66
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/AbstractMappingImpl.java188
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/BeanMappingImpl.java63
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/DowngradingErrorHandler.java55
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementAdapter.java131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementCollectionAdapter.java118
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementMappingImpl.java91
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementSingleAdapter.java88
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/JAXBModelImpl.java118
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/PropertyImpl.java75
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/SchemaCompilerImpl.java324
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/TypeAndAnnotationImpl.java113
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/package.html30
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/package.html64
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/ApClassLoader.java152
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/FilerCodeWriter.java81
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages.java48
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_de.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_es.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_fr.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_it.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_ja.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_ko.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_pt_BR.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_zh_CN.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_zh_TW.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/ToolsJarNotFoundException.java51
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/package.html30
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAccessorOrderWriter.java44
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAccessorTypeWriter.java44
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAnyAttributeWriter.java41
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAnyElementWriter.java48
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAttachmentRefWriter.java41
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAttributeWriter.java47
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementDeclWriter.java56
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementRefWriter.java52
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementRefsWriter.java43
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementWrapperWriter.java49
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementWriter.java56
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementsWriter.java43
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlEnumValueWriter.java43
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlEnumWriter.java46
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlIDREFWriter.java41
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlIDWriter.java41
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlInlineBinaryDataWriter.java41
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlJavaTypeAdapterWriter.java50
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlListWriter.java41
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlMimeTypeWriter.java43
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlMixedWriter.java41
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlNsWriter.java45
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlRegistryWriter.java41
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlRootElementWriter.java45
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaTypeWriter.java50
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaTypesWriter.java43
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaWriter.java52
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSeeAlsoWriter.java46
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlTransientWriter.java41
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlTypeWriter.java54
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlValueWriter.java41
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/BeanGenerator.java834
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ClassOutlineImpl.java66
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/DualObjectFactoryGenerator.java74
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ElementOutlineImpl.java104
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ImplStructureStrategy.java216
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle.properties48
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_de.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_es.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_fr.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_it.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_ja.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_ko.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_pt_BR.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_zh_CN.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_zh_TW.properties39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/Messages.java54
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MethodWriter.java88
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ObjectFactoryGenerator.java58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ObjectFactoryGeneratorImpl.java384
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/PackageOutlineImpl.java280
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/PrivateObjectFactoryGenerator.java71
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/PublicObjectFactoryGenerator.java50
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/AbstractField.java491
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/AbstractFieldWithVar.java119
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/AbstractListField.java225
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ArrayField.java225
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ConstField.java110
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ConstFieldRenderer.java56
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ContentListField.java177
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/DefaultFieldRenderer.java104
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/DummyListField.java153
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/FieldRenderer.java84
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/FieldRendererFactory.java95
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/GenericFieldRenderer.java71
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/IsSetField.java123
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/IsSetFieldRenderer.java63
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_de.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_es.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_fr.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_it.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_ja.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_ko.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_pt_BR.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_zh_CN.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_zh_TW.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/Messages.java49
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/NoExtendedContentField.java188
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/SingleField.java173
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/SinglePrimitiveAccessField.java40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/UnboxedField.java121
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/UntypedListField.java167
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/UntypedListFieldRenderer.java64
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/package.html30
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/package-info.java32
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/BlockReference.java47
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/ExistingBlockReference.java46
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/LazyBlockReference.java53
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/WhitespaceNormalizer.java101
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/AbstractCElement.java65
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/AbstractCTypeInfoImpl.java111
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/AutoClassNameAllocator.java71
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CAdapter.java119
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CArrayInfo.java99
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CAttributePropertyInfo.java92
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CBuiltinLeafInfo.java405
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClass.java36
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClassInfo.java501
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClassInfoParent.java83
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClassRef.java134
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CCustomizable.java66
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CCustomizations.java144
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CDefaultValue.java55
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CElement.java47
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CElementInfo.java297
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CElementPropertyInfo.java213
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CEnumConstant.java96
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CEnumLeafInfo.java277
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CNonElement.java59
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CPluginCustomization.java80
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CPropertyInfo.java342
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CPropertyVisitor.java43
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CReferencePropertyInfo.java239
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CSingleTypePropertyInfo.java95
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeInfo.java51
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeRef.java159
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CValuePropertyInfo.java55
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CWildcardTypeInfo.java64
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/ClassNameAllocatorWrapper.java65
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Constructor.java65
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Model.java491
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Multiplicity.java206
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Populatable.java44
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/SymbolSpace.java80
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/TypeUse.java107
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/TypeUseFactory.java82
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/TypeUseImpl.java129
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNClass.java73
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java73
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NClass.java39
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NClassByJClass.java57
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NParameterizedType.java78
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NType.java77
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java336
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java94
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/package.html42
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/model/package-info.java57
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/Aspect.java64
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/ClassOutline.java125
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/ElementOutline.java72
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/EnumConstantOutline.java58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/EnumOutline.java77
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/FieldAccessor.java104
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/FieldOutline.java70
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/Outline.java133
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/PackageOutline.java102
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/package.html36
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/package-info.java90
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/AbstractExtensionBindingChecker.java210
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Const.java65
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/ExtensionBindingChecker.java137
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle.properties74
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_de.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_es.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_fr.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_it.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_ja.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_ko.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_pt_BR.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_zh_CN.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_zh_TW.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Messages.java59
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/ModelChecker.java101
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/RawTypeSet.java227
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Ring.java134
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/TypeUtil.java266
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Util.java80
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Block.java50
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Element.java314
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle.properties48
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_de.properties38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_es.properties38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_fr.properties38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_it.properties38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_ja.properties38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_ko.properties38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_pt_BR.properties38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_zh_CN.properties38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_zh_TW.properties38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Messages.java64
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/ModelGroup.java138
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Occurence.java83
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/TDTDReader.java463
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Term.java62
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIAttribute.java107
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIConstructor.java90
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIContent.java138
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIConversion.java40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIElement.java273
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIEnumeration.java112
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIInterface.java96
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIUserConversion.java227
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BindInfo.java334
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DOMBuilder.java57
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DOMLocator.java70
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DOMUtil.java108
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DTDExtensionBindingChecker.java89
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_de.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_es.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_fr.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_it.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_ja.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_ko.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_pt_BR.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_zh_CN.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_zh_TW.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/Messages.java46
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/bindingfile.rng317
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/bindingfile.xsd271
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package.html26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/xjc.xsd51
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Choice.java69
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/ConnectedComponent.java98
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Element.java228
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/ElementSet.java63
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/ElementSets.java84
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Expression.java72
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Graph.java88
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/OneOrMore.java58
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Sequence.java85
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/SinkNode.java41
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/SourceNode.java41
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/package.html32
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/AbstractReferenceFinderImpl.java132
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContentHandlerNamespacePrefixAdapter.java115
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.java86
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMBuilder.java102
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java574
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForestParser.java91
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForestScanner.java177
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/InternalizationLogic.java94
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/Internalizer.java615
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/LocatorTable.java63
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle.properties104
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_de.properties82
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_es.properties82
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_fr.properties82
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_it.properties82
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_ja.properties82
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_ko.properties82
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_pt_BR.properties82
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_zh_CN.properties82
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_zh_TW.properties82
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/Messages.java85
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/NamespaceContextImpl.java106
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/SCDBasedBindingSet.java246
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/VersionChecker.java139
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/WhitespaceStripper.java127
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/package.html26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/package.html26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/BindStyle.java33
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/ContentModelBinder.java130
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/DatatypeLib.java76
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/DefineFinder.java61
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/NameCalculator.java35
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/RELAXNGCompiler.java270
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/RELAXNGInternalizationLogic.java76
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/RawTypeSetBuilder.java137
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/TypePatternBinder.java140
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/TypeUseBinder.java172
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/Abstractifier.java55
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BGMBuilder.java568
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindBlue.java107
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindGreen.java131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindPurple.java153
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindRed.java102
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindYellow.java96
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindingComponent.java52
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ClassBinder.java41
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ClassBinderFilter.java126
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ClassSelector.java485
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/CollisionInfo.java68
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ColorBinder.java93
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/DefaultClassBinder.java558
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/DefaultParticleBinder.java392
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ErrorReporter.java109
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ExpressionBuilder.java134
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ExpressionParticleBinder.java143
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/GElement.java49
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/GElementImpl.java67
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/GWildcardElement.java64
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle.properties200
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_de.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_es.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_fr.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_it.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_ja.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_ko.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_pt_BR.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_zh_CN.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_zh_TW.properties131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/Messages.java157
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MultiplicityCounter.java95
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ParticleBinder.java255
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/RawTypeSetBuilder.java379
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/RefererFinder.java154
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/SimpleTypeBuilder.java918
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/UnusedCustomizationChecker.java267
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/WildcardNameClassBuilder.java84
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/AbstractDeclarationImpl.java87
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/AnnotationParserFactoryImpl.java159
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIClass.java131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIConversion.java349
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIDeclaration.java105
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIDom.java51
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIEnum.java129
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIEnumMember.java66
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIFactoryMethod.java65
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIGlobalBinding.java577
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.java63
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIProperty.java754
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BISchemaBinding.java158
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BISerializable.java44
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIXDom.java46
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIXPluginCustomization.java67
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIXSubstitutable.java48
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BindInfo.java357
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/CollectionTypeAttribute.java66
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/DomHandlerEx.java100
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/EnumMemberMode.java54
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/ForkingFilter.java181
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/LocalScoping.java38
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle.properties52
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_de.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_es.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_fr.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_it.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_ja.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_ko.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_pt_BR.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_zh_CN.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_zh_TW.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/Messages.java46
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/OptionalPropertyMode.java42
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/binding.rng913
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/binding.xsd327
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package-info.java33
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package.html34
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/xjc.xsd111
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/xs.xsd55
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java226
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/CTBuilder.java70
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ChoiceContentComplexTypeBuilder.java90
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ComplexTypeBindingMode.java66
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ComplexTypeFieldBuilder.java106
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ExtendedComplexTypeBuilder.java98
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/FreshComplexTypeBuilder.java94
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_de.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_es.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_fr.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_it.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_ja.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_ko.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_pt_BR.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_zh_CN.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_zh_TW.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/Messages.java46
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MixedComplexTypeBuilder.java114
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MixedExtendedComplexTypeBuilder.java92
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MultiWildcardComplexTypeBuilder.java88
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/RestrictedComplexTypeBuilder.java95
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/STDerivedComplexTypeBuilder.java71
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/CustomizationContextChecker.java194
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/IncorrectNamespaceURIChecker.java129
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/LSInputSAXWrapper.java110
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle.properties47
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_de.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_es.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_fr.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_it.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_ja.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_ko.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_pt_BR.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_zh_CN.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_zh_TW.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/Messages.java52
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java131
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/XMLSchemaInternalizationLogic.java115
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/JAXBContextFactory.java170
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/ZeroOneBooleanAdapter.java51
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/package.html31
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/CodeModelClassFactory.java143
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/DOMUtils.java141
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ErrorReceiverFilter.java75
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ForkContentHandler.java128
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ForkEntityResolver.java54
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle.properties52
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_de.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_es.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_fr.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_it.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_ja.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_ko.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_pt_BR.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_zh_CN.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_zh_TW.properties40
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/Messages.java57
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MimeTypeRange.java165
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/NamespaceContextAdapter.java60
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/NullStream.java53
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ReadOnlyAdapter.java42
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/StringCutter.java97
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/SubtreeCutter.java108
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/util/Util.java76
-rw-r--r--src/share/jaxws_classes/com/sun/tools/internal/xjc/writer/SignatureWriter.java163
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/AccessorFactory.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/AccessorFactoryImpl.java96
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/AnyTypeAdapter.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/CycleRecoverable.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java1137
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/IDResolver.java160
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/InternalAccessorFactory.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/Locatable.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/Util.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/ValidationEventLocatorEx.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/WhiteSpaceProcessor.java198
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/XmlAccessorFactory.java44
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/annotation/OverrideAnnotationOf.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/annotation/XmlIsSet.java113
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/annotation/XmlLocation.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/AccessorException.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/Bridge.java320
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/BridgeContext.java98
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/ClassResolver.java104
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/CompositeStructure.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/ErrorListener.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java537
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_de.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_es.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_fr.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_it.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_ja.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_ko.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_pt_BR.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_zh_CN.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_zh_TW.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/RawAccessor.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java134
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/impl/NameConverter.java269
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/impl/NameUtil.java328
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/api/package-info.java40
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/CharacterEscapeHandler.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/DataWriter.java377
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/DumbEscapeHandler.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages.java110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages.properties62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_de.properties53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_es.properties53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_fr.properties53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_it.properties53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_ja.properties53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_ko.properties53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_pt_BR.properties53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_zh_CN.properties53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_zh_TW.properties53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/MinimumEscapeHandler.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/NamespacePrefixMapper.java256
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/NioEscapeHandler.java95
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/SAX2DOMEx.java234
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/XMLWriter.java976
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/DOMScanner.java316
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/InfosetScanner.java98
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages.java101
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages.properties69
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_de.properties59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_es.properties59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_fr.properties59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_it.properties59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_ja.properties59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_ko.properties59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_pt_BR.properties59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_zh_CN.properties59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_zh_TW.properties59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Patcher.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/util/AttributesImpl.java654
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/util/SecureLoader.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/util/ValidationEventLocatorExImpl.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/util/Which.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/ClassFactory.java210
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/ContextFactory.java322
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.properties64
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_de.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_es.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_fr.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_it.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_ja.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_ko.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_pt_BR.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_zh_CN.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_zh_TW.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/TODO.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/WellKnownNamespace.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/bytecode/ClassTailor.java191
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/bytecode/SecureLoader.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/bytecode/package.html32
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/AbstractInlineAnnotationReaderImpl.java102
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/AnnotationReader.java162
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/AnnotationSource.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/ClassLocatable.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/FieldLocatable.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Init.java39
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Locatable.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/LocatableAnnotation.java130
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_de.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_es.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_fr.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_it.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_ja.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_ko.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_pt_BR.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_zh_CN.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_zh_TW.properties28
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/MethodLocatable.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Quick.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/RuntimeAnnotationReader.java36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/RuntimeInlineAnnotationReader.java151
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/SecureLoader.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlAttributeQuick.java72
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementDeclQuick.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementQuick.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementRefQuick.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementRefsQuick.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlEnumQuick.java64
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlRootElementQuick.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlSchemaQuick.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlSchemaTypeQuick.java72
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlTransientQuick.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlTypeQuick.java80
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlValueQuick.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/package.html30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/Adapter.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ArrayInfo.java46
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/AttributePropertyInfo.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/BuiltinLeafInfo.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ClassInfo.java182
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/Element.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ElementInfo.java97
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ElementPropertyInfo.java123
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/EnumConstant.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/EnumLeafInfo.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ErrorHandler.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ID.java33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/LeafInfo.java40
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/MapPropertyInfo.java101
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/MaybeElement.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/NonElement.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/NonElementRef.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/PropertyInfo.java152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/PropertyKind.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/Ref.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ReferencePropertyInfo.java124
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/TypeInfo.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/TypeInfoSet.java192
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/TypeRef.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ValuePropertyInfo.java35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/WildcardMode.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/WildcardTypeInfo.java36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/package-info.java64
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/AnyTypeImpl.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ArrayInfoImpl.java105
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/AttributePropertyInfoImpl.java102
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/BuiltinLeafInfoImpl.java100
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ClassInfoImpl.java1320
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/DummyPropertyInfo.java35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ERPropertyInfoImpl.java95
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ElementInfoImpl.java430
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ElementPropertyInfoImpl.java201
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/EnumConstantImpl.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/EnumLeafInfoImpl.java260
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/FieldPropertySeed.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/GetterSetterPropertySeed.java107
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/LeafInfoImpl.java91
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/MapPropertyInfoImpl.java106
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.java119
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.properties216
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_de.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_es.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_fr.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_it.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_ja.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_ko.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_pt_BR.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_zh_CN.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_zh_TW.properties152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java485
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilderI.java40
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/PropertyInfoImpl.java386
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/PropertySeed.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ReferencePropertyInfoImpl.java392
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RegistryInfoImpl.java133
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeArrayInfoImpl.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAttributePropertyInfoImpl.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java1039
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeClassInfoImpl.java403
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java135
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementPropertyInfoImpl.java77
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeEnumConstantImpl.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeEnumLeafInfoImpl.java157
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeMapPropertyInfoImpl.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java179
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeReferencePropertyInfoImpl.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java95
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeRefImpl.java57
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeValuePropertyInfoImpl.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/SecureLoader.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/SingleTypePropertyInfoImpl.java134
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/TypeInfoImpl.java165
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/TypeInfoSetImpl.java391
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/TypeRefImpl.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Util.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ValuePropertyInfoImpl.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/package.html32
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/GenericArrayTypeImpl.java81
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java408
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ParameterizedTypeImpl.java181
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java633
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/SecureLoader.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/TypeVisitor.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/WildcardTypeImpl.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/package.html30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeArrayInfo.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeAttributePropertyInfo.java38
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeBuiltinLeafInfo.java36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeClassInfo.java72
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeElement.java36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeElementInfo.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeElementPropertyInfo.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeEnumLeafInfo.java36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeLeafInfo.java67
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeMapPropertyInfo.java38
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeNonElement.java44
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeNonElementRef.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimePropertyInfo.java95
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeReferencePropertyInfo.java38
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfo.java36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeRef.java38
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeValuePropertyInfo.java37
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/package-info.java38
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/util/ArrayInfoUtil.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/package-info.java182
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/AnyTypeBeanInfo.java177
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ArrayBeanInfoImpl.java182
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/AssociationMap.java141
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/AttributeAccessor.java35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BinderImpl.java277
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BridgeAdapter.java150
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BridgeContextImpl.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BridgeImpl.java141
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java439
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/CompositeStructureBeanInfo.java103
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ContentHandlerAdaptor.java158
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Coordinator.java172
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/DomPostInitAction.java81
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java350
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/FilterTransducer.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/IllegalAnnotationException.java187
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/IllegalAnnotationsException.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/InlineBinaryTransducer.java77
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/InternalBridge.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java1128
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JaxBeanInfo.java550
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/LeafBeanInfoImpl.java163
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/LifecycleMethods.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Location.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/MarshallerImpl.java619
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_de.properties83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_es.properties83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_fr.properties83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_it.properties83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_ja.properties83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_ko.properties83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_pt_BR.properties83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_zh_CN.properties83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_zh_TW.properties83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/MimeTypedTransducer.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Name.java98
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/NameBuilder.java143
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/NameList.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/NamespaceContext2.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/RuntimeUtil.java128
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/SchemaTypeTransducer.java87
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/StAXPostInitAction.java89
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/SwaRefAdapter.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/SwaRefAdapterMarker.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Transducer.java134
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ValueListBeanInfoImpl.java172
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/XMLSerializer.java1077
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/C14nXmlOutput.java223
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/DOMOutput.java67
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/Encoded.java198
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/FastInfosetStreamWriterOutput.java463
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/ForkXmlOutput.java109
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/IndentingUTF8XmlOutput.java156
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/MTOMXmlOutput.java129
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/NamespaceContextImpl.java559
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/Pcdata.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/SAXOutput.java173
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/SecureLoader.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/StAXExStreamWriterOutput.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/UTF8XmlOutput.java433
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XMLEventWriterOutput.java126
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XMLStreamWriterOutput.java210
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XmlOutput.java175
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XmlOutputAbstractImpl.java138
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/package-info.java29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/package.html32
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayERProperty.java200
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayElementLeafProperty.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayElementNodeProperty.java57
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayElementProperty.java244
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayReferenceNodeProperty.java167
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/AttributeProperty.java119
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ListElementProperty.java120
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_de.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_es.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_fr.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_it.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_ja.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_ko.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_pt_BR.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_zh_CN.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_zh_TW.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Property.java144
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/PropertyFactory.java155
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/PropertyImpl.java90
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleElementLeafProperty.java191
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleElementNodeProperty.java182
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java292
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleReferenceNodeProperty.java160
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/StructureLoaderBuilder.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/TagAndType.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/UnmarshallerChain.java69
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ValueProperty.java100
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java486
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/AdaptedAccessor.java103
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/AdaptedLister.java105
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/DefaultTransducedAccessor.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/ListIterator.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/ListTransducedAccessorImpl.java146
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java494
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages.properties43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_de.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_es.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_fr.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_it.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_ja.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_ko.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_pt_BR.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_zh_CN.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_zh_TW.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/NullSafeAccessor.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerBoolean.java104
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerByte.java101
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerCharacter.java104
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerDouble.java104
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerFloat.java104
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerInteger.java104
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerLong.java104
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerShort.java104
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java343
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java112
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Bean.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Const.java40
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Boolean.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Byte.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Character.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Double.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Float.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Integer.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Long.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Ref.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Short.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java305
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Boolean.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Byte.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Character.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Double.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Float.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Integer.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Long.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Ref.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Short.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedAccessorFactory.java200
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedTransducedAccessorFactory.java167
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Ref.java37
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/SecureLoader.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Boolean.java57
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Byte.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Double.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Float.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Integer.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Long.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Short.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Boolean.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Byte.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Double.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Float.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Integer.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Long.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Short.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package.html39
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/package.html30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/AttributesEx.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/AttributesExImpl.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Base64Data.java307
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ChildLoader.java44
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DefaultIDResolver.java67
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DefaultValueLoaderDecorator.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Discarder.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DomLoader.java164
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/FastInfosetConnector.java294
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/IntArrayData.java122
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/IntData.java90
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Intercepter.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/InterningXmlVisitor.java154
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyLoader.java57
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyXsiLoader.java113
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Loader.java262
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java105
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorExWrapper.java64
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/MTOMDecorator.java131
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages.properties56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_de.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_es.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_fr.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_it.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_ja.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_ko.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_pt_BR.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_zh_CN.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_zh_TW.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Patcher.java35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ProxyLoader.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Receiver.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SAXConnector.java202
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Scope.java136
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SecureLoader.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXConnector.java109
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXEventConnector.java286
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXExConnector.java72
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXStreamConnector.java387
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java273
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/TagName.java134
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/TextLoader.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallerImpl.java619
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallingContext.java1344
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ValidatingUnmarshaller.java134
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ValuePropertyLoader.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/WildcardLoader.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XmlVisitor.java153
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiNilLoader.java119
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiTypeLoader.java127
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/FoolProofResolver.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Form.java112
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/GroupKind.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_de.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_es.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_fr.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_it.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_ja.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_ko.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_pt_BR.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_zh_CN.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_zh_TW.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/MultiMap.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Tree.java244
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Util.java129
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/XmlSchemaGenerator.java1615
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/Bindings.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/Klass.java40
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/Package.java35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/SchemaBindings.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/package-info.java34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/package-info.java34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Annotated.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Annotation.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Any.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Appinfo.java46
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/AttrDecls.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/AttributeType.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexContent.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexExtension.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexRestriction.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexType.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexTypeHost.java44
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexTypeModel.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ContentModelContainer.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Documentation.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Element.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ExplicitGroup.java40
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ExtensionType.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/FixedOrDefault.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Import.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/List.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/LocalAttribute.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/LocalElement.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/NestedParticle.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/NoFixedFacet.java44
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Occurs.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Particle.java32
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Redefinable.java40
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Schema.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SchemaTop.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleContent.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleDerivation.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleExtension.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleRestriction.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleRestrictionModel.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleType.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleTypeHost.java44
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TopLevelAttribute.java46
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TopLevelElement.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TypeDefParticle.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TypeHost.java40
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Union.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Wildcard.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.java27
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package.html32
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/xmlschema-for-jaxb.rng1579
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/ByteArrayOutputStreamEx.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/CollisionCheckStack.java221
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/DataSourceSource.java123
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/EditDistance.java143
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/FatalAdapter.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/FlattenIterator.java81
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/QNameMap.java480
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/StackRecorder.java34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/TypeCast.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java265
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDEventListener.java344
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDHandlerBase.java120
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDParser.java2350
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/EndOfInputException.java31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/EntityDecl.java40
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/ExternalEntity.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/InputEntity.java990
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/InternalEntity.java36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/MessageCatalog.java516
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/Resolver.java448
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/SimpleHashtable.java285
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlChars.java387
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlNames.java147
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlReader.java784
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/package.html28
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/dtdparser/resources/Messages.properties237
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/AbstractResourceBundle.java132
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/CommonResourceBundle.java89
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/Decoder.java2010
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/DecoderStateTables.java824
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/Encoder.java2594
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/EncodingConstants.java301
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/Notation.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/OctetBufferListener.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/QualifiedName.java310
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/UnparsedEntity.java39
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BASE64EncodingAlgorithm.java244
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BooleanEncodingAlgorithm.java271
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BuiltInEncodingAlgorithm.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BuiltInEncodingAlgorithmFactory.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BuiltInEncodingAlgorithmState.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/DoubleEncodingAlgorithm.java213
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/FloatEncodingAlgorithm.java194
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/HexadecimalEncodingAlgorithm.java139
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/IEEE754FloatingPointEncodingAlgorithm.java37
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/IntEncodingAlgorithm.java193
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/IntegerEncodingAlgorithm.java39
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/LongEncodingAlgorithm.java211
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/ShortEncodingAlgorithm.java190
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/UUIDEncodingAlgorithm.java118
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/alphabet/BuiltInRestrictedAlphabets.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/dom/DOMDocumentParser.java1057
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/dom/DOMDocumentSerializer.java353
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/org/apache/xerces/util/XMLChar.java1094
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/resources/ResourceBundle.properties207
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/AttributesHolder.java295
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/Features.java37
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/Properties.java35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SAXDocumentParser.java1791
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SAXDocumentSerializer.java597
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SAXDocumentSerializerWithPrefixMapping.java268
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SystemIdResolver.java173
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/EventLocation.java123
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/StAXDocumentParser.java1878
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/StAXDocumentSerializer.java856
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/StAXManager.java128
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/AttributeBase.java137
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/CharactersEvent.java139
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/CommentEvent.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/DTDEvent.java111
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EmptyIterator.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EndDocumentEvent.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EndElementEvent.java126
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EntityDeclarationImpl.java130
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EntityReferenceEvent.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EventBase.java220
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/NamespaceBase.java100
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/ProcessingInstructionEvent.java80
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/ReadIterator.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXEventAllocatorBase.java225
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXEventReader.java179
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXEventWriter.java239
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXFilteredEvent.java138
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StartDocumentEvent.java174
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StartElementEvent.java260
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/Util.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/XMLConstants.java35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/factory/StAXEventFactory.java342
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/factory/StAXInputFactory.java256
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/factory/StAXOutputFactory.java162
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/util/StAXFilteredParser.java67
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/util/StAXParserWrapper.java236
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_DOM_Or_XML_DOM_SAX_SAXEvent.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_SAX_Or_XML_SAX_DOM_SAX_SAXEvent.java101
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_SAX_Or_XML_SAX_SAXEvent.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_SAX_XML.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_StAX_SAX_Or_XML_SAX_SAXEvent.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/PrintTable.java127
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/SAX2StAXWriter.java201
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/SAXEventSerializer.java423
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/StAX2SAXReader.java171
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/TransformInputOutput.java151
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/VocabularyGenerator.java287
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_DOM_FI.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_DOM_SAX_FI.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_SAX_FI.java92
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_SAX_StAX_FI.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArray.java158
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArrayArray.java119
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArrayIntMap.java228
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArrayString.java77
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/ContiguousCharArrayArray.java244
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/DuplicateAttributeVerifier.java124
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/FixedEntryStringIntMap.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/KeyIntMap.java136
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/LocalNameQualifiedNamesMap.java229
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/NamespaceContextImplementation.java231
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/PrefixArray.java518
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/QualifiedNameArray.java127
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/StringArray.java131
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/StringIntMap.java216
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/ValueArray.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/ValueArrayResourceException.java38
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/vocab/ParserVocabulary.java294
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/vocab/SerializerVocabulary.java205
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/vocab/Vocabulary.java69
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java196
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java656
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java147
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java762
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java180
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java277
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java382
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java402
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java1157
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java653
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java117
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java121
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java1507
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java237
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParseException.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java78
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java256
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java244
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java112
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java69
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QDecoderStream.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java111
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java198
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java199
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.java257
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java206
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java607
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java126
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java121
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java113
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java171
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java162
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java114
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java1436
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java100
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java81
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocument.java35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java193
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java179
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPIOException.java98
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java814
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java167
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java127
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java325
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java90
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/CommentImpl.java114
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailEntryImpl.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailImpl.java122
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementFactory.java167
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java1248
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java360
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java346
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java135
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java305
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java91
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/TreeException.java32
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java561
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java387
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/FaultElement1_1Impl.java81
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java97
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java121
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_de.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_es.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_fr.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_it.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ja.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ko.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_pt_BR.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_CN.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_TW.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java125
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPFactory1_1Impl.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPMessageFactory1_1Impl.java67
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java93
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java197
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/BodyElement1_2Impl.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java95
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/DetailEntry1_2Impl.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java147
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java562
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/FaultElement1_2Impl.java99
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java159
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java104
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings.properties56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_de.properties56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_es.properties56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_fr.properties56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_it.properties56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ja.properties56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ko.properties56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_pt_BR.properties56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_CN.properties56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_TW.properties56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Message1_2Impl.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPFactory1_2Impl.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java67
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java90
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/Base64.java272
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ByteInputStream.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java180
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/CharReader.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/CharWriter.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/FastInfosetReflection.java240
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java1380
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_de.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_es.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_fr.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_it.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ja.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ko.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_pt_BR.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_CN.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_TW.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LogDomainConstants.java67
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/MimeHeadersUtil.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/NamespaceContextIterator.java122
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java93
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java182
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/TeeInputStream.java91
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/XMLDeclarationParser.java179
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java423
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/EncodingAlgorithm.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/EncodingAlgorithmException.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/EncodingAlgorithmIndexes.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/ExternalVocabulary.java57
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetException.java44
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetParser.java188
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetResult.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetSerializer.java362
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetSource.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/RestrictedAlphabet.java40
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/Vocabulary.java108
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/VocabularyApplicationData.java46
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/EncodingAlgorithmAttributes.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/EncodingAlgorithmContentHandler.java107
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/ExtendedContentHandler.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/FastInfosetReader.java255
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/FastInfosetWriter.java38
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/PrimitiveTypeContentHandler.java223
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/RestrictedAlphabetContentHandler.java39
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/helpers/EncodingAlgorithmAttributesImpl.java604
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/helpers/FastInfosetDefaultHandler.java111
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/stax/FastInfosetStreamReader.java69
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/stax/LowLevelFastInfosetStreamWriter.java205
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/ASCIIUtility.java118
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/BASE64DecoderStream.java485
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Chunk.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/ChunkInputStream.java100
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/CleanUpExecutorFactory.java46
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Data.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataFile.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataHead.java276
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DecodingException.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FactoryFinder.java96
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FileData.java78
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FinalArrayList.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Header.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/InternetHeaders.java244
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/LineInputStream.java140
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEEvent.java117
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEMessage.java250
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParser.java502
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParsingException.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEPart.java250
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java107
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MimeUtility.java171
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/PropUtil.java110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/QPDecoderStream.java207
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/TempFiles.java144
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/UUDecoderStream.java357
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/WeakDataFile.java160
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Data.java534
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Encoder.java101
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64EncoderStream.java202
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/ByteArrayOutputStreamEx.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/NamespaceContextEx.java96
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/StreamingDataHandler.java145
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamReaderEx.java185
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamWriterEx.java154
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Annotations.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/BuildException.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/CommentList.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/DataPatternBuilder.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Div.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/ElementAnnotationBuilder.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Grammar.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/GrammarSection.java119
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Include.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/IncludedGrammar.java77
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/NameClassBuilder.java90
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/SchemaBuilder.java202
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Scope.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/Location.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/ParsedElementAnnotation.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/ParsedNameClass.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/ParsedPattern.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/util/CheckingSchemaBuilder.java103
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/util/LocatorImpl.java80
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/util/package.html51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/AfterPattern.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/Alphabet.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/AttributePattern.java144
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/BinaryPattern.java121
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ChoicePattern.java91
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/DataExceptPattern.java95
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/DataPattern.java91
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/DuplicateAttributeDetector.java96
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ElementPattern.java146
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/EmptyPattern.java74
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ErrorPattern.java64
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/GroupPattern.java92
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/InterleavePattern.java112
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ListPattern.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/Messages.properties148
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/NotAllowedPattern.java69
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/OneOrMorePattern.java112
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/Pattern.java161
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/PatternBuilder.java137
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/PatternInterner.java112
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/RefPattern.java153
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/RestrictionViolationException.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java792
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/SchemaPatternBuilder.java149
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/StringPattern.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/TextPattern.java81
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ValuePattern.java96
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/package.html50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/ChildElementFinder.java118
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/PatternFunction.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/PatternVisitor.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/PatternWalker.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/Annotation.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/CommentListImpl.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DAnnotation.java193
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DAttributePattern.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DChoicePattern.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DContainerPattern.java105
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DDataPattern.java156
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DDefine.java89
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DElementPattern.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DEmptyPattern.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DGrammarPattern.java103
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DGroupPattern.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DInterleavePattern.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DListPattern.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DMixedPattern.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DNotAllowedPattern.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DOMPrinter.java195
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DOneOrMorePattern.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DOptionalPattern.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPattern.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPatternVisitor.java69
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPatternWalker.java133
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DRefPattern.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DSchemaBuilderImpl.java233
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DTextPattern.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DUnaryPattern.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DValuePattern.java95
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXMLPrinter.java600
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXmlTokenPattern.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DZeroOrMorePattern.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DataPatternBuilderImpl.java90
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/ElementAnnotationBuilderImpl.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/ElementWrapper.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/GrammarBuilderImpl.java143
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/IncludeImpl.java109
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/Main.java100
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/PatternParseable.java226
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/package.html50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/CachedDatatypeLibraryFactory.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/CascadingDatatypeLibraryFactory.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/DoNothingDatatypeLibraryFactoryImpl.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeBuilder.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibrary.java81
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibraryFactory.java78
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/CompatibilityDatatypeLibrary.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/Messages.properties49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/package.html46
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/AnyNameClass.java80
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/AnyNameExceptNameClass.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/ChoiceNameClass.java92
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClass.java132
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassBuilderImpl.java119
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassVisitor.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassWalker.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NsNameClass.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NsNameExceptNameClass.java90
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NullNameClass.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/OverlapDetector.java117
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/SimpleNameClass.java99
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/package.html50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/Context.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/IllegalSchemaException.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/Messages.properties50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/Parseable.java92
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactParseable.java138
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntax.java3388
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntax.jj1963
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntaxConstants.java179
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntaxTokenManager.java1879
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/EOFException.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/EscapeSyntaxException.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/JavaCharStream.java662
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/Messages.properties69
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/ParseException.java232
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/Token.java176
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/TokenMgrError.java192
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/UCode_UCodeESC_CharStream.java594
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/AnnotationsHost.java92
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/Base.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/CommentListHost.java74
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/DataPatternBuilderHost.java103
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/DivHost.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ElementAnnotationBuilderHost.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/GrammarHost.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/GrammarSectionHost.java106
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/IncludeHost.java78
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/LocationHost.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/NameClassBuilderHost.java165
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ParsedElementAnnotationHost.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ParsedNameClassHost.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ParsedPatternHost.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/SchemaBuilderHost.java372
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ScopeHost.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/package.html47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/DtdContext.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/Messages.properties85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/SAXParseable.java149
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/SchemaParser.java1873
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/util/Localizer.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/util/Uri.java194
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/util/Utf16.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/AbstractLexicalHandler.java72
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/JAXPXMLReaderCreator.java103
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/XMLReaderCreator.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/XmlBaseHandler.java103
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/util/EncodingMap.java81
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/util/Naming.java226
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/util/WellKnownNamespaces.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractCreator.java189
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractCreatorProcessor.java142
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractProcessor.java259
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AttributesHolder.java193
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/FragmentedArray.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/MutableXMLStreamBuffer.java247
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBuffer.java479
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferException.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferMark.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferResult.java118
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferSource.java103
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/DefaultWithLexicalHandler.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/Features.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/Properties.java34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/SAXBufferCreator.java270
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/SAXBufferProcessor.java727
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/NamespaceContexHelper.java286
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamBufferCreator.java111
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferCreator.java383
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferProcessor.java1126
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferCreator.java272
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferProcessor.java525
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/Attribute.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/Cdata.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/Comment.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/ContainerElement.java376
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/Content.java80
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/ContentVisitor.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/DatatypeWriter.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/Document.java338
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/EndDocument.java39
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/EndTag.java39
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/IllegalAnnotationException.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/IllegalSignatureException.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/NamespaceDecl.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/NamespaceResolver.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/NamespaceSupport.java845
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/Pcdata.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/StartDocument.java39
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/StartTag.java248
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/TXW.java117
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/Text.java46
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/TxwException.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/TypedXmlWriter.java266
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlAttribute.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlCDATA.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlElement.java98
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlNamespace.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlValue.java57
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/package.html51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/CharacterEscapeHandler.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DataWriter.java374
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DelegatingXMLStreamWriter.java171
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DomSerializer.java311
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DumbEscapeHandler.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DumpSerializer.java91
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/IndentingXMLFilter.java312
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/IndentingXMLStreamWriter.java195
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/ResultFactory.java67
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/SaxSerializer.java213
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/StaxSerializer.java145
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/StreamSerializer.java194
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/TXWResult.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/TXWSerializer.java87
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/XMLWriter.java1075
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/XmlSerializer.java152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/output/package.html34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/txw2/package.html34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/Closeable.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java420
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EndpointReferenceUtil.java411
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemAction.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemHeaderQName.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingConstants.java119
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingMetadataConstants.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaClientTube.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaServerTube.java136
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WSEPRExtension.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaActionUtil.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaClientTube.java107
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaPropertyBag.java195
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaServerTube.java371
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTube.java405
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelper.java360
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelperImpl.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/ActionNotSupportedException.java46
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/InvalidAddressingHeaderException.java64
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/MissingAddressingHeaderException.java78
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingFeatureConfigurator.java146
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyMapConfigurator.java147
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyValidator.java103
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPrefixMapper.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionAddressingConstants.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaClientTube.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaServerTube.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemAction.java64
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemHeaderQName.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/WsaTubeHelperImpl.java89
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingID.java450
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingIDFactory.java89
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/Cancelable.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/Component.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentEx.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentFeature.java98
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentRegistry.java46
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentsFeature.java74
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/DistributedPropertySet.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/EndpointAddress.java232
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureConstructor.java64
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidator.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidatorAnnotation.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/ImpliesWebServiceFeature.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/PropertySet.java135
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/ResourceLoader.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/SOAPVersion.java279
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/ServiceSharedFeatureMarker.java39
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSBinding.java209
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSDLLocator.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSFeatureList.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSService.java248
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/WebServiceFeatureFactory.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingPropertySet.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingVersion.java753
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/EPRHeader.java135
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/NonAnonymousResponseProcessor.java104
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OneWayFeature.java311
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OutboundReferenceParameterHeader.java397
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/WSEndpointReference.java1260
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/package-info.java28
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ClientPipelineHook.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/SelectOptimalEncodingFeature.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptor.java125
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptorFactory.java102
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ThrowableInPacketCompletionFeature.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/WSPortInfo.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/EndpointCreationAttributes.java99
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/ManagedEndpointFactory.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/Reconfigurable.java44
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedClientAssertion.java95
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedServiceAssertion.java391
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagementAssertion.java185
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/ClientCallBridge.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/Databinding.java155
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingConfig.java143
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingFactory.java123
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/EndpointCallBridge.java40
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/JavaCallInfo.java138
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MappingInfo.java92
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MetadataReader.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/SoapBodyStyle.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/WSDLGenInfo.java77
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/fastinfoset/FastInfosetFeature.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/HaInfo.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/StickyFeature.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandler.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandlerContext.java89
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AddressingUtils.java342
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Attachment.java100
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentEx.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentSet.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/ExceptionHasMessage.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/FilterMessageImpl.java175
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Header.java334
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/HeaderList.java976
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Headers.java185
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Message.java789
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageContextFactory.java188
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageHeaders.java123
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageMetadata.java37
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWrapper.java245
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWritable.java77
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Messages.java420
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Packet.java1475
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/StreamingSOAP.java32
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/SuppressAutomaticWSARequestHeadersFeature.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/package-info.java29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJFactory.java339
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java498
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SaajStaxWriter.java559
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/InputStreamMessage.java90
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/StreamBasedMessage.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/XMLStreamReaderMessage.java74
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/CheckedException.java101
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ExceptionType.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/JavaMethod.java141
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/MEP.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/Parameter.java164
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ParameterBinding.java130
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/SEIModel.java180
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/WSDLOperationMapping.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/soap/SOAPBinding.java101
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundFault.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java195
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundPortType.java127
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLDescriptorKind.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtensible.java110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtension.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFault.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFeaturedObject.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLInput.java96
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLMessage.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLModel.java196
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLObject.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java119
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOutput.java89
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPart.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPartDescriptor.java46
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPort.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPortType.java57
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLService.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundFault.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundOperation.java124
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundPortType.java78
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLFault.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLInput.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLMessage.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLModel.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOperation.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOutput.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPart.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPort.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPortType.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLService.java67
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/package-info.java46
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientPipeAssemblerContext.java109
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientTubeAssemblerContext.java340
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codec.java241
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codecs.java132
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ContentType.java38
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Engine.java121
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Fiber.java1414
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptor.java105
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptorFactory.java39
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/NextAction.java272
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Pipe.java346
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeCloner.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeClonerImpl.java112
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssembler.java119
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssemblerFactory.java96
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SOAPBindingCodec.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerPipeAssemblerContext.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerTubeAssemblerContext.java256
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/StreamSOAPCodec.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Stubs.java450
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SyncStartForAsyncFeature.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ThrowableContainerPropertySet.java120
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportPipeFactory.java116
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportTubeFactory.java160
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Tube.java396
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubeCloner.java103
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssembler.java104
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssemblerFactory.java141
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterPipeImpl.java121
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterTubeImpl.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractPipeImpl.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractTubeImpl.java133
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/PipeAdapter.java127
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/package-info.java35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/package-info.java29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/AlternativeSelector.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelGenerator.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelTranslator.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelUnmarshaller.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolver.java176
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolverFactory.java64
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/SourceModel.java100
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ValidationProcessor.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/subject/BindingSubject.java199
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractInstanceResolver.java99
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractServerAsyncTransport.java159
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Adapter.java186
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProvider.java116
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProviderCallback.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/BoundEndpoint.java78
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Container.java114
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ContainerResolver.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/DocumentAddressResolver.java78
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointAwareCodec.java44
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointComponent.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointData.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointReferenceExtensionContributor.java57
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/HttpEndpoint.java64
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolver.java260
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolverAnnotation.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Invoker.java121
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/LazyMOMProvider.java224
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/MethodUtil.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Module.java80
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/PortAddressResolver.java80
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ProviderInvokerTubeFactory.java110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ResourceInjector.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocument.java180
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentFilter.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java132
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServerPipelineHook.java99
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServiceDefinition.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ThreadLocalContainerResolver.java106
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/TransportBackChannel.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSEndpoint.java714
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSWebServiceContext.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebModule.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebServiceContextDelegate.java151
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/package-info.java31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java619
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java406
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetaDataResolver.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetadataResolverFactory.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/PolicyWSDLParserExtension.java35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/ServiceDescriptor.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java282
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtensionContext.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/XMLEntityResolver.java77
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/package-info.java29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGenExtnContext.java90
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGeneratorExtension.java271
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultClientTubelineAssemblyContext.java161
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultServerTubelineAssemblyContext.java161
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigLoader.java368
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigName.java39
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigNameImpl.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroTubelineAssembler.java325
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubeCreator.java105
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyContextImpl.java90
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyController.java135
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ClientTubelineAssemblyContext.java124
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ServerTubelineAssemblyContext.java132
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubeFactory.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContext.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContextUpdater.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyDecorator.java176
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/AddressingTubeFactory.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/BasicTransportTubeFactory.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/HandlerTubeFactory.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MonitoringTubeFactory.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MustUnderstandTubeFactory.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/TerminalTubeFactory.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/ValidationTubeFactory.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/binding/BindingImpl.java404
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/binding/FeatureListUtil.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/binding/HTTPBindingImpl.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java169
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/binding/WebServiceFeatureList.java589
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/AsyncInvoker.java81
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/AsyncResponseImpl.java138
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/BindingProviderProperties.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientContainer.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientSchemaValidationTube.java137
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientTransportException.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/ContentNegotiation.java80
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfiguration.java140
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfigurator.java185
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/MonitorRootClient.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java213
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/RequestContext.java382
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContext.java163
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContextReceiver.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/SCAnnotations.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/SEIPortInfo.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/SenderException.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/Stub.java753
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java971
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DataSourceDispatch.java78
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DispatchImpl.java659
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/JAXBDispatch.java135
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/MessageDispatch.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/PacketDispatch.java91
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/RESTSourceDispatch.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPMessageDispatch.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPSourceDispatch.java106
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/package-info.java157
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/AsyncMethodHandler.java215
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/BodyBuilder.java298
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/CallbackMethodHandler.java64
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MessageFiller.java179
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodHandler.java74
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/PollingMethodHandler.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ResponseBuilder.java721
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIMethodHandler.java219
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIStub.java201
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubAsyncHandler.java112
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubHandler.java272
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SyncMethodHandler.java124
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetter.java80
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetterFactory.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetter.java193
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetterFactory.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/pacakge-info.java29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/Converter.java217
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementAssertionCreator.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPolicyValidator.java74
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPrefixMapper.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/dev/FeatureReader.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/util/ParserUtil.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingFactoryImpl.java225
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingImpl.java288
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingProviderImpl.java104
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/BridgeWrapper.java268
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextFactory.java130
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextWrapper.java182
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/MarshallerBridge.java132
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/RawAccessorWrapper.java74
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/WrapperBridge.java157
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/BindingTypeFeature.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/EPRRecipe.java132
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/HttpConfigFeature.java112
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXBContextFactory.java102
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXWSProperties.java235
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressing.java103
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressingFeature.java131
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionEndpointReference.java209
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidation.java107
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidationFeature.java117
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/Serialization.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SerializationFeature.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ServerSideException.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachment.java77
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachmentFeature.java124
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingDataHandler.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContext.java69
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContextFeature.java131
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ValidationErrorHandler.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/WSBindingProvider.java146
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/developer/package-info.java29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/dump/LoggingDumpTube.java131
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumper.java107
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumping.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingFeature.java116
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTube.java120
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTubeFactory.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentType.java137
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentTypeImpl.java155
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataHandlerDataSource.java81
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataSourceStreamingDataHandler.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HasEncoding.java38
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HeaderTokenizer.java377
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ImageDataContentHandler.java164
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MIMEPartStreamingDataHandler.java137
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeCodec.java211
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeMultipartParser.java275
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MtomCodec.java662
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ParameterList.java131
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/RootOnlyCodec.java72
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SOAPBindingCodec.java484
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP11Codec.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP12Codec.java111
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAPCodec.java327
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StringDataContentHandler.java172
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SwACodec.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/TagInfoset.java257
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XMLHTTPBindingCodec.java336
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XmlDataContentHandler.java146
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetCodec.java273
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetMIMETypes.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderFactory.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderRecyclable.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP11Codec.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP12Codec.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAPCodec.java179
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingConstants.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPolicyValidator.java78
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPrefixMapper.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/FastInfosetFeatureConfigurator.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomFeatureConfigurator.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomPolicyMapConfigurator.java129
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/SelectOptimalEncodingFeatureConfigurator.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/DeserializationException.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAP12Constants.java77
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAPConstants.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializationException.java57
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializerConstants.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAP12NamespaceConstants.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAPNamespaceConstants.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLCodec.java113
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLConstants.java31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLMessage.java636
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLPropertyBag.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/fault/CodeType.java87
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/fault/DetailType.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ExceptionBean.java200
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ReasonType.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP11Fault.java183
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP12Fault.java249
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java601
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ServerSOAPFaultException.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SubcodeType.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/fault/TextType.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientLogicalHandlerTube.java166
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientMessageHandlerTube.java152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientSOAPHandlerTube.java162
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerChainsModel.java568
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerException.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerProcessor.java412
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerTube.java384
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageContextImpl.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageImpl.java364
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageContextImpl.java159
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageHandlerContextImpl.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageUpdatableContext.java140
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/PortInfoImpl.java123
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPHandlerProcessor.java101
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPMessageContextImpl.java131
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerLogicalHandlerTube.java182
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerMessageHandlerTube.java153
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerSOAPHandlerTube.java166
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/handler/XMLHandlerProcessor.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractHeaderImpl.java154
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractMessageImpl.java247
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentSetImpl.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentUnmarshallerImpl.java77
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/ByteArrayAttachment.java110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMHeader.java143
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMMessage.java156
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/DataHandlerAttachment.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/EmptyMessageImpl.java121
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultDetailHeader.java119
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultMessage.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/JAXBAttachment.java138
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/MimeAttachmentSet.java108
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/PayloadElementSniffer.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/ProblemActionHeader.java137
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/RelatesToHeader.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/RootElementSniffer.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/StringHeader.java161
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/Util.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/XMLReaderImpl.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/AttachmentMarshallerImpl.java110
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBBridgeSource.java126
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBDispatchMessage.java222
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBHeader.java212
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBMessage.java446
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/MarshallerBridge.java121
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/package-info.java39
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/package-info.java31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJHeader.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJMessage.java778
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/PayloadSourceMessage.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/ProtocolSourceMessage.java139
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/SourceUtils.java262
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/OutboundStreamHeader.java171
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/PayloadStreamReaderMessage.java117
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamAttachment.java108
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader.java239
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader11.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader12.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamMessage.java766
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/AbstractSEIModelImpl.java534
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/AbstractWrapperBeanGenerator.java468
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/CheckedExceptionImpl.java131
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/ExternalMetadataReader.java549
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/FieldSignature.java122
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/Injector.java108
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/JavaMethodImpl.java416
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/ParameterImpl.java260
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/ReflectAnnotationReader.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java1737
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModelerException.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java101
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java402
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperParameter.java111
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/soap/SOAPBindingImpl.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractExtensibleImpl.java140
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractFeaturedObjectImpl.java78
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractObjectImpl.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundOperationImpl.java430
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java212
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLDirectProperties.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLFaultImpl.java93
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLInputImpl.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLMessageImpl.java64
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLModelImpl.java233
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOperationImpl.java139
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.java92
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartDescriptorImpl.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartImpl.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortImpl.java125
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortProperties.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortTypeImpl.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLProperties.java77
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLServiceImpl.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/AnnotationVisitor.java127
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/AnnotationWriter.java346
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Attribute.java284
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ByteVector.java323
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassAdapter.java151
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassReader.java2039
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassVisitor.java226
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassWriter.java1374
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Edge.java105
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/FieldVisitor.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/FieldWriter.java299
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Frame.java1432
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Handler.java100
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Item.java286
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Label.java556
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodAdapter.java225
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodVisitor.java425
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodWriter.java2631
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Opcodes.java371
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Type.java824
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/package-info.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/AssertionSet.java397
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/AssertionValidationProcessor.java135
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/ComplexAssertion.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/EffectiveAlternativeSelector.java247
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/EffectivePolicyModifier.java134
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/NestedPolicy.java113
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/Policy.java661
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyAssertion.java366
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyConstants.java95
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyException.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyIntersector.java152
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMap.java671
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapExtender.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapKey.java131
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapKeyHandler.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapMutator.java95
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapUtil.java133
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMerger.java106
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyScope.java113
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicySubject.java149
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/SimpleAssertion.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandler.java102
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerEndpointScope.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerMessageScope.java140
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerOperationScope.java67
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerServiceScope.java67
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/DefaultPolicyResolver.java111
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyMapBuilder.java102
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyUtil.java136
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLGeneratorExtension.java466
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLParserExtension.java990
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/SafePolicyReader.java331
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/WSDLBoundFaultContainer.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyFeatureConfigurator.java57
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyMapConfigurator.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/package-info.java33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/Localization.properties120
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/LocalizationMessages.java1183
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java92
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyLogger.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyUtils.java480
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/RuntimePolicyUtilsException.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/ServiceConfigurationError.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/ServiceFinder.java380
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/package-info.java34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/AssertionData.java429
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/CompactModelGenerator.java98
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/DefaultPolicyAssertionCreator.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/ModelNode.java596
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/NormalizedModelGenerator.java93
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelGenerator.java171
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelMarshaller.java80
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelTranslator.java459
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelUnmarshaller.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyReferenceData.java134
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicySourceModel.java428
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicySourceModelContext.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/XmlPolicyModelMarshaller.java193
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/XmlPolicyModelUnmarshaller.java374
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ExternalAttachmentsUnmarshaller.java248
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/package-info.java31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/package-info.java30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/wspolicy/NamespaceVersion.java169
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/wspolicy/XmlToken.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/AbstractQNameValidator.java113
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/AssertionCreationException.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PolicyAssertionCreator.java87
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PolicyAssertionValidator.java133
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PrefixMapper.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/package-info.java29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/PolicyMapKeyConverter.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/WsdlBindingSubject.java188
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/package-info.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ClientMUTube.java87
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MUTube.java155
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MessageCreationException.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ServerMUTube.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/VersionMismatchException.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/xml/XMLMessageException.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/AddressingMessages.java390
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ClientMessages.java346
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/DispatchMessages.java234
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/EncodingMessages.java150
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HandlerMessages.java126
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ManagementMessages.java138
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ModelerMessages.java402
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/PolicyMessages.java294
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java162
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SenderMessages.java90
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ServerMessages.java731
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SoapMessages.java114
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/StreamingMessages.java306
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java282
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/UtilMessages.java138
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsservletMessages.java1868
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java174
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing.properties65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_de.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_es.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_fr.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_it.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ja.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ko.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_pt_BR.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_CN.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_TW.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_de.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_es.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_fr.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_it.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ja.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ko.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_pt_BR.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_CN.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_TW.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client.properties62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_de.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_es.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_fr.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_it.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ja.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ko.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_pt_BR.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_CN.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_TW.properties61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch.properties44
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_de.properties43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_es.properties43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_fr.properties43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_it.properties43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ja.properties43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ko.properties43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_pt_BR.properties43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_CN.properties43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_TW.properties43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_de.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_es.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_fr.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_it.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ja.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ko.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_pt_BR.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_CN.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_TW.properties45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_de.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_es.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_fr.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_it.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ja.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ko.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_pt_BR.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_CN.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_TW.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_de.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_es.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_fr.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_it.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ja.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ko.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_pt_BR.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_CN.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_TW.properties26
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_de.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_es.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_fr.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_it.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ja.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ko.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_pt_BR.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_CN.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_TW.properties33
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler.properties65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_de.properties60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_es.properties60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_fr.properties60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_it.properties60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ja.properties60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ko.properties60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_pt_BR.properties60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_CN.properties60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_TW.properties60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy.properties48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_de.properties47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_es.properties47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_fr.properties47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_it.properties47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ja.properties47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ko.properties47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_pt_BR.properties47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_CN.properties47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_TW.properties47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_de.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_es.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_fr.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_it.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ja.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ko.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_pt_BR.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_CN.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_TW.properties35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_de.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_es.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_fr.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_it.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ja.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ko.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_pt_BR.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_CN.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_TW.properties30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server.properties136
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_de.properties115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_es.properties115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_fr.properties115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_it.properties115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ja.properties115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ko.properties115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_pt_BR.properties115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_CN.properties115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_TW.properties115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_de.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_es.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_fr.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_it.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ja.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ko.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_pt_BR.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_CN.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_TW.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming.properties55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_de.properties50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_es.properties50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_fr.properties50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_it.properties50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ja.properties50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ko.properties50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_pt_BR.properties50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_CN.properties50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_TW.properties50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/tubelineassembly.properties67
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_de.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_es.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_fr.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_it.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ja.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ko.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_pt_BR.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_CN.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_TW.properties34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel.properties31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_de.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_es.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_fr.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_it.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ja.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ko.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_pt_BR.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_CN.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_TW.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet.properties248
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_de.properties243
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_es.properties243
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_fr.properties243
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_it.properties243
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ja.properties243
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ko.properties243
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_pt_BR.properties243
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_CN.properties243
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_TW.properties243
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_de.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_es.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_fr.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_it.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ja.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ko.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_pt_BR.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_CN.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_TW.properties36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/MetroConfig.java185
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/ObjectFactory.java145
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryConfig.java151
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryList.java157
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineDefinition.java212
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeature.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeatureReader.java125
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineMapping.java182
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/Tubelines.java218
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/package-info.java34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractMultiInstanceResolver.java91
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractWebServiceContext.java99
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/DefaultResourceInjector.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/DraconianValidationErrorHandler.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointAwareTube.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java783
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointMessageContextImpl.java193
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/InvokerTube.java167
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorBase.java412
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorRootService.java188
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/SDDocumentImpl.java392
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerPropertyConstants.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerRtException.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerSchemaValidationTube.java153
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServiceDefinitionImpl.java111
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/SingletonResolver.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/UnsupportedMediaException.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSDLGenResolver.java196
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointImpl.java698
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointMOMProxy.java378
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/package-info.java148
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/AsyncProviderInvokerTube.java184
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/MessageProviderArgumentBuilder.java57
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderArgumentsBuilder.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderEndpointModel.java116
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderInvokerTube.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/SOAPProviderArgumentBuilder.java162
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/SyncProviderInvokerTube.java101
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/XMLProviderArgumentBuilder.java108
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointArgumentsBuilder.java692
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointResponseMessageBuilder.java318
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointValueSetter.java123
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/Invoker.java44
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerSource.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerTube.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/MessageFiller.java182
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/SEIInvokerTube.java98
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/TieHandler.java336
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/ValueGetter.java92
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java266
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContext.java308
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContextFactory.java248
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java145
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingInfo.java98
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingException.java38
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingProvider.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldGetter.java96
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldSetter.java82
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/JAXBWrapperAccessor.java265
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodGetter.java102
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodSetter.java87
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/OldBridge.java322
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyAccessor.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetter.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetterBase.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetter.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetterBase.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/RepeatedElementBridge.java221
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java196
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java94
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperAccessor.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperBridge.java213
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperComposite.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/XMLBridge.java244
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/Attributes.java131
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/DOMStreamReader.java904
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/MtomStreamWriter.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactory.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactoryImpl.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/SourceReaderFactory.java134
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/TidyXMLStreamReader.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLReaderException.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderException.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderUtil.java507
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterException.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterUtil.java139
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/DeferredTransportPipe.java144
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/Headers.java131
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/DeploymentDescriptorParser.java608
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapter.java996
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapterList.java156
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpMetadataPublisher.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/ResourceLoader.java72
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/WSHTTPConnection.java382
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java358
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpResponseProperties.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpTransportPipe.java450
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java472
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/HttpEndpoint.java133
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableConnectionImpl.java270
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableHttpHandler.java130
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapter.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapterList.java36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerConnectionImpl.java349
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerContainer.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java187
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/WSHttpHandler.java131
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/ASCIIUtility.java130
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayBuffer.java213
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayDataSource.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/CompletedFuture.java69
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/Constants.java39
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/DOMUtil.java240
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetReflection.java75
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetUtil.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationInfo.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java224
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/InjectionPlan.java233
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/JAXWSUtils.java155
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/MetadataUtil.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/NamespaceSupport.java746
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseInputStream.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseOutputStream.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/Pool.java177
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/QNameMap.java487
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/ReadAllStream.java253
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/RuntimeVersion.java65
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceConfigurationError.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceFinder.java523
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/StreamUtils.java64
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/StringUtils.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/UtilException.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/Version.java93
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/VersionUtil.java168
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java166
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/LocatableWebServiceException.java106
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java583
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/DumpTube.java146
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandalonePipeAssembler.java88
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandaloneTubeAssembler.java93
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en.properties289
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_de.properties284
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_es.properties284
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_fr.properties284
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_it.properties284
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ja.properties284
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ko.properties284
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_pt_BR.properties284
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_CN.properties284
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_TW.properties284
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties29
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/CDATA.java58
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContentHandlerToXMLStreamWriter.java283
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/DummyLocation.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NamedNodeMapIterator.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NamespaceContextExAdaper.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NodeListIterator.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXResult.java89
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXSource.java303
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLReaderComposite.java662
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderFilter.java239
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderToXMLStreamWriter.java265
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamWriterFilter.java183
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java467
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationFinder.java172
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationSignature.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/DispatchException.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/OperationDispatcher.java95
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/PayloadQNameBasedOperationFinder.java148
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SDDocumentResolver.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SOAPActionBasedOperationFinder.java92
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/WSDLOperationFinder.java113
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/DelegatingParserExtension.java178
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/EntityResolverWrapper.java78
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ErrorHandler.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/FoolProofParserExtension.java131
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/InaccessibleWSDLException.java90
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MIMEConstants.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MemberSubmissionAddressingWSDLParserExtension.java83
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MexEntityResolver.java80
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ParserUtil.java109
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/RuntimeWSDLParser.java1047
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/SOAPConstants.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingWSDLParserExtension.java261
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLConstants.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionContextImpl.java71
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionFacade.java345
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/DocumentLocationResolver.java72
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/TXWContentHandler.java97
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/UsingAddressing.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingMetadataWSDLGeneratorExtension.java151
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingWSDLGeneratorExtension.java158
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java1282
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGeneratorExtensionFacade.java143
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLPatcher.java237
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLResolver.java34
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Binding.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/BindingOperationType.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Definitions.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Documented.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Fault.java46
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/FaultType.java44
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Import.java49
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Message.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/OpenAtts.java36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Operation.java69
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/ParamType.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Part.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Port.java53
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/PortType.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Service.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/StartWithExtensionsType.java37
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Types.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Address.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Binding.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Operation.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/package-info.java31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/package-info.java31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Body.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/BodyType.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Header.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/HeaderFault.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPAddress.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPBinding.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPFault.java44
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPOperation.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/package-info.java31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Body.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/BodyType.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Header.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/HeaderFault.java46
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPAddress.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPBinding.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPFault.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPOperation.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/package-info.java31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Import.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Schema.java48
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/package-info.java31
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/ForeignAttributes.java61
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/SCD.java176
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAnnotation.java63
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttContainer.java99
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttGroupDecl.java36
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttributeDecl.java40
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttributeUse.java54
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSComplexType.java119
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSComponent.java170
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSContentType.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSDeclaration.java68
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSElementDecl.java155
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSFacet.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSIdentityConstraint.java102
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSListSimpleType.java37
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSModelGroup.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSModelGroupDecl.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSNotation.java37
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSParticle.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSRestrictionSimpleType.java80
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSSchema.java139
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSSchemaSet.java115
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSSimpleType.java162
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSTerm.java70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSType.java96
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSUnionSimpleType.java38
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSVariety.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSWildcard.java95
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XSXPath.java51
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/XmlString.java117
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AnnotationImpl.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttGroupDeclImpl.java85
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttributeDeclImpl.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttributeUseImpl.java73
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttributesHolder.java129
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ComplexTypeImpl.java299
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ComponentImpl.java143
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/Const.java32
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ContentTypeImpl.java39
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/DeclarationImpl.java57
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ElementDecl.java235
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/EmptyImpl.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/FacetImpl.java62
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ForeignAttributesImpl.java59
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/IdentityConstraintImpl.java116
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ListSimpleTypeImpl.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ModelGroupDeclImpl.java99
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ModelGroupImpl.java114
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/NotationImpl.java64
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ParticleImpl.java119
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/Ref.java99
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/RestrictionSimpleTypeImpl.java120
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/SchemaImpl.java309
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/SchemaSetImpl.java394
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/SimpleTypeImpl.java165
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/UName.java105
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/UnionSimpleTypeImpl.java97
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/Util.java100
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/WildcardImpl.java199
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/XPathImpl.java67
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/package.html30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/BaseContentRef.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/DefaultAnnotationParser.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/DelayedRef.java256
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages.properties79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages_ja.properties70
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java516
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/ParserContext.java212
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Patch.java38
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/PatcherManager.java52
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/SAXParserFactoryAdaptor.java111
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/SchemaDocumentImpl.java131
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/SubstGroupBaseTypeRef.java47
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/datatypes.xsd364
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/package.html30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/AttributesImpl.java626
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCEventReceiver.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCEventSource.java50
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCHandler.java191
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCInterleaveFilter.java350
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCRuntime.java555
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/Schema.java1315
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_List.java390
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_Restriction.java491
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_Union.java465
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/annotation.java214
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeDeclBody.java542
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeGroupDecl.java459
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeUses.java962
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType.java2003
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType_complexContent_body.java256
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/elementDeclBody.java1179
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/erSet.java184
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/ersSet.java186
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/facet.java401
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/foreignAttributes.java169
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/group.java451
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/identityConstraint.java594
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/importDecl.java374
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/includeDecl.java288
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/modelGroupBody.java370
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/notation.java483
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/occurs.java326
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/particle.java1013
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/qname.java170
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/qualification.java178
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/redefine.java452
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/simpleType.java504
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/wildcardBody.java446
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/xpath.java316
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/AbstractAxisImpl.java187
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Axis.java579
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Iterators.java215
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/ParseException.java219
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDImpl.java84
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDParser.java562
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDParserConstants.java98
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDParserTokenManager.java2458
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SimpleCharStream.java464
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Step.java187
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Token.java106
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/TokenMgrError.java158
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/DraconianErrorHandler.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/ResourceEntityResolver.java41
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/SchemaTreeTraverser.java1007
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/SchemaWriter.java607
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/Uri.java187
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/package.html30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/AnnotationContext.java76
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/AnnotationParser.java81
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/AnnotationParserFactory.java35
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/JAXPParser.java183
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/SchemaDocument.java142
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/XMLParser.java67
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/XSOMParser.java271
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/package.html30
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ComponentNameFunction.java191
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.java86
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.properties27
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DeferedCollection.java158
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DomAnnotationParserFactory.java119
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/util/NameGetter.java164
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/util/NameGetter.properties42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/util/SimpleTypeSet.java55
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/util/TypeClosure.java66
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/util/TypeSet.java79
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/util/XSFinder.java181
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/util/XSFunctionFilter.java136
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSContentTypeFunction.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSContentTypeVisitor.java42
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSFunction.java60
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSSimpleTypeFunction.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSSimpleTypeVisitor.java43
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSTermFunction.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSTermFunctionWithParam.java45
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSTermVisitor.java44
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSVisitor.java56
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSWildcardFunction.java40
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSWildcardVisitor.java40
-rw-r--r--src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/package.html30
-rw-r--r--src/share/jaxws_classes/javax/annotation/Generated.java71
-rw-r--r--src/share/jaxws_classes/javax/annotation/PostConstruct.java81
-rw-r--r--src/share/jaxws_classes/javax/annotation/PreDestroy.java82
-rw-r--r--src/share/jaxws_classes/javax/annotation/Resource.java132
-rw-r--r--src/share/jaxws_classes/javax/annotation/Resources.java46
-rw-r--r--src/share/jaxws_classes/javax/jws/HandlerChain.java36
-rw-r--r--src/share/jaxws_classes/javax/jws/Oneway.java33
-rw-r--r--src/share/jaxws_classes/javax/jws/WebMethod.java36
-rw-r--r--src/share/jaxws_classes/javax/jws/WebParam.java45
-rw-r--r--src/share/jaxws_classes/javax/jws/WebResult.java38
-rw-r--r--src/share/jaxws_classes/javax/jws/WebService.java39
-rw-r--r--src/share/jaxws_classes/javax/jws/soap/InitParam.java34
-rw-r--r--src/share/jaxws_classes/javax/jws/soap/SOAPBinding.java52
-rw-r--r--src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandler.java37
-rw-r--r--src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandlers.java37
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/Binder.java421
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/ContextFinder.java629
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/DataBindingException.java47
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/DatatypeConverter.java695
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/DatatypeConverterImpl.java1042
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/DatatypeConverterInterface.java523
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/Element.java42
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/GetPropertyAction.java44
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/JAXB.java629
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/JAXBContext.java768
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/JAXBElement.java218
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/JAXBException.java184
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/JAXBIntrospector.java92
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/JAXBPermission.java93
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/MarshalException.java99
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/Marshaller.java821
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/Messages.java91
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/Messages.properties51
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/NotIdentifiableEvent.java39
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/ParseConversionEvent.java40
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/PrintConversionEvent.java40
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/PropertyException.java113
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/SchemaOutputResolver.java82
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java184
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/UnmarshalException.java101
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/Unmarshaller.java1142
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/UnmarshallerHandler.java83
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/ValidationEvent.java92
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/ValidationEventHandler.java94
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/ValidationEventLocator.java90
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/ValidationException.java99
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/Validator.java285
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/WhiteSpaceProcessor.java198
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/DomHandler.java119
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/W3CDomHandler.java109
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessOrder.java48
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessType.java70
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorOrder.java80
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorType.java100
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyAttribute.java74
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyElement.java288
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttachmentRef.java74
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttribute.java152
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlElement.java210
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementDecl.java216
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRef.java290
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRefs.java59
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementWrapper.java145
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlElements.java177
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnum.java75
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnumValue.java123
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlID.java94
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlIDREF.java250
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlInlineBinaryData.java59
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlList.java111
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlMimeType.java60
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlMixed.java132
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlNs.java59
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlNsForm.java66
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlRegistry.java43
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlRootElement.java182
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchema.java206
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaType.java108
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaTypes.java61
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlSeeAlso.java79
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlTransient.java95
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlType.java452
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/XmlValue.java131
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java119
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java49
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java92
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlAdapter.java193
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java116
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java62
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/adapters/package.html57
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/annotation/package.html286
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentMarshaller.java200
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentUnmarshaller.java139
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/attachment/package.html68
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/helpers/AbstractMarshallerImpl.java495
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java435
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/helpers/DefaultValidationEventHandler.java131
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/helpers/Messages.java97
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/helpers/Messages.properties59
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/helpers/NotIdentifiableEventImpl.java85
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/helpers/ParseConversionEventImpl.java86
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/helpers/PrintConversionEventImpl.java86
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventImpl.java175
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventLocatorImpl.java273
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/helpers/package.html64
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/package.html65
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/util/JAXBResult.java150
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/util/JAXBSource.java272
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/util/Messages.java83
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/util/Messages.properties42
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/util/ValidationEventCollector.java113
-rw-r--r--src/share/jaxws_classes/javax/xml/bind/util/package.html59
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/AttachmentPart.java526
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/Detail.java99
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/DetailEntry.java36
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/FactoryFinder.java236
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/MessageFactory.java200
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/MimeHeader.java70
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/MimeHeaders.java269
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/Name.java110
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/Node.java112
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SAAJMetaFactory.java113
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SAAJResult.java133
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPBody.java297
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPBodyElement.java43
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPConnection.java95
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPConnectionFactory.java86
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPConstants.java201
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPElement.java524
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPElementFactory.java137
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPEnvelope.java200
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPException.java163
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPFactory.java299
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPFault.java511
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPFaultElement.java37
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPHeader.java262
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPHeaderElement.java166
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPMessage.java456
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/SOAPPart.java265
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/Text.java42
-rw-r--r--src/share/jaxws_classes/javax/xml/soap/package.html92
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/Action.java147
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/AsyncHandler.java42
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/Binding.java67
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/BindingProvider.java182
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/BindingType.java62
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/Dispatch.java116
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/Endpoint.java498
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/EndpointContext.java59
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/EndpointReference.java192
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/FaultAction.java164
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/Holder.java58
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/LogicalMessage.java92
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/ProtocolException.java88
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/Provider.java63
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/RequestWrapper.java72
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/RespectBinding.java68
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/RespectBindingFeature.java117
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/Response.java52
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/ResponseWrapper.java72
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/Service.java760
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/ServiceMode.java53
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/WebEndpoint.java56
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/WebFault.java67
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/WebServiceClient.java63
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/WebServiceContext.java151
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/WebServiceException.java79
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/WebServiceFeature.java81
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/WebServicePermission.java85
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/WebServiceProvider.java62
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/WebServiceRef.java150
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/WebServiceRefs.java83
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/handler/Handler.java87
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/handler/HandlerResolver.java53
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/handler/LogicalHandler.java34
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/handler/LogicalMessageContext.java46
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/handler/MessageContext.java205
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/handler/PortInfo.java66
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/handler/package.html30
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPHandler.java49
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPMessageContext.java99
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/handler/soap/package.html30
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/http/HTTPBinding.java42
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/http/HTTPException.java56
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/http/package.html30
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/package.html30
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/soap/Addressing.java113
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/soap/AddressingFeature.java277
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/soap/MTOM.java75
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/soap/MTOMFeature.java144
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/soap/SOAPBinding.java110
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/soap/SOAPFaultException.java75
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/soap/package.html30
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/spi/FactoryFinder.java216
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/spi/Invoker.java91
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/spi/Provider.java521
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/spi/ServiceDelegate.java622
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/spi/WebServiceFeatureAnnotation.java86
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/spi/http/HttpContext.java99
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/spi/http/HttpExchange.java328
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/spi/http/HttpHandler.java54
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/spi/http/package-info.java95
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/spi/package.html30
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java164
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java356
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/wsaddressing/package-info.java28
-rw-r--r--src/share/jaxws_classes/javax/xml/ws/wsaddressing/package.html30
-rw-r--r--src/share/jaxws_classes/org/relaxng/datatype/Datatype.java270
-rw-r--r--src/share/jaxws_classes/org/relaxng/datatype/DatatypeBuilder.java78
-rw-r--r--src/share/jaxws_classes/org/relaxng/datatype/DatatypeException.java72
-rw-r--r--src/share/jaxws_classes/org/relaxng/datatype/DatatypeLibrary.java70
-rw-r--r--src/share/jaxws_classes/org/relaxng/datatype/DatatypeLibraryFactory.java59
-rw-r--r--src/share/jaxws_classes/org/relaxng/datatype/DatatypeStreamingValidator.java79
-rw-r--r--src/share/jaxws_classes/org/relaxng/datatype/ValidationContext.java99
-rw-r--r--src/share/jaxws_classes/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java261
-rw-r--r--src/share/jaxws_classes/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java75
-rw-r--r--src/share/jaxws_classes/org/relaxng/datatype/helpers/StreamingValidatorImpl.java88
3734 files changed, 0 insertions, 557475 deletions
diff --git a/.hgignore b/.hgignore
deleted file mode 100644
index 36b21b16..00000000
--- a/.hgignore
+++ /dev/null
@@ -1,8 +0,0 @@
-^build/
-^dist/
-^drop/
-^drop_included/
-^webrev/
-/nbproject/private/
-^.hgtip
-.DS_Store
diff --git a/.hgtags b/.hgtags
deleted file mode 100644
index a1183c86..00000000
--- a/.hgtags
+++ /dev/null
@@ -1,688 +0,0 @@
-0961a4a211765fea071b8dac419003ee0c3d5973 jdk7-b24
-59fd8224ba2da5c2d8d4c68e33cf33ab41ce8de0 jdk7-b25
-debd37e1a422e580edb086c95d6e89199133a39c jdk7-b26
-27d8f42862c11b4ddc4af2dd2d2a3cd86cda04c2 jdk7-b27
-eefcd5204500a11d6aa802dca9f961cf10ab64c2 jdk7-b28
-836c55713abab186e4de0c6eabd06ff008c7b8d0 jdk7-b29
-7f2466f8cc7009702e548d1a763254f546024d7e jdk7-b30
-f978623825364a2ad9c6f51d02fc9424a8b0bc86 jdk7-b31
-e6daca2eced9d84b01255cabcfcc49164c26405e jdk7-b32
-6dcbcfb9551aaa2a80906c28ab48c9a8564e0e64 jdk7-b33
-7a9f629cd957e3169a1a769f763fe060d078785c jdk7-b34
-b0f01c2508b690dd225298edfec70b5e8b8dc367 jdk7-b35
-f60187f44a0d62906a5e2f6bd0989b5b24c1ca1e jdk7-b36
-a2a6f9edf761934faf59ea60d7fe7178371302cd jdk7-b37
-9ce439969184c753a9ba3caf8ed277b05230f2e5 jdk7-b38
-077bc9b1b035a409a76bd5366f73ed9dd9846934 jdk7-b39
-70a6ac6dd737fe45c2fadb57646195b2b4fe269d jdk7-b40
-a8379d24aa03386610169cb0f4e4b8ed266a2e8d jdk7-b41
-621c02d83abc850c170fb6726d57b19f1eaf5033 jdk7-b42
-1ad2f51564db6ca4c6d95760cf13fb083d3dec94 jdk7-b43
-344485a03674b6950a7a23d01a6efb8055afb6ec jdk7-b44
-dea7753d713936c5b6fd942a91811b0676537fd0 jdk7-b45
-af4a3eeb7812a5d09a241c50b51b3c648a9d45c1 jdk7-b46
-223011570edbd49bb0fe51cdeb2089f95d305267 jdk7-b47
-01e5dd31d0c10a2db3d50db346905d2d3db45e88 jdk7-b48
-18ca864890f3d4ed942ecbffb78c936a57759921 jdk7-b49
-5be52db581f1ea91ab6e0eb34ba7f439125bfb16 jdk7-b50
-41a66a42791ba90bff489af72cbfea71be9b40a5 jdk7-b51
-e646890d18b770f625f14ed4ad5c50554d8d3d8b jdk7-b52
-b250218eb2e534384667ec73e3713e684667fd4c jdk7-b53
-50ea00dc5f143fe00025233e704903c37f8464aa jdk7-b54
-e0eebd978b830c09e7862cff3f77a914c15651c9 jdk7-b55
-0f7fbf85f7a1d9c027a863b9955c623352ed1292 jdk7-b56
-68257a5eb19afc11aee7eb19f7250f9b9eec7c05 jdk7-b57
-5fb4fbea81c3609916da00417fdd15dbd9e39e97 jdk7-b58
-f64566bf4c2bc92e65ab2b9fab51b119f0d493d1 jdk7-b59
-3b054db3e277ca224fe6576c59ed6f4ab5ed0bb5 jdk7-b60
-aeabf802f2a1ca72b87d7397c5ece58058e000a9 jdk7-b61
-75c801c13ea1ddebc58b1a8c8da9318d72750e62 jdk7-b62
-b8a6e883c0a6708f6d818815040525d472262495 jdk7-b63
-aaa25dfd3de68c6f1a1d3ef8c45fd99f76bca6dd jdk7-b64
-aa22a1be5866a6608ba17a7a443945559409ae0f jdk7-b65
-fa8712c099edd5c9a6b3ed9729353738004d388f jdk7-b66
-faa13cd4d6cdcfb155da5ed23b0da6e0ed0f9ea8 jdk7-b67
-845fa487f0f72a9f232ead8315c0087a477a5a31 jdk7-b68
-3e64fdfb92910e164d1f4b21b147719d5c674254 jdk7-b69
-dd3c5f3ec28d5d5e5c0dc3229fdd52d85d04274d jdk7-b70
-03314cf56a7212bbb6c186dbc9f15aca988a48ec jdk7-b71
-4c990aa99bc037fd81dd1b1b269690e9bea8a0b4 jdk7-b72
-558985e26fe16f5a6ebb2edb9180a42e1c8e8202 jdk7-b73
-f4466e1b608088c90e11beaa4b600f102608c6a1 jdk7-b74
-fcf2b8b5d606641659419f247fcee4b284c45e6e jdk7-b75
-765d2077d1e652e234d27fe85ba58a986b488503 jdk7-b76
-5b4968c110476085225d3a71c4210fad2c1116c1 jdk7-b77
-fc1c72d1dfbb17db7d46bba8db9afc39cbbb9299 jdk7-b78
-c08894f5b6e594b9b12993e256b96c1b38099632 jdk7-b79
-447767dee56a0f8cb89acc8bf7be5f9be7d84e8b jdk7-b80
-f051045fe94a48fae1097f90cbd9227e6aae6b7e jdk7-b81
-31573ae8eed15a6c170f3f0d1abd0b9109c0e086 jdk7-b82
-371e3ded591d09112a9f231e37cb072781c486ac jdk7-b83
-8bc02839eee4ef02cd1b50e87638874368a26535 jdk7-b84
-8424512588ff95362c1f1e5f11c6efd4e7f7db6e jdk7-b85
-512b0e924a5ae0c0b7ad326182cae0dc0e4d1aa8 jdk7-b86
-3febd6fab2ac8ffddbaf7bed00d11290262af153 jdk7-b87
-8c666f8f3565974e301ccb58b7538912551a6e26 jdk7-b88
-bf3675aa7f20fc6f241ce95760005aef2a30ff41 jdk7-b89
-ead7c4566a0017bcb44b468b3ac03b60dc5333ce jdk7-b90
-cf4686bf35abd1e573f09fa43cbec66403160ae9 jdk7-b91
-df7c033f6a11c0973ab0e74701b1248aee9b659f jdk7-b92
-797bef19197566ffb056edaa1b34db43bd9bf7b0 jdk7-b93
-8515e093efd14ac054e941ef743f76561a393a70 jdk7-b94
-ee06cfb113d554b5c8a9a53383bae2b168533829 jdk7-b95
-208fd4451232f7a522ddb20334c598656844ccb7 jdk7-b96
-dac23846092ad4956ed41b5278f8686476ae46ef jdk7-b97
-4571098071094e705e680db5324bfa15a57b1290 jdk7-b98
-818366ce23d8919cafaa4db4c51605ee2a7c8eaf jdk7-b99
-bd26d0ce0c3cb43e58a8e2770cc03f26d96ffe5c jdk7-b100
-b55ce274490082712f5e002b38d2eed505ca863d jdk7-b101
-d8580443d1815d68e0035a0560634e50fa899288 jdk7-b102
-267386d6b923f724309cab855a555e2d86a15c8f jdk7-b103
-bbc4cce6c20aeca4862804a6e8315a2350d43633 jdk7-b104
-39eb4f3031f4a985664cace00fca3bd1eab1e0aa jdk7-b105
-bc45ccc5bcca6cbe4ea433e279d4a93b06ab38c6 jdk7-b106
-017612ea6af417a5e378619704da01bb3a583bdb jdk7-b107
-b1ca39340238a239ba6d8489ad5315215e1366ca jdk7-b108
-4f626e0d70bda68c76bbd0e89d2bc2407f979736 jdk7-b109
-95ecac35fb11530752bd0404c9bf02bcfb30990e jdk7-b110
-2575ebca96c7fb1b78f6ae025a97321210aba309 jdk7-b111
-8e0f0054817f0f73fb33e80fb1333fb45b1d513d jdk7-b112
-d35c94fd22362f478f75b4bfcd2bef6a83cb9b3f jdk7-b113
-400f494c81c5ec87714b705648afbb3cb680bf73 jdk7-b114
-824cc44bd6eba9abae07cc420f7fe3926c1adbd9 jdk7-b115
-376ac153078dd3b5f6d4a0981feee092c1492c96 jdk7-b116
-1320fb3bb588298c79716bd2d10b5b4afacb9370 jdk7-b117
-19a2fab3f91a275f90791c15d1c21a24e820ff2d jdk7-b118
-41fa02b3663795ddf529690df7aa6714210093ec jdk7-b119
-a4f2e1ca67163ef79555082809d7cd719893c338 jdk7-b120
-0fa950117faac7bdbc94e6c46b88f6f892031c17 jdk7-b121
-17b6c48a344968880925dcef1178fec282feb335 jdk7-b122
-5a8e43bcce56b7cd5576419067a929b74575ae71 jdk7-b123
-86f60e5b3975840968f3147ddce047a27a9fc83e jdk7-b124
-d72eea121c3bc2b649272a37b80d9417855b7146 jdk7-b125
-6d772c5119d5e247bc98a57ce8b1be121554ee0a jdk7-b126
-ef19f173578c804772d586a959fa3ab8a12c0598 jdk7-b127
-88d74afc55938033e744b537a22714bb2c82c9c0 jdk7-b128
-0f7b39ad902424e949e3d2dca8411b884888a76f jdk7-b129
-ba1fac1c2083196422a12130db174334179a4d44 jdk7-b130
-438abc0356cd97d91b25f67cd1abc9883e22f6ed jdk7-b131
-0e57c3272d377eee04cc32c898e9a558051516b0 jdk7-b132
-359d0c8c00a02d3a094c19f8a485b2217c99a4e0 jdk7-b133
-545de8303fec939db3892f7c324dd7df197e8f09 jdk7-b134
-d5fc61f18043765705ef22b57a68c924ab2f1a5b jdk7-b135
-c81d289c9a532d6e94af3c09d856a2a20529040f jdk7-b136
-ccea3282991ce8b678e188cf32a8239f76ff3bfa jdk7-b137
-cc956c8a8255583535597e9a63db23c510e9a063 jdk7-b138
-c025078c8362076503bb83b8e4da14ba7b347940 jdk7-b139
-82a9022c4f21b1313023c8303b557a17c4106701 jdk7-b140
-66826b0aec5a1834da3821c35cf85ac154e9b04d jdk7-b141
-0ef3ef823c39eee3d670e58027c3219cb66f0283 jdk7-b142
-569d1e7ea980d172046c4aba79d96b5c3afabbba jdk7-b143
-6bd683f2d527c9afd47beac1cbf614506929598d jdk7-b144
-42bfba80beb7d3260b7b135b9a39202b512eb8c2 jdk7-b145
-05469dd4c3662c454f8a019e492543add60795cc jdk7-b146
-d13b1f877bb5ed8dceb2f7ec10365d1db5f70b2d jdk7-b147
-64df57a1edeca74388bd62f0a87d056db981fbdf jdk8-b01
-1034127ed402e9d0f1ed1477238ef594e9cc8da6 jdk8-b02
-7dcb0307508f408507d878cd7c2048c102b15158 jdk8-b03
-3f6f08163331ed75b30a6de1246670ce655645c8 jdk8-b04
-7d5d91fddbceb1fc3ae7ff409e732ae4a0391b34 jdk8-b05
-acffff22a9465005e8eb206224fae9f2ea4fd469 jdk8-b06
-134b0debf7b04fe6e317394b04b8e7a4a0181b1b jdk8-b07
-1c9d4f59acf8f71477473c170239b43b2c9dee24 jdk8-b08
-70172e57cf29efe271b068987eefb601c2a77780 jdk8-b09
-8e7fdc8e3c758644ca6d0fd70bb255e9d2e64cda jdk8-b10
-a12ab897a249feb7859a6e6cd84b49411f4c06ac jdk8-b11
-e6eed2ff5d5f62bdc815beb5276d23347600c760 jdk8-b12
-adf2a6b5fde14090beb9ebc40c4114132ddee731 jdk8-b13
-54c4bf4b83ecc191351747d5d28da849d34c0243 jdk8-b14
-c9ab96ff23d52d85d5dcce1f9c0fd7a3de418c74 jdk8-b15
-3d45ab79643d5b4cc7e050ae2d9c08b4d89d665e jdk8-b17
-3d45ab79643d5b4cc7e050ae2d9c08b4d89d665e jdk8-b16
-54928c8850f5498670dd43d6c9299f36de1a6746 jdk8-b18
-b73b733214aa43648d69a2da51e6b48fda902a2d jdk8-b19
-2b2818e3386f4510c390f6aea90d77e1c6a5bf9e jdk8-b20
-c266cab0e3fff05f2048c23046c14d60f7102175 jdk8-b21
-8d3df89b0f2d3c603b2edb0f5e24af1245397cc6 jdk8-b22
-25ce7a0004874273f6aeda14e7c3538cba34bdf1 jdk8-b23
-e0d90803439b174fe0b0033e09d50444ba12498f jdk8-b24
-b376d901e006cd9e0c59733c84e190aace23eec6 jdk8-b25
-3518639eab6ce5c7b482bdb0a60342c392ab97a8 jdk8-b26
-38c037af4127289de12efc67f45d19bb67abff69 jdk8-b27
-88b85470e72ce48515c802d2158f61cad198b935 jdk8-b28
-4897d9d2d04838e3479745efa238a99bacd939c9 jdk8-b29
-6882b10e85d6f6ba110dbb50926d6fe2222cc7ad jdk8-b30
-4c41c6d0e15de3b56919a5ba0a0f248a2d07f2b2 jdk8-b31
-017a7dbfaa92f5a8b144e6c890d1cebdaecaf681 jdk8-b32
-ea80b2388dce711fbde8e4fd6e07c2c64ad16743 jdk8-b33
-f1d020a49c8c33667fb10c8caa255206a78a3675 jdk8-b34
-e8afc16522e190cb93c66bcb15d6fba0fe9e6833 jdk8-b35
-89b36c658e39f0a2957be55453a3a3befd9c8a6b jdk8-b36
-b05a948db1b6c933c980f24e4dc8fd897b7cf4ef jdk8-b37
-ac1ba3b56775e3cdcd91b7a48793b59f6a3c18b5 jdk8-b38
-7f6b44fd303478caa83575dbc225de187c509c50 jdk8-b39
-09a0ddda03cb36deb6ee9edf789da12aa4674c6b jdk8-b40
-f2072b164b0519227833a2994f78e3988ee67827 jdk8-b41
-1f20f37818a91b66eaeba268d0b785718598ee0e jdk8-b42
-f00c12994562c2f68d348a7c3e829374a89294e2 jdk8-b43
-f6a417540ef124c9b4123d07da5e26f2ab909949 jdk8-b44
-e80ac58b5ba904f24e125c742c30d0d740f05f86 jdk8-b45
-ae368a83c2404b65c9e38c65e2aa081f2201ca74 jdk8-b46
-fe6a060afc404dcf0921708a740de770666b781f jdk8-b47
-efb564de8a8ee397a65fab77d45cb20200f6ddd8 jdk8-b48
-b48865af8ac559ba6f60fb86fa3fe0ebdd22746c jdk8-b49
-bdab72e87b83bcccf3abe6eaaa4cdc7b1cd2d92b jdk8-b50
-1a70b6333ebe12e1c6dbca30e58bc1ba894ab898 jdk8-b51
-f62bc618122e87a8bea69865cc02074e9d850426 jdk8-b52
-8a35fd644d3c0b75813ff0236adef8a1c6f895c6 jdk8-b53
-91970935926a20f19a5cbbf20931745ac1975e91 jdk8-b54
-109c9e1f2d8546e9954e1b7be9a37a4396434544 jdk8-b55
-7813455ccdb08c3ee6051161176821325a5d44d7 jdk8-b56
-b51b611209f159f94dd2ce3dc2c56daa6d6ac1df jdk8-b57
-cac4c393706343df778a13dc6c84cad0f8c237c9 jdk8-b58
-ae107401be116f9e384d3a23192f543828e03da5 jdk8-b59
-5c5a65ad5291b7cefcdc308f627cf2b195cf2b69 jdk8-b60
-97e5e74e2a341d9142ce28043912a3c255e28e03 jdk8-b61
-d265b9b4c0f55c23a1c9fda02a8052fd9df2eec5 jdk8-b62
-86989f702267debe16d13720d5ae7ae9839796f4 jdk8-b63
-5ded18a14bcc80b2a253f2b84da0073a0ecac665 jdk8-b64
-fbe54291c9d337ea4dfef4d846f1d9a22f76249c jdk8-b65
-3eb7f11cb4e000555c1b6f0f1a10fe2919633c8e jdk8-b66
-eb06aa51dfc225614dba2d89ae7ca6cedddff982 jdk8-b67
-d3fe408f3a9ad250bc9a4e9365bdfc3f28c1d3f4 jdk8-b68
-756323c990115a9c0341d67b10f2d52c6370e35d jdk8-b69
-3b1c2733d47ee9f8c530925df4041c59f9ee5a31 jdk8-b70
-f577a39c9fb3d5820248c13c2cc74a192a9313e0 jdk8-b71
-d9707230294d54e695e745a90de6112909100f12 jdk8-b72
-c606f644a5d9118c14b5822738bf23c300f14f24 jdk8-b73
-12db3c5a3393b03eeb09ff26f418c4420c21aaab jdk8-b74
-966bf9f3c41a59ff5d86ff4275291c52f329f984 jdk8-b75
-c4853f3f0e89ac60aa5b517f5f224f0f60e08577 jdk8-b76
-64dfba1bad16433f609f17a42c3c5990367c5c0b jdk8-b77
-391de4c992d1960a09cdd340362ff936bac69323 jdk8-b78
-70d8658d2a3063bc13127f3452af017d838f1362 jdk8-b79
-b0224010e2f0c2474055ac592c8d3f37b9264690 jdk8-b80
-c88bb21560ccf1a9e6d2a2ba08ed2045a002676f jdk8-b81
-d8d8032d02d77fbf5f9b3bb8df73663f42fd4dd0 jdk8-b82
-a1dcc0d83da1e07f3ada60ef110dd105d95d3554 jdk8-b83
-5773e3fc83803f392234ba54c3a437ba176f1ead jdk8-b84
-8c0b6bccfe474576d6b30d1582c4329029330150 jdk8-b85
-a5e7c2f093c9996ab3419db1565094a07b059e9c jdk8-b86
-72e03566f0a61282cc48ebc869803b256cccd66c jdk8-b87
-24fa5452e5d4e9df8b85196283275a6ca4b4adb4 jdk8-b88
-88838e08e4ef6a254867c8126070a1975683108d jdk8-b89
-3e5b9ea5ac35ea7096da484e24a863cf4552179f jdk8-b90
-0bb1a9fa56b037d072efdaae5f5b73a0f23c966c jdk8-b91
-a0f604766ca14818e2a7b1558cc399499caabf75 jdk8-b92
-7386eca865e1f7216637cdf8dcf3f5d5c255f208 jdk8-b93
-254c53fd97ab24942043adcfa5c1a0a38a3b274e jdk8-b94
-1468c94135f978dd29d03bce2f7d7e952154d144 jdk8-b95
-690d34b326bc78a6f5f225522695b41c7f7f70e8 jdk8-b96
-dcde7f049111353ad23175f54985a4f6bfea720c jdk8-b97
-b1fb4612a2caea52b5661b87509e560fa044b194 jdk8-b98
-8ef83d4b23c933935e28f59b282cea920b1b1f5f jdk8-b99
-4fd722afae5c02f00bbd44c3a34425ee474afb1c jdk8-b100
-60b623a361642a0f5aef5f06dad9e5f279b9d9a9 jdk8-b101
-988a5f2ac559dcab05698b8a8633aa453e012260 jdk8-b102
-6cdc6ed987801c175a1217d0d3e53c3bd69ba52e jdk8-b103
-42211ab0ab1cca51a050d184634cf1db7ef81fbf jdk8-b104
-88390df7ed2cf128298a02c5e6d978f0a603cd58 jdk8-b105
-6908370afe834ff01739e8ec992d4246c74b7e6e jdk8-b106
-e3c9328f75638289a342ce15fbe532f05078946e jdk8-b107
-d1ea68556fd7925a3c7078dd9f77c6ca73d5aa9e jdk8-b108
-df5d4d01642572e77fd3c01e4c8703ed3f6eec87 jdk8-b109
-cc682329886be2fc26220fc30597ee4e5bba43ed jdk8-b110
-32edc7a2c86696dfcbdb6ffae641ff153f8e34bd jdk8-b111
-dbdd5c76250928582cb5342bcf7b299a6007d538 jdk8-b112
-9261f342aa73a79bbd1a817ae72fa72b15ef30bc jdk8-b113
-9ad289610fc6effe9076280b7920d0f16470709f jdk8-b114
-e126d8eca69b83a1cc159c2375b7c33140346d2b jdk8-b115
-587560c222a2476066852224ed02d39b5090a299 jdk8-b116
-fe56ba456fd32758c72db629938d69067468d89c jdk8-b117
-76a598cf50c4e1dc1fc8adc08b451943aa1a3179 jdk8-b118
-172b8e056ff259044ca48c5425d643dc8e2e05c8 jdk8-b119
-6c152deb600d8a11bc46149ace317b1c9fce1482 jdk8-b120
-32050ab53c8a8e4cb09f04b88db78258a480fb61 jdk8-b121
-bc622ba563f9316f981c11c3a260f4c3fdc5ef07 jdk8-b122
-91f5c542ccad330efc0d281362dd6f33f2039746 jdk8-b123
-241e4effed6d4702815f54efdfb34ebd5c3990f6 jdk8u20-b00
-ef71ecbcd7bc014b1be39a6d1b3a1fb663772c14 jdk8-b124
-ac679298539a4bc6c23e1ce00acabf10d1d93fe2 jdk8u20-b01
-ef71ecbcd7bc014b1be39a6d1b3a1fb663772c14 jdk8-b125
-7193a007a159ef9401b672af5c36c5b95e6e2943 jdk8-b126
-8e46fe36e17595c24ccdbde7b34e3cbfb6056b42 jdk8-b127
-de172acc095bb1045f40d1c9f532b7350343d19e jdk8-b128
-aabc90596123d4eb7e576ecb0e7a843a9415d8eb jdk8-b129
-4195c0956930bf4e161ac6b0def0d6295bfba58f jdk8-b130
-012b935707fa24a1a88b429255f77b386e082643 jdk8-b131
-c2be0dd15dbf0c23ee693a1af32f8f6a012abd1e jdk8-b132
-2fcd3ddb57a6c71e082c7f113f4063de9a967fcd jdk8u5-b01
-384ccf4e14cb90c89570e16a5f4ca440a69d6d93 jdk8u5-b02
-e423a4f2ec72ea0e24bea0fa77dd105095bbee67 jdk8u5-b03
-738b966ee0b00d994445d34eb7eb087bd41a5478 jdk8u5-b04
-3960c6ef7bd1782d6357c510dab393d291164045 jdk8u11-b00
-3960c6ef7bd1782d6357c510dab393d291164045 jdk8u5-b05
-0543f4dddddc67b142b4706b2d403a654809e605 jdk8u5-b06
-0eb7f9f88e93587ace50614385f85afd221f5cb1 jdk8u5-b07
-3ee93ab2a3739ae5e4e209ac14c36e7374f3f748 jdk8u5-b08
-6cd5065081477be64e4e99ef98ec68464dde2d72 jdk8u5-b09
-22a840b408eb0242e363700843fba3f4988df749 jdk8u5-b10
-75fd3933daaf5826e7c03bfb318026ac8a4c07ef jdk8u5-b11
-e2454d30b525bcb6ebcc711bd2928fbd29c11143 jdk8u5-b12
-d2200a87d5ad6a9d06d9df144376ea5511b3916b jdk8u5-b13
-ad56fa1dc3d375a6e909d3e005939626ba44a4b5 jdk8u5-b31
-d2732c66f0f927d7f31dead4cce1a0612b9ff2a1 jdk8u11-b01
-152cc523baf1fdfe48514e3fe0d8e5a9b3c01ba4 jdk8u11-b02
-c2c073f04f0566c868fec49b96e5885ad69f065c jdk8u11-b03
-d1dbc7bc54291d447fce5655e0878b8689ad25b7 jdk8u11-b04
-9626907d2521220a0214129733088bad35656239 jdk8u11-b05
-6b71476418c1f6a085fb10460dcfedc5346e69af jdk8u11-b06
-c29ede8e947c365ce55174eba716050c48461576 jdk8u11-b07
-ca91f03660789a75710b4a081cd32aab00e80964 jdk8u11-b08
-6e994ba1e4610b367f292a41a0d2c77091f93ab6 jdk8u11-b09
-aa3f37b9fbdca195ac9430b8c301db7f33347241 jdk8u11-b10
-5d161297f3031a82d04953bf60721f31e7c18da1 jdk8u11-b11
-beaec77113928b64365d7ea9b564ee02d1625b89 jdk8u11-b12
-5ceaffbb168fb84168cd49da83c469fdfaec4ee8 jdk8u11-b31
-ba061957b8bdb5f04e58154b27405fbf6fe3c71f jdk8u20-b02
-337a3a4086235e926e1d684bf4d0b2add70d6f55 jdk8u20-b03
-579caba2483ee3c9e32d87b31ab46e86f1aa9cd3 jdk8u20-b04
-918ceef47cb401f64451ff58725210128176c6a6 jdk8u20-b05
-4195c0956930bf4e161ac6b0def0d6295bfba58f jdk8-b130
-012b935707fa24a1a88b429255f77b386e082643 jdk8-b131
-c2be0dd15dbf0c23ee693a1af32f8f6a012abd1e jdk8-b132
-515ddaddbb6402452f5c6a63594db5d7d71b5aa1 jdk8u20-b06
-a61ba2e3e6c85f7067fb7b0c3c02584abdfa96be jdk8u20-b07
-bc6d2f3426f3d04adc8245ad120e2b52fe7dfbde jdk8u20-b08
-2e76ce4ec993c32368ef51b67873aa5ff06e1437 jdk8u20-b09
-84f913145e2acb8474f3779d7ef154eebec9537a jdk8u20-b10
-ce4e5885a11012edaf76ce9a6115e23acabfd282 jdk8u20-b11
-94fbd96ebb83a3ce966c347082b079f9e4fec76a jdk8u20-b12
-9634e8ad55c9ab691325116aff765de00dfc8410 jdk8u20-b13
-796c274fbf5e71f1af1e9c3111518c057dcc95bd jdk8u20-b14
-8ef9f5f9b0c5f86f325c4aad3c6dc1ff9243ea43 jdk8u20-b15
-86741f3a4a381de18fbbfecd588660ca7a94c5ed jdk8u20-b16
-3ff7f413379f29e1937223902edf1fe2b90d7d60 jdk8u20-b17
-a3b85d6097c52cbff3e514ad6dc4f705fbaaa8bb jdk8u20-b18
-615fdd17d4e24af63fe63a0fe85cfda3645e6826 jdk8u20-b19
-4681b10c0c3197f591b88eadc481a283ae90d003 jdk8u20-b20
-31d43d250c836c13fcc87025837783788c5cd0de jdk8u20-b21
-2d360fb1b2b89c90133231f9ed5f823997b70c19 jdk8u20-b22
-f3bf1b270fea8b17aa2846f962f7514b6f772ab4 jdk8u20-b23
-1277c0d492fd9253f1ea2730eb160953397bd939 jdk8u20-b24
-1277c0d492fd9253f1ea2730eb160953397bd939 jdk8u20-b25
-7025a2c10ea4116ce8f31bb1e305f732aa1025f0 jdk8u20-b26
-7053deda0ffd69046ef480b3595cf13451b477ec jdk8u20-b31
-2f39063fee48f96fe9cacf704ce30c6fc333ae73 jdk8u20-b32
-efc85d318f4697f40bdd1f3757677be97f1758d9 jdk8u25-b00
-a76779e1b0376650dfc29a1f3b14760f05e0fc6d jdk8u25-b01
-3d31955043b9f1807c9d695c7b5d604d11c132cf jdk8u25-b02
-c67cb85b249c69a96d7ac72734c35bc18644befe jdk8u25-b03
-81129354f0e821f3d41dbcf8a68ce82f9d776127 jdk8u25-b04
-5f78130b0a64df9568a827f9ea589fdc3a7c080c jdk8u25-b05
-433da54f73257545d95edbc356fdb0e37a9d95eb jdk8u25-b06
-cccfc3f8dec888c8fe86c212a51af2fba1e11aef jdk8u25-b07
-c758be4c3cac65a2744bf4e7ed9bdabb85234de2 jdk8u25-b08
-73423d29fe362e843cdccad510e2e44e2899bc9e jdk8u25-b09
-391b45e0081afcf3db709878916063a63dca7b05 jdk8u25-b10
-57cd66833abf44f499faaaed2c16bdf94b258ca9 jdk8u25-b11
-56b97127afa66fa01eec0fcf467a77cd2e445b4f jdk8u25-b12
-0ebb9d8c3dd49559b716f02825924801be55b3e7 jdk8u25-b13
-392a9579cc95d27806c1dde16eee776524a49761 jdk8u25-b14
-d3a96bbb88521188a3af1a34dd9523f13afa521d jdk8u25-b15
-4570a7d00aa9bd3df028f52d6f9d8c434163b689 jdk8u25-b16
-d47a47f961ee423ce03623098f62d79254c6f328 jdk8u25-b17
-cb0ad90bfe3c497c7236c5480447c4bde110934f jdk8u25-b18
-a345282d661be80f2cdee3c43e12fbe01e7ff6d5 jdk8u25-b31
-90b0097a98f161c3e605dc26abf97bb9fc278f33 jdk8u25-b32
-da8457217afd472276c62f558fb1431f7e0e3bc0 jdk8u25-b33
-3a676fe898c93ad3afcaa55a71da96455e5f230e jdk8u31-b00
-1c73ca9179f22d4a73d1a248a3254f891c71ee30 jdk8u31-b01
-c1f1ed28e0bb68d7536fb30bb6f1a3623816b12a jdk8u31-b02
-31893650acaf8935ad395d04cbc1575bada97622 jdk8u31-b03
-60ee8e1e63aee861ea7606c5825c15209bb10aa2 jdk8u31-b04
-e4e3070ba39416ea1f20a6583276117c5498466f jdk8u31-b05
-90cd67a6b6e5e4db93155cc0260a94b55b35bc74 jdk8u31-b06
-06807f9a68358f9684ab59b249760ba2b47cc07b jdk8u31-b07
-45193c5ae26d67cd3dc6961506d8c06803ff646c jdk8u31-b08
-9a310a2276f9a01822b3cfc91268a67cbaaafd0a jdk8u31-b09
-dd0467f3fe130884849ad8fb226d76f02b4cbde4 jdk8u31-b10
-497c783d228ed188d61964edd409794af3ad3e5c jdk8u31-b11
-959e8fca46155528c8147da69a7c49edfb002cb1 jdk8u31-b12
-9d0c737694ece23547c0a27dcd0ba6cbcdf577f2 jdk8u31-b13
-49e91817cbe1b14f856c26f6e55b7151e3f8c3a8 jdk8u31-b31
-9e20c5acb448c5f9b05a4e9b4efc222b3b616c23 jdk8u31-b32
-ea23d583e36301301612946d34ff6aa90d795dd9 jdk8u31-b33
-e7a9c2fb6b0529e4c64a33240fd18c3e4864dc52 jdk8u31-b34
-31d43d250c836c13fcc87025837783788c5cd0de jdk8u40-b00
-262fb5353ffa661f88b4a9cf2581fcad8c2a43f7 jdk8u40-b01
-8043f77ef8a4ded9505269a356c4e2f4f9604cd9 jdk8u40-b02
-27bcab54f36afc2340adf525fa2a8de1b1c356ca jdk8u40-b03
-127fb2a65ca6d09bb59ff8030aac11c67f3da4d8 jdk8u40-b04
-b904fcd66860c2b069493f989b3347241266407d jdk8u40-b05
-52ae3094de1ec6974ff0250b8cabc13f110290d1 jdk8u40-b06
-3857b4b27e22cfd3f970cd77ed1a41d44444202f jdk8u40-b07
-304ea93428f83d55a558a76ebbcc318d07c03fbe jdk8u40-b08
-26529be4ae77192acf99c867f0c2a75a7ad71f28 jdk8u40-b09
-337fb10bc4da77f31b3ba3049d45180a8c215f97 jdk8u40-b10
-475f12001625b16230f29a96b6371b3cd2e955dd jdk8u40-b11
-d78fb9203a2782842810ff0197f2ce92d364a8ea jdk8u40-b12
-42a61f4bdca3f7f919b7f8aeb5cad961dc2d1660 jdk8u40-b13
-d22a374ce8569a89301b6c07301e0a803af024e7 jdk8u40-b14
-a278e39ba58d104d0731db5ab5ea6cedf3084a1d jdk8u40-b15
-8893690584dac2df7cc2e9b0a5ffe107266a160b jdk8u40-b16
-83c4d5aca2ff8fd0c6b2a7091018b71313371176 jdk8u40-b17
-fa07311627d085f1307f55298f59463bcf55db02 jdk8u40-b18
-c8b402c28fe51e25f3298e1266f2ae48bda8d3e0 jdk8u40-b19
-a21c4edfdf4402f027183ac8c8aac2db49df3b7d jdk8u40-b20
-16485a38b6bc762b363f4e439047486742fbcfcb jdk8u40-b21
-6e928fd9152541eddf25694be89eb881434a5c5f jdk8u40-b22
-b6755a463ccf6a79b1e1a43ed7bdb1c5cb1ac17d jdk8u40-b23
-5fbbfd66643edb81cfa0688825d698dcc5f2eb11 jdk8u40-b24
-b6120aaf2aeef7c5608d578e15e82db7eb24fb2e jdk8u40-b25
-1bcb30bdd9883cc7fc1bf70800ea03a4429eaa80 jdk8u40-b26
-a5f2cdedb940511674e153dce8d3cbc3a0598c9e jdk8u40-b27
-a342e6841e8d3bbef44d4158c980be2ab903e10a jdk8u40-b31
-8960bce00f1abecad665291b0077d6e673c0ff64 jdk8u40-b32
-f9e72841a77fe0402da947500359f4d60ecc89df jdk8u40-b33
-667a4aee3720373f5c286a50f537afd0ff4b65ae jdk8u45-b00
-cb6added4913f4899bd1689e77be1fe4efcff4f1 jdk8u45-b01
-855a7b9302053546e4da94b67cc3b8956f5b4985 jdk8u45-b02
-698a88182586b0914b204de27cc45d6f0dfe7683 jdk8u45-b03
-c7307f75843b64e6096205425ba2f7387017ee9e jdk8u45-b04
-6bd873f17e03cf285f576f69340123e3b2d8922f jdk8u45-b05
-a5e99f4d067ebea01e438e5b3e9b09bda47ddb25 jdk8u45-b06
-145ea6d2899f5cc6bd4e1108903e4d22ad063eca jdk8u45-b07
-f3d678fe58e7c026fb62be8b72c46ce1015aadf6 jdk8u45-b08
-8f2e5110151810dc5b56a3ce05d955e400bee937 jdk8u45-b09
-5cf887e3e1368d1910181eaab2794b25058fe8b6 jdk8u45-b10
-855fd9dfcbee177b508413dbab6e46b57dd367c4 jdk8u45-b11
-3f6c3f48179ac8bab98509be8708edcea32727b6 jdk8u45-b12
-15fb2359f5f86dbacc1bc120f663853b5292cd14 jdk8u45-b13
-bad02ac45d59b5096032cf42bb880dcddffa84b4 jdk8u45-b14
-cc7d796b8f12cc11d415f8ae0ef2d952274fc069 jdk8u45-b15
-8a7494ab96913de396a8f38dd324ac52c44b1a80 jdk8u45-b31
-1c022144b99b859336914740e571c672e51ee1b9 jdk8u45-b32
-67e3db8ade754c88f735ce23d7e6aaaeff075e71 jdk8u45-b33
-7fbeef307a54dd209687e22e7244012f512805bc jdk8u45-b34
-f2afa963f0ce5804dafc8d9c4bc951b08acdf04c jdk8u45-b35
-f5af8bb98711743ae10c61abc3f163ac44e70971 jdk8u45-b36
-32680a5ae597b05911770a9863643d4639498fea jdk8u45-b37
-74aae7549ef8c6e9f394b75c840bf293e2664858 jdk8u51-b00
-78d8cafb17e46dd2453704f679ca1e431e4df0ba jdk8u51-b01
-9bd6f57d97e5423d5f25774b095124cbe1eeb9c1 jdk8u51-b02
-a9ed1bcefec1ee0d30ea8cf700cf0813d8588eb0 jdk8u51-b03
-3d07c26d5012f47ef274043a6204db686769d65d jdk8u51-b04
-834da1120e80f17356475a5d3f06a678355dbbf6 jdk8u51-b05
-243ba3774d18cfe2e56fa0e0474255787c360d07 jdk8u51-b06
-13d1721eae3bdea08dcd7b84e0856e6769caafc9 jdk8u51-b07
-cbba234a2b481b236e2bf78c892111b86f6bba81 jdk8u51-b08
-9116c6bb2ffa6bb624ad39f7a98b7b9bed4512dc jdk8u51-b09
-783b917616ab6977f9b3157667d1493636ba66d1 jdk8u51-b10
-5a69995912aae8bd61758e95a3b5edac167b6acc jdk8u51-b11
-1a855f69de645c4bd485d5fb6d9a524994278a16 jdk8u51-b12
-880b67345f557d5613071d09c1cf234a7e1b8759 jdk8u51-b13
-4a6824c3fd8d74f83daac1a79952786837a9848c jdk8u51-b14
-dde8e5b2366b9a08d7448c3cef2cabc710cc9da5 jdk8u51-b15
-e465c106bfe3feb6e2887fa512511c894c092dde jdk8u51-b16
-b189fe14d0f4375961a60d3e8532ca652e1aa592 jdk8u51-b31
-ef7893ef8718d205494fd5f79921be7c63b598b0 jdk8u51-b32
-e8631058a15d828af4d362cc247b18fc71aefeee jdk8u51-b33
-f806c42dad6de5d20652036de0f6964668435e11 jdk8u51-b34
-c8b402c28fe51e25f3298e1266f2ae48bda8d3e0 jdk8u60-b00
-7a0dacd12a9e42f581c11edeb51a69af9a8ab16d jdk8u60-b01
-5eb3236cc4a7075baf80fc8a258a1f9612e52cf0 jdk8u60-b02
-3e52068e8b9df8a9bb7a0594fab7f4132817ac3d jdk8u60-b03
-02b1d3c68132b14a36e5d1df9b4a53c7981469b4 jdk8u60-b04
-4dfd5dbd3014db59f92d54cf215f7e7ed4508044 jdk8u60-b05
-a22a9460d53fb519b00e118c98ee0cb5e981b659 jdk8u60-b06
-6f0885023e43fe44cade86e3dd77350d9ecbc4b4 jdk8u60-b07
-078fde829e878595fcd9122a52ea5cfafe6685a8 jdk8u60-b08
-fbb7b2d1321fdb7345e163bbc8c01a307f9d9d38 jdk8u60-b09
-3e7a28ca602befafcd6329a60c00e5b36c4e69c6 jdk8u60-b10
-334320b978e06d309d9a9ec67097f982128fad91 jdk8u60-b11
-fab06c192b0b246656e47aacab2fb555e3ca2cb7 jdk8u60-b12
-4390fe716719a6966e10bf9cce4b8752f9cf5d96 jdk8u60-b13
-feb70717506da80f712f0b942d77527d2cc4cde5 jdk8u60-b14
-8c0018c9c533126cf3f7e912936f6e227bd1e96c jdk8u60-b15
-1c9eb173022b4b95ef6c93685b62b3039ccf8d92 jdk8u60-b16
-d6a80a0a3e9aca2b40f80709c9ce6c471b8902cf jdk8u60-b17
-53361b1cead8fc5ab1619a0b3baec8d4b411319d jdk8u60-b18
-5b422975b71def8c5a16a4f303c8fb8b108dc0cf jdk8u60-b19
-1a4b2888aa98ea70aad849e35e05b48e1c107503 jdk8u60-b20
-a414aec2d19cf692310587518546842070b80cb8 jdk8u60-b21
-6079c26a3b8fa1ead3d26a9de6ade2af71f1fb94 jdk8u60-b22
-c21563403b7a043be3d8f1afdd314e91438e357c jdk8u60-b23
-1c394b3be96628b705bb78d62bb4b7c9a7f75175 jdk8u60-b24
-0497fdafbc8d19d72bce668e65dc5e5457f6f21a jdk8u60-b25
-a20f5fa8d56298239e762408d3a427a0632a8b69 jdk8u60-b26
-975eb04d17953228e0f401cfee657fa9f5e26915 jdk8u60-b27
-2ba41569e6a0d314333fc3d4375381fdde4de7ea jdk8u60-b31
-61c97f549df419ef128d56d830014c8c782f220e jdk8u60-b32
-b61213045ec6e71505dfb94d2cd4ae3ce866166b jdk8u52-b06
-45891cd5c7a2268c65e9b8ab9299d46c45c77c47 jdk8u52-b07
-b61213045ec6e71505dfb94d2cd4ae3ce866166b jdk8u65-b00
-2af4e64ba020ba1419f48ed901ba0c91ea6b0aa1 jdk8u65-b01
-0851a86980a752b2b0250f7aa8da0e95cd07520c jdk8u65-b02
-330a44775442aba19645e9de00f6e09e398493ac jdk8u65-b03
-8c449f659e1338f7360295659201e0f1f204b711 jdk8u65-b04
-34221564cc133b306fa2cbadea0524ccb6c11e78 jdk8u65-b05
-14a55d61e06e2c20cd108ff636d1b853f5c8749a jdk8u65-b06
-20c5aa28a5fdc1c2c57e9561b08efb1a054fea22 jdk8u65-b07
-7f5df082d224e558e546cfddaf0805d68f34b2e5 jdk8u65-b08
-fd04b18dbdd1cb6fd7a63f2719f74f9bd7f8131d jdk8u65-b09
-6adf33f124fdd40b0079013c1074b4c7fc24aae7 jdk8u65-b10
-0a351d11449f81065425154c679a255c7916cc6d jdk8u65-b11
-414bc42938220882d399efd347f249cdfa024a6a jdk8u65-b12
-0984b16cc4d5b787fe03a2c1385a02030e9178fc jdk8u65-b13
-55033df0bbba6593bca22a4552bffc014fc6fbf2 jdk8u65-b14
-4ccc9e1468ae438821c5774cfd92129c1cc7bc6e jdk8u65-b15
-8ad14ed35d90f80d747a807307aaf92b146f53a9 jdk8u65-b16
-dbdfb913c5284242da2f97c74d031f24719edf56 jdk8u65-b17
-6079c26a3b8fa1ead3d26a9de6ade2af71f1fb94 jdk8u66-b00
-9655502cb94fada4580aa1d8ac08ed027b2272ed jdk8u66-b01
-0357274e67e94963c226f98e3af535ada2c7e0c5 jdk8u66-b02
-c3801338e94e391e639602106f5a76c725f2bc6c jdk8u66-b07
-1f936b23f61914dc75c8b496ad6b13c453af81be jdk8u66-b08
-e294a428c36f3d405fb691bfa07905e76637412c jdk8u66-b09
-b30c137b45929ec5f300fa831eab49807f0fea0a jdk8u66-b10
-b4bf5b2e93a0ec26dfc70caebaeace3927243b19 jdk8u66-b11
-8ab75dba8353e1dd658e086de9c7ad1157d81cd7 jdk8u66-b12
-d0c6921ee6c88e050673cb9cf9f88b7159442c1c jdk8u66-b13
-972d89655bab60525ddbc9365354fc809d0b74ea jdk8u66-b14
-19e64af41036d4ba0109ac2838133de5e7d159cc jdk8u66-b15
-529e4f09082daa07610ddde7dd2bca35b979eb14 jdk8u66-b16
-78c988a427d751f5a986af258248b3665950e509 jdk8u66-b17
-f3e9f0fcf5560c535bb93735b4c54e2f0257eb1a jdk8u66-b18
-f3c71687f52b6c4c331af8f6d200f677b367995c jdk8u66-b31
-7c9c036d03e18c44cf8598ce11c95764180eeed5 jdk8u66-b32
-032a4c3518f29ff55eac6603176e43601f7d0b4a jdk8u66-b33
-030b4033583ac387fa85b4eef968fb1abf0cf39d jdk8u66-b34
-dbd13a86556977545b5318342f8d9495b444c2aa jdk8u66-b35
-440eff28532a0af47e6267a8348554e79038be82 jdk8u66-b36
-47fc8ab84f47979b378158626f84b99b6f2b110f jdk8u71-b00
-f86ce5ee62ba5d0c91040fa53f0de5b19b20f155 jdk8u71-b01
-7d639191d91cd31b87363ed5383b636bed17f757 jdk8u71-b02
-12b4dcdd76c9b84fed7f6236964075846cb8964e jdk8u71-b03
-79f7e6560ce99eff5745da2a90e75200ca5b4c1e jdk8u71-b04
-15e05a6c32585edd6d2551445735994cb44f948e jdk8u71-b05
-b567f800daaadd47bbf49f69f683b515baeb4d9b jdk8u71-b06
-58f12bf42e5d726b01429a5bbfe26955c6620051 jdk8u71-b07
-7099cbc92fa4f4555e9ad8e19773851d701968b2 jdk8u71-b08
-a46eae10609ff4c9199fec9bff277f892da00495 jdk8u71-b09
-8ba92a4a3607da20a57f35d671e5ead5c5a5de3b jdk8u71-b10
-bd83bb17b08125088de07773d0305671d966ed6e jdk8u71-b11
-cf00d4a52f6444c8128313be33c29a98f67734bd jdk8u71-b12
-b570e47d708e4d7e9d65371ca16c3c93b0362091 jdk8u71-b13
-13b47358cf8965869865382d74c079c9290787f7 jdk8u71-b14
-6fabdb0ad3a0b28c7c1f9da4e7756c90f2c92b47 jdk8u71-b15
-3cbfc8bd4b1c83e151ba786778e04e8502ea13e4 jdk8u72-b00
-121e784f01d1b658866e499a42288b2f98eeb482 jdk8u72-b01
-c51556c23de38d5f4412622853e643bb8c67d647 jdk8u72-b02
-dddcabf97b4ab156545b3e98d67d6d3e37c8529e jdk8u72-b03
-baa0e7874269223b1726c9b2eccf628d0f72bcfe jdk8u72-b04
-b2b41f383c882ee7a8c2a54dfb0957aa2764d1f8 jdk8u72-b05
-fb0c51afcc55180608f07eb6697d517416ae15da jdk8u72-b06
-abf379db9ce09f747535558fa81d8468b220b810 jdk8u72-b07
-9c9e8cacf2b9161b2cbe232c6aa083fa09a5e63a jdk8u72-b08
-281229749d8ec6fbcd5e7a1eb05b433cd03d7b22 jdk8u72-b09
-b7a0a2c501f43027b870940b3fce2fe1306fc597 jdk8u72-b10
-96671bae6d531d23d1d6c9e1eff09e609dd3a273 jdk8u72-b11
-a2473dd1dc0df47425e42d7fed1e4cabdb696154 jdk8u72-b12
-4c28352ce19bc25be5de681868a8cddb3f3644a8 jdk8u72-b13
-1a523f4b8cc77ef9dfb6d8191742dcd616cd9093 jdk8u72-b14
-2f840ac0adf079f0d2f0bac7a9c3fae6ea651271 jdk8u72-b15
-744fab401c4b326f142f5110ad523b1b22f973c8 jdk8u72-b31
-8da626c14c138dd41d4c685800351bf675048628 jdk8u73-b00
-dfc9feacece48fa8450b997e463afae2c1539ac3 jdk8u73-b01
-06fb882f8ed7ff3e58f7aa57e526e55c25ae9992 jdk8u73-b02
-4a5f76111c0b056357d4bdd3e015d649de2db591 jdk8u74-b00
-621e4ac137cd4a04ac1279e75d7fd0625765fd03 jdk8u74-b01
-6cfef18571fd35f45bada34cf4da4b1492ddb878 jdk8u74-b02
-e2d83c243af551722c88fe2dd391364373e2bd3a jdk8u74-b31
-62291bde8b5ea2288c0729982681baec7cd0451f jdk8u74-b32
-a2f8a45d70b21e450fac7ae7d5ca71ce853cf3d0 jdk8u77-b00
-dd34713088c23b7c6ef1adc071dd635bc7bda744 jdk8u77-b01
-7c319d6e0d4c59ebde91b88ba1391ace165b2f01 jdk8u77-b02
-c6f67bea4466783433b1bf1f83a4eb6784a5eb55 jdk8u77-b03
-bedbb9b6cf59d5da68478a4b49bb2fdfc43a4f2c jdk8u77-b31
-744fab401c4b326f142f5110ad523b1b22f973c8 jdk8u72-b31
-7d7b3488f44e77bedbbcbdee5a4415e5a5bd930c jdk8u75-b00
-d0161a6ecd3bf8c9953e979db8318177e4f2aa86 jdk8u75-b01
-57eb6af19a97a835b07c618d1c0aea50a0577337 jdk8u75-b02
-3412fd49bcbedcc4b0f6ae13a149e53ecde968ae jdk8u75-b03
-6580edbc4511d5a2281138c476700b8ab12165af jdk8u101-b00
-6580edbc4511d5a2281138c476700b8ab12165af jdk8u75-b04
-31337d5922975e1655764a7db158154d48866c13 jdk8u75-b05
-7fca20ec14beec302f7a4d446d1d8646a9a0b74f jdk8u75-b06
-97951b6feedbf113dfd09a98fe2625fea775aa09 jdk8u75-b07
-e4c1921d756888d95b47dc6b1eefe3878064a95c jdk8u75-b08
-c302ec60295cd1a5b57e43c28e387556980d1350 jdk8u75-b09
-945844568e956b9b68003f2b0f0528521b578d98 jdk8u75-b10
-ee0c5d0875a3c6022fde6855c6353b68f746f6cd jdk8u75-b12
-a2f8a45d70b21e450fac7ae7d5ca71ce853cf3d0 jdk8u77-b00
-dd34713088c23b7c6ef1adc071dd635bc7bda744 jdk8u77-b01
-7c319d6e0d4c59ebde91b88ba1391ace165b2f01 jdk8u77-b02
-c6f67bea4466783433b1bf1f83a4eb6784a5eb55 jdk8u77-b03
-f66ee2329cd21c3485de1b8e0588f55882a56e0d jdk8u91-b00
-be5935ee38f1bc5132cf318f7badb61af86e2396 jdk8u91-b13
-e71f424e2c966a495b1d47693317288f291a794a jdk8u91-b14
-4c0ed3f71a596277f3c28b3f841d5c4ee7a007e6 jdk8u91-b15
-6aba0f814a15966e47aeab61b466894b82c03c70 jdk8u76-b00
-60789eebd1fe440255fd3f504221dc8b5553b8c2 jdk8u76-b01
-8c7d476c446940edd913ba5a3ca36975febdac28 jdk8u76-b02
-4b728dce9390e63f60d9ea445c229430ed059174 jdk8u76-b03
-4dfb56754487262e72d2e76900ddb6db51974f2d jdk8u76-b04
-fb7f4e5348ac9da68c04650bf26c4f4615fce169 jdk8u76-b05
-e28faf4200cb761fe36f3c2900df4bd3abe19ca6 jdk8u76-b06
-8fbdfb6e07112edc2f8ebeb4297354feb5eefd4f jdk8u76-b07
-dd502b0270a0b27adb04cec61672e8aa021aafe9 jdk8u76-b08
-c50275b7bb7aa23ab6c83423f3b1d8e02f604854 jdk8u76-b09
-9a7ea7a7ab734047e6bae7c354f503e7b71bf4c2 jdk8u76-b10
-f31ede81ad1e14724b49c71bae8183e8e36986d0 jdk8u76-b11
-fad3981b329a0d309f4922bbca7335973e32e50f jdk8u76-b12
-451d700ba30ee0d3d201090a9d5dd606b988820e jdk8u92-b00
-008547c7dd3e324c46c2711b54285ca99e2ae0b9 jdk8u92-b13
-759ba92444a9e85434cb381f437aba65e3c9f780 jdk8u92-b14
-38c6262b86559ff589f65f5bcc744b1763e20311 jdk8u92-b31
-b762186ac713fbb0fc759110a1c88bca4b4818cd jdk8u92-b32
-ff694a4e9cae136032855516e5f0cd7f1a0e6957 jdk8u92-b33
-283147c5fcc5027b39ca577250edaec4b4b87c0f jdk8u92-b34
-6580edbc4511d5a2281138c476700b8ab12165af jdk8u81-b00
-0bff22fbd91f48c37f7c5a4544929231b92bd9bf jdk8u101-b01
-31e437ae0354e628a675bc4eb6b9ca67af552fc2 jdk8u101-b02
-2a5ea5a78ae7332b3d13af5580418ca9d186cda7 jdk8u101-b03
-d3b054313ed2d29f9dbbdfd71a7ab3c4ad4eb5b6 jdk8u101-b04
-0a657e4d5ed57bf3216b96915633b661f6532be5 jdk8u101-b05
-8cef2df1e60991bfdd8b2d8a8bad9e3506c1a386 jdk8u101-b06
-96be6de53286422ccbfd1c4fdf36a0490af32edb jdk8u101-b07
-a6ed0b0e8707b7112c99294122d7f3b259707603 jdk8u101-b08
-a93b161995a80cf7b0e599cf2f91e755ab1c7098 jdk8u101-b09
-ea422e4481f6edfb77bb3a4cd74a73e463143ff3 jdk8u101-b10
-5f3dcb815b9715215d086ba0d48a59b23d01d0a4 jdk8u101-b11
-6a0347504d4c4171fcc24bc17749c0559518d862 jdk8u101-b12
-287f9e9d45cc05b902925346bb6f6ee34a5d5813 jdk8u101-b13
-6aba0f814a15966e47aeab61b466894b82c03c70 jdk8u76-b00
-60789eebd1fe440255fd3f504221dc8b5553b8c2 jdk8u76-b01
-8c7d476c446940edd913ba5a3ca36975febdac28 jdk8u76-b02
-4b728dce9390e63f60d9ea445c229430ed059174 jdk8u76-b03
-4dfb56754487262e72d2e76900ddb6db51974f2d jdk8u76-b04
-a0c077b39c7a331bda9764a173a2b02d0725f28f jdk8u102-b00
-a0c077b39c7a331bda9764a173a2b02d0725f28f jdk8u82-b00
-c0ad0fa38df0841eaaf81ab40e8b07b42372c5d5 jdk8u102-b01
-face9bd6bac2d43d4c423be4fe733689794c2f08 jdk8u102-b02
-4e12f131bb0dbe0478aecb7ebdfe24b10d3ece75 jdk8u102-b03
-5b1d73ea0eb68cef733eb9379ed71cfb008da72e jdk8u102-b04
-1f512419ae336ce17f1d16384e34669a81db27ae jdk8u102-b05
-c8f5925b8ec9491d95538d94803cf03b2d75d1b6 jdk8u102-b06
-d4bd96ee50976dc9e4cb308d8728e70ecb03a944 jdk8u102-b07
-ca64f5f827251b5c28046f79c3577fbc8991d3d7 jdk8u102-b08
-5b93dc7249127c6beae1a688b6cea204bac3fdd0 jdk8u102-b09
-7a11148c41b867305b153b6b82d75717accea119 jdk8u102-b10
-0305736a8580ad84733878623eda8f770ae04d60 jdk8u102-b11
-d02665ceefe5b12539bcd2bde95d4ada1a135cb0 jdk8u102-b12
-d84434eb3e4e991812a7b0c3c9e6bfdabae910d0 jdk8u102-b13
-81f2d81a48d74d2d4882c11330366517b73ee064 jdk8u102-b14
-de23881ca76c9c69f4e47e9b15d09a91fbb17176 jdk8u102-b31
-f638db3f652d3ec698aad0193c118c8afdaa001b jdk8u102-b32
-c28a73050d99040158ade12858b38d27686800ce jdk8u102-b33
-0cf16c3a71ab070daa1aee4367afdd8c4aa1daa3 jdk8u102-b34
-afa2263b5de8018a2b4a3cd5f66e438cb8ffe0e9 jdk8u102-b35
-d3b054313ed2d29f9dbbdfd71a7ab3c4ad4eb5b6 jdk8u111-b00
-6b861e233c89df49ba9b0357578f556f4953df57 jdk8u111-b01
-a896244473b934376ae7b48a281a0401774c9074 jdk8u111-b02
-d4b631c4844d23a30f11e37696e6f4ac1e9057dd jdk8u111-b03
-9ba3b9700df8b4fc0f5b94b3930d4ba85be3b749 jdk8u111-b04
-452662a83e5bc6dc7e9425ddd10f6c8fc98d50d8 jdk8u111-b05
-cc2f9d823c77cf8f8442a2246edf00f66c2dda8a jdk8u111-b06
-23aa5ab8a2c882d467b8a86d587050de7d523604 jdk8u111-b07
-0a3caaf419ccbf819624f1d438c9fc834682821c jdk8u111-b08
-68b99f65ae7599bc873d20ed150ed8277f2784ff jdk8u111-b09
-11d721e50941b0ba73252f8c8fa333eb1450a317 jdk8u111-b10
-730d8fc6bbfc5c642770b15e4787e1d0545c8f32 jdk8u111-b11
-6ccfdf9a9af5f2df5cbd5ecd5f17aecef289094b jdk8u111-b12
-914f31660407050cb04357f472d8365d5a781cd7 jdk8u111-b13
-1439cb8c6e86560934b9642cf36cddbfcb8f87be jdk8u111-b14
-2d1c73175b3a5bd829503734e6eb65426bd12e16 jdk8u112-b00
-10388356386d4c6eaf63dc50a05b5a373b4dde98 jdk8u112-b01
-903e66791568904247b4181ebe3e05275788f02c jdk8u112-b02
-560d4d5c7a319e4b9316ef922c815307e32accf2 jdk8u112-b03
-da39da2c7a855575acf7bff86e5707c9aa723160 jdk8u112-b04
-454315c9ffd47f1abec15a51ff51f25c92d09254 jdk8u112-b06
-5f7c72e72f8ce44962a27ee24405c52348d1f38e jdk8u112-b07
-f3d512b7322957a8714f04f2d4714065ebca15f6 jdk8u112-b08
-92dbc9db48db7d3f61b1af0d1f8139257c6ae497 jdk8u112-b09
-29aaa22088eeff4e87fccc88318c088a95e2ab35 jdk8u112-b10
-c6d719a4fcd78b692f70f49daf83bf7610f5e0bc jdk8u112-b11
-bb36d2dbebb7d4ebb4de8e666f00187eca81efd9 jdk8u112-b12
-abb5568d79259d63bf349abf7f5e7461eddc2b40 jdk8u112-b13
-14fa3ed278a279dc85c150bf54b2ec4fa29cf347 jdk8u112-b14
-5f84e87f91d5bc36ed026b88d183821e5109d730 jdk8u112-b15
-d82dd7a24a496e26987caa328d1fb4fc794a4770 jdk8u112-b16
-021da5d50285a523d4622a727ea1a7019f2b52e4 jdk8u112-b31
-452662a83e5bc6dc7e9425ddd10f6c8fc98d50d8 jdk8u121-b00
-9cd16be39ca6f2c8f7cc99ad07a77bb9d0696c75 jdk8u121-b01
-f092b9a890ceeca4a2f4d55cf7d6f3f113cdb462 jdk8u121-b02
-c1b0f76c9fe9657d3f5cdd1e23bfd1d499018431 jdk8u121-b03
-44674172423a0d361466e34eedcaec18a8810b13 jdk8u121-b04
-18da635b5919a0b7cdde8573a0d502efdbf3673e jdk8u121-b05
-5b76a2126855f8949ab8fbadfa3ee2f29da9c21c jdk8u121-b06
-f10aa5b29848eab891bdd173540d91fd31f9ff20 jdk8u121-b07
-105d3bbf5e3b2b24da665b332d2dbf44980c87f2 jdk8u121-b08
-9f2588382771f855c4450f59b470d069a1cb1d01 jdk8u121-b09
-c317f0eacd602a8765d25b0fcd382f76af3697a5 jdk8u121-b10
-89aa912be940d6c30f59b80c826f212541912a56 jdk8u121-b11
-52b3f9fb54ee4304a9c34a2fe07f0c9a49472185 jdk8u121-b12
-5b8834cc3bb9e24153319c766e04e194945a61b9 jdk8u121-b13
-ea4b3e983ee708f9323d228044176e52526e9e13 jdk8u122-b00
-2e7f62568785adfe695e0c06f2e88c9d369c3b2c jdk8u122-b01
-b97e1b7f3c92b3e9f75e6aa590e0884c3c3ed33f jdk8u122-b02
-30b5b545a78c0c4fee837664f9c70ef6a2b4f0c1 jdk8u122-b03
-30b5b545a78c0c4fee837664f9c70ef6a2b4f0c1 jdk8u122-b03
-0000000000000000000000000000000000000000 jdk8u122-b03
-0000000000000000000000000000000000000000 jdk8u122-b03
-a127c3268266ba1402343d94c7b19355c2dd1bd7 jdk8u122-b03
-c48501ec74b9b03870b473e5bde656fce230fc36 jdk8u122-b04
-f3b3163dda3c6da9339dba99a2ee74645ad2edc6 jdk8u132-b00
-55cb39946f2f163085ca80413b8cd3b3e196e533 jdk8u152-b00
-cf960a33b0e3093abcb48bfe304d471e3b092dc4 jdk8u152-b01
diff --git a/.jcheck/conf b/.jcheck/conf
deleted file mode 100644
index 5bd24b14..00000000
--- a/.jcheck/conf
+++ /dev/null
@@ -1,2 +0,0 @@
-project=jdk8
-bugids=dup
diff --git a/ASSEMBLY_EXCEPTION b/ASSEMBLY_EXCEPTION
deleted file mode 100644
index 065b8d90..00000000
--- a/ASSEMBLY_EXCEPTION
+++ /dev/null
@@ -1,27 +0,0 @@
-
-OPENJDK ASSEMBLY EXCEPTION
-
-The OpenJDK source code made available by Oracle America, Inc. (Oracle) at
-openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU
-General Public License <http://www.gnu.org/copyleft/gpl.html> version 2
-only ("GPL2"), with the following clarification and special exception.
-
- Linking this OpenJDK Code statically or dynamically with other code
- is making a combined work based on this library. Thus, the terms
- and conditions of GPL2 cover the whole combination.
-
- As a special exception, Oracle gives you permission to link this
- OpenJDK Code with certain code licensed by Oracle as indicated at
- http://openjdk.java.net/legal/exception-modules-2007-05-08.html
- ("Designated Exception Modules") to produce an executable,
- regardless of the license terms of the Designated Exception Modules,
- and to copy and distribute the resulting executable under GPL2,
- provided that the Designated Exception Modules continue to be
- governed by the licenses under which they were offered by Oracle.
-
-As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code
-to build an executable that includes those portions of necessary code that
-Oracle could not provide under GPL2 (or that Oracle has provided under GPL2
-with the Classpath exception). If you modify or add to the OpenJDK code,
-that new GPL2 code may still be combined with Designated Exception Modules
-if the new code is made subject to this exception by its copyright holder.
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 8b400c7a..00000000
--- a/LICENSE
+++ /dev/null
@@ -1,347 +0,0 @@
-The GNU General Public License (GPL)
-
-Version 2, June 1991
-
-Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Everyone is permitted to copy and distribute verbatim copies of this license
-document, but changing it is not allowed.
-
-Preamble
-
-The licenses for most software are designed to take away your freedom to share
-and change it. By contrast, the GNU General Public License is intended to
-guarantee your freedom to share and change free software--to make sure the
-software is free for all its users. This General Public License applies to
-most of the Free Software Foundation's software and to any other program whose
-authors commit to using it. (Some other Free Software Foundation software is
-covered by the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
-When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the freedom to
-distribute copies of free software (and charge for this service if you wish),
-that you receive source code or can get it if you want it, that you can change
-the software or use pieces of it in new free programs; and that you know you
-can do these things.
-
-To protect your rights, we need to make restrictions that forbid anyone to deny
-you these rights or to ask you to surrender the rights. These restrictions
-translate to certain responsibilities for you if you distribute copies of the
-software, or if you modify it.
-
-For example, if you distribute copies of such a program, whether gratis or for
-a fee, you must give the recipients all the rights that you have. You must
-make sure that they, too, receive or can get the source code. And you must
-show them these terms so they know their rights.
-
-We protect your rights with two steps: (1) copyright the software, and (2)
-offer you this license which gives you legal permission to copy, distribute
-and/or modify the software.
-
-Also, for each author's protection and ours, we want to make certain that
-everyone understands that there is no warranty for this free software. If the
-software is modified by someone else and passed on, we want its recipients to
-know that what they have is not the original, so that any problems introduced
-by others will not reflect on the original authors' reputations.
-
-Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that redistributors of a free program will
-individually obtain patent licenses, in effect making the program proprietary.
-To prevent this, we have made it clear that any patent must be licensed for
-everyone's free use or not licensed at all.
-
-The precise terms and conditions for copying, distribution and modification
-follow.
-
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-0. This License applies to any program or other work which contains a notice
-placed by the copyright holder saying it may be distributed under the terms of
-this General Public License. The "Program", below, refers to any such program
-or work, and a "work based on the Program" means either the Program or any
-derivative work under copyright law: that is to say, a work containing the
-Program or a portion of it, either verbatim or with modifications and/or
-translated into another language. (Hereinafter, translation is included
-without limitation in the term "modification".) Each licensee is addressed as
-"you".
-
-Activities other than copying, distribution and modification are not covered by
-this License; they are outside its scope. The act of running the Program is
-not restricted, and the output from the Program is covered only if its contents
-constitute a work based on the Program (independent of having been made by
-running the Program). Whether that is true depends on what the Program does.
-
-1. You may copy and distribute verbatim copies of the Program's source code as
-you receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and give any other recipients of the
-Program a copy of this License along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and you may
-at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Program or any portion of it, thus
-forming a work based on the Program, and copy and distribute such modifications
-or work under the terms of Section 1 above, provided that you also meet all of
-these conditions:
-
- a) You must cause the modified files to carry prominent notices stating
- that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in whole or
- in part contains or is derived from the Program or any part thereof, to be
- licensed as a whole at no charge to all third parties under the terms of
- this License.
-
- c) If the modified program normally reads commands interactively when run,
- you must cause it, when started running for such interactive use in the
- most ordinary way, to print or display an announcement including an
- appropriate copyright notice and a notice that there is no warranty (or
- else, saying that you provide a warranty) and that users may redistribute
- the program under these conditions, and telling the user how to view a copy
- of this License. (Exception: if the Program itself is interactive but does
- not normally print such an announcement, your work based on the Program is
- not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Program, and can be reasonably
-considered independent and separate works in themselves, then this License, and
-its terms, do not apply to those sections when you distribute them as separate
-works. But when you distribute the same sections as part of a whole which is a
-work based on the Program, the distribution of the whole must be on the terms
-of this License, whose permissions for other licensees extend to the entire
-whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your
-rights to work written entirely by you; rather, the intent is to exercise the
-right to control the distribution of derivative or collective works based on
-the Program.
-
-In addition, mere aggregation of another work not based on the Program with the
-Program (or with a work based on the Program) on a volume of a storage or
-distribution medium does not bring the other work under the scope of this
-License.
-
-3. You may copy and distribute the Program (or a work based on it, under
-Section 2) in object code or executable form under the terms of Sections 1 and
-2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable source
- code, which must be distributed under the terms of Sections 1 and 2 above
- on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three years, to
- give any third party, for a charge no more than your cost of physically
- performing source distribution, a complete machine-readable copy of the
- corresponding source code, to be distributed under the terms of Sections 1
- and 2 above on a medium customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer to
- distribute corresponding source code. (This alternative is allowed only
- for noncommercial distribution and only if you received the program in
- object code or executable form with such an offer, in accord with
- Subsection b above.)
-
-The source code for a work means the preferred form of the work for making
-modifications to it. For an executable work, complete source code means all
-the source code for all modules it contains, plus any associated interface
-definition files, plus the scripts used to control compilation and installation
-of the executable. However, as a special exception, the source code
-distributed need not include anything that is normally distributed (in either
-source or binary form) with the major components (compiler, kernel, and so on)
-of the operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the source
-code from the same place counts as distribution of the source code, even though
-third parties are not compelled to copy the source along with the object code.
-
-4. You may not copy, modify, sublicense, or distribute the Program except as
-expressly provided under this License. Any attempt otherwise to copy, modify,
-sublicense or distribute the Program is void, and will automatically terminate
-your rights under this License. However, parties who have received copies, or
-rights, from you under this License will not have their licenses terminated so
-long as such parties remain in full compliance.
-
-5. You are not required to accept this License, since you have not signed it.
-However, nothing else grants you permission to modify or distribute the Program
-or its derivative works. These actions are prohibited by law if you do not
-accept this License. Therefore, by modifying or distributing the Program (or
-any work based on the Program), you indicate your acceptance of this License to
-do so, and all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-6. Each time you redistribute the Program (or any work based on the Program),
-the recipient automatically receives a license from the original licensor to
-copy, distribute or modify the Program subject to these terms and conditions.
-You may not impose any further restrictions on the recipients' exercise of the
-rights granted herein. You are not responsible for enforcing compliance by
-third parties to this License.
-
-7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues), conditions
-are imposed on you (whether by court order, agreement or otherwise) that
-contradict the conditions of this License, they do not excuse you from the
-conditions of this License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Program at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Program by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system, which is implemented by public license practices. Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose that
-choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-8. If the distribution and/or use of the Program is restricted in certain
-countries either by patents or by copyrighted interfaces, the original
-copyright holder who places the Program under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded. In
-such case, this License incorporates the limitation as if written in the body
-of this License.
-
-9. The Free Software Foundation may publish revised and/or new versions of the
-General Public License from time to time. Such new versions will be similar in
-spirit to the present version, but may differ in detail to address new problems
-or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any later
-version", you have the option of following the terms and conditions either of
-that version or of any later version published by the Free Software Foundation.
-If the Program does not specify a version number of this License, you may
-choose any version ever published by the Free Software Foundation.
-
-10. If you wish to incorporate parts of the Program into other free programs
-whose distribution conditions are different, write to the author to ask for
-permission. For software which is copyrighted by the Free Software Foundation,
-write to the Free Software Foundation; we sometimes make exceptions for this.
-Our decision will be guided by the two goals of preserving the free status of
-all derivatives of our free software and of promoting the sharing and reuse of
-software generally.
-
-NO WARRANTY
-
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
-THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
-PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
-YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
-ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
-PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
-INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
-BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
-OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-END OF TERMS AND CONDITIONS
-
-How to Apply These Terms to Your New Programs
-
-If you develop a new program, and you want it to be of the greatest possible
-use to the public, the best way to achieve this is to make it free software
-which everyone can redistribute and change under these terms.
-
-To do so, attach the following notices to the program. It is safest to attach
-them to the start of each source file to most effectively convey the exclusion
-of warranty; and each file should have at least the "copyright" line and a
-pointer to where the full notice is found.
-
- One line to give the program's name and a brief idea of what it does.
-
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this when it
-starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
- with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free
- software, and you are welcome to redistribute it under certain conditions;
- type 'show c' for details.
-
-The hypothetical commands 'show w' and 'show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may be
-called something other than 'show w' and 'show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your school,
-if any, to sign a "copyright disclaimer" for the program, if necessary. Here
-is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- 'Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- signature of Ty Coon, 1 April 1989
-
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General Public
-License instead of this License.
-
-
-"CLASSPATH" EXCEPTION TO THE GPL
-
-Certain source files distributed by Oracle America and/or its affiliates are
-subject to the following clarification and special exception to the GPL, but
-only where Oracle has expressly included in the particular source file's header
-the words "Oracle designates this particular file as subject to the "Classpath"
-exception as provided by Oracle in the LICENSE file that accompanied this code."
-
- Linking this library statically or dynamically with other modules is making
- a combined work based on this library. Thus, the terms and conditions of
- the GNU General Public License cover the whole combination.
-
- As a special exception, the copyright holders of this library give you
- permission to link this library with independent modules to produce an
- executable, regardless of the license terms of these independent modules,
- and to copy and distribute the resulting executable under terms of your
- choice, provided that you also meet, for each linked independent module,
- the terms and conditions of the license of that module. An independent
- module is a module which is not derived from or based on this library. If
- you modify this library, you may extend this exception to your version of
- the library, but you are not obligated to do so. If you do not wish to do
- so, delete this exception statement from your version.
diff --git a/README b/README
deleted file mode 100644
index 4d65125b..00000000
--- a/README
+++ /dev/null
@@ -1,19 +0,0 @@
-README:
-
- This file should be located at the top of the Mercurial repository.
-
- See http://openjdk.java.net/ for more information about the OpenJDK.
-
- See ../README-builds.html for complete details on build machine requirements.
-
-Simple Build Instructions:
- This repository can be loaded as a NetBeans project, built with ant, or
- built with GNU make, e.g.
- ant
- -OR-
- cd make && gnumake
-
- The built files that will be imported into the jdk build will be in the
- "dist" directory.
- Help information is available by running "ant -projecthelp" or "make help".
-
diff --git a/THIRD_PARTY_README b/THIRD_PARTY_README
deleted file mode 100644
index 2b20da2c..00000000
--- a/THIRD_PARTY_README
+++ /dev/null
@@ -1,3574 +0,0 @@
-DO NOT TRANSLATE OR LOCALIZE.
------------------------------
-
-%% This notice is provided with respect to ASM Bytecode Manipulation
-Framework v5.0.3, which may be included with JRE 8, and JDK 8, and
-OpenJDK 8.
-
---- begin of LICENSE ---
-
-Copyright (c) 2000-2011 France Télécom
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holders nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGE.
-
---- end of LICENSE ---
-
---------------------------------------------------------------------------------
-
-%% This notice is provided with respect to BSDiff v4.3, which may be
-included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-Copyright 2003-2005 Colin Percival
-All rights reserved
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted providing that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to CodeViewer 1.0, which may be
-included with JDK 8.
-
---- begin of LICENSE ---
-
-Copyright 1999 by CoolServlets.com.
-
-Any errors or suggested improvements to this class can be reported as
-instructed on CoolServlets.com. We hope you enjoy this program... your
-comments will encourage further development! This software is distributed
-under the terms of the BSD License. Redistribution and use in source and
-binary forms, with or without modification, are permitted provided that the
-following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-Neither name of CoolServlets.com nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY COOLSERVLETS.COM AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Cryptix AES 3.2.0, which may be
-included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-Cryptix General License
-
-Copyright (c) 1995-2005 The Cryptix Foundation Limited.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- 1. Redistributions of source code must retain the copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
-CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to CUP Parser Generator for
-Java 0.10k, which may be included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted, provided
-that the above copyright notice appear in all copies and that both the
-copyright notice and this permission notice and warranty disclaimer appear in
-supporting documentation, and that the names of the authors or their
-employers not be used in advertising or publicity pertaining to distribution of
-the software without specific, written prior permission.
-
-The authors and their employers disclaim all warranties with regard to
-this software, including all implied warranties of merchantability and fitness.
-In no event shall the authors or their employers be liable for any special,
-indirect or consequential damages or any damages whatsoever resulting from
-loss of use, data or profits, whether in an action of contract, negligence or
-other tortious action, arising out of or in connection with the use or
-performance of this software.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Document Object Model (DOM) Level 2
-& 3, which may be included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-W3C SOFTWARE NOTICE AND LICENSE
-
-http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
-
-This work (and included software, documentation such as READMEs, or other
-related items) is being provided by the copyright holders under the following
-license. By obtaining, using and/or copying this work, you (the licensee)
-agree that you have read, understood, and will comply with the following terms
-and conditions.
-
-Permission to copy, modify, and distribute this software and its
-documentation, with or without modification, for any purpose and without fee
-or royalty is hereby granted, provided that you include the following on ALL
-copies of the software and documentation or portions thereof, including
-modifications:
-
- 1.The full text of this NOTICE in a location viewable to users of the
- redistributed or derivative work.
-
- 2.Any pre-existing intellectual property disclaimers, notices, or terms and
- conditions. If none exist, the W3C Software Short Notice should be included
- (hypertext is preferred, text is permitted) within the body of any
- redistributed or derivative code.
-
- 3.Notice of any changes or modifications to the files, including the date
- changes were made. (We recommend you provide URIs to the location from
- which the code is derived.)
-
-THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY
-THIRD PARTY PATENTS,COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
-OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-DOCUMENTATION. The name and trademarks of copyright holders may NOT be used
-in advertising or publicity pertaining to the software without specific,
-written prior permission. Title to copyright in this software and any
-associated documentation will at all times remain with copyright holders.
-
-____________________________________
-
-This formulation of W3C's notice and license became active on December 31
-2002. This version removes the copyright ownership notice such that this
-license can be used with materials other than those owned by the W3C, reflects
-that ERCIM is now a host of the W3C, includes references to this specific
-dated version of the license, and removes the ambiguous grant of "use".
-Otherwise, this version is the same as the previous version and is written so
-as to preserve the Free Software Foundation's assessment of GPL compatibility
-and OSI's certification under the Open Source Definition. Please see our
-Copyright FAQ for common questions about using materials from our site,
-including specific terms and conditions for packages like libwww, Amaya, and
-Jigsaw. Other questions about this notice can be directed to
-site-policy@w3.org.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Dynalink v0.5, which may be
-included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-Copyright (c) 2009-2013, Attila Szegedi
-
-All rights reserved.Redistribution and use in source and binary forms, with or
-without modification, are permitted provided that the following conditions are
-met:* Redistributions of source code must retain the above copyright notice,
-this list of conditions and the following disclaimer. * Redistributions in
-binary form must reproduce the above copyright notice, this list of
-conditions and the following disclaimer in the documentation and/or other
-materials provided with the distribution. * Neither the name of Attila
-Szegedi nor the names of its contributors may be used to endorse or promote
-products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF SUCH DAMAGE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Elliptic Curve Cryptography, which
-may be included with JRE 8, JDK 8, and OpenJDK 8.
-
-You are receiving a copy of the Elliptic Curve Cryptography library in source
-form with the JDK 8 and OpenJDK 8 source distributions, and as object code in
-the JRE 8 & JDK 8 runtimes.
-
-In the case of the JRE 8 & JDK 8 runtimes, the terms of the Oracle license do
-NOT apply to the Elliptic Curve Cryptography library; it is licensed under the
-following license, separately from Oracle's JDK & JRE. If you do not wish to
-install the Elliptic Curve Cryptography library, you may delete the library
-named libsunec.so (on Solaris and Linux systems) or sunec.dll (on Windows
-systems) from the JRE bin directory reserved for native libraries.
-
-
---- begin of LICENSE ---
-
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to ECMAScript Language
-Specification ECMA-262 Edition 5.1 which may be included with
-JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-Copyright notice
-Copyright © 2011 Ecma International
-Ecma International
-Rue du Rhone 114
-CH-1204 Geneva
-Tel: +41 22 849 6000
-Fax: +41 22 849 6001
-Web: http://www.ecma-international.org
-
-This document and possible translations of it may be copied and furnished to
-others, and derivative works that comment on or otherwise explain it or assist
-in its implementation may be prepared, copied, published, and distributed, in
-whole or in part, without restriction of any kind, provided that the above
-copyright notice and this section are included on all such copies and derivative
-works. However, this document itself may not be modified in any way, including
-by removing the copyright notice or references to Ecma International, except as
-needed for the purpose of developing any document or deliverable produced by
-Ecma International (in which case the rules applied to copyrights must be
-followed) or as required to translate it into languages other than English. The
-limited permissions granted above are perpetual and will not be revoked by Ecma
-International or its successors or assigns. This document and the information
-contained herein is provided on an "AS IS" basis and ECMA INTERNATIONAL
-DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
-WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP
-RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
-PURPOSE." Software License
-
-All Software contained in this document ("Software)" is protected by copyright
-and is being made available under the "BSD License", included below. This
-Software may be subject to third party rights (rights from parties other than
-Ecma International), including patent rights, and no licenses under such third
-party rights are granted under this license even if the third party concerned is
-a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS
-AVAILABLE AT http://www.ecma-international.org/memento/codeofconduct.htm FOR
-INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO
-IMPLEMENT ECMA INTERNATIONAL STANDARDS*. Redistribution and use in source and
-binary forms, with or without modification, are permitted provided that the
-following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation and/or
-other materials provided with the distribution.
-
-3. Neither the name of the authors nor Ecma International may be used to endorse
-or promote products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
-OF SUCH DAMAGE.
---- end of LICENSE ---
-
-%% This notice is provided with respect to Dynalink library which is included
-with the Nashorn technology.
-
---- begin of LICENSE ---
-Copyright (c) 2009-2013, Attila Szegedi
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-* Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-* Neither the name of the copyright holder nor the names of
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---- end of LICENSE ---
-
-%% This notice is provided with respect to Joni library which is included
-with the Nashorn technology.
-
---- begin of LICENSE ---
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to FontConfig 2.5, which may be
-included with JRE 8, JDK 8, and OpenJDK 8 source distributions on
-Linux and Solaris.
-
---- begin of LICENSE ---
-
-Copyright © 2001,2003 Keith Packard
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that the
-above copyright notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting documentation, and that
-the name of Keith Packard not be used in advertising or publicity pertaining
-to distribution of the software without specific, written prior permission.
-Keith Packard makes no representations about the suitability of this software
-for any purpose. It is provided "as is" without express or implied warranty.
-
-KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL KEITH
-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
-DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to IAIK PKCS#11 Wrapper,
-which may be included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-IAIK PKCS#11 Wrapper License
-
-Copyright (c) 2002 Graz University of Technology. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment:
-
- "This product includes software developed by IAIK of Graz University of
- Technology."
-
- Alternately, this acknowledgment may appear in the software itself, if and
- wherever such third-party acknowledgments normally appear.
-
-4. The names "Graz University of Technology" and "IAIK of Graz University of
- Technology" must not be used to endorse or promote products derived from this
- software without prior written permission.
-
-5. Products derived from this software may not be called "IAIK PKCS Wrapper",
- nor may "IAIK" appear in their name, without prior written permission of
- Graz University of Technology.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-LICENSOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to ICU4C 4.0.1 and ICU4J 4.4, which
-may be included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-Copyright (c) 1995-2010 International Business Machines Corporation and others
-
-All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, and/or sell copies of the
-Software, and to permit persons to whom the Software is furnished to do so,
-provided that the above copyright notice(s) and this permission notice appear
-in all copies of the Software and that both the above copyright notice(s) and
-this permission notice appear in supporting documentation.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
-NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE
-LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
-DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-Except as contained in this notice, the name of a copyright holder shall not
-be used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization of the copyright holder.
-All trademarks and registered trademarks mentioned herein are the property of
-their respective owners.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to IJG JPEG 6b, which may be
-included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-This software is copyright (C) 1991-1998, Thomas G. Lane.
-All Rights Reserved except as specified below.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to these
-conditions:
-(1) If any part of the source code for this software is distributed, then this
-README file must be included, with this copyright and no-warranty notice
-unaltered; and any additions, deletions, or changes to the original files
-must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
-documentation must state that "this software is based in part on the work of
-the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
-NO LIABILITY for damages of any kind.
-
-These conditions apply to any software derived from or based on the IJG code,
-not just to the unmodified library. If you use our work, you ought to
-acknowledge us.
-
-Permission is NOT granted for the use of any IJG author's name or company name
-in advertising or publicity relating to this software or products derived from
-it. This software may be referred to only as "the Independent JPEG Group's
-software".
-
-We specifically permit and encourage the use of this software as the basis of
-commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
-
---- end of LICENSE ---
-
---------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Joni v1.1.9, which may be
-included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to JOpt-Simple v3.0, which may be
-included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
- Copyright (c) 2004-2009 Paul R. Holser, Jr.
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
---- end of LICENSE ---
-
---------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Kerberos functionality, which
-which may be included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
- (C) Copyright IBM Corp. 1999 All Rights Reserved.
- Copyright 1997 The Open Group Research Institute. All rights reserved.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Kerberos functionality from
-FundsXpress, INC., which may be included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
- Copyright (C) 1998 by the FundsXpress, INC.
-
- All rights reserved.
-
- Export of this software from the United States of America may require
- a specific license from the United States Government. It is the
- responsibility of any person or organization contemplating export to
- obtain such a license before exporting.
-
- WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
- distribute this software and its documentation for any purpose and
- without fee is hereby granted, provided that the above copyright
- notice appear in all copies and that both that copyright notice and
- this permission notice appear in supporting documentation, and that
- the name of FundsXpress. not be used in advertising or publicity pertaining
- to distribution of the software without specific, written prior
- permission. FundsXpress makes no representations about the suitability of
- this software for any purpose. It is provided "as is" without express
- or implied warranty.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Kronos OpenGL headers, which may be
-included with JDK 8 and OpenJDK 8 source distributions.
-
---- begin of LICENSE ---
-
- Copyright (c) 2007 The Khronos Group Inc.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and/or associated documentation files (the "Materials"), to
- deal in the Materials without restriction, including without limitation the
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- sell copies of the Materials, and to permit persons to whom the Materials are
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Materials.
-
- THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE
- MATERIALS.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% Portions Copyright Eastman Kodak Company 1992
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to libpng 1.6.16, which may be
-included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-This copy of the libpng notices is provided for your convenience. In case of
-any discrepancy between this copy and the notices in the file png.h that is
-included in the libpng distribution, the latter shall prevail.
-
-COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
-
-If you modify libpng you may insert additional notices immediately following
-this sentence.
-
-This code is released under the libpng license.
-
-libpng versions 1.2.6, August 15, 2004, through 1.6.16, December 22, 2014, are
-Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-1.2.5
-with the following individual added to the list of Contributing Authors
-
- Cosmin Truta
-
-libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
-Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-1.0.6
-with the following individuals added to the list of Contributing Authors
-
- Simon-Pierre Cadieux
- Eric S. Raymond
- Gilles Vollant
-
-and with the following additions to the disclaimer:
-
- There is no warranty against interference with your enjoyment of the
- library or against infringement. There is no warranty that our
- efforts or the library will fulfill any of your particular purposes
- or needs. This library is provided with all faults, and the entire
- risk of satisfactory quality, performance, accuracy, and effort is with
- the user.
-
-libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
-Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are
-distributed according to the same disclaimer and license as libpng-0.96,
-with the following individuals added to the list of Contributing Authors:
-
- Tom Lane
- Glenn Randers-Pehrson
- Willem van Schaik
-
-libpng versions 0.89, June 1996, through 0.96, May 1997, are
-Copyright (c) 1996, 1997 Andreas Dilger
-Distributed according to the same disclaimer and license as libpng-0.88,
-with the following individuals added to the list of Contributing Authors:
-
- John Bowler
- Kevin Bracey
- Sam Bushell
- Magnus Holmgren
- Greg Roelofs
- Tom Tanner
-
-libpng versions 0.5, May 1995, through 0.88, January 1996, are
-Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
-
-For the purposes of this copyright and license, "Contributing Authors"
-is defined as the following set of individuals:
-
- Andreas Dilger
- Dave Martindale
- Guy Eric Schalnat
- Paul Schmidt
- Tim Wegner
-
-The PNG Reference Library is supplied "AS IS". The Contributing Authors
-and Group 42, Inc. disclaim all warranties, expressed or implied,
-including, without limitation, the warranties of merchantability and of
-fitness for any purpose. The Contributing Authors and Group 42, Inc.
-assume no liability for direct, indirect, incidental, special, exemplary,
-or consequential damages, which may result from the use of the PNG
-Reference Library, even if advised of the possibility of such damage.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-source code, or portions hereof, for any purpose, without fee, subject
-to the following restrictions:
-
-1. The origin of this source code must not be misrepresented.
-
-2. Altered versions must be plainly marked as such and must not
- be misrepresented as being the original source.
-
-3. This Copyright notice may not be removed or altered from any
- source or altered source distribution.
-
-The Contributing Authors and Group 42, Inc. specifically permit, without
-fee, and encourage the use of this source code as a component to
-supporting the PNG file format in commercial products. If you use this
-source code in a product, acknowledgment is not required but would be
-appreciated.
-
-
-A "png_get_copyright" function is available, for convenient use in "about"
-boxes and the like:
-
- printf("%s",png_get_copyright(NULL));
-
-Also, the PNG logo (in PNG format, of course) is supplied in the
-files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
-
-Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a
-certification mark of the Open Source Initiative.
-
-Glenn Randers-Pehrson
-glennrp at users.sourceforge.net
-December 22, 2014
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to GIFLIB 5.1.1 & libungif 4.1.3, which may be
-included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-The GIFLIB distribution is Copyright (c) 1997 Eric S. Raymond
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Little CMS 2.7, which may be
-included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-Little CMS
-Copyright (c) 1998-2015 Marti Maria Saguer
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% Lucida is a registered trademark or trademark of Bigelow & Holmes in the
-U.S. and other countries.
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Mesa 3D Graphics Library v4.1,
-which may be included with JRE 8, JDK 8, and OpenJDK 8 source distributions.
-
---- begin of LICENSE ---
-
- Mesa 3-D graphics library
- Version: 4.1
-
- Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
-
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the "Software"),
- to deal in the Software without restriction, including without limitation
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Mozilla Network Security
-Services (NSS), which is supplied with the JDK test suite in the OpenJDK
-source code repository. It is licensed under Mozilla Public License (MPL),
-version 2.0.
-
-The NSS libraries are supplied in executable form, built from unmodified
-NSS source code labeled with the "NSS_3_16_RTM" HG tag.
-
-The NSS source code is available in the OpenJDK source code repository at:
- jdk/test/sun/security/pkcs11/nss/src
-
-The NSS libraries are available in the OpenJDK source code repository at:
- jdk/test/sun/security/pkcs11/nss/lib
-
---- begin of LICENSE ---
-
-Mozilla Public License Version 2.0
-==================================
-
-1. Definitions
---------------
-
-1.1. "Contributor"
- means each individual or legal entity that creates, contributes to
- the creation of, or owns Covered Software.
-
-1.2. "Contributor Version"
- means the combination of the Contributions of others (if any) used
- by a Contributor and that particular Contributor's Contribution.
-
-1.3. "Contribution"
- means Covered Software of a particular Contributor.
-
-1.4. "Covered Software"
- means Source Code Form to which the initial Contributor has attached
- the notice in Exhibit A, the Executable Form of such Source Code
- Form, and Modifications of such Source Code Form, in each case
- including portions thereof.
-
-1.5. "Incompatible With Secondary Licenses"
- means
-
- (a) that the initial Contributor has attached the notice described
- in Exhibit B to the Covered Software; or
-
- (b) that the Covered Software was made available under the terms of
- version 1.1 or earlier of the License, but not also under the
- terms of a Secondary License.
-
-1.6. "Executable Form"
- means any form of the work other than Source Code Form.
-
-1.7. "Larger Work"
- means a work that combines Covered Software with other material, in
- a separate file or files, that is not Covered Software.
-
-1.8. "License"
- means this document.
-
-1.9. "Licensable"
- means having the right to grant, to the maximum extent possible,
- whether at the time of the initial grant or subsequently, any and
- all of the rights conveyed by this License.
-
-1.10. "Modifications"
- means any of the following:
-
- (a) any file in Source Code Form that results from an addition to,
- deletion from, or modification of the contents of Covered
- Software; or
-
- (b) any new file in Source Code Form that contains any Covered
- Software.
-
-1.11. "Patent Claims" of a Contributor
- means any patent claim(s), including without limitation, method,
- process, and apparatus claims, in any patent Licensable by such
- Contributor that would be infringed, but for the grant of the
- License, by the making, using, selling, offering for sale, having
- made, import, or transfer of either its Contributions or its
- Contributor Version.
-
-1.12. "Secondary License"
- means either the GNU General Public License, Version 2.0, the GNU
- Lesser General Public License, Version 2.1, the GNU Affero General
- Public License, Version 3.0, or any later versions of those
- licenses.
-
-1.13. "Source Code Form"
- means the form of the work preferred for making modifications.
-
-1.14. "You" (or "Your")
- means an individual or a legal entity exercising rights under this
- License. For legal entities, "You" includes any entity that
- controls, is controlled by, or is under common control with You. For
- purposes of this definition, "control" means (a) the power, direct
- or indirect, to cause the direction or management of such entity,
- whether by contract or otherwise, or (b) ownership of more than
- fifty percent (50%) of the outstanding shares or beneficial
- ownership of such entity.
-
-2. License Grants and Conditions
---------------------------------
-
-2.1. Grants
-
-Each Contributor hereby grants You a world-wide, royalty-free,
-non-exclusive license:
-
-(a) under intellectual property rights (other than patent or trademark)
- Licensable by such Contributor to use, reproduce, make available,
- modify, display, perform, distribute, and otherwise exploit its
- Contributions, either on an unmodified basis, with Modifications, or
- as part of a Larger Work; and
-
-(b) under Patent Claims of such Contributor to make, use, sell, offer
- for sale, have made, import, and otherwise transfer either its
- Contributions or its Contributor Version.
-
-2.2. Effective Date
-
-The licenses granted in Section 2.1 with respect to any Contribution
-become effective for each Contribution on the date the Contributor first
-distributes such Contribution.
-
-2.3. Limitations on Grant Scope
-
-The licenses granted in this Section 2 are the only rights granted under
-this License. No additional rights or licenses will be implied from the
-distribution or licensing of Covered Software under this License.
-Notwithstanding Section 2.1(b) above, no patent license is granted by a
-Contributor:
-
-(a) for any code that a Contributor has removed from Covered Software;
- or
-
-(b) for infringements caused by: (i) Your and any other third party's
- modifications of Covered Software, or (ii) the combination of its
- Contributions with other software (except as part of its Contributor
- Version); or
-
-(c) under Patent Claims infringed by Covered Software in the absence of
- its Contributions.
-
-This License does not grant any rights in the trademarks, service marks,
-or logos of any Contributor (except as may be necessary to comply with
-the notice requirements in Section 3.4).
-
-2.4. Subsequent Licenses
-
-No Contributor makes additional grants as a result of Your choice to
-distribute the Covered Software under a subsequent version of this
-License (see Section 10.2) or under the terms of a Secondary License (if
-permitted under the terms of Section 3.3).
-
-2.5. Representation
-
-Each Contributor represents that the Contributor believes its
-Contributions are its original creation(s) or it has sufficient rights
-to grant the rights to its Contributions conveyed by this License.
-
-2.6. Fair Use
-
-This License is not intended to limit any rights You have under
-applicable copyright doctrines of fair use, fair dealing, or other
-equivalents.
-
-2.7. Conditions
-
-Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
-in Section 2.1.
-
-3. Responsibilities
--------------------
-
-3.1. Distribution of Source Form
-
-All distribution of Covered Software in Source Code Form, including any
-Modifications that You create or to which You contribute, must be under
-the terms of this License. You must inform recipients that the Source
-Code Form of the Covered Software is governed by the terms of this
-License, and how they can obtain a copy of this License. You may not
-attempt to alter or restrict the recipients' rights in the Source Code
-Form.
-
-3.2. Distribution of Executable Form
-
-If You distribute Covered Software in Executable Form then:
-
-(a) such Covered Software must also be made available in Source Code
- Form, as described in Section 3.1, and You must inform recipients of
- the Executable Form how they can obtain a copy of such Source Code
- Form by reasonable means in a timely manner, at a charge no more
- than the cost of distribution to the recipient; and
-
-(b) You may distribute such Executable Form under the terms of this
- License, or sublicense it under different terms, provided that the
- license for the Executable Form does not attempt to limit or alter
- the recipients' rights in the Source Code Form under this License.
-
-3.3. Distribution of a Larger Work
-
-You may create and distribute a Larger Work under terms of Your choice,
-provided that You also comply with the requirements of this License for
-the Covered Software. If the Larger Work is a combination of Covered
-Software with a work governed by one or more Secondary Licenses, and the
-Covered Software is not Incompatible With Secondary Licenses, this
-License permits You to additionally distribute such Covered Software
-under the terms of such Secondary License(s), so that the recipient of
-the Larger Work may, at their option, further distribute the Covered
-Software under the terms of either this License or such Secondary
-License(s).
-
-3.4. Notices
-
-You may not remove or alter the substance of any license notices
-(including copyright notices, patent notices, disclaimers of warranty,
-or limitations of liability) contained within the Source Code Form of
-the Covered Software, except that You may alter any license notices to
-the extent required to remedy known factual inaccuracies.
-
-3.5. Application of Additional Terms
-
-You may choose to offer, and to charge a fee for, warranty, support,
-indemnity or liability obligations to one or more recipients of Covered
-Software. However, You may do so only on Your own behalf, and not on
-behalf of any Contributor. You must make it absolutely clear that any
-such warranty, support, indemnity, or liability obligation is offered by
-You alone, and You hereby agree to indemnify every Contributor for any
-liability incurred by such Contributor as a result of warranty, support,
-indemnity or liability terms You offer. You may include additional
-disclaimers of warranty and limitations of liability specific to any
-jurisdiction.
-
-4. Inability to Comply Due to Statute or Regulation
----------------------------------------------------
-
-If it is impossible for You to comply with any of the terms of this
-License with respect to some or all of the Covered Software due to
-statute, judicial order, or regulation then You must: (a) comply with
-the terms of this License to the maximum extent possible; and (b)
-describe the limitations and the code they affect. Such description must
-be placed in a text file included with all distributions of the Covered
-Software under this License. Except to the extent prohibited by statute
-or regulation, such description must be sufficiently detailed for a
-recipient of ordinary skill to be able to understand it.
-
-5. Termination
---------------
-
-5.1. The rights granted under this License will terminate automatically
-if You fail to comply with any of its terms. However, if You become
-compliant, then the rights granted under this License from a particular
-Contributor are reinstated (a) provisionally, unless and until such
-Contributor explicitly and finally terminates Your grants, and (b) on an
-ongoing basis, if such Contributor fails to notify You of the
-non-compliance by some reasonable means prior to 60 days after You have
-come back into compliance. Moreover, Your grants from a particular
-Contributor are reinstated on an ongoing basis if such Contributor
-notifies You of the non-compliance by some reasonable means, this is the
-first time You have received notice of non-compliance with this License
-from such Contributor, and You become compliant prior to 30 days after
-Your receipt of the notice.
-
-5.2. If You initiate litigation against any entity by asserting a patent
-infringement claim (excluding declaratory judgment actions,
-counter-claims, and cross-claims) alleging that a Contributor Version
-directly or indirectly infringes any patent, then the rights granted to
-You by any and all Contributors for the Covered Software under Section
-2.1 of this License shall terminate.
-
-5.3. In the event of termination under Sections 5.1 or 5.2 above, all
-end user license agreements (excluding distributors and resellers) which
-have been validly granted by You or Your distributors under this License
-prior to termination shall survive termination.
-
-************************************************************************
-* *
-* 6. Disclaimer of Warranty *
-* ------------------------- *
-* *
-* Covered Software is provided under this License on an "as is" *
-* basis, without warranty of any kind, either expressed, implied, or *
-* statutory, including, without limitation, warranties that the *
-* Covered Software is free of defects, merchantable, fit for a *
-* particular purpose or non-infringing. The entire risk as to the *
-* quality and performance of the Covered Software is with You. *
-* Should any Covered Software prove defective in any respect, You *
-* (not any Contributor) assume the cost of any necessary servicing, *
-* repair, or correction. This disclaimer of warranty constitutes an *
-* essential part of this License. No use of any Covered Software is *
-* authorized under this License except under this disclaimer. *
-* *
-************************************************************************
-
-************************************************************************
-* *
-* 7. Limitation of Liability *
-* -------------------------- *
-* *
-* Under no circumstances and under no legal theory, whether tort *
-* (including negligence), contract, or otherwise, shall any *
-* Contributor, or anyone who distributes Covered Software as *
-* permitted above, be liable to You for any direct, indirect, *
-* special, incidental, or consequential damages of any character *
-* including, without limitation, damages for lost profits, loss of *
-* goodwill, work stoppage, computer failure or malfunction, or any *
-* and all other commercial damages or losses, even if such party *
-* shall have been informed of the possibility of such damages. This *
-* limitation of liability shall not apply to liability for death or *
-* personal injury resulting from such party's negligence to the *
-* extent applicable law prohibits such limitation. Some *
-* jurisdictions do not allow the exclusion or limitation of *
-* incidental or consequential damages, so this exclusion and *
-* limitation may not apply to You. *
-* *
-************************************************************************
-
-8. Litigation
--------------
-
-Any litigation relating to this License may be brought only in the
-courts of a jurisdiction where the defendant maintains its principal
-place of business and such litigation shall be governed by laws of that
-jurisdiction, without reference to its conflict-of-law provisions.
-Nothing in this Section shall prevent a party's ability to bring
-cross-claims or counter-claims.
-
-9. Miscellaneous
-----------------
-
-This License represents the complete agreement concerning the subject
-matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the extent
-necessary to make it enforceable. Any law or regulation which provides
-that the language of a contract shall be construed against the drafter
-shall not be used to construe this License against a Contributor.
-
-10. Versions of the License
----------------------------
-
-10.1. New Versions
-
-Mozilla Foundation is the license steward. Except as provided in Section
-10.3, no one other than the license steward has the right to modify or
-publish new versions of this License. Each version will be given a
-distinguishing version number.
-
-10.2. Effect of New Versions
-
-You may distribute the Covered Software under the terms of the version
-of the License under which You originally received the Covered Software,
-or under the terms of any subsequent version published by the license
-steward.
-
-10.3. Modified Versions
-
-If you create software not governed by this License, and you want to
-create a new license for such software, you may create and use a
-modified version of this License if you rename the license and remove
-any references to the name of the license steward (except to note that
-such modified license differs from this License).
-
-10.4. Distributing Source Code Form that is Incompatible With Secondary
-Licenses
-
-If You choose to distribute Source Code Form that is Incompatible With
-Secondary Licenses under the terms of this version of the License, the
-notice described in Exhibit B of this License must be attached.
-
-Exhibit A - Source Code Form License Notice
--------------------------------------------
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-If it is not possible or desirable to put the notice in a particular
-file, then You may include the notice in a location (such as a LICENSE
-file in a relevant directory) where a recipient would be likely to look
-for such a notice.
-
-You may add additional accurate notices of copyright ownership.
-
-Exhibit B - "Incompatible With Secondary Licenses" Notice
----------------------------------------------------------
-
- This Source Code Form is "Incompatible With Secondary Licenses", as
- defined by the Mozilla Public License, v. 2.0.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to PC/SC Lite for Suse Linux v.1.1.1,
-which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
-
---- begin of LICENSE ---
-
-Copyright (c) 1999-2004 David Corcoran <corcoran@linuxnet.com>
-Copyright (c) 1999-2004 Ludovic Rousseau <ludovic.rousseau (at) free.fr>
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software
- must display the following acknowledgement:
- This product includes software developed by:
- David Corcoran <corcoran@linuxnet.com>
- http://www.linuxnet.com (MUSCLE)
-4. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-Changes to this license can be made only by the copyright author with
-explicit written consent.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to PorterStemmer v4, which may be
-included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-See: http://tartarus.org/~martin/PorterStemmer
-
-The software is completely free for any purpose, unless notes at the head of
-the program text indicates otherwise (which is rare). In any case, the notes
-about licensing are never more restrictive than the BSD License.
-
-In every case where the software is not written by me (Martin Porter), this
-licensing arrangement has been endorsed by the contributor, and it is
-therefore unnecessary to ask the contributor again to confirm it.
-
-I have not asked any contributors (or their employers, if they have them) for
-proofs that they have the right to distribute their software in this way.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Relax NG Object/Parser v.20050510,
-which may be included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-Copyright (c) Kohsuke Kawaguchi
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions: The above copyright
-notice and this permission notice shall be included in all copies or
-substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to RelaxNGCC v1.12, which may be
-included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-Copyright (c) 2000-2003 Daisuke Okajima and Kohsuke Kawaguchi.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment:
-
- "This product includes software developed by Daisuke Okajima
- and Kohsuke Kawaguchi (http://relaxngcc.sf.net/)."
-
-Alternately, this acknowledgment may appear in the software itself, if and
-wherever such third-party acknowledgments normally appear.
-
-4. The names of the copyright holders must not be used to endorse or promote
- products derived from this software without prior written permission. For
- written permission, please contact the copyright holders.
-
-5. Products derived from this software may not be called "RELAXNGCC", nor may
- "RELAXNGCC" appear in their name, without prior written permission of the
- copyright holders.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.IN NO EVENT SHALL THE APACHE
-SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to SAX 2.0.1, which may be included
-with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
- SAX is free!
-
- In fact, it's not possible to own a license to SAX, since it's been placed in
- the public domain.
-
- No Warranty
-
- Because SAX is released to the public domain, there is no warranty for the
- design or for the software implementation, to the extent permitted by
- applicable law. Except when otherwise stated in writing the copyright holders
- and/or other parties provide SAX "as is" without warranty of any kind, either
- expressed or implied, including, but not limited to, the implied warranties
- of merchantability and fitness for a particular purpose. The entire risk as
- to the quality and performance of SAX is with you. Should SAX prove
- defective, you assume the cost of all necessary servicing, repair or
- correction.
-
- In no event unless required by applicable law or agreed to in writing will
- any copyright holder, or any other party who may modify and/or redistribute
- SAX, be liable to you for damages, including any general, special, incidental
- or consequential damages arising out of the use or inability to use SAX
- (including but not limited to loss of data or data being rendered inaccurate
- or losses sustained by you or third parties or a failure of the SAX to
- operate with any other programs), even if such holder or other party has been
- advised of the possibility of such damages.
-
- Copyright Disclaimers
-
- This page includes statements to that effect by David Megginson, who would
- have been able to claim copyright for the original work. SAX 1.0
-
- Version 1.0 of the Simple API for XML (SAX), created collectively by the
- membership of the XML-DEV mailing list, is hereby released into the public
- domain.
-
- No one owns SAX: you may use it freely in both commercial and non-commercial
- applications, bundle it with your software distribution, include it on a
- CD-ROM, list the source code in a book, mirror the documentation at your own
- web site, or use it in any other way you see fit.
-
- David Megginson, sax@megginson.com
- 1998-05-11
-
- SAX 2.0
-
- I hereby abandon any property rights to SAX 2.0 (the Simple API for XML), and
- release all of the SAX 2.0 source code, compiled code, and documentation
- contained in this distribution into the Public Domain. SAX comes with NO
- WARRANTY or guarantee of fitness for any purpose.
-
- David Megginson, david@megginson.com
- 2000-05-05
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to SoftFloat version 2b, which may be
-included with JRE 8, JDK 8, and OpenJDK 8 on Linux/ARM.
-
---- begin of LICENSE ---
-
-Use of any of this software is governed by the terms of the license below:
-
-SoftFloat was written by me, John R. Hauser. This work was made possible in
-part by the International Computer Science Institute, located at Suite 600,
-1947 Center Street, Berkeley, California 94704. Funding was partially
-provided by the National Science Foundation under grant MIP-9311980. The
-original version of this code was written as part of a project to build
-a fixed-point vector processor in collaboration with the University of
-California at Berkeley, overseen by Profs. Nelson Morgan and John Wawrzynek.
-
-THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort
-has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
-TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO
-PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL
-LOSSES, COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO
-FURTHERMORE EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER
-SCIENCE INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES,
-COSTS, OR OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE
-SOFTWARE.
-
-Derivative works are acceptable, even for commercial purposes, provided
-that the minimal documentation requirements stated in the source code are
-satisfied.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Sparkle 1.5,
-which may be included with JRE 8 on Mac OS X.
-
---- begin of LICENSE ---
-
-Copyright (c) 2012 Sparkle.org and Andy Matuschak
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% Portions licensed from Taligent, Inc.
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Thai Dictionary, which may be
-included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-Copyright (C) 1982 The Royal Institute, Thai Royal Government.
-
-Copyright (C) 1998 National Electronics and Computer Technology Center,
-National Science and Technology Development Agency,
-Ministry of Science Technology and Environment,
-Thai Royal Government.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Unicode 6.2.0 & CLDR 21.0.1
-which may be included with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
-Unicode Terms of Use
-
-For the general privacy policy governing access to this site, see the Unicode
-Privacy Policy. For trademark usage, see the Unicode® Consortium Name and
-Trademark Usage Policy.
-
-A. Unicode Copyright.
- 1. Copyright © 1991-2013 Unicode, Inc. All rights reserved.
-
- 2. Certain documents and files on this website contain a legend indicating
- that "Modification is permitted." Any person is hereby authorized,
- without fee, to modify such documents and files to create derivative
- works conforming to the Unicode® Standard, subject to Terms and
- Conditions herein.
-
- 3. Any person is hereby authorized, without fee, to view, use, reproduce,
- and distribute all documents and files solely for informational
- purposes in the creation of products supporting the Unicode Standard,
- subject to the Terms and Conditions herein.
-
- 4. Further specifications of rights and restrictions pertaining to the use
- of the particular set of data files known as the "Unicode Character
- Database" can be found in Exhibit 1.
-
- 5. Each version of the Unicode Standard has further specifications of
- rights and restrictions of use. For the book editions (Unicode 5.0 and
- earlier), these are found on the back of the title page. The online
- code charts carry specific restrictions. All other files, including
- online documentation of the core specification for Unicode 6.0 and
- later, are covered under these general Terms of Use.
-
- 6. No license is granted to "mirror" the Unicode website where a fee is
- charged for access to the "mirror" site.
-
- 7. Modification is not permitted with respect to this document. All copies
- of this document must be verbatim.
-
-B. Restricted Rights Legend. Any technical data or software which is licensed
- to the United States of America, its agencies and/or instrumentalities
- under this Agreement is commercial technical data or commercial computer
- software developed exclusively at private expense as defined in FAR 2.101,
- or DFARS 252.227-7014 (June 1995), as applicable. For technical data, use,
- duplication, or disclosure by the Government is subject to restrictions as
- set forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov
- 1995) and this Agreement. For Software, in accordance with FAR 12-212 or
- DFARS 227-7202, as applicable, use, duplication or disclosure by the
- Government is subject to the restrictions set forth in this Agreement.
-
-C. Warranties and Disclaimers.
- 1. This publication and/or website may include technical or typographical
- errors or other inaccuracies . Changes are periodically added to the
- information herein; these changes will be incorporated in new editions
- of the publication and/or website. Unicode may make improvements and/or
- changes in the product(s) and/or program(s) described in this
- publication and/or website at any time.
-
- 2. If this file has been purchased on magnetic or optical media from
- Unicode, Inc. the sole and exclusive remedy for any claim will be
- exchange of the defective media within ninety (90) days of original
- purchase.
-
- 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR SOFTWARE IS
- PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED,
- OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
- UNICODE AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR
- OMISSIONS IN THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH
- ARE REFERENCED BY OR LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE.
-
-D. Waiver of Damages. In no event shall Unicode or its licensors be liable for
- any special, incidental, indirect or consequential damages of any kind, or
- any damages whatsoever, whether or not Unicode was advised of the
- possibility of the damage, including, without limitation, those resulting
- from the following: loss of use, data or profits, in connection with the
- use, modification or distribution of this information or its derivatives.
-
-E.Trademarks & Logos.
- 1. The Unicode Word Mark and the Unicode Logo are trademarks of Unicode,
- Inc. “The Unicode Consortium” and “Unicode, Inc.” are trade names of
- Unicode, Inc. Use of the information and materials found on this
- website indicates your acknowledgement of Unicode, Inc.’s exclusive
- worldwide rights in the Unicode Word Mark, the Unicode Logo, and the
- Unicode trade names.
-
- 2. The Unicode Consortium Name and Trademark Usage Policy (“Trademark
- Policy”) are incorporated herein by reference and you agree to abide by
- the provisions of the Trademark Policy, which may be changed from time
- to time in the sole discretion of Unicode, Inc.
-
- 3. All third party trademarks referenced herein are the property of their
- respective owners.
-
-Miscellaneous.
- 1. Jurisdiction and Venue. This server is operated from a location in the
- State of California, United States of America. Unicode makes no
- representation that the materials are appropriate for use in other
- locations. If you access this server from other locations, you are
- responsible for compliance with local laws. This Agreement, all use of
- this site and any claims and damages resulting from use of this site are
- governed solely by the laws of the State of California without regard to
- any principles which would apply the laws of a different jurisdiction.
- The user agrees that any disputes regarding this site shall be resolved
- solely in the courts located in Santa Clara County, California. The user
- agrees said courts have personal jurisdiction and agree to waive any
- right to transfer the dispute to any other forum.
-
- 2. Modification by Unicode. Unicode shall have the right to modify this
- Agreement at any time by posting it to this site. The user may not
- assign any part of this Agreement without Unicode’s prior written
- consent.
-
- 3. Taxes. The user agrees to pay any taxes arising from access to this
- website or use of the information herein, except for those based on
- Unicode’s net income.
-
- 4. Severability. If any provision of this Agreement is declared invalid or
- unenforceable, the remaining provisions of this Agreement shall remain
- in effect.
-
- 5. Entire Agreement. This Agreement constitutes the entire agreement
- between the parties.
-
-EXHIBIT 1
-UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
-
-Unicode Data Files include all data files under the directories
-http://www.unicode.org/Public/, http://www.unicode.org/reports/, and
-http://www.unicode.org/cldr/data/. Unicode Data Files do not include PDF
-online code charts under the directory http://www.unicode.org/Public/.
-Software includes any source code published in the Unicode Standard or under
-the directories http://www.unicode.org/Public/,
-http://www.unicode.org/reports/, and http://www.unicode.org/cldr/data/.
-
-NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING,
-INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES ("DATA
-FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO
-BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT
-AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR
-SOFTWARE.
-
-COPYRIGHT AND PERMISSION NOTICE
-
-Copyright © 1991-2012 Unicode, Inc. All rights reserved. Distributed under the
-Terms of Use in http://www.unicode.org/copyright.html.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of the Unicode data files and any associated documentation (the "Data Files")
-or Unicode software and any associated documentation (the "Software") to deal
-in the Data Files or Software without restriction, including without
-limitation the rights to use, copy, modify, merge, publish, distribute, and/or
-sell copies of the Data Files or Software, and to permit persons to whom the
-Data Files or Software are furnished to do so, provided that (a) the above
-copyright notice(s) and this permission notice appear with all copies of the
-Data Files or Software, (b) both the above copyright notice(s) and this
-permission notice appear in associated documentation, and (c) there is clear
-notice in each modified Data File or in the Software as well as in the
-documentation associated with the Data File(s) or Software that the data or
-software has been modified.
-
-THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD
-PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
-THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
-DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE
-DATA FILES OR SOFTWARE.
-
-Except as contained in this notice, the name of a copyright holder shall not
-be used in advertising or otherwise to promote the sale, use or other dealings
-in these Data Files or Software without prior written authorization of the
-copyright holder.
-
-Unicode and the Unicode logo are trademarks of Unicode, Inc. in the United
-States and other countries. All third party trademarks referenced herein are
-the property of their respective owners.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to UPX v3.01, which may be included
-with JRE 8 on Windows.
-
---- begin of LICENSE ---
-
-Use of any of this software is governed by the terms of the license below:
-
-
- ooooo ooo ooooooooo. ooooooo ooooo
- `888' `8' `888 `Y88. `8888 d8'
- 888 8 888 .d88' Y888..8P
- 888 8 888ooo88P' `8888'
- 888 8 888 .8PY888.
- `88. .8' 888 d8' `888b
- `YbodP' o888o o888o o88888o
-
-
- The Ultimate Packer for eXecutables
- Copyright (c) 1996-2000 Markus Oberhumer & Laszlo Molnar
- http://wildsau.idv.uni-linz.ac.at/mfx/upx.html
- http://www.nexus.hu/upx
- http://upx.tsx.org
-
-
-PLEASE CAREFULLY READ THIS LICENSE AGREEMENT, ESPECIALLY IF YOU PLAN
-TO MODIFY THE UPX SOURCE CODE OR USE A MODIFIED UPX VERSION.
-
-
-ABSTRACT
-========
-
- UPX and UCL are copyrighted software distributed under the terms
- of the GNU General Public License (hereinafter the "GPL").
-
- The stub which is imbedded in each UPX compressed program is part
- of UPX and UCL, and contains code that is under our copyright. The
- terms of the GNU General Public License still apply as compressing
- a program is a special form of linking with our stub.
-
- As a special exception we grant the free usage of UPX for all
- executables, including commercial programs.
- See below for details and restrictions.
-
-
-COPYRIGHT
-=========
-
- UPX and UCL are copyrighted software. All rights remain with the authors.
-
- UPX is Copyright (C) 1996-2000 Markus Franz Xaver Johannes Oberhumer
- UPX is Copyright (C) 1996-2000 Laszlo Molnar
-
- UCL is Copyright (C) 1996-2000 Markus Franz Xaver Johannes Oberhumer
-
-
-GNU GENERAL PUBLIC LICENSE
-==========================
-
- UPX and the UCL library are free software; you can redistribute them
- and/or modify them under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
-
- UPX and UCL are distributed in the hope that they will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING.
-
-
-SPECIAL EXCEPTION FOR COMPRESSED EXECUTABLES
-============================================
-
- The stub which is imbedded in each UPX compressed program is part
- of UPX and UCL, and contains code that is under our copyright. The
- terms of the GNU General Public License still apply as compressing
- a program is a special form of linking with our stub.
-
- Hereby Markus F.X.J. Oberhumer and Laszlo Molnar grant you special
- permission to freely use and distribute all UPX compressed programs
- (including commercial ones), subject to the following restrictions:
-
- 1. You must compress your program with a completely unmodified UPX
- version; either with our precompiled version, or (at your option)
- with a self compiled version of the unmodified UPX sources as
- distributed by us.
- 2. This also implies that the UPX stub must be completely unmodfied, i.e.
- the stub imbedded in your compressed program must be byte-identical
- to the stub that is produced by the official unmodified UPX version.
- 3. The decompressor and any other code from the stub must exclusively get
- used by the unmodified UPX stub for decompressing your program at
- program startup. No portion of the stub may get read, copied,
- called or otherwise get used or accessed by your program.
-
-
-ANNOTATIONS
-===========
-
- - You can use a modified UPX version or modified UPX stub only for
- programs that are compatible with the GNU General Public License.
-
- - We grant you special permission to freely use and distribute all UPX
- compressed programs. But any modification of the UPX stub (such as,
- but not limited to, removing our copyright string or making your
- program non-decompressible) will immediately revoke your right to
- use and distribute a UPX compressed program.
-
- - UPX is not a software protection tool; by requiring that you use
- the unmodified UPX version for your proprietary programs we
- make sure that any user can decompress your program. This protects
- both you and your users as nobody can hide malicious code -
- any program that cannot be decompressed is highly suspicious
- by definition.
-
- - You can integrate all or part of UPX and UCL into projects that
- are compatible with the GNU GPL, but obviously you cannot grant
- any special exceptions beyond the GPL for our code in your project.
-
- - We want to actively support manufacturers of virus scanners and
- similar security software. Please contact us if you would like to
- incorporate parts of UPX or UCL into such a product.
-
-
-
-Markus F.X.J. Oberhumer Laszlo Molnar
-markus.oberhumer@jk.uni-linz.ac.at ml1050@cdata.tvnet.hu
-
-Linz, Austria, 25 Feb 2000
-
-Additional License(s)
-
-The UPX license file is at http://upx.sourceforge.net/upx-license.html.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to Xfree86-VidMode Extension 1.0,
-which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
-
---- begin of LICENSE ---
-
-Version 1.1 of XFree86 ProjectLicence.
-
-Copyright (C) 1994-2004 The XFree86 Project, Inc. All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicence, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so,subject to the following conditions:
-
- 1. Redistributions of source code must retain the above copyright
- notice,this list of conditions, and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution, and in the same place
- and form as other copyright, license and disclaimer information.
-
- 3. The end-user documentation included with the redistribution, if any,must
- include the following acknowledgment: "This product includes
- software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and
- its contributors", in the same place and form as other third-party
- acknowledgments. Alternately, this acknowledgment may appear in the software
- itself, in the same form and location as other such third-party
- acknowledgments.
-
- 4. Except as contained in this notice, the name of The XFree86 Project,Inc
- shall not be used in advertising or otherwise to promote the sale, use
- or other dealings in this Software without prior written authorization from
- The XFree86 Project, Inc.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL,SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO,PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- DAMAGE.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to X Window System 6.8.2, which may be
-included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
-
---- begin of LICENSE ---
-
- Licenses
-The X.Org Foundation March 2004
-
-1. Introduction
-
-The X.org Foundation X Window System distribution is a compilation of code and
-documentation from many sources. This document is intended primarily as a
-guide to the licenses used in the distribution: you must check each file
-and/or package for precise redistribution terms. None-the-less, this summary
-may be useful to many users. No software incorporating the XFree86 1.1 license
-has been incorporated.
-
-This document is based on the compilation from XFree86.
-
-2. XFree86 License
-
-XFree86 code without an explicit copyright is covered by the following
-copyright/license:
-
-Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the XFree86 Project shall not
-be used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the XFree86 Project.
-
-3. Other Licenses
-
-Portions of code are covered by the following licenses/copyrights. See
-individual files for the copyright dates.
-
-3.1. X/MIT Copyrights
-
-3.1.1. X Consortium
-
-Copyright (C) <date> X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X
-CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall not be
-used in advertising or otherwise to promote the sale, use or other dealings in
-this Software without prior written authorization from the X Consortium.
-
-X Window System is a trademark of X Consortium, Inc.
-
-3.1.2. The Open Group
-
-Copyright <date> The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that the
-above copyright notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting documentation.
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings in
-this Software without prior written authorization from The Open Group. 3.2.
-Berkeley-based copyrights:
-
-o
-3.2.1. General
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE. 3.2.2. UCB/LBL
-
-Copyright (c) 1993 The Regents of the University of California. All rights
-reserved.
-
-This software was developed by the Computer Systems Engineering group at
-Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and contributed to
-Berkeley.
-
-All advertising materials mentioning features or use of this software must
-display the following acknowledgement: This product includes software
-developed by the University of California, Lawrence Berkeley Laboratory.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. All advertising materials mentioning features or use of this software
- must display the following acknowledgement: This product includes software
- developed by the University of California, Berkeley and its contributors.
-
- 4. Neither the name of the University nor the names of its contributors may
- be used to endorse or promote products derived from this software without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3.2.3. The
-NetBSD Foundation, Inc.
-
-Copyright (c) 2003 The NetBSD Foundation, Inc. All rights reserved.
-
-This code is derived from software contributed to The NetBSD Foundation by Ben
-Collver <collver1@attbi.com>
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. All advertising materials mentioning features or use of this software
- must display the following acknowledgement: This product includes software
- developed by the NetBSD Foundation, Inc. and its contributors.
-
- 4. Neither the name of The NetBSD Foundation nor the names of its
- contributors may be used to endorse or promote products derived from this
- software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS ``AS
-IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3.2.4. Theodore
-Ts'o.
-
-Copyright Theodore Ts'o, 1994, 1995, 1996, 1997, 1998, 1999. All rights
-reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- and the entire permission notice in its entirety, including the disclaimer
- of warranties.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. he name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE, ALL OF WHICH ARE HEREBY DISCLAIMED. IN NO
-EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE. 3.2.5. Theo de Raadt and Damien Miller
-
-Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. Copyright (c)
-2001-2002 Damien Miller. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE. 3.2.6. Todd C. Miller
-
-Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
-
-Permission to use, copy, modify, and distribute this software for any purpose
-with or without fee is hereby granted, provided that the above copyright
-notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
-OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 3.2.7. Thomas
-Winischhofer
-
-Copyright (C) 2001-2004 Thomas Winischhofer
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE. 3.3. NVIDIA Corp
-
-Copyright (c) 1996 NVIDIA, Corp. All rights reserved.
-
-NOTICE TO USER: The source code is copyrighted under U.S. and international
-laws. NVIDIA, Corp. of Sunnyvale, California owns the copyright and as design
-patents pending on the design and interface of the NV chips. Users and
-possessors of this source code are hereby granted a nonexclusive, royalty-free
-copyright and design patent license to use this code in individual and
-commercial software.
-
-Any use of this source code must include, in the user documentation and
-internal comments to the code, notices to the end user as follows:
-
-Copyright (c) 1996 NVIDIA, Corp. NVIDIA design patents pending in the U.S. and
-foreign countries.
-
-NVIDIA, CORP. MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
-CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
-WARRANTY OF ANY KIND. NVIDIA, CORP. DISCLAIMS ALL WARRANTIES WITH REGARD TO
-THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA, CORP. BE LIABLE
-FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
-DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
-CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. 3.4. GLX Public
-License
-
-GLX PUBLIC LICENSE (Version 1.0 (2/11/99)) ("License")
-
-Subject to any third party claims, Silicon Graphics, Inc. ("SGI") hereby
-grants permission to Recipient (defined below), under Recipient's copyrights
-in the Original Software (defined below), to use, copy, modify, merge,
-publish, distribute, sublicense and/or sell copies of Subject Software
-(defined below), and to permit persons to whom the Subject Software is
-furnished in accordance with this License to do the same, subject to all of
-the following terms and conditions, which Recipient accepts by engaging in any
-such use, copying, modifying, merging, publishing, distributing, sublicensing
-or selling:
-
-1. Definitions.
-
- (a) "Original Software" means source code of computer software code which
- is described in Exhibit A as Original Software.
-
- (b) "Modifications" means any addition to or deletion from the substance
- or structure of either the Original Software or any previous
- Modifications. When Subject Software is released as a series of files, a
- Modification means (i) any addition to or deletion from the contents of a
- file containing Original Software or previous Modifications and (ii) any
- new file that contains any part of the Original Code or previous
- Modifications.
-
- (c) "Subject Software" means the Original Software or Modifications or the
- combination of the Original Software and Modifications, or portions of any
- of the foregoing.
-
- (d) "Recipient" means an individual or a legal entity exercising rights
- under, and complying with all of the terms of, this License. For legal
- entities, "Recipient" includes any entity which controls, is controlled
- by, or is under common control with Recipient. For purposes of this
- definition, "control" of an entity means (a) the power, direct or
- indirect, to direct or manage such entity, or (b) ownership of fifty
- percent (50%) or more of the outstanding shares or beneficial ownership of
- such entity.
-
-2. Redistribution of Source Code Subject to These Terms. Redistributions of
-Subject Software in source code form must retain the notice set forth in
-Exhibit A, below, in every file. A copy of this License must be included in
-any documentation for such Subject Software where the recipients' rights
-relating to Subject Software are described. Recipient may distribute the
-source code version of Subject Software under a license of Recipient's choice,
-which may contain terms different from this License, provided that (i)
-Recipient is in compliance with the terms of this License, and (ii) the
-license terms include this Section 2 and Sections 3, 4, 7, 8, 10, 12 and 13 of
-this License, which terms may not be modified or superseded by any other terms
-of such license. If Recipient distributes the source code version under a
-different license Recipient must make it absolutely clear that any terms which
-differ from this License are offered by Recipient alone, not by SGI. Recipient
-hereby agrees to indemnify SGI for any liability incurred by SGI as a result
-of any such terms Recipient offers.
-
-3. Redistribution in Executable Form. The notice set forth in Exhibit A must
-be conspicuously included in any notice in an executable version of Subject
-Software, related documentation or collateral in which Recipient describes the
-user's rights relating to the Subject Software. Recipient may distribute the
-executable version of Subject Software under a license of Recipient's choice,
-which may contain terms different from this License, provided that (i)
-Recipient is in compliance with the terms of this License, and (ii) the
-license terms include this Section 3 and Sections 4, 7, 8, 10, 12 and 13 of
-this License, which terms may not be modified or superseded by any other terms
-of such license. If Recipient distributes the executable version under a
-different license Recipient must make it absolutely clear that any terms which
-differ from this License are offered by Recipient alone, not by SGI. Recipient
-hereby agrees to indemnify SGI for any liability incurred by SGI as a result
-of any such terms Recipient offers.
-
-4. Termination. This License and the rights granted hereunder will terminate
-automatically if Recipient fails to comply with terms herein and fails to cure
-such breach within 30 days of the breach. Any sublicense to the Subject
-Software which is properly granted shall survive any termination of this
-License absent termination by the terms of such sublicense. Provisions which,
-by their nature, must remain in effect beyond the termination of this License
-shall survive.
-
-5. No Trademark Rights. This License does not grant any rights to use any
-trade name, trademark or service mark whatsoever. No trade name, trademark or
-service mark of SGI may be used to endorse or promote products derived from
-the Subject Software without prior written permission of SGI.
-
-6. No Other Rights. This License does not grant any rights with respect to the
-OpenGL API or to any software or hardware implementation thereof or to any
-other software whatsoever, nor shall any other rights or licenses not
-expressly granted hereunder arise by implication, estoppel or otherwise with
-respect to the Subject Software. Title to and ownership of the Original
-Software at all times remains with SGI. All rights in the Original Software
-not expressly granted under this License are reserved.
-
-7. Compliance with Laws; Non-Infringement. Recipient shall comply with all
-applicable laws and regulations in connection with use and distribution of the
-Subject Software, including but not limited to, all export and import control
-laws and regulations of the U.S. government and other countries. Recipient may
-not distribute Subject Software that (i) in any way infringes (directly or
-contributorily) the rights (including patent, copyright, trade secret,
-trademark or other intellectual property rights of any kind) of any other
-person or entity or (ii) breaches any representation or warranty, express,
-implied or statutory, which under any applicable law it might be deemed to
-have been distributed.
-
-8. Claims of Infringement. If Recipient at any time has knowledge of any one
-or more third party claims that reproduction, modification, use, distribution,
-import or sale of Subject Software (including particular functionality or code
-incorporated in Subject Software) infringes the third party's intellectual
-property rights, Recipient must place in a well-identified web page bearing
-the title "LEGAL" a description of each such claim and a description of the
-party making each such claim in sufficient detail that a user of the Subject
-Software will know whom to contact regarding the claim. Also, upon gaining
-such knowledge of any such claim, Recipient must conspicuously include the URL
-for such web page in the Exhibit A notice required under Sections 2 and 3,
-above, and in the text of any related documentation, license agreement or
-collateral in which Recipient describes end user's rights relating to the
-Subject Software. If Recipient obtains such knowledge after it makes Subject
-Software available to any other person or entity, Recipient shall take other
-steps (such as notifying appropriate mailing lists or newsgroups) reasonably
-calculated to inform those who received the Subject Software that new
-knowledge has been obtained.
-
-9. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
-LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS,
-MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON- INFRINGING. SGI ASSUMES NO
-RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE
-PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY
-SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
-ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED
-HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY,
-WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY),
-CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY
-DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
-CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK
-STOPPAGE, LOSS OF DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF
-THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY
-TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SGI's NEGLIGENCE TO
-THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT
-ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
-THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT.
-
-11. Indemnity. Recipient shall be solely responsible for damages arising,
-directly or indirectly, out of its utilization of rights under this License.
-Recipient will defend, indemnify and hold harmless Silicon Graphics, Inc. from
-and against any loss, liability, damages, costs or expenses (including the
-payment of reasonable attorneys fees) arising out of Recipient's use,
-modification, reproduction and distribution of the Subject Software or out of
-any representation or warranty made by Recipient.
-
-12. U.S. Government End Users. The Subject Software is a "commercial item"
-consisting of "commercial computer software" as such terms are defined in
-title 48 of the Code of Federal Regulations and all U.S. Government End Users
-acquire only the rights set forth in this License and are subject to the terms
-of this License.
-
-13. Miscellaneous. This License represents the complete agreement concerning
-subject matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed so as to achieve as nearly as
-possible the same economic effect as the original provision and the remainder
-of this License will remain in effect. This License shall be governed by and
-construed in accordance with the laws of the United States and the State of
-California as applied to agreements entered into and to be performed entirely
-within California between California residents. Any litigation relating to
-this License shall be subject to the exclusive jurisdiction of the Federal
-Courts of the Northern District of California (or, absent subject matter
-jurisdiction in such courts, the courts of the State of California), with
-venue lying exclusively in Santa Clara County, California, with the losing
-party responsible for costs, including without limitation, court costs and
-reasonable attorneys fees and expenses. The application of the United Nations
-Convention on Contracts for the International Sale of Goods is expressly
-excluded. Any law or regulation which provides that the language of a contract
-shall be construed against the drafter shall not apply to this License.
-
-Exhibit A
-
-The contents of this file are subject to Sections 2, 3, 4, 7, 8, 10, 12 and 13
-of the GLX Public License Version 1.0 (the "License"). You may not use this
-file except in compliance with those sections of the License. You may obtain a
-copy of the License at Silicon Graphics, Inc., attn: Legal Services, 2011 N.
-Shoreline Blvd., Mountain View, CA 94043 or at
-http://www.sgi.com/software/opensource/glx/license.html.
-
-Software distributed under the License is distributed on an "AS IS" basis. ALL
-WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED
-WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF NON-
-INFRINGEMENT. See the License for the specific language governing rights and
-limitations under the License.
-
-The Original Software is GLX version 1.2 source code, released February, 1999.
-The developer of the Original Software is Silicon Graphics, Inc. Those
-portions of the Subject Software created by Silicon Graphics, Inc. are
-Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. 3.5. CID
-Font Code Public License
-
-CID FONT CODE PUBLIC LICENSE (Version 1.0 (3/31/99))("License")
-
-Subject to any applicable third party claims, Silicon Graphics, Inc. ("SGI")
-hereby grants permission to Recipient (defined below), under SGI's copyrights
-in the Original Software (defined below), to use, copy, modify, merge,
-publish, distribute, sublicense and/or sell copies of Subject Software
-(defined below) in both source code and executable form, and to permit persons
-to whom the Subject Software is furnished in accordance with this License to
-do the same, subject to all of the following terms and conditions, which
-Recipient accepts by engaging in any such use, copying, modifying, merging,
-publication, distributing, sublicensing or selling:
-
-1. Definitions.
-
- a. "Original Software" means source code of computer software code that is
- described in Exhibit A as Original Software.
-
- b. "Modifications" means any addition to or deletion from the substance or
- structure of either the Original Software or any previous Modifications.
- When Subject Software is released as a series of files, a Modification
- means (i) any addition to or deletion from the contents of a file
- containing Original Software or previous Modifications and (ii) any new
- file that contains any part of the Original Code or previous
- Modifications.
-
- c. "Subject Software" means the Original Software or Modifications or the
- combination of the Original Software and Modifications, or portions of any
- of the foregoing.
-
- d. "Recipient" means an individual or a legal entity exercising rights
- under the terms of this License. For legal entities, "Recipient" includes
- any entity that controls, is controlled by, or is under common control
- with Recipient. For purposes of this definition, "control" of an entity
- means (i) the power, direct or indirect, to direct or manage such entity,
- or (ii) ownership of fifty percent (50%) or more of the outstanding shares
- or beneficial ownership of such entity.
-
- e. "Required Notice" means the notice set forth in Exhibit A to this
- License.
-
- f. "Accompanying Technology" means any software or other technology that
- is not a Modification and that is distributed or made publicly available
- by Recipient with the Subject Software. Separate software files that do
- not contain any Original Software or any previous Modification shall not
- be deemed a Modification, even if such software files are aggregated as
- part of a product, or in any medium of storage, with any file that does
- contain Original Software or any previous Modification.
-
-2. License Terms. All distribution of the Subject Software must be made
-subject to the terms of this License. A copy of this License and the Required
-Notice must be included in any documentation for Subject Software where
-Recipient's rights relating to Subject Software and/or any Accompanying
-Technology are described. Distributions of Subject Software in source code
-form must also include the Required Notice in every file distributed. In
-addition, a ReadMe file entitled "Important Legal Notice" must be distributed
-with each distribution of one or more files that incorporate Subject Software.
-That file must be included with distributions made in both source code and
-executable form. A copy of the License and the Required Notice must be
-included in that file. Recipient may distribute Accompanying Technology under
-a license of Recipient's choice, which may contain terms different from this
-License, provided that (i) Recipient is in compliance with the terms of this
-License, (ii) such other license terms do not modify or supersede the terms of
-this License as applicable to the Subject Software, (iii) Recipient hereby
-indemnifies SGI for any liability incurred by SGI as a result of the
-distribution of Accompanying Technology or the use of other license terms.
-
-3. Termination. This License and the rights granted hereunder will terminate
-automatically if Recipient fails to comply with terms herein and fails to cure
-such breach within 30 days of the breach. Any sublicense to the Subject
-Software that is properly granted shall survive any termination of this
-License absent termination by the terms of such sublicense. Provisions which,
-by their nature, must remain in effect beyond the termination of this License
-shall survive.
-
-4. Trademark Rights. This License does not grant any rights to use any trade
-name, trademark or service mark whatsoever. No trade name, trademark or
-service mark of SGI may be used to endorse or promote products derived from or
-incorporating any Subject Software without prior written permission of SGI.
-
-5. No Other Rights. No rights or licenses not expressly granted hereunder
-shall arise by implication, estoppel or otherwise. Title to and ownership of
-the Original Software at all times remains with SGI. All rights in the
-Original Software not expressly granted under this License are reserved.
-
-6. Compliance with Laws; Non-Infringement. Recipient shall comply with all
-applicable laws and regulations in connection with use and distribution of the
-Subject Software, including but not limited to, all export and import control
-laws and regulations of the U.S. government and other countries. Recipient may
-not distribute Subject Software that (i) in any way infringes (directly or
-contributorily) the rights (including patent, copyright, trade secret,
-trademark or other intellectual property rights of any kind) of any other
-person or entity, or (ii) breaches any representation or warranty, express,
-implied or statutory, which under any applicable law it might be deemed to
-have been distributed.
-
-7. Claims of Infringement. If Recipient at any time has knowledge of any one
-or more third party claims that reproduction, modification, use, distribution,
-import or sale of Subject Software (including particular functionality or code
-incorporated in Subject Software) infringes the third party's intellectual
-property rights, Recipient must place in a well-identified web page bearing
-the title "LEGAL" a description of each such claim and a description of the
-party making each such claim in sufficient detail that a user of the Subject
-Software will know whom to contact regarding the claim. Also, upon gaining
-such knowledge of any such claim, Recipient must conspicuously include the URL
-for such web page in the Required Notice, and in the text of any related
-documentation, license agreement or collateral in which Recipient describes
-end user's rights relating to the Subject Software. If Recipient obtains such
-knowledge after it makes Subject Software available to any other person or
-entity, Recipient shall take other steps (such as notifying appropriate
-mailing lists or newsgroups) reasonably calculated to provide such knowledge
-to those who received the Subject Software.
-
-8. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
-WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT
-LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS,
-MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. SGI ASSUMES NO
-RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE
-PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY
-SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
-ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED
-HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY,
-WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY),
-CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY CLAIM,
-DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SUBJECT SOFTWARE OR
-THE USE OR OTHER DEALINGS IN THE SUBJECT SOFTWARE. SOME JURISDICTIONS DO NOT
-ALLOW THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES, SO THIS EXCLUSION AND
-LIMITATION MAY NOT APPLY TO RECIPIENT TO THE EXTENT SO DISALLOWED.
-
-10. Indemnity. Recipient shall be solely responsible for damages arising,
-directly or indirectly, out of its utilization of rights under this License.
-Recipient will defend, indemnify and hold SGI and its successors and assigns
-harmless from and against any loss, liability, damages, costs or expenses
-(including the payment of reasonable attorneys fees) arising out of
-(Recipient's use, modification, reproduction and distribution of the Subject
-Software or out of any representation or warranty made by Recipient.
-
-11. U.S. Government End Users. The Subject Software is a "commercial item"
-consisting of "commercial computer software" as such terms are defined in
-title 48 of the Code of Federal Regulations and all U.S. Government End Users
-acquire only the rights set forth in this License and are subject to the terms
-of this License.
-
-12. Miscellaneous. This License represents the complete agreement concerning
-subject matter hereof. If any provision of this License is held to be
-unenforceable by any judicial or administrative authority having proper
-jurisdiction with respect thereto, such provision shall be reformed so as to
-achieve as nearly as possible the same economic effect as the original
-provision and the remainder of this License will remain in effect. This
-License shall be governed by and construed in accordance with the laws of the
-United States and the State of California as applied to agreements entered
-into and to be performed entirely within California between California
-residents. Any litigation relating to this License shall be subject to the
-exclusive jurisdiction of the Federal Courts of the Northern District of
-California (or, absent subject matter jurisdiction in such courts, the courts
-of the State of California), with venue lying exclusively in Santa Clara
-County, California, with the losing party responsible for costs, including
-without limitation, court costs and reasonable attorneys fees and expenses.
-The application of the United Nations Convention on Contracts for the
-International Sale of Goods is expressly excluded. Any law or regulation that
-provides that the language of a contract shall be construed against the
-drafter shall not apply to this License.
-
-Exhibit A
-
-Copyright (c) 1994-1999 Silicon Graphics, Inc.
-
-The contents of this file are subject to the CID Font Code Public License
-Version 1.0 (the "License"). You may not use this file except in compliance
-with the License. You may obtain a copy of the License at Silicon Graphics,
-Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
-or at http://www.sgi.com/software/opensource/cid/license.html
-
-Software distributed under the License is distributed on an "AS IS" basis. ALL
-WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED
-WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF
-NON-INFRINGEMENT. See the License for the specific language governing rights
-and limitations under the License.
-
-The Original Software (as defined in the License) is CID font code that was
-developed by Silicon Graphics, Inc. Those portions of the Subject Software (as
-defined in the License) that were created by Silicon Graphics, Inc. are
-Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved.
-
-[NOTE: When using this text in connection with Subject Software delivered
-solely in object code form, Recipient may replace the words "this file" with
-"this software" in both the first and second sentences.] 3.6. Bitstream Vera
-Fonts Copyright
-
-The fonts have a generous copyright, allowing derivative works (as long as
-"Bitstream" or "Vera" are not in the names), and full redistribution (so long
-as they are not *sold* by themselves). They can be be bundled, redistributed
-and sold with any software.
-
-The fonts are distributed under the following copyright:
-
-Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a
-trademark of Bitstream, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of the fonts accompanying this license ("Fonts") and associated documentation
-files (the "Font Software"), to reproduce and distribute the Font Software,
-including without limitation the rights to use, copy, merge, publish,
-distribute, and/or sell copies of the Font Software, and to permit persons to
-whom the Font Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright and trademark notices and this permission notice shall be
-included in all copies of one or more of the Font Software typefaces.
-
-The Font Software may be modified, altered, or added to, and in particular the
-designs of glyphs or characters in the Fonts may be modified and additional
-glyphs or characters may be added to the Fonts, only if the fonts are renamed
-to names not containing either the words "Bitstream" or the word "Vera".
-
-This License becomes null and void to the extent applicable to Fonts or Font
-Software that has been modified and is distributed under the "Bitstream Vera"
-names.
-
-The Font Software may be sold as part of a larger software package but no copy
-of one or more of the Font Software typefaces may be sold by itself.
-
-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
-TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION
-BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL,
-SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO
-USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
-
-Except as contained in this notice, the names of Gnome, the Gnome Foundation,
-and Bitstream Inc., shall not be used in advertising or otherwise to promote
-the sale, use or other dealings in this Font Software without prior written
-authorization from the Gnome Foundation or Bitstream Inc., respectively. For
-further information, contact: fonts at gnome dot org. 3.7. Bigelow & Holmes
-Inc and URW++ GmbH Luxi font license
-
-Luxi fonts copyright (c) 2001 by Bigelow & Holmes Inc. Luxi font instruction
-code copyright (c) 2001 by URW++ GmbH. All Rights Reserved. Luxi is a
-registered trademark of Bigelow & Holmes Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of these Fonts and associated documentation files (the "Font Software"), to
-deal in the Font Software, including without limitation the rights to use,
-copy, merge, publish, distribute, sublicense, and/or sell copies of the Font
-Software, and to permit persons to whom the Font Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright and trademark notices and this permission notice shall be
-included in all copies of one or more of the Font Software.
-
-The Font Software may not be modified, altered, or added to, and in particular
-the designs of glyphs or characters in the Fonts may not be modified nor may
-additional glyphs or characters be added to the Fonts. This License becomes
-null and void when the Fonts or Font Software have been modified.
-
-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
-TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BIGELOW & HOLMES INC. OR URW++
-GMBH. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY
-GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR
-INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT
-SOFTWARE.
-
-Except as contained in this notice, the names of Bigelow & Holmes Inc. and
-URW++ GmbH. shall not be used in advertising or otherwise to promote the sale,
-use or other dealings in this Font Software without prior written
-authorization from Bigelow & Holmes Inc. and URW++ GmbH.
-
-For further information, contact:
-
-info@urwpp.de or design@bigelowandholmes.com
-
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to zlib v1.2.8, which may be included
-with JRE 8, JDK 8, and OpenJDK 8.
-
---- begin of LICENSE ---
-
- version 1.2.8, April 28th, 2013
-
- Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Jean-loup Gailly Mark Adler
- jloup@gzip.org madler@alumni.caltech.edu
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to the following which may be
-included with JRE 8, JDK 8, and OpenJDK 8.
-
- Apache Commons Math 3.2
- Apache Derby 10.11.1.2
- Apache Jakarta BCEL 5.1
- Apache Jakarta Regexp 1.4
- Apache Santuario XML Security for Java 1.5.4
- Apache Xalan-Java 2.7.1
- Apache Xerces Java 2.10.0
- Apache XML Resolver 1.1
- Dynalink 0.5
-
-
---- begin of LICENSE ---
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
diff --git a/TRADEMARK b/TRADEMARK
deleted file mode 100644
index 6587bafb..00000000
--- a/TRADEMARK
+++ /dev/null
@@ -1,41 +0,0 @@
-OpenJDK Trademark Notice
-Version 1.1, 2008/3/10
-
-OpenJDK (the "Name") is a trademark of Sun Microsystems, Inc. (the "Owner").
-Owner permits any person obtaining a copy of this software (the "Software")
-which is based on original software retrieved from one of the following
-websites: http://download.java.net/openjdk, http://hg.openjdk.java.net/jdk6,
-or http://openjdk.java.net (each a "Website", with the original software made
-available by the Owner on a Website being known as the "Website Software") to
-use the Name in package names and version strings of the Software subject to
-the following conditions:
-
- - The Software is a substantially complete implementation of the OpenJDK
- development kit or runtime environment code made available by Owner on a
- Website, and the vast majority of the Software code is identical to the
- upstream Website Software;
-
- - No permission is hereby granted to use the Name in any other manner,
- unless such use constitutes "fair use."
-
- - The Owner makes no warranties of any kind respecting the Name and all
- representations and warranties, including any implied warranty of
- merchantability, fitness for a particular purpose or non-infringement
- are hereby disclaimed; and
-
- - This notice and the following legend are included in all copies of the
- Software or portions of it:
-
- OpenJDK is a trademark or registered trademark of Sun Microsystems,
- Inc. in the United States and other countries.
-
-The Name may also be used in connection with descriptions of the Software that
-constitute "fair use," such as "derived from the OpenJDK code base" or "based
-on the OpenJDK source code."
-
-Owner intends to revise this Notice as necessary in order to meet the needs of
-the OpenJDK Community. Please send questions or comments about this Notice to
-Sun Microsystems at openjdk-tm@sun.com. Revisions to this Notice will be
-announced on the public mailing list announce@openjdk.java.net, to which you
-may subscribe by visiting http://mail.openjdk.java.net. The latest version of
-this Notice may be found at http://openjdk.java.net/legal.
diff --git a/build.properties b/build.properties
deleted file mode 100644
index 9240acc5..00000000
--- a/build.properties
+++ /dev/null
@@ -1,92 +0,0 @@
-#
-# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# This is the JDK used to build and run the bootstrap version of javac.
-# The bootstrap javac is used to compile both boostrap versions of the
-# other tools, and product versions of all the tools.
-# Override this path as needed, either on the command line or in
-# one of the standard user build.properties files (see build.xml)
-javac.jar=${bootstrap.dir}/lib/javac.jar
-
-# The tools.jar is needed in the classpath to compile these sources
-jdk.home=${java.home}/..
-tools.jar=${jdk.home}/lib/tools.jar
-
-# options for the <javac> tasks used to compile the tools
-javac.source = 7
-javac.target = 7
-javac.debug = true
-javac.no.jdk.warnings = -XDignore.symbol.file=true
-# set the following to -version to verify the versions of javac being used
-javac.version.opt =
-# in time, there should be no exceptions to -Xlint:all
-#javac.lint.opts = -Xlint:all,-unchecked,-deprecation,-fallthrough,-cast,-serial
-javac.lint.opts=
-
-# JVM memory size
-javac.memoryInitialSize = 256m
-javac.memoryMaximumSize = 512m
-
-#------------------------------------------------------------
-
-# Root of output directories
-output.dir=.
-
-# Built files
-build.dir=${output.dir}/build
-build.classes.dir=${build.dir}/classes
-
-# Distributed results
-dist.dir=${output.dir}/dist
-dist.lib.dir=${dist.dir}/lib
-dist.classes.jar=${dist.lib.dir}/classes.jar
-dist.src.zip=${dist.lib.dir}/src.zip
-
-# Sanity information
-sanity.info= Sanity Settings:${line.separator}\
- ant.home=${ant.home}${line.separator}\
- ant.version=${ant.version}${line.separator}\
- ant.java.version=${ant.java.version}${line.separator}\
- java.home=${java.home}${line.separator}\
- java.version=${java.version}${line.separator}\
- os.name=${os.name}${line.separator}\
- os.arch=${os.arch}${line.separator}\
- os.version=${os.version}${line.separator}\
- bootstrap.dir=${bootstrap.dir}${line.separator}\
- javac.jar=${javac.jar}${line.separator}\
- javac.memoryInitialSize=${javac.memoryInitialSize}${line.separator}\
- javac.memoryMaximumSize=${javac.memoryMaximumSize}${line.separator}\
- javac.source=${javac.source}${line.separator}\
- javac.debug=${javac.debug}${line.separator}\
- javac.target=${javac.target}${line.separator}\
- javac.version.opt=${javac.version.opt}${line.separator}\
- javac.lint.opts=${javac.lint.opts}${line.separator}\
- javac.no.jdk.warnings=${javac.no.jdk.warnings}${line.separator}\
- output.dir=${output.dir}${line.separator}\
- build.dir=${build.dir}${line.separator}\
- dist.dir=${dist.dir}${line.separator}\
-${line.separator}
-
-#------------------------------------------------------------
diff --git a/build.xml b/build.xml
deleted file mode 100644
index afea552e..00000000
--- a/build.xml
+++ /dev/null
@@ -1,198 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<project name="jaxws" default="all" basedir=".">
-
- <!-- For 'ant -p' or 'ant -projecthelp' -->
-
- <description>
- Ant build script for the ${ant.project.name} part of the jdk.
-
- Input Properties: (see build.properties for the ant defaults)
- bootstrap.dir - dir with lib/javac.jar, added to javac bootclasspath
- javac.debug - true or false for debug classfiles
- javac.target - classfile version target
- javac.source - source version
-
- Run 'make help' for help using the Makefile.
- </description>
-
- <!-- Project build properties. -->
- <property file="build.properties"/>
-
- <property name="jaxws.src.dir" value="src/share/jaxws_classes"/>
- <property name="jaf.src.dir" value="src/share/jaf_classes"/>
- <path id="src.dir.id">
- <pathelement path="${jaxws.src.dir}"/>
- <pathelement path="${jaf.src.dir}"/>
- </path>
-
- <!-- Initialization of directories needed for build. -->
- <target name="init">
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${build.classes.dir}"/>
- <mkdir dir="${dist.dir}"/>
- <mkdir dir="${dist.lib.dir}"/>
- </target>
-
- <!-- Sanity checks and settings -->
- <target name="sanity"
- depends="-javac-jar-exists"
- description="Display settings of configuration values">
- <echo message="${sanity.info}"/>
- </target>
-
- <!-- Check for bootstrap javac.jar file, warn if missing. -->
- <condition property="javac.jar.exists">
- <available file="${javac.jar}" type="file"/>
- </condition>
- <target name="-javac-jar-exists"
- unless="javac.jar.exists">
- <echo message="WARNING: Cannot find ${javac.jar}"/>
- </target>
-
- <!-- Create src.zip. -->
- <target name="-dist-src-zip" depends="init">
- <zip file="${dist.src.zip}" basedir="${jaxws.src.dir}"/>
- <zip file="${dist.src.zip}" basedir="${jaf.src.dir}" update="true"/>
- </target>
-
- <!-- Creation of distribution files to jdk build process. -->
- <target name="dist"
- depends="init, build, -dist-classes-jar, -dist-src-zip"
- description="Create all built distribution files.">
- </target>
- <target name="-dist-classes-jar-uptodate"
- depends="init">
- <condition property="dist.classes.jar.uptodate">
- <and>
- <available file="${dist.classes.jar}" type="file"/>
- <uptodate targetfile="${dist.classes.jar}">
- <srcfiles dir="${build.classes.dir}" includes="**"/>
- </uptodate>
- </and>
- </condition>
- </target>
- <target name="-dist-classes-jar"
- depends="init, -dist-classes-jar-uptodate"
- unless="dist.classes.jar.uptodate">
- <delete file="${dist.classes.jar}"/>
- <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/>
- </target>
-
- <!-- Special build area setup. -->
- <target name="-build-setup" depends="init">
- <mkdir dir="${build.classes.dir}"/>
- <copy todir="${build.classes.dir}">
- <fileset dir="${jaxws.src.dir}"
- includes="**/*.xsd, **/*.default, **/*.properties"
- excludes="**/*.java, **/*.package.html"/>
- </copy>
- <replaceregexp match="#(.*)$" replace="#" flags="gm">
- <fileset dir="${build.classes.dir}" includes="**/*.properties"/>
- </replaceregexp>
-
- <mkdir dir="${build.classes.dir}/META-INF/services"/>
- <copy todir="${build.classes.dir}/META-INF"
- file="${jaf.src.dir}/META-INF/mailcap.default"/>
- <copy todir="${build.classes.dir}/META-INF"
- file="${jaf.src.dir}/META-INF/mimetypes.default"/>
- <copy todir="${build.classes.dir}/META-INF/services"
- file="${jaxws.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin"/>
- <copy todir="${build.classes.dir}/META-INF/services"
- file="${jaxws.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin"/>
- <mkdir dir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime"/>
- <copy todir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime">
- <fileset dir="${jaxws.src.dir}/com/sun/tools/internal/xjc/runtime"
- includes="**/*.java"
- excludes="**/*.package.html"/>
- </copy>
- </target>
-
- <!-- Build (compilation) of sources to class files. -->
- <target name="build"
- depends="compile, -build-setup">
- </target>
- <target name="compile"
- depends="init">
- <mkdir dir="${build.classes.dir}"/>
- <javac
- includeAntRuntime="false"
- classpath="${build.classes.dir}:${tools.jar}"
- fork="true"
- destdir="${build.classes.dir}"
- memoryInitialSize="${javac.memoryInitialSize}"
- memoryMaximumSize="${javac.memoryMaximumSize}"
- source="${javac.source}"
- debug="${javac.debug}"
- target="${javac.target}">
- <compilerarg value="-J-Xbootclasspath/p:${javac.jar}"/>
- <compilerarg line="${javac.version.opt} ${javac.lint.opts} ${javac.no.jdk.warnings}"/>
- <src refid="src.dir.id"/>
- </javac>
- </target>
-
- <!-- Test. (FIXME: Need to know how to run tests.) -->
- <target name="test"
- depends="init, dist">
- <echo message="FIXME: How do you run the tests"/>
- </target>
-
- <!-- Populate source area if needed. -->
- <target name="source"
- depends="init"
- description="Populate all source file directories">
- </target>
-
- <!-- Clean up compiled files. -->
- <target name="clean"
- description="Delete all generated files">
- <delete dir="${build.dir}"/>
- <delete dir="${dist.dir}"/>
- </target>
-
- <!-- Clean up compiled files and all imported source files. -->
- <target name="clobber"
- depends="clean"
- description="Delete all generated files, including imported sources">
- </target>
-
- <target name="-banner">
- <echo message="+---------------------------------------+"/>
- <echo message="+ Starting ant project ${ant.project.name} +"/>
- <echo message="+---------------------------------------+"/>
- </target>
-
- <!-- Do everything but test. -->
- <target name="all"
- depends="-banner, sanity, dist"
- description="Build everything.">
- <echo message="+---------------------------------------+"/>
- <echo message="+ Finishing ant project ${ant.project.name}"/>
- <echo message="+---------------------------------------+"/>
- </target>
-
-</project>
diff --git a/make/BuildJaxws.gmk b/make/BuildJaxws.gmk
deleted file mode 100644
index 204dd47f..00000000
--- a/make/BuildJaxws.gmk
+++ /dev/null
@@ -1,113 +0,0 @@
-#
-# Copyright (c) 2007, 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.
-#
-
-# This must be the first rule
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-include JavaCompilation.gmk
-
-DISABLE_JAXWS_WARNINGS := -Xlint:all,-varargs,-rawtypes,-deprecation,-unchecked,-serial,-dep-ann,-cast,-fallthrough,-static
-
-# The generate new bytecode uses the new compiler for to generate bytecode
-# for the new jdk that is being built. The code compiled by this setup
-# cannot necessarily be run with the boot jdk.
-$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
- JVM := $(JAVA), \
- JAVAC := $(NEW_JAVAC), \
- FLAGS := -XDignore.symbol.file=true $(DISABLE_JAXWS_WARNINGS) -g, \
- SERVER_DIR := $(SJAVAC_SERVER_DIR), \
- SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
-
-# Dummy here is needed to trigger copying of META-INF
-$(eval $(call SetupJavaCompilation,BUILD_JAF, \
- SETUP := GENERATE_NEWBYTECODE_DEBUG, \
- SRC := $(JAXWS_TOPDIR)/src/share/jaf_classes, \
- COPY := "dummy", \
- BIN := $(JAXWS_OUTPUTDIR)/jaf_classes))
-
-$(eval $(call SetupJavaCompilation,BUILD_JAXWS, \
- SETUP := GENERATE_NEWBYTECODE_DEBUG, \
- SRC := $(JAXWS_TOPDIR)/src/share/jaxws_classes, \
- BIN := $(JAXWS_OUTPUTDIR)/jaxws_classes, \
- COPY := .xsd, \
- COPY_FILES := $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/JAXBContextFactory.java \
- $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/ZeroOneBooleanAdapter.java \
- $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml, \
- ADD_JAVAC_FLAGS = -Xbootclasspath/p:$(OUTPUT_ROOT)/jaxp/dist/lib/classes.jar))
-
-$(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin: \
- $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin
- mkdir -p $(@D)
- cp $< $@
-
-$(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.xjc.Plugin: \
- $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin
- mkdir -p $(@D)
- cp $< $@
-
-# There are two META-INF services files that are needed, add these to the list of goals
-BUILD_JAXWS += $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
- $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.xjc.Plugin
-
-# Imitate the property cleaning mechanism in the old build. This will likely be replaced
-# by the unified functionality in JavaCompilation.gmk, but keep it the same as old build
-# for now, even though it actually breaks properties containing # in the value.
-# Using nawk to avoid solaris sed.
-$(JAXWS_OUTPUTDIR)/jaxws_classes/%.properties: $(JAXWS_TOPDIR)/src/share/jaxws_classes/%.properties
- $(MKDIR) -p $(@D)
- $(RM) $@ $@.tmp
- $(CAT) $< | LANG=C $(NAWK) '{ sub(/#.*$$/,"#"); print }' > $@.tmp
- $(MV) $@.tmp $@
-
-JAXWS_SRC_PROP_FILES := $(shell $(FIND) $(JAXWS_TOPDIR)/src/share/jaxws_classes -name "*.properties")
-TARGET_PROP_FILES := $(patsubst $(JAXWS_TOPDIR)/src/share/jaxws_classes/%, \
- $(JAXWS_OUTPUTDIR)/jaxws_classes/%, $(JAXWS_SRC_PROP_FILES))
-
-$(JAXWS_OUTPUTDIR)/jaf_classes/%.properties: $(JAXWS_TOPDIR)/src/share/jaf_classes/%.properties
- $(MKDIR) -p $(@D)
- $(RM) $@ $@.tmp
- $(CAT) $< | LANG=C $(NAWK) '{ sub(/#.*$$/,"#"); print }' > $@.tmp
- $(MV) $@.tmp $@
-
-JAF_SRC_PROP_FILES := $(shell $(FIND) $(JAXWS_TOPDIR)/src/share/jaf_classes -name "*.properties")
-TARGET_PROP_FILES += $(patsubst $(JAXWS_TOPDIR)/src/share/jaf_classes/%, \
- $(JAXWS_OUTPUTDIR)/jaf_classes/%, $(JAF_SRC_PROP_FILES))
-
-$(eval $(call SetupArchive,ARCHIVE_JAXWS, $(BUILD_JAXWS) $(BUILD_JAF) $(TARGET_PROP_FILES), \
- SRCS := $(JAXWS_OUTPUTDIR)/jaxws_classes $(JAXWS_OUTPUTDIR)/jaf_classes, \
- SUFFIXES := .class .properties .xsd .xml .java \
- com.sun.mirror.apt.AnnotationProcessorFactory \
- com.sun.tools.internal.xjc.Plugin, \
- JAR := $(JAXWS_OUTPUTDIR)/dist/lib/classes.jar))
-
-$(eval $(call SetupZipArchive,ZIP_JAXWS_SOURCES, \
- SRC := $(JAXWS_TOPDIR)/src/share/jaf_classes $(JAXWS_TOPDIR)/src/share/jaxws_classes, \
- ZIP := $(JAXWS_OUTPUTDIR)/dist/lib/src.zip))
-
-all: $(JAXWS_OUTPUTDIR)/dist/lib/classes.jar $(JAXWS_OUTPUTDIR)/dist/lib/src.zip
-
-.PHONY: default all
diff --git a/make/Makefile b/make/Makefile
deleted file mode 100644
index 4570070f..00000000
--- a/make/Makefile
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Copyright (c) 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Locate this Makefile
-ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))), )
- makefile_path := $(CURDIR)/$(lastword $(MAKEFILE_LIST))
-else
- makefile_path := $(lastword $(MAKEFILE_LIST))
-endif
-repo_dir := $(patsubst %/make/Makefile, %, $(makefile_path))
-
-# What is the name of this subsystem (langtools, corba, etc)?
-subsystem_name := $(notdir $(repo_dir))
-
-# Try to locate top-level makefile
-top_level_makefile := $(repo_dir)/../Makefile
-ifneq ($(wildcard $(top_level_makefile)), )
- $(info Will run $(subsystem_name) target on top-level Makefile)
- $(info WARNING: This is a non-recommended way of building!)
- $(info ===================================================)
-else
- $(info Cannot locate top-level Makefile. Is this repo not checked out as part of a complete forest?)
- $(error Build from top-level Makefile instead)
-endif
-
-all:
- @$(MAKE) -f $(top_level_makefile) $(subsystem_name)
diff --git a/nbproject/findbugs.settings b/nbproject/findbugs.settings
deleted file mode 100644
index a5d76311..00000000
--- a/nbproject/findbugs.settings
+++ /dev/null
@@ -1,72 +0,0 @@
-#FindBugs User Preferences
-#Tue Jun 30 18:33:11 PDT 2009
-detectorAbnormalFinallyBlockReturn=AbnormalFinallyBlockReturn|false
-detectorAbstractClassEmptyMethods=AbstractClassEmptyMethods|false
-detectorAbstractOverriddenMethod=AbstractOverriddenMethod|false
-detectorArrayBasedCollections=ArrayBasedCollections|false
-detectorArrayWrappedCallByReference=ArrayWrappedCallByReference|false
-detectorBloatedAssignmentScope=BloatedAssignmentScope|false
-detectorBloatedSynchronizedBlock=BloatedSynchronizedBlock|false
-detectorClassEnvy=ClassEnvy|false
-detectorCollectStatistics=CollectStatistics|false
-detectorConfusingAutoboxedOverloading=ConfusingAutoboxedOverloading|false
-detectorConstantListIndex=ConstantListIndex|false
-detectorCopiedOverriddenMethod=CopiedOverriddenMethod|false
-detectorCustomBuiltXML=CustomBuiltXML|false
-detectorCyclomaticComplexity=CyclomaticComplexity|false
-detectorDateComparison=DateComparison|false
-detectorDeclaredRuntimeException=DeclaredRuntimeException|false
-detectorDeletingWhileIterating=DeletingWhileIterating|false
-detectorDubiousListCollection=DubiousListCollection|false
-detectorFieldCouldBeLocal=FieldCouldBeLocal|false
-detectorFinalParameters=FinalParameters|false
-detectorFloatingPointLoops=FloatingPointLoops|false
-detectorInefficientStringBuffering=InefficientStringBuffering|false
-detectorInheritanceTypeChecking=InheritanceTypeChecking|false
-detectorJDBCVendorReliance=JDBCVendorReliance|false
-detectorListIndexedIterating=ListIndexedIterating|false
-detectorLiteralStringComparison=LiteralStringComparison|false
-detectorLocalSynchronizedCollection=LocalSynchronizedCollection|false
-detectorLostExceptionStackTrace=LostExceptionStackTrace|false
-detectorManualArrayCopy=ManualArrayCopy|false
-detectorMethodReturnsConstant=MethodReturnsConstant|false
-detectorNeedlessAutoboxing=NeedlessAutoboxing|false
-detectorNeedlessCustomSerialization=NeedlessCustomSerialization|false
-detectorNeedlessInstanceRetrieval=NeedlessInstanceRetrieval|false
-detectorNeedlessMemberCollectionSynchronization=NeedlessMemberCollectionSynchronization|false
-detectorNonCollectionMethodUse=NonCollectionMethodUse|false
-detectorNonOwnedSynchronization=NonOwnedSynchronization|false
-detectorNonRecycleableTaglibs=NonRecycleableTaglibs|false
-detectorOrphanedDOMNode=OrphanedDOMNode|false
-detectorOverlyConcreteParameter=OverlyConcreteParameter|false
-detectorParallelLists=ParallelLists|false
-detectorPartiallyConstructedObjectAccess=PartiallyConstructedObjectAccess|false
-detectorPossibleIncompleteSerialization=PossibleIncompleteSerialization|false
-detectorPossibleMemoryBloat=PossibleMemoryBloat|false
-detectorPossiblyRedundantMethodCalls=PossiblyRedundantMethodCalls|false
-detectorSQLInLoop=SQLInLoop|false
-detectorSection508Compliance=Section508Compliance|false
-detectorSillynessPotPourri=SillynessPotPourri|false
-detectorSloppyClassReflection=SloppyClassReflection|false
-detectorSluggishGui=SluggishGui|false
-detectorSpoiledChildInterfaceImplementor=SpoiledChildInterfaceImplementor|false
-detectorSpuriousThreadStates=SpuriousThreadStates|false
-detectorStaticArrayCreatedInMethod=StaticArrayCreatedInMethod|false
-detectorStaticMethodInstanceInvocation=StaticMethodInstanceInvocation|false
-detectorSuspiciousComparatorReturnValues=SuspiciousComparatorReturnValues|false
-detectorSuspiciousJDKVersionUse=SuspiciousJDKVersionUse|false
-detectorSuspiciousWaitOnConcurrentObject=SuspiciousWaitOnConcurrentObject|false
-detectorSyncCollectionIterators=SyncCollectionIterators|false
-detectorTailRecursion=TailRecursion|false
-detectorUnnecessaryStoreBeforeReturn=UnnecessaryStoreBeforeReturn|false
-detectorUnrelatedCollectionContents=UnrelatedCollectionContents|false
-detectorUnrelatedReturnValues=UnrelatedReturnValues|false
-detectorUseAddAll=UseAddAll|false
-detectorUseCharacterParameterizedMethod=UseCharacterParameterizedMethod|false
-detectorUseEnumCollections=UseEnumCollections|false
-detectorUseSplit=UseSplit|false
-detectorUseToArray=UseToArray|false
-detector_threshold=2
-effort=default
-filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,I18N,MALICIOUS_CODE,MT_CORRECTNESS,PERFORMANCE,SECURITY,STYLE|false
-filter_settings_neg=|
diff --git a/nbproject/project.xml b/nbproject/project.xml
deleted file mode 100644
index 36adb0c1..00000000
--- a/nbproject/project.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://www.netbeans.org/ns/project/1">
- <type>org.netbeans.modules.ant.freeform</type>
- <configuration>
- <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
- <name>jaxws</name>
- </general-data>
- <general-data xmlns="http://www.netbeans.org/ns/freeform-project/2">
- <!-- Do not use Project Properties customizer when editing this file manually. -->
- <name>jaxws</name>
- <properties/>
- <folders>
- <source-folder>
- <label>jaxws</label>
- <location>.</location>
- <encoding>UTF-8</encoding>
- </source-folder>
- </folders>
- <ide-actions>
- <action name="build">
- <target>build</target>
- </action>
- <action name="clean">
- <target>clean</target>
- </action>
- <action name="rebuild">
- <target>clean</target>
- <target>build</target>
- </action>
- </ide-actions>
- <view>
- <items>
- <source-file>
- <location>build.xml</location>
- </source-file>
- </items>
- <context-menu>
- <ide-action name="build"/>
- <ide-action name="rebuild"/>
- <ide-action name="clean"/>
- </context-menu>
- </view>
- <subprojects/>
- </general-data>
- <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1"/>
- <preferences xmlns="http://www.netbeans.org/ns/auxiliary-configuration-preferences/1">
- <module name="org-netbeans-modules-editor-indent"/>
- </preferences>
- </configuration>
-</project>
diff --git a/nbproject/sqe.properties b/nbproject/sqe.properties
deleted file mode 100644
index 978ef5bc..00000000
--- a/nbproject/sqe.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-#Path to FindbugsSettingsFile (relative)
-findbugs.settings.file=findbugs.settings
diff --git a/src/share/jaf_classes/META-INF/mailcap.default b/src/share/jaf_classes/META-INF/mailcap.default
deleted file mode 100644
index 542de7de..00000000
--- a/src/share/jaf_classes/META-INF/mailcap.default
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# This is a very simple 'mailcap' file
-#
-image/gif;; x-java-view=com.sun.activation.viewers.ImageViewer
-image/jpeg;; x-java-view=com.sun.activation.viewers.ImageViewer
-text/*;; x-java-view=com.sun.activation.viewers.TextViewer
-text/*;; x-java-edit=com.sun.activation.viewers.TextEditor
diff --git a/src/share/jaf_classes/META-INF/mimetypes.default b/src/share/jaf_classes/META-INF/mimetypes.default
deleted file mode 100644
index 0c22eb2e..00000000
--- a/src/share/jaf_classes/META-INF/mimetypes.default
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# A simple, old format, mime.types file
-#
-text/html html htm HTML HTM
-text/plain txt text TXT TEXT
-image/gif gif GIF
-image/ief ief
-image/jpeg jpeg jpg jpe JPG
-image/tiff tiff tif
-image/x-xwindowdump xwd
-application/postscript ai eps ps
-application/rtf rtf
-application/x-tex tex
-application/x-texinfo texinfo texi
-application/x-troff t tr roff
-audio/basic au
-audio/midi midi mid
-audio/x-aifc aifc
-audio/x-aiff aif aiff
-audio/x-mpeg mpeg mpg
-audio/x-wav wav
-video/mpeg mpeg mpg mpe
-video/quicktime qt mov
-video/x-msvideo avi
diff --git a/src/share/jaf_classes/com/sun/activation/registries/LogSupport.java b/src/share/jaf_classes/com/sun/activation/registries/LogSupport.java
deleted file mode 100644
index 97d381d2..00000000
--- a/src/share/jaf_classes/com/sun/activation/registries/LogSupport.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.activation.registries;
-
-import java.io.*;
-import java.util.logging.*;
-
-/**
- * Logging related methods.
- */
-public class LogSupport {
- private static boolean debug = false;
- private static Logger logger;
- private static final Level level = Level.FINE;
-
- static {
- try {
- debug = Boolean.getBoolean("javax.activation.debug");
- } catch (Throwable t) {
- // ignore any errors
- }
- logger = Logger.getLogger("javax.activation");
- }
-
- /**
- * Constructor.
- */
- private LogSupport() {
- // private constructor, can't create instances
- }
-
- public static void log(String msg) {
- if (debug)
- System.out.println(msg);
- logger.log(level, msg);
- }
-
- public static void log(String msg, Throwable t) {
- if (debug)
- System.out.println(msg + "; Exception: " + t);
- logger.log(level, msg, t);
- }
-
- public static boolean isLoggable() {
- return debug || logger.isLoggable(level);
- }
-}
diff --git a/src/share/jaf_classes/com/sun/activation/registries/MailcapFile.java b/src/share/jaf_classes/com/sun/activation/registries/MailcapFile.java
deleted file mode 100644
index 8b998b0e..00000000
--- a/src/share/jaf_classes/com/sun/activation/registries/MailcapFile.java
+++ /dev/null
@@ -1,563 +0,0 @@
-/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.activation.registries;
-
-import java.io.*;
-import java.util.*;
-
-public class MailcapFile {
-
- /**
- * A Map indexed by MIME type (string) that references
- * a Map of commands for each type. The comand Map
- * is indexed by the command name and references a List of
- * class names (strings) for each command.
- */
- private Map type_hash = new HashMap();
-
- /**
- * Another Map like above, but for fallback entries.
- */
- private Map fallback_hash = new HashMap();
-
- /**
- * A Map indexed by MIME type (string) that references
- * a List of native commands (string) corresponding to the type.
- */
- private Map native_commands = new HashMap();
-
- private static boolean addReverse = false;
-
- static {
- try {
- addReverse = Boolean.getBoolean("javax.activation.addreverse");
- } catch (Throwable t) {
- // ignore any errors
- }
- }
-
- /**
- * The constructor that takes a filename as an argument.
- *
- * @param new_fname The file name of the mailcap file.
- */
- public MailcapFile(String new_fname) throws IOException {
- if (LogSupport.isLoggable())
- LogSupport.log("new MailcapFile: file " + new_fname);
- FileReader reader = null;
- try {
- reader = new FileReader(new_fname);
- parse(new BufferedReader(reader));
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException ex) { }
- }
- }
- }
-
- /**
- * The constructor that takes an input stream as an argument.
- *
- * @param is the input stream
- */
- public MailcapFile(InputStream is) throws IOException {
- if (LogSupport.isLoggable())
- LogSupport.log("new MailcapFile: InputStream");
- parse(new BufferedReader(new InputStreamReader(is, "iso-8859-1")));
- }
-
- /**
- * Mailcap file default constructor.
- */
- public MailcapFile() {
- if (LogSupport.isLoggable())
- LogSupport.log("new MailcapFile: default");
- }
-
- /**
- * Get the Map of MailcapEntries based on the MIME type.
- *
- * <p>
- * <strong>Semantics:</strong> First check for the literal mime type,
- * if that fails looks for wildcard <type>/\* and return that. Return the
- * list of all that hit.
- */
- public Map getMailcapList(String mime_type) {
- Map search_result = null;
- Map wildcard_result = null;
-
- // first try the literal
- search_result = (Map)type_hash.get(mime_type);
-
- // ok, now try the wildcard
- int separator = mime_type.indexOf('/');
- String subtype = mime_type.substring(separator + 1);
- if (!subtype.equals("*")) {
- String type = mime_type.substring(0, separator + 1) + "*";
- wildcard_result = (Map)type_hash.get(type);
-
- if (wildcard_result != null) { // damn, we have to merge!!!
- if (search_result != null)
- search_result =
- mergeResults(search_result, wildcard_result);
- else
- search_result = wildcard_result;
- }
- }
- return search_result;
- }
-
- /**
- * Get the Map of fallback MailcapEntries based on the MIME type.
- *
- * <p>
- * <strong>Semantics:</strong> First check for the literal mime type,
- * if that fails looks for wildcard <type>/\* and return that. Return the
- * list of all that hit.
- */
- public Map getMailcapFallbackList(String mime_type) {
- Map search_result = null;
- Map wildcard_result = null;
-
- // first try the literal
- search_result = (Map)fallback_hash.get(mime_type);
-
- // ok, now try the wildcard
- int separator = mime_type.indexOf('/');
- String subtype = mime_type.substring(separator + 1);
- if (!subtype.equals("*")) {
- String type = mime_type.substring(0, separator + 1) + "*";
- wildcard_result = (Map)fallback_hash.get(type);
-
- if (wildcard_result != null) { // damn, we have to merge!!!
- if (search_result != null)
- search_result =
- mergeResults(search_result, wildcard_result);
- else
- search_result = wildcard_result;
- }
- }
- return search_result;
- }
-
- /**
- * Return all the MIME types known to this mailcap file.
- */
- public String[] getMimeTypes() {
- Set types = new HashSet(type_hash.keySet());
- types.addAll(fallback_hash.keySet());
- types.addAll(native_commands.keySet());
- String[] mts = new String[types.size()];
- mts = (String[])types.toArray(mts);
- return mts;
- }
-
- /**
- * Return all the native comands for the given MIME type.
- */
- public String[] getNativeCommands(String mime_type) {
- String[] cmds = null;
- List v =
- (List)native_commands.get(mime_type.toLowerCase(Locale.ENGLISH));
- if (v != null) {
- cmds = new String[v.size()];
- cmds = (String[])v.toArray(cmds);
- }
- return cmds;
- }
-
- /**
- * Merge the first hash into the second.
- * This merge will only effect the hashtable that is
- * returned, we don't want to touch the one passed in since
- * its integrity must be maintained.
- */
- private Map mergeResults(Map first, Map second) {
- Iterator verb_enum = second.keySet().iterator();
- Map clonedHash = new HashMap(first);
-
- // iterate through the verbs in the second map
- while (verb_enum.hasNext()) {
- String verb = (String)verb_enum.next();
- List cmdVector = (List)clonedHash.get(verb);
- if (cmdVector == null) {
- clonedHash.put(verb, second.get(verb));
- } else {
- // merge the two
- List oldV = (List)second.get(verb);
- cmdVector = new ArrayList(cmdVector);
- cmdVector.addAll(oldV);
- clonedHash.put(verb, cmdVector);
- }
- }
- return clonedHash;
- }
-
- /**
- * appendToMailcap: Append to this Mailcap DB, use the mailcap
- * format:
- * Comment == "# <i>comment string</i>
- * Entry == "mimetype; javabeanclass<nl>
- *
- * Example:
- * # this is a comment
- * image/gif jaf.viewers.ImageViewer
- */
- public void appendToMailcap(String mail_cap) {
- if (LogSupport.isLoggable())
- LogSupport.log("appendToMailcap: " + mail_cap);
- try {
- parse(new StringReader(mail_cap));
- } catch (IOException ex) {
- // can't happen
- }
- }
-
- /**
- * parse file into a hash table of MC Type Entry Obj
- */
- private void parse(Reader reader) throws IOException {
- BufferedReader buf_reader = new BufferedReader(reader);
- String line = null;
- String continued = null;
-
- while ((line = buf_reader.readLine()) != null) {
- // LogSupport.log("parsing line: " + line);
-
- line = line.trim();
-
- try {
- if (line.charAt(0) == '#')
- continue;
- if (line.charAt(line.length() - 1) == '\\') {
- if (continued != null)
- continued += line.substring(0, line.length() - 1);
- else
- continued = line.substring(0, line.length() - 1);
- } else if (continued != null) {
- // handle the two strings
- continued = continued + line;
- // LogSupport.log("parse: " + continued);
- try {
- parseLine(continued);
- } catch (MailcapParseException e) {
- //e.printStackTrace();
- }
- continued = null;
- }
- else {
- // LogSupport.log("parse: " + line);
- try {
- parseLine(line);
- // LogSupport.log("hash.size = " + type_hash.size());
- } catch (MailcapParseException e) {
- //e.printStackTrace();
- }
- }
- } catch (StringIndexOutOfBoundsException e) {}
- }
- }
-
- /**
- * A routine to parse individual entries in a Mailcap file.
- *
- * Note that this routine does not handle line continuations.
- * They should have been handled prior to calling this routine.
- */
- protected void parseLine(String mailcapEntry)
- throws MailcapParseException, IOException {
- MailcapTokenizer tokenizer = new MailcapTokenizer(mailcapEntry);
- tokenizer.setIsAutoquoting(false);
-
- if (LogSupport.isLoggable())
- LogSupport.log("parse: " + mailcapEntry);
- // parse the primary type
- int currentToken = tokenizer.nextToken();
- if (currentToken != MailcapTokenizer.STRING_TOKEN) {
- reportParseError(MailcapTokenizer.STRING_TOKEN, currentToken,
- tokenizer.getCurrentTokenValue());
- }
- String primaryType =
- tokenizer.getCurrentTokenValue().toLowerCase(Locale.ENGLISH);
- String subType = "*";
-
- // parse the '/' between primary and sub
- // if it's not present that's ok, we just don't have a subtype
- currentToken = tokenizer.nextToken();
- if ((currentToken != MailcapTokenizer.SLASH_TOKEN) &&
- (currentToken != MailcapTokenizer.SEMICOLON_TOKEN)) {
- reportParseError(MailcapTokenizer.SLASH_TOKEN,
- MailcapTokenizer.SEMICOLON_TOKEN, currentToken,
- tokenizer.getCurrentTokenValue());
- }
-
- // only need to look for a sub type if we got a '/'
- if (currentToken == MailcapTokenizer.SLASH_TOKEN) {
- // parse the sub type
- currentToken = tokenizer.nextToken();
- if (currentToken != MailcapTokenizer.STRING_TOKEN) {
- reportParseError(MailcapTokenizer.STRING_TOKEN,
- currentToken, tokenizer.getCurrentTokenValue());
- }
- subType =
- tokenizer.getCurrentTokenValue().toLowerCase(Locale.ENGLISH);
-
- // get the next token to simplify the next step
- currentToken = tokenizer.nextToken();
- }
-
- String mimeType = primaryType + "/" + subType;
-
- if (LogSupport.isLoggable())
- LogSupport.log(" Type: " + mimeType);
-
- // now setup the commands hashtable
- Map commands = new LinkedHashMap(); // keep commands in order found
-
- // parse the ';' that separates the type from the parameters
- if (currentToken != MailcapTokenizer.SEMICOLON_TOKEN) {
- reportParseError(MailcapTokenizer.SEMICOLON_TOKEN,
- currentToken, tokenizer.getCurrentTokenValue());
- }
- // eat it
-
- // parse the required view command
- tokenizer.setIsAutoquoting(true);
- currentToken = tokenizer.nextToken();
- tokenizer.setIsAutoquoting(false);
- if ((currentToken != MailcapTokenizer.STRING_TOKEN) &&
- (currentToken != MailcapTokenizer.SEMICOLON_TOKEN)) {
- reportParseError(MailcapTokenizer.STRING_TOKEN,
- MailcapTokenizer.SEMICOLON_TOKEN, currentToken,
- tokenizer.getCurrentTokenValue());
- }
-
- if (currentToken == MailcapTokenizer.STRING_TOKEN) {
- // have a native comand, save the entire mailcap entry
- //String nativeCommand = tokenizer.getCurrentTokenValue();
- List v = (List)native_commands.get(mimeType);
- if (v == null) {
- v = new ArrayList();
- v.add(mailcapEntry);
- native_commands.put(mimeType, v);
- } else {
- // XXX - check for duplicates?
- v.add(mailcapEntry);
- }
- }
-
- // only have to get the next token if the current one isn't a ';'
- if (currentToken != MailcapTokenizer.SEMICOLON_TOKEN) {
- currentToken = tokenizer.nextToken();
- }
-
- // look for a ';' which will indicate whether
- // a parameter list is present or not
- if (currentToken == MailcapTokenizer.SEMICOLON_TOKEN) {
- boolean isFallback = false;
- do {
- // eat the ';'
-
- // parse the parameter name
- currentToken = tokenizer.nextToken();
- if (currentToken != MailcapTokenizer.STRING_TOKEN) {
- reportParseError(MailcapTokenizer.STRING_TOKEN,
- currentToken, tokenizer.getCurrentTokenValue());
- }
- String paramName = tokenizer.getCurrentTokenValue().
- toLowerCase(Locale.ENGLISH);
-
- // parse the '=' which separates the name from the value
- currentToken = tokenizer.nextToken();
- if ((currentToken != MailcapTokenizer.EQUALS_TOKEN) &&
- (currentToken != MailcapTokenizer.SEMICOLON_TOKEN) &&
- (currentToken != MailcapTokenizer.EOI_TOKEN)) {
- reportParseError(MailcapTokenizer.EQUALS_TOKEN,
- MailcapTokenizer.SEMICOLON_TOKEN,
- MailcapTokenizer.EOI_TOKEN,
- currentToken, tokenizer.getCurrentTokenValue());
- }
-
- // we only have a useful command if it is named
- if (currentToken == MailcapTokenizer.EQUALS_TOKEN) {
- // eat it
-
- // parse the parameter value (which is autoquoted)
- tokenizer.setIsAutoquoting(true);
- currentToken = tokenizer.nextToken();
- tokenizer.setIsAutoquoting(false);
- if (currentToken != MailcapTokenizer.STRING_TOKEN) {
- reportParseError(MailcapTokenizer.STRING_TOKEN,
- currentToken, tokenizer.getCurrentTokenValue());
- }
- String paramValue =
- tokenizer.getCurrentTokenValue();
-
- // add the class to the list iff it is one we care about
- if (paramName.startsWith("x-java-")) {
- String commandName = paramName.substring(7);
- // 7 == "x-java-".length
-
- if (commandName.equals("fallback-entry") &&
- paramValue.equalsIgnoreCase("true")) {
- isFallback = true;
- } else {
-
- // setup the class entry list
- if (LogSupport.isLoggable())
- LogSupport.log(" Command: " + commandName +
- ", Class: " + paramValue);
- List classes = (List)commands.get(commandName);
- if (classes == null) {
- classes = new ArrayList();
- commands.put(commandName, classes);
- }
- if (addReverse)
- classes.add(0, paramValue);
- else
- classes.add(paramValue);
- }
- }
-
- // set up the next iteration
- currentToken = tokenizer.nextToken();
- }
- } while (currentToken == MailcapTokenizer.SEMICOLON_TOKEN);
-
- Map masterHash = isFallback ? fallback_hash : type_hash;
- Map curcommands =
- (Map)masterHash.get(mimeType);
- if (curcommands == null) {
- masterHash.put(mimeType, commands);
- } else {
- if (LogSupport.isLoggable())
- LogSupport.log("Merging commands for type " + mimeType);
- // have to merge current and new commands
- // first, merge list of classes for commands already known
- Iterator cn = curcommands.keySet().iterator();
- while (cn.hasNext()) {
- String cmdName = (String)cn.next();
- List ccv = (List)curcommands.get(cmdName);
- List cv = (List)commands.get(cmdName);
- if (cv == null)
- continue;
- // add everything in cv to ccv, if it's not already there
- Iterator cvn = cv.iterator();
- while (cvn.hasNext()) {
- String clazz = (String)cvn.next();
- if (!ccv.contains(clazz))
- if (addReverse)
- ccv.add(0, clazz);
- else
- ccv.add(clazz);
- }
- }
- // now, add commands not previously known
- cn = commands.keySet().iterator();
- while (cn.hasNext()) {
- String cmdName = (String)cn.next();
- if (curcommands.containsKey(cmdName))
- continue;
- List cv = (List)commands.get(cmdName);
- curcommands.put(cmdName, cv);
- }
- }
- } else if (currentToken != MailcapTokenizer.EOI_TOKEN) {
- reportParseError(MailcapTokenizer.EOI_TOKEN,
- MailcapTokenizer.SEMICOLON_TOKEN,
- currentToken, tokenizer.getCurrentTokenValue());
- }
- }
-
- protected static void reportParseError(int expectedToken, int actualToken,
- String actualTokenValue) throws MailcapParseException {
- throw new MailcapParseException("Encountered a " +
- MailcapTokenizer.nameForToken(actualToken) + " token (" +
- actualTokenValue + ") while expecting a " +
- MailcapTokenizer.nameForToken(expectedToken) + " token.");
- }
-
- protected static void reportParseError(int expectedToken,
- int otherExpectedToken, int actualToken, String actualTokenValue)
- throws MailcapParseException {
- throw new MailcapParseException("Encountered a " +
- MailcapTokenizer.nameForToken(actualToken) + " token (" +
- actualTokenValue + ") while expecting a " +
- MailcapTokenizer.nameForToken(expectedToken) + " or a " +
- MailcapTokenizer.nameForToken(otherExpectedToken) + " token.");
- }
-
- protected static void reportParseError(int expectedToken,
- int otherExpectedToken, int anotherExpectedToken, int actualToken,
- String actualTokenValue) throws MailcapParseException {
- if (LogSupport.isLoggable())
- LogSupport.log("PARSE ERROR: " + "Encountered a " +
- MailcapTokenizer.nameForToken(actualToken) + " token (" +
- actualTokenValue + ") while expecting a " +
- MailcapTokenizer.nameForToken(expectedToken) + ", a " +
- MailcapTokenizer.nameForToken(otherExpectedToken) + ", or a " +
- MailcapTokenizer.nameForToken(anotherExpectedToken) + " token.");
- throw new MailcapParseException("Encountered a " +
- MailcapTokenizer.nameForToken(actualToken) + " token (" +
- actualTokenValue + ") while expecting a " +
- MailcapTokenizer.nameForToken(expectedToken) + ", a " +
- MailcapTokenizer.nameForToken(otherExpectedToken) + ", or a " +
- MailcapTokenizer.nameForToken(anotherExpectedToken) + " token.");
- }
-
- /** for debugging
- public static void main(String[] args) throws Exception {
- Map masterHash = new HashMap();
- for (int i = 0; i < args.length; ++i) {
- System.out.println("Entry " + i + ": " + args[i]);
- parseLine(args[i], masterHash);
- }
-
- Enumeration types = masterHash.keys();
- while (types.hasMoreElements()) {
- String key = (String)types.nextElement();
- System.out.println("MIME Type: " + key);
-
- Map commandHash = (Map)masterHash.get(key);
- Enumeration commands = commandHash.keys();
- while (commands.hasMoreElements()) {
- String command = (String)commands.nextElement();
- System.out.println(" Command: " + command);
-
- Vector classes = (Vector)commandHash.get(command);
- for (int i = 0; i < classes.size(); ++i) {
- System.out.println(" Class: " +
- (String)classes.elementAt(i));
- }
- }
-
- System.out.println("");
- }
- }
- */
-}
diff --git a/src/share/jaf_classes/com/sun/activation/registries/MailcapParseException.java b/src/share/jaf_classes/com/sun/activation/registries/MailcapParseException.java
deleted file mode 100644
index 15d06a7b..00000000
--- a/src/share/jaf_classes/com/sun/activation/registries/MailcapParseException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 1997, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.activation.registries;
-
-/**
- * A class to encapsulate Mailcap parsing related exceptions
- */
-public class MailcapParseException extends Exception {
-
- public MailcapParseException() {
- super();
- }
-
- public MailcapParseException(String inInfo) {
- super(inInfo);
- }
-}
diff --git a/src/share/jaf_classes/com/sun/activation/registries/MailcapTokenizer.java b/src/share/jaf_classes/com/sun/activation/registries/MailcapTokenizer.java
deleted file mode 100644
index 38807ed5..00000000
--- a/src/share/jaf_classes/com/sun/activation/registries/MailcapTokenizer.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.activation.registries;
-
-/**
- * A tokenizer for strings in the form of "foo/bar; prop1=val1; ... ".
- * Useful for parsing MIME content types.
- */
-public class MailcapTokenizer {
-
- public static final int UNKNOWN_TOKEN = 0;
- public static final int START_TOKEN = 1;
- public static final int STRING_TOKEN = 2;
- public static final int EOI_TOKEN = 5;
- public static final int SLASH_TOKEN = '/';
- public static final int SEMICOLON_TOKEN = ';';
- public static final int EQUALS_TOKEN = '=';
-
- /**
- * Constructor
- *
- * @parameter inputString the string to tokenize
- */
- public MailcapTokenizer(String inputString) {
- data = inputString;
- dataIndex = 0;
- dataLength = inputString.length();
-
- currentToken = START_TOKEN;
- currentTokenValue = "";
-
- isAutoquoting = false;
- autoquoteChar = ';';
- }
-
- /**
- * Set whether auto-quoting is on or off.
- *
- * Auto-quoting means that all characters after the first
- * non-whitespace, non-control character up to the auto-quote
- * terminator character or EOI (minus any whitespace immediatley
- * preceeding it) is considered a token.
- *
- * This is required for handling command strings in a mailcap entry.
- */
- public void setIsAutoquoting(boolean value) {
- isAutoquoting = value;
- }
-
- /**
- * Retrieve current token.
- *
- * @returns The current token value
- */
- public int getCurrentToken() {
- return currentToken;
- }
-
- /*
- * Get a String that describes the given token.
- */
- public static String nameForToken(int token) {
- String name = "really unknown";
-
- switch(token) {
- case UNKNOWN_TOKEN:
- name = "unknown";
- break;
- case START_TOKEN:
- name = "start";
- break;
- case STRING_TOKEN:
- name = "string";
- break;
- case EOI_TOKEN:
- name = "EOI";
- break;
- case SLASH_TOKEN:
- name = "'/'";
- break;
- case SEMICOLON_TOKEN:
- name = "';'";
- break;
- case EQUALS_TOKEN:
- name = "'='";
- break;
- }
-
- return name;
- }
-
- /*
- * Retrieve current token value.
- *
- * @returns A String containing the current token value
- */
- public String getCurrentTokenValue() {
- return currentTokenValue;
- }
- /*
- * Process the next token.
- *
- * @returns the next token
- */
- public int nextToken() {
- if (dataIndex < dataLength) {
- // skip white space
- while ((dataIndex < dataLength) &&
- (isWhiteSpaceChar(data.charAt(dataIndex)))) {
- ++dataIndex;
- }
-
- if (dataIndex < dataLength) {
- // examine the current character and see what kind of token we have
- char c = data.charAt(dataIndex);
- if (isAutoquoting) {
- if (c == ';' || c == '=') {
- currentToken = c;
- currentTokenValue = new Character(c).toString();
- ++dataIndex;
- } else {
- processAutoquoteToken();
- }
- } else {
- if (isStringTokenChar(c)) {
- processStringToken();
- } else if ((c == '/') || (c == ';') || (c == '=')) {
- currentToken = c;
- currentTokenValue = new Character(c).toString();
- ++dataIndex;
- } else {
- currentToken = UNKNOWN_TOKEN;
- currentTokenValue = new Character(c).toString();
- ++dataIndex;
- }
- }
- } else {
- currentToken = EOI_TOKEN;
- currentTokenValue = null;
- }
- } else {
- currentToken = EOI_TOKEN;
- currentTokenValue = null;
- }
-
- return currentToken;
- }
-
- private void processStringToken() {
- // capture the initial index
- int initialIndex = dataIndex;
-
- // skip to 1st non string token character
- while ((dataIndex < dataLength) &&
- isStringTokenChar(data.charAt(dataIndex))) {
- ++dataIndex;
- }
-
- currentToken = STRING_TOKEN;
- currentTokenValue = data.substring(initialIndex, dataIndex);
- }
-
- private void processAutoquoteToken() {
- // capture the initial index
- int initialIndex = dataIndex;
-
- // now skip to the 1st non-escaped autoquote termination character
- // XXX - doesn't actually consider escaping
- boolean foundTerminator = false;
- while ((dataIndex < dataLength) && !foundTerminator) {
- char c = data.charAt(dataIndex);
- if (c != autoquoteChar) {
- ++dataIndex;
- } else {
- foundTerminator = true;
- }
- }
-
- currentToken = STRING_TOKEN;
- currentTokenValue =
- fixEscapeSequences(data.substring(initialIndex, dataIndex));
- }
-
- private static boolean isSpecialChar(char c) {
- boolean lAnswer = false;
-
- switch(c) {
- case '(':
- case ')':
- case '<':
- case '>':
- case '@':
- case ',':
- case ';':
- case ':':
- case '\\':
- case '"':
- case '/':
- case '[':
- case ']':
- case '?':
- case '=':
- lAnswer = true;
- break;
- }
-
- return lAnswer;
- }
-
- private static boolean isControlChar(char c) {
- return Character.isISOControl(c);
- }
-
- private static boolean isWhiteSpaceChar(char c) {
- return Character.isWhitespace(c);
- }
-
- private static boolean isStringTokenChar(char c) {
- return !isSpecialChar(c) && !isControlChar(c) && !isWhiteSpaceChar(c);
- }
-
- private static String fixEscapeSequences(String inputString) {
- int inputLength = inputString.length();
- StringBuffer buffer = new StringBuffer();
- buffer.ensureCapacity(inputLength);
-
- for (int i = 0; i < inputLength; ++i) {
- char currentChar = inputString.charAt(i);
- if (currentChar != '\\') {
- buffer.append(currentChar);
- } else {
- if (i < inputLength - 1) {
- char nextChar = inputString.charAt(i + 1);
- buffer.append(nextChar);
-
- // force a skip over the next character too
- ++i;
- } else {
- buffer.append(currentChar);
- }
- }
- }
-
- return buffer.toString();
- }
-
- private String data;
- private int dataIndex;
- private int dataLength;
- private int currentToken;
- private String currentTokenValue;
- private boolean isAutoquoting;
- private char autoquoteChar;
-
- /*
- public static void main(String[] args) {
- for (int i = 0; i < args.length; ++i) {
- MailcapTokenizer tokenizer = new MailcapTokenizer(args[i]);
-
- System.out.println("Original: |" + args[i] + "|");
-
- int currentToken = tokenizer.nextToken();
- while (currentToken != EOI_TOKEN) {
- switch(currentToken) {
- case UNKNOWN_TOKEN:
- System.out.println(" Unknown Token: |" + tokenizer.getCurrentTokenValue() + "|");
- break;
- case START_TOKEN:
- System.out.println(" Start Token: |" + tokenizer.getCurrentTokenValue() + "|");
- break;
- case STRING_TOKEN:
- System.out.println(" String Token: |" + tokenizer.getCurrentTokenValue() + "|");
- break;
- case EOI_TOKEN:
- System.out.println(" EOI Token: |" + tokenizer.getCurrentTokenValue() + "|");
- break;
- case SLASH_TOKEN:
- System.out.println(" Slash Token: |" + tokenizer.getCurrentTokenValue() + "|");
- break;
- case SEMICOLON_TOKEN:
- System.out.println(" Semicolon Token: |" + tokenizer.getCurrentTokenValue() + "|");
- break;
- case EQUALS_TOKEN:
- System.out.println(" Equals Token: |" + tokenizer.getCurrentTokenValue() + "|");
- break;
- default:
- System.out.println(" Really Unknown Token: |" + tokenizer.getCurrentTokenValue() + "|");
- break;
- }
-
- currentToken = tokenizer.nextToken();
- }
-
- System.out.println("");
- }
- }
- */
-}
diff --git a/src/share/jaf_classes/com/sun/activation/registries/MimeTypeEntry.java b/src/share/jaf_classes/com/sun/activation/registries/MimeTypeEntry.java
deleted file mode 100644
index 0e34b184..00000000
--- a/src/share/jaf_classes/com/sun/activation/registries/MimeTypeEntry.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.activation.registries;
-
-import java.lang.*;
-
-public class MimeTypeEntry {
- private String type;
- private String extension;
-
- public MimeTypeEntry(String mime_type, String file_ext) {
- type = mime_type;
- extension = file_ext;
- }
-
- public String getMIMEType() {
- return type;
- }
-
- public String getFileExtension() {
- return extension;
- }
-
- public String toString() {
- return "MIMETypeEntry: " + type + ", " + extension;
- }
-}
diff --git a/src/share/jaf_classes/com/sun/activation/registries/MimeTypeFile.java b/src/share/jaf_classes/com/sun/activation/registries/MimeTypeFile.java
deleted file mode 100644
index aa69c35b..00000000
--- a/src/share/jaf_classes/com/sun/activation/registries/MimeTypeFile.java
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.activation.registries;
-
-import java.io.*;
-import java.util.*;
-
-public class MimeTypeFile {
- private String fname = null;
- private Hashtable type_hash = new Hashtable();
-
- /**
- * The construtor that takes a filename as an argument.
- *
- * @param new_fname The file name of the mime types file.
- */
- public MimeTypeFile(String new_fname) throws IOException {
- File mime_file = null;
- FileReader fr = null;
-
- fname = new_fname; // remember the file name
-
- mime_file = new File(fname); // get a file object
-
- fr = new FileReader(mime_file);
-
- try {
- parse(new BufferedReader(fr));
- } finally {
- try {
- fr.close(); // close it
- } catch (IOException e) {
- // ignore it
- }
- }
- }
-
- public MimeTypeFile(InputStream is) throws IOException {
- parse(new BufferedReader(new InputStreamReader(is, "iso-8859-1")));
- }
-
- /**
- * Creates an empty DB.
- */
- public MimeTypeFile() {
- }
-
- /**
- * get the MimeTypeEntry based on the file extension
- */
- public MimeTypeEntry getMimeTypeEntry(String file_ext) {
- return (MimeTypeEntry)type_hash.get((Object)file_ext);
- }
-
- /**
- * Get the MIME type string corresponding to the file extension.
- */
- public String getMIMETypeString(String file_ext) {
- MimeTypeEntry entry = this.getMimeTypeEntry(file_ext);
-
- if (entry != null)
- return entry.getMIMEType();
- else
- return null;
- }
-
- /**
- * Appends string of entries to the types registry, must be valid
- * .mime.types format.
- * A mime.types entry is one of two forms:
- *
- * type/subtype ext1 ext2 ...
- * or
- * type=type/subtype desc="description of type" exts=ext1,ext2,...
- *
- * Example:
- * # this is a test
- * audio/basic au
- * text/plain txt text
- * type=application/postscript exts=ps,eps
- */
- public void appendToRegistry(String mime_types) {
- try {
- parse(new BufferedReader(new StringReader(mime_types)));
- } catch (IOException ex) {
- // can't happen
- }
- }
-
- /**
- * Parse a stream of mime.types entries.
- */
- private void parse(BufferedReader buf_reader) throws IOException {
- String line = null, prev = null;
-
- while ((line = buf_reader.readLine()) != null) {
- if (prev == null)
- prev = line;
- else
- prev += line;
- int end = prev.length();
- if (prev.length() > 0 && prev.charAt(end - 1) == '\\') {
- prev = prev.substring(0, end - 1);
- continue;
- }
- this.parseEntry(prev);
- prev = null;
- }
- if (prev != null)
- this.parseEntry(prev);
- }
-
- /**
- * Parse single mime.types entry.
- */
- private void parseEntry(String line) {
- String mime_type = null;
- String file_ext = null;
- line = line.trim();
-
- if (line.length() == 0) // empty line...
- return; // BAIL!
-
- // check to see if this is a comment line?
- if (line.charAt(0) == '#')
- return; // then we are done!
-
- // is it a new format line or old format?
- if (line.indexOf('=') > 0) {
- // new format
- LineTokenizer lt = new LineTokenizer(line);
- while (lt.hasMoreTokens()) {
- String name = lt.nextToken();
- String value = null;
- if (lt.hasMoreTokens() && lt.nextToken().equals("=") &&
- lt.hasMoreTokens())
- value = lt.nextToken();
- if (value == null) {
- if (LogSupport.isLoggable())
- LogSupport.log("Bad .mime.types entry: " + line);
- return;
- }
- if (name.equals("type"))
- mime_type = value;
- else if (name.equals("exts")) {
- StringTokenizer st = new StringTokenizer(value, ",");
- while (st.hasMoreTokens()) {
- file_ext = st.nextToken();
- MimeTypeEntry entry =
- new MimeTypeEntry(mime_type, file_ext);
- type_hash.put(file_ext, entry);
- if (LogSupport.isLoggable())
- LogSupport.log("Added: " + entry.toString());
- }
- }
- }
- } else {
- // old format
- // count the tokens
- StringTokenizer strtok = new StringTokenizer(line);
- int num_tok = strtok.countTokens();
-
- if (num_tok == 0) // empty line
- return;
-
- mime_type = strtok.nextToken(); // get the MIME type
-
- while (strtok.hasMoreTokens()) {
- MimeTypeEntry entry = null;
-
- file_ext = strtok.nextToken();
- entry = new MimeTypeEntry(mime_type, file_ext);
- type_hash.put(file_ext, entry);
- if (LogSupport.isLoggable())
- LogSupport.log("Added: " + entry.toString());
- }
- }
- }
-
- // for debugging
- /*
- public static void main(String[] argv) throws Exception {
- MimeTypeFile mf = new MimeTypeFile(argv[0]);
- System.out.println("ext " + argv[1] + " type " +
- mf.getMIMETypeString(argv[1]));
- System.exit(0);
- }
- */
-}
-
-class LineTokenizer {
- private int currentPosition;
- private int maxPosition;
- private String str;
- private Vector stack = new Vector();
- private static final String singles = "="; // single character tokens
-
- /**
- * Constructs a tokenizer for the specified string.
- * <p>
- *
- * @param str a string to be parsed.
- */
- public LineTokenizer(String str) {
- currentPosition = 0;
- this.str = str;
- maxPosition = str.length();
- }
-
- /**
- * Skips white space.
- */
- private void skipWhiteSpace() {
- while ((currentPosition < maxPosition) &&
- Character.isWhitespace(str.charAt(currentPosition))) {
- currentPosition++;
- }
- }
-
- /**
- * Tests if there are more tokens available from this tokenizer's string.
- *
- * @return <code>true</code> if there are more tokens available from this
- * tokenizer's string; <code>false</code> otherwise.
- */
- public boolean hasMoreTokens() {
- if (stack.size() > 0)
- return true;
- skipWhiteSpace();
- return (currentPosition < maxPosition);
- }
-
- /**
- * Returns the next token from this tokenizer.
- *
- * @return the next token from this tokenizer.
- * @exception NoSuchElementException if there are no more tokens in this
- * tokenizer's string.
- */
- public String nextToken() {
- int size = stack.size();
- if (size > 0) {
- String t = (String)stack.elementAt(size - 1);
- stack.removeElementAt(size - 1);
- return t;
- }
- skipWhiteSpace();
-
- if (currentPosition >= maxPosition) {
- throw new NoSuchElementException();
- }
-
- int start = currentPosition;
- char c = str.charAt(start);
- if (c == '"') {
- currentPosition++;
- boolean filter = false;
- while (currentPosition < maxPosition) {
- c = str.charAt(currentPosition++);
- if (c == '\\') {
- currentPosition++;
- filter = true;
- } else if (c == '"') {
- String s;
-
- if (filter) {
- StringBuffer sb = new StringBuffer();
- for (int i = start + 1; i < currentPosition - 1; i++) {
- c = str.charAt(i);
- if (c != '\\')
- sb.append(c);
- }
- s = sb.toString();
- } else
- s = str.substring(start + 1, currentPosition - 1);
- return s;
- }
- }
- } else if (singles.indexOf(c) >= 0) {
- currentPosition++;
- } else {
- while ((currentPosition < maxPosition) &&
- singles.indexOf(str.charAt(currentPosition)) < 0 &&
- !Character.isWhitespace(str.charAt(currentPosition))) {
- currentPosition++;
- }
- }
- return str.substring(start, currentPosition);
- }
-
- public void pushToken(String token) {
- stack.addElement(token);
- }
-}
diff --git a/src/share/jaf_classes/javax/activation/ActivationDataFlavor.java b/src/share/jaf_classes/javax/activation/ActivationDataFlavor.java
deleted file mode 100644
index 500dc77c..00000000
--- a/src/share/jaf_classes/javax/activation/ActivationDataFlavor.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.awt.datatransfer.DataFlavor;
-import java.io.IOException;
-import javax.activation.MimeType;
-
-/**
- * The ActivationDataFlavor class is a special subclass of
- * <code>java.awt.datatransfer.DataFlavor</code>. It allows the JAF to
- * set all three values stored by the DataFlavor class via a new
- * constructor. It also contains improved MIME parsing in the <code>equals
- * </code> method. Except for the improved parsing, its semantics are
- * identical to that of the JDK's DataFlavor class.
- *
- * @since 1.6
- */
-
-public class ActivationDataFlavor extends DataFlavor {
-
- /*
- * Raison d'etre:
- *
- * The DataFlavor class included in JDK 1.1 has several limitations
- * including piss poor MIME type parsing, and the limitation of
- * only supporting serialized objects and InputStreams as
- * representation objects. This class 'fixes' that.
- */
-
- // I think for now I'll keep copies of all the variables and
- // then later I may choose try to better coexist with the base
- // class *sigh*
- private String mimeType = null;
- private MimeType mimeObject = null;
- private String humanPresentableName = null;
- private Class representationClass = null;
-
- /**
- * Construct a DataFlavor that represents an arbitrary
- * Java object. This constructor is an extension of the
- * JDK's DataFlavor in that it allows the explicit setting
- * of all three DataFlavor attributes.
- * <p>
- * The returned DataFlavor will have the following characteristics:
- * <p>
- * representationClass = representationClass<br>
- * mimeType = mimeType<br>
- * humanName = humanName
- * <p>
- *
- * @param representationClass the class used in this DataFlavor
- * @param mimeType the MIME type of the data represented by this class
- * @param humanPresentableName the human presentable name of the flavor
- */
- public ActivationDataFlavor(Class representationClass,
- String mimeType, String humanPresentableName) {
- super(mimeType, humanPresentableName); // need to call super
-
- // init private variables:
- this.mimeType = mimeType;
- this.humanPresentableName = humanPresentableName;
- this.representationClass = representationClass;
- }
-
- /**
- * Construct a DataFlavor that represents a MimeType.
- * <p>
- * The returned DataFlavor will have the following characteristics:
- * <p>
- * If the mimeType is "application/x-java-serialized-object;
- * class=", the result is the same as calling new
- * DataFlavor(Class.forName()) as above.
- * <p>
- * otherwise:
- * <p>
- * representationClass = InputStream<p>
- * mimeType = mimeType<p>
- *
- * @param representationClass the class used in this DataFlavor
- * @param humanPresentableName the human presentable name of the flavor
- */
- public ActivationDataFlavor(Class representationClass,
- String humanPresentableName) {
- super(representationClass, humanPresentableName);
- this.mimeType = super.getMimeType();
- this.representationClass = representationClass;
- this.humanPresentableName = humanPresentableName;
- }
-
- /**
- * Construct a DataFlavor that represents a MimeType.
- * <p>
- * The returned DataFlavor will have the following characteristics:
- * <p>
- * If the mimeType is "application/x-java-serialized-object; class=",
- * the result is the same as calling new DataFlavor(Class.forName()) as
- * above, otherwise:
- * <p>
- * representationClass = InputStream<p>
- * mimeType = mimeType
- *
- * @param mimeType the MIME type of the data represented by this class
- * @param humanPresentableName the human presentable name of the flavor
- */
- public ActivationDataFlavor(String mimeType, String humanPresentableName) {
- super(mimeType, humanPresentableName);
- this.mimeType = mimeType;
- try {
- this.representationClass = Class.forName("java.io.InputStream");
- } catch (ClassNotFoundException ex) {
- // XXX - should never happen, ignore it
- }
- this.humanPresentableName = humanPresentableName;
- }
-
- /**
- * Return the MIME type for this DataFlavor.
- *
- * @return the MIME type
- */
- public String getMimeType() {
- return mimeType;
- }
-
- /**
- * Return the representation class.
- *
- * @return the representation class
- */
- public Class getRepresentationClass() {
- return representationClass;
- }
-
- /**
- * Return the Human Presentable name.
- *
- * @return the human presentable name
- */
- public String getHumanPresentableName() {
- return humanPresentableName;
- }
-
- /**
- * Set the human presentable name.
- *
- * @param humanPresentableName the name to set
- */
- public void setHumanPresentableName(String humanPresentableName) {
- this.humanPresentableName = humanPresentableName;
- }
-
- /**
- * Compares the DataFlavor passed in with this DataFlavor; calls
- * the <code>isMimeTypeEqual</code> method.
- *
- * @param dataFlavor the DataFlavor to compare with
- * @return true if the MIME type and representation class
- * are the same
- */
- public boolean equals(DataFlavor dataFlavor) {
- return (isMimeTypeEqual(dataFlavor) &&
- dataFlavor.getRepresentationClass() == representationClass);
- }
-
- /**
- * Is the string representation of the MIME type passed in equivalent
- * to the MIME type of this DataFlavor. <p>
- *
- * ActivationDataFlavor delegates the comparison of MIME types to
- * the MimeType class included as part of the JavaBeans Activation
- * Framework. This provides a more robust comparison than is normally
- * available in the DataFlavor class.
- *
- * @param mimeType the MIME type
- * @return true if the same MIME type
- */
- public boolean isMimeTypeEqual(String mimeType) {
- MimeType mt = null;
- try {
- if (mimeObject == null)
- mimeObject = new MimeType(this.mimeType);
- mt = new MimeType(mimeType);
- } catch (MimeTypeParseException e) {
- // something didn't parse, do a crude comparison
- return this.mimeType.equalsIgnoreCase(mimeType);
- }
-
- return mimeObject.match(mt);
- }
-
- /**
- * Called on DataFlavor for every MIME Type parameter to allow DataFlavor
- * subclasses to handle special parameters like the text/plain charset
- * parameters, whose values are case insensitive. (MIME type parameter
- * values are supposed to be case sensitive).
- * <p>
- * This method is called for each parameter name/value pair and should
- * return the normalized representation of the parameterValue.
- * This method is never invoked by this implementation.
- *
- * @param parameterName the parameter name
- * @param parameterValue the parameter value
- * @return the normalized parameter value
- * @deprecated
- */
- protected String normalizeMimeTypeParameter(String parameterName,
- String parameterValue) {
- return parameterValue;
- }
-
- /**
- * Called for each MIME type string to give DataFlavor subtypes the
- * opportunity to change how the normalization of MIME types is
- * accomplished.
- * One possible use would be to add default parameter/value pairs in cases
- * where none are present in the MIME type string passed in.
- * This method is never invoked by this implementation.
- *
- * @param mimeType the MIME type
- * @return the normalized MIME type
- * @deprecated
- */
- protected String normalizeMimeType(String mimeType) {
- return mimeType;
- }
-}
diff --git a/src/share/jaf_classes/javax/activation/CommandInfo.java b/src/share/jaf_classes/javax/activation/CommandInfo.java
deleted file mode 100644
index 475de00e..00000000
--- a/src/share/jaf_classes/javax/activation/CommandInfo.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.io.*;
-import java.beans.Beans;
-
-/**
- * The CommandInfo class is used by CommandMap implementations to
- * describe the results of command requests. It provides the requestor
- * with both the verb requested, as well as an instance of the
- * bean. There is also a method that will return the name of the
- * class that implements the command but <i>it is not guaranteed to
- * return a valid value</i>. The reason for this is to allow CommandMap
- * implmentations that subclass CommandInfo to provide special
- * behavior. For example a CommandMap could dynamically generate
- * JavaBeans. In this case, it might not be possible to create an
- * object with all the correct state information solely from the class
- * name.
- *
- * @since 1.6
- */
-
-public class CommandInfo {
- private String verb;
- private String className;
-
- /**
- * The Constructor for CommandInfo.
- * @param verb The command verb this CommandInfo decribes.
- * @param className The command's fully qualified class name.
- */
- public CommandInfo(String verb, String className) {
- this.verb = verb;
- this.className = className;
- }
-
- /**
- * Return the command verb.
- *
- * @return the command verb.
- */
- public String getCommandName() {
- return verb;
- }
-
- /**
- * Return the command's class name. <i>This method MAY return null in
- * cases where a CommandMap subclassed CommandInfo for its
- * own purposes.</i> In other words, it might not be possible to
- * create the correct state in the command by merely knowing
- * its class name. <b>DO NOT DEPEND ON THIS METHOD RETURNING
- * A VALID VALUE!</b>
- *
- * @return The class name of the command, or <i>null</i>
- */
- public String getCommandClass() {
- return className;
- }
-
- /**
- * Return the instantiated JavaBean component.
- * <p>
- * Begin by instantiating the component with
- * <code>Beans.instantiate()</code>.
- * <p>
- * If the bean implements the <code>javax.activation.CommandObject</code>
- * interface, call its <code>setCommandContext</code> method.
- * <p>
- * If the DataHandler parameter is null, then the bean is
- * instantiated with no data. NOTE: this may be useful
- * if for some reason the DataHandler that is passed in
- * throws IOExceptions when this method attempts to
- * access its InputStream. It will allow the caller to
- * retrieve a reference to the bean if it can be
- * instantiated.
- * <p>
- * If the bean does NOT implement the CommandObject interface,
- * this method will check if it implements the
- * java.io.Externalizable interface. If it does, the bean's
- * readExternal method will be called if an InputStream
- * can be acquired from the DataHandler.<p>
- *
- * @param dh The DataHandler that describes the data to be
- * passed to the command.
- * @param loader The ClassLoader to be used to instantiate the bean.
- * @return The bean
- * @see java.beans.Beans#instantiate
- * @see javax.activation.CommandObject
- */
- public Object getCommandObject(DataHandler dh, ClassLoader loader)
- throws IOException, ClassNotFoundException {
- Object new_bean = null;
-
- // try to instantiate the bean
- new_bean = java.beans.Beans.instantiate(loader, className);
-
- // if we got one and it is a CommandObject
- if (new_bean != null) {
- if (new_bean instanceof CommandObject) {
- ((CommandObject)new_bean).setCommandContext(verb, dh);
- } else if (new_bean instanceof Externalizable) {
- if (dh != null) {
- InputStream is = dh.getInputStream();
- if (is != null) {
- ((Externalizable)new_bean).readExternal(
- new ObjectInputStream(is));
- }
- }
- }
- }
-
- return new_bean;
- }
-}
diff --git a/src/share/jaf_classes/javax/activation/CommandMap.java b/src/share/jaf_classes/javax/activation/CommandMap.java
deleted file mode 100644
index f3b6e864..00000000
--- a/src/share/jaf_classes/javax/activation/CommandMap.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.util.Map;
-import java.util.WeakHashMap;
-
-
-/**
- * The CommandMap class provides an interface to a registry of
- * command objects available in the system.
- * Developers are expected to either use the CommandMap
- * implementation included with this package (MailcapCommandMap) or
- * develop their own. Note that some of the methods in this class are
- * abstract.
- *
- * @since 1.6
- */
-public abstract class CommandMap {
- private static CommandMap defaultCommandMap = null;
- private static Map<ClassLoader,CommandMap> map =
- new WeakHashMap<ClassLoader,CommandMap>();
-
- /**
- * Get the default CommandMap.
- * <p>
- *
- * <ul>
- * <li> In cases where a CommandMap instance has been previously set
- * to some value (via <i>setDefaultCommandMap</i>)
- * return the CommandMap.
- * <li>
- * In cases where no CommandMap has been set, the CommandMap
- * creates an instance of <code>MailcapCommandMap</code> and
- * set that to the default, returning its value.
- *
- * </ul>
- *
- * @return the CommandMap
- */
- public static synchronized CommandMap getDefaultCommandMap() {
- if (defaultCommandMap != null)
- return defaultCommandMap;
-
- // fetch per-thread-context-class-loader default
- ClassLoader tccl = SecuritySupport.getContextClassLoader();
- CommandMap def = map.get(tccl);
- if (def == null) {
- def = new MailcapCommandMap();
- map.put(tccl, def);
- }
- return def;
- }
-
- /**
- * Set the default CommandMap. Reset the CommandMap to the default by
- * calling this method with <code>null</code>.
- *
- * @param commandMap The new default CommandMap.
- * @exception SecurityException if the caller doesn't have permission
- * to change the default
- */
- public static synchronized void setDefaultCommandMap(CommandMap commandMap) {
- SecurityManager security = System.getSecurityManager();
- if (security != null) {
- try {
- // if it's ok with the SecurityManager, it's ok with me...
- security.checkSetFactory();
- } catch (SecurityException ex) {
- // otherwise, we also allow it if this code and the
- // factory come from the same (non-system) class loader (e.g.,
- // the JAF classes were loaded with the applet classes).
- if (CommandMap.class.getClassLoader() == null ||
- CommandMap.class.getClassLoader() !=
- commandMap.getClass().getClassLoader())
- throw ex;
- }
- }
- // remove any per-thread-context-class-loader CommandMap
- map.remove(SecuritySupport.getContextClassLoader());
- defaultCommandMap = commandMap;
- }
-
- /**
- * Get the preferred command list from a MIME Type. The actual semantics
- * are determined by the implementation of the CommandMap.
- *
- * @param mimeType the MIME type
- * @return the CommandInfo classes that represent the command Beans.
- */
- abstract public CommandInfo[] getPreferredCommands(String mimeType);
-
- /**
- * Get the preferred command list from a MIME Type. The actual semantics
- * are determined by the implementation of the CommandMap. <p>
- *
- * The <code>DataSource</code> provides extra information, such as
- * the file name, that a CommandMap implementation may use to further
- * refine the list of commands that are returned. The implementation
- * in this class simply calls the <code>getPreferredCommands</code>
- * method that ignores this argument.
- *
- * @param mimeType the MIME type
- * @param ds a DataSource for the data
- * @return the CommandInfo classes that represent the command Beans.
- * @since JAF 1.1
- */
- public CommandInfo[] getPreferredCommands(String mimeType, DataSource ds) {
- return getPreferredCommands(mimeType);
- }
-
- /**
- * Get all the available commands for this type. This method
- * should return all the possible commands for this MIME type.
- *
- * @param mimeType the MIME type
- * @return the CommandInfo objects representing all the commands.
- */
- abstract public CommandInfo[] getAllCommands(String mimeType);
-
- /**
- * Get all the available commands for this type. This method
- * should return all the possible commands for this MIME type. <p>
- *
- * The <code>DataSource</code> provides extra information, such as
- * the file name, that a CommandMap implementation may use to further
- * refine the list of commands that are returned. The implementation
- * in this class simply calls the <code>getAllCommands</code>
- * method that ignores this argument.
- *
- * @param mimeType the MIME type
- * @param ds a DataSource for the data
- * @return the CommandInfo objects representing all the commands.
- * @since JAF 1.1
- */
- public CommandInfo[] getAllCommands(String mimeType, DataSource ds) {
- return getAllCommands(mimeType);
- }
-
- /**
- * Get the default command corresponding to the MIME type.
- *
- * @param mimeType the MIME type
- * @param cmdName the command name
- * @return the CommandInfo corresponding to the command.
- */
- abstract public CommandInfo getCommand(String mimeType, String cmdName);
-
- /**
- * Get the default command corresponding to the MIME type. <p>
- *
- * The <code>DataSource</code> provides extra information, such as
- * the file name, that a CommandMap implementation may use to further
- * refine the command that is chosen. The implementation
- * in this class simply calls the <code>getCommand</code>
- * method that ignores this argument.
- *
- * @param mimeType the MIME type
- * @param cmdName the command name
- * @param ds a DataSource for the data
- * @return the CommandInfo corresponding to the command.
- * @since JAF 1.1
- */
- public CommandInfo getCommand(String mimeType, String cmdName,
- DataSource ds) {
- return getCommand(mimeType, cmdName);
- }
-
- /**
- * Locate a DataContentHandler that corresponds to the MIME type.
- * The mechanism and semantics for determining this are determined
- * by the implementation of the particular CommandMap.
- *
- * @param mimeType the MIME type
- * @return the DataContentHandler for the MIME type
- */
- abstract public DataContentHandler createDataContentHandler(String
- mimeType);
-
- /**
- * Locate a DataContentHandler that corresponds to the MIME type.
- * The mechanism and semantics for determining this are determined
- * by the implementation of the particular CommandMap. <p>
- *
- * The <code>DataSource</code> provides extra information, such as
- * the file name, that a CommandMap implementation may use to further
- * refine the choice of DataContentHandler. The implementation
- * in this class simply calls the <code>createDataContentHandler</code>
- * method that ignores this argument.
- *
- * @param mimeType the MIME type
- * @param ds a DataSource for the data
- * @return the DataContentHandler for the MIME type
- * @since JAF 1.1
- */
- public DataContentHandler createDataContentHandler(String mimeType,
- DataSource ds) {
- return createDataContentHandler(mimeType);
- }
-
- /**
- * Get all the MIME types known to this command map.
- * If the command map doesn't support this operation,
- * null is returned.
- *
- * @return array of MIME types as strings, or null if not supported
- * @since JAF 1.1
- */
- public String[] getMimeTypes() {
- return null;
- }
-}
diff --git a/src/share/jaf_classes/javax/activation/CommandObject.java b/src/share/jaf_classes/javax/activation/CommandObject.java
deleted file mode 100644
index 3f7edd84..00000000
--- a/src/share/jaf_classes/javax/activation/CommandObject.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.io.IOException;
-
-/**
- * JavaBeans components that are Activation Framework aware implement
- * this interface to find out which command verb they're being asked
- * to perform, and to obtain the DataHandler representing the
- * data they should operate on. JavaBeans that don't implement
- * this interface may be used as well. Such commands may obtain
- * the data using the Externalizable interface, or using an
- * application-specific method.<p>
- *
- * @since 1.6
- */
-public interface CommandObject {
-
- /**
- * Initialize the Command with the verb it is requested to handle
- * and the DataHandler that describes the data it will
- * operate on. <b>NOTE:</b> it is acceptable for the caller
- * to pass <i>null</i> as the value for <code>DataHandler</code>.
- *
- * @param verb The Command Verb this object refers to.
- * @param dh The DataHandler.
- */
- public void setCommandContext(String verb, DataHandler dh)
- throws IOException;
-}
diff --git a/src/share/jaf_classes/javax/activation/DataContentHandler.java b/src/share/jaf_classes/javax/activation/DataContentHandler.java
deleted file mode 100644
index ef871428..00000000
--- a/src/share/jaf_classes/javax/activation/DataContentHandler.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.awt.datatransfer.DataFlavor;
-import java.awt.datatransfer.UnsupportedFlavorException;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import javax.activation.DataSource;
-
-/**
- * The DataContentHandler interface is implemented by objects that can
- * be used to extend the capabilities of the DataHandler's implementation
- * of the Transferable interface. Through <code>DataContentHandlers</code>
- * the framework can be extended to convert streams in to objects, and
- * to write objects to streams. <p>
- *
- * Applications don't generally call the methods in DataContentHandlers
- * directly. Instead, an application calls the equivalent methods in
- * DataHandler. The DataHandler will attempt to find an appropriate
- * DataContentHandler that corresponds to its MIME type using the
- * current DataContentHandlerFactory. The DataHandler then calls
- * through to the methods in the DataContentHandler.
- *
- * @since 1.6
- */
-
-public interface DataContentHandler {
- /**
- * Returns an array of DataFlavor objects indicating the flavors the
- * data can be provided in. The array should be ordered according to
- * preference for providing the data (from most richly descriptive to
- * least descriptive).
- *
- * @return The DataFlavors.
- */
- public DataFlavor[] getTransferDataFlavors();
-
- /**
- * Returns an object which represents the data to be transferred.
- * The class of the object returned is defined by the representation class
- * of the flavor.
- *
- * @param df The DataFlavor representing the requested type.
- * @param ds The DataSource representing the data to be converted.
- * @return The constructed Object.
- * @exception UnsupportedFlavorException if the handler doesn't
- * support the requested flavor
- * @exception IOException if the data can't be accessed
- */
- public Object getTransferData(DataFlavor df, DataSource ds)
- throws UnsupportedFlavorException, IOException;
-
- /**
- * Return an object representing the data in its most preferred form.
- * Generally this will be the form described by the first DataFlavor
- * returned by the <code>getTransferDataFlavors</code> method.
- *
- * @param ds The DataSource representing the data to be converted.
- * @return The constructed Object.
- * @exception IOException if the data can't be accessed
- */
- public Object getContent(DataSource ds) throws IOException;
-
- /**
- * Convert the object to a byte stream of the specified MIME type
- * and write it to the output stream.
- *
- * @param obj The object to be converted.
- * @param mimeType The requested MIME type of the resulting byte stream.
- * @param os The output stream into which to write the converted
- * byte stream.
- * @exception IOException errors writing to the stream
- */
- public void writeTo(Object obj, String mimeType, OutputStream os)
- throws IOException;
-}
diff --git a/src/share/jaf_classes/javax/activation/DataContentHandlerFactory.java b/src/share/jaf_classes/javax/activation/DataContentHandlerFactory.java
deleted file mode 100644
index 78f70058..00000000
--- a/src/share/jaf_classes/javax/activation/DataContentHandlerFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-/**
- * This interface defines a factory for <code>DataContentHandlers</code>. An
- * implementation of this interface should map a MIME type into an
- * instance of DataContentHandler. The design pattern for classes implementing
- * this interface is the same as for the ContentHandler mechanism used in
- * <code>java.net.URL</code>.
- *
- * @since 1.6
- */
-
-public interface DataContentHandlerFactory {
-
- /**
- * Creates a new DataContentHandler object for the MIME type.
- *
- * @param mimeType the MIME type to create the DataContentHandler for.
- * @return The new <code>DataContentHandler</code>, or <i>null</i>
- * if none are found.
- */
- public DataContentHandler createDataContentHandler(String mimeType);
-}
diff --git a/src/share/jaf_classes/javax/activation/DataHandler.java b/src/share/jaf_classes/javax/activation/DataHandler.java
deleted file mode 100644
index 4e1c49f8..00000000
--- a/src/share/jaf_classes/javax/activation/DataHandler.java
+++ /dev/null
@@ -1,899 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PipedInputStream;
-import java.io.PipedOutputStream;
-import java.io.OutputStreamWriter;
-import java.net.URL;
-import java.awt.datatransfer.Transferable;
-import java.awt.datatransfer.DataFlavor;
-import java.awt.datatransfer.UnsupportedFlavorException;
-
-/**
- * The DataHandler class provides a consistent interface to data
- * available in many different sources and formats.
- * It manages simple stream to string conversions and related operations
- * using DataContentHandlers.
- * It provides access to commands that can operate on the data.
- * The commands are found using a CommandMap. <p>
- *
- * <b>DataHandler and the Transferable Interface</b><p>
- * DataHandler implements the Transferable interface so that data can
- * be used in AWT data transfer operations, such as cut and paste and
- * drag and drop. The implementation of the Transferable interface
- * relies on the availability of an installed DataContentHandler
- * object corresponding to the MIME type of the data represented in
- * the specific instance of the DataHandler.<p>
- *
- * <b>DataHandler and CommandMaps</b><p>
- * The DataHandler keeps track of the current CommandMap that it uses to
- * service requests for commands (<code>getCommand</code>,
- * <code>getAllCommands</code>, <code>getPreferredCommands</code>).
- * Each instance of a DataHandler may have a CommandMap associated with
- * it using the <code>setCommandMap</code> method. If a CommandMap was
- * not set, DataHandler calls the <code>getDefaultCommandMap</code>
- * method in CommandMap and uses the value it returns. See
- * <i>CommandMap</i> for more information. <p>
- *
- * <b>DataHandler and URLs</b><p>
- * The current DataHandler implementation creates a private
- * instance of URLDataSource when it is constructed with a URL.
- *
- * @see javax.activation.CommandMap
- * @see javax.activation.DataContentHandler
- * @see javax.activation.DataSource
- * @see javax.activation.URLDataSource
- *
- * @since 1.6
- */
-
-public class DataHandler implements Transferable {
-
- // Use the datasource to indicate whether we were started via the
- // DataSource constructor or the object constructor.
- private DataSource dataSource = null;
- private DataSource objDataSource = null;
-
- // The Object and mimetype from the constructor (if passed in).
- // object remains null if it was instantiated with a
- // DataSource.
- private Object object = null;
- private String objectMimeType = null;
-
- // Keep track of the CommandMap
- private CommandMap currentCommandMap = null;
-
- // our transfer flavors
- private static final DataFlavor emptyFlavors[] = new DataFlavor[0];
- private DataFlavor transferFlavors[] = emptyFlavors;
-
- // our DataContentHandler
- private DataContentHandler dataContentHandler = null;
- private DataContentHandler factoryDCH = null;
-
- // our DataContentHandlerFactory
- private static DataContentHandlerFactory factory = null;
- private DataContentHandlerFactory oldFactory = null;
- // the short representation of the ContentType (sans params)
- private String shortType = null;
-
- /**
- * Create a <code>DataHandler</code> instance referencing the
- * specified DataSource. The data exists in a byte stream form.
- * The DataSource will provide an InputStream to access the data.
- *
- * @param ds the DataSource
- */
- public DataHandler(DataSource ds) {
- // save a reference to the incoming DS
- dataSource = ds;
- oldFactory = factory; // keep track of the factory
- }
-
- /**
- * Create a <code>DataHandler</code> instance representing an object
- * of this MIME type. This constructor is
- * used when the application already has an in-memory representation
- * of the data in the form of a Java Object.
- *
- * @param obj the Java Object
- * @param mimeType the MIME type of the object
- */
- public DataHandler(Object obj, String mimeType) {
- object = obj;
- objectMimeType = mimeType;
- oldFactory = factory; // keep track of the factory
- }
-
- /**
- * Create a <code>DataHandler</code> instance referencing a URL.
- * The DataHandler internally creates a <code>URLDataSource</code>
- * instance to represent the URL.
- *
- * @param url a URL object
- */
- public DataHandler(URL url) {
- dataSource = new URLDataSource(url);
- oldFactory = factory; // keep track of the factory
- }
-
- /**
- * Return the CommandMap for this instance of DataHandler.
- */
- private synchronized CommandMap getCommandMap() {
- if (currentCommandMap != null)
- return currentCommandMap;
- else
- return CommandMap.getDefaultCommandMap();
- }
-
- /**
- * Return the DataSource associated with this instance
- * of DataHandler.
- * <p>
- * For DataHandlers that have been instantiated with a DataSource,
- * this method returns the DataSource that was used to create the
- * DataHandler object. In other cases the DataHandler
- * constructs a DataSource from the data used to construct
- * the DataHandler. DataSources created for DataHandlers <b>not</b>
- * instantiated with a DataSource are cached for performance
- * reasons.
- *
- * @return a valid DataSource object for this DataHandler
- */
- public DataSource getDataSource() {
- if (dataSource == null) {
- // create one on the fly
- if (objDataSource == null)
- objDataSource = new DataHandlerDataSource(this);
- return objDataSource;
- }
- return dataSource;
- }
-
- /**
- * Return the name of the data object. If this DataHandler
- * was created with a DataSource, this method calls through
- * to the <code>DataSource.getName</code> method, otherwise it
- * returns <i>null</i>.
- *
- * @return the name of the object
- */
- public String getName() {
- if (dataSource != null)
- return dataSource.getName();
- else
- return null;
- }
-
- /**
- * Return the MIME type of this object as retrieved from
- * the source object. Note that this is the <i>full</i>
- * type with parameters.
- *
- * @return the MIME type
- */
- public String getContentType() {
- if (dataSource != null) // data source case
- return dataSource.getContentType();
- else
- return objectMimeType; // obj/type case
- }
-
- /**
- * Get the InputStream for this object. <p>
- *
- * For DataHandlers instantiated with a DataSource, the DataHandler
- * calls the <code>DataSource.getInputStream</code> method and
- * returns the result to the caller.
- * <p>
- * For DataHandlers instantiated with an Object, the DataHandler
- * first attempts to find a DataContentHandler for the Object. If
- * the DataHandler can not find a DataContentHandler for this MIME
- * type, it throws an UnsupportedDataTypeException. If it is
- * successful, it creates a pipe and a thread. The thread uses the
- * DataContentHandler's <code>writeTo</code> method to write the
- * stream data into one end of the pipe. The other end of the pipe
- * is returned to the caller. Because a thread is created to copy
- * the data, IOExceptions that may occur during the copy can not be
- * propagated back to the caller. The result is an empty stream.<p>
- *
- * @return the InputStream representing this data
- * @exception IOException if an I/O error occurs
- *
- * @see javax.activation.DataContentHandler#writeTo
- * @see javax.activation.UnsupportedDataTypeException
- */
- public InputStream getInputStream() throws IOException {
- InputStream ins = null;
-
- if (dataSource != null) {
- ins = dataSource.getInputStream();
- } else {
- DataContentHandler dch = getDataContentHandler();
- // we won't even try if we can't get a dch
- if (dch == null)
- throw new UnsupportedDataTypeException(
- "no DCH for MIME type " + getBaseType());
-
- if (dch instanceof ObjectDataContentHandler) {
- if (((ObjectDataContentHandler)dch).getDCH() == null)
- throw new UnsupportedDataTypeException(
- "no object DCH for MIME type " + getBaseType());
- }
- // there is none but the default^^^^^^^^^^^^^^^^
- final DataContentHandler fdch = dch;
-
- // from bill s.
- // ce n'est pas une pipe!
- //
- // NOTE: This block of code needs to throw exceptions, but
- // can't because it is in another thread!!! ARG!
- //
- final PipedOutputStream pos = new PipedOutputStream();
- PipedInputStream pin = new PipedInputStream(pos);
- new Thread(
- new Runnable() {
- public void run() {
- try {
- fdch.writeTo(object, objectMimeType, pos);
- } catch (IOException e) {
-
- } finally {
- try {
- pos.close();
- } catch (IOException ie) { }
- }
- }
- },
- "DataHandler.getInputStream").start();
- ins = pin;
- }
-
- return ins;
- }
-
- /**
- * Write the data to an <code>OutputStream</code>.<p>
- *
- * If the DataHandler was created with a DataSource, writeTo
- * retrieves the InputStream and copies the bytes from the
- * InputStream to the OutputStream passed in.
- * <p>
- * If the DataHandler was created with an object, writeTo
- * retrieves the DataContentHandler for the object's type.
- * If the DataContentHandler was found, it calls the
- * <code>writeTo</code> method on the <code>DataContentHandler</code>.
- *
- * @param os the OutputStream to write to
- * @exception IOException if an I/O error occurs
- */
- public void writeTo(OutputStream os) throws IOException {
- // for the DataSource case
- if (dataSource != null) {
- InputStream is = null;
- byte data[] = new byte[8*1024];
- int bytes_read;
-
- is = dataSource.getInputStream();
-
- try {
- while ((bytes_read = is.read(data)) > 0) {
- os.write(data, 0, bytes_read);
- }
- } finally {
- is.close();
- is = null;
- }
- } else { // for the Object case
- DataContentHandler dch = getDataContentHandler();
- dch.writeTo(object, objectMimeType, os);
- }
- }
-
- /**
- * Get an OutputStream for this DataHandler to allow overwriting
- * the underlying data.
- * If the DataHandler was created with a DataSource, the
- * DataSource's <code>getOutputStream</code> method is called.
- * Otherwise, <code>null</code> is returned.
- *
- * @return the OutputStream
- *
- * @see javax.activation.DataSource#getOutputStream
- * @see javax.activation.URLDataSource
- */
- public OutputStream getOutputStream() throws IOException {
- if (dataSource != null)
- return dataSource.getOutputStream();
- else
- return null;
- }
-
- /**
- * Return the DataFlavors in which this data is available. <p>
- *
- * Returns an array of DataFlavor objects indicating the flavors
- * the data can be provided in. The array is usually ordered
- * according to preference for providing the data, from most
- * richly descriptive to least richly descriptive.<p>
- *
- * The DataHandler attempts to find a DataContentHandler that
- * corresponds to the MIME type of the data. If one is located,
- * the DataHandler calls the DataContentHandler's
- * <code>getTransferDataFlavors</code> method. <p>
- *
- * If a DataContentHandler can <i>not</i> be located, and if the
- * DataHandler was created with a DataSource (or URL), one
- * DataFlavor is returned that represents this object's MIME type
- * and the <code>java.io.InputStream</code> class. If the
- * DataHandler was created with an object and a MIME type,
- * getTransferDataFlavors returns one DataFlavor that represents
- * this object's MIME type and the object's class.
- *
- * @return an array of data flavors in which this data can be transferred
- * @see javax.activation.DataContentHandler#getTransferDataFlavors
- */
- public synchronized DataFlavor[] getTransferDataFlavors() {
- if (factory != oldFactory) // if the factory has changed, clear cache
- transferFlavors = emptyFlavors;
-
- // if it's not set, set it...
- if (transferFlavors == emptyFlavors)
- transferFlavors = getDataContentHandler().getTransferDataFlavors();
-
- if (transferFlavors == emptyFlavors)
- return transferFlavors;
- else
- return transferFlavors.clone();
-
- }
-
- /**
- * Returns whether the specified data flavor is supported
- * for this object.<p>
- *
- * This method iterates through the DataFlavors returned from
- * <code>getTransferDataFlavors</code>, comparing each with
- * the specified flavor.
- *
- * @param flavor the requested flavor for the data
- * @return true if the data flavor is supported
- * @see javax.activation.DataHandler#getTransferDataFlavors
- */
- public boolean isDataFlavorSupported(DataFlavor flavor) {
- DataFlavor[] lFlavors = getTransferDataFlavors();
-
- for (int i = 0; i < lFlavors.length; i++) {
- if (lFlavors[i].equals(flavor))
- return true;
- }
- return false;
- }
-
- /**
- * Returns an object that represents the data to be
- * transferred. The class of the object returned is defined by the
- * representation class of the data flavor.<p>
- *
- * <b>For DataHandler's created with DataSources or URLs:</b><p>
- *
- * The DataHandler attempts to locate a DataContentHandler
- * for this MIME type. If one is found, the passed in DataFlavor
- * and the type of the data are passed to its <code>getTransferData</code>
- * method. If the DataHandler fails to locate a DataContentHandler
- * and the flavor specifies this object's MIME type and the
- * <code>java.io.InputStream</code> class, this object's InputStream
- * is returned.
- * Otherwise it throws an UnsupportedFlavorException. <p>
- *
- * <b>For DataHandler's created with Objects:</b><p>
- *
- * The DataHandler attempts to locate a DataContentHandler
- * for this MIME type. If one is found, the passed in DataFlavor
- * and the type of the data are passed to its getTransferData
- * method. If the DataHandler fails to locate a DataContentHandler
- * and the flavor specifies this object's MIME type and its class,
- * this DataHandler's referenced object is returned.
- * Otherwise it throws an UnsupportedFlavorException.
- *
- * @param flavor the requested flavor for the data
- * @return the object
- * @exception UnsupportedFlavorException if the data could not be
- * converted to the requested flavor
- * @exception IOException if an I/O error occurs
- * @see javax.activation.ActivationDataFlavor
- */
- public Object getTransferData(DataFlavor flavor)
- throws UnsupportedFlavorException, IOException {
- return getDataContentHandler().getTransferData(flavor, dataSource);
- }
-
- /**
- * Set the CommandMap for use by this DataHandler.
- * Setting it to <code>null</code> causes the CommandMap to revert
- * to the CommandMap returned by the
- * <code>CommandMap.getDefaultCommandMap</code> method.
- * Changing the CommandMap, or setting it to <code>null</code>,
- * clears out any data cached from the previous CommandMap.
- *
- * @param commandMap the CommandMap to use in this DataHandler
- *
- * @see javax.activation.CommandMap#setDefaultCommandMap
- */
- public synchronized void setCommandMap(CommandMap commandMap) {
- if (commandMap != currentCommandMap || commandMap == null) {
- // clear cached values...
- transferFlavors = emptyFlavors;
- dataContentHandler = null;
-
- currentCommandMap = commandMap;
- }
- }
-
- /**
- * Return the <i>preferred</i> commands for this type of data.
- * This method calls the <code>getPreferredCommands</code> method
- * in the CommandMap associated with this instance of DataHandler.
- * This method returns an array that represents a subset of
- * available commands. In cases where multiple commands for the
- * MIME type represented by this DataHandler are present, the
- * installed CommandMap chooses the appropriate commands.
- *
- * @return the CommandInfo objects representing the preferred commands
- *
- * @see javax.activation.CommandMap#getPreferredCommands
- */
- public CommandInfo[] getPreferredCommands() {
- if (dataSource != null)
- return getCommandMap().getPreferredCommands(getBaseType(),
- dataSource);
- else
- return getCommandMap().getPreferredCommands(getBaseType());
- }
-
- /**
- * Return all the commands for this type of data.
- * This method returns an array containing all commands
- * for the type of data represented by this DataHandler. The
- * MIME type for the underlying data represented by this DataHandler
- * is used to call through to the <code>getAllCommands</code> method
- * of the CommandMap associated with this DataHandler.
- *
- * @return the CommandInfo objects representing all the commands
- *
- * @see javax.activation.CommandMap#getAllCommands
- */
- public CommandInfo[] getAllCommands() {
- if (dataSource != null)
- return getCommandMap().getAllCommands(getBaseType(), dataSource);
- else
- return getCommandMap().getAllCommands(getBaseType());
- }
-
- /**
- * Get the command <i>cmdName</i>. Use the search semantics as
- * defined by the CommandMap installed in this DataHandler. The
- * MIME type for the underlying data represented by this DataHandler
- * is used to call through to the <code>getCommand</code> method
- * of the CommandMap associated with this DataHandler.
- *
- * @param cmdName the command name
- * @return the CommandInfo corresponding to the command
- *
- * @see javax.activation.CommandMap#getCommand
- */
- public CommandInfo getCommand(String cmdName) {
- if (dataSource != null)
- return getCommandMap().getCommand(getBaseType(), cmdName,
- dataSource);
- else
- return getCommandMap().getCommand(getBaseType(), cmdName);
- }
-
- /**
- * Return the data in its preferred Object form. <p>
- *
- * If the DataHandler was instantiated with an object, return
- * the object. <p>
- *
- * If the DataHandler was instantiated with a DataSource,
- * this method uses a DataContentHandler to return the content
- * object for the data represented by this DataHandler. If no
- * <code>DataContentHandler</code> can be found for the
- * the type of this data, the DataHandler returns an
- * InputStream for the data.
- *
- * @return the content.
- * @exception IOException if an IOException occurs during
- * this operation.
- */
- public Object getContent() throws IOException {
- if (object != null)
- return object;
- else
- return getDataContentHandler().getContent(getDataSource());
- }
-
- /**
- * A convenience method that takes a CommandInfo object
- * and instantiates the corresponding command, usually
- * a JavaBean component.
- * <p>
- * This method calls the CommandInfo's <code>getCommandObject</code>
- * method with the <code>ClassLoader</code> used to load
- * the <code>javax.activation.DataHandler</code> class itself.
- *
- * @param cmdinfo the CommandInfo corresponding to a command
- * @return the instantiated command object
- */
- public Object getBean(CommandInfo cmdinfo) {
- Object bean = null;
-
- try {
- // make the bean
- ClassLoader cld = null;
- // First try the "application's" class loader.
- cld = SecuritySupport.getContextClassLoader();
- if (cld == null)
- cld = this.getClass().getClassLoader();
- bean = cmdinfo.getCommandObject(this, cld);
- } catch (IOException e) {
- } catch (ClassNotFoundException e) { }
-
- return bean;
- }
-
- /**
- * Get the DataContentHandler for this DataHandler: <p>
- *
- * If a DataContentHandlerFactory is set, use it.
- * Otherwise look for an object to serve DCH in the
- * following order: <p>
- *
- * 1) if a factory is set, use it <p>
- * 2) if a CommandMap is set, use it <p>
- * 3) use the default CommandMap <p>
- *
- * In any case, wrap the real DataContentHandler with one of our own
- * to handle any missing cases, fill in defaults, and to ensure that
- * we always have a non-null DataContentHandler.
- *
- * @return the requested DataContentHandler
- */
- private synchronized DataContentHandler getDataContentHandler() {
-
- // make sure the factory didn't change
- if (factory != oldFactory) {
- oldFactory = factory;
- factoryDCH = null;
- dataContentHandler = null;
- transferFlavors = emptyFlavors;
- }
-
- if (dataContentHandler != null)
- return dataContentHandler;
-
- String simpleMT = getBaseType();
-
- if (factoryDCH == null && factory != null)
- factoryDCH = factory.createDataContentHandler(simpleMT);
-
- if (factoryDCH != null)
- dataContentHandler = factoryDCH;
-
- if (dataContentHandler == null) {
- if (dataSource != null)
- dataContentHandler = getCommandMap().
- createDataContentHandler(simpleMT, dataSource);
- else
- dataContentHandler = getCommandMap().
- createDataContentHandler(simpleMT);
- }
-
- // getDataContentHandler always uses these 'wrapper' handlers
- // to make sure it returns SOMETHING meaningful...
- if (dataSource != null)
- dataContentHandler = new DataSourceDataContentHandler(
- dataContentHandler,
- dataSource);
- else
- dataContentHandler = new ObjectDataContentHandler(
- dataContentHandler,
- object,
- objectMimeType);
- return dataContentHandler;
- }
-
- /**
- * Use the MimeType class to extract the MIME type/subtype,
- * ignoring the parameters. The type is cached.
- */
- private synchronized String getBaseType() {
- if (shortType == null) {
- String ct = getContentType();
- try {
- MimeType mt = new MimeType(ct);
- shortType = mt.getBaseType();
- } catch (MimeTypeParseException e) {
- shortType = ct;
- }
- }
- return shortType;
- }
-
- /**
- * Sets the DataContentHandlerFactory. The DataContentHandlerFactory
- * is called first to find DataContentHandlers.
- * The DataContentHandlerFactory can only be set once.
- * <p>
- * If the DataContentHandlerFactory has already been set,
- * this method throws an Error.
- *
- * @param newFactory the DataContentHandlerFactory
- * @exception Error if the factory has already been defined.
- *
- * @see javax.activation.DataContentHandlerFactory
- */
- public static synchronized void setDataContentHandlerFactory(
- DataContentHandlerFactory newFactory) {
- if (factory != null)
- throw new Error("DataContentHandlerFactory already defined");
-
- SecurityManager security = System.getSecurityManager();
- if (security != null) {
- try {
- // if it's ok with the SecurityManager, it's ok with me...
- security.checkSetFactory();
- } catch (SecurityException ex) {
- // otherwise, we also allow it if this code and the
- // factory come from the same class loader (e.g.,
- // the JAF classes were loaded with the applet classes).
- if (DataHandler.class.getClassLoader() !=
- newFactory.getClass().getClassLoader())
- throw ex;
- }
- }
- factory = newFactory;
- }
-}
-
-/**
- * The DataHanderDataSource class implements the
- * DataSource interface when the DataHandler is constructed
- * with an Object and a mimeType string.
- */
-class DataHandlerDataSource implements DataSource {
- DataHandler dataHandler = null;
-
- /**
- * The constructor.
- */
- public DataHandlerDataSource(DataHandler dh) {
- this.dataHandler = dh;
- }
-
- /**
- * Returns an <code>InputStream</code> representing this object.
- * @return the <code>InputStream</code>
- */
- public InputStream getInputStream() throws IOException {
- return dataHandler.getInputStream();
- }
-
- /**
- * Returns the <code>OutputStream</code> for this object.
- * @return the <code>OutputStream</code>
- */
- public OutputStream getOutputStream() throws IOException {
- return dataHandler.getOutputStream();
- }
-
- /**
- * Returns the MIME type of the data represented by this object.
- * @return the MIME type
- */
- public String getContentType() {
- return dataHandler.getContentType();
- }
-
- /**
- * Returns the name of this object.
- * @return the name of this object
- */
- public String getName() {
- return dataHandler.getName(); // what else would it be?
- }
-}
-
-/*
- * DataSourceDataContentHandler
- *
- * This is a <i>private</i> DataContentHandler that wraps the real
- * DataContentHandler in the case where the DataHandler was instantiated
- * with a DataSource.
- */
-class DataSourceDataContentHandler implements DataContentHandler {
- private DataSource ds = null;
- private DataFlavor transferFlavors[] = null;
- private DataContentHandler dch = null;
-
- /**
- * The constructor.
- */
- public DataSourceDataContentHandler(DataContentHandler dch, DataSource ds) {
- this.ds = ds;
- this.dch = dch;
- }
-
- /**
- * Return the DataFlavors for this <code>DataContentHandler</code>.
- * @return the DataFlavors
- */
- public DataFlavor[] getTransferDataFlavors() {
-
- if (transferFlavors == null) {
- if (dch != null) { // is there a dch?
- transferFlavors = dch.getTransferDataFlavors();
- } else {
- transferFlavors = new DataFlavor[1];
- transferFlavors[0] =
- new ActivationDataFlavor(ds.getContentType(),
- ds.getContentType());
- }
- }
- return transferFlavors;
- }
-
- /**
- * Return the Transfer Data of type DataFlavor from InputStream.
- * @param df the DataFlavor
- * @param ds the DataSource
- * @return the constructed Object
- */
- public Object getTransferData(DataFlavor df, DataSource ds) throws
- UnsupportedFlavorException, IOException {
-
- if (dch != null)
- return dch.getTransferData(df, ds);
- else if (df.equals(getTransferDataFlavors()[0])) // only have one now
- return ds.getInputStream();
- else
- throw new UnsupportedFlavorException(df);
- }
-
- public Object getContent(DataSource ds) throws IOException {
-
- if (dch != null)
- return dch.getContent(ds);
- else
- return ds.getInputStream();
- }
-
- /**
- * Write the object to the output stream.
- */
- public void writeTo(Object obj, String mimeType, OutputStream os)
- throws IOException {
- if (dch != null)
- dch.writeTo(obj, mimeType, os);
- else
- throw new UnsupportedDataTypeException(
- "no DCH for content type " + ds.getContentType());
- }
-}
-
-/*
- * ObjectDataContentHandler
- *
- * This is a <i>private</i> DataContentHandler that wraps the real
- * DataContentHandler in the case where the DataHandler was instantiated
- * with an object.
- */
-class ObjectDataContentHandler implements DataContentHandler {
- private DataFlavor transferFlavors[] = null;
- private Object obj;
- private String mimeType;
- private DataContentHandler dch = null;
-
- /**
- * The constructor.
- */
- public ObjectDataContentHandler(DataContentHandler dch,
- Object obj, String mimeType) {
- this.obj = obj;
- this.mimeType = mimeType;
- this.dch = dch;
- }
-
- /**
- * Return the DataContentHandler for this object.
- * Used only by the DataHandler class.
- */
- public DataContentHandler getDCH() {
- return dch;
- }
-
- /**
- * Return the DataFlavors for this <code>DataContentHandler</code>.
- * @return the DataFlavors
- */
- public synchronized DataFlavor[] getTransferDataFlavors() {
- if (transferFlavors == null) {
- if (dch != null) {
- transferFlavors = dch.getTransferDataFlavors();
- } else {
- transferFlavors = new DataFlavor[1];
- transferFlavors[0] = new ActivationDataFlavor(obj.getClass(),
- mimeType, mimeType);
- }
- }
- return transferFlavors;
- }
-
- /**
- * Return the Transfer Data of type DataFlavor from InputStream.
- * @param df the DataFlavor
- * @param ds the DataSource
- * @return the constructed Object
- */
- public Object getTransferData(DataFlavor df, DataSource ds)
- throws UnsupportedFlavorException, IOException {
-
- if (dch != null)
- return dch.getTransferData(df, ds);
- else if (df.equals(getTransferDataFlavors()[0])) // only have one now
- return obj;
- else
- throw new UnsupportedFlavorException(df);
-
- }
-
- public Object getContent(DataSource ds) {
- return obj;
- }
-
- /**
- * Write the object to the output stream.
- */
- public void writeTo(Object obj, String mimeType, OutputStream os)
- throws IOException {
- if (dch != null)
- dch.writeTo(obj, mimeType, os);
- else if (obj instanceof byte[])
- os.write((byte[])obj);
- else if (obj instanceof String) {
- OutputStreamWriter osw = new OutputStreamWriter(os);
- osw.write((String)obj);
- osw.flush();
- } else throw new UnsupportedDataTypeException(
- "no object DCH for MIME type " + this.mimeType);
- }
-}
diff --git a/src/share/jaf_classes/javax/activation/DataSource.java b/src/share/jaf_classes/javax/activation/DataSource.java
deleted file mode 100644
index 340daaaf..00000000
--- a/src/share/jaf_classes/javax/activation/DataSource.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.IOException;
-
-/**
- * The DataSource interface provides the JavaBeans Activation Framework
- * with an abstraction of an arbitrary collection of data. It
- * provides a type for that data as well as access
- * to it in the form of <code>InputStreams</code> and
- * <code>OutputStreams</code> where appropriate.
- *
- * @since 1.6
- */
-
-public interface DataSource {
-
- /**
- * This method returns an <code>InputStream</code> representing
- * the data and throws the appropriate exception if it can
- * not do so. Note that a new <code>InputStream</code> object must be
- * returned each time this method is called, and the stream must be
- * positioned at the beginning of the data.
- *
- * @return an InputStream
- */
- public InputStream getInputStream() throws IOException;
-
- /**
- * This method returns an <code>OutputStream</code> where the
- * data can be written and throws the appropriate exception if it can
- * not do so. Note that a new <code>OutputStream</code> object must
- * be returned each time this method is called, and the stream must
- * be positioned at the location the data is to be written.
- *
- * @return an OutputStream
- */
- public OutputStream getOutputStream() throws IOException;
-
- /**
- * This method returns the MIME type of the data in the form of a
- * string. It should always return a valid type. It is suggested
- * that getContentType return "application/octet-stream" if the
- * DataSource implementation can not determine the data type.
- *
- * @return the MIME Type
- */
- public String getContentType();
-
- /**
- * Return the <i>name</i> of this object where the name of the object
- * is dependant on the nature of the underlying objects. DataSources
- * encapsulating files may choose to return the filename of the object.
- * (Typically this would be the last component of the filename, not an
- * entire pathname.)
- *
- * @return the name of the object.
- */
- public String getName();
-}
diff --git a/src/share/jaf_classes/javax/activation/FileDataSource.java b/src/share/jaf_classes/javax/activation/FileDataSource.java
deleted file mode 100644
index 7d4d84fc..00000000
--- a/src/share/jaf_classes/javax/activation/FileDataSource.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.File;
-import java.io.FileDescriptor;
-import java.io.FileNotFoundException;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import com.sun.activation.registries.MimeTypeFile;
-
-/**
- * The FileDataSource class implements a simple DataSource object
- * that encapsulates a file. It provides data typing services via
- * a FileTypeMap object. <p>
- *
- * <b>FileDataSource Typing Semantics</b><p>
- *
- * The FileDataSource class delegates data typing of files
- * to an object subclassed from the FileTypeMap class.
- * The <code>setFileTypeMap</code> method can be used to explicitly
- * set the FileTypeMap for an instance of FileDataSource. If no
- * FileTypeMap is set, the FileDataSource will call the FileTypeMap's
- * getDefaultFileTypeMap method to get the System's default FileTypeMap.
- *
- * @see javax.activation.DataSource
- * @see javax.activation.FileTypeMap
- * @see javax.activation.MimetypesFileTypeMap
- *
- * @since 1.6
- */
-public class FileDataSource implements DataSource {
-
- // keep track of original 'ref' passed in, non-null
- // one indicated which was passed in:
- private File _file = null;
- private FileTypeMap typeMap = null;
-
- /**
- * Creates a FileDataSource from a File object. <i>Note:
- * The file will not actually be opened until a method is
- * called that requires the file to be opened.</i>
- *
- * @param file the file
- */
- public FileDataSource(File file) {
- _file = file; // save the file Object...
- }
-
- /**
- * Creates a FileDataSource from
- * the specified path name. <i>Note:
- * The file will not actually be opened until a method is
- * called that requires the file to be opened.</i>
- *
- * @param name the system-dependent file name.
- */
- public FileDataSource(String name) {
- this(new File(name)); // use the file constructor
- }
-
- /**
- * This method will return an InputStream representing the
- * the data and will throw an IOException if it can
- * not do so. This method will return a new
- * instance of InputStream with each invocation.
- *
- * @return an InputStream
- */
- public InputStream getInputStream() throws IOException {
- return new FileInputStream(_file);
- }
-
- /**
- * This method will return an OutputStream representing the
- * the data and will throw an IOException if it can
- * not do so. This method will return a new instance of
- * OutputStream with each invocation.
- *
- * @return an OutputStream
- */
- public OutputStream getOutputStream() throws IOException {
- return new FileOutputStream(_file);
- }
-
- /**
- * This method returns the MIME type of the data in the form of a
- * string. This method uses the currently installed FileTypeMap. If
- * there is no FileTypeMap explictly set, the FileDataSource will
- * call the <code>getDefaultFileTypeMap</code> method on
- * FileTypeMap to acquire a default FileTypeMap. <i>Note: By
- * default, the FileTypeMap used will be a MimetypesFileTypeMap.</i>
- *
- * @return the MIME Type
- * @see javax.activation.FileTypeMap#getDefaultFileTypeMap
- */
- public String getContentType() {
- // check to see if the type map is null?
- if (typeMap == null)
- return FileTypeMap.getDefaultFileTypeMap().getContentType(_file);
- else
- return typeMap.getContentType(_file);
- }
-
- /**
- * Return the <i>name</i> of this object. The FileDataSource
- * will return the file name of the object.
- *
- * @return the name of the object.
- * @see javax.activation.DataSource
- */
- public String getName() {
- return _file.getName();
- }
-
- /**
- * Return the File object that corresponds to this FileDataSource.
- * @return the File object for the file represented by this object.
- */
- public File getFile() {
- return _file;
- }
-
- /**
- * Set the FileTypeMap to use with this FileDataSource
- *
- * @param map The FileTypeMap for this object.
- */
- public void setFileTypeMap(FileTypeMap map) {
- typeMap = map;
- }
-}
diff --git a/src/share/jaf_classes/javax/activation/FileTypeMap.java b/src/share/jaf_classes/javax/activation/FileTypeMap.java
deleted file mode 100644
index 3cc9622b..00000000
--- a/src/share/jaf_classes/javax/activation/FileTypeMap.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.io.File;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-/**
- * The FileTypeMap is an abstract class that provides a data typing
- * interface for files. Implementations of this class will
- * implement the getContentType methods which will derive a content
- * type from a file name or a File object. FileTypeMaps could use any
- * scheme to determine the data type, from examining the file extension
- * of a file (like the MimetypesFileTypeMap) to opening the file and
- * trying to derive its type from the contents of the file. The
- * FileDataSource class uses the default FileTypeMap (a MimetypesFileTypeMap
- * unless changed) to determine the content type of files.
- *
- * @see javax.activation.FileTypeMap
- * @see javax.activation.FileDataSource
- * @see javax.activation.MimetypesFileTypeMap
- *
- * @since 1.6
- */
-
-public abstract class FileTypeMap {
-
- private static FileTypeMap defaultMap = null;
- private static Map<ClassLoader,FileTypeMap> map =
- new WeakHashMap<ClassLoader,FileTypeMap>();
-
- /**
- * The default constructor.
- */
- public FileTypeMap() {
- super();
- }
-
- /**
- * Return the type of the file object. This method should
- * always return a valid MIME type.
- *
- * @param file A file to be typed.
- * @return The content type.
- */
- abstract public String getContentType(File file);
-
- /**
- * Return the type of the file passed in. This method should
- * always return a valid MIME type.
- *
- * @param filename the pathname of the file.
- * @return The content type.
- */
- abstract public String getContentType(String filename);
-
- /**
- * Sets the default FileTypeMap for the system. This instance
- * will be returned to callers of getDefaultFileTypeMap.
- *
- * @param fileTypeMap The FileTypeMap.
- * @exception SecurityException if the caller doesn't have permission
- * to change the default
- */
- public static synchronized void setDefaultFileTypeMap(FileTypeMap fileTypeMap) {
- SecurityManager security = System.getSecurityManager();
- if (security != null) {
- try {
- // if it's ok with the SecurityManager, it's ok with me...
- security.checkSetFactory();
- } catch (SecurityException ex) {
- // otherwise, we also allow it if this code and the
- // factory come from the same (non-system) class loader (e.g.,
- // the JAF classes were loaded with the applet classes).
- if (FileTypeMap.class.getClassLoader() == null ||
- FileTypeMap.class.getClassLoader() !=
- fileTypeMap.getClass().getClassLoader())
- throw ex;
- }
- }
- // remove any per-thread-context-class-loader FileTypeMap
- map.remove(SecuritySupport.getContextClassLoader());
- defaultMap = fileTypeMap;
- }
-
- /**
- * Return the default FileTypeMap for the system.
- * If setDefaultFileTypeMap was called, return
- * that instance, otherwise return an instance of
- * <code>MimetypesFileTypeMap</code>.
- *
- * @return The default FileTypeMap
- * @see javax.activation.FileTypeMap#setDefaultFileTypeMap
- */
- public static synchronized FileTypeMap getDefaultFileTypeMap() {
- if (defaultMap != null)
- return defaultMap;
-
- // fetch per-thread-context-class-loader default
- ClassLoader tccl = SecuritySupport.getContextClassLoader();
- FileTypeMap def = map.get(tccl);
- if (def == null) {
- def = new MimetypesFileTypeMap();
- map.put(tccl, def);
- }
- return def;
- }
-}
diff --git a/src/share/jaf_classes/javax/activation/MailcapCommandMap.java b/src/share/jaf_classes/javax/activation/MailcapCommandMap.java
deleted file mode 100644
index ca384f9e..00000000
--- a/src/share/jaf_classes/javax/activation/MailcapCommandMap.java
+++ /dev/null
@@ -1,693 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package javax.activation;
-
-import java.util.*;
-import java.io.*;
-import java.net.*;
-import com.sun.activation.registries.MailcapFile;
-import com.sun.activation.registries.LogSupport;
-
-/**
- * MailcapCommandMap extends the CommandMap
- * abstract class. It implements a CommandMap whose configuration
- * is based on mailcap files
- * (<A HREF="http://www.ietf.org/rfc/rfc1524.txt">RFC 1524</A>).
- * The MailcapCommandMap can be configured both programmatically
- * and via configuration files.
- * <p>
- * <b>Mailcap file search order:</b><p>
- * The MailcapCommandMap looks in various places in the user's
- * system for mailcap file entries. When requests are made
- * to search for commands in the MailcapCommandMap, it searches
- * mailcap files in the following order:
- * <p>
- * <ol>
- * <li> Programatically added entries to the MailcapCommandMap instance.
- * <li> The file <code>.mailcap</code> in the user's home directory.
- * <li> The file &lt;<i>java.home</i>&gt;<code>/lib/mailcap</code>.
- * <li> The file or resources named <code>META-INF/mailcap</code>.
- * <li> The file or resource named <code>META-INF/mailcap.default</code>
- * (usually found only in the <code>activation.jar</code> file).
- * </ol>
- * <p>
- * <b>Mailcap file format:</b><p>
- *
- * Mailcap files must conform to the mailcap
- * file specification (RFC 1524, <i>A User Agent Configuration Mechanism
- * For Multimedia Mail Format Information</i>).
- * The file format consists of entries corresponding to
- * particular MIME types. In general, the specification
- * specifies <i>applications</i> for clients to use when they
- * themselves cannot operate on the specified MIME type. The
- * MailcapCommandMap extends this specification by using a parameter mechanism
- * in mailcap files that allows JavaBeans(tm) components to be specified as
- * corresponding to particular commands for a MIME type.<p>
- *
- * When a mailcap file is
- * parsed, the MailcapCommandMap recognizes certain parameter signatures,
- * specifically those parameter names that begin with <code>x-java-</code>.
- * The MailcapCommandMap uses this signature to find
- * command entries for inclusion into its registries.
- * Parameter names with the form <code>x-java-&lt;name></code>
- * are read by the MailcapCommandMap as identifying a command
- * with the name <i>name</i>. When the <i>name</i> is <code>
- * content-handler</code> the MailcapCommandMap recognizes the class
- * signified by this parameter as a <i>DataContentHandler</i>.
- * All other commands are handled generically regardless of command
- * name. The command implementation is specified by a fully qualified
- * class name of a JavaBean(tm) component. For example; a command for viewing
- * some data can be specified as: <code>x-java-view=com.foo.ViewBean</code>.<p>
- *
- * When the command name is <code>fallback-entry</code>, the value of
- * the command may be <code>true</code> or <code>false</code>. An
- * entry for a MIME type that includes a parameter of
- * <code>x-java-fallback-entry=true</code> defines fallback commands
- * for that MIME type that will only be used if no non-fallback entry
- * can be found. For example, an entry of the form <code>text/*; ;
- * x-java-fallback-entry=true; x-java-view=com.sun.TextViewer</code>
- * specifies a view command to be used for any text MIME type. This
- * view command would only be used if a non-fallback view command for
- * the MIME type could not be found.<p>
- *
- * MailcapCommandMap aware mailcap files have the
- * following general form:<p>
- * <code>
- * # Comments begin with a '#' and continue to the end of the line.<br>
- * &lt;mime type>; ; &lt;parameter list><br>
- * # Where a parameter list consists of one or more parameters,<br>
- * # where parameters look like: x-java-view=com.sun.TextViewer<br>
- * # and a parameter list looks like: <br>
- * text/plain; ; x-java-view=com.sun.TextViewer; x-java-edit=com.sun.TextEdit
- * <br>
- * # Note that mailcap entries that do not contain 'x-java' parameters<br>
- * # and comply to RFC 1524 are simply ignored:<br>
- * image/gif; /usr/dt/bin/sdtimage %s<br>
- *
- * </code>
- * <p>
- *
- * @author Bart Calder
- * @author Bill Shannon
- *
- * @since 1.6
- */
-
-public class MailcapCommandMap extends CommandMap {
- /*
- * We manage a collection of databases, searched in order.
- */
- private MailcapFile[] DB;
- private static final int PROG = 0; // programmatically added entries
-
- /**
- * The default Constructor.
- */
- public MailcapCommandMap() {
- super();
- List dbv = new ArrayList(5); // usually 5 or less databases
- MailcapFile mf = null;
- dbv.add(null); // place holder for PROG entry
-
- LogSupport.log("MailcapCommandMap: load HOME");
- try {
- String user_home = System.getProperty("user.home");
-
- if (user_home != null) {
- String path = user_home + File.separator + ".mailcap";
- mf = loadFile(path);
- if (mf != null)
- dbv.add(mf);
- }
- } catch (SecurityException ex) {}
-
- LogSupport.log("MailcapCommandMap: load SYS");
- try {
- // check system's home
- String system_mailcap = System.getProperty("java.home") +
- File.separator + "lib" + File.separator + "mailcap";
- mf = loadFile(system_mailcap);
- if (mf != null)
- dbv.add(mf);
- } catch (SecurityException ex) {}
-
- LogSupport.log("MailcapCommandMap: load JAR");
- // load from the app's jar file
- loadAllResources(dbv, "META-INF/mailcap");
-
- LogSupport.log("MailcapCommandMap: load DEF");
- mf = loadResource("/META-INF/mailcap.default");
-
- if (mf != null)
- dbv.add(mf);
-
- DB = new MailcapFile[dbv.size()];
- DB = (MailcapFile[])dbv.toArray(DB);
- }
-
- /**
- * Load from the named resource.
- */
- private MailcapFile loadResource(String name) {
- InputStream clis = null;
- try {
- clis = SecuritySupport.getResourceAsStream(this.getClass(), name);
- if (clis != null) {
- MailcapFile mf = new MailcapFile(clis);
- if (LogSupport.isLoggable())
- LogSupport.log("MailcapCommandMap: successfully loaded " +
- "mailcap file: " + name);
- return mf;
- } else {
- if (LogSupport.isLoggable())
- LogSupport.log("MailcapCommandMap: not loading " +
- "mailcap file: " + name);
- }
- } catch (IOException e) {
- if (LogSupport.isLoggable())
- LogSupport.log("MailcapCommandMap: can't load " + name, e);
- } catch (SecurityException sex) {
- if (LogSupport.isLoggable())
- LogSupport.log("MailcapCommandMap: can't load " + name, sex);
- } finally {
- try {
- if (clis != null)
- clis.close();
- } catch (IOException ex) { } // ignore it
- }
- return null;
- }
-
- /**
- * Load all of the named resource.
- */
- private void loadAllResources(List v, String name) {
- boolean anyLoaded = false;
- try {
- URL[] urls;
- ClassLoader cld = null;
- // First try the "application's" class loader.
- cld = SecuritySupport.getContextClassLoader();
- if (cld == null)
- cld = this.getClass().getClassLoader();
- if (cld != null)
- urls = SecuritySupport.getResources(cld, name);
- else
- urls = SecuritySupport.getSystemResources(name);
- if (urls != null) {
- if (LogSupport.isLoggable())
- LogSupport.log("MailcapCommandMap: getResources");
- for (int i = 0; i < urls.length; i++) {
- URL url = urls[i];
- InputStream clis = null;
- if (LogSupport.isLoggable())
- LogSupport.log("MailcapCommandMap: URL " + url);
- try {
- clis = SecuritySupport.openStream(url);
- if (clis != null) {
- v.add(new MailcapFile(clis));
- anyLoaded = true;
- if (LogSupport.isLoggable())
- LogSupport.log("MailcapCommandMap: " +
- "successfully loaded " +
- "mailcap file from URL: " +
- url);
- } else {
- if (LogSupport.isLoggable())
- LogSupport.log("MailcapCommandMap: " +
- "not loading mailcap " +
- "file from URL: " + url);
- }
- } catch (IOException ioex) {
- if (LogSupport.isLoggable())
- LogSupport.log("MailcapCommandMap: can't load " +
- url, ioex);
- } catch (SecurityException sex) {
- if (LogSupport.isLoggable())
- LogSupport.log("MailcapCommandMap: can't load " +
- url, sex);
- } finally {
- try {
- if (clis != null)
- clis.close();
- } catch (IOException cex) { }
- }
- }
- }
- } catch (Exception ex) {
- if (LogSupport.isLoggable())
- LogSupport.log("MailcapCommandMap: can't load " + name, ex);
- }
-
- // if failed to load anything, fall back to old technique, just in case
- if (!anyLoaded) {
- if (LogSupport.isLoggable())
- LogSupport.log("MailcapCommandMap: !anyLoaded");
- MailcapFile mf = loadResource("/" + name);
- if (mf != null)
- v.add(mf);
- }
- }
-
- /**
- * Load from the named file.
- */
- private MailcapFile loadFile(String name) {
- MailcapFile mtf = null;
-
- try {
- mtf = new MailcapFile(name);
- } catch (IOException e) {
- // e.printStackTrace();
- }
- return mtf;
- }
-
- /**
- * Constructor that allows the caller to specify the path
- * of a <i>mailcap</i> file.
- *
- * @param fileName The name of the <i>mailcap</i> file to open
- * @exception IOException if the file can't be accessed
- */
- public MailcapCommandMap(String fileName) throws IOException {
- this();
-
- if (LogSupport.isLoggable())
- LogSupport.log("MailcapCommandMap: load PROG from " + fileName);
- if (DB[PROG] == null) {
- DB[PROG] = new MailcapFile(fileName);
- }
- }
-
-
- /**
- * Constructor that allows the caller to specify an <i>InputStream</i>
- * containing a mailcap file.
- *
- * @param is InputStream of the <i>mailcap</i> file to open
- */
- public MailcapCommandMap(InputStream is) {
- this();
-
- LogSupport.log("MailcapCommandMap: load PROG");
- if (DB[PROG] == null) {
- try {
- DB[PROG] = new MailcapFile(is);
- } catch (IOException ex) {
- // XXX - should throw it
- }
- }
- }
-
- /**
- * Get the preferred command list for a MIME Type. The MailcapCommandMap
- * searches the mailcap files as described above under
- * <i>Mailcap file search order</i>.<p>
- *
- * The result of the search is a proper subset of available
- * commands in all mailcap files known to this instance of
- * MailcapCommandMap. The first entry for a particular command
- * is considered the preferred command.
- *
- * @param mimeType the MIME type
- * @return the CommandInfo objects representing the preferred commands.
- */
- public synchronized CommandInfo[] getPreferredCommands(String mimeType) {
- List cmdList = new ArrayList();
- if (mimeType != null)
- mimeType = mimeType.toLowerCase(Locale.ENGLISH);
-
- for (int i = 0; i < DB.length; i++) {
- if (DB[i] == null)
- continue;
- Map cmdMap = DB[i].getMailcapList(mimeType);
- if (cmdMap != null)
- appendPrefCmdsToList(cmdMap, cmdList);
- }
-
- // now add the fallback commands
- for (int i = 0; i < DB.length; i++) {
- if (DB[i] == null)
- continue;
- Map cmdMap = DB[i].getMailcapFallbackList(mimeType);
- if (cmdMap != null)
- appendPrefCmdsToList(cmdMap, cmdList);
- }
-
- CommandInfo[] cmdInfos = new CommandInfo[cmdList.size()];
- cmdInfos = (CommandInfo[])cmdList.toArray(cmdInfos);
-
- return cmdInfos;
- }
-
- /**
- * Put the commands that are in the hash table, into the list.
- */
- private void appendPrefCmdsToList(Map cmdHash, List cmdList) {
- Iterator verb_enum = cmdHash.keySet().iterator();
-
- while (verb_enum.hasNext()) {
- String verb = (String)verb_enum.next();
- if (!checkForVerb(cmdList, verb)) {
- List cmdList2 = (List)cmdHash.get(verb); // get the list
- String className = (String)cmdList2.get(0);
- cmdList.add(new CommandInfo(verb, className));
- }
- }
- }
-
- /**
- * Check the cmdList to see if this command exists, return
- * true if the verb is there.
- */
- private boolean checkForVerb(List cmdList, String verb) {
- Iterator ee = cmdList.iterator();
- while (ee.hasNext()) {
- String enum_verb =
- (String)((CommandInfo)ee.next()).getCommandName();
- if (enum_verb.equals(verb))
- return true;
- }
- return false;
- }
-
- /**
- * Get all the available commands in all mailcap files known to
- * this instance of MailcapCommandMap for this MIME type.
- *
- * @param mimeType the MIME type
- * @return the CommandInfo objects representing all the commands.
- */
- public synchronized CommandInfo[] getAllCommands(String mimeType) {
- List cmdList = new ArrayList();
- if (mimeType != null)
- mimeType = mimeType.toLowerCase(Locale.ENGLISH);
-
- for (int i = 0; i < DB.length; i++) {
- if (DB[i] == null)
- continue;
- Map cmdMap = DB[i].getMailcapList(mimeType);
- if (cmdMap != null)
- appendCmdsToList(cmdMap, cmdList);
- }
-
- // now add the fallback commands
- for (int i = 0; i < DB.length; i++) {
- if (DB[i] == null)
- continue;
- Map cmdMap = DB[i].getMailcapFallbackList(mimeType);
- if (cmdMap != null)
- appendCmdsToList(cmdMap, cmdList);
- }
-
- CommandInfo[] cmdInfos = new CommandInfo[cmdList.size()];
- cmdInfos = (CommandInfo[])cmdList.toArray(cmdInfos);
-
- return cmdInfos;
- }
-
- /**
- * Put the commands that are in the hash table, into the list.
- */
- private void appendCmdsToList(Map typeHash, List cmdList) {
- Iterator verb_enum = typeHash.keySet().iterator();
-
- while (verb_enum.hasNext()) {
- String verb = (String)verb_enum.next();
- List cmdList2 = (List)typeHash.get(verb);
- Iterator cmd_enum = ((List)cmdList2).iterator();
-
- while (cmd_enum.hasNext()) {
- String cmd = (String)cmd_enum.next();
- cmdList.add(new CommandInfo(verb, cmd));
- // cmdList.add(0, new CommandInfo(verb, cmd));
- }
- }
- }
-
- /**
- * Get the command corresponding to <code>cmdName</code> for the MIME type.
- *
- * @param mimeType the MIME type
- * @param cmdName the command name
- * @return the CommandInfo object corresponding to the command.
- */
- public synchronized CommandInfo getCommand(String mimeType,
- String cmdName) {
- if (mimeType != null)
- mimeType = mimeType.toLowerCase(Locale.ENGLISH);
-
- for (int i = 0; i < DB.length; i++) {
- if (DB[i] == null)
- continue;
- Map cmdMap = DB[i].getMailcapList(mimeType);
- if (cmdMap != null) {
- // get the cmd list for the cmd
- List v = (List)cmdMap.get(cmdName);
- if (v != null) {
- String cmdClassName = (String)v.get(0);
-
- if (cmdClassName != null)
- return new CommandInfo(cmdName, cmdClassName);
- }
- }
- }
-
- // now try the fallback list
- for (int i = 0; i < DB.length; i++) {
- if (DB[i] == null)
- continue;
- Map cmdMap = DB[i].getMailcapFallbackList(mimeType);
- if (cmdMap != null) {
- // get the cmd list for the cmd
- List v = (List)cmdMap.get(cmdName);
- if (v != null) {
- String cmdClassName = (String)v.get(0);
-
- if (cmdClassName != null)
- return new CommandInfo(cmdName, cmdClassName);
- }
- }
- }
- return null;
- }
-
- /**
- * Add entries to the registry. Programmatically
- * added entries are searched before other entries.<p>
- *
- * The string that is passed in should be in mailcap
- * format.
- *
- * @param mail_cap a correctly formatted mailcap string
- */
- public synchronized void addMailcap(String mail_cap) {
- // check to see if one exists
- LogSupport.log("MailcapCommandMap: add to PROG");
- if (DB[PROG] == null)
- DB[PROG] = new MailcapFile();
-
- DB[PROG].appendToMailcap(mail_cap);
- }
-
- /**
- * Return the DataContentHandler for the specified MIME type.
- *
- * @param mimeType the MIME type
- * @return the DataContentHandler
- */
- public synchronized DataContentHandler createDataContentHandler(
- String mimeType) {
- if (LogSupport.isLoggable())
- LogSupport.log(
- "MailcapCommandMap: createDataContentHandler for " + mimeType);
- if (mimeType != null)
- mimeType = mimeType.toLowerCase(Locale.ENGLISH);
-
- for (int i = 0; i < DB.length; i++) {
- if (DB[i] == null)
- continue;
- if (LogSupport.isLoggable())
- LogSupport.log(" search DB #" + i);
- Map cmdMap = DB[i].getMailcapList(mimeType);
- if (cmdMap != null) {
- List v = (List)cmdMap.get("content-handler");
- if (v != null) {
- String name = (String)v.get(0);
- DataContentHandler dch = getDataContentHandler(name);
- if (dch != null)
- return dch;
- }
- }
- }
-
- // now try the fallback entries
- for (int i = 0; i < DB.length; i++) {
- if (DB[i] == null)
- continue;
- if (LogSupport.isLoggable())
- LogSupport.log(" search fallback DB #" + i);
- Map cmdMap = DB[i].getMailcapFallbackList(mimeType);
- if (cmdMap != null) {
- List v = (List)cmdMap.get("content-handler");
- if (v != null) {
- String name = (String)v.get(0);
- DataContentHandler dch = getDataContentHandler(name);
- if (dch != null)
- return dch;
- }
- }
- }
- return null;
- }
-
- private DataContentHandler getDataContentHandler(String name) {
- if (LogSupport.isLoggable())
- LogSupport.log(" got content-handler");
- if (LogSupport.isLoggable())
- LogSupport.log(" class " + name);
- try {
- ClassLoader cld = null;
- // First try the "application's" class loader.
- cld = SecuritySupport.getContextClassLoader();
- if (cld == null)
- cld = this.getClass().getClassLoader();
- Class cl = null;
- try {
- cl = cld.loadClass(name);
- } catch (Exception ex) {
- // if anything goes wrong, do it the old way
- cl = Class.forName(name);
- }
- if (cl != null) // XXX - always true?
- return (DataContentHandler)cl.newInstance();
- } catch (IllegalAccessException e) {
- if (LogSupport.isLoggable())
- LogSupport.log("Can't load DCH " + name, e);
- } catch (ClassNotFoundException e) {
- if (LogSupport.isLoggable())
- LogSupport.log("Can't load DCH " + name, e);
- } catch (InstantiationException e) {
- if (LogSupport.isLoggable())
- LogSupport.log("Can't load DCH " + name, e);
- }
- return null;
- }
-
- /**
- * Get all the MIME types known to this command map.
- *
- * @return array of MIME types as strings
- * @since JAF 1.1
- */
- public synchronized String[] getMimeTypes() {
- List mtList = new ArrayList();
-
- for (int i = 0; i < DB.length; i++) {
- if (DB[i] == null)
- continue;
- String[] ts = DB[i].getMimeTypes();
- if (ts != null) {
- for (int j = 0; j < ts.length; j++) {
- // eliminate duplicates
- if (!mtList.contains(ts[j]))
- mtList.add(ts[j]);
- }
- }
- }
-
- String[] mts = new String[mtList.size()];
- mts = (String[])mtList.toArray(mts);
-
- return mts;
- }
-
- /**
- * Get the native commands for the given MIME type.
- * Returns an array of strings where each string is
- * an entire mailcap file entry. The application
- * will need to parse the entry to extract the actual
- * command as well as any attributes it needs. See
- * <A HREF="http://www.ietf.org/rfc/rfc1524.txt">RFC 1524</A>
- * for details of the mailcap entry syntax. Only mailcap
- * entries that specify a view command for the specified
- * MIME type are returned.
- *
- * @return array of native command entries
- * @since JAF 1.1
- */
- public synchronized String[] getNativeCommands(String mimeType) {
- List cmdList = new ArrayList();
- if (mimeType != null)
- mimeType = mimeType.toLowerCase(Locale.ENGLISH);
-
- for (int i = 0; i < DB.length; i++) {
- if (DB[i] == null)
- continue;
- String[] cmds = DB[i].getNativeCommands(mimeType);
- if (cmds != null) {
- for (int j = 0; j < cmds.length; j++) {
- // eliminate duplicates
- if (!cmdList.contains(cmds[j]))
- cmdList.add(cmds[j]);
- }
- }
- }
-
- String[] cmds = new String[cmdList.size()];
- cmds = (String[])cmdList.toArray(cmds);
-
- return cmds;
- }
-
- /**
- * for debugging...
- *
- public static void main(String[] argv) throws Exception {
- MailcapCommandMap map = new MailcapCommandMap();
- CommandInfo[] cmdInfo;
-
- cmdInfo = map.getPreferredCommands(argv[0]);
- System.out.println("Preferred Commands:");
- for (int i = 0; i < cmdInfo.length; i++)
- System.out.println("Command " + cmdInfo[i].getCommandName() + " [" +
- cmdInfo[i].getCommandClass() + "]");
- cmdInfo = map.getAllCommands(argv[0]);
- System.out.println();
- System.out.println("All Commands:");
- for (int i = 0; i < cmdInfo.length; i++)
- System.out.println("Command " + cmdInfo[i].getCommandName() + " [" +
- cmdInfo[i].getCommandClass() + "]");
- DataContentHandler dch = map.createDataContentHandler(argv[0]);
- if (dch != null)
- System.out.println("DataContentHandler " +
- dch.getClass().toString());
- System.exit(0);
- }
- */
-}
diff --git a/src/share/jaf_classes/javax/activation/MimeType.java b/src/share/jaf_classes/javax/activation/MimeType.java
deleted file mode 100644
index 279d79d6..00000000
--- a/src/share/jaf_classes/javax/activation/MimeType.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.io.*;
-import java.util.Locale;
-
-/**
- * A Multipurpose Internet Mail Extension (MIME) type, as defined
- * in RFC 2045 and 2046.
- *
- * @since 1.6
- */
-public class MimeType implements Externalizable {
-
- private String primaryType;
- private String subType;
- private MimeTypeParameterList parameters;
-
- /**
- * A string that holds all the special chars.
- */
- private static final String TSPECIALS = "()<>@,;:/[]?=\\\"";
-
- /**
- * Default constructor.
- */
- public MimeType() {
- primaryType = "application";
- subType = "*";
- parameters = new MimeTypeParameterList();
- }
-
- /**
- * Constructor that builds a MimeType from a String.
- *
- * @param rawdata the MIME type string
- */
- public MimeType(String rawdata) throws MimeTypeParseException {
- parse(rawdata);
- }
-
- /**
- * Constructor that builds a MimeType with the given primary and sub type
- * but has an empty parameter list.
- *
- * @param primary the primary MIME type
- * @param sub the MIME sub-type
- * @exception MimeTypeParseException if the primary type or subtype
- * is not a valid token
- */
- public MimeType(String primary, String sub) throws MimeTypeParseException {
- // check to see if primary is valid
- if (isValidToken(primary)) {
- primaryType = primary.toLowerCase(Locale.ENGLISH);
- } else {
- throw new MimeTypeParseException("Primary type is invalid.");
- }
-
- // check to see if sub is valid
- if (isValidToken(sub)) {
- subType = sub.toLowerCase(Locale.ENGLISH);
- } else {
- throw new MimeTypeParseException("Sub type is invalid.");
- }
-
- parameters = new MimeTypeParameterList();
- }
-
- /**
- * A routine for parsing the MIME type out of a String.
- */
- private void parse(String rawdata) throws MimeTypeParseException {
- int slashIndex = rawdata.indexOf('/');
- int semIndex = rawdata.indexOf(';');
- if ((slashIndex < 0) && (semIndex < 0)) {
- // neither character is present, so treat it
- // as an error
- throw new MimeTypeParseException("Unable to find a sub type.");
- } else if ((slashIndex < 0) && (semIndex >= 0)) {
- // we have a ';' (and therefore a parameter list),
- // but no '/' indicating a sub type is present
- throw new MimeTypeParseException("Unable to find a sub type.");
- } else if ((slashIndex >= 0) && (semIndex < 0)) {
- // we have a primary and sub type but no parameter list
- primaryType = rawdata.substring(0, slashIndex).trim().
- toLowerCase(Locale.ENGLISH);
- subType = rawdata.substring(slashIndex + 1).trim().
- toLowerCase(Locale.ENGLISH);
- parameters = new MimeTypeParameterList();
- } else if (slashIndex < semIndex) {
- // we have all three items in the proper sequence
- primaryType = rawdata.substring(0, slashIndex).trim().
- toLowerCase(Locale.ENGLISH);
- subType = rawdata.substring(slashIndex + 1, semIndex).trim().
- toLowerCase(Locale.ENGLISH);
- parameters = new MimeTypeParameterList(rawdata.substring(semIndex));
- } else {
- // we have a ';' lexically before a '/' which means we
- // have a primary type and a parameter list but no sub type
- throw new MimeTypeParseException("Unable to find a sub type.");
- }
-
- // now validate the primary and sub types
-
- // check to see if primary is valid
- if (!isValidToken(primaryType))
- throw new MimeTypeParseException("Primary type is invalid.");
-
- // check to see if sub is valid
- if (!isValidToken(subType))
- throw new MimeTypeParseException("Sub type is invalid.");
- }
-
- /**
- * Retrieve the primary type of this object.
- *
- * @return the primary MIME type
- */
- public String getPrimaryType() {
- return primaryType;
- }
-
- /**
- * Set the primary type for this object to the given String.
- *
- * @param primary the primary MIME type
- * @exception MimeTypeParseException if the primary type
- * is not a valid token
- */
- public void setPrimaryType(String primary) throws MimeTypeParseException {
- // check to see if primary is valid
- if (!isValidToken(primaryType))
- throw new MimeTypeParseException("Primary type is invalid.");
- primaryType = primary.toLowerCase(Locale.ENGLISH);
- }
-
- /**
- * Retrieve the subtype of this object.
- *
- * @return the MIME subtype
- */
- public String getSubType() {
- return subType;
- }
-
- /**
- * Set the subtype for this object to the given String.
- *
- * @param sub the MIME subtype
- * @exception MimeTypeParseException if the subtype
- * is not a valid token
- */
- public void setSubType(String sub) throws MimeTypeParseException {
- // check to see if sub is valid
- if (!isValidToken(subType))
- throw new MimeTypeParseException("Sub type is invalid.");
- subType = sub.toLowerCase(Locale.ENGLISH);
- }
-
- /**
- * Retrieve this object's parameter list.
- *
- * @return a MimeTypeParameterList object representing the parameters
- */
- public MimeTypeParameterList getParameters() {
- return parameters;
- }
-
- /**
- * Retrieve the value associated with the given name, or null if there
- * is no current association.
- *
- * @param name the parameter name
- * @return the paramter's value
- */
- public String getParameter(String name) {
- return parameters.get(name);
- }
-
- /**
- * Set the value to be associated with the given name, replacing
- * any previous association.
- *
- * @param name the parameter name
- * @param value the paramter's value
- */
- public void setParameter(String name, String value) {
- parameters.set(name, value);
- }
-
- /**
- * Remove any value associated with the given name.
- *
- * @param name the parameter name
- */
- public void removeParameter(String name) {
- parameters.remove(name);
- }
-
- /**
- * Return the String representation of this object.
- */
- public String toString() {
- return getBaseType() + parameters.toString();
- }
-
- /**
- * Return a String representation of this object
- * without the parameter list.
- *
- * @return the MIME type and sub-type
- */
- public String getBaseType() {
- return primaryType + "/" + subType;
- }
-
- /**
- * Determine if the primary and sub type of this object is
- * the same as what is in the given type.
- *
- * @param type the MimeType object to compare with
- * @return true if they match
- */
- public boolean match(MimeType type) {
- return primaryType.equals(type.getPrimaryType())
- && (subType.equals("*")
- || type.getSubType().equals("*")
- || (subType.equals(type.getSubType())));
- }
-
- /**
- * Determine if the primary and sub type of this object is
- * the same as the content type described in rawdata.
- *
- * @param rawdata the MIME type string to compare with
- * @return true if they match
- */
- public boolean match(String rawdata) throws MimeTypeParseException {
- return match(new MimeType(rawdata));
- }
-
- /**
- * The object implements the writeExternal method to save its contents
- * by calling the methods of DataOutput for its primitive values or
- * calling the writeObject method of ObjectOutput for objects, strings
- * and arrays.
- *
- * @param out the ObjectOutput object to write to
- * @exception IOException Includes any I/O exceptions that may occur
- */
- public void writeExternal(ObjectOutput out) throws IOException {
- out.writeUTF(toString());
- out.flush();
- }
-
- /**
- * The object implements the readExternal method to restore its
- * contents by calling the methods of DataInput for primitive
- * types and readObject for objects, strings and arrays. The
- * readExternal method must read the values in the same sequence
- * and with the same types as were written by writeExternal.
- *
- * @param in the ObjectInput object to read from
- * @exception ClassNotFoundException If the class for an object being
- * restored cannot be found.
- */
- public void readExternal(ObjectInput in)
- throws IOException, ClassNotFoundException {
- try {
- parse(in.readUTF());
- } catch (MimeTypeParseException e) {
- throw new IOException(e.toString());
- }
- }
-
- // below here be scary parsing related things
-
- /**
- * Determine whether or not a given character belongs to a legal token.
- */
- private static boolean isTokenChar(char c) {
- return ((c > 040) && (c < 0177)) && (TSPECIALS.indexOf(c) < 0);
- }
-
- /**
- * Determine whether or not a given string is a legal token.
- */
- private boolean isValidToken(String s) {
- int len = s.length();
- if (len > 0) {
- for (int i = 0; i < len; ++i) {
- char c = s.charAt(i);
- if (!isTokenChar(c)) {
- return false;
- }
- }
- return true;
- } else {
- return false;
- }
- }
-
- /**
- * A simple parser test,
- * for debugging...
- *
- public static void main(String[] args)
- throws MimeTypeParseException, IOException {
- for (int i = 0; i < args.length; ++i) {
- System.out.println("Original: " + args[i]);
-
- MimeType type = new MimeType(args[i]);
-
- System.out.println("Short: " + type.getBaseType());
- System.out.println("Parsed: " + type.toString());
- System.out.println();
- }
- }
- */
-}
diff --git a/src/share/jaf_classes/javax/activation/MimeTypeParameterList.java b/src/share/jaf_classes/javax/activation/MimeTypeParameterList.java
deleted file mode 100644
index 81be17a2..00000000
--- a/src/share/jaf_classes/javax/activation/MimeTypeParameterList.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.util.Hashtable;
-import java.util.Enumeration;
-import java.util.Locale;
-
-/**
- * A parameter list of a MimeType
- * as defined in RFC 2045 and 2046. The Primary type of the
- * object must already be stripped off.
- *
- * @see javax.activation.MimeType
- *
- * @since 1.6
- */
-public class MimeTypeParameterList {
- private Hashtable parameters;
-
- /**
- * A string that holds all the special chars.
- */
- private static final String TSPECIALS = "()<>@,;:/[]?=\\\"";
-
-
- /**
- * Default constructor.
- */
- public MimeTypeParameterList() {
- parameters = new Hashtable();
- }
-
- /**
- * Constructs a new MimeTypeParameterList with the passed in data.
- *
- * @param parameterList an RFC 2045, 2046 compliant parameter list.
- */
- public MimeTypeParameterList(String parameterList)
- throws MimeTypeParseException {
- parameters = new Hashtable();
-
- // now parse rawdata
- parse(parameterList);
- }
-
- /**
- * A routine for parsing the parameter list out of a String.
- *
- * @param parameterList an RFC 2045, 2046 compliant parameter list.
- */
- protected void parse(String parameterList) throws MimeTypeParseException {
- if (parameterList == null)
- return;
-
- int length = parameterList.length();
- if (length <= 0)
- return;
-
- int i;
- char c;
- for (i = skipWhiteSpace(parameterList, 0);
- i < length && (c = parameterList.charAt(i)) == ';';
- i = skipWhiteSpace(parameterList, i)) {
- int lastIndex;
- String name;
- String value;
-
- // eat the ';'
- i++;
-
- // now parse the parameter name
-
- // skip whitespace
- i = skipWhiteSpace(parameterList, i);
-
- // tolerate trailing semicolon, even though it violates the spec
- if (i >= length)
- return;
-
- // find the end of the token char run
- lastIndex = i;
- while ((i < length) && isTokenChar(parameterList.charAt(i)))
- i++;
-
- name = parameterList.substring(lastIndex, i).
- toLowerCase(Locale.ENGLISH);
-
- // now parse the '=' that separates the name from the value
- i = skipWhiteSpace(parameterList, i);
-
- if (i >= length || parameterList.charAt(i) != '=')
- throw new MimeTypeParseException(
- "Couldn't find the '=' that separates a " +
- "parameter name from its value.");
-
- // eat it and parse the parameter value
- i++;
- i = skipWhiteSpace(parameterList, i);
-
- if (i >= length)
- throw new MimeTypeParseException(
- "Couldn't find a value for parameter named " + name);
-
- // now find out whether or not we have a quoted value
- c = parameterList.charAt(i);
- if (c == '"') {
- // yup it's quoted so eat it and capture the quoted string
- i++;
- if (i >= length)
- throw new MimeTypeParseException(
- "Encountered unterminated quoted parameter value.");
-
- lastIndex = i;
-
- // find the next unescaped quote
- while (i < length) {
- c = parameterList.charAt(i);
- if (c == '"')
- break;
- if (c == '\\') {
- // found an escape sequence
- // so skip this and the
- // next character
- i++;
- }
- i++;
- }
- if (c != '"')
- throw new MimeTypeParseException(
- "Encountered unterminated quoted parameter value.");
-
- value = unquote(parameterList.substring(lastIndex, i));
- // eat the quote
- i++;
- } else if (isTokenChar(c)) {
- // nope it's an ordinary token so it
- // ends with a non-token char
- lastIndex = i;
- while (i < length && isTokenChar(parameterList.charAt(i)))
- i++;
- value = parameterList.substring(lastIndex, i);
- } else {
- // it ain't a value
- throw new MimeTypeParseException(
- "Unexpected character encountered at index " + i);
- }
-
- // now put the data into the hashtable
- parameters.put(name, value);
- }
- if (i < length) {
- throw new MimeTypeParseException(
- "More characters encountered in input than expected.");
- }
- }
-
- /**
- * Return the number of name-value pairs in this list.
- *
- * @return the number of parameters
- */
- public int size() {
- return parameters.size();
- }
-
- /**
- * Determine whether or not this list is empty.
- *
- * @return true if there are no parameters
- */
- public boolean isEmpty() {
- return parameters.isEmpty();
- }
-
- /**
- * Retrieve the value associated with the given name, or null if there
- * is no current association.
- *
- * @param name the parameter name
- * @return the parameter's value
- */
- public String get(String name) {
- return (String)parameters.get(name.trim().toLowerCase(Locale.ENGLISH));
- }
-
- /**
- * Set the value to be associated with the given name, replacing
- * any previous association.
- *
- * @param name the parameter name
- * @param value the parameter's value
- */
- public void set(String name, String value) {
- parameters.put(name.trim().toLowerCase(Locale.ENGLISH), value);
- }
-
- /**
- * Remove any value associated with the given name.
- *
- * @param name the parameter name
- */
- public void remove(String name) {
- parameters.remove(name.trim().toLowerCase(Locale.ENGLISH));
- }
-
- /**
- * Retrieve an enumeration of all the names in this list.
- *
- * @return an enumeration of all parameter names
- */
- public Enumeration getNames() {
- return parameters.keys();
- }
-
- /**
- * Return a string representation of this object.
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.ensureCapacity(parameters.size() * 16);
- // heuristic: 8 characters per field
-
- Enumeration keys = parameters.keys();
- while (keys.hasMoreElements()) {
- String key = (String)keys.nextElement();
- buffer.append("; ");
- buffer.append(key);
- buffer.append('=');
- buffer.append(quote((String)parameters.get(key)));
- }
-
- return buffer.toString();
- }
-
- // below here be scary parsing related things
-
- /**
- * Determine whether or not a given character belongs to a legal token.
- */
- private static boolean isTokenChar(char c) {
- return ((c > 040) && (c < 0177)) && (TSPECIALS.indexOf(c) < 0);
- }
-
- /**
- * return the index of the first non white space character in
- * rawdata at or after index i.
- */
- private static int skipWhiteSpace(String rawdata, int i) {
- int length = rawdata.length();
- while ((i < length) && Character.isWhitespace(rawdata.charAt(i)))
- i++;
- return i;
- }
-
- /**
- * A routine that knows how and when to quote and escape the given value.
- */
- private static String quote(String value) {
- boolean needsQuotes = false;
-
- // check to see if we actually have to quote this thing
- int length = value.length();
- for (int i = 0; (i < length) && !needsQuotes; i++) {
- needsQuotes = !isTokenChar(value.charAt(i));
- }
-
- if (needsQuotes) {
- StringBuffer buffer = new StringBuffer();
- buffer.ensureCapacity((int)(length * 1.5));
-
- // add the initial quote
- buffer.append('"');
-
- // add the properly escaped text
- for (int i = 0; i < length; ++i) {
- char c = value.charAt(i);
- if ((c == '\\') || (c == '"'))
- buffer.append('\\');
- buffer.append(c);
- }
-
- // add the closing quote
- buffer.append('"');
-
- return buffer.toString();
- } else {
- return value;
- }
- }
-
- /**
- * A routine that knows how to strip the quotes and
- * escape sequences from the given value.
- */
- private static String unquote(String value) {
- int valueLength = value.length();
- StringBuffer buffer = new StringBuffer();
- buffer.ensureCapacity(valueLength);
-
- boolean escaped = false;
- for (int i = 0; i < valueLength; ++i) {
- char currentChar = value.charAt(i);
- if (!escaped && (currentChar != '\\')) {
- buffer.append(currentChar);
- } else if (escaped) {
- buffer.append(currentChar);
- escaped = false;
- } else {
- escaped = true;
- }
- }
-
- return buffer.toString();
- }
-}
diff --git a/src/share/jaf_classes/javax/activation/MimeTypeParseException.java b/src/share/jaf_classes/javax/activation/MimeTypeParseException.java
deleted file mode 100644
index d9ce6b53..00000000
--- a/src/share/jaf_classes/javax/activation/MimeTypeParseException.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-/**
- * A class to encapsulate MimeType parsing related exceptions.
- *
- * @since 1.6
- */
-public class MimeTypeParseException extends Exception {
-
- /**
- * Constructs a MimeTypeParseException with no specified detail message.
- */
- public MimeTypeParseException() {
- super();
- }
-
- /**
- * Constructs a MimeTypeParseException with the specified detail message.
- *
- * @param s the detail message.
- */
- public MimeTypeParseException(String s) {
- super(s);
- }
-}
diff --git a/src/share/jaf_classes/javax/activation/MimetypesFileTypeMap.java b/src/share/jaf_classes/javax/activation/MimetypesFileTypeMap.java
deleted file mode 100644
index d2297da8..00000000
--- a/src/share/jaf_classes/javax/activation/MimetypesFileTypeMap.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import com.sun.activation.registries.MimeTypeFile;
-import com.sun.activation.registries.LogSupport;
-
-/**
- * This class extends FileTypeMap and provides data typing of files
- * via their file extension. It uses the <code>.mime.types</code> format. <p>
- *
- * <b>MIME types file search order:</b><p>
- * The MimetypesFileTypeMap looks in various places in the user's
- * system for MIME types file entries. When requests are made
- * to search for MIME types in the MimetypesFileTypeMap, it searches
- * MIME types files in the following order:
- * <p>
- * <ol>
- * <li> Programmatically added entries to the MimetypesFileTypeMap instance.
- * <li> The file <code>.mime.types</code> in the user's home directory.
- * <li> The file &lt;<i>java.home</i>&gt;<code>/lib/mime.types</code>.
- * <li> The file or resources named <code>META-INF/mime.types</code>.
- * <li> The file or resource named <code>META-INF/mimetypes.default</code>
- * (usually found only in the <code>activation.jar</code> file).
- * </ol>
- * <p>
- * <b>MIME types file format:</b><p>
- *
- * <code>
- * # comments begin with a '#'<br>
- * # the format is &lt;mime type> &lt;space separated file extensions><br>
- * # for example:<br>
- * text/plain txt text TXT<br>
- * # this would map file.txt, file.text, and file.TXT to<br>
- * # the mime type "text/plain"<br>
- * </code>
- *
- * @author Bart Calder
- * @author Bill Shannon
- *
- * @since 1.6
- */
-public class MimetypesFileTypeMap extends FileTypeMap {
- /*
- * We manage a collection of databases, searched in order.
- */
- private MimeTypeFile[] DB;
- private static final int PROG = 0; // programmatically added entries
-
- private static String defaultType = "application/octet-stream";
-
- /**
- * The default constructor.
- */
- public MimetypesFileTypeMap() {
- Vector dbv = new Vector(5); // usually 5 or less databases
- MimeTypeFile mf = null;
- dbv.addElement(null); // place holder for PROG entry
-
- LogSupport.log("MimetypesFileTypeMap: load HOME");
- try {
- String user_home = System.getProperty("user.home");
-
- if (user_home != null) {
- String path = user_home + File.separator + ".mime.types";
- mf = loadFile(path);
- if (mf != null)
- dbv.addElement(mf);
- }
- } catch (SecurityException ex) {}
-
- LogSupport.log("MimetypesFileTypeMap: load SYS");
- try {
- // check system's home
- String system_mimetypes = System.getProperty("java.home") +
- File.separator + "lib" + File.separator + "mime.types";
- mf = loadFile(system_mimetypes);
- if (mf != null)
- dbv.addElement(mf);
- } catch (SecurityException ex) {}
-
- LogSupport.log("MimetypesFileTypeMap: load JAR");
- // load from the app's jar file
- loadAllResources(dbv, "META-INF/mime.types");
-
- LogSupport.log("MimetypesFileTypeMap: load DEF");
- mf = loadResource("/META-INF/mimetypes.default");
-
- if (mf != null)
- dbv.addElement(mf);
-
- DB = new MimeTypeFile[dbv.size()];
- dbv.copyInto(DB);
- }
-
- /**
- * Load from the named resource.
- */
- private MimeTypeFile loadResource(String name) {
- InputStream clis = null;
- try {
- clis = SecuritySupport.getResourceAsStream(this.getClass(), name);
- if (clis != null) {
- MimeTypeFile mf = new MimeTypeFile(clis);
- if (LogSupport.isLoggable())
- LogSupport.log("MimetypesFileTypeMap: successfully " +
- "loaded mime types file: " + name);
- return mf;
- } else {
- if (LogSupport.isLoggable())
- LogSupport.log("MimetypesFileTypeMap: not loading " +
- "mime types file: " + name);
- }
- } catch (IOException e) {
- if (LogSupport.isLoggable())
- LogSupport.log("MimetypesFileTypeMap: can't load " + name, e);
- } catch (SecurityException sex) {
- if (LogSupport.isLoggable())
- LogSupport.log("MimetypesFileTypeMap: can't load " + name, sex);
- } finally {
- try {
- if (clis != null)
- clis.close();
- } catch (IOException ex) { } // ignore it
- }
- return null;
- }
-
- /**
- * Load all of the named resource.
- */
- private void loadAllResources(Vector v, String name) {
- boolean anyLoaded = false;
- try {
- URL[] urls;
- ClassLoader cld = null;
- // First try the "application's" class loader.
- cld = SecuritySupport.getContextClassLoader();
- if (cld == null)
- cld = this.getClass().getClassLoader();
- if (cld != null)
- urls = SecuritySupport.getResources(cld, name);
- else
- urls = SecuritySupport.getSystemResources(name);
- if (urls != null) {
- if (LogSupport.isLoggable())
- LogSupport.log("MimetypesFileTypeMap: getResources");
- for (int i = 0; i < urls.length; i++) {
- URL url = urls[i];
- InputStream clis = null;
- if (LogSupport.isLoggable())
- LogSupport.log("MimetypesFileTypeMap: URL " + url);
- try {
- clis = SecuritySupport.openStream(url);
- if (clis != null) {
- v.addElement(new MimeTypeFile(clis));
- anyLoaded = true;
- if (LogSupport.isLoggable())
- LogSupport.log("MimetypesFileTypeMap: " +
- "successfully loaded " +
- "mime types from URL: " + url);
- } else {
- if (LogSupport.isLoggable())
- LogSupport.log("MimetypesFileTypeMap: " +
- "not loading " +
- "mime types from URL: " + url);
- }
- } catch (IOException ioex) {
- if (LogSupport.isLoggable())
- LogSupport.log("MimetypesFileTypeMap: can't load " +
- url, ioex);
- } catch (SecurityException sex) {
- if (LogSupport.isLoggable())
- LogSupport.log("MimetypesFileTypeMap: can't load " +
- url, sex);
- } finally {
- try {
- if (clis != null)
- clis.close();
- } catch (IOException cex) { }
- }
- }
- }
- } catch (Exception ex) {
- if (LogSupport.isLoggable())
- LogSupport.log("MimetypesFileTypeMap: can't load " + name, ex);
- }
-
- // if failed to load anything, fall back to old technique, just in case
- if (!anyLoaded) {
- LogSupport.log("MimetypesFileTypeMap: !anyLoaded");
- MimeTypeFile mf = loadResource("/" + name);
- if (mf != null)
- v.addElement(mf);
- }
- }
-
- /**
- * Load the named file.
- */
- private MimeTypeFile loadFile(String name) {
- MimeTypeFile mtf = null;
-
- try {
- mtf = new MimeTypeFile(name);
- } catch (IOException e) {
- // e.printStackTrace();
- }
- return mtf;
- }
-
- /**
- * Construct a MimetypesFileTypeMap with programmatic entries
- * added from the named file.
- *
- * @param mimeTypeFileName the file name
- */
- public MimetypesFileTypeMap(String mimeTypeFileName) throws IOException {
- this();
- DB[PROG] = new MimeTypeFile(mimeTypeFileName);
- }
-
- /**
- * Construct a MimetypesFileTypeMap with programmatic entries
- * added from the InputStream.
- *
- * @param is the input stream to read from
- */
- public MimetypesFileTypeMap(InputStream is) {
- this();
- try {
- DB[PROG] = new MimeTypeFile(is);
- } catch (IOException ex) {
- // XXX - really should throw it
- }
- }
-
- /**
- * Prepend the MIME type values to the registry.
- *
- * @param mime_types A .mime.types formatted string of entries.
- */
- public synchronized void addMimeTypes(String mime_types) {
- // check to see if we have created the registry
- if (DB[PROG] == null)
- DB[PROG] = new MimeTypeFile(); // make one
-
- DB[PROG].appendToRegistry(mime_types);
- }
-
- /**
- * Return the MIME type of the file object.
- * The implementation in this class calls
- * <code>getContentType(f.getName())</code>.
- *
- * @param f the file
- * @return the file's MIME type
- */
- public String getContentType(File f) {
- return this.getContentType(f.getName());
- }
-
- /**
- * Return the MIME type based on the specified file name.
- * The MIME type entries are searched as described above under
- * <i>MIME types file search order</i>.
- * If no entry is found, the type "application/octet-stream" is returned.
- *
- * @param filename the file name
- * @return the file's MIME type
- */
- public synchronized String getContentType(String filename) {
- int dot_pos = filename.lastIndexOf("."); // period index
-
- if (dot_pos < 0)
- return defaultType;
-
- String file_ext = filename.substring(dot_pos + 1);
- if (file_ext.length() == 0)
- return defaultType;
-
- for (int i = 0; i < DB.length; i++) {
- if (DB[i] == null)
- continue;
- String result = DB[i].getMIMETypeString(file_ext);
- if (result != null)
- return result;
- }
- return defaultType;
- }
-
- /**
- * for debugging...
- *
- public static void main(String[] argv) throws Exception {
- MimetypesFileTypeMap map = new MimetypesFileTypeMap();
- System.out.println("File " + argv[0] + " has MIME type " +
- map.getContentType(argv[0]));
- System.exit(0);
- }
- */
-}
diff --git a/src/share/jaf_classes/javax/activation/SecuritySupport.java b/src/share/jaf_classes/javax/activation/SecuritySupport.java
deleted file mode 100644
index 33139d6b..00000000
--- a/src/share/jaf_classes/javax/activation/SecuritySupport.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.security.*;
-import java.net.*;
-import java.io.*;
-import java.util.*;
-
-/**
- * Security related methods that only work on J2SE 1.2 and newer.
- *
- * @since 1.6
- */
-class SecuritySupport {
-
- private SecuritySupport() {
- // private constructor, can't create an instance
- }
-
- public static ClassLoader getContextClassLoader() {
- return (ClassLoader)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- ClassLoader cl = null;
- try {
- cl = Thread.currentThread().getContextClassLoader();
- } catch (SecurityException ex) { }
- return cl;
- }
- });
- }
-
- public static InputStream getResourceAsStream(final Class c,
- final String name) throws IOException {
- try {
- return (InputStream)
- AccessController.doPrivileged(new PrivilegedExceptionAction() {
- public Object run() throws IOException {
- return c.getResourceAsStream(name);
- }
- });
- } catch (PrivilegedActionException e) {
- throw (IOException)e.getException();
- }
- }
-
- public static URL[] getResources(final ClassLoader cl, final String name) {
- return (URL[])
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- URL[] ret = null;
- try {
- List v = new ArrayList();
- Enumeration e = cl.getResources(name);
- while (e != null && e.hasMoreElements()) {
- URL url = (URL)e.nextElement();
- if (url != null)
- v.add(url);
- }
- if (v.size() > 0) {
- ret = new URL[v.size()];
- ret = (URL[])v.toArray(ret);
- }
- } catch (IOException ioex) {
- } catch (SecurityException ex) { }
- return ret;
- }
- });
- }
-
- public static URL[] getSystemResources(final String name) {
- return (URL[])
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- URL[] ret = null;
- try {
- List v = new ArrayList();
- Enumeration e = ClassLoader.getSystemResources(name);
- while (e != null && e.hasMoreElements()) {
- URL url = (URL)e.nextElement();
- if (url != null)
- v.add(url);
- }
- if (v.size() > 0) {
- ret = new URL[v.size()];
- ret = (URL[])v.toArray(ret);
- }
- } catch (IOException ioex) {
- } catch (SecurityException ex) { }
- return ret;
- }
- });
- }
-
- public static InputStream openStream(final URL url) throws IOException {
- try {
- return (InputStream)
- AccessController.doPrivileged(new PrivilegedExceptionAction() {
- public Object run() throws IOException {
- return url.openStream();
- }
- });
- } catch (PrivilegedActionException e) {
- throw (IOException)e.getException();
- }
- }
-}
diff --git a/src/share/jaf_classes/javax/activation/URLDataSource.java b/src/share/jaf_classes/javax/activation/URLDataSource.java
deleted file mode 100644
index f42df8c1..00000000
--- a/src/share/jaf_classes/javax/activation/URLDataSource.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.net.URL;
-import java.net.URLConnection;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.IOException;
-
-/**
- * The URLDataSource class provides an object that wraps a <code>URL</code>
- * object in a DataSource interface. URLDataSource simplifies the handling
- * of data described by URLs within the JavaBeans Activation Framework
- * because this class can be used to create new DataHandlers. <i>NOTE: The
- * DataHandler object creates a URLDataSource internally,
- * when it is constructed with a URL.</i>
- *
- * @see javax.activation.DataSource
- * @see javax.activation.DataHandler
- *
- * @since 1.6
- */
-public class URLDataSource implements DataSource {
- private URL url = null;
- private URLConnection url_conn = null;
-
- /**
- * URLDataSource constructor. The URLDataSource class will
- * not open a connection to the URL until a method requiring it
- * to do so is called.
- *
- * @param url The URL to be encapsulated in this object.
- */
- public URLDataSource(URL url) {
- this.url = url;
- }
-
- /**
- * Returns the value of the URL content-type header field.
- * It calls the URL's <code>URLConnection.getContentType</code> method
- * after retrieving a URLConnection object.
- * <i>Note: this method attempts to call the <code>openConnection</code>
- * method on the URL. If this method fails, or if a content type is not
- * returned from the URLConnection, getContentType returns
- * "application/octet-stream" as the content type.</i>
- *
- * @return the content type.
- */
- public String getContentType() {
- String type = null;
-
- try {
- if (url_conn == null)
- url_conn = url.openConnection();
- } catch (IOException e) { }
-
- if (url_conn != null)
- type = url_conn.getContentType();
-
- if (type == null)
- type = "application/octet-stream";
-
- return type;
- }
-
- /**
- * Calls the <code>getFile</code> method on the URL used to
- * instantiate the object.
- *
- * @return the result of calling the URL's getFile method.
- */
- public String getName() {
- return url.getFile();
- }
-
- /**
- * The getInputStream method from the URL. Calls the
- * <code>openStream</code> method on the URL.
- *
- * @return the InputStream.
- */
- public InputStream getInputStream() throws IOException {
- return url.openStream();
- }
-
- /**
- * The getOutputStream method from the URL. First an attempt is
- * made to get the URLConnection object for the URL. If that
- * succeeds, the getOutputStream method on the URLConnection
- * is returned.
- *
- * @return the OutputStream.
- */
- public OutputStream getOutputStream() throws IOException {
- // get the url connection if it is available
- url_conn = url.openConnection();
-
- if (url_conn != null) {
- url_conn.setDoOutput(true);
- return url_conn.getOutputStream();
- } else
- return null;
- }
-
- /**
- * Return the URL used to create this DataSource.
- *
- * @return The URL.
- */
- public URL getURL() {
- return url;
- }
-}
diff --git a/src/share/jaf_classes/javax/activation/UnsupportedDataTypeException.java b/src/share/jaf_classes/javax/activation/UnsupportedDataTypeException.java
deleted file mode 100644
index bed052cc..00000000
--- a/src/share/jaf_classes/javax/activation/UnsupportedDataTypeException.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.activation;
-
-import java.io.IOException;
-
-/**
- * Signals that the requested operation does not support the
- * requested data type.
- *
- * @see javax.activation.DataHandler
- *
- * @since 1.6
- */
-
-public class UnsupportedDataTypeException extends IOException {
- /**
- * Constructs an UnsupportedDataTypeException with no detail
- * message.
- */
- public UnsupportedDataTypeException() {
- super();
- }
-
- /**
- * Constructs an UnsupportedDataTypeException with the specified
- * message.
- *
- * @param s The detail message.
- */
- public UnsupportedDataTypeException(String s) {
- super(s);
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyle.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyle.java
deleted file mode 100644
index b56816d8..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyle.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.oracle.webservices.internal.api;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-import javax.xml.ws.http.HTTPBinding;
-import javax.xml.ws.soap.SOAPBinding;
-import javax.xml.ws.spi.WebServiceFeatureAnnotation;
-
-/**
- * The EnvelopeStyle annotation is used to specify the message envelope style(s)
- * for a web service endpoint implementation class. To smooth the migration from
- * the BindingType annotation to this EnvelopeStyle annotation, each of the
- * styles is mapped to a binding identifier defined in JAX-WS specification.
- * Though a binding identifier includes both the envelope style and transport,
- * an envelope style defined herein does NOT imply or mandate any transport protocol
- * to be use together; HTTP is the default transport. An implementation may
- * chose to support other transport with any of the envelope styles.
- *
- * This annotation may be overriden programmatically or via deployment
- * descriptors, depending on the platform in use.
- *
- * @author shih-chang.chen@oracle.com
- */
-@WebServiceFeatureAnnotation(id="", bean=com.oracle.webservices.internal.api.EnvelopeStyleFeature.class)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface EnvelopeStyle {
-
- /**
- * The envelope styles. If not specified, the default is the SOAP 1.1.
- *
- * @return The enveloping styles
- */
- Style[] style() default { Style.SOAP11 };
-
- public enum Style {
-
- /**
- * SOAP1.1. For JAX-WS, this is mapped from:
- * javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING
- */
- SOAP11(SOAPBinding.SOAP11HTTP_BINDING),
-
- /**
- * SOAP1.2. For JAX-WS, this is mapped from:
- * javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING
- */
- SOAP12(SOAPBinding.SOAP12HTTP_BINDING),
-
- /**
- * The raw XML. For JAX-WS, this is mapped from:
- * javax.xml.ws.http.HTTPBinding.HTTP_BINDING
- */
- XML(HTTPBinding.HTTP_BINDING);
-
- /**
- * The BindingID used by the BindingType annotation.
- */
- public final String bindingId;
-
- private Style(String id) {
- bindingId = id;
- }
-
- /**
- * Checks if the style is SOAP 1.1.
- *
- * @return true if the style is SOAP 1.1.
- */
- public boolean isSOAP11() { return this.equals(SOAP11); }
-
- /**
- * Checks if the style is SOAP 1.2.
- *
- * @return true if the style is SOAP 1.2.
- */
- public boolean isSOAP12() { return this.equals(SOAP12); }
-
- /**
- * Checks if the style is XML.
- *
- * @return true if the style is XML.
- */
- public boolean isXML() { return this.equals(XML); }
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyleFeature.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyleFeature.java
deleted file mode 100644
index 07aa92d6..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyleFeature.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.webservices.internal.api;
-
-import javax.xml.ws.WebServiceFeature;
-
-public class EnvelopeStyleFeature extends WebServiceFeature {
-
- private EnvelopeStyle.Style[] styles;
-
- public EnvelopeStyleFeature(EnvelopeStyle.Style... s) {
- styles = s;
- }
-
- public EnvelopeStyle.Style[] getStyles() {
- return styles;
- }
-
- public String getID() {
- return EnvelopeStyleFeature.class.getName();
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/Databinding.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/Databinding.java
deleted file mode 100644
index 5f015061..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/Databinding.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.webservices.internal.api.databinding;
-
-import java.lang.reflect.Method;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-import javax.xml.ws.WebServiceFeature;
-
-import org.xml.sax.EntityResolver;
-
-import com.oracle.webservices.internal.api.message.MessageContext;
-
-/**
- * {@code Databinding} is the entry point for all the WebService Databinding
- * functionality. Primarily, a Databinding is to serialize/deserialize an
- * XML(SOAP) message to/from a JAVA method invocation and return which are
- * represented as <code>JavaCallInfo</code> instances. A WSDLGenerator can
- * be created from a Databinding object to genreate WSDL representation of
- * a JAVA service endpoint interface.
- * <p>
- * </p>
- * The supported databinding modes(flavors) are:
- * <ul>
- * <li>"toplink.jaxb"</li>
- * <li>"glassfish.jaxb"</li>
- * </ul>
- * <blockquote> Following is an example that creates a {@code Databinding} which
- * provides the operations to serialize/deserialize a JavaCallInfo to/from a
- * SOAP message:<br/>
- *
- * <pre>
- * DatabindingFactory factory = DatabindingFactory.newInstance();
- * Databinding.Builder builder = factory.createBuilder(seiClass, endpointClass);
- * Databinding databinding = builder.build();
- * </pre>
- *
- * </blockquote>
- *
- * @see com.oracle.webservices.internal.api.databinding.DatabindingFactory
- *
- * @author shih-chang.chen@oracle.com
- */
-public interface Databinding {
-
- /**
- * Creates a new instance of a <code>JavaCallInfo</code>.
- *
- * @param method The JAVA method
- * @param args The parameter objects
- *
- * @return New instance of a <code>JavaCallInfo</code>
- */
- JavaCallInfo createJavaCallInfo(Method method, Object[] args);
-
- /**
- * Serializes a JavaCallInfo instance representing a JAVA method call to a
- * request XML(SOAP) message.
- *
- * @param call The JavaCallInfo representing a method call
- *
- * @return The request XML(SOAP) message
- */
- MessageContext serializeRequest(JavaCallInfo call);
-
- /**
- * Deserializes a response XML(SOAP) message to a JavaCallInfo instance
- * representing the return value or exception of a JAVA method call.
- *
- * @param message The response message
- * @param call The JavaCallInfo instance to be updated
- *
- * @return The JavaCallInfo updated with the return value or exception of a
- * JAVA method call
- */
- JavaCallInfo deserializeResponse(MessageContext message, JavaCallInfo call);
-
- /**
- * Deserializes a request XML(SOAP) message to a JavaCallInfo instance
- * representing a JAVA method call.
- *
- * @param message The request message
- *
- * @return The JavaCallInfo representing a method call
- */
- JavaCallInfo deserializeRequest(MessageContext message);
-
- /**
- * Serializes a JavaCallInfo instance representing the return value or
- * exception of a JAVA method call to a response XML(SOAP) message.
- *
- * @param call The JavaCallInfo representing the return value or exception
- * of a JAVA method call
- *
- * @return The response XML(SOAP) message
- */
- MessageContext serializeResponse(JavaCallInfo call);
-
- /**
- * Gets the MessageContextFactory
- *
- * @return The MessageContextFactory
- */
-//Wait for WLS/src1212 - wls.jaxrpc wrapper
-// MessageContextFactory getMessageContextFactory();
-
- /**
- * {@code Databinding.Builder}, created from the DatabindingFactory, is used to
- * configure how a Databinding instance is to be built from this builder.
- *
- * @see com.oracle.webservices.internal.api.databinding.DatabindingFactory
- * @author shih-chang.chen@oracle.com
- */
- public interface Builder {
-
- /**
- * Sets the targetNamespace of the WSDL
- *
- * @param targetNamespace The targetNamespace to set
- *
- * @return this Builder instance
- */
- Builder targetNamespace(String targetNamespace);
-
- /**
- * Sets the service name of the WSDL
- *
- * @param serviceName The serviceName to set
- *
- * @return this Builder instance
- */
- Builder serviceName(QName serviceName);
-
- /**
- * Sets the port name of the WSDL
- *
- * @param portName The portName to set
- *
- * @return this Builder instance
- */
- Builder portName(QName portName);
-
- /**
- * @deprecated - no replacement - this was never implemented
- *
- * Sets the WSDL URL where the WSDL can be read from
- *
- * @param wsdlURL The wsdlURL to set
- *
- * @return this Builder instance
- */
- Builder wsdlURL(URL wsdlURL);
-
- /**
- * @deprecated - no replacement - this was never implemented
- *
- * Sets the WSDL Source where the WSDL can be read from
- *
- * @param wsdlSource The wsdlSource to set
- *
- * @return this Builder instance
- */
- Builder wsdlSource(Source wsdlSource);
-
- /**
- * @deprecated - no replacement - this was never implemented
- *
- * Sets the {@link EntityResolver} for reading the WSDL
- *
- * @param entityResolver The {@link EntityResolver} to set
- *
- * @return this Builder instance
- */
- Builder entityResolver(EntityResolver entityResolver);
-
- /**
- * Sets the ClassLoader which is used to load the service endpoint
- * interface, implementation bean, and all the value types. If this
- * value is not set, the default it uses contractClass.getClassLoader().
- *
- * @param classLoader The classLoader to set
- *
- * @return this Builder instance
- */
- Builder classLoader(ClassLoader classLoader);
-
- /**
- * Sets A list of WebServiceFeatures
- *
- * @param features The list of WebServiceFeatures
- *
- * @return this Builder instance
- */
- Builder feature(WebServiceFeature... features);
-
- /**
- * Sets A property of the Databinding object to be created
- *
- * @param name The name of the property
- * @param value The value of the property
- *
- * @return this Builder instance
- */
- Builder property(String name, Object value);
-
- /**
- * Builds a new Databinding instance
- *
- * @return The Builder instance
- */
- Databinding build();
-
- /**
- * Creates the WSDLGenerator which can be used to generate the WSDL
- * representation of the service endpoint interface of this Databinding
- * object.
- *
- * @return WSDLGenerator The WSDLGenerator
- */
- com.oracle.webservices.internal.api.databinding.WSDLGenerator createWSDLGenerator();
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingFactory.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingFactory.java
deleted file mode 100644
index 6b2a3e11..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingFactory.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.oracle.webservices.internal.api.databinding;
-
-import java.util.Map;
-
-/**
- * {@code DatabindingFactory} is the entry point of all the WebService
- * Databinding APIs. A DatabindingFactory instance can be used to create
- * <code>Databinding.Builder</code> instances, and <code>Databinding.Builder</code>
- * instances are used to configure and build <code>Databinding</code> instances.
- * <p>
- * </P>
- * <blockquote>
- * Following is an example that creates a {@code Databinding} which provides the
- * operations to serialize/deserialize a JavaCallInfo to/from a SOAP message:<br/>
- * <pre>
- * DatabindingFactory factory = DatabindingFactory.newInstance();
- * Databinding.Builder builder = factory.createBuilder(seiClass, endpointClass);
- * Databinding databinding = builder.build();
- * </pre>
- * </blockquote>
- *
- * @see com.oracle.webservices.internal.api.databinding.Databinding
- *
- * @author shih-chang.chen@oracle.com
- */
-public abstract class DatabindingFactory {
-
- /**
- * Creates a new instance of a <code>Databinding.Builder</code> which is
- * initialized with the specified contractClass and endpointClass. The most
- * importance initial states of a Builder object is the contract class which
- * is also called "service endpoint interface" or "SEI" in JAX-WS and JAX-RPC,
- * and the implementation bean class (endpointClass). The the implementation
- * bean class (endpointClass) should be null if the Builder is to create
- * the client side proxy databinding.
- *
- * @param contractClass The service endpoint interface class
- * @param endpointClass The service implementation bean class
- *
- * @return New instance of a <code>Databinding.Builder</code>
- */
- abstract public Databinding.Builder createBuilder(Class<?> contractClass, Class<?> endpointClass);
-
- /**
- * Access properties on the <code>DatabindingFactory</code> instance.
- *
- * @return properties of this WsFactory
- */
- abstract public Map<String, Object> properties();
-
- /**
- * The default implementation class name.
- */
- static final String ImplClass = "com.sun.xml.internal.ws.db.DatabindingFactoryImpl";
-
- /**
- * Create a new instance of a <code>DatabindingFactory</code>. This static method
- * creates a new factory instance.
- *
- * Once an application has obtained a reference to a <code>DatabindingFactory</code>
- * it can use the factory to obtain and configure a <code>Databinding.Builder</code>
- * to build a <code>Databinding</code> instances.
- *
- * @return New instance of a <code>DatabindingFactory</code>
- */
- static public DatabindingFactory newInstance() {
- try {
- Class<?> cls = Class.forName(ImplClass);
- return convertIfNecessary(cls);
- } catch (Exception e) {
- e.printStackTrace();
- }
- return null;
- }
-
- @SuppressWarnings("deprecation")
- private static DatabindingFactory convertIfNecessary(Class<?> cls) throws InstantiationException, IllegalAccessException {
- return (DatabindingFactory) cls.newInstance();
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingMode.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingMode.java
deleted file mode 100644
index af18221f..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingMode.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.webservices.internal.api.databinding;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-import javax.xml.ws.spi.WebServiceFeatureAnnotation;
-
-@WebServiceFeatureAnnotation(id="", bean=com.oracle.webservices.internal.api.databinding.DatabindingModeFeature.class)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface DatabindingMode {
- String value();
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingModeFeature.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingModeFeature.java
deleted file mode 100644
index 5acb939e..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingModeFeature.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.oracle.webservices.internal.api.databinding;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.ws.WebServiceFeature;
-
-public class DatabindingModeFeature extends WebServiceFeature implements com.sun.xml.internal.ws.api.ServiceSharedFeatureMarker {
- /**
- * Constant value identifying the DatabindingFeature
- */
- static public final String ID = "http://jax-ws.java.net/features/databinding";
-
- static public final String GLASSFISH_JAXB = "glassfish.jaxb";
-
- //These constants should be defined in the corresponding plugin package
-// static public final String ECLIPSELINK_JAXB = "eclipselink.jaxb";
-// static public final String ECLIPSELINK_SDO = "eclipselink.sdo";
-// static public final String TOPLINK_JAXB = "toplink.jaxb";
-// static public final String TOPLINK_SDO = "toplink.sdo";
-
- private String mode;
- private Map<String, Object> properties;
-
- public DatabindingModeFeature(String mode) {
- super();
- this.mode = mode;
- properties = new HashMap<String, Object>();
- }
-
- public String getMode() {
- return mode;
- }
-
- public String getID() {
- return ID;
- }
-
- public Map<String, Object> getProperties() {
- return properties;
- }
-
- public static Builder builder() { return new Builder(new DatabindingModeFeature(null)); }
-
- public final static class Builder {
- final private DatabindingModeFeature o;
- Builder(final DatabindingModeFeature x) { o = x; }
- public DatabindingModeFeature build() { return o; }
-// public DatabindingModeFeature build() { return (DatabindingModeFeature) FeatureValidator.validate(o); }
- public Builder value(final String x) { o.mode = x; return this; }
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/ExternalMetadataFeature.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/ExternalMetadataFeature.java
deleted file mode 100644
index 4f0b2119..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/ExternalMetadataFeature.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.oracle.webservices.internal.api.databinding;
-
-import com.sun.xml.internal.ws.api.databinding.MetadataReader;
-import com.sun.xml.internal.ws.model.ExternalMetadataReader;
-
-import javax.xml.ws.WebServiceFeature;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * WebServiceFeature allowing to define either on server or client side external xml descriptors replacing/supplementing
- * WS metadata provided by class annotations. This can be useful if those annotations are missing (existing non-WS
- * components) or if it is necessary to override those.
- *
- * @author Miroslav Kos (miroslav.kos at oracle.com)
- */
-public class ExternalMetadataFeature extends WebServiceFeature {
-
- private static final String ID = "com.oracle.webservices.internal.api.databinding.ExternalMetadataFeature";
-
- /**
- * Enable this feature. Defaults to true.
- */
- private boolean enabled = true;
-
- private List<String> resourceNames;
- private List<File> files;
- private MetadataReader reader;
-
- private ExternalMetadataFeature() {
- }
-
- public void addResources(String... resourceNames) {
- if (this.resourceNames == null) {
- this.resourceNames = new ArrayList<String>();
- }
- Collections.addAll(this.resourceNames, resourceNames);
- }
-
- public List<String> getResourceNames() { return resourceNames; }
-
- public void addFiles(File... files) {
- if (this.files == null) {
- this.files = new ArrayList<File>();
- }
- Collections.addAll(this.files, files);
- }
-
- public List<File> getFiles() { return files; }
-
- public boolean isEnabled() {
- return enabled;
- }
-
- private void setEnabled(final boolean x) {
- enabled = x;
- }
-
- @Override
- public String getID() {
- return ID;
- }
-
- public MetadataReader getMetadataReader(ClassLoader classLoader, boolean disableXmlSecurity) {
- if (reader != null && enabled) return reader;
- return enabled ? new ExternalMetadataReader(files, resourceNames, classLoader, true, disableXmlSecurity) : null;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- ExternalMetadataFeature that = (ExternalMetadataFeature) o;
-
- if (enabled != that.enabled) return false;
- if (files != null ? !files.equals(that.files) : that.files != null) return false;
- if (resourceNames != null ? !resourceNames.equals(that.resourceNames) : that.resourceNames != null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = (enabled ? 1 : 0);
- result = 31 * result + (resourceNames != null ? resourceNames.hashCode() : 0);
- result = 31 * result + (files != null ? files.hashCode() : 0);
- return result;
- }
-
- @Override
- public String toString() {
- return "[" + getID() +
- ", enabled=" + enabled +
- ", resourceNames=" + resourceNames +
- ", files=" + files +
- ']';
- }
-
- public static Builder builder() {
- return new Builder(new ExternalMetadataFeature());
- }
-
- public final static class Builder {
- final private ExternalMetadataFeature o;
-
- Builder(final ExternalMetadataFeature x) {
- o = x;
- }
-
- public ExternalMetadataFeature build() {
- return o;
- }
-
- public Builder addResources(String... res) {
- o.addResources(res);
- return this;
- }
-
- public Builder addFiles(File... files) {
- o.addFiles(files);
- return this;
- }
-
- public Builder setEnabled(boolean enabled) {
- o.setEnabled(enabled);
- return this;
- }
-
- public Builder setReader( MetadataReader r ) {
- o.reader = r;
- return this;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/JavaCallInfo.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/JavaCallInfo.java
deleted file mode 100644
index db9a9f2f..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/JavaCallInfo.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.webservices.internal.api.databinding;
-
-import java.lang.reflect.Method;
-
-/**
- * On the client or service-requestor side, a JavaCallInfo object represents a
- * method call on the service proxy to be serialized as a SOAP request message
- * to be sent to the service. A SOAP response message returned to the service
- * client is deserialized as an update to the JavaCallInfo object which is used
- * to generated the request.
- * <p>
- * </p>
- * On the server or service provider side, a SOAP request message is
- * deserialized to a JavaCallInfo object which can be used to determine which
- * method to call, and get the parameter values to call the back-end service
- * implementation object. The return value or exception returned from the
- * service implementation should be set to the JavaCallInfo object which then
- * can be used to serialize to a A SOAP response or fault message to be sent
- * back to the service client.
- *
- * @author shih-chang.chen@oracle.com
- */
-public interface JavaCallInfo {
-
- /**
- * Gets the method of this JavaCallInfo
- *
- * @return the method
- */
- public Method getMethod();
-
-// /**
-// * Sets the method of this JavaCallInfo
-// *
-// * @param method The method to set
-// */
-// public void setMethod(Method method);
-
- /**
- * Gets the parameters of this JavaCallInfo
- *
- * @return The parameters
- */
- public Object[] getParameters();
-
-// /**
-// * Sets the parameters of this JavaCallInfo
-// *
-// * @param parameters
-// * the parameters to set
-// */
-// public void setParameters(Object[] parameters);
-
- /**
- * Gets the returnValue of this JavaCallInfo
- *
- * @return the returnValue
- */
- public Object getReturnValue();
-
- /**
- * Sets the returnValue of this JavaCallInfo
- *
- * @param returnValue
- * the returnValue to set
- */
- public void setReturnValue(Object returnValue);
-
- /**
- * Gets the exception of this JavaCallInfo
- *
- * @return the exception
- */
- public Throwable getException();
-
- /**
- * Sets the exception of this JavaCallInfo
- *
- * @param exception
- * the exception to set
- */
- public void setException(Throwable exception);
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLGenerator.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLGenerator.java
deleted file mode 100644
index 5bda62b8..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLGenerator.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.webservices.internal.api.databinding;
-
-import java.io.File;
-
-/**
- * WSDLGenerator is used to generate the WSDL representation of the service
- * endpoint interface of the parent Databinding object.
- */
-public interface WSDLGenerator {
-
- /**
- * Sets the inlineSchema boolean. When the inlineSchema is true, the
- * generated schema documents are embedded within the type element of
- * the generated WSDL. When the inlineSchema is false, the generated
- * schema documents are generated as standalone schema documents and
- * imported into the generated WSDL.
- *
- * @param inline the inlineSchema boolean.
- * @return
- */
- WSDLGenerator inlineSchema(boolean inline);
-
- /**
- * Sets A property of the WSDLGenerator
- *
- * @param name The name of the property
- * @param value The value of the property
- *
- * @return this WSDLGenerator instance
- */
- WSDLGenerator property(String name, Object value);
-
- /**
- * Generates the WSDL using the wsdlResolver to output the generated
- * documents.
- *
- * @param wsdlResolver The WSDLResolver
- */
- void generate(com.oracle.webservices.internal.api.databinding.WSDLResolver wsdlResolver);
-
- /**
- * Generates the WSDL into the file directory
- *
- * @param outputDir The output file directory
- * @param name The file name of the main WSDL document
- */
- void generate(File outputDir, String name);
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLResolver.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLResolver.java
deleted file mode 100644
index fba41f73..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLResolver.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.webservices.internal.api.databinding;
-
-import javax.xml.transform.Result;
-import javax.xml.ws.Holder;
-
-/**
- * WSDLResolver is used by WSDLGenerator while generating WSDL and its associated
- * documents. It is used to control what documents need to be generated and what
- * documents need to be picked from metadata. If endpont's document metadata
- * already contains some documents, their systemids may be used for wsdl:import,
- * and schema:import. The suggested filenames are relative urls(for e.g: EchoSchema1.xsd)
- * The Result object systemids are also relative urls(for e.g: AbsWsdl.wsdl).
- *
- * @author Jitendra Kotamraju
- */
-public interface WSDLResolver {
- /**
- * Create a Result object into which concrete WSDL is to be generated.
- *
- * @return Result for the concrete WSDL
- */
- public Result getWSDL(String suggestedFilename);
-
- /**
- * Create a Result object into which abstract WSDL is to be generated. If the the
- * abstract WSDL is already in metadata, it is not generated.
- *
- * Update filename if the suggested filename need to be changed in wsdl:import.
- * This needs to be done if the metadata contains abstract WSDL, and that systemid
- * needs to be reflected in concrete WSDL's wsdl:import
- *
- * @return null if abstract WSDL need not be generated
- */
- public Result getAbstractWSDL(Holder<String> filename);
-
- /**
- * Create a Result object into which schema doc is to be generated. Typically if
- * there is a schema doc for namespace in metadata, then it is not generated.
- *
- * Update filename if the suggested filename need to be changed in xsd:import. This
- * needs to be done if the metadata contains the document, and that systemid
- * needs to be reflected in some other document's xsd:import
- *
- * @return null if schema need not be generated
- */
- public Result getSchemaOutput(String namespace, Holder<String> filename);
-
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BaseDistributedPropertySet.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BaseDistributedPropertySet.java
deleted file mode 100644
index e4ea2c19..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BaseDistributedPropertySet.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.oracle.webservices.internal.api.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.client.RequestContext;
-import com.sun.xml.internal.ws.client.ResponseContext;
-
-import javax.xml.ws.WebServiceContext;
-
-import java.util.AbstractMap;
-import java.util.Map.Entry;
-import java.util.HashSet;
-import java.util.IdentityHashMap;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * {@link PropertySet} that combines properties exposed from multiple
- * {@link PropertySet}s into one.
- *
- * <p>
- * This implementation allows one {@link PropertySet} to assemble
- * all properties exposed from other "satellite" {@link PropertySet}s.
- * (A satellite may itself be a {@link DistributedPropertySet}, so
- * in general this can form a tree.)
- *
- * <p>
- * This is useful for JAX-WS because the properties we expose to the application
- * are contributed by different pieces, and therefore we'd like each of them
- * to have a separate {@link PropertySet} implementation that backs up
- * the properties. For example, this allows FastInfoset to expose its
- * set of properties to {@link RequestContext} by using a strongly-typed fields.
- *
- * <p>
- * This is also useful for a client-side transport to expose a bunch of properties
- * into {@link ResponseContext}. It simply needs to create a {@link PropertySet}
- * object with methods for each property it wants to expose, and then add that
- * {@link PropertySet} to {@link Packet}. This allows property values to be
- * lazily computed (when actually asked by users), thus improving the performance
- * of the typical case where property values are not asked.
- *
- * <p>
- * A similar benefit applies on the server-side, for a transport to expose
- * a bunch of properties to {@link WebServiceContext}.
- *
- * <p>
- * To achieve these benefits, access to {@link DistributedPropertySet} is slower
- * compared to {@link PropertySet} (such as get/set), while adding a satellite
- * object is relatively fast.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class BaseDistributedPropertySet extends BasePropertySet implements DistributedPropertySet {
-
- /**
- * All {@link PropertySet}s that are bundled into this {@link PropertySet}.
- */
- private final Map<Class<? extends com.oracle.webservices.internal.api.message.PropertySet>, PropertySet> satellites
- = new IdentityHashMap<Class<? extends com.oracle.webservices.internal.api.message.PropertySet>, PropertySet>();
-
- private final Map<String, Object> viewthis;
-
- public BaseDistributedPropertySet() {
- this.viewthis = super.createView();
- }
-
- @Override
- public void addSatellite(@NotNull PropertySet satellite) {
- addSatellite(satellite.getClass(), satellite);
- }
-
- @Override
- public void addSatellite(@NotNull Class<? extends com.oracle.webservices.internal.api.message.PropertySet> keyClass, @NotNull PropertySet satellite) {
- satellites.put(keyClass, satellite);
- }
-
- @Override
- public void removeSatellite(PropertySet satellite) {
- satellites.remove(satellite.getClass());
- }
-
- public void copySatelliteInto(@NotNull DistributedPropertySet r) {
- for (Map.Entry<Class<? extends com.oracle.webservices.internal.api.message.PropertySet>, PropertySet> entry : satellites.entrySet()) {
- r.addSatellite(entry.getKey(), entry.getValue());
- }
- }
-
- @Override
- public void copySatelliteInto(MessageContext r) {
- copySatelliteInto((DistributedPropertySet)r);
- }
-
- @Override
- public @Nullable <T extends com.oracle.webservices.internal.api.message.PropertySet> T getSatellite(Class<T> satelliteClass) {
- T satellite = (T) satellites.get(satelliteClass);
- if (satellite != null) {
- return satellite;
- }
-
- for (PropertySet child : satellites.values()) {
- if (satelliteClass.isInstance(child)) {
- return satelliteClass.cast(child);
- }
-
- if (DistributedPropertySet.class.isInstance(child)) {
- satellite = DistributedPropertySet.class.cast(child).getSatellite(satelliteClass);
- if (satellite != null) {
- return satellite;
- }
- }
- }
- return null;
- }
-
- @Override
- public Map<Class<? extends com.oracle.webservices.internal.api.message.PropertySet>, com.oracle.webservices.internal.api.message.PropertySet> getSatellites() {
- return satellites;
- }
-
- @Override
- public Object get(Object key) {
- // check satellites
- for (PropertySet child : satellites.values()) {
- if (child.supports(key)) {
- return child.get(key);
- }
- }
-
- // otherwise it must be the master
- return super.get(key);
- }
-
- @Override
- public Object put(String key, Object value) {
- // check satellites
- for (PropertySet child : satellites.values()) {
- if(child.supports(key)) {
- return child.put(key,value);
- }
- }
-
- // otherwise it must be the master
- return super.put(key,value);
- }
-
- @Override
- public boolean containsKey(Object key) {
- if (viewthis.containsKey(key))
- return true;
- for (PropertySet child : satellites.values()) {
- if (child.containsKey(key)) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public boolean supports(Object key) {
- // check satellites
- for (PropertySet child : satellites.values()) {
- if (child.supports(key)) {
- return true;
- }
- }
-
- return super.supports(key);
- }
-
- @Override
- public Object remove(Object key) {
- // check satellites
- for (PropertySet child : satellites.values()) {
- if (child.supports(key)) {
- return child.remove(key);
- }
- }
-
- return super.remove(key);
- }
-
- @Override
- protected void createEntrySet(Set<Entry<String, Object>> core) {
- super.createEntrySet(core);
- for (PropertySet child : satellites.values()) {
- ((BasePropertySet) child).createEntrySet(core);
- }
- }
-
- protected Map<String, Object> asMapLocal() {
- return viewthis;
- }
-
- protected boolean supportsLocal(Object key) {
- return super.supports(key);
- }
-
- class DistributedMapView extends AbstractMap<String, Object> {
- @Override
- public Object get(Object key) {
- for (PropertySet child : satellites.values()) {
- if (child.supports(key)) {
- return child.get(key);
- }
- }
-
- return viewthis.get(key);
- }
-
- @Override
- public int size() {
- int size = viewthis.size();
- for (PropertySet child : satellites.values()) {
- size += child.asMap().size();
- }
- return size;
- }
-
- @Override
- public boolean containsKey(Object key) {
- if (viewthis.containsKey(key))
- return true;
- for (PropertySet child : satellites.values()) {
- if (child.containsKey(key))
- return true;
- }
- return false;
- }
-
- @Override
- public Set<Entry<String, Object>> entrySet() {
- Set<Entry<String, Object>> entries = new HashSet<Entry<String, Object>>();
- for (PropertySet child : satellites.values()) {
- for (Entry<String,Object> entry : child.asMap().entrySet()) {
- // the code below is here to avoid entries.addAll(child.asMap().entrySet()); which works differently on JDK6/7
- // see DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS
- entries.add(new SimpleImmutableEntry<String, Object>(entry.getKey(), entry.getValue()));
- }
- }
- for (Entry<String,Object> entry : viewthis.entrySet()) {
- // the code below is here to avoid entries.addAll(child.asMap().entrySet()); which works differently on JDK6/7
- // see DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS
- entries.add(new SimpleImmutableEntry<String, Object>(entry.getKey(), entry.getValue()));
- }
-
- return entries;
- }
-
- @Override
- public Object put(String key, Object value) {
- for (PropertySet child : satellites.values()) {
- if (child.supports(key)) {
- return child.put(key, value);
- }
- }
-
- return viewthis.put(key, value);
- }
-
- @Override
- public void clear() {
- satellites.clear();
- viewthis.clear();
- }
-
- @Override
- public Object remove(Object key) {
- for (PropertySet child : satellites.values()) {
- if (child.supports(key)) {
- return child.remove(key);
- }
- }
-
- return viewthis.remove(key);
- }
- }
-
- @Override
- protected Map<String, Object> createView() {
- return new DistributedMapView();
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BasePropertySet.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BasePropertySet.java
deleted file mode 100644
index 4c3ca54e..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BasePropertySet.java
+++ /dev/null
@@ -1,548 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.oracle.webservices.internal.api.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.AbstractMap;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-
-/**
- * A set of "properties" that can be accessed via strongly-typed fields
- * as well as reflexibly through the property name.
- *
- * @author Kohsuke Kawaguchi
- */
-@SuppressWarnings("SuspiciousMethodCalls")
-public abstract class BasePropertySet implements PropertySet {
-
- /**
- * Creates a new instance of TypedMap.
- */
- protected BasePropertySet() {
- }
-
- private Map<String,Object> mapView;
-
- /**
- * Represents the list of strongly-typed known properties
- * (keyed by property names.)
- *
- * <p>
- * Just giving it an alias to make the use of this class more fool-proof.
- */
- protected static class PropertyMap extends HashMap<String,Accessor> {
-
- // the entries are often being iterated through so performance can be improved
- // by their caching instead of iterating through the original (immutable) map each time
- transient PropertyMapEntry[] cachedEntries = null;
-
- PropertyMapEntry[] getPropertyMapEntries() {
- if (cachedEntries == null) {
- cachedEntries = createPropertyMapEntries();
- }
- return cachedEntries;
- }
-
- private PropertyMapEntry[] createPropertyMapEntries() {
- final PropertyMapEntry[] modelEntries = new PropertyMapEntry[size()];
- int i = 0;
- for (final Entry<String, Accessor> e : entrySet()) {
- modelEntries[i++] = new PropertyMapEntry(e.getKey(), e.getValue());
- }
- return modelEntries;
- }
-
- }
-
- /**
- * PropertyMapEntry represents a Map.Entry in the PropertyMap with more efficient access.
- */
- static public class PropertyMapEntry {
- public PropertyMapEntry(String k, Accessor v) {
- key = k; value = v;
- }
- String key;
- Accessor value;
- }
-
- /**
- * Map representing the Fields and Methods annotated with {@link PropertySet.Property}.
- * Model of {@link PropertySet} class.
- *
- * <p>
- * At the end of the derivation chain this method just needs to be implemented
- * as:
- *
- * <pre>
- * private static final PropertyMap model;
- * static {
- * model = parse(MyDerivedClass.class);
- * }
- * protected PropertyMap getPropertyMap() {
- * return model;
- * }
- * </pre>
- */
- protected abstract PropertyMap getPropertyMap();
-
- /**
- * This method parses a class for fields and methods with {@link PropertySet.Property}.
- */
- protected static PropertyMap parse(final Class clazz) {
- // make all relevant fields and methods accessible.
- // this allows runtime to skip the security check, so they runs faster.
- return AccessController.doPrivileged(new PrivilegedAction<PropertyMap>() {
- @Override
- public PropertyMap run() {
- PropertyMap props = new PropertyMap();
- for (Class c=clazz; c!=null; c=c.getSuperclass()) {
- for (Field f : c.getDeclaredFields()) {
- Property cp = f.getAnnotation(Property.class);
- if(cp!=null) {
- for(String value : cp.value()) {
- props.put(value, new FieldAccessor(f, value));
- }
- }
- }
- for (Method m : c.getDeclaredMethods()) {
- Property cp = m.getAnnotation(Property.class);
- if(cp!=null) {
- String name = m.getName();
- assert name.startsWith("get") || name.startsWith("is");
-
- String setName = name.startsWith("is") ? "set"+name.substring(2) : // isFoo -> setFoo
- 's' +name.substring(1); // getFoo -> setFoo
- Method setter;
- try {
- setter = clazz.getMethod(setName,m.getReturnType());
- } catch (NoSuchMethodException e) {
- setter = null; // no setter
- }
- for(String value : cp.value()) {
- props.put(value, new MethodAccessor(m, setter, value));
- }
- }
- }
- }
-
- return props;
- }
- });
- }
-
- /**
- * Represents a typed property defined on a {@link PropertySet}.
- */
- protected interface Accessor {
- String getName();
- boolean hasValue(PropertySet props);
- Object get(PropertySet props);
- void set(PropertySet props, Object value);
- }
-
- static final class FieldAccessor implements Accessor {
- /**
- * Field with the annotation.
- */
- private final Field f;
-
- /**
- * One of the values in {@link Property} annotation on {@link #f}.
- */
- private final String name;
-
- protected FieldAccessor(Field f, String name) {
- this.f = f;
- f.setAccessible(true);
- this.name = name;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public boolean hasValue(PropertySet props) {
- return get(props)!=null;
- }
-
- @Override
- public Object get(PropertySet props) {
- try {
- return f.get(props);
- } catch (IllegalAccessException e) {
- throw new AssertionError();
- }
- }
-
- @Override
- public void set(PropertySet props, Object value) {
- try {
- f.set(props,value);
- } catch (IllegalAccessException e) {
- throw new AssertionError();
- }
- }
- }
-
- static final class MethodAccessor implements Accessor {
- /**
- * Getter method.
- */
- private final @NotNull Method getter;
- /**
- * Setter method.
- * Some property is read-only.
- */
- private final @Nullable Method setter;
-
- /**
- * One of the values in {@link Property} annotation on {@link #getter}.
- */
- private final String name;
-
- protected MethodAccessor(Method getter, Method setter, String value) {
- this.getter = getter;
- this.setter = setter;
- this.name = value;
- getter.setAccessible(true);
- if (setter!=null) {
- setter.setAccessible(true);
- }
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public boolean hasValue(PropertySet props) {
- return get(props)!=null;
- }
-
- @Override
- public Object get(PropertySet props) {
- try {
- return getter.invoke(props);
- } catch (IllegalAccessException e) {
- throw new AssertionError();
- } catch (InvocationTargetException e) {
- handle(e);
- return 0; // never reach here
- }
- }
-
- @Override
- public void set(PropertySet props, Object value) {
- if(setter==null) {
- throw new ReadOnlyPropertyException(getName());
- }
- try {
- setter.invoke(props,value);
- } catch (IllegalAccessException e) {
- throw new AssertionError();
- } catch (InvocationTargetException e) {
- handle(e);
- }
- }
-
- /**
- * Since we don't expect the getter/setter to throw a checked exception,
- * it should be possible to make the exception propagation transparent.
- * That's what we are trying to do here.
- */
- private Exception handle(InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof Error) {
- throw (Error)t;
- }
- if (t instanceof RuntimeException) {
- throw (RuntimeException)t;
- }
- throw new Error(e);
- }
- }
-
-
- /**
- * Class allowing to work with PropertySet object as with a Map; it doesn't only allow to read properties from
- * the map but also to modify the map in a way it is in sync with original strongly typed fields. It also allows
- * (if necessary) to store additional properties those can't be found in strongly typed fields.
- *
- * @see com.sun.xml.internal.ws.api.PropertySet#asMap() method
- */
- final class MapView extends HashMap<String, Object> {
-
- // flag if it should allow store also different properties
- // than the from strongly typed fields
- boolean extensible;
-
- MapView(boolean extensible) {
- super(getPropertyMap().getPropertyMapEntries().length);
- this.extensible = extensible;
- initialize();
- }
-
- public void initialize() {
- // iterate (cached) array instead of map to speed things up ...
- PropertyMapEntry[] entries = getPropertyMap().getPropertyMapEntries();
- for (PropertyMapEntry entry : entries) {
- super.put(entry.key, entry.value);
- }
- }
-
- @Override
- public Object get(Object key) {
- Object o = super.get(key);
- if (o instanceof Accessor) {
- return ((Accessor) o).get(BasePropertySet.this);
- } else {
- return o;
- }
- }
-
- @Override
- public Set<Entry<String, Object>> entrySet() {
- Set<Entry<String, Object>> entries = new HashSet<Entry<String, Object>>();
- for (String key : keySet()) {
- entries.add(new SimpleImmutableEntry<String, Object>(key, get(key)));
- }
- return entries;
- }
-
- @Override
- public Object put(String key, Object value) {
-
- Object o = super.get(key);
- if (o != null && o instanceof Accessor) {
-
- Object oldValue = ((Accessor) o).get(BasePropertySet.this);
- ((Accessor) o).set(BasePropertySet.this, value);
- return oldValue;
-
- } else {
-
- if (extensible) {
- return super.put(key, value);
- } else {
- throw new IllegalStateException("Unknown property [" + key + "] for PropertySet [" +
- BasePropertySet.this.getClass().getName() + "]");
- }
- }
- }
-
- @Override
- public void clear() {
- for (String key : keySet()) {
- remove(key);
- }
- }
-
- @Override
- public Object remove(Object key) {
- Object o;
- o = super.get(key);
- if (o instanceof Accessor) {
- ((Accessor)o).set(BasePropertySet.this, null);
- }
- return super.remove(key);
- }
- }
-
- @Override
- public boolean containsKey(Object key) {
- Accessor sp = getPropertyMap().get(key);
- if (sp != null) {
- return sp.get(this) != null;
- }
- return false;
- }
-
- /**
- * Gets the name of the property.
- *
- * @param key
- * This field is typed as {@link Object} to follow the {@link Map#get(Object)}
- * convention, but if anything but {@link String} is passed, this method
- * just returns null.
- */
- @Override
- public Object get(Object key) {
- Accessor sp = getPropertyMap().get(key);
- if (sp != null) {
- return sp.get(this);
- }
- throw new IllegalArgumentException("Undefined property "+key);
- }
-
- /**
- * Sets a property.
- *
- * <h3>Implementation Note</h3>
- * This method is slow. Code inside JAX-WS should define strongly-typed
- * fields in this class and access them directly, instead of using this.
- *
- * @throws ReadOnlyPropertyException
- * if the given key is an alias of a strongly-typed field,
- * and if the name object given is not assignable to the field.
- *
- * @see Property
- */
- @Override
- public Object put(String key, Object value) {
- Accessor sp = getPropertyMap().get(key);
- if(sp!=null) {
- Object old = sp.get(this);
- sp.set(this,value);
- return old;
- } else {
- throw new IllegalArgumentException("Undefined property "+key);
- }
- }
-
- /**
- * Checks if this {@link PropertySet} supports a property of the given name.
- */
- @Override
- public boolean supports(Object key) {
- return getPropertyMap().containsKey(key);
- }
-
- @Override
- public Object remove(Object key) {
- Accessor sp = getPropertyMap().get(key);
- if(sp!=null) {
- Object old = sp.get(this);
- sp.set(this,null);
- return old;
- } else {
- throw new IllegalArgumentException("Undefined property "+key);
- }
- }
-
- /**
- * Creates a {@link Map} view of this {@link PropertySet}.
- *
- * <p>
- * This map is partially live, in the sense that values you set to it
- * will be reflected to {@link PropertySet}.
- *
- * <p>
- * However, this map may not pick up changes made
- * to {@link PropertySet} after the view is created.
- *
- * @deprecated use newer implementation {@link PropertySet#asMap()} which produces
- * readwrite {@link Map}
- *
- * @return
- * always non-null valid instance.
- */
- @Deprecated
- @Override
- public final Map<String,Object> createMapView() {
- final Set<Entry<String,Object>> core = new HashSet<Entry<String,Object>>();
- createEntrySet(core);
-
- return new AbstractMap<String, Object>() {
- @Override
- public Set<Entry<String,Object>> entrySet() {
- return core;
- }
- };
- }
-
- /**
- * Creates a modifiable {@link Map} view of this {@link PropertySet}.
- * <p/>
- * Changes done on this {@link Map} or on {@link PropertySet} object work in both directions - values made to
- * {@link Map} are reflected to {@link PropertySet} and changes done using getters/setters on {@link PropertySet}
- * object are automatically reflected in this {@link Map}.
- * <p/>
- * If necessary, it also can hold other values (not present on {@link PropertySet}) -
- * {@see PropertySet#mapAllowsAdditionalProperties}
- *
- * @return always non-null valid instance.
- */
- @Override
- public Map<String, Object> asMap() {
- if (mapView == null) {
- mapView = createView();
- }
- return mapView;
- }
-
- protected Map<String, Object> createView() {
- return new MapView(mapAllowsAdditionalProperties());
- }
-
- /**
- * Used when constructing the {@link MapView} for this object - it controls if the {@link MapView} servers only to
- * access strongly typed values or allows also different values
- *
- * @return true if {@link Map} should allow also properties not defined as strongly typed fields
- */
- protected boolean mapAllowsAdditionalProperties() {
- return false;
- }
-
- protected void createEntrySet(Set<Entry<String,Object>> core) {
- for (final Entry<String, Accessor> e : getPropertyMap().entrySet()) {
- core.add(new Entry<String, Object>() {
- @Override
- public String getKey() {
- return e.getKey();
- }
-
- @Override
- public Object getValue() {
- return e.getValue().get(BasePropertySet.this);
- }
-
- @Override
- public Object setValue(Object value) {
- Accessor acc = e.getValue();
- Object old = acc.get(BasePropertySet.this);
- acc.set(BasePropertySet.this,value);
- return old;
- }
- });
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ContentType.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ContentType.java
deleted file mode 100644
index afdb887f..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ContentType.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.webservices.internal.api.message;
-
-//TODO Do we want to remove this implementation dependency?
-import com.sun.xml.internal.ws.encoding.ContentTypeImpl;
-
-/**
- * A Content-Type transport header that will be returned by {@link MessageContext#write(java.io.OutputStream)}.
- * It will provide the Content-Type header and also take care of SOAP 1.1 SOAPAction header.
- *
- * @author Vivek Pandey
- */
-public interface ContentType {
-
- /**
- * Gives non-null Content-Type header value.
- */
- public String getContentType();
-
- /**
- * Gives SOAPAction transport header value. It will be non-null only for SOAP 1.1 messages. In other cases
- * it MUST be null. The SOAPAction transport header should be written out only when its non-null.
- *
- * @return It can be null, in that case SOAPAction header should be written.
- */
- public String getSOAPActionHeader();
-
- /**
- * Controls the Accept transport header, if the transport supports it.
- * Returning null means the transport need not add any new header.
- *
- * <p>
- * We realize that this is not an elegant abstraction, but
- * this would do for now. If another person comes and asks for
- * a similar functionality, we'll define a real abstraction.
- */
- public String getAcceptHeader();
-
- static public class Builder {
- private String contentType;
- private String soapAction;
- private String accept;
- private String charset;
-
- public Builder contentType(String s) {contentType = s; return this; }
- public Builder soapAction (String s) {soapAction = s; return this; }
- public Builder accept (String s) {accept = s; return this; }
- public Builder charset (String s) {charset = s; return this; }
- public ContentType build() {
- //TODO Do we want to remove this implementation dependency?
- return new ContentTypeImpl(contentType, soapAction, accept, charset);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/DistributedPropertySet.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/DistributedPropertySet.java
deleted file mode 100644
index 60566d92..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/DistributedPropertySet.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.webservices.internal.api.message;
-
-import java.util.Map;
-
-import com.sun.istack.internal.Nullable;
-
-/**
- * {@link PropertySet} that combines properties exposed from multiple
- * {@link PropertySet}s into one.
- *
- * <p>
- * This implementation allows one {@link PropertySet} to assemble
- * all properties exposed from other "satellite" {@link PropertySet}s.
- * (A satellite may itself be a {@link DistributedPropertySet}, so
- * in general this can form a tree.)
- *
- * <p>
- * This is useful for JAX-WS because the properties we expose to the application
- * are contributed by different pieces, and therefore we'd like each of them
- * to have a separate {@link PropertySet} implementation that backs up
- * the properties. For example, this allows FastInfoset to expose its
- * set of properties to {@link RequestContext} by using a strongly-typed fields.
- *
- * <p>
- * This is also useful for a client-side transport to expose a bunch of properties
- * into {@link ResponseContext}. It simply needs to create a {@link PropertySet}
- * object with methods for each property it wants to expose, and then add that
- * {@link PropertySet} to {@link Packet}. This allows property values to be
- * lazily computed (when actually asked by users), thus improving the performance
- * of the typical case where property values are not asked.
- *
- * <p>
- * A similar benefit applies on the server-side, for a transport to expose
- * a bunch of properties to {@link WebServiceContext}.
- *
- * <p>
- * To achieve these benefits, access to {@link DistributedPropertySet} is slower
- * compared to {@link PropertySet} (such as get/set), while adding a satellite
- * object is relatively fast.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface DistributedPropertySet extends com.oracle.webservices.internal.api.message.PropertySet {
-
- public @Nullable <T extends com.oracle.webservices.internal.api.message.PropertySet> T getSatellite(Class<T> satelliteClass);
-
- public Map<Class<? extends com.oracle.webservices.internal.api.message.PropertySet>, com.oracle.webservices.internal.api.message.PropertySet> getSatellites();
-
- public void addSatellite(com.oracle.webservices.internal.api.message.PropertySet satellite);
-
- public void addSatellite(Class<? extends com.oracle.webservices.internal.api.message.PropertySet> keyClass, com.oracle.webservices.internal.api.message.PropertySet satellite);
-
- public void removeSatellite(com.oracle.webservices.internal.api.message.PropertySet satellite);
-
- public void copySatelliteInto(com.oracle.webservices.internal.api.message.MessageContext r);
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContext.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContext.java
deleted file mode 100644
index f918f387..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContext.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.webservices.internal.api.message;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.ByteBuffer;
-import java.nio.channels.WritableByteChannel;
-
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-
-/**
- * MessageContext represents a container of a SOAP message and all the properties
- * including the transport headers.
- *
- * MessageContext is a composite {@link PropertySet} that combines properties exposed from multiple
- * {@link PropertySet}s into one.
- *
- * <p>
- * This implementation allows one {@link PropertySet} to assemble
- * all properties exposed from other "satellite" {@link PropertySet}s.
- * (A satellite may itself be a {@link DistributedPropertySet}, so
- * in general this can form a tree.)
- *
- * @author shih-chang.chen@oracle.com
- */
-public interface MessageContext extends DistributedPropertySet {
- /**
- * Gets the SAAJ SOAPMessage representation of the SOAP message.
- *
- * @return The SOAPMessage
- */
- SOAPMessage getAsSOAPMessage() throws SOAPException;
-
- /**
- * Gets the SAAJ SOAPMessage representation of the SOAP message.
- * @deprecated use getAsSOAPMessage
- * @return The SOAPMessage
- */
- SOAPMessage getSOAPMessage() throws SOAPException;
-
- /**
- * Writes the XML infoset portion of this MessageContext
- * (from &lt;soap:Envelope> to &lt;/soap:Envelope>).
- *
- * @param out
- * Must not be null. The caller is responsible for closing the stream,
- * not the callee.
- *
- * @return
- * The MIME content type of the encoded message (such as "application/xml").
- * This information is often ncessary by transport.
- *
- * @throws IOException
- * if a {@link OutputStream} throws {@link IOException}.
- */
- ContentType writeTo( OutputStream out ) throws IOException;
-
- /**
- * The version of {@link #writeTo(OutputStream)}
- * that writes to NIO {@link ByteBuffer}.
- *
- * <p>
- * TODO: for the convenience of implementation, write
- * an adapter that wraps {@link WritableByteChannel} to {@link OutputStream}.
- */
-// ContentType writeTo( WritableByteChannel buffer );
-
- /**
- * Gets the Content-type of this message. For an out-bound message that this getContentType()
- * method returns a null, the Content-Type can be determined only by calling the writeTo
- * method to write the MessageContext to an OutputStream.
- *
- * @return The MIME content type of this message
- */
- ContentType getContentType();
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContextFactory.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContextFactory.java
deleted file mode 100644
index c2fbad56..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContextFactory.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.oracle.webservices.internal.api.message;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import com.oracle.webservices.internal.api.EnvelopeStyle;
-import com.sun.xml.internal.ws.api.SOAPVersion; // TODO leaking RI APIs
-import com.sun.xml.internal.ws.util.ServiceFinder;
-
-import javax.xml.soap.MimeHeaders;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.Source;
-import javax.xml.ws.WebServiceFeature;
-
-public abstract class MessageContextFactory
-{
- private static final MessageContextFactory DEFAULT = new com.sun.xml.internal.ws.api.message.MessageContextFactory(new WebServiceFeature[0]);
-
- protected abstract MessageContextFactory newFactory(WebServiceFeature ... f);
-
- public abstract MessageContext createContext();
-
- public abstract MessageContext createContext(SOAPMessage m);
-
- public abstract MessageContext createContext(Source m);
-
- public abstract MessageContext createContext(Source m, EnvelopeStyle.Style envelopeStyle);
-
- public abstract MessageContext createContext(InputStream in, String contentType) throws IOException;
-
- /**
- * @deprecated http://java.net/jira/browse/JAX_WS-1077
- */
- @Deprecated
- public abstract MessageContext createContext(InputStream in, MimeHeaders headers) throws IOException;
-
- static public MessageContextFactory createFactory(WebServiceFeature ... f) {
- return createFactory(null, f);
- }
-
- static public MessageContextFactory createFactory(ClassLoader cl, WebServiceFeature ...f) {
- for (MessageContextFactory factory : ServiceFinder.find(MessageContextFactory.class, cl)) {
- MessageContextFactory newfac = factory.newFactory(f);
- if (newfac != null) return newfac;
- }
- return new com.sun.xml.internal.ws.api.message.MessageContextFactory(f);
- }
-
- @Deprecated
- public abstract MessageContext doCreate();
-
- @Deprecated
- public abstract MessageContext doCreate(SOAPMessage m);
-
- //public abstract MessageContext doCreate(InputStream x);
-
- @Deprecated
- public abstract MessageContext doCreate(Source x, SOAPVersion soapVersion);
-
- @Deprecated
- public static MessageContext create(final ClassLoader... classLoader) {
- return serviceFinder(classLoader,
- new Creator() {
- public MessageContext create(final MessageContextFactory f) {
- return f.doCreate();
- }
- });
- }
-
- @Deprecated
- public static MessageContext create(final SOAPMessage m, final ClassLoader... classLoader) {
- return serviceFinder(classLoader,
- new Creator() {
- public MessageContext create(final MessageContextFactory f) {
- return f.doCreate(m);
- }
- });
- }
-
- @Deprecated
- public static MessageContext create(final Source m, final SOAPVersion v, final ClassLoader... classLoader) {
- return serviceFinder(classLoader,
- new Creator() {
- public MessageContext create(final MessageContextFactory f) {
- return f.doCreate(m, v);
- }
- });
- }
-
- @Deprecated
- private static MessageContext serviceFinder(final ClassLoader[] classLoader, final Creator creator) {
- final ClassLoader cl = classLoader.length == 0 ? null : classLoader[0];
- for (MessageContextFactory factory : ServiceFinder.find(MessageContextFactory.class, cl)) {
- final MessageContext messageContext = creator.create(factory);
- if (messageContext != null)
- return messageContext;
- }
- return creator.create(DEFAULT);
- }
-
- @Deprecated
- private static interface Creator {
- public MessageContext create(MessageContextFactory f);
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/PropertySet.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/PropertySet.java
deleted file mode 100644
index 64c14bfa..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/PropertySet.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.webservices.internal.api.message;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.util.Map;
-
-import javax.xml.ws.handler.MessageContext;
-
-/**
- * A set of "properties" that can be accessed via strongly-typed fields
- * as well as reflexibly through the property name.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface PropertySet {
-
- /**
- * Marks a field on {@link PropertySet} as a
- * property of {@link MessageContext}.
- *
- * <p>
- * To make the runtime processing easy, this annotation
- * must be on a public field (since the property name
- * can be set through {@link Map} anyway, you won't be
- * losing abstraction by doing so.)
- *
- * <p>
- * For similar reason, this annotation can be only placed
- * on a reference type, not primitive type.
- *
- * @author Kohsuke Kawaguchi
- */
- @Inherited
- @Retention(RetentionPolicy.RUNTIME)
- @Target({ElementType.FIELD,ElementType.METHOD})
- public @interface Property {
- /**
- * Name of the property.
- */
- String[] value();
- }
-
- public boolean containsKey(Object key);
-
- /**
- * Gets the name of the property.
- *
- * @param key
- * This field is typed as {@link Object} to follow the {@link Map#get(Object)}
- * convention, but if anything but {@link String} is passed, this method
- * just returns null.
- */
- public Object get(Object key);
-
- /**
- * Sets a property.
- *
- * <h3>Implementation Note</h3>
- * This method is slow. Code inside JAX-WS should define strongly-typed
- * fields in this class and access them directly, instead of using this.
- *
- * @see Property
- */
- public Object put(String key, Object value);
-
- /**
- * Checks if this {@link PropertySet} supports a property of the given name.
- */
- public boolean supports(Object key);
-
- public Object remove(Object key);
-
- /**
- * Creates a {@link Map} view of this {@link PropertySet}.
- *
- * <p>
- * This map is partially live, in the sense that values you set to it
- * will be reflected to {@link PropertySet}.
- *
- * <p>
- * However, this map may not pick up changes made
- * to {@link PropertySet} after the view is created.
- *
- * @deprecated use newer implementation {@link com.sun.xml.internal.ws.api.PropertySet#asMap()} which produces
- * readwrite {@link Map}
- *
- * @return
- * always non-null valid instance.
- */
- @Deprecated
- public Map<String,Object> createMapView();
-
- /**
- * Creates a modifiable {@link Map} view of this {@link PropertySet}.
- * <p/>
- * Changes done on this {@link Map} or on {@link PropertySet} object work in both directions - values made to
- * {@link Map} are reflected to {@link PropertySet} and changes done using getters/setters on {@link PropertySet}
- * object are automatically reflected in this {@link Map}.
- * <p/>
- * If necessary, it also can hold other values (not present on {@link PropertySet}) -
- * {@see PropertySet#mapAllowsAdditionalProperties}
- *
- * @return always non-null valid instance.
- */
- public Map<String, Object> asMap();
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ReadOnlyPropertyException.java b/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ReadOnlyPropertyException.java
deleted file mode 100644
index 5cf99e2f..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ReadOnlyPropertyException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.webservices.internal.api.message;
-
-/**
- * Used to indicate that {@link PropertySet#put(String, Object)} failed
- * because a property is read-only.
- *
- * @author Kohsuke Kawaguchi
- */
-public class ReadOnlyPropertyException extends IllegalArgumentException {
- private final String propertyName;
-
- public ReadOnlyPropertyException(String propertyName) {
- super(propertyName+" is a read-only property.");
- this.propertyName = propertyName;
- }
-
- /**
- * Gets the name of the property that was read-only.
- */
- public String getPropertyName() {
- return propertyName;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/impl/encoding/StreamDecoderImpl.java b/src/share/jaxws_classes/com/oracle/webservices/internal/impl/encoding/StreamDecoderImpl.java
deleted file mode 100644
index 0ab6a2ea..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/impl/encoding/StreamDecoderImpl.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.oracle.webservices.internal.impl.encoding;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.stream.XMLStreamReader;
-
-import com.oracle.webservices.internal.impl.internalspi.encoding.StreamDecoder;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.encoding.StreamSOAPCodec;
-import com.sun.xml.internal.ws.streaming.TidyXMLStreamReader;
-
-public class StreamDecoderImpl implements StreamDecoder {
-
- @Override
- public Message decode(InputStream in, String charset,
- AttachmentSet att, SOAPVersion soapVersion) throws IOException {
- XMLStreamReader reader = XMLStreamReaderFactory.create(null, in, charset, true);
- reader = new TidyXMLStreamReader(reader, in);
- return StreamSOAPCodec.decode(soapVersion, reader, att);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/oracle/webservices/internal/impl/internalspi/encoding/StreamDecoder.java b/src/share/jaxws_classes/com/oracle/webservices/internal/impl/internalspi/encoding/StreamDecoder.java
deleted file mode 100644
index a04ba43d..00000000
--- a/src/share/jaxws_classes/com/oracle/webservices/internal/impl/internalspi/encoding/StreamDecoder.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.oracle.webservices.internal.impl.internalspi.encoding;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Message;
-
-/**
- * Decodes SOAPEnvelope read from an <code>InputStream</code> into a <code>Message</code> instance.
- * This SPI allows for other implementations instead of the default, which is based on XMLStreamReader.
- *
- * @since 2.2.9
- */
-public interface StreamDecoder {
- Message decode(
- InputStream in, String charset,
- AttachmentSet att, SOAPVersion soapVersion) throws IOException;
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ExistingAnnotationsType.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ExistingAnnotationsType.java
deleted file mode 100644
index 58cb4715..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ExistingAnnotationsType.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for existing-annotations-type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p>
- * <pre>
- * &lt;simpleType name="existing-annotations-type">
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
- * &lt;enumeration value="merge"/>
- * &lt;enumeration value="ignore"/>
- * &lt;/restriction>
- * &lt;/simpleType>
- * </pre>
- *
- */
-@XmlType(name = "existing-annotations-type")
-@XmlEnum
-public enum ExistingAnnotationsType {
-
- @XmlEnumValue("merge")
- MERGE("merge"),
- @XmlEnumValue("ignore")
- IGNORE("ignore");
- private final String value;
-
- ExistingAnnotationsType(String v) {
- value = v;
- }
-
- public String value() {
- return value;
- }
-
- public static ExistingAnnotationsType fromValue(String v) {
- for (ExistingAnnotationsType c: ExistingAnnotationsType.values()) {
- if (c.value.equals(v)) {
- return c;
- }
- }
- throw new IllegalArgumentException(v);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaMethod.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaMethod.java
deleted file mode 100644
index e2a1bdee..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaMethod.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import org.w3c.dom.Element;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlElementRefs;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;group ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}method-annotation" maxOccurs="unbounded" minOccurs="0"/>
- * &lt;element name="java-params" minOccurs="0">
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}java-param" maxOccurs="unbounded"/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * &lt;/element>
- * &lt;/sequence>
- * &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;anyAttribute processContents='skip' namespace='##other'/>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
- "methodAnnotation",
- "javaParams"
-})
-@XmlRootElement(name = "java-method")
-public class JavaMethod {
-
- @XmlElementRefs({
- @XmlElementRef(name = "web-endpoint", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlWebEndpoint.class, required = false),
- @XmlElementRef(name = "oneway", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlOneway.class, required = false),
- @XmlElementRef(name = "action", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlAction.class, required = false),
- @XmlElementRef(name = "soap-binding", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlSOAPBinding.class, required = false),
- @XmlElementRef(name = "web-result", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlWebResult.class, required = false),
- @XmlElementRef(name = "web-method", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlWebMethod.class, required = false)
- })
- @XmlAnyElement
- protected List<Object> methodAnnotation;
- @XmlElement(name = "java-params")
- protected JavaMethod.JavaParams javaParams;
- @XmlAttribute(name = "name", required = true)
- protected String name;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the methodAnnotation property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the methodAnnotation property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getMethodAnnotation().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link XmlWebEndpoint }
- * {@link XmlOneway }
- * {@link XmlAction }
- * {@link XmlSOAPBinding }
- * {@link XmlWebResult }
- * {@link XmlWebMethod }
- * {@link Element }
- *
- *
- */
- public List<Object> getMethodAnnotation() {
- if (methodAnnotation == null) {
- methodAnnotation = new ArrayList<Object>();
- }
- return this.methodAnnotation;
- }
-
- /**
- * Gets the value of the javaParams property.
- *
- * @return
- * possible object is
- * {@link JavaMethod.JavaParams }
- *
- */
- public JavaMethod.JavaParams getJavaParams() {
- return javaParams;
- }
-
- /**
- * Sets the value of the javaParams property.
- *
- * @param value
- * allowed object is
- * {@link JavaMethod.JavaParams }
- *
- */
- public void setJavaParams(JavaMethod.JavaParams value) {
- this.javaParams = value;
- }
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-
- /**
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}java-param" maxOccurs="unbounded"/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
- @XmlAccessorType(XmlAccessType.FIELD)
- @XmlType(name = "", propOrder = {
- "javaParam"
- })
- public static class JavaParams {
-
- @XmlElement(name = "java-param", required = true)
- protected List<JavaParam> javaParam;
-
- /**
- * Gets the value of the javaParam property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the javaParam property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getJavaParam().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link JavaParam }
- *
- *
- */
- public List<JavaParam> getJavaParam() {
- if (javaParam == null) {
- javaParam = new ArrayList<JavaParam>();
- }
- return this.javaParam;
- }
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaParam.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaParam.java
deleted file mode 100644
index f1e49e30..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaParam.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import org.w3c.dom.Element;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;group ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}param-annotation" maxOccurs="unbounded" minOccurs="0"/>
- * &lt;/sequence>
- * &lt;attribute name="java-type" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;anyAttribute processContents='skip' namespace='##other'/>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
- "paramAnnotation"
-})
-@XmlRootElement(name = "java-param")
-public class JavaParam {
-
- @XmlElementRef(name = "web-param", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlWebParam.class, required = false)
- @XmlAnyElement
- protected List<Object> paramAnnotation;
- @XmlAttribute(name = "java-type")
- protected String javaType;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the paramAnnotation property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the paramAnnotation property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getParamAnnotation().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link XmlWebParam }
- * {@link Element }
- *
- *
- */
- public List<Object> getParamAnnotation() {
- if (paramAnnotation == null) {
- paramAnnotation = new ArrayList<Object>();
- }
- return this.paramAnnotation;
- }
-
- /**
- * Gets the value of the javaType property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getJavaType() {
- return javaType;
- }
-
- /**
- * Sets the value of the javaType property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setJavaType(String value) {
- this.javaType = value;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaWsdlMappingType.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaWsdlMappingType.java
deleted file mode 100644
index b5f28909..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaWsdlMappingType.java
+++ /dev/null
@@ -1,452 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import org.w3c.dom.Element;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlElementRefs;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for java-wsdl-mapping-type complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType name="java-wsdl-mapping-type">
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element name="xml-schema-mapping" minOccurs="0">
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;any maxOccurs="unbounded" minOccurs="0"/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * &lt;/element>
- * &lt;group ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}class-annotation" maxOccurs="unbounded" minOccurs="0"/>
- * &lt;element name="java-methods" minOccurs="0">
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}java-method" maxOccurs="unbounded" minOccurs="0"/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * &lt;/element>
- * &lt;/sequence>
- * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;attribute name="java-type-name" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;attribute name="existing-annotations" type="{http://xmlns.oracle.com/webservices/jaxws-databinding}existing-annotations-type" />
- * &lt;attribute name="databinding" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;anyAttribute processContents='skip' namespace='##other'/>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "java-wsdl-mapping-type", propOrder = {
- "xmlSchemaMapping",
- "classAnnotation",
- "javaMethods"
-})
-public class JavaWsdlMappingType {
-
- @XmlElement(name = "xml-schema-mapping")
- protected JavaWsdlMappingType.XmlSchemaMapping xmlSchemaMapping;
- @XmlElementRefs({
- @XmlElementRef(name = "web-service-client", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlWebServiceClient.class, required = false),
- @XmlElementRef(name = "binding-type", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlBindingType.class, required = false),
- @XmlElementRef(name = "web-service", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlWebService.class, required = false),
- @XmlElementRef(name = "web-fault", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlWebFault.class, required = false),
- @XmlElementRef(name = "service-mode", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlServiceMode.class, required = false),
- @XmlElementRef(name = "mtom", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlMTOM.class, required = false),
- @XmlElementRef(name = "handler-chain", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlHandlerChain.class, required = false),
- @XmlElementRef(name = "soap-binding", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlSOAPBinding.class, required = false)
- })
- @XmlAnyElement
- protected List<Object> classAnnotation;
- @XmlElement(name = "java-methods")
- protected JavaWsdlMappingType.JavaMethods javaMethods;
- @XmlAttribute(name = "name")
- protected String name;
- @XmlAttribute(name = "java-type-name")
- protected String javaTypeName;
- @XmlAttribute(name = "existing-annotations")
- protected ExistingAnnotationsType existingAnnotations;
- @XmlAttribute(name = "databinding")
- protected String databinding;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the xmlSchemaMapping property.
- *
- * @return
- * possible object is
- * {@link JavaWsdlMappingType.XmlSchemaMapping }
- *
- */
- public JavaWsdlMappingType.XmlSchemaMapping getXmlSchemaMapping() {
- return xmlSchemaMapping;
- }
-
- /**
- * Sets the value of the xmlSchemaMapping property.
- *
- * @param value
- * allowed object is
- * {@link JavaWsdlMappingType.XmlSchemaMapping }
- *
- */
- public void setXmlSchemaMapping(JavaWsdlMappingType.XmlSchemaMapping value) {
- this.xmlSchemaMapping = value;
- }
-
- /**
- *
- * The class-annotation group defines the set of
- * annotations applicable to the Java class
- * declaration.
- * Gets the value of the classAnnotation property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the classAnnotation property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getClassAnnotation().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link XmlWebServiceClient }
- * {@link XmlBindingType }
- * {@link XmlWebService }
- * {@link XmlWebFault }
- * {@link XmlServiceMode }
- * {@link XmlMTOM }
- * {@link XmlHandlerChain }
- * {@link Element }
- * {@link XmlSOAPBinding }
- *
- *
- */
- public List<Object> getClassAnnotation() {
- if (classAnnotation == null) {
- classAnnotation = new ArrayList<Object>();
- }
- return this.classAnnotation;
- }
-
- /**
- * Gets the value of the javaMethods property.
- *
- * @return
- * possible object is
- * {@link JavaWsdlMappingType.JavaMethods }
- *
- */
- public JavaWsdlMappingType.JavaMethods getJavaMethods() {
- return javaMethods;
- }
-
- /**
- * Sets the value of the javaMethods property.
- *
- * @param value
- * allowed object is
- * {@link JavaWsdlMappingType.JavaMethods }
- *
- */
- public void setJavaMethods(JavaWsdlMappingType.JavaMethods value) {
- this.javaMethods = value;
- }
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
- /**
- * Gets the value of the javaTypeName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getJavaTypeName() {
- return javaTypeName;
- }
-
- /**
- * Sets the value of the javaTypeName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setJavaTypeName(String value) {
- this.javaTypeName = value;
- }
-
- /**
- * Gets the value of the classAnnotations property.
- *
- * @return
- * possible object is
- * {@link ExistingAnnotationsType }
- *
- */
- public ExistingAnnotationsType getExistingAnnotations() {
- return existingAnnotations;
- }
-
- /**
- * Sets the value of the classAnnotations property.
- *
- * @param value
- * allowed object is
- * {@link ExistingAnnotationsType }
- *
- */
- public void setExistingAnnotations(ExistingAnnotationsType value) {
- this.existingAnnotations = value;
- }
-
- /**
- * Gets the value of the databinding property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getDatabinding() {
- return databinding;
- }
-
- /**
- * Sets the value of the databinding property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setDatabinding(String value) {
- this.databinding = value;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-
- /**
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}java-method" maxOccurs="unbounded" minOccurs="0"/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
- @XmlAccessorType(XmlAccessType.FIELD)
- @XmlType(name = "", propOrder = {
- "javaMethod"
- })
- public static class JavaMethods {
-
- @XmlElement(name = "java-method")
- protected List<JavaMethod> javaMethod;
-
- /**
- * Gets the value of the javaMethod property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the javaMethod property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getJavaMethod().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link JavaMethod }
- *
- *
- */
- public List<JavaMethod> getJavaMethod() {
- if (javaMethod == null) {
- javaMethod = new ArrayList<JavaMethod>();
- }
- return this.javaMethod;
- }
-
- }
-
-
- /**
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;any maxOccurs="unbounded" minOccurs="0"/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
- @XmlAccessorType(XmlAccessType.FIELD)
- @XmlType(name = "", propOrder = {
- "any"
- })
- public static class XmlSchemaMapping {
-
- @XmlAnyElement(lax = true)
- protected List<Object> any;
-
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Object }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ObjectFactory.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ObjectFactory.java
deleted file mode 100644
index 24f59bc8..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ObjectFactory.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElementDecl;
-import javax.xml.bind.annotation.XmlRegistry;
-import javax.xml.namespace.QName;
-
-
-/**
- * This object contains factory methods for each
- * Java content interface and Java element interface
- * generated in the com.sun.xml.internal.ws.ext2.java_wsdl package.
- * <p>An ObjectFactory allows you to programatically
- * construct new instances of the Java representation
- * for XML content. The Java representation of XML
- * content can consist of schema derived interfaces
- * and classes representing the binding of schema
- * type definitions, element declarations and model
- * groups. Factory methods for each of these are
- * provided in this class.
- *
- */
-@XmlRegistry
-public class ObjectFactory {
-
- private final static QName _JavaWsdlMapping_QNAME = new QName("http://xmlns.oracle.com/webservices/jaxws-databinding", "java-wsdl-mapping");
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.sun.xml.internal.ws.ext2.java_wsdl
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link JavaMethod }
- *
- */
- public JavaMethod createJavaMethod() {
- return new JavaMethod();
- }
-
- /**
- * Create an instance of {@link JavaWsdlMappingType }
- *
- */
- public JavaWsdlMappingType createJavaWsdlMappingType() {
- return new JavaWsdlMappingType();
- }
-
- /**
- * Create an instance of {@link XmlWebEndpoint }
- *
- */
- public XmlWebEndpoint createWebEndpoint() {
- return new XmlWebEndpoint();
- }
-
- /**
- * Create an instance of {@link XmlMTOM }
- *
- */
- public XmlMTOM createMtom() {
- return new XmlMTOM();
- }
-
- /**
- * Create an instance of {@link XmlWebServiceClient }
- *
- */
- public XmlWebServiceClient createWebServiceClient() {
- return new XmlWebServiceClient();
- }
-
- /**
- * Create an instance of {@link XmlServiceMode }
- *
- */
- public XmlServiceMode createServiceMode() {
- return new XmlServiceMode();
- }
-
- /**
- * Create an instance of {@link XmlBindingType }
- *
- */
- public XmlBindingType createBindingType() {
- return new XmlBindingType();
- }
-
- /**
- * Create an instance of {@link XmlWebServiceRef }
- *
- */
- public XmlWebServiceRef createWebServiceRef() {
- return new XmlWebServiceRef();
- }
-
- /**
- * Create an instance of {@link JavaParam }
- *
- */
- public JavaParam createJavaParam() {
- return new JavaParam();
- }
-
- /**
- * Create an instance of {@link XmlWebParam }
- *
- */
- public XmlWebParam createWebParam() {
- return new XmlWebParam();
- }
-
- /**
- * Create an instance of {@link XmlWebMethod }
- *
- */
- public XmlWebMethod createWebMethod() {
- return new XmlWebMethod();
- }
-
- /**
- * Create an instance of {@link XmlWebResult }
- *
- */
- public XmlWebResult createWebResult() {
- return new XmlWebResult();
- }
-
- /**
- * Create an instance of {@link XmlOneway }
- *
- */
- public XmlOneway createOneway() {
- return new XmlOneway();
- }
-
- /**
- * Create an instance of {@link XmlSOAPBinding }
- *
- */
- public XmlSOAPBinding createSoapBinding() {
- return new XmlSOAPBinding();
- }
-
- /**
- * Create an instance of {@link XmlAction }
- *
- */
- public XmlAction createAction() {
- return new XmlAction();
- }
-
- /**
- * Create an instance of {@link XmlFaultAction }
- *
- */
- public XmlFaultAction createFaultAction() {
- return new XmlFaultAction();
- }
-
- /**
- * Create an instance of {@link JavaMethod.JavaParams }
- *
- */
- public JavaMethod.JavaParams createJavaMethodJavaParams() {
- return new JavaMethod.JavaParams();
- }
-
- /**
- * Create an instance of {@link XmlHandlerChain }
- *
- */
- public XmlHandlerChain createHandlerChain() {
- return new XmlHandlerChain();
- }
-
- /**
- * Create an instance of {@link XmlWebServiceProvider }
- *
- */
- public XmlWebServiceProvider createWebServiceProvider() {
- return new XmlWebServiceProvider();
- }
-
- /**
- * Create an instance of {@link XmlWebFault }
- *
- */
- public XmlWebFault createWebFault() {
- return new XmlWebFault();
- }
-
- /**
- * Create an instance of {@link XmlResponseWrapper }
- *
- */
- public XmlResponseWrapper createResponseWrapper() {
- return new XmlResponseWrapper();
- }
-
- /**
- * Create an instance of {@link XmlWebService }
- *
- */
- public XmlWebService createWebService() {
- return new XmlWebService();
- }
-
- /**
- * Create an instance of {@link XmlRequestWrapper }
- *
- */
- public XmlRequestWrapper createRequestWrapper() {
- return new XmlRequestWrapper();
- }
-
- /**
- * Create an instance of {@link JavaWsdlMappingType.XmlSchemaMapping }
- *
- */
- public JavaWsdlMappingType.XmlSchemaMapping createJavaWsdlMappingTypeXmlSchemaMapping() {
- return new JavaWsdlMappingType.XmlSchemaMapping();
- }
-
- /**
- * Create an instance of {@link JavaWsdlMappingType.JavaMethods }
- *
- */
- public JavaWsdlMappingType.JavaMethods createJavaWsdlMappingTypeJavaMethods() {
- return new JavaWsdlMappingType.JavaMethods();
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link JavaWsdlMappingType }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", name = "java-wsdl-mapping")
- public JAXBElement<JavaWsdlMappingType> createJavaWsdlMapping(JavaWsdlMappingType value) {
- return new JAXBElement<JavaWsdlMappingType>(_JavaWsdlMapping_QNAME, JavaWsdlMappingType.class, null, value);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingParameterStyle.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingParameterStyle.java
deleted file mode 100644
index f68e0cac..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingParameterStyle.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for soap-binding-parameter-style.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p>
- * <pre>
- * &lt;simpleType name="soap-binding-parameter-style">
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
- * &lt;enumeration value="BARE"/>
- * &lt;enumeration value="WRAPPED"/>
- * &lt;/restriction>
- * &lt;/simpleType>
- * </pre>
- *
- */
-@XmlType(name = "soap-binding-parameter-style")
-@XmlEnum
-public enum SoapBindingParameterStyle {
-
- BARE,
- WRAPPED;
-
- public String value() {
- return name();
- }
-
- public static SoapBindingParameterStyle fromValue(String v) {
- return valueOf(v);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingStyle.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingStyle.java
deleted file mode 100644
index ff0f711c..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingStyle.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for soap-binding-style.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p>
- * <pre>
- * &lt;simpleType name="soap-binding-style">
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
- * &lt;enumeration value="DOCUMENT"/>
- * &lt;enumeration value="RPC"/>
- * &lt;/restriction>
- * &lt;/simpleType>
- * </pre>
- *
- */
-@XmlType(name = "soap-binding-style")
-@XmlEnum
-public enum SoapBindingStyle {
-
- DOCUMENT,
- RPC;
-
- public String value() {
- return name();
- }
-
- public static SoapBindingStyle fromValue(String v) {
- return valueOf(v);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingUse.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingUse.java
deleted file mode 100644
index a4957b56..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingUse.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for soap-binding-use.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p>
- * <pre>
- * &lt;simpleType name="soap-binding-use">
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
- * &lt;enumeration value="LITERAL"/>
- * &lt;enumeration value="ENCODED"/>
- * &lt;/restriction>
- * &lt;/simpleType>
- * </pre>
- *
- */
-@XmlType(name = "soap-binding-use")
-@XmlEnum
-public enum SoapBindingUse {
-
- LITERAL,
- ENCODED;
-
- public String value() {
- return name();
- }
-
- public static SoapBindingUse fromValue(String v) {
- return valueOf(v);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/Util.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/Util.java
deleted file mode 100644
index e7028f05..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/Util.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-
-import com.sun.xml.internal.ws.model.RuntimeModelerException;
-
-/**
- * Simple util to handle default values.
- *
- * @author miroslav.kos@oracle.com
- */
-class Util {
-
- static String nullSafe(String value) {
- return value == null ? "" : value;
- }
-
- static <T> T nullSafe(T value, T defaultValue) {
- return value == null ? defaultValue : value;
- }
-
- @SuppressWarnings("unchecked")
- static <T extends Enum> T nullSafe(Enum value, T defaultValue) {
- return value == null ? defaultValue : (T) T.valueOf(defaultValue.getClass(), value.toString());
- }
-
- public static Class<?> findClass(String className) {
- try {
- return Class.forName(className);
- } catch (ClassNotFoundException e) {
- throw new RuntimeModelerException("runtime.modeler.external.metadata.generic", e);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/WebParamMode.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/WebParamMode.java
deleted file mode 100644
index f84eac83..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/WebParamMode.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for web-param-mode.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p>
- * <pre>
- * &lt;simpleType name="web-param-mode">
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
- * &lt;enumeration value="IN"/>
- * &lt;enumeration value="OUT"/>
- * &lt;enumeration value="INOUT"/>
- * &lt;/restriction>
- * &lt;/simpleType>
- * </pre>
- *
- */
-@XmlType(name = "web-param-mode")
-@XmlEnum
-public enum WebParamMode {
-
- IN,
- OUT,
- INOUT;
-
- public String value() {
- return name();
- }
-
- public static WebParamMode fromValue(String v) {
- return valueOf(v);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAction.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAction.java
deleted file mode 100644
index 08db8694..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAction.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.List;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}fault-action" maxOccurs="unbounded" minOccurs="0"/>
- * &lt;/sequence>
- * &lt;attribute name="input" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="output" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
- "faultAction"
-})
-@XmlRootElement(name = "action")
-public class XmlAction implements javax.xml.ws.Action {
-
- @XmlElement(name = "fault-action")
- protected List<XmlFaultAction> faultAction;
- @XmlAttribute(name = "input")
- protected String input;
- @XmlAttribute(name = "output")
- protected String output;
-
- /**
- * Gets the value of the faultAction property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the faultAction property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getFaultAction().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link XmlFaultAction }
- *
- *
- */
- public List<XmlFaultAction> getFaultAction() {
- if (faultAction == null) {
- faultAction = new ArrayList<XmlFaultAction>();
- }
- return this.faultAction;
- }
-
- /**
- * Gets the value of the input property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getInput() {
- return nullSafe(input);
- }
-
- /**
- * Sets the value of the input property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setInput(String value) {
- this.input = value;
- }
-
- /**
- * Gets the value of the output property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getOutput() {
- return nullSafe(output);
- }
-
- /**
- * Sets the value of the output property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setOutput(String value) {
- this.output = value;
- }
-
- @Override
- public String input() {
- return nullSafe(input);
- }
-
- @Override
- public String output() {
- return nullSafe(output);
- }
-
- @Override
- public javax.xml.ws.FaultAction[] fault() {
- return new javax.xml.ws.FaultAction[0];
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.xml.ws.Action.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAddressing.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAddressing.java
deleted file mode 100644
index 40867199..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAddressing.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.ws.soap.AddressingFeature;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "addressing")
-public class XmlAddressing implements javax.xml.ws.soap.Addressing {
-
- @XmlAttribute(name = "enabled")
- protected Boolean enabled;
-
- @XmlAttribute(name = "required")
- protected Boolean required;
-
- public Boolean getEnabled() {
- return enabled();
- }
-
- public void setEnabled(Boolean enabled) {
- this.enabled = enabled;
- }
-
- public Boolean getRequired() {
- return required();
- }
-
- public void setRequired(Boolean required) {
- this.required = required;
- }
-
- @Override
- public boolean enabled() {
- return nullSafe(enabled, true);
- }
-
- @Override
- public boolean required() {
- return nullSafe(required, false);
- }
-
- @Override
- public AddressingFeature.Responses responses() {
- return AddressingFeature.Responses.ALL;
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.xml.ws.soap.Addressing.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlBindingType.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlBindingType.java
deleted file mode 100644
index 10e94d5b..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlBindingType.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "binding-type")
-public class XmlBindingType implements javax.xml.ws.BindingType {
-
- @XmlAttribute(name = "value")
- protected String value;
-
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValue(String value) {
- this.value = value;
- }
-
- @Override
- public String value() {
- return nullSafe(value);
- }
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.xml.ws.BindingType.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlFaultAction.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlFaultAction.java
deleted file mode 100644
index b83cfbc3..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlFaultAction.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.findClass;
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="className" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "fault-action")
-public class XmlFaultAction implements javax.xml.ws.FaultAction {
-
- @XmlAttribute(name = "className", required = true)
- protected String className;
- @XmlAttribute(name = "value")
- protected String value;
-
- /**
- * Gets the value of the className property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getClassName() {
- return className;
- }
-
- /**
- * Sets the value of the className property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setClassName(String value) {
- this.className = value;
- }
-
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValue() {
- return nullSafe(value);
- }
-
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValue(String value) {
- this.value = value;
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Class<? extends Exception> className() {
- return (Class<Exception>) findClass(className);
- }
-
- @Override
- public String value() {
- return nullSafe(value);
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.xml.ws.FaultAction.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlHandlerChain.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlHandlerChain.java
deleted file mode 100644
index 4914cb4c..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlHandlerChain.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="file" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "handler-chain")
-public class XmlHandlerChain implements javax.jws.HandlerChain {
-
- @XmlAttribute(name = "file")
- protected String file;
-
- /**
- * Gets the value of the file property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getFile() {
- return file;
- }
-
- /**
- * Sets the value of the file property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setFile(String value) {
- this.file = value;
- }
-
- @Override
- public String file() {
- return nullSafe(file);
- }
-
- @Override
- public String name() {
- return ""; // deprecated, so let's ignore it ...
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.jws.HandlerChain.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlMTOM.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlMTOM.java
deleted file mode 100644
index 923a6d3a..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlMTOM.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.ws.soap.MTOM;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="enabled" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
- * &lt;attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}int" default="0" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "mtom")
-public class XmlMTOM implements MTOM {
-
- @XmlAttribute(name = "enabled")
- protected Boolean enabled;
- @XmlAttribute(name = "threshold")
- protected Integer threshold;
-
- /**
- * Gets the value of the enabled property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public boolean isEnabled() {
- if (enabled == null) {
- return true;
- } else {
- return enabled;
- }
- }
-
- /**
- * Sets the value of the enabled property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setEnabled(Boolean value) {
- this.enabled = value;
- }
-
- /**
- * Gets the value of the threshold property.
- *
- * @return
- * possible object is
- * {@link Integer }
- *
- */
- public int getThreshold() {
- if (threshold == null) {
- return 0;
- } else {
- return threshold;
- }
- }
-
- /**
- * Sets the value of the threshold property.
- *
- * @param value
- * allowed object is
- * {@link Integer }
- *
- */
- public void setThreshold(Integer value) {
- this.threshold = value;
- }
-
- @Override
- public boolean enabled() {
- return nullSafe(enabled, Boolean.TRUE);
- }
-
- @Override
- public int threshold() {
- return nullSafe(threshold, 0);
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return MTOM.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlOneway.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlOneway.java
deleted file mode 100644
index 93c39ae8..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlOneway.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "oneway")
-public class XmlOneway implements javax.jws.Oneway {
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.jws.Oneway.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlRequestWrapper.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlRequestWrapper.java
deleted file mode 100644
index ed80c996..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlRequestWrapper.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="local-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="target-namespace" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="class-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="part-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "request-wrapper")
-public class XmlRequestWrapper implements javax.xml.ws.RequestWrapper {
-
- @XmlAttribute(name = "local-name")
- protected String localName;
- @XmlAttribute(name = "target-namespace")
- protected String targetNamespace;
- @XmlAttribute(name = "class-name")
- protected String className;
- @XmlAttribute(name = "part-name")
- protected String partName;
-
- /**
- * Gets the value of the localName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getLocalName() {
- if (localName == null) {
- return "";
- } else {
- return localName;
- }
- }
-
- /**
- * Sets the value of the localName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setLocalName(String value) {
- this.localName = value;
- }
-
- /**
- * Gets the value of the targetNamespace property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getTargetNamespace() {
- if (targetNamespace == null) {
- return "";
- } else {
- return targetNamespace;
- }
- }
-
- /**
- * Sets the value of the targetNamespace property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setTargetNamespace(String value) {
- this.targetNamespace = value;
- }
-
- /**
- * Gets the value of the className property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getClassName() {
- if (className == null) {
- return "";
- } else {
- return className;
- }
- }
-
- /**
- * Sets the value of the className property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setClassName(String value) {
- this.className = value;
- }
-
- public String getPartName() {
- return partName;
- }
-
- public void setPartName(String partName) {
- this.partName = partName;
- }
-
- @Override
- public String localName() {
- return nullSafe(localName);
- }
-
- @Override
- public String targetNamespace() {
- return nullSafe(targetNamespace);
- }
-
- @Override
- public String className() {
- return nullSafe(className);
- }
-
- @Override
- public String partName() {
- return nullSafe(partName);
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.xml.ws.RequestWrapper.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlResponseWrapper.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlResponseWrapper.java
deleted file mode 100644
index 0f2ef062..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlResponseWrapper.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="local-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="target-namespace" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="class-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="part-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "response-wrapper")
-public class XmlResponseWrapper implements javax.xml.ws.ResponseWrapper {
-
- @XmlAttribute(name = "local-name")
- protected String localName;
- @XmlAttribute(name = "target-namespace")
- protected String targetNamespace;
- @XmlAttribute(name = "class-name")
- protected String className;
- @XmlAttribute(name = "part-name")
- protected String partName;
-
- /**
- * Gets the value of the localName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getLocalName() {
- if (localName == null) {
- return "";
- } else {
- return localName;
- }
- }
-
- /**
- * Sets the value of the localName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setLocalName(String value) {
- this.localName = value;
- }
-
- /**
- * Gets the value of the targetNamespace property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getTargetNamespace() {
- if (targetNamespace == null) {
- return "";
- } else {
- return targetNamespace;
- }
- }
-
- /**
- * Sets the value of the targetNamespace property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setTargetNamespace(String value) {
- this.targetNamespace = value;
- }
-
- /**
- * Gets the value of the className property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getClassName() {
- if (className == null) {
- return "";
- } else {
- return className;
- }
- }
-
- /**
- * Sets the value of the className property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setClassName(String value) {
- this.className = value;
- }
-
- public String getPartName() {
- return partName;
- }
-
- public void setPartName(String partName) {
- this.partName = partName;
- }
-
- @Override
- public String localName() {
- return nullSafe(localName);
- }
-
- @Override
- public String targetNamespace() {
- return nullSafe(targetNamespace);
- }
-
- @Override
- public String className() {
- return nullSafe(className);
- }
-
- @Override
- public String partName() {
- return nullSafe(partName);
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.xml.ws.ResponseWrapper.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlSOAPBinding.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlSOAPBinding.java
deleted file mode 100644
index be8eaa9d..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlSOAPBinding.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="style" type="{http://xmlns.oracle.com/webservices/jaxws-databinding}soap-binding-style" default="DOCUMENT" />
- * &lt;attribute name="use" type="{http://xmlns.oracle.com/webservices/jaxws-databinding}soap-binding-use" default="LITERAL" />
- * &lt;attribute name="parameter-style" type="{http://xmlns.oracle.com/webservices/jaxws-databinding}soap-binding-parameter-style" default="WRAPPED" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "soap-binding")
-public class XmlSOAPBinding implements javax.jws.soap.SOAPBinding {
-
- @XmlAttribute(name = "style")
- protected SoapBindingStyle style;
- @XmlAttribute(name = "use")
- protected SoapBindingUse use;
- @XmlAttribute(name = "parameter-style")
- protected SoapBindingParameterStyle parameterStyle;
-
- /**
- * Gets the value of the style property.
- *
- * @return
- * possible object is
- * {@link SoapBindingStyle }
- *
- */
- public SoapBindingStyle getStyle() {
- if (style == null) {
- return SoapBindingStyle.DOCUMENT;
- } else {
- return style;
- }
- }
-
- /**
- * Sets the value of the style property.
- *
- * @param value
- * allowed object is
- * {@link SoapBindingStyle }
- *
- */
- public void setStyle(SoapBindingStyle value) {
- this.style = value;
- }
-
- /**
- * Gets the value of the use property.
- *
- * @return
- * possible object is
- * {@link SoapBindingUse }
- *
- */
- public SoapBindingUse getUse() {
- if (use == null) {
- return SoapBindingUse.LITERAL;
- } else {
- return use;
- }
- }
-
- /**
- * Sets the value of the use property.
- *
- * @param value
- * allowed object is
- * {@link SoapBindingUse }
- *
- */
- public void setUse(SoapBindingUse value) {
- this.use = value;
- }
-
- /**
- * Gets the value of the parameterStyle property.
- *
- * @return
- * possible object is
- * {@link SoapBindingParameterStyle }
- *
- */
- public SoapBindingParameterStyle getParameterStyle() {
- if (parameterStyle == null) {
- return SoapBindingParameterStyle.WRAPPED;
- } else {
- return parameterStyle;
- }
- }
-
- /**
- * Sets the value of the parameterStyle property.
- *
- * @param value
- * allowed object is
- * {@link SoapBindingParameterStyle }
- *
- */
- public void setParameterStyle(SoapBindingParameterStyle value) {
- this.parameterStyle = value;
- }
-
- @Override
- public Style style() {
- return nullSafe(style, Style.DOCUMENT);
- }
-
- @Override
- public Use use() {
- return nullSafe(use, Use.LITERAL);
- }
-
- @Override
- public ParameterStyle parameterStyle() {
- return nullSafe(parameterStyle, ParameterStyle.WRAPPED);
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.jws.soap.SOAPBinding.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlServiceMode.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlServiceMode.java
deleted file mode 100644
index 95803fc5..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlServiceMode.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.ws.Service;
-
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" default="PAYLOAD" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "service-mode")
-public class XmlServiceMode implements javax.xml.ws.ServiceMode {
-
- @XmlAttribute(name = "value")
- protected String value;
-
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValue() {
- if (value == null) {
- return "PAYLOAD";
- } else {
- return value;
- }
- }
-
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValue(String value) {
- this.value = value;
- }
-
- @Override
- public Service.Mode value() {
- return Service.Mode.valueOf(nullSafe(value, "PAYLOAD"));
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.xml.ws.ServiceMode.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebEndpoint.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebEndpoint.java
deleted file mode 100644
index 7a23836d..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebEndpoint.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "web-endpoint")
-public class XmlWebEndpoint implements javax.xml.ws.WebEndpoint {
-
- @XmlAttribute(name = "name")
- protected String name;
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
- @Override
- public String name() {
- return nullSafe(name);
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.xml.ws.WebEndpoint.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebFault.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebFault.java
deleted file mode 100644
index acae5314..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebFault.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;attribute name="targetNamespace" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;attribute name="faultBean" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "web-fault")
-public class XmlWebFault implements javax.xml.ws.WebFault {
-
- @XmlAttribute(name = "name")
- protected String name;
- @XmlAttribute(name = "targetNamespace")
- protected String targetNamespace;
- @XmlAttribute(name = "faultBean")
- protected String faultBean;
- @XmlAttribute(name = "messageName")
- protected String messageName;
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
- /**
- * Gets the value of the targetNamespace property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getTargetNamespace() {
- return targetNamespace;
- }
-
- /**
- * Sets the value of the targetNamespace property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setTargetNamespace(String value) {
- this.targetNamespace = value;
- }
-
- /**
- * Gets the value of the faultBean property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getFaultBean() {
- return faultBean;
- }
-
- /**
- * Sets the value of the faultBean property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setFaultBean(String value) {
- this.faultBean = value;
- }
-
- @Override
- public String name() {
- return nullSafe(name);
- }
-
- @Override
- public String targetNamespace() {
- return nullSafe(targetNamespace);
- }
-
- @Override
- public String faultBean() {
- return nullSafe(faultBean);
- }
-
- @Override
- public String messageName() {
- return nullSafe(messageName);
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.xml.ws.WebFault.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebMethod.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebMethod.java
deleted file mode 100644
index 201f04d8..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebMethod.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="action" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="exclude" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
- * &lt;attribute name="operation-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "web-method")
-public class XmlWebMethod implements javax.jws.WebMethod {
-
- @XmlAttribute(name = "action")
- protected String action;
- @XmlAttribute(name = "exclude")
- protected Boolean exclude;
- @XmlAttribute(name = "operation-name")
- protected String operationName;
-
- /**
- * Gets the value of the action property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getAction() {
- if (action == null) {
- return "";
- } else {
- return action;
- }
- }
-
- /**
- * Sets the value of the action property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setAction(String value) {
- this.action = value;
- }
-
- /**
- * Gets the value of the exclude property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public boolean isExclude() {
- if (exclude == null) {
- return false;
- } else {
- return exclude;
- }
- }
-
- /**
- * Sets the value of the exclude property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setExclude(Boolean value) {
- this.exclude = value;
- }
-
- /**
- * Gets the value of the operationName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getOperationName() {
- if (operationName == null) {
- return "";
- } else {
- return operationName;
- }
- }
-
- /**
- * Sets the value of the operationName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setOperationName(String value) {
- this.operationName = value;
- }
-
- @Override
- public String operationName() {
- return nullSafe(operationName);
- }
-
- @Override
- public String action() {
- return nullSafe(action);
- }
-
- @Override
- public boolean exclude() {
- return nullSafe(exclude, false);
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.jws.WebMethod.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebParam.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebParam.java
deleted file mode 100644
index 0e662d82..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebParam.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="header" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
- * &lt;attribute name="mode" type="{http://xmlns.oracle.com/webservices/jaxws-databinding}web-param-mode" default="IN" />
- * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="part-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="target-namespace" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "web-param")
-public class XmlWebParam implements javax.jws.WebParam {
-
- @XmlAttribute(name = "header")
- protected Boolean header;
- @XmlAttribute(name = "mode")
- protected WebParamMode mode;
- @XmlAttribute(name = "name")
- protected String name;
- @XmlAttribute(name = "part-name")
- protected String partName;
- @XmlAttribute(name = "target-namespace")
- protected String targetNamespace;
-
- /**
- * Gets the value of the header property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public boolean isHeader() {
- if (header == null) {
- return false;
- } else {
- return header;
- }
- }
-
- /**
- * Sets the value of the header property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setHeader(Boolean value) {
- this.header = value;
- }
-
- /**
- * Gets the value of the mode property.
- *
- * @return
- * possible object is
- * {@link WebParamMode }
- *
- */
- public WebParamMode getMode() {
- if (mode == null) {
- return WebParamMode.IN;
- } else {
- return mode;
- }
- }
-
- /**
- * Sets the value of the mode property.
- *
- * @param value
- * allowed object is
- * {@link WebParamMode }
- *
- */
- public void setMode(WebParamMode value) {
- this.mode = value;
- }
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- if (name == null) {
- return "";
- } else {
- return name;
- }
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
- /**
- * Gets the value of the partName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getPartName() {
- if (partName == null) {
- return "";
- } else {
- return partName;
- }
- }
-
- /**
- * Sets the value of the partName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setPartName(String value) {
- this.partName = value;
- }
-
- /**
- * Gets the value of the targetNamespace property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getTargetNamespace() {
- if (targetNamespace == null) {
- return "";
- } else {
- return targetNamespace;
- }
- }
-
- /**
- * Sets the value of the targetNamespace property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setTargetNamespace(String value) {
- this.targetNamespace = value;
- }
-
- @Override
- public String name() {
- return nullSafe(name);
- }
-
- @Override
- public String partName() {
- return nullSafe(partName);
- }
-
- @Override
- public String targetNamespace() {
- return nullSafe(targetNamespace);
- }
-
- @Override
- public Mode mode() {
- return nullSafe(mode, Mode.IN);
- }
-
- @Override
- public boolean header() {
- return nullSafe(header, false);
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.jws.WebParam.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebResult.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebResult.java
deleted file mode 100644
index 4eabd9e8..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebResult.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="header" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
- * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="part-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="target-namespace" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "web-result")
-public class XmlWebResult implements javax.jws.WebResult {
-
- @XmlAttribute(name = "header")
- protected Boolean header;
- @XmlAttribute(name = "name")
- protected String name;
- @XmlAttribute(name = "part-name")
- protected String partName;
- @XmlAttribute(name = "target-namespace")
- protected String targetNamespace;
-
- /**
- * Gets the value of the header property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public boolean isHeader() {
- if (header == null) {
- return false;
- } else {
- return header;
- }
- }
-
- /**
- * Sets the value of the header property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setHeader(Boolean value) {
- this.header = value;
- }
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- if (name == null) {
- return "";
- } else {
- return name;
- }
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
- /**
- * Gets the value of the partName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getPartName() {
- if (partName == null) {
- return "";
- } else {
- return partName;
- }
- }
-
- /**
- * Sets the value of the partName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setPartName(String value) {
- this.partName = value;
- }
-
- /**
- * Gets the value of the targetNamespace property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getTargetNamespace() {
- if (targetNamespace == null) {
- return "";
- } else {
- return targetNamespace;
- }
- }
-
- /**
- * Sets the value of the targetNamespace property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setTargetNamespace(String value) {
- this.targetNamespace = value;
- }
-
- @Override
- public String name() {
- return nullSafe(name);
- }
-
- @Override
- public String partName() {
- return nullSafe(partName);
- }
-
- @Override
- public String targetNamespace() {
- return nullSafe(targetNamespace);
- }
-
- @Override
- public boolean header() {
- return nullSafe(header, false);
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.jws.WebResult.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebService.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebService.java
deleted file mode 100644
index 06324c6f..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebService.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="endpoint-interface" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="port-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="service-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="target-namespace" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;attribute name="wsdl-location" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "web-service")
-public class XmlWebService implements javax.jws.WebService {
-
- @XmlAttribute(name = "endpoint-interface")
- protected String endpointInterface;
- @XmlAttribute(name = "name")
- protected String name;
- @XmlAttribute(name = "port-name")
- protected String portName;
- @XmlAttribute(name = "service-name")
- protected String serviceName;
- @XmlAttribute(name = "target-namespace")
- protected String targetNamespace;
- @XmlAttribute(name = "wsdl-location")
- protected String wsdlLocation;
-
- /**
- * Gets the value of the endpointInterface property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getEndpointInterface() {
- if (endpointInterface == null) {
- return "";
- } else {
- return endpointInterface;
- }
- }
-
- /**
- * Sets the value of the endpointInterface property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setEndpointInterface(String value) {
- this.endpointInterface = value;
- }
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- if (name == null) {
- return "";
- } else {
- return name;
- }
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
- /**
- * Gets the value of the portName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getPortName() {
- if (portName == null) {
- return "";
- } else {
- return portName;
- }
- }
-
- /**
- * Sets the value of the portName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setPortName(String value) {
- this.portName = value;
- }
-
- /**
- * Gets the value of the serviceName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getServiceName() {
- if (serviceName == null) {
- return "";
- } else {
- return serviceName;
- }
- }
-
- /**
- * Sets the value of the serviceName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setServiceName(String value) {
- this.serviceName = value;
- }
-
- /**
- * Gets the value of the targetNamespace property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getTargetNamespace() {
- if (targetNamespace == null) {
- return "";
- } else {
- return targetNamespace;
- }
- }
-
- /**
- * Sets the value of the targetNamespace property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setTargetNamespace(String value) {
- this.targetNamespace = value;
- }
-
- /**
- * Gets the value of the wsdlLocation property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getWsdlLocation() {
- if (wsdlLocation == null) {
- return "";
- } else {
- return wsdlLocation;
- }
- }
-
- /**
- * Sets the value of the wsdlLocation property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setWsdlLocation(String value) {
- this.wsdlLocation = value;
- }
-
- @Override
- public String name() {
- return nullSafe(name);
- }
-
- @Override
- public String targetNamespace() {
- return nullSafe(targetNamespace);
- }
-
- @Override
- public String serviceName() {
- return nullSafe(serviceName);
- }
-
- @Override
- public String portName() {
- return nullSafe(portName);
- }
-
- @Override
- public String wsdlLocation() {
- return nullSafe(wsdlLocation);
- }
-
- @Override
- public String endpointInterface() {
- return nullSafe(endpointInterface);
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.jws.WebService.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceClient.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceClient.java
deleted file mode 100644
index 548649a1..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceClient.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;attribute name="targetNamespace" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;attribute name="wsdlLocation" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "web-service-client")
-public class XmlWebServiceClient implements javax.xml.ws.WebServiceClient {
-
- @XmlAttribute(name = "name")
- protected String name;
- @XmlAttribute(name = "targetNamespace")
- protected String targetNamespace;
- @XmlAttribute(name = "wsdlLocation")
- protected String wsdlLocation;
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
- /**
- * Gets the value of the targetNamespace property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getTargetNamespace() {
- return targetNamespace;
- }
-
- /**
- * Sets the value of the targetNamespace property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setTargetNamespace(String value) {
- this.targetNamespace = value;
- }
-
- /**
- * Gets the value of the wsdlLocation property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getWsdlLocation() {
- return wsdlLocation;
- }
-
- /**
- * Sets the value of the wsdlLocation property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setWsdlLocation(String value) {
- this.wsdlLocation = value;
- }
-
- @Override
- public String name() {
- return nullSafe(name);
- }
-
- @Override
- public String targetNamespace() {
- return nullSafe(targetNamespace);
- }
-
- @Override
- public String wsdlLocation() {
- return nullSafe(wsdlLocation);
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.xml.ws.WebServiceClient.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceProvider.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceProvider.java
deleted file mode 100644
index c152ad50..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceProvider.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="targetNamespace" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;attribute name="serviceName" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;attribute name="portName" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;attribute name="wsdlLocation" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "web-service-provider")
-public class XmlWebServiceProvider implements javax.xml.ws.WebServiceProvider {
-
- @XmlAttribute(name = "targetNamespace")
- protected String targetNamespace;
- @XmlAttribute(name = "serviceName")
- protected String serviceName;
- @XmlAttribute(name = "portName")
- protected String portName;
- @XmlAttribute(name = "wsdlLocation")
- protected String wsdlLocation;
-
- /**
- * Gets the value of the targetNamespace property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getTargetNamespace() {
- return targetNamespace;
- }
-
- /**
- * Sets the value of the targetNamespace property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setTargetNamespace(String value) {
- this.targetNamespace = value;
- }
-
- /**
- * Gets the value of the serviceName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getServiceName() {
- return serviceName;
- }
-
- /**
- * Sets the value of the serviceName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setServiceName(String value) {
- this.serviceName = value;
- }
-
- /**
- * Gets the value of the portName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getPortName() {
- return portName;
- }
-
- /**
- * Sets the value of the portName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setPortName(String value) {
- this.portName = value;
- }
-
- /**
- * Gets the value of the wsdlLocation property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getWsdlLocation() {
- return wsdlLocation;
- }
-
- /**
- * Sets the value of the wsdlLocation property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setWsdlLocation(String value) {
- this.wsdlLocation = value;
- }
-
- @Override
- public String wsdlLocation() {
- return nullSafe(wsdlLocation);
- }
-
- @Override
- public String serviceName() {
- return nullSafe(serviceName);
- }
-
- @Override
- public String targetNamespace() {
- return nullSafe(targetNamespace);
- }
-
- @Override
- public String portName() {
- return nullSafe(portName);
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.xml.ws.WebServiceProvider.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceRef.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceRef.java
deleted file mode 100644
index ebda7053..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceRef.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.oracle.xmlns.internal.webservices.jaxws_databinding;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.ws.Service;
-import java.lang.annotation.Annotation;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.findClass;
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe;
-
-
-/**
- * This file was generated by JAXB-RI v2.2.6 and afterwards modified
- * to implement appropriate Annotation
- *
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;attribute name="mappedName" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;attribute name="wsdlLocation" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "web-service-ref")
-public class XmlWebServiceRef implements javax.xml.ws.WebServiceRef {
-
- @XmlAttribute(name = "name")
- protected String name;
- @XmlAttribute(name = "type")
- protected String type;
- @XmlAttribute(name = "mappedName")
- protected String mappedName;
- @XmlAttribute(name = "value")
- protected String value;
- @XmlAttribute(name = "wsdlLocation")
- protected String wsdlLocation;
- @XmlAttribute(name = "lookup")
- protected String lookup;
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
- /**
- * Gets the value of the type property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getType() {
- return type;
- }
-
- /**
- * Sets the value of the type property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setType(String value) {
- this.type = value;
- }
-
- /**
- * Gets the value of the mappedName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getMappedName() {
- return mappedName;
- }
-
- /**
- * Sets the value of the mappedName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setMappedName(String value) {
- this.mappedName = value;
- }
-
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValue(String value) {
- this.value = value;
- }
-
- /**
- * Gets the value of the wsdlLocation property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getWsdlLocation() {
- return wsdlLocation;
- }
-
- /**
- * Sets the value of the wsdlLocation property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setWsdlLocation(String value) {
- this.wsdlLocation = value;
- }
-
- public String getLookup() {
- return lookup;
- }
-
- public void setLookup(String lookup) {
- this.lookup = lookup;
- }
-
- @Override
- public String name() {
- return nullSafe(name);
- }
-
- @Override
- public Class<?> type() {
- if (type == null) {
- return Object.class;
- }
- return findClass(type);
- }
-
- @Override
- public String mappedName() {
- return nullSafe(mappedName);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Class<? extends Service> value() {
- if (value == null) {
- return Service.class;
- }
- return (Class<Service>) findClass(value);
- }
-
- @Override
- public String wsdlLocation() {
- return nullSafe(wsdlLocation);
- }
-
- @Override
- public String lookup() {
- return nullSafe(lookup);
- }
-
- @Override
- public Class<? extends Annotation> annotationType() {
- return javax.xml.ws.WebServiceRef.class;
- }
-}
diff --git a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/package-info.java b/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/package-info.java
deleted file mode 100644
index e91a138d..00000000
--- a/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/package-info.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6-SNAPSHOT
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2012.03.21 at 10:57:01 AM CET
-//
-
-@javax.xml.bind.annotation.XmlSchema(namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package com.oracle.xmlns.internal.webservices.jaxws_databinding;
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/ClassType.java b/src/share/jaxws_classes/com/sun/codemodel/internal/ClassType.java
deleted file mode 100644
index 5196b4b3..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/ClassType.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-/**
- * This helps enable whether the JDefinedClass is a Class or Interface or
- * AnnotationTypeDeclaration or Enum
- *
- * @author
- * Bhakti Mehta (bhakti.mehta@sun.com)
- */
-public final class ClassType {
-
- /**
- * The keyword used to declare this type.
- */
- final String declarationToken;
-
- private ClassType(String token) {
- this.declarationToken = token;
- }
-
- public static final ClassType CLASS = new ClassType("class");
- public static final ClassType INTERFACE = new ClassType("interface");
- public static final ClassType ANNOTATION_TYPE_DECL = new ClassType("@interface");
- public static final ClassType ENUM = new ClassType("enum");
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/CodeWriter.java b/src/share/jaxws_classes/com/sun/codemodel/internal/CodeWriter.java
deleted file mode 100644
index 6149fb02..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/CodeWriter.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.nio.charset.CharsetEncoder;
-
-import com.sun.codemodel.internal.util.EncoderFactory;
-import com.sun.codemodel.internal.util.UnicodeEscapeWriter;
-
-/**
- * Receives generated code and writes to the appropriate storage.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class CodeWriter {
-
- /**
- * Encoding to be used by the writer. Null means platform specific encoding.
- *
- * @since 2.5
- */
- protected String encoding = null;
-
- /**
- * Called by CodeModel to store the specified file.
- * The callee must allocate a storage to store the specified file.
- *
- * <p>
- * The returned stream will be closed before the next file is
- * stored. So the callee can assume that only one OutputStream
- * is active at any given time.
- *
- * @param pkg
- * The package of the file to be written.
- * @param fileName
- * File name without the path. Something like
- * "Foo.java" or "Bar.properties"
- */
- public abstract OutputStream openBinary( JPackage pkg, String fileName ) throws IOException;
-
- /**
- * Called by CodeModel to store the specified file.
- * The callee must allocate a storage to store the specified file.
- *
- * <p>
- * The returned stream will be closed before the next file is
- * stored. So the callee can assume that only one OutputStream
- * is active at any given time.
- *
- * @param pkg
- * The package of the file to be written.
- * @param fileName
- * File name without the path. Something like
- * "Foo.java" or "Bar.properties"
- */
- public Writer openSource( JPackage pkg, String fileName ) throws IOException {
- final OutputStreamWriter bw = encoding != null
- ? new OutputStreamWriter(openBinary(pkg,fileName), encoding)
- : new OutputStreamWriter(openBinary(pkg,fileName));
-
- // create writer
- try {
- return new UnicodeEscapeWriter(bw) {
- // can't change this signature to Encoder because
- // we can't have Encoder in method signature
- private final CharsetEncoder encoder = EncoderFactory.createEncoder(bw.getEncoding());
- @Override
- protected boolean requireEscaping(int ch) {
- // control characters
- if( ch<0x20 && " \t\r\n".indexOf(ch)==-1 ) return true;
- // check ASCII chars, for better performance
- if( ch<0x80 ) return false;
-
- return !encoder.canEncode((char)ch);
- }
- };
- } catch( Throwable t ) {
- return new UnicodeEscapeWriter(bw);
- }
- }
-
- /**
- * Called by CodeModel at the end of the process.
- */
- public abstract void close() throws IOException;
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotatable.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotatable.java
deleted file mode 100644
index 8be8028d..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotatable.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.lang.annotation.Annotation;
-import java.util.Collection;
-
-/**
- * Annotatable program elements.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface JAnnotatable {
- /**
- * Adds an annotation to this program element.
- * @param clazz
- * The annotation class to annotate the program element with
- */
- JAnnotationUse annotate(JClass clazz);
-
- /**
- * Adds an annotation to this program element.
- *
- * @param clazz
- * The annotation class to annotate the program element with
- */
- JAnnotationUse annotate(Class <? extends Annotation> clazz);
-
- /**
- * Adds an annotation to this program element
- * and returns a type-safe writer to fill in the values of such annotations.
- */
- <W extends JAnnotationWriter> W annotate2(Class<W> clazz);
-
- /**
- * Read-only live view of all annotations on this {@link JAnnotatable}
- *
- * @return
- * Can be empty but never null.
- */
- Collection<JAnnotationUse> annotations();
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationArrayMember.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationArrayMember.java
deleted file mode 100644
index 169c97e0..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationArrayMember.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Collection;
-import java.util.Collections;
-
-/**
- * Represents an arrays as annotation members
- *
- * <p>
- * This class implements {@link JAnnotatable} to allow
- * new annotations to be added as a member of the array.
- *
- * @author
- * Bhakti Mehta (bhakti.mehta@sun.com)
- */
-public final class JAnnotationArrayMember extends JAnnotationValue implements JAnnotatable {
- private final List<JAnnotationValue> values = new ArrayList<JAnnotationValue>();
- private final JCodeModel owner;
-
- JAnnotationArrayMember(JCodeModel owner) {
- this.owner = owner;
- }
-
- /**
- * Adds an array member to this annotation
- *
- * @param value Adds a string value to the array member
- * @return The JAnnotationArrayMember. More elements can be added by calling
- * the same method multiple times
- */
- public JAnnotationArrayMember param(String value) {
- JAnnotationValue annotationValue = new JAnnotationStringValue(JExpr.lit(value));
- values.add(annotationValue);
- return this;
- }
-
- /**
- * Adds an array member to this annotation
- *
- * @param value Adds a boolean value to the array member
- * @return The JAnnotationArrayMember. More elements can be added by calling
- * the same method multiple times
- */
- public JAnnotationArrayMember param(boolean value) {
- JAnnotationValue annotationValue = new JAnnotationStringValue(JExpr.lit(value));
- values.add(annotationValue);
- return this;
- }
-
- /**
- * Adds an array member to this annotation
- *
- * @param value Adds a byte value to the array member
- * @return The JAnnotationArrayMember. More elements can be added by calling
- * the same method multiple times
- */
- public JAnnotationArrayMember param(byte value) {
- JAnnotationValue annotationValue = new JAnnotationStringValue(JExpr.lit(value));
- values.add(annotationValue);
- return this;
- }
-
- /**
- * Adds an array member to this annotation
- *
- * @param value Adds a char value to the array member
- * @return The JAnnotationArrayMember. More elements can be added by calling
- * the same method multiple times
- */
- public JAnnotationArrayMember param(char value) {
- JAnnotationValue annotationValue = new JAnnotationStringValue(JExpr.lit(value));
- values.add(annotationValue);
- return this;
- }
-
- /**
- * Adds an array member to this annotation
- *
- * @param value Adds a double value to the array member
- * @return The JAnnotationArrayMember. More elements can be added by calling
- * the same method multiple times
- */
- public JAnnotationArrayMember param(double value) {
- JAnnotationValue annotationValue = new JAnnotationStringValue(JExpr.lit(value));
- values.add(annotationValue);
- return this;
- }
-
- /**
- * Adds an array member to this annotation
- *
- * @param value Adds a long value to the array member
- * @return The JAnnotationArrayMember. More elements can be added by calling
- * the same method multiple times
- */
- public JAnnotationArrayMember param(long value) {
- JAnnotationValue annotationValue = new JAnnotationStringValue(JExpr.lit(value));
- values.add(annotationValue);
- return this;
- }
-
- /**
- * Adds an array member to this annotation
- *
- * @param value Adds a short value to the array member
- * @return The JAnnotationArrayMember. More elements can be added by calling
- * the same method multiple times
- */
- public JAnnotationArrayMember param(short value) {
- JAnnotationValue annotationValue = new JAnnotationStringValue(JExpr.lit(value));
- values.add(annotationValue);
- return this;
- }
-
- /**
- * Adds an array member to this annotation
- *
- * @param value Adds an int value to the array member
- * @return The JAnnotationArrayMember. More elements can be added by calling
- * the same method multiple times
- */
- public JAnnotationArrayMember param(int value) {
- JAnnotationValue annotationValue = new JAnnotationStringValue(JExpr.lit(value));
- values.add(annotationValue);
- return this;
- }
-
- /**
- * Adds an array member to this annotation
- *
- * @param value Adds a float value to the array member
- * @return The JAnnotationArrayMember. More elements can be added by calling
- * the same method multiple times
- */
- public JAnnotationArrayMember param(float value) {
- JAnnotationValue annotationValue = new JAnnotationStringValue(JExpr.lit(value));
- values.add(annotationValue);
- return this;
- }
-
- /**
- * Adds a enum array member to this annotation
- *
- * @param value Adds a enum value to the array member
- * @return The JAnnotationArrayMember. More elements can be added by calling
- * the same method multiple times
- */
- public JAnnotationArrayMember param(final Enum<?> value) {
- JAnnotationValue annotationValue = new JAnnotationValue() {
- public void generate(JFormatter f) {
- f.t(owner.ref(value.getDeclaringClass())).p('.').p(value.name());
- }
- };
- values.add(annotationValue);
- return this;
- }
-
- /**
- * Adds a enum array member to this annotation
- *
- * @param value Adds a enum value to the array member
- * @return The JAnnotationArrayMember. More elements can be added by calling
- * the same method multiple times
- */
- public JAnnotationArrayMember param(final JEnumConstant value) {
- JAnnotationValue annotationValue = new JAnnotationStringValue(value);
- values.add(annotationValue);
- return this;
- }
-
- /**
- * Adds an expression array member to this annotation
- *
- * @param value Adds an expression value to the array member
- * @return The JAnnotationArrayMember. More elements can be added by calling
- * the same method multiple times
- */
- public JAnnotationArrayMember param(final JExpression value) {
- JAnnotationValue annotationValue = new JAnnotationStringValue(value);
- values.add(annotationValue);
- return this;
- }
-
- /**
- * Adds a class array member to this annotation
- *
- * @param value Adds a class value to the array member
- * @return The JAnnotationArrayMember. More elements can be added by calling
- * the same method multiple times
- */
- public JAnnotationArrayMember param(final Class<?> value){
- JAnnotationValue annotationValue = new JAnnotationStringValue(
- new JExpressionImpl() {
- public void generate(JFormatter f) {
- f.p(value.getName().replace('$', '.'));
- f.p(".class");
- }
- });
- values.add(annotationValue);
- return this;
- }
-
- public JAnnotationArrayMember param(JType type){
- JClass clazz = type.boxify();
- JAnnotationValue annotationValue = new JAnnotationStringValue ( clazz.dotclass() );
- values.add(annotationValue);
- return this;
- }
-
- /**
- * Adds a new annotation to the array.
- */
- public JAnnotationUse annotate(Class<? extends Annotation> clazz){
- return annotate(owner.ref(clazz));
- }
-
- /**
- * Adds a new annotation to the array.
- */
- public JAnnotationUse annotate(JClass clazz){
- JAnnotationUse a = new JAnnotationUse(clazz);
- values.add(a);
- return a;
- }
-
- public <W extends JAnnotationWriter> W annotate2(Class<W> clazz) {
- return TypedAnnotationWriter.create(clazz,this);
- }
-
- /**
- * {@link JAnnotatable#annotations()}
- */
- @SuppressWarnings("unchecked")
- public Collection<JAnnotationUse> annotations() {
- // this invocation is invalid if the caller isn't adding annotations into an array
- // so this potentially type-unsafe conversion would be justified.
- return Collections.<JAnnotationUse>unmodifiableList((List)values);
- }
-
- /**
- * Adds an annotation member to this annotation array
- * This can be used for e.g &#64;XmlCollection(values= &#64;XmlCollectionItem(type=Foo.class))
- * @param value
- * Adds a annotation to the array member
- * @return
- * The JAnnotationArrayMember. More elements can be added by calling
- * the same method multiple times
- *
- * @deprecated
- * use {@link #annotate}
- */
- public JAnnotationArrayMember param (JAnnotationUse value ){
- values.add(value);
- return this;
- }
-
- public void generate(JFormatter f) {
- f.p('{').nl().i();
-
- boolean first = true;
- for (JAnnotationValue aValue : values) {
- if (!first)
- f.p(',').nl();
- f.g(aValue);
- first = false;
- }
- f.nl().o().p('}');
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationStringValue.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationStringValue.java
deleted file mode 100644
index 5b541833..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationStringValue.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-
-/**
- * Captures the value of the annotation.
- *
- * @author
- * Bhakti Mehta (bhakti.mehta@sun.com)
- */
-final class JAnnotationStringValue extends JAnnotationValue {
-
- /**
- * The value of the Annotation member
- */
- private final JExpression value;
-
- JAnnotationStringValue(JExpression value) {
- this.value = value;
- }
-
- public void generate(JFormatter f) {
- f.g(value);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationUse.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationUse.java
deleted file mode 100644
index 14fc2f91..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationUse.java
+++ /dev/null
@@ -1,426 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-import java.lang.annotation.Annotation;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * Represents an annotation on a program element.
- *
- * TODO
- * How to add enums to the annotations
- * @author
- * Bhakti Mehta (bhakti.mehta@sun.com)
- */
-public final class JAnnotationUse extends JAnnotationValue {
-
- /**
- * The {@link Annotation} class
- */
- private final JClass clazz;
-
- /**
- * Map of member values.
- */
- private Map<String,JAnnotationValue> memberValues;
-
- JAnnotationUse(JClass clazz){
- this.clazz = clazz;
- }
-
- public JClass getAnnotationClass() {
- return clazz;
- }
-
- public Map<String, JAnnotationValue> getAnnotationMembers() {
- return Collections.unmodifiableMap(memberValues);
- }
-
- private JCodeModel owner() {
- return clazz.owner();
- }
-
- private void addValue(String name, JAnnotationValue annotationValue) {
- // Use ordered map to keep the code generation the same on any JVM.
- // Lazily created.
- if(memberValues==null)
- memberValues = new LinkedHashMap<String, JAnnotationValue>();
- memberValues.put(name,annotationValue);
- }
-
- /**
- * Adds a member value pair to this annotation
- *
- * @param name
- * The simple name for this annotation
- *
- * @param value
- * The boolean value for this annotation
- * @return
- * The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- *
- */
- public JAnnotationUse param(String name, boolean value){
- addValue(name, new JAnnotationStringValue(JExpr.lit(value)));
- return this;
- }
-
- /**
- * Adds a member value pair to this annotation
- * @param name
- * The simple name for this annotation
- *
- * @param value
- * The byte member value for this annotation
- * @return
- * The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- *
- */
- public JAnnotationUse param(String name, byte value){
- addValue(name, new JAnnotationStringValue(JExpr.lit(value)));
- return this;
- }
-
- /**
- * Adds a member value pair to this annotation
- * @param name
- * The simple name for this annotation
- *
- * @param value
- * The char member value for this annotation
- * @return
- * The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- *
- */
- public JAnnotationUse param(String name, char value){
- addValue(name, new JAnnotationStringValue(JExpr.lit(value)));
- return this;
- }
-
- /**
- * Adds a member value pair to this annotation
- * @param name
- * The simple name for this annotation
- *
- * @param value
- * The double member value for this annotation
- * @return
- * The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- *
- */
- public JAnnotationUse param(String name, double value){
- addValue(name, new JAnnotationStringValue(JExpr.lit(value)));
- return this;
- }
-
- /**
- * Adds a member value pair to this annotation
- * @param name
- * The simple name for this annotation
- *
- * @param value
- * The float member value for this annotation
- * @return
- * The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- *
- */
- public JAnnotationUse param(String name, float value){
- addValue(name, new JAnnotationStringValue(JExpr.lit(value)));
- return this;
- }
-
- /**
- * Adds a member value pair to this annotation
- * @param name
- * The simple name for this annotation
- *
- * @param value
- * The long member value for this annotation
- * @return
- * The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- *
- */
- public JAnnotationUse param(String name, long value){
- addValue(name, new JAnnotationStringValue(JExpr.lit(value)));
- return this;
- }
-
- /**
- * Adds a member value pair to this annotation
- * @param name
- * The simple name for this annotation
- *
- * @param value
- * The short member value for this annotation
- * @return
- * The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- *
- */
- public JAnnotationUse param(String name, short value){
- addValue(name, new JAnnotationStringValue(JExpr.lit(value)));
- return this;
- }
-
- /**
- * Adds a member value pair to this annotation
- * @param name
- * The simple name for this annotation
- *
- * @param value
- * The int member value for this annotation
- * @return
- * The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- *
- */
- public JAnnotationUse param(String name, int value){
- addValue(name, new JAnnotationStringValue(JExpr.lit(value)));
- return this;
- }
-
- /**
- * Adds a member value pair to this annotation
- * @param name
- * The simple name for this annotation
- *
- * @param value
- * The String member value for this annotation
- * @return
- * The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- *
- */
- public JAnnotationUse param(String name, String value){
- //Escape string values with quotes so that they can
- //be generated accordingly
- addValue(name, new JAnnotationStringValue(JExpr.lit(value)));
- return this;
- }
-
- /**
- * Adds a member value pair to this annotation
- * For adding class values as param
- * @see #param(String, Class)
- * @param name
- * The simple name for this annotation
- *
- * @param value
- * The annotation class which is member value for this annotation
- * @return
- * The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- *
- */
- public JAnnotationUse annotationParam(String name, Class<? extends Annotation> value) {
- JAnnotationUse annotationUse = new JAnnotationUse(owner().ref(value));
- addValue(name, annotationUse);
- return annotationUse;
- }
-
- /**
- * Adds a member value pair to this annotation
- * @param name
- * The simple name for this annotation
- *
- * @param value
- * The enum class which is member value for this annotation
- * @return
- * The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- *
- */
- public JAnnotationUse param(String name, final Enum<?> value) {
- addValue(name, new JAnnotationValue() {
- public void generate(JFormatter f) {
- f.t(owner().ref(value.getDeclaringClass())).p('.').p(value.name());
- }
- });
- return this;
- }
-
- /**
- * Adds a member value pair to this annotation
- * @param name
- * The simple name for this annotation
- *
- * @param value
- * The JEnumConstant which is member value for this annotation
- * @return
- * The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- *
- */
- public JAnnotationUse param(String name, JEnumConstant value){
- addValue(name, new JAnnotationStringValue(value));
- return this;
- }
-
- /**
- * Adds a member value pair to this annotation
- * This can be used for e.g to specify
- * <pre>
- * &#64;XmlCollectionItem(type=Integer.class);
- * <pre>
- * For adding a value of Class<? extends Annotation>
- * @link
- * #annotationParam(java.lang.String, java.lang.Class<? extends java.lang.annotation.Annotation>)
- * @param name
- * The simple name for this annotation param
- *
- * @param value
- * The class type of the param
- * @return
- * The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- *
- *
- *
- */
- public JAnnotationUse param(String name, final Class<?> value){
- addValue(name, new JAnnotationStringValue(
- new JExpressionImpl() {
- public void generate(JFormatter f) {
- f.p(value.getName().replace('$', '.'));
- f.p(".class");
- }
- }));
- return this;
- }
-
- /**
- * Adds a member value pair to this annotation based on the
- * type represented by the given JType
- *
- * @param name The simple name for this annotation param
- * @param type the JType representing the actual type
- * @return The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- */
- public JAnnotationUse param(String name, JType type){
- JClass c = type.boxify();
- addValue(name, new JAnnotationStringValue ( c.dotclass() ));
- return this;
- }
-
- /**
- * Adds a member value pair to this annotation.
- * @param name
- * The simple name for this annotation
- *
- * @param value
- * The JExpression which provides the contant value for this annotation
- * @return
- * The JAnnotationUse. More member value pairs can
- * be added to it using the same or the overloaded methods.
- *
- */
- public JAnnotationUse param(String name, JExpression value){
- addValue(name, new JAnnotationStringValue(value));
- return this;
- }
-
- /**
- * Adds a member value pair which is of type array to this annotation
- * @param name
- * The simple name for this annotation
- *
- * @return
- * The JAnnotationArrayMember. For adding array values
- * @see JAnnotationArrayMember
- *
- */
- public JAnnotationArrayMember paramArray(String name){
- JAnnotationArrayMember arrayMember = new JAnnotationArrayMember(owner());
- addValue(name, arrayMember);
- return arrayMember;
- }
-
-
-// /**
-// * This can be used to add annotations inside annotations
-// * for e.g &#64;XmlCollection(values= &#64;XmlCollectionItem(type=Foo.class))
-// * @param className
-// * The classname of the annotation to be included
-// * @return
-// * The JAnnotationUse that can be used as a member within this JAnnotationUse
-// * @deprecated
-// * use {@link JAnnotationArrayMember#annotate}
-// */
-// public JAnnotationUse annotate(String className) {
-// JAnnotationUse annotationUse = new JAnnotationUse(owner().ref(className));
-// return annotationUse;
-// }
-
- /**
- * This can be used to add annotations inside annotations
- * for e.g &#64;XmlCollection(values= &#64;XmlCollectionItem(type=Foo.class))
- * @param clazz
- * The annotation class to be included
- * @return
- * The JAnnotationUse that can be used as a member within this JAnnotationUse
- * @deprecated
- * use {@link JAnnotationArrayMember#annotate}
- */
- public JAnnotationUse annotate(Class <? extends Annotation> clazz) {
- JAnnotationUse annotationUse = new JAnnotationUse(owner().ref(clazz));
- return annotationUse;
- }
-
- public void generate(JFormatter f) {
- f.p('@').g(clazz);
- if(memberValues!=null) {
- f.p('(');
- boolean first = true;
-
- if(isOptimizable()) {
- // short form
- f.g(memberValues.get("value"));
- } else {
- for (Map.Entry<String, JAnnotationValue> mapEntry : memberValues.entrySet()) {
- if (!first) f.p(',');
- f.p(mapEntry.getKey()).p('=').g(mapEntry.getValue());
- first = false;
- }
- }
- f.p(')');
- }
- }
-
- private boolean isOptimizable() {
- return memberValues.size()==1 && memberValues.containsKey("value");
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationValue.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationValue.java
deleted file mode 100644
index eb000aa4..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationValue.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-/**
- * Things that can be values of an annotation element.
- *
- * @author
- * Bhakti Mehta (bhakti.mehta@sun.com)
- */
-public abstract class JAnnotationValue implements JGenerable {
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationWriter.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationWriter.java
deleted file mode 100644
index 51fb6edc..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JAnnotationWriter.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.lang.annotation.Annotation;
-
-/**
- * Base interface for typed annotation writer.
- *
- * <p>
- * Annotation compiler can generate a strongly typed annotation
- * writer to assist applications to write uses of annotations.
- * Such typed annotation writer interfaces all derive from
- * this common interface.
- *
- * <p>
- * The type parameter 'A' represents the
- * @author Kohsuke Kawaguchi
- */
-public interface JAnnotationWriter<A extends Annotation> {
- /**
- * Gets the underlying annotation use object to which we are writing.
- */
- JAnnotationUse getAnnotationUse();
-
- /**
- * The type of the annotation that this writer is writing.
- */
- Class<A> getAnnotationType();
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JAnonymousClass.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JAnonymousClass.java
deleted file mode 100644
index 82c19ffe..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JAnonymousClass.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-/**
- * Anonymous class quick hack.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-class JAnonymousClass extends JDefinedClass {
-
- /**
- * Base interface/class from which this anonymous class is built.
- */
- private final JClass base;
-
- JAnonymousClass( JClass _base) {
- super(_base.owner(), 0, null);
- this.base = _base;
- }
-
- @Override
- public String fullName() {
- return base.fullName();
- }
-
- @Override
- public void generate(JFormatter f) {
- f.t(base);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JArray.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JArray.java
deleted file mode 100644
index 08801c39..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JArray.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * array creation and initialization.
- */
-public final class JArray extends JExpressionImpl {
-
- private final JType type;
- private final JExpression size;
- private List<JExpression> exprs = null;
-
- /**
- * Add an element to the array initializer
- */
- public JArray add(JExpression e) {
- if (exprs == null)
- exprs = new ArrayList<JExpression>();
- exprs.add(e);
- return this;
- }
-
- JArray(JType type, JExpression size) {
- this.type = type;
- this.size = size;
- }
-
- public void generate(JFormatter f) {
-
- // generally we produce new T[x], but when T is an array type (T=T'[])
- // then new T'[][x] is wrong. It has to be new T'[x][].
- int arrayCount = 0;
- JType t = type;
-
- while( t.isArray() ) {
- t = t.elementType();
- arrayCount++;
- }
-
- f.p("new").g(t).p('[');
- if (size != null)
- f.g(size);
- f.p(']');
-
- for( int i=0; i<arrayCount; i++ )
- f.p("[]");
-
- if ((size == null) || (exprs != null))
- f.p('{');
- if (exprs != null) {
- f.g(exprs);
- } else {
- f.p(' ');
- }
- if ((size == null) || (exprs != null))
- f.p('}');
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JArrayClass.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JArrayClass.java
deleted file mode 100644
index d113f900..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JArrayClass.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.Iterator;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Array class.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-final class JArrayClass extends JClass {
-
- // array component type
- private final JType componentType;
-
-
- JArrayClass( JCodeModel owner, JType component ) {
- super(owner);
- this.componentType = component;
- }
-
-
- public String name() {
- return componentType.name()+"[]";
- }
-
- public String fullName() {
- return componentType.fullName()+"[]";
- }
-
- public String binaryName() {
- return componentType.binaryName()+"[]";
- }
-
- public void generate(JFormatter f) {
- f.g(componentType).p("[]");
- }
-
- public JPackage _package() {
- return owner().rootPackage();
- }
-
- public JClass _extends() {
- return owner().ref(Object.class);
- }
-
- public Iterator<JClass> _implements() {
- return Collections.<JClass>emptyList().iterator();
- }
-
- public boolean isInterface() {
- return false;
- }
-
- public boolean isAbstract() {
- return false;
- }
-
- public JType elementType() {
- return componentType;
- }
-
- public boolean isArray() {
- return true;
- }
-
-
- //
- // Equality is based on value
- //
-
- public boolean equals(Object obj) {
- if(!(obj instanceof JArrayClass)) return false;
-
- if( componentType.equals( ((JArrayClass)obj).componentType ) )
- return true;
-
- return false;
- }
-
- public int hashCode() {
- return componentType.hashCode();
- }
-
- protected JClass substituteParams(JTypeVar[] variables, List<JClass> bindings) {
- if( componentType.isPrimitive() )
- return this;
-
- JClass c = ((JClass)componentType).substituteParams(variables,bindings);
- if(c==componentType)
- return this;
-
- return new JArrayClass(owner(),c);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JArrayCompRef.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JArrayCompRef.java
deleted file mode 100644
index 4cc6aa72..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JArrayCompRef.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-/**
- * array component reference.
- */
-final class JArrayCompRef extends JExpressionImpl implements JAssignmentTarget {
- /**
- * JArray expression upon which this component will be accessed.
- */
- private final JExpression array;
-
- /**
- * Integer expression representing index of the component
- */
- private final JExpression index;
-
- /**
- * JArray component reference constructor given an array expression
- * and index.
- *
- * @param array
- * JExpression for the array upon which
- * the component will be accessed,
- *
- * @param index
- * JExpression for index of component to access
- */
- JArrayCompRef(JExpression array, JExpression index) {
- if ((array == null) || (index == null)) {
- throw new NullPointerException();
- }
- this.array = array;
- this.index = index;
- }
-
- public void generate(JFormatter f) {
- f.g(array).p('[').g(index).p(']');
- }
-
- public JExpression assign(JExpression rhs) {
- return JExpr.assign(this,rhs);
- }
- public JExpression assignPlus(JExpression rhs) {
- return JExpr.assignPlus(this,rhs);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JAssignment.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JAssignment.java
deleted file mode 100644
index 9124b1e6..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JAssignment.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * Assignment statements, which are also expressions.
- */
-public class JAssignment extends JExpressionImpl implements JStatement {
-
- JAssignmentTarget lhs;
- JExpression rhs;
- String op = "";
-
- JAssignment(JAssignmentTarget lhs, JExpression rhs) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- JAssignment(JAssignmentTarget lhs, JExpression rhs, String op) {
- this.lhs = lhs;
- this.rhs = rhs;
- this.op = op;
- }
-
- public void generate(JFormatter f) {
- f.g(lhs).p(op + '=').g(rhs);
- }
-
- public void state(JFormatter f) {
- f.g(this).p(';').nl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JAssignmentTarget.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JAssignmentTarget.java
deleted file mode 100644
index e0544273..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JAssignmentTarget.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * Marker interface for code components that can be placed to
- * the left of '=' in an assignment.
- *
- * A left hand value can always be a right hand value, so
- * this interface derives from {@link JExpression}.
- */
-public interface JAssignmentTarget extends JGenerable, JExpression {
- JExpression assign(JExpression rhs);
- JExpression assignPlus(JExpression rhs);
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JAtom.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JAtom.java
deleted file mode 100644
index 02c5c18a..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JAtom.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * JAtoms: Simple code components that merely generate themselves.
- */
-final class JAtom extends JExpressionImpl {
-
- private final String what;
-
- JAtom(String what) {
- this.what = what;
- }
-
- public void generate(JFormatter f) {
- f.p(what);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JBlock.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JBlock.java
deleted file mode 100644
index 72e8608e..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JBlock.java
+++ /dev/null
@@ -1,454 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Collections;
-
-/**
- * A block of Java code, which may contain statements and local declarations.
- *
- * <p>
- * {@link JBlock} contains a large number of factory methods that creates new
- * statements/declarations. Those newly created statements/declarations are
- * inserted into the {@link #pos() "current position"}. The position advances
- * one every time you add a new instruction.
- */
-public final class JBlock implements JGenerable, JStatement {
-
- /**
- * Declarations and statements contained in this block.
- * Either {@link JStatement} or {@link JDeclaration}.
- */
- private final List<Object> content = new ArrayList<Object>();
-
- /**
- * Whether or not this block must be braced and indented
- */
- private boolean bracesRequired = true;
- private boolean indentRequired = true;
-
- /**
- * Current position.
- */
- private int pos;
-
- public JBlock() {
- this(true,true);
- }
-
- public JBlock(boolean bracesRequired, boolean indentRequired) {
- this.bracesRequired = bracesRequired;
- this.indentRequired = indentRequired;
- }
-
- /**
- * Returns a read-only view of {@link JStatement}s and {@link JDeclaration}
- * in this block.
- */
- public List<Object> getContents() {
- return Collections.unmodifiableList(content);
- }
-
- private <T> T insert( T statementOrDeclaration ) {
- content.add(pos,statementOrDeclaration);
- pos++;
- return statementOrDeclaration;
- }
-
- /**
- * Gets the current position to which new statements will be inserted.
- *
- * For example if the value is 0, newly created instructions will be
- * inserted at the very beginning of the block.
- *
- * @see #pos(int)
- */
- public int pos() {
- return pos;
- }
-
- /**
- * Sets the current position.
- *
- * @return
- * the old value of the current position.
- * @throws IllegalArgumentException
- * if the new position value is illegal.
- *
- * @see #pos()
- */
- public int pos(int newPos) {
- int r = pos;
- if(newPos>content.size() || newPos<0)
- throw new IllegalArgumentException();
- pos = newPos;
-
- return r;
- }
-
- /**
- * Returns true if this block is empty and does not contain
- * any statement.
- */
- public boolean isEmpty() {
- return content.isEmpty();
- }
-
- /**
- * Adds a local variable declaration to this block
- *
- * @param type
- * JType of the variable
- *
- * @param name
- * Name of the variable
- *
- * @return Newly generated JVar
- */
- public JVar decl(JType type, String name) {
- return decl(JMod.NONE, type, name, null);
- }
-
- /**
- * Adds a local variable declaration to this block
- *
- * @param type
- * JType of the variable
- *
- * @param name
- * Name of the variable
- *
- * @param init
- * Initialization expression for this variable. May be null.
- *
- * @return Newly generated JVar
- */
- public JVar decl(JType type, String name, JExpression init) {
- return decl(JMod.NONE, type, name, init);
- }
-
- /**
- * Adds a local variable declaration to this block
- *
- * @param mods
- * Modifiers for the variable
- *
- * @param type
- * JType of the variable
- *
- * @param name
- * Name of the variable
- *
- * @param init
- * Initialization expression for this variable. May be null.
- *
- * @return Newly generated JVar
- */
- public JVar decl(int mods, JType type, String name, JExpression init) {
- JVar v = new JVar(JMods.forVar(mods), type, name, init);
- insert(v);
- bracesRequired = true;
- indentRequired = true;
- return v;
- }
-
- /**
- * Creates an assignment statement and adds it to this block.
- *
- * @param lhs
- * Assignable variable or field for left hand side of expression
- *
- * @param exp
- * Right hand side expression
- */
- public JBlock assign(JAssignmentTarget lhs, JExpression exp) {
- insert(new JAssignment(lhs, exp));
- return this;
- }
-
- public JBlock assignPlus(JAssignmentTarget lhs, JExpression exp) {
- insert(new JAssignment(lhs, exp, "+"));
- return this;
- }
-
- /**
- * Creates an invocation statement and adds it to this block.
- *
- * @param expr
- * JExpression evaluating to the class or object upon which
- * the named method will be invoked
- *
- * @param method
- * Name of method to invoke
- *
- * @return Newly generated JInvocation
- */
- public JInvocation invoke(JExpression expr, String method) {
- JInvocation i = new JInvocation(expr, method);
- insert(i);
- return i;
- }
-
- /**
- * Creates an invocation statement and adds it to this block.
- *
- * @param expr
- * JExpression evaluating to the class or object upon which
- * the method will be invoked
- *
- * @param method
- * JMethod to invoke
- *
- * @return Newly generated JInvocation
- */
- public JInvocation invoke(JExpression expr, JMethod method) {
- return insert(new JInvocation(expr, method));
- }
-
- /**
- * Creates a static invocation statement.
- */
- public JInvocation staticInvoke(JClass type, String method) {
- return insert(new JInvocation(type, method));
- }
-
- /**
- * Creates an invocation statement and adds it to this block.
- *
- * @param method
- * Name of method to invoke
- *
- * @return Newly generated JInvocation
- */
- public JInvocation invoke(String method) {
- return insert(new JInvocation((JExpression)null, method));
- }
-
- /**
- * Creates an invocation statement and adds it to this block.
- *
- * @param method
- * JMethod to invoke
- *
- * @return Newly generated JInvocation
- */
- public JInvocation invoke(JMethod method) {
- return insert(new JInvocation((JExpression)null, method));
- }
-
- /**
- * Adds a statement to this block
- *
- * @param s
- * JStatement to be added
- *
- * @return This block
- */
- public JBlock add(JStatement s) { // ## Needed?
- insert(s);
- return this;
- }
-
- /**
- * Create an If statement and add it to this block
- *
- * @param expr
- * JExpression to be tested to determine branching
- *
- * @return Newly generated conditional statement
- */
- public JConditional _if(JExpression expr) {
- return insert(new JConditional(expr));
- }
-
- /**
- * Create a For statement and add it to this block
- *
- * @return Newly generated For statement
- */
- public JForLoop _for() {
- return insert(new JForLoop());
- }
-
- /**
- * Create a While statement and add it to this block
- *
- * @return Newly generated While statement
- */
- public JWhileLoop _while(JExpression test) {
- return insert(new JWhileLoop(test));
- }
-
- /**
- * Create a switch/case statement and add it to this block
- */
- public JSwitch _switch(JExpression test) {
- return insert(new JSwitch(test));
- }
-
- /**
- * Create a Do statement and add it to this block
- *
- * @return Newly generated Do statement
- */
- public JDoLoop _do(JExpression test) {
- return insert(new JDoLoop(test));
- }
-
- /**
- * Create a Try statement and add it to this block
- *
- * @return Newly generated Try statement
- */
- public JTryBlock _try() {
- return insert(new JTryBlock());
- }
-
- /**
- * Create a return statement and add it to this block
- */
- public void _return() {
- insert(new JReturn(null));
- }
-
- /**
- * Create a return statement and add it to this block
- */
- public void _return(JExpression exp) {
- insert(new JReturn(exp));
- }
-
- /**
- * Create a throw statement and add it to this block
- */
- public void _throw(JExpression exp) {
- insert(new JThrow(exp));
- }
-
- /**
- * Create a break statement and add it to this block
- */
- public void _break() {
- _break(null);
- }
-
- public void _break(JLabel label) {
- insert(new JBreak(label));
- }
-
- /**
- * Create a label, which can be referenced from
- * <code>continue</code> and <code>break</code> statements.
- */
- public JLabel label(String name) {
- JLabel l = new JLabel(name);
- insert(l);
- return l;
- }
-
- /**
- * Create a continue statement and add it to this block
- */
- public void _continue(JLabel label) {
- insert(new JContinue(label));
- }
-
- public void _continue() {
- _continue(null);
- }
-
- /**
- * Create a sub-block and add it to this block
- */
- public JBlock block() {
- JBlock b = new JBlock();
- b.bracesRequired = false;
- b.indentRequired = false;
- return insert(b);
- }
-
- /**
- * Creates a "literal" statement directly.
- *
- * <p>
- * Specified string is printed as-is.
- * This is useful as a short-cut.
- *
- * <p>
- * For example, you can invoke this method as:
- * <code>directStatement("a=b+c;")</code>.
- */
- public JStatement directStatement(final String source) {
- JStatement s = new JStatement() {
- public void state(JFormatter f) {
- f.p(source).nl();
- }
- };
- add(s);
- return s;
- }
-
- public void generate(JFormatter f) {
- if (bracesRequired)
- f.p('{').nl();
- if (indentRequired)
- f.i();
- generateBody(f);
- if (indentRequired)
- f.o();
- if (bracesRequired)
- f.p('}');
- }
-
- void generateBody(JFormatter f) {
- for (Object o : content) {
- if (o instanceof JDeclaration)
- f.d((JDeclaration) o);
- else
- f.s((JStatement) o);
- }
- }
-
- /**
- * Creates an enhanced For statement based on j2se 1.5 JLS
- * and add it to this block
- *
- * @return Newly generated enhanced For statement per j2se 1.5
- * specification
- */
- public JForEach forEach(JType varType, String name, JExpression collection) {
- return insert(new JForEach( varType, name, collection));
-
- }
- public void state(JFormatter f) {
- f.g(this);
- if (bracesRequired)
- f.nl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JBreak.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JBreak.java
deleted file mode 100644
index ec5a01d7..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JBreak.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * JBreak statement
- */
-final class JBreak implements JStatement {
-
- private final JLabel label;
-
- /**
- * JBreak constructor
- *
- * @param _label
- * break label or null.
- */
- JBreak( JLabel _label ) {
- this.label = _label;
- }
-
- public void state(JFormatter f) {
- if( label==null )
- f.p("break;").nl();
- else
- f.p("break").p(label.label).p(';').nl();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JCase.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JCase.java
deleted file mode 100644
index 2c7c5a70..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JCase.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-/**
- * Case statement
- */
-public final class JCase implements JStatement {
-
- /**
- * label part of the case statement
- */
- private JExpression label;
-
- /**
- * JBlock of statements which makes up body of this While statement
- */
- private JBlock body = null;
-
- /**
- * is this a regular case statement or a default case statement?
- */
- private boolean isDefaultCase = false;
-
- /**
- * Construct a case statement
- */
- JCase(JExpression label) {
- this(label, false);
- }
-
- /**
- * Construct a case statement. If isDefaultCase is true, then
- * label should be null since default cases don't have a label.
- */
- JCase(JExpression label, boolean isDefaultCase) {
- this.label = label;
- this.isDefaultCase = isDefaultCase;
- }
-
- public JExpression label() {
- return label;
- }
-
- public JBlock body() {
- if (body == null) body=new JBlock( false, true );
- return body;
- }
-
- public void state(JFormatter f) {
- f.i();
- if( !isDefaultCase ) {
- f.p("case ").g(label).p(':').nl();
- } else {
- f.p("default:").nl();
- }
- if (body != null)
- f.s(body);
- f.o();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JCast.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JCast.java
deleted file mode 100644
index f705d492..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JCast.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-
-/**
- * A cast operation.
- */
-final class JCast extends JExpressionImpl {
- /**
- * JType to which the expression is to be cast.
- */
- private final JType type;
-
- /**
- * JExpression to be cast.
- */
- private final JExpression object;
-
- /**
- * JCast constructor
- *
- * @param type
- * JType to which the expression is cast
- *
- * @param object
- * JExpression for the object upon which
- * the cast is applied
- */
- JCast(JType type, JExpression object) {
- this.type = type;
- this.object = object;
- }
-
- public void generate(JFormatter f) {
- f.p("((").g(type).p(')').g(object).p(')');
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JCatchBlock.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JCatchBlock.java
deleted file mode 100644
index 04769197..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JCatchBlock.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * Catch block for a try/catch/finally statement
- */
-
-public class JCatchBlock implements JGenerable {
-
- JClass exception;
- private JVar var = null;
- private JBlock body = new JBlock();
-
- JCatchBlock(JClass exception) {
- this.exception = exception;
- }
-
- public JVar param(String name) {
- if (var != null) throw new IllegalStateException();
- var = new JVar(JMods.forVar(JMod.NONE), exception, name, null);
- return var;
- }
-
- public JBlock body() {
- return body;
- }
-
- public void generate(JFormatter f) {
- if (var == null)
- var = new JVar(JMods.forVar(JMod.NONE),
- exception, "_x", null);
- f.p("catch (").b(var).p(')').g(body);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JClass.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JClass.java
deleted file mode 100644
index cf033528..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JClass.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Represents a Java reference type, such as a class, an interface,
- * an enum, an array type, a parameterized type.
- *
- * <p>
- * To be exact, this object represents an "use" of a reference type,
- * not necessarily a declaration of it, which is modeled as {@link JDefinedClass}.
- */
-public abstract class JClass extends JType
-{
- protected JClass( JCodeModel _owner ) {
- this._owner = _owner;
- }
-
- /**
- * Gets the name of this class.
- *
- * @return
- * name of this class, without any qualification.
- * For example, this method returns "String" for
- * <code>java.lang.String</code>.
- */
- abstract public String name();
-
- /**
- * Gets the package to which this class belongs.
- * TODO: shall we move move this down?
- */
- abstract public JPackage _package();
-
- /**
- * Returns the class in which this class is nested, or <tt>null</tt> if
- * this is a top-level class.
- */
- public JClass outer() {
- return null;
- }
-
- private final JCodeModel _owner;
- /** Gets the JCodeModel object to which this object belongs. */
- public final JCodeModel owner() { return _owner; }
-
- /**
- * Gets the super class of this class.
- *
- * @return
- * Returns the JClass representing the superclass of the
- * entity (class or interface) represented by this {@link JClass}.
- * Even if no super class is given explicitly or this {@link JClass}
- * is not a class, this method still returns
- * {@link JClass} for {@link Object}.
- * If this JClass represents {@link Object}, return null.
- */
- abstract public JClass _extends();
-
- /**
- * Iterates all super interfaces directly implemented by
- * this class/interface.
- *
- * @return
- * A non-null valid iterator that iterates all
- * {@link JClass} objects that represents those interfaces
- * implemented by this object.
- */
- abstract public Iterator<JClass> _implements();
-
- /**
- * Iterates all the type parameters of this class/interface.
- *
- * <p>
- * For example, if this {@link JClass} represents
- * <code>Set&lt;T></code>, this method returns an array
- * that contains single {@link JTypeVar} for 'T'.
- */
- public JTypeVar[] typeParams() {
- return EMPTY_ARRAY;
- }
-
- /**
- * Sometimes useful reusable empty array.
- */
- protected static final JTypeVar[] EMPTY_ARRAY = new JTypeVar[0];
-
- /**
- * Checks if this object represents an interface.
- */
- abstract public boolean isInterface();
-
- /**
- * Checks if this class is an abstract class.
- */
- abstract public boolean isAbstract();
-
- /**
- * If this class represents one of the wrapper classes
- * defined in the java.lang package, return the corresponding
- * primitive type. Otherwise null.
- */
- public JPrimitiveType getPrimitiveType() { return null; }
-
- /**
- * @deprecated calling this method from {@link JClass}
- * would be meaningless, since it's always guaranteed to
- * return <tt>this</tt>.
- */
- public JClass boxify() { return this; }
-
- public JType unboxify() {
- JPrimitiveType pt = getPrimitiveType();
- return pt==null ? (JType)this : pt;
- }
-
- public JClass erasure() {
- return this;
- }
-
- /**
- * Checks the relationship between two classes.
- * <p>
- * This method works in the same way as {@link Class#isAssignableFrom(Class)}
- * works. For example, baseClass.isAssignableFrom(derivedClass)==true.
- */
- public final boolean isAssignableFrom( JClass derived ) {
- // to avoid the confusion, always use "this" explicitly in this method.
-
- // null can be assigned to any type.
- if( derived instanceof JNullType ) return true;
-
- if( this==derived ) return true;
-
- // the only class that is assignable from an interface is
- // java.lang.Object
- if( this==_package().owner().ref(Object.class) ) return true;
-
- JClass b = derived._extends();
- if( b!=null && this.isAssignableFrom(b) )
- return true;
-
- if( this.isInterface() ) {
- Iterator<JClass> itfs = derived._implements();
- while( itfs.hasNext() )
- if( this.isAssignableFrom(itfs.next()) )
- return true;
- }
-
- return false;
- }
-
- /**
- * Gets the parameterization of the given base type.
- *
- * <p>
- * For example, given the following
- * <pre><xmp>
- * interface Foo<T> extends List<List<T>> {}
- * interface Bar extends Foo<String> {}
- * </xmp></pre>
- * This method works like this:
- * <pre><xmp>
- * getBaseClass( Bar, List ) = List<List<String>
- * getBaseClass( Bar, Foo ) = Foo<String>
- * getBaseClass( Foo<? extends Number>, Collection ) = Collection<List<? extends Number>>
- * getBaseClass( ArrayList<? extends BigInteger>, List ) = List<? extends BigInteger>
- * </xmp></pre>
- *
- * @param baseType
- * The class whose parameterization we are interested in.
- * @return
- * The use of {@code baseType} in {@code this} type.
- * or null if the type is not assignable to the base type.
- */
- public final JClass getBaseClass( JClass baseType ) {
-
- if( this.erasure().equals(baseType) )
- return this;
-
- JClass b = _extends();
- if( b!=null ) {
- JClass bc = b.getBaseClass(baseType);
- if(bc!=null)
- return bc;
- }
-
- Iterator<JClass> itfs = _implements();
- while( itfs.hasNext() ) {
- JClass bc = itfs.next().getBaseClass(baseType);
- if(bc!=null)
- return bc;
- }
-
- return null;
- }
-
- public final JClass getBaseClass( Class<?> baseType ) {
- return getBaseClass(owner().ref(baseType));
- }
-
-
- private JClass arrayClass;
- public JClass array() {
- if(arrayClass==null)
- arrayClass = new JArrayClass(owner(),this);
- return arrayClass;
- }
-
- /**
- * "Narrows" a generic class to a concrete class by specifying
- * a type argument.
- *
- * <p>
- * <code>.narrow(X)</code> builds <code>Set&lt;X></code> from <code>Set</code>.
- */
- public JClass narrow( Class<?> clazz ) {
- return narrow(owner().ref(clazz));
- }
-
- public JClass narrow( Class<?>... clazz ) {
- JClass[] r = new JClass[clazz.length];
- for( int i=0; i<clazz.length; i++ )
- r[i] = owner().ref(clazz[i]);
- return narrow(r);
- }
-
- /**
- * "Narrows" a generic class to a concrete class by specifying
- * a type argument.
- *
- * <p>
- * <code>.narrow(X)</code> builds <code>Set&lt;X></code> from <code>Set</code>.
- */
- public JClass narrow( JClass clazz ) {
- return new JNarrowedClass(this,clazz);
- }
-
- public JClass narrow( JType type ) {
- return narrow(type.boxify());
- }
-
- public JClass narrow( JClass... clazz ) {
- return new JNarrowedClass(this,Arrays.asList(clazz.clone()));
- }
-
- public JClass narrow( List<? extends JClass> clazz ) {
- return new JNarrowedClass(this,new ArrayList<JClass>(clazz));
- }
-
- /**
- * If this class is parameterized, return the type parameter of the given index.
- */
- public List<JClass> getTypeParameters() {
- return Collections.emptyList();
- }
-
- /**
- * Returns true if this class is a parameterized class.
- */
- public final boolean isParameterized() {
- return erasure()!=this;
- }
-
- /**
- * Create "? extends T" from T.
- *
- * @return never null
- */
- public final JClass wildcard() {
- return new JTypeWildcard(this);
- }
-
- /**
- * Substitutes the type variables with their actual arguments.
- *
- * <p>
- * For example, when this class is Map&lt;String,Map&lt;V>>,
- * (where V then doing
- * substituteParams( V, Integer ) returns a {@link JClass}
- * for <code>Map&lt;String,Map&lt;Integer>></code>.
- *
- * <p>
- * This method needs to work recursively.
- */
- protected abstract JClass substituteParams( JTypeVar[] variables, List<JClass> bindings );
-
- public String toString() {
- return this.getClass().getName() + '(' + name() + ')';
- }
-
-
- public final JExpression dotclass() {
- return JExpr.dotclass(this);
- }
-
- /** Generates a static method invocation. */
- public final JInvocation staticInvoke(JMethod method) {
- return new JInvocation(this,method);
- }
-
- /** Generates a static method invocation. */
- public final JInvocation staticInvoke(String method) {
- return new JInvocation(this,method);
- }
-
- /** Static field reference. */
- public final JFieldRef staticRef(String field) {
- return new JFieldRef(this, field);
- }
-
- /** Static field reference. */
- public final JFieldRef staticRef(JVar field) {
- return new JFieldRef(this, field);
- }
-
- public void generate(JFormatter f) {
- f.t(this);
- }
-
- /**
- * Prints the class name in javadoc @link format.
- */
- void printLink(JFormatter f) {
- f.p("{@link ").g(this).p('}');
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JClassAlreadyExistsException.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JClassAlreadyExistsException.java
deleted file mode 100644
index cb1140fe..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JClassAlreadyExistsException.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-/**
- * Indicates that the class is already created.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class JClassAlreadyExistsException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- private final JDefinedClass existing;
-
- public JClassAlreadyExistsException( JDefinedClass _existing ) {
- this.existing = _existing;
- }
-
- /**
- * Gets a reference to the existing {@link JDefinedClass}.
- *
- * @return
- * This method always return non-null valid object.
- */
- public JDefinedClass getExistingClass() {
- return existing;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JClassContainer.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JClassContainer.java
deleted file mode 100644
index 8cdb30b5..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JClassContainer.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.Iterator;
-
-/**
- * The common aspect of a package and a class.
- */
-public interface JClassContainer {
-
- /**
- * Returns true if the container is a class.
- */
- boolean isClass();
- /**
- * Returns true if the container is a package.
- */
- boolean isPackage();
-
- /**
- * Add a new class to this package/class.
- *
- * @param mods
- * Modifiers for this class declaration
- *
- * @param name
- * Name of class to be added to this package
- *
- * @return Newly generated class
- *
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
- */
- JDefinedClass _class(int mods, String name) throws JClassAlreadyExistsException;
-
- /**
- * Add a new public class to this class/package.
- *
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
- */
- public JDefinedClass _class(String name) throws JClassAlreadyExistsException;
-
- /**
- * Add an interface to this class/package.
- *
- * @param mods
- * Modifiers for this interface declaration
- *
- * @param name
- * Name of interface to be added to this package
- *
- * @return Newly generated interface
- *
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
- */
- public JDefinedClass _interface(int mods, String name) throws JClassAlreadyExistsException;
-
- /**
- * Adds a public interface to this package.
- *
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
- */
- public JDefinedClass _interface(String name) throws JClassAlreadyExistsException;
-
- /**
- * Create a new class or a new interface.
- *
- * @deprecated
- * use {@link #_class(int, String, ClassType)}
- */
- public JDefinedClass _class(int mods, String name, boolean isInterface )
- throws JClassAlreadyExistsException;
-
- /**
- * Creates a new class/enum/interface/annotation.
- */
- public JDefinedClass _class(int mods, String name, ClassType kind )
- throws JClassAlreadyExistsException;
-
-
- /**
- * Returns an iterator that walks the nested classes defined in this
- * class.
- */
- public Iterator<JDefinedClass> classes();
-
- /**
- * Parent JClassContainer.
- *
- * If this is a package, this method returns a parent package,
- * or null if this package is the root package.
- *
- * If this is an outer-most class, this method returns a package
- * to which it belongs.
- *
- * If this is an inner class, this method returns the outer
- * class.
- */
- public JClassContainer parentContainer();
-
- /**
- * Gets the nearest package parent.
- *
- * <p>
- * If <tt>this.isPackage()</tt>, then return <tt>this</tt>.
- */
- public JPackage getPackage();
-
- /**
- * Get the root code model object.
- */
- public JCodeModel owner();
-
- /**
- * Add an annotationType Declaration to this package
- * @param name
- * Name of the annotation Type declaration to be added to this package
- * @return
- * newly created Annotation Type Declaration
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
-
- */
- public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException;
-
- /**
- * Add a public enum to this package
- * @param name
- * Name of the enum to be added to this package
- * @return
- * newly created Enum
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
-
- */
- public JDefinedClass _enum (String name) throws JClassAlreadyExistsException;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JCodeModel.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JCodeModel.java
deleted file mode 100644
index c08016fe..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JCodeModel.java
+++ /dev/null
@@ -1,667 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import com.sun.codemodel.internal.writer.FileCodeWriter;
-import com.sun.codemodel.internal.writer.ProgressCodeWriter;
-
-
-/**
- * Root of the code DOM.
- *
- * <p>
- * Here's your typical CodeModel application.
- *
- * <pre>
- * JCodeModel cm = new JCodeModel();
- *
- * // generate source code by populating the 'cm' tree.
- * cm._class(...);
- * ...
- *
- * // write them out
- * cm.build(new File("."));
- * </pre>
- *
- * <p>
- * Every CodeModel node is always owned by one {@link JCodeModel} object
- * at any given time (which can be often accesesd by the <tt>owner()</tt> method.)
- *
- * As such, when you generate Java code, most of the operation works
- * in a top-down fashion. For example, you create a class from {@link JCodeModel},
- * which gives you a {@link JDefinedClass}. Then you invoke a method on it
- * to generate a new method, which gives you {@link JMethod}, and so on.
- *
- * There are a few exceptions to this, most notably building {@link JExpression}s,
- * but generally you work with CodeModel in a top-down fashion.
- *
- * Because of this design, most of the CodeModel classes aren't directly instanciable.
- *
- *
- * <h2>Where to go from here?</h2>
- * <p>
- * Most of the time you'd want to populate new type definitions in a {@link JCodeModel}.
- * See {@link #_class(String, ClassType)}.
- */
-public final class JCodeModel {
-
- /** The packages that this JCodeWriter contains. */
- private HashMap<String,JPackage> packages = new HashMap<String,JPackage>();
-
- /** All JReferencedClasses are pooled here. */
- private final HashMap<Class<?>,JReferencedClass> refClasses = new HashMap<Class<?>,JReferencedClass>();
-
-
- /** Obtains a reference to the special "null" type. */
- public final JNullType NULL = new JNullType(this);
- // primitive types
- public final JPrimitiveType VOID = new JPrimitiveType(this,"void", Void.class);
- public final JPrimitiveType BOOLEAN = new JPrimitiveType(this,"boolean",Boolean.class);
- public final JPrimitiveType BYTE = new JPrimitiveType(this,"byte", Byte.class);
- public final JPrimitiveType SHORT = new JPrimitiveType(this,"short", Short.class);
- public final JPrimitiveType CHAR = new JPrimitiveType(this,"char", Character.class);
- public final JPrimitiveType INT = new JPrimitiveType(this,"int", Integer.class);
- public final JPrimitiveType FLOAT = new JPrimitiveType(this,"float", Float.class);
- public final JPrimitiveType LONG = new JPrimitiveType(this,"long", Long.class);
- public final JPrimitiveType DOUBLE = new JPrimitiveType(this,"double", Double.class);
-
- /**
- * If the flag is true, we will consider two classes "Foo" and "foo"
- * as a collision.
- */
- protected static final boolean isCaseSensitiveFileSystem = getFileSystemCaseSensitivity();
-
- private static boolean getFileSystemCaseSensitivity() {
- try {
- // let the system property override, in case the user really
- // wants to override.
- if( System.getProperty("com.sun.codemodel.internal.FileSystemCaseSensitive")!=null )
- return true;
- } catch( Exception e ) {}
-
- // on Unix, it's case sensitive.
- return (File.separatorChar == '/');
- }
-
-
- public JCodeModel() {}
-
- /**
- * Add a package to the list of packages to be generated
- *
- * @param name
- * Name of the package. Use "" to indicate the root package.
- *
- * @return Newly generated package
- */
- public JPackage _package(String name) {
- JPackage p = packages.get(name);
- if (p == null) {
- p = new JPackage(name, this);
- packages.put(name, p);
- }
- return p;
- }
-
- public final JPackage rootPackage() {
- return _package("");
- }
-
- /**
- * Returns an iterator that walks the packages defined using this code
- * writer.
- */
- public Iterator<JPackage> packages() {
- return packages.values().iterator();
- }
-
- /**
- * Creates a new generated class.
- *
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
- */
- public JDefinedClass _class(String fullyqualifiedName) throws JClassAlreadyExistsException {
- return _class(fullyqualifiedName,ClassType.CLASS);
- }
-
- /**
- * Creates a dummy, unknown {@link JClass} that represents a given name.
- *
- * <p>
- * This method is useful when the code generation needs to include the user-specified
- * class that may or may not exist, and only thing known about it is a class name.
- */
- public JClass directClass(String name) {
- return new JDirectClass(this,name);
- }
-
- /**
- * Creates a new generated class.
- *
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
- */
- public JDefinedClass _class(int mods, String fullyqualifiedName,ClassType t) throws JClassAlreadyExistsException {
- int idx = fullyqualifiedName.lastIndexOf('.');
- if( idx<0 ) return rootPackage()._class(fullyqualifiedName);
- else
- return _package(fullyqualifiedName.substring(0,idx))
- ._class(mods, fullyqualifiedName.substring(idx+1), t );
- }
-
- /**
- * Creates a new generated class.
- *
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
- */
- public JDefinedClass _class(String fullyqualifiedName,ClassType t) throws JClassAlreadyExistsException {
- return _class( JMod.PUBLIC, fullyqualifiedName, t );
- }
-
- /**
- * Gets a reference to the already created generated class.
- *
- * @return null
- * If the class is not yet created.
- * @see JPackage#_getClass(String)
- */
- public JDefinedClass _getClass(String fullyQualifiedName) {
- int idx = fullyQualifiedName.lastIndexOf('.');
- if( idx<0 ) return rootPackage()._getClass(fullyQualifiedName);
- else
- return _package(fullyQualifiedName.substring(0,idx))
- ._getClass( fullyQualifiedName.substring(idx+1) );
- }
-
- /**
- * Creates a new anonymous class.
- *
- * @deprecated
- * The naming convention doesn't match the rest of the CodeModel.
- * Use {@link #anonymousClass(JClass)} instead.
- */
- public JDefinedClass newAnonymousClass(JClass baseType) {
- return new JAnonymousClass(baseType);
- }
-
- /**
- * Creates a new anonymous class.
- */
- public JDefinedClass anonymousClass(JClass baseType) {
- return new JAnonymousClass(baseType);
- }
-
- public JDefinedClass anonymousClass(Class<?> baseType) {
- return anonymousClass(ref(baseType));
- }
-
- /**
- * Generates Java source code.
- * A convenience method for <code>build(destDir,destDir,System.out)</code>.
- *
- * @param destDir
- * source files are generated into this directory.
- * @param status
- * if non-null, progress indication will be sent to this stream.
- */
- public void build( File destDir, PrintStream status ) throws IOException {
- build(destDir,destDir,status);
- }
-
- /**
- * Generates Java source code.
- * A convenience method that calls {@link #build(CodeWriter,CodeWriter)}.
- *
- * @param srcDir
- * Java source files are generated into this directory.
- * @param resourceDir
- * Other resource files are generated into this directory.
- * @param status
- * if non-null, progress indication will be sent to this stream.
- */
- public void build( File srcDir, File resourceDir, PrintStream status ) throws IOException {
- CodeWriter src = new FileCodeWriter(srcDir);
- CodeWriter res = new FileCodeWriter(resourceDir);
- if(status!=null) {
- src = new ProgressCodeWriter(src, status );
- res = new ProgressCodeWriter(res, status );
- }
- build(src,res);
- }
-
- /**
- * A convenience method for <code>build(destDir,System.out)</code>.
- */
- public void build( File destDir ) throws IOException {
- build(destDir,System.out);
- }
-
- /**
- * A convenience method for <code>build(srcDir,resourceDir,System.out)</code>.
- */
- public void build( File srcDir, File resourceDir ) throws IOException {
- build(srcDir,resourceDir,System.out);
- }
-
- /**
- * A convenience method for <code>build(out,out)</code>.
- */
- public void build( CodeWriter out ) throws IOException {
- build(out,out);
- }
-
- /**
- * Generates Java source code.
- */
- public void build( CodeWriter source, CodeWriter resource ) throws IOException {
- JPackage[] pkgs = packages.values().toArray(new JPackage[packages.size()]);
- // avoid concurrent modification exception
- for( JPackage pkg : pkgs )
- pkg.build(source,resource);
- source.close();
- resource.close();
- }
-
- /**
- * Returns the number of files to be generated if
- * {@link #build} is invoked now.
- */
- public int countArtifacts() {
- int r = 0;
- JPackage[] pkgs = packages.values().toArray(new JPackage[packages.size()]);
- // avoid concurrent modification exception
- for( JPackage pkg : pkgs )
- r += pkg.countArtifacts();
- return r;
- }
-
-
- /**
- * Obtains a reference to an existing class from its Class object.
- *
- * <p>
- * The parameter may not be primitive.
- *
- * @see #_ref(Class) for the version that handles more cases.
- */
- public JClass ref(Class<?> clazz) {
- JReferencedClass jrc = (JReferencedClass)refClasses.get(clazz);
- if (jrc == null) {
- if (clazz.isPrimitive())
- throw new IllegalArgumentException(clazz+" is a primitive");
- if (clazz.isArray()) {
- return new JArrayClass(this, _ref(clazz.getComponentType()));
- } else {
- jrc = new JReferencedClass(clazz);
- refClasses.put(clazz, jrc);
- }
- }
- return jrc;
- }
-
- public JType _ref(Class<?> c) {
- if(c.isPrimitive())
- return JType.parse(this,c.getName());
- else
- return ref(c);
- }
-
- /**
- * Obtains a reference to an existing class from its fully-qualified
- * class name.
- *
- * <p>
- * First, this method attempts to load the class of the given name.
- * If that fails, we assume that the class is derived straight from
- * {@link Object}, and return a {@link JClass}.
- */
- public JClass ref(String fullyQualifiedClassName) {
- try {
- // try the context class loader first
- return ref(SecureLoader.getContextClassLoader().loadClass(fullyQualifiedClassName));
- } catch (ClassNotFoundException e) {
- // fall through
- }
- // then the default mechanism.
- try {
- return ref(Class.forName(fullyQualifiedClassName));
- } catch (ClassNotFoundException e1) {
- // fall through
- }
-
- // assume it's not visible to us.
- return new JDirectClass(this,fullyQualifiedClassName);
- }
-
- /**
- * Cached for {@link #wildcard()}.
- */
- private JClass wildcard;
-
- /**
- * Gets a {@link JClass} representation for "?",
- * which is equivalent to "? extends Object".
- */
- public JClass wildcard() {
- if(wildcard==null)
- wildcard = ref(Object.class).wildcard();
- return wildcard;
- }
-
- /**
- * Obtains a type object from a type name.
- *
- * <p>
- * This method handles primitive types, arrays, and existing {@link Class}es.
- *
- * @exception ClassNotFoundException
- * If the specified type is not found.
- */
- public JType parseType(String name) throws ClassNotFoundException {
- // array
- if(name.endsWith("[]"))
- return parseType(name.substring(0,name.length()-2)).array();
-
- // try primitive type
- try {
- return JType.parse(this,name);
- } catch (IllegalArgumentException e) {
- ;
- }
-
- // existing class
- return new TypeNameParser(name).parseTypeName();
- }
-
- private final class TypeNameParser {
- private final String s;
- private int idx;
-
- public TypeNameParser(String s) {
- this.s = s;
- }
-
- /**
- * Parses a type name token T (which can be potentially of the form Tr&ly;T1,T2,...>,
- * or "? extends/super T".)
- *
- * @return the index of the character next to T.
- */
- JClass parseTypeName() throws ClassNotFoundException {
- int start = idx;
-
- if(s.charAt(idx)=='?') {
- // wildcard
- idx++;
- ws();
- String head = s.substring(idx);
- if(head.startsWith("extends")) {
- idx+=7;
- ws();
- return parseTypeName().wildcard();
- } else
- if(head.startsWith("super")) {
- throw new UnsupportedOperationException("? super T not implemented");
- } else {
- // not supported
- throw new IllegalArgumentException("only extends/super can follow ?, but found "+s.substring(idx));
- }
- }
-
- while(idx<s.length()) {
- char ch = s.charAt(idx);
- if(Character.isJavaIdentifierStart(ch)
- || Character.isJavaIdentifierPart(ch)
- || ch=='.')
- idx++;
- else
- break;
- }
-
- JClass clazz = ref(s.substring(start,idx));
-
- return parseSuffix(clazz);
- }
-
- /**
- * Parses additional left-associative suffixes, like type arguments
- * and array specifiers.
- */
- private JClass parseSuffix(JClass clazz) throws ClassNotFoundException {
- if(idx==s.length())
- return clazz; // hit EOL
-
- char ch = s.charAt(idx);
-
- if(ch=='<')
- return parseSuffix(parseArguments(clazz));
-
- if(ch=='[') {
- if(s.charAt(idx+1)==']') {
- idx+=2;
- return parseSuffix(clazz.array());
- }
- throw new IllegalArgumentException("Expected ']' but found "+s.substring(idx+1));
- }
-
- return clazz;
- }
-
- /**
- * Skips whitespaces
- */
- private void ws() {
- while(Character.isWhitespace(s.charAt(idx)) && idx<s.length())
- idx++;
- }
-
- /**
- * Parses '&lt;T1,T2,...,Tn>'
- *
- * @return the index of the character next to '>'
- */
- private JClass parseArguments(JClass rawType) throws ClassNotFoundException {
- if(s.charAt(idx)!='<')
- throw new IllegalArgumentException();
- idx++;
-
- List<JClass> args = new ArrayList<JClass>();
-
- while(true) {
- args.add(parseTypeName());
- if(idx==s.length())
- throw new IllegalArgumentException("Missing '>' in "+s);
- char ch = s.charAt(idx);
- if(ch=='>')
- return rawType.narrow(args.toArray(new JClass[args.size()]));
-
- if(ch!=',')
- throw new IllegalArgumentException(s);
- idx++;
- }
-
- }
- }
-
- /**
- * References to existing classes.
- *
- * <p>
- * JReferencedClass is kept in a pool so that they are shared.
- * There is one pool for each JCodeModel object.
- *
- * <p>
- * It is impossible to cache JReferencedClass globally only because
- * there is the _package() method, which obtains the owner JPackage
- * object, which is scoped to JCodeModel.
- */
- private class JReferencedClass extends JClass implements JDeclaration {
- private final Class<?> _class;
-
- JReferencedClass(Class<?> _clazz) {
- super(JCodeModel.this);
- this._class = _clazz;
- assert !_class.isArray();
- }
-
- public String name() {
- return _class.getSimpleName().replace('$','.');
- }
-
- public String fullName() {
- return _class.getName().replace('$','.');
- }
-
- public String binaryName() {
- return _class.getName();
- }
-
- public JClass outer() {
- Class<?> p = _class.getDeclaringClass();
- if(p==null) return null;
- return ref(p);
- }
-
- public JPackage _package() {
- String name = fullName();
-
- // this type is array
- if (name.indexOf('[') != -1)
- return JCodeModel.this._package("");
-
- // other normal case
- int idx = name.lastIndexOf('.');
- if (idx < 0)
- return JCodeModel.this._package("");
- else
- return JCodeModel.this._package(name.substring(0, idx));
- }
-
- public JClass _extends() {
- Class<?> sp = _class.getSuperclass();
- if (sp == null) {
- if(isInterface())
- return owner().ref(Object.class);
- return null;
- } else
- return ref(sp);
- }
-
- public Iterator<JClass> _implements() {
- final Class<?>[] interfaces = _class.getInterfaces();
- return new Iterator<JClass>() {
- private int idx = 0;
- public boolean hasNext() {
- return idx < interfaces.length;
- }
- public JClass next() {
- return JCodeModel.this.ref(interfaces[idx++]);
- }
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
-
- public boolean isInterface() {
- return _class.isInterface();
- }
-
- public boolean isAbstract() {
- return Modifier.isAbstract(_class.getModifiers());
- }
-
- public JPrimitiveType getPrimitiveType() {
- Class<?> v = boxToPrimitive.get(_class);
- if(v!=null)
- return JType.parse(JCodeModel.this,v.getName());
- else
- return null;
- }
-
- public boolean isArray() {
- return false;
- }
-
- public void declare(JFormatter f) {
- }
-
- public JTypeVar[] typeParams() {
- // TODO: does JDK 1.5 reflection provides these information?
- return super.typeParams();
- }
-
- protected JClass substituteParams(JTypeVar[] variables, List<JClass> bindings) {
- // TODO: does JDK 1.5 reflection provides these information?
- return this;
- }
- }
-
- /**
- * Conversion from primitive type {@link Class} (such as {@link Integer#TYPE}
- * to its boxed type (such as <tt>Integer.class</tt>)
- */
- public static final Map<Class<?>,Class<?>> primitiveToBox;
- /**
- * The reverse look up for {@link #primitiveToBox}
- */
- public static final Map<Class<?>,Class<?>> boxToPrimitive;
-
- static {
- Map<Class<?>,Class<?>> m1 = new HashMap<Class<?>,Class<?>>();
- Map<Class<?>,Class<?>> m2 = new HashMap<Class<?>,Class<?>>();
-
- m1.put(Boolean.class,Boolean.TYPE);
- m1.put(Byte.class,Byte.TYPE);
- m1.put(Character.class,Character.TYPE);
- m1.put(Double.class,Double.TYPE);
- m1.put(Float.class,Float.TYPE);
- m1.put(Integer.class,Integer.TYPE);
- m1.put(Long.class,Long.TYPE);
- m1.put(Short.class,Short.TYPE);
- m1.put(Void.class,Void.TYPE);
-
- for (Map.Entry<Class<?>, Class<?>> e : m1.entrySet())
- m2.put(e.getValue(),e.getKey());
-
- boxToPrimitive = Collections.unmodifiableMap(m1);
- primitiveToBox = Collections.unmodifiableMap(m2);
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JCommentPart.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JCommentPart.java
deleted file mode 100644
index 7bb44ed4..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JCommentPart.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-/**
- * A part is a part of a javadoc comment, and it is a list of values.
- *
- * <p>
- * A part can contain a free-form text. This text is modeled as a collection of 'values'
- * in this class. A value can be a {@link JType} (which will be prinited with a @link tag),
- * anything that can be turned into a {@link String} via the {@link Object#toString()} method,
- * or a {@link Collection}/array of those objects.
- *
- * <p>
- * Values can be added through the various append methods one by one or in a bulk.
- *
- * @author Kohsuke Kawaguchi
- */
-public class JCommentPart extends ArrayList<Object> {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Appends a new value.
- *
- * If the value is {@link JType} it will be printed as a @link tag.
- * Otherwise it will be converted to String via {@link Object#toString()}.
- */
- public JCommentPart append(Object o) {
- add(o);
- return this;
- }
-
- public boolean add(Object o) {
- flattenAppend(o);
- return true;
- }
-
- private void flattenAppend(Object value) {
- if(value==null) return;
- if(value instanceof Object[]) {
- for( Object o : (Object[])value)
- flattenAppend(o);
- } else
- if(value instanceof Collection<?>) {
- for( Object o : (Collection<?>)value)
- flattenAppend(o);
- } else
- super.add(value);
- }
-
- /**
- * Writes this part into the formatter by using the specified indentation.
- */
- protected void format( JFormatter f, String indent ) {
- if(!f.isPrinting()) {
- // quickly pass the types to JFormatter, as that's all we care.
- // we don't need to worry about the exact formatting of text.
- for( Object o : this )
- if(o instanceof JClass)
- f.g((JClass)o);
- return;
- }
-
- if(!isEmpty())
- f.p(indent);
-
- Iterator<Object> itr = iterator();
- while(itr.hasNext()) {
- Object o = itr.next();
-
- if(o instanceof String) {
- int idx;
- String s = (String)o;
- while( (idx=s.indexOf('\n'))!=-1 ) {
- String line = s.substring(0,idx);
- if(line.length()>0)
- f.p(escape(line));
- s = s.substring(idx+1);
- f.nl().p(indent);
- }
- if(s.length()!=0)
- f.p(escape(s));
- } else
- if(o instanceof JClass) {
- // TODO: this doesn't print the parameterized type properly
- ((JClass)o).printLink(f);
- } else
- if(o instanceof JType) {
- f.g((JType)o);
- } else
- throw new IllegalStateException();
- }
-
- if(!isEmpty())
- f.nl();
- }
-
- /**
- * Escapes the appearance of the comment terminator.
- */
- private String escape(String s) {
- while(true) {
- int idx = s.indexOf("*/");
- if(idx <0) return s;
-
- s = s.substring(0,idx+1)+"<!---->"+s.substring(idx+1);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JConditional.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JConditional.java
deleted file mode 100644
index a4f1b028..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JConditional.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-/**
- * If statement, with optional else clause
- */
-
-public class JConditional implements JStatement {
-
- /**
- * JExpression to test to determine branching
- */
- private JExpression test = null;
-
- /**
- * JBlock of statements for "then" clause
- */
- private JBlock _then = new JBlock();
-
- /**
- * JBlock of statements for optional "else" clause
- */
- private JBlock _else = null;
-
- /**
- * Constructor
- *
- * @param test
- * JExpression which will determine branching
- */
- JConditional(JExpression test) {
- this.test = test;
- }
-
- /**
- * Return the block to be excuted by the "then" branch
- *
- * @return Then block
- */
- public JBlock _then() {
- return _then;
- }
-
- /**
- * Create a block to be executed by "else" branch
- *
- * @return Newly generated else block
- */
- public JBlock _else() {
- if (_else == null) _else = new JBlock();
- return _else;
- }
-
- /**
- * Creates <tt>... else if(...) ...</tt> code.
- */
- public JConditional _elseif(JExpression boolExp) {
- return _else()._if(boolExp);
- }
-
- public void state(JFormatter f) {
- if(test==JExpr.TRUE) {
- _then.generateBody(f);
- return;
- }
- if(test==JExpr.FALSE) {
- _else.generateBody(f);
- return;
- }
-
- if (JOp.hasTopOp(test)) {
- f.p("if ").g(test);
- } else {
- f.p("if (").g(test).p(')');
- }
- f.g(_then);
- if (_else != null)
- f.p("else").g(_else);
- f.nl();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JContinue.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JContinue.java
deleted file mode 100644
index 7d22e56d..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JContinue.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * JContinue statement
- */
-class JContinue implements JStatement {
-
- private final JLabel label;
-
- /**
- * JContinue constructor.
- *
- * @param _label
- * a valid label or null.
- */
- JContinue(JLabel _label) {
- this.label = _label;
- }
-
- public void state(JFormatter f) {
- if( label==null )
- f.p("continue;").nl();
- else
- f.p("continue").p(label.label).p(';').nl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JDeclaration.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JDeclaration.java
deleted file mode 100644
index c438442e..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JDeclaration.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * Common interface for code components that can generate declarations
- * of themselves.
- */
-
-public interface JDeclaration {
-
- public void declare(JFormatter f);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JDefinedClass.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JDefinedClass.java
deleted file mode 100644
index cd891062..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JDefinedClass.java
+++ /dev/null
@@ -1,898 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-/**
- * A generated Java class/interface/enum/....
- *
- * <p>
- * This class models a declaration, and since a declaration can be always
- * used as a reference, it inherits {@link JClass}.
- *
- * <h2>Where to go from here?</h2>
- * <p>
- * You'd want to generate fields and methods on a class.
- * See {@link #method(int, JType, String)} and {@link #field(int, JType, String)}.
- */
-public class JDefinedClass
- extends JClass
- implements JDeclaration, JClassContainer, JGenerifiable, JAnnotatable, JDocCommentable {
-
- /** Name of this class. Null if anonymous. */
- private String name = null;
-
- /** Modifiers for the class declaration */
- private JMods mods;
-
- /** Name of the super class of this class. */
- private JClass superClass;
-
- /** List of interfaces that this class implements */
- private final Set<JClass> interfaces = new TreeSet<JClass>();
-
- /** Fields keyed by their names. */
- /*package*/ final Map<String,JFieldVar> fields = new LinkedHashMap<String,JFieldVar>();
-
- /** Static initializer, if this class has one */
- private JBlock init = null;
-
- /** class javadoc */
- private JDocComment jdoc = null;
-
- /** Set of constructors for this class, if any */
- private final List<JMethod> constructors = new ArrayList<JMethod>();
-
- /** Set of methods that are members of this class */
- private final List<JMethod> methods = new ArrayList<JMethod>();
-
- /**
- * Nested classes as a map from name to JDefinedClass.
- * The name is all capitalized in a case sensitive file system
- * ({@link JCodeModel#isCaseSensitiveFileSystem}) to avoid conflicts.
- *
- * Lazily created to save footprint.
- *
- * @see #getClasses()
- */
- private Map<String,JDefinedClass> classes;
-
-
- /**
- * Flag that controls whether this class should be really generated or not.
- *
- * Sometimes it is useful to generate code that refers to class X,
- * without actually generating the code of X.
- * This flag is used to surpress X.java file in the output.
- */
- private boolean hideFile = false;
-
- /**
- * Client-app spcific metadata associated with this user-created class.
- */
- public Object metadata;
-
- /**
- * String that will be put directly inside the generated code.
- * Can be null.
- */
- private String directBlock;
-
- /**
- * If this is a package-member class, this is {@link JPackage}.
- * If this is a nested class, this is {@link JDefinedClass}.
- * If this is an anonymous class, this constructor shouldn't be used.
- */
- private JClassContainer outer = null;
-
-
- /** Default value is class or interface
- * or annotationTypeDeclaration
- * or enum
- *
- */
- private final ClassType classType;
-
- /** List containing the enum value declarations
- *
- */
-// private List enumValues = new ArrayList();
-
- /**
- * Set of enum constants that are keyed by names.
- * In Java, enum constant order is actually significant,
- * because of order ID they get. So let's preserve the order.
- */
- private final Map<String,JEnumConstant> enumConstantsByName = new LinkedHashMap<String,JEnumConstant>();
-
- /**
- * Annotations on this variable. Lazily created.
- */
- private List<JAnnotationUse> annotations = null;
-
-
- /**
- * Helper class to implement {@link JGenerifiable}.
- */
- private final JGenerifiableImpl generifiable = new JGenerifiableImpl() {
- protected JCodeModel owner() {
- return JDefinedClass.this.owner();
- }
- };
-
- JDefinedClass(JClassContainer parent, int mods, String name, ClassType classTypeval) {
- this(mods, name, parent, parent.owner(), classTypeval);
- }
-
- /**
- * Constructor for creating anonymous inner class.
- */
- JDefinedClass(
- JCodeModel owner,
- int mods,
- String name) {
- this(mods, name, null, owner);
- }
-
- private JDefinedClass(
- int mods,
- String name,
- JClassContainer parent,
- JCodeModel owner) {
- this (mods,name,parent,owner,ClassType.CLASS);
- }
-
- /**
- * JClass constructor
- *
- * @param mods
- * Modifiers for this class declaration
- *
- * @param name
- * Name of this class
- */
- private JDefinedClass(
- int mods,
- String name,
- JClassContainer parent,
- JCodeModel owner,
- ClassType classTypeVal) {
- super(owner);
-
- if(name!=null) {
- if (name.trim().length() == 0)
- throw new IllegalArgumentException("JClass name empty");
-
- if (!Character.isJavaIdentifierStart(name.charAt(0))) {
- String msg =
- "JClass name "
- + name
- + " contains illegal character"
- + " for beginning of identifier: "
- + name.charAt(0);
- throw new IllegalArgumentException(msg);
- }
- for (int i = 1; i < name.length(); i++) {
- if (!Character.isJavaIdentifierPart(name.charAt(i))) {
- String msg =
- "JClass name "
- + name
- + " contains illegal character "
- + name.charAt(i);
- throw new IllegalArgumentException(msg);
- }
- }
- }
-
- this.classType = classTypeVal;
- if (isInterface())
- this.mods = JMods.forInterface(mods);
- else
- this.mods = JMods.forClass(mods);
-
- this.name = name;
-
- this.outer = parent;
- }
-
- /**
- * Returns true if this is an anonymous class.
- */
- public final boolean isAnonymous() {
- return name == null;
- }
-
- /**
- * This class extends the specifed class.
- *
- * @param superClass
- * Superclass for this class
- *
- * @return This class
- */
- public JDefinedClass _extends(JClass superClass) {
- if (this.classType==ClassType.INTERFACE)
- if(superClass.isInterface()){
- return this._implements(superClass);
- } else throw new IllegalArgumentException("unable to set the super class for an interface");
- if (superClass == null)
- throw new NullPointerException();
-
- for( JClass o=superClass.outer(); o!=null; o=o.outer() ){
- if(this==o){
- throw new IllegalArgumentException("Illegal class inheritance loop." +
- " Outer class " + this.name + " may not subclass from inner class: " + o.name());
- }
- }
-
- this.superClass = superClass;
- return this;
- }
-
- public JDefinedClass _extends(Class<?> superClass) {
- return _extends(owner().ref(superClass));
- }
-
- /**
- * Returns the class extended by this class.
- */
- public JClass _extends() {
- if(superClass==null)
- superClass = owner().ref(Object.class);
- return superClass;
- }
-
- /**
- * This class implements the specifed interface.
- *
- * @param iface
- * Interface that this class implements
- *
- * @return This class
- */
- public JDefinedClass _implements(JClass iface) {
- interfaces.add(iface);
- return this;
- }
-
- public JDefinedClass _implements(Class<?> iface) {
- return _implements(owner().ref(iface));
- }
-
- /**
- * Returns an iterator that walks the nested classes defined in this
- * class.
- */
- public Iterator<JClass> _implements() {
- return interfaces.iterator();
- }
-
- /**
- * JClass name accessor.
- *
- * <p>
- * For example, for <code>java.util.List</code>, this method
- * returns <code>"List"</code>"
- *
- * @return Name of this class
- */
- public String name() {
- return name;
- }
-
- /**
- * If the named enum already exists, the reference to it is returned.
- * Otherwise this method generates a new enum reference with the given
- * name and returns it.
- *
- * @param name
- * The name of the constant.
- * @return
- * The generated type-safe enum constant.
- */
- public JEnumConstant enumConstant(String name){
- JEnumConstant ec = enumConstantsByName.get(name);
- if (null == ec) {
- ec = new JEnumConstant(this, name);
- enumConstantsByName.put(name, ec);
- }
- return ec;
- }
-
- /**
- * Gets the fully qualified name of this class.
- */
- public String fullName() {
- if (outer instanceof JDefinedClass)
- return ((JDefinedClass) outer).fullName() + '.' + name();
-
- JPackage p = _package();
- if (p.isUnnamed())
- return name();
- else
- return p.name() + '.' + name();
- }
-
- @Override
- public String binaryName() {
- if (outer instanceof JDefinedClass)
- return ((JDefinedClass) outer).binaryName() + '$' + name();
- else
- return fullName();
- }
-
- public boolean isInterface() {
- return this.classType==ClassType.INTERFACE;
- }
-
- public boolean isAbstract() {
- return mods.isAbstract();
- }
-
- /**
- * Adds a field to the list of field members of this JDefinedClass.
- *
- * @param mods
- * Modifiers for this field
- *
- * @param type
- * JType of this field
- *
- * @param name
- * Name of this field
- *
- * @return Newly generated field
- */
- public JFieldVar field(int mods, JType type, String name) {
- return field(mods, type, name, null);
- }
-
- public JFieldVar field(int mods, Class<?> type, String name) {
- return field(mods, owner()._ref(type), name);
- }
-
- /**
- * Adds a field to the list of field members of this JDefinedClass.
- *
- * @param mods
- * Modifiers for this field.
- * @param type
- * JType of this field.
- * @param name
- * Name of this field.
- * @param init
- * Initial value of this field.
- *
- * @return Newly generated field
- */
- public JFieldVar field(
- int mods,
- JType type,
- String name,
- JExpression init) {
- JFieldVar f = new JFieldVar(this,JMods.forField(mods), type, name, init);
-
- if (fields.containsKey(name)) {
- throw new IllegalArgumentException("trying to create the same field twice: "+name);
- }
-
- fields.put(name, f);
- return f;
- }
-
- /** This method indicates if the interface
- * is an annotationTypeDeclaration
- *
- */
- public boolean isAnnotationTypeDeclaration() {
- return this.classType==ClassType.ANNOTATION_TYPE_DECL;
-
-
- }
-
- /**
- * Add an annotationType Declaration to this package
- * @param name
- * Name of the annotation Type declaration to be added to this package
- * @return
- * newly created Annotation Type Declaration
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
-
- */
- public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException {
- return _class (JMod.PUBLIC,name,ClassType.ANNOTATION_TYPE_DECL);
- }
-
- /**
- * Add a public enum to this package
- * @param name
- * Name of the enum to be added to this package
- * @return
- * newly created Enum
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
-
- */
- public JDefinedClass _enum (String name) throws JClassAlreadyExistsException {
- return _class (JMod.PUBLIC,name,ClassType.ENUM);
- }
-
- /**
- * Add a public enum to this package
- * @param name
- * Name of the enum to be added to this package
- * @param mods
- * Modifiers for this enum declaration
- * @return
- * newly created Enum
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
-
- */
- public JDefinedClass _enum (int mods,String name) throws JClassAlreadyExistsException {
- return _class (mods,name,ClassType.ENUM);
- }
-
-
-
-
-
- public ClassType getClassType(){
- return this.classType;
- }
-
- public JFieldVar field(
- int mods,
- Class<?> type,
- String name,
- JExpression init) {
- return field(mods, owner()._ref(type), name, init);
- }
-
- /**
- * Returns all the fields declred in this class.
- * The returned {@link Map} is a read-only live view.
- *
- * @return always non-null.
- */
- public Map<String,JFieldVar> fields() {
- return Collections.unmodifiableMap(fields);
- }
-
- /**
- * Removes a {@link JFieldVar} from this class.
- *
- * @throws IllegalArgumentException
- * if the given field is not a field on this class.
- */
- public void removeField(JFieldVar field) {
- if(fields.remove(field.name())!=field)
- throw new IllegalArgumentException();
- }
-
- /**
- * Creates, if necessary, and returns the static initializer
- * for this class.
- *
- * @return JBlock containing initialization statements for this class
- */
- public JBlock init() {
- if (init == null)
- init = new JBlock();
- return init;
- }
-
- /**
- * Adds a constructor to this class.
- *
- * @param mods
- * Modifiers for this constructor
- */
- public JMethod constructor(int mods) {
- JMethod c = new JMethod(mods, this);
- constructors.add(c);
- return c;
- }
-
- /**
- * Returns an iterator that walks the constructors defined in this class.
- */
- public Iterator<JMethod> constructors() {
- return constructors.iterator();
- }
-
- /**
- * Looks for a method that has the specified method signature
- * and return it.
- *
- * @return
- * null if not found.
- */
- public JMethod getConstructor(JType[] argTypes) {
- for (JMethod m : constructors) {
- if (m.hasSignature(argTypes))
- return m;
- }
- return null;
- }
-
- /**
- * Add a method to the list of method members of this JDefinedClass instance.
- *
- * @param mods
- * Modifiers for this method
- *
- * @param type
- * Return type for this method
- *
- * @param name
- * Name of the method
- *
- * @return Newly generated JMethod
- */
- public JMethod method(int mods, JType type, String name) {
- // XXX problems caught in M constructor
- JMethod m = new JMethod(this, mods, type, name);
- methods.add(m);
- return m;
- }
-
- public JMethod method(int mods, Class<?> type, String name) {
- return method(mods, owner()._ref(type), name);
- }
-
- /**
- * Returns the set of methods defined in this class.
- */
- public Collection<JMethod> methods() {
- return methods;
- }
-
- /**
- * Looks for a method that has the specified method signature
- * and return it.
- *
- * @return
- * null if not found.
- */
- public JMethod getMethod(String name, JType[] argTypes) {
- for (JMethod m : methods) {
- if (!m.name().equals(name))
- continue;
-
- if (m.hasSignature(argTypes))
- return m;
- }
- return null;
- }
-
- public boolean isClass() {
- return true;
- }
- public boolean isPackage() {
- return false;
- }
- public JPackage getPackage() { return parentContainer().getPackage(); }
-
- /**
- * Add a new nested class to this class.
- *
- * @param mods
- * Modifiers for this class declaration
- *
- * @param name
- * Name of class to be added to this package
- *
- * @return Newly generated class
- */
- public JDefinedClass _class(int mods, String name)
- throws JClassAlreadyExistsException {
- return _class(mods, name, ClassType.CLASS);
- }
-
- /**
- * {@inheritDoc}
- *
- * @deprecated
- */
- public JDefinedClass _class(int mods, String name, boolean isInterface) throws JClassAlreadyExistsException {
- return _class(mods,name,isInterface?ClassType.INTERFACE:ClassType.CLASS);
- }
-
- public JDefinedClass _class(int mods, String name, ClassType classTypeVal)
- throws JClassAlreadyExistsException {
-
- String NAME;
- if (JCodeModel.isCaseSensitiveFileSystem)
- NAME = name.toUpperCase();
- else
- NAME = name;
-
- if (getClasses().containsKey(NAME))
- throw new JClassAlreadyExistsException(getClasses().get(NAME));
- else {
- // XXX problems caught in the NC constructor
- JDefinedClass c = new JDefinedClass(this, mods, name, classTypeVal);
- getClasses().put(NAME,c);
- return c;
- }
- }
-
- /**
- * Add a new public nested class to this class.
- */
- public JDefinedClass _class(String name)
- throws JClassAlreadyExistsException {
- return _class(JMod.PUBLIC, name);
- }
-
- /**
- * Add an interface to this package.
- *
- * @param mods
- * Modifiers for this interface declaration
- *
- * @param name
- * Name of interface to be added to this package
- *
- * @return Newly generated interface
- */
- public JDefinedClass _interface(int mods, String name)
- throws JClassAlreadyExistsException {
- return _class(mods, name, ClassType.INTERFACE);
- }
-
- /**
- * Adds a public interface to this package.
- */
- public JDefinedClass _interface(String name)
- throws JClassAlreadyExistsException {
- return _interface(JMod.PUBLIC, name);
- }
-
- /**
- * Creates, if necessary, and returns the class javadoc for this
- * JDefinedClass
- *
- * @return JDocComment containing javadocs for this class
- */
- public JDocComment javadoc() {
- if (jdoc == null)
- jdoc = new JDocComment(owner());
- return jdoc;
- }
-
- /**
- * Mark this file as hidden, so that this file won't be
- * generated.
- *
- * <p>
- * This feature could be used to generate code that refers
- * to class X, without actually generating X.java.
- */
- public void hide() {
- hideFile = true;
- }
-
- public boolean isHidden() {
- return hideFile;
- }
-
- /**
- * Returns an iterator that walks the nested classes defined in this
- * class.
- */
- public final Iterator<JDefinedClass> classes() {
- if(classes==null)
- return Collections.<JDefinedClass>emptyList().iterator();
- else
- return classes.values().iterator();
- }
-
- private Map<String,JDefinedClass> getClasses() {
- if(classes==null)
- classes = new TreeMap<String,JDefinedClass>();
- return classes;
- }
-
-
- /**
- * Returns all the nested classes defined in this class.
- */
- public final JClass[] listClasses() {
- if(classes==null)
- return new JClass[0];
- else
- return classes.values().toArray(new JClass[classes.values().size()]);
- }
-
- @Override
- public JClass outer() {
- if (outer.isClass())
- return (JClass) outer;
- else
- return null;
- }
-
- public void declare(JFormatter f) {
- if (jdoc != null)
- f.nl().g(jdoc);
-
- if (annotations != null){
- for (JAnnotationUse annotation : annotations)
- f.g(annotation).nl();
- }
-
- f.g(mods).p(classType.declarationToken).id(name).d(generifiable);
-
- if (superClass != null && superClass != owner().ref(Object.class))
- f.nl().i().p("extends").g(superClass).nl().o();
-
- if (!interfaces.isEmpty()) {
- if (superClass == null)
- f.nl();
- f.i().p(classType==ClassType.INTERFACE ? "extends" : "implements");
- f.g(interfaces);
- f.nl().o();
- }
- declareBody(f);
- }
-
- /**
- * prints the body of a class.
- */
- protected void declareBody(JFormatter f) {
- f.p('{').nl().nl().i();
- boolean first = true;
-
- if (!enumConstantsByName.isEmpty()) {
- for (JEnumConstant c : enumConstantsByName.values()) {
- if (!first) f.p(',').nl();
- f.d(c);
- first = false;
- }
- f.p(';').nl();
- }
-
- for( JFieldVar field : fields.values() )
- f.d(field);
- if (init != null)
- f.nl().p("static").s(init);
- for (JMethod m : constructors) {
- f.nl().d(m);
- }
- for (JMethod m : methods) {
- f.nl().d(m);
- }
- if(classes!=null)
- for (JDefinedClass dc : classes.values())
- f.nl().d(dc);
-
-
- if (directBlock != null)
- f.p(directBlock);
- f.nl().o().p('}').nl();
- }
-
- /**
- * Places the given string directly inside the generated class.
- *
- * This method can be used to add methods/fields that are not
- * generated by CodeModel.
- * This method should be used only as the last resort.
- */
- public void direct(String string) {
- if (directBlock == null)
- directBlock = string;
- else
- directBlock += string;
- }
-
- public final JPackage _package() {
- JClassContainer p = outer;
- while (!(p instanceof JPackage))
- p = p.parentContainer();
- return (JPackage) p;
- }
-
- public final JClassContainer parentContainer() {
- return outer;
- }
-
- public JTypeVar generify(String name) {
- return generifiable.generify(name);
- }
- public JTypeVar generify(String name, Class<?> bound) {
- return generifiable.generify(name, bound);
- }
- public JTypeVar generify(String name, JClass bound) {
- return generifiable.generify(name, bound);
- }
- @Override
- public JTypeVar[] typeParams() {
- return generifiable.typeParams();
- }
-
- protected JClass substituteParams(
- JTypeVar[] variables,
- List<JClass> bindings) {
- return this;
- }
-
- /** Adding ability to annotate a class
- * @param clazz
- * The annotation class to annotate the class with
- */
- public JAnnotationUse annotate(Class <? extends Annotation> clazz){
- return annotate(owner().ref(clazz));
- }
-
- /** Adding ability to annotate a class
- * @param clazz
- * The annotation class to annotate the class with
- */
- public JAnnotationUse annotate(JClass clazz){
- if(annotations==null)
- annotations = new ArrayList<JAnnotationUse>();
- JAnnotationUse a = new JAnnotationUse(clazz);
- annotations.add(a);
- return a;
- }
-
- public <W extends JAnnotationWriter> W annotate2(Class<W> clazz) {
- return TypedAnnotationWriter.create(clazz,this);
- }
-
- /**
- * {@link JAnnotatable#annotations()}
- */
- public Collection<JAnnotationUse> annotations() {
- if (annotations == null)
- annotations = new ArrayList<JAnnotationUse>();
- return Collections.unmodifiableCollection(annotations);
- }
-
- /**
- * @return
- * the current modifiers of this class.
- * Always return non-null valid object.
- */
- public JMods mods() {
- return mods;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JDirectClass.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JDirectClass.java
deleted file mode 100644
index 25f03d0b..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JDirectClass.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Collections;
-
-/**
- * A special {@link JClass} that represents an unknown class (except its name.)
- *
- * @author Kohsuke Kawaguchi
- * @see JCodeModel#directClass(String)
- */
-final class JDirectClass extends JClass {
-
- private final String fullName;
-
- public JDirectClass(JCodeModel _owner,String fullName) {
- super(_owner);
- this.fullName = fullName;
- }
-
- public String name() {
- int i = fullName.lastIndexOf('.');
- if(i>=0) return fullName.substring(i+1);
- return fullName;
- }
-
- public String fullName() {
- return fullName;
- }
-
- public JPackage _package() {
- int i = fullName.lastIndexOf('.');
- if(i>=0) return owner()._package(fullName.substring(0,i));
- else return owner().rootPackage();
- }
-
- public JClass _extends() {
- return owner().ref(Object.class);
- }
-
- public Iterator<JClass> _implements() {
- return Collections.<JClass>emptyList().iterator();
- }
-
- public boolean isInterface() {
- return false;
- }
-
- public boolean isAbstract() {
- return false;
- }
-
- protected JClass substituteParams(JTypeVar[] variables, List<JClass> bindings) {
- return this;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JDoLoop.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JDoLoop.java
deleted file mode 100644
index 3e674df3..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JDoLoop.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * Do loops
- */
-
-public class JDoLoop implements JStatement {
-
- /**
- * Test part of Do statement for determining exit state
- */
- private JExpression test;
-
- /**
- * JBlock of statements which makes up body of this Do statement
- */
- private JBlock body = null;
-
- /**
- * Construct a Do statment
- */
- JDoLoop(JExpression test) {
- this.test = test;
- }
-
- public JBlock body() {
- if (body == null) body = new JBlock();
- return body;
- }
-
- public void state(JFormatter f) {
- f.p("do");
- if (body != null)
- f.g(body);
- else
- f.p("{ }");
-
- if (JOp.hasTopOp(test)) {
- f.p("while ").g(test);
- } else {
- f.p("while (").g(test).p(')');
- }
- f.p(';').nl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JDocComment.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JDocComment.java
deleted file mode 100644
index bfe8305a..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JDocComment.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * JavaDoc comment.
- *
- * <p>
- * A javadoc comment consists of multiple parts. There's the main part (that comes the first in
- * in the comment section), then the parameter parts (@param), the return part (@return),
- * and the throws parts (@throws).
- *
- * TODO: it would be nice if we have JComment class and we can derive this class from there.
- */
-public class JDocComment extends JCommentPart implements JGenerable {
-
- private static final long serialVersionUID = 1L;
-
- /** list of @param tags */
- private final Map<String,JCommentPart> atParams = new HashMap<String,JCommentPart>();
-
- /** list of xdoclets */
- private final Map<String,Map<String,String>> atXdoclets = new HashMap<String,Map<String,String>>();
-
- /** list of @throws tags */
- private final Map<JClass,JCommentPart> atThrows = new HashMap<JClass,JCommentPart>();
-
- /**
- * The @return tag part.
- */
- private JCommentPart atReturn = null;
-
- /** The @deprecated tag */
- private JCommentPart atDeprecated = null;
-
- private final JCodeModel owner;
-
-
- public JDocComment(JCodeModel owner) {
- this.owner = owner;
- }
-
- public JDocComment append(Object o) {
- add(o);
- return this;
- }
-
- /**
- * Append a text to a @param tag to the javadoc
- */
- public JCommentPart addParam( String param ) {
- JCommentPart p = atParams.get(param);
- if(p==null)
- atParams.put(param,p=new JCommentPart());
- return p;
- }
-
- /**
- * Append a text to an @param tag.
- */
- public JCommentPart addParam( JVar param ) {
- return addParam( param.name() );
- }
-
-
- /**
- * add an @throws tag to the javadoc
- */
- public JCommentPart addThrows( Class<? extends Throwable> exception ) {
- return addThrows( owner.ref(exception) );
- }
-
- /**
- * add an @throws tag to the javadoc
- */
- public JCommentPart addThrows( JClass exception ) {
- JCommentPart p = atThrows.get(exception);
- if(p==null)
- atThrows.put(exception,p=new JCommentPart());
- return p;
- }
-
- /**
- * Appends a text to @return tag.
- */
- public JCommentPart addReturn() {
- if(atReturn==null)
- atReturn = new JCommentPart();
- return atReturn;
- }
-
- /**
- * add an @deprecated tag to the javadoc, with the associated message.
- */
- public JCommentPart addDeprecated() {
- if(atDeprecated==null)
- atDeprecated = new JCommentPart();
- return atDeprecated;
- }
-
- /**
- * add an xdoclet.
- */
- public Map<String,String> addXdoclet(String name) {
- Map<String,String> p = atXdoclets.get(name);
- if(p==null)
- atXdoclets.put(name,p=new HashMap<String,String>());
- return p;
- }
-
- /**
- * add an xdoclet.
- */
- public Map<String,String> addXdoclet(String name, Map<String,String> attributes) {
- Map<String,String> p = atXdoclets.get(name);
- if(p==null)
- atXdoclets.put(name,p=new HashMap<String,String>());
- p.putAll(attributes);
- return p;
- }
-
- /**
- * add an xdoclet.
- */
- public Map<String,String> addXdoclet(String name, String attribute, String value) {
- Map<String,String> p = atXdoclets.get(name);
- if(p==null)
- atXdoclets.put(name,p=new HashMap<String,String>());
- p.put(attribute, value);
- return p;
- }
-
- public void generate(JFormatter f) {
- // I realized that we can't use StringTokenizer because
- // this will recognize multiple \n as one token.
-
- f.p("/**").nl();
-
- format(f," * ");
-
- f.p(" * ").nl();
- for (Map.Entry<String,JCommentPart> e : atParams.entrySet()) {
- f.p(" * @param ").p(e.getKey()).nl();
- e.getValue().format(f,INDENT);
- }
- if( atReturn != null ) {
- f.p(" * @return").nl();
- atReturn.format(f,INDENT);
- }
- for (Map.Entry<JClass,JCommentPart> e : atThrows.entrySet()) {
- f.p(" * @throws ").t(e.getKey()).nl();
- e.getValue().format(f,INDENT);
- }
- if( atDeprecated != null ) {
- f.p(" * @deprecated").nl();
- atDeprecated.format(f,INDENT);
- }
- for (Map.Entry<String,Map<String,String>> e : atXdoclets.entrySet()) {
- f.p(" * @").p(e.getKey());
- if (e.getValue() != null) {
- for (Map.Entry<String,String> a : e.getValue().entrySet()) {
- f.p(" ").p(a.getKey()).p("= \"").p(a.getValue()).p("\"");
- }
- }
- f.nl();
- }
- f.p(" */").nl();
- }
-
- private static final String INDENT = " * ";
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JDocCommentable.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JDocCommentable.java
deleted file mode 100644
index b02d1c25..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JDocCommentable.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-/**
- * Program elements that can have Javadoc
- *
- * @author Jonas von Malottki
- */
-public interface JDocCommentable {
- /**
- * @return the JavaDoc of the Element
- */
- JDocComment javadoc();
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JEnumConstant.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JEnumConstant.java
deleted file mode 100644
index 11c0b515..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JEnumConstant.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Collection;
-import java.util.Collections;
-import java.lang.annotation.Annotation;
-
-/**
- * Enum Constant.
- *
- * When used as an {@link JExpression}, this object represents a reference to the enum constant.
- *
- * @author
- * Bhakti Mehta (Bhakti.Mehta@sun.com)
- */
-public final class JEnumConstant extends JExpressionImpl implements JDeclaration, JAnnotatable, JDocCommentable {
-
- /**
- * The constant.
- */
- private final String name;
- /**
- * The enum class.
- */
- private final JDefinedClass type;
- /**
- * javadoc comments, if any.
- */
- private JDocComment jdoc = null;
-
- /**
- * Annotations on this variable. Lazily created.
- */
- private List<JAnnotationUse> annotations = null;
-
-
- /**
- * List of the constructor argument expressions.
- * Lazily constructed.
- */
- private List<JExpression> args = null;
-
- JEnumConstant(JDefinedClass type,String name) {
- this.name = name;
- this.type = type;
- }
-
- /**
- * Add an expression to this constructor's argument list
- *
- * @param arg
- * Argument to add to argument list
- */
- public JEnumConstant arg(JExpression arg) {
- if(arg==null) throw new IllegalArgumentException();
- if(args==null)
- args = new ArrayList<JExpression>();
- args.add(arg);
- return this;
- }
-
- /**
- * Returns the name of this constant.
- *
- * @return never null.
- */
- public String getName() {
- return this.type.fullName().concat(".").concat(this.name);
- }
-
- /**
- * Creates, if necessary, and returns the enum constant javadoc.
- *
- * @return JDocComment containing javadocs for this constant.
- */
- public JDocComment javadoc() {
- if (jdoc == null)
- jdoc = new JDocComment(type.owner());
- return jdoc;
- }
-
- /**
- * Adds an annotation to this variable.
- * @param clazz
- * The annotation class to annotate the field with
- */
- public JAnnotationUse annotate(JClass clazz){
- if(annotations==null)
- annotations = new ArrayList<JAnnotationUse>();
- JAnnotationUse a = new JAnnotationUse(clazz);
- annotations.add(a);
- return a;
- }
-
- /**
- * Adds an annotation to this variable.
- *
- * @param clazz
- * The annotation class to annotate the field with
- */
- public JAnnotationUse annotate(Class <? extends Annotation> clazz){
- return annotate(type.owner().ref(clazz));
- }
-
- public <W extends JAnnotationWriter> W annotate2(Class<W> clazz) {
- return TypedAnnotationWriter.create(clazz,this);
- }
-
- /**
- * {@link JAnnotatable#annotations()}
- */
- public Collection<JAnnotationUse> annotations() {
- if (annotations == null)
- annotations = new ArrayList<JAnnotationUse>();
- return Collections.unmodifiableList(annotations);
- }
-
- public void declare(JFormatter f) {
- if( jdoc != null )
- f.nl().g( jdoc );
- if (annotations != null) {
- for( int i=0; i<annotations.size(); i++ )
- f.g(annotations.get(i)).nl();
- }
- f.id(name);
- if(args!=null) {
- f.p('(').g(args).p(')');
- }
- }
-
- public void generate(JFormatter f) {
- f.t(type).p('.').p(name);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JExpr.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JExpr.java
deleted file mode 100644
index 787281fd..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JExpr.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * Factory methods that generate various {@link JExpression}s.
- */
-public abstract class JExpr {
-
- /**
- * This class is not instanciable.
- */
- private JExpr() { }
-
- public static JExpression assign(JAssignmentTarget lhs, JExpression rhs) {
- return new JAssignment(lhs, rhs);
- }
-
- public static JExpression assignPlus(JAssignmentTarget lhs, JExpression rhs) {
- return new JAssignment(lhs, rhs, "+");
- }
-
- public static JInvocation _new(JClass c) {
- return new JInvocation(c);
- }
-
- public static JInvocation _new(JType t) {
- return new JInvocation(t);
- }
-
- public static JInvocation invoke(String method) {
- return new JInvocation((JExpression)null, method);
- }
-
- public static JInvocation invoke(JMethod method) {
- return new JInvocation((JExpression)null,method);
- }
-
- public static JInvocation invoke(JExpression lhs, JMethod method) {
- return new JInvocation(lhs, method);
- }
-
- public static JInvocation invoke(JExpression lhs, String method) {
- return new JInvocation(lhs, method);
- }
-
- public static JFieldRef ref(String field) {
- return new JFieldRef((JExpression)null, field);
- }
-
- public static JFieldRef ref(JExpression lhs, JVar field) {
- return new JFieldRef(lhs,field);
- }
-
- public static JFieldRef ref(JExpression lhs, String field) {
- return new JFieldRef(lhs, field);
- }
-
- public static JFieldRef refthis(String field) {
- return new JFieldRef(null, field, true);
- }
-
- public static JExpression dotclass(final JClass cl) {
- return new JExpressionImpl() {
- public void generate(JFormatter f) {
- JClass c;
- if(cl instanceof JNarrowedClass)
- c = ((JNarrowedClass)cl).basis;
- else
- c = cl;
- f.g(c).p(".class");
- }
- };
- }
-
- public static JArrayCompRef component(JExpression lhs, JExpression index) {
- return new JArrayCompRef(lhs, index);
- }
-
- public static JCast cast(JType type, JExpression expr) {
- return new JCast(type, expr);
- }
-
- public static JArray newArray(JType type) {
- return newArray(type,null);
- }
-
- /**
- * Generates {@code new T[size]}.
- *
- * @param type
- * The type of the array component. 'T' or {@code new T[size]}.
- */
- public static JArray newArray(JType type, JExpression size) {
- // you cannot create an array whose component type is a generic
- return new JArray(type.erasure(), size);
- }
-
- /**
- * Generates {@code new T[size]}.
- *
- * @param type
- * The type of the array component. 'T' or {@code new T[size]}.
- */
- public static JArray newArray(JType type, int size) {
- return newArray(type,lit(size));
- }
-
-
- private static final JExpression __this = new JAtom("this");
- /**
- * Returns a reference to "this", an implicit reference
- * to the current object.
- */
- public static JExpression _this() { return __this; }
-
- private static final JExpression __super = new JAtom("super");
- /**
- * Returns a reference to "super", an implicit reference
- * to the super class.
- */
- public static JExpression _super() { return __super; }
-
-
- /* -- Literals -- */
-
- private static final JExpression __null = new JAtom("null");
- public static JExpression _null() {
- return __null;
- }
-
- /**
- * Boolean constant that represents <code>true</code>
- */
- public static final JExpression TRUE = new JAtom("true");
-
- /**
- * Boolean constant that represents <code>false</code>
- */
- public static final JExpression FALSE = new JAtom("false");
-
- public static JExpression lit(boolean b) {
- return b?TRUE:FALSE;
- }
-
- public static JExpression lit(int n) {
- return new JAtom(Integer.toString(n));
- }
-
- public static JExpression lit(long n) {
- return new JAtom(Long.toString(n) + "L");
- }
-
- public static JExpression lit(float f) {
- if (f == Float.NEGATIVE_INFINITY)
- {
- return new JAtom("java.lang.Float.NEGATIVE_INFINITY");
- }
- else if (f == Float.POSITIVE_INFINITY)
- {
- return new JAtom("java.lang.Float.POSITIVE_INFINITY");
- }
- else if (Float.isNaN(f))
- {
- return new JAtom("java.lang.Float.NaN");
- }
- else
- {
- return new JAtom(Float.toString(f) + "F");
- }
- }
-
- public static JExpression lit(double d) {
- if (d == Double.NEGATIVE_INFINITY)
- {
- return new JAtom("java.lang.Double.NEGATIVE_INFINITY");
- }
- else if (d == Double.POSITIVE_INFINITY)
- {
- return new JAtom("java.lang.Double.POSITIVE_INFINITY");
- }
- else if (Double.isNaN(d))
- {
- return new JAtom("java.lang.Double.NaN");
- }
- else
- {
- return new JAtom(Double.toString(d) + "D");
- }
- }
-
- static final String charEscape = "\b\t\n\f\r\"\'\\";
- static final String charMacro = "btnfr\"'\\";
-
- /**
- * Escapes the given string, then surrounds it by the specified
- * quotation mark.
- */
- public static String quotify(char quote, String s) {
- int n = s.length();
- StringBuilder sb = new StringBuilder(n + 2);
- sb.append(quote);
- for (int i = 0; i < n; i++) {
- char c = s.charAt(i);
- int j = charEscape.indexOf(c);
- if(j>=0) {
- if((quote=='"' && c=='\'') || (quote=='\'' && c=='"')) {
- sb.append(c);
- } else {
- sb.append('\\');
- sb.append(charMacro.charAt(j));
- }
- } else {
- // technically Unicode escape shouldn't be done here,
- // for it's a lexical level handling.
- //
- // However, various tools are so broken around this area,
- // so just to be on the safe side, it's better to do
- // the escaping here (regardless of the actual file encoding)
- //
- // see bug
- if( c<0x20 || 0x7E<c ) {
- // not printable. use Unicode escape
- sb.append("\\u");
- String hex = Integer.toHexString(((int)c)&0xFFFF);
- for( int k=hex.length(); k<4; k++ )
- sb.append('0');
- sb.append(hex);
- } else {
- sb.append(c);
- }
- }
- }
- sb.append(quote);
- return sb.toString();
- }
-
- public static JExpression lit(char c) {
- return new JAtom(quotify('\'', "" + c));
- }
-
- public static JExpression lit(String s) {
- return new JStringLiteral(s);
- }
-
- /**
- * Creates an expression directly from a source code fragment.
- *
- * <p>
- * This method can be used as a short-cut to create a JExpression.
- * For example, instead of <code>_a.gt(_b)</code>, you can write
- * it as: <code>JExpr.direct("a>b")</code>.
- *
- * <p>
- * Be warned that there is a danger in using this method,
- * as it obfuscates the object model.
- */
- public static JExpression direct( final String source ) {
- return new JExpressionImpl(){
- public void generate( JFormatter f ) {
- f.p('(').p(source).p(')');
- }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JExpression.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JExpression.java
deleted file mode 100644
index 9311c3f7..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JExpression.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * A Java expression.
- *
- * <p>
- * Unlike most of CodeModel, JExpressions are built bottom-up (
- * meaning you start from leaves and then gradually build compliated expressions
- * by combining them.)
- *
- * <p>
- * {@link JExpression} defines a series of composer methods,
- * which returns a complicated expression (by often taking other {@link JExpression}s
- * as parameters.
- * For example, you can build "5+2" by
- * <tt>JExpr.lit(5).add(JExpr.lit(2))</tt>
- */
-public interface JExpression extends JGenerable {
- /**
- * Returns "-[this]" from "[this]".
- */
- JExpression minus();
-
- /**
- * Returns "![this]" from "[this]".
- */
- JExpression not();
- /**
- * Returns "~[this]" from "[this]".
- */
- JExpression complement();
-
- /**
- * Returns "[this]++" from "[this]".
- */
- JExpression incr();
-
- /**
- * Returns "[this]--" from "[this]".
- */
- JExpression decr();
-
- /**
- * Returns "[this]+[right]"
- */
- JExpression plus(JExpression right);
-
- /**
- * Returns "[this]-[right]"
- */
- JExpression minus(JExpression right);
-
- /**
- * Returns "[this]*[right]"
- */
- JExpression mul(JExpression right);
-
- /**
- * Returns "[this]/[right]"
- */
- JExpression div(JExpression right);
-
- /**
- * Returns "[this]%[right]"
- */
- JExpression mod(JExpression right);
-
- /**
- * Returns "[this]&lt;&lt;[right]"
- */
- JExpression shl(JExpression right);
-
- /**
- * Returns "[this]>>[right]"
- */
- JExpression shr(JExpression right);
-
- /**
- * Returns "[this]>>>[right]"
- */
- JExpression shrz(JExpression right);
-
- /** Bit-wise AND '&amp;'. */
- JExpression band(JExpression right);
-
- /** Bit-wise OR '|'. */
- JExpression bor(JExpression right);
-
- /** Logical AND '&amp;&amp;'. */
- JExpression cand(JExpression right);
-
- /** Logical OR '||'. */
- JExpression cor(JExpression right);
-
- JExpression xor(JExpression right);
- JExpression lt(JExpression right);
- JExpression lte(JExpression right);
- JExpression gt(JExpression right);
- JExpression gte(JExpression right);
- JExpression eq(JExpression right);
- JExpression ne(JExpression right);
-
- /**
- * Returns "[this] instanceof [right]"
- */
- JExpression _instanceof(JType right);
-
- /**
- * Returns "[this].[method]".
- *
- * Arguments shall be added to the returned {@link JInvocation} object.
- */
- JInvocation invoke(JMethod method);
-
- /**
- * Returns "[this].[method]".
- *
- * Arguments shall be added to the returned {@link JInvocation} object.
- */
- JInvocation invoke(String method);
- JFieldRef ref(JVar field);
- JFieldRef ref(String field);
- JArrayCompRef component(JExpression index);
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JExpressionImpl.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JExpressionImpl.java
deleted file mode 100644
index 6100d7b0..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JExpressionImpl.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-/**
- * Provides default implementations for {@link JExpression}.
- */
-public abstract class JExpressionImpl implements JExpression
-{
- //
- //
- // from JOp
- //
- //
- public final JExpression minus() {
- return JOp.minus(this);
- }
-
- /**
- * Logical not <tt>'!x'</tt>.
- */
- public final JExpression not() {
- return JOp.not(this);
- }
-
- public final JExpression complement() {
- return JOp.complement(this);
- }
-
- public final JExpression incr() {
- return JOp.incr(this);
- }
-
- public final JExpression decr() {
- return JOp.decr(this);
- }
-
- public final JExpression plus(JExpression right) {
- return JOp.plus(this, right);
- }
-
- public final JExpression minus(JExpression right) {
- return JOp.minus(this, right);
- }
-
- public final JExpression mul(JExpression right) {
- return JOp.mul(this, right);
- }
-
- public final JExpression div(JExpression right) {
- return JOp.div(this, right);
- }
-
- public final JExpression mod(JExpression right) {
- return JOp.mod(this, right);
- }
-
- public final JExpression shl(JExpression right) {
- return JOp.shl(this, right);
- }
-
- public final JExpression shr(JExpression right) {
- return JOp.shr(this, right);
- }
-
- public final JExpression shrz(JExpression right) {
- return JOp.shrz(this, right);
- }
-
- public final JExpression band(JExpression right) {
- return JOp.band(this, right);
- }
-
- public final JExpression bor(JExpression right) {
- return JOp.bor(this, right);
- }
-
- public final JExpression cand(JExpression right) {
- return JOp.cand(this, right);
- }
-
- public final JExpression cor(JExpression right) {
- return JOp.cor(this, right);
- }
-
- public final JExpression xor(JExpression right) {
- return JOp.xor(this, right);
- }
-
- public final JExpression lt(JExpression right) {
- return JOp.lt(this, right);
- }
-
- public final JExpression lte(JExpression right) {
- return JOp.lte(this, right);
- }
-
- public final JExpression gt(JExpression right) {
- return JOp.gt(this, right);
- }
-
- public final JExpression gte(JExpression right) {
- return JOp.gte(this, right);
- }
-
- public final JExpression eq(JExpression right) {
- return JOp.eq(this, right);
- }
-
- public final JExpression ne(JExpression right) {
- return JOp.ne(this, right);
- }
-
- public final JExpression _instanceof(JType right) {
- return JOp._instanceof(this, right);
- }
-
- //
- //
- // from JExpr
- //
- //
- public final JInvocation invoke(JMethod method) {
- return JExpr.invoke(this, method);
- }
-
- public final JInvocation invoke(String method) {
- return JExpr.invoke(this, method);
- }
-
- public final JFieldRef ref(JVar field) {
- return JExpr.ref(this, field);
- }
-
- public final JFieldRef ref(String field) {
- return JExpr.ref(this, field);
- }
-
- public final JArrayCompRef component(JExpression index) {
- return JExpr.component(this, index);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JFieldRef.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JFieldRef.java
deleted file mode 100644
index 589dc716..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JFieldRef.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * Field Reference
- */
-
-public class JFieldRef extends JExpressionImpl implements JAssignmentTarget {
- /**
- * Object expression upon which this field will be accessed, or
- * null for the implicit 'this'.
- */
- private JGenerable object;
-
- /**
- * Name of the field to be accessed. Either this or {@link #var} is set.
- */
- private String name;
-
- /**
- * Variable to be accessed.
- */
- private JVar var;
-
- /**
- * Indicates if an explicit this should be generated
- */
- private boolean explicitThis;
-
- /**
- * Field reference constructor given an object expression and field name
- *
- * @param object
- * JExpression for the object upon which
- * the named field will be accessed,
- *
- * @param name
- * Name of field to access
- */
- JFieldRef(JExpression object, String name) {
- this(object, name, false);
- }
-
- JFieldRef(JExpression object, JVar v) {
- this(object, v, false);
- }
-
- /**
- * Static field reference.
- */
- JFieldRef(JType type, String name) {
- this(type, name, false);
- }
-
- JFieldRef(JType type, JVar v) {
- this(type, v, false);
- }
-
- JFieldRef(JGenerable object, String name, boolean explicitThis) {
- this.explicitThis = explicitThis;
- this.object = object;
- if (name.indexOf('.') >= 0)
- throw new IllegalArgumentException("Field name contains '.': " + name);
- this.name = name;
- }
-
- JFieldRef(JGenerable object, JVar var, boolean explicitThis) {
- this.explicitThis = explicitThis;
- this.object = object;
- this.var = var;
- }
-
- public void generate(JFormatter f) {
- String name = this.name;
- if(name==null) name=var.name();
-
- if (object != null) {
- f.g(object).p('.').p(name);
- } else {
- if (explicitThis) {
- f.p("this.").p(name);
- } else {
- f.id(name);
- }
- }
- }
-
- public JExpression assign(JExpression rhs) {
- return JExpr.assign(this, rhs);
- }
- public JExpression assignPlus(JExpression rhs) {
- return JExpr.assignPlus(this, rhs);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JFieldVar.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JFieldVar.java
deleted file mode 100644
index 59c4a8e3..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JFieldVar.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-
-
-/**
- * A field that can have a {@link JDocComment} associated with it
- */
-public class JFieldVar extends JVar implements JDocCommentable {
-
- /**
- * javadoc comments for this JFieldVar
- */
- private JDocComment jdoc = null;
-
- private final JDefinedClass owner;
-
-
- /**
- * JFieldVar constructor
- *
- * @param type
- * Datatype of this variable
- *
- * @param name
- * Name of this variable
- *
- * @param init
- * Value to initialize this variable to
- */
- JFieldVar(JDefinedClass owner, JMods mods, JType type, String name, JExpression init) {
- super( mods, type, name, init );
- this.owner = owner;
- }
-
- @Override
- public void name(String name) {
- // make sure that the new name is available
- if(owner.fields.containsKey(name))
- throw new IllegalArgumentException("name "+name+" is already in use");
- String oldName = name();
- super.name(name);
- owner.fields.remove(oldName);
- owner.fields.put(name,this);
- }
-
- /**
- * Creates, if necessary, and returns the class javadoc for this
- * JDefinedClass
- *
- * @return JDocComment containing javadocs for this class
- */
- public JDocComment javadoc() {
- if( jdoc == null )
- jdoc = new JDocComment(owner.owner());
- return jdoc;
- }
-
- public void declare(JFormatter f) {
- if( jdoc != null )
- f.g( jdoc );
- super.declare( f );
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JForEach.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JForEach.java
deleted file mode 100644
index e926f16e..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JForEach.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-/**
- * ForEach Statement
- * This will generate the code for statement based on the new
- * j2se 1.5 j.l.s.
- *
- * @author Bhakti
- */
-public final class JForEach implements JStatement {
-
- private final JType type;
- private final String var;
- private JBlock body = null; // lazily created
- private final JExpression collection;
- private final JVar loopVar;
-
- public JForEach(JType vartype, String variable, JExpression collection) {
-
- this.type = vartype;
- this.var = variable;
- this.collection = collection;
- loopVar = new JVar(JMods.forVar(JMod.NONE), type, var, collection);
- }
-
-
- /**
- * Returns a reference to the loop variable.
- */
- public JVar var() {
- return loopVar;
- }
-
- public JBlock body() {
- if (body == null)
- body = new JBlock();
- return body;
- }
-
- public void state(JFormatter f) {
- f.p("for (");
- f.g(type).id(var).p(": ").g(collection);
- f.p(')');
- if (body != null)
- f.g(body).nl();
- else
- f.p(';').nl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JForLoop.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JForLoop.java
deleted file mode 100644
index f6b12301..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JForLoop.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * For statement
- */
-
-public class JForLoop implements JStatement {
-
- private List<Object> inits = new ArrayList<Object>();
- private JExpression test = null;
- private List<JExpression> updates = new ArrayList<JExpression>();
- private JBlock body = null;
-
- public JVar init(int mods, JType type, String var, JExpression e) {
- JVar v = new JVar(JMods.forVar(mods), type, var, e);
- inits.add(v);
- return v;
- }
-
- public JVar init(JType type, String var, JExpression e) {
- return init(JMod.NONE, type, var, e);
- }
-
- public void init(JVar v, JExpression e) {
- inits.add(JExpr.assign(v, e));
- }
-
- public void test(JExpression e) {
- this.test = e;
- }
-
- public void update(JExpression e) {
- updates.add(e);
- }
-
- public JBlock body() {
- if (body == null) body = new JBlock();
- return body;
- }
-
- public void state(JFormatter f) {
- f.p("for (");
- boolean first = true;
- for (Object o : inits) {
- if (!first) f.p(',');
- if (o instanceof JVar)
- f.b((JVar) o);
- else
- f.g((JExpression) o);
- first = false;
- }
- f.p(';').g(test).p(';').g(updates).p(')');
- if (body != null)
- f.g(body).nl();
- else
- f.p(';').nl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JFormatter.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JFormatter.java
deleted file mode 100644
index 2d8d071b..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JFormatter.java
+++ /dev/null
@@ -1,555 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.io.PrintWriter;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-
-
-/**
- * This is a utility class for managing indentation and other basic
- * formatting for PrintWriter.
- */
-public final class JFormatter {
- /** all classes and ids encountered during the collection mode **/
- /** map from short type name to ReferenceList (list of JClass and ids sharing that name) **/
- private HashMap<String,ReferenceList> collectedReferences;
-
- /** set of imported types (including package java types, eventhough we won't generate imports for them) */
- private HashSet<JClass> importedClasses;
-
- private static enum Mode {
- /**
- * Collect all the type names and identifiers.
- * In this mode we don't actually generate anything.
- */
- COLLECTING,
- /**
- * Print the actual source code.
- */
- PRINTING
- }
-
- /**
- * The current running mode.
- * Set to PRINTING so that a casual client can use a formatter just like before.
- */
- private Mode mode = Mode.PRINTING;
-
- /**
- * Current number of indentation strings to print
- */
- private int indentLevel;
-
- /**
- * String to be used for each indentation.
- * Defaults to four spaces.
- */
- private final String indentSpace;
-
- /**
- * Stream associated with this JFormatter
- */
- private final PrintWriter pw;
-
- /**
- * Creates a JFormatter.
- *
- * @param s
- * PrintWriter to JFormatter to use.
- *
- * @param space
- * Incremental indentation string, similar to tab value.
- */
- public JFormatter(PrintWriter s, String space) {
- pw = s;
- indentSpace = space;
- collectedReferences = new HashMap<String,ReferenceList>();
- //ids = new HashSet<String>();
- importedClasses = new HashSet<JClass>();
- }
-
- /**
- * Creates a formatter with default incremental indentations of
- * four spaces.
- */
- public JFormatter(PrintWriter s) {
- this(s, " ");
- }
-
- /**
- * Creates a formatter with default incremental indentations of
- * four spaces.
- */
- public JFormatter(Writer w) {
- this(new PrintWriter(w));
- }
-
- /**
- * Closes this formatter.
- */
- public void close() {
- pw.close();
- }
-
- /**
- * Returns true if we are in the printing mode,
- * where we actually produce text.
- *
- * The other mode is the "collecting mode'
- */
- public boolean isPrinting() {
- return mode == Mode.PRINTING;
- }
-
- /**
- * Decrement the indentation level.
- */
- public JFormatter o() {
- indentLevel--;
- return this;
- }
-
- /**
- * Increment the indentation level.
- */
- public JFormatter i() {
- indentLevel++;
- return this;
- }
-
- private boolean needSpace(char c1, char c2) {
- if ((c1 == ']') && (c2 == '{')) return true;
- if (c1 == ';') return true;
- if (c1 == CLOSE_TYPE_ARGS) {
- // e.g., "public Foo<Bar> test;"
- if(c2=='(') // but not "new Foo<Bar>()"
- return false;
- return true;
- }
- if ((c1 == ')') && (c2 == '{')) return true;
- if ((c1 == ',') || (c1 == '=')) return true;
- if (c2 == '=') return true;
- if (Character.isDigit(c1)) {
- if ((c2 == '(') || (c2 == ')') || (c2 == ';') || (c2 == ','))
- return false;
- return true;
- }
- if (Character.isJavaIdentifierPart(c1)) {
- switch (c2) {
- case '{':
- case '}':
- case '+':
- case '>':
- case '@':
- return true;
- default:
- return Character.isJavaIdentifierStart(c2);
- }
- }
- if (Character.isJavaIdentifierStart(c2)) {
- switch (c1) {
- case ']':
- case ')':
- case '}':
- case '+':
- return true;
- default:
- return false;
- }
- }
- if (Character.isDigit(c2)) {
- if (c1 == '(') return false;
- return true;
- }
- return false;
- }
-
- private char lastChar = 0;
- private boolean atBeginningOfLine = true;
-
- private void spaceIfNeeded(char c) {
- if (atBeginningOfLine) {
- for (int i = 0; i < indentLevel; i++)
- pw.print(indentSpace);
- atBeginningOfLine = false;
- } else if ((lastChar != 0) && needSpace(lastChar, c))
- pw.print(' ');
- }
-
- /**
- * Print a char into the stream
- *
- * @param c the char
- */
- public JFormatter p(char c) {
- if(mode==Mode.PRINTING) {
- if(c==CLOSE_TYPE_ARGS) {
- pw.print('>');
- } else {
- spaceIfNeeded(c);
- pw.print(c);
- }
- lastChar = c;
- }
- return this;
- }
-
- /**
- * Print a String into the stream
- *
- * @param s the String
- */
- public JFormatter p(String s) {
- if(mode==Mode.PRINTING) {
- spaceIfNeeded(s.charAt(0));
- pw.print(s);
- lastChar = s.charAt(s.length() - 1);
- }
- return this;
- }
-
- public JFormatter t(JType type) {
- if(type.isReference()) {
- return t((JClass)type);
- } else {
- return g(type);
- }
- }
-
- /**
- * Print a type name.
- *
- * <p>
- * In the collecting mode we use this information to
- * decide what types to import and what not to.
- */
- public JFormatter t(JClass type) {
- switch(mode) {
- case PRINTING:
- // many of the JTypes in this list are either primitive or belong to package java
- // so we don't need a FQCN
- if(importedClasses.contains(type)) {
- p(type.name()); // FQCN imported or not necessary, so generate short name
- } else {
- if(type.outer()!=null)
- t(type.outer()).p('.').p(type.name());
- else
- p(type.fullName()); // collision was detected, so generate FQCN
- }
- break;
- case COLLECTING:
- final String shortName = type.name();
- if(collectedReferences.containsKey(shortName)) {
- collectedReferences.get(shortName).add(type);
- } else {
- ReferenceList tl = new ReferenceList();
- tl.add(type);
- collectedReferences.put(shortName, tl);
- }
- break;
- }
- return this;
- }
-
- /**
- * Print an identifier
- */
- public JFormatter id(String id) {
- switch(mode) {
- case PRINTING:
- p(id);
- break;
- case COLLECTING:
- // see if there is a type name that collides with this id
- if(collectedReferences.containsKey(id)) {
- if( !collectedReferences.get(id).getClasses().isEmpty() ) {
- for( JClass type : collectedReferences.get(id).getClasses() ) {
- if (type.outer()!=null) {
- collectedReferences.get(id).setId(false);
- return this;
- }
- }
- }
- collectedReferences.get(id).setId(true);
- } else {
- // not a type, but we need to create a place holder to
- // see if there might be a collision with a type
- ReferenceList tl = new ReferenceList();
- tl.setId(true);
- collectedReferences.put(id, tl);
- }
- break;
- }
- return this;
- }
-
- /**
- * Print a new line into the stream
- */
- public JFormatter nl() {
- if(mode==Mode.PRINTING) {
- pw.println();
- lastChar = 0;
- atBeginningOfLine = true;
- }
- return this;
- }
-
- /**
- * Cause the JGenerable object to generate source for iteself
- *
- * @param g the JGenerable object
- */
- public JFormatter g(JGenerable g) {
- g.generate(this);
- return this;
- }
-
- /**
- * Produces {@link JGenerable}s separated by ','
- */
- public JFormatter g(Collection<? extends JGenerable> list) {
- boolean first = true;
- if(!list.isEmpty()) {
- for (JGenerable item : list) {
- if (!first)
- p(',');
- g(item);
- first = false;
- }
- }
- return this;
- }
-
- /**
- * Cause the JDeclaration to generate source for itself
- *
- * @param d the JDeclaration object
- */
- public JFormatter d(JDeclaration d) {
- d.declare(this);
- return this;
- }
-
- /**
- * Cause the JStatement to generate source for itself
- *
- * @param s the JStatement object
- */
- public JFormatter s(JStatement s) {
- s.state(this);
- return this;
- }
-
- /**
- * Cause the JVar to generate source for itself
- *
- * @param v the JVar object
- */
- public JFormatter b(JVar v) {
- v.bind(this);
- return this;
- }
-
- /**
- * Generates the whole source code out of the specified class.
- */
- void write(JDefinedClass c) {
- // first collect all the types and identifiers
- mode = Mode.COLLECTING;
- d(c);
-
- javaLang = c.owner()._package("java.lang");
-
- // collate type names and identifiers to determine which types can be imported
- for( ReferenceList tl : collectedReferences.values() ) {
- if(!tl.collisions(c) && !tl.isId()) {
- assert tl.getClasses().size() == 1;
-
- // add to list of collected types
- importedClasses.add(tl.getClasses().get(0));
- }
- }
-
- // the class itself that we will be generating is always accessible
- importedClasses.add(c);
-
- // then print the declaration
- mode = Mode.PRINTING;
-
- assert c.parentContainer().isPackage() : "this method is only for a pacakge-level class";
- JPackage pkg = (JPackage) c.parentContainer();
- if (!pkg.isUnnamed()) {
- nl().d(pkg);
- nl();
- }
-
- // generate import statements
- JClass[] imports = importedClasses.toArray(new JClass[importedClasses.size()]);
- Arrays.sort(imports);
- for (JClass clazz : imports) {
- // suppress import statements for primitive types, built-in types,
- // types in the root package, and types in
- // the same package as the current type
- if(!supressImport(clazz, c)) {
- if (clazz instanceof JNarrowedClass) {
- clazz = clazz.erasure();
- }
-
- p("import").p(clazz.fullName()).p(';').nl();
- }
- }
- nl();
-
- d(c);
- }
-
- /**
- * determine if an import statement should be supressed
- *
- * @param clazz JType that may or may not have an import
- * @param c JType that is the current class being processed
- * @return true if an import statement should be suppressed, false otherwise
- */
- private boolean supressImport(JClass clazz, JClass c) {
- if (clazz instanceof JNarrowedClass) {
- clazz = clazz.erasure();
- }
- if (clazz instanceof JAnonymousClass) {
- clazz = clazz._extends();
- }
-
- if(clazz._package().isUnnamed())
- return true;
-
- final String packageName = clazz._package().name();
- if(packageName.equals("java.lang"))
- return true; // no need to explicitly import java.lang classes
-
- if (clazz._package() == c._package()){
- // inner classes require an import stmt.
- // All other pkg local classes do not need an
- // import stmt for ref.
- if(clazz.outer()==null) {
- return true; // no need to explicitly import a class into itself
- }
- }
- return false;
- }
-
- private JPackage javaLang;
-
-
-
- /**
- * Special character token we use to differenciate '>' as an operator and
- * '>' as the end of the type arguments. The former uses '>' and it requires
- * a preceding whitespace. The latter uses this, and it does not have a preceding
- * whitespace.
- */
- /*package*/ static final char CLOSE_TYPE_ARGS = '\uFFFF';
-
- /**
- * Used during the optimization of class imports.
- *
- * List of {@link JClass}es whose short name is the same.
- *
- * @author Ryan.Shoemaker@Sun.COM
- */
- final class ReferenceList {
- private final ArrayList<JClass> classes = new ArrayList<JClass>();
-
- /** true if this name is used as an identifier (like a variable name.) **/
- private boolean id;
-
- /**
- * Returns true if the symbol represented by the short name
- * is "importable".
- */
- public boolean collisions(JDefinedClass enclosingClass) {
- // special case where a generated type collides with a type in package java
-
- // more than one type with the same name
- if(classes.size() > 1)
- return true;
-
- // an id and (at least one) type with the same name
- if(id && classes.size() != 0)
- return true;
-
- for(JClass c : classes) {
- if (c instanceof JAnonymousClass) {
- c = c._extends();
- }
- if(c._package()==javaLang) {
- // make sure that there's no other class with this name within the same package
- Iterator<JDefinedClass> itr = enclosingClass._package().classes();
- while(itr.hasNext()) {
- // even if this is the only "String" class we use,
- // if the class called "String" is in the same package,
- // we still need to import it.
- JDefinedClass n = itr.next();
- if(n.name().equals(c.name()))
- return true; //collision
- }
- }
- if(c.outer()!=null)
- return true; // avoid importing inner class to work around 6431987. Also see jaxb issue 166
- }
-
- return false;
- }
-
- public void add(JClass clazz) {
- if(!classes.contains(clazz))
- classes.add(clazz);
- }
-
- public List<JClass> getClasses() {
- return classes;
- }
-
- public void setId(boolean value) {
- id = value;
- }
-
- /**
- * Return true iff this is strictly an id, meaning that there
- * are no collisions with type names.
- */
- public boolean isId() {
- return id && classes.size() == 0;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JGenerable.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JGenerable.java
deleted file mode 100644
index 90cd1916..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JGenerable.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * Common interface for code components that can generate
- * uses of themselves.
- */
-
-public interface JGenerable {
-
- public void generate(JFormatter f);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JGenerifiable.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JGenerifiable.java
deleted file mode 100644
index 73ce03cc..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JGenerifiable.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-/**
- * Declarations that can have type variables.
- *
- * Something that can be made into a generic.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface JGenerifiable {
- /**
- * Adds a new type variable to this declaration.
- */
- JTypeVar generify( String name );
-
- /**
- * Adds a new type variable to this declaration with a bound.
- */
- JTypeVar generify( String name, Class<?> bound );
-
- /**
- * Adds a new type variable to this declaration with a bound.
- */
- JTypeVar generify( String name, JClass bound );
-
- /**
- * Iterates all the type parameters of this class/interface.
- */
- JTypeVar[] typeParams();
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JGenerifiableImpl.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JGenerifiableImpl.java
deleted file mode 100644
index a4e16e68..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JGenerifiableImpl.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Implementation of {@link JGenerifiable}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-abstract class JGenerifiableImpl implements JGenerifiable, JDeclaration {
-
- /** Lazily created list of {@link JTypeVar}s. */
- private List<JTypeVar> typeVariables = null;
-
- protected abstract JCodeModel owner();
-
- public void declare( JFormatter f ) {
- if(typeVariables!=null) {
- f.p('<');
- for (int i = 0; i < typeVariables.size(); i++) {
- if(i!=0) f.p(',');
- f.d(typeVariables.get(i));
- }
- f.p('>');
- }
- }
-
-
- public JTypeVar generify(String name) {
- JTypeVar v = new JTypeVar(owner(),name);
- if(typeVariables==null)
- typeVariables = new ArrayList<JTypeVar>(3);
- typeVariables.add(v);
- return v;
- }
-
- public JTypeVar generify(String name, Class<?> bound) {
- return generify(name,owner().ref(bound));
- }
-
- public JTypeVar generify(String name, JClass bound) {
- return generify(name).bound(bound);
- }
-
- public JTypeVar[] typeParams() {
- if(typeVariables==null)
- return JTypeVar.EMPTY_ARRAY;
- else
- return typeVariables.toArray(new JTypeVar[typeVariables.size()]);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JInvocation.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JInvocation.java
deleted file mode 100644
index 1cab16ff..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JInvocation.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * JMethod invocation
- */
-public final class JInvocation extends JExpressionImpl implements JStatement {
-
- /**
- * Object expression upon which this method will be invoked, or null if
- * this is a constructor invocation
- */
- private JGenerable object;
-
- /**
- * Name of the method to be invoked.
- * Either this field is set, or {@link #method}, or {@link #type} (in which case it's a
- * constructor invocation.)
- * This allows {@link JMethod#name(String) the name of the method to be changed later}.
- */
- private String name;
-
- private JMethod method;
-
- private boolean isConstructor = false;
-
- /**
- * List of argument expressions for this method invocation
- */
- private List<JExpression> args = new ArrayList<JExpression>();
-
- /**
- * If isConstructor==true, this field keeps the type to be created.
- */
- private JType type = null;
-
- /**
- * Invokes a method on an object.
- *
- * @param object
- * JExpression for the object upon which
- * the named method will be invoked,
- * or null if none
- *
- * @param name
- * Name of method to invoke
- */
- JInvocation(JExpression object, String name) {
- this( (JGenerable)object, name );
- }
-
- JInvocation(JExpression object, JMethod method) {
- this( (JGenerable)object, method );
- }
-
- /**
- * Invokes a static method on a class.
- */
- JInvocation(JClass type, String name) {
- this( (JGenerable)type, name );
- }
-
- JInvocation(JClass type, JMethod method) {
- this( (JGenerable)type, method );
- }
-
- private JInvocation(JGenerable object, String name) {
- this.object = object;
- if (name.indexOf('.') >= 0)
- throw new IllegalArgumentException("method name contains '.': " + name);
- this.name = name;
- }
-
- private JInvocation(JGenerable object, JMethod method) {
- this.object = object;
- this.method =method;
- }
-
- /**
- * Invokes a constructor of an object (i.e., creates
- * a new object.)
- *
- * @param c
- * Type of the object to be created. If this type is
- * an array type, added arguments are treated as array
- * initializer. Thus you can create an expression like
- * <code>new int[]{1,2,3,4,5}</code>.
- */
- JInvocation(JType c) {
- this.isConstructor = true;
- this.type = c;
- }
-
- /**
- * Add an expression to this invocation's argument list
- *
- * @param arg
- * Argument to add to argument list
- */
- public JInvocation arg(JExpression arg) {
- if(arg==null) throw new IllegalArgumentException();
- args.add(arg);
- return this;
- }
-
- /**
- * Adds a literal argument.
- *
- * Short for {@code arg(JExpr.lit(v))}
- */
- public JInvocation arg(String v) {
- return arg(JExpr.lit(v));
- }
-
- /**
- * Returns all arguments of the invocation.
- * @return
- * If there's no arguments, an empty array will be returned.
- */
- public JExpression[] listArgs() {
- return args.toArray(new JExpression[args.size()]);
- }
-
- public void generate(JFormatter f) {
- if (isConstructor && type.isArray()) {
- // [RESULT] new T[]{arg1,arg2,arg3,...};
- f.p("new").g(type).p('{');
- } else {
- if (isConstructor)
- f.p("new").g(type).p('(');
- else {
- String name = this.name;
- if(name==null) name=this.method.name();
-
- if (object != null)
- f.g(object).p('.').p(name).p('(');
- else
- f.id(name).p('(');
- }
- }
-
- f.g(args);
-
- if (isConstructor && type.isArray())
- f.p('}');
- else
- f.p(')');
-
- if( type instanceof JDefinedClass && ((JDefinedClass)type).isAnonymous() ) {
- ((JAnonymousClass)type).declareBody(f);
- }
- }
-
- public void state(JFormatter f) {
- f.g(this).p(';').nl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JJavaName.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JJavaName.java
deleted file mode 100644
index 67e8fbc4..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JJavaName.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.HashSet;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Utility methods that convert arbitrary strings into Java identifiers.
- */
-public class JJavaName {
-
-
- /**
- * Checks if a given string is usable as a Java identifier.
- */
- public static boolean isJavaIdentifier(String s) {
- if(s.length()==0) return false;
- if( reservedKeywords.contains(s) ) return false;
-
- if(!Character.isJavaIdentifierStart(s.charAt(0))) return false;
-
- for (int i = 1; i < s.length(); i++)
- if (!Character.isJavaIdentifierPart(s.charAt(i)))
- return false;
-
- return true;
- }
-
- /**
- * Checks if the given string is a valid fully qualified name.
- */
- public static boolean isFullyQualifiedClassName(String s) {
- return isJavaPackageName(s);
- }
-
- /**
- * Checks if the given string is a valid Java package name.
- */
- public static boolean isJavaPackageName(String s) {
- while(s.length()!=0) {
- int idx = s.indexOf('.');
- if(idx==-1) idx=s.length();
- if( !isJavaIdentifier(s.substring(0,idx)) )
- return false;
-
- s = s.substring(idx);
- if(s.length()!=0) s = s.substring(1); // remove '.'
- }
- return true;
- }
-
- /**
- * <b>Experimental API:</b> converts an English word into a plural form.
- *
- * @param word
- * a word, such as "child", "apple". Must not be null.
- * It accepts word concatanation forms
- * that are common in programming languages, such as "my_child", "MyChild",
- * "myChild", "MY-CHILD", "CODE003-child", etc, and mostly tries to do the right thing.
- * ("my_children","MyChildren","myChildren", and "MY-CHILDREN", "CODE003-children" respectively)
- * <p>
- * Although this method only works for English words, it handles non-English
- * words gracefully (by just returning it as-is.) For example, &#x65E5;&#x672C;&#x8A9E;
- * will be returned as-is without modified, not "&#x65E5;&#x672C;&#x8A9E;s"
- * <p>
- * This method doesn't handle suffixes very well. For example, passing
- * "person56" will return "person56s", not "people56".
- *
- * @return
- * always non-null.
- */
- public static String getPluralForm(String word) {
- // remember the casing of the word
- boolean allUpper = true;
-
- // check if the word looks like an English word.
- // if we see non-ASCII characters, abort
- for(int i=0; i<word.length(); i++ ) {
- char ch = word.charAt(i);
- if(ch >=0x80)
- return word;
-
- // note that this isn't the same as allUpper &= Character.isUpperCase(ch);
- allUpper &= !Character.isLowerCase(ch);
- }
-
- for (Entry e : TABLE) {
- String r = e.apply(word);
- if(r!=null) {
- if(allUpper) r=r.toUpperCase();
- return r;
- }
- }
-
- // failed
- return word;
- }
-
-
- /** All reserved keywords of Java. */
- private static HashSet<String> reservedKeywords = new HashSet<String>();
-
- static {
- // see http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html
- String[] words = new String[]{
- "abstract",
- "boolean",
- "break",
- "byte",
- "case",
- "catch",
- "char",
- "class",
- "const",
- "continue",
- "default",
- "do",
- "double",
- "else",
- "extends",
- "final",
- "finally",
- "float",
- "for",
- "goto",
- "if",
- "implements",
- "import",
- "instanceof",
- "int",
- "interface",
- "long",
- "native",
- "new",
- "package",
- "private",
- "protected",
- "public",
- "return",
- "short",
- "static",
- "strictfp",
- "super",
- "switch",
- "synchronized",
- "this",
- "throw",
- "throws",
- "transient",
- "try",
- "void",
- "volatile",
- "while",
-
- // technically these are not reserved words but they cannot be used as identifiers.
- "true",
- "false",
- "null",
-
- // and I believe assert is also a new keyword
- "assert",
-
- // and 5.0 keywords
- "enum"
- };
- for (String w : words)
- reservedKeywords.add(w);
- }
-
-
- private static class Entry {
- private final Pattern pattern;
- private final String replacement;
-
- public Entry(String pattern, String replacement) {
- this.pattern = Pattern.compile(pattern,Pattern.CASE_INSENSITIVE);
- this.replacement = replacement;
- }
-
- String apply(String word) {
- Matcher m = pattern.matcher(word);
- if(m.matches()) {
- StringBuffer buf = new StringBuffer();
- m.appendReplacement(buf,replacement);
- return buf.toString();
- } else {
- return null;
- }
- }
- }
-
- private static final Entry[] TABLE;
-
- static {
- String[] source = {
- "(.*)child","$1children",
- "(.+)fe","$1ves",
- "(.*)mouse","$1mise",
- "(.+)f","$1ves",
- "(.+)ch","$1ches",
- "(.+)sh","$1shes",
- "(.*)tooth","$1teeth",
- "(.+)um","$1a",
- "(.+)an","$1en",
- "(.+)ato","$1atoes",
- "(.*)basis","$1bases",
- "(.*)axis","$1axes",
- "(.+)is","$1ises",
- "(.+)ss","$1sses",
- "(.+)us","$1uses",
- "(.+)s","$1s",
- "(.*)foot","$1feet",
- "(.+)ix","$1ixes",
- "(.+)ex","$1ices",
- "(.+)nx","$1nxes",
- "(.+)x","$1xes",
- "(.+)y","$1ies",
- "(.+)","$1s",
- };
-
- TABLE = new Entry[source.length/2];
-
- for( int i=0; i<source.length; i+=2 ) {
- TABLE[i/2] = new Entry(source[i],source[i+1]);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JLabel.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JLabel.java
deleted file mode 100644
index 0a2d0fe7..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JLabel.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-/**
- * Label that can be used for continue and break.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class JLabel implements JStatement {
-
- final String label;
-
- /**
- * JBreak constructor
- *
- * @param _label
- * break label or null.
- */
- JLabel( String _label ) {
- this.label = _label;
- }
-
- public void state(JFormatter f) {
- f.p(label+':').nl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JMethod.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JMethod.java
deleted file mode 100644
index 5743f02d..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JMethod.java
+++ /dev/null
@@ -1,474 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.Collections;
-import java.util.Collection;
-
-import com.sun.codemodel.internal.util.ClassNameComparator;
-
-/**
- * Java method.
- */
-public class JMethod extends JGenerifiableImpl implements JDeclaration, JAnnotatable, JDocCommentable {
-
- /**
- * Modifiers for this method
- */
- private JMods mods;
-
- /**
- * Return type for this method
- */
- private JType type = null;
-
- /**
- * Name of this method
- */
- private String name = null;
-
- /**
- * List of parameters for this method's declaration
- */
- private final List<JVar> params = new ArrayList<JVar>();
-
- /**
- * Set of exceptions that this method may throw.
- * A set instance lazily created.
- */
- private Set<JClass> _throws;
-
- /**
- * JBlock of statements that makes up the body this method
- */
- private JBlock body = null;
-
- private JDefinedClass outer;
-
- /**
- * javadoc comments for this JMethod
- */
- private JDocComment jdoc = null;
-
- /**
- * Variable parameter for this method's varargs declaration
- * introduced in J2SE 1.5
- */
- private JVar varParam = null;
-
- /**
- * Annotations on this variable. Lazily created.
- */
- private List<JAnnotationUse> annotations = null;
-
-
- private boolean isConstructor() {
- return type == null;
- }
-
- /** To set the default value for the
- * annotation member
- */
- private JExpression defaultValue = null;
-
-
- /**
- * JMethod constructor
- *
- * @param mods
- * Modifiers for this method's declaration
- *
- * @param type
- * Return type for the method
- *
- * @param name
- * Name of this method
- */
- JMethod(JDefinedClass outer, int mods, JType type, String name) {
- this.mods = JMods.forMethod(mods);
- this.type = type;
- this.name = name;
- this.outer = outer;
- }
-
- /**
- * Constructor constructor
- *
- * @param mods
- * Modifiers for this constructor's declaration
- *
- * @param _class
- * JClass containing this constructor
- */
- JMethod(int mods, JDefinedClass _class) {
- this.mods = JMods.forMethod(mods);
- this.type = null;
- this.name = _class.name();
- this.outer = _class;
- }
-
- private Set<JClass> getThrows() {
- if(_throws==null)
- _throws = new TreeSet<JClass>(ClassNameComparator.theInstance);
- return _throws;
- }
-
- /**
- * Add an exception to the list of exceptions that this
- * method may throw.
- *
- * @param exception
- * Name of an exception that this method may throw
- */
- public JMethod _throws(JClass exception) {
- getThrows().add(exception);
- return this;
- }
-
- public JMethod _throws(Class<? extends Throwable> exception) {
- return _throws(outer.owner().ref(exception));
- }
-
- /**
- * Returns the list of variable of this method.
- *
- * @return List of parameters of this method. This list is not modifiable.
- */
- public List<JVar> params() {
- return Collections.<JVar>unmodifiableList(params);
- }
-
- /**
- * Add the specified variable to the list of parameters
- * for this method signature.
- *
- * @param type
- * JType of the parameter being added
- *
- * @param name
- * Name of the parameter being added
- *
- * @return New parameter variable
- */
- public JVar param(int mods, JType type, String name) {
- JVar v = new JVar(JMods.forVar(mods), type, name, null);
- params.add(v);
- return v;
- }
-
- public JVar param(JType type, String name) {
- return param(JMod.NONE, type, name);
- }
-
- public JVar param(int mods, Class<?> type, String name) {
- return param(mods, outer.owner()._ref(type), name);
- }
-
- public JVar param(Class<?> type, String name) {
- return param(outer.owner()._ref(type), name);
- }
-
- /**
- * @see #varParam(JType, String)
- */
- public JVar varParam(Class<?> type, String name) {
- return varParam(outer.owner()._ref(type),name);
- }
-
- /**
- * Add the specified variable argument to the list of parameters
- * for this method signature.
- *
- * @param type
- * Type of the parameter being added.
- *
- * @param name
- * Name of the parameter being added
- *
- * @return the variable parameter
- *
- * @throws IllegalStateException
- * If this method is called twice.
- * varargs in J2SE 1.5 can appear only once in the
- * method signature.
- */
- public JVar varParam(JType type, String name) {
- if (!hasVarArgs()) {
-
- varParam =
- new JVar(
- JMods.forVar(JMod.NONE),
- type.array(),
- name,
- null);
- return varParam;
- } else {
- throw new IllegalStateException(
- "Cannot have two varargs in a method,\n"
- + "Check if varParam method of JMethod is"
- + " invoked more than once");
-
- }
-
- }
-
- /**
- * Adds an annotation to this variable.
- * @param clazz
- * The annotation class to annotate the field with
- */
- public JAnnotationUse annotate(JClass clazz){
- if(annotations==null)
- annotations = new ArrayList<JAnnotationUse>();
- JAnnotationUse a = new JAnnotationUse(clazz);
- annotations.add(a);
- return a;
- }
-
- /**
- * Adds an annotation to this variable.
- *
- * @param clazz
- * The annotation class to annotate the field with
- */
- public JAnnotationUse annotate(Class <? extends Annotation> clazz){
- return annotate(owner().ref(clazz));
- }
-
- public <W extends JAnnotationWriter> W annotate2(Class<W> clazz) {
- return TypedAnnotationWriter.create(clazz,this);
- }
-
- public Collection<JAnnotationUse> annotations() {
- if (annotations == null)
- annotations = new ArrayList<JAnnotationUse>();
- return Collections.unmodifiableList(annotations);
- }
-
- /**
- * Check if there are any varargs declared
- * for this method signature.
- */
- public boolean hasVarArgs() {
- return this.varParam!=null;
- }
-
- public String name() {
- return name;
- }
-
- /**
- * Changes the name of the method.
- */
- public void name(String n) {
- this.name = n;
- }
-
- /**
- * Returns the return type.
- */
- public JType type() {
- return type;
- }
-
- /**
- * Overrides the return type.
- */
- public void type(JType t) {
- this.type = t;
- }
-
- /**
- * Returns all the parameter types in an array.
- * @return
- * If there's no parameter, an empty array will be returned.
- */
- public JType[] listParamTypes() {
- JType[] r = new JType[params.size()];
- for (int i = 0; i < r.length; i++)
- r[i] = params.get(i).type();
- return r;
- }
-
- /**
- * Returns the varags parameter type.
- * @return
- * If there's no vararg parameter type, null will be returned.
- */
- public JType listVarParamType() {
- if (varParam != null)
- return varParam.type();
- else
- return null;
- }
-
- /**
- * Returns all the parameters in an array.
- * @return
- * If there's no parameter, an empty array will be returned.
- */
- public JVar[] listParams() {
- return params.toArray(new JVar[params.size()]);
- }
-
- /**
- * Returns the variable parameter
- * @return
- * If there's no parameter, null will be returned.
- */
- public JVar listVarParam() {
- return varParam;
- }
-
- /**
- * Returns true if the method has the specified signature.
- */
- public boolean hasSignature(JType[] argTypes) {
- JVar[] p = listParams();
- if (p.length != argTypes.length)
- return false;
-
- for (int i = 0; i < p.length; i++)
- if (!p[i].type().equals(argTypes[i]))
- return false;
-
- return true;
- }
-
- /**
- * Get the block that makes up body of this method
- *
- * @return Body of method
- */
- public JBlock body() {
- if (body == null)
- body = new JBlock();
- return body;
- }
-
- /**
- * Specify the default value for this annotation member
- * @param value
- * Default value for the annotation member
- *
- */
- public void declareDefaultValue(JExpression value){
- this.defaultValue = value;
- }
-
- /**
- * Creates, if necessary, and returns the class javadoc for this
- * JDefinedClass
- *
- * @return JDocComment containing javadocs for this class
- */
- public JDocComment javadoc() {
- if (jdoc == null)
- jdoc = new JDocComment(owner());
- return jdoc;
- }
-
- public void declare(JFormatter f) {
- if (jdoc != null)
- f.g(jdoc);
-
- if (annotations != null){
- for (JAnnotationUse a : annotations)
- f.g(a).nl();
- }
-
- f.g(mods);
-
- // declare the generics parameters
- super.declare(f);
-
- if (!isConstructor())
- f.g(type);
- f.id(name).p('(').i();
- // when parameters are printed in new lines, we want them to be indented.
- // there's a good chance no newlines happen, too, but just in case it does.
- boolean first = true;
- for (JVar var : params) {
- if (!first)
- f.p(',');
- if(var.isAnnotated())
- f.nl();
- f.b(var);
- first = false;
- }
- if (hasVarArgs()) {
- if (!first)
- f.p(',');
- f.g(varParam.type().elementType());
- f.p("... ");
- f.id(varParam.name());
- }
-
- f.o().p(')');
- if (_throws!=null && !_throws.isEmpty()) {
- f.nl().i().p("throws").g(_throws).nl().o();
- }
-
- if (defaultValue != null) {
- f.p("default ");
- f.g(defaultValue);
- }
- if (body != null) {
- f.s(body);
- } else if (
- !outer.isInterface() && !outer.isAnnotationTypeDeclaration() && !mods.isAbstract() && !mods.isNative()) {
- // Print an empty body for non-native, non-abstract methods
- f.s(new JBlock());
- } else {
- f.p(';').nl();
- }
- }
-
- /**
- * @return
- * the current modifiers of this method.
- * Always return non-null valid object.
- */
- public JMods mods() {
- return mods;
- }
-
- /**
- * @deprecated use {@link #mods()}
- */
- public JMods getMods() {
- return mods;
- }
-
- protected JCodeModel owner() {
- return outer.owner();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JMod.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JMod.java
deleted file mode 100644
index 3a4b5881..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JMod.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * Modifier constants.
- */
-public final class JMod {
- public final static int NONE = 0x000;
- public final static int PUBLIC = 0x001;
- public final static int PROTECTED = 0x002;
- public final static int PRIVATE = 0x004;
- public final static int FINAL = 0x008;
- public final static int STATIC = 0x010;
- public final static int ABSTRACT = 0x020;
- public final static int NATIVE = 0x040;
- public final static int SYNCHRONIZED = 0x080;
- public final static int TRANSIENT = 0x100;
- public final static int VOLATILE = 0x200;
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JMods.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JMods.java
deleted file mode 100644
index 85b2ddbd..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JMods.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-/**
- * Modifier groups.
- */
-public class JMods implements JGenerable {
-
-//
-// mask
-//
- private static int VAR = JMod.FINAL;
- private static int FIELD = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED
- | JMod.STATIC | JMod.FINAL
- | JMod.TRANSIENT | JMod.VOLATILE);
- private static int METHOD = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED | JMod.FINAL
- | JMod.ABSTRACT | JMod.STATIC | JMod.NATIVE | JMod.SYNCHRONIZED);
- private static int CLASS = (JMod.PUBLIC | JMod.PRIVATE | JMod.PROTECTED
- | JMod.STATIC | JMod.FINAL | JMod.ABSTRACT);
- private static int INTERFACE = JMod.PUBLIC;
- /** bit-packed representation of modifiers. */
- private int mods;
-
- private JMods(int mods) {
- this.mods = mods;
- }
-
- /**
- * Gets the bit-packed representaion of modifiers.
- */
- public int getValue() {
- return mods;
- }
-
- private static void check(int mods, int legal, String what) {
- if ((mods & ~legal) != 0) {
- throw new IllegalArgumentException("Illegal modifiers for "
- + what + ": "
- + new JMods(mods).toString());
- }
- /* ## check for illegal combinations too */
- }
-
- static JMods forVar(int mods) {
- check(mods, VAR, "variable");
- return new JMods(mods);
- }
-
- static JMods forField(int mods) {
- check(mods, FIELD, "field");
- return new JMods(mods);
- }
-
- static JMods forMethod(int mods) {
- check(mods, METHOD, "method");
- return new JMods(mods);
- }
-
- static JMods forClass(int mods) {
- check(mods, CLASS, "class");
- return new JMods(mods);
- }
-
- static JMods forInterface(int mods) {
- check(mods, INTERFACE, "class");
- return new JMods(mods);
- }
-
- public boolean isAbstract() {
- return (mods & JMod.ABSTRACT) != 0;
- }
-
- public boolean isNative() {
- return (mods & JMod.NATIVE) != 0;
- }
-
- public boolean isSynchronized() {
- return (mods & JMod.SYNCHRONIZED) != 0;
- }
-
- public void setSynchronized(boolean newValue) {
- setFlag(JMod.SYNCHRONIZED, newValue);
- }
-
- public void setPrivate() {
- setFlag(JMod.PUBLIC, false);
- setFlag(JMod.PROTECTED, false);
- setFlag(JMod.PRIVATE, true);
- }
-
- public void setProtected() {
- setFlag(JMod.PUBLIC, false);
- setFlag(JMod.PROTECTED, true);
- setFlag(JMod.PRIVATE, false);
- }
-
- public void setPublic() {
- setFlag(JMod.PUBLIC, true);
- setFlag(JMod.PROTECTED, false);
- setFlag(JMod.PRIVATE, false);
- }
-
- public void setFinal(boolean newValue) {
- setFlag(JMod.FINAL, newValue);
- }
-
- private void setFlag(int bit, boolean newValue) {
- mods = (mods & ~bit) | (newValue ? bit : 0);
- }
-
- public void generate(JFormatter f) {
- if ((mods & JMod.PUBLIC) != 0) f.p("public");
- if ((mods & JMod.PROTECTED) != 0) f.p("protected");
- if ((mods & JMod.PRIVATE) != 0) f.p("private");
- if ((mods & JMod.FINAL) != 0) f.p("final");
- if ((mods & JMod.STATIC) != 0) f.p("static");
- if ((mods & JMod.ABSTRACT) != 0) f.p("abstract");
- if ((mods & JMod.NATIVE) != 0) f.p("native");
- if ((mods & JMod.SYNCHRONIZED) != 0) f.p("synchronized");
- if ((mods & JMod.TRANSIENT) != 0) f.p("transient");
- if ((mods & JMod.VOLATILE) != 0) f.p("volatile");
- }
-
- @Override
- public String toString() {
- StringWriter s = new StringWriter();
- JFormatter f = new JFormatter(new PrintWriter(s));
- this.generate(f);
- return s.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JNarrowedClass.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JNarrowedClass.java
deleted file mode 100644
index 532d38d2..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JNarrowedClass.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Collections;
-import java.util.ArrayList;
-
-/**
- * Represents X&lt;Y>.
- *
- * TODO: consider separating the decl and the use.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-class JNarrowedClass extends JClass {
- /**
- * A generic class with type parameters.
- */
- final JClass basis;
- /**
- * Arguments to those parameters.
- */
- private final List<JClass> args;
-
- JNarrowedClass(JClass basis, JClass arg) {
- this(basis,Collections.singletonList(arg));
- }
-
- JNarrowedClass(JClass basis, List<JClass> args) {
- super(basis.owner());
- this.basis = basis;
- assert !(basis instanceof JNarrowedClass);
- this.args = args;
- }
-
- @Override
- public JClass narrow( JClass clazz ) {
- List<JClass> newArgs = new ArrayList<JClass>(args);
- newArgs.add(clazz);
- return new JNarrowedClass(basis,newArgs);
- }
-
- @Override
- public JClass narrow( JClass... clazz ) {
- List<JClass> newArgs = new ArrayList<JClass>(args);
- newArgs.addAll(Arrays.asList(clazz));
- return new JNarrowedClass(basis,newArgs);
- }
-
- public String name() {
- StringBuilder buf = new StringBuilder();
- buf.append(basis.name());
- buf.append('<');
- boolean first = true;
- for (JClass c : args) {
- if(first)
- first = false;
- else
- buf.append(',');
- buf.append(c.name());
- }
- buf.append('>');
- return buf.toString();
- }
-
- public String fullName() {
- StringBuilder buf = new StringBuilder();
- buf.append(basis.fullName());
- buf.append('<');
- boolean first = true;
- for (JClass c : args) {
- if(first)
- first = false;
- else
- buf.append(',');
- buf.append(c.fullName());
- }
- buf.append('>');
- return buf.toString();
- }
-
- @Override
- public String binaryName() {
- StringBuilder buf = new StringBuilder();
- buf.append(basis.binaryName());
- buf.append('<');
- boolean first = true;
- for (JClass c : args) {
- if(first)
- first = false;
- else
- buf.append(',');
- buf.append(c.binaryName());
- }
- buf.append('>');
- return buf.toString();
- }
-
- @Override
- public void generate(JFormatter f) {
- f.t(basis).p('<').g(args).p(JFormatter.CLOSE_TYPE_ARGS);
- }
-
- @Override
- void printLink(JFormatter f) {
- basis.printLink(f);
- f.p("{@code <}");
- boolean first = true;
- for( JClass c : args ) {
- if(first)
- first = false;
- else
- f.p(',');
- c.printLink(f);
- }
- f.p("{@code >}");
- }
-
- public JPackage _package() {
- return basis._package();
- }
-
- public JClass _extends() {
- JClass base = basis._extends();
- if(base==null) return base;
- return base.substituteParams(basis.typeParams(),args);
- }
-
- public Iterator<JClass> _implements() {
- return new Iterator<JClass>() {
- private final Iterator<JClass> core = basis._implements();
- public void remove() {
- core.remove();
- }
- public JClass next() {
- return core.next().substituteParams(basis.typeParams(),args);
- }
- public boolean hasNext() {
- return core.hasNext();
- }
- };
- }
-
- @Override
- public JClass erasure() {
- return basis;
- }
-
- public boolean isInterface() {
- return basis.isInterface();
- }
-
- public boolean isAbstract() {
- return basis.isAbstract();
- }
-
- @Override
- public boolean isArray() {
- return false;
- }
-
-
- //
- // Equality is based on value
- //
-
- @Override
- public boolean equals(Object obj) {
- if(!(obj instanceof JNarrowedClass)) return false;
- return fullName().equals(((JClass)obj).fullName());
- }
-
- @Override
- public int hashCode() {
- return fullName().hashCode();
- }
-
- protected JClass substituteParams(JTypeVar[] variables, List<JClass> bindings) {
- JClass b = basis.substituteParams(variables,bindings);
- boolean different = b!=basis;
-
- List<JClass> clazz = new ArrayList<JClass>(args.size());
- for( int i=0; i<clazz.size(); i++ ) {
- JClass c = args.get(i).substituteParams(variables,bindings);
- clazz.set(i,c);
- different |= c != args.get(i);
- }
-
- if(different)
- return new JNarrowedClass(b,clazz);
- else
- return this;
- }
-
- @Override
- public List<JClass> getTypeParameters() {
- return args;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JNullType.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JNullType.java
deleted file mode 100644
index 836ba03e..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JNullType.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Special class object that represents the type of "null".
- *
- * <p>
- * Use this class with care.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class JNullType extends JClass {
-
- JNullType(JCodeModel _owner) {
- super(_owner);
- }
-
- public String name() { return "null"; }
- public String fullName() { return "null"; }
-
- public JPackage _package() { return owner()._package(""); }
-
- public JClass _extends() { return null; }
-
- public Iterator<JClass> _implements() {
- return Collections.<JClass>emptyList().iterator();
- }
-
- public boolean isInterface() { return false; }
- public boolean isAbstract() { return false; }
-
- protected JClass substituteParams(JTypeVar[] variables, List<JClass> bindings) {
- return this;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JOp.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JOp.java
deleted file mode 100644
index 58c374eb..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JOp.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * JClass for generating expressions containing operators
- */
-
-abstract public class JOp {
-
- private JOp() {
- }
-
-
- /**
- * Determine whether the top level of an expression involves an
- * operator.
- */
- static boolean hasTopOp(JExpression e) {
- return (e instanceof UnaryOp) || (e instanceof BinaryOp);
- }
-
- /* -- Unary operators -- */
-
- static private class UnaryOp extends JExpressionImpl {
-
- protected String op;
- protected JExpression e;
- protected boolean opFirst = true;
-
- UnaryOp(String op, JExpression e) {
- this.op = op;
- this.e = e;
- }
-
- UnaryOp(JExpression e, String op) {
- this.op = op;
- this.e = e;
- opFirst = false;
- }
-
- public void generate(JFormatter f) {
- if (opFirst)
- f.p('(').p(op).g(e).p(')');
- else
- f.p('(').g(e).p(op).p(')');
- }
-
- }
-
- public static JExpression minus(JExpression e) {
- return new UnaryOp("-", e);
- }
-
- /**
- * Logical not <tt>'!x'</tt>.
- */
- public static JExpression not(JExpression e) {
- if (e == JExpr.TRUE) return JExpr.FALSE;
- if (e == JExpr.FALSE) return JExpr.TRUE;
- return new UnaryOp("!", e);
- }
-
- public static JExpression complement(JExpression e) {
- return new UnaryOp("~", e);
- }
-
- static private class TightUnaryOp extends UnaryOp {
-
- TightUnaryOp(JExpression e, String op) {
- super(e, op);
- }
-
- public void generate(JFormatter f) {
- if (opFirst)
- f.p(op).g(e);
- else
- f.g(e).p(op);
- }
-
- }
-
- public static JExpression incr(JExpression e) {
- return new TightUnaryOp(e, "++");
- }
-
- public static JExpression decr(JExpression e) {
- return new TightUnaryOp(e, "--");
- }
-
-
- /* -- Binary operators -- */
-
- static private class BinaryOp extends JExpressionImpl {
-
- String op;
- JExpression left;
- JGenerable right;
-
- BinaryOp(String op, JExpression left, JGenerable right) {
- this.left = left;
- this.op = op;
- this.right = right;
- }
-
- public void generate(JFormatter f) {
- f.p('(').g(left).p(op).g(right).p(')');
- }
-
- }
-
- public static JExpression plus(JExpression left, JExpression right) {
- return new BinaryOp("+", left, right);
- }
-
- public static JExpression minus(JExpression left, JExpression right) {
- return new BinaryOp("-", left, right);
- }
-
- public static JExpression mul(JExpression left, JExpression right) {
- return new BinaryOp("*", left, right);
- }
-
- public static JExpression div(JExpression left, JExpression right) {
- return new BinaryOp("/", left, right);
- }
-
- public static JExpression mod(JExpression left, JExpression right) {
- return new BinaryOp("%", left, right);
- }
-
- public static JExpression shl(JExpression left, JExpression right) {
- return new BinaryOp("<<", left, right);
- }
-
- public static JExpression shr(JExpression left, JExpression right) {
- return new BinaryOp(">>", left, right);
- }
-
- public static JExpression shrz(JExpression left, JExpression right) {
- return new BinaryOp(">>>", left, right);
- }
-
- public static JExpression band(JExpression left, JExpression right) {
- return new BinaryOp("&", left, right);
- }
-
- public static JExpression bor(JExpression left, JExpression right) {
- return new BinaryOp("|", left, right);
- }
-
- public static JExpression cand(JExpression left, JExpression right) {
- if (left == JExpr.TRUE) return right;
- if (right == JExpr.TRUE) return left;
- if (left == JExpr.FALSE) return left; // JExpr.FALSE
- if (right == JExpr.FALSE) return right; // JExpr.FALSE
- return new BinaryOp("&&", left, right);
- }
-
- public static JExpression cor(JExpression left, JExpression right) {
- if (left == JExpr.TRUE) return left; // JExpr.TRUE
- if (right == JExpr.TRUE) return right; // JExpr.FALSE
- if (left == JExpr.FALSE) return right;
- if (right == JExpr.FALSE) return left;
- return new BinaryOp("||", left, right);
- }
-
- public static JExpression xor(JExpression left, JExpression right) {
- return new BinaryOp("^", left, right);
- }
-
- public static JExpression lt(JExpression left, JExpression right) {
- return new BinaryOp("<", left, right);
- }
-
- public static JExpression lte(JExpression left, JExpression right) {
- return new BinaryOp("<=", left, right);
- }
-
- public static JExpression gt(JExpression left, JExpression right) {
- return new BinaryOp(">", left, right);
- }
-
- public static JExpression gte(JExpression left, JExpression right) {
- return new BinaryOp(">=", left, right);
- }
-
- public static JExpression eq(JExpression left, JExpression right) {
- return new BinaryOp("==", left, right);
- }
-
- public static JExpression ne(JExpression left, JExpression right) {
- return new BinaryOp("!=", left, right);
- }
-
- public static JExpression _instanceof(JExpression left, JType right) {
- return new BinaryOp("instanceof", left, right);
- }
-
- /* -- Ternary operators -- */
-
- static private class TernaryOp extends JExpressionImpl {
-
- String op1;
- String op2;
- JExpression e1;
- JExpression e2;
- JExpression e3;
-
- TernaryOp(String op1, String op2,
- JExpression e1, JExpression e2, JExpression e3) {
- this.e1 = e1;
- this.op1 = op1;
- this.e2 = e2;
- this.op2 = op2;
- this.e3 = e3;
- }
-
- public void generate(JFormatter f) {
- f.p('(').g(e1).p(op1).g(e2).p(op2).g(e3).p(')');
- }
-
- }
-
- public static JExpression cond(JExpression cond,
- JExpression ifTrue, JExpression ifFalse) {
- return new TernaryOp("?", ":", cond, ifTrue, ifFalse);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JPackage.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JPackage.java
deleted file mode 100644
index 488c8da1..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JPackage.java
+++ /dev/null
@@ -1,474 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.io.BufferedOutputStream;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.io.Writer;
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.Collection;
-import java.util.Collections;
-
-
-/**
- * A Java package.
- */
-public final class JPackage implements JDeclaration, JGenerable, JClassContainer, JAnnotatable, Comparable<JPackage>, JDocCommentable {
-
- /**
- * Name of the package.
- * May be the empty string for the root package.
- */
- private String name;
-
- private final JCodeModel owner;
-
- /**
- * List of classes contained within this package keyed by their name.
- */
- private final Map<String,JDefinedClass> classes = new TreeMap<String,JDefinedClass>();
-
- /**
- * List of resources files inside this package.
- */
- private final Set<JResourceFile> resources = new HashSet<JResourceFile>();
-
- /**
- * All {@link JClass}s in this package keyed the upper case class name.
- *
- * This field is non-null only on Windows, to detect
- * "Foo" and "foo" as a collision.
- */
- private final Map<String,JDefinedClass> upperCaseClassMap;
-
- /**
- * Lazily created list of package annotations.
- */
- private List<JAnnotationUse> annotations = null;
-
- /**
- * package javadoc.
- */
- private JDocComment jdoc = null;
-
- /**
- * JPackage constructor
- *
- * @param name
- * Name of package
- *
- * @param cw The code writer being used to create this package
- *
- * @throws IllegalArgumentException
- * If each part of the package name is not a valid identifier
- */
- JPackage(String name, JCodeModel cw) {
- this.owner = cw;
- if (name.equals(".")) {
- String msg = "Package name . is not allowed";
- throw new IllegalArgumentException(msg);
- }
-
- if(JCodeModel.isCaseSensitiveFileSystem)
- upperCaseClassMap = null;
- else
- upperCaseClassMap = new HashMap<String,JDefinedClass>();
-
- this.name = name;
- }
-
-
- public JClassContainer parentContainer() {
- return parent();
- }
-
- /**
- * Gets the parent package, or null if this class is the root package.
- */
- public JPackage parent() {
- if(name.length()==0) return null;
-
- int idx = name.lastIndexOf('.');
- return owner._package(name.substring(0,idx));
- }
-
- public boolean isClass() { return false; }
- public boolean isPackage() { return true; }
- public JPackage getPackage() { return this; }
-
- /**
- * Add a class to this package.
- *
- * @param mods
- * Modifiers for this class declaration
- *
- * @param name
- * Name of class to be added to this package
- *
- * @return Newly generated class
- *
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
- */
- public JDefinedClass _class(int mods, String name) throws JClassAlreadyExistsException {
- return _class(mods,name,ClassType.CLASS);
- }
-
- /**
- * {@inheritDoc}
- * @deprecated
- */
- public JDefinedClass _class( int mods, String name, boolean isInterface ) throws JClassAlreadyExistsException {
- return _class(mods,name, isInterface?ClassType.INTERFACE:ClassType.CLASS );
- }
-
- public JDefinedClass _class( int mods, String name, ClassType classTypeVal ) throws JClassAlreadyExistsException {
- if(classes.containsKey(name))
- throw new JClassAlreadyExistsException(classes.get(name));
- else {
- // XXX problems caught in the NC constructor
- JDefinedClass c = new JDefinedClass(this, mods, name, classTypeVal);
-
- if( upperCaseClassMap!=null ) {
- JDefinedClass dc = upperCaseClassMap.get(name.toUpperCase());
- if(dc!=null)
- throw new JClassAlreadyExistsException(dc);
- upperCaseClassMap.put(name.toUpperCase(),c);
- }
- classes.put(name,c);
- return c;
- }
- }
-
- /**
- * Adds a public class to this package.
- */
- public JDefinedClass _class(String name) throws JClassAlreadyExistsException {
- return _class( JMod.PUBLIC, name );
- }
-
- /**
- * Gets a reference to the already created {@link JDefinedClass}.
- *
- * @return null
- * If the class is not yet created.
- */
- public JDefinedClass _getClass(String name) {
- if(classes.containsKey(name))
- return classes.get(name);
- else
- return null;
- }
-
- /**
- * Order is based on the lexicological order of the package name.
- */
- public int compareTo(JPackage that) {
- return this.name.compareTo(that.name);
- }
-
- /**
- * Add an interface to this package.
- *
- * @param mods
- * Modifiers for this interface declaration
- *
- * @param name
- * Name of interface to be added to this package
- *
- * @return Newly generated interface
- */
- public JDefinedClass _interface(int mods, String name) throws JClassAlreadyExistsException {
- return _class(mods,name,ClassType.INTERFACE);
- }
-
- /**
- * Adds a public interface to this package.
- */
- public JDefinedClass _interface(String name) throws JClassAlreadyExistsException {
- return _interface(JMod.PUBLIC, name);
- }
-
- /**
- * Add an annotationType Declaration to this package
- * @param name
- * Name of the annotation Type declaration to be added to this package
- * @return
- * newly created Annotation Type Declaration
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
-
- */
- public JDefinedClass _annotationTypeDeclaration(String name) throws JClassAlreadyExistsException {
- return _class (JMod.PUBLIC,name,ClassType.ANNOTATION_TYPE_DECL);
- }
-
- /**
- * Add a public enum to this package
- * @param name
- * Name of the enum to be added to this package
- * @return
- * newly created Enum
- * @exception JClassAlreadyExistsException
- * When the specified class/interface was already created.
-
- */
- public JDefinedClass _enum (String name) throws JClassAlreadyExistsException {
- return _class (JMod.PUBLIC,name,ClassType.ENUM);
- }
- /**
- * Adds a new resource file to this package.
- */
- public JResourceFile addResourceFile(JResourceFile rsrc) {
- resources.add(rsrc);
- return rsrc;
- }
-
- /**
- * Checks if a resource of the given name exists.
- */
- public boolean hasResourceFile(String name) {
- for (JResourceFile r : resources)
- if (r.name().equals(name))
- return true;
- return false;
- }
-
- /**
- * Iterates all resource files in this package.
- */
- public Iterator<JResourceFile> propertyFiles() {
- return resources.iterator();
- }
-
- /**
- * Creates, if necessary, and returns the package javadoc for this
- * JDefinedClass.
- *
- * @return JDocComment containing javadocs for this class
- */
- public JDocComment javadoc() {
- if (jdoc == null)
- jdoc = new JDocComment(owner());
- return jdoc;
- }
-
- /**
- * Removes a class from this package.
- */
- public void remove(JClass c) {
- if (c._package() != this)
- throw new IllegalArgumentException(
- "the specified class is not a member of this package," + " or it is a referenced class");
-
- // note that c may not be a member of classes.
- // this happens when someone is trying to remove a non generated class
- classes.remove(c.name());
- if (upperCaseClassMap != null)
- upperCaseClassMap.remove(c.name().toUpperCase());
- }
-
- /**
- * Reference a class within this package.
- */
- public JClass ref(String name) throws ClassNotFoundException {
- if (name.indexOf('.') >= 0)
- throw new IllegalArgumentException("JClass name contains '.': " + name);
-
- String n = "";
- if (!isUnnamed())
- n = this.name + '.';
- n += name;
-
- return owner.ref(Class.forName(n));
- }
-
- /**
- * Gets a reference to a sub package of this package.
- */
- public JPackage subPackage( String pkg ) {
- if(isUnnamed()) return owner()._package(pkg);
- else return owner()._package(name+'.'+pkg);
- }
-
- /**
- * Returns an iterator that walks the top-level classes defined in this
- * package.
- */
- public Iterator<JDefinedClass> classes() {
- return classes.values().iterator();
- }
-
- /**
- * Checks if a given name is already defined as a class/interface
- */
- public boolean isDefined(String classLocalName) {
- Iterator<JDefinedClass> itr = classes();
- while (itr.hasNext()) {
- if ((itr.next()).name().equals(classLocalName))
- return true;
- }
-
- return false;
- }
-
- /**
- * Checks if this package is the root, unnamed package.
- */
- public final boolean isUnnamed() { return name.length() == 0; }
-
- /**
- * Get the name of this package
- *
- * @return
- * The name of this package, or the empty string if this is the
- * null package. For example, this method returns strings like
- * <code>"java.lang"</code>
- */
- public String name() {
- return name;
- }
-
- /**
- * Return the code model root object being used to create this package.
- */
- public final JCodeModel owner() { return owner; }
-
-
- public JAnnotationUse annotate(JClass clazz) {
- if(isUnnamed())
- throw new IllegalArgumentException("the root package cannot be annotated");
- if(annotations==null)
- annotations = new ArrayList<JAnnotationUse>();
- JAnnotationUse a = new JAnnotationUse(clazz);
- annotations.add(a);
- return a;
- }
-
- public JAnnotationUse annotate(Class<? extends Annotation> clazz) {
- return annotate(owner.ref(clazz));
- }
-
- public <W extends JAnnotationWriter> W annotate2(Class<W> clazz) {
- return TypedAnnotationWriter.create(clazz,this);
- }
-
- public Collection<JAnnotationUse> annotations() {
- if (annotations == null)
- annotations = new ArrayList<JAnnotationUse>();
- return Collections.unmodifiableList(annotations);
- }
-
- /**
- * Convert the package name to directory path equivalent
- */
- File toPath(File dir) {
- if (name == null) return dir;
- return new File(dir, name.replace('.', File.separatorChar));
- }
-
- public void declare(JFormatter f ) {
- if (name.length() != 0)
- f.p("package").p(name).p(';').nl();
- }
-
- public void generate(JFormatter f) {
- f.p(name);
- }
-
-
- void build( CodeWriter src, CodeWriter res ) throws IOException {
-
- // write classes
- for (JDefinedClass c : classes.values()) {
- if (c.isHidden())
- continue; // don't generate this file
-
- JFormatter f = createJavaSourceFileWriter(src, c.name());
- f.write(c);
- f.close();
- }
-
- // write package annotations
- if(annotations!=null || jdoc!=null) {
- JFormatter f = createJavaSourceFileWriter(src,"package-info");
-
- if (jdoc != null)
- f.g(jdoc);
-
- // TODO: think about importing
- if (annotations != null){
- for (JAnnotationUse a : annotations)
- f.g(a).nl();
- }
- f.d(this);
-
- f.close();
- }
-
- // write resources
- for (JResourceFile rsrc : resources) {
- CodeWriter cw = rsrc.isResource() ? res : src;
- OutputStream os = new BufferedOutputStream(cw.openBinary(this, rsrc.name()));
- rsrc.build(os);
- os.close();
- }
- }
-
- /*package*/ int countArtifacts() {
- int r = 0;
- for (JDefinedClass c : classes.values()) {
- if (c.isHidden())
- continue; // don't generate this file
- r++;
- }
-
- if(annotations!=null || jdoc!=null) {
- r++;
- }
-
- r+= resources.size();
-
- return r;
- }
-
- private JFormatter createJavaSourceFileWriter(CodeWriter src, String className) throws IOException {
- Writer bw = new BufferedWriter(src.openSource(this,className+".java"));
- return new JFormatter(new PrintWriter(bw));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JPrimitiveType.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JPrimitiveType.java
deleted file mode 100644
index cf2d0a82..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JPrimitiveType.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * Java built-in primitive types.
- *
- * Instances of this class can be obtained as constants of {@link JCodeModel},
- * such as {@link JCodeModel#BOOLEAN}.
- */
-public final class JPrimitiveType extends JType {
-
- private final String typeName;
- private final JCodeModel owner;
- /**
- * Corresponding wrapper class.
- * For example, this would be "java.lang.Short" for short.
- */
- private final JClass wrapperClass;
-
- JPrimitiveType(JCodeModel owner, String typeName, Class<?> wrapper ) {
- this.owner = owner;
- this.typeName = typeName;
- this.wrapperClass = owner.ref(wrapper);
- }
-
- public JCodeModel owner() { return owner; }
-
- public String fullName() {
- return typeName;
- }
-
- public String name() {
- return fullName();
- }
-
- public boolean isPrimitive() {
- return true;
- }
-
- private JClass arrayClass;
- public JClass array() {
- if(arrayClass==null)
- arrayClass = new JArrayClass(owner,this);
- return arrayClass;
- }
-
- /**
- * Obtains the wrapper class for this primitive type.
- * For example, this method returns a reference to java.lang.Integer
- * if this object represents int.
- */
- public JClass boxify() {
- return wrapperClass;
- }
-
- /**
- * @deprecated calling this method from {@link JPrimitiveType}
- * would be meaningless, since it's always guaranteed to
- * return <tt>this</tt>.
- */
- public JType unboxify() {
- return this;
- }
-
- /**
- * @deprecated
- * Use {@link #boxify()}.
- */
- public JClass getWrapperClass() {
- return boxify();
- }
-
- /**
- * Wraps an expression of this type to the corresponding wrapper class.
- * For example, if this class represents "float", this method will return
- * the expression <code>new Float(x)</code> for the paramter x.
- *
- * REVISIT: it's not clear how this method works for VOID.
- */
- public JExpression wrap( JExpression exp ) {
- return JExpr._new(boxify()).arg(exp);
- }
-
- /**
- * Do the opposite of the wrap method.
- *
- * REVISIT: it's not clear how this method works for VOID.
- */
- public JExpression unwrap( JExpression exp ) {
- // it just so happens that the unwrap method is always
- // things like "intValue" or "booleanValue".
- return exp.invoke(typeName+"Value");
- }
-
- public void generate(JFormatter f) {
- f.p(typeName);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JResourceFile.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JResourceFile.java
deleted file mode 100644
index 41720e74..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JResourceFile.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * Represents a resource file in the application-specific file format.
- */
-public abstract class JResourceFile {
-
- private final String name;
-
- protected JResourceFile( String name ) {
- this.name = name;
- }
-
- /**
- * Gets the name of this property file
- */
- public String name() {
- return name;
- }
-
- /**
- * Returns true if this file should be generated into the directory
- * that the resource files go into.
- *
- * <p>
- * Returns false if this file should be generated into the directory
- * where other source files go.
- */
- protected boolean isResource() {
- return true;
- }
-
- /**
- * called by JPackage to produce the file image.
- */
- protected abstract void build( OutputStream os ) throws IOException;
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JReturn.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JReturn.java
deleted file mode 100644
index 8b5c99b0..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JReturn.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * A return statement
- */
-class JReturn implements JStatement {
-
- /**
- * JExpression to return; may be null.
- */
- private JExpression expr;
-
- /**
- * JReturn constructor
- *
- * @param expr
- * JExpression which evaluates to return value
- */
- JReturn(JExpression expr) {
- this.expr = expr;
- }
-
- public void state(JFormatter f) {
- f.p("return ");
- if (expr != null) f.g(expr);
- f.p(';').nl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JStatement.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JStatement.java
deleted file mode 100644
index d90182a7..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JStatement.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * Common interface for code components that can generate
- * uses of themselves as statements.
- */
-
-public interface JStatement {
-
- public void state(JFormatter f);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JStringLiteral.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JStringLiteral.java
deleted file mode 100644
index 19321516..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JStringLiteral.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-/**
- * String literal.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class JStringLiteral extends JExpressionImpl {
-
- public final String str;
-
-
- JStringLiteral(String what) {
- this.str = what;
-
- }
-
-
- public void generate(JFormatter f) {
- f.p(JExpr.quotify('"', str));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JSwitch.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JSwitch.java
deleted file mode 100644
index 3bd10656..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JSwitch.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Switch statement
- */
-public final class JSwitch implements JStatement {
-
- /**
- * Test part of switch statement.
- */
- private JExpression test;
-
- /**
- * vector of JCases.
- */
- private List<JCase> cases = new ArrayList<JCase>();
-
- /**
- * a single default case
- */
- private JCase defaultCase = null;
-
- /**
- * Construct a While statment
- */
- JSwitch(JExpression test) {
- this.test = test;
- }
-
- public JExpression test() { return test; }
-
- public Iterator<JCase> cases() { return cases.iterator(); }
-
- public JCase _case( JExpression label ) {
- JCase c = new JCase( label );
- cases.add(c);
- return c;
- }
-
- public JCase _default() {
- // what if (default != null) ???
-
- // default cases statements don't have a label
- defaultCase = new JCase(null, true);
- return defaultCase;
- }
-
- public void state(JFormatter f) {
- if (JOp.hasTopOp(test)) {
- f.p("switch ").g(test).p(" {").nl();
- } else {
- f.p("switch (").g(test).p(')').p(" {").nl();
- }
- for( JCase c : cases )
- f.s(c);
- if( defaultCase != null )
- f.s( defaultCase );
- f.p('}').nl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JThrow.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JThrow.java
deleted file mode 100644
index bce277b2..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JThrow.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * JThrow statement
- */
-
-class JThrow implements JStatement {
-
- /**
- * JExpression to throw
- */
- private JExpression expr;
-
- /**
- * JThrow constructor
- *
- * @param expr
- * JExpression which evaluates to JThrow value
- */
- JThrow(JExpression expr) {
- this.expr = expr;
- }
-
- public void state(JFormatter f) {
- f.p("throw");
- f.g(expr);
- f.p(';').nl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JTryBlock.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JTryBlock.java
deleted file mode 100644
index 19ba4628..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JTryBlock.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * Try statement with Catch and/or Finally clause
- */
-
-public class JTryBlock implements JStatement {
-
- private JBlock body = new JBlock();
- private List<JCatchBlock> catches = new ArrayList<JCatchBlock>();
- private JBlock _finally = null;
-
- JTryBlock() {
- }
-
- public JBlock body() {
- return body;
- }
-
- public JCatchBlock _catch(JClass exception) {
- JCatchBlock cb = new JCatchBlock(exception);
- catches.add(cb);
- return cb;
- }
-
- public JBlock _finally() {
- if (_finally == null) _finally = new JBlock();
- return _finally;
- }
-
- public void state(JFormatter f) {
- f.p("try").g(body);
- for (JCatchBlock cb : catches)
- f.g(cb);
- if (_finally != null)
- f.p("finally").g(_finally);
- f.nl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JType.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JType.java
deleted file mode 100644
index cee832f9..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JType.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * A representation of a type in codeModel.
- *
- * A type is always either primitive ({@link JPrimitiveType}) or
- * a reference type ({@link JClass}).
- */
-public abstract class JType implements JGenerable, Comparable<JType> {
-
- /**
- * Obtains a reference to the primitive type object from a type name.
- */
- public static JPrimitiveType parse(JCodeModel codeModel, String typeName) {
- if (typeName.equals("void"))
- return codeModel.VOID;
- else if (typeName.equals("boolean"))
- return codeModel.BOOLEAN;
- else if (typeName.equals("byte"))
- return codeModel.BYTE;
- else if (typeName.equals("short"))
- return codeModel.SHORT;
- else if (typeName.equals("char"))
- return codeModel.CHAR;
- else if (typeName.equals("int"))
- return codeModel.INT;
- else if (typeName.equals("float"))
- return codeModel.FLOAT;
- else if (typeName.equals("long"))
- return codeModel.LONG;
- else if (typeName.equals("double"))
- return codeModel.DOUBLE;
- else
- throw new IllegalArgumentException("Not a primitive type: " + typeName);
- }
-
- /** Gets the owner code model object. */
- public abstract JCodeModel owner();
-
- /**
- * Gets the full name of the type.
- *
- * See http://java.sun.com/docs/books/jls/second_edition/html/names.doc.html#25430 for the details.
- *
- * @return
- * Strings like "int", "java.lang.String",
- * "java.io.File[]". Never null.
- */
- public abstract String fullName();
-
- /**
- * Gets the binary name of the type.
- *
- * See http://java.sun.com/docs/books/jls/third_edition/html/binaryComp.html#44909
- *
- * @return
- * Name like "Foo$Bar", "int", "java.lang.String", "java.io.File[]". Never null.
- */
- public String binaryName() {
- return fullName();
- }
-
- /**
- * Gets the name of this type.
- *
- * @return
- * Names like "int", "void", "BigInteger".
- */
- public abstract String name();
-
- /**
- * Create an array type of this type.
- *
- * This method is undefined for primitive void type, which
- * doesn't have any corresponding array representation.
- *
- * @return A {@link JClass} representing the array type
- * whose element type is this type
- */
- public abstract JClass array();
-
- /** Tell whether or not this is an array type. */
- public boolean isArray() {
- return false;
- }
-
- /** Tell whether or not this is a built-in primitive type, such as int or void. */
- public boolean isPrimitive() {
- return false;
- }
-
- /**
- * If this class is a primitive type, return the boxed class. Otherwise return <tt>this</tt>.
- *
- * <p>
- * For example, for "int", this method returns "java.lang.Integer".
- */
- public abstract JClass boxify();
-
- /**
- * If this class is a wrapper type for a primitive, return the primitive type.
- * Otherwise return <tt>this</tt>.
- *
- * <p>
- * For example, for "java.lang.Integer", this method returns "int".
- */
- public abstract JType unboxify();
-
- /**
- * Returns the erasure of this type.
- */
- public JType erasure() {
- return this;
- }
-
- /**
- * Returns true if this is a referenced type.
- */
- public final boolean isReference() {
- return !isPrimitive();
- }
-
- /**
- * If this is an array, returns the component type of the array.
- * (T of T[])
- */
- public JType elementType() {
- throw new IllegalArgumentException("Not an array type");
- }
-
- public String toString() {
- return this.getClass().getName()
- + '(' + fullName() + ')';
- }
-
- /**
- * Compare two JTypes by FQCN, giving sorting precedence to types
- * that belong to packages java and javax over all others.
- *
- * This method is used to sort generated import statments in a
- * conventional way for readability.
- */
- public int compareTo(JType o) {
- final String rhs = o.fullName();
- boolean p = fullName().startsWith("java");
- boolean q = rhs.startsWith("java");
-
- if( p && !q ) {
- return -1;
- } else if( !p && q ) {
- return 1;
- } else {
- return fullName().compareTo(rhs);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JTypeVar.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JTypeVar.java
deleted file mode 100644
index bf420413..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JTypeVar.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Type variable used to declare generics.
- *
- * @see JGenerifiable
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class JTypeVar extends JClass implements JDeclaration {
-
- private final String name;
-
- private JClass bound;
-
- JTypeVar(JCodeModel owner, String _name) {
- super(owner);
- this.name = _name;
- }
-
- public String name() {
- return name;
- }
-
- public String fullName() {
- return name;
- }
-
- public JPackage _package() {
- return null;
- }
-
- /**
- * Adds a bound to this variable.
- *
- * @return this
- */
- public JTypeVar bound( JClass c ) {
- if(bound!=null)
- throw new IllegalArgumentException("type variable has an existing class bound "+bound);
- bound = c;
- return this;
- }
-
- /**
- * Returns the class bound of this variable.
- *
- * <p>
- * If no bound is given, this method returns {@link Object}.
- */
- public JClass _extends() {
- if(bound!=null)
- return bound;
- else
- return owner().ref(Object.class);
- }
-
- /**
- * Returns the interface bounds of this variable.
- */
- public Iterator<JClass> _implements() {
- return bound._implements();
- }
-
- public boolean isInterface() {
- return false;
- }
-
- public boolean isAbstract() {
- return false;
- }
-
- /**
- * Prints out the declaration of the variable.
- */
- public void declare(JFormatter f) {
- f.id(name);
- if(bound!=null)
- f.p("extends").g(bound);
- }
-
-
- protected JClass substituteParams(JTypeVar[] variables, List<JClass> bindings) {
- for(int i=0;i<variables.length;i++)
- if(variables[i]==this)
- return bindings.get(i);
- return this;
- }
-
- public void generate(JFormatter f) {
- f.id(name);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JTypeWildcard.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JTypeWildcard.java
deleted file mode 100644
index a68757ac..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JTypeWildcard.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Represents a wildcard type like "? extends Foo".
- *
- * <p>
- * Instances of this class can be obtained from {@link JClass#wildcard()}
- *
- * TODO: extend this to cover "? super Integer".
- *
- * <p>
- * Our modeling of types are starting to look really ugly.
- * ideally it should have been done somewhat like APT,
- * but it's too late now.
- *
- * @author Kohsuke Kawaguchi
- */
-final class JTypeWildcard extends JClass {
-
- private final JClass bound;
-
- JTypeWildcard(JClass bound) {
- super(bound.owner());
- this.bound = bound;
- }
-
- public String name() {
- return "? extends "+bound.name();
- }
-
- public String fullName() {
- return "? extends "+bound.fullName();
- }
-
- public JPackage _package() {
- return null;
- }
-
- /**
- * Returns the class bound of this variable.
- *
- * <p>
- * If no bound is given, this method returns {@link Object}.
- */
- public JClass _extends() {
- if(bound!=null)
- return bound;
- else
- return owner().ref(Object.class);
- }
-
- /**
- * Returns the interface bounds of this variable.
- */
- public Iterator<JClass> _implements() {
- return bound._implements();
- }
-
- public boolean isInterface() {
- return false;
- }
-
- public boolean isAbstract() {
- return false;
- }
-
- protected JClass substituteParams(JTypeVar[] variables, List<JClass> bindings) {
- JClass nb = bound.substituteParams(variables,bindings);
- if(nb==bound)
- return this;
- else
- return new JTypeWildcard(nb);
- }
-
- public void generate(JFormatter f) {
- if(bound._extends()==null)
- f.p("?"); // instead of "? extends Object"
- else
- f.p("? extends").g(bound);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JVar.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JVar.java
deleted file mode 100644
index a4942b69..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JVar.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Collection;
-import java.util.Collections;
-
-
-/**
- * Variables and fields.
- */
-
-public class JVar extends JExpressionImpl implements JDeclaration, JAssignmentTarget, JAnnotatable {
-
- /**
- * Modifiers.
- */
- private JMods mods;
-
- /**
- * JType of the variable
- */
- private JType type;
-
- /**
- * Name of the variable
- */
- private String name;
-
- /**
- * Initialization of the variable in its declaration
- */
- private JExpression init;
-
- /**
- * Annotations on this variable. Lazily created.
- */
- private List<JAnnotationUse> annotations = null;
-
-
-
- /**
- * JVar constructor
- *
- * @param type
- * Datatype of this variable
- *
- * @param name
- * Name of this variable
- *
- * @param init
- * Value to initialize this variable to
- */
- JVar(JMods mods, JType type, String name, JExpression init) {
- this.mods = mods;
- this.type = type;
- this.name = name;
- this.init = init;
- }
-
-
- /**
- * Initialize this variable
- *
- * @param init
- * JExpression to be used to initialize this field
- */
- public JVar init(JExpression init) {
- this.init = init;
- return this;
- }
-
- /**
- * Get the name of this variable
- *
- * @return Name of the variable
- */
- public String name() {
- return name;
- }
-
- /**
- * Changes the name of this variable.
- */
- public void name(String name) {
- if(!JJavaName.isJavaIdentifier(name))
- throw new IllegalArgumentException();
- this.name = name;
- }
-
- /**
- * Return the type of this variable.
- * @return
- * always non-null.
- */
- public JType type() {
- return type;
- }
-
- /**
- * @return
- * the current modifiers of this method.
- * Always return non-null valid object.
- */
- public JMods mods() {
- return mods;
- }
-
- /**
- * Sets the type of this variable.
- *
- * @param newType
- * must not be null.
- *
- * @return
- * the old type value. always non-null.
- */
- public JType type(JType newType) {
- JType r = type;
- if(newType==null)
- throw new IllegalArgumentException();
- type = newType;
- return r;
- }
-
-
- /**
- * Adds an annotation to this variable.
- * @param clazz
- * The annotation class to annotate the field with
- */
- public JAnnotationUse annotate(JClass clazz){
- if(annotations==null)
- annotations = new ArrayList<JAnnotationUse>();
- JAnnotationUse a = new JAnnotationUse(clazz);
- annotations.add(a);
- return a;
- }
-
- /**
- * Adds an annotation to this variable.
- *
- * @param clazz
- * The annotation class to annotate the field with
- */
- public JAnnotationUse annotate(Class <? extends Annotation> clazz){
- return annotate(type.owner().ref(clazz));
- }
-
- public <W extends JAnnotationWriter> W annotate2(Class<W> clazz) {
- return TypedAnnotationWriter.create(clazz,this);
- }
-
- public Collection<JAnnotationUse> annotations() {
- if (annotations == null)
- annotations = new ArrayList<JAnnotationUse>();
- return Collections.unmodifiableList(annotations);
- }
-
- protected boolean isAnnotated() {
- return annotations!=null;
- }
-
- public void bind(JFormatter f) {
- if (annotations != null){
- for( int i=0; i<annotations.size(); i++ )
- f.g(annotations.get(i)).nl();
- }
- f.g(mods).g(type).id(name);
- if (init != null)
- f.p('=').g(init);
- }
-
- public void declare(JFormatter f) {
- f.b(this).p(';').nl();
- }
-
- public void generate(JFormatter f) {
- f.id(name);
- }
-
-
- public JExpression assign(JExpression rhs) {
- return JExpr.assign(this,rhs);
- }
- public JExpression assignPlus(JExpression rhs) {
- return JExpr.assignPlus(this,rhs);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/JWhileLoop.java b/src/share/jaxws_classes/com/sun/codemodel/internal/JWhileLoop.java
deleted file mode 100644
index e8e1108a..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/JWhileLoop.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-
-/**
- * While statement
- */
-
-public class JWhileLoop implements JStatement {
-
- /**
- * Test part of While statement for determining exit state
- */
- private JExpression test;
-
- /**
- * JBlock of statements which makes up body of this While statement
- */
- private JBlock body = null;
-
- /**
- * Construct a While statment
- */
- JWhileLoop(JExpression test) {
- this.test = test;
- }
-
- public JExpression test() {
- return test;
- }
-
- public JBlock body() {
- if (body == null) body = new JBlock();
- return body;
- }
-
- public void state(JFormatter f) {
- if (JOp.hasTopOp(test)) {
- f.p("while ").g(test);
- } else {
- f.p("while (").g(test).p(')');
- }
- if (body != null)
- f.s(body);
- else
- f.p(';').nl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/SecureLoader.java b/src/share/jaxws_classes/com/sun/codemodel/internal/SecureLoader.java
deleted file mode 100644
index ae61eae7..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/SecureLoader.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-/**
- * Class defined for safe calls of getClassLoader methods of any kind (context/system/class
- * classloader. This MUST be package private and defined in every package which
- * uses such invocations.
- * @author snajper
- */
-class SecureLoader {
-
- static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
- static void setContextClassLoader(final ClassLoader cl) {
- if (System.getSecurityManager() == null) {
- Thread.currentThread().setContextClassLoader(cl);
- } else {
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- Thread.currentThread().setContextClassLoader(cl);
- return null;
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/TypedAnnotationWriter.java b/src/share/jaxws_classes/com/sun/codemodel/internal/TypedAnnotationWriter.java
deleted file mode 100644
index f483e9c8..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/TypedAnnotationWriter.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.lang.reflect.Type;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.annotation.Annotation;
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * Dynamically implements the typed annotation writer interfaces.
- *
- * @author Kohsuke Kawaguchi
- */
-class TypedAnnotationWriter<A extends Annotation,W extends JAnnotationWriter<A>>
- implements InvocationHandler, JAnnotationWriter<A> {
- /**
- * This is what we are writing to.
- */
- private final JAnnotationUse use;
-
- /**
- * The annotation that we are writing.
- */
- private final Class<A> annotation;
-
- /**
- * The type of the writer.
- */
- private final Class<W> writerType;
-
- /**
- * Keeps track of writers for array members.
- * Lazily created.
- */
- private Map<String,JAnnotationArrayMember> arrays;
-
- public TypedAnnotationWriter(Class<A> annotation, Class<W> writer, JAnnotationUse use) {
- this.annotation = annotation;
- this.writerType = writer;
- this.use = use;
- }
-
- public JAnnotationUse getAnnotationUse() {
- return use;
- }
-
- public Class<A> getAnnotationType() {
- return annotation;
- }
-
- @SuppressWarnings("unchecked")
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-
- if(method.getDeclaringClass()==JAnnotationWriter.class) {
- try {
- return method.invoke(this,args);
- } catch (InvocationTargetException e) {
- throw e.getTargetException();
- }
- }
-
- String name = method.getName();
- Object arg=null;
- if(args!=null && args.length>0)
- arg = args[0];
-
- // check how it's defined on the annotation
- Method m = annotation.getDeclaredMethod(name);
- Class<?> rt = m.getReturnType();
-
- // array value
- if(rt.isArray()) {
- return addArrayValue(proxy,name,rt.getComponentType(),method.getReturnType(),arg);
- }
-
- // sub annotation
- if(Annotation.class.isAssignableFrom(rt)) {
- Class<? extends Annotation> r = (Class<? extends Annotation>)rt;
- return new TypedAnnotationWriter(
- r,method.getReturnType(),use.annotationParam(name,r)).createProxy();
- }
-
- // scalar value
-
- if(arg instanceof JType) {
- JType targ = (JType) arg;
- checkType(Class.class,rt);
- if(m.getDefaultValue()!=null) {
- // check the default
- if(targ.equals(targ.owner().ref((Class)m.getDefaultValue())))
- return proxy; // defaulted
- }
- use.param(name,targ);
- return proxy;
- }
-
- // other Java built-in types
- checkType(arg.getClass(),rt);
- if(m.getDefaultValue()!=null && m.getDefaultValue().equals(arg))
- // defaulted. no need to write out.
- return proxy;
-
- if(arg instanceof String) {
- use.param(name,(String)arg);
- return proxy;
- }
- if(arg instanceof Boolean) {
- use.param(name,(Boolean)arg);
- return proxy;
- }
- if(arg instanceof Integer) {
- use.param(name,(Integer)arg);
- return proxy;
- }
- if(arg instanceof Class) {
- use.param(name,(Class)arg);
- return proxy;
- }
- if(arg instanceof Enum) {
- use.param(name,(Enum)arg);
- return proxy;
- }
-
- throw new IllegalArgumentException("Unable to handle this method call "+method.toString());
- }
-
- @SuppressWarnings("unchecked")
- private Object addArrayValue(Object proxy,String name, Class itemType, Class expectedReturnType, Object arg) {
- if(arrays==null)
- arrays = new HashMap<String,JAnnotationArrayMember>();
- JAnnotationArrayMember m = arrays.get(name);
- if(m==null) {
- m = use.paramArray(name);
- arrays.put(name,m);
- }
-
- // sub annotation
- if(Annotation.class.isAssignableFrom(itemType)) {
- Class<? extends Annotation> r = (Class<? extends Annotation>)itemType;
- if(!JAnnotationWriter.class.isAssignableFrom(expectedReturnType))
- throw new IllegalArgumentException("Unexpected return type "+expectedReturnType);
- return new TypedAnnotationWriter(r,expectedReturnType,m.annotate(r)).createProxy();
- }
-
- // primitive
- if(arg instanceof JType) {
- checkType(Class.class,itemType);
- m.param((JType)arg);
- return proxy;
- }
- checkType(arg.getClass(),itemType);
- if(arg instanceof String) {
- m.param((String)arg);
- return proxy;
- }
- if(arg instanceof Boolean) {
- m.param((Boolean)arg);
- return proxy;
- }
- if(arg instanceof Integer) {
- m.param((Integer)arg);
- return proxy;
- }
- if(arg instanceof Class) {
- m.param((Class)arg);
- return proxy;
- }
- // TODO: enum constant. how should we handle it?
-
- throw new IllegalArgumentException("Unable to handle this method call ");
- }
-
-
- /**
- * Check if the type of the argument matches our expectation.
- * If not, report an error.
- */
- private void checkType(Class<?> actual, Class<?> expected) {
- if(expected==actual || expected.isAssignableFrom(actual))
- return; // no problem
-
- if( expected==JCodeModel.boxToPrimitive.get(actual) )
- return; // no problem
-
- throw new IllegalArgumentException("Expected "+expected+" but found "+actual);
- }
-
- /**
- * Creates a proxy and returns it.
- */
- @SuppressWarnings("unchecked")
- private W createProxy() {
- return (W)Proxy.newProxyInstance(
- SecureLoader.getClassClassLoader(writerType),new Class[]{writerType},this);
- }
-
- /**
- * Creates a new typed annotation writer.
- */
- @SuppressWarnings("unchecked")
- static <W extends JAnnotationWriter<?>> W create(Class<W> w, JAnnotatable annotatable) {
- Class<? extends Annotation> a = findAnnotationType(w);
- return (W)new TypedAnnotationWriter(a,w,annotatable.annotate(a)).createProxy();
- }
-
- private static Class<? extends Annotation> findAnnotationType(Class<?> clazz) {
- for( Type t : clazz.getGenericInterfaces()) {
- if(t instanceof ParameterizedType) {
- ParameterizedType p = (ParameterizedType) t;
- if(p.getRawType()==JAnnotationWriter.class)
- return (Class<? extends Annotation>)p.getActualTypeArguments()[0];
- }
- if(t instanceof Class<?>) {
- // recursive search
- Class<? extends Annotation> r = findAnnotationType((Class<?>)t);
- if(r!=null) return r;
- }
- }
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JBinaryFile.java b/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JBinaryFile.java
deleted file mode 100644
index 24019654..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JBinaryFile.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.fmt;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import com.sun.codemodel.internal.JResourceFile;
-
-/**
- * Allows the application to use OutputStream to define data
- * that will be stored into a file.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class JBinaryFile extends JResourceFile {
-
- private final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
- public JBinaryFile( String name ) {
- super(name);
- }
-
- /**
- *
- * @return
- * Data written to the returned output stream will be written
- * to the file.
- */
- public OutputStream getDataStore() {
- return baos;
- }
-
- public void build(OutputStream os) throws IOException {
- os.write( baos.toByteArray() );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JPropertyFile.java b/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JPropertyFile.java
deleted file mode 100644
index 5a8418d9..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JPropertyFile.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.fmt;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Properties;
-
-import com.sun.codemodel.internal.JResourceFile;
-
-/**
- * A property file.
- */
-public class JPropertyFile extends JResourceFile
-{
- public JPropertyFile( String name ) {
- super(name);
- }
-
- private final Properties data = new Properties();
-
- /**
- * Adds key/value pair into the property file.
- * If you call this method twice with the same key,
- * the old one is overriden by the new one.
- */
- public void add( String key, String value ) {
- data.put(key,value);
- }
-
- // TODO: method to iterate values in data?
- // TODO: should we rather expose Properties object directly via
- // public Properties body() { return data; } ?
-
- public void build( OutputStream out ) throws IOException {
- data.store(out,null);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JSerializedObject.java b/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JSerializedObject.java
deleted file mode 100644
index 525f7766..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JSerializedObject.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.fmt;
-
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-
-import com.sun.codemodel.internal.JResourceFile;
-
-
-/**
- * A simple class that takes an object and serializes it into a file
- * in the parent package with the given name.
- */
-public class JSerializedObject extends JResourceFile {
-
- private final Object obj;
-
- /**
- * @exception IOException
- * If the serialization fails, this exception is thrown
- */
- public JSerializedObject( String name, Object obj ) throws IOException {
- super(name);
- this.obj = obj;
- }
-
- /**
- * called by JPackage to serialize the object
- */
- protected void build( OutputStream os ) throws IOException {
- // serialize the obj into a ByteArrayOutputStream
- ObjectOutputStream oos = new ObjectOutputStream(os);
- oos.writeObject(obj);
- oos.close();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JStaticFile.java b/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JStaticFile.java
deleted file mode 100644
index f06527ca..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JStaticFile.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.fmt;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import com.sun.codemodel.internal.JResourceFile;
-
-/**
- * Allows an application to copy a resource file to the output.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class JStaticFile extends JResourceFile {
-
- private final ClassLoader classLoader;
- private final String resourceName;
- private final boolean isResource;
-
- public JStaticFile(String _resourceName) {
- this(_resourceName,!_resourceName.endsWith(".java"));
- }
-
- public JStaticFile(String _resourceName,boolean isResource) {
- this( SecureLoader.getClassClassLoader(JStaticFile.class), _resourceName, isResource );
- }
-
- /**
- * @param isResource
- * false if this is a Java source file. True if this is other resource files.
- */
- public JStaticFile(ClassLoader _classLoader, String _resourceName, boolean isResource) {
- super(_resourceName.substring(_resourceName.lastIndexOf('/')+1));
- this.classLoader = _classLoader;
- this.resourceName = _resourceName;
- this.isResource = isResource;
- }
-
- protected boolean isResource() {
- return isResource;
- }
-
- protected void build(OutputStream os) throws IOException {
- DataInputStream dis = new DataInputStream(classLoader.getResourceAsStream(resourceName));
-
- byte[] buf = new byte[256];
- int sz;
- while( (sz=dis.read(buf))>0 )
- os.write(buf,0,sz);
-
- dis.close();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JStaticJavaFile.java b/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JStaticJavaFile.java
deleted file mode 100644
index bdf83bac..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JStaticJavaFile.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.fmt;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.net.URL;
-import java.text.ParseException;
-import java.util.Iterator;
-import java.util.List;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.codemodel.internal.JResourceFile;
-import com.sun.codemodel.internal.JTypeVar;
-
-/**
- * Statically generated Java soruce file.
- *
- * <p>
- * This {@link JResourceFile} implementation will generate a Java source
- * file by copying the source code from a resource.
- * <p>
- * While copying a resource, we look for a package declaration and
- * replace it with the target package name. This allows the static Java
- * source code to have an arbitrary package declaration.
- * <p>
- * You can also use the getJClass method to obtain a {@link JClass}
- * object that represents the static file. This allows the client code
- * to refer to the class from other CodeModel generated code.
- * <p>
- * Note that because we don't parse the static Java source code,
- * the returned {@link JClass} object doesn't respond to methods like
- * "isInterface" or "_extends",
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class JStaticJavaFile extends JResourceFile {
-
- private final JPackage pkg;
- private final String className;
- private final URL source;
- private final JStaticClass clazz;
- private final LineFilter filter;
-
- public JStaticJavaFile(JPackage _pkg, String className, String _resourceName) {
- this( _pkg, className,
- SecureLoader.getClassClassLoader(JStaticJavaFile.class).getResource(_resourceName), null );
- }
-
- public JStaticJavaFile(JPackage _pkg, String _className, URL _source, LineFilter _filter ) {
- super(_className+".java");
- if(_source==null) throw new NullPointerException();
- this.pkg = _pkg;
- this.clazz = new JStaticClass();
- this.className = _className;
- this.source = _source;
- this.filter = _filter;
- }
-
- /**
- * Returns a class object that represents a statically generated code.
- */
- public final JClass getJClass() {
- return clazz;
- }
-
- protected boolean isResource() {
- return false;
- }
-
- protected void build(OutputStream os) throws IOException {
- InputStream is = source.openStream();
-
- BufferedReader r = new BufferedReader(new InputStreamReader(is));
- PrintWriter w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(os)));
- LineFilter filter = createLineFilter();
- int lineNumber=1;
-
- try {
- String line;
- while((line=r.readLine())!=null) {
- line = filter.process(line);
- if(line!=null)
- w.println(line);
- lineNumber++;
- }
- } catch( ParseException e ) {
- throw new IOException("unable to process "+source+" line:"+lineNumber+"\n"+e.getMessage());
- }
-
- w.close();
- r.close();
- }
-
- /**
- * Creates a {@link LineFilter}.
- * <p>
- * A derived class can override this method to process
- * the contents of the source file.
- */
- private LineFilter createLineFilter() {
- // this filter replaces the package declaration.
- LineFilter f = new LineFilter() {
- public String process(String line) {
- if(!line.startsWith("package ")) return line;
-
- // replace package decl
- if( pkg.isUnnamed() )
- return null;
- else
- return "package "+pkg.name()+";";
- }
- };
- if( filter!=null )
- return new ChainFilter(filter,f);
- else
- return f;
- }
-
- /**
- * Filter that alters the Java source code.
- * <p>
- * By implementing this interface, derived classes
- * can modify the Java source file before it's written out.
- */
- public interface LineFilter {
- /**
- * @param line
- * a non-null valid String that corresponds to one line.
- * No '\n' included.
- * @return
- * null to strip the line off. Otherwise the returned
- * String will be written out. Do not add '\n' at the end
- * of this string.
- *
- * @exception ParseException
- * when for some reason there's an error in the line.
- */
- String process(String line) throws ParseException;
- }
-
- /**
- * A {@link LineFilter} that combines two {@link LineFilter}s.
- */
- public final static class ChainFilter implements LineFilter {
- private final LineFilter first,second;
- public ChainFilter( LineFilter first, LineFilter second ) {
- this.first=first;
- this.second=second;
- }
- public String process(String line) throws ParseException {
- line = first.process(line);
- if(line==null) return null;
- return second.process(line);
- }
- }
-
-
- private class JStaticClass extends JClass {
-
- private final JTypeVar[] typeParams;
-
- JStaticClass() {
- super(pkg.owner());
- // TODO: allow those to be specified
- typeParams = new JTypeVar[0];
- }
-
- public String name() {
- return className;
- }
-
- public String fullName() {
- if(pkg.isUnnamed())
- return className;
- else
- return pkg.name()+'.'+className;
- }
-
- public JPackage _package() {
- return pkg;
- }
-
- public JClass _extends() {
- throw new UnsupportedOperationException();
- }
-
- public Iterator<JClass> _implements() {
- throw new UnsupportedOperationException();
- }
-
- public boolean isInterface() {
- throw new UnsupportedOperationException();
- }
-
- public boolean isAbstract() {
- throw new UnsupportedOperationException();
- }
-
- public JTypeVar[] typeParams() {
- return typeParams;
- }
-
- protected JClass substituteParams(JTypeVar[] variables, List<JClass> bindings) {
- return this;
- }
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JTextFile.java b/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JTextFile.java
deleted file mode 100644
index 0be4048e..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/JTextFile.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.fmt;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-
-import com.sun.codemodel.internal.JResourceFile;
-
-
-/**
- * Simple text file.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class JTextFile extends JResourceFile
-{
- public JTextFile( String name ) {
- super(name);
- }
-
- private String contents = null;
-
- public void setContents( String _contents ) {
- this.contents = _contents;
- }
-
- public void build( OutputStream out ) throws IOException {
- Writer w = new OutputStreamWriter(out);
- w.write(contents);
- w.close();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/SecureLoader.java b/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/SecureLoader.java
deleted file mode 100644
index aaf18e71..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/fmt/SecureLoader.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.fmt;
-
-import com.sun.codemodel.internal.*;
-
-/**
- * Class defined for safe calls of getClassLoader methods of any kind (context/system/class
- * classloader. This MUST be package private and defined in every package which
- * uses such invocations.
- * @author snajper
- */
-class SecureLoader {
-
- static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
- static void setContextClassLoader(final ClassLoader cl) {
- if (System.getSecurityManager() == null) {
- Thread.currentThread().setContextClassLoader(cl);
- } else {
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- Thread.currentThread().setContextClassLoader(cl);
- return null;
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/package-info.java b/src/share/jaxws_classes/com/sun/codemodel/internal/package-info.java
deleted file mode 100644
index cb65b566..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/package-info.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * <h1>Library for generating Java source code</h1>.
- *
- * <p>
- * CodeModel is a library that allows you to generate Java source
- * code in a type-safe fashion.
- *
- * <p>
- * With CodeModel, you build the java source code by first building AST,
- * then writing it out as text files that is Java source files.
- * The AST looks like this:
- *
- * {@DotDiagram
- digraph G {
- cls1 [label="JDefinedClass"];
- cls2 [label="JDefinedClass"];
- JCodeModel -> cls1 [label="generated class"];
- JCodeModel -> cls2 [label="generated class"];
-
- m1 [label="JMethod"];
- m2 [label="JMethod"];
-
- cls1 -> m1;
- cls1 -> m2;
- cls1 -> JField;
-
- m1 -> JVar [label="method parameter"];
- m1 -> JBlock [label="code"];
- }
- * }
- *
- * <p>
- * You bulid this tree mostly from top-down. So, you first create
- * a new {@link JDefinedClass} from {@link JCodeModel}, then you
- * create a {@link JMethod} from {@link JDefinedClass}, and so on.
- *
- * <p>
- * This design brings the following beneefits:
- *
- * <ul>
- * <li>source code can be written in random order
- * <li>generated source code nicely imports other classes
- * <li>generated source code is lexically always correct
- * (no unbalanced parenthesis, etc.)
- * <li>code generation becomes relatively type-safe
- * </ul>
- *
- * The price you pay for that is
- * increased memory footprint and the generation speed.
- * See <a href="#performance">performance section</a> for
- * more discussions about the performance and possible improvements.
- *
- *
- * <h2>Using CodeModel</h2>
- * <p>
- * {@link com.sun.codemodel.internal.JCodeModel} is the entry point to
- * the library. See its javadoc for more details about how to use
- * CodeModel.
- *
- *
- *
- * <h2>Performance</h2>
- * <p>
- * Generally speaking, CodeModel is expected to be used in
- * an environment where the resource constraint is not severe.
- * Therefore, we haven't spent much effort in trying to make
- * this library lean and mean.
- *
- * <p>
- * That said, we did some benchmark and performance analysis.
- * In case anyone is interested in making this library
- * better performance wise, here's the findings.
- *
- * <p>
- * {@link List}s {@link Map}s, and other collections take up
- * a lot of space. Allocating those things lazily is generally
- * a good idea.
- *
- * <p>
- * Compared to template-based code generator, the writing operation
- * is slow, as it needs to traverse each AST node. Consider
- * pre-encoding tokens (like 'public') to the target encoding,
- * and consider exploting the subtree equivalence.
- *
- * @ArchitectureDocument
- */
-package com.sun.codemodel.internal;
-
-import java.util.List;
-import java.util.Map;
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/util/ClassNameComparator.java b/src/share/jaxws_classes/com/sun/codemodel/internal/util/ClassNameComparator.java
deleted file mode 100644
index cf06eee3..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/util/ClassNameComparator.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.util;
-
-import java.util.Comparator;
-import com.sun.codemodel.internal.JClass;
-
-/**
- * Comparator object that sorts {@link JClass}es in the order
- * of their names.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class ClassNameComparator implements Comparator<JClass> {
- private ClassNameComparator() {}
-
- public int compare(JClass l, JClass r) {
- return l.fullName().compareTo(r.fullName());
- }
-
- public static final Comparator<JClass> theInstance = new ClassNameComparator();
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/util/EncoderFactory.java b/src/share/jaxws_classes/com/sun/codemodel/internal/util/EncoderFactory.java
deleted file mode 100644
index d52adb2c..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/util/EncoderFactory.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)$Id: EncoderFactory.java,v 1.3 2005/09/10 19:07:33 kohsuke Exp $
- */
-package com.sun.codemodel.internal.util;
-
-import java.lang.reflect.Constructor;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
-
-/**
- * Creates {@link CharsetEncoder} from a charset name.
- *
- * Fixes a MS1252 handling bug in JDK1.4.2.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class EncoderFactory {
-
- public static CharsetEncoder createEncoder( String encodin ) {
- Charset cs = Charset.forName(System.getProperty("file.encoding"));
- CharsetEncoder encoder = cs.newEncoder();
-
- if( cs.getClass().getName().equals("sun.nio.cs.MS1252") ) {
- try {
- // at least JDK1.4.2_01 has a bug in MS1252 encoder.
- // specifically, it returns true for any character.
- // return a correct encoder to workaround this problem
-
- // statically binding to MS1252Encoder will cause a Link error
- // (at least in IBM JDK1.4.1)
- @SuppressWarnings("unchecked")
- Class<? extends CharsetEncoder> ms1252encoder = (Class<? extends CharsetEncoder>) Class.forName("com.sun.codemodel.internal.util.MS1252Encoder");
- Constructor<? extends CharsetEncoder> c = ms1252encoder.getConstructor(new Class[]{
- Charset.class
- });
- return c.newInstance(new Object[]{cs});
- } catch( Throwable t ) {
- // if something funny happens, ignore it and fall back to
- // a broken MS1252 encoder. It's probably still better
- // than choking here.
- return encoder;
- }
- }
-
- return encoder;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/util/JavadocEscapeWriter.java b/src/share/jaxws_classes/com/sun/codemodel/internal/util/JavadocEscapeWriter.java
deleted file mode 100644
index 785d9ec6..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/util/JavadocEscapeWriter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.util;
-
-import java.io.FilterWriter;
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * {@link Writer} that escapes characters that are unsafe
- * as Javadoc comments.
- *
- * Such characters include '&lt;' and '&amp;'.
- *
- * <p>
- * Note that this class doesn't escape other Unicode characters
- * that are typically unsafe. For example, &#x611B; (A kanji
- * that means "love") can be considered as unsafe because
- * javac with English Windows cannot accept this character in the
- * source code.
- *
- * <p>
- * If the application needs to escape such characters as well, then
- * they are on their own.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class JavadocEscapeWriter extends FilterWriter {
-
- public JavadocEscapeWriter( Writer next ) {
- super(next);
- }
-
- public void write(int ch) throws IOException {
- if(ch=='<')
- out.write("&lt;");
- else
- if(ch=='&')
- out.write("&amp;");
- else
- out.write(ch);
- }
-
- public void write(char[] buf, int off, int len) throws IOException {
- for( int i=0; i<len; i++ )
- write(buf[off+i]);
- }
-
- public void write(char[] buf) throws IOException {
- write(buf,0,buf.length);
- }
-
- public void write(String buf, int off, int len) throws IOException {
- write( buf.toCharArray(), off, len );
- }
-
- public void write(String buf) throws IOException {
- write( buf.toCharArray(), 0, buf.length() );
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/util/MS1252Encoder.java b/src/share/jaxws_classes/com/sun/codemodel/internal/util/MS1252Encoder.java
deleted file mode 100644
index 103b8eec..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/util/MS1252Encoder.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)$Id: MS1252Encoder.java,v 1.2 2005/09/10 19:07:33 kohsuke Exp $
- */
-package com.sun.codemodel.internal.util;
-
-import java.nio.charset.Charset;
-
-/**
- * MS1252 encoder that corrects a bug in JDK1.4.2_01.
- *
- * <p>
- * See
- * http://www.microsoft.com/globaldev/reference/sbcs/1252.htm
- * for the normative definition.
- *
- * This code depends on Sun internal package, so we have to make sure
- * it won't be executed on other JDKs.
- */
-public final class MS1252Encoder extends SingleByteEncoder {
-
- public MS1252Encoder(Charset cs) {
- super(cs, index1, index2, 0xFF00, 0x00FF, 8);
- }
-
- private final static String index2 =
- "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007" +
- "\b\t\n\u000B\f\r\u000E\u000F" +
- "\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017" +
- "\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" +
- "\u0020\u0021\"\u0023\u0024\u0025\u0026\'" +
- "\u0028\u0029\u002A\u002B\u002C\u002D\u002E\u002F" +
- "\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037" +
- "\u0038\u0039\u003A\u003B\u003C\u003D\u003E\u003F" +
- "\u0040\u0041\u0042\u0043\u0044\u0045\u0046\u0047" +
- "\u0048\u0049\u004A\u004B\u004C\u004D\u004E\u004F" +
- "\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057" +
- "\u0058\u0059\u005A\u005B\\\u005D\u005E\u005F" +
- "\u0060\u0061\u0062\u0063\u0064\u0065\u0066\u0067" +
- "\u0068\u0069\u006A\u006B\u006C\u006D\u006E\u006F" +
- "\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077" +
- "\u0078\u0079\u007A\u007B\u007C\u007D\u007E\u007F" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u00A0\u00A1\u00A2\u00A3\u00A4\u00A5\u00A6\u00A7" +
- "\u00A8\u00A9\u00AA\u00AB\u00AC\u00AD\u00AE\u00AF" +
- "\u00B0\u00B1\u00B2\u00B3\u00B4\u00B5\u00B6\u00B7" +
- "\u00B8\u00B9\u00BA\u00BB\u00BC\u00BD\u00BE\u00BF" +
- "\u00C0\u00C1\u00C2\u00C3\u00C4\u00C5\u00C6\u00C7" +
- "\u00C8\u00C9\u00CA\u00CB\u00CC\u00CD\u00CE\u00CF" +
- "\u00D0\u00D1\u00D2\u00D3\u00D4\u00D5\u00D6\u00D7" +
- "\u00D8\u00D9\u00DA\u00DB\u00DC\u00DD\u00DE\u00DF" +
- "\u00E0\u00E1\u00E2\u00E3\u00E4\u00E5\u00E6\u00E7" +
- "\u00E8\u00E9\u00EA\u00EB\u00EC\u00ED\u00EE\u00EF" +
- "\u00F0\u00F1\u00F2\u00F3\u00F4\u00F5\u00F6\u00F7" +
- "\u00F8\u00F9\u00FA\u00FB\u00FC\u00FD\u00FE\u00FF" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u008C\u009C\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u008A\u009A\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u009F\u0000\u0000\u0000\u0000\u008E\u009E\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0083\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0088\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0098\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0096\u0097\u0000" +
- "\u0000\u0000\u0091\u0092\u0082\u0000\u0093\u0094" +
- "\u0084\u0000\u0086\u0087\u0095\u0000\u0000\u0000" +
- "\u0085\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0089\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u008B\u009B\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0080\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0099\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" +
- "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
-
- private final static short index1[] = {
- 0, 256, 461, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 698, 920, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
- };
-
- public boolean canEncode(char c) {
- char test = index2.charAt( index1[(c&0xFF00)>>8] + (c&0xFF) );
- return test!=0;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/util/SingleByteEncoder.java b/src/share/jaxws_classes/com/sun/codemodel/internal/util/SingleByteEncoder.java
deleted file mode 100644
index b3a4ec56..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/util/SingleByteEncoder.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)SingleByteEncoder.java 1.14 03/01/23
- */
-
-package com.sun.codemodel.internal.util;
-
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
-import java.nio.charset.CoderResult;
-
-import sun.nio.cs.Surrogate;
-
-
-abstract class SingleByteEncoder
- extends CharsetEncoder
-{
-
- private final short index1[];
- private final String index2;
- private final int mask1;
- private final int mask2;
- private final int shift;
-
- private final Surrogate.Parser sgp = new Surrogate.Parser();
-
- protected SingleByteEncoder(Charset cs,
- short[] index1, String index2,
- int mask1, int mask2, int shift)
- {
- super(cs, 1.0f, 1.0f);
- this.index1 = index1;
- this.index2 = index2;
- this.mask1 = mask1;
- this.mask2 = mask2;
- this.shift = shift;
- }
-
- public boolean canEncode(char c) {
- char testEncode;
- testEncode = index2.charAt(index1[(c & mask1) >> shift]
- + (c & mask2));
- if (testEncode == '\u0000')
- return false;
- else
- return true;
- }
-
- private CoderResult encodeArrayLoop(CharBuffer src, ByteBuffer dst) {
- char[] sa = src.array();
- int sp = src.arrayOffset() + src.position();
- int sl = src.arrayOffset() + src.limit();
- sp = (sp <= sl ? sp : sl);
- byte[] da = dst.array();
- int dp = dst.arrayOffset() + dst.position();
- int dl = dst.arrayOffset() + dst.limit();
- dp = (dp <= dl ? dp : dl);
-
- try {
- while (sp < sl) {
- char c = sa[sp];
- if (Surrogate.is(c)) {
- if (sgp.parse(c, sa, sp, sl) < 0)
- return sgp.error();
- return sgp.unmappableResult();
- }
- if (c >= '\uFFFE')
- return CoderResult.unmappableForLength(1);
- if (dl - dp < 1)
- return CoderResult.OVERFLOW;
-
- char e = index2.charAt(index1[(c & mask1) >> shift]
- + (c & mask2));
-
- // If output byte is zero because input char is zero
- // then character is mappable, o.w. fail
- if (e == '\u0000' && c != '\u0000')
- return CoderResult.unmappableForLength(1);
-
- sp++;
- da[dp++] = (byte)e;
- }
- return CoderResult.UNDERFLOW;
- } finally {
- src.position(sp - src.arrayOffset());
- dst.position(dp - dst.arrayOffset());
- }
- }
-
- private CoderResult encodeBufferLoop(CharBuffer src, ByteBuffer dst) {
- int mark = src.position();
- try {
- while (src.hasRemaining()) {
- char c = src.get();
- if (Surrogate.is(c)) {
- if (sgp.parse(c, src) < 0)
- return sgp.error();
- return sgp.unmappableResult();
- }
- if (c >= '\uFFFE')
- return CoderResult.unmappableForLength(1);
- if (!dst.hasRemaining())
- return CoderResult.OVERFLOW;
-
- char e = index2.charAt(index1[(c & mask1) >> shift]
- + (c & mask2));
-
- // If output byte is zero because input char is zero
- // then character is mappable, o.w. fail
- if (e == '\u0000' && c != '\u0000')
- return CoderResult.unmappableForLength(1);
-
- mark++;
- dst.put((byte)e);
- }
- return CoderResult.UNDERFLOW;
- } finally {
- src.position(mark);
- }
- }
-
- protected CoderResult encodeLoop(CharBuffer src, ByteBuffer dst) {
- if (true && src.hasArray() && dst.hasArray())
- return encodeArrayLoop(src, dst);
- else
- return encodeBufferLoop(src, dst);
- }
-
- public byte encode(char inputChar) {
- return (byte)index2.charAt(index1[(inputChar & mask1) >> shift] +
- (inputChar & mask2));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/util/Surrogate.java b/src/share/jaxws_classes/com/sun/codemodel/internal/util/Surrogate.java
deleted file mode 100644
index 955340b4..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/util/Surrogate.java
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.util;
-
-import java.nio.CharBuffer;
-import java.nio.charset.CoderResult;
-
-
-/**
- * Utility class for dealing with surrogates.
- *
- * @author Mark Reinhold
- * @version 1.11, 03/01/23
- */
-
-class Surrogate {
-
- private Surrogate() { }
-
- // UTF-16 surrogate-character ranges
- //
- public static final char MIN_HIGH = '\uD800';
- public static final char MAX_HIGH = '\uDBFF';
- public static final char MIN_LOW = '\uDC00';
- public static final char MAX_LOW = '\uDFFF';
- public static final char MIN = MIN_HIGH;
- public static final char MAX = MAX_LOW;
-
- // Range of UCS-4 values that need surrogates in UTF-16
- //
- public static final int UCS4_MIN = 0x10000;
- public static final int UCS4_MAX = (1 << 20) + UCS4_MIN - 1;
-
- /**
- * Tells whether or not the given UTF-16 value is a high surrogate.
- */
- public static boolean isHigh(int c) {
- return (MIN_HIGH <= c) && (c <= MAX_HIGH);
- }
-
- /**
- * Tells whether or not the given UTF-16 value is a low surrogate.
- */
- public static boolean isLow(int c) {
- return (MIN_LOW <= c) && (c <= MAX_LOW);
- }
-
- /**
- * Tells whether or not the given UTF-16 value is a surrogate character,
- */
- public static boolean is(int c) {
- return (MIN <= c) && (c <= MAX);
- }
-
- /**
- * Tells whether or not the given UCS-4 character must be represented as a
- * surrogate pair in UTF-16.
- */
- public static boolean neededFor(int uc) {
- return (uc >= UCS4_MIN) && (uc <= UCS4_MAX);
- }
-
- /**
- * Returns the high UTF-16 surrogate for the given UCS-4 character.
- */
- public static char high(int uc) {
- return (char)(0xd800 | (((uc - UCS4_MIN) >> 10) & 0x3ff));
- }
-
- /**
- * Returns the low UTF-16 surrogate for the given UCS-4 character.
- */
- public static char low(int uc) {
- return (char)(0xdc00 | ((uc - UCS4_MIN) & 0x3ff));
- }
-
- /**
- * Converts the given surrogate pair into a 32-bit UCS-4 character.
- */
- public static int toUCS4(char c, char d) {
- return (((c & 0x3ff) << 10) | (d & 0x3ff)) + 0x10000;
- }
-
- /**
- * Surrogate parsing support. Charset implementations may use instances of
- * this class to handle the details of parsing UTF-16 surrogate pairs.
- */
- public static class Parser {
-
- public Parser() { }
-
- private int character; // UCS-4
- private CoderResult error = CoderResult.UNDERFLOW;
- private boolean isPair;
-
- /**
- * Returns the UCS-4 character previously parsed.
- */
- public int character() {
- return character;
- }
-
- /**
- * Tells whether or not the previously-parsed UCS-4 character was
- * originally represented by a surrogate pair.
- */
- public boolean isPair() {
- return isPair;
- }
-
- /**
- * Returns the number of UTF-16 characters consumed by the previous
- * parse.
- */
- public int increment() {
- return isPair ? 2 : 1;
- }
-
- /**
- * If the previous parse operation detected an error, return the object
- * describing that error.
- */
- public CoderResult error() {
- return error;
- }
-
- /**
- * Returns an unmappable-input result object, with the appropriate
- * input length, for the previously-parsed character.
- */
- public CoderResult unmappableResult() {
- return CoderResult.unmappableForLength(isPair ? 2 : 1);
- }
-
- /**
- * Parses a UCS-4 character from the given source buffer, handling
- * surrogates.
- *
- * @param c The first character
- * @param in The source buffer, from which one more character
- * will be consumed if c is a high surrogate
- *
- * @return Either a parsed UCS-4 character, in which case the isPair()
- * and increment() methods will return meaningful values, or
- * -1, in which case error() will return a descriptive result
- * object
- */
- public int parse(char c, CharBuffer in) {
- if (isHigh(c)) {
- if (!in.hasRemaining()) {
- error = CoderResult.UNDERFLOW;
- return -1;
- }
- char d = in.get();
- if (isLow(d)) {
- character = toUCS4(c, d);
- isPair = true;
- error = null;
- return character;
- }
- error = CoderResult.malformedForLength(1);
- return -1;
- }
- if (isLow(c)) {
- error = CoderResult.malformedForLength(1);
- return -1;
- }
- character = c;
- isPair = false;
- error = null;
- return character;
- }
-
- /**
- * Parses a UCS-4 character from the given source buffer, handling
- * surrogates.
- *
- * @param c The first character
- * @param ia The input array, from which one more character
- * will be consumed if c is a high surrogate
- * @param ip The input index
- * @param il The input limit
- *
- * @return Either a parsed UCS-4 character, in which case the isPair()
- * and increment() methods will return meaningful values, or
- * -1, in which case error() will return a descriptive result
- * object
- */
- public int parse(char c, char[] ia, int ip, int il) {
- if (isHigh(c)) {
- if (il - ip < 2) {
- error = CoderResult.UNDERFLOW;
- return -1;
- }
- char d = ia[ip + 1];
- if (isLow(d)) {
- character = toUCS4(c, d);
- isPair = true;
- error = null;
- return character;
- }
- error = CoderResult.malformedForLength(1);
- return -1;
- }
- if (isLow(c)) {
- error = CoderResult.malformedForLength(1);
- return -1;
- }
- character = c;
- isPair = false;
- error = null;
- return character;
- }
-
- }
-
- /**
- * Surrogate generation support. Charset implementations may use instances
- * of this class to handle the details of generating UTF-16 surrogate
- * pairs.
- */
- public static class Generator {
-
- public Generator() { }
-
- private CoderResult error = CoderResult.OVERFLOW;
-
- /**
- * If the previous generation operation detected an error, return the
- * object describing that error.
- */
- public CoderResult error() {
- return error;
- }
-
- /**
- * Generates one or two UTF-16 characters to represent the given UCS-4
- * character.
- *
- * @param uc The UCS-4 character
- * @param len The number of input bytes from which the UCS-4 value
- * was constructed (used when creating result objects)
- * @param dst The destination buffer, to which one or two UTF-16
- * characters will be written
- *
- * @return Either a positive count of the number of UTF-16 characters
- * written to the destination buffer, or -1, in which case
- * error() will return a descriptive result object
- */
- public int generate(int uc, int len, CharBuffer dst) {
- if (uc <= 0xffff) {
- if (is(uc)) {
- error = CoderResult.malformedForLength(len);
- return -1;
- }
- if (dst.remaining() < 1) {
- error = CoderResult.OVERFLOW;
- return -1;
- }
- dst.put((char)uc);
- error = null;
- return 1;
- }
- if (uc < UCS4_MIN) {
- error = CoderResult.malformedForLength(len);
- return -1;
- }
- if (uc <= UCS4_MAX) {
- if (dst.remaining() < 2) {
- error = CoderResult.OVERFLOW;
- return -1;
- }
- dst.put(high(uc));
- dst.put(low(uc));
- error = null;
- return 2;
- }
- error = CoderResult.unmappableForLength(len);
- return -1;
- }
-
- /**
- * Generates one or two UTF-16 characters to represent the given UCS-4
- * character.
- *
- * @param uc The UCS-4 character
- * @param len The number of input bytes from which the UCS-4 value
- * was constructed (used when creating result objects)
- * @param da The destination array, to which one or two UTF-16
- * characters will be written
- * @param dp The destination position
- * @param dl The destination limit
- *
- * @return Either a positive count of the number of UTF-16 characters
- * written to the destination buffer, or -1, in which case
- * error() will return a descriptive result object
- */
- public int generate(int uc, int len, char[] da, int dp, int dl) {
- if (uc <= 0xffff) {
- if (is(uc)) {
- error = CoderResult.malformedForLength(len);
- return -1;
- }
- if (dl - dp < 1) {
- error = CoderResult.OVERFLOW;
- return -1;
- }
- da[dp] = (char)uc;
- error = null;
- return 1;
- }
- if (uc < UCS4_MIN) {
- error = CoderResult.malformedForLength(len);
- return -1;
- }
- if (uc <= UCS4_MAX) {
- if (dl - dp < 2) {
- error = CoderResult.OVERFLOW;
- return -1;
- }
- da[dp] = high(uc);
- da[dp + 1] = low(uc);
- error = null;
- return 2;
- }
- error = CoderResult.unmappableForLength(len);
- return -1;
- }
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/util/UnicodeEscapeWriter.java b/src/share/jaxws_classes/com/sun/codemodel/internal/util/UnicodeEscapeWriter.java
deleted file mode 100644
index e223476b..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/util/UnicodeEscapeWriter.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.util;
-
-import java.io.FilterWriter;
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * {@link Writer} that escapes non US-ASCII characters into
- * Java Unicode escape \\uXXXX.
- *
- * This process is necessary if the method names or field names
- * contain non US-ASCII characters.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class UnicodeEscapeWriter extends FilterWriter {
-
- public UnicodeEscapeWriter( Writer next ) {
- super(next);
- }
-
- public final void write(int ch) throws IOException {
- if(!requireEscaping(ch)) out.write(ch);
- else {
- // need to escape
- out.write("\\u");
- String s = Integer.toHexString(ch);
- for( int i=s.length(); i<4; i++ )
- out.write('0');
- out.write(s);
- }
- }
-
- /**
- * Can be overrided. Return true if the character
- * needs to be escaped.
- */
- protected boolean requireEscaping(int ch) {
- if(ch>=128) return true;
-
- // control characters
- if( ch<0x20 && " \t\r\n".indexOf(ch)==-1 ) return true;
-
- return false;
- }
-
- public final void write(char[] buf, int off, int len) throws IOException {
- for( int i=0; i<len; i++ )
- write(buf[off+i]);
- }
-
- public final void write(char[] buf) throws IOException {
- write(buf,0,buf.length);
- }
-
- public final void write(String buf, int off, int len) throws IOException {
- write( buf.toCharArray(), off, len );
- }
-
- public final void write(String buf) throws IOException {
- write( buf.toCharArray(), 0, buf.length() );
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/writer/FileCodeWriter.java b/src/share/jaxws_classes/com/sun/codemodel/internal/writer/FileCodeWriter.java
deleted file mode 100644
index f813672b..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/writer/FileCodeWriter.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.writer;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.HashSet;
-import java.util.Set;
-
-import com.sun.codemodel.internal.CodeWriter;
-import com.sun.codemodel.internal.JPackage;
-
-/**
- * Writes all the source files under the specified file folder.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class FileCodeWriter extends CodeWriter {
-
- /** The target directory to put source code. */
- private final File target;
-
- /** specify whether or not to mark the generated files read-only */
- private final boolean readOnly;
-
- /** Files that shall be marked as read only. */
- private final Set<File> readonlyFiles = new HashSet<File>();
-
- public FileCodeWriter( File target ) throws IOException {
- this(target,false);
- }
-
- public FileCodeWriter( File target, String encoding ) throws IOException {
- this(target,false, encoding);
- }
-
- public FileCodeWriter( File target, boolean readOnly ) throws IOException {
- this(target, readOnly, null);
- }
-
- public FileCodeWriter( File target, boolean readOnly, String encoding ) throws IOException {
- this.target = target;
- this.readOnly = readOnly;
- this.encoding = encoding;
- if(!target.exists() || !target.isDirectory())
- throw new IOException(target + ": non-existent directory");
- }
-
- public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
- return new FileOutputStream(getFile(pkg,fileName));
- }
-
- protected File getFile(JPackage pkg, String fileName ) throws IOException {
- File dir;
- if(pkg.isUnnamed())
- dir = target;
- else
- dir = new File(target, toDirName(pkg));
-
- if(!dir.exists()) dir.mkdirs();
-
- File fn = new File(dir,fileName);
-
- if (fn.exists()) {
- if (!fn.delete())
- throw new IOException(fn + ": Can't delete previous version");
- }
-
-
- if(readOnly) readonlyFiles.add(fn);
- return fn;
- }
-
- public void close() throws IOException {
- // mark files as read-onnly if necessary
- for (File f : readonlyFiles)
- f.setReadOnly();
- }
-
- /** Converts a package name to the directory name. */
- private static String toDirName( JPackage pkg ) {
- return pkg.name().replace('.',File.separatorChar);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/writer/FilterCodeWriter.java b/src/share/jaxws_classes/com/sun/codemodel/internal/writer/FilterCodeWriter.java
deleted file mode 100644
index 20c57581..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/writer/FilterCodeWriter.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.writer;
-
-import java.io.OutputStream;
-import java.io.IOException;
-import java.io.Writer;
-
-import com.sun.codemodel.internal.CodeWriter;
-import com.sun.codemodel.internal.JPackage;
-
-/**
- * {@link CodeWriter} that delegates to another {@link CodeWriter}.
- *
- * @author Kohsuke Kawaguchi
- */
-public class FilterCodeWriter extends CodeWriter {
- protected CodeWriter core;
-
- public FilterCodeWriter(CodeWriter core) {
- this.core = core;
- }
-
- public OutputStream openBinary( JPackage pkg, String fileName ) throws IOException {
- return core.openBinary(pkg, fileName);
- }
-
- public Writer openSource( JPackage pkg, String fileName ) throws IOException {
- return core.openSource(pkg, fileName);
- }
-
- public void close() throws IOException {
- core.close();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/writer/ProgressCodeWriter.java b/src/share/jaxws_classes/com/sun/codemodel/internal/writer/ProgressCodeWriter.java
deleted file mode 100644
index abb40de0..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/writer/ProgressCodeWriter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.writer;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.io.Writer;
-
-import com.sun.codemodel.internal.CodeWriter;
-import com.sun.codemodel.internal.JPackage;
-
-/**
- * Filter CodeWriter that writes a progress message to the specified
- * PrintStream.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class ProgressCodeWriter extends FilterCodeWriter {
- public ProgressCodeWriter( CodeWriter output, PrintStream progress ) {
- super(output);
- this.progress = progress;
- if(progress==null)
- throw new IllegalArgumentException();
- }
-
- private final PrintStream progress;
-
- public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
- report(pkg, fileName);
- return super.openBinary(pkg,fileName);
- }
-
- public Writer openSource(JPackage pkg, String fileName) throws IOException {
- report(pkg, fileName);
- return super.openSource(pkg,fileName);
- }
-
- private void report(JPackage pkg, String fileName) {
- if(pkg.isUnnamed()) progress.println(fileName);
- else
- progress.println(
- pkg.name().replace('.',File.separatorChar)
- +File.separatorChar+fileName);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/writer/PrologCodeWriter.java b/src/share/jaxws_classes/com/sun/codemodel/internal/writer/PrologCodeWriter.java
deleted file mode 100644
index 9ea21372..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/writer/PrologCodeWriter.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.writer;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.Writer;
-
-import com.sun.codemodel.internal.CodeWriter;
-import com.sun.codemodel.internal.JPackage;
-
-/**
- * Writes all the source files under the specified file folder and
- * inserts a file prolog comment in each java source file.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class PrologCodeWriter extends FilterCodeWriter {
-
- /** prolog comment */
- private final String prolog;
-
- /**
- * @param core
- * This CodeWriter will be used to actually create a storage for files.
- * PrologCodeWriter simply decorates this underlying CodeWriter by
- * adding prolog comments.
- * @param prolog
- * Strings that will be added as comments.
- * This string may contain newlines to produce multi-line comments.
- * '//' will be inserted at the beginning of each line to make it
- * a valid Java comment, so the caller can just pass strings like
- * "abc\ndef"
- */
- public PrologCodeWriter( CodeWriter core, String prolog ) {
- super(core);
- this.prolog = prolog;
- }
-
-
- public Writer openSource(JPackage pkg, String fileName) throws IOException {
- Writer w = super.openSource(pkg,fileName);
-
- PrintWriter out = new PrintWriter(w);
-
- // write prolog if this is a java source file
- if( prolog != null ) {
- out.println( "//" );
-
- String s = prolog;
- int idx;
- while( (idx=s.indexOf('\n'))!=-1 ) {
- out.println("// "+ s.substring(0,idx) );
- s = s.substring(idx+1);
- }
- out.println("//");
- out.println();
- }
- out.flush(); // we can't close the stream for that would close the undelying stream.
-
- return w;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/writer/SingleStreamCodeWriter.java b/src/share/jaxws_classes/com/sun/codemodel/internal/writer/SingleStreamCodeWriter.java
deleted file mode 100644
index 7901a376..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/writer/SingleStreamCodeWriter.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.writer;
-
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintStream;
-
-import com.sun.codemodel.internal.CodeWriter;
-import com.sun.codemodel.internal.JPackage;
-
-/**
- * Output all source files into a single stream with a little
- * formatting header in front of each file.
- *
- * This is primarily for human consumption of the generated source
- * code, such as to debug/test CodeModel or to quickly inspect the result.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class SingleStreamCodeWriter extends CodeWriter {
-
- private final PrintStream out;
-
- /**
- * @param os
- * This stream will be closed at the end of the code generation.
- */
- public SingleStreamCodeWriter( OutputStream os ) {
- out = new PrintStream(os);
- }
-
- public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
- String pkgName = pkg.name();
- if(pkgName.length()!=0) pkgName += '.';
-
- out.println(
- "-----------------------------------" + pkgName+fileName +
- "-----------------------------------");
-
- return new FilterOutputStream(out) {
- public void close() {
- // don't let this stream close
- }
- };
- }
-
- public void close() throws IOException {
- out.close();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/codemodel/internal/writer/ZipCodeWriter.java b/src/share/jaxws_classes/com/sun/codemodel/internal/writer/ZipCodeWriter.java
deleted file mode 100644
index 13cc1adf..00000000
--- a/src/share/jaxws_classes/com/sun/codemodel/internal/writer/ZipCodeWriter.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.codemodel.internal.writer;
-
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipOutputStream;
-
-import com.sun.codemodel.internal.CodeWriter;
-import com.sun.codemodel.internal.JPackage;
-
-/**
- * Writes all the files into a zip file.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class ZipCodeWriter extends CodeWriter {
- /**
- * @param target
- * Zip file will be written to this stream.
- */
- public ZipCodeWriter( OutputStream target ) {
- zip = new ZipOutputStream(target);
- // nullify the close method.
- filter = new FilterOutputStream(zip){
- public void close() {}
- };
- }
-
- private final ZipOutputStream zip;
-
- private final OutputStream filter;
-
- public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
- String name = fileName;
- if(!pkg.isUnnamed()) name = toDirName(pkg)+name;
-
- zip.putNextEntry(new ZipEntry(name));
- return filter;
- }
-
- /** Converts a package name to the directory name. */
- private static String toDirName( JPackage pkg ) {
- return pkg.name().replace('.','/')+'/';
- }
-
- public void close() throws IOException {
- zip.close();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/Builder.java b/src/share/jaxws_classes/com/sun/istack/internal/Builder.java
deleted file mode 100644
index b0345f39..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/Builder.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal;
-
-/**
- *
- * @author Martin Grebac
- */
-public interface Builder<T> {
- T build();
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/ByteArrayDataSource.java b/src/share/jaxws_classes/com/sun/istack/internal/ByteArrayDataSource.java
deleted file mode 100644
index b52d12fa..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/ByteArrayDataSource.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal;
-
-import javax.activation.DataSource;
-import java.io.InputStream;
-import java.io.ByteArrayInputStream;
-import java.io.OutputStream;
-
-/**
- * {@link DataSource} backed by a byte buffer.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class ByteArrayDataSource implements DataSource {
-
- private final String contentType;
- private final byte[] buf;
- private final int len;
-
- public ByteArrayDataSource(byte[] buf, String contentType) {
- this(buf,buf.length,contentType);
- }
- public ByteArrayDataSource(byte[] buf, int length, String contentType) {
- this.buf = buf;
- this.len = length;
- this.contentType = contentType;
- }
-
- public String getContentType() {
- if(contentType==null)
- return "application/octet-stream";
- return contentType;
- }
-
- public InputStream getInputStream() {
- return new ByteArrayInputStream(buf,0,len);
- }
-
- public String getName() {
- return null;
- }
-
- public OutputStream getOutputStream() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/FinalArrayList.java b/src/share/jaxws_classes/com/sun/istack/internal/FinalArrayList.java
deleted file mode 100644
index 00ad81e3..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/FinalArrayList.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-/**
- * {@link ArrayList} with the final keyword.
- *
- * <p>
- * This gives HotSpot a better hint that all methods can be inlined.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class FinalArrayList<T> extends ArrayList<T> {
- public FinalArrayList(int initialCapacity) {
- super(initialCapacity);
- }
-
- public FinalArrayList() {
- }
-
- public FinalArrayList(Collection<? extends T> ts) {
- super(ts);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/FragmentContentHandler.java b/src/share/jaxws_classes/com/sun/istack/internal/FragmentContentHandler.java
deleted file mode 100644
index 0b0bd73c..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/FragmentContentHandler.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal;
-
-import org.xml.sax.helpers.XMLFilterImpl;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.ContentHandler;
-
-/**
- * {@link XMLFilterImpl} that masks start/end document SAX events.
- * @author Kohsuke Kawaguchi
- */
-public class FragmentContentHandler extends XMLFilterImpl {
- public FragmentContentHandler() {
- }
-
- public FragmentContentHandler(XMLReader parent) {
- super(parent);
- }
-
- public FragmentContentHandler(ContentHandler handler) {
- super();
- setContentHandler(handler);
- }
-
- public void startDocument() throws SAXException {
- // noop
- }
-
- public void endDocument() throws SAXException {
- // noop
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/Interned.java b/src/share/jaxws_classes/com/sun/istack/internal/Interned.java
deleted file mode 100644
index a0b44a4f..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/Interned.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-
-/**
- * Designates that a field, return value, argument, or a variable is supposed
- * to be an {@link String#intern() interned} string.
- *
- * <p>
- * In many places in the istack, we assume Strings to be interned for
- * the performance reason. Similarly, In many other places, we don't
- * make such an assumption for the performance reason (because intern
- * isn't free.)
- *
- * <p>
- * Therefore, distinguishing which part is supposed to be interned and
- * which part is supposed to be not is important. This annotation
- * allows us to capture that in the code.
- *
- * @author Kohsuke Kawaguchi
- */
-@Documented
-@Retention(RetentionPolicy.CLASS)
-@Target({ElementType.FIELD,ElementType.METHOD,ElementType.PARAMETER,ElementType.LOCAL_VARIABLE})
-public @interface Interned {
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/NotNull.java b/src/share/jaxws_classes/com/sun/istack/internal/NotNull.java
deleted file mode 100644
index fcb6f036..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/NotNull.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-
-/**
- * Designates that a field, return value, argument, or a variable is guaranteed to be non-null.
- *
- * @author Kohsuke Kawaguchi
- */
-@Documented
-@Retention(RetentionPolicy.CLASS)
-@Target({ElementType.FIELD,ElementType.METHOD,ElementType.PARAMETER,ElementType.LOCAL_VARIABLE})
-public @interface NotNull {
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/Nullable.java b/src/share/jaxws_classes/com/sun/istack/internal/Nullable.java
deleted file mode 100644
index 26f9dcc5..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/Nullable.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-
-/**
- * Designates that a field, return value, argument, or a variable may be null.
- *
- * @author Kohsuke Kawaguchi
- */
-@Documented
-@Retention(RetentionPolicy.CLASS)
-@Target({ElementType.FIELD,ElementType.METHOD,ElementType.PARAMETER,ElementType.LOCAL_VARIABLE})
-public @interface Nullable {
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/Pool.java b/src/share/jaxws_classes/com/sun/istack/internal/Pool.java
deleted file mode 100644
index 3ff315fc..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/Pool.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal;
-
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.lang.ref.WeakReference;
-
-/**
- * Pool of reusable objects that are indistinguishable from each other,
- * such as JAXB marshallers.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface Pool<T> {
-
- /**
- * Gets a new object from the pool.
- *
- * <p>
- * If no object is available in the pool, this method creates a new one.
- */
- @NotNull T take();
-
- /**
- * Returns an object back to the pool.
- */
- void recycle(@NotNull T t);
-
- /**
- * Default implementation that uses {@link ConcurrentLinkedQueue}
- * as the data store.
- *
- * <h2>Note for Implementors</h2>
- * <p>
- * Don't rely on the fact that this class extends from {@link ConcurrentLinkedQueue}.
- */
- public abstract class Impl<T> implements Pool<T> {
-
- private volatile WeakReference<ConcurrentLinkedQueue<T>> queue;
-
- /**
- * Gets a new object from the pool.
- *
- * <p>
- * If no object is available in the pool, this method creates a new one.
- *
- * @return
- * always non-null.
- */
- public final @NotNull T take() {
- T t = getQueue().poll();
- if(t==null) {
- return create();
- }
- return t;
- }
-
- /**
- * Returns an object back to the pool.
- */
- public final void recycle(T t) {
- getQueue().offer(t);
- }
-
- private ConcurrentLinkedQueue<T> getQueue() {
- WeakReference<ConcurrentLinkedQueue<T>> q = queue;
- if (q != null) {
- ConcurrentLinkedQueue<T> d = q.get();
- if (d != null) {
- return d;
- }
- }
- // overwrite the queue
- ConcurrentLinkedQueue<T> d = new ConcurrentLinkedQueue<T>();
- queue = new WeakReference<ConcurrentLinkedQueue<T>>(d);
-
- return d;
- }
-
- /**
- * Creates a new instance of object.
- *
- * <p>
- * This method is used when someone wants to
- * {@link #take() take} an object from an empty pool.
- *
- * <p>
- * Also note that multiple threads may call this method
- * concurrently.
- */
- protected abstract @NotNull T create();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/SAXException2.java b/src/share/jaxws_classes/com/sun/istack/internal/SAXException2.java
deleted file mode 100644
index d60ff04b..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/SAXException2.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link SAXException} that handles exception chaining correctly.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.0 FCS
- */
-public class SAXException2 extends SAXException {
- public SAXException2(String message) {
- super(message);
- }
-
- public SAXException2(Exception e) {
- super(e);
- }
-
- public SAXException2(String message, Exception e) {
- super(message, e);
- }
-
- public Throwable getCause() {
- return getException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/SAXParseException2.java b/src/share/jaxws_classes/com/sun/istack/internal/SAXParseException2.java
deleted file mode 100644
index 230685b6..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/SAXParseException2.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal;
-
-import org.xml.sax.SAXParseException;
-import org.xml.sax.Locator;
-
-/**
- * {@link SAXParseException} that handles exception chaining correctly.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.0 FCS
- */
-public class SAXParseException2 extends SAXParseException {
- public SAXParseException2(String message, Locator locator) {
- super(message, locator);
- }
-
- public SAXParseException2(String message, Locator locator, Exception e) {
- super(message, locator, e);
- }
-
- public SAXParseException2(String message, String publicId, String systemId, int lineNumber, int columnNumber) {
- super(message, publicId, systemId, lineNumber, columnNumber);
- }
-
- public SAXParseException2(String message, String publicId, String systemId, int lineNumber, int columnNumber, Exception e) {
- super(message, publicId, systemId, lineNumber, columnNumber, e);
- }
-
- public Throwable getCause() {
- return getException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/XMLStreamException2.java b/src/share/jaxws_classes/com/sun/istack/internal/XMLStreamException2.java
deleted file mode 100644
index bc78015f..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/XMLStreamException2.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.Location;
-
-/**
- * {@link XMLStreamException} that properly handles exception chaining.
- *
- * @author Kohsuke Kawaguchi
- */
-public class XMLStreamException2 extends XMLStreamException {
- public XMLStreamException2(String msg) {
- super(msg);
- }
-
- public XMLStreamException2(Throwable th) {
- super(th);
- }
-
- public XMLStreamException2(String msg, Throwable th) {
- super(msg, th);
- }
-
- public XMLStreamException2(String msg, Location location) {
- super(msg, location);
- }
-
- public XMLStreamException2(String msg, Location location, Throwable th) {
- super(msg, location, th);
- }
-
- /**
- * {@link XMLStreamException} doesn't return the correct cause.
- */
- public Throwable getCause() {
- return getNestedException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/XMLStreamReaderToContentHandler.java b/src/share/jaxws_classes/com/sun/istack/internal/XMLStreamReaderToContentHandler.java
deleted file mode 100644
index 7c831290..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/XMLStreamReaderToContentHandler.java
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.Locator;
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.AttributesImpl;
-
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.namespace.QName;
-
-/**
- * This is a simple utility class that adapts StAX events from an
- * {@link XMLStreamReader} to SAX events on a
- * {@link ContentHandler}, bridging between the two
- * parser technologies.
- *
- * @author Ryan.Shoemaker@Sun.COM
- * @version 1.0
- */
-public class XMLStreamReaderToContentHandler {
-
- // StAX event source
- private final XMLStreamReader staxStreamReader;
-
- // SAX event sink
- private final ContentHandler saxHandler;
-
- // if true, when the conversion is completed, leave the cursor to the last
- // event that was fired (such as end element)
- private final boolean eagerQuit;
-
- /**
- * If true, not start/endDocument event.
- */
- private final boolean fragment;
-
- // array of the even length of the form { prefix0, uri0, prefix1, uri1, ... }
- private final String[] inscopeNamespaces;
-
- /**
- * @see #XMLStreamReaderToContentHandler(XMLStreamReader, ContentHandler, boolean, boolean, String[])
- */
- public XMLStreamReaderToContentHandler(XMLStreamReader staxCore, ContentHandler saxCore, boolean eagerQuit, boolean fragment) {
- this(staxCore, saxCore, eagerQuit, fragment, new String[0]);
- }
-
- /**
- * Construct a new StAX to SAX adapter that will convert a StAX event
- * stream into a SAX event stream.
- *
- * @param staxCore
- * StAX event source
- * @param saxCore
- * SAXevent sink
- * @param eagerQuit
- * @param fragment
- * @param inscopeNamespaces
- * array of the even length of the form { prefix0, uri0, prefix1, uri1, ... }
- */
- public XMLStreamReaderToContentHandler(XMLStreamReader staxCore, ContentHandler saxCore,
- boolean eagerQuit, boolean fragment, String[] inscopeNamespaces) {
- this.staxStreamReader = staxCore;
- this.saxHandler = saxCore;
- this.eagerQuit = eagerQuit;
- this.fragment = fragment;
- this.inscopeNamespaces = inscopeNamespaces;
- assert inscopeNamespaces.length%2 == 0;
- }
-
-
- /*
- * @see StAXReaderToContentHandler#bridge()
- */
- public void bridge() throws XMLStreamException {
-
- try {
- // remembers the nest level of elements to know when we are done.
- int depth=0;
-
- // if the parser is at the start tag, proceed to the first element
- int event = staxStreamReader.getEventType();
- if(event == XMLStreamConstants.START_DOCUMENT) {
- // nextTag doesn't correctly handle DTDs
- while( !staxStreamReader.isStartElement() )
- event = staxStreamReader.next();
- }
-
-
- if( event!=XMLStreamConstants.START_ELEMENT)
- throw new IllegalStateException("The current event is not START_ELEMENT\n but " + event);
-
- handleStartDocument();
-
- for(int i=0; i < inscopeNamespaces.length; i+=2) {
- saxHandler.startPrefixMapping(inscopeNamespaces[i], inscopeNamespaces[i+1]);
- }
-
- OUTER:
- do {
- // These are all of the events listed in the javadoc for
- // XMLEvent.
- // The spec only really describes 11 of them.
- switch (event) {
- case XMLStreamConstants.START_ELEMENT :
- depth++;
- handleStartElement();
- break;
- case XMLStreamConstants.END_ELEMENT :
- handleEndElement();
- depth--;
- if(depth==0 && eagerQuit)
- break OUTER;
- break;
- case XMLStreamConstants.CHARACTERS :
- handleCharacters();
- break;
- case XMLStreamConstants.ENTITY_REFERENCE :
- handleEntityReference();
- break;
- case XMLStreamConstants.PROCESSING_INSTRUCTION :
- handlePI();
- break;
- case XMLStreamConstants.COMMENT :
- handleComment();
- break;
- case XMLStreamConstants.DTD :
- handleDTD();
- break;
- case XMLStreamConstants.ATTRIBUTE :
- handleAttribute();
- break;
- case XMLStreamConstants.NAMESPACE :
- handleNamespace();
- break;
- case XMLStreamConstants.CDATA :
- handleCDATA();
- break;
- case XMLStreamConstants.ENTITY_DECLARATION :
- handleEntityDecl();
- break;
- case XMLStreamConstants.NOTATION_DECLARATION :
- handleNotationDecl();
- break;
- case XMLStreamConstants.SPACE :
- handleSpace();
- break;
- default :
- throw new InternalError("processing event: " + event);
- }
-
- event=staxStreamReader.next();
- } while (depth!=0);
-
- for(int i=0; i < inscopeNamespaces.length; i+=2) {
- saxHandler.endPrefixMapping(inscopeNamespaces[i]);
- }
-
- handleEndDocument();
- } catch (SAXException e) {
- throw new XMLStreamException2(e);
- }
- }
-
- private void handleEndDocument() throws SAXException {
- if(fragment)
- return;
-
- saxHandler.endDocument();
- }
-
- private void handleStartDocument() throws SAXException {
- if(fragment)
- return;
-
- saxHandler.setDocumentLocator(new Locator() {
- public int getColumnNumber() {
- return staxStreamReader.getLocation().getColumnNumber();
- }
- public int getLineNumber() {
- return staxStreamReader.getLocation().getLineNumber();
- }
- public String getPublicId() {
- return staxStreamReader.getLocation().getPublicId();
- }
- public String getSystemId() {
- return staxStreamReader.getLocation().getSystemId();
- }
- });
- saxHandler.startDocument();
- }
-
- private void handlePI() throws XMLStreamException {
- try {
- saxHandler.processingInstruction(
- staxStreamReader.getPITarget(),
- staxStreamReader.getPIData());
- } catch (SAXException e) {
- throw new XMLStreamException2(e);
- }
- }
-
- private void handleCharacters() throws XMLStreamException {
- try {
- saxHandler.characters(
- staxStreamReader.getTextCharacters(),
- staxStreamReader.getTextStart(),
- staxStreamReader.getTextLength() );
- } catch (SAXException e) {
- throw new XMLStreamException2(e);
- }
- }
-
- private void handleEndElement() throws XMLStreamException {
- QName qName = staxStreamReader.getName();
-
- try {
- String pfix = qName.getPrefix();
- String rawname = (pfix == null || pfix.length() == 0)
- ? qName.getLocalPart()
- : pfix + ':' + qName.getLocalPart();
- // fire endElement
- saxHandler.endElement(
- qName.getNamespaceURI(),
- qName.getLocalPart(),
- rawname);
-
- // end namespace bindings
- int nsCount = staxStreamReader.getNamespaceCount();
- for (int i = nsCount - 1; i >= 0; i--) {
- String prefix = staxStreamReader.getNamespacePrefix(i);
- if (prefix == null) { // true for default namespace
- prefix = "";
- }
- saxHandler.endPrefixMapping(prefix);
- }
- } catch (SAXException e) {
- throw new XMLStreamException2(e);
- }
- }
-
- private void handleStartElement() throws XMLStreamException {
-
- try {
- // start namespace bindings
- int nsCount = staxStreamReader.getNamespaceCount();
- for (int i = 0; i < nsCount; i++) {
- saxHandler.startPrefixMapping(
- fixNull(staxStreamReader.getNamespacePrefix(i)),
- fixNull(staxStreamReader.getNamespaceURI(i)));
- }
-
- // fire startElement
- QName qName = staxStreamReader.getName();
- String prefix = qName.getPrefix();
- String rawname;
- if(prefix==null || prefix.length()==0)
- rawname = qName.getLocalPart();
- else
- rawname = prefix + ':' + qName.getLocalPart();
- Attributes attrs = getAttributes();
- saxHandler.startElement(
- qName.getNamespaceURI(),
- qName.getLocalPart(),
- rawname,
- attrs);
- } catch (SAXException e) {
- throw new XMLStreamException2(e);
- }
- }
-
- private static String fixNull(String s) {
- if(s==null) return "";
- else return s;
- }
-
- /**
- * Get the attributes associated with the given START_ELEMENT or ATTRIBUTE
- * StAXevent.
- *
- * @return the StAX attributes converted to an org.xml.sax.Attributes
- */
- private Attributes getAttributes() {
- AttributesImpl attrs = new AttributesImpl();
-
- int eventType = staxStreamReader.getEventType();
- if (eventType != XMLStreamConstants.ATTRIBUTE
- && eventType != XMLStreamConstants.START_ELEMENT) {
- throw new InternalError(
- "getAttributes() attempting to process: " + eventType);
- }
-
- // in SAX, namespace declarations are not part of attributes by default.
- // (there's a property to control that, but as far as we are concerned
- // we don't use it.) So don't add xmlns:* to attributes.
-
- // gather non-namespace attrs
- for (int i = 0; i < staxStreamReader.getAttributeCount(); i++) {
- String uri = staxStreamReader.getAttributeNamespace(i);
- if(uri==null) uri="";
- String localName = staxStreamReader.getAttributeLocalName(i);
- String prefix = staxStreamReader.getAttributePrefix(i);
- String qName;
- if(prefix==null || prefix.length()==0)
- qName = localName;
- else
- qName = prefix + ':' + localName;
- String type = staxStreamReader.getAttributeType(i);
- String value = staxStreamReader.getAttributeValue(i);
-
- attrs.addAttribute(uri, localName, qName, type, value);
- }
-
- return attrs;
- }
-
- private void handleNamespace() {
- // no-op ???
- // namespace events don't normally occur outside of a startElement
- // or endElement
- }
-
- private void handleAttribute() {
- // no-op ???
- // attribute events don't normally occur outside of a startElement
- // or endElement
- }
-
- private void handleDTD() {
- // no-op ???
- // it seems like we need to pass this info along, but how?
- }
-
- private void handleComment() {
- // no-op ???
- }
-
- private void handleEntityReference() {
- // no-op ???
- }
-
- private void handleSpace() {
- // no-op ???
- // this event is listed in the javadoc, but not in the spec.
- }
-
- private void handleNotationDecl() {
- // no-op ???
- // this event is listed in the javadoc, but not in the spec.
- }
-
- private void handleEntityDecl() {
- // no-op ???
- // this event is listed in the javadoc, but not in the spec.
- }
-
- private void handleCDATA() {
- // no-op ???
- // this event is listed in the javadoc, but not in the spec.
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/localization/Localizable.java b/src/share/jaxws_classes/com/sun/istack/internal/localization/Localizable.java
deleted file mode 100644
index 32b12d4f..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/localization/Localizable.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal.localization;
-
-/**
- * Localizable message.
- *
- * @author WS Development Team
- */
-public interface Localizable {
- /**
- * Gets the key in the resource bundle.
- *
- * @return
- * if this method returns {@link #NOT_LOCALIZABLE},
- * that means the message is not localizable, and
- * the first item of {@link #getArguments()} array
- * holds a String.
- */
- public String getKey();
-
- /**
- * Returns the arguments for message formatting.
- *
- * @return
- * can be an array of length 0 but never be null.
- */
- public Object[] getArguments();
- public String getResourceBundleName();
-
-
- /**
- * Special constant that represents a message that
- * is not localizable.
- *
- * <p>
- * Use of "new" is to create an unique instance.
- */
- public static final String NOT_LOCALIZABLE = "\u0000";
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessage.java b/src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessage.java
deleted file mode 100644
index c38730ea..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessage.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal.localization;
-
-import java.util.Arrays;
-
-/**
- * @author WS Development Team
- */
-public final class LocalizableMessage implements Localizable {
-
- private final String _bundlename;
- private final String _key;
- private final Object[] _args;
-
- public LocalizableMessage(String bundlename, String key, Object... args) {
- _bundlename = bundlename;
- _key = key;
- if(args==null)
- args = new Object[0];
- _args = args;
- }
-
- public String getKey() {
- return _key;
- }
-
- public Object[] getArguments() {
- return Arrays.copyOf(_args, _args.length);
- }
-
- public String getResourceBundleName() {
- return _bundlename;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java b/src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java
deleted file mode 100644
index 1b3aea5b..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal.localization;
-
-/**
- * @author WS Development Team
- */
-public class LocalizableMessageFactory {
-
- private final String _bundlename;
-
- public LocalizableMessageFactory(String bundlename) {
- _bundlename = bundlename;
- }
-
- public Localizable getMessage(String key, Object... args) {
- return new LocalizableMessage(_bundlename, key, args);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/localization/Localizer.java b/src/share/jaxws_classes/com/sun/istack/internal/localization/Localizer.java
deleted file mode 100644
index 16185e77..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/localization/Localizer.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal.localization;
-
-import java.text.MessageFormat;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Localizes the {@link Localizable} into a message
- * by using a configured {@link Locale}.
- *
- * @author WS Development Team
- */
-public class Localizer {
-
- private final Locale _locale;
- private final HashMap _resourceBundles;
-
- public Localizer() {
- this(Locale.getDefault());
- }
-
- public Localizer(Locale l) {
- _locale = l;
- _resourceBundles = new HashMap();
- }
-
- public Locale getLocale() {
- return _locale;
- }
-
- public String localize(Localizable l) {
- String key = l.getKey();
- if (key == Localizable.NOT_LOCALIZABLE) {
- // this message is not localizable
- return (String) l.getArguments()[0];
- }
- String bundlename = l.getResourceBundleName();
-
- try {
- ResourceBundle bundle =
- (ResourceBundle) _resourceBundles.get(bundlename);
-
- if (bundle == null) {
- try {
- bundle = ResourceBundle.getBundle(bundlename, _locale);
- } catch (MissingResourceException e) {
- // work around a bug in the com.sun.enterprise.deployment.WebBundleArchivist:
- // all files with an extension different from .class (hence all the .properties files)
- // get copied to the top level directory instead of being in the package where they
- // are defined
- // so, since we can't find the bundle under its proper name, we look for it under
- // the top-level package
-
- int i = bundlename.lastIndexOf('.');
- if (i != -1) {
- String alternateBundleName =
- bundlename.substring(i + 1);
- try {
- bundle =
- ResourceBundle.getBundle(
- alternateBundleName,
- _locale);
- } catch (MissingResourceException e2) {
- //try context classloader
- try {
- bundle = ResourceBundle.getBundle(bundlename, _locale, Thread.currentThread().getContextClassLoader());
- } catch (MissingResourceException e3) {
- // give up
- return getDefaultMessage(l);
- }
-
- }
- }
- }
-
- _resourceBundles.put(bundlename, bundle);
- }
-
- if (bundle == null) {
- return getDefaultMessage(l);
- }
-
- if (key == null)
- key = "undefined";
-
- String msg;
- try {
- msg = bundle.getString(key);
- } catch (MissingResourceException e) {
- // notice that this may throw a MissingResourceException of its own (caught below)
- msg = bundle.getString("undefined");
- }
-
- // localize all arguments to the given localizable object
- Object[] args = l.getArguments();
- for (int i = 0; i < args.length; ++i) {
- if (args[i] instanceof Localizable)
- args[i] = localize((Localizable) args[i]);
- }
-
- String message = MessageFormat.format(msg, args);
- return message;
-
- } catch (MissingResourceException e) {
- return getDefaultMessage(l);
- }
-
- }
-
- private String getDefaultMessage(Localizable l) {
- String key = l.getKey();
- Object[] args = l.getArguments();
- StringBuilder sb = new StringBuilder();
- sb.append("[failed to localize] ");
- sb.append(key);
- if (args != null) {
- sb.append('(');
- for (int i = 0; i < args.length; ++i) {
- if (i != 0)
- sb.append(", ");
- sb.append(String.valueOf(args[i]));
- }
- sb.append(')');
- }
- return sb.toString();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/localization/NullLocalizable.java b/src/share/jaxws_classes/com/sun/istack/internal/localization/NullLocalizable.java
deleted file mode 100644
index 7b071b18..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/localization/NullLocalizable.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal.localization;
-
-/**
- * {@link Localizable} that wraps a non-localizable string.
- *
- * @author WS Development Team
- */
-public final class NullLocalizable implements Localizable {
- private final String msg;
-
- public NullLocalizable(String msg) {
- if(msg==null)
- throw new IllegalArgumentException();
- this.msg = msg;
- }
-
- public String getKey() {
- return Localizable.NOT_LOCALIZABLE;
- }
- public Object[] getArguments() {
- return new Object[]{msg};
- }
- public String getResourceBundleName() {
- return "";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/logging/Logger.java b/src/share/jaxws_classes/com/sun/istack/internal/logging/Logger.java
deleted file mode 100644
index 59a02d5b..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/logging/Logger.java
+++ /dev/null
@@ -1,515 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal.logging;
-
-import com.sun.istack.internal.NotNull;
-
-import java.util.StringTokenizer;
-import java.util.logging.Level;
-
-/**
- * This is a helper class that provides some convenience methods wrapped around the
- * standard {@link java.util.logging.Logger} interface.
- *
- * The class also makes sure that logger names of each Metro subsystem are consistent
- * with each other.
- *
- * @author Marek Potociar <marek.potociar at sun.com>
- * @author Fabian Ritzmann
- */
-public class Logger {
-
- private static final String WS_LOGGING_SUBSYSTEM_NAME_ROOT = "com.sun.metro";
- private static final String ROOT_WS_PACKAGE = "com.sun.xml.internal.ws.";
- //
- private static final Level METHOD_CALL_LEVEL_VALUE = Level.FINEST;
- //
- private final String componentClassName;
- private final java.util.logging.Logger logger;
-
- /**
- * Prevents creation of a new instance of this Logger unless used by a subclass.
- */
- protected Logger(final String systemLoggerName, final String componentName) {
- this.componentClassName = "[" + componentName + "] ";
- this.logger = java.util.logging.Logger.getLogger(systemLoggerName);
- }
-
- /**
- * <p>
- * The factory method returns preconfigured Logger wrapper for the class. Method calls
- * {@link #getSystemLoggerName(java.lang.Class)} to generate default logger name.
- * </p>
- * <p>
- * Since there is no caching implemented, it is advised that the method is called only once
- * per a class in order to initialize a final static logger variable, which is then used
- * through the class to perform actual logging tasks.
- * </p>
- *
- * @param componentClass class of the component that will use the logger instance. Must not be {@code null}.
- * @return logger instance preconfigured for use with the component
- * @throws NullPointerException if the componentClass parameter is {@code null}.
- */
- public static @NotNull Logger getLogger(final @NotNull Class<?> componentClass) {
- return new Logger(getSystemLoggerName(componentClass), componentClass.getName());
- }
-
- /**
- * The factory method returns preconfigured Logger wrapper for the class. Since there is no caching implemented,
- * it is advised that the method is called only once per a class in order to initialize a final static logger variable,
- * which is then used through the class to perform actual logging tasks.
- *
- * This method should be only used in a special cases when overriding of a default logger name derived from the
- * package of the component class is needed. For all common use cases please use {@link #getLogger(java.lang.Class)}
- * method.
- *
- * @param customLoggerName custom name of the logger.
- * @param componentClass class of the component that will use the logger instance. Must not be {@code null}.
- * @return logger instance preconfigured for use with the component
- * @throws NullPointerException if the componentClass parameter is {@code null}.
- *
- * @see #getLogger(java.lang.Class)
- */
- public static @NotNull Logger getLogger(final @NotNull String customLoggerName, final @NotNull Class<?> componentClass) {
- return new Logger(customLoggerName, componentClass.getName());
- }
-
- /**
- * Calculates the subsystem suffix based on the package of the component class
- * @param componentClass class of the component that will use the logger instance. Must not be {@code null}.
- * @return system logger name for the given {@code componentClass} instance
- */
- static final String getSystemLoggerName(@NotNull Class<?> componentClass) {
- StringBuilder sb = new StringBuilder(componentClass.getPackage().getName());
- final int lastIndexOfWsPackage = sb.lastIndexOf(ROOT_WS_PACKAGE);
- if (lastIndexOfWsPackage > -1) {
- sb.replace(0, lastIndexOfWsPackage + ROOT_WS_PACKAGE.length(), "");
-
- StringTokenizer st = new StringTokenizer(sb.toString(), ".");
- sb = new StringBuilder(WS_LOGGING_SUBSYSTEM_NAME_ROOT).append(".");
- if (st.hasMoreTokens()) {
- String token = st.nextToken();
- if ("api".equals(token)) {
- token = st.nextToken();
- }
- sb.append(token);
- }
- }
-
- return sb.toString();
- }
-
- public void log(final Level level, final String message) {
- if (!this.logger.isLoggable(level)) {
- return;
- }
- logger.logp(level, componentClassName, getCallerMethodName(), message);
- }
-
- public void log(final Level level, final String message, Object param1) {
- if (!this.logger.isLoggable(level)) {
- return;
- }
- logger.logp(level, componentClassName, getCallerMethodName(), message, param1);
- }
-
- public void log(final Level level, final String message, Object[] params) {
- if (!this.logger.isLoggable(level)) {
- return;
- }
- logger.logp(level, componentClassName, getCallerMethodName(), message, params);
- }
-
- public void log(final Level level, final String message, final Throwable thrown) {
- if (!this.logger.isLoggable(level)) {
- return;
- }
- logger.logp(level, componentClassName, getCallerMethodName(), message, thrown);
- }
-
- public void finest(final String message) {
- if (!this.logger.isLoggable(Level.FINEST)) {
- return;
- }
- logger.logp(Level.FINEST, componentClassName, getCallerMethodName(), message);
- }
-
- public void finest(final String message, Object[] params) {
- if (!this.logger.isLoggable(Level.FINEST)) {
- return;
- }
- logger.logp(Level.FINEST, componentClassName, getCallerMethodName(), message, params);
- }
-
- public void finest(final String message, final Throwable thrown) {
- if (!this.logger.isLoggable(Level.FINEST)) {
- return;
- }
- logger.logp(Level.FINEST, componentClassName, getCallerMethodName(), message, thrown);
- }
-
- public void finer(final String message) {
- if (!this.logger.isLoggable(Level.FINER)) {
- return;
- }
- logger.logp(Level.FINER, componentClassName, getCallerMethodName(), message);
- }
-
- public void finer(final String message, Object[] params) {
- if (!this.logger.isLoggable(Level.FINER)) {
- return;
- }
- logger.logp(Level.FINER, componentClassName, getCallerMethodName(), message, params);
- }
-
- public void finer(final String message, final Throwable thrown) {
- if (!this.logger.isLoggable(Level.FINER)) {
- return;
- }
- logger.logp(Level.FINER, componentClassName, getCallerMethodName(), message, thrown);
- }
-
- public void fine(final String message) {
- if (!this.logger.isLoggable(Level.FINE)) {
- return;
- }
- logger.logp(Level.FINE, componentClassName, getCallerMethodName(), message);
- }
-
- public void fine(final String message, final Throwable thrown) {
- if (!this.logger.isLoggable(Level.FINE)) {
- return;
- }
- logger.logp(Level.FINE, componentClassName, getCallerMethodName(), message, thrown);
- }
-
- public void info(final String message) {
- if (!this.logger.isLoggable(Level.INFO)) {
- return;
- }
- logger.logp(Level.INFO, componentClassName, getCallerMethodName(), message);
- }
-
- public void info(final String message, Object[] params) {
- if (!this.logger.isLoggable(Level.INFO)) {
- return;
- }
- logger.logp(Level.INFO, componentClassName, getCallerMethodName(), message, params);
- }
-
- public void info(final String message, final Throwable thrown) {
- if (!this.logger.isLoggable(Level.INFO)) {
- return;
- }
- logger.logp(Level.INFO, componentClassName, getCallerMethodName(), message, thrown);
- }
-
- public void config(final String message) {
- if (!this.logger.isLoggable(Level.CONFIG)) {
- return;
- }
- logger.logp(Level.CONFIG, componentClassName, getCallerMethodName(), message);
- }
-
- public void config(final String message, Object[] params) {
- if (!this.logger.isLoggable(Level.CONFIG)) {
- return;
- }
- logger.logp(Level.CONFIG, componentClassName, getCallerMethodName(), message, params);
- }
-
- public void config(final String message, final Throwable thrown) {
- if (!this.logger.isLoggable(Level.CONFIG)) {
- return;
- }
- logger.logp(Level.CONFIG, componentClassName, getCallerMethodName(), message, thrown);
- }
-
- public void warning(final String message) {
- if (!this.logger.isLoggable(Level.WARNING)) {
- return;
- }
- logger.logp(Level.WARNING, componentClassName, getCallerMethodName(), message);
- }
-
- public void warning(final String message, Object[] params) {
- if (!this.logger.isLoggable(Level.WARNING)) {
- return;
- }
- logger.logp(Level.WARNING, componentClassName, getCallerMethodName(), message, params);
- }
-
- public void warning(final String message, final Throwable thrown) {
- if (!this.logger.isLoggable(Level.WARNING)) {
- return;
- }
- logger.logp(Level.WARNING, componentClassName, getCallerMethodName(), message, thrown);
- }
-
- public void severe(final String message) {
- if (!this.logger.isLoggable(Level.SEVERE)) {
- return;
- }
- logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), message);
- }
-
- public void severe(final String message, Object[] params) {
- if (!this.logger.isLoggable(Level.SEVERE)) {
- return;
- }
- logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), message, params);
- }
-
- public void severe(final String message, final Throwable thrown) {
- if (!this.logger.isLoggable(Level.SEVERE)) {
- return;
- }
- logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), message, thrown);
- }
-
- public boolean isMethodCallLoggable() {
- return this.logger.isLoggable(METHOD_CALL_LEVEL_VALUE);
- }
-
- public boolean isLoggable(final Level level) {
- return this.logger.isLoggable(level);
- }
-
- public void setLevel(final Level level) {
- this.logger.setLevel(level);
- }
-
- public void entering() {
- if (!this.logger.isLoggable(METHOD_CALL_LEVEL_VALUE)) {
- return;
- }
-
- logger.entering(componentClassName, getCallerMethodName());
- }
-
- public void entering(final Object... parameters) {
- if (!this.logger.isLoggable(METHOD_CALL_LEVEL_VALUE)) {
- return;
- }
-
- logger.entering(componentClassName, getCallerMethodName(), parameters);
- }
-
- public void exiting() {
- if (!this.logger.isLoggable(METHOD_CALL_LEVEL_VALUE)) {
- return;
- }
- logger.exiting(componentClassName, getCallerMethodName());
- }
-
- public void exiting(final Object result) {
- if (!this.logger.isLoggable(METHOD_CALL_LEVEL_VALUE)) {
- return;
- }
- logger.exiting(componentClassName, getCallerMethodName(), result);
- }
-
- /**
- * Method logs {@code exception}'s message as a {@code SEVERE} logging level
- * message.
- * <p/>
- * If {@code cause} parameter is not {@code null}, it is logged as well and
- * {@code exception} original cause is initialized with instance referenced
- * by {@code cause} parameter.
- *
- * @param exception exception whose message should be logged. Must not be
- * {@code null}.
- * @param cause initial cause of the exception that should be logged as well
- * and set as {@code exception}'s original cause. May be {@code null}.
- * @return the same exception instance that was passed in as the {@code exception}
- * parameter.
- */
- public <T extends Throwable> T logSevereException(final T exception, final Throwable cause) {
- if (this.logger.isLoggable(Level.SEVERE)) {
- if (cause == null) {
- logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), exception.getMessage());
- } else {
- exception.initCause(cause);
- logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), exception.getMessage(), cause);
- }
- }
-
- return exception;
- }
-
- /**
- * Method logs {@code exception}'s message as a {@code SEVERE} logging level
- * message.
- * <p/>
- * If {@code logCause} parameter is {@code true}, {@code exception}'s original
- * cause is logged as well (if exists). This may be used in cases when
- * {@code exception}'s class provides constructor to initialize the original
- * cause. In such case you do not need to use
- * {@link #logSevereException(Throwable, Throwable)}
- * method version but you might still want to log the original cause as well.
- *
- * @param exception exception whose message should be logged. Must not be
- * {@code null}.
- * @param logCause deterimnes whether initial cause of the exception should
- * be logged as well
- * @return the same exception instance that was passed in as the {@code exception}
- * parameter.
- */
- public <T extends Throwable> T logSevereException(final T exception, final boolean logCause) {
- if (this.logger.isLoggable(Level.SEVERE)) {
- if (logCause && exception.getCause() != null) {
- logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), exception.getMessage(), exception.getCause());
- } else {
- logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), exception.getMessage());
- }
- }
-
- return exception;
- }
-
- /**
- * Same as {@link #logSevereException(Throwable, boolean) logSevereException(exception, true)}.
- */
- public <T extends Throwable> T logSevereException(final T exception) {
- if (this.logger.isLoggable(Level.SEVERE)) {
- if (exception.getCause() == null) {
- logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), exception.getMessage());
- } else {
- logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), exception.getMessage(), exception.getCause());
- }
- }
-
- return exception;
- }
-
- /**
- * Method logs {@code exception}'s message at the logging level specified by the
- * {@code level} argument.
- * <p/>
- * If {@code cause} parameter is not {@code null}, it is logged as well and
- * {@code exception} original cause is initialized with instance referenced
- * by {@code cause} parameter.
- *
- * @param exception exception whose message should be logged. Must not be
- * {@code null}.
- * @param cause initial cause of the exception that should be logged as well
- * and set as {@code exception}'s original cause. May be {@code null}.
- * @param level loging level which should be used for logging
- * @return the same exception instance that was passed in as the {@code exception}
- * parameter.
- */
- public <T extends Throwable> T logException(final T exception, final Throwable cause, final Level level) {
- if (this.logger.isLoggable(level)) {
- if (cause == null) {
- logger.logp(level, componentClassName, getCallerMethodName(), exception.getMessage());
- } else {
- exception.initCause(cause);
- logger.logp(level, componentClassName, getCallerMethodName(), exception.getMessage(), cause);
- }
- }
-
- return exception;
- }
-
- /**
- * Method logs {@code exception}'s message at the logging level specified by the
- * {@code level} argument.
- * <p/>
- * If {@code logCause} parameter is {@code true}, {@code exception}'s original
- * cause is logged as well (if exists). This may be used in cases when
- * {@code exception}'s class provides constructor to initialize the original
- * cause. In such case you do not need to use
- * {@link #logException(Throwable, Throwable, Level) logException(exception, cause, level)}
- * method version but you might still want to log the original cause as well.
- *
- * @param exception exception whose message should be logged. Must not be
- * {@code null}.
- * @param logCause deterimnes whether initial cause of the exception should
- * be logged as well
- * @param level loging level which should be used for logging
- * @return the same exception instance that was passed in as the {@code exception}
- * parameter.
- */
- public <T extends Throwable> T logException(final T exception, final boolean logCause, final Level level) {
- if (this.logger.isLoggable(level)) {
- if (logCause && exception.getCause() != null) {
- logger.logp(level, componentClassName, getCallerMethodName(), exception.getMessage(), exception.getCause());
- } else {
- logger.logp(level, componentClassName, getCallerMethodName(), exception.getMessage());
- }
- }
-
- return exception;
- }
-
- /**
- * Same as {@link #logException(Throwable, Throwable, Level)
- * logException(exception, true, level)}.
- */
- public <T extends Throwable> T logException(final T exception, final Level level) {
- if (this.logger.isLoggable(level)) {
- if (exception.getCause() == null) {
- logger.logp(level, componentClassName, getCallerMethodName(), exception.getMessage());
- } else {
- logger.logp(level, componentClassName, getCallerMethodName(), exception.getMessage(), exception.getCause());
- }
- }
-
- return exception;
- }
-
- /**
- * Function returns the name of the caller method for the method executing this
- * function.
- *
- * @return caller method name from the call stack of the current {@link Thread}.
- */
- private static String getCallerMethodName() {
- return getStackMethodName(5);
- }
-
- /**
- * Method returns the name of the method that is on the {@code methodIndexInStack}
- * position in the call stack of the current {@link Thread}.
- *
- * @param methodIndexInStack index to the call stack to get the method name for.
- * @return the name of the method that is on the {@code methodIndexInStack}
- * position in the call stack of the current {@link Thread}.
- */
- private static String getStackMethodName(final int methodIndexInStack) {
- final String methodName;
-
- final StackTraceElement[] stack = Thread.currentThread().getStackTrace();
- if (stack.length > methodIndexInStack + 1) {
- methodName = stack[methodIndexInStack].getMethodName();
- } else {
- methodName = "UNKNOWN METHOD";
- }
-
- return methodName;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/package-info.java b/src/share/jaxws_classes/com/sun/istack/internal/package-info.java
deleted file mode 100644
index 8c9941a0..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/package-info.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * istack-commons runtime utilities.
- */
-package com.sun.istack.internal;
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/tools/DefaultAuthenticator.java b/src/share/jaxws_classes/com/sun/istack/internal/tools/DefaultAuthenticator.java
deleted file mode 100644
index d4feaeec..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/tools/DefaultAuthenticator.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.istack.internal.tools;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.Field;
-import java.net.Authenticator;
-import java.net.Authenticator.RequestorType;
-import java.net.MalformedURLException;
-import java.net.PasswordAuthentication;
-import java.net.URL;
-import java.net.URLDecoder;
-import java.net.URLEncoder;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.regex.Pattern;
-import org.xml.sax.Locator;
-import org.xml.sax.helpers.LocatorImpl;
-
-/**
- * @author Vivek Pandey
- * @author Lukas Jungmann
- */
-public class DefaultAuthenticator extends Authenticator {
-
- private static DefaultAuthenticator instance;
- private static Authenticator systemAuthenticator = getCurrentAuthenticator();
- private String proxyUser;
- private String proxyPasswd;
- private final List<AuthInfo> authInfo = new ArrayList<AuthInfo>();
- private static int counter = 0;
-
- DefaultAuthenticator() {
- //try undocumented but often used properties
- if (System.getProperty("http.proxyUser") != null) {
- proxyUser = System.getProperty("http.proxyUser");
- } else {
- proxyUser = System.getProperty("proxyUser");
- }
- if (System.getProperty("http.proxyPassword") != null) {
- proxyPasswd = System.getProperty("http.proxyPassword");
- } else {
- proxyPasswd = System.getProperty("proxyPassword");
- }
- }
-
- public static synchronized DefaultAuthenticator getAuthenticator() {
- if (instance == null) {
- instance = new DefaultAuthenticator();
- Authenticator.setDefault(instance);
- }
- counter++;
- return instance;
- }
-
- public static synchronized void reset() {
- --counter;
- if (instance != null && counter == 0) {
- Authenticator.setDefault(systemAuthenticator);
- }
- }
-
- @Override
- protected PasswordAuthentication getPasswordAuthentication() {
- //If user sets proxy user and passwd and the RequestType is from proxy server then create
- // PasswordAuthentication using proxyUser and proxyPasswd;
- if ((getRequestorType() == RequestorType.PROXY) && proxyUser != null && proxyPasswd != null) {
- return new PasswordAuthentication(proxyUser, proxyPasswd.toCharArray());
- }
- for (AuthInfo auth : authInfo) {
- if (auth.matchingHost(getRequestingURL())) {
- return new PasswordAuthentication(auth.getUser(), auth.getPassword().toCharArray());
- }
- }
- return null;
- }
-
- /**
- * Proxy authorization string in form of username:password.
- *
- * @param proxyAuth
- */
- public void setProxyAuth(String proxyAuth) {
- if (proxyAuth == null) {
- this.proxyUser = null;
- this.proxyPasswd = null;
- } else {
- int i = proxyAuth.indexOf(':');
- if (i < 0) {
- this.proxyUser = proxyAuth;
- this.proxyPasswd = "";
- } else if (i == 0) {
- this.proxyUser = "";
- this.proxyPasswd = proxyAuth.substring(1);
- } else {
- this.proxyUser = proxyAuth.substring(0, i);
- this.proxyPasswd = proxyAuth.substring(i + 1);
- }
- }
- }
-
- public void setAuth(File f, Receiver l) {
- Receiver listener = l == null ? new DefaultRImpl() : l;
- BufferedReader in = null;
- FileInputStream fi = null;
- InputStreamReader is = null;
- try {
- String text;
- LocatorImpl locator = new LocatorImpl();
- locator.setSystemId(f.getAbsolutePath());
- try {
- fi = new FileInputStream(f);
- is = new InputStreamReader(fi, "UTF-8");
- in = new BufferedReader(is);
- } catch (UnsupportedEncodingException e) {
- listener.onError(e, locator);
- return;
- } catch (FileNotFoundException e) {
- listener.onError(e, locator);
- return;
- }
- try {
- int lineno = 1;
- locator.setSystemId(f.getCanonicalPath());
- while ((text = in.readLine()) != null) {
- locator.setLineNumber(lineno++);
- //ignore empty lines and treat those starting with '#' as comments
- if ("".equals(text.trim()) || text.startsWith("#")) {
- continue;
- }
- try {
- AuthInfo ai = parseLine(text);
- authInfo.add(ai);
- } catch (Exception e) {
- listener.onParsingError(text, locator);
- }
- }
- } catch (IOException e) {
- listener.onError(e, locator);
- Logger.getLogger(DefaultAuthenticator.class.getName()).log(Level.SEVERE, e.getMessage(), e);
- }
- } finally {
- try {
- if (in != null) {
- in.close();
- }
- if (is != null) {
- is.close();
- }
- if (fi != null) {
- fi.close();
- }
- } catch (IOException ex) {
- Logger.getLogger(DefaultAuthenticator.class.getName()).log(Level.SEVERE, null, ex);
- }
- }
- }
-
- private AuthInfo parseLine(String text) throws Exception {
- URL url;
- try {
- url = new URL(text);
- } catch (MalformedURLException mue) {
- //possible cause of this can be that password contains
- //character which has to be encoded in URL,
- //such as '@', ')', '#' and few others
- //so try to recreate the URL with encoded string
- //between 2nd ':' and last '@'
- int i = text.indexOf(':', text.indexOf(':') + 1) + 1;
- int j = text.lastIndexOf('@');
- String encodedUrl =
- text.substring(0, i)
- + URLEncoder.encode(text.substring(i, j), "UTF-8")
- + text.substring(j);
- url = new URL(encodedUrl);
- }
-
- String authinfo = url.getUserInfo();
-
- if (authinfo != null) {
- int i = authinfo.indexOf(':');
-
- if (i >= 0) {
- String user = authinfo.substring(0, i);
- String password = authinfo.substring(i + 1);
- return new AuthInfo(
- new URL(url.getProtocol(), url.getHost(), url.getPort(), url.getFile()),
- user, URLDecoder.decode(password, "UTF-8"));
- }
- }
- throw new Exception();
- }
-
- static Authenticator getCurrentAuthenticator() {
- final Field f = getTheAuthenticator();
- if (f == null) {
- return null;
- }
-
- try {
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
- @Override
- public Void run() {
- f.setAccessible(true);
- return null;
- }
- });
- return (Authenticator) f.get(null);
- } catch (Exception ex) {
- return null;
- } finally {
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
- @Override
- public Void run() {
- f.setAccessible(false);
- return null;
- }
- });
- }
- }
-
- private static Field getTheAuthenticator() {
- try {
- return Authenticator.class.getDeclaredField("theAuthenticator");
- } catch (Exception ex) {
- return null;
- }
- }
-
- public static interface Receiver {
-
- void onParsingError(String line, Locator loc);
-
- void onError(Exception e, Locator loc);
- }
-
- private static class DefaultRImpl implements Receiver {
-
- @Override
- public void onParsingError(String line, Locator loc) {
- System.err.println(getLocationString(loc) + ": " + line);
- }
-
- @Override
- public void onError(Exception e, Locator loc) {
- System.err.println(getLocationString(loc) + ": " + e.getMessage());
- Logger.getLogger(DefaultAuthenticator.class.getName()).log(Level.SEVERE, e.getMessage(), e);
- }
-
- private String getLocationString(Locator l) {
- return "[" + l.getSystemId() + "#" + l.getLineNumber() + "]";
- }
- }
-
- /**
- * Represents authorization information needed by
- * {@link DefaultAuthenticator} to authenticate access to remote resources.
- *
- * @author Vivek Pandey
- * @author Lukas Jungmann
- */
- final static class AuthInfo {
-
- private final String user;
- private final String password;
- private final Pattern urlPattern;
-
- public AuthInfo(URL url, String user, String password) {
- String u = url.toExternalForm().replaceFirst("\\?", "\\\\?");
- this.urlPattern = Pattern.compile(u.replace("*", ".*"), Pattern.CASE_INSENSITIVE);
- this.user = user;
- this.password = password;
- }
-
- public String getUser() {
- return user;
- }
-
- public String getPassword() {
- return password;
- }
-
- /**
- * Returns if the requesting host and port are associated with this
- * {@link AuthInfo}
- */
- public boolean matchingHost(URL requestingURL) {
- return urlPattern.matcher(requestingURL.toExternalForm()).matches();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/tools/MaskingClassLoader.java b/src/share/jaxws_classes/com/sun/istack/internal/tools/MaskingClassLoader.java
deleted file mode 100644
index b8fb8182..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/tools/MaskingClassLoader.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal.tools;
-
-import java.util.Collection;
-
-/**
- * {@link ClassLoader} that masks a specified set of classes
- * from its parent class loader.
- *
- * <p>
- * This code is used to create an isolated environment.
- *
- * @author Kohsuke Kawaguchi
- */
-public class MaskingClassLoader extends ClassLoader {
-
- private final String[] masks;
-
- public MaskingClassLoader(String... masks) {
- this.masks = masks;
- }
-
- public MaskingClassLoader(Collection<String> masks) {
- this(masks.toArray(new String[masks.size()]));
- }
-
- public MaskingClassLoader(ClassLoader parent, String... masks) {
- super(parent);
- this.masks = masks;
- }
-
- public MaskingClassLoader(ClassLoader parent, Collection<String> masks) {
- this(parent, masks.toArray(new String[masks.size()]));
- }
-
- @Override
- protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
- for (String mask : masks) {
- if(name.startsWith(mask))
- throw new ClassNotFoundException();
- }
-
- return super.loadClass(name, resolve);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/tools/ParallelWorldClassLoader.java b/src/share/jaxws_classes/com/sun/istack/internal/tools/ParallelWorldClassLoader.java
deleted file mode 100644
index 5ed042ed..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/tools/ParallelWorldClassLoader.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.istack.internal.tools;
-
-import java.io.InputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.Closeable;
-import java.io.File;
-import java.io.IOException;
-import java.net.JarURLConnection;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.net.URLConnection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.jar.JarFile;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Load classes/resources from a side folder, so that
- * classes of the same package can live in a single jar file.
- *
- * <p>
- * For example, with the following jar file:
- * <pre>
- * /
- * +- foo
- * +- X.class
- * +- bar
- * +- X.class
- * </pre>
- * <p>
- * {@link ParallelWorldClassLoader}("foo/") would load <tt>X.class<tt> from
- * <tt>/foo/X.class</tt> (note that X is defined in the root package, not
- * <tt>foo.X</tt>.
- *
- * <p>
- * This can be combined with {@link MaskingClassLoader} to mask classes which are loaded by the parent
- * class loader so that the child class loader
- * classes living in different folders are loaded
- * before the parent class loader loads classes living the jar file publicly
- * visible
- * For example, with the following jar file:
- * <pre>
- * /
- * +- foo
- * +- X.class
- * +- bar
- * +-foo
- * +- X.class
- * </pre>
- * <p>
- * {@link ParallelWorldClassLoader}(MaskingClassLoader.class.getClassLoader()) would load <tt>foo.X.class<tt> from
- * <tt>/bar/foo.X.class</tt> not the <tt>foo.X.class<tt> in the publicly visible place in the jar file, thus
- * masking the parent classLoader from loading the class from <tt>foo.X.class<tt>
- * (note that X is defined in the package foo, not
- * <tt>bar.foo.X</tt>.
- *
- * @author Kohsuke Kawaguchi
- */
-public class ParallelWorldClassLoader extends ClassLoader implements Closeable {
-
- /**
- * Strings like "prefix/", "abc/", or "" to indicate
- * classes should be loaded normally.
- */
- private final String prefix;
- private final Set<JarFile> jars;
-
- public ParallelWorldClassLoader(ClassLoader parent,String prefix) {
- super(parent);
- this.prefix = prefix;
- jars = Collections.synchronizedSet(new HashSet<JarFile>());
- }
-
- protected Class findClass(String name) throws ClassNotFoundException {
-
- StringBuffer sb = new StringBuffer(name.length()+prefix.length()+6);
- sb.append(prefix).append(name.replace('.','/')).append(".class");
-
- URL u = getParent().getResource(sb.toString());
- if (u == null) {
- throw new ClassNotFoundException(name);
- }
-
- InputStream is = null;
- URLConnection con = null;
-
- try {
- con = u.openConnection();
- is = con.getInputStream();
- } catch (IOException ioe) {
- throw new ClassNotFoundException(name);
- }
-
- if (is==null)
- throw new ClassNotFoundException(name);
-
- try {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- byte[] buf = new byte[1024];
- int len;
- while((len=is.read(buf))>=0)
- baos.write(buf,0,len);
-
- buf = baos.toByteArray();
- int packIndex = name.lastIndexOf('.');
- if (packIndex != -1) {
- String pkgname = name.substring(0, packIndex);
- // Check if package already loaded.
- Package pkg = getPackage(pkgname);
- if (pkg == null) {
- definePackage(pkgname, null, null, null, null, null, null, null);
- }
- }
- return defineClass(name,buf,0,buf.length);
- } catch (IOException e) {
- throw new ClassNotFoundException(name,e);
- } finally {
- try {
- if (con != null && con instanceof JarURLConnection) {
- jars.add(((JarURLConnection) con).getJarFile());
- }
- } catch (IOException ioe) {
- //ignore
- }
- if (is != null) {
- try {
- is.close();
- } catch (IOException ioe) {
- //ignore
- }
- }
- }
- }
-
- @Override
- protected URL findResource(String name) {
- URL u = getParent().getResource(prefix + name);
- if (u != null) {
- try {
- jars.add(new JarFile(new File(toJarUrl(u).toURI())));
- } catch (URISyntaxException ex) {
- Logger.getLogger(ParallelWorldClassLoader.class.getName()).log(Level.WARNING, null, ex);
- } catch (IOException ex) {
- Logger.getLogger(ParallelWorldClassLoader.class.getName()).log(Level.WARNING, null, ex);
- } catch (ClassNotFoundException ex) {
- //ignore - not a jar
- }
- }
- return u;
- }
-
- @Override
- protected Enumeration<URL> findResources(String name) throws IOException {
- Enumeration<URL> en = getParent().getResources(prefix + name);
- while (en.hasMoreElements()) {
- try {
- jars.add(new JarFile(new File(toJarUrl(en.nextElement()).toURI())));
- } catch (URISyntaxException ex) {
- //should not happen
- Logger.getLogger(ParallelWorldClassLoader.class.getName()).log(Level.WARNING, null, ex);
- } catch (IOException ex) {
- Logger.getLogger(ParallelWorldClassLoader.class.getName()).log(Level.WARNING, null, ex);
- } catch (ClassNotFoundException ex) {
- //ignore - not a jar
- }
- }
- return en;
- }
-
- public synchronized void close() throws IOException {
- for (JarFile jar : jars) {
- jar.close();
- }
- }
-
- /**
- * Given the URL inside jar, returns the URL to the jar itself.
- */
- public static URL toJarUrl(URL res) throws ClassNotFoundException, MalformedURLException {
- String url = res.toExternalForm();
- if(!url.startsWith("jar:"))
- throw new ClassNotFoundException("Loaded outside a jar "+url);
- url = url.substring(4); // cut off jar:
- url = url.substring(0,url.lastIndexOf('!')); // cut off everything after '!'
- url = url.replaceAll(" ", "%20"); // support white spaces in path
- return new URL(url);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/tools/SecureLoader.java b/src/share/jaxws_classes/com/sun/istack/internal/tools/SecureLoader.java
deleted file mode 100644
index 813bbb6a..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/tools/SecureLoader.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.istack.internal.tools;
-
-/**
- * Class defined for safe calls of getClassLoader methods of any kind (context/system/class
- * classloader. This MUST be package private and defined in every package which
- * uses such invocations.
- * @author snajper
- */
-class SecureLoader {
-
- static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getParentClassLoader(final ClassLoader cl) {
- if (System.getSecurityManager() == null) {
- return cl.getParent();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return cl.getParent();
- }
- });
- }
- }
-
- static void setContextClassLoader(final ClassLoader cl) {
- if (System.getSecurityManager() == null) {
- Thread.currentThread().setContextClassLoader(cl);
- } else {
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- Thread.currentThread().setContextClassLoader(cl);
- return null;
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/istack/internal/tools/package-info.java b/src/share/jaxws_classes/com/sun/istack/internal/tools/package-info.java
deleted file mode 100644
index f43efa72..00000000
--- a/src/share/jaxws_classes/com/sun/istack/internal/tools/package-info.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * istack-commons tool time utilities.
- *
- * <p>
- * This includes code that relies on APT, javac, etc.
- */
-package com.sun.istack.internal.tools;
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMX.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMX.java
deleted file mode 100644
index d41cb1ec..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMX.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.amx;
-
-/**
- Constants reflecting the AMX specification.
- See https://glassfish.dev.java.net/nonav/v3/admin/planning/V3Changes/V3_AMX_SPI.html
- */
-public final class AMX
-{
- private AMX()
- {
- // do not instantiate
- }
-
- /** Attribute yielding the ObjectName of the parent MBean */
- public static final String ATTR_PARENT = "Parent";
-
- /** Attribute yielding the children as an ObjectName[] */
- public static final String ATTR_CHILDREN = "Children";
-
- /** Attribute yielding the name of the MBean,
- possibly differing from the name as found in the ObjectName via the
- property {@link #NAME_KEY} */
- public static final String ATTR_NAME = "Name";
-
- /** ObjectName property for the type */
- public static final String TYPE_KEY = "type";
-
- /** ObjectName property for the name */
- public static final String NAME_KEY = "name";
-
- /** Implied name for singletons when the name property is not present */
- public static final String NO_NAME = "";
-
- /**
- The ObjectName property key denoting the path of the parent MBean.
- Serves to disambiguitate the ObjectName from others
- that might have the same type and/or name elsewhere in the hierarchy.
- */
- public static final String PARENT_PATH_KEY = "pp";
-
- /** Prefix for AMX descriptor fields */
- public static final String DESC_PREFIX = "amx.";
-
- /** Prefix for AMX notification types */
- public static final String NOTIFICATION_PREFIX = DESC_PREFIX;
-
- /**
- Descriptor value defined by JMX standard: whether the MBeanInfo is *invariant* (immutable is a misnomer).
- */
- public static final String DESC_STD_IMMUTABLE_INFO = "immutableInfo";
-
- /**
- Descriptor value defined by JMX standard, the classname of the interface for the MBean.
- Mainly advisory, since client code might not have access to the class.
- */
- public static final String DESC_STD_INTERFACE_NAME = "interfaceName";
-
- /**
- Descriptor value: The generic AMX interface to be used if the class found in {@link #DESC_STD_INTERFACE_NAME}
- cannot be loaded. The class specified here must reside in the amx-core
- module eg com.sun.org.glassfish.admin.amx.core eg AMXProxy or AMXConfigProxy.
- */
- public static final String DESC_GENERIC_INTERFACE_NAME = DESC_PREFIX + "genericInterfaceName";
-
- /**
- Descriptor value: whether the MBean is a singleton, in spite of having a name property in its ObjectName.
- This is mainly for compatibility; named singletons are strongly discouraged.
- */
- public static final String DESC_IS_SINGLETON = DESC_PREFIX + "isSingleton";
-
- /**
- Descriptor value: whether the MBean is a global singleton eg whether in the AMX domain
- it can be looked up by its type and is the only MBean of that type.
- */
- public static final String DESC_IS_GLOBAL_SINGLETON = DESC_PREFIX + "isGlobalSingleton";
-
- /**
- Descriptor value: Arbitrary string denoting the general classification of MBean.
- Predefined values include "configuration", "monitoring", "jsr77", "utility", "other".
- */
- public static final String DESC_GROUP = DESC_PREFIX + "group";
-
- /**
- Descriptor value: whether new children may be added by code other than the implementation responsible for the MBean;
- this allows extension points within the hierarchy.
- Adding a new child means registering an MBean with an ObjectName that implies parentage via the ancestry type=name pairs.
- */
- public static final String DESC_SUPPORTS_ADOPTION = DESC_PREFIX + "supportsAdoption";
-
- /**
- Descriptor value: denotes the possible types of MBeans that children might be. If present, SHOULD include all possible and pre-known types.
- An empty array indicates that child MBeans might exist, but their types cannot be predicted.
- */
- public static final String DESC_SUB_TYPES = DESC_PREFIX + "subTypes";
-
- /**
- Group value indicating that the AMX is a configuration MBean.
- */
- public static final String GROUP_CONFIGURATION = "configuration";
- /**
- Group value indicating that the AMX represents a monitoring MBean.
- */
- public static final String GROUP_MONITORING = "monitoring";
- /**
- Group value indicating that the AMX is a utility MBean.
- */
- public static final String GROUP_UTILITY = "utility";
- /**
- Group value indicating that the AMX is a JSR 77 MBean
- (J2EE Management) .
- */
- public static final String GROUP_JSR77 = "jsr77";
- /**
- Group value indicating that the AMX is not one
- of the other types.
- */
- public static final String GROUP_OTHER = "other";
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXGlassfish.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXGlassfish.java
deleted file mode 100644
index 4ec51902..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXGlassfish.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.amx;
-
-import javax.management.ObjectName;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerConnection;
-
-import java.io.IOException;
-
-
-/**
- * AMX behavior specific to Glassfish V3.
- */
-public final class AMXGlassfish
-{
- public static final String DEFAULT_JMX_DOMAIN = "amx";
-
- /** Default domain support */
- public static final AMXGlassfish DEFAULT = new AMXGlassfish(DEFAULT_JMX_DOMAIN);
-
- private final String mJMXDomain;
- private final ObjectName mDomainRoot;
-
- /** Anything other than {@link #DEFAULT} is not supported in Glassfish V3 */
- public AMXGlassfish(final String jmxDomain)
- {
- mJMXDomain = jmxDomain;
- mDomainRoot = newObjectName("", "domain-root", null);
- }
-
- /** Return a version string, or null if not running in Glassfish */
- public static String getGlassfishVersion()
- {
- // must all exist as a check to verify that it's Glassfish V3
- final String version = System.getProperty( "glassfish.version" );
- return version;
- }
-
-
- /** JMX domain used by AMX MBeans.
- * <p>
- * All MBeans in this domain must be AMX-compliant, see http://tinyurl.com/nryoqp =
- https://glassfish.dev.java.net/nonav/v3/admin/planning/V3Changes/V3_AMX_SPI.html
- */
- public String amxJMXDomain()
- {
- return mJMXDomain;
- }
-
- /** JMX domain used by AMX support MBeans. Private use only */
- public String amxSupportDomain()
- {
- return amxJMXDomain() + "-support";
- }
-
- /** name of the Domain Admin Server (DAS) as found in an ObjectName */
- public String dasName()
- {
- return "server";
- }
-
- /** name of the Domain Admin Server (DAS) &lt;config> */
- public String dasConfig()
- {
- return dasName() + "-config";
- }
-
- /** return the ObjectName of the AMX DomainRoot MBean */
- public ObjectName domainRoot()
- {
- return mDomainRoot;
- }
-
- /** ObjectName for top-level monitoring MBean (parent of those for each server) */
- public ObjectName monitoringRoot()
- {
- return newObjectName("/", "mon", null);
- }
-
- /** ObjectName for top-level monitoring MBean for specified server */
- public ObjectName serverMon(final String serverName)
- {
- return newObjectName("/mon", "server-mon", serverName);
- }
-
- /** ObjectName for top-level monitoring MBean for the DAS. */
- public ObjectName serverMonForDAS() {
- return serverMon( "server" ) ;
- }
-
- /** Make a new AMX ObjectName with unchecked exception.
- * name must be null to create a singleton ObjectName.
- * Note that the arguments must not contain the characters
- * @param pp The parent part
- * @param type The ObjectName type
- * @param name The ObjectName name
- * @return The objectname with pp, type, and (optionally) name.
- */
- public ObjectName newObjectName(
- final String pp,
- final String type,
- final String name)
- {
- String props = prop(AMX.PARENT_PATH_KEY, pp) + "," + prop(AMX.TYPE_KEY, type);
- if (name != null) {
- props = props + "," + prop(AMX.NAME_KEY, name);
- }
-
- return newObjectName( props);
- }
-
- /** Make a new ObjectName for AMX domain with unchecked exception */
- public ObjectName newObjectName(final String s)
- {
- String name = s;
- if ( ! name.startsWith( amxJMXDomain() ) ) {
- name = amxJMXDomain() + ":" + name;
- }
-
- return AMXUtil.newObjectName( name );
- }
-
- private static String prop(final String key, final String value)
- {
- return key + "=" + value;
- }
-
- /**
- ObjectName for {@link BootAMXMBean}
- */
- public ObjectName getBootAMXMBeanObjectName()
- {
- return AMXUtil.newObjectName( amxSupportDomain() + ":type=boot-amx" );
- }
-
- /**
- Invoke the bootAMX() method on {@link BootAMXMBean}. Upon return,
- AMX continues to load.
- A cilent should call {@link invokeWaitAMXReady} prior to use.
- */
- public void invokeBootAMX(final MBeanServerConnection conn)
- {
- // start AMX and wait for it to be ready
- try
- {
- conn.invoke( getBootAMXMBeanObjectName(), BootAMXMBean.BOOT_AMX_OPERATION_NAME, null, null);
- }
- catch (final Exception e)
- {
- e.printStackTrace();
- throw new RuntimeException(e);
- }
- }
-
- /**
- Invoke the waitAMXReady() method on the DomainRoot MBean, which must already be loaded.
- */
- private static void invokeWaitAMXReady(final MBeanServerConnection conn, final ObjectName objectName)
- {
- try
- {
- conn.invoke( objectName, "waitAMXReady", null, null );
- }
- catch( final Exception e )
- {
- throw new RuntimeException(e);
- }
- }
-
- /**
- Listen for the registration of AMX DomainRoot
- Listening starts automatically.
- */
- public <T extends MBeanListener.Callback> MBeanListener<T> listenForDomainRoot(
- final MBeanServerConnection server,
- final T callback)
- {
- final MBeanListener<T> listener = new MBeanListener<T>( server, domainRoot(), callback);
- listener.startListening();
- return listener;
- }
-
- private static final class WaitForDomainRootListenerCallback extends MBeanListener.CallbackImpl {
- private final MBeanServerConnection mConn;
-
- public WaitForDomainRootListenerCallback( final MBeanServerConnection conn ) {
- mConn = conn;
- }
-
- @Override
- public void mbeanRegistered(final ObjectName objectName, final MBeanListener listener) {
- super.mbeanRegistered(objectName,listener);
- invokeWaitAMXReady(mConn, objectName);
- mLatch.countDown();
- }
- }
-
- /**
- Wait until AMX has loaded and is ready for use.
- <p>
- This will <em>not</em> cause AMX to load; it will block forever until AMX is ready. In other words,
- don't call this method unless it's a convenient thread that can wait forever.
- */
- public ObjectName waitAMXReady( final MBeanServerConnection server)
- {
- final WaitForDomainRootListenerCallback callback = new WaitForDomainRootListenerCallback(server);
- listenForDomainRoot( server, callback );
- callback.await();
- return callback.getRegistered();
- }
-
- /**
- Listen for the registration of the {@link BootAMXMBean}.
- Listening starts automatically. See {@link AMXBooter#BootAMXCallback}.
- */
- public <T extends MBeanListener.Callback> MBeanListener<T> listenForBootAMX(
- final MBeanServerConnection server,
- final T callback)
- {
- final MBeanListener<T> listener = new MBeanListener<T>( server, getBootAMXMBeanObjectName(), callback);
- listener.startListening();
- return listener;
- }
-
- /**
- Callback for {@link MBeanListener} that waits for the BootAMXMBean to appear;
- it always will load early in server startup. Once it has loaded, AMX can be booted
- via {@link #bootAMX}. A client should normally just call {@link #bootAMX}, but
- this callback may be suclassed if desired, and used as a trigger to
- boot AMX and then take other dependent actions.
- */
- public static class BootAMXCallback extends MBeanListener.CallbackImpl
- {
- private final MBeanServerConnection mConn;
- public BootAMXCallback(final MBeanServerConnection conn)
- {
- mConn = conn;
- }
-
- @Override
- public void mbeanRegistered(final ObjectName objectName, final MBeanListener listener)
- {
- super.mbeanRegistered(objectName, listener);
- mLatch.countDown();
- }
- }
-
- /**
- Ensure that AMX is loaded and ready to use. This method returns only when all
- AMX subsystems have been loaded.
- It can be called more than once without ill effect, subsequent calls are ignored.
- @param conn connection to the MBeanServer
- @return the ObjectName of the domain-root MBean
- */
- public ObjectName bootAMX(final MBeanServerConnection conn)
- throws IOException
- {
- final ObjectName domainRoot = domainRoot();
-
- if ( !conn.isRegistered( domainRoot ) )
- {
- // wait for the BootAMXMBean to be available (loads at startup)
- final BootAMXCallback callback = new BootAMXCallback(conn);
- listenForBootAMX(conn, callback);
- callback.await(); // block until the MBean appears
-
- invokeBootAMX(conn);
-
- final WaitForDomainRootListenerCallback drCallback = new WaitForDomainRootListenerCallback(conn);
- listenForDomainRoot(conn, drCallback);
- drCallback.await();
-
- invokeWaitAMXReady(conn, domainRoot);
- }
- else
- {
- invokeWaitAMXReady(conn, domainRoot );
- }
- return domainRoot;
- }
-
- public ObjectName bootAMX(final MBeanServer server)
- {
- try
- {
- return bootAMX( (MBeanServerConnection)server);
- }
- catch( final IOException e )
- {
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXUtil.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXUtil.java
deleted file mode 100644
index cb726795..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXUtil.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.amx;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-
-/**
- Small utilities for AMXBooter and related.
- */
-@com.sun.org.glassfish.external.arc.Taxonomy(stability = com.sun.org.glassfish.external.arc.Stability.UNCOMMITTED)
-public final class AMXUtil
-{
- private AMXUtil() {}
-
- /**
- Make a new ObjectName (unchecked exception).
- */
- public static ObjectName newObjectName(final String s)
- {
- try
- {
- return new ObjectName( s );
- }
- catch( final Exception e )
- {
- throw new RuntimeException("bad ObjectName", e);
- }
- }
-
- /**
- Make a new ObjectName (unchecked exception).
- @param domain
- @param props
- */
- public static ObjectName newObjectName(
- final String domain,
- final String props)
- {
- return newObjectName(domain + ":" + props);
- }
-
- /**
- Get the ObjectName of the MBeanServerDelegateObjectName.
- */
- public static ObjectName getMBeanServerDelegateObjectName()
- {
- return newObjectName( "JMImplementation:type=MBeanServerDelegate" );
- }
-
- public static String prop(final String key, final String value)
- {
- return key + "=" + value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/BootAMXMBean.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/BootAMXMBean.java
deleted file mode 100644
index ef3a76bd..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/BootAMXMBean.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.amx;
-
-import javax.management.ObjectName;
-import javax.management.remote.JMXServiceURL;
-
-/**
- MBean responsible for booting the AMX system.
- To get its ObjectName, use {@link AMXGlassfish#getBootAMXMBeanObjectName}.
- */
-@com.sun.org.glassfish.external.arc.Taxonomy(stability = com.sun.org.glassfish.external.arc.Stability.UNCOMMITTED)
-public interface BootAMXMBean
-{
- /**
- Start AMX and return the ObjectName of DomainRoot.
- */
- public ObjectName bootAMX();
-
- /** same as method above */
- public static final String BOOT_AMX_OPERATION_NAME = "bootAMX";
-
- public JMXServiceURL[] getJMXServiceURLs();
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/MBeanListener.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/MBeanListener.java
deleted file mode 100644
index c2378d8a..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/MBeanListener.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.amx;
-
-import java.util.Set;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerConnection;
-import javax.management.MBeanServerNotification;
-import javax.management.Notification;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-import java.util.concurrent.CountDownLatch;
-
-import static com.sun.org.glassfish.external.amx.AMX.*;
-
-/**
- * Listens for registration of MBeans of various types.
- * Intended usage is for subsystems to lazy-load only when the Parent
- * MBean is registered.
- */
-@com.sun.org.glassfish.external.arc.Taxonomy(stability = com.sun.org.glassfish.external.arc.Stability.UNCOMMITTED)
-public class MBeanListener<T extends MBeanListener.Callback> implements NotificationListener
-{
- private static void debug(final Object o) { System.out.println( "" + o ); }
-
- /** listen for MBeans in a given domain of a given type[name]
- OR an ObjectName (below) */
- private final String mJMXDomain;
- private final String mType;
- private final String mName;
-
- /** mType and mName should be null if mObjectName is non-null, and vice versa */
- private final ObjectName mObjectName;
-
- private final MBeanServerConnection mMBeanServer;
-
- private final T mCallback;
-
- public String toString()
- {
- return "MBeanListener: ObjectName=" + mObjectName + ", type=" + mType + ", name=" + mName;
- }
-
- public String getType()
- {
- return mType;
- }
-
- public String getName()
- {
- return mName;
- }
-
- public MBeanServerConnection getMBeanServer()
- {
- return mMBeanServer;
- }
-
- /** Callback interface. */
- public interface Callback
- {
- public void mbeanRegistered(final ObjectName objectName, final MBeanListener listener);
- public void mbeanUnregistered(final ObjectName objectName, final MBeanListener listener);
- }
-
- /**
- Default callback implementation, can be subclassed if needed
- Remembers only the last MBean that was seen.
- */
- public static class CallbackImpl implements MBeanListener.Callback
- {
- private volatile ObjectName mRegistered = null;
- private volatile ObjectName mUnregistered = null;
- private final boolean mStopAtFirst;
-
- public CallbackImpl() {
- this(true);
- }
-
- public CallbackImpl(final boolean stopAtFirst)
- {
- mStopAtFirst = stopAtFirst;
- }
-
- public ObjectName getRegistered() { return mRegistered; }
- public ObjectName getUnregistered() { return mUnregistered; }
-
- protected final CountDownLatch mLatch = new CountDownLatch(1);
-
- /** Optional: wait for the CountDownLatch to fire
- If used, the subclass should countDown() the latch when the
- appropriate event happens
- */
- public void await()
- {
- try
- {
- mLatch.await(); // wait until BootAMXMBean is ready
- }
- catch (InterruptedException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- public void mbeanRegistered(final ObjectName objectName, final MBeanListener listener)
- {
- mRegistered = objectName;
- if ( mStopAtFirst )
- {
- listener.stopListening();
- }
- }
- public void mbeanUnregistered(final ObjectName objectName, final MBeanListener listener)
- {
- mUnregistered = objectName;
- if ( mStopAtFirst )
- {
- listener.stopListening();
- }
- }
- }
-
- public T getCallback()
- {
- return mCallback;
- }
-
- /**
- * Listener for a specific MBean.
- * Caller must call {@link #start} to start listening.
- * @param server
- * @param objectName
- * @param callback
- */
- public MBeanListener(
- final MBeanServerConnection server,
- final ObjectName objectName,
- final T callback)
- {
- mMBeanServer = server;
- mObjectName = objectName;
- mJMXDomain = null;
- mType = null;
- mName = null;
- mCallback = callback;
- }
-
- /**
- * Listener for all MBeans of specified type, with or without a name.
- * Caller must call {@link #start} to start listening.
- * @param server
- * @param type type of the MBean (as found in the ObjectName)
- * @param callback
- */
- public MBeanListener(
- final MBeanServerConnection server,
- final String domain,
- final String type,
- final T callback)
- {
- this(server, domain, type, null, callback);
- }
-
- /**
- * Listener for MBeans of specified type, with specified name (or any name
- * if null is passed for the name).
- * Caller must call {@link #start} to start listening.
- * @param server
- * @param type type of the MBean (as found in the ObjectName)
- * @param name name of the MBean, or null if none
- * @param callback
- */
- public MBeanListener(
- final MBeanServerConnection server,
- final String domain,
- final String type,
- final String name,
- final T callback)
- {
- mMBeanServer = server;
- mJMXDomain = domain;
- mType = type;
- mName = name;
- mObjectName = null;
- mCallback = callback;
- }
-
-
- private boolean isRegistered( final MBeanServerConnection conn, final ObjectName objectName )
- {
- try
- {
- return conn.isRegistered(objectName);
- }
- catch (final Exception e)
- {
- throw new RuntimeException(e);
- }
- }
-
- /**
- Start listening. If the required MBean(s) are already present, the callback
- will be synchronously made before returning. It is also possible that the
- callback could happen twice for the same MBean.
- */
- public void startListening()
- {
- // race condition: must listen *before* looking for existing MBeans
- try
- {
- mMBeanServer.addNotificationListener( AMXUtil.getMBeanServerDelegateObjectName(), this, null, this);
- }
- catch (final Exception e)
- {
- throw new RuntimeException("Can't add NotificationListener", e);
- }
-
- if ( mObjectName != null )
- {
- if ( isRegistered(mMBeanServer, mObjectName) )
- {
- mCallback.mbeanRegistered(mObjectName, this);
- }
- }
- else
- {
- // query for AMX MBeans of the requisite type
- String props = TYPE_KEY + "=" + mType;
- if (mName != null)
- {
- props = props + "," + NAME_KEY + mName;
- }
-
- final ObjectName pattern = AMXUtil.newObjectName(mJMXDomain + ":" +props);
- try
- {
- final Set<ObjectName> matched = mMBeanServer.queryNames(pattern, null);
- for (final ObjectName objectName : matched)
- {
- mCallback.mbeanRegistered(objectName, this);
- }
- }
- catch( final Exception e )
- {
- throw new RuntimeException(e);
- }
- }
- }
-
-
- /** unregister the listener */
- public void stopListening()
- {
- try
- {
- mMBeanServer.removeNotificationListener( AMXUtil.getMBeanServerDelegateObjectName(), this);
- }
- catch (final Exception e)
- {
- throw new RuntimeException("Can't remove NotificationListener " + this, e);
- }
- }
-
- public void handleNotification(
- final Notification notifIn,
- final Object handback)
- {
- if (notifIn instanceof MBeanServerNotification)
- {
- final MBeanServerNotification notif = (MBeanServerNotification) notifIn;
- final ObjectName objectName = notif.getMBeanName();
-
- boolean match = false;
- if ( mObjectName != null && mObjectName.equals(objectName) )
- {
- match = true;
- }
- else if ( objectName.getDomain().equals( mJMXDomain ) )
- {
- if ( mType != null && mType.equals(objectName.getKeyProperty(TYPE_KEY)) )
- {
- final String mbeanName = objectName.getKeyProperty(NAME_KEY);
- if (mName != null && mName.equals(mbeanName))
- {
- match = true;
- }
- }
- }
-
- if ( match )
- {
- final String notifType = notif.getType();
- if (MBeanServerNotification.REGISTRATION_NOTIFICATION.equals(notifType))
- {
- mCallback.mbeanRegistered(objectName, this);
- }
- else if (MBeanServerNotification.UNREGISTRATION_NOTIFICATION.equals(notifType))
- {
- mCallback.mbeanUnregistered(objectName, this);
- }
- }
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Stability.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Stability.java
deleted file mode 100644
index f550707f..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Stability.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.arc;
-
-/**
- Taxonomy values.
- See http://opensolaris.org/os/community/arc/policies/interface-taxonomy/
- <p>
- <h3>Policy</h3>
- <ul>
- <li>Applies to All software produced by SMI</li>
- <li>Authority SAC</li>
- <li>Approval SAC</li>
- <li>Effective April, 1992</li>
- <li>Policy </li>
- <ul><li>All software interfaces must be classified according to this taxonomy.
- Interfaces are defined as APIs, files and directory structures, file formats, protocols,
- (sometimes) even performance and reliability behaviors, and any other attribute upon
- which another component might reasonably depend.</li>
-
- <li>An ARC must review, approve and archive the specification for all interfaces
- other than Project Private and Internal. Unreviewed, unapproved interfaces are assumed
- to be Internal. An adequate specification, suitable for archiving must exist for all
- interfaces submitted for review. Often Project Private interfaces are also reviewed if
- the presentation of them aids the understanding of the entire project or it is expected
- they will be promoted to a broader classification in the future.</li>
-
- <li>Adequate customer documentation must exist for all Public interfaces.
- It is strongly preferred that manual pages exist for all Public interfaces
- (supported on Solaris), even if only significant content of those pages are SYNOPSIS
- and ATTRIBUTES sections and a textual pointer to other documentation.
- Independent of the form of documentation delivery, the interface taxonomy commitment
- level must be presented to the consumer.</li>
-
- <li>In cases where the organization delivering the interface implementation does not
- control the interface specification, the controlling body must be be clearly cited
- in the documentation. In the case where a well-defined, versioned document is the
- specification, both the name and precise version must be be cited.</li>
- </ul>
- </ul>
- @author llc
- */
-public enum Stability {
- /**
- <pre>
- +----------------------------------------------------------------------------+
- | Committed (formerly Stable, Public; encompasses Standard, Evolving) |
- |----------------------------------------------------------------------------|
- | | Specification | Open |
- | |---------------------+--------------------------------------------------|
- | | Incompatible Change | major release (X.0) |
- | |---------------------+--------------------------------------------------|
- | | ARC review of Specs | Yes |
- | |---------------------+--------------------------------------------------|
- | | Examples | Compiler command line options, |
- | | | hardware (SBus, PCI, USB), RPC, POSIX utilities |
- +----------------------------------------------------------------------------+
- </pre>
- We publish the specification of these interfaces, typically as manual pages or other product documentation.
- We also tell customers we will remain compatible with them. (Scott McNealy's principle that "Compatibility is a
- constraint, not a goal") The intention of a Committed interface is to enable arbitrary third parties to develop
- applications to these interfaces, release them, and have confidence that they will run on all releases of the product
- after the one in which the interface was introduced, and within the same Major release. Even at a Major release,
- incompatible changes are expected to be rare, and to have strong justifications.
- <p>
- Committed interfaces are often proposed to be industry standards, as was the case with RPC.
- Also, interfaces defined and controlled as industry standards are most often treated as Committed interfaces.
- <p>
- These are interfaces whose specification is often under the provider's control or which are specified by a
- clearly versioned document controlled by a well-defined organization. If the interface specification is not
- under the implementation provider's control, the provider must be willing to fork from the interface specification
- if required to maintain compatibility. In the case of interface specifications controlled by a standards body,
- the commitment must be to a clearly identified version of the specification, minimizing the likelihood of an
- incompatible change (but it can happen through formal spec interpretations).
- <p>
- Also, if the interface specification is not under the control of the interface implementation provider,
- then the controlling body and/or public, versioned document must be be noted in the documentation.
- This is particularly important for specifications controlled by recognized standards organizations.
- <p>
- Although a truely exceptional event, incompatible changes are possible in any release if
- the associated defect is serious enough as outlined in the EXEMPTIONS section of this document or
- in a Minor release by following the End of Feature process.
- */
- COMMITTED( "Committed" ),
-
-/**
- <pre>
- +--------------------------------------------------------------------------+
- | Uncommitted (formerly Unstable) |
- |--------------------------------------------------------------------------|
- | | Specification | Open |
- | |---------------------+------------------------------------------------|
- | | Incompatible Change | minor release (x.Y) with impact assessment |
- | |---------------------+------------------------------------------------|
- | | ARC review of Specs | Yes |
- | |---------------------+------------------------------------------------|
- | | Examples | SUNW* package abbreviations, some config utils |
- +--------------------------------------------------------------------------+
- </pre>
- No guarantees are made about either source or binary compatibility of these interfaces
- from one Minor release to the next. The most drastic incompatible change of removal of
- the interface in a Minor release is allowed. Uncommitted interfaces are generally not
- appropriate for use by release-independent products.
- <p>
- Uncommitted is not a license for gratuitous change. Any incompatible changes to the
- interface should be motivated by true improvement to the interface which may include
- justifiable ease of use considerations. The general expectation is that Uncommitted
- interfaces are not likely to change incompatibly and if such changes occur they will be
- small in impact and should often have a mitigation plan.
- <p>
- Uncommitted interfaces generally fall into one of the following subcategories:
- <p>
- <ul>
- <li>
- Interfaces that are experimental or transitional.
- They are typically used to give outside developers early access to new or
- rapidly-changing technology, or to provide an interim solution to a problem where a
- more general solution is anticipated.
- </li>
-
- <li>
- Interfaces whose specification is controlled by an outside body and the
- implementation provider is only willing to commit to forking until the next minor
- release point should that outside body introduce incompatible change.
- Note that this "middle of the road" approach is often the best business decision
- when the controlling body hasn't established a history of respecting compatibility.
- </li>
-
- <li>
- Interfaces whose target audience values innovation (and possibly ease of use) over
- stability. This attribute is often asserted for administrative interfaces for higher
- web tier components. Note that ARC review may request data to support such an assertion.
- </li>
- <p>
- A project's intention to import an Uncommitted interface from another consolidation should
- be discussed with the ARC early. The stability classification of the interface -- or
- a replacement interface -- might be raised. The opinion allowing any project to import an
- Uncommitted interface must explain why it is acceptable, and a contract must be put into
- place allowing this use. For Sun products, the similarity in the usage of Uncommitted and
- Consolidation Private interfaces should be noted.
- <p>
- Any documentation for an Uncommitted interface must contain warnings that "these interfaces
- are subject to change without warning and should not be used in unbundled products".
- In some situations, it may be appropriate to document Uncommitted interfaces in white papers
- rather than in standard product documentation. When changes are introduced, the changes
- should be mentioned in the release notes for the affected release.
- <p>
- NOTE: If we choose to offer a draft standard implementation but state our intention to track
- the standard (or the portions we find technically sound or likely to be standardized),
- we set customer expectations for incompatible changes by classifying the interface Uncommitted.
- The interface must be reclassified Committed when standard is final.
- Such an intention could be encoded "Uncommitted->Committed".)
-</pre>
- */
- UNCOMMITTED( "Uncommitted" ),
-
-
-/**
-<pre>
- +--------------------------------------------------------------------+
- | Volatile (encompasses External) |
- |--------------------------------------------------------------------|
- | | Specification | Open |
- | |---------------------+------------------------------------------|
- | | Incompatible Change | micro release (x.y.z) or patch release |
- | |---------------------+------------------------------------------|
- | | Arc review of Specs | A precise reference is normally recorded |
- | |---------------------+------------------------------------------|
- | | Examples | Gimp user interface, IETF internet-draft |
- +--------------------------------------------------------------------+
-</pre>
- Volatile interfaces may change at any time and for any reason.
- <p>
- Use of the Volatile interface stability level allows interface providers to
- quickly track a fluid, rapidly evolving specification. In many cases, this is
- preferred to providing additional stability to the interface, as it may better
- meet the expectations of the consumer.
- <p>
- The most common application of this taxonomy level is to interfaces that are
- controlled by a body other than the final implementation provider, but unlike
- specifications controlled by standards bodies or communities we place trust in,
- it can not be asserted that an incompatible change to the interface
- specification would be exceedingly rare. In some cases it may not even be
- possible to clearly identify the controlling body. Although not prohibited by
- this taxonomy, the Volatile classification is not typically applied to
- interfaces where the specification is controlled by the implementation provider.
- <p>
- It should be noted that in some cases it will be preferable to apply a less
- fluid interface classification to an interface even if the controlling body is
- separate from the implementor. Use of the Uncommitted classification extends the
- stability commitment over micro/patch releases, allowing use of additional
- support models for software that depends upon these interfaces, at the potential
- cost of less frequent updates. Committed should be considered for required, core
- interfaces. If instability in the interface definition can't be reconciled with
- the requirement for stability, then alternate solutions should be considered.
- <p>
- This classification is typically used for free or open source software (FOSS),
- also referred to as community software, and similar models where it is deemed
- more important to track the community with minimal latency than to provide
- stability to our customers. When applying this classification level to community
- software, particular attention should be paid to the considerations presented in
- the preceding paragraph.
- <p>
- It also may be appropriate to apply the Volatile classification level to
- interfaces in the process of being defined by trusted or widely accepted
- organization. These are generically referred to as draft standards. An "IETF
- internet draft" is a well understood example of a specification under
- development.
- <p>
- There may also cases where Volatile is appropriate for experimental interfaces,
- but in most cases Uncommitted should be considered first.
- <p>
- Irrespective of the control of the specification, the Volatile classification
- must not be applied to "core" interfaces (those that must be used) for which no
- alternate (and more stable) interface exists. Volatile interfaces must also
- adhere to Sun internal standards in the following areas:
- <ul>
- <li>Security, Authentication</li>
- <li>The existence of (perhaps vestigial) Manual Pages and conformance to Sun section numbering</li>
- <li>File System Semantics (Solaris examples: /usr may be read-only, /var is where
- all significant run-time growth occurs, ...)</li>
- </ul>
- All Volatile interfaces should be labeled as such in all associated
- documentation and the consequence of using such interfaces must be explained
- either as part of that documentation or by reference.
- <p>
- Shipping incompatible change in a patch should be strongly avoided. It is not
- strictly prohibited for the following two reasons:
- <ul>
- <li>Since the patch provider may not be in explicit control of the changes to the
- upstream implementation, it cannot guarantee with reasonable assurance that an
- unidentified incompatibility is not present.
- </li>
- <li>A strong business case may exist for shipping a newer version as a patch if that
- newer version closes significant escalations.
- </li>
- </ul>
- In general, the intent of allowing change in a patch is to allow for change in
- Update Releases.
- <p>
- Sun products should consider Volatile interfaces as equivalent to Consolidation
- Private. A contract is required for use of these interfaces outside of the
- supplying consolidation.
- <p>
- Extreme care in the use of Volatile interfaces is required by layered or
- unbundled products. Layered products that depend upon Volatile interfaces must
- include as part of their review material how they intend to manage the
- dependency. It is not explicitly prohibited, but it is probable that unbundled
- or layered products that ship asynchronously from the Volatile interfaces upon
- which they depend will face nearly insurmountable difficulty in constructing a
- plan to manage such a dependency.
- */
- VOLATILE( "Volatile" ),
-
-/**
-<pre>
- +--------------------------------------------------------------------+
- | Not-an-interface |
- |--------------------------------------------------------------------|
- | | Specification | None |
- | |---------------------+------------------------------------------|
- | | Incompatible Change | micro release (x.y.z) or patch release |
- | |---------------------+------------------------------------------|
- | | Arc review of Specs | None |
- | |---------------------+------------------------------------------|
- | | Examples | CLI output, error text |
- +--------------------------------------------------------------------+
-</pre>
- In the course of reviewing or documenting interfaces, the situation often occurs
- that an attribute will be present which may be inferred to be an interface, but
- actually is not. A couple of common examples of this are output from CLIs
- intended only for human consumption and the exact layout of a GUI.
- <p>
- This classification is simply a convenience term to be used to clarify such
- situations where such confusion is identified as likely. Failure to apply this
- term to an attribute is no indication that said attribute is some form of
- interface. It only indicates that the potential for confusion was not
- identified.
- */
- NOT_AN_INTERFACE( "Not-An-Interface" ),
-
- /**
- See: http://opensolaris.org/os/community/arc/policies/interface-taxonomy/
- <p>
- Javadoc or other means should establish the nature of the private interface.
- */
- PRIVATE( "Private" ),
-
-
- /**
- Not a formal term. Indicates that the interface, while visible, is experimental,
- and can be removed at any time.
- */
- EXPERIMENTAL( "Experimental" ),
-
- /**
- Interrim classification; a real one should be chosen asap.
- */
- UNSPECIFIED( "Unspecified" );
-
- private final String mName;
- private Stability( final String name ) { mName = name; }
-
- public String toString() { return mName; }
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Taxonomy.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Taxonomy.java
deleted file mode 100644
index bd4e4169..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Taxonomy.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.arc;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- Annotates classes, methods or fields as to the ARC taxonomy (stability level).
- Note that a class can be annotated as a whole, but that annotations on its methods
- and fields override the whole-class annotation.
- @author llc
- */
-@Retention(RUNTIME)
-@Documented
-@Target( {METHOD, TYPE, ANNOTATION_TYPE, FIELD, PACKAGE})
-public @interface Taxonomy {
- public Stability stability() default Stability.UNSPECIFIED;
- public String description() default "";
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/PluginPoint.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/PluginPoint.java
deleted file mode 100644
index 01a14a9e..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/PluginPoint.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.probe.provider;
-
-/**
- *
- * @author abbagani
- */
-public enum PluginPoint {
-
- SERVER ("server", "server"),
- APPLICATIONS ("applications", "server/applications");
-
- String name;
- String path;
-
- PluginPoint(String lname, String lpath) {
- name = lname;
- path = lpath;
- }
-
- public String getName() {
- return name;
- }
-
- public String getPath() {
- return path;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProvider.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProvider.java
deleted file mode 100644
index ada14b75..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProvider.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.probe.provider;
-
-/**
- *
- * @author abbagani
- */
-public interface StatsProvider {
-
- public void enable();
-
- public void disable();
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderInfo.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderInfo.java
deleted file mode 100644
index 860a9cf6..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderInfo.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.probe.provider;
-
-/**
- *
- * @author abbagani
- */
-public class StatsProviderInfo {
-
- public StatsProviderInfo(String configElement, PluginPoint pp,
- String subTreeRoot, Object statsProvider){
- this(configElement, pp, subTreeRoot, statsProvider, null);
- }
-
- public StatsProviderInfo(String configElement, PluginPoint pp,
- String subTreeRoot, Object statsProvider,
- String invokerId){
- this.configElement = configElement;
- this.pp = pp;
- this.subTreeRoot = subTreeRoot;
- this.statsProvider = statsProvider;
- this.invokerId = invokerId;
- }
-
- private String configElement;
- private PluginPoint pp;
- private String subTreeRoot;
- private Object statsProvider;
- private String configLevelStr = null;
- private final String invokerId;
-
- public String getConfigElement() {
- return configElement;
- }
-
- public PluginPoint getPluginPoint() {
- return pp;
- }
-
- public String getSubTreeRoot() {
- return subTreeRoot;
- }
-
- public Object getStatsProvider() {
- return statsProvider;
- }
-
- public String getConfigLevel() {
- return configLevelStr;
- }
-
- public void setConfigLevel(String configLevelStr) {
- this.configLevelStr = configLevelStr;
- }
-
- public String getInvokerId() {
- return invokerId;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManager.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManager.java
deleted file mode 100644
index b20a68bd..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManager.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.probe.provider;
-
-import java.util.Vector;
-
-/**
- *
- * @author abbagani
- */
-public class StatsProviderManager {
-
- private StatsProviderManager(){
- }
-
-
- public static boolean register(String configElement, PluginPoint pp,
- String subTreeRoot, Object statsProvider) {
- return (register(pp, configElement, subTreeRoot, statsProvider, null));
- }
-
- public static boolean register(PluginPoint pp, String configElement,
- String subTreeRoot, Object statsProvider,
- String invokerId) {
- StatsProviderInfo spInfo =
- new StatsProviderInfo(configElement, pp, subTreeRoot, statsProvider, invokerId);
-
- return registerStatsProvider(spInfo);
- }
-
- public static boolean register(String configElement, PluginPoint pp,
- String subTreeRoot, Object statsProvider,
- String configLevelStr) {
- return(register(configElement, pp, subTreeRoot, statsProvider, configLevelStr, null));
- }
-
- public static boolean register(String configElement, PluginPoint pp,
- String subTreeRoot, Object statsProvider,
- String configLevelStr, String invokerId) {
- StatsProviderInfo spInfo =
- new StatsProviderInfo(configElement, pp, subTreeRoot, statsProvider, invokerId);
- spInfo.setConfigLevel(configLevelStr);
-
- return registerStatsProvider(spInfo);
- }
-
- private static boolean registerStatsProvider(StatsProviderInfo spInfo) {
- //Ideally want to start this in a thread, so we can reduce the startup time
- if (spmd == null) {
- //Make an entry into the toBeRegistered map
- toBeRegistered.add(spInfo);
- } else {
- spmd.register(spInfo);
- return true;
- }
- return false;
- }
-
- public static boolean unregister(Object statsProvider) {
- //Unregister the statsProvider if the delegate is not null
- if (spmd == null) {
- for (StatsProviderInfo spInfo : toBeRegistered) {
- if (spInfo.getStatsProvider() == statsProvider) {
- toBeRegistered.remove(spInfo);
- break;
- }
- }
-
- } else {
- spmd.unregister(statsProvider);
- return true;
- }
- return false;
- }
-
-
- public static boolean hasListeners(String probeStr) {
- //See if the probe has any listeners registered
- if (spmd == null) {
- return false;
- } else {
- return spmd.hasListeners(probeStr);
- }
- }
-
-
- public static void setStatsProviderManagerDelegate(
- StatsProviderManagerDelegate lspmd) {
- //System.out.println("in StatsProviderManager.setStatsProviderManagerDelegate ***********");
- if (lspmd == null) {
- //Should log and throw an exception
- return;
- }
-
- //Assign the Delegate
- spmd = lspmd;
-
- //System.out.println("Running through the toBeRegistered array to call register ***********");
-
- //First register the pending StatsProviderRegistryElements
- for (StatsProviderInfo spInfo : toBeRegistered) {
- spmd.register(spInfo);
- }
-
- //Now that you registered the pending calls, Clear the toBeRegistered store
- toBeRegistered.clear();
- }
-
- //variables
- static StatsProviderManagerDelegate spmd; // populate this during our initilaization process
- static Vector<StatsProviderInfo> toBeRegistered = new Vector();
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManagerDelegate.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManagerDelegate.java
deleted file mode 100644
index 342fc4a7..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManagerDelegate.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.probe.provider;
-
-/**
- *
- * @author abbagani
- */
-public interface StatsProviderManagerDelegate {
-
- public void register(StatsProviderInfo spInfo);
- public void unregister(Object statsProvider);
- public boolean hasListeners(String probeStr);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/Probe.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/Probe.java
deleted file mode 100644
index 04ff4c48..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/Probe.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2009, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.probe.provider.annotations;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-
-/**
- *
- * @author Prashanth Abbagani
- * Date: April 16, 2009
- */
-
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD})
-public @interface Probe {
-
- public String name() default "";
- public boolean hidden() default false;
- public boolean self() default false;
- public String providerName() default "";
- public String moduleName() default "";
- public boolean stateful() default false;
- public String profileNames() default "";
- public boolean statefulReturn() default false;
- public boolean statefulException() default false;
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeListener.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeListener.java
deleted file mode 100644
index b49822f8..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeListener.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.probe.provider.annotations;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-
-/**
- *
- * @author Prashanth Abbagani
- * Date: May 26, 2009
- */
-
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD})
-public @interface ProbeListener {
-
- public abstract String value();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeParam.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeParam.java
deleted file mode 100644
index a8610b1d..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeParam.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.probe.provider.annotations;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-
-/**
- *
- * @author Prashanth Abbagani
- * Date: April 16, 2009
- */
-
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.PARAMETER})
-public @interface ProbeParam {
-
- public String value();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeProvider.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeProvider.java
deleted file mode 100644
index a25d94df..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeProvider.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.probe.provider.annotations;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-
-/**
- *
- * @author Prashanth Abbagani
- * Date: April 16, 2009
- */
-
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE})
-public @interface ProbeProvider {
-
- public String providerName() default "";
- public String moduleProviderName() default "";
- public String moduleName() default "";
- public String probeProviderName() default "";
-
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/AverageRangeStatistic.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/AverageRangeStatistic.java
deleted file mode 100644
index b99bb14c..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/AverageRangeStatistic.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-
-/*
- * AverageRangeStatistic.java
- *
- * Created on May 11, 2004, 2:15 PM
- */
-
-package com.sun.org.glassfish.external.statistics;
-
-/**
- * An interface that Specifies standard measurements of the lowest and highest
- * values an attribute has held as well as its current value.
- * Extending RangeStatistic, it also provides the average value.
- */
-
-public interface AverageRangeStatistic extends RangeStatistic {
-
- public long getAverage();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundaryStatistic.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundaryStatistic.java
deleted file mode 100644
index 180a5c9a..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundaryStatistic.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.statistics;
-
-/**
- * Specifies standard measurements of the upper and lower limits of the value of an attribute.
- */
-public interface BoundaryStatistic extends Statistic {
- /**
- * The upper limit of the value of this attribute.
- */
- long getUpperBound();
-
- /**
- * The lower limit of the value of this attribute.The upper limit of the value of this attribute.
- */
- long getLowerBound();
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundedRangeStatistic.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundedRangeStatistic.java
deleted file mode 100644
index c833ecfa..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundedRangeStatistic.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.statistics;
-
-/**
- * The BoundedRangeStatistic model aggregates the attributes of RangeStatistic and BoundaryStatistic and provides standard measurements of a range that has fixed limits.
- */
-public interface BoundedRangeStatistic extends BoundaryStatistic, RangeStatistic {
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/CountStatistic.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/CountStatistic.java
deleted file mode 100644
index 5458b569..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/CountStatistic.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.statistics;
-
-/**
- * Specifies standard count measurements.
- */
-public interface CountStatistic extends Statistic {
- /**
- * The count since the last reset.
- */
- long getCount();
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/RangeStatistic.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/RangeStatistic.java
deleted file mode 100644
index 8c0cbe6c..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/RangeStatistic.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.statistics;
-
-/**
- * Specifies standard measurements of the lowest and highest values an attribute has held as well as its current value.
- */
-public interface RangeStatistic extends Statistic {
- /**
- * The highest value this attribute has held since the beginninYg of the measurement.
- */
- long getHighWaterMark();
-
- /**
- * The lowest value this attribute has held since the beginning of the measurement.
- */
- long getLowWaterMark();
-
- /**
- * The current value of this attribute.
- */
- long getCurrent();
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Statistic.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Statistic.java
deleted file mode 100644
index 39304e6d..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Statistic.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.statistics;
-
-/**
- * The Statistic model and its sub-models specify the data models which are requried to be used to provide the performance data described by the specific attributes in the Stats models.
- */
-public interface Statistic {
- /**
- * The name of this Statistic.
- */
- String getName();
-
- /**
- * The unit of measurement for this Statistic.
- * Valid values for TimeStatistic measurements are "HOUR", "MINUTE", "SECOND", "MILLISECOND", "MICROSECOND" and "NANOSECOND".
- */
- String getUnit();
-
- /**
- * A human-readable description of the Statistic.
- */
- String getDescription();
-
- /**
- * The time of the first measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
- */
- long getStartTime();
-
- /**
- * The time of the last measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
- */
- long getLastSampleTime();
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Stats.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Stats.java
deleted file mode 100644
index 63e9d26d..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Stats.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.statistics;
-
-public interface Stats {
-
- /**
- * Get a Statistic by name.
- */
- Statistic getStatistic(String statisticName);
-
- /**
- * Returns an array of Strings which are the names of the attributes from the specific Stats submodel that this object supports. Attributes named in the list must correspond to attributes that will return a Statistic object of the appropriate type which contains valid performance data. The return value of attributes in the Stats submodel that are not included in the statisticNames list must be null. For each name in the statisticNames list there must be one Statistic with the same name in the statistics list.
- */
- String [] getStatisticNames();
-
- /**
- * Returns an array containing all of the Statistic objects supported by this Stats object.
- */
- Statistic[] getStatistics();
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/StringStatistic.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/StringStatistic.java
deleted file mode 100644
index b4b77dc2..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/StringStatistic.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.statistics;
-
-/**
- * Custom statistic type created for the Sun ONE Application Server.
- * The goal is to be able to represent changing attribute values that are strings
- * in the form of Statistics. Semantically, it is analogous to a {@link CountStatistic},
- * the only difference being in the value that is returned. Unlike a CountStatistic
- * (which always is unidirectional), this Statistic type is not having any
- * specified direction, simply because there is no natural order. An example
- * of the values that an instance of this statistic type can assume is: A State
- * Statistic which can have "CONNECTED, CLOSED, DISCONNECTED" as the permissible
- * values and the current value can be any one of them (and them only).
- * The permissible values are upto a particular implementation.
- */
-
-public interface StringStatistic extends Statistic {
- /**
- * Returns the String value of the statistic
- */
- String getCurrent();
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/TimeStatistic.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/TimeStatistic.java
deleted file mode 100644
index 5590b8a8..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/TimeStatistic.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.statistics;
-
-/**
- * Specifies standard timing measurements.
- */
-public interface TimeStatistic extends Statistic {
- /**
- * Number of times the operation was invoked since the beginning of this measurement.
- */
- long getCount();
-
- /**
- * The maximum amount of time taken to complete one invocation of this operation since the beginning of this measurement.
- */
- long getMaxTime();
-
- /**
- * The minimum amount of time taken to complete one invocation of this operation since the beginning of this measurement.
- */
- long getMinTime();
-
- /**
- * This is the sum total of time taken to complete every invocation of this operation since the beginning of this measurement. Dividing totalTime by count will give you the average execution time for this operation.
- */
- long getTotalTime();
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/annotations/Reset.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/annotations/Reset.java
deleted file mode 100644
index 1a29ef61..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/annotations/Reset.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.statistics.annotations;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-
-/**
- *
- * @author Jennifer Chou
- * Date: Sep 16, 2009
- */
-
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD})
-public @interface Reset {
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/AverageRangeStatisticImpl.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/AverageRangeStatisticImpl.java
deleted file mode 100644
index bbba5738..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/AverageRangeStatisticImpl.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 2009, 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.org.glassfish.external.statistics.impl;
-
-import java.util.Map;
-import java.lang.reflect.*;
-import com.sun.org.glassfish.external.statistics.AverageRangeStatistic;
-
-/**
- * An implementation of AverageRangeStatistic that provides ways to change the
- * state externally through mutators. Convenience class that is useful for
- * components that gather the statistical data.
- * By merely changing the count (which is a mandatory measurement), rest of the statistical
- * information could be deduced.
- */
-
-public final class AverageRangeStatisticImpl extends StatisticImpl implements
- AverageRangeStatistic, InvocationHandler {
-
- private long currentVal = 0L;
- private long highWaterMark = Long.MIN_VALUE;
- private long lowWaterMark = Long.MAX_VALUE;
- private long numberOfSamples = 0L;
- private long runningTotal = 0L;
-
- private final long initCurrentVal;
- private final long initHighWaterMark;
- private final long initLowWaterMark;
- private final long initNumberOfSamples;
- private final long initRunningTotal;
-
- private final AverageRangeStatistic as =
- (AverageRangeStatistic) Proxy.newProxyInstance(
- AverageRangeStatistic.class.getClassLoader(),
- new Class[] { AverageRangeStatistic.class },
- this);
-
- public AverageRangeStatisticImpl(long curVal, long highMark, long lowMark,
- String name, String unit, String desc,
- long startTime, long sampleTime) {
- super(name, unit, desc, startTime, sampleTime);
- currentVal = curVal;
- initCurrentVal = curVal;
- highWaterMark = highMark;
- initHighWaterMark = highMark;
- lowWaterMark = lowMark;
- initLowWaterMark = lowMark;
- numberOfSamples = 0L;
- initNumberOfSamples = numberOfSamples;
- runningTotal = 0L;
- initRunningTotal = runningTotal;
- }
-
- public synchronized AverageRangeStatistic getStatistic() {
- return as;
- }
-
- public synchronized String toString() {
- return super.toString() + NEWLINE +
- "Current: " + getCurrent() + NEWLINE +
- "LowWaterMark: " + getLowWaterMark() + NEWLINE +
- "HighWaterMark: " + getHighWaterMark() + NEWLINE +
- "Average:" + getAverage();
- }
-
- public synchronized Map getStaticAsMap() {
- Map m = super.getStaticAsMap();
- m.put("current", getCurrent());
- m.put("lowwatermark", getLowWaterMark());
- m.put("highwatermark", getHighWaterMark());
- m.put("average", getAverage());
- return m;
- }
-
- public synchronized void reset() {
- super.reset();
- currentVal = initCurrentVal;
- highWaterMark = initHighWaterMark;
- lowWaterMark = initLowWaterMark;
- numberOfSamples = initNumberOfSamples;
- runningTotal = initRunningTotal;
- sampleTime = -1L;
- }
-
- public synchronized long getAverage() {
- if(numberOfSamples == 0) {
- return -1;
- } else {
- return runningTotal / numberOfSamples;
- }
- }
-
- public synchronized long getCurrent() {
- return currentVal;
- }
-
- public synchronized void setCurrent(long curVal) {
- currentVal = curVal;
- lowWaterMark = (curVal >= lowWaterMark ? lowWaterMark : curVal);
- highWaterMark = (curVal >= highWaterMark ? curVal : highWaterMark);
- numberOfSamples++;
- runningTotal += curVal;
- sampleTime = System.currentTimeMillis();
- }
-
- public synchronized long getHighWaterMark() {
- return highWaterMark;
- }
-
- public synchronized long getLowWaterMark() {
- return lowWaterMark;
- }
-
- // todo: equals implementation
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- checkMethod(method);
-
- Object result;
- try {
- result = method.invoke(this, args);
- } catch (InvocationTargetException e) {
- throw e.getTargetException();
- } catch (Exception e) {
- throw new RuntimeException("unexpected invocation exception: " +
- e.getMessage());
- }
- return result;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundaryStatisticImpl.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundaryStatisticImpl.java
deleted file mode 100644
index 633771fa..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundaryStatisticImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2009, 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.org.glassfish.external.statistics.impl;
-import com.sun.org.glassfish.external.statistics.BoundaryStatistic;
-import java.util.Map;
-import java.lang.reflect.*;
-
-/**
- * @author Sreenivas Munnangi
- */
-public final class BoundaryStatisticImpl extends StatisticImpl
- implements BoundaryStatistic, InvocationHandler {
-
- private final long lowerBound;
- private final long upperBound;
-
- private final BoundaryStatistic bs =
- (BoundaryStatistic) Proxy.newProxyInstance(
- BoundaryStatistic.class.getClassLoader(),
- new Class[] { BoundaryStatistic.class },
- this);
-
- public BoundaryStatisticImpl(long lower, long upper, String name,
- String unit, String desc, long startTime,
- long sampleTime) {
- super(name, unit, desc, startTime, sampleTime);
- upperBound = upper;
- lowerBound = lower;
- }
-
- public synchronized BoundaryStatistic getStatistic() {
- return bs;
- }
-
- public synchronized Map getStaticAsMap() {
- Map m = super.getStaticAsMap();
- m.put("lowerbound", getLowerBound());
- m.put("upperbound", getUpperBound());
- return m;
- }
-
- public synchronized long getLowerBound() {
- return lowerBound;
- }
-
- public synchronized long getUpperBound() {
- return upperBound;
- }
-
- @Override
- public synchronized void reset() {
- super.reset();
- sampleTime = -1L;
- }
-
- // todo: equals implementation
- public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
- checkMethod(m);
-
- Object result;
- try {
- result = m.invoke(this, args);
- } catch (InvocationTargetException e) {
- throw e.getTargetException();
- } catch (Exception e) {
- throw new RuntimeException("unexpected invocation exception: " +
- e.getMessage());
- }
- return result;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundedRangeStatisticImpl.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundedRangeStatisticImpl.java
deleted file mode 100644
index 52c8479d..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundedRangeStatisticImpl.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (c) 2009, 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.org.glassfish.external.statistics.impl;
-
-import com.sun.org.glassfish.external.statistics.BoundedRangeStatistic;
-import java.util.Map;
-import java.lang.reflect.*;
-
-
-/**
- * @author Sreenivas Munnangi
- */
-public final class BoundedRangeStatisticImpl extends StatisticImpl
- implements BoundedRangeStatistic, InvocationHandler {
-
- private long lowerBound = 0L;
- private long upperBound = 0L;
- private long currentVal = 0L;
- private long highWaterMark = Long.MIN_VALUE;
- private long lowWaterMark = Long.MAX_VALUE;
-
- private final long initLowerBound;
- private final long initUpperBound;
- private final long initCurrentVal;
- private final long initHighWaterMark;
- private final long initLowWaterMark;
-
- private final BoundedRangeStatistic bs =
- (BoundedRangeStatistic) Proxy.newProxyInstance(
- BoundedRangeStatistic.class.getClassLoader(),
- new Class[] { BoundedRangeStatistic.class },
- this);
-
- public synchronized String toString() {
- return super.toString() + NEWLINE +
- "Current: " + getCurrent() + NEWLINE +
- "LowWaterMark: " + getLowWaterMark() + NEWLINE +
- "HighWaterMark: " + getHighWaterMark() + NEWLINE +
- "LowerBound: " + getLowerBound() + NEWLINE +
- "UpperBound: " + getUpperBound();
- }
-
-
- public BoundedRangeStatisticImpl(long curVal, long highMark, long lowMark,
- long upper, long lower, String name,
- String unit, String desc, long startTime,
- long sampleTime) {
- super(name, unit, desc, startTime, sampleTime);
- currentVal = curVal;
- initCurrentVal = curVal;
- highWaterMark = highMark;
- initHighWaterMark = highMark;
- lowWaterMark = lowMark;
- initLowWaterMark = lowMark;
- upperBound = upper;
- initUpperBound = upper;
- lowerBound = lower;
- initLowerBound = lower;
- }
-
- public synchronized BoundedRangeStatistic getStatistic() {
- return bs;
- }
-
- public synchronized Map getStaticAsMap() {
- Map m = super.getStaticAsMap();
- m.put("current", getCurrent());
- m.put("lowerbound", getLowerBound());
- m.put("upperbound", getUpperBound());
- m.put("lowwatermark", getLowWaterMark());
- m.put("highwatermark", getHighWaterMark());
- return m;
- }
-
- public synchronized long getCurrent() {
- return currentVal;
- }
-
- public synchronized void setCurrent(long curVal) {
- currentVal = curVal;
- lowWaterMark = (curVal >= lowWaterMark ? lowWaterMark : curVal);
- highWaterMark = (curVal >= highWaterMark ? curVal : highWaterMark);
- sampleTime = System.currentTimeMillis();
- }
-
- public synchronized long getHighWaterMark() {
- return highWaterMark;
- }
-
- public synchronized void setHighWaterMark(long hwm) {
- highWaterMark = hwm;
- }
-
- public synchronized long getLowWaterMark() {
- return lowWaterMark;
- }
-
- public synchronized void setLowWaterMark(long lwm) {
- lowWaterMark = lwm;
- }
-
- public synchronized long getLowerBound() {
- return lowerBound;
- }
-
- public synchronized long getUpperBound() {
- return upperBound;
- }
-
- @Override
- public synchronized void reset() {
- super.reset();
- lowerBound = initLowerBound;
- upperBound = initUpperBound;
- currentVal = initCurrentVal;
- highWaterMark = initHighWaterMark;
- lowWaterMark = initLowWaterMark;
- sampleTime = -1L;
- }
-
- // todo: equals implementation
- public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
- checkMethod(m);
-
- Object result;
- try {
- result = m.invoke(this, args);
- } catch (InvocationTargetException e) {
- throw e.getTargetException();
- } catch (Exception e) {
- throw new RuntimeException("unexpected invocation exception: " +
- e.getMessage());
- }
- return result;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/CountStatisticImpl.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/CountStatisticImpl.java
deleted file mode 100644
index 351627b6..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/CountStatisticImpl.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2009, 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.org.glassfish.external.statistics.impl;
-import com.sun.org.glassfish.external.statistics.CountStatistic;
-import java.util.Map;
-import java.lang.reflect.*;
-
-/**
- * @author Sreenivas Munnangi
- */
-public final class CountStatisticImpl extends StatisticImpl
- implements CountStatistic, InvocationHandler {
-
- private long count = 0L;
- private final long initCount;
-
- private final CountStatistic cs =
- (CountStatistic) Proxy.newProxyInstance(
- CountStatistic.class.getClassLoader(),
- new Class[] { CountStatistic.class },
- this);
-
- public CountStatisticImpl(long countVal, String name, String unit,
- String desc, long sampleTime, long startTime) {
- super(name, unit, desc, startTime, sampleTime);
- count = countVal;
- initCount = countVal;
- }
-
- public CountStatisticImpl(String name, String unit, String desc) {
- this(0L, name, unit, desc, -1L, System.currentTimeMillis());
- }
-
- public synchronized CountStatistic getStatistic() {
- return cs;
- }
-
- public synchronized Map getStaticAsMap() {
- Map m = super.getStaticAsMap();
- m.put("count", getCount());
- return m;
- }
-
- public synchronized String toString() {
- return super.toString() + NEWLINE + "Count: " + getCount();
- }
-
- public synchronized long getCount() {
- return count;
- }
-
- public synchronized void setCount(long countVal) {
- count = countVal;
- sampleTime = System.currentTimeMillis();
- }
-
- public synchronized void increment() {
- count++;
- sampleTime = System.currentTimeMillis();
- }
-
- public synchronized void increment(long delta) {
- count = count + delta;
- sampleTime = System.currentTimeMillis();
- }
-
- public synchronized void decrement() {
- count--;
- sampleTime = System.currentTimeMillis();
- }
-
- @Override
- public synchronized void reset() {
- super.reset();
- count = initCount;
- sampleTime = -1L;
- }
-
- // todo: equals implementation
- public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
- checkMethod(m);
-
- Object result;
- try {
- result = m.invoke(this, args);
- } catch (InvocationTargetException e) {
- throw e.getTargetException();
- } catch (Exception e) {
- throw new RuntimeException("unexpected invocation exception: " +
- e.getMessage());
- }
- return result;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/RangeStatisticImpl.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/RangeStatisticImpl.java
deleted file mode 100644
index 9f6ec99d..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/RangeStatisticImpl.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2009, 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.org.glassfish.external.statistics.impl;
-import com.sun.org.glassfish.external.statistics.RangeStatistic;
-import java.util.Map;
-import java.lang.reflect.*;
-
-/**
- * @author Sreenivas Munnangi
- */
-public final class RangeStatisticImpl extends StatisticImpl
- implements RangeStatistic, InvocationHandler {
-
- private long currentVal = 0L;
- private long highWaterMark = Long.MIN_VALUE;
- private long lowWaterMark = Long.MAX_VALUE;
- private final long initCurrentVal;
- private final long initHighWaterMark;
- private final long initLowWaterMark;
-
- private final RangeStatistic rs =
- (RangeStatistic) Proxy.newProxyInstance(
- RangeStatistic.class.getClassLoader(),
- new Class[] { RangeStatistic.class },
- this);
-
- public RangeStatisticImpl(long curVal, long highMark, long lowMark,
- String name, String unit, String desc,
- long startTime, long sampleTime) {
- super(name, unit, desc, startTime, sampleTime);
- currentVal = curVal;
- initCurrentVal = curVal;
- highWaterMark = highMark;
- initHighWaterMark = highMark;
- lowWaterMark = lowMark;
- initLowWaterMark = lowMark;
- }
-
- public synchronized RangeStatistic getStatistic() {
- return rs;
- }
-
- public synchronized Map getStaticAsMap() {
- Map m = super.getStaticAsMap();
- m.put("current", getCurrent());
- m.put("lowwatermark", getLowWaterMark());
- m.put("highwatermark", getHighWaterMark());
- return m;
- }
-
- public synchronized long getCurrent() {
- return currentVal;
- }
-
- public synchronized void setCurrent(long curVal) {
- currentVal = curVal;
- lowWaterMark = (curVal >= lowWaterMark ? lowWaterMark : curVal);
- highWaterMark = (curVal >= highWaterMark ? curVal : highWaterMark);
- sampleTime = System.currentTimeMillis();
- }
-
- /**
- * Returns the highest value of this statistic, since measurement started.
- */
- public synchronized long getHighWaterMark() {
- return highWaterMark;
- }
-
- public synchronized void setHighWaterMark(long hwm) {
- highWaterMark = hwm;
- }
-
- /**
- * Returns the lowest value of this statistic, since measurement started.
- */
- public synchronized long getLowWaterMark() {
- return lowWaterMark;
- }
-
- public synchronized void setLowWaterMark(long lwm) {
- lowWaterMark = lwm;
- }
-
- @Override
- public synchronized void reset() {
- super.reset();
- currentVal = initCurrentVal;
- highWaterMark = initHighWaterMark;
- lowWaterMark = initLowWaterMark;
- sampleTime = -1L;
- }
-
- public synchronized String toString() {
- return super.toString() + NEWLINE +
- "Current: " + getCurrent() + NEWLINE +
- "LowWaterMark: " + getLowWaterMark() + NEWLINE +
- "HighWaterMark: " + getHighWaterMark();
- }
-
- // todo: equals implementation
- public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
- checkMethod(m);
-
- Object result;
- try {
- result = m.invoke(this, args);
- } catch (InvocationTargetException e) {
- throw e.getTargetException();
- } catch (Exception e) {
- throw new RuntimeException("unexpected invocation exception: " +
- e.getMessage());
- }
- return result;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatisticImpl.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatisticImpl.java
deleted file mode 100644
index d257019a..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatisticImpl.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2009, 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.org.glassfish.external.statistics.impl;
-import com.sun.org.glassfish.external.statistics.Statistic;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * @author Sreenivas Munnangi
- */
-public abstract class StatisticImpl implements Statistic {
-
- private final String statisticName;
- private final String statisticUnit;
- private final String statisticDesc;
- protected long sampleTime = -1L;
- private long startTime;
- public static final String UNIT_COUNT = "count";
- public static final String UNIT_SECOND = "second";
- public static final String UNIT_MILLISECOND = "millisecond";
- public static final String UNIT_MICROSECOND = "microsecond";
- public static final String UNIT_NANOSECOND = "nanosecond";
- public static final String START_TIME = "starttime";
- public static final String LAST_SAMPLE_TIME = "lastsampletime";
-
- protected final Map<String, Object> statMap = new ConcurrentHashMap<String, Object> ();
-
- protected static final String NEWLINE = System.getProperty( "line.separator" );
-
- protected StatisticImpl(String name, String unit, String desc,
- long start_time, long sample_time) {
-
- if (isValidString(name)) {
- statisticName = name;
- } else {
- statisticName = "name";
- }
-
- if (isValidString(unit)) {
- statisticUnit = unit;
- } else {
- statisticUnit = "unit";
- }
-
- if (isValidString(desc)) {
- statisticDesc = desc;
- } else {
- statisticDesc = "description";
- }
-
- startTime = start_time;
- sampleTime = sample_time;
- }
-
- protected StatisticImpl(String name, String unit, String desc) {
- this(name, unit, desc, System.currentTimeMillis(), System.currentTimeMillis());
- }
-
- public synchronized Map getStaticAsMap() {
- if (isValidString(statisticName)) {
- statMap.put("name", statisticName);
- }
- if (isValidString(statisticUnit)) {
- statMap.put("unit", statisticUnit);
- }
- if (isValidString(statisticDesc)) {
- statMap.put("description", statisticDesc);
- }
- statMap.put(StatisticImpl.START_TIME, startTime);
- statMap.put(StatisticImpl.LAST_SAMPLE_TIME, sampleTime);
- return statMap;
- }
-
- public String getName() {
- return this.statisticName;
- }
-
- public String getDescription() {
- return this.statisticDesc;
- }
-
- public String getUnit() {
- return this.statisticUnit;
- }
-
- public synchronized long getLastSampleTime() {
- return sampleTime;
- }
-
- public synchronized long getStartTime() {
- return startTime;
- }
-
- public synchronized void reset() {
- startTime = System.currentTimeMillis();
- }
-
- public synchronized String toString() {
- return "Statistic " + getClass().getName() + NEWLINE +
- "Name: " + getName() + NEWLINE +
- "Description: " + getDescription() + NEWLINE +
- "Unit: " + getUnit() + NEWLINE +
- "LastSampleTime: " + getLastSampleTime() + NEWLINE +
- "StartTime: " + getStartTime();
- }
-
- protected static boolean isValidString(String str) {
- return (str!=null && str.length()>0);
- }
-
- protected void checkMethod(Method method) {
- if (method == null || method.getDeclaringClass() == null
- || !Statistic.class.isAssignableFrom(method.getDeclaringClass())
- || Modifier.isStatic(method.getModifiers())) {
- throw new RuntimeException("Invalid method on invoke");
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatsImpl.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatsImpl.java
deleted file mode 100644
index 200c9079..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatsImpl.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.external.statistics.impl;
-import com.sun.org.glassfish.external.statistics.Stats;
-import com.sun.org.glassfish.external.statistics.Statistic;
-import java.io.Serializable;
-import java.util.ArrayList;
-
-/**
- * @author Jennifer Chou
- */
-public final class StatsImpl implements Stats {
-
- private final StatisticImpl[] statArray;
-
- protected StatsImpl(StatisticImpl[] statisticArray) {
- statArray = statisticArray;
- }
-
- public synchronized Statistic getStatistic(String statisticName) {
- Statistic stat = null;
- for (Statistic s : statArray) {
- if (s.getName().equals(statisticName)) {
- stat = s;
- break;
- }
- }
- return stat;
- }
-
- public synchronized String[] getStatisticNames() {
- ArrayList list = new ArrayList();
- for (Statistic s : statArray) {
- list.add(s.getName());
- }
- String[] strArray = new String[list.size()];
- return (String[])list.toArray(strArray);
- }
-
- public synchronized Statistic[] getStatistics() {
- return this.statArray;
- }
-
- /**
- * Call reset on all of the Statistic objects contained by this Stats object
- */
- public synchronized void reset() {
- for (StatisticImpl s : statArray) {
- s.reset();
- }
- };
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StringStatisticImpl.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StringStatisticImpl.java
deleted file mode 100644
index f8486daf..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StringStatisticImpl.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2009, 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.org.glassfish.external.statistics.impl;
-import com.sun.org.glassfish.external.statistics.StringStatistic;
-import java.util.Map;
-import java.lang.reflect.*;
-
-/**
- * @author Sreenivas Munnangi
- */
-public final class StringStatisticImpl extends StatisticImpl
- implements StringStatistic, InvocationHandler {
-
- private volatile String str = null;
- private final String initStr;
-
- private final StringStatistic ss =
- (StringStatistic) Proxy.newProxyInstance(
- StringStatistic.class.getClassLoader(),
- new Class[] { StringStatistic.class },
- this);
-
- public StringStatisticImpl(String str, String name, String unit,
- String desc, long sampleTime, long startTime) {
- super(name, unit, desc, startTime, sampleTime);
- this.str = str;
- initStr = str;
- }
-
- public StringStatisticImpl(String name, String unit, String desc) {
- this("", name, unit, desc, System.currentTimeMillis(), System.currentTimeMillis());
- }
-
- public synchronized StringStatistic getStatistic() {
- return ss;
- }
-
- public synchronized Map getStaticAsMap() {
- Map m = super.getStaticAsMap();
- if (getCurrent() != null) {
- m.put("current", getCurrent());
- }
- return m;
- }
-
- public synchronized String toString() {
- return super.toString() + NEWLINE + "Current-value: " + getCurrent();
- }
-
- public String getCurrent() {
- return str;
- }
-
- public void setCurrent(String str) {
- this.str = str;
- sampleTime = System.currentTimeMillis();
- }
-
- @Override
- public synchronized void reset() {
- super.reset();
- this.str = initStr;
- sampleTime = -1L;
- }
-
- // todo: equals implementation
- public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
- checkMethod(m);
-
- Object result;
- try {
- result = m.invoke(this, args);
- } catch (InvocationTargetException e) {
- throw e.getTargetException();
- } catch (Exception e) {
- throw new RuntimeException("unexpected invocation exception: " +
- e.getMessage());
- }
- return result;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/TimeStatisticImpl.java b/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/TimeStatisticImpl.java
deleted file mode 100644
index 27936b7e..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/TimeStatisticImpl.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 2009, 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.org.glassfish.external.statistics.impl;
-
-import com.sun.org.glassfish.external.statistics.TimeStatistic;
-import java.util.Map;
-import java.lang.reflect.*;
-
-/**
- * @author Sreenivas Munnangi
- */
-public final class TimeStatisticImpl extends StatisticImpl
- implements TimeStatistic, InvocationHandler {
-
- private long count = 0L;
- private long maxTime = 0L;
- private long minTime = 0L;
- private long totTime = 0L;
- private final long initCount;
- private final long initMaxTime;
- private final long initMinTime;
- private final long initTotTime;
-
- private final TimeStatistic ts =
- (TimeStatistic) Proxy.newProxyInstance(
- TimeStatistic.class.getClassLoader(),
- new Class[] { TimeStatistic.class },
- this);
-
- public synchronized final String toString() {
- return super.toString() + NEWLINE +
- "Count: " + getCount() + NEWLINE +
- "MinTime: " + getMinTime() + NEWLINE +
- "MaxTime: " + getMaxTime() + NEWLINE +
- "TotalTime: " + getTotalTime();
- }
-
- public TimeStatisticImpl(long counter, long maximumTime, long minimumTime,
- long totalTime, String name, String unit,
- String desc, long startTime, long sampleTime) {
- super(name, unit, desc, startTime, sampleTime);
- count = counter;
- initCount = counter;
- maxTime = maximumTime;
- initMaxTime = maximumTime;
- minTime = minimumTime;
- initMinTime = minimumTime;
- totTime = totalTime;
- initTotTime = totalTime;
- }
-
- public synchronized TimeStatistic getStatistic() {
- return ts;
- }
-
- public synchronized Map getStaticAsMap() {
- Map m = super.getStaticAsMap();
- m.put("count", getCount());
- m.put("maxtime", getMaxTime());
- m.put("mintime", getMinTime());
- m.put("totaltime", getTotalTime());
- return m;
- }
-
- public synchronized void incrementCount(long current) {
- if (count == 0) {
- totTime = current;
- maxTime = current;
- minTime = current;
- } else {
- totTime = totTime + current;
- maxTime = (current >= maxTime ? current : maxTime);
- minTime = (current >= minTime ? minTime : current);
- }
- count++;
- sampleTime = System.currentTimeMillis();
- }
-
- /**
- * Returns the number of times an operation was invoked
- */
- public synchronized long getCount() {
- return count;
- }
-
- /**
- * Returns the maximum amount of time that it took for one invocation of an
- * operation, since measurement started.
- */
- public synchronized long getMaxTime() {
- return maxTime;
- }
-
- /**
- * Returns the minimum amount of time that it took for one invocation of an
- * operation, since measurement started.
- */
- public synchronized long getMinTime() {
- return minTime;
- }
-
- /**
- * Returns the amount of time that it took for all invocations,
- * since measurement started.
- */
- public synchronized long getTotalTime() {
- return totTime;
- }
-
- @Override
- public synchronized void reset() {
- super.reset();
- count = initCount;
- maxTime = initMaxTime;
- minTime = initMinTime;
- totTime = initTotTime;
- sampleTime = -1L;
- }
-
- // todo: equals implementation
- public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
- checkMethod(m);
-
- Object result;
- try {
- result = m.invoke(this, args);
- } catch (InvocationTargetException e) {
- throw e.getTargetException();
- } catch (Exception e) {
- throw new RuntimeException("unexpected invocation exception: " +
- e.getMessage());
- }
- return result;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/AMXClient.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/AMXClient.java
deleted file mode 100644
index 57a28841..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/AMXClient.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import javax.management.Attribute;
-import javax.management.AttributeList;
-import javax.management.AttributeNotFoundException;
-import javax.management.Descriptor;
-import javax.management.InstanceNotFoundException;
-import javax.management.IntrospectionException;
-import javax.management.InvalidAttributeValueException;
-import javax.management.JMException;
-import javax.management.MBeanException;
-import javax.management.MBeanInfo;
-import javax.management.MBeanServerConnection;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.management.ReflectionException;
-import javax.management.RuntimeOperationsException;
-import javax.management.modelmbean.ModelMBeanInfo;
-
-
-/** This class implements a generic AMXMBeanInterface MBean which is connected to a possibly
- * remote MBeanServerConnection (note that MBeanServer isA MBeanServerConnection,
- * so we can actually create an AMXClientImpl simply by using the MBeanServer
- * from the mom: this is useful for testing).
- * <P>
- * Note that this version of the AMXMBeanInterface API provides a generic get/set API that
- * is identical to DynamicMBean, except that it only throws unchecked exceptions.
- * This is far more convenient in practice than the JMX-standard checked exceptions.
- *
- * @author ken
- */
-public class AMXClient implements AMXMBeanInterface {
- private static ObjectName makeObjectName( String str ) {
- try {
- return new ObjectName(str);
- } catch (MalformedObjectNameException ex) {
- return null ;
- }
- }
-
- /** Special object name used to represent a NULL objectName result.
- */
- public static final ObjectName NULL_OBJECTNAME = makeObjectName(
- "null:type=Null,name=Null" ) ;
-
- private MBeanServerConnection server ;
- private ObjectName oname ;
-
- @Override
- public boolean equals( Object obj ) {
- if (this == obj) {
- return true ;
- }
-
- if (!(obj instanceof AMXClient)) {
- return false ;
- }
-
- AMXClient other = (AMXClient)obj ;
-
- return oname.equals( other.oname ) ;
- }
-
- @Override
- public int hashCode() {
- int hash = 5;
- hash = 47 * hash + (this.oname != null ? this.oname.hashCode() : 0);
- return hash;
- }
-
- @Override
- public String toString() {
- return "AMXClient[" + oname + "]" ;
- }
-
- private <T> T fetchAttribute( String name, Class<T> type ) {
- try {
- Object obj = server.getAttribute( oname, name ) ;
- if (NULL_OBJECTNAME.equals( obj )) {
- return null ;
- } else {
- return type.cast( obj ) ;
- }
- } catch (JMException exc) {
- throw new GmbalException( "Exception in fetchAttribute", exc ) ;
- } catch (IOException exc) {
- throw new GmbalException( "Exception in fetchAttribute", exc ) ;
- }
- }
-
- public AMXClient( MBeanServerConnection server,
- ObjectName oname ) {
- this.server = server ;
- this.oname = oname ;
- }
-
- private AMXClient makeAMX( ObjectName on ) {
- if (on == null) {
- return null ;
- }
- return new AMXClient( this.server, on ) ;
- }
-
- public String getName() {
- return fetchAttribute( "Name", String.class ) ;
- }
-
- public Map<String,?> getMeta() {
- try {
- ModelMBeanInfo mbi = (ModelMBeanInfo) server.getMBeanInfo( oname );
- Descriptor desc = mbi.getMBeanDescriptor() ;
- Map<String,Object> result = new HashMap<String,Object>() ;
- for (String str : desc.getFieldNames()) {
- result.put( str, desc.getFieldValue( str )) ;
- }
- return result ;
- } catch (MBeanException ex) {
- throw new GmbalException( "Exception in getMeta", ex ) ;
- } catch (RuntimeOperationsException ex) {
- throw new GmbalException( "Exception in getMeta", ex ) ;
- } catch (InstanceNotFoundException ex) {
- throw new GmbalException( "Exception in getMeta", ex ) ;
- } catch (IntrospectionException ex) {
- throw new GmbalException( "Exception in getMeta", ex ) ;
- } catch (ReflectionException ex) {
- throw new GmbalException( "Exception in getMeta", ex ) ;
- } catch (IOException ex) {
- throw new GmbalException( "Exception in getMeta", ex ) ;
- }
- }
-
- public AMXClient getParent() {
- ObjectName res = fetchAttribute( "Parent", ObjectName.class ) ;
- return makeAMX( res ) ;
- }
-
- public AMXClient[] getChildren() {
- ObjectName[] onames = fetchAttribute( "Children",
- ObjectName[].class ) ;
- return makeAMXArray( onames ) ;
- }
-
- private AMXClient[] makeAMXArray( ObjectName[] onames ) {
- AMXClient[] result = new AMXClient[onames.length] ;
- int ctr=0 ;
- for (ObjectName on : onames ) {
- result[ctr++] = makeAMX( on ) ;
- }
-
- return result ;
- }
-
- public Object getAttribute(String attribute) {
- try {
- return server.getAttribute(oname, attribute);
- } catch (MBeanException ex) {
- throw new GmbalException( "Exception in getAttribute", ex ) ;
- } catch (AttributeNotFoundException ex) {
- throw new GmbalException( "Exception in getAttribute", ex ) ;
- } catch (ReflectionException ex) {
- throw new GmbalException( "Exception in getAttribute", ex ) ;
- } catch (InstanceNotFoundException ex) {
- throw new GmbalException( "Exception in getAttribute", ex ) ;
- } catch (IOException ex) {
- throw new GmbalException( "Exception in getAttribute", ex ) ;
- }
- }
-
- public void setAttribute(String name, Object value ) {
- Attribute attr = new Attribute( name, value ) ;
- setAttribute( attr ) ;
- }
-
- public void setAttribute(Attribute attribute) {
- try {
- server.setAttribute(oname, attribute);
- } catch (InstanceNotFoundException ex) {
- throw new GmbalException( "Exception in setAttribute", ex ) ;
- } catch (AttributeNotFoundException ex) {
- throw new GmbalException( "Exception in setAttribute", ex ) ;
- } catch (InvalidAttributeValueException ex) {
- throw new GmbalException( "Exception in setAttribute", ex ) ;
- } catch (MBeanException ex) {
- throw new GmbalException( "Exception in setAttribute", ex ) ;
- } catch (ReflectionException ex) {
- throw new GmbalException( "Exception in setAttribute", ex ) ;
- } catch (IOException ex) {
- throw new GmbalException( "Exception in setAttribute", ex ) ;
- }
- }
-
- public AttributeList getAttributes(String[] attributes) {
- try {
- return server.getAttributes(oname, attributes);
- } catch (InstanceNotFoundException ex) {
- throw new GmbalException( "Exception in getAttributes", ex ) ;
- } catch (ReflectionException ex) {
- throw new GmbalException( "Exception in getAttributes", ex ) ;
- } catch (IOException ex) {
- throw new GmbalException( "Exception in getAttributes", ex ) ;
- }
- }
-
- public AttributeList setAttributes(AttributeList attributes) {
- try {
- return server.setAttributes(oname, attributes);
- } catch (InstanceNotFoundException ex) {
- throw new GmbalException( "Exception in setAttributes", ex ) ;
- } catch (ReflectionException ex) {
- throw new GmbalException( "Exception in setAttributes", ex ) ;
- } catch (IOException ex) {
- throw new GmbalException( "Exception in setAttributes", ex ) ;
- }
- }
-
- public Object invoke(String actionName, Object[] params, String[] signature)
- throws MBeanException, ReflectionException {
- try {
- return server.invoke(oname, actionName, params, signature);
- } catch (InstanceNotFoundException ex) {
- throw new GmbalException( "Exception in invoke", ex ) ;
- } catch (IOException ex) {
- throw new GmbalException( "Exception in invoke", ex ) ;
- }
- }
-
- public MBeanInfo getMBeanInfo() {
- try {
- return server.getMBeanInfo(oname);
- } catch (InstanceNotFoundException ex) {
- throw new GmbalException( "Exception in invoke", ex ) ;
- } catch (IntrospectionException ex) {
- throw new GmbalException( "Exception in invoke", ex ) ;
- } catch (ReflectionException ex) {
- throw new GmbalException( "Exception in invoke", ex ) ;
- } catch (IOException ex) {
- throw new GmbalException( "Exception in invoke", ex ) ;
- }
- }
-
- public ObjectName objectName() {
- return oname ;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/AMXMBeanInterface.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/AMXMBeanInterface.java
deleted file mode 100644
index 87967c5d..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/AMXMBeanInterface.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal;
-
-import java.util.Map;
-import com.sun.org.glassfish.external.amx.AMX;
-
-
-/** Base interface supported by all AMXMBeanInterface MBeans. All MBeans generated by
- * gmbal comply with this interface, which means that the attributes and
- * operations defined in this Java interface all appear in each
- * MBean generated by calling ManagedObjectManager.register.
- *
- * @author LLoyd Chambers
- * @author Ken Cavanaugh
- *
- */
-@ManagedObject
-@Description( "Base interface for any MBean that works in the AMX framework" )
-public interface AMXMBeanInterface {
- /** Get all metadata about this MBean.
- * @return The descriptor, which will be a ModelMBeanInfoSupport instance.
- */
- public Map<String,?> getMeta();
-
- /** Usually the same as the ObjectName 'name' property, but can differ
- if the actual name contains characters that must be escaped for an ObjectName and/or
- if the MBean has a mutable name attribute.
- The type property can be obtained from the ObjectName */
- @ManagedAttribute( id=AMX.ATTR_NAME )
- @Description( "Return the name of this MBean.")
- public String getName();
-
- /** "go up one level": the MBean containing this one, can be null for root
- * @return The container of this MBean (null if already at root).
- */
- @ManagedAttribute( id=AMX.ATTR_PARENT )
- @Description( "The container that contains this MBean" )
- public AMXMBeanInterface getParent();
-
- /** Containment hierarchy:
- Get all AMXMBeanInterface contained by this one, in no particular order.
- Valid only if isContainer().
- * Note that using an array sidesteps Map/Set/OpenType issues
- * @return All children of this AMXMBeanInterface MBean.
- */
- @ManagedAttribute( id=AMX.ATTR_CHILDREN )
- @Description( "All children of this AMX MBean")
- public AMXMBeanInterface[] getChildren();
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/AMXMetadata.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/AMXMetadata.java
deleted file mode 100644
index e657731e..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/AMXMetadata.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal;
-
-import java.lang.annotation.Documented ;
-import java.lang.annotation.Inherited ;
-import java.lang.annotation.Target ;
-import java.lang.annotation.ElementType ;
-import java.lang.annotation.Retention ;
-import java.lang.annotation.RetentionPolicy ;
-
-import com.sun.org.glassfish.external.amx.AMX ;
-
-/** Annotation to contol exactly how the type value in the ObjectName
- * is extracted from a class when registering an instance of that class.
- * The absence of this annotation is the same as the default values.
- * Note that this is simply an application of the general @DescriptorKey
- * mechanism, but these particular metadata attributes control some of the
- * behavior of the AMXMBeanInterface API.
- * <p>Note that supportsAdoption is not included here, because that attribute
- * is always false for gmbal.
- *
- * @author ken
- */
-@Documented
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-@Inherited
-public @interface AMXMetadata {
- /** True if only one MBean of this type may be created inside the same
- * parent container
- *
- * @return whether or not this MBean must be the only one of its type.
- */
- @DescriptorKey( AMX.DESC_IS_SINGLETON )
- boolean isSingleton() default false ;
-
- /** String denoting classification of MBean. Predefined values are
- * configuration, monitoring, jsr77, utility, and other.
- * @return The group type.
- */
- @DescriptorKey( AMX.DESC_GROUP )
- String group() default "other" ;
-
- /** Return the list of types that are legal as types of children of this
- * type. If unknown, must be an empty array.
- * @return Array of child types
- */
- @DescriptorKey( AMX.DESC_SUB_TYPES )
- String[] subTypes() default {} ;
-
- /** Return the generic AMXMBeanInterface interface to be used.
- * @return name of interface to use.
- */
- @DescriptorKey( AMX.DESC_GENERIC_INTERFACE_NAME )
- String genericInterfaceName() default "com.sun.org.glassfish.admin.amx.core.AMXProxy" ;
-
- /** True if the MBeanInfo is invariant, that is, has the same
- * value for the lifetime of the MBean. This may be used as a hint
- * to clients that the MBeanInfo can be cached.
- *
- * @return True if the MBeanInfo is invariant
- */
- @DescriptorKey( AMX.DESC_STD_IMMUTABLE_INFO )
- boolean immutableInfo() default true ;
-
- /** Defines the name of the interface to use when generating a proxy
- * for this class. Defaults to a generic interface.
- * @return The interface class name for a proxy.
- */
- @DescriptorKey( AMX.DESC_STD_INTERFACE_NAME )
- String interfaceClassName() default "" ;
-
- /** An explicit type to use for the MBean.
- * <p>
- * Note that this is NOT part of the AMXMBeanInterface-defined metadata, but gmbal
- * needs it here to have a place to override the type.
- * <p>
- * Gmbal determines the type name as follows:
- * <ol>
- * <li>If the class has a final static field of type String with the
- * name "AMX_TYPE", the value of the field is the type name.
- * <li>Otherwise, if the class has an @AMXMetadata annotations, and the
- * value of the type is not "", the value of the type is the type name.
- * <li>Otherwise, if the package prefix of the class name matches one of
- * the type prefixes added by an stripPrefix call to the ManagedObjectManager,
- * the type name is the full class name with the matching prefix removed.
- * <li>Otherwise, if the stripPackagePrefix method was called on the
- * ManagedObjectManager, the type name is the class name without any
- * package prefixes.
- * <li>Otherwise, the type name is the class name.
- * </ol>
- * @return The type for this MBean.
- */
- @DescriptorKey( "type" )
- String type() default "" ;
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/Description.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/Description.java
deleted file mode 100644
index a14928d1..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/Description.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal ;
-
-import java.lang.annotation.Documented ;
-import java.lang.annotation.Target ;
-import java.lang.annotation.ElementType ;
-import java.lang.annotation.Retention ;
-import java.lang.annotation.RetentionPolicy ;
-
-/** This annotation is applied to a method that takes no arguments and returns a value
- * that is converted into a String for use in the ObjectName when an instance of the enclosing
- * class is used to construct an open MBean.
- */
-@Documented
-@Target({ElementType.METHOD, ElementType.FIELD, ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Description {
- /** The description to be applied to the annotated element.
- * This value must not be empty. It can either be the actual string that is inserted
- * into the MBean info class, or a key into a resource bundle associated with the
- * ManagedObjectManager. If there is no bundle value associated with the key, or no
- * resource bundle is specified, the value is used directly in the MBean info class.
- */
- String value() ;
-
- /** Optional key to use in a resource bundle for this description. If present,
- * a gmbal tool will generate a resource bundle that contains key=value taken
- * from the description annotation.
- * <p>
- * If this key is not present, the default key is given by the class name,
- * if this annotation appears on a class, or the class name.method name if
- * this annotation appears on a method. It is an error to use the default
- * value for more than one method of the same name, except for setters and getters.
- *
- */
- String key() default "" ;
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/DescriptorFields.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/DescriptorFields.java
deleted file mode 100644
index 078d4838..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/DescriptorFields.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/** This is taken directly from JDK 7 in order to support this feature in
- * JDK 5.
- *
- * <p>Annotation that adds fields to a Descriptor. This can be the
- * Descriptor for an MBean, or for an attribute, operation, or constructor
- * in an MBean, or for a parameter of an operation or constructor.</p>
- *
- * <p>Consider this Standard MBean interface, for example:</p>
- *
- * <pre>
- * public interface CacheControlMBean {
- * <b>&#64;DescriptorFields("units=bytes")</b>
- * public long getCacheSize();
- * }
- * </pre>
- *
- * <p>When a Standard MBean is made using this interface, the usual rules
- * mean that it will have an attribute called {@code CacheSize} of type
- * {@code long}. The {@code DescriptorFields} annotation will ensure
- * that the MBeanAttributeInfo for this attribute will have a
- * {@code Descriptor} that has a field called {@code units} with
- * corresponding value {@code bytes}.</p>
- *
- * <p>Similarly, if the interface looks like this:</p>
- *
- * <pre>
- * public interface CacheControlMBean {
- * <b>&#64;DescriptorFields({"units=bytes", "since=1.5"})</b>
- * public long getCacheSize();
- * }
- * </pre>
- *
- * <p>then the resulting {@code Descriptor} will contain the following
- * fields:</p>
- *
- * <table border="2">
- * <tr><th>Name</th><th>Value</th></tr>
- * <tr><td>units</td><td>"bytes"</td></tr>
- * <tr><td>since</td><td>"1.5"</td></tr>
- * </table>
- *
- * <p>The {@code @DescriptorFields} annotation can be applied to:</p>
- *
- * <ul>
- * <li>a Standard MBean or MXBean interface;
- * <li>a method in such an interface;
- * <li>a parameter of a method in a Standard MBean or MXBean interface
- * when that method is an operation (not a getter or setter for an attribute);
- * <li>a public constructor in the class that implements a Standard MBean
- * or MXBean;
- * <li>a parameter in such a constructor.
- * </ul>
- *
- * <p>Other uses of the annotation will either fail to compile or be
- * ignored.</p>
- *
- * <p>Interface annotations are checked only on the exact interface
- * that defines the management interface of a Standard MBean or an
- * MXBean, not on its parent interfaces. Method annotations are
- * checked only in the most specific interface in which the method
- * appears; in other words, if a child interface overrides a method
- * from a parent interface, only {@code @DescriptorFields} annotations in
- * the method in the child interface are considered.
- *
- * <p>The Descriptor fields contributed in this way must be consistent
- * with each other and with any fields contributed by
- * DescriptorKey annotations. That is, two
- * different annotations, or two members of the same annotation, must
- * not define a different value for the same Descriptor field. Fields
- * from annotations on a getter method must also be consistent with
- * fields from annotations on the corresponding setter method.</p>
- *
- * <p>The Descriptor resulting from these annotations will be merged
- * with any Descriptor fields provided by the implementation, such as
- * the <a href="Descriptor.html#immutableInfo">{@code
- * immutableInfo}</a> field for an MBean. The fields from the annotations
- * must be consistent with these fields provided by the implementation.</p>
- *
- * <h4>{@literal @DescriptorFields and @DescriptorKey}</h4>
- *
- * <p>The DescriptorKey annotation provides
- * another way to use annotations to define Descriptor fields.
- * <code>&#64;DescriptorKey</code> requires more work but is also more
- * robust, because there is less risk of mistakes such as misspelling
- * the name of the field or giving an invalid value.
- * <code>&#64;DescriptorFields</code> is more convenient but includes
- * those risks. <code>&#64;DescriptorFields</code> is more
- * appropriate for occasional use, but for a Descriptor field that you
- * add in many places, you should consider a purpose-built annotation
- * using <code>&#64;DescriptorKey</code>.
- *
- * @since 1.7
- */
-@Documented
-@Inherited // for @MBean and @MXBean classes
-@Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.FIELD,
- ElementType.PARAMETER, ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface DescriptorFields {
- /**
- * <p>The descriptor fields. Each element of the string looks like
- * {@code "name=value"}.</p>
- */
- public String[] value();
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/DescriptorKey.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/DescriptorKey.java
deleted file mode 100644
index 639c818f..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/DescriptorKey.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal;
-
-import java.lang.annotation.*;
-
-/** This is taken directly from JDK 7 in order to support this feature in
- * JDK 5.
- *
- * <p>Meta-annotation that describes how an annotation element relates
- * to a field in a Descriptor. This can be the Descriptor for
- * an MBean, or for an attribute, operation, or constructor in an
- * MBean, or for a parameter of an operation or constructor.</p>
- *
- * <p>(The DescriptorFields annotation
- * provides another way to add fields to a {@code Descriptor}. See
- * the documentation for that annotation for a comparison of the
- * two possibilities.)</p>
- *
- * <p>Consider this annotation for example:</p>
- *
- * <pre>
- * &#64;Documented
- * &#64;Target(ElementType.METHOD)
- * &#64;Retention(RetentionPolicy.RUNTIME)
- * public &#64;interface Units {
- * <b>&#64;DescriptorKey("units")</b>
- * String value();
- * }
- * </pre>
- *
- * <p>and this use of the annotation:</p>
- *
- * <pre>
- * public interface CacheControlMBean {
- * <b>&#64;Units("bytes")</b>
- * public long getCacheSize();
- * }
- * </pre>
- *
- * <p>When a Standard MBean is made from the {@code CacheControlMBean},
- * the usual rules mean that it will have an attribute called
- * {@code CacheSize} of type {@code long}. The {@code @Units}
- * annotation, given the above definition, will ensure that the
- * MBeanAttributeInfo for this attribute will have a
- * {@code Descriptor} that has a field called {@code units} with
- * corresponding value {@code bytes}.</p>
- *
- * <p>Similarly, if the annotation looks like this:</p>
- *
- * <pre>
- * &#64;Documented
- * &#64;Target(ElementType.METHOD)
- * &#64;Retention(RetentionPolicy.RUNTIME)
- * public &#64;interface Units {
- * <b>&#64;DescriptorKey("units")</b>
- * String value();
- *
- * <b>&#64;DescriptorKey("descriptionResourceKey")</b>
- * String resourceKey() default "";
- *
- * <b>&#64;DescriptorKey("descriptionResourceBundleBaseName")</b>
- * String resourceBundleBaseName() default "";
- * }
- * </pre>
- *
- * <p>and it is used like this:</p>
- *
- * <pre>
- * public interface CacheControlMBean {
- * <b>&#64;Units("bytes",
- * resourceKey="bytes.key",
- * resourceBundleBaseName="com.example.foo.MBeanResources")</b>
- * public long getCacheSize();
- * }
- * </pre>
- *
- * <p>then the resulting {@code Descriptor} will contain the following
- * fields:</p>
- *
- * <table border="2">
- * <tr><th>Name</th><th>Value</th></tr>
- * <tr><td>units</td><td>"bytes"</td></tr>
- * <tr><td>descriptionResourceKey</td><td>"bytes.key"</td></tr>
- * <tr><td>descriptionResourceBundleBaseName</td>
- * <td>"com.example.foo.MBeanResources"</td></tr>
- * </table>
- *
- * <p>An annotation such as {@code @Units} can be applied to:</p>
- *
- * <ul>
- * <li>a Standard MBean or MXBean interface;
- * <li>a method in such an interface;
- * <li>a parameter of a method in a Standard MBean or MXBean interface
- * when that method is an operation (not a getter or setter for an attribute);
- * <li>a public constructor in the class that implements a Standard MBean
- * or MXBean;
- * <li>a parameter in such a constructor.
- * </ul>
- *
- * <p>Other uses of the annotation are ignored.</p>
- *
- * <p>Interface annotations are checked only on the exact interface
- * that defines the management interface of a Standard MBean or an
- * MXBean, not on its parent interfaces. Method annotations are
- * checked only in the most specific interface in which the method
- * appears; in other words, if a child interface overrides a method
- * from a parent interface, only {@code @DescriptorKey} annotations in
- * the method in the child interface are considered.
- *
- * <p>The Descriptor fields contributed in this way by different
- * annotations on the same program element must be consistent with
- * each other and with any fields contributed by a
- * DescriptorFields annotation. That is, two
- * different annotations, or two members of the same annotation, must
- * not define a different value for the same Descriptor field. Fields
- * from annotations on a getter method must also be consistent with
- * fields from annotations on the corresponding setter method.</p>
- *
- * <p>The Descriptor resulting from these annotations will be merged
- * with any Descriptor fields provided by the implementation, such as
- * the <a href="Descriptor.html#immutableInfo">{@code
- * immutableInfo}</a> field for an MBean. The fields from the annotations
- * must be consistent with these fields provided by the implementation.</p>
- *
- * <p>An annotation element to be converted into a descriptor field
- * can be of any type allowed by the Java language, except an annotation
- * or an array of annotations. The value of the field is derived from
- * the value of the annotation element as follows:</p>
- *
- * <table border="2">
- * <tr><th>Annotation element</th><th>Descriptor field</th></tr>
- * <tr><td>Primitive value ({@code 5}, {@code false}, etc)</td>
- * <td>Wrapped value ({@code Integer.valueOf(5)},
- * {@code Boolean.FALSE}, etc)</td></tr>
- * <tr><td>Class constant (e.g. {@code Thread.class})</td>
- * <td>Class name from Class.getName()
- * (e.g. {@code "java.lang.Thread"})</td></tr>
- * <tr><td>Enum constant (e.g. ElementType.FIELD)</td>
- * <td>Constant name from Enum.name()
- * (e.g. {@code "FIELD"})</td></tr>
- * <tr><td>Array of class constants or enum constants</td>
- * <td>String array derived by applying these rules to each
- * element</td></tr>
- * <tr><td>Value of any other type<br>
- * ({@code String}, {@code String[]}, {@code int[]}, etc)</td>
- * <td>The same value</td></tr>
- * </table>
- *
- * @since 1.6
- */
-@Documented
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ ElementType.METHOD, ElementType.FIELD })
-public @interface DescriptorKey {
- String value();
-
- /**
- * <p>Do not include this field in the Descriptor if the annotation
- * element has its default value. For example, suppose {@code @Units} is
- * defined like this:</p>
- *
- * <pre>
- * &#64;Documented
- * &#64;Target(ElementType.METHOD)
- * &#64;Retention(RetentionPolicy.RUNTIME)
- * public &#64;interface Units {
- * &#64;DescriptorKey("units")
- * String value();
- *
- * <b>&#64;DescriptorKey(value = "descriptionResourceKey",
- * omitIfDefault = true)</b>
- * String resourceKey() default "";
- *
- * <b>&#64;DescriptorKey(value = "descriptionResourceBundleBaseName",
- * omitIfDefault = true)</b>
- * String resourceBundleBaseName() default "";
- * }
- * </pre>
- *
- * <p>Then consider a usage such as {@code @Units("bytes")} or
- * {@code @Units(value = "bytes", resourceKey = "")}, where the
- * {@code resourceKey} and {@code resourceBundleBaseNames} elements
- * have their default values. In this case the Descriptor resulting
- * from these annotations will not include a {@code descriptionResourceKey}
- * or {@code descriptionResourceBundleBaseName} field.</p>
- */
- boolean omitIfDefault() default false;
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/GmbalException.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/GmbalException.java
deleted file mode 100644
index 1cd60e53..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/GmbalException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-package com.sun.org.glassfish.gmbal;
-
-/** Unchecked exception type used for all gmbal exceptions.
- *
- * @author ken
- */
-public class GmbalException extends RuntimeException {
- private static final long serialVersionUID = -7478444176079980162L;
- public GmbalException( String msg ) {
- super( msg ) ;
- }
-
- public GmbalException( String msg, Throwable thr ) {
- super( msg, thr ) ;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/GmbalMBean.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/GmbalMBean.java
deleted file mode 100644
index fa858681..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/GmbalMBean.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal;
-
-import javax.management.DynamicMBean;
-import javax.management.NotificationEmitter;
-
-/** Type returned from ManagedObjectManager createRoot and register methods.
- * Used because all Gmbal MBeans are dynamic MBeans that support attribute
- * change notification.
- *
- * @author ken
- */
-public interface GmbalMBean extends DynamicMBean, NotificationEmitter {
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/GmbalMBeanNOPImpl.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/GmbalMBeanNOPImpl.java
deleted file mode 100644
index 081800fb..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/GmbalMBeanNOPImpl.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal;
-
-import javax.management.Attribute;
-import javax.management.AttributeList;
-import javax.management.AttributeNotFoundException;
-import javax.management.InvalidAttributeValueException;
-import javax.management.ListenerNotFoundException;
-import javax.management.MBeanException;
-import javax.management.MBeanInfo;
-import javax.management.MBeanNotificationInfo;
-import javax.management.NotificationFilter;
-import javax.management.NotificationListener;
-import javax.management.ReflectionException;
-
-/** A simple no-op implementation of GmbalMBean for use in the no-op impl of
- * ManagedObjectManager.
- *
- * @author ken
- */
-public class GmbalMBeanNOPImpl implements GmbalMBean {
- public Object getAttribute(String attribute)
- throws AttributeNotFoundException, MBeanException, ReflectionException {
-
- return null ;
- }
-
- public void setAttribute(Attribute attribute)
- throws AttributeNotFoundException, InvalidAttributeValueException,
- MBeanException, ReflectionException {
-
- // NO-OP
- }
-
- public AttributeList getAttributes(String[] attributes) {
- return null ;
- }
-
- public AttributeList setAttributes(AttributeList attributes) {
- return null ;
- }
-
- public Object invoke(String actionName, Object[] params, String[] signature)
- throws MBeanException, ReflectionException {
-
- return null ;
- }
-
- public MBeanInfo getMBeanInfo() {
- return null ;
- }
-
- public void removeNotificationListener(NotificationListener listener,
- NotificationFilter filter, Object handback)
- throws ListenerNotFoundException {
-
- // NO-OP
- }
-
- public void addNotificationListener(NotificationListener listener,
- NotificationFilter filter, Object handback) throws IllegalArgumentException {
-
- // NO-OP
- }
-
- public void removeNotificationListener(NotificationListener listener)
- throws ListenerNotFoundException {
-
- // NO-OP
- }
-
- public MBeanNotificationInfo[] getNotificationInfo() {
- return new MBeanNotificationInfo[0] ;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/Impact.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/Impact.java
deleted file mode 100644
index 946874a1..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/Impact.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-package com.sun.org.glassfish.gmbal;
-
-/**
- *
- * @author ken
- */
-public enum Impact {
- /** Indicates that an action is read-like, generally only returning
- * information without modifying any state.
- * Corresponds to MBeanOperationInfo.INFO.
- */
- INFO,
-
- /** Indicates that an action is write-like, and may modify the state
- * of an MBean in some way.
- * Corresponds to MBeanOperationInfo.ACTION.
- */
- ACTION,
-
- /** Indicates that an action is both read-like and write-like.
- * Corresponds to MBeanOperationInfo.ACTION_INFO.
- */
- ACTION_INFO,
-
- /** Indicates that an action has an unknown nature.
- * Corresponds to MBeanOperationInfo.UNKNOWN.
- */
- UNKNOWN
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/IncludeSubclass.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/IncludeSubclass.java
deleted file mode 100644
index fdfc6aa2..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/IncludeSubclass.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal ;
-
-import java.lang.annotation.Documented ;
-import java.lang.annotation.Target ;
-import java.lang.annotation.ElementType ;
-import java.lang.annotation.Retention ;
-import java.lang.annotation.RetentionPolicy ;
-
-/** This annotation is applied to a class or interface representing ManagedData
- * to indicate that the
- * listed subclasses should have their attributes included in the corresponding
- * CompositeData of the superclass. Any given instance of this class will have
- * values for those attributes that are defined in the parent class
- * or the subclass for the particular type of the instance.
- */
-@Documented
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface IncludeSubclass {
- /** List of subclasses that should be analyzed for attributes and operations.
- *
- * @return List of classes.
- */
- Class[] value() ;
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/InheritedAttribute.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/InheritedAttribute.java
deleted file mode 100644
index 3a018b6b..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/InheritedAttribute.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal ;
-
-import java.lang.annotation.Documented ;
-import java.lang.annotation.Target ;
-import java.lang.annotation.ElementType ;
-import java.lang.annotation.Retention ;
-import java.lang.annotation.RetentionPolicy ;
-
-/** This annotation defines an attribute in open MBean (ManagedObject) or
- * CompositeData (ManagedData). It is useful in cases where the parent class
- * cannot be annotated (for example, Object.toString(), or a framework class
- * that must be extended
- * but cannot be modified). The attribute id is defined in the annotation, and
- * it is implemented by the methods inherited by the Managed entity.
- * <p>
- * An example of a use of this is to handle @ManagedData that inherits from
- * Collection<X>, and it is desired to display a read-only attribute containing
- * the elements of the Collection. Simple add the annotation
- * <p>
- * @InheritedAttribute( methodName="iterator" )
- * <p>
- * to handle this case. Note that this only supports read-only attributes.
- */
-@Documented
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface InheritedAttribute {
- /** The description of the attribute. Can be a key to a resource
- * bundle for I18N support. Note that this needs a description, otherwise
- * the InheritedAttributes annotation won't work. The Description
- * annotation is used in all other cases. The description cannot be
- * empty.
- * @return The description.
- */
- String description() ;
-
- /** The name of the attribute, This class must inherit a method whose name
- * corresponds to this id in one of the standard ways.
- * @return The ID.
- */
- String id() default "" ;
-
- /** The name of the method implementing this attribute. At least one of
- * id and methodName must not be empty. If only one is given, the other
- * is derived according to the extended attribute name rules.
- */
- String methodName() default "" ;
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/InheritedAttributes.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/InheritedAttributes.java
deleted file mode 100644
index 49333e0a..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/InheritedAttributes.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal ;
-
-import java.lang.annotation.Documented ;
-import java.lang.annotation.Target ;
-import java.lang.annotation.ElementType ;
-import java.lang.annotation.Retention ;
-import java.lang.annotation.RetentionPolicy ;
-
-/** This annotation defines one or more attributes inherited from a superclass.
- * It is simply a way to include multiple InheritedAttribute annotations on a
- * single class.
- */
-@Documented
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface InheritedAttributes {
- InheritedAttribute[] value() ;
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedAttribute.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedAttribute.java
deleted file mode 100644
index 3491a623..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedAttribute.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal ;
-
-import java.lang.annotation.Documented ;
-import java.lang.annotation.Target ;
-import java.lang.annotation.ElementType ;
-import java.lang.annotation.Retention ;
-import java.lang.annotation.RetentionPolicy ;
-
-/** This annotation defines an attribute in either CompositeData (ManagedData) or
- * an open MBean (ManagedObject). An attribute may be read/write (has a setter
- * and a getter), read only (only has a getter),
- * or write only (only has a setter) depending on the declared methods in the class.
- * <p>
- * A method defines a getter if it returns a non-void type and takes no argument types.
- * Likewise a method defines a setter if it return void and takes exactly one
- * argument.
- * <p>An id is derived from a method name as follows:
- * <ol>
- * <li>If the method is a getter, and has a name of the form getXXX, the derived
- * id is xXX (note the initial lower case change).
- * <li>If the method is a getter with a boolean return type, and has a name of
- * the form isXXX, the derived id is xXX
- * <li>If the method is a setter, and has a name of the form setXXX, the
- * detived id is xXX.
- * <li>Otherwise the derived ID is the method name.
- * </ol>
- * <p>
- * In certain cases, a field annotated with @ManagedAttribute
- * may also represent a read-only attribute.
- * The field must be final, and its type must be one of:
- * <ol>
- * <li>A primitive type (boolean, byte, short, char, int, long, float, double)
- * <li>A primitive type wrapper (Boolean, Byte, Short, Character, Integer,
- * Long, Float, Double)
- * <li>A String
- * <li>A BigDecimal or BigInteger
- * <li>A java.util.Date
- * <li>An ObjectName
- * <li>An enum (which is translated to its ordinal name)
- * </ol>
- * Any such field can be accessed safely by multiple threads, because its value
- * cannot change after an instance of the containing class has completed its
- * constructor. Note that Date is not truly immutable (it should be!), but it's
- * one of the Open MBean simple types, so it is included here.
- */
-@Documented
-@Target({ElementType.METHOD,ElementType.FIELD})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ManagedAttribute {
- /** The id of the attribute. Defaults to value derived from method name.
- * @return The id (default "").
- */
- String id() default "" ;
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedData.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedData.java
deleted file mode 100644
index 372ebcd0..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedData.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal ;
-
-import java.lang.annotation.Documented ;
-import java.lang.annotation.Target ;
-import java.lang.annotation.ElementType ;
-import java.lang.annotation.Retention ;
-import java.lang.annotation.RetentionPolicy ;
-
-/** This annotation defines CompositeData. An interface or class annotated as @ManagedData
- * has a corresponding CompositeData instance constructed according to the @ManagedAttribute
- * annotations on its methods. All inherited annotated methods are included.
- * In the case of conflicts, the most derived method is used (that is the method
- * declared in the method
- * closest to the class annotated as @ManagedData).
- */
-@Documented
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ManagedData {
- /** The name of the ManagedData.
- * <P>
- * Gmbal determines the ManagedData name as follows:
- * <ol>
- * <li>If the class has a final static field of type String with the
- * name "GMBAL_TYPE", the value of the field is the ManagedData name.
- * <li>Otherwise, if the class has an @ManagedData annotation, and the
- * value of the name is not "", the value of the name is the ManagedData name.
- * <li>Otherwise, if the package prefix of the class name matches one of
- * the type prefixes added by an stripPrefix call to the ManagedObjectManager,
- * the ManagedData name is the full class name with the matching prefix removed.
- * <li>Otherwise, if the stripPackagePrefix method was called on the
- * ManagedObjectManager, the ManagedData name is the class name without any
- * package prefixes.
- * <li>Otherwise, the ManagedData name is the class name.
- * </ol>
- *
- */
- String name() default "" ;
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObject.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObject.java
deleted file mode 100644
index f784aa71..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObject.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal ;
-
-import java.lang.annotation.Documented ;
-import java.lang.annotation.Target ;
-import java.lang.annotation.ElementType ;
-import java.lang.annotation.Retention ;
-import java.lang.annotation.RetentionPolicy ;
-
-/** This annotation defines a Managed Object. An interface or class annotated as ManagedObject
- * has a corresponding open MBean constructed according to the ManagedAttribute and
- * ManagedOperation annotations on its methods.
- */
-@Documented
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ManagedObject {
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObjectManager.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObjectManager.java
deleted file mode 100644
index 9cdb8747..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObjectManager.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal ;
-
-import java.util.ResourceBundle ;
-
-import java.io.Closeable ;
-
-import java.lang.reflect.AnnotatedElement ;
-import java.lang.annotation.Annotation ;
-
-import javax.management.ObjectName ;
-import javax.management.MBeanServer ;
-
-/** An interface used to managed Open MBeans created from annotated
- * objects. This is mostly a facade over MBeanServer.
- * Note that certain methods must be called in the correct order:
- * <ol>
- * <li> Methods suspendJMXRegistration, resumeJMXRegistration,
- * getDomain, getMBeanServer, getResourceBundle, setRuntimeDebug,
- * setRegistrationDebugLevel, setTypelibDebug, and close may be
- * called at any time.
- * <li> All calls to addAnnotation, stripPrefix, and
- * stripPackageName must occur before any call to a createRoot method.
- * <li>All of the register and registerAtRoot methods and unregister, getObject,
- * getObjectName, and dumpSkeleton may only be called after
- * a createRoot method is called.
- * <li>Only one call to a createRoot method is permitted on any
- * ManagedObjectManager.
- * <li>A call to close returns the MOM to the pre-createRoot state.
- * </ol>
- * If these constraints are violated, an IllegalStateException is thrown.
- */
-
-public interface ManagedObjectManager extends Closeable {
- /** If called, no MBeans created after this call will be registered with
- * the JMX MBeanServer until resumeJMXRegistration is called. Each call
- * increments a counter, so that nested and overlapping calls from multiple
- * threads work correctly.
- * May be called at any time.
- */
- void suspendJMXRegistration() ;
-
- /** Decrements the suspend counter, if the counter is greater than 0.
- * When the counter goes to zero, it causes all MBeans created since
- * a previous call to suspendJMXRegistration incremented the counter from 0 to 1
- * to be registered with the JMX MBeanServer. After this call, all new
- * MBean registration calls to the JMX MBeanServer happen within the
- * register call.
- * May be called at any time.
- */
- void resumeJMXRegistration() ;
-
- /** Return true if object is assignment compatible with a class or interface
- * that has an @ManagedObject annotation, otherwise false. Only such objects
- * may be registered to create MBeans.
- * May be called at any time.
- */
- boolean isManagedObject( Object obj ) ;
-
- /** Create a default root MBean.
- * One of the createRoot methods must be called before any of the registration
- * methods may be called.
- * Only one call to a createRoot method is permitted after an
- * ManagedObjectManager is created.
- * @exception IllegalStateException if called after a call to any
- * createRoot method.
- * @return A default root MBean which supports only the AMX attributes.
- */
- GmbalMBean createRoot() ;
-
- /** Create a root MBean from root, which much have a method with the
- * @NameValue annotation.
- * One of the createRoot methods must be called before any of the registration
- * methods may be called.
- * Only one call to createRoot is permitted after an ManagedObjectManager
- * is created.
- * @param root The Java object to be used to construct the root.
- * @exception IllegalStateException if called after a call to any
- * createRoot method.
- * @return The newly constructed MBean.
- */
- GmbalMBean createRoot( Object root ) ;
-
- /** Create a root MBean from root with the given name.
- * One of the createRoot methods must be called before any of the registration
- * methods may be called.
- * Only one call to createRoot is permitted after an ManagedObjectManager
- * is created.
- * @param root The Java object to be used to construct the root.
- * @param name The ObjectName name field to be used in the ObjectName of
- * the MBean constructed from root.
- * @exception IllegalStateException if called after a call to any
- * createRoot method.
- * @return The newly constructed MBean.
- */
- GmbalMBean createRoot( Object root, String name ) ;
-
- /** Return the root of this ManagedObjectManager.
- * May be called at any time.
- * @return the root constructed in a createRoot operation, or null if called
- * before a createRoot call.
- */
- Object getRoot() ;
-
- /** Construct an Open Mean for obj according to its annotations,
- * and register it with domain getDomain() and the appropriate
- * ObjectName. The MBeanServer from setMBeanServer (or its default) is used.
- * Here parent is considered to contain obj, and this containment is
- * represented by the construction of the ObjectName following the AMX
- * specification for ObjectNames.
- * <p>
- * The MBeanInfo for the result is actually ModelMBeanInfo, and may contain
- * extra metadata as defined using annotations defined with the
- * @DescriptorKey and @DescriptorField meta-annotations.
- * <p>
- * Must be called after a successful createRoot call.
- * <p>
- * This version of register should not be used to register singletons.
- * </ol>
- * @param parent The parent object that contains obj.
- * @param obj The managed object we are registering.
- * @param name The name to use for registering this object.
- * @return The MBean constructed from obj.
- * @exception IllegalStateException if called before a createRoot method is
- * called successfully.
- */
- GmbalMBean register( Object parent, Object obj, String name ) ;
-
- /** Same as register( parent, obj, name ), but here the name
- * is derived from an @NameValue annotation.
- * <p>
- * This version of register should also be used to register singletons.
- *
- * @param parent The parent object that contains obj.
- * @param obj The managed object we are registering.
- * @return The MBean constructed from obj.
- * @exception IllegalStateException if called before a createRoot method is
- * called successfully.
- */
- GmbalMBean register( Object parent, Object obj ) ;
-
- /** Registers the MBean for obj at the root MBean for the ObjectManager,
- * using the given name. Exactly the same as mom.register( mom.getRoot(),
- * obj, name ).
- * <p>
- * Must be called after a successful createRoot call.
- * <p>
- * This version of register should not be used to register singletons.
- * @param obj The object for which we construct and register an MBean.
- * @param name The name of the MBean.
- * @return The MBean constructed from obj.
- * @exception IllegalStateException if called before a createRoot method is
- * called successfully.
- */
- GmbalMBean registerAtRoot( Object obj, String name ) ;
-
- /** Same as registerAtRoot( Object, String ), but here the name
- * is derived from an @ObjectKeyName annotation. Exactly the same as
- * mom.register( mom.getRoot(), obj ).
- * <p>
- * This version of register should also be used to register singletons.
- * @param obj The managed object we are registering.
- * @return The MBean constructed from obj.
- * @exception IllegalStateException if called before a createRoot method is
- * called successfully.
- */
- GmbalMBean registerAtRoot( Object obj ) ;
-
-
- /** Unregister the Open MBean corresponding to obj from the
- * mbean server.
- * <p>
- * Must be called after a successful createRoot call.
- * @param obj The object originally passed to a register method.
- */
- void unregister( Object obj ) ;
-
- /** Get the ObjectName for the given object (which must have
- * been registered via a register call).
- * <p>
- * Must be called after a successful createRoot call.
- * @param obj The object originally passed to a register call.
- * @return The ObjectName used to register the MBean.
- */
- ObjectName getObjectName( Object obj ) ;
-
- /** Get an AMXClient instance for the object obj, if obj is registered
- * as an MBean in this mom.
- * <p>
- * Must be called after a successful createRoot call.
- * @param obj The object corresponding to an MBean.
- * @return An AMXClient that acts as a proxy for this MBean.
- */
- AMXClient getAMXClient( Object obj ) ;
-
- /** Get the Object that was registered with the given ObjectName.
- * Note that getObject and getObjectName are inverse operations.
- * <p>
- * Must be called after a successful createRoot call.
- * @param oname The ObjectName used to register the object.
- * @return The Object passed to the register call.
- */
- Object getObject( ObjectName oname ) ;
-
- /** Add a type prefix to strip from type names, to shorten the names for
- * a better presentation to the user. This may only be called before a
- * createRot method is called.
- *
- * @param str Class package name to strip from type name.
- * @exception IllegalStateException if called after createRoot method.
- */
- void stripPrefix( String... str ) ;
-
- /** Change the default type name algorithm so that if nothing else
- * applies, the entire package prefix is stripped form the Class name.
- * Otherwise, the full Class name is the type.
- *
- * @exception IllegalStateException if called after a createRoot method.
- */
- void stripPackagePrefix() ;
-
- /** Return the domain name that was used when this ManagedObjectManager
- * was created. This is the JMX domain that will be used in all ObjectNames
- * created by this ManagedObjectManager.
- * <p>
- * May be called at any time.
- * @return Get the domain name for this ManagedObjectManager.
- */
- String getDomain() ;
-
- /** Set the MBeanServer to which all MBeans using this interface
- * are published. The default value is
- * java.lang.management.ManagementFactory.getPlatformMBeanServer().
- * <p>
- * Must be called before a successful createRoot call.
- * @param server The MBeanServer to set as the MBeanServer for this
- * ManagedObjectManager.
- */
- void setMBeanServer( MBeanServer server ) ;
-
- /** Get the current MBeanServer.
- * <p>
- * May be called at any time.
- * @return The current MBeanServer, either the default, or the value passed
- * to setMBeanServer.
- */
- MBeanServer getMBeanServer() ;
-
- /** Set the ResourceBundle to use for getting localized descriptions.
- * If not set, the description is the value in the annotation.
- * <p>
- * Must be called before a successful call to a createRoot method.
- * @param rb The resource bundle to use. May be null.
- */
- void setResourceBundle( ResourceBundle rb ) ;
-
- /** Get the resource bundle (if any) set by setResourceBundle.
- * <p>
- * May be called at any time.
- * @return The resource bundle set by setResourceBundle: may be null.
- */
- ResourceBundle getResourceBundle() ;
-
- /** Method to add an annotation to an element that cannot be modified.
- * This is typically needed when dealing with an implementation of an
- * interface that is part of a standardized API, and so the interface
- * cannot be annotated by modifiying the source code. In some cases the
- * implementation of the interface also cannot be inherited, because the
- * implementation is generated by a standardized code generator. Another
- * possibility is that there are several different implementations of the
- * standardized interface, and it is undesirable to annotate each
- * implementation with @InheritedAttributes.
- * @param element The annotated element (class or method for our purposes).
- * @param annotation The annotation we wish to add to the element.
- * @exception IllegalStateException if called after a call to a createRoot
- * method.
- */
- void addAnnotation( AnnotatedElement element, Annotation annotation ) ;
-
- /** DebugLevel used to control how much debug info is printed for
- * registration of objects.
- */
- public enum RegistrationDebugLevel { NONE, NORMAL, FINE } ;
-
- /** Print debug output to System.out.
- * <p>
- * May be called at any time.
- *
- * @param level NONE is no debugging at all, NORMAL traces high-level
- * construction of skeletons and type converters, and dumps results of new
- * skeletons and type converters, FINE traces everything in great detail.
- * The tracing is done with INFO-level logger calls. The logger name is
- * that package name (com.sun.org.glassfish.gmbal.impl).
- */
- void setRegistrationDebug( RegistrationDebugLevel level ) ;
-
- /** Enable generation of debug log at INFO level for runtime MBean operations
- * to the com.sun.org.glassfish.gmbal.impl logger.
- * <p>
- * May be called at any time.
- *
- * @param flag true to enable runtime debug, false to disable.
- */
- void setRuntimeDebug( boolean flag ) ;
-
- /** Enabled generation of debug log for type evaluator debugging. This
- * happens as part of the registration process for the first time a particular
- * class is processed.
- * <p>
- * May be called at any time.
- *
- * @param level set to 1 to just see the results of the TypeEvaluator, >1 to
- * see lots of details. WARNING: values >1 will result in a large amount
- * of output.
- */
- void setTypelibDebug( int level ) ;
-
- /** Set debugging for JMX registrations. If true, all registrations and
- * deregistrations with the MBeanServer are traced.
- *
- * @param flag True to enalbed registration tracing.
- */
- void setJMXRegistrationDebug( boolean flag ) ;
-
- /** Dump the skeleton used in the implementation of the MBean for obj.
- * Obj must be currently registered.
- * <p>
- * Must be called after a successful call to a createRoot method.
- *
- * @param obj The registered object whose skeleton should be displayed.
- * @return The string representation of the skeleton.
- */
- String dumpSkeleton( Object obj ) ;
-
- /** Suppress reporting of a duplicate root name. If this option is enabled,
- * createRoot( Object ) and createRoot( Object, String ) will return null
- * for a duplicate root name, otherwise a Gmbal error will be reported.
- * Note that this applies ONLY to createRoot: the register methods are
- * unaffected. Also note that any other errors that might occur on
- * createRoot will be reported normally.
- * <p>
- * Must be called before a successful call to a createRoot method.
- */
- void suppressDuplicateRootReport( boolean suppressReport ) ;
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObjectManagerFactory.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObjectManagerFactory.java
deleted file mode 100644
index 6e44d358..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObjectManagerFactory.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal ;
-
-import java.lang.reflect.Method ;
-
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import com.sun.org.glassfish.gmbal.util.GenericConstructor ;
-
-import javax.management.ObjectName;
-
-/** Factory used to create ManagedObjectManager instances.
- */
-public final class ManagedObjectManagerFactory {
- private ManagedObjectManagerFactory() {}
-
- private static GenericConstructor<ManagedObjectManager> objectNameCons =
- new GenericConstructor<ManagedObjectManager>(
- ManagedObjectManager.class,
- "com.sun.org.glassfish.gmbal.impl.ManagedObjectManagerImpl",
- ObjectName.class ) ;
-
-
- private static GenericConstructor<ManagedObjectManager> stringCons =
- new GenericConstructor<ManagedObjectManager>(
- ManagedObjectManager.class,
- "com.sun.org.glassfish.gmbal.impl.ManagedObjectManagerImpl",
- String.class ) ;
-
- /** Convenience method for getting access to a method through reflection.
- * Same as Class.getDeclaredMethod, but only throws RuntimeExceptions.
- * @param cls The class to search for a method.
- * @param name The method name.
- * @param types The array of argument types.
- * @return The Method if found.
- * @throws GmbalException if no such method is found.
- */
- public static Method getMethod( final Class<?> cls, final String name,
- final Class<?>... types ) {
-
- try {
- return AccessController.doPrivileged(
- new PrivilegedExceptionAction<Method>() {
- public Method run() throws Exception {
- return cls.getDeclaredMethod(name, types);
- }
- });
- } catch (PrivilegedActionException ex) {
- throw new GmbalException( "Unexpected exception", ex ) ;
- } catch (SecurityException exc) {
- throw new GmbalException( "Unexpected exception", exc ) ;
- }
- }
-
- /** Create a new ManagedObjectManager. All objectnames created will share
- * the domain value passed on this call. This ManagedObjectManager is
- * at the top of the containment hierarchy: the parent of the root is null.
- * @param domain The domain to use for all ObjectNames created when
- * MBeans are registered.
- * @return A new ManagedObjectManager.
- */
- public static ManagedObjectManager createStandalone(
- final String domain ) {
-
- ManagedObjectManager result = stringCons.create( domain ) ;
- if (result == null) {
- return ManagedObjectManagerNOPImpl.self ;
- } else {
- return result ;
- }
- }
-
- /** Alternative form of the create method to be used when the
- * rootName is not needed explicitly. If the root name is available
- * from an @ObjectNameKey annotation, it is used; otherwise the
- * type is used as the name, since the root is a singleton.
- *
- * @param rootParentName The JMX ObjectName of the parent of the root.
- * The parent is outside of the control of this ManagedObjectManager.
- * The ManagedObjectManager root is a child of the MBean identified
- * by the rootParentName.
- * @return The ManagedObjectManager.
- */
- public static ManagedObjectManager createFederated(
- final ObjectName rootParentName ) {
-
- ManagedObjectManager result = objectNameCons.create( rootParentName ) ;
- if (result == null) {
- return ManagedObjectManagerNOPImpl.self ;
- } else {
- return result ;
- }
- }
-
- /** Return a ManagedObjectManager that performs no operations. Useful to
- * allow the same code to run with or without creating MBeans through
- * gmbal.
- * @return ManagedObjectManager that performs no operations.
- */
- public static ManagedObjectManager createNOOP() {
- return ManagedObjectManagerNOPImpl.self ;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObjectManagerNOPImpl.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObjectManagerNOPImpl.java
deleted file mode 100644
index aad7196a..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedObjectManagerNOPImpl.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-package com.sun.org.glassfish.gmbal;
-
-import java.io.IOException;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
-import java.util.ResourceBundle;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-/** NOP impl of ManagedObjectManager used when annotations and ManagedObjectManager
- * are needed, but MBeans are not. This allows using gmbal to optionally support
- * MBeans. This is the implementation of the ManagedObjectManager that is used when
- * the full implementation is not available.
- *
- * @author ken_admin
- */
-class ManagedObjectManagerNOPImpl implements ManagedObjectManager {
- static final ManagedObjectManager self =
- new ManagedObjectManagerNOPImpl() ;
- private static final GmbalMBean gmb =
- new GmbalMBeanNOPImpl() ;
-
- private ManagedObjectManagerNOPImpl() {}
-
- public void suspendJMXRegistration() {
- // NOP
- }
-
- public void resumeJMXRegistration() {
- // NOP
- }
-
- public boolean isManagedObject( Object obj ) {
- return false ;
- }
-
- public GmbalMBean createRoot() {
- return gmb ;
- }
-
- public GmbalMBean createRoot(Object root) {
- return gmb ;
- }
-
- public GmbalMBean createRoot(Object root, String name) {
- return gmb ;
- }
-
- public Object getRoot() {
- return null ;
- }
-
- public GmbalMBean register(Object parent, Object obj, String name) {
- return gmb ;
- }
-
- public GmbalMBean register(Object parent, Object obj) {
- return gmb ;
- }
-
- public GmbalMBean registerAtRoot(Object obj, String name) {
- return gmb ;
- }
-
- public GmbalMBean registerAtRoot(Object obj) {
- return gmb ;
- }
-
- public void unregister(Object obj) {
- // NOP
- }
-
- public ObjectName getObjectName(Object obj) {
- return null ;
- }
-
- public Object getObject(ObjectName oname) {
- return null ;
- }
-
- public void stripPrefix(String... str) {
- // NOP
- }
-
- public String getDomain() {
- return null ;
- }
-
- public void setMBeanServer(MBeanServer server) {
- // NOP
- }
-
- public MBeanServer getMBeanServer() {
- return null ;
- }
-
- public void setResourceBundle(ResourceBundle rb) {
- // NOP
- }
-
- public ResourceBundle getResourceBundle() {
- return null ;
- }
-
- public void addAnnotation(AnnotatedElement element, Annotation annotation) {
- // NOP
- }
-
- public void setRegistrationDebug(RegistrationDebugLevel level) {
- // NOP
- }
-
- public void setRuntimeDebug(boolean flag) {
- // NOP
- }
-
- public String dumpSkeleton(Object obj) {
- return "" ;
- }
-
- public void close() throws IOException {
- // NOP
- }
-
- public void setTypelibDebug(int level) {
- // NOP
- }
-
- public void stripPackagePrefix() {
- // NOP
- }
-
- public void suppressDuplicateRootReport(boolean suppressReport) {
- // NOP
- }
-
- public AMXClient getAMXClient(Object obj) {
- return null ;
- }
-
- public void setJMXRegistrationDebug(boolean flag) {
- // NOP
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedOperation.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedOperation.java
deleted file mode 100644
index bbfcbbb2..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ManagedOperation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal ;
-
-import java.lang.annotation.Documented ;
-import java.lang.annotation.Target ;
-import java.lang.annotation.ElementType ;
-import java.lang.annotation.Retention ;
-import java.lang.annotation.RetentionPolicy ;
-
-/** This annotation defines an attribute in open MBean (ManagedObject).
- */
-@Documented
-@Target(ElementType.METHOD)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ManagedOperation {
- /** The id of the operation. Defaults to the method name.
- */
- String id() default "" ;
-
- Impact impact() default Impact.UNKNOWN ;
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/NameValue.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/NameValue.java
deleted file mode 100644
index f91008ed..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/NameValue.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal ;
-
-import java.lang.annotation.Documented ;
-import java.lang.annotation.Target ;
-import java.lang.annotation.ElementType ;
-import java.lang.annotation.Retention ;
-import java.lang.annotation.RetentionPolicy ;
-
-/** This annotation is applied to a method that takes no arguments and returns a value
- * that is converted into a String for use in the ObjectName when an instance of the enclosing
- * class is used to construct an open MBean.
- */
-@Documented
-@Target( { ElementType.METHOD, ElementType.FIELD } )
-@Retention(RetentionPolicy.RUNTIME)
-public @interface NameValue {
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ParameterNames.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ParameterNames.java
deleted file mode 100644
index 9cd3d4da..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/ParameterNames.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal ;
-
-import java.lang.annotation.Documented ;
-import java.lang.annotation.Target ;
-import java.lang.annotation.ElementType ;
-import java.lang.annotation.Retention ;
-import java.lang.annotation.RetentionPolicy ;
-
-/** This annotation is applied to a method that represents an MBean operation.
- * It defines the names of the parameters of the operation. It must contain
- * as many arguments as there are parameters in the annotated method.
- */
-@Documented
-@Target(ElementType.METHOD)
-@Retention(RetentionPolicy.RUNTIME)
-/**
- *
- * @author ken
- */
-public @interface ParameterNames {
- String[] value() default {} ;
-}
diff --git a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/util/GenericConstructor.java b/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/util/GenericConstructor.java
deleted file mode 100644
index 38fdb385..00000000
--- a/src/share/jaxws_classes/com/sun/org/glassfish/gmbal/util/GenericConstructor.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.glassfish.gmbal.util;
-
-import java.lang.reflect.Constructor ;
-import java.security.AccessController;
-import java.security.PrivilegedExceptionAction;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/** Class that allows any class to be instantiated via any accessible constructor.
- * Really a short hand to avoid writing a bunch of reflective code.
- */
-public class GenericConstructor<T> {
- private final Object lock = new Object() ;
-
- private String typeName ;
- private Class<T> resultType ;
- private Class<?> type ;
- private Class<?>[] signature ;
-
- // Use the raw type of the constructor here, because
- // MethodInfo can only return a raw type for a constructor.
- // It is not possible to have MethodInfo return a
- // Constructor<T> because T may not be known at compile time.
- private Constructor constructor ;
-
- /** Create a generic of type T for the untyped class cls.
- * Generally cls is a class that has been generated and loaded, so
- * no compiled code can depend on the class directly. However, the
- * generated class probably implements some interface T, represented
- * here by Class<T>.
- * @param type The expected type of a create call.
- * @param className The name of the class to use for a constructor.
- * @param signature The signature of the desired constructor.
- * @throws IllegalArgumentException if cls is not a subclass of type.
- */
- public GenericConstructor( final Class<T> type, final String className,
- final Class<?>... signature ) {
- this.resultType = type ;
- this.typeName = className ;
- this.signature = signature.clone() ;
- }
-
- @SuppressWarnings("unchecked")
- private void getConstructor() {
- synchronized( lock ) {
- if ((type == null) || (constructor == null)) {
- try {
- type = (Class<T>)Class.forName( typeName ) ;
- constructor = AccessController.doPrivileged(
- new PrivilegedExceptionAction<Constructor>() {
- public Constructor run() throws Exception {
- synchronized( lock ) {
- return type.getDeclaredConstructor( signature ) ;
- }
- }
- } ) ;
- } catch (Exception exc) {
- // Catch all for several checked exceptions: ignore findbugs
- Logger.getLogger( "com.sun.org.glassfish.gmbal.util" ).log( Level.FINE,
- "Failure in getConstructor", exc ) ;
- }
- }
- }
- }
-
- /** Create an instance of type T using the constructor that
- * matches the given arguments if possible. The constructor
- * is cached, so an instance of GenericClass should always be
- * used for the same types of arguments. If a call fails,
- * a check is made to see if a different constructor could
- * be used.
- * @param args The constructor arguments.
- * @return A new instance of the object.
- */
- public synchronized T create( Object... args ) {
- synchronized(lock) {
- T result = null ;
-
- for (int ctr=0; ctr<=1; ctr++) {
- getConstructor() ;
- if (constructor == null) {
- break ;
- }
-
- try {
- result = resultType.cast( constructor.newInstance( args ) ) ;
- break ;
- } catch (Exception exc) {
- // There are 4 checked exceptions here with identical handling.
- // Ignore FindBugs complaints.
- constructor = null ;
- Logger.getLogger("com.sun.org.glassfish.gmbal.util").
- log(Level.WARNING, "Error invoking constructor", exc );
- }
- }
-
- return result ;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin b/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin
deleted file mode 100644
index 7b619967..00000000
--- a/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin
+++ /dev/null
@@ -1 +0,0 @@
-com.sun.tools.internal.ws.wscompile.plugin.at_generated.PluginImpl
diff --git a/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin b/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin
deleted file mode 100644
index ac63b198..00000000
--- a/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin
+++ /dev/null
@@ -1,6 +0,0 @@
-com.sun.tools.internal.xjc.addon.code_injector.PluginImpl
-com.sun.tools.internal.xjc.addon.locator.SourceLocationAddOn
-com.sun.tools.internal.xjc.addon.sync.SynchronizedMethodAddOn
-com.sun.tools.internal.xjc.addon.at_generated.PluginImpl
-com.sun.tools.internal.xjc.addon.episode.PluginImpl
-com.sun.tools.internal.xjc.addon.accessors.PluginImpl
diff --git a/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.xml.internal.ws.spi.db.BindingContextFactory b/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.xml.internal.ws.spi.db.BindingContextFactory
deleted file mode 100644
index 36ea2a98..00000000
--- a/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.xml.internal.ws.spi.db.BindingContextFactory
+++ /dev/null
@@ -1,2 +0,0 @@
-com.sun.xml.internal.ws.db.glassfish.JAXBRIContextFactory
-# com.sun.xml.internal.ws.db.toplink.JAXBContextFactory
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ConfigReader.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ConfigReader.java
deleted file mode 100644
index 5b7834dd..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ConfigReader.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc;
-
-import com.sun.tools.internal.jxc.ap.Options;
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.Result;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.validation.ValidatorHandler;
-
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.lang.model.element.TypeElement;
-import com.sun.tools.internal.jxc.gen.config.Config;
-import com.sun.tools.internal.jxc.gen.config.Schema;
-import com.sun.tools.internal.xjc.SchemaCache;
-import com.sun.tools.internal.xjc.api.Reference;
-import com.sun.tools.internal.xjc.util.ForkContentHandler;
-
-import com.sun.xml.internal.bind.v2.util.XmlFactory;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-
-/**
- * This reads the config files passed by the user to annotation processing
- * and obtains a list of classes that need to be included
- * for a particular config from the set of classes passed
- * by the user to annotation processing.
- *
- * @author Bhakti Mehta (bhakti.mehta@sun.com)
- */
-public final class ConfigReader {
-
- /**
- * The set of classes to be passed to XJC
- *
- */
- private final Set<Reference> classesToBeIncluded = new HashSet<Reference>();
-
-
- /**
- * The SchemaOutputResolver used to generate the schemas
- */
- private final SchemaOutputResolver schemaOutputResolver;
-
- private final ProcessingEnvironment env;
-
- /**
- *
- * @param classes
- * The set of classes passed to the AnnotationProcessor
- * @param xmlFile
- * The configuration file.
- * @throws SAXException
- * If this is thrown, the error has already been reported.
- * @throws IOException
- * If any IO errors occur.
- */
- public ConfigReader(ProcessingEnvironment env, Collection<? extends TypeElement> classes, File xmlFile, ErrorHandler errorHandler) throws SAXException, IOException {
- this.env = env;
- Config config = parseAndGetConfig(xmlFile, errorHandler, env.getOptions().containsKey(Options.DISABLE_XML_SECURITY));
- checkAllClasses(config,classes);
- String path = xmlFile.getAbsolutePath();
- String xmlPath = path.substring(0,path.lastIndexOf(File.separatorChar));
- schemaOutputResolver = createSchemaOutputResolver(config,xmlPath);
-
- }
-
-
- /**
- * This creates a regular expression
- * for the user pattern , matches the input classes
- * passed by the user and returns the final
- * list of classes that need to be included for a config file
- * after applying those patterns
- *
- */
- public Collection<Reference> getClassesToBeIncluded() {
- return classesToBeIncluded;
- }
-
- private void checkAllClasses(Config config, Collection<? extends TypeElement> rootClasses) {
-
- List<Pattern> includeRegexList = config.getClasses().getIncludes();
- List<Pattern> excludeRegexList = config.getClasses().getExcludes();
-
- OUTER:
- for (TypeElement typeDecl : rootClasses) {
-
- String qualifiedName = typeDecl.getQualifiedName().toString();
-
- for (Pattern pattern : excludeRegexList) {
- boolean match = checkPatternMatch(qualifiedName, pattern);
- if (match)
- continue OUTER; // excluded
- }
-
- for (Pattern pattern : includeRegexList) {
- boolean match = checkPatternMatch(qualifiedName, pattern);
- if (match) {
- classesToBeIncluded.add(new Reference(typeDecl,env));
- break;
- }
- }
- }
- }
-
- /**
- * This returns the SchemaOutputResolver to generate the schemas
- */
- public SchemaOutputResolver getSchemaOutputResolver(){
- return schemaOutputResolver;
- }
-
- private SchemaOutputResolver createSchemaOutputResolver(Config config, String xmlpath) {
- File baseDir = new File(xmlpath, config.getBaseDir().getPath());
- SchemaOutputResolverImpl outResolver = new SchemaOutputResolverImpl (baseDir);
-
- for( Schema schema : (List<Schema>)config.getSchema() ) {
- String namespace = schema.getNamespace();
- File location = schema.getLocation();
- outResolver.addSchemaInfo(namespace,location);
- }
- return outResolver;
- }
-
- /**
- * This will check if the qualified name matches the pattern
- *
- * @param qualifiedName
- * The qualified name of the TypeDeclaration
- * @param pattern
- * The pattern obtained from the users input
- *
- */
- private boolean checkPatternMatch(String qualifiedName, Pattern pattern) {
- Matcher matcher = pattern.matcher(qualifiedName);
- return matcher.matches();
- }
-
-
-
- /**
- * Lazily parsed schema for the binding file.
- */
- private static SchemaCache configSchema = new SchemaCache(Config.class.getResource("config.xsd"));
-
-
- /**
- * Parses an xml config file and returns a Config object.
- *
- * @param xmlFile
- * The xml config file which is passed by the user to annotation processing
- * @return
- * A non null Config object
- */
- private Config parseAndGetConfig (File xmlFile, ErrorHandler errorHandler, boolean disableSecureProcessing) throws SAXException, IOException {
- XMLReader reader;
- try {
- SAXParserFactory factory = XmlFactory.createParserFactory(disableSecureProcessing);
- reader = factory.newSAXParser().getXMLReader();
- } catch (ParserConfigurationException e) {
- // in practice this will never happen
- throw new Error(e);
- }
- NGCCRuntimeEx runtime = new NGCCRuntimeEx(errorHandler);
-
- // set up validator
- ValidatorHandler validator = configSchema.newValidator();
- validator.setErrorHandler(errorHandler);
-
- // the validator will receive events first, then the parser.
- reader.setContentHandler(new ForkContentHandler(validator,runtime));
-
- reader.setErrorHandler(errorHandler);
- Config config = new Config(runtime);
- runtime.setRootHandler(config);
- reader.parse(new InputSource(xmlFile.toURL().toExternalForm()));
- runtime.reset();
-
- return config;
- }
- /**
- * Controls where the JAXB RI puts the generates
- * schema files.
- * @author
- * Bhakti Mehta (bhakti.mehta@sun.com)
- */
- private static final class SchemaOutputResolverImpl extends SchemaOutputResolver{
-
- /**
- * Directory to which we put the rest of the files.
- * Never be null.
- */
- private final File baseDir;
-
- /**
- * Namespace URI to the location of the schema.
- * This captures what the user specifies.
- */
- private final Map<String,File> schemas = new HashMap<String,File>();
-
-
- /**
- * Decides where the schema file (of the given namespace URI)
- * will be written, and return it as a {@link Result} object.
- *
- */
- public Result createOutput( String namespaceUri, String suggestedFileName ) {
-
- // the user's preference takes a precedence
- if(schemas.containsKey(namespaceUri)) {
- File loc = schemas.get(namespaceUri);
- if(loc==null) return null; // specifically not to generate a schema
-
- // create directories if necessary. we've already checked that the baseDir
- // exists, so this should be no surprise to users.
- loc.getParentFile().mkdirs();
-
- return new StreamResult(loc); // generate into a file the user specified.
- }
-
- // if the user didn't say anything about this namespace,
- // generate it into the default directory with a default name.
-
- File schemaFile = new File (baseDir, suggestedFileName);
- // The systemId for the result will be schemaFile
- return new StreamResult(schemaFile);
- }
-
-
- public SchemaOutputResolverImpl(File baseDir) {
- assert baseDir!=null;
- this.baseDir = baseDir;
- }
-
- public void addSchemaInfo(String namespaceUri, File location) {
- if (namespaceUri == null )
- //generate elements in no namespace
- namespaceUri = "";
- schemas.put(namespaceUri, location);
-
- }
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties
deleted file mode 100644
index a21b4dee..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNEXPECTED_NGCC_TOKEN = \
- Unexpected {0} appears at line {1} column {2}
-
-BASEDIR_DOESNT_EXIST = \
- Non-existent directory: {0}
-
-VERSION = \
- schemagen 2.2.8-b130911.1802
-
-FULLVERSION = \
- schemagen full version "2.2.8-b130911.1802"
-
-USAGE = \
-Usage: schemagen [-options ...] <java files> \n\
-Options: \n\
-\ \ \ \ -d <path> : specify where to place processor and javac generated class files\n\
-\ \ \ \ -cp <path> : specify where to find user specified files\n\
-\ \ \ \ -classpath <path> : specify where to find user specified files\n\
-\ \ \ \ -encoding <encoding> : specify encoding to be used for annotation processing/javac invocation \n\
-\ \ \ \ -episode <file> : generate episode file for separate compilation\n\
-\ \ \ \ -disableXmlSecurity : disables XML security features for usage on xml parsing apis \n\
-\ \ \ \ -version : display version information\n\
-\ \ \ \ -fullversion : display full version information\n\
-\ \ \ \ -help : display this usage message
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties
deleted file mode 100644
index 11c7bb70..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNEXPECTED_NGCC_TOKEN = Nicht erkanntes {0} in Zeile {1} Spalte {2}
-
-BASEDIR_DOESNT_EXIST = Nicht vorhandenes Verzeichnis: {0}
-
-VERSION = schemagen 2.2.8-b130911.1802
-
-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
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties
deleted file mode 100644
index c85d08ea..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNEXPECTED_NGCC_TOKEN = Aparece un {0} inesperado en la l\u00EDnea {1} y la columna {2}
-
-BASEDIR_DOESNT_EXIST = Directorio no existente: {0}
-
-VERSION = schemagen 2.2.8-b130911.1802
-
-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
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties
deleted file mode 100644
index 2dd5246c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNEXPECTED_NGCC_TOKEN = Un \u00E9l\u00E9ment {0} inattendu appara\u00EEt \u00E0 la ligne {1}, colonne {2}
-
-BASEDIR_DOESNT_EXIST = R\u00E9pertoire {0} inexistant
-
-VERSION = schemagen 2.2.8-b130911.1802
-
-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
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties
deleted file mode 100644
index 98ea9f37..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNEXPECTED_NGCC_TOKEN = {0} imprevisto visualizzato sulla riga {1} colonna {2}
-
-BASEDIR_DOESNT_EXIST = Directory non esistente: {0}
-
-VERSION = schemagen 2.2.8-b130911.1802
-
-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
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties
deleted file mode 100644
index 365b689b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNEXPECTED_NGCC_TOKEN = \u4E88\u671F\u3057\u306A\u3044{0}\u304C\u884C{1}\u3001\u5217{2}\u306B\u3042\u308A\u307E\u3059
-
-BASEDIR_DOESNT_EXIST = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0}
-
-VERSION = schemagen 2.2.8-b130911.1802
-
-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
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties
deleted file mode 100644
index 1261644c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNEXPECTED_NGCC_TOKEN = \uC608\uC0C1\uCE58 \uC54A\uC740 {0}\uC774(\uAC00) {1}\uD589 {2}\uC5F4\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.
-
-BASEDIR_DOESNT_EXIST = \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uB514\uB809\uD1A0\uB9AC: {0}
-
-VERSION = schemagen 2.2.8-b130911.1802
-
-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.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties
deleted file mode 100644
index 006fbbc9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-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-b130911.1802
-
-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
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties
deleted file mode 100644
index 073ba65a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNEXPECTED_NGCC_TOKEN = \u5728\u7B2C {1} \u884C, \u7B2C {2} \u5217\u51FA\u73B0\u610F\u5916\u7684{0}
-
-BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u5F55: {0}
-
-VERSION = schemagen 2.2.8-b130911.1802
-
-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
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties
deleted file mode 100644
index c7d7d5f1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNEXPECTED_NGCC_TOKEN = \u672A\u9810\u671F\u7684 {0} \u986F\u793A\u65BC\u884C {1} \u8CC7\u6599\u6B04 {2}
-
-BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u9304: {0}
-
-VERSION = schemagen 2.2.8-b130911.1802
-
-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
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/Messages.java
deleted file mode 100644
index f8c3e1a9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/Messages.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Message resources.
- *
- * @author Kohsuke Kawaguchi
- */
-enum Messages {
- // Accessor
- UNEXPECTED_NGCC_TOKEN, // 3 args
- BASEDIR_DOESNT_EXIST, // 1 arg
- USAGE, //0 args
- FULLVERSION, // 0 args
- VERSION, // 0 args
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getPackage().getName() +".MessageBundle");
-
- @Override
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/NGCCRuntimeEx.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/NGCCRuntimeEx.java
deleted file mode 100644
index ffc3b147..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/NGCCRuntimeEx.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Pattern;
-
-import com.sun.tools.internal.jxc.gen.config.NGCCRuntime;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-
-/**
- * Controls the validating and converting of values obtained
- * from the config file.
- *
- * @author
- * Bhakti Mehta (bhakti.mehta@sun.com)
- */
-public final class NGCCRuntimeEx extends NGCCRuntime {
- /**
- * All the errors shall be sent to this object.
- */
- private final ErrorHandler errorHandler;
-
- public NGCCRuntimeEx(ErrorHandler errorHandler) {
- this.errorHandler = errorHandler;
- }
-
- /**
- * This will check if the baseDir provided by the user
- * in the config file exists. If not it throws an error
- * @param baseDir
- * The baseDir attribute passed by the user in the xml config file as a path
- * @return
- * The file representation of the path name
- */
- public File getBaseDir(String baseDir) throws SAXException {
- File dir = new File(baseDir);
- if (dir.exists()) {
- return dir;
- } else {
- SAXParseException e = new SAXParseException(
- Messages.BASEDIR_DOESNT_EXIST.format(dir.getAbsolutePath()),
- getLocator());
- errorHandler.error(e);
- throw e; // we can't recover from this error
- }
- }
-
- /**
- * This takes the include list provided by the user in the config file
- * It converts the user values to {@link Pattern}
- * @param includeContent
- * The include list specified by the user
- * @return
- * A list of regular expression patterns {@link Pattern}
- */
- public List<Pattern> getIncludePatterns(List<String> includeContent ) {
- List<Pattern> includeRegexList = new ArrayList<Pattern>();
- for (String includes : includeContent) {
- String regex = convertToRegex(includes);
- Pattern pattern = Pattern.compile(regex);
- includeRegexList.add(pattern);
- }
- return includeRegexList;
- }
-
-
- /**
- * This takes the exclude list provided by the user in the config file
- * It converts the user values to {@link Pattern}
- * @param excludeContent
- * The exclude list specified by the user
- * @return
- * A list of regular expression patterns {@link Pattern}
- */
- public List getExcludePatterns(List<String> excludeContent ) {
- List<Pattern> excludeRegexList = new ArrayList<Pattern>();
- for (String excludes : excludeContent) {
- String regex = convertToRegex(excludes);
- Pattern pattern = Pattern.compile(regex);
- excludeRegexList.add(pattern);
- }
- return excludeRegexList;
- }
-
-
- /**
- * This will tokenize the pattern and convert it into a regular expression
- * @param pattern
- */
- private String convertToRegex(String pattern) {
- StringBuilder regex = new StringBuilder();
- char nc = ' ';
- if (pattern.length() >0 ) {
-
- for ( int i = 0 ; i < pattern.length(); i ++ ) {
- char c = pattern.charAt(i);
- nc = ' ';
- if ((i +1) != pattern.length()) {
- nc = pattern.charAt(i +1);
- }
- //escape single '.'
- if (c == '.' && nc != '.'){
- regex.append('\\');
- regex.append('.');
- //do not allow patterns like a..b
- } else if (c == '.'){
- continue;
- // "**" gets replaced by ".*"
- } else if ((c=='*') && (nc == '*')) {
- regex.append(".*");
- break;
- //'*' replaced by anything but '.' i.e [^\\.]+
- } else if (c=='*') {
- regex.append("[^\\.]+");
- continue;
- //'?' replaced by anything but '.' i.e [^\\.]
- } else if (c=='?') {
- regex.append("[^\\.]");
- //else leave the chars as they occur in the pattern
- } else
- regex.append(c);
- }
-
- }
-
- return regex.toString();
- }
-
- protected void unexpectedX(String token) throws SAXException {
- errorHandler.error(
- new SAXParseException(Messages.UNEXPECTED_NGCC_TOKEN.format(
- token, getLocator().getLineNumber(), getLocator().getColumnNumber()),
- getLocator()));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGenerator.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGenerator.java
deleted file mode 100644
index f1f675e2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGenerator.java
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.jxc;
-
-import com.sun.tools.internal.jxc.ap.Options;
-import com.sun.tools.internal.xjc.BadCommandLineException;
-import com.sun.xml.internal.bind.util.Which;
-
-import javax.lang.model.SourceVersion;
-import javax.tools.Diagnostic;
-import javax.tools.DiagnosticCollector;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaFileObject;
-import javax.tools.OptionChecker;
-import javax.tools.StandardJavaFileManager;
-import javax.tools.ToolProvider;
-import javax.xml.bind.JAXBContext;
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * CLI entry-point to the schema generator.
- *
- * @author Bhakti Mehta
- */
-public class SchemaGenerator {
- /**
- * Runs the schema generator.
- */
- public static void main(String[] args) throws Exception {
- System.exit(run(args));
- }
-
- public static int run(String[] args) throws Exception {
- try {
- ClassLoader cl = SecureLoader.getClassClassLoader(SchemaGenerator.class);
- if (cl==null) {
- cl = SecureLoader.getSystemClassLoader();
- }
- return run(args, cl);
- } catch(Exception e) {
- System.err.println(e.getMessage());
- return -1;
- }
- }
-
- /**
- * Runs the schema generator.
- *
- * @param classLoader
- * the schema generator will run in this classLoader.
- * It needs to be able to load annotation processing and JAXB RI classes. Note that
- * JAXB RI classes refer to annotation processing classes. Must not be null.
- *
- * @return
- * exit code. 0 if success.
- *
- */
- public static int run(String[] args, ClassLoader classLoader) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
- final Options options = new Options();
- if (args.length ==0) {
- usage();
- return -1;
- }
- for (String arg : args) {
- if (arg.equals("-help")) {
- usage();
- return -1;
- }
-
- if (arg.equals("-version")) {
- System.out.println(Messages.VERSION.format());
- return -1;
- }
-
- if (arg.equals("-fullversion")) {
- System.out.println(Messages.FULLVERSION.format());
- return -1;
- }
-
- }
-
- try {
- options.parseArguments(args);
- } catch (BadCommandLineException e) {
- // there was an error in the command line.
- // print usage and abort.
- System.out.println(e.getMessage());
- System.out.println();
- usage();
- return -1;
- }
-
- Class schemagenRunner = classLoader.loadClass(Runner.class.getName());
- Method compileMethod = schemagenRunner.getDeclaredMethod("compile",String[].class,File.class);
-
- List<String> aptargs = new ArrayList<String>();
-
- if (options.encoding != null) {
- aptargs.add("-encoding");
- aptargs.add(options.encoding);
- }
-
- aptargs.add("-cp");
- aptargs.add(setClasspath(options.classpath)); // set original classpath + jaxb-api to be visible to annotation processor
-
- if(options.targetDir!=null) {
- aptargs.add("-d");
- aptargs.add(options.targetDir.getPath());
- }
-
- aptargs.addAll(options.arguments);
-
- String[] argsarray = aptargs.toArray(new String[aptargs.size()]);
- return ((Boolean) compileMethod.invoke(null, argsarray, options.episodeFile)) ? 0 : 1;
- }
-
- private static String setClasspath(String givenClasspath) {
- StringBuilder cp = new StringBuilder();
- appendPath(cp, givenClasspath);
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- while (cl != null) {
- if (cl instanceof URLClassLoader) {
- for (URL url : ((URLClassLoader) cl).getURLs()) {
- appendPath(cp, url.getPath());
- }
- }
- cl = cl.getParent();
- }
-
- appendPath(cp, findJaxbApiJar());
- return cp.toString();
- }
-
- private static void appendPath(StringBuilder cp, String url) {
- if (url == null || url.trim().isEmpty())
- return;
- if (cp.length() != 0)
- cp.append(File.pathSeparatorChar);
- cp.append(url);
- }
-
- /**
- * Computes the file system path of <tt>jaxb-api.jar</tt> so that
- * Annotation Processing will see them in the <tt>-cp</tt> option.
- *
- * <p>
- * In Java, you can't do this reliably (for that matter there's no guarantee
- * that such a jar file exists, such as in Glassfish), so we do the best we can.
- *
- * @return
- * null if failed to locate it.
- */
- private static String findJaxbApiJar() {
- String url = Which.which(JAXBContext.class);
- if(url==null) return null; // impossible, but hey, let's be defensive
-
- if(!url.startsWith("jar:") || url.lastIndexOf('!')==-1)
- // no jar file
- return null;
-
- String jarFileUrl = url.substring(4,url.lastIndexOf('!'));
- if(!jarFileUrl.startsWith("file:"))
- return null; // not from file system
-
- try {
- File f = new File(new URL(jarFileUrl).toURI());
- if (f.exists() && f.getName().endsWith(".jar")) { // see 6510966
- return f.getPath();
- }
- f = new File(new URL(jarFileUrl).getFile());
- if (f.exists() && f.getName().endsWith(".jar")) { // this is here for potential backw. compatibility issues
- return f.getPath();
- }
- } catch (URISyntaxException ex) {
- Logger.getLogger(SchemaGenerator.class.getName()).log(Level.SEVERE, null, ex);
- } catch (MalformedURLException ex) {
- Logger.getLogger(SchemaGenerator.class.getName()).log(Level.SEVERE, null, ex);
- }
- return null;
- }
-
- private static void usage( ) {
- System.out.println(Messages.USAGE.format());
- }
-
- public static final class Runner {
- public static boolean compile(String[] args, File episode) throws Exception {
-
- JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
- DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
- StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null);
- JavacOptions options = JavacOptions.parse(compiler, fileManager, args);
- List<String> unrecognizedOptions = options.getUnrecognizedOptions();
- if (!unrecognizedOptions.isEmpty())
- Logger.getLogger(SchemaGenerator.class.getName()).log(Level.WARNING, "Unrecognized options found: {0}", unrecognizedOptions);
- Iterable<? extends JavaFileObject> compilationUnits = fileManager.getJavaFileObjectsFromFiles(options.getFiles());
- JavaCompiler.CompilationTask task = compiler.getTask(
- null,
- fileManager,
- diagnostics,
- options.getRecognizedOptions(),
- options.getClassNames(),
- compilationUnits);
- com.sun.tools.internal.jxc.ap.SchemaGenerator r = new com.sun.tools.internal.jxc.ap.SchemaGenerator();
- if (episode != null)
- r.setEpisodeFile(episode);
- task.setProcessors(Collections.singleton(r));
- boolean res = task.call();
- //Print messages generated by compiler
- for (Diagnostic<? extends JavaFileObject> d : diagnostics.getDiagnostics()) {
- System.err.println(d.toString());
- }
- return res;
- }
- }
-
- /**
- * @author Peter von der Ahe
- */
- private static final class JavacOptions {
- private final List<String> recognizedOptions;
- private final List<String> classNames;
- private final List<File> files;
- private final List<String> unrecognizedOptions;
-
- private JavacOptions(List<String> recognizedOptions, List<String> classNames, List<File> files,
- List<String> unrecognizedOptions) {
- this.recognizedOptions = recognizedOptions;
- this.classNames = classNames;
- this.files = files;
- this.unrecognizedOptions = unrecognizedOptions;
- }
-
- public static JavacOptions parse(OptionChecker primary, OptionChecker secondary, String... arguments) {
- List<String> recognizedOptions = new ArrayList<String>();
- List<String> unrecognizedOptions = new ArrayList<String>();
- List<String> classNames = new ArrayList<String>();
- List<File> files = new ArrayList<File>();
- for (int i = 0; i < arguments.length; i++) {
- String argument = arguments[i];
- int optionCount = primary.isSupportedOption(argument);
- if (optionCount < 0) {
- optionCount = secondary.isSupportedOption(argument);
- }
- if (optionCount < 0) {
- File file = new File(argument);
- if (file.exists())
- files.add(file);
- else if (SourceVersion.isName(argument))
- classNames.add(argument);
- else
- unrecognizedOptions.add(argument);
- } else {
- for (int j = 0; j < optionCount + 1; j++) {
- int index = i + j;
- if (index == arguments.length) throw new IllegalArgumentException(argument);
- recognizedOptions.add(arguments[index]);
- }
- i += optionCount;
- }
- }
- return new JavacOptions(recognizedOptions, classNames, files, unrecognizedOptions);
- }
-
- /**
- * Returns the list of recognized options and their arguments.
- *
- * @return a list of options
- */
- public List<String> getRecognizedOptions() {
- return Collections.unmodifiableList(recognizedOptions);
- }
-
- /**
- * Returns the list of file names.
- *
- * @return a list of file names
- */
- public List<File> getFiles() {
- return Collections.unmodifiableList(files);
- }
-
- /**
- * Returns the list of class names.
- *
- * @return a list of class names
- */
- public List<String> getClassNames() {
- return Collections.unmodifiableList(classNames);
- }
-
- /**
- * Returns the list of unrecognized options.
- *
- * @return a list of unrecognized options
- */
- public List<String> getUnrecognizedOptions() {
- return Collections.unmodifiableList(unrecognizedOptions);
- }
-
- @Override
- public String toString() {
- return String.format("recognizedOptions = %s; classNames = %s; " + "files = %s; unrecognizedOptions = %s", recognizedOptions, classNames, files, unrecognizedOptions);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGeneratorFacade.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGeneratorFacade.java
deleted file mode 100644
index eeb4203f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGeneratorFacade.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-/**
- * CLI entry point to schemagen that checks for JDK 5.0
- * @author Kohsuke Kawaguchi
- */
-public class SchemaGeneratorFacade {
-
- public static void main(String[] args) throws Throwable {
- try {
- ClassLoader cl = SecureLoader.getClassClassLoader(SchemaGeneratorFacade.class);
- if(cl==null) cl = SecureLoader.getSystemClassLoader();
-
- Class driver = cl.loadClass("com.sun.tools.internal.jxc.SchemaGenerator");
- Method mainMethod = driver.getDeclaredMethod("main", new Class[]{String[].class});
- try {
- mainMethod.invoke(null,new Object[]{args});
- } catch (IllegalAccessException e) {
- throw e;
- } catch (InvocationTargetException e) {
- if(e.getTargetException()!=null)
- throw e.getTargetException();
- }
- } catch (UnsupportedClassVersionError e) {
- System.err.println("schemagen requires JDK 6.0 or later. Please download it from http://www.oracle.com/technetwork/java/javase/downloads");
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/SecureLoader.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/SecureLoader.java
deleted file mode 100644
index af9be004..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/SecureLoader.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc;
-
-/**
- * Class defined for safe calls of getClassLoader methods of any kind (context/system/class
- * classloader. This MUST be package private and defined in every package which
- * uses such invocations.
- * @author snajper
- */
-class SecureLoader {
-
- static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/AnnotationParser.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/AnnotationParser.java
deleted file mode 100644
index f933c7c3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/AnnotationParser.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.ap;
-
-import com.sun.tools.internal.jxc.ConfigReader;
-import com.sun.tools.internal.jxc.api.JXC;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.api.J2SJAXBModel;
-import com.sun.tools.internal.xjc.api.Reference;
-import org.xml.sax.SAXException;
-
-import javax.annotation.processing.AbstractProcessor;
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.annotation.processing.RoundEnvironment;
-import javax.annotation.processing.SupportedAnnotationTypes;
-import javax.annotation.processing.SupportedOptions;
-import javax.lang.model.SourceVersion;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ElementKind;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.util.ElementFilter;
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.namespace.QName;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-/**
- * This class behaves as a JAXB Annotation Processor,
- * It reads the user specified typeDeclarations
- * and the config files
- * It also reads config files
- *
- * Used in unit tests
- *
- * @author Bhakti Mehta (bhakti.mehta@sun.com)
- */
-@SupportedAnnotationTypes("javax.xml.bind.annotation.*")
-@SupportedOptions("jaxb.config")
-public final class AnnotationParser extends AbstractProcessor {
-
- private ErrorReceiver errorListener;
-
- @Override
- public void init(ProcessingEnvironment processingEnv) {
- super.init(processingEnv);
- this.processingEnv = processingEnv;
- errorListener = new ErrorReceiverImpl(
- processingEnv.getMessager(),
- processingEnv.getOptions().containsKey(Const.DEBUG_OPTION.getValue())
- );
- }
-
- @Override
- public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
- if (processingEnv.getOptions().containsKey(Const.CONFIG_FILE_OPTION.getValue())) {
- String value = processingEnv.getOptions().get(Const.CONFIG_FILE_OPTION.getValue());
-
- // For multiple config files we are following the format
- // -Aconfig=foo.config:bar.config where : is the pathSeparatorChar
- StringTokenizer st = new StringTokenizer(value, File.pathSeparator);
- if (!st.hasMoreTokens()) {
- errorListener.error(null, Messages.OPERAND_MISSING.format(Const.CONFIG_FILE_OPTION.getValue()));
- return true;
- }
-
- while (st.hasMoreTokens()) {
- File configFile = new File(st.nextToken());
- if (!configFile.exists()) {
- errorListener.error(null, Messages.NON_EXISTENT_FILE.format());
- continue;
- }
-
- try {
- Collection<TypeElement> rootElements = new ArrayList<TypeElement>();
- filterClass(rootElements, roundEnv.getRootElements());
- ConfigReader configReader = new ConfigReader(
- processingEnv,
- rootElements,
- configFile,
- errorListener
- );
-
- Collection<Reference> classesToBeIncluded = configReader.getClassesToBeIncluded();
- J2SJAXBModel model = JXC.createJavaCompiler().bind(
- classesToBeIncluded, Collections.<QName, Reference>emptyMap(), null, processingEnv);
-
- SchemaOutputResolver schemaOutputResolver = configReader.getSchemaOutputResolver();
-
- model.generateSchema(schemaOutputResolver, errorListener);
- } catch (IOException e) {
- errorListener.error(e.getMessage(), e);
- } catch (SAXException e) {
- // the error should have already been reported
- }
- }
- }
- return true;
- }
-
- private void filterClass(Collection<TypeElement> rootElements, Collection<? extends Element> elements) {
- for (Element element : elements) {
- if (element.getKind().equals(ElementKind.CLASS) || element.getKind().equals(ElementKind.INTERFACE) ||
- element.getKind().equals(ElementKind.ENUM)) {
- rootElements.add((TypeElement) element);
- filterClass(rootElements, ElementFilter.typesIn(element.getEnclosedElements()));
- }
- }
- }
-
- @Override
- public SourceVersion getSupportedSourceVersion() {
- if (SourceVersion.latest().compareTo(SourceVersion.RELEASE_6) > 0)
- return SourceVersion.valueOf("RELEASE_7");
- else
- return SourceVersion.RELEASE_6;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Const.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Const.java
deleted file mode 100644
index 2d1c95ce..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Const.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.ap;
-
-import java.io.File;
-
-/**
- * Defines constants used in the Annotation Processing driver.
- *
- * @author Kohsuke Kawaguchi
- */
-public enum Const {
-
- /**
- * Name of the annotation processing command-line option to take user-specified config files.
- * <p/>
- * <p/>
- * It can take multiple file names separately by {@link File#pathSeparator}.
- */
- CONFIG_FILE_OPTION("jaxb.config"),
-
- DEBUG_OPTION("jaxb.debug");
-
- private String value;
-
- private Const(String value) {
- this.value = value;
- }
-
- public String getValue() {
- return value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/ErrorReceiverImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/ErrorReceiverImpl.java
deleted file mode 100644
index e2f52aaa..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/ErrorReceiverImpl.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.ap;
-
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import org.xml.sax.SAXParseException;
-
-import javax.annotation.processing.Messager;
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.tools.Diagnostic;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class ErrorReceiverImpl extends ErrorReceiver {
- private final Messager messager;
- private final boolean debug;
-
- public ErrorReceiverImpl(Messager messager, boolean debug) {
- this.messager = messager;
- this.debug = debug;
- }
-
- public ErrorReceiverImpl(Messager messager) {
- this(messager,false);
- }
-
- public ErrorReceiverImpl(ProcessingEnvironment env) {
- this(env.getMessager());
- }
-
- public void error(SAXParseException exception) {
- messager.printMessage(Diagnostic.Kind.ERROR, exception.getMessage());
- messager.printMessage(Diagnostic.Kind.ERROR, getLocation(exception));
- printDetail(exception);
- }
-
- public void fatalError(SAXParseException exception) {
- messager.printMessage(Diagnostic.Kind.ERROR, exception.getMessage());
- messager.printMessage(Diagnostic.Kind.ERROR, getLocation(exception));
- printDetail(exception);
- }
-
- public void warning(SAXParseException exception) {
- messager.printMessage(Diagnostic.Kind.WARNING, exception.getMessage());
- messager.printMessage(Diagnostic.Kind.WARNING, getLocation(exception));
- printDetail(exception);
- }
-
- public void info(SAXParseException exception) {
- printDetail(exception);
- }
-
- private String getLocation(SAXParseException e) {
- // TODO: format the location information for printing
- return "";
- }
-
- private void printDetail(SAXParseException e) {
- if(debug) {
- e.printStackTrace(System.out);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/InlineAnnotationReaderImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/InlineAnnotationReaderImpl.java
deleted file mode 100644
index 7c178583..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/InlineAnnotationReaderImpl.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.ap;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-import javax.lang.model.type.MirroredTypeException;
-import javax.lang.model.type.MirroredTypesException;
-import javax.lang.model.type.TypeMirror;
-import com.sun.xml.internal.bind.v2.model.annotation.AbstractInlineAnnotationReaderImpl;
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.annotation.LocatableAnnotation;
-
-/**
- * {@link AnnotationReader} implementation that reads annotation inline from Annoation Processing.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public final class InlineAnnotationReaderImpl extends AbstractInlineAnnotationReaderImpl<TypeMirror, TypeElement, VariableElement, ExecutableElement> {
-
- /** The singleton instance. */
- public static final InlineAnnotationReaderImpl theInstance = new InlineAnnotationReaderImpl();
-
- private InlineAnnotationReaderImpl() {}
-
- public <A extends Annotation> A getClassAnnotation(Class<A> a, TypeElement clazz, Locatable srcPos) {
- return LocatableAnnotation.create(clazz.getAnnotation(a),srcPos);
- }
-
- public <A extends Annotation> A getFieldAnnotation(Class<A> a, VariableElement f, Locatable srcPos) {
- return LocatableAnnotation.create(f.getAnnotation(a),srcPos);
- }
-
- public boolean hasFieldAnnotation(Class<? extends Annotation> annotationType, VariableElement f) {
- return f.getAnnotation(annotationType)!=null;
- }
-
- public boolean hasClassAnnotation(TypeElement clazz, Class<? extends Annotation> annotationType) {
- return clazz.getAnnotation(annotationType)!=null;
- }
-
- public Annotation[] getAllFieldAnnotations(VariableElement field, Locatable srcPos) {
- return getAllAnnotations(field,srcPos);
- }
-
- public <A extends Annotation> A getMethodAnnotation(Class<A> a, ExecutableElement method, Locatable srcPos) {
- return LocatableAnnotation.create(method.getAnnotation(a),srcPos);
- }
-
- public boolean hasMethodAnnotation(Class<? extends Annotation> a, ExecutableElement method) {
- return method.getAnnotation(a)!=null;
- }
-
- public Annotation[] getAllMethodAnnotations(ExecutableElement method, Locatable srcPos) {
- return getAllAnnotations(method,srcPos);
- }
-
- /**
- * Gets all the annotations on the given declaration.
- */
- private Annotation[] getAllAnnotations(Element decl, Locatable srcPos) {
- List<Annotation> r = new ArrayList<Annotation>();
-
- for( AnnotationMirror m : decl.getAnnotationMirrors() ) {
- try {
- String fullName = ((TypeElement) m.getAnnotationType().asElement()).getQualifiedName().toString();
- Class<? extends Annotation> type =
- SecureLoader.getClassClassLoader(getClass()).loadClass(fullName).asSubclass(Annotation.class);
- Annotation annotation = decl.getAnnotation(type);
- if(annotation!=null)
- r.add( LocatableAnnotation.create(annotation,srcPos) );
- } catch (ClassNotFoundException e) {
- // just continue
- }
- }
-
- return r.toArray(new Annotation[r.size()]);
- }
-
- public <A extends Annotation> A getMethodParameterAnnotation(Class<A> a, ExecutableElement m, int paramIndex, Locatable srcPos) {
- VariableElement[] params = m.getParameters().toArray(new VariableElement[m.getParameters().size()]);
- return LocatableAnnotation.create(
- params[paramIndex].getAnnotation(a), srcPos );
- }
-
- public <A extends Annotation> A getPackageAnnotation(Class<A> a, TypeElement clazz, Locatable srcPos) {
- return LocatableAnnotation.create(clazz.getEnclosingElement().getAnnotation(a), srcPos);
- }
-
- public TypeMirror getClassValue(Annotation a, String name) {
- try {
- a.annotationType().getMethod(name).invoke(a);
- assert false;
- throw new IllegalStateException("should throw a MirroredTypeException");
- } catch (IllegalAccessException e) {
- throw new IllegalAccessError(e.getMessage());
- } catch (InvocationTargetException e) {
- if( e.getCause() instanceof MirroredTypeException ) {
- MirroredTypeException me = (MirroredTypeException)e.getCause();
- return me.getTypeMirror();
- }
- // impossible
- throw new RuntimeException(e);
- } catch (NoSuchMethodException e) {
- throw new NoSuchMethodError(e.getMessage());
- }
- }
-
- public TypeMirror[] getClassArrayValue(Annotation a, String name) {
- try {
- a.annotationType().getMethod(name).invoke(a);
- assert false;
- throw new IllegalStateException("should throw a MirroredTypesException");
- } catch (IllegalAccessException e) {
- throw new IllegalAccessError(e.getMessage());
- } catch (InvocationTargetException e) {
- if( e.getCause() instanceof MirroredTypesException ) {
- MirroredTypesException me = (MirroredTypesException)e.getCause();
- Collection<? extends TypeMirror> r = me.getTypeMirrors();
- return r.toArray(new TypeMirror[r.size()]);
- }
- // *********************** TODO: jdk6 bug. Fixed in java7
- // According to the javadocs it should throw the MirroredTypesException
- if( e.getCause() instanceof MirroredTypeException ) {
- MirroredTypeException me = (MirroredTypeException)e.getCause();
- TypeMirror tr = me.getTypeMirror();
- TypeMirror[] trArr = new TypeMirror[1];
- trArr[0] = tr;
- return trArr;
- }
- // *******************************************
- // impossible
- throw new RuntimeException(e);
- } catch (NoSuchMethodException e) {
- throw new NoSuchMethodError(e.getMessage());
- }
- }
-
- protected String fullName(ExecutableElement m) {
- return ((TypeElement) m.getEnclosingElement()).getQualifiedName().toString()+'#'+m.getSimpleName();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle.properties
deleted file mode 100644
index 175a51d3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NON_EXISTENT_FILE = \
- Directory "{0}" doesn't exist.
-
-UNRECOGNIZED_PARAMETER = \
- Unrecognized option {0} is not valid.
-
-OPERAND_MISSING = \
- Option "{0}" is missing an operand.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_de.properties
deleted file mode 100644
index 73c5fc20..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_de.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NON_EXISTENT_FILE = Verzeichnis "{0}" ist nicht vorhanden.
-
-UNRECOGNIZED_PARAMETER = Unbekannte Option {0} ist nicht g\u00FCltig.
-
-OPERAND_MISSING = In Option "{0}" fehlt ein Operand.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_es.properties
deleted file mode 100644
index ee609111..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_es.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NON_EXISTENT_FILE = El directorio "{0}" no existe.
-
-UNRECOGNIZED_PARAMETER = La opci\u00F3n no reconocida {0} no es v\u00E1lida.
-
-OPERAND_MISSING = A la opci\u00F3n "{0}" le falta un operando.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_fr.properties
deleted file mode 100644
index b190fd5e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_fr.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NON_EXISTENT_FILE = Le r\u00E9pertoire "{0}" n''existe pas.
-
-UNRECOGNIZED_PARAMETER = L''option {0} non reconnue n''est pas valide.
-
-OPERAND_MISSING = Un op\u00E9rande est manquant dans l''option "{0}".
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_it.properties
deleted file mode 100644
index 1fd311f8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_it.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NON_EXISTENT_FILE = La directory "{0}" non esiste.
-
-UNRECOGNIZED_PARAMETER = L''opzione non riconosciuta {0} non \u00E8 valida.
-
-OPERAND_MISSING = Operando mancante nell''opzione "{0}".
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ja.properties
deleted file mode 100644
index 564ccd9d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ja.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NON_EXISTENT_FILE = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA"{0}"\u304C\u5B58\u5728\u3057\u307E\u305B\u3093\u3002
-
-UNRECOGNIZED_PARAMETER = \u8A8D\u8B58\u3055\u308C\u306A\u3044\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u306F\u7121\u52B9\u3067\u3059\u3002
-
-OPERAND_MISSING = \u30AA\u30D7\u30B7\u30E7\u30F3"{0}"\u306B\u30AA\u30DA\u30E9\u30F3\u30C9\u304C\u3042\u308A\u307E\u305B\u3093\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ko.properties
deleted file mode 100644
index 69aad4b3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ko.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NON_EXISTENT_FILE = "{0}" \uB514\uB809\uD1A0\uB9AC\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-UNRECOGNIZED_PARAMETER = \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uC635\uC158 {0}\uC740(\uB294) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-
-OPERAND_MISSING = "{0}" \uC635\uC158\uC5D0 \uD53C\uC5F0\uC0B0\uC790\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_pt_BR.properties
deleted file mode 100644
index a5fde132..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_pt_BR.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NON_EXISTENT_FILE = O diret\u00F3rio "{0}" n\u00E3o existe.
-
-UNRECOGNIZED_PARAMETER = A op\u00E7\u00E3o {0} n\u00E3o reconhecida \u00E9 inv\u00E1lida.
-
-OPERAND_MISSING = A op\u00E7\u00E3o "{0}" n\u00E3o encontrou um operando.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_CN.properties
deleted file mode 100644
index 14908ab4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_CN.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NON_EXISTENT_FILE = \u76EE\u5F55 "{0}" \u4E0D\u5B58\u5728\u3002
-
-UNRECOGNIZED_PARAMETER = \u65E0\u6CD5\u8BC6\u522B\u7684\u9009\u9879{0}, \u8BE5\u9009\u9879\u65E0\u6548\u3002
-
-OPERAND_MISSING = \u9009\u9879 "{0}" \u7F3A\u5C11\u64CD\u4F5C\u6570\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_TW.properties
deleted file mode 100644
index 2f761f08..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_TW.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NON_EXISTENT_FILE = \u76EE\u9304 "{0}" \u4E0D\u5B58\u5728.
-
-UNRECOGNIZED_PARAMETER = \u7121\u6CD5\u8FA8\u8B58\u7684\u9078\u9805 {0} \u7121\u6548.
-
-OPERAND_MISSING = \u9078\u9805 "{0}" \u907A\u6F0F\u904B\u7B97\u5143.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Messages.java
deleted file mode 100644
index f4fa1dd5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Messages.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.ap;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Message resources.
- *
- * @author Kohsuke Kawaguchi
- */
-enum Messages {
- // Accessor
- NON_EXISTENT_FILE, // 1 arg
- UNRECOGNIZED_PARAMETER, //1 arg
- OPERAND_MISSING, // 1 arg
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getPackage().getName() +".MessageBundle");
-
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Options.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Options.java
deleted file mode 100644
index dc1a3b28..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Options.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.ap;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.sun.tools.internal.xjc.BadCommandLineException;
-
-/**
- * This stores the invocation configuration for
- * SchemaGenerator
- *
- * @author Bhakti Mehta
- */
-public class Options {
-
- public static final String DISABLE_XML_SECURITY = "-disableXmlSecurity";
-
- // honor CLASSPATH environment variable, but it will be overrided by -cp
- public String classpath = System.getenv("CLASSPATH");
-
- public File targetDir = null;
-
- public File episodeFile = null;
-
- private boolean disableXmlSecurity = false;
-
- // encoding is not required for JDK5, 6, but JDK 7 javac is much more strict - see issue 6859289
- public String encoding = null;
-
- public final List<String> arguments = new ArrayList<String>();
-
- public void parseArguments(String[] args) throws BadCommandLineException {
- for (int i = 0 ; i <args.length; i++) {
- if (args[i].charAt(0)== '-') {
- int j = parseArgument(args,i);
- if(j==0)
- throw new BadCommandLineException(
- Messages.UNRECOGNIZED_PARAMETER.format(args[i]));
- i += j;
- } else {
- arguments.add(args[i]);
- }
- }
- }
-
- private int parseArgument( String[] args, int i ) throws BadCommandLineException {
- if (args[i].equals("-d")) {
- if (i == args.length - 1)
- throw new BadCommandLineException(
- (Messages.OPERAND_MISSING.format(args[i])));
- targetDir = new File(args[++i]);
- if( !targetDir.exists() )
- throw new BadCommandLineException(
- Messages.NON_EXISTENT_FILE.format(targetDir));
- return 1;
- }
-
- if (args[i].equals("-episode")) {
- if (i == args.length - 1)
- throw new BadCommandLineException(
- (Messages.OPERAND_MISSING.format(args[i])));
- episodeFile = new File(args[++i]);
- return 1;
- }
-
- if (args[i].equals(DISABLE_XML_SECURITY)) {
- if (i == args.length - 1)
- throw new BadCommandLineException(
- (Messages.OPERAND_MISSING.format(args[i])));
- disableXmlSecurity = true;
- return 1;
- }
-
- if (args[i].equals("-encoding")) {
- if (i == args.length - 1)
- throw new BadCommandLineException(
- (Messages.OPERAND_MISSING.format(args[i])));
- encoding = args[++i];
- return 1;
- }
-
- if (args[i].equals("-cp") || args[i].equals("-classpath")) {
- if (i == args.length - 1)
- throw new BadCommandLineException(
- (Messages.OPERAND_MISSING.format(args[i])));
- classpath = args[++i];
-
- return 1;
- }
-
- return 0;
-
- }
-
- /**
- * @return the disableXmlSecurity
- */
- public boolean isDisableXmlSecurity() {
- return disableXmlSecurity;
- }
-
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SchemaGenerator.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SchemaGenerator.java
deleted file mode 100644
index 0f7843e0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SchemaGenerator.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.ap;
-
-import com.sun.tools.internal.jxc.api.JXC;
-import com.sun.tools.internal.xjc.api.J2SJAXBModel;
-import com.sun.tools.internal.xjc.api.Reference;
-
-import javax.annotation.processing.AbstractProcessor;
-import javax.annotation.processing.Processor;
-import javax.annotation.processing.RoundEnvironment;
-import javax.annotation.processing.SupportedAnnotationTypes;
-import javax.lang.model.SourceVersion;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ElementKind;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.util.ElementFilter;
-import javax.tools.Diagnostic;
-import javax.tools.StandardLocation;
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-import javax.xml.transform.stream.StreamResult;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * {@link Processor} that implements the schema generator
- * command line tool.
- *
- * @author Kohsuke Kawaguchi
- */
-@SupportedAnnotationTypes("*")
-public class SchemaGenerator extends AbstractProcessor {
-
- /**
- * User-specified schema locations, if any.
- */
- private final Map<String,File> schemaLocations = new HashMap<String, File>();
-
- private File episodeFile;
-
- public SchemaGenerator() {
- }
-
- public SchemaGenerator( Map<String,File> m ) {
- schemaLocations.putAll(m);
- }
-
- public void setEpisodeFile(File episodeFile) {
- this.episodeFile = episodeFile;
- }
-
- @Override
- public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
- final ErrorReceiverImpl errorListener = new ErrorReceiverImpl(processingEnv);
-
- List<Reference> classes = new ArrayList<Reference>();
- // simply ignore all the interface definitions,
- // so that users won't have to manually exclude interfaces, which is silly.
- filterClass(classes, roundEnv.getRootElements());
-
- J2SJAXBModel model = JXC.createJavaCompiler().bind(classes, Collections.<QName, Reference>emptyMap(), null, processingEnv);
- if (model == null)
- return false; // error
-
- try {
- model.generateSchema(
- new SchemaOutputResolver() {
- public Result createOutput(String namespaceUri, String suggestedFileName) throws IOException {
- File file;
- OutputStream out;
- if (schemaLocations.containsKey(namespaceUri)) {
- file = schemaLocations.get(namespaceUri);
- if (file == null) return null; // don't generate
- out = new FileOutputStream(file);
- } else {
- // use the default
- file = new File(suggestedFileName);
- out = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", suggestedFileName)
- .openOutputStream();
- file = file.getAbsoluteFile();
- }
-
- StreamResult ss = new StreamResult(out);
- processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Writing "+file);
- ss.setSystemId(file.toURL().toExternalForm());
- return ss;
- }
- }, errorListener);
-
- if (episodeFile != null) {
- processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Writing "+episodeFile);
- model.generateEpisodeFile(new StreamResult(episodeFile));
- }
- } catch (IOException e) {
- errorListener.error(e.getMessage(), e);
- }
- return false;
- }
-
- private void filterClass(List<Reference> classes, Collection<? extends Element> elements) {
- for (Element element : elements) {
- if (element.getKind().equals(ElementKind.CLASS) || element.getKind().equals(ElementKind.ENUM)) {
- classes.add(new Reference((TypeElement) element, processingEnv));
- filterClass(classes, ElementFilter.typesIn(element.getEnclosedElements()));
- }
- }
- }
-
- @Override
- public SourceVersion getSupportedSourceVersion() {
- if (SourceVersion.latest().compareTo(SourceVersion.RELEASE_6) > 0)
- return SourceVersion.valueOf("RELEASE_7");
- else
- return SourceVersion.RELEASE_6;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SecureLoader.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SecureLoader.java
deleted file mode 100644
index 3652e9b0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SecureLoader.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.ap;
-
-/**
- * Class defined for safe calls of getClassLoader methods of any kind (context/system/class
- * classloader. This MUST be package private and defined in every package which
- * uses such invocations.
- * @author snajper
- */
-class SecureLoader {
-
- static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/package.html b/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/package.html
deleted file mode 100644
index 99b03092..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/package.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
- <body>
- Annotation Processing related code.
-
- This package hosts a driver that runs annotation processing for java-to-schema processing,
- and additional implementations that deal primarily with AP.
- </body>
-</html>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/JXC.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/JXC.java
deleted file mode 100644
index 6f97773d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/JXC.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.api;
-
-import com.sun.tools.internal.xjc.api.JavaCompiler;
-import com.sun.tools.internal.jxc.api.impl.j2s.JavaCompilerImpl;
-
-/**
- * User: Iaroslav Savytskyi
- * Date: 25/05/12
- */
-public class JXC {
- /**
- * Gets a fresh {@link JavaCompiler}.
- *
- * @return
- * always return non-null object.
- */
- public static JavaCompiler createJavaCompiler() {
- return new JavaCompilerImpl();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/impl/j2s/JAXBModelImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/impl/j2s/JAXBModelImpl.java
deleted file mode 100644
index ce768a0c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/impl/j2s/JAXBModelImpl.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.api.impl.j2s;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.bind.annotation.XmlList;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-import javax.lang.model.type.TypeMirror;
-import com.sun.tools.internal.xjc.api.ErrorListener;
-import com.sun.tools.internal.xjc.api.J2SJAXBModel;
-import com.sun.tools.internal.xjc.api.Reference;
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.core.ArrayInfo;
-import com.sun.xml.internal.bind.v2.model.core.ClassInfo;
-import com.sun.xml.internal.bind.v2.model.core.Element;
-import com.sun.xml.internal.bind.v2.model.core.ElementInfo;
-import com.sun.xml.internal.bind.v2.model.core.EnumLeafInfo;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.core.Ref;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.schemagen.XmlSchemaGenerator;
-import com.sun.xml.internal.txw2.output.ResultFactory;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-final class JAXBModelImpl implements J2SJAXBModel {
-
- private final Map<QName,Reference> additionalElementDecls;
-
- private final List<String> classList = new ArrayList<String>();
-
- private final TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> types;
-
- private final AnnotationReader<TypeMirror, TypeElement, VariableElement, ExecutableElement> reader;
-
- /**
- * Lazily created schema generator.
- */
- private XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> xsdgen;
-
- /**
- * Look up table from an externally visible {@link Reference} object
- * to our internal format.
- */
- private final Map<Reference, NonElement<TypeMirror, TypeElement>> refMap = new HashMap<Reference, NonElement<TypeMirror, TypeElement>>();
-
- public JAXBModelImpl(TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> types,
- AnnotationReader<TypeMirror, TypeElement, VariableElement, ExecutableElement> reader,
- Collection<Reference> rootClasses,
- Map<QName, Reference> additionalElementDecls) {
- this.types = types;
- this.reader = reader;
- this.additionalElementDecls = additionalElementDecls;
-
- Navigator<TypeMirror, TypeElement, VariableElement, ExecutableElement> navigator = types.getNavigator();
-
- for (ClassInfo<TypeMirror, TypeElement> i : types.beans().values()) {
- classList.add(i.getName());
- }
-
- for (ArrayInfo<TypeMirror, TypeElement> a : types.arrays().values()) {
- String javaName = navigator.getTypeName(a.getType());
- classList.add(javaName);
- }
-
- for (EnumLeafInfo<TypeMirror, TypeElement> l : types.enums().values()) {
- QName tn = l.getTypeName();
- if(tn!=null) {
- String javaName = navigator.getTypeName(l.getType());
- classList.add(javaName);
- }
- }
-
- for (Reference ref : rootClasses)
- refMap.put(ref,getXmlType(ref));
-
- // check for collision between "additional" ones and the ones given to JAXB
- // and eliminate duplication
- Iterator<Map.Entry<QName, Reference>> itr = additionalElementDecls.entrySet().iterator();
- while(itr.hasNext()) {
- Map.Entry<QName, Reference> entry = itr.next();
- if(entry.getValue()==null) continue;
-
- NonElement<TypeMirror, TypeElement> xt = getXmlType(entry.getValue());
-
- assert xt!=null;
- refMap.put(entry.getValue(),xt);
- if(xt instanceof ClassInfo) {
- ClassInfo<TypeMirror, TypeElement> xct = (ClassInfo<TypeMirror, TypeElement>) xt;
- Element<TypeMirror, TypeElement> elem = xct.asElement();
- if(elem!=null && elem.getElementName().equals(entry.getKey())) {
- itr.remove();
- continue;
- }
- }
- ElementInfo<TypeMirror, TypeElement> ei = types.getElementInfo(null, entry.getKey());
- if(ei!=null && ei.getContentType()==xt)
- itr.remove();
- }
- }
-
- public List<String> getClassList() {
- return classList;
- }
-
- public QName getXmlTypeName(Reference javaType) {
- NonElement<TypeMirror, TypeElement> ti = refMap.get(javaType);
-
- if(ti!=null)
- return ti.getTypeName();
-
- return null;
- }
-
- private NonElement<TypeMirror, TypeElement> getXmlType(Reference r) {
- if(r==null)
- throw new IllegalArgumentException();
-
- XmlJavaTypeAdapter xjta = r.annotations.getAnnotation(XmlJavaTypeAdapter.class);
- XmlList xl = r.annotations.getAnnotation(XmlList.class);
-
- Ref<TypeMirror, TypeElement> ref = new Ref<TypeMirror, TypeElement>(
- reader,types.getNavigator(),r.type,xjta,xl);
-
- return types.getTypeInfo(ref);
- }
-
- public void generateSchema(SchemaOutputResolver outputResolver, ErrorListener errorListener) throws IOException {
- getSchemaGenerator().write(outputResolver,errorListener);
- }
-
- public void generateEpisodeFile(Result output) {
- getSchemaGenerator().writeEpisodeFile(ResultFactory.createSerializer(output));
- }
-
- private synchronized XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement> getSchemaGenerator() {
- if(xsdgen==null) {
- xsdgen = new XmlSchemaGenerator<TypeMirror, TypeElement, VariableElement, ExecutableElement>(types.getNavigator(), types);
-
- for (Map.Entry<QName, Reference> e : additionalElementDecls.entrySet()) {
- Reference value = e.getValue();
- if(value!=null) {
- NonElement<TypeMirror, TypeElement> typeInfo = refMap.get(value);
- if(typeInfo==null)
- throw new IllegalArgumentException(e.getValue()+" was not specified to JavaCompiler.bind");
- TypeMirror type = value.type;
- xsdgen.add(e.getKey(), !(type != null && type.getKind().isPrimitive()), typeInfo);
- } else {
- xsdgen.add(e.getKey(),false,null);
- }
- }
- }
- return xsdgen;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/impl/j2s/JavaCompilerImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/impl/j2s/JavaCompilerImpl.java
deleted file mode 100644
index 6fb4b732..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/impl/j2s/JavaCompilerImpl.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.api.impl.j2s;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.bind.annotation.XmlList;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
-
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.annotation.processing.Messager;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-import javax.lang.model.type.TypeMirror;
-import javax.tools.Diagnostic;
-import com.sun.tools.internal.jxc.ap.InlineAnnotationReaderImpl;
-import com.sun.tools.internal.jxc.model.nav.ApNavigator;
-import com.sun.tools.internal.xjc.api.J2SJAXBModel;
-import com.sun.tools.internal.xjc.api.JavaCompiler;
-import com.sun.tools.internal.xjc.api.Reference;
-import com.sun.xml.internal.bind.v2.model.core.ErrorHandler;
-import com.sun.xml.internal.bind.v2.model.core.Ref;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
-import com.sun.xml.internal.bind.v2.model.impl.ModelBuilder;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class JavaCompilerImpl implements JavaCompiler {
- public J2SJAXBModel bind(
- Collection<Reference> rootClasses,
- Map<QName,Reference> additionalElementDecls,
- String defaultNamespaceRemap,
- ProcessingEnvironment env) {
-
- ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement> builder =
- new ModelBuilder<TypeMirror, TypeElement, VariableElement, ExecutableElement>(
- InlineAnnotationReaderImpl.theInstance,
- new ApNavigator(env),
- Collections.<TypeElement, TypeElement>emptyMap(),
- defaultNamespaceRemap );
-
- builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));
-
- for ( Reference ref : rootClasses ) {
- TypeMirror t = ref.type;
-
- XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
- XmlList xl = ref.annotations.getAnnotation(XmlList.class);
-
- builder.getTypeInfo(new Ref<TypeMirror, TypeElement>(builder, t, xjta, xl));
- }
-
- TypeInfoSet<TypeMirror, TypeElement, VariableElement, ExecutableElement> r = builder.link();
- if(r==null) return null;
-
- if(additionalElementDecls==null)
- additionalElementDecls = Collections.emptyMap();
- else {
- // fool proof check
- for (Map.Entry<QName, ? extends Reference> e : additionalElementDecls.entrySet()) {
- if(e.getKey()==null)
- throw new IllegalArgumentException("nulls in additionalElementDecls");
- }
- }
- return new JAXBModelImpl(r, builder.reader, rootClasses, new HashMap<QName, Reference>(additionalElementDecls));
- }
-
- private static final class ErrorHandlerImpl implements ErrorHandler {
- private final Messager messager;
-
- public ErrorHandlerImpl(Messager messager) {
- this.messager = messager;
- }
-
- public void error(IllegalAnnotationException e) {
- String error = e.toString();
- messager.printMessage(Diagnostic.Kind.ERROR, error);
- System.err.println(error); //TODO: temporary fix problem with no ouput from messager
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/AttributesImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/AttributesImpl.java
deleted file mode 100644
index 6ad38ce1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/AttributesImpl.java
+++ /dev/null
@@ -1,629 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// AttributesImpl.java - default implementation of Attributes.
-// Written by David Megginson, sax@megginson.com
-// NO WARRANTY! This class is in the public domain.
-
-// $Id: AttributesImpl.java,v 1.4 2002/09/29 02:55:48 okajima Exp $
-
-//fixed bug at removeAttribute!! by Daisuke OKAJIMA 2002.4.21
-
-package com.sun.tools.internal.jxc.gen.config;
-
-import org.xml.sax.Attributes;
-
-
-/**
- * Default implementation of the Attributes interface.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This class provides a default implementation of the SAX2
- * {@link org.xml.sax.Attributes Attributes} interface, with the
- * addition of manipulators so that the list can be modified or
- * reused.</p>
- *
- * <p>There are two typical uses of this class:</p>
- *
- * <ol>
- * <li>to take a persistent snapshot of an Attributes object
- * in a {@link org.xml.sax.ContentHandler#startElement startElement} event; or</li>
- * <li>to construct or modify an Attributes object in a SAX2 driver or filter.</li>
- * </ol>
- *
- * <p>This class replaces the now-deprecated SAX1 {@link
- * org.xml.sax.helpers.AttributeListImpl AttributeListImpl}
- * class; in addition to supporting the updated Attributes
- * interface rather than the deprecated {@link org.xml.sax.AttributeList
- * AttributeList} interface, it also includes a much more efficient
- * implementation using a single array rather than a set of Vectors.</p>
- *
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * @since SAX 2.0
- * @author David Megginson,
- * <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- */
-public class AttributesImpl implements Attributes
-{
-
-
- ////////////////////////////////////////////////////////////////////
- // Constructors.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Construct a new, empty AttributesImpl object.
- */
- public AttributesImpl ()
- {
- length = 0;
- data = null;
- }
-
-
- /**
- * Copy an existing Attributes object.
- *
- * <p>This constructor is especially useful inside a
- * {@link org.xml.sax.ContentHandler#startElement startElement} event.</p>
- *
- * @param atts The existing Attributes object.
- */
- public AttributesImpl (Attributes atts)
- {
- setAttributes(atts);
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Implementation of org.xml.sax.Attributes.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Return the number of attributes in the list.
- *
- * @return The number of attributes in the list.
- * @see org.xml.sax.Attributes#getLength
- */
- public int getLength ()
- {
- return length;
- }
-
-
- /**
- * Return an attribute's Namespace URI.
- *
- * @param index The attribute's index (zero-based).
- * @return The Namespace URI, the empty string if none is
- * available, or null if the index is out of range.
- * @see org.xml.sax.Attributes#getURI
- */
- public String getURI (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5];
- } else {
- return null;
- }
- }
-
-
- /**
- * Return an attribute's local name.
- *
- * @param index The attribute's index (zero-based).
- * @return The attribute's local name, the empty string if
- * none is available, or null if the index if out of range.
- * @see org.xml.sax.Attributes#getLocalName
- */
- public String getLocalName (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5+1];
- } else {
- return null;
- }
- }
-
-
- /**
- * Return an attribute's qualified (prefixed) name.
- *
- * @param index The attribute's index (zero-based).
- * @return The attribute's qualified name, the empty string if
- * none is available, or null if the index is out of bounds.
- * @see org.xml.sax.Attributes#getQName
- */
- public String getQName (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5+2];
- } else {
- return null;
- }
- }
-
-
- /**
- * Return an attribute's type by index.
- *
- * @param index The attribute's index (zero-based).
- * @return The attribute's type, "CDATA" if the type is unknown, or null
- * if the index is out of bounds.
- * @see org.xml.sax.Attributes#getType(int)
- */
- public String getType (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5+3];
- } else {
- return null;
- }
- }
-
-
- /**
- * Return an attribute's value by index.
- *
- * @param index The attribute's index (zero-based).
- * @return The attribute's value or null if the index is out of bounds.
- * @see org.xml.sax.Attributes#getValue(int)
- */
- public String getValue (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5+4];
- } else {
- return null;
- }
- }
-
-
- /**
- * Look up an attribute's index by Namespace name.
- *
- * <p>In many cases, it will be more efficient to look up the name once and
- * use the index query methods rather than using the name query methods
- * repeatedly.</p>
- *
- * @param uri The attribute's Namespace URI, or the empty
- * string if none is available.
- * @param localName The attribute's local name.
- * @return The attribute's index, or -1 if none matches.
- * @see org.xml.sax.Attributes#getIndex(java.lang.String,java.lang.String)
- */
- public int getIndex (String uri, String localName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i].equals(uri) && data[i+1].equals(localName)) {
- return i / 5;
- }
- }
- return -1;
- }
-
-
- /**
- * Look up an attribute's index by qualified (prefixed) name.
- *
- * @param qName The qualified name.
- * @return The attribute's index, or -1 if none matches.
- * @see org.xml.sax.Attributes#getIndex(java.lang.String)
- */
- public int getIndex (String qName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i+2].equals(qName)) {
- return i / 5;
- }
- }
- return -1;
- }
-
-
- /**
- * Look up an attribute's type by Namespace-qualified name.
- *
- * @param uri The Namespace URI, or the empty string for a name
- * with no explicit Namespace URI.
- * @param localName The local name.
- * @return The attribute's type, or null if there is no
- * matching attribute.
- * @see org.xml.sax.Attributes#getType(java.lang.String,java.lang.String)
- */
- public String getType (String uri, String localName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i].equals(uri) && data[i+1].equals(localName)) {
- return data[i+3];
- }
- }
- return null;
- }
-
-
- /**
- * Look up an attribute's type by qualified (prefixed) name.
- *
- * @param qName The qualified name.
- * @return The attribute's type, or null if there is no
- * matching attribute.
- * @see org.xml.sax.Attributes#getType(java.lang.String)
- */
- public String getType (String qName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i+2].equals(qName)) {
- return data[i+3];
- }
- }
- return null;
- }
-
-
- /**
- * Look up an attribute's value by Namespace-qualified name.
- *
- * @param uri The Namespace URI, or the empty string for a name
- * with no explicit Namespace URI.
- * @param localName The local name.
- * @return The attribute's value, or null if there is no
- * matching attribute.
- * @see org.xml.sax.Attributes#getValue(java.lang.String,java.lang.String)
- */
- public String getValue (String uri, String localName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i].equals(uri) && data[i+1].equals(localName)) {
- return data[i+4];
- }
- }
- return null;
- }
-
-
- /**
- * Look up an attribute's value by qualified (prefixed) name.
- *
- * @param qName The qualified name.
- * @return The attribute's value, or null if there is no
- * matching attribute.
- * @see org.xml.sax.Attributes#getValue(java.lang.String)
- */
- public String getValue (String qName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i+2].equals(qName)) {
- return data[i+4];
- }
- }
- return null;
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Manipulators.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Clear the attribute list for reuse.
- *
- * <p>Note that no memory is actually freed by this call:
- * the current arrays are kept so that they can be
- * reused.</p>
- */
- public void clear ()
- {
- length = 0;
- }
-
-
- /**
- * Copy an entire Attributes object.
- *
- * <p>It may be more efficient to reuse an existing object
- * rather than constantly allocating new ones.</p>
- *
- * @param atts The attributes to copy.
- */
- public void setAttributes (Attributes atts)
- {
- clear();
- length = atts.getLength();
- data = new String[length*5];
- for (int i = 0; i < length; i++) {
- data[i*5] = atts.getURI(i);
- data[i*5+1] = atts.getLocalName(i);
- data[i*5+2] = atts.getQName(i);
- data[i*5+3] = atts.getType(i);
- data[i*5+4] = atts.getValue(i);
- }
- }
-
-
- /**
- * Add an attribute to the end of the list.
- *
- * <p>For the sake of speed, this method does no checking
- * to see if the attribute is already in the list: that is
- * the responsibility of the application.</p>
- *
- * @param uri The Namespace URI, or the empty string if
- * none is available or Namespace processing is not
- * being performed.
- * @param localName The local name, or the empty string if
- * Namespace processing is not being performed.
- * @param qName The qualified (prefixed) name, or the empty string
- * if qualified names are not available.
- * @param type The attribute type as a string.
- * @param value The attribute value.
- */
- public void addAttribute (String uri, String localName, String qName,
- String type, String value)
- {
- ensureCapacity(length+1);
- data[length*5] = uri;
- data[length*5+1] = localName;
- data[length*5+2] = qName;
- data[length*5+3] = type;
- data[length*5+4] = value;
- length++;
- }
-
-
- /**
- * Set an attribute in the list.
- *
- * <p>For the sake of speed, this method does no checking
- * for name conflicts or well-formedness: such checks are the
- * responsibility of the application.</p>
- *
- * @param index The index of the attribute (zero-based).
- * @param uri The Namespace URI, or the empty string if
- * none is available or Namespace processing is not
- * being performed.
- * @param localName The local name, or the empty string if
- * Namespace processing is not being performed.
- * @param qName The qualified name, or the empty string
- * if qualified names are not available.
- * @param type The attribute type as a string.
- * @param value The attribute value.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setAttribute (int index, String uri, String localName,
- String qName, String type, String value)
- {
- if (index >= 0 && index < length) {
- data[index*5] = uri;
- data[index*5+1] = localName;
- data[index*5+2] = qName;
- data[index*5+3] = type;
- data[index*5+4] = value;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Remove an attribute from the list.
- *
- * @param index The index of the attribute (zero-based).
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void removeAttribute (int index)
- {
- if (index >= 0 && index < length) {
- if (index < length - 1) {
- System.arraycopy(data, (index+1)*5, data, index*5,
- (length-index-1)*5);
- }
- length--;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the Namespace URI of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param uri The attribute's Namespace URI, or the empty
- * string for none.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setURI (int index, String uri)
- {
- if (index >= 0 && index < length) {
- data[index*5] = uri;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the local name of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param localName The attribute's local name, or the empty
- * string for none.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setLocalName (int index, String localName)
- {
- if (index >= 0 && index < length) {
- data[index*5+1] = localName;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the qualified name of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param qName The attribute's qualified name, or the empty
- * string for none.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setQName (int index, String qName)
- {
- if (index >= 0 && index < length) {
- data[index*5+2] = qName;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the type of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param type The attribute's type.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setType (int index, String type)
- {
- if (index >= 0 && index < length) {
- data[index*5+3] = type;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the value of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param value The attribute's value.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setValue (int index, String value)
- {
- if (index >= 0 && index < length) {
- data[index*5+4] = value;
- } else {
- badIndex(index);
- }
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal methods.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Ensure the internal array's capacity.
- *
- * @param n The minimum number of attributes that the array must
- * be able to hold.
- */
- private void ensureCapacity (int n)
- {
- if (n > 0 && (data == null || data.length==0)) {
- data = new String[25];
- }
-
- int max = data.length;
- if (max >= n * 5) {
- return;
- }
-
-
- while (max < n * 5) {
- max *= 2;
- }
- String newData[] = new String[max];
- System.arraycopy(data, 0, newData, 0, length*5);
- data = newData;
- }
-
-
- /**
- * Report a bad array index in a manipulator.
- *
- * @param index The index to report.
- * @exception java.lang.ArrayIndexOutOfBoundsException Always.
- */
- private void badIndex (int index)
- throws ArrayIndexOutOfBoundsException
- {
- String msg =
- "Attempt to modify attribute at illegal index: " + index;
- throw new ArrayIndexOutOfBoundsException(msg);
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal state.
- ////////////////////////////////////////////////////////////////////
-
- int length;
- String data [];
-
-}
-
-// end of AttributesImpl.java
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Classes.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Classes.java
deleted file mode 100644
index bbd1ba07..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Classes.java
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.tools.internal.jxc.gen.config;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.tools.internal.jxc.NGCCRuntimeEx;
-
-import java.util.List;
- import java.util.ArrayList;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public class Classes extends NGCCHandler {
- private String __text;
- private String exclude_content;
- private String include_content;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public Classes(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 12;
- }
-
- public Classes(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- private void action0()throws SAXException {
- this.excludes.add(exclude_content);
-}
-
- private void action1()throws SAXException {
- $runtime.processList(__text);}
-
- private void action2()throws SAXException {
- this.includes.add(include_content);
-}
-
- private void action3()throws SAXException {
- $runtime.processList(__text);}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 12:
- {
- if(($__uri.equals("") && $__local.equals("classes"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 11;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 2:
- {
- if(($__uri.equals("") && $__local.equals("excludes"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 6;
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 3;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 11:
- {
- if(($__uri.equals("") && $__local.equals("includes"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 10;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 3;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- if(($__uri.equals("") && $__local.equals("classes"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 3:
- {
- if(($__uri.equals("") && $__local.equals("excludes"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 8:
- {
- if(($__uri.equals("") && $__local.equals("includes"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 2;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 3;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 3;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 4:
- {
- exclude_content = $value;
- $_ngcc_current_state = 3;
- action0();
- }
- break;
- case 10:
- {
- __text = $value;
- $_ngcc_current_state = 9;
- action3();
- }
- break;
- case 3:
- {
- exclude_content = $value;
- $_ngcc_current_state = 3;
- action0();
- }
- break;
- case 6:
- {
- __text = $value;
- $_ngcc_current_state = 4;
- action1();
- }
- break;
- case 0:
- {
- revertToParentFromText(this, super._cookie, $value);
- }
- break;
- case 9:
- {
- include_content = $value;
- $_ngcc_current_state = 8;
- action2();
- }
- break;
- case 8:
- {
- include_content = $value;
- $_ngcc_current_state = 8;
- action2();
- }
- break;
- }
- }
-
- public void onChildCompleted(Object result, int cookie, boolean needAttCheck)throws SAXException {
- switch(cookie) {
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private List includes = new ArrayList();
- public List getIncludes() { return $runtime.getIncludePatterns(this.includes);}
- private List excludes = new ArrayList();
- public List getExcludes() { return $runtime.getExcludePatterns(this.excludes);}
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Config.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Config.java
deleted file mode 100644
index 60aef42c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Config.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.tools.internal.jxc.gen.config;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.tools.internal.jxc.NGCCRuntimeEx;
-import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.XMLReader;
-
-import java.util.List;
- import java.util.ArrayList;
- import java.io.File;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public class Config extends NGCCHandler {
- private String bd;
- private Schema _schema;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public Config(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 8;
- }
-
- public Config(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- private void action0()throws SAXException {
- this.schema.add (_schema);
-}
-
- private void action1()throws SAXException {
- baseDir = $runtime.getBaseDir(bd);
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 1:
- {
- if(($__uri.equals("") && $__local.equals("schema"))) {
- NGCCHandler h = new Schema(this, super._source, $runtime, 19, baseDir);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 8:
- {
- if(($__uri.equals("") && $__local.equals("config"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 7;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 4:
- {
- if(($__uri.equals("") && $__local.equals("classes"))) {
- NGCCHandler h = new Classes(this, super._source, $runtime, 22);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 2:
- {
- if(($__uri.equals("") && $__local.equals("schema"))) {
- NGCCHandler h = new Schema(this, super._source, $runtime, 20, baseDir);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 7:
- {
- if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- if(($__uri.equals("") && $__local.equals("config"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 7:
- {
- if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 7:
- {
- if(($__uri.equals("") && $__local.equals("baseDir"))) {
- $_ngcc_current_state = 6;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- if(($__uri.equals("") && $__local.equals("baseDir"))) {
- $_ngcc_current_state = 4;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromText(this, super._cookie, $value);
- }
- break;
- case 6:
- {
- bd = $value;
- $_ngcc_current_state = 5;
- action1();
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 7:
- {
- if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- }
- }
-
- public void onChildCompleted(Object result, int cookie, boolean needAttCheck)throws SAXException {
- switch(cookie) {
- case 19:
- {
- this._schema = ((Schema)result);
- action0();
- $_ngcc_current_state = 1;
- }
- break;
- case 22:
- {
- this.classes = ((Classes)result);
- $_ngcc_current_state = 2;
- }
- break;
- case 20:
- {
- this._schema = ((Schema)result);
- action0();
- $_ngcc_current_state = 1;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private File baseDir;
- private Classes classes;
- private List schema = new ArrayList();
- public Classes getClasses() { return this.classes;}
- public File getBaseDir() { return baseDir;}
- public List getSchema() { return this.schema;}
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventReceiver.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventReceiver.java
deleted file mode 100644
index ee80bdf8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventReceiver.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.gen.config;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public interface NGCCEventReceiver {
- void enterElement(String uri, String localName, String qname,Attributes atts) throws SAXException;
- void leaveElement(String uri, String localName, String qname) throws SAXException;
- void text(String value) throws SAXException;
- void enterAttribute(String uri, String localName, String qname) throws SAXException;
- void leaveAttribute(String uri, String localName, String qname) throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventSource.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventSource.java
deleted file mode 100644
index f1ffb72d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventSource.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.gen.config;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public interface NGCCEventSource {
- /**
- * Replaces an old handler with a new handler, and returns
- * ID of the EventReceiver thread.
- */
- int replace( NGCCEventReceiver _old, NGCCEventReceiver _new );
-
- /** Sends an enter element event to the specified EventReceiver thread. */
- void sendEnterElement( int receiverThreadId, String uri, String local, String qname, Attributes atts ) throws SAXException;
-
- void sendLeaveElement( int receiverThreadId, String uri, String local, String qname ) throws SAXException;
- void sendEnterAttribute( int receiverThreadId, String uri, String local, String qname ) throws SAXException;
- void sendLeaveAttribute( int receiverThreadId, String uri, String local, String qname ) throws SAXException;
- void sendText( int receiverThreadId, String value ) throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCHandler.java
deleted file mode 100644
index fe4d5e9b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCHandler.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.gen.config;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- *
- * @version $Id: NGCCHandler.java,v 1.9 2002/09/29 02:55:48 okajima Exp $
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public abstract class NGCCHandler implements NGCCEventReceiver {
- protected NGCCHandler( NGCCEventSource source, NGCCHandler parent, int parentCookie ) {
-
- _parent = parent;
- _source = source;
- _cookie = parentCookie;
- }
-
- /**
- * Parent NGCCHandler, if any.
- * If this is the root handler, this field will be null.
- */
- protected final NGCCHandler _parent;
-
- /**
- * Event source.
- */
- protected final NGCCEventSource _source;
-
- /**
- * This method will be implemented by the generated code
- * and returns a reference to the current runtime.
- */
- protected abstract NGCCRuntime getRuntime();
-
- /**
- * Cookie assigned by the parent.
- *
- * This value will be passed to the onChildCompleted handler
- * of the parent.
- */
- protected final int _cookie;
-
- // used to copy parameters to (enter|leave)(Element|Attribute) events.
- //protected String localName,uri,qname;
-
-
- /**
- * Notifies the completion of a child object.
- *
- * @param result
- * The parsing result of the child state.
- * @param cookie
- * The cookie value passed to the child object
- * when it is created.
- * @param needAttCheck
- * This flag is true when the callee needs to call the
- * processAttribute method to check attribute transitions.
- * This flag is set to false when this method is triggered by
- * attribute transition.
- */
- protected abstract void onChildCompleted( Object result, int cookie, boolean needAttCheck ) throws SAXException;
-
-//
-//
-// spawns a new child object from event handlers.
-//
-//
- public void spawnChildFromEnterElement( NGCCEventReceiver child,
- String uri, String localname, String qname, Attributes atts) throws SAXException {
-
- int id = _source.replace(this,child);
- _source.sendEnterElement(id,uri,localname,qname,atts);
- }
- public void spawnChildFromEnterAttribute( NGCCEventReceiver child,
- String uri, String localname, String qname) throws SAXException {
-
- int id = _source.replace(this,child);
- _source.sendEnterAttribute(id,uri,localname,qname);
- }
- public void spawnChildFromLeaveElement( NGCCEventReceiver child,
- String uri, String localname, String qname) throws SAXException {
-
- int id = _source.replace(this,child);
- _source.sendLeaveElement(id,uri,localname,qname);
- }
- public void spawnChildFromLeaveAttribute( NGCCEventReceiver child,
- String uri, String localname, String qname) throws SAXException {
-
- int id = _source.replace(this,child);
- _source.sendLeaveAttribute(id,uri,localname,qname);
- }
- public void spawnChildFromText( NGCCEventReceiver child,
- String value) throws SAXException {
-
- int id = _source.replace(this,child);
- _source.sendText(id,value);
- }
-
-//
-//
-// reverts to the parent object from the child handler
-//
-//
- public void revertToParentFromEnterElement( Object result, int cookie,
- String uri,String local,String qname, Attributes atts ) throws SAXException {
-
- int id = _source.replace(this,_parent);
- _parent.onChildCompleted(result,cookie,true);
- _source.sendEnterElement(id,uri,local,qname,atts);
- }
- public void revertToParentFromLeaveElement( Object result, int cookie,
- String uri,String local,String qname ) throws SAXException {
-
- if(uri==NGCCRuntime.IMPOSSIBLE && uri==local && uri==qname && _parent==null )
- // all the handlers are properly finalized.
- // quit now, because we don't have any more NGCCHandler.
- // see the endDocument handler for detail
- return;
-
- int id = _source.replace(this,_parent);
- _parent.onChildCompleted(result,cookie,true);
- _source.sendLeaveElement(id,uri,local,qname);
- }
- public void revertToParentFromEnterAttribute( Object result, int cookie,
- String uri,String local,String qname ) throws SAXException {
-
- int id = _source.replace(this,_parent);
- _parent.onChildCompleted(result,cookie,true);
- _source.sendEnterAttribute(id,uri,local,qname);
- }
- public void revertToParentFromLeaveAttribute( Object result, int cookie,
- String uri,String local,String qname ) throws SAXException {
-
- int id = _source.replace(this,_parent);
- _parent.onChildCompleted(result,cookie,true);
- _source.sendLeaveAttribute(id,uri,local,qname);
- }
- public void revertToParentFromText( Object result, int cookie,
- String text ) throws SAXException {
-
- int id = _source.replace(this,_parent);
- _parent.onChildCompleted(result,cookie,true);
- _source.sendText(id,text);
- }
-
-
-//
-//
-// error handler
-//
-//
- public void unexpectedEnterElement(String qname) throws SAXException {
- getRuntime().unexpectedX('<'+qname+'>');
- }
- public void unexpectedLeaveElement(String qname) throws SAXException {
- getRuntime().unexpectedX("</"+qname+'>');
- }
- public void unexpectedEnterAttribute(String qname) throws SAXException {
- getRuntime().unexpectedX('@'+qname);
- }
- public void unexpectedLeaveAttribute(String qname) throws SAXException {
- getRuntime().unexpectedX("/@"+qname);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCInterleaveFilter.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCInterleaveFilter.java
deleted file mode 100644
index 702b0bdb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCInterleaveFilter.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.gen.config;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- * Dispatches incoming events into sub handlers appropriately
- * so that the interleaving semantics will be correctly realized.
- *
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public abstract class NGCCInterleaveFilter implements NGCCEventSource, NGCCEventReceiver {
- protected NGCCInterleaveFilter( NGCCHandler parent, int cookie ) {
- this._parent = parent;
- this._cookie = cookie;
- }
-
- protected void setHandlers( NGCCEventReceiver[] receivers ) {
- this._receivers = receivers;
- }
-
- /** event receiverse. */
- protected NGCCEventReceiver[] _receivers;
-
- public int replace(NGCCEventReceiver oldHandler, NGCCEventReceiver newHandler) {
- for( int i=0; i<_receivers.length; i++ )
- if( _receivers[i]==oldHandler ) {
- _receivers[i]=newHandler;
- return i;
- }
- throw new InternalError(); // a bug in RelaxNGCC.
- }
-
-
- /** Parent handler. */
- private final NGCCHandler _parent;
- /** Cookie given by the parent. */
- private final int _cookie;
-
-
-
-//
-//
-// event handler
-//
-//
- /**
- * Receiver that is being locked and therefore receives all the events.
- * <pre><xmp>
- * <interleave>
- * <element name="foo"/>
- * <element name="bar">
- * <element name="foo"/>
- * </element>
- * </interlaeve>
- * </xmp></pre>
- * When processing inside the bar element, this receiver is
- * "locked" so that it can correctly receive its child foo element.
- */
- private int lockedReceiver;
- /**
- * Nest level. Lock will be release when the lockCount becomes 0.
- */
- private int lockCount=0;
-
- public void enterElement(
- String uri, String localName, String qname,Attributes atts) throws SAXException {
-
- if(isJoining) return; // ignore any token if we are joining. See joinByXXXX.
-
- if(lockCount++==0) {
- lockedReceiver = findReceiverOfElement(uri,localName);
- if(lockedReceiver==-1) {
- // we can't process this token. join.
- joinByEnterElement(null,uri,localName,qname,atts);
- return;
- }
- }
-
- _receivers[lockedReceiver].enterElement(uri,localName,qname,atts);
- }
- public void leaveElement(String uri, String localName, String qname) throws SAXException {
- if(isJoining) return; // ignore any token if we are joining. See joinByXXXX.
-
- if( lockCount-- == 0 )
- joinByLeaveElement(null,uri,localName,qname);
- else
- _receivers[lockedReceiver].leaveElement(uri,localName,qname);
- }
- public void enterAttribute(String uri, String localName, String qname) throws SAXException {
- if(isJoining) return; // ignore any token if we are joining. See joinByXXXX.
-
- if(lockCount++==0) {
- lockedReceiver = findReceiverOfAttribute(uri,localName);
- if(lockedReceiver==-1) {
- // we can't process this token. join.
- joinByEnterAttribute(null,uri,localName,qname);
- return;
- }
- }
-
- _receivers[lockedReceiver].enterAttribute(uri,localName,qname);
- }
- public void leaveAttribute(String uri, String localName, String qname) throws SAXException {
- if(isJoining) return; // ignore any token if we are joining. See joinByXXXX.
-
- if( lockCount-- == 0 )
- joinByLeaveAttribute(null,uri,localName,qname);
- else
- _receivers[lockedReceiver].leaveAttribute(uri,localName,qname);
- }
- public void text(String value) throws SAXException {
- if(isJoining) return; // ignore any token if we are joining. See joinByXXXX.
-
- if(lockCount!=0)
- _receivers[lockedReceiver].text(value);
- else {
- int receiver = findReceiverOfText();
- if(receiver!=-1) _receivers[receiver].text(value);
- else joinByText(null,value);
- }
- }
-
-
-
- /**
- * Implemented by the generated code to determine the handler
- * that can receive the given element.
- *
- * @return
- * Thread ID of the receiver that can handle this event,
- * or -1 if none.
- */
- protected abstract int findReceiverOfElement( String uri, String local );
-
- /**
- * Returns the handler that can receive the given attribute, or null.
- */
- protected abstract int findReceiverOfAttribute( String uri, String local );
-
- /**
- * Returns the handler that can receive text events, or null.
- */
- protected abstract int findReceiverOfText();
-
-
-
-
-//
-//
-// join method
-//
-//
-
-
- /**
- * Set to true when this handler is in the process of
- * joining all branches.
- */
- private boolean isJoining = false;
-
- /**
- * Joins all the child receivers.
- *
- * <p>
- * This method is called by a child receiver when it sees
- * something that it cannot handle, or by this object itself
- * when it sees an event that it can't process.
- *
- * <p>
- * This method forces children to move to its final state,
- * then revert to the parent.
- *
- * @param source
- * If this method is called by one of the child receivers,
- * the receiver object. If this method is called by itself,
- * null.
- */
- public void joinByEnterElement( NGCCEventReceiver source,
- String uri, String local, String qname, Attributes atts ) throws SAXException {
-
- if(isJoining) return; // we are already in the process of joining. ignore.
- isJoining = true;
-
- // send special token to the rest of the branches.
- // these branches don't understand this token, so they will
- // try to move to a final state and send the token back to us,
- // which this object will ignore (because isJoining==true)
- // Otherwise branches will find an error.
- for( int i=0; i<_receivers.length; i++ )
- if( _receivers[i]!=source )
- _receivers[i].enterElement(uri,local,qname,atts);
-
- // revert to the parent
- _parent._source.replace(this,_parent);
- _parent.onChildCompleted(null,_cookie,true);
- // send this event to the parent
- _parent.enterElement(uri,local,qname,atts);
- }
-
- public void joinByLeaveElement( NGCCEventReceiver source,
- String uri, String local, String qname ) throws SAXException {
-
- if(isJoining) return; // we are already in the process of joining. ignore.
- isJoining = true;
-
- // send special token to the rest of the branches.
- // these branches don't understand this token, so they will
- // try to move to a final state and send the token back to us,
- // which this object will ignore (because isJoining==true)
- // Otherwise branches will find an error.
- for( int i=0; i<_receivers.length; i++ )
- if( _receivers[i]!=source )
- _receivers[i].leaveElement(uri,local,qname);
-
- // revert to the parent
- _parent._source.replace(this,_parent);
- _parent.onChildCompleted(null,_cookie,true);
- // send this event to the parent
- _parent.leaveElement(uri,local,qname);
- }
-
- public void joinByEnterAttribute( NGCCEventReceiver source,
- String uri, String local, String qname ) throws SAXException {
-
- if(isJoining) return; // we are already in the process of joining. ignore.
- isJoining = true;
-
- // send special token to the rest of the branches.
- // these branches don't understand this token, so they will
- // try to move to a final state and send the token back to us,
- // which this object will ignore (because isJoining==true)
- // Otherwise branches will find an error.
- for( int i=0; i<_receivers.length; i++ )
- if( _receivers[i]!=source )
- _receivers[i].enterAttribute(uri,local,qname);
-
- // revert to the parent
- _parent._source.replace(this,_parent);
- _parent.onChildCompleted(null,_cookie,true);
- // send this event to the parent
- _parent.enterAttribute(uri,local,qname);
- }
-
- public void joinByLeaveAttribute( NGCCEventReceiver source,
- String uri, String local, String qname ) throws SAXException {
-
- if(isJoining) return; // we are already in the process of joining. ignore.
- isJoining = true;
-
- // send special token to the rest of the branches.
- // these branches don't understand this token, so they will
- // try to move to a final state and send the token back to us,
- // which this object will ignore (because isJoining==true)
- // Otherwise branches will find an error.
- for( int i=0; i<_receivers.length; i++ )
- if( _receivers[i]!=source )
- _receivers[i].leaveAttribute(uri,local,qname);
-
- // revert to the parent
- _parent._source.replace(this,_parent);
- _parent.onChildCompleted(null,_cookie,true);
- // send this event to the parent
- _parent.leaveAttribute(uri,local,qname);
- }
-
- public void joinByText( NGCCEventReceiver source,
- String value ) throws SAXException {
-
- if(isJoining) return; // we are already in the process of joining. ignore.
- isJoining = true;
-
- // send special token to the rest of the branches.
- // these branches don't understand this token, so they will
- // try to move to a final state and send the token back to us,
- // which this object will ignore (because isJoining==true)
- // Otherwise branches will find an error.
- for( int i=0; i<_receivers.length; i++ )
- if( _receivers[i]!=source )
- _receivers[i].text(value);
-
- // revert to the parent
- _parent._source.replace(this,_parent);
- _parent.onChildCompleted(null,_cookie,true);
- // send this event to the parent
- _parent.text(value);
- }
-
-
-
-//
-//
-// event dispatching methods
-//
-//
-
- public void sendEnterAttribute( int threadId,
- String uri, String local, String qname) throws SAXException {
-
- _receivers[threadId].enterAttribute(uri,local,qname);
- }
-
- public void sendEnterElement( int threadId,
- String uri, String local, String qname, Attributes atts) throws SAXException {
-
- _receivers[threadId].enterElement(uri,local,qname,atts);
- }
-
- public void sendLeaveAttribute( int threadId,
- String uri, String local, String qname) throws SAXException {
-
- _receivers[threadId].leaveAttribute(uri,local,qname);
- }
-
- public void sendLeaveElement( int threadId,
- String uri, String local, String qname) throws SAXException {
-
- _receivers[threadId].leaveElement(uri,local,qname);
- }
-
- public void sendText(int threadId, String value) throws SAXException {
- _receivers[threadId].text(value);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCRuntime.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCRuntime.java
deleted file mode 100644
index a9184d6f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCRuntime.java
+++ /dev/null
@@ -1,557 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.jxc.gen.config;
-
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Stack;
-import java.util.StringTokenizer;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * Runtime Engine for RELAXNGCC execution.
- *
- * This class has the following functionalities:
- *
- * <ol>
- * <li>Managing a stack of NGCCHandler objects and
- * switching between them appropriately.
- *
- * <li>Keep track of all Attributes.
- *
- * <li>manage mapping between namespace URIs and prefixes.
- *
- * <li>TODO: provide support for interleaving.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * @version $Id: NGCCRuntime.java,v 1.15 2002/09/29 02:55:48 okajima Exp $
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class NGCCRuntime implements ContentHandler, NGCCEventSource {
-
- public NGCCRuntime() {
- reset();
- }
-
- /**
- * Sets the root handler, which will be used to parse the
- * root element.
- * <p>
- * This method can be called right after the object is created
- * or the reset method is called. You can't replace the root
- * handler while parsing is in progress.
- * <p>
- * Usually a generated class that corresponds to the &lt;start>
- * pattern will be used as the root handler, but any NGCCHandler
- * can be a root handler.
- *
- * @exception IllegalStateException
- * If this method is called but it doesn't satisfy the
- * pre-condition stated above.
- */
- public void setRootHandler( NGCCHandler rootHandler ) {
- if(currentHandler!=null)
- throw new IllegalStateException();
- currentHandler = rootHandler;
- }
-
-
- /**
- * Cleans up all the data structure so that the object can be reused later.
- * Normally, applications do not need to call this method directly,
- *
- * as the runtime resets itself after the endDocument method.
- */
- public void reset() {
- attStack.clear();
- currentAtts = null;
- currentHandler = null;
- indent=0;
- locator = null;
- namespaces.clear();
- needIndent = true;
- redirect = null;
- redirectionDepth = 0;
- text = new StringBuffer();
-
- // add a dummy attributes at the bottom as a "centinel."
- attStack.push(new AttributesImpl());
- }
-
- // current content handler can be acccessed via set/getContentHandler.
-
- private Locator locator;
- public void setDocumentLocator( Locator _loc ) { this.locator=_loc; }
- /**
- * Gets the source location of the current event.
- *
- * <p>
- * One can call this method from RelaxNGCC handlers to access
- * the line number information. Note that to
- */
- public Locator getLocator() { return locator; }
-
-
- /** stack of {@link Attributes}. */
- private final Stack attStack = new Stack();
- /** current attributes set. always equal to attStack.peek() */
- private AttributesImpl currentAtts;
-
- /**
- * Attributes that belong to the current element.
- * <p>
- * It's generally not recommended for applications to use
- * this method. RelaxNGCC internally removes processed attributes,
- * so this doesn't correctly reflect all the attributes an element
- * carries.
- */
- public Attributes getCurrentAttributes() {
- return currentAtts;
- }
-
- /** accumulated text. */
- private StringBuffer text = new StringBuffer();
-
-
-
-
- /** The current NGCCHandler. Always equals to handlerStack.peek() */
- private NGCCEventReceiver currentHandler;
-
- public int replace( NGCCEventReceiver o, NGCCEventReceiver n ) {
- if(o!=currentHandler)
- throw new IllegalStateException(); // bug of RelaxNGCC
- currentHandler = n;
-
- return 0; // we only have one thread.
- }
-
- /**
- * Processes buffered text.
- *
- * This method will be called by the start/endElement event to process
- * buffered text as a text event.
- *
- * <p>
- * Whitespace handling is a tricky business. Consider the following
- * schema fragment:
- *
- * <xmp>
- * <element name="foo">
- * <choice>
- * <element name="bar"><empty/></element>
- * <text/>
- * </choice>
- * </element>
- * </xmp>
- *
- * Assume we hit the following instance:
- * <xmp>
- * <foo> <bar/></foo>
- * </xmp>
- *
- * Then this first space needs to be ignored (for otherwise, we will
- * end up treating this space as the match to &lt;text/> and won't
- * be able to process &lt;bar>.)
- *
- * Now assume the following instance:
- * <xmp>
- * <foo/>
- * </xmp>
- *
- * This time, we need to treat this empty string as a text, for
- * otherwise we won't be able to accept this instance.
- *
- * <p>
- * This is very difficult to solve in general, but one seemingly
- * easy solution is to use the type of next event. If a text is
- * followed by a start tag, it follows from the constraint on
- * RELAX NG that that text must be either whitespaces or a match
- * to &lt;text/>.
- *
- * <p>
- * On the contrary, if a text is followed by a end tag, then it
- * cannot be whitespace unless the content model can accept empty,
- * in which case sending a text event will be harmlessly ignored
- * by the NGCCHandler.
- *
- * <p>
- * Thus this method take one parameter, which controls the
- * behavior of this method.
- *
- * <p>
- * TODO: according to the constraint of RELAX NG, if characters
- * follow an end tag, then they must be either whitespaces or
- * must match to &lt;text/>.
- *
- * @param possiblyWhitespace
- * True if the buffered character can be ignorabale. False if
- * it needs to be consumed.
- */
- private void processPendingText(boolean ignorable) throws SAXException {
- if(ignorable && text.toString().trim().length()==0)
- ; // ignore. See the above javadoc comment for the description
- else
- currentHandler.text(text.toString()); // otherwise consume this token
-
- // truncate StringBuffer, but avoid excessive allocation.
- if(text.length()>1024) text = new StringBuffer();
- else text.setLength(0);
- }
-
- public void processList( String str ) throws SAXException {
- StringTokenizer t = new StringTokenizer(str, " \t\r\n");
- while(t.hasMoreTokens())
- currentHandler.text(t.nextToken());
- }
-
- public void startElement(String uri, String localname, String qname, Attributes atts)
- throws SAXException {
-
- if(redirect!=null) {
- redirect.startElement(uri,localname,qname,atts);
- redirectionDepth++;
- } else {
- processPendingText(true);
- // System.out.println("startElement:"+localname+"->"+_attrStack.size());
- currentHandler.enterElement(uri, localname, qname, atts);
- }
- }
-
- /**
- * Called by the generated handler code when an enter element
- * event is consumed.
- *
- * <p>
- * Pushes a new attribute set.
- *
- * <p>
- * Note that attributes are NOT pushed at the startElement method,
- * because the processing of the enterElement event can trigger
- * other attribute events and etc.
- * <p>
- * This method will be called from one of handlers when it truely
- * consumes the enterElement event.
- */
- public void onEnterElementConsumed(
- String uri, String localName, String qname,Attributes atts) throws SAXException {
- attStack.push(currentAtts=new AttributesImpl(atts));
- nsEffectiveStack.push( new Integer(nsEffectivePtr) );
- nsEffectivePtr = namespaces.size();
- }
-
- public void onLeaveElementConsumed(String uri, String localName, String qname) throws SAXException {
- attStack.pop();
- if(attStack.isEmpty())
- currentAtts = null;
- else
- currentAtts = (AttributesImpl)attStack.peek();
- nsEffectivePtr = ((Integer)nsEffectiveStack.pop()).intValue();
- }
-
- public void endElement(String uri, String localname, String qname)
- throws SAXException {
-
- if(redirect!=null) {
- redirect.endElement(uri,localname,qname);
- redirectionDepth--;
-
- if(redirectionDepth!=0)
- return;
-
- // finished redirection.
- for( int i=0; i<namespaces.size(); i+=2 )
- redirect.endPrefixMapping((String)namespaces.get(i));
- redirect.endDocument();
-
- redirect = null;
- // then process this element normally
- }
-
- processPendingText(false);
-
- currentHandler.leaveElement(uri, localname, qname);
-// System.out.println("endElement:"+localname);
- }
-
- public void characters(char[] ch, int start, int length) throws SAXException {
- if(redirect!=null)
- redirect.characters(ch,start,length);
- else
- text.append(ch,start,length);
- }
- public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
- if(redirect!=null)
- redirect.ignorableWhitespace(ch,start,length);
- else
- text.append(ch,start,length);
- }
-
- public int getAttributeIndex(String uri, String localname) {
- return currentAtts.getIndex(uri, localname);
- }
- public void consumeAttribute(int index) throws SAXException {
- final String uri = currentAtts.getURI(index);
- final String local = currentAtts.getLocalName(index);
- final String qname = currentAtts.getQName(index);
- final String value = currentAtts.getValue(index);
- currentAtts.removeAttribute(index);
-
- currentHandler.enterAttribute(uri,local,qname);
- currentHandler.text(value);
- currentHandler.leaveAttribute(uri,local,qname);
- }
-
-
- public void startPrefixMapping( String prefix, String uri ) throws SAXException {
- if(redirect!=null)
- redirect.startPrefixMapping(prefix,uri);
- else {
- namespaces.add(prefix);
- namespaces.add(uri);
- }
- }
-
- public void endPrefixMapping( String prefix ) throws SAXException {
- if(redirect!=null)
- redirect.endPrefixMapping(prefix);
- else {
- namespaces.remove(namespaces.size()-1);
- namespaces.remove(namespaces.size()-1);
- }
- }
-
- public void skippedEntity( String name ) throws SAXException {
- if(redirect!=null)
- redirect.skippedEntity(name);
- }
-
- public void processingInstruction( String target, String data ) throws SAXException {
- if(redirect!=null)
- redirect.processingInstruction(target,data);
- }
-
- /** Impossible token. This value can never be a valid XML name. */
- static final String IMPOSSIBLE = "\u0000";
-
- public void endDocument() throws SAXException {
- // consume the special "end document" token so that all the handlers
- // currently at the stack will revert to their respective parents.
- //
- // this is necessary to handle a grammar like
- // <start><ref name="X"/></start>
- // <define name="X">
- // <element name="root"><empty/></element>
- // </define>
- //
- // With this grammar, when the endElement event is consumed, two handlers
- // are on the stack (because a child object won't revert to its parent
- // unless it sees a next event.)
-
- // pass around an "impossible" token.
- currentHandler.leaveElement(IMPOSSIBLE,IMPOSSIBLE,IMPOSSIBLE);
-
- reset();
- }
- public void startDocument() {}
-
-
-
-
-//
-//
-// event dispatching methods
-//
-//
-
- public void sendEnterAttribute( int threadId,
- String uri, String local, String qname) throws SAXException {
-
- currentHandler.enterAttribute(uri,local,qname);
- }
-
- public void sendEnterElement( int threadId,
- String uri, String local, String qname, Attributes atts) throws SAXException {
-
- currentHandler.enterElement(uri,local,qname,atts);
- }
-
- public void sendLeaveAttribute( int threadId,
- String uri, String local, String qname) throws SAXException {
-
- currentHandler.leaveAttribute(uri,local,qname);
- }
-
- public void sendLeaveElement( int threadId,
- String uri, String local, String qname) throws SAXException {
-
- currentHandler.leaveElement(uri,local,qname);
- }
-
- public void sendText(int threadId, String value) throws SAXException {
- currentHandler.text(value);
- }
-
-
-//
-//
-// redirection of SAX2 events.
-//
-//
- /** When redirecting a sub-tree, this value will be non-null. */
- private ContentHandler redirect = null;
-
- /**
- * Counts the depth of the elements when we are re-directing
- * a sub-tree to another ContentHandler.
- */
- private int redirectionDepth = 0;
-
- /**
- * This method can be called only from the enterElement handler.
- * The sub-tree rooted at the new element will be redirected
- * to the specified ContentHandler.
- *
- * <p>
- * Currently active NGCCHandler will only receive the leaveElement
- * event of the newly started element.
- *
- * @param uri,local,qname
- * Parameters passed to the enter element event. Used to
- * simulate the startElement event for the new ContentHandler.
- */
- public void redirectSubtree( ContentHandler child,
- String uri, String local, String qname ) throws SAXException {
-
- redirect = child;
- redirect.setDocumentLocator(locator);
- redirect.startDocument();
-
- // TODO: when a prefix is re-bound to something else,
- // the following code is potentially dangerous. It should be
- // modified to report active bindings only.
- for( int i=0; i<namespaces.size(); i+=2 )
- redirect.startPrefixMapping(
- (String)namespaces.get(i),
- (String)namespaces.get(i+1)
- );
-
- redirect.startElement(uri,local,qname,currentAtts);
- redirectionDepth=1;
- }
-
-//
-//
-// validation context implementation
-//
-//
- /** in-scope namespace mapping.
- * namespaces[2n ] := prefix
- * namespaces[2n+1] := namespace URI */
- private final ArrayList namespaces = new ArrayList();
- /**
- * Index on the namespaces array, which points to
- * the top of the effective bindings. Because of the
- * timing difference between the startPrefixMapping method
- * and the execution of the corresponding actions,
- * this value can be different from <code>namespaces.size()</code>.
- * <p>
- * For example, consider the following schema:
- * <pre><xmp>
- * <oneOrMore>
- * <element name="foo"><empty/></element>
- * </oneOrMore>
- * code fragment X
- * <element name="bob"/>
- * </xmp></pre>
- * Code fragment X is executed after we see a startElement event,
- * but at this time the namespaces variable already include new
- * namespace bindings declared on "bob".
- */
- private int nsEffectivePtr=0;
-
- /**
- * Stack to preserve old nsEffectivePtr values.
- */
- private final Stack nsEffectiveStack = new Stack();
-
- public String resolveNamespacePrefix( String prefix ) {
- for( int i = nsEffectivePtr-2; i>=0; i-=2 )
- if( namespaces.get(i).equals(prefix) )
- return (String)namespaces.get(i+1);
-
- // no binding was found.
- if(prefix.equals("")) return ""; // return the default no-namespace
- if(prefix.equals("xml")) // pre-defined xml prefix
- return "http://www.w3.org/XML/1998/namespace";
- else return null; // prefix undefined
- }
-
-
-// error reporting
- protected void unexpectedX(String token) throws SAXException {
- throw new SAXParseException(MessageFormat.format(
- "Unexpected {0} appears at line {1} column {2}",
- new Object[]{
- token,
- new Integer(getLocator().getLineNumber()),
- new Integer(getLocator().getColumnNumber()) }),
- getLocator());
- }
-
-
-
-
-//
-//
-// trace functions
-//
-//
- private int indent=0;
- private boolean needIndent=true;
- private void printIndent() {
- for( int i=0; i<indent; i++ )
- System.out.print(" ");
- }
- public void trace( String s ) {
- if(needIndent) {
- needIndent=false;
- printIndent();
- }
- System.out.print(s);
- }
- public void traceln( String s ) {
- trace(s);
- trace("\n");
- needIndent=true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Schema.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Schema.java
deleted file mode 100644
index f238314c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Schema.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.tools.internal.jxc.gen.config;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.tools.internal.jxc.NGCCRuntimeEx;
-
-import java.io.File;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public class Schema extends NGCCHandler {
- private File baseDir;
- private String loc;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public Schema(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, File _baseDir) {
- super(source, parent, cookie);
- $runtime = runtime;
- this.baseDir = _baseDir;
- $_ngcc_current_state = 10;
- }
-
- public Schema(NGCCRuntimeEx runtime, File _baseDir) {
- this(null, runtime, runtime, -1, _baseDir);
- }
-
- private void action0()throws SAXException {
- location = new File(baseDir,loc);
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 2:
- {
- if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 10:
- {
- if(($__uri.equals("") && $__local.equals("schema"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 6;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- if(($__uri.equals("") && $__local.equals("schema"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- if(($__uri.equals("") && $__local.equals("location"))) {
- $_ngcc_current_state = 4;
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 6:
- {
- if(($__uri.equals("") && $__local.equals("namespace"))) {
- $_ngcc_current_state = 8;
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 3:
- {
- if(($__uri.equals("") && $__local.equals("location"))) {
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 7:
- {
- if(($__uri.equals("") && $__local.equals("namespace"))) {
- $_ngcc_current_state = 2;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 6:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 8:
- {
- namespace = $value;
- $_ngcc_current_state = 7;
- }
- break;
- case 4:
- {
- loc = $value;
- $_ngcc_current_state = 3;
- action0();
- }
- break;
- case 0:
- {
- revertToParentFromText(this, super._cookie, $value);
- }
- break;
- case 2:
- {
- if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- }
- }
-
- public void onChildCompleted(Object result, int cookie, boolean needAttCheck)throws SAXException {
- switch(cookie) {
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private File location;
- private String namespace;
- public String getNamespace() { return this.namespace;}
- public File getLocation() { return this.location;}
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/config.rng b/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/config.rng
deleted file mode 100644
index 2f201b0d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/config.rng
+++ /dev/null
@@ -1,131 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:r="http://relaxng.org/ns/structure/1.0"
- xmlns:a="http://relaxng.org/ns/annotation/1.0"
- xmlns:ref="urn:crossreference"
- xmlns:c="http://www.xml.gr.jp/xmlns/relaxngcc"
- c:runtime-type="com.sun.tools.internal.jxc.NGCCRuntimeEx"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
- c:package="com.sun.tools.internal.jxc.gen.config">
-
-
-<start c:class="Config" c:access="public">
-
- <c:java-import>
- import java.util.List;
- import java.util.ArrayList;
- import java.io.File;
- </c:java-import>
-
-<c:java-body>
- private File baseDir;
- private Classes classes;
- private List schema = new ArrayList();
- public Classes getClasses() { return this.classes;}
- public File getBaseDir() { return baseDir;}
- public List getSchema() { return this.schema;}
-</c:java-body>
-
- <element name="config">
- <attribute name="baseDir">
- bd = <data type="string"/>
- baseDir = $runtime.getBaseDir(bd);
- </attribute>
- <ref name="Classes" c:alias="classes"/>
- <zeroOrMore>
- <ref name="Schema" c:alias="_schema" />(baseDir);
- this.schema.add (_schema);
- </zeroOrMore>
- </element>
- </start>
-
-
- <define name="Classes" c:access="public">
- <c:java-import>
- import java.util.List;
- import java.util.ArrayList;
- </c:java-import>
- <c:java-body>
- private List includes = new ArrayList();
- public List getIncludes() { return $runtime.getIncludePatterns(this.includes);}
- private List excludes = new ArrayList();
- public List getExcludes() { return $runtime.getExcludePatterns(this.excludes);}
- </c:java-body>
- <element name="classes">
-
- <element name="includes">
- <list>
- <oneOrMore>
- <data type="string" c:alias="include_content"/>
- <c:java> this.includes.add(include_content); </c:java>
- </oneOrMore>
- </list>
-
- </element>
- <optional>
- <element name="excludes">
- <list>
- <zeroOrMore>
- <data type="string" c:alias="exclude_content"/>
- <c:java> this.excludes.add(exclude_content); </c:java>
- </zeroOrMore>
- </list>
-
- </element>
- </optional>
- </element>
- </define>
-
-
- <define name="Schema" c:access="public" c:params="File baseDir">
- <c:java-import>
- import java.io.File;
- </c:java-import>
- <c:java-body>
- private File location;
- private String namespace;
- public String getNamespace() { return this.namespace;}
- public File getLocation() { return this.location;}
- </c:java-body>
- <element name="schema">
- <optional>
- <attribute name="namespace">
- namespace = <data type="string" />
- </attribute>
- </optional>
-
- <optional>
- <attribute name="location">
- loc = <data type="string" />
- location = new File(baseDir,loc);
- </attribute>
- </optional>
- </element>
- </define>
-</grammar>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/config.xsd b/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/config.xsd
deleted file mode 100644
index e3075087..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/config.xsd
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<!-- THIS IS A GENERATED FILE. DO NOT MODIFY. -->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
- <xs:element name="config">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="classes"/>
- <xs:element minOccurs="0" maxOccurs="unbounded" ref="schema"/>
- </xs:sequence>
- <xs:attribute name="baseDir" use="required" type="xs:string"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="classes">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="includes"/>
- <xs:element minOccurs="0" ref="excludes"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="includes">
- <xs:simpleType>
- <xs:restriction>
- <xs:simpleType>
- <xs:list itemType="xs:string"/>
- </xs:simpleType>
- <xs:minLength value="1"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:element>
- <xs:element name="excludes">
- <xs:simpleType>
- <xs:list itemType="xs:string"/>
- </xs:simpleType>
- </xs:element>
- <xs:element name="schema">
- <xs:complexType>
- <xs:attribute name="namespace" type="xs:string"/>
- <xs:attribute name="location" type="xs:string"/>
- </xs:complexType>
- </xs:element>
-</xs:schema>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java b/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java
deleted file mode 100644
index dcdaae3a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java
+++ /dev/null
@@ -1,517 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.jxc.model.nav;
-
-import com.sun.source.tree.CompilationUnitTree;
-import com.sun.source.util.TreePath;
-import com.sun.source.util.Trees;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ElementKind;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.Modifier;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.TypeParameterElement;
-import javax.lang.model.element.VariableElement;
-import javax.lang.model.type.ArrayType;
-import javax.lang.model.type.DeclaredType;
-import javax.lang.model.type.PrimitiveType;
-import javax.lang.model.type.TypeKind;
-import javax.lang.model.type.TypeMirror;
-import javax.lang.model.type.TypeVariable;
-import javax.lang.model.type.TypeVisitor;
-import javax.lang.model.type.WildcardType;
-import javax.lang.model.util.ElementFilter;
-import javax.lang.model.util.Elements;
-import javax.lang.model.util.SimpleTypeVisitor6;
-import javax.lang.model.util.Types;
-
-/**
- * {@link Navigator} implementation for annotation processing.
- * TODO: check the spec on how generics are supposed to be handled
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public final class ApNavigator implements Navigator<TypeMirror, TypeElement, VariableElement, ExecutableElement> {
-
- private final ProcessingEnvironment env;
-
- private final PrimitiveType primitiveByte;
-
- public ApNavigator(ProcessingEnvironment env) {
- this.env = env;
- this.primitiveByte = env.getTypeUtils().getPrimitiveType(TypeKind.BYTE);
- }
-
- public TypeElement getSuperClass(TypeElement typeElement) {
- if (typeElement.getKind().equals(ElementKind.CLASS)) {
- TypeMirror sup = typeElement.getSuperclass();
- if (!sup.getKind().equals(TypeKind.NONE))
- return (TypeElement) ((DeclaredType) sup).asElement();
- else
- return null;
- }
- return env.getElementUtils().getTypeElement(Object.class.getName());
- }
-
- public TypeMirror getBaseClass(TypeMirror type, TypeElement sup) {
- return baseClassFinder.visit(type, sup);
- }
-
- public String getClassName(TypeElement t) {
- return t.getQualifiedName().toString();
- }
-
- public String getTypeName(TypeMirror typeMirror) {
- return typeMirror.toString();
- }
-
- public String getClassShortName(TypeElement t) {
- return t.getSimpleName().toString();
- }
-
- public Collection<VariableElement> getDeclaredFields(TypeElement typeElement) {
- return ElementFilter.fieldsIn(typeElement.getEnclosedElements());
- }
-
- public VariableElement getDeclaredField(TypeElement clazz, String fieldName) {
- for (VariableElement fd : ElementFilter.fieldsIn(clazz.getEnclosedElements())) {
- if (fd.getSimpleName().toString().equals(fieldName))
- return fd;
- }
- return null;
- }
-
- public Collection<ExecutableElement> getDeclaredMethods(TypeElement typeElement) {
- return ElementFilter.methodsIn(typeElement.getEnclosedElements());
- }
-
- public TypeElement getDeclaringClassForField(VariableElement f) {
- return (TypeElement) f.getEnclosingElement();
- }
-
- public TypeElement getDeclaringClassForMethod(ExecutableElement m) {
- return (TypeElement) m.getEnclosingElement();
- }
-
- public TypeMirror getFieldType(VariableElement f) {
- return f.asType();
- }
-
- public String getFieldName(VariableElement f) {
- return f.getSimpleName().toString();
- }
-
- public String getMethodName(ExecutableElement m) {
- return m.getSimpleName().toString();
- }
-
- public TypeMirror getReturnType(ExecutableElement m) {
- return m.getReturnType();
- }
-
- public TypeMirror[] getMethodParameters(ExecutableElement m) {
- Collection<? extends VariableElement> ps = m.getParameters();
- TypeMirror[] r = new TypeMirror[ps.size()];
- int i=0;
- for (VariableElement p : ps)
- r[i++] = p.asType();
- return r;
- }
-
- public boolean isStaticMethod(ExecutableElement m) {
- return hasModifier(m, Modifier.STATIC);
- }
-
- public boolean isFinalMethod(ExecutableElement m) {
- return hasModifier(m, Modifier.FINAL);
- }
-
- private boolean hasModifier(Element d, Modifier mod) {
- return d.getModifiers().contains(mod);
- }
-
- public boolean isSubClassOf(TypeMirror sub, TypeMirror sup) {
- if(sup==DUMMY)
- // see ref(). if the sub type is known to Annotation Processing,
- // its base class must be known. Thus if the sup is DUMMY,
- // it cannot possibly be the super type.
- return false;
- return env.getTypeUtils().isSubtype(sub,sup);
- }
-
- private String getSourceClassName(Class clazz) {
- Class<?> d = clazz.getDeclaringClass();
- if(d==null)
- return clazz.getName();
- else {
- String shortName = clazz.getName().substring(d.getName().length()+1/*for $*/);
- return getSourceClassName(d)+'.'+shortName;
- }
- }
-
- public TypeMirror ref(Class c) {
- if(c.isArray())
- return env.getTypeUtils().getArrayType( ref(c.getComponentType()) );
- if(c.isPrimitive())
- return getPrimitive(c);
- TypeElement t = env.getElementUtils().getTypeElement(getSourceClassName(c));
- // Annotation Processing only operates on a set of classes used in the compilation,
- // and it won't recognize additional classes (even if they are visible from javac)
- // and return null.
- //
- // this is causing a problem where we check if a type is collection.
- // so until the problem is fixed in Annotation Processing, work around the issue
- // by returning a dummy token
- // TODO: check if this is still valid
- if(t==null)
- return DUMMY;
- return env.getTypeUtils().getDeclaredType(t);
- }
-
- public TypeMirror use(TypeElement t) {
- assert t != null;
- return env.getTypeUtils().getDeclaredType(t);
- }
-
- public TypeElement asDecl(TypeMirror m) {
- m = env.getTypeUtils().erasure(m);
- if (m.getKind().equals(TypeKind.DECLARED)) {
- DeclaredType d = (DeclaredType) m;
- return (TypeElement) d.asElement();
- } else
- return null;
- }
-
- public TypeElement asDecl(Class c) {
- return env.getElementUtils().getTypeElement(getSourceClassName(c));
- }
-
- public TypeMirror erasure(TypeMirror t) {
- Types tu = env.getTypeUtils();
- t = tu.erasure(t);
- if (t.getKind().equals(TypeKind.DECLARED)) {
- DeclaredType dt = (DeclaredType)t;
- if (!dt.getTypeArguments().isEmpty())
- return tu.getDeclaredType((TypeElement) dt.asElement());
- }
- return t;
- }
-
- public boolean isAbstract(TypeElement clazz) {
- return hasModifier(clazz,Modifier.ABSTRACT);
- }
-
- public boolean isFinal(TypeElement clazz) {
- return hasModifier(clazz, Modifier.FINAL);
- }
-
- public VariableElement[] getEnumConstants(TypeElement clazz) {
- List<? extends Element> elements = env.getElementUtils().getAllMembers(clazz);
- Collection<VariableElement> constants = new ArrayList<VariableElement>();
- for (Element element : elements) {
- if (element.getKind().equals(ElementKind.ENUM_CONSTANT)) {
- constants.add((VariableElement) element);
- }
- }
- return constants.toArray(new VariableElement[constants.size()]);
- }
-
- public TypeMirror getVoidType() {
- return env.getTypeUtils().getNoType(TypeKind.VOID);
- }
-
- public String getPackageName(TypeElement clazz) {
- return env.getElementUtils().getPackageOf(clazz).getQualifiedName().toString();
- }
-
- @Override
- public TypeElement loadObjectFactory(TypeElement referencePoint, String packageName) {
- return env.getElementUtils().getTypeElement(packageName + ".ObjectFactory");
- }
-
- public boolean isBridgeMethod(ExecutableElement method) {
- return method.getModifiers().contains(Modifier.VOLATILE);
- }
-
- public boolean isOverriding(ExecutableElement method, TypeElement base) {
- Elements elements = env.getElementUtils();
-
- while (true) {
- for (ExecutableElement m : ElementFilter.methodsIn(elements.getAllMembers(base))) {
- if (elements.overrides(method, m, base))
- return true;
- }
-
- if (base.getSuperclass().getKind().equals(TypeKind.NONE))
- return false;
- base = (TypeElement) env.getTypeUtils().asElement(base.getSuperclass());
- }
- }
-
- public boolean isInterface(TypeElement clazz) {
- return clazz.getKind().isInterface();
- }
-
- public boolean isTransient(VariableElement f) {
- return f.getModifiers().contains(Modifier.TRANSIENT);
- }
-
- public boolean isInnerClass(TypeElement clazz) {
- return clazz.getEnclosingElement() != null && !clazz.getModifiers().contains(Modifier.STATIC);
- }
-
- @Override
- public boolean isSameType(TypeMirror t1, TypeMirror t2) {
- return env.getTypeUtils().isSameType(t1, t2);
- }
-
- public boolean isArray(TypeMirror type) {
- return type != null && type.getKind().equals(TypeKind.ARRAY);
- }
-
- public boolean isArrayButNotByteArray(TypeMirror t) {
- if(!isArray(t))
- return false;
-
- ArrayType at = (ArrayType) t;
- TypeMirror ct = at.getComponentType();
-
- return !ct.equals(primitiveByte);
- }
-
- public TypeMirror getComponentType(TypeMirror t) {
- if (isArray(t)) {
- ArrayType at = (ArrayType) t;
- return at.getComponentType();
- }
-
- throw new IllegalArgumentException();
- }
-
- public TypeMirror getTypeArgument(TypeMirror typeMirror, int i) {
- if (typeMirror != null && typeMirror.getKind().equals(TypeKind.DECLARED)) {
- DeclaredType declaredType = (DeclaredType) typeMirror;
- TypeMirror[] args = declaredType.getTypeArguments().toArray(new TypeMirror[declaredType.getTypeArguments().size()]);
- return args[i];
- } else throw new IllegalArgumentException();
- }
-
- public boolean isParameterizedType(TypeMirror typeMirror) {
- if (typeMirror != null && typeMirror.getKind().equals(TypeKind.DECLARED)) {
- DeclaredType d = (DeclaredType) typeMirror;
- return !d.getTypeArguments().isEmpty();
- }
- return false;
- }
-
- public boolean isPrimitive(TypeMirror t) {
- return t.getKind().isPrimitive();
- }
-
- private static final Map<Class, TypeKind> primitives = new HashMap<Class, TypeKind>();
-
- static {
- primitives.put(Integer.TYPE, TypeKind.INT);
- primitives.put(Byte.TYPE, TypeKind.BYTE);
- primitives.put(Float.TYPE, TypeKind.FLOAT);
- primitives.put(Boolean.TYPE, TypeKind.BOOLEAN);
- primitives.put(Short.TYPE, TypeKind.SHORT);
- primitives.put(Long.TYPE, TypeKind.LONG);
- primitives.put(Double.TYPE, TypeKind.DOUBLE);
- primitives.put(Character.TYPE, TypeKind.CHAR);
- }
-
- public TypeMirror getPrimitive(Class primitiveType) {
- assert primitiveType.isPrimitive();
- if(primitiveType==void.class)
- return getVoidType();
- return env.getTypeUtils().getPrimitiveType(primitives.get(primitiveType));
- }
-
- /**
- * see {@link #ref(Class)}.
- */
- private static final TypeMirror DUMMY = new TypeMirror() {
- @Override
- public <R, P> R accept(TypeVisitor<R, P> v, P p) {
- throw new IllegalStateException();
- }
-
- @Override
- public TypeKind getKind() {
- throw new IllegalStateException();
- }
-
-// @Override
- public List<? extends AnnotationMirror> getAnnotationMirrors() {
- throw new IllegalStateException();
- }
-
-// @Override
- public <A extends Annotation> A getAnnotation(Class<A> annotationType) {
- throw new IllegalStateException();
- }
-
-// @Override
- public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) {
- throw new IllegalStateException();
- }
- };
-
- public Location getClassLocation(TypeElement typeElement) {
- Trees trees = Trees.instance(env);
- return getLocation(typeElement.getQualifiedName().toString(), trees.getPath(typeElement));
- }
-
- public Location getFieldLocation(VariableElement variableElement) {
- return getLocation(variableElement);
- }
-
- public Location getMethodLocation(ExecutableElement executableElement) {
- return getLocation(executableElement);
- }
-
- public boolean hasDefaultConstructor(TypeElement t) {
- if (t == null || !t.getKind().equals(ElementKind.CLASS))
- return false;
-
- for (ExecutableElement init : ElementFilter.constructorsIn(env.getElementUtils().getAllMembers(t))) {
- if (init.getParameters().isEmpty())
- return true;
- }
- return false;
- }
-
- public boolean isStaticField(VariableElement f) {
- return hasModifier(f,Modifier.STATIC);
- }
-
- public boolean isPublicMethod(ExecutableElement m) {
- return hasModifier(m,Modifier.PUBLIC);
- }
-
- public boolean isPublicField(VariableElement f) {
- return hasModifier(f,Modifier.PUBLIC);
- }
-
- public boolean isEnum(TypeElement t) {
- return t != null && t.getKind().equals(ElementKind.ENUM);
- }
-
- private Location getLocation(Element element) {
- Trees trees = Trees.instance(env);
- return getLocation(
- ((TypeElement) element.getEnclosingElement()).getQualifiedName() + "." + element.getSimpleName(),
- trees.getPath(element)
- );
- }
-
- private Location getLocation(final String name, final TreePath treePath) {
- return new Location() {
- public String toString() {
- if (treePath == null)
- return name + " (Unknown Source)";
- // just like stack trace, we just print the file name and
- // not the whole path. The idea is that the package name should
- // provide enough clue on which directory it lives.
- CompilationUnitTree compilationUnit = treePath.getCompilationUnit();
- Trees trees = Trees.instance(env);
- long startPosition = trees.getSourcePositions().getStartPosition(compilationUnit, treePath.getLeaf());
- return name + "(" +
- compilationUnit.getSourceFile().getName() + ":" + compilationUnit.getLineMap().getLineNumber(startPosition) +
- ")";
- }
- };
- }
-
- /**
- * Implements {@link #getBaseClass}.
- */
- private final SimpleTypeVisitor6<TypeMirror, TypeElement> baseClassFinder = new SimpleTypeVisitor6<TypeMirror, TypeElement>() {
- @Override
- public TypeMirror visitDeclared(DeclaredType t, TypeElement sup) {
- if (t.asElement().equals(sup))
- return t;
-
- for (TypeMirror i : env.getTypeUtils().directSupertypes(t)) {
- TypeMirror r = visitDeclared((DeclaredType) i, sup);
- if (r != null)
- return r;
- }
-
- // otherwise recursively apply super class and base types
- TypeMirror superclass = ((TypeElement) t.asElement()).getSuperclass();
- if (!superclass.getKind().equals(TypeKind.NONE)) {
- TypeMirror r = visitDeclared((DeclaredType) superclass, sup);
- if (r != null)
- return r;
- }
- return null;
- }
-
- @Override
- public TypeMirror visitTypeVariable(TypeVariable t, TypeElement typeElement) {
- // we are checking if T (declared as T extends A&B&C) is assignable to sup.
- // so apply bounds recursively.
- for (TypeMirror typeMirror : ((TypeParameterElement) t.asElement()).getBounds()) {
- TypeMirror m = visit(typeMirror, typeElement);
- if (m != null)
- return m;
- }
- return null;
- }
-
- @Override
- public TypeMirror visitArray(ArrayType t, TypeElement typeElement) {
- // we are checking if t=T[] is assignable to sup.
- // the only case this is allowed is sup=Object,
- // and Object isn't parameterized.
- return null;
- }
-
- @Override
- public TypeMirror visitWildcard(WildcardType t, TypeElement typeElement) {
- // we are checking if T (= ? extends A&B&C) is assignable to sup.
- // so apply bounds recursively.
- return visit(t.getExtendsBound(), typeElement);
- }
-
- @Override
- protected TypeMirror defaultAction(TypeMirror e, TypeElement typeElement) {
- return e;
- }
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/Invoker.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/Invoker.java
deleted file mode 100644
index a0368e87..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/Invoker.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws;
-
-import com.sun.istack.internal.tools.MaskingClassLoader;
-import com.sun.istack.internal.tools.ParallelWorldClassLoader;
-import com.sun.tools.internal.ws.resources.WscompileMessages;
-import com.sun.tools.internal.ws.wscompile.Options;
-import com.sun.tools.internal.xjc.api.util.ToolsJarNotFoundException;
-import com.sun.xml.internal.bind.util.Which;
-
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.namespace.QName;
-import java.io.File;
-import java.io.OutputStream;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Invokes JAX-WS tools in a special class loader that can pick up annotation processing classes,
- * even if it's not available in the tool launcher classpath.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class Invoker {
-
- /**
- * The list of package prefixes we want the
- * {@link MaskingClassLoader} to prevent the parent
- * classLoader from loading
- */
- static final String[] maskedPackages = new String[]{
- "com.sun.istack.internal.tools.",
- "com.sun.tools.internal.jxc.",
- "com.sun.tools.internal.xjc.",
- "com.sun.tools.internal.ws.",
- "com.sun.codemodel.internal.",
- "com.sun.relaxng.",
- "com.sun.xml.internal.xsom.",
- "com.sun.xml.internal.bind.",
- "com.ctc.wstx.", //wsimport, wsgen ant task
- "org.codehaus.stax2.", //wsimport, wsgen ant task
- "com.sun.xml.internal.messaging.saaj.", //wsgen ant task
- "com.sun.xml.internal.ws.",
- "com.oracle.webservices.internal.api." //wsgen
- };
-
- /**
- * Escape hatch to work around IBM JDK problem.
- * See http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?nav=false&forum=367&thread=164718&cat=10
- */
- public static final boolean noSystemProxies;
-
- static {
- boolean noSysProxiesProperty = false;
- try {
- noSysProxiesProperty = Boolean.getBoolean(Invoker.class.getName()+".noSystemProxies");
- } catch(SecurityException e) {
- // ignore
- } finally {
- noSystemProxies = noSysProxiesProperty;
- }
- }
-
- static int invoke(String mainClass, String[] args) throws Throwable {
- // use the platform default proxy if available.
- // see sun.net.spi.DefaultProxySelector for details.
- if(!noSystemProxies) {
- try {
- System.setProperty("java.net.useSystemProxies","true");
- } catch (SecurityException e) {
- // failing to set this property isn't fatal
- }
- }
-
- ClassLoader oldcc = Thread.currentThread().getContextClassLoader();
- try {
- ClassLoader cl = Invoker.class.getClassLoader();
- if(Arrays.asList(args).contains("-Xendorsed"))
- cl = createClassLoader(cl); // perform JDK6 workaround hack
- else {
- int targetArgIndex = Arrays.asList(args).indexOf("-target");
- Options.Target targetVersion;
- if (targetArgIndex != -1) {
- targetVersion = Options.Target.parse(args[targetArgIndex+1]);
- } else {
- targetVersion = Options.Target.getDefault();
- }
- Options.Target loadedVersion = Options.Target.getLoadedAPIVersion();
-
- //Check if the target version is supported by the loaded API version
- if (!loadedVersion.isLaterThan(targetVersion)) {
- if (Service.class.getClassLoader() == null)
- System.err.println(WscompileMessages.INVOKER_NEED_ENDORSED(loadedVersion.getVersion(), targetVersion.getVersion()));
- else {
- System.err.println(WscompileMessages.WRAPPER_TASK_LOADING_INCORRECT_API(loadedVersion.getVersion(), Which.which(Service.class), targetVersion.getVersion()));
- }
- return -1;
- }
-
- //find and load tools.jar
- List<URL> urls = new ArrayList<URL>();
- findToolsJar(cl, urls);
-
- if(urls.size() > 0){
- List<String> mask = new ArrayList<String>(Arrays.asList(maskedPackages));
-
- // first create a protected area so that we load JAXB/WS 2.1 API
- // and everything that depends on them inside
- cl = new MaskingClassLoader(cl,mask);
-
- // then this classloader loads the API and tools.jar
- cl = new URLClassLoader(urls.toArray(new URL[urls.size()]), cl);
-
- // finally load the rest of the RI. The actual class files are loaded from ancestors
- cl = new ParallelWorldClassLoader(cl,"");
- }
-
- }
-
- Thread.currentThread().setContextClassLoader(cl);
-
- Class compileTool = cl.loadClass(mainClass);
- Constructor ctor = compileTool.getConstructor(OutputStream.class);
- Object tool = ctor.newInstance(System.out);
- Method runMethod = compileTool.getMethod("run",String[].class);
- boolean r = (Boolean)runMethod.invoke(tool,new Object[]{args});
- return r ? 0 : 1;
- } catch (ToolsJarNotFoundException e) {
- System.err.println(e.getMessage());
- } catch (InvocationTargetException e) {
- throw e.getCause();
- } catch(ClassNotFoundException e){
- throw e;
- }finally {
- Thread.currentThread().setContextClassLoader(oldcc);
- }
-
- return -1;
- }
-
- /**
- * Returns true if the RI appears to be loading the JAX-WS 2.1 API.
- */
- public static boolean checkIfLoading21API() {
- try {
- Service.class.getMethod("getPort",Class.class, WebServiceFeature[].class);
- // yup. things look good.
- return true;
- } catch (NoSuchMethodException e) {
- } catch (LinkageError e) {
- }
- // nope
- return false;
- }
-
- /**
- * Returns true if the RI appears to be loading the JAX-WS 2.2 API.
- */
- public static boolean checkIfLoading22API() {
- try {
- Service.class.getMethod("create",java.net.URL.class, QName.class, WebServiceFeature[].class);
- // yup. things look good.
- return true;
- } catch (NoSuchMethodException e) {
- } catch (LinkageError e) {
- }
- // nope
- return false;
- }
-
-
- /**
- * Creates a classloader that can load JAXB/WS 2.2 API and tools.jar,
- * and then return a classloader that can RI classes, which can see all those APIs and tools.jar.
- */
- public static ClassLoader createClassLoader(ClassLoader cl) throws ClassNotFoundException, IOException, ToolsJarNotFoundException {
-
- URL[] urls = findIstack22APIs(cl);
- if(urls.length==0)
- return cl; // we seem to be able to load everything already. no need for the hack
-
- List<String> mask = new ArrayList<String>(Arrays.asList(maskedPackages));
- if(urls.length>1) {
- // we need to load 2.1 API from side. so add them to the mask
- mask.add("javax.xml.bind.");
- mask.add("javax.xml.ws.");
- }
-
- // first create a protected area so that we load JAXB/WS 2.1 API
- // and everything that depends on them inside
- cl = new MaskingClassLoader(cl,mask);
-
- // then this classloader loads the API and tools.jar
- cl = new URLClassLoader(urls, cl);
-
- // finally load the rest of the RI. The actual class files are loaded from ancestors
- cl = new ParallelWorldClassLoader(cl,"");
-
- return cl;
- }
-
- /**
- * Creates a classloader for loading JAXB/WS 2.2 jar and tools.jar
- */
- private static URL[] findIstack22APIs(ClassLoader cl) throws ClassNotFoundException, IOException, ToolsJarNotFoundException {
- List<URL> urls = new ArrayList<URL>();
-
- if(Service.class.getClassLoader()==null) {
- // JAX-WS API is loaded from bootstrap classloader
- URL res = cl.getResource("javax/xml/ws/EndpointContext.class");
- if(res==null)
- throw new ClassNotFoundException("There's no JAX-WS 2.2 API in the classpath");
- urls.add(ParallelWorldClassLoader.toJarUrl(res));
- res = cl.getResource("javax/xml/bind/JAXBPermission.class");
- if(res==null)
- throw new ClassNotFoundException("There's no JAXB 2.2 API in the classpath");
- urls.add(ParallelWorldClassLoader.toJarUrl(res));
- }
-
- findToolsJar(cl, urls);
-
- return urls.toArray(new URL[urls.size()]);
- }
-
- private static void findToolsJar(ClassLoader cl, List<URL> urls) throws ToolsJarNotFoundException, MalformedURLException {
- try {
- Class.forName("com.sun.tools.javac.Main",false,cl);
- // we can already load them in the parent class loader.
- // so no need to look for tools.jar.
- // this happens when we are run inside IDE/Ant, or
- // in Mac OS.
- } catch (ClassNotFoundException e) {
- // otherwise try to find tools.jar
- File jreHome = new File(System.getProperty("java.home"));
- File toolsJar = new File( jreHome.getParent(), "lib/tools.jar" );
-
- if (!toolsJar.exists()) {
- throw new ToolsJarNotFoundException(toolsJar);
- }
- urls.add(toolsJar.toURL());
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/ToolVersion.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/ToolVersion.java
deleted file mode 100644
index c65187bb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/ToolVersion.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws;
-
-import com.sun.xml.internal.ws.util.Version;
-
-/**
- * Obtains the version number of the JAX-WS tools.
- * @author Kohsuke Kawaguchi
- */
-public abstract class ToolVersion {
- private ToolVersion() {} // no instanciation please
-
- public static final Version VERSION = Version.create(ToolVersion.class.getResourceAsStream("version.properties"));
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/WsGen.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/WsGen.java
deleted file mode 100644
index 193b3979..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/WsGen.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws;
-
-import com.sun.tools.internal.ws.wscompile.WsgenTool;
-
-/**
- * WsGen tool entry point.
- *
- * @author Vivek Pandey
- * @author Kohsuke Kawaguchi
- */
-public class WsGen {
- /**
- * CLI entry point. Use {@link Invoker} to
- * load tools.jar
- */
- public static void main(String[] args) throws Throwable {
- System.exit(Invoker.invoke("com.sun.tools.internal.ws.wscompile.WsgenTool", args));
- }
-
- /**
- * Entry point for tool integration.
- *
- * <p>
- * This does the same as {@link #main(String[])} except
- * it doesn't invoke {@link System#exit(int)}. This method
- * also doesn't play with classloaders. It's the caller's
- * responsibility to set up the classloader to load all jars
- * needed to run the tool, including <tt>$JAVA_HOME/lib/tools.jar</tt>
- *
- * @return
- * 0 if the tool runs successfully.
- */
- public static int doMain(String[] args) throws Throwable {
- return new WsgenTool(System.out).run(args) ? 0 : 1;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/WsImport.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/WsImport.java
deleted file mode 100644
index 14cf3d12..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/WsImport.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws;
-
-import com.sun.tools.internal.ws.wscompile.WsimportTool;
-
-/**
- * WsImport tool entry point.
- *
- * @author Vivek Pandey
- * @author Kohsuke Kawaguchi
- */
-public class WsImport {
- /**
- * CLI entry point. Use {@link Invoker} to
- * load tools.jar
- */
- public static void main(String[] args) throws Throwable {
- System.exit(Invoker.invoke("com.sun.tools.internal.ws.wscompile.WsimportTool", args));
- }
-
- /**
- * Entry point for tool integration.
- *
- * <p>
- * This does the same as {@link #main(String[])} except
- * it doesn't invoke {@link System#exit(int)}. This method
- * also doesn't play with classloaders. It's the caller's
- * responsibility to set up the classloader to load all jars
- * needed to run the tool, including <tt>$JAVA_HOME/lib/tools.jar</tt>
- *
- * @return
- * 0 if the tool runs successfully.
- */
- public static int doMain(String[] args) throws Throwable {
- return new WsimportTool(System.out).run(args) ? 0 : 1;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/TJavaGeneratorExtension.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/api/TJavaGeneratorExtension.java
deleted file mode 100644
index a19881d0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/TJavaGeneratorExtension.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.api;
-
-import com.sun.codemodel.internal.JMethod;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLOperation;
-import com.sun.tools.internal.ws.processor.generator.JavaGeneratorExtensionFacade;
-
-/**
- * Provides Java SEI Code generation Extensiblity mechanism.
- *
- * @see JavaGeneratorExtensionFacade
- * @author Vivek Pandey
- * @deprecated This class is deprecated, will be removed in JAX-WS 2.2 RI.
- */
-public abstract class TJavaGeneratorExtension {
- /**
- * This method should be used to write annotations on {@link JMethod}.
- *
- * @param wsdlOperation non-null wsdl extensiblity element - wsdl:portType/wsdl:operation.
- * @param jMethod non-null {@link JMethod}
- */
- public abstract void writeMethodAnnotations(TWSDLOperation wsdlOperation, JMethod jMethod);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenExtension.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenExtension.java
deleted file mode 100644
index 8adfba30..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenExtension.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2009, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.api;
-
-/**
- * Allows to customize wsgen behaviour using this extension.
- * The extension implementations are found using service
- * discovery mechanism i.e. JAX-WS tooltime locates
- * {@link WsgenExtension}s through the
- * <tt>META-INF/services/com.sun.tools.internal.ws.api.WsgenExtension</tt>
- * files.
- *
- * {@link WsgenProtocol} annotation can be specified on the
- * extensions to extend -wsdl[:protocol] behaviour.
- *
- * @author Jitendra Kotamraju
- * @since JAX-WS RI 2.1.6
- * @see WsgenProtocol
- */
-public abstract class WsgenExtension {
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenProtocol.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenProtocol.java
deleted file mode 100644
index afb1d868..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenProtocol.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2009, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.api;
-
-import java.lang.annotation.*;
-
-/**
- * Allows to extend protocol for wsgen's wsdl[:protocol] switch.
- * This annotation must be specified on {@link WsgenExtension}
- * implementations.
- *
- * @author Jitendra Kotamraju
- * @since JAX-WS RI 2.1.6
- */
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface WsgenProtocol {
- /**
- * Token for wsgen -wsdl[:protocol]
- * @return Token for wsgen -wsdl[:protocol]
- */
- String token();
-
- /**
- * The corresponding lexical string used to create BindingID
- * @return lexical string used to create BindingID
- */
- String lexical();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensible.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensible.java
deleted file mode 100644
index 59096e3e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensible.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.api.wsdl;
-
-
-import javax.xml.namespace.QName;
-
-/**
- * A WSDL element or attribute that can be extended.
- *
- * @author Vivek Pandey
- * @deprecated This interface is deprecated, will be removed in JAX-WS 2.2 RI.
- *
- */
-public interface TWSDLExtensible {
- /**
- * Gives the wsdl extensiblity element's name attribute value. It can be null as @name on some of the wsdl
- * extensibility elements are optinal such as wsdl:input
- */
- String getNameValue();
-
- /**
- * Gives namespace URI of a wsdl extensibility element.
- */
- String getNamespaceURI();
-
- /**
- * Gives the WSDL element or WSDL extensibility element name
- */
- QName getWSDLElementName();
-
- /**
- * An {@link TWSDLExtensionHandler} will call this method to add an {@link TWSDLExtension} object
- *
- * @param e non-null extension object
- */
- void addExtension(TWSDLExtension e);
-
- /**
- * Gives iterator over {@link TWSDLExtension}s
- */
- Iterable<? extends TWSDLExtension> extensions();
-
- /**
- * Gives the parent of a wsdl extensibility element.
- * <pre>
- * For example,
- *
- * <wsdl:portType>
- * <wsdl:operation>
- * ...
- * Here, the {@link TWSDLExtensible}representing wsdl:operation's parent would be wsdl:portType
- *
- * @return null if the {@link TWSDLExtensible} has no parent, root of wsdl document - wsdl:definition.
- */
- TWSDLExtensible getParent();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtension.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtension.java
deleted file mode 100644
index 19d2105a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtension.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.api.wsdl;
-
-/**
- * A WSDL extension
- *
- * @author Vivek Pandey
- * @deprecated This interface is deprecated, will be removed in JAX-WS 2.2 RI.
- */
-public interface TWSDLExtension {
- /**
- * Gives Parent {@link TWSDLExtensible} element
- */
- TWSDLExtensible getParent();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensionHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensionHandler.java
deleted file mode 100644
index c81fb1d5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensionHandler.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.api.wsdl;
-
-import com.sun.tools.internal.ws.wsdl.document.WSDLConstants;
-import org.w3c.dom.Element;
-
-/**
- * JAXWS WSDL parser {@link com.sun.tools.internal.ws.wsdl.parser.WSDLParser} will call an {@link TWSDLExtensionHandler} registered
- * with it for the WSDL extensibility elements thats not already defined in the WSDL 1.1 spec, such as SOAP or MIME.
- *
- * @author Vivek Pandey
- * @deprecated This class is deprecated, will be removed in JAX-WS 2.2 RI.
- */
-public abstract class TWSDLExtensionHandler {
- /**
- * Gives the namespace of an extensibility element.
- * <p/>
- * For example a soap 1.1 XXExtensionHandler would return <code>""http://schemas.xmlsoap.org/wsdl/soap/"</code>
- */
- public String getNamespaceURI() {
- return null;
- }
-
- /**
- * This interface is called during WSDL parsing on detecting any wsdl extension.
- *
- * @param context Parser context that will be passed on by the wsdl parser
- * @param parent The Parent element within which the extensibility element is defined
- * @param e The extensibility elemenet
- * @return false if there was some error during the extension handling otherwise returns true. If returned false
- * then the WSDL parser can abort if the wsdl extensibility element had <code>required</code> attribute set to true
- */
- public boolean doHandleExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- if (parent.getWSDLElementName().equals(WSDLConstants.QNAME_DEFINITIONS)) {
- return handleDefinitionsExtension(context, parent, e);
- } else if (parent.getWSDLElementName().equals(WSDLConstants.QNAME_TYPES)) {
- return handleTypesExtension(context, parent, e);
- } else if (parent.getWSDLElementName().equals(WSDLConstants.QNAME_PORT_TYPE)) {
- return handlePortTypeExtension(context, parent, e);
- } else if (
- parent.getWSDLElementName().equals(WSDLConstants.QNAME_BINDING)) {
- return handleBindingExtension(context, parent, e);
- } else if (
- parent.getWSDLElementName().equals(WSDLConstants.QNAME_OPERATION)) {
- return handleOperationExtension(context, parent, e);
- } else if (parent.getWSDLElementName().equals(WSDLConstants.QNAME_INPUT)) {
- return handleInputExtension(context, parent, e);
- } else if (
- parent.getWSDLElementName().equals(WSDLConstants.QNAME_OUTPUT)) {
- return handleOutputExtension(context, parent, e);
- } else if (parent.getWSDLElementName().equals(WSDLConstants.QNAME_FAULT)) {
- return handleFaultExtension(context, parent, e);
- } else if (
- parent.getWSDLElementName().equals(WSDLConstants.QNAME_SERVICE)) {
- return handleServiceExtension(context, parent, e);
- } else if (parent.getWSDLElementName().equals(WSDLConstants.QNAME_PORT)) {
- return handlePortExtension(context, parent, e);
- } else {
- return false;
- }
- }
-
- /**
- * Callback for <code>wsdl:portType</code>
- *
- * @param context Parser context that will be passed on by the wsdl parser
- * @param parent The Parent element within which the extensibility element is defined
- * @param e The extensibility elemenet
- * @return false if there was some error during the extension handling otherwise returns true. If returned false
- * then the WSDL parser can abort if the wsdl extensibility element had <code>required</code> attribute set to true
- */
- public boolean handlePortTypeExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return false;
- }
-
- /**
- * Callback for <code>wsdl:definitions</code>
- *
- * @param context Parser context that will be passed on by the wsdl parser
- * @param parent The Parent element within which the extensibility element is defined
- * @param e The extensibility elemenet
- * @return false if there was some error during the extension handling otherwise returns true. If returned false
- * then the WSDL parser can abort if the wsdl extensibility element had <code>required</code> attribute set to true
- */
- public boolean handleDefinitionsExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return false;
- }
-
- /**
- * Callback for <code>wsdl:type</code>
- *
- * @param context Parser context that will be passed on by the wsdl parser
- * @param parent The Parent element within which the extensibility element is defined
- * @param e The extensibility elemenet
- * @return false if there was some error during the extension handling otherwise returns true. If returned false
- * then the WSDL parser can abort if the wsdl extensibility element had <code>required</code> attribute set to true
- */
- public boolean handleTypesExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return false;
- }
-
- /**
- * Callback for <code>wsdl:binding</code>
- *
- * @param context Parser context that will be passed on by the wsdl parser
- * @param parent The Parent element within which the extensibility element is defined
- * @param e The extensibility elemenet
- * @return false if there was some error during the extension handling otherwise returns true. If returned false
- * then the WSDL parser can abort if the wsdl extensibility element had <code>required</code> attribute set to true
- */
- public boolean handleBindingExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return false;
- }
-
- /**
- * Callback for <code>wsdl:portType/wsdl:operation</code>.
- *
- * @param context Parser context that will be passed on by the wsdl parser
- * @param parent The Parent element within which the extensibility element is defined
- * @param e The extensibility elemenet
- * @return false if there was some error during the extension handling otherwise returns true. If returned false
- * then the WSDL parser can abort if the wsdl extensibility element had <code>required</code> attribute set to true
- */
- public boolean handleOperationExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return false;
- }
-
- /**
- * Callback for <code>wsdl:input</code>
- *
- * @param context Parser context that will be passed on by the wsdl parser
- * @param parent The Parent element within which the extensibility element is defined
- * @param e The extensibility elemenet
- * @return false if there was some error during the extension handling otherwise returns true. If returned false
- * then the WSDL parser can abort if the wsdl extensibility element had <code>required</code> attribute set to true
- */
- public boolean handleInputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return false;
- }
-
- /**
- * Callback for <code>wsdl:output</code>
- *
- * @param context Parser context that will be passed on by the wsdl parser
- * @param parent The Parent element within which the extensibility element is defined
- * @param e The extensibility elemenet
- * @return false if there was some error during the extension handling otherwise returns true. If returned false
- * then the WSDL parser can abort if the wsdl extensibility element had <code>required</code> attribute set to true
- */
- public boolean handleOutputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return false;
- }
-
- /**
- * Callback for <code>wsdl:fault</code>
- *
- * @param context Parser context that will be passed on by the wsdl parser
- * @param parent The Parent element within which the extensibility element is defined
- * @param e The extensibility elemenet
- * @return false if there was some error during the extension handling otherwise returns true. If returned false
- * then the WSDL parser can abort if the wsdl extensibility element had <code>required</code> attribute set to true
- */
- public boolean handleFaultExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return false;
- }
-
- /**
- * Callback for <code>wsdl:service</code>
- *
- * @param context Parser context that will be passed on by the wsdl parser
- * @param parent The Parent element within which the extensibility element is defined
- * @param e The extensibility elemenet
- * @return false if there was some error during the extension handling otherwise returns true. If returned false
- * then the WSDL parser can abort if the wsdl extensibility element had <code>required</code> attribute set to true
- */
- public boolean handleServiceExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return false;
- }
-
- /**
- * Callback for <code>wsdl:port</code>
- *
- * @param context Parser context that will be passed on by the wsdl parser
- * @param parent The Parent element within which the extensibility element is defined
- * @param e The extensibility elemenet
- * @return false if there was some error during the extension handling otherwise returns true. If returned false
- * then the WSDL parser can abort if the wsdl extensibility element had <code>required</code> attribute set to true
- */
- public boolean handlePortExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLOperation.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLOperation.java
deleted file mode 100644
index af722834..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLOperation.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.api.wsdl;
-
-import com.sun.codemodel.internal.JClass;
-
-import java.util.Map;
-
-/**
- * Abstracts wsdl:portType/wsdl:operation
- *
- * @author Vivek Pandey
- * @deprecated This interface is deprecated, will be removed in JAX-WS 2.2 RI.
- */
-public interface TWSDLOperation extends TWSDLExtensible{
- /**
- * Gives a Map of fault name attribute value to the {@link JClass}
- */
- Map<String, JClass> getFaults();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLParserContext.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLParserContext.java
deleted file mode 100644
index 86fb27d1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLParserContext.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.api.wsdl;
-
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-/**
- * Provides WSDL parsing context. It should be used by the WSDL extension handlers to register their namespaces so that
- * it can be latter used by other extensions to resolve the namespaces.
- *
- * @author Vivek Pandey
- * @deprecated This interface is deprecated, will be removed in JAX-WS 2.2 RI.
- */
-public interface TWSDLParserContext {
-
- /**
- * Pushes the parsing context
- */
- void push();
-
- /**
- * pops the parsing context
- */
- void pop();
-
- /**
- * Gives the namespace URI for a given prefix
- *
- * @param prefix non-null prefix
- * @return null of the prefix is not found
- */
- String getNamespaceURI(String prefix);
-
- /**
- * Gives the prefixes in the current context
- */
- Iterable<String> getPrefixes();
-
- /**
- * Gives default namespace
- *
- * @return null if there is no default namespace declaration found
- */
- String getDefaultNamespaceURI();
-
- /**
- * Registers naemespace declarations of a given {@link Element} found in the WSDL
- *
- * @param e {@link Element} whose namespace declarations need to be registered
- */
- void registerNamespaces(Element e);
-
- /**
- * gives the location information for the given Element.
- */
- Locator getLocation(Element e);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/package-info.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/package-info.java
deleted file mode 100644
index d40f124a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/package-info.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * <h1>JAX-WS 2.1 Tools</h1>
- * This document describes the tools included with JAX-WS 2.0.1.
- *
- * {@DotDiagram digraph G {
-// external tools
-AP;
-
-// ANT tasks
-node [style=filled,color=lightyellow];
-"WsGen ANT Task"; "WsImport ANT Task";
-
-// commandline
-node [style=filled,color=lightpink];
-wsgen; wsimport;
-
-// libraries
-node [style=filled,color=lightblue];
-WsimportTool; WsgenTool;"WSAP"; WebServiceAp; WSDLModeler;WSDLParser;SeiGenerator;ServiceGenerator;ExceptionGenerator;"JAXB XJC APIs";CodeModel;
-
-// aps
-# node [style=filled,color=lightpink];
-# "JAX-WS"; tools; runtime; SPI; "Annotation Processor";
-
-"WsGen ANT Task" -> wsgen -> WsgenTool;
-"WsImport ANT Task" -> wsimport -> WsimportTool;
-
-WsgenTool -> Annotation Processing -> WSAP -> WebServiceAp;
-WsimportTool -> WSDLModeler;
-WSDLModeler->WSDLParser;
-WSDLModeler->"JAXB XJC APIs"
-WsimportTool->SeiGenerator->CodeModel;
-WsimportTool->ServiceGenerator->CodeModel;
-WsimportTool->ExceptionGenerator->CodeModel;
-WebServiceAp->CodeModel
-}
- * }
- * <div align=right>
- * <b>Legend:</b> blue: implementation classes, pink: command-line toosl, white: external tool, yellow: ANT tasks
- * </div>
- *
- * <h2>ANT Tasks</h2>
- <d1>
- * <dt>{@link com.sun.tools.internal.ws.ant.AnnotationProcessingTask AnnotationProcessing}
- * <dd>An ANT task to invoke <a href="http://download.oracle.com/javase/6/docs/api/javax/annotation/processing/package-summary.html">Annotation Processing</a>.
-
- * <dt>{@link com.sun.tools.internal.ws.ant.WsGen2 WsGen}
- * <dd>
- * An ANT task to invoke {@link com.sun.tools.internal.ws.WsGen WsGen}
-
- * <dt>{@link com.sun.tools.internal.ws.ant.WsImport2 WsImport}
- * <dd>
- * An ANT task to invoke {@link com.sun.tools.internal.ws.WsImport WsImport}
- *
- * </d1>
- * <h2>Command-line Tools</h2>
- <d1>
- * <dt><a href="http://download.oracle.com/javase/6/docs/api/javax/annotation/processing/package-summary.html">AP</a>
- <dd>A Java SE tool and framework for processing annotations. Annotation processing will invoke a JAX-WS AnnotationProcossor for
- * processing Java source files with javax.jws.* annotations and making them web services.
- * Annotation processing will compile the Java source files and generate any additional classes needed to make an javax.jws.WebService
- * annotated class a Web service.
- *
- * <dt>{@link com.sun.tools.internal.ws.WsGen WsGen}
- * <dd>Tool to process a compiled javax.jws.WebService annotated class and to generate the necessary classes to make
- * it a Web service.
-
- * <dt>{@link com.sun.tools.internal.ws.ant.WsImport2 WsImport}
- * <dd>
- * Tool to import a WSDL and to generate an SEI (a javax.jws.WebService) interface that can be either implemented
- * on the server to build a web service, or can be used on the client to invoke the web service.
- * </d1>
- * <h2>Implementation Classes</h2>
- * <d1>
- * <dt>{@link com.sun.tools.internal.ws.processor.model.Model Model}
- * <dd>The model is used to represent the entire Web Service. The JAX-WS ProcessorActions can process
- * this Model to generate Java artifacts such as the service interface.
- *
- *
- * <dt>{@link com.sun.tools.internal.ws.processor.modeler.Modeler Modeler}
- * <dd>A Modeler is used to create a Model of a Web Service from a particular Web
- * Web Service description such as a WSDL
- * file.
- *
- * <dt>{@link com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler WSDLModeler}
- * <dd>The WSDLModeler processes a WSDL to create a Model.
- *
- * <dt>{@link com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAp WebServiceAp}
- * <dd>WebServiceAp is a AnnotationProcessor for processing javax.jws.* and
- * javax.xml.ws.* annotations. This class is used either by the WsGen (CompileTool) tool or
- * idirectly via the {@link com.sun.istack.internal.ws.WSAP WSAP} when invoked by Annotation Processing.
- * </d1>
- *
- * @ArchitectureDocument
- **/
-package com.sun.tools.internal.ws;
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/ProcessorException.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/ProcessorException.java
deleted file mode 100644
index 51007945..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/ProcessorException.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor;
-
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-/**
- * ProcessorException represents an exception that occurred while processing
- * a web service.
- *
- * @see JAXWSExceptionBase
- *
- * @author WS Development Team
- */
-public class ProcessorException extends JAXWSExceptionBase {
-
- public ProcessorException(String key, Object... args) {
- super(key, args);
- }
-
- public ProcessorException(String msg){
- super(msg);
- }
-
- public ProcessorException(Throwable throwable) {
- super(throwable);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.tools.internal.ws.resources.processor";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/CustomExceptionGenerator.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/CustomExceptionGenerator.java
deleted file mode 100644
index 70b32d9a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/CustomExceptionGenerator.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.generator;
-
-import com.sun.codemodel.internal.ClassType;
-import com.sun.codemodel.internal.JAnnotationUse;
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JClassAlreadyExistsException;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JDocComment;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JFieldRef;
-import com.sun.codemodel.internal.JFieldVar;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.ws.processor.model.Fault;
-import com.sun.tools.internal.ws.processor.model.Model;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-
-import javax.xml.ws.WebFault;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- *
- * @author WS Development Team
- */
-public class CustomExceptionGenerator extends GeneratorBase {
- private Map<String, JClass> faults = new HashMap<String, JClass>();
-
- public static void generate(Model model,
- WsimportOptions options,
- ErrorReceiver receiver){
- CustomExceptionGenerator exceptionGen = new CustomExceptionGenerator();
- exceptionGen.init(model, options, receiver);
- exceptionGen.doGeneration();
- }
-
- public GeneratorBase getGenerator(Model model, WsimportOptions options, ErrorReceiver receiver) {
- GeneratorBase g = new CustomExceptionGenerator();
- g.init(model, options, receiver);
- return g;
- }
-
- @Override
- public void visit(Fault fault) throws Exception {
- if (isRegistered(fault))
- return;
- registerFault(fault);
- }
-
- private boolean isRegistered(Fault fault) {
- if(faults.keySet().contains(fault.getJavaException().getName())){
- fault.setExceptionClass(faults.get(fault.getJavaException().getName()));
- return true;
- }
- return false;
- }
-
- private void registerFault(Fault fault) {
- try {
- write(fault);
- faults.put(fault.getJavaException().getName(), fault.getExceptionClass());
- } catch (JClassAlreadyExistsException e) {
- throw new GeneratorException("generator.nestedGeneratorError",e);
- }
- }
-
- private void write(Fault fault) throws JClassAlreadyExistsException {
- String className = Names.customExceptionClassName(fault);
-
- JDefinedClass cls = cm._class(className, ClassType.CLASS);
- JDocComment comment = cls.javadoc();
- if(fault.getJavaDoc() != null){
- comment.add(fault.getJavaDoc());
- comment.add("\n\n");
- }
-
- for (String doc : getJAXWSClassComment()) {
- comment.add(doc);
- }
-
- cls._extends(java.lang.Exception.class);
-
- //@WebFault
- JAnnotationUse faultAnn = cls.annotate(WebFault.class);
- faultAnn.param("name", fault.getBlock().getName().getLocalPart());
- faultAnn.param("targetNamespace", fault.getBlock().getName().getNamespaceURI());
-
- JType faultBean = fault.getBlock().getType().getJavaType().getType().getType();
-
- //faultInfo filed
- JFieldVar fi = cls.field(JMod.PRIVATE, faultBean, "faultInfo");
-
- //add jaxb annotations
- fault.getBlock().getType().getJavaType().getType().annotate(fi);
-
- fi.javadoc().add("Java type that goes as soapenv:Fault detail element.");
- JFieldRef fr = JExpr.ref(JExpr._this(), fi);
-
- //Constructor
- JMethod constrc1 = cls.constructor(JMod.PUBLIC);
- JVar var1 = constrc1.param(String.class, "message");
- JVar var2 = constrc1.param(faultBean, "faultInfo");
- constrc1.javadoc().addParam(var1);
- constrc1.javadoc().addParam(var2);
- JBlock cb1 = constrc1.body();
- cb1.invoke("super").arg(var1);
-
- cb1.assign(fr, var2);
-
- //constructor with Throwable
- JMethod constrc2 = cls.constructor(JMod.PUBLIC);
- var1 = constrc2.param(String.class, "message");
- var2 = constrc2.param(faultBean, "faultInfo");
- JVar var3 = constrc2.param(Throwable.class, "cause");
- constrc2.javadoc().addParam(var1);
- constrc2.javadoc().addParam(var2);
- constrc2.javadoc().addParam(var3);
- JBlock cb2 = constrc2.body();
- cb2.invoke("super").arg(var1).arg(var3);
- cb2.assign(fr, var2);
-
-
- //getFaultInfo() method
- JMethod fim = cls.method(JMod.PUBLIC, faultBean, "getFaultInfo");
- fim.javadoc().addReturn().add("returns fault bean: "+faultBean.fullName());
- JBlock fib = fim.body();
- fib._return(fi);
- fault.setExceptionClass(cls);
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorBase.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorBase.java
deleted file mode 100644
index 5cefc79c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorBase.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.processor.generator;
-
-import com.sun.codemodel.internal.ClassType;
-import com.sun.codemodel.internal.JAnnotationUse;
-import com.sun.codemodel.internal.JClassAlreadyExistsException;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.tools.internal.ws.ToolVersion;
-import com.sun.tools.internal.ws.processor.model.Block;
-import com.sun.tools.internal.ws.processor.model.Fault;
-import com.sun.tools.internal.ws.processor.model.Model;
-import com.sun.tools.internal.ws.processor.model.ModelVisitor;
-import com.sun.tools.internal.ws.processor.model.Operation;
-import com.sun.tools.internal.ws.processor.model.Parameter;
-import com.sun.tools.internal.ws.processor.model.Port;
-import com.sun.tools.internal.ws.processor.model.Request;
-import com.sun.tools.internal.ws.processor.model.Response;
-import com.sun.tools.internal.ws.processor.model.Service;
-import com.sun.tools.internal.ws.processor.util.DirectoryUtil;
-import com.sun.tools.internal.ws.processor.util.IndentingWriter;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-import javax.jws.HandlerChain;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.OutputStreamWriter;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import javax.annotation.processing.Filer;
-import javax.tools.FileObject;
-
-import javax.tools.StandardLocation;
-
-public abstract class GeneratorBase implements ModelVisitor {
- private File destDir;
- private String targetVersion;
- protected boolean donotOverride;
- protected JCodeModel cm;
- protected Model model;
- protected String wsdlLocation;
- protected ErrorReceiver receiver;
- protected WsimportOptions options;
-
- protected GeneratorBase() {
- }
-
- public void init(Model model, WsimportOptions options, ErrorReceiver receiver){
- this.model = model;
- this.options = options;
- this.destDir = options.destDir;
- this.receiver = receiver;
- this.wsdlLocation = options.wsdlLocation;
- this.targetVersion = options.target.getVersion();
- this.cm = options.getCodeModel();
- }
-
- public void doGeneration() {
- try {
- model.accept(this);
- } catch (Exception e) {
- receiver.error(e);
- }
- }
-
- @Override
- public void visit(Model model) throws Exception {
- for (Service service : model.getServices()) {
- service.accept(this);
- }
- }
-
- @Override
- public void visit(Service service) throws Exception {
- for (Port port : service.getPorts()) {
- port.accept(this);
- }
- }
-
- @Override
- public void visit(Port port) throws Exception {
- for (Operation operation : port.getOperations()) {
- operation.accept(this);
- }
- }
-
- @Override
- public void visit(Operation operation) throws Exception {
- operation.getRequest().accept(this);
- if (operation.getResponse() != null) {
- operation.getResponse().accept(this);
- }
- Iterator faults = operation.getFaultsSet().iterator();
- if (faults != null) {
- Fault fault;
- while (faults.hasNext()) {
- fault = (Fault) faults.next();
- fault.accept(this);
- }
- }
- }
-
- @Override
- public void visit(Parameter param) throws Exception {}
-
- @Override
- public void visit(Block block) throws Exception {}
-
- @Override
- public void visit(Response response) throws Exception {}
-
- @Override
- public void visit(Request request) throws Exception {}
-
- @Override
- public void visit(Fault fault) throws Exception {}
-
- public List<String> getJAXWSClassComment(){
- return getJAXWSClassComment(targetVersion);
- }
-
- public static List<String> getJAXWSClassComment(String targetVersion) {
- List<String> comments = new ArrayList<String>();
- comments.add("This class was generated by the JAX-WS RI.\n");
- comments.add(ToolVersion.VERSION.BUILD_VERSION+"\n");
- comments.add("Generated source version: " + targetVersion);
- return comments;
- }
-
- protected JDefinedClass getClass(String className, ClassType type) throws JClassAlreadyExistsException {
- JDefinedClass cls;
- try {
- cls = cm._class(className, type);
- } catch (JClassAlreadyExistsException e){
- cls = cm._getClass(className);
- if (cls == null) {
- throw e;
- }
- }
- return cls;
- }
-
- protected void log(String msg) {
- if (options.verbose) {
- System.out.println(
- "["
- + Names.stripQualifier(this.getClass().getName())
- + ": "
- + msg
- + "]");
- }
- }
-
- protected void writeHandlerConfig(String className, JDefinedClass cls, WsimportOptions options) {
- Element e = options.getHandlerChainConfiguration();
- if (e == null) {
- return;
- }
- JAnnotationUse handlerChainAnn = cls.annotate(cm.ref(HandlerChain.class));
- NodeList nl = e.getElementsByTagNameNS(
- "http://java.sun.com/xml/ns/javaee", "handler-chain");
- if(nl.getLength() > 0){
- String fName = getHandlerConfigFileName(className);
- handlerChainAnn.param("file", fName);
- generateHandlerChainFile(e, className);
- }
- }
-
- private String getHandlerConfigFileName(String fullName){
- String name = Names.stripQualifier(fullName);
- return name+"_handler.xml";
- }
-
- private void generateHandlerChainFile(Element hChains, String name) {
-
- Filer filer = options.filer;
-
- try {
- IndentingWriter p;
- FileObject jfo;
- if (filer != null) {
- jfo = filer.createResource(StandardLocation.SOURCE_OUTPUT,
- Names.getPackageName(name), getHandlerConfigFileName(name));
- options.addGeneratedFile(new File(jfo.toUri()));
- p = new IndentingWriter(new OutputStreamWriter(jfo.openOutputStream()));
- } else { // leave for backw. compatibility now
- String hcName = getHandlerConfigFileName(name);
- File packageDir = DirectoryUtil.getOutputDirectoryFor(name, destDir);
- File hcFile = new File(packageDir, hcName);
- options.addGeneratedFile(hcFile);
- p = new IndentingWriter(new OutputStreamWriter(new FileOutputStream(hcFile)));
- }
-
- Transformer it = XmlUtil.newTransformer();
-
- it.setOutputProperty(OutputKeys.METHOD, "xml");
- it.setOutputProperty(OutputKeys.INDENT, "yes");
- it.setOutputProperty(
- "{http://xml.apache.org/xslt}indent-amount",
- "2");
- it.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
- it.transform( new DOMSource(hChains), new StreamResult(p) );
- p.close();
- } catch (Exception e) {
- throw new GeneratorException(
- "generator.nestedGeneratorError",
- e);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorConstants.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorConstants.java
deleted file mode 100644
index a108db2a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorConstants.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.generator;
-
-/**
- * @author WS Development Team
- */
-public enum GeneratorConstants {
-
- DOTC("."),
-
- SIG_INNERCLASS("$"),
-
- JAVA_SRC_SUFFIX(".java"),
-
- QNAME_SUFFIX("_QNAME"),
-
- GET("get"),
-
- IS("is"),
-
- RESPONSE("Response"),
-
- FAULT_CLASS_MEMBER_NAME("faultInfo");
-
- private String value;
-
- private GeneratorConstants(String value) {
- this.value = value;
- }
-
- public String getValue() {
- return value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorException.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorException.java
deleted file mode 100644
index 6769f85c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.generator;
-
-import com.sun.tools.internal.ws.processor.ProcessorException;
-
-/**
- *
- * @author WS Development Team
- */
-public class GeneratorException extends ProcessorException {
-
- public GeneratorException(String key, Object... args) {
- super(key, args);
- }
-
- public GeneratorException(Throwable throwable) {
- super(throwable);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.tools.internal.ws.resources.generator";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorExtension.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorExtension.java
deleted file mode 100644
index e9edc067..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorExtension.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.generator;
-
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.tools.internal.ws.processor.model.Model;
-import com.sun.tools.internal.ws.processor.model.Port;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-
-/**
- * Service Generator Extension for Custom Binding and Transport
- *
- * @since 2.2.6
- * @see JwsImplGenerator
- */
-public abstract class GeneratorExtension {
-
- /**
- * Derive Binding ID based on transport and SOAP version
- * @param transport
- * @param soapVersion
- * @return BindingID
- */
- public String getBindingValue(String transport, SOAPVersion soapVersion) {
- return null;
- }
-
- /**
- * Create annotations in service JWS generated
- * @param model
- * @param cm
- * @param cls
- * @param port
- */
- public void writeWebServiceAnnotation(Model model, JCodeModel cm, JDefinedClass cls, Port port) {
- }
-
- /**
- * Allow additional wsimport options
- * @param name for instance, "-neoption"
- * @return whether the name specifies an option recognized by the extension
- */
- public boolean validateOption(String name) {
- return false;
- }
-
- /**
- * Create annotations in service client generated
- * @param options
- * @param cm
- * @param cls
- */
- public void writeWebServiceClientAnnotation(WsimportOptions options, JCodeModel cm, JDefinedClass cls) {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorUtil.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorUtil.java
deleted file mode 100644
index 52cfd515..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorUtil.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.generator;
-
-import com.sun.tools.internal.ws.wscompile.Options;
-
-
-/**
- *
- * @author WS Development Team
- */
-public class GeneratorUtil {
-
- public static boolean classExists(
- Options options,
- String className) {
- try {
- // Takes care of inner classes.
- getLoadableClassName(className, options.getClassLoader());
- return true;
- } catch(ClassNotFoundException ce) {
- return false;
- }
- }
-
- private static String getLoadableClassName(
- String className,
- ClassLoader classLoader)
- throws ClassNotFoundException {
-
- try {
- Class.forName(className, true, classLoader);
- } catch (ClassNotFoundException e) {
- int idx = className.lastIndexOf(GeneratorConstants.DOTC.getValue());
- if (idx > -1) {
- String tmp = className.substring(0, idx) + GeneratorConstants.SIG_INNERCLASS.getValue();
- tmp += className.substring(idx + 1);
- return getLoadableClassName(tmp, classLoader);
- }
- throw e;
- }
- return className;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JavaGeneratorExtensionFacade.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JavaGeneratorExtensionFacade.java
deleted file mode 100644
index d5ebd862..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JavaGeneratorExtensionFacade.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.generator;
-
-import com.sun.codemodel.internal.JMethod;
-import com.sun.tools.internal.ws.api.TJavaGeneratorExtension;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLOperation;
-
-/**
- * @author Arun Gupta
- */
-public final class JavaGeneratorExtensionFacade extends TJavaGeneratorExtension {
- private final TJavaGeneratorExtension[] extensions;
-
- JavaGeneratorExtensionFacade(TJavaGeneratorExtension... extensions) {
- assert extensions != null;
- this.extensions = extensions;
- }
-
- public void writeMethodAnnotations(TWSDLOperation wsdlOperation, JMethod jMethod) {
- for (TJavaGeneratorExtension e : extensions) {
- e.writeMethodAnnotations(wsdlOperation, jMethod);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JwsImplGenerator.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JwsImplGenerator.java
deleted file mode 100644
index 6f79c943..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JwsImplGenerator.java
+++ /dev/null
@@ -1,582 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.processor.generator;
-
-import com.sun.codemodel.internal.*;
-import com.sun.tools.internal.ws.processor.model.*;
-import com.sun.tools.internal.ws.processor.model.java.JavaInterface;
-import com.sun.tools.internal.ws.processor.model.java.JavaMethod;
-import com.sun.tools.internal.ws.processor.model.java.JavaParameter;
-import com.sun.tools.internal.ws.processor.model.jaxb.JAXBTypeAndAnnotation;
-import com.sun.tools.internal.ws.wsdl.document.Definitions;
-import com.sun.tools.internal.ws.wsdl.document.Binding;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAP12Binding;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAPBinding;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAPConstants;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.processor.model.ModelProperties;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.codemodel.internal.JClassAlreadyExistsException;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-
-import com.sun.xml.internal.ws.util.ServiceFinder;
-
-import javax.jws.WebService;
-import javax.xml.ws.BindingType;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Holder;
-import java.io.File;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * Generator for placeholder JWS implementations
- *
- * @since 2.2.6
- */
-public final class JwsImplGenerator extends GeneratorBase {
- private static final Map<String, String> TRANSLATION_MAP = new HashMap<String, String>(
- 1);
- static
- {
- TRANSLATION_MAP.put(SOAPConstants.URI_SOAP_TRANSPORT_HTTP,
- javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING);
- }
- // save the generated impl files' info
- private final List<String> implFiles = new ArrayList<String>();
-
- public static List<String> generate(Model model, WsimportOptions options,
- ErrorReceiver receiver) {
- // options check
-
- // Generate it according the implDestDir option
- if (options.implDestDir == null)
- return null;
-
- JwsImplGenerator jwsImplGenerator = new JwsImplGenerator();
- jwsImplGenerator.init(model, options, receiver);
- jwsImplGenerator.doGeneration();
- // print a warning message while implFiles.size() is zero
- if (jwsImplGenerator.implFiles.isEmpty()) {
- StringBuilder msg = new StringBuilder();
- if (options.implServiceName != null)
- msg.append("serviceName=[").append(options.implServiceName).append("] ");
- if (options.implPortName != null)
- msg.append("portName=[").append(options.implPortName).append("] ");
-
- if (msg.length() > 0)
- msg.append(", Not found in wsdl file.\n");
-
- msg.append("No impl files generated!");
- receiver.warning(null, msg.toString());
- }
-
- return jwsImplGenerator.implFiles;
- }
-
- /**
- * Move impl files to implDestDir
- */
- public static boolean moveToImplDestDir(List<String> gImplFiles,
- WsimportOptions options, ErrorReceiver receiver) {
- if (options.implDestDir == null || gImplFiles == null
- || gImplFiles.isEmpty())
- return true;
-
- List<ImplFile> generatedImplFiles = ImplFile.toImplFiles(gImplFiles);
-
- try {
- File implDestDir = makePackageDir(options);
-
- File movedF;
- File f;
- for (ImplFile implF : generatedImplFiles) {
- movedF = findFile(options, implF.qualifiedName);
- if (movedF == null) {
- // should never happen
- receiver.warning(null, "Class " + implF.qualifiedName
- + " is not generated. Not moving.");
- return false;
- }
-
- f = new File(implDestDir, implF.name);
- if (!movedF.equals(f)) { //bug 10102169
-
- if (f.exists())
- {
- if (!f.delete()){
- receiver.error("Class " + implF.qualifiedName
- + " has existed in destImplDir, and it "
- + "can not be written!", null);
- }
- }
- if(!movedF.renameTo(f))
- {
- throw new Exception();
- }
- }
- }
- } catch (Exception e) {
- receiver.error("Moving WebService Impl files failed!", e);
- return false;
- }
- return true;
- }
-
- private JwsImplGenerator() {
- donotOverride = true;
- }
-
- @Override
- public void visit(Service service) {
- QName serviceName = service.getName();
- // process the ordered service only if it is defined
- if (options.implServiceName != null
- && !equalsNSOptional(options.implServiceName, serviceName))
- return;
-
- for (Port port : service.getPorts()) {
- if (port.isProvider()) {
- continue; // Not generating for Provider based endpoint
- }
-
- // Generate the impl class name according to
- // Xpath(/definitions/service/port[@name]);
- QName portName = port.getName();
-
- // process the ordered port only if it is defined
- if (options.implPortName != null
- && !equalsNSOptional(options.implPortName, portName))
- continue;
-
- String simpleClassName = serviceName.getLocalPart() + "_"
- + portName.getLocalPart() + "Impl";
- String className = makePackageQualified(simpleClassName);
- implFiles.add(className);
-
- if (donotOverride && GeneratorUtil.classExists(options, className)) {
- log("Class " + className + " exists. Not overriding.");
- return;
- }
-
- JDefinedClass cls = null;
- try {
- cls = getClass(className, ClassType.CLASS);
- } catch (JClassAlreadyExistsException e) {
- log("Class " + className
- + " generates failed. JClassAlreadyExistsException[" + className
- + "].");
- return;
- }
-
- // Each serviceImpl will implements one port interface
- JavaInterface portIntf = port.getJavaInterface();
- String portClassName = Names.customJavaTypeClassName(portIntf);
- JDefinedClass portCls = null;
- try {
- portCls = getClass(portClassName, ClassType.INTERFACE);
- } catch (JClassAlreadyExistsException e) {
- log("Class " + className
- + " generates failed. JClassAlreadyExistsException["
- + portClassName + "].");
- return;
- }
- cls._implements(portCls);
-
- // create a default constructor
- cls.constructor(JMod.PUBLIC);
-
- // write class comment - JAXWS warning
- JDocComment comment = cls.javadoc();
-
- if (service.getJavaDoc() != null) {
- comment.add(service.getJavaDoc());
- comment.add("\n\n");
- }
-
- for (String doc : getJAXWSClassComment()) {
- comment.add(doc);
- }
-
- // @WebService
- JAnnotationUse webServiceAnn = cls.annotate(cm.ref(WebService.class));
- writeWebServiceAnnotation(service, port, webServiceAnn);
-
- // @BindingType
- JAnnotationUse bindingTypeAnn = cls.annotate(cm.ref(BindingType.class));
- writeBindingTypeAnnotation(port, bindingTypeAnn);
-
- // extra annotation
- for( GeneratorExtension f : ServiceFinder.find(GeneratorExtension.class) ) {
- f.writeWebServiceAnnotation(model, cm, cls, port);
- }
-
- // WebMethods
- for (Operation operation : port.getOperations()) {
- JavaMethod method = operation.getJavaMethod();
-
- // @WebMethod
- JMethod m;
- JDocComment methodDoc;
- String methodJavaDoc = operation.getJavaDoc();
- if (method.getReturnType().getName().equals("void")) {
- m = cls.method(JMod.PUBLIC, void.class, method.getName());
- methodDoc = m.javadoc();
- } else {
- JAXBTypeAndAnnotation retType = method.getReturnType().getType();
- m = cls.method(JMod.PUBLIC, retType.getType(), method.getName());
- retType.annotate(m);
- methodDoc = m.javadoc();
- JCommentPart ret = methodDoc.addReturn();
- ret.add("returns " + retType.getName());
- }
-
- if (methodJavaDoc != null)
- methodDoc.add(methodJavaDoc);
-
- JClass holder = cm.ref(Holder.class);
- for (JavaParameter parameter : method.getParametersList()) {
- JVar var;
- JAXBTypeAndAnnotation paramType = parameter.getType().getType();
- if (parameter.isHolder()) {
- var = m.param(holder.narrow(paramType.getType().boxify()),
- parameter.getName());
- } else {
- var = m.param(paramType.getType(), parameter.getName());
- }
- methodDoc.addParam(var);
- }
-
- com.sun.tools.internal.ws.wsdl.document.Operation wsdlOp = operation
- .getWSDLPortTypeOperation();
- for (Fault fault : operation.getFaultsSet()) {
- m._throws(fault.getExceptionClass());
- methodDoc.addThrows(fault.getExceptionClass());
- wsdlOp.putFault(fault.getWsdlFaultName(), fault.getExceptionClass());
- }
- m.body().block().directStatement("//replace with your impl here");
- m.body().block().directStatement(
- getReturnString(method.getReturnType().getName()));
- }
- }
- }
-
- /**
- * Generate return statement according to return type.
- *
- * @param type
- * The method's return type
- * @return The whole return statement
- */
- private String getReturnString(String type) {
- final String nullReturnStr = "return null;";
- // complex type or array
- if (type.indexOf('.') > -1 || type.indexOf('[') > -1) {
- return nullReturnStr;
- }
-
- // primitive type
- if (type.equals("void")) {
- return "return;";
- }
- if (type.equals("boolean")) {
- return "return false;";
- }
- if (type.equals("int") || type.equals("byte") || type.equals("short")
- || type.equals("long") || type.equals("double") || type.equals("float")) {
- return "return 0;";
- }
- if (type.equals("char")) {
- return "return '0';";
- }
-
- return nullReturnStr;
- }
-
- /**
- *
- * @param service
- * @param port
- * @param webServiceAnn
- * @param options
- */
- private void writeWebServiceAnnotation(Service service, Port port,
- JAnnotationUse webServiceAnn) {
- webServiceAnn.param("portName", port.getName().getLocalPart());
- webServiceAnn.param("serviceName", service.getName().getLocalPart());
- webServiceAnn.param("targetNamespace", service.getName().getNamespaceURI());
- webServiceAnn.param("wsdlLocation", wsdlLocation);
- webServiceAnn.param("endpointInterface", port.getJavaInterface().getName());
- }
-
- //CR373098 To transform the java class name as validate.
- private String transToValidJavaIdentifier(String s) {
- if (s == null) {
- return null;
- }
- final int len = s.length();
- StringBuilder retSB = new StringBuilder();
- if (len == 0 || !Character.isJavaIdentifierStart(s.charAt(0))) {
- retSB.append("J"); //update to a default start char
- } else {
- retSB.append(s.charAt(0));
- }
-
- for (int i = 1; i < len; i++) {
- if (!Character.isJavaIdentifierPart(s.charAt(i)))
- ; //delete it if it is illegal //TODO: It might conflict "a-b" vs. "ab"
- else {
- retSB.append(s.charAt(i));
- }
- }
- return retSB.toString();
- }
-
- private String makePackageQualified(String s) {
- s = transToValidJavaIdentifier(s);
- if (options.defaultPackage != null && !options.defaultPackage.equals("")) {
- return options.defaultPackage + "." + s;
- } else {
- return s;
- }
- }
-
-
- /**
- * TODO
- *
- * @param port
- * @param bindingTypeAnn
- */
- private void writeBindingTypeAnnotation(Port port,
- JAnnotationUse bindingTypeAnn) {
- QName bName = (QName) port
- .getProperty(ModelProperties.PROPERTY_WSDL_BINDING_NAME);
- if (bName == null)
- return;
-
- String v = getBindingType(bName);
-
- // TODO: How to decide if it is a mtom?
- if (v != null) {
- // transport = translate(transport);
- bindingTypeAnn.param("value", v);
- }
-
- }
-
- private String resolveBindingValue(TWSDLExtension wsdlext) {
- if (wsdlext.getClass().equals(SOAPBinding.class)) {
- SOAPBinding sb = (SOAPBinding) wsdlext;
- if(javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_MTOM_BINDING.equals(sb.getTransport()))
- return javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_MTOM_BINDING;
- else {
- for(GeneratorExtension f : ServiceFinder.find(GeneratorExtension.class) ) {
- String bindingValue = f.getBindingValue(sb.getTransport(), SOAPVersion.SOAP_11);
- if(bindingValue!=null) {
- return bindingValue;
- }
- }
- return javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING;
- }
- }
- if (wsdlext.getClass().equals(SOAP12Binding.class)) {
- SOAP12Binding sb = (SOAP12Binding) wsdlext;
- if(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_MTOM_BINDING.equals(sb.getTransport()))
- return javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_MTOM_BINDING;
- else {
- for(GeneratorExtension f : ServiceFinder.find(GeneratorExtension.class) ) {
- String bindingValue = f.getBindingValue(sb.getTransport(), SOAPVersion.SOAP_12);
- if(bindingValue!=null) {
- return bindingValue;
- }
- }
- return javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING;
- }
- }
- return null;
- }
-
- private String getBindingType(QName bName) {
-
- String value = null;
- // process the bindings in definitions of model.entity
- if (model.getEntity() instanceof Definitions) {
- Definitions definitions = (Definitions) model.getEntity();
- if (definitions != null) {
- Iterator bindings = definitions.bindings();
- if (bindings != null) {
- while (bindings.hasNext()) {
- Binding binding = (Binding) bindings.next();
- if (bName.getLocalPart().equals(binding.getName())
- && bName.getNamespaceURI().equals(binding.getNamespaceURI())) {
- List<TWSDLExtension> bindextends = (List<TWSDLExtension>) binding
- .extensions();
- for (TWSDLExtension wsdlext : bindextends) {
- value = resolveBindingValue(wsdlext);
- if (value != null)
- break;
- }
- break;
- }
- }
- }
- }
- }
-
- // process the bindings in whole document
- if (value == null) {
- if (model.getEntity() instanceof Definitions) {
- Definitions definitions = (Definitions) model.getEntity();
- Binding b = (Binding) definitions.resolveBindings().get(bName);
- if (b != null) {
- List<TWSDLExtension> bindextends = (List<TWSDLExtension>) b
- .extensions();
- for (TWSDLExtension wsdlext : bindextends) {
- value = resolveBindingValue(wsdlext);
- if (value != null)
- break;
- }
- }
- }
- }
-
- return value;
- }
-
- /**
- * Since the SOAP 1.1 binding transport URI defined in WSDL 1.1 specification
- * is different with the SOAPBinding URI defined by JAX-WS 2.0 specification.
- * We must translate the wsdl version into JAX-WS version. If the given
- * transport URI is NOT one of the predefined transport URIs, it is returned
- * as is.
- *
- * @param transportURI
- * retrieved from WSDL
- * @return Standard BindingType URI defined by JAX-WS 2.0 specification.
- */
-// private String translate(String transportURI)
-// {
-// String translatedBindingId = TRANSLATION_MAP.get(transportURI);
-// if (translatedBindingId == null)
-// translatedBindingId = transportURI;
-//
-// return translatedBindingId;
-// }
-
- /*****************************************************************************
- * Inner classes definition
- */
- static final class ImplFile {
- public String qualifiedName; // package+"."+simpleClassName + ".java"
-
- public String name; // simpleClassName + ".java"
-
- private ImplFile(String qualifiedClassName) {
- this.qualifiedName = qualifiedClassName + ".java";
-
- String simpleClassName = qualifiedClassName;
- int i = qualifiedClassName.lastIndexOf(".");
- if (i != -1)
- simpleClassName = qualifiedClassName.substring(i + 1);
-
- this.name = simpleClassName + ".java";
- }
-
- public static List<ImplFile> toImplFiles(List<String> qualifiedClassNames) {
- List<ImplFile> ret = new ArrayList<ImplFile>();
-
- for (String qualifiedClassName : qualifiedClassNames)
- ret.add(new ImplFile(qualifiedClassName));
-
- return ret;
- }
- }
-
- /*****************************************************************************
- * Other utility methods
- */
-
- private static File makePackageDir(WsimportOptions options) {
- File ret = null;
- if (options.defaultPackage != null && !options.defaultPackage.equals("")) {
- String subDir = options.defaultPackage.replace('.', '/');
- ret = new File(options.implDestDir, subDir);
- } else {
- ret = options.implDestDir;
- }
-
- boolean created = ret.mkdirs();
- if (options.verbose && !created) {
- System.out.println(MessageFormat.format("Directory not created: {0}", ret));
- }
- return ret;
- }
-
- private static String getQualifiedFileName(String canonicalBaseDir, File f)
- throws java.io.IOException {
- String fp = f.getCanonicalPath();
- if (fp == null)
- return null;
- fp = fp.replace(canonicalBaseDir, "");
- fp = fp.replace('\\', '.');
- fp = fp.replace('/', '.');
- if (fp.startsWith("."))
- fp = fp.substring(1);
-
- return fp;
- }
-
- private static File findFile(WsimportOptions options, String qualifiedFileName)
- throws java.io.IOException {
- String baseDir = options.sourceDir.getCanonicalPath();
- String fp = null;
- for (File f : options.getGeneratedFiles()) {
- fp = getQualifiedFileName(baseDir, f);
- if (qualifiedFileName.equals(fp))
- return f;
- }
-
- return null;
- }
-
- private static boolean equalsNSOptional(String strQName, QName checkQN) {
- if (strQName == null)
- return false;
- strQName = strQName.trim();
- QName reqQN = QName.valueOf(strQName);
-
- if (reqQN.getNamespaceURI() == null || reqQN.getNamespaceURI().equals(""))
- return reqQN.getLocalPart().equals(checkQN.getLocalPart());
-
- return reqQN.equals(checkQN);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/Names.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/Names.java
deleted file mode 100644
index 93b682d3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/Names.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.generator;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.tools.internal.ws.processor.model.Fault;
-import com.sun.tools.internal.ws.processor.model.ModelProperties;
-import com.sun.tools.internal.ws.processor.model.Port;
-import com.sun.tools.internal.ws.processor.model.java.JavaInterface;
-import com.sun.tools.internal.ws.processor.model.java.JavaStructureMember;
-import com.sun.tools.internal.ws.processor.modeler.ModelerConstants;
-import com.sun.tools.internal.ws.util.ClassNameInfo;
-import com.sun.xml.internal.ws.util.StringUtils;
-
-import javax.xml.namespace.QName;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Names provides utility methods used by other wscompile classes
- * for dealing with identifiers.
- *
- * @author WS Development Team
- */
-public final class Names {
-
- private Names() {
- }
-
- public static String getPortName(Port port) {
- String javaPortName =
- (String) port.getProperty(ModelProperties.PROPERTY_JAVA_PORT_NAME);
- if (javaPortName != null) {
- return javaPortName;
- } else {
- QName portName =
- (QName) port.getProperty(
- ModelProperties.PROPERTY_WSDL_PORT_NAME);
- if (portName != null) {
- return portName.getLocalPart();
- } else {
- String name = stripQualifier(port.getJavaInterface().getName());
- return ClassNameInfo.replaceInnerClassSym(name);
- }
- }
- }
-
-
- public static String stripQualifier(String name) {
- return ClassNameInfo.getName(name);
- }
-
- public static String getPackageName(String className) {
- String packageName = ClassNameInfo.getQualifier(className);
- return packageName != null ? packageName : "";
- }
-
-
- public static String customJavaTypeClassName(JavaInterface intf) {
- return intf.getName();
- }
-
- public static String customExceptionClassName(Fault fault) {
- return fault.getJavaException().getName();
- }
-
- public static String getExceptionClassMemberName(){
- return GeneratorConstants.FAULT_CLASS_MEMBER_NAME.getValue();
- }
-
- public static boolean isJavaReservedWord(String name) {
- return RESERVED_WORDS.get(name) != null;
- }
-
- /**
- * See if its a java keyword name, if so then mangle the name
- */
- public static @NotNull String getJavaReserverVarialbeName(@NotNull String name){
- return (RESERVED_WORDS.get(name) == null) ? name : RESERVED_WORDS.get(name);
- }
-
- /* here we check on wether return values datatype is
- boolean. If its boolean, instead of a get method
- its set a is<MethodName> to comply with JavaBeans
- Pattern spec */
- public static String getJavaMemberReadMethod(JavaStructureMember member) {
- String return_value;
- if (member.getType().getRealName().equals(ModelerConstants.BOOLEAN_CLASSNAME.getValue())) {
- return_value = GeneratorConstants.IS.getValue() + StringUtils.capitalize(member.getName());
- } else {
- return_value = GeneratorConstants.GET.getValue() + StringUtils.capitalize(member.getName());
- }
- return (return_value);
- }
-
- public static String getResponseName(String messageName) {
- return messageName + GeneratorConstants.RESPONSE.getValue();
- }
-
- private static final Map<String, String> RESERVED_WORDS = new HashMap<String, String>(53);
-
- static {
- RESERVED_WORDS.put("abstract", "_abstract");
- RESERVED_WORDS.put("assert", "_assert");
- RESERVED_WORDS.put("boolean", "_boolean");
- RESERVED_WORDS.put("break", "_break");
- RESERVED_WORDS.put("byte", "_byte");
- RESERVED_WORDS.put("case", "_case");
- RESERVED_WORDS.put("catch", "_catch");
- RESERVED_WORDS.put("char", "_char");
- RESERVED_WORDS.put("class", "_class");
- RESERVED_WORDS.put("const", "_const");
- RESERVED_WORDS.put("continue", "_continue");
- RESERVED_WORDS.put("default", "_default");
- RESERVED_WORDS.put("do", "_do");
- RESERVED_WORDS.put("double", "_double");
- RESERVED_WORDS.put("else", "_else");
- RESERVED_WORDS.put("extends", "_extends");
- RESERVED_WORDS.put("false", "_false");
- RESERVED_WORDS.put("final", "_final");
- RESERVED_WORDS.put("finally", "_finally");
- RESERVED_WORDS.put("float", "_float");
- RESERVED_WORDS.put("for", "_for");
- RESERVED_WORDS.put("goto", "_goto");
- RESERVED_WORDS.put("if", "_if");
- RESERVED_WORDS.put("implements", "_implements");
- RESERVED_WORDS.put("import", "_import");
- RESERVED_WORDS.put("instanceof", "_instanceof");
- RESERVED_WORDS.put("int", "_int");
- RESERVED_WORDS.put("interface", "_interface");
- RESERVED_WORDS.put("long", "_long");
- RESERVED_WORDS.put("native", "_native");
- RESERVED_WORDS.put("new", "_new");
- RESERVED_WORDS.put("null", "_null");
- RESERVED_WORDS.put("package", "_package");
- RESERVED_WORDS.put("private", "_private");
- RESERVED_WORDS.put("protected", "_protected");
- RESERVED_WORDS.put("public", "_public");
- RESERVED_WORDS.put("return", "_return");
- RESERVED_WORDS.put("short", "_short");
- RESERVED_WORDS.put("static", "_static");
- RESERVED_WORDS.put("strictfp", "_strictfp");
- RESERVED_WORDS.put("super", "_super");
- RESERVED_WORDS.put("switch", "_switch");
- RESERVED_WORDS.put("synchronized", "_synchronized");
- RESERVED_WORDS.put("this", "_this");
- RESERVED_WORDS.put("throw", "_throw");
- RESERVED_WORDS.put("throws", "_throws");
- RESERVED_WORDS.put("transient", "_transient");
- RESERVED_WORDS.put("true", "_true");
- RESERVED_WORDS.put("try", "_try");
- RESERVED_WORDS.put("void", "_void");
- RESERVED_WORDS.put("volatile", "_volatile");
- RESERVED_WORDS.put("while", "_while");
- RESERVED_WORDS.put("enum", "_enum");
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/SeiGenerator.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/SeiGenerator.java
deleted file mode 100644
index 0a4223f1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/SeiGenerator.java
+++ /dev/null
@@ -1,491 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.processor.generator;
-
-import com.sun.codemodel.internal.*;
-import com.sun.tools.internal.ws.api.TJavaGeneratorExtension;
-import com.sun.tools.internal.ws.processor.model.*;
-import com.sun.tools.internal.ws.processor.model.java.JavaInterface;
-import com.sun.tools.internal.ws.processor.model.java.JavaMethod;
-import com.sun.tools.internal.ws.processor.model.java.JavaParameter;
-import com.sun.tools.internal.ws.processor.model.jaxb.JAXBType;
-import com.sun.tools.internal.ws.processor.model.jaxb.JAXBTypeAndAnnotation;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.Options;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle;
-import com.sun.tools.internal.ws.wsdl.document.PortType;
-import com.sun.tools.internal.ws.resources.GeneratorMessages;
-
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Holder;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.xml.sax.Locator;
-
-public class SeiGenerator extends GeneratorBase {
- private TJavaGeneratorExtension extension;
- private List<TJavaGeneratorExtension> extensionHandlers;
-
- public static void generate(Model model, WsimportOptions options, ErrorReceiver receiver, TJavaGeneratorExtension... extensions){
- SeiGenerator seiGenerator = new SeiGenerator();
- seiGenerator.init(model, options, receiver, extensions);
- seiGenerator.doGeneration();
- }
-
- public void init(Model model, WsimportOptions options, ErrorReceiver receiver, TJavaGeneratorExtension... extensions) {
- init(model, options, receiver);
- extensionHandlers = new ArrayList<TJavaGeneratorExtension>();
-
- // register handlers for default extensions
-
- // 2.2 Spec requires generation of @Action when wsam:Action is explicitly stated in wsdl
- if (options.target.isLaterThan(Options.Target.V2_2)) {
- register(new W3CAddressingJavaGeneratorExtension());
- }
-
- for (TJavaGeneratorExtension j : extensions) {
- register(j);
- }
-
- this.extension = new JavaGeneratorExtensionFacade(extensionHandlers.toArray(new TJavaGeneratorExtension[extensionHandlers.size()]));
- }
-
- private void write(Port port) {
- JavaInterface intf = port.getJavaInterface();
- String className = Names.customJavaTypeClassName(intf);
-
- if (donotOverride && GeneratorUtil.classExists(options, className)) {
- log("Class " + className + " exists. Not overriding.");
- return;
- }
-
-
- JDefinedClass cls;
- try {
- cls = getClass(className, ClassType.INTERFACE);
- } catch (JClassAlreadyExistsException e) {
- QName portTypeName =
- (QName) port.getProperty(
- ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME);
- Locator loc = null;
- if(portTypeName != null){
- PortType pt = port.portTypes.get(portTypeName);
- if (pt!=null) {
- loc = pt.getLocator();
- }
- }
- receiver.error(loc, GeneratorMessages.GENERATOR_SEI_CLASS_ALREADY_EXIST(intf.getName(), portTypeName));
- return;
- }
- // If the class has methods it has already been defined
- // so skip it.
- if (!cls.methods().isEmpty()) {
- return;
- }
-
- //write class comment - JAXWS warning
- JDocComment comment = cls.javadoc();
-
- String ptDoc = intf.getJavaDoc();
- if(ptDoc != null){
- comment.add(ptDoc);
- comment.add("\n\n");
- }
-
- for(String doc:getJAXWSClassComment()){
- comment.add(doc);
- }
-
-
- //@WebService
- JAnnotationUse webServiceAnn = cls.annotate(cm.ref(WebService.class));
- writeWebServiceAnnotation(port, webServiceAnn);
-
- //@HandlerChain
- writeHandlerConfig(Names.customJavaTypeClassName(port.getJavaInterface()), cls, options);
-
- //@SOAPBinding
- writeSOAPBinding(port, cls);
-
- //@XmlSeeAlso
- if (options.target.isLaterThan(Options.Target.V2_1)) {
- writeXmlSeeAlso(cls);
- }
-
- for (Operation operation: port.getOperations()) {
- JavaMethod method = operation.getJavaMethod();
-
- //@WebMethod
- JMethod m;
- JDocComment methodDoc;
- String methodJavaDoc = operation.getJavaDoc();
- if(method.getReturnType().getName().equals("void")){
- m = cls.method(JMod.PUBLIC, void.class, method.getName());
- methodDoc = m.javadoc();
- }else {
- JAXBTypeAndAnnotation retType = method.getReturnType().getType();
- m = cls.method(JMod.PUBLIC, retType.getType(), method.getName());
- retType.annotate(m);
- methodDoc = m.javadoc();
- JCommentPart ret = methodDoc.addReturn();
- ret.add("returns "+retType.getName());
- }
- if (methodJavaDoc != null) {
- methodDoc.add(methodJavaDoc);
- }
-
- writeWebMethod(operation, m);
- JClass holder = cm.ref(Holder.class);
- for (JavaParameter parameter: method.getParametersList()) {
- JVar var;
- JAXBTypeAndAnnotation paramType = parameter.getType().getType();
- if (parameter.isHolder()) {
- var = m.param(holder.narrow(paramType.getType().boxify()), parameter.getName());
- }else{
- var = m.param(paramType.getType(), parameter.getName());
- }
-
- //annotate parameter with JAXB annotations
- paramType.annotate(var);
- methodDoc.addParam(var);
- JAnnotationUse paramAnn = var.annotate(cm.ref(WebParam.class));
- writeWebParam(operation, parameter, paramAnn);
- }
- com.sun.tools.internal.ws.wsdl.document.Operation wsdlOp = operation.getWSDLPortTypeOperation();
- for(Fault fault:operation.getFaultsSet()){
- m._throws(fault.getExceptionClass());
- methodDoc.addThrows(fault.getExceptionClass());
- wsdlOp.putFault(fault.getWsdlFaultName(), fault.getExceptionClass());
- }
-
- //It should be the last thing to invoke after JMethod is built completely
- extension.writeMethodAnnotations(wsdlOp, m);
- }
- }
-
- private void writeXmlSeeAlso(JDefinedClass cls) {
- if (model.getJAXBModel().getS2JJAXBModel() != null) {
- List<JClass> objectFactories = model.getJAXBModel().getS2JJAXBModel().getAllObjectFactories();
-
- //if there are no object facotires, dont generate @XmlSeeAlso
- if (objectFactories.isEmpty()) {
- return;
- }
-
- JAnnotationUse xmlSeeAlso = cls.annotate(cm.ref(XmlSeeAlso.class));
- JAnnotationArrayMember paramArray = xmlSeeAlso.paramArray("value");
- for (JClass of : objectFactories) {
- paramArray = paramArray.param(of);
- }
- }
-
- }
-
- private void writeWebMethod(Operation operation, JMethod m) {
- Response response = operation.getResponse();
- JAnnotationUse webMethodAnn = m.annotate(cm.ref(WebMethod.class));
- String operationName = (operation instanceof AsyncOperation)?
- ((AsyncOperation)operation).getNormalOperation().getName().getLocalPart():
- operation.getName().getLocalPart();
-
- if(!m.name().equals(operationName)){
- webMethodAnn.param("operationName", operationName);
- }
-
- if (operation.getSOAPAction() != null && operation.getSOAPAction().length() > 0){
- webMethodAnn.param("action", operation.getSOAPAction());
- }
-
- if (operation.getResponse() == null){
- m.annotate(javax.jws.Oneway.class);
- }else if (!operation.getJavaMethod().getReturnType().getName().equals("void") &&
- operation.getResponse().getParametersList().size() > 0){
- Block block;
- String resultName = null;
- String nsURI = null;
- if (operation.getResponse().getBodyBlocks().hasNext()) {
- block = operation.getResponse().getBodyBlocks().next();
- resultName = block.getName().getLocalPart();
- if(isDocStyle || block.getLocation() == Block.HEADER){
- nsURI = block.getName().getNamespaceURI();
- }
- }
-
- for (Parameter parameter : operation.getResponse().getParametersList()) {
- if (parameter.getParameterIndex() == -1) {
- if(operation.isWrapped()||!isDocStyle){
- if(parameter.getBlock().getLocation() == Block.HEADER){
- resultName = parameter.getBlock().getName().getLocalPart();
- }else{
- resultName = parameter.getName();
- }
- if (isDocStyle || (parameter.getBlock().getLocation() == Block.HEADER)) {
- nsURI = parameter.getType().getName().getNamespaceURI();
- }
- }else if(isDocStyle){
- JAXBType t = (JAXBType)parameter.getType();
- resultName = t.getName().getLocalPart();
- nsURI = t.getName().getNamespaceURI();
- }
- if(!(operation instanceof AsyncOperation)){
- JAnnotationUse wr = null;
-
- if(!resultName.equals("return")){
- wr = m.annotate(javax.jws.WebResult.class);
- wr.param("name", resultName);
- }
- if (nsURI != null || (isDocStyle && operation.isWrapped())) {
- if(wr == null) {
- wr = m.annotate(javax.jws.WebResult.class);
- }
- wr.param("targetNamespace", nsURI);
- }
- //doclit wrapped could have additional headers
- if(!(isDocStyle && operation.isWrapped()) ||
- (parameter.getBlock().getLocation() == Block.HEADER)){
- if (wr == null) {
- wr = m.annotate(javax.jws.WebResult.class);
- }
- wr.param("partName", parameter.getName());
- }
- if(parameter.getBlock().getLocation() == Block.HEADER){
- if (wr == null) {
- wr = m.annotate(javax.jws.WebResult.class);
- }
- wr.param("header",true);
- }
- }
- }
-
- }
- }
-
- //DOC/BARE
- if (!sameParamStyle) {
- if(!operation.isWrapped()) {
- JAnnotationUse sb = m.annotate(SOAPBinding.class);
- sb.param("parameterStyle", SOAPBinding.ParameterStyle.BARE);
- }
- }
-
- if (operation.isWrapped() && operation.getStyle().equals(SOAPStyle.DOCUMENT)) {
- Block reqBlock = operation.getRequest().getBodyBlocks().next();
- JAnnotationUse reqW = m.annotate(javax.xml.ws.RequestWrapper.class);
- reqW.param("localName", reqBlock.getName().getLocalPart());
- reqW.param("targetNamespace", reqBlock.getName().getNamespaceURI());
- reqW.param("className", reqBlock.getType().getJavaType().getName());
-
- if (response != null) {
- JAnnotationUse resW = m.annotate(javax.xml.ws.ResponseWrapper.class);
- Block resBlock = response.getBodyBlocks().next();
- resW.param("localName", resBlock.getName().getLocalPart());
- resW.param("targetNamespace", resBlock.getName().getNamespaceURI());
- resW.param("className", resBlock.getType().getJavaType().getName());
- }
- }
- }
-
- private boolean isMessageParam(Parameter param, Message message) {
- Block block = param.getBlock();
-
- return (message.getBodyBlockCount() > 0 && block.equals(message.getBodyBlocks().next())) ||
- (message.getHeaderBlockCount() > 0 &&
- block.equals(message.getHeaderBlocks().next()));
- }
-
- private boolean isHeaderParam(Parameter param, Message message) {
- if (message.getHeaderBlockCount() == 0) {
- return false;
- }
-
- for (Block headerBlock : message.getHeaderBlocksMap().values()) {
- if (param.getBlock().equals(headerBlock)) {
- return true;
- }
- }
-
- return false;
- }
-
- private boolean isAttachmentParam(Parameter param, Message message){
- if (message.getAttachmentBlockCount() == 0) {
- return false;
- }
-
- for (Block attBlock : message.getAttachmentBlocksMap().values()) {
- if (param.getBlock().equals(attBlock)) {
- return true;
- }
- }
-
- return false;
- }
-
- private boolean isUnboundParam(Parameter param, Message message){
- if (message.getUnboundBlocksCount() == 0) {
- return false;
- }
-
- for (Block unboundBlock : message.getUnboundBlocksMap().values()) {
- if (param.getBlock().equals(unboundBlock)) {
- return true;
- }
- }
-
- return false;
- }
-
- private void writeWebParam(Operation operation, JavaParameter javaParameter, JAnnotationUse paramAnno) {
- Parameter param = javaParameter.getParameter();
- Request req = operation.getRequest();
- Response res = operation.getResponse();
-
- boolean header = isHeaderParam(param, req) ||
- (res != null && isHeaderParam(param, res));
-
- String name;
- boolean isWrapped = operation.isWrapped();
-
- if ((param.getBlock().getLocation() == Block.HEADER) || (isDocStyle && !isWrapped)) {
- name = param.getBlock().getName().getLocalPart();
- } else {
- name = param.getName();
- }
-
- paramAnno.param("name", name);
-
- String ns= null;
-
- if (isDocStyle) {
- ns = param.getBlock().getName().getNamespaceURI(); // its bare nsuri
- if(isWrapped){
- ns = param.getType().getName().getNamespaceURI();
- }
- }else if(header){
- ns = param.getBlock().getName().getNamespaceURI();
- }
-
- if (ns != null || (isDocStyle && isWrapped)) {
- paramAnno.param("targetNamespace", ns);
- }
-
- if (header) {
- paramAnno.param("header", true);
- }
-
- if (param.isINOUT()){
- paramAnno.param("mode", javax.jws.WebParam.Mode.INOUT);
- }else if ((res != null) && (isMessageParam(param, res) || isHeaderParam(param, res) || isAttachmentParam(param, res) ||
- isUnboundParam(param,res) || param.isOUT())){
- paramAnno.param("mode", javax.jws.WebParam.Mode.OUT);
- }
-
- //doclit wrapped could have additional headers
- if (!(isDocStyle && isWrapped) || header) {
- paramAnno.param("partName", javaParameter.getParameter().getName());
- }
- }
-
- private boolean isDocStyle = true;
- private boolean sameParamStyle = true;
- private void writeSOAPBinding(Port port, JDefinedClass cls) {
- JAnnotationUse soapBindingAnn = null;
- isDocStyle = port.getStyle() == null || port.getStyle().equals(SOAPStyle.DOCUMENT);
- if(!isDocStyle){
- soapBindingAnn = cls.annotate(SOAPBinding.class);
- soapBindingAnn.param("style", SOAPBinding.Style.RPC);
- port.setWrapped(true);
- }
- if(isDocStyle){
- boolean first = true;
- boolean isWrapper = true;
- for(Operation operation:port.getOperations()){
- if(first){
- isWrapper = operation.isWrapped();
- first = false;
- continue;
- }
- sameParamStyle = (isWrapper == operation.isWrapped());
- if (!sameParamStyle) {
- break;
- }
- }
- if (sameParamStyle) {
- port.setWrapped(isWrapper);
- }
- }
- if(sameParamStyle && !port.isWrapped()){
- if (soapBindingAnn == null) {
- soapBindingAnn = cls.annotate(SOAPBinding.class);
- }
- soapBindingAnn.param("parameterStyle", SOAPBinding.ParameterStyle.BARE);
- }
- }
-
- private void writeWebServiceAnnotation(Port port, JAnnotationUse wsa) {
- QName name = (QName) port.getProperty(ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME);
- wsa.param("name", name.getLocalPart());
- wsa.param("targetNamespace", name.getNamespaceURI());
- }
-
- @Override
- public void visit(Model model) throws Exception {
- for(Service s:model.getServices()){
- s.accept(this);
- }
- }
-
- @Override
- public void visit(Service service) throws Exception {
- String jd = model.getJavaDoc();
- if(jd != null){
- JPackage pkg = cm._package(options.defaultPackage);
- pkg.javadoc().add(jd);
- }
-
- for(Port p:service.getPorts()){
- visitPort(service, p);
- }
- }
-
- private void visitPort(Service service, Port port) {
- if (port.isProvider()) {
- return; // Not generating for Provider based endpoint
- }
- write(port);
- }
-
- private void register(TJavaGeneratorExtension h) {
- extensionHandlers.add(h);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/ServiceGenerator.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/ServiceGenerator.java
deleted file mode 100644
index 958484e7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/ServiceGenerator.java
+++ /dev/null
@@ -1,422 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.processor.generator;
-
-import com.sun.codemodel.internal.ClassType;
-import com.sun.codemodel.internal.JAnnotationUse;
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JCatchBlock;
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JClassAlreadyExistsException;
-import com.sun.codemodel.internal.JCommentPart;
-import com.sun.codemodel.internal.JConditional;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JDocComment;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JFieldVar;
-import com.sun.codemodel.internal.JInvocation;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JTryBlock;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.ws.processor.model.Model;
-import com.sun.tools.internal.ws.processor.model.ModelProperties;
-import com.sun.tools.internal.ws.processor.model.Port;
-import com.sun.tools.internal.ws.processor.model.Service;
-import com.sun.tools.internal.ws.processor.model.java.JavaInterface;
-import com.sun.tools.internal.ws.resources.GeneratorMessages;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.Options;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.tools.internal.ws.wsdl.document.PortType;
-import com.sun.xml.internal.ws.spi.db.BindingHelper;
-
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebEndpoint;
-import javax.xml.ws.WebServiceClient;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.WebServiceException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import java.util.Locale;
-
-/**
- * @author WS Development Team
- * @author Jitendra Kotamraju
- */
-public class ServiceGenerator extends GeneratorBase {
-
- public static void generate(Model model, WsimportOptions options, ErrorReceiver receiver) {
- ServiceGenerator serviceGenerator = new ServiceGenerator(model, options, receiver);
- serviceGenerator.doGeneration();
- }
-
- private ServiceGenerator(Model model, WsimportOptions options, ErrorReceiver receiver) {
- init(model, options, receiver);
- }
-
- @Override
- public void visit(Service service) {
- JavaInterface intf = service.getJavaInterface();
- String className = Names.customJavaTypeClassName(intf);
- if (donotOverride && GeneratorUtil.classExists(options, className)) {
- log("Class " + className + " exists. Not overriding.");
- return;
- }
-
- JDefinedClass cls;
- try {
- cls = getClass(className, ClassType.CLASS);
- } catch (JClassAlreadyExistsException e) {
- receiver.error(service.getLocator(), GeneratorMessages.GENERATOR_SERVICE_CLASS_ALREADY_EXIST(className, service.getName()));
- return;
- }
-
- cls._extends(javax.xml.ws.Service.class);
- String serviceFieldName = BindingHelper.mangleNameToClassName(service.getName().getLocalPart()).toUpperCase(Locale.ENGLISH);
- String wsdlLocationName = serviceFieldName + "_WSDL_LOCATION";
- JFieldVar urlField = cls.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, URL.class, wsdlLocationName);
-
- JFieldVar exField = cls.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, WebServiceException.class, serviceFieldName+"_EXCEPTION");
-
-
- String serviceName = serviceFieldName + "_QNAME";
- cls.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, QName.class, serviceName,
- JExpr._new(cm.ref(QName.class)).arg(service.getName().getNamespaceURI()).arg(service.getName().getLocalPart()));
-
- JClass qNameCls = cm.ref(QName.class);
- JInvocation inv;
- inv = JExpr._new(qNameCls);
- inv.arg("namespace");
- inv.arg("localpart");
-
- if (options.useBaseResourceAndURLToLoadWSDL) {
- writeClassLoaderBaseResourceWSDLLocation(className, cls, urlField, exField);
- } else if (wsdlLocation.startsWith("http://") || wsdlLocation.startsWith("https://") || wsdlLocation.startsWith("file:/")) {
- writeAbsWSDLLocation(cls, urlField, exField);
- } else if (wsdlLocation.startsWith("META-INF/")) {
- writeClassLoaderResourceWSDLLocation(className, cls, urlField, exField);
- } else {
- writeResourceWSDLLocation(className, cls, urlField, exField);
- }
-
- //write class comment - JAXWS warning
- JDocComment comment = cls.javadoc();
-
- if (service.getJavaDoc() != null) {
- comment.add(service.getJavaDoc());
- comment.add("\n\n");
- }
-
- for (String doc : getJAXWSClassComment()) {
- comment.add(doc);
- }
-
- // Generating constructor
- // for e.g: public ExampleService()
- JMethod constructor1 = cls.constructor(JMod.PUBLIC);
- String constructor1Str = String.format("super(__getWsdlLocation(), %s);", serviceName);
- constructor1.body().directStatement(constructor1Str);
-
- // Generating constructor
- // for e.g: public ExampleService(WebServiceFeature ... features)
- if (options.target.isLaterThan(Options.Target.V2_2)) {
- JMethod constructor2 = cls.constructor(JMod.PUBLIC);
- constructor2.varParam(WebServiceFeature.class, "features");
- String constructor2Str = String.format("super(__getWsdlLocation(), %s, features);", serviceName);
- constructor2.body().directStatement(constructor2Str);
- }
-
- // Generating constructor
- // for e.g: public ExampleService(URL wsdlLocation)
- if (options.target.isLaterThan(Options.Target.V2_2)) {
- JMethod constructor3 = cls.constructor(JMod.PUBLIC);
- constructor3.param(URL.class, "wsdlLocation");
- String constructor3Str = String.format("super(wsdlLocation, %s);", serviceName);
- constructor3.body().directStatement(constructor3Str);
- }
-
- // Generating constructor
- // for e.g: public ExampleService(URL wsdlLocation, WebServiceFeature ... features)
- if (options.target.isLaterThan(Options.Target.V2_2)) {
- JMethod constructor4 = cls.constructor(JMod.PUBLIC);
- constructor4.param(URL.class, "wsdlLocation");
- constructor4.varParam(WebServiceFeature.class, "features");
- String constructor4Str = String.format("super(wsdlLocation, %s, features);", serviceName);
- constructor4.body().directStatement(constructor4Str);
- }
-
- // Generating constructor
- // for e.g: public ExampleService(URL wsdlLocation, QName serviceName)
- JMethod constructor5 = cls.constructor(JMod.PUBLIC);
- constructor5.param(URL.class, "wsdlLocation");
- constructor5.param(QName.class, "serviceName");
- constructor5.body().directStatement("super(wsdlLocation, serviceName);");
-
- // Generating constructor
- // for e.g: public ExampleService(URL, QName, WebServiceFeature ...)
- if (options.target.isLaterThan(Options.Target.V2_2)) {
- JMethod constructor6 = cls.constructor(JMod.PUBLIC);
- constructor6.param(URL.class, "wsdlLocation");
- constructor6.param(QName.class, "serviceName");
- constructor6.varParam(WebServiceFeature.class, "features");
- constructor6.body().directStatement("super(wsdlLocation, serviceName, features);");
- }
-
- //@WebService
- JAnnotationUse webServiceClientAnn = cls.annotate(cm.ref(WebServiceClient.class));
- writeWebServiceClientAnnotation(service, webServiceClientAnn);
-
- // additional annotations
- for (GeneratorExtension f:ServiceFinder.find(GeneratorExtension.class)) {
- f.writeWebServiceClientAnnotation(options, cm, cls);
- }
-
-
- //@HandlerChain
- writeHandlerConfig(Names.customJavaTypeClassName(service.getJavaInterface()), cls, options);
-
- for (Port port : service.getPorts()) {
- if (port.isProvider()) {
- continue; // No getXYZPort() for porvider based endpoint
- }
-
- //Get the SEI class
- JType retType;
- try {
- retType = getClass(port.getJavaInterface().getName(), ClassType.INTERFACE);
- } catch (JClassAlreadyExistsException e) {
- QName portTypeName =
- (QName) port.getProperty(
- ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME);
- Locator loc = null;
- if (portTypeName != null) {
- PortType pt = port.portTypes.get(portTypeName);
- if (pt != null) {
- loc = pt.getLocator();
- }
- }
- receiver.error(loc, GeneratorMessages.GENERATOR_SEI_CLASS_ALREADY_EXIST(port.getJavaInterface().getName(), portTypeName));
- return;
- }
-
- //write getXyzPort()
- writeDefaultGetPort(port, retType, cls);
-
- //write getXyzPort(WebServicesFeature...)
- if (options.target.isLaterThan(Options.Target.V2_1)) {
- writeGetPort(port, retType, cls);
- }
- }
-
- writeGetWsdlLocation(cm.ref(URL.class), cls, urlField, exField);
- }
-
- private void writeGetPort(Port port, JType retType, JDefinedClass cls) {
- JMethod m = cls.method(JMod.PUBLIC, retType, port.getPortGetter());
- JDocComment methodDoc = m.javadoc();
- if (port.getJavaDoc() != null) {
- methodDoc.add(port.getJavaDoc());
- }
- JCommentPart ret = methodDoc.addReturn();
- JCommentPart paramDoc = methodDoc.addParam("features");
- paramDoc.append("A list of ");
- paramDoc.append("{@link " + WebServiceFeature.class.getName() + "}");
- paramDoc.append("to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.");
- ret.add("returns " + retType.name());
- m.varParam(WebServiceFeature.class, "features");
- JBlock body = m.body();
- StringBuilder statement = new StringBuilder("return ");
- statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
- statement.append(retType.name());
- statement.append(".class, features);");
- body.directStatement(statement.toString());
- writeWebEndpoint(port, m);
- }
-
-
- /*
- Generates the code to create URL for absolute WSDL location
-
- for e.g.:
- static {
- URL url = null;
- WebServiceException e = null;
- try {
- url = new URL("http://ExampleService.wsdl");
- } catch (MalformedURLException ex) {
- e = new WebServiceException(ex);
- }
- EXAMPLESERVICE_WSDL_LOCATION = url;
- EXAMPLESERVICE_EXCEPTION = e;
- }
- */
- private void writeAbsWSDLLocation(JDefinedClass cls, JFieldVar urlField, JFieldVar exField) {
- JBlock staticBlock = cls.init();
- JVar urlVar = staticBlock.decl(cm.ref(URL.class), "url", JExpr._null());
- JVar exVar = staticBlock.decl(cm.ref(WebServiceException.class), "e", JExpr._null());
-
- JTryBlock tryBlock = staticBlock._try();
- tryBlock.body().assign(urlVar, JExpr._new(cm.ref(URL.class)).arg(wsdlLocation));
- JCatchBlock catchBlock = tryBlock._catch(cm.ref(MalformedURLException.class));
- catchBlock.param("ex");
- catchBlock.body().assign(exVar, JExpr._new(cm.ref(WebServiceException.class)).arg(JExpr.ref("ex")));
-
- staticBlock.assign(urlField, urlVar);
- staticBlock.assign(exField, exVar);
- }
-
- /*
- Generates the code to create URL for WSDL location as resource
-
- for e.g.:
- static {
- EXAMPLESERVICE_WSDL_LOCATION = ExampleService.class.getResource(...);
- Exception e = null;
- if (EXAMPLESERVICE_WSDL_LOCATION == null) {
- e = new WebServiceException("...");
- }
- EXAMPLESERVICE_EXCEPTION = e;
- }
- */
- private void writeResourceWSDLLocation(String className, JDefinedClass cls, JFieldVar urlField, JFieldVar exField) {
- JBlock staticBlock = cls.init();
- staticBlock.assign(urlField, JExpr.dotclass(cm.ref(className)).invoke("getResource").arg(wsdlLocation));
- JVar exVar = staticBlock.decl(cm.ref(WebServiceException.class), "e", JExpr._null());
- JConditional ifBlock = staticBlock._if(urlField.eq(JExpr._null()));
- ifBlock._then().assign(exVar, JExpr._new(cm.ref(WebServiceException.class)).arg(
- "Cannot find "+JExpr.quotify('\'', wsdlLocation)+" wsdl. Place the resource correctly in the classpath."));
- staticBlock.assign(exField, exVar);
- }
-
- /*
- Generates the code to create URL for WSDL location as classloader resource
-
- for e.g.:
- static {
- EXAMPLESERVICE_WSDL_LOCATION = ExampleService.class.getClassLoader().getResource(...);
- Exception e = null;
- if (EXAMPLESERVICE_WSDL_LOCATION == null) {
- e = new WebServiceException("...");
- }
- EXAMPLESERVICE_EXCEPTION = e;
- }
- */
- private void writeClassLoaderResourceWSDLLocation(String className, JDefinedClass cls, JFieldVar urlField, JFieldVar exField) {
- JBlock staticBlock = cls.init();
- staticBlock.assign(urlField, JExpr.dotclass(cm.ref(className)).invoke("getClassLoader").invoke("getResource").arg(wsdlLocation));
- JVar exVar = staticBlock.decl(cm.ref(WebServiceException.class), "e", JExpr._null());
- JConditional ifBlock = staticBlock._if(urlField.eq(JExpr._null()));
- ifBlock._then().assign(exVar, JExpr._new(cm.ref(WebServiceException.class)).arg(
- "Cannot find "+JExpr.quotify('\'', wsdlLocation)+" wsdl. Place the resource correctly in the classpath."));
- staticBlock.assign(exField, exVar);
- }
-
- /*
- Generates the code to create URL for WSDL location from classloader base resource
-
- for e.g.:
- static {
- Exception e = null;
- URL url = null;
- try {
- url = new URL(ExampleService.class.getClassLoader().getResource("."), ...);
- } catch (MalformedURLException murl) {
- e = new WebServiceException(murl);
- }
- EXAMPLESERVICE_WSDL_LOCATION = url;
- EXAMPLESERVICE_EXCEPTION = e;
- }
- */
- private void writeClassLoaderBaseResourceWSDLLocation(String className, JDefinedClass cls, JFieldVar urlField, JFieldVar exField) {
- JBlock staticBlock = cls.init();
- JVar exVar = staticBlock.decl(cm.ref(WebServiceException.class), "e", JExpr._null());
- JVar urlVar = staticBlock.decl(cm.ref(URL.class), "url", JExpr._null());
- JTryBlock tryBlock = staticBlock._try();
- tryBlock.body().assign(urlVar, JExpr._new(cm.ref(URL.class)).arg(JExpr.dotclass(cm.ref(className)).invoke("getResource").arg(".")).arg(wsdlLocation));
- JCatchBlock catchBlock = tryBlock._catch(cm.ref(MalformedURLException.class));
- JVar murlVar = catchBlock.param("murl");
- catchBlock.body().assign(exVar, JExpr._new(cm.ref(WebServiceException.class)).arg(murlVar));
- staticBlock.assign(urlField, urlVar);
- staticBlock.assign(exField, exVar);
- }
-
- /*
- Generates code that gives wsdl URL. If there is an exception in
- creating the URL, it throws an exception.
-
- for example:
-
- private URL __getWsdlLocation() {
- if (EXAMPLESERVICE_EXCEPTION != null) {
- throw EXAMPLESERVICE_EXCEPTION;
- }
- return EXAMPLESERVICE_WSDL_LOCATION;
- }
- */
- private void writeGetWsdlLocation(JType retType, JDefinedClass cls, JFieldVar urlField, JFieldVar exField) {
- JMethod m = cls.method(JMod.PRIVATE|JMod.STATIC , retType, "__getWsdlLocation");
- JConditional ifBlock = m.body()._if(exField.ne(JExpr._null()));
- ifBlock._then()._throw(exField);
- m.body()._return(urlField);
- }
-
- private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
- String portGetter = port.getPortGetter();
- JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
- JDocComment methodDoc = m.javadoc();
- if (port.getJavaDoc() != null) {
- methodDoc.add(port.getJavaDoc());
- }
- JCommentPart ret = methodDoc.addReturn();
- ret.add("returns " + retType.name());
- JBlock body = m.body();
- StringBuilder statement = new StringBuilder("return ");
- statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
- statement.append(retType.name());
- statement.append(".class);");
- body.directStatement(statement.toString());
- writeWebEndpoint(port, m);
- }
-
- private void writeWebServiceClientAnnotation(Service service, JAnnotationUse wsa) {
- String serviceName = service.getName().getLocalPart();
- String serviceNS = service.getName().getNamespaceURI();
- wsa.param("name", serviceName);
- wsa.param("targetNamespace", serviceNS);
- wsa.param("wsdlLocation", wsdlLocation);
- }
-
- private void writeWebEndpoint(Port port, JMethod m) {
- JAnnotationUse webEndpointAnn = m.annotate(cm.ref(WebEndpoint.class));
- webEndpointAnn.param("name", port.getName().getLocalPart());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/W3CAddressingJavaGeneratorExtension.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/W3CAddressingJavaGeneratorExtension.java
deleted file mode 100644
index f235bf3c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/W3CAddressingJavaGeneratorExtension.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.generator;
-
-import com.sun.codemodel.internal.JAnnotationArrayMember;
-import com.sun.codemodel.internal.JAnnotationUse;
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.tools.internal.ws.api.TJavaGeneratorExtension;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLOperation;
-import com.sun.tools.internal.ws.wsdl.document.Fault;
-import com.sun.tools.internal.ws.wsdl.document.Operation;
-
-import javax.xml.ws.Action;
-import javax.xml.ws.FaultAction;
-import java.util.Map;
-
-/**
- * This Java Generator extension generates @Action annotation on web methods if an explicit wsam:Action value is specified
- * in the wsdl definitions.
- *
- * @author Arun Gupta
- */
-public class W3CAddressingJavaGeneratorExtension extends TJavaGeneratorExtension {
- @Override
- public void writeMethodAnnotations(TWSDLOperation two, JMethod jMethod) {
- JAnnotationUse actionAnn = null;
-
- if (!(two instanceof Operation))
- return;
-
- Operation o = ((Operation)two);
-
- // explicit input action
- if (o.getInput().getAction() != null && !o.getInput().getAction().equals("")) {
- // explicitly specified
- actionAnn = jMethod.annotate(Action.class);
- actionAnn.param("input", o.getInput().getAction());
- }
-
- // explicit output action
- if (o.getOutput() != null && o.getOutput().getAction() != null && !o.getOutput().getAction().equals("")) {
- // explicitly specified
- if (actionAnn == null)
- actionAnn = jMethod.annotate(Action.class);
-
- actionAnn.param("output", o.getOutput().getAction());
- }
-
- // explicit fault action
- if (o.getFaults() != null && o.getFaults().size() > 0) {
- Map<String, JClass> map = o.getFaults();
- JAnnotationArrayMember jam = null;
-
- for (Fault f : o.faults()) {
- if (f.getAction() == null)
- continue;
-
- if (f.getAction().equals(""))
- continue;
-
- if (actionAnn == null) {
- actionAnn = jMethod.annotate(Action.class);
- }
- if (jam == null) {
- jam = actionAnn.paramArray("fault");
- }
- final JAnnotationUse faAnn = jam.annotate(FaultAction.class);
- faAnn.param("className", map.get(f.getName()));
- faAnn.param("value", f.getAction());
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AbstractType.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AbstractType.java
deleted file mode 100644
index dd2b484a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AbstractType.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import com.sun.tools.internal.ws.processor.model.java.JavaType;
-
-import javax.xml.namespace.QName;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- *
- * @author WS Development Team
- */
-public abstract class AbstractType {
-
- protected AbstractType() {}
-
- protected AbstractType(QName name) {
- this(name, null, null);
- }
-
- protected AbstractType(QName name, String version) {
- this(name, null, version);
- }
-
- protected AbstractType(QName name, JavaType javaType) {
- this(name, javaType, null);
- }
-
- protected AbstractType(QName name, JavaType javaType, String version) {
- this.name = name;
- this.javaType = javaType;
- this.version = version;
- }
-
- public QName getName() {
- return name;
- }
-
- public void setName(QName name) {
- this.name = name;
- }
-
- public JavaType getJavaType() {
- return javaType;
- }
-
- public void setJavaType(JavaType javaType) {
- this.javaType = javaType;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public boolean isNillable() {
- return false;
- }
-
- public boolean isSOAPType() {
- return false;
- }
-
- public boolean isLiteralType() {
- return false;
- }
-
- public Object getProperty(String key) {
- if (properties == null) {
- return null;
- }
- return properties.get(key);
- }
-
- public void setProperty(String key, Object value) {
- if (value == null) {
- removeProperty(key);
- return;
- }
-
- if (properties == null) {
- properties = new HashMap();
- }
- properties.put(key, value);
- }
-
- public void removeProperty(String key) {
- if (properties != null) {
- properties.remove(key);
- }
- }
-
- public Iterator getProperties() {
- if (properties == null) {
- return Collections.emptyList().iterator();
- } else {
- return properties.keySet().iterator();
- }
- }
-
- /* serialization */
- public Map getPropertiesMap() {
- return properties;
- }
-
- /* serialization */
- public void setPropertiesMap(Map m) {
- properties = m;
- }
-
- private QName name;
- private JavaType javaType;
- private String version = null;
- private Map properties;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperation.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperation.java
deleted file mode 100644
index 864baed0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperation.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.tools.internal.ws.processor.model.java.JavaSimpleType;
-import com.sun.tools.internal.ws.processor.model.java.JavaType;
-import com.sun.tools.internal.ws.processor.model.jaxb.JAXBTypeAndAnnotation;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-
-import javax.xml.namespace.QName;
-
-
-/**
- * @author Vivek Pandey
- *
- *
- */
-public class AsyncOperation extends Operation {
-
- /**
- *
- */
- public AsyncOperation(Entity entity) {
- super(entity);
- // TODO Auto-generated constructor stub
- }
-
- /**
- * @param operation
- */
- public AsyncOperation(Operation operation, Entity entity) {
- super(operation, entity);
- this.operation = operation;
- }
-
- /**
- * @param name
- */
- public AsyncOperation(QName name, Entity entity) {
- super(name, entity);
- // TODO Auto-generated constructor stub
- }
-
- /**
- * @return Returns the async.
- */
- public boolean isAsync() {
- return _async;
- }
-
- public void setAsyncType(AsyncOperationType type) {
- this._asyncOpType = type;
- _async = true;
- }
-
- public AsyncOperationType getAsyncType(){
- return _asyncOpType;
- }
-
- public void setResponseBean(AbstractType type){
- _responseBean = type;
- }
-
- public AbstractType getResponseBeanType(){
- return _responseBean;
- }
-
- public JavaType getResponseBeanJavaType(){
- JCodeModel cm = _responseBean.getJavaType().getType().getType().owner();
- if(_asyncOpType.equals(AsyncOperationType.CALLBACK)){
- JClass future = cm.ref(java.util.concurrent.Future.class).narrow(cm.ref(Object.class).wildcard());
- return new JavaSimpleType(new JAXBTypeAndAnnotation(future));
- }else if(_asyncOpType.equals(AsyncOperationType.POLLING)){
- JClass polling = cm.ref(javax.xml.ws.Response.class).narrow(_responseBean.getJavaType().getType().getType().boxify());
- return new JavaSimpleType(new JAXBTypeAndAnnotation(polling));
- }
- return null;
- }
-
- public JavaType getCallBackType(){
- if(_asyncOpType.equals(AsyncOperationType.CALLBACK)){
- JCodeModel cm = _responseBean.getJavaType().getType().getType().owner();
- JClass cb = cm.ref(javax.xml.ws.AsyncHandler.class).narrow(_responseBean.getJavaType().getType().getType().boxify());
- return new JavaSimpleType(new JAXBTypeAndAnnotation(cb));
-
- }
- return null;
- }
-
- public Operation getNormalOperation(){
- return operation;
- }
-
- public void setNormalOperation(Operation operation){
- this.operation = operation;
- }
-
- @Override public String getJavaMethodName() {
- return super.getJavaMethodName() + "Async";
- }
-
- //Normal operation
- private Operation operation;
- private boolean _async;
- private AsyncOperationType _asyncOpType;
- private AbstractType _responseBean;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperationType.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperationType.java
deleted file mode 100644
index 9cf2c8b0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperationType.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-
-
-/**
- * @author Vivek Pandey
- *
- * Async WSDLOperation type
- */
-public final class AsyncOperationType {
-
- public static final AsyncOperationType POLLING = new AsyncOperationType();
- public static final AsyncOperationType CALLBACK = new AsyncOperationType();
-
- private AsyncOperationType() {
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Block.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Block.java
deleted file mode 100644
index 536189f6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Block.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wsdl.document.*;
-
-import javax.xml.namespace.QName;
-
-/**
- *
- * @author WS Development Team
- */
-public class Block extends ModelObject {
-
- public static final int UNBOUND = 0;
- public static final int BODY = 1;
- public static final int HEADER = 2;
- public static final int ATTACHMENT = 3;
-
- public Block(QName name, AbstractType type, Entity entity) {
- super(entity);
- this.name = name;
- this.type = type;
- }
-
- public QName getName() {
- return name;
- }
-
- public AbstractType getType() {
- return type;
- }
-
- public void setType(AbstractType type) {
- this.type = type;
- }
-
- public int getLocation() {
- return location;
- }
-
- public void setLocation(int i) {
- location = i;
- }
-
- public void accept(ModelVisitor visitor) throws Exception {
- visitor.visit(this);
- }
-
- private final QName name;
- private AbstractType type;
- private int location;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ExtendedModelVisitor.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ExtendedModelVisitor.java
deleted file mode 100644
index e441a53a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ExtendedModelVisitor.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import java.util.Iterator;
-
-/**
- *
- * A model visitor incorporating all the logic required to walk through the model.
- *
- * @author WS Development Team
- */
-public class ExtendedModelVisitor {
-
- public ExtendedModelVisitor() {}
-
- public void visit(Model model) throws Exception {
- preVisit(model);
- for (Service service : model.getServices()) {
- preVisit(service);
- for (Port port : service.getPorts()) {
- preVisit(port);
- if (shouldVisit(port)) {
- for (Operation operation : port.getOperations()) {
- preVisit(operation);
- Request request = operation.getRequest();
- if (request != null) {
- preVisit(request);
- for (Iterator iter4 = request.getHeaderBlocks();
- iter4.hasNext();) {
-
- Block block = (Block) iter4.next();
- visitHeaderBlock(block);
- }
- for (Iterator iter4 = request.getBodyBlocks();
- iter4.hasNext();) {
-
- Block block = (Block) iter4.next();
- visitBodyBlock(block);
- }
- for (Iterator iter4 = request.getParameters();
- iter4.hasNext();) {
-
- Parameter parameter = (Parameter) iter4.next();
- visit(parameter);
- }
- postVisit(request);
- }
-
- Response response = operation.getResponse();
- if (response != null) {
- preVisit(response);
- for (Iterator iter4 = response.getHeaderBlocks();
- iter4.hasNext();) {
-
- Block block = (Block) iter4.next();
- visitHeaderBlock(block);
- }
- for (Iterator iter4 = response.getBodyBlocks();
- iter4.hasNext();) {
-
- Block block = (Block) iter4.next();
- visitBodyBlock(block);
- }
- for (Iterator iter4 = response.getParameters();
- iter4.hasNext();) {
-
- Parameter parameter = (Parameter) iter4.next();
- visit(parameter);
- }
- postVisit(response);
- }
-
- for (Iterator iter4 = operation.getFaults();
- iter4.hasNext();) {
-
- Fault fault = (Fault) iter4.next();
- preVisit(fault);
- visitFaultBlock(fault.getBlock());
- postVisit(fault);
- }
- postVisit(operation);
- }
- }
- postVisit(port);
- }
- postVisit(service);
- }
- postVisit(model);
- }
-
- protected boolean shouldVisit(Port port) {
- return true;
- }
-
- // these methods are intended for subclasses
- protected void preVisit(Model model) throws Exception {}
- protected void postVisit(Model model) throws Exception {}
- protected void preVisit(Service service) throws Exception {}
- protected void postVisit(Service service) throws Exception {}
- protected void preVisit(Port port) throws Exception {}
- protected void postVisit(Port port) throws Exception {}
- protected void preVisit(Operation operation) throws Exception {}
- protected void postVisit(Operation operation) throws Exception {}
- protected void preVisit(Request request) throws Exception {}
- protected void postVisit(Request request) throws Exception {}
- protected void preVisit(Response response) throws Exception {}
- protected void postVisit(Response response) throws Exception {}
- protected void preVisit(Fault fault) throws Exception {}
- protected void postVisit(Fault fault) throws Exception {}
- protected void visitBodyBlock(Block block) throws Exception {}
- protected void visitHeaderBlock(Block block) throws Exception {}
- protected void visitFaultBlock(Block block) throws Exception {}
- protected void visit(Parameter parameter) throws Exception {}
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Fault.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Fault.java
deleted file mode 100644
index 22755636..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Fault.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.tools.internal.ws.processor.model.java.JavaException;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-
-import javax.xml.namespace.QName;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- *
- * @author WS Development Team
- */
-public class Fault extends ModelObject {
-
- public Fault(Entity entity) {
- super(entity);
- }
-
- public Fault(String name, Entity entity) {
- super(entity);
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String s) {
- name = s;
- }
-
- public Block getBlock() {
- return block;
- }
-
- public void setBlock(Block b) {
- block = b;
- }
-
- public JavaException getJavaException() {
- return javaException;
- }
-
- public void setJavaException(JavaException e) {
- javaException = e;
- }
-
- public void accept(ModelVisitor visitor) throws Exception {
- visitor.visit(this);
- }
-
- public Iterator getSubfaults() {
- if (subfaults.isEmpty()) {
- return null;
- }
- return subfaults.iterator();
- }
-
- /* serialization */
- public Set getSubfaultsSet() {
- return subfaults;
- }
-
- /* serialization */
- public void setSubfaultsSet(Set s) {
- subfaults = s;
- }
-
- public Iterator getAllFaults() {
- Set allFaults = getAllFaultsSet();
- if (allFaults.isEmpty()) {
- return null;
- }
- return allFaults.iterator();
- }
-
- public Set getAllFaultsSet() {
- Set transSet = new HashSet();
- Iterator iter = subfaults.iterator();
- while (iter.hasNext()) {
- transSet.addAll(((Fault)iter.next()).getAllFaultsSet());
- }
- transSet.addAll(subfaults);
- return transSet;
- }
-
- public QName getElementName() {
- return elementName;
- }
-
- public void setElementName(QName elementName) {
- this.elementName = elementName;
- }
-
- public String getJavaMemberName() {
- return javaMemberName;
- }
-
- public void setJavaMemberName(String javaMemberName) {
- this.javaMemberName = javaMemberName;
- }
-
- /**
- * @return Returns the wsdlFault.
- */
- public boolean isWsdlException() {
- return wsdlException;
- }
- /**
- * @param wsdlFault The wsdlFault to set.
- */
- public void setWsdlException(boolean wsdlFault) {
- this.wsdlException = wsdlFault;
- }
-
- public void setExceptionClass(JClass ex){
- exceptionClass = ex;
- }
-
- public JClass getExceptionClass(){
- return exceptionClass;
- }
-
- private boolean wsdlException = true;
- private String name;
- private Block block;
- private JavaException javaException;
- private Set subfaults = new HashSet();
- private QName elementName = null;
- private String javaMemberName = null;
- private JClass exceptionClass;
-
- public String getWsdlFaultName() {
- return wsdlFaultName;
- }
-
- public void setWsdlFaultName(String wsdlFaultName) {
- this.wsdlFaultName = wsdlFaultName;
- }
-
- private String wsdlFaultName;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/HeaderFault.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/HeaderFault.java
deleted file mode 100644
index 5945b40e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/HeaderFault.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-
-import javax.xml.namespace.QName;
-
-public class HeaderFault extends Fault {
-
- public HeaderFault(Entity entity) {
- super(entity);
- }
-
- public HeaderFault(String name, Entity entity) {
- super(name, entity);
- }
-
- public QName getMessage() {
- return _message;
- }
-
- public void setMessage(QName message) {
- _message = message;
- }
-
- public String getPart() {
- return _part;
- }
-
- public void setPart(String part) {
- _part = part;
- }
-
- private QName _message;
- private String _part;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Message.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Message.java
deleted file mode 100644
index 8591e845..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Message.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.AbortException;
-import com.sun.tools.internal.ws.resources.ModelMessages;
-
-import javax.xml.namespace.QName;
-import java.util.*;
-
-/**
- *
- * @author WS Development Team
- */
-public abstract class Message extends ModelObject {
- protected Message(com.sun.tools.internal.ws.wsdl.document.Message entity, ErrorReceiver receiver) {
- super(entity);
- setErrorReceiver(receiver);
- }
-
- public void addBodyBlock(Block b) {
- if (_bodyBlocks.containsKey(b.getName())) {
- errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PART_NOT_UNIQUE(((com.sun.tools.internal.ws.wsdl.document.Message)getEntity()).getName(), b.getName()));
- throw new AbortException();
- }
- _bodyBlocks.put(b.getName(), b);
- b.setLocation(Block.BODY);
- }
-
- public Iterator<Block> getBodyBlocks() {
- return _bodyBlocks.values().iterator();
- }
-
- public int getBodyBlockCount() {
- return _bodyBlocks.size();
- }
-
- /* serialization */
- public Map<QName, Block> getBodyBlocksMap() {
- return _bodyBlocks;
- }
-
- /* serialization */
- public void setBodyBlocksMap(Map<QName, Block> m) {
- _bodyBlocks = m;
- }
-
- public boolean isBodyEmpty() {
- return getBodyBlocks().hasNext();
- }
-
- public boolean isBodyEncoded() {
- boolean isEncoded = false;
- for (Iterator iter = getBodyBlocks(); iter.hasNext();) {
- Block bodyBlock = (Block) iter.next();
- if (bodyBlock.getType().isSOAPType()) {
- isEncoded = true;
- }
- }
- return isEncoded;
- }
-
- public void addHeaderBlock(Block b) {
- if (_headerBlocks.containsKey(b.getName())) {
- errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PART_NOT_UNIQUE(((com.sun.tools.internal.ws.wsdl.document.Message)getEntity()).getName(), b.getName()));
- throw new AbortException();
- }
- _headerBlocks.put(b.getName(), b);
- b.setLocation(Block.HEADER);
- }
-
- public Iterator<Block> getHeaderBlocks() {
- return _headerBlocks.values().iterator();
- }
-
- public Collection<Block> getHeaderBlockCollection() {
- return _headerBlocks.values();
- }
-
- public int getHeaderBlockCount() {
- return _headerBlocks.size();
- }
-
- /* serialization */
- public Map<QName, Block> getHeaderBlocksMap() {
- return _headerBlocks;
- }
-
- /* serialization */
- public void setHeaderBlocksMap(Map<QName, Block> m) {
- _headerBlocks = m;
- }
-
- /** attachment block */
- public void addAttachmentBlock(Block b) {
- if (_attachmentBlocks.containsKey(b.getName())) {
- errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PART_NOT_UNIQUE(((com.sun.tools.internal.ws.wsdl.document.Message)getEntity()).getName(), b.getName()));
- throw new AbortException();
- }
- _attachmentBlocks.put(b.getName(), b);
- b.setLocation(Block.ATTACHMENT);
- }
-
- public void addUnboundBlock(Block b) {
- if (_unboundBlocks.containsKey(b.getName())) {
- return;
- }
- _unboundBlocks.put(b.getName(), b);
- b.setLocation(Block.UNBOUND);
- }
-
- public Iterator<Block> getUnboundBlocks() {
- return _unboundBlocks.values().iterator();
- }
-
- /* serialization */
- public Map<QName, Block> getUnboundBlocksMap() {
- return _unboundBlocks;
- }
-
- public int getUnboundBlocksCount() {
- return _unboundBlocks.size();
- }
-
- /* serialization */
- public void setUnboundBlocksMap(Map<QName, Block> m) {
- _unboundBlocks = m;
- }
-
-
- public Iterator<Block> getAttachmentBlocks() {
- return _attachmentBlocks.values().iterator();
- }
-
- public int getAttachmentBlockCount () {
- return _attachmentBlocks.size();
- }
-
- /* serialization */
- public Map<QName, Block> getAttachmentBlocksMap() {
- return _attachmentBlocks;
- }
-
- /* serialization */
- public void setAttachmentBlocksMap(Map<QName, Block> m) {
- _attachmentBlocks = m;
- }
-
- public void addParameter(Parameter p) {
- if (_parametersByName.containsKey(p.getName())) {
- errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(p.getName(), p.getName()));
- throw new AbortException();
- }
- _parameters.add(p);
- String name = p.getCustomName() != null ? p.getCustomName() : p.getName();
- _parametersByName.put(name, p);
- }
-
- public Parameter getParameterByName(String name) {
- if (_parametersByName.size() != _parameters.size()) {
- initializeParametersByName();
- }
- return _parametersByName.get(name);
- }
-
- public Iterator<Parameter> getParameters() {
- return _parameters.iterator();
- }
-
- /* serialization */
- public List<Parameter> getParametersList() {
- return _parameters;
- }
-
- /* serialization */
- public void setParametersList(List<Parameter> l) {
- _parameters = l;
- }
-
- private void initializeParametersByName() {
- _parametersByName = new HashMap();
- if (_parameters != null) {
- for (Iterator iter = _parameters.iterator(); iter.hasNext();) {
- Parameter param = (Parameter) iter.next();
- if (param.getName() != null &&
- _parametersByName.containsKey(param.getName())) {
- errorReceiver.error(getEntity().getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(param.getName(), param.getName()));
- throw new AbortException();
- }
- _parametersByName.put(param.getName(), param);
- }
- }
- }
-
- public Set<Block> getAllBlocks(){
- Set<Block> blocks = new HashSet<Block>();
- blocks.addAll(_bodyBlocks.values());
- blocks.addAll(_headerBlocks.values());
- blocks.addAll(_attachmentBlocks.values());
- return blocks;
- }
-
- private Map<QName, Block> _attachmentBlocks = new HashMap<QName, Block>();
- private Map<QName, Block> _bodyBlocks = new HashMap<QName, Block>();
- private Map<QName, Block> _headerBlocks = new HashMap<QName, Block>();
- private Map<QName, Block> _unboundBlocks = new HashMap<QName, Block>();
- private List<Parameter> _parameters = new ArrayList<Parameter>();
- private Map<String, Parameter> _parametersByName = new HashMap<String, Parameter>();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Model.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Model.java
deleted file mode 100644
index e3b19b85..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Model.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import com.sun.tools.internal.ws.processor.model.jaxb.JAXBModel;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-
-import javax.xml.namespace.QName;
-import java.util.*;
-
-/**
- * The model is used to represent the entire Web Service. The JAX-WS ProcessorActions can process
- * this Model to generate Java artifacts such as the service interface.
- *
- * @author WS Development Team
- */
-public class Model extends ModelObject {
-
- public Model(Entity entity) {
- super(entity);
- }
-
- public Model(QName name, Entity entity) {
- super(entity);
- this.name = name;
- }
-
- public QName getName() {
- return name;
- }
-
- public void setName(QName n) {
- name = n;
- }
-
- public String getTargetNamespaceURI() {
- return targetNamespace;
- }
-
- public void setTargetNamespaceURI(String s) {
- targetNamespace = s;
- }
-
- public void addService(Service service) {
- if (servicesByName.containsKey(service.getName())) {
- throw new ModelException("model.uniqueness");
- }
- services.add(service);
- servicesByName.put(service.getName(), service);
- }
-
- public Service getServiceByName(QName name) {
- if (servicesByName.size() != services.size()) {
- initializeServicesByName();
- }
- return (Service)servicesByName.get(name);
- }
-
- /* serialization */
- public List<Service> getServices() {
- return services;
- }
-
- /* serialization */
- public void setServices(List<Service> l) {
- services = l;
- }
-
- private void initializeServicesByName() {
- servicesByName = new HashMap();
- if (services != null) {
- for (Service service : services) {
- if (service.getName() != null &&
- servicesByName.containsKey(service.getName())) {
-
- throw new ModelException("model.uniqueness");
- }
- servicesByName.put(service.getName(), service);
- }
- }
- }
-
- public void addExtraType(AbstractType type) {
- extraTypes.add(type);
- }
-
- public Iterator getExtraTypes() {
- return extraTypes.iterator();
- }
-
- /* serialization */
- public Set<AbstractType> getExtraTypesSet() {
- return extraTypes;
- }
-
- /* serialization */
- public void setExtraTypesSet(Set<AbstractType> s) {
- extraTypes = s;
- }
-
-
- public void accept(ModelVisitor visitor) throws Exception {
- visitor.visit(this);
- }
-
- /**
- * @return the source version
- */
- public String getSource() {
- return source;
- }
-
- /**
- * @param string
- */
- public void setSource(String string) {
- source = string;
- }
-
- public void setJAXBModel(JAXBModel jaxBModel) {
- this.jaxBModel = jaxBModel;
- }
-
- public JAXBModel getJAXBModel() {
- return jaxBModel;
- }
-
- private QName name;
- private String targetNamespace;
- private List<Service> services = new ArrayList<Service>();
- private Map<QName, Service> servicesByName = new HashMap<QName, Service>();
- private Set<AbstractType> extraTypes = new HashSet<AbstractType>();
- private String source;
- private JAXBModel jaxBModel = null;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelException.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelException.java
deleted file mode 100644
index 4194ad16..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.tools.internal.ws.processor.ProcessorException;
-
-/**
- * ModelException represents an exception that occurred while
- * visiting service model.
- *
- * @see ProcessorException
- *
- * @author WS Development Team
- */
-public class ModelException extends ProcessorException {
-
- public ModelException(String key, Object... args) {
- super(key, args);
- }
-
- public ModelException(Throwable throwable) {
- super(throwable);
- }
-
- public ModelException(Localizable arg) {
- super("model.nestedModelError", arg);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.tools.internal.ws.resources.model";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelObject.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelObject.java
deleted file mode 100644
index 0272003d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelObject.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.xml.sax.Locator;
-
-/**
- *
- * @author WS Development Team
- */
-public abstract class ModelObject {
- public abstract void accept(ModelVisitor visitor) throws Exception;
-
- private final Entity entity;
- protected ErrorReceiver errorReceiver;
-
- protected ModelObject(Entity entity) {
- this.entity = entity;
- }
-
- public void setErrorReceiver(ErrorReceiver errorReceiver) {
- this.errorReceiver = errorReceiver;
- }
-
- public Entity getEntity() {
- return entity;
- }
-
- public Object getProperty(String key) {
- if (_properties == null) {
- return null;
- }
- return _properties.get(key);
- }
-
- public void setProperty(String key, Object value) {
- if (value == null) {
- removeProperty(key);
- return;
- }
-
- if (_properties == null) {
- _properties = new HashMap();
- }
- _properties.put(key, value);
- }
-
- public void removeProperty(String key) {
- if (_properties != null) {
- _properties.remove(key);
- }
- }
-
- public Iterator getProperties() {
- if (_properties == null) {
- return Collections.emptyList().iterator();
- } else {
- return _properties.keySet().iterator();
- }
- }
-
- public Locator getLocator(){
- return entity.getLocator();
- }
-
- public Map getPropertiesMap() {
- return _properties;
- }
-
- public void setPropertiesMap(Map m) {
- _properties = m;
- }
-
- public String getJavaDoc() {
- return javaDoc;
- }
-
- public void setJavaDoc(String javaDoc) {
- this.javaDoc = javaDoc;
- }
-
- private String javaDoc;
- private Map _properties;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelProperties.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelProperties.java
deleted file mode 100644
index d5994d84..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelProperties.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-/**
- *
- * @author WS Development Team
- */
-public interface ModelProperties {
-
- //to set WSDL_MODELER_NAME from inside WSDLModeler
- public static final String WSDL_MODELER_NAME =
- "com.sun.xml.internal.ws.processor.modeler.wsdl.WSDLModeler";
- public static final String PROPERTY_PARAM_MESSAGE_PART_NAME =
- "com.sun.xml.internal.ws.processor.model.ParamMessagePartName";
- public static final String PROPERTY_ANONYMOUS_TYPE_NAME =
- "com.sun.xml.internal.ws.processor.model.AnonymousTypeName";
- public static final String PROPERTY_ANONYMOUS_ARRAY_TYPE_NAME =
- "com.sun.xml.internal.ws.processor.model.AnonymousArrayTypeName";
- public static final String PROPERTY_ANONYMOUS_ARRAY_JAVA_TYPE =
- "com.sun.xml.internal.ws.processor.model.AnonymousArrayJavaType";
-
- public static final String PROPERTY_PTIE_CLASS_NAME =
- "com.sun.xml.internal.ws.processor.model.PtieClassName";
- public static final String PROPERTY_EPTFF_CLASS_NAME =
- "com.sun.xml.internal.ws.processor.model.EPTFFClassName";
- public static final String PROPERTY_SED_CLASS_NAME =
- "com.sun.xml.internal.ws.processor.model.SEDClassName";
- public static final String PROPERTY_WSDL_PORT_NAME =
- "com.sun.xml.internal.ws.processor.model.WSDLPortName";
- public static final String PROPERTY_WSDL_PORT_TYPE_NAME =
- "com.sun.xml.internal.ws.processor.model.WSDLPortTypeName";
- public static final String PROPERTY_WSDL_BINDING_NAME =
- "com.sun.xml.internal.ws.processor.model.WSDLBindingName";
- public static final String PROPERTY_WSDL_MESSAGE_NAME =
- "com.sun.xml.internal.ws.processor.model.WSDLMessageName";
- public static final String PROPERTY_MODELER_NAME =
- "com.sun.xml.internal.ws.processor.model.ModelerName";
- public static final String PROPERTY_STUB_CLASS_NAME =
- "com.sun.xml.internal.ws.processor.model.StubClassName";
- public static final String PROPERTY_STUB_OLD_CLASS_NAME =
- "com.sun.xml.internal.ws.processor.model.StubOldClassName";
- public static final String PROPERTY_DELEGATE_CLASS_NAME =
- "com.sun.xml.internal.ws.processor.model.DelegateClassName";
- public static final String PROPERTY_CLIENT_ENCODER_DECODER_CLASS_NAME =
- "com.sun.xml.internal.ws.processor.model.ClientEncoderClassName";
- public static final String PROPERTY_CLIENT_CONTACTINFOLIST_CLASS_NAME =
- "com.sun.xml.internal.ws.processor.model.ClientContactInfoListClassName";
- public static final String PROPERTY_TIE_CLASS_NAME =
- "com.sun.xml.internal.ws.processor.model.TieClassName";
- public static final String PROPERTY_JAVA_PORT_NAME =
- "com.sun.xml.internal.ws.processor.model.JavaPortName";
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelVisitor.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelVisitor.java
deleted file mode 100644
index 98e94bd3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelVisitor.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-/**
- *
- * @author WS Development Team
- */
-public interface ModelVisitor {
- public void visit(Model model) throws Exception;
- public void visit(Service service) throws Exception;
- public void visit(Port port) throws Exception;
- public void visit(Operation operation) throws Exception;
- public void visit(Request request) throws Exception;
- public void visit(Response response) throws Exception;
- public void visit(Fault fault) throws Exception;
- public void visit(Block block) throws Exception;
- public void visit(Parameter parameter) throws Exception;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Operation.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Operation.java
deleted file mode 100644
index 0e285394..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Operation.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import com.sun.tools.internal.ws.processor.model.java.JavaMethod;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAPUse;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.xml.internal.ws.spi.db.BindingHelper;
-
-import javax.xml.namespace.QName;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- *
- * @author WS Development Team
- */
-public class Operation extends ModelObject {
-
- public Operation(Entity entity) {
- super(entity);
- }
-
- public Operation(Operation operation, Entity entity){
- this(operation._name, entity);
- this._style = operation._style;
- this._use = operation._use;
- this.customizedName = operation.customizedName;
- }
- public Operation(QName name, Entity entity) {
- super(entity);
- _name = name;
- _uniqueName = name.getLocalPart();
- _faultNames = new HashSet<String>();
- _faults = new HashSet<Fault>();
- }
-
- public QName getName() {
- return _name;
- }
-
- public void setName(QName n) {
- _name = n;
- }
-
- public String getUniqueName() {
- return _uniqueName;
- }
-
- public void setUniqueName(String s) {
- _uniqueName = s;
- }
-
- public Request getRequest() {
- return _request;
- }
-
- public void setRequest(Request r) {
- _request = r;
- }
-
- public Response getResponse() {
- return _response;
- }
-
- public void setResponse(Response r) {
- _response = r;
- }
-
- public boolean isOverloaded() {
- return !_name.getLocalPart().equals(_uniqueName);
- }
-
- public void addFault(Fault f) {
- if (_faultNames.contains(f.getName())) {
- throw new ModelException("model.uniqueness");
- }
- _faultNames.add(f.getName());
- _faults.add(f);
- }
-
- public Iterator<Fault> getFaults() {
- return _faults.iterator();
- }
-
- public Set<Fault> getFaultsSet() {
- return _faults;
- }
-
- /* serialization */
- public void setFaultsSet(Set<Fault> s) {
- _faults = s;
- initializeFaultNames();
- }
-
- private void initializeFaultNames() {
- _faultNames = new HashSet<String>();
- if (_faults != null) {
- for (Iterator iter = _faults.iterator(); iter.hasNext();) {
- Fault f = (Fault) iter.next();
- if (f.getName() != null && _faultNames.contains(f.getName())) {
- throw new ModelException("model.uniqueness");
- }
- _faultNames.add(f.getName());
- }
- }
- }
-
- public Iterator<Fault> getAllFaults() {
- Set<Fault> allFaults = getAllFaultsSet();
- return allFaults.iterator();
- }
-
- public Set<Fault> getAllFaultsSet() {
- Set transSet = new HashSet();
- transSet.addAll(_faults);
- Iterator iter = _faults.iterator();
- Fault fault;
- Set tmpSet;
- while (iter.hasNext()) {
- tmpSet = ((Fault)iter.next()).getAllFaultsSet();
- transSet.addAll(tmpSet);
- }
- return transSet;
- }
-
- public int getFaultCount() {
- return _faults.size();
- }
-
- public Set<Block> getAllFaultBlocks(){
- Set<Block> blocks = new HashSet<Block>();
- Iterator faults = _faults.iterator();
- while(faults.hasNext()){
- Fault f = (Fault)faults.next();
- blocks.add(f.getBlock());
- }
- return blocks;
- }
-
- public JavaMethod getJavaMethod() {
- return _javaMethod;
- }
-
- public void setJavaMethod(JavaMethod i) {
- _javaMethod = i;
- }
-
- public String getSOAPAction() {
- return _soapAction;
- }
-
- public void setSOAPAction(String s) {
- _soapAction = s;
- }
-
- public SOAPStyle getStyle() {
- return _style;
- }
-
- public void setStyle(SOAPStyle s) {
- _style = s;
- }
-
- public SOAPUse getUse() {
- return _use;
- }
-
- public void setUse(SOAPUse u) {
- _use = u;
- }
-
- public boolean isWrapped() {
- return _isWrapped;
- }
-
- public void setWrapped(boolean isWrapped) {
- _isWrapped = isWrapped;
- }
-
-
- public void accept(ModelVisitor visitor) throws Exception {
- visitor.visit(this);
- }
-
- public void setCustomizedName(String name){
- this.customizedName = name;
- }
-
- public String getCustomizedName(){
- return customizedName;
- }
-
- public String getJavaMethodName(){
- //if JavaMethod is created return the name
- if(_javaMethod != null){
- return _javaMethod.getName();
- }
-
- //return the customized operation name if any without mangling
- if(customizedName != null){
- return customizedName;
- }
-
- return BindingHelper.mangleNameToVariableName(_name.getLocalPart());
- }
-
- public com.sun.tools.internal.ws.wsdl.document.Operation getWSDLPortTypeOperation(){
- return wsdlOperation;
- }
-
- public void setWSDLPortTypeOperation(com.sun.tools.internal.ws.wsdl.document.Operation wsdlOperation){
- this.wsdlOperation = wsdlOperation;
- }
-
-
-
- private String customizedName;
- private boolean _isWrapped = true;
- private QName _name;
- private String _uniqueName;
- private Request _request;
- private Response _response;
- private JavaMethod _javaMethod;
- private String _soapAction;
- private SOAPStyle _style = SOAPStyle.DOCUMENT;
- private SOAPUse _use = SOAPUse.LITERAL;
- private Set<String> _faultNames;
- private Set<Fault> _faults;
- private com.sun.tools.internal.ws.wsdl.document.Operation wsdlOperation;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Parameter.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Parameter.java
deleted file mode 100644
index a4d05f19..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Parameter.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import com.sun.tools.internal.ws.processor.model.java.JavaParameter;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wsdl.document.MessagePart;
-
-import javax.jws.WebParam.Mode;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- *
- * @author WS Development Team
- */
-public class Parameter extends ModelObject {
- private final String entityName;
-
- public Parameter(String name, Entity entity) {
- super(entity);
- this.name = name;
- if(entity instanceof com.sun.tools.internal.ws.wsdl.document.Message){
- this.entityName = ((com.sun.tools.internal.ws.wsdl.document.Message)entity).getName();
- }else if(entity instanceof MessagePart){
- this.entityName = ((MessagePart)entity).getName();
- }else{
- this.entityName = name;
- }
-
- }
-
-
- public String getEntityName() {
- return entityName;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String s) {
- name = s;
- }
-
- public JavaParameter getJavaParameter() {
- return javaParameter;
- }
-
- public void setJavaParameter(JavaParameter p) {
- javaParameter = p;
- }
-
- public AbstractType getType() {
- return type;
- }
-
- public void setType(AbstractType t) {
- type = t;
- }
-
- public String getTypeName() {
- return typeName;
- }
-
- public void setTypeName(String t) {
- typeName = t;
- }
-
- public Block getBlock() {
- return block;
- }
-
- public void setBlock(Block d) {
- block = d;
- }
-
- public Parameter getLinkedParameter() {
- return link;
- }
-
- public void setLinkedParameter(Parameter p) {
- link = p;
- }
-
- public boolean isEmbedded() {
- return embedded;
- }
-
- public void setEmbedded(boolean b) {
- embedded = b;
- }
-
- public void accept(ModelVisitor visitor) throws Exception {
- visitor.visit(this);
- }
-
- private String name;
- private JavaParameter javaParameter;
- private AbstractType type;
- private Block block;
- private Parameter link;
- private boolean embedded;
- private String typeName;
- private String customName;
- private Mode mode;
-
- public int getParameterIndex() {
- return parameterOrderPosition;
- }
-
- public void setParameterIndex(int parameterOrderPosition) {
- this.parameterOrderPosition = parameterOrderPosition;
- }
-
- public boolean isReturn(){
- return (parameterOrderPosition == -1);
- }
-
- // 0 is the first parameter, -1 is the return type
- private int parameterOrderPosition;
- /**
- * @return Returns the customName.
- */
- public String getCustomName() {
- return customName;
- }
- /**
- * @param customName The customName to set.
- */
- public void setCustomName(String customName) {
- this.customName = customName;
- }
-
- private List<String> annotations = new ArrayList<String>();
-
- /**
- * @return Returns the annotations.
- */
- public List<String> getAnnotations() {
- return annotations;
- }
-
-
- /**
- * @param annotations The annotations to set.
- */
- public void setAnnotations(List<String> annotations) {
- this.annotations = annotations;
- }
-
- public void setMode(Mode mode){
- this.mode = mode;
- }
-
- public boolean isIN(){
- return (mode == Mode.IN);
- }
-
- public boolean isOUT(){
- return (mode == Mode.OUT);
- }
-
- public boolean isINOUT(){
- return (mode == Mode.INOUT);
- }
-
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Port.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Port.java
deleted file mode 100644
index 33c52b78..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Port.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import com.sun.tools.internal.ws.processor.model.java.JavaInterface;
-import com.sun.tools.internal.ws.wsdl.document.PortType;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author WS Development Team
- */
-public class Port extends ModelObject {
-
- public Port(Entity entity) {
- super(entity);
- }
-
- public Port(QName name, Entity entity) {
- super(entity);
- _name = name;
- }
-
- public QName getName() {
- return _name;
- }
-
- public void setName(QName n) {
- _name = n;
- }
-
- public void addOperation(Operation operation) {
- _operations.add(operation);
- operationsByName.put(operation.getUniqueName(), operation);
- }
-
- public Operation getOperationByUniqueName(String name) {
- if (operationsByName.size() != _operations.size()) {
- initializeOperationsByName();
- }
- return operationsByName.get(name);
- }
-
- private void initializeOperationsByName() {
- operationsByName = new HashMap<String, Operation>();
- if (_operations != null) {
- for (Operation operation : _operations) {
- if (operation.getUniqueName() != null &&
- operationsByName.containsKey(operation.getUniqueName())) {
-
- throw new ModelException("model.uniqueness");
- }
- operationsByName.put(operation.getUniqueName(), operation);
- }
- }
- }
-
- /* serialization */
- public List<Operation> getOperations() {
- return _operations;
- }
-
- /* serialization */
- public void setOperations(List<Operation> l) {
- _operations = l;
- }
-
- public JavaInterface getJavaInterface() {
- return _javaInterface;
- }
-
- public void setJavaInterface(JavaInterface i) {
- _javaInterface = i;
- }
-
- public String getAddress() {
- return _address;
- }
-
- public void setAddress(String s) {
- _address = s;
- }
-
- public String getServiceImplName() {
- return _serviceImplName;
- }
-
- public void setServiceImplName(String name) {
- _serviceImplName = name;
- }
-
- public void accept(ModelVisitor visitor) throws Exception {
- visitor.visit(this);
- }
-
- public boolean isProvider() {
- JavaInterface intf = getJavaInterface();
- if (intf != null) {
- String sei = intf.getName();
- if (sei.equals(javax.xml.ws.Provider.class.getName())) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * XYZ_Service.getABC() method name
- *
- * @return Returns the portGetterName.
- */
- public String getPortGetter() {
- return portGetter;
- }
-
- /**
- * @param portGetterName The portGetterName to set.
- */
- public void setPortGetter(String portGetterName) {
- this.portGetter = portGetterName;
- }
-
- public SOAPStyle getStyle() {
- return _style;
- }
-
- public void setStyle(SOAPStyle s) {
- _style = s;
- }
-
- public boolean isWrapped() {
- return _isWrapped;
- }
-
- public void setWrapped(boolean isWrapped) {
- _isWrapped = isWrapped;
- }
-
- private SOAPStyle _style = null;
- private boolean _isWrapped = true;
-
- private String portGetter;
- private QName _name;
- private List<Operation> _operations = new ArrayList<Operation>();
- private JavaInterface _javaInterface;
- private String _address;
- private String _serviceImplName;
- private Map<String, Operation> operationsByName = new HashMap<String, Operation>();
- public Map<QName, PortType> portTypes = new HashMap<QName, PortType>();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Request.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Request.java
deleted file mode 100644
index 06408051..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Request.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-
-/**
- *
- * @author WS Development Team
- */
-public class Request extends Message {
-
- public Request(com.sun.tools.internal.ws.wsdl.document.Message entity, ErrorReceiver receiver) {
- super(entity, receiver);
- }
-
- public void accept(ModelVisitor visitor) throws Exception {
- visitor.visit(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Response.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Response.java
deleted file mode 100644
index 07e81dc4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Response.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- *
- * @author WS Development Team
- */
-public class Response extends Message {
-
- public Response(com.sun.tools.internal.ws.wsdl.document.Message entity, ErrorReceiver receiver) {
- super(entity, receiver);
- }
-
- public void addFaultBlock(Block b) {
- if (_faultBlocks.containsKey(b.getName())) {
- throw new ModelException("model.uniqueness");
- }
- _faultBlocks.put(b.getName(), b);
- }
-
- public Iterator getFaultBlocks() {
- return _faultBlocks.values().iterator();
- }
-
- public int getFaultBlockCount () {
- return _faultBlocks.size();
- }
-
- /* serialization */
- public Map getFaultBlocksMap() {
- return _faultBlocks;
- }
-
- public void setFaultBlocksMap(Map m) {
- _faultBlocks = m;
- }
-
- public void accept(ModelVisitor visitor) throws Exception {
- visitor.visit(this);
- }
-
- private Map _faultBlocks = new HashMap();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Service.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Service.java
deleted file mode 100644
index 3769ee7a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Service.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model;
-
-import com.sun.tools.internal.ws.processor.model.java.JavaInterface;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-
-import javax.xml.namespace.QName;
-import java.util.*;
-
-/**
- *
- * @author WS Development Team
- */
-public class Service extends ModelObject {
-
- public Service(Entity entity) {
- super(entity);
- }
-
- public Service(QName name, JavaInterface javaInterface, Entity entity) {
- super(entity);
- this.name = name;
- this.javaInterface = javaInterface;
- }
-
- public QName getName() {
- return name;
- }
-
- public void setName(QName n) {
- name = n;
- }
-
- public void addPort(Port port) {
- if (portsByName.containsKey(port.getName())) {
- throw new ModelException("model.uniqueness");
- }
- ports.add(port);
- portsByName.put(port.getName(), port);
- }
-
-
- public Port getPortByName(QName n) {
- if (portsByName.size() != ports.size()) {
- initializePortsByName();
- }
- return (Port) portsByName.get(n);
- }
-
- /* serialization */
- public List<Port> getPorts() {
- return ports;
- }
-
- /* serialization */
- public void setPorts(List<Port> m) {
- ports = m;
-// initializePortsByName();
- }
-
- private void initializePortsByName() {
- portsByName = new HashMap();
- if (ports != null) {
- for (Iterator iter = ports.iterator(); iter.hasNext();) {
- Port port = (Port) iter.next();
- if (port.getName() != null &&
- portsByName.containsKey(port.getName())) {
-
- throw new ModelException("model.uniqueness");
- }
- portsByName.put(port.getName(), port);
- }
- }
- }
-
- public JavaInterface getJavaIntf() {
- return getJavaInterface();
- }
-
- public JavaInterface getJavaInterface() {
- return javaInterface;
- }
-
- public void setJavaInterface(JavaInterface i) {
- javaInterface = i;
- }
-
- public void accept(ModelVisitor visitor) throws Exception {
- visitor.visit(this);
- }
-
- private QName name;
- private List<Port> ports = new ArrayList();
- private Map<QName, Port> portsByName = new HashMap<QName, Port>();
- private JavaInterface javaInterface;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/exporter/ExternalObject.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/exporter/ExternalObject.java
deleted file mode 100644
index 62e63bc5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/exporter/ExternalObject.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.exporter;
-
-import org.xml.sax.ContentHandler;
-
-/**
- * "Opaque" object in the object graph that knows how
- * to persist itself to XML.
- *
- * TODO: ExternalObjectReader
- *
- */
-public interface ExternalObject {
- /**
- * Type name of this object. This will be used
- * when loading the object back from XML.
- */
- String getType();
-
- /**
- * Saves the object into XML.
- */
- void saveTo(ContentHandler receiver);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaArrayType.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaArrayType.java
deleted file mode 100644
index 76a5e6df..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaArrayType.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.java;
-
-/**
- *
- * @author WS Development Team
- */
-public class JavaArrayType extends JavaType {
-
- public JavaArrayType() {
- }
-
- public JavaArrayType(String name) {
- super(name, true, "null");
- }
-
- public JavaArrayType(String name, String elementName,
- JavaType elementType) {
-
- super(name, true, "null");
- this.elementName = elementName;
- this.elementType = elementType;
- }
-
- public String getElementName() {
- return elementName;
- }
-
- public void setElementName(String name) {
- elementName = name;
- }
-
- public JavaType getElementType() {
- return elementType;
- }
-
- public void setElementType(JavaType type) {
- elementType = type;
- }
-
- // bug fix:4904604
- public String getSOAPArrayHolderName() {
- return soapArrayHolderName;
- }
-
- public void setSOAPArrayHolderName(String holderName) {
- this.soapArrayHolderName = holderName;
- }
-
- private String elementName;
- private JavaType elementType;
- private String soapArrayHolderName;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaException.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaException.java
deleted file mode 100644
index 0079a259..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.java;
-
-/**
- *
- * @author WS Development Team
- */
-public class JavaException extends JavaStructureType {
-
- public JavaException() {}
-
- public JavaException(String name, boolean present, Object owner) {
- super(name, present, owner);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaInterface.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaInterface.java
deleted file mode 100644
index bf324384..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaInterface.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.java;
-
-import com.sun.tools.internal.ws.processor.model.ModelException;
-import com.sun.tools.internal.ws.util.ClassNameInfo;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- *
- * @author WS Development Team
- */
-public class JavaInterface {
-
- public JavaInterface() {}
-
- public JavaInterface(String name) {
- this(name, null);
- }
-
- public JavaInterface(String name, String impl) {
- this.realName = name;
- this.name = name.replace('$', '.');
- this.impl = impl;
- }
-
- public String getName() {
- return name;
- }
-
- public String getFormalName() {
- return name;
- }
-
- public void setFormalName(String s) {
- name = s;
- }
-
- public String getRealName() {
- return realName;
- }
-
- public void setRealName(String s) {
- realName = s;
- }
-
- public String getImpl() {
- return impl;
- }
-
- public void setImpl(String s) {
- impl = s;
- }
-
- public Iterator getMethods() {
- return methods.iterator();
- }
-
- public boolean hasMethod(JavaMethod method) {
- for (int i=0; i<methods.size();i++) {
- if (method.equals(((JavaMethod)methods.get(i)))) {
- return true;
- }
- }
- return false;
- }
-
- public void addMethod(JavaMethod method) {
-
- if (hasMethod(method)) {
- throw new ModelException("model.uniqueness");
- }
- methods.add(method);
- }
-
- /* serialization */
- public List getMethodsList() {
- return methods;
- }
-
- /* serialization */
- public void setMethodsList(List l) {
- methods = l;
- }
-
- public boolean hasInterface(String interfaceName) {
- for (int i=0; i<interfaces.size();i++) {
- if (interfaceName.equals((String)interfaces.get(i))) {
- return true;
- }
- }
- return false;
- }
-
- public void addInterface(String interfaceName) {
-
- // verify that an exception with this name does not already exist
- if (hasInterface(interfaceName)) {
- return;
- }
- interfaces.add(interfaceName);
- }
-
- public Iterator getInterfaces() {
- return interfaces.iterator();
- }
-
- /* serialization */
- public List getInterfacesList() {
- return interfaces;
- }
-
- /* serialization */
- public void setInterfacesList(List l) {
- interfaces = l;
- }
-
- public String getSimpleName() {
- return ClassNameInfo.getName(name);
- }
-
- /* NOTE - all these fields (except "interfaces") were final, but had to
- * remove this modifier to enable serialization
- */
- private String javadoc;
-
- public String getJavaDoc() {
- return javadoc;
- }
-
- public void setJavaDoc(String javadoc) {
- this.javadoc = javadoc;
- }
-
- private String name;
- private String realName;
- private String impl;
- private List methods = new ArrayList();
- private List interfaces = new ArrayList();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaMethod.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaMethod.java
deleted file mode 100644
index 0f0ba36d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaMethod.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.processor.model.java;
-
-import com.sun.tools.internal.ws.resources.ModelMessages;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.tools.internal.ws.processor.model.Parameter;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Iterator;
-
-/**
- * @author WS Development Team
- */
-public class JavaMethod {
-
- private final ErrorReceiver errorReceiver;
- private final String name;
- private final List<JavaParameter> parameters = new ArrayList<JavaParameter>();
- private final List<String> exceptions = new ArrayList<String>();
- private final WsimportOptions options;
- private JavaType returnType;
-
- public JavaMethod(String name, WsimportOptions options, ErrorReceiver receiver) {
- this.name = name;
- this.returnType = null;
- this.errorReceiver = receiver;
- this.options = options;
- }
-
- public String getName() {
- return name;
- }
-
- public JavaType getReturnType() {
- return returnType;
- }
-
- public void setReturnType(JavaType returnType) {
- this.returnType = returnType;
- }
-
- private boolean hasParameter(String paramName) {
- for (JavaParameter parameter : parameters) {
- if (paramName.equals(parameter.getName())) {
- return true;
- }
- }
- return false;
- }
-
- private Parameter getParameter(String paramName){
- for (JavaParameter parameter : parameters) {
- if (paramName.equals(parameter.getName())) {
- return parameter.getParameter();
- }
- }
- return null;
- }
-
- public void addParameter(JavaParameter param) {
- // verify that this member does not already exist
- if (hasParameter(param.getName())) {
- if (options.isExtensionMode()) {
- param.setName(getUniqueName(param.getName()));
- } else {
- Parameter duplicParam = getParameter(param.getName());
- if(param.getParameter().isEmbedded()){
- errorReceiver.error(param.getParameter().getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE_WRAPPER(param.getName(), param.getParameter().getEntityName()));
- errorReceiver.error(duplicParam.getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE_WRAPPER(param.getName(), duplicParam.getEntityName()));
- } else {
- errorReceiver.error(param.getParameter().getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(param.getName(), param.getParameter().getEntityName()));
- errorReceiver.error(duplicParam.getLocator(), ModelMessages.MODEL_PARAMETER_NOTUNIQUE(param.getName(), duplicParam.getEntityName()));
- }
- return;
- }
- }
- parameters.add(param);
- }
-
- public List<JavaParameter> getParametersList() {
- return parameters;
- }
-
- public void addException(String exception) {
- // verify that this exception does not already exist
- if (!exceptions.contains(exception)) {
- exceptions.add(exception);
- }
- }
-
- /** TODO: NB uses it, remove it once we expose it thru some API **/
- public Iterator<String> getExceptions() {
- return exceptions.iterator();
- }
-
- private String getUniqueName(String param){
- int parmNum = 0;
- while (hasParameter(param)) {
- param = param + Integer.toString(parmNum++);
- }
- return param;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaParameter.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaParameter.java
deleted file mode 100644
index fe537878..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaParameter.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.java;
-
-import com.sun.tools.internal.ws.processor.model.Parameter;
-
-/**
- *
- * @author WS Development Team
- */
-public class JavaParameter {
-
- public JavaParameter() {}
-
- public JavaParameter(String name, JavaType type, Parameter parameter) {
- this(name, type, parameter, false);
- }
-
- public JavaParameter(String name, JavaType type, Parameter parameter,
- boolean holder) {
-
- this.name = name;
- this.type = type;
- this.parameter = parameter;
- this.holder = holder;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String s) {
- name = s;
- }
-
- public JavaType getType() {
- return type;
- }
-
- public void setType(JavaType t) {
- type = t;
- }
-
- public Parameter getParameter() {
- return parameter;
- }
-
- public void setParameter(Parameter p) {
- parameter = p;
- }
-
- public boolean isHolder() {
- return holder;
- }
-
- public void setHolder(boolean b) {
- holder = b;
- }
-
- public String getHolderName() {
- return holderName;
- }
-
- public void setHolderName(String holderName) {
- this.holderName = holderName;
- }
-
- private String name;
- private JavaType type;
- private Parameter parameter;
- private boolean holder;
- private String holderName;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaSimpleType.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaSimpleType.java
deleted file mode 100644
index 7ef5ce58..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaSimpleType.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.java;
-
-import com.sun.tools.internal.ws.processor.model.jaxb.JAXBTypeAndAnnotation;
-
-/**
- *
- * @author WS Development Team
- */
-public class JavaSimpleType extends JavaType {
-
- public JavaSimpleType() {}
-
- public JavaSimpleType(String name, String initString) {
- super(name, true, initString);
- }
-
- public JavaSimpleType(JAXBTypeAndAnnotation jtype) {
- super(jtype);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureMember.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureMember.java
deleted file mode 100644
index 0849c482..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureMember.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.java;
-
-/**
- *
- * @author WS Development Team
- */
-public class JavaStructureMember {
-
- public JavaStructureMember() {}
-
- public JavaStructureMember(String name, JavaType type, Object owner) {
- this(name, type, owner, false);
- }
- public JavaStructureMember(String name, JavaType type,
- Object owner, boolean isPublic) {
-
- this.name = name;
- this.type = type;
- this.owner = owner;
- this.isPublic = isPublic;
- constructorPos = -1;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String s) {
- name = s;
- }
-
- public JavaType getType() {
- return type;
- }
-
- public void setType(JavaType t) {
- type = t;
- }
-
- public boolean isPublic() {
- return isPublic;
- }
-
- public void setPublic(boolean b) {
- isPublic = b;
- }
-
- public boolean isInherited() {
- return isInherited;
- }
-
- public void setInherited(boolean b) {
- isInherited = b;
- }
-
- public String getReadMethod() {
- return readMethod;
- }
-
- public void setReadMethod(String readMethod) {
- this.readMethod = readMethod;
- }
-
- public String getWriteMethod() {
- return writeMethod;
- }
-
- public void setWriteMethod(String writeMethod) {
- this.writeMethod = writeMethod;
- }
-
- public String getDeclaringClass() {
- return declaringClass;
- }
- public void setDeclaringClass(String declaringClass) {
- this.declaringClass = declaringClass;
- }
-
- public Object getOwner() {
- return owner;
- }
-
- public void setOwner(Object owner) {
- this.owner = owner;
- }
-
- public int getConstructorPos() {
- return constructorPos;
- }
-
- public void setConstructorPos(int idx) {
- constructorPos = idx;
- }
-
- private String name;
- private JavaType type;
- private boolean isPublic = false;
- private boolean isInherited = false;
- private String readMethod;
- private String writeMethod;
- private String declaringClass;
- private Object owner;
- private int constructorPos;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureType.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureType.java
deleted file mode 100644
index 453a8cd8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureType.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.java;
-
-import com.sun.tools.internal.ws.processor.model.ModelException;
-
-import java.util.*;
-
-/**
- *
- * @author WS Development Team
- */
-public class JavaStructureType extends JavaType {
-
- public JavaStructureType() {}
-
- public JavaStructureType(String name, boolean present, Object owner) {
- super(name, present, "null");
- this.owner = owner;
- }
-
- public void add(JavaStructureMember m) {
- if (membersByName.containsKey(m.getName())) {
- throw new ModelException("model.uniqueness.javastructuretype",
- new Object[] {m.getName(), getRealName()});
- }
- members.add(m);
- membersByName.put(m.getName(), m);
- }
-
-
- public JavaStructureMember getMemberByName(String name) {
- if (membersByName.size() != members.size()) {
- initializeMembersByName();
- }
- return membersByName.get(name);
- }
-
- public Iterator getMembers() {
- return members.iterator();
- }
-
- public int getMembersCount() {
- return members.size();
- }
-
- /* serialization */
- public List<JavaStructureMember> getMembersList() {
- return members;
- }
-
- /* serialization */
- public void setMembersList(List<JavaStructureMember> l) {
- members = l;
- }
-
- private void initializeMembersByName() {
- membersByName = new HashMap<String, JavaStructureMember>();
- if (members != null) {
- for (JavaStructureMember m : members) {
- if (m.getName() != null &&
- membersByName.containsKey(m.getName())) {
-
- throw new ModelException("model.uniqueness");
- }
- membersByName.put(m.getName(), m);
- }
- }
- }
-
- public boolean isAbstract() {
- return isAbstract;
- }
-
- public void setAbstract(boolean isAbstract) {
- this.isAbstract = isAbstract;
- }
-
- public JavaStructureType getSuperclass() {
- return superclass;
- }
-
- public void setSuperclass(JavaStructureType superclassType) {
- superclass = superclassType;
- }
-
- public void addSubclass(JavaStructureType subclassType) {
- subclasses.add(subclassType);
- subclassType.setSuperclass(this);
- }
-
- public Iterator getSubclasses() {
- if (subclasses == null || subclasses.size() == 0) {
- return null;
- }
- return subclasses.iterator();
- }
-
- public Set getSubclassesSet() {
- return subclasses;
- }
-
- /* serialization */
- public void setSubclassesSet(Set s) {
- subclasses = s;
- for (Iterator iter = s.iterator(); iter.hasNext();) {
- ((JavaStructureType) iter.next()).setSuperclass(this);
- }
- }
-
- public Iterator getAllSubclasses() {
- Set subs = getAllSubclassesSet();
- if (subs.size() == 0) {
- return null;
- }
- return subs.iterator();
- }
-
- public Set getAllSubclassesSet() {
- Set transitiveSet = new HashSet();
- Iterator subs = subclasses.iterator();
- while (subs.hasNext()) {
- transitiveSet.addAll(
- ((JavaStructureType)subs.next()).getAllSubclassesSet());
- }
- transitiveSet.addAll(subclasses);
- return transitiveSet;
- }
-
- public Object getOwner() {
-
- // usually a SOAPStructureType
- return owner;
- }
-
- public void setOwner(Object owner) {
-
- // usually a SOAPStructureType
- this.owner = owner;
- }
-
- private List<JavaStructureMember> members = new ArrayList();
- private Map<String, JavaStructureMember> membersByName = new HashMap();
-
- // known subclasses of this type
- private Set subclasses = new HashSet();
- private JavaStructureType superclass;
-
- // usually a SOAPStructureType
- private Object owner;
- private boolean isAbstract = false;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaType.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaType.java
deleted file mode 100644
index 989b2fae..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaType.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.java;
-
-import com.sun.tools.internal.ws.processor.model.jaxb.JAXBTypeAndAnnotation;
-
-/**
- *
- * @author WS Development Team
- */
-public abstract class JavaType {
-
- private String name;
- private String realName;
- private boolean present;
- private boolean holder;
- private boolean holderPresent;
- private String initString;
- private String holderName;
- private JAXBTypeAndAnnotation type;
-
- public JavaType() {}
-
- public JavaType(JAXBTypeAndAnnotation type){
- this.type = type;
- init(type.getName(), false, null, null);
- }
-
- public JavaType(String name, boolean present, String initString) {
- init(name, present, initString, null);
- }
-
- public JavaType(String name, boolean present, String initString,
- String holderName) {
-
- init(name, present, initString, holderName);
- }
-
- public JAXBTypeAndAnnotation getType(){
- return type;
- }
-
- private void init(String name, boolean present, String initString,
- String holderName) {
-
- this.realName = name;
- this.name = name.replace('$', '.');
- this.present = present;
- this.initString = initString;
- this.holderName = holderName;
- holder = holderName != null;
- }
-
- public String getName() {
- return name;
- }
-
- public void doSetName(String name) {
-
- // renamed to avoid creating a "name" property with broken semantics
- this.realName = name;
- this.name = name.replace('$', '.');
- }
-
- public String getRealName() {
- return realName;
- }
-
- /* serialization */
- public void setRealName(String s) {
- realName = s;
- }
-
- public String getFormalName() {
- return name;
- }
-
- public void setFormalName(String s) {
- name = s;
- }
-
- public boolean isPresent() {
- return present;
- }
-
- /* serialization */
- public void setPresent(boolean b) {
- present = b;
- }
-
- public boolean isHolder() {
- return holder;
- }
-
- public void setHolder(boolean holder) {
- this.holder = holder;
- }
-
- public boolean isHolderPresent() {
- return holderPresent;
- }
- public void setHolderPresent(boolean holderPresent) {
- this.holderPresent = holderPresent;
- }
-
- public String getInitString() {
- return initString;
- }
-
- /* serialization */
- public void setInitString(String s) {
- initString = s;
- }
-
- public String getHolderName() {
- return holderName;
- }
-
- public void setHolderName(String holderName) {
- this.holderName = holderName;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBElementMember.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBElementMember.java
deleted file mode 100644
index 44611d8e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBElementMember.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.jaxb;
-
-import com.sun.tools.internal.ws.processor.model.java.JavaStructureMember;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author Kathy Walsh, Vivek Pandey
- *
- *
- */
-
-public class JAXBElementMember {
- public JAXBElementMember() {
- }
- public JAXBElementMember(QName name, JAXBType type) {
- this(name, type, null);
- }
- public JAXBElementMember(QName name, JAXBType type,
- JavaStructureMember javaStructureMember) {
- _name = name;
- _type = type;
- _javaStructureMember = javaStructureMember;
- }
- public QName getName() {
- return _name;
- }
- public void setName(QName n) {
- _name = n;
- }
- public JAXBType getType() {
- return _type;
- }
- public void setType(JAXBType t) {
- _type = t;
- }
- public boolean isRepeated() {
- return _repeated;
- }
- public void setRepeated(boolean b) {
- _repeated = b;
- }
- public JavaStructureMember getJavaStructureMember() {
- return _javaStructureMember;
- }
- public void setJavaStructureMember(JavaStructureMember javaStructureMember) {
- _javaStructureMember = javaStructureMember;
- }
- public boolean isInherited() {
- return isInherited;
- }
- public void setInherited(boolean b) {
- isInherited = b;
- }
- public JAXBProperty getProperty() {
- if(_prop == null && _type != null) {
- for (JAXBProperty prop: _type.getWrapperChildren()){
- if(prop.getElementName().equals(_name))
- setProperty(prop);
- }
- }
- return _prop;
- }
- public void setProperty(JAXBProperty prop) {
- _prop = prop;
- }
-
- private QName _name;
- private JAXBType _type;
- private JavaStructureMember _javaStructureMember;
- private boolean _repeated;
- private boolean isInherited = false;
- private JAXBProperty _prop;
- private static final String JAXB_UNIQUE_PARRAM = "__jaxbUniqueParam_";
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBMapping.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBMapping.java
deleted file mode 100644
index ba1f8d6e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBMapping.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.jaxb;
-
-import com.sun.tools.internal.xjc.api.Mapping;
-import com.sun.tools.internal.xjc.api.Property;
-import com.sun.tools.internal.xjc.api.TypeAndAnnotation;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Kohsuke Kawaguchi, Vivek Pandey
- */
-public class JAXBMapping {
-
- /**
- * @see Mapping#getElement()
- */
- private QName elementName;
-
- /**
- *
- */
- private JAXBTypeAndAnnotation type;
-
- /**
- * @see Mapping#getWrapperStyleDrilldown()
- */
- private List<JAXBProperty> wrapperStyleDrilldown;
-
- /**
- * Default constructor for the persistence.
- */
- public JAXBMapping() {}
-
- /**
- * Constructor that fills in the values from the given raw model
- */
- JAXBMapping( com.sun.tools.internal.xjc.api.Mapping rawModel ) {
- elementName = rawModel.getElement();
- TypeAndAnnotation typeAndAnno = rawModel.getType();
- type = new JAXBTypeAndAnnotation(typeAndAnno);
- List<? extends Property> list = rawModel.getWrapperStyleDrilldown();
- if(list==null)
- wrapperStyleDrilldown = null;
- else {
- wrapperStyleDrilldown = new ArrayList<JAXBProperty>(list.size());
- for( Property p : list )
- wrapperStyleDrilldown.add(new JAXBProperty(p));
- }
-
- }
-
- /**
- * @see Mapping#getElement()
- */
- public QName getElementName() {
- return elementName;
- }
-
- public void setElementName(QName elementName) {
- this.elementName = elementName;
- }
-
-
- public JAXBTypeAndAnnotation getType() {
- return type;
- }
-
- /**
- * @see Mapping#getWrapperStyleDrilldown()
- */
- public List<JAXBProperty> getWrapperStyleDrilldown() {
- return wrapperStyleDrilldown;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBModel.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBModel.java
deleted file mode 100644
index bda172e2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBModel.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.jaxb;
-
-import com.sun.tools.internal.xjc.api.J2SJAXBModel;
-import com.sun.tools.internal.xjc.api.Mapping;
-import com.sun.tools.internal.xjc.api.S2JJAXBModel;
-
-import javax.xml.namespace.QName;
-import java.util.*;
-
-/**
- * Root of the JAXB Model.
- *
- * <p>
- * This is just a wrapper around a list of {@link JAXBMapping}s.
- *
- * @author Kohsuke Kawaguchi, Vivek Pandey
- */
-public class JAXBModel {
-
- /**
- * All the mappings known to this model.
- */
- private List<JAXBMapping> mappings;
-
- // index for faster access.
- private final Map<QName,JAXBMapping> byQName = new HashMap<QName,JAXBMapping>();
- private final Map<String,JAXBMapping> byClassName = new HashMap<String,JAXBMapping>();
-
- private com.sun.tools.internal.xjc.api.JAXBModel rawJAXBModel;
-
- public com.sun.tools.internal.xjc.api.JAXBModel getRawJAXBModel() {
- return rawJAXBModel;
- }
-
- /**
- * @return Schema to Java model
- */
- public S2JJAXBModel getS2JJAXBModel(){
- if(rawJAXBModel instanceof S2JJAXBModel)
- return (S2JJAXBModel)rawJAXBModel;
- return null;
- }
-
- /**
- * @return Java to Schema JAXBModel
- */
- public J2SJAXBModel getJ2SJAXBModel(){
- if(rawJAXBModel instanceof J2SJAXBModel)
- return (J2SJAXBModel)rawJAXBModel;
- return null;
- }
-
-
- /**
- * Default constructor for the persistence.
- */
- public JAXBModel() {}
-
- /**
- * Constructor that fills in the values from the given raw model
- */
- public JAXBModel( com.sun.tools.internal.xjc.api.JAXBModel rawModel ) {
- this.rawJAXBModel = rawModel;
- if(rawModel instanceof S2JJAXBModel){
- S2JJAXBModel model = (S2JJAXBModel)rawModel;
- List<JAXBMapping> ms = new ArrayList<JAXBMapping>(model.getMappings().size());
- for( Mapping m : model.getMappings())
- ms.add(new JAXBMapping(m));
- setMappings(ms);
- }
- }
-
- /**
- */
- public List<JAXBMapping> getMappings() {
- return mappings;
- }
-
- //public void setMappings(List<JAXBMapping> mappings) {
- public void setMappings(List<JAXBMapping> mappings) {
- this.mappings = mappings;
- byQName.clear();
- byClassName.clear();
- for( JAXBMapping m : mappings ) {
- byQName.put(m.getElementName(),m);
- byClassName.put(m.getType().getName(),m);
- }
- }
-
- /**
- */
- public JAXBMapping get( QName elementName ) {
- return byQName.get(elementName);
- }
-
- /**
- */
- public JAXBMapping get( String className ) {
- return byClassName.get(className);
- }
-
-
- /**
- *
- * @return set of full qualified class names that jaxb will generate
- */
- public Set<String> getGeneratedClassNames() {
- return generatedClassNames;
- }
-
- public void setGeneratedClassNames(Set<String> generatedClassNames) {
- this.generatedClassNames = generatedClassNames;
- }
-
- private Set<String> generatedClassNames;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBProperty.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBProperty.java
deleted file mode 100644
index 7be1da8e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBProperty.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.jaxb;
-
-import com.sun.tools.internal.xjc.api.Property;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public class JAXBProperty {
-
- /**
- * @see Property#name()
- */
- private String name;
-
- private JAXBTypeAndAnnotation type;
- /**
- * @see Property#elementName()
- */
- private QName elementName;
-
- /**
- * @see Property#rawName()
- */
- private QName rawTypeName;
-
- /**
- * Default constructor for the persistence.
- */
- public JAXBProperty() {}
-
- /**
- * Constructor that fills in the values from the given raw model
- */
- JAXBProperty( Property prop ) {
- this.name = prop.name();
- this.type = new JAXBTypeAndAnnotation(prop.type());
- this.elementName = prop.elementName();
- this.rawTypeName = prop.rawName();
- }
-
- /**
- * @see Property#name()
- */
- public String getName() {
- return name;
- }
-
- public QName getRawTypeName() {
- return rawTypeName;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public JAXBTypeAndAnnotation getType() {
- return type;
- }
-
- /**
- * @see Property#elementName()
- */
- public QName getElementName() {
- return elementName;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBStructuredType.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBStructuredType.java
deleted file mode 100644
index 257421f9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBStructuredType.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.jaxb;
-
-import com.sun.tools.internal.ws.processor.model.ModelException;
-import com.sun.tools.internal.ws.processor.model.java.JavaStructureType;
-
-import javax.xml.namespace.QName;
-import java.util.*;
-
-/**
- * Top-level binding between JAXB generated Java type
- * and XML Schema element declaration.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class JAXBStructuredType extends JAXBType {
-
- public JAXBStructuredType(JAXBType jaxbType){
- super(jaxbType);
- }
-
- public JAXBStructuredType() {}
-
- public JAXBStructuredType(QName name) {
- this(name, null);
- }
-
- public JAXBStructuredType(QName name, JavaStructureType javaType) {
- super(name, javaType);
- }
-
- public void add(JAXBElementMember m) {
- if (_elementMembersByName.containsKey(m.getName())) {
- throw new ModelException("model.uniqueness");
- }
- _elementMembers.add(m);
- if (m.getName() != null) {
- _elementMembersByName.put(m.getName().getLocalPart(), m);
- }
- }
-
- public Iterator getElementMembers() {
- return _elementMembers.iterator();
- }
-
- public int getElementMembersCount() {
- return _elementMembers.size();
- }
-
- /* serialization */
- public List getElementMembersList() {
- return _elementMembers;
- }
-
- /* serialization */
- public void setElementMembersList(List l) {
- _elementMembers = l;
- }
-
- public void addSubtype(JAXBStructuredType type) {
- if (_subtypes == null) {
- _subtypes = new HashSet();
- }
- _subtypes.add(type);
- type.setParentType(this);
- }
-
- public Iterator getSubtypes() {
- if (_subtypes != null) {
- return _subtypes.iterator();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see JAXBType#isUnwrapped()
- */
- public boolean isUnwrapped() {
- return true;
- }
- /* serialization */
- public Set getSubtypesSet() {
- return _subtypes;
- }
-
- /* serialization */
- public void setSubtypesSet(Set s) {
- _subtypes = s;
- }
-
- public void setParentType(JAXBStructuredType parent) {
- if (_parentType != null &&
- parent != null &&
- !_parentType.equals(parent)) {
-
- throw new ModelException("model.parent.type.already.set",
- new Object[] { getName().toString(),
- _parentType.getName().toString(),
- parent.getName().toString()});
- }
- this._parentType = parent;
- }
-
- public JAXBStructuredType getParentType() {
- return _parentType;
- }
-
-
- private List _elementMembers = new ArrayList();
- private Map _elementMembersByName = new HashMap();
- private Set _subtypes = null;
- private JAXBStructuredType _parentType = null;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBType.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBType.java
deleted file mode 100644
index d95659ac..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBType.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.jaxb;
-
-import com.sun.tools.internal.ws.processor.model.AbstractType;
-import com.sun.tools.internal.ws.processor.model.java.JavaType;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Top-level binding between JAXB generated Java type
- * and XML Schema element declaration.
- *
- * @author
- * Vivek Pandey
- */
-public class JAXBType extends AbstractType{
- public JAXBType(JAXBType jaxbType){
- setName(jaxbType.getName());
- this.jaxbMapping = jaxbType.getJaxbMapping();
- this.jaxbModel = jaxbType.getJaxbModel();
- init();
- }
-
- public JAXBType(){}
-
- public JAXBType(QName name, JavaType type){
- super(name, type);
- }
-
- public JAXBType(QName name, JavaType type, JAXBMapping jaxbMapping, JAXBModel jaxbModel){
- super(name, type);
- this.jaxbMapping = jaxbMapping;
- this.jaxbModel = jaxbModel;
- init();
- }
-
- public void accept(JAXBTypeVisitor visitor) throws Exception {
- visitor.visit(this);
- }
-
- private void init() {
- if (jaxbMapping != null)
- wrapperChildren = jaxbMapping.getWrapperStyleDrilldown();
- else
- wrapperChildren = new ArrayList<JAXBProperty>();
- }
-
- public boolean isUnwrappable(){
- return jaxbMapping != null && jaxbMapping.getWrapperStyleDrilldown() != null;
- }
-
- public boolean hasWrapperChildren(){
- return wrapperChildren.size() > 0;
- }
-
- public boolean isLiteralType() {
- return true;
- }
-
- public List<JAXBProperty> getWrapperChildren(){
- return wrapperChildren;
- }
-
- public void setWrapperChildren(List<JAXBProperty> children) {
- wrapperChildren = children;
- }
-
- public JAXBMapping getJaxbMapping() {
- return jaxbMapping;
- }
-
- public void setJaxbMapping(JAXBMapping jaxbMapping) {
- this.jaxbMapping = jaxbMapping;
- init();
- }
-
- public void setUnwrapped(boolean unwrapped) {
- this.unwrapped = unwrapped;
- }
-
- public boolean isUnwrapped() {
- return unwrapped;
- }
-
- private JAXBMapping jaxbMapping;
-
- public JAXBModel getJaxbModel() {
- return jaxbModel;
- }
-
- public void setJaxbModel(JAXBModel jaxbModel) {
- this.jaxbModel = jaxbModel;
- }
-
- private JAXBModel jaxbModel;
- private boolean unwrapped = false;
- private List<JAXBProperty> wrapperChildren;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeAndAnnotation.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeAndAnnotation.java
deleted file mode 100644
index 494f9a66..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeAndAnnotation.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.jaxb;
-
-import com.sun.codemodel.internal.JAnnotatable;
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.api.TypeAndAnnotation;
-
-/**
- * Holds JAXB JType and TypeAndAnnotation. This provides abstration over
- * types from JAXBMapping and Property.
- */
-public class JAXBTypeAndAnnotation {
- TypeAndAnnotation typeAnn;
- JType type;
-
- public JAXBTypeAndAnnotation(TypeAndAnnotation typeAnn) {
- this.typeAnn = typeAnn;
- this.type = typeAnn.getTypeClass();
- }
-
- public JAXBTypeAndAnnotation(JType type) {
- this.type = type;
- }
-
- public JAXBTypeAndAnnotation(TypeAndAnnotation typeAnn, JType type) {
- this.typeAnn = typeAnn;
- this.type = type;
- }
-
- public void annotate(JAnnotatable typeVar) {
- if(typeAnn != null)
- typeAnn.annotate(typeVar);
- }
-
- public JType getType() {
- return type;
- }
-
- public String getName(){
- return type.fullName();
- }
-
- public TypeAndAnnotation getTypeAnn() {
- return typeAnn;
- }
-
- public void setTypeAnn(TypeAndAnnotation typeAnn) {
- this.typeAnn = typeAnn;
- }
-
- public void setType(JType type) {
- this.type = type;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeVisitor.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeVisitor.java
deleted file mode 100644
index b54d2f71..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeVisitor.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.jaxb;
-
-/**
- * @author Vivek Pandey
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public interface JAXBTypeVisitor {
- public void visit(JAXBType type) throws Exception;
- public void visit(RpcLitStructure type) throws Exception;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitMember.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitMember.java
deleted file mode 100644
index 8e35bcb0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitMember.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.jaxb;
-
-import com.sun.tools.internal.ws.processor.model.AbstractType;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author Vivek Pandey
- *
- * Represents RpcLit member parts
- */
-public class RpcLitMember extends AbstractType {
-
- //wsdl:part type attribute java mapped object
- private String javaTypeName;
- private QName schemaTypeName;
-
- /**
- *
- */
- public RpcLitMember() {
- super();
- // TODO Auto-generated constructor stub
- }
- public RpcLitMember(QName name, String javaTypeName){
- setName(name);
- this.javaTypeName = javaTypeName;
- }
- public RpcLitMember(QName name, String javaTypeName, QName schemaTypeName){
- setName(name);
- this.javaTypeName = javaTypeName;
- this.schemaTypeName = schemaTypeName;
- }
-
- /**
- * @return Returns the type.
- */
- public String getJavaTypeName() {
- return javaTypeName;
- }
- /**
- * @param type The type to set.
- */
- public void setJavaTypeName(String type) {
- this.javaTypeName = type;
- }
-
- /**
- * @return Returns the type.
- */
- public QName getSchemaTypeName() {
- return schemaTypeName;
- }
- /**
- * @param type The type to set.
- */
- public void setSchemaTypeName(QName type) {
- this.schemaTypeName = type;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitStructure.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitStructure.java
deleted file mode 100644
index f889dd99..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitStructure.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.jaxb;
-
-import com.sun.tools.internal.ws.processor.model.AbstractType;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Vivek Pandey
- *
- * RPC Structure that will be used to create RpcLitPayload latter
- */
-public class RpcLitStructure extends AbstractType {
- private List<RpcLitMember> members;
- private JAXBModel jaxbModel;
-
- /**
- *
- */
- public RpcLitStructure() {
- super();
- // TODO Auto-generated constructor stub
- }
- public RpcLitStructure(QName name, JAXBModel jaxbModel){
- setName(name);
- this.jaxbModel = jaxbModel;
- this.members = new ArrayList<RpcLitMember>();
-
- }
- public RpcLitStructure(QName name, JAXBModel jaxbModel, List<RpcLitMember> members){
- setName(name);
- this.members = members;
- }
-
- public void accept(JAXBTypeVisitor visitor) throws Exception {
- visitor.visit(this);
- }
-
- public List<RpcLitMember> getRpcLitMembers(){
- return members;
- }
-
- public List<RpcLitMember> setRpcLitMembers(List<RpcLitMember> members){
- return this.members = members;
- }
-
- public void addRpcLitMember(RpcLitMember member){
- members.add(member);
- }
- /**
- * @return Returns the jaxbModel.
- */
- public JAXBModel getJaxbModel() {
- return jaxbModel;
- }
- /**
- * @param jaxbModel The jaxbModel to set.
- */
- public void setJaxbModel(JAXBModel jaxbModel) {
- this.jaxbModel = jaxbModel;
- }
-
- public boolean isLiteralType() {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/Util.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/Util.java
deleted file mode 100644
index d4cc024e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/Util.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.model.jaxb;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class Util {
- /**
- * Replaces the marcros in the first string by the actual given arguments.
- */
- static String replace( String macro, String... args ) {
- int len = macro.length();
- StringBuilder buf = new StringBuilder(len);
- for( int i=0; i<len; i++ ) {
- char ch = macro.charAt(i);
- if(ch=='=' && i+2<len) {
- char tail = macro.charAt(i+1);
- char ch2 = macro.charAt(i+2);
- if('0'<=ch2 && ch2<='9' && tail==':') {
- buf.append(args[ch2-'0']);
- i+=2;
- continue;
- }
- }
- buf.append(ch);
- }
- return buf.toString();
- }
-
- /**
- * Creates a macro tempate so that it can be later used with {@link #replace(String, String[])}.
- */
- static String createMacroTemplate( String s ) {
- return s;
- }
-
- static final String MAGIC = "=:";
-
- static final String MAGIC0 = MAGIC+"0";
- static final String MAGIC1 = MAGIC+"1";
- static final String MAGIC2 = MAGIC+"2";
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/JavaSimpleTypeCreator.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/JavaSimpleTypeCreator.java
deleted file mode 100644
index 8e4fa274..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/JavaSimpleTypeCreator.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler;
-
-import com.sun.tools.internal.ws.processor.model.java.JavaSimpleType;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import static com.sun.tools.internal.ws.processor.modeler.ModelerConstants.*;
-/**
- *
- * @author WS Development Team
- */
-public final class JavaSimpleTypeCreator {
-
- /*
- * Mapped JavaSimpleTypes
- */
- public static final JavaSimpleType BOOLEAN_JAVATYPE = new JavaSimpleType(BOOLEAN_CLASSNAME.getValue(), FALSE_STR.getValue());
- public static final JavaSimpleType BOXED_BOOLEAN_JAVATYPE = new JavaSimpleType(BOXED_BOOLEAN_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType BYTE_JAVATYPE = new JavaSimpleType(BYTE_CLASSNAME.getValue(), "(byte)" + ZERO_STR.getValue());
- public static final JavaSimpleType BYTE_ARRAY_JAVATYPE = new JavaSimpleType(BYTE_ARRAY_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType BOXED_BYTE_JAVATYPE = new JavaSimpleType(BOXED_BYTE_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType BOXED_BYTE_ARRAY_JAVATYPE = new JavaSimpleType(BOXED_BYTE_ARRAY_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType DOUBLE_JAVATYPE = new JavaSimpleType(DOUBLE_CLASSNAME.getValue(), ZERO_STR.getValue());
- public static final JavaSimpleType BOXED_DOUBLE_JAVATYPE = new JavaSimpleType(BOXED_DOUBLE_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType FLOAT_JAVATYPE = new JavaSimpleType(FLOAT_CLASSNAME.getValue(), ZERO_STR.getValue());
- public static final JavaSimpleType BOXED_FLOAT_JAVATYPE = new JavaSimpleType(BOXED_FLOAT_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType INT_JAVATYPE = new JavaSimpleType(INT_CLASSNAME.getValue(), ZERO_STR.getValue());
- public static final JavaSimpleType BOXED_INTEGER_JAVATYPE = new JavaSimpleType(BOXED_INTEGER_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType LONG_JAVATYPE = new JavaSimpleType(LONG_CLASSNAME.getValue(), ZERO_STR.getValue());
- public static final JavaSimpleType BOXED_LONG_JAVATYPE = new JavaSimpleType(BOXED_LONG_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType SHORT_JAVATYPE = new JavaSimpleType(SHORT_CLASSNAME.getValue(), "(short)" + ZERO_STR.getValue());
- public static final JavaSimpleType BOXED_SHORT_JAVATYPE = new JavaSimpleType(BOXED_SHORT_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType DECIMAL_JAVATYPE = new JavaSimpleType(BIGDECIMAL_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType BIG_INTEGER_JAVATYPE = new JavaSimpleType(BIGINTEGER_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType CALENDAR_JAVATYPE = new JavaSimpleType(CALENDAR_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType DATE_JAVATYPE = new JavaSimpleType(DATE_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType STRING_JAVATYPE = new JavaSimpleType(STRING_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType STRING_ARRAY_JAVATYPE = new JavaSimpleType(STRING_ARRAY_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType QNAME_JAVATYPE = new JavaSimpleType(QNAME_CLASSNAME.getValue(), NULL_STR.getValue());
- public static final JavaSimpleType VOID_JAVATYPE = new JavaSimpleType(VOID_CLASSNAME.getValue(), null);
- public static final JavaSimpleType OBJECT_JAVATYPE = new JavaSimpleType(OBJECT_CLASSNAME.getValue(), null);
- public static final JavaSimpleType SOAPELEMENT_JAVATYPE = new JavaSimpleType(SOAPELEMENT_CLASSNAME.getValue(), null);
- public static final JavaSimpleType URI_JAVATYPE = new JavaSimpleType(URI_CLASSNAME.getValue(), null);
-
- // Attachment types
- public static final JavaSimpleType IMAGE_JAVATYPE = new JavaSimpleType(IMAGE_CLASSNAME.getValue(), null);
- public static final JavaSimpleType MIME_MULTIPART_JAVATYPE = new JavaSimpleType(MIME_MULTIPART_CLASSNAME.getValue(), null);
- public static final JavaSimpleType SOURCE_JAVATYPE = new JavaSimpleType(SOURCE_CLASSNAME.getValue(), null);
- public static final JavaSimpleType DATA_HANDLER_JAVATYPE = new JavaSimpleType(DATA_HANDLER_CLASSNAME.getValue(), null);
-
- // bug fix: 4923650
- private static final Map<String, JavaSimpleType> JAVA_TYPES = new HashMap<String, JavaSimpleType>(31);
-
- static {
- JAVA_TYPES.put(BOOLEAN_CLASSNAME.getValue(), BOOLEAN_JAVATYPE);
- JAVA_TYPES.put(BOXED_BOOLEAN_CLASSNAME.getValue(), BOXED_BOOLEAN_JAVATYPE);
- JAVA_TYPES.put(BYTE_CLASSNAME.getValue(), BYTE_JAVATYPE);
- JAVA_TYPES.put(BYTE_ARRAY_CLASSNAME.getValue(), BYTE_ARRAY_JAVATYPE);
- JAVA_TYPES.put(BOXED_BYTE_CLASSNAME.getValue(), BOXED_BYTE_JAVATYPE);
- JAVA_TYPES.put(BOXED_BYTE_ARRAY_CLASSNAME.getValue(), BOXED_BYTE_ARRAY_JAVATYPE);
- JAVA_TYPES.put(DOUBLE_CLASSNAME.getValue(), DOUBLE_JAVATYPE);
- JAVA_TYPES.put(BOXED_DOUBLE_CLASSNAME.getValue(), BOXED_DOUBLE_JAVATYPE);
- JAVA_TYPES.put(FLOAT_CLASSNAME.getValue(), FLOAT_JAVATYPE);
- JAVA_TYPES.put(BOXED_FLOAT_CLASSNAME.getValue(), BOXED_FLOAT_JAVATYPE);
- JAVA_TYPES.put(INT_CLASSNAME.getValue(), INT_JAVATYPE);
- JAVA_TYPES.put(BOXED_INTEGER_CLASSNAME.getValue(), BOXED_INTEGER_JAVATYPE);
- JAVA_TYPES.put(LONG_CLASSNAME.getValue(), LONG_JAVATYPE);
- JAVA_TYPES.put(BOXED_LONG_CLASSNAME.getValue(), BOXED_LONG_JAVATYPE);
- JAVA_TYPES.put(SHORT_CLASSNAME.getValue(), SHORT_JAVATYPE);
- JAVA_TYPES.put(BOXED_SHORT_CLASSNAME.getValue(), BOXED_SHORT_JAVATYPE);
- JAVA_TYPES.put(BIGDECIMAL_CLASSNAME.getValue(), DECIMAL_JAVATYPE);
- JAVA_TYPES.put(BIGINTEGER_CLASSNAME.getValue(), BIG_INTEGER_JAVATYPE);
- JAVA_TYPES.put(CALENDAR_CLASSNAME.getValue(), CALENDAR_JAVATYPE);
- JAVA_TYPES.put(DATE_CLASSNAME.getValue(), DATE_JAVATYPE);
- JAVA_TYPES.put(STRING_CLASSNAME.getValue(), STRING_JAVATYPE);
- JAVA_TYPES.put(STRING_ARRAY_CLASSNAME.getValue(), STRING_ARRAY_JAVATYPE);
- JAVA_TYPES.put(QNAME_CLASSNAME.getValue(), QNAME_JAVATYPE);
- JAVA_TYPES.put(VOID_CLASSNAME.getValue(), VOID_JAVATYPE);
- JAVA_TYPES.put(OBJECT_CLASSNAME.getValue(), OBJECT_JAVATYPE);
- JAVA_TYPES.put(SOAPELEMENT_CLASSNAME.getValue(), SOAPELEMENT_JAVATYPE);
- JAVA_TYPES.put(URI_CLASSNAME.getValue(), URI_JAVATYPE);
- JAVA_TYPES.put(IMAGE_CLASSNAME.getValue(), IMAGE_JAVATYPE);
- JAVA_TYPES.put(MIME_MULTIPART_CLASSNAME.getValue(), MIME_MULTIPART_JAVATYPE);
- JAVA_TYPES.put(SOURCE_CLASSNAME.getValue(), SOURCE_JAVATYPE);
- JAVA_TYPES.put(DATA_HANDLER_CLASSNAME.getValue(), DATA_HANDLER_JAVATYPE);
- }
-
- private JavaSimpleTypeCreator() {
- }
-
- // bug fix: 4923650
- public static JavaSimpleType getJavaSimpleType(String className) {
- return JAVA_TYPES.get(className);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/Modeler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/Modeler.java
deleted file mode 100644
index e6cae5ce..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/Modeler.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler;
-
-import com.sun.tools.internal.ws.processor.model.Model;
-
-/**
- * A Modeler is used to create a Model of a Web Service from a particular Web
- * Web Service description such as a WSDL
- *
- * @author WS Development Team
-*/
-public interface Modeler {
- /**
- * Returns the top model of a Web Service. May throw a
- * ModelException if there is a problem with the model.
- *
- * @return Model - the root Node of the model of the Web Service
- *
- * @exception ModelerException
- */
- public Model buildModel();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerConstants.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerConstants.java
deleted file mode 100644
index 086df5d4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerConstants.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler;
-
-
-/**
- *
- * @author WS Development Team
- */
-public enum ModelerConstants {
-
- FALSE_STR("false"),
- ZERO_STR("0"),
- NULL_STR("null"),
- ARRAY_STR("Array"),
-
- /*
- * Java ClassNames
- */
- /*
- * Java ClassNames
- */
- IOEXCEPTION_CLASSNAME("java.io.IOException"),
- BOOLEAN_CLASSNAME("boolean"),
- BOXED_BOOLEAN_CLASSNAME("java.lang.Boolean"),
- BYTE_CLASSNAME("byte"),
- BYTE_ARRAY_CLASSNAME("byte[]"),
- BOXED_BYTE_CLASSNAME("java.lang.Byte"),
- BOXED_BYTE_ARRAY_CLASSNAME("java.lang.Byte[]"),
- CLASS_CLASSNAME("java.lang.Class"),
- CHAR_CLASSNAME("char"),
- BOXED_CHAR_CLASSNAME("java.lang.Character"),
- DOUBLE_CLASSNAME("double"),
- BOXED_DOUBLE_CLASSNAME("java.lang.Double"),
- FLOAT_CLASSNAME("float"),
- BOXED_FLOAT_CLASSNAME("java.lang.Float"),
- INT_CLASSNAME("int"),
- BOXED_INTEGER_CLASSNAME("java.lang.Integer"),
- LONG_CLASSNAME("long"),
- BOXED_LONG_CLASSNAME("java.lang.Long"),
- SHORT_CLASSNAME("short"),
- BOXED_SHORT_CLASSNAME("java.lang.Short"),
- BIGDECIMAL_CLASSNAME("java.math.BigDecimal"),
- BIGINTEGER_CLASSNAME("java.math.BigInteger"),
- CALENDAR_CLASSNAME("java.util.Calendar"),
- DATE_CLASSNAME("java.util.Date"),
- STRING_CLASSNAME("java.lang.String"),
- STRING_ARRAY_CLASSNAME("java.lang.String[]"),
- QNAME_CLASSNAME("javax.xml.namespace.QName"),
- VOID_CLASSNAME("void"),
- OBJECT_CLASSNAME("java.lang.Object"),
- SOAPELEMENT_CLASSNAME("javax.xml.soap.SOAPElement"),
- IMAGE_CLASSNAME("java.awt.Image"),
- MIME_MULTIPART_CLASSNAME("javax.mail.internet.MimeMultipart"),
- SOURCE_CLASSNAME("javax.xml.transform.Source"),
- DATA_HANDLER_CLASSNAME("javax.activation.DataHandler"),
- URI_CLASSNAME("java.net.URI"),
- // URI_CLASSNAME ("java.lang.String"),
- // Collections
- COLLECTION_CLASSNAME("java.util.Collection"),
- LIST_CLASSNAME("java.util.List"),
- SET_CLASSNAME("java.util.Set"),
- VECTOR_CLASSNAME("java.util.Vector"),
- STACK_CLASSNAME("java.util.Stack"),
- LINKED_LIST_CLASSNAME("java.util.LinkedList"),
- ARRAY_LIST_CLASSNAME("java.util.ArrayList"),
- HASH_SET_CLASSNAME("java.util.HashSet"),
- TREE_SET_CLASSNAME("java.util.TreeSet"),
-
- // Maps
- MAP_CLASSNAME("java.util.Map"),
- HASH_MAP_CLASSNAME("java.util.HashMap"),
- TREE_MAP_CLASSNAME("java.util.TreeMap"),
- HASHTABLE_CLASSNAME("java.util.Hashtable"),
- PROPERTIES_CLASSNAME("java.util.Properties"),
- // WEAK_HASH_MAP_CLASSNAME ("java.util.WeakHashMap"),
- JAX_WS_MAP_ENTRY_CLASSNAME("com.sun.xml.internal.ws.encoding.soap.JAXWSMapEntry");
-
- private String value;
-
- private ModelerConstants(String value) {
- this.value = value;
- }
-
- public String getValue() {
- return value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerException.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerException.java
deleted file mode 100644
index 45e111bd..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerException.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.processor.modeler;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.tools.internal.ws.processor.ProcessorException;
-
-/**
- * ModelerException represents an exception that occurred while
- * visiting service model.
- *
- * @see ProcessorException
- *
- * @author WS Development Team
-*/
-public class ModelerException extends ProcessorException {
-
- public ModelerException(String key) {
- super(key);
- }
-
- public ModelerException(String key, Object... args) {
- super(key, args);
- }
-
- public ModelerException(Throwable throwable) {
- super(throwable);
- }
-
- public ModelerException(Localizable arg) {
- super("modeler.nestedModelError", arg);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.tools.internal.ws.resources.modeler";
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/AnnotationProcessorContext.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/AnnotationProcessorContext.java
deleted file mode 100644
index 65477911..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/AnnotationProcessorContext.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler.annotation;
-
-import com.sun.tools.internal.ws.processor.model.Model;
-import com.sun.tools.internal.ws.processor.model.Operation;
-import com.sun.tools.internal.ws.processor.model.Port;
-import com.sun.tools.internal.ws.processor.model.Service;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAPUse;
-
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.Name;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-
-/**
- *
- * @author dkohlert
- */
-public class AnnotationProcessorContext {
-
- private Map<Name, SeiContext> seiContextMap = new HashMap<Name, SeiContext>();
- private int round = 1;
- private boolean modelCompleted = false;
-
- public void addSeiContext(Name seiName, SeiContext seiContext) {
- seiContextMap.put(seiName, seiContext);
- }
-
- public SeiContext getSeiContext(Name seiName) {
- SeiContext context = seiContextMap.get(seiName);
- if (context == null) {
- context = new SeiContext();
- addSeiContext(seiName, context);
- }
- return context;
- }
-
- public SeiContext getSeiContext(TypeElement d) {
- return getSeiContext(d.getQualifiedName());
- }
-
- public Collection<SeiContext> getSeiContexts() {
- return seiContextMap.values();
- }
-
- public int getRound() {
- return round;
- }
-
- public void incrementRound() {
- round++;
- }
-
- public static boolean isEncoded(Model model) {
- if (model == null)
- return false;
- for (Service service : model.getServices()) {
- for (Port port : service.getPorts()) {
- for (Operation operation : port.getOperations()) {
- if (operation.getUse() != null && operation.getUse().equals(SOAPUse.LITERAL))
- return false;
- }
- }
- }
- return true;
- }
-
- public void setModelCompleted(boolean modelCompleted) {
- this.modelCompleted = modelCompleted;
- }
-
- public boolean isModelCompleted() {
- return modelCompleted;
- }
-
- public static class SeiContext {
-
- private Map<String, WrapperInfo> reqOperationWrapperMap = new HashMap<String, WrapperInfo>();
- private Map<String, WrapperInfo> resOperationWrapperMap = new HashMap<String, WrapperInfo>();
- private Map<Name, FaultInfo> exceptionBeanMap = new HashMap<Name, FaultInfo>();
-
- private Name seiImplName;
- private boolean implementsSei;
- private String namespaceUri;
-
- public SeiContext() {};
-
- /**
- * @deprecated use empty constructor, seiName value is ignored
- * @param seiName
- */
- public SeiContext(Name seiName) {};
-
- public void setImplementsSei(boolean implementsSei) {
- this.implementsSei = implementsSei;
- }
-
- public boolean getImplementsSei() {
- return implementsSei;
- }
-
- public void setNamespaceUri(String namespaceUri) {
- this.namespaceUri = namespaceUri;
- }
-
- public String getNamespaceUri() {
- return namespaceUri;
- }
-
- public Name getSeiImplName() {
- return seiImplName;
- }
-
- public void setSeiImplName(Name implName) {
- seiImplName = implName;
- }
-
- public void setReqWrapperOperation(ExecutableElement method, WrapperInfo wrapperInfo) {
- reqOperationWrapperMap.put(methodToString(method), wrapperInfo);
- }
-
- public WrapperInfo getReqOperationWrapper(ExecutableElement method) {
- return reqOperationWrapperMap.get(methodToString(method));
- }
-
- public void setResWrapperOperation(ExecutableElement method, WrapperInfo wrapperInfo) {
- resOperationWrapperMap.put(methodToString(method), wrapperInfo);
- }
-
- public WrapperInfo getResOperationWrapper(ExecutableElement method) {
- return resOperationWrapperMap.get(methodToString(method));
- }
-
- public String methodToString(ExecutableElement method) {
- StringBuilder buf = new StringBuilder(method.getSimpleName());
- for (VariableElement param : method.getParameters())
- buf.append(';').append(param.asType());
- return buf.toString();
- }
-
- public void clearExceptionMap() {
- exceptionBeanMap.clear();
- }
-
- public void addExceptionBeanEntry(Name exception, FaultInfo faultInfo, ModelBuilder builder) {
- exceptionBeanMap.put(exception, faultInfo);
- }
-
- public FaultInfo getExceptionBeanName(Name exception) {
- return exceptionBeanMap.get(exception);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/FaultInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/FaultInfo.java
deleted file mode 100644
index 782bfde6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/FaultInfo.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler.annotation;
-
-import javax.xml.namespace.QName;
-
-/**
- *
- * @author dkohlert
- */
-public class FaultInfo {
- public String beanName;
- public TypeMoniker beanTypeMoniker;
- public boolean isWsdlException;
- public QName elementName;
-
- /** Creates a new instance of FaultInfo */
- public FaultInfo() {
- }
- public FaultInfo(String beanName) {
- this.beanName = beanName;
- }
- public FaultInfo(String beanName, boolean isWsdlException) {
- this.beanName = beanName;
- this.isWsdlException = isWsdlException;
- }
- public FaultInfo(TypeMoniker typeMoniker, boolean isWsdlException) {
- this.beanTypeMoniker = typeMoniker;
- this.isWsdlException = isWsdlException;
- }
-
- public void setIsWsdlException(boolean isWsdlException) {
- this.isWsdlException = isWsdlException;
- }
-
- public boolean isWsdlException() {
- return isWsdlException;
- }
-
- public void setBeanName(String beanName) {
- this.beanName = beanName;
- }
-
- public String getBeanName() {
- return beanName;
- }
-
- public void setElementName(QName elementName) {
- this.elementName = elementName;
- }
-
- public QName getElementName() {
- return elementName;
- }
- public void setBeanTypeMoniker(TypeMoniker typeMoniker) {
- this.beanTypeMoniker = typeMoniker;
- }
- public TypeMoniker getBeanTypeMoniker() {
- return beanTypeMoniker;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MakeSafeTypeVisitor.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MakeSafeTypeVisitor.java
deleted file mode 100644
index 90a787b9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MakeSafeTypeVisitor.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler.annotation;
-
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.type.DeclaredType;
-import javax.lang.model.type.NoType;
-import javax.lang.model.type.TypeMirror;
-import javax.lang.model.util.SimpleTypeVisitor6;
-import javax.lang.model.util.Types;
-import java.util.Collection;
-import java.util.Map;
-
-/**
- *
- * @author dkohlert
- */
-public class MakeSafeTypeVisitor extends SimpleTypeVisitor6<TypeMirror, Types> {
-
- TypeElement collectionType;
- TypeElement mapType;
-
- /**
- * Creates a new instance of MakeSafeTypeVisitor
- */
- public MakeSafeTypeVisitor(ProcessingEnvironment processingEnvironment) {
- collectionType = processingEnvironment.getElementUtils().getTypeElement(Collection.class.getName());
- mapType = processingEnvironment.getElementUtils().getTypeElement(Map.class.getName());
- }
-
- @Override
- public TypeMirror visitDeclared(DeclaredType t, Types types) {
- if (TypeModeler.isSubElement((TypeElement) t.asElement(), collectionType)
- || TypeModeler.isSubElement((TypeElement) t.asElement(), mapType)) {
- Collection<? extends TypeMirror> args = t.getTypeArguments();
- TypeMirror[] safeArgs = new TypeMirror[args.size()];
- int i = 0;
- for (TypeMirror arg : args) {
- safeArgs[i++] = visit(arg, types);
- }
- return types.getDeclaredType((TypeElement) t.asElement(), safeArgs);
- }
- return types.erasure(t);
- }
-
- @Override
- public TypeMirror visitNoType(NoType type, Types types) {
- return type;
- }
- @Override
- protected TypeMirror defaultAction(TypeMirror e, Types types) {
- return types.erasure(e);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MemberInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MemberInfo.java
deleted file mode 100644
index 747cae68..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MemberInfo.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.processor.modeler.annotation;
-
-import javax.lang.model.type.TypeMirror;
-
-import java.lang.annotation.Annotation;
-import java.util.List;
-
-/**
- * Note: this class has a natural ordering that is inconsistent with equals.
- * @author WS Development Team
- */
-final class MemberInfo implements Comparable<MemberInfo> {
- private final TypeMirror paramType;
- private final String paramName;
- private final List<Annotation> jaxbAnnotations;
-
- public MemberInfo(TypeMirror paramType, String paramName, List<Annotation> jaxbAnnotations) {
- this.paramType = paramType;
- this.paramName = paramName;
- this.jaxbAnnotations = jaxbAnnotations;
- }
-
- public List<Annotation> getJaxbAnnotations() {
- return jaxbAnnotations;
- }
-
- public TypeMirror getParamType() {
- return paramType;
- }
-
- public String getParamName() {
- return paramName;
- }
-
- @Override
- public int compareTo(MemberInfo member) {
- return paramName.compareTo(member.paramName);
- }
-
- @Override
- public boolean equals(Object o) {
- return super.equals(o);
- }
-
- @Override
- public int hashCode() {
- int hash = 5;
- hash = 47 * hash + (this.paramType != null ? this.paramType.hashCode() : 0);
- hash = 47 * hash + (this.paramName != null ? this.paramName.hashCode() : 0);
- hash = 47 * hash + (this.jaxbAnnotations != null ? this.jaxbAnnotations.hashCode() : 0);
- return hash;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/ModelBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/ModelBuilder.java
deleted file mode 100644
index a4652b02..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/ModelBuilder.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler.annotation;
-
-import com.sun.tools.internal.ws.processor.modeler.ModelerException;
-import com.sun.tools.internal.ws.wscompile.WsgenOptions;
-
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.Name;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.type.TypeMirror;
-import java.io.File;
-
-/**
- * @author WS Development Team
- */
-public interface ModelBuilder {
-
- ProcessingEnvironment getProcessingEnvironment();
-
- String getOperationName(Name methodName);
-
- TypeMirror getHolderValueType(TypeMirror type);
-
- boolean checkAndSetProcessed(TypeElement typeElement);
-
- /**
- * Checks if type is a service specific exception
- *
- * @param typeMirror the given element's type
- * @return true if is not a service specific exception as defined by JAX-WS specification
- */
- boolean isServiceException(TypeMirror typeMirror);
-
- boolean isRemote(TypeElement typeElement);
-
- boolean canOverWriteClass(String className);
-
- WsgenOptions getOptions();
-
- File getSourceDir();
-
- void log(String msg);
-
- void processWarning(String message);
-
- void processError(String message);
-
- void processError(String message, Element element) throws ModelerException;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeModeler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeModeler.java
deleted file mode 100644
index a5a0bc22..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeModeler.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.processor.modeler.annotation;
-
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.lang.model.element.ElementKind;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-import javax.lang.model.type.DeclaredType;
-import javax.lang.model.type.TypeKind;
-import javax.lang.model.type.TypeMirror;
-import javax.lang.model.util.ElementFilter;
-import java.util.Collection;
-
-/**
- * @author WS Development Team
- */
-final class TypeModeler {
-
- private TypeModeler() {
- }
-
- public static TypeElement getDeclaration(TypeMirror typeMirror) {
- if (typeMirror != null && typeMirror.getKind().equals(TypeKind.DECLARED))
- return (TypeElement) ((DeclaredType) typeMirror).asElement();
- return null;
- }
-
- public static TypeElement getDeclaringClassMethod(TypeMirror theClass, String methodName, TypeMirror[] args) {
- return getDeclaringClassMethod(getDeclaration(theClass), methodName, args);
- }
-
- public static TypeElement getDeclaringClassMethod(TypeElement theClass, String methodName, TypeMirror[] args) {
-
- TypeElement retClass = null;
- if (theClass.getKind().equals(ElementKind.CLASS)) {
- TypeMirror superClass = theClass.getSuperclass();
- if (!superClass.getKind().equals(TypeKind.NONE))
- retClass = getDeclaringClassMethod(superClass, methodName, args);
- }
- if (retClass == null) {
- for (TypeMirror interfaceType : theClass.getInterfaces()) {
- retClass = getDeclaringClassMethod(interfaceType, methodName, args);
- }
- }
- if (retClass == null) {
- Collection<? extends ExecutableElement> methods = ElementFilter.methodsIn(theClass.getEnclosedElements());
- for (ExecutableElement method : methods) {
- if (method.getSimpleName().toString().equals(methodName)) {
- retClass = theClass;
- break;
- }
- }
- }
- return retClass;
- }
-
- public static Collection<DeclaredType> collectInterfaces(TypeElement type) {
- @SuppressWarnings({"unchecked"})
- Collection<DeclaredType> interfaces = (Collection<DeclaredType>) type.getInterfaces();
- for (TypeMirror interfaceType : type.getInterfaces()) {
- interfaces.addAll(collectInterfaces(getDeclaration(interfaceType)));
- }
- return interfaces;
- }
-
- public static boolean isSubclass(String subTypeName, String superTypeName, ProcessingEnvironment env) {
- return isSubclass(env.getElementUtils().getTypeElement(subTypeName), env.getElementUtils().getTypeElement(superTypeName), env);
- }
-
- public static boolean isSubclass(TypeElement subType, TypeElement superType, ProcessingEnvironment env) {
- return !subType.equals(superType) && isSubElement(subType, superType);
- }
-
- public static TypeMirror getHolderValueType(TypeMirror type, TypeElement defHolder, ProcessingEnvironment env) {
- TypeElement typeElement = getDeclaration(type);
- if (typeElement == null)
- return null;
-
- if (isSubElement(typeElement, defHolder)) {
- if (type.getKind().equals(TypeKind.DECLARED)) {
- Collection<? extends TypeMirror> argTypes = ((DeclaredType) type).getTypeArguments();
- if (argTypes.size() == 1) {
- return argTypes.iterator().next();
- } else if (argTypes.isEmpty()) {
- VariableElement member = getValueMember(typeElement);
- if (member != null) {
- return member.asType();
- }
- }
- }
- }
- return null;
- }
-
- public static VariableElement getValueMember(TypeMirror classType) {
- return getValueMember(getDeclaration(classType));
- }
-
- public static VariableElement getValueMember(TypeElement type) {
- VariableElement member = null;
- for (VariableElement field : ElementFilter.fieldsIn(type.getEnclosedElements())) {
- if ("value".equals(field.getSimpleName().toString())) {
- member = field;
- break;
- }
- }
- if (member == null && type.getKind().equals(ElementKind.CLASS))
- member = getValueMember(type.getSuperclass());
- return member;
- }
-
- public static boolean isSubElement(TypeElement d1, TypeElement d2) {
- if (d1.equals(d2))
- return true;
- TypeElement superClassDecl = null;
- if (d1.getKind().equals(ElementKind.CLASS)) {
- TypeMirror superClass = d1.getSuperclass();
- if (!superClass.getKind().equals(TypeKind.NONE)) {
- superClassDecl = (TypeElement) ((DeclaredType) superClass).asElement();
- if (superClassDecl.equals(d2))
- return true;
- }
- }
- for (TypeMirror superIntf : d1.getInterfaces()) {
- DeclaredType declaredSuperIntf = (DeclaredType) superIntf;
- if (declaredSuperIntf.asElement().equals(d2)) {
- return true;
- }
- if (isSubElement((TypeElement) declaredSuperIntf.asElement(), d2)) {
- return true;
- } else if (superClassDecl != null && isSubElement(superClassDecl, d2)) {
- return true;
- }
- }
- return false;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMoniker.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMoniker.java
deleted file mode 100644
index f3fc9d03..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMoniker.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler.annotation;
-
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.lang.model.type.TypeMirror;
-
-/**
- *
- * @author dkohlert
- */
-public interface TypeMoniker {
-
- public TypeMirror create(ProcessingEnvironment apEnv);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMonikerFactory.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMonikerFactory.java
deleted file mode 100644
index 6cb3e860..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMonikerFactory.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler.annotation;
-
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.lang.model.element.Name;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.type.ArrayType;
-import javax.lang.model.type.DeclaredType;
-import javax.lang.model.type.PrimitiveType;
-import javax.lang.model.type.TypeKind;
-import javax.lang.model.type.TypeMirror;
-import java.util.ArrayList;
-import java.util.Collection;
-
-/**
- * @author dkohlert
- */
-public class TypeMonikerFactory {
-
- public static TypeMoniker getTypeMoniker(TypeMirror typeMirror) {
- if (typeMirror == null)
- throw new NullPointerException();
-
- if (typeMirror.getKind().isPrimitive())
- return new PrimitiveTypeMoniker((PrimitiveType) typeMirror);
- else if (typeMirror.getKind().equals(TypeKind.ARRAY))
- return new ArrayTypeMoniker((ArrayType) typeMirror);
- else if (typeMirror.getKind().equals(TypeKind.DECLARED))
- return new DeclaredTypeMoniker((DeclaredType) typeMirror);
- return getTypeMoniker(typeMirror.toString());
- }
-
- public static TypeMoniker getTypeMoniker(String typeName) {
- return new StringMoniker(typeName);
- }
-
- static class ArrayTypeMoniker implements TypeMoniker {
- private TypeMoniker arrayType;
-
- public ArrayTypeMoniker(ArrayType type) {
- arrayType = TypeMonikerFactory.getTypeMoniker(type.getComponentType());
- }
-
- public TypeMirror create(ProcessingEnvironment apEnv) {
- return apEnv.getTypeUtils().getArrayType(arrayType.create(apEnv));
- }
- }
- static class DeclaredTypeMoniker implements TypeMoniker {
- private Name typeDeclName;
- private Collection<TypeMoniker> typeArgs = new ArrayList<TypeMoniker>();
-
- public DeclaredTypeMoniker(DeclaredType type) {
- typeDeclName = ((TypeElement) type.asElement()).getQualifiedName();
- for (TypeMirror arg : type.getTypeArguments())
- typeArgs.add(TypeMonikerFactory.getTypeMoniker(arg));
- }
-
- public TypeMirror create(ProcessingEnvironment apEnv) {
- TypeElement typeDecl = apEnv.getElementUtils().getTypeElement(typeDeclName);
- TypeMirror[] tmpArgs = new TypeMirror[typeArgs.size()];
- int idx = 0;
- for (TypeMoniker moniker : typeArgs)
- tmpArgs[idx++] = moniker.create(apEnv);
-
- return apEnv.getTypeUtils().getDeclaredType(typeDecl, tmpArgs);
- }
- }
- static class PrimitiveTypeMoniker implements TypeMoniker {
- private TypeKind kind;
-
- public PrimitiveTypeMoniker(PrimitiveType type) {
- kind = type.getKind();
- }
-
- public TypeMirror create(ProcessingEnvironment apEnv) {
- return apEnv.getTypeUtils().getPrimitiveType(kind);
- }
- }
- static class StringMoniker implements TypeMoniker {
- private String typeName;
-
- public StringMoniker(String typeName) {
- this.typeName = typeName;
- }
-
- public TypeMirror create(ProcessingEnvironment apEnv) {
- return apEnv.getTypeUtils().getDeclaredType(apEnv.getElementUtils().getTypeElement(typeName));
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceAp.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceAp.java
deleted file mode 100644
index 233f0c32..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceAp.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
- * Copyright (c) 2010, 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.tools.internal.ws.processor.modeler.annotation;
-
-import com.sun.istack.internal.logging.Logger;
-import com.sun.tools.internal.ws.processor.generator.GeneratorUtil;
-import com.sun.tools.internal.ws.processor.modeler.ModelerException;
-import com.sun.tools.internal.ws.resources.WebserviceapMessages;
-import com.sun.tools.internal.ws.wscompile.AbortException;
-import com.sun.tools.internal.ws.wscompile.WsgenOptions;
-
-import javax.annotation.processing.AbstractProcessor;
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.annotation.processing.RoundEnvironment;
-import javax.annotation.processing.SupportedAnnotationTypes;
-import javax.annotation.processing.SupportedOptions;
-import javax.jws.WebService;
-import javax.lang.model.SourceVersion;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ElementKind;
-import javax.lang.model.element.Name;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.type.TypeMirror;
-import javax.lang.model.util.ElementFilter;
-import javax.tools.Diagnostic;
-import javax.xml.ws.Holder;
-import javax.xml.ws.WebServiceProvider;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.PrintStream;
-import java.lang.reflect.Method;
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Scanner;
-import java.util.Set;
-import java.util.logging.Level;
-
-/**
- * WebServiceAp is a AnnotationProcessor for processing javax.jws.* and
- * javax.xml.ws.* annotations. This class is used either by the WsGen (CompileTool) tool or
- * indirectly when invoked by javac.
- *
- * @author WS Development Team
- */
-@SupportedAnnotationTypes({
- "javax.jws.HandlerChain",
- "javax.jws.Oneway",
- "javax.jws.WebMethod",
- "javax.jws.WebParam",
- "javax.jws.WebResult",
- "javax.jws.WebService",
- "javax.jws.soap.InitParam",
- "javax.jws.soap.SOAPBinding",
- "javax.jws.soap.SOAPMessageHandler",
- "javax.jws.soap.SOAPMessageHandlers",
- "javax.xml.ws.BindingType",
- "javax.xml.ws.RequestWrapper",
- "javax.xml.ws.ResponseWrapper",
- "javax.xml.ws.ServiceMode",
- "javax.xml.ws.WebEndpoint",
- "javax.xml.ws.WebFault",
- "javax.xml.ws.WebServiceClient",
- "javax.xml.ws.WebServiceProvider",
- "javax.xml.ws.WebServiceRef"
-})
-@SupportedOptions({WebServiceAp.DO_NOT_OVERWRITE, WebServiceAp.IGNORE_NO_WEB_SERVICE_FOUND_WARNING})
-public class WebServiceAp extends AbstractProcessor implements ModelBuilder {
-
- private static final Logger LOGGER = Logger.getLogger(WebServiceAp.class);
-
- public static final String DO_NOT_OVERWRITE = "doNotOverWrite";
- public static final String IGNORE_NO_WEB_SERVICE_FOUND_WARNING = "ignoreNoWebServiceFoundWarning";
-
- private WsgenOptions options;
- protected AnnotationProcessorContext context;
- private File sourceDir;
- private boolean doNotOverWrite;
- private boolean ignoreNoWebServiceFoundWarning = false;
- private TypeElement remoteElement;
- private TypeMirror remoteExceptionElement;
- private TypeMirror exceptionElement;
- private TypeMirror runtimeExceptionElement;
- private TypeElement defHolderElement;
- private boolean isCommandLineInvocation;
- private PrintStream out;
- private Collection<TypeElement> processedTypeElements = new HashSet<TypeElement>();
-
- public WebServiceAp() {
- this.context = new AnnotationProcessorContext();
- }
-
- public WebServiceAp(WsgenOptions options, PrintStream out) {
- this.options = options;
- this.sourceDir = (options != null) ? options.sourceDir : null;
- this.doNotOverWrite = (options != null) && options.doNotOverWrite;
- this.context = new AnnotationProcessorContext();
- this.out = out;
- }
-
- @Override
- public synchronized void init(ProcessingEnvironment processingEnv) {
- super.init(processingEnv);
- remoteElement = processingEnv.getElementUtils().getTypeElement(Remote.class.getName());
- remoteExceptionElement = processingEnv.getElementUtils().getTypeElement(RemoteException.class.getName()).asType();
- exceptionElement = processingEnv.getElementUtils().getTypeElement(Exception.class.getName()).asType();
- runtimeExceptionElement = processingEnv.getElementUtils().getTypeElement(RuntimeException.class.getName()).asType();
- defHolderElement = processingEnv.getElementUtils().getTypeElement(Holder.class.getName());
- if (options == null) {
- options = new WsgenOptions();
-
- out = new PrintStream(new ByteArrayOutputStream());
-
- doNotOverWrite = getOption(DO_NOT_OVERWRITE);
- ignoreNoWebServiceFoundWarning = getOption(IGNORE_NO_WEB_SERVICE_FOUND_WARNING);
-
- String classDir = parseArguments();
- String property = System.getProperty("java.class.path");
- options.classpath = classDir + File.pathSeparator + (property != null ? property : "");
- isCommandLineInvocation = true;
- }
- options.filer = processingEnv.getFiler();
- }
-
- private String parseArguments() {
- // let's try to parse JavacOptions
-
- String classDir = null;
- try {
- ClassLoader cl = WebServiceAp.class.getClassLoader();
- Class javacProcessingEnvironmentClass = Class.forName("com.sun.tools.javac.processing.JavacProcessingEnvironment", false, cl);
- if (javacProcessingEnvironmentClass.isInstance(processingEnv)) {
- Method getContextMethod = javacProcessingEnvironmentClass.getDeclaredMethod("getContext");
- Object tmpContext = getContextMethod.invoke(processingEnv);
- Class optionsClass = Class.forName("com.sun.tools.javac.util.Options", false, cl);
- Class contextClass = Class.forName("com.sun.tools.javac.util.Context", false, cl);
- Method instanceMethod = optionsClass.getDeclaredMethod("instance", new Class[]{contextClass});
- Object tmpOptions = instanceMethod.invoke(null, tmpContext);
- if (tmpOptions != null) {
- Method getMethod = optionsClass.getDeclaredMethod("get", new Class[]{String.class});
- Object result = getMethod.invoke(tmpOptions, "-s"); // todo: we have to check for -d also
- if (result != null) {
- classDir = (String) result;
- }
- this.options.verbose = getMethod.invoke(tmpOptions, "-verbose") != null;
- }
- }
- } catch (Exception e) {
- /// some Error was here - problems with reflection or security
- processWarning(WebserviceapMessages.WEBSERVICEAP_PARSING_JAVAC_OPTIONS_ERROR());
- report(e.getMessage());
- }
-
- if (classDir == null) { // some error within reflection block
- String property = System.getProperty("sun.java.command");
- if (property != null) {
- Scanner scanner = new Scanner(property);
- boolean sourceDirNext = false;
- while (scanner.hasNext()) {
- String token = scanner.next();
- if (sourceDirNext) {
- classDir = token;
- sourceDirNext = false;
- } else if ("-verbose".equals(token)) {
- options.verbose = true;
- } else if ("-s".equals(token)) {
- sourceDirNext = true;
- }
- }
- }
- }
- if (classDir != null) {
- sourceDir = new File(classDir);
- }
- return classDir;
- }
-
- private boolean getOption(String key) {
- String value = processingEnv.getOptions().get(key);
- if (value != null) {
- return Boolean.valueOf(value);
- }
- return false;
- }
-
- @Override
- public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
- if (context.getRound() != 1) {
- return true;
- }
- context.incrementRound();
- WebService webService;
- WebServiceProvider webServiceProvider;
- WebServiceVisitor webServiceVisitor = new WebServiceWrapperGenerator(this, context);
- boolean processedEndpoint = false;
- Collection<TypeElement> classes = new ArrayList<TypeElement>();
- filterClasses(classes, roundEnv.getRootElements());
- for (TypeElement element : classes) {
- webServiceProvider = element.getAnnotation(WebServiceProvider.class);
- webService = element.getAnnotation(WebService.class);
- if (webServiceProvider != null) {
- if (webService != null) {
- processError(WebserviceapMessages.WEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(element.getQualifiedName()));
- }
- processedEndpoint = true;
- }
-
- if (webService == null) {
- continue;
- }
-
- element.accept(webServiceVisitor, null);
- processedEndpoint = true;
- }
- if (!processedEndpoint) {
- if (isCommandLineInvocation) {
- if (!ignoreNoWebServiceFoundWarning) {
- processWarning(WebserviceapMessages.WEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND());
- }
- } else {
- processError(WebserviceapMessages.WEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND());
- }
- }
- return true;
- }
-
- private void filterClasses(Collection<TypeElement> classes, Collection<? extends Element> elements) {
- for (Element element : elements) {
- if (element.getKind().equals(ElementKind.CLASS)) {
- classes.add((TypeElement) element);
- filterClasses(classes, ElementFilter.typesIn(element.getEnclosedElements()));
- }
- }
- }
-
- @Override
- public void processWarning(String message) {
- if (isCommandLineInvocation) {
- processingEnv.getMessager().printMessage(Diagnostic.Kind.WARNING, message);
- } else {
- report(message);
- }
- }
-
- protected void report(String msg) {
- if (out == null) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "No output set for web service annotation processor reporting.");
- }
- return;
- }
- out.println(msg);
- out.flush();
- }
-
- @Override
- public void processError(String message) {
- if (isCommandLineInvocation) {
- processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, message);
- throw new AbortException();
- } else {
- throw new ModelerException(message);
- }
- }
-
- @Override
- public void processError(String message, Element element) {
- if (isCommandLineInvocation) {
- processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, message, element);
- } else {
- throw new ModelerException(message);
- }
- }
-
- @Override
- public boolean canOverWriteClass(String className) {
- return !((doNotOverWrite && GeneratorUtil.classExists(options, className)));
- }
-
- @Override
- public File getSourceDir() {
- return sourceDir;
- }
-
- @Override
- public boolean isRemote(TypeElement typeElement) {
- return processingEnv.getTypeUtils().isSubtype(typeElement.asType(), remoteElement.asType());
- }
-
- @Override
- public boolean isServiceException(TypeMirror typeMirror) {
- return processingEnv.getTypeUtils().isSubtype(typeMirror, exceptionElement)
- && !processingEnv.getTypeUtils().isSubtype(typeMirror, runtimeExceptionElement)
- && !processingEnv.getTypeUtils().isSubtype(typeMirror, remoteExceptionElement);
- }
-
- @Override
- public TypeMirror getHolderValueType(TypeMirror type) {
- return TypeModeler.getHolderValueType(type, defHolderElement, processingEnv);
- }
-
- @Override
- public boolean checkAndSetProcessed(TypeElement typeElement) {
- if (!processedTypeElements.contains(typeElement)) {
- processedTypeElements.add(typeElement);
- return false;
- }
- return true;
- }
-
- @Override
- public void log(String message) {
- if (options != null && options.verbose) {
- message = new StringBuilder().append('[').append(message).append(']').toString(); // "[%s]"
- processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, message);
- }
- }
-
- @Override
- public WsgenOptions getOptions() {
- return options;
- }
-
- @Override
- public ProcessingEnvironment getProcessingEnvironment() {
- return processingEnv;
- }
-
- @Override
- public String getOperationName(Name messageName) {
- return messageName != null ? messageName.toString() : null;
- }
-
- @Override
- public SourceVersion getSupportedSourceVersion() {
- return SourceVersion.latest();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceConstants.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceConstants.java
deleted file mode 100644
index 0818c799..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceConstants.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler.annotation;
-
-/**
- * @author dkohlert
- */
-public enum WebServiceConstants {
-
- SERVICE("Service"),
-
- JAXWS_PACKAGE_PD("jaxws."),
-
- PD_JAXWS_PACKAGE_PD(".jaxws."),
-
- BEAN("Bean"),
-
- FAULT_INFO("faultInfo"),
-
- RESPONSE("Response");
-
- private String value;
-
- private WebServiceConstants(String value) {
- this.value = value;
- }
-
- public String getValue() {
- return value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceVisitor.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceVisitor.java
deleted file mode 100644
index 26c868d7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceVisitor.java
+++ /dev/null
@@ -1,870 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.processor.modeler.annotation;
-
-import com.sun.tools.internal.ws.processor.model.Port;
-import com.sun.tools.internal.ws.resources.WebserviceapMessages;
-import com.sun.tools.internal.ws.util.ClassNameInfo;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle;
-import com.sun.xml.internal.ws.model.RuntimeModeler;
-
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.jws.Oneway;
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ElementKind;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.Modifier;
-import javax.lang.model.element.Name;
-import javax.lang.model.element.PackageElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-import javax.lang.model.type.DeclaredType;
-import javax.lang.model.type.NoType;
-import javax.lang.model.type.TypeKind;
-import javax.lang.model.type.TypeMirror;
-import javax.lang.model.util.ElementFilter;
-import javax.lang.model.util.SimpleElementVisitor6;
-import javax.lang.model.util.SimpleTypeVisitor6;
-import javax.lang.model.util.Types;
-import java.lang.annotation.Annotation;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.Stack;
-
-/**
- * @author WS Development Team
- */
-public abstract class WebServiceVisitor extends SimpleElementVisitor6<Void, Object> {
-
- protected ModelBuilder builder;
- protected String wsdlNamespace;
- protected String typeNamespace;
- protected Stack<SOAPBinding> soapBindingStack;
- protected SOAPBinding typeElementSoapBinding;
- protected SOAPStyle soapStyle = SOAPStyle.DOCUMENT;
- protected boolean wrapped = true;
- protected Port port;
- protected Name serviceImplName;
- protected Name endpointInterfaceName;
- protected AnnotationProcessorContext context;
- protected AnnotationProcessorContext.SeiContext seiContext;
- protected boolean processingSei = false;
- protected String serviceName;
- protected Name packageName;
- protected String portName;
- protected boolean endpointReferencesInterface = false;
- protected boolean hasWebMethods = false;
- protected TypeElement typeElement;
- protected Set<String> processedMethods;
- protected boolean pushedSoapBinding = false;
-
- private static final NoTypeVisitor NO_TYPE_VISITOR = new NoTypeVisitor();
-
- public WebServiceVisitor(ModelBuilder builder, AnnotationProcessorContext context) {
- this.builder = builder;
- this.context = context;
- soapBindingStack = new Stack<SOAPBinding>();
- processedMethods = new HashSet<String>();
- }
-
- @Override
- public Void visitType(TypeElement e, Object o) {
- WebService webService = e.getAnnotation(WebService.class);
- if (!shouldProcessWebService(webService, e))
- return null;
- if (builder.checkAndSetProcessed(e))
- return null;
- typeElement = e;
-
- switch (e.getKind()) {
- case INTERFACE: {
- if (endpointInterfaceName != null && !endpointInterfaceName.equals(e.getQualifiedName())) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(endpointInterfaceName, e.getQualifiedName()), e);
- }
- verifySeiAnnotations(webService, e);
- endpointInterfaceName = e.getQualifiedName();
- processingSei = true;
- preProcessWebService(webService, e);
- processWebService(webService, e);
- postProcessWebService(webService, e);
- break;
- }
- case CLASS: {
- typeElementSoapBinding = e.getAnnotation(SOAPBinding.class);
- if (serviceImplName == null)
- serviceImplName = e.getQualifiedName();
- String endpointInterfaceName = webService != null ? webService.endpointInterface() : null;
- if (endpointInterfaceName != null && endpointInterfaceName.length() > 0) {
- checkForInvalidImplAnnotation(e, SOAPBinding.class);
- if (webService.name().length() > 0)
- builder.processError(WebserviceapMessages.WEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT("name"), e);
- endpointReferencesInterface = true;
- verifyImplAnnotations(e);
- inspectEndpointInterface(endpointInterfaceName, e);
- serviceImplName = null;
- return null;
- }
- processingSei = false;
- preProcessWebService(webService, e);
- processWebService(webService, e);
- serviceImplName = null;
- postProcessWebService(webService, e);
- serviceImplName = null;
- break;
- }
- default:
- break;
- }
- return null;
- }
-
- protected void verifySeiAnnotations(WebService webService, TypeElement d) {
- if (webService.endpointInterface().length() > 0) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_ENDPOINTINTERFACE_ON_INTERFACE(
- d.getQualifiedName(), webService.endpointInterface()), d);
- }
- if (webService.serviceName().length() > 0) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(
- "serviceName", d.getQualifiedName()), d);
- }
- if (webService.portName().length() > 0) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(
- "portName", d.getQualifiedName()), d);
- }
- }
-
- protected void verifyImplAnnotations(TypeElement d) {
- for (ExecutableElement method : ElementFilter.methodsIn(d.getEnclosedElements())) {
- checkForInvalidImplAnnotation(method, WebMethod.class);
- checkForInvalidImplAnnotation(method, Oneway.class);
- checkForInvalidImplAnnotation(method, WebResult.class);
- for (VariableElement param : method.getParameters()) {
- checkForInvalidImplAnnotation(param, WebParam.class);
- }
- }
- }
-
- protected void checkForInvalidSeiAnnotation(TypeElement element, Class annotationClass) {
- Object annotation = element.getAnnotation(annotationClass);
- if (annotation != null) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_SEI_ANNOTATION(
- annotationClass.getName(), element.getQualifiedName()), element);
- }
- }
-
- protected void checkForInvalidImplAnnotation(Element element, Class annotationClass) {
- Object annotation = element.getAnnotation(annotationClass);
- if (annotation != null) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(annotationClass.getName()), element);
- }
- }
-
- protected void preProcessWebService(WebService webService, TypeElement element) {
- processedMethods = new HashSet<String>();
- seiContext = context.getSeiContext(element);
- String targetNamespace = null;
- if (webService != null)
- targetNamespace = webService.targetNamespace();
- PackageElement packageElement = builder.getProcessingEnvironment().getElementUtils().getPackageOf(element);
- if (targetNamespace == null || targetNamespace.length() == 0) {
- String packageName = packageElement.getQualifiedName().toString();
- if (packageName == null || packageName.length() == 0) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(
- element.getQualifiedName()), element);
- }
- targetNamespace = RuntimeModeler.getNamespace(packageName);
- }
- seiContext.setNamespaceUri(targetNamespace);
- if (serviceImplName == null)
- serviceImplName = seiContext.getSeiImplName();
- if (serviceImplName != null) {
- seiContext.setSeiImplName(serviceImplName);
- context.addSeiContext(serviceImplName, seiContext);
- }
- portName = ClassNameInfo.getName(element.getSimpleName().toString().replace('$', '_'));
- packageName = packageElement.getQualifiedName();
- portName = webService != null && webService.name() != null && webService.name().length() > 0 ?
- webService.name() : portName;
- serviceName = ClassNameInfo.getName(element.getQualifiedName().toString()) + WebServiceConstants.SERVICE.getValue();
- serviceName = webService != null && webService.serviceName() != null && webService.serviceName().length() > 0 ?
- webService.serviceName() : serviceName;
- wsdlNamespace = seiContext.getNamespaceUri();
- typeNamespace = wsdlNamespace;
-
- SOAPBinding soapBinding = element.getAnnotation(SOAPBinding.class);
- if (soapBinding != null) {
- pushedSoapBinding = pushSoapBinding(soapBinding, element, element);
- } else if (element.equals(typeElement)) {
- pushedSoapBinding = pushSoapBinding(new MySoapBinding(), element, element);
- }
- }
-
- public static boolean sameStyle(SOAPBinding.Style style, SOAPStyle soapStyle) {
- return style.equals(SOAPBinding.Style.DOCUMENT)
- && soapStyle.equals(SOAPStyle.DOCUMENT)
- || style.equals(SOAPBinding.Style.RPC)
- && soapStyle.equals(SOAPStyle.RPC);
- }
-
- protected boolean pushSoapBinding(SOAPBinding soapBinding, Element bindingElement, TypeElement classElement) {
- boolean changed = false;
- if (!sameStyle(soapBinding.style(), soapStyle)) {
- changed = true;
- if (pushedSoapBinding)
- builder.processError(WebserviceapMessages.WEBSERVICEAP_MIXED_BINDING_STYLE(
- classElement.getQualifiedName()), bindingElement);
- }
- if (soapBinding.style().equals(SOAPBinding.Style.RPC)) {
- soapStyle = SOAPStyle.RPC;
- wrapped = true;
- if (soapBinding.parameterStyle().equals(ParameterStyle.BARE)) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(
- classElement.getQualifiedName()), bindingElement);
- }
- } else {
- soapStyle = SOAPStyle.DOCUMENT;
- if (wrapped != soapBinding.parameterStyle().equals(ParameterStyle.WRAPPED)) {
- wrapped = soapBinding.parameterStyle().equals(ParameterStyle.WRAPPED);
- changed = true;
- }
- }
- if (soapBinding.use().equals(SOAPBinding.Use.ENCODED)) {
- String style = "rpc";
- if (soapBinding.style().equals(SOAPBinding.Style.DOCUMENT))
- style = "document";
- builder.processError(WebserviceapMessages.WEBSERVICE_ENCODED_NOT_SUPPORTED(
- classElement.getQualifiedName(), style), bindingElement);
- }
- if (changed || soapBindingStack.empty()) {
- soapBindingStack.push(soapBinding);
- pushedSoapBinding = true;
- }
- return changed;
- }
-
- protected SOAPBinding popSoapBinding() {
- if (pushedSoapBinding)
- soapBindingStack.pop();
- SOAPBinding soapBinding = null;
- if (!soapBindingStack.empty()) {
- soapBinding = soapBindingStack.peek();
- if (soapBinding.style().equals(SOAPBinding.Style.RPC)) {
- soapStyle = SOAPStyle.RPC;
- wrapped = true;
- } else {
- soapStyle = SOAPStyle.DOCUMENT;
- wrapped = soapBinding.parameterStyle().equals(ParameterStyle.WRAPPED);
- }
- } else {
- pushedSoapBinding = false;
- }
- return soapBinding;
- }
-
- protected String getNamespace(PackageElement packageElement) {
- return RuntimeModeler.getNamespace(packageElement.getQualifiedName().toString());
- }
-
- protected boolean shouldProcessWebService(WebService webService, TypeElement element) {
- switch (element.getKind()) {
- case INTERFACE: {
- hasWebMethods = false;
- if (webService == null)
- builder.processError(WebserviceapMessages.WEBSERVICEAP_ENDPOINTINTERFACE_HAS_NO_WEBSERVICE_ANNOTATION(
- element.getQualifiedName()), element);
-
- SOAPBinding soapBinding = element.getAnnotation(SOAPBinding.class);
- if (soapBinding != null
- && soapBinding.style() == SOAPBinding.Style.RPC
- && soapBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_SOAPBINDING_PARAMETERSTYLE(
- soapBinding, element), element);
- return false;
- }
- return isLegalSei(element);
- }
- case CLASS: {
- if (webService == null)
- return false;
- hasWebMethods = hasWebMethods(element);
- SOAPBinding soapBinding = element.getAnnotation(SOAPBinding.class);
- if (soapBinding != null
- && soapBinding.style() == SOAPBinding.Style.RPC
- && soapBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_SOAPBINDING_PARAMETERSTYLE(
- soapBinding, element), element);
- return false;
- }
- return isLegalImplementation(webService, element);
- }
- default: {
- throw new IllegalArgumentException("Class or Interface was expecting. But element: " + element);
- }
- }
- }
-
- abstract protected void processWebService(WebService webService, TypeElement element);
-
- protected void postProcessWebService(WebService webService, TypeElement element) {
- processMethods(element);
- popSoapBinding();
- }
-
- protected boolean hasWebMethods(TypeElement element) {
- if (element.getQualifiedName().toString().equals(Object.class.getName()))
- return false;
- WebMethod webMethod;
- for (ExecutableElement method : ElementFilter.methodsIn(element.getEnclosedElements())) {
- webMethod = method.getAnnotation(WebMethod.class);
- if (webMethod != null) {
- if (webMethod.exclude()) {
- if (webMethod.operationName().length() > 0)
- builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(
- "operationName", element.getQualifiedName(), method.toString()), method);
- if (webMethod.action().length() > 0)
- builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(
- "action", element.getQualifiedName(), method.toString()), method);
- } else {
- return true;
- }
- }
- }
- return false;//hasWebMethods(d.getSuperclass().getDeclaration());
- }
-
- protected void processMethods(TypeElement element) {
- switch (element.getKind()) {
- case INTERFACE: {
- builder.log("ProcessedMethods Interface: " + element);
- hasWebMethods = false;
- for (ExecutableElement method : ElementFilter.methodsIn(element.getEnclosedElements())) {
- method.accept(this, null);
- }
- for (TypeMirror superType : element.getInterfaces())
- processMethods((TypeElement) ((DeclaredType) superType).asElement());
- break;
- }
- case CLASS: {
- builder.log("ProcessedMethods Class: " + element);
- hasWebMethods = hasWebMethods(element);
- if (element.getQualifiedName().toString().equals(Object.class.getName()))
- return;
- if (element.getAnnotation(WebService.class) != null) {
- // Super classes must have @WebService annotations to pick up their methods
- for (ExecutableElement method : ElementFilter.methodsIn(element.getEnclosedElements())) {
- method.accept(this, null);
- }
- }
- TypeMirror superclass = element.getSuperclass();
- if (!superclass.getKind().equals(TypeKind.NONE)) {
- processMethods((TypeElement) ((DeclaredType) superclass).asElement());
- }
- break;
- }
- default:
- break;
- }
- }
-
- private TypeElement getEndpointInterfaceElement(String endpointInterfaceName, TypeElement element) {
- TypeElement intTypeElement = null;
- for (TypeMirror interfaceType : element.getInterfaces()) {
- if (endpointInterfaceName.equals(interfaceType.toString())) {
- intTypeElement = (TypeElement) ((DeclaredType) interfaceType).asElement();
- seiContext = context.getSeiContext(intTypeElement.getQualifiedName());
- assert (seiContext != null);
- seiContext.setImplementsSei(true);
- break;
- }
- }
- if (intTypeElement == null) {
- intTypeElement = builder.getProcessingEnvironment().getElementUtils().getTypeElement(endpointInterfaceName);
- }
- if (intTypeElement == null)
- builder.processError(WebserviceapMessages.WEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(endpointInterfaceName));
- return intTypeElement;
- }
-
- private void inspectEndpointInterface(String endpointInterfaceName, TypeElement d) {
- TypeElement intTypeElement = getEndpointInterfaceElement(endpointInterfaceName, d);
- if (intTypeElement != null)
- intTypeElement.accept(this, null);
- }
-
- @Override
- public Void visitExecutable(ExecutableElement method, Object o) {
- // Methods must be public
- if (!method.getModifiers().contains(Modifier.PUBLIC))
- return null;
- if (processedMethod(method))
- return null;
- WebMethod webMethod = method.getAnnotation(WebMethod.class);
- if (webMethod != null && webMethod.exclude())
- return null;
- SOAPBinding soapBinding = method.getAnnotation(SOAPBinding.class);
- if (soapBinding == null && !method.getEnclosingElement().equals(typeElement)) {
- if (method.getEnclosingElement().getKind().equals(ElementKind.CLASS)) {
- soapBinding = method.getEnclosingElement().getAnnotation(SOAPBinding.class);
- if (soapBinding != null)
- builder.log("using " + method.getEnclosingElement() + "'s SOAPBinding.");
- else {
- soapBinding = new MySoapBinding();
- }
- }
- }
- boolean newBinding = false;
- if (soapBinding != null) {
- newBinding = pushSoapBinding(soapBinding, method, typeElement);
- }
- try {
- if (shouldProcessMethod(method, webMethod)) {
- processMethod(method, webMethod);
- }
- } finally {
- if (newBinding) {
- popSoapBinding();
- }
- }
- return null;
- }
-
- protected boolean processedMethod(ExecutableElement method) {
- String id = method.toString();
- if (processedMethods.contains(id))
- return true;
- processedMethods.add(id);
- return false;
- }
-
- protected boolean shouldProcessMethod(ExecutableElement method, WebMethod webMethod) {
- builder.log("should process method: " + method.getSimpleName() + " hasWebMethods: " + hasWebMethods + " ");
- /*
- Fix for https://jax-ws.dev.java.net/issues/show_bug.cgi?id=577
- if (hasWebMethods && webMethod == null) {
- builder.log("webMethod == null");
- return false;
- }
- */
- Collection<Modifier> modifiers = method.getModifiers();
- boolean staticFinal = modifiers.contains(Modifier.STATIC) || modifiers.contains(Modifier.FINAL);
- if (staticFinal) {
- if (webMethod != null) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_WEBSERVICE_METHOD_IS_STATIC_OR_FINAL(method.getEnclosingElement(),
- method), method);
- }
- return false;
- }
- boolean result = (endpointReferencesInterface ||
- method.getEnclosingElement().equals(typeElement) ||
- (method.getEnclosingElement().getAnnotation(WebService.class) != null));
- builder.log("endpointReferencesInterface: " + endpointReferencesInterface);
- builder.log("declaring class has WebService: " + (method.getEnclosingElement().getAnnotation(WebService.class) != null));
- builder.log("returning: " + result);
- return result;
- }
-
- abstract protected void processMethod(ExecutableElement method, WebMethod webMethod);
-
- protected boolean isLegalImplementation(WebService webService, TypeElement classElement) {
- boolean isStateful = isStateful(classElement);
-
- Collection<Modifier> modifiers = classElement.getModifiers();
- if (!modifiers.contains(Modifier.PUBLIC)) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(classElement.getQualifiedName()), classElement);
- return false;
- }
- if (modifiers.contains(Modifier.FINAL) && !isStateful) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(classElement.getQualifiedName()), classElement);
- return false;
- }
- if (modifiers.contains(Modifier.ABSTRACT) && !isStateful) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(classElement.getQualifiedName()), classElement);
- return false;
- }
- boolean hasDefaultConstructor = false;
- for (ExecutableElement constructor : ElementFilter.constructorsIn(classElement.getEnclosedElements())) {
- if (constructor.getModifiers().contains(Modifier.PUBLIC) &&
- constructor.getParameters().isEmpty()) {
- hasDefaultConstructor = true;
- break;
- }
- }
- if (!hasDefaultConstructor && !isStateful) {
- if (classElement.getEnclosingElement() != null && !modifiers.contains(Modifier.STATIC)) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(
- classElement.getQualifiedName()), classElement);
- return false;
- }
-
- builder.processError(WebserviceapMessages.WEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(
- classElement.getQualifiedName()), classElement);
- return false;
- }
- if (webService.endpointInterface().isEmpty()) {
- if (!methodsAreLegal(classElement))
- return false;
- } else {
- TypeElement interfaceElement = getEndpointInterfaceElement(webService.endpointInterface(), classElement);
- if (!classImplementsSei(classElement, interfaceElement))
- return false;
- }
-
- return true;
- }
-
- private boolean isStateful(TypeElement classElement) {
- try {
- // We don't want dependency on rt-ha module as its not integrated in JDK
- return classElement.getAnnotation((Class<? extends Annotation>) Class.forName("com.sun.xml.internal.ws.developer.Stateful")) != null;
- } catch (ClassNotFoundException e) {
- //ignore
- }
- return false;
- }
-
- protected boolean classImplementsSei(TypeElement classElement, TypeElement interfaceElement) {
- for (TypeMirror interfaceType : classElement.getInterfaces()) {
- if (((DeclaredType) interfaceType).asElement().equals(interfaceElement))
- return true;
- }
- List<ExecutableElement> classMethods = getClassMethods(classElement);
- boolean implementsMethod;
- for (ExecutableElement interfaceMethod : ElementFilter.methodsIn(interfaceElement.getEnclosedElements())) {
- implementsMethod = false;
- for (ExecutableElement classMethod : classMethods) {
- if (sameMethod(interfaceMethod, classMethod)) {
- implementsMethod = true;
- classMethods.remove(classMethod);
- break;
- }
- }
- if (!implementsMethod) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_METHOD_NOT_IMPLEMENTED(interfaceElement.getSimpleName(), classElement.getSimpleName(), interfaceMethod), interfaceMethod);
- return false;
- }
- }
- return true;
- }
-
- private static List<ExecutableElement> getClassMethods(TypeElement classElement) {
- if (classElement.getQualifiedName().toString().equals(Object.class.getName())) // we don't need Object's methods
- return null;
- TypeElement superclassElement = (TypeElement) ((DeclaredType) classElement.getSuperclass()).asElement();
- List<ExecutableElement> superclassesMethods = getClassMethods(superclassElement);
- List<ExecutableElement> classMethods = ElementFilter.methodsIn(classElement.getEnclosedElements());
- if (superclassesMethods == null)
- return classMethods;
- else
- superclassesMethods.addAll(classMethods);
- return superclassesMethods;
- }
-
- protected boolean sameMethod(ExecutableElement method1, ExecutableElement method2) {
- if (!method1.getSimpleName().equals(method2.getSimpleName()))
- return false;
- Types typeUtils = builder.getProcessingEnvironment().getTypeUtils();
- if(!typeUtils.isSameType(method1.getReturnType(), method2.getReturnType())
- && !typeUtils.isSubtype(method2.getReturnType(), method1.getReturnType()))
- return false;
- List<? extends VariableElement> parameters1 = method1.getParameters();
- List<? extends VariableElement> parameters2 = method2.getParameters();
- if (parameters1.size() != parameters2.size())
- return false;
- for (int i = 0; i < parameters1.size(); i++) {
- if (!typeUtils.isSameType(parameters1.get(i).asType(), parameters2.get(i).asType()))
- return false;
- }
- return true;
- }
-
- protected boolean isLegalSei(TypeElement interfaceElement) {
- for (VariableElement field : ElementFilter.fieldsIn(interfaceElement.getEnclosedElements()))
- if (field.getConstantValue() != null) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(
- interfaceElement.getQualifiedName(), field.getSimpleName()));
- return false;
- }
- return methodsAreLegal(interfaceElement);
- }
-
- protected boolean methodsAreLegal(TypeElement element) {
- switch (element.getKind()) {
- case INTERFACE: {
- hasWebMethods = false;
- for (ExecutableElement method : ElementFilter.methodsIn(element.getEnclosedElements())) {
- if (!isLegalMethod(method, element))
- return false;
- }
- for (TypeMirror superInterface : element.getInterfaces()) {
- if (!methodsAreLegal((TypeElement) ((DeclaredType) superInterface).asElement()))
- return false;
- }
- return true;
- }
- case CLASS: {
- hasWebMethods = hasWebMethods(element);
- for (ExecutableElement method : ElementFilter.methodsIn(element.getEnclosedElements())) {
- if (!method.getModifiers().contains(Modifier.PUBLIC))
- continue; // let's validate only public methods
- if (!isLegalMethod(method, element))
- return false;
- }
- DeclaredType superClass = (DeclaredType) element.getSuperclass();
-
- TypeElement tE = (TypeElement) superClass.asElement();
- return tE.getQualifiedName().toString().equals(Object.class.getName())
- || methodsAreLegal(tE);
- }
- default: {
- throw new IllegalArgumentException("Class or interface was expecting. But element: " + element);
- }
- }
- }
-
- protected boolean isLegalMethod(ExecutableElement method, TypeElement typeElement) {
- WebMethod webMethod = method.getAnnotation(WebMethod.class);
- //SEI cannot have methods with @WebMethod(exclude=true)
- if (typeElement.getKind().equals(ElementKind.INTERFACE) && webMethod != null && webMethod.exclude())
- builder.processError(WebserviceapMessages.WEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE("exclude=true", typeElement.getQualifiedName(), method.toString()), method);
- // With https://jax-ws.dev.java.net/issues/show_bug.cgi?id=577, hasWebMethods has no effect
- if (hasWebMethods && webMethod == null) // backwards compatibility (for legacyWebMethod computation)
- return true;
-
- if ((webMethod != null) && webMethod.exclude()) {
- return true;
- }
- /*
- This check is not needed as Impl class is already checked that it is not abstract.
- if (typeElement instanceof TypeElement && method.getModifiers().contains(Modifier.ABSTRACT)) { // use Kind.equals instead of instanceOf
- builder.processError(method.getPosition(), WebserviceapMessages.WEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(typeElement.getQualifiedName(), method.getSimpleName()));
- return false;
- }
- */
- TypeMirror returnType = method.getReturnType();
- if (!isLegalType(returnType)) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(typeElement.getQualifiedName(),
- method.getSimpleName(),
- returnType), method);
- }
- boolean isOneWay = method.getAnnotation(Oneway.class) != null;
- if (isOneWay && !isValidOneWayMethod(method, typeElement))
- return false;
-
- SOAPBinding soapBinding = method.getAnnotation(SOAPBinding.class);
- if (soapBinding != null) {
- if (soapBinding.style().equals(SOAPBinding.Style.RPC)) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(typeElement.getQualifiedName(), method.toString()), method);
- }
- }
-
- int paramIndex = 0;
- for (VariableElement parameter : method.getParameters()) {
- if (!isLegalParameter(parameter, method, typeElement, paramIndex++))
- return false;
- }
-
- if (!isDocLitWrapped() && soapStyle.equals(SOAPStyle.DOCUMENT)) {
- VariableElement outParam = getOutParameter(method);
- int inParams = getModeParameterCount(method, WebParam.Mode.IN);
- int outParams = getModeParameterCount(method, WebParam.Mode.OUT);
- if (inParams != 1) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(typeElement.getQualifiedName(), method.toString()), method);
- }
- if (returnType.accept(NO_TYPE_VISITOR, null)) {
- if (outParam == null && !isOneWay) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_DOC_BARE_NO_OUT(typeElement.getQualifiedName(), method.toString()), method);
- }
- if (outParams != 1) {
- if (!isOneWay && outParams != 0)
- builder.processError(WebserviceapMessages.WEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(typeElement.getQualifiedName(), method.toString()), method);
- }
- } else {
- if (outParams > 0) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(typeElement.getQualifiedName(), method.toString()), outParam);
- }
- }
- }
- return true;
- }
-
- protected boolean isLegalParameter(VariableElement param,
- ExecutableElement method,
- TypeElement typeElement,
- int paramIndex) {
- if (!isLegalType(param.asType())) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(typeElement.getQualifiedName(),
- method.getSimpleName(),
- param.getSimpleName(),
- param.asType().toString()), param);
- return false;
- }
- TypeMirror holderType;
- holderType = builder.getHolderValueType(param.asType());
- WebParam webParam = param.getAnnotation(WebParam.class);
- WebParam.Mode mode = null;
- if (webParam != null)
- mode = webParam.mode();
-
- if (holderType != null) {
- if (mode != null && mode == WebParam.Mode.IN)
- builder.processError(WebserviceapMessages.WEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(typeElement.getQualifiedName(), method.toString(), paramIndex), param);
- } else if (mode != null && mode != WebParam.Mode.IN) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(typeElement.getQualifiedName(), method.toString(), paramIndex), param);
- }
-
- return true;
- }
-
- protected boolean isDocLitWrapped() {
- return soapStyle.equals(SOAPStyle.DOCUMENT) && wrapped;
- }
-
- private static final class NoTypeVisitor extends SimpleTypeVisitor6<Boolean, Void> {
-
- @Override
- public Boolean visitNoType(NoType t, Void o) {
- return true;
- }
-
- @Override
- protected Boolean defaultAction(TypeMirror e, Void aVoid) {
- return false;
- }
- }
-
- protected boolean isValidOneWayMethod(ExecutableElement method, TypeElement typeElement) {
- boolean valid = true;
- if (!(method.getReturnType().accept(NO_TYPE_VISITOR, null))) {
- // this is an error, cannot be OneWay and have a return type
- builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(typeElement.getQualifiedName(), method.toString()), method);
- valid = false;
- }
- VariableElement outParam = getOutParameter(method);
- if (outParam != null) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_OUT(typeElement.getQualifiedName(), method.toString()), outParam);
- valid = false;
- }
- if (!isDocLitWrapped() && soapStyle.equals(SOAPStyle.DOCUMENT)) {
- int inCnt = getModeParameterCount(method, WebParam.Mode.IN);
- if (inCnt != 1) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(typeElement.getQualifiedName(), method.toString()), method);
- valid = false;
- }
- }
- for (TypeMirror thrownType : method.getThrownTypes()) {
- TypeElement thrownElement = (TypeElement) ((DeclaredType) thrownType).asElement();
- if (builder.isServiceException(thrownType)) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(
- typeElement.getQualifiedName(), method.toString(), thrownElement.getQualifiedName()), method);
- valid = false;
- }
- }
- return valid;
- }
-
- protected int getModeParameterCount(ExecutableElement method, WebParam.Mode mode) {
- WebParam webParam;
- int cnt = 0;
- for (VariableElement param : method.getParameters()) {
- webParam = param.getAnnotation(WebParam.class);
- if (webParam != null) {
- if (webParam.header())
- continue;
- if (isEquivalentModes(mode, webParam.mode()))
- cnt++;
- } else {
- if (isEquivalentModes(mode, WebParam.Mode.IN)) {
- cnt++;
- }
- }
- }
- return cnt;
- }
-
- protected boolean isEquivalentModes(WebParam.Mode mode1, WebParam.Mode mode2) {
- if (mode1.equals(mode2))
- return true;
- assert mode1 == WebParam.Mode.IN || mode1 == WebParam.Mode.OUT;
- return (mode1 == WebParam.Mode.IN && mode2 != WebParam.Mode.OUT) || (mode1 == WebParam.Mode.OUT && mode2 != WebParam.Mode.IN);
- }
-
- protected boolean isHolder(VariableElement param) {
- return builder.getHolderValueType(param.asType()) != null;
- }
-
- protected boolean isLegalType(TypeMirror type) {
- if (!(type != null && type.getKind().equals(TypeKind.DECLARED)))
- return true;
- TypeElement tE = (TypeElement) ((DeclaredType) type).asElement();
- if (tE == null) {
- // can be null, if this type's declaration is unknown. This may be the result of a processing error, such as a missing class file.
- builder.processError(WebserviceapMessages.WEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(type.toString(), context.getRound()));
- }
- return !builder.isRemote(tE);
- }
-
- protected VariableElement getOutParameter(ExecutableElement method) {
- WebParam webParam;
- for (VariableElement param : method.getParameters()) {
- webParam = param.getAnnotation(WebParam.class);
- if (webParam != null && webParam.mode() != WebParam.Mode.IN) {
- return param;
- }
- }
- return null;
- }
-
- protected static class MySoapBinding implements SOAPBinding {
-
- @Override
- public Style style() {
- return SOAPBinding.Style.DOCUMENT;
- }
-
- @Override
- public Use use() {
- return SOAPBinding.Use.LITERAL;
- }
-
- @Override
- public ParameterStyle parameterStyle() {
- return SOAPBinding.ParameterStyle.WRAPPED;
- }
-
- @Override
- public Class<? extends java.lang.annotation.Annotation> annotationType() {
- return SOAPBinding.class;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceWrapperGenerator.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceWrapperGenerator.java
deleted file mode 100644
index 99742dea..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceWrapperGenerator.java
+++ /dev/null
@@ -1,569 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.processor.modeler.annotation;
-
-import com.sun.codemodel.internal.CodeWriter;
-import com.sun.codemodel.internal.JAnnotationArrayMember;
-import com.sun.codemodel.internal.JAnnotationUse;
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JCommentPart;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JDocComment;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JFieldVar;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.codemodel.internal.writer.ProgressCodeWriter;
-import com.sun.tools.internal.jxc.ap.InlineAnnotationReaderImpl;
-import com.sun.tools.internal.jxc.model.nav.ApNavigator;
-import com.sun.tools.internal.ws.ToolVersion;
-import com.sun.tools.internal.ws.processor.generator.GeneratorBase;
-import com.sun.tools.internal.ws.processor.generator.GeneratorConstants;
-import com.sun.tools.internal.ws.processor.generator.Names;
-import com.sun.tools.internal.ws.processor.modeler.ModelerException;
-import com.sun.tools.internal.ws.processor.util.DirectoryUtil;
-import com.sun.tools.internal.ws.resources.WebserviceapMessages;
-import com.sun.tools.internal.ws.util.ClassNameInfo;
-import com.sun.tools.internal.ws.wscompile.FilerCodeWriter;
-import com.sun.tools.internal.ws.wscompile.WsgenOptions;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle;
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.ws.model.AbstractWrapperBeanGenerator;
-import com.sun.xml.internal.ws.spi.db.BindingHelper;
-import com.sun.xml.internal.ws.util.StringUtils;
-
-import javax.jws.Oneway;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.Name;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.type.DeclaredType;
-import javax.lang.model.type.MirroredTypeException;
-import javax.lang.model.type.TypeKind;
-import javax.lang.model.type.TypeMirror;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttachmentRef;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlList;
-import javax.xml.bind.annotation.XmlMimeType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
-import javax.xml.ws.RequestWrapper;
-import javax.xml.ws.ResponseWrapper;
-import javax.xml.ws.WebFault;
-import javax.xml.ws.WebServiceException;
-import java.io.File;
-import java.io.IOException;
-import java.lang.annotation.Annotation;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import static com.sun.codemodel.internal.ClassType.CLASS;
-import static com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceConstants.BEAN;
-import static com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceConstants.FAULT_INFO;
-import static com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceConstants.JAXWS_PACKAGE_PD;
-import static com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceConstants.PD_JAXWS_PACKAGE_PD;
-import static com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceConstants.RESPONSE;
-
-/**
- * This class generates the request/response and Exception Beans
- * used by the JAX-WS runtime.
- *
- * @author WS Development Team
- */
-public class WebServiceWrapperGenerator extends WebServiceVisitor {
- private Set<String> wrapperNames;
- private Set<String> processedExceptions;
- private JCodeModel cm;
- private final MakeSafeTypeVisitor makeSafeVisitor;
-
- private static final FieldFactory FIELD_FACTORY = new FieldFactory();
-
- private final AbstractWrapperBeanGenerator ap_generator =
- new ApWrapperBeanGenerator(InlineAnnotationReaderImpl.theInstance,
- new ApNavigator(builder.getProcessingEnvironment()), FIELD_FACTORY);
-
- private final class ApWrapperBeanGenerator extends AbstractWrapperBeanGenerator<TypeMirror, TypeElement, ExecutableElement, MemberInfo> {
-
- protected ApWrapperBeanGenerator(
- AnnotationReader<TypeMirror, TypeElement, ?, ExecutableElement> annReader,
- Navigator<TypeMirror, TypeElement, ?, ExecutableElement> nav, BeanMemberFactory<TypeMirror, MemberInfo> beanMemberFactory) {
- super(annReader, nav, beanMemberFactory);
- }
-
- @Override
- protected TypeMirror getSafeType(TypeMirror type) {
- return WebServiceWrapperGenerator.this.getSafeType(type);
- }
-
- @Override
- protected TypeMirror getHolderValueType(TypeMirror paramType) {
- return builder.getHolderValueType(paramType);
- }
-
- @Override
- protected boolean isVoidType(TypeMirror type) {
- return type != null && type.getKind().equals(TypeKind.VOID);
- }
-
- }
-
- private static final class FieldFactory implements AbstractWrapperBeanGenerator.BeanMemberFactory<TypeMirror, MemberInfo> {
-
- @Override
- public MemberInfo createWrapperBeanMember(TypeMirror paramType,
- String paramName, List<Annotation> jaxb) {
- return new MemberInfo(paramType, paramName, jaxb);
- }
- }
-
- public WebServiceWrapperGenerator(ModelBuilder builder, AnnotationProcessorContext context) {
- super(builder, context);
- makeSafeVisitor = new MakeSafeTypeVisitor(builder.getProcessingEnvironment());
- }
-
- @Override
- protected void processWebService(WebService webService, TypeElement d) {
- cm = new JCodeModel();
- wrapperNames = new HashSet<String>();
- processedExceptions = new HashSet<String>();
- }
-
- @Override
- protected void postProcessWebService(WebService webService, TypeElement d) {
- super.postProcessWebService(webService, d);
- doPostProcessWebService(webService, d);
- }
-
- @SuppressWarnings("CallToThreadDumpStack")
- protected void doPostProcessWebService(WebService webService, TypeElement d) {
- if (cm != null) {
- File sourceDir = builder.getSourceDir();
- assert(sourceDir != null);
- WsgenOptions options = builder.getOptions();
- try {
- CodeWriter cw = new FilerCodeWriter(sourceDir, options);
- if(options.verbose)
- cw = new ProgressCodeWriter(cw, System.out);
- cm.build(cw);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- @Override
- protected void processMethod(ExecutableElement method, WebMethod webMethod) {
- builder.log("WrapperGen - method: "+method);
- builder.log("method.getDeclaringType(): " + method.asType());
- if (wrapped && soapStyle.equals(SOAPStyle.DOCUMENT)) {
- generateWrappers(method, webMethod);
- }
- generateExceptionBeans(method);
- }
-
- private boolean generateExceptionBeans(ExecutableElement method) {
- String beanPackage = packageName + PD_JAXWS_PACKAGE_PD.getValue();
- if (packageName.length() == 0)
- beanPackage = JAXWS_PACKAGE_PD.getValue();
- boolean beanGenerated = false;
- for (TypeMirror thrownType : method.getThrownTypes()) {
- TypeElement typeDecl = (TypeElement) ((DeclaredType) thrownType).asElement();
- if (typeDecl == null) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(
- thrownType.toString(), context.getRound()));
- return false;
- }
- boolean tmp = generateExceptionBean(typeDecl, beanPackage);
- beanGenerated = beanGenerated || tmp;
- }
- return beanGenerated;
- }
-
- private boolean duplicateName(String name) {
- for (String str : wrapperNames) {
- if (str.equalsIgnoreCase(name))
- return true;
- }
- wrapperNames.add(name);
- return false;
- }
-
- private boolean generateWrappers(ExecutableElement method, WebMethod webMethod) {
- boolean isOneway = method.getAnnotation(Oneway.class) != null;
- String beanPackage = packageName + PD_JAXWS_PACKAGE_PD.getValue();
- if (packageName.length() == 0)
- beanPackage = JAXWS_PACKAGE_PD.getValue();
- Name methodName = method.getSimpleName();
- String operationName = builder.getOperationName(methodName);
- operationName = webMethod != null && webMethod.operationName().length() > 0 ?
- webMethod.operationName() : operationName;
- String reqName = operationName;
- String resName = operationName + WebServiceConstants.RESPONSE.getValue();
- String reqNamespace = typeNamespace;
- String resNamespace = typeNamespace;
-
- String requestClassName = beanPackage + StringUtils.capitalize(method.getSimpleName().toString());
- RequestWrapper reqWrapper = method.getAnnotation(RequestWrapper.class);
- if (reqWrapper != null) {
- if (reqWrapper.className().length() > 0)
- requestClassName = reqWrapper.className();
- if (reqWrapper.localName().length() > 0)
- reqName = reqWrapper.localName();
- if (reqWrapper.targetNamespace().length() > 0)
- reqNamespace = reqWrapper.targetNamespace();
- }
- builder.log("requestWrapper: "+requestClassName);
-///// fix for wsgen CR 6442344
- File file = new File(DirectoryUtil.getOutputDirectoryFor(requestClassName, builder.getSourceDir()),
- Names.stripQualifier(requestClassName) + GeneratorConstants.JAVA_SRC_SUFFIX.getValue());
- builder.getOptions().addGeneratedFile(file);
-//////////
- boolean canOverwriteRequest = builder.canOverWriteClass(requestClassName);
- if (!canOverwriteRequest) {
- builder.log("Class " + requestClassName + " exists. Not overwriting.");
- }
- if (duplicateName(requestClassName) && canOverwriteRequest) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(
- typeElement.getQualifiedName(), method.toString()));
- }
-
- String responseClassName = null;
- boolean canOverwriteResponse = canOverwriteRequest;
- if (!isOneway) {
- responseClassName = beanPackage+StringUtils.capitalize(method.getSimpleName().toString())+RESPONSE.getValue();
- ResponseWrapper resWrapper = method.getAnnotation(ResponseWrapper.class);
- if(resWrapper != null) {
- if (resWrapper.className().length() > 0)
- responseClassName = resWrapper.className();
- if (resWrapper.localName().length() > 0)
- resName = resWrapper.localName();
- if (resWrapper.targetNamespace().length() > 0)
- resNamespace = resWrapper.targetNamespace();
- }
- canOverwriteResponse = builder.canOverWriteClass(responseClassName);
- if (!canOverwriteResponse) {
- builder.log("Class " + responseClassName + " exists. Not overwriting.");
- }
- if (duplicateName(responseClassName) && canOverwriteResponse) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(
- typeElement.getQualifiedName(), method.toString()));
- }
- file = new File(DirectoryUtil.getOutputDirectoryFor(responseClassName, builder.getSourceDir()),
- Names.stripQualifier(responseClassName) + GeneratorConstants.JAVA_SRC_SUFFIX.getValue());
- builder.getOptions().addGeneratedFile(file);
- }
- //ArrayList<MemberInfo> reqMembers = new ArrayList<MemberInfo>();
- //ArrayList<MemberInfo> resMembers = new ArrayList<MemberInfo>();
- WrapperInfo reqWrapperInfo = new WrapperInfo(requestClassName);
- //reqWrapperInfo.setMembers(reqMembers);
- WrapperInfo resWrapperInfo = null;
- if (!isOneway) {
- resWrapperInfo = new WrapperInfo(responseClassName);
- //resWrapperInfo.setMembers(resMembers);
- }
- seiContext.setReqWrapperOperation(method, reqWrapperInfo);
- if (!isOneway)
- seiContext.setResWrapperOperation(method, resWrapperInfo);
- try {
- if (!canOverwriteRequest && !canOverwriteResponse) {
- return false;
- }
-
- JDefinedClass reqCls = null;
- if (canOverwriteRequest) {
- reqCls = getCMClass(requestClassName, CLASS);
- }
-
- JDefinedClass resCls = null;
- if (!isOneway && canOverwriteResponse) {
- resCls = getCMClass(responseClassName, CLASS);
- }
-
- // XMLElement Declarations
- writeXmlElementDeclaration(reqCls, reqName,reqNamespace);
- writeXmlElementDeclaration(resCls, resName, resNamespace);
-
- List<MemberInfo> reqMembers = ap_generator.collectRequestBeanMembers(method);
- List<MemberInfo> resMembers = ap_generator.collectResponseBeanMembers(method);
-
- // XmlType
- writeXmlTypeDeclaration(reqCls, reqName, reqNamespace, reqMembers);
- writeXmlTypeDeclaration(resCls, resName, resNamespace, resMembers);
-
- // class members
- writeMembers(reqCls, reqMembers);
- writeMembers(resCls, resMembers);
-
- } catch (Exception e) {
- throw new ModelerException("modeler.nestedGeneratorError",e);
- }
- return true;
- }
-
-// private List<Annotation> collectJAXBAnnotations(Declaration decl) {
-// List<Annotation> jaxbAnnotation = new ArrayList<Annotation>();
-// for(Class jaxbClass : jaxbAnns) {
-// Annotation ann = decl.getAnnotation(jaxbClass);
-// if (ann != null) {
-// jaxbAnnotation.add(ann);
-// }
-// }
-// return jaxbAnnotation;
-// }
-
- private TypeMirror getSafeType(TypeMirror type) {
- return makeSafeVisitor.visit(type, builder.getProcessingEnvironment().getTypeUtils());
- }
-
- private JType getType(TypeMirror typeMirror) {
- String type = typeMirror.toString();
- try {
-// System.out.println("typeName: "+typeName);
- return cm.parseType(type);
-// System.out.println("type: "+type);
- } catch (ClassNotFoundException e) {
- return cm.ref(type);
- }
- }
-
- private void writeMembers(JDefinedClass cls, Collection<MemberInfo> members) {
- if (cls == null)
- return;
- for (MemberInfo memInfo : members) {
- JType type = getType(memInfo.getParamType());
- JFieldVar field = cls.field(JMod.PRIVATE, type, memInfo.getParamName());
- annotateParameterWithJaxbAnnotations(memInfo, field);
- }
- for (MemberInfo memInfo : members) {
- writeMember(cls, memInfo.getParamType(),
- memInfo.getParamName());
- }
- }
-
- private void annotateParameterWithJaxbAnnotations(MemberInfo memInfo, JFieldVar field) {
- List<Annotation> jaxbAnnotations = memInfo.getJaxbAnnotations();
- for(Annotation ann : jaxbAnnotations) {
- if (ann instanceof XmlMimeType) {
- JAnnotationUse jaxbAnn = field.annotate(XmlMimeType.class);
- jaxbAnn.param("value", ((XmlMimeType)ann).value());
- } else if (ann instanceof XmlJavaTypeAdapter) {
- JAnnotationUse jaxbAnn = field.annotate(XmlJavaTypeAdapter.class);
- XmlJavaTypeAdapter ja = (XmlJavaTypeAdapter) ann;
- try {
- ja.value();
- throw new AssertionError();
- } catch (MirroredTypeException e) {
- jaxbAnn.param("value",getType(e.getTypeMirror()));
- }
- // XmlJavaTypeAdapter.type() is for package only. No need to copy.
- } else if (ann instanceof XmlAttachmentRef) {
- field.annotate(XmlAttachmentRef.class);
- } else if (ann instanceof XmlList){
- field.annotate(XmlList.class);
- } else if (ann instanceof XmlElement) {
- XmlElement elemAnn = (XmlElement)ann;
- JAnnotationUse jAnn = field.annotate(XmlElement.class);
- jAnn.param("name", elemAnn.name());
- jAnn.param("namespace", elemAnn.namespace());
- if (elemAnn.nillable()) {
- jAnn.param("nillable", true);
- }
- if (elemAnn.required()) {
- jAnn.param("required", true);
- }
- } else {
- throw new WebServiceException("SEI Parameter cannot have this JAXB annotation: " + ann);
- }
- }
- }
-
- protected JDefinedClass getCMClass(String className, com.sun.codemodel.internal.ClassType type) {
- JDefinedClass cls;
- try {
- cls = cm._class(className, type);
- } catch (com.sun.codemodel.internal.JClassAlreadyExistsException e){
- cls = cm._getClass(className);
- }
- return cls;
- }
-
- private boolean generateExceptionBean(TypeElement thrownDecl, String beanPackage) {
- if (!builder.isServiceException(thrownDecl.asType()))
- return false;
-
- String exceptionName = ClassNameInfo.getName(thrownDecl.getQualifiedName().toString());
- if (processedExceptions.contains(exceptionName))
- return false;
- processedExceptions.add(exceptionName);
- WebFault webFault = thrownDecl.getAnnotation(WebFault.class);
- String className = beanPackage+ exceptionName + BEAN.getValue();
-
- Collection<MemberInfo> members = ap_generator.collectExceptionBeanMembers(thrownDecl);
- boolean isWSDLException = isWSDLException(members, thrownDecl);
- String namespace = typeNamespace;
- String name = exceptionName;
- FaultInfo faultInfo;
- if (isWSDLException) {
- TypeMirror beanType = getFaultInfoMember(members).getParamType();
- faultInfo = new FaultInfo(TypeMonikerFactory.getTypeMoniker(beanType), true);
- namespace = webFault.targetNamespace().length()>0 ?
- webFault.targetNamespace() : namespace;
- name = webFault.name().length()>0 ?
- webFault.name() : name;
- faultInfo.setElementName(new QName(namespace, name));
- seiContext.addExceptionBeanEntry(thrownDecl.getQualifiedName(), faultInfo, builder);
- return false;
- }
- if (webFault != null) {
- namespace = webFault.targetNamespace().length()>0 ?
- webFault.targetNamespace() : namespace;
- name = webFault.name().length()>0 ?
- webFault.name() : name;
- className = webFault.faultBean().length()>0 ?
- webFault.faultBean() : className;
-
- }
- JDefinedClass cls = getCMClass(className, CLASS);
- faultInfo = new FaultInfo(className, false);
-
- if (duplicateName(className)) {
- builder.processError(WebserviceapMessages.WEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(
- typeElement.getQualifiedName(), thrownDecl.getQualifiedName()));
- }
-
- boolean canOverWriteBean = builder.canOverWriteClass(className);
- if (!canOverWriteBean) {
- builder.log("Class " + className + " exists. Not overwriting.");
- seiContext.addExceptionBeanEntry(thrownDecl.getQualifiedName(), faultInfo, builder);
- return false;
- }
- if (seiContext.getExceptionBeanName(thrownDecl.getQualifiedName()) != null)
- return false;
-
- //write class comment - JAXWS warning
- JDocComment comment = cls.javadoc();
- for (String doc : GeneratorBase.getJAXWSClassComment(ToolVersion.VERSION.MAJOR_VERSION)) {
- comment.add(doc);
- }
-
- // XmlElement Declarations
- writeXmlElementDeclaration(cls, name, namespace);
-
- // XmlType Declaration
- //members = sortMembers(members);
- XmlType xmlType = thrownDecl.getAnnotation(XmlType.class);
- String xmlTypeName = (xmlType != null && !xmlType.name().equals("##default")) ? xmlType.name() : exceptionName;
- String xmlTypeNamespace = (xmlType != null && !xmlType.namespace().equals("##default")) ? xmlType.namespace() : typeNamespace;
- writeXmlTypeDeclaration(cls, xmlTypeName, xmlTypeNamespace, members);
-
- writeMembers(cls, members);
-
- seiContext.addExceptionBeanEntry(thrownDecl.getQualifiedName(), faultInfo, builder);
- return true;
- }
-
- protected boolean isWSDLException(Collection<MemberInfo> members, TypeElement thrownDecl) {
- WebFault webFault = thrownDecl.getAnnotation(WebFault.class);
- return webFault != null && members.size() == 2 && getFaultInfoMember(members) != null;
- }
-
- /*
- * Returns the corresponding MemberInfo for getFaultInfo()
- * method of an exception. Returns null, if that method is not there.
- */
- private MemberInfo getFaultInfoMember(Collection<MemberInfo> members) {
- for(MemberInfo member : members) {
- if (member.getParamName().equals(FAULT_INFO.getValue())) {
- return member;
- }
- }
- return null;
- }
-
- private void writeXmlElementDeclaration(JDefinedClass cls, String elementName, String namespaceUri) {
-
- if (cls == null)
- return;
- JAnnotationUse xmlRootElementAnn = cls.annotate(XmlRootElement.class);
- xmlRootElementAnn.param("name", elementName);
- if (namespaceUri.length() > 0) {
- xmlRootElementAnn.param("namespace", namespaceUri);
- }
- JAnnotationUse xmlAccessorTypeAnn = cls.annotate(cm.ref(XmlAccessorType.class));
- xmlAccessorTypeAnn.param("value", XmlAccessType.FIELD);
- }
-
- private void writeXmlTypeDeclaration(JDefinedClass cls, String typeName, String namespaceUri,
- Collection<MemberInfo> members) {
- if (cls == null)
- return;
- JAnnotationUse xmlTypeAnn = cls.annotate(cm.ref(XmlType.class));
- xmlTypeAnn.param("name", typeName);
- xmlTypeAnn.param("namespace", namespaceUri);
- if (members.size() > 1) {
- JAnnotationArrayMember paramArray = xmlTypeAnn.paramArray("propOrder");
- for (MemberInfo memInfo : members) {
- paramArray.param(memInfo.getParamName());
- }
- }
- }
-
- private void writeMember(JDefinedClass cls, TypeMirror paramType,
- String paramName) {
-
- if (cls == null)
- return;
-
- String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
- String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
- JType propType = getType(paramType);
- JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
- JDocComment methodDoc = m.javadoc();
- JCommentPart ret = methodDoc.addReturn();
- ret.add("returns "+propType.name());
- JBlock body = m.body();
- body._return( JExpr._this().ref(paramName) );
-
- m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
- JVar param = m.param(propType, paramName);
- methodDoc = m.javadoc();
- JCommentPart part = methodDoc.addParam(paramName);
- part.add("the value for the "+ paramName+" property");
- body = m.body();
- body.assign( JExpr._this().ref(paramName), param );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WrapperInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WrapperInfo.java
deleted file mode 100644
index 4d9a1628..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WrapperInfo.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler.annotation;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- *
- * @author dkohlert
- */
-public class WrapperInfo {
- public String wrapperName;
-
- /** Creates a new instance of FaultInfo */
- public WrapperInfo() {
- }
- public WrapperInfo(String wrapperName) {
- this.wrapperName = wrapperName;
- }
-
- public void setWrapperName(String wrapperName) {
- this.wrapperName = wrapperName;
- }
-
- public String getWrapperName() {
- return wrapperName;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/AccessorElement.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/AccessorElement.java
deleted file mode 100644
index 744c0025..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/AccessorElement.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler.wsdl;
-
-import javax.xml.namespace.QName;
-
-
-/**
- * @author Vivek Pandey
- *
- * Rpc/Lit AccessorElement to be used to generate pseudo schema
- */
-class AccessorElement {
-
- private QName type;
- private String name;
-
-
- /**
- * @param type
- * @param name
- */
- public AccessorElement(String name, QName type) {
- this.type = type;
- this.name = name;
- }
- /**
- * @return Returns the type.
- */
- public QName getType() {
- return type;
- }
- /**
- * @param type The type to set.
- */
- public void setType(QName type) {
- this.type = type;
- }
- /**
- * @return Returns the name.
- */
- public String getName() {
- return name;
- }
- /**
- * @param name The name to set.
- */
- public void setName(String name) {
- this.name = name;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ClassNameAllocatorImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ClassNameAllocatorImpl.java
deleted file mode 100644
index 7ab52bb2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ClassNameAllocatorImpl.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler.wsdl;
-
-import com.sun.tools.internal.ws.processor.util.ClassNameCollector;
-import com.sun.tools.internal.xjc.api.ClassNameAllocator;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * @author Vivek Pandey
- * <p/>
- * Implementation of Callback interface that allows the driver of the XJC API to rename JAXB-generated classes/interfaces/enums.
- */
-public class ClassNameAllocatorImpl implements ClassNameAllocator {
- public ClassNameAllocatorImpl(ClassNameCollector classNameCollector) {
- this.classNameCollector = classNameCollector;
- this.jaxbClasses = new HashSet<String>();
- }
-
- public String assignClassName(String packageName, String className) {
- if(packageName== null || className == null){
- //TODO: throw Exception
- return className;
- }
-
- //if either of the values are empty string return the default className
- if(packageName.equals("") || className.equals(""))
- return className;
-
- String fullClassName = packageName+"."+className;
-
- // Check if there is any conflict with jaxws generated classes
- Set<String> seiClassNames = classNameCollector.getSeiClassNames();
- if(seiClassNames != null && seiClassNames.contains(fullClassName)){
- className += TYPE_SUFFIX;
- }
-
- jaxbClasses.add(packageName+"."+className);
- return className;
- }
-
- /**
- *
- * @return jaxbGenerated classNames
- */
- public Set<String> getJaxbGeneratedClasses() {
- return jaxbClasses;
- }
-
- private final static String TYPE_SUFFIX = "_Type";
- private ClassNameCollector classNameCollector;
- private Set<String> jaxbClasses;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ConsoleErrorReporter.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ConsoleErrorReporter.java
deleted file mode 100644
index bf62bc3d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ConsoleErrorReporter.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler.wsdl;
-
-import com.sun.tools.internal.ws.resources.WscompileMessages;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import org.xml.sax.SAXParseException;
-
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.net.UnknownHostException;
-
-public class ConsoleErrorReporter extends ErrorReceiver {
-
- private boolean hasError;
- private PrintStream output;
- private boolean debug;
-
- public ConsoleErrorReporter(PrintStream stream) {
- this.output = stream;
- }
-
- public ConsoleErrorReporter(OutputStream outputStream) {
- this.output = new PrintStream(outputStream);
- }
-
- public boolean hasError() {
- return hasError;
- }
-
- public void error(SAXParseException e) {
- if(debug)
- e.printStackTrace();
- hasError = true;
- if((e.getSystemId() == null && e.getPublicId() == null) && (e.getCause() instanceof UnknownHostException)) {
- print(WscompileMessages.WSIMPORT_ERROR_MESSAGE(e.toString()), e);
- } else {
- print(WscompileMessages.WSIMPORT_ERROR_MESSAGE(e.getMessage()), e);
- }
- }
-
-
-
- public void fatalError(SAXParseException e) {
- if(debug)
- e.printStackTrace();
- hasError = true;
- print(WscompileMessages.WSIMPORT_ERROR_MESSAGE(e.getMessage()), e);
- }
-
- public void warning(SAXParseException e) {
- print(WscompileMessages.WSIMPORT_WARNING_MESSAGE(e.getMessage()), e);
- }
-
- /**
- * Used to report possibly verbose information that
- * can be safely ignored.
- */
- public void info(SAXParseException e) {
- print(WscompileMessages.WSIMPORT_INFO_MESSAGE(e.getMessage()), e);
- }
-
- public void debug(SAXParseException e){
- print(WscompileMessages.WSIMPORT_DEBUG_MESSAGE(e.getMessage()), e);
- }
-
-
- private void print(String message, SAXParseException e) {
- output.println(message);
- output.println(getLocationString(e));
- output.println();
- }
-
- public void enableDebugging(){
- this.debug = true;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/JAXBModelBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/JAXBModelBuilder.java
deleted file mode 100644
index 96c58af4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/JAXBModelBuilder.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler.wsdl;
-
-import com.sun.tools.internal.ws.processor.model.ModelException;
-import com.sun.tools.internal.ws.processor.model.java.JavaSimpleType;
-import com.sun.tools.internal.ws.processor.model.java.JavaType;
-import com.sun.tools.internal.ws.processor.model.jaxb.JAXBMapping;
-import com.sun.tools.internal.ws.processor.model.jaxb.JAXBModel;
-import com.sun.tools.internal.ws.processor.model.jaxb.JAXBType;
-import com.sun.tools.internal.ws.processor.util.ClassNameCollector;
-import com.sun.tools.internal.ws.wscompile.AbortException;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.tools.internal.ws.wsdl.parser.DOMForestScanner;
-import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder;
-import com.sun.tools.internal.xjc.api.S2JJAXBModel;
-import com.sun.tools.internal.xjc.api.SchemaCompiler;
-import com.sun.tools.internal.xjc.api.TypeAndAnnotation;
-import org.w3c.dom.Element;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.LocatorImpl;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author Vivek Pandey
- *
- * Uses JAXB XJC apis to build JAXBModel and resolves xml to java type mapping from JAXBModel
- */
-public class JAXBModelBuilder {
-
- private final ErrorReceiver errReceiver;
- private final WsimportOptions options;
- private final MetadataFinder forest;
-
- public JAXBModelBuilder(WsimportOptions options, ClassNameCollector classNameCollector, MetadataFinder finder, ErrorReceiver errReceiver) {
- this._classNameAllocator = new ClassNameAllocatorImpl(classNameCollector);
- this.errReceiver = errReceiver;
- this.options = options;
- this.forest = finder;
-
- internalBuildJAXBModel();
- }
-
- /**
- * Builds model from WSDL document. Model contains abstraction which is used by the
- * generators to generate the stub/tie/serializers etc. code.
- *
- * @see com.sun.tools.internal.ws.processor.modeler.Modeler#buildModel()
- */
-
- private void internalBuildJAXBModel(){
- try {
- schemaCompiler = options.getSchemaCompiler();
- schemaCompiler.resetSchema();
- if(options.entityResolver != null) {
- //set if its not null so as not to override catalog option specified via xjc args
- schemaCompiler.setEntityResolver(options.entityResolver);
- }
- schemaCompiler.setClassNameAllocator(_classNameAllocator);
- schemaCompiler.setErrorListener(errReceiver);
- int schemaElementCount = 1;
-
- for (Element element : forest.getInlinedSchemaElement()) {
- String location = element.getOwnerDocument().getDocumentURI();
- String systemId = location + "#types?schema" + schemaElementCount++;
- if(forest.isMexMetadata)
- schemaCompiler.parseSchema(systemId,element);
- else
- new DOMForestScanner(forest).scan(element,schemaCompiler.getParserHandler(systemId));
- }
-
- //feed external jaxb:bindings file
- InputSource[] externalBindings = options.getSchemaBindings();
- if(externalBindings != null){
- for(InputSource jaxbBinding : externalBindings){
- schemaCompiler.parseSchema(jaxbBinding);
- }
- }
- } catch (Exception e) {
- throw new ModelException(e);
- }
- }
-
- public JAXBType getJAXBType(QName qname){
- JAXBMapping mapping = jaxbModel.get(qname);
- if (mapping == null){
- return null;
- }
- JavaType javaType = new JavaSimpleType(mapping.getType());
- return new JAXBType(qname, javaType, mapping, jaxbModel);
- }
-
- public TypeAndAnnotation getElementTypeAndAnn(QName qname){
- JAXBMapping mapping = jaxbModel.get(qname);
- if (mapping == null){
- return null;
- }
- return mapping.getType().getTypeAnn();
- }
-
- protected void bind(){
- S2JJAXBModel rawJaxbModel = schemaCompiler.bind();
- if(rawJaxbModel == null)
- throw new AbortException();
- options.setCodeModel(rawJaxbModel.generateCode(null, errReceiver));
- jaxbModel = new JAXBModel(rawJaxbModel);
- jaxbModel.setGeneratedClassNames(_classNameAllocator.getJaxbGeneratedClasses());
- }
-
- protected SchemaCompiler getJAXBSchemaCompiler(){
- return schemaCompiler;
- }
-
- public JAXBModel getJAXBModel(){
- return jaxbModel;
- }
-
- private JAXBModel jaxbModel;
- private SchemaCompiler schemaCompiler;
- private final ClassNameAllocatorImpl _classNameAllocator;
- protected static final LocatorImpl NULL_LOCATOR = new LocatorImpl();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ModelerUtils.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ModelerUtils.java
deleted file mode 100644
index 93e06b94..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ModelerUtils.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.modeler.wsdl;
-
-import com.sun.tools.internal.ws.processor.model.AbstractType;
-import com.sun.tools.internal.ws.processor.model.Block;
-import com.sun.tools.internal.ws.processor.model.ModelProperties;
-import com.sun.tools.internal.ws.processor.model.Parameter;
-import com.sun.tools.internal.ws.processor.model.java.JavaSimpleType;
-import com.sun.tools.internal.ws.processor.model.java.JavaStructureMember;
-import com.sun.tools.internal.ws.processor.model.java.JavaStructureType;
-import com.sun.tools.internal.ws.processor.model.java.JavaType;
-import com.sun.tools.internal.ws.processor.model.jaxb.*;
-import com.sun.tools.internal.ws.resources.ModelerMessages;
-import com.sun.tools.internal.ws.util.ClassNameInfo;
-import com.sun.tools.internal.ws.wscompile.AbortException;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiverFilter;
-import com.sun.tools.internal.ws.wsdl.document.Message;
-import com.sun.tools.internal.ws.wsdl.document.MessagePart;
-import com.sun.tools.internal.xjc.api.S2JJAXBModel;
-import com.sun.tools.internal.xjc.api.TypeAndAnnotation;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Utilities to be used by WSDLModeler
- *
- * @author Vivek Pandey
- *
- */
-class ModelerUtils {
-
- /**
- * This method should be called incase of wrapper style operations. This is
- * equivalent to wrapper style schema component or JAXB Mapping object.
- *
- * @param jaxbType JAXBType from which a JAXBStructured type will be created.
- * @return returns JAXBStructured type
- */
- public static JAXBStructuredType createJAXBStructureType(JAXBType jaxbType) {
- JAXBStructuredType type = new JAXBStructuredType(jaxbType);
- type.setName(jaxbType.getName());
- type.setJavaType(jaxbType.getJavaType());
- return type;
- }
-
- /**
- * This method uses JAXBStructured type (wrapper style operations) and
- * unwraps it to create list of parameters.
- *
- *
- * @param jaxbType instance of JAXBType, could be JAXBStructured type.
- * @param block The Block (body/Header/Attachment) to which the created Parameter belong.
- * @return list of Parameters
- */
- public static List<Parameter> createUnwrappedParameters(JAXBType jaxbType,
- Block block) {
- List<Parameter> paramList = new ArrayList<Parameter>();
- JAXBStructuredType type = null;
- if (!(jaxbType instanceof JAXBStructuredType))
- type = createJAXBStructureType(jaxbType);
- else
- type = (JAXBStructuredType) jaxbType;
-
- JavaStructureType jst = new JavaStructureType(jaxbType.getJavaType()
- .getRealName(), true, type);
- type.setJavaType(jst);
- block.setType(type);
- List memberList = jaxbType.getWrapperChildren();
- Iterator props = memberList.iterator();
- while (props.hasNext()) {
- JAXBProperty prop = (JAXBProperty) props.next();
- paramList.add(createUnwrappedParameter(prop, jaxbType, block, type,
- jst));
- }
-
- return paramList;
- }
-
- /**
- * @param prop
- * @param jaxbType
- * @param block
- * @return unwrapped parameter
- */
- private static Parameter createUnwrappedParameter(JAXBProperty prop,
- JAXBType jaxbType, Block block, JAXBStructuredType type,
- JavaStructureType jst) {
- QName elementName = prop.getElementName();
- JavaType javaType = new JavaSimpleType(prop.getType());
- JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
- JavaStructureMember jsm = new JavaStructureMember(elementName
- .getLocalPart(), javaType, eType);
- eType.setJavaStructureMember(jsm);
- jst.add(jsm);
- eType.setProperty(prop);
- type.add(eType);
- JAXBType t = new JAXBType(elementName, javaType, jaxbType
- .getJaxbMapping(), jaxbType.getJaxbModel());
- t.setUnwrapped(true);
- Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
- parameter.setEmbedded(true);
- return parameter;
- }
-
- public static List<Parameter> createRpcLitParameters(Message message, Block block, S2JJAXBModel jaxbModel, ErrorReceiverFilter errReceiver){
- RpcLitStructure rpcStruct = (RpcLitStructure)block.getType();
-
- List<Parameter> parameters = new ArrayList<Parameter>();
- for(MessagePart part : message.getParts()){
- if(!ModelerUtils.isBoundToSOAPBody(part))
- continue;
- QName name = part.getDescriptor();
- TypeAndAnnotation typeAndAnn = jaxbModel.getJavaType(name);
- if(typeAndAnn == null){
- String msgQName = "{"+message.getDefining().getTargetNamespaceURI()+"}"+message.getName();
- errReceiver.error(part.getLocator(), ModelerMessages.WSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(name.toString(),
- part.getName(), msgQName));
- throw new AbortException();
- }
- String type = typeAndAnn.getTypeClass().fullName();
- type = ClassNameInfo.getGenericClass(type);
- RpcLitMember param = new RpcLitMember(new QName("", part.getName()), type);
- JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAndAnn));
- param.setJavaType(javaType);
- rpcStruct.addRpcLitMember(param);
- Parameter parameter = ModelerUtils.createParameter(part.getName(), param, block);
- parameter.setEmbedded(true);
- parameters.add(parameter);
- }
- return parameters;
- }
-
- /**
- * Called for non-wrapper style operations. It returns a Parameter constructed
- * using the JAXBType and the Block.
- *
- * @param partName typically wsdl:part or any name to be given to the parameter
- * @param jaxbType type of Parameter
- * @param block Block to which the parameter belongs to
- * @return Parameter created.
- */
- public static Parameter createParameter(String partName, AbstractType jaxbType,
- Block block) {
- Parameter parameter = new Parameter(partName, block.getEntity());
- parameter.setProperty(ModelProperties.PROPERTY_PARAM_MESSAGE_PART_NAME,
- partName);
- parameter.setEmbedded(false);
- parameter.setType(jaxbType);
- parameter.setTypeName(jaxbType.getJavaType().getType().getName());
- parameter.setBlock(block);
- return parameter;
- }
-
- /**
- * Get Parameter from the list of parameters.
- *
- * @param paramName
- * @param parameters
- * @return the Parameter with name paramName from parameters
- */
- public static Parameter getParameter(String paramName, List<Parameter> parameters){
- if(parameters == null)
- return null;
- for(Parameter param: parameters){
- //if(param.getName().equals("_return") && paramName.equals("return") || param.getName().equals(paramName)) {
- if(param.getName().equals(paramName)){
- return param;
- }
- }
- return null;
- }
-
- /**
- * Compares two JAXBStructures.
- *
- * @param struct1
- * @param struct2
- * @return true if struct1 and struct2 are equivalent.
- */
- public static boolean isEquivalentLiteralStructures(
- JAXBStructuredType struct1,
- JAXBStructuredType struct2) {
- if (struct1.getElementMembersCount() != struct2.getElementMembersCount())
- return false;
- Iterator members = struct1.getElementMembers();
- JAXBElementMember member1;
- JavaStructureMember javaMember1, javaMember2;
- for (int i = 0; members.hasNext(); i++) {
- member1 = (JAXBElementMember)members.next();
- javaMember1 = member1.getJavaStructureMember();
- javaMember2 =
- ((JavaStructureType)struct2.getJavaType()).getMemberByName(
- member1.getJavaStructureMember().getName());
- if (javaMember2.getConstructorPos() != i
- || !javaMember1.getType().equals(javaMember2.getType())) {
- return false;
- }
- }
- return false;
- }
-
- public static QName getRawTypeName(Parameter parameter) {
- String name = parameter.getName();
-
- if (parameter.getType() instanceof JAXBType) {
- JAXBType jt = (JAXBType)parameter.getType();
- if (jt.isUnwrappable()) {
- List<JAXBProperty> props = jt.getWrapperChildren();
- for(JAXBProperty prop: props) {
- if (prop.getName().equals(name)) {
- return prop.getRawTypeName();
- }
- }
- }
- }
- return null;
- }
-
- /**
- * @param part
- * @return true if part is bound to Mime content
- */
- public static boolean isBoundToMimeContent(MessagePart part) {
- if((part != null) && part.getBindingExtensibilityElementKind() == MessagePart.WSDL_MIME_BINDING)
- return true;
- return false;
- }
-
- /**
- * @param part
- * @return true if part is bound to SOAPBody
- */
- public static boolean isBoundToSOAPBody(MessagePart part) {
- if((part != null) && part.getBindingExtensibilityElementKind() == MessagePart.SOAP_BODY_BINDING)
- return true;
- return false;
- }
-
- /**
- * @param part
- * @return true if part is bound to SOAPHeader
- */
- public static boolean isBoundToSOAPHeader(MessagePart part) {
- if((part != null) && part.getBindingExtensibilityElementKind() == MessagePart.SOAP_HEADER_BINDING)
- return true;
- return false;
- }
-
- public static boolean isUnbound(MessagePart part) {
- if((part != null) && part.getBindingExtensibilityElementKind() == MessagePart.PART_NOT_BOUNDED)
- return true;
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/PseudoSchemaBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/PseudoSchemaBuilder.java
deleted file mode 100644
index cfbb18b0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/PseudoSchemaBuilder.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.processor.modeler.wsdl;
-
-import com.sun.tools.internal.ws.processor.generator.Names;
-import static com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModelerBase.getExtensionOfType;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.tools.internal.ws.wscompile.Options;
-import com.sun.tools.internal.ws.wsdl.document.*;
-import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBinding;
-import com.sun.tools.internal.ws.wsdl.document.schema.SchemaKinds;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAP12Binding;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAPBinding;
-import org.xml.sax.InputSource;
-
-import javax.xml.namespace.QName;
-import java.io.ByteArrayInputStream;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.nio.charset.StandardCharsets;
-import java.text.MessageFormat;
-import java.util.*;
-
-
-/**
- * Builds all possible pseudo schemas for async operation ResponseBean to feed to XJC.
- *
- * @author Vivek Pandey
- */
-public class PseudoSchemaBuilder {
-
- private final StringWriter buf = new StringWriter();
- private final WSDLDocument wsdlDocument;
- private WSDLModeler wsdlModeler;
- private final List<InputSource> schemas = new ArrayList<InputSource>();
- private final HashMap<QName, Port> bindingNameToPortMap = new HashMap<QName, Port>();
- private static final String w3ceprSchemaBinding = "<bindings\n" +
- " xmlns=\"http://java.sun.com/xml/ns/jaxb\"\n" +
- " xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"\n" +
- " xmlns:xjc=\"http://java.sun.com/xml/ns/jaxb/xjc\"\n" +
- " version=\"2.1\">\n" +
- " \n" +
- " <bindings scd=\"x-schema::wsa\" if-exists=\"true\">\n" +
- //comment the following, otw JAXB won't generate ObjectFactory, classes from wsa schema. See JAX-WS-804
- // " <schemaBindings map=\"false\" />\n" +
- " <bindings scd=\"wsa:EndpointReference\">\n" +
- " <class ref=\"javax.xml.ws.wsaddressing.W3CEndpointReference\" xjc:recursive=\"true\"/>\n" +
- " </bindings>\n" +
- " <bindings scd=\"~wsa:EndpointReferenceType\">\n" +
- " <class ref=\"javax.xml.ws.wsaddressing.W3CEndpointReference\" xjc:recursive=\"true\"/>\n" +
- " </bindings>\n" +
- " </bindings>\n" +
- "</bindings>";
-
- private static final String memberSubmissionEPR = "<bindings\n" +
- " xmlns=\"http://java.sun.com/xml/ns/jaxb\"\n" +
- " xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\"\n" +
- " version=\"2.1\">\n" +
- " \n" +
- " <bindings scd=\"x-schema::wsa\" if-exists=\"true\">\n" +
-//comment the following, otw JAXB won't generate ObjectFactory, classes from wsa schema. See JAX-WS-804
-// " <schemaBindings map=\"false\" />\n" +
- " <bindings scd=\"wsa:EndpointReference\">\n" +
- " <class ref=\"com.sun.xml.internal.ws.developer.MemberSubmissionEndpointReference\"/>\n" +
- " </bindings>\n" +
- " <bindings scd=\"~wsa:EndpointReferenceType\">\n" +
- " <class ref=\"com.sun.xml.internal.ws.developer.MemberSubmissionEndpointReference\"/>\n" +
- " </bindings>\n" +
- " </bindings>\n" +
- "</bindings>";
-
- private final static String sysId = "http://dummy.pseudo-schema#schema";
-
- private WsimportOptions options;
- public static List<InputSource> build(WSDLModeler wsdlModeler, WsimportOptions options, ErrorReceiver errReceiver) {
- PseudoSchemaBuilder b = new PseudoSchemaBuilder(wsdlModeler.document);
- b.wsdlModeler = wsdlModeler;
- b.options = options;
- b.build();
- int i;
- for(i = 0; i < b.schemas.size(); i++){
- InputSource is = b.schemas.get(i);
- is.setSystemId(sysId+(i + 1));
- }
- //add w3c EPR binding
- if(!(options.noAddressingBbinding) && options.target.isLaterThan(Options.Target.V2_1)){
- InputSource is = new InputSource(new ByteArrayInputStream(w3ceprSchemaBinding.getBytes(StandardCharsets.UTF_8)));
- is.setSystemId(sysId+(++i +1));
- b.schemas.add(is);
- }
-
-
- //TODO: uncomment after JAXB fixes the issue related to passing multiples of such bindings
- //add member submission EPR binding
-// InputSource is1 = new InputSource(new ByteArrayInputStream(memberSubmissionEPR.getBytes()));
-// is1.setSystemId(sysId+(++i + 1));
-// b.schemas.add(is1);
-
- return b.schemas;
- }
-
-
- private PseudoSchemaBuilder(WSDLDocument _wsdl) {
- this.wsdlDocument = _wsdl;
- }
-
- private void build() {
- for(Iterator<Service> itr=wsdlDocument.getDefinitions().services(); itr.hasNext(); ) {
- build(itr.next());
- }
- }
-
- private void build(Service service) {
- for( Iterator<Port> itr=service.ports(); itr.hasNext(); ) {
- build(itr.next() );
- }
- }
-
- private void build(Port port) {
- if(wsdlModeler.isProvider(port))
- return;
- Binding binding = port.resolveBinding(wsdlDocument);
-
- SOAPBinding soapBinding =
- (SOAPBinding)getExtensionOfType(binding, SOAPBinding.class);
- //lets try and see if its SOAP 1.2. dont worry about extension flag, its
- // handled much earlier
- if (soapBinding == null) {
- soapBinding =
- (SOAPBinding)getExtensionOfType(binding, SOAP12Binding.class);
- }
- if(soapBinding == null)
- return;
- PortType portType = binding.resolvePortType(wsdlDocument);
-
- QName bindingName = WSDLModelerBase.getQNameOf(binding);
-
- //we dont want to process the port bound to the binding processed earlier
- if(bindingNameToPortMap.containsKey(bindingName))
- return;
-
- bindingNameToPortMap.put(bindingName, port);
-
-
- for(Iterator itr=binding.operations(); itr.hasNext();){
- BindingOperation bindingOperation = (BindingOperation)itr.next();
-
- // get only the bounded operations
- Set boundedOps = portType.getOperationsNamed(bindingOperation.getName());
- if(boundedOps.size() != 1)
- continue;
- Operation operation = (Operation)boundedOps.iterator().next();
-
- // No pseudo schema required for doc/lit
- if(wsdlModeler.isAsync(portType, operation)){
- buildAsync(portType, operation, bindingOperation);
- }
- }
- }
-
- /**
- * @param portType
- * @param operation
- * @param bindingOperation
- */
- private void buildAsync(PortType portType, Operation operation, BindingOperation bindingOperation) {
- String operationName = getCustomizedOperationName(operation);//operation.getName();
- if(operationName == null)
- return;
- Message outputMessage = null;
- if(operation.getOutput() != null)
- outputMessage = operation.getOutput().resolveMessage(wsdlDocument);
- if(outputMessage != null){
- List<MessagePart> allParts = new ArrayList<MessagePart>(outputMessage.getParts());
- if(options != null && options.additionalHeaders) {
- List<MessagePart> addtionalHeaderParts = wsdlModeler.getAdditionHeaderParts(bindingOperation, outputMessage, false);
- allParts.addAll(addtionalHeaderParts);
- }
- if(allParts.size() > 1)
- build(getOperationName(operationName), allParts);
- }
-
- }
-
- private String getCustomizedOperationName(Operation operation) {
- JAXWSBinding jaxwsCustomization = (JAXWSBinding)getExtensionOfType(operation, JAXWSBinding.class);
- String operationName = (jaxwsCustomization != null)?((jaxwsCustomization.getMethodName() != null)?jaxwsCustomization.getMethodName().getName():null):null;
- if(operationName != null){
- if(Names.isJavaReservedWord(operationName)){
- return null;
- }
-
- return operationName;
- }
- return operation.getName();
- }
-
- private void writeImports(QName elementName, List<MessagePart> parts){
- Set<String> uris = new HashSet<String>();
- for(MessagePart p:parts){
- String ns = p.getDescriptor().getNamespaceURI();
- if(!uris.contains(ns) && !ns.equals("http://www.w3.org/2001/XMLSchema") && !ns.equals(elementName.getNamespaceURI())){
- print("<xs:import namespace=''{0}''/>", ns);
- uris.add(ns);
- }
- }
- }
-
- boolean asyncRespBeanBinding = false;
- private void build(QName elementName, List<MessagePart> allParts){
-
- print(
- "<xs:schema xmlns:xs=''http://www.w3.org/2001/XMLSchema''" +
- " xmlns:jaxb=''http://java.sun.com/xml/ns/jaxb''" +
- " xmlns:xjc=''http://java.sun.com/xml/ns/jaxb/xjc''" +
- " jaxb:extensionBindingPrefixes=''xjc''" +
- " jaxb:version=''1.0''" +
- " targetNamespace=''{0}''>",
- elementName.getNamespaceURI());
-
- writeImports(elementName, allParts);
-
- if(!asyncRespBeanBinding){
- print(
- "<xs:annotation><xs:appinfo>" +
- " <jaxb:schemaBindings>" +
- " <jaxb:package name=''{0}'' />" +
- " </jaxb:schemaBindings>" +
- "</xs:appinfo></xs:annotation>",
- wsdlModeler.getJavaPackage() );
- asyncRespBeanBinding = true;
- }
-
- print("<xs:element name=''{0}''>", elementName.getLocalPart());
- print("<xs:complexType>");
- print("<xs:sequence>");
-
-
- for(MessagePart p:allParts) {
- //rpclit wsdl:part must reference schema type not element, also it must exclude headers and mime parts
- if(p.getDescriptorKind() == SchemaKinds.XSD_ELEMENT){
- print("<xs:element ref=''types:{0}'' xmlns:types=''{1}''/>",p.getDescriptor().getLocalPart(), p.getDescriptor().getNamespaceURI());
- }else{
- print("<xs:element name=''{0}'' type=''{1}'' xmlns=''{2}'' />",
- p.getName(),
- p.getDescriptor().getLocalPart(),
- p.getDescriptor().getNamespaceURI() );
- }
- }
-
- print("</xs:sequence>");
- print("</xs:complexType>");
- print("</xs:element>");
- print("</xs:schema>");
-
- // reset the StringWriter, so that next operation element could be written
- if(buf.toString().length() > 0){
- //System.out.println("Response bean Schema for operation========> "+ elementName+"\n\n"+buf);
- InputSource is = new InputSource(new StringReader(buf.toString()));
- schemas.add(is);
- buf.getBuffer().setLength(0);
- }
- }
-
- private QName getOperationName(String operationName){
- if(operationName == null)
- return null;
-// String namespaceURI = wsdlDocument.getDefinitions().getTargetNamespaceURI()+"?"+portType.getName()+"?" + operationName;
- String namespaceURI = "";
- return new QName(namespaceURI, operationName+"Response");
- }
-
- private void print( String msg ) {
- print( msg, new Object[0] );
- }
- private void print( String msg, Object arg1 ) {
- print( msg, new Object[]{arg1} );
- }
- private void print( String msg, Object arg1, Object arg2 ) {
- print( msg, new Object[]{arg1, arg2} );
- }
- private void print( String msg, Object arg1, Object arg2, Object arg3 ) {
- print( msg, new Object[]{arg1,arg2,arg3} );
- }
- private void print( String msg, Object[] args ) {
- buf.write(MessageFormat.format(msg,args));
- buf.write('\n');
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModeler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModeler.java
deleted file mode 100644
index 1aa0f5fb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModeler.java
+++ /dev/null
@@ -1,2821 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.processor.modeler.wsdl;
-
-import com.sun.codemodel.internal.JType;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.SAXParseException2;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.processor.generator.Names;
-import com.sun.tools.internal.ws.processor.model.*;
-import com.sun.tools.internal.ws.processor.model.Fault;
-import com.sun.tools.internal.ws.processor.model.Operation;
-import com.sun.tools.internal.ws.processor.model.Port;
-import com.sun.tools.internal.ws.processor.model.Service;
-import com.sun.tools.internal.ws.processor.model.java.*;
-import com.sun.tools.internal.ws.processor.model.jaxb.*;
-import com.sun.tools.internal.ws.processor.modeler.JavaSimpleTypeCreator;
-import com.sun.tools.internal.ws.processor.util.ClassNameCollector;
-import com.sun.tools.internal.ws.resources.ModelerMessages;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.tools.internal.ws.wsdl.document.*;
-import com.sun.tools.internal.ws.wsdl.document.Message;
-import com.sun.tools.internal.ws.wsdl.document.jaxws.CustomName;
-import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBinding;
-import com.sun.tools.internal.ws.wsdl.document.mime.MIMEContent;
-import com.sun.tools.internal.ws.wsdl.document.schema.SchemaKinds;
-import com.sun.tools.internal.ws.wsdl.document.soap.*;
-import com.sun.tools.internal.ws.wsdl.framework.*;
-import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder;
-import com.sun.tools.internal.ws.wsdl.parser.WSDLParser;
-import com.sun.tools.internal.xjc.api.S2JJAXBModel;
-import com.sun.tools.internal.xjc.api.TypeAndAnnotation;
-import com.sun.tools.internal.xjc.api.XJC;
-import com.sun.xml.internal.ws.spi.db.BindingHelper;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.LocatorImpl;
-
-import javax.jws.WebParam.Mode;
-import javax.xml.namespace.QName;
-import java.util.*;
-import java.io.IOException;
-
-
-/**
- * The WSDLModeler processes a WSDL to create a Model.
- *
- * @author WS Development Team
- */
-public class WSDLModeler extends WSDLModelerBase {
-
- //map of wsdl:operation QName to <soapenv:Body> child, as per BP it must be unique in a port
- private final Map<QName, Operation> uniqueBodyBlocks = new HashMap<QName, Operation>();
- private final QName VOID_BODYBLOCK = new QName("");
- private final ClassNameCollector classNameCollector;
- private final String explicitDefaultPackage;
-
- public WSDLModeler(WsimportOptions options, ErrorReceiver receiver, MetadataFinder forest) {
- super(options, receiver,forest);
- this.classNameCollector = new ClassNameCollector();
- this.explicitDefaultPackage = options.defaultPackage;
- }
-
-
- protected enum StyleAndUse {
- RPC_LITERAL, DOC_LITERAL
- }
-
- private JAXBModelBuilder jaxbModelBuilder;
-
- @Override
- public Model buildModel() {
- try {
- parser = new WSDLParser(options, errReceiver, forest);
- parser.addParserListener(new ParserListener() {
- @Override
- public void ignoringExtension(Entity entity, QName name, QName parent) {
- if (parent.equals(WSDLConstants.QNAME_TYPES)) {
- // check for a schema element with the wrong namespace URI
- if (name.getLocalPart().equals("schema")
- && !name.getNamespaceURI().equals("")) {
- warning(entity, ModelerMessages.WSDLMODELER_WARNING_IGNORING_UNRECOGNIZED_SCHEMA_EXTENSION(name.getNamespaceURI()));
- }
- }
-
- }
-
- @Override
- public void doneParsingEntity(QName element, Entity entity) {
- }
- });
-
- document = parser.parse();
- if (document == null || document.getDefinitions() == null) {
- return null;
- }
-
- document.validateLocally();
- Model model = internalBuildModel(document);
- if (model == null || errReceiver.hadError()) {
- return null;
- }
- //ClassNameCollector classNameCollector = new ClassNameCollector();
- classNameCollector.process(model);
- if (classNameCollector.getConflictingClassNames().isEmpty()) {
- if (errReceiver.hadError()) {
- return null;
- }
- return model;
- }
- // do another pass, this time with conflict resolution enabled
- model = internalBuildModel(document);
-
- classNameCollector.process(model);
- if (classNameCollector.getConflictingClassNames().isEmpty()) {
- // we're done
- if (errReceiver.hadError()) {
- return null;
- }
- return model;
- }
- // give up
- StringBuilder conflictList = new StringBuilder();
- boolean first = true;
- for (Iterator iter =
- classNameCollector.getConflictingClassNames().iterator();
- iter.hasNext();
- ) {
- if (!first) {
- conflictList.append(", ");
- } else {
- first = false;
- }
- conflictList.append((String) iter.next());
- }
- error(document.getDefinitions(), ModelerMessages.WSDLMODELER_UNSOLVABLE_NAMING_CONFLICTS(conflictList.toString()));
- } catch (ModelException e) {
- reportError(document.getDefinitions(), e.getMessage(), e);
- } catch (ParseException e) {
- errReceiver.error(e);
- } catch (ValidationException e) {
- errReceiver.error(e.getMessage(), e);
- } catch (SAXException e) {
- errReceiver.error(e);
- } catch (IOException e) {
- errReceiver.error(e);
- }
- //should never reach here
- return null;
- }
-
- private Model internalBuildModel(WSDLDocument document) {
- numPasses++;
-
- //build the jaxbModel to be used latter
- buildJAXBModel(document);
-
- QName modelName =
- new QName(
- document.getDefinitions().getTargetNamespaceURI(),
- document.getDefinitions().getName() == null
- ? "model"
- : document.getDefinitions().getName());
- Model model = new Model(modelName, document.getDefinitions());
- model.setJAXBModel(getJAXBModelBuilder().getJAXBModel());
-
- // This fails with the changed classname (WSDLModeler to WSDLModeler11 etc.)
- // with this source comaptibility change the WSDL Modeler class name is changed. Right now hardcoding the
- // modeler class name to the same one being checked in WSDLGenerator.
-
- model.setProperty(
- ModelProperties.PROPERTY_MODELER_NAME,
- ModelProperties.WSDL_MODELER_NAME);
-
- _javaExceptions = new HashMap<String, JavaException>();
- _bindingNameToPortMap = new HashMap<QName, Port>();
-
- // grab target namespace
- model.setTargetNamespaceURI(document.getDefinitions().getTargetNamespaceURI());
-
- setDocumentationIfPresent(model,
- document.getDefinitions().getDocumentation());
-
- boolean hasServices = document.getDefinitions().services().hasNext();
- if (hasServices) {
- for (Iterator iter = document.getDefinitions().services();
- iter.hasNext();
- ) {
- processService((com.sun.tools.internal.ws.wsdl.document.Service) iter.next(),
- model, document);
- }
- } else {
- // emit a warning if there are no service definitions
- warning(model.getEntity(), ModelerMessages.WSDLMODELER_WARNING_NO_SERVICE_DEFINITIONS_FOUND());
- }
-
- return model;
- }
-
- /* (non-Javadoc)
- * @see WSDLModelerBase#processService(Service, Model, WSDLDocument)
- */
- protected void processService(com.sun.tools.internal.ws.wsdl.document.Service wsdlService, Model model, WSDLDocument document) {
- QName serviceQName = getQNameOf(wsdlService);
- String serviceInterface = getServiceInterfaceName(serviceQName, wsdlService);
- if (isConflictingServiceClassName(serviceInterface)) {
- serviceInterface += "_Service";
- }
- Service service =
- new Service(
- serviceQName,
- new JavaInterface(serviceInterface, serviceInterface + "Impl"), wsdlService);
-
- setDocumentationIfPresent(service, wsdlService.getDocumentation());
- boolean hasPorts = false;
- for (Iterator iter = wsdlService.ports(); iter.hasNext();) {
- boolean processed =
- processPort(
- (com.sun.tools.internal.ws.wsdl.document.Port) iter.next(),
- service,
- document);
- hasPorts = hasPorts || processed;
- }
- if (!hasPorts) {
- // emit a warning if there are no ports
- warning(wsdlService, ModelerMessages.WSDLMODELER_WARNING_NO_PORTS_IN_SERVICE(wsdlService.getName()));
- } else {
- model.addService(service);
- }
- }
-
- /* (non-Javadoc)
- * @see WSDLModelerBase#processPort(WSDLPort, Service, WSDLDocument)
- */
- protected boolean processPort(com.sun.tools.internal.ws.wsdl.document.Port wsdlPort,
- Service service, WSDLDocument document) {
- try {
-
- //clear the unique block map
- uniqueBodyBlocks.clear();
-
- QName portQName = getQNameOf(wsdlPort);
- Port port = new Port(portQName, wsdlPort);
-
- setDocumentationIfPresent(port, wsdlPort.getDocumentation());
-
- SOAPAddress soapAddress =
- (SOAPAddress) getExtensionOfType(wsdlPort, SOAPAddress.class);
- if (soapAddress == null) {
- if(options.isExtensionMode()){
- warning(wsdlPort, ModelerMessages.WSDLMODELER_WARNING_NO_SOAP_ADDRESS(wsdlPort.getName()));
- }else{
- // not a SOAP port, ignore it
- warning(wsdlPort, ModelerMessages.WSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT_NO_ADDRESS(wsdlPort.getName()));
- return false;
- }
- }
- if (soapAddress != null) {
- port.setAddress(soapAddress.getLocation());
- }
- Binding binding = wsdlPort.resolveBinding(document);
- QName bindingName = getQNameOf(binding);
- PortType portType = binding.resolvePortType(document);
-
- port.setProperty(
- ModelProperties.PROPERTY_WSDL_PORT_NAME,
- getQNameOf(wsdlPort));
- port.setProperty(
- ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME,
- getQNameOf(portType));
- port.setProperty(
- ModelProperties.PROPERTY_WSDL_BINDING_NAME,
- bindingName);
-
- boolean isProvider = isProvider(wsdlPort);
- if (_bindingNameToPortMap.containsKey(bindingName) && !isProvider) {
- // this binding has been processed before
- Port existingPort =
- _bindingNameToPortMap.get(bindingName);
- port.setOperations(existingPort.getOperations());
- port.setJavaInterface(existingPort.getJavaInterface());
- port.setStyle(existingPort.getStyle());
- port.setWrapped(existingPort.isWrapped());
- } else {
- // find out the SOAP binding extension, if any
- SOAPBinding soapBinding =
- (SOAPBinding) getExtensionOfType(binding, SOAPBinding.class);
-
- if (soapBinding == null) {
- soapBinding =
- (SOAPBinding) getExtensionOfType(binding, SOAP12Binding.class);
- if (soapBinding == null) {
- if(!options.isExtensionMode()){
- // cannot deal with non-SOAP ports
- warning(wsdlPort, ModelerMessages.WSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT(wsdlPort.getName()));
- return false;
- }else{
- warning(wsdlPort, ModelerMessages.WSDLMODELER_WARNING_NON_SOAP_PORT(wsdlPort.getName()));
- }
- }else{
- // we can only do soap1.2 if extensions are on
- if (options.isExtensionMode()) {
- warning(wsdlPort, ModelerMessages.WSDLMODELER_WARNING_PORT_SOAP_BINDING_12(wsdlPort.getName()));
- } else {
- warning(wsdlPort, ModelerMessages.WSDLMODELER_WARNING_IGNORING_SOAP_BINDING_12(wsdlPort.getName()));
- return false;
- }
- }
- }
-
- if (soapBinding != null && (soapBinding.getTransport() == null
- || (!soapBinding.getTransport().equals(
- SOAPConstants.URI_SOAP_TRANSPORT_HTTP) && !soapBinding.getTransport().equals(
- SOAP12Constants.URI_SOAP_TRANSPORT_HTTP)))) {
- if (!options.isExtensionMode()) {
- // cannot deal with non-HTTP ports
- warning(wsdlPort, ModelerMessages.WSDLMODELER_WARNING_IGNORING_SOAP_BINDING_NON_HTTP_TRANSPORT(wsdlPort.getName()));
- return false;
- }
-
- }
-
- /**
- * validate wsdl:binding uniqueness in style, e.g. rpclit or doclit
- * ref: WSI BP 1.1 R 2705
- */
- if (soapBinding != null && !validateWSDLBindingStyle(binding)) {
- if (options.isExtensionMode()) {
- warning(wsdlPort, ModelerMessages.WSDLMODELER_WARNING_PORT_SOAP_BINDING_MIXED_STYLE(wsdlPort.getName()));
- } else {
- error(wsdlPort, ModelerMessages.WSDLMODELER_WARNING_IGNORING_SOAP_BINDING_MIXED_STYLE(wsdlPort.getName()));
- }
- }
-
- if(soapBinding != null){
- port.setStyle(soapBinding.getStyle());
- }
-
- boolean hasOverloadedOperations = false;
- Set<String> operationNames = new HashSet<String>();
- for (Iterator iter = portType.operations(); iter.hasNext();) {
- com.sun.tools.internal.ws.wsdl.document.Operation operation =
- (com.sun.tools.internal.ws.wsdl.document.Operation) iter.next();
-
- if (operationNames.contains(operation.getName())) {
- hasOverloadedOperations = true;
- break;
- }
- operationNames.add(operation.getName());
-
- for (Iterator itr = binding.operations();
- iter.hasNext();
- ) {
- BindingOperation bindingOperation =
- (BindingOperation) itr.next();
- if (operation
- .getName()
- .equals(bindingOperation.getName())) {
- break;
- } else if (!itr.hasNext()) {
- error(bindingOperation, ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_NOT_FOUND(operation.getName(), bindingOperation.getName()));
- }
- }
- }
-
- Map headers = new HashMap();
- boolean hasOperations = false;
- for (Iterator iter = binding.operations(); iter.hasNext();) {
- BindingOperation bindingOperation =
- (BindingOperation) iter.next();
-
- com.sun.tools.internal.ws.wsdl.document.Operation portTypeOperation =
- null;
- Set operations =
- portType.getOperationsNamed(bindingOperation.getName());
- if (operations.isEmpty()) {
- // the WSDL document is invalid
- error(bindingOperation, ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_NOT_IN_PORT_TYPE(bindingOperation.getName(), binding.getName()));
- } else if (operations.size() == 1) {
- portTypeOperation =
- (com.sun.tools.internal.ws.wsdl.document.Operation) operations
- .iterator()
- .next();
- } else {
- boolean found = false;
- String expectedInputName =
- bindingOperation.getInput().getName();
- String expectedOutputName =
- bindingOperation.getOutput().getName();
-
- for (Iterator iter2 = operations.iterator(); iter2.hasNext();) {
- com.sun.tools.internal.ws.wsdl.document.Operation candidateOperation =
- (com.sun.tools.internal.ws.wsdl.document.Operation) iter2
- .next();
-
- if (expectedInputName == null) {
- // the WSDL document is invalid
- error(bindingOperation, ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_MISSING_INPUT_NAME(bindingOperation.getName()));
- }
- if (expectedOutputName == null) {
- // the WSDL document is invalid
- error(bindingOperation, ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_MISSING_OUTPUT_NAME(bindingOperation.getName()));
- }
- if (expectedInputName
- .equals(candidateOperation.getInput().getName())
- && expectedOutputName.equals(
- candidateOperation
- .getOutput()
- .getName())) {
- if (found) {
- // the WSDL document is invalid
- error(bindingOperation, ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_MATCHING_OPERATIONS(bindingOperation.getName(), bindingOperation.getName()));
- }
- // got it!
- found = true;
- portTypeOperation = candidateOperation;
- }
- }
- if (!found) {
- // the WSDL document is invalid
- error(bindingOperation, ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_NOT_FOUND(bindingOperation.getName(), binding.getName()));
- }
- }
- if (!isProvider) {
- this.info =
- new ProcessSOAPOperationInfo(
- port,
- wsdlPort,
- portTypeOperation,
- bindingOperation,
- soapBinding,
- document,
- hasOverloadedOperations,
- headers);
-
-
- Operation operation;
- if (soapBinding != null) {
- operation = processSOAPOperation();
- } else {
- operation = processNonSOAPOperation();
- }
- if (operation != null) {
- port.addOperation(operation);
- hasOperations = true;
- }
- }
- }
- if (!isProvider && !hasOperations) {
- // emit a warning if there are no operations, except when its a provider port
- warning(wsdlPort, ModelerMessages.WSDLMODELER_WARNING_NO_OPERATIONS_IN_PORT(wsdlPort.getName()));
- return false;
- }
- createJavaInterfaceForPort(port, isProvider);
- PortType pt = binding.resolvePortType(document);
- String jd = (pt.getDocumentation() != null) ? pt.getDocumentation().getContent() : null;
- port.getJavaInterface().setJavaDoc(jd);
- _bindingNameToPortMap.put(bindingName, port);
- }
-
- service.addPort(port);
- applyPortMethodCustomization(port, wsdlPort);
- applyWrapperStyleCustomization(port, binding.resolvePortType(document));
-
- return true;
-
- } catch (NoSuchEntityException e) {
- warning(document.getDefinitions(), e.getMessage());
- // should not happen
- return false;
- }
- }
-
- /**
- * Returns an operation purely from abstract operation
- */
- private Operation processNonSOAPOperation() {
- Operation operation =
- new Operation(new QName(null, info.bindingOperation.getName()), info.bindingOperation);
-
- setDocumentationIfPresent(
- operation,
- info.portTypeOperation.getDocumentation());
-
- if (info.portTypeOperation.getStyle()
- != OperationStyle.REQUEST_RESPONSE
- && info.portTypeOperation.getStyle() != OperationStyle.ONE_WAY) {
- if (options.isExtensionMode()) {
- warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_SUPPORTED_STYLE(info.portTypeOperation.getName()));
- return null;
- } else {
- error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_NOT_SUPPORTED_STYLE(info.portTypeOperation.getName(),
- info.port.resolveBinding(document).resolvePortType(document).getName()));
- }
- }
-
- boolean isRequestResponse = info.portTypeOperation.getStyle() == OperationStyle.REQUEST_RESPONSE;
- Message inputMessage = getInputMessage();
- Request request = new Request(inputMessage, errReceiver);
- request.setErrorReceiver(errReceiver);
- info.operation = operation;
- info.operation.setWSDLPortTypeOperation(info.portTypeOperation);
-
- Response response;
-
- Message outputMessage = null;
- if (isRequestResponse) {
- outputMessage = getOutputMessage();
- response = new Response(outputMessage, errReceiver);
- }else{
- response = new Response(null, errReceiver);
- }
-
- //set the style based on heuristic that message has either all parts defined
- // using type(RPC) or element(DOCUMENT)
- setNonSoapStyle(inputMessage, outputMessage);
-
- // Process parameterOrder and get the parameterList
- List<MessagePart> parameterList = getParameterOrder();
-
- boolean unwrappable = isUnwrappable();
- info.operation.setWrapped(unwrappable);
- List<Parameter> params = getDoclitParameters(request, response, parameterList);
- if (!validateParameterName(params)) {
- return null;
- }
-
- // create a definitive list of parameters to match what we'd like to get
- // in the java interface (which is generated much later), parameterOrder
- List<Parameter> definitiveParameterList = new ArrayList<Parameter>();
- for (Parameter param : params) {
- if (param.isReturn()) {
- info.operation.setProperty(WSDL_RESULT_PARAMETER, param);
- response.addParameter(param);
- continue;
- }
- if (param.isIN()) {
- request.addParameter(param);
- } else if (param.isOUT()) {
- response.addParameter(param);
- } else if (param.isINOUT()) {
- request.addParameter(param);
- response.addParameter(param);
- }
- definitiveParameterList.add(param);
- }
-
- info.operation.setRequest(request);
-
- if (isRequestResponse) {
- info.operation.setResponse(response);
- }
-
- // faults with duplicate names
- Set duplicateNames = getDuplicateFaultNames();
-
- // handle soap:fault
- handleLiteralSOAPFault(response, duplicateNames);
- info.operation.setProperty(
- WSDL_PARAMETER_ORDER,
- definitiveParameterList);
-
- Binding binding = info.port.resolveBinding(document);
- PortType portType = binding.resolvePortType(document);
- if (isAsync(portType, info.portTypeOperation)) {
- warning(portType, "Can not generate Async methods for non-soap binding!");
- }
- return info.operation;
- }
-
- /**
- * This method is added to fix one of the use case for j2ee se folks, so that we determine
- * for non_soap wsdl what could be the style - rpc or document based on parts in the message.
- *
- * We assume that the message parts could have either all of them with type attribute (RPC)
- * or element (DOCUMENT)
- *
- * Shall this check if parts are mixed and throw error message?
- */
- private void setNonSoapStyle(Message inputMessage, Message outputMessage) {
- SOAPStyle style = SOAPStyle.DOCUMENT;
- for(MessagePart part:inputMessage.getParts()){
- if (part.getDescriptorKind() == SchemaKinds.XSD_TYPE) {
- style = SOAPStyle.RPC;
- } else {
- style = SOAPStyle.DOCUMENT;
- }
- }
-
- //check the outputMessage parts
- if(outputMessage != null){
- for(MessagePart part:outputMessage.getParts()){
- if (part.getDescriptorKind() == SchemaKinds.XSD_TYPE) {
- style = SOAPStyle.RPC;
- } else {
- style = SOAPStyle.DOCUMENT;
- }
- }
- }
- info.modelPort.setStyle(style);
- }
-
- /* (non-Javadoc)
- * @see WSDLModelerBase#processSOAPOperation()
- */
- protected Operation processSOAPOperation() {
- Operation operation =
- new Operation(new QName(null, info.bindingOperation.getName()), info.bindingOperation);
-
- setDocumentationIfPresent(
- operation,
- info.portTypeOperation.getDocumentation());
-
- if (info.portTypeOperation.getStyle()
- != OperationStyle.REQUEST_RESPONSE
- && info.portTypeOperation.getStyle() != OperationStyle.ONE_WAY) {
- if (options.isExtensionMode()) {
- warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_SUPPORTED_STYLE(info.portTypeOperation.getName()));
- return null;
- } else {
- error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_NOT_SUPPORTED_STYLE(info.portTypeOperation.getName(),
- info.port.resolveBinding(document).resolvePortType(document).getName()));
- }
- }
-
- SOAPStyle soapStyle = info.soapBinding.getStyle();
-
- // find out the SOAP operation extension, if any
- SOAPOperation soapOperation =
- (SOAPOperation) getExtensionOfType(info.bindingOperation,
- SOAPOperation.class);
-
- if (soapOperation != null) {
- if (soapOperation.getStyle() != null) {
- soapStyle = soapOperation.getStyle();
- }
- if (soapOperation.getSOAPAction() != null) {
- operation.setSOAPAction(soapOperation.getSOAPAction());
- }
- }
-
- operation.setStyle(soapStyle);
-
- String uniqueOperationName =
- getUniqueName(info.portTypeOperation, info.hasOverloadedOperations);
- if (info.hasOverloadedOperations) {
- operation.setUniqueName(uniqueOperationName);
- }
-
- info.operation = operation;
-
- //attachment
- SOAPBody soapRequestBody = getSOAPRequestBody();
- if (soapRequestBody == null) {
- // the WSDL document is invalid
- error(info.bindingOperation, ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_INPUT_MISSING_SOAP_BODY(info.bindingOperation.getName()));
- }
-
- if (soapStyle == SOAPStyle.RPC) {
- if (soapRequestBody.isEncoded()) {
- if(options.isExtensionMode()){
- warning(soapRequestBody, ModelerMessages.WSDLMODELER_20_RPCENC_NOT_SUPPORTED());
- processNonSOAPOperation();
- }else{
- error(soapRequestBody, ModelerMessages.WSDLMODELER_20_RPCENC_NOT_SUPPORTED());
- }
- }
- return processLiteralSOAPOperation(StyleAndUse.RPC_LITERAL);
- }
- // document style
- return processLiteralSOAPOperation(StyleAndUse.DOC_LITERAL);
- }
-
- protected Operation processLiteralSOAPOperation(StyleAndUse styleAndUse) {
- //returns false if the operation name is not acceptable
- if (!applyOperationNameCustomization()) {
- return null;
- }
-
- boolean isRequestResponse = info.portTypeOperation.getStyle() == OperationStyle.REQUEST_RESPONSE;
- Message inputMessage = getInputMessage();
- Request request = new Request(inputMessage, errReceiver);
- request.setErrorReceiver(errReceiver);
- info.operation.setUse(SOAPUse.LITERAL);
- info.operation.setWSDLPortTypeOperation(info.portTypeOperation);
- SOAPBody soapRequestBody = getSOAPRequestBody();
- if ((StyleAndUse.DOC_LITERAL == styleAndUse) && (soapRequestBody.getNamespace() != null)) {
- warning(soapRequestBody, ModelerMessages.WSDLMODELER_WARNING_R_2716("soapbind:body", info.bindingOperation.getName()));
- }
-
-
- Response response;
-
- SOAPBody soapResponseBody = null;
- Message outputMessage = null;
- if (isRequestResponse) {
- soapResponseBody = getSOAPResponseBody();
- if (isOperationDocumentLiteral(styleAndUse) && (soapResponseBody.getNamespace() != null)) {
- warning(soapResponseBody, ModelerMessages.WSDLMODELER_WARNING_R_2716("soapbind:body", info.bindingOperation.getName()));
- }
- outputMessage = getOutputMessage();
- response = new Response(outputMessage, errReceiver);
- }else{
- response = new Response(null, errReceiver);
- }
-
- //ignore operation if there are more than one root part
- if (!validateMimeParts(getMimeParts(info.bindingOperation.getInput())) ||
- !validateMimeParts(getMimeParts(info.bindingOperation.getOutput()))) {
- return null;
- }
-
- if (!validateBodyParts(info.bindingOperation)) {
- // BP 1.1
- // R2204 A document-literal binding in a DESCRIPTION MUST refer, in each of its soapbind:body element(s),
- // only to wsdl:part element(s) that have been defined using the element attribute.
-
- // R2203 An rpc-literal binding in a DESCRIPTION MUST refer, in its soapbind:body element(s),
- // only to wsdNl:part element(s) that have been defined using the type attribute.
- if (isOperationDocumentLiteral(styleAndUse)) {
- if (options.isExtensionMode()) {
- warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_TYPE_MESSAGE_PART(info.portTypeOperation.getName()));
- } else {
- error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_DOCLITOPERATION(info.portTypeOperation.getName()));
- }
- } else if (isOperationRpcLiteral(styleAndUse)) {
- if (options.isExtensionMode()) {
- warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_ELEMENT_MESSAGE_PART(info.portTypeOperation.getName()));
- } else {
- error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_RPCLITOPERATION(info.portTypeOperation.getName()));
- }
- }
- return null;
- }
-
- // Process parameterOrder and get the parameterList
- List<MessagePart> parameterList = getParameterOrder();
-
- //binding is invalid in the wsdl, ignore the operation.
- if (!setMessagePartsBinding(styleAndUse)) {
- return null;
- }
-
- List<Parameter> params = null;
- boolean unwrappable = isUnwrappable();
- info.operation.setWrapped(unwrappable);
- if (isOperationDocumentLiteral(styleAndUse)) {
- params = getDoclitParameters(request, response, parameterList);
- } else if (isOperationRpcLiteral(styleAndUse)) {
- String operationName = info.bindingOperation.getName();
- Block reqBlock = null;
- if (inputMessage != null) {
- QName name = new QName(getRequestNamespaceURI(soapRequestBody), operationName);
- RpcLitStructure rpcStruct = new RpcLitStructure(name, getJAXBModelBuilder().getJAXBModel());
- rpcStruct.setJavaType(new JavaSimpleType("com.sun.xml.internal.ws.encoding.jaxb.RpcLitPayload", null));
- reqBlock = new Block(name, rpcStruct, inputMessage);
- request.addBodyBlock(reqBlock);
- }
-
- Block resBlock = null;
- if (isRequestResponse && outputMessage != null) {
- QName name = new QName(getResponseNamespaceURI(soapResponseBody), operationName + "Response");
- RpcLitStructure rpcStruct = new RpcLitStructure(name, getJAXBModelBuilder().getJAXBModel());
- rpcStruct.setJavaType(new JavaSimpleType("com.sun.xml.internal.ws.encoding.jaxb.RpcLitPayload", null));
- resBlock = new Block(name, rpcStruct, outputMessage);
- response.addBodyBlock(resBlock);
- }
- params = getRpcLitParameters(request, response, reqBlock, resBlock, parameterList);
- }
-
-
- if (!validateParameterName(params)) {
- return null;
- }
-
- // create a definitive list of parameters to match what we'd like to get
- // in the java interface (which is generated much later), parameterOrder
- List<Parameter> definitiveParameterList = new ArrayList<Parameter>();
- for (Parameter param : params) {
- if (param.isReturn()) {
- info.operation.setProperty(WSDL_RESULT_PARAMETER, param);
- response.addParameter(param);
- continue;
- }
- if (param.isIN()) {
- request.addParameter(param);
- } else if (param.isOUT()) {
- response.addParameter(param);
- } else if (param.isINOUT()) {
- request.addParameter(param);
- response.addParameter(param);
- }
- definitiveParameterList.add(param);
- }
-
- info.operation.setRequest(request);
-
- if (isRequestResponse) {
- info.operation.setResponse(response);
- }
-
- Iterator<Block> bb = request.getBodyBlocks();
- QName body;
- Operation thatOp;
- if (bb.hasNext()) {
- body = bb.next().getName();
- thatOp = uniqueBodyBlocks.get(body);
- } else {
- //there is no body block
- body = VOID_BODYBLOCK;
- thatOp = uniqueBodyBlocks.get(VOID_BODYBLOCK);
- }
-
- if(thatOp != null){
- if(options.isExtensionMode()){
- warning(info.port, ModelerMessages.WSDLMODELER_NON_UNIQUE_BODY_WARNING(info.port.getName(), info.operation.getName(), thatOp.getName(), body));
- }else{
- error(info.port, ModelerMessages.WSDLMODELER_NON_UNIQUE_BODY_ERROR(info.port.getName(), info.operation.getName(), thatOp.getName(), body));
- }
- }else{
- uniqueBodyBlocks.put(body, info.operation);
- }
-
- //Add additional headers
- if (options.additionalHeaders) {
- List<Parameter> additionalHeaders = new ArrayList<Parameter>();
- if (inputMessage != null) {
- for (MessagePart part : getAdditionHeaderParts(info.bindingOperation, inputMessage, true)) {
- QName name = part.getDescriptor();
- JAXBType jaxbType = getJAXBType(part);
- Block block = new Block(name, jaxbType, part);
- Parameter param = ModelerUtils.createParameter(part.getName(), jaxbType, block);
- additionalHeaders.add(param);
- request.addHeaderBlock(block);
- request.addParameter(param);
- definitiveParameterList.add(param);
- }
- }
-
- if (isRequestResponse && outputMessage != null) {
- List<Parameter> outParams = new ArrayList<Parameter>();
- for (MessagePart part : getAdditionHeaderParts(info.bindingOperation,outputMessage, false)) {
- QName name = part.getDescriptor();
- JAXBType jaxbType = getJAXBType(part);
- Block block = new Block(name, jaxbType, part);
- Parameter param = ModelerUtils.createParameter(part.getName(), jaxbType, block);
- param.setMode(Mode.OUT);
- outParams.add(param);
- response.addHeaderBlock(block);
- response.addParameter(param);
- }
- for (Parameter outParam : outParams) {
- for (Parameter inParam : additionalHeaders) {
- if (inParam.getName().equals(outParam.getName()) &&
- inParam.getBlock().getName().equals(outParam.getBlock().getName())) {
- //it is INOUT
- inParam.setMode(Mode.INOUT);
- outParam.setMode(Mode.INOUT);
- break;
- }
- }
- if (outParam.isOUT()) {
- definitiveParameterList.add(outParam);
- }
- }
- }
- }
-
- // faults with duplicate names
- Set duplicateNames = getDuplicateFaultNames();
-
- // handle soap:fault
- handleLiteralSOAPFault(response, duplicateNames);
- info.operation.setProperty(
- WSDL_PARAMETER_ORDER,
- definitiveParameterList);
-
- //set Async property
- Binding binding = info.port.resolveBinding(document);
- PortType portType = binding.resolvePortType(document);
- if (isAsync(portType, info.portTypeOperation)) {
- addAsyncOperations(info.operation, styleAndUse);
- }
-
- return info.operation;
- }
-
-
- private boolean validateParameterName(List<Parameter> params) {
- if (options.isExtensionMode()) {
- return true;
- }
-
- Message msg = getInputMessage();
- for (Parameter param : params) {
- if (param.isOUT()) {
- continue;
- }
- if (param.getCustomName() != null) {
- if (Names.isJavaReservedWord(param.getCustomName())) {
- error(param.getEntity(), ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(info.operation.getName(), param.getCustomName()));
- return false;
- }
- return true;
- }
- //process doclit wrapper style
- if (param.isEmbedded() && !(param.getBlock().getType() instanceof RpcLitStructure)) {
- if (Names.isJavaReservedWord(param.getName())) {
- error(param.getEntity(), ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(info.operation.getName(), param.getName(), param.getBlock().getName()));
- return false;
- }
- } else {
- //non-wrapper style and rpclit
- if (Names.isJavaReservedWord(param.getName())) {
- error(param.getEntity(), ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(info.operation.getName(), msg.getName(), param.getName()));
- return false;
- }
- }
- }
-
- boolean isRequestResponse = info.portTypeOperation.getStyle() == OperationStyle.REQUEST_RESPONSE;
- if (isRequestResponse) {
- msg = getOutputMessage();
- for (Parameter param : params) {
- if (param.isIN()) {
- continue;
- }
- if (param.getCustomName() != null) {
- if (Names.isJavaReservedWord(param.getCustomName())) {
- error(param.getEntity(), ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(info.operation.getName(), param.getCustomName()));
- return false;
- }
- return true;
- }
- //process doclit wrapper style
- if (param.isEmbedded() && !(param.getBlock().getType() instanceof RpcLitStructure)) {
- if (param.isReturn()) {
- continue;
- }
- if (!param.getName().equals("return") && Names.isJavaReservedWord(param.getName())) {
- error(param.getEntity(), ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(info.operation.getName(), param.getName(), param.getBlock().getName()));
- return false;
- }
- } else {
- if (param.isReturn()) {
- continue;
- }
-
- //non-wrapper style and rpclit
- if (Names.isJavaReservedWord(param.getName())) {
- error(param.getEntity(), ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(info.operation.getName(), msg.getName(), param.getName()));
- return false;
- }
- }
- }
- }
-
- return true;
- }
-
- private boolean enableMimeContent() {
- //first we look at binding operation
- JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(info.bindingOperation, JAXWSBinding.class);
- Boolean mimeContentMapping = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableMimeContentMapping() : null;
- if (mimeContentMapping != null) {
- return mimeContentMapping;
- }
-
- //then in wsdl:binding
- Binding binding = info.port.resolveBinding(info.document);
- jaxwsCustomization = (JAXWSBinding) getExtensionOfType(binding, JAXWSBinding.class);
- mimeContentMapping = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableMimeContentMapping() : null;
- if (mimeContentMapping != null) {
- return mimeContentMapping;
- }
-
- //at last look in wsdl:definitions
- jaxwsCustomization = (JAXWSBinding) getExtensionOfType(info.document.getDefinitions(), JAXWSBinding.class);
- mimeContentMapping = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableMimeContentMapping() : null;
- if (mimeContentMapping != null) {
- return mimeContentMapping;
- }
- return false;
- }
-
- private boolean applyOperationNameCustomization() {
- JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(info.portTypeOperation, JAXWSBinding.class);
- String operationName = (jaxwsCustomization != null) ? ((jaxwsCustomization.getMethodName() != null) ? jaxwsCustomization.getMethodName().getName() : null) : null;
- if (operationName != null) {
- if (Names.isJavaReservedWord(operationName)) {
- if (options.isExtensionMode()) {
- warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(info.operation.getName(), operationName));
- } else {
- error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(info.operation.getName(), operationName));
- }
- return false;
- }
-
- info.operation.setCustomizedName(operationName);
- }
-
- if (Names.isJavaReservedWord(info.operation.getJavaMethodName())) {
- if (options.isExtensionMode()) {
- warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(info.operation.getName()));
- } else {
- error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(info.operation.getName()));
- }
- return false;
- }
- return true;
- }
-
- protected String getAsyncOperationName(Operation operation) {
- String name = operation.getCustomizedName();
- if (name == null) {
- name = operation.getUniqueName();
- }
- return name;
- }
-
- /**
- * @param styleAndUse
- */
- private void addAsyncOperations(Operation syncOperation, StyleAndUse styleAndUse) {
- Operation operation = createAsyncOperation(syncOperation, styleAndUse, AsyncOperationType.POLLING);
- if (operation != null) {
- info.modelPort.addOperation(operation);
- }
-
- operation = createAsyncOperation(syncOperation, styleAndUse, AsyncOperationType.CALLBACK);
- if (operation != null) {
- info.modelPort.addOperation(operation);
- }
- }
-
- private Operation createAsyncOperation(Operation syncOperation, StyleAndUse styleAndUse, AsyncOperationType asyncType) {
- boolean isRequestResponse = info.portTypeOperation.getStyle() == OperationStyle.REQUEST_RESPONSE;
- if (!isRequestResponse) {
- return null;
- }
-
- //create async operations
- AsyncOperation operation = new AsyncOperation(info.operation, info.bindingOperation);
-
- //creation the async operation name: operationName+Async or customized name
- //operation.setName(new QName(operation.getName().getNamespaceURI(), getAsyncOperationName(info.portTypeOperation, operation)));
- if (asyncType.equals(AsyncOperationType.CALLBACK)) {
- operation.setUniqueName(info.operation.getUniqueName() + "_async_callback");
- } else if (asyncType.equals(AsyncOperationType.POLLING)) {
- operation.setUniqueName(info.operation.getUniqueName() + "_async_polling");
- }
-
- setDocumentationIfPresent(
- operation,
- info.portTypeOperation.getDocumentation());
-
- operation.setAsyncType(asyncType);
- operation.setSOAPAction(info.operation.getSOAPAction());
- boolean unwrappable = info.operation.isWrapped();
- operation.setWrapped(unwrappable);
- SOAPBody soapRequestBody = getSOAPRequestBody();
-
- Message inputMessage = getInputMessage();
- Request request = new Request(inputMessage, errReceiver);
-
- SOAPBody soapResponseBody = getSOAPResponseBody();
- Message outputMessage = getOutputMessage();
- Response response = new Response(outputMessage, errReceiver);
-
- // Process parameterOrder and get the parameterList
- java.util.List<String> parameterList = getAsynParameterOrder();
-
- List<Parameter> inParameters = null;
- if (isOperationDocumentLiteral(styleAndUse)) {
- inParameters = getRequestParameters(request, parameterList);
- // outParameters = getResponseParameters(response);
- // re-create parameterList with unwrapped parameters
- if (unwrappable) {
- List<String> unwrappedParameterList = new ArrayList<String>();
- if (inputMessage != null) {
- Iterator<MessagePart> parts = inputMessage.parts();
- if (parts.hasNext()) {
- MessagePart part = parts.next();
- JAXBType jaxbType = getJAXBType(part);
- List<JAXBProperty> memberList = jaxbType.getWrapperChildren();
- Iterator<JAXBProperty> props = memberList.iterator();
- while (props.hasNext()) {
- JAXBProperty prop = props.next();
- unwrappedParameterList.add(prop.getElementName().getLocalPart());
- }
- }
- }
-
- parameterList.clear();
- parameterList.addAll(unwrappedParameterList);
- }
- } else if (isOperationRpcLiteral(styleAndUse)) {
- String operationName = info.bindingOperation.getName();
- Block reqBlock = null;
- if (inputMessage != null) {
- QName name = new QName(getRequestNamespaceURI(soapRequestBody), operationName);
- RpcLitStructure rpcStruct = new RpcLitStructure(name, getJAXBModelBuilder().getJAXBModel());
- rpcStruct.setJavaType(new JavaSimpleType("com.sun.xml.internal.ws.encoding.jaxb.RpcLitPayload", null));
- reqBlock = new Block(name, rpcStruct, inputMessage);
- request.addBodyBlock(reqBlock);
- }
- inParameters = createRpcLitRequestParameters(request, parameterList, reqBlock);
- }
-
- // add response blocks, we dont need to create respnse parameters, just blocks will be fine, lets
- // copy them from sync optraions
- //copy the response blocks from the sync operation
- Iterator<Block> blocks = info.operation.getResponse().getBodyBlocks();
-
- while (blocks.hasNext()) {
- response.addBodyBlock(blocks.next());
- }
-
- blocks = info.operation.getResponse().getHeaderBlocks();
- while (blocks.hasNext()) {
- response.addHeaderBlock(blocks.next());
- }
-
- blocks = info.operation.getResponse().getAttachmentBlocks();
- while (blocks.hasNext()) {
- response.addAttachmentBlock(blocks.next());
- }
-
- List<MessagePart> outputParts = outputMessage.getParts();
-
- // handle headers
- int numOfOutMsgParts = outputParts.size();
-
- if (numOfOutMsgParts == 1) {
- MessagePart part = outputParts.get(0);
- if (isOperationDocumentLiteral(styleAndUse)) {
- JAXBType type = getJAXBType(part);
- operation.setResponseBean(type);
- } else if (isOperationRpcLiteral(styleAndUse)) {
- String operationName = info.bindingOperation.getName();
- Block resBlock = info.operation.getResponse().getBodyBlocksMap().get(new QName(getResponseNamespaceURI(soapResponseBody),
- operationName + "Response"));
-
- RpcLitStructure resBean = (RpcLitStructure) resBlock.getType();
- List<RpcLitMember> members = resBean.getRpcLitMembers();
- operation.setResponseBean(members.get(0));
- }
- } else {
- //create response bean
- String nspace = "";
- QName responseBeanName = new QName(nspace, getAsyncOperationName(info.operation) + "Response");
- JAXBType responseBeanType = getJAXBModelBuilder().getJAXBType(responseBeanName);
- if (responseBeanType == null) {
- error(info.operation.getEntity(), ModelerMessages.WSDLMODELER_RESPONSEBEAN_NOTFOUND(info.operation.getName()));
- }
- operation.setResponseBean(responseBeanType);
- }
-
- QName respBeanName = new QName(soapResponseBody.getNamespace(), getAsyncOperationName(info.operation) + "Response");
- Block block = new Block(respBeanName, operation.getResponseBeanType(), outputMessage);
- JavaType respJavaType = operation.getResponseBeanJavaType();
- JAXBType respType = new JAXBType(respBeanName, respJavaType);
- Parameter respParam = ModelerUtils.createParameter(info.operation.getName() + "Response", respType, block);
- respParam.setParameterIndex(-1);
- response.addParameter(respParam);
- operation.setProperty(WSDL_RESULT_PARAMETER, respParam.getName());
-
-
- int parameterOrderPosition = 0;
- for (String name : parameterList) {
- Parameter inParameter = ModelerUtils.getParameter(name, inParameters);
- if (inParameter == null) {
- if (options.isExtensionMode()) {
- warning(info.operation.getEntity(), ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_PART_NOT_FOUND(info.operation.getName().getLocalPart(), name));
- } else {
- error(info.operation.getEntity(), ModelerMessages.WSDLMODELER_ERROR_PART_NOT_FOUND(info.operation.getName().getLocalPart(), name));
- }
- return null;
- }
- request.addParameter(inParameter);
- inParameter.setParameterIndex(parameterOrderPosition);
- parameterOrderPosition++;
- }
-
- operation.setResponse(response);
-
- // add callback handlerb Parameter to request
- if (operation.getAsyncType().equals(AsyncOperationType.CALLBACK)) {
- JavaType cbJavaType = operation.getCallBackType();
- JAXBType callbackType = new JAXBType(respBeanName, cbJavaType);
- Parameter cbParam = ModelerUtils.createParameter("asyncHandler", callbackType, block);
- request.addParameter(cbParam);
- }
-
- operation.setRequest(request);
-
- return operation;
- }
-
- protected boolean isAsync(com.sun.tools.internal.ws.wsdl.document.PortType portType, com.sun.tools.internal.ws.wsdl.document.Operation wsdlOperation) {
- //First look into wsdl:operation
- JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(wsdlOperation, JAXWSBinding.class);
- Boolean isAsync = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableAsyncMapping() : null;
-
- if (isAsync != null) {
- return isAsync;
- }
-
- // then into wsdl:portType
- jaxwsCustomization = (JAXWSBinding) getExtensionOfType(portType, JAXWSBinding.class);
- isAsync = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableAsyncMapping() : null;
- if (isAsync != null) {
- return isAsync;
- }
-
- //then wsdl:definitions
- jaxwsCustomization = (JAXWSBinding) getExtensionOfType(document.getDefinitions(), JAXWSBinding.class);
- isAsync = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableAsyncMapping() : null;
- if (isAsync != null) {
- return isAsync;
- }
- return false;
- }
-
- protected void handleLiteralSOAPHeaders(Request request, Response response, Iterator headerParts, Set duplicateNames, @NotNull List<String> definitiveParameterList, boolean processRequest) {
- QName headerName;
- Block headerBlock;
- JAXBType jaxbType;
- int parameterOrderPosition = definitiveParameterList.size();
- while (headerParts.hasNext()) {
- MessagePart part = (MessagePart) headerParts.next();
- headerName = part.getDescriptor();
- jaxbType = getJAXBType(part);
- headerBlock = new Block(headerName, jaxbType, part);
- TWSDLExtensible ext;
- if (processRequest) {
- ext = info.bindingOperation.getInput();
- } else {
- ext = info.bindingOperation.getOutput();
- }
- Message headerMessage = getHeaderMessage(part, ext);
-
- if (processRequest) {
- request.addHeaderBlock(headerBlock);
- } else {
- response.addHeaderBlock(headerBlock);
- }
-
- Parameter parameter = ModelerUtils.createParameter(part.getName(), jaxbType, headerBlock);
- parameter.setParameterIndex(parameterOrderPosition);
- setCustomizedParameterName(info.bindingOperation, headerMessage, part, parameter, false);
- if (processRequest) {
- request.addParameter(parameter);
- definitiveParameterList.add(parameter.getName());
- } else {
- for (String inParamName : definitiveParameterList) {
- if (inParamName.equals(parameter.getName())) {
- Parameter inParam = request.getParameterByName(inParamName);
- parameter.setLinkedParameter(inParam);
- inParam.setLinkedParameter(parameter);
- //its in/out parameter, input and output parameter have the same order position.
- parameter.setParameterIndex(inParam.getParameterIndex());
- }
- }
- if (!definitiveParameterList.contains(parameter.getName())) {
- definitiveParameterList.add(parameter.getName());
- }
- response.addParameter(parameter);
- }
- parameterOrderPosition++;
- }
-
- }
-
- protected void handleLiteralSOAPFault(Response response, Set duplicateNames) {
- for (BindingFault bindingFault : info.bindingOperation.faults()) {
- com.sun.tools.internal.ws.wsdl.document.Fault portTypeFault = null;
- for (com.sun.tools.internal.ws.wsdl.document.Fault aFault : info.portTypeOperation.faults()) {
- if (aFault.getName().equals(bindingFault.getName())) {
- if (portTypeFault != null) {
- // the WSDL document is invalid, a wsld:fault in a wsdl:operation of a portType can be bound only once
- error(portTypeFault, ModelerMessages.WSDLMODELER_INVALID_BINDING_FAULT_NOT_UNIQUE(bindingFault.getName(), info.bindingOperation.getName()));
- }
- portTypeFault = aFault;
- }
- }
-
- // The WSDL document is invalid, the wsdl:fault in abstract operation is does not have any binding
- if (portTypeFault == null) {
- error(bindingFault, ModelerMessages.WSDLMODELER_INVALID_BINDING_FAULT_NOT_FOUND(bindingFault.getName(), info.bindingOperation.getName()));
-
- }
- }
- for ( com.sun.tools.internal.ws.wsdl.document.Fault portTypeFault : info.portTypeOperation.faults()) {
-
- BindingFault bindingFault = null ;
- for(BindingFault bFault: info.bindingOperation.faults()) {
- if (bFault.getName().equals(portTypeFault.getName())) {
- bindingFault = bFault;
- }
- }
-
- if(bindingFault == null) {
- warning(portTypeFault,ModelerMessages.WSDLMODELER_INVALID_PORT_TYPE_FAULT_NOT_FOUND(portTypeFault.getName(),info.portTypeOperation.getName()));
- }
- // wsdl:fault message name is used to create the java exception name later on
- String faultName = getFaultClassName(portTypeFault);
- Fault fault = new Fault(faultName, portTypeFault);
- fault.setWsdlFaultName(portTypeFault.getName());
- setDocumentationIfPresent(fault, portTypeFault.getDocumentation());
- if (bindingFault != null) {
- //get the soapbind:fault from wsdl:fault in the binding
- SOAPFault soapFault = (SOAPFault) getExtensionOfType(bindingFault, SOAPFault.class);
-
- // The WSDL document is invalid, can't have wsdl:fault without soapbind:fault
- if (soapFault == null) {
- if (options.isExtensionMode()) {
- warning(bindingFault, ModelerMessages.WSDLMODELER_INVALID_BINDING_FAULT_OUTPUT_MISSING_SOAP_FAULT(bindingFault.getName(), info.bindingOperation.getName()));
- soapFault = new SOAPFault(new LocatorImpl());
- } else {
- error(bindingFault, ModelerMessages.WSDLMODELER_INVALID_BINDING_FAULT_OUTPUT_MISSING_SOAP_FAULT(bindingFault.getName(), info.bindingOperation.getName()));
- }
- }
-
- //the soapbind:fault must have use="literal" or no use attribute, in that case its assumed "literal"
- if (!soapFault.isLiteral()) {
- if (options.isExtensionMode()) {
- warning(soapFault, ModelerMessages.WSDLMODELER_WARNING_IGNORING_FAULT_NOT_LITERAL(bindingFault.getName(), info.bindingOperation.getName()));
- } else {
- error(soapFault, ModelerMessages.WSDLMODELER_INVALID_OPERATION_FAULT_NOT_LITERAL(bindingFault.getName(), info.bindingOperation.getName()));
- }
- continue;
- }
-
- // the soapFault name must be present
- if (soapFault.getName() == null) {
- warning(bindingFault, ModelerMessages.WSDLMODELER_INVALID_BINDING_FAULT_NO_SOAP_FAULT_NAME(bindingFault.getName(), info.bindingOperation.getName()));
- } else if (!soapFault.getName().equals(bindingFault.getName())) {
- warning(soapFault, ModelerMessages.WSDLMODELER_INVALID_BINDING_FAULT_WRONG_SOAP_FAULT_NAME(soapFault.getName(), bindingFault.getName(), info.bindingOperation.getName()));
- } else if (soapFault.getNamespace() != null) {
- warning(soapFault, ModelerMessages.WSDLMODELER_WARNING_R_2716_R_2726("soapbind:fault", soapFault.getName()));
- }
-
- }
-
- com.sun.tools.internal.ws.wsdl.document.Message faultMessage = portTypeFault.resolveMessage(info.document);
- Iterator iter2 = faultMessage.parts();
- if (!iter2.hasNext()) {
- // the WSDL document is invalid
- error(faultMessage, ModelerMessages.WSDLMODELER_INVALID_BINDING_FAULT_EMPTY_MESSAGE(portTypeFault.getName(), faultMessage.getName()));
- }
- MessagePart faultPart = (MessagePart) iter2.next();
- QName faultQName = faultPart.getDescriptor();
-
- // Don't include fault messages with non-unique soap:fault names
- if (duplicateNames.contains(faultQName)) {
- warning(faultPart, ModelerMessages.WSDLMODELER_DUPLICATE_FAULT_SOAP_NAME(portTypeFault.getName(), info.portTypeOperation.getName(), faultPart.getName()));
- continue;
- }
-
- if (iter2.hasNext()) {
- // the WSDL document is invalid
- error(faultMessage, ModelerMessages.WSDLMODELER_INVALID_BINDING_FAULT_MESSAGE_HAS_MORE_THAN_ONE_PART(portTypeFault.getName(), faultMessage.getName()));
- }
-
- if (faultPart.getDescriptorKind() != SchemaKinds.XSD_ELEMENT) {
- if (options.isExtensionMode()) {
- warning(faultPart, ModelerMessages.WSDLMODELER_INVALID_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(faultMessage.getName(), faultPart.getName()));
- } else {
- error(faultPart, ModelerMessages.WSDLMODELER_INVALID_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(faultMessage.getName(), faultPart.getName()));
- }
- }
-
- JAXBType jaxbType = getJAXBType(faultPart);
-
- fault.setElementName(faultPart.getDescriptor());
- fault.setJavaMemberName(Names.getExceptionClassMemberName());
-
- Block faultBlock = new Block(faultQName, jaxbType, faultPart);
- fault.setBlock(faultBlock);
- //createParentFault(fault);
- //createSubfaults(fault);
- if (!response.getFaultBlocksMap().containsKey(faultBlock.getName())) {
- response.addFaultBlock(faultBlock);
- }
- info.operation.addFault(fault);
- }
- }
-
- private String getFaultClassName(com.sun.tools.internal.ws.wsdl.document.Fault portTypeFault) {
- JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(portTypeFault, JAXWSBinding.class);
- if (jaxwsBinding != null) {
- CustomName className = jaxwsBinding.getClassName();
- if (className != null) {
- return makePackageQualified(className.getName());
- }
- }
- return makePackageQualified(BindingHelper.mangleNameToClassName(portTypeFault.getMessage().getLocalPart()));
- }
-
- protected boolean setMessagePartsBinding(StyleAndUse styleAndUse) {
- SOAPBody inBody = getSOAPRequestBody();
- Message inMessage = getInputMessage();
- if (!setMessagePartsBinding(inBody, inMessage, styleAndUse, true)) {
- return false;
- }
-
- if (isRequestResponse()) {
- SOAPBody outBody = getSOAPResponseBody();
- Message outMessage = getOutputMessage();
- if (!setMessagePartsBinding(outBody, outMessage, styleAndUse, false)) {
- return false;
- }
- }
- return true;
- }
-
- //returns false if the wsdl is invalid and operation should be ignored
- protected boolean setMessagePartsBinding(SOAPBody body, Message message, StyleAndUse styleAndUse, boolean isInput) {
-
- //get Mime parts
- List<MessagePart> mimeParts;
- List<MessagePart> headerParts;
- List<MessagePart> bodyParts = getBodyParts(body, message);
-
- if (isInput) {
- headerParts = getHeaderPartsFromMessage(message, isInput);
- mimeParts = getMimeContentParts(message, info.bindingOperation.getInput());
- } else {
- headerParts = getHeaderPartsFromMessage(message, isInput);
- mimeParts = getMimeContentParts(message, info.bindingOperation.getOutput());
- }
-
- //As of now WSDL MIME binding is not supported, so throw the exception when such binding is encounterd
-// if(mimeParts.size() > 0){
-// fail("wsdlmodeler.unsupportedBinding.mime", new Object[]{});
-// }
-
- //if soap:body parts attribute not there, then all unbounded message parts will
- // belong to the soap body
- if (bodyParts == null) {
- bodyParts = new ArrayList<MessagePart>();
- for (Iterator<MessagePart> iter = message.parts(); iter.hasNext();) {
- MessagePart mPart = iter.next();
- //Its a safe assumption that the parts in the message not belonging to header or mime will
- // belong to the body?
- if (mimeParts.contains(mPart) || headerParts.contains(mPart) || boundToFault(mPart.getName())) {
- //throw error that a part cant be bound multiple times, not ignoring operation, if there
- //is conflict it will fail latter
- if (options.isExtensionMode()) {
- warning(mPart, ModelerMessages.WSDLMODELER_WARNING_BINDING_OPERATION_MULTIPLE_PART_BINDING(info.bindingOperation.getName(), mPart.getName()));
- } else {
- error(mPart, ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_PART_BINDING(info.bindingOperation.getName(), mPart.getName()));
- }
- }
- bodyParts.add(mPart);
- }
- }
-
- //now build the final parts list with header, mime parts and body parts
- for (Iterator iter = message.parts(); iter.hasNext();) {
- MessagePart mPart = (MessagePart) iter.next();
- if (mimeParts.contains(mPart)) {
- mPart.setBindingExtensibilityElementKind(MessagePart.WSDL_MIME_BINDING);
- } else if (headerParts.contains(mPart)) {
- mPart.setBindingExtensibilityElementKind(MessagePart.SOAP_HEADER_BINDING);
- } else if (bodyParts.contains(mPart)) {
- mPart.setBindingExtensibilityElementKind(MessagePart.SOAP_BODY_BINDING);
- } else {
- mPart.setBindingExtensibilityElementKind(MessagePart.PART_NOT_BOUNDED);
- }
- }
-
- if (isOperationDocumentLiteral(styleAndUse) && bodyParts.size() > 1) {
- if (options.isExtensionMode()) {
- warning(message, ModelerMessages.WSDLMODELER_WARNING_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(info.portTypeOperation.getName()));
- } else {
- error(message, ModelerMessages.WSDLMODELER_INVALID_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(info.portTypeOperation.getName()));
- }
- return false;
- }
- return true;
- }
-
- private boolean boundToFault(String partName) {
- for (BindingFault bindingFault : info.bindingOperation.faults()) {
- if (partName.equals(bindingFault.getName())) {
- return true;
- }
- }
- return false;
- }
-
- //get MessagePart(s) referenced by parts attribute of soap:body element
- private List<MessagePart> getBodyParts(SOAPBody body, Message message) {
- String bodyParts = body.getParts();
- if (bodyParts != null) {
- List<MessagePart> partsList = new ArrayList<MessagePart>();
- StringTokenizer in = new StringTokenizer(bodyParts.trim(), " ");
- while (in.hasMoreTokens()) {
- String part = in.nextToken();
- MessagePart mPart = message.getPart(part);
- if (null == mPart) {
- error(message, ModelerMessages.WSDLMODELER_ERROR_PARTS_NOT_FOUND(part, message.getName()));
- }
- mPart.setBindingExtensibilityElementKind(MessagePart.SOAP_BODY_BINDING);
- partsList.add(mPart);
- }
- return partsList;
- }
- return null;
- }
-
- List<MessagePart> getAdditionHeaderParts(BindingOperation bindingOperation,Message message, boolean isInput){
- List<MessagePart> headerParts = new ArrayList<MessagePart>();
- List<MessagePart> parts = message.getParts();
- List<MessagePart> headers = getHeaderParts(bindingOperation, isInput);
-
- for(MessagePart part: headers){
- if (parts.contains(part)) {
- continue;
- }
- headerParts.add(part);
- }
- return headerParts;
- }
-
- private List<MessagePart> getHeaderPartsFromMessage(Message message, boolean isInput) {
- List<MessagePart> headerParts = new ArrayList<MessagePart>();
- Iterator<MessagePart> parts = message.parts();
- List<MessagePart> headers = getHeaderParts(info.bindingOperation, isInput);
- while (parts.hasNext()) {
- MessagePart part = parts.next();
- if (headers.contains(part)) {
- headerParts.add(part);
- }
- }
- return headerParts;
- }
-
- private Message getHeaderMessage(MessagePart part, TWSDLExtensible ext) {
- Iterator<SOAPHeader> headers = getHeaderExtensions(ext).iterator();
- while (headers.hasNext()) {
- SOAPHeader header = headers.next();
- if (!header.isLiteral()) {
- continue;
- }
- com.sun.tools.internal.ws.wsdl.document.Message headerMessage = findMessage(header.getMessage(), document);
- if (headerMessage == null) {
- continue;
- }
-
- MessagePart headerPart = headerMessage.getPart(header.getPart());
- if (headerPart == part) {
- return headerMessage;
- }
- }
- return null;
- }
-
- private List<MessagePart> getHeaderParts(BindingOperation bindingOperation, boolean isInput) {
- TWSDLExtensible ext;
- if (isInput) {
- ext = bindingOperation.getInput();
- } else {
- ext = bindingOperation.getOutput();
- }
-
- List<MessagePart> parts = new ArrayList<MessagePart>();
- Iterator<SOAPHeader> headers = getHeaderExtensions(ext).iterator();
- while (headers.hasNext()) {
- SOAPHeader header = headers.next();
- if (!header.isLiteral()) {
- error(header, ModelerMessages.WSDLMODELER_INVALID_HEADER_NOT_LITERAL(header.getPart(), bindingOperation.getName()));
- }
-
- if (header.getNamespace() != null) {
- warning(header, ModelerMessages.WSDLMODELER_WARNING_R_2716_R_2726("soapbind:header", bindingOperation.getName()));
- }
- com.sun.tools.internal.ws.wsdl.document.Message headerMessage = findMessage(header.getMessage(),document);
- if (headerMessage == null) {
- error(header, ModelerMessages.WSDLMODELER_INVALID_HEADER_CANT_RESOLVE_MESSAGE(header.getMessage(), bindingOperation.getName()));
- }
-
- MessagePart part = headerMessage.getPart(header.getPart());
- if (part == null) {
- error(header, ModelerMessages.WSDLMODELER_INVALID_HEADER_NOT_FOUND(header.getPart(), bindingOperation.getName()));
- }
- if (part.getDescriptorKind() != SchemaKinds.XSD_ELEMENT) {
- if (options.isExtensionMode()) {
- warning(part, ModelerMessages.WSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(part.getName(), bindingOperation.getName()));
- } else {
- error(part, ModelerMessages.WSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(part.getName(), bindingOperation.getName()));
- }
- }
- part.setBindingExtensibilityElementKind(MessagePart.SOAP_HEADER_BINDING);
- parts.add(part);
- }
- return parts;
- }
-
- private boolean isOperationDocumentLiteral(StyleAndUse styleAndUse) {
- return StyleAndUse.DOC_LITERAL == styleAndUse;
- }
-
- private boolean isOperationRpcLiteral(StyleAndUse styleAndUse) {
- return StyleAndUse.RPC_LITERAL == styleAndUse;
- }
-
- /**
- * @param part
- * @return Returns a JAXBType object
- */
- private JAXBType getJAXBType(MessagePart part) {
- JAXBType type;
- QName name = part.getDescriptor();
- if (part.getDescriptorKind().equals(SchemaKinds.XSD_ELEMENT)) {
- type = getJAXBModelBuilder().getJAXBType(name);
- if(type == null){
- error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
- }
- } else {
- S2JJAXBModel jaxbModel = getJAXBModelBuilder().getJAXBModel().getS2JJAXBModel();
- TypeAndAnnotation typeAnno = jaxbModel.getJavaType(name);
- if (typeAnno == null) {
- error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
- }
- JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAnno));
- type = new JAXBType(new QName("", part.getName()), javaType);
- }
- return type;
- }
-
- private List<Parameter> getDoclitParameters(Request req, Response res, List<MessagePart> parameterList) {
- if (parameterList.isEmpty()) {
- return new ArrayList<Parameter>();
- }
- List<Parameter> params = new ArrayList<Parameter>();
- Message inMsg = getInputMessage();
- Message outMsg = getOutputMessage();
- boolean unwrappable = isUnwrappable();
- List<Parameter> outParams = null;
- int pIndex = 0;
- for (MessagePart part : parameterList) {
- QName reqBodyName = part.getDescriptor();
- JAXBType jaxbType = getJAXBType(part);
- Block block = new Block(reqBodyName, jaxbType, part);
- if (unwrappable) {
- //So build body and header blocks and set to request and response
- JAXBStructuredType jaxbStructType = ModelerUtils.createJAXBStructureType(jaxbType);
- block = new Block(reqBodyName, jaxbStructType, part);
- if (ModelerUtils.isBoundToSOAPBody(part)) {
- if (part.isIN()) {
- req.addBodyBlock(block);
- } else if (part.isOUT()) {
- res.addBodyBlock(block);
- } else if (part.isINOUT()) {
- req.addBodyBlock(block);
- res.addBodyBlock(block);
- }
- } else if (ModelerUtils.isUnbound(part)) {
- if (part.isIN()) {
- req.addUnboundBlock(block);
- } else if (part.isOUT()) {
- res.addUnboundBlock(block);
- } else if (part.isINOUT()) {
- req.addUnboundBlock(block);
- res.addUnboundBlock(block);
- }
- }
- if (part.isIN() || part.isINOUT()) {
- params = ModelerUtils.createUnwrappedParameters(jaxbStructType, block);
- int index = 0;
- Mode mode = part.isINOUT() ? Mode.INOUT : Mode.IN;
- for (Parameter param : params) {
- param.setParameterIndex(index++);
- param.setMode(mode);
- setCustomizedParameterName(info.portTypeOperation, inMsg, part, param, unwrappable);
- }
- } else if (part.isOUT()) {
- outParams = ModelerUtils.createUnwrappedParameters(jaxbStructType, block);
- for (Parameter param : outParams) {
- param.setMode(Mode.OUT);
- setCustomizedParameterName(info.portTypeOperation, outMsg, part, param, unwrappable);
- }
- }
- } else {
- if (ModelerUtils.isBoundToSOAPBody(part)) {
- if (part.isIN()) {
- req.addBodyBlock(block);
- } else if (part.isOUT()) {
- res.addBodyBlock(block);
- } else if (part.isINOUT()) {
- req.addBodyBlock(block);
- res.addBodyBlock(block);
- }
- } else if (ModelerUtils.isBoundToSOAPHeader(part)) {
- if (part.isIN()) {
- req.addHeaderBlock(block);
- } else if (part.isOUT()) {
- res.addHeaderBlock(block);
- } else if (part.isINOUT()) {
- req.addHeaderBlock(block);
- res.addHeaderBlock(block);
- }
- } else if (ModelerUtils.isBoundToMimeContent(part)) {
- List<MIMEContent> mimeContents;
-
- if (part.isIN()) {
- mimeContents = getMimeContents(info.bindingOperation.getInput(),
- getInputMessage(), part.getName());
- jaxbType = getAttachmentType(mimeContents, part);
- block = new Block(jaxbType.getName(), jaxbType, part);
- req.addAttachmentBlock(block);
- } else if (part.isOUT()) {
- mimeContents = getMimeContents(info.bindingOperation.getOutput(),
- getOutputMessage(), part.getName());
- jaxbType = getAttachmentType(mimeContents, part);
- block = new Block(jaxbType.getName(), jaxbType, part);
- res.addAttachmentBlock(block);
- } else if (part.isINOUT()) {
- mimeContents = getMimeContents(info.bindingOperation.getInput(),
- getInputMessage(), part.getName());
- jaxbType = getAttachmentType(mimeContents, part);
- block = new Block(jaxbType.getName(), jaxbType, part);
- req.addAttachmentBlock(block);
- res.addAttachmentBlock(block);
-
- mimeContents = getMimeContents(info.bindingOperation.getOutput(),
- getOutputMessage(), part.getName());
- JAXBType outJaxbType = getAttachmentType(mimeContents, part);
-
- String inType = jaxbType.getJavaType().getType().getName();
- String outType = outJaxbType.getJavaType().getType().getName();
-
- TypeAndAnnotation inTa = jaxbType.getJavaType().getType().getTypeAnn();
- TypeAndAnnotation outTa = outJaxbType.getJavaType().getType().getTypeAnn();
- if ((((inTa != null) && (outTa != null) && inTa.equals(outTa))) && !inType.equals(outType)) {
- String javaType = "javax.activation.DataHandler";
-
- //S2JJAXBModel jaxbModel = getJAXBModelBuilder().getJAXBModel().getS2JJAXBModel();
- //JCodeModel cm = jaxbModel.generateCode(null, errReceiver);
- JType jt = options.getCodeModel().ref(javaType);
- JAXBTypeAndAnnotation jaxbTa = jaxbType.getJavaType().getType();
- jaxbTa.setType(jt);
- }
- }
- } else if (ModelerUtils.isUnbound(part)) {
- if (part.isIN()) {
- req.addUnboundBlock(block);
- } else if (part.isOUT()) {
- res.addUnboundBlock(block);
- } else if (part.isINOUT()) {
- req.addUnboundBlock(block);
- res.addUnboundBlock(block);
- }
- }
- Parameter param = ModelerUtils.createParameter(part.getName(), jaxbType, block);
- param.setMode(part.getMode());
- if (part.isReturn()) {
- param.setParameterIndex(-1);
- } else {
- param.setParameterIndex(pIndex++);
- }
-
- if (part.isIN()) {
- setCustomizedParameterName(info.bindingOperation, inMsg, part, param, false);
- } else if (outMsg != null) {
- setCustomizedParameterName(info.bindingOperation, outMsg, part, param, false);
- }
-
- params.add(param);
- }
- }
- if (unwrappable && (outParams != null)) {
- int index = params.size();
- for (Parameter param : outParams) {
- if (BindingHelper.mangleNameToVariableName(param.getName()).equals("return")) {
- param.setParameterIndex(-1);
- } else {
- Parameter inParam = ModelerUtils.getParameter(param.getName(), params);
- if ((inParam != null) && inParam.isIN()) {
- QName inElementName = inParam.getType().getName();
- QName outElementName = param.getType().getName();
- String inJavaType = inParam.getTypeName();
- String outJavaType = param.getTypeName();
- TypeAndAnnotation inTa = inParam.getType().getJavaType().getType().getTypeAnn();
- TypeAndAnnotation outTa = param.getType().getJavaType().getType().getTypeAnn();
- QName inRawTypeName = ModelerUtils.getRawTypeName(inParam);
- QName outRawTypeName = ModelerUtils.getRawTypeName(param);
- if (inElementName.getLocalPart().equals(outElementName.getLocalPart()) &&
- inJavaType.equals(outJavaType) &&
- (inTa == null || outTa == null || inTa.equals(outTa)) &&
- (inRawTypeName == null || outRawTypeName == null || inRawTypeName.equals(outRawTypeName))) {
- inParam.setMode(Mode.INOUT);
- continue;
- }
- }
- if (outParams.size() == 1) {
- param.setParameterIndex(-1);
- } else {
- param.setParameterIndex(index++);
- }
- }
- params.add(param);
- }
- }
- return params;
- }
-
- private List<Parameter> getRpcLitParameters(Request req, Response res, Block reqBlock, Block resBlock, List<MessagePart> paramList) {
- List<Parameter> params = new ArrayList<Parameter>();
- Message inMsg = getInputMessage();
- Message outMsg = getOutputMessage();
- S2JJAXBModel jaxbModel = ((RpcLitStructure) reqBlock.getType()).getJaxbModel().getS2JJAXBModel();
- List<Parameter> inParams = ModelerUtils.createRpcLitParameters(inMsg, reqBlock, jaxbModel, errReceiver);
- List<Parameter> outParams = null;
- if (outMsg != null) {
- outParams = ModelerUtils.createRpcLitParameters(outMsg, resBlock, jaxbModel, errReceiver);
- }
-
- //create parameters for header and mime parts
- int index = 0;
- for (MessagePart part : paramList) {
- Parameter param = null;
- if (ModelerUtils.isBoundToSOAPBody(part)) {
- if (part.isIN()) {
- param = ModelerUtils.getParameter(part.getName(), inParams);
- } else if (outParams != null) {
- param = ModelerUtils.getParameter(part.getName(), outParams);
- }
- } else if (ModelerUtils.isBoundToSOAPHeader(part)) {
- QName headerName = part.getDescriptor();
- JAXBType jaxbType = getJAXBType(part);
- Block headerBlock = new Block(headerName, jaxbType, part);
- param = ModelerUtils.createParameter(part.getName(), jaxbType, headerBlock);
- if (part.isIN()) {
- req.addHeaderBlock(headerBlock);
- } else if (part.isOUT()) {
- res.addHeaderBlock(headerBlock);
- } else if (part.isINOUT()) {
- req.addHeaderBlock(headerBlock);
- res.addHeaderBlock(headerBlock);
- }
- } else if (ModelerUtils.isBoundToMimeContent(part)) {
- List<MIMEContent> mimeContents;
- if (part.isIN() || part.isINOUT()) {
- mimeContents = getMimeContents(info.bindingOperation.getInput(),
- getInputMessage(), part.getName());
- } else {
- mimeContents = getMimeContents(info.bindingOperation.getOutput(),
- getOutputMessage(), part.getName());
- }
-
- JAXBType type = getAttachmentType(mimeContents, part);
- //create Parameters in request or response
- //Block mimeBlock = new Block(new QName(part.getName()), type);
- Block mimeBlock = new Block(type.getName(), type, part);
- param = ModelerUtils.createParameter(part.getName(), type, mimeBlock);
- if (part.isIN()) {
- req.addAttachmentBlock(mimeBlock);
- } else if (part.isOUT()) {
- res.addAttachmentBlock(mimeBlock);
- } else if (part.isINOUT()) {
- mimeContents = getMimeContents(info.bindingOperation.getOutput(),
- getOutputMessage(), part.getName());
- JAXBType outJaxbType = getAttachmentType(mimeContents, part);
-
- String inType = type.getJavaType().getType().getName();
- String outType = outJaxbType.getJavaType().getType().getName();
- if (!inType.equals(outType)) {
- String javaType = "javax.activation.DataHandler";
- JType jt = options.getCodeModel().ref(javaType);
- JAXBTypeAndAnnotation jaxbTa = type.getJavaType().getType();
- jaxbTa.setType(jt);
- }
- req.addAttachmentBlock(mimeBlock);
- res.addAttachmentBlock(mimeBlock);
- }
- } else if (ModelerUtils.isUnbound(part)) {
- QName name = part.getDescriptor();
- JAXBType type = getJAXBType(part);
- Block unboundBlock = new Block(name, type, part);
- if (part.isIN()) {
- req.addUnboundBlock(unboundBlock);
- } else if (part.isOUT()) {
- res.addUnboundBlock(unboundBlock);
- } else if (part.isINOUT()) {
- req.addUnboundBlock(unboundBlock);
- res.addUnboundBlock(unboundBlock);
- }
- param = ModelerUtils.createParameter(part.getName(), type, unboundBlock);
- }
- if (param != null) {
- if (part.isReturn()) {
- param.setParameterIndex(-1);
- } else {
- param.setParameterIndex(index++);
- }
- param.setMode(part.getMode());
- params.add(param);
- }
- }
- for (Parameter param : params) {
- if (param.isIN()) {
- setCustomizedParameterName(info.portTypeOperation, inMsg, inMsg.getPart(param.getName()), param, false);
- } else if (outMsg != null) {
- setCustomizedParameterName(info.portTypeOperation, outMsg, outMsg.getPart(param.getName()), param, false);
- }
- }
- return params;
- }
-
- private List<Parameter> getRequestParameters(Request request, List<String> parameterList) {
- Message inputMessage = getInputMessage();
- //there is no input message, return zero parameters
- if (inputMessage != null && !inputMessage.parts().hasNext()) {
- return new ArrayList<Parameter>();
- }
-
- List<Parameter> inParameters = null;
- QName reqBodyName;
- Block reqBlock;
- JAXBType jaxbReqType;
- boolean unwrappable = isUnwrappable();
- boolean doneSOAPBody = false;
- //setup request parameters
- for (String inParamName : parameterList) {
- MessagePart part = inputMessage.getPart(inParamName);
- if (part == null) {
- continue;
- }
- reqBodyName = part.getDescriptor();
- jaxbReqType = getJAXBType(part);
- if (unwrappable) {
- //So build body and header blocks and set to request and response
- JAXBStructuredType jaxbRequestType = ModelerUtils.createJAXBStructureType(jaxbReqType);
- reqBlock = new Block(reqBodyName, jaxbRequestType, part);
- if (ModelerUtils.isBoundToSOAPBody(part)) {
- request.addBodyBlock(reqBlock);
- } else if (ModelerUtils.isUnbound(part)) {
- request.addUnboundBlock(reqBlock);
- }
- inParameters = ModelerUtils.createUnwrappedParameters(jaxbRequestType, reqBlock);
- for (Parameter param : inParameters) {
- setCustomizedParameterName(info.portTypeOperation, inputMessage, part, param, unwrappable);
- }
- } else {
- reqBlock = new Block(reqBodyName, jaxbReqType, part);
- if (ModelerUtils.isBoundToSOAPBody(part) && !doneSOAPBody) {
- doneSOAPBody = true;
- request.addBodyBlock(reqBlock);
- } else if (ModelerUtils.isBoundToSOAPHeader(part)) {
- request.addHeaderBlock(reqBlock);
- } else if (ModelerUtils.isBoundToMimeContent(part)) {
- List<MIMEContent> mimeContents = getMimeContents(info.bindingOperation.getInput(),
- getInputMessage(), part.getName());
- jaxbReqType = getAttachmentType(mimeContents, part);
- //reqBlock = new Block(new QName(part.getName()), jaxbReqType);
- reqBlock = new Block(jaxbReqType.getName(), jaxbReqType, part);
- request.addAttachmentBlock(reqBlock);
- } else if (ModelerUtils.isUnbound(part)) {
- request.addUnboundBlock(reqBlock);
- }
- if (inParameters == null) {
- inParameters = new ArrayList<Parameter>();
- }
- Parameter param = ModelerUtils.createParameter(part.getName(), jaxbReqType, reqBlock);
- setCustomizedParameterName(info.portTypeOperation, inputMessage, part, param, false);
- inParameters.add(param);
- }
- }
- return inParameters;
- }
-
- /**
- * @param part
- * @param param
- * @param wrapperStyle TODO
- */
- private void setCustomizedParameterName(TWSDLExtensible extension, Message msg, MessagePart part, Parameter param, boolean wrapperStyle) {
- JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(extension, JAXWSBinding.class);
- if (jaxwsBinding == null) {
- return;
- }
- String paramName = part.getName();
- QName elementName = part.getDescriptor();
- if (wrapperStyle) {
- elementName = param.getType().getName();
- }
- String customName = jaxwsBinding.getParameterName(msg.getName(), paramName, elementName, wrapperStyle);
- if (customName != null && !customName.equals("")) {
- param.setCustomName(customName);
- }
- }
-
- @Override
- protected boolean isConflictingPortClassName(String name) {
- return false;
- }
-
- protected boolean isUnwrappable() {
- if (!getWrapperStyleCustomization()) {
- return false;
- }
-
- com.sun.tools.internal.ws.wsdl.document.Message inputMessage = getInputMessage();
- com.sun.tools.internal.ws.wsdl.document.Message outputMessage = getOutputMessage();
-
- // Wrapper style if the operation's input and output messages each contain
- // only a single part
- if ((inputMessage != null && inputMessage.numParts() != 1)
- || (outputMessage != null && outputMessage.numParts() != 1)) {
- return false;
- }
-
- MessagePart inputPart = inputMessage != null
- ? inputMessage.parts().next() : null;
- MessagePart outputPart = outputMessage != null
- ? outputMessage.parts().next() : null;
- String operationName = info.portTypeOperation.getName();
-
- // Wrapper style if the input message part refers to a global element declaration whose localname
- // is equal to the operation name
- // Wrapper style if the output message part refers to a global element declaration
- if ((inputPart != null && !inputPart.getDescriptor().getLocalPart().equals(operationName)) ||
- (outputPart != null && outputPart.getDescriptorKind() != SchemaKinds.XSD_ELEMENT)) {
- return false;
- }
-
- //check to see if either input or output message part not bound to soapbing:body
- //in that case the operation is not wrapper style
- if (((inputPart != null) && (inputPart.getBindingExtensibilityElementKind() != MessagePart.SOAP_BODY_BINDING)) ||
- ((outputPart != null) && (outputPart.getBindingExtensibilityElementKind() != MessagePart.SOAP_BODY_BINDING))) {
- return false;
- }
-
- // Wrapper style if the elements referred to by the input and output message parts
- // (henceforth referred to as wrapper elements) are both complex types defined
- // using the xsd:sequence compositor
- // Wrapper style if the wrapper elements only contain child elements, they must not
- // contain other structures such as xsd:choice, substitution groups1 or attributes
- //These checkins are done by jaxb, we just check if jaxb has wrapper children. If there
- // are then its wrapper style
- //if(inputPart != null && outputPart != null){
- if (inputPart != null) {
- boolean inputWrappable = false;
- JAXBType inputType = getJAXBType(inputPart);
- if (inputType != null) {
- inputWrappable = inputType.isUnwrappable();
- }
- //if there are no output part (oneway), the operation can still be wrapper style
- if (outputPart == null) {
- return inputWrappable;
- }
- JAXBType outputType = getJAXBType(outputPart);
- if ((inputType != null) && (outputType != null)) {
- return inputType.isUnwrappable() && outputType.isUnwrappable();
- }
- }
-
- return false;
- }
-
- private boolean getWrapperStyleCustomization() {
- //first we look into wsdl:portType/wsdl:operation
- com.sun.tools.internal.ws.wsdl.document.Operation portTypeOperation = info.portTypeOperation;
- JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(portTypeOperation, JAXWSBinding.class);
- if (jaxwsBinding != null) {
- Boolean isWrappable = jaxwsBinding.isEnableWrapperStyle();
- if (isWrappable != null) {
- return isWrappable;
- }
- }
-
- //then into wsdl:portType
- PortType portType = info.port.resolveBinding(document).resolvePortType(document);
- jaxwsBinding = (JAXWSBinding) getExtensionOfType(portType, JAXWSBinding.class);
- if (jaxwsBinding != null) {
- Boolean isWrappable = jaxwsBinding.isEnableWrapperStyle();
- if (isWrappable != null) {
- return isWrappable;
- }
- }
-
- //then wsdl:definitions
- jaxwsBinding = (JAXWSBinding) getExtensionOfType(document.getDefinitions(), JAXWSBinding.class);
- if (jaxwsBinding != null) {
- Boolean isWrappable = jaxwsBinding.isEnableWrapperStyle();
- if (isWrappable != null) {
- return isWrappable;
- }
- }
- return true;
- }
-
- /* (non-Javadoc)
- * @see WSDLModelerBase#isSingleInOutPart(Set, MessagePart)
- */
- protected boolean isSingleInOutPart(Set inputParameterNames,
- MessagePart outputPart) {
- // As of now, we dont have support for in/out in doc-lit. So return false.
- SOAPOperation soapOperation =
- (SOAPOperation) getExtensionOfType(info.bindingOperation,
- SOAPOperation.class);
- if ((soapOperation != null) && (soapOperation.isDocument() || info.soapBinding.isDocument())) {
- Iterator iter = getInputMessage().parts();
- while (iter.hasNext()) {
- MessagePart part = (MessagePart) iter.next();
- if (outputPart.getName().equals(part.getName()) && outputPart.getDescriptor().equals(part.getDescriptor())) {
- return true;
- }
- }
- } else if (soapOperation != null && soapOperation.isRPC() || info.soapBinding.isRPC()) {
- com.sun.tools.internal.ws.wsdl.document.Message inputMessage = getInputMessage();
- if (inputParameterNames.contains(outputPart.getName())) {
- if (inputMessage.getPart(outputPart.getName()).getDescriptor().equals(outputPart.getDescriptor())) {
- return true;
- }
- }
- }
- return false;
- }
-
- private List<Parameter> createRpcLitRequestParameters(Request request, List<String> parameterList, Block block) {
- Message message = getInputMessage();
- S2JJAXBModel jaxbModel = ((RpcLitStructure) block.getType()).getJaxbModel().getS2JJAXBModel();
- List<Parameter> parameters = ModelerUtils.createRpcLitParameters(message, block, jaxbModel, errReceiver);
-
- //create parameters for header and mime parts
- for (String paramName : parameterList) {
- MessagePart part = message.getPart(paramName);
- if (part == null) {
- continue;
- }
- if (ModelerUtils.isBoundToSOAPHeader(part)) {
- if (parameters == null) {
- parameters = new ArrayList<Parameter>();
- }
- QName headerName = part.getDescriptor();
- JAXBType jaxbType = getJAXBType(part);
- Block headerBlock = new Block(headerName, jaxbType, part);
- request.addHeaderBlock(headerBlock);
- Parameter param = ModelerUtils.createParameter(part.getName(), jaxbType, headerBlock);
- if (param != null) {
- parameters.add(param);
- }
- } else if (ModelerUtils.isBoundToMimeContent(part)) {
- if (parameters == null) {
- parameters = new ArrayList<Parameter>();
- }
- List<MIMEContent> mimeContents = getMimeContents(info.bindingOperation.getInput(),
- getInputMessage(), paramName);
-
- JAXBType type = getAttachmentType(mimeContents, part);
- //create Parameters in request or response
- //Block mimeBlock = new Block(new QName(part.getName()), type);
- Block mimeBlock = new Block(type.getName(), type, part);
- request.addAttachmentBlock(mimeBlock);
- Parameter param = ModelerUtils.createParameter(part.getName(), type, mimeBlock);
- if (param != null) {
- parameters.add(param);
- }
- } else if (ModelerUtils.isUnbound(part)) {
- if (parameters == null) {
- parameters = new ArrayList<Parameter>();
- }
- QName name = part.getDescriptor();
- JAXBType type = getJAXBType(part);
- Block unboundBlock = new Block(name, type, part);
- request.addUnboundBlock(unboundBlock);
- Parameter param = ModelerUtils.createParameter(part.getName(), type, unboundBlock);
- if (param != null) {
- parameters.add(param);
- }
- }
- }
- for (Parameter param : parameters) {
- setCustomizedParameterName(info.portTypeOperation, message, message.getPart(param.getName()), param, false);
- }
- return parameters;
- }
-
- private String getJavaTypeForMimeType(String mimeType) {
- if (mimeType.equals("image/jpeg") || mimeType.equals("image/gif")) {
- return "java.awt.Image";
- } else if (mimeType.equals("text/xml") || mimeType.equals("application/xml")) {
- return "javax.xml.transform.Source";
- }
- return "javax.activation.DataHandler";
- }
-
- private JAXBType getAttachmentType(List<MIMEContent> mimeContents, MessagePart part) {
- if (!enableMimeContent()) {
- return getJAXBType(part);
- }
- String javaType;
- List<String> mimeTypes = getAlternateMimeTypes(mimeContents);
- if (mimeTypes.size() > 1) {
- javaType = "javax.activation.DataHandler";
- } else {
- javaType = getJavaTypeForMimeType(mimeTypes.get(0));
- }
-
- S2JJAXBModel jaxbModel = getJAXBModelBuilder().getJAXBModel().getS2JJAXBModel();
- JType jt = options.getCodeModel().ref(javaType);
- QName desc = part.getDescriptor();
- TypeAndAnnotation typeAnno = null;
-
- if (part.getDescriptorKind() == SchemaKinds.XSD_TYPE) {
- typeAnno = jaxbModel.getJavaType(desc);
- desc = new QName("", part.getName());
- } else if (part.getDescriptorKind() == SchemaKinds.XSD_ELEMENT) {
- typeAnno = getJAXBModelBuilder().getElementTypeAndAnn(desc);
- if(typeAnno == null){
- error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(part.getDescriptor(), part.getName()));
- }
- for (String mimeType : mimeTypes) {
- if ((!mimeType.equals("text/xml") && !mimeType.equals("application/xml"))) {
- //According to AP 1.0,
- //RZZZZ: In a DESCRIPTION, if a wsdl:part element refers to a
- //global element declaration (via the element attribute of the wsdl:part
- //element) then the value of the type attribute of a mime:content element
- //that binds that part MUST be a content type suitable for carrying an
- //XML serialization.
- //should we throw warning?
- //type = MimeHelper.javaType.DATA_HANDLER_JAVATYPE;
- warning(part, ModelerMessages.MIMEMODELER_ELEMENT_PART_INVALID_ELEMENT_MIME_TYPE(part.getName(), mimeType));
- }
- }
- }
- if (typeAnno == null) {
- error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(desc, part.getName()));
- }
- return new JAXBType(desc, new JavaSimpleType(new JAXBTypeAndAnnotation(typeAnno, jt)),
- null, getJAXBModelBuilder().getJAXBModel());
- }
-
- protected void buildJAXBModel(WSDLDocument wsdlDocument) {
- JAXBModelBuilder tempJaxbModelBuilder = new JAXBModelBuilder(options, classNameCollector, forest, errReceiver);
- //set the java package where wsdl artifacts will be generated
- //if user provided package name using -p switch (or package property on wsimport ant task)
- //ignore the package customization in the wsdl and schema bidnings
- //formce the -p option only in the first pass
- if (explicitDefaultPackage != null) {
- tempJaxbModelBuilder.getJAXBSchemaCompiler().forcePackageName(options.defaultPackage);
- } else {
- options.defaultPackage = getJavaPackage();
- }
-
- //create pseudo schema for async operations(if any) response bean
- List<InputSource> schemas = PseudoSchemaBuilder.build(this, options, errReceiver);
- for (InputSource schema : schemas) {
- tempJaxbModelBuilder.getJAXBSchemaCompiler().parseSchema(schema);
- }
- tempJaxbModelBuilder.bind();
- this.jaxbModelBuilder = tempJaxbModelBuilder;
- }
-
- protected String getJavaPackage() {
- String jaxwsPackage = null;
- JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(document.getDefinitions(), JAXWSBinding.class);
- if (jaxwsCustomization != null && jaxwsCustomization.getJaxwsPackage() != null) {
- jaxwsPackage = jaxwsCustomization.getJaxwsPackage().getName();
- }
- if (jaxwsPackage != null) {
- return jaxwsPackage;
- }
- String wsdlUri = document.getDefinitions().getTargetNamespaceURI();
- return XJC.getDefaultPackageName(wsdlUri);
-
- }
-
- protected void createJavaInterfaceForProviderPort(Port port) {
- String interfaceName = "javax.xml.ws.Provider";
- JavaInterface intf = new JavaInterface(interfaceName);
- port.setJavaInterface(intf);
- }
-
- protected void createJavaInterfaceForPort(Port port, boolean isProvider) {
- if (isProvider) {
- createJavaInterfaceForProviderPort(port);
- return;
- }
- String interfaceName = getJavaNameOfSEI(port);
-
- if (isConflictingPortClassName(interfaceName)) {
- interfaceName += "_PortType";
- }
-
- JavaInterface intf = new JavaInterface(interfaceName);
- for (Operation operation : port.getOperations()) {
- createJavaMethodForOperation(
- port,
- operation,
- intf);
-
- for (JavaParameter jParam : operation.getJavaMethod().getParametersList()) {
- Parameter param = jParam.getParameter();
- if (param.getCustomName() != null) {
- jParam.setName(param.getCustomName());
- }
- }
- }
-
- port.setJavaInterface(intf);
- }
-
- protected String getServiceInterfaceName(QName serviceQName, com.sun.tools.internal.ws.wsdl.document.Service wsdlService) {
- String serviceName = wsdlService.getName();
- JAXWSBinding jaxwsCust = (JAXWSBinding) getExtensionOfType(wsdlService, JAXWSBinding.class);
- if (jaxwsCust != null && jaxwsCust.getClassName() != null) {
- CustomName name = jaxwsCust.getClassName();
- if (name != null && !name.getName().equals("")) {
- return makePackageQualified(name.getName());
- }
- }
- return makePackageQualified(BindingHelper.mangleNameToClassName(serviceName));
- }
-
- protected String getJavaNameOfSEI(Port port) {
- QName portTypeName =
- (QName) port.getProperty(
- ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME);
- PortType pt = (PortType) document.find(Kinds.PORT_TYPE, portTypeName);
- //populate the portType map here. We should get rid of all these properties
- // lets not do it as it may break NB
- //TODO: clean all these stuff part of NB RFE
- port.portTypes.put(portTypeName, pt);
- JAXWSBinding jaxwsCust = (JAXWSBinding) getExtensionOfType(pt, JAXWSBinding.class);
- if (jaxwsCust != null && jaxwsCust.getClassName() != null) {
- CustomName name = jaxwsCust.getClassName();
- if (name != null && !name.getName().equals("")) {
- return makePackageQualified(name.getName());
- }
- }
-
- String interfaceName;
- if (portTypeName != null) {
- // got portType information from WSDL, use it to name the interface
- interfaceName =
- makePackageQualified(BindingHelper.mangleNameToClassName(portTypeName.getLocalPart()));
- } else {
- // somehow we only got the port name, so we use that
- interfaceName =
- makePackageQualified(BindingHelper.mangleNameToClassName(port.getName().getLocalPart()));
- }
- return interfaceName;
- }
-
- private void createJavaMethodForAsyncOperation(Port port, Operation operation,
- JavaInterface intf) {
- String candidateName = getJavaNameForOperation(operation);
- JavaMethod method = new JavaMethod(candidateName, options, errReceiver);
-
- assert (operation.getRequest() != null);
- Response response = operation.getResponse();
-
- // build a signature of the form "opName%arg1type%arg2type%...%argntype so that we
- // detect overloading conflicts in the generated java interface/classes
- for (Iterator iter = operation.getRequest().getParameters(); iter.hasNext();) {
- Parameter parameter = (Parameter) iter.next();
-
- if (parameter.getJavaParameter() != null) {
- error(operation.getEntity(), ModelerMessages.WSDLMODELER_INVALID_OPERATION(operation.getName().getLocalPart()));
- }
-
- JavaType parameterType = parameter.getType().getJavaType();
- JavaParameter javaParameter =
- new JavaParameter(
- BindingHelper.mangleNameToVariableName(parameter.getName()),
- parameterType,
- parameter,
- parameter.getLinkedParameter() != null);
- if (javaParameter.isHolder()) {
- javaParameter.setHolderName(javax.xml.ws.Holder.class.getName());
- }
- method.addParameter(javaParameter);
- parameter.setJavaParameter(javaParameter);
-
- }
-
- if (response != null) {
- String resultParameterName =
- (String) operation.getProperty(WSDL_RESULT_PARAMETER);
- Parameter resultParameter =
- response.getParameterByName(resultParameterName);
- JavaType returnType = resultParameter.getType().getJavaType();
- method.setReturnType(returnType);
-
- }
- operation.setJavaMethod(method);
- intf.addMethod(method);
- }
-
- /* (non-Javadoc)
- * @see WSDLModelerBase#createJavaMethodForOperation(WSDLPort, WSDLOperation, JavaInterface, Set, Set)
- */
- protected void createJavaMethodForOperation(Port port, Operation operation, JavaInterface intf) {
- if ((operation instanceof AsyncOperation)) {
- createJavaMethodForAsyncOperation(port, operation, intf);
- return;
- }
- String candidateName = getJavaNameForOperation(operation);
- JavaMethod method = new JavaMethod(candidateName, options, errReceiver);
- Parameter returnParam = (Parameter) operation.getProperty(WSDL_RESULT_PARAMETER);
- if (returnParam != null) {
- JavaType parameterType = returnParam.getType().getJavaType();
- method.setReturnType(parameterType);
- } else {
- method.setReturnType(JavaSimpleTypeCreator.VOID_JAVATYPE);
- }
- List<Parameter> parameterOrder = (List<Parameter>) operation.getProperty(WSDL_PARAMETER_ORDER);
- for (Parameter param : parameterOrder) {
- JavaType parameterType = param.getType().getJavaType();
- String name = (param.getCustomName() != null) ? param.getCustomName() : param.getName();
- name = BindingHelper.mangleNameToVariableName(name);
- //if its a java keyword after name mangling, then we simply put underscore as there is no
- //need to ask user to customize the parameter name if its java keyword
- if(Names.isJavaReservedWord(name)){
- name = "_"+name;
- }
- JavaParameter javaParameter =
- new JavaParameter(
- name,
- parameterType,
- param,
- param.isINOUT() || param.isOUT());
- if (javaParameter.isHolder()) {
- javaParameter.setHolderName(javax.xml.ws.Holder.class.getName());
- }
- method.addParameter(javaParameter);
- param.setJavaParameter(javaParameter);
- }
- operation.setJavaMethod(method);
- intf.addMethod(method);
-
- String opName = BindingHelper.mangleNameToVariableName(operation.getName().getLocalPart());
- for (Iterator iter = operation.getFaults();
- iter != null && iter.hasNext();
- ) {
- Fault fault = (Fault) iter.next();
- createJavaExceptionFromLiteralType(fault, port, opName);
- }
- JavaException javaException;
- Fault fault;
- for (Iterator iter = operation.getFaults(); iter.hasNext();) {
- fault = (Fault) iter.next();
- javaException = fault.getJavaException();
- method.addException(javaException.getName());
- }
-
- }
-
- protected boolean createJavaExceptionFromLiteralType(Fault fault, com.sun.tools.internal.ws.processor.model.Port port, String operationName) {
- JAXBType faultType = (JAXBType) fault.getBlock().getType();
-
- String exceptionName = fault.getName();
-
- // use fault namespace attribute
- JAXBStructuredType jaxbStruct = new JAXBStructuredType(new QName(
- fault.getBlock().getName().getNamespaceURI(),
- fault.getName()));
-
- QName memberName = fault.getElementName();
- JAXBElementMember jaxbMember =
- new JAXBElementMember(memberName, faultType);
- //jaxbMember.setNillable(faultType.isNillable());
-
- String javaMemberName = getLiteralJavaMemberName(fault);
- JavaStructureMember javaMember = new JavaStructureMember(
- javaMemberName,
- faultType.getJavaType(),
- jaxbMember);
- jaxbMember.setJavaStructureMember(javaMember);
- javaMember.setReadMethod(Names.getJavaMemberReadMethod(javaMember));
- javaMember.setInherited(false);
- jaxbMember.setJavaStructureMember(javaMember);
- jaxbStruct.add(jaxbMember);
-
- if (isConflictingExceptionClassName(exceptionName)) {
- exceptionName += "_Exception";
- }
-
- JavaException existingJavaException = _javaExceptions.get(exceptionName);
- if (existingJavaException != null) {
- if (existingJavaException.getName().equals(exceptionName)) {
- if (((JAXBType) existingJavaException.getOwner()).getName().equals(jaxbStruct.getName())
- || ModelerUtils.isEquivalentLiteralStructures(jaxbStruct, (JAXBStructuredType) existingJavaException.getOwner())) {
- // we have mapped this fault already
- if (faultType instanceof JAXBStructuredType) {
- fault.getBlock().setType((JAXBType) existingJavaException.getOwner());
- }
- fault.setJavaException(existingJavaException);
- return false;
- }
- }
- }
-
- JavaException javaException = new JavaException(exceptionName, false, jaxbStruct);
- javaException.add(javaMember);
- jaxbStruct.setJavaType(javaException);
-
- _javaExceptions.put(javaException.getName(), javaException);
-
- fault.setJavaException(javaException);
- return true;
- }
-
- protected boolean isRequestResponse() {
- return info.portTypeOperation.getStyle() == OperationStyle.REQUEST_RESPONSE;
- }
-
- protected java.util.List<String> getAsynParameterOrder() {
- //for async operation ignore the parameterOrder
- java.util.List<String> parameterList = new ArrayList<String>();
- Message inputMessage = getInputMessage();
- List<MessagePart> inputParts = inputMessage.getParts();
- for (MessagePart part : inputParts) {
- parameterList.add(part.getName());
- }
- return parameterList;
- }
-
-
- protected List<MessagePart> getParameterOrder() {
- List<MessagePart> params = new ArrayList<MessagePart>();
- String parameterOrder = info.portTypeOperation.getParameterOrder();
- java.util.List<String> parameterList;
- boolean parameterOrderPresent = false;
- if ((parameterOrder != null) && !(parameterOrder.trim().equals(""))) {
- parameterList = XmlUtil.parseTokenList(parameterOrder);
- parameterOrderPresent = true;
- } else {
- parameterList = new ArrayList<String>();
- }
- Message inputMessage = getInputMessage();
- Message outputMessage = getOutputMessage();
- List<MessagePart> outputParts = null;
- List<MessagePart> inputParts = inputMessage.getParts();
- //reset the mode and ret flag, as MEssagePArts aer shared across ports
- for (MessagePart part : inputParts) {
- part.setMode(Mode.IN);
- part.setReturn(false);
- }
- if (isRequestResponse()) {
- outputParts = outputMessage.getParts();
- for (MessagePart part : outputParts) {
- part.setMode(Mode.OUT);
- part.setReturn(false);
- }
- }
-
- if (parameterOrderPresent) {
- boolean validParameterOrder = true;
- Iterator<String> paramOrders = parameterList.iterator();
- // If any part in the parameterOrder is not present in the request or
- // response message, we completely ignore the parameterOrder hint
- while (paramOrders.hasNext()) {
- String param = paramOrders.next();
- boolean partFound = false;
- for (MessagePart part : inputParts) {
- if (param.equals(part.getName())) {
- partFound = true;
- break;
- }
- }
- // if not found, check in output parts
- if (!partFound) {
- for (MessagePart part : outputParts) {
- if (param.equals(part.getName())) {
- partFound = true;
- break;
- }
- }
- }
- if (!partFound) {
- warning(info.operation.getEntity(), ModelerMessages.WSDLMODELER_INVALID_PARAMETERORDER_PARAMETER(param, info.operation.getName().getLocalPart()));
- validParameterOrder = false;
- }
- }
-
- List<MessagePart> inputUnlistedParts = new ArrayList<MessagePart>();
- List<MessagePart> outputUnlistedParts = new ArrayList<MessagePart>();
-
- //gather input Parts
- if (validParameterOrder) {
- for (String param : parameterList) {
- MessagePart part = inputMessage.getPart(param);
- if (part != null) {
- params.add(part);
- continue;
- }
- if (isRequestResponse()) {
- MessagePart outPart = outputMessage.getPart(param);
- if (outPart != null) {
- params.add(outPart);
- }
- }
- }
-
- for (MessagePart part : inputParts) {
- if (!parameterList.contains(part.getName())) {
- inputUnlistedParts.add(part);
- }
- }
-
- if (isRequestResponse()) {
- // at most one output part should be unlisted
- for (MessagePart part : outputParts) {
- if (!parameterList.contains(part.getName())) {
- MessagePart inPart = inputMessage.getPart(part.getName());
- //dont add inout as unlisted part
- if ((inPart != null) && inPart.getDescriptor().equals(part.getDescriptor())) {
- inPart.setMode(Mode.INOUT);
- } else {
- outputUnlistedParts.add(part);
- }
- } else {
- //param list may contain it, check if its INOUT
- MessagePart inPart = inputMessage.getPart(part.getName());
- //dont add inout as unlisted part
- if ((inPart != null) && inPart.getDescriptor().equals(part.getDescriptor())) {
- inPart.setMode(Mode.INOUT);
- } else if (!params.contains(part)) {
- params.add(part);
- }
- }
- }
- if (outputUnlistedParts.size() == 1) {
- MessagePart resultPart = outputUnlistedParts.get(0);
- resultPart.setReturn(true);
- params.add(resultPart);
- outputUnlistedParts.clear();
- }
- }
-
- //add the input and output unlisted parts
- for (MessagePart part : inputUnlistedParts) {
- params.add(part);
- }
-
- for (MessagePart part : outputUnlistedParts) {
- params.add(part);
- }
- return params;
-
- }
- //parameterOrder attribute is not valid, we ignore it
- warning(info.operation.getEntity(), ModelerMessages.WSDLMODELER_INVALID_PARAMETER_ORDER_INVALID_PARAMETER_ORDER(info.operation.getName().getLocalPart()));
- parameterList.clear();
- }
-
- List<MessagePart> outParts = new ArrayList<MessagePart>();
-
- //construct input parameter list with the same order as in input message
- for (MessagePart part : inputParts) {
- params.add(part);
- }
-
- if (isRequestResponse()) {
- for (MessagePart part : outputParts) {
- MessagePart inPart = inputMessage.getPart(part.getName());
- if (inPart != null && part.getDescriptorKind() == inPart.getDescriptorKind() &&
- part.getDescriptor().equals(inPart.getDescriptor())) {
- inPart.setMode(Mode.INOUT);
- continue;
- }
- outParts.add(part);
- }
-
- //append the out parts to the parameterList
- for (MessagePart part : outParts) {
- if (outParts.size() == 1) {
- part.setReturn(true);
- }
- params.add(part);
- }
- }
- return params;
- }
-
- /**
- * @param port
- * @param suffix
- * @return the Java ClassName for a port
- */
- protected String getClassName(Port port, String suffix) {
- String prefix = BindingHelper.mangleNameToClassName((port.getName().getLocalPart()));
- return options.defaultPackage + "." + prefix + suffix;
- }
-
- @Override
- protected boolean isConflictingServiceClassName(String name) {
- return conflictsWithSEIClass(name) || conflictsWithJAXBClass(name) || conflictsWithExceptionClass(name);
- }
-
- private boolean conflictsWithSEIClass(String name) {
- Set<String> seiNames = classNameCollector.getSeiClassNames();
- return seiNames != null && seiNames.contains(name);
- }
-
- private boolean conflictsWithJAXBClass(String name) {
- Set<String> jaxbNames = classNameCollector.getJaxbGeneratedClassNames();
- return jaxbNames != null && jaxbNames.contains(name);
- }
-
- private boolean conflictsWithExceptionClass(String name) {
- Set<String> exceptionNames = classNameCollector.getExceptionClassNames();
- return exceptionNames != null && exceptionNames.contains(name);
- }
-
- @Override
- protected boolean isConflictingExceptionClassName(String name) {
- return conflictsWithSEIClass(name) || conflictsWithJAXBClass(name);
- }
-
- protected JAXBModelBuilder getJAXBModelBuilder() {
- return jaxbModelBuilder;
- }
-
- protected boolean validateWSDLBindingStyle(Binding binding) {
- SOAPBinding soapBinding =
- (SOAPBinding) getExtensionOfType(binding, SOAPBinding.class);
-
- //dont process the binding
- if (soapBinding == null) {
- soapBinding = (SOAPBinding) getExtensionOfType(binding, SOAP12Binding.class);
- }
- if (soapBinding == null) {
- return false;
- }
-
- //if soapbind:binding has no style attribute, the default is DOCUMENT
- if (soapBinding.getStyle() == null) {
- soapBinding.setStyle(SOAPStyle.DOCUMENT);
- }
-
- SOAPStyle opStyle = soapBinding.getStyle();
- for (Iterator iter = binding.operations(); iter.hasNext();) {
- BindingOperation bindingOperation =
- (BindingOperation) iter.next();
- SOAPOperation soapOperation =
- (SOAPOperation) getExtensionOfType(bindingOperation,
- SOAPOperation.class);
- if (soapOperation != null) {
- SOAPStyle currOpStyle = (soapOperation.getStyle() != null) ? soapOperation.getStyle() : soapBinding.getStyle();
- //dont check for the first operation
- if (!currOpStyle.equals(opStyle)) {
- return false;
- }
- }
- }
- return true;
- }
-
- /**
- * @param port
- */
- private void applyWrapperStyleCustomization(Port port, PortType portType) {
- JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(portType, JAXWSBinding.class);
- Boolean wrapperStyle = (jaxwsBinding != null) ? jaxwsBinding.isEnableWrapperStyle() : null;
- if (wrapperStyle != null) {
- port.setWrapped(wrapperStyle);
- }
- }
-
- protected static void setDocumentationIfPresent(
- ModelObject obj,
- Documentation documentation) {
- if (documentation != null && documentation.getContent() != null) {
- obj.setJavaDoc(documentation.getContent());
- }
- }
-
- protected String getJavaNameForOperation(Operation operation) {
- String name = operation.getJavaMethodName();
- if (Names.isJavaReservedWord(name)) {
- name = "_" + name;
- }
- return name;
- }
-
- private void reportError(Entity entity,
- String formattedMsg, Exception nestedException ) {
- Locator locator = (entity == null)?null:entity.getLocator();
-
- SAXParseException e = new SAXParseException2( formattedMsg,
- locator,
- nestedException );
- errReceiver.error(e);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModelerBase.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModelerBase.java
deleted file mode 100644
index a56f30d4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModelerBase.java
+++ /dev/null
@@ -1,791 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.processor.modeler.wsdl;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.processor.generator.Names;
-import com.sun.tools.internal.ws.processor.model.Fault;
-import com.sun.tools.internal.ws.processor.model.Operation;
-import com.sun.tools.internal.ws.processor.model.Port;
-import com.sun.tools.internal.ws.processor.model.java.JavaException;
-import com.sun.tools.internal.ws.processor.modeler.Modeler;
-import com.sun.tools.internal.ws.resources.ModelerMessages;
-import com.sun.tools.internal.ws.wscompile.AbortException;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiverFilter;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.tools.internal.ws.wsdl.document.*;
-import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBinding;
-import com.sun.tools.internal.ws.wsdl.document.mime.MIMEContent;
-import com.sun.tools.internal.ws.wsdl.document.mime.MIMEMultipartRelated;
-import com.sun.tools.internal.ws.wsdl.document.mime.MIMEPart;
-import com.sun.tools.internal.ws.wsdl.document.schema.SchemaKinds;
-import com.sun.tools.internal.ws.wsdl.document.soap.*;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wsdl.framework.GloballyKnown;
-import com.sun.tools.internal.ws.wsdl.framework.NoSuchEntityException;
-import com.sun.tools.internal.ws.wsdl.parser.WSDLParser;
-import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder;
-import com.sun.xml.internal.ws.spi.db.BindingHelper;
-
-import org.xml.sax.helpers.LocatorImpl;
-
-import javax.xml.namespace.QName;
-import java.util.*;
-
-/**
- *
- * @author WS Development Team
- *
- * Base class for WSDL->Model classes.
- */
-public abstract class WSDLModelerBase implements Modeler {
- protected final ErrorReceiverFilter errReceiver;
- protected final WsimportOptions options;
- protected MetadataFinder forest;
-
-
- public WSDLModelerBase(WsimportOptions options, ErrorReceiver receiver, MetadataFinder forest) {
- this.options = options;
- this.errReceiver = new ErrorReceiverFilter(receiver);
- this.forest = forest;
- }
-
- /**
- *
- * @param port
- * @param wsdlPort
- */
- protected void applyPortMethodCustomization(Port port, com.sun.tools.internal.ws.wsdl.document.Port wsdlPort) {
- if (isProvider(wsdlPort)) {
- return;
- }
- JAXWSBinding jaxwsBinding = (JAXWSBinding)getExtensionOfType(wsdlPort, JAXWSBinding.class);
-
- String portMethodName = (jaxwsBinding != null)?((jaxwsBinding.getMethodName() != null)?jaxwsBinding.getMethodName().getName():null):null;
- if(portMethodName != null){
- port.setPortGetter(portMethodName);
- }else{
- portMethodName = Names.getPortName(port);
- portMethodName = BindingHelper.mangleNameToClassName(portMethodName);
- port.setPortGetter("get"+portMethodName);
- }
-
- }
-
- protected boolean isProvider(com.sun.tools.internal.ws.wsdl.document.Port wsdlPort){
- JAXWSBinding portCustomization = (JAXWSBinding)getExtensionOfType(wsdlPort, JAXWSBinding.class);
- Boolean isProvider = (portCustomization != null)?portCustomization.isProvider():null;
- if(isProvider != null){
- return isProvider;
- }
-
- JAXWSBinding jaxwsGlobalCustomization = (JAXWSBinding)getExtensionOfType(document.getDefinitions(), JAXWSBinding.class);
- isProvider = (jaxwsGlobalCustomization != null)?jaxwsGlobalCustomization.isProvider():null;
- if (isProvider != null) {
- return isProvider;
- }
- return false;
- }
-
- protected SOAPBody getSOAPRequestBody() {
- SOAPBody requestBody =
- (SOAPBody)getAnyExtensionOfType(info.bindingOperation.getInput(),
- SOAPBody.class);
- if (requestBody == null) {
- // the WSDL document is invalid
- error(info.bindingOperation.getInput(), ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_INPUT_MISSING_SOAP_BODY(info.bindingOperation.getName()));
- }
- return requestBody;
- }
-
- protected boolean isRequestMimeMultipart() {
- for (TWSDLExtension extension: info.bindingOperation.getInput().extensions()) {
- if (extension.getClass().equals(MIMEMultipartRelated.class)) {
- return true;
- }
- }
- return false;
- }
-
- protected boolean isResponseMimeMultipart() {
- for (TWSDLExtension extension: info.bindingOperation.getOutput().extensions()) {
- if (extension.getClass().equals(MIMEMultipartRelated.class)) {
- return true;
- }
- }
- return false;
- }
-
-
-
-
- protected SOAPBody getSOAPResponseBody() {
- SOAPBody responseBody =
- (SOAPBody)getAnyExtensionOfType(info.bindingOperation.getOutput(),
- SOAPBody.class);
- if (responseBody == null) {
- // the WSDL document is invalid
- error(info.bindingOperation.getOutput(), ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_MISSING_SOAP_BODY(info.bindingOperation.getName()));
- }
- return responseBody;
- }
-
- protected com.sun.tools.internal.ws.wsdl.document.Message getOutputMessage() {
- if (info.portTypeOperation.getOutput() == null) {
- return null;
- }
- return info.portTypeOperation.getOutput().resolveMessage(info.document);
- }
-
- protected com.sun.tools.internal.ws.wsdl.document.Message getInputMessage() {
- return info.portTypeOperation.getInput().resolveMessage(info.document);
- }
-
- /**
- * @param body request or response body, represents soap:body
- * @param message Input or output message, equivalent to wsdl:message
- * @return iterator over MessagePart
- */
- protected List<MessagePart> getMessageParts(
- SOAPBody body,
- com.sun.tools.internal.ws.wsdl.document.Message message, boolean isInput) {
- String bodyParts = body.getParts();
- ArrayList<MessagePart> partsList = new ArrayList<MessagePart>();
- List<MessagePart> parts = new ArrayList<MessagePart>();
-
- //get Mime parts
- List mimeParts;
- if (isInput) {
- mimeParts = getMimeContentParts(message, info.bindingOperation.getInput());
- } else {
- mimeParts = getMimeContentParts(message, info.bindingOperation.getOutput());
- }
-
- if (bodyParts != null) {
- StringTokenizer in = new StringTokenizer(bodyParts.trim(), " ");
- while (in.hasMoreTokens()) {
- String part = in.nextToken();
- MessagePart mPart = message.getPart(part);
- if (null == mPart) {
- error(message, ModelerMessages.WSDLMODELER_ERROR_PARTS_NOT_FOUND(part, message.getName()));
- }
- mPart.setBindingExtensibilityElementKind(MessagePart.SOAP_BODY_BINDING);
- partsList.add(mPart);
- }
- } else {
- for (MessagePart mPart : message.getParts()) {
- if (!mimeParts.contains(mPart)) {
- mPart.setBindingExtensibilityElementKind(MessagePart.SOAP_BODY_BINDING);
- }
- partsList.add(mPart);
- }
- }
-
- for (MessagePart mPart : message.getParts()) {
- if (mimeParts.contains(mPart)) {
- mPart.setBindingExtensibilityElementKind(MessagePart.WSDL_MIME_BINDING);
- parts.add(mPart);
- } else if(partsList.contains(mPart)) {
- mPart.setBindingExtensibilityElementKind(MessagePart.SOAP_BODY_BINDING);
- parts.add(mPart);
- }
- }
-
- return parts;
- }
-
- /**
- * @param message
- * @return MessageParts referenced by the mime:content
- */
- protected List<MessagePart> getMimeContentParts(Message message, TWSDLExtensible ext) {
- ArrayList<MessagePart> mimeContentParts = new ArrayList<MessagePart>();
-
- for (MIMEPart mimePart : getMimeParts(ext)) {
- MessagePart part = getMimeContentPart(message, mimePart);
- if (part != null) {
- mimeContentParts.add(part);
- }
- }
- return mimeContentParts;
- }
-
- /**
- * @param mimeParts
- */
- protected boolean validateMimeParts(Iterable<MIMEPart> mimeParts) {
- boolean gotRootPart = false;
- List<MIMEContent> mimeContents = new ArrayList<MIMEContent>();
- for (MIMEPart mPart : mimeParts) {
- for (TWSDLExtension obj : mPart.extensions()) {
- if (obj instanceof SOAPBody) {
- if (gotRootPart) {
- warning(mPart, ModelerMessages.MIMEMODELER_INVALID_MIME_PART_MORE_THAN_ONE_SOAP_BODY(info.operation.getName().getLocalPart()));
- return false;
- }
- gotRootPart = true;
- } else if (obj instanceof MIMEContent) {
- mimeContents.add((MIMEContent) obj);
- }
- }
- if (!validateMimeContentPartNames(mimeContents)) {
- return false;
- }
- if(mPart.getName() != null) {
- warning(mPart, ModelerMessages.MIMEMODELER_INVALID_MIME_PART_NAME_NOT_ALLOWED(info.portTypeOperation.getName()));
- }
- }
- return true;
-
- }
-
- private MessagePart getMimeContentPart(Message message, MIMEPart part) {
- for( MIMEContent mimeContent : getMimeContents(part) ) {
- String mimeContentPartName = mimeContent.getPart();
- MessagePart mPart = message.getPart(mimeContentPartName);
- //RXXXX mime:content MUST have part attribute
- if(null == mPart) {
- error(mimeContent, ModelerMessages.WSDLMODELER_ERROR_PARTS_NOT_FOUND(mimeContentPartName, message.getName()));
- }
- mPart.setBindingExtensibilityElementKind(MessagePart.WSDL_MIME_BINDING);
- return mPart;
- }
- return null;
- }
-
- //List of mimeTypes
- protected List<String> getAlternateMimeTypes(List<MIMEContent> mimeContents) {
- List<String> mimeTypes = new ArrayList<String>();
- //validateMimeContentPartNames(mimeContents.iterator());
-// String mimeType = null;
- for(MIMEContent mimeContent:mimeContents){
- String mimeType = getMimeContentType(mimeContent);
- if (!mimeTypes.contains(mimeType)) {
- mimeTypes.add(mimeType);
- }
- }
- return mimeTypes;
- }
-
- private boolean validateMimeContentPartNames(List<MIMEContent> mimeContents) {
- //validate mime:content(s) in the mime:part as per R2909
- for (MIMEContent mimeContent : mimeContents) {
- String mimeContnetPart;
- mimeContnetPart = getMimeContentPartName(mimeContent);
- if(mimeContnetPart == null) {
- warning(mimeContent, ModelerMessages.MIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(info.operation.getName().getLocalPart()));
- return false;
- }
- }
- return true;
- }
-
- protected Iterable<MIMEPart> getMimeParts(TWSDLExtensible ext) {
- MIMEMultipartRelated multiPartRelated =
- (MIMEMultipartRelated) getAnyExtensionOfType(ext,
- MIMEMultipartRelated.class);
- if(multiPartRelated == null) {
- return Collections.emptyList();
- }
- return multiPartRelated.getParts();
- }
-
- //returns MIMEContents
- protected List<MIMEContent> getMimeContents(MIMEPart part) {
- List<MIMEContent> mimeContents = new ArrayList<MIMEContent>();
- for (TWSDLExtension mimeContent : part.extensions()) {
- if (mimeContent instanceof MIMEContent) {
- mimeContents.add((MIMEContent) mimeContent);
- }
- }
- //validateMimeContentPartNames(mimeContents.iterator());
- return mimeContents;
- }
-
- private String getMimeContentPartName(MIMEContent mimeContent){
- /*String partName = mimeContent.getPart();
- if(partName == null){
- throw new ModelerException("mimemodeler.invalidMimeContent.missingPartAttribute",
- new Object[] {info.operation.getName().getLocalPart()});
- }
- return partName;*/
- return mimeContent.getPart();
- }
-
- private String getMimeContentType(MIMEContent mimeContent){
- String mimeType = mimeContent.getType();
- if(mimeType == null){
- error(mimeContent, ModelerMessages.MIMEMODELER_INVALID_MIME_CONTENT_MISSING_TYPE_ATTRIBUTE(info.operation.getName().getLocalPart()));
- }
- return mimeType;
- }
-
- /**
- * For Document/Lit the wsdl:part should only have element attribute and
- * for RPC/Lit or RPC/Encoded the wsdl:part should only have type attribute
- * inside wsdl:message.
- */
- protected boolean isStyleAndPartMatch(
- SOAPOperation soapOperation,
- MessagePart part) {
-
- // style attribute on soap:operation takes precedence over the
- // style attribute on soap:binding
-
- if ((soapOperation != null) && (soapOperation.getStyle() != null)) {
- if ((soapOperation.isDocument()
- && (part.getDescriptorKind() != SchemaKinds.XSD_ELEMENT))
- || (soapOperation.isRPC()
- && (part.getDescriptorKind() != SchemaKinds.XSD_TYPE))) {
- return false;
- }
- } else {
- if ((info.soapBinding.isDocument()
- && (part.getDescriptorKind() != SchemaKinds.XSD_ELEMENT))
- || (info.soapBinding.isRPC()
- && (part.getDescriptorKind() != SchemaKinds.XSD_TYPE))) {
- return false;
- }
- }
-
- return true;
- }
-
-
-
- protected String getRequestNamespaceURI(SOAPBody body) {
- String namespaceURI = body.getNamespace();
- if (namespaceURI == null) {
- if(options.isExtensionMode()){
- return info.modelPort.getName().getNamespaceURI();
- }
- // the WSDL document is invalid
- // at least, that's my interpretation of section 3.5 of the WSDL 1.1 spec!
- error(body, ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_INPUT_SOAP_BODY_MISSING_NAMESPACE(info.bindingOperation.getName()));
- }
- return namespaceURI;
- }
-
- protected String getResponseNamespaceURI(SOAPBody body) {
- String namespaceURI = body.getNamespace();
- if (namespaceURI == null) {
- if(options.isExtensionMode()){
- return info.modelPort.getName().getNamespaceURI();
- }
- // the WSDL document is invalid
- // at least, that's my interpretation of section 3.5 of the WSDL 1.1 spec!
- error(body, ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_SOAP_BODY_MISSING_NAMESPACE(info.bindingOperation.getName()));
- }
- return namespaceURI;
- }
-
- /**
- * @return List of SOAPHeader extensions
- */
- protected List<SOAPHeader> getHeaderExtensions(TWSDLExtensible extensible) {
- List<SOAPHeader> headerList = new ArrayList<SOAPHeader>();
- for (TWSDLExtension extension : extensible.extensions()) {
- if (extension.getClass()==MIMEMultipartRelated.class) {
- for( MIMEPart part : ((MIMEMultipartRelated) extension).getParts() ) {
- boolean isRootPart = isRootPart(part);
- for (TWSDLExtension obj : part.extensions()) {
- if (obj instanceof SOAPHeader) {
- //bug fix: 5024015
- if (!isRootPart) {
- warning((Entity) obj, ModelerMessages.MIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(info.bindingOperation.getName()));
- return new ArrayList<SOAPHeader>();
- }
- headerList.add((SOAPHeader) obj);
- }
- }
- }
- } else if (extension instanceof SOAPHeader) {
- headerList.add((SOAPHeader) extension);
- }
- }
- return headerList;
- }
-
- /**
- * @param part
- * @return true if part is the Root part
- */
- private boolean isRootPart(MIMEPart part) {
- for (TWSDLExtension twsdlExtension : part.extensions()) {
- if (twsdlExtension instanceof SOAPBody) {
- return true;
- }
- }
- return false;
- }
-
- protected Set getDuplicateFaultNames() {
- // look for fault messages with the same soap:fault name
- Set<QName> faultNames = new HashSet<QName>();
- Set<QName> duplicateNames = new HashSet<QName>();
- for( BindingFault bindingFault : info.bindingOperation.faults() ) {
- com.sun.tools.internal.ws.wsdl.document.Fault portTypeFault = null;
- for (com.sun.tools.internal.ws.wsdl.document.Fault aFault : info.portTypeOperation.faults()) {
- if (aFault.getName().equals(bindingFault.getName())) {
- if (portTypeFault != null) {
- // the WSDL document is invalid
- error(bindingFault, ModelerMessages.WSDLMODELER_INVALID_BINDING_FAULT_NOT_UNIQUE(bindingFault.getName(),
- info.bindingOperation.getName()));
- } else {
- portTypeFault = aFault;
- }
- }
- }
- if (portTypeFault == null) {
- // the WSDL document is invalid
- error(bindingFault, ModelerMessages.WSDLMODELER_INVALID_BINDING_FAULT_NOT_FOUND(bindingFault.getName(),
- info.bindingOperation.getName()));
- }
- SOAPFault soapFault =
- (SOAPFault)getExtensionOfType(bindingFault, SOAPFault.class);
- if (soapFault == null) {
- // the WSDL document is invalid
- if(options.isExtensionMode()){
- warning(bindingFault, ModelerMessages.WSDLMODELER_INVALID_BINDING_FAULT_OUTPUT_MISSING_SOAP_FAULT(bindingFault.getName(),
- info.bindingOperation.getName()));
- }else {
- error(bindingFault, ModelerMessages.WSDLMODELER_INVALID_BINDING_FAULT_OUTPUT_MISSING_SOAP_FAULT(bindingFault.getName(),
- info.bindingOperation.getName()));
- }
- }
-
- com.sun.tools.internal.ws.wsdl.document.Message faultMessage =
- portTypeFault.resolveMessage(info.document);
- if(faultMessage.getParts().isEmpty()) {
- // the WSDL document is invalid
- error(faultMessage, ModelerMessages.WSDLMODELER_INVALID_BINDING_FAULT_EMPTY_MESSAGE(bindingFault.getName(),
- faultMessage.getName()));
- }
- // bug fix: 4852729
- if (!options.isExtensionMode() && (soapFault != null && soapFault.getNamespace() != null)) {
- warning(soapFault, ModelerMessages.WSDLMODELER_WARNING_R_2716_R_2726("soapbind:fault", soapFault.getName()));
- }
- String faultNamespaceURI = (soapFault != null && soapFault.getNamespace() != null)?soapFault.getNamespace():portTypeFault.getMessage().getNamespaceURI();
- String faultName = faultMessage.getName();
- QName faultQName = new QName(faultNamespaceURI, faultName);
- if (faultNames.contains(faultQName)) {
- duplicateNames.add(faultQName);
- } else {
- faultNames.add(faultQName);
- }
- }
- return duplicateNames;
- }
-
-
- /**
- * @param operation
- * @return true if operation has valid body parts
- */
- protected boolean validateBodyParts(BindingOperation operation) {
- boolean isRequestResponse =
- info.portTypeOperation.getStyle()
- == OperationStyle.REQUEST_RESPONSE;
- List<MessagePart> inputParts = getMessageParts(getSOAPRequestBody(), getInputMessage(), true);
- if (!validateStyleAndPart(operation, inputParts)) {
- return false;
- }
-
- if(isRequestResponse){
- List<MessagePart> outputParts = getMessageParts(getSOAPResponseBody(), getOutputMessage(), false);
- if (!validateStyleAndPart(operation, outputParts)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * @param operation
- * @return true if operation has valid style and part
- */
- private boolean validateStyleAndPart(BindingOperation operation, List<MessagePart> parts) {
- SOAPOperation soapOperation =
- (SOAPOperation) getExtensionOfType(operation, SOAPOperation.class);
- for (MessagePart part : parts) {
- if (part.getBindingExtensibilityElementKind() == MessagePart.SOAP_BODY_BINDING) {
- if (!isStyleAndPartMatch(soapOperation, part)) {
- return false;
- }
- }
- }
- return true;
- }
-
- protected String getLiteralJavaMemberName(Fault fault) {
- String javaMemberName;
-
- QName memberName = fault.getElementName();
- javaMemberName = fault.getJavaMemberName();
- if (javaMemberName == null) {
- javaMemberName = memberName.getLocalPart();
- }
- return javaMemberName;
- }
-
- /**
- * @param ext
- * @param message
- * @param name
- * @return List of MimeContents from ext
- */
- protected List<MIMEContent> getMimeContents(TWSDLExtensible ext, Message message, String name) {
- for (MIMEPart mimePart : getMimeParts(ext)) {
- List<MIMEContent> mimeContents = getMimeContents(mimePart);
- for (MIMEContent mimeContent : mimeContents) {
- if (mimeContent.getPart().equals(name)) {
- return mimeContents;
- }
- }
- }
- return null;
- }
-
- protected String makePackageQualified(String s) {
- if (s.indexOf(".") != -1) {
- // s is already package qualified
- return s;
- } else if (options.defaultPackage != null
- && !options.defaultPackage.equals("")) {
- return options.defaultPackage + "." + s;
- } else {//options.defaultPackage seems to be never null, and this is never executed
- return s;
- }
-
- }
-
-
- protected String getUniqueName(
- com.sun.tools.internal.ws.wsdl.document.Operation operation,
- boolean hasOverloadedOperations) {
- if (hasOverloadedOperations) {
- return operation.getUniqueKey().replace(' ', '_');
- } else {
- return operation.getName();
- }
- }
-
- protected static QName getQNameOf(GloballyKnown entity) {
- return new QName(
- entity.getDefining().getTargetNamespaceURI(),
- entity.getName());
- }
-
- protected static TWSDLExtension getExtensionOfType(
- TWSDLExtensible extensible,
- Class type) {
- for (TWSDLExtension extension:extensible.extensions()) {
- if (extension.getClass().equals(type)) {
- return extension;
- }
- }
-
- return null;
- }
-
- protected TWSDLExtension getAnyExtensionOfType(
- TWSDLExtensible extensible,
- Class type) {
- if (extensible == null) {
- return null;
- }
- for (TWSDLExtension extension:extensible.extensions()) {
- if(extension.getClass().equals(type)) {
- return extension;
- }else if (extension.getClass().equals(MIMEMultipartRelated.class) &&
- (type.equals(SOAPBody.class) || type.equals(MIMEContent.class)
- || type.equals(MIMEPart.class))) {
- for (MIMEPart part : ((MIMEMultipartRelated)extension).getParts()) {
- //bug fix: 5024001
- TWSDLExtension extn = getExtensionOfType(part, type);
- if (extn != null) {
- return extn;
- }
- }
- }
- }
-
- return null;
- }
-
- // bug fix: 4857100
- protected static com.sun.tools.internal.ws.wsdl.document.Message findMessage(
- QName messageName,
- WSDLDocument document) {
- com.sun.tools.internal.ws.wsdl.document.Message message = null;
- try {
- message =
- (com.sun.tools.internal.ws.wsdl.document.Message)document.find(
- Kinds.MESSAGE,
- messageName);
- } catch (NoSuchEntityException e) {
- }
- return message;
- }
-
- protected static boolean tokenListContains(
- String tokenList,
- String target) {
- if (tokenList == null) {
- return false;
- }
-
- StringTokenizer tokenizer = new StringTokenizer(tokenList, " ");
- while (tokenizer.hasMoreTokens()) {
- String s = tokenizer.nextToken();
- if (target.equals(s)) {
- return true;
- }
- }
- return false;
- }
-
- protected String getUniqueClassName(String className) {
- int cnt = 2;
- String uniqueName = className;
- while (reqResNames.contains(uniqueName.toLowerCase(Locale.ENGLISH))) {
- uniqueName = className + cnt;
- cnt++;
- }
- reqResNames.add(uniqueName.toLowerCase(Locale.ENGLISH));
- return uniqueName;
- }
-
- protected boolean isConflictingClassName(String name) {
- if (_conflictingClassNames == null) {
- return false;
- }
-
- return _conflictingClassNames.contains(name);
- }
-
- protected boolean isConflictingServiceClassName(String name) {
- return isConflictingClassName(name);
- }
-
- protected boolean isConflictingStubClassName(String name) {
- return isConflictingClassName(name);
- }
-
- protected boolean isConflictingTieClassName(String name) {
- return isConflictingClassName(name);
- }
-
- protected boolean isConflictingPortClassName(String name) {
- return isConflictingClassName(name);
- }
-
- protected boolean isConflictingExceptionClassName(String name) {
- return isConflictingClassName(name);
- }
-
- int numPasses = 0;
-
- protected void warning(Entity entity, String message){
- //avoid duplicate warning for the second pass
- if (numPasses > 1) {
- return;
- }
- if (entity == null) {
- errReceiver.warning(null, message);
- } else {
- errReceiver.warning(entity.getLocator(), message);
- }
- }
-
- protected void error(Entity entity, String message){
- if (entity == null) {
- errReceiver.error(null, message);
- } else {
- errReceiver.error(entity.getLocator(), message);
- }
- throw new AbortException();
- }
-
- protected static final String OPERATION_HAS_VOID_RETURN_TYPE =
- "com.sun.xml.internal.ws.processor.modeler.wsdl.operationHasVoidReturnType";
- protected static final String WSDL_PARAMETER_ORDER =
- "com.sun.xml.internal.ws.processor.modeler.wsdl.parameterOrder";
- public static final String WSDL_RESULT_PARAMETER =
- "com.sun.xml.internal.ws.processor.modeler.wsdl.resultParameter";
- public static final String MESSAGE_HAS_MIME_MULTIPART_RELATED_BINDING =
- "com.sun.xml.internal.ws.processor.modeler.wsdl.mimeMultipartRelatedBinding";
-
-
- protected ProcessSOAPOperationInfo info;
-
- private Set _conflictingClassNames;
- protected Map<String,JavaException> _javaExceptions;
- protected Map _faultTypeToStructureMap;
- protected Map<QName, Port> _bindingNameToPortMap;
-
- private final Set<String> reqResNames = new HashSet<String>();
-
- public static class ProcessSOAPOperationInfo {
-
- public ProcessSOAPOperationInfo(
- Port modelPort,
- com.sun.tools.internal.ws.wsdl.document.Port port,
- com.sun.tools.internal.ws.wsdl.document.Operation portTypeOperation,
- BindingOperation bindingOperation,
- SOAPBinding soapBinding,
- WSDLDocument document,
- boolean hasOverloadedOperations,
- Map headers) {
- this.modelPort = modelPort;
- this.port = port;
- this.portTypeOperation = portTypeOperation;
- this.bindingOperation = bindingOperation;
- this.soapBinding = soapBinding;
- this.document = document;
- this.hasOverloadedOperations = hasOverloadedOperations;
- this.headers = headers;
- }
-
- public Port modelPort;
- public com.sun.tools.internal.ws.wsdl.document.Port port;
- public com.sun.tools.internal.ws.wsdl.document.Operation portTypeOperation;
- public BindingOperation bindingOperation;
- public SOAPBinding soapBinding;
- public WSDLDocument document;
- public boolean hasOverloadedOperations;
- public Map headers;
-
- // additional data
- public Operation operation;
- }
-
- protected WSDLParser parser;
- protected WSDLDocument document;
- protected static final LocatorImpl NULL_LOCATOR = new LocatorImpl();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/ClassNameCollector.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/ClassNameCollector.java
deleted file mode 100644
index df805dbe..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/ClassNameCollector.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.util;
-
-import com.sun.tools.internal.ws.processor.model.*;
-import com.sun.tools.internal.ws.processor.model.java.JavaInterface;
-import com.sun.tools.internal.ws.processor.model.jaxb.JAXBType;
-import com.sun.tools.internal.ws.processor.model.jaxb.JAXBTypeVisitor;
-import com.sun.tools.internal.ws.processor.model.jaxb.RpcLitStructure;
-
-import javax.xml.namespace.QName;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * This class writes out a Model as an XML document.
- *
- * @author WS Development Team
- */
-public class ClassNameCollector extends ExtendedModelVisitor
- implements JAXBTypeVisitor {
-
- public ClassNameCollector() {
- }
-
- public void process(Model model) {
- try {
- _allClassNames = new HashSet();
- _exceptions = new HashSet();
- _wsdlBindingNames = new HashSet();
- _conflictingClassNames = new HashSet();
- _seiClassNames = new HashSet<String>();
- _jaxbGeneratedClassNames = new HashSet<String>();
- _exceptionClassNames = new HashSet<String>();
- _portTypeNames = new HashSet<QName>();
- visit(model);
- } catch (Exception e) {
- e.printStackTrace();
- // fail silently
- } finally {
- _allClassNames = null;
- _exceptions = null;
- }
- }
-
- public Set getConflictingClassNames() {
- return _conflictingClassNames;
- }
-
- protected void postVisit(Model model) throws Exception {
- for (Iterator iter = model.getExtraTypes(); iter.hasNext();) {
- visitType((AbstractType)iter.next());
- }
- }
-
- protected void preVisit(Service service) throws Exception {
- registerClassName(
- ((JavaInterface)service.getJavaInterface()).getName());
- // We don't generate Impl classes, commenting it out.
- // Otherwise, it would cause naming conflicts
- //registerClassName(
- // ((JavaInterface)service.getJavaInterface()).getImpl());
- }
-
- protected void processPort11x(Port port){
- QName wsdlBindingName = (QName) port.getProperty(
- ModelProperties.PROPERTY_WSDL_BINDING_NAME);
- if (!_wsdlBindingNames.contains(wsdlBindingName)) {
-
- // multiple ports can share a binding without causing a conflict
- registerClassName(port.getJavaInterface().getName());
- }
- registerClassName((String) port.getProperty(
- ModelProperties.PROPERTY_STUB_CLASS_NAME));
- registerClassName((String) port.getProperty(
- ModelProperties.PROPERTY_TIE_CLASS_NAME));
- }
-
- protected void preVisit(Port port) throws Exception {
- QName portTypeName = (QName)port.getProperty(ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME);
- if(_portTypeNames.contains(portTypeName))
- return;
-
- //in 2.0, stub/tie class are binding agnostic so they should be per port, that is multiple
- // bindings can share the same port
-
- addSEIClassName(port.getJavaInterface().getName());
- }
-
- private void addSEIClassName(String s) {
- _seiClassNames.add(s);
- registerClassName(s);
- }
-
- protected void postVisit(Port port) throws Exception {
- QName wsdlBindingName = (QName) port.getProperty(
- ModelProperties.PROPERTY_WSDL_BINDING_NAME);
- if (!_wsdlBindingNames.contains(wsdlBindingName)) {
- _wsdlBindingNames.add(wsdlBindingName);
- }
-
- QName portTypeName = (QName)port.getProperty(ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME);
- if(!_portTypeNames.contains(portTypeName)){
- _portTypeNames.add(portTypeName);
- }
- }
-
- protected boolean shouldVisit(Port port) {
- QName wsdlBindingName = (QName) port.getProperty(
- ModelProperties.PROPERTY_WSDL_BINDING_NAME);
- return !_wsdlBindingNames.contains(wsdlBindingName);
- }
-
- protected void preVisit(Fault fault) throws Exception {
- if (!_exceptions.contains(fault.getJavaException())) {
-
- /* the same exception can be used in several faults, but that
- * doesn't mean that there is a conflict
- */
- _exceptions.add(fault.getJavaException());
- addExceptionClassName(fault.getJavaException().getName());
-
- for (Iterator iter = fault.getSubfaults();
- iter != null && iter.hasNext();) {
-
- Fault subfault = (Fault) iter.next();
- preVisit(subfault);
- }
- }
- }
-
- private void addExceptionClassName(String name) {
- if(_allClassNames.contains(name))
- _exceptionClassNames.add(name);
- registerClassName(name);
- //To change body of created methods use File | Settings | File Templates.
- }
-
- protected void visitBodyBlock(Block block) throws Exception {
- visitBlock(block);
- }
-
- protected void visitHeaderBlock(Block block) throws Exception {
- visitBlock(block);
- }
-
- protected void visitFaultBlock(Block block) throws Exception {
- }
-
- protected void visitBlock(Block block) throws Exception {
- visitType(block.getType());
- }
-
- protected void visit(Parameter parameter) throws Exception {
- visitType(parameter.getType());
- }
-
- private void visitType(AbstractType type) throws Exception {
- if (type != null) {
- if (type instanceof JAXBType)
- visitType((JAXBType)type);
- else if (type instanceof RpcLitStructure)
- visitType((RpcLitStructure)type);
- }
- }
-
-
- private void visitType(JAXBType type) throws Exception {
- type.accept(this);
- }
-
- private void visitType(RpcLitStructure type) throws Exception {
- type.accept(this);
- }
- private void registerClassName(String name) {
- if (name == null || name.equals("")) {
- return;
- }
- if (_allClassNames.contains(name)) {
- _conflictingClassNames.add(name);
- } else {
- _allClassNames.add(name);
- }
- }
-
- public Set<String> getSeiClassNames() {
- return _seiClassNames;
- }
-
- private Set<String> _seiClassNames;
-
- public Set<String> getJaxbGeneratedClassNames() {
- return _jaxbGeneratedClassNames;
- }
-
- private Set<String> _jaxbGeneratedClassNames;
-
-
- public Set<String> getExceptionClassNames() {
- return _exceptionClassNames;
- }
-
- private Set<String> _exceptionClassNames;
- boolean doneVisitingJAXBModel = false;
- public void visit(JAXBType type) throws Exception {
- if(!doneVisitingJAXBModel && type.getJaxbModel() != null){
- Set<String> classNames = type.getJaxbModel().getGeneratedClassNames();
- for(String className : classNames){
- addJAXBGeneratedClassName(className);
- }
- doneVisitingJAXBModel = true;
- }
- }
-
- public void visit(RpcLitStructure type) throws Exception {
- if(!doneVisitingJAXBModel){
- Set<String> classNames = type.getJaxbModel().getGeneratedClassNames();
- for(String className : classNames){
- addJAXBGeneratedClassName(className);
- }
- doneVisitingJAXBModel = true;
- }
- }
-
-
- private void addJAXBGeneratedClassName(String name) {
- _jaxbGeneratedClassNames.add(name);
- registerClassName(name);
- }
-
- private Set _allClassNames;
- private Set _exceptions;
- private Set _wsdlBindingNames;
- private Set _conflictingClassNames;
- private Set<QName> _portTypeNames;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/DirectoryUtil.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/DirectoryUtil.java
deleted file mode 100644
index 7efdbe4f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/DirectoryUtil.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.util;
-
-import com.sun.tools.internal.ws.processor.generator.GeneratorException;
-import com.sun.tools.internal.ws.util.ClassNameInfo;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Util provides static utility methods used by other wscompile classes.
- *
- * @author WS Development Team
- */
-public class DirectoryUtil {
-
- public static File getOutputDirectoryFor(String theClass, File rootDir) throws GeneratorException {
-
- File outputDir = null;
- String qualifiedClassName = theClass;
- String packagePath = null;
- String packageName = ClassNameInfo.getQualifier(qualifiedClassName);
- if (packageName != null && packageName.length() > 0) {
- packagePath = packageName.replace('.', File.separatorChar);
- }
-
- // Do we have a root directory?
- if (rootDir != null) {
-
- // Yes, do we have a package name?
- if (packagePath != null) {
-
- // Yes, so use it as the root. Open the directory...
- outputDir = new File(rootDir, packagePath);
-
- // Make sure the directory exists...
- ensureDirectory(outputDir);
- } else {
-
- // Default package, so use root as output dir...
- outputDir = rootDir;
- }
- } else {
-
- // No root directory. Get the current working directory...
- String workingDirPath = System.getProperty("user.dir");
- File workingDir = new File(workingDirPath);
-
- // Do we have a package name?
- if (packagePath == null) {
-
- // No, so use working directory...
- outputDir = workingDir;
- } else {
-
- // Yes, so use working directory as the root...
- outputDir = new File(workingDir, packagePath);
-
- // Make sure the directory exists...
- ensureDirectory(outputDir);
- }
- }
-
- // Finally, return the directory...
- return outputDir;
- }
-
- public static String getRelativePathfromCommonBase(File file, File base) throws IOException {
- String basePath = base.getCanonicalPath();
- String filePath = file.getCanonicalPath();
- return filePath.substring(basePath.length());
-
- }
-
- private static void ensureDirectory(File dir) throws GeneratorException {
- if (!dir.exists()) {
- boolean created = dir.mkdirs();
- if (!created || !dir.exists()) {
- throw new GeneratorException("generator.cannot.create.dir",
- dir.getAbsolutePath());
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/IndentingWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/IndentingWriter.java
deleted file mode 100644
index 373c7a13..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/IndentingWriter.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.processor.util;
-
-import com.sun.tools.internal.ws.processor.generator.GeneratorException;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.Writer;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
-import java.text.MessageFormat;
-
-/**
- *
- * @author WS Development Team
- */
-public class IndentingWriter extends BufferedWriter {
-
- private boolean beginningOfLine = true;
- private int currentIndent = 0;
- private int indentStep = 4;
-
- public IndentingWriter(Writer out) {
- super(out);
- }
-
- public IndentingWriter(Writer out,int step) {
- this(out);
-
- if (indentStep < 0) {
- throw new IllegalArgumentException("negative indent step");
- }
- indentStep = step;
- }
-
- public void write(int c) throws IOException {
- checkWrite();
- super.write(c);
- }
-
- public void write(char[] cbuf, int off, int len) throws IOException {
- if (len > 0) {
- checkWrite();
- }
- super.write(cbuf, off, len);
- }
-
- public void write(String s, int off, int len) throws IOException {
- if (len > 0) {
- checkWrite();
- }
- super.write(s, off, len);
- }
-
- public void newLine() throws IOException {
- super.newLine();
- beginningOfLine = true;
- }
-
- protected void checkWrite() throws IOException {
- if (beginningOfLine) {
- beginningOfLine = false;
- int i = currentIndent;
- while (i > 0) {
- super.write(' ');
- -- i;
- }
- }
- }
-
- protected void indentIn() {
- currentIndent += indentStep;
- }
-
- protected void indentOut() {
- currentIndent -= indentStep;
- if (currentIndent < 0) {
- currentIndent = 0;
- }
- }
-
- public void pI() {
- indentIn();
- }
-
- public void pO() {
- indentOut();
- }
-
- public void pI(int levels) {
- for (int i = 0; i < levels; ++i) {
- indentIn();
- }
- }
-
- public void pO(int levels) {
- for (int i = 0; i < levels; ++i) {
- indentOut();
- }
- }
-
- public void p(String s) throws IOException {
- /*
- int tabCount = 0;
- for (int i = 0; i < s.length(); ++i) {
- if (s.charAt(i) == '\t') {
- ++tabCount;
- indentIn();
- }
- }
-
- String printStr = s.substring(tabCount);
- */
- boolean canEncode = true;
-
- //bug fix: 4839636
- try{
- if(!canEncode(s)) {
- canEncode = false;
- }
- } catch (Throwable t) {
-
- // there was some exception, what should we do?
- // lets ignore it for now and proceed with the code generation!
- }
-
- if(!canEncode) {
- throw new GeneratorException(
- "generator.indentingwriter.charset.cantencode", s);
- }
- write(s);
-/*
- while (tabCount-- > 0) {
- indentOut();
- }
- */
- }
-
- /**
- * Check if encode can handle the chars in this string.
- *
- */
- protected boolean canEncode(String s) {
- final CharsetEncoder encoder =
- Charset.forName(System.getProperty("file.encoding")).newEncoder();
- char[] chars = s.toCharArray();
- for (int i=0; i<chars.length; i++) {
- if(!encoder.canEncode(chars[i])) {
- return false;
- }
- }
- return true;
- }
-
- public void p(String s1, String s2) throws IOException {
- p(s1);
- p(s2);
- }
-
- public void p(String s1, String s2, String s3) throws IOException {
- p(s1);
- p(s2);
- p(s3);
- }
-
- public void p(String s1, String s2, String s3, String s4) throws IOException {
- p(s1);
- p(s2);
- p(s3);
- p(s4);
- }
-
- public void p(String s1, String s2, String s3, String s4, String s5) throws IOException {
- p(s1);
- p(s2);
- p(s3);
- p(s4);
- p(s5);
- }
-
- public void pln() throws IOException {
- newLine();
- }
-
- public void pln(String s) throws IOException {
- p(s);
- pln();
- }
-
- public void pln(String s1, String s2) throws IOException {
- p(s1, s2);
- pln();
- }
-
- public void pln(String s1, String s2, String s3) throws IOException {
- p(s1, s2, s3);
- pln();
- }
-
- public void pln(String s1, String s2, String s3, String s4) throws IOException {
- p(s1, s2, s3, s4);
- pln();
- }
-
- public void pln(String s1, String s2, String s3, String s4, String s5) throws IOException {
- p(s1, s2, s3, s4, s5);
- pln();
- }
-
- public void plnI(String s) throws IOException {
- p(s);
- pln();
- pI();
- }
-
- public void pO(String s) throws IOException {
- pO();
- p(s);
- }
-
- public void pOln(String s) throws IOException {
- pO(s);
- pln();
- }
-
- public void pOlnI(String s) throws IOException {
- pO(s);
- pln();
- pI();
- }
-
- public void p(Object o) throws IOException {
- write(o.toString());
- }
-
- public void pln(Object o) throws IOException {
- p(o.toString());
- pln();
- }
-
- public void plnI(Object o) throws IOException {
- p(o.toString());
- pln();
- pI();
- }
-
- public void pO(Object o) throws IOException {
- pO();
- p(o.toString());
- }
-
- public void pOln(Object o) throws IOException {
- pO(o.toString());
- pln();
- }
-
- public void pOlnI(Object o) throws IOException {
- pO(o.toString());
- pln();
- pI();
- }
-
- public void pM(String s) throws IOException {
- int i = 0;
- while (i < s.length()) {
- int j = s.indexOf('\n', i);
- if (j == -1) {
- p(s.substring(i));
- break;
- } else {
- pln(s.substring(i, j));
- i = j + 1;
- }
- }
- }
-
- public void pMln(String s) throws IOException {
- pM(s);
- pln();
- }
-
- public void pMlnI(String s) throws IOException {
- pM(s);
- pln();
- pI();
- }
-
- public void pMO(String s) throws IOException {
- pO();
- pM(s);
- }
-
- public void pMOln(String s) throws IOException {
- pMO(s);
- pln();
- }
-
- public void pF(String pattern, Object[] arguments) throws IOException {
- pM(MessageFormat.format(pattern, arguments));
- }
-
- public void pFln(String pattern, Object[] arguments) throws IOException {
- pF(pattern, arguments);
- pln();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java
deleted file mode 100644
index 37ed62da..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class ConfigurationMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.configuration");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableCONFIGURATION_NOT_BINDING_FILE(Object arg0) {
- return messageFactory.getMessage("configuration.notBindingFile", arg0);
- }
-
- /**
- * Ignoring: binding file ""{0}". It is not a jaxws or a jaxb binding file.
- *
- */
- public static String CONFIGURATION_NOT_BINDING_FILE(Object arg0) {
- return localizer.localize(localizableCONFIGURATION_NOT_BINDING_FILE(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java
deleted file mode 100644
index 4395cbcb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class GeneratorMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.generator");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableGENERATOR_SERVICE_CLASS_ALREADY_EXIST(Object arg0, Object arg1) {
- return messageFactory.getMessage("generator.service.classAlreadyExist", arg0, arg1);
- }
-
- /**
- * Could not generate Service, class: {0} already exists. Rename wsdl:Service "{1}" using JAX-WS customization
- *
- */
- public static String GENERATOR_SERVICE_CLASS_ALREADY_EXIST(Object arg0, Object arg1) {
- return localizer.localize(localizableGENERATOR_SERVICE_CLASS_ALREADY_EXIST(arg0, arg1));
- }
-
- public static Localizable localizableGENERATOR_SEI_CLASS_ALREADY_EXIST(Object arg0, Object arg1) {
- return messageFactory.getMessage("generator.sei.classAlreadyExist", arg0, arg1);
- }
-
- /**
- * Could not generate SEI, class: {0} already exists. Rename wsdl:portType "{1}" using JAX-WS customization
- *
- */
- public static String GENERATOR_SEI_CLASS_ALREADY_EXIST(Object arg0, Object arg1) {
- return localizer.localize(localizableGENERATOR_SEI_CLASS_ALREADY_EXIST(arg0, arg1));
- }
-
- public static Localizable localizableGENERATOR_NESTED_GENERATOR_ERROR(Object arg0) {
- return messageFactory.getMessage("generator.nestedGeneratorError", arg0);
- }
-
- /**
- * generator error: {0}
- *
- */
- public static String GENERATOR_NESTED_GENERATOR_ERROR(Object arg0) {
- return localizer.localize(localizableGENERATOR_NESTED_GENERATOR_ERROR(arg0));
- }
-
- public static Localizable localizableGENERATOR_INTERNAL_ERROR_SHOULD_NOT_HAPPEN(Object arg0) {
- return messageFactory.getMessage("generator.internal.error.should.not.happen", arg0);
- }
-
- /**
- * internal error (should not happen): {0}
- *
- */
- public static String GENERATOR_INTERNAL_ERROR_SHOULD_NOT_HAPPEN(Object arg0) {
- return localizer.localize(localizableGENERATOR_INTERNAL_ERROR_SHOULD_NOT_HAPPEN(arg0));
- }
-
- public static Localizable localizableGENERATOR_INDENTINGWRITER_CHARSET_CANTENCODE(Object arg0) {
- return messageFactory.getMessage("generator.indentingwriter.charset.cantencode", arg0);
- }
-
- /**
- * WSDL has some characters which native java encoder can''t encode: "{0}"
- *
- */
- public static String GENERATOR_INDENTINGWRITER_CHARSET_CANTENCODE(Object arg0) {
- return localizer.localize(localizableGENERATOR_INDENTINGWRITER_CHARSET_CANTENCODE(arg0));
- }
-
- public static Localizable localizableGENERATOR_CANNOT_CREATE_DIR(Object arg0) {
- return messageFactory.getMessage("generator.cannot.create.dir", arg0);
- }
-
- /**
- * can''t create directory: {0}
- *
- */
- public static String GENERATOR_CANNOT_CREATE_DIR(Object arg0) {
- return localizer.localize(localizableGENERATOR_CANNOT_CREATE_DIR(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java
deleted file mode 100644
index 79a670f3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class JavacompilerMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.javacompiler");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableJAVACOMPILER_CLASSPATH_ERROR(Object arg0) {
- return messageFactory.getMessage("javacompiler.classpath.error", arg0);
- }
-
- /**
- * {0} is not available in the classpath, requires Sun's JDK version 5.0 or latter.
- *
- */
- public static String JAVACOMPILER_CLASSPATH_ERROR(Object arg0) {
- return localizer.localize(localizableJAVACOMPILER_CLASSPATH_ERROR(arg0));
- }
-
- public static Localizable localizableJAVACOMPILER_NOSUCHMETHOD_ERROR(Object arg0) {
- return messageFactory.getMessage("javacompiler.nosuchmethod.error", arg0);
- }
-
- /**
- * There is no such method {0} available, requires Sun's JDK version 5.0 or latter.
- *
- */
- public static String JAVACOMPILER_NOSUCHMETHOD_ERROR(Object arg0) {
- return localizer.localize(localizableJAVACOMPILER_NOSUCHMETHOD_ERROR(arg0));
- }
-
- public static Localizable localizableJAVACOMPILER_ERROR(Object arg0) {
- return messageFactory.getMessage("javacompiler.error", arg0);
- }
-
- /**
- * error : {0}.
- *
- */
- public static String JAVACOMPILER_ERROR(Object arg0) {
- return localizer.localize(localizableJAVACOMPILER_ERROR(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelMessages.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelMessages.java
deleted file mode 100644
index 83289cd0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelMessages.java
+++ /dev/null
@@ -1,480 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class ModelMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.model");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableMODEL_NESTED_MODEL_ERROR(Object arg0) {
- return messageFactory.getMessage("model.nestedModelError", arg0);
- }
-
- /**
- * model error: {0}
- *
- */
- public static String MODEL_NESTED_MODEL_ERROR(Object arg0) {
- return localizer.localize(localizableMODEL_NESTED_MODEL_ERROR(arg0));
- }
-
- public static Localizable localizableMODEL_EXCEPTION_NOTUNIQUE(Object arg0, Object arg1) {
- return messageFactory.getMessage("model.exception.notunique", arg0, arg1);
- }
-
- /**
- * Failed to generate Java signature: duplicate exception names {0}. Use JAXWS binding customization to rename the wsdl:part "{1}"
- *
- */
- public static String MODEL_EXCEPTION_NOTUNIQUE(Object arg0, Object arg1) {
- return localizer.localize(localizableMODEL_EXCEPTION_NOTUNIQUE(arg0, arg1));
- }
-
- public static Localizable localizableMODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(Object arg0) {
- return messageFactory.getMessage("model.schema.invalidWildcard.allCompositor", arg0);
- }
-
- /**
- * xsd:all compositor not supported for the wildcard in schema type: "{0}"
- *
- */
- public static String MODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(Object arg0) {
- return localizer.localize(localizableMODEL_SCHEMA_INVALID_WILDCARD_ALL_COMPOSITOR(arg0));
- }
-
- public static Localizable localizableMODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(Object arg0) {
- return messageFactory.getMessage("model.schema.simpleTypeWithFacets", arg0);
- }
-
- /**
- * facet "{0}" not supported on simple type: "{0}"
- *
- */
- public static String MODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(Object arg0) {
- return localizer.localize(localizableMODEL_SCHEMA_SIMPLE_TYPE_WITH_FACETS(arg0));
- }
-
- public static Localizable localizableMODEL_SCHEMA_UNION_NOT_SUPPORTED(Object arg0) {
- return messageFactory.getMessage("model.schema.unionNotSupported", arg0);
- }
-
- /**
- * simpleType: "{0}" derivation by xsd:union not supported
- *
- */
- public static String MODEL_SCHEMA_UNION_NOT_SUPPORTED(Object arg0) {
- return localizer.localize(localizableMODEL_SCHEMA_UNION_NOT_SUPPORTED(arg0));
- }
-
- public static Localizable localizableMODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(Object arg0) {
- return messageFactory.getMessage("model.complexType.simpleContent.reservedName", arg0);
- }
-
- /**
- * invalid attribute name: "_value" in complexType: "{0}", _value is JAXWS reserved name, this name is generated in the generated javabean class to hold content value in the generated javabean class for complexType/simpleContent.
- *
- */
- public static String MODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(Object arg0) {
- return localizer.localize(localizableMODEL_COMPLEX_TYPE_SIMPLE_CONTENT_RESERVED_NAME(arg0));
- }
-
- public static Localizable localizableMODEL_IMPORTER_INVALID_ID(Object arg0, Object arg1) {
- return messageFactory.getMessage("model.importer.invalidId", arg0, arg1);
- }
-
- /**
- * invalid id "{1} in model document (line {0})
- *
- */
- public static String MODEL_IMPORTER_INVALID_ID(Object arg0, Object arg1) {
- return localizer.localize(localizableMODEL_IMPORTER_INVALID_ID(arg0, arg1));
- }
-
- public static Localizable localizableMODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(Object arg0) {
- return messageFactory.getMessage("model.schema.jaxbException.message", arg0);
- }
-
- /**
- * "{0}"
- *
- */
- public static String MODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(Object arg0) {
- return localizer.localize(localizableMODEL_SCHEMA_JAXB_EXCEPTION_MESSAGE(arg0));
- }
-
- public static Localizable localizableMODEL_INVALID_MESSAGE_TYPE(Object arg0) {
- return messageFactory.getMessage("model.invalid.message.type", arg0);
- }
-
- /**
- * invalid message type: {0}
- *
- */
- public static String MODEL_INVALID_MESSAGE_TYPE(Object arg0) {
- return localizer.localize(localizableMODEL_INVALID_MESSAGE_TYPE(arg0));
- }
-
- public static Localizable localizableCONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION() {
- return messageFactory.getMessage("ConsoleErrorReporter.UnknownLocation");
- }
-
- /**
- * unknown location
- *
- */
- public static String CONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION() {
- return localizer.localize(localizableCONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION());
- }
-
- public static Localizable localizableMODEL_EXPORTER_UNSUPPORTED_CLASS(Object arg0) {
- return messageFactory.getMessage("model.exporter.unsupportedClass", arg0);
- }
-
- /**
- * model exporter: unsupported class: {0}
- *
- */
- public static String MODEL_EXPORTER_UNSUPPORTED_CLASS(Object arg0) {
- return localizer.localize(localizableMODEL_EXPORTER_UNSUPPORTED_CLASS(arg0));
- }
-
- public static Localizable localizableMODEL_SCHEMA_ELEMENT_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("model.schema.elementNotFound", arg0);
- }
-
- /**
- * Element "{0}" not found.
- *
- */
- public static String MODEL_SCHEMA_ELEMENT_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableMODEL_SCHEMA_ELEMENT_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableMODEL_UNIQUENESS_JAVASTRUCTURETYPE(Object arg0, Object arg1) {
- return messageFactory.getMessage("model.uniqueness.javastructuretype", arg0, arg1);
- }
-
- /**
- * uniqueness constraint violation, duplicate member "{0}" added to JavaStructureType "{1}"
- *
- */
- public static String MODEL_UNIQUENESS_JAVASTRUCTURETYPE(Object arg0, Object arg1) {
- return localizer.localize(localizableMODEL_UNIQUENESS_JAVASTRUCTURETYPE(arg0, arg1));
- }
-
- public static Localizable localizableMODEL_SAXPARSER_EXCEPTION(Object arg0, Object arg1) {
- return messageFactory.getMessage("model.saxparser.exception", arg0, arg1);
- }
-
- /**
- * {0}
- * {1}
- *
- */
- public static String MODEL_SAXPARSER_EXCEPTION(Object arg0, Object arg1) {
- return localizer.localize(localizableMODEL_SAXPARSER_EXCEPTION(arg0, arg1));
- }
-
- public static Localizable localizableMODEL_SCHEMA_UNSUPPORTED_TYPE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("model.schema.unsupportedType", arg0, arg1, arg2);
- }
-
- /**
- * unsupported type ({0}): "{1}" (namespace: {2})
- *
- */
- public static String MODEL_SCHEMA_UNSUPPORTED_TYPE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableMODEL_SCHEMA_UNSUPPORTED_TYPE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableMODEL_SCHEMA_LIST_NOT_SUPPORTED(Object arg0) {
- return messageFactory.getMessage("model.schema.listNotSupported", arg0);
- }
-
- /**
- * simpleType: "{0}" derivation by xsd:list not supported
- *
- */
- public static String MODEL_SCHEMA_LIST_NOT_SUPPORTED(Object arg0) {
- return localizer.localize(localizableMODEL_SCHEMA_LIST_NOT_SUPPORTED(arg0));
- }
-
- public static Localizable localizableMODEL_ARRAYWRAPPER_NO_PARENT() {
- return messageFactory.getMessage("model.arraywrapper.no.parent");
- }
-
- /**
- * LiteralArrayWrapper cannot have a parent type
- *
- */
- public static String MODEL_ARRAYWRAPPER_NO_PARENT() {
- return localizer.localize(localizableMODEL_ARRAYWRAPPER_NO_PARENT());
- }
-
- public static Localizable localizableMODEL_PARENT_TYPE_ALREADY_SET(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("model.parent.type.already.set", arg0, arg1, arg2);
- }
-
- /**
- * parent of type "{0}" already set to "{1}", new value = "{2}"
- *
- */
- public static String MODEL_PARENT_TYPE_ALREADY_SET(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableMODEL_PARENT_TYPE_ALREADY_SET(arg0, arg1, arg2));
- }
-
- public static Localizable localizableMODEL_ARRAYWRAPPER_NO_SUBTYPES() {
- return messageFactory.getMessage("model.arraywrapper.no.subtypes");
- }
-
- /**
- * LiteralArrayWrapper cannot have subtypes
- *
- */
- public static String MODEL_ARRAYWRAPPER_NO_SUBTYPES() {
- return localizer.localize(localizableMODEL_ARRAYWRAPPER_NO_SUBTYPES());
- }
-
- public static Localizable localizableMODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("model.importer.invalidMinorMinorOrPatchVersion", arg0, arg1, arg2);
- }
-
- /**
- * model version "{1}" newer than runtime version "{2}" (line {0}): need to upgrade to a newer runtime
- *
- */
- public static String MODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableMODEL_IMPORTER_INVALID_MINOR_MINOR_OR_PATCH_VERSION(arg0, arg1, arg2));
- }
-
- public static Localizable localizableMODEL_SCHEMA_CIRCULARITY(Object arg0) {
- return messageFactory.getMessage("model.schema.circularity", arg0);
- }
-
- /**
- * circularity detected in schema: "{0}"
- *
- */
- public static String MODEL_SCHEMA_CIRCULARITY(Object arg0) {
- return localizer.localize(localizableMODEL_SCHEMA_CIRCULARITY(arg0));
- }
-
- public static Localizable localizableMODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET() {
- return messageFactory.getMessage("model.arraywrapper.member.already.set");
- }
-
- /**
- * LiteralArrayWrapper element member already set.
- *
- */
- public static String MODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET() {
- return localizer.localize(localizableMODEL_ARRAYWRAPPER_MEMBER_ALREADY_SET());
- }
-
- public static Localizable localizableMODEL_IMPORTER_INVALID_CLASS(Object arg0, Object arg1) {
- return messageFactory.getMessage("model.importer.invalidClass", arg0, arg1);
- }
-
- /**
- * invalid class name "{1}" in model document (line {0})
- *
- */
- public static String MODEL_IMPORTER_INVALID_CLASS(Object arg0, Object arg1) {
- return localizer.localize(localizableMODEL_IMPORTER_INVALID_CLASS(arg0, arg1));
- }
-
- public static Localizable localizableMODEL_IMPORTER_INVALID_VERSION(Object arg0, Object arg1) {
- return messageFactory.getMessage("model.importer.invalidVersion", arg0, arg1);
- }
-
- /**
- * invalid version "{1}" in model document (line {0})
- *
- */
- public static String MODEL_IMPORTER_INVALID_VERSION(Object arg0, Object arg1) {
- return localizer.localize(localizableMODEL_IMPORTER_INVALID_VERSION(arg0, arg1));
- }
-
- public static Localizable localizableCONSOLE_ERROR_REPORTER_LINE_X_OF_Y(Object arg0, Object arg1) {
- return messageFactory.getMessage("ConsoleErrorReporter.LineXOfY", arg0, arg1);
- }
-
- /**
- * line {0} of {1}
- *
- */
- public static String CONSOLE_ERROR_REPORTER_LINE_X_OF_Y(Object arg0, Object arg1) {
- return localizer.localize(localizableCONSOLE_ERROR_REPORTER_LINE_X_OF_Y(arg0, arg1));
- }
-
- public static Localizable localizableMODEL_PARAMETER_NOTUNIQUE(Object arg0, Object arg1) {
- return messageFactory.getMessage("model.parameter.notunique", arg0, arg1);
- }
-
- /**
- * Failed to generate Java signature: duplicate parameter name "{0}". Try one of these
- * 1. Use JAXWS binding customization to rename the wsdl:part "{1}"
- * 2. Run wsimport with -extension switch.
- *
- */
- public static String MODEL_PARAMETER_NOTUNIQUE(Object arg0, Object arg1) {
- return localizer.localize(localizableMODEL_PARAMETER_NOTUNIQUE(arg0, arg1));
- }
-
- public static Localizable localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(Object arg0, Object arg1) {
- return messageFactory.getMessage("model.schema.invalidSimpleType.invalidItemType", arg0, arg1);
- }
-
- /**
- * in simpleType: "{0}", itemType "{1}" can not be derived by list
- *
- */
- public static String MODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(Object arg0, Object arg1) {
- return localizer.localize(localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_INVALID_ITEM_TYPE(arg0, arg1));
- }
-
- public static Localizable localizableMODEL_UNIQUENESS() {
- return messageFactory.getMessage("model.uniqueness");
- }
-
- /**
- * uniqueness constraint violation
- *
- */
- public static String MODEL_UNIQUENESS() {
- return localizer.localize(localizableMODEL_UNIQUENESS());
- }
-
- public static Localizable localizable_002F_002F_REPLACEMENT() {
- return messageFactory.getMessage("//replacement");
- }
-
- /**
- * for Uxxx codes
- *
- */
- public static String _002F_002F_REPLACEMENT() {
- return localizer.localize(localizable_002F_002F_REPLACEMENT());
- }
-
- public static Localizable localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(Object arg0, Object arg1) {
- return messageFactory.getMessage("model.schema.invalidSimpleType.noItemLiteralType", arg0, arg1);
- }
-
- /**
- * in simpleType: "{0}", xsd:list itemType "{1}" is invalid
- *
- */
- public static String MODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(Object arg0, Object arg1) {
- return localizer.localize(localizableMODEL_SCHEMA_INVALID_SIMPLE_TYPE_NO_ITEM_LITERAL_TYPE(arg0, arg1));
- }
-
- public static Localizable localizableMODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER() {
- return messageFactory.getMessage("model.arraywrapper.only.one.member");
- }
-
- /**
- * LiteralArrayWrapper may only have one element member.
- *
- */
- public static String MODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER() {
- return localizer.localize(localizableMODEL_ARRAYWRAPPER_ONLY_ONE_MEMBER());
- }
-
- public static Localizable localizableMODEL_PARAMETER_NOTUNIQUE_WRAPPER(Object arg0, Object arg1) {
- return messageFactory.getMessage("model.parameter.notunique.wrapper", arg0, arg1);
- }
-
- /**
- * Failed to generate Java signature: duplicate parameter name "{0}". Try one of these
- * 1. Use JAXWS binding customization to rename the wsdl:part "{1}"
- * 2. Run wsimport with -extension switch.
- * 3. This is wrapper style operation, to resolve parameter name conflict, you can also try disabling wrapper style by using <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle> wsdl customization.
- *
- */
- public static String MODEL_PARAMETER_NOTUNIQUE_WRAPPER(Object arg0, Object arg1) {
- return localizer.localize(localizableMODEL_PARAMETER_NOTUNIQUE_WRAPPER(arg0, arg1));
- }
-
- public static Localizable localizableMODEL_SCHEMA_NOT_IMPLEMENTED(Object arg0) {
- return messageFactory.getMessage("model.schema.notImplemented", arg0);
- }
-
- /**
- * unsupported XML Schema feature ({0})
- *
- */
- public static String MODEL_SCHEMA_NOT_IMPLEMENTED(Object arg0) {
- return localizer.localize(localizableMODEL_SCHEMA_NOT_IMPLEMENTED(arg0));
- }
-
- public static Localizable localizableMODEL_SCHEMA_INVALID_LITERAL_IN_ENUMERATION_ANONYMOUS(Object arg0) {
- return messageFactory.getMessage("model.schema.invalidLiteralInEnumeration.anonymous", arg0);
- }
-
- /**
- * invalid literal "{0}" in anonymous enumeration
- *
- */
- public static String MODEL_SCHEMA_INVALID_LITERAL_IN_ENUMERATION_ANONYMOUS(Object arg0) {
- return localizer.localize(localizableMODEL_SCHEMA_INVALID_LITERAL_IN_ENUMERATION_ANONYMOUS(arg0));
- }
-
- public static Localizable localizableMODEL_PART_NOT_UNIQUE(Object arg0, Object arg1) {
- return messageFactory.getMessage("model.part.notUnique", arg0, arg1);
- }
-
- /**
- * parts in wsdl:message "{0}", reference "{1}", they must reference unique global elements.
- *
- */
- public static String MODEL_PART_NOT_UNIQUE(Object arg0, Object arg1) {
- return localizer.localize(localizableMODEL_PART_NOT_UNIQUE(arg0, arg1));
- }
-
- public static Localizable localizableMODEL_ARRAYWRAPPER_NO_CONTENT_MEMBER() {
- return messageFactory.getMessage("model.arraywrapper.no.content.member");
- }
-
- /**
- * LiteralArrayWrapper cannot have a content member
- *
- */
- public static String MODEL_ARRAYWRAPPER_NO_CONTENT_MEMBER() {
- return localizer.localize(localizableMODEL_ARRAYWRAPPER_NO_CONTENT_MEMBER());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelerMessages.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelerMessages.java
deleted file mode 100644
index 3b915bc1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelerMessages.java
+++ /dev/null
@@ -1,1603 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class ModelerMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.modeler");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_INVALID_SCHEMA_TYPE(Object arg0, Object arg1) {
- return messageFactory.getMessage("mimemodeler.invalidMimeContent.invalidSchemaType", arg0, arg1);
- }
-
- /**
- * Ignoring the mime:part. mime part: {0} can not be mapped to schema type: {1}
- *
- */
- public static String MIMEMODELER_INVALID_MIME_CONTENT_INVALID_SCHEMA_TYPE(Object arg0, Object arg1) {
- return localizer.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_INVALID_SCHEMA_TYPE(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_PARAMETERORDER_PARAMETER(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.parameterorder.parameter", arg0, arg1);
- }
-
- /**
- * "{0}" specified in the parameterOrder attribute of operation "{1}" is not a valid part of the message.
- *
- */
- public static String WSDLMODELER_INVALID_PARAMETERORDER_PARAMETER(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_PARAMETERORDER_PARAMETER(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_NO_SOAP_FAULT_NAME(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.noSoapFaultName", arg0, arg1);
- }
-
- /**
- * soap:fault name not specified, wsdl:fault "{0}" in operation "{1}"
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_FAULT_NO_SOAP_FAULT_NAME(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_NO_SOAP_FAULT_NAME(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_IMPORT() {
- return messageFactory.getMessage("wsdlmodeler.warning.nonconforming.wsdl.import");
- }
-
- /**
- * Non conforming WS-I WSDL used for wsdl:import
- *
- */
- public static String WSDLMODELER_WARNING_NONCONFORMING_WSDL_IMPORT() {
- return localizer.localize(localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_IMPORT());
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_SOAP_BODY_MISSING_NAMESPACE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace", arg0);
- }
-
- /**
- * output message of binding operation "{0}" must specify a value for the "namespace" attribute
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_SOAP_BODY_MISSING_NAMESPACE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_SOAP_BODY_MISSING_NAMESPACE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_OPERATION_FAULT_NOT_LITERAL(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.operation.fault.notLiteral", arg0, arg1);
- }
-
- /**
- * ignoring encoded fault "{0}" in literal binding operation "{1}"
- *
- */
- public static String WSDLMODELER_INVALID_OPERATION_FAULT_NOT_LITERAL(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_FAULT_NOT_LITERAL(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_MISSING_SOAP_BODY(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody", arg0);
- }
-
- /**
- * input message of binding operation "{0}" does not have a SOAP body extension
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_OPERATION_INPUT_MISSING_SOAP_BODY(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_MISSING_SOAP_BODY(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_NON_HTTP_TRANSPORT(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport", arg0);
- }
-
- /**
- * ignoring SOAP port "{0}": unrecognized transport. try running wsimport with -extension switch.
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_SOAP_BINDING_NON_HTTP_TRANSPORT(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_NON_HTTP_TRANSPORT(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_NOT_FOUND(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.notFound", arg0, arg1);
- }
-
- /**
- * in binding "{1}", operation "{0}" does not match any operation in the corresponding port type
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_OPERATION_NOT_FOUND(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_NOT_FOUND(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_UNSUPPORTED_BINDING_MIME() {
- return messageFactory.getMessage("wsdlmodeler.unsupportedBinding.mime");
- }
-
- /**
- * WSDL MIME binding is not currently supported!
- *
- */
- public static String WSDLMODELER_UNSUPPORTED_BINDING_MIME() {
- return localizer.localize(localizableWSDLMODELER_UNSUPPORTED_BINDING_MIME());
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NO_ELEMENT_ATTRIBUTE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute", arg0, arg1, arg2);
- }
-
- /**
- * ignoring header fault part="{0}" message="{1}" of operation {2}
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NO_ELEMENT_ATTRIBUTE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NO_ELEMENT_ATTRIBUTE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle", arg0, arg1, arg2);
- }
-
- /**
- * Invalid operation "{0}", can''t generate java method. Parameter: part "{2}" in wsdl:message "{1}", is a java keyword. Use customization to change the parameter name or change the wsdl:part name.
- *
- */
- public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_HEADERFAULT_NOT_LITERAL(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.headerfault.notLiteral", arg0, arg1);
- }
-
- /**
- * Invalid headerfault "{0}" of binding operation "{1}": not literal
- *
- */
- public static String WSDLMODELER_INVALID_HEADERFAULT_NOT_LITERAL(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_HEADERFAULT_NOT_LITERAL(arg0, arg1));
- }
-
- public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_DIFFERENT_PART() {
- return messageFactory.getMessage("mimemodeler.invalidMimeContent.differentPart");
- }
-
- /**
- * Ignoring the mime:part. Invalid mime:part, the mime:content has different part attribute.
- *
- */
- public static String MIMEMODELER_INVALID_MIME_CONTENT_DIFFERENT_PART() {
- return localizer.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_DIFFERENT_PART());
- }
-
- public static Localizable localizableWSDLMODELER_ERROR_PART_NOT_FOUND(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.error.partNotFound", arg0, arg1);
- }
-
- /**
- * part "{1}" of operation "{0}" could not be resolved!
- *
- */
- public static String WSDLMODELER_ERROR_PART_NOT_FOUND(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_ERROR_PART_NOT_FOUND(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor", arg0, arg1);
- }
-
- /**
- * Invalid header "{0}" in operation {1}: part must specify a "element" attribute
- *
- */
- public static String WSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName", arg0);
- }
-
- /**
- * Invalid operation "{0}", it''s java reserved word, can''t generate java method. Use customization to change the operation name.
- *
- */
- public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_OUTPUT_MISSING_SOAP_FAULT(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.outputMissingSoapFault", arg0, arg1);
- }
-
- /**
- * fault "{0}" in operation "{1}" does not have a SOAP fault extension
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_FAULT_OUTPUT_MISSING_SOAP_FAULT(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_OUTPUT_MISSING_SOAP_FAULT(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_ELEMENT_MESSAGE_PART(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart", arg0);
- }
-
- /**
- * ignoring operation "{0}": message part does not refer to a schema type declaration
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_ELEMENT_MESSAGE_PART(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_ELEMENT_MESSAGE_PART(arg0));
- }
-
- public static Localizable localizableWSDLMODLER_WARNING_OPERATION_USE() {
- return messageFactory.getMessage("wsdlmodler.warning.operation.use");
- }
-
- /**
- * The WSDL used has operations with literal and encoded use. -f:searchschema is not supported for this scenario.
- *
- */
- public static String WSDLMODLER_WARNING_OPERATION_USE() {
- return localizer.localize(localizableWSDLMODLER_WARNING_OPERATION_USE());
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringNonSOAPPort", arg0);
- }
-
- /**
- * ignoring port "{0}": not a standard SOAP port. try running wsimport with -extension switch.
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_MESSAGE_HAS_MORE_THAN_ONE_PART(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart", arg0, arg1);
- }
-
- /**
- * fault "{0}" refers to message "{1}", but the message has more than one parts
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_FAULT_MESSAGE_HAS_MORE_THAN_ONE_PART(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_MESSAGE_HAS_MORE_THAN_ONE_PART(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_NO_SERVICE_DEFINITIONS_FOUND() {
- return messageFactory.getMessage("wsdlmodeler.warning.noServiceDefinitionsFound");
- }
-
- /**
- * WSDL document does not define any services
- *
- */
- public static String WSDLMODELER_WARNING_NO_SERVICE_DEFINITIONS_FOUND() {
- return localizer.localize(localizableWSDLMODELER_WARNING_NO_SERVICE_DEFINITIONS_FOUND());
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_FAULT_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringFault.cant.resolve.message", arg0, arg1);
- }
-
- /**
- * ignoring fault "{0}" of binding operation "{1}": cannot resolve message
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_FAULT_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULT_CANT_RESOLVE_MESSAGE(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_JAXB_JAVATYPE_NOTFOUND(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.jaxb.javatype.notfound", arg0, arg1);
- }
-
- /**
- * Schema descriptor {0} in message part "{1}" is not defined and could not be bound to Java. Perhaps the schema descriptor {0} is not defined in the schema imported/included in the WSDL. You can either add such imports/includes or run wsimport and provide the schema location using -b switch.
- *
- */
- public static String WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_JAXB_JAVATYPE_NOTFOUND(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_PORT_SOAP_BINDING_MIXED_STYLE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.port.SOAPBinding.mixedStyle", arg0);
- }
-
- /**
- * not a WS-I BP1.1 compliant SOAP port "{0}": the WSDL binding has mixed style, it must be rpc-literal or document-literal operation!
- *
- */
- public static String WSDLMODELER_WARNING_PORT_SOAP_BINDING_MIXED_STYLE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_PORT_SOAP_BINDING_MIXED_STYLE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_DOCLITOPERATION(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.invalid.doclitoperation", arg0);
- }
-
- /**
- * Invalid wsdl:operation "{0}": its a document-literal operation, message part must refer to a schema element declaration
- *
- */
- public static String WSDLMODELER_INVALID_DOCLITOPERATION(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_INVALID_DOCLITOPERATION(arg0));
- }
-
- public static Localizable localizableMODELER_NESTED_MODEL_ERROR(Object arg0) {
- return messageFactory.getMessage("modeler.nestedModelError", arg0);
- }
-
- /**
- * modeler error: {0}
- *
- */
- public static String MODELER_NESTED_MODEL_ERROR(Object arg0) {
- return localizer.localize(localizableMODELER_NESTED_MODEL_ERROR(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_DUPLICATE_FAULT_SOAP_NAME(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsdlmodeler.duplicate.fault.soap.name", arg0, arg1, arg2);
- }
-
- /**
- * ignoring fault "{0}" of operation "{1}", soap:fault name "{2}" is not unique
- *
- */
- public static String WSDLMODELER_DUPLICATE_FAULT_SOAP_NAME(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSDLMODELER_DUPLICATE_FAULT_SOAP_NAME(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_WRONG_SOAP_FAULT_NAME(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.wrongSoapFaultName", arg0, arg1, arg2);
- }
-
- /**
- * name of soap:fault "{0}" doesn''t match the name of wsdl:fault "{1}" in operation "{2}"
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_FAULT_WRONG_SOAP_FAULT_NAME(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_WRONG_SOAP_FAULT_NAME(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_LITERAL(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.notLiteral", arg0);
- }
-
- /**
- * ignoring document-style operation "{0}": parameters are not literal
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_LITERAL(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_LITERAL(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_DOCUMENT_STYLE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle", arg0);
- }
-
- /**
- * ignoring operation "{0}": cannot handle document-style operations
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_DOCUMENT_STYLE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_DOCUMENT_STYLE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_FAULT_NOT_LITERAL(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringFault.notLiteral", arg0, arg1);
- }
-
- /**
- * ignoring encoded fault "{0}" of binding operation "{1}"
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_FAULT_NOT_LITERAL(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULT_NOT_LITERAL(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_RPCLITOPERATION(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.invalid.rpclitoperation", arg0);
- }
-
- /**
- * Invalid wsdl:operation "{0}": its a rpc-literal operation, message part must refer to a schema type declaration
- *
- */
- public static String WSDLMODELER_INVALID_RPCLITOPERATION(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_INVALID_RPCLITOPERATION(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName", arg0, arg1);
- }
-
- /**
- * Invalid operation "{0}", can''t generate java method. Parameter,customized name "{1}" is a java keyword.
- *
- */
- public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_MEMBER_SUBMISSION_ADDRESSING_USED(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.memberSubmissionAddressingUsed", arg0, arg1);
- }
-
- /**
- * obsolete addressing version 08-2004:"{0}" used; version "{1}" should be used instead.
- *
- */
- public static String WSDLMODELER_WARNING_MEMBER_SUBMISSION_ADDRESSING_USED(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_MEMBER_SUBMISSION_ADDRESSING_USED(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_BINDING_OPERATION_MULTIPLE_PART_BINDING(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.bindingOperation.multiplePartBinding", arg0, arg1);
- }
-
- /**
- * Check the abstract operation "{0}" binding, part "{1}" has multiple binding. Will try to generated artifacts anyway...
- *
- */
- public static String WSDLMODELER_WARNING_BINDING_OPERATION_MULTIPLE_PART_BINDING(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_BINDING_OPERATION_MULTIPLE_PART_BINDING(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_PORT_SOAP_BINDING_12(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.port.SOAPBinding12", arg0);
- }
-
- /**
- * SOAP port "{0}": uses a non-standard SOAP 1.2 binding.
- *
- */
- public static String WSDLMODELER_WARNING_PORT_SOAP_BINDING_12(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_PORT_SOAP_BINDING_12(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_PORT_TYPE_FAULT_NOT_FOUND(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.portTypeFault.notFound", arg0, arg1);
- }
-
- /**
- * fault "{0}" in portType operation "{1}" does not match any fault in the corresponding binding operation
- *
- */
- public static String WSDLMODELER_INVALID_PORT_TYPE_FAULT_NOT_FOUND(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_PORT_TYPE_FAULT_NOT_FOUND(arg0, arg1));
- }
-
- public static Localizable localizableMIMEMODELER_INVALID_MIME_PART_NAME_NOT_ALLOWED(Object arg0) {
- return messageFactory.getMessage("mimemodeler.invalidMimePart.nameNotAllowed", arg0);
- }
-
- /**
- * name attribute on wsdl:part in Operation "{0}" is ignored. Its not allowed as per WS-I AP 1.0.
- *
- */
- public static String MIMEMODELER_INVALID_MIME_PART_NAME_NOT_ALLOWED(Object arg0) {
- return localizer.localize(localizableMIMEMODELER_INVALID_MIME_PART_NAME_NOT_ALLOWED(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_MIME_PART_NOT_FOUND(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringMimePart.notFound", arg0, arg1);
- }
-
- /**
- * ignoring mime:part, cannot find part "{0}" referenced by the mime:content in the wsdl:operation "{1}"
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_MIME_PART_NOT_FOUND(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_MIME_PART_NOT_FOUND(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.operation.MoreThanOnePartInMessage", arg0);
- }
-
- /**
- * Ignoring operation "{0}": more than one part bound to body
- *
- */
- public static String WSDLMODELER_WARNING_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle", arg0, arg1, arg2);
- }
-
- /**
- * Ignoring operation "{0}", can''t generate java method. Parameter: part "{2}" in wsdl:message "{1}", is a java keyword. Use customization to change the parameter name or change the wsdl:part name.
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_NON_WRAPPER_STYLE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_FAULT_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.fault.cant.resolve.message", arg0, arg1);
- }
-
- /**
- * fault message "{0}" in binding operation "{1}" could not be resolved
- *
- */
- public static String WSDLMODELER_INVALID_FAULT_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_FAULT_CANT_RESOLVE_MESSAGE(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_EMPTY_MESSAGE(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.emptyMessage", arg0, arg1);
- }
-
- /**
- * fault "{0}" refers to message "{1}", but the message has no parts
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_FAULT_EMPTY_MESSAGE(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_EMPTY_MESSAGE(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsdlmodeler.rpclit.unkownschematype", arg0, arg1, arg2);
- }
-
- /**
- * XML type "{0}" could not be resolved, XML to JAVA binding failed! Please check the wsdl:part "{1}" in the wsdl:message "{2}".
- *
- */
- public static String WSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_BODY_PARTS_ATTRIBUTE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute", arg0);
- }
-
- /**
- * ignoring operation "{0}": cannot handle "parts" attribute of "soap:body" element
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_BODY_PARTS_ATTRIBUTE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_BODY_PARTS_ATTRIBUTE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_NON_UNIQUE_BODY_ERROR(Object arg0, Object arg1, Object arg2, Object arg3) {
- return messageFactory.getMessage("wsdlmodeler.nonUnique.body.error", arg0, arg1, arg2, arg3);
- }
-
- /**
- * Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signature on the wire for successful dispatch. In port {0}, Operations "{1}" and "{2}" have the same request body block {3}. Try running wsimport with -extension switch, runtime will try to dispatch using SOAPAction
- *
- */
- public static String WSDLMODELER_NON_UNIQUE_BODY_ERROR(Object arg0, Object arg1, Object arg2, Object arg3) {
- return localizer.localize(localizableWSDLMODELER_NON_UNIQUE_BODY_ERROR(arg0, arg1, arg2, arg3));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_MIXED_STYLE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle", arg0);
- }
-
- /**
- * ignoring port "{0}", its not WS-I BP 1.1 compliant: the wsdl binding has mixed style, it must be rpc-literal or document-literal operation. try running wsimport with -extension switch.
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_SOAP_BINDING_MIXED_STYLE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_MIXED_STYLE(arg0));
- }
-
- public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_MISSING_TYPE_ATTRIBUTE(Object arg0) {
- return messageFactory.getMessage("mimemodeler.invalidMimeContent.missingTypeAttribute", arg0);
- }
-
- /**
- * Missing type attribute in mime:content in operation "{0}". part attribute must be present in mime:content declaration.
- *
- */
- public static String MIMEMODELER_INVALID_MIME_CONTENT_MISSING_TYPE_ATTRIBUTE(Object arg0) {
- return localizer.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_MISSING_TYPE_ATTRIBUTE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_INPUT_MESSAGE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage", arg0);
- }
-
- /**
- * ignoring operation "{0}": input message is empty
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_INPUT_MESSAGE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_INPUT_MESSAGE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_NO_PORTS_IN_SERVICE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.noPortsInService", arg0);
- }
-
- /**
- * Service "{0}" does not contain any usable ports. try running wsimport with -extension switch.
- *
- */
- public static String WSDLMODELER_WARNING_NO_PORTS_IN_SERVICE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_NO_PORTS_IN_SERVICE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_PARAMETER_ORDER_TOO_MANY_UNMENTIONED_PARTS(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts", arg0);
- }
-
- /**
- * more than one part left out in the parameterOrder attribute of operation "{0}"
- *
- */
- public static String WSDLMODELER_INVALID_PARAMETER_ORDER_TOO_MANY_UNMENTIONED_PARTS(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_INVALID_PARAMETER_ORDER_TOO_MANY_UNMENTIONED_PARTS(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_SOAP_BODY_MISSING_NAMESPACE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace", arg0);
- }
-
- /**
- * input message of binding operation "{0}" must specify a value for the "namespace" attribute
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_OPERATION_INPUT_SOAP_BODY_MISSING_NAMESPACE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_SOAP_BODY_MISSING_NAMESPACE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader", arg0, arg1);
- }
-
- /**
- * ignoring header "{0}" of binding operation "{1}"
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_HEADER(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_RESPONSEBEAN_NOTFOUND(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.responsebean.notfound", arg0);
- }
-
- /**
- * wsimport failed to generate async response bean for operation: {0}
- *
- */
- public static String WSDLMODELER_RESPONSEBEAN_NOTFOUND(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_RESPONSEBEAN_NOTFOUND(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_20_RPCENC_NOT_SUPPORTED() {
- return messageFactory.getMessage("wsdlmodeler20.rpcenc.not.supported");
- }
-
- /**
- * rpc/encoded wsdl's are not supported in JAXWS 2.0.
- *
- */
- public static String WSDLMODELER_20_RPCENC_NOT_SUPPORTED() {
- return localizer.localize(localizableWSDLMODELER_20_RPCENC_NOT_SUPPORTED());
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_PART_NOT_FOUND(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.partNotFound", arg0, arg1);
- }
-
- /**
- * ignoring operation "{0}": part "{1}" not found
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_PART_NOT_FOUND(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_PART_NOT_FOUND(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.message.partMustHaveElementDescriptor", arg0, arg1);
- }
-
- /**
- * in message "{0}", part "{1}" must specify a "element" attribute
- *
- */
- public static String WSDLMODELER_INVALID_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_ERROR_PARTS_NOT_FOUND(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.error.partsNotFound", arg0, arg1);
- }
-
- /**
- * parts "{0}" not found in the message "{1}", wrong WSDL
- *
- */
- public static String WSDLMODELER_ERROR_PARTS_NOT_FOUND(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_ERROR_PARTS_NOT_FOUND(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_FAULT_NOT_ENCODED(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringFault.notEncoded", arg0, arg1);
- }
-
- /**
- * ignoring literal fault "{0}" of binding operation "{1}"
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_FAULT_NOT_ENCODED(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULT_NOT_ENCODED(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_SUPPORTED_STYLE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.notSupportedStyle", arg0);
- }
-
- /**
- * ignoring operation "{0}": not request-response or one-way
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_SUPPORTED_STYLE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_SUPPORTED_STYLE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_PART_BINDING(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.multiplePartBinding", arg0, arg1);
- }
-
- /**
- * abstract operation "{0}" binding, part "{1}" has multiple binding.
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_PART_BINDING(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_PART_BINDING(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_MATCHING_OPERATIONS(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations", arg0, arg1);
- }
-
- /**
- * in binding "{1}", operation "{0}" does not reference a unique operation in the corresponding port type
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_MATCHING_OPERATIONS(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_MATCHING_OPERATIONS(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader.cant.resolve.message", arg0, arg1);
- }
-
- /**
- * ignoring header "{0}" of binding operation "{1}": cannot resolve message
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_HEADER_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_CANT_RESOLVE_MESSAGE(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName", arg0, arg1);
- }
-
- /**
- * Ignoring operation "{0}", can''t generate java method ,customized name "{1}" of the wsdl:operation is a java keyword.
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_LITERAL(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader.notLiteral", arg0, arg1);
- }
-
- /**
- * ignoring header "{0}" of binding operation "{1}": not literal
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_HEADER_NOT_LITERAL(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_LITERAL(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_HEADER_MISSING_NAMESPACE(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace", arg0, arg1);
- }
-
- /**
- * input header "{1}" of binding operation "{0}" must specify a value for the "namespace" attribute
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_OPERATION_INPUT_HEADER_MISSING_NAMESPACE(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_INPUT_HEADER_MISSING_NAMESPACE(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_MISSING_INPUT_NAME(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.missingInputName", arg0);
- }
-
- /**
- * binding operation "{0}" must specify a name for its input message
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_OPERATION_MISSING_INPUT_NAME(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_MISSING_INPUT_NAME(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT_NO_ADDRESS(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringNonSOAPPort.noAddress", arg0);
- }
-
- /**
- * ignoring port "{0}": no SOAP address specified. try running wsimport with -extension switch.
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT_NO_ADDRESS(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_NON_SOAP_PORT_NO_ADDRESS(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_RESULT_IS_IN_OUT_PARAMETER(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.resultIsInOutParameter", arg0);
- }
-
- /**
- * result is "inout" parameter in operation: {0}
- *
- */
- public static String WSDLMODELER_RESULT_IS_IN_OUT_PARAMETER(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_RESULT_IS_IN_OUT_PARAMETER(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_HEADER_NOT_FOUND(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.header.notFound", arg0, arg1);
- }
-
- /**
- * header "{0}" of binding operation "{1}": not found
- *
- */
- public static String WSDLMODELER_INVALID_HEADER_NOT_FOUND(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_HEADER_NOT_FOUND(arg0, arg1));
- }
-
- public static Localizable localizableMIMEMODELER_ELEMENT_PART_INVALID_ELEMENT_MIME_TYPE(Object arg0, Object arg1) {
- return messageFactory.getMessage("mimemodeler.elementPart.invalidElementMimeType", arg0, arg1);
- }
-
- /**
- * The mime:content part refers to wsdl:part "{0}", defined using element attribute. Please make sure the mime type: "{1}" is appropriate to serialize XML.
- *
- */
- public static String MIMEMODELER_ELEMENT_PART_INVALID_ELEMENT_MIME_TYPE(Object arg0, Object arg1) {
- return localizer.localize(localizableMIMEMODELER_ELEMENT_PART_INVALID_ELEMENT_MIME_TYPE(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_HEADER_NOT_LITERAL(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.header.notLiteral", arg0, arg1);
- }
-
- /**
- * Invalid header "{0}" of binding operation "{1}": not literal
- *
- */
- public static String WSDLMODELER_INVALID_HEADER_NOT_LITERAL(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_HEADER_NOT_LITERAL(arg0, arg1));
- }
-
- public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_MESAGE_PART_ELEMENT_KIND(Object arg0) {
- return messageFactory.getMessage("mimemodeler.invalidMimeContent.mesagePartElementKind", arg0);
- }
-
- /**
- * wsdl:part element referenced by mime:content part attribute: {0} must be defined using type attribute!
- *
- */
- public static String MIMEMODELER_INVALID_MIME_CONTENT_MESAGE_PART_ELEMENT_KIND(Object arg0) {
- return localizer.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_MESAGE_PART_ELEMENT_KIND(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_ENCODED(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.notEncoded", arg0);
- }
-
- /**
- * ignoring RPC-style operation "{0}": parameters are not encoded
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_ENCODED(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_ENCODED(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_TYPES() {
- return messageFactory.getMessage("wsdlmodeler.warning.nonconforming.wsdl.types");
- }
-
- /**
- * Non conforming WS-I WSDL used for wsdl:types
- *
- */
- public static String WSDLMODELER_WARNING_NONCONFORMING_WSDL_TYPES() {
- return localizer.localize(localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_TYPES());
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_INPUT_MESSAGE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage", arg0);
- }
-
- /**
- * ignoring operation "{0}": more than one part in input message
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_INPUT_MESSAGE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_INPUT_MESSAGE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_OUTPUT_MESSAGE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage", arg0);
- }
-
- /**
- * ignoring operation "{0}": output message is empty
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_OUTPUT_MESSAGE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_EMPTY_OUTPUT_MESSAGE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_R_2716_R_2726(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.r2716r2726", arg0, arg1);
- }
-
- /**
- * R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for {0}: "{1}"
- *
- */
- public static String WSDLMODELER_WARNING_R_2716_R_2726(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_R_2716_R_2726(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_IGNORING_MEMBER_SUBMISSION_ADDRESSING(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.ignoringMemberSubmissionAddressing", arg0, arg1);
- }
-
- /**
- * ignoring wsa:Action attribute since obsolete addressing version 08-2004:"{0}" used; expecting addressing version "{1}". To use version 08-2004 anyway run wsimport with -extension switch.
- *
- */
- public static String WSDLMODELER_INVALID_IGNORING_MEMBER_SUBMISSION_ADDRESSING(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_IGNORING_MEMBER_SUBMISSION_ADDRESSING(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_NO_SOAP_ADDRESS(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.noSOAPAddress", arg0);
- }
-
- /**
- * Port "{0}" is not a SOAP port, it has no soap:address
- *
- */
- public static String WSDLMODELER_WARNING_NO_SOAP_ADDRESS(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_NO_SOAP_ADDRESS(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_FAULTS(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringFaults", arg0);
- }
-
- /**
- * ignoring faults declared by operation "{0}"
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_FAULTS(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULTS(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAME(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.missingName", arg0, arg1);
- }
-
- /**
- * fault "{0}" in operation "{1}" must specify a value for the "name" attribute
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAME(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAME(arg0, arg1));
- }
-
- public static Localizable localizableMIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(Object arg0) {
- return messageFactory.getMessage("mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart", arg0);
- }
-
- /**
- * Headers not in root mime:part with soap:body, ignoring headers in operation "{0}"
- *
- */
- public static String MIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(Object arg0) {
- return localizer.localize(localizableMIMEMODELER_WARNING_IGNORINGINVALID_HEADER_PART_NOT_DECLARED_IN_ROOT_PART(arg0));
- }
-
- public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_ERROR_LOADING_JAVA_CLASS() {
- return messageFactory.getMessage("mimemodeler.invalidMimeContent.errorLoadingJavaClass");
- }
-
- /**
- * Couldn't find class "{0}" for mime type "{1}"
- *
- */
- public static String MIMEMODELER_INVALID_MIME_CONTENT_ERROR_LOADING_JAVA_CLASS() {
- return localizer.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_ERROR_LOADING_JAVA_CLASS());
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_NOT_IN_PORT_TYPE(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.notInPortType", arg0, arg1);
- }
-
- /**
- * in binding "{1}", operation "{0}" does not appear in the corresponding port type
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_OPERATION_NOT_IN_PORT_TYPE(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_NOT_IN_PORT_TYPE(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CONFLICT_STYLE_IN_WSI_MODE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode", arg0);
- }
-
- /**
- * ignoring operation "{0}": binding style and operation style are conflicting
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CONFLICT_STYLE_IN_WSI_MODE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CONFLICT_STYLE_IN_WSI_MODE(arg0));
- }
-
- public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(Object arg0) {
- return messageFactory.getMessage("mimemodeler.invalidMimeContent.missingPartAttribute", arg0);
- }
-
- /**
- * Ignoring operation "{0}", missing part attribute in mime:content. part attribute must be present in mime:content declaration.
- *
- */
- public static String MIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(Object arg0) {
- return localizer.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_MISSING_PART_ATTRIBUTE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_SEARCH_SCHEMA_UNRECOGNIZED_TYPES(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.searchSchema.unrecognizedTypes", arg0);
- }
-
- /**
- * encountered {0} unrecognized type(s)
- *
- */
- public static String WSDLMODELER_WARNING_SEARCH_SCHEMA_UNRECOGNIZED_TYPES(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_SEARCH_SCHEMA_UNRECOGNIZED_TYPES(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName", arg0, arg1);
- }
-
- /**
- * Invalid operation "{0}", can''t generate java method ,customized name "{1}" of the wsdl:operation is a java keyword.
- *
- */
- public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_HEADER_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.header.cant.resolve.message", arg0, arg1);
- }
-
- /**
- * header "{0}" of binding operation "{1}": cannot resolve message
- *
- */
- public static String WSDLMODELER_INVALID_HEADER_CANT_RESOLVE_MESSAGE(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_HEADER_CANT_RESOLVE_MESSAGE(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAMESPACE(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.missingNamespace", arg0, arg1);
- }
-
- /**
- * fault "{0}" in operation "{1}" must specify a value for the "namespace" attribute
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAMESPACE(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_MISSING_NAMESPACE(arg0, arg1));
- }
-
- public static Localizable localizableMIMEMODELER_INVALID_MIME_PART_MORE_THAN_ONE_SOAP_BODY(Object arg0) {
- return messageFactory.getMessage("mimemodeler.invalidMimePart.moreThanOneSOAPBody", arg0);
- }
-
- /**
- * Ignoring operation "{0}". The Multipart/Related structure has invalid root part: more than one soap:body parts found
- *
- */
- public static String MIMEMODELER_INVALID_MIME_PART_MORE_THAN_ONE_SOAP_BODY(Object arg0) {
- return localizer.localize(localizableMIMEMODELER_INVALID_MIME_PART_MORE_THAN_ONE_SOAP_BODY(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_INCONSISTENT_DEFINITION(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader.inconsistentDefinition", arg0, arg1);
- }
-
- /**
- * ignoring header "{0}" of operation "{1}": part not found
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_HEADER_INCONSISTENT_DEFINITION(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_INCONSISTENT_DEFINITION(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_NOT_FOUND(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.notFound", arg0, arg1);
- }
-
- /**
- * fault "{0}" in operation "{1}" does not match any fault in the corresponding port type operation
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_FAULT_NOT_FOUND(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_NOT_FOUND(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName", arg0, arg1);
- }
-
- /**
- * Ignoring operation "{0}", can''t generate java method. Parameter,customized name "{1}" is a java keyword.
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_UNRECOGNIZED_SCHEMA_EXTENSION(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension", arg0);
- }
-
- /**
- * ignoring schema element (unsupported version): {0}
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_UNRECOGNIZED_SCHEMA_EXTENSION(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_UNRECOGNIZED_SCHEMA_EXTENSION(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_FOUND(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeaderFault.notFound", arg0, arg1, arg2);
- }
-
- /**
- * ignoring header fault "{0}", cannot find part "{1}" in binding "{2}"
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_FOUND(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_FOUND(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSDLMODELER_NON_UNIQUE_BODY_WARNING(Object arg0, Object arg1, Object arg2, Object arg3) {
- return messageFactory.getMessage("wsdlmodeler.nonUnique.body.warning", arg0, arg1, arg2, arg3);
- }
-
- /**
- * Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signature on the wire for successful dispatch. In port {0}, Operations "{1}" and "{2}" have the same request body block {3}. Method dispatching may fail, runtime will try to dispatch using SOAPAction
- *
- */
- public static String WSDLMODELER_NON_UNIQUE_BODY_WARNING(Object arg0, Object arg1, Object arg2, Object arg3) {
- return localizer.localize(localizableWSDLMODELER_NON_UNIQUE_BODY_WARNING(arg0, arg1, arg2, arg3));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle", arg0, arg1, arg2);
- }
-
- /**
- * Invalid operation "{0}", can''t generate java method parameter. Local name of the wrapper child "{1}" in the global element "{2}" is a java keyword. Use customization to change the parameter name.
- *
- */
- public static String WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_UNKNOWN_SCHEMA_TYPE(Object arg0, Object arg1) {
- return messageFactory.getMessage("mimemodeler.invalidMimeContent.unknownSchemaType", arg0, arg1);
- }
-
- /**
- * Unknown schema type: {1} for mime:content part: {0}
- *
- */
- public static String MIMEMODELER_INVALID_MIME_CONTENT_UNKNOWN_SCHEMA_TYPE(Object arg0, Object arg1) {
- return localizer.localize(localizableMIMEMODELER_INVALID_MIME_CONTENT_UNKNOWN_SCHEMA_TYPE(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_R_2716(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.r2716", arg0, arg1);
- }
-
- /**
- * R2716 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit for {0}: "{1}"
- *
- */
- public static String WSDLMODELER_WARNING_R_2716(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_R_2716(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_FOUND(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader.notFound", arg0, arg1);
- }
-
- /**
- * ignoring header "{0}" of binding operation "{1}": not found
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_HEADER_NOT_FOUND(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_FOUND(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_TYPE_MESSAGE_PART(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart", arg0);
- }
-
- /**
- * ignoring operation "{0}": message part does not refer to a schema element declaration
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_TYPE_MESSAGE_PART(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_TYPE_MESSAGE_PART(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_PARAMETER_ORDER_INVALID_PARAMETER_ORDER(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.invalid.parameterOrder.invalidParameterOrder", arg0);
- }
-
- /**
- * parameterOrder attribute on operation "{0}" is invalid, ignoring parameterOrder hint
- *
- */
- public static String WSDLMODELER_INVALID_PARAMETER_ORDER_INVALID_PARAMETER_ORDER(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_INVALID_PARAMETER_ORDER_INVALID_PARAMETER_ORDER(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_MISSING_OUTPUT_NAME(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.missingOutputName", arg0);
- }
-
- /**
- * binding operation "{0}" must specify a name for its output message
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_OPERATION_MISSING_OUTPUT_NAME(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_MISSING_OUTPUT_NAME(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_OPERATION(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.invalidOperation", arg0);
- }
-
- /**
- * invalid operation: {0}
- *
- */
- public static String WSDLMODELER_INVALID_OPERATION(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_HEADER_MISSING_NAMESPACE(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace", arg0, arg1);
- }
-
- /**
- * output header "{1}" of binding operation "{0}" must specify a value for the "namespace" attribute
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_HEADER_MISSING_NAMESPACE(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_HEADER_MISSING_NAMESPACE(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_PART_FROM_BODY(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader.partFromBody", arg0);
- }
-
- /**
- * header part: "{0}" already bound by soapbind:body, illegal to bind the part twice
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_HEADER_PART_FROM_BODY(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_PART_FROM_BODY(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_OPERATION_NOT_SUPPORTED_STYLE(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.operation.notSupportedStyle", arg0, arg1);
- }
-
- /**
- * Invalid WSDL, wsdl:operation "{0}" in wsdl:portType "{1}": not request-response or one-way
- *
- */
- public static String WSDLMODELER_INVALID_OPERATION_NOT_SUPPORTED_STYLE(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_NOT_SUPPORTED_STYLE(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_NC_NAME(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.notNCName", arg0, arg1);
- }
-
- /**
- * Ignoring operation "{0}", it has illegal character ''{1}'' in its name. Its rpc-literal operation - jaxws won't be able to serialize it!
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_NC_NAME(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_NOT_NC_NAME(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_PARAMETER_DIFFERENT_TYPES(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.parameter.differentTypes", arg0, arg1);
- }
-
- /**
- * parameter "{0}" of operation "{1}" appears with different types in the input and output messages
- *
- */
- public static String WSDLMODELER_INVALID_PARAMETER_DIFFERENT_TYPES(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_PARAMETER_DIFFERENT_TYPES(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_FAULT_DOCUMENT_OPERATION(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringFault.documentOperation", arg0, arg1);
- }
-
- /**
- * ignoring fault "{0}" of document-style operation "{1}"
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_FAULT_DOCUMENT_OPERATION(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_FAULT_DOCUMENT_OPERATION(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_USE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.nonconforming.wsdl.use", arg0);
- }
-
- /**
- * Processing WS-I non conforming operation "{0}" with RPC-Style and SOAP-encoded
- *
- */
- public static String WSDLMODELER_WARNING_NONCONFORMING_WSDL_USE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_NONCONFORMING_WSDL_USE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_NON_SOAP_PORT(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.nonSOAPPort", arg0);
- }
-
- /**
- * port "{0}": not a standard SOAP port. The generated artifacts may not work with JAX-WS runtime.
- *
- */
- public static String WSDLMODELER_WARNING_NON_SOAP_PORT(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_NON_SOAP_PORT(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_HEADERFAULT_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor", arg0, arg1, arg2);
- }
-
- /**
- * Invalid headerfault "{0}" for header {1} in operation {2}: part must specify an "element" attribute
- *
- */
- public static String WSDLMODELER_INVALID_HEADERFAULT_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSDLMODELER_INVALID_HEADERFAULT_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_STATE_MODELING_OPERATION(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.invalidState.modelingOperation", arg0);
- }
-
- /**
- * invalid state while modeling operation: {0}
- *
- */
- public static String WSDLMODELER_INVALID_STATE_MODELING_OPERATION(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_INVALID_STATE_MODELING_OPERATION(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName", arg0);
- }
-
- /**
- * Ignoring operation "{0}", it''s java reserved word, can''t generate java method. Use customization to change the operation name.
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_ENCODED(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeader.notEncoded", arg0, arg1);
- }
-
- /**
- * ignoring header "{0}" of binding operation "{1}": not SOAP-encoded
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_HEADER_NOT_ENCODED(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_NOT_ENCODED(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_DUPLICATE_FAULT_PART_NAME(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsdlmodeler.duplicate.fault.part.name", arg0, arg1, arg2);
- }
-
- /**
- * ignoring fault "{0}" of operation "{1}", part name "{2}" is not unique
- *
- */
- public static String WSDLMODELER_DUPLICATE_FAULT_PART_NAME(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSDLMODELER_DUPLICATE_FAULT_PART_NAME(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.invalid.operation.MoreThanOnePartInMessage", arg0);
- }
-
- /**
- * operation "{0}": more than one part bound to body
- *
- */
- public static String WSDLMODELER_INVALID_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_12(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringSOAPBinding12", arg0);
- }
-
- /**
- * Ignoring SOAP port "{0}": it uses non-standard SOAP 1.2 binding.
- * You must specify the "-extension" option to use this binding.
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_SOAP_BINDING_12(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_SOAP_BINDING_12(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_FAULT_NOT_UNIQUE(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingFault.notUnique", arg0, arg1);
- }
-
- /**
- * fault "{0}" in operation "{1}" matches more than one fault in the corresponding port type operation
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_FAULT_NOT_UNIQUE(Object arg0, Object arg1) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_FAULT_NOT_UNIQUE(arg0, arg1));
- }
-
- public static Localizable localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_MISSING_SOAP_BODY(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody", arg0);
- }
-
- /**
- * output message of binding operation "{0}" does not have a SOAP body extension
- *
- */
- public static String WSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_MISSING_SOAP_BODY(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_INVALID_BINDING_OPERATION_OUTPUT_MISSING_SOAP_BODY(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_LITERAL(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringHeaderFault.notLiteral", arg0, arg1, arg2);
- }
-
- /**
- * ignoring header fault part="{0}" message="{1}" of operation {2}, use attribute must be "literal"
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_LITERAL(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_HEADER_FAULT_NOT_LITERAL(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_OUTPUT_MESSAGE(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage", arg0);
- }
-
- /**
- * ignoring operation "{0}": more than one part in output message
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_OUTPUT_MESSAGE(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_MORE_THAN_ONE_PART_IN_OUTPUT_MESSAGE(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_NO_OPERATIONS_IN_PORT(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.warning.noOperationsInPort", arg0);
- }
-
- /**
- * Port "{0}" does not contain any usable operations
- *
- */
- public static String WSDLMODELER_WARNING_NO_OPERATIONS_IN_PORT(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_WARNING_NO_OPERATIONS_IN_PORT(arg0));
- }
-
- public static Localizable localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle", arg0, arg1, arg2);
- }
-
- /**
- * Ignoring operation "{0}", can''t generate java method parameter. Local name of the wrapper child "{1}" in the global element "{2}" is a java keyword. Use customization to change the parameter name.
- *
- */
- public static String WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSDLMODELER_UNSOLVABLE_NAMING_CONFLICTS(Object arg0) {
- return messageFactory.getMessage("wsdlmodeler.unsolvableNamingConflicts", arg0);
- }
-
- /**
- * the following naming conflicts occurred: {0}
- *
- */
- public static String WSDLMODELER_UNSOLVABLE_NAMING_CONFLICTS(Object arg0) {
- return localizer.localize(localizableWSDLMODELER_UNSOLVABLE_NAMING_CONFLICTS(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java
deleted file mode 100644
index a85e4079..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.resources;
-
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class ProcessorMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.processor");
- private final static Localizer localizer = new Localizer();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/UtilMessages.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/UtilMessages.java
deleted file mode 100644
index 58094b96..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/UtilMessages.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class UtilMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.util");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableSAX_2_DOM_NOTSUPPORTED_CREATEELEMENT(Object arg0) {
- return messageFactory.getMessage("sax2dom.notsupported.createelement", arg0);
- }
-
- /**
- * SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0}
- *
- */
- public static String SAX_2_DOM_NOTSUPPORTED_CREATEELEMENT(Object arg0) {
- return localizer.localize(localizableSAX_2_DOM_NOTSUPPORTED_CREATEELEMENT(arg0));
- }
-
- public static Localizable localizableNULL_NAMESPACE_FOUND(Object arg0) {
- return messageFactory.getMessage("null.namespace.found", arg0);
- }
-
- /**
- * Encountered error in wsdl. Check namespace of element <{0}>
- *
- */
- public static String NULL_NAMESPACE_FOUND(Object arg0) {
- return localizer.localize(localizableNULL_NAMESPACE_FOUND(arg0));
- }
-
- public static Localizable localizableHOLDER_VALUEFIELD_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("holder.valuefield.not.found", arg0);
- }
-
- /**
- * Could not find the field in the Holder that contains the Holder''s value: {0}
- *
- */
- public static String HOLDER_VALUEFIELD_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableHOLDER_VALUEFIELD_NOT_FOUND(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java
deleted file mode 100644
index d0530e95..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java
+++ /dev/null
@@ -1,918 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class WebserviceapMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.webserviceap");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.endpointinterfaces.do.not.match", arg0, arg1);
- }
-
- /**
- * The endpoint interface {0} does not match the interface {1}.
- *
- */
- public static String WEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("webserviceap.invalid.webmethod.element.with.exclude", arg0, arg1, arg2);
- }
-
- /**
- * The @javax.jws.WebMethod.{0} element cannot be specified with the @javax.jws.WebMethod.exclude element. Class: {1} method: {2}
- *
- */
- public static String WEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWEBSERVICEAP_INVALID_WEBMETHOD_ELEMENT_WITH_EXCLUDE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.sei.cannot.contain.constant.values", arg0, arg1);
- }
-
- /**
- * A service endpoint interface cannot contain constant declaration: Interface: {0} field: {1}.
- *
- */
- public static String WEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_SEI_CANNOT_CONTAIN_CONSTANT_VALUES(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_INVALID_SOAPBINDING_PARAMETERSTYLE(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.invalid.soapbinding.parameterstyle", arg0, arg1);
- }
-
- /**
- * Incorrect usage of Annotation {0} on {1}, ParameterStyle can only be WRAPPED with RPC Style Web service.
- *
- */
- public static String WEBSERVICEAP_INVALID_SOAPBINDING_PARAMETERSTYLE(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_INVALID_SOAPBINDING_PARAMETERSTYLE(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("webserviceap.rpc.literal.parameters.must.have.webparam", arg0, arg1, arg2);
- }
-
- /**
- * All RPC literal parameters must have a WebParam annotation. Class: {0} method: {1} parameter {2}
- *
- */
- public static String WEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWEBSERVICEAP_RPC_LITERAL_PARAMETERS_MUST_HAVE_WEBPARAM(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.method.exception.bean.name.not.unique", arg0, arg1);
- }
-
- /**
- * Exception bean names must be unique and must not clash with other generated classes. Class: {0} exception {1}
- *
- */
- public static String WEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_METHOD_EXCEPTION_BEAN_NAME_NOT_UNIQUE(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(Object arg0) {
- return messageFactory.getMessage("webserviceap.webservice.and.webserviceprovider", arg0);
- }
-
- /**
- * Classes cannot be annotated with both @javax.jws.WebService and @javax.xml.ws.WebServiceProvider. Class: {0}
- *
- */
- public static String WEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_AND_WEBSERVICEPROVIDER(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(Object arg0) {
- return messageFactory.getMessage("webserviceap.webservice.no.default.constructor", arg0);
- }
-
- /**
- * Classes annotated with @javax.jws.WebService must have a public default constructor. Class: {0}
- *
- */
- public static String WEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_NO_DEFAULT_CONSTRUCTOR(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_DOC_BARE_NO_OUT(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.doc.bare.no.out", arg0, arg1);
- }
-
- /**
- * Document/literal bare methods with no return type or OUT/INOUT parameters must be annotated as @Oneway. Class: {0}, method: {1}
- *
- */
- public static String WEBSERVICEAP_DOC_BARE_NO_OUT(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_NO_OUT(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.failed.to.parse.handlerchain.file", arg0, arg1);
- }
-
- /**
- * Failed to parse HandlerChain file. Class: {0}, file: {1}
- *
- */
- public static String WEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_FAILED_TO_PARSE_HANDLERCHAIN_FILE(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_JAVA_TYPE_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("webserviceap.java.typeNotFound", arg0);
- }
-
- /**
- * The type: {0} was not found in the mapping
- *
- */
- public static String WEBSERVICEAP_JAVA_TYPE_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_JAVA_TYPE_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("webserviceap.oneway.operation.cannot.declare.exceptions", arg0, arg1, arg2);
- }
-
- /**
- * The method {1} of class {0} is annotated @Oneway but declares the exception {2}
- *
- */
- public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_DECLARE_EXCEPTIONS(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_STATIC_OR_FINAL(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.webservice.method.is.static.or.final", arg0, arg1);
- }
-
- /**
- * Method annotated with @javax.jws.WebMethod must not be static or final. Class: {0} Method: {1}
- *
- */
- public static String WEBSERVICEAP_WEBSERVICE_METHOD_IS_STATIC_OR_FINAL(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_STATIC_OR_FINAL(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.oneway.operation.cannot.have.return.type", arg0, arg1);
- }
-
- /**
- * The method {1} of class {0} is annotated @Oneway but has a return type.
- *
- */
- public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_RETURN_TYPE(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_WARNING(Object arg0) {
- return messageFactory.getMessage("webserviceap.warning", arg0);
- }
-
- /**
- * warning: {0}
- *
- */
- public static String WEBSERVICEAP_WARNING(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_WARNING(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.method.response.wrapper.bean.name.not.unique", arg0, arg1);
- }
-
- /**
- * Response wrapper bean names must be unique and must not clash with other generated classes. Class: {0} method {1}
- *
- */
- public static String WEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_METHOD_RESPONSE_WRAPPER_BEAN_NAME_NOT_UNIQUE(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACE_ON_INTERFACE(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.endpointinterface.on.interface", arg0, arg1);
- }
-
- /**
- * Service endpoint interface: {0} cannot have a WebService.endpointInterface annotation: {1}
- *
- */
- public static String WEBSERVICEAP_ENDPOINTINTERFACE_ON_INTERFACE(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACE_ON_INTERFACE(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_ONEWAY_AND_OUT(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.oneway.and.out", arg0, arg1);
- }
-
- /**
- * @Oneway methods cannot have out parameters. Class: {0} method {1}
- *
- */
- public static String WEBSERVICEAP_ONEWAY_AND_OUT(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_ONEWAY_AND_OUT(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("webserviceap.rpc.literal.webparams.must.specify.name", arg0, arg1, arg2);
- }
-
- /**
- * All RPC literal WebParams must specify a name. Class: {0} method {1} parameter {2}
- *
- */
- public static String WEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWEBSERVICEAP_RPC_LITERAL_WEBPARAMS_MUST_SPECIFY_NAME(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("webserviceap.invalid.sei.annotation.element.exclude", arg0, arg1, arg2);
- }
-
- /**
- * The @javax.jws.WebMethod({0}) cannot be used on a service endpoint interface. Class: {1} method: {2}
- *
- */
- public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT_EXCLUDE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWEBSERVICEAP_CLASS_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("webserviceap.class.not.found", arg0);
- }
-
- /**
- * Class Not Found: {0}
- *
- */
- public static String WEBSERVICEAP_CLASS_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_CLASS_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(Object arg0) {
- return messageFactory.getMessage("webserviceap.endpointinteface.plus.element", arg0);
- }
-
- /**
- * The @javax.jws.WebService.{0} element cannot be used in with @javax.jws.WebService.endpointInterface element.
- *
- */
- public static String WEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ELEMENT(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS() {
- return messageFactory.getMessage("webserviceap.cannot.combine.handlerchain.soapmessagehandlers");
- }
-
- /**
- * You cannot specify both HanlderChain and SOAPMessageHandlers annotations
- *
- */
- public static String WEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS() {
- return localizer.localize(localizableWEBSERVICEAP_CANNOT_COMBINE_HANDLERCHAIN_SOAPMESSAGEHANDLERS());
- }
-
- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(Object arg0) {
- return messageFactory.getMessage("webserviceap.webservice.class.is.innerclass.not.static", arg0);
- }
-
- /**
- * Inner classes annotated with @javax.jws.WebService must be static. Class: {0}
- *
- */
- public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_INNERCLASS_NOT_STATIC(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("webserviceap.non.in.parameters.must.be.holder", arg0, arg1, arg2);
- }
-
- /**
- * Class: {0}, method: {1}, parameter: {2} is not WebParam.Mode.IN and is not of type javax.xml.ws.Holder.
- *
- */
- public static String WEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWEBSERVICEAP_NON_IN_PARAMETERS_MUST_BE_HOLDER(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.invalid.sei.annotation.element", arg0, arg1);
- }
-
- /**
- * The @javax.jws.WebService.{0} element cannot be specified on a service endpoint interface. Class: {1}
- *
- */
- public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION_ELEMENT(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_SUCCEEDED() {
- return messageFactory.getMessage("webserviceap.succeeded");
- }
-
- /**
- * Success
- *
- */
- public static String WEBSERVICEAP_SUCCEEDED() {
- return localizer.localize(localizableWEBSERVICEAP_SUCCEEDED());
- }
-
- public static Localizable localizableWEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.doc.bare.and.no.one.in", arg0, arg1);
- }
-
- /**
- * Document literal bare methods must have one non-header, IN/INOUT parameter. Class: {0} Method: {1}
- *
- */
- public static String WEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_AND_NO_ONE_IN(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.webservice.method.is.abstract", arg0, arg1);
- }
-
- /**
- * Classes annotated with @javax.jws.WebService must not have abstract methods. Class: {0} Method: {1}
- *
- */
- public static String WEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_METHOD_IS_ABSTRACT(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(Object arg0, Object arg1, Object arg2, Object arg3) {
- return messageFactory.getMessage("webserviceap.document.literal.bare.method.return.not.unique", arg0, arg1, arg2, arg3);
- }
-
- /**
- * Document literal bare methods must have a unique result name return type combination. Class {0} method: {1}, result name: {2} return type: {3}
- *
- */
- public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(Object arg0, Object arg1, Object arg2, Object arg3) {
- return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_RETURN_NOT_UNIQUE(arg0, arg1, arg2, arg3));
- }
-
- public static Localizable localizableWEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND() {
- return messageFactory.getMessage("webserviceap.no.webservice.endpoint.found");
- }
-
- /**
- * A web service endpoint could not be found
- *
- */
- public static String WEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND() {
- return localizer.localize(localizableWEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND());
- }
-
- public static Localizable localizableWEBSERVICEAP_FILE_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("webserviceap.fileNotFound", arg0);
- }
-
- /**
- * error: file not found: {0}
- *
- */
- public static String WEBSERVICEAP_FILE_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_FILE_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(Object arg0) {
- return messageFactory.getMessage("webserviceap.invalid.handlerchain.file.nohandler-config", arg0);
- }
-
- /**
- * The handlerchain file {0} is invalid, it does not contain a handler-config element
- *
- */
- public static String WEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_INVALID_HANDLERCHAIN_FILE_NOHANDLER_CONFIG(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("webserviceap.header.parameters.must.have.webparam.name", arg0, arg1, arg2);
- }
-
- /**
- * All WebParam annotations on header parameters must specify a name. Class: {0} method {1} parameter {2}
- *
- */
- public static String WEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWEBSERVICEAP_HEADER_PARAMETERS_MUST_HAVE_WEBPARAM_NAME(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("webserviceap.method.return.type.cannot.implement.remote", arg0, arg1, arg2);
- }
-
- /**
- * Method return types cannot implement java.rmi.Remote. Class: {0} method: {1} return type: {2}
- *
- */
- public static String WEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWEBSERVICEAP_METHOD_RETURN_TYPE_CANNOT_IMPLEMENT_REMOTE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(Object arg0) {
- return messageFactory.getMessage("webserviceap.endpointinteface.plus.annotation", arg0);
- }
-
- /**
- * The @{0} annotation cannot be used in with @javax.jws.WebService.endpointInterface element.
- *
- */
- public static String WEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTEFACE_PLUS_ANNOTATION(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("webserviceap.holder.parameters.must.not.be.in.only", arg0, arg1, arg2);
- }
-
- /**
- * javax.xml.ws.Holder parameters must not be annotated with the WebParam.Mode.IN property. Class: {0} method: {1} parameter: {2}
- *
- */
- public static String WEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWEBSERVICEAP_HOLDER_PARAMETERS_MUST_NOT_BE_IN_ONLY(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONLY_ONE_IN_PARAMETER(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("webserviceap.document.literal.bare.must.have.only.one.in.parameter", arg0, arg1, arg2);
- }
-
- /**
- * Document literal bare methods must have no more than 1 non-header in parameter. Class: {0} method: {1} number of non-header parameters: {2}
- *
- */
- public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONLY_ONE_IN_PARAMETER(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONLY_ONE_IN_PARAMETER(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.doc.bare.return.and.out", arg0, arg1);
- }
-
- /**
- * Document/literal bare methods cannot have a return type and out parameters. Class: {0}, method: {1}
- *
- */
- public static String WEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_RETURN_AND_OUT(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2, Object arg3) {
- return messageFactory.getMessage("webserviceap.method.parameter.types.cannot.implement.remote", arg0, arg1, arg2, arg3);
- }
-
- /**
- * Method parameter types cannot implement java.rmi.Remote. Class: {0} method: {1} parameter: {2} type: {3}
- *
- */
- public static String WEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(Object arg0, Object arg1, Object arg2, Object arg3) {
- return localizer.localize(localizableWEBSERVICEAP_METHOD_PARAMETER_TYPES_CANNOT_IMPLEMENT_REMOTE(arg0, arg1, arg2, arg3));
- }
-
- public static Localizable localizableWEBSERVICEAP_COMPILATION_FAILED() {
- return messageFactory.getMessage("webserviceap.compilationFailed");
- }
-
- /**
- * compilation failed, errors should have been reported
- *
- */
- public static String WEBSERVICEAP_COMPILATION_FAILED() {
- return localizer.localize(localizableWEBSERVICEAP_COMPILATION_FAILED());
- }
-
- public static Localizable localizableWEBSERVICEAP_MODEL_ALREADY_EXISTS() {
- return messageFactory.getMessage("webserviceap.model.already.exists");
- }
-
- /**
- * model already exists
- *
- */
- public static String WEBSERVICEAP_MODEL_ALREADY_EXISTS() {
- return localizer.localize(localizableWEBSERVICEAP_MODEL_ALREADY_EXISTS());
- }
-
- public static Localizable localizableWEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.could.not.find.typedecl", arg0, arg1);
- }
-
- /**
- * Could not get TypeElement for: {0} in annotation processing round: {1}
- *
- */
- public static String WEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_COULD_NOT_FIND_TYPEDECL(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(Object arg0) {
- return messageFactory.getMessage("webserviceap.webservice.class.not.public", arg0);
- }
-
- /**
- * Classes annotated with @javax.jws.WebService must be public. Class: {0}
- *
- */
- public static String WEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_NOT_PUBLIC(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("webserviceap.document.literal.bare.method.not.unique", arg0, arg1, arg2);
- }
-
- /**
- * Document literal bare methods must have unique parameter names. Class: {0} method: {1} parameter name: {2}
- *
- */
- public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_METHOD_NOT_UNIQUE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.rpc.soapbinding.not.allowed.on.method", arg0, arg1);
- }
-
- /**
- * SOAPBinding.Style.RPC binding annotations are not allowed on methods. Class: {0} Method: {1}
- *
- */
- public static String WEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_RPC_SOAPBINDING_NOT_ALLOWED_ON_METHOD(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(Object arg0) {
- return messageFactory.getMessage("webserviceap.no.package.class.must.have.targetnamespace", arg0);
- }
-
- /**
- * @javax.jws.Webservice annotated classes that do not belong to a package must have the @javax.jws.Webservice.targetNamespace element. Class: {0}
- *
- */
- public static String WEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACE_HAS_NO_WEBSERVICE_ANNOTATION(Object arg0) {
- return messageFactory.getMessage("webserviceap.endpointinterface.has.no.webservice.annotation", arg0);
- }
-
- /**
- * The endpoint interface {0} must have a WebService annotation
- *
- */
- public static String WEBSERVICEAP_ENDPOINTINTERFACE_HAS_NO_WEBSERVICE_ANNOTATION(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACE_HAS_NO_WEBSERVICE_ANNOTATION(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_INFO(Object arg0) {
- return messageFactory.getMessage("webserviceap.info", arg0);
- }
-
- /**
- * info: {0}
- *
- */
- public static String WEBSERVICEAP_INFO(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_INFO(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(Object arg0) {
- return messageFactory.getMessage("webserviceap.rpc.literal.must.not.be.bare", arg0);
- }
-
- /**
- * RPC literal SOAPBindings must have parameterStyle WRAPPED. Class: {0}.
- *
- */
- public static String WEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_RPC_LITERAL_MUST_NOT_BE_BARE(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.could.not.find.handlerchain", arg0, arg1);
- }
-
- /**
- * Could not find the handlerchain {0} in the handler file {1}
- *
- */
- public static String WEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_COULD_NOT_FIND_HANDLERCHAIN(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(Object arg0) {
- return messageFactory.getMessage("webserviceap.rpc.encoded.not.supported", arg0);
- }
-
- /**
- * The class {0} has a rpc/encoded SOAPBinding. Rpc/encoded SOAPBindings are not supported in JAXWS 2.0.
- *
- */
- public static String WEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_RPC_ENCODED_NOT_SUPPORTED(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_ERROR(Object arg0) {
- return messageFactory.getMessage("webserviceap.error", arg0);
- }
-
- /**
- * error: {0}
- *
- */
- public static String WEBSERVICEAP_ERROR(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_ERROR(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("webserviceap.endpointinterface.class.not.found", arg0);
- }
-
- /**
- * The endpointInterface class {0} could not be found
- *
- */
- public static String WEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_ENDPOINTINTERFACE_CLASS_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_METHOD_NOT_IMPLEMENTED(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("webserviceap.method.not.implemented", arg0, arg1, arg2);
- }
-
- /**
- * Methods in an endpointInterface must be implemented in the implementation class. Interface Class:{0} Implementation Class:{1} Method: {2}
- *
- */
- public static String WEBSERVICEAP_METHOD_NOT_IMPLEMENTED(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWEBSERVICEAP_METHOD_NOT_IMPLEMENTED(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWEBSERVICEAP_PARSING_JAVAC_OPTIONS_ERROR() {
- return messageFactory.getMessage("webserviceap.parsing.javac.options.error");
- }
-
- /**
- * Can't get javac options from processingEnv.
- *
- */
- public static String WEBSERVICEAP_PARSING_JAVAC_OPTIONS_ERROR() {
- return localizer.localize(localizableWEBSERVICEAP_PARSING_JAVAC_OPTIONS_ERROR());
- }
-
- public static Localizable localizableWEBSERVICE_ENCODED_NOT_SUPPORTED(Object arg0, Object arg1) {
- return messageFactory.getMessage("webservice.encoded.not.supported", arg0, arg1);
- }
-
- /**
- * The {0} class has invalid SOAPBinding annotation. {1}/encoded SOAPBinding is not supported
- *
- */
- public static String WEBSERVICE_ENCODED_NOT_SUPPORTED(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICE_ENCODED_NOT_SUPPORTED(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(Object arg0) {
- return messageFactory.getMessage("webserviceap.handlerclass.notspecified", arg0);
- }
-
- /**
- * A handler in the HandlerChain file: {0} does not specify a handler-class
- *
- */
- public static String WEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_HANDLERCLASS_NOTSPECIFIED(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.failed.to.find.handlerchain.file", arg0, arg1);
- }
-
- /**
- * Cannot find HandlerChain file. class: {0}, file: {1}
- *
- */
- public static String WEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_FAILED_TO_FIND_HANDLERCHAIN_FILE(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.doc.bare.no.return.and.no.out", arg0, arg1);
- }
-
- /**
- * Document literal bare methods that do not have a return value must have a single OUT/INOUT parameter. Class: {0} Method: {1}
- *
- */
- public static String WEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_DOC_BARE_NO_RETURN_AND_NO_OUT(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(Object arg0) {
- return messageFactory.getMessage("webserviceap.webservice.class.is.abstract", arg0);
- }
-
- /**
- * Classes annotated with @javax.jws.WebService must not be abstract. Class: {0}
- *
- */
- public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_ABSTRACT(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_INIT_PARAM_FORMAT_ERROR() {
- return messageFactory.getMessage("webserviceap.init_param.format.error");
- }
-
- /**
- * a <init-param> element must have exactly 1 <param-name> and 1 <param-value>
- *
- */
- public static String WEBSERVICEAP_INIT_PARAM_FORMAT_ERROR() {
- return localizer.localize(localizableWEBSERVICEAP_INIT_PARAM_FORMAT_ERROR());
- }
-
- public static Localizable localizableWEBSERVICEAP_MIXED_BINDING_STYLE(Object arg0) {
- return messageFactory.getMessage("webserviceap.mixed.binding.style", arg0);
- }
-
- /**
- * Class: {0} contains mixed bindings. SOAPBinding.Style.RPC and SOAPBinding.Style.DOCUMENT cannot be mixed.
- *
- */
- public static String WEBSERVICEAP_MIXED_BINDING_STYLE(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_MIXED_BINDING_STYLE(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_METHOD_NOT_ANNOTATED(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.method.not.annotated", arg0, arg1);
- }
-
- /**
- * The method {0} on class {1} is not annotated.
- *
- */
- public static String WEBSERVICEAP_METHOD_NOT_ANNOTATED(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_METHOD_NOT_ANNOTATED(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.oneway.operation.cannot.have.holders", arg0, arg1);
- }
-
- /**
- * The method {1} of class {0} is annotated @Oneway but contains INOUT or OUT parameters (javax.xml.ws.Holder)
- *
- */
- public static String WEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_ONEWAY_OPERATION_CANNOT_HAVE_HOLDERS(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.document.literal.bare.cannot.have.more.than.one.out", arg0, arg1);
- }
-
- /**
- * Document literal bare methods must have a return value or one out parameter. Class: {0} Method: {1}
- *
- */
- public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_CANNOT_HAVE_MORE_THAN_ONE_OUT(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.invalid.sei.annotation", arg0, arg1);
- }
-
- /**
- * The @{0} annotation cannot be used on a service endpoint interface. Class: {1}
- *
- */
- public static String WEBSERVICEAP_INVALID_SEI_ANNOTATION(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_INVALID_SEI_ANNOTATION(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("webserviceap.operation.name.not.unique", arg0, arg1, arg2);
- }
-
- /**
- * Operation names must be unique. Class: {0} method: {1} operation name: {2}
- *
- */
- public static String WEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWEBSERVICEAP_OPERATION_NAME_NOT_UNIQUE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(Object arg0) {
- return messageFactory.getMessage("webserviceap.webservice.class.is.final", arg0);
- }
-
- /**
- * Classes annotated with @javax.jws.WebService must not be final. Class: {0}
- *
- */
- public static String WEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(Object arg0) {
- return localizer.localize(localizableWEBSERVICEAP_WEBSERVICE_CLASS_IS_FINAL(arg0));
- }
-
- public static Localizable localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.document.literal.bare.must.have.one.in.or.out", arg0, arg1);
- }
-
- /**
- * Document literal bare methods must have at least one of: a return, an in parameter or an out parameter. Class: {0} Method: {1}
- *
- */
- public static String WEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_LITERAL_BARE_MUST_HAVE_ONE_IN_OR_OUT(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.method.request.wrapper.bean.name.not.unique", arg0, arg1);
- }
-
- /**
- * Request wrapper bean names must be unique and must not clash with other generated classes. Class: {0} method {1}
- *
- */
- public static String WEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_METHOD_REQUEST_WRAPPER_BEAN_NAME_NOT_UNIQUE(arg0, arg1));
- }
-
- public static Localizable localizableWEBSERVICEAP_DOCUMENT_BARE_HOLDER_PARAMETERS_MUST_NOT_BE_INOUT(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("webserviceap.document.bare.holder.parameters.must.not.be.inout", arg0, arg1, arg2);
- }
-
- /**
- * javax.xml.ws.Holder parameters in document bare operations must be WebParam.Mode.INOUT; Class: {0} method: {1} parameter: {2}
- *
- */
- public static String WEBSERVICEAP_DOCUMENT_BARE_HOLDER_PARAMETERS_MUST_NOT_BE_INOUT(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWEBSERVICEAP_DOCUMENT_BARE_HOLDER_PARAMETERS_MUST_NOT_BE_INOUT(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(Object arg0, Object arg1) {
- return messageFactory.getMessage("webserviceap.oneway.and.not.one.in", arg0, arg1);
- }
-
- /**
- * Document literal bare methods annotated with @javax.jws.Oneway must have one non-header IN parameter. Class: {0} Method: {1}
- *
- */
- public static String WEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(Object arg0, Object arg1) {
- return localizer.localize(localizableWEBSERVICEAP_ONEWAY_AND_NOT_ONE_IN(arg0, arg1));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WscompileMessages.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WscompileMessages.java
deleted file mode 100644
index 6e3aeb07..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WscompileMessages.java
+++ /dev/null
@@ -1,993 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class WscompileMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.wscompile");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableWSIMPORT_ARCHIVING_ARTIFACTS(Object arg0) {
- return messageFactory.getMessage("wsimport.archivingArtifacts", arg0);
- }
-
- /**
- *
- * Archiving the generated artifacts into {0}.
- *
- *
- */
- public static String WSIMPORT_ARCHIVING_ARTIFACTS(Object arg0) {
- return localizer.localize(localizableWSIMPORT_ARCHIVING_ARTIFACTS(arg0));
- }
-
- public static Localizable localizableWSGEN_CLASS_MUST_BE_IMPLEMENTATION_CLASS(Object arg0) {
- return messageFactory.getMessage("wsgen.class.must.be.implementation.class", arg0);
- }
-
- /**
- * The class "{0}" is not an endpoint implementation class.
- *
- */
- public static String WSGEN_CLASS_MUST_BE_IMPLEMENTATION_CLASS(Object arg0) {
- return localizer.localize(localizableWSGEN_CLASS_MUST_BE_IMPLEMENTATION_CLASS(arg0));
- }
-
- public static Localizable localizableWSGEN_FULLVERSION(Object arg0) {
- return messageFactory.getMessage("wsgen.fullversion", arg0);
- }
-
- /**
- * wsgen full version "{0}"
- *
- */
- public static String WSGEN_FULLVERSION(Object arg0) {
- return localizer.localize(localizableWSGEN_FULLVERSION(arg0));
- }
-
- public static Localizable localizableWRAPPER_TASK_LOADING_INCORRECT_API(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wrapperTask.loadingIncorrectApi", arg0, arg1, arg2);
- }
-
- /**
- * You are loading JAX-WS {0} API from {1} but this tool requires JAX-WS {2} API.
- *
- */
- public static String WRAPPER_TASK_LOADING_INCORRECT_API(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWRAPPER_TASK_LOADING_INCORRECT_API(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSIMPORT_WSDLLOCATION_CLIENTJAR() {
- return messageFactory.getMessage("wsimport.wsdllocation.clientjar");
- }
-
- /**
- * wsdlLocation cannot be specified when using clientJar option
- *
- */
- public static String WSIMPORT_WSDLLOCATION_CLIENTJAR() {
- return localizer.localize(localizableWSIMPORT_WSDLLOCATION_CLIENTJAR());
- }
-
- public static Localizable localizableWSIMPORT_VERSION(Object arg0) {
- return messageFactory.getMessage("wsimport.version", arg0);
- }
-
- /**
- * wsimport version "{0}"
- *
- */
- public static String WSIMPORT_VERSION(Object arg0) {
- return localizer.localize(localizableWSIMPORT_VERSION(arg0));
- }
-
- public static Localizable localizableWSGEN_CLASS_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("wsgen.class.not.found", arg0);
- }
-
- /**
- * Class not found: "{0}"
- *
- */
- public static String WSGEN_CLASS_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableWSGEN_CLASS_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableWSIMPORT_HTTP_REDIRECT(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsimport.httpRedirect", arg0, arg1);
- }
-
- /**
- * Server returned HTTP Status code: "{0}", retrying with "{1}"
- *
- */
- public static String WSIMPORT_HTTP_REDIRECT(Object arg0, Object arg1) {
- return localizer.localize(localizableWSIMPORT_HTTP_REDIRECT(arg0, arg1));
- }
-
- public static Localizable localizableWSIMPORT_AUTH_INFO_NEEDED(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsimport.authInfoNeeded", arg0, arg1, arg2);
- }
-
- /**
- * {0}, "{1}" needs authorization, please provide authorization file with read access at {2} or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//<url-path>
- *
- */
- public static String WSIMPORT_AUTH_INFO_NEEDED(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSIMPORT_AUTH_INFO_NEEDED(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSGEN_USAGE_EXAMPLES() {
- return messageFactory.getMessage("wsgen.usage.examples");
- }
-
- /**
- *
- * Examples:
- * wsgen -cp . example.Stock
- * wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'
- *
- *
- */
- public static String WSGEN_USAGE_EXAMPLES() {
- return localizer.localize(localizableWSGEN_USAGE_EXAMPLES());
- }
-
- public static Localizable localizableWSIMPORT_FETCHING_METADATA() {
- return messageFactory.getMessage("wsimport.fetchingMetadata");
- }
-
- /**
- *
- * Downloading the WSDL and associated metadata
- *
- *
- */
- public static String WSIMPORT_FETCHING_METADATA() {
- return localizer.localize(localizableWSIMPORT_FETCHING_METADATA());
- }
-
- public static Localizable localizableWSGEN_INVALID_PROTOCOL(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsgen.invalid.protocol", arg0, arg1);
- }
-
- /**
- * "{0}" is not a supported protocol. Supported protocols include: {1}.
- *
- */
- public static String WSGEN_INVALID_PROTOCOL(Object arg0, Object arg1) {
- return localizer.localize(localizableWSGEN_INVALID_PROTOCOL(arg0, arg1));
- }
-
- public static Localizable localizableWSIMPORT_USAGE_EXAMPLES() {
- return messageFactory.getMessage("wsimport.usage.examples");
- }
-
- /**
- *
- * Examples:
- * wsimport stock.wsdl -b stock.xml -b stock.xjb
- * wsimport -d generated http://example.org/stock?wsdl
- *
- *
- */
- public static String WSIMPORT_USAGE_EXAMPLES() {
- return localizer.localize(localizableWSIMPORT_USAGE_EXAMPLES());
- }
-
- public static Localizable localizableINVOKER_NEED_ENDORSED(Object arg0, Object arg1) {
- return messageFactory.getMessage("invoker.needEndorsed", arg0, arg1);
- }
-
- /**
- * You are running on JDK6 which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} API. Use the endorsed standards override mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), or use -Xendorsed option.
- *
- */
- public static String INVOKER_NEED_ENDORSED(Object arg0, Object arg1) {
- return localizer.localize(localizableINVOKER_NEED_ENDORSED(arg0, arg1));
- }
-
- public static Localizable localizableWSIMPORT_MISSING_FILE() {
- return messageFactory.getMessage("wsimport.missingFile");
- }
-
- /**
- * Missing WSDL_URI
- *
- */
- public static String WSIMPORT_MISSING_FILE() {
- return localizer.localize(localizableWSIMPORT_MISSING_FILE());
- }
-
- public static Localizable localizableWSIMPORT_USAGE_EXTENSIONS() {
- return messageFactory.getMessage("wsimport.usage.extensions");
- }
-
- /**
- *
- * Extensions:
- * -XadditionalHeaders map headers not bound to request or response message to
- * Java method parameters
- * -Xauthfile file to carry authorization information in the format
- * http://username:password@example.org/stock?wsdl
- * -Xdebug print debug information
- * -Xno-addressing-databinding enable binding of W3C EndpointReferenceType to Java
- * -Xnocompile do not compile generated Java files
- * -XdisableAuthenticator disable Authenticator used by JAX-WS RI,
- * -Xauthfile option will be ignored if set
- * -XdisableSSLHostnameVerification disable the SSL Hostname verification while fetching
- * wsdls
- *
- */
- public static String WSIMPORT_USAGE_EXTENSIONS() {
- return localizer.localize(localizableWSIMPORT_USAGE_EXTENSIONS());
- }
-
- public static Localizable localizableWSIMPORT_USAGE(Object arg0) {
- return messageFactory.getMessage("wsimport.usage", arg0);
- }
-
- /**
- * Usage: {0} [options] <WSDL_URI>
- *
- * Use "wsimport -help" for a detailed description of options.
- *
- */
- public static String WSIMPORT_USAGE(Object arg0) {
- 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");
- }
-
- /**
- * specify "-extension" and "-wsdl:protocol XSoap1.2" switches. For example:
- *
- *
- *
- */
- public static String PLEASE() {
- 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");
- }
-
- /**
- * parsing WSDL...
- *
- *
- *
- */
- public static String WSIMPORT_PARSING_WSDL() {
- return localizer.localize(localizableWSIMPORT_PARSING_WSDL());
- }
-
- public static Localizable localizableWSGEN_MISSING_FILE() {
- return messageFactory.getMessage("wsgen.missingFile");
- }
-
- /**
- * Missing SEI
- *
- */
- public static String WSGEN_MISSING_FILE() {
- return localizer.localize(localizableWSGEN_MISSING_FILE());
- }
-
- public static Localizable localizableWSIMPORT_HELP(Object arg0) {
- return messageFactory.getMessage("wsimport.help", arg0);
- }
-
- /**
- *
- * Usage: {0} [options] <WSDL_URI>
- *
- * where [options] include:
- * -b <path> specify jaxws/jaxb binding files or additional schemas
- * (Each <path> must have its own -b)
- * -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
- * by the specification. Use of extensions may
- * result in applications that are not portable or
- * may not interoperate with other implementations
- * -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
- * -s <directory> specify where to place generated source files
- * -target <version> generate code as per the given JAXWS spec version
- * Defaults to 2.2, Accepted values are 2.0, 2.1 and 2.2
- * e.g. 2.0 will generate compliant code for JAXWS 2.0 spec
- * -verbose output messages about what the compiler is doing
- * -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
- * WSDL metadata required for invoking the web service.
- * -generateJWS generate stubbed JWS implementation file
- * -implDestDir <directory> specify where to generate JWS implementation file
- * -implServiceName <name> local portion of service name for generated JWS implementation
- * -implPortName <name> local portion of port name for generated JWS implementation
- *
- */
- public static String WSIMPORT_HELP(Object arg0) {
- return localizer.localize(localizableWSIMPORT_HELP(arg0));
- }
-
- public static Localizable localizableWSCOMPILE_ERROR(Object arg0) {
- return messageFactory.getMessage("wscompile.error", arg0);
- }
-
- /**
- * error: {0}
- *
- */
- public static String WSCOMPILE_ERROR(Object arg0) {
- return localizer.localize(localizableWSCOMPILE_ERROR(arg0));
- }
-
- public static Localizable localizableWSGEN_PROTOCOL_WITHOUT_EXTENSION(Object arg0) {
- return messageFactory.getMessage("wsgen.protocol.without.extension", arg0);
- }
-
- /**
- * The optional protocol "{0}" must be used in conjunction with the "-extension" option.
- *
- */
- public static String WSGEN_PROTOCOL_WITHOUT_EXTENSION(Object arg0) {
- return localizer.localize(localizableWSGEN_PROTOCOL_WITHOUT_EXTENSION(arg0));
- }
-
- public static Localizable localizableWSIMPORT_COMPILING_CODE() {
- return messageFactory.getMessage("wsimport.CompilingCode");
- }
-
- /**
- *
- * Compiling code...
- *
- *
- */
- public static String WSIMPORT_COMPILING_CODE() {
- return localizer.localize(localizableWSIMPORT_COMPILING_CODE());
- }
-
- public static Localizable localizableWSIMPORT_READING_AUTH_FILE(Object arg0) {
- return messageFactory.getMessage("wsimport.readingAuthFile", arg0);
- }
-
- /**
- * Trying to read authorization file : "{0}"...
- *
- */
- public static String WSIMPORT_READING_AUTH_FILE(Object arg0) {
- return localizer.localize(localizableWSIMPORT_READING_AUTH_FILE(arg0));
- }
-
- public static Localizable localizableWSCOMPILE_UNSUPPORTED_ENCODING(Object arg0) {
- return messageFactory.getMessage("wscompile.unsupportedEncoding", arg0);
- }
-
- /**
- * unsupported encoding: {0}
- *
- */
- public static String WSCOMPILE_UNSUPPORTED_ENCODING(Object arg0) {
- return localizer.localize(localizableWSCOMPILE_UNSUPPORTED_ENCODING(arg0));
- }
-
- public static Localizable localizableWSGEN_NO_WEBSERVICES_CLASS(Object arg0) {
- return messageFactory.getMessage("wsgen.no.webservices.class", arg0);
- }
-
- /**
- * wsgen did not find any class with @WebService annotation. Please specify @WebService annotation on {0}.
- *
- */
- public static String WSGEN_NO_WEBSERVICES_CLASS(Object arg0) {
- return localizer.localize(localizableWSGEN_NO_WEBSERVICES_CLASS(arg0));
- }
-
- public static Localizable localizableWSIMPORT_ARCHIVE_ARTIFACT(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsimport.archiveArtifact", arg0, arg1);
- }
-
- /**
- * Adding {0} to the archive {1}
- *
- */
- public static String WSIMPORT_ARCHIVE_ARTIFACT(Object arg0, Object arg1) {
- return localizer.localize(localizableWSIMPORT_ARCHIVE_ARTIFACT(arg0, arg1));
- }
-
- public static Localizable localizableWSCOMPILE_NO_SUCH_DIRECTORY(Object arg0) {
- return messageFactory.getMessage("wscompile.noSuchDirectory", arg0);
- }
-
- /**
- * directory not found: {0}
- *
- */
- public static String WSCOMPILE_NO_SUCH_DIRECTORY(Object arg0) {
- return localizer.localize(localizableWSCOMPILE_NO_SUCH_DIRECTORY(arg0));
- }
-
- public static Localizable localizableWSCOMPILE_INFO(Object arg0) {
- return messageFactory.getMessage("wscompile.info", arg0);
- }
-
- /**
- * info: {0}
- *
- */
- public static String WSCOMPILE_INFO(Object arg0) {
- return localizer.localize(localizableWSCOMPILE_INFO(arg0));
- }
-
- public static Localizable localizableWSIMPORT_MAX_REDIRECT_ATTEMPT() {
- return messageFactory.getMessage("wsimport.maxRedirectAttempt");
- }
-
- /**
- * Can not get a WSDL maximum number of redirects(5) reached
- *
- */
- public static String WSIMPORT_MAX_REDIRECT_ATTEMPT() {
- return localizer.localize(localizableWSIMPORT_MAX_REDIRECT_ATTEMPT());
- }
-
- public static Localizable localizableWSIMPORT_WARNING_MESSAGE(Object arg0) {
- return messageFactory.getMessage("wsimport.WarningMessage", arg0);
- }
-
- /**
- * [WARNING] {0}
- *
- */
- public static String WSIMPORT_WARNING_MESSAGE(Object arg0) {
- return localizer.localize(localizableWSIMPORT_WARNING_MESSAGE(arg0));
- }
-
- public static Localizable localizableWSCOMPILE_INVALID_OPTION(Object arg0) {
- return messageFactory.getMessage("wscompile.invalidOption", arg0);
- }
-
- /**
- * unrecognized parameter {0}
- *
- */
- public static String WSCOMPILE_INVALID_OPTION(Object arg0) {
- return localizer.localize(localizableWSCOMPILE_INVALID_OPTION(arg0));
- }
-
- public static Localizable localizableWSIMPORT_ERROR_MESSAGE(Object arg0) {
- return messageFactory.getMessage("wsimport.ErrorMessage", arg0);
- }
-
- /**
- * [ERROR] {0}
- *
- */
- public static String WSIMPORT_ERROR_MESSAGE(Object arg0) {
- return localizer.localize(localizableWSIMPORT_ERROR_MESSAGE(arg0));
- }
-
- public static Localizable localizableWSIMPORT_GENERATING_CODE() {
- return messageFactory.getMessage("wsimport.GeneratingCode");
- }
-
- /**
- *
- * Generating code...
- *
- *
- */
- public static String WSIMPORT_GENERATING_CODE() {
- return localizer.localize(localizableWSIMPORT_GENERATING_CODE());
- }
-
- public static Localizable localizableWSGEN() {
- return messageFactory.getMessage("wsgen");
- }
-
- /**
- * -wsdl:protocol XSoap1.2 -extenson {1}
- *
- */
- public static String WSGEN() {
- return localizer.localize(localizableWSGEN());
- }
-
- public static Localizable localizableWSIMPORT_NOT_A_FILE_NOR_URL(Object arg0) {
- return messageFactory.getMessage("wsimport.NotAFileNorURL", arg0);
- }
-
- /**
- * "{0}" is neither a file name nor an URL
- *
- */
- public static String WSIMPORT_NOT_A_FILE_NOR_URL(Object arg0) {
- return localizer.localize(localizableWSIMPORT_NOT_A_FILE_NOR_URL(arg0));
- }
-
- public static Localizable localizableWSCOMPILE_WARNING(Object arg0) {
- return messageFactory.getMessage("wscompile.warning", arg0);
- }
-
- /**
- * warning: {0}
- *
- */
- public static String WSCOMPILE_WARNING(Object arg0) {
- return localizer.localize(localizableWSCOMPILE_WARNING(arg0));
- }
-
- public static Localizable localizableWRAPPER_TASK_NEED_ENDORSED(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wrapperTask.needEndorsed", arg0, arg1, arg2);
- }
-
- /**
- * You are running on JDK6 which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} API. Use the endorsed standards override mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), or set xendorsed="true" on <{2}>.
- *
- */
- public static String WRAPPER_TASK_NEED_ENDORSED(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWRAPPER_TASK_NEED_ENDORSED(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSIMPORT_NO_SUCH_JAXB_OPTION(Object arg0) {
- return messageFactory.getMessage("wsimport.noSuchJaxbOption", arg0);
- }
-
- /**
- * no such JAXB option: {0}
- *
- */
- public static String WSIMPORT_NO_SUCH_JAXB_OPTION(Object arg0) {
- return localizer.localize(localizableWSIMPORT_NO_SUCH_JAXB_OPTION(arg0));
- }
-
- public static Localizable localizableWSGEN_VERSION(Object arg0) {
- return messageFactory.getMessage("wsgen.version", arg0);
- }
-
- /**
- * wsgen version "{0}"
- *
- */
- public static String WSGEN_VERSION(Object arg0) {
- return localizer.localize(localizableWSGEN_VERSION(arg0));
- }
-
- public static Localizable localizableWSIMPORT_AUTH_FILE_NOT_FOUND(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsimport.authFileNotFound", arg0, arg1);
- }
-
- /**
- * Authorization file "{0}" not found. If the WSDL access needs Basic Authentication, please provide authorization file with read access at {1} or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//<url-path>
- *
- */
- public static String WSIMPORT_AUTH_FILE_NOT_FOUND(Object arg0, Object arg1) {
- return localizer.localize(localizableWSIMPORT_AUTH_FILE_NOT_FOUND(arg0, arg1));
- }
-
- public static Localizable localizableWSIMPORT_DEBUG_MESSAGE(Object arg0) {
- return messageFactory.getMessage("wsimport.DebugMessage", arg0);
- }
-
- /**
- * [DEBUG] {0}
- *
- */
- public static String WSIMPORT_DEBUG_MESSAGE(Object arg0) {
- return localizer.localize(localizableWSIMPORT_DEBUG_MESSAGE(arg0));
- }
-
- public static Localizable localizableWSGEN_COULD_NOT_CREATE_FILE(Object arg0) {
- return messageFactory.getMessage("wsgen.could.not.create.file", arg0);
- }
-
- /**
- * "Could not create file: "{0}"
- *
- */
- public static String WSGEN_COULD_NOT_CREATE_FILE(Object arg0) {
- return localizer.localize(localizableWSGEN_COULD_NOT_CREATE_FILE(arg0));
- }
-
- public static Localizable localizableWSGEN_WSDL_ARG_NO_GENWSDL(Object arg0) {
- return messageFactory.getMessage("wsgen.wsdl.arg.no.genwsdl", arg0);
- }
-
- /**
- * The "{0}" option can only be in conjunction with the "-wsdl" option.
- *
- */
- public static String WSGEN_WSDL_ARG_NO_GENWSDL(Object arg0) {
- return localizer.localize(localizableWSGEN_WSDL_ARG_NO_GENWSDL(arg0));
- }
-
- public static Localizable localizableWSGEN_HELP(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsgen.help", arg0, arg1, arg2);
- }
-
- /**
- *
- * Usage: {0} [options] <SEI>
- *
- * where [options] include:
- * -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
- * by the specification. Use of extensions may
- * 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
- * -s <directory> specify where to place generated source files
- * -verbose output messages about what the compiler is doing
- * -version print version information
- * -fullversion print full version information
- * -wsdl[:protocol] generate a WSDL file. The protocol is optional.
- * Valid protocols are {1},
- * the default is soap1.1.
- * The non standard protocols {2}
- * can only be used in conjunction with the
- * -extension option.
- * -inlineSchemas inline schemas in the generated wsdl. Must be
- * used in conjunction with the -wsdl option.
- * -servicename <name> specify the Service name to use in the generated WSDL
- * 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) {
- return localizer.localize(localizableWSGEN_HELP(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSIMPORT_INFO_MESSAGE(Object arg0) {
- return messageFactory.getMessage("wsimport.InfoMessage", arg0);
- }
-
- /**
- * [INFO] {0}
- *
- */
- public static String WSIMPORT_INFO_MESSAGE(Object arg0) {
- return localizer.localize(localizableWSIMPORT_INFO_MESSAGE(arg0));
- }
-
- public static Localizable localizableWSGEN_INLINE_SCHEMAS_ONLY_WITH_WSDL() {
- return messageFactory.getMessage("wsgen.inlineSchemas.only.with.wsdl");
- }
-
- /**
- * "-inlineSchemas" must be used in conjunction with the "-wsdl" option
- *
- */
- public static String WSGEN_INLINE_SCHEMAS_ONLY_WITH_WSDL() {
- return localizer.localize(localizableWSGEN_INLINE_SCHEMAS_ONLY_WITH_WSDL());
- }
-
- public static Localizable localizableWSGEN_SOAP_12_WITHOUT_EXTENSION() {
- return messageFactory.getMessage("wsgen.soap12.without.extension");
- }
-
- /**
- * The optional protocol "Xsoap1.2" must be used in conjunction with the "-extension" option.
- *
- */
- public static String WSGEN_SOAP_12_WITHOUT_EXTENSION() {
- return localizer.localize(localizableWSGEN_SOAP_12_WITHOUT_EXTENSION());
- }
-
- public static Localizable localizableWSIMPORT_ILLEGAL_AUTH_INFO(Object arg0) {
- return messageFactory.getMessage("wsimport.ILLEGAL_AUTH_INFO", arg0);
- }
-
- /**
- * "{0}" is not a valid authorization information format. The format is http[s]://user:password@host:port//<url-path>.
- *
- */
- public static String WSIMPORT_ILLEGAL_AUTH_INFO(Object arg0) {
- return localizer.localize(localizableWSIMPORT_ILLEGAL_AUTH_INFO(arg0));
- }
-
- public static Localizable localizableWSCOMPILE_COMPILATION_FAILED() {
- return messageFactory.getMessage("wscompile.compilationFailed");
- }
-
- /**
- * compilation failed, errors should have been reported
- *
- */
- public static String WSCOMPILE_COMPILATION_FAILED() {
- return localizer.localize(localizableWSCOMPILE_COMPILATION_FAILED());
- }
-
- public static Localizable localizableWSCOMPILE_MISSING_OPTION_ARGUMENT(Object arg0) {
- return messageFactory.getMessage("wscompile.missingOptionArgument", arg0);
- }
-
- /**
- * option "{0}" requires an argument
- *
- */
- public static String WSCOMPILE_MISSING_OPTION_ARGUMENT(Object arg0) {
- return localizer.localize(localizableWSCOMPILE_MISSING_OPTION_ARGUMENT(arg0));
- }
-
- public static Localizable localizableWSIMPORT_DOCUMENT_DOWNLOAD(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsimport.document.download", arg0, arg1);
- }
-
- /**
- *
- * Downloading metadata document from {0} to {1}
- *
- */
- public static String WSIMPORT_DOCUMENT_DOWNLOAD(Object arg0, Object arg1) {
- return localizer.localize(localizableWSIMPORT_DOCUMENT_DOWNLOAD(arg0, arg1));
- }
-
- public static Localizable localizableWSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsgen.cannot.gen.wsdl.for.non.soap.binding", arg0, arg1);
- }
-
- /**
- * wsgen can not generate WSDL for non-SOAP binding: {0} on Class {1}
- *
- */
- public static String WSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(Object arg0, Object arg1) {
- return localizer.localize(localizableWSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(arg0, arg1));
- }
-
- public static Localizable localizableWSCOMPILE_DUPLICATE_OPTION(Object arg0) {
- return messageFactory.getMessage("wscompile.duplicateOption", arg0);
- }
-
- /**
- * duplicate option: {0}
- *
- */
- public static String WSCOMPILE_DUPLICATE_OPTION(Object arg0) {
- return localizer.localize(localizableWSCOMPILE_DUPLICATE_OPTION(arg0));
- }
-
- public static Localizable localizableWSIMPORT_FAILED_TO_PARSE(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsimport.FailedToParse", arg0, arg1);
- }
-
- /**
- * Failed to parse "{0}": {1}
- *
- */
- public static String WSIMPORT_FAILED_TO_PARSE(Object arg0, Object arg1) {
- return localizer.localize(localizableWSIMPORT_FAILED_TO_PARSE(arg0, arg1));
- }
-
- public static Localizable localizableWSIMPORT_NO_WSDL(Object arg0) {
- return messageFactory.getMessage("wsimport.no.wsdl", arg0);
- }
-
- /**
- * Failed to read the WSDL document: {0}, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not <wsdl:definitions>.
- *
- */
- public static String WSIMPORT_NO_WSDL(Object arg0) {
- return localizer.localize(localizableWSIMPORT_NO_WSDL(arg0));
- }
-
- public static Localizable localizableWSIMPORT_AUTH_INFO_LINENO(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsimport.AUTH_INFO_LINENO", arg0, arg1);
- }
-
- /**
- * "line {0} of {1}
- *
- */
- public static String WSIMPORT_AUTH_INFO_LINENO(Object arg0, Object arg1) {
- 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);
- }
-
- /**
- * Usage: {0} [options] <SEI>
- *
- * Use "wsgen -help" for a detailed description of options.
- *
- */
- public static String WSGEN_USAGE(Object arg0) {
- return localizer.localize(localizableWSGEN_USAGE(arg0));
- }
-
- public static Localizable localizableWSGEN_SERVICENAME_MISSING_NAMESPACE(Object arg0) {
- return messageFactory.getMessage("wsgen.servicename.missing.namespace", arg0);
- }
-
- /**
- * The service name "{0}" is missing a namespace.
- *
- */
- public static String WSGEN_SERVICENAME_MISSING_NAMESPACE(Object arg0) {
- return localizer.localize(localizableWSGEN_SERVICENAME_MISSING_NAMESPACE(arg0));
- }
-
- public static Localizable localizableWSGEN_INVALID_TRANSPORT(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsgen.invalid.transport", arg0, arg1);
- }
-
- /**
- * "{0}" is not a supported transport. Supported transport includes: {1}.
- *
- */
- public static String WSGEN_INVALID_TRANSPORT(Object arg0, Object arg1) {
- return localizer.localize(localizableWSGEN_INVALID_TRANSPORT(arg0, arg1));
- }
-
- public static Localizable localizableWSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(Object arg0, Object arg1) {
- return messageFactory.getMessage("wsgen.cannot.gen.wsdl.for.soap12.binding", arg0, arg1);
- }
-
- /**
- * wsgen can not generate WSDL for SOAP 1.2 binding: {0} on class: {1}.
- *
- *
- */
- public static String WSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(Object arg0, Object arg1) {
- return localizer.localize(localizableWSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(arg0, arg1));
- }
-
- public static Localizable localizableWSIMPORT_ILLEGAL_TARGET_VERSION(Object arg0) {
- return messageFactory.getMessage("wsimport.ILLEGAL_TARGET_VERSION", arg0);
- }
-
- /**
- * "{0}" is not a valid target version. "2.0" and "2.1" are supported.
- *
- */
- public static String WSIMPORT_ILLEGAL_TARGET_VERSION(Object arg0) {
- return localizer.localize(localizableWSIMPORT_ILLEGAL_TARGET_VERSION(arg0));
- }
-
- public static Localizable localizableWSIMPORT_ILLEGAL_PROXY(Object arg0) {
- return messageFactory.getMessage("wsimport.ILLEGAL_PROXY", arg0);
- }
-
- /**
- * "{0}" is not a valid proxy format. The format is [user[:password]@]proxyHost:proxyPort
- *
- */
- public static String WSIMPORT_ILLEGAL_PROXY(Object arg0) {
- return localizer.localize(localizableWSIMPORT_ILLEGAL_PROXY(arg0));
- }
-
- public static Localizable localizableWSGEN_PORTNAME_MISSING_LOCALNAME(Object arg0) {
- return messageFactory.getMessage("wsgen.portname.missing.localname", arg0);
- }
-
- /**
- * The port name "{0}" is missing a localname.
- *
- */
- public static String WSGEN_PORTNAME_MISSING_LOCALNAME(Object arg0) {
- return localizer.localize(localizableWSGEN_PORTNAME_MISSING_LOCALNAME(arg0));
- }
-
- public static Localizable localizableWSGEN_PORTNAME_MISSING_NAMESPACE(Object arg0) {
- return messageFactory.getMessage("wsgen.portname.missing.namespace", arg0);
- }
-
- /**
- * The port name "{0}" is missing a namespace.
- *
- */
- public static String WSGEN_PORTNAME_MISSING_NAMESPACE(Object arg0) {
- return localizer.localize(localizableWSGEN_PORTNAME_MISSING_NAMESPACE(arg0));
- }
-
- public static Localizable localizableWSIMPORT_FULLVERSION(Object arg0) {
- return messageFactory.getMessage("wsimport.fullversion", arg0);
- }
-
- /**
- * wsimport full version "{0}"
- *
- */
- public static String WSIMPORT_FULLVERSION(Object arg0) {
- return localizer.localize(localizableWSIMPORT_FULLVERSION(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WsdlMessages.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WsdlMessages.java
deleted file mode 100644
index fe11f4b9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WsdlMessages.java
+++ /dev/null
@@ -1,974 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class WsdlMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.wsdl");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizablePARSING_ELEMENT_EXPECTED() {
- return messageFactory.getMessage("parsing.elementExpected");
- }
-
- /**
- * unexpected non-element found
- *
- */
- public static String PARSING_ELEMENT_EXPECTED() {
- return localizer.localize(localizablePARSING_ELEMENT_EXPECTED());
- }
-
- public static Localizable localizableENTITY_NOT_FOUND_BINDING(Object arg0, Object arg1) {
- return messageFactory.getMessage("entity.notFound.binding", arg0, arg1);
- }
-
- /**
- * wsdl:binding "{0}" referenced by wsdl:port "{1}", but it's not found in the wsdl
- *
- */
- public static String ENTITY_NOT_FOUND_BINDING(Object arg0, Object arg1) {
- return localizer.localize(localizableENTITY_NOT_FOUND_BINDING(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_UNABLE_TO_GET_METADATA(Object arg0, Object arg1) {
- return messageFactory.getMessage("parsing.unableToGetMetadata", arg0, arg1);
- }
-
- /**
- * {0}
- *
- * {1}
- *
- */
- public static String PARSING_UNABLE_TO_GET_METADATA(Object arg0, Object arg1) {
- return localizer.localize(localizablePARSING_UNABLE_TO_GET_METADATA(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_PARSE_FAILED() {
- return messageFactory.getMessage("Parsing.ParseFailed");
- }
-
- /**
- * Failed to parse the WSDL.
- *
- */
- public static String PARSING_PARSE_FAILED() {
- return localizer.localize(localizablePARSING_PARSE_FAILED());
- }
-
- public static Localizable localizablePARSING_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) {
- return messageFactory.getMessage("parsing.invalidAttributeValue", arg0, arg1);
- }
-
- /**
- * invalid value "{1}" for attribute "{0}"
- *
- */
- public static String PARSING_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) {
- return localizer.localize(localizablePARSING_INVALID_ATTRIBUTE_VALUE(arg0, arg1));
- }
-
- public static Localizable localizableVALIDATION_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) {
- return messageFactory.getMessage("validation.invalidAttributeValue", arg0, arg1);
- }
-
- /**
- * invalid value "{1}" for attribute "{0}"
- *
- */
- public static String VALIDATION_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) {
- return localizer.localize(localizableVALIDATION_INVALID_ATTRIBUTE_VALUE(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_INVALID_TAG(Object arg0, Object arg1) {
- return messageFactory.getMessage("parsing.invalidTag", arg0, arg1);
- }
-
- /**
- * expected element "{1}", found "{0}"
- *
- */
- public static String PARSING_INVALID_TAG(Object arg0, Object arg1) {
- return localizer.localize(localizablePARSING_INVALID_TAG(arg0, arg1));
- }
-
- public static Localizable localizableENTITY_NOT_FOUND_PORT_TYPE(Object arg0, Object arg1) {
- return messageFactory.getMessage("entity.notFound.portType", arg0, arg1);
- }
-
- /**
- * wsdl:portType "{0}" referenced by wsdl:binding "{1}", but it's not found in the wsdl
- *
- */
- public static String ENTITY_NOT_FOUND_PORT_TYPE(Object arg0, Object arg1) {
- return localizer.localize(localizableENTITY_NOT_FOUND_PORT_TYPE(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_MISSING_REQUIRED_ATTRIBUTE(Object arg0, Object arg1) {
- return messageFactory.getMessage("parsing.missingRequiredAttribute", arg0, arg1);
- }
-
- /**
- * missing required attribute "{1}" of element "{0}"
- *
- */
- public static String PARSING_MISSING_REQUIRED_ATTRIBUTE(Object arg0, Object arg1) {
- return localizer.localize(localizablePARSING_MISSING_REQUIRED_ATTRIBUTE(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_INVALID_ELEMENT(Object arg0, Object arg1) {
- return messageFactory.getMessage("parsing.invalidElement", arg0, arg1);
- }
-
- /**
- * invalid element: "{0}" (in namespace "{1}")
- *
- */
- public static String PARSING_INVALID_ELEMENT(Object arg0, Object arg1) {
- return localizer.localize(localizablePARSING_INVALID_ELEMENT(arg0, arg1));
- }
-
- public static Localizable localizableVALIDATION_INVALID_ELEMENT(Object arg0) {
- return messageFactory.getMessage("validation.invalidElement", arg0);
- }
-
- /**
- * invalid element: "{0}"
- *
- */
- public static String VALIDATION_INVALID_ELEMENT(Object arg0) {
- return localizer.localize(localizableVALIDATION_INVALID_ELEMENT(arg0));
- }
-
- public static Localizable localizableINTERNALIZER_TWO_VERSION_ATTRIBUTES() {
- return messageFactory.getMessage("Internalizer.TwoVersionAttributes");
- }
-
- /**
- * Both jaxws:version and version are present
- *
- */
- public static String INTERNALIZER_TWO_VERSION_ATTRIBUTES() {
- return localizer.localize(localizableINTERNALIZER_TWO_VERSION_ATTRIBUTES());
- }
-
- public static Localizable localizableVALIDATION_DUPLICATE_PART_NAME(Object arg0, Object arg1) {
- return messageFactory.getMessage("validation.duplicatePartName", arg0, arg1);
- }
-
- /**
- * Invalid WSDL, duplicate parts in a wsdl:message is not allowed.
- * wsdl:message {0} has a duplicated part name: "{1}"
- *
- */
- public static String VALIDATION_DUPLICATE_PART_NAME(Object arg0, Object arg1) {
- return localizer.localize(localizableVALIDATION_DUPLICATE_PART_NAME(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_INVALID_WSDL_ELEMENT(Object arg0) {
- return messageFactory.getMessage("parsing.invalidWsdlElement", arg0);
- }
-
- /**
- * invalid WSDL element: "{0}"
- *
- */
- public static String PARSING_INVALID_WSDL_ELEMENT(Object arg0) {
- return localizer.localize(localizablePARSING_INVALID_WSDL_ELEMENT(arg0));
- }
-
- public static Localizable localizablePARSING_NON_WHITESPACE_TEXT_FOUND(Object arg0) {
- return messageFactory.getMessage("parsing.nonWhitespaceTextFound", arg0);
- }
-
- /**
- * found unexpected non-whitespace text: "{0}"
- *
- */
- public static String PARSING_NON_WHITESPACE_TEXT_FOUND(Object arg0) {
- return localizer.localize(localizablePARSING_NON_WHITESPACE_TEXT_FOUND(arg0));
- }
-
- public static Localizable localizableINTERNALIZER_TARGET_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("internalizer.targetNotFound", arg0);
- }
-
- /**
- * No target found for the wsdlLocation: {0}
- *
- */
- public static String INTERNALIZER_TARGET_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableINTERNALIZER_TARGET_NOT_FOUND(arg0));
- }
-
- public static Localizable localizablePARSING_SAX_EXCEPTION_WITH_SYSTEM_ID(Object arg0) {
- return messageFactory.getMessage("parsing.saxExceptionWithSystemId", arg0);
- }
-
- /**
- * invalid WSDL file! failed to parse document at "{0}"
- *
- */
- public static String PARSING_SAX_EXCEPTION_WITH_SYSTEM_ID(Object arg0) {
- return localizer.localize(localizablePARSING_SAX_EXCEPTION_WITH_SYSTEM_ID(arg0));
- }
-
- public static Localizable localizablePARSING_REQUIRED_EXTENSIBILITY_ELEMENT(Object arg0, Object arg1) {
- return messageFactory.getMessage("parsing.requiredExtensibilityElement", arg0, arg1);
- }
-
- /**
- * unknown required extensibility element "{0}" (in namespace "{1}")
- *
- */
- public static String PARSING_REQUIRED_EXTENSIBILITY_ELEMENT(Object arg0, Object arg1) {
- return localizer.localize(localizablePARSING_REQUIRED_EXTENSIBILITY_ELEMENT(arg0, arg1));
- }
-
- public static Localizable localizableENTITY_NOT_FOUND_BY_ID(Object arg0) {
- return messageFactory.getMessage("entity.notFoundByID", arg0);
- }
-
- /**
- * invalid entity id: "{0}"
- *
- */
- public static String ENTITY_NOT_FOUND_BY_ID(Object arg0) {
- return localizer.localize(localizableENTITY_NOT_FOUND_BY_ID(arg0));
- }
-
- public static Localizable localizableVALIDATION_EXCLUSIVE_ATTRIBUTES(Object arg0, Object arg1) {
- return messageFactory.getMessage("validation.exclusiveAttributes", arg0, arg1);
- }
-
- /**
- * exclusive attributes: "{0}", "{1}"
- *
- */
- public static String VALIDATION_EXCLUSIVE_ATTRIBUTES(Object arg0, Object arg1) {
- return localizer.localize(localizableVALIDATION_EXCLUSIVE_ATTRIBUTES(arg0, arg1));
- }
-
- public static Localizable localizableVALIDATION_MISSING_REQUIRED_SUB_ENTITY(Object arg0, Object arg1) {
- return messageFactory.getMessage("validation.missingRequiredSubEntity", arg0, arg1);
- }
-
- /**
- * missing required sub-entity "{0}" of element "{1}"
- *
- */
- public static String VALIDATION_MISSING_REQUIRED_SUB_ENTITY(Object arg0, Object arg1) {
- return localizer.localize(localizableVALIDATION_MISSING_REQUIRED_SUB_ENTITY(arg0, arg1));
- }
-
- public static Localizable localizableINTERNALIZER_INCORRECT_VERSION() {
- return messageFactory.getMessage("Internalizer.IncorrectVersion");
- }
-
- /**
- * JAXWS version attribute must be "2.0"
- *
- */
- public static String INTERNALIZER_INCORRECT_VERSION() {
- return localizer.localize(localizableINTERNALIZER_INCORRECT_VERSION());
- }
-
- public static Localizable localizableLOCALIZED_ERROR(Object arg0) {
- return messageFactory.getMessage("localized.error", arg0);
- }
-
- /**
- * {0}
- *
- */
- public static String LOCALIZED_ERROR(Object arg0) {
- return localizer.localize(localizableLOCALIZED_ERROR(arg0));
- }
-
- public static Localizable localizableENTITY_DUPLICATE_WITH_TYPE(Object arg0, Object arg1) {
- return messageFactory.getMessage("entity.duplicateWithType", arg0, arg1);
- }
-
- /**
- * duplicate "{0}" entity: "{1}"
- *
- */
- public static String ENTITY_DUPLICATE_WITH_TYPE(Object arg0, Object arg1) {
- return localizer.localize(localizableENTITY_DUPLICATE_WITH_TYPE(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_ONLY_ONE_OF_ELEMENT_OR_TYPE_REQUIRED(Object arg0) {
- return messageFactory.getMessage("parsing.onlyOneOfElementOrTypeRequired", arg0);
- }
-
- /**
- * only one of the "element" or "type" attributes is allowed in part "{0}"
- *
- */
- public static String PARSING_ONLY_ONE_OF_ELEMENT_OR_TYPE_REQUIRED(Object arg0) {
- return localizer.localize(localizablePARSING_ONLY_ONE_OF_ELEMENT_OR_TYPE_REQUIRED(arg0));
- }
-
- public static Localizable localizableVALIDATION_UNSUPPORTED_USE_ENCODED(Object arg0, Object arg1) {
- return messageFactory.getMessage("validation.unsupportedUse.encoded", arg0, arg1);
- }
-
- /**
- * "Use of SOAP Encoding is not supported.
- * SOAP extension element on line {0} in {1} has use="encoded" "
- *
- */
- public static String VALIDATION_UNSUPPORTED_USE_ENCODED(Object arg0, Object arg1) {
- return localizer.localize(localizableVALIDATION_UNSUPPORTED_USE_ENCODED(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_INCORRECT_ROOT_ELEMENT(Object arg0, Object arg1, Object arg2, Object arg3) {
- return messageFactory.getMessage("parsing.incorrectRootElement", arg0, arg1, arg2, arg3);
- }
-
- /**
- * expected root element "{2}" (in namespace "{3}"), found element "{0}" (in namespace "{1}")
- *
- */
- public static String PARSING_INCORRECT_ROOT_ELEMENT(Object arg0, Object arg1, Object arg2, Object arg3) {
- return localizer.localize(localizablePARSING_INCORRECT_ROOT_ELEMENT(arg0, arg1, arg2, arg3));
- }
-
- public static Localizable localizableTRY_WITH_MEX(Object arg0) {
- return messageFactory.getMessage("try.with.mex", arg0);
- }
-
- /**
- * {0}
- *
- * retrying with MEX...
- *
- */
- public static String TRY_WITH_MEX(Object arg0) {
- return localizer.localize(localizableTRY_WITH_MEX(arg0));
- }
-
- public static Localizable localizableVALIDATION_MISSING_REQUIRED_ATTRIBUTE(Object arg0, Object arg1) {
- return messageFactory.getMessage("validation.missingRequiredAttribute", arg0, arg1);
- }
-
- /**
- * missing required attribute "{0}" of element "{1}"
- *
- */
- public static String VALIDATION_MISSING_REQUIRED_ATTRIBUTE(Object arg0, Object arg1) {
- return localizer.localize(localizableVALIDATION_MISSING_REQUIRED_ATTRIBUTE(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_IO_EXCEPTION(Object arg0) {
- return messageFactory.getMessage("parsing.ioException", arg0);
- }
-
- /**
- * parsing failed: {0}
- *
- */
- public static String PARSING_IO_EXCEPTION(Object arg0) {
- return localizer.localize(localizablePARSING_IO_EXCEPTION(arg0));
- }
-
- public static Localizable localizableINTERNALIZER_X_PATH_EVAULATES_TO_TOO_MANY_TARGETS(Object arg0, Object arg1) {
- return messageFactory.getMessage("internalizer.XPathEvaulatesToTooManyTargets", arg0, arg1);
- }
-
- /**
- * XPath evaluation of "{0}" results in too many ({1}) target nodes
- *
- */
- public static String INTERNALIZER_X_PATH_EVAULATES_TO_TOO_MANY_TARGETS(Object arg0, Object arg1) {
- return localizer.localize(localizableINTERNALIZER_X_PATH_EVAULATES_TO_TOO_MANY_TARGETS(arg0, arg1));
- }
-
- public static Localizable localizablePARSER_NOT_A_BINDING_FILE(Object arg0, Object arg1) {
- return messageFactory.getMessage("Parser.NotABindingFile", arg0, arg1);
- }
-
- /**
- * not an external binding file. The root element must be '{'http://java.sun.com/xml/ns/jaxws'}'bindings but it is '{'{0}'}'{1}
- *
- */
- public static String PARSER_NOT_A_BINDING_FILE(Object arg0, Object arg1) {
- return localizer.localize(localizablePARSER_NOT_A_BINDING_FILE(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_UNKNOWN_NAMESPACE_PREFIX(Object arg0) {
- return messageFactory.getMessage("parsing.unknownNamespacePrefix", arg0);
- }
-
- /**
- * undeclared namespace prefix: "{0}"
- *
- */
- public static String PARSING_UNKNOWN_NAMESPACE_PREFIX(Object arg0) {
- return localizer.localize(localizablePARSING_UNKNOWN_NAMESPACE_PREFIX(arg0));
- }
-
- public static Localizable localizablePARSING_FACTORY_CONFIG_EXCEPTION(Object arg0) {
- return messageFactory.getMessage("parsing.factoryConfigException", arg0);
- }
-
- /**
- * invalid WSDL file! parsing failed: {0}
- *
- */
- public static String PARSING_FACTORY_CONFIG_EXCEPTION(Object arg0) {
- return localizer.localize(localizablePARSING_FACTORY_CONFIG_EXCEPTION(arg0));
- }
-
- public static Localizable localizableVALIDATION_MISSING_REQUIRED_PROPERTY(Object arg0, Object arg1) {
- return messageFactory.getMessage("validation.missingRequiredProperty", arg0, arg1);
- }
-
- /**
- * missing required property "{0}" of element "{1}"
- *
- */
- public static String VALIDATION_MISSING_REQUIRED_PROPERTY(Object arg0, Object arg1) {
- return localizer.localize(localizableVALIDATION_MISSING_REQUIRED_PROPERTY(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_INVALID_OPERATION_STYLE(Object arg0) {
- return messageFactory.getMessage("parsing.invalidOperationStyle", arg0);
- }
-
- /**
- * operation "{0}" has an invalid style
- *
- */
- public static String PARSING_INVALID_OPERATION_STYLE(Object arg0) {
- return localizer.localize(localizablePARSING_INVALID_OPERATION_STYLE(arg0));
- }
-
- public static Localizable localizableINTERNALIZER_X_PATH_EVALUATION_ERROR(Object arg0) {
- return messageFactory.getMessage("internalizer.XPathEvaluationError", arg0);
- }
-
- /**
- * XPath error: {0}
- *
- */
- public static String INTERNALIZER_X_PATH_EVALUATION_ERROR(Object arg0) {
- return localizer.localize(localizableINTERNALIZER_X_PATH_EVALUATION_ERROR(arg0));
- }
-
- public static Localizable localizableVALIDATION_INVALID_SUB_ENTITY(Object arg0, Object arg1) {
- return messageFactory.getMessage("validation.invalidSubEntity", arg0, arg1);
- }
-
- /**
- * invalid sub-element "{0}" of element "{1}"
- *
- */
- public static String VALIDATION_INVALID_SUB_ENTITY(Object arg0, Object arg1) {
- return localizer.localize(localizableVALIDATION_INVALID_SUB_ENTITY(arg0, arg1));
- }
-
- public static Localizable localizableVALIDATION_SHOULD_NOT_HAPPEN(Object arg0) {
- return messageFactory.getMessage("validation.shouldNotHappen", arg0);
- }
-
- /**
- * internal error ("{0}")
- *
- */
- public static String VALIDATION_SHOULD_NOT_HAPPEN(Object arg0) {
- return localizer.localize(localizableVALIDATION_SHOULD_NOT_HAPPEN(arg0));
- }
-
- public static Localizable localizableABSTRACT_REFERENCE_FINDER_IMPL_UNABLE_TO_PARSE(Object arg0, Object arg1) {
- return messageFactory.getMessage("AbstractReferenceFinderImpl.UnableToParse", arg0, arg1);
- }
-
- /**
- * Unable to parse "{0}" : {1}
- *
- */
- public static String ABSTRACT_REFERENCE_FINDER_IMPL_UNABLE_TO_PARSE(Object arg0, Object arg1) {
- return localizer.localize(localizableABSTRACT_REFERENCE_FINDER_IMPL_UNABLE_TO_PARSE(arg0, arg1));
- }
-
- public static Localizable localizableWARNING_FAULT_EMPTY_ACTION(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("warning.faultEmptyAction", arg0, arg1, arg2);
- }
-
- /**
- * ignoring empty Action in "{0}" {1} element of "{2}" operation, using default instead
- *
- */
- public static String WARNING_FAULT_EMPTY_ACTION(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWARNING_FAULT_EMPTY_ACTION(arg0, arg1, arg2));
- }
-
- public static Localizable localizablePARSING_INVALID_EXTENSION_ELEMENT(Object arg0, Object arg1) {
- return messageFactory.getMessage("parsing.invalidExtensionElement", arg0, arg1);
- }
-
- /**
- * invalid extension element: "{0}" (in namespace "{1}")
- *
- */
- public static String PARSING_INVALID_EXTENSION_ELEMENT(Object arg0, Object arg1) {
- return localizer.localize(localizablePARSING_INVALID_EXTENSION_ELEMENT(arg0, arg1));
- }
-
- public static Localizable localizableINTERNALIZER_X_PATH_EVALUATES_TO_NON_ELEMENT(Object arg0) {
- return messageFactory.getMessage("internalizer.XPathEvaluatesToNonElement", arg0);
- }
-
- /**
- * XPath evaluation of "{0}" needs to result in an element.
- *
- */
- public static String INTERNALIZER_X_PATH_EVALUATES_TO_NON_ELEMENT(Object arg0) {
- return localizer.localize(localizableINTERNALIZER_X_PATH_EVALUATES_TO_NON_ELEMENT(arg0));
- }
-
- public static Localizable localizableINTERNALIZER_X_PATH_EVALUATES_TO_NO_TARGET(Object arg0) {
- return messageFactory.getMessage("internalizer.XPathEvaluatesToNoTarget", arg0);
- }
-
- /**
- * XPath evaluation of "{0}" results in an empty target node
- *
- */
- public static String INTERNALIZER_X_PATH_EVALUATES_TO_NO_TARGET(Object arg0) {
- return localizer.localize(localizableINTERNALIZER_X_PATH_EVALUATES_TO_NO_TARGET(arg0));
- }
-
- public static Localizable localizablePARSING_SAX_EXCEPTION(Object arg0) {
- return messageFactory.getMessage("parsing.saxException", arg0);
- }
-
- /**
- * invalid WSDL file! parsing failed: {0}
- *
- */
- public static String PARSING_SAX_EXCEPTION(Object arg0) {
- return localizer.localize(localizablePARSING_SAX_EXCEPTION(arg0));
- }
-
- public static Localizable localizableINVALID_CUSTOMIZATION_NAMESPACE(Object arg0) {
- return messageFactory.getMessage("invalid.customization.namespace", arg0);
- }
-
- /**
- * Ignoring customization: "{0}", because it has no namespace. It must belong to the customization namespace.
- *
- */
- public static String INVALID_CUSTOMIZATION_NAMESPACE(Object arg0) {
- return localizer.localize(localizableINVALID_CUSTOMIZATION_NAMESPACE(arg0));
- }
-
- public static Localizable localizableVALIDATION_INVALID_ATTRIBUTE(Object arg0, Object arg1) {
- return messageFactory.getMessage("validation.invalidAttribute", arg0, arg1);
- }
-
- /**
- * invalid attribute "{0}" of element "{1}"
- *
- */
- public static String VALIDATION_INVALID_ATTRIBUTE(Object arg0, Object arg1) {
- return localizer.localize(localizableVALIDATION_INVALID_ATTRIBUTE(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_PARSER_CONFIG_EXCEPTION(Object arg0) {
- return messageFactory.getMessage("parsing.parserConfigException", arg0);
- }
-
- /**
- * invalid WSDL file! parsing failed: {0}
- *
- */
- public static String PARSING_PARSER_CONFIG_EXCEPTION(Object arg0) {
- return localizer.localize(localizablePARSING_PARSER_CONFIG_EXCEPTION(arg0));
- }
-
- public static Localizable localizablePARSING_ONLY_ONE_TYPES_ALLOWED(Object arg0) {
- return messageFactory.getMessage("parsing.onlyOneTypesAllowed", arg0);
- }
-
- /**
- * only one "types" element allowed in "{0}"
- *
- */
- public static String PARSING_ONLY_ONE_TYPES_ALLOWED(Object arg0) {
- return localizer.localize(localizablePARSING_ONLY_ONE_TYPES_ALLOWED(arg0));
- }
-
- public static Localizable localizablePARSING_INVALID_URI(Object arg0) {
- return messageFactory.getMessage("parsing.invalidURI", arg0);
- }
-
- /**
- * invalid URI: {0}
- *
- */
- public static String PARSING_INVALID_URI(Object arg0) {
- return localizer.localize(localizablePARSING_INVALID_URI(arg0));
- }
-
- public static Localizable localizableVALIDATION_INCORRECT_TARGET_NAMESPACE(Object arg0, Object arg1) {
- return messageFactory.getMessage("validation.incorrectTargetNamespace", arg0, arg1);
- }
-
- /**
- * target namespace is incorrect (expected: {1}, found: {0})
- *
- */
- public static String VALIDATION_INCORRECT_TARGET_NAMESPACE(Object arg0, Object arg1) {
- return localizer.localize(localizableVALIDATION_INCORRECT_TARGET_NAMESPACE(arg0, arg1));
- }
-
- public static Localizable localizableENTITY_NOT_FOUND_BY_Q_NAME(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("entity.notFoundByQName", arg0, arg1, arg2);
- }
-
- /**
- * {0} "{1}" not found in the wsdl: {2}
- *
- */
- public static String ENTITY_NOT_FOUND_BY_Q_NAME(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableENTITY_NOT_FOUND_BY_Q_NAME(arg0, arg1, arg2));
- }
-
- public static Localizable localizableINVALID_WSDL(Object arg0, Object arg1, Object arg2, Object arg3) {
- return messageFactory.getMessage("invalid.wsdl", arg0, arg1, arg2, arg3);
- }
-
- /**
- * Invalid WSDL {0}, expected {1} found {2} at (line {3})
- *
- */
- public static String INVALID_WSDL(Object arg0, Object arg1, Object arg2, Object arg3) {
- return localizer.localize(localizableINVALID_WSDL(arg0, arg1, arg2, arg3));
- }
-
- public static Localizable localizablePARSING_UNKNOWN_IMPORTED_DOCUMENT_TYPE(Object arg0) {
- return messageFactory.getMessage("parsing.unknownImportedDocumentType", arg0);
- }
-
- /**
- * imported document is of unknown type: {0}
- *
- */
- public static String PARSING_UNKNOWN_IMPORTED_DOCUMENT_TYPE(Object arg0) {
- return localizer.localize(localizablePARSING_UNKNOWN_IMPORTED_DOCUMENT_TYPE(arg0));
- }
-
- public static Localizable localizablePARSING_IO_EXCEPTION_WITH_SYSTEM_ID(Object arg0) {
- return messageFactory.getMessage("parsing.ioExceptionWithSystemId", arg0);
- }
-
- /**
- * failed to parse document at "{0}"
- *
- */
- public static String PARSING_IO_EXCEPTION_WITH_SYSTEM_ID(Object arg0) {
- return localizer.localize(localizablePARSING_IO_EXCEPTION_WITH_SYSTEM_ID(arg0));
- }
-
- public static Localizable localizableVALIDATION_AMBIGUOUS_NAME(Object arg0) {
- return messageFactory.getMessage("validation.ambiguousName", arg0);
- }
-
- /**
- * ambiguous operation name: "{0}"
- *
- */
- public static String VALIDATION_AMBIGUOUS_NAME(Object arg0) {
- return localizer.localize(localizableVALIDATION_AMBIGUOUS_NAME(arg0));
- }
-
- public static Localizable localizablePARSING_WSDL_NOT_DEFAULT_NAMESPACE(Object arg0) {
- return messageFactory.getMessage("parsing.wsdlNotDefaultNamespace", arg0);
- }
-
- /**
- * default namespace must be "{0}"
- *
- */
- public static String PARSING_WSDL_NOT_DEFAULT_NAMESPACE(Object arg0) {
- return localizer.localize(localizablePARSING_WSDL_NOT_DEFAULT_NAMESPACE(arg0));
- }
-
- public static Localizable localizablePARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(Object arg0, Object arg1) {
- return messageFactory.getMessage("parsing.unknownExtensibilityElementOrAttribute", arg0, arg1);
- }
-
- /**
- * unknown extensibility element or attribute "{0}" (in namespace "{1}")
- *
- */
- public static String PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(Object arg0, Object arg1) {
- return localizer.localize(localizablePARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(arg0, arg1));
- }
-
- public static Localizable localizableVALIDATION_DUPLICATED_ELEMENT(Object arg0) {
- return messageFactory.getMessage("validation.duplicatedElement", arg0);
- }
-
- /**
- * duplicated element: "{0}"
- *
- */
- public static String VALIDATION_DUPLICATED_ELEMENT(Object arg0) {
- return localizer.localize(localizableVALIDATION_DUPLICATED_ELEMENT(arg0));
- }
-
- public static Localizable localizableINTERNALIZER_TARGET_NOT_AN_ELEMENT() {
- return messageFactory.getMessage("internalizer.targetNotAnElement");
- }
-
- /**
- * Target node is not an element
- *
- */
- public static String INTERNALIZER_TARGET_NOT_AN_ELEMENT() {
- return localizer.localize(localizableINTERNALIZER_TARGET_NOT_AN_ELEMENT());
- }
-
- public static Localizable localizableWARNING_INPUT_OUTPUT_EMPTY_ACTION(Object arg0, Object arg1) {
- return messageFactory.getMessage("warning.inputOutputEmptyAction", arg0, arg1);
- }
-
- /**
- * ignoring empty Action in {0} element of "{1}" operation, using default instead
- *
- */
- public static String WARNING_INPUT_OUTPUT_EMPTY_ACTION(Object arg0, Object arg1) {
- return localizer.localize(localizableWARNING_INPUT_OUTPUT_EMPTY_ACTION(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_INVALID_TAG_NS(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) {
- return messageFactory.getMessage("parsing.invalidTagNS", arg0, arg1, arg2, arg3, arg4);
- }
-
- /**
- * Invalid WSDL at {4}: expected element "{2}" (in namespace "{3}"), found element "{0}" (in namespace "{1}")
- *
- */
- public static String PARSING_INVALID_TAG_NS(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) {
- return localizer.localize(localizablePARSING_INVALID_TAG_NS(arg0, arg1, arg2, arg3, arg4));
- }
-
- public static Localizable localizableINVALID_WSDL_WITH_DOOC(Object arg0, Object arg1) {
- return messageFactory.getMessage("invalid.wsdl.with.dooc", arg0, arg1);
- }
-
- /**
- * "Not a WSDL document: {0}, it gives "{1}", retrying with MEX..."
- *
- */
- public static String INVALID_WSDL_WITH_DOOC(Object arg0, Object arg1) {
- return localizer.localize(localizableINVALID_WSDL_WITH_DOOC(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_NOT_AWSDL(Object arg0) {
- return messageFactory.getMessage("Parsing.NotAWSDL", arg0);
- }
-
- /**
- * Failed to get WSDL components, probably {0} is not a valid WSDL file.
- *
- */
- public static String PARSING_NOT_AWSDL(Object arg0) {
- return localizer.localize(localizablePARSING_NOT_AWSDL(arg0));
- }
-
- public static Localizable localizableENTITY_DUPLICATE(Object arg0) {
- return messageFactory.getMessage("entity.duplicate", arg0);
- }
-
- /**
- * duplicate entity: "{0}"
- *
- */
- public static String ENTITY_DUPLICATE(Object arg0) {
- return localizer.localize(localizableENTITY_DUPLICATE(arg0));
- }
-
- public static Localizable localizableWARNING_WSI_R_2004() {
- return messageFactory.getMessage("warning.wsi.r2004");
- }
-
- /**
- * Not a WSI-BP compliant WSDL (R2001, R2004). xsd:import must not import XML Schema definitions embedded inline within the WSDL document.
- *
- */
- public static String WARNING_WSI_R_2004() {
- return localizer.localize(localizableWARNING_WSI_R_2004());
- }
-
- public static Localizable localizableWARNING_WSI_R_2003() {
- return messageFactory.getMessage("warning.wsi.r2003");
- }
-
- /**
- * Not a WSI-BP compliant WSDL (R2003). xsd:import must only be used inside xsd:schema elements.
- *
- */
- public static String WARNING_WSI_R_2003() {
- return localizer.localize(localizableWARNING_WSI_R_2003());
- }
-
- public static Localizable localizableWARNING_WSI_R_2002(Object arg0, Object arg1) {
- return messageFactory.getMessage("warning.wsi.r2002", arg0, arg1);
- }
-
- /**
- * Not a WSI-BP compliant WSDL (R2002). wsdl:import must not be used to import XML Schema embedded in the WSDL document. Expected WSDL namespace: {0}, found: {1}
- *
- */
- public static String WARNING_WSI_R_2002(Object arg0, Object arg1) {
- return localizer.localize(localizableWARNING_WSI_R_2002(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_ELEMENT_OR_TYPE_REQUIRED(Object arg0) {
- return messageFactory.getMessage("parsing.elementOrTypeRequired", arg0);
- }
-
- /**
- * warning: part {0} is ignored, either the "element" or the "type" attribute is required in part "{0}"
- *
- */
- public static String PARSING_ELEMENT_OR_TYPE_REQUIRED(Object arg0) {
- return localizer.localize(localizablePARSING_ELEMENT_OR_TYPE_REQUIRED(arg0));
- }
-
- public static Localizable localizableWARNING_WSI_R_2001() {
- return messageFactory.getMessage("warning.wsi.r2001");
- }
-
- /**
- * Not a WSI-BP compliant WSDL (R2001, R2002). wsdl:import must import only WSDL documents. It's trying to import: "{0}"
- *
- */
- public static String WARNING_WSI_R_2001() {
- return localizer.localize(localizableWARNING_WSI_R_2001());
- }
-
- public static Localizable localizableFILE_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("file.not.found", arg0);
- }
-
- /**
- * {0} is unreachable
- *
- */
- public static String FILE_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableFILE_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableVALIDATION_INVALID_SIMPLE_TYPE_IN_ELEMENT(Object arg0, Object arg1) {
- return messageFactory.getMessage("validation.invalidSimpleTypeInElement", arg0, arg1);
- }
-
- /**
- * invalid element: "{1}", has named simpleType: "{0}"
- *
- */
- public static String VALIDATION_INVALID_SIMPLE_TYPE_IN_ELEMENT(Object arg0, Object arg1) {
- return localizer.localize(localizableVALIDATION_INVALID_SIMPLE_TYPE_IN_ELEMENT(arg0, arg1));
- }
-
- public static Localizable localizablePARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(Object arg0) {
- return messageFactory.getMessage("parsing.onlyOneDocumentationAllowed", arg0);
- }
-
- /**
- * only one "documentation" element allowed in "{0}"
- *
- */
- public static String PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(Object arg0) {
- return localizer.localize(localizablePARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(arg0));
- }
-
- public static Localizable localizableINTERNALIZER_VERSION_NOT_PRESENT() {
- return messageFactory.getMessage("Internalizer.VersionNotPresent");
- }
-
- /**
- * JAXWS version attribute must be present
- *
- */
- public static String INTERNALIZER_VERSION_NOT_PRESENT() {
- return localizer.localize(localizableINTERNALIZER_VERSION_NOT_PRESENT());
- }
-
- public static Localizable localizableFAILED_NOSERVICE(Object arg0) {
- return messageFactory.getMessage("failed.noservice", arg0);
- }
-
- /**
- * Could not find wsdl:service in the provided WSDL(s):
- *
- * {0} At least one WSDL with at least one service definition needs to be provided.
- *
- */
- public static String FAILED_NOSERVICE(Object arg0) {
- return localizer.localize(localizableFAILED_NOSERVICE(arg0));
- }
-
- public static Localizable localizablePARSING_TOO_MANY_ELEMENTS(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("parsing.tooManyElements", arg0, arg1, arg2);
- }
-
- /**
- * too many "{0}" elements under "{1}" element "{2}"
- *
- */
- public static String PARSING_TOO_MANY_ELEMENTS(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizablePARSING_TOO_MANY_ELEMENTS(arg0, arg1, arg2));
- }
-
- public static Localizable localizableINTERNALIZER_INCORRECT_SCHEMA_REFERENCE(Object arg0, Object arg1) {
- return messageFactory.getMessage("Internalizer.IncorrectSchemaReference", arg0, arg1);
- }
-
- /**
- * "{0}" is not a part of this compilation. Is this a mistake for "{1}"?
- *
- */
- public static String INTERNALIZER_INCORRECT_SCHEMA_REFERENCE(Object arg0, Object arg1) {
- return localizer.localize(localizableINTERNALIZER_INCORRECT_SCHEMA_REFERENCE(arg0, arg1));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration.properties
deleted file mode 100644
index 6c521b34..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1})
-configuration.notBindingFile=Ignoring: binding file "\"{0}\". It is not a jaxws or a jaxb binding file.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_de.properties
deleted file mode 100644
index b4678e66..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_de.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1})
-configuration.notBindingFile=Wird ignoriert: Binding-Datei "\\"{0}\\". Es handelt sich nicht um eine jaxws- oder jaxb-Binding-Datei.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_es.properties
deleted file mode 100644
index 965e4976..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_es.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1})
-configuration.notBindingFile=Ignorando el archivo de enlace "\\"{0}\\". No es un archivo de enlace jaxws ni jaxb.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_fr.properties
deleted file mode 100644
index 9ce29804..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_fr.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1})
-configuration.notBindingFile=Non-prise en compte : fichier de binding "\"{0}\". Il ne s''agit pas d''un fichier de binding jaxws ou jaxb.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_it.properties
deleted file mode 100644
index 772b23fc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_it.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1})
-configuration.notBindingFile=Il file di associazione "\"{0}\" verr\u00E0 ignorato. Non si tratta di un file di associazione jaxws o jaxb.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ja.properties
deleted file mode 100644
index 7eaa981b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ja.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1})
-configuration.notBindingFile=\u7121\u8996\u3057\u307E\u3059: \u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB"\"{0}\"\u3002\u3053\u308C\u306FJAXWS\u307E\u305F\u306FJAXB\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ko.properties
deleted file mode 100644
index e2ce7c47..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ko.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1})
-configuration.notBindingFile=\uBC14\uC778\uB529 \uD30C\uC77C "\"{0}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. JAXWS \uB610\uB294 JAXB \uBC14\uC778\uB529 \uD30C\uC77C\uC774 \uC544\uB2D9\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_pt_BR.properties
deleted file mode 100644
index bddb2c54..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_pt_BR.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1})
-configuration.notBindingFile=Ignorando: arquivo de bind "\"{0}\". N\u00E3o \u00E9 um arquivo bind jaxws ou jaxb.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_CN.properties
deleted file mode 100644
index 8b8847a6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_CN.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1})
-configuration.notBindingFile=\u5FFD\u7565: \u7ED1\u5B9A\u6587\u4EF6 "\"{0}\"\u3002\u8BE5\u6587\u4EF6\u4E0D\u662F jaxws \u6216 jaxb \u7ED1\u5B9A\u6587\u4EF6\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_TW.properties
deleted file mode 100644
index 6d81fb3c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_TW.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1})
-configuration.notBindingFile=\u5FFD\u7565: \u9023\u7D50\u6A94 "\"{0}\". \u8A72\u6A94\u6848\u4E0D\u662F jaxws \u6216 jaxb \u9023\u7D50\u6A94.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator.properties
deleted file mode 100644
index 563530e5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Generator
-# Wrapped into an Exception. {0} - exception message of another exception.
-generator.nestedGeneratorError=generator error: {0}
-# Usage not found. TODO Remove
-#generator.cant.write=can''t write file: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-generator.cannot.create.dir=can''t create directory: {0}
-generator.internal.error.should.not.happen=internal error (should not happen): {0}
-
-
-#IndentingWriter
-generator.indentingwriter.charset.cantencode=WSDL has some characters which native java encoder can''t encode: \"{0}\"
-generator.sei.classAlreadyExist=Could not generate SEI, class: {0} already exists. Rename wsdl:portType \"{1}\" using JAX-WS customization
-generator.service.classAlreadyExist=Could not generate Service, class: {0} already exists. Rename wsdl:Service \"{1}\" using JAX-WS customization
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_de.properties
deleted file mode 100644
index 2b840dcb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_de.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Generator
-# Wrapped into an Exception. {0} - exception message of another exception.
-generator.nestedGeneratorError=Generatorfehler: {0}
-# Usage not found. TODO Remove
-#generator.cant.write=can''t write file: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-generator.cannot.create.dir=Verzeichnis {0} kann nicht erstellt werden
-generator.internal.error.should.not.happen=Interner Fehler (sollte nicht auftreten): {0}
-
-
-#IndentingWriter
-generator.indentingwriter.charset.cantencode=WSDL enth\u00E4lt einige Zeichen, die der native Java Encoder nicht codieren kann: \\"{0}\\"
-generator.sei.classAlreadyExist=SEI konnte nicht generiert werden, Klasse {0} ist bereits vorhanden. Benennen Sie wsdl:portType \\"{1}\\" mit der JAX-WS-Anpassung um
-generator.service.classAlreadyExist=Service konnte nicht generiert werden, Klasse {0} ist bereits vorhanden. Benennen Sie wsdl:Service \\"{1}\\" mit der JAX-WS-Anpassung um
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_es.properties
deleted file mode 100644
index f30a0c96..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_es.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Generator
-# Wrapped into an Exception. {0} - exception message of another exception.
-generator.nestedGeneratorError=error del generador: {0}
-# Usage not found. TODO Remove
-#generator.cant.write=can''t write file: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-generator.cannot.create.dir=No se puede crear el directorio: {0}.
-generator.internal.error.should.not.happen=error interno (no debe ocurrir): {0}
-
-
-#IndentingWriter
-generator.indentingwriter.charset.cantencode=El WSDL posee algunos caracteres que no puede codificar el codificador de java nativo: \\"{0}\\"
-generator.sei.classAlreadyExist=No se ha podido generar la interfaz de punto final de servicio; la clase {0} ya existe. Cambie el nombre de wsdl:portType \\"{1}\\" utilizando la personalizaci\u00F3n JAX-WS
-generator.service.classAlreadyExist=No se ha podido generar el servicio; la clase {0} ya existe. Cambie el nombre de wsdl:Service \\"{1}\\" utilizando la personalizaci\u00F3n JAX-WS
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_fr.properties
deleted file mode 100644
index d2729f9e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_fr.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Generator
-# Wrapped into an Exception. {0} - exception message of another exception.
-generator.nestedGeneratorError=erreur de g\u00E9n\u00E9rateur : {0}
-# Usage not found. TODO Remove
-#generator.cant.write=can''t write file: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-generator.cannot.create.dir=impossible de cr\u00E9er le r\u00E9pertoire : {0}
-generator.internal.error.should.not.happen=erreur interne (inattendue) : {0}
-
-
-#IndentingWriter
-generator.indentingwriter.charset.cantencode=WSDL contient certains caract\u00E8res que l''encodeur Java natif ne peut pas encoder : \"{0}\"
-generator.sei.classAlreadyExist=Impossible de g\u00E9n\u00E9rer l''interface d''adresse de service, la classe {0} existe d\u00E9j\u00E0. Renommez wsdl:portType \"{1}\" \u00E0 l''aide de la personnalisation JAX-WS
-generator.service.classAlreadyExist=Impossible de g\u00E9n\u00E9rer le service, la classe {0} existe d\u00E9j\u00E0. Renommez wsdl:Service \"{1}\" \u00E0 l''aide de la personnalisation JAX-WS
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_it.properties
deleted file mode 100644
index 57336d75..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_it.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Generator
-# Wrapped into an Exception. {0} - exception message of another exception.
-generator.nestedGeneratorError=errore del generatore: {0}
-# Usage not found. TODO Remove
-#generator.cant.write=can''t write file: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-generator.cannot.create.dir=impossibile creare la directory: {0}
-generator.internal.error.should.not.happen=errore interno (non deve verificarsi): {0}
-
-
-#IndentingWriter
-generator.indentingwriter.charset.cantencode=WSDL contiene dei caratteri che il codificatore Java nativo non riesce a codificare: \"{0}\"
-generator.sei.classAlreadyExist=Impossibile generare SEI. La classe: {0} esiste gi\u00E0. Rinominare wsdl:portType \"{1}\" usando la personalizzazione JAX-WS.
-generator.service.classAlreadyExist=Impossibile generare il servizio. La classe: {0} esiste gi\u00E0. Rinominare wsdl:portType \"{1}\" usando la personalizzazione JAX-WS.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ja.properties
deleted file mode 100644
index 60391124..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ja.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Generator
-# Wrapped into an Exception. {0} - exception message of another exception.
-generator.nestedGeneratorError=\u30B8\u30A7\u30CD\u30EC\u30FC\u30BF\u30FB\u30A8\u30E9\u30FC: {0}
-# Usage not found. TODO Remove
-#generator.cant.write=can''t write file: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-generator.cannot.create.dir=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093: {0}
-generator.internal.error.should.not.happen=\u5185\u90E8\u30A8\u30E9\u30FC(\u7981\u6B62\u3055\u308C\u3066\u3044\u307E\u3059): {0}
-
-
-#IndentingWriter
-generator.indentingwriter.charset.cantencode=WSDL\u306B\u306F\u3001\u30CD\u30A4\u30C6\u30A3\u30D6Java\u30A8\u30F3\u30B3\u30FC\u30C0\u3067\u30A8\u30F3\u30B3\u30FC\u30C9\u3067\u304D\u306A\u3044\u6587\u5B57\u304C\u542B\u307E\u308C\u307E\u3059: \"{0}\"
-generator.sei.classAlreadyExist=SEI\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30AF\u30E9\u30B9: {0}\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059\u3002JAX-WS\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u3001wsdl:portType \"{1}\"\u306E\u540D\u524D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044
-generator.service.classAlreadyExist=\u30B5\u30FC\u30D3\u30B9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30AF\u30E9\u30B9: {0}\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059\u3002JAX-WS\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u3001wsdl:Service \"{1}\"\u306E\u540D\u524D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ko.properties
deleted file mode 100644
index 1759924f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ko.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Generator
-# Wrapped into an Exception. {0} - exception message of another exception.
-generator.nestedGeneratorError=\uC0DD\uC131\uAE30 \uC624\uB958: {0}
-# Usage not found. TODO Remove
-#generator.cant.write=can''t write file: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-generator.cannot.create.dir=\uB514\uB809\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: {0}
-generator.internal.error.should.not.happen=\uB0B4\uBD80 \uC624\uB958(\uBC1C\uC0DD\uD558\uBA74 \uC548\uB428): {0}
-
-
-#IndentingWriter
-generator.indentingwriter.charset.cantencode=WSDL\uC5D0 \uACE0\uC720 java \uC778\uCF54\uB354\uAC00 \uC778\uCF54\uB529\uD560 \uC218 \uC5C6\uB294 \uBB38\uC790\uAC00 \uC788\uC74C: \"{0}\"
-generator.sei.classAlreadyExist=SEI\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. {0} \uD074\uB798\uC2A4\uAC00 \uC874\uC7AC\uD569\uB2C8\uB2E4. JAX-WS \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 wsdl:portType \"{1}\"\uC758 \uC774\uB984\uC744 \uBC14\uAFB8\uC2ED\uC2DC\uC624.
-generator.service.classAlreadyExist=\uC11C\uBE44\uC2A4\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. {0} \uD074\uB798\uC2A4\uAC00 \uC874\uC7AC\uD569\uB2C8\uB2E4. JAX-WS \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 wsdl:Service \"{1}\"\uC758 \uC774\uB984\uC744 \uBC14\uAFB8\uC2ED\uC2DC\uC624.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_pt_BR.properties
deleted file mode 100644
index 1e88fbb2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_pt_BR.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Generator
-# Wrapped into an Exception. {0} - exception message of another exception.
-generator.nestedGeneratorError=erro do gerador: {0}
-# Usage not found. TODO Remove
-#generator.cant.write=can''t write file: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-generator.cannot.create.dir=n\u00E3o \u00E9 poss\u00EDvel criar o diret\u00F3rio: {0}
-generator.internal.error.should.not.happen=Erro interno (n\u00E3o deve ocorrer): {0}
-
-
-#IndentingWriter
-generator.indentingwriter.charset.cantencode=O WSDL tem alguns caracteres cujo codificador java nativo n\u00E3o pode codificar: \"{0}\"
-generator.sei.classAlreadyExist=N\u00E3o foi poss\u00EDvel gerar SEI, a classe: {0} j\u00E1 existe. Renomeie wsdl:portType \"{1}\" usando a personaliza\u00E7\u00E3o JAX-WS
-generator.service.classAlreadyExist=N\u00E3o foi poss\u00EDvel gerar o Servi\u00E7o, a classe: {0} j\u00E1 existe. Renomeie o wsdl:Service \"{1}\" usando a personaliza\u00E7\u00E3o JAX-WS
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_CN.properties
deleted file mode 100644
index faaca38f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_CN.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Generator
-# Wrapped into an Exception. {0} - exception message of another exception.
-generator.nestedGeneratorError=\u751F\u6210\u5668\u9519\u8BEF: {0}
-# Usage not found. TODO Remove
-#generator.cant.write=can''t write file: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-generator.cannot.create.dir=\u65E0\u6CD5\u521B\u5EFA\u76EE\u5F55: {0}
-generator.internal.error.should.not.happen=\u5185\u90E8\u9519\u8BEF (\u4E0D\u5E94\u51FA\u73B0): {0}
-
-
-#IndentingWriter
-generator.indentingwriter.charset.cantencode=WSDL \u5305\u542B\u672C\u673A java \u7F16\u7801\u5668\u65E0\u6CD5\u7F16\u7801\u7684\u4E00\u4E9B\u5B57\u7B26: \"{0}\"
-generator.sei.classAlreadyExist=\u65E0\u6CD5\u751F\u6210 SEI, \u7C7B{0}\u5DF2\u5B58\u5728\u3002\u8BF7\u4F7F\u7528 JAX-WS \u5B9A\u5236\u8BBE\u7F6E\u91CD\u547D\u540D wsdl:portType \"{1}\"
-generator.service.classAlreadyExist=\u65E0\u6CD5\u751F\u6210\u670D\u52A1, \u7C7B{0}\u5DF2\u5B58\u5728\u3002\u8BF7\u4F7F\u7528 JAX-WS \u5B9A\u5236\u8BBE\u7F6E\u91CD\u547D\u540D wsdl:Service \"{1}\"
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_TW.properties
deleted file mode 100644
index 780183cb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_TW.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Generator
-# Wrapped into an Exception. {0} - exception message of another exception.
-generator.nestedGeneratorError=\u7522\u751F\u5668\u932F\u8AA4: {0}
-# Usage not found. TODO Remove
-#generator.cant.write=can''t write file: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-generator.cannot.create.dir=\u7121\u6CD5\u5EFA\u7ACB\u76EE\u9304: {0}
-generator.internal.error.should.not.happen=\u5167\u90E8\u932F\u8AA4 (\u4E0D\u61C9\u8A72\u767C\u751F): {0}
-
-
-#IndentingWriter
-generator.indentingwriter.charset.cantencode=\u539F\u751F Java \u7DE8\u78BC\u5668\u7121\u6CD5\u7DE8\u78BC WSDL \u7684\u67D0\u4E9B\u5B57\u5143: \"{0}\"
-generator.sei.classAlreadyExist=\u7121\u6CD5\u7522\u751F SEI, \u985E\u5225: {0} \u5DF2\u5B58\u5728. \u8ACB\u4F7F\u7528 JAX-WS \u81EA\u8A02\u9805\u76EE\u91CD\u65B0\u547D\u540D wsdl:portType \"{1}\"
-generator.service.classAlreadyExist=\u7121\u6CD5\u7522\u751F Service, \u985E\u5225: {0} \u5DF2\u5B58\u5728. \u8ACB\u4F7F\u7528 JAX-WS \u81EA\u8A02\u9805\u76EE\u91CD\u65B0\u547D\u540D wsdl:Service \\"{1}\\"
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler.properties
deleted file mode 100644
index 9ccbdc43..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Generic Messages
-#
-javacompiler.classpath.error={0} is not available in the classpath, requires Sun's JDK version 5.0 or latter.
-javacompiler.nosuchmethod.error=There is no such method {0} available, requires Sun's JDK version 5.0 or latter.
-javacompiler.error=error : {0}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_de.properties
deleted file mode 100644
index 29f8c90e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_de.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Generic Messages
-#
-javacompiler.classpath.error={0} ist im Classpath nicht vorhanden, erfordert Sun JDK Version 5.0 oder h\u00F6her.
-javacompiler.nosuchmethod.error=Es ist keine derartige Methode {0} verf\u00FCgbar, erfordert Sun JDK Version 5.0 oder h\u00F6her.
-javacompiler.error=Fehler: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_es.properties
deleted file mode 100644
index 1c607428..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_es.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Generic Messages
-#
-javacompiler.classpath.error={0} no est\u00E1 disponible en la classpath; se necesita la versi\u00F3n 5.0 o posterior de JDK de Sun.
-javacompiler.nosuchmethod.error=Ese m\u00E9todo {0} no est\u00E1 disponible. Se necesita la versi\u00F3n 5.0 o posterior de JDK de Sun.
-javacompiler.error=error: {0}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_fr.properties
deleted file mode 100644
index 1f12bb58..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_fr.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Generic Messages
-#
-javacompiler.classpath.error={0} n''est pas disponible dans le classpath, il exige Sun JDK version 5.0 ou sup\u00E9rieure.
-javacompiler.nosuchmethod.error=Aucune m\u00E9thode de type {0} n''est disponible, exige Sun JDK version 5.0 ou sup\u00E9rieure.
-javacompiler.error=erreur : {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_it.properties
deleted file mode 100644
index 2e650467..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_it.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Generic Messages
-#
-javacompiler.classpath.error={0} non \u00E8 disponibile nel classpath. \u00C8 richiesta la versione 5.0 o successiva di JDK Sun.
-javacompiler.nosuchmethod.error=Nessun metodo {0} disponibile. \u00C8 richiesta la versione 5.0 o successiva di JDK Sun.
-javacompiler.error=errore: {0}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ja.properties
deleted file mode 100644
index ad411dcc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ja.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Generic Messages
-#
-javacompiler.classpath.error=\u30AF\u30E9\u30B9\u30D1\u30B9\u3067{0}\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002Sun\u306EJDK\u30D0\u30FC\u30B8\u30E7\u30F35.0\u4EE5\u4E0A\u304C\u5FC5\u8981\u3067\u3059\u3002
-javacompiler.nosuchmethod.error=\u3053\u3046\u3057\u305F\u30E1\u30BD\u30C3\u30C9{0}\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002Sun\u306EJDK\u30D0\u30FC\u30B8\u30E7\u30F35.0\u4EE5\u4E0A\u304C\u5FC5\u8981\u3067\u3059\u3002
-javacompiler.error=\u30A8\u30E9\u30FC: {0}\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ko.properties
deleted file mode 100644
index fbd2e625..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ko.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Generic Messages
-#
-javacompiler.classpath.error={0}\uC744(\uB97C) \uD074\uB798\uC2A4 \uACBD\uB85C\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. Sun\uC758 JDK 5.0 \uB610\uB294 \uC774\uD6C4 \uBC84\uC804\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-javacompiler.nosuchmethod.error=\uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uD574\uB2F9 \uBA54\uC18C\uB4DC {0}\uC774(\uAC00) \uC5C6\uC2B5\uB2C8\uB2E4. Sun\uC758 JDK 5.0 \uB610\uB294 \uC774\uD6C4 \uBC84\uC804\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-javacompiler.error=\uC624\uB958: {0}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_pt_BR.properties
deleted file mode 100644
index 3bdee78a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_pt_BR.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Generic Messages
-#
-javacompiler.classpath.error={0} n\u00E3o est\u00E1 dispon\u00EDvel no classpath, requer a vers\u00E3o 5.0 ou posterior de JDK da Sun.
-javacompiler.nosuchmethod.error=N\u00E3o h\u00E1 m\u00E9todo {0} dispon\u00EDvel, requer a vers\u00E3o 5.0 ou posterior de JDK da Sun.
-javacompiler.error=erro : {0}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_CN.properties
deleted file mode 100644
index c839e874..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_CN.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Generic Messages
-#
-javacompiler.classpath.error={0}\u5728\u7C7B\u8DEF\u5F84\u4E2D\u4E0D\u53EF\u7528, \u9700\u8981 Sun \u7684 JDK \u7248\u672C 5.0 \u6216\u66F4\u9AD8\u7248\u672C\u3002
-javacompiler.nosuchmethod.error=\u8FD9\u79CD\u65B9\u6CD5{0}\u4E0D\u53EF\u7528, \u9700\u8981 Sun \u7684 JDK \u7248\u672C 5.0 \u6216\u66F4\u9AD8\u7248\u672C\u3002
-javacompiler.error=\u9519\u8BEF: {0}\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_TW.properties
deleted file mode 100644
index 74c73482..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_TW.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Generic Messages
-#
-javacompiler.classpath.error=\u985E\u5225\u8DEF\u5F91\u4E2D\u7121\u6CD5\u4F7F\u7528 {0}, \u9700\u8981 Sun \u7684 JDK \u7248\u672C 5.0 \u6216\u66F4\u65B0\u7248\u672C.
-javacompiler.nosuchmethod.error=\u6B64\u65B9\u6CD5 {0} \u7121\u6CD5\u4F7F\u7528, \u9700\u8981 Sun \u7684 JDK \u7248\u672C 5.0 \u6216\u66F4\u65B0\u7248\u672C.
-javacompiler.error=\u932F\u8AA4 : {0}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model.properties
deleted file mode 100644
index 729b6270..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model.properties
+++ /dev/null
@@ -1,112 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-model.nestedModelError=model error: {0}
-# Usage not found. TODO Remove
-#model.duplicate.porttype=duplicate PortType added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.operation=duplicate Operation added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.faultmessage=duplicate fault message added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.part=duplicate part added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.property=duplicate property added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.service=duplicate service added to model: {0}
-model.invalid.message.type=invalid message type: {0}
-
-model.schema.notImplemented=unsupported XML Schema feature ({0})
-model.schema.circularity=circularity detected in schema: \"{0}\"
-
-model.schema.unsupportedType=unsupported type ({0}): \"{1}\" (namespace: {2})
-# Usage not found. TODO Remove
-#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0})
-# Usage not found. TODO Remove
-#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2})
-model.schema.invalidLiteralInEnumeration.anonymous=invalid literal \"{0}\" in anonymous enumeration
-
-# Usage not found. TODO Remove
-#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement
-
-//replacement for Uxxx codes
-# Usage not found. TODO Remove
-#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType=invalid simpleType: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\"
-model.schema.simpleTypeWithFacets=facet \"{0}\" not supported on simple type: \"{0}\"
-model.schema.unionNotSupported=simpleType: \"{0}\" derivation by xsd:union not supported
-model.schema.listNotSupported=simpleType: \"{0}\" derivation by xsd:list not supported
-model.schema.invalidSimpleType.invalidItemType=in simpleType: \"{0}\", itemType \"{1}\" can not be derived by list
-model.schema.invalidSimpleType.noItemLiteralType=in simpleType: \"{0}\", xsd:list itemType \"{1}\" is invalid
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI
-# Usage not found. TODO Remove
-#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\"
-model.schema.invalidWildcard.allCompositor=xsd:all compositor not supported for the wildcard in schema type: \"{0}\"
-
-model.uniqueness=uniqueness constraint violation
-model.part.notUnique=parts in wsdl:message \"{0}\", reference \"{1}\", they must reference unique global elements.
-model.exception.notunique=Failed to generate Java signature: duplicate exception names {0}. Use JAXWS binding customization to rename the wsdl:part \"{1}\"
-model.uniqueness.javastructuretype=uniqueness constraint violation, duplicate member \"{0}\" added to JavaStructureType \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-model.parent.type.already.set=parent of type \"{0}\" already set to \"{1}\", new value = \"{2}\"
-# Usage not found. TODO Remove
-#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\"
-model.exporter.unsupportedClass=model exporter: unsupported class: {0}
-# Usage not found. TODO Remove
-#model.importer.nonModel=not a valid model document
-# Usage not found. TODO Remove
-#model.importer.syntaxError=syntax error in model document (line {0})
-model.importer.invalidVersion=invalid version \"{1}\" in model document (line {0})
-model.importer.invalidMinorMinorOrPatchVersion=model version \"{1}\" newer than runtime version \"{2}\" (line {0}): need to upgrade to a newer runtime
-model.importer.invalidClass=invalid class name \"{1}\" in model document (line {0})
-model.importer.invalidId=invalid id \"{1}\ in model document (line {0})
-# Usage not found. TODO Remove
-#model.importer.invalidLiteral=invalid literal value in model document (line {0})
-# Usage not found. TODO Remove
-#model.importer.invalidProperty=invalid property in model document (line {0})
-model.arraywrapper.only.one.member=LiteralArrayWrapper may only have one element member.
-model.arraywrapper.member.already.set=LiteralArrayWrapper element member already set.
-model.arraywrapper.no.parent=LiteralArrayWrapper cannot have a parent type
-model.arraywrapper.no.subtypes=LiteralArrayWrapper cannot have subtypes
-model.arraywrapper.no.content.member=LiteralArrayWrapper cannot have a content member
-model.complexType.simpleContent.reservedName=invalid attribute name: "_value" in complexType: \"{0}\", _value is JAXWS reserved name, this name is generated in the generated javabean class to hold content value in the generated javabean class for complexType/simpleContent.
-model.parameter.notunique.wrapper=Failed to generate Java signature: duplicate parameter name \"{0}\". Try one of these\n\t1. Use JAXWS binding customization to rename the wsdl:part \"{1}\"\n\t2. Run wsimport with -extension switch.\n\t3. This is wrapper style operation, to resolve parameter name conflict, you can also try disabling wrapper style by using <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle> wsdl customization.
-model.parameter.notunique=Failed to generate Java signature: duplicate parameter name \"{0}\". Try one of these\n\t1. Use JAXWS binding customization to rename the wsdl:part \"{1}\"\n\t2. Run wsimport with -extension switch.
-
-#JAXWS 2.0
-model.schema.elementNotFound=Element \"{0}\" not found.
-model.schema.jaxbException.message="{0}"
-model.saxparser.exception:{0}\n{1}
-
-ConsoleErrorReporter.UnknownLocation = \
- unknown location
-
-ConsoleErrorReporter.LineXOfY = \
- \ \ line {0} of {1}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_de.properties
deleted file mode 100644
index 0b30444e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_de.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-model.nestedModelError=Modellfehler: {0}
-# Usage not found. TODO Remove
-#model.duplicate.porttype=duplicate PortType added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.operation=duplicate Operation added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.faultmessage=duplicate fault message added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.part=duplicate part added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.property=duplicate property added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.service=duplicate service added to model: {0}
-model.invalid.message.type=Ung\u00FCltiger Meldungstyp: {0}
-
-model.schema.notImplemented=Nicht unterst\u00FCtztes XML-Schema-Feature ({0})
-model.schema.circularity=Zirkularit\u00E4t in Schema ermittelt: \\"{0}\\"
-
-model.schema.unsupportedType=nicht unterst\u00FCtzter Typ ({0}): \\"{1}\\" (Namespace: {2})
-# Usage not found. TODO Remove
-#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0})
-# Usage not found. TODO Remove
-#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2})
-model.schema.invalidLiteralInEnumeration.anonymous=ung\u00FCltiges Literal \\"{0}\\" in anonymer Enumeration
-
-# Usage not found. TODO Remove
-#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement
-
-//replacement for Uxxx codes
-# Usage not found. TODO Remove
-#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType=invalid simpleType: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\"
-model.schema.simpleTypeWithFacets=Facet \\"{0}\\" bei einfachem Typ nicht unterst\u00FCtzt: \\"{0}\\"
-model.schema.unionNotSupported=simpleType: \\"{0}\\" Ableitung durch xsd:union nicht unterst\u00FCtzt
-model.schema.listNotSupported=simpleType: \\"{0}\\" Ableitung durch xsd:list nicht unterst\u00FCtzt
-model.schema.invalidSimpleType.invalidItemType=in simpleType: \\"{0}\\", kann itemType \\"{1}\\" nicht durch Liste abgeleitet werden
-model.schema.invalidSimpleType.noItemLiteralType=in simpleType: \"{0}\", ist xsd:list itemType \"{1}\" ung\u00FCltig
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI
-# Usage not found. TODO Remove
-#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\"
-model.schema.invalidWildcard.allCompositor=xsd:all-Gestaltung f\u00FCr den Platzhalter in Schematyp nicht unterst\u00FCtzt: \\"{0}\\"
-
-model.uniqueness=Verletzung des UNIQUE Constraints
-model.part.notUnique=Teile in wsdl:message \\"{0}\\", referenzieren \\"{1}\\", sie m\u00FCssen eindeutige globale Elemente referenzieren.
-model.exception.notunique=Java-Signatur konnte nicht generiert werden: Doppelte Ausnahmenamen {0}. Verwenden Sie JAXWS-Binding-Anpassung, um wsdl:part \\"{1}\\" umzubenennen
-model.uniqueness.javastructuretype=Verletzung des UNIQUE Constraints, doppeltes Member \\"{0}\\" wurde JavaStructureType \\"{1}\\" hinzugef\u00FCgt
-# Wrapped into an Exception. Not concatenated with any other string.
-model.parent.type.already.set=\u00DCbergeordnetes Objekt von Typ \"{0}\" ist bereits auf \"{1}\" festgelegt. Neuer Wert = \"{2}\"
-# Usage not found. TODO Remove
-#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\"
-model.exporter.unsupportedClass=Modell-Exporter: Nicht unterst\u00FCtzte Klasse: {0}
-# Usage not found. TODO Remove
-#model.importer.nonModel=not a valid model document
-# Usage not found. TODO Remove
-#model.importer.syntaxError=syntax error in model document (line {0})
-model.importer.invalidVersion=ung\u00FCltige Version \"{1}\" in Modelldokument (Zeile {0})
-model.importer.invalidMinorMinorOrPatchVersion=Modellversion \"{1}\" neuer als Laufzeitversion \"{2}\" (Zeile {0}): Upgrade auf neuere Laufzeitumgebung ist erforderlich
-model.importer.invalidClass=ung\u00FCltiger Klassenname \"{1}\" in Modelldokument (Zeile {0})
-model.importer.invalidId=ung\u00FCltige ID \"{1} in Modelldokument (Zeile {0})
-# Usage not found. TODO Remove
-#model.importer.invalidLiteral=invalid literal value in model document (line {0})
-# Usage not found. TODO Remove
-#model.importer.invalidProperty=invalid property in model document (line {0})
-model.arraywrapper.only.one.member=LiteralArrayWrapper darf nur ein Element-Member haben.
-model.arraywrapper.member.already.set=LiteralArrayWrapper-Element-Member ist bereits festgelegt.
-model.arraywrapper.no.parent=LiteralArrayWrapper darf keinen \u00FCbergeordneten Typ haben
-model.arraywrapper.no.subtypes=LiteralArrayWrapper darf keine untergeordneten Typen haben
-model.arraywrapper.no.content.member=LiteralArrayWrapper darf kein Inhalts-Member haben
-model.complexType.simpleContent.reservedName=ung\u00FCltiger Attributname: "_value" in complexType: \\"{0}\\", _value ist reservierter JAXWS-Name, dieser Name wird in der generierten Javabean-Klasse zur Aufnahme des Contentwertes in der generierten Javabean-Klasse f\u00FCr complexType/simpleContent generiert.
-model.parameter.notunique.wrapper=Java-Signatur konnte nicht generiert werden: doppelter Parametername \\"{0}\\". Versuchen Sie eine der folgenden L\u00F6sungen\n\t1. Verwenden Sie die JAXWS-Binding-Anpassung, um wsdl:part \\"{1}\\" umzubenennen.\n\t2. F\u00FChren Sie wsimport mit dem Switch "-extension" aus.\n\t3. Dies ist ein Wrapper-Vorgang; um den Parameternamenskonflikt zu l\u00F6sen, k\u00F6nnen Sie auch versuchen, den Wrapper-Vorgang mit der WSDL-Anpassung <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle> zu deaktivieren.
-model.parameter.notunique=Java-Signatur konnte nicht generiert werden: doppelter Parametername \\"{0}\\". Versuchen Sie eine der folgenden L\u00F6sungen\n\t1. Verwenden Sie JAXWS-Binding-Anpassung, um wsdl:part \\"{1}\\" umzubenennen\n\t2. F\u00FChren Sie wsimport mit dem Switch "-extension" aus.
-
-#JAXWS 2.0
-model.schema.elementNotFound=Element \"{0}\" wurde nicht gefunden.
-model.schema.jaxbException.message="{0}"
-model.saxparser.exception:{0}\n{1}
-
-ConsoleErrorReporter.UnknownLocation = unbekanntes Verzeichnis
-
-ConsoleErrorReporter.LineXOfY = \ \ Zeile {0} von {1}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_es.properties
deleted file mode 100644
index 56b6a2f8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_es.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-model.nestedModelError=error de modelo: {0}
-# Usage not found. TODO Remove
-#model.duplicate.porttype=duplicate PortType added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.operation=duplicate Operation added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.faultmessage=duplicate fault message added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.part=duplicate part added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.property=duplicate property added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.service=duplicate service added to model: {0}
-model.invalid.message.type=tipo de mensaje no v\u00E1lido: {0}
-
-model.schema.notImplemented=funci\u00F3n de esquema XML no soportada ({0})
-model.schema.circularity=se ha detectado una circularidad en el esquema: \\"{0}\\"
-
-model.schema.unsupportedType=tipo no soportado ({0}): \"{1}\" (espacio de nombres: {2})
-# Usage not found. TODO Remove
-#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0})
-# Usage not found. TODO Remove
-#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2})
-model.schema.invalidLiteralInEnumeration.anonymous=literal no v\u00E1lido \\"{0}\\" en la enumeraci\u00F3n an\u00F3nima
-
-# Usage not found. TODO Remove
-#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement
-
-//replacement for Uxxx codes
-# Usage not found. TODO Remove
-#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType=invalid simpleType: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\"
-model.schema.simpleTypeWithFacets=la faceta \"{0}\" no est\u00E1 soportada en un tipo simple: \"{0}\"
-model.schema.unionNotSupported=simpleType: \\"{0}\\" la derivaci\u00F3n por xsd:union no est\u00E1 soportada
-model.schema.listNotSupported=simpleType: \\"{0}\\" la derivaci\u00F3n por xsd:list no est\u00E1 soportada
-model.schema.invalidSimpleType.invalidItemType=en simpleType: \\"{0}\\", itemType \\"{1}\\" no se puede derivar por lista
-model.schema.invalidSimpleType.noItemLiteralType=en simpleType: \"{0}\", xsd:list itemType \"{1}\" no es v\u00E1lido
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI
-# Usage not found. TODO Remove
-#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\"
-model.schema.invalidWildcard.allCompositor=el compositor xsd:all no est\u00E1 soportado para el comod\u00EDn en el tipo de esquema: \\"{0}\\"
-
-model.uniqueness=violaci\u00F3n de la restricci\u00F3n de unicidad
-model.part.notUnique=partes de wsdl:message \\"{0}\\", referencia \\"{1}\\", deben hacer referencia a elementos globales \u00FAnicos.
-model.exception.notunique=Fallo al generar la firma de Java: nombres de excepci\u00F3n duplicados {0}. Utilice la personalizaci\u00F3n de enlaces JAX-WS para cambiar el nombre de wsdl:part \\"{1}\\"
-model.uniqueness.javastructuretype=violaci\u00F3n de la restricci\u00F3n de unicidad; se ha agregado un miembro duplicado \\"{0}\\" a JavaStructureType \\"{1}\\"
-# Wrapped into an Exception. Not concatenated with any other string.
-model.parent.type.already.set=El principal del tipo \"{0}\" ya se ha definido en \"{1}\", nuevo valor = \"{2}\".
-# Usage not found. TODO Remove
-#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\"
-model.exporter.unsupportedClass=exportador de modelo: clase no soportada: {0}
-# Usage not found. TODO Remove
-#model.importer.nonModel=not a valid model document
-# Usage not found. TODO Remove
-#model.importer.syntaxError=syntax error in model document (line {0})
-model.importer.invalidVersion=versi\u00F3n no v\u00E1lida \"{1}\" en el documento del modelo (l\u00EDnea {0})
-model.importer.invalidMinorMinorOrPatchVersion=la versi\u00F3n del modelo \\"{1}\\" es m\u00E1s reciente que la versi\u00F3n en tiempo de ejecuci\u00F3n \\"{2}\\" (l\u00EDnea {0}): hay que actualizarla a un tiempo de ejecuci\u00F3n m\u00E1s reciente
-model.importer.invalidClass=nombre de clase no v\u00E1lido \"{1}\" en el documento del modelo (l\u00EDnea {0})
-model.importer.invalidId=Identificador no v\u00E1lido \\"{1}\\" en el documento del modelo (l\u00EDnea {0})
-# Usage not found. TODO Remove
-#model.importer.invalidLiteral=invalid literal value in model document (line {0})
-# Usage not found. TODO Remove
-#model.importer.invalidProperty=invalid property in model document (line {0})
-model.arraywrapper.only.one.member=LiteralArrayWrapper s\u00F3lo puede tener un miembro de elemento.
-model.arraywrapper.member.already.set=El miembro del elemento LiteralArrayWrapper ya est\u00E1 definido.
-model.arraywrapper.no.parent=LiteralArrayWrapper no puede tener un tipo principal
-model.arraywrapper.no.subtypes=LiteralArrayWrapper no puede tener subtipos
-model.arraywrapper.no.content.member=LiteralArrayWrapper no puede tener un miembro de contenido
-model.complexType.simpleContent.reservedName=nombre de atributo no v\u00E1lido: "_value" en complexType: \\"{0}\\", _value es un nombre reservado de JAX-WS; este nombre se genera en la clase javabean generada para incluir el valor de contenido en la clase javabean generada para complexType/simpleContent.
-model.parameter.notunique.wrapper=Fallo al generar la firma de Java: nombre de par\u00E1metro duplicado \\"{0}\\". Intente una de las siguientes acciones\n\t1. Utilice la personalizaci\u00F3n de enlace JAX-WS para cambiar el nombre de wsdl:part \\"{1}\\"\n\t2. Ejecute wsimport con el conmutador -extension.\n\t3. Esta operaci\u00F3n es de estilo de envoltorio. Para resolver el conflicto de nombres de par\u00E1metros, intente tambi\u00E9n desactivar el estilo de envoltorio utilizando la personalizaci\u00F3n wsdl <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>.
-model.parameter.notunique=Fallo al generar la firma de Java: nombre de par\u00E1metro duplicado \\"{0}\\". Intente realizar una de las siguientes acciones\n\t1. Utilice la personalizaci\u00F3n de enlace JAX-WS para cambiar el nombre de wsdl:part \\"{1}\\"\n\t2. Ejecute wsimport con el conmutador -extension.
-
-#JAXWS 2.0
-model.schema.elementNotFound=No se ha encontrado el elemento \"{0}\".
-model.schema.jaxbException.message="{0}"
-model.saxparser.exception:{0}\n{1}
-
-ConsoleErrorReporter.UnknownLocation = ubicaci\u00F3n desconocida
-
-ConsoleErrorReporter.LineXOfY = \ \ l\u00EDnea {0} de {1}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_fr.properties
deleted file mode 100644
index 1efe6c0f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_fr.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-model.nestedModelError=erreur de mod\u00E8le : {0}
-# Usage not found. TODO Remove
-#model.duplicate.porttype=duplicate PortType added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.operation=duplicate Operation added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.faultmessage=duplicate fault message added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.part=duplicate part added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.property=duplicate property added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.service=duplicate service added to model: {0}
-model.invalid.message.type=type de message non valide : {0}
-
-model.schema.notImplemented=fonction XML Schema ({0}) non prise en charge
-model.schema.circularity=circularit\u00E9 d\u00E9tect\u00E9e dans le sch\u00E9ma : \"{0}\"
-
-model.schema.unsupportedType=type non pris en charge ({0}) : \"{1}\" (espace de noms : {2})
-# Usage not found. TODO Remove
-#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0})
-# Usage not found. TODO Remove
-#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2})
-model.schema.invalidLiteralInEnumeration.anonymous=litt\u00E9ral non valide \"{0}\" dans l''\u00E9num\u00E9ration anonyme
-
-# Usage not found. TODO Remove
-#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement
-
-//replacement for Uxxx codes
-# Usage not found. TODO Remove
-#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType=invalid simpleType: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\"
-model.schema.simpleTypeWithFacets=facet \"{0}\" non pris en charge sur le type simple : \"{0}\"
-model.schema.unionNotSupported=simpleType : \"{0}\" d\u00E9rivation par xsd:union non prise en charge
-model.schema.listNotSupported=simpleType : \"{0}\" d\u00E9rivation par xsd:list non prise en charge
-model.schema.invalidSimpleType.invalidItemType=dans simpleType : \"{0}\", l''\u00E9l\u00E9ment itemType \"{1}\" ne peut pas \u00EAtre d\u00E9riv\u00E9 par liste
-model.schema.invalidSimpleType.noItemLiteralType=dans simpleType : \"{0}\", l''\u00E9l\u00E9ment xsd:list itemType \"{1}\" n''est pas valide
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI
-# Usage not found. TODO Remove
-#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\"
-model.schema.invalidWildcard.allCompositor=compositeur xsd:all non pris en charge pour le caract\u00E8re g\u00E9n\u00E9rique dans le type de sch\u00E9ma : \"{0}\"
-
-model.uniqueness=violation de contrainte d'unicit\u00E9
-model.part.notUnique=les parties dans wsdl:message \"{0}\", r\u00E9f\u00E9rence \"{1}\", doivent r\u00E9f\u00E9rencer des \u00E9l\u00E9ments globaux uniques.
-model.exception.notunique=Echec de la g\u00E9n\u00E9ration de la signature Java : noms d''exception {0} en double. Utilisez la personnalisation de binding JAXWS pour renommer l''\u00E9l\u00E9ment wsdl:part \"{1}\"
-model.uniqueness.javastructuretype=violation de la contrainte d''unicit\u00E9, membre \"{0}\" en double ajout\u00E9 \u00E0 JavaStructureType \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-model.parent.type.already.set=le parent de type \"{0}\" a d\u00E9j\u00E0 la valeur \"{1}\" ; nouvelle valeur = \"{2}\"
-# Usage not found. TODO Remove
-#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\"
-model.exporter.unsupportedClass=programme d''export de mod\u00E8le : classe non prise en charge : {0}
-# Usage not found. TODO Remove
-#model.importer.nonModel=not a valid model document
-# Usage not found. TODO Remove
-#model.importer.syntaxError=syntax error in model document (line {0})
-model.importer.invalidVersion=version \"{1}\" non valide dans le document de mod\u00E8le (ligne {0})
-model.importer.invalidMinorMinorOrPatchVersion=version de mod\u00E8le \"{1}\" plus r\u00E9cente que la version d''ex\u00E9cution \"{2}\" (ligne {0}) : vous devez mettre \u00E0 jour vers une version d''ex\u00E9cution plus r\u00E9cente
-model.importer.invalidClass=nom de classe \"{1}\" non valide dans le document de mod\u00E8le (ligne {0})
-model.importer.invalidId=ID \"{1}\ non valide dans le document de mod\u00E8le (ligne {0})
-# Usage not found. TODO Remove
-#model.importer.invalidLiteral=invalid literal value in model document (line {0})
-# Usage not found. TODO Remove
-#model.importer.invalidProperty=invalid property in model document (line {0})
-model.arraywrapper.only.one.member=LiteralArrayWrapper ne peut avoir qu'un membre d'\u00E9l\u00E9ment.
-model.arraywrapper.member.already.set=Le membre de l'\u00E9l\u00E9ment LiteralArrayWrapper existe d\u00E9j\u00E0.
-model.arraywrapper.no.parent=LiteralArrayWrapper ne peut pas avoir de type parent
-model.arraywrapper.no.subtypes=LiteralArrayWrapper ne peut pas avoir de sous-types
-model.arraywrapper.no.content.member=LiteralArrayWrapper ne peut pas avoir de membre de contenu
-model.complexType.simpleContent.reservedName=nom d''attribut non valide : "_value" dans complexType : \"{0}\", _value est un nom r\u00E9serv\u00E9 JAXWS, ce nom est g\u00E9n\u00E9r\u00E9 dans la classe JavaBean g\u00E9n\u00E9r\u00E9e pour contenir la valeur de contenu dans la classe JavaBean g\u00E9n\u00E9r\u00E9e pour complexType/simpleContent.
-model.parameter.notunique.wrapper=Echec de la g\u00E9n\u00E9ration de la signature Java : nom de param\u00E8tre en double \"{0}\". Essayez l''une de ces solutions :\n\t1. Utilisez la personnalisation de binding JAXWS pour renommer l''\u00E9l\u00E9ment wsdl:part \"{1}\".\n\t2. Ex\u00E9cutez wsimport avec le commutateur -extension.\n\t3. Il s''agit d''une op\u00E9ration de style wrapper ; pour r\u00E9soudre le conflit de nom de param\u00E8tre, vous pouvez \u00E9galement essayer de d\u00E9sactiver le style wrapper \u00E0 l''aide de la personnalisation WSDL <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>.
-model.parameter.notunique=Echec de la g\u00E9n\u00E9ration de la signature Java : nom de param\u00E8tre en double \"{0}\". Essayez l''une de ces solutions :\n\t1. Utilisez la personnalisation de binding JAXWS pour renommer l''\u00E9l\u00E9ment wsdl:part \"{1}\".\n\t2. Ex\u00E9cutez wsimport avec le commutateur -extension.
-
-#JAXWS 2.0
-model.schema.elementNotFound=El\u00E9ment \"{0}\" introuvable.
-model.schema.jaxbException.message="{0}"
-model.saxparser.exception:{0}\n{1}
-
-ConsoleErrorReporter.UnknownLocation = emplacement inconnu
-
-ConsoleErrorReporter.LineXOfY = \ \ ligne {0} sur {1}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_it.properties
deleted file mode 100644
index c278fe07..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_it.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-model.nestedModelError=errore del modello: {0}
-# Usage not found. TODO Remove
-#model.duplicate.porttype=duplicate PortType added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.operation=duplicate Operation added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.faultmessage=duplicate fault message added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.part=duplicate part added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.property=duplicate property added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.service=duplicate service added to model: {0}
-model.invalid.message.type=tipo di messaggio non valido: {0}
-
-model.schema.notImplemented=funzione di schema XML ({0}) non supportata
-model.schema.circularity=circolarit\u00E0 rilevata nello schema: \"{0}\"
-
-model.schema.unsupportedType=tipo non supportato ({0}): \"{1}\" (spazio di nomi: {2})
-# Usage not found. TODO Remove
-#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0})
-# Usage not found. TODO Remove
-#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2})
-model.schema.invalidLiteralInEnumeration.anonymous=valore non valido \"{0}\" nell''enumerazione anonima
-
-# Usage not found. TODO Remove
-#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement
-
-//replacement for Uxxx codes
-# Usage not found. TODO Remove
-#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType=invalid simpleType: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\"
-model.schema.simpleTypeWithFacets=facet \"{0}\" non supportato sul tipo semplice: \"{0}\"
-model.schema.unionNotSupported=simpleType: derivazione \"{0}\" mediante xsd:union non supportata
-model.schema.listNotSupported=simpleType: derivazione \"{0}\" mediante xsd:list non supportata
-model.schema.invalidSimpleType.invalidItemType=in simpleType: \"{0}\", impossibile derivare itemType \"{1}\" mediante lista
-model.schema.invalidSimpleType.noItemLiteralType=in simpleType: \"{0}\", xsd:list itemType \"{1}\" non valido
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI
-# Usage not found. TODO Remove
-#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\"
-model.schema.invalidWildcard.allCompositor=compositore xsd:all non supportato per il carattere jolly nel tipo di schema: \"{0}\"
-
-model.uniqueness=Violazione del vincolo di univocit\u00E0
-model.part.notUnique=parti di wsdl:message \"{0}\", riferimento \"{1}\", devono fare riferimento a elementi globali univoci.
-model.exception.notunique=Generazione della firma Java non riuscita: nomi di eccezioni duplicati {0}. Usare la personalizzazione dell''associazione JAXWS per rinominare wsdl:part \"{1}\"
-model.uniqueness.javastructuretype=violazione del vincolo di univocit\u00E0, membro duplicato \"{0}\" aggiunto a JavaStructureType \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-model.parent.type.already.set=elemento padre del tipo \"{0}\" gi\u00E0 impostato su \"{1}\"; nuovo valore = \"{2}\"
-# Usage not found. TODO Remove
-#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\"
-model.exporter.unsupportedClass=strumento di esportazione del modello: classe non supportata: {0}
-# Usage not found. TODO Remove
-#model.importer.nonModel=not a valid model document
-# Usage not found. TODO Remove
-#model.importer.syntaxError=syntax error in model document (line {0})
-model.importer.invalidVersion=versione non valida \"{1}\" nel documento del modello (riga {0})
-model.importer.invalidMinorMinorOrPatchVersion=la versione del modello \"{1}\" \u00E8 pi\u00F9 recente della versione di runtime \"{2}\" (riga {0}): \u00E8 necessario eseguire l''aggiornamento a un runtime pi\u00F9 recente
-model.importer.invalidClass=nome di classe non valido \"{1}\" nel documento del modello (riga {0})
-model.importer.invalidId=ID non valido \"{1}\" nel documento del modello (riga {0})
-# Usage not found. TODO Remove
-#model.importer.invalidLiteral=invalid literal value in model document (line {0})
-# Usage not found. TODO Remove
-#model.importer.invalidProperty=invalid property in model document (line {0})
-model.arraywrapper.only.one.member=LiteralArrayWrapper pu\u00F2 avere solo un membro di elemento.
-model.arraywrapper.member.already.set=membro dell'elemento LiteralArrayWrapper gi\u00E0 impostato.
-model.arraywrapper.no.parent=LiteralArrayWrapper non pu\u00F2 avere un tipo padre
-model.arraywrapper.no.subtypes=LiteralArrayWrapper non pu\u00F2 avere sottotipi
-model.arraywrapper.no.content.member=LiteralArrayWrapper non pu\u00F2 avere un membro di contenuto
-model.complexType.simpleContent.reservedName=nome attributo non valido: "_value" in complexType: \"{0}\", _value \u00E8 un nome riservato JAXWS. Questo nome viene generato nella classe javabean generata per contenere il valore del contenuto per complexType/simpleContent.
-model.parameter.notunique.wrapper=Generazione della firma Java non riuscita: nome di parametro duplicato \"{0}\". Tentare una delle seguenti operazioni:\n\t1. Usare la personalizzazione dell''associazione JAXWS per rinominare wsdl:part \"{1}\"\n\t2. Eseguire wsimport con il parametro -extension.\n\t3. Poich\u00E9 questa \u00E8 un''operazione con stile wrapper, per risolvere il conflitto del nome del parametro, \u00E8 anche possibile provare a disabilitare lo stile wrapper usando la personalizzazione WSDL <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>.
-model.parameter.notunique=Generazione della firma Java non riuscita: nome di parametro duplicato \"{0}\". Tentare una delle seguenti operazioni:\n\t1. Usare la personalizzazione dell''associazione JAXWS per rinominare wsdl:part \"{1}\"\n\t2. Eseguire wsimport con il parametro -extension.
-
-#JAXWS 2.0
-model.schema.elementNotFound=Elemento \"{0}\" non trovato.
-model.schema.jaxbException.message="{0}"
-model.saxparser.exception:{0}\n{1}
-
-ConsoleErrorReporter.UnknownLocation = posizione sconosciuta
-
-ConsoleErrorReporter.LineXOfY = \ \ riga {0} di {1}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ja.properties
deleted file mode 100644
index 5d334070..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ja.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-model.nestedModelError=\u30E2\u30C7\u30EB\u30FB\u30A8\u30E9\u30FC: {0}
-# Usage not found. TODO Remove
-#model.duplicate.porttype=duplicate PortType added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.operation=duplicate Operation added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.faultmessage=duplicate fault message added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.part=duplicate part added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.property=duplicate property added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.service=duplicate service added to model: {0}
-model.invalid.message.type=\u7121\u52B9\u306A\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30BF\u30A4\u30D7: {0}
-
-model.schema.notImplemented=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044XML\u30B9\u30AD\u30FC\u30DE\u6A5F\u80FD({0})
-model.schema.circularity=\u30B9\u30AD\u30FC\u30DE: \"{0}\"\u306B\u5FAA\u74B0\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F
-
-model.schema.unsupportedType=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30BF\u30A4\u30D7({0}): \"{1}\" (\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9: {2})
-# Usage not found. TODO Remove
-#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0})
-# Usage not found. TODO Remove
-#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2})
-model.schema.invalidLiteralInEnumeration.anonymous=\u533F\u540D\u5217\u6319\u306E\u30EA\u30C6\u30E9\u30EB\"{0}\"\u304C\u7121\u52B9\u3067\u3059
-
-# Usage not found. TODO Remove
-#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement
-
-//replacement for Uxxx codes
-# Usage not found. TODO Remove
-#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType=invalid simpleType: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\"
-model.schema.simpleTypeWithFacets=\u30D5\u30A1\u30BB\u30C3\u30C8\"{0}\"\u306F\u5358\u7D14\u578B: \"{0}\"\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-model.schema.unionNotSupported=xsd:union\u306B\u3088\u308BsimpleType: \"{0}\"\u306E\u5C0E\u51FA\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-model.schema.listNotSupported=xsd:list\u306B\u3088\u308BsimpleType: \"{0}\"\u306E\u5C0E\u51FA\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-model.schema.invalidSimpleType.invalidItemType=simpleType: \"{0}\"\u3067\u3001itemType \"{1}\"\u3092\u30EA\u30B9\u30C8\u306B\u3088\u308A\u5C0E\u51FA\u3067\u304D\u307E\u305B\u3093
-model.schema.invalidSimpleType.noItemLiteralType=simpleType: \"{0}\"\u3067\u3001xsd:list itemType \"{1}\"\u304C\u7121\u52B9\u3067\u3059
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI
-# Usage not found. TODO Remove
-#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\"
-model.schema.invalidWildcard.allCompositor=xsd:all\u30B3\u30F3\u30DD\u30B8\u30BF\u306F\u3001\u30B9\u30AD\u30FC\u30DE\u30FB\u30BF\u30A4\u30D7: \"{0}\"\u306E\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-
-model.uniqueness=\u4E00\u610F\u6027\u5236\u7D04\u9055\u53CD
-model.part.notUnique=wsdl:message \"{0}\"\u306E\u30D1\u30FC\u30C8\u3001\u53C2\u7167\"{1}\"\u306F\u3001\u4E00\u610F\u306E\u30B0\u30ED\u30FC\u30D0\u30EB\u8981\u7D20\u3092\u53C2\u7167\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-model.exception.notunique=Java\u7F72\u540D\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F: \u4F8B\u5916\u540D{0}\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002JAXWS\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u3001wsdl:part \"{1}\"\u306E\u540D\u524D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044
-model.uniqueness.javastructuretype=\u4E00\u610F\u6027\u5236\u7D04\u9055\u53CD\u3067\u3059\u3002\u91CD\u8907\u3057\u305F\u30E1\u30F3\u30D0\u30FC\"{0}\"\u304CJavaStructureType \"{1}\"\u306B\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F
-# Wrapped into an Exception. Not concatenated with any other string.
-model.parent.type.already.set=\u30BF\u30A4\u30D7\"{0}\"\u306E\u89AA\u304C\u3059\u3067\u306B\"{1}\"\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u65B0\u898F\u306E\u5024= \"{2}\"
-# Usage not found. TODO Remove
-#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\"
-model.exporter.unsupportedClass=\u30E2\u30C7\u30EB\u30FB\u30A8\u30AF\u30B9\u30DD\u30FC\u30BF: \u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30AF\u30E9\u30B9: {0}
-# Usage not found. TODO Remove
-#model.importer.nonModel=not a valid model document
-# Usage not found. TODO Remove
-#model.importer.syntaxError=syntax error in model document (line {0})
-model.importer.invalidVersion=\u30E2\u30C7\u30EB\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8(\u884C{0})\u3067\u30D0\u30FC\u30B8\u30E7\u30F3\"{1}\"\u304C\u7121\u52B9\u3067\u3059
-model.importer.invalidMinorMinorOrPatchVersion=\u30E2\u30C7\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\"{1}\"\u304C\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\"{2}\" (\u884C{0})\u3088\u308A\u65B0\u3057\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u3059: \u65B0\u3057\u3044\u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-model.importer.invalidClass=\u30E2\u30C7\u30EB\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8(\u884C{0})\u3067\u30AF\u30E9\u30B9\u540D\"{1}\"\u304C\u7121\u52B9\u3067\u3059
-model.importer.invalidId=\u30E2\u30C7\u30EB\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8(\u884C{0})\u3067ID \"{1}\"\u304C\u7121\u52B9\u3067\u3059
-# Usage not found. TODO Remove
-#model.importer.invalidLiteral=invalid literal value in model document (line {0})
-# Usage not found. TODO Remove
-#model.importer.invalidProperty=invalid property in model document (line {0})
-model.arraywrapper.only.one.member=LiteralArrayWrapper\u306F\u3001\u8981\u7D20\u30E1\u30F3\u30D0\u30FC1\u3064\u306E\u307F\u306E\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
-model.arraywrapper.member.already.set=LiteralArrayWrapper\u8981\u7D20\u306E\u30E1\u30F3\u30D0\u30FC\u306F\u3059\u3067\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
-model.arraywrapper.no.parent=LiteralArrayWrapper\u306F\u89AA\u30BF\u30A4\u30D7\u3092\u6301\u3066\u307E\u305B\u3093
-model.arraywrapper.no.subtypes=LiteralArrayWrapper\u306F\u30B5\u30D6\u30BF\u30A4\u30D7\u3092\u6301\u3066\u307E\u305B\u3093
-model.arraywrapper.no.content.member=LiteralArrayWrapper\u306F\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E1\u30F3\u30D0\u30FC\u3092\u6301\u3066\u307E\u305B\u3093
-model.complexType.simpleContent.reservedName=complexType: \"{0}\"\u306E\u5C5E\u6027\u540D: "_value"\u304C\u7121\u52B9\u3067\u3059\u3002_value\u306FJAXWS\u4E88\u7D04\u540D\u3067\u3042\u308A\u3001\u3053\u306E\u540D\u524D\u306F\u3001complexType/simpleContent\u306E\u751F\u6210\u6E08\u306EJavaBean\u30AF\u30E9\u30B9\u306B\u30B3\u30F3\u30C6\u30F3\u30C4\u5024\u3092\u4FDD\u6301\u3059\u308B\u305F\u3081\u306B\u3001\u751F\u6210\u6E08\u306EJavaBean\u30AF\u30E9\u30B9\u3067\u751F\u6210\u3055\u308C\u307E\u3059\u3002
-model.parameter.notunique.wrapper=Java\u7F72\u540D\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F: \u30D1\u30E9\u30E1\u30FC\u30BF\u5024\"{0}\"\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002\u6B21\u306E\u3044\u305A\u308C\u304B\u3092\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\n\t1.JAXWS\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u3001wsdl:part \"{1}\"\u306E\u540D\u524D\u3092\u5909\u66F4\u3057\u307E\u3059\n\t2.-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u307E\u3059\u3002\n\t3.\u3053\u308C\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u306E\u7AF6\u5408\u3092\u89E3\u6C7A\u3059\u308B\u305F\u3081\u306E\u30E9\u30C3\u30D1\u30FC\u30FB\u30B9\u30BF\u30A4\u30EB\u306E\u64CD\u4F5C\u3067\u3042\u308A\u3001<jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle> wsdl\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u30E9\u30C3\u30D1\u30FC\u30FB\u30B9\u30BF\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u3002
-model.parameter.notunique=Java\u7F72\u540D\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F: \u30D1\u30E9\u30E1\u30FC\u30BF\u540D\"{0}\"\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002\u6B21\u306E\u3044\u305A\u308C\u304B\u3092\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\n\t1.JAXWS\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u3001wsdl:part \"{1}\"\u306E\u540D\u524D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\n\t2.-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-#JAXWS 2.0
-model.schema.elementNotFound=\u8981\u7D20\"{0}\"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
-model.schema.jaxbException.message="{0}"
-model.saxparser.exception:{0}\n{1}
-
-ConsoleErrorReporter.UnknownLocation = \u4E0D\u660E\u306A\u5834\u6240
-
-ConsoleErrorReporter.LineXOfY = \ \ \u884C{0}/{1}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ko.properties
deleted file mode 100644
index ce1056ef..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ko.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-model.nestedModelError=\uBAA8\uB378 \uC624\uB958: {0}
-# Usage not found. TODO Remove
-#model.duplicate.porttype=duplicate PortType added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.operation=duplicate Operation added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.faultmessage=duplicate fault message added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.part=duplicate part added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.property=duplicate property added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.service=duplicate service added to model: {0}
-model.invalid.message.type=\uBD80\uC801\uD569\uD55C \uBA54\uC2DC\uC9C0 \uC720\uD615: {0}
-
-model.schema.notImplemented=\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 XML \uC2A4\uD0A4\uB9C8 \uAE30\uB2A5({0})
-model.schema.circularity=\uC2A4\uD0A4\uB9C8\uC5D0\uC11C \uC21C\uD658\uC131\uC774 \uAC10\uC9C0\uB428: \"{0}\"
-
-model.schema.unsupportedType=\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC720\uD615({0}): \"{1}\"(\uB124\uC784\uC2A4\uD398\uC774\uC2A4: {2})
-# Usage not found. TODO Remove
-#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0})
-# Usage not found. TODO Remove
-#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2})
-model.schema.invalidLiteralInEnumeration.anonymous=\uC775\uBA85 \uBAA9\uB85D\uC5D0 \uBD80\uC801\uD569\uD55C \uB9AC\uD130\uB7F4 \"{0}\"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.
-
-# Usage not found. TODO Remove
-#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement
-
-//replacement for Uxxx codes
-# Usage not found. TODO Remove
-#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType=invalid simpleType: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\"
-model.schema.simpleTypeWithFacets=\uB2E8\uC21C \uC720\uD615\uC5D0\uC11C\uB294 \"{0}\" \uD328\uC2EF\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC74C: \"{0}\"
-model.schema.unionNotSupported=xsd:union\uC5D0 \uC758\uD55C simpleType \"{0}\" \uD30C\uC0DD\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-model.schema.listNotSupported=xsd:list\uC5D0 \uC758\uD55C simpleType \"{0}\" \uD30C\uC0DD\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-model.schema.invalidSimpleType.invalidItemType=simpleType \"{0}\"\uC5D0\uC11C itemType \"{1}\"\uC740(\uB294) list\uC5D0 \uC758\uD574 \uD30C\uC0DD\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-model.schema.invalidSimpleType.noItemLiteralType=simpleType \"{0}\"\uC5D0\uC11C xsd:list itemType \"{1}\"\uC740(\uB294) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI
-# Usage not found. TODO Remove
-#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\"
-model.schema.invalidWildcard.allCompositor=\uC2A4\uD0A4\uB9C8 \uC720\uD615 \"{0}\"\uC5D0\uC11C\uB294 \uC640\uC77C\uB4DC \uCE74\uB4DC \uBB38\uC790\uC5D0 \uB300\uD574 xsd:all compositor\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-model.uniqueness=\uACE0\uC720\uC131 \uC81C\uC57D \uC870\uAC74 \uC704\uBC18
-model.part.notUnique=wsdl:message \"{0}\"\uC758 \uBD80\uBD84\uC774 \"{1}\"\uC744(\uB97C) \uCC38\uC870\uD569\uB2C8\uB2E4. \uACE0\uC720\uD55C \uC804\uC5ED \uC694\uC18C\uB97C \uCC38\uC870\uD574\uC57C \uD569\uB2C8\uB2E4.
-model.exception.notunique=Java \uC11C\uBA85 \uC0DD\uC131 \uC2E4\uD328: \uC608\uC678 \uC0AC\uD56D \uC774\uB984 {0}\uC774(\uAC00) \uC911\uBCF5\uB429\uB2C8\uB2E4. JAXWS \uBC14\uC778\uB529 \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 wsdl:part \"{1}\"\uC758 \uC774\uB984\uC744 \uBC14\uAFB8\uC2ED\uC2DC\uC624.
-model.uniqueness.javastructuretype=\uACE0\uC720\uC131 \uC81C\uC57D \uC870\uAC74 \uC704\uBC18\uC785\uB2C8\uB2E4. \uC911\uBCF5 \uBA64\uBC84 \"{0}\"\uC774(\uAC00) JavaStructureType \"{1}\"\uC5D0 \uCD94\uAC00\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-# Wrapped into an Exception. Not concatenated with any other string.
-model.parent.type.already.set=\"{0}\" \uC720\uD615\uC758 \uC0C1\uC704\uAC00 \uC774\uBBF8 \"{1}\"\uC73C(\uB85C) \uC124\uC815\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. \uC0C8 \uAC12 = \"{2}\"
-# Usage not found. TODO Remove
-#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\"
-model.exporter.unsupportedClass=\uBAA8\uB378 \uC775\uC2A4\uD3EC\uD130: \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uD074\uB798\uC2A4: {0}
-# Usage not found. TODO Remove
-#model.importer.nonModel=not a valid model document
-# Usage not found. TODO Remove
-#model.importer.syntaxError=syntax error in model document (line {0})
-model.importer.invalidVersion=\uBAA8\uB378 \uBB38\uC11C({0}\uD589)\uC5D0 \uBD80\uC801\uD569\uD55C \uBC84\uC804 \"{1}\"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.
-model.importer.invalidMinorMinorOrPatchVersion=\uBAA8\uB378 \uBC84\uC804 \"{1}\"\uC774(\uAC00) \uB7F0\uD0C0\uC784 \uBC84\uC804 \"{2}\"({0}\uD589)\uBCF4\uB2E4 \uCD5C\uC2E0\uC784: \uCD5C\uC2E0 \uB7F0\uD0C0\uC784\uC73C\uB85C \uC5C5\uADF8\uB808\uC774\uB4DC\uD574\uC57C \uD569\uB2C8\uB2E4.
-model.importer.invalidClass=\uBAA8\uB378 \uBB38\uC11C({0}\uD589)\uC5D0 \uBD80\uC801\uD569\uD55C \uD074\uB798\uC2A4 \uC774\uB984 \"{1}\"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.
-model.importer.invalidId=\uBAA8\uB378 \uBB38\uC11C({0}\uD589)\uC5D0 \uBD80\uC801\uD569\uD55C ID \"{1}\"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.
-# Usage not found. TODO Remove
-#model.importer.invalidLiteral=invalid literal value in model document (line {0})
-# Usage not found. TODO Remove
-#model.importer.invalidProperty=invalid property in model document (line {0})
-model.arraywrapper.only.one.member=LiteralArrayWrapper\uB294 \uC694\uC18C \uBA64\uBC84\uB97C \uD558\uB098\uB9CC \uAC00\uC9C8 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-model.arraywrapper.member.already.set=LiteralArrayWrapper \uC694\uC18C \uBA64\uBC84\uAC00 \uC774\uBBF8 \uC124\uC815\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
-model.arraywrapper.no.parent=LiteralArrayWrapper\uB294 \uC0C1\uC704 \uC720\uD615\uC744 \uAC00\uC9C8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-model.arraywrapper.no.subtypes=LiteralArrayWrapper\uB294 \uD558\uC704 \uC720\uD615\uC744 \uAC00\uC9C8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-model.arraywrapper.no.content.member=LiteralArrayWrapper\uB294 \uCF58\uD150\uCE20 \uBA64\uBC84\uB97C \uAC00\uC9C8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-model.complexType.simpleContent.reservedName=complexType \"{0}\"\uC5D0 \uBD80\uC801\uD569\uD55C \uC18D\uC131 \uC774\uB984 "_value"\uAC00 \uC788\uC2B5\uB2C8\uB2E4. _value\uB294 JAXWS \uC608\uC57D \uC774\uB984\uC785\uB2C8\uB2E4. \uC774 \uC774\uB984\uC740 complexType/simpleContent\uC5D0 \uB300\uD574 \uC0DD\uC131\uB41C javabean \uD074\uB798\uC2A4\uC5D0 \uCF58\uD150\uCE20 \uAC12\uC744 \uBCF4\uAD00\uD558\uAE30 \uC704\uD574 \uC0DD\uC131\uB41C javabean \uD074\uB798\uC2A4\uC5D0\uC11C \uC0DD\uC131\uB429\uB2C8\uB2E4.
-model.parameter.notunique.wrapper=Java \uC11C\uBA85 \uC0DD\uC131 \uC2E4\uD328: \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984 \"{0}\"\uC774(\uAC00) \uC911\uBCF5\uB429\uB2C8\uB2E4. \uB2E4\uC74C \uC791\uC5C5 \uC911 \uD558\uB098\uB97C \uC2DC\uB3C4\uD574 \uBCF4\uC2ED\uC2DC\uC624.\n\t1. JAXWS \uBC14\uC778\uB529 \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 wsdl:part \"{1}\"\uC758 \uC774\uB984\uC744 \uBC14\uAFC9\uB2C8\uB2E4.\n\t2. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4.\n\t3. \uC774\uB294 \uB798\uD37C \uC2A4\uD0C0\uC77C \uC791\uC5C5\uC785\uB2C8\uB2E4. \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984 \uCDA9\uB3CC\uC744 \uD574\uACB0\uD558\uAE30 \uC704\uD574 <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle> WSDL \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uB798\uD37C \uC2A4\uD0C0\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD574 \uBCFC \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.
-model.parameter.notunique=Java \uC11C\uBA85 \uC0DD\uC131 \uC2E4\uD328: \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984 \"{0}\"\uC774(\uAC00) \uC911\uBCF5\uB429\uB2C8\uB2E4. \uB2E4\uC74C \uC791\uC5C5 \uC911 \uD558\uB098\uB97C \uC2DC\uB3C4\uD574 \uBCF4\uC2ED\uC2DC\uC624.\n\t1. JAXWS \uBC14\uC778\uB529 \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 wsdl:part \"{1}\"\uC758 \uC774\uB984\uC744 \uBC14\uAFC9\uB2C8\uB2E4.\n\t2. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4.
-
-#JAXWS 2.0
-model.schema.elementNotFound=\"{0}\" \uC694\uC18C\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-model.schema.jaxbException.message="{0}"
-model.saxparser.exception:{0}\n{1}
-
-ConsoleErrorReporter.UnknownLocation = \uC54C \uC218 \uC5C6\uB294 \uC704\uCE58
-
-ConsoleErrorReporter.LineXOfY = \ \ {1}\uC758 {0}\uD589
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_pt_BR.properties
deleted file mode 100644
index 291441e1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_pt_BR.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-model.nestedModelError=erro do modelo: {0}
-# Usage not found. TODO Remove
-#model.duplicate.porttype=duplicate PortType added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.operation=duplicate Operation added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.faultmessage=duplicate fault message added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.part=duplicate part added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.property=duplicate property added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.service=duplicate service added to model: {0}
-model.invalid.message.type=tipo de mensagem inv\u00E1lida: {0}
-
-model.schema.notImplemented=recurso do Esquema XML n\u00E3o suportado ({0})
-model.schema.circularity=circularidade detectada no esquema: \"{0}\"
-
-model.schema.unsupportedType=tipo n\u00E3o suportado ({0}): \"{1}\" (namespace: {2})
-# Usage not found. TODO Remove
-#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0})
-# Usage not found. TODO Remove
-#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2})
-model.schema.invalidLiteralInEnumeration.anonymous=literal inv\u00E1lida \"{0}\" na enumera\u00E7\u00E3o an\u00F4nima
-
-# Usage not found. TODO Remove
-#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement
-
-//replacement for Uxxx codes
-# Usage not found. TODO Remove
-#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType=invalid simpleType: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\"
-model.schema.simpleTypeWithFacets=faceta \"{0}\" n\u00E3o suportada no tipo simples: \"{0}\"
-model.schema.unionNotSupported=simpleType: \"{0}\" deriva\u00E7\u00E3o de xsd:union n\u00E3o suportada
-model.schema.listNotSupported=simpleType: \"{0}\" deriva\u00E7\u00E3o de xsd:list n\u00E3o suportada
-model.schema.invalidSimpleType.invalidItemType=no simpleType: \"{0}\", itemType \"{1}\" n\u00E3o pode ser derivado pela lista
-model.schema.invalidSimpleType.noItemLiteralType=no simpleType: \"{0}\", xsd:list itemType \"{1}\" \u00E9 inv\u00E1lido
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI
-# Usage not found. TODO Remove
-#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\"
-model.schema.invalidWildcard.allCompositor=o compositor xsd:all n\u00E3o \u00E9 suportado para o curinga no tipo de esquema: \"{0}\"
-
-model.uniqueness=viola\u00E7\u00E3o de constraint de exclusividade
-model.part.notUnique=partes em wsdl:message \\"{0}\\", refer\u00EAncia \\"{1}\\", elas devem fazer refer\u00EAncia aos elementos globais exclusivos.
-model.exception.notunique=Falha ao gerar a assinatura Java: nomes da exce\u00E7\u00E3o duplicadas {0}. Use a personaliza\u00E7\u00E3o JAXWS de bind para renomear o wsdl:part \\"{1}\\"
-model.uniqueness.javastructuretype=viola\u00E7\u00E3o de constraint de exclusividade, membro \\"{0}\\" duplicado adicionado ao JavaStructureType \\"{1}\\"
-# Wrapped into an Exception. Not concatenated with any other string.
-model.parent.type.already.set=pai do tipo \"{0}\" j\u00E1 definido como \"{1}\", novo valor = \"{2}\"
-# Usage not found. TODO Remove
-#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\"
-model.exporter.unsupportedClass=exportador de modelo: classe n\u00E3o suportada: {0}
-# Usage not found. TODO Remove
-#model.importer.nonModel=not a valid model document
-# Usage not found. TODO Remove
-#model.importer.syntaxError=syntax error in model document (line {0})
-model.importer.invalidVersion=vers\u00E3o inv\u00E1lida \"{1}\" no documento do modelo (linha {0})
-model.importer.invalidMinorMinorOrPatchVersion=vers\u00E3o do modelo \"{1}\" mais recente que a vers\u00E3o \"{2}\" de runtime (linha {0}): \u00E9 necess\u00E1rio fazer upgrade para um runtime mais recente
-model.importer.invalidClass=nome de classe \"{1}\" inv\u00E1lido no documento do modelo (linha {0})
-model.importer.invalidId=id \"{1}\ inv\u00E1lido no documento do modelo (linha {0})
-# Usage not found. TODO Remove
-#model.importer.invalidLiteral=invalid literal value in model document (line {0})
-# Usage not found. TODO Remove
-#model.importer.invalidProperty=invalid property in model document (line {0})
-model.arraywrapper.only.one.member=LiteralArrayWrapper somente pode ter um membro do elemento.
-model.arraywrapper.member.already.set=o membro do elemento LiteralArrayWrapper j\u00E1 foi definido.
-model.arraywrapper.no.parent=LiteralArrayWrapper n\u00E3o pode ter um tipo pai
-model.arraywrapper.no.subtypes=LiteralArrayWrapper n\u00E3o pode ter subtipos
-model.arraywrapper.no.content.member=LiteralArrayWrapper n\u00E3o pode ter um membro do conte\u00FAdo
-model.complexType.simpleContent.reservedName=nome do atributo inv\u00E1lido: "_value" no complexType: \"{0}\", o _value \u00E9 um nome de JAXWS reservado, este nome \u00E9 gerado na classe javabean gerada para manter o valor de conte\u00FAdo na classe javabean gerada para complexType/simpleContent.
-model.parameter.notunique.wrapper=Falha ao gerar a assinatura Java: nome do par\u00E2metro \\"{0}\\" duplicado. Tente uma das seguintes a\u00E7\u00F5es\n\t1. Use personaliza\u00E7\u00E3o de bind de JAXWS para renomear wsdl:part \\"{1}\\"\n\t2. Execute wsimport com a chave -extension.\n\t3. Esta \u00E9 a opera\u00E7\u00E3o de estilo do encapsulador, para resolver o conflito de nome do par\u00E2metro, voc\u00EA tamb\u00E9m pode tentar desativar o estilo do encapsulador usando a personaliza\u00E7\u00E3o <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle> wsdl.
-model.parameter.notunique=Falha ao gerar a assinatura Java: nome do par\u00E2metro \"{0}\" duplicado. Tente uma das seguintes op\u00E7\u00F5es\n\t1. Use a personaliza\u00E7\u00E3o de bind de JAXWS para renomear a wsdl:part \"{1}\"\n\t2. Execute wsimport com a chave -extension.
-
-#JAXWS 2.0
-model.schema.elementNotFound=Elemento \"{0}\" n\u00E3o encontrado.
-model.schema.jaxbException.message="{0}"
-model.saxparser.exception:{0}\n{1}
-
-ConsoleErrorReporter.UnknownLocation = localiza\u00E7\u00E3o desconhecida
-
-ConsoleErrorReporter.LineXOfY = \ \ linha {0} de {1}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_CN.properties
deleted file mode 100644
index bb0d31f7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_CN.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-model.nestedModelError=\u6A21\u578B\u9519\u8BEF: {0}
-# Usage not found. TODO Remove
-#model.duplicate.porttype=duplicate PortType added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.operation=duplicate Operation added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.faultmessage=duplicate fault message added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.part=duplicate part added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.property=duplicate property added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.service=duplicate service added to model: {0}
-model.invalid.message.type=\u6D88\u606F\u7C7B\u578B\u65E0\u6548: {0}
-
-model.schema.notImplemented=\u4E0D\u652F\u6301\u7684 XML \u6A21\u5F0F\u529F\u80FD ({0})
-model.schema.circularity=\u5728\u6A21\u5F0F\u4E2D\u68C0\u6D4B\u5230\u5FAA\u73AF: \"{0}\"
-
-model.schema.unsupportedType=\u4E0D\u652F\u6301\u7C7B\u578B ({0}): \"{1}\" (\u540D\u79F0\u7A7A\u95F4: {2})
-# Usage not found. TODO Remove
-#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0})
-# Usage not found. TODO Remove
-#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2})
-model.schema.invalidLiteralInEnumeration.anonymous=\u533F\u540D\u679A\u4E3E\u4E2D\u7684\u6587\u5B57 \"{0}\" \u65E0\u6548
-
-# Usage not found. TODO Remove
-#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement
-
-//replacement for Uxxx codes
-# Usage not found. TODO Remove
-#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType=invalid simpleType: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\"
-model.schema.simpleTypeWithFacets=\u7B80\u5355\u7C7B\u578B\u4E0D\u652F\u6301\u9762 \"{0}\": \"{0}\"
-model.schema.unionNotSupported=\u4E0D\u652F\u6301\u7531 xsd:union \u6D3E\u751F\u7684 simpleType: \"{0}\"
-model.schema.listNotSupported=\u4E0D\u652F\u6301\u7531 xsd:list \u6D3E\u751F\u7684 simpleType: \"{0}\"
-model.schema.invalidSimpleType.invalidItemType=\u5728 simpleType: \"{0}\" \u4E2D, \u4E0D\u80FD\u7531\u5217\u8868\u6D3E\u751F itemType \"{1}\"
-model.schema.invalidSimpleType.noItemLiteralType=\u5728 simpleType: \"{0}\" \u4E2D, xsd:list itemType \"{1}\" \u65E0\u6548
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI
-# Usage not found. TODO Remove
-#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\"
-model.schema.invalidWildcard.allCompositor=xsd:all \u7EC4\u5408\u5668\u4E0D\u652F\u6301\u6A21\u5F0F\u7C7B\u578B\u4E2D\u7684\u901A\u914D\u7B26: \"{0}\"
-
-model.uniqueness=\u8FDD\u53CD\u4E86\u552F\u4E00\u6027\u7EA6\u675F\u6761\u4EF6
-model.part.notUnique=wsdl:message \"{0}\", \u5F15\u7528 \"{1}\" \u4E2D\u7684\u90E8\u5206\u5FC5\u987B\u5F15\u7528\u552F\u4E00\u7684\u5168\u5C40\u5143\u7D20\u3002
-model.exception.notunique=\u65E0\u6CD5\u751F\u6210 Java \u7B7E\u540D: \u5F02\u5E38\u9519\u8BEF\u540D\u79F0{0}\u91CD\u590D\u3002\u8BF7\u4F7F\u7528 JAXWS \u7ED1\u5B9A\u5B9A\u5236\u8BBE\u7F6E\u91CD\u547D\u540D wsdl:part \"{1}\"
-model.uniqueness.javastructuretype=\u8FDD\u53CD\u4E86\u552F\u4E00\u6027\u7EA6\u675F\u6761\u4EF6, \u6DFB\u52A0\u5230 JavaStructureType \"{1}\" \u7684\u6210\u5458 \"{0}\" \u91CD\u590D
-# Wrapped into an Exception. Not concatenated with any other string.
-model.parent.type.already.set=\u7C7B\u578B \"{0}\" \u7684\u7236\u7EA7\u5DF2\u8BBE\u7F6E\u4E3A \"{1}\", \u65B0\u503C = \"{2}\"
-# Usage not found. TODO Remove
-#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\"
-model.exporter.unsupportedClass=\u6A21\u578B\u5BFC\u51FA\u7A0B\u5E8F: \u4E0D\u652F\u6301\u7684\u7C7B: {0}
-# Usage not found. TODO Remove
-#model.importer.nonModel=not a valid model document
-# Usage not found. TODO Remove
-#model.importer.syntaxError=syntax error in model document (line {0})
-model.importer.invalidVersion=\u6A21\u578B\u6587\u6863\u4E2D\u7684\u7248\u672C \"{1}\" \u65E0\u6548 (\u7B2C {0} \u884C)
-model.importer.invalidMinorMinorOrPatchVersion=\u6A21\u578B\u7248\u672C \"{1}\" \u6BD4\u8FD0\u884C\u65F6\u7248\u672C \"{2}\" \u66F4\u65B0 (\u7B2C {0} \u884C): \u9700\u8981\u5347\u7EA7\u5230\u66F4\u65B0\u7684\u8FD0\u884C\u65F6
-model.importer.invalidClass=\u6A21\u578B\u6587\u6863\u4E2D\u7684\u7C7B\u540D \"{1}\" \u65E0\u6548 (\u7B2C {0} \u884C)
-model.importer.invalidId=\u6A21\u578B\u6587\u6863\u4E2D\u7684 ID \"{1}\" \u65E0\u6548 (\u7B2C {0} \u884C)
-# Usage not found. TODO Remove
-#model.importer.invalidLiteral=invalid literal value in model document (line {0})
-# Usage not found. TODO Remove
-#model.importer.invalidProperty=invalid property in model document (line {0})
-model.arraywrapper.only.one.member=LiteralArrayWrapper \u53EA\u80FD\u6709\u4E00\u4E2A\u5143\u7D20\u6210\u5458\u3002
-model.arraywrapper.member.already.set=LiteralArrayWrapper \u5143\u7D20\u6210\u5458\u5DF2\u8BBE\u7F6E\u3002
-model.arraywrapper.no.parent=LiteralArrayWrapper \u4E0D\u80FD\u6709\u7236\u7C7B\u578B
-model.arraywrapper.no.subtypes=LiteralArrayWrapper \u4E0D\u80FD\u6709\u5B50\u7C7B\u578B
-model.arraywrapper.no.content.member=LiteralArrayWrapper \u4E0D\u80FD\u6709\u5185\u5BB9\u6210\u5458
-model.complexType.simpleContent.reservedName=complexType \"{0}\" \u4E2D\u7684\u5C5E\u6027\u540D "_value" \u65E0\u6548, _value \u662F JAXWS \u4FDD\u7559\u540D\u79F0, \u5C06\u5728\u751F\u6210\u7684 javabean \u7C7B\u4E2D\u751F\u6210\u6B64\u540D\u79F0, \u4EE5\u4FBF\u5728\u4E3A complexType/simpleContent \u751F\u6210\u7684 javabean \u7C7B\u4E2D\u4FDD\u5B58\u5185\u5BB9\u503C\u3002
-model.parameter.notunique.wrapper=\u65E0\u6CD5\u751F\u6210 Java \u7B7E\u540D: \u53C2\u6570\u540D \"{0}\" \u91CD\u590D\u3002\u8BF7\u5C1D\u8BD5\u4EE5\u4E0B\u64CD\u4F5C\u4E4B\u4E00\n\t1. \u4F7F\u7528 JAXWS \u7ED1\u5B9A\u5B9A\u5236\u8BBE\u7F6E\u91CD\u547D\u540D wsdl:part \"{1}\"\n\t2. \u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport\u3002\n\t3. \u8FD9\u662F\u5305\u88C5\u6837\u5F0F\u64CD\u4F5C, \u7528\u4E8E\u89E3\u51B3\u53C2\u6570\u540D\u51B2\u7A81, \u4E5F\u53EF\u4EE5\u5C1D\u8BD5\u4F7F\u7528 <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle> wsdl \u5B9A\u5236\u8BBE\u7F6E\u6765\u7981\u7528\u5305\u88C5\u6837\u5F0F\u3002
-model.parameter.notunique=\u65E0\u6CD5\u751F\u6210 Java \u7B7E\u540D: \u53C2\u6570\u540D \"{0}\" \u91CD\u590D\u3002\u8BF7\u5C1D\u8BD5\u4EE5\u4E0B\u64CD\u4F5C\u4E4B\u4E00\n\t1. \u4F7F\u7528 JAXWS \u7ED1\u5B9A\u5B9A\u5236\u8BBE\u7F6E\u91CD\u547D\u540D wsdl:part \"{1}\"\n\t2. \u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport\u3002
-
-#JAXWS 2.0
-model.schema.elementNotFound=\u672A\u627E\u5230\u5143\u7D20 \"{0}\"\u3002
-model.schema.jaxbException.message="{0}"
-model.saxparser.exception:{0}\n{1}
-
-ConsoleErrorReporter.UnknownLocation = \u672A\u77E5\u4F4D\u7F6E
-
-ConsoleErrorReporter.LineXOfY = \ \ {1}\u7684\u7B2C {0} \u884C
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_TW.properties
deleted file mode 100644
index 84cc1170..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_TW.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-model.nestedModelError=\u6A21\u578B\u932F\u8AA4: {0}
-# Usage not found. TODO Remove
-#model.duplicate.porttype=duplicate PortType added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.operation=duplicate Operation added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.faultmessage=duplicate fault message added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.part=duplicate part added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.property=duplicate property added to model: {0}
-# Usage not found. TODO Remove
-#model.duplicate.service=duplicate service added to model: {0}
-model.invalid.message.type=\u7121\u6548\u7684\u8A0A\u606F\u985E\u578B: {0}
-
-model.schema.notImplemented=\u4E0D\u652F\u63F4\u7684 XML \u7DB1\u8981\u529F\u80FD ({0})
-model.schema.circularity=\u5728\u7DB1\u8981\u4E2D\u5075\u6E2C\u5230\u5FAA\u74B0: \"{0}\"
-
-model.schema.unsupportedType=\u4E0D\u652F\u63F4\u7684\u985E\u578B ({0}): \"{1}\" (\u547D\u540D\u7A7A\u9593: {2})
-# Usage not found. TODO Remove
-#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0})
-# Usage not found. TODO Remove
-#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2})
-model.schema.invalidLiteralInEnumeration.anonymous=\u533F\u540D\u5217\u8209\u4E2D\u6709\u7121\u6548\u7684\u6587\u5B57 \"{0}\"
-
-# Usage not found. TODO Remove
-#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement
-
-//replacement for Uxxx codes
-# Usage not found. TODO Remove
-#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType=invalid simpleType: \"{0}\"
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\"
-model.schema.simpleTypeWithFacets=\u7C21\u55AE\u985E\u578B: \"{0}\" \u4E0D\u652F\u63F4 Facet \"{0}\"
-model.schema.unionNotSupported=\u4E0D\u652F\u63F4 xsd:union \u884D\u751F\u7684 simpleType: \\"{0}\\"
-model.schema.listNotSupported=\u4E0D\u652F\u63F4 xsd:list \u884D\u751F\u7684 simpleType: \\"{0}\\"
-model.schema.invalidSimpleType.invalidItemType=\u5728 simpleType: \\"{0}\\" \u4E2D, \u7121\u6CD5\u4EE5 list \u884D\u751F itemType \\"{1}\\"
-model.schema.invalidSimpleType.noItemLiteralType=\u5728 simpleType: \"{0}\" \u4E2D, xsd:list itemType \"{1}\" \u7121\u6548
-# Usage not found. TODO Remove
-#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI
-# Usage not found. TODO Remove
-#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\"
-model.schema.invalidWildcard.allCompositor=\u7DB1\u8981\u985E\u578B: \"{0}\" \u4E2D\u7684\u842C\u7528\u5B57\u5143\u4E0D\u652F\u63F4 xsd:all \u5408\u6210\u5668
-
-model.uniqueness=\u9055\u53CD\u552F\u4E00\u6027\u9650\u5236\u689D\u4EF6
-model.part.notUnique=wsdl:message \\"{0}\\"\u3001\u53C3\u7167 \\"{1}\\" \u4E2D\u7684\u67D0\u4E9B\u90E8\u5206, \u5FC5\u9808\u53C3\u7167\u552F\u4E00\u7684\u5168\u57DF\u5143\u7D20.
-model.exception.notunique=\u7121\u6CD5\u7522\u751F Java \u7C3D\u7AE0: \u7570\u5E38\u72C0\u6CC1\u540D\u7A31 {0} \u91CD\u8907. \u8ACB\u4F7F\u7528 JAXWS \u9023\u7D50\u81EA\u8A02\u9805\u76EE, \u5C07 wsdl:part \\"{1}\\" \u91CD\u65B0\u547D\u540D
-model.uniqueness.javastructuretype=\u9055\u53CD\u552F\u4E00\u6027\u9650\u5236\u689D\u4EF6, \u91CD\u8907\u7684\u6210\u54E1 \\"{0}\\" \u65B0\u589E\u5230 JavaStructureType \\"{1}\\"
-# Wrapped into an Exception. Not concatenated with any other string.
-model.parent.type.already.set=\u985E\u578B \"{0}\" \u7684\u7236\u9805\u5DF2\u7D93\u8A2D\u5B9A\u6210 \"{1}\", \u65B0\u503C = \"{2}\"
-# Usage not found. TODO Remove
-#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\"
-model.exporter.unsupportedClass=\u6A21\u578B\u532F\u51FA: \u4E0D\u652F\u63F4\u7684\u985E\u5225: {0}
-# Usage not found. TODO Remove
-#model.importer.nonModel=not a valid model document
-# Usage not found. TODO Remove
-#model.importer.syntaxError=syntax error in model document (line {0})
-model.importer.invalidVersion=\u6A21\u578B\u6587\u4EF6 (\u884C {0}) \u4E2D\u7684\u7248\u672C \"{1}\" \u7121\u6548
-model.importer.invalidMinorMinorOrPatchVersion=\u6A21\u578B\u7248\u672C \"{1}\" \u6BD4\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u7248\u672C \"{2}\" \u66F4\u65B0 (\u884C {0}): \u5FC5\u9808\u5347\u7D1A\u81F3\u8F03\u65B0\u7684\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C
-model.importer.invalidClass=\u6A21\u578B\u6587\u4EF6 (\u884C {0}) \u4E2D\u7684\u985E\u5225\u540D\u7A31 \"{1}\" \u7121\u6548
-model.importer.invalidId=\u6A21\u578B\u6587\u4EF6 (\u884C {0}) \u4E2D\u7684 ID \"{1}\ \u7121\u6548
-# Usage not found. TODO Remove
-#model.importer.invalidLiteral=invalid literal value in model document (line {0})
-# Usage not found. TODO Remove
-#model.importer.invalidProperty=invalid property in model document (line {0})
-model.arraywrapper.only.one.member=LiteralArrayWrapper \u53EA\u80FD\u6709\u4E00\u500B\u5143\u7D20\u6210\u54E1.
-model.arraywrapper.member.already.set=\u5DF2\u7D93\u8A2D\u5B9A LiteralArrayWrapper \u5143\u7D20\u6210\u54E1.
-model.arraywrapper.no.parent=LiteralArrayWrapper \u4E0D\u53EF\u4EE5\u6709\u4E00\u500B\u7236\u9805\u985E\u578B
-model.arraywrapper.no.subtypes=LiteralArrayWrapper \u4E0D\u53EF\u4EE5\u6709\u5B50\u985E\u578B
-model.arraywrapper.no.content.member=LiteralArrayWrapper \u4E0D\u53EF\u4EE5\u6709\u5167\u5BB9\u6210\u54E1
-model.complexType.simpleContent.reservedName=complexType: \\"{0}\\" \u4E2D\u7684\u5C6C\u6027\u540D\u7A31: "_value" \u7121\u6548, _value \u662F JAXWS \u4FDD\u7559\u540D\u7A31, \u6B64\u540D\u7A31\u6703\u5728\u7522\u751F\u7684 JavaBean \u985E\u5225\u4E2D\u7522\u751F, \u7528\u65BC\u4FDD\u7559\u91DD\u5C0D complexType/simpleContent \u7522\u751F\u4E4B JavaBean \u985E\u5225\u4E2D\u7684\u5167\u5BB9\u503C.
-model.parameter.notunique.wrapper=\u7121\u6CD5\u7522\u751F Java \u7C3D\u7AE0: \u53C3\u6578\u540D\u7A31 \"{0}\" \u91CD\u8907. \u8ACB\u5617\u8A66\u4E0B\u5217\u5176\u4E2D\u4E00\u9805\u52D5\u4F5C\n\t1. \u4F7F\u7528 JAXWS \u9023\u7D50\u81EA\u8A02\u9805\u76EE\u4F86\u91CD\u65B0\u547D\u540D wsdl:part \"{1}\"\n\t2. \u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport.\n\t3. \u6B64\u70BA\u5305\u88DD\u51FD\u5F0F\u6A23\u5F0F\u4F5C\u696D, \u53EF\u89E3\u6C7A\u53C3\u6578\u540D\u7A31\u885D\u7A81, \u60A8\u4E5F\u53EF\u4F7F\u7528 <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle> wsdl \u81EA\u8A02\u9805\u76EE\u5617\u8A66\u505C\u7528\u5305\u88DD\u51FD\u5F0F.
-model.parameter.notunique=\u7121\u6CD5\u7522\u751F Java \u7C3D\u7AE0: \u53C3\u6578\u540D\u7A31 \"{0}\" \u91CD\u8907. \u8ACB\u5617\u8A66\u4E0B\u5217\u5176\u4E2D\u4E00\u9805\u52D5\u4F5C\n\t1. \u4F7F\u7528 JAXWS \u9023\u7D50\u81EA\u8A02\u9805\u76EE\u4F86\u91CD\u65B0\u547D\u540D wsdl:part \"{1}\"\n\t2. \u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport.
-
-#JAXWS 2.0
-model.schema.elementNotFound=\u627E\u4E0D\u5230\u5143\u7D20 \"{0}\".
-model.schema.jaxbException.message="{0}"
-model.saxparser.exception:{0}\n{1}
-
-ConsoleErrorReporter.UnknownLocation = \u4E0D\u660E\u7684\u4F4D\u7F6E
-
-ConsoleErrorReporter.LineXOfY = \ \ {1} \u7684\u7B2C {0} \u884C
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler.properties
deleted file mode 100644
index 497c906a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler.properties
+++ /dev/null
@@ -1,248 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# general
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-modeler.nestedModelError=modeler error: {0}
-
-
-# WSDLModeler
-# Usage not found. TODO Remove
-#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0}
-wsdlmodeler.invalidOperation=invalid operation: {0}
-wsdlmodeler.invalidState.modelingOperation=invalid state while modeling operation: {0}
-wsdlmodeler.resultIsInOutParameter=result is \"inout\" parameter in operation: {0}
-wsdlmodeler.invalid.parameterorder.parameter=\"{0}\" specified in the parameterOrder attribute of operation \"{1}\" is not a valid part of the message.
-wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=more than one part left out in the parameterOrder attribute of operation \"{0}\"
-wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=parameterOrder attribute on operation \"{0}\" is invalid, ignoring parameterOrder hint
-wsdlmodeler.invalid.parameter.differentTypes=parameter \"{0}\" of operation \"{1}\" appears with different types in the input and output messages
-wsdlmodeler.invalid.bindingOperation.notInPortType=in binding \"{1}\", operation \"{0}\" does not appear in the corresponding port type
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=input message of binding operation \"{0}\" does not have a SOAP body extension
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=output message of binding operation \"{0}\" does not have a SOAP body extension
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingInputName=binding operation \"{0}\" must specify a name for its input message
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingOutputName=binding operation \"{0}\" must specify a name for its output message
-wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=in binding \"{1}\", operation \"{0}\" does not reference a unique operation in the corresponding port type
-wsdlmodeler.invalid.bindingOperation.notFound=in binding \"{1}\", operation \"{0}\" does not match any operation in the corresponding port type
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=input message of binding operation \"{0}\" must specify a value for the \"namespace\" attribute
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=output message of binding operation \"{0}\" must specify a value for the \"namespace\" attribute
-wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=input header \"{1}\" of binding operation \"{0}\" must specify a value for the \"namespace\" attribute
-wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=output header \"{1}\" of binding operation \"{0}\" must specify a value for the \"namespace\" attribute
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notUnique=fault \"{0}\" in operation \"{1}\" matches more than one fault in the corresponding port type operation
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notFound=fault \"{0}\" in operation \"{1}\" does not match any fault in the corresponding port type operation
-# Not concatenated with any other string.
-wsdlmodeler.invalid.portTypeFault.notFound=fault \"{0}\" in portType operation \"{1}\" does not match any fault in the corresponding binding operation
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=fault \"{0}\" in operation \"{1}\" does not have a SOAP fault extension
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingName=fault \"{0}\" in operation \"{1}\" must specify a value for the \"name\" attribute
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingNamespace=fault \"{0}\" in operation \"{1}\" must specify a value for the \"namespace\" attribute
-wsdlmodeler.invalid.bindingFault.emptyMessage=fault \"{0}\" refers to message \"{1}\", but the message has no parts
-wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=fault \"{0}\" refers to message \"{1}\", but the message has more than one parts
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute
-# Not concatenated with any other string.
-wsdlmodeler.invalid.message.partMustHaveElementDescriptor=in message \"{0}\", part \"{1}\" must specify a \"element\" attribute
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid=invalid WSDL document
-wsdlmodeler.unsolvableNamingConflicts=the following naming conflicts occurred: {0}
-#
-wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=ignoring schema element (unsupported version): {0}
-wsdlmodeler.warning.searchSchema.unrecognizedTypes=encountered {0} unrecognized type(s)
-wsdlmodeler.warning.noServiceDefinitionsFound=WSDL document does not define any services
-wsdlmodeler.warning.noPortsInService=Service \"{0}\" does not contain any usable ports. try running wsimport with -extension switch.
-wsdlmodeler.warning.noOperationsInPort=Port \"{0}\" does not contain any usable operations
-wsdlmodeler.warning.ignoringNonSOAPPort=ignoring port \"{0}\": not a standard SOAP port. try running wsimport with -extension switch.
-# Not concatenated with any other string.
-wsdlmodeler.warning.nonSOAPPort=port \"{0}\": not a standard SOAP port. The generated artifacts may not work with JAX-WS runtime.
-wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=ignoring port \"{0}\": no SOAP address specified. try running wsimport with -extension switch.
-# Not concatenated with any other string.
-wsdlmodeler.warning.noSOAPAddress=Port \"{0}\" is not a SOAP port, it has no soap:address
-wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:ignoring SOAP port \"{0}\": unrecognized transport. try running wsimport with -extension switch.
-
-#BP1.1 R2705
-wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=ignoring port \"{0}\", its not WS-I BP 1.1 compliant: the wsdl binding has mixed style, it must be rpc-literal or document-literal operation. try running wsimport with -extension switch.
-# Not concatenated with any other string.
-wsdlmodeler.warning.port.SOAPBinding.mixedStyle=not a WS-I BP1.1 compliant SOAP port \"{0}\": the WSDL binding has mixed style, it must be rpc-literal or document-literal operation!
-
-wsdlmodeler.warning.ignoringOperation.notSupportedStyle=ignoring operation \"{0}\": not request-response or one-way
-wsdlmodeler.invalid.operation.notSupportedStyle=Invalid WSDL, wsdl:operation \"{0}\" in wsdl:portType \"{1}\": not request-response or one-way
-wsdlmodeler.warning.ignoringOperation.notEncoded=ignoring RPC-style operation \"{0}\": parameters are not encoded
-wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=ignoring operation \"{0}\": cannot handle \"parts\" attribute of \"soap:body\" element
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=ignoring operation \"{0}\": message part does not refer to a schema element declaration
-wsdlmodeler.invalid.doclitoperation=Invalid wsdl:operation \"{0}\": its a document-literal operation, message part must refer to a schema element declaration
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=ignoring operation \"{0}\": message part does not refer to a schema type declaration
-wsdlmodeler.invalid.rpclitoperation=Invalid wsdl:operation \"{0}\": its a rpc-literal operation, message part must refer to a schema type declaration
-
-wsdlmodeler.invalid.ignoringMemberSubmissionAddressing=ignoring wsa:Action attribute since obsolete addressing version 08-2004:\"{0}\" used; expecting addressing version \"{1}\". To use version 08-2004 anyway run wsimport with -extension switch.
-wsdlmodeler.warning.memberSubmissionAddressingUsed=obsolete addressing version 08-2004:\"{0}\" used; version \"{1}\" should be used instead.
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=ignoring operation \"{0}\": cannot handle document-style operations
-wsdlmodeler.warning.bindingOperation.multiplePartBinding=Check the abstract operation \"{0}\" binding, part \"{1}\" has multiple binding. Will try to generated artifacts anyway...
-wsdlmodeler.invalid.bindingOperation.multiplePartBinding=abstract operation \"{0}\" binding, part \"{1}\" has multiple binding.
-wsdlmodeler.warning.ignoringFaults=ignoring faults declared by operation \"{0}\"
-wsdlmodeler.warning.ignoringFault.notEncoded=ignoring literal fault \"{0}\" of binding operation \"{1}\"
-wsdlmodeler.warning.ignoringFault.notLiteral=ignoring encoded fault \"{0}\" of binding operation \"{1}\"
-wsdlmodeler.invalid.operation.fault.notLiteral=ignoring encoded fault \"{0}\" in literal binding operation \"{1}\"
-wsdlmodeler.warning.ignoringHeader=ignoring header \"{0}\" of binding operation \"{1}\"
-wsdlmodeler.warning.ignoringHeader.partFromBody=header part: \"{0}\" already bound by soapbind:body, illegal to bind the part twice
-wsdlmodeler.warning.ignoringHeader.notLiteral=ignoring header \"{0}\" of binding operation \"{1}\": not literal
-wsdlmodeler.invalid.header.notLiteral=Invalid header \"{0}\" of binding operation \"{1}\": not literal
-wsdlmodeler.warning.ignoringHeader.notFound=ignoring header \"{0}\" of binding operation \"{1}\": not found
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.notFound=header \"{0}\" of binding operation \"{1}\": not found
-wsdlmodeler.warning.ignoringHeader.cant.resolve.message=ignoring header \"{0}\" of binding operation \"{1}\": cannot resolve message
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.cant.resolve.message=header \"{0}\" of binding operation \"{1}\": cannot resolve message
-
-wsdlmodeler.warning.ignoringFault.cant.resolve.message=ignoring fault \"{0}\" of binding operation \"{1}\": cannot resolve message
-wsdlmodeler.invalid.fault.cant.resolve.message=fault message \"{0}\" in binding operation \"{1}\" could not be resolved
-
-wsdlmodeler.warning.ignoringHeader.notEncoded=ignoring header \"{0}\" of binding operation \"{1}\": not SOAP-encoded
-wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=ignoring header \"{0}\" of operation \"{1}\": part not found
-#
-wsdlmodeler.warning.ignoringOperation.notLiteral=ignoring document-style operation \"{0}\": parameters are not literal
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=ignoring operation \"{0}\": more than one part in input message
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=ignoring operation \"{0}\": input message is empty
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=ignoring operation \"{0}\": more than one part in output message
-wsdlmodeler.warning.operation.MoreThanOnePartInMessage=Ignoring operation \"{0}\": more than one part bound to body
-# Not concatenated with any other string.
-wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=operation \"{0}\": more than one part bound to body
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=ignoring operation \"{0}\": output message is empty
-wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=ignoring operation \"{0}\": binding style and operation style are conflicting
-wsdlmodeler.warning.ignoringOperation.partNotFound=ignoring operation \"{0}\": part \"{1}\" not found
-wsdlmodeler.error.partNotFound=part \"{1}\" of operation \"{0}\" could not be resolved!
-wsdlmodeler.warning.ignoringFault.documentOperation=ignoring fault \"{0}\" of document-style operation \"{1}\"
-wsdlmodler.warning.operation.use=The WSDL used has operations with literal and encoded use. -f:searchschema is not supported for this scenario.
-#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=name of soap:fault \"{0}\" doesn''t match the name of wsdl:fault \"{1}\" in operation \"{2}\"
-#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.noSoapFaultName=soap:fault name not specified, wsdl:fault \"{0}\" in operation \"{1}\"
-
-wsdlmodeler.duplicate.fault.part.name=ignoring fault \"{0}\" of operation \"{1}\", part name \"{2}\" is not unique
-wsdlmodeler.duplicate.fault.soap.name=ignoring fault \"{0}\" of operation \"{1}\", soap:fault name \"{2}\" is not unique
-
-wsdlmodeler.warning.ignoringHeaderFault.notFound=ignoring header fault \"{0}\", cannot find part \"{1}\" in binding \"{2}\"
-# Usage not found. TODO Remove
-#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\"
-
-wsdlmodeler.warning.ignoringHeaderFault.notLiteral=ignoring header fault part=\"{0}\" message=\"{1}\" of operation {2}, use attribute must be \"literal\"
-
-wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=ignoring header fault part=\"{0}\" message=\"{1}\" of operation {2}
-
-wsdlmodeler.invalid.headerfault.notLiteral=Invalid headerfault \"{0}\" of binding operation \"{1}\": not literal
-wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=Invalid headerfault \"{0}\" for header {1} in operation {2}: part must specify an \"element\" attribute
-wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=Invalid header \"{0}\" in operation {1}: part must specify a \"element\" attribute
-
-
-#wsi warnings
-wsdlmodeler.warning.nonconforming.wsdl.import=Non conforming WS-I WSDL used for wsdl:import
-wsdlmodeler.warning.nonconforming.wsdl.types=Non conforming WS-I WSDL used for wsdl:types
-wsdlmodeler.warning.nonconforming.wsdl.use=Processing WS-I non conforming operation \"{0}\" with RPC-Style and SOAP-encoded
-
-# optional parts
-# Not concatenated with any other string.
-wsdlmodeler.error.partsNotFound=parts \"{0}\" not found in the message \"{1}\", wrong WSDL
-
-# soap 1.2
-wsdlmodeler.warning.port.SOAPBinding12=SOAP port \"{0}\": uses a non-standard SOAP 1.2 binding.
-wsdlmodeler.warning.ignoringSOAPBinding12=Ignoring SOAP port \"{0}\": it uses non-standard SOAP 1.2 binding.\nYou must specify the \"-extension\" option to use this binding.
-
-#WSI-BP1.0 Warning/Errors
-wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit for {0}: \"{1}\"
-
-# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException"
-wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for {0}: \"{1}\"
-
-#WSI-BP 1.1 Warning/Errors
-# R2911
-mimemodeler.invalidMimePart.moreThanOneSOAPBody=Ignoring operation \"{0}\". The Multipart/Related structure has invalid root part: more than one soap:body parts found
-
-# R2906
-mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=Headers not in root mime:part with soap:body, ignoring headers in operation \"{0}\"
-
-# R2909
-mimemodeler.invalidMimeContent.differentPart=Ignoring the mime:part. Invalid mime:part, the mime:content has different part attribute.
-
-mimemodeler.invalidMimeContent.invalidSchemaType=Ignoring the mime:part. mime part: {0} can not be mapped to schema type: {1}
-
-# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute.
-mimemodeler.invalidMimeContent.mesagePartElementKind=wsdl:part element referenced by mime:content part attribute: {0} must be defined using type attribute!
-
-# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute.
-mimemodeler.invalidMimeContent.missingPartAttribute=Ignoring operation \"{0}\", missing part attribute in mime:content. part attribute must be present in mime:content declaration.
-
-mimemodeler.invalidMimeContent.missingTypeAttribute=Missing type attribute in mime:content in operation \"{0}\". part attribute must be present in mime:content declaration.
-
-# unknown schematype
-mimemodeler.invalidMimeContent.unknownSchemaType=Unknown schema type: {1} for mime:content part: {0}
-mimemodeler.invalidMimeContent.errorLoadingJavaClass=Couldn't find class \"{0}\" for mime type \"{1}\"
-
-# missing wsdl:part referenced by the mime:content
-wsdlmodeler.warning.ignoringMimePart.notFound=ignoring mime:part, cannot find part \"{0}\" referenced by the mime:content in the wsdl:operation \"{1}\"
-
-mimemodeler.elementPart.invalidElementMimeType=The mime:content part refers to wsdl:part \"{0}\", defined using element attribute. Please make sure the mime type: \"{1}\" is appropriate to serialize XML.
-
-# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute.
-mimemodeler.invalidMimePart.nameNotAllowed=name attribute on wsdl:part in Operation \"{0}\" is ignored. Its not allowed as per WS-I AP 1.0.
-
-
-wsdlmodeler20.rpcenc.not.supported=rpc/encoded wsdl's are not supported in JAXWS 2.0.
-wsdlmodeler.warning.ignoringOperation.notNCName=Ignoring operation \"{0}\", it has illegal character ''{1}'' in its name. Its rpc-literal operation - jaxws won't be able to serialize it!
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=Ignoring operation \"{0}\", can''t generate java method. Parameter: part "{2}\" in wsdl:message \"{1}\", is a java keyword. Use customization to change the parameter name or change the wsdl:part name.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=Invalid operation \"{0}\", can''t generate java method. Parameter: part "{2}\" in wsdl:message \"{1}\", is a java keyword. Use customization to change the parameter name or change the wsdl:part name.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=Ignoring operation \"{0}\", can''t generate java method parameter. Local name of the wrapper child \"{1}\" in the global element \"{2}\" is a java keyword. Use customization to change the parameter name.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=Invalid operation \"{0}\", can''t generate java method parameter. Local name of the wrapper child \"{1}\" in the global element \"{2}\" is a java keyword. Use customization to change the parameter name.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=Ignoring operation \"{0}\", can''t generate java method. Parameter,customized name \"{1}\" is a java keyword.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=Invalid operation \"{0}\", can''t generate java method. Parameter,customized name \"{1}\" is a java keyword.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=Ignoring operation \"{0}\", it''s java reserved word, can''t generate java method. Use customization to change the operation name.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=Invalid operation \"{0}\", it''s java reserved word, can''t generate java method. Use customization to change the operation name.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=Ignoring operation \"{0}\", can''t generate java method ,customized name \"{1}\" of the wsdl:operation is a java keyword.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=Invalid operation \"{0}\", can''t generate java method ,customized name \"{1}\" of the wsdl:operation is a java keyword.
-
-wsdlmodeler.jaxb.javatype.notfound=Schema descriptor {0} in message part \"{1}\" is not defined and could not be bound to Java. Perhaps the schema descriptor {0} is not defined in the schema imported/included in the WSDL. You can either add such imports/includes or run wsimport and provide the schema location using -b switch.
-wsdlmodeler.unsupportedBinding.mime=WSDL MIME binding is not currently supported!
-
-wsdlmodeler.nonUnique.body.error=Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signature on the wire for successful dispatch. In port {0}, Operations \"{1}\" and \"{2}\" have the same request body block {3}. Try running wsimport with -extension switch, runtime will try to dispatch using SOAPAction
-wsdlmodeler.nonUnique.body.warning=Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signature on the wire for successful dispatch. In port {0}, Operations \"{1}\" and \"{2}\" have the same request body block {3}. Method dispatching may fail, runtime will try to dispatch using SOAPAction
-
-wsdlmodeler.rpclit.unkownschematype=XML type \"{0}\" could not be resolved, XML to JAVA binding failed! Please check the wsdl:part \"{1}\" in the wsdl:message \"{2}\".
-
-wsdlmodeler.responsebean.notfound=wsimport failed to generate async response bean for operation: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_de.properties
deleted file mode 100644
index 4f4b178a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_de.properties
+++ /dev/null
@@ -1,246 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# general
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-modeler.nestedModelError=Modeler-Fehler: {0}
-
-
-# WSDLModeler
-# Usage not found. TODO Remove
-#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0}
-wsdlmodeler.invalidOperation=Ung\u00FCltiger Vorgang: {0}
-wsdlmodeler.invalidState.modelingOperation=Ung\u00FCltiger Status beim Modellieren des Vorgangs: {0}
-wsdlmodeler.resultIsInOutParameter=Ergebnis ist der \"inout\"-Parameter in Vorgang: {0}
-wsdlmodeler.invalid.parameterorder.parameter=\\"{0}\\" wurde in dem parameterOrder-Attribut von Vorgang \\"{1}\\" angegeben und ist kein g\u00FCltiger Teil der Nachricht.
-wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=Mehr als ein Teil wurde im parameterOrder-Attribut von Vorgang \"{0}\" ausgelassen
-wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=parameterOrder-Attribut f\u00FCr Vorgang \\"{0}\\" ist ung\u00FCltig, parameterOrder-Hinweis wird ignoriert
-wsdlmodeler.invalid.parameter.differentTypes=Parameter \"{0}\" von Vorgang \"{1}\" wird mit unterschiedlichen Typen in Eingangs- und Ausgangsnachrichten angezeigt
-wsdlmodeler.invalid.bindingOperation.notInPortType=In Binding \"{1}\" wird Vorgang \"{0}\" nicht im entsprechenden Porttyp angezeigt
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=Eingangsnachricht des Binding-Vorgangs \"{0}\" hat keine SOAP-Inhaltserweiterung
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=Ausgangsnachricht des Binding-Vorgangs \"{0}\" hat keine SOAP-Inhaltserweiterung
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingInputName=Binding-Vorgang \"{0}\" muss einen Namen f\u00FCr die Eingabemeldung angeben
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingOutputName=Binding-Vorgang \"{0}\" muss einen Namen f\u00FCr die Ausgabemeldung angeben
-wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=In Binding \\"{1}\\" referenziert Vorgang \\"{0}\\" keinen eindeutigen Vorgang im entsprechenden Porttyp
-wsdlmodeler.invalid.bindingOperation.notFound=In Binding \\"{1}\\" stimmt Vorgang \\"{0}\\" mit keinem Vorgang im entsprechenden Porttyp \u00FCberein
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=Eingangsnachricht des Binding-Vorgangs \"{0}\" muss einen Wert f\u00FCr das \"namespace\"-Attribut angeben
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=Ausgangsnachricht des Binding-Vorgangs \"{0}\" muss einen Wert f\u00FCr das \"namespace\"-Attribut angeben
-wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=Eingabe-Header "{1}" des Binding-Vorgangs \\"{0}\\" muss einen Wert f\u00FCr das \\"namespace\\"-Attribut angeben
-wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=Ausgabe-Header "{1}" des Binding-Vorgangs \\"{0}\\" muss einen Wert f\u00FCr das \\"namespace\\"-Attribut angeben
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notUnique=Fault \"{0}\" in Vorgang \"{1}\" stimmt im entsprechenden Porttypvorgang mit mehr als einem Fault \u00FCberein
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notFound=Fault \"{0}\" in Vorgang \"{1}\" stimmt im entsprechenden Porttypvorgang mit keinem Fault \u00FCberein
-# Not concatenated with any other string.
-wsdlmodeler.invalid.portTypeFault.notFound=Fault \\"{0}\\" in portType-Vorgang \\"{1}\\" stimmt im entsprechenden Binding-Vorgang mit keinem Fault \u00FCberein
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=Fault \"{0}\" in Vorgang \"{1}\" hat keine SOAP-Fault-Erweiterung
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingName=Fault \\"{0}\\" in Vorgang \\"{1}\\" muss einen Wert f\u00FCr das \\"name\\"-Attribut angeben
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingNamespace=Fault \\"{0}\\" in Vorgang \\"{1}\\" muss einen Wert f\u00FCr das \\"namespace\\"-Attribut angeben
-wsdlmodeler.invalid.bindingFault.emptyMessage=Fault \"{0}\" referenziert Nachricht \"{1}\", die Nachricht hat aber keine Teile
-wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=Fault \"{0}\" referenziert Nachricht \"{1}\", die Nachricht hat aber mehr als ein Teil
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute
-# Not concatenated with any other string.
-wsdlmodeler.invalid.message.partMustHaveElementDescriptor=In Nachricht \\"{0}\\" muss Teil \\"{1}\\" ein \\"element\\"-Attribut angeben
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid=invalid WSDL document
-wsdlmodeler.unsolvableNamingConflicts=die folgenden Benennungskonflikte sind aufgetreten: {0}
-#
-wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=Schemaelement wird ignoriert (nicht unterst\u00FCtzte Version): {0}
-wsdlmodeler.warning.searchSchema.unrecognizedTypes={0} unbekannte Typen wurden ermittelt
-wsdlmodeler.warning.noServiceDefinitionsFound=WSDL-Dokument definiert keine Services
-wsdlmodeler.warning.noPortsInService=Service \"{0}\" enth\u00E4lt keine verwendbaren Ports. Versuchen Sie, wsimport mit dem Switch "-extension" auszuf\u00FChren.
-wsdlmodeler.warning.noOperationsInPort=Port \"{0}\" enth\u00E4lt keine verwendbaren Vorg\u00E4nge
-wsdlmodeler.warning.ignoringNonSOAPPort=Port \\"{0}\\" wird ignoriert: Kein Standard-SOAP-Port. Versuchen Sie, wsimport mit dem Switch "-extension" auszuf\u00FChren.
-# Not concatenated with any other string.
-wsdlmodeler.warning.nonSOAPPort=Port \\"{0}\\": Kein Standard-SOAP-Port. Die generierten Artefakte k\u00F6nnen m\u00F6glicherweise nicht mit der JAX-WS-Laufzeitumgebung ausgef\u00FChrt werden.
-wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=Port \\"{0}\\" wird ignoriert: Keine SOAP-Adresse angegeben. Versuchen Sie, wsimport mit dem Switch "-extension" auszuf\u00FChren.
-# Not concatenated with any other string.
-wsdlmodeler.warning.noSOAPAddress=Port \\"{0}\\" ist kein SOAP-Port, er enth\u00E4lt keine soap:address
-wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:SOAP-Port \\"{0}\\" wird ignoriert: Unbekannter Transport. Versuchen Sie, wsimport mit dem Switch "-extension" auszuf\u00FChren.
-
-#BP1.1 R2705
-wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=Port \\"{0}\\" wird ignoriert, er ist nicht mit WS-I BP 1.1 konform: Das WSDL-Binding hat einen gemischten Stil. Es muss ein rpc-literal- oder document-literal-Vorgang sein. Versuchen Sie, wsimport mit dem Switch "-extension" auszuf\u00FChren.
-# Not concatenated with any other string.
-wsdlmodeler.warning.port.SOAPBinding.mixedStyle=kein mit WS-I BP1.1 konformer SOAP-Port \\"{0}\\": Das WSDL-Binding hat einen gemischten Stil. Es muss ein rpc-literal- oder document-literal-Vorgang sein.
-
-wsdlmodeler.warning.ignoringOperation.notSupportedStyle=Vorgang \"{0}\" wird ignoriert: keine Anforderungsantwort oder unidirektionaler Vorgang
-wsdlmodeler.invalid.operation.notSupportedStyle=Ung\u00FCltige WSDL, wsdl:operation \\"{0}\\" in wsdl:portType \\"{1}\\": Keine request-response oder unidirektional
-wsdlmodeler.warning.ignoringOperation.notEncoded=RPC-konformer Vorgang \"{0}\" wird ignoriert: Parameter sind nicht codiert
-wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=Vorgang \\"{0}\\" wird ignoriert: \\"parts\\"-Attribut von \\"soap:body\\"-Element kann nicht bearbeitet werden
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=Vorgang \"{0}\" wird ignoriert: Nachrichtenteil referenziert keine Schemaelementdeklaration
-wsdlmodeler.invalid.doclitoperation=Ung\u00FCltiger wsdl:-Vorgang \\"{0}\\": Es handelt sich um einen document-literal-Vorgang, der Nachrichtenteil muss jedoch eine Schemaelementdeklaration referenzieren
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=Vorgang \\"{0}\\" wird ignoriert: Nachrichtenteil referenziert keine Schematypdeklaration
-wsdlmodeler.invalid.rpclitoperation=Ung\u00FCltiger wsdl:-Vorgang \\"{0}\\": Es handelt sich um einen rpc-literal-Vorgang, der Nachrichtenteil muss jedoch eine Schematypdeklaration referenzieren
-
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=Vorgang \\"{0}\\" wird ignoriert: document-style-Vorg\u00E4nge k\u00F6nnen nicht verarbeitet werden
-wsdlmodeler.warning.bindingOperation.multiplePartBinding=Pr\u00FCfen Sie den abstrakten Vorgang \"{0}\" Binding, Teil \"{1}\" hat mehrere Bindings. Es wird dennoch versucht, Artefakte zu generieren ...
-wsdlmodeler.invalid.bindingOperation.multiplePartBinding=abstrakter Vorgang \"{0}\" Binding, Teil \"{1}\" hat mehrere Bindings.
-wsdlmodeler.warning.ignoringFaults=Von Vorgang \\"{0}\\" deklarierte Faults werden ignoriert
-wsdlmodeler.warning.ignoringFault.notEncoded=Literal-Fault \\"{0}\\" des Binding-Vorgangs \\"{1}\\" wird ignoriert
-wsdlmodeler.warning.ignoringFault.notLiteral=Codierter Fault \\"{0}\\" des Binding-Vorgangs \\"{1}\\" wird ignoriert
-wsdlmodeler.invalid.operation.fault.notLiteral=Codierter Fault \\"{0}\\" in literalem Binding-Vorgang \\"{1}\\" wird ignoriert
-wsdlmodeler.warning.ignoringHeader=Header \\"{0}\\" des Binding-Vorgangs \\"{1}\\" wird ignoriert
-wsdlmodeler.warning.ignoringHeader.partFromBody=Header-Teil: \\"{0}\\" ist bereits durch soapbind:body gebunden, der Teil kann nicht zweimal gebunden werden
-wsdlmodeler.warning.ignoringHeader.notLiteral=Header \"{0}\" des Binding-Vorgangs \"{1}\" wird ignoriert: Nicht literal
-wsdlmodeler.invalid.header.notLiteral=Ung\u00FCltiger Header \\"{0}\\" des Binding-Vorgangs \\"{1}\\": Nicht literal
-wsdlmodeler.warning.ignoringHeader.notFound=Header \"{0}\" des Binding-Vorgangs \"{1}\" wird ignoriert: Nicht gefunden
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.notFound=Header \"{0}\" des Binding-Vorgangs \"{1}\" nicht gefunden
-wsdlmodeler.warning.ignoringHeader.cant.resolve.message=Header \\"{0}\\" des Binding-Vorgangs \\"{1}\\" wird ignoriert: Nachricht kann nicht aufgel\u00F6st werden
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.cant.resolve.message=Header \\"{0}\\" des Binding-Vorgangs \\"{1}\\" wird ignoriert: Nachricht kann nicht aufgel\u00F6st werden
-
-wsdlmodeler.warning.ignoringFault.cant.resolve.message=Fault \\"{0}\\" des Binding-Vorgangs \\"{1}\\" wird ignoriert: Nachricht kann nicht aufgel\u00F6st werden
-wsdlmodeler.invalid.fault.cant.resolve.message=Fault-Nachricht \\"{0}\\" in Binding-Vorgang \\"{1}\\" konnte nicht aufgel\u00F6st werden
-
-wsdlmodeler.warning.ignoringHeader.notEncoded=Header \"{0}\" des Binding-Vorgangs \"{1}\" wird ignoriert: Nicht SOAP-codiert
-wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=Header \"{0}\" des Vorgangs \"{1}\" wird ignoriert: Teil nicht gefunden
-#
-wsdlmodeler.warning.ignoringOperation.notLiteral=Dokumentkonformer Vorgang \"{0}\" wird ignoriert: Parameter sind keine Literale
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=Vorgang \\"{0}\\" wird ignoriert: mehr als ein Teil in Eingabenachricht
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=Vorgang \"{0}\" wird ignoriert: Eingabenachricht ist leer
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=Vorgang \\"{0}\\" wird ignoriert: mehr als ein Teil in Ausgabenachricht
-wsdlmodeler.warning.operation.MoreThanOnePartInMessage=Vorgang \\"{0}\\" wird ignoriert: mehr als ein Teil an Nachrichtentext gebunden
-# Not concatenated with any other string.
-wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=Vorgang \\"{0}\\": mehr als ein Teil an Nachrichtentext gebunden
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=Vorgang \"{0}\" wird ignoriert: Ausgabenachricht ist leer
-wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=Vorgang \"{0}\" wird ignoriert: Binding-Stil und Vorgangsstil stimmen nicht \u00FCberein
-wsdlmodeler.warning.ignoringOperation.partNotFound=Vorgang \"{0}\" wird ignoriert: Teil \"{1}\" nicht gefunden
-wsdlmodeler.error.partNotFound=Teil \"{1}\" des Vorgangs \"{0}\" konnte nicht aufgel\u00F6st werden.
-wsdlmodeler.warning.ignoringFault.documentOperation=Fault \\"{0}\\" des document-style-Vorgangs \\"{1}\\" wird ignoriert
-wsdlmodler.warning.operation.use=Die verwendete WSDL-Datei hat Vorg\u00E4nge mit Literalen und codierter Verwendung. -f:searchschema wird f\u00FCr dieses Szenario nicht unterst\u00FCtzt.
-#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=Name von soap:fault \\"{0}\\" stimmt nicht mit Name von wsdl:fault \\"{1}\\" in Vorgang \\"{2}\\" \u00FCberein
-#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.noSoapFaultName=soap:fault-Name nicht angegeben, wsdl:fault \\"{0}\\" in Vorgang \\"{1}\\"
-
-wsdlmodeler.duplicate.fault.part.name=Fault \"{0}\" von Vorgang \"{1}\" wird ignoriert. Teilname \"{2}\" ist nicht eindeutig
-wsdlmodeler.duplicate.fault.soap.name=Fault \"{0}\" von Vorgang \"{1}\" wird ignoriert. soap:fault-Name \"{2}\" ist nicht eindeutig
-
-wsdlmodeler.warning.ignoringHeaderFault.notFound=Header Fault \"{0}\" wird ignoriert, Teil \"{1}\" kann in Binding \"{2}\" nicht gefunden werden
-# Usage not found. TODO Remove
-#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\"
-
-wsdlmodeler.warning.ignoringHeaderFault.notLiteral=Header Fault-Teil=\\"{0}\\" Nachricht=\\"{1}\\" von Vorgang {2} wird ignoriert, use-Attribut muss \\"literal\\" sein
-
-wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=Header Fault-Teil=\"{0}\" Nachricht=\"{1}\" von Vorgang {2} wird ignoriert
-
-wsdlmodeler.invalid.headerfault.notLiteral=Ung\u00FCltiger Header Fault \\"{0}\\" des Binding-Vorgangs \\"{1}\\": Nicht literal
-wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=Ung\u00FCltiger Header Fault \\"{0}\\" f\u00FCr Header {1} in Vorgang {2}: Teil muss ein \\"element\\"-Attribut angeben
-wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=Ung\u00FCltiger Header \"{0}\" in Vorgang {1}: Teil muss ein \"element\"-Attribut angeben
-
-
-#wsi warnings
-wsdlmodeler.warning.nonconforming.wsdl.import=Nicht konformes WS-I-WSDL f\u00FCr wsdl:import verwendet
-wsdlmodeler.warning.nonconforming.wsdl.types=Nicht konformes WS-I-WSDL f\u00FCr wsdl:types verwendet
-wsdlmodeler.warning.nonconforming.wsdl.use=Nicht konformer WS-I-Vorgang \\"{0}\\" wird mit RPC und SOAP-codiert verarbeitet
-
-# optional parts
-# Not concatenated with any other string.
-wsdlmodeler.error.partsNotFound=Teil \"{0}\" wurde in Nachricht \"{1}\" nicht gefunden, falsche WSDL
-
-# soap 1.2
-wsdlmodeler.warning.port.SOAPBinding12=SOAP-Port \\"{0}\\": Verwendet ein Nicht-Standard-SOAP 1.2-Binding.
-wsdlmodeler.warning.ignoringSOAPBinding12=SOAP-Port \"{0}\" wird ignoriert: Er verwendet Nicht-Standard-SOAP 1.2-Binding.\nSie m\u00FCssen die Option \"-extension\" angeben, um dieses Binding zu verwenden.
-
-#WSI-BP1.0 Warning/Errors
-wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile Version 1.0, Namespace-Attribut nicht zul\u00E4ssig in doc/lit f\u00FCr {0}: \\"{1}\\"
-
-# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException"
-wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile Version 1.0, Namespace-Attribut nicht zul\u00E4ssig in doc/lit oder rpc/lit f\u00FCr {0}: \\"{1}\\"
-
-#WSI-BP 1.1 Warning/Errors
-# R2911
-mimemodeler.invalidMimePart.moreThanOneSOAPBody=Vorgang \\"{0}\\" wird ignoriert. Die Multipart/Related-Struktur enth\u00E4lt einen ung\u00FCltigen Root Part: mehr als ein soap:body Part gefunden
-
-# R2906
-mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=Header nicht in Root mime:part mit soap:body, Header in Vorgang \\"{0}\\" werden ignoriert
-
-# R2909
-mimemodeler.invalidMimeContent.differentPart=Mime:part wird ignoriert. mime:part ung\u00FCltig, mime:content enth\u00E4lt anderes Part-Attribut.
-
-mimemodeler.invalidMimeContent.invalidSchemaType=Mime:part wird ignoriert. MIME-Part: {0} kann Schematyp nicht zugeordnet werden: {1}
-
-# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute.
-mimemodeler.invalidMimeContent.mesagePartElementKind=wsdl:part-Element, das von mime:content Part-Attribut referenziert wird: {0} muss mit type-Attribut definiert werden.
-
-# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute.
-mimemodeler.invalidMimeContent.missingPartAttribute=Vorgang \\"{0}\\" wird ignoriert, Part-Attribut in mime:content fehlt. Part-Attribut muss in mime:content-Deklaration vorhanden sein.
-
-mimemodeler.invalidMimeContent.missingTypeAttribute=Type-Attribut fehlt in mime:content in Vorgang \"{0}\". Part-Attribut muss in mime:content-Deklaration vorhanden sein.
-
-# unknown schematype
-mimemodeler.invalidMimeContent.unknownSchemaType=Unbekannter Schematyp: {1} f\u00FCr mime:content Part: {0}
-mimemodeler.invalidMimeContent.errorLoadingJavaClass=Klasse \\"{0}\\" f\u00FCr MIME-Typ \\"{1}\\" konnte nicht gefunden werden
-
-# missing wsdl:part referenced by the mime:content
-wsdlmodeler.warning.ignoringMimePart.notFound=Mime:part wird ignoriert, Part-Element \\"{0}\\", das von mime:content im WSDL-Vorgang \\"{1}\\" referenziert wird, kann nicht gefunden werden
-
-mimemodeler.elementPart.invalidElementMimeType=Das mime:content-Part-Element bezieht sich auf wsdl:part \\"{0}\\", das mit element-Attribut definiert wird. Stellen Sie sicher, dass der MIME-Typ: \\"{1}\\" zur Serialisierung von XML geeignet ist.
-
-# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute.
-mimemodeler.invalidMimePart.nameNotAllowed=Name-Attribut in wsdl:part in Vorgang \"{0}\" wird ignoriert. Es ist gem\u00E4\u00DF WS-I AP 1.0 nicht zul\u00E4ssig.
-
-
-wsdlmodeler20.rpcenc.not.supported=RPC-/codierte WSDLs werden in JAXWS 2.0 nicht unterst\u00FCtzt.
-wsdlmodeler.warning.ignoringOperation.notNCName=Vorgang \\"{0}\\" wird ignoriert, sein Name enth\u00E4lt ein ung\u00FCltiges Zeichen ''{1}''. Es handelt sich um einen rpc-literal-Vorgang - jaxws kann diesen nicht serialisieren.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=Vorgang \\"{0}\\" wird ignoriert, Java-Methode kann nicht generiert werden. Parameter: part "{2}\\" in wsdl:message \\"{1}\\", ist ein Java-Schl\u00FCsselwort. Verwenden Sie die Anpassung, um den Parameternamen zu \u00E4ndern, oder \u00E4ndern Sie den wsdl:part-Namen.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=Ung\u00FCltiger Vorgang \\"{0}\\", Java-Methode kann nicht generiert werden. Parameter: part "{2}\\" in wsdl:message \\"{1}\\", ist ein Java-Schl\u00FCsselwort. Verwenden Sie die Anpassung, um den Parameternamen zu \u00E4ndern, oder \u00E4ndern Sie den wsdl:part-Namen.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=Vorgang \\"{0}\\" wird ignoriert, Java-Methodenparameter kann nicht generiert werden. Lokaler Name des untergeordneten Elements des Wrappers \\"{1}\\" im globalen Element \\"{2}\\" ist ein Java-Schl\u00FCsselwort. Verwenden Sie die Anpassung, um den Parameternamen zu \u00E4ndern.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=Ung\u00FCltiger Vorgang \\"{0}\\", Java-Methodenparameter kann nicht generiert werden. Lokaler Name des untergeordneten Elements des Wrappers \\"{1}\\" im globalen Element \\"{2}\\" ist ein Java-Schl\u00FCsselwort. Verwenden Sie die Anpassung, um den Parameternamen zu \u00E4ndern.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=Vorgang \"{0}\" wird ignoriert, Java-Methode kann nicht generiert werden. Parameter, angepasster Name \"{1}\" ist ein Java-Schl\u00FCsselwort.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=Ung\u00FCltiger Vorgang \"{0}\", Java-Methode kann nicht generiert werden. Parameter, angepasster Name \"{1}\" ist ein Java-Schl\u00FCsselwort.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=Vorgang \"{0}\" wird ignoriert, er ist ein reserviertes Java-Wort, Java-Methode kann nicht generiert werden. Verwenden Sie die Anpassung, um den Vorgangsnamen zu \u00E4ndern.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=Ung\u00FCltiger Vorgang \"{0}\", er ist ein reserviertes Java-Wort, Java-Methode kann nicht generiert werden. Verwenden Sie die Anpassung, um den Vorgangsnamen zu \u00E4ndern.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=Vorgang \\"{0}\\" wird ignoriert, Java-Methode kann nicht generiert werden, angepasster Name \\"{1}\\" von wsdl:operation ist ein Java-Schl\u00FCsselwort.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=Ung\u00FCltiger Vorgang \\"{0}\\", Java-Methode kann nicht generiert werden, angepasster Name \\"{1}\\" von wsdl:operation ist ein Java-Schl\u00FCsselwort.
-
-wsdlmodeler.jaxb.javatype.notfound=Schemabeschreibung {0} in Nachrichtenteil \\"{1}\\" ist nicht definiert und konnte nicht an Java gebunden werden. M\u00F6glicherweise ist der Schemadeskriptor {0} nicht in dem Schema definiert, das in WSDL importiert/einbezogen wurde. Sie k\u00F6nnen diese Importe/Includes entweder hinzuf\u00FCgen oder wsimport ausf\u00FChren und das Schemaverzeichnis mit dem Switch "-b" angeben.
-wsdlmodeler.unsupportedBinding.mime=WSDL-MIME-Binding wird aktuell nicht unterst\u00FCtzt.
-
-wsdlmodeler.nonUnique.body.error=Keine eindeutigen Nachrichtentextteile. Gem\u00E4\u00DF BP 1.1 R2710 m\u00FCssen Vorg\u00E4nge in einem Port eine eindeutige Vorgangssignatur bei dem Transport enthalten, um eine erfolgreiche \u00DCbertragung zu gew\u00E4hrleisten. In Port {0} haben die Vorg\u00E4nge \\"{1}\\" und \\"{2}\\" denselben Anforderungsnachrichtentextblock {3}. Versuchen Sie, wsimport mit -extension Switch auszuf\u00FChren, die Laufzeitumgebung wird versuchen, die \u00DCbertragung mit SOAPAction vorzunehmen
-wsdlmodeler.nonUnique.body.warning=Keine eindeutigen Nachrichtentextteile. Gem\u00E4\u00DF BP 1.1 R2710 m\u00FCssen Vorg\u00E4nge in einem Port eine eindeutige Vorgangssignatur bei dem Transport enthalten, um eine erfolgreiche \u00DCbertragung zu gew\u00E4hrleisten. In Port {0} haben die Vorg\u00E4nge \\"{1}\\" und \\"{2}\\" denselben Anforderungsnachrichtentextblock {3}. Die Methode kann m\u00F6glicherweise nicht gesendet werden, die Laufzeitumgebung wird versuchen, die \u00DCbertragung mit SOAPAction vorzunehmen
-
-wsdlmodeler.rpclit.unkownschematype=XML-Typ \\"{0}\\" konnte nicht aufgel\u00F6st werden, Binding von XML mit JAVA war nicht erfolgreich. Pr\u00FCfen Sie wsdl:part \\"{1}\\" in wsdl:message \\"{2}\\".
-
-wsdlmodeler.responsebean.notfound=Wsimport konnte kein asynchrones Antwort-Bean f\u00FCr Vorgang {0} generieren
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_es.properties
deleted file mode 100644
index 31b0d9cd..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_es.properties
+++ /dev/null
@@ -1,246 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# general
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-modeler.nestedModelError=error de modelador: {0}
-
-
-# WSDLModeler
-# Usage not found. TODO Remove
-#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0}
-wsdlmodeler.invalidOperation=operaci\u00F3n no v\u00E1lida: {0}
-wsdlmodeler.invalidState.modelingOperation=estado no v\u00E1lido al modelar la operaci\u00F3n: {0}
-wsdlmodeler.resultIsInOutParameter=el resultado es el par\u00E1metro \"inout\" en la operaci\u00F3n: {0}
-wsdlmodeler.invalid.parameterorder.parameter=\\"{0}\\" especificado en el atributo parameterOrder de la operaci\u00F3n \\"{1}\\" no es una parte v\u00E1lida del mensaje.
-wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=se ha dejado m\u00E1s de una parte en el atributo parameterOrder de la operaci\u00F3n \"{0}\"
-wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=El atributo parameterOrder en la operaci\u00F3n \\"{0}\\" no es v\u00E1lido; ignorando la indicaci\u00F3n parameterOrder
-wsdlmodeler.invalid.parameter.differentTypes=el par\u00E1metro \"{0}\" de la operaci\u00F3n \"{1}\" aparece con diferentes tipos en los mensajes de entrada y salida
-wsdlmodeler.invalid.bindingOperation.notInPortType=en el enlace \"{1}\", la operaci\u00F3n \"{0}\" no aparece en el tipo de puerto correspondiente
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=El mensaje de entrada de la operaci\u00F3n de enlace \"{0}\" no tiene ninguna extensi\u00F3n de cuerpo de SOAP.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=El mensaje de salida de la operaci\u00F3n de enlace \"{0}\" no tiene ninguna extensi\u00F3n de cuerpo de SOAP.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingInputName=La operaci\u00F3n de enlace \"{0}\" debe especificar un nombre para su mensaje de entrada.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingOutputName=La operaci\u00F3n de enlace \"{0}\" debe especificar un nombre para su mensaje de salida.
-wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=en el enlace \\"{1}\\", la operaci\u00F3n \\"{0}\\" no hace referencia a una operaci\u00F3n \u00FAnica en el tipo de puerto correspondiente
-wsdlmodeler.invalid.bindingOperation.notFound=en el enlace \\"{1}\\", la operaci\u00F3n \\"{0}\\" no coincide con ninguna operaci\u00F3n en el tipo de puerto correspondiente
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=El mensaje de entrada de la operaci\u00F3n de enlace \\"{0}\\" debe especificar un valor para el atributo \\"namespace\\".
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=El mensaje de salida de la operaci\u00F3n de enlace \"{0}\" debe especificar un valor para el atributo \"namespace\".
-wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=la cabecera de entrada \\"{1}\\" de la operaci\u00F3n de enlace \\"{0}\\" debe especificar un valor para el atributo \\"namespace\\"
-wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=la cabecera de salida \\"{1}\\" de la operaci\u00F3n de enlace \\"{0}\\" debe especificar un valor para el atributo \\"namespace\\"
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notUnique=El fallo \"{0}\" de la operaci\u00F3n \"{1}\" coincide con m\u00E1s de un fallo de la operaci\u00F3n de tipo de puerto correspondiente.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notFound=El fallo \"{0}\" de la operaci\u00F3n \"{1}\" no coincide con ning\u00FAn fallo de la operaci\u00F3n de tipo de puerto correspondiente.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.portTypeFault.notFound=El fallo \\"{0}\\" de la operaci\u00F3n portType \\"{1}\\" no coincide con ning\u00FAn fallo en la operaci\u00F3n de enlace correspondiente.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=El fallo \"{0}\" de la operaci\u00F3n \"{1}\" no tiene ninguna extensi\u00F3n de fallo de SOAP.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingName=El fallo \\"{0}\\" en la operaci\u00F3n \\"{1}\\" debe especificar un valor para el atributo \\"name\\".
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingNamespace=El fallo \\"{0}\\" en la operaci\u00F3n \\"{1}\\" debe especificar un valor para el atributo \\"namespace\\".
-wsdlmodeler.invalid.bindingFault.emptyMessage=el fallo \"{0}\" hace referencia al mensaje \"{1}\", pero el mensaje no tiene partes
-wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=el fallo \"{0}\" hace referencia al mensaje \"{1}\", pero el mensaje tiene varias partes
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute
-# Not concatenated with any other string.
-wsdlmodeler.invalid.message.partMustHaveElementDescriptor=En el mensaje \\"{0}\\", la parte \\"{1}\\" debe especificar un atributo \\"element\\".
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid=invalid WSDL document
-wsdlmodeler.unsolvableNamingConflicts=se han producido los siguientes conflictos de nomenclatura: {0}
-#
-wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=ignorando elemento de esquema (versi\u00F3n no soportada): {0}
-wsdlmodeler.warning.searchSchema.unrecognizedTypes=se han encontrado {0} tipos no reconocidos
-wsdlmodeler.warning.noServiceDefinitionsFound=en el documento WSDL no se define ning\u00FAn servicio
-wsdlmodeler.warning.noPortsInService=El servicio \\"{0}\\" no contiene ning\u00FAn puerto que se pueda utilizar. Pruebe a ejecutar wsimport con el conmutador -extension.
-wsdlmodeler.warning.noOperationsInPort=El puerto \"{0}\" no contiene ninguna operaci\u00F3n que se pueda utilizar
-wsdlmodeler.warning.ignoringNonSOAPPort=ignorando puerto \"{0}\": no es un puerto SOAP est\u00E1ndar. Pruebe a ejecutar wsimport con el conmutador -extension.
-# Not concatenated with any other string.
-wsdlmodeler.warning.nonSOAPPort=El puerto \"{0}\": no es un puerto SOAP est\u00E1ndar. Es posible que los artefactos generados no funcionen con JAV-WS en tiempo de ejecuci\u00F3n.
-wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=ignorando puerto \"{0}\": no se ha especificado ninguna direcci\u00F3n SOAP. Pruebe a ejecutar wsimport con el conmutador -extension.
-# Not concatenated with any other string.
-wsdlmodeler.warning.noSOAPAddress=El puerto \\"{0}\\" no es un puerto SOAP. No tiene soap:address.
-wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:ignorando puerto SOAP \"{0}\": transporte no reconocido. Pruebe a ejecutar wsimport con el conmutador -extension.
-
-#BP1.1 R2705
-wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=ignorando puerto \\"{0}\\"; no es compatible con WS-I BP 1.1: el enlace WSDL tiene un estilo mixto. Debe ser una operaci\u00F3n de literal RPC o literal de documento. Pruebe a ejecutar wsimport con el conmutador -extension.
-# Not concatenated with any other string.
-wsdlmodeler.warning.port.SOAPBinding.mixedStyle=No es un puerto SOAP compatible con WS-I BP 1.1 \\"{0}\\": el enlace WSDL tiene un estilo mixto. Debe ser una operaci\u00F3n de literal RPC o literal de documento.
-
-wsdlmodeler.warning.ignoringOperation.notSupportedStyle=ignorando operaci\u00F3n \"{0}\": No es petici\u00F3n-respuesta o unidireccional
-wsdlmodeler.invalid.operation.notSupportedStyle=WSDL no v\u00E1lido, wsdl:operation \\"{0}\\" en wsdl:portType \\"{1}\\": no es una respuesta de solicitud ni unidireccional
-wsdlmodeler.warning.ignoringOperation.notEncoded=ignorando operaci\u00F3n de estilo RPC \"{0}\": Los par\u00E1metros no est\u00E1n codificados
-wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=ignorando operaci\u00F3n \\"{0}\\": no se puede manejar el atributo \\"parts\\" del elemento \\"soap:body\\"
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=ignorando operaci\u00F3n \"{0}\": la parte del mensaje no hace referencia a una declaraci\u00F3n de elemento de esquema
-wsdlmodeler.invalid.doclitoperation=wsdl:operation \\"{0}\\" no v\u00E1lido: es una operaci\u00F3n de literal de documento; la parte del mensaje debe hacer referencia a una declaraci\u00F3n de elemento de esquema
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=ignorando operaci\u00F3n \"{0}\": la parte del mensaje no hace referencia a una declaraci\u00F3n de tipo de esquema
-wsdlmodeler.invalid.rpclitoperation=wsdl:operation \\"{0}\\" no v\u00E1lido: es una operaci\u00F3n de literal RPC; la parte del mensaje debe hacer referencia a una declaraci\u00F3n de tipo de esquema
-
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=ignorando la operaci\u00F3n \"{0}\": no se pueden manejar operaciones de estilo de documento
-wsdlmodeler.warning.bindingOperation.multiplePartBinding=Compruebe el enlace \\"{0}\\" de la operaci\u00F3n abstracta; la parte \\"{1}\\" tiene varios enlaces. De todas formas, se intentar\u00E1 generar artefactos...
-wsdlmodeler.invalid.bindingOperation.multiplePartBinding=enlace \"{0}\" de la operaci\u00F3n abstracta; la parte \"{1}\" tiene varios enlaces.
-wsdlmodeler.warning.ignoringFaults=ignorando los fallos declarados por la operaci\u00F3n \\"{0}\\"
-wsdlmodeler.warning.ignoringFault.notEncoded=ignorando el fallo de literal \"{0}\" de la operaci\u00F3n de enlace \"{1}\"
-wsdlmodeler.warning.ignoringFault.notLiteral=ignorando el fallo codificado \"{0}\" de la operaci\u00F3n de enlace \"{1}\"
-wsdlmodeler.invalid.operation.fault.notLiteral=ignorando el fallo codificado \"{0}\"en la operaci\u00F3n de enlace de literal \"{1}\"
-wsdlmodeler.warning.ignoringHeader=ignorando cabecera \"{0}\" de la operaci\u00F3n de enlace \"{1}\"
-wsdlmodeler.warning.ignoringHeader.partFromBody=la parte de la cabecera: \\"{0}\\" ya est\u00E1 enlazada por soapbind:body; no es v\u00E1lido enlazar dos veces la parte
-wsdlmodeler.warning.ignoringHeader.notLiteral=ignorando cabecera \"{0}\" de la operaci\u00F3n de enlace \"{1}\": No es literal
-wsdlmodeler.invalid.header.notLiteral=Cabecera no v\u00E1lida \"{0}\" de la operaci\u00F3n de enlace \"{1}\": no es literal
-wsdlmodeler.warning.ignoringHeader.notFound=ignorando cabecera \"{0}\" de la operaci\u00F3n de enlace \"{1}\": no se ha encontrado
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.notFound=No se ha encontrado la cabecera \"{0}\" de la operaci\u00F3n de enlace \"{1}\".
-wsdlmodeler.warning.ignoringHeader.cant.resolve.message=ignorando cabecera \"{0}\" de la operaci\u00F3n de enlace \"{1}\": no se puede resolver el mensaje
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.cant.resolve.message=Cabecera \"{0}\" de la operaci\u00F3n de enlace \"{1}\": no se puede resolver el mensaje.
-
-wsdlmodeler.warning.ignoringFault.cant.resolve.message=ignorando fallo \"{0}\" de la operaci\u00F3n de enlace \"{1}\": no se puede resolver el mensaje
-wsdlmodeler.invalid.fault.cant.resolve.message=el mensaje de fallo \\"{0}\\" de la operaci\u00F3n de enlace \\"{1}\\" no se ha podido resolver
-
-wsdlmodeler.warning.ignoringHeader.notEncoded=ignorando cabecera \"{0}\" de la operaci\u00F3n de enlace \"{1}\": No es SOAP-Encoded
-wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=ignorando cabecera \"{0}\" de la operaci\u00F3n \"{1}\": parte no encontrada
-#
-wsdlmodeler.warning.ignoringOperation.notLiteral=ignorando operaci\u00F3n de estilo de documento \"{0}\": Los par\u00E1metros no son literales
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=ignorando operaci\u00F3n \"{0}\": hay m\u00E1s de una parte en el mensaje de entrada
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=ignorando operaci\u00F3n \\"{0}\\": el mensaje de entrada est\u00E1 vac\u00EDo
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=ignorando operaci\u00F3n \"{0}\": hay m\u00E1s de una parte en el mensaje de salida
-wsdlmodeler.warning.operation.MoreThanOnePartInMessage=Ignorando operaci\u00F3n \"{0}\": hay m\u00E1s de una parte enlazada al cuerpo
-# Not concatenated with any other string.
-wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=Operaci\u00F3n \"{0}\": hay m\u00E1s de una parte enlazada al cuerpo.
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=ignorando operaci\u00F3n \\"{0}\\": el mensaje de salida est\u00E1 vac\u00EDo
-wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=ignorando operaci\u00F3n \"{0}\": hay un conflicto entre el estilo del enlace y el estilo de la operaci\u00F3n
-wsdlmodeler.warning.ignoringOperation.partNotFound=ignorando operaci\u00F3n \"{0}\": la parte \"{1}\" no se ha encontrado
-wsdlmodeler.error.partNotFound=la parte \"{1}\" de la operaci\u00F3n \"{0}\" no se ha podido resolver.
-wsdlmodeler.warning.ignoringFault.documentOperation=ignorando el fallo \"{0}\" de la operaci\u00F3n de estilo de documento \"{1}\"
-wsdlmodler.warning.operation.use=El WSDL utilizado tiene operaciones con uso literal y codificado. -f:searchschema no est\u00E1 soportado para este caso.
-#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=el nombre de soap:fault \\"{0}\\" no coincide con el nombre de wsdl:fault \\"{1}\\" en la operaci\u00F3n \\"{2}\\"
-#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.noSoapFaultName=no se ha especificado el nombre de soap:fault, wsdl:fault \\"{0}\\" en la operaci\u00F3n \\"{1}\\"
-
-wsdlmodeler.duplicate.fault.part.name=ignorando fallo \"{0}\" de la operaci\u00F3n \"{1}\", el nombre de parte \"{2}\" no es \u00FAnico
-wsdlmodeler.duplicate.fault.soap.name=ignorando fallo \\"{0}\\" de la operaci\u00F3n \\"{1}\\"; el nombre de soap:fault \\"{2}\\" no es \u00FAnico
-
-wsdlmodeler.warning.ignoringHeaderFault.notFound=ignorando fallo de cabecera \"{0}\"; no se ha encontrado la parte \"{1}\" en el enlace \"{2}\"
-# Usage not found. TODO Remove
-#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\"
-
-wsdlmodeler.warning.ignoringHeaderFault.notLiteral=ignorando parte de fallo de la cabecera=\\"{0}\\" mensaje=\\"{1}\\" de operaci\u00F3n {2}; el atributo de uso debe ser \\"literal\\"
-
-wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=ignorando parte de fallo de la cabecera=\\"{0}\\" mensaje=\\"{1}\\" de operaci\u00F3n {2}
-
-wsdlmodeler.invalid.headerfault.notLiteral=Headerfault \\"{0}\\" no v\u00E1lido de la operaci\u00F3n de enlace \\"{1}\\": no es literal
-wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=Headerfault no v\u00E1lido \\"{0}\\" para la cabecera {1} en la operaci\u00F3n {2}: la parte debe especificar un atributo \\"element\\"
-wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=Cabecera no v\u00E1lida \\"{0}\\" en la operaci\u00F3n {1}: la parte debe especificar un atributo \\"element\\"
-
-
-#wsi warnings
-wsdlmodeler.warning.nonconforming.wsdl.import=Se ha utilizado un WSDL no compatible con WS-I para wsdl:import
-wsdlmodeler.warning.nonconforming.wsdl.types=Se ha utilizado un WSDL no compatible con WS-I para wsdl:types
-wsdlmodeler.warning.nonconforming.wsdl.use=Procesando operaci\u00F3n incompatible con WS-I \"{0}\" con estilo RPC y codificada con SOAP
-
-# optional parts
-# Not concatenated with any other string.
-wsdlmodeler.error.partsNotFound=No se han encontrado las partes \"{0}\" en el mensaje \"{1}\", WSDL incorrecto.
-
-# soap 1.2
-wsdlmodeler.warning.port.SOAPBinding12=El puerto de SOAP \"{0}\": utiliza un enlace SOAP 1.2 no est\u00E1ndar.
-wsdlmodeler.warning.ignoringSOAPBinding12=Ignorando el puerto SOAP \\"{0}\\": utiliza un enlace SOAP 1.2 no est\u00E1ndar.\nDebe especificar la opci\u00F3n \\"-extension\\" para utilizar este enlace.
-
-#WSI-BP1.0 Warning/Errors
-wsdlmodeler.warning.r2716=El atributo namespace de R2716 WSI-BasicProfile ver. 1.0 no est\u00E1 permitido en doc/lit para {0}: \\"{1}\\"
-
-# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException"
-wsdlmodeler.warning.r2716r2726=El atributo namespace de R2716/R2726 WSI-BasicProfile ver. 1.0 no est\u00E1 permitido en doc/lit o RPC/lit para {0}: \\"{1}\\"
-
-#WSI-BP 1.1 Warning/Errors
-# R2911
-mimemodeler.invalidMimePart.moreThanOneSOAPBody=Ignorando operaci\u00F3n \\"{0}\\". La estructura de varias partes/relacionada tiene una parte ra\u00EDz no v\u00E1lida: se ha encontrado m\u00E1s de una parte soap:body
-
-# R2906
-mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=Las cabeceras no est\u00E1n en mime:part ra\u00EDz con soap:body; ignorando cabeceras en la operaci\u00F3n \\"{0}\\"
-
-# R2909
-mimemodeler.invalidMimeContent.differentPart=Ignorando mime:part. Mime:part no v\u00E1lida; mime:content tiene un atributo part diferente.
-
-mimemodeler.invalidMimeContent.invalidSchemaType=Ignorando mime:part. La mime part: {0} no se puede asignar a un tipo de esquema {1}
-
-# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute.
-mimemodeler.invalidMimeContent.mesagePartElementKind=El elemento wsdl:part al que hace referencia el atributo part de mime:content: {0} se debe definir utilizando el atributo type.
-
-# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute.
-mimemodeler.invalidMimeContent.missingPartAttribute=Ignorando operaci\u00F3n \"{0}\"; falta el atributo part en mime:content. El atributo part debe encontrarse en la declaraci\u00F3n de mime:content.
-
-mimemodeler.invalidMimeContent.missingTypeAttribute=Falta el atributo type en mime:content en la operaci\u00F3n \"{0}\". El atributo part debe encontrarse en la declaraci\u00F3n de mime:content.
-
-# unknown schematype
-mimemodeler.invalidMimeContent.unknownSchemaType=Tipo de esquema desconocido: {1} para la parte mime:content: {0}
-mimemodeler.invalidMimeContent.errorLoadingJavaClass=No se ha encontrado la clase \"{0}\" para el tipo mime \"{1}\"
-
-# missing wsdl:part referenced by the mime:content
-wsdlmodeler.warning.ignoringMimePart.notFound=ignorando mime:part; no se ha encontrado la parte \\"{0}\\" a la que hace referencia mime:content en wsdl:operation \\"{1}\\"
-
-mimemodeler.elementPart.invalidElementMimeType=La parte mime:content hace referencia a wsdl:part \\"{0}\\", que se ha definido utilizando el atributo element. Aseg\u00FArese de que el tipo mime: \\"{1}\\" es adecuado para serializar XML.
-
-# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute.
-mimemodeler.invalidMimePart.nameNotAllowed=se ha ignorado el atributo name en wsdl:part en la operaci\u00F3n \\"{0}\\". No est\u00E1 permitido de acuerdo con WS-I AP 1.0.
-
-
-wsdlmodeler20.rpcenc.not.supported=las WSDL de RPC/codificadas no est\u00E1n soportadas en JAX-WS 2.0.
-wsdlmodeler.warning.ignoringOperation.notNCName=Ignorando operaci\u00F3n \\"{0}\\"; tiene el car\u00E1cter no v\u00E1lido ''{1}'' en el nombre. Su operaci\u00F3n de literal RPC, jaxws, no podr\u00E1 serializarla.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=Ignorando operaci\u00F3n \\"{0}\\"; no se puede generar el m\u00E9todo Java. El par\u00E1metro part "{2}\\" de wsdl:message \\"{1}\\" es una palabra clave de Java. Utilice la personalizaci\u00F3n para cambiar el nombre del par\u00E1metro o el nombre de wsdl:part.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=Operaci\u00F3n \"{0}\" no v\u00E1lida; no se puede generar el m\u00E9todo Java. El par\u00E1metro part "{2}\\" de wsdl:message \\"{1}\\" es una palabra clave de Java. Utilice la personalizaci\u00F3n para cambiar el nombre del par\u00E1metro o el nombre de wsdl:part.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=Ignorando operaci\u00F3n \"{0}\"; no se puede generar el par\u00E1metro del m\u00E9todo Java. El nombre local del envoltorio secundario \"{1}\" en el elemento global \"{2}\" es una palabra clave de Java. Utilice la personalizaci\u00F3n para cambiar el nombre del par\u00E1metro.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=Operaci\u00F3n no v\u00E1lida \"{0}\"; no se puede generar el par\u00E1metro del m\u00E9todo Java. El nombre local del envoltorio secundario \"{1}\" en el elemento global \"{2}\" es una palabra clave de Java. Utilice la personalizaci\u00F3n para cambiar el nombre del par\u00E1metro.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=Ignorando operaci\u00F3n \\"{0}\\"; no se puede generar el m\u00E9todo Java. El nombre personalizado del par\u00E1metro \\"{1}\\" es una palabra clave de Java.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=Operaci\u00F3n \"{0}\" no v\u00E1lida; no se puede generar el m\u00E9todo Java. El nombre personalizado del par\u00E1metro \\"{1}\\" es una palabra clave de Java.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=Ignorando operaci\u00F3n \\"{0}\\"; es una palabra reservada de Java. No se puede generar el m\u00E9todo Java. Utilice la personalizaci\u00F3n para cambiar el nombre de la operaci\u00F3n.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=Operaci\u00F3n no v\u00E1lida \"{0}\"; es una palabra reservada de Java. No se puede generar el m\u00E9todo Java. Utilice la personalizaci\u00F3n para cambiar el nombre de la operaci\u00F3n.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=Ignorando operaci\u00F3n \\"{0}\\"; no se puede generar el m\u00E9todo Java. El nombre personalizado \\"{1}\\" de wsdl:operation es una palabra clave de Java.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=Operaci\u00F3n no v\u00E1lida \"{0}\"; no se puede generar el m\u00E9todo Java. El nombre personalizado \\"{1}\\" de wsdl:operation es una palabra clave de Java.
-
-wsdlmodeler.jaxb.javatype.notfound=No se ha definido el descriptor de esquema {0} en la parte del mensaje \\"{1}\\" y no puede estar enlazada a Java. Quiz\u00E1 el descriptor de esquema {0} no est\u00E1 definido en el esquema importado/incluido en el WSDL. Puede agregar dichas importaciones/inclusiones o ejecutar wsimport y proporcionar la ubicaci\u00F3n del esquema utilizando el conmutador -b.
-wsdlmodeler.unsupportedBinding.mime=El enlace WSDL MIME no est\u00E1 soportado actualmente.
-
-wsdlmodeler.nonUnique.body.error=Partes de cuerpo no \u00FAnicas. De acuerdo con RBP 1.1 R2710, en un puerto, las operaciones deben tener una firma de operaci\u00F3n \u00FAnica en la transmisi\u00F3n para que se distribuyan correctamente. En el puerto {0}, las operaciones \\"{1}\\" y \\"{2}\\" tienen el mismo bloque de cuerpo de solicitud {3}. Pruebe a ejecutar wsimport con el conmutador -extension. El tiempo de ejecuci\u00F3n intentar\u00E1 distribuirlo utilizando SOAPAction
-wsdlmodeler.nonUnique.body.warning=Partes de cuerpo no \u00FAnicas. De acuerdo con RBP 1.1 R2710, en un puerto, las operaciones deben tener una firma de operaci\u00F3n \u00FAnica en la transmisi\u00F3n para que se distribuyan correctamente. En el puerto {0}, las operaciones \\"{1}\\" y \\"{2}\\" tienen el mismo bloque de cuerpo de solicitud {3}. Puede que la distribuci\u00F3n del m\u00E9todo falle. El tiempo de ejecuci\u00F3n intentar\u00E1 distribuirlo utilizando SOAPAction.
-
-wsdlmodeler.rpclit.unkownschematype=El tipo XML \\"{0}\\" no se ha podido resolver. Fallo del enlace entre XML y JAVA. Compruebe wsdl:part \\"{1}\\" en wsdl:message \\"{2}\\".
-
-wsdlmodeler.responsebean.notfound=Fallo de wsimport al generar el bean de respuesta as\u00EDncrona para la operaci\u00F3n: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_fr.properties
deleted file mode 100644
index a1121628..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_fr.properties
+++ /dev/null
@@ -1,246 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# general
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-modeler.nestedModelError=erreur de modeleur : {0}
-
-
-# WSDLModeler
-# Usage not found. TODO Remove
-#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0}
-wsdlmodeler.invalidOperation=op\u00E9ration non valide : {0}
-wsdlmodeler.invalidState.modelingOperation=\u00E9tat non valide lors de la mod\u00E9lisation de l''op\u00E9ration : {0}
-wsdlmodeler.resultIsInOutParameter=le r\u00E9sultat est le param\u00E8tre \"inout\" dans l''op\u00E9ration : {0}
-wsdlmodeler.invalid.parameterorder.parameter=\"{0}\" indiqu\u00E9 dans l''attribut parameterOrder de l''op\u00E9ration \"{1}\" n''est pas une partie valide du message.
-wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=plusieurs \u00E9l\u00E9ments PART n''ont pas \u00E9t\u00E9 indiqu\u00E9s dans l''attribut parameterOrder de l''op\u00E9ration \"{0}\"
-wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=L''attribut parameterOrder sur l''op\u00E9ration \"{0}\" n''est pas valide, non-prise en compte du conseil parameterOrder
-wsdlmodeler.invalid.parameter.differentTypes=le param\u00E8tre \"{0}\" de l''op\u00E9ration \"{1}\" comporte des types diff\u00E9rents dans les messages d''entr\u00E9e et de sortie
-wsdlmodeler.invalid.bindingOperation.notInPortType=dans le binding \"{1}\", l''op\u00E9ration \"{0}\" n''appara\u00EEt pas dans le type de port correspondant
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=le message d''entr\u00E9e de l''op\u00E9ration bind \"{0}\" ne comporte pas d''extension de corps SOAP
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=le message de sortie de l''op\u00E9ration bind \"{0}\" ne comporte pas d''extension de corps SOAP
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingInputName=l''op\u00E9ration de binding \"{0}\" doit indiquer un nom pour son message d''entr\u00E9e
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingOutputName=l''op\u00E9ration de binding \"{0}\" doit indiquer un nom pour son message de sortie
-wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=dans le binding \"{1}\", l''op\u00E9ration \"{0}\" ne r\u00E9f\u00E9rence pas une op\u00E9ration unique dans le type de port correspondant
-wsdlmodeler.invalid.bindingOperation.notFound=dans le binding \"{1}\", l''op\u00E9ration \"{0}\" ne correspond \u00E0 aucune op\u00E9ration dans le type de port correspondant
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=le message d''entr\u00E9e de l''op\u00E9ration bind \"{0}\" doit indiquer une valeur pour l''attribut \"namespace\"
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=le message de sortie de l''op\u00E9ration bind \"{0}\" doit indiquer une valeur pour l''attribut \"namespace\"
-wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=l''en-t\u00EAte d''entr\u00E9e \"{1}\" de l''op\u00E9ration de binding \"{0}\" doit indiquer une valeur pour l''attribut \"namespace\"
-wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=l''en-t\u00EAte de sortie \"{1}\" de l''op\u00E9ration de binding \"{0}\" doit indiquer une valeur pour l''attribut \"namespace\"
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notUnique=l''erreur \"{0}\" dans l''op\u00E9ration \"{1}\" concorde avec plus d''une erreur dans l''op\u00E9ration de type port correspondant
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notFound=l''erreur \"{0}\" dans l''op\u00E9ration \"{1}\" ne concorde avec aucune erreur dans l''op\u00E9ration de type port correspondant
-# Not concatenated with any other string.
-wsdlmodeler.invalid.portTypeFault.notFound=l''erreur \"{0}\" dans l''op\u00E9ration portType \"{1}\" ne concorde avec aucune erreur dans l''op\u00E9ration de binding correspondant
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=l''erreur \"{0}\" dans l''op\u00E9ration \"{1}\" ne comporte pas d''extension d''erreur SOAP
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingName=l''erreur \"{0}\" dans l''op\u00E9ration \"{1}\" doit indiquer une valeur pour l''attribut \"name\"
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingNamespace=l''erreur \"{0}\" dans l''op\u00E9ration \"{1}\" doit indiquer une valeur pour l''attribut \"namespace\"
-wsdlmodeler.invalid.bindingFault.emptyMessage=l''erreur \"{0}\" fait r\u00E9f\u00E9rence au message \"{1}\", mais celui-ci ne comporte pas d''\u00E9l\u00E9ment PART
-wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=l''erreur \"{0}\" fait r\u00E9f\u00E9rence au message \"{1}\", mais celui-ci comporte plus d''un \u00E9l\u00E9ment PART
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute
-# Not concatenated with any other string.
-wsdlmodeler.invalid.message.partMustHaveElementDescriptor=dans le message \"{0}\", la partie \"{1}\" doit indiquer un attribut \"element\"
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid=invalid WSDL document
-wsdlmodeler.unsolvableNamingConflicts=les conflits de d\u00E9nomination suivants sont survenus : {0}
-#
-wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=non-prise en compte de l''\u00E9l\u00E9ment de sch\u00E9ma (version non prise en charge) : {0}
-wsdlmodeler.warning.searchSchema.unrecognizedTypes={0} types non reconnus d\u00E9tect\u00E9s
-wsdlmodeler.warning.noServiceDefinitionsFound=Le document WSDL ne d\u00E9finit aucun service
-wsdlmodeler.warning.noPortsInService=Le service \"{0}\" ne contient aucun port utilisable. Essayez d''utiliser wsimport avec le commutateur -extension.
-wsdlmodeler.warning.noOperationsInPort=Le port \"{0}\" ne contient aucune op\u00E9ration utilisable
-wsdlmodeler.warning.ignoringNonSOAPPort=non-prise en compte du port \"{0}\" : il ne s''agit pas d''un port SOAP standard. Essayez d''ex\u00E9cuter wsimport avec le commutateur -extension.
-# Not concatenated with any other string.
-wsdlmodeler.warning.nonSOAPPort=port \"{0}\" : il ne s''agit pas d''un port SOAP standard. Les artefacts g\u00E9n\u00E9r\u00E9s peuvent ne pas fonctionner avec l''ex\u00E9cution JAX-WS.
-wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=non-prise en compte du port \"{0}\" : aucune adresse SOAP indiqu\u00E9e. Essayez d''ex\u00E9cuter wsimport avec le commutateur -extension.
-# Not concatenated with any other string.
-wsdlmodeler.warning.noSOAPAddress=Le port \"{0}\" n''est pas un port SOAP, il n''a aucun \u00E9l\u00E9ment soap:address
-wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:non-prise en compte du port SOAP \"{0}\" : transport non reconnu. Essayez d''ex\u00E9cuter wsimport avec le commutateur -extension.
-
-#BP1.1 R2705
-wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=non-prise en compte du port \"{0}\", il n''est pas conforme \u00E0 WS-I BP 1.1 : le binding WSDL a un style mixte, il doit s''agir d''une op\u00E9ration rpc-literal ou document-literal. Essayez d''ex\u00E9cuter wsimport avec le commutateur -extension.
-# Not concatenated with any other string.
-wsdlmodeler.warning.port.SOAPBinding.mixedStyle=n''est pas un port SOAP conforme \u00E0 WS-I BP1.1 \"{0}\" : le binding WSDL comporte un environnement mixte, il doit s''agir d''une op\u00E9ration rpc-literal ou document-literal.
-
-wsdlmodeler.warning.ignoringOperation.notSupportedStyle=non-prise en compte de l''op\u00E9ration \"{0}\" : le type n''est pas request-response ou one-way
-wsdlmodeler.invalid.operation.notSupportedStyle=WSDL non valide, wsdl:operation \"{0}\" dans wsdl:portType \"{1}\" : n''est pas de type request-response ou one-way
-wsdlmodeler.warning.ignoringOperation.notEncoded=non-prise en compte de l''op\u00E9ration RPC-style \"{0}\" : les param\u00E8tres ne sont pas encod\u00E9s
-wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=non-prise en compte de l''op\u00E9ration \"{0}\" : impossible de g\u00E9rer l''attribut \"parts\" de l''\u00E9l\u00E9ment \"soap:body\"
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=non-prise en compte de l''op\u00E9ration \"{0}\" : la partie message ne fait pas r\u00E9f\u00E9rence \u00E0 une d\u00E9claration d''\u00E9l\u00E9ment de sch\u00E9ma
-wsdlmodeler.invalid.doclitoperation=wsdl:operation \"{0}\" non valide : il s''agit d''une op\u00E9ration document-literal, la partie message doit faire r\u00E9f\u00E9rence \u00E0 une d\u00E9claration d''\u00E9l\u00E9ment de sch\u00E9ma
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=non-prise en compte de l''op\u00E9ration \"{0}\" : la partie message ne fait pas r\u00E9f\u00E9rence \u00E0 une d\u00E9claration de type de sch\u00E9ma
-wsdlmodeler.invalid.rpclitoperation=wsdl:operation \"{0}\"non valide : il s''agit d''une op\u00E9ration rpc-literal, la partie message doit faire r\u00E9f\u00E9rence \u00E0 une d\u00E9claration de type de sch\u00E9ma
-
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=non-prise en compte de l''op\u00E9ration \"{0}\" : impossible de g\u00E9rer les op\u00E9rations document-style
-wsdlmodeler.warning.bindingOperation.multiplePartBinding=V\u00E9rifiez le binding \"{0}\" de l''op\u00E9ration abstract, la partie \"{1}\" a un binding multiple. Le syst\u00E8me essaiera tout de m\u00EAme de g\u00E9n\u00E9rer des artefacts...
-wsdlmodeler.invalid.bindingOperation.multiplePartBinding=binding \"{0}\" de l''op\u00E9ration abstract, la partie \"{1}\" a un binding multiple.
-wsdlmodeler.warning.ignoringFaults=non-prise en compte des erreurs d\u00E9clar\u00E9es par l''op\u00E9ration \"{0}\"
-wsdlmodeler.warning.ignoringFault.notEncoded=non-prise en compte de l''erreur de type literal \"{0}\" de l''op\u00E9ration de binding \"{1}\"
-wsdlmodeler.warning.ignoringFault.notLiteral=non-prise en compte de l''erreur de type encoded \"{0}\" de l''op\u00E9ration de binding \"{1}\"
-wsdlmodeler.invalid.operation.fault.notLiteral=non-prise en compte de l''erreur de type encoded \"{0}\" dans l''op\u00E9ration de binding de type literal \"{1}\"
-wsdlmodeler.warning.ignoringHeader=non-prise en compte de l''en-t\u00EAte \"{0}\" de l''op\u00E9ration de binding \"{1}\"
-wsdlmodeler.warning.ignoringHeader.partFromBody=partie d''en-t\u00EAte \"{0}\" d\u00E9j\u00E0 li\u00E9e par soapbind:body, la partie ne peut pas \u00EAtre li\u00E9e deux fois
-wsdlmodeler.warning.ignoringHeader.notLiteral=non-prise en compte de l''en-t\u00EAte \"{0}\" de l''op\u00E9ration bind \"{1}\" : le type n''est pas literal
-wsdlmodeler.invalid.header.notLiteral=en-t\u00EAte \"{0}\" non valide de l''op\u00E9ration de binding \"{1}\" : le type n''est pas literal
-wsdlmodeler.warning.ignoringHeader.notFound=non-prise en compte de l''en-t\u00EAte \"{0}\" de l''op\u00E9ration de binding \"{1}\" : introuvable
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.notFound=en-t\u00EAte \"{0}\" de l''op\u00E9ration de binding \"{1}\" : introuvable
-wsdlmodeler.warning.ignoringHeader.cant.resolve.message=non-prise en compte de l''en-t\u00EAte \"{0}\" de l''op\u00E9ration de binding \"{1}\" : impossible de r\u00E9soudre le message
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.cant.resolve.message=en-t\u00EAte \"{0}\" de l''op\u00E9ration de binding \"{1}\" : impossible de r\u00E9soudre le message
-
-wsdlmodeler.warning.ignoringFault.cant.resolve.message=non-prise en compte de l''erreur \"{0}\" de l''op\u00E9ration de binding \"{1}\" : impossible de r\u00E9soudre le message
-wsdlmodeler.invalid.fault.cant.resolve.message=le message d''erreur \"{0}\" dans l''op\u00E9ration de binding \"{1}\" n''a pas pu \u00EAtre r\u00E9solu
-
-wsdlmodeler.warning.ignoringHeader.notEncoded=non-prise en compte de l''en-t\u00EAte \"{0}\" de l''op\u00E9ration bind \"{1}\" : le type n''est pas SOAP-encoded
-wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=non-prise en compte de l''en-t\u00EAte \"{0}\" de l''op\u00E9ration \"{1}\" : partie introuvable
-#
-wsdlmodeler.warning.ignoringOperation.notLiteral=non-prise en compte de l''op\u00E9ration document-style \"{0}\" : les param\u00E8tres ne sont pas de type literal
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=non-prise en compte de l''op\u00E9ration \"{0}\" : plusieurs parties dans le message d''entr\u00E9e
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=non-prise en compte de l''op\u00E9ration \"{0}\" : le message d''entr\u00E9e est vide
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=non-prise en compte de l''op\u00E9ration \"{0}\" : plusieurs parties dans le message de sortie
-wsdlmodeler.warning.operation.MoreThanOnePartInMessage=non-prise en compte de l''op\u00E9ration \"{0}\" : plusieurs parties li\u00E9es au corps
-# Not concatenated with any other string.
-wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=op\u00E9ration \"{0}\" : plusieurs parties li\u00E9es au corps
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=non-prise en compte de l''op\u00E9ration \"{0}\" : le message de sortie est vide
-wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=non-prise en compte de l''op\u00E9ration \"{0}\" : style de binding et style d''op\u00E9ration en conflit
-wsdlmodeler.warning.ignoringOperation.partNotFound=non-prise en compte de l''op\u00E9ration \"{0}\" : partie \"{1}\" introuvable
-wsdlmodeler.error.partNotFound=la partie \"{1}\" de l''op\u00E9ration \"{0}\" n''a pas pu \u00EAtre r\u00E9solue.
-wsdlmodeler.warning.ignoringFault.documentOperation=non-prise en compte de l''erreur \"{0}\" de l''op\u00E9ration document-style \"{1}\"
-wsdlmodler.warning.operation.use=Le WSDL utilis\u00E9 comporte des op\u00E9rations avec utilisation de type literal et encoded. -f:searchschema n'est pas pris en charge pour ce sc\u00E9nario.
-#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=le nom de soap:fault \"{0}\" ne correspond pas au nom de wsdl:fault \"{1}\" dans l''op\u00E9ration \"{2}\"
-#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.noSoapFaultName=nom soap:fault non indiqu\u00E9, wsdl:fault \"{0}\" dans l''op\u00E9ration \"{1}\"
-
-wsdlmodeler.duplicate.fault.part.name=non-prise en compte de l''erreur \"{0}\" de l''op\u00E9ration \"{1}\" : le nom d''\u00E9l\u00E9ment PART \"{2}\" n''est pas unique
-wsdlmodeler.duplicate.fault.soap.name=non-prise en compte de l''erreur \"{0}\" de l''op\u00E9ration \"{1}\" : le nom soap:fault \"{2}\" n''est pas unique
-
-wsdlmodeler.warning.ignoringHeaderFault.notFound=non-prise en compte de l''\u00E9l\u00E9ment headerfault \"{0}\", partie \"{1}\" introuvable dans le binding \"{2}\"
-# Usage not found. TODO Remove
-#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\"
-
-wsdlmodeler.warning.ignoringHeaderFault.notLiteral=non-prise en compte de la partie headerfault \"{0}\" du message \"{1}\" de l''op\u00E9ration {2}, l''attribut utilis\u00E9 doit \u00EAtre \"literal\"
-
-wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=non-prise en compte de la partie headerfault \"{0}\" du message \"{1}\" de l''op\u00E9ration {2}
-
-wsdlmodeler.invalid.headerfault.notLiteral=El\u00E9ment headerfault \"{0}\" non valide de l''op\u00E9ration de binding \"{1}\" : le type n''est pas literal
-wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=El\u00E9ment headerfault \"{0}\" non valide pour l''en-t\u00EAte {1} dans l''op\u00E9ration {2} : la partie doit indiquer un attribut \"element\"
-wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=En-t\u00EAte \"{0}\" non valide dans l''op\u00E9ration {1} : la partie doit indiquer un attribut \"element\"
-
-
-#wsi warnings
-wsdlmodeler.warning.nonconforming.wsdl.import=WSDL non conforme \u00E0 WS-I utilis\u00E9 pour wsdl:import
-wsdlmodeler.warning.nonconforming.wsdl.types=WSDL non conforme \u00E0 WS-I utilis\u00E9 pour wsdl:types
-wsdlmodeler.warning.nonconforming.wsdl.use=Traitement de l''op\u00E9ration non conforme \u00E0 WS-I \"{0}\" avec RPC-Style et SOAP-encoded
-
-# optional parts
-# Not concatenated with any other string.
-wsdlmodeler.error.partsNotFound=\u00E9l\u00E9ments PART \"{0}\" introuvable dans le message \"{1}\" ; WSDL erron\u00E9
-
-# soap 1.2
-wsdlmodeler.warning.port.SOAPBinding12=Port SOAP \"{0}\" : utilise un binding SOAP 1.2 non standard.
-wsdlmodeler.warning.ignoringSOAPBinding12=Non-prise en compte du port SOAP \"{0}\" : il utilise un binding SOAP 1.2 non standard.\nVous devez indiquer l''option \"-extension\" pour utiliser ce binding.
-
-#WSI-BP1.0 Warning/Errors
-wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile version 1.0, attribut d''espace de noms non autoris\u00E9 dans doc/lit pour {0} : \"{1}\"
-
-# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException"
-wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile version 1.0, attribut d''espace de noms non autoris\u00E9 dans doc/lit ou rpc/lit pour {0} : \"{1}\"
-
-#WSI-BP 1.1 Warning/Errors
-# R2911
-mimemodeler.invalidMimePart.moreThanOneSOAPBody=Non-prise en compte de l''op\u00E9ration \"{0}\". La structure Multipart/Related comporte un \u00E9l\u00E9ment Part racine non valide : plusieurs \u00E9l\u00E9ment Part soap:body trouv\u00E9s
-
-# R2906
-mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=Les en-t\u00EAtes ne figurent pas dans l''\u00E9l\u00E9ment mime:part racine avec soap:body, non-prise en compte des en-t\u00EAtes dans l''op\u00E9ration \"{0}\"
-
-# R2909
-mimemodeler.invalidMimeContent.differentPart=Non-prise en compte de mime:part. mime:part non valide, mime:content a un autre attribut d'\u00E9l\u00E9ment Part.
-
-mimemodeler.invalidMimeContent.invalidSchemaType=Non-prise en compte de mime:part. L''\u00E9l\u00E9ment Part MIME {0} ne peut pas \u00EAtre mapp\u00E9 avec le type de sch\u00E9ma : {1}
-
-# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute.
-mimemodeler.invalidMimeContent.mesagePartElementKind=l''\u00E9l\u00E9ment wsdl:part r\u00E9f\u00E9renc\u00E9 par l''attribut d''\u00E9l\u00E9ment Part mime:content {0} doit \u00EAtre d\u00E9fini \u00E0 l''aide de l''attribut de type.
-
-# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute.
-mimemodeler.invalidMimeContent.missingPartAttribute=Non-prise en compte de l''op\u00E9ration \"{0}\", attribut d''\u00E9l\u00E9ment Part manquant dans mime:content. L''attribut d''\u00E9l\u00E9ment Part doit figurer dans la d\u00E9claration mime:content.
-
-mimemodeler.invalidMimeContent.missingTypeAttribute=Attribut de type manquant dans mime:content dans l''op\u00E9ration \"{0}\". L''attribut d''\u00E9l\u00E9ment Part doit figurer dans la d\u00E9claration mime:content.
-
-# unknown schematype
-mimemodeler.invalidMimeContent.unknownSchemaType=Type de sch\u00E9ma {1} inconnu pour l''\u00E9l\u00E9ment Part mime:content : {0}
-mimemodeler.invalidMimeContent.errorLoadingJavaClass=Classe \"{0}\" introuvable pour le type MIME \"{1}\"
-
-# missing wsdl:part referenced by the mime:content
-wsdlmodeler.warning.ignoringMimePart.notFound=non-prise en compte de mime:part, \u00E9l\u00E9ment Part \"{0}\" r\u00E9f\u00E9renc\u00E9 par la d\u00E9claration mime:content introuvable dans l''\u00E9l\u00E9ment wsdl:operation \"{1}\"
-
-mimemodeler.elementPart.invalidElementMimeType=L''\u00E9l\u00E9ment Part mime:content fait r\u00E9f\u00E9rence \u00E0 l''\u00E9l\u00E9ment wsdl:part \"{0}\", d\u00E9finie \u00E0 l''aide de l''attribut d''\u00E9l\u00E9ment. Assurez-vous que le type MIME \"{1}\" est appropri\u00E9 pour s\u00E9rialiser XML.
-
-# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute.
-mimemodeler.invalidMimePart.nameNotAllowed=l''attribut de nom sur l''\u00E9l\u00E9ment wsdl:part dans l''op\u00E9ration \"{0}\" n''est pas pris en compte. Il n''est pas autoris\u00E9 comme WS-I AP 1.0.
-
-
-wsdlmodeler20.rpcenc.not.supported=Les WSDL RPC/encoded ne sont pas pris en charge dans JAXWS 2.0.
-wsdlmodeler.warning.ignoringOperation.notNCName=Non-prise en compte de l''op\u00E9ration \"{0}\", son nom comporte le caract\u00E8re interdit ''{1}''. Son op\u00E9ration rpc-literal -jaxws ne pourra pas le s\u00E9rialiser.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=Non-prise en compte de l''op\u00E9ration \"{0}\", impossible de g\u00E9n\u00E9rer la m\u00E9thode Java. Param\u00E8tre : la partie "{2}\" de wsdl:message \"{1}\" est un mot-cl\u00E9 Java. Utilisez la personnalisation pour modifier le nom de param\u00E8tre ou le nom wsdl:part.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=Op\u00E9ration \"{0}\" non valide, impossible de g\u00E9n\u00E9rer la m\u00E9thode Java. Param\u00E8tre : la partie "{2}\" de wsdl:message \"{1}\" est un mot-cl\u00E9 Java. Utilisez la personnalisation pour modifier le nom de param\u00E8tre ou le nom wsdl:part.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=Non-prise en compte de l''op\u00E9ration \"{0}\", impossible de g\u00E9n\u00E9rer le param\u00E8tre de m\u00E9thode Java. Le nom local de l''enfant wrapper \"{1}\" dans l''\u00E9l\u00E9ment global \"{2}\" est un mot-cl\u00E9 Java. Utilisez la personnalisation pour modifier le nom de param\u00E8tre.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=Op\u00E9ration \"{0}\" non valide, impossible de g\u00E9n\u00E9rer le param\u00E8tre de m\u00E9thode Java. Le nom local de l''enfant wrapper \"{1}\" dans l''\u00E9l\u00E9ment global \"{2}\" est un mot-cl\u00E9 Java. Utilisez la personnalisation pour modifier le nom de param\u00E8tre.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=Non-prise en compte de l''op\u00E9ration \"{0}\", impossible de g\u00E9n\u00E9rer la m\u00E9thode Java. Le nom personnalis\u00E9 de param\u00E8tre \"{1}\" est un mot-cl\u00E9 Java.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=Op\u00E9ration \"{0}\" non valide, impossible de g\u00E9n\u00E9rer la m\u00E9thode Java. Le nom personnalis\u00E9 de param\u00E8tre \"{1}\" est un mot-cl\u00E9 Java.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=Non-prise en compte de l''op\u00E9ration \"{0}\", il s''agit d''un mot r\u00E9serv\u00E9 Java, impossible de g\u00E9n\u00E9rer la m\u00E9thode Java. Utilisez la personnalisation pour modifier le nom de l''op\u00E9ration.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=Op\u00E9ration \"{0}\" non valide, il s''agit d''un mot r\u00E9serv\u00E9 Java, impossible de g\u00E9n\u00E9rer la m\u00E9thode Java. Utilisez la personnalisation pour modifier le nom de l''op\u00E9ration.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=Non-prise en compte de l''op\u00E9ration \"{0}\", impossible de g\u00E9n\u00E9rer la m\u00E9thode Java, le nom personnalis\u00E9 \"{1}\" de l''\u00E9l\u00E9ment wsdl:operation est un mot-cl\u00E9 Java.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=Op\u00E9ration \"{0}\"non valide, impossible de g\u00E9n\u00E9rer la m\u00E9thode Java, le nom personnalis\u00E9 \"{1}\" de l''\u00E9l\u00E9ment wsdl:operation est un mot-cl\u00E9 Java.
-
-wsdlmodeler.jaxb.javatype.notfound=Le descripteur de sch\u00E9ma {0} dans la partie message \"{1}\" n''est pas d\u00E9fini et n''a pas pu \u00EAtre li\u00E9 \u00E0 Java. Le descripteur de sch\u00E9ma {0} n''est peut-\u00EAtre pas d\u00E9fini dans le sch\u00E9ma import\u00E9/inclus dans le WSDL. Vous pouvez ajouter ces imports/inclusions ou ex\u00E9cuter wsimport et fournir l''emplacement du sch\u00E9ma \u00E0 l''aide du commutateur -b.
-wsdlmodeler.unsupportedBinding.mime=Le binding MIME WSDL n'est pas pris en charge actuellement.
-
-wsdlmodeler.nonUnique.body.error=Parties du corps non uniques. Dans un port, les op\u00E9rations BP 1.1 R2710 doivent comporter une signature d''op\u00E9ration unique sur le wire pour une r\u00E9partition r\u00E9ussie. Dans le port {0}, les op\u00E9rations \"{1}\" et \"{2}\" comportent le m\u00EAme bloc de corps de demande {3}. Essayez d''ex\u00E9cuter wsimport avec le commutateur -extension, le runtime essaiera d''effectuer la r\u00E9partition \u00E0 l''aide de SOAPAction
-wsdlmodeler.nonUnique.body.warning=Parties du corps non uniques. Dans un port, les op\u00E9rations BP 1.1 R2710 doivent comporter une signature d''op\u00E9ration unique sur le wire pour une r\u00E9partition r\u00E9ussie. Dans le port {0}, les op\u00E9rations \"{1}\" et \"{2}\" comportent le m\u00EAme bloc de corps de demande {3}. La r\u00E9partition de m\u00E9thode risque d''\u00E9chouer, le runtime essaiera d''effectuer la r\u00E9partition \u00E0 l''aide de SOAPAction
-
-wsdlmodeler.rpclit.unkownschematype=Le type XML \"{0}\" n''a pas pu \u00EAtre r\u00E9solu, \u00E9chec du binding XML vers JAVA. V\u00E9rifiez l''\u00E9l\u00E9ment wsdl:part \"{1}\" dans wsdl:message \"{2}\".
-
-wsdlmodeler.responsebean.notfound=wsimport n''a pas pu g\u00E9n\u00E9rer le bean de r\u00E9ponse asynchrone pour l''op\u00E9ration : {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_it.properties
deleted file mode 100644
index a1d903d5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_it.properties
+++ /dev/null
@@ -1,246 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# general
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-modeler.nestedModelError=errore del modeler: {0}
-
-
-# WSDLModeler
-# Usage not found. TODO Remove
-#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0}
-wsdlmodeler.invalidOperation=operazione non valida: {0}
-wsdlmodeler.invalidState.modelingOperation=stato non valido durante la modellazione dell''operazione: {0}
-wsdlmodeler.resultIsInOutParameter=il risultato \u00E8 il parametro \"inout\" nell''operazione: {0}
-wsdlmodeler.invalid.parameterorder.parameter=\"{0}\" specificato nell''attributo parameterOrder dell''operazione \"{1}\" non \u00E8 una parte valida del messaggio.
-wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=sono state escluse pi\u00F9 parti nell''attributo parameterOrder dell''operazione \"{0}\"
-wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=l''attributo parameterOrder sull''operazione \"{0}\" non \u00E8 valido. Il suggerimento parameterOrder verr\u00E0 ignorato.
-wsdlmodeler.invalid.parameter.differentTypes=il parametro \"{0}\" dell''operazione \"{1}\" ha tipi diversi nei messaggi di input e di output
-wsdlmodeler.invalid.bindingOperation.notInPortType=durante l''associazione di \"{1}\", l''operazione \"{0}\" non compare nel tipo di porta corrispondente
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=il messaggio di input dell''operazione di associazione \"{0}\" non contiene un''estensione del corpo SOAP
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=il messaggio di output dell''operazione di associazione \"{0}\" non contiene un''estensione del corpo SOAP
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingInputName=l''operazione di associazione \"{0}\" deve specificare un nome per il relativo messaggio di input
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingOutputName=l''operazione di associazione \"{0}\" deve specificare un nome per il relativo messaggio di output
-wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=durante l''associazione di \"{1}\", l''operazione \"{0}\" non fa riferimento a un''operazione univoca nel tipo di porta corrispondente
-wsdlmodeler.invalid.bindingOperation.notFound=durante l''associazione di \"{1}\", l''operazione \"{0}\" non corrisponde ad alcuna operazione nel tipo di porta corrispondente
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=il messaggio di input dell''operazione di associazione \"{0}\" deve specificare un valore per l''attributo \"namespace\"
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=il messaggio di output dell''operazione di associazione \"{0}\" deve specificare un valore per l''attributo \"namespace\"
-wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=l''intestazione di input \"{1}\" dell''operazione di associazione \"{0}\" deve specificare un valore per l''attributo \"namespace\"
-wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=l''intestazione di output \"{1}\" dell''operazione di associazione \"{0}\" deve specificare un valore per l''attributo \"namespace\"
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notUnique=l''errore \"{0}\" nell''operazione \"{1}\" corrisponde a pi\u00F9 di un errore nell''operazione del tipo di porta corrispondente
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notFound=l''errore \"{0}\" nell''operazione \"{1}\" non corrisponde a nessun errore nell''operazione del tipo di porta corrispondente
-# Not concatenated with any other string.
-wsdlmodeler.invalid.portTypeFault.notFound=l''errore \"{0}\" nell''operazione portType \"{1}\" non corrisponde a nessun errore nell''operazione di associazione corrispondente
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=l''errore \"{0}\" nell''operazione \"{1}\" non ha un''estensione di errore SOAP
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingName=l''errore \"{0}\" nell''operazione \"{1}\" deve specificare un valore per l''attributo \"name\"
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingNamespace=l''errore \"{0}\" nell''operazione \"{1}\" deve specificare un valore per l''attributo \"namespace\"
-wsdlmodeler.invalid.bindingFault.emptyMessage=l''errore \"{0}\" fa riferimento al messaggio \"{1}\", ma il messaggio non contiene parti
-wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=l''errore \"{0}\" fa riferimento al messaggio \"{1}\", ma il messaggio ha pi\u00F9 parti
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute
-# Not concatenated with any other string.
-wsdlmodeler.invalid.message.partMustHaveElementDescriptor=nel messaggio \"{0}\", la parte \"{1}\" deve specificare un attributo \"element\"
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid=invalid WSDL document
-wsdlmodeler.unsolvableNamingConflicts=si sono verificati i seguenti conflitti di denominazione: {0}
-#
-wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=l''elemento dello schema verr\u00E0 ignorato (versione non supportata): {0}
-wsdlmodeler.warning.searchSchema.unrecognizedTypes=rilevati {0} tipi non riconosciuti
-wsdlmodeler.warning.noServiceDefinitionsFound=il documento WSDL non definisce alcun servizio
-wsdlmodeler.warning.noPortsInService=Il servizio \"{0}\" non contiene porte utilizzabili. Provare a eseguire wsimport con il parametro -extension.
-wsdlmodeler.warning.noOperationsInPort=La porta \"{0}\" non contiene operazioni utilizzabili
-wsdlmodeler.warning.ignoringNonSOAPPort=la porta \"{0}\" verr\u00E0 ignorata: non \u00E8 una porta SOAP standard. Provare a eseguire wsimport con il parametro -extension.
-# Not concatenated with any other string.
-wsdlmodeler.warning.nonSOAPPort=la porta \"{0}\": non \u00E8 una porta SOAP standard. Gli artifact generati potrebbero non funzionare con il runtime JAX-WS.
-wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=la porta \"{0}\" verr\u00E0 ignorata: nessun indirizzo SOAP specificato. Provare a eseguire wsimport con il parametro -extension.
-# Not concatenated with any other string.
-wsdlmodeler.warning.noSOAPAddress=La porta \"{0}\" non \u00E8 una porta SOAP. Non contiene soap:address.
-wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:la porta SOAP \"{0}\" verr\u00E0 ignorata: trasporto non riconosciuto. Provare a eseguire wsimport con il parametro -extension.
-
-#BP1.1 R2705
-wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=la porta \"{0}\" verr\u00E0 ignorata poich\u00E9 non \u00E8 conforme a WS-I BP 1.1: l''associazione WSDL ha uno stile misto e deve essere un''operazione rpc-literal o document-literal. Provare a eseguire wsimport con il parametro -extension.
-# Not concatenated with any other string.
-wsdlmodeler.warning.port.SOAPBinding.mixedStyle=non \u00E8 una porta SOAP \"{0}\" conforme a WS-I BP1.1: l''associazione WSDL ha uno stile misto e deve essere un''operazione rpc-literal o document-literal.
-
-wsdlmodeler.warning.ignoringOperation.notSupportedStyle=l''operazione \"{0}\" verr\u00E0 ignorata: non \u00E8 di tipo richiesta/risposta o monodirezionale
-wsdlmodeler.invalid.operation.notSupportedStyle=WSDL non valido, wsdl:operation \"{0}\" in wsdl:portType \"{1}\": non \u00E8 di tipo richiesta/risposta o monodirezionale
-wsdlmodeler.warning.ignoringOperation.notEncoded=l''operazione con stile RPC \"{0}\" verr\u00E0 ignorata: parametri non codificati
-wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=l''operazione \"{0}\" verr\u00E0 ignorata: impossibile gestire l''attributo \"parts\" dell''elemento \"soap:body\"
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=l''operazione \"{0}\" verr\u00E0 ignorata: la parte del messaggio non fa riferimento a una dichiarazione di elemento di schema
-wsdlmodeler.invalid.doclitoperation=wsdl:operation \"{0}\" non valido: \u00E8 un''operazione document-literal e la parte del messaggio deve fare riferimento a una dichiarazione di elemento di schema
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=l''operazione \"{0}\" verr\u00E0 ignorata: la parte del messaggio non fa riferimento a una dichiarazione di tipo di schema
-wsdlmodeler.invalid.rpclitoperation=wsdl:operation \"{0}\" non valido: \u00E8 un''operazione rpc-literal e la parte del messaggio deve fare riferimento a una dichiarazione di tipo di schema
-
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=l''operazione \"{0}\" verr\u00E0 ignorata: impossibile gestire le operazioni per lo stile del documento
-wsdlmodeler.warning.bindingOperation.multiplePartBinding=Controllare l''associazione \"{0}\" dell''operazione astratta, la parte \"{1}\" ha pi\u00F9 associazioni. Verr\u00E0 comunque tentato di generare gli artifact...
-wsdlmodeler.invalid.bindingOperation.multiplePartBinding=associazione \"{0}\" dell''operazione astratta, la parte \"{1}\" ha pi\u00F9 associazioni.
-wsdlmodeler.warning.ignoringFaults=gli errori dichiarati dall''operazione \"{0}\" verranno ignorati
-wsdlmodeler.warning.ignoringFault.notEncoded=l''errore del valore \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorato
-wsdlmodeler.warning.ignoringFault.notLiteral=l''errore codificato \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorato
-wsdlmodeler.invalid.operation.fault.notLiteral=l''errore codificato \"{0}\" nell''operazione di associazione del valore \"{1}\" verr\u00E0 ignorato
-wsdlmodeler.warning.ignoringHeader=l''intestazione \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorata
-wsdlmodeler.warning.ignoringHeader.partFromBody=parte dell''intestazione: \"{0}\" gi\u00E0 associata da soapbind:body. L''operazione di associazione della parte due volte non \u00E8 valida
-wsdlmodeler.warning.ignoringHeader.notLiteral=l''intestazione \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorata: non \u00E8 un valore
-wsdlmodeler.invalid.header.notLiteral=Intestazione \"{0}\" dell''operazione di associazione \"{1}\" non valida: non \u00E8 un valore
-wsdlmodeler.warning.ignoringHeader.notFound=l''intestazione \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorata: non trovata
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.notFound=intestazione \"{0}\" dell''operazione di associazione \"{1}\": non trovata
-wsdlmodeler.warning.ignoringHeader.cant.resolve.message=l''intestazione \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorata: impossibile risolvere il messaggio
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.cant.resolve.message=intestazione \"{0}\" dell''operazione di associazione \"{1}\": impossibile risolvere il messaggio
-
-wsdlmodeler.warning.ignoringFault.cant.resolve.message=l''errore \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorato: impossibile risolvere il messaggio
-wsdlmodeler.invalid.fault.cant.resolve.message=impossibile risolvere il messaggio di errore \"{0}\" nell''operazione di associazione \"{1}\"
-
-wsdlmodeler.warning.ignoringHeader.notEncoded=l''intestazione \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorata: non ha una codifica SOAP
-wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=l''intestazione \"{0}\" dell''operazione \"{1}\" verr\u00E0 ignorata: parte non trovata
-#
-wsdlmodeler.warning.ignoringOperation.notLiteral=l''operazione \"{0}\" per lo stile del documento verr\u00E0 ignorata: i parametri non sono valori
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=l''operazione \"{0}\" verr\u00E0 ignorata: pi\u00F9 parti nel messaggio di input
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=l''operazione \"{0}\" verr\u00E0 ignorata: il messaggio di input \u00E8 vuoto
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=l''operazione \"{0}\" verr\u00E0 ignorata: pi\u00F9 parti nel messaggio di output
-wsdlmodeler.warning.operation.MoreThanOnePartInMessage=L''operazione \"{0}\" viene ignorata: pi\u00F9 parti associate al corpo
-# Not concatenated with any other string.
-wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=operazione \"{0}\": pi\u00F9 parti associate al corpo
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=l''operazione \"{0}\" verr\u00E0 ignorata: il messaggio di output \u00E8 vuoto
-wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=l''operazione \"{0}\" verr\u00E0 ignorata: lo stile di associazione e quello dell''operazione sono in conflitto
-wsdlmodeler.warning.ignoringOperation.partNotFound=l''operazione \"{0}\" verr\u00E0 ignorata: parte \"{1}\" non trovata
-wsdlmodeler.error.partNotFound=impossibile risolvere la parte \"{1}\" dell''operazione \"{0}\"
-wsdlmodeler.warning.ignoringFault.documentOperation=l''errore \"{0}\" dell''operazione per lo stile del documento \"{1}\" verr\u00E0 ignorato
-wsdlmodler.warning.operation.use=Il WSDL usato comprende operazioni con uso \"literal\" e \"encoded\". -f:searchschema non supportato in questo scenario.
-#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=il nome di soap:fault \"{0}\" non corrisponde al nome di wsdl:fault \"{1}\" nell''operazione \"{2}\"
-#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.noSoapFaultName=nome di soap:fault non specificato, wsdl:fault \"{0}\" nell''operazione \"{1}\"
-
-wsdlmodeler.duplicate.fault.part.name=l''errore \"{0}\" dell''operazione \"{1}\" verr\u00E0 ignorato: il nome parte \"{2}\" non \u00E8 univoco
-wsdlmodeler.duplicate.fault.soap.name=l''errore \"{0}\" dell''operazione \"{1}\" verr\u00E0 ignorato: il nome soap:fault \"{2}\" non \u00E8 univoco
-
-wsdlmodeler.warning.ignoringHeaderFault.notFound=l''errore di intestazione \"{0}\" verr\u00E0 ignorato: impossibile trovare la parte \"{1}\" nell''associazione \"{2}\"
-# Usage not found. TODO Remove
-#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\"
-
-wsdlmodeler.warning.ignoringHeaderFault.notLiteral=l''errore di intestazione part=\"{0}\" message=\"{1}\" dell''operazione {2} verr\u00E0 ignorato. L''attributo di uso deve essere \"literal\"
-
-wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=l''errore di intestazione part=\"{0}\" message=\"{1}\" dell''operazione {2} verr\u00E0 ignorato
-
-wsdlmodeler.invalid.headerfault.notLiteral=Errore di intestazione \"{0}\" dell''operazione di associazione \"{1}\" non valido: non \u00E8 un valore
-wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=Errore di intestazione \"{0}\" non valido per l''intestazione {1} nell''operazione {2}: la parte deve specificare un attributo \"element\"
-wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=Intestazione \"{0}\" non valida nell''operazione {1}: la parte deve specificare un attributo \"element\"
-
-
-#wsi warnings
-wsdlmodeler.warning.nonconforming.wsdl.import=\u00C8 stato usato un WS-I WSDL non conforme per wsdl:import
-wsdlmodeler.warning.nonconforming.wsdl.types=\u00C8 stato usato un WS-I WSDL non conforme per wsdl:types
-wsdlmodeler.warning.nonconforming.wsdl.use=Elaborazione dell''operazione \"{0}\" non conforme a WS-I con stile RPC e codifica SOAP
-
-# optional parts
-# Not concatenated with any other string.
-wsdlmodeler.error.partsNotFound=parti \"{0}\" non trovate nel messaggio \"{1}\": WSDL errato
-
-# soap 1.2
-wsdlmodeler.warning.port.SOAPBinding12=La porta SOAP \"{0}\": usa un''associazione SOAP 1.2 non standard.
-wsdlmodeler.warning.ignoringSOAPBinding12=La porta SOAP \"{0}\" verr\u00E0 ignorata: usa un''associazione SOAP 1.2 non standard.\nPer usare questa associazione, \u00E8 necessario specificare l''opzione \"-extension\".
-
-#WSI-BP1.0 Warning/Errors
-wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile ver. 1.0, attributo namespace non consentito in doc/lit per {0}: \"{1}\"
-
-# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException"
-wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile ver. 1.0, attributo namespace non consentito in doc/lit o rpc/lit per {0}: \"{1}\"
-
-#WSI-BP 1.1 Warning/Errors
-# R2911
-mimemodeler.invalidMimePart.moreThanOneSOAPBody=L''operazione \"{0}\" verr\u00E0 ignorata. La struttura Multipart/Related ha una parte radice non valida: sono state trovate pi\u00F9 parti soap:body
-
-# R2906
-mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=Intestazioni non in mime:part radice con soap:body. Le intestazioni nell''operazione \"{0}\" verranno ignorate.
-
-# R2909
-mimemodeler.invalidMimeContent.differentPart=mime:part verr\u00E0 ignorato. mime:part non valido, mime:content ha un attributo part diverso.
-
-mimemodeler.invalidMimeContent.invalidSchemaType=mime:part verr\u00E0 ignorato. mime part: {0} non pu\u00F2 essere mappato al tipo di schema: {1}
-
-# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute.
-mimemodeler.invalidMimeContent.mesagePartElementKind=L''elemento wsdl:part a cui fa riferimento l''attributo part mime:content: {0} deve essere definito usando l''attributo type.
-
-# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute.
-mimemodeler.invalidMimeContent.missingPartAttribute=L''operazione \"{0}\" verr\u00E0 ignorata, attributo part mancante in mime:content. L''attributo part deve essere presente nella dichiarazione mime:content.
-
-mimemodeler.invalidMimeContent.missingTypeAttribute=Attributo type mancante in mime:content nell''operazione \"{0}\". L''attributo part deve essere presente nella dichiarazione mime:content.
-
-# unknown schematype
-mimemodeler.invalidMimeContent.unknownSchemaType=Tipo di schema: {1} sconosciuto per la parte mime:content: {0}
-mimemodeler.invalidMimeContent.errorLoadingJavaClass=Impossibile trovare la classe \"{0}\" per il tipo MIME \"{1}\"
-
-# missing wsdl:part referenced by the mime:content
-wsdlmodeler.warning.ignoringMimePart.notFound=mime:part verr\u00E0 ignorato. Impossibile trovare la parte \"{0}\" a cui viene fatto riferimento da mime:content in wsdl:operation \"{1}\"
-
-mimemodeler.elementPart.invalidElementMimeType=La parte mime:content fa riferimento a wsdl:part \"{0}\" definita usando l''attributo element. Assicurarsi che il tipo MIME: \"{1}\" sia appropriato per serializzare XML.
-
-# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute.
-mimemodeler.invalidMimePart.nameNotAllowed=L''attributo name su wsdl:part nell''operazione \"{0}\" viene ignorato. Non \u00E8 consentito come per WS-I AP 1.0.
-
-
-wsdlmodeler20.rpcenc.not.supported=I WSDL RPC/codificati non sono supportati in JAXWS 2.0.
-wsdlmodeler.warning.ignoringOperation.notNCName=L''operazione \"{0}\" verr\u00E0 ignorata poich\u00E9 nel nome \u00E8 contenuto il carattere non valido ''{1}''. Il valore - jaxws dell''operazione rpc-literal non sar\u00E0 in grado di serializzarlo.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=L''operazione \"{0}\" verr\u00E0 ignorata: impossibile generare il metodo Java. Il parametro: part "{2}\" in wsdl:message \"{1}\", \u00E8 una parola chiave Java. Usare la personalizzazione per modificare il nome del parametro o il nome di wsdl:part.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=Operazione \"{0}\" non valida: impossibile generare il metodo Java. Il parametro: part "{2}\" in wsdl:message \"{1}\", \u00E8 una parola chiave Java. Usare la personalizzazione per modificare il nome del parametro o il nome di wsdl:part.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=L''operazione \"{0}\" verr\u00E0 ignorata: impossibile generare il parametro del metodo Java. Il nome locale dell''elemento figlio del wrapper "{1}\" nell''elemento globale \"{2}\" \u00E8 una parola chiave Java. Usare la personalizzazione per modificare il nome del parametro.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=Operazione \"{0}\" non valida: impossibile generare il parametro del metodo Java. Il nome locale dell''elemento figlio del wrapper "{1}\" nell''elemento globale \"{2}\" \u00E8 una parola chiave Java. Usare la personalizzazione per modificare il nome del parametro.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=L''operazione \"{0}\" verr\u00E0 ignorata: impossibile generare il metodo Java. Il nome personalizzato del parametro "{1}\" \u00E8 una parola chiave Java.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=Operazione \"{0}\" non valida: impossibile generare il metodo Java. Il nome personalizzato del parametro "{1}\" \u00E8 una parola chiave Java.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=L''operazione \"{0}\" verr\u00E0 ignorata: \u00E8 una parola riservata Java e non pu\u00F2 generare il metodo Java. Usare la personalizzazione per modificare il nome dell''operazione.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=Operazione \"{0}\" non valida: \u00E8 una parola riservata Java e non pu\u00F2 generare il metodo Java. Usare la personalizzazione per modificare il nome dell''operazione.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=L''operazione \"{0}\" verr\u00E0 ignorata: impossibile generare il metodo Java. Il nome personalizzato "{1}\" di wsdl:operation \u00E8 una parola chiave Java.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=Operazione \"{0}\" non valida: impossibile generare il metodo Java. Il nome personalizzato "{1}\" di wsdl:operation \u00E8 una parola chiave Java.
-
-wsdlmodeler.jaxb.javatype.notfound=Il descrittore dello schema {0} nella parte del messaggio \"{1}\" non \u00E8 definito e non pu\u00F2 essere associato a Java. Il descrittore dello schema {0} potrebbe non essere definito nello schema importato/incluso in WSDL. \u00C8 possibile aggiungere tali importazioni/inclusioni oppure eseguire wsimport e fornire la posizione dello schema usando il parametro -b.
-wsdlmodeler.unsupportedBinding.mime=Associazione MIME WSDL attualmente non supportata
-
-wsdlmodeler.nonUnique.body.error=Parti del corpo non univoche. In una porta, come per BP 1.1 R2710, le operazioni devono avere una firma dell''operazione univoca in rete affinch\u00E9 la spedizione riesca. Nella porta {0}, le operazioni \"{1}\" e \"{2}\" hanno lo stesso blocco del corpo della richiesta {3}. Se si prova a eseguire wsimport con il parametro -extension, runtime prover\u00E0 a spedire usando SOAPAction
-wsdlmodeler.nonUnique.body.warning=Parti del corpo non univoche. In una porta, come per BP 1.1 R2710, le operazioni devono avere una firma dell''operazione univoca in rete affinch\u00E9 la spedizione riesca. Nella porta {0}, le operazioni \"{1}\" e \"{2}\" hanno lo stesso blocco del corpo della richiesta {3}. Se il metodo di spedizione non riesce, runtime prover\u00E0 a spedire usando SOAPAction
-
-wsdlmodeler.rpclit.unkownschematype=Impossibile risolvere il tipo XML \"{0}\". Associazione di XML a JAVA non riuscita. Controllare wsdl:part \"{1}\" in wsdl:message \"{2}\".
-
-wsdlmodeler.responsebean.notfound=Generazione del bean di risposta asincrona da parte di wsimport non riuscita per l''operazione: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ja.properties
deleted file mode 100644
index 8f6c36ac..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ja.properties
+++ /dev/null
@@ -1,246 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# general
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-modeler.nestedModelError=\u30E2\u30C7\u30E9\u30FC\u30FB\u30A8\u30E9\u30FC: {0}
-
-
-# WSDLModeler
-# Usage not found. TODO Remove
-#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0}
-wsdlmodeler.invalidOperation=\u7121\u52B9\u306A\u64CD\u4F5C: {0}
-wsdlmodeler.invalidState.modelingOperation=\u64CD\u4F5C\u306E\u30E2\u30C7\u30EA\u30F3\u30B0\u6642\u306E\u7121\u52B9\u306A\u72B6\u614B: {0}
-wsdlmodeler.resultIsInOutParameter=\u7D50\u679C\u3068\u3057\u3066\u64CD\u4F5C: {0}\u306B\"inout\"\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u8A2D\u5B9A\u3055\u308C\u307E\u3059
-wsdlmodeler.invalid.parameterorder.parameter=\u64CD\u4F5C\"{1}\"\u306EparameterOrder\u5C5E\u6027\u306B\u6307\u5B9A\u3055\u308C\u305F\"{0}\"\u306F\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u6709\u52B9\u306A\u30D1\u30FC\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=2\u3064\u4EE5\u4E0A\u306E\u30D1\u30FC\u30C8\u304C\u64CD\u4F5C\"{0}\"\u306EparameterOrder\u5C5E\u6027\u306B\u6B8B\u3055\u308C\u3066\u3044\u307E\u3059
-wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=\u64CD\u4F5C\"{0}\"\u306EparameterOrder\u5C5E\u6027\u304C\u7121\u52B9\u3067\u3059\u3002parameterOrder\u30D2\u30F3\u30C8\u3092\u7121\u8996\u3057\u307E\u3059
-wsdlmodeler.invalid.parameter.differentTypes=\u64CD\u4F5C\"{1}\"\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\"{0}\"\u304C\u3001\u5165\u529B\u304A\u3088\u3073\u51FA\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u305D\u308C\u305E\u308C\u7570\u306A\u308B\u30BF\u30A4\u30D7\u3067\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059
-wsdlmodeler.invalid.bindingOperation.notInPortType=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\"{1}\"\u3067\u3001\u64CD\u4F5C\"{0}\"\u304C\u5BFE\u5FDC\u3059\u308B\u30DD\u30FC\u30C8\u30FB\u30BF\u30A4\u30D7\u304C\u8868\u793A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u5165\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306F\u3001SOAP\u672C\u6587\u306E\u62E1\u5F35\u306F\u3042\u308A\u307E\u305B\u3093
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u51FA\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306F\u3001SOAP\u672C\u6587\u306E\u62E1\u5F35\u306F\u3042\u308A\u307E\u305B\u3093
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingInputName=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u5165\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u540D\u524D\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingOutputName=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u51FA\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u540D\u524D\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\"{1}\"\u3067\u3001\u64CD\u4F5C\"{0}\"\u304C\u5BFE\u5FDC\u3059\u308B\u30DD\u30FC\u30C8\u30FB\u30BF\u30A4\u30D7\u306E\u4E00\u610F\u306E\u64CD\u4F5C\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u305B\u3093
-wsdlmodeler.invalid.bindingOperation.notFound=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\"{1}\"\u3067\u3001\u64CD\u4F5C\"{0}\"\u304C\u5BFE\u5FDC\u3059\u308B\u30DD\u30FC\u30C8\u30FB\u30BF\u30A4\u30D7\u306E\u3069\u306E\u64CD\u4F5C\u306B\u3082\u4E00\u81F4\u3057\u307E\u305B\u3093
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u5165\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306F\u3001\"namespace\"\u5C5E\u6027\u306E\u5024\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u51FA\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306F\u3001\"namespace\"\u5C5E\u6027\u306E\u5024\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u5165\u529B\u30D8\u30C3\u30C0\u30FC\"{1}\"\u306B\u306F\u3001\"namespace\"\u5C5E\u6027\u306E\u5024\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u51FA\u529B\u30D8\u30C3\u30C0\u30FC\"{1}\"\u306B\u306F\u3001\"namespace\"\u5C5E\u6027\u306E\u5024\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notUnique=\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u304C\u3001\u5BFE\u5FDC\u3059\u308B\u30DD\u30FC\u30C8\u30FB\u30BF\u30A4\u30D7\u64CD\u4F5C\u306E2\u3064\u4EE5\u4E0A\u306E\u30D5\u30A9\u30EB\u30C8\u3068\u4E00\u81F4\u3057\u3066\u3044\u307E\u3059
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notFound=\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u304C\u3001\u5BFE\u5FDC\u3059\u308B\u30DD\u30FC\u30C8\u30FB\u30BF\u30A4\u30D7\u64CD\u4F5C\u306E\u3069\u306E\u30D5\u30A9\u30EB\u30C8\u3068\u3082\u4E00\u81F4\u3057\u307E\u305B\u3093
-# Not concatenated with any other string.
-wsdlmodeler.invalid.portTypeFault.notFound=portType\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u304C\u3001\u5BFE\u5FDC\u3059\u308B\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\u306E\u3069\u306E\u30D5\u30A9\u30EB\u30C8\u3068\u3082\u4E00\u81F4\u3057\u307E\u305B\u3093
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u306B\u306F\u3001SOAP\u30D5\u30A9\u30EB\u30C8\u306E\u62E1\u5F35\u306F\u3042\u308A\u307E\u305B\u3093
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingName=\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u306B\u306F\u3001\"name\"\u5C5E\u6027\u306E\u5024\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingNamespace=\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u306B\u306F\u3001\"namespace\"\u5C5E\u6027\u306E\u5024\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-wsdlmodeler.invalid.bindingFault.emptyMessage=\u30D5\u30A9\u30EB\u30C8\"{0}\"\u304C\u30E1\u30C3\u30BB\u30FC\u30B8\"{1}\"\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306F\u30D1\u30FC\u30C8\u304C\u3042\u308A\u307E\u305B\u3093
-wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=\u30D5\u30A9\u30EB\u30C8\"{0}\"\u304C\u30E1\u30C3\u30BB\u30FC\u30B8\"{1}\"\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306F\u8907\u6570\u306E\u30D1\u30FC\u30C8\u304C\u3042\u308A\u307E\u3059
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute
-# Not concatenated with any other string.
-wsdlmodeler.invalid.message.partMustHaveElementDescriptor=\u30E1\u30C3\u30BB\u30FC\u30B8\"{0}\"\u3067\u306F\u3001\u30D1\u30FC\u30C8\"{1}\"\u306B\"element\"\u5C5E\u6027\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid=invalid WSDL document
-wsdlmodeler.unsolvableNamingConflicts=\u6B21\u306E\u30CD\u30FC\u30DF\u30F3\u30B0\u306E\u7AF6\u5408\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {0}
-#
-wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=\u30B9\u30AD\u30FC\u30DE\u8981\u7D20\u3092\u7121\u8996\u3057\u307E\u3059(\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30D0\u30FC\u30B8\u30E7\u30F3): {0}
-wsdlmodeler.warning.searchSchema.unrecognizedTypes={0}\u306E\u8A8D\u8B58\u3067\u304D\u306A\u3044\u30BF\u30A4\u30D7\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F
-wsdlmodeler.warning.noServiceDefinitionsFound=WSDL\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u30B5\u30FC\u30D3\u30B9\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-wsdlmodeler.warning.noPortsInService=\u30B5\u30FC\u30D3\u30B9\"{0}\"\u306B\u4F7F\u7528\u53EF\u80FD\u306A\u30DD\u30FC\u30C8\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093\u3002-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-wsdlmodeler.warning.noOperationsInPort=\u30DD\u30FC\u30C8\"{0}\"\u306B\u4F7F\u7528\u53EF\u80FD\u306A\u64CD\u4F5C\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093
-wsdlmodeler.warning.ignoringNonSOAPPort=\u30DD\u30FC\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u6A19\u6E96SOAP\u30DD\u30FC\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-# Not concatenated with any other string.
-wsdlmodeler.warning.nonSOAPPort=\u30DD\u30FC\u30C8\"{0}\": \u6A19\u6E96SOAP\u30DD\u30FC\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u751F\u6210\u3055\u308C\u305F\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u306FJAX-WS\u30E9\u30F3\u30BF\u30A4\u30E0\u3067\u306F\u52D5\u4F5C\u3057\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
-wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=\u30DD\u30FC\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: SOAP\u30A2\u30C9\u30EC\u30B9\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-# Not concatenated with any other string.
-wsdlmodeler.warning.noSOAPAddress=\u30DD\u30FC\u30C8\"{0}\"\u306FSOAP\u30DD\u30FC\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002soap:address\u304C\u3042\u308A\u307E\u305B\u3093
-wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:SOAP\u30DD\u30FC\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u8A8D\u8B58\u3067\u304D\u306A\u3044\u30C8\u30E9\u30F3\u30B9\u30DD\u30FC\u30C8\u3067\u3059\u3002-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-#BP1.1 R2705
-wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=\u30DD\u30FC\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: WS-I BP 1.1\u6E96\u62E0\u3067\u306F\u3042\u308A\u307E\u305B\u3093: WSDL\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306B\u8907\u5408\u30B9\u30BF\u30A4\u30EB\u304C\u542B\u307E\u308C\u307E\u3059\u3002RPC\u30EA\u30C6\u30E9\u30EB\u307E\u305F\u306F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30EA\u30C6\u30E9\u30EB\u306E\u64CD\u4F5C\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-# Not concatenated with any other string.
-wsdlmodeler.warning.port.SOAPBinding.mixedStyle=WS-I BP1.1\u6E96\u62E0\u306ESOAP\u30DD\u30FC\u30C8\"{0}\"\u3067\u306F\u3042\u308A\u307E\u305B\u3093: WSDL\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306B\u8907\u5408\u30B9\u30BF\u30A4\u30EB\u304C\u542B\u307E\u308C\u307E\u3059\u3002RPC\u30EA\u30C6\u30E9\u30EB\u307E\u305F\u306F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30EA\u30C6\u30E9\u30EB\u306E\u64CD\u4F5C\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-
-wsdlmodeler.warning.ignoringOperation.notSupportedStyle=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002request-response\u3067\u306A\u3044\u304B\u3001\u4E00\u65B9\u5411\u3067\u3059
-wsdlmodeler.invalid.operation.notSupportedStyle=wsdl:portType \"{1}\"\u306EWSDL\u3001wsdl:operation \"{0}\"\u304C\u7121\u52B9\u3067\u3059\u3002request-response\u3068one-way\u306E\u3069\u3061\u3089\u3067\u3082\u3042\u308A\u307E\u305B\u3093
-wsdlmodeler.warning.ignoringOperation.notEncoded=RPC\u30B9\u30BF\u30A4\u30EB\u306E\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \"soap:body\"\u8981\u7D20\u306E\"parts\"\u5C5E\u6027\u3092\u51E6\u7406\u3067\u304D\u307E\u305B\u3093
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D1\u30FC\u30C8\u304C\u30B9\u30AD\u30FC\u30DE\u8981\u7D20\u306E\u5BA3\u8A00\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u305B\u3093
-wsdlmodeler.invalid.doclitoperation=wsdl:operation \"{0}\"\u304C\u7121\u52B9\u3067\u3059: \u3053\u308C\u306F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30EA\u30C6\u30E9\u30EB\u64CD\u4F5C\u3067\u3059\u3002\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D1\u30FC\u30C8\u304C\u30B9\u30AD\u30FC\u30DE\u8981\u7D20\u306E\u5BA3\u8A00\u3092\u53C2\u7167\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D1\u30FC\u30C8\u304C\u30B9\u30AD\u30FC\u30DE\u30FB\u30BF\u30A4\u30D7\u306E\u5BA3\u8A00\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u305B\u3093
-wsdlmodeler.invalid.rpclitoperation=wsdl:operation \"{0}\"\u304C\u7121\u52B9\u3067\u3059: \u3053\u308C\u306FRPC\u30EA\u30C6\u30E9\u30EB\u64CD\u4F5C\u3067\u3059\u3002\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D1\u30FC\u30C8\u304C\u30B9\u30AD\u30FC\u30DE\u30FB\u30BF\u30A4\u30D7\u306E\u5BA3\u8A00\u3092\u53C2\u7167\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30B9\u30BF\u30A4\u30EB\u64CD\u4F5C\u3092\u51E6\u7406\u3067\u304D\u307E\u305B\u3093
-wsdlmodeler.warning.bindingOperation.multiplePartBinding=\u62BD\u8C61\u64CD\u4F5C\"{0}\"\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30D1\u30FC\u30C8\"{1}\"\u306B\u8907\u6570\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u304C\u542B\u307E\u308C\u307E\u3059\u3002\u751F\u6210\u3055\u308C\u305F\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u3092\u8A66\u884C\u3057\u307E\u3059...
-wsdlmodeler.invalid.bindingOperation.multiplePartBinding=\u62BD\u8C61\u64CD\u4F5C\"{0}\"\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3067\u3059\u3002\u30D1\u30FC\u30C8\"{1}\"\u306B\u8907\u6570\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u304C\u542B\u307E\u308C\u307E\u3059\u3002
-wsdlmodeler.warning.ignoringFaults=\u64CD\u4F5C\"{0}\"\u3067\u5BA3\u8A00\u3055\u308C\u305F\u30D5\u30A9\u30EB\u30C8\u3092\u7121\u8996\u3057\u307E\u3059
-wsdlmodeler.warning.ignoringFault.notEncoded=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30EA\u30C6\u30E9\u30EB\u30FB\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059
-wsdlmodeler.warning.ignoringFault.notLiteral=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u305F\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059
-wsdlmodeler.invalid.operation.fault.notLiteral=\u30EA\u30C6\u30E9\u30EB\u30FB\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u305F\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059
-wsdlmodeler.warning.ignoringHeader=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059
-wsdlmodeler.warning.ignoringHeader.partFromBody=\u30D8\u30C3\u30C0\u30FC\u30FB\u30D1\u30FC\u30C8: \"{0}\"\u306F\u3059\u3067\u306Bsoapbind:body\u306B\u3088\u308A\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30D1\u30FC\u30C8\u30922\u56DE\u30D0\u30A4\u30F3\u30C9\u3059\u308B\u306E\u306F\u4E0D\u6B63\u3067\u3059
-wsdlmodeler.warning.ignoringHeader.notLiteral=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u30EA\u30C6\u30E9\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-wsdlmodeler.invalid.header.notLiteral=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u304C\u7121\u52B9\u3067\u3059: \u30EA\u30C6\u30E9\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-wsdlmodeler.warning.ignoringHeader.notFound=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u898B\u3064\u304B\u308A\u307E\u305B\u3093
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.notFound=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\": \u898B\u3064\u304B\u308A\u307E\u305B\u3093
-wsdlmodeler.warning.ignoringHeader.cant.resolve.message=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.cant.resolve.message=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\": \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093
-
-wsdlmodeler.warning.ignoringFault.cant.resolve.message=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093
-wsdlmodeler.invalid.fault.cant.resolve.message=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\"{0}\"\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
-
-wsdlmodeler.warning.ignoringHeader.notEncoded=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002SOAP\u3067\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30D1\u30FC\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-#
-wsdlmodeler.warning.ignoringOperation.notLiteral=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30B9\u30BF\u30A4\u30EB\u306E\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u30EA\u30C6\u30E9\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u5165\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u8907\u6570\u306E\u30D1\u30FC\u30C8\u304C\u3042\u308A\u307E\u3059
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u5165\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u7A7A\u3067\u3059
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u51FA\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u8907\u6570\u306E\u30D1\u30FC\u30C8\u304C\u3042\u308A\u307E\u3059
-wsdlmodeler.warning.operation.MoreThanOnePartInMessage=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u8907\u6570\u306E\u30D1\u30FC\u30C8\u304C\u672C\u6587\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u3059
-# Not concatenated with any other string.
-wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=\u64CD\u4F5C\"{0}\": \u8907\u6570\u306E\u30D1\u30FC\u30C8\u304C\u672C\u6587\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u3059
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u51FA\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u7A7A\u3067\u3059
-wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30B9\u30BF\u30A4\u30EB\u304A\u3088\u3073\u64CD\u4F5C\u30B9\u30BF\u30A4\u30EB\u304C\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059
-wsdlmodeler.warning.ignoringOperation.partNotFound=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30D1\u30FC\u30C8\"{1}\"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-wsdlmodeler.error.partNotFound=\u64CD\u4F5C\"{0}\"\u306E\u30D1\u30FC\u30C8\"{1}\"\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002
-wsdlmodeler.warning.ignoringFault.documentOperation=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30B9\u30BF\u30A4\u30EB\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059
-wsdlmodler.warning.operation.use=\u4F7F\u7528\u3055\u308C\u305FWSDL\u306B\u306F\u3001use\u5C5E\u6027\u304Cliteral\u304A\u3088\u3073encoded\u4F7F\u7528\u306E\u64CD\u4F5C\u304C\u3042\u308A\u307E\u3059\u3002-f:searchschema\u306F\u3001\u3053\u306E\u4E8B\u4F8B\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u307E\u305B\u3093\u3002
-#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=soap:fault \"{0}\"\u306E\u540D\u524D\u304C\u64CD\u4F5C\"{2}\"\u306Ewsdl:fault \"{1}\"\u306E\u540D\u524D\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093
-#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.noSoapFaultName=soap:fault\u306E\u540D\u524D\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u64CD\u4F5C\"{1}\"\u306Ewsdl:fault \"{0}\"
-
-wsdlmodeler.duplicate.fault.part.name=\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u30D1\u30FC\u30C8\u540D\"{2}\"\u304C\u4E00\u610F\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-wsdlmodeler.duplicate.fault.soap.name=\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002soap:fault\u540D\"{2}\"\u304C\u4E00\u610F\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-
-wsdlmodeler.warning.ignoringHeaderFault.notFound=\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\"{2}\"\u306B\u30D1\u30FC\u30C8\"{1}\"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-# Usage not found. TODO Remove
-#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\"
-
-wsdlmodeler.warning.ignoringHeaderFault.notLiteral=\u64CD\u4F5C{2}\u306E\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A9\u30EB\u30C8part=\"{0}\" message=\"{1}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002use\u5C5E\u6027\u306F\"literal\"\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=\u64CD\u4F5C{2}\u306E\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A9\u30EB\u30C8part=\"{0}\" message=\"{1}\"\u3092\u7121\u8996\u3057\u307E\u3059
-
-wsdlmodeler.invalid.headerfault.notLiteral=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A9\u30EB\u30C8\"{0}\"\u304C\u7121\u52B9\u3067\u3059: \u30EA\u30C6\u30E9\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=\u64CD\u4F5C{2}\u306E\u30D8\u30C3\u30C0\u30FC{1}\u306E\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A9\u30EB\u30C8\"{0}\"\u304C\u7121\u52B9\u3067\u3059: \u30D1\u30FC\u30C8\u3067\u306F\"element\"\u5C5E\u6027\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=\u64CD\u4F5C{1}\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u304C\u7121\u52B9\u3067\u3059: \u30D1\u30FC\u30C8\u3067\u306F\"element\"\u5C5E\u6027\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-
-#wsi warnings
-wsdlmodeler.warning.nonconforming.wsdl.import=\u6E96\u62E0\u3057\u306A\u3044WS-I WSDL\u304Cwsdl:import\u306B\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059
-wsdlmodeler.warning.nonconforming.wsdl.types=\u6E96\u62E0\u3057\u306A\u3044WS-I WSDL\u304Cwsdl:types\u306B\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059
-wsdlmodeler.warning.nonconforming.wsdl.use=RPC\u30B9\u30BF\u30A4\u30EB\u3067\u3042\u308ASOAP\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u305FWS-I\u975E\u6E96\u62E0\u306E\u64CD\u4F5C\"{0}\"\u3092\u51E6\u7406\u3057\u3066\u3044\u307E\u3059
-
-# optional parts
-# Not concatenated with any other string.
-wsdlmodeler.error.partsNotFound=\u30D1\u30FC\u30C8\"{0}\"\u304C\u30E1\u30C3\u30BB\u30FC\u30B8\"{1}\"\u306B\u3042\u308A\u307E\u305B\u3093\u3002\u9593\u9055\u3063\u305FWSDL\u3067\u3059
-
-# soap 1.2
-wsdlmodeler.warning.port.SOAPBinding12=SOAP\u30DD\u30FC\u30C8\"{0}\": \u975E\u6A19\u6E96SOAP 1.2\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
-wsdlmodeler.warning.ignoringSOAPBinding12=SOAP\u30DD\u30FC\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u3053\u308C\u306F\u975E\u6A19\u6E96SOAP 1.2\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\n\u3053\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001\"-extension\"\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-
-#WSI-BP1.0 Warning/Errors
-wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile\u30D0\u30FC\u30B8\u30E7\u30F31.0\u3001{0}\u306B\u3064\u3044\u3066doc/lit\u3067\u306Fnamespace\u5C5E\u6027\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093: \"{1}\"
-
-# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException"
-wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile\u30D0\u30FC\u30B8\u30E7\u30F31.0\u3001{0}\u306B\u3064\u3044\u3066doc/lit\u307E\u305F\u306Frpc/lit\u3067\u306Fnamespace\u5C5E\u6027\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093: \"{1}\"
-
-#WSI-BP 1.1 Warning/Errors
-# R2911
-mimemodeler.invalidMimePart.moreThanOneSOAPBody=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002Multipart/Related\u69CB\u9020\u306B\u7121\u52B9\u306A\u30EB\u30FC\u30C8\u30FB\u30D1\u30FC\u30C8\u304C\u542B\u307E\u308C\u307E\u3059: \u8907\u6570\u306Esoap:body\u30D1\u30FC\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-
-# R2906
-mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=\u30D8\u30C3\u30C0\u30FC\u306F\u30EB\u30FC\u30C8\u306Emime:part\u306Bsoap:body\u3068\u3068\u3082\u306B\u3042\u308A\u307E\u305B\u3093\u3002\u64CD\u4F5C\"{0}\"\u306E\u30D8\u30C3\u30C0\u30FC\u3092\u7121\u8996\u3057\u307E\u3059
-
-# R2909
-mimemodeler.invalidMimeContent.differentPart=mime:part\u3092\u7121\u8996\u3057\u307E\u3059\u3002mime:part\u304C\u7121\u52B9\u3067\u3059\u3002mime:content\u306B\u306F\u7570\u306A\u308Bpart\u5C5E\u6027\u304C\u542B\u307E\u308C\u307E\u3059\u3002
-
-mimemodeler.invalidMimeContent.invalidSchemaType=mime:part\u3092\u7121\u8996\u3057\u307E\u3059\u3002MIME\u30D1\u30FC\u30C8: {0}\u306F\u30B9\u30AD\u30FC\u30DE\u30FB\u30BF\u30A4\u30D7: {1}\u306B\u30DE\u30C3\u30D7\u3067\u304D\u307E\u305B\u3093
-
-# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute.
-mimemodeler.invalidMimeContent.mesagePartElementKind=wsdl:part\u8981\u7D20\u304Cmime:content\u306Epart\u5C5E\u6027\u306B\u3088\u308A\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059: {0}\u306Ftype\u5C5E\u6027\u3092\u4F7F\u7528\u3057\u3066\u5B9A\u7FA9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-
-# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute.
-mimemodeler.invalidMimeContent.missingPartAttribute=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002mime:content\u306Bpart\u5C5E\u6027\u304C\u3042\u308A\u307E\u305B\u3093\u3002mime:content\u5BA3\u8A00\u306Bpart\u5C5E\u6027\u304C\u5B58\u5728\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-
-mimemodeler.invalidMimeContent.missingTypeAttribute=\u64CD\u4F5C\"{0}\"\u306Emime:content\u306Btype\u5C5E\u6027\u304C\u3042\u308A\u307E\u305B\u3093\u3002mime:content\u5BA3\u8A00\u306Bpart\u5C5E\u6027\u304C\u5B58\u5728\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-
-# unknown schematype
-mimemodeler.invalidMimeContent.unknownSchemaType=mime:content part: {0}\u306E\u30B9\u30AD\u30FC\u30DE\u30FB\u30BF\u30A4\u30D7: {1}\u304C\u4E0D\u660E\u3067\u3059
-mimemodeler.invalidMimeContent.errorLoadingJavaClass=MIME\u30BF\u30A4\u30D7\"{1}\"\u306E\u30AF\u30E9\u30B9\"{0}\"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F
-
-# missing wsdl:part referenced by the mime:content
-wsdlmodeler.warning.ignoringMimePart.notFound=mime:part\u3092\u7121\u8996\u3057\u307E\u3059\u3002wsdl:operation \"{1}\"\u306Emime:content\u3067\u53C2\u7167\u3055\u308C\u3066\u3044\u308B\u30D1\u30FC\u30C8\"{0}\"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-
-mimemodeler.elementPart.invalidElementMimeType=mime:content\u306Epart\u306F\u3001\u8981\u7D20\u5C5E\u6027\u3092\u4F7F\u7528\u3057\u3066\u5B9A\u7FA9\u3055\u308C\u305Fwsdl:part \"{0}\"\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u3059\u3002MIME\u30BF\u30A4\u30D7: \"{1}\"\u304CXML\u306E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u306B\u9069\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute.
-mimemodeler.invalidMimePart.nameNotAllowed=\u64CD\u4F5C\"{0}\"\u306Ewsdl:part\u306Ename\u5C5E\u6027\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u3053\u308C\u306FWS-I AP 1.0\u3067\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-
-
-wsdlmodeler20.rpcenc.not.supported=rpc/encoded wsdl\u306FJAXWS 2.0\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-wsdlmodeler.warning.ignoringOperation.notNCName=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u540D\u524D\u306B\u4E0D\u6B63\u306A\u6587\u5B57''{1}''\u304C\u542B\u307E\u308C\u307E\u3059\u3002RPC\u30EA\u30C6\u30E9\u30EB\u64CD\u4F5C\u306Ejaxws\u3067\u306F\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3067\u304D\u307E\u305B\u3093\u3002
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30D1\u30E9\u30E1\u30FC\u30BF: wsdl:message \"{1}\"\u306E\u30D1\u30FC\u30C8"{2}\"\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u3092\u5909\u66F4\u3059\u308B\u304B\u3001wsdl:part\u540D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=\u64CD\u4F5C\"{0}\"\u304C\u7121\u52B9\u3067\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30D1\u30E9\u30E1\u30FC\u30BF: wsdl:message \"{1}\"\u306E\u30D1\u30FC\u30C8"{2}\"\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u3092\u5909\u66F4\u3059\u308B\u304B\u3001wsdl:part\u540D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30B0\u30ED\u30FC\u30D0\u30EB\u8981\u7D20\"{2}\"\u306E\u30E9\u30C3\u30D1\u30FC\u306E\u5B50\"{1}\"\u306E\u30ED\u30FC\u30AB\u30EB\u540D\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=\u64CD\u4F5C\"{0}\"\u304C\u7121\u52B9\u3067\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30B0\u30ED\u30FC\u30D0\u30EB\u8981\u7D20\"{2}\"\u306E\u30E9\u30C3\u30D1\u30FC\u306E\u5B50\"{1}\"\u306E\u30ED\u30FC\u30AB\u30EB\u540D\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3055\u308C\u305F\u540D\u524D\"{1}\"\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=\u64CD\u4F5C\"{0}\"\u304C\u7121\u52B9\u3067\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3055\u308C\u305F\u540D\u524D\"{1}\"\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u3053\u308C\u306FJava\u4E88\u7D04\u8A9E\u3067\u3042\u308A\u3001Java\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u64CD\u4F5C\u540D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=\u64CD\u4F5C\"{0}\"\u304C\u7121\u52B9\u3067\u3059\u3002\u3053\u308C\u306FJava\u4E88\u7D04\u8A9E\u3067\u3042\u308A\u3001Java\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u64CD\u4F5C\u540D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002wsdl:operation\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3055\u308C\u305F\u540D\u524D\"{1}\"\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=\u64CD\u4F5C\"{0}\"\u304C\u7121\u52B9\u3067\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002wsdl:operation\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3055\u308C\u305F\u540D\u524D\"{1}\"\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002
-
-wsdlmodeler.jaxb.javatype.notfound=\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D1\u30FC\u30C8\"{1}\"\u306E\u30B9\u30AD\u30FC\u30DE\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF{0}\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u304A\u3089\u305A\u3001Java\u306B\u30D0\u30A4\u30F3\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B9\u30AD\u30FC\u30DE\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF{0}\u304CWSDL\u306B\u30A4\u30F3\u30DD\u30FC\u30C8/\u30A4\u30F3\u30AF\u30EB\u30FC\u30C9\u3055\u308C\u305F\u30B9\u30AD\u30FC\u30DE\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u3053\u3046\u3057\u305F\u30A4\u30F3\u30DD\u30FC\u30C8/\u30A4\u30F3\u30AF\u30EB\u30FC\u30C9\u3092\u8FFD\u52A0\u3059\u308B\u304B\u3001wsimport\u3092\u5B9F\u884C\u3057\u3001-b\u30B9\u30A4\u30C3\u30C1\u3092\u4F7F\u7528\u3057\u3066\u30B9\u30AD\u30FC\u30DE\u306E\u5834\u6240\u3092\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002
-wsdlmodeler.unsupportedBinding.mime=WSDL MIME\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306F\u73FE\u5728\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-
-wsdlmodeler.nonUnique.body.error=\u672C\u6587\u30D1\u30FC\u30C8\u304C\u4E00\u610F\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u30DD\u30FC\u30C8\u306B\u304A\u3044\u3066BP 1.1 R2710\u306E\u3068\u304A\u308A\u3001\u6B63\u5E38\u306B\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u3059\u308B\u305F\u3081\u306B\u64CD\u4F5C\u306B\u306F\u901A\u4FE1\u4E0A\u306B\u4E00\u610F\u306E\u64CD\u4F5C\u7F72\u540D\u304C\u5FC5\u8981\u3067\u3059\u3002\u30DD\u30FC\u30C8{0}\u3067\u306F\u3001\u64CD\u4F5C\"{1}\"\u304A\u3088\u3073\"{2}\"\u306B\u540C\u3058\u30EA\u30AF\u30A8\u30B9\u30C8\u672C\u6587\u30D6\u30ED\u30C3\u30AF{3}\u304C\u3042\u308A\u307E\u3059\u3002-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u3088\u3063\u3066SOAPAction\u3092\u4F7F\u7528\u3057\u305F\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u304C\u8A66\u884C\u3055\u308C\u307E\u3059
-wsdlmodeler.nonUnique.body.warning=\u672C\u6587\u30D1\u30FC\u30C8\u304C\u4E00\u610F\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u30DD\u30FC\u30C8\u306B\u304A\u3044\u3066BP 1.1 R2710\u306E\u3068\u304A\u308A\u3001\u6B63\u5E38\u306B\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u3059\u308B\u305F\u3081\u306B\u64CD\u4F5C\u306B\u306F\u901A\u4FE1\u4E0A\u306B\u4E00\u610F\u306E\u64CD\u4F5C\u7F72\u540D\u304C\u5FC5\u8981\u3067\u3059\u3002\u30DD\u30FC\u30C8{0}\u3067\u306F\u3001\u64CD\u4F5C\"{1}\"\u304A\u3088\u3073\"{2}\"\u306B\u540C\u3058\u30EA\u30AF\u30A8\u30B9\u30C8\u672C\u6587\u30D6\u30ED\u30C3\u30AF{3}\u304C\u542B\u307E\u308C\u307E\u3059\u3002\u30E1\u30BD\u30C3\u30C9\u306E\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u306F\u5931\u6557\u3057\u305F\u5834\u5408\u306F\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u3088\u3063\u3066SOAPAction\u3092\u4F7F\u7528\u3057\u305F\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u304C\u8A66\u884C\u3055\u308C\u307E\u3059
-
-wsdlmodeler.rpclit.unkownschematype=XML\u30BF\u30A4\u30D7\"{0}\"\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002XML\u306EJAVA\u3078\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002wsdl:message \"{2}\"\u306Ewsdl:part \"{1}\"\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-wsdlmodeler.responsebean.notfound=wsimport\u3067\u64CD\u4F5C: {0}\u306E\u975E\u540C\u671F\u30EC\u30B9\u30DD\u30F3\u30B9Bean\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ko.properties
deleted file mode 100644
index c3073685..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ko.properties
+++ /dev/null
@@ -1,246 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# general
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-modeler.nestedModelError=\uBAA8\uB378\uB7EC \uC624\uB958: {0}
-
-
-# WSDLModeler
-# Usage not found. TODO Remove
-#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0}
-wsdlmodeler.invalidOperation=\uBD80\uC801\uD569\uD55C \uC791\uC5C5: {0}
-wsdlmodeler.invalidState.modelingOperation=\uC791\uC5C5\uC744 \uBAA8\uB378\uB9C1\uD558\uB294 \uC911 \uBD80\uC801\uD569\uD55C \uC0C1\uD0DC \uBC1C\uC0DD: {0}
-wsdlmodeler.resultIsInOutParameter=\uACB0\uACFC\uB294 \uC791\uC5C5\uC758 \"inout\" \uB9E4\uAC1C\uBCC0\uC218\uC784: {0}
-wsdlmodeler.invalid.parameterorder.parameter=\"{1}\" \uC791\uC5C5\uC758 parameterOrder \uC18D\uC131\uC5D0 \uC9C0\uC815\uB41C \"{0}\"\uC740(\uB294) \uC801\uD569\uD55C \uBA54\uC2DC\uC9C0 \uBD80\uBD84\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=\"{0}\" \uC791\uC5C5\uC758 parameterOrder \uC18D\uC131\uC5D0 \uB204\uB77D\uB41C \uBD80\uBD84\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=\"{0}\" \uC791\uC5C5\uC758 parameterOrder \uC18D\uC131\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. parameterOrder \uD78C\uD2B8\uB97C \uBB34\uC2DC\uD558\uB294 \uC911
-wsdlmodeler.invalid.parameter.differentTypes=\"{1}\" \uC791\uC5C5\uC758 \"{0}\" \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC785\uB825 \uBC0F \uCD9C\uB825 \uBA54\uC2DC\uC9C0\uC5D0\uC11C \uB2E4\uB978 \uC720\uD615\uC73C\uB85C \uB098\uD0C0\uB0A9\uB2C8\uB2E4.
-wsdlmodeler.invalid.bindingOperation.notInPortType=\"{1}\" \uBC14\uC778\uB529\uC5D0\uC11C \"{0}\" \uC791\uC5C5\uC774 \uD574\uB2F9 \uD3EC\uD2B8 \uC720\uD615\uC5D0 \uB098\uD0C0\uB098\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC758 \uC785\uB825 \uBA54\uC2DC\uC9C0\uC5D0 SOAP \uBCF8\uBB38 \uD655\uC7A5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC758 \uCD9C\uB825 \uBA54\uC2DC\uC9C0\uC5D0 SOAP \uBCF8\uBB38 \uD655\uC7A5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingInputName=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC5D0\uB294 \uD574\uB2F9 \uC785\uB825 \uBA54\uC2DC\uC9C0\uC5D0 \uB300\uD55C \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingOutputName=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC5D0\uB294 \uD574\uB2F9 \uCD9C\uB825 \uBA54\uC2DC\uC9C0\uC5D0 \uB300\uD55C \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=\"{1}\" \uBC14\uC778\uB529\uC5D0\uC11C \"{0}\" \uC791\uC5C5\uC774 \uD574\uB2F9 \uD3EC\uD2B8 \uC720\uD615\uC758 \uACE0\uC720\uD55C \uC791\uC5C5\uC744 \uCC38\uC870\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.invalid.bindingOperation.notFound=\"{1}\" \uBC14\uC778\uB529\uC5D0\uC11C \"{0}\" \uC791\uC5C5\uC774 \uD574\uB2F9 \uD3EC\uD2B8 \uC720\uD615\uC758 \uC791\uC5C5\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC758 \uC785\uB825 \uBA54\uC2DC\uC9C0\uC5D0 \"namespace\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC758 \uCD9C\uB825 \uBA54\uC2DC\uC9C0\uC5D0 \"namespace\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.
-wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC758 \uC785\uB825 \uD5E4\uB354 \"{1}\"\uC5D0\uB294 \"namespace\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC758 \uCD9C\uB825 \uD5E4\uB354 \"{1}\"\uC5D0\uB294 \"namespace\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notUnique=\"{1}\" \uC791\uC5C5\uC5D0\uC11C \uBC1C\uC0DD\uD55C \"{0}\" \uACB0\uD568\uC774 \uD574\uB2F9 \uD3EC\uD2B8 \uC720\uD615 \uC791\uC5C5\uC758 \uACB0\uD568\uACFC \uB450 \uAC1C \uC774\uC0C1 \uC77C\uCE58\uD569\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notFound=\"{1}\" \uC791\uC5C5\uC5D0\uC11C \uBC1C\uC0DD\uD55C \"{0}\" \uACB0\uD568\uC774 \uD574\uB2F9 \uD3EC\uD2B8 \uC720\uD615 \uC791\uC5C5\uC758 \uACB0\uD568\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.portTypeFault.notFound=portType \uC791\uC5C5 \"{1}\"\uC5D0\uC11C \uBC1C\uC0DD\uD55C \"{0}\" \uACB0\uD568\uC774 \uD574\uB2F9 \uBC14\uC778\uB529 \uC791\uC5C5\uC758 \uACB0\uD568\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=\"{1}\" \uC791\uC5C5\uC5D0\uC11C \uBC1C\uC0DD\uD55C \"{0}\" \uACB0\uD568\uC5D0 SOAP \uACB0\uD568 \uD655\uC7A5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingName=\"{1}\" \uC791\uC5C5\uC758 \"{0}\" \uACB0\uD568\uC5D0\uB294 \"name\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingNamespace=\"{1}\" \uC791\uC5C5\uC758 \"{0}\" \uACB0\uD568\uC5D0\uB294 \"namespace\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-wsdlmodeler.invalid.bindingFault.emptyMessage=\"{0}\" \uACB0\uD568\uC774 \"{1}\" \uBA54\uC2DC\uC9C0\uB97C \uCC38\uC870\uD558\uB098 \uBA54\uC2DC\uC9C0\uC5D0 \uBD80\uBD84\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=\"{0}\" \uACB0\uD568\uC774 \"{1}\" \uBA54\uC2DC\uC9C0\uB97C \uCC38\uC870\uD558\uB098 \uBA54\uC2DC\uC9C0\uC5D0 \uBD80\uBD84\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4.
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute
-# Not concatenated with any other string.
-wsdlmodeler.invalid.message.partMustHaveElementDescriptor=\"{0}\" \uBA54\uC2DC\uC9C0\uC758 \"{1}\" \uBD80\uBD84\uC5D0\uB294 \"element\" \uC18D\uC131\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid=invalid WSDL document
-wsdlmodeler.unsolvableNamingConflicts=\uBC1C\uC0DD\uD55C \uC774\uB984 \uC9C0\uC815 \uCDA9\uB3CC: {0}
-#
-wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=\uC2A4\uD0A4\uB9C8 \uC694\uC18C(\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uBC84\uC804)\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: {0}
-wsdlmodeler.warning.searchSchema.unrecognizedTypes={0}\uAC1C\uC758 \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uC720\uD615\uC744 \uBC1C\uACAC\uD588\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.noServiceDefinitionsFound=WSDL \uBB38\uC11C\uC5D0 \uC815\uC758\uB41C \uC11C\uBE44\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.noPortsInService=\"{0}\" \uC11C\uBE44\uC2A4\uC5D0 \uD3EC\uD568\uB41C \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uD3EC\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD574 \uBCF4\uC2ED\uC2DC\uC624.
-wsdlmodeler.warning.noOperationsInPort=\"{0}\" \uD3EC\uD2B8\uAC00 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uC5B4\uB5A4 \uC791\uC5C5\uB3C4 \uD3EC\uD568\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringNonSOAPPort=\"{0}\" \uD3EC\uD2B8\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: \uD45C\uC900 SOAP \uD3EC\uD2B8\uAC00 \uC544\uB2D9\uB2C8\uB2E4. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD574 \uBCF4\uC2ED\uC2DC\uC624.
-# Not concatenated with any other string.
-wsdlmodeler.warning.nonSOAPPort=\"{0}\" \uD3EC\uD2B8\uB294 \uD45C\uC900 SOAP \uD3EC\uD2B8\uAC00 \uC544\uB2D9\uB2C8\uB2E4. \uC0DD\uC131\uB41C \uC544\uD2F0\uD329\uD2B8\uAC00 JAX-WS \uB7F0\uD0C0\uC784\uC5D0\uC11C \uC791\uB3D9\uD558\uC9C0 \uC54A\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=\"{0}\" \uD3EC\uD2B8\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: \uC9C0\uC815\uB41C SOAP \uC8FC\uC18C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD574 \uBCF4\uC2ED\uC2DC\uC624.
-# Not concatenated with any other string.
-wsdlmodeler.warning.noSOAPAddress=\"{0}\" \uD3EC\uD2B8\uB294 SOAP \uD3EC\uD2B8\uAC00 \uC544\uB2D9\uB2C8\uB2E4. soap:address\uB97C \uD3EC\uD568\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:SOAP \uD3EC\uD2B8 \"{0}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911: \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uC804\uC1A1\uC785\uB2C8\uB2E4. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD574 \uBCF4\uC2ED\uC2DC\uC624.
-
-#BP1.1 R2705
-wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=WS-I BP 1.1\uACFC \uD638\uD658\uB418\uC9C0 \uC54A\uB294 \"{0}\" \uD3EC\uD2B8\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: WSDL \uBC14\uC778\uB529\uC5D0 \uD63C\uD569 \uC2A4\uD0C0\uC77C\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4. RPC \uB9AC\uD130\uB7F4 \uB610\uB294 \uBB38\uC11C \uB9AC\uD130\uB7F4 \uC791\uC5C5\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD574 \uBCF4\uC2ED\uC2DC\uC624.
-# Not concatenated with any other string.
-wsdlmodeler.warning.port.SOAPBinding.mixedStyle=WS-I BP1.1\uACFC \uD638\uD658\uB418\uC9C0 \uC54A\uB294 SOAP \uD3EC\uD2B8 \"{0}\": WSDL \uBC14\uC778\uB529\uC5D0 \uD63C\uD569 \uC2A4\uD0C0\uC77C\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4. RPC \uB9AC\uD130\uB7F4 \uB610\uB294 \uBB38\uC11C \uB9AC\uD130\uB7F4 \uC791\uC5C5\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4!
-
-wsdlmodeler.warning.ignoringOperation.notSupportedStyle=\"{0}\" \uC791\uC5C5 \uBB34\uC2DC \uC911: \uC694\uCCAD-\uC751\uB2F5 \uB610\uB294 \uB2E8\uBC29\uD5A5\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-wsdlmodeler.invalid.operation.notSupportedStyle=wsdl:portType \"{1}\"\uC5D0 wsdl:operation \"{0}\"\uC774(\uAC00) \uC788\uB294 \uBD80\uC801\uD569\uD55C WSDL: \uC694\uCCAD-\uC751\uB2F5 \uB610\uB294 \uB2E8\uBC29\uD5A5\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringOperation.notEncoded=RPC \uC2A4\uD0C0\uC77C \uC791\uC5C5 \"{0}\" \uBB34\uC2DC \uC911: \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC778\uCF54\uB529\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \"soap:body\" \uC694\uC18C\uC758 \"parts\" \uC18D\uC131\uC744 \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uBA54\uC2DC\uC9C0 \uBD80\uBD84\uC774 \uC2A4\uD0A4\uB9C8 \uC694\uC18C \uC120\uC5B8\uC744 \uCC38\uC870\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.invalid.doclitoperation=\uBD80\uC801\uD569\uD55C wsdl:operation \"{0}\": \uBB38\uC11C \uB9AC\uD130\uB7F4 \uC791\uC5C5\uC785\uB2C8\uB2E4. \uBA54\uC2DC\uC9C0 \uBD80\uBD84\uC740 \uC2A4\uD0A4\uB9C8 \uC694\uC18C \uC120\uC5B8\uC744 \uCC38\uC870\uD574\uC57C \uD569\uB2C8\uB2E4.
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uBA54\uC2DC\uC9C0 \uBD80\uBD84\uC774 \uC2A4\uD0A4\uB9C8 \uC720\uD615 \uC120\uC5B8\uC744 \uCC38\uC870\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.invalid.rpclitoperation=\uBD80\uC801\uD569\uD55C wsdl:operation \"{0}\": RPC \uB9AC\uD130\uB7F4 \uC791\uC5C5\uC785\uB2C8\uB2E4. \uBA54\uC2DC\uC9C0 \uBD80\uBD84\uC740 \uC2A4\uD0A4\uB9C8 \uC720\uD615 \uC120\uC5B8\uC744 \uCC38\uC870\uD574\uC57C \uD569\uB2C8\uB2E4.
-
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uBA54\uC2DC\uC9C0 \uC2A4\uD0C0\uC77C \uC791\uC5C5\uC744 \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.bindingOperation.multiplePartBinding=\uCD94\uC0C1 \uC791\uC5C5 \"{0}\" \uBC14\uC778\uB529\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. \"{1}\" \uBD80\uBD84\uC5D0 \uBC14\uC778\uB529\uC774 \uC5EC\uB7EC \uAC1C \uC788\uC2B5\uB2C8\uB2E4. \uC544\uD2F0\uD329\uD2B8 \uC0DD\uC131\uC744 \uC2DC\uB3C4\uD569\uB2C8\uB2E4.
-wsdlmodeler.invalid.bindingOperation.multiplePartBinding=\uCD94\uC0C1 \uC791\uC5C5 \"{0}\" \uBC14\uC778\uB529\uC785\uB2C8\uB2E4. \"{1}\" \uBD80\uBD84\uC5D0 \uBC14\uC778\uB529\uC774 \uC5EC\uB7EC \uAC1C \uC788\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringFaults=\"{0}\" \uC791\uC5C5\uC73C\uB85C \uC120\uC5B8\uB41C \uACB0\uD568\uC744 \uBB34\uC2DC\uD558\uB294 \uC911
-wsdlmodeler.warning.ignoringFault.notEncoded=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \uB9AC\uD130\uB7F4 \uACB0\uD568 \"{0}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911
-wsdlmodeler.warning.ignoringFault.notLiteral=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \uC778\uCF54\uB529\uB41C \uACB0\uD568 \"{0}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911
-wsdlmodeler.invalid.operation.fault.notLiteral=\uB9AC\uD130\uB7F4 \uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \uC778\uCF54\uB529\uB41C \uACB0\uD568 \"{0}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911
-wsdlmodeler.warning.ignoringHeader=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uD5E4\uB354\uB97C \uBB34\uC2DC\uD558\uB294 \uC911
-wsdlmodeler.warning.ignoringHeader.partFromBody=\uD5E4\uB354 \uBD80\uBD84 \"{0}\"\uC774(\uAC00) soapbind:body\uC5D0 \uC758\uD574 \uC774\uBBF8 \uBC14\uC778\uB4DC\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. \uBD80\uBD84\uC744 \uB450 \uBC88 \uBC14\uC778\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringHeader.notLiteral=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uD5E4\uB354\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: \uB9AC\uD130\uB7F4\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-wsdlmodeler.invalid.header.notLiteral=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \uBD80\uC801\uD569\uD55C \uD5E4\uB354 \"{0}\": \uB9AC\uD130\uB7F4\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringHeader.notFound=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uD5E4\uB354\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.notFound=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uD5E4\uB354: \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringHeader.cant.resolve.message=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uD5E4\uB354\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: \uBA54\uC2DC\uC9C0\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.cant.resolve.message=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uD5E4\uB354: \uBA54\uC2DC\uC9C0\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-wsdlmodeler.warning.ignoringFault.cant.resolve.message=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uACB0\uD568\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uBA54\uC2DC\uC9C0\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.invalid.fault.cant.resolve.message=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \uACB0\uD568 \uBA54\uC2DC\uC9C0 \"{0}\"\uC744(\uB97C) \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-wsdlmodeler.warning.ignoringHeader.notEncoded=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uD5E4\uB354\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: SOAP \uC778\uCF54\uB529\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=\"{1}\" \uC791\uC5C5\uC758 \"{0}\" \uD5E4\uB354\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: \uBD80\uBD84\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-#
-wsdlmodeler.warning.ignoringOperation.notLiteral=document \uC2A4\uD0C0\uC77C \uC791\uC5C5 \"{0}\" \uBB34\uC2DC \uC911: \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uB9AC\uD130\uB7F4\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uC785\uB825 \uBA54\uC2DC\uC9C0\uC5D0 \uBD80\uBD84\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uC785\uB825 \uBA54\uC2DC\uC9C0\uAC00 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uCD9C\uB825 \uBA54\uC2DC\uC9C0\uC5D0 \uBD80\uBD84\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.operation.MoreThanOnePartInMessage=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uB450 \uAC1C \uC774\uC0C1\uC758 \uBD80\uBD84\uC774 \uBCF8\uBB38\uC5D0 \uBC14\uC778\uB4DC\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
-# Not concatenated with any other string.
-wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=\"{0}\" \uC791\uC5C5: \uB450 \uAC1C \uC774\uC0C1\uC758 \uBD80\uBD84\uC774 \uBCF8\uBB38\uC5D0 \uBC14\uC778\uB4DC\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uCD9C\uB825 \uBA54\uC2DC\uC9C0\uAC00 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uBC14\uC778\uB529 \uC2A4\uD0C0\uC77C\uACFC \uC791\uC5C5 \uC2A4\uD0C0\uC77C\uC774 \uCDA9\uB3CC\uD569\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringOperation.partNotFound=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \"{1}\" \uBD80\uBD84\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.error.partNotFound=\"{0}\" \uC791\uC5C5\uC758 \"{1}\" \uBD80\uBD84\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!
-wsdlmodeler.warning.ignoringFault.documentOperation=\uBB38\uC11C \uC2A4\uD0C0\uC77C \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uACB0\uD568\uC744 \uBB34\uC2DC\uD558\uB294 \uC911
-wsdlmodler.warning.operation.use=\uC0AC\uC6A9\uB41C WSDL\uC5D0 \uB9AC\uD130\uB7F4 \uBC0F \uC778\uCF54\uB529\uC744 \uC0AC\uC6A9\uD558\uB294 \uC791\uC5C5\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC774 \uACBD\uC6B0 -f:searchschema\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=soap:fault \"{0}\"\uC758 \uC774\uB984\uACFC \"{2}\" \uC791\uC5C5\uC5D0 \uC788\uB294 wsdl:fault \"{1}\"\uC758 \uC774\uB984\uC774 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.noSoapFaultName=soap:fault \uC774\uB984\uC774 \"{1}\" \uC791\uC5C5\uC758 wsdl:fault \"{0}\"\uC5D0 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-wsdlmodeler.duplicate.fault.part.name=\"{1}\" \uC791\uC5C5\uC758 \"{0}\" \uACB0\uD568 \uBB34\uC2DC \uC911... \uBD80\uBD84 \uC774\uB984 \"{2}\"\uC774(\uAC00) \uACE0\uC720\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.duplicate.fault.soap.name=\"{1}\" \uC791\uC5C5\uC758 \"{0}\" \uACB0\uD568\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. soap:fault \uC774\uB984 \"{2}\"\uC774(\uAC00) \uACE0\uC720\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-wsdlmodeler.warning.ignoringHeaderFault.notFound=\uD5E4\uB354 \uACB0\uD568 \"{0}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \"{2}\" \uBC14\uC778\uB529\uC5D0\uC11C \"{1}\" \uBD80\uBD84\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-# Usage not found. TODO Remove
-#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\"
-
-wsdlmodeler.warning.ignoringHeaderFault.notLiteral={2} \uC791\uC5C5\uC758 \uD5E4\uB354 \uACB0\uD568 \uBD80\uBD84=\"{0}\" \uBA54\uC2DC\uC9C0=\"{1}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \uC0AC\uC6A9 \uC18D\uC131\uC740 \"literal\"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute={2} \uC791\uC5C5\uC758 \uD5E4\uB354 \uACB0\uD568 \uBD80\uBD84=\"{0}\" \uBA54\uC2DC\uC9C0=\"{1}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911
-
-wsdlmodeler.invalid.headerfault.notLiteral=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \uBD80\uC801\uD569\uD55C \uD5E4\uB354 \uACB0\uD568 \"{0}\": \uB9AC\uD130\uB7F4\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor={2} \uC791\uC5C5\uC758 {1} \uD5E4\uB354\uC5D0 \uB300\uD55C \uBD80\uC801\uD569\uD55C \uD5E4\uB354 \uACB0\uD568 \"{0}\": \uBD80\uBD84\uC5D0\uB294 \"element\" \uC18D\uC131\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor={1} \uC791\uC5C5\uC5D0 \uBD80\uC801\uD569\uD55C \uD5E4\uB354 \"{0}\"\uC774(\uAC00) \uC788\uC74C: \uBD80\uBD84\uC5D0\uB294 \"element\" \uC18D\uC131\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-
-#wsi warnings
-wsdlmodeler.warning.nonconforming.wsdl.import=wsdl:import\uC5D0 \uBE44\uC900\uC218 WS-I WSDL\uC774 \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.nonconforming.wsdl.types=wsdl:types\uC5D0 \uBE44\uC900\uC218 WS-I WSDL\uC774 \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.nonconforming.wsdl.use=RPC \uC2A4\uD0C0\uC77C \uBC0F SOAP \uC778\uCF54\uB529\uC744 \uC0AC\uC6A9\uD558\uB294 WS-I \uBE44\uC900\uC218 \uC791\uC5C5 \"{0}\"\uC744(\uB97C) \uCC98\uB9AC\uD558\uB294 \uC911
-
-# optional parts
-# Not concatenated with any other string.
-wsdlmodeler.error.partsNotFound=\"{1}\" \uBA54\uC2DC\uC9C0\uC5D0\uC11C \"{0}\" \uBD80\uBD84\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC798\uBABB\uB41C WSDL\uC785\uB2C8\uB2E4.
-
-# soap 1.2
-wsdlmodeler.warning.port.SOAPBinding12=SOAP \uD3EC\uD2B8 \"{0}\": \uBE44\uD45C\uC900 SOAP 1.2 \uBC14\uC778\uB529\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringSOAPBinding12=SOAP \uD3EC\uD2B8 \"{0}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911: \uBE44\uD45C\uC900 SOAP 1.2 \uBC14\uC778\uB529\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.\n\uC774 \uBC14\uC778\uB529\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 \"-extension\" \uC635\uC158\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.
-
-#WSI-BP1.0 Warning/Errors
-wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile \uBC84\uC804 1.0\uC5D0\uC11C\uB294 {0}\uC5D0 \uB300\uD55C \uBB38\uC11C/\uB9AC\uD130\uB7F4\uC5D0\uC11C namespace \uC18D\uC131\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC74C: \"{1}\"
-
-# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException"
-wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile \uBC84\uC804 1.0\uC5D0\uC11C\uB294 {0}\uC5D0 \uB300\uD55C \uBB38\uC11C/\uB9AC\uD130\uB7F4\uC5D0\uC11C namespace \uC18D\uC131\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC74C: \"{1}\"
-
-#WSI-BP 1.1 Warning/Errors
-# R2911
-mimemodeler.invalidMimePart.moreThanOneSOAPBody=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. Multipart/Related \uAD6C\uC870\uC5D0 \uBD80\uC801\uD569\uD55C \uB8E8\uD2B8 \uBD80\uBD84\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uB450 \uAC1C \uC774\uC0C1\uC758 soap:body \uBD80\uBD84\uC774 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-# R2906
-mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=soap:body\uAC00 \uC788\uB294 \uB8E8\uD2B8 mime:part\uC5D0 \uD5E4\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \"{0}\" \uC791\uC5C5\uC758 \uD5E4\uB354\uB97C \uBB34\uC2DC\uD558\uB294 \uC911
-
-# R2909
-mimemodeler.invalidMimeContent.differentPart=mime:part\uB97C \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. mime:part\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. mime:content\uC758 part \uC18D\uC131\uC774 \uB2E4\uB985\uB2C8\uB2E4.
-
-mimemodeler.invalidMimeContent.invalidSchemaType=mime:part\uB97C \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. mime part {0}\uC744(\uB97C) \uC2A4\uD0A4\uB9C8 \uC720\uD615 {1}\uC5D0 \uB9E4\uD551\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute.
-mimemodeler.invalidMimeContent.mesagePartElementKind=wsdl:part \uC694\uC18C\uAC00 mime:content part \uC18D\uC131\uC5D0\uC11C \uCC38\uC870\uB428: {0}\uC740(\uB294) type \uC18D\uC131\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC815\uC758\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4!
-
-# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute.
-mimemodeler.invalidMimeContent.missingPartAttribute=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. mime:content\uC5D0 part \uC18D\uC131\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. mime:content \uC120\uC5B8\uC5D0\uB294 part \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-mimemodeler.invalidMimeContent.missingTypeAttribute=\"{0}\" \uC791\uC5C5\uC758 mime:content\uC5D0 type \uC18D\uC131\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. mime:content \uC120\uC5B8\uC5D0\uB294 part \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-# unknown schematype
-mimemodeler.invalidMimeContent.unknownSchemaType={1}\uC740(\uB294) mime:content \uBD80\uBD84 {0}\uC5D0 \uB300\uD574 \uC54C \uC218 \uC5C6\uB294 \uC2A4\uD0A4\uB9C8 \uC720\uD615\uC785\uB2C8\uB2E4.
-mimemodeler.invalidMimeContent.errorLoadingJavaClass=mime \uC720\uD615 \"{1}\"\uC5D0 \uB300\uD55C \"{0}\" \uD074\uB798\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-# missing wsdl:part referenced by the mime:content
-wsdlmodeler.warning.ignoringMimePart.notFound=mime:part\uB97C \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. wsdl:operation \"{1}\"\uC5D0\uC11C mime:content\uAC00 \uCC38\uC870\uD55C \"{0}\" \uBD80\uBD84\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-mimemodeler.elementPart.invalidElementMimeType=mime:content \uBD80\uBD84\uC774 element \uC18D\uC131\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC815\uC758\uB41C wsdl:part \"{0}\"\uC744(\uB97C) \uCC38\uC870\uD569\uB2C8\uB2E4. mime \uC720\uD615 \"{1}\"\uC774(\uAC00) XML \uC9C1\uB82C\uD654\uC5D0 \uC801\uD569\uD55C\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute.
-mimemodeler.invalidMimePart.nameNotAllowed=\"{0}\" \uC791\uC5C5\uC758 wsdl:part\uC5D0 \uB300\uD55C name \uC18D\uC131\uC774 \uBB34\uC2DC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. WS-I AP 1.0\uC5D0 \uB530\uB77C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-
-wsdlmodeler20.rpcenc.not.supported=JAXWS 2.0\uC5D0\uC11C\uB294 RPC/\uC778\uCF54\uB529\uB41C WSDL\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.warning.ignoringOperation.notNCName=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \uC774\uB984\uC5D0 \uC798\uBABB\uB41C \uBB38\uC790 ''{1}''\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4. RPC \uB9AC\uD130\uB7F4 \uC791\uC5C5\uC785\uB2C8\uB2E4. JAXWS\uAC00 \uC9C1\uB82C\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB9E4\uAC1C\uBCC0\uC218\uC778 wsdl:message \"{1}\"\uC758 "{2}\" \uBD80\uBD84\uC774 java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uAC70\uB098 wsdl:part \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uC2ED\uC2DC\uC624.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=\"{0}\" \uC791\uC5C5\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB9E4\uAC1C\uBCC0\uC218\uC778 wsdl:message \"{1}\"\uC758 "{2}\" \uBD80\uBD84\uC774 java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uAC70\uB098 wsdl:part \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uC2ED\uC2DC\uC624.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC \uB9E4\uAC1C\uBCC0\uC218\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC804\uC5ED \uC694\uC18C \"{2}\"\uC5D0 \uC788\uB294 \uB798\uD37C \uD558\uC704 \"{1}\"\uC758 \uB85C\uCEEC \uC774\uB984\uC774 java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uC2ED\uC2DC\uC624.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=\"{0}\" \uC791\uC5C5\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC \uB9E4\uAC1C\uBCC0\uC218\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC804\uC5ED \uC694\uC18C \"{2}\"\uC5D0 \uC788\uB294 \uB798\uD37C \uD558\uC704 \"{1}\"\uC758 \uB85C\uCEEC \uC774\uB984\uC774 java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uC2ED\uC2DC\uC624.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB9E4\uAC1C\uBCC0\uC218\uC778 \uC0AC\uC6A9\uC790 \uC815\uC758\uB41C \uC774\uB984 \"{1}\"\uC774(\uAC00) java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=\"{0}\" \uC791\uC5C5\uC744 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB9E4\uAC1C\uBCC0\uC218\uC778 \uC0AC\uC6A9\uC790 \uC815\uC758\uB41C \uC774\uB984 \"{1}\"\uC774(\uAC00) java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. java \uC608\uC57D\uC5B4\uC785\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uC791\uC5C5 \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uC2ED\uC2DC\uC624.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=\"{0}\" \uC791\uC5C5\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. java \uC608\uC57D\uC5B4\uC785\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uC791\uC5C5 \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uC2ED\uC2DC\uC624.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. wsdl:operation\uC758 \uC0AC\uC6A9\uC790 \uC815\uC758\uB41C \uC774\uB984 \"{1}\"\uC774(\uAC00) java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=\"{0}\" \uC791\uC5C5\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. wsdl:operation\uC758 \uC0AC\uC6A9\uC790 \uC815\uC758\uB41C \uC774\uB984 \"{1}\"\uC774(\uAC00) java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4.
-
-wsdlmodeler.jaxb.javatype.notfound=\uBA54\uC2DC\uC9C0 \uBD80\uBD84 \"{1}\"\uC758 \uC2A4\uD0A4\uB9C8 \uAE30\uC220\uC790 {0}\uC774(\uAC00) \uC815\uC758\uB418\uC9C0 \uC54A\uC558\uC73C\uBA70 Java\uC5D0 \uBC14\uC778\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC2A4\uD0A4\uB9C8 \uAE30\uC220\uC790 {0}\uC774(\uAC00) WSDL\uC5D0 \uC784\uD3EC\uD2B8/\uD3EC\uD568\uB41C \uC2A4\uD0A4\uB9C8\uC5D0 \uC815\uC758\uB418\uC9C0 \uC54A\uC740 \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. \uD574\uB2F9 \uC784\uD3EC\uD2B8/\uD3EC\uD568\uC744 \uCD94\uAC00\uD560 \uC218\uB3C4 \uC788\uACE0, wsimport\uB97C \uC2E4\uD589\uD55C \uD6C4 -b \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC2A4\uD0A4\uB9C8 \uC704\uCE58\uB97C \uC81C\uACF5\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.
-wsdlmodeler.unsupportedBinding.mime=\uD604\uC7AC WSDL MIME \uBC14\uC778\uB529\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!
-
-wsdlmodeler.nonUnique.body.error=\uACE0\uC720\uD558\uC9C0 \uC54A\uC740 \uBCF8\uBB38 \uBD80\uBD84\uC785\uB2C8\uB2E4! \uC791\uC5C5 \uD560\uB2F9\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uC218\uD589\uD558\uB824\uBA74 BP 1.1 R2710\uC5D0 \uB530\uB77C \uD3EC\uD2B8\uC5D0\uC11C \uC791\uC5C5\uC5D0 \uACE0\uC720\uD55C \uC791\uC5C5 \uC11C\uBA85\uC774 \uC5F0\uACB0\uB418\uC5B4 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. {0} \uD3EC\uD2B8\uC5D0\uC11C \"{1}\" \uC791\uC5C5\uACFC \"{2}\" \uC791\uC5C5\uC758 \uC694\uCCAD \uBCF8\uBB38 \uBE14\uB85D {3}\uC774(\uAC00) \uB3D9\uC77C\uD569\uB2C8\uB2E4. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD574 \uBCF4\uC2ED\uC2DC\uC624. \uB7F0\uD0C0\uC784\uC774 SOAPAction\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC791\uC5C5 \uD560\uB2F9\uC744 \uC2DC\uB3C4\uD569\uB2C8\uB2E4.
-wsdlmodeler.nonUnique.body.warning=\uACE0\uC720\uD558\uC9C0 \uC54A\uC740 \uBCF8\uBB38 \uBD80\uBD84\uC785\uB2C8\uB2E4! \uC791\uC5C5 \uD560\uB2F9\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uC218\uD589\uD558\uB824\uBA74 BP 1.1 R2710\uC5D0 \uB530\uB77C \uD3EC\uD2B8\uC5D0\uC11C \uC791\uC5C5\uC5D0 \uACE0\uC720\uD55C \uC791\uC5C5 \uC11C\uBA85\uC774 \uC5F0\uACB0\uB418\uC5B4 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. {0} \uD3EC\uD2B8\uC5D0\uC11C \"{1}\" \uC791\uC5C5\uACFC \"{2}\" \uC791\uC5C5\uC758 \uC694\uCCAD \uBCF8\uBB38 \uBE14\uB85D {3}\uC774(\uAC00) \uB3D9\uC77C\uD569\uB2C8\uB2E4. \uBA54\uC18C\uB4DC \uC791\uC5C5 \uD560\uB2F9\uC744 \uC2E4\uD328\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB7F0\uD0C0\uC784\uC774 SOAPAction\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC791\uC5C5 \uD560\uB2F9\uC744 \uC2DC\uB3C4\uD569\uB2C8\uB2E4.
-
-wsdlmodeler.rpclit.unkownschematype=XML \uC720\uD615 \"{0}\"\uC744(\uB97C) \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. XML\uACFC JAVA \uAC04\uC758 \uBC14\uC778\uB529\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4! wsdl:message \"{2}\"\uC758 wsdl:part \"{1}\"\uC744(\uB97C) \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-wsdlmodeler.responsebean.notfound=wsimport\uAC00 \uC791\uC5C5\uC5D0 \uB300\uD55C \uBE44\uB3D9\uAE30 \uC751\uB2F5 Bean \uC0DD\uC131\uC744 \uC2E4\uD328\uD568: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_pt_BR.properties
deleted file mode 100644
index 91b9cd09..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_pt_BR.properties
+++ /dev/null
@@ -1,246 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# general
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-modeler.nestedModelError=erro do modelador: {0}
-
-
-# WSDLModeler
-# Usage not found. TODO Remove
-#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0}
-wsdlmodeler.invalidOperation=opera\u00E7\u00E3o inv\u00E1lida: {0}
-wsdlmodeler.invalidState.modelingOperation=estado inv\u00E1lido ao modelar a opera\u00E7\u00E3o: {0}
-wsdlmodeler.resultIsInOutParameter=o resultado \u00E9 o par\u00E2metro \"inout\" na opera\u00E7\u00E3o: {0}
-wsdlmodeler.invalid.parameterorder.parameter=\"{0}\" especificado no atributo parameterOrder da opera\u00E7\u00E3o \"{1}\" n\u00E3o \u00E9 uma parte v\u00E1lida da mensagem.
-wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=mais de uma parte omitida no atributo parameterOrder da opera\u00E7\u00E3o \"{0}\"
-wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=o atributo parameterOrder na opera\u00E7\u00E3o \"{0}\" \u00E9 inv\u00E1lido, ignorando a dica parameterOrder
-wsdlmodeler.invalid.parameter.differentTypes=o par\u00E2metro \"{0}\" da opera\u00E7\u00E3o \"{1}\" aparece com diferentes tipos nas mensagens de entrada e sa\u00EDda
-wsdlmodeler.invalid.bindingOperation.notInPortType=na opera\u00E7\u00E3o de bind \"{1}\", a opera\u00E7\u00E3o \"{0}\" n\u00E3o aparece no tipo de porta correspondente
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=a mensagem de entrada da opera\u00E7\u00E3o de bind \"{0}\" n\u00E3o tem uma extens\u00E3o de corpo SOAP
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=a mensagem de sa\u00EDda da opera\u00E7\u00E3o de bind \"{0}\" n\u00E3o tem uma extens\u00E3o de corpo SOAP
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingInputName=a opera\u00E7\u00E3o de bind \"{0}\" deve especificar um nome para sua mensagem de entrada
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingOutputName=a opera\u00E7\u00E3o de bind \"{0}\" deve especificar um nome para sua mensagem de sa\u00EDda
-wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=na opera\u00E7\u00E3o de bind \"{1}\", a opera\u00E7\u00E3o \"{0}\" n\u00E3o faz refer\u00EAncia a uma opera\u00E7\u00E3o exclusiva no tipo de porta correspondente
-wsdlmodeler.invalid.bindingOperation.notFound=na opera\u00E7\u00E3o de bind \"{1}\", a opera\u00E7\u00E3o \"{0}\" n\u00E3o corresponde a uma opera\u00E7\u00E3o exclusiva no tipo de porta correspondente
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=a mensagem de entrada da opera\u00E7\u00E3o de bind \"{0}\" deve especificar um valor para o atributo \"namespace\"
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=a mensagem de sa\u00EDda da opera\u00E7\u00E3o de bind \"{0}\" deve especificar um valor para o atributo \"namespace\"
-wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=o cabe\u00E7alho de entrada \"{1}\" da opera\u00E7\u00E3o de bind \"{0}\" deve especificar um valor para o atributo \"namespace\"
-wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=o cabe\u00E7alho de sa\u00EDda \"{1}\" da opera\u00E7\u00E3o de bind \"{0}\" deve especificar um valor para o atributo \"namespace\"
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notUnique=a falha \"{0}\" na opera\u00E7\u00E3o \"{1}\" corresponde a mais de uma falha na opera\u00E7\u00E3o do tipo de porta correspondente
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notFound=a falha \"{0}\" na opera\u00E7\u00E3o \"{1}\" n\u00E3o corresponde a nenhuma falha na opera\u00E7\u00E3o do tipo de porta correspondente
-# Not concatenated with any other string.
-wsdlmodeler.invalid.portTypeFault.notFound=a falha \\"{0}\\" na opera\u00E7\u00E3o portType \\"{1}\\" n\u00E3o corresponde a nenhuma falha na opera\u00E7\u00E3o de bind correspondente
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=a falha \"{0}\" na opera\u00E7\u00E3o \"{1}\" n\u00E3o tem uma extens\u00E3o de falha SOAP
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingName=a falha \\"{0}\\" na opera\u00E7\u00E3o \\"{1}\\" deve especificar um valor para o atributo \\"name\\"
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingNamespace=a falha \\"{0}\\" na opera\u00E7\u00E3o \\"{1}\\" deve especificar um valor para o atributo \\"namespace\\"
-wsdlmodeler.invalid.bindingFault.emptyMessage=a falha \"{0}\" refere-se \u00E0 mensagem \"{1}\", mas a mensagem n\u00E3o tem partes
-wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=a falha \"{0}\" refere-se \u00E0 mensagem \"{1}\", mas a mensagem tem mais de uma parte
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute
-# Not concatenated with any other string.
-wsdlmodeler.invalid.message.partMustHaveElementDescriptor=na mensagem \\"{0}\\", a parte \\"{1}\\" deve especificar um atributo \\"element\\"
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid=invalid WSDL document
-wsdlmodeler.unsolvableNamingConflicts=ocorreu o seguinte conflito de nomea\u00E7\u00E3o: {0}
-#
-wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=ignorando o elemento do esquema (vers\u00E3o n\u00E3o suportada): {0}
-wsdlmodeler.warning.searchSchema.unrecognizedTypes=encontrou {0} tipo(s) reconhecido(s)
-wsdlmodeler.warning.noServiceDefinitionsFound=O documento WSDL n\u00E3o define nenhum servi\u00E7o
-wsdlmodeler.warning.noPortsInService=O servi\u00E7o \\"{0}\\" n\u00E3o cont\u00E9m nenhuma porta utiliz\u00E1vel. Tente executar wsimport com a chave -extension.
-wsdlmodeler.warning.noOperationsInPort=A porta \"{0}\" n\u00E3o cont\u00E9m nenhuma opera\u00E7\u00E3o utiliz\u00E1vel
-wsdlmodeler.warning.ignoringNonSOAPPort=ignorando a porta \\"{0}\\": n\u00E3o \u00E9 uma porta SOAP padr\u00E3o. Tente executar wsimport com a chave -extension.
-# Not concatenated with any other string.
-wsdlmodeler.warning.nonSOAPPort=a porta \\"{0}\\": n\u00E3o \u00E9 uma porta SOAP padr\u00E3o. Os artefatos gerados n\u00E3o funcionam com o runtime de JAX-WS.
-wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=ignorando a porta \\"{0}\\": nenhum endere\u00E7o SOAP especificado. Tente executar wsimport com a chave -extension.
-# Not concatenated with any other string.
-wsdlmodeler.warning.noSOAPAddress=A porta \\"{0}\\" n\u00E3o \u00E9 uma porta SOAP; ela n\u00E3o tem soap:address
-wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:ignorando a porta \\"{0}\\" SOAP: transporte n\u00E3o reconhecido. Tente executar wsimport com a chave -extension.
-
-#BP1.1 R2705
-wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=ignorando a porta \\"{0}\\", ela n\u00E3o \u00E9 compat\u00EDvel com WS-I BP 1.1: o bind do wsdl tem estilo misturado. Ele deve ser literal de rpc ou uma opera\u00E7\u00E3o literal do documento. Tente executar wsimport com a chave -extension.
-# Not concatenated with any other string.
-wsdlmodeler.warning.port.SOAPBinding.mixedStyle=n\u00E3o \u00E9 uma porta SOAP \\"{0}\\" compat\u00EDvel com WS-I BP1.1: o bind do WSDL tem estilo misto, deve ser uma opera\u00E7\u00E3o de literal do documento ou literal de rpc!
-
-wsdlmodeler.warning.ignoringOperation.notSupportedStyle=ignorando opera\u00E7\u00E3o \"{0}\": n\u00E3o \u00E9 solicita\u00E7\u00E3o-resposta ou unidirecional
-wsdlmodeler.invalid.operation.notSupportedStyle=WSDL inv\u00E1lido, wsdl:operation \\"{0}\\" no wsdl:portType \\"{1}\\": nenhuma solicita\u00E7\u00E3o-resposta ou unidirecional
-wsdlmodeler.warning.ignoringOperation.notEncoded=ignorando opera\u00E7\u00E3o RPC-style \"{0}\": par\u00E2metros n\u00E3o codificados
-wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=ignorando opera\u00E7\u00E3o \\"{0}\\": n\u00E3o \u00E9 poss\u00EDvel tratar o atributo \\"parts\\" do elemento \\"soap:body\\"
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=ignorando opera\u00E7\u00E3o \"{0}\": a parte da mensagem n\u00E3o se refere a uma declara\u00E7\u00E3o de elemento do esquema
-wsdlmodeler.invalid.doclitoperation=wsdl:operation \\"{0}\\" inv\u00E1lida: \u00E9 uma opera\u00E7\u00E3o do documento-literal, a parte da mensagem deve se referir a uma declara\u00E7\u00E3o de elemento do esquema
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=ignorando opera\u00E7\u00E3o \"{0}\": a parte da mensagem n\u00E3o se refere a uma declara\u00E7\u00E3o do tipo de esquema
-wsdlmodeler.invalid.rpclitoperation=wsdl:operation \\"{0}\\" inv\u00E1lida: \u00E9 uma opera\u00E7\u00E3o de literal de rpc, a parte da mensagem deve se referir a uma declara\u00E7\u00E3o do tipo de esquema
-
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=ignorando opera\u00E7\u00E3o \\"{0}\\": n\u00E3o \u00E9 poss\u00EDvel tratar as opera\u00E7\u00F5es de estilo do documento
-wsdlmodeler.warning.bindingOperation.multiplePartBinding=Verifique o bind da opera\u00E7\u00E3o \\"{0}\\" abstrata, a parte \\"{1}\\" tem v\u00E1rios binds. Tentar\u00E1 gerar artefatos...
-wsdlmodeler.invalid.bindingOperation.multiplePartBinding=bind da opera\u00E7\u00E3o \\"{0}\\" abstrata, a parte \\"{1}\\" tem v\u00E1rios binds.
-wsdlmodeler.warning.ignoringFaults=ignorando falhas declaradas pela opera\u00E7\u00E3o \"{0}\"
-wsdlmodeler.warning.ignoringFault.notEncoded=ignorando a falha \\"{0}\\" literal da opera\u00E7\u00E3o \\"{1}\\" de bind
-wsdlmodeler.warning.ignoringFault.notLiteral=ignorando a falha \\"{0}\\" codificada da opera\u00E7\u00E3o \\"{1}\\" de bind
-wsdlmodeler.invalid.operation.fault.notLiteral=ignorando a falha \"{0}\" codificada da opera\u00E7\u00E3o \\"{1}\\" de associa\u00E7\u00E3o literal
-wsdlmodeler.warning.ignoringHeader=ignorando cabe\u00E7alho \\"{0}\\" da opera\u00E7\u00E3o de bind \\"{1}\\"
-wsdlmodeler.warning.ignoringHeader.partFromBody=a parte do cabe\u00E7alho: \\"{0}\\" j\u00E1 foi associada por soapbind:body, inv\u00E1lida para associar a parte duas vezes
-wsdlmodeler.warning.ignoringHeader.notLiteral=ignorando cabe\u00E7alho \"{0}\" da opera\u00E7\u00E3o de bind \"{1}\": n\u00E3o literal
-wsdlmodeler.invalid.header.notLiteral=Cabe\u00E7alho \\"{0}\\" inv\u00E1lido da opera\u00E7\u00E3o de bind \\"{1}\\": n\u00E3o literal
-wsdlmodeler.warning.ignoringHeader.notFound=ignorando cabe\u00E7alho \\"{0}\\" da opera\u00E7\u00E3o de bind \\"{1}\\": n\u00E3o encontrado
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.notFound=cabe\u00E7alho \\"{0}\\" da opera\u00E7\u00E3o de bind \\"{1}\\": n\u00E3o encontrado
-wsdlmodeler.warning.ignoringHeader.cant.resolve.message=ignorando cabe\u00E7alho \\"{0}\\" da opera\u00E7\u00E3o de bind \\"{1}\\": n\u00E3o \u00E9 poss\u00EDvel resolver a mensagem
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.cant.resolve.message=cabe\u00E7alho \\"{0}\\" da opera\u00E7\u00E3o de bind \\"{1}\\": n\u00E3o \u00E9 poss\u00EDvel resolver a mensagem
-
-wsdlmodeler.warning.ignoringFault.cant.resolve.message=ignorando falha \\"{0}\\" da opera\u00E7\u00E3o de bind \\"{1}\\": n\u00E3o \u00E9 poss\u00EDvel resolver a mensagem
-wsdlmodeler.invalid.fault.cant.resolve.message=n\u00E3o foi poss\u00EDvel resolver a mensagem de falha "{0}\\" na opera\u00E7\u00E3o de bind \\"{1}\\"
-
-wsdlmodeler.warning.ignoringHeader.notEncoded=ignorando cabe\u00E7alho \"{0}\" da opera\u00E7\u00E3o de bind \"{1}\": n\u00E3o codificado por SOAP
-wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=ignorando cabe\u00E7alho \\"{0}\\" da opera\u00E7\u00E3o de bind \\"{1}\\": parte n\u00E3o encontrada
-#
-wsdlmodeler.warning.ignoringOperation.notLiteral=ignorando opera\u00E7\u00E3o de estilo do documento \"{0}\": os par\u00E2metros n\u00E3o s\u00E3o literais
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=ignorando opera\u00E7\u00E3o \"{0}\": mais de uma parta na mensagem de entrada
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=ignorando opera\u00E7\u00E3o \"{0}\": mensagem de entrada vazia
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=ignorando opera\u00E7\u00E3o \"{0}\": mais de uma parta na mensagem de sa\u00EDda
-wsdlmodeler.warning.operation.MoreThanOnePartInMessage=Ignorando opera\u00E7\u00E3o \"{0}\": mais de uma parte vinculada ao corpo
-# Not concatenated with any other string.
-wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=opera\u00E7\u00E3o \"{0}\": mais de uma parte vinculada ao corpo
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=ignorando opera\u00E7\u00E3o \"{0}\": mensagem de sa\u00EDda vazia
-wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=ignorando opera\u00E7\u00E3o \\"{0}\\": o estilo de bind e o estilo da opera\u00E7\u00E3o est\u00E3o em conflito
-wsdlmodeler.warning.ignoringOperation.partNotFound=ignorando opera\u00E7\u00E3o \"{0}\": parte \"{1}\" n\u00E3o encontrada
-wsdlmodeler.error.partNotFound=n\u00E3o foi poss\u00EDvel resolver a parte \"{1}\" da opera\u00E7\u00E3o \"{0}\"!
-wsdlmodeler.warning.ignoringFault.documentOperation=ignorando falha \"{0}\" da opera\u00E7\u00E3o \"{1}\" do estilo de documento
-wsdlmodler.warning.operation.use=O WSDL usado tem opera\u00E7\u00F5es com uso codificado e literal. -f:searchschema n\u00E3o \u00E9 suportado para este cen\u00E1rio.
-#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=o nome de soap:fault \\"{0}\\" n\u00E3o corresponde ao nome do wsdl:fault \\"{1}\\" na opera\u00E7\u00E3o \\"{2}\\"
-#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.noSoapFaultName=nome de soap:fault n\u00E3o especificado, wsdl:fault \\"{0}\\" na opera\u00E7\u00E3o \\"{1}\\"
-
-wsdlmodeler.duplicate.fault.part.name=ignorando falha \"{0}\" da opera\u00E7\u00E3o \"{1}\", o nome da parte \"{2}\" n\u00E3o \u00E9 exclusivo
-wsdlmodeler.duplicate.fault.soap.name=ignorando falha \\"{0}\\" da opera\u00E7\u00E3o \\"{1}\\", o nome de soap:fault \\"{2}\\" n\u00E3o \u00E9 exclusivo
-
-wsdlmodeler.warning.ignoringHeaderFault.notFound=ignorando falha do cabe\u00E7alho \\"{0}\\", n\u00E3o \u00E9 poss\u00EDvel localizar a parte \\"{1}\\" no bind \\"{2}\\"
-# Usage not found. TODO Remove
-#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\"
-
-wsdlmodeler.warning.ignoringHeaderFault.notLiteral=ignorando parte de falha do cabe\u00E7alho=\"{0}\" mensagem=\"{1}\" da opera\u00E7\u00E3o {2}, o atributo de uso deve ser \"literal\"
-
-wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=ignorando parte de falha do cabe\u00E7alho=\"{0}\" mensagem=\"{1}\" da opera\u00E7\u00E3o {2}
-
-wsdlmodeler.invalid.headerfault.notLiteral=headerfault \\"{0}\\" inv\u00E1lido da opera\u00E7\u00E3o de bind \\"{1}\\": n\u00E3o literal
-wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=headerfault \\"{0}\\" inv\u00E1lido do cabe\u00E7alho {1} na opera\u00E7\u00E3o {2}: a parte deve especificar um atributo \\"element\\"
-wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=cabe\u00E7alho \\"{0}\\" inv\u00E1lido na opera\u00E7\u00E3o {1}: a parte deve especificar um atributo \\"element\\"
-
-
-#wsi warnings
-wsdlmodeler.warning.nonconforming.wsdl.import=WSDL de WS-I incompat\u00EDvel usado para wsdl:import
-wsdlmodeler.warning.nonconforming.wsdl.types=WSDL de WS-I incompat\u00EDvel usado para wsdl:types
-wsdlmodeler.warning.nonconforming.wsdl.use=Processando opera\u00E7\u00E3o incompat\u00EDvel com WS-I \"{0}\" com Estilo RPC e codificada com SOAP
-
-# optional parts
-# Not concatenated with any other string.
-wsdlmodeler.error.partsNotFound=partes \"{0}\" n\u00E3o encontradas na mensagem \"{1}\", WSDL incorreto
-
-# soap 1.2
-wsdlmodeler.warning.port.SOAPBinding12=a porta SOAP \\"{0}\\": usa um bind de SOAP 1.2 n\u00E3o padr\u00E3o.
-wsdlmodeler.warning.ignoringSOAPBinding12=Ignorando a porta SOAP \\"{0}\\": ela usa bind de SOAP 1.2 n\u00E3o padr\u00E3o.\nVoc\u00EA deve especificar a op\u00E7\u00E3o \\"-extension\\" para usar este bind.
-
-#WSI-BP1.0 Warning/Errors
-wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile vers\u00E3o 1.0, atributo de namespace n\u00E3o permitido em doc/lit para {0}: \\"{1}\\"
-
-# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException"
-wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile vers\u00E3o 1.0, atributo de namespace n\u00E3o permitido em doc/lit ou rpc/lit para {0}: \\"{1}\\"
-
-#WSI-BP 1.1 Warning/Errors
-# R2911
-mimemodeler.invalidMimePart.moreThanOneSOAPBody=Ignorando opera\u00E7\u00E3o \\"{0}\\". A estrutura com V\u00E1rias Partes/Relacionada tem parte da raiz inv\u00E1lida: mais de uma parte soap:body encontrada
-
-# R2906
-mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=Os cabe\u00E7alhos n\u00E3o est\u00E3o na raiz mime:parte com soap:body, ignorando cabe\u00E7alhos na opera\u00E7\u00E3o \\"{0}\\"
-
-# R2909
-mimemodeler.invalidMimeContent.differentPart=Ignorando mime:part. mime:part inv\u00E1lido, mime:content tem atributo de parte diferente.
-
-mimemodeler.invalidMimeContent.invalidSchemaType=Ignorando mime:part. mime part: {0} n\u00E3o pode ser mapeado para o tipo de esquema: {1}
-
-# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute.
-mimemodeler.invalidMimeContent.mesagePartElementKind=elemento wsdl:part mencionado pelo atributo da parte mime:content: {0} deve ser definido usando o atributo de tipo!
-
-# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute.
-mimemodeler.invalidMimeContent.missingPartAttribute=Ignorando a opera\u00E7\u00E3o \\"{0}\\", atributo da parte n\u00E3o encontrado no mime:content. O atributo da parte deve estar presente na declara\u00E7\u00E3o de mime:content.
-
-mimemodeler.invalidMimeContent.missingTypeAttribute=Atributo do tipo n\u00E3o encontrado no mime:content na opera\u00E7\u00E3o \\"{0}\\". O atributo da parte deve estar presente na declara\u00E7\u00E3o de mime:content.
-
-# unknown schematype
-mimemodeler.invalidMimeContent.unknownSchemaType=Tipo de esquema: {1} desconhecido para a parte mime:content: {0}
-mimemodeler.invalidMimeContent.errorLoadingJavaClass=N\u00E3o foi poss\u00EDvel localizar a classe \"{0}\" do tipo de mime \"{1}\"
-
-# missing wsdl:part referenced by the mime:content
-wsdlmodeler.warning.ignoringMimePart.notFound=ignorando mime:part, n\u00E3o \u00E9 poss\u00EDvel localizar a parte \\"{0}\\" mencionada por mime:content em wsdl:operation \\"{1}\\"
-
-mimemodeler.elementPart.invalidElementMimeType=A parte mime:content refere-se a wsdl:part \\"{0}\\", definida usando o atributo do elemento. Certifique-se de que o tipo mime: \\"{1}\\" \u00E9 apropriado para serializar o XML.
-
-# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute.
-mimemodeler.invalidMimePart.nameNotAllowed=o atributo de nome em wsdl:part na Opera\u00E7\u00E3o \\"{0}\\" foi ignorado. N\u00E3o \u00E9 permitido conforme WS-I AP 1.0.
-
-
-wsdlmodeler20.rpcenc.not.supported=wsdls de rpc/codificados n\u00E3o s\u00E3o suportados em JAXWS 2.0.
-wsdlmodeler.warning.ignoringOperation.notNCName=Ignorando a opera\u00E7\u00E3o \\"{0}\\", ela tem caractere ''{1}'' inv\u00E1lido em seu nome. Sua opera\u00E7\u00E3o literal de rpc - jaxws n\u00E3o poder\u00E1 serializ\u00E1-la!
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=Ignorando a opera\u00E7\u00E3o \\"{0}\\", n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java. Par\u00E2metro: parte "{2}\\" em wsdl:message \\"{1}\\", \u00E9 uma palavra-chave de java. Use a personaliza\u00E7\u00E3o para alterar o nome do par\u00E2metro ou alterar o wsdl:part name.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=Opera\u00E7\u00E3o inv\u00E1lida \\"{0}\\", n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java. Par\u00E2metro: parte "{2}\\" em wsdl:message \\"{1}\\", \u00E9 uma palavra-chave de java. Use a personaliza\u00E7\u00E3o para alterar o nome do par\u00E2metro ou alterar o wsdl:part name.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=Ignorando a opera\u00E7\u00E3o \\"{0}\\", n\u00E3o \u00E9 poss\u00EDvel gerar o par\u00E2metro do m\u00E9todo java. O nome do local do filho do encapsulador do filho do encapsulador \\"{1}\\" no elemento \\"{2}\\" global \u00E9 uma palavra-chave java. Use a personaliza\u00E7\u00E3o para alterar o nome do par\u00E2metro.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=Opera\u00E7\u00E3o \\"{0}\\" inv\u00E1lida, n\u00E3o \u00E9 poss\u00EDvel gerar o par\u00E2metro do m\u00E9todo java. O nome do local do filho do encapsulador do filho do encapsulador \\"{1}\\" no elemento \\"{2}\\" global \u00E9 uma palavra-chave java. Use a personaliza\u00E7\u00E3o para alterar o nome do par\u00E2metro.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=Ignorando a opera\u00E7\u00E3o \\"{0}\\", n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java. O par\u00E2metro, nome personalizado \\"{1}\\" \u00E9 uma palavra-chave de java.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=Opera\u00E7\u00E3o \\"{0}\\" inv\u00E1lida, n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java. O par\u00E2metro, nome personalizado \\"{1}\\" \u00E9 uma palavra-chave de java.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=Ignorando a opera\u00E7\u00E3o \\"{0}\\", \u00E9 uma palavra reservada de java, n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java. Use a personaliza\u00E7\u00E3o para alterar o nome da opera\u00E7\u00E3o.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=Opera\u00E7\u00E3o inv\u00E1lida \\"{0}\\", \u00E9 uma palavra reservada de java, n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java. Use a personaliza\u00E7\u00E3o para alterar o nome da opera\u00E7\u00E3o.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=Ignorando a opera\u00E7\u00E3o \\"{0}\\", n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java, o nome personalizado \\"{1}\\" de wsdl:operation \u00E9 uma palavra-chave de java.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=Opera\u00E7\u00E3o inv\u00E1lida \\"{0}\\", n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java, o nome personalizado \\"{1}\\" de wsdl:operation \u00E9 uma palavra-chave de java.
-
-wsdlmodeler.jaxb.javatype.notfound=O descritor do esquema {0} na parte da mensagem \\"{1}\\" n\u00E3o foi definido e n\u00E3o p\u00F4de ser vinculado ao Java. Talvez o descritor do esquema {0} n\u00E3o seja definido no esquema importado/inclu\u00EDdo no WSDL. Voc\u00EA pode adicionar importa\u00E7\u00F5es/inclus\u00F5es ou executar wsimport e fornecer a localiza\u00E7\u00E3o do esquema usando a chave -b.
-wsdlmodeler.unsupportedBinding.mime=O bind de MIME do WSDL n\u00E3o \u00E9 suportado no momento!
-
-wsdlmodeler.nonUnique.body.error=Sem partes do corpo exclusivas! Em uma porta, conforme BP 1.1 R2710, as opera\u00E7\u00F5es devem ter assinatura de opera\u00E7\u00E3o exclusiva na conex\u00E3o para obter despacho com sucesso. Na porta {0}, as Opera\u00E7\u00F5es \\"{1}\\" e \\"{2}\\" t\u00EAm o mesmo bloco do corpo da solicita\u00E7\u00E3o {3}. Tente executar wsimport com a chave -extension, o runtime tentar\u00E1 despachar usando SOAPAction
-wsdlmodeler.nonUnique.body.warning=Sem partes do corpo exclusivas! Em uma porta, conforme BP 1.1 R2710, as opera\u00E7\u00F5es devem ter assinatura de opera\u00E7\u00E3o exclusiva na conex\u00E3o para obter despacho com sucesso. Na porta {0}, as Opera\u00E7\u00F5es \\"{1}\\" e \\"{2}\\" t\u00EAm o mesmo bloco do corpo da solicita\u00E7\u00E3o {3}. O m\u00E9todo de despacho pode falhar, o runtime tentar\u00E1 despachar usando SOAPAction
-
-wsdlmodeler.rpclit.unkownschematype=O tipo \\"{0}\\" de XML n\u00E3o p\u00F4de ser resolvido, falha de bind de JAVA! Verifique a wsdl:part \\"{1}\\" em wsdl:message \\"{2}\\".
-
-wsdlmodeler.responsebean.notfound=falha de wsimport ao gerar o bean de resposta ass\u00EDncrona da opera\u00E7\u00E3o: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_CN.properties
deleted file mode 100644
index a97b1cee..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_CN.properties
+++ /dev/null
@@ -1,246 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# general
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-modeler.nestedModelError=\u5EFA\u6A21\u7A0B\u5E8F\u9519\u8BEF: {0}
-
-
-# WSDLModeler
-# Usage not found. TODO Remove
-#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0}
-wsdlmodeler.invalidOperation=\u64CD\u4F5C\u65E0\u6548: {0}
-wsdlmodeler.invalidState.modelingOperation=\u5BF9\u64CD\u4F5C\u5EFA\u6A21\u65F6\u7684\u72B6\u6001\u65E0\u6548: {0}
-wsdlmodeler.resultIsInOutParameter=\u7ED3\u679C\u4E3A\u64CD\u4F5C\u4E2D\u7684 \"inout\" \u53C2\u6570: {0}
-wsdlmodeler.invalid.parameterorder.parameter=\u64CD\u4F5C \"{1}\" \u7684 parameterOrder \u5C5E\u6027\u4E2D\u6307\u5B9A\u7684 \"{0}\" \u4E0D\u662F\u6D88\u606F\u7684\u6709\u6548\u90E8\u5206\u3002
-wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=\u64CD\u4F5C \"{0}\" \u7684 parameterOrder \u5C5E\u6027\u9057\u6F0F\u4E86\u591A\u4E2A\u90E8\u5206
-wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=\u64CD\u4F5C \"{0}\" \u4E0A\u7684 parameterOrder \u5C5E\u6027\u65E0\u6548, \u5FFD\u7565 parameterOrder \u63D0\u793A
-wsdlmodeler.invalid.parameter.differentTypes=\u64CD\u4F5C \"{1}\" \u7684\u53C2\u6570 \"{0}\" \u5728\u8F93\u5165\u548C\u8F93\u51FA\u6D88\u606F\u4E2D\u4EE5\u4E0D\u540C\u7C7B\u578B\u663E\u793A
-wsdlmodeler.invalid.bindingOperation.notInPortType=\u5728\u7ED1\u5B9A \"{1}\" \u4E2D, \u64CD\u4F5C \"{0}\" \u6CA1\u6709\u663E\u793A\u5728\u76F8\u5E94\u7684\u7AEF\u53E3\u7C7B\u578B\u4E2D
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u7684\u8F93\u5165\u6D88\u606F\u6CA1\u6709 SOAP \u4E3B\u4F53\u6269\u5C55
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u7684\u8F93\u51FA\u6D88\u606F\u6CA1\u6709 SOAP \u4E3B\u4F53\u6269\u5C55
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingInputName=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u5FC5\u987B\u4E3A\u5176\u8F93\u5165\u6D88\u606F\u6307\u5B9A\u540D\u79F0
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingOutputName=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u5FC5\u987B\u4E3A\u5176\u8F93\u51FA\u6D88\u606F\u6307\u5B9A\u540D\u79F0
-wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=\u5728\u7ED1\u5B9A \"{1}\" \u4E2D, \u64CD\u4F5C \"{0}\" \u672A\u5F15\u7528\u76F8\u5E94\u7AEF\u53E3\u7C7B\u578B\u4E2D\u7684\u552F\u4E00\u64CD\u4F5C
-wsdlmodeler.invalid.bindingOperation.notFound=\u5728\u7ED1\u5B9A \"{1}\" \u4E2D, \u64CD\u4F5C \"{0}\" \u4E0D\u4E0E\u76F8\u5E94\u7AEF\u53E3\u7C7B\u578B\u4E2D\u7684\u4EFB\u4F55\u64CD\u4F5C\u5339\u914D
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u7684\u8F93\u5165\u6D88\u606F\u5FC5\u987B\u6307\u5B9A \"namespace\" \u5C5E\u6027\u7684\u503C
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u7684\u8F93\u51FA\u6D88\u606F\u5FC5\u987B\u6307\u5B9A \"namespace\" \u5C5E\u6027\u7684\u503C
-wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u7684\u8F93\u5165\u6807\u5934 \"{1}\" \u5FC5\u987B\u6307\u5B9A \"namespace\" \u5C5E\u6027\u7684\u503C
-wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u7684\u8F93\u51FA\u6807\u5934 \"{1}\" \u5FC5\u987B\u6307\u5B9A \"namespace\" \u5C5E\u6027\u7684\u503C
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notUnique=\u64CD\u4F5C \"{1}\" \u4E2D\u7684\u6545\u969C \"{0}\" \u4E0E\u76F8\u5E94\u7AEF\u53E3\u7C7B\u578B\u64CD\u4F5C\u4E2D\u7684\u591A\u4E2A\u6545\u969C\u5339\u914D
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notFound=\u64CD\u4F5C \"{1}\" \u4E2D\u7684\u6545\u969C \"{0}\" \u4E0D\u4E0E\u76F8\u5E94\u7AEF\u53E3\u7C7B\u578B\u64CD\u4F5C\u4E2D\u7684\u4EFB\u4F55\u6545\u969C\u5339\u914D
-# Not concatenated with any other string.
-wsdlmodeler.invalid.portTypeFault.notFound=portType \u64CD\u4F5C \"{1}\" \u4E2D\u7684\u6545\u969C \"{0}\" \u4E0D\u4E0E\u76F8\u5E94\u7ED1\u5B9A\u64CD\u4F5C\u4E2D\u7684\u4EFB\u4F55\u6545\u969C\u5339\u914D
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=\u64CD\u4F5C \"{1}\" \u4E2D\u7684\u6545\u969C \"{0}\" \u6CA1\u6709 SOAP \u6545\u969C\u6269\u5C55
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingName=\u64CD\u4F5C \"{1}\" \u4E2D\u7684\u6545\u969C \"{0}\" \u5FC5\u987B\u6307\u5B9A \"name\" \u5C5E\u6027\u7684\u503C
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingNamespace=\u64CD\u4F5C \"{1}\" \u4E2D\u7684\u6545\u969C \"{0}\" \u5FC5\u987B\u6307\u5B9A \"namespace\" \u5C5E\u6027\u7684\u503C
-wsdlmodeler.invalid.bindingFault.emptyMessage=\u6545\u969C \"{0}\" \u5F15\u7528\u4E86\u6D88\u606F \"{1}\", \u4F46\u6D88\u606F\u6CA1\u6709\u4EFB\u4F55\u90E8\u5206
-wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=\u6545\u969C \"{0}\" \u5F15\u7528\u4E86\u6D88\u606F \"{1}\", \u4F46\u8BE5\u6D88\u606F\u6709\u591A\u4E2A\u90E8\u5206
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute
-# Not concatenated with any other string.
-wsdlmodeler.invalid.message.partMustHaveElementDescriptor=\u5728\u6D88\u606F \"{0}\" \u4E2D, \u90E8\u5206 \"{1}\" \u5FC5\u987B\u6307\u5B9A \"element\" \u5C5E\u6027
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid=invalid WSDL document
-wsdlmodeler.unsolvableNamingConflicts=\u53D1\u751F\u4EE5\u4E0B\u547D\u540D\u51B2\u7A81: {0}
-#
-wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=\u5FFD\u7565\u6A21\u5F0F\u5143\u7D20 (\u4E0D\u652F\u6301\u7684\u7248\u672C): {0}
-wsdlmodeler.warning.searchSchema.unrecognizedTypes=\u9047\u5230{0}\u65E0\u6CD5\u8BC6\u522B\u7684\u7C7B\u578B
-wsdlmodeler.warning.noServiceDefinitionsFound=WSDL \u6587\u6863\u672A\u5B9A\u4E49\u4EFB\u4F55\u670D\u52A1
-wsdlmodeler.warning.noPortsInService=\u670D\u52A1 \"{0}\" \u4E0D\u5305\u542B\u4EFB\u4F55\u53EF\u7528\u7AEF\u53E3\u3002\u8BF7\u5C1D\u8BD5\u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport\u3002
-wsdlmodeler.warning.noOperationsInPort=\u7AEF\u53E3 \"{0}\" \u4E0D\u5305\u542B\u4EFB\u4F55\u53EF\u7528\u64CD\u4F5C
-wsdlmodeler.warning.ignoringNonSOAPPort=\u5FFD\u7565\u7AEF\u53E3 \"{0}\": \u4E0D\u662F\u6807\u51C6 SOAP \u7AEF\u53E3\u3002\u8BF7\u5C1D\u8BD5\u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport\u3002
-# Not concatenated with any other string.
-wsdlmodeler.warning.nonSOAPPort=\u7AEF\u53E3 \"{0}\": \u4E0D\u662F\u6807\u51C6 SOAP \u7AEF\u53E3\u3002\u751F\u6210\u7684 Artifact \u53EF\u80FD\u65E0\u6CD5\u7528\u4E8E JAX-WS \u8FD0\u884C\u65F6\u3002
-wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=\u5FFD\u7565\u7AEF\u53E3 \"{0}\": \u672A\u6307\u5B9A SOAP \u5730\u5740\u3002\u8BF7\u5C1D\u8BD5\u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport\u3002
-# Not concatenated with any other string.
-wsdlmodeler.warning.noSOAPAddress=\u7AEF\u53E3 \"{0}\" \u4E0D\u662F SOAP \u7AEF\u53E3, \u5B83\u6CA1\u6709 soap:address
-wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:\u5FFD\u7565 SOAP \u7AEF\u53E3 \"{0}\": \u65E0\u6CD5\u8BC6\u522B\u7684\u4F20\u8F93\u3002\u8BF7\u5C1D\u8BD5\u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport\u3002
-
-#BP1.1 R2705
-wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=\u5FFD\u7565\u7AEF\u53E3 \"{0}\", \u5B83\u4E0E WS-I BP 1.1 \u4E0D\u517C\u5BB9: wsdl \u7ED1\u5B9A\u5177\u6709\u6DF7\u5408\u6837\u5F0F, \u5B83\u5FC5\u987B\u662F rpc-literal \u6216 document-literal \u64CD\u4F5C\u3002\u8BF7\u5C1D\u8BD5\u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport\u3002
-# Not concatenated with any other string.
-wsdlmodeler.warning.port.SOAPBinding.mixedStyle=\u4E0D\u662F WS-I BP1.1 \u517C\u5BB9\u7684 SOAP \u7AEF\u53E3 \"{0}\": WSDL \u7ED1\u5B9A\u5177\u6709\u6DF7\u5408\u6837\u5F0F, \u5B83\u5FC5\u987B\u662F rpc-literal \u6216 document-literal \u64CD\u4F5C!
-
-wsdlmodeler.warning.ignoringOperation.notSupportedStyle=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u4E0D\u662F\u8BF7\u6C42/\u54CD\u5E94\u6216\u5355\u5411
-wsdlmodeler.invalid.operation.notSupportedStyle=WSDL \u65E0\u6548, wsdl:portType \"{1}\" \u4E2D\u7684 wsdl:operation \"{0}\": \u4E0D\u662F\u8BF7\u6C42/\u54CD\u5E94\u6216\u5355\u5411
-wsdlmodeler.warning.ignoringOperation.notEncoded=\u5FFD\u7565 RPC \u6837\u5F0F\u64CD\u4F5C \"{0}\": \u53C2\u6570\u672A\u7F16\u7801
-wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u65E0\u6CD5\u5904\u7406 \"soap:body\" \u5143\u7D20\u7684 \"parts\" \u5C5E\u6027
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u6D88\u606F\u90E8\u5206\u672A\u5F15\u7528\u6A21\u5F0F\u5143\u7D20\u58F0\u660E
-wsdlmodeler.invalid.doclitoperation=wsdl:operation \"{0}\" \u65E0\u6548: \u5B83\u662F document-literal \u64CD\u4F5C, \u6D88\u606F\u90E8\u5206\u5FC5\u987B\u5F15\u7528\u6A21\u5F0F\u5143\u7D20\u58F0\u660E
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u6D88\u606F\u90E8\u5206\u672A\u5F15\u7528\u6A21\u5F0F\u7C7B\u578B\u58F0\u660E
-wsdlmodeler.invalid.rpclitoperation=wsdl:operation \"{0}\" \u65E0\u6548: \u5B83\u662F rpc-literal \u64CD\u4F5C, \u6D88\u606F\u90E8\u5206\u5FC5\u987B\u5F15\u7528\u6A21\u5F0F\u7C7B\u578B\u58F0\u660E
-
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u65E0\u6CD5\u5904\u7406\u6587\u6863\u6837\u5F0F\u64CD\u4F5C
-wsdlmodeler.warning.bindingOperation.multiplePartBinding=\u68C0\u67E5\u62BD\u8C61\u64CD\u4F5C \"{0}\" \u7ED1\u5B9A, \u90E8\u5206 \"{1}\" \u5177\u6709\u591A\u4E2A\u7ED1\u5B9A\u3002\u4ECD\u5C06\u5C1D\u8BD5\u751F\u6210\u7684 Artifact...
-wsdlmodeler.invalid.bindingOperation.multiplePartBinding=\u62BD\u8C61\u64CD\u4F5C \"{0}\" \u7ED1\u5B9A, \u90E8\u5206 \"{1}\" \u5177\u6709\u591A\u4E2A\u7ED1\u5B9A\u3002
-wsdlmodeler.warning.ignoringFaults=\u5FFD\u7565\u64CD\u4F5C \"{0}\" \u58F0\u660E\u7684\u6545\u969C
-wsdlmodeler.warning.ignoringFault.notEncoded=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6587\u5B57\u6545\u969C \"{0}\"
-wsdlmodeler.warning.ignoringFault.notLiteral=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u7F16\u7801\u6545\u969C \"{0}\"
-wsdlmodeler.invalid.operation.fault.notLiteral=\u5FFD\u7565\u6587\u5B57\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u4E2D\u7684\u7F16\u7801\u6545\u969C \"{0}\"
-wsdlmodeler.warning.ignoringHeader=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\"
-wsdlmodeler.warning.ignoringHeader.partFromBody=\u6807\u5934\u90E8\u5206: \"{0}\" \u5DF2\u7531 soapbind:body \u7ED1\u5B9A, \u4E24\u6B21\u7ED1\u5B9A\u8BE5\u90E8\u5206\u662F\u975E\u6CD5\u7684
-wsdlmodeler.warning.ignoringHeader.notLiteral=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\" : \u4E0D\u662F\u6587\u5B57
-wsdlmodeler.invalid.header.notLiteral=\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\" \u65E0\u6548: \u4E0D\u662F\u6587\u5B57
-wsdlmodeler.warning.ignoringHeader.notFound=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\": \u672A\u627E\u5230
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.notFound=\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\": \u672A\u627E\u5230
-wsdlmodeler.warning.ignoringHeader.cant.resolve.message=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\": \u65E0\u6CD5\u89E3\u6790\u6D88\u606F
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.cant.resolve.message=\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\": \u65E0\u6CD5\u89E3\u6790\u6D88\u606F
-
-wsdlmodeler.warning.ignoringFault.cant.resolve.message=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6545\u969C \"{0}\": \u65E0\u6CD5\u89E3\u6790\u6D88\u606F
-wsdlmodeler.invalid.fault.cant.resolve.message=\u65E0\u6CD5\u89E3\u6790\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u4E2D\u7684\u6545\u969C\u6D88\u606F \"{0}\"
-
-wsdlmodeler.warning.ignoringHeader.notEncoded=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\": \u4E0D\u662F SOAP \u7F16\u7801
-wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=\u5FFD\u7565\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\": \u672A\u627E\u5230\u90E8\u5206
-#
-wsdlmodeler.warning.ignoringOperation.notLiteral=\u5FFD\u7565\u6587\u6863\u6837\u5F0F\u64CD\u4F5C \"{0}\": \u53C2\u6570\u4E0D\u662F\u6587\u5B57
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u8F93\u5165\u6D88\u606F\u4E2D\u5305\u542B\u591A\u4E2A\u90E8\u5206
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u8F93\u5165\u6D88\u606F\u4E3A\u7A7A
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u8F93\u51FA\u6D88\u606F\u4E2D\u5305\u542B\u591A\u4E2A\u90E8\u5206
-wsdlmodeler.warning.operation.MoreThanOnePartInMessage=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u6709\u591A\u4E2A\u90E8\u5206\u7ED1\u5B9A\u5230\u4E3B\u4F53
-# Not concatenated with any other string.
-wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=\u64CD\u4F5C \"{0}\": \u6709\u591A\u4E2A\u90E8\u5206\u7ED1\u5B9A\u5230\u4E3B\u4F53
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u8F93\u51FA\u6D88\u606F\u4E3A\u7A7A
-wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u7ED1\u5B9A\u6837\u5F0F\u4E0E\u64CD\u4F5C\u6837\u5F0F\u53D1\u751F\u51B2\u7A81
-wsdlmodeler.warning.ignoringOperation.partNotFound=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u672A\u627E\u5230\u90E8\u5206 \"{1}\"
-wsdlmodeler.error.partNotFound=\u65E0\u6CD5\u89E3\u6790\u64CD\u4F5C \"{0}\" \u7684\u90E8\u5206 \"{1}\"!
-wsdlmodeler.warning.ignoringFault.documentOperation=\u5FFD\u7565\u6587\u6863\u6837\u5F0F\u64CD\u4F5C \"{1}\" \u7684\u6545\u969C \"{0}\"
-wsdlmodler.warning.operation.use=\u4F7F\u7528\u7684 WSDL \u6709\u4F7F\u7528\u4E86\u6587\u5B57\u548C\u7F16\u7801\u7684\u64CD\u4F5C\u3002\u8FD9\u79CD\u60C5\u51B5\u4E0B\u4E0D\u652F\u6301 -f:searchschema\u3002
-#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=\u5728\u64CD\u4F5C \"{2}\" \u4E2D, soap:fault \"{0}\" \u7684\u540D\u79F0\u4E0E wsdl:fault \"{1}\" \u7684\u540D\u79F0\u4E0D\u5339\u914D
-#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.noSoapFaultName=\u5728\u64CD\u4F5C \"{1}\" \u4E2D, \u6CA1\u6709\u4E3A wsdl:fault \"{0}\" \u6307\u5B9A soap:fault \u540D\u79F0
-
-wsdlmodeler.duplicate.fault.part.name=\u5FFD\u7565\u64CD\u4F5C \"{1}\" \u7684\u6545\u969C \"{0}\", \u90E8\u5206\u540D\u79F0 \"{2}\" \u4E0D\u552F\u4E00
-wsdlmodeler.duplicate.fault.soap.name=\u5FFD\u7565\u64CD\u4F5C \"{1}\" \u7684\u6545\u969C \"{0}\", soap:fault \u540D\u79F0 \"{2}\" \u4E0D\u552F\u4E00
-
-wsdlmodeler.warning.ignoringHeaderFault.notFound=\u5FFD\u7565\u6807\u5934\u6545\u969C \"{0}\", \u5728\u7ED1\u5B9A \"{2}\" \u4E2D\u627E\u4E0D\u5230\u90E8\u5206 \"{1}\"
-# Usage not found. TODO Remove
-#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\"
-
-wsdlmodeler.warning.ignoringHeaderFault.notLiteral=\u5FFD\u7565\u64CD\u4F5C{2}\u7684\u6807\u5934\u6545\u969C\u90E8\u5206=\"{0}\" \u6D88\u606F=\"{1}\", \u4F7F\u7528\u5C5E\u6027\u5FC5\u987B\u4E3A \"literal\"
-
-wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=\u5FFD\u7565\u64CD\u4F5C{2}\u7684\u6807\u5934\u6545\u969C\u90E8\u5206=\"{0}\" \u6D88\u606F=\"{1}\"
-
-wsdlmodeler.invalid.headerfault.notLiteral=\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934\u6545\u969C \"{0}\" \u65E0\u6548: \u4E0D\u662F\u6587\u5B57
-wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=\u64CD\u4F5C{2}\u4E2D\u6807\u5934{1}\u7684\u6807\u5934\u6545\u969C \"{0}\" \u65E0\u6548: \u90E8\u5206\u5FC5\u987B\u6307\u5B9A \"element\" \u5C5E\u6027
-wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=\u64CD\u4F5C{1}\u4E2D\u7684\u6807\u5934 \"{0}\" \u65E0\u6548: \u90E8\u5206\u5FC5\u987B\u6307\u5B9A \"element\" \u5C5E\u6027
-
-
-#wsi warnings
-wsdlmodeler.warning.nonconforming.wsdl.import=\u4E3A wsdl:import \u4F7F\u7528\u4E86\u4E0D\u4E00\u81F4\u7684 WS-I WSDL
-wsdlmodeler.warning.nonconforming.wsdl.types=\u4E3A wsdl:types \u4F7F\u7528\u4E86\u4E0D\u4E00\u81F4\u7684 WS-I WSDL
-wsdlmodeler.warning.nonconforming.wsdl.use=\u4F7F\u7528 RPC \u6837\u5F0F\u548C SOAP \u7F16\u7801\u5904\u7406 WS-I \u4E0D\u4E00\u81F4\u7684\u64CD\u4F5C \"{0}\"
-
-# optional parts
-# Not concatenated with any other string.
-wsdlmodeler.error.partsNotFound=\u5728\u6D88\u606F \"{1}\" \u4E2D\u627E\u4E0D\u5230\u90E8\u5206 \"{0}\", WSDL \u4E0D\u6B63\u786E
-
-# soap 1.2
-wsdlmodeler.warning.port.SOAPBinding12=SOAP \u7AEF\u53E3 \"{0}\": \u4F7F\u7528\u975E\u6807\u51C6 SOAP 1.2 \u7ED1\u5B9A\u3002
-wsdlmodeler.warning.ignoringSOAPBinding12=\u5FFD\u7565 SOAP \u7AEF\u53E3 \"{0}\": \u5B83\u4F7F\u7528\u975E\u6807\u51C6 SOAP 1.2 \u7ED1\u5B9A\u3002\n\u5FC5\u987B\u6307\u5B9A \"-extension\" \u9009\u9879\u4EE5\u4F7F\u7528\u6B64\u7ED1\u5B9A\u3002
-
-#WSI-BP1.0 Warning/Errors
-wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile \u7248\u672C 1.0, {0}\u7684 doc/lit \u4E2D\u4E0D\u5141\u8BB8\u6709\u540D\u79F0\u7A7A\u95F4\u5C5E\u6027: \"{1}\"
-
-# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException"
-wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile \u7248\u672C 1.0, {0}\u7684 doc/lit \u6216 rpc/lit \u4E2D\u4E0D\u5141\u8BB8\u6709\u540D\u79F0\u7A7A\u95F4\u5C5E\u6027: \"{1}\"
-
-#WSI-BP 1.1 Warning/Errors
-# R2911
-mimemodeler.invalidMimePart.moreThanOneSOAPBody=\u5FFD\u7565\u64CD\u4F5C \"{0}\"\u3002\u201C\u591A\u90E8\u5206/\u76F8\u5173\u201D\u7ED3\u6784\u5305\u542B\u65E0\u6548\u7684\u6839\u90E8\u5206: \u627E\u5230\u591A\u4E2A soap:body \u90E8\u5206
-
-# R2906
-mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=\u6807\u5934\u4E0D\u5728\u5E26\u6709 soap:body \u7684\u6839 mime:part \u4E2D, \u5FFD\u7565\u64CD\u4F5C \"{0}\" \u4E2D\u7684\u6807\u5934
-
-# R2909
-mimemodeler.invalidMimeContent.differentPart=\u5FFD\u7565 mime:part\u3002mime:part \u65E0\u6548, mime:content \u5177\u6709\u4E0D\u540C\u7684\u90E8\u5206\u5C5E\u6027\u3002
-
-mimemodeler.invalidMimeContent.invalidSchemaType=\u5FFD\u7565 mime:part\u3002mime part: {0}\u65E0\u6CD5\u6620\u5C04\u5230\u6A21\u5F0F\u7C7B\u578B: {1}
-
-# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute.
-mimemodeler.invalidMimeContent.mesagePartElementKind=wsdl:part \u5143\u7D20\u7531 mime:content \u90E8\u5206\u5C5E\u6027\u5F15\u7528: \u5FC5\u987B\u4F7F\u7528\u7C7B\u578B\u5C5E\u6027\u5B9A\u4E49{0}!
-
-# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute.
-mimemodeler.invalidMimeContent.missingPartAttribute=\u5FFD\u7565\u64CD\u4F5C \"{0}\", mime:content \u4E2D\u7F3A\u5C11\u90E8\u5206\u5C5E\u6027\u3002mime:content \u58F0\u660E\u4E2D\u5FC5\u987B\u5B58\u5728\u90E8\u5206\u5C5E\u6027\u3002
-
-mimemodeler.invalidMimeContent.missingTypeAttribute=\u64CD\u4F5C \"{0}\" \u7684 mime:content \u4E2D\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u3002mime:content \u58F0\u660E\u4E2D\u5FC5\u987B\u5B58\u5728\u90E8\u5206\u5C5E\u6027\u3002
-
-# unknown schematype
-mimemodeler.invalidMimeContent.unknownSchemaType=mime:content \u90E8\u5206\u7684\u672A\u77E5\u6A21\u5F0F\u7C7B\u578B{1}: {0}
-mimemodeler.invalidMimeContent.errorLoadingJavaClass=\u627E\u4E0D\u5230 mime \u7C7B\u578B \"{1}\" \u7684\u7C7B \"{0}\"
-
-# missing wsdl:part referenced by the mime:content
-wsdlmodeler.warning.ignoringMimePart.notFound=\u5FFD\u7565 mime:part, \u5728 wsdl:operation \"{1}\" \u4E2D\u627E\u4E0D\u5230\u7531 mime:content \u5F15\u7528\u7684\u90E8\u5206 \"{0}\"
-
-mimemodeler.elementPart.invalidElementMimeType=mime:content \u90E8\u5206\u5F15\u7528\u4F7F\u7528\u5143\u7D20\u5C5E\u6027\u5B9A\u4E49\u7684 wsdl:part \"{0}\"\u3002\u8BF7\u786E\u4FDD mime \u7C7B\u578B \"{1}\" \u9002\u5408\u5E8F\u5217\u5316 XML\u3002
-
-# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute.
-mimemodeler.invalidMimePart.nameNotAllowed=\u5FFD\u7565\u64CD\u4F5C \"{0}\" \u4E2D\u7684 wsdl:part \u7684\u540D\u79F0\u5C5E\u6027\u3002\u6839\u636E WS-I AP 1.0 \u89C4\u5B9A, \u4E0D\u5141\u8BB8\u6709\u8BE5\u5C5E\u6027\u3002
-
-
-wsdlmodeler20.rpcenc.not.supported=JAXWS 2.0 \u4E2D\u4E0D\u652F\u6301 rpc/\u7F16\u7801\u7684 wsdl\u3002
-wsdlmodeler.warning.ignoringOperation.notNCName=\u5FFD\u7565\u64CD\u4F5C \"{0}\", \u8BE5\u64CD\u4F5C\u7684\u540D\u79F0\u4E2D\u5305\u542B\u975E\u6CD5\u5B57\u7B26 ''{1}''\u3002jaxws \u65E0\u6CD5\u5BF9\u5176 rpc-literal \u64CD\u4F5C\u8FDB\u884C\u5E8F\u5217\u5316!
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=\u5FFD\u7565\u64CD\u4F5C \"{0}\", \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u3002wsdl:message \"{1}\" \u4E2D\u7684\u53C2\u6570\u90E8\u5206 "{2}\" \u662F java \u5173\u952E\u5B57\u3002\u8BF7\u4F7F\u7528\u5B9A\u5236\u8BBE\u7F6E\u66F4\u6539\u8BE5\u53C2\u6570\u540D\u6216\u66F4\u6539 wsdl:part \u540D\u79F0\u3002
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=\u64CD\u4F5C \"{0}\" \u65E0\u6548, \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u3002wsdl:message \"{1}\" \u4E2D\u7684\u53C2\u6570\u90E8\u5206 "{2}\" \u662F java \u5173\u952E\u5B57\u3002\u8BF7\u4F7F\u7528\u5B9A\u5236\u8BBE\u7F6E\u66F4\u6539\u8BE5\u53C2\u6570\u540D\u6216\u66F4\u6539 wsdl:part \u540D\u79F0\u3002
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=\u5FFD\u7565\u64CD\u4F5C \"{0}\", \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u53C2\u6570\u3002\u5168\u5C40\u5143\u7D20 \"{2}\" \u4E2D\u5305\u88C5\u5B50\u7EA7 \"{1}\" \u7684\u672C\u5730\u540D\u79F0\u662F java \u5173\u952E\u5B57\u3002\u8BF7\u4F7F\u7528\u5B9A\u5236\u8BBE\u7F6E\u66F4\u6539\u8BE5\u53C2\u6570\u540D\u3002
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=\u64CD\u4F5C \"{0}\" \u65E0\u6548, \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u53C2\u6570\u3002\u5168\u5C40\u5143\u7D20 \"{2}\" \u4E2D\u5305\u88C5\u5B50\u7EA7 \"{1}\" \u7684\u672C\u5730\u540D\u79F0\u662F java \u5173\u952E\u5B57\u3002\u8BF7\u4F7F\u7528\u5B9A\u5236\u8BBE\u7F6E\u66F4\u6539\u8BE5\u53C2\u6570\u540D\u3002
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=\u5FFD\u7565\u64CD\u4F5C \"{0}\", \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u3002\u53C2\u6570\u7684\u5B9A\u5236\u540D\u79F0 \"{1}\" \u662F java \u5173\u952E\u5B57\u3002
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=\u64CD\u4F5C \"{0}\" \u65E0\u6548, \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u3002\u53C2\u6570\u7684\u5B9A\u5236\u540D\u79F0 \"{1}\" \u662F java \u5173\u952E\u5B57\u3002
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=\u5FFD\u7565\u64CD\u4F5C \"{0}\", \u5B83\u662F java \u4FDD\u7559\u5173\u952E\u5B57, \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u3002\u8BF7\u4F7F\u7528\u5B9A\u5236\u8BBE\u7F6E\u66F4\u6539\u8BE5\u64CD\u4F5C\u540D\u3002
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=\u64CD\u4F5C \"{0}\" \u65E0\u6548, \u5B83\u662F java \u4FDD\u7559\u5173\u952E\u5B57, \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u3002\u8BF7\u4F7F\u7528\u5B9A\u5236\u8BBE\u7F6E\u66F4\u6539\u8BE5\u64CD\u4F5C\u540D\u3002
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=\u5FFD\u7565\u64CD\u4F5C \"{0}\", \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u3002wsdl:operation \u7684\u5B9A\u5236\u540D\u79F0 \"{1}\" \u662F java \u5173\u952E\u5B57\u3002
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=\u64CD\u4F5C \"{0}\" \u65E0\u6548, \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5, wsdl:operation \u7684\u5B9A\u5236\u540D\u79F0 \"{1}\" \u662F java \u5173\u952E\u5B57\u3002
-
-wsdlmodeler.jaxb.javatype.notfound=\u6D88\u606F\u90E8\u5206 \"{1}\" \u4E2D\u7684\u6A21\u5F0F\u63CF\u8FF0\u7B26{0}\u672A\u5B9A\u4E49, \u65E0\u6CD5\u7ED1\u5B9A\u5230 Java\u3002\u53EF\u80FD\u662F\u672A\u5728\u5DF2\u5BFC\u5165/\u5305\u542B\u5728 WSDL \u4E2D\u7684\u6A21\u5F0F\u4E2D\u5B9A\u4E49\u6A21\u5F0F\u63CF\u8FF0\u7B26{0}\u3002\u53EF\u4EE5\u6DFB\u52A0\u6B64\u7C7B\u5BFC\u5165/\u5305\u542B\u9879, \u6216\u8005\u8FD0\u884C wsimport \u5E76\u4F7F\u7528 -b \u5F00\u5173\u63D0\u4F9B\u6A21\u5F0F\u4F4D\u7F6E\u3002
-wsdlmodeler.unsupportedBinding.mime=\u5F53\u524D\u4E0D\u652F\u6301 WSDL MIME \u7ED1\u5B9A!
-
-wsdlmodeler.nonUnique.body.error=\u975E\u552F\u4E00\u4E3B\u4F53\u90E8\u5206! \u6309\u7167 BP 1.1 R2710 \u89C4\u5B9A, \u5728\u7AEF\u53E3\u4E2D\u64CD\u4F5C\u5FC5\u987B\u5177\u6709\u552F\u4E00\u7684\u901A\u4FE1\u64CD\u4F5C\u7B7E\u540D\u624D\u80FD\u6210\u529F\u5206\u6D3E\u3002\u5728\u7AEF\u53E3 {0} \u4E2D, \u64CD\u4F5C \"{1}\" \u548C \"{2}\" \u5177\u6709\u76F8\u540C\u7684\u8BF7\u6C42\u4E3B\u4F53\u5757{3}\u3002\u8BF7\u5C1D\u8BD5\u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport, \u8FD0\u884C\u65F6\u5C06\u5C1D\u8BD5\u4F7F\u7528 SOAPAction \u8FDB\u884C\u5206\u6D3E
-wsdlmodeler.nonUnique.body.warning=\u975E\u552F\u4E00\u4E3B\u4F53\u90E8\u5206! \u6309\u7167 BP 1.1 R2710 \u89C4\u5B9A, \u5728\u7AEF\u53E3\u4E2D\u64CD\u4F5C\u5FC5\u987B\u5177\u6709\u552F\u4E00\u7684\u901A\u4FE1\u64CD\u4F5C\u7B7E\u540D\u624D\u80FD\u6210\u529F\u5206\u6D3E\u3002\u5728\u7AEF\u53E3 {0} \u4E2D, \u64CD\u4F5C \"{1}\" \u548C \"{2}\" \u5177\u6709\u76F8\u540C\u7684\u8BF7\u6C42\u4E3B\u4F53\u5757{3}\u3002\u65B9\u6CD5\u5206\u6D3E\u53EF\u80FD\u5931\u8D25, \u8FD0\u884C\u65F6\u5C06\u5C1D\u8BD5\u4F7F\u7528 SOAPAction \u8FDB\u884C\u5206\u6D3E
-
-wsdlmodeler.rpclit.unkownschematype=\u65E0\u6CD5\u89E3\u6790 XML \u7C7B\u578B \"{0}\", XML \u5230 JAVA \u7684\u7ED1\u5B9A\u5931\u8D25! \u8BF7\u68C0\u67E5 wsdl:message \"{2}\" \u4E2D\u7684 wsdl:part \"{1}\"\u3002
-
-wsdlmodeler.responsebean.notfound=wsimport \u65E0\u6CD5\u4E3A\u64CD\u4F5C\u751F\u6210\u5F02\u6B65\u54CD\u5E94 bean: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_TW.properties
deleted file mode 100644
index 5287edaa..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_TW.properties
+++ /dev/null
@@ -1,246 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# general
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-modeler.nestedModelError=\u6A21\u578B\u88FD\u4F5C\u5668\u932F\u8AA4: {0}
-
-
-# WSDLModeler
-# Usage not found. TODO Remove
-#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0}
-wsdlmodeler.invalidOperation=\u7121\u6548\u7684\u4F5C\u696D: {0}
-wsdlmodeler.invalidState.modelingOperation=\u9032\u884C\u6A21\u578B\u5316\u4F5C\u696D\u6642\u7684\u72C0\u614B\u7121\u6548: {0}
-wsdlmodeler.resultIsInOutParameter=\u7D50\u679C\u662F\u4F5C\u696D {0} \u4E2D\u7684 \"inout\" \u53C3\u6578
-wsdlmodeler.invalid.parameterorder.parameter=\u4F5C\u696D \\"{1}\\" \u4E4B parameterOrder \u5C6C\u6027\u6307\u5B9A\u7684 \\"{0}\\" \u4E0D\u662F\u6709\u6548\u7684\u8A0A\u606F\u7D44\u4EF6.
-wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=\u4F5C\u696D \"{0}\" \u7684 parameterOrder \u5C6C\u6027\u6F0F\u6389\u4E00\u500B\u4EE5\u4E0A\u7684\u7D44\u4EF6
-wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=\u4F5C\u696D \"{0}\" \u7684 parameterOrder \u5C6C\u6027\u7121\u6548, \u5FFD\u7565 parameterOrder \u63D0\u793A
-wsdlmodeler.invalid.parameter.differentTypes=\u4F5C\u696D \"{1}\" \u7684\u53C3\u6578 \"{0}\" \u5728\u8F38\u5165\u548C\u8F38\u51FA\u8A0A\u606F\u4E2D\u4EE5\u4E0D\u540C\u7684\u985E\u578B\u51FA\u73FE
-wsdlmodeler.invalid.bindingOperation.notInPortType=\u5728\u9023\u7D50 \"{1}\" \u4E2D, \u4F5C\u696D \"{0}\" \u672A\u986F\u793A\u5728\u5C0D\u61C9\u7684\u9023\u63A5\u57E0\u985E\u578B\u4E2D
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=\u9023\u7D50\u4F5C\u696D \"{0}\" \u7684\u8F38\u5165\u8A0A\u606F\u6C92\u6709 SOAP \u4E3B\u9AD4\u64F4\u5145
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=\u9023\u7D50\u4F5C\u696D \"{0}\" \u7684\u8F38\u51FA\u8A0A\u606F\u6C92\u6709 SOAP \u4E3B\u9AD4\u64F4\u5145
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingInputName=\u9023\u7D50\u4F5C\u696D \"{0}\" \u5FC5\u9808\u6307\u5B9A\u5176\u8F38\u5165\u8A0A\u606F\u7684\u540D\u7A31
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.missingOutputName=\u9023\u7D50\u4F5C\u696D \"{0}\" \u5FC5\u9808\u6307\u5B9A\u5176\u8F38\u51FA\u8A0A\u606F\u7684\u540D\u7A31
-wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=\u5728\u9023\u7D50 \"{1}\" \u4E2D, \u4F5C\u696D \"{0}\" \u672A\u53C3\u7167\u76F8\u5C0D\u61C9\u9023\u63A5\u57E0\u985E\u578B\u4E2D\u7684\u4E00\u9805\u552F\u4E00\u4F5C\u696D
-wsdlmodeler.invalid.bindingOperation.notFound=\u5728\u9023\u7D50 \"{1}\" \u4E2D, \u4F5C\u696D \"{0}\" \u4E0D\u7B26\u5408\u76F8\u5C0D\u61C9\u9023\u63A5\u57E0\u985E\u578B\u4E2D\u7684\u4EFB\u4F55\u4F5C\u696D
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=\u9023\u7D50\u4F5C\u696D \"{0}\" \u7684\u8F38\u5165\u8A0A\u606F\u5FC5\u9808\u70BA \"namespace\" \u5C6C\u6027\u6307\u5B9A\u4E00\u500B\u503C
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=\u9023\u7D50\u4F5C\u696D \"{0}\" \u7684\u8F38\u51FA\u8A0A\u606F\u5FC5\u9808\u70BA \"namespace\" \u5C6C\u6027\u6307\u5B9A\u4E00\u500B\u503C
-wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=\u9023\u7D50\u4F5C\u696D \"{0}\" \u7684\u8F38\u5165\u6A19\u982D \"{1}\" \u5FC5\u9808\u6307\u5B9A \"namespace\" \u5C6C\u6027\u7684\u503C
-wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=\u9023\u7D50\u4F5C\u696D \"{0}\" \u7684\u8F38\u51FA\u6A19\u982D \"{1}\" \u5FC5\u9808\u6307\u5B9A \"namespace\" \u5C6C\u6027\u7684\u503C
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notUnique=\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\" \u7B26\u5408\u5C0D\u61C9\u9023\u63A5\u57E0\u985E\u578B\u4F5C\u696D\u4E2D\u4E00\u500B\u4EE5\u4E0A\u7684\u932F\u8AA4
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.notFound=\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\" \u4E0D\u7B26\u5408\u5C0D\u61C9\u9023\u63A5\u57E0\u985E\u578B\u4F5C\u696D\u4E2D\u7684\u4EFB\u4F55\u932F\u8AA4
-# Not concatenated with any other string.
-wsdlmodeler.invalid.portTypeFault.notFound=portType \u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\" \u4E0D\u7B26\u5408\u76F8\u5C0D\u61C9\u9023\u7D50\u4F5C\u696D\u4E2D\u7684\u4EFB\u4F55\u932F\u8AA4
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\" \u6C92\u6709 SOAP \u932F\u8AA4\u64F4\u5145
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingName=\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\" \u5FC5\u9808\u6307\u5B9A \"name\" \u5C6C\u6027\u7684\u503C
-# Not concatenated with any other string.
-wsdlmodeler.invalid.bindingFault.missingNamespace=\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\" \u5FC5\u9808\u6307\u5B9A \"namespace\" \u5C6C\u6027\u7684\u503C
-wsdlmodeler.invalid.bindingFault.emptyMessage=\u932F\u8AA4 \"{0}\" \u8207\u8A0A\u606F \"{1}\" \u6709\u95DC, \u4F46\u662F\u8A0A\u606F\u6C92\u6709\u7D44\u4EF6
-wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=\u932F\u8AA4 \"{0}\" \u8207\u8A0A\u606F \"{1}\" \u6709\u95DC, \u4F46\u662F\u8A0A\u606F\u6709\u4E00\u500B\u4EE5\u4E0A\u7684\u7D44\u4EF6
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute
-# Not concatenated with any other string.
-wsdlmodeler.invalid.message.partMustHaveElementDescriptor=\u5728\u8A0A\u606F \"{0}\" \u4E2D, \u7D44\u4EF6 \"{1}\" \u5FC5\u9808\u6307\u5B9A \"element\" \u5C6C\u6027
-# Usage not found. TODO Remove
-#wsdlmodeler.invalid=invalid WSDL document
-wsdlmodeler.unsolvableNamingConflicts=\u767C\u751F\u4E0B\u5217\u547D\u540D\u885D\u7A81: {0}
-#
-wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=\u5FFD\u7565\u7DB1\u8981\u5143\u7D20 (\u4E0D\u652F\u63F4\u7684\u7248\u672C): {0}
-wsdlmodeler.warning.searchSchema.unrecognizedTypes=\u767C\u73FE {0} \u500B\u7121\u6CD5\u8FA8\u8B58\u7684\u985E\u578B
-wsdlmodeler.warning.noServiceDefinitionsFound=WSDL \u6587\u4EF6\u672A\u5B9A\u7FA9\u4EFB\u4F55\u670D\u52D9
-wsdlmodeler.warning.noPortsInService=\u670D\u52D9 \"{0}\" \u672A\u5305\u542B\u4EFB\u4F55\u53EF\u4F7F\u7528\u7684\u9023\u63A5\u57E0. \u8ACB\u5617\u8A66\u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport.
-wsdlmodeler.warning.noOperationsInPort=\u9023\u63A5\u57E0 \"{0}\" \u672A\u5305\u542B\u4EFB\u4F55\u53EF\u4F7F\u7528\u7684\u4F5C\u696D
-wsdlmodeler.warning.ignoringNonSOAPPort=\u5FFD\u7565\u9023\u63A5\u57E0 \"{0}\": \u4E0D\u662F\u6A19\u6E96\u7684 SOAP \u9023\u63A5\u57E0. \u8ACB\u5617\u8A66\u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport.
-# Not concatenated with any other string.
-wsdlmodeler.warning.nonSOAPPort=\u9023\u63A5\u57E0 \"{0}\" \u4E0D\u662F\u6A19\u6E96\u7684 SOAP \u9023\u63A5\u57E0. \u7522\u751F\u7684\u4F7F\u7528\u8005\u81EA\u5EFA\u7269\u4EF6\u53EF\u80FD\u4E0D\u9069\u7528\u65BC JAX-WS \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C.
-wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=\u5FFD\u7565\u9023\u63A5\u57E0 \"{0}\": \u672A\u6307\u5B9A SOAP \u4F4D\u5740. \u8ACB\u5617\u8A66\u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport.
-# Not concatenated with any other string.
-wsdlmodeler.warning.noSOAPAddress=\u9023\u63A5\u57E0 \"{0}\" \u4E0D\u662F SOAP \u9023\u63A5\u57E0, \u5B83\u6C92\u6709 soap:address
-wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:\u5FFD\u7565 SOAP \u9023\u63A5\u57E0 \"{0}\": \u7121\u6CD5\u8FA8\u8B58\u7684\u50B3\u8F38. \u8ACB\u5617\u8A66\u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport.
-
-#BP1.1 R2705
-wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=\u5FFD\u7565\u9023\u63A5\u57E0 \"{0}\", \u672A\u8207 WS-I BP 1.1 \u76F8\u5BB9: WSDL \u9023\u7D50\u70BA\u6DF7\u5408\u6A23\u5F0F, \u5B83\u5FC5\u9808\u662F rpc-literal \u6216 document-literal \u4F5C\u696D. \u8ACB\u5617\u8A66\u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport.
-# Not concatenated with any other string.
-wsdlmodeler.warning.port.SOAPBinding.mixedStyle=\u4E0D\u662F WS-I BP1.1 \u76F8\u5BB9\u7684 SOAP \u9023\u63A5\u57E0 \"{0}\": WSDL \u9023\u7D50\u70BA\u6DF7\u5408\u6A23\u5F0F, \u5B83\u5FC5\u9808\u662F rpc-literal \u6216 document-literal \u4F5C\u696D!
-
-wsdlmodeler.warning.ignoringOperation.notSupportedStyle=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u975E\u8981\u6C42\u56DE\u61C9\u6216\u55AE\u5411
-wsdlmodeler.invalid.operation.notSupportedStyle=\u7121\u6548\u7684 WSDL, wsdl:portType \"{1}\" \u4E2D\u7684 wsdl:operation \"{0}\" \u975E\u8981\u6C42\u56DE\u61C9\u6216\u55AE\u5411
-wsdlmodeler.warning.ignoringOperation.notEncoded=\u5FFD\u7565 RPC \u6A23\u5F0F\u4F5C\u696D \"{0}\": \u672A\u7DE8\u78BC\u53C3\u6578
-wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u7121\u6CD5\u8655\u7406 \"soap:body\" \u5143\u7D20\u7684 \"parts\" \u5C6C\u6027
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u8A0A\u606F\u7D44\u4EF6\u672A\u53C3\u7167\u7DB1\u8981\u5143\u7D20\u5BA3\u544A
-wsdlmodeler.invalid.doclitoperation=\u7121\u6548\u7684 wsdl:operation \\"{0}\\": \u5B83\u662F document-literal \u4F5C\u696D, \u8A0A\u606F\u7D44\u4EF6\u5FC5\u9808\u53C3\u7167\u7DB1\u8981\u5143\u7D20\u5BA3\u544A
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u8A0A\u606F\u7D44\u4EF6\u672A\u53C3\u7167\u7DB1\u8981\u985E\u578B\u5BA3\u544A
-wsdlmodeler.invalid.rpclitoperation=\u7121\u6548\u7684 wsdl:operation \\"{0}\\": \u5B83\u662F rpc-literal \u4F5C\u696D, \u8A0A\u606F\u7D44\u4EF6\u5FC5\u9808\u53C3\u7167\u7DB1\u8981\u985E\u578B\u5BA3\u544A
-
-
-wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u7121\u6CD5\u8655\u7406\u6587\u4EF6\u6A23\u5F0F\u4F5C\u696D
-wsdlmodeler.warning.bindingOperation.multiplePartBinding=\u6AA2\u67E5\u6458\u8981\u4F5C\u696D \"{0}\" \u9023\u7D50, \u7D44\u4EF6 \"{1}\" \u542B\u6709\u591A\u500B\u9023\u7D50. \u4ECD\u5C07\u5617\u8A66\u7522\u751F\u4F7F\u7528\u8005\u81EA\u5EFA\u7269\u4EF6...
-wsdlmodeler.invalid.bindingOperation.multiplePartBinding=\u6458\u8981\u4F5C\u696D \"{0}\" \u9023\u7D50, \u7D44\u4EF6 \"{1}\" \u542B\u6709\u591A\u500B\u9023\u7D50.
-wsdlmodeler.warning.ignoringFaults=\u5FFD\u7565\u4F5C\u696D \"{0}\" \u6240\u5BA3\u544A\u7684\u932F\u8AA4
-wsdlmodeler.warning.ignoringFault.notEncoded=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u5E38\u503C\u932F\u8AA4 \"{0}\"
-wsdlmodeler.warning.ignoringFault.notLiteral=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u7DE8\u78BC\u932F\u8AA4 \"{0}\"
-wsdlmodeler.invalid.operation.fault.notLiteral=\u5FFD\u7565\u5E38\u503C\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u7DE8\u78BC\u932F\u8AA4 \"{0}\"
-wsdlmodeler.warning.ignoringHeader=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\"
-wsdlmodeler.warning.ignoringHeader.partFromBody=\u6A19\u982D\u90E8\u5206 \\"{0}\\" \u5DF2\u7531 soapbind:body \u9023\u7D50, \u6B64\u90E8\u5206\u9023\u7D50\u5169\u6B21\u7121\u6548
-wsdlmodeler.warning.ignoringHeader.notLiteral=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\": \u4E0D\u662F\u5E38\u503C
-wsdlmodeler.invalid.header.notLiteral=\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\" \u7121\u6548: \u4E0D\u662F\u5E38\u503C
-wsdlmodeler.warning.ignoringHeader.notFound=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\": \u627E\u4E0D\u5230
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.notFound=\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\": \u627E\u4E0D\u5230
-wsdlmodeler.warning.ignoringHeader.cant.resolve.message=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\": \u7121\u6CD5\u89E3\u6790\u8A0A\u606F
-# Not concatenated with any other string.
-wsdlmodeler.invalid.header.cant.resolve.message=\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\": \u7121\u6CD5\u89E3\u6790\u8A0A\u606F
-
-wsdlmodeler.warning.ignoringFault.cant.resolve.message=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\": \u7121\u6CD5\u89E3\u6790\u8A0A\u606F
-wsdlmodeler.invalid.fault.cant.resolve.message=\u7121\u6CD5\u89E3\u6790\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4\u8A0A\u606F \"{0}\"
-
-wsdlmodeler.warning.ignoringHeader.notEncoded=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\": \u4E0D\u662F SOAP \u7DE8\u78BC
-wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=\u5FFD\u7565\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\": \u627E\u4E0D\u5230\u7D44\u4EF6
-#
-wsdlmodeler.warning.ignoringOperation.notLiteral=\u5FFD\u7565\u6587\u4EF6\u6A23\u5F0F\u4F5C\u696D \"{0}\": \u53C3\u6578\u4E0D\u662F\u5E38\u503C
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u8F38\u5165\u8A0A\u606F\u5305\u542B\u591A\u500B\u7D44\u4EF6
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u8F38\u5165\u8A0A\u606F\u7A7A\u767D
-wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u8F38\u51FA\u8A0A\u606F\u5305\u542B\u591A\u500B\u7D44\u4EF6
-wsdlmodeler.warning.operation.MoreThanOnePartInMessage=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u591A\u500B\u7D44\u4EF6\u9023\u7D50\u81F3\u4E3B\u9AD4
-# Not concatenated with any other string.
-wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=\u4F5C\u696D \"{0}\": \u591A\u500B\u7D44\u4EF6\u9023\u7D50\u81F3\u4E3B\u9AD4
-wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u8F38\u51FA\u8A0A\u606F\u7A7A\u767D
-wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u9023\u7D50\u6A23\u5F0F\u8207\u4F5C\u696D\u6A23\u5F0F\u885D\u7A81
-wsdlmodeler.warning.ignoringOperation.partNotFound=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u627E\u4E0D\u5230\u7D44\u4EF6 \"{1}\"
-wsdlmodeler.error.partNotFound=\u7121\u6CD5\u89E3\u6790\u4F5C\u696D \"{0}\" \u7684\u7D44\u4EF6 \"{1}\"!
-wsdlmodeler.warning.ignoringFault.documentOperation=\u5FFD\u7565\u6587\u4EF6\u6A23\u5F0F\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\"
-wsdlmodler.warning.operation.use=\u4F7F\u7528\u7684 WSDL \u5305\u542B\u4F5C\u696D\u9644\u5E36\u5E38\u503C\u548C\u7DE8\u78BC\u7684\u7528\u6CD5. \u6B64\u6848\u4F8B\u4E0D\u652F\u63F4 -f:searchschema.
-#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=soap:fault \"{0}\" \u7684\u540D\u7A31\u8207\u4F5C\u696D \"{2}\" \u4E2D wsdl:fault \"{1}\" \u7684\u540D\u7A31\u4E0D\u7B26
-#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\"
-wsdlmodeler.invalid.bindingFault.noSoapFaultName=\u4F5C\u696D \\"{1}\\" \u4E2D\u7684 wsdl:fault \\"{0}\\" \u6C92\u6709\u6307\u5B9A soap:fault \u540D\u7A31
-
-wsdlmodeler.duplicate.fault.part.name=\u5FFD\u7565\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\", \u7D44\u4EF6\u540D\u7A31 \"{2}\" \u4E0D\u662F\u552F\u4E00\u7684
-wsdlmodeler.duplicate.fault.soap.name=\u5FFD\u7565\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\", soap:fault \u540D\u7A31 \"{2}\" \u4E0D\u662F\u552F\u4E00\u7684
-
-wsdlmodeler.warning.ignoringHeaderFault.notFound=\u5FFD\u7565\u6A19\u982D\u932F\u8AA4 \"{0}\", \u5728\u9023\u7D50 \"{2}\" \u4E2D\u627E\u4E0D\u5230\u7D44\u4EF6 \"{1}\"
-# Usage not found. TODO Remove
-#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\"
-
-wsdlmodeler.warning.ignoringHeaderFault.notLiteral=\u5FFD\u7565\u4F5C\u696D {2} \u4E4B\u8A0A\u606F \"{1}\" \u7684\u6A19\u982D\u932F\u8AA4\u7D44\u4EF6 \"{0}\", \u4F7F\u7528\u7684\u5C6C\u6027\u5FC5\u9808\u662F \"literal\"
-
-wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=\u5FFD\u7565\u4F5C\u696D {2} \u4E4B\u8A0A\u606F \"{1}\" \u7684\u6A19\u982D\u932F\u8AA4\u7D44\u4EF6 \"{0}\"
-
-wsdlmodeler.invalid.headerfault.notLiteral=\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D\u932F\u8AA4 \"{0}\" \u7121\u6548: \u4E0D\u662F\u5E38\u503C
-wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=\u4F5C\u696D {2} \u4E2D\u6A19\u982D {1} \u7684\u6A19\u982D\u932F\u8AA4 \"{0}\" \u7121\u6548: \u7D44\u4EF6\u5FC5\u9808\u6307\u5B9A \"element\" \u5C6C\u6027
-wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=\u4F5C\u696D {1} \u4E2D\u7684\u6A19\u982D \"{0}\" \u7121\u6548: \u7D44\u4EF6\u5FC5\u9808\u6307\u5B9A \"element\" \u5C6C\u6027
-
-
-#wsi warnings
-wsdlmodeler.warning.nonconforming.wsdl.import=\u4E0D\u7B26\u5408\u7528\u65BC wsdl:import \u7684 WS-I WSDL
-wsdlmodeler.warning.nonconforming.wsdl.types=\u4E0D\u7B26\u5408\u7528\u65BC wsdl:types \u7684 WS-I WSDL
-wsdlmodeler.warning.nonconforming.wsdl.use=\u6B63\u5728\u8655\u7406 RPC \u6A23\u5F0F\u4E14 SOAP \u7DE8\u78BC\u7684\u4E0D\u7B26\u5408 WS-I \u4F5C\u696D \"{0}\"
-
-# optional parts
-# Not concatenated with any other string.
-wsdlmodeler.error.partsNotFound=\u5728\u8A0A\u606F \"{1}\" \u627E\u4E0D\u5230\u7D44\u4EF6 \"{0}\", \u932F\u8AA4\u7684 WSDL
-
-# soap 1.2
-wsdlmodeler.warning.port.SOAPBinding12=SOAP \u9023\u63A5\u57E0 \"{0}\" \u4F7F\u7528\u975E\u6A19\u6E96\u7684 SOAP 1.2 \u9023\u7D50.
-wsdlmodeler.warning.ignoringSOAPBinding12=\u5FFD\u7565 SOAP \u9023\u63A5\u57E0 \"{0}\": \u5B83\u4F7F\u7528\u975E\u6A19\u6E96\u7684 SOAP 1.2 \u9023\u7D50.\n\u60A8\u5FC5\u9808\u6307\u5B9A \"-extension\" \u9078\u9805, \u624D\u80FD\u5920\u4F7F\u7528\u6B64\u9023\u7D50.
-
-#WSI-BP1.0 Warning/Errors
-wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile \u7248\u672C 1.0, \u4E0D\u5141\u8A31\u5728 {0} \u7684 doc/lit \u4E2D\u4F7F\u7528 namespace \u5C6C\u6027: \"{1}\"
-
-# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException"
-wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile \u7248\u672C 1.0, \u4E0D\u5141\u8A31\u5728 {0} \u7684 doc/lit \u6216 rpc/lit \u4E2D\u4F7F\u7528 namespace \u5C6C\u6027: \"{1}\"
-
-#WSI-BP 1.1 Warning/Errors
-# R2911
-mimemodeler.invalidMimePart.moreThanOneSOAPBody=\u5FFD\u7565\u4F5C\u696D \\"{0}\\". Multipart/Related \u7D50\u69CB\u7684\u6839\u90E8\u5206\u7121\u6548: \u767C\u73FE\u591A\u500B soap:body \u90E8\u5206
-
-# R2906
-mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=\u6A19\u982D\u4E0D\u662F\u5728 soap:body \u7684\u6839 mime:part \u4E2D, \u5FFD\u7565\u4F5C\u696D \"{0}\" \u4E2D\u7684\u6A19\u982D
-
-# R2909
-mimemodeler.invalidMimeContent.differentPart=\u5FFD\u7565 mime:part. \u7121\u6548\u7684 mime:part, mime:content \u542B\u6709\u4E0D\u540C\u7684 part \u5C6C\u6027.
-
-mimemodeler.invalidMimeContent.invalidSchemaType=\u5FFD\u7565 mime:part. mime \u90E8\u5206 {0} \u7121\u6CD5\u5C0D\u61C9\u81F3\u7DB1\u8981\u985E\u578B {1}
-
-# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute.
-mimemodeler.invalidMimeContent.mesagePartElementKind=mime:content part \u5C6C\u6027 {0} \u53C3\u7167\u7684 wsdl:part \u5143\u7D20\u5FC5\u9808\u4F7F\u7528 type \u5C6C\u6027\u5B9A\u7FA9!
-
-# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute.
-mimemodeler.invalidMimeContent.missingPartAttribute=\u5FFD\u7565\u4F5C\u696D \"{0}\", mime:content \u4E2D\u6C92\u6709 part \u5C6C\u6027. mime:content \u5BA3\u544A\u4E2D\u5FC5\u9808\u8981\u6709 part \u5C6C\u6027.
-
-mimemodeler.invalidMimeContent.missingTypeAttribute=\u4F5C\u696D \"{0}\" \u7684 mime:content \u4E2D\u6C92\u6709 type \u5C6C\u6027. mime:content \u5BA3\u544A\u4E2D\u5FC5\u9808\u8981\u6709 part \u5C6C\u6027.
-
-# unknown schematype
-mimemodeler.invalidMimeContent.unknownSchemaType=mime:content part: {0} \u7684\u7DB1\u8981\u985E\u578B {1} \u4E0D\u660E
-mimemodeler.invalidMimeContent.errorLoadingJavaClass=\u627E\u4E0D\u5230 mime \u985E\u578B \"{1}\" \u7684\u985E\u5225 \"{0}\"
-
-# missing wsdl:part referenced by the mime:content
-wsdlmodeler.warning.ignoringMimePart.notFound=\u5FFD\u7565 mime:part, \u627E\u4E0D\u5230 wsdl:operation \"{1}\" \u4E2D mime:content \u6240\u53C3\u7167\u7684\u90E8\u5206 \"{0}\"
-
-mimemodeler.elementPart.invalidElementMimeType=mime:content part \u53C3\u7167\u4E86\u4F7F\u7528 element \u5C6C\u6027\u5B9A\u7FA9\u7684 wsdl:part \"{0}\". \u8ACB\u78BA\u5B9A mime \u985E\u578B \"{1}\" \u9069\u5408\u5E8F\u5217\u5316 XML.
-
-# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute.
-mimemodeler.invalidMimePart.nameNotAllowed=\u5DF2\u5FFD\u7565\u4F5C\u696D \"{0}\" \u4E2D wsdl:part \u7684 name \u5C6C\u6027. WS-I AP 1.0 \u4E0D\u5141\u8A31.
-
-
-wsdlmodeler20.rpcenc.not.supported=JAXWS 2.0 \u4E0D\u652F\u63F4 rpc/encoded wsdl.
-wsdlmodeler.warning.ignoringOperation.notNCName=\u5FFD\u7565\u4F5C\u696D \"{0}\", \u5B83\u7684\u540D\u7A31\u4E2D\u542B\u6709\u7121\u6548\u7684\u5B57\u5143 ''{1}''. \u5B83\u7684 rpc-literal \u4F5C\u696D - jaxws \u7121\u6CD5\u5C07\u5B83\u5E8F\u5217\u5316!
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=\u5FFD\u7565\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5. wsdl:message \"{1}\" \u4E2D\u7684\u53C3\u6578 part "{2}\" \u70BA java \u95DC\u9375\u5B57. \u8ACB\u5229\u7528\u81EA\u8A02\u4F86\u8B8A\u66F4\u53C3\u6578\u540D\u7A31\u6216\u8B8A\u66F4 wsdl:part \u540D\u7A31.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=\u7121\u6548\u7684\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5. wsdl:message \"{1}\" \u4E2D\u7684\u53C3\u6578 part "{2}\" \u70BA java \u95DC\u9375\u5B57. \u8ACB\u5229\u7528\u81EA\u8A02\u4F86\u8B8A\u66F4\u53C3\u6578\u540D\u7A31\u6216\u8B8A\u66F4 wsdl:part \u540D\u7A31.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=\u5FFD\u7565\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5\u53C3\u6578. \u5168\u57DF\u5143\u7D20 \"{2}\" \u4E2D\u5305\u88DD\u51FD\u5F0F\u5B50\u9805 \"{1}\" \u7684\u672C\u6A5F\u540D\u7A31\u70BA java \u95DC\u9375\u5B57. \u8ACB\u5229\u7528\u81EA\u8A02\u4F86\u8B8A\u66F4\u53C3\u6578\u540D\u7A31.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=\u7121\u6548\u7684\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5\u53C3\u6578. \u5168\u57DF\u5143\u7D20 \"{2}\" \u4E2D\u5305\u88DD\u51FD\u5F0F\u5B50\u9805 \"{1}\" \u7684\u672C\u6A5F\u540D\u7A31\u70BA java \u95DC\u9375\u5B57. \u8ACB\u5229\u7528\u81EA\u8A02\u4F86\u8B8A\u66F4\u53C3\u6578\u540D\u7A31.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=\u5FFD\u7565\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5. \u53C3\u6578\u7684\u81EA\u8A02\u540D\u7A31 \"{1}\" \u70BA java \u95DC\u9375\u5B57.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=\u7121\u6548\u7684\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5. \u53C3\u6578\u7684\u81EA\u8A02\u540D\u7A31 \"{1}\" \u70BA java \u95DC\u9375\u5B57.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=\u5FFD\u7565\u4F5C\u696D \"{0}\", \u5B83\u70BA java \u4FDD\u7559\u5B57, \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5. \u8ACB\u5229\u7528\u81EA\u8A02\u4F86\u8B8A\u66F4\u4F5C\u696D\u540D\u7A31.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=\u7121\u6548\u7684\u4F5C\u696D \"{0}\", \u5B83\u70BA java \u4FDD\u7559\u5B57, \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5. \u8ACB\u5229\u7528\u81EA\u8A02\u4F86\u8B8A\u66F4\u4F5C\u696D\u540D\u7A31.
-
-wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=\u5FFD\u7565\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5, wsdl:operation \u7684\u81EA\u8A02\u540D\u7A31 \"{1}\" \u70BA java \u95DC\u9375\u5B57.
-wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=\u7121\u6548\u7684\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5, wsdl:operation \u7684\u81EA\u8A02\u540D\u7A31 \"{1}\" \u70BA java \u95DC\u9375\u5B57.
-
-wsdlmodeler.jaxb.javatype.notfound=\u672A\u5B9A\u7FA9\u8A0A\u606F\u7D44\u4EF6 \\"{1}\\" \u4E2D\u7684\u7DB1\u8981\u63CF\u8FF0\u5340 {0}, \u56E0\u6B64\u7121\u6CD5\u9023\u7D50\u81F3 Java. \u53EF\u80FD\u672A\u5728 WSDL \u532F\u5165/\u5305\u62EC\u7684\u7DB1\u8981\u4E2D\u5B9A\u7FA9\u7DB1\u8981\u63CF\u8FF0\u5340 {0}. \u60A8\u53EF\u4EE5\u65B0\u589E\u6B64\u985E\u532F\u5165\u9805/\u5305\u62EC\u9805, \u6216\u8005\u4F7F\u7528 -b \u53C3\u6578\u57F7\u884C wsimport \u4E26\u63D0\u4F9B\u7DB1\u8981\u4F4D\u7F6E.
-wsdlmodeler.unsupportedBinding.mime=\u76EE\u524D\u4E0D\u652F\u63F4 WSDL MIME \u9023\u7D50!
-
-wsdlmodeler.nonUnique.body.error=\u975E\u552F\u4E00\u7684\u4E3B\u9AD4\u90E8\u5206! \u6839\u64DA BP 1.1 R2710, \u5728\u9023\u63A5\u57E0\u4E2D, \u4F5C\u696D\u5FC5\u9808\u8981\u6709\u552F\u4E00\u7684\u7DDA\u5F0F\u4F5C\u696D\u7C3D\u7AE0, \u624D\u80FD\u9806\u5229\u9032\u884C\u5206\u914D. \u5728\u9023\u63A5\u57E0 {0} \u4E2D, \"{1}\" \u548C \"{2}\" \u4F5C\u696D\u5747\u6709\u76F8\u540C\u7684\u8981\u6C42\u4E3B\u9AD4\u5340\u584A {3}. \u8ACB\u5617\u8A66\u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport, \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5C07\u6703\u5617\u8A66\u4F7F\u7528 SOAPAction \u9032\u884C\u5206\u914D.
-wsdlmodeler.nonUnique.body.warning=\u975E\u552F\u4E00\u7684\u4E3B\u9AD4\u90E8\u5206! \u6839\u64DA BP 1.1 R2710, \u5728\u9023\u63A5\u57E0\u4E2D, \u4F5C\u696D\u5FC5\u9808\u8981\u6709\u552F\u4E00\u7684\u7DDA\u5F0F\u4F5C\u696D\u7C3D\u7AE0, \u624D\u80FD\u9806\u5229\u9032\u884C\u5206\u914D. \u5728\u9023\u63A5\u57E0 {0} \u4E2D, \"{1}\" \u548C \"{2}\" \u4F5C\u696D\u5747\u6709\u76F8\u540C\u7684\u8981\u6C42\u4E3B\u9AD4\u5340\u584A {3}. \u65B9\u6CD5\u5206\u914D\u6709\u53EF\u80FD\u6703\u5931\u6557, \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5C07\u6703\u5617\u8A66\u4F7F\u7528 SOAPAction \u9032\u884C\u5206\u914D.
-
-wsdlmodeler.rpclit.unkownschematype=\u7121\u6CD5\u89E3\u6790 XML \u985E\u578B \"{0}\", \u5F9E XML \u81F3 JAVA \u7684\u9023\u7D50\u5931\u6557! \u8ACB\u6AA2\u67E5 wsdl:message \"{2}\" \u4E2D\u7684 wsdl:part \"{1}\".
-
-wsdlmodeler.responsebean.notfound=wsimport \u7121\u6CD5\u7522\u751F\u4F5C\u696D\u7684\u975E\u540C\u6B65\u56DE\u61C9 bean: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor.properties
deleted file mode 100644
index e1fc0a21..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#processor.missing.model=model is missing
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_de.properties
deleted file mode 100644
index e1fc0a21..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_de.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#processor.missing.model=model is missing
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_es.properties
deleted file mode 100644
index e1fc0a21..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_es.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#processor.missing.model=model is missing
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_fr.properties
deleted file mode 100644
index e1fc0a21..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_fr.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#processor.missing.model=model is missing
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_it.properties
deleted file mode 100644
index e1fc0a21..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_it.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#processor.missing.model=model is missing
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ja.properties
deleted file mode 100644
index e1fc0a21..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ja.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#processor.missing.model=model is missing
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ko.properties
deleted file mode 100644
index e1fc0a21..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ko.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#processor.missing.model=model is missing
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_pt_BR.properties
deleted file mode 100644
index e1fc0a21..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_pt_BR.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#processor.missing.model=model is missing
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_CN.properties
deleted file mode 100644
index e1fc0a21..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_CN.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#processor.missing.model=model is missing
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_TW.properties
deleted file mode 100644
index e1fc0a21..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_TW.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#processor.missing.model=model is missing
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util.properties
deleted file mode 100644
index f6947598..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-holder.valuefield.not.found=Could not find the field in the Holder that contains the Holder''s value: {0}
-null.namespace.found=Encountered error in wsdl. Check namespace of element <{0}>
-sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_de.properties
deleted file mode 100644
index 33da0f68..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_de.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-holder.valuefield.not.found=Das Feld im Holder, das den Wert {0} des Holders enth\u00E4lt, konnte nicht gefunden werden
-null.namespace.found=Fehler in WSDL aufgetreten. Pr\u00FCfen Sie den Namespace von Element <{0}>
-sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_es.properties
deleted file mode 100644
index 0e4dcade..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_es.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-holder.valuefield.not.found=No se ha encontrado el campo en el propietario que contiene el valor de propietario: {0}
-null.namespace.found=Se ha encontrado un error en WSDL. Compruebe el espacio de nombres del elemento <{0}>
-sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_fr.properties
deleted file mode 100644
index 29598ee4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_fr.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-holder.valuefield.not.found=Champ introuvable dans le d\u00E9tenteur contenant les valeurs du d\u00E9tenteur : {0}
-null.namespace.found=Erreur d\u00E9tect\u00E9e dans le WSDL. V\u00E9rifiez l''espace de noms de l''\u00E9l\u00E9ment <{0}>
-sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs : {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_it.properties
deleted file mode 100644
index 5d6709ba..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_it.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-holder.valuefield.not.found=Impossibile trovare il campo nel contenitore al cui interno si trova il valore del contenitore: {0}
-null.namespace.found=Rilevato errore in WSDL. Controllare lo spazio di nomi dell''elemento <{0}>
-sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ja.properties
deleted file mode 100644
index 117992ae..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ja.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-holder.valuefield.not.found=Holder\u306E\u5024: {0}\u3092\u542B\u3080\u30D5\u30A3\u30FC\u30EB\u30C9\u304CHolder\u5185\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F
-null.namespace.found=wsdl\u306B\u30A8\u30E9\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002\u8981\u7D20<{0}>\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
-sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ko.properties
deleted file mode 100644
index bb684a6c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ko.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-holder.valuefield.not.found=\uD640\uB354\uC5D0\uC11C \uD640\uB354 \uAC12\uC744 \uD3EC\uD568\uD558\uB294 \uD544\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}
-null.namespace.found=WSDL\uC5D0 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. <{0}> \uC694\uC18C\uC758 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_pt_BR.properties
deleted file mode 100644
index 876e62cd..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_pt_BR.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-holder.valuefield.not.found=N\u00E3o foi poss\u00EDvel localizar o campo no Detentor que cont\u00E9m o valor do Detentor: {0}
-null.namespace.found=Erro encontrado no wsdl. Verifique o namespace do elemento <{0}>
-sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_CN.properties
deleted file mode 100644
index 5d78e4aa..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_CN.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-holder.valuefield.not.found=\u5728\u4FDD\u5B58\u5668\u4E2D\u627E\u4E0D\u5230\u5305\u542B\u4FDD\u5B58\u5668\u503C\u7684\u5B57\u6BB5: {0}
-null.namespace.found=wsdl \u4E2D\u51FA\u73B0\u9519\u8BEF\u3002\u8BF7\u68C0\u67E5\u5143\u7D20 <{0}> \u7684\u540D\u79F0\u7A7A\u95F4
-sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_TW.properties
deleted file mode 100644
index 5ad716e4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_TW.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-holder.valuefield.not.found=\u5728 Holder \u4E2D\u627E\u4E0D\u5230\u5305\u542B Holder \u503C {0} \u7684\u6B04\u4F4D
-null.namespace.found=WSDL \u767C\u751F\u932F\u8AA4. \u8ACB\u6AA2\u67E5\u5143\u7D20 <{0}> \u7684\u547D\u540D\u7A7A\u9593.
-sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap.properties
deleted file mode 100644
index abb411bf..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap.properties
+++ /dev/null
@@ -1,162 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#webserviceap.nestedModelError=modeler error: {0}
-webserviceap.fileNotFound=error: file not found: {0}
-webserviceap.error=error: {0}
-webserviceap.warning=warning: {0}
-webserviceap.info=info: {0}
-webserviceap.compilationFailed=compilation failed, errors should have been reported
-webserviceap.succeeded: Success
-
-webserviceap.method.not.annotated=The method {0} on class {1} is not annotated.
-webserviceap.rpc.encoded.not.supported=The class {0} has a rpc/encoded SOAPBinding. Rpc/encoded SOAPBindings are not supported in JAXWS 2.0.
-webservice.encoded.not.supported=The {0} class has invalid SOAPBinding annotation. {1}/encoded SOAPBinding is not supported
-webserviceap.model.already.exists=model already exists
-webserviceap.endpointinterface.on.interface=Service endpoint interface\: {0} cannot have a WebService.endpointInterface annotation\: {1}
-webserviceap.java.typeNotFound=The type: {0} was not found in the mapping
-webserviceap.endpointinterfaces.do.not.match=The endpoint interface {0} does not match the interface {1}.
-
-# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2
-webserviceap.could.not.find.typedecl=Could not get TypeElement for:\ {0} in annotation processing round:\ {1}
-
-webserviceap.no.webservice.endpoint.found=A web service endpoint could not be found
-
-webserviceap.endpointinterface.has.no.webservice.annotation=The endpoint interface {0} must have a WebService annotation
-
-webserviceap.oneway.operation.cannot.have.return.type=The method {1} of class {0} is annotated @Oneway but has a return type.
-
-webserviceap.oneway.operation.cannot.have.holders=The method {1} of class {0} is annotated @Oneway but contains INOUT or OUT parameters (javax.xml.ws.Holder)
-
-webserviceap.oneway.operation.cannot.declare.exceptions=The method {1} of class {0} is annotated @Oneway but declares the exception {2}
-
-webserviceap.cannot.combine.handlerchain.soapmessagehandlers=You cannot specify both HanlderChain and SOAPMessageHandlers annotations
-
-webserviceap.invalid.handlerchain.file.nohandler-config=The handlerchain file {0} is invalid, it does not contain a handler-config element
-
-webserviceap.could.not.find.handlerchain=Could not find the handlerchain {0} in the handler file {1}
-
-webserviceap.handlerclass.notspecified=A handler in the HandlerChain file\: {0} does not specify a handler-class
-
-webserviceap.init_param.format.error=a <init-param> element must have exactly 1 <param-name> and 1 <param-value>
-
-webserviceap.document.literal.bare.method.return.not.unique=Document literal bare methods must have a unique result name return type combination. Class {0} method\: {1}, result name\: {2} return type\: {3}
-
-webserviceap.document.literal.bare.method.not.unique=Document literal bare methods must have unique parameter names. Class\: {0} method\: {1} parameter name\: {2}
-
-webserviceap.document.literal.bare.cannot.have.more.than.one.out=Document literal bare methods must have a return value or one out parameter. Class\: {0} Method\: {1}
-
-webserviceap.document.literal.bare.must.have.only.one.in.parameter=Document literal bare methods must have no more than 1 non-header in parameter. Class\: {0} method\: {1} number of non-header parameters\: {2}
-
-webserviceap.document.literal.bare.must.have.one.in.or.out=Document literal bare methods must have at least one of: a return, an in parameter or an out parameter. Class\: {0} Method\: {1}
-
-webserviceap.holder.parameters.must.not.be.in.only=javax.xml.ws.Holder parameters must not be annotated with the WebParam.Mode.IN property. Class\: {0} method\: {1} parameter\: {2}
-
-webserviceap.document.bare.holder.parameters.must.not.be.inout=javax.xml.ws.Holder parameters in document bare operations must be WebParam.Mode.INOUT; Class\: {0} method\: {1} parameter\: {2}
-
-webserviceap.endpointinterface.class.not.found=The endpointInterface class {0} could not be found
-
-webserviceap.sei.cannot.contain.constant.values=A service endpoint interface cannot contain constant declaration\: Interface\: {0} field\: {1}.
-
-webserviceap.method.return.type.cannot.implement.remote=Method return types cannot implement java.rmi.Remote. Class\: {0} method\: {1} return type\: {2}
-
-webserviceap.method.parameter.types.cannot.implement.remote=Method parameter types cannot implement java.rmi.Remote. Class\: {0} method\: {1} parameter\: {2} type\: {3}
-
-webserviceap.operation.name.not.unique=Operation names must be unique. Class\: {0} method\: {1} operation name\: {2}
-
-webserviceap.method.request.wrapper.bean.name.not.unique=Request wrapper bean names must be unique and must not clash with other generated classes. Class\: {0} method {1}
-
-webserviceap.method.response.wrapper.bean.name.not.unique=Response wrapper bean names must be unique and must not clash with other generated classes. Class\: {0} method {1}
-
-webserviceap.method.exception.bean.name.not.unique=Exception bean names must be unique and must not clash with other generated classes. Class\: {0} exception {1}
-
-webserviceap.rpc.literal.parameters.must.have.webparam=All RPC literal parameters must have a WebParam annotation. Class\: {0} method\: {1} parameter {2}
-
-webserviceap.rpc.literal.webparams.must.specify.name=All RPC literal WebParams must specify a name. Class\: {0} method {1} parameter {2}
-
-webserviceap.rpc.literal.must.not.be.bare=RPC literal SOAPBindings must have parameterStyle WRAPPED. Class\: {0}.
-
-webserviceap.header.parameters.must.have.webparam.name=All WebParam annotations on header parameters must specify a name. Class\: {0} method {1} parameter {2}
-
-webserviceap.failed.to.find.handlerchain.file=Cannot find HandlerChain file. class\: {0}, file:\ {1}
-
-webserviceap.failed.to.parse.handlerchain.file=Failed to parse HandlerChain file. Class\: {0}, file\: {1}
-
-webserviceap.class.not.found=Class Not Found: {0}
-
-webserviceap.rpc.soapbinding.not.allowed.on.method=SOAPBinding.Style.RPC binding annotations are not allowed on methods. Class\: {0} Method\: {1}
-
-webserviceap.mixed.binding.style=Class\: {0} contains mixed bindings. SOAPBinding.Style.RPC and SOAPBinding.Style.DOCUMENT cannot be mixed.
-
-webserviceap.endpointinteface.plus.annotation=The @{0} annotation cannot be used in with @javax.jws.WebService.endpointInterface element.
-
-webserviceap.endpointinteface.plus.element=The @javax.jws.WebService.{0} element cannot be used in with @javax.jws.WebService.endpointInterface element.
-
-webserviceap.non.in.parameters.must.be.holder=Class:\ {0}, method: {1}, parameter: {2} is not WebParam.Mode.IN and is not of type javax.xml.ws.Holder.
-
-webserviceap.invalid.sei.annotation.element=The @javax.jws.WebService.{0} element cannot be specified on a service endpoint interface. Class\: {1}
-
-webserviceap.invalid.sei.annotation=The @{0} annotation cannot be used on a service endpoint interface. Class\: {1}
-
-webserviceap.invalid.sei.annotation.element.exclude=The @javax.jws.WebMethod({0}) cannot be used on a service endpoint interface. Class\: {1} method\: {2}
-
-webserviceap.invalid.webmethod.element.with.exclude=The @javax.jws.WebMethod.{0} element cannot be specified with the @javax.jws.WebMethod.exclude element. Class\: {1} method\: {2}
-
-webserviceap.doc.bare.no.out=Document/literal bare methods with no return type or OUT/INOUT parameters must be annotated as @Oneway. Class\: {0}, method: {1}
-webserviceap.doc.bare.return.and.out=Document/literal bare methods cannot have a return type and out parameters. Class\: {0}, method: {1}
-webserviceap.oneway.and.out=@Oneway methods cannot have out parameters. Class\: {0} method {1}
-
-webserviceap.webservice.class.not.public=Classes annotated with @javax.jws.WebService must be public. Class\: {0}
-
-webserviceap.webservice.class.is.final=Classes annotated with @javax.jws.WebService must not be final. Class\: {0}
-
-webserviceap.webservice.class.is.abstract=Classes annotated with @javax.jws.WebService must not be abstract. Class\: {0}
-
-webserviceap.webservice.class.is.innerclass.not.static=Inner classes annotated with @javax.jws.WebService must be static. Class\: {0}
-
-webserviceap.webservice.method.is.abstract=Classes annotated with @javax.jws.WebService must not have abstract methods. Class\: {0} Method: {1}
-
-webserviceap.webservice.method.is.static.or.final=Method annotated with @javax.jws.WebMethod must not be static or final. Class\: {0} Method: {1}
-
-#webserviceap.doc.bare.return.and.out=Document literal bare methods must not have a return value and an OUT/INOUT parameter. Class\: {0} Method\: {1}
-
-webserviceap.webservice.no.default.constructor=Classes annotated with @javax.jws.WebService must have a public default constructor. Class\: {0}
-
-webserviceap.oneway.and.not.one.in=Document literal bare methods annotated with @javax.jws.Oneway must have one non-header IN parameter. Class\: {0} Method\: {1}
-
-webserviceap.doc.bare.no.return.and.no.out=Document literal bare methods that do not have a return value must have a single OUT/INOUT parameter. Class\: {0} Method\: {1}
-
-webserviceap.doc.bare.and.no.one.in=Document literal bare methods must have one non-header, IN/INOUT parameter. Class\: {0} Method\: {1}
-
-webserviceap.method.not.implemented=Methods in an endpointInterface must be implemented in the implementation class. Interface Class\:{0} Implementation Class\:{1} Method\: {2}
-
-webserviceap.no.package.class.must.have.targetnamespace=@javax.jws.Webservice annotated classes that do not belong to a package must have the @javax.jws.Webservice.targetNamespace element. Class\: {0}
-
-webserviceap.webservice.and.webserviceprovider=Classes cannot be annotated with both @javax.jws.WebService and @javax.xml.ws.WebServiceProvider. Class\: {0}
-
-webserviceap.invalid.soapbinding.parameterstyle= Incorrect usage of Annotation {0} on {1}, ParameterStyle can only be WRAPPED with RPC Style Web service.
-
-webserviceap.parsing.javac.options.error=Can't get javac options from processingEnv.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_de.properties
deleted file mode 100644
index c4885185..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_de.properties
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#webserviceap.nestedModelError=modeler error: {0}
-webserviceap.fileNotFound=Fehler: Datei nicht gefunden: {0}
-webserviceap.error=Fehler: {0}
-webserviceap.warning=Warnung: {0}
-webserviceap.info=Informationen: {0}
-webserviceap.compilationFailed=Kompilierung nicht erfolgreich, Fehler sollten gemeldet worden sein
-webserviceap.succeeded: Erfolgreich
-
-webserviceap.method.not.annotated=Die Methode {0} in Klasse {1} verf\u00FCgt \u00FCber keine Annotation.
-webserviceap.rpc.encoded.not.supported=Die Klasse {0} enth\u00E4lt ein RPC/codiertes SOAPBinding. RPC/codierte SOAPBindings werden in JAXWS 2.0 nicht unterst\u00FCtzt.
-webservice.encoded.not.supported=Die {0}-Klasse enth\u00E4lt eine ung\u00FCltige SOAPBinding-Annotation. {1}/codiertes SOAPBinding wird nicht unterst\u00FCtzt
-webserviceap.model.already.exists=Modell ist bereits vorhanden
-webserviceap.endpointinterface.on.interface=Service-End Point-Schnittstelle\\: {0} darf keine WebService.endpointInterface-Annotation enthalten\\: {1}
-webserviceap.java.typeNotFound=Der Typ: {0} wurde in der Zuordnung nicht gefunden
-webserviceap.endpointinterfaces.do.not.match=Die End Point-Schnittstelle {0} stimmt nicht mit der Schnittstelle {1} \u00FCberein.
-
-# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2
-webserviceap.could.not.find.typedecl=TypeElement f\u00FCr:\\ {0} konnte bei Annotationsverarbeitung nicht abgerufen werden:\\ {1}
-
-webserviceap.no.webservice.endpoint.found=Ein Webservice-End Point konnte nicht gefunden werden
-
-webserviceap.endpointinterface.has.no.webservice.annotation=Die End Point-Schnittstelle {0} muss eine WebService-Annotation aufweisen
-
-webserviceap.oneway.operation.cannot.have.return.type=Die Methode {1} von Klasse {0} ist mit @Oneway-Annotation versehen, hat jedoch einen R\u00FCckgabetyp.
-
-webserviceap.oneway.operation.cannot.have.holders=Die Methode {1} von Klasse {0} ist mit @Oneway-Annotation versehen, enth\u00E4lt jedoch INOUT- oder OUT-Parameter (javax.xml.ws.Holder)
-
-webserviceap.oneway.operation.cannot.declare.exceptions=Die Methode {1} von Klasse {0} ist mit @Oneway-Annotation versehen, deklariert jedoch die Ausnahme {2}
-
-webserviceap.cannot.combine.handlerchain.soapmessagehandlers=Sie k\u00F6nnen HandlerChain- und SOAPMessageHandlers-Annotationen nicht gemeinsam angeben
-
-webserviceap.invalid.handlerchain.file.nohandler-config=Die Handlerchain-Datei {0} ist ung\u00FCltig, sie enth\u00E4lt kein handler-config-Element
-
-webserviceap.could.not.find.handlerchain=Handlerchain {0} konnte in der Handler-Datei {1} nicht gefunden werden
-
-webserviceap.handlerclass.notspecified=Ein Handler in der HandlerChain-Datei\\: {0} gibt keine handler-class an
-
-webserviceap.init_param.format.error=ein <init-param>-Element muss genau 1 <param-name> und 1 <param-value> enthalten
-
-webserviceap.document.literal.bare.method.return.not.unique=Document/Literal BARE-Methoden m\u00FCssen eine eindeutige Ergebnisname-/R\u00FCckgabetyp-Kombination aufweisen. Klasse {0} Methode\\: {1}, Ergebnisname\\: {2} Ergebnistyp\\: {3}
-
-webserviceap.document.literal.bare.method.not.unique=Document/Literal BARE-Methoden m\u00FCssen eindeutige Parameternamen haben. Klasse\\: {0} Methode\\: {1} Parametername\\: {2}
-
-webserviceap.document.literal.bare.cannot.have.more.than.one.out=Document/Literal BARE-Methoden m\u00FCssen einen R\u00FCckgabewert oder einen OUT-Parameter aufweisen. Klasse\\: {0} Methode\\: {1}
-
-webserviceap.document.literal.bare.must.have.only.one.in.parameter=Document/Literal BARE-Methoden d\u00FCrfen nicht mehr als 1 Nicht-Header IN-Parameter enthalten. Klasse\\: {0} Methode\\: {1} Anzahl Nicht-Header-Parameter\\: {2}
-
-webserviceap.document.literal.bare.must.have.one.in.or.out=Document/Literal BARE-Methoden m\u00FCssen mindestens einen der folgenden Parameter enthalten: R\u00FCckgabe-Parameter, IN-Parameter oder OUT-Parameter. Klasse\: {0} Methode\: {1}
-
-webserviceap.holder.parameters.must.not.be.in.only=javax.xml.ws.Holder-Parameter d\u00FCrfen nicht mit WebParam.Mode.IN-Eigenschaft versehen werden. Klasse\\: {0} Methode\\: {1} Parameter\\: {2}
-
-webserviceap.document.bare.holder.parameters.must.not.be.inout=javax.xml.ws.Holder-Parameter in Document BARE-Vorg\u00E4ngen m\u00FCssen WebParam.Mode.INOUT enthalten; Klasse\\: {0} Methode\\: {1} Parameter\\: {2}
-
-webserviceap.endpointinterface.class.not.found=Die endpointInterface-Klasse {0} konnte nicht gefunden werden
-
-webserviceap.sei.cannot.contain.constant.values=Eine Service-End Point-Schnittstelle darf keine konstante Deklaration enthalten\: Schnittstelle\: {0}-Feld\: {1}.
-
-webserviceap.method.return.type.cannot.implement.remote=Methodenr\u00FCckgabetypen k\u00F6nnen java.rmi.Remote nicht implementieren. Klasse\\: {0} Methode\\: {1} R\u00FCckgabetyp\\: {2}
-
-webserviceap.method.parameter.types.cannot.implement.remote=Methodenparametertypen k\u00F6nnen java.rmi.Remote nicht implementieren. Klasse\\: {0} Methode\\: {1} Parameter\: {2} Typ\\: {3}
-
-webserviceap.operation.name.not.unique=Vorgangsnamen m\u00FCssen eindeutig sein. Klasse\: {0} Methode\: {1} Vorgangsname\: {2}
-
-webserviceap.method.request.wrapper.bean.name.not.unique=Namen von Anforderungs-Wrapper Beans m\u00FCssen eindeutig sein und m\u00FCssen mit anderen generierten Klassennamen vereinbar sein. Klasse\\: {0} Methode {1}
-
-webserviceap.method.response.wrapper.bean.name.not.unique=Namen von Antwort-Wrapper Beans m\u00FCssen eindeutig sein und m\u00FCssen mit anderen generierten Klassennamen vereinbar sein. Klasse\\: {0} Methode {1}
-
-webserviceap.method.exception.bean.name.not.unique=Namen von Ausnahme-Beans m\u00FCssen eindeutig sein und m\u00FCssen mit anderen generierten Klassennamen vereinbar sein. Klasse\\: {0} Ausnahme {1}
-
-webserviceap.rpc.literal.parameters.must.have.webparam=Alle literalen RPC-Parameter m\u00FCssen eine WebParam-Annotation aufweisen. Klasse\\: {0} Methode\\: {1} Parameter {2}
-
-webserviceap.rpc.literal.webparams.must.specify.name=Alle literalen RPC-WebParams m\u00FCssen einen Namen angeben. Klasse\\: {0} Methode {1} Parameter {2}
-
-webserviceap.rpc.literal.must.not.be.bare=Literale RPC-SOAPBindings m\u00FCssen den parameterStyle WRAPPED aufweisen. Klasse\\: {0}.
-
-webserviceap.header.parameters.must.have.webparam.name=Alle WebParam-Annotationen bei Header-Parametern m\u00FCssen einen Namen angeben. Klasse\\: {0} Methode {1} Parameter {2}
-
-webserviceap.failed.to.find.handlerchain.file=HandlerChain-Datei kann nicht gefunden werden. Klasse\: {0}, Datei:\ {1}
-
-webserviceap.failed.to.parse.handlerchain.file=HandlerChain-Datei konnte nicht geparst werden. Klasse\: {0}, Datei\: {1}
-
-webserviceap.class.not.found=Klasse nicht gefunden: {0}
-
-webserviceap.rpc.soapbinding.not.allowed.on.method=SOAPBinding.Style.RPC-Binding-Annotationen sind bei Methoden nicht zul\u00E4ssig. Klasse\\: {0} Methode\\: {1}
-
-webserviceap.mixed.binding.style=Klasse\\: {0} enth\u00E4lt gemischte Bindings. SOAPBinding.Style.RPC und SOAPBinding.Style.DOCUMENT d\u00FCrfen nicht gemischt werden.
-
-webserviceap.endpointinteface.plus.annotation=Die @{0}-Annotation kann nicht mit @javax.jws.WebService.endpointInterface-Element verwendet werden.
-
-webserviceap.endpointinteface.plus.element=Das @javax.jws.WebService.{0}-Element kann nicht mit @javax.jws.WebService.endpointInterface-Element verwendet werden.
-
-webserviceap.non.in.parameters.must.be.holder=Klasse:\\ {0}, Methode: {1}, Parameter: {2} ist nicht WebParam.Mode.IN und ist nicht vom Typ javax.xml.ws.Holder.
-
-webserviceap.invalid.sei.annotation.element=Das @javax.jws.WebService.{0}-Element kann nicht bei Service End Point-Schnittstelle angegeben werden. Klasse\: {1}
-
-webserviceap.invalid.sei.annotation=Die @{0}-Annotation kann nicht bei einer Service-End Point-Schnittstelle verwendet werden. Klasse\\: {1}
-
-webserviceap.invalid.sei.annotation.element.exclude=Die @javax.jws.WebMethod({0}) kann nicht bei einer Service-End Point-Schnittstelle verwendet werden. Klasse\\: {1} Methode\\: {2}
-
-webserviceap.invalid.webmethod.element.with.exclude=Das @javax.jws.WebMethod.{0}-Element kann nicht mit dem @javax.jws.WebMethod.exclude-Element angegeben werden. Klasse\\: {1} Methode\\: {2}
-
-webserviceap.doc.bare.no.out=Document/Literal BARE-Methoden ohne R\u00FCckgabetyp oder OUT-/INOUT-Parameter m\u00FCssen mit @Oneway-Annotation versehen werden. Klasse\\: {0}, Methode: {1}
-webserviceap.doc.bare.return.and.out=Document/Literal BARE-Methoden d\u00FCrfen keinen R\u00FCckgabetyp und OUT-Parameter enthalten. Klasse\\: {0} Methode\\: {1}
-webserviceap.oneway.and.out=@Oneway-Methoden d\u00FCrfen keine Out-Parameter enthalten. Klasse\\: {0} Methode {1}
-
-webserviceap.webservice.class.not.public=Klassen, die mit @javax.jws.WebService-Annotation versehen sind, m\u00FCssen vom Typ "public" sein. Klasse\\: {0}
-
-webserviceap.webservice.class.is.final=Klassen, die mit @javax.jws.WebService-Annotation versehen sind, d\u00FCrfen nicht vom Typ "final" sein. Klasse\\: {0}
-
-webserviceap.webservice.class.is.abstract=Klassen, die mit @javax.jws.WebService-Annotation versehen sind, d\u00FCrfen nicht vom Typ "abstract" sein. Klasse\\: {0}
-
-webserviceap.webservice.class.is.innerclass.not.static=Innere Klassen, die mit @javax.jws.WebService-Annotation versehen sind, m\u00FCssen vom Typ "static" sein. Klasse\\: {0}
-
-webserviceap.webservice.method.is.abstract=Klassen, die mit @javax.jws.WebService-Annotation versehen sind, d\u00FCrfen keine Methoden vom Typ "abstract" enthalten. Klasse\\: {0} Methode: {1}
-
-webserviceap.webservice.method.is.static.or.final=Methode, die mit @javax.jws.WebMethod-Annotation versehen ist, darf nicht vom Typ "static" oder "final" sein. Klasse\\: {0} Methode: {1}
-
-#webserviceap.doc.bare.return.and.out=Document literal bare methods must not have a return value and an OUT/INOUT parameter. Class\: {0} Method\: {1}
-
-webserviceap.webservice.no.default.constructor=Klassen, die mit @javax.jws.WebService-Annotation versehen sind, m\u00FCssen einen \u00F6ffentlichen Standardkonstruktor enthalten. Klasse\\: {0}
-
-webserviceap.oneway.and.not.one.in=Document/Literal BARE-Methoden, die mit @javax.jws.Oneway-Annotation versehen sind, m\u00FCssen einen Nicht-Header IN-Parameter enthalten. Klasse\\: {0} Methode\\: {1}
-
-webserviceap.doc.bare.no.return.and.no.out=Document/Literal BARE-Methoden, die keinen R\u00FCckgabewert enthalten, m\u00FCssen einen einzelnen OUT-/INOUT-Parameter enthalten. Klasse\: {0} Methode\: {1}
-
-webserviceap.doc.bare.and.no.one.in=Document/Literal BARE-Methoden m\u00FCssen einen Nicht-Header IN-/INOUT-Parameter enthalten. Klasse\: {0} Methode\: {1}
-
-webserviceap.method.not.implemented=Methoden in einer endpointInterface m\u00FCssen in der Implementierungsklasse implementiert sein. Schnittstellenklasse\\:{0} Implementierungsklasse\\:{1} Methode\\: {2}
-
-webserviceap.no.package.class.must.have.targetnamespace=Mit @javax.jws.Webservice-Annotation versehene Klassen, die nicht zu einem Package geh\u00F6ren, m\u00FCssen das @javax.jws.Webservice.targetNamespace-Element aufweisen. Klasse\\: {0}
-
-webserviceap.webservice.and.webserviceprovider=Klassen k\u00F6nnen nicht sowohl mit @javax.jws.WebService- als auch mit @javax.xml.ws.WebServiceProvider-Annotation versehen sein. Klasse\\: {0}
-
-webserviceap.invalid.soapbinding.parameterstyle= Nicht korrekte Verwendung von Annotation {0} in {1}, ParameterStyle kann nur WRAPPED mit RPC-Webservice sein.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_es.properties
deleted file mode 100644
index 98df66bd..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_es.properties
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#webserviceap.nestedModelError=modeler error: {0}
-webserviceap.fileNotFound=error: archivo no encontrado: {0}
-webserviceap.error=error: {0}
-webserviceap.warning=advertencia: {0}
-webserviceap.info=informaci\u00F3n: {0}
-webserviceap.compilationFailed=fallo de compilaci\u00F3n; se ha debido informar de los errores
-webserviceap.succeeded: Correcto
-
-webserviceap.method.not.annotated=El m\u00E9todo {0} de la clase {1} no est\u00E1 anotado.
-webserviceap.rpc.encoded.not.supported=La clase {0} tiene un enlace SOAP RPC/codificado. Los enlaces SOAP RPC/codificados no est\u00E1n soportados en JAX-WS 2.0.
-webservice.encoded.not.supported=La clase {0} tiene una anotaci\u00F3n SOAPBinding no v\u00E1lida. El enlace SOAP {1}/codificado no est\u00E1 soportado
-webserviceap.model.already.exists=el modelo ya existe
-webserviceap.endpointinterface.on.interface=La interfaz de punto final de servicio \\: {0} no puede tener una anotaci\u00F3n WebService.endpointInterface\\: {1}
-webserviceap.java.typeNotFound=El tipo {0} no se ha encontrado en la asignaci\u00F3n
-webserviceap.endpointinterfaces.do.not.match=La interfaz de punto final {0} no coincide con la interfaz {1}.
-
-# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2
-webserviceap.could.not.find.typedecl=No se ha podido obtener TypeElement para:\\ {0} en la ronda de procesamiento de anotaciones:\\ {1}
-
-webserviceap.no.webservice.endpoint.found=No se ha encontrado un punto final del servicio web
-
-webserviceap.endpointinterface.has.no.webservice.annotation=La interfaz de punto final {0} debe tener una anotaci\u00F3n de servicio web
-
-webserviceap.oneway.operation.cannot.have.return.type=El m\u00E9todo {1} de la clase {0} est\u00E1 anotado con @Oneway, pero tiene un tipo de retorno.
-
-webserviceap.oneway.operation.cannot.have.holders=El m\u00E9todo {1} de la clase {0} est\u00E1 anotado con @Oneway, pero contiene los par\u00E1metros INOUT o OUT (javax.xml.ws.Holder)
-
-webserviceap.oneway.operation.cannot.declare.exceptions=El m\u00E9todo {1} de la clase {0} est\u00E1 anotado con @Oneway, pero declara la excepci\u00F3n {2}
-
-webserviceap.cannot.combine.handlerchain.soapmessagehandlers=No se pueden especificar las anotaciones HanlderChain y SOAPMessageHandlers
-
-webserviceap.invalid.handlerchain.file.nohandler-config=El archivo handlerchain {0} no es v\u00E1lido. No contiene un elemento handler-config
-
-webserviceap.could.not.find.handlerchain=No se ha encontrado handlerchain {0} en el archivo de manejador {1}
-
-webserviceap.handlerclass.notspecified=Un manejador del archivo HandlerChain\\: {0} no especifica una clase de manejador
-
-webserviceap.init_param.format.error=el elemento <init-param> debe tener exactamente 1 <param-name> y 1 <param-value>
-
-webserviceap.document.literal.bare.method.return.not.unique=Los m\u00E9todos BARE del literal de documento deben tener una combinaci\u00F3n de tipo de retorno del nombre de resultado \u00FAnica. Clase {0} m\u00E9todo\\: {1}, nombre de resultado\\: {2} tipo de retorno\\: {3}
-
-webserviceap.document.literal.bare.method.not.unique=Los m\u00E9todos BARE del literal de documentos deben tener nombres de par\u00E1metros \u00FAnicos. Clase\\: {0} m\u00E9todo\\: {1} nombre de par\u00E1metro\\: {2}
-
-webserviceap.document.literal.bare.cannot.have.more.than.one.out=Los m\u00E9todos BARE del literal de documentos deben tener un valor de retorno o un par\u00E1metro OUT. Clase\\: {0} M\u00E9todo\\: {1}
-
-webserviceap.document.literal.bare.must.have.only.one.in.parameter=Los m\u00E9todos BARE del literal de documento no deben tener m\u00E1s de 1 elemento no de cabecera en el par\u00E1metro. Clase\\: {0} m\u00E9todo\\: {1} n\u00FAmero de par\u00E1metros no de cabecera\\: {2}
-
-webserviceap.document.literal.bare.must.have.one.in.or.out=Los m\u00E9todos BARE del literal de documento deben tener al menos: un par\u00E1metro de retorno, un par\u00E1metro IN o un par\u00E1metro OUT. Clase\: {0} M\u00E9todo\: {1}
-
-webserviceap.holder.parameters.must.not.be.in.only=Los par\u00E1metros javax.xml.ws.Holder no se deben anotar con la propiedad WebParam.Mode.IN. Clase\\: {0} m\u00E9todo\\: {1} par\u00E1metro\\: {2}
-
-webserviceap.document.bare.holder.parameters.must.not.be.inout=Los par\u00E1metros javax.xml.ws.Holder de las operaciones BARE de documento deben tener WebParam.Mode.INOUT; Clase\\: {0} m\u00E9todo\\: {1} par\u00E1metro\\: {2}
-
-webserviceap.endpointinterface.class.not.found=No se ha encontrado la clase endpointInterface {0}
-
-webserviceap.sei.cannot.contain.constant.values=Una interfaz de punto final de servicio no puede contener una declaraci\u00F3n de constantes\\: Interfaz\\: {0} campo\\: {1}.
-
-webserviceap.method.return.type.cannot.implement.remote=Los tipos de retorno de m\u00E9todo no pueden implantar java.rmi.Remote. Clase\\: {0} m\u00E9todo\\: {1} tipo de retorno\\: {2}
-
-webserviceap.method.parameter.types.cannot.implement.remote=Los tipos de par\u00E1metros de m\u00E9todo no pueden implantar java.rmi.Remote. Clase\\: {0} m\u00E9todo\\: {1} par\u00E1metro\\: {2} tipo\\: {3}
-
-webserviceap.operation.name.not.unique=Los nombres de operaciones deben ser \u00FAnicos. Clase\\: {0} m\u00E9todo\\: {1} nombre de operaci\u00F3n\\: {2}
-
-webserviceap.method.request.wrapper.bean.name.not.unique=Los nombres de bean de envoltorio de solicitud deben ser \u00FAnicos y no deben entrar en conflicto con otras clases generadas. Clase\\: {0} m\u00E9todo {1}
-
-webserviceap.method.response.wrapper.bean.name.not.unique=Los nombres de bean de envoltorio de respuesta deben ser \u00FAnicos y no deben entrar en conflicto con otras clases generadas. Clase\\: {0} m\u00E9todo {1}
-
-webserviceap.method.exception.bean.name.not.unique=Los nombres de bean de excepci\u00F3n deben ser \u00FAnicos y no deben entrar en conflicto con otras clases generadas. Clase\: {0} excepci\u00F3n {1}
-
-webserviceap.rpc.literal.parameters.must.have.webparam=Todos los par\u00E1metros de literales RPC deben tener una anotaci\u00F3n WebParam. Clase\\: {0} m\u00E9todo\\: {1} par\u00E1metro {2}
-
-webserviceap.rpc.literal.webparams.must.specify.name=Todos los par\u00E1metros web de literales RPC deben especificar un nombre. Clase\\: {0} m\u00E9todo {1}, par\u00E1metro {2}
-
-webserviceap.rpc.literal.must.not.be.bare=El literal de RPC SOAPBindings debe tener el elemento parameterStyle WRAPPED. Clase\\: {0}.
-
-webserviceap.header.parameters.must.have.webparam.name=Todas las anotaciones de par\u00E1metros web en los par\u00E1metros de cabecera deben especificar un nombre. Clase\: {0} m\u00E9todo {1}, par\u00E1metro {2}
-
-webserviceap.failed.to.find.handlerchain.file=No se ha encontrado el archivo HandlerChain. Clase\\: {0}, archivo:\\ {1}
-
-webserviceap.failed.to.parse.handlerchain.file=Fallo al analizar el archivo HandlerChain. Clase\\: {0}, archivo\\: {1}
-
-webserviceap.class.not.found=No se ha encontrado la clase: {0}
-
-webserviceap.rpc.soapbinding.not.allowed.on.method=Las anotaciones del enlace SOAPBinding.Style.RPC no est\u00E1n permitidas en los m\u00E9todos. Clase\\: {0} M\u00E9todo\\: {1}
-
-webserviceap.mixed.binding.style=La clase \\: {0} contiene enlaces mixtos. SOAPBinding.Style.RPC y SOAPBinding.Style.DOCUMENT no se pueden mezclar.
-
-webserviceap.endpointinteface.plus.annotation=La anotaci\u00F3n @{0} no se puede utilizar con el elemento @javax.jws.WebService.endpointInterface.
-
-webserviceap.endpointinteface.plus.element=El elemento @javax.jws.WebService.{0} no se puede utilizar con el elemento @javax.jws.WebService.endpointInterface.
-
-webserviceap.non.in.parameters.must.be.holder=La clase:\\ {0},m\u00E9todo: {1}, par\u00E1metro: {2} no es WebParam.Mode.IN y no es del tipo javax.xml.ws.Holder.
-
-webserviceap.invalid.sei.annotation.element=El elemento @javax.jws.WebService.{0} no se puede especificar en una interfaz de punto final de servicio. Clase\\: {1}
-
-webserviceap.invalid.sei.annotation=La anotaci\u00F3n @{0} no se puede utilizar en una interfaz de punto final de servicio. Clase\\: {1}
-
-webserviceap.invalid.sei.annotation.element.exclude=@javax.jws.WebMethod({0}) no se puede utilizar en una interfaz de punto final de servicio. Clase\\: {1} m\u00E9todo\\: {2}
-
-webserviceap.invalid.webmethod.element.with.exclude=El elemento @javax.jws.WebMethod.{0} no se puede especificar con el elemento @javax.jws.WebMethod.exclude. Clase\\: {1} m\u00E9todo\\: {2}
-
-webserviceap.doc.bare.no.out=Los m\u00E9todos BARE de documento/literal que no tienen tipo de retorno o par\u00E1metros OUT/INOUT se deben anotar como @Oneway. Clase\\: {0}, m\u00E9todo: {1}
-webserviceap.doc.bare.return.and.out=Los m\u00E9todos BARE de documento/literal no pueden tener un tipo de retorno ni par\u00E1metros OUT. Clase\: {0}, m\u00E9todo\: {1}
-webserviceap.oneway.and.out=Los m\u00E9todos @Oneway no pueden tener par\u00E1metros OUT. Clase\\: {0} m\u00E9todo {1}
-
-webserviceap.webservice.class.not.public=Las clases anotadas con @javax.jws.WebService deben ser public. Clase\\: {0}
-
-webserviceap.webservice.class.is.final=Las clases anotadas con @javax.jws.WebService no deben ser final. Clase\: {0}
-
-webserviceap.webservice.class.is.abstract=Las clases anotadas con @javax.jws.WebService no deben ser abstract. Clase\\: {0}
-
-webserviceap.webservice.class.is.innerclass.not.static=Las clases internas anotadas con @javax.jws.WebService deben ser static. Clase\: {0}
-
-webserviceap.webservice.method.is.abstract=Las clases anotadas con @javax.jws.WebService no deben tener m\u00E9todos abstract. Clase\: {0} M\u00E9todo: {1}
-
-webserviceap.webservice.method.is.static.or.final=El m\u00E9todo anotado con @javax.jws.WebMethod no debe ser static ni final. Clase:\\: {0} M\u00E9todo: {1}
-
-#webserviceap.doc.bare.return.and.out=Document literal bare methods must not have a return value and an OUT/INOUT parameter. Class\: {0} Method\: {1}
-
-webserviceap.webservice.no.default.constructor=Las clases anotadas con @javax.jws.WebService deben tener un constructor por defecto p\u00FAblico. Clase\: {0}
-
-webserviceap.oneway.and.not.one.in=Los m\u00E9todos BARE de literales de documentos anotados con @javax.jws.Oneway deben tener un par\u00E1metro IN no de cabecera. Clase\\: {0} M\u00E9todo\\: {1}
-
-webserviceap.doc.bare.no.return.and.no.out=Los m\u00E9todos BARE de literales de documentos que no tienen un valor de retorno deben tener un solo par\u00E1metro OUT/INOUT. Clase\: {0} M\u00E9todo\: {1}
-
-webserviceap.doc.bare.and.no.one.in=Los m\u00E9todos BARE de literales de documentos deben tener un par\u00E1metro IN/INOUT no de cabecera. Clase\\: {0} M\u00E9todo\\: {1}
-
-webserviceap.method.not.implemented=Los m\u00E9todos de endpointInterface se deben implantar en la clase de implantaci\u00F3n. Clase de Interfaz\\:{0} Clase de Implantaci\u00F3n\\:{1} M\u00E9todo\\: {2}
-
-webserviceap.no.package.class.must.have.targetnamespace=Las clases anotadas con @javax.jws.Webservice que no pertenecen a un paquete deben tener el elemento @javax.jws.Webservice.targetNamespace. Clase\\: {0}
-
-webserviceap.webservice.and.webserviceprovider=Clases que no se pueden anotar con @javax.jws.WebService y @javax.xml.ws.WebServiceProvider. Clase\\: {0}
-
-webserviceap.invalid.soapbinding.parameterstyle= Uso incorrecto de la anotaci\u00F3n {0} en {1}. ParameterStyle s\u00F3lo puede ser WRAPPED con el servicio web de estilo RPC.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_fr.properties
deleted file mode 100644
index 9c0cd225..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_fr.properties
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#webserviceap.nestedModelError=modeler error: {0}
-webserviceap.fileNotFound=erreur : fichier introuvable : {0}
-webserviceap.error=erreur : {0}
-webserviceap.warning=avertissement : {0}
-webserviceap.info=informations : {0}
-webserviceap.compilationFailed=\u00E9chec de la compilation, les erreurs auraient d\u00FB \u00EAtre signal\u00E9es
-webserviceap.succeeded: Succ\u00E8s
-
-webserviceap.method.not.annotated=La m\u00E9thode {0} sur la classe {1} n''est pas annot\u00E9e.
-webserviceap.rpc.encoded.not.supported=La classe {0} comporte une annotation SOAPBinding rpc/encoded. Les annotations SOAPBinding rpc/encoded ne sont pas prises en charge dans JAXWS 2.0.
-webservice.encoded.not.supported=La classe {0} comporte une annotation SOAPBinding non valide. L''annotation SOAPBinding {1}/encoded n''est pas prise en charge
-webserviceap.model.already.exists=le mod\u00E8le existe d\u00E9j\u00E0
-webserviceap.endpointinterface.on.interface=L''interface d''adresse de service {0} ne peut comporter aucune annotation WebService.endpointInterface \: {1}
-webserviceap.java.typeNotFound=Le type {0} est introuvable dans le mapping
-webserviceap.endpointinterfaces.do.not.match=L''interface d''adresse {0} ne correspond pas \u00E0 l''interface {1}.
-
-# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2
-webserviceap.could.not.find.typedecl=Impossible d''obtenir TypeElement pour {0} dans le cycle de traitement d''annotation \: {1}
-
-webserviceap.no.webservice.endpoint.found=Une adresse de service Web est introuvable
-
-webserviceap.endpointinterface.has.no.webservice.annotation=L''interface d''adresse {0} doit comporter une annotation WebService
-
-webserviceap.oneway.operation.cannot.have.return.type=La m\u00E9thode {1} de classe {0} a l''annotation @Oneway mais comporte un type de donn\u00E9es renvoy\u00E9.
-
-webserviceap.oneway.operation.cannot.have.holders=La m\u00E9thode {1} de classe {0} \u00E0 l''annotation @Oneway mais contient des param\u00E8tres INOUT ou OUT (javax.xml.ws.Holder)
-
-webserviceap.oneway.operation.cannot.declare.exceptions=La m\u00E9thode {1} de classe {0} a l''annotation @Oneway mais d\u00E9clare l''exception {2}
-
-webserviceap.cannot.combine.handlerchain.soapmessagehandlers=Vous ne pouvez pas indiquer \u00E0 la fois les annotations HanlderChain et SOAPMessageHandlers
-
-webserviceap.invalid.handlerchain.file.nohandler-config=Le fichier HandlerChain {0} n''est pas valide, il ne contient aucun \u00E9l\u00E9ment handler-config
-
-webserviceap.could.not.find.handlerchain=Handlerchain {0} introuvable dans le fichier de gestionnaire {1}
-
-webserviceap.handlerclass.notspecified=Un gestionnaire du fichier HandlerChain \: {0} ne sp\u00E9cifie aucun \u00E9l\u00E9ment handler-class
-
-webserviceap.init_param.format.error=un \u00E9l\u00E9ment <init-param> doit comporter exactement 1 \u00E9l\u00E9ment <param-name> et 1 \u00E9l\u00E9ment <param-value>
-
-webserviceap.document.literal.bare.method.return.not.unique=Les m\u00E9thodes BARE de document/litt\u00E9ral doivent comporter une combinaison unique de type de donn\u00E9es renvoy\u00E9 et de nom de r\u00E9sultat. Classe {0} m\u00E9thode \: {1}, nom de r\u00E9sultat \: {2} type de donn\u00E9es renvoy\u00E9 \: {3}
-
-webserviceap.document.literal.bare.method.not.unique=Les m\u00E9thodes BARE de document/litt\u00E9ral doivent comporter des noms de param\u00E8tre uniques. Classe \: {0}, m\u00E9thode \: {1}, nom de param\u00E8tre \: {2}
-
-webserviceap.document.literal.bare.cannot.have.more.than.one.out=Les m\u00E9thodes BARE de document/litt\u00E9ral doivent comporter une valeur renvoy\u00E9e ou un param\u00E8tre OUT. Classe \: {0}, m\u00E9thode \: {1}
-
-webserviceap.document.literal.bare.must.have.only.one.in.parameter=Les m\u00E9thodes BARE de document/litt\u00E9ral ne doivent pas comporter plus d''un param\u00E8tre IN non destin\u00E9 \u00E0 un en-t\u00EAte. Classe \: {0}, m\u00E9thode \: {1}, nombre de param\u00E8tres non destin\u00E9s \u00E0 un en-t\u00EAte \: {2}
-
-webserviceap.document.literal.bare.must.have.one.in.or.out=Les m\u00E9thodes BARE de document/litt\u00E9ral doivent comporter au moins un des \u00E9l\u00E9ments suivants : une valeur renvoy\u00E9e, un param\u00E8tre IN ou un param\u00E8tre OUT. Classe \: {0}, m\u00E9thode \: {1}
-
-webserviceap.holder.parameters.must.not.be.in.only=Les param\u00E8tres javax.xml.ws.Holder ne doivent pas \u00EAtre annot\u00E9s avec la propri\u00E9t\u00E9 WebParam.Mode.IN. Classe \: {0}, m\u00E9thode \: {1}, param\u00E8tre \: {2}
-
-webserviceap.document.bare.holder.parameters.must.not.be.inout=Les param\u00E8tres javax.xml.ws.Holder dans les op\u00E9rations BARE de document doivent \u00EAtre WebParam.Mode.INOUT. Classe \: {0}, m\u00E9thode \: {1}, param\u00E8tre \: {2}
-
-webserviceap.endpointinterface.class.not.found=La classe endpointInterface {0} est introuvable
-
-webserviceap.sei.cannot.contain.constant.values=Une interface d''adresse de service ne peut contenir aucune d\u00E9claration constante \: interface \: {0}, champ \: {1}.
-
-webserviceap.method.return.type.cannot.implement.remote=Les types de donn\u00E9es renvoy\u00E9s de m\u00E9thode ne peuvent pas impl\u00E9menter java.rmi.Remote. Classe \: {0}, m\u00E9thode \: {1}, type de donn\u00E9es renvoy\u00E9 \: {2}
-
-webserviceap.method.parameter.types.cannot.implement.remote=Les types de param\u00E8tre de m\u00E9thode ne peuvent pas impl\u00E9menter java.rmi.Remote. Classe \: {0}, m\u00E9thode \: {1}, param\u00E8tre \: {2}, type \: {3}
-
-webserviceap.operation.name.not.unique=Les noms d''op\u00E9ration doivent \u00EAtre uniques. Classe \: {0}, m\u00E9thode \: {1}, nom d''op\u00E9ration \: {2}
-
-webserviceap.method.request.wrapper.bean.name.not.unique=Les noms de bean de wrapper de demande doivent \u00EAtre uniques et ne doivent pas \u00EAtre en conflit avec les autres classes g\u00E9n\u00E9r\u00E9es. Classe \: {0}, m\u00E9thode : {1}
-
-webserviceap.method.response.wrapper.bean.name.not.unique=Les noms de bean de wrapper de r\u00E9ponse doivent \u00EAtre uniques et ne doivent pas \u00EAtre en conflit avec les autres classes g\u00E9n\u00E9r\u00E9es. Classe \: {0}, m\u00E9thode : {1}
-
-webserviceap.method.exception.bean.name.not.unique=Les noms de bean d''exception doivent \u00EAtre uniques et ne doivent pas \u00EAtre en conflit avec les autres classes g\u00E9n\u00E9r\u00E9es. Classe \: {0}, exception : {1}
-
-webserviceap.rpc.literal.parameters.must.have.webparam=Tous les param\u00E8tres de litt\u00E9ral RPC doivent comporter une annotation WebParam. Classe \: {0}, m\u00E9thode \: {1}, param\u00E8tre : {2}
-
-webserviceap.rpc.literal.webparams.must.specify.name=Tous les annotations WebParam de litt\u00E9ral RPC doivent indiquer un nom. Classe \: {0}, m\u00E9thode : {1}, param\u00E8tre : {2}
-
-webserviceap.rpc.literal.must.not.be.bare=Les annotations SOAPBinding de litt\u00E9ral RPC doivent comporter le parameterStyle WRAPPED. Classe \: {0}.
-
-webserviceap.header.parameters.must.have.webparam.name=Toutes les annotations WebParam sur les param\u00E8tres d''en-t\u00EAte doivent indiquer un nom. Classe \: {0}, m\u00E9thode : {1}, param\u00E8tre : {2}
-
-webserviceap.failed.to.find.handlerchain.file=Fichier HandlerChain introuvable. classe\ : {0}, fichier :\ {1}
-
-webserviceap.failed.to.parse.handlerchain.file=Echec de l''analyse du fichier HandlerChain. Classe \: {0}, fichier \: {1}
-
-webserviceap.class.not.found=Classe introuvable : {0}
-
-webserviceap.rpc.soapbinding.not.allowed.on.method=Les annotations de binding SOAPBinding.Style.RPC ne sont pas autoris\u00E9es sur les m\u00E9thodes. Classe \: {0}, m\u00E9thode \: {1}
-
-webserviceap.mixed.binding.style=La classe {0} contient des bindings mixtes. SOAPBinding.Style.RPC et SOAPBinding.Style.DOCUMENT ne peuvent pas \u00EAtre mixtes.
-
-webserviceap.endpointinteface.plus.annotation=L''annotation @{0} ne peut pas \u00EAtre utilis\u00E9e avec l''\u00E9l\u00E9ment @javax.jws.WebService.endpointInterface.
-
-webserviceap.endpointinteface.plus.element=L''\u00E9l\u00E9ment @javax.jws.WebService.{0} ne peut pas \u00EAtre utilis\u00E9 avec l''\u00E9l\u00E9ment @javax.jws.WebService.endpointInterface.
-
-webserviceap.non.in.parameters.must.be.holder=Classe {0}, m\u00E9thode : {1}, param\u00E8tre : {2} n''est pas WebParam.Mode.IN et n''est pas de type javax.xml.ws.Holder.
-
-webserviceap.invalid.sei.annotation.element=L''\u00E9l\u00E9ment @javax.jws.WebService.{0} ne peut pas \u00EAtre indiqu\u00E9 sur une interface d''adresse de service. Classe \: {1}
-
-webserviceap.invalid.sei.annotation=L''annotation @{0} ne peut pas \u00EAtre utilis\u00E9e sur une interface d''adresse de service. Classe \: {1}
-
-webserviceap.invalid.sei.annotation.element.exclude=L''\u00E9l\u00E9ment @javax.jws.WebMethod({0}) ne peut pas \u00EAtre utilis\u00E9 sur une interface d''adresse de service. Classe \: {1}, m\u00E9thode \: {2}
-
-webserviceap.invalid.webmethod.element.with.exclude=L''\u00E9l\u00E9ment @javax.jws.WebMethod.{0} ne peut pas \u00EAtre indiqu\u00E9 avec l''\u00E9l\u00E9ment @javax.jws.WebMethod.exclude. Classe \: {1}, m\u00E9thode \: {2}
-
-webserviceap.doc.bare.no.out=Les m\u00E9thodes BARE de document/litt\u00E9ral sans aucun type de donn\u00E9es renvoy\u00E9 ou param\u00E8tre OUT/INOUT doivent \u00EAtre annot\u00E9es comme @Oneway. Classe \: {0}, m\u00E9thode : {1}
-webserviceap.doc.bare.return.and.out=Les m\u00E9thodes BARE de document/litt\u00E9ral ne peuvent pas comporter de type de donn\u00E9es renvoy\u00E9 et de param\u00E8tres OUT. Classe \: {0}, m\u00E9thode : {1}
-webserviceap.oneway.and.out=Les m\u00E9thodes @Oneway ne peuvent comporter aucun param\u00E8tre OUT. Classe \: {0}, m\u00E9thode : {1}
-
-webserviceap.webservice.class.not.public=Les classes annot\u00E9es avec @javax.jws.WebService doivent \u00EAtre de type public. Classe \: {0}
-
-webserviceap.webservice.class.is.final=Les classes annot\u00E9es avec @javax.jws.WebService ne doivent pas \u00EAtre de type final. Classe \: {0}
-
-webserviceap.webservice.class.is.abstract=Les classes annot\u00E9es avec @javax.jws.WebService ne doivent pas \u00EAtre de type abstract. Classe \: {0}
-
-webserviceap.webservice.class.is.innerclass.not.static=Les classes internes annot\u00E9es avec @javax.jws.WebService doivent \u00EAtre de type static. Classe \: {0}
-
-webserviceap.webservice.method.is.abstract=Les classes annot\u00E9es avec @javax.jws.WebService ne doivent comporter aucune m\u00E9thode abstract. Classe \: {0}, m\u00E9thode : {1}
-
-webserviceap.webservice.method.is.static.or.final=La m\u00E9thode annot\u00E9e avec @javax.jws.WebMethod ne doit pas \u00EAtre static ou final. Classe \: {0}, m\u00E9thode : {1}
-
-#webserviceap.doc.bare.return.and.out=Document literal bare methods must not have a return value and an OUT/INOUT parameter. Class\: {0} Method\: {1}
-
-webserviceap.webservice.no.default.constructor=Les classes annot\u00E9es avec @javax.jws.WebService doivent avoir un constructeur par d\u00E9faut public. Classe \: {0}
-
-webserviceap.oneway.and.not.one.in=Les m\u00E9thodes BARE de document/litt\u00E9ral annot\u00E9es avec @javax.jws.Oneway doivent comporter un param\u00E8tre IN non destin\u00E9 \u00E0 un en-t\u00EAte. Classe \: {0}, m\u00E9thode \: {1}
-
-webserviceap.doc.bare.no.return.and.no.out=Les m\u00E9thodes BARE de document/litt\u00E9ral ne comportant aucune valeur renvoy\u00E9e doivent avoir un seul param\u00E8tre OUT/INOUT. Classe \: {0}, m\u00E9thode \: {1}
-
-webserviceap.doc.bare.and.no.one.in=Les m\u00E9thodes BARE de document/litt\u00E9ral doivent comporter un param\u00E8tre IN/INOUT non destin\u00E9 \u00E0 un en-t\u00EAte. Classe \: {0}, m\u00E9thode \: {1}
-
-webserviceap.method.not.implemented=Les m\u00E9thodes d''une classe endpointInterface doivent \u00EAtre impl\u00E9ment\u00E9es dans la classe d''impl\u00E9mentation. Classe d''interface \:{0}, classe d''impl\u00E9mentation \: {1}, m\u00E9thode \: {2}
-
-webserviceap.no.package.class.must.have.targetnamespace=Les classes annot\u00E9es avec @javax.jws.Webservice qui n''appartiennent \u00E0 aucun package doivent comporter l''\u00E9l\u00E9ment @javax.jws.Webservice.targetNamespace. Classe \: {0}
-
-webserviceap.webservice.and.webserviceprovider=Les classes ne peuvent pas \u00EAtre annot\u00E9es \u00E0 la fois avec @javax.jws.WebService et @javax.xml.ws.WebServiceProvider. Classe \: {0}
-
-webserviceap.invalid.soapbinding.parameterstyle= Syntaxe incorrecte de l''annotation {0} sur {1}, ParameterStyle ne peut \u00EAtre que WRAPPED avec le service Web de style RPC.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_it.properties
deleted file mode 100644
index 621d45dd..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_it.properties
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#webserviceap.nestedModelError=modeler error: {0}
-webserviceap.fileNotFound=errore: file non trovato: {0}
-webserviceap.error=errore: {0}
-webserviceap.warning=avvertenza: {0}
-webserviceap.info=informazioni: {0}
-webserviceap.compilationFailed=compilazione non riuscita. Gli errori dovrebbero essere stati segnalati.
-webserviceap.succeeded: Operazione riuscita
-
-webserviceap.method.not.annotated=Il metodo {0} sulla classe {1} non \u00E8 annotato.
-webserviceap.rpc.encoded.not.supported=La classe {0} ha una SOAPBinding RPC/codificata. Le SOAPBinding RPC/codificate non sono supportate in JAXWS 2.0.
-webservice.encoded.not.supported=La classe {0} ha un''annotazione SOAPBinding non valida. Le SOAPBinding {1}/codificate non sono supportate
-webserviceap.model.already.exists=il modello esiste gi\u00E0
-webserviceap.endpointinterface.on.interface=L''interfaccia endpoint del servizio\: {0} non pu\u00F2 avere un''annotazione WebService.endpointInterface\: {1}
-webserviceap.java.typeNotFound=Tipo: {0} non trovato nel mapping
-webserviceap.endpointinterfaces.do.not.match=L''interfaccia endpoint {0} non corrisponde all''interfaccia {1}.
-
-# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2
-webserviceap.could.not.find.typedecl=Impossibile ottenere TypeElement per:\ {0} nel ciclo di elaborazione dell''annotazione:\ {1}
-
-webserviceap.no.webservice.endpoint.found=Impossibile trovare un endpoint del servizio Web
-
-webserviceap.endpointinterface.has.no.webservice.annotation=L''interfaccia endpoint {0} deve avere un''annotazione WebService
-
-webserviceap.oneway.operation.cannot.have.return.type=Il metodo {1} della classe {0} \u00E8 annotato con @Oneway ma ha un tipo restituito.
-
-webserviceap.oneway.operation.cannot.have.holders=Il metodo {1} della classe {0} \u00E8 annotato con @Oneway ma contiene i parametri INOUT o OUT (javax.xml.ws.Holder)
-
-webserviceap.oneway.operation.cannot.declare.exceptions=Il metodo {1} della classe {0} \u00E8 annotato con @Oneway ma dichiara l''eccezione {2}
-
-webserviceap.cannot.combine.handlerchain.soapmessagehandlers=Impossibile specificare entrambe le annotazioni HanlderChain e SOAPMessageHandlers
-
-webserviceap.invalid.handlerchain.file.nohandler-config=Il file HandlerChain {0} non \u00E8 valido poich\u00E9 non contiene un elemento handler-config
-
-webserviceap.could.not.find.handlerchain=Impossibile trovare la catena di handler {0} nel file di handler {1}
-
-webserviceap.handlerclass.notspecified=Un handler del file HandlerChain\: {0} non specifica un elemento handler-class
-
-webserviceap.init_param.format.error=un elemento <init-param> deve avere esattamente 1 <param-name> e 1 <param-value>
-
-webserviceap.document.literal.bare.method.return.not.unique=I metodi BARE document-literal devono avere una combinazione di nome risultato e tipo restituito univoca. Classe {0} metodo\: {1}, nome risultato\: {2} tipo restituito\: {3}
-
-webserviceap.document.literal.bare.method.not.unique=I metodi BARE document-literal devono avere nomi di parametro univoci. Classe\: {0} metodo\: {1}, nome parametro\: {2}
-
-webserviceap.document.literal.bare.cannot.have.more.than.one.out=I metodi BARE document-literal devono avere un tipo restituito o un parametro OUT. Classe\: {0} Metodo\: {1}
-
-webserviceap.document.literal.bare.must.have.only.one.in.parameter=I metodi BARE document-literal non devono avere pi\u00F9 di 1 parametro IN non di intestazione. Classe\: {0} metodo\: {1}, numero di parametri non di intestazione\: {2}
-
-webserviceap.document.literal.bare.must.have.one.in.or.out=I metodi BARE document-literal devono avere almeno uno dei seguenti elementi: tipo restituito, parametro IN o parametro OUT. Classe\: {0} Metodo\: {1}
-
-webserviceap.holder.parameters.must.not.be.in.only=I parametri javax.xml.ws.Holder non devono essere annotati con la propriet\u00E0 WebParam.Mode.IN. Classe\: {0} metodo\: {1} parametro\: {2}
-
-webserviceap.document.bare.holder.parameters.must.not.be.inout=I parametri javax.xml.ws.Holder nelle operazioni BARE document devono essere WebParam.Mode.INOUT. Classe\: {0} metodo\: {1} parametro\: {2}
-
-webserviceap.endpointinterface.class.not.found=Impossibile trovare la classe endpointInterface {0}
-
-webserviceap.sei.cannot.contain.constant.values=Un''interfaccia endpoint del servizio non pu\u00F2 contenere una dichiarazione della costante\: Interfaccia\: {0} campo\: {1}.
-
-webserviceap.method.return.type.cannot.implement.remote=I tipi restituiti del metodo non possono implementare java.rmi.Remote. Classe\: {0} metodo\: {1} tipo restituito\: {2}
-
-webserviceap.method.parameter.types.cannot.implement.remote=I tipi di parametro del metodo non possono implementare java.rmi.Remote. Classe\: {0} metodo\: {1} parametro\: {2} tipo\: {3}
-
-webserviceap.operation.name.not.unique=I nomi delle operazioni devono essere univoci. Classe\: {0} metodo\: {1} nome operazione\: {2}
-
-webserviceap.method.request.wrapper.bean.name.not.unique=I nomi di bean wrapper di richiesta devono essere univoci e non devono essere in conflitto con le altre classi generate. Classe\: {0} metodo {1}
-
-webserviceap.method.response.wrapper.bean.name.not.unique=I nomi di bean wrapper di risposta devono essere univoci e non devono essere in conflitto con le altre classi generate. Classe\: {0} metodo {1}
-
-webserviceap.method.exception.bean.name.not.unique=I nomi di bean di eccezione devono essere univoci e non devono essere in conflitto con le altre classi generate. Classe\: {0} eccezione {1}
-
-webserviceap.rpc.literal.parameters.must.have.webparam=Tutti i parametri RPC-literal devono avere un''annotazione WebParam. Classe\: {0} metodo\: {1} parametro {2}
-
-webserviceap.rpc.literal.webparams.must.specify.name=Tutti i WebParams RPC-literal devono specificare un nome. Classe\: {0} metodo\: {1} parametro {2}
-
-webserviceap.rpc.literal.must.not.be.bare=Tutte le SOAPBindings RPC-literal devono avere parameterStyle WRAPPED. Classe\: {0}.
-
-webserviceap.header.parameters.must.have.webparam.name=Tutte le annotazioni WebParam sui parametri dell''intestazione devono specificare un nome. Classe\: {0} metodo\: {1} parametro {2}
-
-webserviceap.failed.to.find.handlerchain.file=Impossibile trovare il file HandlerChain. Classe\: {0}, file:\ {1}
-
-webserviceap.failed.to.parse.handlerchain.file=Analisi del file HandlerChain non riuscita. Classe\: {0}, file:\ {1}
-
-webserviceap.class.not.found=Classe non trovata: {0}
-
-webserviceap.rpc.soapbinding.not.allowed.on.method=Le annotazioni di associazione SOAPBinding.Style.RPC non sono consentite sui metodi. Classe\: {0} Metodo\: {1}
-
-webserviceap.mixed.binding.style=La classe\: {0} contiene associazioni miste. SOAPBinding.Style.RPC e SOAPBinding.Style.DOCUMENT non posso essere mischiati.
-
-webserviceap.endpointinteface.plus.annotation=Impossibile usare l''annotazione @{0} con l''elemento @javax.jws.WebService.endpointInterface.
-
-webserviceap.endpointinteface.plus.element=Impossibile usare l''elemento @javax.jws.WebService.{0} con l''elemento @javax.jws.WebService.endpointInterface.
-
-webserviceap.non.in.parameters.must.be.holder=La classe:\ {0}, metodo: {1}, parametro: {2} non \u00E8 WebParam.Mode.IN e non \u00E8 di tipo javax.xml.ws.Holder.
-
-webserviceap.invalid.sei.annotation.element=Impossibile specificare l''elemento @javax.jws.WebService.{0} su un''interfaccia endpoint del servizio. Classe\: {1}
-
-webserviceap.invalid.sei.annotation=Impossibile usare l''annotazione @{0} su un''interfaccia endpoint del servizio. Classe\: {1}
-
-webserviceap.invalid.sei.annotation.element.exclude=Impossibile usare @javax.jws.WebMethod({0}) su un''interfaccia endpoint del servizio. Classe\: {1} metodo\: {2}
-
-webserviceap.invalid.webmethod.element.with.exclude=L''elemento @javax.jws.WebMethod.{0} non pu\u00F2 essere specificato con l''elemento @javax.jws.WebMethod.exclude. Classe\: {1} metodo\: {2}
-
-webserviceap.doc.bare.no.out=I metodi BARE document-literal senza tipo restituito o parametri OUT/INOUT devono essere annotati come @Oneway. Classe\: {0}, metodo: {1}
-webserviceap.doc.bare.return.and.out=I metodi BARE document-literal non possono avere un tipo restituito e parametri OUT. Classe\: {0}, metodo: {1}
-webserviceap.oneway.and.out=I metodi @Oneway non possono avere parametri OUT. Classe\: {0} metodo: {1}
-
-webserviceap.webservice.class.not.public=Le classi annotate con @javax.jws.WebService devono essere pubbliche. Classe\: {0}
-
-webserviceap.webservice.class.is.final=Le classi annotate con @javax.jws.WebService non devono essere finali. Classe\: {0}
-
-webserviceap.webservice.class.is.abstract=Le classi annotate con @javax.jws.WebService non devono essere astratte. Classe\: {0}
-
-webserviceap.webservice.class.is.innerclass.not.static=Le classi interne annotate con @javax.jws.WebService devono essere statiche. Classe\: {0}
-
-webserviceap.webservice.method.is.abstract=Le classi annotate con @javax.jws.WebService non devono avere metodi astratti. Classe\: {0} Metodo: {1}
-
-webserviceap.webservice.method.is.static.or.final=I metodi annotati con @javax.jws.WebMethod non devono essere statici o finali. Classe\: {0} Metodo: {1}
-
-#webserviceap.doc.bare.return.and.out=Document literal bare methods must not have a return value and an OUT/INOUT parameter. Class\: {0} Method\: {1}
-
-webserviceap.webservice.no.default.constructor=Le classi annotate con @javax.jws.WebService devono avere un costruttore predefinito pubblico. Classe\: {0}
-
-webserviceap.oneway.and.not.one.in=I metodi BARE document-literal annotati con @javax.jws.Oneway devono avere un parametro IN non di intestazione. Classe\: {0} Metodo\: {1}
-
-webserviceap.doc.bare.no.return.and.no.out=I metodi BARE document-literal che non hanno un tipo restituito devono avere un singolo parametro OUT/INOUT. Classe\: {0} Metodo\: {1}
-
-webserviceap.doc.bare.and.no.one.in=I metodi BARE document-literal devono avere un parametro IN/INOUT non di intestazione. Classe\: {0} Metodo\: {1}
-
-webserviceap.method.not.implemented=I metodi di un endpointInterface devono essere implementati nella classe di implementazione. Classe interfaccia\:{0} Classe implementazione\:{1} Metodo\: {2}
-
-webserviceap.no.package.class.must.have.targetnamespace=Le classi annotate @javax.jws.Webservice che non appartengono a un package devono avere l''elemento @javax.jws.Webservice.targetNamespace. Classe\: {0}
-
-webserviceap.webservice.and.webserviceprovider=Le classi non possono essere annotate sia con @javax.jws.WebService che con @javax.xml.ws.WebServiceProvider. Classe\: {0}
-
-webserviceap.invalid.soapbinding.parameterstyle= Uso errato dell''annotazione {0} su {1}. ParameterStyle pu\u00F2 essere solo WRAPPED con il servizio Web dello stile RPC.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ja.properties
deleted file mode 100644
index 9e102526..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ja.properties
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#webserviceap.nestedModelError=modeler error: {0}
-webserviceap.fileNotFound=\u30A8\u30E9\u30FC: \u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
-webserviceap.error=\u30A8\u30E9\u30FC: {0}
-webserviceap.warning=\u8B66\u544A: {0}
-webserviceap.info=\u60C5\u5831: {0}
-webserviceap.compilationFailed=\u30B3\u30F3\u30D1\u30A4\u30EB\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u30A8\u30E9\u30FC\u306F\u5831\u544A\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-webserviceap.succeeded: \u6210\u529F
-
-webserviceap.method.not.annotated=\u30AF\u30E9\u30B9{1}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u306B\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-webserviceap.rpc.encoded.not.supported=\u30AF\u30E9\u30B9{0}\u306Brpc/encoded SOAPBinding\u304C\u542B\u307E\u308C\u307E\u3059\u3002Rpc/encoded SOAPBinding\u306FJAXWS 2.0\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-webservice.encoded.not.supported={0}\u30AF\u30E9\u30B9\u306B\u7121\u52B9\u306ASOAPBinding\u6CE8\u91C8\u304C\u542B\u307E\u308C\u307E\u3059\u3002{1}/encoded SOAPBinding\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-webserviceap.model.already.exists=\u30E2\u30C7\u30EB\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
-webserviceap.endpointinterface.on.interface=\u30B5\u30FC\u30D3\u30B9\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\: {0}\u306B\u306FWebService.endpointInterface\u6CE8\u91C8\: {1}\u3092\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093
-webserviceap.java.typeNotFound=\u30BF\u30A4\u30D7: {0}\u304C\u30DE\u30C3\u30D4\u30F3\u30B0\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F
-webserviceap.endpointinterfaces.do.not.match=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9{0}\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9{1}\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002
-
-# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2
-webserviceap.could.not.find.typedecl=\u6CE8\u91C8\u51E6\u7406\u30E9\u30A6\u30F3\u30C9:\ {1}\u3067{0}\u306ETypeElement\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
-
-webserviceap.no.webservice.endpoint.found=Web\u30B5\u30FC\u30D3\u30B9\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F
-
-webserviceap.endpointinterface.has.no.webservice.annotation=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9{0}\u306B\u306FWebService\u6CE8\u91C8\u304C\u5FC5\u8981\u3067\u3059
-
-webserviceap.oneway.operation.cannot.have.return.type=\u30AF\u30E9\u30B9{0}\u306E\u30E1\u30BD\u30C3\u30C9{1}\u306B@Oneway\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u623B\u308A\u5024\u306E\u578B\u304C\u542B\u307E\u308C\u307E\u3059\u3002
-
-webserviceap.oneway.operation.cannot.have.holders=\u30AF\u30E9\u30B9{0}\u306E\u30E1\u30BD\u30C3\u30C9{1}\u306B@Oneway\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u3059\u304C\u3001INOUT\u307E\u305F\u306FOUT\u30D1\u30E9\u30E1\u30FC\u30BF(javax.xml.ws.Holder)\u304C\u542B\u307E\u308C\u307E\u3059
-
-webserviceap.oneway.operation.cannot.declare.exceptions=\u30AF\u30E9\u30B9{0}\u306E\u30E1\u30BD\u30C3\u30C9{1}\u306B@Oneway\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u4F8B\u5916{2}\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059
-
-webserviceap.cannot.combine.handlerchain.soapmessagehandlers=HanlderChain\u304A\u3088\u3073SOAPMessageHandlers\u6CE8\u91C8\u306E\u4E21\u65B9\u3092\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-
-webserviceap.invalid.handlerchain.file.nohandler-config=handlerchain\u30D5\u30A1\u30A4\u30EB{0}\u304C\u7121\u52B9\u3067\u3059\u3002\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u306B\u306Fhandler-config\u8981\u7D20\u304C\u542B\u307E\u308C\u307E\u305B\u3093
-
-webserviceap.could.not.find.handlerchain=\u30CF\u30F3\u30C9\u30E9\u30FB\u30D5\u30A1\u30A4\u30EB{1}\u306Bhandlerchain {0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F
-
-webserviceap.handlerclass.notspecified=HandlerChain\u30D5\u30A1\u30A4\u30EB\: {0}\u306E\u30CF\u30F3\u30C9\u30E9\u306Fhandler-class\u3092\u6307\u5B9A\u3057\u3066\u3044\u307E\u305B\u3093
-
-webserviceap.init_param.format.error=1\u3064\u306E<init-param>\u8981\u7D20\u306B\u306F<param-name>\u304A\u3088\u3073<param-value>\u304C1\u3064\u305A\u3064\u5FC5\u8981\u3067\u3059
-
-webserviceap.document.literal.bare.method.return.not.unique=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u4E00\u610F\u306E\u7D50\u679C\u540D\u3068\u623B\u308A\u5024\u306E\u578B\u306E\u7D44\u5408\u305B\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9{0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u7D50\u679C\u540D\: {2}\u3001\u623B\u308A\u5024\u306E\u578B\: {3}
-
-webserviceap.document.literal.bare.method.not.unique=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u4E00\u610F\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\: {2}
-
-webserviceap.document.literal.bare.cannot.have.more.than.one.out=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u3001\u623B\u308A\u5024\u307E\u305F\u306F1\u3064\u306EOUT\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}
-
-webserviceap.document.literal.bare.must.have.only.one.in.parameter=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u3001\u30D8\u30C3\u30C0\u30FC\u4EE5\u5916\u306EIN\u30D1\u30E9\u30E1\u30FC\u30BF\u304C1\u3064\u306E\u307F\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u30D8\u30C3\u30C0\u30FC\u4EE5\u5916\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u6570\: {2}
-
-webserviceap.document.literal.bare.must.have.one.in.or.out=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u623B\u308A\u5024\u3001IN\u30D1\u30E9\u30E1\u30FC\u30BF\u307E\u305F\u306FOUT\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}
-
-webserviceap.holder.parameters.must.not.be.in.only=javax.xml.ws.Holder\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u306FWebParam.Mode.IN\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u6CE8\u91C8\u3092\u4ED8\u3051\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\: {2}
-
-webserviceap.document.bare.holder.parameters.must.not.be.inout=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8bare\u64CD\u4F5C\u306Ejavax.xml.ws.Holder\u30D1\u30E9\u30E1\u30FC\u30BF\u306F\u3001WebParam.Mode.INOUT\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\: {2}
-
-webserviceap.endpointinterface.class.not.found=endpointInterface\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F
-
-webserviceap.sei.cannot.contain.constant.values=\u30B5\u30FC\u30D3\u30B9\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u306F\u5B9A\u6570\u5BA3\u8A00\u3092\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\: \u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\: {0}\u3001\u30D5\u30A3\u30FC\u30EB\u30C9\: {1}\u3002
-
-webserviceap.method.return.type.cannot.implement.remote=\u30E1\u30BD\u30C3\u30C9\u306E\u623B\u308A\u5024\u306E\u578B\u306Fjava.rmi.Remote\u3092\u5B9F\u88C5\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u623B\u308A\u5024\u306E\u578B\: {2}
-
-webserviceap.method.parameter.types.cannot.implement.remote=\u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30BF\u30A4\u30D7\u306Fjava.rmi.Remote\u3092\u5B9F\u88C5\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\: {2}\u3001\u30BF\u30A4\u30D7\: {3}
-
-webserviceap.operation.name.not.unique=\u64CD\u4F5C\u540D\u306F\u4E00\u610F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u64CD\u4F5C\u540D\: {2}
-
-webserviceap.method.request.wrapper.bean.name.not.unique=\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30E9\u30C3\u30D1\u30FCBean\u540D\u306F\u4E00\u610F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u3001\u4ED6\u306E\u751F\u6210\u6E08\u30AF\u30E9\u30B9\u3068\u7AF6\u5408\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9{1}
-
-webserviceap.method.response.wrapper.bean.name.not.unique=\u30EC\u30B9\u30DD\u30F3\u30B9\u30FB\u30E9\u30C3\u30D1\u30FCBean\u540D\u306F\u4E00\u610F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u3001\u4ED6\u306E\u751F\u6210\u6E08\u30AF\u30E9\u30B9\u3068\u7AF6\u5408\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9{1}
-
-webserviceap.method.exception.bean.name.not.unique=\u4F8B\u5916Bean\u540D\u306F\u4E00\u610F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u3001\u4ED6\u306E\u751F\u6210\u6E08\u30AF\u30E9\u30B9\u3068\u7AF6\u5408\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u4F8B\u5916{1}
-
-webserviceap.rpc.literal.parameters.must.have.webparam=\u3059\u3079\u3066\u306ERPC\u30EA\u30C6\u30E9\u30EB\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u306BWebParam\u6CE8\u91C8\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF{2}
-
-webserviceap.rpc.literal.webparams.must.specify.name=\u3059\u3079\u3066\u306ERPC\u30EA\u30C6\u30E9\u30EBWebParams\u304C\u540D\u524D\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9{1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF{2}
-
-webserviceap.rpc.literal.must.not.be.bare=RPC\u30EA\u30C6\u30E9\u30EBSOAPBindings\u306B\u306FparameterStyle WRAPPED\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3002
-
-webserviceap.header.parameters.must.have.webparam.name=\u30D8\u30C3\u30C0\u30FC\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u3059\u3079\u3066\u306EWebParam\u6CE8\u91C8\u304C\u540D\u524D\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9{1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF{2}
-
-webserviceap.failed.to.find.handlerchain.file=HandlerChain\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30D5\u30A1\u30A4\u30EB:\ {1}
-
-webserviceap.failed.to.parse.handlerchain.file=HandlerChain\u30D5\u30A1\u30A4\u30EB\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30D5\u30A1\u30A4\u30EB:\ {1}
-
-webserviceap.class.not.found=\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
-
-webserviceap.rpc.soapbinding.not.allowed.on.method=\u30E1\u30BD\u30C3\u30C9\u3067\u306ESOAPBinding.Style.RPC\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}
-
-webserviceap.mixed.binding.style=\u30AF\u30E9\u30B9\: {0}\u306B\u8907\u5408\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u304C\u542B\u307E\u308C\u307E\u3059\u3002SOAPBinding.Style.RPC\u304A\u3088\u3073SOAPBinding.Style.DOCUMENT\u306F\u7D44\u307F\u5408\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3002
-
-webserviceap.endpointinteface.plus.annotation=@{0}\u6CE8\u91C8\u306F@javax.jws.WebService.endpointInterface\u8981\u7D20\u3068\u3068\u3082\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002
-
-webserviceap.endpointinteface.plus.element=@javax.jws.WebService.{0}\u8981\u7D20\u306F@javax.jws.WebService.endpointInterface\u8981\u7D20\u3068\u3068\u3082\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002
-
-webserviceap.non.in.parameters.must.be.holder=\u30AF\u30E9\u30B9:\ {0}\u3001\u30E1\u30BD\u30C3\u30C9: {1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF: {2}\u306FWebParam.Mode.IN\u3067\u306F\u306A\u304F\u3001\u30BF\u30A4\u30D7\u304Cjavax.xml.ws.Holder\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-
-webserviceap.invalid.sei.annotation.element=@javax.jws.WebService.{0}\u8981\u7D20\u306F\u30B5\u30FC\u30D3\u30B9\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {1}
-
-webserviceap.invalid.sei.annotation=@{0}\u6CE8\u91C8\u306F\u30B5\u30FC\u30D3\u30B9\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {1}
-
-webserviceap.invalid.sei.annotation.element.exclude=@javax.jws.WebMethod({0})\u306F\u30B5\u30FC\u30D3\u30B9\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {1}\u3001\u30E1\u30BD\u30C3\u30C9\: {2}
-
-webserviceap.invalid.webmethod.element.with.exclude=@javax.jws.WebMethod.{0}\u8981\u7D20\u306F@javax.jws.WebMethod.exclude\u8981\u7D20\u3068\u3068\u3082\u306B\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {1}\u3001\u30E1\u30BD\u30C3\u30C9\: {2}
-
-webserviceap.doc.bare.no.out=\u623B\u308A\u5024\u306E\u578B\u307E\u305F\u306FOUT/INOUT\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u306A\u3044\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u3001@Oneway\u3068\u6CE8\u91C8\u3092\u4ED8\u3051\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9: {1}
-webserviceap.doc.bare.return.and.out=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8/\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u3001\u623B\u308A\u5024\u306E\u578B\u304A\u3088\u3073OUT\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}
-webserviceap.oneway.and.out=@Oneway\u30E1\u30BD\u30C3\u30C9\u306B\u306FOUT\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9{1}
-
-webserviceap.webservice.class.not.public=@javax.jws.WebService\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30AF\u30E9\u30B9\u306Fpublic\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9\: {0}
-
-webserviceap.webservice.class.is.final=@javax.jws.WebService\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30AF\u30E9\u30B9\u306Ffinal\u306B\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}
-
-webserviceap.webservice.class.is.abstract=@javax.jws.WebService\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30AF\u30E9\u30B9\u306Fabstract\u306B\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}
-
-webserviceap.webservice.class.is.innerclass.not.static=@javax.jws.WebService\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u5185\u90E8\u30AF\u30E9\u30B9\u306Fstatic\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9\: {0}
-
-webserviceap.webservice.method.is.abstract=@javax.jws.WebService\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30AF\u30E9\u30B9\u306B\u306Fabstract\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9: {1}
-
-webserviceap.webservice.method.is.static.or.final=@javax.jws.WebMethod\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30E1\u30BD\u30C3\u30C9\u306Fstatic\u307E\u305F\u306Ffinal\u306B\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9: {1}
-
-#webserviceap.doc.bare.return.and.out=Document literal bare methods must not have a return value and an OUT/INOUT parameter. Class\: {0} Method\: {1}
-
-webserviceap.webservice.no.default.constructor=@javax.jws.WebService\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30AF\u30E9\u30B9\u306B\u306Fpublic\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}
-
-webserviceap.oneway.and.not.one.in=@javax.jws.Oneway\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u3001\u30D8\u30C3\u30C0\u30FC\u4EE5\u5916\u306EIN\u30D1\u30E9\u30E1\u30FC\u30BF\u304C1\u3064\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}
-
-webserviceap.doc.bare.no.return.and.no.out=\u623B\u308A\u5024\u306E\u306A\u3044\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u30011\u3064\u306EOUT/INOUT\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}
-
-webserviceap.doc.bare.and.no.one.in=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u3001\u30D8\u30C3\u30C0\u30FC\u4EE5\u5916\u306EIN/INOUT\u30D1\u30E9\u30E1\u30FC\u30BF\u304C1\u3064\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}
-
-webserviceap.method.not.implemented=endpointInterface\u306E\u30E1\u30BD\u30C3\u30C9\u306F\u5B9F\u88C5\u30AF\u30E9\u30B9\u5185\u306B\u5B9F\u88C5\u3055\u308C\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30AF\u30E9\u30B9\:{0}\u3001\u5B9F\u88C5\u30AF\u30E9\u30B9\:{1}\u3001\u30E1\u30BD\u30C3\u30C9\: {2}
-
-webserviceap.no.package.class.must.have.targetnamespace=\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u5C5E\u3055\u306A\u3044\u3001@javax.jws.Webservice\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30AF\u30E9\u30B9\u306B\u306F\u3001@javax.jws.Webservice.targetNamespace\u8981\u7D20\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}
-
-webserviceap.webservice.and.webserviceprovider=\u30AF\u30E9\u30B9\u306B\u306F\u3001@javax.jws.WebService\u304A\u3088\u3073@javax.xml.ws.WebServiceProvider\u306E\u4E21\u65B9\u306E\u6CE8\u91C8\u3092\u4ED8\u3051\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}
-
-webserviceap.invalid.soapbinding.parameterstyle= {1}\u306B\u304A\u3051\u308B\u6CE8\u91C8{0}\u306E\u4F7F\u7528\u65B9\u6CD5\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\u3002RPC\u30B9\u30BF\u30A4\u30EBWeb\u30B5\u30FC\u30D3\u30B9\u3067\u306F\u3001ParameterStyle\u306FWRAPPED\u306E\u307F\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ko.properties
deleted file mode 100644
index 8c65394b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ko.properties
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#webserviceap.nestedModelError=modeler error: {0}
-webserviceap.fileNotFound=\uC624\uB958: \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}
-webserviceap.error=\uC624\uB958: {0}
-webserviceap.warning=\uACBD\uACE0: {0}
-webserviceap.info=\uC815\uBCF4: {0}
-webserviceap.compilationFailed=\uCEF4\uD30C\uC77C\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC624\uB958\uB97C \uBCF4\uACE0\uD574\uC57C \uD569\uB2C8\uB2E4.
-webserviceap.succeeded: \uC131\uACF5
-
-webserviceap.method.not.annotated={1} \uD074\uB798\uC2A4\uC758 {0} \uBA54\uC18C\uB4DC\uAC00 \uC8FC\uC11D \uCC98\uB9AC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-webserviceap.rpc.encoded.not.supported={0} \uD074\uB798\uC2A4\uC5D0 RPC/\uC778\uCF54\uB529\uB41C SOAPBinding\uC774 \uC788\uC2B5\uB2C8\uB2E4. JAXWS 2.0\uC5D0\uC11C\uB294 RPC/\uC778\uCF54\uB529\uB41C SOAPBinding\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-webservice.encoded.not.supported={0} \uD074\uB798\uC2A4\uC5D0 \uBD80\uC801\uD569\uD55C SOAPBinding \uC8FC\uC11D\uC774 \uC788\uC2B5\uB2C8\uB2E4. {1}/\uC778\uCF54\uB529\uB41C SOAPBinding\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-webserviceap.model.already.exists=\uBAA8\uB378\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4.
-webserviceap.endpointinterface.on.interface=\uC11C\uBE44\uC2A4 \uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4 {0}\uC5D0\uB294 WebService.endpointInterface \uC8FC\uC11D\uC774 \uD3EC\uD568\uB420 \uC218 \uC5C6\uC74C\: {1}
-webserviceap.java.typeNotFound={0} \uC720\uD615\uC744 \uB9E4\uD551\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-webserviceap.endpointinterfaces.do.not.match=\uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4 {0}\uC774(\uAC00) {1} \uC778\uD130\uD398\uC774\uC2A4\uC640 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2
-webserviceap.could.not.find.typedecl=\uC8FC\uC11D \uCC98\uB9AC \uC8FC\uAE30 {1}\uC5D0\uC11C {0}\uC5D0 \uB300\uD55C TypeElement\uB97C \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-webserviceap.no.webservice.endpoint.found=\uC6F9 \uC11C\uBE44\uC2A4 \uB05D\uC810\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-webserviceap.endpointinterface.has.no.webservice.annotation=\uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4 {0}\uC5D0\uB294 WebService \uC8FC\uC11D\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-webserviceap.oneway.operation.cannot.have.return.type={0} \uD074\uB798\uC2A4\uC758 {1} \uBA54\uC18C\uB4DC\uB294 @Oneway\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uC9C0\uB9CC \uBC18\uD658 \uC720\uD615\uC744 \uD3EC\uD568\uD569\uB2C8\uB2E4.
-
-webserviceap.oneway.operation.cannot.have.holders={0} \uD074\uB798\uC2A4\uC758 {1} \uBA54\uC18C\uB4DC\uB294 @Oneway\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uC9C0\uB9CC INOUT \uB610\uB294 OUT \uB9E4\uAC1C\uBCC0\uC218(javax.xml.ws.Holder)\uB97C \uD3EC\uD568\uD569\uB2C8\uB2E4.
-
-webserviceap.oneway.operation.cannot.declare.exceptions={0} \uD074\uB798\uC2A4\uC758 {1} \uBA54\uC18C\uB4DC\uB294 @Oneway\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uC9C0\uB9CC {2} \uC608\uC678 \uC0AC\uD56D\uC744 \uC120\uC5B8\uD569\uB2C8\uB2E4.
-
-webserviceap.cannot.combine.handlerchain.soapmessagehandlers=HanlderChain \uC8FC\uC11D\uACFC SOAPMessageHandlers \uC8FC\uC11D\uC744 \uD568\uAED8 \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-webserviceap.invalid.handlerchain.file.nohandler-config=handlerchain \uD30C\uC77C {0}\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. handler-config \uC694\uC18C\uB97C \uD3EC\uD568\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-webserviceap.could.not.find.handlerchain=\uCC98\uB9AC\uAE30 \uD30C\uC77C {1}\uC5D0\uC11C handlerchain {0}\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-webserviceap.handlerclass.notspecified=HandlerChain \uD30C\uC77C {0}\uC758 \uCC98\uB9AC\uAE30\uC5D0 handler-class\uAC00 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-webserviceap.init_param.format.error=<init-param> \uC694\uC18C\uC5D0\uB294 \uC815\uD655\uD788 \uD55C \uAC1C\uC758 <param-name>\uACFC \uD55C \uAC1C\uC758 <param-value>\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-webserviceap.document.literal.bare.method.return.not.unique=\uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC758 \uACB0\uACFC \uC774\uB984\uACFC \uBC18\uD658 \uC720\uD615 \uC870\uD569\uC740 \uACE0\uC720\uD574\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uACB0\uACFC \uC774\uB984\: {2}, \uBC18\uD658 \uC720\uD615\: {3}
-
-webserviceap.document.literal.bare.method.not.unique=\uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC758 \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984\uC740 \uACE0\uC720\uD574\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984\: {2}
-
-webserviceap.document.literal.bare.cannot.have.more.than.one.out=\uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC5D0\uB294 \uD55C \uAC1C\uC758 \uBC18\uD658 \uAC12 \uB610\uB294 \uD55C \uAC1C\uC758 OUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}
-
-webserviceap.document.literal.bare.must.have.only.one.in.parameter=\uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC5D0\uB294 \uD55C \uAC1C \uC774\uD558\uC758 \uBE44\uD5E4\uB354 IN \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uBE44\uD5E4\uB354 \uB9E4\uAC1C\uBCC0\uC218 \uC218\: {2}
-
-webserviceap.document.literal.bare.must.have.one.in.or.out=\uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC5D0\uB294 \uD55C \uAC1C \uC774\uC0C1\uC758 \uBC18\uD658, IN \uB9E4\uAC1C\uBCC0\uC218 \uB610\uB294 OUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}
-
-webserviceap.holder.parameters.must.not.be.in.only=javax.xml.ws.Holder \uB9E4\uAC1C\uBCC0\uC218\uB294 WebParam.Mode.IN \uC18D\uC131\uC73C\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uB9E4\uAC1C\uBCC0\uC218\: {2}
-
-webserviceap.document.bare.holder.parameters.must.not.be.inout=\uBB38\uC11C BARE \uC791\uC5C5\uC758 javax.xml.ws.Holder \uB9E4\uAC1C\uBCC0\uC218\uB294 WebParam.Mode.INOUT\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uB9E4\uAC1C\uBCC0\uC218\: {2}
-
-webserviceap.endpointinterface.class.not.found=endpointInterface \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-webserviceap.sei.cannot.contain.constant.values=\uC11C\uBE44\uC2A4 \uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4\uC5D0\uB294 \uC0C1\uC218 \uC120\uC5B8\uC774 \uD3EC\uD568\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC778\uD130\uD398\uC774\uC2A4\: {0}, \uD544\uB4DC\: {1}.
-
-webserviceap.method.return.type.cannot.implement.remote=\uBA54\uC18C\uB4DC \uBC18\uD658 \uC720\uD615\uC740 java.rmi.Remote\uB97C \uAD6C\uD604\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uBC18\uD658 \uC720\uD615\: {2}
-
-webserviceap.method.parameter.types.cannot.implement.remote=\uBA54\uC18C\uB4DC \uB9E4\uAC1C\uBCC0\uC218 \uC720\uD615\uC740 java.rmi.Remote\uB97C \uAD6C\uD604\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uB9E4\uAC1C\uBCC0\uC218\: {2}, \uC720\uD615\: {3}
-
-webserviceap.operation.name.not.unique=\uC791\uC5C5 \uC774\uB984\uC740 \uACE0\uC720\uD574\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uC791\uC5C5 \uC774\uB984\: {2}
-
-webserviceap.method.request.wrapper.bean.name.not.unique=\uC694\uCCAD \uB798\uD37C Bean \uC774\uB984\uC740 \uACE0\uC720\uD574\uC57C \uD558\uBA70 \uC0DD\uC131\uB41C \uB2E4\uB978 \uD074\uB798\uC2A4\uC640 \uCDA9\uB3CC\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}
-
-webserviceap.method.response.wrapper.bean.name.not.unique=\uC751\uB2F5 \uB798\uD37C Bean \uC774\uB984\uC740 \uACE0\uC720\uD574\uC57C \uD558\uBA70 \uC0DD\uC131\uB41C \uB2E4\uB978 \uD074\uB798\uC2A4\uC640 \uCDA9\uB3CC\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}
-
-webserviceap.method.exception.bean.name.not.unique=\uC608\uC678 \uC0AC\uD56D Bean \uC774\uB984\uC740 \uACE0\uC720\uD574\uC57C \uD558\uBA70 \uC0DD\uC131\uB41C \uB2E4\uB978 \uD074\uB798\uC2A4\uC640 \uCDA9\uB3CC\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uC608\uC678 \uC0AC\uD56D\: {1}
-
-webserviceap.rpc.literal.parameters.must.have.webparam=\uBAA8\uB4E0 RPC \uB9AC\uD130\uB7F4 \uB9E4\uAC1C\uBCC0\uC218\uC5D0\uB294 WebParam \uC8FC\uC11D\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uB9E4\uAC1C\uBCC0\uC218\: {2}
-
-webserviceap.rpc.literal.webparams.must.specify.name=\uBAA8\uB4E0 RPC \uB9AC\uD130\uB7F4 WebParams\uC5D0\uB294 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uB9E4\uAC1C\uBCC0\uC218\: {2}
-
-webserviceap.rpc.literal.must.not.be.bare=RPC \uB9AC\uD130\uB7F4 SOAPBinding\uC5D0\uB294 parameterStyle WRAPPED\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}.
-
-webserviceap.header.parameters.must.have.webparam.name=\uD5E4\uB354 \uB9E4\uAC1C\uBCC0\uC218\uC758 \uBAA8\uB4E0 WebParam \uC8FC\uC11D\uC5D0\uB294 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uB9E4\uAC1C\uBCC0\uC218\: {2}
-
-webserviceap.failed.to.find.handlerchain.file=HandlerChain \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uD30C\uC77C:\ {1}
-
-webserviceap.failed.to.parse.handlerchain.file=HandlerChain \uD30C\uC77C\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uD30C\uC77C\: {1}
-
-webserviceap.class.not.found=\uD074\uB798\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}
-
-webserviceap.rpc.soapbinding.not.allowed.on.method=SOAPBinding.Style.RPC \uBC14\uC778\uB529 \uC8FC\uC11D\uC740 \uBA54\uC18C\uB4DC\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}
-
-webserviceap.mixed.binding.style={0} \uD074\uB798\uC2A4\uC5D0 \uD63C\uD569 \uBC14\uC778\uB529\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. SOAPBinding.Style.RPC\uC640 SOAPBinding.Style.DOCUMENT\uB294 \uD568\uAED8 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-webserviceap.endpointinteface.plus.annotation=@{0} \uC8FC\uC11D\uC740 @javax.jws.WebService.endpointInterface \uC694\uC18C\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-webserviceap.endpointinteface.plus.element=@javax.jws.WebService.{0} \uC694\uC18C\uB294 @javax.jws.WebService.endpointInterface \uC694\uC18C\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-webserviceap.non.in.parameters.must.be.holder={0} \uD074\uB798\uC2A4, {1} \uBA54\uC18C\uB4DC, {2} \uB9E4\uAC1C\uBCC0\uC218\uB294 WebParam.Mode.IN\uC774 \uC544\uB2C8\uBA70 javax.xml.ws.Holder \uC720\uD615\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-
-webserviceap.invalid.sei.annotation.element=@javax.jws.WebService.{0} \uC694\uC18C\uB294 \uC11C\uBE44\uC2A4 \uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4\uC5D0\uC11C \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {1}
-
-webserviceap.invalid.sei.annotation=@{0} \uC8FC\uC11D\uC740 \uC11C\uBE44\uC2A4 \uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {1}
-
-webserviceap.invalid.sei.annotation.element.exclude=@javax.jws.WebMethod({0})\uB294 \uC11C\uBE44\uC2A4 \uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {1}, \uBA54\uC18C\uB4DC\: {2}
-
-webserviceap.invalid.webmethod.element.with.exclude=@javax.jws.WebMethod.{0} \uC694\uC18C\uB294 @javax.jws.WebMethod.exclude \uC694\uC18C\uC640 \uD568\uAED8 \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {1}, \uBA54\uC18C\uB4DC\: {2}
-
-webserviceap.doc.bare.no.out=\uBC18\uD658 \uC720\uD615 \uB610\uB294 OUT/INOUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC5C6\uB294 \uBB38\uC11C/\uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uB294 @Oneway\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC: {1}
-webserviceap.doc.bare.return.and.out=\uBB38\uC11C/\uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC5D0\uB294 \uBC18\uD658 \uC720\uD615 \uBC0F OUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uD3EC\uD568\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC: {1}
-webserviceap.oneway.and.out=@Oneway \uBA54\uC18C\uB4DC\uC5D0\uB294 OUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uD3EC\uD568\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}
-
-webserviceap.webservice.class.not.public=@javax.jws.WebService\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uD074\uB798\uC2A4\uB294 public\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}
-
-webserviceap.webservice.class.is.final=@javax.jws.WebService\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uD074\uB798\uC2A4\uB294 final\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}
-
-webserviceap.webservice.class.is.abstract=@javax.jws.WebService\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uD074\uB798\uC2A4\uB294 abstract\uAC00 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}
-
-webserviceap.webservice.class.is.innerclass.not.static=@javax.jws.WebService\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uB0B4\uBD80 \uD074\uB798\uC2A4\uB294 static\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}
-
-webserviceap.webservice.method.is.abstract=@javax.jws.WebService\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uD074\uB798\uC2A4\uC5D0\uB294 abstract \uBA54\uC18C\uB4DC\uAC00 \uC5C6\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC: {1}
-
-webserviceap.webservice.method.is.static.or.final=@javax.jws.WebMethod\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uBA54\uC18C\uB4DC\uB294 static \uB610\uB294 final\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC: {1}
-
-#webserviceap.doc.bare.return.and.out=Document literal bare methods must not have a return value and an OUT/INOUT parameter. Class\: {0} Method\: {1}
-
-webserviceap.webservice.no.default.constructor=@javax.jws.WebService\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uD074\uB798\uC2A4\uC5D0\uB294 \uACF5\uC6A9 \uAE30\uBCF8 \uC0DD\uC131\uC790\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}
-
-webserviceap.oneway.and.not.one.in=@javax.jws.Oneway\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC5D0\uB294 \uD558\uB098\uC758 \uBE44\uD5E4\uB354 IN \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}
-
-webserviceap.doc.bare.no.return.and.no.out=\uBC18\uD658 \uAC12\uC774 \uC5C6\uB294 \uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC5D0\uB294 \uD558\uB098\uC758 OUT/INOUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}
-
-webserviceap.doc.bare.and.no.one.in=\uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC5D0\uB294 \uD558\uB098\uC758 \uBE44\uD5E4\uB354 IN/INOUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}
-
-webserviceap.method.not.implemented=endpointInterface\uC758 \uBA54\uC18C\uB4DC\uB294 \uAD6C\uD604 \uD074\uB798\uC2A4\uC5D0\uC11C \uAD6C\uD604\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uC778\uD130\uD398\uC774\uC2A4 \uD074\uB798\uC2A4\:{0}, \uAD6C\uD604 \uD074\uB798\uC2A4\:{1}, \uBA54\uC18C\uB4DC\: {2}
-
-webserviceap.no.package.class.must.have.targetnamespace=@javax.jws.Webservice\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uC73C\uBA70 \uD328\uD0A4\uC9C0\uC5D0 \uC18D\uD558\uC9C0 \uC54A\uC740 \uD074\uB798\uC2A4\uC5D0\uB294 @javax.jws.Webservice.targetNamespace \uC694\uC18C\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}
-
-webserviceap.webservice.and.webserviceprovider=\uD074\uB798\uC2A4\uB294 @javax.jws.WebService\uC640 @javax.xml.ws.WebServiceProvider\uB85C \uC8FC\uC11D \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}
-
-webserviceap.invalid.soapbinding.parameterstyle= {1}\uC5D0 {0} \uC8FC\uC11D\uC774 \uC798\uBABB \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4. ParameterStyle\uC740 RPC \uC2A4\uD0C0\uC77C \uC6F9 \uC11C\uBE44\uC2A4\uB85C\uB9CC WRAPPED\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_pt_BR.properties
deleted file mode 100644
index 259f9601..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_pt_BR.properties
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#webserviceap.nestedModelError=modeler error: {0}
-webserviceap.fileNotFound=erro: arquivo n\u00E3o encontrado: {0}
-webserviceap.error=erro: {0}
-webserviceap.warning=advert\u00EAncia: {0}
-webserviceap.info=informa\u00E7\u00F5es: {0}
-webserviceap.compilationFailed=falha na compila\u00E7\u00E3o, os erros foram reportados
-webserviceap.succeeded: Bem-Sucedido
-
-webserviceap.method.not.annotated=O m\u00E9todo {0} na classe {1} n\u00E3o \u00E9 anotada.
-webserviceap.rpc.encoded.not.supported=A classe {0} tem SOAPBinding rpc/codificado. SOAPBindings Rpc/codificado n\u00E3o suportados no JAXWS 2.0.
-webservice.encoded.not.supported=A classe {0} tem anota\u00E7\u00E3o SOAPBinding. {1}/SOAPBinding codificado n\u00E3o suportada
-webserviceap.model.already.exists=o modelo j\u00E1 existe
-webserviceap.endpointinterface.on.interface=Interface do ponto final de servi\u00E7o\: {0} n\u00E3o pode ter uma anota\u00E7\u00E3o\: {1} WebService.endpointInterface
-webserviceap.java.typeNotFound=O tipo: {0} n\u00E3o foi encontrado no mapeamento
-webserviceap.endpointinterfaces.do.not.match=A interface {0} do ponto final n\u00E3o corresponde \u00E0 interface {1}.
-
-# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2
-webserviceap.could.not.find.typedecl=N\u00E3o foi poss\u00EDvel obter o TypeElement para:\ {0} no arredondamento do processamento da anota\u00E7\u00E3o:\ {1}
-
-webserviceap.no.webservice.endpoint.found=N\u00E3o foi poss\u00EDvel encontrar um ponto final de web service
-
-webserviceap.endpointinterface.has.no.webservice.annotation=A interface {0} do ponto final deve ter uma anota\u00E7\u00E3o WebService
-
-webserviceap.oneway.operation.cannot.have.return.type=O m\u00E9todo {1} da classe {0} \u00E9 @Oneway anotado, mas tem um tipo de retorno.
-
-webserviceap.oneway.operation.cannot.have.holders=O m\u00E9todo {1} da classe {0} \u00E9 @Oneway anotado, mas cont\u00E9m os par\u00E2metros INOUT ou OUT (javax.xml.ws.Holder)
-
-webserviceap.oneway.operation.cannot.declare.exceptions=O m\u00E9todo {1} da classe {0} \u00E9 @Oneway anotado, mas declara a exce\u00E7\u00E3o {2}
-
-webserviceap.cannot.combine.handlerchain.soapmessagehandlers=Voc\u00EA n\u00E3o pode especificar as anota\u00E7\u00F5es HanlderChain e SOAPMessageHandlers
-
-webserviceap.invalid.handlerchain.file.nohandler-config=O arquivo {0} handlerchain \u00E9 inv\u00E1lido, ele n\u00E3o cont\u00E9m um elemento de configura\u00E7\u00E3o de handler
-
-webserviceap.could.not.find.handlerchain=N\u00E3o foi poss\u00EDvel localizar o handlerchain {0} no arquivo {1} de handler
-
-webserviceap.handlerclass.notspecified=Um handler no arquivo HandlerChain file\: {0} n\u00E3o especifica uma classe de handler
-
-webserviceap.init_param.format.error=um elemento <init-param> deve ter exatamente 1 <param-name> e 1 <param-value>
-
-webserviceap.document.literal.bare.method.return.not.unique=Os m\u00E9todos bare de documento/literal devem ter uma combina\u00E7\u00E3o de tipo de retorno do nome do resultado. Classe {0} m\u00E9todo\: {1}, nome do resultado\: {2} tipo de retorno\\: {3}
-
-webserviceap.document.literal.bare.method.not.unique=Os m\u00E9todos bare de documento\\literal devem ter nomes de par\u00E2metro exclusivos. Classe\\: {0} m\u00E9todo\\: {1} nome do par\u00E2metro\\: {2}
-
-webserviceap.document.literal.bare.cannot.have.more.than.one.out=Os m\u00E9todos bare de documento\\literal devem ter um valor de retorno ou um par\u00E2metro out. Classe\\: {0} M\u00E9todo\\: {1}
-
-webserviceap.document.literal.bare.must.have.only.one.in.parameter=Os m\u00E9todos bare de documento\\literal n\u00E3o devem ter mais de 1 sem cabe\u00E7alho no par\u00E2metro. Classe\\: {0} m\u00E9todo\\: {1} n\u00FAmero de par\u00E2metros sem cabe\u00E7alho\\: {2}
-
-webserviceap.document.literal.bare.must.have.one.in.or.out=Os m\u00E9todos bare de documento\\literal devem ter pelo menos um valor de: um retorno, um par\u00E2metro in ou um par\u00E2metro out. Classe\\: {0} M\u00E9todo\\: {1}
-
-webserviceap.holder.parameters.must.not.be.in.only=os par\u00E2metros javax.xml.ws.Holder n\u00E3o devem ser anotados com a propriedade WebParam.Mode.IN. Classe\: {0} m\u00E9todo\: {1} par\u00E2metro\: {2}
-
-webserviceap.document.bare.holder.parameters.must.not.be.inout=os par\u00E2metros javax.xml.ws.Holder nas opera\u00E7\u00F5es-base do documento devem ser WebParam.Mode.INOUT; Classe\\: {0} m\u00E9todo\\: {1} par\u00E2metro\\: {2}
-
-webserviceap.endpointinterface.class.not.found=N\u00E3o foi poss\u00EDvel encontrar a classe {0} endpointInterface
-
-webserviceap.sei.cannot.contain.constant.values=Uma interface de ponto final de servi\u00E7o n\u00E3o pode conter uma declara\u00E7\u00E3o de constante\: Interface\: {0} campo\: {1}.
-
-webserviceap.method.return.type.cannot.implement.remote=Os tipos de retorno do m\u00E9todo n\u00E3o podem implementar java.rmi.Remote. Classe\\: {0} m\u00E9todo\\: {1} tipo de retorno\\: {2}
-
-webserviceap.method.parameter.types.cannot.implement.remote=Os tipos de par\u00E2metro do m\u00E9todo n\u00E3o podem implementar java.rmi.Remote. Classe\: {0} m\u00E9todo\: {1} par\u00E2metro\: {2} tipo\: {3}
-
-webserviceap.operation.name.not.unique=Os nomes da opera\u00E7\u00E3o devem ser exclusivos. Classe\: {0} m\u00E9todo\: {1} nome da opera\u00E7\u00E3o\: {2}
-
-webserviceap.method.request.wrapper.bean.name.not.unique=Os nomes do bean do wrapper da solicita\u00E7\u00E3o devem ser exclusivos e n\u00E3o devem estar em conflito com outras classes geradas. Classe\\: {0} m\u00E9todo {1}
-
-webserviceap.method.response.wrapper.bean.name.not.unique=Os nomes do bean do wrapper de resposta devem ser exclusivos e n\u00E3o devem estar em conflito com outras classes geradas. Classe\\: {0} m\u00E9todo {1}
-
-webserviceap.method.exception.bean.name.not.unique=Os nomes do bean de exce\u00E7\u00E3o devem ser exclusivos e n\u00E3o devem estar em conflito com outras classes geradas. Classe\: {0} exce\u00E7\u00E3o {1}
-
-webserviceap.rpc.literal.parameters.must.have.webparam=Todos os par\u00E2metros de literal de RPC devem ter uma anota\u00E7\u00E3o WebParam. Classe\\: {0} m\u00E9todo\\: {1} par\u00E2metro {2}
-
-webserviceap.rpc.literal.webparams.must.specify.name=Todos os WebParams de literal de RPC devem especificar um nome. Classe\\: {0} m\u00E9todo {1} par\u00E2metro {2}
-
-webserviceap.rpc.literal.must.not.be.bare=SOAPBindings de literal de RPC devem ter parameterStyle WRAPPED. Classe\\: {0}.
-
-webserviceap.header.parameters.must.have.webparam.name=Todas as anota\u00E7\u00F5es de WebParam nos par\u00E2metros do cabe\u00E7alho devem especificar um nome. Classe\\: {0} m\u00E9todo {1} par\u00E2metro {2}
-
-webserviceap.failed.to.find.handlerchain.file=N\u00E3o \u00E9 poss\u00EDvel localizar o arquivo HandlerChain. classe\\: {0}, arquivo:\\ {1}
-
-webserviceap.failed.to.parse.handlerchain.file=Falha ao fazer parse do arquivo HandlerChain. Classe\: {0}, arquivo\: {1}
-
-webserviceap.class.not.found=Classe N\u00E3o Encontrada: {0}
-
-webserviceap.rpc.soapbinding.not.allowed.on.method=As anota\u00E7\u00F5es de bind de SOAPBinding.Style.RPC n\u00E3o s\u00E3o permitidas nos m\u00E9todos. Classe\: {0} M\u00E9todo\: {1}
-
-webserviceap.mixed.binding.style=A Classe\\: {0} cont\u00E9m binds mistos. SOAPBinding.Style.RPC e SOAPBinding.Style.DOCUMENT n\u00E3o podem ser mistos.
-
-webserviceap.endpointinteface.plus.annotation=A anota\u00E7\u00E3o @{0} n\u00E3o pode ser usada com o elemento @javax.jws.WebService.endpointInterface.
-
-webserviceap.endpointinteface.plus.element=O elemento @javax.jws.WebService.{0} n\u00E3o pode ser usado com o elemento @javax.jws.WebService.endpointInterface.
-
-webserviceap.non.in.parameters.must.be.holder=Classe:\ {0}, m\u00E9todo: {1}, par\u00E2metro: {2} n\u00E3o \u00E9 WebParam.Mode.IN e n\u00E3o \u00E9 do tipo javax.xml.ws.Holder.
-
-webserviceap.invalid.sei.annotation.element=O elemento @javax.jws.WebService.{0} n\u00E3o pode ser especificado em uma interface do ponto final de servi\u00E7o. Classe\: {1}
-
-webserviceap.invalid.sei.annotation=A anota\u00E7\u00E3o @{0} n\u00E3o pode ser usada em uma interface do ponto final de servi\u00E7o. Classe\: {1}
-
-webserviceap.invalid.sei.annotation.element.exclude=O @javax.jws.WebMethod({0}) n\u00E3o pode ser usado em uma interface do ponto final de servi\u00E7o. Classe\: {1} m\u00E9todo\: {2}
-
-webserviceap.invalid.webmethod.element.with.exclude=O elemento @javax.jws.WebMethod.{0} n\u00E3o pode ser especificado com o elemento @javax.jws.WebMethod.exclude. Classe\\: {1} m\u00E9todo\\: {2}
-
-webserviceap.doc.bare.no.out=Os m\u00E9todos bare de documento/literal sem tipo de retorno ou par\u00E2metros OUT/INOUT devem ser anotados como @Oneway. Classe\\: {0}, m\u00E9todo: {1}
-webserviceap.doc.bare.return.and.out=Os m\u00E9todos bare de documento/literal n\u00E3o podem ter um tipo de retorno e par\u00E2metros out. Classe\\: {0}, m\u00E9todo: {1}
-webserviceap.oneway.and.out=Os m\u00E9todos @Oneway n\u00E3o podem ter par\u00E2metros out. Classe\\: {0} m\u00E9todo {1}
-
-webserviceap.webservice.class.not.public=As classes anotadas com @javax.jws.WebService deve ser p\u00FAblicas. Classe\: {0}
-
-webserviceap.webservice.class.is.final=As classes anotadas com @javax.jws.WebService n\u00E3o devem ser finais. Classe\: {0}
-
-webserviceap.webservice.class.is.abstract=As classe anotadas com @javax.jws.WebService n\u00E3o devem ser abstratas. Classe\: {0}
-
-webserviceap.webservice.class.is.innerclass.not.static=As classes internas anotadas com @javax.jws.WebService devem ser est\u00E1ticas. Classe\: {0}
-
-webserviceap.webservice.method.is.abstract=As classes anotadas com @javax.jws.WebService n\u00E3o devem ter m\u00E9todos abstratos. Classe\: {0} M\u00E9todos: {1}
-
-webserviceap.webservice.method.is.static.or.final=O m\u00E9todo anotado com @javax.jws.WebMethod n\u00E3o deve ser est\u00E1tico ou final. Classe\: {0} M\u00E9todo: {1}
-
-#webserviceap.doc.bare.return.and.out=Document literal bare methods must not have a return value and an OUT/INOUT parameter. Class\: {0} Method\: {1}
-
-webserviceap.webservice.no.default.constructor=As classes anotadas com @javax.jws.WebService devem ter um construtor default p\u00FAblico. Classe\: {0}
-
-webserviceap.oneway.and.not.one.in=Os m\u00E9todos bare de documento/literal anotados com @javax.jws.Oneway devem ter um par\u00E2metro IN sem cabe\u00E7alho. Classe\\: {0} M\u00E9todo\\: {1}
-
-webserviceap.doc.bare.no.return.and.no.out=Os m\u00E9todos bare de documento/literal que n\u00E3o t\u00EAm um valor de retorno devem ter um par\u00E2metro OUT/INOUT. Classe\\: {0} M\u00E9todo\\: {1}
-
-webserviceap.doc.bare.and.no.one.in=Os m\u00E9todos bare de documento/literal anotados com @javax.jws.Oneway devem ter um par\u00E2metro IN/INOU sem cabe\u00E7alho. Classe\\: {0} M\u00E9todo\\: {1}
-
-webserviceap.method.not.implemented=Os m\u00E9todos na endpointInterface devem ser implementadas na classe de implementa\u00E7\u00E3o. Classe da Interface\:{0} Classe de Implementa\u00E7\u00E3o\:{1} M\u00E9todo\: {2}
-
-webserviceap.no.package.class.must.have.targetnamespace=As classes anotadas de @javax.jws.Webservice que n\u00E3o pertencem a um pacote devem ter o elemento @javax.jws.Webservice.targetNamespace. Classe\: {0}
-
-webserviceap.webservice.and.webserviceprovider=As classes n\u00E3o podem ser anotadas com @javax.jws.WebService e @javax.xml.ws.WebServiceProvider. Classe\: {0}
-
-webserviceap.invalid.soapbinding.parameterstyle= Uso incorreto da Anota\u00E7\u00E3o {0} em {1}, o ParameterStyle s\u00F3 pode ser WRAPPED com o Web service de Estilo de RPC.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_CN.properties
deleted file mode 100644
index 40558dc6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_CN.properties
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#webserviceap.nestedModelError=modeler error: {0}
-webserviceap.fileNotFound=\u9519\u8BEF: \u672A\u627E\u5230\u6587\u4EF6: {0}
-webserviceap.error=\u9519\u8BEF: {0}
-webserviceap.warning=\u8B66\u544A: {0}
-webserviceap.info=\u4FE1\u606F: {0}
-webserviceap.compilationFailed=\u7F16\u8BD1\u5931\u8D25, \u9519\u8BEF\u5E94\u8BE5\u5DF2\u4E88\u4EE5\u62A5\u544A
-webserviceap.succeeded: \u6210\u529F
-
-webserviceap.method.not.annotated=\u7C7B{1}\u4E0A\u7684\u65B9\u6CD5{0}\u4E0D\u5E26\u6CE8\u91CA\u3002
-webserviceap.rpc.encoded.not.supported=\u7C7B{0}\u5177\u6709 rpc/\u7F16\u7801\u7684 SOAPBinding\u3002JAXWS 2.0 \u4E2D\u4E0D\u652F\u6301 Rpc/\u7F16\u7801\u7684 SOAPBinding\u3002
-webservice.encoded.not.supported={0}\u7C7B\u5177\u6709\u65E0\u6548\u7684 SOAPBinding \u6CE8\u91CA\u3002\u4E0D\u652F\u6301{1}/\u7F16\u7801\u7684 SOAPBinding
-webserviceap.model.already.exists=\u6A21\u578B\u5DF2\u5B58\u5728
-webserviceap.endpointinterface.on.interface=\u670D\u52A1\u7AEF\u70B9\u63A5\u53E3\: {0}\u4E0D\u80FD\u5177\u6709 WebService.endpointInterface \u6CE8\u91CA\: {1}
-webserviceap.java.typeNotFound=\u5728\u6620\u5C04\u4E2D\u672A\u627E\u5230\u7C7B\u578B{0}
-webserviceap.endpointinterfaces.do.not.match=\u7AEF\u70B9\u63A5\u53E3{0}\u4E0E\u63A5\u53E3{1}\u4E0D\u5339\u914D\u3002
-
-# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2
-webserviceap.could.not.find.typedecl=\u5728\u7B2C {1} \u8F6E\u6CE8\u91CA\u5904\u7406\u4E2D\u65E0\u6CD5\u83B7\u53D6{0}\u7684 TypeElement
-
-webserviceap.no.webservice.endpoint.found=\u627E\u4E0D\u5230 Web \u670D\u52A1\u7AEF\u70B9
-
-webserviceap.endpointinterface.has.no.webservice.annotation=\u7AEF\u70B9\u63A5\u53E3{0}\u5FC5\u987B\u5177\u6709 Web \u670D\u52A1\u6CE8\u91CA
-
-webserviceap.oneway.operation.cannot.have.return.type=\u7C7B{0}\u7684\u65B9\u6CD5{1}\u5E26\u6709 @Oneway \u6CE8\u91CA, \u4F46\u5177\u6709\u8FD4\u56DE\u7C7B\u578B\u3002
-
-webserviceap.oneway.operation.cannot.have.holders=\u7C7B{0}\u7684\u65B9\u6CD5{1}\u5E26\u6709 @Oneway \u6CE8\u91CA, \u4F46\u5305\u542B INOUT \u6216 OUT \u53C2\u6570 (javax.xml.ws.Holder)
-
-webserviceap.oneway.operation.cannot.declare.exceptions=\u7C7B{0}\u7684\u65B9\u6CD5{1}\u5E26\u6709 @Oneway \u6CE8\u91CA, \u4F46\u58F0\u660E\u4E86\u5F02\u5E38\u9519\u8BEF{2}
-
-webserviceap.cannot.combine.handlerchain.soapmessagehandlers=\u4E0D\u80FD\u540C\u65F6\u6307\u5B9A HanlderChain \u548C SOAPMessageHandlers \u6CE8\u91CA
-
-webserviceap.invalid.handlerchain.file.nohandler-config=\u5904\u7406\u7A0B\u5E8F\u94FE\u6587\u4EF6{0}\u65E0\u6548, \u8BE5\u6587\u4EF6\u4E0D\u5305\u542B handler-config \u5143\u7D20
-
-webserviceap.could.not.find.handlerchain=\u5728\u5904\u7406\u7A0B\u5E8F\u6587\u4EF6{1}\u4E2D\u627E\u4E0D\u5230\u5904\u7406\u7A0B\u5E8F\u94FE{0}
-
-webserviceap.handlerclass.notspecified=HandlerChain \u6587\u4EF6\: {0}\u4E2D\u7684\u5904\u7406\u7A0B\u5E8F\u672A\u6307\u5B9A handler-class
-
-webserviceap.init_param.format.error=<init-param> \u5143\u7D20\u53EA\u80FD\u6709 1 \u4E2A <param-name> \u548C 1 \u4E2A <param-value>
-
-webserviceap.document.literal.bare.method.return.not.unique=document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u5177\u6709\u552F\u4E00\u7684\u7ED3\u679C\u540D\u79F0/\u8FD4\u56DE\u7C7B\u578B\u7EC4\u5408\u3002\u7C7B{0}\u65B9\u6CD5\: {1}, \u7ED3\u679C\u540D\u79F0\: {2}, \u8FD4\u56DE\u7C7B\u578B\: {3}
-
-webserviceap.document.literal.bare.method.not.unique=document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u5177\u6709\u552F\u4E00\u7684\u53C2\u6570\u540D\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u53C2\u6570\u540D\: {2}
-
-webserviceap.document.literal.bare.cannot.have.more.than.one.out=document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u5177\u6709\u4E00\u4E2A\u8FD4\u56DE\u503C\u6216\u4E00\u4E2A\u8F93\u51FA\u53C2\u6570\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}
-
-webserviceap.document.literal.bare.must.have.only.one.in.parameter=document-literal-bare \u65B9\u6CD5\u7684\u975E\u6807\u5934\u8F93\u5165\u53C2\u6570\u4E0D\u80FD\u8D85\u8FC7 1 \u4E2A\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u975E\u6807\u5934\u53C2\u6570\u6570\u76EE\: {2}
-
-webserviceap.document.literal.bare.must.have.one.in.or.out=document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u81F3\u5C11\u5177\u6709\u4EE5\u4E0B\u9879\u4E4B\u4E00: \u4E00\u4E2A\u8FD4\u56DE\u503C, \u4E00\u4E2A\u8F93\u5165\u53C2\u6570\u6216\u4E00\u4E2A\u8F93\u51FA\u53C2\u6570\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}
-
-webserviceap.holder.parameters.must.not.be.in.only=javax.xml.ws.Holder \u53C2\u6570\u4E0D\u80FD\u5E26\u6709 WebParam.Mode.IN \u5C5E\u6027\u6CE8\u91CA\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u53C2\u6570\: {2}
-
-webserviceap.document.bare.holder.parameters.must.not.be.inout=document-bare \u64CD\u4F5C\u4E2D\u7684 javax.xml.ws.Holder \u53C2\u6570\u5FC5\u987B\u4E3A WebParam.Mode.INOUT; \u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u53C2\u6570\: {2}
-
-webserviceap.endpointinterface.class.not.found=\u627E\u4E0D\u5230 endpointInterface \u7C7B{0}
-
-webserviceap.sei.cannot.contain.constant.values=\u670D\u52A1\u7AEF\u70B9\u63A5\u53E3\u4E0D\u80FD\u5305\u542B\u5E38\u91CF\u58F0\u660E\: \u63A5\u53E3\: {0}, \u5B57\u6BB5\: {1}\u3002
-
-webserviceap.method.return.type.cannot.implement.remote=\u65B9\u6CD5\u8FD4\u56DE\u7C7B\u578B\u4E0D\u80FD\u5B9E\u73B0 java.rmi.Remote\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u8FD4\u56DE\u7C7B\u578B\: {2}
-
-webserviceap.method.parameter.types.cannot.implement.remote=\u65B9\u6CD5\u53C2\u6570\u7C7B\u578B\u4E0D\u80FD\u5B9E\u73B0 java.rmi.Remote\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u53C2\u6570\: {2}, \u7C7B\u578B\: {3}
-
-webserviceap.operation.name.not.unique=\u64CD\u4F5C\u540D\u5FC5\u987B\u552F\u4E00\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u64CD\u4F5C\u540D\: {2}
-
-webserviceap.method.request.wrapper.bean.name.not.unique=\u8BF7\u6C42\u5305\u88C5 bean \u540D\u79F0\u5FC5\u987B\u552F\u4E00\u5E76\u4E14\u4E0D\u80FD\u4E0E\u5176\u4ED6\u751F\u6210\u7684\u7C7B\u51B2\u7A81\u3002\u7C7B\: {0}, \u65B9\u6CD5{1}
-
-webserviceap.method.response.wrapper.bean.name.not.unique=\u54CD\u5E94\u5305\u88C5 bean \u540D\u79F0\u5FC5\u987B\u552F\u4E00\u5E76\u4E14\u4E0D\u80FD\u4E0E\u5176\u4ED6\u751F\u6210\u7684\u7C7B\u51B2\u7A81\u3002\u7C7B\: {0}, \u65B9\u6CD5{1}
-
-webserviceap.method.exception.bean.name.not.unique=\u5F02\u5E38\u9519\u8BEF bean \u540D\u79F0\u5FC5\u987B\u552F\u4E00\u5E76\u4E14\u4E0D\u80FD\u4E0E\u5176\u4ED6\u751F\u6210\u7684\u7C7B\u51B2\u7A81\u3002\u7C7B\: {0}, \u5F02\u5E38\u9519\u8BEF{1}
-
-webserviceap.rpc.literal.parameters.must.have.webparam=\u6240\u6709 RPC \u6587\u5B57\u53C2\u6570\u5FC5\u987B\u5177\u6709 WebParam \u6CE8\u91CA\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u53C2\u6570{2}
-
-webserviceap.rpc.literal.webparams.must.specify.name=\u6240\u6709 RPC \u6587\u5B57 WebParam \u5FC5\u987B\u6307\u5B9A\u540D\u79F0\u3002\u7C7B\: {0}, \u65B9\u6CD5{1}, \u53C2\u6570{2}
-
-webserviceap.rpc.literal.must.not.be.bare=RPC \u6587\u5B57 SOAPBinding \u5FC5\u987B\u5177\u6709 parameterStyle WRAPPED\u3002\u7C7B\: {0}\u3002
-
-webserviceap.header.parameters.must.have.webparam.name=\u6807\u5934\u53C2\u6570\u4E0A\u7684\u6240\u6709 WebParam \u6CE8\u91CA\u5FC5\u987B\u6307\u5B9A\u540D\u79F0\u3002\u7C7B\: {0}, \u65B9\u6CD5{1}, \u53C2\u6570{2}
-
-webserviceap.failed.to.find.handlerchain.file=\u627E\u4E0D\u5230 HandlerChain \u6587\u4EF6\u3002\u7C7B\: {0}, \u6587\u4EF6:\ {1}
-
-webserviceap.failed.to.parse.handlerchain.file=\u65E0\u6CD5\u89E3\u6790 HandlerChain \u6587\u4EF6\u3002\u7C7B\: {0}, \u6587\u4EF6:\ {1}
-
-webserviceap.class.not.found=\u672A\u627E\u5230\u7C7B: {0}
-
-webserviceap.rpc.soapbinding.not.allowed.on.method=\u65B9\u6CD5\u4E0A\u4E0D\u5141\u8BB8\u6709 SOAPBinding.Style.RPC \u7ED1\u5B9A\u6CE8\u91CA\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}
-
-webserviceap.mixed.binding.style=\u7C7B\: {0}\u5305\u542B\u6DF7\u5408\u7ED1\u5B9A\u3002SOAPBinding.Style.RPC \u548C SOAPBinding.Style.DOCUMENT \u4E0D\u80FD\u6DF7\u5408\u3002
-
-webserviceap.endpointinteface.plus.annotation=@{0} \u6CE8\u91CA\u4E0D\u80FD\u4E0E @javax.jws.WebService.endpointInterface \u5143\u7D20\u4E00\u8D77\u4F7F\u7528\u3002
-
-webserviceap.endpointinteface.plus.element=@javax.jws.WebService.{0} \u5143\u7D20\u4E0D\u80FD\u4E0E @javax.jws.WebService.endpointInterface \u5143\u7D20\u4E00\u8D77\u4F7F\u7528\u3002
-
-webserviceap.non.in.parameters.must.be.holder=\u7C7B:\ {0}, \u65B9\u6CD5: {1}, \u53C2\u6570: {2}\u4E0D\u662F WebParam.Mode.IN \u5E76\u4E14\u4E0D\u662F javax.xml.ws.Holder \u7C7B\u578B\u3002
-
-webserviceap.invalid.sei.annotation.element=\u4E0D\u80FD\u5728\u670D\u52A1\u7AEF\u70B9\u63A5\u53E3\u4E0A\u6307\u5B9A @javax.jws.WebService.{0} \u5143\u7D20\u3002\u7C7B\: {1}
-
-webserviceap.invalid.sei.annotation=\u4E0D\u80FD\u5728\u670D\u52A1\u7AEF\u70B9\u63A5\u53E3\u4E0A\u4F7F\u7528 @{0} \u6CE8\u91CA\u3002\u7C7B\: {1}
-
-webserviceap.invalid.sei.annotation.element.exclude=\u4E0D\u80FD\u5728\u670D\u52A1\u7AEF\u70B9\u63A5\u53E3\u4E0A\u4F7F\u7528 @javax.jws.WebMethod({0})\u3002\u7C7B\: {1}, \u65B9\u6CD5\: {2}
-
-webserviceap.invalid.webmethod.element.with.exclude=\u4E0D\u80FD\u4F7F\u7528 @javax.jws.WebMethod.exclude \u5143\u7D20\u6307\u5B9A @javax.jws.WebMethod.{0} \u5143\u7D20\u3002\u7C7B\: {1}, \u65B9\u6CD5\: {2}
-
-webserviceap.doc.bare.no.out=\u6CA1\u6709\u8FD4\u56DE\u7C7B\u578B\u6216 OUT/INOUT \u53C2\u6570\u7684 document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u6CE8\u91CA\u4E3A @Oneway\u3002\u7C7B\: {0}, \u65B9\u6CD5: {1}
-webserviceap.doc.bare.return.and.out=document-literal-bare \u65B9\u6CD5\u4E0D\u80FD\u5177\u6709\u8FD4\u56DE\u7C7B\u578B\u548C\u8F93\u51FA\u53C2\u6570\u3002\u7C7B\: {0}, \u65B9\u6CD5: {1}
-webserviceap.oneway.and.out=@Oneway \u65B9\u6CD5\u4E0D\u80FD\u5177\u6709\u8F93\u51FA\u53C2\u6570\u3002\u7C7B\: {0}, \u65B9\u6CD5{1}
-
-webserviceap.webservice.class.not.public=\u5E26\u6709 @javax.jws.WebService \u6CE8\u91CA\u7684\u7C7B\u5FC5\u987B\u662F\u516C\u5171\u7C7B\u3002\u7C7B\: {0}
-
-webserviceap.webservice.class.is.final=\u5E26\u6709 @javax.jws.WebService \u6CE8\u91CA\u7684\u7C7B\u4E0D\u80FD\u662F\u6700\u7EC8\u7C7B\u3002\u7C7B\: {0}
-
-webserviceap.webservice.class.is.abstract=\u5E26\u6709 @javax.jws.WebService \u6CE8\u91CA\u7684\u7C7B\u4E0D\u80FD\u662F\u62BD\u8C61\u7C7B\u3002\u7C7B\: {0}
-
-webserviceap.webservice.class.is.innerclass.not.static=\u5E26\u6709 @javax.jws.WebService \u6CE8\u91CA\u7684\u5185\u90E8\u7C7B\u5FC5\u987B\u662F\u9759\u6001\u7C7B\u3002\u7C7B\: {0}
-
-webserviceap.webservice.method.is.abstract=\u5E26\u6709 @javax.jws.WebService \u6CE8\u91CA\u7684\u7C7B\u4E0D\u80FD\u5177\u6709\u62BD\u8C61\u65B9\u6CD5\u3002\u7C7B\: {0}, \u65B9\u6CD5: {1}
-
-webserviceap.webservice.method.is.static.or.final=\u5E26\u6709 @javax.jws.WebMethod \u6CE8\u91CA\u7684\u65B9\u6CD5\u4E0D\u80FD\u662F\u9759\u6001\u65B9\u6CD5\u6216\u6700\u7EC8\u65B9\u6CD5\u3002\u7C7B\: {0}, \u65B9\u6CD5: {1}
-
-#webserviceap.doc.bare.return.and.out=Document literal bare methods must not have a return value and an OUT/INOUT parameter. Class\: {0} Method\: {1}
-
-webserviceap.webservice.no.default.constructor=\u5E26\u6709 @javax.jws.WebService \u6CE8\u91CA\u7684\u7C7B\u5FC5\u987B\u5177\u6709\u516C\u5171\u9ED8\u8BA4\u6784\u9020\u5668\u3002\u7C7B\: {0}
-
-webserviceap.oneway.and.not.one.in=\u5E26\u6709 @javax.jws.Oneway \u6CE8\u91CA\u7684 document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u5177\u6709\u975E\u6807\u5934 IN \u53C2\u6570\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}
-
-webserviceap.doc.bare.no.return.and.no.out=\u6CA1\u6709\u8FD4\u56DE\u503C\u7684 document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u5177\u6709\u5355\u4E2A OUT/INOUT \u53C2\u6570\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}
-
-webserviceap.doc.bare.and.no.one.in=document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u5177\u6709\u975E\u6807\u5934 IN/INOUT \u53C2\u6570\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}
-
-webserviceap.method.not.implemented=\u5FC5\u987B\u5728\u5B9E\u73B0\u7C7B\u4E2D\u5B9E\u73B0 endpointInterface \u4E2D\u7684\u65B9\u6CD5\u3002\u5185\u90E8\u7C7B\:{0}, \u5B9E\u73B0\u7C7B\:{1}, \u65B9\u6CD5\: {2}
-
-webserviceap.no.package.class.must.have.targetnamespace=\u4E0D\u5C5E\u4E8E\u7A0B\u5E8F\u5305\u7684\u5E26\u6709 @javax.jws.Webservice \u6CE8\u91CA\u7684\u7C7B\u5FC5\u987B\u5177\u6709 @javax.jws.Webservice.targetNamespace \u5143\u7D20\u3002\u7C7B\: {0}
-
-webserviceap.webservice.and.webserviceprovider=\u7C7B\u4E0D\u540C\u65F6\u5E26\u6709 @javax.jws.WebService \u548C @javax.xml.ws.WebServiceProvider \u6CE8\u91CA\u3002\u7C7B\: {0}
-
-webserviceap.invalid.soapbinding.parameterstyle= {1}\u4E0A\u6CE8\u91CA{0}\u7684\u7528\u6CD5\u4E0D\u6B63\u786E, ParameterStyle \u53EA\u80FD\u662F\u5E26\u6709 RPC \u6837\u5F0F Web \u670D\u52A1\u7684 WRAPPED\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_TW.properties
deleted file mode 100644
index 83d0ccd7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_TW.properties
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#webserviceap.nestedModelError=modeler error: {0}
-webserviceap.fileNotFound=\u932F\u8AA4: \u627E\u4E0D\u5230\u6A94\u6848: {0}
-webserviceap.error=\u932F\u8AA4: {0}
-webserviceap.warning=\u8B66\u544A: {0}
-webserviceap.info=\u8CC7\u8A0A: {0}
-webserviceap.compilationFailed=\u7DE8\u8B6F\u5931\u6557, \u5FC5\u9808\u5831\u544A\u932F\u8AA4
-webserviceap.succeeded: \u6210\u529F
-
-webserviceap.method.not.annotated=\u672A\u5728\u985E\u5225 {1} \u7684\u65B9\u6CD5 {0} \u52A0\u8A3B.
-webserviceap.rpc.encoded.not.supported=\u985E\u5225 {0} \u542B\u6709 rpc/encoded \u7684 SOAPBinding. JAXWS 2.0 \u4E0D\u652F\u63F4 rpc/encoded \u7684 SOAPBinding.
-webservice.encoded.not.supported={0} \u985E\u5225\u542B\u6709\u7121\u6548\u7684 SOAPBinding \u8A3B\u89E3. \u4E0D\u652F\u63F4 {1}/encoded \u7684 SOAPBinding.
-webserviceap.model.already.exists=\u6A21\u578B\u5DF2\u7D93\u5B58\u5728
-webserviceap.endpointinterface.on.interface=\u670D\u52D9\u7AEF\u9EDE\u4ECB\u9762\: {0} \u4E0D\u53EF\u6709 WebService.endpointInterface \u8A3B\u89E3\: {1}
-webserviceap.java.typeNotFound=\u5728\u5C0D\u61C9\u4E2D\u627E\u4E0D\u5230\u985E\u578B {0}
-webserviceap.endpointinterfaces.do.not.match=\u7AEF\u9EDE\u4ECB\u9762 {0} \u8207\u4ECB\u9762 {1} \u4E0D\u7B26.
-
-# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2
-webserviceap.could.not.find.typedecl=\u7121\u6CD5\u5728\u7B2C:\ {1} \u56DE\u5408\u7684\u8A3B\u89E3\u8655\u7406\u53D6\u5F97:\ {0} \u7684 TypeElement
-
-webserviceap.no.webservice.endpoint.found=\u627E\u4E0D\u5230 Web \u670D\u52D9\u7AEF\u9EDE
-
-webserviceap.endpointinterface.has.no.webservice.annotation=\u7AEF\u9EDE\u4ECB\u9762 {0} \u5FC5\u9808\u8981\u6709\u4E00\u500B\u300CWeb \u670D\u52D9\u300D\u8A3B\u89E3
-
-webserviceap.oneway.operation.cannot.have.return.type=\u985E\u5225 {0} \u7684\u65B9\u6CD5 {1} \u52A0\u8A3B @Oneway, \u4F46\u662F\u6709\u50B3\u56DE\u985E\u578B.
-
-webserviceap.oneway.operation.cannot.have.holders=\u985E\u5225 {0} \u7684\u65B9\u6CD5 {1} \u52A0\u8A3B @Oneway, \u4F46\u662F\u5305\u542B INOUT \u6216 OUT \u53C3\u6578 (javax.xml.ws.Holder)
-
-webserviceap.oneway.operation.cannot.declare.exceptions=\u985E\u5225 {0} \u7684\u65B9\u6CD5 {1} \u52A0\u8A3B @Oneway, \u4F46\u662F\u5BA3\u544A\u4F8B\u5916 {2}
-
-webserviceap.cannot.combine.handlerchain.soapmessagehandlers=\u60A8\u4E0D\u80FD\u540C\u6642\u6307\u5B9A HanlderChain \u548C SOAPMessageHandlers \u8A3B\u89E3
-
-webserviceap.invalid.handlerchain.file.nohandler-config=\u8655\u7406\u7A0B\u5F0F\u93C8\u6A94\u6848 {0} \u7121\u6548, \u5B83\u672A\u5305\u542B handler-config \u5143\u7D20
-
-webserviceap.could.not.find.handlerchain=\u5728\u8655\u7406\u7A0B\u5F0F\u6A94\u6848 {1} \u4E2D\u627E\u4E0D\u5230\u8655\u7406\u7A0B\u5F0F\u93C8 {0}
-
-webserviceap.handlerclass.notspecified=HandlerChain \u6A94\u6848 {0} \u4E2D\u7684\u8655\u7406\u7A0B\u5F0F\u672A\u6307\u5B9A\u8655\u7406\u7A0B\u5F0F\u985E\u5225
-
-webserviceap.init_param.format.error=<init-param> \u5143\u7D20\u53EA\u80FD\u6709 1 \u500B <param-name> \u548C 1 \u500B <param-value>
-
-webserviceap.document.literal.bare.method.return.not.unique=\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u5FC5\u9808\u8981\u6709\u552F\u4E00\u7684\u7D50\u679C\u540D\u7A31\u50B3\u56DE\u985E\u578B\u7D44\u5408. \u985E\u5225 {0} \u65B9\u6CD5\: {1}, \u7D50\u679C\u540D\u7A31\: {2} \u50B3\u56DE\u985E\u578B\: {3}
-
-webserviceap.document.literal.bare.method.not.unique=\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u5FC5\u9808\u8981\u6709\u552F\u4E00\u7684\u53C3\u6578\u540D\u7A31. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u53C3\u6578\u540D\u7A31\: {2}
-
-webserviceap.document.literal.bare.cannot.have.more.than.one.out=\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u5FC5\u9808\u8981\u6709\u4E00\u500B\u50B3\u56DE\u503C\u6216\u4E00\u500B out \u53C3\u6578. \u985E\u5225\: {0} \u65B9\u6CD5\: {1}
-
-webserviceap.document.literal.bare.must.have.only.one.in.parameter=\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u5728\u53C3\u6578\u4E2D\u4E0D\u80FD\u6709 1 \u500B\u4EE5\u4E0A\u7684\u975E\u6A19\u982D. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u975E\u6A19\u982D\u53C3\u6578\u6578\u76EE\: {2}
-
-webserviceap.document.literal.bare.must.have.one.in.or.out=\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u81F3\u5C11\u5FC5\u9808\u8981\u6709\u50B3\u56DE\u3001 in \u53C3\u6578\u6216 out \u53C3\u6578\u5176\u4E2D\u4E4B\u4E00. \u985E\u5225\: {0} \u65B9\u6CD5\: {1}
-
-webserviceap.holder.parameters.must.not.be.in.only=javax.xml.ws.Holder \u53C3\u6578\u4E0D\u53EF\u4F7F\u7528 WebParam.Mode.IN \u7279\u6027\u52A0\u8A3B. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u53C3\u6578\: {2}
-
-webserviceap.document.bare.holder.parameters.must.not.be.inout=\u6587\u4EF6 bare \u4F5C\u696D\u4E2D\u7684 javax.xml.ws.Holder \u53C3\u6578\u5FC5\u9808\u662F WebParam.Mode.INOUT; \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u53C3\u6578\: {2}
-
-webserviceap.endpointinterface.class.not.found=\u627E\u4E0D\u5230 endpointInterface \u985E\u5225 {0}
-
-webserviceap.sei.cannot.contain.constant.values=\u670D\u52D9\u7AEF\u9EDE\u4ECB\u9762\u4E0D\u53EF\u5305\u542B\u5E38\u6578\u5BA3\u544A\: \u4ECB\u9762\: {0} \u6B04\u4F4D\: {1}.
-
-webserviceap.method.return.type.cannot.implement.remote=\u65B9\u6CD5\u50B3\u56DE\u985E\u578B\u4E0D\u53EF\u5BE6\u884C java.rmi.Remote. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u50B3\u56DE\u985E\u578B\: {2}
-
-webserviceap.method.parameter.types.cannot.implement.remote=\u65B9\u6CD5\u53C3\u6578\u985E\u578B\u4E0D\u53EF\u5BE6\u884C java.rmi.Remote. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u53C3\u6578\: {2} \u985E\u578B\: {3}
-
-webserviceap.operation.name.not.unique=\u4F5C\u696D\u540D\u7A31\u5FC5\u9808\u662F\u552F\u4E00\u7684. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u4F5C\u696D\u540D\u7A31\: {2}
-
-webserviceap.method.request.wrapper.bean.name.not.unique=\u8981\u6C42\u5305\u88DD\u51FD\u5F0F bean \u540D\u7A31\u5FC5\u9808\u662F\u552F\u4E00\u7684, \u4E14\u4E0D\u53EF\u8207\u5176\u4ED6\u7522\u751F\u7684\u985E\u5225\u885D\u7A81. \u985E\u5225\: {0} \u65B9\u6CD5 {1}
-
-webserviceap.method.response.wrapper.bean.name.not.unique=\u56DE\u61C9\u5305\u88DD\u51FD\u5F0F bean \u540D\u7A31\u5FC5\u9808\u662F\u552F\u4E00\u7684, \u4E14\u4E0D\u53EF\u8207\u5176\u4ED6\u7522\u751F\u7684\u985E\u5225\u885D\u7A81. \u985E\u5225\: {0} \u65B9\u6CD5 {1}
-
-webserviceap.method.exception.bean.name.not.unique=\u4F8B\u5916 bean \u540D\u7A31\u5FC5\u9808\u662F\u552F\u4E00\u7684, \u4E14\u4E0D\u53EF\u8207\u5176\u4ED6\u7522\u751F\u7684\u985E\u5225\u885D\u7A81. \u985E\u5225\: {0} \u4F8B\u5916 {1}
-
-webserviceap.rpc.literal.parameters.must.have.webparam=\u6240\u6709\u7684 RPC \u5E38\u503C\u53C3\u6578\u5747\u5FC5\u9808\u8981\u6709\u4E00\u500B WebParam \u8A3B\u89E3. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u53C3\u6578 {2}
-
-webserviceap.rpc.literal.webparams.must.specify.name=\u6240\u6709\u7684 RPC \u5E38\u503C WebParam \u5747\u5FC5\u9808\u6307\u5B9A\u4E00\u500B\u540D\u7A31. \u985E\u5225\: {0} \u65B9\u6CD5 {1} \u53C3\u6578 {2}
-
-webserviceap.rpc.literal.must.not.be.bare=RPC \u5E38\u503C SOAPBinding \u4E2D\u5FC5\u9808\u6709 parameterStyle WRAPPED. \u985E\u5225\\: {0}.
-
-webserviceap.header.parameters.must.have.webparam.name=\u6240\u6709\u7684\u6A19\u982D\u53C3\u6578 WebParam \u8A3B\u89E3\u5747\u5FC5\u9808\u6307\u5B9A\u4E00\u500B\u540D\u7A31. \u985E\u5225\: {0} \u65B9\u6CD5 {1} \u53C3\u6578 {2}
-
-webserviceap.failed.to.find.handlerchain.file=\u627E\u4E0D\u5230 HandlerChain \u6A94\u6848. \u985E\u5225\: {0}, \u6A94\u6848:\ {1}
-
-webserviceap.failed.to.parse.handlerchain.file=\u7121\u6CD5\u5256\u6790 HandlerChain \u6A94\u6848. \u985E\u5225\: {0}, \u6A94\u6848\: {1}
-
-webserviceap.class.not.found=\u627E\u4E0D\u5230\u985E\u5225: {0}
-
-webserviceap.rpc.soapbinding.not.allowed.on.method=\u65B9\u6CD5\u4E0D\u53EF\u6709 SOAPBinding.Style.RPC \u9023\u7D50\u8A3B\u89E3. \u985E\u5225\: {0} \u65B9\u6CD5\: {1}
-
-webserviceap.mixed.binding.style=\u985E\u5225 {0} \u5305\u542B\u6DF7\u5408\u9023\u7D50. \u4E0D\u53EF\u6DF7\u5408\u4F7F\u7528 SOAPBinding.Style.RPC \u548C SOAPBinding.Style.DOCUMENT.
-
-webserviceap.endpointinteface.plus.annotation=\u4E0D\u53EF\u5728 @javax.jws.WebService.endpointInterface \u5143\u7D20\u4E2D\u4F7F\u7528 @{0} \u8A3B\u89E3.
-
-webserviceap.endpointinteface.plus.element=\u4E0D\u53EF\u5728 @javax.jws.WebService.endpointInterface \u5143\u7D20\u4E2D\u4F7F\u7528 @javax.jws.WebService.{0} \u5143\u7D20.
-
-webserviceap.non.in.parameters.must.be.holder=\u985E\u5225:\ {0}, \u65B9\u6CD5: {1}, \u53C3\u6578: {2} \u4E0D\u662F WebParam.Mode.IN, \u4E14\u4E0D\u662F javax.xml.ws.Holder \u985E\u578B.
-
-webserviceap.invalid.sei.annotation.element=\u4E0D\u53EF\u5728\u670D\u52D9\u7AEF\u9EDE\u4ECB\u9762\u6307\u5B9A @javax.jws.WebService.{0} \u5143\u7D20. \u985E\u5225\: {1}
-
-webserviceap.invalid.sei.annotation=\u4E0D\u53EF\u5728\u670D\u52D9\u7AEF\u9EDE\u4ECB\u9762\u4F7F\u7528 @{0} \u8A3B\u89E3. \u985E\u5225\: {1}
-
-webserviceap.invalid.sei.annotation.element.exclude=\u4E0D\u53EF\u5728\u670D\u52D9\u7AEF\u9EDE\u4ECB\u9762\u4F7F\u7528 @javax.jws.WebMethod({0}). \u985E\u5225\: {1} \u65B9\u6CD5\: {2}
-
-webserviceap.invalid.webmethod.element.with.exclude=\u4E0D\u53EF\u540C\u6642\u6307\u5B9A @javax.jws.WebMethod.{0} \u5143\u7D20\u8207 @javax.jws.WebMethod.exclude \u5143\u7D20. \u985E\u5225\: {1} \u65B9\u6CD5\: {2}
-
-webserviceap.doc.bare.no.out=\u5FC5\u9808\u5C07\u4E0D\u542B\u50B3\u56DE\u985E\u578B\u6216 OUT/INOUT \u53C3\u6578\u7684 Document/literal bare \u65B9\u6CD5\u52A0\u8A3B\u70BA @Oneway. \u985E\u5225\: {0}, \u65B9\u6CD5: {1}
-webserviceap.doc.bare.return.and.out=Document/literal bare \u65B9\u6CD5\u4E0D\u53EF\u6709\u50B3\u56DE\u985E\u578B\u548C out \u53C3\u6578. \u985E\u5225\: {0}, \u65B9\u6CD5: {1}
-webserviceap.oneway.and.out=@Oneway \u65B9\u6CD5\u4E0D\u53EF\u6709 out \u53C3\u6578. \u985E\u5225\: {0} \u65B9\u6CD5 {1}
-
-webserviceap.webservice.class.not.public=\u4F7F\u7528 @javax.jws.WebService \u52A0\u8A3B\u7684\u985E\u5225\u5FC5\u9808\u662F\u516C\u7528\u985E\u5225. \u985E\u5225\: {0}
-
-webserviceap.webservice.class.is.final=\u4F7F\u7528 @javax.jws.WebService \u52A0\u8A3B\u7684\u985E\u5225\u4E0D\u53EF\u4EE5\u662F\u6700\u7D42\u985E\u5225. \u985E\u5225\: {0}
-
-webserviceap.webservice.class.is.abstract=\u4F7F\u7528 @javax.jws.WebService \u52A0\u8A3B\u7684\u985E\u5225\u4E0D\u53EF\u4EE5\u662F\u6458\u8981\u985E\u5225. \u985E\u5225\: {0}
-
-webserviceap.webservice.class.is.innerclass.not.static=\u4F7F\u7528 @javax.jws.WebService \u52A0\u8A3B\u7684\u5167\u90E8\u985E\u5225\u5FC5\u9808\u662F\u975C\u614B\u985E\u5225. \u985E\u5225\: {0}
-
-webserviceap.webservice.method.is.abstract=\u4F7F\u7528 @javax.jws.WebService \u52A0\u8A3B\u7684\u985E\u5225\u4E0D\u53EF\u6709\u6458\u8981\u65B9\u6CD5. \u985E\u5225\: {0} \u65B9\u6CD5: {1}
-
-webserviceap.webservice.method.is.static.or.final=\u4F7F\u7528 @javax.jws.WebMethod \u52A0\u8A3B\u7684\u65B9\u6CD5\u4E0D\u53EF\u662F\u975C\u614B\u6216\u6700\u7D42\u65B9\u6CD5. \u985E\u5225\: {0} \u65B9\u6CD5: {1}
-
-#webserviceap.doc.bare.return.and.out=Document literal bare methods must not have a return value and an OUT/INOUT parameter. Class\: {0} Method\: {1}
-
-webserviceap.webservice.no.default.constructor=\u4F7F\u7528 @javax.jws.WebService \u52A0\u8A3B\u7684\u985E\u5225\u5FC5\u9808\u8981\u6709\u4E00\u500B\u516C\u7528\u7684\u9810\u8A2D\u5EFA\u69CB\u5B50. \u985E\u5225\: {0}
-
-webserviceap.oneway.and.not.one.in=\u4F7F\u7528 @javax.jws.Oneway \u52A0\u8A3B\u7684\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u5FC5\u9808\u8981\u6709\u4E00\u500B\u975E\u6A19\u982D IN \u53C3\u6578. \u985E\u5225\: {0} \u65B9\u6CD5\: {1}
-
-webserviceap.doc.bare.no.return.and.no.out=\u6C92\u6709\u50B3\u56DE\u503C\u7684\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u5FC5\u9808\u8981\u6709\u55AE\u4E00 OUT/INOUT \u53C3\u6578. \u985E\u5225\: {0} \u65B9\u6CD5\: {1}
-
-webserviceap.doc.bare.and.no.one.in=\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u5FC5\u9808\u8981\u6709\u4E00\u500B\u975E\u6A19\u982D IN/INOUT \u53C3\u6578. \u985E\u5225\: {0} \u65B9\u6CD5\: {1}
-
-webserviceap.method.not.implemented=\u5FC5\u9808\u5728\u5BE6\u884C\u985E\u5225\u4E2D\u5BE6\u884C endpointInterface \u4E2D\u7684\u65B9\u6CD5. \u4ECB\u9762\u985E\u5225\:{0} \u5BE6\u884C\u985E\u5225\:{1} \u65B9\u6CD5\: {2}
-
-webserviceap.no.package.class.must.have.targetnamespace=\u4F7F\u7528 @javax.jws.Webservice \u52A0\u8A3B\u4E14\u4E0D\u5C6C\u65BC\u5957\u88DD\u7A0B\u5F0F\u7684\u985E\u5225, \u5FC5\u9808\u8981\u6709 @javax.jws.Webservice.targetNamespace \u5143\u7D20. \u985E\u5225\\: {0}
-
-webserviceap.webservice.and.webserviceprovider=\u4E0D\u53EF\u540C\u6642\u4F7F\u7528 @javax.jws.WebService \u8207 @javax.xml.ws.WebServiceProvider \u52A0\u8A3B\u7684\u985E\u5225. \u985E\u5225\\: {0}
-
-webserviceap.invalid.soapbinding.parameterstyle= {1} \u7684\u8A3B\u89E3 {0} \u7528\u6CD5\u4E0D\u6B63\u78BA, ParameterStyle \u53EA\u80FD\u662F\u4F7F\u7528 RPC \u6A23\u5F0F Web \u670D\u52D9\u7684 WRAPPED.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile.properties
deleted file mode 100644
index ab332df7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile.properties
+++ /dev/null
@@ -1,261 +0,0 @@
-#
-# Copyright (c) 2005, 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.
-#
-
-wsimport.usage=Usage: {0} [options] <WSDL_URI>\n\n\
-Use "wsimport -help" for a detailed description of options.
-
-wsimport.help=\nUsage: {0} [options] <WSDL_URI>\n\n\
-\where [options] include:\n\
-\ -b <path> specify jaxws/jaxb binding files or additional schemas\n\
-\ (Each <path> must have its own -b)\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\
-\ by the specification. Use of extensions may\n\
-\ result in applications that are not portable or\n\
-\ may not interoperate with other implementations\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\
-\ -s <directory> specify where to place generated source files\n\
-\ -target <version> generate code as per the given JAXWS spec version\n\
-\ Defaults to 2.2, Accepted values are 2.0, 2.1 and 2.2\n\
-\ e.g. 2.0 will generate compliant code for JAXWS 2.0 spec\n\
-\ -verbose output messages about what the compiler is doing\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\
-\ 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\
-\ -implServiceName <name> local portion of service name for generated JWS implementation\n\
-\ -implPortName <name> local portion of port name for generated JWS implementation
-
-wsimport.usage.extensions=\n\
-\Extensions:\n\
-\ -XadditionalHeaders map headers not bound to request or response message to \n\
-\ Java method parameters\n\
-\ -Xauthfile file to carry authorization information in the format \n\
-\ http://username:password@example.org/stock?wsdl\n\
-\ -Xdebug print debug information\n\
-\ -Xno-addressing-databinding enable binding of W3C EndpointReferenceType to Java\n\
-\ -Xnocompile do not compile generated Java files\n\
-\ -XdisableAuthenticator disable Authenticator used by JAX-WS RI,\n\
-\ -Xauthfile option will be ignored if set\n\
-\ -XdisableSSLHostnameVerification disable the SSL Hostname verification while fetching\n\
-\ wsdls
-
-
-wsimport.usage.examples=\n\
-\Examples:\n\
-\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\
-\ wsimport -d generated http://example.org/stock?wsdl\n\
-
-#{0} - version number
-wsimport.version=wsimport version \"{0}\"
-
-#{0} - full version number
-wsimport.fullversion=wsimport full version \"{0}\"
-
-wsgen.usage=Usage: {0} [options] <SEI>\n\n\
-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 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\
-\ by the specification. Use of extensions may\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\
-\ -s <directory> specify where to place generated source files\n\
-\ -verbose output messages about what the compiler is doing\n\
-\ -version print version information\n\
-\ -fullversion print full version information\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 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\
-\ used in conjunction with the -wsdl option.\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.\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\
-\ wsgen -cp . example.Stock\n\
-\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n\
-
-#{0} - version number
-wsgen.version=wsgen version \"{0}\"
-
-#{0} - full version number
-wsgen.fullversion=wsgen full version \"{0}\"
-
-wrapperTask.needEndorsed=\
-You are running on JDK6 which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} API. \
-Use the endorsed standards override mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \
-or set xendorsed="true" on <{2}>.
-
-# {0}, {2} - version (e.g. 2.1), {1} - absolute class location
-wrapperTask.loadingIncorrectApi=\
-You are loading JAX-WS {0} API from {1} but this tool requires JAX-WS {2} API.
-
-invoker.needEndorsed=\
-You are running on JDK6 which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} API. \
-Use the endorsed standards override mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \
-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}
-wscompile.warning=warning: {0}
-wscompile.info=info: {0}
-wscompile.duplicateOption=duplicate option: {0}
-wscompile.noSuchDirectory=directory not found: {0}
-# wscompile.missingOptionArgument
-wscompile.missingOptionArgument=option \"{0}\" requires an argument
-wscompile.compilationFailed=compilation failed, errors should have been reported
-wscompile.unsupportedEncoding=unsupported encoding: {0}
-
-wsimport.missingFile=Missing WSDL_URI
-
-wsgen.invalid.protocol=\"{0}\" is not a supported protocol. Supported protocols include: {1}.
-wsgen.invalid.transport=\"{0}\" is not a supported transport. Supported transport includes: {1}.
-wsgen.class.not.found=Class not found: \"{0}\"
-wsgen.could.not.create.file="Could not create file: "\{0}\"
-wsgen.missingFile=Missing SEI
-wsgen.soap12.without.extension=The optional protocol \"Xsoap1.2\" must be used in conjunction with the \"-extension\" option.
-wsgen.protocol.without.extension=The optional protocol \"{0}\" must be used in conjunction with the \"-extension\" option.
-wsgen.wsdl.arg.no.genwsdl=The \"{0}\" option can only be in conjunction with the "-wsdl" option.
-wsgen.servicename.missing.namespace=The service name \"{0}\" is missing a namespace.
-wsgen.servicename.missing.localname=The service name \"{0}\" is missing a localname.
-wsgen.portname.missing.namespace=The port name \"{0}\" is missing a namespace.
-wsgen.portname.missing.localname=The port name \"{0}\" is missing a localname.
-wsgen.class.must.be.implementation.class=The class \"{0}\" is not an endpoint implementation class.
-wsimport.NotAFileNorURL = \
- "{0}" is neither a file name nor an URL
-
-wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen can not generate WSDL for non-SOAP binding: {0} on Class {1}
-
-wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen can not generate WSDL for SOAP 1.2 binding: {0} on class: {1}.\n
-Please specify \"-extension\" and \"-wsdl:protocol XSoap1.2\" switches. For example:\n\n
-wsgen -wsdl:protocol XSoap1.2 -extenson {1}
-wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\" must be used in conjunction with the \"-wsdl\" option
-
-wsgen.no.webservices.class=wsgen did not find any class with @WebService annotation. Please specify @WebService annotation on {0}.
-
-wsimport.no.wsdl=Failed to read the WSDL document: {0}, because 1) could not find the document; /\
- 2) the document could not be read; \
- 3) the root element of the document is not <wsdl:definitions>.
-
-wsimport.FailedToParse = \
- Failed to parse "{0}": {1}
-
-wsimport.ParsingWSDL=parsing WSDL...\n\n
-wsimport.GeneratingCode=\nGenerating code...\n
-wsimport.CompilingCode=\nCompiling code...\n
-wsimport.ILLEGAL_TARGET_VERSION = \
- "{0}" is not a valid target version. "2.0" and "2.1" are supported.
-
-wsimport.ILLEGAL_AUTH_INFO = \
- "{0}" is not a valid authorization information format. The format is http[s]://user:password@host:port//<url-path>.
-
-wsimport.ILLEGAL_PROXY = \
- "{0}" is not a valid proxy format. The format is [user[:password]@]proxyHost:proxyPort
-
-wsimport.readingAuthFile = \
- Trying to read authorization file : "{0}"...
-
-# {0} - path to current authorization file, {1} - path to metro authorization file
-wsimport.authFileNotFound = \
- Authorization file "{0}" not found. If the WSDL access needs Basic Authentication, please provide authorization file with read access at {1} or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//<url-path>
-
-# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//
-wsimport.authInfoNeeded = \
- {0}, "{1}" needs authorization, please provide authorization file with read access at {2} or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//<url-path>
-
-wsimport.AUTH_INFO_LINENO = \
- "line {0} of {1}
-
-
-wsimport.ErrorMessage = \
- [ERROR] {0}
-
-wsimport.WarningMessage = \
- [WARNING] {0}
-
-wsimport.InfoMessage = \
- [INFO] {0}
-
-wsimport.DebugMessage = \
- [DEBUG] {0}
-
-wsimport.httpRedirect = \
- Server returned HTTP Status code: "{0}", retrying with "{1}"
-
-wsimport.maxRedirectAttempt = \
- Can not get a WSDL maximum number of redirects(5) reached
-
-wsimport.wsdllocation.clientjar = \
- wsdlLocation cannot be specified when using clientJar option
-# {0} - path to a zip file
-wsimport.archivingArtifacts=\nArchiving the generated artifacts into {0}.\n
-wsimport.archiveArtifact=Adding {0} to the archive {1}
-wsimport.fetchingMetadata=\nDownloading the WSDL and associated metadata\n
-# {0} - URI, {1} - path to a file
-wsimport.document.download=\nDownloading metadata document from {0} to {1}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_de.properties
deleted file mode 100644
index 295d947a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_de.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wsimport.usage=Verwendung: {0} [options] <WSDL_URI>\n\nMit "wsimport -help" k\u00f6nnen Sie eine detaillierte Beschreibung von Optionen aufrufen.
-
-wsimport.help=\nVerwendung: {0} [options] <WSDL_URI>\n\n\\wobei [options] Folgendes umfassen:\n\\ -b <path> Gibt jaxws/jaxb-Binding-Dateien oder zus\u00e4tzliche Schemas an\n\\ (Jeder <path> muss seinen eigenen Switch -b enthalten)\n\\ -B<jaxbOption> \u00dcbergibt diese Option an den JAXB-Schemacompiler\n\\ -catalog <file> Gibt Katalogdatei zur L\u00f6sung externer Entity-Referenzen an\n\\ Unterst\u00fctzt das TR9401-, XCatalog- und OASIS XML-Katalogformat.\n\\ -d <directory> Gibt an, wo die generierten Ausgabedateien gespeichert werden sollen\n\\ -encoding <encoding> Gibt die Zeichencodierung an, die von Quelldateien verwendet wird\n\\ -extension L\u00e4sst Herstellererweiterungen zu - Funktionalit\u00e4t durch Spezifikation\n\\ nicht angegeben. Die Verwendung von Erweiterungen kann\n\\ zu nicht portierbaren Anwendungen\n\\ oder Anwendungen f\u00fchren, die nicht mit anderen Implementierungen zusammenarbeiten\n\\ -help Zeigt einen Hilfetext an\n\\ -httpproxy:<host>:<port> Gibt einen HTTP-Proxyserver an (Standardport ist 8080)\n\\ -keep Beh\u00e4lt generierte Dateien bei\n\\ -p <pkg> Gibt das Zielpackage an\n\\ -quiet Unterdr\u00fcckt die wsimport-Ausgabe\n\\ -s <directory> Gibt an, wo die generierten Quelldateien gespeichert werden sollen\n\\ -target <version> Generiert Code gem\u00e4\u00df der angegebenen JAXWS-Spezifikationsversion\n\\ Standardversion ist 2.2, akzeptierte Werte sind 2.0, 2.1 und 2.2\n\\ Beispiel: 2.0 generiert konformen Code f\u00fcr JAXWS 2.0-Spezifikation\n\\ -verbose Ausgabemeldungen zur Funktion, die der Compiler ausf\u00fchrt\n\\ -version Druckt Versionsinformationen\n\\ -wsdllocation <location> @WebServiceClient.wsdlLocation-Wert\n\\ -clientjar <jarfile> Erstellt die .jar-Datei der generierten Artefakte zusammen mit den\n\\ WSDL -Metadaten, die f\u00fcr den Aufruf des Webservice erforderlich sind.\n\\ -generateJWS Generierte verk\u00fcrzte JWS-Implementierungsdatei\n\\ -implDestDir <directory> Gibt an, wo die JWS-Implementierungsdatei generiert werden soll\n\\ -implServiceName <name> Lokaler Teil des Servicenamens f\u00fcr die generierte JWS-Implementierung\n\\ -implPortName <name> Lokaler Teil des Portnamens f\u00fcr die generierte JWS-Implementierung
-
-wsimport.usage.extensions=\n\\Erweiterungen:\n\\ -XadditionalHeaders Ordnet Header, die nicht an Anforderungs- oder Antwortnachricht gebunden sind, \n\\ Java-Methodenparametern zu\n\\ -Xauthfile Datei mit Autorisierungsinformationen im Format \n\\ http://username:password@example.org/stock?wsdl\n\\ -Xdebug Druckt Debuginformationen\n\\ -Xno-addressing-databinding Aktiviert das Binding von W3C EndpointReferenceType mit Java\n\\ -Xnocompile Kompiliert generierte Java-Dateien nicht\n\\ -XdisableAuthenticator Deaktiviert Authentikator, der von JAX-WS RI verwendet wird,\n\\ -Xauthfile-Option wird ignoriert, wenn festgelegt\n\\ -XdisableSSLHostnameVerification deaktiviert die Pr\u00fcfung des SSL-Hostnamens beim Abruf von\n\\ wsdls
-
-
-wsimport.usage.examples=\n\\Beispiele:\n\\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\\ wsimport -d generated http://example.org/stock?wsdl\n
-
-wsgen.usage=Verwendung: {0} [options] <SEI>\n\nMit "wsgen -help" k\u00f6nnen Sie eine detaillierte Beschreibung von Optionen aufrufen.
-
-wsgen.help=\nVerwendung: {0} [options] <SEI>\n\n\\wobei [options] Folgendes umfassen:\n\\ -classpath <path> Gibt an, wo die Eingabeklassendateien gespeichert sind\n\\ -cp <path> wie -classpath <path>\n\\ -d <directory> Gibt an, wo die generierten Ausgabedateien gespeichert werden sollen\n\\ -encoding <encoding> Gibt die von Quelldateien verwendete Zeichencodierung an\n\\ -extension L\u00e4sst Herstellererweiterungen zu - Funktionalit\u00e4t nicht\n\\ von der Spezifikation angegeben. Die Verwendung von Erweiterungen kann\n\\ zu Anwendungen f\u00fchren, die nicht portierbar sind, oder zu\n\\ Anwendungen, die nicht mit anderen Implementierungen zusammenarbeiten\n\\ -help Zeigt einen Hilfetext an\n\\ -keep Beh\u00e4lt generierte Dateien bei\n\\ -r <directory> Ressourcenzielverzeichnis, gibt an, wo\n\\ Ressourcendateien gespeichert werden, wie WSDL-Dateien\n\\ -s <directory> Gibt an, wo die generierten Quelldateien gespeichert werden\n\\ -verbose Ausgabemeldungen zur gerade ausgef\u00fchrten Funktion des Compilers\n\\ -version Druckt Versionsinformationen\n\\ -wsdl[:protocol] Generiert eine WSDL-Datei. Das Protokoll ist optional.\n\\ G\u00fcltige Protokolle sind {1},\n\\ Das Standardprotokoll ist soap1.1.\n\\ Die Nicht-Standardprotokolle {2}\n\\ k\u00f6nnen nur in Verbindung mit der \n\\ Option "-extension" verwendet werden.\n\\ -inlineSchemas Inline-Schemas in der generierten wsdl. M\u00fcssen in\n\\ Verbindung mit der Option "-wsdl" verwendet werden.\n\\ -servicename <name> Gibt den Servicenamen an, der in der generierten WSDL verwendet werden soll\n\\ Wird in Verbindung mit der Option "-wsdl" verwendet.\n\\ -portname <name> Gibt den Portnamen zur Verwendung in der generierten WSDL an\n\\ Wird in Verbindung mit der Option "-wsdl" verwendet.
-
-
-wsgen.usage.examples=\n\\Beispiele:\n\\ wsgen -cp . example.Stock\n\\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
-wrapperTask.needEndorsed=Sie arbeiten mit JDK6, das mit JAX-WS {0}-API geliefert wird, dieses Tool erfordert jedoch JAX-WS {1}-API. Verwenden Sie das "Endorsed Standards Override Mechanism"-Verfahren (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), oder setzen Sie xendorsed="true" in <{2}>.
-
-# {0}, {2} - version (e.g. 2.1), {1} - absolute class location
-wrapperTask.loadingIncorrectApi=Sie laden JAX-WS {0}-API aus {1}, dieses Tool erfordert jedoch JAX-WS {2}-API.
-
-invoker.needEndorsed=Sie arbeiten mit JDK6, das mit JAX-WS {0}-API geliefert wird, dieses Tool erfordert jedoch JAX-WS {1}-API. Verwenden Sie das "Endorsed Standards Override Mechanism"-Verfahren (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), oder verwenden Sie die Option "-Xendorsed".
-
-
-#
-# Generic Messages
-#
-wscompile.invalidOption=unbekannter Parameter {0}
-wsimport.noSuchJaxbOption=keine derartige JAXB-Option: {0}
-
-wscompile.error=Fehler: {0}
-wscompile.warning=Warnung: {0}
-wscompile.info=Informationen: {0}
-wscompile.duplicateOption=doppelte Option: {0}
-wscompile.noSuchDirectory=Verzeichnis nicht gefunden: {0}
-# wscompile.missingOptionArgument
-wscompile.missingOptionArgument=Option "{0}" erfordert ein Argument.
-wscompile.compilationFailed=Kompilierung nicht erfolgreich, Fehler sollten gemeldet worden sein
-wscompile.unsupportedEncoding=nicht unterst\u00fctzte Codierung: {0}
-
-wsimport.missingFile=WSDL_URI fehlt
-
-wsgen.invalid.protocol=\"{0}\" ist kein unterst\u00fctztes Protokoll. Unterst\u00fctzte Protokolle umfassen: {1}.
-wsgen.invalid.transport=\"{0}\" ist kein unterst\u00fctzter Transport. Unterst\u00fctzte Transporte umfassen: {1}.
-wsgen.class.not.found=Klasse nicht gefunden: "{0}"
-wsgen.could.not.create.file=Datei konnte nicht erstellt werden: "{0}"
-wsgen.missingFile=SEI fehlt
-wsgen.soap12.without.extension=Das optionale Protokoll \"Xsoap1.2\" muss in Verbindung mit der Option \"-extension\" verwendet werden.
-wsgen.protocol.without.extension=Das optionale Protokoll \"{0}\" muss in Verbindung mit der Option \"-extension\" verwendet werden.
-wsgen.wsdl.arg.no.genwsdl=Die Option \"{0}\" kann nur in Verbindung mit der Option "-wsdl" verwendet werden.
-wsgen.servicename.missing.namespace=Im Servicenamen \\"{0}\\" fehlt ein Namespace.
-wsgen.servicename.missing.localname=Im Servicenamen \\"{0}\\" fehlt ein lokaler Name.
-wsgen.portname.missing.namespace=Im Portnamen \\"{0}\\" fehlt ein Namespace.
-wsgen.portname.missing.localname=Im Portnamen \\"{0}\\" fehlt ein lokaler Name.
-wsgen.class.must.be.implementation.class=Die Klasse \\"{0}\\" ist keine End Point-Implementierungsklasse.
-wsimport.NotAFileNorURL = "{0}" ist weder ein Dateiname noch eine URL
-
-wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen kann WSDL f\u00fcr Nicht-SOAP-Binding nicht generieren: {0} in Klasse {1}
-
-wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen kann WSDL f\u00fcr SOAP 1.2-Binding nicht generieren: {0} in Klasse {1}
-Please geben Sie die Switches \\"-extension\\" und \\"-wsdl:protocol XSoap1.2\\" an. Beispiel:\n\n
-wsgen -wsdl:protocol XSoap1.2 -extension {1}
-wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\" muss in Verbindung mit der Option \"-wsdl\" verwendet werden
-
-wsgen.no.webservices.class=wsgen hat keine Klasse mit @WebService-Annotation gefunden. Geben Sie @WebService-Annotation in {0} an.
-
-wsimport.no.wsdl=Schemadokument {0} konnte nicht gelesen werden, da 1) das Dokument nicht gefunden werden konnte; 2) das Dokument nicht gelesen werden konnte; 3) das Root-Element des Dokuments nicht <wsdl:definitions> ist.
-
-wsimport.FailedToParse = Parsen von "{0}" nicht m\u00f6glich: {1}
-
-wsimport.ParsingWSDL=WSDL wird geparst ...\n\n
-wsimport.GeneratingCode=\nCode wird generiert ...\n
-wsimport.CompilingCode=\nCode wird kompiliert ...\n
-wsimport.ILLEGAL_TARGET_VERSION = "{0}" ist keine g\u00fcltige Zielversion. "2.0" und "2.1" werden unterst\u00fctzt.
-
-wsimport.ILLEGAL_AUTH_INFO = "{0}" ist kein g\u00fcltiges Format f\u00fcr Autorisierungsinformationen. Das Format ist http[s]://user:password@host:port//<url-path>.
-
-wsimport.readingAuthFile = Es wird versucht, die Autorisierungsdatei zu lesen: "{0}" ...
-
-# {0} - path to current authorization file, {1} - path to metro authorization file
-wsimport.authFileNotFound = Autorisierungsdatei "{0}" nicht gefunden. Wenn f\u00fcr den WSDL-Zugriff die Basisauthentifizierung erforderlich ist, geben Sie eine Autorisierungsdatei mit Lesezugriff in {1} an oder verwenden -Xauthfile, um die Autorisierungsdatei anzugeben. Geben Sie auf jeder Zeile Autorisierungsinformationen mit folgendem Format an: http[s]://user:password@host:port//<url-path>
-
-# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//
-wsimport.authInfoNeeded = {0}, "{1}" erfordert Autorisierung. Geben Sie eine Autorisierungsdatei mit Lesezugriff in {2} an, oder verwenden Sie -Xauthfile, um die Autorisierungsdatei anzugeben. Geben Sie auf jeder Zeile Autorisierungsinformationen mit folgendem Format an: http[s]://user:password@host:port//<url-path>
-
-wsimport.AUTH_INFO_LINENO = "Zeile {0} von {1}
-
-
-wsimport.ErrorMessage = [ERROR] {0}
-
-wsimport.WarningMessage = [WARNING] {0}
-
-wsimport.InfoMessage = [INFO] {0}
-
-wsimport.DebugMessage = [DEBUG] {0}
-
-wsimport.httpRedirect = Server hat HTTP-Statuscode zur\u00fcckgegeben: "{0}", Vorgang wird mit "{1}" wiederholt
-
-wsimport.maxRedirectAttempt = Eine WSDL kann nicht abgerufen werden. die H\u00f6chstanzahl von Umleitungen (5) ist erreicht
-
-wsimport.wsdllocation.clientjar = wsdlLocation kann bei Verwendung der Option "clientJar" nicht angegeben werden
-# {0} - path to a zip file
-wsimport.archivingArtifacts=\nDie generierten Artefakte werden in {0} archiviert.\n
-wsimport.archiveArtifact={0} wird dem Archiv {1} hinzugef\u00fcgt
-wsimport.fetchingMetadata=\nDie WSDL und die zugeh\u00f6rigen Metadaten werden heruntergeladen\n
-# {0} - URI, {1} - path to a file
-wsimport.document.download=\nMetadatendokument wird aus {0} in {1} heruntergeladen
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_es.properties
deleted file mode 100644
index 878ed185..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_es.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wsimport.usage=Sintaxis: {0} [options] <WSDL_URI>\n\nUtilice "wsimport -help" para obtener una descripci\u00f3n detallada de las opciones.
-
-wsimport.help=\nSintaxis: {0} [options] <WSDL_URI>\n\n\\donde [options] incluye:\n\\ -b <ruta de acceso> especifica archivos de enlace jaxws/jaxb o esquemas adicionales\n\\ (Cada <ruta de acceso> debe tener su propio -b)\n\\ -B<Opci\u00f3njaxb> Transfiere esta opci\u00f3n al compilador de esquemas JAXB\n\\ -catalog <archivo> especifica un archivo de cat\u00e1logo para resolver las referencias a entidad externa\n\\ soporta TR9401, XCatalog y el formato de cat\u00e1logo OASIS XML.\n\\ -d <directorio> especifica d\u00f3nde se colocan los archivos de salida generados\n\\ -encoding <codificaci\u00f3n> especifica la codificaci\u00f3n de caracteres que utilizan los archivos de origen\n\\ -extension permite extensiones de proveedor - funcionalidad no especificada\n\\ en la especificaci\u00f3n. El uso de extensiones puede\n\\ dar lugar a aplicaciones que no son portables o\n\\ que no funcionan con otras implantaciones\n\\ -help muestra la ayuda\n\\ -httpproxy:<host>:<puerto> especifica un servidor proxy HTTP (el puerto por defecto es 8080)\n\\ -keep mantiene los archivos generados\n\\ -p <paquete> especifica el paquete de destino\n\\ -quiet suprime la salida de wsimport\n\\ -s <directorio> especifica d\u00f3nde se colocan los archivos de origen generados\n\\ -target <versi\u00f3n> genera c\u00f3digo de acuerdo con la versi\u00f3n de la especificaci\u00f3n JAXWS indicada\n\\ El valor por defecto es 2.2; los valores aceptados son 2.0, 2.1 y 2.2\n\\ por ejemplo, 2.0 generar\u00e1 c\u00f3digo compatible con la especificaci\u00f3n JAX-WS 2.0\n\\ -verbose env\u00eda mensajes acerca de lo que est\u00e1 haciendo el compilador\n\\ -version imprime la informaci\u00f3n de versi\u00f3n\n\\ -wsdllocation <ubicaci\u00f3n> valor de @WebServiceClient.wsdlLocation\n\\ -clientjar <archivo jar> crea el archivo jar de los artefactos generados junto con los\n\\ metadatos WSDL necesarios para llamar al servicio web.\n\\ -generateJWS genera un archivo de implantaci\u00f3n JWS con stub\n\\ -implDestDir <directorio> especifica d\u00f3nde se genera el archivo de implantaci\u00f3n JWS\n\\ -implServiceName <nombre> parte local del nombre de servicio de la implantaci\u00f3n de JWS generada\n\\ -implPortName <nombre> parte local del nombre de puerto de la implantaci\u00f3n de JWS generada
-
-wsimport.usage.extensions=\n\\Extensiones:\n\\ -XadditionalHeaders asigna cabeceras no enlazadas a la solicitud o el mensaje de respuesta a los \n\\ par\u00e1metros del m\u00e9todo Java\n\\ -Xauthfile archivo que lleva la informaci\u00f3n de autorizaci\u00f3n en el formato \n\\ http://username:password@example.org/stock?wsdl\n\\ -Xdebug imprime la informaci\u00f3n de depuraci\u00f3n\n\\ -Xno-addressing-databinding permite el enlace de W3C EndpointReferenceType a Java\n\\ -Xnocompile no compila los archivos Java generados\n\\ -XdisableAuthenticator desactiva el autenticador utilizado por la implantaci\u00f3n de referencia de JAX-WS,\n\\ la opci\u00f3n -Xauthfile se ignora si est\u00e1 definida\n\\ -XdisableSSLHostnameVerification desactiva la verificaci\u00f3n del nombre de host SSL al recuperar\n\\ wsdls
-
-
-wsimport.usage.examples=\n\\Ejemplos:\n\\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\\ wsimport -d genera http://example.org/stock?wsdl\n
-
-wsgen.usage=Sintaxis: {0} [options] <SEI>\n\nUtilice "wsgen -help" para obtener una descripci\u00f3n detallada de las opciones.
-
-wsgen.help=\nSintaxis: {0} [options] <SEI>\n\n\\donde [options] incluye:\n\\ -classpath <ruta de acceso> especifica d\u00f3nde se encuentran los archivos de clase de entrada\n\\ -cp <ruta de acceso> igual que -classpath <ruta de acceso>\n\\ -d <directorio> especifica d\u00f3nde se colocan los archivos de salida generados\n\\ -encoding <codificaci\u00f3n> especifica la codificaci\u00f3n de caracteres que utilizan los archivos de origen\n\\ -extension permite extensiones de proveedor - funcionalidad no especificada\n\\ en la especificaci\u00f3n. El uso de extensiones\n\\ puede dar lugar a aplicaciones que no son portables o\n\\ que no funcionan con otras implantaciones\n\\ -help muestra la ayuda\n\\ -keep mantiene archivos generados\n\\ -r <directorio> directorio de destino de recursos; especifica d\u00f3nde se\n\\ colocan archivos de recursos como los WSDL\n\\ -s <directorio> especifica d\u00f3nde se colocan los archivos de origen generados\n\\ -verbose env\u00eda mensajes acerca de lo que est\u00e1 haciendo el compilador\n\\ -version imprime la informaci\u00f3n de versi\u00f3n\n\\ -wsdl[:protocol] genera un archivo WSDL. El protocolo es opcional.\n\\ Los protocolos v\u00e1lidos son {1},\n\\ el protocolo por defecto es soap1.1.\n\\ Los protocolos no est\u00e1ndar {2}\n\\ s\u00f3lo se pueden utilizar junto con la opci\u00f3n\n\\ -extension.\n\\ -inlineSchemas esquemas en l\u00ednea en el WSDL generado. Se deben\n\\ utilizar junto con la opci\u00f3n -wsdl.\n\\ -servicename <nombre> especifica el nombre de servicio que se va a utilizar en el WSDL generado\n\\ Se utiliza junto con la opci\u00f3n -wsdl.\n\\ -portname <nombre> especifica el nombre de puerto que se va a utilizar en el WSDL generado\n\\ Se utiliza junto con la opci\u00f3n -wsdl.
-
-
-wsgen.usage.examples=\n\\Ejemplos:\n\\ wsgen -cp . example.Stock\n\\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
-wrapperTask.needEndorsed=Est\u00e1 utilizando JDK6, que incluye la API JAX-WS {0}, pero esta herramienta necesita la API JAX-WS {1}. Utilice el mecanismo de sustituci\u00f3n de los est\u00e1ndares aprobados (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), o defina xendorsed="true" en <{2}>.
-
-# {0}, {2} - version (e.g. 2.1), {1} - absolute class location
-wrapperTask.loadingIncorrectApi=Est\u00e1 cargando la API JAX-WS {0} desde {1}, pero esta herramienta necesita la API JAX-WS {2}.
-
-invoker.needEndorsed=Est\u00e1 utilizando JDK6, que incluye la API JAX-WS {0}, pero esta herramienta necesita la API JAX-WS {1}. Utilice el mecanismo de sustituci\u00f3n de los est\u00e1ndares aprobados (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), o utilice la opci\u00f3n -Xendorsed.
-
-
-#
-# Generic Messages
-#
-wscompile.invalidOption=par\u00e1metro {0} no reconocido
-wsimport.noSuchJaxbOption=no existe esa opci\u00f3n JAXB: {0}
-
-wscompile.error=error: {0}
-wscompile.warning=advertencia: {0}
-wscompile.info=informaci\u00f3n: {0}
-wscompile.duplicateOption=opci\u00f3n duplicada: {0}
-wscompile.noSuchDirectory=no se ha encontrado el directorio: {0}
-# wscompile.missingOptionArgument
-wscompile.missingOptionArgument=la opci\u00f3n \"{0}\" necesita un argumento
-wscompile.compilationFailed=fallo de compilaci\u00f3n; se ha debido informar de los errores
-wscompile.unsupportedEncoding=codificaci\u00f3n no soportada: {0}
-
-wsimport.missingFile=Falta WSDL_URI
-
-wsgen.invalid.protocol=\"{0}\" no es un protocolo soportado. Los protocolos soportados son: {1}.
-wsgen.invalid.transport=\"{0}\" no es un transporte soportado. El transporte soportado es: {1}.
-wsgen.class.not.found=No se ha encontrado la clase: \"{0}\"
-wsgen.could.not.create.file="No se ha podido crear el archivo: "\\{0}\"
-wsgen.missingFile=Falta la interfaz de punto final de servicio
-wsgen.soap12.without.extension=El protocolo opcional \\"Xsoap1.2\\" se debe utilizar junto con la opci\u00f3n \\"-extension\\".
-wsgen.protocol.without.extension=El protocolo opcional \"{0}\" se debe utilizar junto con la opci\u00f3n \"-extension\".
-wsgen.wsdl.arg.no.genwsdl=La opci\u00f3n \\"{0}\\" s\u00f3lo se puede utilizar junto con la opci\u00f3n "-wsdl".
-wsgen.servicename.missing.namespace=Al nombre del servicio \\"{0}\\" le falta un espacio de nombres.
-wsgen.servicename.missing.localname=Al nombre del servicio \\"{0}\\" le falta un nombre local.
-wsgen.portname.missing.namespace=Al nombre del puerto \"{0}\" le falta un espacio de nombres.
-wsgen.portname.missing.localname=Al nombre del puerto \"{0}\" le falta un nombre local.
-wsgen.class.must.be.implementation.class=La clase \"{0}\" no es una clase de implantaci\u00f3n de punto final.
-wsimport.NotAFileNorURL = "{0}" no es un nombre de archivo ni una URL
-
-wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen no puede generar WSDL para enlaces no SOAP: {0} en la clase {1}
-
-wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen no puede generar WSDL para enlaces SOAP 1.2: {0} en la clase {1}.\n
-Please especifique los conmutadores \\"-extension\\" y \\"-wsdl:protocol XSoap1.2\\". Por ejemplo:\n\n
-wsgen -wsdl:protocol XSoap1.2 -extenson {1}
-wsgen.inlineSchemas.only.with.wsdl=\\"-inlineSchemas\\" se debe utilizar junto con la opci\u00f3n \\"-wsdl\\"
-
-wsgen.no.webservices.class=wsgen no ha encontrado ninguna clase con la anotaci\u00f3n @WebService. Especifique la anotaci\u00f3n @WebService en {0}.
-
-wsimport.no.wsdl=Fallo al leer el documento WSDL: {0}, porque 1) no se ha encontrado el documento, /2) el documento no se ha podido leer; 3) el elemento ra\u00edz del documento no es <wsdl:definitions>.
-
-wsimport.FailedToParse = Fallo al analizar "{0}": {1}
-
-wsimport.ParsingWSDL=analizando WSDL...\n\n
-wsimport.GeneratingCode=\nGenerando c\u00f3digo...\n
-wsimport.CompilingCode=\nCompilando c\u00f3digo...\n
-wsimport.ILLEGAL_TARGET_VERSION = "{0}" no es una versi\u00f3n de destino v\u00e1lida. "2.0" y "2.1" est\u00e1n soportadas.
-
-wsimport.ILLEGAL_AUTH_INFO = "{0}" no es un formato de informaci\u00f3n de autorizaci\u00f3n v\u00e1lido. El formato es http[s]://usuario:contrase\u00f1a@host:puerto//<url-ruta de acceso>.
-
-wsimport.readingAuthFile = Intentando leer el archivo de autorizaci\u00f3n: "{0}"...
-
-# {0} - path to current authorization file, {1} - path to metro authorization file
-wsimport.authFileNotFound = No se ha encontrado el archivo de autorizaci\u00f3n "{0}". Si el acceso WSDL necesita autenticaci\u00f3n b\u00e1sica, proporcione un archivo de autorizaci\u00f3n con acceso de lectura en {1} o utilice -Xauthfile para proporcionar el archivo de autorizaci\u00f3n y, en cada l\u00ednea, proporcione la informaci\u00f3n de autorizaci\u00f3n utilizando este formato: http[s]://usuario:contrase\u00f1a@host:puerto//<url-ruta de acceso>
-
-# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//
-wsimport.authInfoNeeded = {0}, "{1}" necesita autorizaci\u00f3n. Proporcione un archivo de autorizaci\u00f3n con acceso de lectura en {2} o utilice -Xauthfile para proporcionar el archivo de autorizaci\u00f3n y, en cada l\u00ednea, proporcione la informaci\u00f3n de autorizaci\u00f3n utilizando este formato: http[s]://usuario:contrase\u00f1a@host:puerto//<url-ruta de acceso>
-
-wsimport.AUTH_INFO_LINENO = "l\u00ednea {0} de {1}
-
-
-wsimport.ErrorMessage = [ERROR] {0}
-
-wsimport.WarningMessage = [WARNING] {0}
-
-wsimport.InfoMessage = [INFO] {0}
-
-wsimport.DebugMessage = [DEBUG] {0}
-
-wsimport.httpRedirect = El servidor ha devuelto el c\u00f3digo de estado HTTP: "{0}"; reintentando con "{1}"
-
-wsimport.maxRedirectAttempt = No se puede obtener un WSDL. Se ha alcanzado el n\u00famero m\u00e1ximo de redireccionamientos (5).
-
-wsimport.wsdllocation.clientjar = wsdlLocation no se puede especificar al utilizar la opci\u00f3n clientJar
-# {0} - path to a zip file
-wsimport.archivingArtifacts=\nArchivando los artefactos generados en {0}.\n
-wsimport.archiveArtifact=Agregando {0} al archivo {1}
-wsimport.fetchingMetadata=\nDescargando el WSDL y los metadatos asociados\n
-# {0} - URI, {1} - path to a file
-wsimport.document.download=\nDescargando el documento de metadatos desde {0} en {1}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_fr.properties
deleted file mode 100644
index 79168a80..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_fr.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wsimport.usage=Syntaxe : {0} [options] <WSDL_URI>\n\nUtilisez "wsimport -help" pour obtenir une description d\u00e9taill\u00e9e des options.
-
-wsimport.help=\nSyntaxe : {0} [options] <WSDL_URI>\n\n\\o\u00f9 [options] incluent :\n\ -b <path> indiquez les fichiers de binding jaxws/jaxb ou des sch\u00e9mas suppl\u00e9mentaires\n\ (Chaque \u00e9l\u00e9ment <path> doit avoir sa propre option -b)\n\ -B<jaxbOption> Transmettez cette option au compilateur de sch\u00e9mas JAXB\n\ -catalog <file> indiquez le fichier de catalogue pour r\u00e9soudre les r\u00e9f\u00e9rences d''entit\u00e9 externes\n\ prend en charge le format de catalogue TR9401, XCatalog et OASIS XML.\n\ -d <directory> indiquez o\u00f9 placer les fichiers de sortie g\u00e9n\u00e9r\u00e9s\n\ -encoding <encoding> indiquez l''encodage de caract\u00e8res utilis\u00e9s pour les fichiers source\n\ -extension autorisez les extensions fournisseur - fonctionnalit\u00e9 non indiqu\u00e9e\n\ par la sp\u00e9cification. L''utilisation d''extensions peut\n\ aboutir \u00e0 des applications non portables ou\n\ ne pouvant peut-\u00eatre pas interagir avec d''autres impl\u00e9mentations\n\ -help affichez l''aide\n\ -httpproxy:<host>:<port> indiquez un serveur proxy HTTP (ports 8080 par d\u00e9faut)\n\ -keep conservez les fichiers g\u00e9n\u00e9r\u00e9s\n\ -p <pkg> indiquez le package cible\n\ -quiet supprimez la sortie wsimport\n\ -s <directory> indiquez o\u00f9 placer les fichiers source g\u00e9n\u00e9r\u00e9s\n\ -target <version> g\u00e9n\u00e9rez le code conform\u00e9ment \u00e0 la version de sp\u00e9cification JAXWS indiqu\u00e9e\n\ la valeur par d\u00e9faut est 2.2, les valeurs accept\u00e9es sont 2.0, 2.1 et 2.2\n\ ex. : 2.0 g\u00e9n\u00e8rera un code conforme \u00e0 la sp\u00e9cification JAXWS 2.0\n\ -verbose messages de sortie concernant les actions du compilateur\n\ -version imprimez les informations de version\n\ -wsdllocation <location> valeur @WebServiceClient.wsdlLocation\n\ -clientjar <jarfile> Cr\u00e9e le fichier JAR des artefacts g\u00e9n\u00e9r\u00e9s ainsi que les\n\ m\u00e9tadonn\u00e9es WSDL requises pour l''appel du service Web.\n\ -generateJWS g\u00e9n\u00e9rez le fichier d''impl\u00e9mentation JWS stub\n\ -implDestDir <directory> indiquez o\u00f9 g\u00e9n\u00e9rer le fichier d''impl\u00e9mentation JWS\n\ -implServiceName <name> partie locale du nom de service pour l''impl\u00e9mentation JWS g\u00e9n\u00e9r\u00e9e\n\ -implPortName <name> partie locale du nom de port pour l''impl\u00e9mentation JWS g\u00e9n\u00e9r\u00e9e
-
-wsimport.usage.extensions=\n\\Extensions :\n\ -XadditionalHeaders mappez les en-t\u00eates non li\u00e9s au message de demande ou de r\u00e9ponse \u00e0 des \n\ param\u00e8tres de m\u00e9thode Java\n\ -Xauthfile fichier permettant de transporter les informations d'autorisation au format \n\ http://username:password@example.org/stock?wsdl\n\ -Xdebug imprimez les informations de d\u00e9bogage\n\ -Xno-addressing-databinding activez le binding de W3C EndpointReferenceType \u00e0 Java\n\ -Xnocompile ne compilez pas les fichiers Java g\u00e9n\u00e9r\u00e9s\n\ -XdisableAuthenticator d\u00e9sactivez l'authentificateur utilis\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JAX-WS,\n\ l'option -Xauthfile ne sera pas prise en compte si elle est d\u00e9finie\n\ -XdisableSSLHostnameVerification d\u00e9sactivez la v\u00e9rification du nom d'h\u00f4te SSL lors de l'extraction\n\ wsdls
-
-
-wsimport.usage.examples=\n\\Exemples :\n\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ wsimport -d a g\u00e9n\u00e9r\u00e9 http://example.org/stock?wsdl\n
-
-wsgen.usage=Syntaxe : {0} [options] <SEI>\n\nUtilisez "wsgen -help" pour obtenir une description d\u00e9taill\u00e9e des options.
-
-wsgen.help=\nSyntaxe : {0} [options] <SEI>\n\n\\o\u00f9 [options] incluent :\n\ -classpath <path> indiquez o\u00f9 trouver les fichiers de classe d''entr\u00e9e\n\ -cp <path> identique \u00e0 -classpath <path>\n\ -d <directory> indiquez o\u00f9 placer les fichiers de sortie g\u00e9n\u00e9r\u00e9s\n\ -encoding <encoding> indiquez l''encodage de caract\u00e8res utilis\u00e9 par les fichiers source\n\ -extension autorisez les extensions fournisseur - fonctionnalit\u00e9 non indiqu\u00e9e\n\ par la sp\u00e9cification. L''utilisation des extensions peut\n\ aboutir \u00e0 des applications non portables ou\n\ ne pouvant peut-\u00eatre pas interagir avec d''autres impl\u00e9mentations\n\ -help affichez l''aide\n\ -keep conservez les fichiers g\u00e9n\u00e9r\u00e9s\n\ -r <directory> r\u00e9pertoire de destination des ressources, indiquez o\u00f9\n\ placer les fichiers de ressource tels que les WSDL\n\ -s <directory> indiquez o\u00f9 placer les fichiers source g\u00e9n\u00e9r\u00e9s\n\ -verbose messages de sortie concernant les actions du compilateur\n\ -version imprimez les informations de version\n\ -wsdl[:protocol] g\u00e9n\u00e9rez un fichier WSDL. Le protocole est facultatif.\n\ Les protocoles valides sont {1},\n\ le protocole par d\u00e9faut est soap1.1.\n\ Les protocoles non standard {2}\n\ peuvent \u00eatre utilis\u00e9s uniquement avec\n\ l''option -extension.\n\ -inlineSchemas incorporez les sch\u00e9mas dans le WSDL g\u00e9n\u00e9r\u00e9. \n\ Utilis\u00e9 avec l''option -wsdl.\n\ -servicename <name> indiquez le nom de service \u00e0 utiliser dans le WSDL g\u00e9n\u00e9r\u00e9\n\ Utilis\u00e9 avec l''option -wsdl.\n\ -portname <name> indiquez le nom de port \u00e0 utiliser dans le WSDL g\u00e9n\u00e9r\u00e9\n\ Utilis\u00e9 avec l''option -wsdl.
-
-
-wsgen.usage.examples=\n\\Exemples :\n\ wsgen -cp . example.Stock\n\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
-wrapperTask.needEndorsed=Vous ex\u00e9cutez JDK6, qui comporte l''API JAX-WS {0}, mais cet outil exige l''API JAX-WS {1}. Utilisez le m\u00e9canisme Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), ou d\u00e9finissez xendorsed="True" sur <{2}>.
-
-# {0}, {2} - version (e.g. 2.1), {1} - absolute class location
-wrapperTask.loadingIncorrectApi=Vous \u00eates en train de charger l''API JAX-WS {0} \u00e0 partir de {1}, mais cet outil exige l''API JAX-WS {2}.
-
-invoker.needEndorsed=Vous ex\u00e9cutez JDK6, qui comporte l''API JAX-WS {0}, mais cet outil exige l''API JAX-WS {1}. Utilisez le m\u00e9canisme Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), ou utilisez l''option -Xendorsed.
-
-
-#
-# Generic Messages
-#
-wscompile.invalidOption=param\u00e8tre {0} non reconnu
-wsimport.noSuchJaxbOption=aucune option JAXB de ce type : {0}
-
-wscompile.error=erreur : {0}
-wscompile.warning=avertissement : {0}
-wscompile.info=informations : {0}
-wscompile.duplicateOption=option en double : {0}
-wscompile.noSuchDirectory=r\u00e9pertoire introuvable : {0}
-# wscompile.missingOptionArgument
-wscompile.missingOptionArgument=l''option \"{0}\" exige un argument
-wscompile.compilationFailed=\u00e9chec de la compilation, les erreurs auraient d\u00fb \u00eatre signal\u00e9es
-wscompile.unsupportedEncoding=encodage non pris en charge : {0}
-
-wsimport.missingFile=WSDL_URI manquant
-
-wsgen.invalid.protocol=\"{0}\" n''est pas un protocole pris en charge. Les protocoles pris en charge incluent : {1}.
-wsgen.invalid.transport=\"{0}\" n''est pas un transport pris en charge. Les transports pris en charge incluent : {1}.
-wsgen.class.not.found=Classe introuvable : \"{0}\"
-wsgen.could.not.create.file="Impossible de cr\u00e9er le fichier : "\\{0}\"
-wsgen.missingFile=interface d'adresse de service manquante
-wsgen.soap12.without.extension=Le protocole facultatif \"Xsoap1.2\" doit \u00eatre utilis\u00e9 avec l'option \"-extension\".
-wsgen.protocol.without.extension=Le protocole facultatif \"{0}\" doit \u00eatre utilis\u00e9 avec l''option \"-extension\".
-wsgen.wsdl.arg.no.genwsdl=L''option \"{0}\" peut \u00eatre associ\u00e9e uniquement \u00e0 l''option "-wsdl".
-wsgen.servicename.missing.namespace=Un espace de noms est manquant dans le nom de service \"{0}\".
-wsgen.servicename.missing.localname=Un nom local est manquant dans le nom de service \"{0}\".
-wsgen.portname.missing.namespace=Un espace de noms est manquant dans le nom de port \"{0}\".
-wsgen.portname.missing.localname=Un nom local est manquant dans le nom de port \"{0}\".
-wsgen.class.must.be.implementation.class=La classe \"{0}\" n''est pas une classe d''impl\u00e9mentation d''adresse.
-wsimport.NotAFileNorURL = "{0}" n''est pas un nom de fichier ni une URL
-
-wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen ne peut pas g\u00e9n\u00e9rer le WSDL pour le binding non-SOAP {0} sur la classe {1}
-
-wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen ne peut pas g\u00e9n\u00e9rer le WSDL pour le binding SOAP 1.2 {0} sur la classe {1}.\n
-Please indiquez les commutateurs \"-extension\" et \"-wsdl:protocol XSoap1.2\". Par exemple :\n\n
-wsgen -wsdl:protocol XSoap1.2 -extenson {1}
-wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\" doit \u00eatre utilis\u00e9 avec l'option \"-wsdl\"
-
-wsgen.no.webservices.class=wsgen n''a trouv\u00e9 aucune classe avec l''annotation @WebService. Indiquez une annotation @WebService sur {0}.
-
-wsimport.no.wsdl=Echec de la lecture du document WSDL {0} pour les raisons suivantes : 1) Le document est introuvable ; 2) Le document n''a pas pu \u00eatre lu ; 3) L''\u00e9l\u00e9ment racine du document n''est pas <wsdl:definitions>.
-
-wsimport.FailedToParse = Echec de l''analyse de "{0}" : {1}
-
-wsimport.ParsingWSDL=analyse du WSDL...\n\n
-wsimport.GeneratingCode=\nG\u00e9n\u00e9ration du code...\n
-wsimport.CompilingCode=\nCompilation du code...\n
-wsimport.ILLEGAL_TARGET_VERSION = "{0}" n''est pas une version cible valide. Les versions "2.0" et "2.1" sont prises en charge.
-
-wsimport.ILLEGAL_AUTH_INFO = "{0}" n''est pas un format d''informations d''autorisation valide. Le format est http[s]://user:password@host:port//<url-path>.
-
-wsimport.readingAuthFile = Tentative de lecture d''un fichier d''autorisation : "{0}"...
-
-# {0} - path to current authorization file, {1} - path to metro authorization file
-wsimport.authFileNotFound = Fichier d''autorisation "{0}" introuvable. Si l''acc\u00e8s WSDL n\u00e9cessite une authentification de base, fournissez un fichier d''autorisation avec un acc\u00e8s en lecture \u00e0 {1} ou utilisez -Xauthfile pour donner le fichier d''autorisation et fournir sur chaque ligne les informations d''autorisation \u00e0 l''aide du format suivant : http[s]://user:password@host:port//<url-path>
-
-# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//
-wsimport.authInfoNeeded = {0}, "{1}" n\u00e9cessite une autorisation, fournissez un fichier d''autorisation avec un acc\u00e8s en lecture \u00e0 {2} ou utilisez -Xauthfile pour donner le fichier d''autorisation et fournir sur chaque ligne les informations d''autorisation \u00e0 l''aide du format suivant : http[s]://user:password@host:port//<url-path>
-
-wsimport.AUTH_INFO_LINENO = "ligne {0} sur {1}
-
-
-wsimport.ErrorMessage = [ERROR] {0}
-
-wsimport.WarningMessage = [WARNING] {0}
-
-wsimport.InfoMessage = [INFO] {0}
-
-wsimport.DebugMessage = [DEBUG] {0}
-
-wsimport.httpRedirect = Le serveur a renvoy\u00e9 le code de statut HTTP : "{0}", nouvelle tentative avec "{1}"
-
-wsimport.maxRedirectAttempt = Impossible d'obtenir un WSDL, nombre maximal de r\u00e9acheminements (5) atteint
-
-wsimport.wsdllocation.clientjar = wsdlLocation ne peut pas \u00eatre indiqu\u00e9 lors de l'utilisation de l'option clientJar
-# {0} - path to a zip file
-wsimport.archivingArtifacts=\nArchivage des artefacts g\u00e9n\u00e9r\u00e9s dans {0}.\n
-wsimport.archiveArtifact=Ajout de {0} \u00e0 l''archive {1}
-wsimport.fetchingMetadata=\nT\u00e9l\u00e9chargement du WSDL et des m\u00e9tadonn\u00e9es associ\u00e9es\n
-# {0} - URI, {1} - path to a file
-wsimport.document.download=\nT\u00e9l\u00e9chargement du document de m\u00e9tadonn\u00e9es de {0} vers {1}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_it.properties
deleted file mode 100644
index da2372f9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_it.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wsimport.usage=Uso: {0} [options] <WSDL_URI>\n\nUsare "wsimport -help" per una descrizione dettagliata delle opzioni.
-
-wsimport.help=\nUso: {0} [options] <WSDL_URI>\n\n\\dove [options] include:\n\ -b <path> specifica i file di associazione jaxws/jaxb o gli schemi aggiuntivi\n\ (Ogni <path> deve avere un proprio -b)\n\ -B<jaxbOption> passa questa opzione al compilatore dello schema JAXB\n\ -catalog <file> specifica il file di catalogo per risolvere i riferimenti a entit\u00e0 esterne\n\ supporta il formato di catalogo XML TR9401, XCatalog e OASIS.\n\ -d <directory> specifica la posizione dei file di output generati\n\ -encoding <encoding> specifica la codifica dei caratteri usata dai file di origine\n\ -extension consente le estensioni del fornitore - funzionalit\u00e0 non specificata\n\ dalla specifica. L''uso delle estensioni pu\u00f2\n\ produrre applicazioni non portatili o\n\ rendere impossibile l''interoperabilit\u00e0 con altre implementazioni\n\ -help visualizza la Guida\n\ -httpproxy:<host>:<port> specifica un server proxy HTTP (il valore predefinito della porta \u00e8 8080)\n\ -keep conserva i file generati\n\ -p <pkg> specifica il package di destinazione\n\ -quiet elimina l''output wsimport\n\ -s <directory> specifica la posizione dei file di origine generati\n\ -target <version> genera il codice come per la versione della specifica JAXWS fornita\n\ Il valore predefinito \u00e8 2.2. I valori accettati sono 2.0, 2.1 e 2.2\n\ ad esempio, 2.0 genera il codice conforme per la specifica JAXWS 2.0\n\ -verbose messaggi di output relativi alle azioni del compilatore\n\ -version stampa le informazioni sulla versione\n\ -wsdllocation <location> valore @WebServiceClient.wsdlLocation\n\ -clientjar <jarfile> crea il file jar degli artifact generati insieme ai\n\ metadati WSDL richiesti per il richiamo del servizio Web.\n\ -generateJWS genera il file di implementazione JWS stub\n\ -implDestDir <directory> specifica la posizione in cui generare il file di implementazione JWS\n\ -implServiceName <name> parte locale del nome di servizio per l''implementazione JWS generata\n\ -implPortName <name> parte locale del nome di porta per l''implementazione JWS generata
-
-wsimport.usage.extensions=\n\\Estensioni:\n\ -XadditionalHeaders mappa le intestazioni non associate a un messaggio di richiesta o di risposta ai \n\ parametri del metodo Java\n\ -Xauthfile file per trasportare le informazioni di autorizzazione nel formato \n\ http://username:password@example.org/stock?wsdl\n\ -Xdebug stampa le informazioni di debug\n\ -Xno-addressing-databinding abilita l'associazione di EndpointReferenceType W3C a Java\n\ -Xnocompile non compila i file Java generati\n\ -XdisableAuthenticator disabilita l'autenticatore usato da JAX-WS RI,\n\ l'opzione -Xauthfile viene ignorata, se impostata\n\ -XdisableSSLHostnameVerification disabilita la verifica del nome host SSL durante il recupero tramite DETCH dei\n\ wsdl
-
-
-wsimport.usage.examples=\n\\Esempi:\n\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ wsimport -d generated http://example.org/stock?wsdl\n
-
-wsgen.usage=Uso: {0} [options] <SEI>\n\nUsare "wsgen -help" per una descrizione dettagliata delle opzioni.
-
-wsgen.help=\nUso: {0} [options] <SEI>\n\n\\dove [options] include:\n\ -classpath <path> specifica dove trovare i file della classe di input\n\ -cp <path> come per -classpath <path>\n\ -d <directory> specifica la posizione dei file di output generati\n\ -encoding <encoding> specifica la codifica dei caratteri usata dai file di origine\n\ -extension consente le estensioni del fornitore - funzionalit\u00e0 non specificata\n\ dalla specifica. L''uso delle estensioni pu\u00f2\n\ produrre applicazioni non portatili o\n\ rendere impossibile l''interoperabilit\u00e0 con altre implementazioni\n\ -help visualizza la Guida\n\ -keep conserva i file generati\n\ -r <directory> directory di destinazione delle risorse, specifica la\n\ posizione dei file delle risorse, ad esempio WSDL\n\ -s <directory> specifica la posizione dei file di origine generati\n\ -verbose messaggi di output relativi alle azioni del compilatore\n\ -version stampa le informazioni sulla versione\n\ -wsdl[:protocol] genera un file WSDL. Il protocollo \u00e8 opzionale.\n\ I protocolli validi sono {1},\n\ il valore predefinito \u00e8 soap1.1.\n\ I protocolli non standard {2}\n\ possono essere usati solo insieme\n\ all''opzione -extension.\n\ -inlineSchemas schemi in linea nel WSDL generato. Devono essere\n\ usati insieme all''opzione -wsdl.\n\ -servicename <name> specifica il nome del servizio da usare nel WSDL generato\n\ Deve essere usato insieme all''opzione -wsdl.\n\ -portname <name> specifica il nome della porta da usare nel WSDL generato\n\ Deve essere usato insieme all''opzione -wsdl.
-
-
-wsgen.usage.examples=\n\\Esempi:\n\ wsgen -cp . example.Stock\n\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
-wrapperTask.needEndorsed=\u00c8 in corso l''esecuzione su JDK6, fornito con l''API JAX-WS {0} ma questo strumento richiede l''API JAX-WS {1}. Usare il meccanismo Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/) o impostare xendorsed="true" su <{2}>.
-
-# {0}, {2} - version (e.g. 2.1), {1} - absolute class location
-wrapperTask.loadingIncorrectApi=\u00c8 in corso il caricamento dell''API JAX-WS {0} da {1} ma questo strumento richiede l''API JAX-WS {2}.
-
-invoker.needEndorsed=\u00c8 in corso l''esecuzione su JDK6, fornito con l''API JAX-WS {0} ma questo strumento richiede l''API JAX-WS {1}. Usare il meccanismo Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/) o usare l''opzione -Xendorsed.
-
-
-#
-# Generic Messages
-#
-wscompile.invalidOption=parametro non riconosciuto {0}
-wsimport.noSuchJaxbOption=nessuna opzione JAXB: {0}
-
-wscompile.error=errore: {0}
-wscompile.warning=avvertenza: {0}
-wscompile.info=informazioni: {0}
-wscompile.duplicateOption=opzione duplicata: {0}
-wscompile.noSuchDirectory=directory non trovata: {0}
-# wscompile.missingOptionArgument
-wscompile.missingOptionArgument=l''opzione \"{0}\" richiede un argomento
-wscompile.compilationFailed=compilazione non riuscita. Gli errori dovrebbero essere stati segnalati.
-wscompile.unsupportedEncoding=codifica non supportata: {0}
-
-wsimport.missingFile=WSDL_URI mancante
-
-wsgen.invalid.protocol=\"{0}\" non \u00e8 un protocollo supportato. I protocolli supportati includono: {1}.
-wsgen.invalid.transport=\"{0}\" non \u00e8 un trasporto supportato. Il trasporto supportato include: {1}.
-wsgen.class.not.found=Classe non trovata: \"{0}\"
-wsgen.could.not.create.file="Impossibile creare il file: \"{0}\"
-wsgen.missingFile=SEI mancante
-wsgen.soap12.without.extension=Il protocollo opzionale \"Xsoap1.2\" deve essere usato insieme all'opzione \"-extension\".
-wsgen.protocol.without.extension=Il protocollo opzionale \"{0}\" deve essere usato insieme all''opzione \"-extension\".
-wsgen.wsdl.arg.no.genwsdl=L''opzione \"{0}\" pu\u00f2 essere usata solo insieme all''opzione \"-wsdl".
-wsgen.servicename.missing.namespace=Spazio di nomi mancante nel nome di servizio \"{0}\".
-wsgen.servicename.missing.localname=Nome locale mancante nel nome di servizio \"{0}\".
-wsgen.portname.missing.namespace=Spazio di nomi mancante nel nome di porta \"{0}\".
-wsgen.portname.missing.localname=Nome locale mancante nel nome di porta \"{0}\".
-wsgen.class.must.be.implementation.class=La classe \"{0}\" non \u00e8 una classe di implementazione dell''endpoint.
-wsimport.NotAFileNorURL = "{0}" non \u00e8 un nome file n\u00e9 un URL
-
-wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen non pu\u00f2 generare WSDL per un''associazione non SOAP: {0} sulla classe {1}
-
-wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen non pu\u00f2 generare WSDL per un''associazione SOAP 1.2: {0} sulla classe {1}.\n
-Please specificare i parametri \"-extension\" e \"-wsdl:protocol XSoap1.2\". Ad esempio:\n\n
-wsgen -wsdl:protocol XSoap1.2 -extenson {1}
-wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\" deve essere usato insieme all''opzione \"-wsdl\"
-
-wsgen.no.webservices.class=wsgen non ha trovato alcuna classe con l''annotazione @WebService. Specificare l''annotazione @WebService su {0}.
-
-wsimport.no.wsdl=Lettura del documento WSDL: {0} non riuscita perch\u00e9 1) non \u00e8 stato possibile trovare il documento; 2) non \u00e8 stato possibile leggere il documento; 3) l''elemento radice del documento non \u00e8 <wsdl:definitions>.
-
-wsimport.FailedToParse = Analisi di "{0}" non riuscita: {1}
-
-wsimport.ParsingWSDL=analisi di WSDL in corso...\n\n
-wsimport.GeneratingCode=\nGenerazione del codice in corso...\n
-wsimport.CompilingCode=\nCompilazione del codice in corso...\n
-wsimport.ILLEGAL_TARGET_VERSION = "{0}" non \u00e8 una versione di destinazione valida. Sono supportate le versioni "2.0" e "2.1".
-
-wsimport.ILLEGAL_AUTH_INFO = "{0}" non \u00e8 un formato di informazioni di autorizzazione valido. Il formato \u00e8 http[s]://user:password@host:port//<url-path>.
-
-wsimport.readingAuthFile = Tentativo di lettura del file di autorizzazione: "{0}"...
-
-# {0} - path to current authorization file, {1} - path to metro authorization file
-wsimport.authFileNotFound = File di autorizzazione "{0}" non trovato. Se l''accesso WSDL richiede l''autenticazione Basic, fornire il file di autorizzazione con accesso in lettura a {1} oppure usare -Xauthfile per fornire il file di autorizzazione e su ogni riga fornire le informazioni di autorizzazione usando il formato: http[s]://user:password@host:porta//<url-path>
-
-# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//
-wsimport.authInfoNeeded = {0}, "{1}" richiede autorizzazione. Fornire il file di autorizzazione con accesso in lettura a {2} oppure usare -Xauthfile per fornire il file di autorizzazione e su ogni riga fornire le informazioni di autorizzazione usando il formato: http[s]://user:password@host:porta//<url-path>
-
-wsimport.AUTH_INFO_LINENO = "riga {0} di {1}
-
-
-wsimport.ErrorMessage = [ERROR] {0}
-
-wsimport.WarningMessage = [WARNING] {0}
-
-wsimport.InfoMessage = [INFO] {0}
-
-wsimport.DebugMessage = [DEBUG] {0}
-
-wsimport.httpRedirect = Il server ha restituito il codice di stato HTTP: "{0}". Nuovo tentativo con "{1}"
-
-wsimport.maxRedirectAttempt = Impossibile ottenere un WSDL. Numero massimo di reindirizzamenti (5) raggiunto
-
-wsimport.wsdllocation.clientjar = Impossibile specificare wsdlLocation quando viene usata l'opzione clientJar
-# {0} - path to a zip file
-wsimport.archivingArtifacts=\nArchiviazione degli artifact generati in {0}.\n
-wsimport.archiveArtifact=Aggiunta di {0} all''archivio {1}
-wsimport.fetchingMetadata=\nScaricamento di WSDL e dei metadati associati\n
-# {0} - URI, {1} - path to a file
-wsimport.document.download=\nScaricamento del documento dei metadati da {0} a {1}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ja.properties
deleted file mode 100644
index 009b1930..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ja.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wsimport.usage=\u4f7f\u7528\u65b9\u6cd5: {0} [options] <WSDL_URI>\n\n\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8a73\u7d30\u306a\u8aac\u660e\u306b\u306f"wsimport -help"\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002
-
-wsimport.help=\n\u4f7f\u7528\u65b9\u6cd5: {0} [options] <WSDL_URI>\n\n\\[options]\u306b\u306f\u6b21\u306e\u3082\u306e\u304c\u3042\u308a\u307e\u3059:\n\ -b <path> jaxws/jaxb\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u307e\u305f\u306f\u8ffd\u52a0\u30b9\u30ad\u30fc\u30de\u3092\u6307\u5b9a\u3059\u308b\n\ (\u5404<path>\u306b\u306f\u305d\u308c\u305e\u308c-b\u304c\u5fc5\u8981)\n\ -B<jaxbOption> \u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092JAXB\u30b9\u30ad\u30fc\u30de\u30fb\u30b3\u30f3\u30d1\u30a4\u30e9\u306b\u6e21\u3059\n\ -catalog <file> \u5916\u90e8\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u53c2\u7167\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306e\u30ab\u30bf\u30ed\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3059\u308b\n\ TR9401\u3001XCatalog\u304a\u3088\u3073OASIS XML\u30ab\u30bf\u30ed\u30b0\u5f62\u5f0f\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u307e\u3059\u3002\n\ -d <directory> \u751f\u6210\u6e08\u306e\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u306e\u683c\u7d0d\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n\ -encoding <encoding> \u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u3067\u4f7f\u7528\u3055\u308c\u308b\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u6307\u5b9a\u3059\u308b\n\ -extension \u30d9\u30f3\u30c0\u30fc\u306e\u62e1\u5f35\u6a5f\u80fd\u3092\u8a31\u53ef\u3059\u308b - \u6a5f\u80fd\u306f\u4ed5\u69d8\u3067\n\ \u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u62e1\u5f35\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\n\ \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u30dd\u30fc\u30bf\u30d6\u30eb\u3067\u306a\u304f\u306a\u308b\u304b\u3001\n\ \u4ed6\u306e\u5b9f\u88c5\u3068\u306e\u76f8\u4e92\u904b\u7528\u304c\u3067\u304d\u306a\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\n\ -help \u30d8\u30eb\u30d7\u3092\u8868\u793a\u3059\u308b\n\ -httpproxy:<host>:<port> HTTP\u30d7\u30ed\u30ad\u30b7\u30fb\u30b5\u30fc\u30d0\u30fc\u3092\u6307\u5b9a\u3059\u308b(\u30dd\u30fc\u30c8\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306f8080)\n\ -keep \u751f\u6210\u6e08\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u6301\u3059\u308b\n\ -p <pkg> \u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6307\u5b9a\u3059\u308b\n\ -quiet wsimport\u51fa\u529b\u3092\u8868\u793a\u3057\u306a\u3044\n\ -s <directory> \u751f\u6210\u6e08\u306e\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u683c\u7d0d\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n\ -target <version> \u6307\u5b9a\u306eJAXWS\u4ed5\u69d8\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5f93\u3063\u3066\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\n\ \u30c7\u30d5\u30a9\u30eb\u30c8\u306f2.2\u3067\u3042\u308a\u3001\u4f7f\u7528\u53ef\u80fd\u306a\u5024\u306f2.0\u30012.1\u304a\u3088\u30732.2\u3067\u3059\n\ \u305f\u3068\u3048\u30702.0\u3067\u306f\u3001JAXWS 2.0\u4ed5\u69d8\u306e\u6e96\u62e0\u30b3\u30fc\u30c9\u304c\u751f\u6210\u3055\u308c\u307e\u3059\n\ -verbose \u30b3\u30f3\u30d1\u30a4\u30e9\u306e\u51e6\u7406\u5185\u5bb9\u306b\u95a2\u3059\u308b\u51fa\u529b\u30e1\u30c3\u30bb\u30fc\u30b8\n\ -version \u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u5370\u5237\u3059\u308b\n\ -wsdllocation <location> @WebServiceClient.wsdlLocation\u306e\u5024\n\ -clientjar <jarfile> \u751f\u6210\u6e08\u306e\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u306eJAR\u30d5\u30a1\u30a4\u30eb\u3068\u3001\n\ Web\u30b5\u30fc\u30d3\u30b9\u306e\u547c\u51fa\u3057\u306b\u5fc5\u8981\u306aWSDL\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3059\u308b\n\ -generateJWS \u30b9\u30bf\u30d6\u5316\u3055\u308c\u305fJWS\u5b9f\u88c5\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\n\ -implDestDir <directory> JWS\u5b9f\u88c5\u30d5\u30a1\u30a4\u30eb\u306e\u751f\u6210\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n\ -implServiceName <name> \u751f\u6210\u6e08\u306eJWS\u5b9f\u88c5\u306e\u30b5\u30fc\u30d3\u30b9\u540d\u306e\u30ed\u30fc\u30ab\u30eb\u90e8\u5206\n\ -implPortName <name> \u751f\u6210\u6e08\u306eJWS\u5b9f\u88c5\u306e\u30dd\u30fc\u30c8\u540d\u306e\u30ed\u30fc\u30ab\u30eb\u90e8\u5206
-
-wsimport.usage.extensions=\n\\\u62e1\u5f35\u6a5f\u80fd:\n\ -XadditionalHeaders \u30ea\u30af\u30a8\u30b9\u30c8\u307e\u305f\u306f\u30ec\u30b9\u30dd\u30f3\u30b9\u30fb\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u30d0\u30a4\u30f3\u30c9\u3055\u308c\u3066\u3044\u306a\u3044\u30d8\u30c3\u30c0\u30fc\u3092\n\ Java\u30e1\u30bd\u30c3\u30c9\u30fb\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u30de\u30c3\u30d7\n\ -Xauthfile \u6b21\u306e\u5f62\u5f0f\u306e\u8a8d\u8a3c\u60c5\u5831\u3092\u6301\u3064\u30d5\u30a1\u30a4\u30eb\n\ http://username:password@example.org/stock?wsdl\n\ -Xdebug \u30c7\u30d0\u30c3\u30b0\u60c5\u5831\u3092\u5370\u5237\u3059\u308b\n\ -Xno-addressing-databinding W3C EndpointReferenceType\u306eJava\u3078\u306e\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u3092\u6709\u52b9\u5316\u3059\u308b\n\ -Xnocompile \u751f\u6210\u6e08\u306eJava\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u306a\u3044\n\ -XdisableAuthenticator JAX-WS RI\u3067\u4f7f\u7528\u3055\u308c\u308b\u8a8d\u8a3c\u3092\u7121\u52b9\u5316\u3059\u308b\n\ \u8a2d\u5b9a\u3057\u305f\u5834\u5408\u3001-Xauthfile\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u7121\u8996\u3055\u308c\u307e\u3059\n\ -XdisableSSLHostnameVerification WSDL\u306e\u30d5\u30a7\u30c3\u30c1\u4e2d\u306eSSL\u30db\u30b9\u30c8\u540d\u691c\u8a3c\u3092\n\ \u7121\u52b9\u5316\u3059\u308b
-
-
-wsimport.usage.examples=\n\\\u4f8b:\n\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ wsimport -d generated http://example.org/stock?wsdl\n
-
-wsgen.usage=\u4f7f\u7528\u65b9\u6cd5: {0} [options] <SEI>\n\n\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8a73\u7d30\u306a\u8aac\u660e\u306b\u306f"wsgen -help"\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002
-
-wsgen.help=\n\u4f7f\u7528\u65b9\u6cd5: {0} [options] <SEI>\n\n\\[options]\u306b\u306f\u6b21\u306e\u3082\u306e\u304c\u3042\u308a\u307e\u3059:\n\ -classpath <path> \u5165\u529b\u30af\u30e9\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u691c\u7d22\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n\ -cp <path> -classpath <path>\u3068\u540c\u3058\n\ -d <directory> \u751f\u6210\u6e08\u306e\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u306e\u683c\u7d0d\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n\ -encoding <encoding> \u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u3067\u4f7f\u7528\u3055\u308c\u308b\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u6307\u5b9a\u3059\u308b\n\ -extension \u30d9\u30f3\u30c0\u30fc\u306e\u62e1\u5f35\u6a5f\u80fd\u3092\u8a31\u53ef\u3059\u308b - \u6a5f\u80fd\u306f\u4ed5\u69d8\u3067\n\ \u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u62e1\u5f35\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\n\ \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u30dd\u30fc\u30bf\u30d6\u30eb\u3067\u306a\u304f\u306a\u308b\u304b\u3001\n\ \u4ed6\u306e\u5b9f\u88c5\u3068\u306e\u76f8\u4e92\u904b\u7528\u304c\u3067\u304d\u306a\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\n\ -help \u30d8\u30eb\u30d7\u3092\u8868\u793a\u3059\u308b\n\ -keep \u751f\u6210\u6e08\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u6301\u3059\u308b\n\ -r <directory> \u30ea\u30bd\u30fc\u30b9\u5b9b\u5148\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3002WSDL\u306a\u3069\u306e\u30ea\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\n\ \u683c\u7d0d\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n\ -s <directory> \u751f\u6210\u6e08\u306e\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u683c\u7d0d\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n\ -verbose \u30b3\u30f3\u30d1\u30a4\u30e9\u306e\u51e6\u7406\u5185\u5bb9\u306b\u95a2\u3059\u308b\u51fa\u529b\u30e1\u30c3\u30bb\u30fc\u30b8\n\ -version \u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u5370\u5237\u3059\u308b\n\ -wsdl[:protocol] WSDL\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u3002\u30d7\u30ed\u30c8\u30b3\u30eb\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\n\ \u6709\u52b9\u306a\u30d7\u30ed\u30c8\u30b3\u30eb\u306f{1}\u3067\u3042\u308a\u3001\n\ \u30c7\u30d5\u30a9\u30eb\u30c8\u306fsoap1.1\u3067\u3059\u3002\n\ \u975e\u6a19\u6e96\u30d7\u30ed\u30c8\u30b3\u30eb{2}\n\ \u306f-extension\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u7d44\u307f\u5408\u305b\u305f\u5834\u5408\u306e\u307f\n\ \u4f7f\u7528\u3067\u304d\u307e\u3059\u3002\n\ -inlineSchemas \u751f\u6210\u6e08\u306eWSDL\u306e\u30a4\u30f3\u30e9\u30a4\u30f3\u30fb\u30b9\u30ad\u30fc\u30de\u3002-wsdl\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\n\ \u7d44\u307f\u5408\u305b\u3066\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n\ -servicename <name> \u751f\u6210\u6e08\u306eWSDL\u3067\u4f7f\u7528\u3059\u308b\u30b5\u30fc\u30d3\u30b9\u540d\u3092\u6307\u5b9a\u3059\u308b\n\ -wsdl\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u7d44\u307f\u5408\u305b\u3066\u4f7f\u7528\u3057\u307e\u3059\u3002\n\ -portname <name> \u751f\u6210\u6e08\u306eWSDL\u3067\u4f7f\u7528\u3059\u308b\u30dd\u30fc\u30c8\u540d\u3092\u6307\u5b9a\u3059\u308b\n\ -wsdl\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u7d44\u307f\u5408\u305b\u3066\u4f7f\u7528\u3057\u307e\u3059\u3002
-
-
-wsgen.usage.examples=\n\\\u4f8b:\n\ wsgen -cp . example.Stock\n\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
-wrapperTask.needEndorsed=JAX-WS {0} API\u306b\u4ed8\u5c5e\u3057\u305fJDK6\u3067\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u30c4\u30fc\u30eb\u306b\u306fJAX-WS {1} API\u304c\u5fc5\u8981\u3067\u3059\u3002Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/)\u3092\u4f7f\u7528\u3059\u308b\u304b\u3001<{2}>\u3067xendorsed="true"\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002
-
-# {0}, {2} - version (e.g. 2.1), {1} - absolute class location
-wrapperTask.loadingIncorrectApi={1}\u304b\u3089JAX-WS {0} API\u3092\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u30c4\u30fc\u30eb\u306b\u306fJAX-WS {2} API\u304c\u5fc5\u8981\u3067\u3059\u3002
-
-invoker.needEndorsed=JAX-WS {0} API\u306b\u4ed8\u5c5e\u3057\u305fJDK6\u3067\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u30c4\u30fc\u30eb\u306b\u306fJAX-WS {1} API\u304c\u5fc5\u8981\u3067\u3059\u3002Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/)\u3092\u4f7f\u7528\u3059\u308b\u304b\u3001-Xendorsed\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002
-
-
-#
-# Generic Messages
-#
-wscompile.invalidOption=\u30d1\u30e9\u30e1\u30fc\u30bf{0}\u3092\u8a8d\u8b58\u3067\u304d\u307e\u305b\u3093
-wsimport.noSuchJaxbOption=\u305d\u306e\u3088\u3046\u306aJAXB\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3042\u308a\u307e\u305b\u3093: {0}
-
-wscompile.error=\u30a8\u30e9\u30fc: {0}
-wscompile.warning=\u8b66\u544a: {0}
-wscompile.info=\u60c5\u5831: {0}
-wscompile.duplicateOption=\u91cd\u8907\u30aa\u30d7\u30b7\u30e7\u30f3: {0}
-wscompile.noSuchDirectory=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u3042\u308a\u307e\u305b\u3093: {0}
-# wscompile.missingOptionArgument
-wscompile.missingOptionArgument=\u30aa\u30d7\u30b7\u30e7\u30f3\"{0}\"\u306b\u306f\u5f15\u6570\u304c\u5fc5\u8981\u3067\u3059
-wscompile.compilationFailed=\u30b3\u30f3\u30d1\u30a4\u30eb\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u30a8\u30e9\u30fc\u306f\u5831\u544a\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059
-wscompile.unsupportedEncoding=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0: {0}
-
-wsimport.missingFile=WSDL_URI\u304c\u3042\u308a\u307e\u305b\u3093
-
-wsgen.invalid.protocol=\"{0}\"\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30d7\u30ed\u30c8\u30b3\u30eb\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30d7\u30ed\u30c8\u30b3\u30eb\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059: {1}\u3002
-wsgen.invalid.transport=\"{0}\"\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30c8\u30e9\u30f3\u30b9\u30dd\u30fc\u30c8\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30c8\u30e9\u30f3\u30b9\u30dd\u30fc\u30c8\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059: {1}\u3002
-wsgen.class.not.found=\u30af\u30e9\u30b9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093: \"{0}\"
-wsgen.could.not.create.file="\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f: "\\{0}\"
-wsgen.missingFile=SEI\u304c\u3042\u308a\u307e\u305b\u3093
-wsgen.soap12.without.extension=\u30aa\u30d7\u30b7\u30e7\u30f3\u30fb\u30d7\u30ed\u30c8\u30b3\u30eb\"Xsoap1.2\"\u306f\u3001\"-extension\"\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u7d44\u307f\u5408\u305b\u3066\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002
-wsgen.protocol.without.extension=\u30aa\u30d7\u30b7\u30e7\u30f3\u30fb\u30d7\u30ed\u30c8\u30b3\u30eb\"{0}\"\u306f\u3001\"-extension\"\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u7d44\u307f\u5408\u305b\u3066\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002
-wsgen.wsdl.arg.no.genwsdl=\"{0}\"\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3001"-wsdl"\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307f\u3068\u7d44\u307f\u5408\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
-wsgen.servicename.missing.namespace=\u30b5\u30fc\u30d3\u30b9\u540d\"{0}\"\u306b\u30cd\u30fc\u30e0\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308a\u307e\u305b\u3093\u3002
-wsgen.servicename.missing.localname=\u30b5\u30fc\u30d3\u30b9\u540d\"{0}\"\u306b\u30ed\u30fc\u30ab\u30eb\u540d\u304c\u3042\u308a\u307e\u305b\u3093\u3002
-wsgen.portname.missing.namespace=\u30dd\u30fc\u30c8\u540d\"{0}\"\u306b\u30cd\u30fc\u30e0\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308a\u307e\u305b\u3093\u3002
-wsgen.portname.missing.localname=\u30dd\u30fc\u30c8\u540d\"{0}\"\u306b\u30ed\u30fc\u30ab\u30eb\u540d\u304c\u3042\u308a\u307e\u305b\u3093\u3002
-wsgen.class.must.be.implementation.class=\u30af\u30e9\u30b9\"{0}\"\u306f\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u5b9f\u88c5\u30af\u30e9\u30b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002
-wsimport.NotAFileNorURL = "{0}"\u306f\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u3082URL\u3067\u3082\u3042\u308a\u307e\u305b\u3093
-
-wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen\u3067\u306f\u3001\u30af\u30e9\u30b9{1}\u306e\u975eSOAP\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0: {0}\u306b\u3064\u3044\u3066WSDL\u3092\u751f\u6210\u3067\u304d\u307e\u305b\u3093
-
-wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen\u3067\u306f\u3001\u30af\u30e9\u30b9: {1}\u306eSOAP 1.2\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0: {0}\u306b\u3064\u3044\u3066WSDL\u3092\u751f\u6210\u3067\u304d\u307e\u305b\u3093\u3002\n
-Please \"-extension\"\u304a\u3088\u3073\"-wsdl:protocol XSoap1.2\"\u30b9\u30a4\u30c3\u30c1\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4f8b:\n\n
-wsgen -wsdl:protocol XSoap1.2 -extenson {1}
-wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\"\u306f\u3001\"-wsdl\"\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u7d44\u307f\u5408\u305b\u3066\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059
-
-wsgen.no.webservices.class=wsgen\u3067\u306f\u3001@WebService\u6ce8\u91c8\u304c\u4ed8\u3051\u3089\u308c\u305f\u30af\u30e9\u30b9\u304c\u691c\u51fa\u3055\u308c\u307e\u305b\u3093\u3067\u3057\u305f\u3002{0}\u3067@WebService\u6ce8\u91c8\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002
-
-wsimport.no.wsdl=1)\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u30012)\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u8aad\u307f\u53d6\u308c\u306a\u304b\u3063\u305f\u30013)\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u30eb\u30fc\u30c8\u8981\u7d20\u304c<wsdl:definitions>\u3067\u306f\u306a\u304b\u3063\u305f\u305f\u3081\u3001WSDL\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8{0}\u306e\u8aad\u53d6\u308a\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
-
-wsimport.FailedToParse = "{0}"\u306e\u89e3\u6790\u306b\u5931\u6557\u3057\u307e\u3057\u305f: {1}
-
-wsimport.ParsingWSDL=WSDL\u3092\u89e3\u6790\u3057\u3066\u3044\u307e\u3059...\n\n
-wsimport.GeneratingCode=\n\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u3066\u3044\u307e\u3059...\n
-wsimport.CompilingCode=\n\u30b3\u30fc\u30c9\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u3044\u307e\u3059...\n
-wsimport.ILLEGAL_TARGET_VERSION = "{0}"\u306f\u6709\u52b9\u306a\u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002"2.0"\u304a\u3088\u3073"2.1"\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002
-
-wsimport.ILLEGAL_AUTH_INFO = "{0}"\u306f\u6709\u52b9\u306a\u8a8d\u8a3c\u60c5\u5831\u5f62\u5f0f\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u5f62\u5f0f\u306fhttp[s]://user:password@host:port//<url-path>\u3067\u3059\u3002
-
-wsimport.readingAuthFile = \u8a8d\u8a3c\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u53d6\u308d\u3046\u3068\u3057\u3066\u3044\u307e\u3059: "{0}"...
-
-# {0} - path to current authorization file, {1} - path to metro authorization file
-wsimport.authFileNotFound = \u8a8d\u8a3c\u30d5\u30a1\u30a4\u30eb"{0}"\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002WSDL\u30a2\u30af\u30bb\u30b9\u306b\u57fa\u672c\u8a8d\u8a3c\u304c\u5fc5\u8981\u3067\u3042\u308b\u5834\u5408\u3001{1}\u306b\u3042\u308b\u8a8d\u8a3c\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u53d6\u308a\u30a2\u30af\u30bb\u30b9\u306b\u3088\u308a\u6307\u5b9a\u3059\u308b\u304b\u3001-Xauthfile\u3092\u4f7f\u7528\u3057\u3066\u8a8d\u8a3c\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u3001\u5404\u884c\u3067\u6b21\u306e\u5f62\u5f0f\u3092\u4f7f\u7528\u3057\u3066\u8a8d\u8a3c\u60c5\u5831\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044: http[s]://user:password@host:port//<url-path>
-
-# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//
-wsimport.authInfoNeeded = {0}\u3002"{1}"\u306b\u306f\u8a8d\u8a3c\u304c\u5fc5\u8981\u3067\u3059\u3002{2}\u306b\u3042\u308b\u8a8d\u8a3c\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u53d6\u308a\u30a2\u30af\u30bb\u30b9\u306b\u3088\u308a\u6307\u5b9a\u3059\u308b\u304b\u3001-Xauthfile\u3092\u4f7f\u7528\u3057\u3066\u8a8d\u8a3c\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u3001\u5404\u884c\u3067\u6b21\u306e\u5f62\u5f0f\u3092\u4f7f\u7528\u3057\u3066\u8a8d\u8a3c\u60c5\u5831\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044: http[s]://user:password@host:port//<url-path>
-
-wsimport.AUTH_INFO_LINENO = "\u884c{0}/{1}
-
-
-wsimport.ErrorMessage = [ERROR] {0}
-
-wsimport.WarningMessage = [WARNING] {0}
-
-wsimport.InfoMessage = [INFO] {0}
-
-wsimport.DebugMessage = [DEBUG] {0}
-
-wsimport.httpRedirect = \u30b5\u30fc\u30d0\u30fc\u304cHTTP\u30b9\u30c6\u30fc\u30bf\u30b9\u30fb\u30b3\u30fc\u30c9: "{0}"\u3092\u8fd4\u3057\u307e\u3057\u305f\u3002"{1}"\u3067\u518d\u8a66\u884c\u3057\u3066\u3044\u307e\u3059
-
-wsimport.maxRedirectAttempt = WSDL\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u306e\u6700\u5927\u56de\u6570(5)\u306b\u9054\u3057\u307e\u3057\u305f
-
-wsimport.wsdllocation.clientjar = clientJar\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u4f7f\u7528\u6642\u306fwsdlLocation\u3092\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093
-# {0} - path to a zip file
-wsimport.archivingArtifacts=\n\u751f\u6210\u6e08\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u3092{0}\u306b\u30a2\u30fc\u30ab\u30a4\u30d6\u3057\u3066\u3044\u307e\u3059\u3002\n
-wsimport.archiveArtifact={0}\u3092\u30a2\u30fc\u30ab\u30a4\u30d6{1}\u306b\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059
-wsimport.fetchingMetadata=\nWSDL\u304a\u3088\u3073\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u3059\n
-# {0} - URI, {1} - path to a file
-wsimport.document.download=\n\u30e1\u30bf\u30c7\u30fc\u30bf\u30fb\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092{0}\u304b\u3089{1}\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u3059
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ko.properties
deleted file mode 100644
index 23e9b1e2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ko.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wsimport.usage=\uc0ac\uc6a9\ubc95: {0} [options] <WSDL_URI>\n\n\uc635\uc158\uc5d0 \ub300\ud55c \uc790\uc138\ud55c \uc124\uba85\uc744 \ubcf4\ub824\uba74 "wsimport -help"\ub97c \uc0ac\uc6a9\ud558\uc2ed\uc2dc\uc624.
-
-wsimport.help=\n\uc0ac\uc6a9\ubc95: {0} [options] <WSDL_URI>\n\n\\\uc5ec\uae30\uc11c [options]\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.\n\ -b <path> JAXWS/JAXB \ubc14\uc778\ub529 \ud30c\uc77c \ub610\ub294 \ucd94\uac00 \uc2a4\ud0a4\ub9c8\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \uac01 <path>\uc5d0\ub294 \uace0\uc720\ud55c -b\uac00 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.\n\ -B<jaxbOption> JAXB \uc2a4\ud0a4\ub9c8 \ucef4\ud30c\uc77c\ub7ec\uc5d0 \uc774 \uc635\uc158\uc744 \uc804\ub2ec\ud569\ub2c8\ub2e4.\n\ -catalog <file> \uc678\ubd80 \uc5d4\ud2f0\ud2f0 \ucc38\uc870\ub97c \ubd84\uc11d\ud560 \uce74\ud0c8\ub85c\uadf8 \ud30c\uc77c\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ TR9401, XCatalog \ubc0f OASIS XML \uce74\ud0c8\ub85c\uadf8 \ud615\uc2dd\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4.\n\ -d <directory> \uc0dd\uc131\ub41c \ucd9c\ub825 \ud30c\uc77c\uc744 \ubc30\uce58\ud560 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -encoding <encoding> \uc18c\uc2a4 \ud30c\uc77c\uc5d0 \uc0ac\uc6a9\ub418\ub294 \ubb38\uc790 \uc778\ucf54\ub529\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -extension \uc0ac\uc591\uc73c\ub85c \uc9c0\uc815\ub418\uc9c0 \uc54a\uc740 \uae30\ub2a5\uc778 \uacf5\uae09\uc5c5\uccb4\n\ \ud655\uc7a5\uc744 \ud5c8\uc6a9\ud569\ub2c8\ub2e4. \ud655\uc7a5\uc744 \uc0ac\uc6a9\ud558\uba74\n\ \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8\uc744 \uc774\ub3d9\ud558\uc9c0 \ubabb\ud558\uac70\ub098\n\ \ub2e4\ub978 \uad6c\ud604\uacfc\uc758 \uc0c1\ud638 \uc791\ub3d9\uc774 \ubd88\uac00\ub2a5\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\ -help \ub3c4\uc6c0\ub9d0\uc744 \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\ -httpproxy:<host>:<port> HTTP \ud504\ub85d\uc2dc \uc11c\ubc84\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4. \uae30\ubcf8\uc801\uc73c\ub85c \ud3ec\ud2b8\ub294 8080\uc73c\ub85c \uc124\uc815\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4.\n\ -keep \uc0dd\uc131\ub41c \ud30c\uc77c\uc744 \ubcf4\uad00\ud569\ub2c8\ub2e4.\n\ -p <pkg> \ub300\uc0c1 \ud328\ud0a4\uc9c0\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -quiet wsimport \ucd9c\ub825\uc744 \ud45c\uc2dc\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ -s <directory> \uc0dd\uc131\ub41c \uc18c\uc2a4 \ud30c\uc77c\uc744 \ubc30\uce58\ud560 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -target <version> \uc81c\uacf5\ub41c JAXWS \uc0ac\uc591 \ubc84\uc804\uc5d0 \ub530\ub77c \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\ \uae30\ubcf8\uac12\uc740 2.2\ub85c \uc124\uc815\ub418\uc5b4 \uc788\uc73c\uba70 \ud5c8\uc6a9\ub418\ub294 \uac12\uc740 2.0, 2.1 \ubc0f 2.2\uc785\ub2c8\ub2e4.\n\ \uc608\ub97c \ub4e4\uc5b4, 2.0\uc744 \uc9c0\uc815\ud558\uba74 JAXWS 2.0 \uc0ac\uc591\uc5d0 \ub300\ud574 \ud638\ud658\ub418\ub294 \ucf54\ub4dc\uac00 \uc0dd\uc131\ub429\ub2c8\ub2e4.\n\ -verbose \ucef4\ud30c\uc77c\ub7ec\uac00 \uc218\ud589 \uc911\uc778 \uc791\uc5c5\uc5d0 \ub300\ud55c \uba54\uc2dc\uc9c0\ub97c \ucd9c\ub825\ud569\ub2c8\ub2e4.\n\ -version \ubc84\uc804 \uc815\ubcf4\ub97c \uc778\uc1c4\ud569\ub2c8\ub2e4.\n\ -wsdllocation <location> @WebServiceClient.wsdlLocation \uac12\uc785\ub2c8\ub2e4.\n\ -clientjar <jarfile> \uc6f9 \uc11c\ube44\uc2a4 \ud638\ucd9c\uc5d0 \ud544\uc694\ud55c WSDL \uba54\ud0c0 \ub370\uc774\ud130\uc640 \ud568\uaed8\n\ \uc0dd\uc131\ub41c \uc544\ud2f0\ud329\ud2b8\uc758 jar \ud30c\uc77c\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\ -generateJWS Stub\ub41c JWS \uad6c\ud604 \ud30c\uc77c\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\ -implDestDir <directory> JWS \uad6c\ud604 \ud30c\uc77c\uc744 \uc0dd\uc131\ud560 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -implServiceName <name> \uc0dd\uc131\ub41c JWS \uad6c\ud604\uc5d0 \ub300\ud55c \uc11c\ube44\uc2a4 \uc774\ub984\uc758 \ub85c\uceec \ubd80\ubd84\uc785\ub2c8\ub2e4.\n\ -implPortName <name> \uc0dd\uc131\ub41c JWS \uad6c\ud604\uc5d0 \ub300\ud55c \ud3ec\ud2b8 \uc774\ub984\uc758 \ub85c\uceec \ubd80\ubd84\uc785\ub2c8\ub2e4.
-
-wsimport.usage.extensions=\n\\\ud655\uc7a5:\n\ -XadditionalHeaders \uc694\uccad \ub610\ub294 \uc751\ub2f5 \uba54\uc2dc\uc9c0\uc5d0 \ubc14\uc778\ub4dc\ub418\uc9c0 \uc54a\uc740 \ud5e4\ub354\ub97c \n\ Java \uba54\uc18c\ub4dc \ub9e4\uac1c\ubcc0\uc218\uc5d0 \ub9e4\ud551\ud569\ub2c8\ub2e4.\n\ -Xauthfile http://username:password@example.org/stock?wsdl \n\ \ud615\uc2dd\uc73c\ub85c \uad8c\ud55c \ubd80\uc5ec \uc815\ubcf4\ub97c \uc804\ub2ec\ud560 \ud30c\uc77c\uc785\ub2c8\ub2e4.\n\ -Xdebug \ub514\ubc84\uadf8 \uc815\ubcf4\ub97c \uc778\uc1c4\ud569\ub2c8\ub2e4.\n\ -Xno-addressing-databinding W3C EndpointReferenceType\uacfc Java \uac04\uc758 \ubc14\uc778\ub529\uc744 \uc0ac\uc6a9\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4.\n\ -Xnocompile \uc0dd\uc131\ub41c Java \ud30c\uc77c\uc744 \ucef4\ud30c\uc77c\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ -XdisableAuthenticator JAX-WS RI\uc5d0 \uc0ac\uc6a9\ub418\ub294 \uc778\uc99d\uc790\ub97c \uc0ac\uc6a9 \uc548\ud568\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4.\n\ \uc124\uc815\ub41c \uacbd\uc6b0 -Xauthfile \uc635\uc158\uc774 \ubb34\uc2dc\ub429\ub2c8\ub2e4.\n\ -XdisableSSLHostnameVerification WSDL\uc744 \uc778\ucd9c\ud558\ub294 \ub3d9\uc548 SSL \ud638\uc2a4\ud2b8 \uc774\ub984 \ud655\uc778\uc744\n\ \uc0ac\uc6a9 \uc548\ud568\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4.
-
-
-wsimport.usage.examples=\n\\\uc608:\n\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ wsimport -d generated http://example.org/stock?wsdl\n
-
-wsgen.usage=\uc0ac\uc6a9\ubc95: {0} [options] <SEI>\n\n\uc635\uc158\uc5d0 \ub300\ud55c \uc790\uc138\ud55c \uc124\uba85\uc744 \ubcf4\ub824\uba74 "wsgen -help"\ub97c \uc0ac\uc6a9\ud558\uc2ed\uc2dc\uc624.
-
-wsgen.help=\n\uc0ac\uc6a9\ubc95: {0} [options] <SEI>\n\n\\\uc5ec\uae30\uc11c [options]\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.\n\ -classpath <path> \uc785\ub825 \ud074\ub798\uc2a4 \ud30c\uc77c\uc744 \ucc3e\uc744 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -cp <path> -classpath <path>\uc640 \ub3d9\uc77c\ud569\ub2c8\ub2e4.\n\ -d <directory> \uc0dd\uc131\ub41c \ucd9c\ub825 \ud30c\uc77c\uc744 \ubc30\uce58\ud560 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -encoding <encoding> \uc18c\uc2a4 \ud30c\uc77c\uc5d0 \uc0ac\uc6a9\ub418\ub294 \ubb38\uc790 \uc778\ucf54\ub529\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -extension \uc0ac\uc591\uc73c\ub85c \uc9c0\uc815\ub418\uc9c0 \uc54a\uc740 \uae30\ub2a5\uc778 \uacf5\uae09\uc5c5\uccb4\n\ \ud655\uc7a5\uc744 \ud5c8\uc6a9\ud569\ub2c8\ub2e4. \ud655\uc7a5\uc744 \uc0ac\uc6a9\ud558\uba74\n\ \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8\uc744 \uc774\ub3d9\ud558\uc9c0 \ubabb\ud558\uac70\ub098\n\ \ub2e4\ub978 \uad6c\ud604\uacfc\uc758 \uc0c1\ud638 \uc791\ub3d9\uc774 \ubd88\uac00\ub2a5\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\ -help \ub3c4\uc6c0\ub9d0\uc744 \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\ -keep \uc0dd\uc131\ub41c \ud30c\uc77c\uc744 \ubcf4\uad00\ud569\ub2c8\ub2e4.\n\ -r <directory> \ub9ac\uc18c\uc2a4 \ub300\uc0c1 \ub514\ub809\ud1a0\ub9ac\ub85c, \ub9ac\uc18c\uc2a4 \ud30c\uc77c(\uc608: WSDL)\uc744\n\ \ubc30\uce58\ud560 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -s <directory> \uc0dd\uc131\ub41c \uc18c\uc2a4 \ud30c\uc77c\uc744 \ubc30\uce58\ud560 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -verbose \ucef4\ud30c\uc77c\ub7ec\uac00 \uc218\ud589 \uc911\uc778 \uc791\uc5c5\uc5d0 \ub300\ud55c \uba54\uc2dc\uc9c0\ub97c \ucd9c\ub825\ud569\ub2c8\ub2e4.\n\ -version \ubc84\uc804 \uc815\ubcf4\ub97c \uc778\uc1c4\ud569\ub2c8\ub2e4.\n\ -wsdl[:protocol] WSDL \ud30c\uc77c\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. protocol\uc740 \uc120\ud0dd \uc0ac\ud56d\uc785\ub2c8\ub2e4.\n\ \uc801\ud569\ud55c \ud504\ub85c\ud1a0\ucf5c\uc740 {1}\uc774\uba70\n\ \uae30\ubcf8\uac12\uc740 soap1.1\uc785\ub2c8\ub2e4.\n\ \ube44\ud45c\uc900 \ud504\ub85c\ud1a0\ucf5c {2}\uc740(\ub294)\n\ -extension \uc635\uc158\uacfc \ud568\uaed8\ub9cc\n\ \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\ -inlineSchemas \uc0dd\uc131\ub41c WSDL\uc758 \uc2a4\ud0a4\ub9c8\ub97c \uc778\ub77c\uc778\ud569\ub2c8\ub2e4.\n\ -wsdl \uc635\uc158\uacfc \ud568\uaed8 \uc0ac\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4.\n\ -servicename <name> \uc0dd\uc131\ub41c WSDL\uc5d0 \uc0ac\uc6a9\ud560 \uc11c\ube44\uc2a4 \uc774\ub984\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -wsdl \uc635\uc158\uacfc \ud568\uaed8 \uc0ac\uc6a9\ub429\ub2c8\ub2e4.\n\ -portname <name> \uc0dd\uc131\ub41c WSDL\uc5d0 \uc0ac\uc6a9\ud560 \ud3ec\ud2b8 \uc774\ub984\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -wsdl \uc635\uc158\uacfc \ud568\uaed8 \uc0ac\uc6a9\ub429\ub2c8\ub2e4.
-
-
-wsgen.usage.examples=\n\\\uc608:\n\ wsgen -cp . example.Stock\n\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
-wrapperTask.needEndorsed=JAX-WS {0} API\uc640 \ud568\uaed8 \uc81c\uacf5\ub418\ub294 JDK6\uc5d0\uc11c \uc2e4\ud589\ud558\uace0 \uc788\uc9c0\ub9cc \uc774 \ud234\uc744 \uc0ac\uc6a9\ud558\ub824\uba74 JAX-WS {1} API\uac00 \ud544\uc694\ud569\ub2c8\ub2e4. \uc778\uc99d\ub41c \ud45c\uc900 \ubb34\ud6a8\ud654 \ubc29\uc2dd(http://docs.oracle.com/javase/6/docs/technotes/guides/standards/)\uc744 \uc0ac\uc6a9\ud558\uac70\ub098 <{2}>\uc5d0 \ub300\ud574 xendorsed="true"\ub97c \uc124\uc815\ud558\uc2ed\uc2dc\uc624.
-
-# {0}, {2} - version (e.g. 2.1), {1} - absolute class location
-wrapperTask.loadingIncorrectApi={1}\uc5d0\uc11c JAX-WS {0} API\ub97c \ub85c\ub4dc\ud558\uace0 \uc788\uc9c0\ub9cc \uc774 \ud234\uc744 \uc0ac\uc6a9\ud558\ub824\uba74 JAX-WS {2} API\uac00 \ud544\uc694\ud569\ub2c8\ub2e4.
-
-invoker.needEndorsed=JAX-WS {0} API\uc640 \ud568\uaed8 \uc81c\uacf5\ub418\ub294 JDK6\uc5d0\uc11c \uc2e4\ud589\ud558\uace0 \uc788\uc9c0\ub9cc \uc774 \ud234\uc744 \uc0ac\uc6a9\ud558\ub824\uba74 JAX-WS {1} API\uac00 \ud544\uc694\ud569\ub2c8\ub2e4. \uc778\uc99d\ub41c \ud45c\uc900 \ubb34\ud6a8\ud654 \ubc29\uc2dd(http://docs.oracle.com/javase/6/docs/technotes/guides/standards/)\uc744 \uc0ac\uc6a9\ud558\uac70\ub098 -Xendorsed \uc635\uc158\uc744 \uc0ac\uc6a9\ud558\uc2ed\uc2dc\uc624.
-
-
-#
-# Generic Messages
-#
-wscompile.invalidOption={0}\uc740(\ub294) \uc778\uc2dd\ud560 \uc218 \uc5c6\ub294 \ub9e4\uac1c\ubcc0\uc218\uc785\ub2c8\ub2e4.
-wsimport.noSuchJaxbOption=\ud574\ub2f9 JAXB \uc635\uc158 \uc5c6\uc74c: {0}
-
-wscompile.error=\uc624\ub958: {0}
-wscompile.warning=\uacbd\uace0: {0}
-wscompile.info=\uc815\ubcf4: {0}
-wscompile.duplicateOption=\uc911\ubcf5 \uc635\uc158: {0}
-wscompile.noSuchDirectory=\ub514\ub809\ud1a0\ub9ac\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc74c: {0}
-# wscompile.missingOptionArgument
-wscompile.missingOptionArgument=\"{0}\" \uc635\uc158\uc5d0 \uc778\uc218\uac00 \ud544\uc694\ud569\ub2c8\ub2e4.
-wscompile.compilationFailed=\ucef4\ud30c\uc77c\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. \uc624\ub958\ub97c \ubcf4\uace0\ud574\uc57c \ud569\ub2c8\ub2e4.
-wscompile.unsupportedEncoding=\uc9c0\uc6d0\ub418\uc9c0 \uc54a\ub294 \uc778\ucf54\ub529: {0}
-
-wsimport.missingFile=WSDL_URI\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-
-wsgen.invalid.protocol=\"{0}\"\uc740(\ub294) \uc9c0\uc6d0\ub418\ub294 \ud504\ub85c\ud1a0\ucf5c\uc774 \uc544\ub2d9\ub2c8\ub2e4. \uc9c0\uc6d0\ub418\ub294 \ud504\ub85c\ud1a0\ucf5c: {1}.
-wsgen.invalid.transport=\"{0}\"\uc740(\ub294) \uc9c0\uc6d0\ub418\ub294 \uc804\uc1a1\uc774 \uc544\ub2d9\ub2c8\ub2e4. \uc9c0\uc6d0\ub418\ub294 \uc804\uc1a1: {1}.
-wsgen.class.not.found=\ud074\ub798\uc2a4\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc74c: \"{0}\"
-wsgen.could.not.create.file=\ud30c\uc77c\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc74c: \"{0}\"
-wsgen.missingFile=SEI\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-wsgen.soap12.without.extension=\uc120\ud0dd\uc801 \ud504\ub85c\ud1a0\ucf5c \"Xsoap1.2\"\ub294 \"-extension\" \uc635\uc158\uacfc \ud568\uaed8 \uc0ac\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4.
-wsgen.protocol.without.extension=\uc120\ud0dd\uc801 \ud504\ub85c\ud1a0\ucf5c \"{0}\"\uc740(\ub294) \"-extension\" \uc635\uc158\uacfc \ud568\uaed8 \uc0ac\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4.
-wsgen.wsdl.arg.no.genwsdl=\"{0}\" \uc635\uc158\uc740 "-wsdl" \uc635\uc158\uacfc \ud568\uaed8\ub9cc \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.
-wsgen.servicename.missing.namespace=\uc11c\ube44\uc2a4 \uc774\ub984 \"{0}\"\uc5d0 \ub124\uc784\uc2a4\ud398\uc774\uc2a4\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-wsgen.servicename.missing.localname=\uc11c\ube44\uc2a4 \uc774\ub984 \"{0}\"\uc5d0 \ub85c\uceec \uc774\ub984\uc774 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-wsgen.portname.missing.namespace=\ud3ec\ud2b8 \uc774\ub984 \"{0}\"\uc5d0 \ub124\uc784\uc2a4\ud398\uc774\uc2a4\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-wsgen.portname.missing.localname=\ud3ec\ud2b8 \uc774\ub984 \"{0}\"\uc5d0 \ub85c\uceec \uc774\ub984\uc774 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-wsgen.class.must.be.implementation.class=\"{0}\" \ud074\ub798\uc2a4\ub294 \ub05d\uc810 \uad6c\ud604 \ud074\ub798\uc2a4\uac00 \uc544\ub2d9\ub2c8\ub2e4.
-wsimport.NotAFileNorURL = "{0}"\uc740(\ub294) \ud30c\uc77c \uc774\ub984 \ub610\ub294 URL\uc774 \uc544\ub2d9\ub2c8\ub2e4.
-
-wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen\uc740 {1} \ud074\ub798\uc2a4\uc758 \ube44SOAP \ubc14\uc778\ub529 {0}\uc5d0 \ub300\ud574 WSDL\uc744 \uc0dd\uc131\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
-
-wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen\uc740 {1} \ud074\ub798\uc2a4\uc758 SOAP 1.2 \ubc14\uc778\ub529 {0}\uc5d0 \ub300\ud574 WSDL\uc744 \uc0dd\uc131\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\n
-Please \"-extension\" \ubc0f \"-wsdl:protocol XSoap1.2\" \uc2a4\uc704\uce58\ub97c \uc9c0\uc815\ud558\uc2ed\uc2dc\uc624. \uc608:\n\n
-wsgen -wsdl:protocol XSoap1.2 -extenson {1}
-wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\"\ub294 \"-wsdl\" \uc635\uc158\uacfc \ud568\uaed8 \uc0ac\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4.
-
-wsgen.no.webservices.class=wsgen\uc740 @WebService \uc8fc\uc11d\uc774 \uc788\ub294 \ud074\ub798\uc2a4\ub97c \ucc3e\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. {0}\uc5d0\uc11c @WebService \uc8fc\uc11d\uc744 \uc9c0\uc815\ud558\uc2ed\uc2dc\uc624.
-
-wsimport.no.wsdl=WSDL \ubb38\uc11c \uc77d\uae30 \uc2e4\ud328: {0}. \uc6d0\uc778: 1) \ubb38\uc11c\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. 2) \ubb38\uc11c\ub97c \uc77d\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. 3) \ubb38\uc11c\uc758 \ub8e8\ud2b8 \uc694\uc18c\uac00 <wsdl:definitions>\uac00 \uc544\ub2d9\ub2c8\ub2e4.
-
-wsimport.FailedToParse = "{0}"\uc758 \uad6c\ubb38 \ubd84\uc11d \uc2e4\ud328: {1}
-
-wsimport.ParsingWSDL=WSDL\uc758 \uad6c\ubb38\uc744 \ubd84\uc11d\ud558\ub294 \uc911...\n\n
-wsimport.GeneratingCode=\n\ucf54\ub4dc\ub97c \uc0dd\uc131\ud558\ub294 \uc911...\n
-wsimport.CompilingCode=\n\ucf54\ub4dc\ub97c \ucef4\ud30c\uc77c\ud558\ub294 \uc911...\n
-wsimport.ILLEGAL_TARGET_VERSION = "{0}"\uc740(\ub294) \uc801\ud569\ud55c \ub300\uc0c1 \ubc84\uc804\uc774 \uc544\ub2d9\ub2c8\ub2e4. "2.0" \ubc0f "2.1"\uc774 \uc9c0\uc6d0\ub429\ub2c8\ub2e4.
-
-wsimport.ILLEGAL_AUTH_INFO = "{0}"\uc740(\ub294) \uc801\ud569\ud55c \uad8c\ud55c \ubd80\uc5ec \uc815\ubcf4 \ud615\uc2dd\uc774 \uc544\ub2d9\ub2c8\ub2e4. \ud615\uc2dd\uc740 http[s]://user:password@host:port//<url-path>\uc785\ub2c8\ub2e4.
-
-wsimport.readingAuthFile = \uad8c\ud55c \ubd80\uc5ec \ud30c\uc77c\uc744 \uc77d\uc73c\ub824\uace0 \uc2dc\ub3c4\ud558\ub294 \uc911: "{0}"...
-
-# {0} - path to current authorization file, {1} - path to metro authorization file
-wsimport.authFileNotFound = \uad8c\ud55c \ubd80\uc5ec \ud30c\uc77c "{0}"\uc744(\ub97c) \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. WSDL \uc561\uc138\uc2a4\uc5d0 \uae30\ubcf8 \uc778\uc99d\uc774 \ud544\uc694\ud560 \uacbd\uc6b0 {1}\uc5d0\uc11c \uad8c\ud55c \ubd80\uc5ec \ud30c\uc77c\uc5d0 \uc77d\uae30 \uc561\uc138\uc2a4 \uad8c\ud55c\uc744 \uc81c\uacf5\ud558\uac70\ub098 -Xauthfile\uc744 \uc0ac\uc6a9\ud558\uc5ec \uad8c\ud55c \ubd80\uc5ec \ud30c\uc77c\uc744 \uc81c\uacf5\ud558\uace0 \uac01 \ud589\uc5d0\uc11c http[s]://user:password@host:port//<url-path> \ud615\uc2dd\uc744 \uc0ac\uc6a9\ud558\uc5ec \uad8c\ud55c \ubd80\uc5ec \uc815\ubcf4\ub97c \uc81c\uacf5\ud558\uc2ed\uc2dc\uc624.
-
-# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//
-wsimport.authInfoNeeded = {0}, "{1}"\uc5d0 \uad8c\ud55c \ubd80\uc5ec\uac00 \ud544\uc694\ud569\ub2c8\ub2e4. {2}\uc5d0\uc11c \uad8c\ud55c \ubd80\uc5ec \ud30c\uc77c\uc5d0 \uc77d\uae30 \uc561\uc138\uc2a4 \uad8c\ud55c\uc744 \uc81c\uacf5\ud558\uac70\ub098 -Xauthfile\uc744 \uc0ac\uc6a9\ud558\uc5ec \uad8c\ud55c \ubd80\uc5ec \ud30c\uc77c\uc744 \uc81c\uacf5\ud558\uace0 \uac01 \ud589\uc5d0\uc11c http[s]://user:password@host:port//<url-path> \ud615\uc2dd\uc744 \uc0ac\uc6a9\ud558\uc5ec \uad8c\ud55c \ubd80\uc5ec \uc815\ubcf4\ub97c \uc81c\uacf5\ud558\uc2ed\uc2dc\uc624.
-
-wsimport.AUTH_INFO_LINENO = {1}\uc758 {0}\ud589
-
-
-wsimport.ErrorMessage = [ERROR] {0}
-
-wsimport.WarningMessage = [WARNING] {0}
-
-wsimport.InfoMessage = [INFO] {0}
-
-wsimport.DebugMessage = [DEBUG] {0}
-
-wsimport.httpRedirect = \uc11c\ubc84\uac00 HTTP \uc0c1\ud0dc \ucf54\ub4dc "{0}"\uc744(\ub97c) \ubc18\ud658\ud588\uc2b5\ub2c8\ub2e4. "{1}"\uc744(\ub97c) \uc0ac\uc6a9\ud558\uc5ec \uc7ac\uc2dc\ub3c4\ud558\ub294 \uc911
-
-wsimport.maxRedirectAttempt = WSDL\uc744 \uac00\uc838\uc62c \uc218 \uc5c6\uc74c - \ucd5c\ub300 \uc7ac\uc9c0\uc815 \uc218(5)\uc5d0 \ub3c4\ub2ec\ud588\uc2b5\ub2c8\ub2e4.
-
-wsimport.wsdllocation.clientjar = clientJar \uc635\uc158\uc744 \uc0ac\uc6a9\ud558\ub294 \uacbd\uc6b0 wsdlLocation\uc744 \uc9c0\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
-# {0} - path to a zip file
-wsimport.archivingArtifacts=\n\uc0dd\uc131\ub41c \uc544\ud2f0\ud329\ud2b8\ub97c {0}(\uc73c)\ub85c \uc544\uce74\uc774\ube0c\ud558\ub294 \uc911\uc785\ub2c8\ub2e4.\n
-wsimport.archiveArtifact={1} \uc544\uce74\uc774\ube0c\uc5d0 {0}\uc744(\ub97c) \ucd94\uac00\ud558\ub294 \uc911
-wsimport.fetchingMetadata=\nWSDL \ubc0f \uc5f0\uad00\ub41c \uba54\ud0c0 \ub370\uc774\ud130\ub97c \ub2e4\uc6b4\ub85c\ub4dc\ud558\ub294 \uc911\n
-# {0} - URI, {1} - path to a file
-wsimport.document.download=\n{0}\uc5d0\uc11c {1}(\uc73c)\ub85c \uba54\ud0c0 \ub370\uc774\ud130 \ubb38\uc11c\ub97c \ub2e4\uc6b4\ub85c\ub4dc\ud558\ub294 \uc911
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_pt_BR.properties
deleted file mode 100644
index 0a4c41e5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_pt_BR.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wsimport.usage=Uso: {0} [options] <WSDL_URI>\n\nUse "wsimport -help" para obter uma descri\u00e7\u00e3o detalhada das op\u00e7\u00f5es.
-
-wsimport.help=\nUso: {0} [options] <WSDL_URI>\n\n\\onde [options] inclui:\n\\ -b <path> especifica os arquivos de bind jaxws/jaxb ou esquemas adicionais\n\\ (Cada <path> deve ter seu pr\u00f3prio -b)\n\\ -B<jaxbOption> Passe esta op\u00e7\u00e3o para o compilador do esquema JAXB\n\\ -catalog <file> especifique o arquivo do cat\u00e1logo para resolver as refer\u00eancias da entidade externa\n\\ suporta o formato do Cat\u00e1logo TR9401, XCatalog e OASIS XML.\n\\ -d <directory> especifica onde colocar os arquivos de sa\u00edda gerados\n\\ -encoding <encoding> especifica a codifica\u00e7\u00e3o de caracteres usada pelos arquivos de origem\n\\ -extension permite extens\u00f5es do fornecedor - funcionalidade n\u00e3o especificada\n\\ pela especifica\u00e7\u00e3o. O uso das extens\u00f5es pode\n\\ resultar em aplica\u00e7\u00f5es que n\u00e3o s\u00e3o port\u00e1veis ou\n\\ n\u00e3o pode interoperar com outras implementa\u00e7\u00f5es\n\\ -help display help\n\\ -httpproxy:<host>:<port> especifica um servidor proxy HTTP (a porta \u00e9 definida como default para 8080)\n\\ -keep mant\u00e9m arquivos gerados\n\\ -p <pkg> especifica o pacote do alvo\n\\ -quiet suprime a sa\u00edda wsimport\n\\ -s <directory> especifica onde colocar os arquivos de origem gerados\n\\ -target <version> gera c\u00f3digos conforme vers\u00e3o de especifica\u00e7\u00e3o JAXWS fornecida\n\\ \u00c9 definido como default para 2.2. Os valores aceitos s\u00e3o 2.0, 2.1 e 2.2\n\\ por exemplo 2.0 ir\u00e1 gerar o c\u00f3digo compat\u00edvel para a especifica\u00e7\u00e3o JAXWS 2.0\n\\ -verbose as mensagens de sa\u00edda sobre o que o compilador est\u00e1 fazendo\n\\ -version imprime as informa\u00e7\u00f5es da vers\u00e3o\n\n\\ -wsdllocation <location> @WebServiceClient.wsdlLocation value\n\\ -clientjar <jarfile> Cria o arquivo jar dos artefatos gerados junto com os\n\\ metadados WSDL necess\u00e1rios para chamar o web service.\n\\ -generateJWS gera arquivo de implementa\u00e7\u00e3o JWS com stub\n\\ -implDestDir <directory> especifica onde gerar o arquivo de implementa\u00e7\u00e3o de JWS\n\\ -implServiceName <name> parte do local do nome de servi\u00e7o para implementa\u00e7\u00e3o JWS gerada\n\\ -implPortName <name> parte do local do nome da porta para implementa\u00e7\u00e3o de JWS gerada
-
-wsimport.usage.extensions=\n\\Extens\u00f5es:\n\\ -XadditionalHeaders mapeia cabe\u00e7alhos n\u00e3o vinculados para mensagem de solicita\u00e7\u00e3o ou resposta para \n\\ par\u00e2metros do m\u00e9todo Java\n\\ -Xauthfile arquivo para transmitir informa\u00e7\u00f5es de autoriza\u00e7\u00e3o no formato \n\\ http://username:password@example.org/stock?wsdl\n\\ -Xdebug imprime informa\u00e7\u00f5es de depura\u00e7\u00e3o\n\\ -Xno-addressing-databinding permite bind de W3C EndpointReferenceType para Java\n\\ -Xnocompile n\u00e3o compilar arquivos Java gerados\n\\ -XdisableAuthenticator desativar Autenticador usado por JAX-WS RI,\n\\ a op\u00e7\u00e3o -Xauthfile ser\u00e1 ignorada, se definida\n\\ -XdisableSSLHostnameVerification desativa a verifica\u00e7\u00e3o de Nome do host de SSL ao extrair\n\\ wsdls
-
-
-wsimport.usage.examples=\n\\Exemplos:\n\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ wsimport -d gerou http://example.org/stock?wsdl\n
-
-wsgen.usage=Uso: {0} [options] <SEI>\n\nUse "wsgen -help" para obter uma descri\u00e7\u00e3o detalhada das op\u00e7\u00f5es.
-
-wsgen.help=\nUso: {0} [options] <SEI>\n\n\\onde [options] inclui:\n\\ -classpath <path> especifica onde localizar os arquivos de classe de entrada\n\\ -cp <path> igual a -classpath <path>\n\\ -d <directory> especifica onde colocar os arquivos de sa\u00edda gerados\n\\ -encoding <encoding> especifica a codifica\u00e7\u00e3o de caracteres usada pelos arquivos de origem\n\\ -extension permite as extens\u00f5es do fornecedor - funcionalidade n\u00e3o especificada\n\\ pela especifica\u00e7\u00e3o. O uso das extens\u00f5es pode\n\\ resultar em aplica\u00e7\u00f5es que n\u00e3o s\u00e3o port\u00e1veis ou\n\\ n\u00e3o pode interoperar com outras implementa\u00e7\u00f5es\n\\ -help exibe ajuda\n\\ -keep mant\u00e9m arquivos gerados\n\\ -r <directory> diret\u00f3rio de destino do recurso, especifica onde\n\\ colocar arquivos de recursos, como WSDLs\n\\ -s <directory> especifica onde colocar os arquivos de origem gerados\n\\ -verbose mensagens de sa\u00edda sobre o que o compilador est\u00e1 fazendo\n\\ -version imprime informa\u00e7\u00f5es da vers\u00e3o\n\\ -wsdl[:protocol] gera um arquivo WSDL. O protocolo \u00e9 opcional.\n\\ Os protocolos v\u00e1lidos s\u00e3o {1},\n\\ o default \u00e9 soap1.1.\n\\ Os protocolos n\u00e3o padr\u00e3o {2}\n\\ s\u00f3 podem ser usados junto com a\n\\ op\u00e7\u00e3o -extension.\n\\ -inlineSchemas os esquemas em linha no wsdl gerado. Devem ser\n\\ usados junto com a op\u00e7\u00e3o -wsdl.\n\\ -servicename <name> especifica o nome do Servi\u00e7o a ser usado no WSDL gerado\n\\ Usado junto com a op\u00e7\u00e3o -wsdl.\n\\ -portname <name> especifica o nome da Porta a ser usado no WSDL gerado\n\\ Usado junto com a op\u00e7\u00e3o -wsdl.
-
-
-wsgen.usage.examples=\n\\Exemplos:\n\ wsgen -cp . example.Stock\n\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
-wrapperTask.needEndorsed=Voc\u00ea est\u00e1 executando no JDK6 que vem com a API de JAX-WS {0}, mas esta ferramenta exige a API de JAX-WS {1}. Use o mecanismo de substitui\u00e7\u00e3o de padr\u00f5es endossados (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/) ou defina xendorsed="true" em <{2}>.
-
-# {0}, {2} - version (e.g. 2.1), {1} - absolute class location
-wrapperTask.loadingIncorrectApi=Voc\u00ea est\u00e1 carregando a API de JAX-WS {0} de {1}, mas esta ferramenta requer a API de JAX-WS {2}.
-
-invoker.needEndorsed=Voc\u00ea est\u00e1 executando no JDK6 que vem com a API de JAX-WS {0}, mas esta ferramenta exige a API de JAX-WS {1}. Use o mecanismo de substitui\u00e7\u00e3o de padr\u00f5es endossados (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), ou use a op\u00e7\u00e3o -Xendorsed.
-
-
-#
-# Generic Messages
-#
-wscompile.invalidOption=par\u00e2metro {0} n\u00e3o reconhecido
-wsimport.noSuchJaxbOption=nenhuma op\u00e7\u00e3o do JAXB: {0}
-
-wscompile.error=erro: {0}
-wscompile.warning=advert\u00eancia: {0}
-wscompile.info=informa\u00e7\u00f5es: {0}
-wscompile.duplicateOption=op\u00e7\u00e3o: {0} duplicada
-wscompile.noSuchDirectory=diret\u00f3rio n\u00e3o encontrado: {0}
-# wscompile.missingOptionArgument
-wscompile.missingOptionArgument=a op\u00e7\u00e3o \"{0}\" requer um argumento
-wscompile.compilationFailed=falha na compila\u00e7\u00e3o, os erros foram reportados
-wscompile.unsupportedEncoding=codifica\u00e7\u00e3o n\u00e3o suportada: {0}
-
-wsimport.missingFile=WSDL_URI n\u00e3o encontrado
-
-wsgen.invalid.protocol=\"{0}\" n\u00e3o \u00e9 um protocolo suportado. Os protocolos suportados s\u00e3o: {1}.
-wsgen.invalid.transport=\"{0}\" n\u00e3o \u00e9 um transporte suportado. Os transportes suportados s\u00e3o: {1}.
-wsgen.class.not.found=Classe n\u00e3o encontrada: \"{0}\"
-wsgen.could.not.create.file=N\u00e3o foi poss\u00edvel criar o arquivo: "\\{0}\"
-wsgen.missingFile=SEI N\u00e3o Encontrado
-wsgen.soap12.without.extension=O protocolo \"Xsoap1.2\" opcional deve ser usado junto com a op\u00e7\u00e3o \"-extension\".
-wsgen.protocol.without.extension=O protocolo \"{0}\" opcional deve ser usado junto com a op\u00e7\u00e3o \"-extension\".
-wsgen.wsdl.arg.no.genwsdl=A op\u00e7\u00e3o \"{0}\" s\u00f3 pode ser usada junto com a op\u00e7\u00e3o "-wsdl".
-wsgen.servicename.missing.namespace=O nome do servi\u00e7o \"{0}\" n\u00e3o encontrou um namespace.
-wsgen.servicename.missing.localname=O nome do servi\u00e7o \"{0}\" n\u00e3o encontrou um localname.
-wsgen.portname.missing.namespace=O nome da porta \"{0}\" n\u00e3o encontrou um namespace.
-wsgen.portname.missing.localname=O nome da porta \"{0}\" n\u00e3o encontrou um localname.
-wsgen.class.must.be.implementation.class=A classe \"{0}\" n\u00e3o \u00e9 uma classe de implementa\u00e7\u00e3o de ponto final.
-wsimport.NotAFileNorURL = "{0}" n\u00e3o \u00e9 um nome de arquivo nem um URL
-
-wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen n\u00e3o pode gerar WSDL para bind n\u00e3o-SOAP: {0} na Classe {1}
-
-wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen n\u00e3o pode gerar WSDL para bind de SOAP 1.2: {0} na classe: {1}.\n
-Please especifique as chaves \"-extension\" e \"-wsdl:protocol XSoap1.2\". Por exemplo:\n\n
-wsgen -wsdl:protocol XSoap1.2 -extension {1}
-wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\" deve ser usado junto com a op\u00e7\u00e3o \"-wsdl\"
-
-wsgen.no.webservices.class=wsgen n\u00e3o encontrou nenhuma classe com a anota\u00e7\u00e3o @WebService. Especifique a anota\u00e7\u00e3o @WebService em {0}.
-
-wsimport.no.wsdl=Falha ao ler o documento WSDL: {0}, porque 1) n\u00e3o p\u00f4de localizar o documento; /2) o documento n\u00e3o p\u00f4de ser lido; 3) o elemento-raiz do documento n\u00e3o \u00e9 <wsdl:definitions>.
-
-wsimport.FailedToParse = Falha ao fazer parse "{0}": {1}
-
-wsimport.ParsingWSDL=fazendo parse do WSDL...\n\n
-wsimport.GeneratingCode=\nGerando o c\u00f3digo...\n
-wsimport.CompilingCode=\nCompilando o c\u00f3digo...\n
-wsimport.ILLEGAL_TARGET_VERSION = "{0}" n\u00e3o \u00e9 uma vers\u00e3o do alvo v\u00e1lida. "2.0" e "2.1" s\u00e3o suportadas.
-
-wsimport.ILLEGAL_AUTH_INFO = "{0}" n\u00e3o est\u00e1 no formato de informa\u00e7\u00f5es de autoriza\u00e7\u00e3o v\u00e1lido. O formato \u00e9 http[s]://user:password@host:port//<url-path>.
-
-wsimport.readingAuthFile = Tentando ler o arquivo de autoriza\u00e7\u00e3o : "{0}"...
-
-# {0} - path to current authorization file, {1} - path to metro authorization file
-wsimport.authFileNotFound = Arquivo de autoriza\u00e7\u00e3o "{0}" n\u00e3o encontrado. Se o acesso do WSDL precisar da Autentica\u00e7\u00e3o B\u00e1sica, forne\u00e7a o arquivo de autoriza\u00e7\u00e3o com o acesso de leitura em {1} ou use -Xauthfile para fornecer o arquivo de autoriza\u00e7\u00e3o em cada linha para fornecer informa\u00e7\u00f5es de autoriza\u00e7\u00e3o usando este formato : http[s]://user:password@host:port//<url-path>
-
-# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//
-wsimport.authInfoNeeded = {0}, "{1}" precisa de autoriza\u00e7\u00e3o; forne\u00e7a o arquivo de autoriza\u00e7\u00e3o com o acesso de leitura em {2} ou use -Xauthfile para fornecer o arquivo de autoriza\u00e7\u00e3o em cada linha para fornecer informa\u00e7\u00f5es de autoriza\u00e7\u00e3o usando este formato : http[s]://user:password@host:port//<url-path>
-
-wsimport.AUTH_INFO_LINENO = "linha {0} de {1}
-
-
-wsimport.ErrorMessage = [ERROR] {0}
-
-wsimport.WarningMessage = [WARNING] {0}
-
-wsimport.InfoMessage = [INFO] {0}
-
-wsimport.DebugMessage = [DEBUG] {0}
-
-wsimport.httpRedirect = O servidor retornou o c\u00f3digo de Status HTTP: "{0}", recuperando com "{1}"
-
-wsimport.maxRedirectAttempt = N\u00e3o \u00e9 poss\u00edvel obter um WSDL - n\u00famero m\u00e1ximo de (5) redirecionamentos atingido.
-
-wsimport.wsdllocation.clientjar = wsdlLocation n\u00e3o pode ser especificado ao usar a op\u00e7\u00e3o clientJar
-# {0} - path to a zip file
-wsimport.archivingArtifacts=\nArquivando os artefatos gerados em {0}.\n
-wsimport.archiveArtifact=Adicionando {0} ao archive {1}
-wsimport.fetchingMetadata=\nFazendo download do WSDL e dos metadados associados\n
-# {0} - URI, {1} - path to a file
-wsimport.document.download=\nFazendo download do documento de metadados de {0} para {1}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_CN.properties
deleted file mode 100644
index 591a59d6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_CN.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wsimport.usage=\u7528\u6cd5: {0} [options] <WSDL_URI>\n\n\u4f7f\u7528 "wsimport -help" \u83b7\u53d6\u8be6\u7ec6\u7684\u9009\u9879\u8bf4\u660e\u3002
-
-wsimport.help=\n\u7528\u6cd5: {0} [options] <WSDL_URI>\n\n\\\u5176\u4e2d [options] \u5305\u62ec:\n\ -b <path> \u6307\u5b9a jaxws/jaxb \u7ed1\u5b9a\u6587\u4ef6\u6216\u9644\u52a0\u6a21\u5f0f\n\ (\u6bcf\u4e2a <path> \u90fd\u5fc5\u987b\u5177\u6709\u81ea\u5df1\u7684 -b)\n\ -B<jaxbOption> \u5c06\u6b64\u9009\u9879\u4f20\u9012\u7ed9 JAXB \u6a21\u5f0f\u7f16\u8bd1\u5668\n\ -catalog <file> \u6307\u5b9a\u7528\u4e8e\u89e3\u6790\u5916\u90e8\u5b9e\u4f53\u5f15\u7528\u7684\u76ee\u5f55\u6587\u4ef6\n\ \u652f\u6301 TR9401, XCatalog \u548c OASIS XML \u76ee\u5f55\u683c\u5f0f\u3002\n\ -d <directory> \u6307\u5b9a\u653e\u7f6e\u751f\u6210\u7684\u8f93\u51fa\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ -encoding <encoding> \u6307\u5b9a\u6e90\u6587\u4ef6\u6240\u4f7f\u7528\u7684\u5b57\u7b26\u7f16\u7801\n\ -extension \u5141\u8bb8\u4f9b\u5e94\u5546\u6269\u5c55 - \u4e0d\u6309\u89c4\u8303\n\ \u6307\u5b9a\u529f\u80fd\u3002\u4f7f\u7528\u6269\u5c55\u53ef\u80fd\u4f1a\n\ \u5bfc\u81f4\u5e94\u7528\u7a0b\u5e8f\u4e0d\u53ef\u79fb\u690d\u6216\n\ \u65e0\u6cd5\u4e0e\u5176\u4ed6\u5b9e\u73b0\u8fdb\u884c\u4e92\u64cd\u4f5c\n\ -help \u663e\u793a\u5e2e\u52a9\n\ -httpproxy:<host>:<port> \u6307\u5b9a HTTP \u4ee3\u7406\u670d\u52a1\u5668 (\u7aef\u53e3\u9ed8\u8ba4\u4e3a 8080)\n\ -keep \u4fdd\u7559\u751f\u6210\u7684\u6587\u4ef6\n\ -p <pkg> \u6307\u5b9a\u76ee\u6807\u7a0b\u5e8f\u5305\n\ -quiet \u9690\u85cf wsimport \u8f93\u51fa\n\ -s <directory> \u6307\u5b9a\u653e\u7f6e\u751f\u6210\u7684\u6e90\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ -target <version> \u6309\u7ed9\u5b9a\u7684 JAXWS \u89c4\u8303\u7248\u672c\u751f\u6210\u4ee3\u7801\n\ \u9ed8\u8ba4\u4e3a 2.2, \u63a5\u53d7\u7684\u503c\u4e3a 2.0, 2.1 \u548c 2.2\n\ \u4f8b\u5982, 2.0 \u5c06\u4e3a JAXWS 2.0 \u89c4\u8303\u751f\u6210\u517c\u5bb9\u7684\u4ee3\u7801\n\ -verbose \u6709\u5173\u7f16\u8bd1\u5668\u5728\u6267\u884c\u4ec0\u4e48\u64cd\u4f5c\u7684\u8f93\u51fa\u6d88\u606f\n\ -version \u8f93\u51fa\u7248\u672c\u4fe1\u606f\n\ -wsdllocation <location> @WebServiceClient.wsdlLocation \u503c\n\ -clientjar <jarfile> \u521b\u5efa\u751f\u6210\u7684 Artifact \u7684 jar \u6587\u4ef6\u4ee5\u53ca\n\ \u8c03\u7528 Web \u670d\u52a1\u6240\u9700\u7684 WSDL \u5143\u6570\u636e\u3002\n\ -generateJWS \u751f\u6210\u5b58\u6839 JWS \u5b9e\u73b0\u6587\u4ef6\n\ -implDestDir <directory> \u6307\u5b9a\u751f\u6210 JWS \u5b9e\u73b0\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ -implServiceName <name> \u751f\u6210\u7684 JWS \u5b9e\u73b0\u7684\u670d\u52a1\u540d\u7684\u672c\u5730\u90e8\u5206\n\ -implPortName <name> \u751f\u6210\u7684 JWS \u5b9e\u73b0\u7684\u7aef\u53e3\u540d\u7684\u672c\u5730\u90e8\u5206
-
-wsimport.usage.extensions=\n\\\u6269\u5c55:\n\ -XadditionalHeaders \u6620\u5c04\u6807\u5934\u4e0d\u7ed1\u5b9a\u5230\u8bf7\u6c42\u6216\u54cd\u5e94\u6d88\u606f\u4e0d\u7ed1\u5b9a\u5230\n\ Java \u65b9\u6cd5\u53c2\u6570\n\ -Xauthfile \u7528\u4e8e\u4f20\u9001\u4ee5\u4e0b\u683c\u5f0f\u7684\u6388\u6743\u4fe1\u606f\u7684\u6587\u4ef6: \n\ http://username:password@example.org/stock?wsdl\n\ -Xdebug \u8f93\u51fa\u8c03\u8bd5\u4fe1\u606f\n\ -Xno-addressing-databinding \u5141\u8bb8 W3C EndpointReferenceType \u5230 Java \u7684\u7ed1\u5b9a\n\ -Xnocompile \u4e0d\u7f16\u8bd1\u751f\u6210\u7684 Java \u6587\u4ef6\n\ -XdisableAuthenticator \u7981\u7528\u7531 JAX-WS RI \u4f7f\u7528\u7684\u9a8c\u8bc1\u7a0b\u5e8f,\n\ \u5c06\u5ffd\u7565 -Xauthfile \u9009\u9879 (\u5982\u679c\u8bbe\u7f6e)\n\ -XdisableSSLHostnameVerification \u5728\u63d0\u53d6 wsdl \u65f6\u7981\u7528 SSL \u4e3b\u673a\u540d\n\ \u9a8c\u8bc1
-
-
-wsimport.usage.examples=\n\\\u793a\u4f8b:\n\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ wsimport -d generated http://example.org/stock?wsdl\n
-
-wsgen.usage=\u7528\u6cd5: {0} [options] <SEI>\n\n\u4f7f\u7528 "wsgen -help" \u83b7\u53d6\u9009\u9879\u7684\u8be6\u7ec6\u8bf4\u660e\u3002
-
-wsgen.help=\n\u7528\u6cd5: {0} [options] <SEI>\n\n\\\u5176\u4e2d [options] \u5305\u62ec:\n\ -classpath <path> \u6307\u5b9a\u67e5\u627e\u8f93\u5165\u7c7b\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ -cp <path> \u4e0e -classpath <path> \u76f8\u540c\n\ -d <directory> \u6307\u5b9a\u653e\u7f6e\u751f\u6210\u7684\u8f93\u51fa\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ -encoding <encoding> \u6307\u5b9a\u7531\u6e90\u6587\u4ef6\u4f7f\u7528\u7684\u5b57\u7b26\u7f16\u7801\n\ -extension \u5141\u8bb8\u4f9b\u5e94\u5546\u6269\u5c55 - \u4e0d\u6309\u89c4\u8303\n\ \u6307\u5b9a\u529f\u80fd\u3002\u4f7f\u7528\u6269\u5c55\u53ef\u80fd\u4f1a\n\ \u5bfc\u81f4\u5e94\u7528\u7a0b\u5e8f\u4e0d\u53ef\u79fb\u690d\u6216\n\ \u65e0\u6cd5\u4e0e\u5176\u4ed6\u5b9e\u73b0\u8fdb\u884c\u4e92\u64cd\u4f5c\n\ -help \u663e\u793a\u5e2e\u52a9\n\ -keep \u4fdd\u7559\u751f\u6210\u7684\u6587\u4ef6\n\ -r <directory> \u8d44\u6e90\u76ee\u6807\u76ee\u5f55, \u6307\u5b9a\u653e\u7f6e\n\ \u8d44\u6e90\u6587\u4ef6 (\u4f8b\u5982 WSDL) \u7684\u4f4d\u7f6e\n\ -s <directory> \u6307\u5b9a\u653e\u7f6e\u751f\u6210\u7684\u6e90\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ -verbose \u6709\u5173\u7f16\u8bd1\u5668\u5728\u6267\u884c\u4ec0\u4e48\u64cd\u4f5c\u7684\u8f93\u51fa\u6d88\u606f\n\ -version \u8f93\u51fa\u7248\u672c\u4fe1\u606f\n\ -wsdl[:protocol] \u751f\u6210 WSDL \u6587\u4ef6\u3002\u534f\u8bae\u662f\u53ef\u9009\u7684\u3002\n\ \u6709\u6548\u534f\u8bae\u662f{1},\n\ \u9ed8\u8ba4\u503c\u4e3a soap1.1\u3002\n\ \u975e\u6807\u51c6\u534f\u8bae{2}\n\ \u53ea\u80fd\u4e0e\n\ -extension \u9009\u9879\u7ed3\u5408\u4f7f\u7528\u3002\n\ -inlineSchemas \u751f\u6210\u7684 wsdl \u4e2d\u7684\u5185\u5d4c\u6a21\u5f0f\u3002\u5fc5\u987b\n\ \u4e0e -wsdl \u9009\u9879\u7ed3\u5408\u4f7f\u7528\u3002\n\ -servicename <name> \u6307\u5b9a\u8981\u7528\u5728\u751f\u6210\u7684 WSDL \u4e2d\u7684\u670d\u52a1\u540d\n\ \u4e0e -wsdl \u9009\u9879\u7ed3\u5408\u4f7f\u7528\u3002\n\ -portname <name> \u6307\u5b9a\u8981\u7528\u5728\u751f\u6210\u7684 WSDL \u4e2d\u7684\u7aef\u53e3\u540d\n\ \u4e0e -wsdl \u9009\u9879\u7ed3\u5408\u4f7f\u7528\u3002
-
-
-wsgen.usage.examples=\n\\\u793a\u4f8b:\n\ wsgen -cp . example.Stock\n\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
-wrapperTask.needEndorsed=\u60a8\u6b63\u5728\u9644\u5e26 JAX-WS {0} API \u7684 JDK6 \u4e0a\u8fd0\u884c, \u4f46\u6b64\u5de5\u5177\u9700\u8981 JAX-WS {1} API\u3002\u8bf7\u4f7f\u7528\u6388\u6743\u6807\u51c6\u8986\u76d6\u673a\u5236 (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \u6216\u8005\u5728 <{2}> \u4e0a\u8bbe\u7f6e xendorsed="true"\u3002
-
-# {0}, {2} - version (e.g. 2.1), {1} - absolute class location
-wrapperTask.loadingIncorrectApi=\u60a8\u6b63\u5728\u4ece{1}\u52a0\u8f7d JAX-WS {0} API, \u4f46\u6b64\u5de5\u5177\u9700\u8981 JAX-WS {2} API\u3002
-
-invoker.needEndorsed=\u60a8\u6b63\u5728\u9644\u5e26 JAX-WS {0} API \u7684 JDK6 \u4e0a\u8fd0\u884c, \u4f46\u6b64\u5de5\u5177\u9700\u8981 JAX-WS {1} API\u3002\u8bf7\u4f7f\u7528\u6388\u6743\u6807\u51c6\u8986\u76d6\u673a\u5236 (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \u6216\u8005\u4f7f\u7528 -Xendorsed \u9009\u9879\u3002
-
-
-#
-# Generic Messages
-#
-wscompile.invalidOption=\u65e0\u6cd5\u8bc6\u522b\u7684\u53c2\u6570{0}
-wsimport.noSuchJaxbOption=\u6ca1\u6709\u8fd9\u79cd JAXB \u9009\u9879: {0}
-
-wscompile.error=\u9519\u8bef: {0}
-wscompile.warning=\u8b66\u544a: {0}
-wscompile.info=\u4fe1\u606f: {0}
-wscompile.duplicateOption=\u91cd\u590d\u7684\u9009\u9879: {0}
-wscompile.noSuchDirectory=\u627e\u4e0d\u5230\u76ee\u5f55: {0}
-# wscompile.missingOptionArgument
-wscompile.missingOptionArgument=\u9009\u9879 \"{0}\" \u9700\u8981\u4e00\u4e2a\u53c2\u6570
-wscompile.compilationFailed=\u7f16\u8bd1\u5931\u8d25, \u9519\u8bef\u5e94\u8be5\u5df2\u4e88\u4ee5\u62a5\u544a
-wscompile.unsupportedEncoding=\u4e0d\u652f\u6301\u7684\u7f16\u7801: {0}
-
-wsimport.missingFile=\u7f3a\u5c11 WSDL_URI
-
-wsgen.invalid.protocol=\"{0}\" \u4e0d\u662f\u652f\u6301\u7684\u534f\u8bae\u3002\u652f\u6301\u7684\u534f\u8bae\u5305\u62ec: {1}\u3002
-wsgen.invalid.transport=\"{0}\" \u4e0d\u662f\u652f\u6301\u7684\u4f20\u8f93\u3002\u652f\u6301\u7684\u4f20\u8f93\u5305\u62ec: {1}\u3002
-wsgen.class.not.found=\u672a\u627e\u5230\u7c7b: \"{0}\"
-wsgen.could.not.create.file="\u65e0\u6cd5\u521b\u5efa\u6587\u4ef6: \"{0}\"
-wsgen.missingFile=\u7f3a\u5c11 SEI
-wsgen.soap12.without.extension=\u53ef\u9009\u534f\u8bae \"Xsoap1.2\" \u5fc5\u987b\u4e0e \"-extension\" \u9009\u9879\u7ed3\u5408\u4f7f\u7528\u3002
-wsgen.protocol.without.extension=\u53ef\u9009\u534f\u8bae \"{0}\" \u5fc5\u987b\u4e0e \"-extension\" \u9009\u9879\u7ed3\u5408\u4f7f\u7528\u3002
-wsgen.wsdl.arg.no.genwsdl=\"{0}\" \u9009\u9879\u53ea\u80fd\u4e0e "-wsdl" \u9009\u9879\u7ed3\u5408\u4f7f\u7528\u3002
-wsgen.servicename.missing.namespace=\u670d\u52a1\u540d \"{0}\" \u7f3a\u5c11\u540d\u79f0\u7a7a\u95f4\u3002
-wsgen.servicename.missing.localname=\u670d\u52a1\u540d \"{0}\" \u7f3a\u5c11\u672c\u5730\u540d\u79f0\u3002
-wsgen.portname.missing.namespace=\u7aef\u53e3\u540d \"{0}\" \u7f3a\u5c11\u540d\u79f0\u7a7a\u95f4\u3002
-wsgen.portname.missing.localname=\u7aef\u53e3\u540d \"{0}\" \u7f3a\u5c11\u672c\u5730\u540d\u79f0\u3002
-wsgen.class.must.be.implementation.class=\u7c7b \"{0}\" \u4e0d\u662f\u7aef\u70b9\u5b9e\u73b0\u7c7b\u3002
-wsimport.NotAFileNorURL = "{0}" \u4e0d\u662f\u6587\u4ef6\u540d\u4e5f\u4e0d\u662f URL
-
-wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen \u65e0\u6cd5\u5728\u7c7b{1}\u4e0a\u4e3a\u975e SOAP \u7ed1\u5b9a{0}\u751f\u6210 WSDL
-
-wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen \u65e0\u6cd5\u5728\u7c7b{1}\u4e0a\u4e3a SOAP 1.2 \u7ed1\u5b9a{0}\u751f\u6210 WSDL\u3002\n
-Please \u6307\u5b9a \"-extension\" \u548c \"-wsdl:protocol XSoap1.2\" \u5f00\u5173\u3002\u4f8b\u5982:\n\n
-wsgen -wsdl:protocol XSoap1.2 -extenson {1}
-wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\" \u5fc5\u987b\u4e0e \"-wsdl\" \u9009\u9879\u7ed3\u5408\u4f7f\u7528
-
-wsgen.no.webservices.class=wsgen \u672a\u627e\u5230\u5e26\u6709 @WebService \u6ce8\u91ca\u7684\u4efb\u4f55\u7c7b\u3002\u8bf7\u5728{0}\u4e0a\u6307\u5b9a @WebService \u6ce8\u91ca\u3002
-
-wsimport.no.wsdl=\u65e0\u6cd5\u8bfb\u53d6 WSDL \u6587\u6863: {0}, \u539f\u56e0\u4e3a 1) \u627e\u4e0d\u5230\u6587\u6863; 2) \u65e0\u6cd5\u8bfb\u53d6\u6587\u6863; 3) \u6587\u6863\u7684\u6839\u5143\u7d20\u4e0d\u662f <wsdl:definitions>\u3002
-
-wsimport.FailedToParse = \u65e0\u6cd5\u89e3\u6790 "{0}": {1}
-
-wsimport.ParsingWSDL=\u6b63\u5728\u89e3\u6790 WSDL...\n\n
-wsimport.GeneratingCode=\n\u6b63\u5728\u751f\u6210\u4ee3\u7801...\n
-wsimport.CompilingCode=\n\u6b63\u5728\u7f16\u8bd1\u4ee3\u7801...\n
-wsimport.ILLEGAL_TARGET_VERSION = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u76ee\u6807\u7248\u672c\u3002\u652f\u6301 "2.0" \u548c "2.1"\u3002
-
-wsimport.ILLEGAL_AUTH_INFO = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u6388\u6743\u4fe1\u606f\u683c\u5f0f\u3002\u683c\u5f0f\u5e94\u4e3a http[s]://user:password@host:port//<url-path>\u3002
-
-wsimport.readingAuthFile = \u6b63\u5728\u5c1d\u8bd5\u8bfb\u53d6\u6388\u6743\u6587\u4ef6: "{0}"...
-
-# {0} - path to current authorization file, {1} - path to metro authorization file
-wsimport.authFileNotFound = \u672a\u627e\u5230\u6388\u6743\u6587\u4ef6 "{0}"\u3002\u5982\u679c WSDL \u8bbf\u95ee\u9700\u8981\u57fa\u672c\u9a8c\u8bc1, \u8bf7\u5728{1}\u4e2d\u63d0\u4f9b\u5177\u6709\u8bfb\u53d6\u8bbf\u95ee\u6743\u9650\u7684\u6388\u6743\u6587\u4ef6, \u6216\u8005\u4f7f\u7528 -Xauthfile \u6307\u5b9a\u6388\u6743\u6587\u4ef6\u5e76\u5728\u6bcf\u4e00\u884c\u4e0a\u4f7f\u7528\u4ee5\u4e0b\u683c\u5f0f\u63d0\u4f9b\u6388\u6743\u4fe1\u606f: http[s]://user:password@host:port//<url-path>
-
-# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//
-wsimport.authInfoNeeded = {0}, "{1}" \u9700\u8981\u6388\u6743, \u8bf7\u5728{2}\u4e2d\u63d0\u4f9b\u5177\u6709\u8bfb\u53d6\u8bbf\u95ee\u6743\u9650\u7684\u6388\u6743\u6587\u4ef6, \u6216\u8005\u4f7f\u7528 -Xauthfile \u6307\u5b9a\u6388\u6743\u6587\u4ef6\u5e76\u5728\u6bcf\u4e00\u884c\u4e0a\u4f7f\u7528\u4ee5\u4e0b\u683c\u5f0f\u63d0\u4f9b\u6388\u6743\u4fe1\u606f: http[s]://user:password@host:port//<url-path>
-
-wsimport.AUTH_INFO_LINENO = "{1}\u7684\u7b2c {0} \u884c
-
-
-wsimport.ErrorMessage = [ERROR] {0}
-
-wsimport.WarningMessage = [WARNING] {0}
-
-wsimport.InfoMessage = [INFO] {0}
-
-wsimport.DebugMessage = [DEBUG] {0}
-
-wsimport.httpRedirect = \u670d\u52a1\u5668\u8fd4\u56de\u4e86 HTTP \u72b6\u6001\u4ee3\u7801: "{0}", \u6b63\u5728\u4f7f\u7528 "{1}" \u91cd\u8bd5
-
-wsimport.maxRedirectAttempt = \u65e0\u6cd5\u83b7\u53d6\u5df2\u8fbe\u5230\u7684 WSDL \u6700\u5927\u91cd\u5b9a\u5411\u6b21\u6570 (5)
-
-wsimport.wsdllocation.clientjar = \u4f7f\u7528 clientJar \u9009\u9879\u65f6\u4e0d\u80fd\u6307\u5b9a wsdlLocation
-# {0} - path to a zip file
-wsimport.archivingArtifacts=\n\u5c06\u751f\u6210\u7684 Artifact \u5f52\u6863\u5230{0}\u3002\n
-wsimport.archiveArtifact=\u5c06{0}\u6dfb\u52a0\u5230\u6863\u6848{1}
-wsimport.fetchingMetadata=\n\u4e0b\u8f7d WSDL \u53ca\u5173\u8054\u7684\u5143\u6570\u636e\n
-# {0} - URI, {1} - path to a file
-wsimport.document.download=\n\u5c06\u5143\u6570\u636e\u6587\u6863\u4ece{0}\u4e0b\u8f7d\u5230{1}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_TW.properties
deleted file mode 100644
index b92715bc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_TW.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wsimport.usage=\u7528\u6cd5: {0} [options] <WSDL_URI>\n\n\u4f7f\u7528 "wsimport -help" \u53ef\u53d6\u5f97\u9078\u9805\u7684\u8a73\u7d30\u63cf\u8ff0.
-
-wsimport.help=\n\u7528\u6cd5: {0} [options] <WSDL_URI>\n\n\\\u5176\u4e2d [options] \u5305\u62ec:\n\\ -b <path> \u6307\u5b9a jaxws/jaxb \u9023\u7d50\u6a94\u6848\u6216\u5176\u4ed6\u7db1\u8981\n\\ (\u6bcf\u500b <path> \u5747\u5fc5\u9808\u8981\u6709\u81ea\u5df1\u7684 -b)\n\\ -B<jaxbOption> \u5c07\u6b64\u9078\u9805\u50b3\u9001\u5230 JAXB \u7db1\u8981\u7de8\u8b6f\u5668\n\\ -catalog <file> \u6307\u5b9a\u8981\u7528\u4ee5\u89e3\u6790\u5916\u90e8\u500b\u9ad4\u53c3\u7167\u7684\u76ee\u9304\u6a94\u6848\n\\ \u652f\u63f4 TR9401\u3001XCatalog \u4ee5\u53ca OASIS XML \u76ee\u9304\u683c\u5f0f.\n\\ -d <directory> \u6307\u5b9a\u7f6e\u653e\u7522\u751f\u4e4b\u8f38\u51fa\u6a94\u6848\u7684\u4f4d\u7f6e\n\\ -encoding <encoding> \u6307\u5b9a\u4f86\u6e90\u6a94\u6848\u6240\u4f7f\u7528\u7684\u5b57\u5143\u7de8\u78bc\n\\ -extension \u5141\u8a31\u5ee0\u5546\u64f4\u5145 - \u672a\u7531\u898f\u683c\u6307\u5b9a\n\\ \u529f\u80fd. \u4f7f\u7528\u64f4\u5145\u53ef\u80fd\u5c0e\u81f4\n\\ \u4e0d\u53ef\u651c\u61c9\u7528\u7a0b\u5f0f\u6216\u8005\u53ef\u80fd\u7121\u6cd5\n\\ \u8207\u5176\u4ed6\u5be6\u884c\u4e92\u52d5\u64cd\u4f5c\n\\ -help \u986f\u793a\u8aaa\u660e\n\\ -httpproxy:<host>:<port> \u6307\u5b9a HTTP \u4ee3\u7406\u4e3b\u6a5f\u4f3a\u670d\u5668 (\u9023\u63a5\u57e0\u9810\u8a2d\u70ba 8080)\n\\ -keep \u4fdd\u7559\u7522\u751f\u7684\u6a94\u6848\n\\ -p <pkg> \u6307\u5b9a\u76ee\u6a19\u5957\u88dd\u7a0b\u5f0f\n\\ -quiet \u6291\u5236 wsimport \u8f38\u51fa\n\\ -s <directory> \u6307\u5b9a\u7f6e\u653e\u7522\u751f\u4e4b\u4f86\u6e90\u6a94\u6848\u7684\u4f4d\u7f6e\n\\ -target <version> \u6839\u64da\u6307\u5b9a\u7684 JAXWS \u898f\u683c\u7248\u672c\u7522\u751f\u7a0b\u5f0f\u78bc\n\\ \u9810\u8a2d\u70ba 2.2, \u63a5\u53d7\u7684\u503c\u5305\u62ec 2.0\u30012.1 \u4ee5\u53ca 2.2\n\\ \u4f8b\u5982, 2.0 \u5c07\u6703\u7522\u751f\u8207 JAXWS 2.0 \u898f\u683c\u76f8\u5bb9\u7684\u7a0b\u5f0f\u78bc\n\\ -verbose \u8f38\u51fa\u7de8\u8b6f\u5668\u57f7\u884c\u76f8\u95dc\u8a0a\u606f\n\\ -version \u5217\u5370\u7248\u672c\u8cc7\u8a0a\n\\ -wsdllocation <location> @WebServiceClient.wsdlLocation \u503c\n\\ -clientjar <jarfile> \u5efa\u7acb\u7522\u751f\u4e4b\u4f7f\u7528\u8005\u81ea\u5efa\u7269\u4ef6\u7684 jar \u6a94\u6848, \u4ee5\u53ca\n\\ \u547c\u53eb Web \u670d\u52d9\u6240\u9700\u7684 WSDL \u63cf\u8ff0\u8cc7\u6599.\n\\ -generateJWS \u7522\u751f stub JWS \u5be6\u884c\u6a94\u6848\n\\ -implDestDir <directory> \u6307\u5b9a\u7522\u751f JWS \u5be6\u884c\u6a94\u6848\u7684\u4f4d\u7f6e\n\\ -implServiceName <name> \u7522\u751f\u4e4b JWS \u5be6\u884c\u7684\u670d\u52d9\u540d\u7a31\u672c\u6a5f\u90e8\u5206\n\\ -implPortName <name> \u7522\u751f\u4e4b JWS \u5be6\u884c\u7684\u9023\u63a5\u57e0\u540d\u7a31\u672c\u6a5f\u90e8\u5206
-
-wsimport.usage.extensions=\n\\\u64f4\u5145:\n\\ -XadditionalHeaders \u5c07\u672a\u9023\u7d50\u81f3\u8981\u6c42\u6216\u56de\u61c9\u8a0a\u606f\u7684\u6a19\u982d\u5c0d\u61c9\u81f3 \n\\ Java \u65b9\u6cd5\u53c3\u6578\n\\ -Xauthfile \u4fdd\u7559\u6388\u6b0a\u8cc7\u8a0a\u7684\u6a94\u6848, \u5176\u683c\u5f0f\u70ba: \n\\ http://username:password@example.org/stock?wsdl\n\\ -Xdebug \u5217\u5370\u9664\u932f\u8cc7\u8a0a\n\\ -Xno-addressing-databinding \u555f\u7528\u5c07 W3C EndpointReferenceType \u9023\u7d50\u81f3 Java\n\\ -Xnocompile \u4e0d\u7de8\u8b6f\u7522\u751f\u7684 Java \u6a94\u6848\n\\ -XdisableAuthenticator \u505c\u7528 JAX-WS RI \u6240\u4f7f\u7528\u7684\u300c\u8a8d\u8b49\u7a0b\u5f0f\u300d,\n\\ -Xauthfile \u9078\u9805\u5c07\u88ab\u5ffd\u7565, \u5982\u679c\u8a2d\u5b9a\n\\ -XdisableSSLHostnameVerification \u5728\u64f7\u53d6 wsdl \u6642\u505c\u7528 SSL \u4e3b\u6a5f\u540d\u7a31\n\\ \u9a57\u8b49
-
-
-wsimport.usage.examples=\n\\\u7bc4\u4f8b:\n\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ wsimport -d generated http://example.org/stock?wsdl\n
-
-wsgen.usage=\u7528\u6cd5: {0} [options] <SEI>\n\n\u4f7f\u7528 "wsgen -help" \u53ef\u53d6\u5f97\u9078\u9805\u7684\u8a73\u7d30\u63cf\u8ff0.
-
-wsgen.help=\n\u7528\u6cd5: {0} [options] <SEI>\n\n\\\u5176\u4e2d [options] \u5305\u62ec:\n\ -classpath <path> \u6307\u5b9a\u5c0b\u627e\u8f38\u5165\u985e\u5225\u6a94\u6848\u7684\u4f4d\u7f6e\n\ -cp <path> \u8207 -classpath <path> \u76f8\u540c\n\ -d <directory> \u6307\u5b9a\u7f6e\u653e\u7522\u751f\u4e4b\u8f38\u51fa\u6a94\u6848\u7684\u4f4d\u7f6e\n\ -encoding <encoding> \u6307\u5b9a\u4f86\u6e90\u6a94\u6848\u6240\u4f7f\u7528\u7684\u5b57\u5143\u7de8\u78bc\n\ -extension \u5141\u8a31\u5ee0\u5546\u64f4\u5145 - \u672a\u7531\u898f\u683c\u6307\u5b9a\n\ \u529f\u80fd. \u4f7f\u7528\u64f4\u5145\u53ef\u80fd\u5c0e\u81f4\u4e0d\n\ \u53ef\u651c\u61c9\u7528\u7a0b\u5f0f\u6216\u8005\u53ef\u80fd\u7121\u6cd5\n\ \u8207\u5176\u4ed6\u5be6\u884c\u4e92\u52d5\u64cd\u4f5c\n\ -help \u986f\u793a\u8aaa\u660e\n\ -keep \u4fdd\u7559\u7522\u751f\u7684\u6a94\u6848s\n\ -r <directory> \u8cc7\u6e90\u76ee\u7684\u5730\u76ee\u9304, \u6307\u5b9a\u7f6e\u653e\n\ \u8cc7\u6e90\u6a94\u6848 (\u4f8b\u5982 WSDL) \u7684\u4f4d\u7f6e\n\ -s <directory> \u6307\u5b9a\u7f6e\u653e\u7522\u751f\u4e4b\u4f86\u6e90\u6a94\u6848\u7684\u4f4d\u7f6e\n\ -verbose \u8f38\u51fa\u7de8\u8b6f\u5668\u57f7\u884c\u76f8\u95dc\u8a0a\u606f\n\ -version \u5217\u5370\u7248\u672c\u8cc7\u8a0a\n\ -wsdl[:protocol] \u7522\u751f WSDL \u6a94\u6848. \u53ef\u9078\u64c7\u662f\u5426\u6307\u5b9a\u5354\u5b9a.\n\ \u6709\u6548\u7684\u5354\u5b9a\u70ba {1},\n\ \u9810\u8a2d\u70ba soap1.1.\n\ \u975e\u6a19\u6e96\u5354\u5b9a {2}\n\ \u53ea\u80fd\u642d\u914d -extension \u9078\u9805\n\ \u4e00\u8d77\u59cb\u7528.\n\ -inlineSchemas \u7522\u751f\u4e4b wsdl \u4e2d\u7684\u5167\u5d4c\u7db1\u8981. \u5fc5\u9808\n\ \u642d\u914d -wsdl \u9078\u9805\u4e00\u8d77\u59cb\u7528.\n\ -servicename <name> \u6307\u5b9a\u7522\u751f\u4e4b WSDL \u4e2d\u6240\u8981\u4f7f\u7528\u7684\u300c\u670d\u52d9\u300d\u540d\u7a31\n\ \u642d\u914d -wsdl \u9078\u9805\u4e00\u8d77\u59cb\u7528.\n\ -portname <name> \u6307\u5b9a\u7522\u751f\u4e4b WSDL \u4e2d\u6240\u8981\u4f7f\u7528\u7684\u300c\u9023\u63a5\u57e0\u300d\u540d\u7a31\n\ \u642d\u914d -wsdl \u9078\u9805\u4e00\u8d77\u59cb\u7528.
-
-
-wsgen.usage.examples=\n\\\u7bc4\u4f8b:\n\ wsgen -cp . example.Stock\n\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n
-wrapperTask.needEndorsed=\u60a8\u76ee\u524d\u57f7\u884c\u96a8\u9644\u65bc JAX-WS {0} API \u7684 JDK6, \u4f46\u662f\u6b64\u5de5\u5177\u9700\u8981\u4f7f\u7528 JAX-WS {1} API. \u8acb\u4f7f\u7528\u8a8d\u53ef\u7684\u6a19\u6e96\u8986\u5beb\u6a5f\u5236 (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \u6216\u8005\u5728 <{2}> \u8a2d\u5b9a xendorsed="true".
-
-# {0}, {2} - version (e.g. 2.1), {1} - absolute class location
-wrapperTask.loadingIncorrectApi=\u60a8\u6b63\u5728\u5f9e {1} \u8f09\u5165 JAX-WS {0} API, \u4f46\u662f\u6b64\u5de5\u5177\u9700\u8981\u4f7f\u7528 JAX-WS {2} API.
-
-invoker.needEndorsed=\u60a8\u76ee\u524d\u57f7\u884c\u96a8\u9644\u65bc JAX-WS {0} API \u7684 JDK6, \u4f46\u662f\u6b64\u5de5\u5177\u9700\u8981\u4f7f\u7528 JAX-WS {1} API. \u8acb\u4f7f\u7528\u8a8d\u53ef\u7684\u6a19\u6e96\u8986\u5beb\u6a5f\u5236 (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \u6216\u8005\u4f7f\u7528 -Xendorsed \u9078\u9805.
-
-
-#
-# Generic Messages
-#
-wscompile.invalidOption=\u7121\u6cd5\u8fa8\u8b58\u7684\u53c3\u6578 {0}
-wsimport.noSuchJaxbOption=\u6c92\u6709\u6b64 JAXB \u9078\u9805: {0}
-
-wscompile.error=\u932f\u8aa4: {0}
-wscompile.warning=\u8b66\u544a: {0}
-wscompile.info=\u8cc7\u8a0a: {0}
-wscompile.duplicateOption=\u91cd\u8907\u7684\u9078\u9805: {0}
-wscompile.noSuchDirectory=\u627e\u4e0d\u5230\u76ee\u9304: {0}
-# wscompile.missingOptionArgument
-wscompile.missingOptionArgument=\u9078\u9805 \"{0}\" \u5fc5\u9808\u8981\u6709\u4e00\u500b\u5f15\u6578
-wscompile.compilationFailed=\u7de8\u8b6f\u5931\u6557, \u5fc5\u9808\u5831\u544a\u932f\u8aa4
-wscompile.unsupportedEncoding=\u4e0d\u652f\u63f4\u7684\u7de8\u78bc: {0}
-
-wsimport.missingFile=\u907a\u6f0f WSDL_URI
-
-wsgen.invalid.protocol=\u4e0d\u652f\u63f4 \"{0}\" \u5354\u5b9a. \u652f\u63f4\u7684\u5354\u5b9a\u5305\u62ec: {1}.
-wsgen.invalid.transport=\u4e0d\u652f\u63f4 \"{0}\" \u50b3\u8f38. \u652f\u63f4\u7684\u50b3\u8f38\u5305\u62ec: {1}.
-wsgen.class.not.found=\u627e\u4e0d\u5230\u985e\u5225: \"{0}\"
-wsgen.could.not.create.file="\u7121\u6cd5\u5efa\u7acb\u6a94\u6848: "\\{0}\"
-wsgen.missingFile=\u907a\u6f0f SEI
-wsgen.soap12.without.extension=\u9078\u64c7\u6027\u5354\u5b9a \"Xsoap1.2\" \u5fc5\u9808\u642d\u914d \"-extension\" \u9078\u9805\u4e00\u8d77\u4f7f\u7528.
-wsgen.protocol.without.extension=\u9078\u64c7\u6027\u5354\u5b9a \"{0}\" \u5fc5\u9808\u642d\u914d \"-extension\" \u9078\u9805\u4e00\u8d77\u4f7f\u7528.
-wsgen.wsdl.arg.no.genwsdl=\"{0}\" \u9078\u9805\u53ea\u80fd\u642d\u914d "-wsdl" \u9078\u9805\u4e00\u8d77\u4f7f\u7528.
-wsgen.servicename.missing.namespace=\u670d\u52d9\u540d\u7a31 \"{0}\" \u907a\u6f0f\u547d\u540d\u7a7a\u9593.
-wsgen.servicename.missing.localname=\u670d\u52d9\u540d\u7a31 \"{0}\" \u907a\u6f0f\u672c\u6a5f\u540d\u7a31.
-wsgen.portname.missing.namespace=\u9023\u63a5\u57e0\u540d\u7a31 \"{0}\" \u907a\u6f0f\u547d\u540d\u7a7a\u9593.
-wsgen.portname.missing.localname=\u9023\u63a5\u57e0\u540d\u7a31 \"{0}\" \u907a\u6f0f\u672c\u6a5f\u540d\u7a31.
-wsgen.class.must.be.implementation.class=\u985e\u5225 \"{0}\" \u4e0d\u662f\u4e00\u500b\u7aef\u9ede\u5be6\u884c\u985e\u5225.
-wsimport.NotAFileNorURL = "{0}" \u4e0d\u662f\u6a94\u6848\u540d\u7a31\u6216 URL
-
-wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen \u7121\u6cd5\u7522\u751f\u985e\u5225 {1} \u4e4b\u975e SOAP \u9023\u7d50 {0} \u7684 WSDL
-
-wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen \u7121\u6cd5\u7522\u751f\u985e\u5225 {1} \u4e4b SOAP 1.2 \u9023\u7d50 {0} \u7684 WSDL.\n
-Please \u6307\u5b9a \"-extension\" \u548c \"-wsdl:protocol XSoap1.2\" \u53c3\u6578. \u4f8b\u5982:\n\n
-wsgen -wsdl:protocol XSoap1.2 -extenson {1}
-wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\" \u5fc5\u9808\u642d\u914d \"-wsdl\" \u9078\u9805\u4e00\u8d77\u4f7f\u7528
-
-wsgen.no.webservices.class=wsgen \u627e\u4e0d\u5230\u4efb\u4f55\u542b @WebService \u8a3b\u89e3\u7684\u985e\u5225. \u8acb\u5728 {0} \u6307\u5b9a @WebService \u8a3b\u89e3.
-
-wsimport.no.wsdl=\u7121\u6cd5\u8b80\u53d6 WSDL \u6587\u4ef6: {0}, \u56e0\u70ba 1) \u627e\u4e0d\u5230\u6587\u4ef6; /2) \u7121\u6cd5\u8b80\u53d6\u6587\u4ef6; 3) \u6587\u4ef6\u7684\u6839\u5143\u7d20\u4e0d\u662f <wsdl:definitions>.
-
-wsimport.FailedToParse = \u7121\u6cd5\u5256\u6790 "{0}": {1}
-
-wsimport.ParsingWSDL=\u6b63\u5728\u5256\u6790 WSDL...\n\n
-wsimport.GeneratingCode=\n\u6b63\u5728\u7522\u751f\u7a0b\u5f0f\u78bc...\n
-wsimport.CompilingCode=\n\u6b63\u5728\u7de8\u8b6f\u7a0b\u5f0f\u78bc...\n
-wsimport.ILLEGAL_TARGET_VERSION = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u76ee\u6a19\u7248\u672c. \u652f\u63f4 "2.0" \u548c "2.1".
-
-wsimport.ILLEGAL_AUTH_INFO = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u6388\u6b0a\u8cc7\u8a0a\u683c\u5f0f. \u683c\u5f0f\u70ba http[s]://user:password@host:port//<url-path>.
-
-wsimport.readingAuthFile = \u6b63\u5728\u5617\u8a66\u8b80\u53d6\u6388\u6b0a\u6a94\u6848 : "{0}"...
-
-# {0} - path to current authorization file, {1} - path to metro authorization file
-wsimport.authFileNotFound = \u627e\u4e0d\u5230\u6388\u6b0a\u6a94\u6848 "{0}". \u5982\u679c WSDL \u5b58\u53d6\u9700\u8981\u300c\u57fa\u672c\u8a8d\u8b49\u300d, \u8acb\u5728 {1} \u63d0\u4f9b\u5177\u6709\u8b80\u53d6\u5b58\u53d6\u6b0a\u7684\u6388\u6b0a\u6a94\u6848, \u6216\u8005\u4f7f\u7528 -Xauthfile \u6307\u5b9a\u6388\u6b0a\u6a94\u6848, \u4e26\u4e14\u5728\u6bcf\u4e00\u884c\u63d0\u4f9b\u6388\u6b0a\u8cc7\u8a0a (\u4f7f\u7528\u4ee5\u4e0b\u683c\u5f0f) : http[s]://user:password@host:port//<url-path>
-
-# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//
-wsimport.authInfoNeeded = {0}, "{1}" \u9700\u8981\u6388\u6b0a, \u8acb\u5728 {2} \u63d0\u4f9b\u5177\u6709\u8b80\u53d6\u5b58\u53d6\u6b0a\u7684\u6388\u6b0a\u6a94\u6848, \u6216\u8005\u4f7f\u7528 -Xauthfile \u6307\u5b9a\u6388\u6b0a\u6a94\u6848, \u4e26\u4e14\u5728\u6bcf\u4e00\u884c\u63d0\u4f9b\u6388\u6b0a\u8cc7\u8a0a (\u4f7f\u7528\u4ee5\u4e0b\u683c\u5f0f) : http[s]://user:password@host:port//<url-path>
-
-wsimport.AUTH_INFO_LINENO = "{1} \u7684\u7b2c {0} \u884c
-
-
-wsimport.ErrorMessage = [ERROR] {0}
-
-wsimport.WarningMessage = [WARNING] {0}
-
-wsimport.InfoMessage = [INFO] {0}
-
-wsimport.DebugMessage = [DEBUG] {0}
-
-wsimport.httpRedirect = \u4f3a\u670d\u5668\u50b3\u56de HTTP \u72c0\u614b\u4ee3\u78bc: "{0}", \u4f7f\u7528 "{1}" \u91cd\u8a66
-
-wsimport.maxRedirectAttempt = \u7121\u6cd5\u53d6\u5f97 WSDL, \u5df2\u9054\u91cd\u5c0e\u6b21\u6578\u4e0a\u9650 (5)
-
-wsimport.wsdllocation.clientjar = \u4f7f\u7528 clientJar \u9078\u9805\u6642\u7121\u6cd5\u6307\u5b9a wsdlLocation
-# {0} - path to a zip file
-wsimport.archivingArtifacts=\n\u6b63\u5728\u5c07\u7522\u751f\u7684\u4f7f\u7528\u8005\u81ea\u5efa\u7269\u4ef6\u5b58\u6a94\u81f3 {0}.\n
-wsimport.archiveArtifact=\u6b63\u5728\u5c07 {0} \u52a0\u5230\u5b58\u6a94 {1}
-wsimport.fetchingMetadata=\n\u6b63\u5728\u4e0b\u8f09 WSDL \u548c\u95dc\u806f\u7684\u63cf\u8ff0\u8cc7\u6599\n
-# {0} - URI, {1} - path to a file
-wsimport.document.download=\n\u6b63\u5728\u5c07 {0} \u7684\u63cf\u8ff0\u8cc7\u6599\u6587\u4ef6\u4e0b\u8f09\u81f3 {1}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl.properties
deleted file mode 100644
index 60fe1fd9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl.properties
+++ /dev/null
@@ -1,171 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-localized.error={0}
-parsing.wsdlNotDefaultNamespace=default namespace must be \"{0}\"
-# Not concatenated with any other string.
-parsing.onlyOneOfElementOrTypeRequired=only one of the \"element\" or \"type\" attributes is allowed in part \"{0}\"
-# Not concatenated with any other string.
-parsing.elementOrTypeRequired=warning: part {0} is ignored, either the \"element\" or the \"type\" attribute is required in part \"{0}\"
-parsing.invalidElement=invalid element: \"{0}\" (in namespace \"{1}\")
-parsing.invalidAttributeValue=invalid value \"{1}\" for attribute \"{0}\"
-parsing.invalidExtensionElement=invalid extension element: \"{0}\" (in namespace \"{1}\")
-parsing.invalidWsdlElement=invalid WSDL element: \"{0}\"
-parsing.requiredExtensibilityElement=unknown required extensibility element \"{0}\" (in namespace \"{1}\")
-parsing.unknownExtensibilityElementOrAttribute=unknown extensibility element or attribute \"{0}\" (in namespace \"{1}\")
-parsing.tooManyElements=too many \"{0}\" elements under \"{1}\" element \"{2}\"
-parsing.invalidOperationStyle=operation \"{0}\" has an invalid style
-# {0} - "definitions". Not concatenated with any other string.
-parsing.onlyOneTypesAllowed=only one "types" element allowed in "{0}"
-# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string.
-parsing.onlyOneDocumentationAllowed=only one "documentation" element allowed in "{0}"
-parsing.incorrectRootElement=expected root element \"{2}\" (in namespace \"{3}\"), found element \"{0}\" (in namespace \"{1}\")
-parsing.unknownImportedDocumentType=imported document is of unknown type: {0}
-# Not concatenated with any other string.
-parsing.unknownNamespacePrefix=undeclared namespace prefix: \"{0}\"
-parsing.invalidURI=invalid URI: {0}
-# {0} - WSDL URL
-parsing.ioExceptionWithSystemId=failed to parse document at \"{0}\"
-# {0} - exception message
-parsing.ioException=parsing failed: {0}
-# {0} - WSDL URL, Not concatenated with any other string.
-parsing.saxExceptionWithSystemId=invalid WSDL file! failed to parse document at \"{0}\"
-# {0} - exception message, Not concatenated with any other string.
-parsing.saxException=invalid WSDL file! parsing failed: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.parserConfigException=invalid WSDL file! parsing failed: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.factoryConfigException=invalid WSDL file! parsing failed: {0}
-
-# Wrapped into an Exception. Not concatenated with any other string.
-parsing.missingRequiredAttribute=missing required attribute \"{1}\" of element \"{0}\"
-parsing.invalidTag=expected element \"{1}\", found \"{0}\"
-# {4} - element name
-parsing.invalidTagNS=Invalid WSDL at {4}: expected element \"{2}\" (in namespace \"{3}\"), found element \"{0}\" (in namespace \"{1}\")
-parsing.nonWhitespaceTextFound=found unexpected non-whitespace text: \"{0}\"
-# Not concatenated with any other string (written on a separate line).
-parsing.elementExpected=unexpected non-element found
-#
-entity.duplicate=duplicate entity: \"{0}\"
-# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string.
-entity.duplicateWithType=duplicate \"{0}\" entity: \"{1}\"
-
-entity.notFoundByID=invalid entity id: \"{0}\"
-entity.notFoundByQName={0} \"{1}\" not found in the wsdl: {2}
-entity.notFound.portType=wsdl:portType \"{0}\" referenced by wsdl:binding \"{1}\", but it's not found in the wsdl
-entity.notFound.binding=wsdl:binding \"{0}" referenced by wsdl:port \"{1}\", but it's not found in the wsdl
-
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.missingRequiredAttribute=missing required attribute \"{0}\" of element \"{1}\"
-validation.missingRequiredProperty=missing required property \"{0}\" of element \"{1}\"
-validation.missingRequiredSubEntity=missing required sub-entity \"{0}\" of element \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidElement=invalid element: \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\"
-validation.invalidSimpleTypeInElement=invalid element: \"{1}\", has named simpleType: \"{0}\"
-validation.duplicatedElement=duplicated element: \"{0}\"
-validation.duplicatePartName=Invalid WSDL, duplicate parts in a wsdl:message is not allowed. \nwsdl:message {0} has a duplicated part name: \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidSubEntity=invalid sub-element \"{0}\" of element \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidAttribute=invalid attribute \"{0}\" of element \"{1}\"
-validation.invalidAttributeValue=invalid value \"{1}\" for attribute \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidRange=invalid range found (min: {0}, max: {1})
-validation.exclusiveAttributes=exclusive attributes: \"{0}\", \"{1}\"
-validation.incorrectTargetNamespace=target namespace is incorrect (expected: {1}, found: {0})
-# Usage not found. TODO Remove
-#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\"
-validation.shouldNotHappen=internal error ("{0}")
-# Usage not found. TODO Remove
-#validation.invalidToken=invalid token \"{0}\"
-# Usage not found. TODO Remove
-#validation.notSimpleType=not a simple type: \"{0}\"
-validation.ambiguousName=ambiguous operation name: \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidPrefix=undeclared namespace prefix: \"{0}\"
-# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded"
-validation.unsupportedUse.encoded="Use of SOAP Encoding is not supported. \nSOAP extension element on line {0} in {1} has use=\"encoded\" "
-# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string.
-warning.faultEmptyAction=ignoring empty Action in \"{0}\" {1} element of \"{2}\" operation, using default instead
-# Not concatenated with any other string.
-warning.inputOutputEmptyAction=ignoring empty Action in {0} element of \"{1}\" operation, using default instead
-
-#wsi compliant WSDL warnings
-warning.wsi.r2001=Not a WSI-BP compliant WSDL (R2001, R2002). wsdl:import must import only WSDL documents. It's trying to import: \"{0}\"
-warning.wsi.r2002=Not a WSI-BP compliant WSDL (R2002). wsdl:import must not be used to import XML Schema embedded in the WSDL document. Expected WSDL namespace: {0}, found: {1}
-warning.wsi.r2003=Not a WSI-BP compliant WSDL (R2003). xsd:import must only be used inside xsd:schema elements.
-warning.wsi.r2004=Not a WSI-BP compliant WSDL (R2001, R2004). xsd:import must not import XML Schema definitions embedded inline within the WSDL document.
-
-#Parser
-Parsing.ParseFailed = \
-\tFailed to parse the WSDL.
-
-Parsing.NotAWSDL=Failed to get WSDL components, probably {0} is not a valid WSDL file.
-
-AbstractReferenceFinderImpl.UnableToParse = \
-\tUnable to parse "{0}" : {1}
-
-# Not concatenated with any other string.
-Parser.NotABindingFile = \
-\tnot an external binding file. The root element must be '{'http://java.sun.com/xml/ns/jaxws'}'bindings but it is '{'{0}'}'{1}
-
-
-#Internalizer
-Internalizer.TwoVersionAttributes = \
-\tBoth jaxws:version and version are present
-Internalizer.IncorrectVersion = \
-\tJAXWS version attribute must be "2.0"
-
-Internalizer.VersionNotPresent = \
-\tJAXWS version attribute must be present
-
-internalizer.targetNotAnElement= \
-\tTarget node is not an element
-internalizer.targetNotFound= \
-\tNo target found for the wsdlLocation: {0}
-
-Internalizer.IncorrectSchemaReference= \
-\t"{0}" is not a part of this compilation. Is this a mistake for "{1}"?
-
-internalizer.XPathEvaluationError = \
- XPath error: {0}
-internalizer.XPathEvaluatesToNoTarget = \
- XPath evaluation of "{0}" results in an empty target node
-internalizer.XPathEvaulatesToTooManyTargets = \
- XPath evaluation of "{0}" results in too many ({1}) target nodes
-internalizer.XPathEvaluatesToNonElement = \
- XPath evaluation of "{0}" needs to result in an element.
-invalid.customization.namespace=Ignoring customization: \"{0}\", because it has no namespace. It must belong to the customization namespace.
-
-# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX...
-invalid.wsdl.with.dooc="Not a WSDL document: {0}, it gives \"{1}\", retrying with MEX..."
-invalid.wsdl=Invalid WSDL {0}, expected {1} found {2} at (line {3})
-# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX...
-try.with.mex= {0} \n\nretrying with MEX...
-file.not.found={0} is unreachable
-parsing.unableToGetMetadata= {0}\n\n{1}
-failed.noservice=Could not find wsdl:service in the provided WSDL(s): \n\n{0} At least one WSDL with at least one service definition needs to be provided.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_de.properties
deleted file mode 100644
index 1dc2fdb5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_de.properties
+++ /dev/null
@@ -1,157 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-localized.error={0}
-parsing.wsdlNotDefaultNamespace=Standard-Namespace muss \\"{0}\\" sein
-# Not concatenated with any other string.
-parsing.onlyOneOfElementOrTypeRequired=Nur eines der Attribute \\"element\\" oder \\"type\\" ist in Teil \\"{0}\\" zul\u00E4ssig
-# Not concatenated with any other string.
-parsing.elementOrTypeRequired=Warnung: Teil {0} wird ignoriert, entweder das Attribut \"element\" oder das Attribut \"type\" ist in Teil \"{0}\" erforderlich
-parsing.invalidElement=ung\u00FCltiges Element: \"{0}\" (in Namespace \"{1}\")
-parsing.invalidAttributeValue=Ung\u00FCltiger Wert \"{1}\" f\u00FCr Attribut \"{0}\"
-parsing.invalidExtensionElement=ung\u00FCltiges Erweiterungselement: \"{0}\" (in Namespace \"{1}\")
-parsing.invalidWsdlElement=Ung\u00FCltiges WSDL-Element: "{0}"
-parsing.requiredExtensibilityElement=unbekanntes erforderliches Erweiterungselement \"{0}\" (in Namespace \"{1}\")
-parsing.tooManyElements=zu viele \"{0}\"-Elemente unter \"{1}\"-Element \"{2}\"
-parsing.invalidOperationStyle=Vorgang \"{0}\" hat einen ung\u00FCltigen Stil
-# {0} - "definitions". Not concatenated with any other string.
-parsing.onlyOneTypesAllowed=Nur ein "types"-Element ist in "{0}" zul\u00E4ssig
-# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string.
-parsing.onlyOneDocumentationAllowed=Nur ein "documentation"-Element ist in "{0}" zul\u00E4ssig
-parsing.incorrectRootElement=Root-Element \"{2}\" (in Namespace \"{3}\"), Element \"{0}\" (in Namespace \"{1}\") gefunden
-parsing.unknownImportedDocumentType=importiertes Dokument hat unbekannten Typ: {0}
-# Not concatenated with any other string.
-parsing.unknownNamespacePrefix=nicht deklariertes Namespace-Pr\u00E4fix: \\"{0}\\"
-parsing.invalidURI=ung\u00FCltiger URI: {0}
-# {0} - WSDL URL
-parsing.ioExceptionWithSystemId=Dokument in \"{0}\" konnte nicht geparst werden
-# {0} - exception message
-parsing.ioException=Parsen nicht erfolgreich: {0}
-# {0} - WSDL URL, Not concatenated with any other string.
-parsing.saxExceptionWithSystemId=Ung\u00FCltige WSDL-Datei. Dokument in \"{0}\" konnte nicht geparst werden
-# {0} - exception message, Not concatenated with any other string.
-parsing.saxException=Ung\u00FCltige WSDL-Datei. Parsing nicht erfolgreich: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.parserConfigException=Ung\u00FCltige WSDL-Datei. Parsing nicht erfolgreich: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.factoryConfigException=Ung\u00FCltige WSDL-Datei. Parsing nicht erfolgreich: {0}
-
-# Wrapped into an Exception. Not concatenated with any other string.
-parsing.missingRequiredAttribute=erforderliches Attribut \"{1}\" von Element \"{0}\" fehlt
-parsing.invalidTag=Element \"{1}\" erwartet, \"{0}\" gefunden
-# {4} - element name
-parsing.invalidTagNS=Ung\u00FCltige WSDL in {4}: Element \\"{2}\\" (in Namespace \\"{3}\\") erwartet, Element \\"{0}\\" (in Namespace \\"{1}\\") gefunden
-parsing.nonWhitespaceTextFound=unerwarteter Text ohne Leerstellen gefunden: \"{0}\"
-# Not concatenated with any other string (written on a separate line).
-parsing.elementExpected=unerwartetes Nicht-Element gefunden
-#
-entity.duplicate=doppelte Entity: \\"{0}\\"
-# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string.
-entity.duplicateWithType=doppelte \"{0}\" Entity: \"{1}\"
-
-entity.notFoundByID=ung\u00FCltige Entity-ID: \\"{0}\\"
-entity.notFoundByQName={0} \"{1}\" nicht in WSDL gefunden: {2}
-entity.notFound.portType=wsdl:portType \\"{0}\\" wird von wsdl:binding \\"{1}\\" referenziert, wird jedoch in der WSDL nicht gefunden
-entity.notFound.binding=wsdl:binding \\"{0}\\" wird von wsdl:port \\"{1}\\" referenziert, wird jedoch in der WSDL nicht gefunden
-
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.missingRequiredAttribute=erforderliches Attribut \"{0}\" von Element \"{1}\" fehlt
-validation.missingRequiredProperty=erforderliche Eigenschaft \"{0}\" von Element \"{1}\" fehlt
-validation.missingRequiredSubEntity=Erforderliche Sub-Entity \"{0}\" von Element \"{1}\" fehlt
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidElement=ung\u00FCltiges Element: \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\"
-validation.invalidSimpleTypeInElement=ung\u00FCltiges Element: \\"{1}\\", enth\u00E4lt benannten simpleType: \\"{0}\\"
-validation.duplicatedElement=dupliziertes Element: \"{0}\"
-validation.duplicatePartName=Ung\u00FCltige WSDL, doppelte Teile in einer wsdl:message sind nicht zul\u00E4ssig. \nwsdl:message {0} hat einen doppelten Teilnamen: \\"{1}\\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidSubEntity=Ung\u00FCltiges untergeordnetes Element \"{0}\" von Element \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidAttribute=Ung\u00FCltiges Attribut \"{0}\" von Element \"{1}\"
-validation.invalidAttributeValue=Ung\u00FCltiger Wert \"{1}\" f\u00FCr Attribut \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidRange=invalid range found (min: {0}, max: {1})
-validation.exclusiveAttributes=exklusive Attribute: \"{0}\", \"{1}\"
-validation.incorrectTargetNamespace=Ziel-Namespace ist nicht korrekt (erwartet: {1}, gefunden: {0})
-# Usage not found. TODO Remove
-#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\"
-validation.shouldNotHappen=interner Fehler ("{0}")
-# Usage not found. TODO Remove
-#validation.invalidToken=invalid token \"{0}\"
-# Usage not found. TODO Remove
-#validation.notSimpleType=not a simple type: \"{0}\"
-validation.ambiguousName=nicht eindeutiger Vorgangsname: \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidPrefix=undeclared namespace prefix: \"{0}\"
-# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded"
-validation.unsupportedUse.encoded="Verwendung von SOAP-Codierung wird nicht unterst\u00FCtzt. \nSOAP-Erweiterungselement in Zeile {0} in {1} enth\u00E4lt use=\\"encoded\\" "
-# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string.
-warning.faultEmptyAction=leere Aktion in \"{0}\" {1}-Element von \"{2}\"-Vorgang wird ignoriert, stattdessen wird Standardwert verwendet
-# Not concatenated with any other string.
-warning.inputOutputEmptyAction=leere Aktion in {0}-Element von \"{1}\"-Vorgang wird ignoriert, stattdessen wird Standardwert verwendet
-
-#wsi compliant WSDL warnings
-warning.wsi.r2001=Keine mit WSI-BP konforme WSDL (R2001, R2002). wsdl:import darf nur WSDL-Dokumente importieren. Es wird versucht, \\"{0}\\" zu importieren
-warning.wsi.r2002=Keine mit WSI-BP konforme WSDL (R2002). wsdl:import darf nicht f\u00FCr das Importieren eines XML-Schemas verwendet werden, das im WSDL-Dokument eingebettet ist. WSDL-Namespace {0} erwartet, {1} gefunden
-warning.wsi.r2003=Keine mit WSI-BP konforme WSDL (R2003). xsd:import darf nur innerhalb von xsd:schema-Elementen verwendet werden.
-warning.wsi.r2004=Keine mit WSI-BP konforme WSDL (R2001, R2004). xsd:import darf keine XML-Schemadefinitionen importieren, die inline in dem WSDL-Dokument eingebettet sind.
-
-#Parser
-Parsing.ParseFailed = \tWSDL konnte nicht geparst werden.
-
-Parsing.NotAWSDL=WSDL-Komponenten konnten nicht abgerufen werden, wahrscheinlich ist {0} keine g\u00FCltige WSDL-Datei.
-
-AbstractReferenceFinderImpl.UnableToParse = \tParsen von "{0}" nicht m\u00F6glich: {1}
-
-# Not concatenated with any other string.
-Parser.NotABindingFile = \tkeine externe Binding-Datei. Das Root-Element muss ''{''http://java.sun.com/xml/ns/jaxws''}''-Bindings sein, ist jedoch ''{''{0}''}''{1}
-
-
-#Internalizer
-Internalizer.TwoVersionAttributes = \tSowohl jaxb:version als auch Version sind vorhanden
-Internalizer.IncorrectVersion = \tJAXWS-Versionsattribut muss "2.0" sein
-
-Internalizer.VersionNotPresent = \tJAXWS-Versionsattribut muss vorhanden sein
-
-internalizer.targetNotAnElement= \tZielknoten ist kein Element
-internalizer.targetNotFound= \tKein Ziel f\u00FCr wsdlLocation gefunden: {0}
-
-Internalizer.IncorrectSchemaReference= \t"{0}" ist nicht Bestandteil dieser Kompilierung. Ist dies ein Fehler bei "{1}"?
-
-internalizer.XPathEvaluationError = XPath-Fehler: {0}
-internalizer.XPathEvaluatesToNoTarget = XPath-Auswertung von "{0}" ergibt einen leeren Zielknoten
-internalizer.XPathEvaulatesToTooManyTargets = XPath-Auswertung von "{0}" ergibt zu viele ({1})-Zielknoten
-internalizer.XPathEvaluatesToNonElement = XPath-Auswertung von "{0}" muss ein Element ergeben.
-invalid.customization.namespace=Anpassung \\"{0}\\" wird ignoriert, weil sie keinen Namespace hat. Sie muss zu dem Anpassungs-Namespace geh\u00F6ren.
-
-# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX...
-invalid.wsdl.with.dooc="Kein WSDL-Dokument: {0}, ergibt \"{1}\", Vorgang wird mit MEX wiederholt ..."
-invalid.wsdl=Ung\u00FCltige WSDL {0}, {1} erwartet, {2} in (Zeile{3}) gefunden
-# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX...
-try.with.mex= {0} \n\nVorgang wird mit MEX wiederholt ...
-file.not.found={0} ist nicht erreichbar
-parsing.unableToGetMetadata= {0}\n\n{1}
-failed.noservice=failed.noservice=wsdl:service konnte in den angegebenen WSDLs nicht gefunden werden: \n\n{0} Mindestens eine WSDL mit mindestens einer Servicedefinition muss bereitgestellt werden.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_es.properties
deleted file mode 100644
index 0823ea69..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_es.properties
+++ /dev/null
@@ -1,157 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-localized.error={0}
-parsing.wsdlNotDefaultNamespace=el espacio de nombres por defecto debe ser \"{0}\"
-# Not concatenated with any other string.
-parsing.onlyOneOfElementOrTypeRequired=S\u00F3lo se permite uno de los atributos \\"element\\" o \\"type\\" en la parte \\"{0}\\".
-# Not concatenated with any other string.
-parsing.elementOrTypeRequired=Advertencia: la parte {0} se ignora. Se necesita el atributo \"element\" o \"type\" en la parte \"{0}\".
-parsing.invalidElement=elemento no v\u00E1lido: \"{0}\" (en el espacio de nombres \"{1}\")
-parsing.invalidAttributeValue=valor no v\u00E1lido \"{1}\" para el atributo \"{0}\"
-parsing.invalidExtensionElement=elemento de extensi\u00F3n no v\u00E1lido: \"{0}\" (en el espacio de nombres \"{1}\")
-parsing.invalidWsdlElement=elemento WSDL no v\u00E1lido: \"{0}\"
-parsing.requiredExtensibilityElement=elemento de extensibilidad necesario desconocido\\"{0}\\" (en el espacio de nombres \\"{1}\\")
-parsing.tooManyElements=demasiados elementos \"{0}\" en el elemento \"{1}\" \"{2}\"
-parsing.invalidOperationStyle=la operaci\u00F3n \"{0}\" tiene un estilo no v\u00E1lido
-# {0} - "definitions". Not concatenated with any other string.
-parsing.onlyOneTypesAllowed=S\u00F3lo se permite un elemento "types" en "{0}".
-# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string.
-parsing.onlyOneDocumentationAllowed=S\u00F3lo se permite un elemento "documentation" en "{0}".
-parsing.incorrectRootElement=se esperaba el elemento ra\u00EDz \\"{2}\\" (en el espacio de nombres \\"{3}\\"), pero se ha encontrado el elemento \\"{0}\\" (en el espacio de nombres \\"{1}\\")
-parsing.unknownImportedDocumentType=el documento importado es de un tipo desconocido: {0}
-# Not concatenated with any other string.
-parsing.unknownNamespacePrefix=Prefijo de espacio de nombres no declarado: \"{0}\".
-parsing.invalidURI=URI no v\u00E1lido: {0}
-# {0} - WSDL URL
-parsing.ioExceptionWithSystemId=fallo al analizar el documento en \"{0}\"
-# {0} - exception message
-parsing.ioException=fallo al analizar: {0}
-# {0} - WSDL URL, Not concatenated with any other string.
-parsing.saxExceptionWithSystemId=Archivo WSDL no v\u00E1lido. Fallo al analizar el documento en \"{0}\".
-# {0} - exception message, Not concatenated with any other string.
-parsing.saxException=Archivo WSDL no v\u00E1lido. Fallo al realizar el an\u00E1lisis: {0}.
-# {0} - exception message, Not concatenated with any other string.
-parsing.parserConfigException=Archivo WSDL no v\u00E1lido. Fallo al realizar el an\u00E1lisis: {0}.
-# {0} - exception message, Not concatenated with any other string.
-parsing.factoryConfigException=Archivo WSDL no v\u00E1lido. Fallo al realizar el an\u00E1lisis: {0}.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-parsing.missingRequiredAttribute=Falta el atributo necesario \"{1}\" del elemento \"{0}\".
-parsing.invalidTag=se esperaba el elemento \"{1}\", pero se ha encontrado \"{0}\"
-# {4} - element name
-parsing.invalidTagNS=WSDL no v\u00E1lido en {4}: se esperaba el elemento \"{2}\" (en el espacio de nombres \"{3}\"), pero se ha encontrado el elemento \"{0}\" (en el espacio de nombres \"{1}\")
-parsing.nonWhitespaceTextFound=se ha encontrado un texto sin espacios en blanco inesperado: \"{0}\"
-# Not concatenated with any other string (written on a separate line).
-parsing.elementExpected=Se ha encontrado un no elemento inesperado.
-#
-entity.duplicate=entidad duplicada: \"{0}\"
-# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string.
-entity.duplicateWithType=Entidad \"{0}\" duplicada: \"{1}\".
-
-entity.notFoundByID=identificador de entidad no v\u00E1lido: \\"{0}\\"
-entity.notFoundByQName={0} \\"{1}\\" no encontrado en el WSDL: {2}
-entity.notFound.portType=se hace referencia a wsdl:portType \\"{0}\\" en wsdl:binding \\"{1}\\", pero no se ha encontrado en el WSDL
-entity.notFound.binding=se hace referencia a wsdl:binding \\"{0}" en wsdl:port \\"{1}\\", pero no se ha encontrado en el WSDL
-
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.missingRequiredAttribute=Falta el atributo necesario \"{0}\" del elemento \"{1}\".
-validation.missingRequiredProperty=falta la propiedad necesaria \"{0}\" del elemento \"{1}\"
-validation.missingRequiredSubEntity=falta la subentidad necesaria \"{0}\" del elemento \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidElement=Elemento no v\u00E1lido: \"{0}\".
-# Usage not found. TODO Remove
-#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\"
-validation.invalidSimpleTypeInElement=elemento no v\u00E1lido: \\"{1}\\", tiene un simpleType con nombre: \\"{0}\\"
-validation.duplicatedElement=elemento duplicado: \"{0}\"
-validation.duplicatePartName=WSDL no v\u00E1lido; no se permiten partes duplicadas en wsdl:message. \nwsdl:message {0} tiene un nombre de parte duplicado: \\"{1}\\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidSubEntity=Subelemento no v\u00E1lido \"{0}\" del elemento \"{1}\".
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidAttribute=Atributo no v\u00E1lido \"{0}\" del elemento \"{1}\".
-validation.invalidAttributeValue=valor no v\u00E1lido \"{1}\" para el atributo \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidRange=invalid range found (min: {0}, max: {1})
-validation.exclusiveAttributes=atributos exclusivos: \"{0}\", \"{1}\"
-validation.incorrectTargetNamespace=el espacio de nombres de destino es incorrecto (se esperaba: {1}, pero se ha encontrado: {0})
-# Usage not found. TODO Remove
-#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\"
-validation.shouldNotHappen=error interno ("{0}")
-# Usage not found. TODO Remove
-#validation.invalidToken=invalid token \"{0}\"
-# Usage not found. TODO Remove
-#validation.notSimpleType=not a simple type: \"{0}\"
-validation.ambiguousName=nombre de operaci\u00F3n ambiguo: \\"{0}\\"
-# Usage not found. TODO Remove
-#validation.invalidPrefix=undeclared namespace prefix: \"{0}\"
-# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded"
-validation.unsupportedUse.encoded="No se soporta el uso de la codificaci\u00F3n SOAP. \nEl elemento de extensi\u00F3n SOAP de la l\u00EDnea {0} en {1} tiene use=\\"encoded\\" "
-# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string.
-warning.faultEmptyAction=Ignorando acci\u00F3n vac\u00EDa en el elemento \"{0}\" {1} de la operaci\u00F3n \"{2}\". Se utilizar\u00E1 la acci\u00F3n por defecto.
-# Not concatenated with any other string.
-warning.inputOutputEmptyAction=Ignorando acci\u00F3n vac\u00EDa en el elemento {0} de la operaci\u00F3n \"{1}\". Se utilizar\u00E1 la acci\u00F3n por defecto.
-
-#wsi compliant WSDL warnings
-warning.wsi.r2001=No es un WSDL compatible con WSI-BP (R2001, R2002). wsdl:import s\u00F3lo debe importar documentos WSDL. Est\u00E1 intentando importar: \\"{0}\\"
-warning.wsi.r2002=No es un WSDL compatible con WSI-BP (R2002). wsdl:import no se debe utilizar para importar esquemas XML embebidos en el documento WSDL. Se esperaba el espacio de nombres de WSDL: {0}, pero se ha encontrado: {1}
-warning.wsi.r2003=No es un WSDL compatible con WSI-BP (R2003). xsd:import s\u00F3lo se debe utilizar dentro de elementos xsd:schema.
-warning.wsi.r2004=No es un WSDL compatible con WSI-BP (R2001, R2004). wsdl:import no debe importar definiciones de esquemas XML embebidas en l\u00EDnea en el documento WSDL.
-
-#Parser
-Parsing.ParseFailed = \tFallo al analizar el WSDL.
-
-Parsing.NotAWSDL=Fallo al obtener componentes WSDL. Probablemente {0} no es un archivo WSDL v\u00E1lido.
-
-AbstractReferenceFinderImpl.UnableToParse = \tNo se ha podido analizar "{0}": {1}
-
-# Not concatenated with any other string.
-Parser.NotABindingFile = \tNo es un archivo de enlace externo. El elemento ra\u00EDz deben ser enlaces ''{''http://java.sun.com/xml/ns/jaxws''}'', pero es ''{''{0}''}''{1}.
-
-
-#Internalizer
-Internalizer.TwoVersionAttributes = \tTanto jaxws:version como version existen
-Internalizer.IncorrectVersion = \tEl atributo de la versi\u00F3n de JAX-WS debe ser "2.0"
-
-Internalizer.VersionNotPresent = \tEl atributo de la versi\u00F3n de JAX-WS debe existir
-
-internalizer.targetNotAnElement= \tEl nodo de destino no es un elemento
-internalizer.targetNotFound= \tNo se ha encontrado ning\u00FAn destino para wsdlLocation: {0}
-
-Internalizer.IncorrectSchemaReference= \t"{0}" no forma parte de esta compilaci\u00F3n. \u00BFEs un error de "{1}"?
-
-internalizer.XPathEvaluationError = Error de XPath: {0}
-internalizer.XPathEvaluatesToNoTarget = La evaluaci\u00F3n de XPath de "{0}" da lugar a un nodo de destino vac\u00EDo
-internalizer.XPathEvaulatesToTooManyTargets = La evaluaci\u00F3n de XPath de "{0}" da lugar a demasiados nodos de destino ({1})
-internalizer.XPathEvaluatesToNonElement = La evaluaci\u00F3n de XPath de "{0}" debe dar lugar a un elemento.
-invalid.customization.namespace=Ignorando la personalizaci\u00F3n: \"{0}\", porque no tiene ning\u00FAn espacio de nombres. Debe pertenecer al espacio de nombres de personalizaci\u00F3n.
-
-# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX...
-invalid.wsdl.with.dooc="No es un documento WSDL: {0}, proporciona \"{1}\"; reintentando con MEX..."
-invalid.wsdl=WSDL no v\u00E1lido {0}; se esperaba {1}, pero se ha encontrado {2} en (l\u00EDnea{3})
-# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX...
-try.with.mex= {0} \n\nreintentando con MEX...
-file.not.found=No se puede acceder a {0}
-parsing.unableToGetMetadata= {0}\n\n{1}
-failed.noservice=failed.noservice=No se ha encontrado wsdl:service en los WSDL(s) proporcionados: \n\n{0} Es necesario proporcionar al menos un WSDL con al menos una definici\u00F3n de servicio.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_fr.properties
deleted file mode 100644
index 31f805c6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_fr.properties
+++ /dev/null
@@ -1,157 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-localized.error={0}
-parsing.wsdlNotDefaultNamespace=l''espace de noms par d\u00E9faut doit \u00EAtre \"{0}\"
-# Not concatenated with any other string.
-parsing.onlyOneOfElementOrTypeRequired=seul l''un des attributs \"element\" ou \"type\" est autoris\u00E9 dans la partie \"{0}\"
-# Not concatenated with any other string.
-parsing.elementOrTypeRequired=avertissement : la partie {0} n''est pas prise en compte, l''attribut \"element\" ou \"type\" est requis dans la partie \"{0}\"
-parsing.invalidElement=\u00E9l\u00E9ment non valide : \"{0}\" (dans l''espace de noms \"{1}\")
-parsing.invalidAttributeValue=valeur \"{1}\" non valide pour l''attribut \"{0}\"
-parsing.invalidExtensionElement=\u00E9l\u00E9ment d''extension non valide : \"{0}\" (dans l''espace de noms \"{1}\")
-parsing.invalidWsdlElement=\u00E9l\u00E9ment WSDL non valide : \"{0}\"
-parsing.requiredExtensibilityElement=\u00E9l\u00E9ment d''extensibilit\u00E9 \"{0}\" obligatoire inconnu (dans l''espace de noms \"{1}\")
-parsing.tooManyElements=trop d''\u00E9l\u00E9ments \"{0}\" sous l''\u00E9l\u00E9ment \"{1}\" \"{2}\"
-parsing.invalidOperationStyle=l''op\u00E9ration \"{0}\" a un style non valide
-# {0} - "definitions". Not concatenated with any other string.
-parsing.onlyOneTypesAllowed=un seul \u00E9l\u00E9ment "types" autoris\u00E9 dans "{0}"
-# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string.
-parsing.onlyOneDocumentationAllowed=un seul \u00E9l\u00E9ment "documentation" autoris\u00E9 dans "{0}"
-parsing.incorrectRootElement=\u00E9l\u00E9ment racine \"{2}\" attendu (dans l''espace de noms \"{3}\"), \u00E9l\u00E9ment \"{0}\" trouv\u00E9 (dans l''espace de noms \"{1}\")
-parsing.unknownImportedDocumentType=le document import\u00E9 est de type inconnu : {0}
-# Not concatenated with any other string.
-parsing.unknownNamespacePrefix=pr\u00E9fixe d''espace de noms non d\u00E9clar\u00E9 : \"{0}\"
-parsing.invalidURI=URI non valide : {0}
-# {0} - WSDL URL
-parsing.ioExceptionWithSystemId=\u00E9chec de l''analyse du document \u00E0 \"{0}\"
-# {0} - exception message
-parsing.ioException=\u00E9chec de l''analyse : {0}
-# {0} - WSDL URL, Not concatenated with any other string.
-parsing.saxExceptionWithSystemId=fichier WSDL non valide. Echec de l''analyse du document \u00E0 \"{0}\"
-# {0} - exception message, Not concatenated with any other string.
-parsing.saxException=fichier WSDL non valide. Echec de l''analyse : {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.parserConfigException=fichier WSDL non valide. Echec de l''analyse : {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.factoryConfigException=fichier WSDL non valide. Echec de l''analyse : {0}
-
-# Wrapped into an Exception. Not concatenated with any other string.
-parsing.missingRequiredAttribute=attribut \"{1}\" obligatoire de l''\u00E9l\u00E9ment \"{0}\" manquant
-parsing.invalidTag=\u00E9l\u00E9ment \"{1}\" attendu, \"{0}\" trouv\u00E9
-# {4} - element name
-parsing.invalidTagNS=WSDL non valide \u00E0 {4} : \u00E9l\u00E9ment \"{2}\" attendu (dans l''espace de noms \"{3}\"), \u00E9l\u00E9ment \"{0}\" trouv\u00E9 (dans l''espace de noms \"{1}\")
-parsing.nonWhitespaceTextFound=texte non imprimable inattendu trouv\u00E9 : \"{0}\"
-# Not concatenated with any other string (written on a separate line).
-parsing.elementExpected=non-\u00E9l\u00E9ment inattendu trouv\u00E9
-#
-entity.duplicate=entit\u00E9 en double : \"{0}\"
-# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string.
-entity.duplicateWithType=entit\u00E9 \"{0}\" en double : \"{1}\"
-
-entity.notFoundByID=ID d''entit\u00E9 non valide : \"{0}\"
-entity.notFoundByQName={0} \"{1}\" introuvable dans le WSDL : {2}
-entity.notFound.portType=wsdl:portType \"{0}\" r\u00E9f\u00E9renc\u00E9 par wsdl:binding \"{1}\", mais il est introuvable dans le WSDL
-entity.notFound.binding=wsdl:binding \"{0}" r\u00E9f\u00E9renc\u00E9 par wsdl:port \"{1}\", mais il est introuvable dans le WSDL
-
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.missingRequiredAttribute=attribut \"{0}\" obligatoire de l''\u00E9l\u00E9ment \"{1}\" manquant
-validation.missingRequiredProperty=la propri\u00E9t\u00E9 obligatoire \"{0}\" de l''\u00E9l\u00E9ment \"{1}\" est absente
-validation.missingRequiredSubEntity=la sous-entit\u00E9 obligatoire \"{0}\" de l''\u00E9l\u00E9ment \"{1}\" est absente
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidElement=\u00E9l\u00E9ment non valide : \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\"
-validation.invalidSimpleTypeInElement=\u00E9l\u00E9ment \"{1}\" non valide, a nomm\u00E9 simpleType: \"{0}\"
-validation.duplicatedElement=\u00E9l\u00E9ment \"{0}\" en double
-validation.duplicatePartName=WSDL non valide, les parties en double dans l''\u00E9l\u00E9ment wsdl:message ne sont pas autoris\u00E9es. \nL''\u00E9l\u00E9ment wsdl:message {0} comporte un nom de partie en double : \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidSubEntity=le sous-\u00E9l\u00E9ment \"{0}\" de l''\u00E9l\u00E9ment \"{1}\" n''est pas valide
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidAttribute=l''attribut \"{0}\" de l''\u00E9l\u00E9ment \"{1}\" n''est pas valide
-validation.invalidAttributeValue=valeur \"{1}\" non valide pour l''attribut \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidRange=invalid range found (min: {0}, max: {1})
-validation.exclusiveAttributes=attributs exclusifs : \"{0}\", \"{1}\"
-validation.incorrectTargetNamespace=l''espace de noms cible est incorrect ({1} attendu, {0} trouv\u00E9)
-# Usage not found. TODO Remove
-#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\"
-validation.shouldNotHappen=erreur interne ("{0}")
-# Usage not found. TODO Remove
-#validation.invalidToken=invalid token \"{0}\"
-# Usage not found. TODO Remove
-#validation.notSimpleType=not a simple type: \"{0}\"
-validation.ambiguousName=nom d''op\u00E9ration ambigu : \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidPrefix=undeclared namespace prefix: \"{0}\"
-# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded"
-validation.unsupportedUse.encoded="L''utilisation de l''encodage SOAP n''est pas prise en charge. \nL''\u00E9l\u00E9ment d''extension SOAP \u00E0 la ligne {0} dans {1} a use=\"encoded\" "
-# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string.
-warning.faultEmptyAction=non-prise en compte de l''action vide dans l''\u00E9l\u00E9ment \"{0}\" {1} de l''op\u00E9ration \"{2}\", utilisation de l''\u00E9l\u00E9ment par d\u00E9faut \u00E0 la place
-# Not concatenated with any other string.
-warning.inputOutputEmptyAction=non-prise en compte de l''action vide dans l''\u00E9l\u00E9ment {0} de l''op\u00E9ration \"{1}\", utilisation de l''\u00E9l\u00E9ment par d\u00E9faut \u00E0 la place
-
-#wsi compliant WSDL warnings
-warning.wsi.r2001=N''est pas un WSDL conforme \u00E0 WSI-BP (R2001, R2002). wsdl:import doit importer uniquement des documents WSDL. Il tente d''importer \"{0}\"
-warning.wsi.r2002=N''est pas un WSDL conforme \u00E0 WSI-BP (R2002). wsdl:import ne doit pas \u00EAtre utilis\u00E9 pour importer l''instance XML Schema imbriqu\u00E9e dans le document WSDL. Espace de noms WSDL {0} attendu, {1} trouv\u00E9
-warning.wsi.r2003=N'est pas un WSDL conforme \u00E0 WSI-BP (R2003). xsd:import doit \u00EAtre utilis\u00E9 uniquement dans les \u00E9l\u00E9ments xsd.schema.
-warning.wsi.r2004=N'est pas un WSDL conforme \u00E0 WSI-BP (R2001, R2004). xsd:import ne doit pas importer les d\u00E9finitions XML Schema imbriqu\u00E9es incorpor\u00E9es dans le document WSDL.
-
-#Parser
-Parsing.ParseFailed = \tEchec de l'analyse du WSDL.
-
-Parsing.NotAWSDL=Echec d''obtention des composants WSDL, {0} n''est probablement pas un fichier WSDL valide.
-
-AbstractReferenceFinderImpl.UnableToParse = \tImpossible d''analyser "{0}" : {1}
-
-# Not concatenated with any other string.
-Parser.NotABindingFile = \tn''est pas un fichier de binding externe. L''\u00E9l\u00E9ment racine doit correspondre aux bindings ''{''http://java.sun.com/xml/ns/jaxws''}'', mais il s''agit de ''{''{0}''}''{1}
-
-
-#Internalizer
-Internalizer.TwoVersionAttributes = \tjaxws:version et version sont tous deux pr\u00E9sents
-Internalizer.IncorrectVersion = \tL'attribut de version JAXWS doit \u00EAtre "2.0"
-
-Internalizer.VersionNotPresent = \tL'attribut de version JAXWS doit \u00EAtre pr\u00E9sent
-
-internalizer.targetNotAnElement= \tLe noeud cible n'est pas un \u00E9l\u00E9ment
-internalizer.targetNotFound= \tCible introuvable pour wsdlLocation : {0}
-
-Internalizer.IncorrectSchemaReference= \t"{0}" ne fait pas partie de cette compilation. S''agit-il d''une erreur pour "{1}" ?
-
-internalizer.XPathEvaluationError = Erreur XPath : {0}
-internalizer.XPathEvaluatesToNoTarget = L''\u00E9valuation XPath de "{0}" g\u00E9n\u00E8re un noeud cible vide
-internalizer.XPathEvaulatesToTooManyTargets = L''\u00E9valuation XPath de "{0}" g\u00E9n\u00E8re un trop grand nombre de noeuds cible ({1})
-internalizer.XPathEvaluatesToNonElement = L''\u00E9valuation XPath de "{0}" doit g\u00E9n\u00E9rer un \u00E9l\u00E9ment.
-invalid.customization.namespace=Non-prise en compte de la personnalisation \"{0}\", car elle ne contient aucun espace de noms. Elle doit appartenir \u00E0 l''espace de noms de personnalisation.
-
-# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX...
-invalid.wsdl.with.dooc="N''est pas un document WSDL : {0}, il g\u00E9n\u00E8re \"{1}\", nouvelle tentative avec MEX..."
-invalid.wsdl=WSDL {0} non valide, {1} attendu, {2} trouv\u00E9 dans (ligne {3})
-# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX...
-try.with.mex= {0} \n\nnouvelle tentative avec MEX...
-file.not.found={0} est inaccessible
-parsing.unableToGetMetadata= {0}\n\n{1}
-failed.noservice=wsdl:service introuvable dans les WSDL fournis : \n\n{0} Au moins un WSDL avec au moins une d\u00E9finition de service doit \u00EAtre fourni.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_it.properties
deleted file mode 100644
index a02fba35..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_it.properties
+++ /dev/null
@@ -1,157 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-localized.error={0}
-parsing.wsdlNotDefaultNamespace=lo spazio di nomi predefinito deve essere \"{0}\"
-# Not concatenated with any other string.
-parsing.onlyOneOfElementOrTypeRequired=nella parte \"{0}\" \u00E8 consentito solo un attributo \"element\" o \"type\"
-# Not concatenated with any other string.
-parsing.elementOrTypeRequired=avvertenza: la parte {0} viene ignorata. Nella parte \"{0}\" \u00E8 richiesto l''attributo \"element\" o \"type\"
-parsing.invalidElement=elemento: \"{0}\" non valido (nello spazio di nomi \"{1}\")
-parsing.invalidAttributeValue=valore \"{1}\" non valido per l''attributo \"{0}\"
-parsing.invalidExtensionElement=elemento extension: \"{0}\" non valido (nello spazio di nomi \"{1}\")
-parsing.invalidWsdlElement=elemento WSDL: \''{0}\'' non valido
-parsing.requiredExtensibilityElement=elemento di estensione richiesto \"{0}\" sconosciuto (nello spazio di nomi \"{1}\")
-parsing.tooManyElements=troppi elementi \"{0}\" nell''elemento \"{1}\" \"{2}\"
-parsing.invalidOperationStyle=l''operazione \"{0}\" ha uno stile non valido
-# {0} - "definitions". Not concatenated with any other string.
-parsing.onlyOneTypesAllowed=\u00E8 consentito solo un elemento "types" in "{0}"
-# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string.
-parsing.onlyOneDocumentationAllowed=\u00E8 consentito solo un elemento "documentation" in "{0}"
-parsing.incorrectRootElement=previsto elemento radice \"{2}\" (nello spazio di nomi \"{3}\"), trovato elemento \"{0}\" (nello spazio di nomi \"{1}\")
-parsing.unknownImportedDocumentType=il documento importato \u00E8 di tipo sconosciuto: {0}
-# Not concatenated with any other string.
-parsing.unknownNamespacePrefix=prefisso di spazio di nomi non dichiarato: \"{0}\"
-parsing.invalidURI=URI non valido: {0}
-# {0} - WSDL URL
-parsing.ioExceptionWithSystemId=analisi del documento in \"{0}\" non riuscita
-# {0} - exception message
-parsing.ioException=analisi non riuscita: {0}
-# {0} - WSDL URL, Not concatenated with any other string.
-parsing.saxExceptionWithSystemId=file WSDL non valido. Analisi del documento in \"{0}\" non riuscita
-# {0} - exception message, Not concatenated with any other string.
-parsing.saxException=file WSDL non valido. Analisi non riuscita: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.parserConfigException=file WSDL non valido. Analisi non riuscita: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.factoryConfigException=file WSDL non valido. Analisi non riuscita: {0}
-
-# Wrapped into an Exception. Not concatenated with any other string.
-parsing.missingRequiredAttribute=attributo obbligatorio \"{1}\" dell''elemento \"{0}\" mancante
-parsing.invalidTag=elemento previsto \"{1}\", trovato \"{0}\"
-# {4} - element name
-parsing.invalidTagNS=WSDL non valido in {4}: previsto elemento \"{2}\" (nello spazio di nomi \"{3}\"), trovato elemento \"{0}\" (nello spazio di nomi \"{1}\")
-parsing.nonWhitespaceTextFound=trovato del testo senza spazi imprevisto: \"{0}\"
-# Not concatenated with any other string (written on a separate line).
-parsing.elementExpected=trovato non elemento imprevisto
-#
-entity.duplicate=entit\u00E0 duplicata: \"{0}\"
-# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string.
-entity.duplicateWithType=entit\u00E0 \"{0}\" duplicata: \"{1}\"
-
-entity.notFoundByID=ID entit\u00E0: \''{0}\'' non valido
-entity.notFoundByQName={0} \"{1}\" non trovata in WSDL: {2}
-entity.notFound.portType=a wsdl:portType \"{0}\" viene fatto riferimento da wsdl:binding \"{1}\" ma non \u00E8 presente in wsdl
-entity.notFound.binding=a wsdl:binding \"{0}\" viene fatto riferimento da wsdl:port \"{1}\" ma non \u00E8 presente in wsdl
-
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.missingRequiredAttribute=attributo obbligatorio \"{0}\" dell''elemento \"{1}\" mancante
-validation.missingRequiredProperty=propriet\u00E0 obbligatoria \"{0}\" dell''elemento \"{1}\" mancante
-validation.missingRequiredSubEntity=entit\u00E0 secondaria obbligatoria \"{0}\" dell''elemento \"{1}\" mancante
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidElement=elemento: \''{0}\'' non valido
-# Usage not found. TODO Remove
-#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\"
-validation.invalidSimpleTypeInElement=elemento: \"{1}\" non valido, ha un simpleType denominato: \"{0}\"
-validation.duplicatedElement=elemento duplicato: \''{0}\''
-validation.duplicatePartName=WSDL non valido. Le parti duplicate in wsdl:message non sono consentite. \nwsdl:message {0} ha un nome parte duplicato: \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidSubEntity=elemento secondario \"{0}\" non valido dell''elemento \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidAttribute=attributo \"{0}\" non valido dell''elemento \"{1}\"
-validation.invalidAttributeValue=valore \"{1}\" non valido per l''attributo \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidRange=invalid range found (min: {0}, max: {1})
-validation.exclusiveAttributes=attributi esclusivi: \"{0}\", \"{1}\"
-validation.incorrectTargetNamespace=lo spazio di nomi di destinazione \u00E8 errato (previsto: {1}, trovato: {0})
-# Usage not found. TODO Remove
-#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\"
-validation.shouldNotHappen=errore interno (''{0}'')
-# Usage not found. TODO Remove
-#validation.invalidToken=invalid token \"{0}\"
-# Usage not found. TODO Remove
-#validation.notSimpleType=not a simple type: \"{0}\"
-validation.ambiguousName=nome dell''operazione ambiguo: \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidPrefix=undeclared namespace prefix: \"{0}\"
-# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded"
-validation.unsupportedUse.encoded="Uso della codifica SOAP non supportato. \nL''elemento SOAP extension sulla riga {0} in {1} ha use=\"encoded\" "
-# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string.
-warning.faultEmptyAction=l''azione vuota nell''elemento {1} \"{0}\" dell''operazione \"{2}\" verr\u00E0 ignorata. Viene usato invece il valore predefinito.
-# Not concatenated with any other string.
-warning.inputOutputEmptyAction=l''azione vuota nell''elemento {0} dell''operazione \"{1}\" verr\u00E0 ignorata. Viene usato invece il valore predefinito.
-
-#wsi compliant WSDL warnings
-warning.wsi.r2001=WSDL non conforme a WSI-BP (R2001, R2002). wsdl:import deve importare solo documenti WSDL. Sta tentando di importare: \"{0}\"
-warning.wsi.r2002=WSDL non conforme a WSI-BP (R2002). wsdl:import non deve essere usato per importare lo schema XML incorporato nel documento WSDL. Spazio di nomi WSDL previsto: {0}, trovato: {1}
-warning.wsi.r2003=WSDL non conforme a WSI-BP (R2003). wsdl:import deve essere usato solo all'interno di elementi xsd:schema.
-warning.wsi.r2004=WSDL non conforme a WSI-BP (R2001, R2004). wsdl:import non deve importare le definizioni di schema XML incorporate in linea nel documento WSDL.
-
-#Parser
-Parsing.ParseFailed = \tAnalisi di WSDL non riuscita.
-
-Parsing.NotAWSDL=Recupero dei componenti WSDL non riuscito. \u00C8 possibile che {0} non sia un file WSDL valido.
-
-AbstractReferenceFinderImpl.UnableToParse = \tImpossibile analizzare "{0}" : {1}
-
-# Not concatenated with any other string.
-Parser.NotABindingFile = \tnon \u00E8 un file di associazione esterno. L''elemento radice deve essere ''{''http://java.sun.com/xml/ns/jaxws''}''bindings ma \u00E8 ''{''{0}''}''{1}
-
-
-#Internalizer
-Internalizer.TwoVersionAttributes = \tSono presenti jaxws:version e version
-Internalizer.IncorrectVersion = \tL'attributo JAXWS version deve essere "2.0"
-
-Internalizer.VersionNotPresent = \tL'attributo JAXWS version deve essere presente
-
-internalizer.targetNotAnElement= \tIl nodo di destinazione non \u00E8 un elemento
-internalizer.targetNotFound= \tNessuna destinazione trovata per wsdlLocation: {0}
-
-Internalizer.IncorrectSchemaReference= \t"{0}" non fa parte di questa compilazione. Si tratta di un errore per "{1}"?
-
-internalizer.XPathEvaluationError = Errore XPath: {0}
-internalizer.XPathEvaluatesToNoTarget = La valutazione XPath di "{0}" restituisce un nodo di destinazione vuoto
-internalizer.XPathEvaulatesToTooManyTargets = La valutazione XPath di "{0}" restituisce troppi ({1}) nodi di destinazione
-internalizer.XPathEvaluatesToNonElement = La valutazione XPath di "{0}" deve restituire un elemento.
-invalid.customization.namespace=La personalizzazione: \"{0}\" verr\u00E0 ignorata poich\u00E9 non ha uno spazio di nomi. Deve appartenere allo spazio di nomi della personalizzazione.
-
-# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX...
-invalid.wsdl.with.dooc="Non \u00E8 un documento WSDL: {0}. Restituisce \"{1}\". Nuovo tentativo con MEX in corso..."
-invalid.wsdl=WSDL non valido {0}: previsto {1}, trovato {2} in (riga {3})
-# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX...
-try.with.mex= {0} \n\nnuovo tentativo con MEX in corso...
-file.not.found={0} non raggiungibile
-parsing.unableToGetMetadata= {0}\n\n{1}
-failed.noservice=failed.noservice=Impossibile trovare wsdl:service nei WSDL forniti: \n\n{0} \u00C8 necessario fornire almeno un WSDL con almeno una definizione di servizio.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ja.properties
deleted file mode 100644
index ee0bf0d4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ja.properties
+++ /dev/null
@@ -1,157 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-localized.error={0}
-parsing.wsdlNotDefaultNamespace=\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306F\"{0}\"\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-# Not concatenated with any other string.
-parsing.onlyOneOfElementOrTypeRequired=\u30D1\u30FC\u30C8\"{0}\"\u3067\u306F\u3001\"element\"\u307E\u305F\u306F\"type\"\u5C5E\u6027\u306E\u3044\u305A\u308C\u304B1\u3064\u306E\u307F\u304C\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u3059
-# Not concatenated with any other string.
-parsing.elementOrTypeRequired=\u8B66\u544A: \u30D1\u30FC\u30C8{0}\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u30D1\u30FC\u30C8\"{0}\"\u3067\u306F\u3001\"element\"\u307E\u305F\u306F\"type\"\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059
-parsing.invalidElement=\u7121\u52B9\u306A\u8981\u7D20: \"{0}\"(\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{1}\"\u5185)
-parsing.invalidAttributeValue=\u5C5E\u6027\"{0}\"\u306E\u5024\"{1}\"\u306F\u7121\u52B9\u3067\u3059
-parsing.invalidExtensionElement=\u7121\u52B9\u306A\u62E1\u5F35\u8981\u7D20: \"{0}\"(\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{1}\"\u5185)
-parsing.invalidWsdlElement=\u7121\u52B9\u306AWSDL\u8981\u7D20: \"{0}\"
-parsing.requiredExtensibilityElement=\u5FC5\u9808\u306E\u62E1\u5F35\u6027\u8981\u7D20\"{0}\"\u304C\u4E0D\u660E\u3067\u3059(\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{1}\"\u5185)
-parsing.tooManyElements=\"{1}\"\u8981\u7D20\"{2}\"\u306E\u4E0B\u306E\"{0}\"\u8981\u7D20\u304C\u591A\u3059\u304E\u307E\u3059
-parsing.invalidOperationStyle=\u64CD\u4F5C\"{0}\"\u306E\u30B9\u30BF\u30A4\u30EB\u304C\u7121\u52B9\u3067\u3059
-# {0} - "definitions". Not concatenated with any other string.
-parsing.onlyOneTypesAllowed="{0}"\u3067\u8A31\u53EF\u3055\u308C\u3066\u3044\u308B"types"\u8981\u7D20\u306F1\u3064\u306E\u307F\u3067\u3059
-# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string.
-parsing.onlyOneDocumentationAllowed="{0}"\u3067\u8A31\u53EF\u3055\u308C\u3066\u3044\u308B"documentation"\u8981\u7D20\u306F1\u3064\u306E\u307F\u3067\u3059
-parsing.incorrectRootElement=\u30EB\u30FC\u30C8\u8981\u7D20\"{2}\"(\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{3}\"\u5185)\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001\u8981\u7D20\"{0}\"(\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{1}\"\u5185)\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-parsing.unknownImportedDocumentType=\u30A4\u30F3\u30DD\u30FC\u30C8\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30BF\u30A4\u30D7\u304C\u4E0D\u660E\u3067\u3059: {0}
-# Not concatenated with any other string.
-parsing.unknownNamespacePrefix=\u5BA3\u8A00\u3055\u308C\u3066\u3044\u306A\u3044\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u63A5\u982D\u8F9E: \"{0}\"
-parsing.invalidURI=\u7121\u52B9\u306AURI: {0}
-# {0} - WSDL URL
-parsing.ioExceptionWithSystemId=\"{0}\"\u3067\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-# {0} - exception message
-parsing.ioException=\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}
-# {0} - WSDL URL, Not concatenated with any other string.
-parsing.saxExceptionWithSystemId=\u7121\u52B9\u306AWSDL\u30D5\u30A1\u30A4\u30EB\u3067\u3059\u3002\"{0}\"\u3067\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-# {0} - exception message, Not concatenated with any other string.
-parsing.saxException=\u7121\u52B9\u306AWSDL\u30D5\u30A1\u30A4\u30EB\u3067\u3059\u3002\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.parserConfigException=\u7121\u52B9\u306AWSDL\u30D5\u30A1\u30A4\u30EB\u3067\u3059\u3002\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.factoryConfigException=\u7121\u52B9\u306AWSDL\u30D5\u30A1\u30A4\u30EB\u3067\u3059\u3002\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}
-
-# Wrapped into an Exception. Not concatenated with any other string.
-parsing.missingRequiredAttribute=\u8981\u7D20\"{0}\"\u306E\u5FC5\u9808\u5C5E\u6027\"{1}\"\u304C\u3042\u308A\u307E\u305B\u3093
-parsing.invalidTag=\u8981\u7D20\"{1}\"\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001\"{0}\"\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-# {4} - element name
-parsing.invalidTagNS={4}\u306EWSDL\u304C\u7121\u52B9\u3067\u3059: \u8981\u7D20\"{2}\"(\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{3}\"\u5185)\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001\u8981\u7D20\"{0}\"(\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{1}\"\u5185)\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-parsing.nonWhitespaceTextFound=\u4E88\u671F\u3057\u306A\u3044\u7A7A\u767D\u4EE5\u5916\u306E\u30C6\u30AD\u30B9\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F: \"{0}\"
-# Not concatenated with any other string (written on a separate line).
-parsing.elementExpected=\u4E88\u671F\u3057\u306A\u3044\u975E\u8981\u7D20\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-#
-entity.duplicate=\u91CD\u8907\u3057\u305F\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3: \"{0}\"
-# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string.
-entity.duplicateWithType=\u91CD\u8907\u3057\u305F\"{0}\"\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3: \"{1}\"
-
-entity.notFoundByID=\u7121\u52B9\u306A\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3ID: \"{0}\"
-entity.notFoundByQName={0} \"{1}\"\u304CWSDL\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {2}
-entity.notFound.portType=wsdl:portType \"{0}\"\u306Fwsdl:binding \"{1}\"\u3067\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001WSDL\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-entity.notFound.binding=wsdl:binding \"{0}"\u306Fwsdl:port \"{1}\"\u3067\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001WSDL\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.missingRequiredAttribute=\u8981\u7D20\"{1}\"\u306E\u5FC5\u9808\u5C5E\u6027\"{0}\"\u304C\u3042\u308A\u307E\u305B\u3093
-validation.missingRequiredProperty=\u8981\u7D20\"{1}\"\u306E\u5FC5\u9808\u30D7\u30ED\u30D1\u30C6\u30A3\"{0}\"\u304C\u3042\u308A\u307E\u305B\u3093
-validation.missingRequiredSubEntity=\u8981\u7D20\"{1}\"\u306E\u5FC5\u9808\u30B5\u30D6\u30A8\u30F3\u30C8\u30EA\"{0}\"\u304C\u3042\u308A\u307E\u305B\u3093
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidElement=\u7121\u52B9\u306A\u8981\u7D20: \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\"
-validation.invalidSimpleTypeInElement=\u8981\u7D20: \"{1}\"\u304C\u7121\u52B9\u3067\u3059\u3002\u540D\u524D\u4ED8\u304DsimpleType: \"{0}\"\u304C\u542B\u307E\u308C\u307E\u3059
-validation.duplicatedElement=\u91CD\u8907\u3057\u305F\u8981\u7D20: \"{0}\"
-validation.duplicatePartName=\u7121\u52B9\u306AWSDL\u3067\u3042\u308A\u3001wsdl:message\u306E\u91CD\u8907\u3057\u305F\u30D1\u30FC\u30C8\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002\nwsdl:message {0}\u306B\u306F\u91CD\u8907\u3057\u305F\u30D1\u30FC\u30C8\u540D: \"{1}\"\u304C\u3042\u308A\u307E\u3059
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidSubEntity=\u8981\u7D20\"{1}\"\u306E\u30B5\u30D6\u8981\u7D20\"{0}\"\u306F\u7121\u52B9\u3067\u3059
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidAttribute=\u8981\u7D20\"{1}\"\u306E\u5C5E\u6027\"{0}\"\u306F\u7121\u52B9\u3067\u3059
-validation.invalidAttributeValue=\u5C5E\u6027\"{0}\"\u306E\u5024\"{1}\"\u306F\u7121\u52B9\u3067\u3059
-# Usage not found. TODO Remove
-#validation.invalidRange=invalid range found (min: {0}, max: {1})
-validation.exclusiveAttributes=\u6392\u4ED6\u5C5E\u6027: \"{0}\"\u3001\"{1}\"
-validation.incorrectTargetNamespace=\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093({1}\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C{0}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F)
-# Usage not found. TODO Remove
-#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\"
-validation.shouldNotHappen=\u5185\u90E8\u30A8\u30E9\u30FC("{0}")
-# Usage not found. TODO Remove
-#validation.invalidToken=invalid token \"{0}\"
-# Usage not found. TODO Remove
-#validation.notSimpleType=not a simple type: \"{0}\"
-validation.ambiguousName=\u3042\u3044\u307E\u3044\u306A\u64CD\u4F5C\u540D: \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidPrefix=undeclared namespace prefix: \"{0}\"
-# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded"
-validation.unsupportedUse.encoded="SOAP\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u306E\u4F7F\u7528\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\n{1}\u306E\u884C{0}\u306ESOAP\u62E1\u5F35\u8981\u7D20\u306B\u306Fuse=\"encoded\"\u304C\u542B\u307E\u308C\u307E\u3059"
-# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string.
-warning.faultEmptyAction=\"{2}\"\u64CD\u4F5C\u306E\"{0}\" {1}\u8981\u7D20\u306E\u7A7A\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u304B\u308F\u308A\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059
-# Not concatenated with any other string.
-warning.inputOutputEmptyAction=\"{1}\"\u64CD\u4F5C\u306E{0}\u8981\u7D20\u306E\u7A7A\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u304B\u308F\u308A\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059
-
-#wsi compliant WSDL warnings
-warning.wsi.r2001=WSI-BP\u6E96\u62E0WSDL (R2001\u3001R2002)\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002wsdl:import\u3067\u306FWSDL\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u307F\u3092\u30A4\u30F3\u30DD\u30FC\u30C8\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\"{0}\"\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u3092\u8A66\u884C\u3057\u3066\u3044\u307E\u3059
-warning.wsi.r2002=WSI-BP\u6E96\u62E0WSDL (R2002)\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002wsdl:import\u306F\u3001WSDL\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u57CB\u3081\u8FBC\u307E\u308C\u305FXML\u30B9\u30AD\u30FC\u30DE\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002WSDL\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9: {0}\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001{1}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-warning.wsi.r2003=WSI-BP\u6E96\u62E0WSDL (R2003)\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002xsd:import\u306F\u3001xsd:schema\u8981\u7D20\u5185\u3067\u306E\u307F\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-warning.wsi.r2004=WSI-BP\u6E96\u62E0WSDL (R2001\u3001R2004)\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002xsd:import\u3067\u306F\u3001WSDL\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u306B\u30A4\u30F3\u30E9\u30A4\u30F3\u306B\u57CB\u3081\u8FBC\u307E\u308C\u305FXML\u30B9\u30AD\u30FC\u30DE\u5B9A\u7FA9\u306F\u30A4\u30F3\u30DD\u30FC\u30C8\u3067\u304D\u307E\u305B\u3093\u3002
-
-#Parser
-Parsing.ParseFailed = \tWSDL\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-
-Parsing.NotAWSDL=WSDL\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002{0}\u304C\u6709\u52B9\u306AWSDL\u30D5\u30A1\u30A4\u30EB\u3067\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
-
-AbstractReferenceFinderImpl.UnableToParse = \t"{0}"\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093: {1}
-
-# Not concatenated with any other string.
-Parser.NotABindingFile = \t\u5916\u90E8\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u30EB\u30FC\u30C8\u8981\u7D20\u306F''{''http://java.sun.com/xml/ns/jaxws''}''bindings\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u304C\u3001''{''{0}''}''{1}\u3067\u3059
-
-
-#Internalizer
-Internalizer.TwoVersionAttributes = \tjaxws:version\u304A\u3088\u3073\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u4E21\u65B9\u304C\u5B58\u5728\u3057\u307E\u3059
-Internalizer.IncorrectVersion = \tJAXWS\u306Eversion\u5C5E\u6027\u306F"2.0"\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-Internalizer.VersionNotPresent = \tJAXWS\u306Eversion\u5C5E\u6027\u304C\u5B58\u5728\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-internalizer.targetNotAnElement= \t\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30CE\u30FC\u30C9\u306F\u8981\u7D20\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-internalizer.targetNotFound= \twsdlLocation: {0}\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-
-Internalizer.IncorrectSchemaReference= \t"{0}"\u306F\u3053\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u306E\u4E00\u90E8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002"{1}"\u306E\u8AA4\u308A\u3067\u3042\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
-
-internalizer.XPathEvaluationError = XPath\u30A8\u30E9\u30FC: {0}
-internalizer.XPathEvaluatesToNoTarget = "{0}"\u306EXPath\u8A55\u4FA1\u3067\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30CE\u30FC\u30C9\u304C\u7A7A\u3068\u306A\u308A\u307E\u3057\u305F
-internalizer.XPathEvaulatesToTooManyTargets = "{0}"\u306EXPath\u8A55\u4FA1\u3067\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30CE\u30FC\u30C9\u304C\u591A\u304F\u306A\u308A\u3059\u304E\u307E\u3057\u305F({1})
-internalizer.XPathEvaluatesToNonElement = "{0}"\u306EXPath\u8A55\u4FA1\u3067\u306F\u8981\u7D20\u3068\u306A\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-invalid.customization.namespace=\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u306A\u3044\u305F\u3081\u3001\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA: \"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u30FB\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306B\u5C5E\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-
-# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX...
-invalid.wsdl.with.dooc="WSDL\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {0}\u3002\"{1}\"\u3092\u6307\u5B9A\u3057\u3001MEX\u3067\u518D\u8A66\u884C\u3057\u3066\u3044\u307E\u3059..."
-invalid.wsdl=WSDL {0}\u304C\u7121\u52B9\u3067\u3059\u3002\u6B21\u306E\u5834\u6240\u3067{1}\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001{2}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F(\u884C{3})
-# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX...
-try.with.mex= {0} \n\nMEX\u3067\u518D\u8A66\u884C\u3057\u3066\u3044\u307E\u3059...
-file.not.found={0}\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093
-parsing.unableToGetMetadata= {0}\n\n{1}
-failed.noservice=failed.noservice=\u6307\u5B9A\u3055\u308C\u305FWSDL\u3067wsdl:service\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F: \n\n{0} \u5C11\u306A\u304F\u3068\u30821\u3064\u306EWSDL\u3092\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u30B5\u30FC\u30D3\u30B9\u5B9A\u7FA9\u3068\u3068\u3082\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ko.properties
deleted file mode 100644
index 2dc230e9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ko.properties
+++ /dev/null
@@ -1,157 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-localized.error={0}
-parsing.wsdlNotDefaultNamespace=\uAE30\uBCF8 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB294 \"{0}\"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-# Not concatenated with any other string.
-parsing.onlyOneOfElementOrTypeRequired=\"element\" \uB610\uB294 \"type\" \uC18D\uC131 \uC911 \uD558\uB098\uB9CC \"{0}\" \uBD80\uBD84\uC5D0\uC11C \uD5C8\uC6A9\uB429\uB2C8\uB2E4.
-# Not concatenated with any other string.
-parsing.elementOrTypeRequired=\uACBD\uACE0: {0} \uBD80\uBD84\uC774 \uBB34\uC2DC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \"{0}\" \uBD80\uBD84\uC5D0\uB294 \"element\" \uB610\uB294 \"type\" \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-parsing.invalidElement=\uBD80\uC801\uD569\uD55C \uC694\uC18C: \"{1}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC758 \"{0}\"
-parsing.invalidAttributeValue=\"{0}\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12 \"{1}\"\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-parsing.invalidExtensionElement=\uBD80\uC801\uD569\uD55C \uD655\uC7A5 \uC694\uC18C: \"{1}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC758 \"{0}\"
-parsing.invalidWsdlElement=\uBD80\uC801\uD569\uD55C WSDL \uC694\uC18C: \"{0}\"
-parsing.requiredExtensibilityElement=\"{1}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC758 \"{0}\"\uC740(\uB294) \uC54C \uC218 \uC5C6\uB294 \uD544\uC218 \uD655\uC7A5\uC131 \uC694\uC18C\uC785\uB2C8\uB2E4.
-parsing.tooManyElements=\"{1}\" \uC694\uC18C\uC5D0 \"{0}\" \uC694\uC18C\uAC00 \uB108\uBB34 \uB9CE\uC2B5\uB2C8\uB2E4. \"{2}\"
-parsing.invalidOperationStyle=\"{0}\" \uC791\uC5C5\uC5D0 \uBD80\uC801\uD569\uD55C \uC2A4\uD0C0\uC77C\uC774 \uC788\uC2B5\uB2C8\uB2E4.
-# {0} - "definitions". Not concatenated with any other string.
-parsing.onlyOneTypesAllowed=\uD558\uB098\uC758 "types" \uC694\uC18C\uB9CC "{0}"\uC5D0\uC11C \uD5C8\uC6A9\uB429\uB2C8\uB2E4.
-# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string.
-parsing.onlyOneDocumentationAllowed=\uD558\uB098\uC758 "documentation" \uC694\uC18C\uB9CC "{0}"\uC5D0\uC11C \uD5C8\uC6A9\uB429\uB2C8\uB2E4.
-parsing.incorrectRootElement=\"{3}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uB8E8\uD2B8 \uC694\uC18C \"{2}\"\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC \"{1}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0\uC11C \"{0}\" \uC694\uC18C\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-parsing.unknownImportedDocumentType=\uC784\uD3EC\uD2B8\uB41C \uBB38\uC11C\uC758 \uC720\uD615\uC744 \uC54C \uC218 \uC5C6\uC74C: {0}
-# Not concatenated with any other string.
-parsing.unknownNamespacePrefix=\uC120\uC5B8\uB418\uC9C0 \uC54A\uC740 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC811\uB450\uC5B4: \"{0}\"
-parsing.invalidURI=\uBD80\uC801\uD569\uD55C URI: {0}
-# {0} - WSDL URL
-parsing.ioExceptionWithSystemId=\"{0}\"\uC5D0 \uC788\uB294 \uBB38\uC11C\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-# {0} - exception message
-parsing.ioException=\uAD6C\uBB38 \uBD84\uC11D \uC2E4\uD328: {0}
-# {0} - WSDL URL, Not concatenated with any other string.
-parsing.saxExceptionWithSystemId=WSDL \uD30C\uC77C\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4! \"{0}\"\uC5D0 \uC788\uB294 \uBB38\uC11C\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-# {0} - exception message, Not concatenated with any other string.
-parsing.saxException=WSDL \uD30C\uC77C\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4! \uAD6C\uBB38 \uBD84\uC11D \uC2E4\uD328: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.parserConfigException=WSDL \uD30C\uC77C\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4! \uAD6C\uBB38 \uBD84\uC11D \uC2E4\uD328: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.factoryConfigException=WSDL \uD30C\uC77C\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4! \uAD6C\uBB38 \uBD84\uC11D \uC2E4\uD328: {0}
-
-# Wrapped into an Exception. Not concatenated with any other string.
-parsing.missingRequiredAttribute=\"{0}\" \uC694\uC18C\uC758 \uD544\uC218 \uC18D\uC131 \"{1}\"\uC774(\uAC00) \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-parsing.invalidTag=\"{1}\" \uC694\uC18C\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC \"{0}\"\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-# {4} - element name
-parsing.invalidTagNS={4}\uC5D0 \uBD80\uC801\uD569\uD55C WSDL\uC774 \uC788\uC74C: \"{3}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \"{2}\" \uC694\uC18C\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC \"{1}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0\uC11C \"{0}\" \uC694\uC18C\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-parsing.nonWhitespaceTextFound=\uC608\uC0C1\uCE58 \uC54A\uC740 \uBE44\uACF5\uBC31 \uD14D\uC2A4\uD2B8\uB97C \uCC3E\uC74C: \"{0}\"
-# Not concatenated with any other string (written on a separate line).
-parsing.elementExpected=\uC608\uC0C1\uCE58 \uC54A\uC740 \uBE44\uC694\uC18C\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-#
-entity.duplicate=\uC911\uBCF5 \uC5D4\uD2F0\uD2F0: \"{0}\"
-# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string.
-entity.duplicateWithType=\uC911\uBCF5 \"{0}\" \uC5D4\uD2F0\uD2F0: \"{1}\"
-
-entity.notFoundByID=\uBD80\uC801\uD569\uD55C \uC5D4\uD2F0\uD2F0 ID: \"{0}\"
-entity.notFoundByQName={0} \"{1}\"\uC744(\uB97C) WSDL\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {2}
-entity.notFound.portType=wsdl:portType \"{0}\"\uC774(\uAC00) wsdl:binding \"{1}\"\uC5D0\uC11C \uCC38\uC870\uB418\uC9C0\uB9CC WSDL\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-entity.notFound.binding=wsdl:binding \"{0}"\uC774(\uAC00) wsdl:port \"{1}\"\uC5D0\uC11C \uCC38\uC870\uB418\uC9C0\uB9CC WSDL\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.missingRequiredAttribute=\"{1}\" \uC694\uC18C\uC758 \uD544\uC218 \uC18D\uC131 \"{0}\"\uC774(\uAC00) \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-validation.missingRequiredProperty=\"{1}\" \uC694\uC18C\uC758 \uD544\uC218 \uC18D\uC131 \"{0}\"\uC774(\uAC00) \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-validation.missingRequiredSubEntity=\"{1}\" \uC694\uC18C\uC758 \uD544\uC218 \uD558\uC704 \uC5D4\uD2F0\uD2F0 \"{0}\"\uC774(\uAC00) \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidElement=\uBD80\uC801\uD569\uD55C \uC694\uC18C: \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\"
-validation.invalidSimpleTypeInElement=\uBD80\uC801\uD569\uD55C \uC694\uC18C \"{1}\"\uC5D0 simpleType \"{0}\"\uC774(\uAC00) \uBA85\uBA85\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-validation.duplicatedElement=\uC911\uBCF5 \uC694\uC18C: \"{0}\"
-validation.duplicatePartName=WSDL\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. wsdl:message\uC5D0\uB294 \uC911\uBCF5 \uBD80\uBD84\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \nwsdl:message {0}\uC5D0 \uC911\uBCF5 \uBD80\uBD84 \uC774\uB984\uC774 \uC788\uC74C: \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidSubEntity=\"{1}\" \uC694\uC18C\uC758 \uD558\uC704 \uC694\uC18C \"{0}\"\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidAttribute=\"{1}\" \uC694\uC18C\uC758 \"{0}\" \uC18D\uC131\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-validation.invalidAttributeValue=\"{0}\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12 \"{1}\"\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-# Usage not found. TODO Remove
-#validation.invalidRange=invalid range found (min: {0}, max: {1})
-validation.exclusiveAttributes=\uBC30\uD0C0\uC801 \uC18D\uC131: \"{0}\", \"{1}\"
-validation.incorrectTargetNamespace=\uB300\uC0C1 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. {1}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {0}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-# Usage not found. TODO Remove
-#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\"
-validation.shouldNotHappen=\uB0B4\uBD80 \uC624\uB958("{0}")
-# Usage not found. TODO Remove
-#validation.invalidToken=invalid token \"{0}\"
-# Usage not found. TODO Remove
-#validation.notSimpleType=not a simple type: \"{0}\"
-validation.ambiguousName=\uBAA8\uD638\uD55C \uC791\uC5C5 \uC774\uB984: \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidPrefix=undeclared namespace prefix: \"{0}\"
-# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded"
-validation.unsupportedUse.encoded="SOAP \uC778\uCF54\uB529 \uC0AC\uC6A9\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \n{1}\uC5D0\uC11C {0}\uD589\uC758 SOAP \uD655\uC7A5 \uC694\uC18C\uC5D0 use=\"encoded\"\uAC00 \uC788\uC2B5\uB2C8\uB2E4."
-# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string.
-warning.faultEmptyAction=\"{2}\" \uC791\uC5C5\uC758 \"{0}\" {1} \uC694\uC18C\uC5D0\uC11C \uBE48 \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \uB300\uC2E0 \uAE30\uBCF8\uAC12\uC744 \uC0AC\uC6A9\uD558\uB294 \uC911
-# Not concatenated with any other string.
-warning.inputOutputEmptyAction=\"{1}\" \uC791\uC5C5\uC758 {0} \uC694\uC18C\uC5D0\uC11C \uBE48 \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \uB300\uC2E0 \uAE30\uBCF8\uAC12\uC744 \uC0AC\uC6A9\uD558\uB294 \uC911
-
-#wsi compliant WSDL warnings
-warning.wsi.r2001=WSI-BP \uD638\uD658 WSDL(R2001, R2002)\uC774 \uC544\uB2D9\uB2C8\uB2E4. wsdl:import\uB294 WSDL \uBB38\uC11C\uB9CC \uC784\uD3EC\uD2B8\uD574\uC57C \uD569\uB2C8\uB2E4. \"{0}\"\uC744(\uB97C) \uC784\uD3EC\uD2B8\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911
-warning.wsi.r2002=WSI-BP \uD638\uD658 WSDL(R2002)\uC774 \uC544\uB2D9\uB2C8\uB2E4. WSDL \uBB38\uC11C\uC5D0 \uD3EC\uD568\uB41C XML \uC2A4\uD0A4\uB9C8\uB97C \uC784\uD3EC\uD2B8\uD558\uB294 \uB370\uB294 wsdl:import\uB97C \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. WSDL \uB124\uC784\uC2A4\uD398\uC774\uC2A4 {0}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {1}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-warning.wsi.r2003=WSI-BP \uD638\uD658 WSDL(R2003)\uC774 \uC544\uB2D9\uB2C8\uB2E4. xsd:import\uB294 xsd:schema \uC694\uC18C\uC5D0\uC11C\uB9CC \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4.
-warning.wsi.r2004=WSI-BP \uD638\uD658 WSDL(R2001, R2004)\uC774 \uC544\uB2D9\uB2C8\uB2E4. xsd:import\uB294 WSDL \uBB38\uC11C \uB0B4 \uC778\uB77C\uC778\uC73C\uB85C \uD3EC\uD568\uB41C XML \uC2A4\uD0A4\uB9C8 \uC815\uC758\uB97C \uC784\uD3EC\uD2B8\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-
-#Parser
-Parsing.ParseFailed = \tWSDL\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-
-Parsing.NotAWSDL=WSDL \uAD6C\uC131 \uC694\uC18C \uAC00\uC838\uC624\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. {0}\uC774(\uAC00) \uC801\uD569\uD55C WSDL \uD30C\uC77C\uC774 \uC544\uB2CC \uAC83 \uAC19\uC2B5\uB2C8\uB2E4.
-
-AbstractReferenceFinderImpl.UnableToParse = \t"{0}"\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC74C: {1}
-
-# Not concatenated with any other string.
-Parser.NotABindingFile = \t\uC678\uBD80 \uBC14\uC778\uB529 \uD30C\uC77C\uC774 \uC544\uB2D9\uB2C8\uB2E4. \uB8E8\uD2B8 \uC694\uC18C\uB294 ''{''http://java.sun.com/xml/ns/jaxws''}''bindings\uC5EC\uC57C \uD558\uC9C0\uB9CC ''{''{0}''}''{1}\uC785\uB2C8\uB2E4.
-
-
-#Internalizer
-Internalizer.TwoVersionAttributes = \tjaxb:version\uACFC version\uC774 \uC788\uC2B5\uB2C8\uB2E4.
-Internalizer.IncorrectVersion = \tJAXWS \uBC84\uC804 \uC18D\uC131\uC740 "2.0"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-Internalizer.VersionNotPresent = \tJAXWS \uBC84\uC804 \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-internalizer.targetNotAnElement= \t\uB300\uC0C1 \uB178\uB4DC\uAC00 \uC694\uC18C\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
-internalizer.targetNotFound= \tWSDL \uC704\uCE58\uC5D0 \uB300\uD55C \uB300\uC0C1\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}
-
-Internalizer.IncorrectSchemaReference= \t"{0}"\uC740(\uB294) \uC774 \uCEF4\uD30C\uC77C\uC5D0 \uC18D\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. "{1}"\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB824\uACE0 \uD55C \uAC83\uC785\uB2C8\uAE4C?
-
-internalizer.XPathEvaluationError = XPath \uC624\uB958: {0}
-internalizer.XPathEvaluatesToNoTarget = "{0}"\uC758 XPath \uD3C9\uAC00\uB85C \uBE48 \uB300\uC0C1 \uB178\uB4DC\uAC00 \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-internalizer.XPathEvaulatesToTooManyTargets = "{0}"\uC758 XPath \uD3C9\uAC00\uB85C \uB108\uBB34 \uB9CE\uC740 ({1}) \uB300\uC0C1 \uB178\uB4DC\uAC00 \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-internalizer.XPathEvaluatesToNonElement = "{0}"\uC758 XPath \uD3C9\uAC00\uB85C \uC694\uC18C\uAC00 \uC0DD\uC131\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-invalid.customization.namespace=\uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544 \"{0}\" \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uC18D\uD574\uC57C \uD569\uB2C8\uB2E4.
-
-# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX...
-invalid.wsdl.with.dooc="WSDL \uBB38\uC11C\uAC00 \uC544\uB2D8: {0}. \"{1}\"\uC744(\uB97C) \uC81C\uACF5\uD569\uB2C8\uB2E4. MEX\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC7AC\uC2DC\uB3C4\uD558\uB294 \uC911..."
-invalid.wsdl={0}\uC740(\uB294) \uBD80\uC801\uD569\uD55C WSDL\uC785\uB2C8\uB2E4. {1}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {3}\uD589\uC5D0\uC11C {2}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX...
-try.with.mex= {0} \n\nMEX\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC7AC\uC2DC\uB3C4\uD558\uB294 \uC911...
-file.not.found={0}\uC5D0 \uC5F0\uACB0\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-parsing.unableToGetMetadata= {0}\n\n{1}
-failed.noservice=failed.noservice=wsdl:service\uB97C \uC81C\uACF5\uB41C WSDL\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \n\n{0} \uC11C\uBE44\uC2A4 \uC815\uC758\uAC00 \uD558\uB098 \uC774\uC0C1\uC778 WSDL\uC744 \uD558\uB098 \uC774\uC0C1 \uC81C\uACF5\uD574\uC57C \uD569\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_pt_BR.properties
deleted file mode 100644
index 57707722..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_pt_BR.properties
+++ /dev/null
@@ -1,157 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-localized.error={0}
-parsing.wsdlNotDefaultNamespace=namespace default deve ser \"{0}\"
-# Not concatenated with any other string.
-parsing.onlyOneOfElementOrTypeRequired=somente um dos atributos \"element\" ou \"type\" \u00E9 permitido na parte \"{0}\"
-# Not concatenated with any other string.
-parsing.elementOrTypeRequired=advert\u00EAncia: a parte {0} \u00E9 ignorada, ou o \"element\" ou o atributo \"type\" \u00E9 obrigat\u00F3rio na parte \"{0}\"
-parsing.invalidElement=elemento inv\u00E1lido: \"{0}\" (no namespace \"{1}\")
-parsing.invalidAttributeValue=valor inv\u00E1lido \"{1}\" para o atributo \"{0}\"
-parsing.invalidExtensionElement=elemento de extens\u00E3o inv\u00E1lido: \"{0}\" (no namespace \"{1}\")
-parsing.invalidWsdlElement=elemento: \"{0}\" de WSDL inv\u00E1lido
-parsing.requiredExtensibilityElement=elemento \\"{0}\\" de extensibilidade obrigat\u00F3rio desconhecido (no namespace \\"{1}\\")
-parsing.tooManyElements=muitos elementos \"{0}\" no elemento \"{1}\" \"{2}\"
-parsing.invalidOperationStyle=a opera\u00E7\u00E3o \"{0}\" tem um estilo inv\u00E1lido
-# {0} - "definitions". Not concatenated with any other string.
-parsing.onlyOneTypesAllowed=somente um elemento "tipos" permitido em "{0}"
-# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string.
-parsing.onlyOneDocumentationAllowed=somente um elemento "documenta\u00E7\u00E3o" permitido em "{0}"
-parsing.incorrectRootElement=elemento-raiz \"{2}\" esperado (no namespace \"{3}\"), elemento \"{0}\" encontrado (no namespace \"{1}\")
-parsing.unknownImportedDocumentType=documento importado do tipo desconhecido: {0}
-# Not concatenated with any other string.
-parsing.unknownNamespacePrefix=prefixo de namespace n\u00E3o declarado: \"{0}\"
-parsing.invalidURI=URI: {0} inv\u00E1lido
-# {0} - WSDL URL
-parsing.ioExceptionWithSystemId=falha ao fazer parse do documento em \"{0}\"
-# {0} - exception message
-parsing.ioException=o parse falhou: {0}
-# {0} - WSDL URL, Not concatenated with any other string.
-parsing.saxExceptionWithSystemId=arquivo de WSL inv\u00E1lido! falha ao fazer parse do documento em \"{0}\"
-# {0} - exception message, Not concatenated with any other string.
-parsing.saxException=arquivo WSDL inv\u00E1lido! falha de parse: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.parserConfigException=arquivo WSDL inv\u00E1lido! falha de parse: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.factoryConfigException=arquivo WSDL inv\u00E1lido! falha de parse: {0}
-
-# Wrapped into an Exception. Not concatenated with any other string.
-parsing.missingRequiredAttribute=o atributo \"{1}\" obrigat\u00F3rio do elemento \"{0}\" n\u00E3o foi encontrado
-parsing.invalidTag=esperava o elemento \"{1}\"; encontrou \"{0}\"
-# {4} - element name
-parsing.invalidTagNS=WSDL inv\u00E1lido em {4}: esperava o elemento \\"{2}\\" (no namespace \\"{3}\\"); encontrou o elemento \\"{0}\\" (no namespace \\"{1}\\")
-parsing.nonWhitespaceTextFound=detectou texto sem espa\u00E7o em branco: \"{0}\" inesperado
-# Not concatenated with any other string (written on a separate line).
-parsing.elementExpected=sem elemento encontrado inesperado
-#
-entity.duplicate=entidade: \"{0}\" duplicada
-# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string.
-entity.duplicateWithType=entidade \"{0}\" duplicada: \"{1}\"
-
-entity.notFoundByID=id da entidade: \"{0}\" inv\u00E1lida
-entity.notFoundByQName={0} \\"{1}\\" n\u00E3o encontrada no wsdl: {2}
-entity.notFound.portType=wsdl:portType \"{0}\" mencionado por wsdl:binding \"{1}\", mas n\u00E3o foi encontrado no wsdl
-entity.notFound.binding=wsdl:binding \"{0}" mencionado por wsdl:port \"{1}\", mas n\u00E3o foi encontrado no wsdl
-
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.missingRequiredAttribute=o atributo \"{0}\" obrigat\u00F3rio do elemento \"{1}\" n\u00E3o foi encontrado
-validation.missingRequiredProperty=a propriedade \"{0}\" obrigat\u00F3ria do elemento \"{1}\" n\u00E3o foi encontrado
-validation.missingRequiredSubEntity=a subentidade obrigat\u00F3ria \"{0}\" do elemento \"{1}\" n\u00E3o foi encontrada
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidElement=elemento inv\u00E1lido: \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\"
-validation.invalidSimpleTypeInElement=elemento: \"{1}\" inv\u00E1lido, tem simpleType: \"{0}\" nomeado
-validation.duplicatedElement=elemento: \"{0}\" duplicado
-validation.duplicatePartName=WSDL inv\u00E1lido, pe\u00E7as duplicadas em uma wsdl:message n\u00E3o \u00E9 permitida. \nwsdl:message {0} tem um nome de pe\u00E7a: \"{1}\" duplicado
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidSubEntity=subelemento inv\u00E1lido \"{0}\" do elemento \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidAttribute=atributo inv\u00E1lido \"{0}\" do elemento \"{1}\"
-validation.invalidAttributeValue=valor inv\u00E1lido \"{1}\" para o atributo \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidRange=invalid range found (min: {0}, max: {1})
-validation.exclusiveAttributes=atributos exclusivos: \"{0}\", \"{1}\"
-validation.incorrectTargetNamespace=o namespace do alvo est\u00E1 incorreto (esperava: {1}; encontrou: {0})
-# Usage not found. TODO Remove
-#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\"
-validation.shouldNotHappen=erro interno ("{0}")
-# Usage not found. TODO Remove
-#validation.invalidToken=invalid token \"{0}\"
-# Usage not found. TODO Remove
-#validation.notSimpleType=not a simple type: \"{0}\"
-validation.ambiguousName=nome da opera\u00E7\u00E3o: \"{0}\" amb\u00EDguo
-# Usage not found. TODO Remove
-#validation.invalidPrefix=undeclared namespace prefix: \"{0}\"
-# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded"
-validation.unsupportedUse.encoded="O uso da Codifica\u00E7\u00E3o SOAP n\u00E3o \u00E9 suportado. \nO elemento da extens\u00E3o de SOAP na linha {0} em {1} tem o uso=\"encoded\" "
-# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string.
-warning.faultEmptyAction=ignorando A\u00E7\u00E3o vazia no elemento \"{0}\" {1} da opera\u00E7\u00E3o \"{2}\", usando default
-# Not concatenated with any other string.
-warning.inputOutputEmptyAction=ignorando A\u00E7\u00E3o vazia no elemento {0} da opera\u00E7\u00E3o \"{1}\"; usando o valor default em seu lugar
-
-#wsi compliant WSDL warnings
-warning.wsi.r2001=N\u00E3o \u00E9 um WSDL compat\u00EDvel com WSI-BP (R2001, R2002). wsdl:import deve importar somente documentos WSDL. Est\u00E1 tentando importar: \\"{0}\\"
-warning.wsi.r2002=N\u00E3o \u00E9 um WSDL (R2002) compat\u00EDvel com WSI-BP. wsdl:import n\u00E3o deve ser usado para importar o Esquema XML incorporado no documento WSDL. Esperava o namespace WSDL: {0}, encontrou: {1}
-warning.wsi.r2003=N\u00E3o \u00E9 um WSDL compat\u00EDvel com WSI-BP (R2003). xsd:import s\u00F3 deve ser usado nos elementos de xsd:schema.
-warning.wsi.r2004=N\u00E3o \u00E9 um WSDL (R2001, R2004) compat\u00EDvel com WSI-BP. xsd:import n\u00E3o deve importar as defini\u00E7\u00F5es do Esquema XML incorporadas em linha no documento WSDL.
-
-#Parser
-Parsing.ParseFailed = \tFalha ao fazer parse do WSDL.
-
-Parsing.NotAWSDL=Falha ao obter os componentes WSDL, provavelmente {0} n\u00E3o \u00E9 um arquivo WSDL v\u00E1lido.
-
-AbstractReferenceFinderImpl.UnableToParse = \tN\u00E3o \u00E9 poss\u00EDvel fazer parse de "{0}" : {1}
-
-# Not concatenated with any other string.
-Parser.NotABindingFile = \tn\u00E3o \u00E9 um arquivo de bind externo. O elemento-raiz deve ser binds {http://java.sun.com/xml/ns/jaxws}, mas \u00E9 "{{0}}"{1}
-
-
-#Internalizer
-Internalizer.TwoVersionAttributes = \tTanto jaxws:version como version est\u00E3o presentes
-Internalizer.IncorrectVersion = \to atributo da vers\u00E3o JAXWS deve ser "2.0"
-
-Internalizer.VersionNotPresent = \to atributo da vers\u00E3o JAXWS deve estar presente
-
-internalizer.targetNotAnElement= \tO n\u00F3 do alvo n\u00E3o \u00E9 um elemento
-internalizer.targetNotFound= \tNenhum alvo encontrado para o wsdlLocation: {0}
-
-Internalizer.IncorrectSchemaReference= \t"{0}" n\u00E3o faz parte desta compila\u00E7\u00E3o. \u00C9 um erro de "{1}"?
-
-internalizer.XPathEvaluationError = Erro de XPath: {0}
-internalizer.XPathEvaluatesToNoTarget = A avalia\u00E7\u00E3o de XPath de "{0}" resulta em um n\u00F3 do alvo vazio
-internalizer.XPathEvaulatesToTooManyTargets = A avalia\u00E7\u00E3o do XPath de "{0}" resulta em um n\u00FAmero excessivo de n\u00F3s do alvo ({1})
-internalizer.XPathEvaluatesToNonElement = A avalia\u00E7\u00E3o do XPath de "{0}" precisa resultar em um elemento.
-invalid.customization.namespace=Ignorando personaliza\u00E7\u00E3o: \"{0}\", porque n\u00E3o tem namespace. Deve pertencer ao namespace de personaliza\u00E7\u00E3o.
-
-# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX...
-invalid.wsdl.with.dooc="N\u00E3o \u00E9 um documento WSDL: {0}, ele fornece \"{1}\", recuperando com MEX..."
-invalid.wsdl=WSDL {0} inv\u00E1lido, esperava {1} encontrou {2} na (linha {3})
-# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX...
-try.with.mex= {0} \n\nrecuperando com MEX...
-file.not.found={0} \u00E9 inacess\u00EDvel
-parsing.unableToGetMetadata= {0}\n\n{1}
-failed.noservice=failed.noservice=N\u00E3o foi poss\u00EDvel localizar wsdl:service no(s) WSDL fornecido: \n\n{0} Pelo menos um WSDL com pelo menos uma defini\u00E7\u00E3o de servi\u00E7o precisa ser fornecido.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_CN.properties
deleted file mode 100644
index 13e41fe7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_CN.properties
+++ /dev/null
@@ -1,157 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-localized.error={0}
-parsing.wsdlNotDefaultNamespace=\u9ED8\u8BA4\u540D\u79F0\u7A7A\u95F4\u5FC5\u987B\u4E3A \"{0}\"
-# Not concatenated with any other string.
-parsing.onlyOneOfElementOrTypeRequired=\u90E8\u5206 \"{0}\" \u4E2D\u53EA\u5141\u8BB8\u6709 \"element\" \u6216 \"type\" \u5C5E\u6027\u4E2D\u7684\u5176\u4E2D\u4E00\u4E2A
-# Not concatenated with any other string.
-parsing.elementOrTypeRequired=\u8B66\u544A: \u5FFD\u7565\u90E8\u5206{0}, \u90E8\u5206 \"{0}\" \u4E2D\u9700\u8981 \"element\" \u6216 \"type\" \u5C5E\u6027
-parsing.invalidElement=\u5143\u7D20\u65E0\u6548: \"{0}\" (\u4F4D\u4E8E\u540D\u79F0\u7A7A\u95F4 \"{1}\" \u4E2D)
-parsing.invalidAttributeValue=\u5C5E\u6027 \"{0}\" \u7684\u503C \"{1}\" \u65E0\u6548
-parsing.invalidExtensionElement=\u6269\u5C55\u5143\u7D20\u65E0\u6548: \"{0}\" (\u4F4D\u4E8E\u540D\u79F0\u7A7A\u95F4 \"{1}\" \u4E2D)
-parsing.invalidWsdlElement=WSDL \u5143\u7D20\u65E0\u6548: \"{0}\"
-parsing.requiredExtensibilityElement=\u672A\u77E5\u7684\u5FC5\u9700\u53EF\u6269\u5C55\u6027\u5143\u7D20 \"{0}\" (\u4F4D\u4E8E\u540D\u79F0\u7A7A\u95F4 \"{1}\" \u4E2D)
-parsing.tooManyElements=\"{1}\" \u5143\u7D20 \"{2}\" \u4E0B\u7684 \"{0}\" \u5143\u7D20\u8FC7\u591A
-parsing.invalidOperationStyle=\u64CD\u4F5C \"{0}\" \u7684\u6837\u5F0F\u65E0\u6548
-# {0} - "definitions". Not concatenated with any other string.
-parsing.onlyOneTypesAllowed="{0}" \u4E2D\u53EA\u5141\u8BB8\u6709\u4E00\u4E2A "types" \u5143\u7D20
-# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string.
-parsing.onlyOneDocumentationAllowed="{0}" \u4E2D\u53EA\u5141\u8BB8\u6709\u4E00\u4E2A "documentation" \u5143\u7D20
-parsing.incorrectRootElement=\u5E94\u4E3A\u6839\u5143\u7D20 \"{2}\" (\u4F4D\u4E8E\u540D\u79F0\u7A7A\u95F4 \"{3}\" \u4E2D), \u627E\u5230\u7684\u662F\u5143\u7D20 \"{0}\" (\u4F4D\u4E8E\u540D\u79F0\u7A7A\u95F4 \"{1}\" \u4E2D)
-parsing.unknownImportedDocumentType=\u6240\u5BFC\u5165\u6587\u6863\u7684\u7C7B\u578B\u672A\u77E5: {0}
-# Not concatenated with any other string.
-parsing.unknownNamespacePrefix=\u672A\u58F0\u660E\u540D\u79F0\u7A7A\u95F4\u524D\u7F00: \"{0}\"
-parsing.invalidURI=URI \u65E0\u6548: {0}
-# {0} - WSDL URL
-parsing.ioExceptionWithSystemId=\u65E0\u6CD5\u89E3\u6790\u4F4D\u4E8E \"{0}\" \u4E2D\u7684\u6587\u6863
-# {0} - exception message
-parsing.ioException=\u89E3\u6790\u5931\u8D25: {0}
-# {0} - WSDL URL, Not concatenated with any other string.
-parsing.saxExceptionWithSystemId=WSDL \u6587\u4EF6\u65E0\u6548! \u65E0\u6CD5\u89E3\u6790\u4F4D\u4E8E \"{0}\" \u4E2D\u7684\u6587\u6863
-# {0} - exception message, Not concatenated with any other string.
-parsing.saxException=WSDL \u6587\u4EF6\u65E0\u6548! \u89E3\u6790\u5931\u8D25: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.parserConfigException=WSDL \u6587\u4EF6\u65E0\u6548! \u89E3\u6790\u5931\u8D25: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.factoryConfigException=WSDL \u6587\u4EF6\u65E0\u6548! \u89E3\u6790\u5931\u8D25: {0}
-
-# Wrapped into an Exception. Not concatenated with any other string.
-parsing.missingRequiredAttribute=\u7F3A\u5C11\u5143\u7D20 \"{0}\" \u7684\u5FC5\u9700\u5C5E\u6027 \"{1}\"
-parsing.invalidTag=\u5E94\u4E3A\u5143\u7D20 \"{1}\", \u627E\u5230\u7684\u662F \"{0}\"
-# {4} - element name
-parsing.invalidTagNS=\u4F4D\u4E8E{4}\u4E2D\u7684 WSDL \u65E0\u6548: \u5E94\u4E3A\u5143\u7D20 \"{2}\" (\u4F4D\u4E8E\u540D\u79F0\u7A7A\u95F4 \"{3}\" \u4E2D), \u627E\u5230\u7684\u662F\u5143\u7D20 \"{0}\" (\u4F4D\u4E8E\u540D\u79F0\u7A7A\u95F4 \"{1}\" \u4E2D)
-parsing.nonWhitespaceTextFound=\u627E\u5230\u610F\u5916\u7684\u975E\u7A7A\u683C\u6587\u672C: \"{0}\"
-# Not concatenated with any other string (written on a separate line).
-parsing.elementExpected=\u627E\u5230\u610F\u5916\u7684\u975E\u5143\u7D20
-#
-entity.duplicate=\u5B9E\u4F53\u91CD\u590D: \"{0}\"
-# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string.
-entity.duplicateWithType=\"{0}\" \u5B9E\u4F53\u91CD\u590D: \"{1}\"
-
-entity.notFoundByID=\u5B9E\u4F53 ID \u65E0\u6548: \"{0}\"
-entity.notFoundByQName=\u5728 wsdl \u4E2D\u672A\u627E\u5230{0} \"{1}\": {2}
-entity.notFound.portType=wsdl:portType \"{0}\" \u7531 wsdl:binding \"{1}\" \u5F15\u7528, \u4F46\u5728 wsdl \u4E2D\u672A\u627E\u5230\u5B83
-entity.notFound.binding=wsdl:binding \"{0}" \u7531 wsdl:port \"{1}\" \u5F15\u7528, \u4F46\u5728 wsdl \u4E2D\u672A\u627E\u5230\u5B83
-
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.missingRequiredAttribute=\u7F3A\u5C11\u5143\u7D20 \"{1}\" \u7684\u5FC5\u9700\u5C5E\u6027 \"{0}\"
-validation.missingRequiredProperty=\u7F3A\u5C11\u5143\u7D20 \"{1}\" \u7684\u5FC5\u9700\u5C5E\u6027 \"{0}\"
-validation.missingRequiredSubEntity=\u7F3A\u5931\u5143\u7D20 \"{1}\" \u7684\u5FC5\u9700\u7684\u5B50\u5B9E\u4F53 \"{0}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidElement=\u5143\u7D20\u65E0\u6548: \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\"
-validation.invalidSimpleTypeInElement=\u5143\u7D20\u65E0\u6548: \"{1}\", \u5177\u6709\u5DF2\u547D\u540D\u7684 simpleType: \"{0}\"
-validation.duplicatedElement=\u5143\u7D20\u91CD\u590D: \"{0}\"
-validation.duplicatePartName=WSDL \u65E0\u6548, \u4E0D\u5141\u8BB8 wsdl:message \u4E2D\u6709\u91CD\u590D\u90E8\u5206\u3002\nwsdl:message {0}\u5B58\u5728\u91CD\u590D\u7684\u90E8\u5206\u540D\u79F0: \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidSubEntity=\u5143\u7D20 \"{1}\" \u7684\u5B50\u5143\u7D20 \"{0}\" \u65E0\u6548
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidAttribute=\u5143\u7D20 \"{1}\" \u7684\u5C5E\u6027 \"{0}\" \u65E0\u6548
-validation.invalidAttributeValue=\u5C5E\u6027 \"{0}\" \u7684\u503C \"{1}\" \u65E0\u6548
-# Usage not found. TODO Remove
-#validation.invalidRange=invalid range found (min: {0}, max: {1})
-validation.exclusiveAttributes=\u4E92\u65A5\u5C5E\u6027: \"{0}\", \"{1}\"
-validation.incorrectTargetNamespace=\u76EE\u6807\u540D\u79F0\u7A7A\u95F4\u4E0D\u6B63\u786E (\u5E94\u4E3A: {1}, \u627E\u5230\u7684\u662F: {0})
-# Usage not found. TODO Remove
-#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\"
-validation.shouldNotHappen=\u5185\u90E8\u9519\u8BEF ("{0}")
-# Usage not found. TODO Remove
-#validation.invalidToken=invalid token \"{0}\"
-# Usage not found. TODO Remove
-#validation.notSimpleType=not a simple type: \"{0}\"
-validation.ambiguousName=\u4E0D\u660E\u786E\u7684\u64CD\u4F5C\u540D: \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidPrefix=undeclared namespace prefix: \"{0}\"
-# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded"
-validation.unsupportedUse.encoded="\u4E0D\u652F\u6301\u4F7F\u7528 SOAP \u7F16\u7801\u3002\n{1}\u4E2D\u7684\u7B2C {0} \u884C\u4E0A\u7684 SOAP \u6269\u5C55\u5143\u7D20\u5305\u542B use=\"encoded\" "
-# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string.
-warning.faultEmptyAction=\u5FFD\u7565 \"{2}\" \u64CD\u4F5C\u7684 \"{0}\" {1}\u5143\u7D20\u4E2D\u7684\u7A7A\u64CD\u4F5C, \u6539\u7528\u9ED8\u8BA4\u503C
-# Not concatenated with any other string.
-warning.inputOutputEmptyAction=\u5FFD\u7565 \"{1}\" \u64CD\u4F5C\u7684{0}\u5143\u7D20\u4E2D\u7684\u7A7A\u64CD\u4F5C, \u6539\u7528\u9ED8\u8BA4\u503C
-
-#wsi compliant WSDL warnings
-warning.wsi.r2001=\u4E0D\u662F WSI-BP \u517C\u5BB9\u7684 WSDL (R2001, R2002)\u3002wsdl:import \u53EA\u80FD\u5BFC\u5165 WSDL \u6587\u6863\u3002\u5B83\u5C1D\u8BD5\u5BFC\u5165\u7684\u662F: \"{0}\"
-warning.wsi.r2002=\u4E0D\u662F WSI-BP \u517C\u5BB9\u7684 WSDL (R2002)\u3002wsdl:import \u4E0D\u80FD\u7528\u4E8E\u5BFC\u5165\u5D4C\u5165\u5728 WSDL \u6587\u6863\u4E2D\u7684 XML \u6A21\u5F0F\u3002\u5E94\u4E3A WSDL \u540D\u79F0\u7A7A\u95F4: {0}, \u627E\u5230\u7684\u662F: {1}
-warning.wsi.r2003=\u4E0D\u662F WSI-BP \u517C\u5BB9\u7684 WSDL (R2003)\u3002xsd:import \u53EA\u80FD\u5728 xsd:schema \u5143\u7D20\u4E2D\u4F7F\u7528\u3002
-warning.wsi.r2004=\u4E0D\u662F WSI-BP \u517C\u5BB9\u7684 WSDL (R2001, R2004)\u3002xsd:import \u4E0D\u80FD\u5BFC\u5165\u5185\u5D4C\u5728 WSDL \u6587\u6863\u4E2D\u7684 XML \u6A21\u5F0F\u5B9A\u4E49\u3002
-
-#Parser
-Parsing.ParseFailed = \t\u65E0\u6CD5\u89E3\u6790 WSDL\u3002
-
-Parsing.NotAWSDL=\u65E0\u6CD5\u83B7\u53D6 WSDL \u7EC4\u4EF6, \u53EF\u80FD{0}\u4E0D\u662F\u6709\u6548\u7684 WSDL \u6587\u4EF6\u3002
-
-AbstractReferenceFinderImpl.UnableToParse = \t\u65E0\u6CD5\u89E3\u6790 "{0}": {1}
-
-# Not concatenated with any other string.
-Parser.NotABindingFile = \t\u4E0D\u662F\u5916\u90E8\u7ED1\u5B9A\u6587\u4EF6\u3002\u6839\u5143\u7D20\u5FC5\u987B\u4E3A ''{''http://java.sun.com/xml/ns/jaxws''}'' \u7ED1\u5B9A, \u4F46\u5B9E\u9645\u4E3A ''{''{0}''}''{1}
-
-
-#Internalizer
-Internalizer.TwoVersionAttributes = \tjaxws:version \u548C\u7248\u672C\u540C\u65F6\u5B58\u5728
-Internalizer.IncorrectVersion = \tJAXWS \u7248\u672C\u5C5E\u6027\u5FC5\u987B\u4E3A "2.0"
-
-Internalizer.VersionNotPresent = \tJAXWS \u7248\u672C\u5C5E\u6027\u5FC5\u987B\u5B58\u5728
-
-internalizer.targetNotAnElement= \t\u76EE\u6807\u8282\u70B9\u4E0D\u662F\u5143\u7D20
-internalizer.targetNotFound= \t\u672A\u627E\u5230 wsdlLocation \u7684\u76EE\u6807: {0}
-
-Internalizer.IncorrectSchemaReference= \t"{0}" \u4E0D\u662F\u6B64\u7F16\u8BD1\u7684\u4E00\u90E8\u5206\u3002\u8FD9\u662F\u5426\u5C5E\u4E8E "{1}" \u7684\u9519\u8BEF?
-
-internalizer.XPathEvaluationError = XPath \u9519\u8BEF: {0}
-internalizer.XPathEvaluatesToNoTarget = "{0}" \u7684 XPath \u6C42\u503C\u4EA7\u751F\u7A7A\u76EE\u6807\u8282\u70B9
-internalizer.XPathEvaulatesToTooManyTargets = "{0}" \u7684 XPath \u6C42\u503C\u751F\u6210\u4E86\u8FC7\u591A\u7684 ({1}) \u76EE\u6807\u8282\u70B9
-internalizer.XPathEvaluatesToNonElement = "{0}" \u7684 XPath \u6C42\u503C\u5FC5\u987B\u751F\u6210\u5143\u7D20\u3002
-invalid.customization.namespace=\u7531\u4E8E\u5B9A\u5236\u8BBE\u7F6E \"{0}\" \u6CA1\u6709\u540D\u79F0\u7A7A\u95F4, \u56E0\u6B64\u5C06\u5176\u5FFD\u7565\u3002\u5B83\u5FC5\u987B\u5C5E\u4E8E\u5B9A\u5236\u8BBE\u7F6E\u540D\u79F0\u7A7A\u95F4\u3002
-
-# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX...
-invalid.wsdl.with.dooc="\u4E0D\u662F WSDL \u6587\u6863: {0}, \u5B83\u63D0\u4F9B\u7684\u662F \"{1}\", \u6B63\u5728\u4F7F\u7528 MEX \u91CD\u8BD5..."
-invalid.wsdl=WSDL {0}\u65E0\u6548, \u5E94\u4E3A{1}, \u5728\u884C {3} \u627E\u5230\u7684\u662F{2}
-# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX...
-try.with.mex= {0} \n\n\u6B63\u5728\u4F7F\u7528 MEX \u91CD\u8BD5...
-file.not.found={0}\u4E0D\u53EF\u8BBF\u95EE
-parsing.unableToGetMetadata= {0}\n\n{1}
-failed.noservice=failed.noservice=\u5728\u63D0\u4F9B\u7684 WSDL \u4E2D\u627E\u4E0D\u5230 wsdl:service: \n\n{0}\u9700\u8981\u81F3\u5C11\u63D0\u4F9B\u4E00\u4E2A WSDL, \u8BE5 WSDL \u81F3\u5C11\u5177\u6709\u4E00\u4E2A\u670D\u52A1\u5B9A\u4E49\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_TW.properties
deleted file mode 100644
index 6fb04e16..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_TW.properties
+++ /dev/null
@@ -1,157 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-localized.error={0}
-parsing.wsdlNotDefaultNamespace=\u9810\u8A2D\u547D\u540D\u7A7A\u9593\u5FC5\u9808\u662F \"{0}\"
-# Not concatenated with any other string.
-parsing.onlyOneOfElementOrTypeRequired=\u7D44\u4EF6 \"{0}\" \u4E2D\u53EA\u80FD\u4F7F\u7528 \"element\" \u6216 \"type\" \u5176\u4E2D\u4E00\u500B\u5C6C\u6027
-# Not concatenated with any other string.
-parsing.elementOrTypeRequired=\u8B66\u544A: \u5DF2\u5FFD\u7565\u7D44\u4EF6 {0}, \u7D44\u4EF6 \"{0}\" \u4E2D\u53EA\u9700\u8981 \"element\" \u6216 \"type\" \u5C6C\u6027
-parsing.invalidElement=\u7121\u6548\u7684\u5143\u7D20: \"{0}\" (\u5728\u547D\u540D\u7A7A\u9593 \"{1}\" \u4E2D)
-parsing.invalidAttributeValue=\u5C6C\u6027 \"{0}\" \u7684\u503C \"{1}\" \u7121\u6548
-parsing.invalidExtensionElement=\u7121\u6548\u7684\u64F4\u5145\u5143\u7D20: \"{0}\" (\u5728\u547D\u540D\u7A7A\u9593 \"{1}\" \u4E2D)
-parsing.invalidWsdlElement=\u7121\u6548\u7684 WSDL \u5143\u7D20: \"{0}\"
-parsing.requiredExtensibilityElement=\u4E0D\u660E\u7684\u5FC5\u8981\u64F4\u5145\u6027\u5143\u7D20 \"{0}\" (\u5728\u547D\u540D\u7A7A\u9593 \"{1}\" \u4E2D)
-parsing.tooManyElements=\"{1}\" \u5143\u7D20\u5E95\u4E0B\u6709\u592A\u591A \"{0}\" \u5143\u7D20 \"{2}\"
-parsing.invalidOperationStyle=\u4F5C\u696D \"{0}\" \u7684\u6A23\u5F0F\u7121\u6548
-# {0} - "definitions". Not concatenated with any other string.
-parsing.onlyOneTypesAllowed="{0}" \u4E2D\u53EA\u80FD\u6709\u4E00\u500B "types" \u5143\u7D20
-# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string.
-parsing.onlyOneDocumentationAllowed="{0}" \u4E2D\u53EA\u80FD\u6709\u4E00\u500B "documentation" \u5143\u7D20
-parsing.incorrectRootElement=\u9810\u671F\u61C9\u70BA\u6839\u5143\u7D20 \"{2}\" (\u5728\u547D\u540D\u7A7A\u9593 \"{3}\" \u4E2D), \u4F46\u5BE6\u969B\u70BA\u5143\u7D20 \"{0}\" (\u5728\u547D\u540D\u7A7A\u9593 \"{1}\" \u4E2D)
-parsing.unknownImportedDocumentType=\u532F\u5165\u4E4B\u6587\u4EF6\u7684\u985E\u578B\u4E0D\u660E: {0}
-# Not concatenated with any other string.
-parsing.unknownNamespacePrefix=\u672A\u5BA3\u544A\u7684\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC: \"{0}\"
-parsing.invalidURI=\u7121\u6548\u7684 URI: {0}
-# {0} - WSDL URL
-parsing.ioExceptionWithSystemId=\u7121\u6CD5\u5256\u6790\u4F4D\u65BC \"{0}\" \u7684\u6587\u4EF6
-# {0} - exception message
-parsing.ioException=\u5256\u6790\u5931\u6557: {0}
-# {0} - WSDL URL, Not concatenated with any other string.
-parsing.saxExceptionWithSystemId=\u7121\u6548\u7684 WSDL \u6A94\u6848! \u7121\u6CD5\u5256\u6790\u4F4D\u65BC \"{0}\" \u7684\u6587\u4EF6
-# {0} - exception message, Not concatenated with any other string.
-parsing.saxException=\u7121\u6548\u7684 WSDL \u6A94\u6848! \u5256\u6790\u5931\u6557: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.parserConfigException=\u7121\u6548\u7684 WSDL \u6A94\u6848! \u5256\u6790\u5931\u6557: {0}
-# {0} - exception message, Not concatenated with any other string.
-parsing.factoryConfigException=\u7121\u6548\u7684 WSDL \u6A94\u6848! \u5256\u6790\u5931\u6557: {0}
-
-# Wrapped into an Exception. Not concatenated with any other string.
-parsing.missingRequiredAttribute=\u907A\u6F0F\u5143\u7D20 \"{0}\" \u7684\u5FC5\u8981\u5C6C\u6027 \"{1}\"
-parsing.invalidTag=\u9810\u671F\u61C9\u70BA\u5143\u7D20 \"{1}\", \u4F46\u5BE6\u969B\u70BA \"{0}\"
-# {4} - element name
-parsing.invalidTagNS={4} \u7684 WSDL \u7121\u6548: \u9810\u671F\u61C9\u70BA\u5143\u7D20 \"{2}\" (\u5728\u547D\u540D\u7A7A\u9593 \"{3}\" \u4E2D), \u4F46\u5BE6\u969B\u70BA\u5143\u7D20 \"{0}\" (\u5728\u547D\u540D\u7A7A\u9593 \"{1}\" \u4E2D)
-parsing.nonWhitespaceTextFound=\u767C\u73FE\u672A\u9810\u671F\u7684\u975E\u7A7A\u683C\u6587\u5B57: \"{0}\"
-# Not concatenated with any other string (written on a separate line).
-parsing.elementExpected=\u767C\u73FE\u672A\u9810\u671F\u7684\u975E\u5143\u7D20
-#
-entity.duplicate=\u91CD\u8907\u7684\u500B\u9AD4: \"{0}\"
-# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string.
-entity.duplicateWithType=\u91CD\u8907\u7684 \"{0}\" \u500B\u9AD4: \"{1}\"
-
-entity.notFoundByID=\u7121\u6548\u7684\u500B\u9AD4 ID: \"{0}\"
-entity.notFoundByQName=\u5728 WSDL \u4E2D\u627E\u4E0D\u5230 {0} \"{1}\": {2}
-entity.notFound.portType=\u5728 WSDL \u4E2D\u627E\u4E0D\u5230 wsdl:binding \"{1}\" \u6240\u53C3\u7167\u7684 wsdl:portType \"{0}\"
-entity.notFound.binding=\u5728 WSDL \u4E2D\u627E\u4E0D\u5230 wsdl:port \"{1}\" \u6240\u53C3\u7167\u7684 wsdl:binding \"{0}"
-
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.missingRequiredAttribute=\u907A\u6F0F\u5143\u7D20 \"{1}\" \u7684\u5FC5\u8981\u5C6C\u6027 \"{0}\"
-validation.missingRequiredProperty=\u907A\u6F0F\u5143\u7D20 \"{1}\" \u7684\u5FC5\u8981\u7279\u6027 \"{0}\"
-validation.missingRequiredSubEntity=\u907A\u6F0F\u5143\u7D20 \"{1}\" \u7684\u5FC5\u8981\u5B50\u500B\u9AD4 \"{0}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidElement=\u7121\u6548\u7684\u5143\u7D20: \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\"
-validation.invalidSimpleTypeInElement=\u7121\u6548\u7684\u5143\u7D20: \"{1}\", \u542B\u6709\u6307\u5B9A\u7684 simpleType: \"{0}\"
-validation.duplicatedElement=\u91CD\u8907\u7684\u5143\u7D20: \"{0}\"
-validation.duplicatePartName=\u7121\u6548\u7684 WSDL, wsdl:message \u4E2D\u4E0D\u5141\u8A31\u6709\u91CD\u8907\u7684\u7D44\u4EF6. \nwsdl:message {0} \u542B\u6709\u91CD\u8907\u7684\u7D44\u4EF6\u540D\u7A31: \"{1}\"
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidSubEntity=\u5143\u7D20 \"{1}\" \u7684\u5B50\u5143\u7D20 \"{0}\" \u7121\u6548
-# Wrapped into an Exception. Not concatenated with any other string.
-validation.invalidAttribute=\u5143\u7D20 \"{1}\" \u7684\u5C6C\u6027 \"{0}\" \u7121\u6548
-validation.invalidAttributeValue=\u5C6C\u6027 \"{0}\" \u7684\u503C \"{1}\" \u7121\u6548
-# Usage not found. TODO Remove
-#validation.invalidRange=invalid range found (min: {0}, max: {1})
-validation.exclusiveAttributes=\u5C08\u7528\u5C6C\u6027: \"{0}\", \"{1}\"
-validation.incorrectTargetNamespace=\u76EE\u6A19\u547D\u540D\u7A7A\u9593\u4E0D\u6B63\u78BA (\u9810\u671F\u61C9\u70BA: {1}, \u5BE6\u969B\u70BA: {0})
-# Usage not found. TODO Remove
-#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\"
-validation.shouldNotHappen=\u5167\u90E8\u932F\u8AA4 ("{0}")
-# Usage not found. TODO Remove
-#validation.invalidToken=invalid token \"{0}\"
-# Usage not found. TODO Remove
-#validation.notSimpleType=not a simple type: \"{0}\"
-validation.ambiguousName=\u4E0D\u660E\u78BA\u7684\u4F5C\u696D\u540D\u7A31: \"{0}\"
-# Usage not found. TODO Remove
-#validation.invalidPrefix=undeclared namespace prefix: \"{0}\"
-# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded"
-validation.unsupportedUse.encoded="\u4E0D\u652F\u63F4\u4F7F\u7528\u300CSOAP \u7DE8\u78BC\u300D. \n{1} \u4E2D\u7B2C {0} \u884C\u7684 SOAP \u64F4\u5145\u5143\u7D20\u4F7F\u7528 use=\"encoded\" "
-# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string.
-warning.faultEmptyAction=\u5FFD\u7565 \"{2}\" \u4F5C\u696D\u4E4B \"{0}\" {1} \u5143\u7D20\u4E2D\u7684\u7A7A\u767D Action, \u6539\u7528\u9810\u8A2D\u503C
-# Not concatenated with any other string.
-warning.inputOutputEmptyAction=\u5FFD\u7565 \"{1}\" \u4F5C\u696D\u4E4B {0} \u5143\u7D20\u4E2D\u7684\u7A7A\u767D Action, \u6539\u7528\u9810\u8A2D\u503C
-
-#wsi compliant WSDL warnings
-warning.wsi.r2001=\u4E0D\u662F WSI-BP \u76F8\u5BB9\u7684 WSDL (R2001, R2002). wsdl:import \u53EA\u80FD\u532F\u5165 WSDL \u6587\u4EF6. \u4F46\u662F, \u5B83\u5617\u8A66\u532F\u5165: \\"{0}\\"
-warning.wsi.r2002=\u4E0D\u662F WSI-BP \u76F8\u5BB9\u7684 WSDL (R2002). \u53EA\u80FD\u4F7F\u7528 wsdl:import \u532F\u5165 WSDL \u6587\u4EF6\u4E2D\u5167\u5D4C\u7684\u300CXML \u7DB1\u8981\u300D. \u9810\u671F\u61C9\u70BA WSDL \u547D\u540D\u7A7A\u9593: {0}, \u4F46\u5BE6\u969B\u70BA: {1}
-warning.wsi.r2003=\u4E0D\u662F WSI-BP \u76F8\u5BB9\u7684 WSDL (R2003). \u53EA\u80FD\u5728 xsd:schema \u5143\u7D20\u4E4B\u5167\u4F7F\u7528 xsd:import.
-warning.wsi.r2004=\u4E0D\u662F WSI-BP \u76F8\u5BB9\u7684 WSDL (R2001, R2004). xsd:import \u4E0D\u53EF\u532F\u5165 WSDL \u6587\u4EF6\u4E2D\u5167\u5D4C\u7684\u300CXML \u7DB1\u8981\u300D\u5B9A\u7FA9.
-
-#Parser
-Parsing.ParseFailed = \t\u7121\u6CD5\u5256\u6790 WSDL.
-
-Parsing.NotAWSDL=\u7121\u6CD5\u53D6\u5F97 WSDL \u5143\u4EF6, {0} \u53EF\u80FD\u4E0D\u662F\u6709\u6548\u7684 WSDL \u6A94\u6848.
-
-AbstractReferenceFinderImpl.UnableToParse = \t\u7121\u6CD5\u5256\u6790 "{0}" : {1}
-
-# Not concatenated with any other string.
-Parser.NotABindingFile = \t\u4E0D\u662F\u5916\u90E8\u9023\u7D50\u6A94\u6848. \u6839\u5143\u7D20\u5FC5\u9808\u662F ''{''http://java.sun.com/xml/ns/jaxws''}''bindings, \u4F46\u5176\u70BA ''{''{0}''}''{1}
-
-
-#Internalizer
-Internalizer.TwoVersionAttributes = \tjaxws:version \u548C version \u540C\u6642\u5B58\u5728
-Internalizer.IncorrectVersion = \tJAXWS \u7248\u672C\u5C6C\u6027\u5FC5\u9808\u662F "2.0"
-
-Internalizer.VersionNotPresent = \tJAXWS \u7248\u672C\u5C6C\u6027\u5FC5\u9808\u5B58\u5728
-
-internalizer.targetNotAnElement= \t\u76EE\u6A19\u7BC0\u9EDE\u4E0D\u662F\u4E00\u500B\u5143\u7D20
-internalizer.targetNotFound= \t\u627E\u4E0D\u5230 wsdlLocation \u7684\u76EE\u6A19: {0}
-
-Internalizer.IncorrectSchemaReference= \t"{0}" \u4E0D\u5C6C\u65BC\u6B64\u7DE8\u8B6F. \u9019\u662F "{1}" \u932F\u8AA4\u55CE?
-
-internalizer.XPathEvaluationError = XPath \u932F\u8AA4: {0}
-internalizer.XPathEvaluatesToNoTarget = "{0}" \u7684 XPath \u8A55\u4F30\u7D50\u679C\u70BA\u7A7A\u767D\u7684\u76EE\u6A19\u7BC0\u9EDE
-internalizer.XPathEvaulatesToTooManyTargets = "{0}" \u7684 XPath \u8A55\u4F30\u5C0E\u81F4\u592A\u591A ({1}) \u76EE\u6A19\u7BC0\u9EDE
-internalizer.XPathEvaluatesToNonElement = "{0}" \u7684 XPath \u8A55\u4F30\u7D50\u679C\u5FC5\u9808\u662F\u4E00\u500B\u5143\u7D20.
-invalid.customization.namespace=\u5FFD\u7565\u81EA\u8A02 \"{0}\", \u56E0\u70BA\u5B83\u6C92\u6709\u547D\u540D\u7A7A\u9593. \u5B83\u5FC5\u9808\u5C6C\u65BC\u81EA\u8A02\u547D\u540D\u7A7A\u9593.
-
-# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX...
-invalid.wsdl.with.dooc="\u4E0D\u662F WSDL \u6587\u4EF6: {0}, \u800C\u662F \"{1}\", \u4F7F\u7528 MEX \u9032\u884C\u91CD\u8A66..."
-invalid.wsdl=\u7121\u6548\u7684 WSDL {0}, \u9810\u671F\u61C9\u70BA {1}, \u4F46\u5BE6\u969B\u70BA {2}, \u4F4D\u7F6E\u5728\u7B2C {3} \u884C
-# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX...
-try.with.mex= {0} \n\n\u4F7F\u7528 MEX \u9032\u884C\u91CD\u8A66...
-file.not.found=\u7121\u6CD5\u9023\u7DDA {0}
-parsing.unableToGetMetadata= {0}\n\n{1}
-failed.noservice=failed.noservice=\u5728\u63D0\u4F9B\u7684 WSDL \u4E2D\u627E\u4E0D\u5230 wsdl:service: \n\n{0} \u81F3\u5C11\u9700\u8981\u63D0\u4F9B\u4E00\u500B WSDL \u8207\u81F3\u5C11\u4E00\u500B\u670D\u52D9\u5B9A\u7FA9.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/spi/WSToolsObjectFactory.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/spi/WSToolsObjectFactory.java
deleted file mode 100644
index b2e83bed..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/spi/WSToolsObjectFactory.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.spi;
-
-import com.sun.tools.internal.ws.util.WSToolsObjectFactoryImpl;
-import com.sun.xml.internal.ws.api.server.Container;
-
-import java.io.OutputStream;
-
-
-/**
- * Singleton abstract factory used to produce JAX-WS tools related objects.
- *
- * @author JAX-WS Development Team
- */
-public abstract class WSToolsObjectFactory {
-
- private static final WSToolsObjectFactory factory = new WSToolsObjectFactoryImpl();
-
- /**
- * Obtain an instance of a factory. Don't worry about synchronization(at the
- * most, one more factory is created).
- */
- public static WSToolsObjectFactory newInstance() {
- return factory;
- }
-
- /**
- * Invokes wsimport on the wsdl URL argument, and generates the necessary
- * portable artifacts like SEI, Service, Bean classes etc.
- *
- * @param logStream Stream used for reporting log messages like errors, warnings etc
- * @param container gives an environment for tool if it is run during appserver
- * deployment
- * @param args arguments with various options and wsdl url
- *
- * @return true if there is no error, otherwise false
- */
- public abstract boolean wsimport(OutputStream logStream, Container container, String[] args);
-
- /**
- * Invokes wsimport on the wsdl URL argument, and generates the necessary
- * portable artifacts like SEI, Service, Bean classes etc.
- *
- * @return true if there is no error, otherwise false
- *
- * @see #wsimport(OutputStream, Container, String[])
- */
- public boolean wsimport(OutputStream logStream, String[] args) {
- return wsimport(logStream, Container.NONE, args);
- }
-
- /**
- * Invokes wsgen on the endpoint implementation, and generates the necessary
- * artifacts like wrapper, exception bean classes etc.
- *
- * @param logStream Stream used for reporting log messages like errors, warnings etc
- * @param container gives an environment for tool if it is run during appserver
- * deployment
- * @param args arguments with various options and endpoint class
- *
- * @return true if there is no error, otherwise false
- */
- public abstract boolean wsgen(OutputStream logStream, Container container, String[] args);
-
- /**
- * Invokes wsgen on the endpoint implementation, and generates the necessary
- * artifacts like wrapper, exception bean classes etc.
- *
- * @return true if there is no error, otherwise false
- * @see #wsgen(OutputStream, Container, String[])
- */
- public boolean wsgen(OutputStream logStream, String[] args) {
- return wsgen(logStream, Container.NONE, args);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/spi/package-info.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/spi/package-info.java
deleted file mode 100644
index 2fc9b79a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/spi/package-info.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- *
- * <P>This document describes the SPI for the JAX-WS 2.0.1 tools.
- * The WSToolsObjectFactory is used to create instances of WsGen
- * and WsImport that other applications can use.
-*/
-package com.sun.tools.internal.ws.spi;
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/util/ClassNameInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/util/ClassNameInfo.java
deleted file mode 100644
index 95f7b767..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/util/ClassNameInfo.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.util;
-
-/**
- * @author WS Development Team
- */
-
-public final class ClassNameInfo {
-
- public static String getName(String className) {
- String qual = getQualifier(className);
- int len = className.length();
- int closingBracket = className.indexOf('>');
- if(closingBracket > 0)
- len = closingBracket;
- return qual != null
- ? className.substring(qual.length() + 1, len)
- : className;
- }
-
-
- /**
- *
- *
- * @param className Generic class, such as java.util.List<java.lang.String>
- * @return the generic class, such as java.util.List
- */
- public static String getGenericClass(String className) {
- int index = className.indexOf('<');
- if(index < 0)
- return className;
- return (index > 0)?className.substring(0, index):className;
- }
-
-
- public static String getQualifier(String className) {
- int idot = className.indexOf(' ');
- if (idot <= 0)
- idot = className.length();
- else
- idot -= 1; // back up over previous dot
- int index = className.lastIndexOf('.', idot - 1);
- return (index < 0) ? null : className.substring(0, index);
- }
-
- public static String replaceInnerClassSym(String name) {
- return name.replace('$', '_');
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/util/ForkEntityResolver.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/util/ForkEntityResolver.java
deleted file mode 100644
index 72dabd40..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/util/ForkEntityResolver.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.util;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-
-/**
- * {@link EntityResolver} that delegates to two {@link EntityResolver}s.
- *
- * @author WS Development Team
- */
-public class ForkEntityResolver implements EntityResolver {
- private final EntityResolver lhs;
- private final EntityResolver rhs;
-
- public ForkEntityResolver(EntityResolver lhs, EntityResolver rhs) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
- InputSource is = lhs.resolveEntity(publicId, systemId);
- if(is!=null)
- return is;
-
- if(publicId == null) {
- // WorkAround: Ant's XMLCatalog supports public IDs only, this allows us to treat it as system IDs
- publicId = systemId;
- }
-
- return rhs.resolveEntity(publicId, systemId);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLFetcher.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLFetcher.java
deleted file mode 100644
index ae2b60b7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLFetcher.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.util;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.tools.internal.ws.resources.WscompileMessages;
-import com.sun.tools.internal.ws.wscompile.WsimportListener;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.tools.internal.ws.wsdl.parser.DOMForest;
-import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder;
-import com.sun.xml.internal.txw2.output.IndentingXMLStreamWriter;
-import com.sun.xml.internal.ws.api.server.PortAddressResolver;
-import com.sun.xml.internal.ws.streaming.SourceReaderFactory;
-import com.sun.xml.internal.ws.wsdl.parser.WSDLConstants;
-import com.sun.xml.internal.ws.wsdl.writer.DocumentLocationResolver;
-import com.sun.xml.internal.ws.wsdl.writer.WSDLPatcher;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.dom.DOMSource;
-import java.io.*;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author Rama Pulavarthi
- */
-public class WSDLFetcher {
- private WsimportOptions options;
- private WsimportListener listener;
- public WSDLFetcher(WsimportOptions options, WsimportListener listener) {
- this.options = options;
- this.listener = listener;
- }
-
-
- /**
- * Fetches the wsdls in the DOMForest to the options.destDir
- * @param forest
- * @return location of fetched root WSDL document
- * @throws IOException
- * @throws XMLStreamException
- * @throws FileNotFoundException
- */
- public String fetchWsdls(MetadataFinder forest) throws IOException, XMLStreamException {
- String rootWsdl = null;
- for(String root: forest.getRootDocuments()) {
- rootWsdl = root;
- }
-
- Set<String> externalRefs = forest.getExternalReferences();
- Map<String,String> documentMap = createDocumentMap(forest, getWSDLDownloadDir(), rootWsdl, externalRefs);
- String rootWsdlName = fetchFile(rootWsdl,forest, documentMap,getWSDLDownloadDir());
- for(String reference: forest.getExternalReferences()) {
- fetchFile(reference,forest,documentMap,getWSDLDownloadDir());
- }
- return WSDL_PATH +"/" + rootWsdlName;
- }
-
- private String fetchFile(final String doc, DOMForest forest, final Map<String, String> documentMap, File destDir) throws IOException, XMLStreamException {
-
- DocumentLocationResolver docLocator = createDocResolver(doc, forest, documentMap);
- WSDLPatcher wsdlPatcher = new WSDLPatcher(new PortAddressResolver() {
- @Override
- public String getAddressFor(@NotNull QName serviceName, @NotNull String portName) {
- return null;
- }
- }, docLocator);
-
- XMLStreamReader xsr = null;
- XMLStreamWriter xsw = null;
- OutputStream os = null;
- String resolvedRootWsdl = null;
- try {
- XMLOutputFactory writerfactory;
- xsr = SourceReaderFactory.createSourceReader(new DOMSource(forest.get(doc)), false);
- writerfactory = XMLOutputFactory.newInstance();
- resolvedRootWsdl = docLocator.getLocationFor(null, doc);
- File outFile = new File(destDir, resolvedRootWsdl);
- os = new FileOutputStream(outFile);
- if(options.verbose) {
- listener.message(WscompileMessages.WSIMPORT_DOCUMENT_DOWNLOAD(doc,outFile));
- }
- xsw = writerfactory.createXMLStreamWriter(os);
- //DOMForest eats away the whitespace loosing all the indentation, so write it through
- // indenting writer for better readability of fetched documents
- IndentingXMLStreamWriter indentingWriter = new IndentingXMLStreamWriter(xsw);
- wsdlPatcher.bridge(xsr, indentingWriter);
- options.addGeneratedFile(outFile);
- } finally {
- try {
- if (xsr != null) {xsr.close();}
- if (xsw != null) {xsw.close();}
- } finally {
- if (os != null) {os.close();}
- }
- }
- return resolvedRootWsdl;
-
-
- }
- private Map<String,String> createDocumentMap(MetadataFinder forest, File baseDir, final String rootWsdl, Set<String> externalReferences) {
- Map<String,String> map = new HashMap<String,String>();
- String rootWsdlFileName = rootWsdl;
- String rootWsdlName;
-
- int slashIndex = rootWsdl.lastIndexOf("/");
- if( slashIndex >= 0) {
- rootWsdlFileName = rootWsdl.substring(slashIndex+1);
- }
- if(!rootWsdlFileName.endsWith(WSDL_FILE_EXTENSION)) {
- Document rootWsdlDoc = forest.get(rootWsdl);
- NodeList serviceNodes = rootWsdlDoc.getElementsByTagNameNS(WSDLConstants.QNAME_SERVICE.getNamespaceURI(),WSDLConstants.QNAME_SERVICE.getLocalPart());
- if (serviceNodes.getLength() == 0) {
- rootWsdlName = "Service";
- } else {
- Node serviceNode = serviceNodes.item(0);
- String serviceName = ((Element)serviceNode).getAttribute( WSDLConstants.ATTR_NAME);
- rootWsdlName = serviceName;
- }
- rootWsdlFileName = rootWsdlName+ WSDL_FILE_EXTENSION;
- } else {
- rootWsdlName = rootWsdlFileName.substring(0,rootWsdlFileName.length()-5);
- }
-
- map.put(rootWsdl,sanitize(rootWsdlFileName));
-
- int i =1;
- for(String ref: externalReferences) {
- Document refDoc = forest.get(ref);
- Element rootEl = refDoc.getDocumentElement();
- String fileExtn;
- String fileName = null;
- int index = ref.lastIndexOf("/");
- if (index >= 0) {
- fileName = ref.substring(index + 1);
- }
- if(rootEl.getLocalName().equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart()) && rootEl.getNamespaceURI().equals(WSDLConstants.NS_WSDL)) {
- fileExtn = WSDL_FILE_EXTENSION;
- } else if(rootEl.getLocalName().equals(WSDLConstants.QNAME_SCHEMA.getLocalPart()) && rootEl.getNamespaceURI().equals(WSDLConstants.NS_XMLNS)) {
- fileExtn = SCHEMA_FILE_EXTENSION;
- } else {
- fileExtn = ".xml";
- }
- if(fileName != null && (fileName.endsWith(WSDL_FILE_EXTENSION) || fileName.endsWith(SCHEMA_FILE_EXTENSION))) {
- map.put(ref, rootWsdlName+"_"+fileName);
- } else {
- map.put(ref, rootWsdlName+"_metadata"+ (i++) + fileExtn);
- }
- }
- return map;
- }
-
- private DocumentLocationResolver createDocResolver(final String baseWsdl, final DOMForest forest, final Map<String,String> documentMap) {
- return new DocumentLocationResolver() {
- @Override
- public String getLocationFor(String namespaceURI, String systemId) {
- try {
- URL reference = new URL(new URL(baseWsdl),systemId);
- systemId = reference.toExternalForm();
- } catch (MalformedURLException e) {
- throw new RuntimeException(e);
- }
- if(documentMap.get(systemId) != null) {
- return documentMap.get(systemId);
- } else {
- String parsedEntity = forest.getReferencedEntityMap().get(systemId);
- return documentMap.get(parsedEntity);
- }
- }
- };
- }
-
- private String sanitize(String fileName) {
- fileName = fileName.replace('?', '.');
- StringBuilder sb = new StringBuilder(fileName);
- for (int i = 0; i < sb.length(); i++) {
- char c = sb.charAt(i);
- if (Character.isLetterOrDigit(c) ||
- (c == '/') ||
- (c == '.') ||
- (c == '_') ||
- (c == ' ') ||
- (c == '-')) {
- continue;
- } else {
- sb.setCharAt(i, '_');
- }
- }
- return sb.toString();
- }
-
- private File getWSDLDownloadDir() {
- File wsdlDir = new File(options.destDir, WSDL_PATH);
- boolean created = wsdlDir.mkdirs();
- if (options.verbose && !created) {
- listener.message(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(wsdlDir));
- }
- return wsdlDir;
- }
-
- private static String WSDL_PATH="META-INF/wsdl";
- private static String WSDL_FILE_EXTENSION=".wsdl";
- private static String SCHEMA_FILE_EXTENSION=".xsd";
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLParseException.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLParseException.java
deleted file mode 100644
index 91412978..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLParseException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.util;
-
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-/**
- * @author WS Development Team
- */
-public class WSDLParseException extends JAXWSExceptionBase {
-
- public WSDLParseException(String key, Object... args) {
- super(key, args);
- }
-
- public WSDLParseException(Throwable throwable) {
- super(throwable);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.tools.internal.ws.resources.util";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSToolsObjectFactoryImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSToolsObjectFactoryImpl.java
deleted file mode 100644
index 301c156a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSToolsObjectFactoryImpl.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.util;
-
-import com.sun.tools.internal.ws.spi.WSToolsObjectFactory;
-import com.sun.tools.internal.ws.wscompile.WsgenTool;
-import com.sun.tools.internal.ws.wscompile.WsimportTool;
-import com.sun.xml.internal.ws.api.server.Container;
-
-import java.io.OutputStream;
-
-/**
- * Factory implementation class to instantiate concrete objects for JAX-WS tools.
- *
- * @author JAX-WS Development Team
- */
-public class WSToolsObjectFactoryImpl extends WSToolsObjectFactory {
-
- @Override
- public boolean wsimport(OutputStream logStream, Container container, String[] args) {
- WsimportTool tool = new WsimportTool(logStream, container);
- return tool.run(args);
- }
-
- @Override
- public boolean wsgen(OutputStream logStream, Container container, String[] args) {
- WsgenTool tool = new WsgenTool(logStream, container);
- return tool.run(args);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/util/xml/XmlUtil.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/util/xml/XmlUtil.java
deleted file mode 100644
index 2e84def0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/util/xml/XmlUtil.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.util.xml;
-
-import com.sun.tools.internal.ws.util.WSDLParseException;
-import org.w3c.dom.Element;
-
-/**
- * @author WS Development Team
- */
-public class XmlUtil extends com.sun.xml.internal.ws.util.xml.XmlUtil {
-
- public static boolean matchesTagNS(Element e, String tag, String nsURI) {
- try {
- return e.getLocalName().equals(tag)
- && e.getNamespaceURI().equals(nsURI);
- } catch (NullPointerException npe) {
-
- // localname not null since parsing would fail before here
- throw new WSDLParseException(
- "null.namespace.found",
- e.getLocalName());
- }
- }
-
- public static boolean matchesTagNS(
- Element e,
- javax.xml.namespace.QName name) {
- try {
- return e.getLocalName().equals(name.getLocalPart())
- && e.getNamespaceURI().equals(name.getNamespaceURI());
- } catch (NullPointerException npe) {
-
- // localname not null since parsing would fail before here
- throw new WSDLParseException(
- "null.namespace.found",
- e.getLocalName());
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties
deleted file mode 100644
index c0aaf9f9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright (c) 2012, 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.
-#
-
-build-id=2.2.9-b130926.1035
-build-version=JAX-WS RI 2.2.9-b130926.1035
-major-version=2.2.9
-svn-revision=8c29a9a53251ff741fca1664a8221dc876b2eac8
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AbortException.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AbortException.java
deleted file mode 100644
index f18190f4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AbortException.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wscompile;
-
-/**
- * @author Vivek Pandey
- */
-/**
- * Signals the abortion of the compilation.
- * <p>
- * This exception should be only thrown from {@link ErrorReceiver}
- * for the consistent error handling.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class AbortException extends RuntimeException {
- public AbortException() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AuthInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AuthInfo.java
deleted file mode 100644
index 992f1cbf..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AuthInfo.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wscompile;
-
-import com.sun.istack.internal.NotNull;
-
-import java.net.URL;
-import java.util.regex.Pattern;
-
-/**
- * Represents authorization information needed by {@link com.sun.tools.internal.ws.wscompile.DefaultAuthenticator} to
- * authenticate wsimport to access the wsdl.
- *
- * @author Vivek Pandey
- */
-
-public final class AuthInfo {
- private final String user;
- private final String password;
- private final Pattern urlPattern;
-
- public AuthInfo(@NotNull URL url, @NotNull String user, @NotNull String password) {
- String u = url.toExternalForm().replaceFirst("\\?", "\\\\?");
- this.urlPattern = Pattern.compile(u.replace("*", ".*"), Pattern.CASE_INSENSITIVE);
- this.user = user;
- this.password = password;
- }
-
- public String getUser() {
- return user;
- }
-
- public String getPassword() {
- return password;
- }
-
- /**
- * Returns if the requesting host and port are associated with this {@link AuthInfo}
- */
- public boolean matchingHost(@NotNull URL requestingURL) {
- return urlPattern.matcher(requestingURL.toExternalForm()).matches();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/BadCommandLineException.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/BadCommandLineException.java
deleted file mode 100644
index a4c889ae..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/BadCommandLineException.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wscompile;
-
-import com.sun.istack.internal.Nullable;
-
-/**
- * @author Vivek Pandey
- */
-public class BadCommandLineException extends Exception {
- private transient Options options;
-
- public BadCommandLineException(String msg) {
- super(msg);
- }
-
- public BadCommandLineException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public BadCommandLineException() {
- this(null);
- }
-
- public void initOptions(Options opt) {
- assert this.options==null;
- this.options = opt;
- }
-
- /**
- * Gets the partly parsed option object, if any.
- */
- public @Nullable
- Options getOptions() {
- return options;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiver.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiver.java
deleted file mode 100644
index 12b90f17..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiver.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wscompile;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.SAXParseException2;
-import com.sun.tools.internal.ws.resources.ModelMessages;
-import com.sun.tools.internal.xjc.api.ErrorListener;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXParseException;
-
-/**
- * Implemented by the driver of the compiler engine to handle
- * errors found during the compiliation.
- *
- * <p>
- * This class implements {@link org.xml.sax.ErrorHandler} so it can be
- * passed to anywhere where {@link org.xml.sax.ErrorHandler} is expected.
- *
- * <p>
- * However, to make the error handling easy (and make it work
- * with visitor patterns nicely),
- * none of the methods on this class throws {@link org.xml.sax.SAXException}.
- * Instead, when the compilation needs to be aborted,
- * it throws {@link AbortException}, which is unchecked.
- *
- * <p>
- * This also implements the externally visible {@link com.sun.tools.internal.xjc.api.ErrorListener}
- * so that we can reuse our internal implementation for testing and such.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- * @author Vivek Pandey
- */
-public abstract class ErrorReceiver implements ErrorHandler, ErrorListener {
-
-//
-//
-// convenience methods for callers
-//
-//
- /**
- * @param loc
- * can be null if the location is unknown
- */
- public final void error( Locator loc, String msg ) {
- error( new SAXParseException2(msg,loc) );
- }
-
- public final void error( Locator loc, String msg, Exception e ) {
- error( new SAXParseException2(msg,loc,e) );
- }
-
- public final void error( String msg, Exception e ) {
- error( new SAXParseException2(msg,null,e) );
- }
-
- public void error(Exception e) {
- error(e.getMessage(),e);
- }
-
- /**
- * Reports a warning.
- */
- public final void warning( @Nullable Locator loc, String msg ) {
- warning( new SAXParseException(msg,loc) );
- }
-
-//
-//
-// ErrorHandler implementation, but can't throw SAXException
-//
-//
- public abstract void error(SAXParseException exception) throws AbortException;
- public abstract void fatalError(SAXParseException exception) throws AbortException;
- public abstract void warning(SAXParseException exception) throws AbortException;
-
- /**
- * This method will be invoked periodically to allow {@link com.sun.tools.internal.xjc.AbortException}
- * to be thrown, especially when this is driven by some kind of GUI.
- */
- public void pollAbort() throws AbortException {
- }
-
-
- /**
- * Reports verbose messages to users.
- *
- * This method can be used to report additional non-essential
- * messages. The implementation usually discards them
- * unless some specific debug option is turned on.
- */
- public abstract void info(SAXParseException exception) /*REVISIT:throws AbortException*/;
-
- /**
- * Reports a debug message to users.
- *
- * @see #info(SAXParseException)
- */
- public final void debug( String msg ) {
- info( new SAXParseException(msg,null) );
- }
-
- public abstract void debug(SAXParseException exception);
-
-//
-//
-// convenience methods for derived classes
-//
-//
-
- /**
- * Returns the human readable string representation of the
- * {@link org.xml.sax.Locator} part of the specified
- * {@link SAXParseException}.
- *
- * @return non-null valid object.
- */
- protected final String getLocationString( SAXParseException e ) {
- if(e.getLineNumber()!=-1 || e.getSystemId()!=null) {
- int line = e.getLineNumber();
- return ModelMessages.CONSOLE_ERROR_REPORTER_LINE_X_OF_Y(line==-1?"?":Integer.toString( line ),
- getShortName( e.getSystemId()));
- } else {
- return ""; //for unkown location just return empty string
- }
- }
-
- /** Computes a short name of a given URL for display. */
- private String getShortName( String url ) {
- if(url==null)
- return ModelMessages.CONSOLE_ERROR_REPORTER_UNKNOWN_LOCATION();
- return url;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiverFilter.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiverFilter.java
deleted file mode 100644
index 35a34c2c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiverFilter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wscompile;
-
-import com.sun.tools.internal.xjc.api.ErrorListener;
-import org.xml.sax.SAXParseException;
-
-/**
- * Filter implementation of the ErrorReceiver.
- *
- * If an error is encountered, this filter sets a flag.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- * @author Vivek Pandey
- */
-public class ErrorReceiverFilter extends ErrorReceiver {
-
- public ErrorReceiverFilter() {}
-
- public ErrorReceiverFilter( ErrorListener h ) {
- setErrorReceiver(h);
- }
-
- private ErrorListener core;
- public void setErrorReceiver( ErrorListener handler ) {
- core = handler;
- }
-
- private boolean hadError = false;
- public final boolean hadError() { return hadError; }
-
- /**
- * Resets the error state its currently in. It allows to ignore the error reported by
- * any sub-system.
- */
- public void reset(){
- hadError = false;
- }
-
- public void info(SAXParseException exception) {
- if(core!=null) core.info(exception);
- }
-
- public void debug(SAXParseException exception) {
-
- }
-
- public void warning(SAXParseException exception) {
- if(core!=null) core.warning(exception);
- }
-
- public void error(SAXParseException exception) {
- hadError = true;
- if(core!=null) core.error(exception);
- }
-
- public void fatalError(SAXParseException exception) {
- hadError = true;
- if(core!=null) core.fatalError(exception);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/FilerCodeWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/FilerCodeWriter.java
deleted file mode 100644
index ce2690d2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/FilerCodeWriter.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wscompile;
-
-import com.sun.codemodel.internal.JPackage;
-
-import javax.annotation.processing.Filer;
-import java.io.File;
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * Writes all the source files using the specified Filer.
- *
- * @author WS Development Team
- */
-public class FilerCodeWriter extends WSCodeWriter {
-
- /** The Filer used to create files. */
- private final Filer filer;
-
- private Writer w;
-
- public FilerCodeWriter(File outDir, Options options) throws IOException {
- super(outDir, options);
- this.filer = options.filer;
- }
-
- public Writer openSource(JPackage pkg, String fileName) throws IOException {
- String tmp = fileName.substring(0, fileName.length()-5);
- if (pkg.name() != null && ! "".equals(pkg.name())) {
- w = filer.createSourceFile(pkg.name() + "." + tmp).openWriter();
- } else {
- w = filer.createSourceFile(tmp).openWriter();
- }
- return w;
- }
-
-
- public void close() throws IOException {
- super.close();
- if (w != null)
- w.close();
- w = null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/JavaCompilerHelper.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/JavaCompilerHelper.java
deleted file mode 100644
index 1cab43d7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/JavaCompilerHelper.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wscompile;
-
-import com.sun.istack.internal.tools.ParallelWorldClassLoader;
-import com.sun.tools.internal.ws.resources.JavacompilerMessages;
-
-import java.io.File;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URISyntaxException;
-
-/**
- * A helper class to invoke javac.
- *
- * @author WS Development Team
- */
-class JavaCompilerHelper{
- static File getJarFile(Class clazz) {
- URL url = null;
- try {
- url = ParallelWorldClassLoader.toJarUrl(clazz.getResource('/'+clazz.getName().replace('.','/')+".class"));
- return new File(url.toURI());
- } catch (ClassNotFoundException e) {
- // if we can't figure out where JAXB/JAX-WS API are, we couldn't have been executing this code.
- throw new Error(e);
- } catch (MalformedURLException e) {
- // if we can't figure out where JAXB/JAX-WS API are, we couldn't have been executing this code.
- throw new Error(e);
- } catch (URISyntaxException e) {
- // url.toURI() is picky and doesn't like ' ' in URL, so this is the fallback
- return new File(url.getPath());
- }
- }
-
- static boolean compile(String[] args, OutputStream out, ErrorReceiver receiver){
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- try {
- /* try to use the new compiler */
- Class comSunToolsJavacMainClass =
- cl.loadClass("com.sun.tools.javac.Main");
- try {
- Method compileMethod =
- comSunToolsJavacMainClass.getMethod(
- "compile",
- compileMethodSignature);
- Object result =
- compileMethod.invoke(
- null, args, new PrintWriter(out));
- return result instanceof Integer && (Integer) result == 0;
- } catch (NoSuchMethodException e2) {
- receiver.error(JavacompilerMessages.JAVACOMPILER_NOSUCHMETHOD_ERROR("getMethod(\"compile\", Class[])"), e2);
- } catch (IllegalAccessException e) {
- receiver.error(e);
- } catch (InvocationTargetException e) {
- receiver.error(e);
- }
- } catch (ClassNotFoundException e) {
- receiver.error(JavacompilerMessages.JAVACOMPILER_CLASSPATH_ERROR("com.sun.tools.javac.Main"), e);
- } catch (SecurityException e) {
- receiver.error(e);
- }
- return false;
- }
-
- private static final Class[] compileMethodSignature = {String[].class, PrintWriter.class};
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java
deleted file mode 100644
index f9fb8bdc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java
+++ /dev/null
@@ -1,491 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wscompile;
-
-import com.sun.tools.internal.ws.resources.WscompileMessages;
-import com.sun.tools.internal.ws.Invoker;
-
-import javax.annotation.processing.Filer;
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.nio.charset.Charset;
-import java.nio.charset.IllegalCharsetNameException;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-/**
- * Provide common jaxws tool options.
- *
- * @author Vivek Pandey
- */
-public class Options {
- /**
- * -verbose
- */
- public boolean verbose;
-
- /**
- * - quite
- */
- public boolean quiet;
-
- /**
- * -keep
- */
- public boolean keep;
-
-
-
- /**
- * -d
- */
- public File destDir = new File(".");
-
-
- /**
- * -s
- */
- public File sourceDir;
-
- /**
- * The filer that can use used to write out the generated files
- */
- public Filer filer;
-
- /**
- * -encoding
- */
- public String encoding;
-
- public String classpath = System.getProperty("java.class.path");
-
- /**
- * -javacOptions
- *
- * @since 2.2.9
- */
- public List<String> javacOptions;
-
-
- /**
- * -Xnocompile
- */
- public boolean nocompile;
-
- /**
- * If true XML security features when parsing XML documents will be disabled.
- * The default value is false.
- *
- * Boolean
- * @since 2.2.9
- */
- public boolean disableXmlSecurity;
-
- public enum Target {
- V2_0, V2_1, V2_2;
-
- /**
- * Returns true if this version is equal or later than the given one.
- */
- public boolean isLaterThan(Target t) {
- return this.ordinal() >= t.ordinal();
- }
-
- /**
- * Parses "2.0" and "2.1" into the {@link Target} object.
- *
- * @return null for parsing failure.
- */
- public static Target parse(String token) {
- if (token.equals("2.0"))
- return Target.V2_0;
- else if (token.equals("2.1"))
- return Target.V2_1;
- else if (token.equals("2.2"))
- return Target.V2_2;
- return null;
- }
-
- /**
- * Gives the String representation of the {@link Target}
- */
- public String getVersion(){
- switch(this){
- case V2_0:
- return "2.0";
- case V2_1:
- return "2.1";
- case V2_2:
- return "2.2";
- default:
- return null;
- }
- }
-
- public static Target getDefault() {
- return V2_2;
- }
-
- public static Target getLoadedAPIVersion() {
- return LOADED_API_VERSION;
- }
-
- private static final Target LOADED_API_VERSION;
-
- static {
- // check if we are indeed loading JAX-WS 2.2 API
- if (Invoker.checkIfLoading22API()) {
- LOADED_API_VERSION = Target.V2_2;
- } // check if we are indeed loading JAX-WS 2.1 API
- else if (Invoker.checkIfLoading21API()) {
- LOADED_API_VERSION = Target.V2_1;
- } else {
- LOADED_API_VERSION = Target.V2_0;
- }
- }
- }
-
- public Target target = Target.V2_2;
-
- /**
- * strictly follow the compatibility rules specified in JAXWS spec
- */
- public static final int STRICT = 1;
-
- /**
- * loosely follow the compatibility rules and allow the use of vendor
- * binding extensions
- */
- public static final int EXTENSION = 2;
-
- /**
- * this switch determines how carefully the compiler will follow
- * the compatibility rules in the spec. Either <code>STRICT</code>
- * or <code>EXTENSION</code>.
- */
- public int compatibilityMode = STRICT;
-
- public boolean isExtensionMode() {
- return compatibilityMode == EXTENSION;
- }
-
- public boolean debug = false;
-
- /**
- * -Xdebug - gives complete stack trace
- */
- public boolean debugMode = false;
-
-
- private final List<File> generatedFiles = new ArrayList<File>();
- private ClassLoader classLoader;
-
-
- /**
- * Remember info on generated source file generated so that it
- * can be removed later, if appropriate.
- */
- public void addGeneratedFile(File file) {
- generatedFiles.add(file);
- }
-
- /**
- * Remove generated files
- */
- public void removeGeneratedFiles(){
- for(File file : generatedFiles){
- if (file.getName().endsWith(".java")) {
- boolean deleted = file.delete();
- if (verbose && !deleted) {
- System.out.println(MessageFormat.format("{0} could not be deleted.", file));
- }
- }
- }
- generatedFiles.clear();
- }
-
- /**
- * Return all the generated files and its types.
- */
- public Iterable<File> getGeneratedFiles() {
- return generatedFiles;
- }
-
- /**
- * Delete all the generated source files made during the execution
- * of this environment (those that have been registered with the
- * "addGeneratedFile" method).
- */
- public void deleteGeneratedFiles() {
- synchronized (generatedFiles) {
- for (File file : generatedFiles) {
- if (file.getName().endsWith(".java")) {
- boolean deleted = file.delete();
- if (verbose && !deleted) {
- System.out.println(MessageFormat.format("{0} could not be deleted.", file));
- }
- }
- }
- generatedFiles.clear();
- }
- }
-
- /**
- * Parses arguments and fill fields of this object.
- *
- * @exception BadCommandLineException
- * thrown when there's a problem in the command-line arguments
- */
- public void parseArguments( String[] args ) throws BadCommandLineException {
-
- for (int i = 0; i < args.length; i++) {
- if(args[i].length()==0)
- throw new BadCommandLineException();
- if (args[i].charAt(0) == '-') {
- int j = parseArguments(args,i);
- if(j==0)
- throw new BadCommandLineException(WscompileMessages.WSCOMPILE_INVALID_OPTION(args[i]));
- i += (j-1);
- } else {
- addFile(args[i]);
- }
- }
- if(destDir == null)
- destDir = new File(".");
- if(sourceDir == null)
- sourceDir = destDir;
- }
-
-
- /**
- * Adds a file from the argume
- *
- * @param arg a file, could be a wsdl or xsd or a Class
- */
- protected void addFile(String arg) throws BadCommandLineException {}
-
- /**
- * Parses an option <code>args[i]</code> and return
- * the number of tokens consumed.
- *
- * @return
- * 0 if the argument is not understood. Returning 0
- * will let the caller report an error.
- * @exception BadCommandLineException
- * If the callee wants to provide a custom message for an error.
- */
- protected int parseArguments(String[] args, int i) throws BadCommandLineException {
- if (args[i].equals("-g")) {
- debug = true;
- return 1;
- } else if (args[i].equals("-Xdebug")) {
- debugMode = true;
- return 1;
- } else if (args[i].equals("-Xendorsed")) {
- // this option is processed much earlier, so just ignore.
- return 1;
- } else if (args[i].equals("-verbose")) {
- verbose = true;
- return 1;
- } else if (args[i].equals("-quiet")) {
- quiet = true;
- return 1;
- } else if (args[i].equals("-keep")) {
- keep = true;
- return 1;
- } else if (args[i].equals("-target")) {
- String token = requireArgument("-target", args, ++i);
- target = Target.parse(token);
- if(target == null)
- throw new BadCommandLineException(WscompileMessages.WSIMPORT_ILLEGAL_TARGET_VERSION(token));
- return 2;
- } else if (args[i].equals("-classpath") || args[i].equals("-cp")) {
- classpath = requireArgument("-classpath", args, ++i) + File.pathSeparator + System.getProperty("java.class.path");
- return 2;
- } else if (args[i].equals("-d")) {
- destDir = new File(requireArgument("-d", args, ++i));
- if (!destDir.exists())
- throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(destDir.getPath()));
- return 2;
- } else if (args[i].equals("-s")) {
- sourceDir = new File(requireArgument("-s", args, ++i));
- keep = true;
- if (!sourceDir.exists()) {
- throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(sourceDir.getPath()));
- }
- return 2;
- } else if (args[i].equals("-extension")) {
- compatibilityMode = EXTENSION;
- return 1;
- } else if (args[i].startsWith("-help")) {
- WeAreDone done = new WeAreDone();
- done.initOptions(this);
- throw done;
- } else if (args[i].equals("-Xnocompile")) {
- // -nocompile implies -keep. this is undocumented switch.
- nocompile = true;
- keep = true;
- return 1;
- } else if (args[i].equals("-encoding")) {
- encoding = requireArgument("-encoding", args, ++i);
- try {
- if (!Charset.isSupported(encoding)) {
- throw new BadCommandLineException(WscompileMessages.WSCOMPILE_UNSUPPORTED_ENCODING(encoding));
- }
- } catch (IllegalCharsetNameException icne) {
- throw new BadCommandLineException(WscompileMessages.WSCOMPILE_UNSUPPORTED_ENCODING(encoding));
- }
- return 2;
- } 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.
- */
- public String requireArgument(String optionName, String[] args, int i) throws BadCommandLineException {
- //if (i == args.length || args[i].startsWith("-")) {
- if (args[i].startsWith("-")) {
- throw new BadCommandLineException(WscompileMessages.WSCOMPILE_MISSING_OPTION_ARGUMENT(optionName));
- }
- 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.
- */
- public static final class WeAreDone extends BadCommandLineException {}
-
- /**
- * Get a URLClassLoader from using the classpath
- */
- public ClassLoader getClassLoader() {
- if (classLoader == null) {
- classLoader =
- new URLClassLoader(pathToURLs(classpath),
- this.getClass().getClassLoader());
- }
- return classLoader;
- }
-
- /**
- * Utility method for converting a search path string to an array
- * of directory and JAR file URLs.
- *
- * @param path the search path string
- * @return the resulting array of directory and JAR file URLs
- */
- public static URL[] pathToURLs(String path) {
- StringTokenizer st = new StringTokenizer(path, File.pathSeparator);
- URL[] urls = new URL[st.countTokens()];
- int count = 0;
- while (st.hasMoreTokens()) {
- URL url = fileToURL(new File(st.nextToken()));
- if (url != null) {
- urls[count++] = url;
- }
- }
- if (urls.length != count) {
- URL[] tmp = new URL[count];
- System.arraycopy(urls, 0, tmp, 0, count);
- urls = tmp;
- }
- return urls;
- }
-
- /**
- * Returns the directory or JAR file URL corresponding to the specified
- * local file name.
- *
- * @param file the File object
- * @return the resulting directory or JAR file URL, or null if unknown
- */
- public static URL fileToURL(File file) {
- String name;
- try {
- name = file.getCanonicalPath();
- } catch (IOException e) {
- name = file.getAbsolutePath();
- }
- name = name.replace(File.separatorChar, '/');
- if (!name.startsWith("/")) {
- name = "/" + name;
- }
-
- // If the file does not exist, then assume that it's a directory
- if (!file.isFile()) {
- name = name + "/";
- }
- try {
- return new URL("file", "", name);
- } catch (MalformedURLException e) {
- throw new IllegalArgumentException("file");
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Plugin.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Plugin.java
deleted file mode 100644
index eae6e8d5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Plugin.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wscompile;
-
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.tools.internal.ws.processor.model.Model;
-import java.io.IOException;
-import org.xml.sax.SAXException;
-
-/**
- * Add-on that works on the generated source code.
- *
- * <p> This add-on will be called after the default generation has finished.
- *
- * @author Lukas Jungmann
- * @since 2.2.6
- */
-public abstract class Plugin {
-
- /**
- * Gets the option name to turn on this add-on.
- *
- * <p> For example, if "abc" is returned, "-abc" will turn on this plugin. A
- * plugin needs to be turned on explicitly, or else no other methods of {@link Plugin}
- * will be invoked.
- *
- * <p> When an option matches the name returned from this method, WsImport
- * will then invoke {@link #parseArgument(Options, String[], int)}, allowing
- * plugins to handle arguments to this option.
- */
- public abstract String getOptionName();
-
- /**
- * Gets the description of this add-on. Used to generate a usage screen.
- *
- * @return localized description message. should be terminated by \n.
- */
- public abstract String getUsage();
-
- /**
- * Parses an option <code>args[i]</code> and augment the <code>opt</code> object
- * appropriately, then return the number of tokens consumed.
- *
- * <p> The callee doesn't need to recognize the option that the
- * getOptionName method returns.
- *
- * <p> Once a plugin is activated, this method is called for options that
- * WsImport didn't recognize. This allows a plugin to define additional
- * options to customize its behavior.
- *
- * <p> Since options can appear in no particular order, WsImport allows
- * sub-options of a plugin to show up before the option that activates a
- * plugin (one that's returned by {@link #getOptionName()}.)
- *
- * But nevertheless a {@link Plugin} needs to be activated to participate in
- * further processing.
- *
- * @return 0 if the argument is not understood. Otherwise return the number
- * of tokens that are consumed, including the option itself. (so if you have
- * an option like "-foo 3", return 2.)
- * @exception BadCommandLineException If the option was recognized but
- * there's an error. This halts the argument parsing process and causes
- * WsImport to abort, reporting an error.
- */
- public int parseArgument(Options opt, String[] args, int i) throws BadCommandLineException, IOException {
- return 0;
- }
-
- /**
- * Notifies a plugin that it's activated.
- *
- * <p> This method is called when a plugin is activated through the command
- * line option (as specified by {@link #getOptionName()}.
- *
- * <p> Noop by default.
- *
- */
- public void onActivated(Options opts) throws BadCommandLineException {
- // noop
- }
-
- /**
- * Run the add-on.
- *
- * <p> This method is invoked after WsImport has internally finished the
- * code generation. Plugins can tweak some of the generated code (or add
- * more code) by altering {@link JCodeModel} obtained from {@link WsimportOptions#getCodeModel()
- * } according to the current
- * {@link Model WSDL model} and {@link WsimportOptions}.
- *
- * <p> Note that this method is invoked only when a {@link Plugin} is
- * activated.
- *
- * @param wsdlModel This object allows access to the WSDL model used for
- * code generation.
- *
- * @param options This object allows access to various options used for code
- * generation as well as access to the generated code.
- *
- * @param errorReceiver Errors should be reported to this handler.
- *
- * @return If the add-on executes successfully, return true. If it detects
- * some errors but those are reported and recovered gracefully, return
- * false.
- *
- * @throws SAXException After an error is reported to {@link ErrorReceiver},
- * the same exception can be thrown to indicate a fatal irrecoverable error. {@link ErrorReceiver}
- * itself may throw it, if it chooses not to recover from the error.
- */
- public abstract boolean run(
- Model wsdlModel, WsimportOptions options, ErrorReceiver errorReceiver) throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WSCodeWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WSCodeWriter.java
deleted file mode 100644
index 3cdfccf2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WSCodeWriter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wscompile;
-
-import com.sun.codemodel.internal.JPackage;
-import com.sun.codemodel.internal.writer.FileCodeWriter;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * {@link FileCodeWriter} implementation that notifies
- * JAX-WS about newly created files.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class WSCodeWriter extends FileCodeWriter {
- private final Options options;
-
- public WSCodeWriter( File outDir, Options options) throws IOException {
- super(outDir, options.encoding);
- this.options = options;
- }
-
- protected File getFile(JPackage pkg, String fileName ) throws IOException {
- File f = super.getFile(pkg, fileName);
-
- options.addGeneratedFile(f);
- // we can't really tell the file type, for we don't know
- // what this file is used for. Fortunately,
- // FILE_TYPE doesn't seem to be used, so it doesn't really
- // matter what we set.
-
- return f;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenOptions.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenOptions.java
deleted file mode 100644
index 4772c26c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenOptions.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wscompile;
-
-import com.sun.tools.internal.ws.api.WsgenExtension;
-import com.sun.tools.internal.ws.api.WsgenProtocol;
-import com.sun.tools.internal.ws.resources.WscompileMessages;
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.binding.SOAPBindingImpl;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-
-import javax.jws.WebService;
-import javax.xml.namespace.QName;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author Vivek Pandey
- */
-public class WsgenOptions extends Options {
- /**
- * -servicename
- */
- public QName serviceName;
-
- /**
- * -portname
- */
- public QName portName;
-
- /**
- * -r
- */
- public File nonclassDestDir;
-
-
- /**
- * -wsdl
- */
- public boolean genWsdl;
-
- /**
- * -inlineSchemas
- */
- public boolean inlineSchemas;
-
- /**
- * protocol value
- */
- public String protocol = "soap1.1";
-
- public Set<String> protocols = new LinkedHashSet<String>();
- public Map<String, String> nonstdProtocols = new LinkedHashMap<String, String>();
-
- /**
- * -XwsgenReport
- */
- public File wsgenReport;
-
- /**
- * -Xdonotoverwrite
- */
- public boolean doNotOverWrite;
-
- /**
- * Tells if user specified a specific protocol
- */
- public boolean protocolSet = false;
-
- /**
- * <code>-x file1 -x file2 ...<code/><br />
- * Files to be parsed to get classes' metadata in addition/instead of using annotations and reflection API
- */
- public List<String> externalMetadataFiles = new ArrayList<String>();
-
- private static final String SERVICENAME_OPTION = "-servicename";
- private static final String PORTNAME_OPTION = "-portname";
- private static final String HTTP = "http";
- private static final String SOAP11 = "soap1.1";
- public static final String X_SOAP12 = "Xsoap1.2";
-
- public WsgenOptions() {
- protocols.add(SOAP11);
- protocols.add(X_SOAP12);
- nonstdProtocols.put(X_SOAP12, SOAPBindingImpl.X_SOAP12HTTP_BINDING);
- ServiceFinder<WsgenExtension> extn = ServiceFinder.find(WsgenExtension.class);
- for(WsgenExtension ext : extn) {
- Class clazz = ext.getClass();
- WsgenProtocol pro = (WsgenProtocol)clazz.getAnnotation(WsgenProtocol.class);
- protocols.add(pro.token());
- nonstdProtocols.put(pro.token(), pro.lexical());
- }
- }
-
- @Override
- protected int parseArguments(String[] args, int i) throws BadCommandLineException {
-
- int j = super.parseArguments(args, i);
- if (args[i].equals(SERVICENAME_OPTION)) {
- serviceName = QName.valueOf(requireArgument(SERVICENAME_OPTION, args, ++i));
- if (serviceName.getNamespaceURI() == null || serviceName.getNamespaceURI().length() == 0) {
- throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_NAMESPACE(args[i]));
- }
- if (serviceName.getLocalPart() == null || serviceName.getLocalPart().length() == 0) {
- throw new BadCommandLineException(WscompileMessages.WSGEN_SERVICENAME_MISSING_LOCALNAME(args[i]));
- }
- return 2;
- } else if (args[i].equals(PORTNAME_OPTION)) {
- portName = QName.valueOf(requireArgument(PORTNAME_OPTION, args, ++i));
- if (portName.getNamespaceURI() == null || portName.getNamespaceURI().length() == 0) {
- throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_NAMESPACE(args[i]));
- }
- if (portName.getLocalPart() == null || portName.getLocalPart().length() == 0) {
- throw new BadCommandLineException(WscompileMessages.WSGEN_PORTNAME_MISSING_LOCALNAME(args[i]));
- }
- return 2;
- } else if (args[i].equals("-r")) {
- nonclassDestDir = new File(requireArgument("-r", args, ++i));
- if (!nonclassDestDir.exists()) {
- throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(nonclassDestDir.getPath()));
- }
- return 2;
- } else if (args[i].startsWith("-wsdl")) {
- genWsdl = true;
- //String value = requireArgument("-wsdl", args, ++i).substring(5);
- String value = args[i].substring(5);
- int index = value.indexOf(':');
- if (index == 0) {
- value = value.substring(1);
- index = value.indexOf('/');
- if (index == -1) {
- protocol = value;
- } else {
- protocol = value.substring(0, index);
- }
- protocolSet = true;
- }
- return 1;
- } else if (args[i].equals("-XwsgenReport")) {
- // undocumented switch for the test harness
- wsgenReport = new File(requireArgument("-XwsgenReport", args, ++i));
- return 2;
- } else if (args[i].equals("-Xdonotoverwrite")) {
- doNotOverWrite = true;
- return 1;
- } else if (args[i].equals("-inlineSchemas")) {
- inlineSchemas = true;
- return 1;
- } else if ("-x".equals(args[i])) {
- externalMetadataFiles.add(requireArgument("-x", args, ++i));
- return 1;
- }
-
- return j;
- }
-
-
- @Override
- protected void addFile(String arg) {
- endpoints.add(arg);
- }
-
- List<String> endpoints = new ArrayList<String>();
-
- public Class endpoint;
-
-
- private boolean isImplClass;
-
- public void validate() throws BadCommandLineException {
- if(nonclassDestDir == null)
- nonclassDestDir = destDir;
-
- if (!protocols.contains(protocol)) {
- throw new BadCommandLineException(WscompileMessages.WSGEN_INVALID_PROTOCOL(protocol, protocols));
- }
-
- if (endpoints.isEmpty()) {
- throw new BadCommandLineException(WscompileMessages.WSGEN_MISSING_FILE());
- }
- if (protocol == null || protocol.equalsIgnoreCase(X_SOAP12) && !isExtensionMode()) {
- throw new BadCommandLineException(WscompileMessages.WSGEN_SOAP_12_WITHOUT_EXTENSION());
- }
-
- if (nonstdProtocols.containsKey(protocol) && !isExtensionMode()) {
- throw new BadCommandLineException(WscompileMessages.WSGEN_PROTOCOL_WITHOUT_EXTENSION(protocol));
- }
- if (inlineSchemas && !genWsdl) {
- throw new BadCommandLineException(WscompileMessages.WSGEN_INLINE_SCHEMAS_ONLY_WITH_WSDL());
- }
-
- validateEndpointClass();
- validateArguments();
- }
- /**
- * Get an implementation class annotated with @WebService annotation.
- */
- private void validateEndpointClass() throws BadCommandLineException {
- Class clazz = null;
- for(String cls : endpoints){
- clazz = getClass(cls);
- if (clazz == null)
- continue;
-
- if (clazz.isEnum() || clazz.isInterface() ||
- clazz.isPrimitive()) {
- continue;
- }
- isImplClass = true;
- WebService webService = (WebService) clazz.getAnnotation(WebService.class);
- if(webService == null)
- continue;
- break;
- }
- if(clazz == null){
- throw new BadCommandLineException(WscompileMessages.WSGEN_CLASS_NOT_FOUND(endpoints.get(0)));
- }
- if(!isImplClass){
- throw new BadCommandLineException(WscompileMessages.WSGEN_CLASS_MUST_BE_IMPLEMENTATION_CLASS(clazz.getName()));
- }
- endpoint = clazz;
- validateBinding();
- }
-
- private void validateBinding() throws BadCommandLineException {
- if (genWsdl) {
- BindingID binding = BindingID.parse(endpoint);
- if ((binding.equals(BindingID.SOAP12_HTTP) ||
- binding.equals(BindingID.SOAP12_HTTP_MTOM)) &&
- !(protocol.equals(X_SOAP12) && isExtensionMode())) {
- throw new BadCommandLineException(WscompileMessages.WSGEN_CANNOT_GEN_WSDL_FOR_SOAP_12_BINDING(binding.toString(), endpoint.getName()));
- }
- if (binding.equals(BindingID.XML_HTTP)) {
- throw new BadCommandLineException(WscompileMessages.WSGEN_CANNOT_GEN_WSDL_FOR_NON_SOAP_BINDING(binding.toString(), endpoint.getName()));
- }
- }
- }
-
- private void validateArguments() throws BadCommandLineException {
- if (!genWsdl) {
- if (serviceName != null) {
- throw new BadCommandLineException(WscompileMessages.WSGEN_WSDL_ARG_NO_GENWSDL(SERVICENAME_OPTION));
- }
- if (portName != null) {
- throw new BadCommandLineException(WscompileMessages.WSGEN_WSDL_ARG_NO_GENWSDL(PORTNAME_OPTION));
- }
- }
- }
-
- BindingID getBindingID(String protocol) {
- if (protocol.equals(SOAP11))
- return BindingID.SOAP11_HTTP;
- if (protocol.equals(X_SOAP12))
- return BindingID.SOAP12_HTTP;
- String lexical = nonstdProtocols.get(protocol);
- return (lexical != null) ? BindingID.parse(lexical) : null;
- }
-
-
- private Class getClass(String className) {
- try {
- return getClassLoader().loadClass(className);
- } catch (ClassNotFoundException e) {
- return null;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java
deleted file mode 100644
index debc4cc8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java
+++ /dev/null
@@ -1,448 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wscompile;
-
-import com.oracle.webservices.internal.api.databinding.WSDLResolver;
-import com.sun.istack.internal.tools.ParallelWorldClassLoader;
-import com.sun.tools.internal.ws.ToolVersion;
-import com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAp;
-import com.sun.tools.internal.ws.processor.modeler.wsdl.ConsoleErrorReporter;
-import com.sun.tools.internal.ws.resources.WscompileMessages;
-import com.sun.tools.internal.xjc.util.NullStream;
-import com.sun.xml.internal.txw2.TXW;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.txw2.output.StreamSerializer;
-import com.sun.xml.internal.ws.api.BindingID;
-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.WSDLGenInfo;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGeneratorExtension;
-import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
-import com.sun.xml.internal.ws.model.ExternalMetadataReader;
-import com.sun.xml.internal.ws.model.AbstractSEIModelImpl;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import org.xml.sax.SAXParseException;
-
-import javax.tools.DiagnosticCollector;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaFileObject;
-import javax.tools.StandardJavaFileManager;
-import javax.tools.ToolProvider;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.Holder;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author Vivek Pandey
- */
-
-/*
- * All annotation types are supported.
- */
-public class WsgenTool {
- private final PrintStream out;
- private final WsgenOptions options = new WsgenOptions();
-
-
- public WsgenTool(OutputStream out, Container container) {
- this.out = (out instanceof PrintStream) ? (PrintStream) out : new PrintStream(out);
- this.container = container;
- }
-
-
- public WsgenTool(OutputStream out) {
- this(out, null);
- }
-
- public boolean run(String[] args) {
- final Listener listener = new Listener();
- for (String arg : args) {
- if (arg.equals("-version")) {
- listener.message(
- WscompileMessages.WSGEN_VERSION(ToolVersion.VERSION.MAJOR_VERSION));
- return true;
- }
- if (arg.equals("-fullversion")) {
- listener.message(
- WscompileMessages.WSGEN_FULLVERSION(ToolVersion.VERSION.toString()));
- return true;
- }
- }
- try {
- options.parseArguments(args);
- options.validate();
- if (!buildModel(options.endpoint.getName(), listener)) {
- return false;
- }
- } catch (Options.WeAreDone done) {
- usage(done.getOptions());
- } catch (BadCommandLineException e) {
- if (e.getMessage() != null) {
- System.out.println(e.getMessage());
- System.out.println();
- }
- usage(e.getOptions());
- return false;
- } catch (AbortException e) {
- //error might have been reported
- } finally {
- if (!options.keep) {
- options.removeGeneratedFiles();
- }
- }
- return true;
- }
-
- private final Container container;
-
- /*
- * To take care of JDK6-JDK6u3, where 2.1 API classes are not there
- */
- private static boolean useBootClasspath(Class clazz) {
- try {
- ParallelWorldClassLoader.toJarUrl(clazz.getResource('/' + clazz.getName().replace('.', '/') + ".class"));
- return true;
- } catch (Exception e) {
- return false;
- }
- }
-
- /**
- *
- * @param endpoint
- * @param listener
- * @return
- * @throws BadCommandLineException
- */
- public boolean buildModel(String endpoint, Listener listener) throws BadCommandLineException {
- final ErrorReceiverFilter errReceiver = new ErrorReceiverFilter(listener);
-
- boolean bootCP = useBootClasspath(EndpointReference.class) || useBootClasspath(XmlSeeAlso.class);
- 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());
- args.add("-classpath");
- args.add(options.classpath);
- args.add("-s");
- args.add(options.sourceDir.getAbsolutePath());
- if (options.nocompile) {
- args.add("-proc:only");
- }
- if (options.encoding != null) {
- args.add("-encoding");
- args.add(options.encoding);
- }
- if (bootCP) {
- args.add(new StringBuilder()
- .append("-Xbootclasspath/p:")
- .append(JavaCompilerHelper.getJarFile(EndpointReference.class))
- .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>();
- StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null);
- JavaCompiler.CompilationTask task = compiler.getTask(
- null,
- fileManager,
- diagnostics,
- args,
- Collections.singleton(endpoint.replaceAll("\\$", ".")),
- null);
- task.setProcessors(Collections.singleton(new WebServiceAp(options, out)));
- boolean result = task.call();
-
- if (!result) {
- out.println(WscompileMessages.WSCOMPILE_ERROR(WscompileMessages.WSCOMPILE_COMPILATION_FAILED()));
- return false;
- }
- if (options.genWsdl) {
- DatabindingConfig config = new DatabindingConfig();
-
- List<String> externalMetadataFileNames = options.externalMetadataFiles;
- boolean disableXmlSecurity = options.disableXmlSecurity;
- if (externalMetadataFileNames != null && externalMetadataFileNames.size() > 0) {
- config.setMetadataReader(new ExternalMetadataReader(getExternalFiles(externalMetadataFileNames), null, null, true, disableXmlSecurity));
- }
-
- String tmpPath = options.destDir.getAbsolutePath() + File.pathSeparator + options.classpath;
- ClassLoader classLoader = new URLClassLoader(Options.pathToURLs(tmpPath),
- this.getClass().getClassLoader());
- Class<?> endpointClass;
- try {
- endpointClass = classLoader.loadClass(endpoint);
- } catch (ClassNotFoundException e) {
- throw new BadCommandLineException(WscompileMessages.WSGEN_CLASS_NOT_FOUND(endpoint));
- }
-
- BindingID bindingID = options.getBindingID(options.protocol);
- if (!options.protocolSet) {
- bindingID = BindingID.parse(endpointClass);
- }
- WebServiceFeatureList wsfeatures = new WebServiceFeatureList(endpointClass);
-// RuntimeModeler rtModeler = new RuntimeModeler(endpointClass, options.serviceName, bindingID, wsfeatures.toArray());
-// rtModeler.setClassLoader(classLoader);
- if (options.portName != null)
- config.getMappingInfo().setPortName(options.portName);//rtModeler.setPortName(options.portName);
-// AbstractSEIModelImpl rtModel = rtModeler.buildRuntimeModel();
-
- DatabindingFactory fac = DatabindingFactory.newInstance();
- config.setEndpointClass(endpointClass);
- config.getMappingInfo().setServiceName(options.serviceName);
- config.setFeatures(wsfeatures.toArray());
- config.setClassLoader(classLoader);
- config.getMappingInfo().setBindingID(bindingID);
- com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl) fac.createRuntime(config);
-
- final File[] wsdlFileName = new File[1]; // used to capture the generated WSDL file.
- final Map<String, File> schemaFiles = new HashMap<String, File>();
-
- WSDLGenInfo wsdlGenInfo = new WSDLGenInfo();
- wsdlGenInfo.setSecureXmlProcessingDisabled(disableXmlSecurity);
-
- wsdlGenInfo.setWsdlResolver(
- new WSDLResolver() {
- private File toFile(String suggestedFilename) {
- return new File(options.nonclassDestDir, suggestedFilename);
- }
-
- private Result toResult(File file) {
- Result result;
- try {
- result = new StreamResult(new FileOutputStream(file));
- result.setSystemId(file.getPath().replace('\\', '/'));
- } catch (FileNotFoundException e) {
- errReceiver.error(e);
- return null;
- }
- return result;
- }
-
- @Override
- public Result getWSDL(String suggestedFilename) {
- File f = toFile(suggestedFilename);
- wsdlFileName[0] = f;
- return toResult(f);
- }
-
- public Result getSchemaOutput(String namespace, String suggestedFilename) {
- if (namespace == null)
- return null;
- File f = toFile(suggestedFilename);
- schemaFiles.put(namespace, f);
- return toResult(f);
- }
-
- @Override
- public Result getAbstractWSDL(Holder<String> filename) {
- return toResult(toFile(filename.value));
- }
-
- @Override
- public Result getSchemaOutput(String namespace, Holder<String> filename) {
- return getSchemaOutput(namespace, filename.value);
- }
- // TODO pass correct impl's class name
- });
-
- wsdlGenInfo.setContainer(container);
- wsdlGenInfo.setExtensions(ServiceFinder.find(WSDLGeneratorExtension.class).toArray());
- wsdlGenInfo.setInlineSchemas(options.inlineSchemas);
- rt.generateWSDL(wsdlGenInfo);
-
-
- if (options.wsgenReport != null)
- generateWsgenReport(endpointClass, (AbstractSEIModelImpl) rt.getModel(), wsdlFileName[0], schemaFiles);
- }
- return true;
- }
-
- private List<File> getExternalFiles(List<String> exts) {
- List<File> files = new ArrayList<File>();
- for (String ext : exts) {
- // first try absolute path ...
- File file = new File(ext);
- if (!file.exists()) {
- // then relative path ...
- file = new File(options.sourceDir.getAbsolutePath() + File.separator + ext);
- }
- files.add(file);
- }
- return files;
- }
-
- /**
- * Generates a small XML file that captures the key activity of wsgen,
- * so that test harness can pick up artifacts.
- */
- private void generateWsgenReport(Class<?> endpointClass, AbstractSEIModelImpl rtModel, File wsdlFile, Map<String, File> schemaFiles) {
- try {
- ReportOutput.Report report = TXW.create(ReportOutput.Report.class,
- new StreamSerializer(new BufferedOutputStream(new FileOutputStream(options.wsgenReport))));
-
- report.wsdl(wsdlFile.getAbsolutePath());
- ReportOutput.writeQName(rtModel.getServiceQName(), report.service());
- ReportOutput.writeQName(rtModel.getPortName(), report.port());
- ReportOutput.writeQName(rtModel.getPortTypeName(), report.portType());
-
- report.implClass(endpointClass.getName());
-
- for (Map.Entry<String, File> e : schemaFiles.entrySet()) {
- ReportOutput.Schema s = report.schema();
- s.ns(e.getKey());
- s.location(e.getValue().getAbsolutePath());
- }
-
- report.commit();
- } catch (IOException e) {
- // this is code for the test, so we can be lousy in the error handling
- throw new Error(e);
- }
- }
-
- /**
- * "Namespace" for code needed to generate the report file.
- */
- static class ReportOutput {
- @XmlElement("report")
- interface Report extends TypedXmlWriter {
- @XmlElement
- void wsdl(String file); // location of WSDL
-
- @XmlElement
- QualifiedName portType();
-
- @XmlElement
- QualifiedName service();
-
- @XmlElement
- QualifiedName port();
-
- /**
- * Name of the class that has {@link javax.jws.WebService}.
- */
- @XmlElement
- void implClass(String name);
-
- @XmlElement
- Schema schema();
- }
-
- interface QualifiedName extends TypedXmlWriter {
- @XmlAttribute
- void uri(String ns);
-
- @XmlAttribute
- void localName(String localName);
- }
-
- interface Schema extends TypedXmlWriter {
- @XmlAttribute
- void ns(String ns);
-
- @XmlAttribute
- void location(String filePath);
- }
-
- private static void writeQName(QName n, QualifiedName w) {
- w.uri(n.getNamespaceURI());
- w.localName(n.getLocalPart());
- }
- }
-
- protected void usage(Options options) {
- // Just don't see any point in passing WsgenOptions
- // BadCommandLineException also shouldn't have options
- if (options == null)
- options = this.options;
- if (options instanceof WsgenOptions) {
- 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());
- }
- }
-
- class Listener extends WsimportListener {
- ConsoleErrorReporter cer = new ConsoleErrorReporter(out == null ? new PrintStream(new NullStream()) : out);
-
- @Override
- public void generatedFile(String fileName) {
- message(fileName);
- }
-
- @Override
- public void message(String msg) {
- out.println(msg);
- }
-
- @Override
- public void error(SAXParseException exception) {
- cer.error(exception);
- }
-
- @Override
- public void fatalError(SAXParseException exception) {
- cer.fatalError(exception);
- }
-
- @Override
- public void warning(SAXParseException exception) {
- cer.warning(exception);
- }
-
- @Override
- public void info(SAXParseException exception) {
- cer.info(exception);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportListener.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportListener.java
deleted file mode 100644
index 6d94046c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportListener.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wscompile;
-
-import com.sun.tools.internal.xjc.api.ErrorListener;
-import org.xml.sax.SAXParseException;
-
-/**
- * @author Vivek Pandey
- */
-public class WsimportListener implements ErrorListener {
- /**
- * Called for each file generated by wsimport or wsgen.
- *
- * <p>
- * The file name includes the path portions that correspond with the package name.
- *
- * <p>
- * When generating files into a directory, file names will be relative to the
- * output directory.
- *
- * @param fileName
- * file names like "org/acme/foo/Foo.java"
- *
- */
- public void generatedFile(String fileName) {}
-
- /**
- * Other miscellenous messages that do not have structures
- * will be reported through this method.
- *
- * This method is used like {@link java.io.PrintStream#println(String)}.
- * The callee is expected to add '\n'.
- */
- public void message(String msg) {}
-
- public void error(SAXParseException exception) {
-
- }
-
- public void fatalError(SAXParseException exception) {
-
- }
-
- public void warning(SAXParseException exception) {
-
- }
-
- public void info(SAXParseException exception) {
-
- }
-
- public void debug(SAXParseException exception){}
-
- /**
- * wsimport will periodically invoke this method to see if it should cancel a compilation.
- *
- * @return
- * true if the {@link com.sun.tools.internal.ws.wscompile.WsimportListener} wants to abort the processing.
- * @since 2.1
- */
- public boolean isCanceled() {
- return false;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java
deleted file mode 100644
index 6816f63b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java
+++ /dev/null
@@ -1,783 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wscompile;
-
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.tools.internal.ws.processor.generator.GeneratorExtension;
-import com.sun.tools.internal.ws.resources.ConfigurationMessages;
-import com.sun.tools.internal.ws.resources.WscompileMessages;
-import com.sun.tools.internal.ws.util.ForkEntityResolver;
-import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBindingsConstants;
-import com.sun.tools.internal.ws.wsdl.document.schema.SchemaConstants;
-import com.sun.tools.internal.xjc.api.SchemaCompiler;
-import com.sun.tools.internal.xjc.api.SpecVersion;
-import com.sun.tools.internal.xjc.api.XJC;
-import com.sun.tools.internal.xjc.reader.Util;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import com.sun.xml.internal.ws.util.JAXWSUtils;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import org.w3c.dom.Element;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.LocatorImpl;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.lang.reflect.Array;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.HashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * @author Vivek Pandey
- */
-public class WsimportOptions extends Options {
- /**
- * -wsdlLocation
- */
- public String wsdlLocation;
-
- /**
- * Actually stores {@link com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver}, but the field
- * type is made to {@link org.xml.sax.EntityResolver} so that XJC can be
- * used even if resolver.jar is not available in the classpath.
- */
- public EntityResolver entityResolver = null;
-
- /**
- * The -p option that should control the default Java package that
- * will contain the generated code. Null if unspecified.
- */
- public String defaultPackage = null;
-
- /**
- * The -clientjar option to package client artifacts as jar
- */
- public String clientjar = null;
-
- /**
- * -XadditionalHeaders
- */
- public boolean additionalHeaders;
-
- /**
- * The option indicates the dir where the jwsImpl will be generated.
- */
- public File implDestDir = null;
-
- /**
- * optional, generated impl file only for the ordered serviceName
- * Note: It is a QName string, formatted as: "{" + Namespace URI + "}" + local part
- */
- public String implServiceName = null;
-
- /**
- * optional, generated impl file only for the ordered portName
- * Note: It is a QName string, formatted as: "{" + Namespace URI + "}" + local part
- */
- public String implPortName = null;
-
- /**
- * optional, if true JWS file is generated
- */
- public boolean isGenerateJWS = false;
-
- /**
- * Setting disableSSLHostVerification to true disables the SSL Hostname verification while fetching the wsdls.
- * -XdisableSSLHostVerification
- */
- public boolean disableSSLHostnameVerification;
-
- /**
- * Setting useBaseResourceAndURLToLoadWSDL to true causes generated Service classes to load the WSDL file from
- * a URL generated from the base resource.
- * -XuseBaseResourceAndURLToLoadWSDL
- */
- public boolean useBaseResourceAndURLToLoadWSDL = false;
-
- /**
- * JAXB's {@link SchemaCompiler} to be used for handling the schema portion.
- * This object is also configured through options.
- */
- private SchemaCompiler schemaCompiler = XJC.createSchemaCompiler();
-
- /**
- * Authentication file
- */
- public File authFile = null;
-
- //can user.home value be null?
- public static final String defaultAuthfile
- = System.getProperty("user.home") + System.getProperty("file.separator")
- + ".metro" + System.getProperty("file.separator") + "auth";
-
- /**
- * Setting disableAuthenticator to true disables the DefaultAuthenticator.
- * -XdisableAuthenticator
- */
- public boolean disableAuthenticator;
-
- public String proxyAuth = null;
- private String proxyHost = null;
- private String proxyPort = null;
-
- /**
- * Additional arguments
- */
- public HashMap<String, String> extensionOptions = new HashMap<String, String>();
-
- /**
- * All discovered {@link Plugin}s.
- * This is lazily parsed, so that we can take '-cp' option into account.
- *
- * @see #getAllPlugins()
- */
- private List<Plugin> allPlugins;
-
- /**
- * {@link Plugin}s that are enabled in this compilation.
- */
- public final List<Plugin> activePlugins = new ArrayList<Plugin>();
-
- public JCodeModel getCodeModel() {
- if(codeModel == null)
- codeModel = new JCodeModel();
- return codeModel;
- }
-
- public SchemaCompiler getSchemaCompiler() {
- schemaCompiler.setTargetVersion(SpecVersion.parse(target.getVersion()));
- if(entityResolver != null) {
- //set if its not null so as not to override catalog option specified via xjc args
- schemaCompiler.setEntityResolver(entityResolver);
- }
- return schemaCompiler;
- }
-
- public void setCodeModel(JCodeModel codeModel) {
- this.codeModel = codeModel;
- }
-
- private JCodeModel codeModel;
-
- /**
- * This captures jars passed on the commandline and passes them to XJC and puts them in the classpath for compilation
- */
- public List<String> cmdlineJars = new ArrayList<String>();
-
- /**
- * Gets all the {@link Plugin}s discovered so far.
- *
- * <p>
- * A plugins are enumerated when this method is called for the first time,
- * by taking {@link #classpath} into account. That means
- * "-cp plugin.jar" has to come before you specify options to enable it.
- */
- public List<Plugin> getAllPlugins() {
- if(allPlugins==null) {
- allPlugins = new ArrayList<Plugin>();
- allPlugins.addAll(Arrays.asList(findServices(Plugin.class, getClassLoader())));
- }
- return allPlugins;
- }
-
- /**
- * Parses arguments and fill fields of this object.
- *
- * @exception BadCommandLineException
- * thrown when there's a problem in the command-line arguments
- */
- @Override
- public final void parseArguments( String[] args ) throws BadCommandLineException {
-
- for (int i = 0; i < args.length; i++) {
- if(args[i].length()==0)
- throw new BadCommandLineException();
- if (args[i].charAt(0) == '-') {
- int j = parseArguments(args,i);
- if(j==0)
- throw new BadCommandLineException(WscompileMessages.WSCOMPILE_INVALID_OPTION(args[i]));
- i += (j-1);
- } else {
- if(args[i].endsWith(".jar")) {
-
- try {
- cmdlineJars.add(args[i]);
- schemaCompiler.getOptions().scanEpisodeFile(new File(args[i]));
-
- } catch (com.sun.tools.internal.xjc.BadCommandLineException e) {
- //Driver.usage(jaxbOptions,false);
- throw new BadCommandLineException(e.getMessage(), e);
- }
- } else{
- addFile(args[i]);
- }
- }
- }
-
- if (encoding != null && schemaCompiler.getOptions().encoding == null) {
- try {
- schemaCompiler.getOptions().parseArgument(
- new String[] {"-encoding", encoding}, 0);
- } catch (com.sun.tools.internal.xjc.BadCommandLineException ex) {
- Logger.getLogger(WsimportOptions.class.getName()).log(Level.SEVERE, null, ex);
- }
- }
-
- if(destDir == null)
- destDir = new File(".");
- if(sourceDir == null)
- sourceDir = destDir;
- }
-
- /** -Xno-addressing-databinding option to disable addressing namespace data binding. This is
- * experimental switch and will be working as a temporary workaround till
- * jaxb can provide a better way to selelctively disable compiling of an
- * schema component.
- * **/
- public boolean noAddressingBbinding;
-
- @Override
- public int parseArguments(String[] args, int i) throws BadCommandLineException {
- int j = super.parseArguments(args ,i);
- if(j>0) return j; // understood by the super class
-
- if (args[i].equals("-b")) {
- addBindings(requireArgument("-b", args, ++i));
- return 2;
- } else if (args[i].equals("-wsdllocation")) {
- wsdlLocation = requireArgument("-wsdllocation", args, ++i);
- return 2;
- } else if (args[i].equals("-XadditionalHeaders")) {
- additionalHeaders = true;
- return 1;
- } else if (args[i].equals("-XdisableSSLHostnameVerification")) {
- disableSSLHostnameVerification = true;
- return 1;
- } else if (args[i].equals("-p")) {
- defaultPackage = requireArgument("-p", args, ++i);
- return 2;
- } else if (args[i].equals("-catalog")) {
- String catalog = requireArgument("-catalog", args, ++i);
- try {
- if (entityResolver == null) {
- if (catalog != null && catalog.length() > 0)
- entityResolver = XmlUtil.createEntityResolver(JAXWSUtils.getFileOrURL(JAXWSUtils.absolutize(Util.escapeSpace(catalog))));
- } else if (catalog != null && catalog.length() > 0) {
- EntityResolver er = XmlUtil.createEntityResolver(JAXWSUtils.getFileOrURL(JAXWSUtils.absolutize(Util.escapeSpace(catalog))));
- entityResolver = new ForkEntityResolver(er, entityResolver);
- }
- } catch (IOException e) {
- throw new BadCommandLineException(WscompileMessages.WSIMPORT_FAILED_TO_PARSE(catalog, e.getMessage()));
- }
- return 2;
- } else if (args[i].startsWith("-httpproxy:")) {
- String value = args[i].substring(11);
- if (value.length() == 0) {
- throw new BadCommandLineException(WscompileMessages.WSCOMPILE_INVALID_OPTION(args[i]));
- }
- parseProxy(value);
- if (proxyHost != null || proxyPort != null) {
- System.setProperty("proxySet", "true");
- }
- if (proxyHost != null) {
- System.setProperty("proxyHost", proxyHost);
- }
- if (proxyPort != null) {
- System.setProperty("proxyPort", proxyPort);
- }
- return 1;
- } else if (args[i].equals("-Xno-addressing-databinding")) {
- noAddressingBbinding = true;
- return 1;
- } else if (args[i].startsWith("-B")) {
- // JAXB option pass through.
- String[] subCmd = new String[args.length-i];
- System.arraycopy(args,i,subCmd,0,subCmd.length);
- subCmd[0] = subCmd[0].substring(2); // trim off the first "-B"
-
- com.sun.tools.internal.xjc.Options jaxbOptions = schemaCompiler.getOptions();
- try {
- int r = jaxbOptions.parseArgument(subCmd, 0);
- if(r==0) {
- //Driver.usage(jaxbOptions,false);
- throw new BadCommandLineException(WscompileMessages.WSIMPORT_NO_SUCH_JAXB_OPTION(subCmd[0]));
- }
- return r;
- } catch (com.sun.tools.internal.xjc.BadCommandLineException e) {
- //Driver.usage(jaxbOptions,false);
- throw new BadCommandLineException(e.getMessage(),e);
- }
- } else if (args[i].equals("-Xauthfile")) {
- String authfile = requireArgument("-Xauthfile", args, ++i);
- authFile = new File(authfile);
- return 2;
- } else if (args[i].equals("-clientjar")) {
- clientjar = requireArgument("-clientjar", args, ++i);
- return 2;
- } else if (args[i].equals("-implDestDir")) {
- implDestDir = new File(requireArgument("-implDestDir", args, ++i));
- if (!implDestDir.exists())
- throw new BadCommandLineException(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(implDestDir.getPath()));
- return 2;
- } else if (args[i].equals("-implServiceName")) {
- implServiceName = requireArgument("-implServiceName", args, ++i);
- return 2;
- } else if (args[i].equals("-implPortName")) {
- implPortName = requireArgument("-implPortName", args, ++i);
- return 2;
- } else if (args[i].equals("-generateJWS")) {
- isGenerateJWS = true;
- return 1;
- } else if (args[i].equals("-XuseBaseResourceAndURLToLoadWSDL")) {
- useBaseResourceAndURLToLoadWSDL = true;
- return 1;
- } else if (args[i].equals("-XdisableAuthenticator")) {
- disableAuthenticator = true;
- return 1;
- }
-
- // handle additional options
- for (GeneratorExtension f:ServiceFinder.find(GeneratorExtension.class)) {
- if (f.validateOption(args[i])) {
- extensionOptions.put(args[i], requireArgument(args[i], args, ++i));
- return 2;
- }
- }
-
- // see if this is one of the extensions
- for( Plugin plugin : getAllPlugins() ) {
- try {
- if(('-' + plugin.getOptionName()).equals(args[i])) {
- activePlugins.add(plugin);
- plugin.onActivated(this);
- return 1;
- }
- int r = plugin.parseArgument(this, args, i);
- if (r != 0) {
- return r;
- }
- } catch (IOException e) {
- throw new BadCommandLineException(e.getMessage(),e);
- }
- }
-
- return 0; // what's this option?
- }
-
- public void validate() throws BadCommandLineException {
- if (wsdls.isEmpty()) {
- throw new BadCommandLineException(WscompileMessages.WSIMPORT_MISSING_FILE());
- }
-
- if(wsdlLocation !=null && clientjar != null) {
- throw new BadCommandLineException(WscompileMessages.WSIMPORT_WSDLLOCATION_CLIENTJAR());
- }
- if(wsdlLocation == null){
- wsdlLocation = wsdls.get(0).getSystemId();
- }
-
-
- }
-
- @Override
- protected void addFile(String arg) throws BadCommandLineException {
- addFile(arg, wsdls, ".wsdl");
- }
-
- private final List<InputSource> wsdls = new ArrayList<InputSource>();
- private final List<InputSource> schemas = new ArrayList<InputSource>();
- private final List<InputSource> bindingFiles = new ArrayList<InputSource>();
- private final List<InputSource> jaxwsCustomBindings = new ArrayList<InputSource>();
- private final List<InputSource> jaxbCustomBindings = new ArrayList<InputSource>();
- private final List<Element> handlerConfigs = new ArrayList<Element>();
-
- /**
- * There is supposed to be one handler chain per generated SEI.
- * TODO: There is possible bug, how to associate a @HandlerChain
- * with each port on the generated SEI. For now lets preserve the JAXWS 2.0 FCS
- * behaviour and generate only one @HandlerChain on the SEI
- */
- public Element getHandlerChainConfiguration(){
- if(handlerConfigs.size() > 0)
- return handlerConfigs.get(0);
- return null;
- }
-
- public void addHandlerChainConfiguration(Element config){
- handlerConfigs.add(config);
- }
-
- public InputSource[] getWSDLs() {
- return wsdls.toArray(new InputSource[wsdls.size()]);
- }
-
- public InputSource[] getSchemas() {
- return schemas.toArray(new InputSource[schemas.size()]);
- }
-
- public InputSource[] getWSDLBindings() {
- return jaxwsCustomBindings.toArray(new InputSource[jaxwsCustomBindings.size()]);
- }
-
- public InputSource[] getSchemaBindings() {
- return jaxbCustomBindings.toArray(new InputSource[jaxbCustomBindings.size()]);
- }
-
- public void addWSDL(File source) {
- addWSDL(fileToInputSource(source));
- }
-
- public void addWSDL(InputSource is) {
- wsdls.add(absolutize(is));
- }
-
- public void addSchema(File source) {
- addSchema(fileToInputSource(source));
- }
-
- public void addSchema(InputSource is) {
- schemas.add(is);
- }
-
- private InputSource fileToInputSource(File source) {
- try {
- String url = source.toURL().toExternalForm();
- return new InputSource(Util.escapeSpace(url));
- } catch (MalformedURLException e) {
- return new InputSource(source.getPath());
- }
- }
-
- /**
- * Recursively scan directories and add all XSD files in it.
- */
- public void addGrammarRecursive(File dir) {
- addRecursive(dir, ".wsdl", wsdls);
- addRecursive(dir, ".xsd", schemas);
- }
-
- /**
- * Adds a new input schema.
- */
- public void addWSDLBindFile(InputSource is) {
- jaxwsCustomBindings.add(new RereadInputSource(absolutize(is)));
- }
-
- public void addSchemmaBindFile(InputSource is) {
- jaxbCustomBindings.add(new RereadInputSource(absolutize(is)));
- }
-
- private void addRecursive(File dir, String suffix, List<InputSource> result) {
- File[] files = dir.listFiles();
- if (files == null) return; // work defensively
-
- for (File f : files) {
- if (f.isDirectory())
- addRecursive(f, suffix, result);
- else if (f.getPath().endsWith(suffix))
- result.add(absolutize(fileToInputSource(f)));
- }
- }
-
- private InputSource absolutize(InputSource is) {
- // absolutize all the system IDs in the input,
- // so that we can map system IDs to DOM trees.
- try {
- URL baseURL = new File(".").getCanonicalFile().toURL();
- is.setSystemId(new URL(baseURL, is.getSystemId()).toExternalForm());
- } catch (IOException e) {
- // ignore
- }
- return is;
- }
-
- public void addBindings(String name) throws BadCommandLineException {
- addFile(name, bindingFiles, null);
- }
-
- /**
- * Parses a token to a file (or a set of files)
- * and add them as {@link InputSource} to the specified list.
- *
- * @param suffix If the given token is a directory name, we do a recusive search
- * and find all files that have the given suffix.
- */
- private void addFile(String name, List<InputSource> target, String suffix) throws BadCommandLineException {
- Object src;
- try {
- src = Util.getFileOrURL(name);
- } catch (IOException e) {
- throw new BadCommandLineException(WscompileMessages.WSIMPORT_NOT_A_FILE_NOR_URL(name));
- }
- if (src instanceof URL) {
- target.add(absolutize(new InputSource(Util.escapeSpace(((URL) src).toExternalForm()))));
- } else {
- File fsrc = (File) src;
- if (fsrc.isDirectory()) {
- addRecursive(fsrc, suffix, target);
- } else {
- target.add(absolutize(fileToInputSource(fsrc)));
- }
- }
- }
-
-
- /**
- * Exposing it as a public method to allow external tools such as NB to read from wsdl model and work on it.
- * TODO: WSDL model needs to be exposed - basically at tool time we need to use the runtimw wsdl model
- *
- * Binding files could be jaxws or jaxb. This method identifies jaxws and jaxb binding files and keeps them separately. jaxb binding files are given separately
- * to JAXB in {@link com.sun.tools.internal.ws.processor.modeler.wsdl.JAXBModelBuilder}
- *
- * @param receiver {@link ErrorReceiver}
- */
- public final void parseBindings(ErrorReceiver receiver){
- for (InputSource is : bindingFiles) {
- XMLStreamReader reader =
- XMLStreamReaderFactory.create(is,true);
- XMLStreamReaderUtil.nextElementContent(reader);
- if (reader.getName().equals(JAXWSBindingsConstants.JAXWS_BINDINGS)) {
- jaxwsCustomBindings.add(new RereadInputSource(is));
- } else if (reader.getName().equals(JAXWSBindingsConstants.JAXB_BINDINGS) ||
- reader.getName().equals(new QName(SchemaConstants.NS_XSD, "schema"))) {
- jaxbCustomBindings.add(new RereadInputSource(is));
- } else {
- LocatorImpl locator = new LocatorImpl();
- locator.setSystemId(reader.getLocation().getSystemId());
- locator.setPublicId(reader.getLocation().getPublicId());
- locator.setLineNumber(reader.getLocation().getLineNumber());
- locator.setColumnNumber(reader.getLocation().getColumnNumber());
- receiver.warning(locator, ConfigurationMessages.CONFIGURATION_NOT_BINDING_FILE(is.getSystemId()));
- }
- }
- }
-
- /**
- * Get extension argument
- */
- public String getExtensionOption(String argument) {
- return extensionOptions.get(argument);
- }
-
- private void parseProxy(String text) throws BadCommandLineException {
- int i = text.lastIndexOf('@');
- int j = text.lastIndexOf(':');
-
- if (i > 0) {
- proxyAuth = text.substring(0, i);
- if (j > i) {
- proxyHost = text.substring(i + 1, j);
- proxyPort = text.substring(j + 1);
- } else {
- proxyHost = text.substring(i + 1);
- proxyPort = "8080";
- }
- } else {
- //no auth info
- if (j < 0) {
- //no port
- proxyHost = text;
- proxyPort = "8080";
- } else {
- proxyHost = text.substring(0, j);
- proxyPort = text.substring(j + 1);
- }
- }
- try {
- Integer.valueOf(proxyPort);
- } catch (NumberFormatException e) {
- throw new BadCommandLineException(WscompileMessages.WSIMPORT_ILLEGAL_PROXY(text));
- }
- }
-
- /**
- * Looks for all "META-INF/services/[className]" files and
- * create one instance for each class name found inside this file.
- */
- private static <T> T[] findServices(Class<T> clazz, ClassLoader classLoader) {
- ServiceFinder<T> serviceFinder = ServiceFinder.find(clazz, classLoader);
- List<T> r = new ArrayList<T>();
- for (T t : serviceFinder) {
- r.add(t);
- }
- return r.toArray((T[]) Array.newInstance(clazz, r.size()));
- }
-
- private static final class ByteStream extends ByteArrayOutputStream {
- byte[] getBuffer() {
- return buf;
- }
- }
-
- private static final class RereadInputStream extends InputStream {
- private InputStream is;
- private ByteStream bs;
-
- RereadInputStream(InputStream is) {
- this.is = is;
- this.bs = new ByteStream();
- }
-
- @Override
- public int available() throws IOException {
- return is.available();
- }
-
- @Override
- public void close() throws IOException {
- if (bs != null) {
- InputStream i = new ByteArrayInputStream(bs.getBuffer());
- bs = null;
- is.close();
- is = i;
- }
- }
-
- @Override
- public synchronized void mark(int readlimit) {
- is.mark(readlimit);
- }
-
- @Override
- public boolean markSupported() {
- return is.markSupported();
- }
-
- @Override
- public int read() throws IOException {
- int r = is.read();
- if (bs != null)
- bs.write(r);
- return r;
- }
-
- @Override
- public int read(byte[] b, int off, int len) throws IOException {
- int r = is.read(b, off, len);
- if (r > 0 && bs != null)
- bs.write(b, off, r);
- return r;
- }
-
- @Override
- public int read(byte[] b) throws IOException {
- int r = is.read(b);
- if (r > 0 && bs != null)
- bs.write(b, 0, r);
- return r;
- }
-
- @Override
- public synchronized void reset() throws IOException {
- is.reset();
- }
- }
-
- private static final class RereadInputSource extends InputSource {
- private InputSource is;
-
- RereadInputSource(InputSource is) {
- this.is = is;
- }
-
- @Override
- public InputStream getByteStream() {
- InputStream i = is.getByteStream();
- if (i != null && !(i instanceof RereadInputStream)) {
- i = new RereadInputStream(i);
- is.setByteStream(i);
- }
- return i;
- }
-
- @Override
- public Reader getCharacterStream() {
- // TODO Auto-generated method stub
- return is.getCharacterStream();
- }
-
- @Override
- public String getEncoding() {
- return is.getEncoding();
- }
-
- @Override
- public String getPublicId() {
- return is.getPublicId();
- }
-
- @Override
- public String getSystemId() {
- return is.getSystemId();
- }
-
- @Override
- public void setByteStream(InputStream byteStream) {
- is.setByteStream(byteStream);
- }
-
- @Override
- public void setCharacterStream(Reader characterStream) {
- is.setCharacterStream(characterStream);
- }
-
- @Override
- public void setEncoding(String encoding) {
- is.setEncoding(encoding);
- }
-
- @Override
- public void setPublicId(String publicId) {
- is.setPublicId(publicId);
- }
-
- @Override
- public void setSystemId(String systemId) {
- is.setSystemId(systemId);
- }
- }
-
- @Override
- protected void disableXmlSecurity() {
- super.disableXmlSecurity();
- schemaCompiler.getOptions().disableXmlSecurity = true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java
deleted file mode 100644
index 87e9f422..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java
+++ /dev/null
@@ -1,586 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wscompile;
-
-import com.sun.codemodel.internal.CodeWriter;
-import com.sun.codemodel.internal.writer.ProgressCodeWriter;
-import com.sun.istack.internal.tools.DefaultAuthenticator;
-import com.sun.tools.internal.ws.ToolVersion;
-import com.sun.tools.internal.ws.api.TJavaGeneratorExtension;
-import com.sun.tools.internal.ws.processor.generator.CustomExceptionGenerator;
-import com.sun.tools.internal.ws.processor.generator.GeneratorBase;
-import com.sun.tools.internal.ws.processor.generator.SeiGenerator;
-import com.sun.tools.internal.ws.processor.generator.ServiceGenerator;
-import com.sun.tools.internal.ws.processor.generator.JwsImplGenerator;
-import com.sun.tools.internal.ws.processor.model.Model;
-import com.sun.tools.internal.ws.processor.modeler.wsdl.ConsoleErrorReporter;
-import com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler;
-import com.sun.tools.internal.ws.processor.util.DirectoryUtil;
-import com.sun.tools.internal.ws.resources.WscompileMessages;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import com.sun.tools.internal.ws.util.WSDLFetcher;
-import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder;
-import com.sun.tools.internal.ws.wsdl.parser.WSDLInternalizationLogic;
-import com.sun.tools.internal.xjc.util.NullStream;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import com.sun.istack.internal.tools.ParallelWorldClassLoader;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.SAXParseException;
-
-import javax.xml.bind.JAXBPermission;
-import javax.xml.stream.*;
-import javax.xml.ws.EndpointContext;
-import java.io.*;
-import java.util.*;
-import java.text.MessageFormat;
-import java.util.jar.JarEntry;
-import java.util.jar.JarOutputStream;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-/**
- * @author Vivek Pandey
- */
-public class WsimportTool {
- private static final String WSIMPORT = "wsimport";
- private final PrintStream out;
- private final Container container;
-
- /**
- * Wsimport specific options
- */
- protected WsimportOptions options = new WsimportOptions();
-
- public WsimportTool(OutputStream out) {
- this(out, null);
- }
-
- public WsimportTool(OutputStream logStream, Container container) {
- this.out = (logStream instanceof PrintStream)?(PrintStream)logStream:new PrintStream(logStream);
- this.container = container;
- }
-
- protected class Listener extends WsimportListener {
- ConsoleErrorReporter cer = new ConsoleErrorReporter(out == null ? new PrintStream(new NullStream()) : out);
-
- @Override
- public void generatedFile(String fileName) {
- message(fileName);
- }
-
- @Override
- public void message(String msg) {
- out.println(msg);
- }
-
- @Override
- public void error(SAXParseException exception) {
- cer.error(exception);
- }
-
- @Override
- public void fatalError(SAXParseException exception) {
- cer.fatalError(exception);
- }
-
- @Override
- public void warning(SAXParseException exception) {
- cer.warning(exception);
- }
-
- @Override
- public void debug(SAXParseException exception) {
- cer.debug(exception);
- }
-
- @Override
- public void info(SAXParseException exception) {
- cer.info(exception);
- }
-
- public void enableDebugging(){
- cer.enableDebugging();
- }
- }
-
- protected class Receiver extends ErrorReceiverFilter {
-
- private Listener listener;
-
- public Receiver(Listener listener) {
- super(listener);
- this.listener = listener;
- }
-
- @Override
- public void info(SAXParseException exception) {
- if (options.verbose)
- super.info(exception);
- }
-
- @Override
- public void warning(SAXParseException exception) {
- if (!options.quiet)
- super.warning(exception);
- }
-
- @Override
- public void pollAbort() throws AbortException {
- if (listener.isCanceled())
- throw new AbortException();
- }
-
- @Override
- public void debug(SAXParseException exception){
- if(options.debugMode){
- listener.debug(exception);
- }
- }
- }
-
- public boolean run(String[] args) {
- Listener listener = new Listener();
- Receiver receiver = new Receiver(listener);
- return run(args, listener, receiver);
- }
-
- protected boolean run(String[] args, Listener listener,
- Receiver receiver) {
- for (String arg : args) {
- if (arg.equals("-version")) {
- listener.message(
- WscompileMessages.WSIMPORT_VERSION(ToolVersion.VERSION.MAJOR_VERSION));
- return true;
- }
- if (arg.equals("-fullversion")) {
- listener.message(
- WscompileMessages.WSIMPORT_FULLVERSION(ToolVersion.VERSION.toString()));
- return true;
- }
- }
-
- try {
- parseArguments(args, listener, receiver);
-
- try {
- Model wsdlModel = buildWsdlModel(listener, receiver);
- if (wsdlModel == null)
- return false;
-
- if (!generateCode(listener, receiver, wsdlModel, true))
- return false;
-
- /* Not so fast!
- } catch(AbortException e){
- //error might have been reported
- *
- */
- }catch (IOException e) {
- receiver.error(e);
- return false;
- }catch (XMLStreamException e) {
- receiver.error(e);
- return false;
- }
- if (!options.nocompile){
- if(!compileGeneratedClasses(receiver, listener)){
- listener.message(WscompileMessages.WSCOMPILE_COMPILATION_FAILED());
- return false;
- }
- }
- try {
- if (options.clientjar != null) {
- //add all the generated class files to the list of generated files
- addClassesToGeneratedFiles();
- jarArtifacts(listener);
-
- }
- } catch (IOException e) {
- receiver.error(e);
- return false;
- }
-
- } catch (Options.WeAreDone done) {
- usage(done.getOptions());
- } catch (BadCommandLineException e) {
- if (e.getMessage() != null) {
- System.out.println(e.getMessage());
- System.out.println();
- }
- usage(e.getOptions());
- return false;
- } finally{
- deleteGeneratedFiles();
- if (!options.disableAuthenticator) {
- DefaultAuthenticator.reset();
- }
- }
- if(receiver.hadError()) {
- return false;
- }
- return true;
- }
-
- private void deleteGeneratedFiles() {
- Set<File> trackedRootPackages = new HashSet<File>();
-
- if (options.clientjar != null) {
- //remove all non-java artifacts as they will packaged in jar.
- Iterable<File> generatedFiles = options.getGeneratedFiles();
- synchronized (generatedFiles) {
- for (File file : generatedFiles) {
- if (!file.getName().endsWith(".java")) {
- boolean deleted = file.delete();
- if (options.verbose && !deleted) {
- System.out.println(MessageFormat.format("{0} could not be deleted.", file));
- }
- trackedRootPackages.add(file.getParentFile());
- }
- }
- }
- //remove empty package dirs
- for(File pkg:trackedRootPackages) {
-
- while(pkg.list() != null && pkg.list().length ==0 && !pkg.equals(options.destDir)) {
- File parentPkg = pkg.getParentFile();
- boolean deleted = pkg.delete();
- if (options.verbose && !deleted) {
- System.out.println(MessageFormat.format("{0} could not be deleted.", pkg));
- }
- pkg = parentPkg;
- }
- }
- }
- if(!options.keep) {
- options.removeGeneratedFiles();
- }
- }
-
- private void addClassesToGeneratedFiles() throws IOException {
- Iterable<File> generatedFiles = options.getGeneratedFiles();
- final List<File> trackedClassFiles = new ArrayList<File>();
- for(File f: generatedFiles) {
- if(f.getName().endsWith(".java")) {
- String relativeDir = DirectoryUtil.getRelativePathfromCommonBase(f.getParentFile(),options.sourceDir);
- final String className = f.getName().substring(0,f.getName().indexOf(".java"));
- File classDir = new File(options.destDir,relativeDir);
- if(classDir.exists()) {
- classDir.listFiles(new FilenameFilter() {
- @Override
- public boolean accept(File dir, String name) {
- if(name.equals(className+".class") || (name.startsWith(className+"$") && name.endsWith(".class"))) {
- trackedClassFiles.add(new File(dir,name));
- return true;
- }
- return false;
- }
- });
- }
- }
- }
- for(File f: trackedClassFiles) {
- options.addGeneratedFile(f);
- }
- }
-
- private void jarArtifacts(WsimportListener listener) throws IOException {
- File zipFile = new File(options.clientjar);
- if(!zipFile.isAbsolute()) {
- zipFile = new File(options.destDir, options.clientjar);
- }
-
- FileOutputStream fos;
- if (!options.quiet) {
- listener.message(WscompileMessages.WSIMPORT_ARCHIVING_ARTIFACTS(zipFile));
- }
-
- BufferedInputStream bis = null;
- FileInputStream fi = null;
- fos = new FileOutputStream(zipFile);
- JarOutputStream jos = new JarOutputStream(fos);
- try {
- String base = options.destDir.getCanonicalPath();
- for(File f: options.getGeneratedFiles()) {
- //exclude packaging the java files in the jar
- if(f.getName().endsWith(".java")) {
- continue;
- }
- if(options.verbose) {
- listener.message(WscompileMessages.WSIMPORT_ARCHIVE_ARTIFACT(f, options.clientjar));
- }
- String entry = f.getCanonicalPath().substring(base.length()+1).replace(File.separatorChar, '/');
- fi = new FileInputStream(f);
- bis = new BufferedInputStream(fi);
- JarEntry jarEntry = new JarEntry(entry);
- jos.putNextEntry(jarEntry);
- int bytesRead;
- byte[] buffer = new byte[1024];
- while ((bytesRead = bis.read(buffer)) != -1) {
- jos.write(buffer, 0, bytesRead);
- }
- }
- } finally {
- try {
- if (bis != null) {
- bis.close();
- }
- } finally {
- if (jos != null) {
- jos.close();
- }
- if (fi != null) {
- fi.close();
- }
- }
- }
- }
-
- protected void parseArguments(String[] args, Listener listener,
- Receiver receiver) throws BadCommandLineException {
- options.parseArguments(args);
- options.validate();
- if (options.debugMode)
- listener.enableDebugging();
- options.parseBindings(receiver);
- }
-
- protected Model buildWsdlModel(Listener listener, final Receiver receiver)
- throws BadCommandLineException, XMLStreamException, IOException {
- //set auth info
- //if(options.authFile != null)
- if (!options.disableAuthenticator) {
- class AuthListener implements DefaultAuthenticator.Receiver {
-
- private final boolean isFatal;
-
- AuthListener(boolean isFatal) {
- this.isFatal = isFatal;
- }
-
- @Override
- public void onParsingError(String text, Locator loc) {
- error(new SAXParseException(WscompileMessages.WSIMPORT_ILLEGAL_AUTH_INFO(text), loc));
- }
-
- @Override
- public void onError(Exception e, Locator loc) {
- if (e instanceof FileNotFoundException) {
- error(new SAXParseException(WscompileMessages.WSIMPORT_AUTH_FILE_NOT_FOUND(
- loc.getSystemId(), WsimportOptions.defaultAuthfile), null));
- } else {
- error(new SAXParseException(WscompileMessages.WSIMPORT_FAILED_TO_PARSE(loc.getSystemId(),e.getMessage()), loc));
- }
- }
-
- private void error(SAXParseException e) {
- if (isFatal) {
- receiver.error(e);
- } else {
- receiver.debug(e);
- }
- }
- }
-
- DefaultAuthenticator da = DefaultAuthenticator.getAuthenticator();
- if (options.proxyAuth != null) {
- da.setProxyAuth(options.proxyAuth);
- }
- if (options.authFile != null) {
- da.setAuth(options.authFile, new AuthListener(true));
- } else {
- da.setAuth(new File(WsimportOptions.defaultAuthfile), new AuthListener(false));
- }
- }
-
- if (!options.quiet) {
- listener.message(WscompileMessages.WSIMPORT_PARSING_WSDL());
- }
-
- MetadataFinder forest = new MetadataFinder(new WSDLInternalizationLogic(), options, receiver);
- forest.parseWSDL();
- if (forest.isMexMetadata)
- receiver.reset();
-
- WSDLModeler wsdlModeler = new WSDLModeler(options, receiver,forest);
- Model wsdlModel = wsdlModeler.buildModel();
- if (wsdlModel == null) {
- listener.message(WsdlMessages.PARSING_PARSE_FAILED());
- }
-
- if(options.clientjar != null) {
- if( !options.quiet )
- listener.message(WscompileMessages.WSIMPORT_FETCHING_METADATA());
- options.wsdlLocation = new WSDLFetcher(options,listener).fetchWsdls(forest);
- }
-
- return wsdlModel;
- }
-
- protected boolean generateCode(Listener listener, Receiver receiver,
- Model wsdlModel, boolean generateService)
- throws IOException {
- //generated code
- if( !options.quiet )
- listener.message(WscompileMessages.WSIMPORT_GENERATING_CODE());
-
- TJavaGeneratorExtension[] genExtn = ServiceFinder.find(TJavaGeneratorExtension.class).toArray();
- CustomExceptionGenerator.generate(wsdlModel, options, receiver);
- SeiGenerator.generate(wsdlModel, options, receiver, genExtn);
- if(receiver.hadError()){
- throw new AbortException();
- }
- if (generateService)
- {
- ServiceGenerator.generate(wsdlModel, options, receiver);
- }
- for (GeneratorBase g : ServiceFinder.find(GeneratorBase.class)) {
- g.init(wsdlModel, options, receiver);
- g.doGeneration();
- }
-
- List<String> implFiles = null;
- if (options.isGenerateJWS) {
- implFiles = JwsImplGenerator.generate(wsdlModel, options, receiver);
- }
-
- for (Plugin plugin: options.activePlugins) {
- try {
- plugin.run(wsdlModel, options, receiver);
- } catch (SAXException sex) {
- // fatal error. error should have been reported
- return false;
- }
- }
-
- CodeWriter cw;
- if (options.filer != null) {
- cw = new FilerCodeWriter(options.sourceDir, options);
- } else {
- cw = new WSCodeWriter(options.sourceDir, options);
- }
-
- if (options.verbose)
- cw = new ProgressCodeWriter(cw, out);
- options.getCodeModel().build(cw);
-
- if (options.isGenerateJWS) {
- //move Impl files to implDestDir
- return JwsImplGenerator.moveToImplDestDir(implFiles, options, receiver);
- }
-
- return true;
- }
-
- public void setEntityResolver(EntityResolver resolver){
- this.options.entityResolver = resolver;
- }
-
- /*
- * To take care of JDK6-JDK6u3, where 2.1 API classes are not there
- */
- private static boolean useBootClasspath(Class clazz) {
- try {
- ParallelWorldClassLoader.toJarUrl(clazz.getResource('/'+clazz.getName().replace('.','/')+".class"));
- return true;
- } catch(Exception e) {
- return false;
- }
- }
-
- protected boolean compileGeneratedClasses(ErrorReceiver receiver, WsimportListener listener){
- List<String> sourceFiles = new ArrayList<String>();
-
- for (File f : options.getGeneratedFiles()) {
- if (f.exists() && f.getName().endsWith(".java")) {
- sourceFiles.add(f.getAbsolutePath());
- }
- }
-
- if (sourceFiles.size() > 0) {
- String classDir = options.destDir.getAbsolutePath();
- String classpathString = createClasspathString();
- boolean bootCP = useBootClasspath(EndpointContext.class) || useBootClasspath(JAXBPermission.class);
- 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.add("-Xbootclasspath/p:"
- + JavaCompilerHelper.getJarFile(EndpointContext.class)
- + File.pathSeparator
- + JavaCompilerHelper.getJarFile(JAXBPermission.class));
- }
-
- if (options.debug) {
- args.add("-g");
- }
-
- if (options.encoding != null) {
- 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.add(sourceFiles.get(i));
- }
-
- listener.message(WscompileMessages.WSIMPORT_COMPILING_CODE());
- if(options.verbose){
- StringBuilder argstr = new StringBuilder();
- for(String arg:args){
- argstr.append(arg).append(" ");
- }
- listener.message("javac "+ argstr.toString());
- }
-
- return JavaCompilerHelper.compile(args.toArray(new String[args.size()]), out, receiver);
- }
- //there are no files to compile, so return true?
- return true;
- }
-
- private String createClasspathString() {
- StringBuilder classpathStr = new StringBuilder(System.getProperty("java.class.path"));
- for(String s: options.cmdlineJars) {
- classpathStr.append(File.pathSeparator);
- classpathStr.append(new File(s).toString());
- }
- return classpathStr.toString();
- }
-
- protected void usage(Options options) {
- System.out.println(WscompileMessages.WSIMPORT_HELP(WSIMPORT));
- System.out.println(WscompileMessages.WSIMPORT_USAGE_EXTENSIONS());
- System.out.println(WscompileMessages.WSIMPORT_USAGE_EXAMPLES());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/plugin/at_generated/PluginImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/plugin/at_generated/PluginImpl.java
deleted file mode 100644
index 64d7d7b4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/plugin/at_generated/PluginImpl.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wscompile.plugin.at_generated;
-
-import com.sun.codemodel.internal.*;
-import com.sun.tools.internal.ws.ToolVersion;
-import com.sun.tools.internal.ws.processor.model.Model;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.Plugin;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.tools.internal.ws.wscompile.WsimportTool;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Iterator;
-import org.xml.sax.SAXException;
-
-/**
- * {@link Plugin} that marks the generated code by using JSR-250's '@Generated'.
- * It is based on a similar plugin in JAXB RI.
- *
- * @author Lukas Jungmann
- * @since 2.2.6
- */
-public final class PluginImpl extends Plugin {
-
- private JClass annotation;
-
- // cache the timestamp so that all the @Generated annotations match
- private String date = null;
-
- @Override
- public String getOptionName() {
- return "mark-generated";
- }
-
- @Override
- public String getUsage() {
- return " -mark-generated : mark the generated code as @javax.annotation.Generated";
- }
-
- @Override
- public boolean run(Model model, WsimportOptions wo, ErrorReceiver er) throws SAXException {
- JCodeModel cm = wo.getCodeModel();
- // we want this to work without requiring JSR-250 jar.
- annotation = cm.ref("javax.annotation.Generated");
-
- for (Iterator<JPackage> i = cm.packages(); i.hasNext();) {
- for (Iterator<JDefinedClass> j = i.next().classes(); j.hasNext();) {
- annotate(j.next());
- }
- }
-
- return true;
- }
-
- private void annotate(JAnnotatable m) {
- m.annotate(annotation)
- .param("value", WsimportTool.class.getName())
- .param("date", getISO8601Date())
- .param("comments", ToolVersion.VERSION.BUILD_VERSION);
- }
-
- /**
- * calculate the date value in ISO8601 format for the @Generated annotation
- * @return the date value
- */
- private String getISO8601Date() {
- if(date==null) {
- StringBuilder tstamp = new StringBuilder();
- tstamp.append((new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ssZ")).format(new Date()));
- // hack to get ISO 8601 style timezone - is there a better way that doesn't require
- // a bunch of timezone offset calculations?
- tstamp.insert(tstamp.length()-2, ':');
- date = tstamp.toString();
- }
- return date;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Binding.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Binding.java
deleted file mode 100644
index d0c05875..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Binding.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wsdl.framework.*;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import com.sun.tools.internal.ws.wscompile.AbortException;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Entity corresponding to the "binding" WSDL element.
- *
- * @author WS Development Team
- */
-public class Binding extends GlobalEntity implements TWSDLExtensible {
-
- public Binding(Defining defining, Locator locator, ErrorReceiver receiver) {
- super(defining, locator, receiver);
- _operations = new ArrayList();
- _helper = new ExtensibilityHelper();
- }
-
- public void add(BindingOperation operation) {
- _operations.add(operation);
- }
-
- public Iterator operations() {
- return _operations.iterator();
- }
-
- public QName getPortType() {
- return _portType;
- }
-
- public void setPortType(QName n) {
- _portType = n;
- }
-
- public PortType resolvePortType(AbstractDocument document) {
- try {
- return (PortType) document.find(Kinds.PORT_TYPE, _portType);
- } catch (NoSuchEntityException e) {
- errorReceiver.error(getLocator(), WsdlMessages.ENTITY_NOT_FOUND_PORT_TYPE(_portType, new QName(getNamespaceURI(), getName())));
- throw new AbortException();
- }
- }
-
- public Kind getKind() {
- return Kinds.BINDING;
- }
-
- public QName getElementName() {
- return WSDLConstants.QNAME_BINDING;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- for (Iterator iter = _operations.iterator(); iter.hasNext();) {
- action.perform((Entity) iter.next());
- }
- _helper.withAllSubEntitiesDo(action);
- }
-
- public void withAllQNamesDo(QNameAction action) {
- super.withAllQNamesDo(action);
-
- if (_portType != null) {
- action.perform(_portType);
- }
- }
-
- public void withAllEntityReferencesDo(EntityReferenceAction action) {
- super.withAllEntityReferencesDo(action);
- if (_portType != null) {
- action.perform(Kinds.PORT_TYPE, _portType);
- }
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
- //bug fix: 4947340, extensions should be the first element
- _helper.accept(visitor);
- for (Iterator iter = _operations.iterator(); iter.hasNext();) {
- ((BindingOperation) iter.next()).accept(visitor);
- }
- visitor.postVisit(this);
- }
-
- public void validateThis() {
- if (getName() == null) {
- failValidation("validation.missingRequiredAttribute", "name");
- }
- if (_portType == null) {
- failValidation("validation.missingRequiredAttribute", "type");
- }
- }
-
- public String getNameValue() {
- return getName();
- }
-
- public String getNamespaceURI() {
- return getDefining().getTargetNamespaceURI();
- }
-
- public QName getWSDLElementName() {
- return getElementName();
- }
-
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
- }
-
- public Iterable<TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- public TWSDLExtensible getParent() {
- return parent;
- }
-
- private ExtensibilityHelper _helper;
- private Documentation _documentation;
- private QName _portType;
- private List _operations;
-
- public void setParent(TWSDLExtensible parent) {
- this.parent = parent;
- }
-
- private TWSDLExtensible parent;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingFault.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingFault.java
deleted file mode 100644
index e48823e2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingFault.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wsdl.framework.EntityAction;
-import com.sun.tools.internal.ws.wsdl.framework.ExtensibilityHelper;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * Entity corresponding to the "fault" child element of a binding operation.
- *
- * @author WS Development Team
- */
-public class BindingFault extends Entity implements TWSDLExtensible {
-
- public BindingFault(Locator locator) {
- super(locator);
- _helper = new ExtensibilityHelper();
- }
-
- public String getName() {
- return _name;
- }
-
- public void setName(String name) {
- _name = name;
- }
-
- public QName getElementName() {
- return WSDLConstants.QNAME_FAULT;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- public String getNameValue() {
- return getName();
- }
-
- public String getNamespaceURI() {
- return getParent().getNamespaceURI();
- }
-
- public QName getWSDLElementName() {
- return getElementName();
- }
-
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
- }
-
- public Iterable<TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- public TWSDLExtensible getParent() {
- return parent;
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- _helper.withAllSubEntitiesDo(action);
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
- _helper.accept(visitor);
- visitor.postVisit(this);
- }
-
- public void validateThis() {
- if (_name == null) {
- failValidation("validation.missingRequiredAttribute", "name");
- }
- }
-
- private ExtensibilityHelper _helper;
- private Documentation _documentation;
- private String _name;
-
- public void setParent(TWSDLExtensible parent) {
- this.parent = parent;
- }
-
- private TWSDLExtensible parent;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingInput.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingInput.java
deleted file mode 100644
index 10ff4659..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingInput.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wsdl.framework.EntityAction;
-import com.sun.tools.internal.ws.wsdl.framework.ExtensibilityHelper;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * Entity corresponding to the "input" child element of a binding operation.
- *
- * @author WS Development Team
- */
-public class BindingInput extends Entity implements TWSDLExtensible {
-
- public BindingInput(Locator locator) {
- super(locator);
- _helper = new ExtensibilityHelper();
- }
-
- public String getName() {
- return _name;
- }
-
- public void setName(String name) {
- _name = name;
- }
-
- public QName getElementName() {
- return WSDLConstants.QNAME_INPUT;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- public String getNameValue() {
- return getName();
- }
-
- public String getNamespaceURI() {
- return getParent().getNamespaceURI();
- }
-
- public QName getWSDLElementName() {
- return getElementName();
- }
-
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
- }
-
- public Iterable<TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- public TWSDLExtensible getParent() {
- return parent;
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- _helper.withAllSubEntitiesDo(action);
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
- _helper.accept(visitor);
- visitor.postVisit(this);
- }
-
- public void validateThis() {
- }
-
- private ExtensibilityHelper _helper;
- private Documentation _documentation;
- private String _name;
-
- public void setParent(TWSDLExtensible parent) {
- this.parent = parent;
- }
-
- private TWSDLExtensible parent;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOperation.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOperation.java
deleted file mode 100644
index 83118458..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOperation.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wsdl.framework.EntityAction;
-import com.sun.tools.internal.ws.wsdl.framework.ExtensibilityHelper;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Entity corresponding to the "operation" child element of a WSDL "binding" element.
- *
- * @author WS Development Team
- */
-public class BindingOperation extends Entity implements TWSDLExtensible {
-
- public BindingOperation(Locator locator) {
- super(locator);
- _faults = new ArrayList<BindingFault>();
- _helper = new ExtensibilityHelper();
- }
-
- public String getName() {
- return _name;
- }
-
- public void setName(String name) {
- _name = name;
- }
-
- public String getUniqueKey() {
- if (_uniqueKey == null) {
- StringBuilder sb = new StringBuilder();
- sb.append(_name);
- sb.append(' ');
- if (_input != null) {
- sb.append(_input.getName());
- } else {
- sb.append(_name);
- if (_style == OperationStyle.REQUEST_RESPONSE) {
- sb.append("Request");
- } else if (_style == OperationStyle.SOLICIT_RESPONSE) {
- sb.append("Response");
- }
- }
- sb.append(' ');
- if (_output != null) {
- sb.append(_output.getName());
- } else {
- sb.append(_name);
- if (_style == OperationStyle.SOLICIT_RESPONSE) {
- sb.append("Solicit");
- } else if (_style == OperationStyle.REQUEST_RESPONSE) {
- sb.append("Response");
- }
- }
- _uniqueKey = sb.toString();
- }
-
- return _uniqueKey;
- }
-
- public OperationStyle getStyle() {
- return _style;
- }
-
- public void setStyle(OperationStyle s) {
- _style = s;
- }
-
- public BindingInput getInput() {
- return _input;
- }
-
- public void setInput(BindingInput i) {
- _input = i;
- }
-
- public BindingOutput getOutput() {
- return _output;
- }
-
- public void setOutput(BindingOutput o) {
- _output = o;
- }
-
- public void addFault(BindingFault f) {
- _faults.add(f);
- }
-
- public Iterable<BindingFault> faults() {
- return _faults;
- }
-
- @Override
- public QName getElementName() {
- return WSDLConstants.QNAME_OPERATION;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- @Override
- public String getNameValue() {
- return getName();
- }
-
- @Override
- public String getNamespaceURI() {
- return (parent == null) ? null : parent.getNamespaceURI();
- }
-
- @Override
- public QName getWSDLElementName() {
- return getElementName();
- }
-
- @Override
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
- }
-
- @Override
- public Iterable<TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- @Override
- public TWSDLExtensible getParent() {
- return parent;
- }
-
- @Override
- public void withAllSubEntitiesDo(EntityAction action) {
- if (_input != null) {
- action.perform(_input);
- }
- if (_output != null) {
- action.perform(_output);
- }
- for (BindingFault _fault : _faults) {
- action.perform(_fault);
- }
- _helper.withAllSubEntitiesDo(action);
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
- //bug fix: 4947340, extensions should be the first element
- _helper.accept(visitor);
- if (_input != null) {
- _input.accept(visitor);
- }
- if (_output != null) {
- _output.accept(visitor);
- }
- for (BindingFault _fault : _faults) {
- _fault.accept(visitor);
- }
- visitor.postVisit(this);
- }
-
- @Override
- public void validateThis() {
- if (_name == null) {
- failValidation("validation.missingRequiredAttribute", "name");
- }
- if (_style == null) {
- failValidation("validation.missingRequiredProperty", "style");
- }
-
- // verify operation style
- if (_style == OperationStyle.ONE_WAY) {
- if (_input == null) {
- failValidation("validation.missingRequiredSubEntity", "input");
- }
- if (_output != null) {
- failValidation("validation.invalidSubEntity", "output");
- }
- if (_faults != null && !_faults.isEmpty()) {
- failValidation("validation.invalidSubEntity", "fault");
- }
- }
- }
-
- private ExtensibilityHelper _helper;
- private Documentation _documentation;
- private String _name;
- private BindingInput _input;
- private BindingOutput _output;
- private List<BindingFault> _faults;
- private OperationStyle _style;
- private String _uniqueKey;
-
- public void setParent(TWSDLExtensible parent) {
- this.parent = parent;
- }
-
- private TWSDLExtensible parent;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOutput.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOutput.java
deleted file mode 100644
index 06672389..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOutput.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wsdl.framework.EntityAction;
-import com.sun.tools.internal.ws.wsdl.framework.ExtensibilityHelper;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * Entity corresponding to the "output" child element of a binding operation.
- *
- * @author WS Development Team
- */
-public class BindingOutput extends Entity implements TWSDLExtensible {
-
- public BindingOutput(Locator locator) {
- super(locator);
- _helper = new ExtensibilityHelper();
- }
-
- public String getName() {
- return _name;
- }
-
- public void setName(String name) {
- _name = name;
- }
-
- public QName getElementName() {
- return WSDLConstants.QNAME_OUTPUT;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- public String getNameValue() {
- return getName();
- }
-
- public String getNamespaceURI() {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public QName getWSDLElementName() {
- return getElementName();
- }
-
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
- }
-
- public Iterable<TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- public TWSDLExtensible getParent() {
- return parent;
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- _helper.withAllSubEntitiesDo(action);
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
- _helper.accept(visitor);
- visitor.postVisit(this);
- }
-
- public void validateThis() {
- }
-
-
- public void setParent(TWSDLExtensible parent) {
- this.parent = parent;
- }
-
- private TWSDLExtensible parent;
- private ExtensibilityHelper _helper;
- private Documentation _documentation;
- private String _name;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Definitions.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Definitions.java
deleted file mode 100644
index 8eb3096a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Definitions.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wsdl.framework.*;
-
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.*;
-
-/**
- * Entity corresponding to the "definitions" WSDL element.
- *
- * @author WS Development Team
- */
-public class Definitions extends Entity implements Defining, TWSDLExtensible {
-
- public Definitions(AbstractDocument document, Locator locator) {
- super(locator);
- _document = document;
- _bindings = new ArrayList();
- _imports = new ArrayList();
- _messages = new ArrayList();
- _portTypes = new ArrayList();
- _services = new ArrayList();
- _importedNamespaces = new HashSet();
- _helper = new ExtensibilityHelper();
- }
-
- public String getName() {
- return _name;
- }
-
- public void setName(String s) {
- _name = s;
- }
-
- public String getTargetNamespaceURI() {
- return _targetNsURI;
- }
-
- public void setTargetNamespaceURI(String s) {
- _targetNsURI = s;
- }
-
- public void setTypes(Types t) {
- _types = t;
- }
-
- public Types getTypes() {
- return _types;
- }
-
- public void add(Message m) {
- _document.define(m);
- _messages.add(m);
- }
-
- public void add(PortType p) {
- _document.define(p);
- _portTypes.add(p);
- }
-
- public void add(Binding b) {
- _document.define(b);
- _bindings.add(b);
- }
-
- public void add(Service s) {
- _document.define(s);
- _services.add(s);
- }
-
- public void addServiceOveride(Service s) {
- _services.add(s);
- }
-
- public void add(Import i) {
- _imports.add(i);
- _importedNamespaces.add(i.getNamespace());
- }
-
- public Iterator imports() {
- return _imports.iterator();
- }
-
- public Iterator messages() {
- return _messages.iterator();
- }
-
- public Iterator portTypes() {
- return _portTypes.iterator();
- }
-
- public Iterator bindings() {
- return _bindings.iterator();
- }
-
- public Iterator<Service> services() {
- return _services.iterator();
- }
-
- public String getNameValue() {
- return getName();
- }
-
- public String getNamespaceURI() {
- return getTargetNamespaceURI();
- }
-
- public QName getWSDLElementName() {
- return WSDLConstants.QNAME_DEFINITIONS;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
- }
-
- public Iterable<TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- /**
- * wsdl:definition is the root hence no parent so return null.
- */
- public TWSDLExtensible getParent() {
- return null;
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- if (_types != null) {
- action.perform(_types);
- }
- for (Iterator iter = _messages.iterator(); iter.hasNext();) {
- action.perform((Entity) iter.next());
- }
- for (Iterator iter = _portTypes.iterator(); iter.hasNext();) {
- action.perform((Entity) iter.next());
- }
- for (Iterator iter = _bindings.iterator(); iter.hasNext();) {
- action.perform((Entity) iter.next());
- }
- for (Iterator iter = _services.iterator(); iter.hasNext();) {
- action.perform((Entity) iter.next());
- }
- for (Iterator iter = _imports.iterator(); iter.hasNext();) {
- action.perform((Entity) iter.next());
- }
- _helper.withAllSubEntitiesDo(action);
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
-
- for (Iterator iter = _imports.iterator(); iter.hasNext();) {
- ((Import) iter.next()).accept(visitor);
- }
-
- if (_types != null) {
- _types.accept(visitor);
- }
-
- for (Iterator iter = _messages.iterator(); iter.hasNext();) {
- ((Message) iter.next()).accept(visitor);
- }
- for (Iterator iter = _portTypes.iterator(); iter.hasNext();) {
- ((PortType) iter.next()).accept(visitor);
- }
- for (Iterator iter = _bindings.iterator(); iter.hasNext();) {
- ((Binding) iter.next()).accept(visitor);
- }
- for (Iterator iter = _services.iterator(); iter.hasNext();) {
- ((Service) iter.next()).accept(visitor);
- }
-
- _helper.accept(visitor);
- visitor.postVisit(this);
- }
-
- public void validateThis() {
- }
-
- public Map resolveBindings() {
- return _document.getMap(Kinds.BINDING);
- }
-
- private AbstractDocument _document;
- private ExtensibilityHelper _helper;
- private Documentation _documentation;
- private String _name;
- private String _targetNsURI;
- private Types _types;
- private List _messages;
- private List _portTypes;
- private List _bindings;
- private List<Service> _services;
- private List _imports;
- private Set _importedNamespaces;
-
- public QName getElementName() {
- return getWSDLElementName();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Documentation.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Documentation.java
deleted file mode 100644
index e53f0069..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Documentation.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-/**
- * Entity corresponding to the "documentation" WSDL element.
- *
- * @author WS Development Team
- */
-public class Documentation {
-
- public Documentation(String s) {
- content = s;
- }
-
- public String getContent() {
- return content;
- }
-
- public void setContent(String s) {
- content = s;
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.visit(this);
- }
-
- private String content;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Fault.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Fault.java
deleted file mode 100644
index be958bca..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Fault.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wsdl.framework.*;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * Entity corresponding to the "fault" child element of a port type operation.
- *
- * @author WS Development Team
- */
-public class Fault extends Entity implements TWSDLExtensible {
-
- public Fault(Locator locator) {
- super(locator);
- _helper = new ExtensibilityHelper();
- }
-
- public String getName() {
- return _name;
- }
-
- public void setName(String name) {
- _name = name;
- }
-
- public QName getMessage() {
- return _message;
- }
-
- public void setMessage(QName n) {
- _message = n;
- }
-
- public Message resolveMessage(AbstractDocument document) {
- return (Message) document.find(Kinds.MESSAGE, _message);
- }
-
- @Override
- public QName getElementName() {
- return WSDLConstants.QNAME_FAULT;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- @Override
- public void withAllQNamesDo(QNameAction action) {
- if (_message != null) {
- action.perform(_message);
- }
- }
-
- @Override
- public void withAllEntityReferencesDo(EntityReferenceAction action) {
- super.withAllEntityReferencesDo(action);
- if (_message != null) {
- action.perform(Kinds.MESSAGE, _message);
- }
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
- visitor.postVisit(this);
- }
-
- @Override
- public void validateThis() {
- if (_name == null) {
- failValidation("validation.missingRequiredAttribute", "name");
- }
- if (_message == null) {
- failValidation("validation.missingRequiredAttribute", "message");
- }
- }
-
- private Documentation _documentation;
- private String _name;
- private QName _message;
- private String _action;
- private ExtensibilityHelper _helper;
-
- @Override
- public String getNameValue() {
- return getName();
- }
-
- @Override
- public String getNamespaceURI() {
- return (parent == null) ? null : parent.getNamespaceURI();
- }
-
- @Override
- public QName getWSDLElementName() {
- return getElementName();
- }
-
- /* (non-Javadoc)
- * @see TWSDLExtensible#addExtension(ExtensionImpl)
- */
- @Override
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
-
- }
-
- /* (non-Javadoc)
- * @see TWSDLExtensible#extensions()
- */
- @Override
- public Iterable<TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- @Override
- public TWSDLExtensible getParent() {
- return parent;
- }
-
-
- public void setParent(TWSDLExtensible parent) {
- this.parent = parent;
- }
-
- private TWSDLExtensible parent;
-
- public String getAction() {
- return _action;
- }
-
- public void setAction(String _action) {
- this._action = _action;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Import.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Import.java
deleted file mode 100644
index 500305e6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Import.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * Entity corresponding to the "import" WSDL element.
- *
- * @author WS Development Team
- */
-public class Import extends Entity{
-
- public Import(Locator locator) {
- super(locator);
- }
-
- public String getNamespace() {
- return _namespace;
- }
-
- public void setNamespace(String s) {
- _namespace = s;
- }
-
- public String getLocation() {
- return _location;
- }
-
- public void setLocation(String s) {
- _location = s;
- }
-
- public QName getElementName() {
- return WSDLConstants.QNAME_IMPORT;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.visit(this);
- }
-
- public void validateThis() {
- if (_location == null) {
- failValidation("validation.missingRequiredAttribute", "location");
- }
- if (_namespace == null) {
- failValidation("validation.missingRequiredAttribute", "namespace");
- }
- }
-
- private Documentation _documentation;
- private String _location;
- private String _namespace;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Input.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Input.java
deleted file mode 100644
index 33d5b512..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Input.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wsdl.framework.*;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.AbortException;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * Entity corresponding to the "input" child element of a port type operation.
- *
- * @author WS Development Team
- */
-public class Input extends Entity implements TWSDLExtensible {
-
- public Input(Locator locator, ErrorReceiver errReceiver) {
- super(locator);
- this.errorReceiver = errReceiver;
- _helper = new ExtensibilityHelper();
- }
-
- public String getName() {
- return _name;
- }
-
- public void setName(String name) {
- _name = name;
- }
-
- public QName getMessage() {
- return _message;
- }
-
- public void setMessage(QName n) {
- _message = n;
- }
-
- public Message resolveMessage(AbstractDocument document) {
- return (Message) document.find(Kinds.MESSAGE, _message);
- }
-
- public QName getElementName() {
- return WSDLConstants.QNAME_INPUT;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- public void withAllQNamesDo(QNameAction action) {
- if (_message != null) {
- action.perform(_message);
- }
- }
-
- public void withAllEntityReferencesDo(EntityReferenceAction action) {
- super.withAllEntityReferencesDo(action);
- if (_message != null) {
- action.perform(Kinds.MESSAGE, _message);
- }
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
- visitor.postVisit(this);
- }
-
- public void validateThis() {
- if (_message == null) {
- errorReceiver.error(getLocator(), WsdlMessages.VALIDATION_MISSING_REQUIRED_ATTRIBUTE("name", "wsdl:message"));
- throw new AbortException();
- }
- }
-
- private Documentation _documentation;
- private String _name;
- private QName _message;
- private String _action;
- private ExtensibilityHelper _helper;
- private TWSDLExtensible parent;
-
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
- }
-
- public QName getWSDLElementName() {
- return getElementName();
- }
-
- public TWSDLExtensible getParent() {
- return parent;
- }
-
- public void setParent(TWSDLExtensible parent) {
- this.parent = parent;
- }
-
- public String getNamespaceURI() {
- return getElementName().getNamespaceURI();
- }
-
- public String getNameValue() {
- return null;
- }
-
- public Iterable<? extends TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- public String getAction() {
- return _action;
- }
-
- public void setAction(String _action) {
- this._action = _action;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Kinds.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Kinds.java
deleted file mode 100644
index 4055c262..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Kinds.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.wsdl.framework.Kind;
-
-/**
- * Enumeration of the kind of entities that can be defined in a WSDL "definitions" element.
- *
- * @author WS Development Team
- */
-public class Kinds {
- public static final Kind BINDING = new Kind("wsdl:binding");
- public static final Kind MESSAGE = new Kind("wsdl:message");
- public static final Kind PORT = new Kind("wsdl:port");
- public static final Kind PORT_TYPE = new Kind("wsdl:portType");
- public static final Kind SERVICE = new Kind("wsdl:service");
-
- private Kinds() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Message.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Message.java
deleted file mode 100644
index 193b80c3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Message.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.wsdl.framework.*;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.AbortException;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.*;
-
-/**
- * Entity corresponding to the "message" WSDL element.
- *
- * @author WS Development Team
- */
-public class Message extends GlobalEntity {
-
- public Message(Defining defining, Locator locator, ErrorReceiver errReceiver) {
- super(defining, locator, errReceiver);
- _parts = new ArrayList<MessagePart>();
- _partsByName = new HashMap<String, MessagePart>();
- }
-
- public void add(MessagePart part) {
- if (_partsByName.get(part.getName()) != null){
- errorReceiver.error(part.getLocator(), WsdlMessages.VALIDATION_DUPLICATE_PART_NAME(getName(), part.getName()));
- throw new AbortException();
- }
-
- if(part.getDescriptor() != null && part.getDescriptorKind() != null) {
- _partsByName.put(part.getName(), part);
- _parts.add(part);
- } else
- errorReceiver.warning(part.getLocator(), WsdlMessages.PARSING_ELEMENT_OR_TYPE_REQUIRED(part.getName()));
- }
-
- public Iterator<MessagePart> parts() {
- return _parts.iterator();
- }
-
- public List<MessagePart> getParts(){
- return _parts;
- }
-
- public MessagePart getPart(String name) {
- return _partsByName.get(name);
- }
-
- public int numParts() {
- return _parts.size();
- }
-
- public Kind getKind() {
- return Kinds.MESSAGE;
- }
-
- public QName getElementName() {
- return WSDLConstants.QNAME_MESSAGE;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- super.withAllSubEntitiesDo(action);
-
- for (Iterator iter = _parts.iterator(); iter.hasNext();) {
- action.perform((Entity) iter.next());
- }
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
- for (Iterator<MessagePart> iter = _parts.iterator(); iter.hasNext();) {
- iter.next().accept(visitor);
- }
- visitor.postVisit(this);
- }
-
- public void validateThis() {
- if (getName() == null) {
- errorReceiver.error(getLocator(), WsdlMessages.VALIDATION_MISSING_REQUIRED_ATTRIBUTE("name", "wsdl:message"));
- throw new AbortException();
- }
- }
-
- private Documentation _documentation;
- private List<MessagePart> _parts;
- private Map<String, MessagePart> _partsByName;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/MessagePart.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/MessagePart.java
deleted file mode 100644
index bb575465..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/MessagePart.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wsdl.framework.EntityReferenceAction;
-import com.sun.tools.internal.ws.wsdl.framework.Kind;
-import com.sun.tools.internal.ws.wsdl.framework.QNameAction;
-import org.xml.sax.Locator;
-
-import javax.jws.WebParam.Mode;
-import javax.xml.namespace.QName;
-
-/**
- * Entity corresponding to a WSDL message part.
- *
- * @author WS Development Team
- */
-public class MessagePart extends Entity {
-
- public static final int SOAP_BODY_BINDING = 1;
- public static final int SOAP_HEADER_BINDING = 2;
- public static final int SOAP_HEADERFAULT_BINDING = 3;
- public static final int SOAP_FAULT_BINDING = 4;
- public static final int WSDL_MIME_BINDING = 5;
- public static final int PART_NOT_BOUNDED = -1;
-
- public MessagePart(Locator locator) {
- super(locator);
- }
-
- public String getName() {
- return _name;
- }
-
- public void setName(String name) {
- _name = name;
- }
-
- public QName getDescriptor() {
- return _descriptor;
- }
-
- public void setDescriptor(QName n) {
- _descriptor = n;
- }
-
- public Kind getDescriptorKind() {
- return _descriptorKind;
- }
-
- public void setDescriptorKind(Kind k) {
- _descriptorKind = k;
- }
-
- public QName getElementName() {
- return WSDLConstants.QNAME_PART;
- }
-
- public int getBindingExtensibilityElementKind(){
- return _bindingKind;
- }
-
- public void setBindingExtensibilityElementKind(int kind) {
- _bindingKind = kind;
- }
-
- public void withAllQNamesDo(QNameAction action) {
- if (_descriptor != null) {
- action.perform(_descriptor);
- }
- }
-
- public void withAllEntityReferencesDo(EntityReferenceAction action) {
- super.withAllEntityReferencesDo(action);
- if (_descriptor != null && _descriptorKind != null) {
- action.perform(_descriptorKind, _descriptor);
- }
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.visit(this);
- }
-
- public void validateThis() {
- if(_descriptor != null && _descriptor.getLocalPart().equals("")){
- failValidation("validation.invalidElement", _descriptor.toString());
- }
- }
-
- public void setMode(Mode mode){
- this.mode = mode;
- }
-
- public Mode getMode(){
- return mode;
- }
-
- public boolean isINOUT(){
- if(mode!=null)
- return (mode == Mode.INOUT);
- return false;
- }
-
- public boolean isIN(){
- if(mode!=null)
- return (mode == Mode.IN);
- return false;
- }
-
- public boolean isOUT(){
- if(mode!=null)
- return (mode == Mode.OUT);
- return false;
- }
-
- public void setReturn(boolean ret){
- isRet=ret;
- }
-
- public boolean isReturn(){
- return isRet;
- }
-
-
- private boolean isRet;
- private String _name;
- private QName _descriptor;
- private Kind _descriptorKind;
- private int _bindingKind;
-
- private Mode mode;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Operation.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Operation.java
deleted file mode 100644
index cc2fdeb8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Operation.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLOperation;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wsdl.framework.EntityAction;
-import com.sun.tools.internal.ws.wsdl.framework.ExtensibilityHelper;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.*;
-
-/**
- * Entity corresponding to the "operation" child element of a "portType" WSDL element.
- *
- * @author WS Development Team
- */
-public class Operation extends Entity implements TWSDLOperation {
-
- public Operation(Locator locator) {
- super(locator);
- _faults = new ArrayList<Fault>();
- _helper = new ExtensibilityHelper();
- }
-
- public String getName() {
- return _name;
- }
-
- public void setName(String name) {
- _name = name;
- }
-
- public String getUniqueKey() {
- if (_uniqueKey == null) {
- StringBuffer sb = new StringBuffer();
- sb.append(_name);
- sb.append(' ');
- if (_input != null) {
- sb.append(_input.getName());
- } else {
- sb.append(_name);
- if (_style == OperationStyle.REQUEST_RESPONSE) {
- sb.append("Request");
- } else if (_style == OperationStyle.SOLICIT_RESPONSE) {
- sb.append("Response");
- }
- }
- sb.append(' ');
- if (_output != null) {
- sb.append(_output.getName());
- } else {
- sb.append(_name);
- if (_style == OperationStyle.SOLICIT_RESPONSE) {
- sb.append("Solicit");
- } else if (_style == OperationStyle.REQUEST_RESPONSE) {
- sb.append("Response");
- }
- }
- _uniqueKey = sb.toString();
- }
-
- return _uniqueKey;
- }
-
- public OperationStyle getStyle() {
- return _style;
- }
-
- public void setStyle(OperationStyle s) {
- _style = s;
- }
-
- public Input getInput() {
- return _input;
- }
-
- public void setInput(Input i) {
- _input = i;
- }
-
- public Output getOutput() {
- return _output;
- }
-
- public void setOutput(Output o) {
- _output = o;
- }
-
- public void addFault(Fault f) {
- _faults.add(f);
- }
-
- public Iterable<Fault> faults() {
- return _faults;
- }
-
- public String getParameterOrder() {
- return _parameterOrder;
- }
-
- public void setParameterOrder(String s) {
- _parameterOrder = s;
- }
-
- public QName getElementName() {
- return WSDLConstants.QNAME_OPERATION;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- super.withAllSubEntitiesDo(action);
-
- if (_input != null) {
- action.perform(_input);
- }
- if (_output != null) {
- action.perform(_output);
- }
- for (Fault _fault : _faults) {
- action.perform(_fault);
- }
- _helper.withAllSubEntitiesDo(action);
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
- if (_input != null) {
- _input.accept(visitor);
- }
- if (_output != null) {
- _output.accept(visitor);
- }
- for (Fault _fault : _faults) {
- _fault.accept(visitor);
- }
- visitor.postVisit(this);
- }
-
- public void validateThis() {
- if (_name == null) {
- failValidation("validation.missingRequiredAttribute", "name");
- }
- if (_style == null) {
- failValidation("validation.missingRequiredProperty", "style");
- }
-
- // verify operation style
- if (_style == OperationStyle.ONE_WAY) {
- if (_input == null) {
- failValidation("validation.missingRequiredSubEntity", "input");
- }
- if (_output != null) {
- failValidation("validation.invalidSubEntity", "output");
- }
- if (_faults != null && _faults.size() != 0) {
- failValidation("validation.invalidSubEntity", "fault");
- }
- } else if (_style == OperationStyle.NOTIFICATION) {
- if (_parameterOrder != null) {
- failValidation("validation.invalidAttribute", "parameterOrder");
- }
- }
- }
-
- public String getNameValue() {
- return getName();
- }
-
- public String getNamespaceURI() {
- return parent.getNamespaceURI();
- }
-
- public QName getWSDLElementName() {
- return getElementName();
- }
-
- /* (non-Javadoc)
- * @see TWSDLExtensible#addExtension(ExtensionImpl)
- */
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
-
- }
-
- /* (non-Javadoc)
- * @see TWSDLExtensible#extensions()
- */
- public Iterable<? extends TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- public TWSDLExtensible getParent() {
- return parent;
- }
-
- public void setParent(TWSDLExtensible parent) {
- this.parent = parent;
- }
-
- public Map<String, JClass> getFaults() {
- return unmodifiableFaultClassMap;
- }
-
- public void putFault(String faultName, JClass exception){
- faultClassMap.put(faultName, exception);
- }
-
- private TWSDLExtensible parent;
- private Documentation _documentation;
- private String _name;
- private Input _input;
- private Output _output;
- private List<Fault> _faults;
- private OperationStyle _style;
- private String _parameterOrder;
- private String _uniqueKey;
- private ExtensibilityHelper _helper;
- private final Map<String, JClass> faultClassMap = new HashMap<String, JClass>();
- private final Map<String, JClass> unmodifiableFaultClassMap = Collections.unmodifiableMap(faultClassMap);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/OperationStyle.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/OperationStyle.java
deleted file mode 100644
index 9e7c62a2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/OperationStyle.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-/**
- * Enumeration of the supported WSDL operation styles.
- *
- * @author WS Development Team
- */
-public final class OperationStyle {
-
- public static final OperationStyle ONE_WAY = new OperationStyle();
- public static final OperationStyle REQUEST_RESPONSE = new OperationStyle();
- public static final OperationStyle SOLICIT_RESPONSE = new OperationStyle();
- public static final OperationStyle NOTIFICATION = new OperationStyle();
-
- private OperationStyle() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Output.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Output.java
deleted file mode 100644
index 93db8a4f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Output.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wsdl.framework.*;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.AbortException;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * Entity corresponding to the "output" child element of a port type operation.
- *
- * @author WS Development Team
- */
-public class Output extends Entity implements TWSDLExtensible {
-
- public Output(Locator locator, ErrorReceiver errReceiver) {
- super(locator);
- this.errorReceiver = errReceiver;
- }
-
- public String getName() {
- return _name;
- }
-
- public void setName(String name) {
- _name = name;
- }
-
- public QName getMessage() {
- return _message;
- }
-
- public void setMessage(QName n) {
- _message = n;
- }
-
- public Message resolveMessage(AbstractDocument document) {
- return (Message) document.find(Kinds.MESSAGE, _message);
- }
-
- public QName getElementName() {
- return WSDLConstants.QNAME_OUTPUT;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- public void withAllQNamesDo(QNameAction action) {
- if (_message != null) {
- action.perform(_message);
- }
- }
-
- public void withAllEntityReferencesDo(EntityReferenceAction action) {
- super.withAllEntityReferencesDo(action);
- if (_message != null) {
- action.perform(Kinds.MESSAGE, _message);
- }
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
- visitor.postVisit(this);
- }
-
- public void validateThis() {
- if (_message == null) {
- errorReceiver.error(getLocator(), WsdlMessages.VALIDATION_MISSING_REQUIRED_ATTRIBUTE("name", "wsdl:message"));
- throw new AbortException();
- }
- }
-
- private Documentation _documentation;
- private String _name;
- private QName _message;
- private String _action;
- private ExtensibilityHelper _helper;
- private TWSDLExtensible parent;
-
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
- }
-
- public QName getWSDLElementName() {
- return getElementName();
- }
-
- public TWSDLExtensible getParent() {
- return parent;
- }
-
- public void setParent(TWSDLExtensible parent) {
- this.parent = parent;
- }
-
- public String getNamespaceURI() {
- return getElementName().getNamespaceURI();
- }
-
- public String getNameValue() {
- return null;
- }
-
- public Iterable<? extends TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- public String getAction() {
- return _action;
- }
-
- public void setAction(String _action) {
- this._action = _action;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Port.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Port.java
deleted file mode 100644
index 654a5d8a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Port.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wsdl.framework.*;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import com.sun.tools.internal.ws.wscompile.AbortException;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * Entity corresponding to the "port" WSDL element.
- *
- * @author WS Development Team
- */
-public class Port extends GlobalEntity implements TWSDLExtensible {
-
- public Port(Defining defining, Locator locator, ErrorReceiver errReceiver) {
- super(defining, locator, errReceiver);
- _helper = new ExtensibilityHelper();
- }
-
- public Service getService() {
- return _service;
- }
-
- public void setService(Service s) {
- _service = s;
- }
-
- public QName getBinding() {
- return _binding;
- }
-
- public void setBinding(QName n) {
- _binding = n;
- }
-
- public Binding resolveBinding(AbstractDocument document) {
- try{
- return (Binding) document.find(Kinds.BINDING, _binding);
- } catch (NoSuchEntityException e) {
- errorReceiver.error(getLocator(), WsdlMessages.ENTITY_NOT_FOUND_BINDING(_binding, new QName(getNamespaceURI(), getName())));
- throw new AbortException();
- }
- }
-
- public Kind getKind() {
- return Kinds.PORT;
- }
-
- public String getNameValue() {
- return getName();
- }
-
- public String getNamespaceURI() {
- return getDefining().getTargetNamespaceURI();
- }
-
- public QName getWSDLElementName() {
- return WSDLConstants.QNAME_PORT;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- public void withAllQNamesDo(QNameAction action) {
- super.withAllQNamesDo(action);
-
- if (_binding != null) {
- action.perform(_binding);
- }
- }
-
- public void withAllEntityReferencesDo(EntityReferenceAction action) {
- super.withAllEntityReferencesDo(action);
- if (_binding != null) {
- action.perform(Kinds.BINDING, _binding);
- }
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
- _helper.accept(visitor);
- visitor.postVisit(this);
- }
-
- public void validateThis() {
- if (getName() == null) {
- failValidation("validation.missingRequiredAttribute", "name");
- }
- if (_binding == null) {
- failValidation("validation.missingRequiredAttribute", "binding");
- }
- }
-
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
- }
-
- public Iterable<TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- public TWSDLExtensible getParent() {
- return parent;
- }
-
- public void setParent(TWSDLExtensible parent) {
- this.parent = parent;
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- _helper.withAllSubEntitiesDo(action);
- }
-
- private ExtensibilityHelper _helper;
- private Documentation _documentation;
- private Service _service;
- private QName _binding;
-
- public QName getElementName() {
- return getWSDLElementName();
- }
-
- private TWSDLExtensible parent;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/PortType.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/PortType.java
deleted file mode 100644
index 0aeee5d2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/PortType.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wsdl.framework.*;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.*;
-
-/**
- * Entity corresponding to the "portType" WSDL element.
- *
- * @author WS Development Team
- */
-public class PortType extends GlobalEntity implements TWSDLExtensible {
-
- public PortType(Defining defining, Locator locator, ErrorReceiver errReceiver) {
- super(defining, locator, errReceiver);
- _operations = new ArrayList();
- _operationKeys = new HashSet();
- _helper = new ExtensibilityHelper();
- }
-
- public void add(Operation operation) {
- String key = operation.getUniqueKey();
- if (_operationKeys.contains(key))
- throw new ValidationException(
- "validation.ambiguousName",
- operation.getName());
- _operationKeys.add(key);
- _operations.add(operation);
- }
-
- public Iterator operations() {
- return _operations.iterator();
- }
-
- public Set getOperationsNamed(String s) {
- Set result = new HashSet();
- for (Iterator iter = _operations.iterator(); iter.hasNext();) {
- Operation operation = (Operation) iter.next();
- if (operation.getName().equals(s)) {
- result.add(operation);
- }
- }
- return result;
- }
-
- public Kind getKind() {
- return Kinds.PORT_TYPE;
- }
-
- public QName getElementName() {
- return WSDLConstants.QNAME_PORT_TYPE;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- super.withAllSubEntitiesDo(action);
-
- for (Iterator iter = _operations.iterator(); iter.hasNext();) {
- action.perform((Entity) iter.next());
- }
- _helper.withAllSubEntitiesDo(action);
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
- _helper.accept(visitor);
- for (Iterator iter = _operations.iterator(); iter.hasNext();) {
- ((Operation) iter.next()).accept(visitor);
- }
- visitor.postVisit(this);
- }
-
- public void validateThis() {
- if (getName() == null) {
- failValidation("validation.missingRequiredAttribute", "name");
- }
- }
-
- public String getNameValue() {
- return getName();
- }
-
- public String getNamespaceURI() {
- return getDefining().getTargetNamespaceURI();
- }
-
- public QName getWSDLElementName() {
- return getElementName();
- }
-
- /* (non-Javadoc)
- * @see TWSDLExtensible#addExtension(ExtensionImpl)
- */
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
-
- }
-
- /* (non-Javadoc)
- * @see TWSDLExtensible#extensions()
- */
- public Iterable<TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- public TWSDLExtensible getParent() {
- return parent;
- }
-
- public void setParent(TWSDLExtensible parent) {
- this.parent = parent;
- }
-
- private TWSDLExtensible parent;
- private Documentation _documentation;
- private List _operations;
- private Set _operationKeys;
- private ExtensibilityHelper _helper;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Service.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Service.java
deleted file mode 100644
index 8d98076b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Service.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wsdl.framework.*;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Entity corresponding to the "service" WSDL element.
- *
- * @author WS Development Team
- */
-public class Service extends GlobalEntity implements TWSDLExtensible {
-
- public Service(Defining defining, Locator locator, ErrorReceiver errReceiver) {
- super(defining, locator, errReceiver);
- _ports = new ArrayList();
- _helper = new ExtensibilityHelper();
- }
-
- public void add(Port port) {
- port.setService(this);
- _ports.add(port);
- }
-
- public Iterator <Port> ports() {
- return _ports.iterator();
- }
-
- public Kind getKind() {
- return Kinds.SERVICE;
- }
-
- public QName getElementName() {
- return WSDLConstants.QNAME_SERVICE;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- for (Iterator iter = _ports.iterator(); iter.hasNext();) {
- action.perform((Entity) iter.next());
- }
- _helper.withAllSubEntitiesDo(action);
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
- for (Iterator iter = _ports.iterator(); iter.hasNext();) {
- ((Port) iter.next()).accept(visitor);
- }
- _helper.accept(visitor);
- visitor.postVisit(this);
- }
-
- public void validateThis() {
- if (getName() == null) {
- failValidation("validation.missingRequiredAttribute", "name");
- }
- }
-
- public String getNameValue() {
- return getName();
- }
-
- public String getNamespaceURI() {
- return getDefining().getTargetNamespaceURI();
- }
-
- public QName getWSDLElementName() {
- return getElementName();
- }
-
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
- }
-
- public Iterable<TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- public TWSDLExtensible getParent() {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- private ExtensibilityHelper _helper;
- private Documentation _documentation;
- private List <Port> _ports;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Types.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Types.java
deleted file mode 100644
index e2248cee..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Types.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wsdl.framework.EntityAction;
-import com.sun.tools.internal.ws.wsdl.framework.ExtensibilityHelper;
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionVisitor;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * Entity corresponding to the "types" WSDL element.
- *
- * @author WS Development Team
- */
-public class Types extends Entity implements TWSDLExtensible {
-
- public Types(Locator locator) {
- super(locator);
- _helper = new ExtensibilityHelper();
- }
-
- @Override
- public QName getElementName() {
- return WSDLConstants.QNAME_TYPES;
- }
-
- public Documentation getDocumentation() {
- return _documentation;
- }
-
- public void setDocumentation(Documentation d) {
- _documentation = d;
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- visitor.preVisit(this);
- _helper.accept(visitor);
- visitor.postVisit(this);
- }
-
- @Override
- public void validateThis() {
- }
-
- /**
- * wsdl:type does not have any name attribute
- */
- @Override
- public String getNameValue() {
- return null;
- }
-
- @Override
- public String getNamespaceURI() {
- return (parent == null) ? null : parent.getNamespaceURI();
- }
-
- @Override
- public QName getWSDLElementName() {
- return getElementName();
- }
-
- @Override
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
- }
-
- @Override
- public Iterable<TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- @Override
- public TWSDLExtensible getParent() {
- return parent;
- }
-
- public void setParent(TWSDLExtensible parent) {
- this.parent = parent;
- }
-
- @Override
- public void withAllSubEntitiesDo(EntityAction action) {
- _helper.withAllSubEntitiesDo(action);
- }
-
- public void accept(ExtensionVisitor visitor) throws Exception {
- _helper.accept(visitor);
- }
-
- private TWSDLExtensible parent;
- private ExtensibilityHelper _helper;
- private Documentation _documentation;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLConstants.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLConstants.java
deleted file mode 100644
index 47df2305..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLConstants.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import javax.xml.namespace.QName;
-
-/**
- * Interface defining WSDL-related constants.
- *
- * @author WS Development Team
- */
-public interface WSDLConstants {
-
- // namespace URIs
- static final String NS_XMLNS = "http://www.w3.org/2000/xmlns/";
- static final String NS_WSDL = "http://schemas.xmlsoap.org/wsdl/";
-
- // QNames
- static final QName QNAME_BINDING = new QName(NS_WSDL, "binding");
- static final QName QNAME_DEFINITIONS = new QName(NS_WSDL, "definitions");
- static final QName QNAME_DOCUMENTATION = new QName(NS_WSDL, "documentation");
- static final QName QNAME_FAULT = new QName(NS_WSDL, "fault");
- static final QName QNAME_IMPORT = new QName(NS_WSDL, "import");
- static final QName QNAME_INPUT = new QName(NS_WSDL, "input");
- static final QName QNAME_MESSAGE = new QName(NS_WSDL, "message");
- static final QName QNAME_OPERATION = new QName(NS_WSDL, "operation");
- static final QName QNAME_OUTPUT = new QName(NS_WSDL, "output");
- static final QName QNAME_PART = new QName(NS_WSDL, "part");
- static final QName QNAME_PORT = new QName(NS_WSDL, "port");
- static final QName QNAME_PORT_TYPE = new QName(NS_WSDL, "portType");
- static final QName QNAME_SERVICE = new QName(NS_WSDL, "service");
- static final QName QNAME_TYPES = new QName(NS_WSDL, "types");
-
- static final QName QNAME_ATTR_ARRAY_TYPE = new QName(NS_WSDL, "arrayType");
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocument.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocument.java
deleted file mode 100644
index 31d0f755..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocument.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.wsdl.framework.*;
-import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-/**
- * A WSDL document.
- *
- * @author WS Development Team
- */
-public class WSDLDocument extends AbstractDocument{
-
- public WSDLDocument(MetadataFinder forest, ErrorReceiver errReceiver) {
- super(forest, errReceiver);
- }
-
- public Definitions getDefinitions() {
- return _definitions;
- }
-
- public void setDefinitions(Definitions d) {
- _definitions = d;
- }
-
- public QName[] getAllServiceQNames() {
-
- ArrayList serviceQNames = new ArrayList();
-
- for (Iterator iter = getDefinitions().services(); iter.hasNext();) {
- Service next = (Service) iter.next();
- String targetNamespace = next.getDefining().getTargetNamespaceURI();
- String localName = next.getName();
- QName serviceQName = new QName(targetNamespace, localName);
- serviceQNames.add(serviceQName);
- }
- return (QName[]) serviceQNames.toArray(new QName[serviceQNames.size()]);
- }
-
- public QName[] getAllPortQNames() {
- ArrayList portQNames = new ArrayList();
-
- for (Iterator iter = getDefinitions().services(); iter.hasNext();) {
- Service next = (Service) iter.next();
- //Iterator ports = next.ports();
- for (Iterator piter = next.ports(); piter.hasNext();) {
- // If it's a relative import
- Port pnext = (Port) piter.next();
- String targetNamespace =
- pnext.getDefining().getTargetNamespaceURI();
- String localName = pnext.getName();
- QName portQName = new QName(targetNamespace, localName);
- portQNames.add(portQName);
- }
- }
- return (QName[]) portQNames.toArray(new QName[portQNames.size()]);
- }
-
- public QName[] getPortQNames(String serviceNameLocalPart) {
-
- ArrayList portQNames = new ArrayList();
-
- for (Iterator iter = getDefinitions().services(); iter.hasNext();) {
- Service next = (Service) iter.next();
- if (next.getName().equals(serviceNameLocalPart)) {
- for (Iterator piter = next.ports(); piter.hasNext();) {
- Port pnext = (Port) piter.next();
- String targetNamespace =
- pnext.getDefining().getTargetNamespaceURI();
- String localName = pnext.getName();
- QName portQName = new QName(targetNamespace, localName);
- portQNames.add(portQName);
- }
- }
- }
- return (QName[]) portQNames.toArray(new QName[portQNames.size()]);
- }
-
- public void accept(WSDLDocumentVisitor visitor) throws Exception {
- _definitions.accept(visitor);
- }
-
- @Override
- public void validate(EntityReferenceValidator validator) {
- GloballyValidatingAction action =
- new GloballyValidatingAction(this, validator);
- withAllSubEntitiesDo(action);
- if (action.getException() != null) {
- throw action.getException();
- }
- }
-
- @Override
- protected Entity getRoot() {
- return _definitions;
- }
-
- private Definitions _definitions;
-
- private static class GloballyValidatingAction implements EntityAction, EntityReferenceAction {
- public GloballyValidatingAction(
- AbstractDocument document,
- EntityReferenceValidator validator) {
- _document = document;
- _validator = validator;
- }
-
- @Override
- public void perform(Entity entity) {
- try {
- entity.validateThis();
- entity.withAllEntityReferencesDo(this);
- entity.withAllSubEntitiesDo(this);
- } catch (ValidationException e) {
- if (_exception == null) {
- _exception = e;
- }
- }
- }
-
- @Override
- public void perform(Kind kind, QName name) {
- try {
- _document.find(kind, name);
- } catch (NoSuchEntityException e) {
- // failed to resolve, check with the validator
- if (_exception == null) {
- if (_validator == null
- || !_validator.isValid(kind, name)) {
- _exception = e;
- }
- }
- }
- }
-
- public ValidationException getException() {
- return _exception;
- }
-
- private ValidationException _exception;
- private AbstractDocument _document;
- private EntityReferenceValidator _validator;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitor.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitor.java
deleted file mode 100644
index fa7c4ab7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitor.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionVisitor;
-
-/**
- * A visitor for WSDL documents.
- *
- * @author WS Development Team
- */
-public interface WSDLDocumentVisitor extends ExtensionVisitor {
-
- public void preVisit(Definitions definitions) throws Exception;
- public void postVisit(Definitions definitions) throws Exception;
- public void visit(Import i) throws Exception;
- public void preVisit(Types types) throws Exception;
- public void postVisit(Types types) throws Exception;
- public void preVisit(Message message) throws Exception;
- public void postVisit(Message message) throws Exception;
- public void visit(MessagePart part) throws Exception;
- public void preVisit(PortType portType) throws Exception;
- public void postVisit(PortType portType) throws Exception;
- public void preVisit(Operation operation) throws Exception;
- public void postVisit(Operation operation) throws Exception;
- public void preVisit(Input input) throws Exception;
- public void postVisit(Input input) throws Exception;
- public void preVisit(Output output) throws Exception;
- public void postVisit(Output output) throws Exception;
- public void preVisit(Fault fault) throws Exception;
- public void postVisit(Fault fault) throws Exception;
- public void preVisit(Binding binding) throws Exception;
- public void postVisit(Binding binding) throws Exception;
- public void preVisit(BindingOperation operation) throws Exception;
- public void postVisit(BindingOperation operation) throws Exception;
- public void preVisit(BindingInput input) throws Exception;
- public void postVisit(BindingInput input) throws Exception;
- public void preVisit(BindingOutput output) throws Exception;
- public void postVisit(BindingOutput output) throws Exception;
- public void preVisit(BindingFault fault) throws Exception;
- public void postVisit(BindingFault fault) throws Exception;
- public void preVisit(Service service) throws Exception;
- public void postVisit(Service service) throws Exception;
- public void preVisit(Port port) throws Exception;
- public void postVisit(Port port) throws Exception;
- public void visit(Documentation documentation) throws Exception;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitorBase.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitorBase.java
deleted file mode 100644
index 3205e6c4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitorBase.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionVisitorBase;
-
-
-/**
- *
- * @author WS Development Team
- */
-public class WSDLDocumentVisitorBase extends ExtensionVisitorBase {
- public WSDLDocumentVisitorBase() {
- }
-
- public void preVisit(Definitions definitions) throws Exception {
- }
- public void postVisit(Definitions definitions) throws Exception {
- }
- public void visit(Import i) throws Exception {
- }
- public void preVisit(Types types) throws Exception {
- }
- public void postVisit(Types types) throws Exception {
- }
- public void preVisit(Message message) throws Exception {
- }
- public void postVisit(Message message) throws Exception {
- }
- public void visit(MessagePart part) throws Exception {
- }
- public void preVisit(PortType portType) throws Exception {
- }
- public void postVisit(PortType portType) throws Exception {
- }
- public void preVisit(Operation operation) throws Exception {
- }
- public void postVisit(Operation operation) throws Exception {
- }
- public void preVisit(Input input) throws Exception {
- }
- public void postVisit(Input input) throws Exception {
- }
- public void preVisit(Output output) throws Exception {
- }
- public void postVisit(Output output) throws Exception {
- }
- public void preVisit(Fault fault) throws Exception {
- }
- public void postVisit(Fault fault) throws Exception {
- }
- public void preVisit(Binding binding) throws Exception {
- }
- public void postVisit(Binding binding) throws Exception {
- }
- public void preVisit(BindingOperation operation) throws Exception {
- }
- public void postVisit(BindingOperation operation) throws Exception {
- }
- public void preVisit(BindingInput input) throws Exception {
- }
- public void postVisit(BindingInput input) throws Exception {
- }
- public void preVisit(BindingOutput output) throws Exception {
- }
- public void postVisit(BindingOutput output) throws Exception {
- }
- public void preVisit(BindingFault fault) throws Exception {
- }
- public void postVisit(BindingFault fault) throws Exception {
- }
- public void preVisit(Service service) throws Exception {
- }
- public void postVisit(Service service) throws Exception {
- }
- public void preVisit(Port port) throws Exception {
- }
- public void postVisit(Port port) throws Exception {
- }
- public void visit(Documentation documentation) throws Exception {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPAddress.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPAddress.java
deleted file mode 100644
index a4c19570..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPAddress.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.http;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A HTTP address extension.
- *
- * @author WS Development Team
- */
-public class HTTPAddress extends ExtensionImpl {
-
- public HTTPAddress(Locator locator) {
- super(locator);
- }
-
- public QName getElementName() {
- return HTTPConstants.QNAME_ADDRESS;
- }
-
- public String getLocation() {
- return _location;
- }
-
- public void setLocation(String s) {
- _location = s;
- }
-
- public void validateThis() {
- if (_location == null) {
- failValidation("validation.missingRequiredAttribute", "location");
- }
- }
-
- private String _location;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPBinding.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPBinding.java
deleted file mode 100644
index e3bc77a1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPBinding.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.http;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A HTTP binding extension.
- *
- * @author WS Development Team
- */
-public class HTTPBinding extends ExtensionImpl {
-
- public HTTPBinding(Locator locator) {
- super(locator);
- }
-
- public QName getElementName() {
- return HTTPConstants.QNAME_BINDING;
- }
-
- public String getVerb() {
- return _verb;
- }
-
- public void setVerb(String s) {
- _verb = s;
- }
-
- public void validateThis() {
- if (_verb == null) {
- failValidation("validation.missingRequiredAttribute", "verb");
- }
- }
-
- private String _verb;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPConstants.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPConstants.java
deleted file mode 100644
index f56385b7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPConstants.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.http;
-
-import javax.xml.namespace.QName;
-
-/**
- * Interface defining HTTP-extension-related constants.
- *
- * @author WS Development Team
- */
-public interface HTTPConstants {
-
- // namespace URIs
- static final String NS_WSDL_HTTP = "http://schemas.xmlsoap.org/wsdl/http/";
-
- // QNames
- static final QName QNAME_ADDRESS = new QName(NS_WSDL_HTTP, "address");
- static final QName QNAME_BINDING = new QName(NS_WSDL_HTTP, "binding");
- static final QName QNAME_OPERATION = new QName(NS_WSDL_HTTP, "operation");
- static final QName QNAME_URL_ENCODED = new QName(NS_WSDL_HTTP, "urlEncoded");
- static final QName QNAME_URL_REPLACEMENT = new QName(NS_WSDL_HTTP, "urlReplacement");
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPOperation.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPOperation.java
deleted file mode 100644
index e431823b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPOperation.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.http;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A HTTP operation extension.
- *
- * @author WS Development Team
- */
-public class HTTPOperation extends ExtensionImpl {
-
- public HTTPOperation(Locator locator) {
- super(locator);
- }
-
- public QName getElementName() {
- return HTTPConstants.QNAME_OPERATION;
- }
-
- public String getLocation() {
- return _location;
- }
-
- public void setLocation(String s) {
- _location = s;
- }
-
- public void validateThis() {
- if (_location == null) {
- failValidation("validation.missingRequiredAttribute", "location");
- }
- }
-
- private String _location;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlEncoded.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlEncoded.java
deleted file mode 100644
index 1b5850f3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlEncoded.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.http;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A HTTP urlEncoded extension.
- *
- * @author WS Development Team
- */
-public class HTTPUrlEncoded extends ExtensionImpl {
-
- public HTTPUrlEncoded(Locator locator) {
- super(locator);
- }
-
- public QName getElementName() {
- return HTTPConstants.QNAME_URL_ENCODED;
- }
-
- public void validateThis() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlReplacement.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlReplacement.java
deleted file mode 100644
index da8e7173..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlReplacement.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.http;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A HTTP urlReplacement extension.
- *
- * @author WS Development Team
- */
-public class HTTPUrlReplacement extends ExtensionImpl {
-
- public HTTPUrlReplacement(Locator locator) {
- super(locator);
- }
-
- public QName getElementName() {
- return HTTPConstants.QNAME_URL_REPLACEMENT;
- }
-
- public void validateThis() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/CustomName.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/CustomName.java
deleted file mode 100644
index 88720f29..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/CustomName.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.jaxws;
-
-
-/**
- * @author Vivek Pandey
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class CustomName {
-
-
- /**
- *
- */
- public CustomName() {
- }
-
- /**
- *
- */
- public CustomName(String name, String javaDoc) {
- this.name = name;
- this.javaDoc = javaDoc;
- }
-
- /**
- * @return Returns the javaDoc.
- */
- public String getJavaDoc() {
- return javaDoc;
- }
- /**
- * @param javaDoc The javaDoc to set.
- */
- public void setJavaDoc(String javaDoc) {
- this.javaDoc = javaDoc;
- }
- /**
- * @return Returns the name.
- */
- public String getName() {
- return name;
- }
- /**
- * @param name The name to set.
- */
- public void setName(String name) {
- this.name = name;
- }
-
- private String javaDoc;
- private String name;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Exception.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Exception.java
deleted file mode 100644
index dc5f8fdc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Exception.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.jaxws;
-
-/**
- * @author Vivek Pandey
- *
- * class representing jaxws:exception
- *
- */
-public class Exception {
-
- public Exception(){}
-
- public Exception(CustomName name){
- this.className = name;
- }
-
- private CustomName className;
- /**
- * @return Returns the className.
- */
- public CustomName getClassName() {
- return className;
- }
- /**
- * @param className The className to set.
- */
- public void setClassName(CustomName className) {
- this.className = className;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBinding.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBinding.java
deleted file mode 100644
index df43b0f5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBinding.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.jaxws;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.*;
-
-
-/**
- * @author Vivek Pandey
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class JAXWSBinding extends ExtensionImpl {
-
- /**
- *
- */
- public JAXWSBinding(Locator locator){
- super(locator);
- jaxbBindings = new HashSet<Element>();
- // TODO Auto-generated constructor stub
- }
-
-
- /* (non-Javadoc)
- * @see Entity#validateThis()
- */
- public void validateThis(){
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see Elemental#getElementName()
- */
- public QName getElementName(){
- // TODO Auto-generated method stub
- return JAXWSBindingsConstants.JAXWS_BINDINGS;
- }
-
- public QName getWSDLElementName() {
- return getElementName();
- }
-
- /* (non-Javadoc)
- * @see TWSDLExtensible#addExtension(ExtensionImpl)
- */
- public void addExtension(ExtensionImpl e) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see TWSDLExtensible#extensions()
- */
- public Iterable<ExtensionImpl> extensions() {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-// /**
-// * @return Returns the enableAdditionalHeaderMapping.
-// */
-// public Boolean isEnableAdditionalHeaderMapping() {
-// return enableAdditionalHeaderMapping;
-// }
-// /**
-// * @param enableAdditionalHeaderMapping The enableAdditionalHeaderMapping to set.
-// */
-// public void setEnableAdditionalHeaderMapping(
-// Boolean enableAdditionalHeaderMapping) {
-// this.enableAdditionalHeaderMapping = enableAdditionalHeaderMapping;
-// }
- /**
- * @return Returns the enableAsyncMapping.
- */
- public Boolean isEnableAsyncMapping() {
- return enableAsyncMapping;
- }
- /**
- * @param enableAsyncMapping The enableAsyncMapping to set.
- */
- public void setEnableAsyncMapping(Boolean enableAsyncMapping) {
- this.enableAsyncMapping = enableAsyncMapping;
- }
- /**
- * @return Returns the enableMimeContentMapping.
- */
- public Boolean isEnableMimeContentMapping() {
- return enableMimeContentMapping;
- }
- /**
- * @param enableMimeContentMapping The enableMimeContentMapping to set.
- */
- public void setEnableMimeContentMapping(Boolean enableMimeContentMapping) {
- this.enableMimeContentMapping = enableMimeContentMapping;
- }
- /**
- * @return Returns the enableWrapperStyle.
- */
- public Boolean isEnableWrapperStyle() {
- return enableWrapperStyle;
- }
- /**
- * @param enableWrapperStyle The enableWrapperStyle to set.
- */
- public void setEnableWrapperStyle(Boolean enableWrapperStyle) {
- this.enableWrapperStyle = enableWrapperStyle;
- }
- /**
- * @return Returns the jaxwsPackage.
- */
- public CustomName getJaxwsPackage() {
- return jaxwsPackage;
- }
- /**
- * @param jaxwsPackage The jaxwsPackage to set.
- */
- public void setJaxwsPackage(CustomName jaxwsPackage) {
- this.jaxwsPackage = jaxwsPackage;
- }
- /**
- * @return Returns the node.
- */
- public String getNode() {
- return node;
- }
- /**
- * @param node The node to set.
- */
- public void setNode(String node) {
- this.node = node;
- }
- /**
- * @return Returns the version.
- */
- public String getVersion() {
- return version;
- }
- /**
- * @param version The version to set.
- */
- public void setVersion(String version) {
- this.version = version;
- }
-
- /**
- * @return Returns the wsdlLocation.
- */
- public String getWsdlLocation() {
- return wsdlLocation;
- }
-
- /**
- * @param wsdlLocation The wsdlLocation to set.
- */
- public void setWsdlLocation(String wsdlLocation) {
- this.wsdlLocation = wsdlLocation;
- }
-
- /**
- * @return Returns the wsdlNamespace.
- */
- public String getWsdlNamespace() {
- return wsdlNamespace;
- }
-
-
- /**
- * @param wsdlNamespace The wsdlNamespace to set.
- */
- public void setWsdlNamespace(String wsdlNamespace) {
- this.wsdlNamespace = wsdlNamespace;
- }
-
- /**
- * @return Returns the jaxbBindings.
- */
- public Set<Element> getJaxbBindings() {
- return jaxbBindings;
- }
-
- /**
- * @param jaxbBinding The jaxbBindings to set.
- */
- public void addJaxbBindings(Element jaxbBinding) {
- if(jaxbBindings == null)
- return;
- this.jaxbBindings.add(jaxbBinding);
- }
-
-
- /**
- * @return the isProvider.
- */
- public Boolean isProvider() {
- return isProvider;
- }
- /**
- * @param isProvider The isProvider to set.
- */
- public void setProvider(Boolean isProvider) {
- this.isProvider = isProvider;
- }
-
- /**
- * @return Returns the methodName.
- */
- public CustomName getMethodName() {
- return methodName;
- }
- /**
- * @param methodName The methodName to set.
- */
- public void setMethodName(CustomName methodName) {
- this.methodName = methodName;
- }
-
- /**
- * @return Returns the parameter.
- */
- public Iterator<Parameter> parameters() {
- return parameters.iterator();
- }
-
- /**
- * @param parameter The parameter to set.
- */
- public void addParameter(Parameter parameter) {
- if(parameters == null)
- parameters = new ArrayList<Parameter>();
- parameters.add(parameter);
- }
-
- public String getParameterName(String msgName, String wsdlPartName, QName element, boolean wrapperStyle){
- if(msgName == null || wsdlPartName == null || element == null || parameters == null)
- return null;
- for(Parameter param : parameters){
- if(param.getMessageName().equals(msgName) && param.getPart().equals(wsdlPartName)){
- if(wrapperStyle && (param.getElement() != null)){
- if(param.getElement().equals(element))
- return param.getName();
- }else if(!wrapperStyle){
- return param.getName();
- }
- }
- }
- return null;
- }
-
- /**
- * @return Returns the className.
- */
- public CustomName getClassName() {
- return className;
- }
- /**
- * @param className The className to set.
- */
- public void setClassName(CustomName className) {
- this.className = className;
- }
-
- private String wsdlNamespace;
- private String wsdlLocation;
- private String node;
- private String version;
-
- private CustomName jaxwsPackage;
- private List<Parameter> parameters;
- private Boolean enableWrapperStyle;
- private Boolean enableAsyncMapping;
-// private Boolean enableAdditionalHeaderMapping;
- private Boolean enableMimeContentMapping;
- private Boolean isProvider;
-
- private Set<Element> jaxbBindings;
-
- // portType className
- private CustomName className;
-
- //portType WSDLOperation
- private CustomName methodName;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBindingsConstants.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBindingsConstants.java
deleted file mode 100644
index 25e3b7c6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBindingsConstants.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.jaxws;
-
-import com.sun.tools.internal.ws.wsdl.parser.Constants;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author Vivek Pandey
- *
- */
-public interface JAXWSBindingsConstants {
-
- static final String NS_JAXWS_BINDINGS = "http://java.sun.com/xml/ns/jaxws";
- static final String NS_JAXB_BINDINGS = "http://java.sun.com/xml/ns/jaxb";
- static final String NS_XJC_BINDINGS = "http://java.sun.com/xml/ns/jaxb/xjc";
-
- /**
- * jaxws:bindings schema component
- *
- * <jaxws:bindings wsdlLocation="xs:anyURI"? node="xs:string"?
- * version="string"?> binding declarations...
- * </jaxws:bindings>
- *
- * wsdlLocation="xs:anyURI"? node="xs:string"? version="string"?> binding
- * declarations... </jaxws:bindings>
- *
- * <code>@wsdlLocation</code> A URI pointing to a WSDL file establishing the scope of the
- * contents of this binding declaration. It MUST NOT be
- * present if the binding declaration is used as an extension
- * inside a WSDL document or if there is an ancestor binding
- * declaration that contains this attribute.
- *
- * <code>@node</code> An XPath expression pointing to the element in the WSDL file in
- * scope that this binding declaration is attached to.
- *
- * <code>@version</code> A version identifier. It MAY only appear on jaxws:bindings
- * elements that don't have any jaxws:bindings ancestors (i.e. on
- * outermost binding declarations).
- */
- static final QName JAXWS_BINDINGS = new QName(NS_JAXWS_BINDINGS, "bindings");
- static final String WSDL_LOCATION_ATTR = "wsdlLocation";
- static final String NODE_ATTR = "node";
- static final String VERSION_ATTR = "version";
-
- /*
- * <jaxws:package name="xs:string">? <jaxws:javadoc>xs:string
- * </jaxws:javadoc> </jaxws:package>
- */
- static final QName PACKAGE = new QName(NS_JAXWS_BINDINGS, "package");
- static final String NAME_ATTR = "name";
- static final QName JAVADOC = new QName(NS_JAXWS_BINDINGS, "javadoc");
-
- /*
- * <jaxws:enableWrapperStyle>xs:boolean </jaxws:enableWrapperStyle>?
- */
- static final QName ENABLE_WRAPPER_STYLE = new QName(NS_JAXWS_BINDINGS, "enableWrapperStyle");
-
- /*
- * <jaxws:enableAsynchronousMapping>xs:boolean
- * </jaxws:enableAsynchronousMapping>?
- */
- static final QName ENABLE_ASYNC_MAPPING = new QName(NS_JAXWS_BINDINGS, "enableAsyncMapping");
-
- /*
- * <jaxws:enableAdditionalSOAPHeaderMapping>xs:boolean</jaxws:enableAdditionalSOAPHeaderMapping>?
- */
- static final QName ENABLE_ADDITIONAL_SOAPHEADER_MAPPING = new QName(NS_JAXWS_BINDINGS, "enableAdditionalSOAPHeaderMapping");
-
- /*
- * <jaxws:enableMIMEContent>xs:boolean</jaxws:enableMIMEContent>?
- */
- static final QName ENABLE_MIME_CONTENT = new QName(NS_JAXWS_BINDINGS, "enableMIMEContent");
-
- /*
- * <jaxwsc:provider>xs:boolean</jaxws:provider>?
- */
- static final QName PROVIDER = new QName(NS_JAXWS_BINDINGS, "provider");
-
- /*
- * PortType
- *
- * <jaxws:class name="xs:string">?
- * <jaxws:javadoc>xs:string</jaxws:javadoc>?
- * </jaxws:class>
- *
- * <jaxws:enableWrapperStyle>
- * xs:boolean
- * </jaxws:enableWrapperStyle>?
- *
- * <jaxws:enableAsynchronousMapping>
- * xs:boolean
- * </jaxws:enableAsynchronousMapping>?
- *
- */
-
- static final QName CLASS = new QName(NS_JAXWS_BINDINGS, "class");
-
- /*
- * PortType WSDLOperation
- *
- * <jaxws:method name="xs:string">?
- * <jaxws:javadoc>xs:string</jaxws:javadoc>?
- * </jaxws:method>
- *
- * <jaxws:enableWrapperStyle>
- * xs:boolean
- * </jaxws:enableWrapperStyle>?
- *
- * <jaxws:enableAsyncMapping>
- * xs:boolean
- * </jaxws:enableAsyncMapping>?
- *
- * <jaxws:parameter part="xs:string"
- * childElementName="xs:QName"?
- * name="xs:string"/>*
- */
-
-
-
- static final QName METHOD = new QName(NS_JAXWS_BINDINGS, "method");
- static final QName PARAMETER = new QName(NS_JAXWS_BINDINGS, "parameter");
- static final String PART_ATTR = "part";
- static final String ELEMENT_ATTR = "childElementName";
-
- /*
- * Binding
- *
- * <jaxws:enableAdditionalSOAPHeaderMapping>
- * xs:boolean
- * </jaxws:enableAdditionalSOAPHeaderMapping>?
- *
- * <jaxws:enableMIMEContent>
- * xs:boolean
- * </jaxws:enableMIMEContent>?
- */
-
- /*
- * WSDLBoundOperation
- *
- * <jaxws:enableAdditionalSOAPHeaderMapping>
- * xs:boolean
- * </jaxws:enableAdditionalSOAPHeaderMapping>?
- *
- * <jaxws:enableMIMEContent>
- * xs:boolean
- * </jaxws:enableMIMEContent>?
- *
- * <jaxws:parameter part="xs:string"
- * element="xs:QName"?
- * name="xs:string"/>*
- *
- * <jaxws:exception part="xs:string">*
- * <jaxws:class name="xs:string">?
- * <jaxws:javadoc>xs:string</jaxws:javadoc>?
- * </jaxws:class>
- * </jaxws:exception>
- */
-
- static final QName EXCEPTION = new QName(NS_JAXWS_BINDINGS, "exception");
-
-
- /*
- * jaxb:bindgs QName
- */
- static final QName JAXB_BINDINGS = new QName(NS_JAXB_BINDINGS, "bindings");
- static final String JAXB_BINDING_VERSION = "2.0";
- static final QName XSD_APPINFO = new QName(Constants.NS_XSD, "appinfo");
- static final QName XSD_ANNOTATION = new QName(Constants.NS_XSD, "annotation");
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Parameter.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Parameter.java
deleted file mode 100644
index 662c482f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Parameter.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.jaxws;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author Vivek Pandey
- *
- * class representing jaxws:parameter
- *
- */
-public class Parameter {
- private String part;
- private QName element;
- private String name;
- private String messageName;
-
- /**
- * @param part
- * @param element
- * @param name
- */
- public Parameter(String msgName, String part, QName element, String name) {
- this.part = part;
- this.element = element;
- this.name = name;
- this.messageName = msgName;
- }
-
- public String getMessageName() {
- return messageName;
- }
-
- public void setMessageName(String messageName) {
- this.messageName = messageName;
- }
-
- /**
- * @return Returns the element.
- */
- public QName getElement() {
- return element;
- }
-
- /**
- * @param element The element to set.
- */
- public void setElement(QName element) {
- this.element = element;
- }
-
- /**
- * @return Returns the name.
- */
- public String getName() {
- return name;
- }
-
- /**
- * @param name The name to set.
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * @return Returns the part.
- */
- public String getPart() {
- return part;
- }
-
- /**
- * @param part The part to set.
- */
- public void setPart(String part) {
- this.part = part;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEConstants.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEConstants.java
deleted file mode 100644
index 2a60bbe0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEConstants.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.mime;
-
-import javax.xml.namespace.QName;
-
-/**
- * Interface defining MIME-extension-related constants.
- *
- * @author WS Development Team
- */
-public interface MIMEConstants {
-
- // namespace URIs
- static final String NS_WSDL_MIME = "http://schemas.xmlsoap.org/wsdl/mime/";
-
- // QNames
- static final QName QNAME_CONTENT = new QName(NS_WSDL_MIME, "content");
- static final QName QNAME_MULTIPART_RELATED = new QName(NS_WSDL_MIME, "multipartRelated");
- static final QName QNAME_PART = new QName(NS_WSDL_MIME, "part");
- static final QName QNAME_MIME_XML = new QName(NS_WSDL_MIME, "mimeXml");
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEContent.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEContent.java
deleted file mode 100644
index 0716dc50..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEContent.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.mime;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A MIME content extension.
- *
- * @author WS Development Team
- */
-public class MIMEContent extends ExtensionImpl {
-
- public MIMEContent(Locator locator) {
- super(locator);
- }
-
- public QName getElementName() {
- return MIMEConstants.QNAME_CONTENT;
- }
-
- public String getPart() {
- return _part;
- }
-
- public void setPart(String s) {
- _part = s;
- }
-
- public String getType() {
- return _type;
- }
-
- public void setType(String s) {
- _type = s;
- }
-
- public void validateThis() {
- }
-
- private String _part;
- private String _type;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEMultipartRelated.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEMultipartRelated.java
deleted file mode 100644
index 618a2c0f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEMultipartRelated.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.mime;
-
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wsdl.framework.EntityAction;
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionVisitor;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * A MIME multipartRelated extension.
- *
- * @author WS Development Team
- */
-public class MIMEMultipartRelated extends ExtensionImpl {
-
- public MIMEMultipartRelated(Locator locator) {
- super(locator);
- _parts = new ArrayList<MIMEPart>();
- }
-
- public QName getElementName() {
- return MIMEConstants.QNAME_MULTIPART_RELATED;
- }
-
- public void add(MIMEPart part) {
- _parts.add(part);
- }
-
- public Iterable<MIMEPart> getParts() {
- return _parts;
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- super.withAllSubEntitiesDo(action);
-
- for (Iterator iter = _parts.iterator(); iter.hasNext();) {
- action.perform((Entity) iter.next());
- }
- }
-
- public void accept(ExtensionVisitor visitor) throws Exception {
- visitor.preVisit(this);
- visitor.postVisit(this);
- }
-
- public void validateThis() {
- }
-
- private List<MIMEPart> _parts;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEPart.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEPart.java
deleted file mode 100644
index 48e8d8c2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEPart.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.mime;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.wsdl.framework.EntityAction;
-import com.sun.tools.internal.ws.wsdl.framework.ExtensibilityHelper;
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A MIME part extension.
- *
- * @author WS Development Team
- */
-public class MIMEPart extends ExtensionImpl implements TWSDLExtensible {
-
- public MIMEPart(Locator locator) {
- super(locator);
- _helper = new ExtensibilityHelper();
- }
-
- public QName getElementName() {
- return MIMEConstants.QNAME_PART;
- }
-
- public String getName() {
- return _name;
- }
-
- public void setName(String s) {
- _name = s;
- }
-
- public String getNameValue() {
- return getName();
- }
-
- public String getNamespaceURI() {
- return getParent().getNamespaceURI();
- }
-
- public QName getWSDLElementName() {
- return getElementName();
- }
-
- public void addExtension(TWSDLExtension e) {
- _helper.addExtension(e);
- }
-
- public Iterable<TWSDLExtension> extensions() {
- return _helper.extensions();
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- _helper.withAllSubEntitiesDo(action);
- }
-
- public void validateThis() {
- }
-
- private String _name;
- private ExtensibilityHelper _helper;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEXml.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEXml.java
deleted file mode 100644
index 437cb68e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEXml.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.mime;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A MIME mimeXml extension.
- *
- * @author WS Development Team
- */
-public class MIMEXml extends ExtensionImpl {
-
- public MIMEXml(Locator locator) {
- super(locator);
- }
-
- public QName getElementName() {
- return MIMEConstants.QNAME_MIME_XML;
- }
-
- public String getPart() {
- return _part;
- }
-
- public void setPart(String s) {
- _part = s;
- }
-
- public void validateThis() {
- }
-
- private String _part;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaConstants.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaConstants.java
deleted file mode 100644
index 8aab2ae2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaConstants.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.schema;
-
-import javax.xml.namespace.QName;
-
-/**
- *
- * @author WS Development Team
- */
-public interface SchemaConstants {
-
- // namespace URIs
- static final String NS_XMLNS = "http://www.w3.org/2000/xmlns/";
- static final String NS_XSD = "http://www.w3.org/2001/XMLSchema";
- static final String NS_XSI = "http://www.w3.org/2001/XMLSchema-instance";
-
- // QNames
- static final QName QNAME_ALL = new QName(NS_XSD, "all");
- static final QName QNAME_ANNOTATION = new QName(NS_XSD, "annotation");
- static final QName QNAME_ANY = new QName(NS_XSD, "any");
- static final QName QNAME_ANY_ATTRIBUTE = new QName(NS_XSD, "anyAttribute");
- static final QName QNAME_ATTRIBUTE = new QName(NS_XSD, "attribute");
- static final QName QNAME_ATTRIBUTE_GROUP = new QName(NS_XSD, "attributeGroup");
- static final QName QNAME_CHOICE = new QName(NS_XSD, "choice");
- static final QName QNAME_COMPLEX_CONTENT = new QName(NS_XSD, "complexContent");
- static final QName QNAME_COMPLEX_TYPE = new QName(NS_XSD, "complexType");
- static final QName QNAME_ELEMENT = new QName(NS_XSD, "element");
- static final QName QNAME_ENUMERATION = new QName(NS_XSD, "enumeration");
- static final QName QNAME_EXTENSION = new QName(NS_XSD, "extension");
- static final QName QNAME_FIELD = new QName(NS_XSD, "field");
- static final QName QNAME_FRACTION_DIGITS = new QName(NS_XSD, "fractionDigits");
- static final QName QNAME_GROUP = new QName(NS_XSD, "group");
- static final QName QNAME_IMPORT = new QName(NS_XSD, "import");
- static final QName QNAME_INCLUDE = new QName(NS_XSD, "include");
- static final QName QNAME_KEY = new QName(NS_XSD, "key");
- static final QName QNAME_KEYREF = new QName(NS_XSD, "keyref");
- static final QName QNAME_LENGTH = new QName(NS_XSD, "length");
- static final QName QNAME_LIST = new QName(NS_XSD, "list");
- static final QName QNAME_MAX_EXCLUSIVE = new QName(NS_XSD, "maxExclusive");
- static final QName QNAME_MAX_INCLUSIVE = new QName(NS_XSD, "maxInclusive");
- static final QName QNAME_MAX_LENGTH = new QName(NS_XSD, "maxLength");
- static final QName QNAME_MIN_EXCLUSIVE = new QName(NS_XSD, "minExclusive");
- static final QName QNAME_MIN_INCLUSIVE = new QName(NS_XSD, "minInclusive");
- static final QName QNAME_MIN_LENGTH = new QName(NS_XSD, "minLength");
- static final QName QNAME_NOTATION = new QName(NS_XSD, "notation");
- static final QName QNAME_RESTRICTION = new QName(NS_XSD, "restriction");
- static final QName QNAME_PATTERN = new QName(NS_XSD, "pattern");
- static final QName QNAME_PRECISION = new QName(NS_XSD, "precision");
- static final QName QNAME_REDEFINE = new QName(NS_XSD, "redefine");
- static final QName QNAME_SCALE = new QName(NS_XSD, "scale");
- static final QName QNAME_SCHEMA = new QName(NS_XSD, "schema");
- static final QName QNAME_SELECTOR = new QName(NS_XSD, "selector");
- static final QName QNAME_SEQUENCE = new QName(NS_XSD, "sequence");
- static final QName QNAME_SIMPLE_CONTENT =
- new QName(NS_XSD, "simpleContent");
- static final QName QNAME_SIMPLE_TYPE = new QName(NS_XSD, "simpleType");
- static final QName QNAME_TOTAL_DIGITS = new QName(NS_XSD, "totalDigits");
- static final QName QNAME_UNIQUE = new QName(NS_XSD, "unique");
- static final QName QNAME_UNION = new QName(NS_XSD, "union");
- static final QName QNAME_WHITE_SPACE = new QName(NS_XSD, "whiteSpace");
-
- // QNames for built-in XSD types
- static final QName QNAME_TYPE_STRING = new QName(NS_XSD, "string");
- static final QName QNAME_TYPE_NORMALIZED_STRING = new QName(NS_XSD, "normalizedString");
- static final QName QNAME_TYPE_TOKEN = new QName(NS_XSD, "token");
- static final QName QNAME_TYPE_BYTE = new QName(NS_XSD, "byte");
- static final QName QNAME_TYPE_UNSIGNED_BYTE = new QName(NS_XSD, "unsignedByte");
- static final QName QNAME_TYPE_BASE64_BINARY = new QName(NS_XSD, "base64Binary");
- static final QName QNAME_TYPE_HEX_BINARY = new QName(NS_XSD, "hexBinary");
- static final QName QNAME_TYPE_INTEGER = new QName(NS_XSD, "integer");
- static final QName QNAME_TYPE_POSITIVE_INTEGER = new QName(NS_XSD, "positiveInteger");
- static final QName QNAME_TYPE_NEGATIVE_INTEGER = new QName(NS_XSD, "negativeInteger");
- static final QName QNAME_TYPE_NON_NEGATIVE_INTEGER = new QName(NS_XSD, "nonNegativeInteger");
- static final QName QNAME_TYPE_NON_POSITIVE_INTEGER = new QName(NS_XSD, "nonPositiveInteger");
- static final QName QNAME_TYPE_INT = new QName(NS_XSD, "int");
- static final QName QNAME_TYPE_UNSIGNED_INT = new QName(NS_XSD, "unsignedInt");
- static final QName QNAME_TYPE_LONG = new QName(NS_XSD, "long");
- static final QName QNAME_TYPE_UNSIGNED_LONG = new QName(NS_XSD, "unsignedLong");
- static final QName QNAME_TYPE_SHORT = new QName(NS_XSD, "short");
- static final QName QNAME_TYPE_UNSIGNED_SHORT = new QName(NS_XSD, "unsignedShort");
- static final QName QNAME_TYPE_DECIMAL = new QName(NS_XSD, "decimal");
- static final QName QNAME_TYPE_FLOAT = new QName(NS_XSD, "float");
- static final QName QNAME_TYPE_DOUBLE = new QName(NS_XSD, "double");
- static final QName QNAME_TYPE_BOOLEAN = new QName(NS_XSD, "boolean");
- static final QName QNAME_TYPE_TIME = new QName(NS_XSD, "time");
- static final QName QNAME_TYPE_DATE_TIME = new QName(NS_XSD, "dateTime");
- static final QName QNAME_TYPE_DURATION = new QName(NS_XSD, "duration");
- static final QName QNAME_TYPE_DATE = new QName(NS_XSD, "date");
- static final QName QNAME_TYPE_G_MONTH = new QName(NS_XSD, "gMonth");
- static final QName QNAME_TYPE_G_YEAR = new QName(NS_XSD, "gYear");
- static final QName QNAME_TYPE_G_YEAR_MONTH = new QName(NS_XSD, "gYearMonth");
- static final QName QNAME_TYPE_G_DAY = new QName(NS_XSD, "gDay");
- static final QName QNAME_TYPE_G_MONTH_DAY = new QName(NS_XSD, "gMonthDay");
- static final QName QNAME_TYPE_NAME = new QName(NS_XSD, "Name");
- static final QName QNAME_TYPE_QNAME = new QName(NS_XSD, "QName");
- static final QName QNAME_TYPE_NCNAME = new QName(NS_XSD, "NCName");
- static final QName QNAME_TYPE_ANY_URI = new QName(NS_XSD, "anyURI");
- static final QName QNAME_TYPE_ID = new QName(NS_XSD, "ID");
- static final QName QNAME_TYPE_IDREF = new QName(NS_XSD, "IDREF");
- static final QName QNAME_TYPE_IDREFS = new QName(NS_XSD, "IDREFS");
- static final QName QNAME_TYPE_ENTITY = new QName(NS_XSD, "ENTITY");
- static final QName QNAME_TYPE_ENTITIES = new QName(NS_XSD, "ENTITIES");
- static final QName QNAME_TYPE_NOTATION = new QName(NS_XSD, "NOTATION");
- static final QName QNAME_TYPE_NMTOKEN = new QName(NS_XSD, "NMTOKEN");
- static final QName QNAME_TYPE_NMTOKENS = new QName(NS_XSD, "NMTOKENS");
-
- static final QName QNAME_TYPE_LANGUAGE = new QName(NS_XSD, "language");
-
- // QNames for special types
- static final QName QNAME_TYPE_URTYPE = new QName(NS_XSD, "anyType");
- static final QName QNAME_TYPE_SIMPLE_URTYPE = new QName(NS_XSD, "anySimpleType");
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaKinds.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaKinds.java
deleted file mode 100644
index 05c2c31a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaKinds.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.schema;
-
-import com.sun.tools.internal.ws.wsdl.framework.Kind;
-
-/**
- *
- * @author WS Development Team
- */
-public class SchemaKinds {
- public static final Kind XSD_ATTRIBUTE = new Kind("xsd:attribute");
- public static final Kind XSD_ATTRIBUTE_GROUP =
- new Kind("xsd:attributeGroup");
- public static final Kind XSD_CONSTRAINT = new Kind("xsd:constraint");
- public static final Kind XSD_ELEMENT = new Kind("xsd:element");
- public static final Kind XSD_GROUP = new Kind("xsd:group");
- public static final Kind XSD_IDENTITY_CONSTRAINT =
- new Kind("xsd:identityConstraint");
- public static final Kind XSD_NOTATION = new Kind("xsd:notation");
- public static final Kind XSD_TYPE = new Kind("xsd:type");
-
- private SchemaKinds() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Binding.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Binding.java
deleted file mode 100644
index 1880700f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Binding.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.soap;
-
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-public class SOAP12Binding extends SOAPBinding{
- public SOAP12Binding(Locator locator) {
- super(locator);
- }
-
- @Override public QName getElementName() {
- return SOAP12Constants.QNAME_BINDING;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Constants.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Constants.java
deleted file mode 100644
index 1495b8f1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Constants.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.soap;
-
-import javax.xml.namespace.QName;
-
-/**
- * Interface defining SOAP1.2-related constants.
- *
- * @author WS Development Team
- */
-public interface SOAP12Constants {
-
- // namespace URIs
- static final String NS_WSDL_SOAP = "http://schemas.xmlsoap.org/wsdl/soap12/";
- static final String NS_SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
-
- // other URIs
- static final String URI_SOAP_TRANSPORT_HTTP = "http://www.w3.org/2003/05/soap/bindings/HTTP/";
-
- // QNames
- static final QName QNAME_ADDRESS = new QName(NS_WSDL_SOAP, "address");
- static final QName QNAME_BINDING = new QName(NS_WSDL_SOAP, "binding");
- static final QName QNAME_BODY = new QName(NS_WSDL_SOAP, "body");
- static final QName QNAME_FAULT = new QName(NS_WSDL_SOAP, "fault");
- static final QName QNAME_HEADER = new QName(NS_WSDL_SOAP, "header");
- static final QName QNAME_HEADERFAULT = new QName(NS_WSDL_SOAP, "headerfault");
- static final QName QNAME_OPERATION = new QName(NS_WSDL_SOAP, "operation");
-
- // SOAP encoding QNames
- static final QName QNAME_TYPE_ARRAY = new QName(NS_SOAP_ENCODING, "Array");
- static final QName QNAME_ATTR_GROUP_COMMON_ATTRIBUTES = new QName(NS_SOAP_ENCODING, "commonAttributes");
- static final QName QNAME_ATTR_ARRAY_TYPE = new QName(NS_SOAP_ENCODING, "arrayType");
- static final QName QNAME_ATTR_ITEM_TYPE = new QName(NS_SOAP_ENCODING, "itemType");
- static final QName QNAME_ATTR_ARRAY_SIZE = new QName(NS_SOAP_ENCODING, "arraySize");
- static final QName QNAME_ATTR_OFFSET = new QName(NS_SOAP_ENCODING, "offset");
- static final QName QNAME_ATTR_POSITION = new QName(NS_SOAP_ENCODING, "position");
-
- static final QName QNAME_TYPE_BASE64 = new QName(NS_SOAP_ENCODING, "base64");
-
- static final QName QNAME_ELEMENT_STRING = new QName(NS_SOAP_ENCODING, "string");
- static final QName QNAME_ELEMENT_NORMALIZED_STRING = new QName(NS_SOAP_ENCODING, "normalizedString");
- static final QName QNAME_ELEMENT_TOKEN = new QName(NS_SOAP_ENCODING, "token");
- static final QName QNAME_ELEMENT_BYTE = new QName(NS_SOAP_ENCODING, "byte");
- static final QName QNAME_ELEMENT_UNSIGNED_BYTE = new QName(NS_SOAP_ENCODING, "unsignedByte");
- static final QName QNAME_ELEMENT_BASE64_BINARY = new QName(NS_SOAP_ENCODING, "base64Binary");
- static final QName QNAME_ELEMENT_HEX_BINARY = new QName(NS_SOAP_ENCODING, "hexBinary");
- static final QName QNAME_ELEMENT_INTEGER = new QName(NS_SOAP_ENCODING, "integer");
- static final QName QNAME_ELEMENT_POSITIVE_INTEGER = new QName(NS_SOAP_ENCODING, "positiveInteger");
- static final QName QNAME_ELEMENT_NEGATIVE_INTEGER = new QName(NS_SOAP_ENCODING, "negativeInteger");
- static final QName QNAME_ELEMENT_NON_NEGATIVE_INTEGER = new QName(NS_SOAP_ENCODING, "nonNegativeInteger");
- static final QName QNAME_ELEMENT_NON_POSITIVE_INTEGER = new QName(NS_SOAP_ENCODING, "nonPositiveInteger");
- static final QName QNAME_ELEMENT_INT = new QName(NS_SOAP_ENCODING, "int");
- static final QName QNAME_ELEMENT_UNSIGNED_INT = new QName(NS_SOAP_ENCODING, "unsignedInt");
- static final QName QNAME_ELEMENT_LONG = new QName(NS_SOAP_ENCODING, "long");
- static final QName QNAME_ELEMENT_UNSIGNED_LONG = new QName(NS_SOAP_ENCODING, "unsignedLong");
- static final QName QNAME_ELEMENT_SHORT = new QName(NS_SOAP_ENCODING, "short");
- static final QName QNAME_ELEMENT_UNSIGNED_SHORT = new QName(NS_SOAP_ENCODING, "unsignedShort");
- static final QName QNAME_ELEMENT_DECIMAL = new QName(NS_SOAP_ENCODING, "decimal");
- static final QName QNAME_ELEMENT_FLOAT = new QName(NS_SOAP_ENCODING, "float");
- static final QName QNAME_ELEMENT_DOUBLE = new QName(NS_SOAP_ENCODING, "double");
- static final QName QNAME_ELEMENT_BOOLEAN = new QName(NS_SOAP_ENCODING, "boolean");
- static final QName QNAME_ELEMENT_TIME = new QName(NS_SOAP_ENCODING, "time");
- static final QName QNAME_ELEMENT_DATE_TIME = new QName(NS_SOAP_ENCODING, "dateTime");
- static final QName QNAME_ELEMENT_DURATION = new QName(NS_SOAP_ENCODING, "duration");
- static final QName QNAME_ELEMENT_DATE = new QName(NS_SOAP_ENCODING, "date");
- static final QName QNAME_ELEMENT_G_MONTH = new QName(NS_SOAP_ENCODING, "gMonth");
- static final QName QNAME_ELEMENT_G_YEAR = new QName(NS_SOAP_ENCODING, "gYear");
- static final QName QNAME_ELEMENT_G_YEAR_MONTH = new QName(NS_SOAP_ENCODING, "gYearMonth");
- static final QName QNAME_ELEMENT_G_DAY = new QName(NS_SOAP_ENCODING, "gDay");
- static final QName QNAME_ELEMENT_G_MONTH_DAY = new QName(NS_SOAP_ENCODING, "gMonthDay");
- static final QName QNAME_ELEMENT_NAME = new QName(NS_SOAP_ENCODING, "Name");
- static final QName QNAME_ELEMENT_QNAME = new QName(NS_SOAP_ENCODING, "QName");
- static final QName QNAME_ELEMENT_NCNAME = new QName(NS_SOAP_ENCODING, "NCName");
- static final QName QNAME_ELEMENT_ANY_URI = new QName(NS_SOAP_ENCODING, "anyURI");
- static final QName QNAME_ELEMENT_ID = new QName(NS_SOAP_ENCODING, "ID");
- static final QName QNAME_ELEMENT_IDREF = new QName(NS_SOAP_ENCODING, "IDREF");
- static final QName QNAME_ELEMENT_IDREFS = new QName(NS_SOAP_ENCODING, "IDREFS");
- static final QName QNAME_ELEMENT_ENTITY = new QName(NS_SOAP_ENCODING, "ENTITY");
- static final QName QNAME_ELEMENT_ENTITIES = new QName(NS_SOAP_ENCODING, "ENTITIES");
- static final QName QNAME_ELEMENT_NOTATION = new QName(NS_SOAP_ENCODING, "NOTATION");
- static final QName QNAME_ELEMENT_NMTOKEN = new QName(NS_SOAP_ENCODING, "NMTOKEN");
- static final QName QNAME_ELEMENT_NMTOKENS = new QName(NS_SOAP_ENCODING, "NMTOKENS");
-
- static final QName QNAME_TYPE_STRING = new QName(NS_SOAP_ENCODING, "string");
- static final QName QNAME_TYPE_NORMALIZED_STRING = new QName(NS_SOAP_ENCODING, "normalizedString");
- static final QName QNAME_TYPE_TOKEN = new QName(NS_SOAP_ENCODING, "token");
- static final QName QNAME_TYPE_BYTE = new QName(NS_SOAP_ENCODING, "byte");
- static final QName QNAME_TYPE_UNSIGNED_BYTE = new QName(NS_SOAP_ENCODING, "unsignedByte");
- static final QName QNAME_TYPE_BASE64_BINARY = new QName(NS_SOAP_ENCODING, "base64Binary");
- static final QName QNAME_TYPE_HEX_BINARY = new QName(NS_SOAP_ENCODING, "hexBinary");
- static final QName QNAME_TYPE_INTEGER = new QName(NS_SOAP_ENCODING, "integer");
- static final QName QNAME_TYPE_POSITIVE_INTEGER = new QName(NS_SOAP_ENCODING, "positiveInteger");
- static final QName QNAME_TYPE_NEGATIVE_INTEGER = new QName(NS_SOAP_ENCODING, "negativeInteger");
- static final QName QNAME_TYPE_NON_NEGATIVE_INTEGER = new QName(NS_SOAP_ENCODING, "nonNegativeInteger");
- static final QName QNAME_TYPE_NON_POSITIVE_INTEGER = new QName(NS_SOAP_ENCODING, "nonPositiveInteger");
- static final QName QNAME_TYPE_INT = new QName(NS_SOAP_ENCODING, "int");
- static final QName QNAME_TYPE_UNSIGNED_INT = new QName(NS_SOAP_ENCODING, "unsignedInt");
- static final QName QNAME_TYPE_LONG = new QName(NS_SOAP_ENCODING, "long");
- static final QName QNAME_TYPE_UNSIGNED_LONG = new QName(NS_SOAP_ENCODING, "unsignedLong");
- static final QName QNAME_TYPE_SHORT = new QName(NS_SOAP_ENCODING, "short");
- static final QName QNAME_TYPE_UNSIGNED_SHORT = new QName(NS_SOAP_ENCODING, "unsignedShort");
- static final QName QNAME_TYPE_DECIMAL = new QName(NS_SOAP_ENCODING, "decimal");
- static final QName QNAME_TYPE_FLOAT = new QName(NS_SOAP_ENCODING, "float");
- static final QName QNAME_TYPE_DOUBLE = new QName(NS_SOAP_ENCODING, "double");
- static final QName QNAME_TYPE_BOOLEAN = new QName(NS_SOAP_ENCODING, "boolean");
- static final QName QNAME_TYPE_TIME = new QName(NS_SOAP_ENCODING, "time");
- static final QName QNAME_TYPE_DATE_TIME = new QName(NS_SOAP_ENCODING, "dateTime");
- static final QName QNAME_TYPE_DURATION = new QName(NS_SOAP_ENCODING, "duration");
- static final QName QNAME_TYPE_DATE = new QName(NS_SOAP_ENCODING, "date");
- static final QName QNAME_TYPE_G_MONTH = new QName(NS_SOAP_ENCODING, "gMonth");
- static final QName QNAME_TYPE_G_YEAR = new QName(NS_SOAP_ENCODING, "gYear");
- static final QName QNAME_TYPE_G_YEAR_MONTH = new QName(NS_SOAP_ENCODING, "gYearMonth");
- static final QName QNAME_TYPE_G_DAY = new QName(NS_SOAP_ENCODING, "gDay");
- static final QName QNAME_TYPE_G_MONTH_DAY = new QName(NS_SOAP_ENCODING, "gMonthDay");
- static final QName QNAME_TYPE_NAME = new QName(NS_SOAP_ENCODING, "Name");
- static final QName QNAME_TYPE_QNAME = new QName(NS_SOAP_ENCODING, "QName");
- static final QName QNAME_TYPE_NCNAME = new QName(NS_SOAP_ENCODING, "NCName");
- static final QName QNAME_TYPE_ANY_URI = new QName(NS_SOAP_ENCODING, "anyURI");
- static final QName QNAME_TYPE_ID = new QName(NS_SOAP_ENCODING, "ID");
- static final QName QNAME_TYPE_IDREF = new QName(NS_SOAP_ENCODING, "IDREF");
- static final QName QNAME_TYPE_IDREFS = new QName(NS_SOAP_ENCODING, "IDREFS");
- static final QName QNAME_TYPE_ENTITY = new QName(NS_SOAP_ENCODING, "ENTITY");
- static final QName QNAME_TYPE_ENTITIES = new QName(NS_SOAP_ENCODING, "ENTITIES");
- static final QName QNAME_TYPE_NOTATION = new QName(NS_SOAP_ENCODING, "NOTATION");
- static final QName QNAME_TYPE_NMTOKEN = new QName(NS_SOAP_ENCODING, "NMTOKEN");
- static final QName QNAME_TYPE_NMTOKENS = new QName(NS_SOAP_ENCODING, "NMTOKENS");
- static final QName QNAME_TYPE_LANGUAGE = new QName(NS_SOAP_ENCODING, "LANGUAGE");
-
- // SOAP attributes with non-colonized names
- static final QName QNAME_ATTR_ID = new QName("", "id");
- static final QName QNAME_ATTR_HREF = new QName("", "ref");
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPAddress.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPAddress.java
deleted file mode 100644
index 659a5497..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPAddress.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.soap;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A SOAP address extension.
- *
- * @author WS Development Team
- */
-public class SOAPAddress extends ExtensionImpl {
-
- public SOAPAddress(Locator locator) {
- super(locator);
- }
-
- public QName getElementName() {
- return SOAPConstants.QNAME_ADDRESS;
- }
-
- public String getLocation() {
- return _location;
- }
-
- public void setLocation(String s) {
- _location = s;
- }
-
- public void validateThis() {
- if (_location == null) {
- failValidation("validation.missingRequiredAttribute", "location");
- }
- }
-
- private String _location;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBinding.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBinding.java
deleted file mode 100644
index dd24c3e9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBinding.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.soap;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A SOAP binding extension.
- *
- * @author WS Development Team
- */
-public class SOAPBinding extends ExtensionImpl {
-
- public SOAPBinding(Locator locator) {
- super(locator);
- _style = SOAPStyle.DOCUMENT;
- }
-
- public QName getElementName() {
- return SOAPConstants.QNAME_BINDING;
- }
-
- public String getTransport() {
- return _transport;
- }
-
- public void setTransport(String s) {
- _transport = s;
- }
-
- public SOAPStyle getStyle() {
- return _style;
- }
-
- public void setStyle(SOAPStyle s) {
- _style = s;
- }
-
- public boolean isDocument() {
- return _style == SOAPStyle.DOCUMENT;
- }
-
- public boolean isRPC() {
- return _style == SOAPStyle.RPC;
- }
-
- public void validateThis() {
- }
-
- private String _transport;
- private SOAPStyle _style;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBody.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBody.java
deleted file mode 100644
index 3635614a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBody.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.soap;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import com.sun.tools.internal.ws.wsdl.framework.ValidationException;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A SOAP body extension.
- *
- * @author WS Development Team
- */
-public class SOAPBody extends ExtensionImpl {
-
- public SOAPBody(Locator locator) {
- super(locator);
- }
-
- public QName getElementName() {
- return SOAPConstants.QNAME_BODY;
- }
-
- public String getNamespace() {
- return _namespace;
- }
-
- public void setNamespace(String s) {
- _namespace = s;
- }
-
- public SOAPUse getUse() {
- return _use;
- }
-
- public void setUse(SOAPUse u) {
- _use = u;
- }
-
- public boolean isEncoded() {
- return _use == SOAPUse.ENCODED;
- }
-
- public boolean isLiteral() {
- return _use == SOAPUse.LITERAL;
- }
-
- public String getEncodingStyle() {
- return _encodingStyle;
- }
-
- public void setEncodingStyle(String s) {
- _encodingStyle = s;
- }
-
- public String getParts() {
- return _parts;
- }
-
- public void setParts(String s) {
- _parts = s;
- }
-
- public void validateThis() {
- if(_use == SOAPUse.ENCODED) {
- throw new ValidationException("validation.unsupportedUse.encoded", getLocator().getLineNumber(),getLocator().getSystemId());
- }
- }
-
- private String _encodingStyle;
- private String _namespace;
- private String _parts;
- private SOAPUse _use=SOAPUse.LITERAL;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPConstants.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPConstants.java
deleted file mode 100644
index 72a5190b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPConstants.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.soap;
-
-import com.sun.xml.internal.ws.encoding.soap.streaming.SOAPNamespaceConstants;
-
-import javax.xml.namespace.QName;
-
-/**
- * Interface defining SOAP-related constants.
- *
- * @author WS Development Team
- */
-public interface SOAPConstants {
-
- // namespace URIs
- public static final String URI_ENVELOPE = SOAPNamespaceConstants.ENVELOPE;
- public static final String NS_WSDL_SOAP =
- "http://schemas.xmlsoap.org/wsdl/soap/";
- public static final String NS_SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
-
- // other URIs
- public final String URI_SOAP_TRANSPORT_HTTP =
- "http://schemas.xmlsoap.org/soap/http";
-
- // QNames
- public static final QName QNAME_ADDRESS =
- new QName(NS_WSDL_SOAP, "address");
- public static final QName QNAME_BINDING =
- new QName(NS_WSDL_SOAP, "binding");
- public static final QName QNAME_BODY = new QName(NS_WSDL_SOAP, "body");
- public static final QName QNAME_FAULT = new QName(NS_WSDL_SOAP, "fault");
- public static final QName QNAME_HEADER = new QName(NS_WSDL_SOAP, "header");
- public static final QName QNAME_HEADERFAULT =
- new QName(NS_WSDL_SOAP, "headerfault");
- public static final QName QNAME_OPERATION =
- new QName(NS_WSDL_SOAP, "operation");
- public static final QName QNAME_MUSTUNDERSTAND =
- new QName(URI_ENVELOPE, "mustUnderstand");
-
-
- // SOAP encoding QNames
- public static final QName QNAME_TYPE_ARRAY =
- new QName(NS_SOAP_ENCODING, "Array");
- public static final QName QNAME_ATTR_GROUP_COMMON_ATTRIBUTES =
- new QName(NS_SOAP_ENCODING, "commonAttributes");
- public static final QName QNAME_ATTR_ARRAY_TYPE =
- new QName(NS_SOAP_ENCODING, "arrayType");
- public static final QName QNAME_ATTR_OFFSET =
- new QName(NS_SOAP_ENCODING, "offset");
- public static final QName QNAME_ATTR_POSITION =
- new QName(NS_SOAP_ENCODING, "position");
-
- public static final QName QNAME_TYPE_BASE64 =
- new QName(NS_SOAP_ENCODING, "base64");
-
- public static final QName QNAME_ELEMENT_STRING =
- new QName(NS_SOAP_ENCODING, "string");
- public static final QName QNAME_ELEMENT_NORMALIZED_STRING =
- new QName(NS_SOAP_ENCODING, "normalizedString");
- public static final QName QNAME_ELEMENT_TOKEN =
- new QName(NS_SOAP_ENCODING, "token");
- public static final QName QNAME_ELEMENT_BYTE =
- new QName(NS_SOAP_ENCODING, "byte");
- public static final QName QNAME_ELEMENT_UNSIGNED_BYTE =
- new QName(NS_SOAP_ENCODING, "unsignedByte");
- public static final QName QNAME_ELEMENT_BASE64_BINARY =
- new QName(NS_SOAP_ENCODING, "base64Binary");
- public static final QName QNAME_ELEMENT_HEX_BINARY =
- new QName(NS_SOAP_ENCODING, "hexBinary");
- public static final QName QNAME_ELEMENT_INTEGER =
- new QName(NS_SOAP_ENCODING, "integer");
- public static final QName QNAME_ELEMENT_POSITIVE_INTEGER =
- new QName(NS_SOAP_ENCODING, "positiveInteger");
- public static final QName QNAME_ELEMENT_NEGATIVE_INTEGER =
- new QName(NS_SOAP_ENCODING, "negativeInteger");
- public static final QName QNAME_ELEMENT_NON_NEGATIVE_INTEGER =
- new QName(NS_SOAP_ENCODING, "nonNegativeInteger");
- public static final QName QNAME_ELEMENT_NON_POSITIVE_INTEGER =
- new QName(NS_SOAP_ENCODING, "nonPositiveInteger");
- public static final QName QNAME_ELEMENT_INT =
- new QName(NS_SOAP_ENCODING, "int");
- public static final QName QNAME_ELEMENT_UNSIGNED_INT =
- new QName(NS_SOAP_ENCODING, "unsignedInt");
- public static final QName QNAME_ELEMENT_LONG =
- new QName(NS_SOAP_ENCODING, "long");
- public static final QName QNAME_ELEMENT_UNSIGNED_LONG =
- new QName(NS_SOAP_ENCODING, "unsignedLong");
- public static final QName QNAME_ELEMENT_SHORT =
- new QName(NS_SOAP_ENCODING, "short");
- public static final QName QNAME_ELEMENT_UNSIGNED_SHORT =
- new QName(NS_SOAP_ENCODING, "unsignedShort");
- public static final QName QNAME_ELEMENT_DECIMAL =
- new QName(NS_SOAP_ENCODING, "decimal");
- public static final QName QNAME_ELEMENT_FLOAT =
- new QName(NS_SOAP_ENCODING, "float");
- public static final QName QNAME_ELEMENT_DOUBLE =
- new QName(NS_SOAP_ENCODING, "double");
- public static final QName QNAME_ELEMENT_BOOLEAN =
- new QName(NS_SOAP_ENCODING, "boolean");
- public static final QName QNAME_ELEMENT_TIME =
- new QName(NS_SOAP_ENCODING, "time");
- public static final QName QNAME_ELEMENT_DATE_TIME =
- new QName(NS_SOAP_ENCODING, "dateTime");
- public static final QName QNAME_ELEMENT_DURATION =
- new QName(NS_SOAP_ENCODING, "duration");
- public static final QName QNAME_ELEMENT_DATE =
- new QName(NS_SOAP_ENCODING, "date");
- public static final QName QNAME_ELEMENT_G_MONTH =
- new QName(NS_SOAP_ENCODING, "gMonth");
- public static final QName QNAME_ELEMENT_G_YEAR =
- new QName(NS_SOAP_ENCODING, "gYear");
- public static final QName QNAME_ELEMENT_G_YEAR_MONTH =
- new QName(NS_SOAP_ENCODING, "gYearMonth");
- public static final QName QNAME_ELEMENT_G_DAY =
- new QName(NS_SOAP_ENCODING, "gDay");
- public static final QName QNAME_ELEMENT_G_MONTH_DAY =
- new QName(NS_SOAP_ENCODING, "gMonthDay");
- public static final QName QNAME_ELEMENT_NAME =
- new QName(NS_SOAP_ENCODING, "Name");
- public static final QName QNAME_ELEMENT_QNAME =
- new QName(NS_SOAP_ENCODING, "QName");
- public static final QName QNAME_ELEMENT_NCNAME =
- new QName(NS_SOAP_ENCODING, "NCName");
- public static final QName QNAME_ELEMENT_ANY_URI =
- new QName(NS_SOAP_ENCODING, "anyURI");
- public static final QName QNAME_ELEMENT_ID =
- new QName(NS_SOAP_ENCODING, "ID");
- public static final QName QNAME_ELEMENT_IDREF =
- new QName(NS_SOAP_ENCODING, "IDREF");
- public static final QName QNAME_ELEMENT_IDREFS =
- new QName(NS_SOAP_ENCODING, "IDREFS");
- public static final QName QNAME_ELEMENT_ENTITY =
- new QName(NS_SOAP_ENCODING, "ENTITY");
- public static final QName QNAME_ELEMENT_ENTITIES =
- new QName(NS_SOAP_ENCODING, "ENTITIES");
- public static final QName QNAME_ELEMENT_NOTATION =
- new QName(NS_SOAP_ENCODING, "NOTATION");
- public static final QName QNAME_ELEMENT_NMTOKEN =
- new QName(NS_SOAP_ENCODING, "NMTOKEN");
- public static final QName QNAME_ELEMENT_NMTOKENS =
- new QName(NS_SOAP_ENCODING, "NMTOKENS");
-
- public static final QName QNAME_TYPE_STRING =
- new QName(NS_SOAP_ENCODING, "string");
- public static final QName QNAME_TYPE_NORMALIZED_STRING =
- new QName(NS_SOAP_ENCODING, "normalizedString");
- public static final QName QNAME_TYPE_TOKEN =
- new QName(NS_SOAP_ENCODING, "token");
- public static final QName QNAME_TYPE_BYTE =
- new QName(NS_SOAP_ENCODING, "byte");
- public static final QName QNAME_TYPE_UNSIGNED_BYTE =
- new QName(NS_SOAP_ENCODING, "unsignedByte");
- public static final QName QNAME_TYPE_BASE64_BINARY =
- new QName(NS_SOAP_ENCODING, "base64Binary");
- public static final QName QNAME_TYPE_HEX_BINARY =
- new QName(NS_SOAP_ENCODING, "hexBinary");
- public static final QName QNAME_TYPE_INTEGER =
- new QName(NS_SOAP_ENCODING, "integer");
- public static final QName QNAME_TYPE_POSITIVE_INTEGER =
- new QName(NS_SOAP_ENCODING, "positiveInteger");
- public static final QName QNAME_TYPE_NEGATIVE_INTEGER =
- new QName(NS_SOAP_ENCODING, "negativeInteger");
- public static final QName QNAME_TYPE_NON_NEGATIVE_INTEGER =
- new QName(NS_SOAP_ENCODING, "nonNegativeInteger");
- public static final QName QNAME_TYPE_NON_POSITIVE_INTEGER =
- new QName(NS_SOAP_ENCODING, "nonPositiveInteger");
- public static final QName QNAME_TYPE_INT =
- new QName(NS_SOAP_ENCODING, "int");
- public static final QName QNAME_TYPE_UNSIGNED_INT =
- new QName(NS_SOAP_ENCODING, "unsignedInt");
- public static final QName QNAME_TYPE_LONG =
- new QName(NS_SOAP_ENCODING, "long");
- public static final QName QNAME_TYPE_UNSIGNED_LONG =
- new QName(NS_SOAP_ENCODING, "unsignedLong");
- public static final QName QNAME_TYPE_SHORT =
- new QName(NS_SOAP_ENCODING, "short");
- public static final QName QNAME_TYPE_UNSIGNED_SHORT =
- new QName(NS_SOAP_ENCODING, "unsignedShort");
- public static final QName QNAME_TYPE_DECIMAL =
- new QName(NS_SOAP_ENCODING, "decimal");
- public static final QName QNAME_TYPE_FLOAT =
- new QName(NS_SOAP_ENCODING, "float");
- public static final QName QNAME_TYPE_DOUBLE =
- new QName(NS_SOAP_ENCODING, "double");
- public static final QName QNAME_TYPE_BOOLEAN =
- new QName(NS_SOAP_ENCODING, "boolean");
- public static final QName QNAME_TYPE_TIME =
- new QName(NS_SOAP_ENCODING, "time");
- public static final QName QNAME_TYPE_DATE_TIME =
- new QName(NS_SOAP_ENCODING, "dateTime");
- public static final QName QNAME_TYPE_DURATION =
- new QName(NS_SOAP_ENCODING, "duration");
- public static final QName QNAME_TYPE_DATE =
- new QName(NS_SOAP_ENCODING, "date");
- public static final QName QNAME_TYPE_G_MONTH =
- new QName(NS_SOAP_ENCODING, "gMonth");
- public static final QName QNAME_TYPE_G_YEAR =
- new QName(NS_SOAP_ENCODING, "gYear");
- public static final QName QNAME_TYPE_G_YEAR_MONTH =
- new QName(NS_SOAP_ENCODING, "gYearMonth");
- public static final QName QNAME_TYPE_G_DAY =
- new QName(NS_SOAP_ENCODING, "gDay");
- public static final QName QNAME_TYPE_G_MONTH_DAY =
- new QName(NS_SOAP_ENCODING, "gMonthDay");
- public static final QName QNAME_TYPE_NAME =
- new QName(NS_SOAP_ENCODING, "Name");
- public static final QName QNAME_TYPE_QNAME =
- new QName(NS_SOAP_ENCODING, "QName");
- public static final QName QNAME_TYPE_NCNAME =
- new QName(NS_SOAP_ENCODING, "NCName");
- public static final QName QNAME_TYPE_ANY_URI =
- new QName(NS_SOAP_ENCODING, "anyURI");
- public static final QName QNAME_TYPE_ID = new QName(NS_SOAP_ENCODING, "ID");
- public static final QName QNAME_TYPE_IDREF =
- new QName(NS_SOAP_ENCODING, "IDREF");
- public static final QName QNAME_TYPE_IDREFS =
- new QName(NS_SOAP_ENCODING, "IDREFS");
- public static final QName QNAME_TYPE_ENTITY =
- new QName(NS_SOAP_ENCODING, "ENTITY");
- public static final QName QNAME_TYPE_ENTITIES =
- new QName(NS_SOAP_ENCODING, "ENTITIES");
- public static final QName QNAME_TYPE_NOTATION =
- new QName(NS_SOAP_ENCODING, "NOTATION");
- public static final QName QNAME_TYPE_NMTOKEN =
- new QName(NS_SOAP_ENCODING, "NMTOKEN");
- public static final QName QNAME_TYPE_NMTOKENS =
- new QName(NS_SOAP_ENCODING, "NMTOKENS");
- public static final QName QNAME_TYPE_LANGUAGE =
- new QName(NS_SOAP_ENCODING, "LANGUAGE");
-
- // SOAP attributes with non-colonized names
- public static final QName QNAME_ATTR_ID = new QName("", "id");
- public static final QName QNAME_ATTR_HREF = new QName("", "href");
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPFault.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPFault.java
deleted file mode 100644
index 07b31bc6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPFault.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.soap;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import com.sun.tools.internal.ws.wsdl.framework.ValidationException;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A SOAP fault extension.
- *
- * @author WS Development Team
- */
-public class SOAPFault extends ExtensionImpl {
-
- public SOAPFault(Locator locator) {
- super(locator);
- _use = SOAPUse.LITERAL;
- }
-
- public QName getElementName() {
- return SOAPConstants.QNAME_FAULT;
- }
-
- public String getName() {
- return _name;
- }
-
- public void setName(String s) {
- _name = s;
- }
-
- public String getNamespace() {
- return _namespace;
- }
-
- public void setNamespace(String s) {
- _namespace = s;
- }
-
- public SOAPUse getUse() {
- return _use;
- }
-
- public void setUse(SOAPUse u) {
- _use = u;
- }
-
- public boolean isEncoded() {
- return _use == SOAPUse.ENCODED;
- }
-
- public boolean isLiteral() {
- return _use == SOAPUse.LITERAL;
- }
-
- public String getEncodingStyle() {
- return _encodingStyle;
- }
-
- public void setEncodingStyle(String s) {
- _encodingStyle = s;
- }
-
- public void validateThis() {
- if(_use == SOAPUse.ENCODED) {
- throw new ValidationException("validation.unsupportedUse.encoded", getLocator().getLineNumber(),getLocator().getSystemId());
- }
- }
-
- private String _name;
- private String _encodingStyle;
- private String _namespace;
- private SOAPUse _use = SOAPUse.LITERAL;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeader.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeader.java
deleted file mode 100644
index 12249ad7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeader.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.soap;
-
-import com.sun.tools.internal.ws.wsdl.framework.*;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * A SOAP header extension.
- *
- * @author WS Development Team
- */
-public class SOAPHeader extends ExtensionImpl {
-
- public SOAPHeader(Locator locator) {
- super(locator);
- _faults = new ArrayList();
- }
-
- public void add(SOAPHeaderFault fault) {
- _faults.add(fault);
- }
-
- public Iterator faults() {
- return _faults.iterator();
- }
-
- public QName getElementName() {
- return SOAPConstants.QNAME_HEADER;
- }
-
- public String getNamespace() {
- return _namespace;
- }
-
- public void setNamespace(String s) {
- _namespace = s;
- }
-
- public SOAPUse getUse() {
- return _use;
- }
-
- public void setUse(SOAPUse u) {
- _use = u;
- }
-
- public boolean isEncoded() {
- return _use == SOAPUse.ENCODED;
- }
-
- public boolean isLiteral() {
- return _use == SOAPUse.LITERAL;
- }
-
- public String getEncodingStyle() {
- return _encodingStyle;
- }
-
- public void setEncodingStyle(String s) {
- _encodingStyle = s;
- }
-
- public String getPart() {
- return _part;
- }
-
- public void setMessage(QName message) {
- _message = message;
- }
-
- public QName getMessage() {
- return _message;
- }
-
- public void setPart(String s) {
- _part = s;
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- super.withAllSubEntitiesDo(action);
-
- for (Iterator iter = _faults.iterator(); iter.hasNext();) {
- action.perform((Entity) iter.next());
- }
- }
-
- public void withAllQNamesDo(QNameAction action) {
- super.withAllQNamesDo(action);
-
- if (_message != null) {
- action.perform(_message);
- }
- }
-
- public void accept(ExtensionVisitor visitor) throws Exception {
- visitor.preVisit(this);
- for (Iterator iter = _faults.iterator(); iter.hasNext();) {
- ((SOAPHeaderFault) iter.next()).accept(visitor);
- }
- visitor.postVisit(this);
- }
-
- public void validateThis() {
- if (_message == null) {
- failValidation("validation.missingRequiredAttribute", "message");
- }
- if (_part == null) {
- failValidation("validation.missingRequiredAttribute", "part");
- }
- // Fix for bug 4851427
- // if (_use == null) {
- // failValidation("validation.missingRequiredAttribute", "use");
- // }
-
- if(_use == SOAPUse.ENCODED) {
- throw new ValidationException("validation.unsupportedUse.encoded", getLocator().getLineNumber(),getLocator().getSystemId());
- }
- }
-
- private String _encodingStyle;
- private String _namespace;
- private String _part;
- private QName _message;
- private SOAPUse _use=SOAPUse.LITERAL;
- private List _faults;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeaderFault.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeaderFault.java
deleted file mode 100644
index 155695d6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeaderFault.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.soap;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import com.sun.tools.internal.ws.wsdl.framework.QNameAction;
-import com.sun.tools.internal.ws.wsdl.framework.ValidationException;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A SOAP header fault extension.
- *
- * @author WS Development Team
- */
-public class SOAPHeaderFault extends ExtensionImpl {
-
- public SOAPHeaderFault(Locator locator) {
- super(locator);
- }
-
- public QName getElementName() {
- return SOAPConstants.QNAME_HEADERFAULT;
- }
-
- public String getNamespace() {
- return _namespace;
- }
-
- public void setNamespace(String s) {
- _namespace = s;
- }
-
- public SOAPUse getUse() {
- return _use;
- }
-
- public void setUse(SOAPUse u) {
- _use = u;
- }
-
- public boolean isEncoded() {
- return _use == SOAPUse.ENCODED;
- }
-
- public boolean isLiteral() {
- return _use == SOAPUse.LITERAL;
- }
-
- public String getEncodingStyle() {
- return _encodingStyle;
- }
-
- public void setEncodingStyle(String s) {
- _encodingStyle = s;
- }
-
- public String getPart() {
- return _part;
- }
-
- public void setMessage(QName message) {
- _message = message;
- }
-
- public QName getMessage() {
- return _message;
- }
-
- public void setPart(String s) {
- _part = s;
- }
-
- public void withAllQNamesDo(QNameAction action) {
- super.withAllQNamesDo(action);
-
- if (_message != null) {
- action.perform(_message);
- }
- }
-
- public void validateThis() {
- if (_message == null) {
- failValidation("validation.missingRequiredAttribute", "message");
- }
- if (_part == null) {
- failValidation("validation.missingRequiredAttribute", "part");
- }
- if(_use == SOAPUse.ENCODED) {
- throw new ValidationException("validation.unsupportedUse.encoded", getLocator().getLineNumber(),getLocator().getSystemId());
- }
- }
-
- private String _encodingStyle;
- private String _namespace;
- private String _part;
- private QName _message;
- private SOAPUse _use=SOAPUse.LITERAL;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPOperation.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPOperation.java
deleted file mode 100644
index b137b7cb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPOperation.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.soap;
-
-import com.sun.tools.internal.ws.wsdl.framework.ExtensionImpl;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A SOAP operation extension.
- *
- * @author WS Development Team
- */
-public class SOAPOperation extends ExtensionImpl {
-
- public SOAPOperation(Locator locator) {
- super(locator);
-
- }
-
- public QName getElementName() {
- return SOAPConstants.QNAME_OPERATION;
- }
-
- public String getSOAPAction() {
- return _soapAction;
- }
-
- public void setSOAPAction(String s) {
- _soapAction = s;
- }
-
- public SOAPStyle getStyle() {
- return _style;
- }
-
- public void setStyle(SOAPStyle s) {
- _style = s;
- }
-
- public boolean isDocument() {
- return _style == SOAPStyle.DOCUMENT;
- }
-
- public boolean isRPC() {
- return _style == SOAPStyle.RPC;
- }
-
- public void validateThis() {
- }
-
- private String _soapAction;
- private SOAPStyle _style;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPStyle.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPStyle.java
deleted file mode 100644
index 744ada9f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPStyle.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.soap;
-
-/**
- * A SOAP "style" enumeration.
- *
- * @author WS Development Team
- */
-public final class SOAPStyle {
-
- public static final SOAPStyle RPC = new SOAPStyle();
- public static final SOAPStyle DOCUMENT = new SOAPStyle();
-
- private SOAPStyle() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPUse.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPUse.java
deleted file mode 100644
index e3fe9144..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPUse.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.document.soap;
-
-/**
- * A SOAP "use" enumeration.
- *
- * @author WS Development Team
- */
-public final class SOAPUse {
-
- public static final SOAPUse LITERAL = new SOAPUse();
- public static final SOAPUse ENCODED = new SOAPUse();
-
- private SOAPUse() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/AbstractDocument.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/AbstractDocument.java
deleted file mode 100644
index 00407885..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/AbstractDocument.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder;
-import com.sun.tools.internal.ws.wsdl.parser.DOMForest;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.AbortException;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-
-import javax.xml.namespace.QName;
-import java.util.*;
-
-/**
- * An abstract class for documents containing entities.
- *
- * @author WS Development Team
- */
-public abstract class AbstractDocument {
-
- protected final DOMForest forest;
- protected final ErrorReceiver errReceiver;
-
- protected AbstractDocument(MetadataFinder forest, ErrorReceiver errReceiver) {
- this.forest = forest;
- this.errReceiver = errReceiver;
- kinds = new HashMap();
- importedEntities = new ArrayList();
- importedDocuments = new HashSet();
- includedEntities = new ArrayList();
- includedDocuments = new HashSet();
- }
-
- public String getSystemId() {
- return _systemId;
- }
-
- public void setSystemId(String s) {
- if (_systemId != null && !_systemId.equals(s)) {
- // avoid redefinition of a system identifier
- throw new IllegalArgumentException();
- }
-
- _systemId = s;
- if (s != null) {
- importedDocuments.add(s);
- }
- }
-
- public void addIncludedDocument(String systemId) {
- includedDocuments.add(systemId);
- }
-
- public boolean isIncludedDocument(String systemId) {
- return includedDocuments.contains(systemId);
- }
-
- public void addIncludedEntity(Entity entity) {
- includedEntities.add(entity);
- }
-
- public void addImportedDocument(String systemId) {
- importedDocuments.add(systemId);
- }
-
- public boolean isImportedDocument(String systemId) {
- return importedDocuments.contains(systemId);
- }
-
- public void addImportedEntity(Entity entity) {
- importedEntities.add(entity);
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- if (getRoot() != null) {
- action.perform(getRoot());
- }
-
- for (Iterator iter = importedEntities.iterator(); iter.hasNext();) {
- action.perform((Entity) iter.next());
- }
-
- for (Iterator iter = includedEntities.iterator(); iter.hasNext();) {
- action.perform((Entity) iter.next());
- }
- }
-
- public Map getMap(Kind k) {
- Map m = (Map) kinds.get(k.getName());
- if (m == null) {
- m = new HashMap();
- kinds.put(k.getName(), m);
- }
- return m;
- }
-
- public void define(GloballyKnown e) {
- Map map = getMap(e.getKind());
- if (e.getName() == null)
- return;
- QName name =
- new QName(e.getDefining().getTargetNamespaceURI(), e.getName());
-
- if (map.containsKey(name)){
- errReceiver.error(e.getLocator(), WsdlMessages.ENTITY_DUPLICATE_WITH_TYPE(e.getElementName().getLocalPart(), e.getName()));
- throw new AbortException();
- }else{
- map.put(name, e);
- }
- }
-
- public GloballyKnown find(Kind k, QName name) {
- Map map = getMap(k);
- Object result = map.get(name);
- if (result == null){
- errReceiver.error(null, WsdlMessages.ENTITY_NOT_FOUND_BY_Q_NAME(k.getName(), name, _systemId));
- throw new AbortException();
- }
- return (GloballyKnown) result;
- }
-
- public void validateLocally() {
- LocallyValidatingAction action = new LocallyValidatingAction();
- withAllSubEntitiesDo(action);
- if (action.getException() != null) {
- throw action.getException();
- }
- }
-
- public abstract void validate(EntityReferenceValidator validator);
-
- protected abstract Entity getRoot();
-
- private final Map kinds;
- private String _systemId;
- private final Set importedDocuments;
- private final List importedEntities;
- private final Set includedDocuments;
- private final List includedEntities;
-
- private static class LocallyValidatingAction implements EntityAction {
- public LocallyValidatingAction() {
- }
-
- @Override
- public void perform(Entity entity) {
- try {
- entity.validateThis();
- entity.withAllSubEntitiesDo(this);
- } catch (ValidationException e) {
- if (_exception == null) {
- _exception = e;
- }
- }
- }
-
- public ValidationException getException() {
- return _exception;
- }
-
- private ValidationException _exception;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Defining.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Defining.java
deleted file mode 100644
index db6c3f94..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Defining.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-/**
- * An interface implemented by entities that define target namespaces.
- *
- * @author WS Development Team
- */
-public interface Defining extends Elemental {
- public String getTargetNamespaceURI();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/DuplicateEntityException.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/DuplicateEntityException.java
deleted file mode 100644
index 2e52aa42..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/DuplicateEntityException.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-/**
- * An exception signalling that an entity with the given name/id has already been defined.
- *
- * @author WS Development Team
- */
-public class DuplicateEntityException extends ValidationException {
-
- public DuplicateEntityException(GloballyKnown entity) {
- super(
- "entity.duplicateWithType",
- entity.getElementName().getLocalPart(),
- entity.getName());
- }
-
- public DuplicateEntityException(Identifiable entity) {
- super(
- "entity.duplicateWithType",
- entity.getElementName().getLocalPart(),
- entity.getID());
- }
-
- public DuplicateEntityException(Entity entity, String name) {
- super(
- "entity.duplicateWithType",
- entity.getElementName().getLocalPart(), name);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.tools.internal.ws.resources.wsdl";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Elemental.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Elemental.java
deleted file mode 100644
index ae099d85..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Elemental.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-
-/**
- * Interface implemented by classes that are mappable to XML elements.
- *
- * @author WS Development Team
- */
-public interface Elemental {
- public QName getElementName();
- public Locator getLocator();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Entity.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Entity.java
deleted file mode 100644
index 16c64e67..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Entity.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import org.xml.sax.Locator;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-
-/**
- * An entity, typically corresponding to an XML element.
- *
- * @author WS Development Team
- */
-public abstract class Entity implements Elemental {
-
- private final Locator locator;
- protected ErrorReceiver errorReceiver;
- public Entity(Locator locator) {
- this.locator = locator;
- }
-
- public void setErrorReceiver(ErrorReceiver errorReceiver) {
- this.errorReceiver = errorReceiver;
- }
-
- public Locator getLocator() {
- return locator;
- }
-
- public Object getProperty(String key) {
- if (_properties == null)
- return null;
- return _properties.get(key);
- }
-
- public void setProperty(String key, Object value) {
- if (value == null) {
- removeProperty(key);
- return;
- }
-
- if (_properties == null) {
- _properties = new HashMap();
- }
- _properties.put(key, value);
- }
-
- public void removeProperty(String key) {
- if (_properties != null) {
- _properties.remove(key);
- }
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- // no-op by default
- }
-
- public void withAllQNamesDo(QNameAction action) {
- action.perform(getElementName());
- }
-
- public void withAllEntityReferencesDo(EntityReferenceAction action) {
- // no-op by default
- }
-
- public abstract void validateThis();
-
- protected void failValidation(String key) {
- throw new ValidationException(key, getElementName().getLocalPart());
- }
-
- protected void failValidation(String key, String arg) {
- throw new ValidationException(
- key,
- new Object[] { arg, getElementName().getLocalPart()});
- }
-
- private Map _properties;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityAction.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityAction.java
deleted file mode 100644
index a4ed71ba..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityAction.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-/**
- * An action operating on an entity.
- *
- * @author WS Development Team
- */
-public interface EntityAction {
- public void perform(Entity entity);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceAction.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceAction.java
deleted file mode 100644
index 91bbe569..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import javax.xml.namespace.QName;
-
-/**
- * An action operating on an entity reference composed of a kind and a QName.
- *
- * @author WS Development Team
- */
-public interface EntityReferenceAction {
- public void perform(Kind kind, QName name);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceValidator.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceValidator.java
deleted file mode 100644
index 60119a1c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceValidator.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import javax.xml.namespace.QName;
-
-/**
- * An interface implemented by a class that is capable of validating
- * a QName/Kind pair referring to an external entity.
- *
- * @author WS Development Team
- */
-public interface EntityReferenceValidator {
- public boolean isValid(Kind kind, QName name);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensibilityHelper.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensibilityHelper.java
deleted file mode 100644
index dafe43c8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensibilityHelper.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * A helper class for extensible entities.
- *
- * @author WS Development Team
- */
-public class ExtensibilityHelper {
-
- public ExtensibilityHelper() {
- }
-
- public void addExtension(TWSDLExtension e) {
- if (_extensions == null) {
- _extensions = new ArrayList();
- }
- _extensions.add(e);
- }
-
- public Iterable<TWSDLExtension> extensions() {
- if (_extensions == null) {
- return new ArrayList<TWSDLExtension>();
- } else {
- return _extensions;
- }
- }
-
- public void withAllSubEntitiesDo(EntityAction action) {
- if (_extensions != null) {
- for (Iterator iter = _extensions.iterator(); iter.hasNext();) {
- action.perform((Entity) iter.next());
- }
- }
- }
-
- public void accept(ExtensionVisitor visitor) throws Exception {
- if (_extensions != null) {
- for (Iterator iter = _extensions.iterator(); iter.hasNext();) {
- ((ExtensionImpl) iter.next()).accept(visitor);
- }
- }
- }
-
- private List<TWSDLExtension> _extensions;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionImpl.java
deleted file mode 100644
index f0b24728..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionImpl.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import org.xml.sax.Locator;
-
-/**
- * An entity extending another entity.
- *
- * @author WS Development Team
- */
-public abstract class ExtensionImpl extends Entity implements TWSDLExtension {
-
- public ExtensionImpl(Locator locator) {
- super(locator);
- }
-
- public TWSDLExtensible getParent() {
- return _parent;
- }
-
- public void setParent(TWSDLExtensible parent) {
- _parent = parent;
- }
-
- public void accept(ExtensionVisitor visitor) throws Exception {
- visitor.preVisit(this);
- visitor.postVisit(this);
- }
-
- private TWSDLExtensible _parent;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitor.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitor.java
deleted file mode 100644
index 1ef84e70..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitor.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-
-/**
- * A visitor working on extension entities.
- *
- * @author WS Development Team
- */
-public interface ExtensionVisitor {
- public void preVisit(TWSDLExtension extension) throws Exception;
- public void postVisit(TWSDLExtension extension) throws Exception;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitorBase.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitorBase.java
deleted file mode 100644
index bc09ad4a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitorBase.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-
-/**
- * A base class for extension visitors.
- *
- * @author WS Development Team
- */
-public class ExtensionVisitorBase implements ExtensionVisitor {
- public ExtensionVisitorBase() {
- }
-
- public void preVisit(TWSDLExtension extension) throws Exception {
- }
- public void postVisit(TWSDLExtension extension) throws Exception {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExternalEntityReference.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExternalEntityReference.java
deleted file mode 100644
index 47415cde..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExternalEntityReference.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import javax.xml.namespace.QName;
-
-/**
- * A reference to a globally known entity in a document.
- *
- * @author WS Development Team
- */
-public class ExternalEntityReference {
-
- public ExternalEntityReference(
- AbstractDocument document,
- Kind kind,
- QName name) {
- _document = document;
- _kind = kind;
- _name = name;
- }
-
- public AbstractDocument getDocument() {
- return _document;
- }
-
- public Kind getKind() {
- return _kind;
- }
-
- public QName getName() {
- return _name;
- }
-
- public GloballyKnown resolve() {
- return _document.find(_kind, _name);
- }
-
- private AbstractDocument _document;
- private Kind _kind;
- private QName _name;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GlobalEntity.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GlobalEntity.java
deleted file mode 100644
index be5bbdc8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GlobalEntity.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import org.xml.sax.Locator;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-
-/**
- * An entity that can be defined in a target namespace.
- *
- * @author WS Development Team
- */
-public abstract class GlobalEntity extends Entity implements GloballyKnown {
-
- public GlobalEntity(Defining defining, Locator locator, ErrorReceiver errorReceiver) {
- super(locator);
- _defining = defining;
- this.errorReceiver = errorReceiver;
- }
-
- public String getName() {
- return _name;
- }
-
- public void setName(String name) {
- _name = name;
- }
-
- public abstract Kind getKind();
-
- public Defining getDefining() {
- return _defining;
- }
-
- private Defining _defining;
- private String _name;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GloballyKnown.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GloballyKnown.java
deleted file mode 100644
index 24d3cc37..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GloballyKnown.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-/**
- * An interface implemented by entities which can be defined in a target namespace.
- *
- * @author WS Development Team
- */
-public interface GloballyKnown extends Elemental {
- public String getName();
- public Kind getKind();
- public Defining getDefining();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Identifiable.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Identifiable.java
deleted file mode 100644
index 6afa8aa8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Identifiable.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-/**
- * An interface implemented by entities which have an ID.
- *
- * @author WS Development Team
- */
-public interface Identifiable extends Elemental {
- public String getID();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Kind.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Kind.java
deleted file mode 100644
index 03963be3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Kind.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-/**
- * A kind of entity.
- *
- * @author WS Development Team
- */
-public final class Kind {
-
- public Kind(String s) {
- _name = s;
- }
-
- public String getName() {
- return _name;
- }
-
- private String _name;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/NoSuchEntityException.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/NoSuchEntityException.java
deleted file mode 100644
index 6c4f20ca..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/NoSuchEntityException.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import javax.xml.namespace.QName;
-
-/**
- * An exception signalling that an entity with the given name/id does not exist.
- *
- * @author WS Development Team
- */
-public class NoSuchEntityException extends ValidationException {
-
- public NoSuchEntityException(QName name) {
- super(
- "entity.notFoundByQName",
- name.getLocalPart(), name.getNamespaceURI());
- }
-
- public NoSuchEntityException(String id) {
- super("entity.notFoundByID", id);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.tools.internal.ws.resources.wsdl";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java
deleted file mode 100644
index 3cdb9844..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-/**
- * An exception signalling a parsing error.
- *
- * @author WS Development Team
- */
-public class ParseException extends JAXWSExceptionBase {
-
- public ParseException(String key, Object... args) {
- super(key, args);
- }
-
- public ParseException(Localizable message){
- super("localized.error", message);
- }
-
- public ParseException(Throwable throwable) {
- super(throwable);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.tools.internal.ws.resources.wsdl";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParserListener.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParserListener.java
deleted file mode 100644
index 26343edf..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParserListener.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import javax.xml.namespace.QName;
-
-/**
- * A listener for parsing-related events.
- *
- * @author WS Development Team
- */
-public interface ParserListener {
- public void ignoringExtension(Entity entity, QName name, QName parent);
- public void doneParsingEntity(QName element, Entity entity);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/QNameAction.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/QNameAction.java
deleted file mode 100644
index 5d1ba91a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/QNameAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import javax.xml.namespace.QName;
-
-/**
- * An action operating on a QName.
- *
- * @author WS Development Team
- */
-public interface QNameAction {
- public void perform(QName name);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/TWSDLParserContextImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/TWSDLParserContextImpl.java
deleted file mode 100644
index 238908d6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/TWSDLParserContextImpl.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext;
-import com.sun.tools.internal.ws.wsdl.parser.DOMForest;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import com.sun.xml.internal.ws.util.NamespaceSupport;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * The context used by parser classes.
- *
- * @author WS Development Team
- */
-public class TWSDLParserContextImpl implements TWSDLParserContext {
-
- private final static String PREFIX_XMLNS = "xmlns";
- private boolean _followImports;
- private final AbstractDocument _document;
- private final NamespaceSupport _nsSupport;
- private final ArrayList<ParserListener> _listeners;
- private final WSDLLocation _wsdlLocation;
- private final DOMForest forest;
- private final ErrorReceiver errorReceiver;
-
- public TWSDLParserContextImpl(DOMForest forest, AbstractDocument doc, ArrayList<ParserListener> listeners, ErrorReceiver errReceiver) {
- this._document = doc;
- this._listeners = listeners;
- this._nsSupport = new NamespaceSupport();
- this._wsdlLocation = new WSDLLocation();
- this.forest = forest;
- this.errorReceiver = errReceiver;
- }
-
- public AbstractDocument getDocument() {
- return _document;
- }
-
- public boolean getFollowImports() {
- return _followImports;
- }
-
- public void setFollowImports(boolean b) {
- _followImports = b;
- }
-
- public void push() {
- _nsSupport.pushContext();
- }
-
- public void pop() {
- _nsSupport.popContext();
- }
-
- public String getNamespaceURI(String prefix) {
- return _nsSupport.getURI(prefix);
- }
-
- public Iterable<String> getPrefixes() {
- return _nsSupport.getPrefixes();
- }
-
- public String getDefaultNamespaceURI() {
- return getNamespaceURI("");
- }
-
- public void registerNamespaces(Element e) {
- for (Iterator iter = XmlUtil.getAllAttributes(e); iter.hasNext();) {
- Attr a = (Attr) iter.next();
- if (a.getName().equals(PREFIX_XMLNS)) {
- // default namespace declaration
- _nsSupport.declarePrefix("", a.getValue());
- } else {
- String prefix = XmlUtil.getPrefix(a.getName());
- if (prefix != null && prefix.equals(PREFIX_XMLNS)) {
- String nsPrefix = XmlUtil.getLocalPart(a.getName());
- String uri = a.getValue();
- _nsSupport.declarePrefix(nsPrefix, uri);
- }
- }
- }
- }
-
- public Locator getLocation(Element e) {
- return forest.locatorTable.getStartLocation(e);
- }
-
- public QName translateQualifiedName(Locator locator, String s) {
- if (s == null)
- return null;
-
- String prefix = XmlUtil.getPrefix(s);
- String uri = null;
-
- if (prefix == null) {
- uri = getDefaultNamespaceURI();
- } else {
- uri = getNamespaceURI(prefix);
- if (uri == null) {
- errorReceiver.error(locator, WsdlMessages.PARSING_UNKNOWN_NAMESPACE_PREFIX(prefix));
- }
- }
-
- return new QName(uri, XmlUtil.getLocalPart(s));
- }
-
- public void fireIgnoringExtension(Element e, Entity entity) {
- QName name = new QName(e.getNamespaceURI(), e.getLocalName());
- QName parent = entity.getElementName();
- List _targets = null;
-
- synchronized (this) {
- if (_listeners != null) {
- _targets = (List) _listeners.clone();
- }
- }
-
- if (_targets != null) {
- for (Iterator iter = _targets.iterator(); iter.hasNext();) {
- ParserListener l = (ParserListener) iter.next();
- l.ignoringExtension(entity, name, parent);
- }
- }
- }
-
- public void fireDoneParsingEntity(QName element, Entity entity) {
- List _targets = null;
-
- synchronized (this) {
- if (_listeners != null) {
- _targets = (List) _listeners.clone();
- }
- }
-
- if (_targets != null) {
- for (Iterator iter = _targets.iterator(); iter.hasNext();) {
- ParserListener l = (ParserListener) iter.next();
- l.doneParsingEntity(element, entity);
- }
- }
- }
-
- //bug fix: 4856674, WSDLLocation context maintainence
- //and utility funcitons
- public void pushWSDLLocation() {
- _wsdlLocation.push();
- }
-
- public void popWSDLLocation() {
- _wsdlLocation.pop();
- }
-
- public void setWSDLLocation(String loc) {
- _wsdlLocation.setLocation(loc);
- }
-
- public String getWSDLLocation() {
- return _wsdlLocation.getLocation();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java
deleted file mode 100644
index f5a73c75..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-/**
- * An exception signalling that validation of an entity failed.
- *
- * @author WS Development Team
- */
-public class ValidationException extends JAXWSExceptionBase {
-
- public ValidationException(String key, Object... args) {
- super(key, args);
- }
-
- public ValidationException(Throwable throwable) {
- super(throwable);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.tools.internal.ws.resources.wsdl";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/WSDLLocation.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/WSDLLocation.java
deleted file mode 100644
index 234a8a38..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/WSDLLocation.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.framework;
-
-/**
- *
- * Maintains wsdl:location context. This is used with
- * TWSDLParserContextImpl, where one each WSDL being imported its location is pushed.
- *
- * @author WS Development Team
- */
-public class WSDLLocation {
- WSDLLocation() {
- reset();
- }
-
- public void push() {
- int max = contexts.length;
- idPos++;
- if (idPos >= max) {
- LocationContext newContexts[] = new LocationContext[max * 2];
- System.arraycopy(contexts, 0, newContexts, 0, max);
- contexts = newContexts;
- }
- currentContext = contexts[idPos];
- if (currentContext == null) {
- contexts[idPos] = currentContext = new LocationContext();
- }
- }
-
- public void pop() {
- idPos--;
- if (idPos >= 0) {
- currentContext = contexts[idPos];
- }
- }
-
- public final void reset() {
- contexts = new LocationContext[32];
- idPos = 0;
- contexts[idPos] = currentContext = new LocationContext();
- }
-
- public String getLocation() {
- return currentContext.getLocation();
- }
-
- public void setLocation(String loc) {
- currentContext.setLocation(loc);
- }
-
- private LocationContext[] contexts;
- private int idPos;
- private LocationContext currentContext;
-
- // LocationContext - inner class
- private static class LocationContext {
- void setLocation(String loc) {
- location = loc;
- }
-
- String getLocation() {
- return location;
- }
-
- private String location;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractExtensionHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractExtensionHandler.java
deleted file mode 100644
index 3ff3fe6f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractExtensionHandler.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensionHandler;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext;
-import com.sun.tools.internal.ws.wsdl.document.mime.MIMEConstants;
-import org.w3c.dom.Element;
-
-import java.util.Collections;
-import java.util.Map;
-
-/**
- * An abstract implementation class of {@link TWSDLExtensionHandler}
- *
- * @author Vivek Pandey
- */
-public abstract class AbstractExtensionHandler extends TWSDLExtensionHandler {
- private final Map<String, AbstractExtensionHandler> extensionHandlers;
- private final Map<String, AbstractExtensionHandler> unmodExtenHandlers;
-
- public AbstractExtensionHandler(Map<String, AbstractExtensionHandler> extensionHandlerMap) {
- this.extensionHandlers = extensionHandlerMap;
- this.unmodExtenHandlers = Collections.unmodifiableMap(extensionHandlers);
- }
-
- public Map<String, AbstractExtensionHandler> getExtensionHandlers(){
- return unmodExtenHandlers;
- }
-
- /**
- * Callback that gets called by the WSDL parser or any other extension handler on finding an extensibility element
- * that it can't understand.
- *
- * @param parent The Parent element within which the extensibility element is defined
- * @param e The extensibility elemenet
- * @return false if there was some error during the extension handling otherwise returns true. If returned false
- * then the WSDL parser can abort if the wsdl extensibility element had <code>required</code> attribute set to true
- */
- public boolean doHandleExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- if (parent.getWSDLElementName().equals(MIMEConstants.QNAME_PART)) {
- return handleMIMEPartExtension(context, parent, e);
- } else {
- return super.doHandleExtension(context, parent, e);
- }
- }
-
- /**
- * Callback for <code>wsdl:mime</code>
- *
- * @param context Parser context that will be passed on by the wsdl parser
- * @param parent The Parent element within which the extensibility element is defined
- * @param e The extensibility elemenet
- * @return false if there was some error during the extension handling otherwise returns true. If returned false
- * then the WSDL parser can abort if the wsdl extensibility element had <code>required</code> attribute set to true
- */
- protected boolean handleMIMEPartExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e){
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractReferenceFinderImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractReferenceFinderImpl.java
deleted file mode 100644
index c1f68a0f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractReferenceFinderImpl.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wsdl.parser;
-
-import com.sun.istack.internal.SAXParseException2;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-/**
- * XMLFilter that finds references to other schema files from
- * SAX events.
- *
- * This implementation is a base implementation for typical case
- * where we just need to look for a particular attribute which
- * contains an URL to another schema file.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- * Vivek Pandey
- */
-public abstract class AbstractReferenceFinderImpl extends XMLFilterImpl {
- protected final DOMForest parent;
-
- protected AbstractReferenceFinderImpl( DOMForest _parent ) {
- this.parent = _parent;
- }
-
- /**
- * IF the given element contains a reference to an external resource,
- * return its URL.
- *
- * @param nsURI
- * Namespace URI of the current element
- * @param localName
- * Local name of the current element
- * @return
- * It's OK to return a relative URL.
- */
- protected abstract String findExternalResource( String nsURI, String localName, Attributes atts);
-
- @Override
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
- throws SAXException {
- super.startElement(namespaceURI, localName, qName, atts);
-
- String relativeRef = findExternalResource(namespaceURI,localName,atts);
- if(relativeRef==null) return; // non found
-
- try {
- // absolutize URL.
- assert locator != null;
- String lsi = locator.getSystemId();
- String ref;
- if (lsi.startsWith("jar:")) {
- int bangIdx = lsi.indexOf('!');
- if (bangIdx > 0) {
- ref = new URL(new URL(lsi), relativeRef).toString();
- } else
- ref = relativeRef;
- } else
- ref = new URI(lsi).resolve(new URI(relativeRef)).toString();
-
- // then parse this schema as well,
- // but don't mark this document as a root.
- parent.parse(ref,false);
- } catch( URISyntaxException e ) {
- SAXParseException spe = new SAXParseException2(
- WsdlMessages.ABSTRACT_REFERENCE_FINDER_IMPL_UNABLE_TO_PARSE(relativeRef,e.getMessage()),
- locator, e );
-
- fatalError(spe);
- throw spe;
- } catch( IOException e ) {
- SAXParseException spe = new SAXParseException2(
- WsdlMessages.ABSTRACT_REFERENCE_FINDER_IMPL_UNABLE_TO_PARSE(relativeRef,e.getMessage()),
- locator, e );
-
- fatalError(spe);
- throw spe;
- }
- }
-
- private Locator locator;
-
- @Override
- public void setDocumentLocator(Locator locator) {
- super.setDocumentLocator(locator);
- this.locator = locator;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Constants.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Constants.java
deleted file mode 100644
index f369bfca..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Constants.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-/**
- * An interface defining constants needed to read and write WSDL documents.
- *
- * @author WS Development Team
- */
-public interface Constants {
- // WSDL element tags
- static final String TAG_BINDING = "binding";
- static final String TAG_DEFINITIONS = "definitions";
- static final String TAG_DOCUMENTATION = "documentation";
- static final String TAG_MESSAGE = "message";
- static final String TAG_PART = "part";
- static final String TAG_PORT_TYPE = "portType";
- static final String TAG_TYPES = "types";
- static final String TAG_OPERATION = "operation";
- static final String TAG_INPUT = "input";
- static final String TAG_OUTPUT = "output";
- static final String TAG_FAULT = "fault";
- static final String TAG_SERVICE = "service";
- static final String TAG_PORT = "port";
- static final String TAG_ = "";
-
- // WSDL attribute names
- static final String ATTR_ELEMENT = "element";
- static final String ATTR_NAME = "name";
- static final String ATTR_REQUIRED = "required";
- static final String ATTR_TARGET_NAMESPACE = "targetNamespace";
- static final String ATTR_TYPE = "type";
- static final String ATTR_MESSAGE = "message";
- static final String ATTR_BINDING = "binding";
- static final String ATTR_LOCATION = "location";
- static final String ATTR_TRANSPORT = "transport";
- static final String ATTR_STYLE = "style";
- static final String ATTR_USE = "use";
- static final String ATTR_NAMESPACE = "namespace";
- static final String ATTR_ENCODING_STYLE = "encodingStyle";
- static final String ATTR_PART = "part";
- static final String ATTR_PARTS = "parts";
- static final String ATTR_SOAP_ACTION = "soapAction";
- static final String ATTR_PARAMETER_ORDER = "parameterOrder";
- static final String ATTR_VERB = "verb";
-
- // schema attribute names
- static final String ATTR_ID = "id";
- static final String ATTR_VERSION = "version";
- static final String ATTR_ATTRIBUTE_FORM_DEFAULT = "attributeFormDefault";
- static final String ATTR_BLOCK_DEFAULT = "blockDefault";
- static final String ATTR_ELEMENT_FORM_DEFAULT = "elementFormDefault";
- static final String ATTR_FINAL_DEFAULT = "finalDefault";
- static final String ATTR_ABSTRACT = "abstract";
- static final String ATTR_NILLABLE = "nillable";
- static final String ATTR_DEFAULT = "default";
- static final String ATTR_FIXED = "fixed";
- static final String ATTR_FORM = "form";
- static final String ATTR_BLOCK = "block";
- static final String ATTR_FINAL = "final";
- static final String ATTR_REF = "ref";
- static final String ATTR_SUBSTITUTION_GROUP = "substitutionGroup";
- static final String ATTR_MIN_OCCURS = "minOccurs";
- static final String ATTR_MAX_OCCURS = "maxOccurs";
- static final String ATTR_PROCESS_CONTENTS = "processContents";
- static final String ATTR_MIXED = "mixed";
- static final String ATTR_BASE = "base";
- static final String ATTR_VALUE = "value";
- static final String ATTR_XPATH = "xpath";
- static final String ATTR_SCHEMA_LOCATION = "schemaLocation";
- static final String ATTR_REFER = "refer";
- static final String ATTR_ITEM_TYPE = "itemType";
- static final String ATTR_PUBLIC = "public";
- static final String ATTR_SYSTEM = "system";
- static final String ATTR_MEMBER_TYPES = "memberTypes";
- static final String ATTR_ = "";
-
- // WSDL attribute values
- static final String ATTRVALUE_RPC = "rpc";
- static final String ATTRVALUE_DOCUMENT = "document";
- static final String ATTRVALUE_LITERAL = "literal";
- static final String ATTRVALUE_ENCODED = "encoded";
-
- // schema attribute values
- static final String ATTRVALUE_QUALIFIED = "qualified";
- static final String ATTRVALUE_UNQUALIFIED = "unqualified";
- static final String ATTRVALUE_ALL = "#all";
- static final String ATTRVALUE_SUBSTITUTION = "substitution";
- static final String ATTRVALUE_EXTENSION = "extension";
- static final String ATTRVALUE_RESTRICTION = "restriction";
- static final String ATTRVALUE_LIST = "list";
- static final String ATTRVALUE_UNION = "union";
- static final String ATTRVALUE_UNBOUNDED = "unbounded";
- static final String ATTRVALUE_PROHIBITED = "prohibited";
- static final String ATTRVALUE_OPTIONAL = "optional";
- static final String ATTRVALUE_REQUIRED = "required";
- static final String ATTRVALUE_LAX = "lax";
- static final String ATTRVALUE_SKIP = "skip";
- static final String ATTRVALUE_STRICT = "strict";
- static final String ATTRVALUE_ANY = "##any";
- static final String ATTRVALUE_LOCAL = "##local";
- static final String ATTRVALUE_OTHER = "##other";
- static final String ATTRVALUE_TARGET_NAMESPACE = "##targetNamespace";
- static final String ATTRVALUE_ = "";
-
- // namespace URIs
- static final String NS_XML = "http://www.w3.org/XML/1998/namespace";
- static final String NS_XMLNS = "http://www.w3.org/2000/xmlns/";
- static final String NS_WSDL = "http://schemas.xmlsoap.org/wsdl/";
- static final String NS_WSDL_SOAP = "http://schemas.xmlsoap.org/wsdl/soap/";
- static final String NS_WSDL_SOAP12 = "http://schemas.xmlsoap.org/wsdl/soap12/";
- static final String NS_WSDL_HTTP = "http://schemas.xmlsoap.org/wsdl/http/";
- static final String NS_WSDL_MIME = "http://schemas.xmlsoap.org/wsdl/mime/";
- static final String NS_XSD = "http://www.w3.org/2001/XMLSchema";
- static final String NS_XSI = "http://www.w3.org/2001/XMLSchema-instance";
- static final String NS_ = "";
-
- // other constants
- static final String XMLNS = "xmlns";
- static final String TRUE = "true";
- static final String FALSE = "false";
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java
deleted file mode 100644
index 153b6118..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wsdl.parser;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-import java.util.WeakHashMap;
-
-/**
- * Simple utility ensuring that the value is cached only in case it is non-internal implementation
- */
-abstract class ContextClassloaderLocal<V> {
-
- private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
-
- private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<ClassLoader, V>();
-
- public V get() throws Error {
- ClassLoader tccl = getContextClassLoader();
- V instance = CACHE.get(tccl);
- if (instance == null) {
- instance = createNewInstance();
- CACHE.put(tccl, instance);
- }
- return instance;
- }
-
- public void set(V instance) {
- CACHE.put(getContextClassLoader(), instance);
- }
-
- protected abstract V initialValue() throws Exception;
-
- private V createNewInstance() {
- try {
- return initialValue();
- } catch (Exception e) {
- throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e);
- }
- }
-
- private static String format(String property, Object... args) {
- String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property);
- return MessageFormat.format(text, args);
- }
-
- private static ClassLoader getContextClassLoader() {
- return (ClassLoader)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- ClassLoader cl = null;
- try {
- cl = Thread.currentThread().getContextClassLoader();
- } catch (SecurityException ex) {
- }
- return cl;
- }
- });
- }
-}
-
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties
deleted file mode 100644
index 1a8fc17a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/ContextClassloaderLocal.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-# Error messages for ContextClassloaderLocal utility class
-FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0}
-
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMBuilder.java
deleted file mode 100644
index 6a9c76f6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMBuilder.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBindingsConstants;
-import com.sun.tools.internal.xjc.reader.internalizer.LocatorTable;
-import com.sun.xml.internal.bind.marshaller.SAX2DOMEx;
-import org.w3c.dom.Comment;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-
-import java.util.Set;
-
-/**
- * Builds DOM while keeping the location information.
- *
- * <p>
- * This class also looks for outer most &lt;jaxws:bindings>
- * customizations.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- * Vivek Pandey
- */
-class DOMBuilder extends SAX2DOMEx implements LexicalHandler {
- /**
- * Grows a DOM tree under the given document, and
- * stores location information to the given table.
- *
- * @param outerMostBindings
- * This set will receive newly found outermost
- * jaxb:bindings customizations.
- */
- public DOMBuilder( Document dom, LocatorTable ltable, Set outerMostBindings ) {
- super( dom );
- this.locatorTable = ltable;
- this.outerMostBindings = outerMostBindings;
- }
-
- /** Location information will be stored into this object. */
- private final LocatorTable locatorTable;
-
- private final Set outerMostBindings;
-
- private Locator locator;
-
- public void setDocumentLocator(Locator locator) {
- this.locator = locator;
- super.setDocumentLocator(locator);
- }
-
-
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts) {
- super.startElement(namespaceURI, localName, qName, atts);
-
- Element e = getCurrentElement();
- locatorTable.storeStartLocation( e, locator );
-
- // check if this element is an outer-most <jaxb:bindings>
- if( JAXWSBindingsConstants.JAXWS_BINDINGS.getNamespaceURI().equals(e.getNamespaceURI())
- && "bindings".equals(e.getLocalName()) ) {
-
- // if this is the root node (meaning that this file is an
- // external binding file) or if the parent is XML Schema element
- // (meaning that this is an "inlined" external binding)
- Node p = e.getParentNode();
- if( p instanceof Document) {
- outerMostBindings.add(e); // remember this value
- }
- }
- }
-
- public void endElement(String namespaceURI, String localName, String qName) {
- locatorTable.storeEndLocation( getCurrentElement(), locator );
- super.endElement(namespaceURI, localName, qName);
- }
-
- public void startDTD(String name, String publicId, String systemId) throws SAXException {}
-
- public void endDTD() throws SAXException {}
-
- public void startEntity(String name) throws SAXException {}
-
- public void endEntity(String name) throws SAXException {}
-
- public void startCDATA() throws SAXException {}
-
- public void endCDATA() throws SAXException {}
-
- public void comment(char[] ch, int start, int length) throws SAXException {
- //Element e = getCurrentElement(); // does not work as the comments at the top of the document would return Document Node
- // instead of Element
- Node parent = nodeStack.peek();
- Comment comment = document.createComment(new String(ch,start,length));
- parent.appendChild(comment);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java
deleted file mode 100644
index aed48abe..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wsdl.parser;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.tools.internal.ws.util.xml.XmlUtil;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.tools.internal.ws.wsdl.document.schema.SchemaConstants;
-import com.sun.tools.internal.xjc.reader.internalizer.LocatorTable;
-import com.sun.xml.internal.bind.marshaller.DataWriter;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.*;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.sax.SAXResult;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.net.*;
-import java.util.*;
-
-/**
- * @author Vivek Pandey
- */
-public class DOMForest {
- /**
- * To correctly feed documents to a schema parser, we need to remember
- * which documents (of the forest) were given as the root
- * documents, and which of them are read as included/imported
- * documents.
- * <p/>
- * <p/>
- * Set of system ids as strings.
- */
- protected final Set<String> rootDocuments = new HashSet<String>();
-
- /**
- * Contains wsdl:import(s)
- */
- protected final Set<String> externalReferences = new HashSet<String>();
-
- /**
- * actual data storage map&lt;SystemId,Document>.
- */
- protected final Map<String, Document> core = new HashMap<String, Document>();
- protected final ErrorReceiver errorReceiver;
-
- private final DocumentBuilder documentBuilder;
- private final SAXParserFactory parserFactory;
-
- /**
- * inlined schema elements inside wsdl:type section
- */
- protected final List<Element> inlinedSchemaElements = new ArrayList<Element>();
-
-
- /**
- * Stores location information for all the trees in this forest.
- */
- public final LocatorTable locatorTable = new LocatorTable();
-
- protected final EntityResolver entityResolver;
- /**
- * Stores all the outer-most &lt;jaxb:bindings> customizations.
- */
- public final Set<Element> outerMostBindings = new HashSet<Element>();
-
- /**
- * Schema language dependent part of the processing.
- */
- protected final InternalizationLogic logic;
- protected final WsimportOptions options;
-
- public DOMForest(InternalizationLogic logic, @NotNull EntityResolver entityResolver, WsimportOptions options, ErrorReceiver errReceiver) {
- this.options = options;
- this.entityResolver = entityResolver;
- this.errorReceiver = errReceiver;
- this.logic = logic;
- try {
- // secure xml processing can be switched off if input requires it
- boolean secureProcessingEnabled = options == null || !options.disableXmlSecurity;
- DocumentBuilderFactory dbf = XmlUtil.newDocumentBuilderFactory(secureProcessingEnabled);
- dbf.setNamespaceAware(true);
- this.documentBuilder = dbf.newDocumentBuilder();
-
- this.parserFactory = XmlUtil.newSAXParserFactory(secureProcessingEnabled);
- this.parserFactory.setNamespaceAware(true);
- } catch (ParserConfigurationException e) {
- throw new AssertionError(e);
- }
- }
-
- public List<Element> getInlinedSchemaElement() {
- return inlinedSchemaElements;
- }
-
- public @NotNull Document parse(InputSource source, boolean root) throws SAXException, IOException {
- if (source.getSystemId() == null)
- throw new IllegalArgumentException();
- return parse(source.getSystemId(), source, root);
- }
-
- /**
- * Parses an XML at the given location (
- * and XMLs referenced by it) into DOM trees
- * and stores them to this forest.
- *
- * @return the parsed DOM document object.
- */
- public Document parse(String systemId, boolean root) throws SAXException, IOException{
-
- systemId = normalizeSystemId(systemId);
-
- InputSource is = null;
-
- // allow entity resolver to find the actual byte stream.
- is = entityResolver.resolveEntity(null, systemId);
- if (is == null)
- is = new InputSource(systemId);
- else {
- resolvedCache.put(systemId, is.getSystemId());
- systemId=is.getSystemId();
- }
-
- if (core.containsKey(systemId)) {
- // this document has already been parsed. Just ignore.
- return core.get(systemId);
- }
-
- if(!root)
- addExternalReferences(systemId);
-
- // but we still use the original system Id as the key.
- return parse(systemId, is, root);
- }
- protected Map<String,String> resolvedCache = new HashMap<String,String>();
-
- public Map<String,String> getReferencedEntityMap() {
- return resolvedCache;
- }
- /**
- * Parses the given document and add it to the DOM forest.
- *
- * @return null if there was a parse error. otherwise non-null.
- */
- private @NotNull Document parse(String systemId, InputSource inputSource, boolean root) throws SAXException, IOException{
- Document dom = documentBuilder.newDocument();
-
- systemId = normalizeSystemId(systemId);
-
- // put into the map before growing a tree, to
- // prevent recursive reference from causing infinite loop.
- core.put(systemId, dom);
-
- dom.setDocumentURI(systemId);
- if (root)
- rootDocuments.add(systemId);
-
- try {
- XMLReader reader = createReader(dom);
-
- InputStream is = null;
- if(inputSource.getByteStream() == null){
- inputSource = entityResolver.resolveEntity(null, systemId);
- }
- reader.parse(inputSource);
- Element doc = dom.getDocumentElement();
- if (doc == null) {
- return null;
- }
- NodeList schemas = doc.getElementsByTagNameNS(SchemaConstants.NS_XSD, "schema");
- for (int i = 0; i < schemas.getLength(); i++) {
- inlinedSchemaElements.add((Element) schemas.item(i));
- }
- } catch (ParserConfigurationException e) {
- errorReceiver.error(e);
- throw new SAXException(e.getMessage());
- }
- resolvedCache.put(systemId, dom.getDocumentURI());
- return dom;
- }
-
- public void addExternalReferences(String ref) {
- if (!externalReferences.contains(ref))
- externalReferences.add(ref);
- }
-
-
- public Set<String> getExternalReferences() {
- return externalReferences;
- }
-
-
-
- public interface Handler extends ContentHandler {
- /**
- * Gets the DOM that was built.
- */
- public Document getDocument();
- }
-
- /**
- * Returns a {@link org.xml.sax.XMLReader} to parse a document into this DOM forest.
- * <p/>
- * This version requires that the DOM object to be created and registered
- * to the map beforehand.
- */
- private XMLReader createReader(Document dom) throws SAXException, ParserConfigurationException {
- XMLReader reader = parserFactory.newSAXParser().getXMLReader();
- DOMBuilder dombuilder = new DOMBuilder(dom, locatorTable, outerMostBindings);
- try {
- reader.setProperty("http://xml.org/sax/properties/lexical-handler", dombuilder);
- } catch(SAXException e) {
- errorReceiver.debug(e.getMessage());
- }
-
- ContentHandler handler = new WhitespaceStripper(dombuilder, errorReceiver, entityResolver);
- handler = new VersionChecker(handler, errorReceiver, entityResolver);
-
- // insert the reference finder so that
- // included/imported schemas will be also parsed
- XMLFilterImpl f = logic.createExternalReferenceFinder(this);
- f.setContentHandler(handler);
- if (errorReceiver != null)
- f.setErrorHandler(errorReceiver);
- f.setEntityResolver(entityResolver);
-
- reader.setContentHandler(f);
- if (errorReceiver != null)
- reader.setErrorHandler(errorReceiver);
- reader.setEntityResolver(entityResolver);
- return reader;
- }
-
- private String normalizeSystemId(String systemId) {
- try {
- systemId = new URI(systemId).normalize().toString();
- } catch (URISyntaxException e) {
- // leave the system ID untouched. In my experience URI is often too strict
- }
- return systemId;
- }
-
- boolean isExtensionMode() {
- return options.isExtensionMode();
- }
-
-
- /**
- * Gets the DOM tree associated with the specified system ID,
- * or null if none is found.
- */
- public Document get(String systemId) {
- Document doc = core.get(systemId);
-
- if (doc == null && systemId.startsWith("file:/") && !systemId.startsWith("file://")) {
- // As of JDK1.4, java.net.URL.toExternal method returns URLs like
- // "file:/abc/def/ghi" which is an incorrect file protocol URL according to RFC1738.
- // Some other correctly functioning parts return the correct URLs ("file:///abc/def/ghi"),
- // and this descripancy breaks DOM look up by system ID.
-
- // this extra check solves this problem.
- doc = core.get("file://" + systemId.substring(5));
- }
-
- if (doc == null && systemId.startsWith("file:")) {
- // on Windows, filenames are case insensitive.
- // perform case-insensitive search for improved user experience
- String systemPath = getPath(systemId);
- for (String key : core.keySet()) {
- if (key.startsWith("file:") && getPath(key).equalsIgnoreCase(systemPath)) {
- doc = core.get(key);
- break;
- }
- }
- }
-
- return doc;
- }
-
- /**
- * Strips off the leading 'file:///' portion from an URL.
- */
- private String getPath(String key) {
- key = key.substring(5); // skip 'file:'
- while (key.length() > 0 && key.charAt(0) == '/')
- key = key.substring(1);
- return key;
- }
-
- /**
- * Gets all the system IDs of the documents.
- */
- public String[] listSystemIDs() {
- return core.keySet().toArray(new String[core.keySet().size()]);
- }
-
- /**
- * Gets the system ID from which the given DOM is parsed.
- * <p/>
- * Poor-man's base URI.
- */
- public String getSystemId(Document dom) {
- for (Map.Entry<String, Document> e : core.entrySet()) {
- if (e.getValue() == dom)
- return e.getKey();
- }
- return null;
- }
-
- /**
- * Gets the first one (which is more or less random) in {@link #rootDocuments}.
- */
- public String getFirstRootDocument() {
- if(rootDocuments.isEmpty()) return null;
- return rootDocuments.iterator().next();
- }
-
- public Set<String> getRootDocuments() {
- return rootDocuments;
- }
-
- /**
- * Dumps the contents of the forest to the specified stream.
- * <p/>
- * This is a debug method. As such, error handling is sloppy.
- */
- public void dump(OutputStream out) throws IOException {
- try {
- // create identity transformer
- // secure xml processing can be switched off if input requires it
- boolean secureProcessingEnabled = options == null || !options.disableXmlSecurity;
- TransformerFactory tf = XmlUtil.newTransformerFactory(secureProcessingEnabled);
- Transformer it = tf.newTransformer();
-
- for (Map.Entry<String, Document> e : core.entrySet()) {
- out.write(("---<< " + e.getKey() + '\n').getBytes());
-
- DataWriter dw = new DataWriter(new OutputStreamWriter(out), null);
- dw.setIndentStep(" ");
- it.transform(new DOMSource(e.getValue()),
- new SAXResult(dw));
-
- out.write("\n\n\n".getBytes());
- }
- } catch (TransformerException e) {
- e.printStackTrace();
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestParser.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestParser.java
deleted file mode 100644
index 601ce437..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestParser.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import org.w3c.dom.Document;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-
-import com.sun.xml.internal.xsom.parser.XMLParser;
-
-/**
- * {@link XMLParser} implementation that
- * parses XML from a DOM forest instead of parsing it from
- * its original location.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- * @author Vivek Pandey
- */
-public class DOMForestParser implements XMLParser {
-
- /**
- * DOM forest to be "parsed".
- */
- private final DOMForest forest;
-
- /**
- * Scanner object will do the actual SAX events generation.
- */
- private final DOMForestScanner scanner;
-
- private final XMLParser fallbackParser;
-
- /**
- * @param fallbackParser This parser will be used when DOMForestParser needs to parse
- * documents that are not in the forest.
- */
- public DOMForestParser(DOMForest forest, XMLParser fallbackParser) {
- this.forest = forest;
- this.scanner = new DOMForestScanner(forest);
- this.fallbackParser = fallbackParser;
- }
-
-
- public void parse(InputSource source, ContentHandler handler, EntityResolver entityResolver, ErrorHandler errHandler) throws SAXException, IOException {
-
- }
-
- public void parse(InputSource source, ContentHandler handler, ErrorHandler errorHandler, EntityResolver entityResolver)
-
- throws SAXException, IOException {
- String systemId = source.getSystemId();
- Document dom = forest.get(systemId);
-
- if (dom == null) {
- // if no DOM tree is built for it,
- // let the fall back parser parse the original document.
- //
- // for example, XSOM parses datatypes.xsd (XML Schema part 2)
- // but this will never be built into the forest.
- fallbackParser.parse(source, handler, errorHandler, entityResolver);
- return;
- }
-
- scanner.scan(dom, handler);
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestScanner.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestScanner.java
deleted file mode 100644
index 2ebd9ad2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestScanner.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.xml.internal.bind.unmarshaller.DOMScanner;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * Produces a complete series of SAX events from any DOM node
- * in the DOMForest.
- *
- * <p>
- * This class hides a logic of re-associating {@link org.xml.sax.Locator}
- * to the generated SAX event stream.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class DOMForestScanner {
-
- private final DOMForest forest;
-
- /**
- * Scans DOM nodes of the given forest.
- *
- * DOM node parameters to the scan method must be a part of
- * this forest.
- */
- public DOMForestScanner( DOMForest _forest ) {
- this.forest = _forest;
- }
-
- /**
- * Generates the whole set of SAX events by treating
- * element e as if it's a root element.
- */
- public void scan( Element e, ContentHandler contentHandler ) throws SAXException {
- DOMScanner scanner = new DOMScanner();
-
- // insert the location resolver into the pipe line
- LocationResolver resolver = new LocationResolver(scanner);
- resolver.setContentHandler(contentHandler);
-
- // parse this DOM.
- scanner.setContentHandler(resolver);
- scanner.scan(e);
- }
-
- /**
- * Generates the whole set of SAX events from the given Document
- * in the DOMForest.
- */
- public void scan( Document d, ContentHandler contentHandler ) throws SAXException {
- scan( d.getDocumentElement(), contentHandler );
- }
-
- /**
- * Intercepts the invocation of the setDocumentLocator method
- * and passes itself as the locator.
- *
- * If the client calls one of the methods on the Locator interface,
- * use the LocatorTable to resolve the source location.
- */
- private class LocationResolver extends XMLFilterImpl implements Locator {
- LocationResolver( DOMScanner _parent ) {
- this.parent = _parent;
- }
-
- private final DOMScanner parent;
-
- /**
- * Flag that tells us whether we are processing a start element event
- * or an end element event.
- *
- * DOMScanner's getCurrentLocation method doesn't tell us which, but
- * this information is necessary to return the correct source line information.
- *
- * Thus we set this flag appropriately before we pass an event to
- * the next ContentHandler, thereby making it possible to figure
- * out which location to return.
- */
- private boolean inStart = false;
-
- public void setDocumentLocator(Locator locator) {
- // ignore one set by the parent.
-
- super.setDocumentLocator(this);
- }
-
- public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
- inStart = false;
- super.endElement(namespaceURI, localName, qName);
- }
-
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
- throws SAXException {
- inStart = true;
- super.startElement(namespaceURI, localName, qName, atts);
- }
-
-
-
-
- private Locator findLocator() {
- Node n = parent.getCurrentLocation();
- if( n instanceof Element ) {
- Element e = (Element)n;
- if( inStart )
- return forest.locatorTable.getStartLocation( e );
- else
- return forest.locatorTable.getEndLocation( e );
- }
- return null;
- }
-
- //
- //
- // Locator methods
- //
- //
- public int getColumnNumber() {
- Locator l = findLocator();
- if(l!=null) return l.getColumnNumber();
- return -1;
- }
-
- public int getLineNumber() {
- Locator l = findLocator();
- if(l!=null) return l.getLineNumber();
- return -1;
- }
-
- public String getPublicId() {
- Locator l = findLocator();
- if(l!=null) return l.getPublicId();
- return null;
- }
-
- public String getSystemId() {
- Locator l = findLocator();
- if(l!=null) return l.getSystemId();
- return null;
- }
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/HTTPExtensionHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/HTTPExtensionHandler.java
deleted file mode 100644
index d9391535..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/HTTPExtensionHandler.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext;
-import com.sun.tools.internal.ws.util.xml.XmlUtil;
-import com.sun.tools.internal.ws.wsdl.document.http.*;
-import org.w3c.dom.Element;
-
-import java.util.Map;
-
-/**
- * The HTTP extension handler for WSDL.
- *
- * @author WS Development Team
- */
-public class HTTPExtensionHandler extends AbstractExtensionHandler {
-
-
- public HTTPExtensionHandler(Map<String, AbstractExtensionHandler> extensionHandlerMap) {
- super(extensionHandlerMap);
- }
-
- public String getNamespaceURI() {
- return Constants.NS_WSDL_HTTP;
- }
-
- public boolean handleDefinitionsExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
-
- public boolean handleTypesExtension(
- com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
-
- public boolean handleBindingExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- if (XmlUtil.matchesTagNS(e, HTTPConstants.QNAME_BINDING)) {
- context.push();
- context.registerNamespaces(e);
-
- HTTPBinding binding = new HTTPBinding(context.getLocation(e));
-
- String verb = Util.getRequiredAttribute(e, Constants.ATTR_VERB);
- binding.setVerb(verb);
-
- parent.addExtension(binding);
- context.pop();
-// context.fireDoneParsingEntity(HTTPConstants.QNAME_BINDING, binding);
- return true;
- } else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
- }
-
- public boolean handleOperationExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- if (XmlUtil.matchesTagNS(e, HTTPConstants.QNAME_OPERATION)) {
- context.push();
- context.registerNamespaces(e);
-
- HTTPOperation operation = new HTTPOperation(context.getLocation(e));
-
- String location =
- Util.getRequiredAttribute(e, Constants.ATTR_LOCATION);
- operation.setLocation(location);
-
- parent.addExtension(operation);
- context.pop();
-// context.fireDoneParsingEntity(
-// HTTPConstants.QNAME_OPERATION,
-// operation);
- return true;
- } else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
- }
-
- public boolean handleInputExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- if (XmlUtil.matchesTagNS(e, HTTPConstants.QNAME_URL_ENCODED)) {
- parent.addExtension(new HTTPUrlEncoded(context.getLocation(e)));
- return true;
- } else if (
- XmlUtil.matchesTagNS(e, HTTPConstants.QNAME_URL_REPLACEMENT)) {
- parent.addExtension(new HTTPUrlReplacement(context.getLocation(e)));
- return true;
- } else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
- }
-
- public boolean handleOutputExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
-
- public boolean handleFaultExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
-
- public boolean handleServiceExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
-
- public boolean handlePortExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- if (XmlUtil.matchesTagNS(e, HTTPConstants.QNAME_ADDRESS)) {
- context.push();
- context.registerNamespaces(e);
-
- HTTPAddress address = new HTTPAddress(context.getLocation(e));
-
- String location =
- Util.getRequiredAttribute(e, Constants.ATTR_LOCATION);
- address.setLocation(location);
-
- parent.addExtension(address);
- context.pop();
-// context.fireDoneParsingEntity(HTTPConstants.QNAME_ADDRESS, address);
- return true;
- } else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
- }
-
- public boolean handlePortTypeExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/InternalizationLogic.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/InternalizationLogic.java
deleted file mode 100644
index 9dc1df41..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/InternalizationLogic.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import org.w3c.dom.Element;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * Encapsulates schema-language dependent internalization logic.
- *
- * {@link com.sun.tools.internal.xjc.reader.internalizer.Internalizer} and {@link DOMForest} are responsible for
- * doing schema language independent part, and this object is responsible
- * for schema language dependent part.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- * Vivek Pandey
- */
-public interface InternalizationLogic {
- /**
- * Creates a new instance of XMLFilter that can be used to
- * find references to external schemas.
- *
- * <p>
- * Schemas that are included/imported need to be a part of
- * {@link DOMForest}, and this filter will be expected to
- * find such references.
- *
- * <p>
- * Once such a reference is found, the filter is expected to
- * call the parse method of DOMForest.
- *
- * <p>
- * {@link DOMForest} will register ErrorHandler to the returned
- * object, so any error should be sent to that error handler.
- *
- * @return
- * This method returns {@link org.xml.sax.helpers.XMLFilterImpl} because
- * the filter has to be usable for two directions
- * (wrapping a reader and wrapping a ContentHandler)
- */
- XMLFilterImpl createExternalReferenceFinder( DOMForest parent );
-
- /**
- * Checks if the specified element is a valid target node
- * to attach a customization.
- *
- * @param parent
- * The owner DOMForest object. Probably useful only
- * to obtain context information, such as error handler.
- * @param bindings
- * &lt;jaxb:bindings> element or a customization element.
- * @return
- * true if it's OK, false if not.
- */
- boolean checkIfValidTargetNode( DOMForest parent, Element bindings, Element target );
-
- /**
- * Prepares an element that actually receives customizations.
- *
- * <p>
- * For example, in XML Schema, target nodes can be any schema
- * element but it is always the &lt;xsd:appinfo> element that
- * receives customization.
- *
- * @param target
- * The target node designated by the customization.
- * @return
- * Always return non-null valid object
- */
- Element refineSchemaTarget( Element target );
-
- /**
- * Prepares a WSDL element that actually receives customizations.
- *
- *
- * @param target
- * The target node designated by the customization.
- * @return
- * Always return non-null valid object
- */
- Element refineWSDLTarget( Element target );
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Internalizer.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Internalizer.java
deleted file mode 100644
index c153cce7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Internalizer.java
+++ /dev/null
@@ -1,522 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wsdl.parser;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.SAXParseException2;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBindingsConstants;
-import com.sun.tools.internal.xjc.util.DOMUtils;
-import com.sun.xml.internal.bind.v2.util.EditDistance;
-import com.sun.xml.internal.ws.util.DOMUtil;
-import com.sun.xml.internal.ws.util.JAXWSUtils;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import org.w3c.dom.*;
-import org.xml.sax.SAXParseException;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-
-/**
- * Internalizes external binding declarations.
- *
- * @author Vivek Pandey
- */
-public class Internalizer {
-
- private final XPath xpath = xpf.get().newXPath();
- private final DOMForest forest;
- private final ErrorReceiver errorReceiver;
-
- public Internalizer(DOMForest forest, WsimportOptions options, ErrorReceiver errorReceiver) {
- this.forest = forest;
- this.errorReceiver = errorReceiver;
- }
-
- public void transform() {
- for (Element jaxwsBinding : forest.outerMostBindings) {
- internalize(jaxwsBinding, jaxwsBinding);
- }
- }
-
- private static final ContextClassloaderLocal<XPathFactory> xpf = new ContextClassloaderLocal<XPathFactory>() {
- @Override
- protected XPathFactory initialValue() throws Exception {
- return XPathFactory.newInstance();
- }
- };
- /**
- * Validates attributes of a &lt;JAXWS:bindings> element.
- */
- private void validate(Element bindings) {
- NamedNodeMap atts = bindings.getAttributes();
- for (int i = 0; i < atts.getLength(); i++) {
- Attr a = (Attr) atts.item(i);
- if (a.getNamespaceURI() != null) {
- continue; // all foreign namespace OK.
- }
- if (a.getLocalName().equals("node")) {
- continue;
- }
- if (a.getLocalName().equals("wsdlLocation")) {
- continue;
- }
-
- // TODO: flag error for this undefined attribute
- }
- }
-
- private void internalize(Element bindings, Node inheritedTarget) {
- // start by the inherited target
- Node target = inheritedTarget;
-
- validate(bindings); // validate this node
-
- // look for @wsdlLocation
- if (isTopLevelBinding(bindings)) {
- String wsdlLocation;
- if (bindings.getAttributeNode("wsdlLocation") != null) {
- wsdlLocation = bindings.getAttribute("wsdlLocation");
-
- try {
- // absolutize this URI.
- // TODO: use the URI class
- // TODO: honor xml:base
- wsdlLocation = new URL(new URL(forest.getSystemId(bindings.getOwnerDocument())),
- wsdlLocation).toExternalForm();
- } catch (MalformedURLException e) {
- wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation));
- }
- } else {
- //the node does not have
- wsdlLocation = forest.getFirstRootDocument();
- }
- target = forest.get(wsdlLocation);
-
- if (target == null) {
- reportError(bindings, WsdlMessages.INTERNALIZER_INCORRECT_SCHEMA_REFERENCE(wsdlLocation, EditDistance.findNearest(wsdlLocation, forest.listSystemIDs())));
- return; // abort processing this <JAXWS:bindings>
- }
- }
-
- //if the target node is xs:schema, declare the jaxb version on it as latter on it will be
- //required by the inlined schema bindings
-
- Element element = DOMUtil.getFirstElementChild(target);
- if (element != null && element.getNamespaceURI().equals(Constants.NS_WSDL) && element.getLocalName().equals("definitions")) {
- //get all schema elements
- Element type = DOMUtils.getFirstChildElement(element, Constants.NS_WSDL, "types");
- if (type != null) {
- for (Element schemaElement : DOMUtils.getChildElements(type, Constants.NS_XSD, "schema")) {
- if (!schemaElement.hasAttributeNS(Constants.NS_XMLNS, "jaxb")) {
- schemaElement.setAttributeNS(Constants.NS_XMLNS, "xmlns:jaxb", JAXWSBindingsConstants.NS_JAXB_BINDINGS);
- }
-
- //add jaxb:bindings version info. Lets put it to 1.0, may need to change latter
- if (!schemaElement.hasAttributeNS(JAXWSBindingsConstants.NS_JAXB_BINDINGS, "version")) {
- schemaElement.setAttributeNS(JAXWSBindingsConstants.NS_JAXB_BINDINGS, "jaxb:version", JAXWSBindingsConstants.JAXB_BINDING_VERSION);
- }
- }
- }
- }
-
-
- NodeList targetNodes = null;
- boolean hasNode = true;
- boolean isToplevelBinding = isTopLevelBinding(bindings);
- if ((isJAXWSBindings(bindings) || isJAXBBindings(bindings)) && bindings.getAttributeNode("node") != null) {
- targetNodes = evaluateXPathMultiNode(bindings, target, bindings.getAttribute("node"), new NamespaceContextImpl(bindings));
- } else
- if (isJAXWSBindings(bindings) && (bindings.getAttributeNode("node") == null) && !isToplevelBinding) {
- hasNode = false;
- } else
- if (isGlobalBinding(bindings) && !isWSDLDefinition(target) && isTopLevelBinding(bindings.getParentNode())) {
- targetNodes = getWSDLDefintionNode(bindings, target);
- }
-
- //if target is null or empty it means the xpath evaluation has some problem,
- // just return
- if (targetNodes == null && hasNode && !isToplevelBinding) {
- return;
- }
-
- if (hasNode) {
- if (targetNodes != null) {
- for (int i = 0; i < targetNodes.getLength(); i++) {
- insertBinding(bindings, targetNodes.item(i));
- // look for child <JAXWS:bindings> and process them recursively
- Element[] children = getChildElements(bindings);
- for (Element child : children) {
- if ("bindings".equals(child.getLocalName())) {
- internalize(child, targetNodes.item(i));
- }
- }
- }
- }
- }
- if (targetNodes == null) {
- // look for child <JAXWS:bindings> and process them recursively
- Element[] children = getChildElements(bindings);
-
- for (Element child : children) {
- internalize(child, target);
- }
- }
- }
-
- /**
- * Moves JAXWS customizations under their respective target nodes.
- */
- private void insertBinding(@NotNull Element bindings, @NotNull Node target) {
- if ("bindings".equals(bindings.getLocalName())) {
- Element[] children = DOMUtils.getChildElements(bindings);
- for (Element item : children) {
- if ("bindings".equals(item.getLocalName())) {
- //done
- } else {
- moveUnder(item, (Element) target);
-
- }
- }
- } else {
- moveUnder(bindings, (Element) target);
- }
- }
-
- private NodeList getWSDLDefintionNode(Node bindings, Node target) {
- return evaluateXPathMultiNode(bindings, target, "wsdl:definitions",
- new NamespaceContext() {
- @Override
- public String getNamespaceURI(String prefix) {
- return "http://schemas.xmlsoap.org/wsdl/";
- }
-
- @Override
- public String getPrefix(String nsURI) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Iterator getPrefixes(String namespaceURI) {
- throw new UnsupportedOperationException();
- }
- });
- }
-
- private boolean isWSDLDefinition(Node target) {
- if (target == null) {
- return false;
- }
- String localName = target.getLocalName();
- String nsURI = target.getNamespaceURI();
- return fixNull(localName).equals("definitions") && fixNull(nsURI).equals("http://schemas.xmlsoap.org/wsdl/");
- }
-
- private boolean isTopLevelBinding(Node node) {
- return node.getOwnerDocument().getDocumentElement() == node;
- }
-
- private boolean isJAXWSBindings(Node bindings) {
- return (bindings.getNamespaceURI().equals(JAXWSBindingsConstants.NS_JAXWS_BINDINGS) && bindings.getLocalName().equals("bindings"));
- }
-
- private boolean isJAXBBindings(Node bindings) {
- return (bindings.getNamespaceURI().equals(JAXWSBindingsConstants.NS_JAXB_BINDINGS) && bindings.getLocalName().equals("bindings"));
- }
-
- private boolean isGlobalBinding(Node bindings) {
- if (bindings.getNamespaceURI() == null) {
- errorReceiver.warning(forest.locatorTable.getStartLocation((Element) bindings), WsdlMessages.INVALID_CUSTOMIZATION_NAMESPACE(bindings.getLocalName()));
- return false;
- }
- return (bindings.getNamespaceURI().equals(JAXWSBindingsConstants.NS_JAXWS_BINDINGS) &&
- (bindings.getLocalName().equals("package") ||
- bindings.getLocalName().equals("enableAsyncMapping") ||
- bindings.getLocalName().equals("enableAdditionalSOAPHeaderMapping") ||
- bindings.getLocalName().equals("enableWrapperStyle") ||
- bindings.getLocalName().equals("enableMIMEContent")));
- }
-
- private static Element[] getChildElements(Element parent) {
- ArrayList<Element> a = new ArrayList<Element>();
- NodeList children = parent.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- Node item = children.item(i);
- if (!(item instanceof Element)) {
- continue;
- }
- if (JAXWSBindingsConstants.NS_JAXWS_BINDINGS.equals(item.getNamespaceURI()) ||
- JAXWSBindingsConstants.NS_JAXB_BINDINGS.equals(item.getNamespaceURI())) {
- a.add((Element) item);
- }
- }
- return a.toArray(new Element[a.size()]);
- }
-
- private NodeList evaluateXPathMultiNode(Node bindings, Node target, String expression, NamespaceContext namespaceContext) {
- NodeList nlst;
- try {
- xpath.setNamespaceContext(namespaceContext);
- nlst = (NodeList) xpath.evaluate(expression, target, XPathConstants.NODESET);
- } catch (XPathExpressionException e) {
- reportError((Element) bindings, WsdlMessages.INTERNALIZER_X_PATH_EVALUATION_ERROR(e.getMessage()), e);
- return null; // abort processing this <jaxb:bindings>
- }
-
- if (nlst.getLength() == 0) {
- reportError((Element) bindings, WsdlMessages.INTERNALIZER_X_PATH_EVALUATES_TO_NO_TARGET(expression));
- return null; // abort
- }
-
- return nlst;
- }
-
- private boolean isJAXBBindingElement(Element e) {
- return fixNull(e.getNamespaceURI()).equals(JAXWSBindingsConstants.NS_JAXB_BINDINGS);
- }
-
- private boolean isJAXWSBindingElement(Element e) {
- return fixNull(e.getNamespaceURI()).equals(JAXWSBindingsConstants.NS_JAXWS_BINDINGS);
- }
-
- /**
- * Moves the "decl" node under the "target" node.
- *
- * @param decl A JAXWS customization element (e.g., &lt;JAXWS:class>)
- * @param target XML wsdl element under which the declaration should move.
- * For example, &lt;xs:element>
- */
- private void moveUnder(Element decl, Element target) {
-
- //if there is @node on decl and has a child element jaxb:bindings, move it under the target
- //Element jaxb = getJAXBBindingElement(decl);
- if (isJAXBBindingElement(decl)) {
- //add jaxb namespace declaration
- if (!target.hasAttributeNS(Constants.NS_XMLNS, "jaxb")) {
- target.setAttributeNS(Constants.NS_XMLNS, "xmlns:jaxb", JAXWSBindingsConstants.NS_JAXB_BINDINGS);
- }
-
- //add jaxb:bindings version info. Lets put it to 1.0, may need to change latter
- if (!target.hasAttributeNS(JAXWSBindingsConstants.NS_JAXB_BINDINGS, "version")) {
- target.setAttributeNS(JAXWSBindingsConstants.NS_JAXB_BINDINGS, "jaxb:version", JAXWSBindingsConstants.JAXB_BINDING_VERSION);
- }
-
- // HACK: allow XJC extension all the time. This allows people to specify
- // the <xjc:someExtension> in the external bindings. Otherwise users lack the ability
- // to specify jaxb:extensionBindingPrefixes, so it won't work.
- //
- // the current workaround is still problematic in the sense that
- // it can't support user-defined extensions. This needs more careful thought.
-
- //JAXB doesn't allow writing jaxb:extensionbindingPrefix anywhere other than root element so lets write only on <xs:schema>
- if (target.getLocalName().equals("schema") && target.getNamespaceURI().equals(Constants.NS_XSD) && !target.hasAttributeNS(JAXWSBindingsConstants.NS_JAXB_BINDINGS, "extensionBindingPrefixes")) {
- target.setAttributeNS(JAXWSBindingsConstants.NS_JAXB_BINDINGS, "jaxb:extensionBindingPrefixes", "xjc");
- target.setAttributeNS(Constants.NS_XMLNS, "xmlns:xjc", JAXWSBindingsConstants.NS_XJC_BINDINGS);
- }
-
- //insert xs:annotation/xs:appinfo where in jaxb:binding will be put
- target = refineSchemaTarget(target);
- copyInscopeNSAttributes(decl);
- } else if (isJAXWSBindingElement(decl)) {
- //add jaxb namespace declaration
- if (!target.hasAttributeNS(Constants.NS_XMLNS, "JAXWS")) {
- target.setAttributeNS(Constants.NS_XMLNS, "xmlns:JAXWS", JAXWSBindingsConstants.NS_JAXWS_BINDINGS);
- }
-
- //insert xs:annotation/xs:appinfo where in jaxb:binding will be put
- target = refineWSDLTarget(target);
- copyInscopeNSAttributes(decl);
- } else {
- return;
- }
-
- // finally move the declaration to the target node.
- if (target.getOwnerDocument() != decl.getOwnerDocument()) {
- // if they belong to different DOM documents, we need to clone them
- decl = (Element) target.getOwnerDocument().importNode(decl, true);
-
- }
-
- target.appendChild(decl);
- }
-
- /**
- * Copy in-scope namespace declarations of the decl node
- * to the decl node itself so that this move won't change
- * the in-scope namespace bindings.
- */
- private void copyInscopeNSAttributes(Element e) {
- Element p = e;
- Set<String> inscopes = new HashSet<String>();
- while (true) {
- NamedNodeMap atts = p.getAttributes();
- for (int i = 0; i < atts.getLength(); i++) {
- Attr a = (Attr) atts.item(i);
- if (Constants.NS_XMLNS.equals(a.getNamespaceURI())) {
- String prefix;
- if (a.getName().indexOf(':') == -1) {
- prefix = "";
- } else {
- prefix = a.getLocalName();
- }
-
- if (inscopes.add(prefix) && p != e) {
- // if this is the first time we see this namespace bindings,
- // copy the declaration.
- // if p==decl, there's no need to. Note that
- // we want to add prefix to inscopes even if p==Decl
-
- e.setAttributeNodeNS((Attr) a.cloneNode(true));
- }
- }
- }
-
- if (p.getParentNode() instanceof Document) {
- break;
- }
-
- p = (Element) p.getParentNode();
- }
-
- if (!inscopes.contains("")) {
- // if the default namespace was undeclared in the context of decl,
- // it must be explicitly set to "" since the new environment might
- // have a different default namespace URI.
- e.setAttributeNS(Constants.NS_XMLNS, "xmlns", "");
- }
- }
-
- public Element refineSchemaTarget(Element target) {
- // look for existing xs:annotation
- Element annotation = DOMUtils.getFirstChildElement(target, Constants.NS_XSD, "annotation");
- if (annotation == null) {
- // none exists. need to make one
- annotation = insertXMLSchemaElement(target, "annotation");
- }
-
- // then look for appinfo
- Element appinfo = DOMUtils.getFirstChildElement(annotation, Constants.NS_XSD, "appinfo");
- if (appinfo == null) {
- // none exists. need to make one
- appinfo = insertXMLSchemaElement(annotation, "appinfo");
- }
-
- return appinfo;
- }
-
- public Element refineWSDLTarget(Element target) {
- // look for existing xs:annotation
- Element JAXWSBindings = DOMUtils.getFirstChildElement(target, JAXWSBindingsConstants.NS_JAXWS_BINDINGS, "bindings");
- if (JAXWSBindings == null) {
- // none exists. need to make one
- JAXWSBindings = insertJAXWSBindingsElement(target, "bindings");
- }
- return JAXWSBindings;
- }
-
- /**
- * Creates a new XML Schema element of the given local name
- * and insert it as the first child of the given parent node.
- *
- * @return Newly create element.
- */
- private Element insertXMLSchemaElement(Element parent, String localName) {
- // use the same prefix as the parent node to avoid modifying
- // the namespace binding.
- String qname = parent.getTagName();
- int idx = qname.indexOf(':');
- if (idx == -1) {
- qname = localName;
- } else {
- qname = qname.substring(0, idx + 1) + localName;
- }
-
- Element child = parent.getOwnerDocument().createElementNS(Constants.NS_XSD, qname);
-
- NodeList children = parent.getChildNodes();
-
- if (children.getLength() == 0) {
- parent.appendChild(child);
- } else {
- parent.insertBefore(child, children.item(0));
- }
-
- return child;
- }
-
- private Element insertJAXWSBindingsElement(Element parent, String localName) {
- String qname = "JAXWS:" + localName;
-
- Element child = parent.getOwnerDocument().createElementNS(JAXWSBindingsConstants.NS_JAXWS_BINDINGS, qname);
-
- NodeList children = parent.getChildNodes();
-
- if (children.getLength() == 0) {
- parent.appendChild(child);
- } else {
- parent.insertBefore(child, children.item(0));
- }
-
- return child;
- }
-
- @NotNull
- static String fixNull(@Nullable String s) {
- if (s == null) {
- return "";
- } else {
- return s;
- }
- }
-
- private void reportError(Element errorSource, String formattedMsg) {
- reportError(errorSource, formattedMsg, null);
- }
-
- private void reportError(Element errorSource,
- String formattedMsg, Exception nestedException) {
-
- SAXParseException e = new SAXParseException2(formattedMsg,
- forest.locatorTable.getStartLocation(errorSource),
- nestedException);
- errorReceiver.error(e);
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/JAXWSBindingExtensionHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/JAXWSBindingExtensionHandler.java
deleted file mode 100644
index 0f122222..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/JAXWSBindingExtensionHandler.java
+++ /dev/null
@@ -1,661 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext;
-import com.sun.tools.internal.ws.util.xml.XmlUtil;
-import com.sun.tools.internal.ws.wsdl.document.*;
-import com.sun.tools.internal.ws.wsdl.document.jaxws.CustomName;
-import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBinding;
-import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBindingsConstants;
-import com.sun.tools.internal.ws.wsdl.document.jaxws.Parameter;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import javax.xml.xpath.*;
-import java.util.Iterator;
-import java.util.Map;
-
-
-/**
- * @author Vivek Pandey
- *
- * jaxws:bindings exension handler.
- *
- */
-public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler {
-
- // xml security enabled always, xpath used for parsing "part" attribute
- private static final ContextClassloaderLocal<XPathFactory> xpf = new ContextClassloaderLocal<XPathFactory>() {
- @Override
- protected XPathFactory initialValue() throws Exception {
- return XPathFactory.newInstance();
- }
- };
-
- private final XPath xpath = xpf.get().newXPath();
-
- public JAXWSBindingExtensionHandler(Map<String, AbstractExtensionHandler> extensionHandlerMap) {
- super(extensionHandlerMap);
- }
-
- /* (non-Javadoc)
- * @see AbstractExtensionHandler#getNamespaceURI()
- */
- @Override
- public String getNamespaceURI() {
- return JAXWSBindingsConstants.NS_JAXWS_BINDINGS;
- }
-
- /**
- * @param context
- * @param parent
- * @param e
- */
- private boolean parseGlobalJAXWSBindings(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- context.push();
- context.registerNamespaces(e);
-
- JAXWSBinding jaxwsBinding = getJAXWSExtension(parent);
- if(jaxwsBinding == null) {
- jaxwsBinding = new JAXWSBinding(context.getLocation(e));
- }
- String attr = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.WSDL_LOCATION_ATTR);
- if (attr != null) {
- jaxwsBinding.setWsdlLocation(attr);
- }
-
- attr = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.NODE_ATTR);
- if (attr != null) {
- jaxwsBinding.setNode(attr);
- }
-
- attr = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.VERSION_ATTR);
- if (attr != null) {
- jaxwsBinding.setVersion(attr);
- }
-
- for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){
- Element e2 = Util.nextElement(iter);
- if (e2 == null) {
- break;
- }
-
- if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.PACKAGE)) {
- parsePackage(context, jaxwsBinding, e2);
- if ((jaxwsBinding.getJaxwsPackage() != null) && (jaxwsBinding.getJaxwsPackage().getJavaDoc() != null)) {
- ((Definitions) parent).setDocumentation(new Documentation(jaxwsBinding.getJaxwsPackage().getJavaDoc()));
- }
- } else if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_WRAPPER_STYLE)) {
- parseWrapperStyle(context, jaxwsBinding, e2);
- } else if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_ASYNC_MAPPING)) {
- parseAsynMapping(context, jaxwsBinding, e2);
- } // else if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_ADDITIONAL_SOAPHEADER_MAPPING)){
- // parseAdditionalSOAPHeaderMapping(context, jaxwsBinding, e2);
- // }
- else if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_MIME_CONTENT)) {
- parseMimeContent(context, jaxwsBinding, e2);
- } else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e2.getTagName(),
- e2.getNamespaceURI());
- return false;
- }
- }
- parent.addExtension(jaxwsBinding);
- context.pop();
-// context.fireDoneParsingEntity(
-// JAXWSBindingsConstants.JAXWS_BINDINGS,
-// jaxwsBinding);
- return true;
- }
-
- private static JAXWSBinding getJAXWSExtension(TWSDLExtensible extensible) {
- for (TWSDLExtension extension:extensible.extensions()) {
- if (extension.getClass().equals(JAXWSBinding.class)) {
- return (JAXWSBinding)extension;
- }
- }
-
- return null;
- }
-
- /**
- * @param context
- * @param parent
- * @param e
- */
- private void parseProvider(com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding parent, Element e) {
- String val = e.getTextContent();
- if (val == null) {
- return;
- }
- if (val.equals("false") || val.equals("0")) {
- ((JAXWSBinding)parent).setProvider(Boolean.FALSE);
- } else if(val.equals("true") || val.equals("1")) {
- ((JAXWSBinding)parent).setProvider(Boolean.TRUE);
- }
-
- }
-
- /**
- * @param context
- * @param parent
- * @param e
- */
- private void parsePackage(com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding parent, Element e) {
- //System.out.println("In handlePackageExtension: " + e.getNodeName());
- String packageName = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.NAME_ATTR);
- JAXWSBinding binding = (JAXWSBinding)parent;
- binding.setJaxwsPackage(new CustomName(packageName, getJavaDoc(e)));
- }
-
- /**
- * @param context
- * @param parent
- * @param e
- */
- private void parseWrapperStyle(com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding parent, Element e) {
- //System.out.println("In handleWrapperStyleExtension: " + e.getNodeName());
- String val = e.getTextContent();
- if (val == null) {
- return;
- }
- if (val.equals("false") || val.equals("0")) {
- ((JAXWSBinding) parent).setEnableWrapperStyle(Boolean.FALSE);
- } else if (val.equals("true") || val.equals("1")) {
- ((JAXWSBinding) parent).setEnableWrapperStyle(Boolean.TRUE);
- }
- }
-
- /**
- * @param context
- * @param parent
- * @param e
- */
-// private void parseAdditionalSOAPHeaderMapping(TWSDLParserContextImpl context, TWSDLExtensible parent, Element e) {
-// //System.out.println("In handleAdditionalSOAPHeaderExtension: " + e.getNodeName());
-// String val = e.getTextContent();
-// if(val == null)
-// return;
-// if(val.equals("false") || val.equals("0")){
-// ((JAXWSBinding)parent).setEnableAdditionalHeaderMapping(Boolean.FALSE);
-// }else if(val.equals("true") || val.equals("1")){
-// ((JAXWSBinding)parent).setEnableAdditionalHeaderMapping(Boolean.TRUE);
-// }
-// }
-
- /**
- * @param context
- * @param parent
- * @param e
- */
- private void parseAsynMapping(com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding parent, Element e) {
- //System.out.println("In handleAsynMappingExtension: " + e.getNodeName());
- String val = e.getTextContent();
- if (val == null) {
- return;
- }
- if (val.equals("false") || val.equals("0")) {
- ((JAXWSBinding) parent).setEnableAsyncMapping(Boolean.FALSE);
- } else if (val.equals("true") || val.equals("1")) {
- ((JAXWSBinding) parent).setEnableAsyncMapping(Boolean.TRUE);
- }
- }
-
- /**
- * @param context
- * @param parent
- * @param e
- */
- private void parseMimeContent(com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding parent, Element e) {
- //System.out.println("In handleMimeContentExtension: " + e.getNodeName());
- String val = e.getTextContent();
- if (val == null) {
- return;
- }
- if (val.equals("false") || val.equals("0")) {
- ((JAXWSBinding) parent).setEnableMimeContentMapping(Boolean.FALSE);
- } else if (val.equals("true") || val.equals("1")) {
- ((JAXWSBinding) parent).setEnableMimeContentMapping(Boolean.TRUE);
- }
- }
-
- /**
- * @param context
- * @param jaxwsBinding
- * @param e
- */
- private void parseMethod(com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding jaxwsBinding, Element e) {
- String methodName = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.NAME_ATTR);
- String javaDoc = getJavaDoc(e);
- CustomName name = new CustomName(methodName, javaDoc);
- jaxwsBinding.setMethodName(name);
- }
-
- /**
- * @param context
- * @param jaxwsBinding
- * @param e
- */
- private void parseParameter(com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding jaxwsBinding, Element e) {
- String part = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.PART_ATTR);
- Element msgPartElm = evaluateXPathNode(e.getOwnerDocument(), part, new NamespaceContextImpl(e));
- Node msgElm = msgPartElm.getParentNode();
- //MessagePart msgPart = new MessagePart();
-
- String partName = XmlUtil.getAttributeOrNull(msgPartElm, "name");
- String msgName = XmlUtil.getAttributeOrNull((Element)msgElm, "name");
- if ((partName == null) || (msgName == null)) {
- return;
- }
-
- String element = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.ELEMENT_ATTR);
- String name = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.NAME_ATTR);
-
- QName elementName = null;
- if(element != null){
- String uri = e.lookupNamespaceURI(XmlUtil.getPrefix(element));
- elementName = (uri == null)?null:new QName(uri, XmlUtil.getLocalPart(element));
- }
-
- jaxwsBinding.addParameter(new Parameter(msgName, partName, elementName, name));
- }
-
- private Element evaluateXPathNode(Node target, String expression, NamespaceContext namespaceContext) {
- NodeList nlst;
- try {
- xpath.setNamespaceContext(namespaceContext);
- nlst = (NodeList)xpath.evaluate(expression, target, XPathConstants.NODESET);
- } catch (XPathExpressionException e) {
- Util.fail("internalizer.XPathEvaluationError", e.getMessage());
- return null; // abort processing this <jaxb:bindings>
- }
-
- if( nlst.getLength()==0 ) {
- Util.fail("internalizer.XPathEvaluatesToNoTarget", new Object[]{expression});
- return null; // abort
- }
-
- if( nlst.getLength()!=1 ) {
- Util.fail("internalizer.XPathEvaulatesToTooManyTargets", new Object[]{expression, nlst.getLength()});
- return null; // abort
- }
-
- Node rnode = nlst.item(0);
- if(!(rnode instanceof Element )) {
- Util.fail("internalizer.XPathEvaluatesToNonElement", new Object[]{expression});
- return null; // abort
- }
- return (Element)rnode;
- }
-
- /**
- * @param context
- * @param jaxwsBinding
- * @param e
- */
- private void parseClass(com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding jaxwsBinding, Element e) {
- String className = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.NAME_ATTR);
- String javaDoc = getJavaDoc(e);
- jaxwsBinding.setClassName(new CustomName(className, javaDoc));
- }
-
-
- @Override
- public boolean handleDefinitionsExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return parseGlobalJAXWSBindings(context, parent, e);
- }
-
- @Override
- public boolean handlePortTypeExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- if(XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)){
- context.push();
- context.registerNamespaces(e);
- JAXWSBinding jaxwsBinding = new JAXWSBinding(context.getLocation(e));
-
- for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){
- Element e2 = Util.nextElement(iter);
- if (e2 == null) {
- break;
- }
-
- if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_WRAPPER_STYLE)) {
- parseWrapperStyle(context, jaxwsBinding, e2);
- } else if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_ASYNC_MAPPING)) {
- parseAsynMapping(context, jaxwsBinding, e2);
- } else if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.CLASS)) {
- parseClass(context, jaxwsBinding, e2);
- if ((jaxwsBinding.getClassName() != null) && (jaxwsBinding.getClassName().getJavaDoc() != null) && (parent instanceof PortType)) {
- ((PortType) parent).setDocumentation(new Documentation(jaxwsBinding.getClassName().getJavaDoc()));
- }
- } else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e2.getTagName(),
- e2.getNamespaceURI());
- return false;
- }
- }
- parent.addExtension(jaxwsBinding);
- context.pop();
-// context.fireDoneParsingEntity(
-// JAXWSBindingsConstants.JAXWS_BINDINGS,
-// jaxwsBinding);
- return true;
- }else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
- }
-
- @Override
- public boolean handleOperationExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- if(XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)){
- if(parent instanceof Operation){
- return handlePortTypeOperation(context, (Operation)parent, e);
- }else if(parent instanceof BindingOperation){
- return handleBindingOperation(context, (BindingOperation)parent, e);
- }
- }else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
- return false;
- }
-
- private boolean handleBindingOperation(TWSDLParserContext context, BindingOperation operation, Element e) {
- if(XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)){
- context.push();
- context.registerNamespaces(e);
- JAXWSBinding jaxwsBinding = new JAXWSBinding(context.getLocation(e));
-
- for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){
- Element e2 = Util.nextElement(iter);
- if (e2 == null) {
- break;
- }
-
-// if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_ADDITIONAL_SOAPHEADER_MAPPING)){
-// parseAdditionalSOAPHeaderMapping(context, jaxwsBinding, e2);
-// }else
- if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_MIME_CONTENT)){
- parseMimeContent(context, jaxwsBinding, e2);
- }else if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.PARAMETER)){
- parseParameter(context, jaxwsBinding, e2);
- }else{
- Util.fail(
- "parsing.invalidExtensionElement",
- e2.getTagName(),
- e2.getNamespaceURI());
- return false;
- }
- }
- operation.addExtension(jaxwsBinding);
- context.pop();
-// context.fireDoneParsingEntity(
-// JAXWSBindingsConstants.JAXWS_BINDINGS,
-// jaxwsBinding);
- return true;
- }else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
- }
-
- private boolean handlePortTypeOperation(TWSDLParserContext context, Operation parent, Element e) {
- context.push();
- context.registerNamespaces(e);
- JAXWSBinding jaxwsBinding = new JAXWSBinding(context.getLocation(e));
-
- for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){
- Element e2 = Util.nextElement(iter);
- if (e2 == null) {
- break;
- }
-
- if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_WRAPPER_STYLE)){
- parseWrapperStyle(context, jaxwsBinding, e2);
- }else if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_ASYNC_MAPPING)){
- parseAsynMapping(context, jaxwsBinding, e2);
- }else if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.METHOD)){
- parseMethod(context, jaxwsBinding, e2);
- if((jaxwsBinding.getMethodName() != null) && (jaxwsBinding.getMethodName().getJavaDoc() != null)){
- parent.setDocumentation(new Documentation(jaxwsBinding.getMethodName().getJavaDoc()));
- }
- }else if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.PARAMETER)){
- parseParameter(context, jaxwsBinding, e2);
- }else{
- Util.fail(
- "parsing.invalidExtensionElement",
- e2.getTagName(),
- e2.getNamespaceURI());
- return false;
- }
- }
- parent.addExtension(jaxwsBinding);
- context.pop();
-// context.fireDoneParsingEntity(
-// JAXWSBindingsConstants.JAXWS_BINDINGS,
-// jaxwsBinding);
- return true;
- }
-
- @Override
- public boolean handleBindingExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- if(XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)){
- context.push();
- context.registerNamespaces(e);
- JAXWSBinding jaxwsBinding = new JAXWSBinding(context.getLocation(e));
-
- for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){
- Element e2 = Util.nextElement(iter);
- if (e2 == null) {
- break;
- }
-
-// if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_ADDITIONAL_SOAPHEADER_MAPPING)){
-// parseAdditionalSOAPHeaderMapping(context, jaxwsBinding, e2);
-// }else
- if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_MIME_CONTENT)){
- parseMimeContent(context, jaxwsBinding, e2);
- }else{
- Util.fail(
- "parsing.invalidExtensionElement",
- e2.getTagName(),
- e2.getNamespaceURI());
- return false;
- }
- }
- parent.addExtension(jaxwsBinding);
- context.pop();
-// context.fireDoneParsingEntity(
-// JAXWSBindingsConstants.JAXWS_BINDINGS,
-// jaxwsBinding);
- return true;
- }else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
- }
-
- /* (non-Javadoc)
- * @see ExtensionHandlerBase#handleFaultExtension(TWSDLParserContextImpl, TWSDLExtensible, org.w3c.dom.Element)
- */
- @Override
- public boolean handleFaultExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- if(XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)){
- context.push();
- context.registerNamespaces(e);
- JAXWSBinding jaxwsBinding = new JAXWSBinding(context.getLocation(e));
-
- for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){
- Element e2 = Util.nextElement(iter);
- if (e2 == null) {
- break;
- }
- if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.CLASS)){
- parseClass(context, jaxwsBinding, e2);
- if((jaxwsBinding.getClassName() != null) && (jaxwsBinding.getClassName().getJavaDoc() != null)){
- ((Fault)parent).setDocumentation(new Documentation(jaxwsBinding.getClassName().getJavaDoc()));
- }
- }else{
- Util.fail(
- "parsing.invalidExtensionElement",
- e2.getTagName(),
- e2.getNamespaceURI());
- return false;
- }
- }
- parent.addExtension(jaxwsBinding);
- context.pop();
-// context.fireDoneParsingEntity(
-// JAXWSBindingsConstants.JAXWS_BINDINGS,
-// jaxwsBinding);
- return true;
- }else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
- }
-
- @Override
- public boolean handleServiceExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- if(XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)){
- context.push();
- context.registerNamespaces(e);
- JAXWSBinding jaxwsBinding = new JAXWSBinding(context.getLocation(e));
-
- for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){
- Element e2 = Util.nextElement(iter);
- if (e2 == null) {
- break;
- }
- if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.CLASS)){
- parseClass(context, jaxwsBinding, e2);
- if((jaxwsBinding.getClassName() != null) && (jaxwsBinding.getClassName().getJavaDoc() != null)){
- ((Service)parent).setDocumentation(new Documentation(jaxwsBinding.getClassName().getJavaDoc()));
- }
- }else{
- Util.fail(
- "parsing.invalidExtensionElement",
- e2.getTagName(),
- e2.getNamespaceURI());
- return false;
- }
- }
- parent.addExtension(jaxwsBinding);
- context.pop();
-// context.fireDoneParsingEntity(
-// JAXWSBindingsConstants.JAXWS_BINDINGS,
-// jaxwsBinding);
- return true;
- }else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
- }
-
- @Override
- public boolean handlePortExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- if(XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)){
- context.push();
- context.registerNamespaces(e);
- JAXWSBinding jaxwsBinding = new JAXWSBinding(context.getLocation(e));
-
- for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){
- Element e2 = Util.nextElement(iter);
- if (e2 == null) {
- break;
- }
-
- if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.PROVIDER)){
- parseProvider(context, jaxwsBinding, e2);
- }else if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.METHOD)){
- parseMethod(context, jaxwsBinding, e2);
- if((jaxwsBinding.getMethodName() != null) && (jaxwsBinding.getMethodName().getJavaDoc() != null)){
- ((Port)parent).setDocumentation(new Documentation(jaxwsBinding.getMethodName().getJavaDoc()));
- }
- }else{
- Util.fail(
- "parsing.invalidExtensionElement",
- e2.getTagName(),
- e2.getNamespaceURI());
- return false;
- }
- }
- parent.addExtension(jaxwsBinding);
- context.pop();
-// context.fireDoneParsingEntity(
-// JAXWSBindingsConstants.JAXWS_BINDINGS,
-// jaxwsBinding);
- return true;
- }else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false;
- }
- }
-
- private String getJavaDoc(Element e){
- for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){
- Element e2 = Util.nextElement(iter);
- if (e2 == null) {
- break;
- }
- if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.JAVADOC)){
- return XmlUtil.getTextForNode(e2);
- }
- }
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MIMEExtensionHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MIMEExtensionHandler.java
deleted file mode 100644
index 784817a1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MIMEExtensionHandler.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext;
-import com.sun.tools.internal.ws.util.xml.XmlUtil;
-import com.sun.tools.internal.ws.wsdl.document.WSDLConstants;
-import com.sun.tools.internal.ws.wsdl.document.mime.*;
-import org.w3c.dom.Element;
-
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * The MIME extension handler for WSDL.
- *
- * @author WS Development Team
- */
-public class MIMEExtensionHandler extends AbstractExtensionHandler {
-
- public MIMEExtensionHandler(Map<String, AbstractExtensionHandler> extensionHandlerMap) {
- super(extensionHandlerMap);
- }
-
- public String getNamespaceURI() {
- return Constants.NS_WSDL_MIME;
- }
-
- @Override
- public boolean doHandleExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- if (parent.getWSDLElementName().equals(WSDLConstants.QNAME_OUTPUT)) {
- return handleInputOutputExtension(context, parent, e);
- } else if (parent.getWSDLElementName().equals(WSDLConstants.QNAME_INPUT)) {
- return handleInputOutputExtension(context, parent, e);
- } else if (parent.getWSDLElementName().equals(MIMEConstants.QNAME_PART)) {
- return handleMIMEPartExtension(context, parent, e);
- } else {
-// context.fireIgnoringExtension(
-// new QName(e.getNamespaceURI(), e.getLocalName()),
-// parent.getWSDLElementName());
- return false;
- }
- }
-
- protected boolean handleInputOutputExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- if (XmlUtil.matchesTagNS(e, MIMEConstants.QNAME_MULTIPART_RELATED)) {
- context.push();
- context.registerNamespaces(e);
-
- MIMEMultipartRelated mpr = new MIMEMultipartRelated(context.getLocation(e));
-
- for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
- Element e2 = Util.nextElement(iter);
- if (e2 == null)
- break;
-
- if (XmlUtil.matchesTagNS(e2, MIMEConstants.QNAME_PART)) {
- context.push();
- context.registerNamespaces(e2);
-
- MIMEPart part = new MIMEPart(context.getLocation(e2));
-
- String name =
- XmlUtil.getAttributeOrNull(e2, Constants.ATTR_NAME);
- if (name != null) {
- part.setName(name);
- }
-
- for (Iterator iter2 = XmlUtil.getAllChildren(e2);
- iter2.hasNext();
- ) {
- Element e3 = Util.nextElement(iter2);
- if (e3 == null)
- break;
-
- AbstractExtensionHandler h = getExtensionHandlers().get(e3.getNamespaceURI());
- boolean handled = false;
- if (h != null) {
- handled = h.doHandleExtension(context, part, e3);
- }
-
- if (!handled) {
- String required =
- XmlUtil.getAttributeNSOrNull(
- e3,
- Constants.ATTR_REQUIRED,
- Constants.NS_WSDL);
- if (required != null
- && required.equals(Constants.TRUE)) {
- Util.fail(
- "parsing.requiredExtensibilityElement",
- e3.getTagName(),
- e3.getNamespaceURI());
- } else {
-// context.fireIgnoringExtension(
-// new QName(
-// e3.getNamespaceURI(),
-// e3.getLocalName()),
-// part.getElementName());
- }
- }
- }
-
- mpr.add(part);
- context.pop();
-// context.fireDoneParsingEntity(
-// MIMEConstants.QNAME_PART,
-// part);
- } else {
- Util.fail(
- "parsing.invalidElement",
- e2.getTagName(),
- e2.getNamespaceURI());
- }
- }
-
- parent.addExtension(mpr);
- context.pop();
-// context.fireDoneParsingEntity(
-// MIMEConstants.QNAME_MULTIPART_RELATED,
-// mpr);
- return true;
- } else if (XmlUtil.matchesTagNS(e, MIMEConstants.QNAME_CONTENT)) {
- MIMEContent content = parseMIMEContent(context, e);
- parent.addExtension(content);
- return true;
- } else if (XmlUtil.matchesTagNS(e, MIMEConstants.QNAME_MIME_XML)) {
- MIMEXml mimeXml = parseMIMEXml(context, e);
- parent.addExtension(mimeXml);
- return true;
- } else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false; // keep compiler happy
- }
- }
-
- @Override
- protected boolean handleMIMEPartExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- if (XmlUtil.matchesTagNS(e, MIMEConstants.QNAME_CONTENT)) {
- MIMEContent content = parseMIMEContent(context, e);
- parent.addExtension(content);
- return true;
- } else if (XmlUtil.matchesTagNS(e, MIMEConstants.QNAME_MIME_XML)) {
- MIMEXml mimeXml = parseMIMEXml(context, e);
- parent.addExtension(mimeXml);
- return true;
- } else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false; // keep compiler happy
- }
- }
-
- protected MIMEContent parseMIMEContent(TWSDLParserContext context, Element e) {
- context.push();
- context.registerNamespaces(e);
-
- MIMEContent content = new MIMEContent(context.getLocation(e));
-
- String part = XmlUtil.getAttributeOrNull(e, Constants.ATTR_PART);
- if (part != null) {
- content.setPart(part);
- }
-
- String type = XmlUtil.getAttributeOrNull(e, Constants.ATTR_TYPE);
- if (type != null) {
- content.setType(type);
- }
-
- context.pop();
-// context.fireDoneParsingEntity(MIMEConstants.QNAME_CONTENT, content);
- return content;
- }
-
- protected MIMEXml parseMIMEXml(TWSDLParserContext context, Element e) {
- context.push();
- context.registerNamespaces(e);
-
- MIMEXml mimeXml = new MIMEXml(context.getLocation(e));
-
- String part = XmlUtil.getAttributeOrNull(e, Constants.ATTR_PART);
- if (part != null) {
- mimeXml.setPart(part);
- }
-
- context.pop();
-// context.fireDoneParsingEntity(MIMEConstants.QNAME_MIME_XML, mimeXml);
- return mimeXml;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MemberSubmissionAddressingExtensionHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MemberSubmissionAddressingExtensionHandler.java
deleted file mode 100644
index b22a38f6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MemberSubmissionAddressingExtensionHandler.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext;
-import com.sun.tools.internal.ws.resources.ModelerMessages;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import com.sun.tools.internal.ws.util.xml.XmlUtil;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wsdl.document.Fault;
-import com.sun.tools.internal.ws.wsdl.document.Input;
-import com.sun.tools.internal.ws.wsdl.document.Output;
-import com.sun.xml.internal.ws.addressing.W3CAddressingMetadataConstants;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.Map;
-
-import static com.sun.xml.internal.ws.addressing.v200408.MemberSubmissionAddressingConstants.WSA_ACTION_QNAME;
-
-/**
- * @author Arun Gupta
- */
-public class MemberSubmissionAddressingExtensionHandler extends W3CAddressingExtensionHandler {
-
- private ErrorReceiver errReceiver;
- private boolean extensionModeOn;
-
- public MemberSubmissionAddressingExtensionHandler(Map<String, AbstractExtensionHandler> extensionHandlerMap, ErrorReceiver env, boolean extensionModeOn) {
- super(extensionHandlerMap, env);
- this.errReceiver = env;
- this.extensionModeOn = extensionModeOn;
- }
-
- @Override
- public String getNamespaceURI() {
- return AddressingVersion.MEMBER.wsdlNsUri;
- }
-
- protected QName getWSDLExtensionQName() {
- return AddressingVersion.MEMBER.wsdlExtensionTag;
- }
-
- @Override
- public boolean handlePortExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- // ignore any extension elements
- return false;
- }
-
- @Override
- public boolean handleInputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- if (extensionModeOn) {
- warn(context.getLocation(e));
- String actionValue = XmlUtil.getAttributeNSOrNull(e, WSA_ACTION_QNAME);
- if (actionValue == null || actionValue.equals("")) {
- return warnEmptyAction(parent, context.getLocation(e));
- }
- ((Input) parent).setAction(actionValue);
- return true;
- } else {
- return fail(context.getLocation(e));
- }
- }
-
- private boolean fail(Locator location) {
- errReceiver.warning(location,
- ModelerMessages.WSDLMODELER_INVALID_IGNORING_MEMBER_SUBMISSION_ADDRESSING(
- AddressingVersion.MEMBER.nsUri, W3CAddressingMetadataConstants.WSAM_NAMESPACE_NAME));
- return false;
- }
-
- private void warn(Locator location) {
- errReceiver.warning(location,
- ModelerMessages.WSDLMODELER_WARNING_MEMBER_SUBMISSION_ADDRESSING_USED(
- AddressingVersion.MEMBER.nsUri, W3CAddressingMetadataConstants.WSAM_NAMESPACE_NAME));
- }
-
- @Override
- public boolean handleOutputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- if (extensionModeOn) {
- warn(context.getLocation(e));
- String actionValue = XmlUtil.getAttributeNSOrNull(e, WSA_ACTION_QNAME);
- if (actionValue == null || actionValue.equals("")) {
- return warnEmptyAction(parent, context.getLocation(e));
- }
- ((Output) parent).setAction(actionValue);
- return true;
- } else {
- return fail(context.getLocation(e));
- }
- }
-
- @Override
- public boolean handleFaultExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- if (extensionModeOn) {
- warn(context.getLocation(e));
- String actionValue = XmlUtil.getAttributeNSOrNull(e, WSA_ACTION_QNAME);
- if (actionValue == null || actionValue.equals("")) {
- errReceiver.warning(context.getLocation(e), WsdlMessages.WARNING_FAULT_EMPTY_ACTION(parent.getNameValue(), parent.getWSDLElementName().getLocalPart(), parent.getParent().getNameValue()));
- return false; // keep compiler happy
- }
- ((Fault) parent).setAction(actionValue);
- return true;
- } else {
- return fail(context.getLocation(e));
- }
- }
-
- private boolean warnEmptyAction(TWSDLExtensible parent, Locator pos) {
- errReceiver.warning(pos, WsdlMessages.WARNING_INPUT_OUTPUT_EMPTY_ACTION(parent.getWSDLElementName().getLocalPart(), parent.getParent().getNameValue()));
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java
deleted file mode 100644
index 5ee5554c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wsdl.parser;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.tools.internal.ws.resources.WscompileMessages;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import com.sun.tools.internal.ws.wscompile.AbortException;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.tools.internal.ws.wsdl.document.WSDLConstants;
-import com.sun.tools.internal.ws.wsdl.document.schema.SchemaConstants;
-import com.sun.tools.internal.ws.wsdl.framework.ParseException;
-import com.sun.xml.internal.ws.api.wsdl.parser.MetaDataResolver;
-import com.sun.xml.internal.ws.api.wsdl.parser.MetadataResolverFactory;
-import com.sun.xml.internal.ws.api.wsdl.parser.ServiceDescriptor;
-import com.sun.xml.internal.ws.util.DOMUtil;
-import com.sun.xml.internal.ws.util.JAXWSUtils;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.SSLSession;
-import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMSource;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.*;
-import java.util.*;
-
-/**
- * @author Vivek Pandey
- */
-public final class MetadataFinder extends DOMForest{
-
- public boolean isMexMetadata;
- private String rootWSDL;
- private final Set<String> rootWsdls = new HashSet<String>();
-
- public MetadataFinder(InternalizationLogic logic, WsimportOptions options, ErrorReceiver errReceiver) {
- super(logic, new WSEntityResolver(options,errReceiver), options, errReceiver);
-
- }
-
- @SuppressWarnings("element-type-mismatch")
- public void parseWSDL(){
- // parse source grammars
- for (InputSource value : options.getWSDLs()) {
- String systemID = value.getSystemId();
- errorReceiver.pollAbort();
-
- Document dom;
- Element doc;
-
- try {
- //if there is entity resolver use it
- if (options.entityResolver != null) {
- value = options.entityResolver.resolveEntity(null, systemID);
- }
- if (value == null) {
- value = new InputSource(systemID);
- }
- dom = parse(value, true);
-
- doc = dom.getDocumentElement();
- if (doc == null) {
- continue;
- }
- //if its not a WSDL document, retry with MEX
- if (doc.getNamespaceURI() == null || !doc.getNamespaceURI().equals(WSDLConstants.NS_WSDL) || !doc.getLocalName().equals("definitions")) {
- throw new SAXParseException(WsdlMessages.INVALID_WSDL(systemID,
- com.sun.xml.internal.ws.wsdl.parser.WSDLConstants.QNAME_DEFINITIONS, doc.getNodeName(), locatorTable.getStartLocation(doc).getLineNumber()), locatorTable.getStartLocation(doc));
- }
- } catch (FileNotFoundException e) {
- errorReceiver.error(WsdlMessages.FILE_NOT_FOUND(systemID), e);
- return;
- } catch (IOException e) {
- doc = getFromMetadataResolver(systemID, e);
- } catch (SAXParseException e) {
- doc = getFromMetadataResolver(systemID, e);
- } catch (SAXException e) {
- doc = getFromMetadataResolver(systemID, e);
- }
-
- if (doc == null) {
- continue;
- }
-
- NodeList schemas = doc.getElementsByTagNameNS(SchemaConstants.NS_XSD, "schema");
- for (int i = 0; i < schemas.getLength(); i++) {
- if (!inlinedSchemaElements.contains(schemas.item(i))) {
- inlinedSchemaElements.add((Element) schemas.item(i));
- }
- }
- }
- identifyRootWsdls();
- }
-
- public static class WSEntityResolver implements EntityResolver {
- WsimportOptions options;
- ErrorReceiver errorReceiver;
-
- private URLConnection c = null;
- private boolean doReset = false;
-
- public WSEntityResolver(WsimportOptions options, ErrorReceiver errReceiver) {
- this.options = options;
- this.errorReceiver = errReceiver;
- }
-
- @Override
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
- InputSource inputSource = null;
-
- if(options.entityResolver != null ) {
- inputSource = options.entityResolver.resolveEntity(null, systemId);
- }
- if (inputSource == null) {
- inputSource = new InputSource(systemId);
- InputStream is = null;
- int redirects = 0;
- boolean redirect;
- URL url = JAXWSUtils.getFileOrURL(inputSource.getSystemId());
- URLConnection conn = url.openConnection();
- do {
- if (conn instanceof HttpsURLConnection) {
- if (options.disableSSLHostnameVerification) {
- ((HttpsURLConnection) conn).setHostnameVerifier(new HttpClientVerifier());
- }
- }
- redirect = false;
- if (conn instanceof HttpURLConnection) {
- ((HttpURLConnection) conn).setInstanceFollowRedirects(false);
- }
-
- if (conn instanceof JarURLConnection) {
- if (conn.getUseCaches()) {
- doReset = true;
- conn.setDefaultUseCaches(false);
- c = conn;
- }
- }
-
- try {
- is = conn.getInputStream();
- //is = sun.net.www.protocol.http.HttpURLConnection.openConnectionCheckRedirects(conn);
- } catch (IOException e) {
- if (conn instanceof HttpURLConnection) {
- HttpURLConnection httpConn = ((HttpURLConnection) conn);
- int code = httpConn.getResponseCode();
- if (code == 401) {
- errorReceiver.error(new SAXParseException(WscompileMessages.WSIMPORT_AUTH_INFO_NEEDED(e.getMessage(),
- systemId, WsimportOptions.defaultAuthfile), null, e));
- throw new AbortException();
- }
- //FOR other code we will retry with MEX
- }
- throw e;
- }
-
- //handle 302 or 303, JDK does not seem to handle 302 very well.
- //Need to redesign this a bit as we need to throw better error message for IOException in this case
- if (conn instanceof HttpURLConnection) {
- HttpURLConnection httpConn = ((HttpURLConnection) conn);
- int code = httpConn.getResponseCode();
- if (code == 302 || code == 303) {
- //retry with the value in Location header
- List<String> seeOther = httpConn.getHeaderFields().get("Location");
- if (seeOther != null && seeOther.size() > 0) {
- URL newurl = new URL(url, seeOther.get(0));
- if (!newurl.equals(url)) {
- errorReceiver.info(new SAXParseException(WscompileMessages.WSIMPORT_HTTP_REDIRECT(code, seeOther.get(0)), null));
- url = newurl;
- httpConn.disconnect();
- if (redirects >= 5) {
- errorReceiver.error(new SAXParseException(WscompileMessages.WSIMPORT_MAX_REDIRECT_ATTEMPT(), null));
- throw new AbortException();
- }
- conn = url.openConnection();
- inputSource.setSystemId(url.toExternalForm());
- redirects++;
- redirect = true;
- }
- }
- }
- }
- } while (redirect);
- inputSource.setByteStream(is);
- }
-
- return inputSource;
- }
-
- @Override
- protected void finalize() throws Throwable {
- //see http://java.net/jira/browse/JAX_WS-1087
- if (doReset) {
- c.setDefaultUseCaches(true);
- }
- }
- }
-
- // overide default SSL HttpClientVerifier to always return true
- // effectively overiding Hostname client verification when using SSL
- private static class HttpClientVerifier implements HostnameVerifier {
- @Override
- public boolean verify(String s, SSLSession sslSession) {
- return true;
- }
- }
-
- /**
- * Gives the root wsdl document systemId. A root wsdl document is the one which has wsdl:service.
- * @return null if there is no root wsdl
- */
- public @Nullable
- String getRootWSDL(){
- return rootWSDL;
- }
-
- /**
- * Gives all the WSDL documents.
- */
- public @NotNull
- Set<String> getRootWSDLs(){
- return rootWsdls;
- }
-
-
- /**
- * Identifies WSDL documents from the {@link DOMForest}. Also identifies the root wsdl document.
- */
- private void identifyRootWsdls(){
- for(String location: rootDocuments){
- Document doc = get(location);
- if(doc!=null){
- Element definition = doc.getDocumentElement();
- if(definition == null || definition.getLocalName() == null || definition.getNamespaceURI() == null)
- continue;
- if(definition.getNamespaceURI().equals(WSDLConstants.NS_WSDL) && definition.getLocalName().equals("definitions")){
- rootWsdls.add(location);
- //set the root wsdl at this point. Root wsdl is one which has wsdl:service in it
- NodeList nl = definition.getElementsByTagNameNS(WSDLConstants.NS_WSDL, "service");
-
- //TODO:what if there are more than one wsdl with wsdl:service element. Probably such cases
- //are rare and we will take any one of them, this logic should still work
- if(nl.getLength() > 0)
- rootWSDL = location;
- }
- }
- }
- //no wsdl with wsdl:service found, throw error
- if(rootWSDL == null){
- StringBuilder strbuf = new StringBuilder();
- for(String str : rootWsdls){
- strbuf.append(str);
- strbuf.append('\n');
- }
- errorReceiver.error(null, WsdlMessages.FAILED_NOSERVICE(strbuf.toString()));
- }
- }
-
- /*
- * If source and target namespace are also passed in,
- * then if the mex resolver is found and it cannot get
- * the data, wsimport attempts to add ?wsdl to the
- * address and retrieve the data with a normal http get.
- * This behavior should only happen when trying a
- * mex request first.
- */
- private @Nullable Element getFromMetadataResolver(String systemId, Exception ex) {
- //try MEX
- MetaDataResolver resolver;
- ServiceDescriptor serviceDescriptor = null;
- for (MetadataResolverFactory resolverFactory : ServiceFinder.find(MetadataResolverFactory.class)) {
- resolver = resolverFactory.metadataResolver(options.entityResolver);
- try {
- serviceDescriptor = resolver.resolve(new URI(systemId));
- //we got the ServiceDescriptor, now break
- if (serviceDescriptor != null)
- break;
- } catch (URISyntaxException e) {
- throw new ParseException(e);
- }
- }
-
- if (serviceDescriptor != null) {
- errorReceiver.warning(new SAXParseException(WsdlMessages.TRY_WITH_MEX(ex.getMessage()), null, ex));
- return parseMetadata(systemId, serviceDescriptor);
- } else {
- errorReceiver.error(null, WsdlMessages.PARSING_UNABLE_TO_GET_METADATA(ex.getMessage(), WscompileMessages.WSIMPORT_NO_WSDL(systemId)), ex);
- }
- return null;
- }
-
- private Element parseMetadata(@NotNull String systemId, @NotNull ServiceDescriptor serviceDescriptor) {
- List<? extends Source> mexWsdls = serviceDescriptor.getWSDLs();
- List<? extends Source> mexSchemas = serviceDescriptor.getSchemas();
- Document root = null;
- for (Source src : mexWsdls) {
- if (src instanceof DOMSource) {
- Node n = ((DOMSource) src).getNode();
- Document doc;
- if (n.getNodeType() == Node.ELEMENT_NODE && n.getOwnerDocument() == null) {
- doc = DOMUtil.createDom();
- doc.importNode(n, true);
- } else {
- doc = n.getOwnerDocument();
- }
-
-// Element e = (n.getNodeType() == Node.ELEMENT_NODE)?(Element)n: DOMUtil.getFirstElementChild(n);
- if (root == null) {
- //check if its main wsdl, then set it to root
- NodeList nl = doc.getDocumentElement().getElementsByTagNameNS(WSDLConstants.NS_WSDL, "service");
- if (nl.getLength() > 0) {
- root = doc;
- rootWSDL = src.getSystemId();
- }
- }
- NodeList nl = doc.getDocumentElement().getElementsByTagNameNS(WSDLConstants.NS_WSDL, "import");
- for(int i = 0; i < nl.getLength(); i++){
- Element imp = (Element) nl.item(i);
- String loc = imp.getAttribute("location");
- if (loc != null) {
- if (!externalReferences.contains(loc))
- externalReferences.add(loc);
- }
- }
- if (core.keySet().contains(systemId))
- core.remove(systemId);
- core.put(src.getSystemId(), doc);
- resolvedCache.put(systemId, doc.getDocumentURI());
- isMexMetadata = true;
- }
-
- //TODO:handle SAXSource
- //TODO:handler StreamSource
- }
-
- for (Source src : mexSchemas) {
- if (src instanceof DOMSource) {
- Node n = ((DOMSource) src).getNode();
- Element e = (n.getNodeType() == Node.ELEMENT_NODE) ? (Element) n : DOMUtil.getFirstElementChild(n);
- inlinedSchemaElements.add(e);
- }
- //TODO:handle SAXSource
- //TODO:handler StreamSource
- }
- return root.getDocumentElement();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/NamespaceContextImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/NamespaceContextImpl.java
deleted file mode 100644
index dccf5047..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/NamespaceContextImpl.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
- /*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.tools.internal.ws.wsdl.parser;
-
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-import javax.xml.namespace.NamespaceContext;
-import java.util.Iterator;
-
-public class NamespaceContextImpl implements NamespaceContext {
-
- private final Element e;
-
- public NamespaceContextImpl(Element e) {
- this.e = e;
- }
-
- public String getNamespaceURI(String prefix) {
- Node parent = e;
- String namespace = null;
-
- if (prefix.equals("xml")) {
- namespace = WellKnownNamespace.XML_NAMESPACE_URI;
- } else {
- int type;
-
- while ((null != parent) && (null == namespace)
- && (((type = parent.getNodeType()) == Node.ELEMENT_NODE)
- || (type == Node.ENTITY_REFERENCE_NODE))) {
- if (type == Node.ELEMENT_NODE) {
- if (parent.getNodeName().indexOf(prefix + ':') == 0)
- return parent.getNamespaceURI();
- NamedNodeMap nnm = parent.getAttributes();
-
- for (int i = 0; i < nnm.getLength(); i++) {
- Node attr = nnm.item(i);
- String aname = attr.getNodeName();
- boolean isPrefix = aname.startsWith("xmlns:");
-
- if (isPrefix || aname.equals("xmlns")) {
- int index = aname.indexOf(':');
- String p = isPrefix ? aname.substring(index + 1) : "";
-
- if (p.equals(prefix)) {
- namespace = attr.getNodeValue();
-
- break;
- }
- }
- }
- }
-
- parent = parent.getParentNode();
- }
- }
-
- return namespace;
- }
-
- public String getPrefix(String namespaceURI) {
- throw new UnsupportedOperationException();
- }
-
- public Iterator getPrefixes(String namespaceURI) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy12ExtensionHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy12ExtensionHandler.java
deleted file mode 100644
index 3c65fba4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy12ExtensionHandler.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensionHandler;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext;
-import com.sun.tools.internal.ws.util.xml.XmlUtil;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.XmlToken;
-
-import org.w3c.dom.Element;
-
-/**
- * Policies are evaluated at runtime. This class makes sure that wscompile/wsimport
- * ignores all policy elements at tooltime.
- *
- * @author Jakub Podlesak (jakub.podlesak at sun.com)
- * @author Fabian Ritzmann
- */
-
-public class Policy12ExtensionHandler extends TWSDLExtensionHandler {
-
- @Override
- public String getNamespaceURI() {
- return NamespaceVersion.v1_2.toString();
- }
-
- @Override
- public boolean handlePortTypeExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handleDefinitionsExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handleBindingExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handleOperationExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handleInputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handleOutputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handleFaultExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handleServiceExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handlePortExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- /**
- * Only skip the element if it is a <wsp:Policy/>, <wsp:PolicyReference/> or
- * <wsp:UsingPolicy> element.
- */
- private boolean handleExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return XmlUtil.matchesTagNS(e, NamespaceVersion.v1_2.asQName(XmlToken.Policy))
- || XmlUtil.matchesTagNS(e,NamespaceVersion.v1_2.asQName(XmlToken.PolicyReference))
- || XmlUtil.matchesTagNS(e, NamespaceVersion.v1_2.asQName(XmlToken.UsingPolicy));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy15ExtensionHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy15ExtensionHandler.java
deleted file mode 100644
index 9e7ced17..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy15ExtensionHandler.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensionHandler;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext;
-import com.sun.tools.internal.ws.util.xml.XmlUtil;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.XmlToken;
-
-import org.w3c.dom.Element;
-
-/**
- * Policies are evaluated at runtime. This class makes sure that wscompile/wsimport
- * ignores all policy elements at tooltime.
- *
- * @author Jakub Podlesak (jakub.podlesak at sun.com)
- * @author Fabian Ritzmann
- */
-
-public class Policy15ExtensionHandler extends TWSDLExtensionHandler {
-
- @Override
- public String getNamespaceURI() {
- return NamespaceVersion.v1_5.toString();
- }
-
- @Override
- public boolean handlePortTypeExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handleDefinitionsExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handleBindingExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handleOperationExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handleInputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handleOutputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handleFaultExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handleServiceExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- @Override
- public boolean handlePortExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleExtension(context, parent, e);
- }
-
- /**
- * Only skip the element if it is a <wsp:Policy/>, <wsp:PolicyReference/> or
- * <wsp:UsingPolicy> element.
- */
- private boolean handleExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return XmlUtil.matchesTagNS(e, NamespaceVersion.v1_5.asQName(XmlToken.Policy))
- || XmlUtil.matchesTagNS(e,NamespaceVersion.v1_5.asQName(XmlToken.PolicyReference))
- || XmlUtil.matchesTagNS(e, NamespaceVersion.v1_5.asQName(XmlToken.UsingPolicy));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAP12ExtensionHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAP12ExtensionHandler.java
deleted file mode 100644
index 0801b25f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAP12ExtensionHandler.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAP12Binding;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAP12Constants;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAPBinding;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.Map;
-
-
-public class SOAP12ExtensionHandler extends SOAPExtensionHandler {
- public SOAP12ExtensionHandler(Map<String, AbstractExtensionHandler> extensionHandlerMap) {
- super(extensionHandlerMap);
- }
-
- /*
- * @see SOAPExtensionHandler#getNamespaceURI()
- */
- @Override
- public String getNamespaceURI() {
- return Constants.NS_WSDL_SOAP12;
- }
-
- /*
- * @see SOAPExtensionHandler#getAddressQName()
- */
- @Override
- protected QName getAddressQName() {
- return SOAP12Constants.QNAME_ADDRESS;
- }
-
- /*
- * @see SOAPExtensionHandler#getBindingQName()
- */
- @Override
- protected QName getBindingQName() {
- return SOAP12Constants.QNAME_BINDING;
- }
-
- @Override protected SOAPBinding getSOAPBinding(Locator location) {
- return new SOAP12Binding(location);
- }
-
- /*
- * @see SOAPExtensionHandler#getBodyQName()
- */
- @Override
- protected QName getBodyQName() {
- return SOAP12Constants.QNAME_BODY;
- }
-
- /*
- * @see SOAPExtensionHandler#getFaultQName()
- */
- @Override
- protected QName getFaultQName() {
- return SOAP12Constants.QNAME_FAULT;
- }
-
- /*
- * @see SOAPExtensionHandler#getHeaderfaultQName()
- */
- @Override
- protected QName getHeaderfaultQName() {
- return SOAP12Constants.QNAME_HEADERFAULT;
- }
-
- /*
- * @see SOAPExtensionHandler#getHeaderQName()
- */
- @Override
- protected QName getHeaderQName() {
- return SOAP12Constants.QNAME_HEADER;
- }
-
- /*
- * @see SOAPExtensionHandler#getOperationQName()
- */
- @Override
- protected QName getOperationQName() {
- return SOAP12Constants.QNAME_OPERATION;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPEntityReferenceValidator.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPEntityReferenceValidator.java
deleted file mode 100644
index 4c35e6d3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPEntityReferenceValidator.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.wsdl.document.schema.SchemaConstants;
-import com.sun.tools.internal.ws.wsdl.document.schema.SchemaKinds;
-import com.sun.tools.internal.ws.wsdl.document.soap.SOAPConstants;
-import com.sun.tools.internal.ws.wsdl.framework.EntityReferenceValidator;
-import com.sun.tools.internal.ws.wsdl.framework.Kind;
-
-import javax.xml.namespace.QName;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * An interface implemented by a class that is capable of validating
- * a QName/Kind pair referring to an external entity.
- *
- * @author WS Development Team
- */
-public class SOAPEntityReferenceValidator implements EntityReferenceValidator {
- public SOAPEntityReferenceValidator() {
- }
-
- public boolean isValid(Kind kind, QName name) {
-
- // just let all "xml:" QNames through
- if (name.getNamespaceURI().equals(Constants.NS_XML))
- return true;
-
- if (kind == SchemaKinds.XSD_TYPE) {
- return _validTypes.contains(name);
- } else if (kind == SchemaKinds.XSD_ELEMENT) {
- return _validElements.contains(name);
- } else if (kind == SchemaKinds.XSD_ATTRIBUTE) {
- return _validAttributes.contains(name);
- } else {
- // no luck
- return false;
- }
- }
-
- private static final Set _validTypes;
- private static final Set _validElements;
- private static final Set _validAttributes;
-
- static {
- // add all XML Schema and SOAP types
- _validTypes = new HashSet();
- _validTypes.add(SOAPConstants.QNAME_TYPE_ARRAY);
- _validTypes.add(SchemaConstants.QNAME_TYPE_STRING);
- _validTypes.add(SchemaConstants.QNAME_TYPE_NORMALIZED_STRING);
- _validTypes.add(SchemaConstants.QNAME_TYPE_TOKEN);
- _validTypes.add(SchemaConstants.QNAME_TYPE_BYTE);
- _validTypes.add(SchemaConstants.QNAME_TYPE_UNSIGNED_BYTE);
- _validTypes.add(SchemaConstants.QNAME_TYPE_BASE64_BINARY);
- _validTypes.add(SchemaConstants.QNAME_TYPE_HEX_BINARY);
- _validTypes.add(SchemaConstants.QNAME_TYPE_INTEGER);
- _validTypes.add(SchemaConstants.QNAME_TYPE_POSITIVE_INTEGER);
- _validTypes.add(SchemaConstants.QNAME_TYPE_NEGATIVE_INTEGER);
- _validTypes.add(SchemaConstants.QNAME_TYPE_NON_NEGATIVE_INTEGER);
- _validTypes.add(SchemaConstants.QNAME_TYPE_NON_POSITIVE_INTEGER);
- _validTypes.add(SchemaConstants.QNAME_TYPE_INT);
- _validTypes.add(SchemaConstants.QNAME_TYPE_UNSIGNED_INT);
- _validTypes.add(SchemaConstants.QNAME_TYPE_LONG);
- _validTypes.add(SchemaConstants.QNAME_TYPE_UNSIGNED_LONG);
- _validTypes.add(SchemaConstants.QNAME_TYPE_SHORT);
- _validTypes.add(SchemaConstants.QNAME_TYPE_UNSIGNED_SHORT);
- _validTypes.add(SchemaConstants.QNAME_TYPE_DECIMAL);
- _validTypes.add(SchemaConstants.QNAME_TYPE_FLOAT);
- _validTypes.add(SchemaConstants.QNAME_TYPE_DOUBLE);
- _validTypes.add(SchemaConstants.QNAME_TYPE_BOOLEAN);
- _validTypes.add(SchemaConstants.QNAME_TYPE_TIME);
- _validTypes.add(SchemaConstants.QNAME_TYPE_DATE_TIME);
- _validTypes.add(SchemaConstants.QNAME_TYPE_DURATION);
- _validTypes.add(SchemaConstants.QNAME_TYPE_DATE);
- _validTypes.add(SchemaConstants.QNAME_TYPE_G_MONTH);
- _validTypes.add(SchemaConstants.QNAME_TYPE_G_YEAR);
- _validTypes.add(SchemaConstants.QNAME_TYPE_G_YEAR_MONTH);
- _validTypes.add(SchemaConstants.QNAME_TYPE_G_DAY);
- _validTypes.add(SchemaConstants.QNAME_TYPE_G_MONTH_DAY);
- _validTypes.add(SchemaConstants.QNAME_TYPE_NAME);
- _validTypes.add(SchemaConstants.QNAME_TYPE_QNAME);
- _validTypes.add(SchemaConstants.QNAME_TYPE_NCNAME);
- _validTypes.add(SchemaConstants.QNAME_TYPE_ANY_URI);
- _validTypes.add(SchemaConstants.QNAME_TYPE_ID);
- _validTypes.add(SchemaConstants.QNAME_TYPE_IDREF);
- _validTypes.add(SchemaConstants.QNAME_TYPE_IDREFS);
- _validTypes.add(SchemaConstants.QNAME_TYPE_ENTITY);
- _validTypes.add(SchemaConstants.QNAME_TYPE_ENTITIES);
- _validTypes.add(SchemaConstants.QNAME_TYPE_NOTATION);
- _validTypes.add(SchemaConstants.QNAME_TYPE_NMTOKEN);
- _validTypes.add(SchemaConstants.QNAME_TYPE_NMTOKENS);
- _validTypes.add(SchemaConstants.QNAME_TYPE_URTYPE);
- _validTypes.add(SchemaConstants.QNAME_TYPE_SIMPLE_URTYPE);
- _validTypes.add(SOAPConstants.QNAME_TYPE_STRING);
- _validTypes.add(SOAPConstants.QNAME_TYPE_NORMALIZED_STRING);
- _validTypes.add(SOAPConstants.QNAME_TYPE_TOKEN);
- _validTypes.add(SOAPConstants.QNAME_TYPE_BYTE);
- _validTypes.add(SOAPConstants.QNAME_TYPE_UNSIGNED_BYTE);
- _validTypes.add(SOAPConstants.QNAME_TYPE_BASE64_BINARY);
- _validTypes.add(SOAPConstants.QNAME_TYPE_HEX_BINARY);
- _validTypes.add(SOAPConstants.QNAME_TYPE_INTEGER);
- _validTypes.add(SOAPConstants.QNAME_TYPE_POSITIVE_INTEGER);
- _validTypes.add(SOAPConstants.QNAME_TYPE_NEGATIVE_INTEGER);
- _validTypes.add(SOAPConstants.QNAME_TYPE_NON_NEGATIVE_INTEGER);
- _validTypes.add(SOAPConstants.QNAME_TYPE_NON_POSITIVE_INTEGER);
- _validTypes.add(SOAPConstants.QNAME_TYPE_INT);
- _validTypes.add(SOAPConstants.QNAME_TYPE_UNSIGNED_INT);
- _validTypes.add(SOAPConstants.QNAME_TYPE_LONG);
- _validTypes.add(SOAPConstants.QNAME_TYPE_UNSIGNED_LONG);
- _validTypes.add(SOAPConstants.QNAME_TYPE_SHORT);
- _validTypes.add(SOAPConstants.QNAME_TYPE_UNSIGNED_SHORT);
- _validTypes.add(SOAPConstants.QNAME_TYPE_DECIMAL);
- _validTypes.add(SOAPConstants.QNAME_TYPE_FLOAT);
- _validTypes.add(SOAPConstants.QNAME_TYPE_DOUBLE);
- _validTypes.add(SOAPConstants.QNAME_TYPE_BOOLEAN);
- _validTypes.add(SOAPConstants.QNAME_TYPE_TIME);
- _validTypes.add(SOAPConstants.QNAME_TYPE_DATE_TIME);
- _validTypes.add(SOAPConstants.QNAME_TYPE_DURATION);
- _validTypes.add(SOAPConstants.QNAME_TYPE_DATE);
- _validTypes.add(SOAPConstants.QNAME_TYPE_G_MONTH);
- _validTypes.add(SOAPConstants.QNAME_TYPE_G_YEAR);
- _validTypes.add(SOAPConstants.QNAME_TYPE_G_YEAR_MONTH);
- _validTypes.add(SOAPConstants.QNAME_TYPE_G_DAY);
- _validTypes.add(SOAPConstants.QNAME_TYPE_G_MONTH_DAY);
- _validTypes.add(SOAPConstants.QNAME_TYPE_NAME);
- _validTypes.add(SOAPConstants.QNAME_TYPE_QNAME);
- _validTypes.add(SOAPConstants.QNAME_TYPE_NCNAME);
- _validTypes.add(SOAPConstants.QNAME_TYPE_ANY_URI);
- _validTypes.add(SOAPConstants.QNAME_TYPE_ID);
- _validTypes.add(SOAPConstants.QNAME_TYPE_IDREF);
- _validTypes.add(SOAPConstants.QNAME_TYPE_IDREFS);
- _validTypes.add(SOAPConstants.QNAME_TYPE_ENTITY);
- _validTypes.add(SOAPConstants.QNAME_TYPE_ENTITIES);
- _validTypes.add(SOAPConstants.QNAME_TYPE_NOTATION);
- _validTypes.add(SOAPConstants.QNAME_TYPE_NMTOKEN);
- _validTypes.add(SOAPConstants.QNAME_TYPE_NMTOKENS);
- _validTypes.add(SOAPConstants.QNAME_TYPE_BASE64);
- // New types 12/3/02
- _validTypes.add(SchemaConstants.QNAME_TYPE_LANGUAGE);
-
- // add all SOAP encoding elements
- _validElements = new HashSet();
- _validElements.add(SOAPConstants.QNAME_ELEMENT_STRING);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_NORMALIZED_STRING);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_TOKEN);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_BYTE);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_UNSIGNED_BYTE);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_BASE64_BINARY);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_HEX_BINARY);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_INTEGER);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_POSITIVE_INTEGER);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_NEGATIVE_INTEGER);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_NON_NEGATIVE_INTEGER);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_NON_POSITIVE_INTEGER);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_INT);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_UNSIGNED_INT);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_LONG);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_UNSIGNED_LONG);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_SHORT);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_UNSIGNED_SHORT);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_DECIMAL);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_FLOAT);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_DOUBLE);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_BOOLEAN);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_TIME);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_DATE_TIME);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_DURATION);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_DATE);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_G_MONTH);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_G_YEAR);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_G_YEAR_MONTH);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_G_DAY);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_G_MONTH_DAY);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_NAME);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_QNAME);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_NCNAME);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_ANY_URI);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_ID);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_IDREF);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_IDREFS);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_ENTITY);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_ENTITIES);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_NOTATION);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_NMTOKEN);
- _validElements.add(SOAPConstants.QNAME_ELEMENT_NMTOKENS);
-
- _validAttributes = new HashSet();
- _validAttributes.add(SOAPConstants.QNAME_ATTR_ARRAY_TYPE);
- _validAttributes.add(SOAPConstants.QNAME_ATTR_OFFSET);
- _validAttributes.add(SOAPConstants.QNAME_ATTR_POSITION);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPExtensionHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPExtensionHandler.java
deleted file mode 100644
index 80c4a55f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPExtensionHandler.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext;
-import com.sun.tools.internal.ws.util.xml.XmlUtil;
-import com.sun.tools.internal.ws.wsdl.document.soap.*;
-import com.sun.tools.internal.ws.wsdl.framework.TWSDLParserContextImpl;
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * The SOAP extension handler for WSDL.
- *
- * @author WS Development Team
- */
-public class SOAPExtensionHandler extends AbstractExtensionHandler {
-
- public SOAPExtensionHandler(Map<String, AbstractExtensionHandler> extensionHandlerMap) {
- super(extensionHandlerMap);
- }
-
- public String getNamespaceURI() {
- return Constants.NS_WSDL_SOAP;
- }
-
- public boolean handleDefinitionsExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false; // keep compiler happy
- }
-
- public boolean handleTypesExtension(
- com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false; // keep compiler happy
- }
-
- protected SOAPBinding getSOAPBinding(Locator location){
- return new SOAPBinding(location);
- }
-
- public boolean handleBindingExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- if (XmlUtil.matchesTagNS(e, getBindingQName())) {
- context.push();
- context.registerNamespaces(e);
-
- SOAPBinding binding = getSOAPBinding(context.getLocation(e));
-
- // NOTE - the "transport" attribute is required according to section 3.3 of the WSDL 1.1 spec,
- // but optional according to the schema in appendix A 4.2 of the same document!
- String transport =
- Util.getRequiredAttribute(e, Constants.ATTR_TRANSPORT);
- binding.setTransport(transport);
-
- String style = XmlUtil.getAttributeOrNull(e, Constants.ATTR_STYLE);
- if (style != null) {
- if (style.equals(Constants.ATTRVALUE_RPC)) {
- binding.setStyle(SOAPStyle.RPC);
- } else if (style.equals(Constants.ATTRVALUE_DOCUMENT)) {
- binding.setStyle(SOAPStyle.DOCUMENT);
- } else {
- Util.fail(
- "parsing.invalidAttributeValue",
- Constants.ATTR_STYLE,
- style);
- }
- }
- parent.addExtension(binding);
- context.pop();
-// context.fireDoneParsingEntity(getBindingQName(), binding);
- return true;
- } else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false; // keep compiler happy
- }
- }
-
- public boolean handleOperationExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- if (XmlUtil.matchesTagNS(e, getOperationQName())) {
- context.push();
- context.registerNamespaces(e);
-
- SOAPOperation operation = new SOAPOperation(context.getLocation(e));
-
- String soapAction =
- XmlUtil.getAttributeOrNull(e, Constants.ATTR_SOAP_ACTION);
- if (soapAction != null) {
- operation.setSOAPAction(soapAction);
- }
-
- String style = XmlUtil.getAttributeOrNull(e, Constants.ATTR_STYLE);
- if (style != null) {
- if (style.equals(Constants.ATTRVALUE_RPC)) {
- operation.setStyle(SOAPStyle.RPC);
- } else if (style.equals(Constants.ATTRVALUE_DOCUMENT)) {
- operation.setStyle(SOAPStyle.DOCUMENT);
- } else {
- Util.fail(
- "parsing.invalidAttributeValue",
- Constants.ATTR_STYLE,
- style);
- }
- }
- parent.addExtension(operation);
- context.pop();
-// context.fireDoneParsingEntity(
-// getOperationQName(),
-// operation);
- return true;
- } else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false; // keep compiler happy
- }
- }
-
- public boolean handleInputExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- return handleInputOutputExtension(context, parent, e);
- }
- public boolean handleOutputExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- return handleInputOutputExtension(context, parent, e);
- }
-
- @Override
- protected boolean handleMIMEPartExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- return handleInputOutputExtension(context, parent, e);
- }
-
- protected boolean handleInputOutputExtension(
- TWSDLParserContext contextif,
- TWSDLExtensible parent,
- Element e) {
- TWSDLParserContextImpl context = (TWSDLParserContextImpl)contextif;
- if (XmlUtil.matchesTagNS(e, getBodyQName())) {
- context.push();
- context.registerNamespaces(e);
-
- SOAPBody body = new SOAPBody(context.getLocation(e));
-
- String use = XmlUtil.getAttributeOrNull(e, Constants.ATTR_USE);
- if (use != null) {
- if (use.equals(Constants.ATTRVALUE_LITERAL)) {
- body.setUse(SOAPUse.LITERAL);
- } else if (use.equals(Constants.ATTRVALUE_ENCODED)) {
- body.setUse(SOAPUse.ENCODED);
- } else {
- Util.fail(
- "parsing.invalidAttributeValue",
- Constants.ATTR_USE,
- use);
- }
- }
-
- String namespace =
- XmlUtil.getAttributeOrNull(e, Constants.ATTR_NAMESPACE);
- if (namespace != null) {
- body.setNamespace(namespace);
- }
-
- String encodingStyle =
- XmlUtil.getAttributeOrNull(e, Constants.ATTR_ENCODING_STYLE);
- if (encodingStyle != null) {
- body.setEncodingStyle(encodingStyle);
- }
-
- String parts = XmlUtil.getAttributeOrNull(e, Constants.ATTR_PARTS);
- if (parts != null) {
- body.setParts(parts);
- }
-
- parent.addExtension(body);
- context.pop();
-// context.fireDoneParsingEntity(getBodyQName(), body);
- return true;
- } else if (XmlUtil.matchesTagNS(e, getHeaderQName())) {
- return handleHeaderElement(parent, e, context);
- } else {
- Util.fail("parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI());
- return false; // keep compiler happy
- }
- }
-
- private boolean handleHeaderElement(TWSDLExtensible parent, Element e, TWSDLParserContextImpl context) {
- context.push();
- context.registerNamespaces(e);
-
- SOAPHeader header = new SOAPHeader(context.getLocation(e));
-
- String use = XmlUtil.getAttributeOrNull(e, Constants.ATTR_USE);
- if (use != null) {
- if (use.equals(Constants.ATTRVALUE_LITERAL)) {
- header.setUse(SOAPUse.LITERAL);
- } else if (use.equals(Constants.ATTRVALUE_ENCODED)) {
- header.setUse(SOAPUse.ENCODED);
- } else {
- Util.fail("parsing.invalidAttributeValue", Constants.ATTR_USE, use);
- }
- }
-
- String namespace = XmlUtil.getAttributeOrNull(e, Constants.ATTR_NAMESPACE);
- if (namespace != null) {
- header.setNamespace(namespace);
- }
-
- String encodingStyle = XmlUtil.getAttributeOrNull(e, Constants.ATTR_ENCODING_STYLE);
- if (encodingStyle != null) {
- header.setEncodingStyle(encodingStyle);
- }
-
- String part = XmlUtil.getAttributeOrNull(e, Constants.ATTR_PART);
- if (part != null) {
- header.setPart(part);
- }
-
- String messageAttr = XmlUtil.getAttributeOrNull(e, Constants.ATTR_MESSAGE);
- if (messageAttr != null) {
- header.setMessage(context.translateQualifiedName(context.getLocation(e), messageAttr));
- }
-
- for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
- Element e2 = Util.nextElement(iter);
- if (e2 == null)
- break;
-
- if (XmlUtil.matchesTagNS(e2, getHeaderfaultQName())) {
- handleHeaderFaultElement(e, context, header, use, e2);
- } else {
- Util.fail("parsing.invalidElement", e2.getTagName(), e2.getNamespaceURI());
- }
- }
-
- parent.addExtension(header);
- context.pop();
- context.fireDoneParsingEntity(getHeaderQName(), header);
- return true;
- }
-
- private void handleHeaderFaultElement(Element e, TWSDLParserContextImpl context, SOAPHeader header, String use, Element e2) {
- context.push();
- context.registerNamespaces(e);
-
- SOAPHeaderFault headerfault = new SOAPHeaderFault(context.getLocation(e));
-
- String use2 = XmlUtil.getAttributeOrNull(e2, Constants.ATTR_USE);
- if (use2 != null) {
- if (use2.equals(Constants.ATTRVALUE_LITERAL)) {
- headerfault.setUse(SOAPUse.LITERAL);
- } else if (use.equals(Constants.ATTRVALUE_ENCODED)) {
- headerfault.setUse(SOAPUse.ENCODED);
- } else {
- Util.fail("parsing.invalidAttributeValue", Constants.ATTR_USE, use2);
- }
- }
-
- String namespace2 = XmlUtil.getAttributeOrNull(e2, Constants.ATTR_NAMESPACE);
- if (namespace2 != null) {
- headerfault.setNamespace(namespace2);
- }
-
- String encodingStyle2 = XmlUtil.getAttributeOrNull(e2, Constants.ATTR_ENCODING_STYLE);
- if (encodingStyle2 != null) {
- headerfault.setEncodingStyle(encodingStyle2);
- }
-
- String part2 = XmlUtil.getAttributeOrNull(e2, Constants.ATTR_PART);
- if (part2 != null) {
- headerfault.setPart(part2);
- }
-
- String messageAttr2 = XmlUtil.getAttributeOrNull(e2, Constants.ATTR_MESSAGE);
- if (messageAttr2 != null) {
- headerfault.setMessage(
- context.translateQualifiedName(context.getLocation(e2), messageAttr2));
- }
-
- header.add(headerfault);
- context.pop();
- }
-
- public boolean handleFaultExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- if (XmlUtil.matchesTagNS(e, getFaultQName())) {
- context.push();
- context.registerNamespaces(e);
-
- SOAPFault fault = new SOAPFault(context.getLocation(e));
-
- String name = XmlUtil.getAttributeOrNull(e, Constants.ATTR_NAME);
- if (name != null) {
- fault.setName(name);
- }
-
- String use = XmlUtil.getAttributeOrNull(e, Constants.ATTR_USE);
- if (use != null) {
- if (use.equals(Constants.ATTRVALUE_LITERAL)) {
- fault.setUse(SOAPUse.LITERAL);
- } else if (use.equals(Constants.ATTRVALUE_ENCODED)) {
- fault.setUse(SOAPUse.ENCODED);
- } else {
- Util.fail(
- "parsing.invalidAttributeValue",
- Constants.ATTR_USE,
- use);
- }
- }
-
- String namespace =
- XmlUtil.getAttributeOrNull(e, Constants.ATTR_NAMESPACE);
- if (namespace != null) {
- fault.setNamespace(namespace);
- }
-
- String encodingStyle =
- XmlUtil.getAttributeOrNull(e, Constants.ATTR_ENCODING_STYLE);
- if (encodingStyle != null) {
- fault.setEncodingStyle(encodingStyle);
- }
-
- parent.addExtension(fault);
- context.pop();
-// context.fireDoneParsingEntity(getFaultQName(), fault);
- return true;
- } else if (XmlUtil.matchesTagNS(e, getHeaderQName())) {
- // although SOAP spec doesn't define meaning of this extension; it is allowed
- // to be here, so we have to accept it, not fail (bug 13576977)
- return handleHeaderElement(parent, e, (TWSDLParserContextImpl) context);
- } else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false; // keep compiler happy
- }
- }
-
- public boolean handleServiceExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false; // keep compiler happy
- }
-
- @Override
- public boolean handlePortExtension(
- TWSDLParserContext context,
- TWSDLExtensible parent,
- Element e) {
- if (XmlUtil.matchesTagNS(e, getAddressQName())) {
- context.push();
- context.registerNamespaces(e);
-
- SOAPAddress address = new SOAPAddress(context.getLocation(e));
-
- String location =
- Util.getRequiredAttribute(e, Constants.ATTR_LOCATION);
- address.setLocation(location);
-
- parent.addExtension(address);
- context.pop();
-// context.fireDoneParsingEntity(getAddressQName(), address);
- return true;
- } else {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false; // keep compiler happy
- }
- }
-
- public boolean handlePortTypeExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- Util.fail(
- "parsing.invalidExtensionElement",
- e.getTagName(),
- e.getNamespaceURI());
- return false; // keep compiler happy
- }
-
- protected QName getBodyQName(){
- return SOAPConstants.QNAME_BODY;
- }
-
- protected QName getHeaderQName(){
- return SOAPConstants.QNAME_HEADER;
- }
-
- protected QName getHeaderfaultQName(){
- return SOAPConstants.QNAME_HEADERFAULT;
- }
-
- protected QName getOperationQName(){
- return SOAPConstants.QNAME_OPERATION;
- }
-
- protected QName getFaultQName(){
- return SOAPConstants.QNAME_FAULT;
- }
-
- protected QName getAddressQName(){
- return SOAPConstants.QNAME_ADDRESS;
- }
-
- protected QName getBindingQName(){
- return SOAPConstants.QNAME_BINDING;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Util.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Util.java
deleted file mode 100644
index 9d182930..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Util.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.wsdl.framework.ParseException;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import org.w3c.dom.Comment;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-
-import javax.xml.namespace.QName;
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Iterator;
-
-/**2
- * Defines various utility methods.
- *
- * @author WS Development Team
- */
-public class Util {
-
- public static String getRequiredAttribute(Element element, String name) {
- String result = XmlUtil.getAttributeOrNull(element, name);
- if (result == null)
- fail(
- "parsing.missingRequiredAttribute",
- element.getTagName(),
- name);
- return result;
- }
-
- public static void verifyTag(Element element, String tag) {
- if (!element.getLocalName().equals(tag))
- fail("parsing.invalidTag", element.getTagName(), tag);
- }
-
- public static void verifyTagNS(Element element, String tag, String nsURI) {
- if (!element.getLocalName().equals(tag)
- || (element.getNamespaceURI() != null
- && !element.getNamespaceURI().equals(nsURI)))
- fail(
- "parsing.invalidTagNS",
- new Object[] {
- element.getTagName(),
- element.getNamespaceURI(),
- tag,
- nsURI });
- }
-
- public static void verifyTagNS(Element element, QName name) {
- if (!isTagName(element, name))
- fail(
- "parsing.invalidTagNS",
- new Object[] {
- element.getTagName(),
- element.getNamespaceURI(),
- name.getLocalPart(),
- name.getNamespaceURI()});
- }
-
- public static boolean isTagName(Element element, QName name){
- return (element.getLocalName().equals(name.getLocalPart())
- && (element.getNamespaceURI() != null
- && element.getNamespaceURI().equals(name.getNamespaceURI())));
-
- }
-
- public static void verifyTagNSRootElement(Element element, QName name) {
- if (!element.getLocalName().equals(name.getLocalPart())
- || (element.getNamespaceURI() != null
- && !element.getNamespaceURI().equals(name.getNamespaceURI())))
- fail(
- "parsing.incorrectRootElement",
- new Object[] {
- element.getTagName(),
- element.getNamespaceURI(),
- name.getLocalPart(),
- name.getNamespaceURI()});
- }
-
- public static Element nextElementIgnoringCharacterContent(Iterator iter) {
- while (iter.hasNext()) {
- Node n = (Node) iter.next();
- if (n instanceof Text)
- continue;
- if (n instanceof Comment)
- continue;
- if (!(n instanceof Element))
- fail("parsing.elementExpected");
- return (Element) n;
- }
-
- return null;
- }
-
- public static Element nextElement(Iterator iter) {
- while (iter.hasNext()) {
- Node n = (Node) iter.next();
- if (n instanceof Text) {
- Text t = (Text) n;
- if (t.getData().trim().length() == 0)
- continue;
- fail("parsing.nonWhitespaceTextFound", t.getData().trim());
- }
- if (n instanceof Comment)
- continue;
- if (!(n instanceof Element))
- fail("parsing.elementExpected");
- return (Element) n;
- }
-
- return null;
- }
-
- public static String processSystemIdWithBase(
- String baseSystemId,
- String systemId) {
- try {
- URL base = null;
- try {
- base = new URL(baseSystemId);
- } catch (MalformedURLException e) {
- base = new File(baseSystemId).toURL();
- }
-
- try {
- URL url = new URL(base, systemId);
- return url.toString();
- } catch (MalformedURLException e) {
- fail("parsing.invalidURI", systemId);
- }
-
- } catch (MalformedURLException e) {
- fail("parsing.invalidURI", baseSystemId);
- }
-
- return null; // keep compiler happy
- }
-
- public static void fail(String key) {
- throw new ParseException(key);
- }
-
- public static void fail(String key, String arg) {
- throw new ParseException(key, arg);
- }
-
- public static void fail(String key, String arg1, String arg2) {
- throw new ParseException(key, new Object[] { arg1, arg2 });
- }
-
- public static void fail(String key, Object[] args) {
- throw new ParseException(key, args);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/VersionChecker.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/VersionChecker.java
deleted file mode 100644
index 91467a1f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/VersionChecker.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBindingsConstants;
-import org.xml.sax.*;
-import org.xml.sax.helpers.LocatorImpl;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Checks the jaxb:version attribute on a XML Schema document.
- *
- * jaxws:version is optional, if absent its value is assumed to be "2.0" and if present its value must be
- * "2.0" or more.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- * Vivek Pandey
- */
-public class VersionChecker extends XMLFilterImpl {
-
- /**
- * We store the value of the version attribute in this variable
- * when we hit the root element.
- */
- private String version = null ;
-
- /** Will be set to true once we hit the root element. */
- private boolean seenRoot = false;
-
- /** Will be set to true once we hit a binding declaration. */
- private boolean seenBindings = false;
-
- private Locator locator;
-
- /**
- * Stores the location of the start tag of the root tag.
- */
- private Locator rootTagStart;
-
- public VersionChecker( XMLReader parent ) {
- setParent(parent);
- }
-
- public VersionChecker( ContentHandler handler, ErrorHandler eh, EntityResolver er ) {
- setContentHandler(handler);
- if(eh!=null) setErrorHandler(eh);
- if(er!=null) setEntityResolver(er);
- }
-
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
- throws SAXException {
-
- super.startElement(namespaceURI, localName, qName, atts);
-
- if(!seenRoot) {
- // if this is the root element
- seenRoot = true;
- rootTagStart = new LocatorImpl(locator);
-
- version = atts.getValue(JAXWSBindingsConstants.NS_JAXWS_BINDINGS,"version");
- if( namespaceURI.equals(JAXWSBindingsConstants.NS_JAXWS_BINDINGS) ) {
- String version2 = atts.getValue("","version");
- if( version!=null && version2!=null ) {
- // we have both @version and @jaxb:version. error.
- SAXParseException e = new SAXParseException(
- WsdlMessages.INTERNALIZER_TWO_VERSION_ATTRIBUTES(), locator);
- getErrorHandler().error(e);
- }
- //According to JAXWS 2.0 spec, if version attribute is missing its assumed to be "2.0"
- if( version==null)
- version = (version2!=null)?version2:"2.0";
- }
-
- }
-
- if( JAXWSBindingsConstants.NS_JAXWS_BINDINGS.equals(namespaceURI)){
- seenBindings = true;
- if(version == null)
- version = "2.0";
- }
-
- }
-
- public void endDocument() throws SAXException {
- super.endDocument();
-
- if( seenBindings && version==null ) {
- // if we see a binding declaration but not version attribute
- SAXParseException e = new SAXParseException(WsdlMessages.INTERNALIZER_VERSION_NOT_PRESENT(), rootTagStart);
- getErrorHandler().error(e);
- }
-
- // if present, the value must be >= 2.0
- if( version!=null && !VERSIONS.contains(version) ) {
- SAXParseException e = new SAXParseException(WsdlMessages.INTERNALIZER_INCORRECT_VERSION(), rootTagStart);
- getErrorHandler().error(e);
- }
- }
-
- public void setDocumentLocator(Locator locator) {
- super.setDocumentLocator(locator);
- this.locator = locator;
- }
-
- private static final Set<String> VERSIONS = new HashSet<String>(Arrays.asList("2.0","2.1"));
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingExtensionHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingExtensionHandler.java
deleted file mode 100644
index 6a06c0ff..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingExtensionHandler.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import com.sun.tools.internal.ws.util.xml.XmlUtil;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.wsdl.document.Fault;
-import com.sun.tools.internal.ws.wsdl.document.Input;
-import com.sun.tools.internal.ws.wsdl.document.Output;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.QName;
-import java.util.Map;
-
-/**
- * @author Arun Gupta
- */
-public class W3CAddressingExtensionHandler extends AbstractExtensionHandler {
- public W3CAddressingExtensionHandler(Map<String, AbstractExtensionHandler> extensionHandlerMap) {
- this(extensionHandlerMap, null);
- }
-
- public W3CAddressingExtensionHandler(Map<String, AbstractExtensionHandler> extensionHandlerMap, ErrorReceiver errReceiver) {
- super(extensionHandlerMap);
- }
-
- @Override
- public String getNamespaceURI() {
- return AddressingVersion.W3C.wsdlNsUri;
- }
-
-
- protected QName getWSDLExtensionQName() {
- return AddressingVersion.W3C.wsdlExtensionTag;
- }
-
- @Override
- public boolean handleBindingExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- if (XmlUtil.matchesTagNS(e, getWSDLExtensionQName())) {
- /*
- context.push();
- context.registerNamespaces(e);
-
- // TODO: read UsingAddressing extensibility element and store
- // TODO: it as extension in "parent". It may be used to generate
- // TODO: @Action/@FaultAction later.
-
- context.pop();
- */
- return true;
- }
- return false; // keep compiler happy
- }
-
- @Override
- public boolean handlePortExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- return handleBindingExtension(context, parent, e);
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingMetadataExtensionHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingMetadataExtensionHandler.java
deleted file mode 100644
index 2beb335c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingMetadataExtensionHandler.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.wscompile.ErrorReceiver;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.util.xml.XmlUtil;
-import com.sun.tools.internal.ws.wsdl.document.Input;
-import com.sun.tools.internal.ws.wsdl.document.Output;
-import com.sun.tools.internal.ws.wsdl.document.Fault;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import static com.sun.xml.internal.ws.addressing.W3CAddressingMetadataConstants.*;
-
-import java.util.Map;
-
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-/**
- * This extension parses the WSDL Metadata extensibility elements in the wsdl definitions.
- *
- * This class looks for wsam:Action attribute on wsdl:input, wsdl:output, wsdl:fault elements and sets the action value
- * in the wsdl model so that it can be used to generate correpsonding annotations on SEI.
- *
- * @author Rama Pulavarthi
- */
-public class W3CAddressingMetadataExtensionHandler extends AbstractExtensionHandler {
- private ErrorReceiver errReceiver;
- public W3CAddressingMetadataExtensionHandler(Map<String, AbstractExtensionHandler> extensionHandlerMap, ErrorReceiver errReceiver) {
- super(extensionHandlerMap);
- this.errReceiver = errReceiver;
- }
-
- @Override
- public String getNamespaceURI() {
- return WSAM_NAMESPACE_NAME;
- }
-
- @Override
- public boolean handleInputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- String actionValue = XmlUtil.getAttributeNSOrNull(e, WSAM_ACTION_QNAME);
- if (actionValue == null || actionValue.equals("")) {
- return warnEmptyAction(parent, context.getLocation(e));
- }
- ((Input)parent).setAction(actionValue);
- return true;
- }
-
- @Override
- public boolean handleOutputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- String actionValue = XmlUtil.getAttributeNSOrNull(e, WSAM_ACTION_QNAME);
- if (actionValue == null || actionValue.equals("")) {
- return warnEmptyAction(parent,context.getLocation(e));
- }
- ((Output)parent).setAction(actionValue);
- return true;
- }
-
- @Override
- public boolean handleFaultExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) {
- String actionValue = XmlUtil.getAttributeNSOrNull(e, WSAM_ACTION_QNAME);
- if (actionValue == null || actionValue.equals("")) {
- errReceiver.warning(context.getLocation(e), WsdlMessages.WARNING_FAULT_EMPTY_ACTION(parent.getNameValue(), parent.getWSDLElementName().getLocalPart(), parent.getParent().getNameValue()));
- return false; // keep compiler happy
- }
- ((Fault)parent).setAction(actionValue);
- return true;
- }
-
- private boolean warnEmptyAction(TWSDLExtensible parent, Locator pos) {
- errReceiver.warning(pos, WsdlMessages.WARNING_INPUT_OUTPUT_EMPTY_ACTION(parent.getWSDLElementName().getLocalPart(), parent.getParent().getNameValue()));
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLInternalizationLogic.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLInternalizationLogic.java
deleted file mode 100644
index dcc83d0b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLInternalizationLogic.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.wsdl.document.WSDLConstants;
-import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBindingsConstants;
-import com.sun.tools.internal.ws.wsdl.document.schema.SchemaConstants;
-import com.sun.tools.internal.xjc.util.DOMUtils;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * @author Vivek Pandey
- */
-public class WSDLInternalizationLogic implements InternalizationLogic{
-
- /**
- * This filter looks for &lt;xs:import> and &lt;xs:include>
- * and parses those documents referenced by them.
- */
- private static final class ReferenceFinder extends AbstractReferenceFinderImpl {
- ReferenceFinder( DOMForest parent) {
- super(parent);
- }
-
- @Override
- protected String findExternalResource( String nsURI, String localName, Attributes atts) {
- if(WSDLConstants.NS_WSDL.equals(nsURI) && "import".equals(localName)){
-// if(parent.isExtensionMode()){
-// //TODO: add support for importing schema using wsdl:import
-// }
- return atts.getValue("location");
- }
-
- // We don't need to do this anymore, JAXB handles the schema imports, includes etc., but this is useful for the clientJar option in
- // fetching the imported schemas to package in the jar..
- if (parent.options.clientjar != null) {
- if (SchemaConstants.NS_XSD.equals(nsURI) && "import".equals(localName)) {
- return atts.getValue("schemaLocation");
- }
- }
- return null;
- }
- }
- @Override
- public XMLFilterImpl createExternalReferenceFinder(DOMForest parent) {
- return new ReferenceFinder(parent);
- }
-
- @Override
- public boolean checkIfValidTargetNode(DOMForest parent, Element bindings, Element target) {
- return false;
- }
-
- @Override
- public Element refineSchemaTarget(Element target) {
- // look for existing xs:annotation
- Element annotation = DOMUtils.getFirstChildElement(target, Constants.NS_XSD, "annotation");
- if(annotation==null)
- // none exists. need to make one
- annotation = insertXMLSchemaElement( target, "annotation" );
-
- // then look for appinfo
- Element appinfo = DOMUtils.getFirstChildElement(annotation, Constants.NS_XSD, "appinfo" );
- if(appinfo==null)
- // none exists. need to make one
- appinfo = insertXMLSchemaElement( annotation, "appinfo" );
-
- return appinfo;
-
- }
-
- @Override
- public Element refineWSDLTarget(Element target){
- // look for existing xs:annotation
- Element JAXWSBindings = DOMUtils.getFirstChildElement(target, JAXWSBindingsConstants.NS_JAXWS_BINDINGS, "bindings");
- if(JAXWSBindings==null)
- // none exists. need to make one
- JAXWSBindings = insertJAXWSBindingsElement(target, "bindings" );
- return JAXWSBindings;
- }
-
- private Element insertJAXWSBindingsElement( Element parent, String localName ) {
- String qname = "JAXWS:"+localName;
-
- Element child = parent.getOwnerDocument().createElementNS(JAXWSBindingsConstants.NS_JAXWS_BINDINGS, qname );
-
- NodeList children = parent.getChildNodes();
-
- if( children.getLength()==0 )
- parent.appendChild(child);
- else
- parent.insertBefore( child, children.item(0) );
-
- return child;
- }
-
-
- /**
- * Creates a new XML Schema element of the given local name
- * and insert it as the first child of the given parent node.
- *
- * @return
- * Newly create element.
- */
- private Element insertXMLSchemaElement( Element parent, String localName ) {
- // use the same prefix as the parent node to avoid modifying
- // the namespace binding.
- String qname = parent.getTagName();
- int idx = qname.indexOf(':');
- if(idx==-1) qname = localName;
- else qname = qname.substring(0,idx+1)+localName;
-
- Element child = parent.getOwnerDocument().createElementNS( Constants.NS_XSD, qname );
-
- NodeList children = parent.getChildNodes();
-
- if( children.getLength()==0 )
- parent.appendChild(child);
- else
- parent.insertBefore( child, children.item(0) );
-
- return child;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLParser.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLParser.java
deleted file mode 100644
index 89893816..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLParser.java
+++ /dev/null
@@ -1,1104 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.ws.wsdl.parser;
-
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible;
-import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensionHandler;
-import com.sun.tools.internal.ws.resources.WsdlMessages;
-import com.sun.tools.internal.ws.util.xml.XmlUtil;
-import com.sun.tools.internal.ws.wscompile.ErrorReceiverFilter;
-import com.sun.tools.internal.ws.wscompile.WsimportOptions;
-import com.sun.tools.internal.ws.wsdl.document.Binding;
-import com.sun.tools.internal.ws.wsdl.document.BindingFault;
-import com.sun.tools.internal.ws.wsdl.document.BindingInput;
-import com.sun.tools.internal.ws.wsdl.document.BindingOperation;
-import com.sun.tools.internal.ws.wsdl.document.BindingOutput;
-import com.sun.tools.internal.ws.wsdl.document.Definitions;
-import com.sun.tools.internal.ws.wsdl.document.Documentation;
-import com.sun.tools.internal.ws.wsdl.document.Fault;
-import com.sun.tools.internal.ws.wsdl.document.Import;
-import com.sun.tools.internal.ws.wsdl.document.Input;
-import com.sun.tools.internal.ws.wsdl.document.Message;
-import com.sun.tools.internal.ws.wsdl.document.MessagePart;
-import com.sun.tools.internal.ws.wsdl.document.Operation;
-import com.sun.tools.internal.ws.wsdl.document.OperationStyle;
-import com.sun.tools.internal.ws.wsdl.document.Output;
-import com.sun.tools.internal.ws.wsdl.document.Port;
-import com.sun.tools.internal.ws.wsdl.document.PortType;
-import com.sun.tools.internal.ws.wsdl.document.Service;
-import com.sun.tools.internal.ws.wsdl.document.WSDLConstants;
-import com.sun.tools.internal.ws.wsdl.document.WSDLDocument;
-import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBindingsConstants;
-import com.sun.tools.internal.ws.wsdl.document.schema.SchemaConstants;
-import com.sun.tools.internal.ws.wsdl.document.schema.SchemaKinds;
-import com.sun.tools.internal.ws.wsdl.framework.Entity;
-import com.sun.tools.internal.ws.wsdl.framework.ParserListener;
-import com.sun.tools.internal.ws.wsdl.framework.TWSDLParserContextImpl;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import org.w3c.dom.Node;
-
-/**
- * A parser for WSDL documents. This parser is used only at the tool time.
- * Extensions should extend TWSDLExtensionHandler, so that it will be called during
- * parsing wsdl to handle wsdl extenisbility elements. Generally these extensions
- * will effect the artifacts generated during WSDL processing.
- *
- * @see com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser which will be used for WSDL parsing
- * at runtime.
- *
- * @author WS Development Team
- */
-public class WSDLParser {
- private final ErrorReceiverFilter errReceiver;
- private WsimportOptions options;
-
- //wsdl extension handlers
- private final Map extensionHandlers;
- private MetadataFinder forest;
- private ArrayList<ParserListener> listeners;
-
- public WSDLParser(WsimportOptions options, ErrorReceiverFilter errReceiver, MetadataFinder forest) {
- this.extensionHandlers = new HashMap();
- this.options = options;
- this.errReceiver = errReceiver;
- if (forest == null) {
- forest = new MetadataFinder(new WSDLInternalizationLogic(), options, errReceiver);
- forest.parseWSDL();
- if (forest.isMexMetadata) {
- errReceiver.reset();
- }
- }
- this.forest = forest;
- // register handlers for default extensions
- register(new SOAPExtensionHandler(extensionHandlers));
- register(new HTTPExtensionHandler(extensionHandlers));
- register(new MIMEExtensionHandler(extensionHandlers));
- register(new JAXWSBindingExtensionHandler(extensionHandlers));
- register(new SOAP12ExtensionHandler(extensionHandlers));
-
- // MemberSubmission Addressing not supported by WsImport anymore see JAX_WS-1040 for details
- //register(new MemberSubmissionAddressingExtensionHandler(extensionHandlers, errReceiver, options.isExtensionMode()));
-
- register(new W3CAddressingExtensionHandler(extensionHandlers, errReceiver));
- register(new W3CAddressingMetadataExtensionHandler(extensionHandlers, errReceiver));
- register(new Policy12ExtensionHandler());
- register(new Policy15ExtensionHandler());
- for (TWSDLExtensionHandler te : ServiceFinder.find(TWSDLExtensionHandler.class)) {
- register(te);
- }
-
- }
-
- //TODO RK remove this after tests are fixed.
- WSDLParser(WsimportOptions options, ErrorReceiverFilter errReceiver) {
- this(options,errReceiver,null);
- }
- private void register(TWSDLExtensionHandler h) {
- extensionHandlers.put(h.getNamespaceURI(), h);
- }
-
- public void addParserListener(ParserListener l) {
- if (listeners == null) {
- listeners = new ArrayList<ParserListener>();
- }
- listeners.add(l);
- }
-
- public WSDLDocument parse() throws SAXException, IOException {
- // parse external binding files
- for (InputSource value : options.getWSDLBindings()) {
- errReceiver.pollAbort();
- Document root = forest.parse(value, false);
- if(root==null) continue; // error must have been reported
- Element binding = root.getDocumentElement();
- if (!Internalizer.fixNull(binding.getNamespaceURI()).equals(JAXWSBindingsConstants.NS_JAXWS_BINDINGS)
- || !binding.getLocalName().equals("bindings")){
- errReceiver.error(forest.locatorTable.getStartLocation(binding), WsdlMessages.PARSER_NOT_A_BINDING_FILE(
- binding.getNamespaceURI(),
- binding.getLocalName()));
- continue;
- }
-
- NodeList nl = binding.getElementsByTagNameNS(
- "http://java.sun.com/xml/ns/javaee", "handler-chains");
- for(int i = 0; i < nl.getLength(); i++){
- options.addHandlerChainConfiguration((Element) nl.item(i));
- }
-
- }
- return buildWSDLDocument();
- }
-
- public MetadataFinder getDOMForest() {
- return forest;
- }
-
- private WSDLDocument buildWSDLDocument(){
- /**
- * Currently we are working off first WSDL document
- * TODO: add support of creating WSDLDocument from fromjava.collection of WSDL documents
- */
-
- String location = forest.getRootWSDL();
-
- //It means that WSDL is not found, an error might have been reported, lets try to recover
- if(location == null)
- return null;
-
- Document root = forest.get(location);
-
- if(root == null)
- return null;
-
- WSDLDocument document = new WSDLDocument(forest, errReceiver);
- document.setSystemId(location);
- TWSDLParserContextImpl context = new TWSDLParserContextImpl(forest, document, listeners, errReceiver);
-
- Definitions definitions = parseDefinitions(context, root);
- document.setDefinitions(definitions);
- return document;
- }
-
- private Definitions parseDefinitions(TWSDLParserContextImpl context, Document root) {
- context.pushWSDLLocation();
- context.setWSDLLocation(context.getDocument().getSystemId());
-
- new Internalizer(forest, options, errReceiver).transform();
-
- Definitions definitions = parseDefinitionsNoImport(context, root);
- if(definitions == null){
- Locator locator = forest.locatorTable.getStartLocation(root.getDocumentElement());
- errReceiver.error(locator, WsdlMessages.PARSING_NOT_AWSDL(locator.getSystemId()));
-
- }
- processImports(context);
- context.popWSDLLocation();
- return definitions;
- }
-
- private void processImports(TWSDLParserContextImpl context) {
- for(String location : forest.getExternalReferences()){
- if (!context.getDocument().isImportedDocument(location)){
- Document doc = forest.get(location);
- if(doc == null)
- continue;
- Definitions importedDefinitions = parseDefinitionsNoImport(context, doc);
- if(importedDefinitions == null)
- continue;
- context.getDocument().addImportedEntity(importedDefinitions);
- context.getDocument().addImportedDocument(location);
- }
- }
- }
-
- private Definitions parseDefinitionsNoImport(
- TWSDLParserContextImpl context,
- Document doc) {
- Element e = doc.getDocumentElement();
- //at this poinjt we expect a wsdl or schema document to be fully qualified
- if(e.getNamespaceURI() == null || (!e.getNamespaceURI().equals(WSDLConstants.NS_WSDL) || !e.getLocalName().equals("definitions"))){
- return null;
- }
- context.push();
- context.registerNamespaces(e);
-
- Definitions definitions = new Definitions(context.getDocument(), forest.locatorTable.getStartLocation(e));
- String name = XmlUtil.getAttributeOrNull(e, Constants.ATTR_NAME);
- definitions.setName(name);
-
- String targetNamespaceURI =
- XmlUtil.getAttributeOrNull(e, Constants.ATTR_TARGET_NAMESPACE);
-
- definitions.setTargetNamespaceURI(targetNamespaceURI);
-
- boolean gotDocumentation = false;
- boolean gotTypes = false;
-
- for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
- Element e2 = Util.nextElement(iter);
- if (e2 == null)
- break;
-
- if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation) {
- errReceiver.error(forest.locatorTable.getStartLocation(e2), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
- return null;
- }
- gotDocumentation = true;
- if(definitions.getDocumentation() == null)
- definitions.setDocumentation(getDocumentationFor(e2));
- } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_TYPES)) {
- if (gotTypes && !options.isExtensionMode()) {
- errReceiver.error(forest.locatorTable.getStartLocation(e2), WsdlMessages.PARSING_ONLY_ONE_TYPES_ALLOWED(Constants.TAG_DEFINITIONS));
- return null;
- }
- gotTypes = true;
- //add all the wsdl:type elements to latter make a list of all the schema elements
- // that will be needed to create jaxb model
- if(!options.isExtensionMode())
- validateSchemaImports(e2);
- } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_MESSAGE)) {
- Message message = parseMessage(context, definitions, e2);
- definitions.add(message);
- } else if (
- XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_PORT_TYPE)) {
- PortType portType = parsePortType(context, definitions, e2);
- definitions.add(portType);
- } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_BINDING)) {
- Binding binding = parseBinding(context, definitions, e2);
- definitions.add(binding);
- } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_SERVICE)) {
- Service service = parseService(context, definitions, e2);
- definitions.add(service);
- } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_IMPORT)) {
- definitions.add(parseImport(context, definitions, e2));
- } else if (XmlUtil.matchesTagNS(e2, SchemaConstants.QNAME_IMPORT)) {
- errReceiver.warning(forest.locatorTable.getStartLocation(e2), WsdlMessages.WARNING_WSI_R_2003());
- } else {
- // possible extensibility element -- must live outside the WSDL namespace
- checkNotWsdlElement(e2);
- if (!handleExtension(context, definitions, e2)) {
- checkNotWsdlRequired(e2);
- }
- }
- }
-
- context.pop();
- context.fireDoneParsingEntity(
- WSDLConstants.QNAME_DEFINITIONS,
- definitions);
- return definitions;
- }
-
- private Message parseMessage(
- TWSDLParserContextImpl context,
- Definitions definitions,
- Element e) {
- context.push();
- context.registerNamespaces(e);
- Message message = new Message(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
- String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
- message.setName(name);
-
- boolean gotDocumentation = false;
-
- for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
- Element e2 = Util.nextElement(iter);
- if (e2 == null)
- break;
-
- if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation) {
- Util.fail(
- "parsing.onlyOneDocumentationAllowed",
- e.getLocalName());
- }
- gotDocumentation = true;
- message.setDocumentation(getDocumentationFor(e2));
- } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_PART)) {
- MessagePart part = parseMessagePart(context, e2);
- message.add(part);
- } else {
- //Ignore any extensibility elements, WS-I BP 1.1 Profiled WSDL 1.1 schema allows extension elements here.
- /*Util.fail(
- "parsing.invalidElement",
- e2.getTagName(),
- e2.getNamespaceURI());
- */
- }
- }
-
- context.pop();
- context.fireDoneParsingEntity(WSDLConstants.QNAME_MESSAGE, message);
- return message;
- }
-
- private MessagePart parseMessagePart(TWSDLParserContextImpl context, Element e) {
- context.push();
- context.registerNamespaces(e);
- MessagePart part = new MessagePart(forest.locatorTable.getStartLocation(e));
- String partName = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
- part.setName(partName);
-
- String elementAttr =
- XmlUtil.getAttributeOrNull(e, Constants.ATTR_ELEMENT);
- String typeAttr = XmlUtil.getAttributeOrNull(e, Constants.ATTR_TYPE);
-
- if (elementAttr != null) {
- if (typeAttr != null) {
- errReceiver.error(context.getLocation(e), WsdlMessages.PARSING_ONLY_ONE_OF_ELEMENT_OR_TYPE_REQUIRED(partName));
-
- }
-
- part.setDescriptor(context.translateQualifiedName(context.getLocation(e), elementAttr));
- part.setDescriptorKind(SchemaKinds.XSD_ELEMENT);
- } else if (typeAttr != null) {
- part.setDescriptor(context.translateQualifiedName(context.getLocation(e), typeAttr));
- part.setDescriptorKind(SchemaKinds.XSD_TYPE);
- } else {
- // XXX-NOTE - this is wrong; for extensibility purposes,
- // any attribute can be specified on a <part> element, so
- // we need to put an extensibility hook here
- errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ELEMENT_OR_TYPE_REQUIRED(partName));
- }
-
- context.pop();
- context.fireDoneParsingEntity(WSDLConstants.QNAME_PART, part);
- return part;
- }
-
- private PortType parsePortType(
- TWSDLParserContextImpl context,
- Definitions definitions,
- Element e) {
- context.push();
- context.registerNamespaces(e);
- PortType portType = new PortType(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
- String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
- portType.setName(name);
-
- boolean gotDocumentation = false;
-
- for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
- Element e2 = Util.nextElement(iter);
- if (e2 == null)
- break;
-
- if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
- }
- gotDocumentation = true;
- if(portType.getDocumentation() == null)
- portType.setDocumentation(getDocumentationFor(e2));
- } else if (
- XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_OPERATION)) {
- Operation op = parsePortTypeOperation(context, e2);
- op.setParent(portType);
- portType.add(op);
- } else {
- // possible extensibility element -- must live outside the WSDL namespace
- checkNotWsdlElement(e2);
- if (!handleExtension(context, portType, e2)) {
- checkNotWsdlRequired(e2);
- }
- }/*else {
- Util.fail(
- "parsing.invalidElement",
- e2.getTagName(),
- e2.getNamespaceURI());
- }*/
- }
-
- context.pop();
- context.fireDoneParsingEntity(WSDLConstants.QNAME_PORT_TYPE, portType);
- return portType;
- }
-
- private Operation parsePortTypeOperation(
- TWSDLParserContextImpl context,
- Element e) {
- context.push();
- context.registerNamespaces(e);
-
- Operation operation = new Operation(forest.locatorTable.getStartLocation(e));
- String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
- operation.setName(name);
- String parameterOrderAttr =
- XmlUtil.getAttributeOrNull(e, Constants.ATTR_PARAMETER_ORDER);
- operation.setParameterOrder(parameterOrderAttr);
-
- boolean gotDocumentation = false;
-
- boolean gotInput = false;
- boolean gotOutput = false;
- boolean gotFault = false;
- boolean inputBeforeOutput = false;
-
- for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
- Element e2 = Util.nextElement(iter);
- if (e2 == null)
- break;
-
- if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation) {
- errReceiver.error(forest.locatorTable.getStartLocation(e2), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e2.getLocalName()));
- }
- gotDocumentation = true;
- if(operation.getDocumentation() == null)
- operation.setDocumentation(getDocumentationFor(e2));
- } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_INPUT)) {
- if (gotInput) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_TOO_MANY_ELEMENTS(Constants.TAG_INPUT,
- Constants.TAG_OPERATION,
- name));
- }
-
- context.push();
- context.registerNamespaces(e2);
- Input input = new Input(forest.locatorTable.getStartLocation(e2), errReceiver);
- input.setParent(operation);
- String messageAttr =
- Util.getRequiredAttribute(e2, Constants.ATTR_MESSAGE);
- input.setMessage(context.translateQualifiedName(context.getLocation(e2), messageAttr));
- String nameAttr =
- XmlUtil.getAttributeOrNull(e2, Constants.ATTR_NAME);
- input.setName(nameAttr);
- operation.setInput(input);
- gotInput = true;
- if (gotOutput) {
- inputBeforeOutput = false;
- }
-
- // check for extensiblity attributes
- for (Iterator iter2 = XmlUtil.getAllAttributes(e2);
- iter2.hasNext();
- ) {
- Attr e3 = (Attr)iter2.next();
- if (e3.getLocalName().equals(Constants.ATTR_MESSAGE) ||
- e3.getLocalName().equals(Constants.ATTR_NAME))
- continue;
-
- // possible extensibility element -- must live outside the WSDL namespace
- checkNotWsdlAttribute(e3);
- handleExtension(context, input, e3, e2);
- }
-
- // verify that there is at most one child element and it is a documentation element
- boolean gotDocumentation2 = false;
- for (Iterator iter2 = XmlUtil.getAllChildren(e2);
- iter2.hasNext();
- ) {
- Element e3 = Util.nextElement(iter2);
- if (e3 == null)
- break;
-
- if (XmlUtil
- .matchesTagNS(e3, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation2) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
- }
- gotDocumentation2 = true;
- input.setDocumentation(getDocumentationFor(e3));
- } else {
- errReceiver.error(forest.locatorTable.getStartLocation(e3), WsdlMessages.PARSING_INVALID_ELEMENT(e3.getTagName(),
- e3.getNamespaceURI()));
- }
- }
- context.pop();
- } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_OUTPUT)) {
- if (gotOutput) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_TOO_MANY_ELEMENTS(Constants.TAG_INPUT,
- Constants.TAG_OPERATION,
- name));
- }
-
- context.push();
- context.registerNamespaces(e2);
- Output output = new Output(forest.locatorTable.getStartLocation(e2), errReceiver);
- output.setParent(operation);
- String messageAttr =
- Util.getRequiredAttribute(e2, Constants.ATTR_MESSAGE);
- output.setMessage(context.translateQualifiedName(context.getLocation(e2), messageAttr));
- String nameAttr =
- XmlUtil.getAttributeOrNull(e2, Constants.ATTR_NAME);
- output.setName(nameAttr);
- operation.setOutput(output);
- gotOutput = true;
- if (gotInput) {
- inputBeforeOutput = true;
- }
-
- // check for extensiblity attributes
- for (Iterator iter2 = XmlUtil.getAllAttributes(e2);
- iter2.hasNext();
- ) {
- Attr e3 = (Attr)iter2.next();
- if (e3.getLocalName().equals(Constants.ATTR_MESSAGE) ||
- e3.getLocalName().equals(Constants.ATTR_NAME))
- continue;
-
- // possible extensibility element -- must live outside the WSDL namespace
- checkNotWsdlAttribute(e3);
- handleExtension(context, output, e3, e2);
- }
-
- // verify that there is at most one child element and it is a documentation element
- boolean gotDocumentation2 = false;
- for (Iterator iter2 = XmlUtil.getAllChildren(e2);
- iter2.hasNext();
- ) {
- Element e3 = Util.nextElement(iter2);
- if (e3 == null)
- break;
-
- if (XmlUtil
- .matchesTagNS(e3, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation2) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
- }
- gotDocumentation2 = true;
- output.setDocumentation(getDocumentationFor(e3));
- } else {
- errReceiver.error(forest.locatorTable.getStartLocation(e3), WsdlMessages.PARSING_INVALID_ELEMENT(e3.getTagName(),
- e3.getNamespaceURI()));
- }
- }
- context.pop();
- } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_FAULT)) {
- context.push();
- context.registerNamespaces(e2);
- Fault fault = new Fault(forest.locatorTable.getStartLocation(e2));
- fault.setParent(operation);
- String messageAttr =
- Util.getRequiredAttribute(e2, Constants.ATTR_MESSAGE);
- fault.setMessage(context.translateQualifiedName(context.getLocation(e2), messageAttr));
- String nameAttr =
- XmlUtil.getAttributeOrNull(e2, Constants.ATTR_NAME);
- fault.setName(nameAttr);
- operation.addFault(fault);
- gotFault = true;
-
- // check for extensiblity attributes
- for (Iterator iter2 = XmlUtil.getAllAttributes(e2);
- iter2.hasNext();
- ) {
- Attr e3 = (Attr)iter2.next();
- if (e3.getLocalName().equals(Constants.ATTR_MESSAGE) ||
- e3.getLocalName().equals(Constants.ATTR_NAME))
- continue;
-
- // possible extensibility element -- must live outside the WSDL namespace
- checkNotWsdlAttribute(e3);
- handleExtension(context, fault, e3, e2);
- }
-
- // verify that there is at most one child element and it is a documentation element
- boolean gotDocumentation2 = false;
- for (Iterator iter2 = XmlUtil.getAllChildren(e2);
- iter2.hasNext();
- ) {
- Element e3 = Util.nextElement(iter2);
- if (e3 == null)
- break;
-
- if (XmlUtil
- .matchesTagNS(e3, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation2) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
- }
- gotDocumentation2 = true;
- if(fault.getDocumentation() == null)
- fault.setDocumentation(getDocumentationFor(e3));
- } else {
- // possible extensibility element -- must live outside the WSDL namespace
- checkNotWsdlElement(e3);
- if (!handleExtension(context, fault, e3)) {
- checkNotWsdlRequired(e3);
- }
- }/*else {
- Util.fail(
- "parsing.invalidElement",
- e3.getTagName(),
- e3.getNamespaceURI());
- }*/
- }
- context.pop();
- } else {
- // possible extensibility element -- must live outside the WSDL namespace
- checkNotWsdlElement(e2);
- if (!handleExtension(context, operation, e2)) {
- checkNotWsdlRequired(e2);
- }
- }/*else {
- Util.fail(
- "parsing.invalidElement",
- e2.getTagName(),
- e2.getNamespaceURI());
- }*/
- }
-
- if (gotInput && !gotOutput && !gotFault) {
- operation.setStyle(OperationStyle.ONE_WAY);
- } else if (gotInput && gotOutput && inputBeforeOutput) {
- operation.setStyle(OperationStyle.REQUEST_RESPONSE);
- } else if (gotInput && gotOutput && !inputBeforeOutput) {
- operation.setStyle(OperationStyle.SOLICIT_RESPONSE);
- } else if (gotOutput && !gotInput && !gotFault) {
- operation.setStyle(OperationStyle.NOTIFICATION);
- } else {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_INVALID_OPERATION_STYLE(name));
- }
-
- context.pop();
- context.fireDoneParsingEntity(WSDLConstants.QNAME_OPERATION, operation);
- return operation;
- }
-
- private Binding parseBinding(
- TWSDLParserContextImpl context,
- Definitions definitions,
- Element e) {
- context.push();
- context.registerNamespaces(e);
- Binding binding = new Binding(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
- String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
- binding.setName(name);
- String typeAttr = Util.getRequiredAttribute(e, Constants.ATTR_TYPE);
- binding.setPortType(context.translateQualifiedName(context.getLocation(e), typeAttr));
-
- boolean gotDocumentation = false;
-
- for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
- Element e2 = Util.nextElement(iter);
- if (e2 == null)
- break;
-
- if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
- }
- gotDocumentation = true;
- binding.setDocumentation(getDocumentationFor(e2));
- } else if (
- XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_OPERATION)) {
- BindingOperation op = parseBindingOperation(context, e2);
- binding.add(op);
- } else {
- // possible extensibility element -- must live outside the WSDL namespace
- checkNotWsdlElement(e2);
- if (!handleExtension(context, binding, e2)) {
- checkNotWsdlRequired(e2);
- }
- }
- }
-
- context.pop();
- context.fireDoneParsingEntity(WSDLConstants.QNAME_BINDING, binding);
- return binding;
- }
-
- private BindingOperation parseBindingOperation(
- TWSDLParserContextImpl context,
- Element e) {
- context.push();
- context.registerNamespaces(e);
- BindingOperation operation = new BindingOperation(forest.locatorTable.getStartLocation(e));
- String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
- operation.setName(name);
-
- boolean gotDocumentation = false;
-
- boolean gotInput = false;
- boolean gotOutput = false;
- boolean gotFault = false;
- boolean inputBeforeOutput = false;
-
- for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
- Element e2 = Util.nextElement(iter);
- if (e2 == null)
- break;
- if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
- }
- gotDocumentation = true;
- operation.setDocumentation(getDocumentationFor(e2));
- } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_INPUT)) {
- if (gotInput) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_TOO_MANY_ELEMENTS(Constants.TAG_INPUT,
- Constants.TAG_OPERATION,
- name));
- }
-
- /* Here we check for the use scenario */
- context.push();
- context.registerNamespaces(e2);
- BindingInput input = new BindingInput(forest.locatorTable.getStartLocation(e2));
- String nameAttr =
- XmlUtil.getAttributeOrNull(e2, Constants.ATTR_NAME);
- input.setName(nameAttr);
- operation.setInput(input);
- gotInput = true;
- if (gotOutput) {
- inputBeforeOutput = false;
- }
-
- // verify that there is at most one child element and it is a documentation element
- boolean gotDocumentation2 = false;
- for (Iterator iter2 = XmlUtil.getAllChildren(e2);
- iter2.hasNext();
- ) {
- Element e3 = Util.nextElement(iter2);
- if (e3 == null)
- break;
-
- if (XmlUtil
- .matchesTagNS(e3, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation2) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
- }
- gotDocumentation2 = true;
- input.setDocumentation(getDocumentationFor(e3));
- } else {
- // possible extensibility element -- must live outside the WSDL namespace
- checkNotWsdlElement(e3);
- if (!handleExtension(context, input, e3)) {
- checkNotWsdlRequired(e3);
- }
- }
- }
- context.pop();
- } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_OUTPUT)) {
- if (gotOutput) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_TOO_MANY_ELEMENTS(Constants.TAG_INPUT,
- Constants.TAG_OPERATION,
- name));
- }
-
- context.push();
- context.registerNamespaces(e2);
- BindingOutput output = new BindingOutput(forest.locatorTable.getStartLocation(e2));
- String nameAttr =
- XmlUtil.getAttributeOrNull(e2, Constants.ATTR_NAME);
- output.setName(nameAttr);
- operation.setOutput(output);
- gotOutput = true;
- if (gotInput) {
- inputBeforeOutput = true;
- }
-
- // verify that there is at most one child element and it is a documentation element
- boolean gotDocumentation2 = false;
- for (Iterator iter2 = XmlUtil.getAllChildren(e2);
- iter2.hasNext();
- ) {
-
- Element e3 = Util.nextElement(iter2);
- if (e3 == null)
- break;
-
- if (XmlUtil
- .matchesTagNS(e3, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation2) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
- }
- gotDocumentation2 = true;
- output.setDocumentation(getDocumentationFor(e3));
- } else {
- // possible extensibility element -- must live outside the WSDL namespace
- checkNotWsdlElement(e3);
- if (!handleExtension(context, output, e3)) {
- checkNotWsdlRequired(e3);
- }
- }
- }
- context.pop();
- } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_FAULT)) {
- context.push();
- context.registerNamespaces(e2);
- BindingFault fault = new BindingFault(forest.locatorTable.getStartLocation(e2));
- String nameAttr =
- Util.getRequiredAttribute(e2, Constants.ATTR_NAME);
- fault.setName(nameAttr);
- operation.addFault(fault);
- gotFault = true;
-
- // verify that there is at most one child element and it is a documentation element
- boolean gotDocumentation2 = false;
- for (Iterator iter2 = XmlUtil.getAllChildren(e2);
- iter2.hasNext();
- ) {
- Element e3 = Util.nextElement(iter2);
- if (e3 == null)
- break;
-
- if (XmlUtil
- .matchesTagNS(e3, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation2) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
- }
- gotDocumentation2 = true;
- if(fault.getDocumentation() == null)
- fault.setDocumentation(getDocumentationFor(e3));
- } else {
- // possible extensibility element -- must live outside the WSDL namespace
- checkNotWsdlElement(e3);
- if (!handleExtension(context, fault, e3)) {
- checkNotWsdlRequired(e3);
- }
- }
- }
- context.pop();
- } else {
- // possible extensibility element -- must live outside the WSDL namespace
- checkNotWsdlElement(e2);
- if (!handleExtension(context, operation, e2)) {
- checkNotWsdlRequired(e2);
- }
- }
- }
-
- if (gotInput && !gotOutput && !gotFault) {
- operation.setStyle(OperationStyle.ONE_WAY);
- } else if (gotInput && gotOutput && inputBeforeOutput) {
- operation.setStyle(OperationStyle.REQUEST_RESPONSE);
- } else if (gotInput && gotOutput && !inputBeforeOutput) {
- operation.setStyle(OperationStyle.SOLICIT_RESPONSE);
- } else if (gotOutput && !gotInput && !gotFault) {
- operation.setStyle(OperationStyle.NOTIFICATION);
- } else {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_INVALID_OPERATION_STYLE(name));
- }
-
- context.pop();
- context.fireDoneParsingEntity(WSDLConstants.QNAME_OPERATION, operation);
- return operation;
- }
-
- private Import parseImport(
- TWSDLParserContextImpl context,
- Definitions definitions,
- Element e) {
- context.push();
- context.registerNamespaces(e);
- Import anImport = new Import(forest.locatorTable.getStartLocation(e));
- String namespace =
- Util.getRequiredAttribute(e, Constants.ATTR_NAMESPACE);
- anImport.setNamespace(namespace);
- String location = Util.getRequiredAttribute(e, Constants.ATTR_LOCATION);
- anImport.setLocation(location);
-
- // according to the schema in the WSDL 1.1 spec, an import can have a documentation element
- boolean gotDocumentation = false;
-
- for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
- Element e2 = Util.nextElement(iter);
- if (e2 == null)
- break;
-
- if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
- }
- gotDocumentation = true;
- anImport.setDocumentation(getDocumentationFor(e2));
- } else {
- errReceiver.error(forest.locatorTable.getStartLocation(e2), WsdlMessages.PARSING_INVALID_ELEMENT(e2.getTagName(),
- e2.getNamespaceURI()));
- }
- }
- context.pop();
- context.fireDoneParsingEntity(WSDLConstants.QNAME_IMPORT, anImport);
- return anImport;
- }
-
- private Service parseService(
- TWSDLParserContextImpl context,
- Definitions definitions,
- Element e) {
- context.push();
- context.registerNamespaces(e);
- Service service = new Service(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
- String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
- service.setName(name);
-
- boolean gotDocumentation = false;
-
- for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
- Element e2 = Util.nextElement(iter);
- if (e2 == null)
- break;
-
- if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
- }
- gotDocumentation = true;
- if (service.getDocumentation() == null) {
- service.setDocumentation(getDocumentationFor(e2));
- }
- } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_PORT)) {
- Port port = parsePort(context, definitions, e2);
- service.add(port);
- } else {
- // possible extensibility element -- must live outside the WSDL namespace
- checkNotWsdlElement(e2);
- if (!handleExtension(context, service, e2)) {
- checkNotWsdlRequired(e2);
- }
- }
- }
-
- context.pop();
- context.fireDoneParsingEntity(WSDLConstants.QNAME_SERVICE, service);
- return service;
- }
-
- private Port parsePort(
- TWSDLParserContextImpl context,
- Definitions definitions,
- Element e) {
- context.push();
- context.registerNamespaces(e);
-
- Port port = new Port(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
- String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
- port.setName(name);
-
- String bindingAttr =
- Util.getRequiredAttribute(e, Constants.ATTR_BINDING);
- port.setBinding(context.translateQualifiedName(context.getLocation(e), bindingAttr));
-
- boolean gotDocumentation = false;
-
- for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
- Element e2 = Util.nextElement(iter);
- if (e2 == null) {
- break;
- }
-
- if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
- if (gotDocumentation) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
- }
- gotDocumentation = true;
- if (port.getDocumentation() == null) {
- port.setDocumentation(getDocumentationFor(e2));
- }
- } else {
- // possible extensibility element -- must live outside the WSDL namespace
- checkNotWsdlElement(e2);
- if (!handleExtension(context, port, e2)) {
- checkNotWsdlRequired(e2);
- }
- }
- }
-
- context.pop();
- context.fireDoneParsingEntity(WSDLConstants.QNAME_PORT, port);
- return port;
- }
-
- private void validateSchemaImports(Element typesElement){
- for (Iterator iter = XmlUtil.getAllChildren(typesElement); iter.hasNext();) {
- Element e = Util.nextElement(iter);
- if (e == null) {
- break;
- }
- if (XmlUtil.matchesTagNS(e, SchemaConstants.QNAME_IMPORT)) {
- errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.WARNING_WSI_R_2003());
- }else{
- checkNotWsdlElement(e);
-// if (XmlUtil.matchesTagNS(e, SchemaConstants.QNAME_SCHEMA)) {
-// forest.getInlinedSchemaElement().add(e);
-// }
-
- }
- }
- }
-
-
- private boolean handleExtension(
- TWSDLParserContextImpl context,
- TWSDLExtensible entity,
- Element e) {
- TWSDLExtensionHandler h =
- (TWSDLExtensionHandler) extensionHandlers.get(e.getNamespaceURI());
- if (h == null) {
- context.fireIgnoringExtension(e, (Entity) entity);
- errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(e.getLocalName(), e.getNamespaceURI()));
- return false;
- } else {
- return h.doHandleExtension(context, entity, e);
- }
- }
-
- private boolean handleExtension(
- TWSDLParserContextImpl context,
- TWSDLExtensible entity,
- Node n,
- Element e) {
- TWSDLExtensionHandler h =
- (TWSDLExtensionHandler) extensionHandlers.get(n.getNamespaceURI());
- if (h == null) {
- context.fireIgnoringExtension(e, (Entity) entity);
- errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(n.getLocalName(), n.getNamespaceURI()));
- return false;
- } else {
- return h.doHandleExtension(context, entity, e);
- }
- }
-
- private void checkNotWsdlElement(Element e) {
- // possible extensibility element -- must live outside the WSDL namespace
- if (e.getNamespaceURI() != null && e.getNamespaceURI().equals(Constants.NS_WSDL)) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_INVALID_WSDL_ELEMENT(e.getTagName()));
- }
- }
-
- private void checkNotWsdlAttribute(Attr a) {
- // possible extensibility element -- must live outside the WSDL namespace
- if (Constants.NS_WSDL.equals(a.getNamespaceURI())) {
- errReceiver.error(forest.locatorTable.getStartLocation(a.getOwnerElement()), WsdlMessages.PARSING_INVALID_WSDL_ELEMENT(a.getLocalName()));
- }
- }
-
- private void checkNotWsdlRequired(Element e) {
- // check the wsdl:required attribute, fail if set to "true"
- String required =
- XmlUtil.getAttributeNSOrNull(
- e,
- Constants.ATTR_REQUIRED,
- Constants.NS_WSDL);
- if (required != null && required.equals(Constants.TRUE) && !options.isExtensionMode()) {
- errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_REQUIRED_EXTENSIBILITY_ELEMENT(e.getTagName(),
- e.getNamespaceURI()));
- }
- }
-
- private Documentation getDocumentationFor(Element e) {
- String s = XmlUtil.getTextForNode(e);
- if (s == null) {
- return null;
- } else {
- return new Documentation(s);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WhitespaceStripper.java b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WhitespaceStripper.java
deleted file mode 100644
index c9253b20..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WhitespaceStripper.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.ws.wsdl.parser;
-
-import com.sun.xml.internal.bind.WhiteSpaceProcessor;
-import org.xml.sax.*;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * Strips ignorable whitespace from SAX event stream.
- *
- * <p>
- * This filter works only when the event stream doesn't
- * contain any mixed content.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- * Vivek Pandey
- */
-class WhitespaceStripper extends XMLFilterImpl {
-
- private int state = 0;
-
- private char[] buf = new char[1024];
- private int bufLen = 0;
-
- private static final int AFTER_START_ELEMENT = 1;
- private static final int AFTER_END_ELEMENT = 2;
-
- public WhitespaceStripper(XMLReader reader) {
- setParent(reader);
- }
-
- public WhitespaceStripper(ContentHandler handler, ErrorHandler eh, EntityResolver er) {
- setContentHandler(handler);
- if(eh!=null) setErrorHandler(eh);
- if(er!=null) setEntityResolver(er);
- }
-
- public void characters(char[] ch, int start, int length) throws SAXException {
- switch(state) {
- case AFTER_START_ELEMENT:
- // we have to store the characters here, even if it consists entirely
- // of whitespaces. This is because successive characters event might
- // include non-whitespace char, in which case all the whitespaces in
- // this event may suddenly become significant.
- if( bufLen+length>buf.length ) {
- // reallocate buffer
- char[] newBuf = new char[Math.max(bufLen+length,buf.length*2)];
- System.arraycopy(buf,0,newBuf,0,bufLen);
- buf = newBuf;
- }
- System.arraycopy(ch,start,buf,bufLen,length);
- bufLen += length;
- break;
- case AFTER_END_ELEMENT:
- // check if this is ignorable.
- int len = start+length;
- for( int i=start; i<len; i++ )
- if( !WhiteSpaceProcessor.isWhiteSpace(ch[i]) ) {
- super.characters(ch, start, length);
- return;
- }
- // if it's entirely whitespace, ignore it.
- break;
- }
- }
-
- public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
- processPendingText();
- super.startElement(uri, localName, qName, atts);
- state = AFTER_START_ELEMENT;
- bufLen = 0;
- }
-
- public void endElement(String uri, String localName, String qName) throws SAXException {
- processPendingText();
- super.endElement(uri, localName, qName);
- state = AFTER_END_ELEMENT;
- }
-
- /**
- * Forwars the buffered characters if it contains any non-whitespace
- * character.
- */
- private void processPendingText() throws SAXException {
- if(state==AFTER_START_ELEMENT) {
- for( int i=bufLen-1; i>=0; i-- )
- if( !WhiteSpaceProcessor.isWhiteSpace(buf[i]) ) {
- super.characters(buf, 0, bufLen);
- return;
- }
- }
- }
-
- public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
- // ignore completely.
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/AbortException.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/AbortException.java
deleted file mode 100644
index 6709327b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/AbortException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Use is subject to the license terms.
- */
-package com.sun.tools.internal.xjc;
-
-
-/**
- * Signals the abortion of the compilation.
- * <p>
- * This exception should be only thrown from {@link ErrorReceiver}
- * for the consistent error handling.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class AbortException extends RuntimeException {
- public AbortException() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/BadCommandLineException.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/BadCommandLineException.java
deleted file mode 100644
index 16c03f97..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/BadCommandLineException.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc;
-
-import com.sun.istack.internal.Nullable;
-
-/**
- * Signals a bad command line argument.
- */
-public class BadCommandLineException extends Exception {
- private Options options;
-
- public BadCommandLineException(String msg) {
- super(msg);
- }
-
- public BadCommandLineException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public BadCommandLineException() {
- this(null);
- }
-
- public void initOptions(Options opt) {
- assert this.options==null;
- this.options = opt;
- }
-
- /**
- * Gets the partly parsed option object, if any.
- */
- public @Nullable Options getOptions() {
- return options;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/ClassLoaderBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/ClassLoaderBuilder.java
deleted file mode 100644
index bf743f7d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/ClassLoaderBuilder.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.xml.bind.JAXBContext;
-
-import com.sun.istack.internal.tools.MaskingClassLoader;
-import com.sun.istack.internal.tools.ParallelWorldClassLoader;
-
-/**
- * Creates a class loader configured to run XJC 1.0/2.0 safely without
- * interference with JAXB 2.0 API in Mustang.
- *
- * @author Kohsuke Kawaguchi
- */
-class ClassLoaderBuilder {
-
- /**
- * Creates a new class loader that eventually delegates to the given {@link ClassLoader}
- * such that XJC can be loaded by using this classloader.
- *
- * @param v
- * Either "1.0" or "2.0", indicating the version of the -source value.
- */
- protected static ClassLoader createProtectiveClassLoader(ClassLoader cl, String v) throws ClassNotFoundException, MalformedURLException {
- if(noHack) return cl; // provide an escape hatch
-
- boolean mustang = false;
-
- if (SecureLoader.getClassClassLoader(JAXBContext.class) == null) {
- // JAXB API is loaded from the bootstrap. We need to override one with ours
- mustang = true;
-
- List<String> mask = new ArrayList<String>(Arrays.asList(maskedPackages));
- mask.add("javax.xml.bind.");
-
- cl = new MaskingClassLoader(cl,mask);
-
- URL apiUrl = cl.getResource("javax/xml/bind/JAXBPermission.class");
- if(apiUrl==null)
- throw new ClassNotFoundException("There's no JAXB 2.2 API in the classpath");
-
- cl = new URLClassLoader(new URL[]{ParallelWorldClassLoader.toJarUrl(apiUrl)},cl);
- }
-
- //Leave XJC2 in the publicly visible place
- // and then isolate XJC1 in a child class loader,
- // then use a MaskingClassLoader
- // so that the XJC2 classes in the parent class loader
- // won't interfere with loading XJC1 classes in a child class loader
-
- if ("1.0".equals(v)) {
- if(!mustang)
- // if we haven't used Masking ClassLoader, do so now.
- cl = new MaskingClassLoader(cl,toolPackages);
- cl = new ParallelWorldClassLoader(cl,"1.0/");
- } else {
- if(mustang)
- // the whole RI needs to be loaded in a separate class loader
- cl = new ParallelWorldClassLoader(cl,"");
- }
-
- return cl;
- }
-
-
- /**
- * The list of package prefixes we want the
- * {@link MaskingClassLoader} to prevent the parent
- * classLoader from loading
- */
- private static String[] maskedPackages = new String[]{
- // toolPackages + alpha
- "com.sun.tools.",
- "com.sun.codemodel.internal.",
- "com.sun.relaxng.",
- "com.sun.xml.internal.xsom.",
- "com.sun.xml.internal.bind.",
- };
-
- private static String[] toolPackages = new String[]{
- "com.sun.tools.",
- "com.sun.codemodel.internal.",
- "com.sun.relaxng.",
- "com.sun.xml.internal.xsom."
- };
-
- /**
- * Escape hatch in case this class loader hack breaks.
- */
- public static final boolean noHack = Boolean.getBoolean(XJCFacade.class.getName()+".nohack");
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/ConsoleErrorReporter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/ConsoleErrorReporter.java
deleted file mode 100644
index 1df005ff..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/ConsoleErrorReporter.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc;
-
-import java.io.OutputStream;
-import java.io.PrintStream;
-
-import org.xml.sax.SAXParseException;
-
-/**
- * {@link ErrorReceiver} that prints to a {@link PrintStream}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class ConsoleErrorReporter extends ErrorReceiver {
-
- /**
- * Errors, warnings are sent to this output.
- */
- private PrintStream output;
-
- private boolean hadError = false;
-
- public ConsoleErrorReporter( PrintStream out) {
- this.output = out;
- }
- public ConsoleErrorReporter( OutputStream out ) {
- this(new PrintStream(out));
- }
- public ConsoleErrorReporter() { this(System.out); }
-
- public void warning(SAXParseException e) {
- print(Messages.WARNING_MSG,e);
- }
-
- public void error(SAXParseException e) {
- hadError = true;
- print(Messages.ERROR_MSG,e);
- }
-
- public void fatalError(SAXParseException e) {
- hadError = true;
- print(Messages.ERROR_MSG,e);
- }
-
- public void info(SAXParseException e) {
- print(Messages.INFO_MSG,e);
- }
-
- public boolean hadError() {
- return hadError;
- }
-
- private void print( String resource, SAXParseException e ) {
- output.println(Messages.format(resource,e.getMessage()));
- output.println(getLocationString(e));
- output.println();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/Driver.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/Driver.java
deleted file mode 100644
index 5056d39d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/Driver.java
+++ /dev/null
@@ -1,526 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.xjc;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintStream;
-import java.util.Iterator;
-
-import com.sun.codemodel.internal.CodeWriter;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.writer.ZipCodeWriter;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.tools.DefaultAuthenticator;
-import com.sun.tools.internal.xjc.generator.bean.BeanGenerator;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.tools.internal.xjc.reader.gbind.Expression;
-import com.sun.tools.internal.xjc.reader.gbind.Graph;
-import com.sun.tools.internal.xjc.reader.internalizer.DOMForest;
-import com.sun.tools.internal.xjc.reader.xmlschema.ExpressionBuilder;
-import com.sun.tools.internal.xjc.reader.xmlschema.parser.XMLSchemaInternalizationLogic;
-import com.sun.tools.internal.xjc.util.ErrorReceiverFilter;
-import com.sun.tools.internal.xjc.util.NullStream;
-import com.sun.tools.internal.xjc.util.Util;
-import com.sun.tools.internal.xjc.writer.SignatureWriter;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-
-/**
- * Command Line Interface of XJC.
- */
-public class Driver {
-
- public static void main(final String[] args) throws Exception {
- // use the platform default proxy if available.
- // see sun.net.spi.DefaultProxySelector for details.
- try {
- System.setProperty("java.net.useSystemProxies","true");
- } catch (SecurityException e) {
- // failing to set this property isn't fatal
- }
-
- if( Util.getSystemProperty(Driver.class,"noThreadSwap")!=null )
- _main(args); // for the ease of debugging
-
- // run all the work in another thread so that the -Xss option
- // will take effect when compiling a large schema. See
- // http://developer.java.sun.com/developer/bugParade/bugs/4362291.html
- final Throwable[] ex = new Throwable[1];
-
- Thread th = new Thread() {
- @Override
- public void run() {
- try {
- _main(args);
- } catch( Throwable e ) {
- ex[0]=e;
- }
- }
- };
- th.start();
- th.join();
-
- if(ex[0]!=null) {
- // re-throw
- if( ex[0] instanceof Exception )
- throw (Exception)ex[0];
- else
- throw (Error)ex[0];
- }
- }
-
- private static void _main( String[] args ) throws Exception {
- try {
- System.exit(run( args, System.out, System.out ));
- } catch (BadCommandLineException e) {
- // there was an error in the command line.
- // print usage and abort.
- if(e.getMessage()!=null) {
- System.out.println(e.getMessage());
- System.out.println();
- }
-
- usage(e.getOptions(),false);
- System.exit(-1);
- }
- }
-
-
-
- /**
- * Performs schema compilation and prints the status/error into the
- * specified PrintStream.
- *
- * <p>
- * This method could be used to trigger XJC from other tools,
- * such as Ant or IDE.
- *
- * @param args
- * specified command line parameters. If there is an error
- * in the parameters, {@link BadCommandLineException} will
- * be thrown.
- * @param status
- * Status report of the compilation will be sent to this object.
- * Useful to update users so that they will know something is happening.
- * Only ignorable messages should be sent to this stream.
- *
- * This parameter can be null to suppress messages.
- *
- * @param out
- * Various non-ignorable output (error messages, etc)
- * will go to this stream.
- *
- * @return
- * If the compiler runs successfully, this method returns 0.
- * All non-zero values indicate an error. The error message
- * will be sent to the specified PrintStream.
- */
- public static int run(String[] args, final PrintStream status, final PrintStream out)
- throws Exception {
-
- class Listener extends XJCListener {
- ConsoleErrorReporter cer = new ConsoleErrorReporter(out==null?new PrintStream(new NullStream()):out);
-
- @Override
- public void generatedFile(String fileName, int count, int total) {
- message(fileName);
- }
- @Override
- public void message(String msg) {
- if(status!=null)
- status.println(msg);
- }
-
- public void error(SAXParseException exception) {
- cer.error(exception);
- }
-
- public void fatalError(SAXParseException exception) {
- cer.fatalError(exception);
- }
-
- public void warning(SAXParseException exception) {
- cer.warning(exception);
- }
-
- public void info(SAXParseException exception) {
- cer.info(exception);
- }
- }
-
- return run(args,new Listener());
- }
-
- /**
- * Performs schema compilation and prints the status/error into the
- * specified PrintStream.
- *
- * <p>
- * This method could be used to trigger XJC from other tools,
- * such as Ant or IDE.
- *
- * @param args
- * specified command line parameters. If there is an error
- * in the parameters, {@link BadCommandLineException} will
- * be thrown.
- * @param listener
- * Receives messages from XJC reporting progress/errors.
- *
- * @return
- * If the compiler runs successfully, this method returns 0.
- * All non-zero values indicate an error. The error message
- * will be sent to the specified PrintStream.
- */
- public static int run(String[] args, @NotNull final XJCListener listener) throws BadCommandLineException {
-
- // recognize those special options before we start parsing options.
- for (String arg : args) {
- if (arg.equals("-version")) {
- listener.message(Messages.format(Messages.VERSION));
- return -1;
- }
- if (arg.equals("-fullversion")) {
- listener.message(Messages.format(Messages.FULLVERSION));
- return -1;
- }
- }
-
- final OptionsEx opt = new OptionsEx();
- opt.setSchemaLanguage(Language.XMLSCHEMA); // disable auto-guessing
- try {
- opt.parseArguments(args);
- } catch (WeAreDone e) {
- if (opt.proxyAuth != null) {
- DefaultAuthenticator.reset();
- }
- return -1;
- } catch(BadCommandLineException e) {
- if (opt.proxyAuth != null) {
- DefaultAuthenticator.reset();
- }
- e.initOptions(opt);
- throw e;
- }
-
- // display a warning if the user specified the default package
- // this should work, but is generally a bad idea
- if(opt.defaultPackage != null && opt.defaultPackage.length()==0) {
- listener.message(Messages.format(Messages.WARNING_MSG, Messages.format(Messages.DEFAULT_PACKAGE_WARNING)));
- }
-
-
- // set up the context class loader so that the user-specified classes
- // can be loaded from there
- final ClassLoader contextClassLoader = SecureLoader.getContextClassLoader();
- SecureLoader.setContextClassLoader(opt.getUserClassLoader(contextClassLoader));
-
- // parse a grammar file
- //-----------------------------------------
- try {
- if( !opt.quiet ) {
- listener.message(Messages.format(Messages.PARSING_SCHEMA));
- }
-
- final boolean[] hadWarning = new boolean[1];
-
- ErrorReceiver receiver = new ErrorReceiverFilter(listener) {
- @Override
- public void info(SAXParseException exception) {
- if(opt.verbose)
- super.info(exception);
- }
- @Override
- public void warning(SAXParseException exception) {
- hadWarning[0] = true;
- if(!opt.quiet)
- super.warning(exception);
- }
- @Override
- public void pollAbort() throws AbortException {
- if(listener.isCanceled())
- throw new AbortException();
- }
- };
-
- if( opt.mode==Mode.FOREST ) {
- // dump DOM forest and quit
- ModelLoader loader = new ModelLoader( opt, new JCodeModel(), receiver );
- try {
- DOMForest forest = loader.buildDOMForest(new XMLSchemaInternalizationLogic());
- forest.dump(System.out);
- return 0;
- } catch (SAXException e) {
- // the error should have already been reported
- } catch (IOException e) {
- receiver.error(e);
- }
-
- return -1;
- }
-
- if( opt.mode==Mode.GBIND ) {
- try {
- XSSchemaSet xss = new ModelLoader(opt, new JCodeModel(), receiver).loadXMLSchema();
- Iterator<XSComplexType> it = xss.iterateComplexTypes();
- while (it.hasNext()) {
- XSComplexType ct = it.next();
- XSParticle p = ct.getContentType().asParticle();
- if(p==null) continue;
-
- Expression tree = ExpressionBuilder.createTree(p);
- System.out.println("Graph for "+ct.getName());
- System.out.println(tree.toString());
- Graph g = new Graph(tree);
- System.out.println(g.toString());
- System.out.println();
- }
- return 0;
- } catch (SAXException e) {
- // the error should have already been reported
- }
- return -1;
- }
-
- Model model = ModelLoader.load( opt, new JCodeModel(), receiver );
-
- if (model == null) {
- listener.message(Messages.format(Messages.PARSE_FAILED));
- return -1;
- }
-
- if( !opt.quiet ) {
- listener.message(Messages.format(Messages.COMPILING_SCHEMA));
- }
-
- switch (opt.mode) {
- case SIGNATURE :
- try {
- SignatureWriter.write(
- BeanGenerator.generate(model,receiver),
- new OutputStreamWriter(System.out));
- return 0;
- } catch (IOException e) {
- receiver.error(e);
- return -1;
- }
-
- case CODE :
- case DRYRUN :
- case ZIP :
- {
- // generate actual code
- receiver.debug("generating code");
- {// don't want to hold outline in memory for too long.
- Outline outline = model.generateCode(opt,receiver);
- if(outline==null) {
- listener.message(
- Messages.format(Messages.FAILED_TO_GENERATE_CODE));
- return -1;
- }
-
- listener.compiled(outline);
- }
-
- if( opt.mode == Mode.DRYRUN )
- break; // enough
-
- // then print them out
- try {
- CodeWriter cw;
- if( opt.mode==Mode.ZIP ) {
- OutputStream os;
- if(opt.targetDir.getPath().equals("."))
- os = System.out;
- else
- os = new FileOutputStream(opt.targetDir);
-
- cw = opt.createCodeWriter(new ZipCodeWriter(os));
- } else
- cw = opt.createCodeWriter();
-
- if( !opt.quiet ) {
- cw = new ProgressCodeWriter(cw,listener, model.codeModel.countArtifacts());
- }
- model.codeModel.build(cw);
- } catch (IOException e) {
- receiver.error(e);
- return -1;
- }
-
- break;
- }
- default :
- assert false;
- }
-
- if(opt.debugMode) {
- try {
- new FileOutputStream(new File(opt.targetDir,hadWarning[0]?"hadWarning":"noWarning")).close();
- } catch (IOException e) {
- receiver.error(e);
- return -1;
- }
- }
-
- return 0;
- } catch( StackOverflowError e ) {
- if(opt.verbose)
- // in the debug mode, propagate the error so that
- // the full stack trace will be dumped to the screen.
- throw e;
- else {
- // otherwise just print a suggested workaround and
- // quit without filling the user's screen
- listener.message(Messages.format(Messages.STACK_OVERFLOW));
- return -1;
- }
- } finally {
- if (opt.proxyAuth != null) {
- DefaultAuthenticator.reset();
- }
- }
- }
-
- public static String getBuildID() {
- return Messages.format(Messages.BUILD_ID);
- }
-
-
- /**
- * Operation mode.
- */
- private static enum Mode {
- // normal mode. compile the code
- CODE,
-
- // dump the signature of the generated code
- SIGNATURE,
-
- // dump DOMForest
- FOREST,
-
- // same as CODE but don't produce any Java source code
- DRYRUN,
-
- // same as CODE but pack all the outputs into a zip and dumps to stdout
- ZIP,
-
- // testing a new binding mode
- GBIND
- }
-
-
- /**
- * Command-line arguments processor.
- *
- * <p>
- * This class contains options that only make sense
- * for the command line interface.
- */
- static class OptionsEx extends Options
- {
- /** Operation mode. */
- protected Mode mode = Mode.CODE;
-
- /** A switch that determines the behavior in the BGM mode. */
- public boolean noNS = false;
-
- /** Parse XJC-specific options. */
- @Override
- public int parseArgument(String[] args, int i) throws BadCommandLineException {
- if (args[i].equals("-noNS")) {
- noNS = true;
- return 1;
- }
- if (args[i].equals("-mode")) {
- i++;
- if (i == args.length)
- throw new BadCommandLineException(
- Messages.format(Messages.MISSING_MODE_OPERAND));
-
- String mstr = args[i].toLowerCase();
-
- for( Mode m : Mode.values() ) {
- if(m.name().toLowerCase().startsWith(mstr) && mstr.length()>2) {
- mode = m;
- return 2;
- }
- }
-
- throw new BadCommandLineException(
- Messages.format(Messages.UNRECOGNIZED_MODE, args[i]));
- }
- if (args[i].equals("-help")) {
- usage(this,false);
- throw new WeAreDone();
- }
- if (args[i].equals("-private")) {
- usage(this,true);
- throw new WeAreDone();
- }
-
- return super.parseArgument(args, i);
- }
- }
-
- /**
- * Used to signal that we've finished processing.
- */
- private static final class WeAreDone extends BadCommandLineException {}
-
-
- /**
- * Prints the usage screen and exits the process.
- *
- * @param opts
- * If the parsing of options have started, set a partly populated
- * {@link Options} object.
- */
- public static void usage( @Nullable Options opts, boolean privateUsage ) {
- System.out.println(Messages.format(Messages.DRIVER_PUBLIC_USAGE));
- if (privateUsage) {
- System.out.println(Messages.format(Messages.DRIVER_PRIVATE_USAGE));
- }
-
- if( opts!=null && !opts.getAllPlugins().isEmpty()) {
- System.out.println(Messages.format(Messages.ADDON_USAGE));
- for (Plugin p : opts.getAllPlugins()) {
- System.out.println(p.getUsage());
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/ErrorReceiver.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/ErrorReceiver.java
deleted file mode 100644
index da14af59..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/ErrorReceiver.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Use is subject to the license terms.
- */
-package com.sun.tools.internal.xjc;
-
-import com.sun.istack.internal.SAXParseException2;
-import com.sun.tools.internal.xjc.api.ErrorListener;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXParseException;
-
-/**
- * Implemented by the driver of the compiler engine to handle
- * errors found during the compiliation.
- *
- * <p>
- * This class implements {@link ErrorHandler} so it can be
- * passed to anywhere where {@link ErrorHandler} is expected.
- *
- * <p>
- * However, to make the error handling easy (and make it work
- * with visitor patterns nicely),
- * none of the methods on thi class throws {@link org.xml.sax.SAXException}.
- * Instead, when the compilation needs to be aborted,
- * it throws {@link AbortException}, which is unchecked.
- *
- * <p>
- * This also implements the externally visible {@link ErrorListener}
- * so that we can reuse our internal implementation for testing and such.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class ErrorReceiver implements ErrorHandler, ErrorListener {
-
-//
-//
-// convenience methods for callers
-//
-//
- /**
- * @param loc
- * can be null if the location is unknown
- */
- public final void error( Locator loc, String msg ) {
- error( new SAXParseException2(msg,loc) );
- }
-
- public final void error( Locator loc, String msg, Exception e ) {
- error( new SAXParseException2(msg,loc,e) );
- }
-
- public final void error( String msg, Exception e ) {
- error( new SAXParseException2(msg,null,e) );
- }
-
- public void error(Exception e) {
- error(e.getMessage(),e);
- }
-
- /**
- * @param loc
- * can be null if the location is unknown
- */
- public final void warning( Locator loc, String msg ) {
- warning( new SAXParseException(msg,loc) );
- }
-
-//
-//
-// ErrorHandler implementation, but can't throw SAXException
-//
-//
- public abstract void error(SAXParseException exception) throws AbortException;
- public abstract void fatalError(SAXParseException exception) throws AbortException;
- public abstract void warning(SAXParseException exception) throws AbortException;
-
- /**
- * This method will be invoked periodically to allow {@link AbortException}
- * to be thrown, especially when this is driven by some kind of GUI.
- */
- public void pollAbort() throws AbortException {
- }
-
- /**
- * Reports verbose messages to users.
- *
- * This method can be used to report additional non-essential
- * messages. The implementation usually discards them
- * unless some specific debug option is turned on.
- */
- public abstract void info(SAXParseException exception) /*REVISIT:throws AbortException*/;
-
- /**
- * Reports a debug message to users.
- *
- * @see #info(SAXParseException)
- */
- public final void debug( String msg ) {
- info( new SAXParseException(msg,null) );
- }
-
-//
-//
-// convenience methods for derived classes
-//
-//
-
- /**
- * Returns the human readable string representation of the
- * {@link org.xml.sax.Locator} part of the specified
- * {@link SAXParseException}.
- *
- * @return non-null valid object.
- */
- protected final String getLocationString( SAXParseException e ) {
- if(e.getLineNumber()!=-1 || e.getSystemId()!=null) {
- int line = e.getLineNumber();
- return Messages.format( Messages.LINE_X_OF_Y,
- line==-1?"?":Integer.toString( line ),
- getShortName( e.getSystemId() ) );
- } else {
- return Messages.format( Messages.UNKNOWN_LOCATION );
- }
- }
-
- /** Computes a short name of a given URL for display. */
- private String getShortName( String url ) {
- if(url==null)
- return Messages.format( Messages.UNKNOWN_FILE );
-
-// sometimes the user deals with a set of schems that reference each other
-// in a complicated way, and end up importing two versions of the same schema.
-// just printing the file name makes it very difficult to recognize of this problem.
-// so I decided to change it back to print the full URL.
-
-// int idx;
-//
-// // system Id can be URL, so we can't use File.separator
-// idx = url.lastIndexOf('/');
-// if(idx!=-1) return url.substring(idx+1);
-// idx = url.lastIndexOf('\\');
-// if(idx!=-1) return url.substring(idx+1);
-
- return url;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/Language.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/Language.java
deleted file mode 100644
index 871ad88b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/Language.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc;
-
-/**
- * Type of the schema language.
- */
-public enum Language {
- DTD,
- XMLSCHEMA,
- RELAXNG,
- RELAXNG_COMPACT,
- WSDL
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties
deleted file mode 100644
index 3fc147e7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties
+++ /dev/null
@@ -1,251 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.UnknownLocation) if location of the error is not known.
-ConsoleErrorReporter.UnknownLocation = \
- unknown location
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.LineXOfY). {0} - "?"/number, {1} - file location/"unknown file" e.g.: [xjc] [ERROR] Attempt to create a property having the same name as the reserved word "Class". [xjc] line 6 of example.xsd
-ConsoleErrorReporter.LineXOfY = \
- \ \ line {0} of {1}
-
-# may be a placeholder replacement for the second placeholder of ConsoleErrorReporter.LineXOfY (if the file location is unknown)
-ConsoleErrorReporter.UnknownFile = \
- unknown file
-
-Driver.Private.Usage = \
-Additional private testing options:\n\
-\ \ -debug : run in debug mode (includes -verbose)\n\
-\ \ -mode <mode> : run XJC in other running mode\n\
-\ \ -private : display this help message\n\
-Mode:\n\
-\ \ code : generate Java source code (default)\n\
-\ \ dryrun : compile the schema in memory, but don't generate the Java source\n\
-\ \ zip : generate Java source code into a zip file specified by the -d option\n\
-\ \ sig : dump the signatures of the generated code\n\
-\ \ forest : dump transformed DOM forest\n\
-
-Driver.Public.Usage = \
-Usage: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\
-If dir is specified, all schema files in it will be compiled.\n\
-If jar is specified, /META-INF/sun-jaxb.episode binding file will be compiled.\n\
-Options:\n\
-\ \ -nv : do not perform strict validation of the input schema(s)\n\
-\ \ -extension : allow vendor extensions - do not strictly follow the\n\
-\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Compatibility Rules and App E.2 from the JAXB Spec\n\
-\ \ -b <file/dir> : specify external bindings files (each <file> must have its own -b)\n\
-\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ If a directory is given, **/*.xjb is searched\n\
-\ \ -d <dir> : generated files will go into this directory\n\
-\ \ -p <pkg> : specifies the target package\n\
-\ \ -httpproxy <proxy> : set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost:proxyPort\n\
-\ \ -httpproxyfile <f> : Works like -httpproxy but takes the argument in a file to protect password \n\
-\ \ -classpath <arg> : specify where to find user class files\n\
-\ \ -catalog <file> : specify catalog files to resolve external entity references\n\
-\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ support TR9401, XCatalog, and OASIS XML Catalog format.\n\
-\ \ -readOnly : generated files will be in read-only mode\n\
-\ \ -npa : suppress generation of package level annotations (**/package-info.java)\n\
-\ \ -no-header : suppress generation of a file header with timestamp\n\
-\ \ -target (2.0|2.1) : behave like XJC 2.0 or 2.1 and generate code that doesn't use any 2.2 features.\n\
-\ \ -encoding <encoding> : specify character encoding for generated source files\n\
-\ \ -enableIntrospection : enable correct generation of Boolean getters/setters to enable Bean Introspection apis \n\
-\ \ -disableXmlSecurity : disables XML security features when parsing XML documents \n\
-\ \ -contentForWildcard : generates content property for types with multiple xs:any derived elements \n\
-\ \ -xmlschema : treat input as W3C XML Schema (default)\n\
-\ \ -relaxng : treat input as RELAX NG (experimental,unsupported)\n\
-\ \ -relaxng-compact : treat input as RELAX NG compact syntax (experimental,unsupported)\n\
-\ \ -dtd : treat input as XML DTD (experimental,unsupported)\n\
-\ \ -wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported)\n\
-\ \ -verbose : be extra verbose\n\
-\ \ -quiet : suppress compiler output\n\
-\ \ -help : display this help message\n\
-\ \ -version : display version information\n\
-\ \ -fullversion : display full version information\n\
-
-Driver.AddonUsage = \nExtensions:
-
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
-Driver.ExperimentalLanguageWarning = \
- Are you trying to compile {0}? Support for {0} is experimental. \
- You may enable it by using the {1} option.
-
-# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
-Driver.NonExistentDir = \
- cowardly refuses to write to a non-existent directory "{0}"
-
-# Usage not found. TODO Remove
-#Driver.MissingRuntimePackageName = \
-# the -use-runtime option is missing a package name
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingModeOperand = \
- the -mode option is missing an operand
-
-# Usage not found. TODO Remove
-#Driver.MissingCompatibilityOperand = \
-# the -compatibility option is missing an operand
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingOperand = \
- an operand is missing
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyHost = \
- either the -host option is missing an operand \n\
- or -port was specified but not -host
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyPort = \
- either the -port option is missing an operand \n\
- or -host was specified but not -port
-
-Driver.ILLEGAL_TARGET_VERSION = \
- "{0}" is not a valid target version. "2.0" and "2.1" are supported.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MISSING_PROXYFILE = \
- the -httpproxyfile option is missing an operand
-
-Driver.NO_SUCH_FILE = \
- No such file: {0}
-
-Driver.ILLEGAL_PROXY = \
- "{0}" is not a valid proxy format. The format is [user[:password]@]proxyHost:proxyPort
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedMode = \
- unrecognized mode {0}
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedParameter = \
- unrecognized parameter {0}
-
-Driver.UnsupportedEncoding = \
- unsupported encoding: {0}
-
-Driver.MissingGrammar = \
- grammar is not specified
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-Driver.NotABindingFile = \
- not an external binding file. The root element must be '{'http://java.sun.com/xml/ns/jaxb'}'bindings but it is '{'{0}'}'{1}
-
-# Not concatenated with any other string (written on a separate line).
-Driver.ParsingSchema = \
- parsing a schema...
-
-Driver.ParseFailed = \
- Failed to parse a schema.
-
-Driver.StackOverflow = \
- Stack overflow. Either you are compiling a large schema that requires more resources, or \
- XJC has a bug. First, please extend the stack size by using the -Xss JVM option. If this \
- doesn'''t solve the problem, please use the -debug option to obtain the stack trace and \
- contact Sun.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.CompilingSchema = \
- compiling a schema...
-
-Driver.FailedToGenerateCode = \
- Failed to produce code.
-
-# 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-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-b130911.1802
-
-Driver.FullVersion = \
- xjc full version "2.2.8-b130911.1802"
-
-Driver.BuildID = 2.2.8-b130911.1802
-
-# for JDK integration - include version in source zip
-jaxb.jdk.version=@@JAXB_JDK_VERSION@@
-
-# see java.text.SimpleDateFormat for format syntax
-# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
-Driver.DateFormat = \
- yyyy.MM.dd
-
-# see java.text.SimpleDateFormat for format syntax
-# Format should not be changed, English locale is used to transform this string into a real time.
-Driver.TimeFormat = \
- hh:mm:ss a z
-
-# as in: "generated on <date> at <time>"
-Driver.At = \
- at
-
-# ERROR in this meaning is a well known level of logging and should not be translated.
-Driver.ErrorMessage = \
- [ERROR] {0}
-
-# WARNING in this meaning is a well known level of logging and should not be translated.
-Driver.WarningMessage = \
- [WARNING] {0}
-
-# INFO in this meaning is a well known level of logging and should not be translated.
-Driver.InfoMessage = \
- [INFO] {0}
-
-ModelLoader.TooManySchema = \
- Too many schema files for this schema language. Compile one file at a time.
-
-ModelLoader.BindingFileNotSupportedForRNC = \
- External binding files are not supported for the RELAX NG compact syntax.
-
-Driver.DefaultVersion = \
- Defaulting the version to JAXB 2.0
-
-Driver.DefaultPackageWarning = \
- Default Java package specified. You will not be able to access the generated code from classes in any other package.
-
-Driver.NotAValidFileName = \
- "{0}" is not a valid file name: {1}
-
-Driver.FailedToParse = \
- Failed to parse "{0}": {1}
-
-Driver.NotAFileNorURL = \
- "{0}" is neither a file name nor a URL
-
-FIELD_RENDERER_CONFLICT = \
- "-{0}" and "-{1}" are mutually exclusive since both affect the code generation
-
-NAME_CONVERTER_CONFLICT = \
- "-{0}" and "-{1}" are mutually exclusive since both affect the code generation
-
-# {0} - file path, {1} - exception message e.g.: Failed to load "/foo/bar/Library.jar": File not found.
-FAILED_TO_LOAD = \
- Failed to load "{0}": {1}
-
-PLUGIN_LOAD_FAILURE = \
- Failure to load a plugin: "{0}". Use the system property ''-Dcom.sun.tools.internal.xjc.Options.findServices=true'' to \
- diagnose it further
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties
deleted file mode 100644
index 8069d4f3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.UnknownLocation) if location of the error is not known.
-ConsoleErrorReporter.UnknownLocation = unbekanntes Verzeichnis
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.LineXOfY). {0} - "?"/number, {1} - file location/"unknown file" e.g.: [xjc] [ERROR] Attempt to create a property having the same name as the reserved word "Class". [xjc] line 6 of example.xsd
-ConsoleErrorReporter.LineXOfY = \ \ Zeile {0} von {1}
-
-# may be a placeholder replacement for the second placeholder of ConsoleErrorReporter.LineXOfY (if the file location is unknown)
-ConsoleErrorReporter.UnknownFile = unbekannte Datei
-
-Driver.Private.Usage = Zus\u00e4tzliche private Testoptionen:\n\\ \\ -debug : Ausf\u00fchrung im Debug-Modus (umfasst -verbose)\n\\ \\ -mode <mode> : F\u00fchrt XJC in einem anderen Ausf\u00fchrungsmodus aus\n\\ \\ -private : Zeigt diese Hilfemeldung an\nModus:\n\\ \\ code : Generiert Java-Quellcode (Standard)\n\\ \\ dryrun : Kompiliert das Schema im Speicher, generiert die Java-Quelle jedoch nicht\n\\ \\ zip : Generiert den Java-Quellcode in einer .zip-Datei, wie mit der Option -d angegeben\n\\ \\ sig : Gibt die Signaturen des generierten Codes aus\n\\ \\ forest : Gibt transformierte DOM-Gesamtstruktur aus\n
-Driver.Public.Usage = Verwendung: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\nWenn dir angegeben wird, werden alle Schemadateien im Verzeichnis kompiliert.\nWenn jar angegeben wird, wird die /META-INF/sun-jaxb.episode-Binding-Datei kompiliert.\nOptionen:\n\\ \\ -nv : F\u00fchrt keine strikte Validierung der Eingabeschemas durch\n\\ \\ -extension : L\u00e4sst Herstellererweiterungen zu - Befolgt die \n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Kompatibilit\u00e4tsregeln und App E.2 der JAXB-Spezifikation nicht strikt\n\\ \\ -b <file/dir> : Gibt externe Bindings-Dateien an (jede <file> muss ihre eigene Option -b haben)\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Wenn ein Verzeichnis angegeben wird, wird **/*.xjb durchsucht\n\\ \\ -d <dir> : Generierte Dateien werden in diesem Verzeichnis gespeichert\n\\ \\ -p <pkg> : Gibt das Zielpackage an\n\\ \\ -httpproxy <proxy> : set HTTP/HTTPS proxy. Format ist [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile <f> : Wird wie -httpproxy verwendet, verwendet jedoch das Argument in einer Datei zum Schutz des Kennwortes \n\\ \\ -classpath <arg> : Gibt an, wo die Benutzerklassendateien gefunden werden\n\\ \\ -catalog <file> : Gibt Katalogdateien zur Aufl\u00f6sung von externen Entity-Referenzen an\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Unterst\u00fctzt TR9401, XCatalog und OASIS-XML-Katalogformat.\n\\ \\ -readOnly : Generierte Dateien werden im schreibgesch\u00fctzten Modus gelesen\n\\ \\ -npa : Unterdr\u00fcckt die Generierung von Annotationen auf Packageebene (**/package-info.java)\n\\ \\ -no-header : Unterdr\u00fcckt die Generierung eines Datei-Headers mit Zeitstempel\n\\ \\ -target (2.0|2.1) : Verh\u00e4lt sich wie XJC 2.0 oder 2.1 und generiert Code, der keine 2.2-Features verwendet.\n\\ \\ -encoding <encoding> : Gibt Zeichencodierung f\u00fcr generierte Quelldateien an\n\\ \\ -enableIntrospection : Aktiviert die ordnungsgem\u00e4\u00dfe Generierung von booleschen Gettern/Settern zur Aktivierung von Bean Introspection-APIs \n\\ \\ -contentForWildcard : Generiert Contenteigenschaft f\u00fcr Typen mit mehreren von xs:any abgeleiteten Elementen \n\\ \\ -xmlschema : Behandelt Eingabe als W3C-XML-Schema (Standard)\n\\ \\ -relaxng : Behandelt Eingabe als RELAX NG (experimentell, nicht unterst\u00fctzt)\n\\ \\ -relaxng-compact : Behandelt Eingabe als RELAX NG-Kompaktsyntax (experimentell, nicht unterst\u00fctzt)\n\\ \\ -dtd : Behandelt Eingabe als XML DTD (experimentell, nicht unterst\u00fctzt)\n\\ \\ -wsdl : Behandelt Eingabe als WSDL und kompiliert enthaltene Schemas (experimentell, nicht unterst\u00fctzt)\n\\ \\ -verbose : Verwendet extra-verbose\n\\ \\ -quiet : Unterdr\u00fcckt die Compilerausgabe\n\\ \\ -help : Zeigt diese Hilfemeldung an\n\\ \\ -version : Zeigt Versionsinformationen an\n\\ \\ -fullversion : Zeigt vollst\u00e4ndige Versionsinformationen an\n
-Driver.AddonUsage = \nErweiterungen:
-
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
-Driver.ExperimentalLanguageWarning = Versuchen Sie, {0} zu kompilieren? Unterst\u00fctzung f\u00fcr {0} ist zu Testzwecken bestimmt. Eine Aktivierung ist mit der Option {1} m\u00f6glich.
-
-# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
-Driver.NonExistentDir = In ein nicht vorhandenes Verzeichnis "{0}" kann nicht geschrieben werden
-
-# Usage not found. TODO Remove
-#Driver.MissingRuntimePackageName = \
-# the -use-runtime option is missing a package name
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingModeOperand = Bei der Option -mode fehlt ein Operand
-
-# Usage not found. TODO Remove
-#Driver.MissingCompatibilityOperand = \
-# the -compatibility option is missing an operand
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingOperand = Ein Operand fehlt
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyHost = Entweder fehlt bei der Option -host ein Operand, \noder es wurde -port, jedoch nicht -host angegeben
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyPort = Entweder fehlt bei der Option -port ein Operand, \noder es wurde -host, jedoch nicht -port angegeben
-
-Driver.ILLEGAL_TARGET_VERSION = "{0}" ist keine g\u00fcltige Zielversion. "2.0" und "2.1" werden unterst\u00fctzt.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MISSING_PROXYFILE = Bei der Option -httpproxyfile fehlt ein Operand
-
-Driver.NO_SUCH_FILE = Keine derartige Datei: {0}
-
-Driver.ILLEGAL_PROXY = "{0}" ist kein g\u00fcltiges Proxyformat. Das Format ist [user[:password]@]proxyHost:proxyPort
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedMode = unbekannter Modus {0}
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedParameter = unbekannter Parameter {0}
-
-Driver.UnsupportedEncoding = nicht unterst\u00fctzte Codierung: {0}
-
-Driver.MissingGrammar = Grammatik nicht angegeben
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-Driver.NotABindingFile = keine externe Binding-Datei. Das Root-Element muss ''{''http://java.sun.com/xml/ns/jaxb''}''-Bindings sein, ist jedoch ''{''{0}''}''{1}
-
-# Not concatenated with any other string (written on a separate line).
-Driver.ParsingSchema = Ein Schema wird geparst ...
-
-Driver.ParseFailed = Ein Schema konnte nicht geparst werden.
-
-Driver.StackOverflow = Stack-\u00dcberlauf. Entweder kompilieren Sie ein gro\u00dfes Schema, das mehr Ressourcen erfordert, oder XJC enth\u00e4lt einen Bug. Erweitern Sie zuerst die Stack-Gr\u00f6\u00dfe mit der Option -Xss JVM. Wenn das Problem dadurch nicht gel\u00f6st wird, verwenden Sie die Option -debug, um den Stack Trace abzurufen, und wenden Sie sich an Sun.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.CompilingSchema = Ein Schema wird kompiliert ...
-
-Driver.FailedToGenerateCode = Code konnte nicht erzeugt werden.
-
-# 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-b130911.1802
-
-Driver.FullVersion = xjc vollst\u00E4ndige Version "2.2.8-b130911.1802"
-
-Driver.BuildID = 2.2.8-b130911.1802
-
-# for JDK integration - include version in source zip
-jaxb.jdk.version=@@JAXB_JDK_VERSION@@
-
-# see java.text.SimpleDateFormat for format syntax
-# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
-Driver.DateFormat = yyyy.MM.dd
-
-# see java.text.SimpleDateFormat for format syntax
-# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html).
-Driver.TimeFormat = hh:mm:ss a z
-
-# as in: "generated on <date> at <time>"
-Driver.At = um
-
-# ERROR in this meaning is a well known level of logging and should not be translated.
-Driver.ErrorMessage = [ERROR] {0}
-
-# WARNING in this meaning is a well known level of logging and should not be translated.
-Driver.WarningMessage = [WARNING] {0}
-
-# INFO in this meaning is a well known level of logging and should not be translated.
-Driver.InfoMessage = [INFO] {0}
-
-ModelLoader.TooManySchema = Zu viele Schemadateien f\u00fcr diese Schemasprache. Kompilieren Sie die Dateien nacheinander.
-
-ModelLoader.BindingFileNotSupportedForRNC = Externe Binding-Dateien werden f\u00fcr die kompakte RELAX NG-Syntax nicht unterst\u00fctzt.
-
-Driver.DefaultVersion = Als Standardversion wird JAXB 2.0 verwendet
-
-Driver.DefaultPackageWarning = Standard-Java-Package angegeben. Sie k\u00f6nnen aus Klassen in einem anderen Package nicht auf den generierten Code zugreifen.
-
-Driver.NotAValidFileName = "{0}" ist kein g\u00fcltiger Dateiname: {1}
-
-Driver.FailedToParse = Parsen von "{0}" nicht m\u00f6glich: {1}
-
-Driver.NotAFileNorURL = "{0}" ist weder ein Dateiname noch eine URL
-
-FIELD_RENDERER_CONFLICT = "-{0}" und "-{1}" schlie\u00dfen sich gegenseitig aus, weil sich beide auf die Codegenerierung auswirken
-
-NAME_CONVERTER_CONFLICT = "-{0}" und "-{1}" schlie\u00dfen sich gegenseitig aus, weil sich beide auf die Codegenerierung auswirken
-
-# {0} - file path, {1} - exception message e.g.: Failed to load "/foo/bar/Library.jar": File not found.
-FAILED_TO_LOAD = Laden von "{0}" nicht m\u00f6glich: {1}
-
-PLUGIN_LOAD_FAILURE = Ein Plug-in konnte nicht geladen werden: "{0}". Verwenden Sie die Systemeigenschaft ''-Dcom.sun.tools.internal.xjc.Options.findServices=true'' zur weiteren Diagnose
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_es.properties
deleted file mode 100644
index c96e2a50..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_es.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.UnknownLocation) if location of the error is not known.
-ConsoleErrorReporter.UnknownLocation = ubicaci\u00f3n desconocida
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.LineXOfY). {0} - "?"/number, {1} - file location/"unknown file" e.g.: [xjc] [ERROR] Attempt to create a property having the same name as the reserved word "Class". [xjc] line 6 of example.xsd
-ConsoleErrorReporter.LineXOfY = \ \ l\u00ednea {0} de {1}
-
-# may be a placeholder replacement for the second placeholder of ConsoleErrorReporter.LineXOfY (if the file location is unknown)
-ConsoleErrorReporter.UnknownFile = archivo desconocido
-
-Driver.Private.Usage = Opciones de pruebas privadas adicionales:\n\\ \\ -debug : se ejecuta en modo de depuraci\u00f3n (incluye -verbose)\n\\ \\ -mode <modo> : ejecuta XJC en otro modo de ejecuci\u00f3n\n\\ \\ -private : muestra este mensaje de ayuda\nModo:\n\\ \\ code : genera c\u00f3digo fuente Java (por defecto)\n\\ \\ dryrun : compila el esquema en la memoria, pero no genera el c\u00f3digo fuente Java\n\\ \\ zip : genera c\u00f3digo fuente Java en un archivo zip especificado por la opci\u00f3n -d\n\\ \\ sig : vuelca las firmas del c\u00f3digo generado\n\\ \\ forest : vuelca el bosque DOM transformado\n
-Driver.Public.Usage = Sintaxis: xjc [-options ...] <archivo de esquema/URL/dir/jar> ... [-b <infoenlace>] ...\nSi se especifica dir, se compilar\u00e1n todos los archivos de esquema que hay en \u00e9l.\nSi se especifica jar, se compilar\u00e1 el archivo de enlace /META-INF/sun-jaxb.episode.\nOpciones:\n\\ \\ -nv : no realiza una validaci\u00f3n estricta de los esquemas de entrada\n\\ \\ -extension : permite extensiones de proveedor - no cumple estrictamente las\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ reglas de compatibilidad y el ap\u00e9ndice E.2 de la especificaci\u00f3n JAXB\n\\ \\ -b <archivo/dir> : especifica archivos de enlace externos (cada <archivo> debe tener su propio -b)\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Si se proporciona un directorio, se busca **/*.xjb\n\\ \\ -d <directorio> : los archivos generados ir\u00e1n a este directorio\n\\ \\ -p <paquete> : especifica el paquete de destino\n\\ \\ -httpproxy <proxy> : define el proxy HTTP/HTTPS. El formato es [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile <f> : funciona como -httpproxy, pero toma el argumento de un archivo para proteger la contrase\u00f1a \n\\ \\ -classpath <arg> : especifica d\u00f3nde encontrar archivos de clase de usuario\n\\ \\ -catalog <archivo> : especifica archivos de cat\u00e1logo para resolver referencias de entidades externas\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ soporta el formato de cat\u00e1logo TR9401, XCatalog y OASIS XML.\n\\ \\ -readOnly : los archivos generados estar\u00e1n en modo de s\u00f3lo lectura\n\\ \\ -npa : suprime la generaci\u00f3n de anotaciones de nivel de paquete (**/package-info.java)\n\\ \\ -no-header : suprime la generaci\u00f3n de una cabecera de archivo con registro de hora\n\\ \\ -target (2.0|2.1) : se comporta como XJC 2.0 o 2.1 y genera c\u00f3digo que no utiliza ninguna de las funciones de 2.2.\n\\ \\ -encoding <codificaci\u00f3n> :especifica la codificaci\u00f3n de caracteres de los archivos de origen generados\n\\ \\ -enableIntrospection : permite la generaci\u00f3n correcta de getters/setters booleanos para permitir API de introspecci\u00f3n de bean \n\\ \\ -contentForWildcard : genera la propiedad de contenido para tipos con m\u00faltiples elementos derivados de xs:any \n\\ \\ -xmlschema : trata la entrada como un esquema XML de W3C (por defecto)\n\\ \\ -relaxng : trata la entrada como RELAX NG (experimental, no soportado)\n\\ \\ -relaxng-compact : trata la entrada como sintaxis compacta de RELAX NG (experimental, no soportado)\n\\ \\ -dtd : trata la entrada como DTD de XML (experimental, no soportado)\n\\ \\ -wsdl : trata la entrada como WSDL y compila esquemas en su interior (experimental, no soportado)\n\\ \\ -verbose : con detalles adicionales\n\\ \\ -quiet : suprime la salida del compilador\n\\ \\ -help : muestra este mensaje de ayuda\n\\ \\ -version : muestra informaci\u00f3n de la versi\u00f3n\n\\ \\ -fullversion : muestra informaci\u00f3n completa de la versi\u00f3n\n
-Driver.AddonUsage = \nExtensiones:
-
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
-Driver.ExperimentalLanguageWarning = \u00bfEst\u00e1 intentando compilar {0}? El soporte de {0} es experimental. Para activarlo, utilice la opci\u00f3n {1}.
-
-# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
-Driver.NonExistentDir = No puede escribir en un directorio que no existe "{0}".
-
-# Usage not found. TODO Remove
-#Driver.MissingRuntimePackageName = \
-# the -use-runtime option is missing a package name
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingModeOperand = Falta un operando en la opci\u00f3n -mode.
-
-# Usage not found. TODO Remove
-#Driver.MissingCompatibilityOperand = \
-# the -compatibility option is missing an operand
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingOperand = Falta un operando.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyHost = Falta un operando en la opci\u00f3n -host \no se ha especificado -port, pero no -host.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyPort = Falta un operando en la opci\u00f3n -port \no se ha especificado -host, pero no -port.
-
-Driver.ILLEGAL_TARGET_VERSION = "{0}" no es una versi\u00f3n de destino v\u00e1lida. "2.0" y "2.1" est\u00e1n soportadas.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MISSING_PROXYFILE = Falta un operando en la opci\u00f3n -httpproxyfile.
-
-Driver.NO_SUCH_FILE = Ning\u00fan archivo similar: {0}
-
-Driver.ILLEGAL_PROXY = "{0}" no es un formato proxy v\u00e1lido. El formato es [user[:password]@]proxyHost:proxyPort
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedMode = Modo {0} no reconocido.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedParameter = Par\u00e1metro {0} no reconocido.
-
-Driver.UnsupportedEncoding = codificaci\u00f3n no soportada: {0}
-
-Driver.MissingGrammar = no se ha especificado la gram\u00e1tica
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-Driver.NotABindingFile = no es un archivo de enlace externo. El elemento ra\u00edz deben ser enlaces ''{''http://java.sun.com/xml/ns/jaxb''}'', pero es ''{''{0}''}''{1}
-
-# Not concatenated with any other string (written on a separate line).
-Driver.ParsingSchema = Analizando un esquema...
-
-Driver.ParseFailed = Fallo al analizar un esquema.
-
-Driver.StackOverflow = Desbordamiento de pila. Est\u00e1 compilando un esquema de gran tama\u00f1o que necesita m\u00e1s recursos o XJC tiene un bug. En primer lugar, para ampliar el tama\u00f1o de pila, utilice la opci\u00f3n -Xss de JVM. Si no se soluciona el problema, utilice la opci\u00f3n -debug para obtener el rastreo de pila y p\u00f3ngase en contacto con Oracle.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.CompilingSchema = Compilando un esquema...
-
-Driver.FailedToGenerateCode = Fallo al producir c\u00f3digo.
-
-# 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-b130911.1802
-
-Driver.FullVersion = versi\u00F3n completa de xjc "2.2.8-b130911.1802"
-
-Driver.BuildID = 2.2.8-b130911.1802
-
-# for JDK integration - include version in source zip
-jaxb.jdk.version=@@JAXB_JDK_VERSION@@
-
-# see java.text.SimpleDateFormat for format syntax
-# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
-Driver.DateFormat = yyyy.MM.dd
-
-# see java.text.SimpleDateFormat for format syntax
-# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html).
-Driver.TimeFormat = hh:mm:ss a z
-
-# as in: "generated on <date> at <time>"
-Driver.At = a las
-
-# ERROR in this meaning is a well known level of logging and should not be translated.
-Driver.ErrorMessage = [ERROR] {0}
-
-# WARNING in this meaning is a well known level of logging and should not be translated.
-Driver.WarningMessage = [WARNING] {0}
-
-# INFO in this meaning is a well known level of logging and should not be translated.
-Driver.InfoMessage = [INFO] {0}
-
-ModelLoader.TooManySchema = Hay demasiados archivos de esquema para este lenguaje de esquema. Compile los archivos de uno en uno.
-
-ModelLoader.BindingFileNotSupportedForRNC = Los archivos de enlace externos no est\u00e1n soportados para la sintaxis compacta de RELAX NG.
-
-Driver.DefaultVersion = Aplicando la versi\u00f3n por defecto JAXB 2.0
-
-Driver.DefaultPackageWarning = Se ha especificado el paquete Java por defecto. No podr\u00e1 acceder al c\u00f3digo generado desde las clases de otro paquete.
-
-Driver.NotAValidFileName = "{0}" no es un nombre de archivo v\u00e1lido: {1}
-
-Driver.FailedToParse = Fallo al analizar "{0}": {1}
-
-Driver.NotAFileNorURL = "{0}" no es un nombre de archivo ni una URL
-
-FIELD_RENDERER_CONFLICT = "-{0}" y "-{1}" se excluyen mutuamente, porque ambos afectan a la generaci\u00f3n de c\u00f3digo
-
-NAME_CONVERTER_CONFLICT = "-{0}" y "-{1}" se excluyen mutuamente, porque ambos afectan a la generaci\u00f3n de c\u00f3digo
-
-# {0} - file path, {1} - exception message e.g.: Failed to load "/foo/bar/Library.jar": File not found.
-FAILED_TO_LOAD = Fallo al cargar "{0}": {1}
-
-PLUGIN_LOAD_FAILURE = Fallo al cargar un plugin: "{0}". Utilice la propiedad del sistema ''-Dcom.sun.tools.internal.xjc.Options.findServices=true'' para continuar el diagn\u00f3stico
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties
deleted file mode 100644
index da2d9564..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.UnknownLocation) if location of the error is not known.
-ConsoleErrorReporter.UnknownLocation = emplacement inconnu
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.LineXOfY). {0} - "?"/number, {1} - file location/"unknown file" e.g.: [xjc] [ERROR] Attempt to create a property having the same name as the reserved word "Class". [xjc] line 6 of example.xsd
-ConsoleErrorReporter.LineXOfY = \ \ ligne {0} sur {1}
-
-# may be a placeholder replacement for the second placeholder of ConsoleErrorReporter.LineXOfY (if the file location is unknown)
-ConsoleErrorReporter.UnknownFile = fichier inconnu
-
-Driver.Private.Usage = Options de test priv\u00e9es suppl\u00e9mentaires : \n\ \ -debug : ex\u00e9cutez en mode d\u00e9bogage (inclut -verbose)\n\ \ -mode <mode> : ex\u00e9cutez XJC dans un autre mode d'ex\u00e9cution\n\ \ -private : affichez ce message d'aide\nMode :\n\ \ code : g\u00e9n\u00e9rez un code source Java (par d\u00e9faut)\n\ \ dryrun : compilez le sch\u00e9ma en m\u00e9moire, mais ne g\u00e9n\u00e9rez pas la source Java\n\ \ zip : g\u00e9n\u00e9rez le code source Java dans un fichier ZIP indiqu\u00e9 par l'option -d\n\ \ sig : videz les signatures du code g\u00e9n\u00e9r\u00e9\n\ \ forest : le vidage a transform\u00e9 la for\u00eat DOM\n
-Driver.Public.Usage = Syntaxe : xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\nSi le r\u00e9pertoire est indiqu\u00e9, tous les fichiers de sch\u00e9ma qu'il contient seront compil\u00e9s.\nSi le fichier JAR est indiqu\u00e9, le fichier de binding /META-INF/sun-jaxb.episode sera compil\u00e9.\nOptions :\n\ \ -nv : n'effectuez pas de validation stricte des sch\u00e9mas d'entr\u00e9e\n\ \ -extension : autorisez les extensions fournisseur, ne suivez pas strictement les\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ R\u00e8gles de compatibilit\u00e9 et App E.2 de la sp\u00e9cification JAXB\n\ \ -b <file/dir> : indiquez les fichiers de binding externes (chaque \u00e9l\u00e9ment <file> doit avoir sa propre option -b)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Si un r\u00e9pertoire est indiqu\u00e9, **/*.xjb est recherch\u00e9\n\ \ -d <dir> : les fichiers g\u00e9n\u00e9r\u00e9s seront plac\u00e9s dans ce r\u00e9pertoire\n\ \ -p <pkg> : indique le package cible\n\ \ -httpproxy <proxy> : d\u00e9finissez le proxy HTTP/HTTPS. Le format est [user[:password]@]proxyHost:proxyPort\n\ \ -httpproxyfile <f> : fonctionne comme -httpproxy mais prend l'argument dans un fichier pour prot\u00e9ger le mot de passe \n\ \ -classpath <arg> : indiquez o\u00f9 trouver les fichiers de classe utilisateur\n\ \ -catalog <file> : indiquez les fichiers de catalogue pour r\u00e9soudre les r\u00e9f\u00e9rences d'entit\u00e9 externes\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ prenez en charge le format de catalogue TR9401, XCatalog et OASIS XML.\n\ \ -readOnly : les fichiers g\u00e9n\u00e9r\u00e9s seront en mode lecture seule\n\ \ -npa : supprimez la g\u00e9n\u00e9ration des annotations de niveau package (**/package-info.java)\n\ \ -no-header : supprimez la g\u00e9n\u00e9ration d'un en-t\u00eate de fichier avec horodatage\n\ \ -target (2.0|2.1) : comportez-vous comme XJC 2.0 ou 2.1 et g\u00e9n\u00e9rez du code qui n'utilise aucune fonctionnalit\u00e9 2.2.\n\ \ -encoding <encoding> : indiquez l'encodage de caract\u00e8res pour les fichiers source g\u00e9n\u00e9r\u00e9s\n\ \ -enableIntrospection : activez la g\u00e9n\u00e9ration correcte des m\u00e9thodes get/set bool\u00e9ennes pour activer les API d'introspection de bean \n\ \ -contentForWildcard : g\u00e9n\u00e8re la propri\u00e9t\u00e9 de contenu pour les types avec plusieurs \u00e9l\u00e9ments d\u00e9riv\u00e9s xs:any \n\ \ -xmlschema : traitez l'entr\u00e9e en tant que W3C XML Schema (par d\u00e9faut)\n\ \ -relaxng : traitez l'entr\u00e9e en tant que RELAX NG (exp\u00e9rimental, non pris en charge)\n\ \ -relaxng-compact : traitez l'entr\u00e9e en tant que syntaxe compacte RELAX NG (exp\u00e9rimental, non pris en charge)\n\ \ -dtd : traitez l'entr\u00e9e en tant que DTD XML (exp\u00e9rimental, non pris en charge)\n\ \ -wsdl : traitez l'entr\u00e9e en tant que WSDL et compilez-y les sch\u00e9mas (exp\u00e9rimental, non pris en charge)\n\ \ -verbose : agissez en mode extra verbose\n\ \ -quiet : supprimez la sortie de compilateur\n\ \ -help : affichez ce message d'aide\n\ \ -version : affichez ces informations de version\n\ \ -fullversion : affichez ces informations de version compl\u00e8te\n
-Driver.AddonUsage = \nExtensions :
-
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
-Driver.ExperimentalLanguageWarning = Essayez-vous de compiler {0} ? La prise en charge de {0} est exp\u00e9rimentale. Vous pouvez l''activer \u00e0 l''aide de l''option {1}.
-
-# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
-Driver.NonExistentDir = ne peut pas \u00e9crire sur un r\u00e9pertoire "{0}" non existant
-
-# Usage not found. TODO Remove
-#Driver.MissingRuntimePackageName = \
-# the -use-runtime option is missing a package name
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingModeOperand = un op\u00e9rande est manquant dans l'option -mode
-
-# Usage not found. TODO Remove
-#Driver.MissingCompatibilityOperand = \
-# the -compatibility option is missing an operand
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingOperand = un op\u00e9rande est manquant
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyHost = un op\u00e9rande est manquant dans l'option -host \nou -port a \u00e9t\u00e9 indiqu\u00e9, mais pas -host
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyPort = un op\u00e9rande est manquant dans l'option -port \nou -host a \u00e9t\u00e9 indiqu\u00e9, mais pas -port
-
-Driver.ILLEGAL_TARGET_VERSION = "{0}" n''est pas une version cible valide. Les versions "2.0" et "2.1" sont prises en charge.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MISSING_PROXYFILE = un op\u00e9rande est manquant dans l'option -httpproxyfile
-
-Driver.NO_SUCH_FILE = Aucun fichier de ce type : {0}
-
-Driver.ILLEGAL_PROXY = "{0}" n''est pas un format de proxy valide. Le format est [user[:password]@]proxyHost:proxyPort
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedMode = mode {0} non reconnu
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedParameter = param\u00e8tre {0} non reconnu
-
-Driver.UnsupportedEncoding = encodage non pris en charge : {0}
-
-Driver.MissingGrammar = la grammaire n'est pas indiqu\u00e9e
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-Driver.NotABindingFile = n''est pas un fichier de binding externe. L''\u00e9l\u00e9ment racine doit correspondre aux bindings ''{''http://java.sun.com/xml/ns/jaxb''}'', mais il s''agit de ''{''{0}''}''{1}
-
-# Not concatenated with any other string (written on a separate line).
-Driver.ParsingSchema = analyse d'un sch\u00e9ma...
-
-Driver.ParseFailed = Echec de l'analyse d'un sch\u00e9ma.
-
-Driver.StackOverflow = D\u00e9bordement de pile. Vous compilez un sch\u00e9ma volumineux qui exige davantage de ressources ou XJC pr\u00e9sente un bug. Etendez d'abord la taille de pile \u00e0 l'aide de l'option JVM -Xss. Si le probl\u00e8me persiste, utilisez l'option -debug pour obtenir la trace de pile et contactez Sun.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.CompilingSchema = compilation d'un sch\u00e9ma...
-
-Driver.FailedToGenerateCode = Echec de la production du code.
-
-# 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-b130911.1802
-
-Driver.FullVersion = version compl\u00E8te xjc "2.2.8-b130911.1802"
-
-Driver.BuildID = 2.2.8-b130911.1802
-
-# for JDK integration - include version in source zip
-jaxb.jdk.version=@@JAXB_JDK_VERSION@@
-
-# see java.text.SimpleDateFormat for format syntax
-# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
-Driver.DateFormat = yyyy.MM.dd
-
-# see java.text.SimpleDateFormat for format syntax
-# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html).
-Driver.TimeFormat = hh:mm:ss a z
-
-# as in: "generated on <date> at <time>"
-Driver.At = \u00e0
-
-# ERROR in this meaning is a well known level of logging and should not be translated.
-Driver.ErrorMessage = [ERROR] {0}
-
-# WARNING in this meaning is a well known level of logging and should not be translated.
-Driver.WarningMessage = [WARNING] {0}
-
-# INFO in this meaning is a well known level of logging and should not be translated.
-Driver.InfoMessage = [INFO] {0}
-
-ModelLoader.TooManySchema = Les fichiers de sch\u00e9ma sont trop nombreux pour cette langue de sch\u00e9ma. Compilez un fichier \u00e0 la fois.
-
-ModelLoader.BindingFileNotSupportedForRNC = Les fichiers de binding externes ne sont pas pris en charge pour la syntaxe compacte RELAX NG.
-
-Driver.DefaultVersion = Version JAXB 2.0 utilis\u00e9e par d\u00e9faut
-
-Driver.DefaultPackageWarning = Package Java par d\u00e9faut indiqu\u00e9. Vous ne pourrez pas acc\u00e9der au code g\u00e9n\u00e9r\u00e9 \u00e0 partir des classes dans tout autre package.
-
-Driver.NotAValidFileName = "{0}" n''est pas un nom de fichier valide : {1}
-
-Driver.FailedToParse = Echec de l''analyse de "{0}" : {1}
-
-Driver.NotAFileNorURL = "{0}" n''est pas un nom de fichier ni une URL
-
-FIELD_RENDERER_CONFLICT = "-{0}" et "-{1}" sont mutuellement exclusifs car ils affectent tous deux la g\u00e9n\u00e9ration du code
-
-NAME_CONVERTER_CONFLICT = "-{0}" et "-{1}" sont mutuellement exclusifs car ils affectent tous deux la g\u00e9n\u00e9ration du code
-
-# {0} - file path, {1} - exception message e.g.: Failed to load "/foo/bar/Library.jar": File not found.
-FAILED_TO_LOAD = Echec du chargement de "{0}" : {1}
-
-PLUGIN_LOAD_FAILURE = Echec du chargement d''un module d''extension : "{0}". Utilisez la propri\u00e9t\u00e9 syst\u00e8me ''-Dcom.sun.tools.internal.xjc.Options.findServices=true'' pour effectuer un diagnostic plus approfondi
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_it.properties
deleted file mode 100644
index a6a55a89..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_it.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.UnknownLocation) if location of the error is not known.
-ConsoleErrorReporter.UnknownLocation = posizione sconosciuta
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.LineXOfY). {0} - "?"/number, {1} - file location/"unknown file" e.g.: [xjc] [ERROR] Attempt to create a property having the same name as the reserved word "Class". [xjc] line 6 of example.xsd
-ConsoleErrorReporter.LineXOfY = \ \ riga {0} di {1}
-
-# may be a placeholder replacement for the second placeholder of ConsoleErrorReporter.LineXOfY (if the file location is unknown)
-ConsoleErrorReporter.UnknownFile = file sconosciuto
-
-Driver.Private.Usage = Opzioni di test private aggiuntive:\n\ \ -debug : l'esecuzione avviene in modalit\u00e0 debug (include -verbose)\n\ \ -mode <modalit\u00e0> : XJC viene eseguito in un'altra modalit\u00e0 di esecuzione\n\ \ -private : visualizza questo messaggio della Guida\nModalit\u00e0:\n\ \ code : genera il codice sorgente Java (valore predefinito)\n\ \ dryrun : compila lo schema nella memoria ma non genera il codice sorgente Java\n\ \ zip : genera il codice sorgente Java in un file zip specificato dall'opzione -d\n\ \ sig : esegue il dump del firme del codice generato\n\ \ forest : esegue il dump dell'insieme di strutture DOM trasformato\n
-Driver.Public.Usage = Uso: xjc [-options ...] <file schema/URL/dir/jar> ... [-b <bindinfo>] ...\nSe viene specificato dir, verranno compilati tutti i file dello schema in essa contenuti.\nSe viene specificato jar, verr\u00e0 compilato il file di associazione /META-INF/sun-jaxb.episode.\nOpzioni:\n\ \ -nv : non esegue la convalida rigorosa degli schemi di input\n\ \ -extension : consente le estensioni del fornitore; non segue in modo rigoroso le\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ regole di compatibilit\u00e0 e App E.2 dalla specifica JAXB\n\ \ -b <file/dir> : specifica i file di associazione esterni (ogni <file> deve avere la relativa -b)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Se viene fornita una directory, la ricerca viene eseguita in **/*.xjb\n\ \ -d <dir> : i file generati andranno in questa directory\n\ \ -p <pkg> : specifica il package di destinazione\n\ \ -httpproxy <proxy> : imposta il proxy HTTP/HTTPS. Il formato \u00e8 [user[:password]@]proxyHost:proxyPort\n\ \ -httpproxyfile <f> : funziona come -httpproxy ma prende l'argomento da un file per proteggere la password \n\ \ -classpath <arg> : specifica dove trovare i file delle classi utente\n\ \ -catalog <file> : specifica i file di catalogo per risolvere i riferimenti a entit\u00e0 esterne\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ supporta il formato di catalogo XML TR9401, XCatalog e OASIS.\n\ \ -readOnly : i file generati saranno in modalit\u00e0 di sola lettura\n\ \ -npa : elimina la generazione delle annotazioni a livello di package (**/package-info.java)\n\ \ -no-header : elimina la generazione di un'intestazione di file con indicatore orario\n\ \ -target (2.0|2.1) : funziona come XJC 2.0 o 2.1 e genera del codice che non usa alcuna funzione 2.2.\n\ \ -encoding <encoding> : specifica la codifica di caratteri per i file di origine generati\n\ \ -enableIntrospection : abilita la generazione di getter/setter booleani per abilitare le API di introspezione dei bean \n\ \ -contentForWildcard : genera la propriet\u00e0 di contenuto per i tipi con pi\u00f9 elementi derivati xs:any \n\ \ -xmlschema : tratta l'input come schema XML W3C (valore predefinito)\n\ \ -relaxng : tratta l'input come NG RELAX (sperimentale, non supportato)\n\ \ -relaxng-compact : tratta l'input come sintassi compatta NG RELAX (sperimentale, non supportato)\n\ \ -dtd : tratta l'input come DTD XML (sperimentale, non supportato)\n\ \ -wsdl : tratta l'input come WSDL e compila gli schemi al suo interno (sperimentale, non supportato)\n\ \ -verbose : be extra verbose\n\ \ -quiet : elimina l'output del compilatore\n\ \ -help : visualizza questo messaggio della Guida\n\ \ -version : visualizza le informazioni sulla versione\n\ \ -fullversion : visualizza le informazioni sulla versione completa\n
-Driver.AddonUsage = \nEstensioni:
-
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
-Driver.ExperimentalLanguageWarning = Si sta tentando di compilare {0}? Il supporto per {0} \u00e8 sperimentale. \u00c8 possibile abilitarlo usando l''opzione {1}.
-
-# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
-Driver.NonExistentDir = impossibile scrivere su una directory non esistente "{0}"
-
-# Usage not found. TODO Remove
-#Driver.MissingRuntimePackageName = \
-# the -use-runtime option is missing a package name
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingModeOperand = operando mancante nell'opzione -mode
-
-# Usage not found. TODO Remove
-#Driver.MissingCompatibilityOperand = \
-# the -compatibility option is missing an operand
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingOperand = operando mancante
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyHost = operando mancante nell'opzione -host \noppure \u00e8 stato specificato -port ma non -host
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyPort = operando mancante nell'opzione -port \noppure \u00e8 stato specificato -host ma non -port
-
-Driver.ILLEGAL_TARGET_VERSION = "{0}" non \u00e8 una versione di destinazione valida. Sono supportate le versioni "2.0" e "2.1".
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MISSING_PROXYFILE = operando mancante nell'opzione -httpproxyfile
-
-Driver.NO_SUCH_FILE = Nessun file di questo tipo: {0}
-
-Driver.ILLEGAL_PROXY = "{0}" non \u00e8 un formato proxy valido. Il formato \u00e8 [user[:password]@]proxyHost:proxyPort
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedMode = modalit\u00e0 non riconosciuta {0}
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedParameter = parametro non riconosciuto {0}
-
-Driver.UnsupportedEncoding = codifica non supportata: {0}
-
-Driver.MissingGrammar = grammatica non specificata
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-Driver.NotABindingFile = non \u00e8 un file di associazione esterno. L''elemento radice deve essere ''{''http://java.sun.com/xml/ns/jaxb''}''bindings ma \u00e8 ''{''{0}''}''{1}
-
-# Not concatenated with any other string (written on a separate line).
-Driver.ParsingSchema = analisi di uno schema in corso...
-
-Driver.ParseFailed = Analisi di uno schema non riuscita.
-
-Driver.StackOverflow = Overflow dello stack. Si sta compilando uno schema grande che richiede pi\u00f9 risorse oppure XJC contiene un bug. Per prima cosa, estendere la dimensione dello stack usando l'opzione -Xss JVM. Se questo non risolve il problema, usare l'opzione -debug per ottenere lo stack trace e contattare Sun.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.CompilingSchema = compilazione di uno schema in corso...
-
-Driver.FailedToGenerateCode = Produzione del codice non riuscita.
-
-# 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-b130911.1802
-
-Driver.FullVersion = versione completa xjc "2.2.8-b130911.1802"
-
-Driver.BuildID = 2.2.8-b130911.1802
-
-# for JDK integration - include version in source zip
-jaxb.jdk.version=@@JAXB_JDK_VERSION@@
-
-# see java.text.SimpleDateFormat for format syntax
-# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
-Driver.DateFormat = yyyy.MM.dd
-
-# see java.text.SimpleDateFormat for format syntax
-# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html).
-Driver.TimeFormat = hh:mm:ss a z
-
-# as in: "generated on <date> at <time>"
-Driver.At = alle
-
-# ERROR in this meaning is a well known level of logging and should not be translated.
-Driver.ErrorMessage = [ERROR] {0}
-
-# WARNING in this meaning is a well known level of logging and should not be translated.
-Driver.WarningMessage = [WARNING] {0}
-
-# INFO in this meaning is a well known level of logging and should not be translated.
-Driver.InfoMessage = [INFO] {0}
-
-ModelLoader.TooManySchema = Troppi file dello schema per questa lingua dello schema. Compilare un file per volta.
-
-ModelLoader.BindingFileNotSupportedForRNC = I file di associazione esterna non sono supportati per la sintassi compatta NG RELAX.
-
-Driver.DefaultVersion = La versione viene impostata sul valore predefinito di JAXB 2.0
-
-Driver.DefaultPackageWarning = Specificato package Java predefinito. Non si potr\u00e0 accedere al codice generato dalle classi in qualsiasi altro package.
-
-Driver.NotAValidFileName = "{0}" non \u00e8 un nome file valido: {1}
-
-Driver.FailedToParse = Analisi di "{0}" non riuscita: {1}
-
-Driver.NotAFileNorURL = "{0}" non \u00e8 un nome file n\u00e9 un URL
-
-FIELD_RENDERER_CONFLICT = "-{0}" e "-{1}" si escludono a vicenda poich\u00e9 entrambi influiscono sulla generazione del codice
-
-NAME_CONVERTER_CONFLICT = "-{0}" e "-{1}" si escludono a vicenda poich\u00e9 entrambi influiscono sulla generazione del codice
-
-# {0} - file path, {1} - exception message e.g.: Failed to load "/foo/bar/Library.jar": File not found.
-FAILED_TO_LOAD = Caricamento di "{0}" non riuscito: {1}
-
-PLUGIN_LOAD_FAILURE = Caricamento di un plugin non riuscito: "{0}". Usare la propriet\u00e0 di sistema ''-Dcom.sun.tools.internal.xjc.Options.findServices=true'' per ulteriore diagnosi
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties
deleted file mode 100644
index 4dd97d0e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.UnknownLocation) if location of the error is not known.
-ConsoleErrorReporter.UnknownLocation = \u4e0d\u660e\u306a\u5834\u6240
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.LineXOfY). {0} - "?"/number, {1} - file location/"unknown file" e.g.: [xjc] [ERROR] Attempt to create a property having the same name as the reserved word "Class". [xjc] line 6 of example.xsd
-ConsoleErrorReporter.LineXOfY = \ \ \u884c{0}/{1}
-
-# may be a placeholder replacement for the second placeholder of ConsoleErrorReporter.LineXOfY (if the file location is unknown)
-ConsoleErrorReporter.UnknownFile = \u4e0d\u660e\u306a\u30d5\u30a1\u30a4\u30eb
-
-Driver.Private.Usage = \u8ffd\u52a0\u306e\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30fb\u30c6\u30b9\u30c8\u30fb\u30aa\u30d7\u30b7\u30e7\u30f3:\n\ \ -debug : \u30c7\u30d0\u30c3\u30b0\u30fb\u30e2\u30fc\u30c9\u3067\u5b9f\u884c\u3057\u307e\u3059(-verbose\u3092\u542b\u3080)\n\ \ -mode <mode> : XJC\u3092\u4ed6\u306e\u5b9f\u884c\u30e2\u30fc\u30c9\u3067\u5b9f\u884c\u3057\u307e\u3059\n\ \ -private : \u3053\u306e\u30d8\u30eb\u30d7\u30fb\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u307e\u3059\n\u30e2\u30fc\u30c9:\n\ \ code : Java\u30bd\u30fc\u30b9\u30fb\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u307e\u3059(\u30c7\u30d5\u30a9\u30eb\u30c8)\n\ \ dryrun : \u30e1\u30e2\u30ea\u30fc\u5185\u306e\u30b9\u30ad\u30fc\u30de\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059\u304c\u3001Java\u30bd\u30fc\u30b9\u306f\u751f\u6210\u3057\u307e\u305b\u3093\n\ \ zip : Java\u30bd\u30fc\u30b9\u30fb\u30b3\u30fc\u30c9\u3092\u3001-d\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3055\u308c\u305fzip\u30d5\u30a1\u30a4\u30eb\u306b\u751f\u6210\u3057\u307e\u3059\n\ \ sig : \u751f\u6210\u3055\u308c\u305f\u30b3\u30fc\u30c9\u306e\u7f72\u540d\u3092\u30c0\u30f3\u30d7\u3057\u307e\u3059\n\ \ forest : \u5909\u63db\u3055\u308c\u305fDOM\u30d5\u30a9\u30ec\u30b9\u30c8\u3092\u30c0\u30f3\u30d7\u3057\u307e\u3059\n
-Driver.Public.Usage = \u4f7f\u7528\u65b9\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\ndir\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001dir\u5185\u306e\u3059\u3079\u3066\u306e\u30b9\u30ad\u30fc\u30de\u30fb\u30d5\u30a1\u30a4\u30eb\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u307e\u3059\u3002\njar\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001/META-INF/sun-jaxb.episode\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u307e\u3059\u3002\n\u30aa\u30d7\u30b7\u30e7\u30f3:\n\ \ -nv : \u5165\u529b\u30b9\u30ad\u30fc\u30de\u306e\u53b3\u5bc6\u306a\u691c\u8a3c\u3092\u5b9f\u884c\u3057\u307e\u305b\u3093\n\ \ -extension : \u30d9\u30f3\u30c0\u30fc\u306e\u62e1\u5f35\u6a5f\u80fd\u3092\u8a31\u53ef\u3057\u307e\u3059 - JAXB\u4ed5\u69d8\u306e\u4e92\u63db\u6027\u30eb\u30fc\u30eb\u304a\u3088\u3073App E.2\u306b\u306f\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u53b3\u5bc6\u306b\u5f93\u3044\u307e\u305b\u3093\n\ \ -b <file/dir> : \u5916\u90e8\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059(\u5404<file>\u306b\u72ec\u81ea\u306e-b\u304c\u5fc5\u8981\u3067\u3059)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001**/*.xjb\u304c\u691c\u7d22\u3055\u308c\u307e\u3059\n\ \ -d <dir> : \u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u9077\u79fb\u3057\u307e\u3059\n\ \ -p <pkg> : \u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ -httpproxy <proxy> : HTTP/HTTPS\u30d7\u30ed\u30ad\u30b7\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u5f62\u5f0f\u306f[user[:password]@]proxyHost:proxyPort\u3067\u3059\n\ \ -httpproxyfile <f> : -httpproxy\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3057\u307e\u3059\u304c\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4fdd\u8b77\u3059\u308b\u305f\u3081\u306b\u30d5\u30a1\u30a4\u30eb\u5185\u306e\u5f15\u6570\u3092\u53d6\u308a\u307e\u3059\n\ \ -classpath <arg> : \u30e6\u30fc\u30b6\u30fc\u30fb\u30af\u30e9\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3059\u308b\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ -catalog <file> : \u5916\u90e8\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u53c2\u7167\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u3001\u30ab\u30bf\u30ed\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TR9401\u3001XCatalog\u304a\u3088\u3073OASIS XML Catalog\u5f62\u5f0f\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\n\ \ -readOnly : \u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u8aad\u53d6\u308a\u5c02\u7528\u30e2\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059\n\ \ -npa : \u30d1\u30c3\u30b1\u30fc\u30b8\u30fb\u30ec\u30d9\u30eb\u6ce8\u91c8(**/package-info.java)\u306e\u751f\u6210\u3092\u6291\u5236\u3057\u307e\u3059\n\ \ -no-header : \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u4ed8\u304d\u306e\u30d5\u30a1\u30a4\u30eb\u30fb\u30d8\u30c3\u30c0\u30fc\u306e\u751f\u6210\u3092\u6291\u5236\u3057\u307e\u3059\n\ \ -target (2.0|2.1) : XJC 2.0\u307e\u305f\u306f2.1\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3057\u30012.2\u306e\u6a5f\u80fd\u3092\u4f7f\u7528\u3057\u306a\u3044\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u307e\u3059\u3002\n\ \ -encoding <encoding> : \u751f\u6210\u3055\u308c\u305f\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ -enableIntrospection : Boolean getters/setters\u3092\u6b63\u3057\u304f\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3001Bean Introspection apis\u3092\u6709\u52b9\u306b\u3057\u307e\u3059 \n\ \ -contentForWildcard : \u8907\u6570\u306exs:any\u5c0e\u51fa\u8981\u7d20\u3092\u6301\u3064\u30bf\u30a4\u30d7\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u30fb\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u751f\u6210\u3057\u307e\u3059\n\ \ -xmlschema : \u5165\u529b\u3092W3C XML\u30b9\u30ad\u30fc\u30de\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u30c7\u30d5\u30a9\u30eb\u30c8)\n\ \ -relaxng : \u5165\u529b\u3092RELAX NG\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -relaxng-compact : \u5165\u529b\u3092RELAX NG\u306e\u7c21\u5358\u306a\u69cb\u6587\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -dtd : \u5165\u529b\u3092XML DTD\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -wsdl : \u5165\u529b\u3092WSDL\u3068\u3057\u3066\u51e6\u7406\u3057\u3001\u305d\u306e\u5185\u90e8\u306e\u30b9\u30ad\u30fc\u30de\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -verbose : \u5197\u9577\u306b\u306a\u308a\u307e\u3059\n\ \ -quiet : \u30b3\u30f3\u30d1\u30a4\u30e9\u51fa\u529b\u3092\u975e\u8868\u793a\u306b\u3057\u307e\u3059\n\ \ -help : \u3053\u306e\u30d8\u30eb\u30d7\u30fb\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\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
-Driver.AddonUsage = \n\u62e1\u5f35:
-
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
-Driver.ExperimentalLanguageWarning = {0}\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u304b\u3002{0}\u306e\u30b5\u30dd\u30fc\u30c8\u306f\u8a66\u9a13\u7684\u3067\u3059\u3002{1}\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u6709\u52b9\u306b\u3067\u304d\u307e\u3059\u3002
-
-# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
-Driver.NonExistentDir = \u5b58\u5728\u3057\u306a\u3044\u30c7\u30a3\u30ec\u30af\u30c8\u30ea"{0}"\u306b\u66f8\u304d\u8fbc\u3081\u307e\u305b\u3093
-
-# Usage not found. TODO Remove
-#Driver.MissingRuntimePackageName = \
-# the -use-runtime option is missing a package name
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingModeOperand = -mode\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u30aa\u30da\u30e9\u30f3\u30c9\u304c\u3042\u308a\u307e\u305b\u3093
-
-# Usage not found. TODO Remove
-#Driver.MissingCompatibilityOperand = \
-# the -compatibility option is missing an operand
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingOperand = \u30aa\u30da\u30e9\u30f3\u30c9\u304c\u3042\u308a\u307e\u305b\u3093
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyHost = -host\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u30aa\u30da\u30e9\u30f3\u30c9\u304c\u306a\u3044\u304b\u3001\n-host\u3067\u306f\u306a\u304f-port\u304c\u6307\u5b9a\u3055\u308c\u307e\u3057\u305f
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyPort = -port\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u30aa\u30da\u30e9\u30f3\u30c9\u304c\u306a\u3044\u304b\u3001\n-port\u3067\u306f\u306a\u304f-host\u304c\u6307\u5b9a\u3055\u308c\u307e\u3057\u305f
-
-Driver.ILLEGAL_TARGET_VERSION = "{0}"\u306f\u6709\u52b9\u306a\u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002"2.0"\u304a\u3088\u3073"2.1"\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MISSING_PROXYFILE = -httpproxyfile\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u30aa\u30da\u30e9\u30f3\u30c9\u304c\u3042\u308a\u307e\u305b\u3093
-
-Driver.NO_SUCH_FILE = \u305d\u306e\u3088\u3046\u306a\u30d5\u30a1\u30a4\u30eb\u306f\u3042\u308a\u307e\u305b\u3093: {0}
-
-Driver.ILLEGAL_PROXY = "{0}"\u306f\u6709\u52b9\u306a\u30d7\u30ed\u30ad\u30b7\u306e\u5f62\u5f0f\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u5f62\u5f0f\u306f[user[:password]@]proxyHost:proxyPort\u3067\u3059
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedMode = \u30e2\u30fc\u30c9{0}\u3092\u8a8d\u8b58\u3067\u304d\u307e\u305b\u3093
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedParameter = \u30d1\u30e9\u30e1\u30fc\u30bf{0}\u3092\u8a8d\u8b58\u3067\u304d\u307e\u305b\u3093
-
-Driver.UnsupportedEncoding = \u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0: {0}
-
-Driver.MissingGrammar = \u69cb\u6587\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-Driver.NotABindingFile = \u5916\u90e8\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30eb\u30fc\u30c8\u8981\u7d20\u306f''{''http://java.sun.com/xml/ns/jaxb''}''bindings\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001''{''{0}''}''{1}\u3067\u3059
-
-# Not concatenated with any other string (written on a separate line).
-Driver.ParsingSchema = \u30b9\u30ad\u30fc\u30de\u306e\u89e3\u6790\u4e2d...
-
-Driver.ParseFailed = \u30b9\u30ad\u30fc\u30de\u306e\u89e3\u6790\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
-
-Driver.StackOverflow = \u30b9\u30bf\u30c3\u30af\u30fb\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3067\u3059\u3002\u3055\u3089\u306b\u30ea\u30bd\u30fc\u30b9\u304c\u5fc5\u8981\u306a\u5927\u304d\u3044\u30b9\u30ad\u30fc\u30de\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u3044\u308b\u304b\u3001XJC\u306b\u30d0\u30b0\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305a\u3001-Xss JVM\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u30b9\u30bf\u30c3\u30af\u30fb\u30b5\u30a4\u30ba\u3092\u62e1\u5f35\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u3067\u554f\u984c\u304c\u89e3\u6c7a\u3057\u306a\u3044\u5834\u5408\u306f\u3001-debug\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u30b9\u30bf\u30c3\u30af\u30fb\u30c8\u30ec\u30fc\u30b9\u3092\u53d6\u5f97\u3057\u3001\u3054\u8cfc\u5165\u5148\u306b\u9023\u7d61\u3057\u3066\u304f\u3060\u3055\u3044\u3002
-
-# Not concatenated with any other string (written on a separate line).
-Driver.CompilingSchema = \u30b9\u30ad\u30fc\u30de\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u4e2d...
-
-Driver.FailedToGenerateCode = \u30b3\u30fc\u30c9\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
-
-# 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-b130911.1802
-
-Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b130911.1802"
-
-Driver.BuildID = 2.2.8-b130911.1802
-
-# for JDK integration - include version in source zip
-jaxb.jdk.version=@@JAXB_JDK_VERSION@@
-
-# see java.text.SimpleDateFormat for format syntax
-# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
-Driver.DateFormat = yyyy.MM.dd
-
-# see java.text.SimpleDateFormat for format syntax
-# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html).
-Driver.TimeFormat = hh:mm:ss a z
-
-# as in: "generated on <date> at <time>"
-Driver.At = \u6642\u9593
-
-# ERROR in this meaning is a well known level of logging and should not be translated.
-Driver.ErrorMessage = [ERROR] {0}
-
-# WARNING in this meaning is a well known level of logging and should not be translated.
-Driver.WarningMessage = [WARNING] {0}
-
-# INFO in this meaning is a well known level of logging and should not be translated.
-Driver.InfoMessage = [INFO] {0}
-
-ModelLoader.TooManySchema = \u3053\u306e\u30b9\u30ad\u30fc\u30de\u8a00\u8a9e\u306e\u30b9\u30ad\u30fc\u30de\u30fb\u30d5\u30a1\u30a4\u30eb\u304c\u591a\u3059\u304e\u307e\u3059\u3002\u4e00\u5ea6\u306b1\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002
-
-ModelLoader.BindingFileNotSupportedForRNC = RELAX NG\u306e\u7c21\u5358\u306a\u69cb\u6587\u3067\u306f\u5916\u90e8\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
-
-Driver.DefaultVersion = \u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u306eJAXB 2.0\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059
-
-Driver.DefaultPackageWarning = \u30c7\u30d5\u30a9\u30eb\u30c8\u306eJava\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u6307\u5b9a\u3055\u308c\u307e\u3057\u305f\u3002\u4ed6\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30af\u30e9\u30b9\u304b\u3089\u751f\u6210\u3055\u308c\u305f\u30b3\u30fc\u30c9\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\u3002
-
-Driver.NotAValidFileName = "{0}"\u306f\u6709\u52b9\u306a\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u306f\u3042\u308a\u307e\u305b\u3093: {1}
-
-Driver.FailedToParse = "{0}"\u306e\u89e3\u6790\u306b\u5931\u6557\u3057\u307e\u3057\u305f: {1}
-
-Driver.NotAFileNorURL = "{0}"\u306f\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u3082URL\u3067\u3082\u3042\u308a\u307e\u305b\u3093
-
-FIELD_RENDERER_CONFLICT = "-{0}"\u3068"-{1}"\u306f\u4e21\u65b9\u3068\u3082\u30b3\u30fc\u30c9\u751f\u6210\u306b\u5f71\u97ff\u3059\u308b\u305f\u3081\u3001\u76f8\u4e92\u306b\u6392\u4ed6\u7684\u3067\u3059
-
-NAME_CONVERTER_CONFLICT = "-{0}"\u3068"-{1}"\u306f\u4e21\u65b9\u3068\u3082\u30b3\u30fc\u30c9\u751f\u6210\u306b\u5f71\u97ff\u3059\u308b\u305f\u3081\u3001\u76f8\u4e92\u306b\u6392\u4ed6\u7684\u3067\u3059
-
-# {0} - file path, {1} - exception message e.g.: Failed to load "/foo/bar/Library.jar": File not found.
-FAILED_TO_LOAD = "{0}"\u306e\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f: {1}
-
-PLUGIN_LOAD_FAILURE = \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f: "{0}"\u3002\u3055\u3089\u306b\u8a3a\u65ad\u3059\u308b\u306b\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u30fb\u30d7\u30ed\u30d1\u30c6\u30a3''-Dcom.sun.tools.internal.xjc.Options.findServices=true''\u3092\u4f7f\u7528\u3057\u307e\u3059
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties
deleted file mode 100644
index c023a02e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.UnknownLocation) if location of the error is not known.
-ConsoleErrorReporter.UnknownLocation = \uc54c \uc218 \uc5c6\ub294 \uc704\uce58
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.LineXOfY). {0} - "?"/number, {1} - file location/"unknown file" e.g.: [xjc] [ERROR] Attempt to create a property having the same name as the reserved word "Class". [xjc] line 6 of example.xsd
-ConsoleErrorReporter.LineXOfY = \ \ {1}\uc758 {0}\ud589
-
-# may be a placeholder replacement for the second placeholder of ConsoleErrorReporter.LineXOfY (if the file location is unknown)
-ConsoleErrorReporter.UnknownFile = \uc54c \uc218 \uc5c6\ub294 \ud30c\uc77c
-
-Driver.Private.Usage = \ucd94\uac00 \uc804\uc6a9 \ud14c\uc2a4\ud2b8 \uc635\uc158:\n\ \ -debug : \ub514\ubc84\uadf8 \ubaa8\ub4dc\ub85c \uc2e4\ud589\ud569\ub2c8\ub2e4(-verbose \ud3ec\ud568).\n\ \ -mode <mode> : \uae30\ud0c0 \uc2e4\ud589 \ubaa8\ub4dc\ub85c XJC\ub97c \uc2e4\ud589\ud569\ub2c8\ub2e4.\n\ \ -private : \uc774 \ub3c4\uc6c0\ub9d0 \uba54\uc2dc\uc9c0\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\ubaa8\ub4dc:\n\ \ code : Java \uc18c\uc2a4 \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4(\uae30\ubcf8\uac12).\n\ \ dryrun : \uba54\ubaa8\ub9ac\uc758 \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\ub418 Java \uc18c\uc2a4\ub97c \uc0dd\uc131\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ \ zip : -d \uc635\uc158\uc73c\ub85c \uc9c0\uc815\ub41c zip \ud30c\uc77c\uc5d0 Java \uc18c\uc2a4 \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\ \ sig : \uc0dd\uc131\ub41c \ucf54\ub4dc\uc758 \uc11c\uba85\uc744 \ub364\ud504\ud569\ub2c8\ub2e4.\n\ \ forest : \ubcc0\ud658\ub41c DOM \uc601\uc5ed\uc744 \ub364\ud504\ud569\ub2c8\ub2e4.\n
-Driver.Public.Usage = \uc0ac\uc6a9\ubc95: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\ndir\uc774 \uc9c0\uc815\ub41c \uacbd\uc6b0 \ud3ec\ud568\ub41c \ubaa8\ub4e0 \uc2a4\ud0a4\ub9c8 \ud30c\uc77c\uc774 \ucef4\ud30c\uc77c\ub429\ub2c8\ub2e4.\njar\uc774 \uc9c0\uc815\ub41c \uacbd\uc6b0 /META-INF/sun-jaxb.episode \ubc14\uc778\ub529 \ud30c\uc77c\uc774 \ucef4\ud30c\uc77c\ub429\ub2c8\ub2e4.\n\uc635\uc158:\n\ \ -nv : \uc785\ub825 \uc2a4\ud0a4\ub9c8\uc5d0 \ub300\ud574 \uc5c4\uaca9\ud55c \uac80\uc99d\uc744 \uc218\ud589\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ \ -extension : \uacf5\uae09\uc5c5\uccb4 \ud655\uc7a5\uc744 \ud5c8\uc6a9\ud569\ub2c8\ub2e4.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ JAXB \uc0ac\uc591\uc758 \ud638\ud658\uc131 \uaddc\uce59 \ubc0f \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 E.2\ub97c \uc5c4\uaca9\ud558\uac8c \ub530\ub974\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ \ -b <file/dir> : \uc678\ubd80 \ubc14\uc778\ub529 \ud30c\uc77c\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4. \uac01 <file>\uc5d0\ub294 \uace0\uc720\ud55c -b\uac00 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ub514\ub809\ud1a0\ub9ac\uac00 \uc81c\uacf5\ub41c \uacbd\uc6b0 **/*.xjb\uac00 \uac80\uc0c9\ub429\ub2c8\ub2e4.\n\ \ -d <dir> : \uc0dd\uc131\ub41c \ud30c\uc77c\uc774 \uc774 \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc800\uc7a5\ub429\ub2c8\ub2e4.\n\ \ -p <pkg> : \ub300\uc0c1 \ud328\ud0a4\uc9c0\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ -httpproxy <proxy> : HTTP/HTTPS \ud504\ub85d\uc2dc\ub97c \uc124\uc815\ud569\ub2c8\ub2e4. \ud615\uc2dd\uc740 [user[:password]@]proxyHost:proxyPort\uc785\ub2c8\ub2e4.\n\ \ -httpproxyfile <f> : -httpproxy\uc640 \ub3d9\uc77c\ud558\uac8c \uc791\ub3d9\ud558\uc9c0\ub9cc \ube44\ubc00\ubc88\ud638\ub97c \ubcf4\ud638\ud558\uae30 \uc704\ud574 \ud30c\uc77c\uc5d0 \uc778\uc218\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \n\ \ -classpath <arg> : \uc0ac\uc6a9\uc790 \ud074\ub798\uc2a4 \ud30c\uc77c\uc744 \ucc3e\uc744 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ -catalog <file> : \uc678\ubd80 \uc5d4\ud2f0\ud2f0 \ucc38\uc870\ub97c \ubd84\uc11d\ud560 \uce74\ud0c8\ub85c\uadf8 \ud30c\uc77c\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TR9401, XCatalog \ubc0f OASIS XML \uce74\ud0c8\ub85c\uadf8 \ud615\uc2dd\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4.\n\ \ -readOnly : \uc0dd\uc131\ub41c \ud30c\uc77c\uc774 \uc77d\uae30 \uc804\uc6a9 \ubaa8\ub4dc\ub85c \uc124\uc815\ub429\ub2c8\ub2e4.\n\ \ -npa : \ud328\ud0a4\uc9c0 \ub808\ubca8 \uc8fc\uc11d(**/package-info.java)\uc774 \uc0dd\uc131\ub418\uc9c0 \uc54a\ub3c4\ub85d \ud569\ub2c8\ub2e4.\n\ \ -no-header : \uc2dc\uac04 \uae30\ub85d\uc744 \ud3ec\ud568\ud558\ub294 \ud30c\uc77c \uba38\ub9ac\uae00\uc774 \uc0dd\uc131\ub418\uc9c0 \uc54a\ub3c4\ub85d \ud569\ub2c8\ub2e4.\n\ \ -target (2.0|2.1) : XJC 2.0 \ub610\ub294 2.1\ucc98\ub7fc \uc791\ub3d9\ud558\uba70 2.2 \uae30\ub2a5\uc744 \uc0ac\uc6a9\ud558\uc9c0 \uc54a\ub294 \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\ \ -encoding <encoding> : \uc0dd\uc131\ub41c \uc18c\uc2a4 \ud30c\uc77c\uc5d0 \ub300\ud55c \ubb38\uc790 \uc778\ucf54\ub529\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ -enableIntrospection : \ubd80\uc6b8 getter/setter\uac00 \uc62c\ubc14\ub974\uac8c \uc0dd\uc131\ub418\ub3c4\ub85d \ud558\uc5ec Bean \uac80\uc0ac API\ub97c \uc0ac\uc6a9\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4. \n\ \ -contentForWildcard : xs:any \ud30c\uc0dd \uc694\uc18c\uac00 \uc5ec\ub7ec \uac1c\uc778 \uc720\ud615\uc5d0 \ub300\ud574 \ucf58\ud150\uce20 \uc18d\uc131\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. \n\ \ -xmlschema : \uc785\ub825\uac12\uc744 W3C XML \uc2a4\ud0a4\ub9c8\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uae30\ubcf8\uac12).\n\ \ -relaxng : \uc785\ub825\uac12\uc744 RELAX NG\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -relaxng-compact : \uc785\ub825\uac12\uc744 RELAX NG \uc555\ucd95 \uad6c\ubb38\uc73c\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -dtd : \uc785\ub825\uac12\uc744 XML DTD\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -wsdl : \uc785\ub825\uac12\uc744 WSDL\ub85c \ucc98\ub9ac\ud558\uace0 \ud3ec\ud568\ub41c \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -verbose : \ucd94\uac00 \uc138\ubd80 \uc815\ubcf4 \ud45c\uc2dc \ubaa8\ub4dc\uc785\ub2c8\ub2e4.\n\ \ -quiet : \ucef4\ud30c\uc77c\ub7ec \ucd9c\ub825\uc744 \ud45c\uc2dc\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ \ -help : \uc774 \ub3c4\uc6c0\ub9d0 \uba54\uc2dc\uc9c0\ub97c \ud45c\uc2dc\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
-Driver.AddonUsage = \n\ud655\uc7a5:
-
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
-Driver.ExperimentalLanguageWarning = {0} \ucef4\ud30c\uc77c\uc744 \uc2dc\ub3c4\ud558\uace0 \uc788\uc2b5\ub2c8\uae4c? {0}\uc5d0 \ub300\ud55c \uc9c0\uc6d0\uc740 \uc2e4\ud5d8 \ub2e8\uacc4\uc785\ub2c8\ub2e4. {1} \uc635\uc158\uc744 \ud1b5\ud574 \uc0ac\uc6a9\uc73c\ub85c \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.
-
-# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
-Driver.NonExistentDir = \uc874\uc7ac\ud558\uc9c0 \uc54a\ub294 \ub514\ub809\ud1a0\ub9ac "{0}"\uc5d0 \uc4f8 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
-
-# Usage not found. TODO Remove
-#Driver.MissingRuntimePackageName = \
-# the -use-runtime option is missing a package name
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingModeOperand = -mode \uc635\uc158\uc5d0 \ud53c\uc5f0\uc0b0\uc790\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-
-# Usage not found. TODO Remove
-#Driver.MissingCompatibilityOperand = \
-# the -compatibility option is missing an operand
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingOperand = \ud53c\uc5f0\uc0b0\uc790\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyHost = -host \uc635\uc158\uc5d0 \ud53c\uc5f0\uc0b0\uc790\uac00 \ub204\ub77d\ub418\uc5c8\uac70\ub098 \n-port\uac00 \uc9c0\uc815\ub418\uc5c8\uc9c0\ub9cc -host\uac00 \uc9c0\uc815\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyPort = -port \uc635\uc158\uc5d0 \ud53c\uc5f0\uc0b0\uc790\uac00 \ub204\ub77d\ub418\uc5c8\uac70\ub098 \n-host\uac00 \uc9c0\uc815\ub418\uc5c8\uc9c0\ub9cc -port\uac00 \uc9c0\uc815\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
-
-Driver.ILLEGAL_TARGET_VERSION = "{0}"\uc740(\ub294) \uc801\ud569\ud55c \ub300\uc0c1 \ubc84\uc804\uc774 \uc544\ub2d9\ub2c8\ub2e4. "2.0" \ubc0f "2.1"\uc774 \uc9c0\uc6d0\ub429\ub2c8\ub2e4.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MISSING_PROXYFILE = -httpproxyfile \uc635\uc158\uc5d0 \ud53c\uc5f0\uc0b0\uc790\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
-
-Driver.NO_SUCH_FILE = \ud574\ub2f9 \ud30c\uc77c \uc5c6\uc74c: {0}
-
-Driver.ILLEGAL_PROXY = "{0}"\uc740(\ub294) \uc801\ud569\ud55c \ud504\ub85d\uc2dc \ud615\uc2dd\uc774 \uc544\ub2d9\ub2c8\ub2e4. \ud615\uc2dd\uc740 [user[:password]@]proxyHost:proxyPort\uc785\ub2c8\ub2e4.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedMode = {0}\uc740(\ub294) \uc778\uc2dd\ud560 \uc218 \uc5c6\ub294 \ubaa8\ub4dc\uc785\ub2c8\ub2e4.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedParameter = {0}\uc740(\ub294) \uc778\uc2dd\ud560 \uc218 \uc5c6\ub294 \ub9e4\uac1c\ubcc0\uc218\uc785\ub2c8\ub2e4.
-
-Driver.UnsupportedEncoding = \uc9c0\uc6d0\ub418\uc9c0 \uc54a\ub294 \uc778\ucf54\ub529: {0}
-
-Driver.MissingGrammar = \ubb38\ubc95\uc774 \uc9c0\uc815\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-Driver.NotABindingFile = \uc678\ubd80 \ubc14\uc778\ub529 \ud30c\uc77c\uc774 \uc544\ub2d9\ub2c8\ub2e4. \ub8e8\ud2b8 \uc694\uc18c\ub294 ''{''http://java.sun.com/xml/ns/jaxb''}''bindings\uc5ec\uc57c \ud558\uc9c0\ub9cc ''{''{0}''}''{1}\uc785\ub2c8\ub2e4.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.ParsingSchema = \uc2a4\ud0a4\ub9c8\uc758 \uad6c\ubb38\uc744 \ubd84\uc11d\ud558\ub294 \uc911...
-
-Driver.ParseFailed = \uc2a4\ud0a4\ub9c8 \uad6c\ubb38 \ubd84\uc11d\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4.
-
-Driver.StackOverflow = \uc2a4\ud0dd \uc624\ubc84\ud50c\ub85c\uc6b0\uc785\ub2c8\ub2e4. \ub354 \ub9ce\uc740 \ub9ac\uc18c\uc2a4\uac00 \ud544\uc694\ud55c \ud070 \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\uace0 \uc788\uac70\ub098 XJC\uc5d0 \ubc84\uadf8\uac00 \uc788\uc2b5\ub2c8\ub2e4. \uba3c\uc800 -Xss JVM \uc635\uc158\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc2a4\ud0dd \ud06c\uae30\ub97c \ub298\ub9ac\uc2ed\uc2dc\uc624. \uc774\ub97c \ud1b5\ud574 \ubb38\uc81c\uac00 \ud574\uacb0\ub418\uc9c0 \uc54a\uc73c\uba74 -debug \uc635\uc158\uc744 \ud1b5\ud574 \uc2a4\ud0dd \ucd94\uc801\uc744 \uc5bb\uc5b4 Sun\uc5d0 \ubb38\uc758\ud558\uc2ed\uc2dc\uc624.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.CompilingSchema = \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\ub294 \uc911...
-
-Driver.FailedToGenerateCode = \ucf54\ub4dc \uc0dd\uc131\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4.
-
-# 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-b130911.1802
-
-Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.2.8-b130911.1802"
-
-Driver.BuildID = 2.2.8-b130911.1802
-
-# for JDK integration - include version in source zip
-jaxb.jdk.version=@@JAXB_JDK_VERSION@@
-
-# see java.text.SimpleDateFormat for format syntax
-# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
-Driver.DateFormat = yyyy.MM.dd
-
-# see java.text.SimpleDateFormat for format syntax
-# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html).
-Driver.TimeFormat = hh:mm:ss a z
-
-# as in: "generated on <date> at <time>"
-Driver.At = \uc2dc\uac04
-
-# ERROR in this meaning is a well known level of logging and should not be translated.
-Driver.ErrorMessage = [ERROR] {0}
-
-# WARNING in this meaning is a well known level of logging and should not be translated.
-Driver.WarningMessage = [WARNING] {0}
-
-# INFO in this meaning is a well known level of logging and should not be translated.
-Driver.InfoMessage = [INFO] {0}
-
-ModelLoader.TooManySchema = \uc774 \uc2a4\ud0a4\ub9c8 \uc5b8\uc5b4\uc5d0 \ub300\ud55c \uc2a4\ud0a4\ub9c8 \ud30c\uc77c\uc774 \ub108\ubb34 \ub9ce\uc2b5\ub2c8\ub2e4. \ud30c\uc77c\uc744 \ud55c \ubc88\uc5d0 \ud558\ub098\uc529 \ucef4\ud30c\uc77c\ud558\uc2ed\uc2dc\uc624.
-
-ModelLoader.BindingFileNotSupportedForRNC = RELAX NG \uc555\ucd95 \uad6c\ubb38\uc5d0 \ub300\ud574\uc11c\ub294 \uc678\ubd80 \ubc14\uc778\ub529 \ud30c\uc77c\uc774 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.
-
-Driver.DefaultVersion = \uae30\ubcf8\uc801\uc73c\ub85c \ubc84\uc804\uc744 JAXB 2.0\uc73c\ub85c \uc124\uc815\ud558\ub294 \uc911
-
-Driver.DefaultPackageWarning = \uae30\ubcf8 Java \ud328\ud0a4\uc9c0\uac00 \uc9c0\uc815\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uae30\ud0c0 \ubaa8\ub4e0 \ud328\ud0a4\uc9c0\uc758 \ud074\ub798\uc2a4\uc5d0\uc11c\ub294 \uc0dd\uc131\ub41c \ucf54\ub4dc\uc5d0 \uc561\uc138\uc2a4\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
-
-Driver.NotAValidFileName = "{0}"\uc740(\ub294) \uc801\ud569\ud55c \ud30c\uc77c \uc774\ub984\uc774 \uc544\ub2d8: {1}
-
-Driver.FailedToParse = "{0}"\uc758 \uad6c\ubb38 \ubd84\uc11d \uc2e4\ud328: {1}
-
-Driver.NotAFileNorURL = "{0}"\uc740(\ub294) \ud30c\uc77c \uc774\ub984 \ub610\ub294 URL\uc774 \uc544\ub2d9\ub2c8\ub2e4.
-
-FIELD_RENDERER_CONFLICT = "-{0}"\uacfc(\uc640) "-{1}"\uc740(\ub294) \ucf54\ub4dc \uc0dd\uc131\uc5d0 \uc601\ud5a5\uc744 \ub07c\uce58\ubbc0\ub85c \ud568\uaed8 \uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
-
-NAME_CONVERTER_CONFLICT = "-{0}"\uacfc(\uc640) "-{1}"\uc740(\ub294) \ucf54\ub4dc \uc0dd\uc131\uc5d0 \uc601\ud5a5\uc744 \ub07c\uce58\ubbc0\ub85c \ud568\uaed8 \uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
-
-# {0} - file path, {1} - exception message e.g.: Failed to load "/foo/bar/Library.jar": File not found.
-FAILED_TO_LOAD = "{0}" \ub85c\ub4dc \uc2e4\ud328: {1}
-
-PLUGIN_LOAD_FAILURE = \ud50c\ub7ec\uadf8\uc778 \ub85c\ub4dc \uc2e4\ud328: "{0}". \uc2dc\uc2a4\ud15c \uc18d\uc131 ''-Dcom.sun.tools.internal.xjc.Options.findServices=true''\ub97c \uc0ac\uc6a9\ud558\uc5ec \ucd94\uac00 \uc9c4\ub2e8\uc744 \uc218\ud589\ud558\uc2ed\uc2dc\uc624.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties
deleted file mode 100644
index 11119180..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.UnknownLocation) if location of the error is not known.
-ConsoleErrorReporter.UnknownLocation = localiza\u00e7\u00e3o desconhecida
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.LineXOfY). {0} - "?"/number, {1} - file location/"unknown file" e.g.: [xjc] [ERROR] Attempt to create a property having the same name as the reserved word "Class". [xjc] line 6 of example.xsd
-ConsoleErrorReporter.LineXOfY = \ \ linha {0} de {1}
-
-# may be a placeholder replacement for the second placeholder of ConsoleErrorReporter.LineXOfY (if the file location is unknown)
-ConsoleErrorReporter.UnknownFile = arquivo desconhecido
-
-Driver.Private.Usage = Op\u00e7\u00f5es adicionais de teste privado:\n\\ \\ -debug : executar no modo de depura\u00e7\u00e3o (inclui -verbose)\n\\ \\ -mode <mode> : executar XJC em outro modo de execu\u00e7\u00e3o\n\\ \\ -private : exibir esta mensagem de ajuda\nModo:\n\\ \\ code : gerar c\u00f3digo de origem Java (default)\n\\ \\ dryrun : compilar o esquema na mem\u00f3ria, mas n\u00e3o gerar a origem Java\n\\ \\ zip : gerar c\u00f3digo de origem Java em um arquivo zip especificado pela op\u00e7\u00e3o -d\n\\ \\ sig : fazer dump das assinaturas do c\u00f3digo gerado\n\\ \\ forest : fazer dump do DOM transformado\n
-Driver.Public.Usage = Uso: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\nSe dir for especificado, todos os arquivos do esquema dele ser\u00e3o compilados.\nSe jar for especificado, o arquivo de bind /META-INF/sun-jaxb.episode ser\u00e1 compilado.\nOp\u00e7\u00f5es:\n\\ \\ -nv : n\u00e3o executar valida\u00e7\u00e3o restrita do(s) esquema(s) de entrada\n\\ \\ -extension : permitir extens\u00f5es do fornecedor - n\u00e3o seguir rigorosamente as\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Regras de Compatibilidade e Ap\u00eandice E.2 da Espec. JAXB\n\\ \\ -b <file/dir> : especifica arquivos de bind externos (cada <file> deve ter seu pr\u00f3prio -b)\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Se for fornecido um diret\u00f3rio, **/*.xjb ser\u00e1 pesquisado\n\\ \\ -d <dir> : os arquivos gerados ficar\u00e3o neste diret\u00f3rio\n\\ \\ -p <pkg> : especifica o pacote do alvo\n\\ \\ -httpproxy <proxy> : definir proxy HTTP/HTTPS. O formato \u00e9 [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile <f> : Funciona como -httpproxy, mas usa o argumento em um arquivo para proteger a senha \n\\ \\ -classpath <arg> : especifica onde localizar os arquivos de classe do usu\u00e1rio\n\\ \\ -catalog <file> : especifica arquivos do cat\u00e1logo para resolver refer\u00eancias da entidade externa\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ suporta TR9401, formato de XCatalog e do Cat\u00e1logo XML do OASIS.\n\\ \\ -readOnly : os arquivos gerados ficar\u00e3o no modo somente leitura\n\\ \\ -npa : suprime a gera\u00e7\u00e3o de anota\u00e7\u00f5es do n\u00edvel do pacote (**/package-info.java)\n\\ \\ -no-header : suprime a gera\u00e7\u00e3o de um cabe\u00e7alho do arquivo com timestamp\n\\ \\ -target (2.0|2.1) : atua como XJC 2.0 ou 2.1 e gera c\u00f3digo que n\u00e3o usa nenhum recurso 2.2.\n\\ \\ -encoding <encoding> : especifica codifica\u00e7\u00e3o de caracteres para arquivos de origem gerados\n\\ \\ -enableIntrospection : ativa a gera\u00e7\u00e3o correta de getters/setters Boolianos para ativar apis de Introspec\u00e7\u00e3o de Bean \n\\ \\ -contentForWildcard : gera a propriedade do conte\u00fado dos tipos com v\u00e1rios xs:todos elementos derivados \n\\ \\ -xmlschema : trata a sa\u00edda como Esquema XML de W3C (default)\n\\ \\ -relaxng : trata a entrada como RELAX NG (experimental, n\u00e3o suportada)\n\\ \\ -relaxng-compact : trata a entrada como sintaxe compacta RELAX NG (experimental, n\u00e3o suportada)\n\\ \\ -dtd : trata a entrada como XML DTD (experimental,n\u00e3o suportada)\n\\ \\ -wsdl : trata a entrada como WSDL e compila esquemas dentro dela (experimental,n\u00e3o suportada)\n\\ \\ -verbose : verbose extra\n\\ \\ -quiet : suprime a sa\u00edda do compilador\n\\ \\ -help : exibe esta mensagem de ajuda\n\\ \\ -version : exibe informa\u00e7\u00f5es da vers\u00e3o\n\\ \\ -fullversion : exibe informa\u00e7\u00f5es da vers\u00e3o completa\n
-Driver.AddonUsage = \nExtens\u00f5es:
-
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
-Driver.ExperimentalLanguageWarning = Voc\u00ea est\u00e1 tentando compilar {0}? O suporte para {0} \u00e9 experimental. Voc\u00ea pode ativ\u00e1-lo usando a op\u00e7\u00e3o {1}.
-
-# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
-Driver.NonExistentDir = n\u00e3o pode gravar em um diret\u00f3rio "{0}" n\u00e3o existente
-
-# Usage not found. TODO Remove
-#Driver.MissingRuntimePackageName = \
-# the -use-runtime option is missing a package name
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingModeOperand = a op\u00e7\u00e3o -mode n\u00e3o encontrou um operando
-
-# Usage not found. TODO Remove
-#Driver.MissingCompatibilityOperand = \
-# the -compatibility option is missing an operand
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingOperand = est\u00e1 faltando um operando
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyHost = a op\u00e7\u00e3o -host n\u00e3o encontrou um operando \nou -port foi especificado, mas n\u00e3o -host
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyPort = a op\u00e7\u00e3o -port n\u00e3o encontrou um operando \nou -host foi especificado, mas n\u00e3o -port
-
-Driver.ILLEGAL_TARGET_VERSION = "{0}" n\u00e3o \u00e9 uma vers\u00e3o do alvo v\u00e1lida. "2.0" e "2.1" s\u00e3o suportadas.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MISSING_PROXYFILE = a op\u00e7\u00e3o -httpproxyfile n\u00e3o encontrou um operando
-
-Driver.NO_SUCH_FILE = O arquivo {0} n\u00e3o existe
-
-Driver.ILLEGAL_PROXY = "{0}" n\u00e3o \u00e9 um formato de proxy v\u00e1lido. O formato \u00e9 [user[:password]@]proxyHost:proxyPort
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedMode = modo n\u00e3o reconhecido {0}
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedParameter = par\u00e2metro {0} n\u00e3o reconhecido
-
-Driver.UnsupportedEncoding = codifica\u00e7\u00e3o n\u00e3o suportada: {0}
-
-Driver.MissingGrammar = gram\u00e1tica n\u00e3o especificada
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-Driver.NotABindingFile = n\u00e3o \u00e9 um arquivo de bind externo. O elemento-raiz deve ser "{http://java.sun.com/xml/ns/jaxb}"bindings, mas \u00e9 "{{0}}"{1}
-
-# Not concatenated with any other string (written on a separate line).
-Driver.ParsingSchema = fazendo parse de um esquema...
-
-Driver.ParseFailed = Falha ao fazer parse de um esquema.
-
-Driver.StackOverflow = Sobrecarga de pilha. Voc\u00ea est\u00e1 compilando um esquema maior que exige mais recursos ou o XJC tem um erro. Primeiro, aumente o tamanho da pilha usando a op\u00e7\u00e3o -Xss da JVM. Se isso n\u00e3o resolver o problema, use a op\u00e7\u00e3o -debug para obter o rastreamento da pilha e contate a Sun.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.CompilingSchema = compilando um esquema...
-
-Driver.FailedToGenerateCode = Falha ao produzir o c\u00f3digo.
-
-# 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-b130911.1802
-
-Driver.FullVersion = vers\u00E3o completa de xjc "2.2.8-b130911.1802"
-
-Driver.BuildID = 2.2.8-b130911.1802
-
-# for JDK integration - include version in source zip
-jaxb.jdk.version=@@JAXB_JDK_VERSION@@
-
-# see java.text.SimpleDateFormat for format syntax
-# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
-Driver.DateFormat = yyyy.MM.dd
-
-# see java.text.SimpleDateFormat for format syntax
-# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html).
-Driver.TimeFormat = hh:mm:ss a z
-
-# as in: "generated on <date> at <time>"
-Driver.At = \u00e0s
-
-# ERROR in this meaning is a well known level of logging and should not be translated.
-Driver.ErrorMessage = [ERROR] {0}
-
-# WARNING in this meaning is a well known level of logging and should not be translated.
-Driver.WarningMessage = [WARNING] {0}
-
-# INFO in this meaning is a well known level of logging and should not be translated.
-Driver.InfoMessage = [INFO] {0}
-
-ModelLoader.TooManySchema = N\u00famero excessivo de arquivos do esquema para este idioma do esquema. Compile um arquivo de cada vez.
-
-ModelLoader.BindingFileNotSupportedForRNC = Arquivos de bind externos n\u00e3o s\u00e3o suportados para a sintaxe compacta RELAX NG.
-
-Driver.DefaultVersion = Definindo a vers\u00e3o default como JAXB 2.0
-
-Driver.DefaultPackageWarning = Pacote Java Default especificado. Voc\u00ea n\u00e3o poder\u00e1 acessar o c\u00f3digo gerado das classes em outro pacote.
-
-Driver.NotAValidFileName = "{0}" n\u00e3o \u00e9 um nome de arquivo: {1} v\u00e1lido
-
-Driver.FailedToParse = Falha ao fazer parse "{0}": {1}
-
-Driver.NotAFileNorURL = "{0}" n\u00e3o \u00e9 um nome de arquivo, nem um URL
-
-FIELD_RENDERER_CONFLICT = "-{0}" e "-{1}" s\u00e3o mutuamente exclusivos, pois afetam a gera\u00e7\u00e3o do c\u00f3digo
-
-NAME_CONVERTER_CONFLICT = "-{0}" e "-{1}" s\u00e3o mutuamente exclusivos, pois afetam a gera\u00e7\u00e3o do c\u00f3digo
-
-# {0} - file path, {1} - exception message e.g.: Failed to load "/foo/bar/Library.jar": File not found.
-FAILED_TO_LOAD = Falha ao carregar "{0}": {1}
-
-PLUGIN_LOAD_FAILURE = Falha ao carregar um plug-in: "{0}". Use a propriedade do sistema ''-Dcom.sun.tools.internal.xjc.Options.findServices=true'' para diagnosticar posteriormente
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties
deleted file mode 100644
index 38838e8e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.UnknownLocation) if location of the error is not known.
-ConsoleErrorReporter.UnknownLocation = \u672a\u77e5\u4f4d\u7f6e
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.LineXOfY). {0} - "?"/number, {1} - file location/"unknown file" e.g.: [xjc] [ERROR] Attempt to create a property having the same name as the reserved word "Class". [xjc] line 6 of example.xsd
-ConsoleErrorReporter.LineXOfY = \ \ {1}\u7684\u7b2c {0} \u884c
-
-# may be a placeholder replacement for the second placeholder of ConsoleErrorReporter.LineXOfY (if the file location is unknown)
-ConsoleErrorReporter.UnknownFile = \u672a\u77e5\u6587\u4ef6
-
-Driver.Private.Usage = \u5176\u4ed6\u4e13\u7528\u6d4b\u8bd5\u9009\u9879:\n\ \ -debug : \u4ee5\u8c03\u8bd5\u6a21\u5f0f\u8fd0\u884c (\u5305\u62ec -verbose)\n\ \ -mode <mode> : \u4ee5\u5176\u4ed6\u8fd0\u884c\u6a21\u5f0f\u8fd0\u884c XJC\n\ \ -private : \u663e\u793a\u6b64\u5e2e\u52a9\u6d88\u606f\n\u6a21\u5f0f:\n\ \ code : \u751f\u6210 Java \u6e90\u4ee3\u7801 (\u9ed8\u8ba4\u503c)\n\ \ dryrun : \u5728\u5185\u5b58\u4e2d\u7f16\u8bd1\u6a21\u5f0f, \u4f46\u4e0d\u751f\u6210 Java \u6e90\u4ee3\u7801\n\ \ zip : \u751f\u6210 Java \u6e90\u4ee3\u7801\u5e76\u653e\u5165\u7531 -d \u9009\u9879\u6307\u5b9a\u7684 Zip \u6587\u4ef6\n\ \ sig : \u8f6c\u50a8\u6240\u751f\u6210\u4ee3\u7801\u7684\u7b7e\u540d\n\ \ forest : \u8f6c\u50a8\u8f6c\u6362\u7684 DOM \u76ee\u5f55\u6797\n
-Driver.Public.Usage = \u7528\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\u5982\u679c\u6307\u5b9a dir, \u5c06\u7f16\u8bd1\u8be5\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u6a21\u5f0f\u6587\u4ef6\u3002\n\u5982\u679c\u6307\u5b9a jar, \u5c06\u7f16\u8bd1 /META-INF/sun-jaxb.episode \u7ed1\u5b9a\u6587\u4ef6\u3002\n\u9009\u9879:\n\ \ -nv : \u4e0d\u5bf9\u8f93\u5165\u6a21\u5f0f\u6267\u884c\u4e25\u683c\u9a8c\u8bc1\n\ \ -extension : \u5141\u8bb8\u4f9b\u5e94\u5546\u6269\u5c55 - \u4e0d\u4e25\u683c\u9075\u5faa\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ JAXB \u89c4\u8303\u4e2d\u7684\u517c\u5bb9\u6027\u89c4\u5219\u548c\u5e94\u7528\u7a0b\u5e8f E.2\n\ \ -b <file/dir> : \u6307\u5b9a\u5916\u90e8\u7ed1\u5b9a\u6587\u4ef6 (\u6bcf\u4e2a <file> \u5fc5\u987b\u5177\u6709\u81ea\u5df1\u7684 -b)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u5982\u679c\u6307\u5b9a\u76ee\u5f55, \u5219\u5c06\u641c\u7d22 **/*.xjb\n\ \ -d <dir> : \u751f\u6210\u7684\u6587\u4ef6\u5c06\u653e\u5165\u6b64\u76ee\u5f55\u4e2d\n\ \ -p <pkg> : \u6307\u5b9a\u76ee\u6807\u7a0b\u5e8f\u5305\n\ \ -httpproxy <proxy> : \u8bbe\u7f6e HTTP/HTTPS \u4ee3\u7406\u3002\u683c\u5f0f\u4e3a [user[:password]@]proxyHost:proxyPort\n\ \ -httpproxyfile <f> : \u4f5c\u7528\u4e0e -httpproxy \u7c7b\u4f3c, \u4f46\u5728\u6587\u4ef6\u4e2d\u91c7\u7528\u53c2\u6570\u6765\u4fdd\u62a4\u53e3\u4ee4\n\ \ -classpath <arg> : \u6307\u5b9a\u67e5\u627e\u7528\u6237\u7c7b\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ \ -catalog <file> : \u6307\u5b9a\u7528\u4e8e\u89e3\u6790\u5916\u90e8\u5b9e\u4f53\u5f15\u7528\u7684\u76ee\u5f55\u6587\u4ef6\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u652f\u6301 TR9401, XCatalog \u548c OASIS XML \u76ee\u5f55\u683c\u5f0f\u3002\n\ \ -readOnly : \u751f\u6210\u7684\u6587\u4ef6\u5c06\u5904\u4e8e\u53ea\u8bfb\u6a21\u5f0f\n\ \ -npa : \u7981\u6b62\u751f\u6210\u7a0b\u5e8f\u5305\u7ea7\u522b\u6ce8\u91ca (**/package-info.java)\n\ \ -no-header : \u7981\u6b62\u751f\u6210\u5e26\u6709\u65f6\u95f4\u6233\u7684\u6587\u4ef6\u5934\n\ \ -target (2.0|2.1) : \u884c\u4e3a\u4e0e XJC 2.0 \u6216 2.1 \u7c7b\u4f3c, \u7528\u4e8e\u751f\u6210\u4e0d\u4f7f\u7528\u4efb\u4f55 2.2 \u529f\u80fd\u7684\u4ee3\u7801\u3002\n\ \ -encoding <encoding> : \u4e3a\u751f\u6210\u7684\u6e90\u6587\u4ef6\u6307\u5b9a\u5b57\u7b26\u7f16\u7801\n\ \ -enableIntrospection : \u7528\u4e8e\u6b63\u786e\u751f\u6210\u5e03\u5c14\u578b getter/setter \u4ee5\u542f\u7528 Bean \u81ea\u6d4b apis \n\ \ -contentForWildcard : \u4e3a\u5177\u6709\u591a\u4e2a xs:any \u6d3e\u751f\u5143\u7d20\u7684\u7c7b\u578b\u751f\u6210\u5185\u5bb9\u5c5e\u6027\n\ \ -xmlschema : \u91c7\u7528 W3C XML \u6a21\u5f0f\u5904\u7406\u8f93\u5165 (\u9ed8\u8ba4\u503c)\n\ \ -relaxng : \u91c7\u7528 RELAX NG \u5904\u7406\u8f93\u5165 (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -relaxng-compact : \u91c7\u7528 RELAX NG \u7b80\u6d01\u8bed\u6cd5\u5904\u7406\u8f93\u5165 (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -dtd : \u91c7\u7528 XML DTD \u5904\u7406\u8f93\u5165 (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -wsdl : \u91c7\u7528 WSDL \u5904\u7406\u8f93\u5165\u5e76\u7f16\u8bd1\u5176\u4e2d\u7684\u6a21\u5f0f (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -verbose : \u7279\u522b\u8be6\u7ec6\n\ \ -quiet : \u9690\u85cf\u7f16\u8bd1\u5668\u8f93\u51fa\n\ \ -help : \u663e\u793a\u6b64\u5e2e\u52a9\u6d88\u606f\n\ \ -version : \u663e\u793a\u7248\u672c\u4fe1\u606f\n\ \ -fullversion : \u663e\u793a\u5b8c\u6574\u7684\u7248\u672c\u4fe1\u606f\n
-Driver.AddonUsage = \n\u6269\u5c55:
-
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
-Driver.ExperimentalLanguageWarning = \u662f\u5426\u8981\u5c1d\u8bd5\u7f16\u8bd1{0}? \u5bf9{0}\u7684\u652f\u6301\u662f\u5b9e\u9a8c\u6027\u7684\u3002\u53ef\u901a\u8fc7\u4f7f\u7528{1}\u9009\u9879\u542f\u7528\u5b83\u3002
-
-# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
-Driver.NonExistentDir = \u62d2\u7edd\u5199\u5165\u4e0d\u5b58\u5728\u7684\u76ee\u5f55 "{0}"
-
-# Usage not found. TODO Remove
-#Driver.MissingRuntimePackageName = \
-# the -use-runtime option is missing a package name
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingModeOperand = -mode \u9009\u9879\u7f3a\u5c11\u64cd\u4f5c\u6570
-
-# Usage not found. TODO Remove
-#Driver.MissingCompatibilityOperand = \
-# the -compatibility option is missing an operand
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingOperand = \u7f3a\u5c11\u64cd\u4f5c\u6570
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyHost = -host \u9009\u9879\u7f3a\u5c11\u64cd\u4f5c\u6570\n\u6216\u8005\u6307\u5b9a\u4e86 -port \u4f46\u672a\u6307\u5b9a -host
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyPort = -port \u9009\u9879\u7f3a\u5c11\u64cd\u4f5c\u6570\n\u6216\u8005\u6307\u5b9a\u4e86 -host \u4f46\u672a\u6307\u5b9a -port
-
-Driver.ILLEGAL_TARGET_VERSION = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u76ee\u6807\u7248\u672c\u3002\u652f\u6301 "2.0" \u548c "2.1"\u3002
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MISSING_PROXYFILE = -httpproxyfile \u9009\u9879\u7f3a\u5c11\u64cd\u4f5c\u6570
-
-Driver.NO_SUCH_FILE = \u6ca1\u6709\u8fd9\u79cd\u6587\u4ef6: {0}
-
-Driver.ILLEGAL_PROXY = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u4ee3\u7406\u683c\u5f0f\u3002\u6709\u6548\u683c\u5f0f\u4e3a [user[:password]@]proxyHost:proxyPort
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedMode = \u65e0\u6cd5\u8bc6\u522b\u7684\u6a21\u5f0f{0}
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedParameter = \u65e0\u6cd5\u8bc6\u522b\u7684\u53c2\u6570{0}
-
-Driver.UnsupportedEncoding = \u4e0d\u652f\u6301\u7684\u7f16\u7801: {0}
-
-Driver.MissingGrammar = \u672a\u6307\u5b9a\u8bed\u6cd5
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-Driver.NotABindingFile = \u4e0d\u662f\u5916\u90e8\u7ed1\u5b9a\u6587\u4ef6\u3002\u6839\u5143\u7d20\u5fc5\u987b\u4e3a ''{''http://java.sun.com/xml/ns/jaxb''}'' \u7ed1\u5b9a, \u4f46\u5b9e\u9645\u4e3a ''{''{0}''}''{1}
-
-# Not concatenated with any other string (written on a separate line).
-Driver.ParsingSchema = \u6b63\u5728\u89e3\u6790\u6a21\u5f0f...
-
-Driver.ParseFailed = \u65e0\u6cd5\u89e3\u6790\u6a21\u5f0f\u3002
-
-Driver.StackOverflow = \u5806\u6808\u6ea2\u51fa\u3002\u60a8\u6b63\u5728\u7f16\u8bd1\u9700\u8981\u5360\u7528\u8bb8\u591a\u8d44\u6e90\u7684\u5927\u578b\u6a21\u5f0f, \u6216\u8005 XJC \u5b58\u5728 Bug\u3002\u9996\u5148, \u8bf7\u4f7f\u7528 -Xss JVM \u9009\u9879\u6269\u5c55\u5806\u6808\u5927\u5c0f\u3002\u5982\u679c\u8fd9\u672a\u89e3\u51b3\u95ee\u9898, \u8bf7\u4f7f\u7528 -debug \u9009\u9879\u83b7\u53d6\u5806\u6808\u8ddf\u8e2a\u5e76\u4e0e Sun \u8054\u7cfb\u3002
-
-# Not concatenated with any other string (written on a separate line).
-Driver.CompilingSchema = \u6b63\u5728\u7f16\u8bd1\u6a21\u5f0f...
-
-Driver.FailedToGenerateCode = \u65e0\u6cd5\u751f\u6210\u4ee3\u7801\u3002
-
-# 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-b130911.1802
-
-Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b130911.1802"
-
-Driver.BuildID = 2.2.8-b130911.1802
-
-# for JDK integration - include version in source zip
-jaxb.jdk.version=@@JAXB_JDK_VERSION@@
-
-# see java.text.SimpleDateFormat for format syntax
-# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
-Driver.DateFormat = yyyy.MM.dd
-
-# see java.text.SimpleDateFormat for format syntax
-# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html).
-Driver.TimeFormat = hh:mm:ss a z
-
-# as in: "generated on <date> at <time>"
-Driver.At = \u65f6\u95f4
-
-# ERROR in this meaning is a well known level of logging and should not be translated.
-Driver.ErrorMessage = [ERROR] {0}
-
-# WARNING in this meaning is a well known level of logging and should not be translated.
-Driver.WarningMessage = [WARNING] {0}
-
-# INFO in this meaning is a well known level of logging and should not be translated.
-Driver.InfoMessage = [INFO] {0}
-
-ModelLoader.TooManySchema = \u6b64\u6a21\u5f0f\u8bed\u8a00\u7684\u6a21\u5f0f\u6587\u4ef6\u8fc7\u591a\u3002\u8bf7\u4e00\u6b21\u7f16\u8bd1\u4e00\u4e2a\u6587\u4ef6\u3002
-
-ModelLoader.BindingFileNotSupportedForRNC = RELAX NG \u7b80\u6d01\u8bed\u6cd5\u4e0d\u652f\u6301\u5916\u90e8\u7ed1\u5b9a\u6587\u4ef6\u3002
-
-Driver.DefaultVersion = \u7248\u672c\u9ed8\u8ba4\u4e3a JAXB 2.0
-
-Driver.DefaultPackageWarning = \u6307\u5b9a\u4e86\u9ed8\u8ba4 Java \u7a0b\u5e8f\u5305\u3002\u60a8\u5c06\u65e0\u6cd5\u4ece\u4efb\u4f55\u5176\u4ed6\u7a0b\u5e8f\u5305\u4e2d\u7684\u7c7b\u8bbf\u95ee\u751f\u6210\u7684\u4ee3\u7801\u3002
-
-Driver.NotAValidFileName = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u6587\u4ef6\u540d: {1}
-
-Driver.FailedToParse = \u65e0\u6cd5\u89e3\u6790 "{0}": {1}
-
-Driver.NotAFileNorURL = "{0}" \u65e2\u4e0d\u662f\u6587\u4ef6\u540d\u4e5f\u4e0d\u662f URL
-
-FIELD_RENDERER_CONFLICT = \u7531\u4e8e "-{0}" \u548c "-{1}" \u90fd\u4f1a\u5f71\u54cd\u4ee3\u7801\u751f\u6210, \u56e0\u6b64\u5b83\u4eec\u662f\u4e92\u76f8\u6392\u65a5\u7684
-
-NAME_CONVERTER_CONFLICT = \u7531\u4e8e "-{0}" \u548c "-{1}" \u90fd\u4f1a\u5f71\u54cd\u4ee3\u7801\u751f\u6210, \u56e0\u6b64\u5b83\u4eec\u662f\u4e92\u76f8\u6392\u65a5\u7684
-
-# {0} - file path, {1} - exception message e.g.: Failed to load "/foo/bar/Library.jar": File not found.
-FAILED_TO_LOAD = \u65e0\u6cd5\u52a0\u8f7d "{0}": {1}
-
-PLUGIN_LOAD_FAILURE = \u65e0\u6cd5\u52a0\u8f7d\u63d2\u4ef6: "{0}"\u3002\u8bf7\u4f7f\u7528\u7cfb\u7edf\u5c5e\u6027 ''-Dcom.sun.tools.internal.xjc.Options.findServices=true'' \u4ee5\u8fdb\u884c\u8fdb\u4e00\u6b65\u8bca\u65ad
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties
deleted file mode 100644
index c9c60d1d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.UnknownLocation) if location of the error is not known.
-ConsoleErrorReporter.UnknownLocation = \u4e0d\u660e\u7684\u4f4d\u7f6e
-
-# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.LineXOfY). {0} - "?"/number, {1} - file location/"unknown file" e.g.: [xjc] [ERROR] Attempt to create a property having the same name as the reserved word "Class". [xjc] line 6 of example.xsd
-ConsoleErrorReporter.LineXOfY = \ \ {1} \u7684\u7b2c {0} \u884c
-
-# may be a placeholder replacement for the second placeholder of ConsoleErrorReporter.LineXOfY (if the file location is unknown)
-ConsoleErrorReporter.UnknownFile = \u4e0d\u660e\u7684\u6a94\u6848
-
-Driver.Private.Usage = \u5176\u4ed6\u5c08\u7528\u6e2c\u8a66\u9078\u9805:\n\\ \\ -debug : \u5728\u9664\u932f\u6a21\u5f0f\u4e2d\u57f7\u884c (\u5305\u542b -verbose)\n\\ \\ -mode <mode> : \u5728\u5176\u4ed6\u57f7\u884c\u4e2d\u6a21\u5f0f\u4e0b\u57f7\u884c XJC\n\\ \\ -private : \u986f\u793a\u6b64\u8aaa\u660e\u8a0a\u606f\n\u6a21\u5f0f:\n\\ \\ code : \u7522\u751f Java \u4f86\u6e90\u7a0b\u5f0f\u78bc (\u9810\u8a2d\u503c)\n\\ \\ dryrun : \u5728\u8a18\u61b6\u9ad4\u4e2d\u7de8\u8b6f\u7db1\u8981, \u4f46\u4e0d\u7522\u751f Java \u4f86\u6e90\n\\ \\ zip : \u5c07 Java \u4f86\u6e90\u7a0b\u5f0f\u78bc\u8f49\u63db\u70ba -d \u9078\u9805\u6307\u5b9a\u7684 zip \u6a94\u6848\n\\ \\ sig : \u50be\u5370\u7522\u751f\u4e4b\u7a0b\u5f0f\u78bc\u7684\u7c3d\u7ae0\n\\ \\ forest : \u50be\u5370\u8f49\u63db\u7684 DOM \u6a39\u7cfb\n
-Driver.Public.Usage = \u7528\u6cd5: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...\n\u82e5\u6307\u5b9a dir, \u5c07\u7de8\u8b6f\u5176\u4e2d\u7684\u6240\u6709\u7db1\u8981\u6a94\u6848.\n\u82e5\u6307\u5b9a jar, \u5c07\u7de8\u8b6f /META-INF/sun-jaxb.episode \u9023\u7d50\u6a94.\n\u9078\u9805:\n\\ \\ -nv : \u4e0d\u57f7\u884c\u56b4\u683c\u7684\u8f38\u5165\u7db1\u8981\u9a57\u8b49\n\\ \\ -extension : \u5141\u8a31\u5ee0\u5546\u64f4\u5145\u5957\u4ef6 - \u4e0d\u56b4\u683c\u9075\u5faa\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ JAXB \u898f\u683c\u4e2d\u7684\u76f8\u5bb9\u6027\u898f\u5247\u8207 App E.2\n\\ \\ -b <file/dir> : \u6307\u5b9a\u5916\u90e8\u9023\u7d50\u6a94 (\u6bcf\u500b <file> \u9700\u6709\u81ea\u5df1\u7684 -b)\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \u82e5\u6307\u5b9a\u76ee\u9304, \u5247\u6703\u641c\u5c0b **/*.xjb\n\\ \\ -d <dir> : \u7522\u751f\u7684\u6a94\u6848\u5c07\u79fb\u81f3\u6b64\u76ee\u9304\n\\ \\ -p <pkg> : \u6307\u5b9a\u76ee\u6a19\u5957\u88dd\u7a0b\u5f0f\n\\ \\ -httpproxy <proxy> : \u8a2d\u5b9a HTTP/HTTPS \u4ee3\u7406\u4e3b\u6a5f. \u683c\u5f0f\u70ba [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile <f> : \u4f5c\u7528\u5982\u540c -httpproxy, \u4f46\u63a5\u53d7\u6a94\u6848\u4e2d\u7684\u5f15\u6578\u4ee5\u4fdd\u8b77\u5bc6\u78bc \n\\ \\ -classpath <arg> : \u6307\u5b9a\u5c0b\u627e\u4f7f\u7528\u8005\u985e\u5225\u6a94\u6848\u7684\u4f4d\u7f6e\n\\ \\ -catalog <file> : \u6307\u5b9a\u89e3\u6790\u5916\u90e8\u5be6\u9ad4\u53c3\u7167\u7684\u76ee\u9304\u6a94\u6848\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \u652f\u63f4 TR9401\u3001XCatalog \u4ee5\u53ca OASIS XML \u76ee\u9304\u683c\u5f0f.\n\\ \\ -readOnly : \u7522\u751f\u7684\u6a94\u6848\u5c07\u662f\u552f\u8b80\u6a21\u5f0f\n\\ \\ -npa : \u6291\u5236\u5957\u88dd\u7a0b\u5f0f\u5c64\u6b21\u8a3b\u89e3 (**/package-info.java) \u7684\u7522\u751f\n\\ \\ -no-header : \u6291\u5236\u6a94\u6848\u6a19\u982d\u548c\u6642\u6233\u7684\u7522\u751f\n\\ \\ -target (2.0|2.1) : \u4f5c\u7528\u5982\u540c XJC 2.0 \u6216 2.1, \u4e26\u4e14\u6703\u7522\u751f\u4e0d\u4f7f\u7528\u4efb\u4f55 2.2 \u529f\u80fd\u7684\u7a0b\u5f0f\u78bc.\n\\ \\ -encoding <encoding> : \u70ba\u7522\u751f\u7684\u4f86\u6e90\u6a94\u6848\u6307\u5b9a\u5b57\u5143\u7de8\u78bc\n\\ \\ -enableIntrospection : \u6b63\u78ba\u7522\u751f\u5e03\u6797\u503c getter/setter \u4ee5\u555f\u7528 Bean \u81ea\u6211\u6aa2\u67e5 api \n\\ \\ -contentForWildcard : \u70ba\u542b\u6709\u591a\u500b xs:any \u884d\u751f\u4e4b\u5143\u7d20\u7684\u985e\u578b\u7522\u751f\u5167\u5bb9\u7279\u6027 \n\\ \\ -xmlschema : \u5c07\u8f38\u5165\u8996\u70ba W3C XML \u7db1\u8981 (\u9810\u8a2d\u503c)\n\\ \\ -relaxng : \u5c07\u8f38\u5165\u8996\u70ba RELAX NG (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\\ \\ -relaxng-compact : \u5c07\u8f38\u5165\u8996\u70ba RELAX NG \u7cbe\u7c21\u8a9e\u6cd5 (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u4e0d\u652f\u63f4)\n\\ \\ -dtd : \u5c07\u8f38\u5165\u8996\u70ba XML DTD (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\\ \\ -wsdl : \u5c07\u8f38\u5165\u8996\u70ba WSDL, \u4e26\u7de8\u8b6f\u5176\u4e2d\u7684\u7db1\u8981 (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\\ \\ -verbose : \u63d0\u4f9b\u984d\u5916\u7684\u8a73\u7d30\u8cc7\u8a0a\n\\ \\ -quiet : \u6291\u5236\u7de8\u8b6f\u5668\u8f38\u51fa\n\\ \\ -help : \u986f\u793a\u6b64\u8aaa\u660e\u8a0a\u606f\n\\ \\ -version : \u986f\u793a\u7248\u672c\u8cc7\u8a0a\n\\ \\ -fullversion : \u986f\u793a\u5b8c\u6574\u7248\u672c\u8cc7\u8a0a\n
-Driver.AddonUsage = \n\u64f4\u5145\u5957\u4ef6:
-
-# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl
-Driver.ExperimentalLanguageWarning = \u60a8\u6b63\u5728\u5617\u8a66\u7de8\u8b6f {0} \u55ce? \u5c0d {0} \u7684\u652f\u63f4\u662f\u5be6\u9a57\u6027\u7684. \u60a8\u53ef\u4f7f\u7528 {1} \u9078\u9805\u4f86\u555f\u7528.
-
-# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility).
-Driver.NonExistentDir = \u62d2\u7d55\u5beb\u5165\u4e0d\u5b58\u5728\u7684\u76ee\u9304 "{0}"
-
-# Usage not found. TODO Remove
-#Driver.MissingRuntimePackageName = \
-# the -use-runtime option is missing a package name
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingModeOperand = -mode \u9078\u9805\u907a\u6f0f\u904b\u7b97\u5143
-
-# Usage not found. TODO Remove
-#Driver.MissingCompatibilityOperand = \
-# the -compatibility option is missing an operand
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingOperand = \u907a\u6f0f\u904b\u7b97\u5143
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyHost = \u53ef\u80fd\u662f -host \u9078\u9805\u907a\u6f0f\u904b\u7b97\u5143\n\u6216\u6307\u5b9a\u4e86 -port \u800c\u975e -host
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MissingProxyPort = \u53ef\u80fd\u662f -port \u9078\u9805\u907a\u6f0f\u904b\u7b97\u5143\n\u6216\u6307\u5b9a\u4e86 -host \u800c\u975e -port
-
-Driver.ILLEGAL_TARGET_VERSION = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u76ee\u6a19\u7248\u672c. \u652f\u63f4 "2.0" \u548c "2.1".
-
-# Not concatenated with any other string (written on a separate line).
-Driver.MISSING_PROXYFILE = -httpproxyfile \u9078\u9805\u907a\u6f0f\u904b\u7b97\u5143
-
-Driver.NO_SUCH_FILE = \u6c92\u6709\u6b64\u6a94\u6848: {0}
-
-Driver.ILLEGAL_PROXY = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u4ee3\u7406\u4e3b\u6a5f\u683c\u5f0f. \u683c\u5f0f\u70ba [user[:password]@]proxyHost:proxyPort
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedMode = \u7121\u6cd5\u8fa8\u8b58\u7684\u6a21\u5f0f {0}
-
-# Not concatenated with any other string (written on a separate line).
-Driver.UnrecognizedParameter = \u7121\u6cd5\u8fa8\u8b58\u7684\u53c3\u6578 {0}
-
-Driver.UnsupportedEncoding = \u4e0d\u652f\u63f4\u7684\u7de8\u78bc: {0}
-
-Driver.MissingGrammar = \u672a\u6307\u5b9a\u6587\u6cd5
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-Driver.NotABindingFile = \u4e0d\u662f\u5916\u90e8\u9023\u7d50\u6a94. \u6839\u5143\u7d20\u5fc5\u9808\u70ba ''{''http://java.sun.com/xml/ns/jaxb''}''bindings, \u4f46\u5176\u70ba ''{''{0}''}''{1}
-
-# Not concatenated with any other string (written on a separate line).
-Driver.ParsingSchema = \u6b63\u5728\u5256\u6790\u7db1\u8981...
-
-Driver.ParseFailed = \u7121\u6cd5\u5256\u6790\u7db1\u8981.
-
-Driver.StackOverflow = \u5806\u758a\u6ea2\u4f4d. \u53ef\u80fd\u662f\u60a8\u6b63\u5728\u7de8\u8b6f\u7684\u5927\u578b\u7db1\u8981\u9700\u8981\u66f4\u591a\u8cc7\u6e90, \u6216\u662f XJC \u6709\u932f\u8aa4. \u9996\u5148, \u8acb\u4f7f\u7528 -Xss JVM \u9078\u9805\u64f4\u5145\u5806\u758a\u5927\u5c0f. \u82e5\u9019\u6a23\u7121\u6cd5\u89e3\u6c7a\u554f\u984c, \u8acb\u4f7f\u7528 -debug \u9078\u9805\u4ee5\u53d6\u5f97\u5806\u758a\u8ffd\u8e64, \u4e26\u8207 Sun \u9023\u7d61.
-
-# Not concatenated with any other string (written on a separate line).
-Driver.CompilingSchema = \u6b63\u5728\u7de8\u8b6f\u7db1\u8981...
-
-Driver.FailedToGenerateCode = \u7121\u6cd5\u7522\u751f\u7a0b\u5f0f\u78bc.
-
-# 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-b130911.1802
-
-Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b130911.1802"
-
-Driver.BuildID = 2.2.8-b130911.1802
-
-# for JDK integration - include version in source zip
-jaxb.jdk.version=@@JAXB_JDK_VERSION@@
-
-# see java.text.SimpleDateFormat for format syntax
-# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date.
-Driver.DateFormat = yyyy.MM.dd
-
-# see java.text.SimpleDateFormat for format syntax
-# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html).
-Driver.TimeFormat = hh:mm:ss a z
-
-# as in: "generated on <date> at <time>"
-Driver.At = \u65bc
-
-# ERROR in this meaning is a well known level of logging and should not be translated.
-Driver.ErrorMessage = [ERROR] {0}
-
-# WARNING in this meaning is a well known level of logging and should not be translated.
-Driver.WarningMessage = [WARNING] {0}
-
-# INFO in this meaning is a well known level of logging and should not be translated.
-Driver.InfoMessage = [INFO] {0}
-
-ModelLoader.TooManySchema = \u6b64\u7db1\u8981\u8a9e\u8a00\u6709\u592a\u591a\u7db1\u8981\u6a94\u6848. \u8acb\u4e00\u6b21\u7de8\u8b6f\u4e00\u500b\u6a94\u6848.
-
-ModelLoader.BindingFileNotSupportedForRNC = RELAX NG \u7cbe\u7c21\u8a9e\u6cd5\u4e0d\u652f\u63f4\u5916\u90e8\u9023\u7d50\u6a94.
-
-Driver.DefaultVersion = \u6b63\u5728\u5c07\u7248\u672c\u9810\u8a2d\u70ba JAXB 2.0
-
-Driver.DefaultPackageWarning = \u5df2\u6307\u5b9a\u9810\u8a2d\u7684 Java \u5957\u88dd\u7a0b\u5f0f. \u60a8\u5c07\u7121\u6cd5\u5b58\u53d6\u4efb\u4f55\u5176\u4ed6\u5957\u88dd\u7a0b\u5f0f\u7684\u985e\u5225\u4e2d\u7522\u751f\u7684\u7a0b\u5f0f\u78bc.
-
-Driver.NotAValidFileName = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u6a94\u6848\u540d\u7a31: {1}
-
-Driver.FailedToParse = \u7121\u6cd5\u5256\u6790 "{0}": {1}
-
-Driver.NotAFileNorURL = "{0}" \u4e0d\u662f\u6a94\u6848\u540d\u7a31\u6216 URL
-
-FIELD_RENDERER_CONFLICT = "-{0}" \u8207 "-{1}" \u4e92\u65a5, \u56e0\u70ba\u5169\u8005\u5747\u6703\u5f71\u97ff\u7a0b\u5f0f\u78bc\u7522\u751f
-
-NAME_CONVERTER_CONFLICT = "-{0}" \u8207 "-{1}" \u4e92\u65a5, \u56e0\u70ba\u5169\u8005\u5747\u6703\u5f71\u97ff\u7a0b\u5f0f\u78bc\u7522\u751f
-
-# {0} - file path, {1} - exception message e.g.: Failed to load "/foo/bar/Library.jar": File not found.
-FAILED_TO_LOAD = \u7121\u6cd5\u8f09\u5165 "{0}": {1}
-
-PLUGIN_LOAD_FAILURE = \u7121\u6cd5\u8f09\u5165 Plugin: "{0}". \u8acb\u4f7f\u7528\u7cfb\u7d71\u7279\u6027 ''-Dcom.sun.tools.internal.xjc.Options.findServices=true'' \u57f7\u884c\u9032\u4e00\u6b65\u7684\u8a3a\u65b7
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/Messages.java
deleted file mode 100644
index 79da77e7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/Messages.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-public class Messages
-{
- /** Loads a string resource and formats it with specified arguments. */
- public static String format( String property, Object... args ) {
- String text = ResourceBundle.getBundle(Messages.class.getPackage().getName() +".MessageBundle").getString(property);
- return MessageFormat.format(text,args);
- }
-
-//
-//
-// Message resources
-//
-//
- static final String UNKNOWN_LOCATION = // 0 args
- "ConsoleErrorReporter.UnknownLocation";
-
- static final String LINE_X_OF_Y = // 2 args
- "ConsoleErrorReporter.LineXOfY";
-
- static final String UNKNOWN_FILE = // 0 args
- "ConsoleErrorReporter.UnknownFile";
-
- static final String DRIVER_PUBLIC_USAGE = // 0 args
- "Driver.Public.Usage";
-
- static final String DRIVER_PRIVATE_USAGE = // 0 args
- "Driver.Private.Usage";
-
- static final String ADDON_USAGE = // 0 args
- "Driver.AddonUsage";
-
- static final String EXPERIMENTAL_LANGUAGE_WARNING = // 2 arg
- "Driver.ExperimentalLanguageWarning";
-
- static final String NON_EXISTENT_DIR = // 1 arg
- "Driver.NonExistentDir";
-
- // Usage not found. TODO Remove
- // static final String MISSING_RUNTIME_PACKAGENAME = // 0 args
- // "Driver.MissingRuntimePackageName";
-
- static final String MISSING_MODE_OPERAND = // 0 args
- "Driver.MissingModeOperand";
-
- // Usage not found. TODO Remove
- // static final String MISSING_COMPATIBILITY_OPERAND = // 0 args
- // "Driver.MissingCompatibilityOperand";
-
- static final String MISSING_PROXY = // 0 args
- "Driver.MISSING_PROXY";
-
- static final String MISSING_PROXYFILE = // 0 args
- "Driver.MISSING_PROXYFILE";
-
- static final String NO_SUCH_FILE = // 1 arg
- "Driver.NO_SUCH_FILE";
-
- static final String ILLEGAL_PROXY = // 1 arg
- "Driver.ILLEGAL_PROXY";
-
- static final String ILLEGAL_TARGET_VERSION = // 1 arg
- "Driver.ILLEGAL_TARGET_VERSION";
-
- static final String MISSING_OPERAND = // 1 arg
- "Driver.MissingOperand";
-
- static final String MISSING_PROXYHOST = // 0 args
- "Driver.MissingProxyHost";
-
- static final String MISSING_PROXYPORT = // 0 args
- "Driver.MissingProxyPort";
-
- static final String STACK_OVERFLOW = // 0 arg
- "Driver.StackOverflow";
-
- static final String UNRECOGNIZED_MODE = // 1 arg
- "Driver.UnrecognizedMode";
-
- static final String UNRECOGNIZED_PARAMETER = // 1 arg
- "Driver.UnrecognizedParameter";
-
- static final String UNSUPPORTED_ENCODING = // 1 arg
- "Driver.UnsupportedEncoding";
-
- static final String MISSING_GRAMMAR = // 0 args
- "Driver.MissingGrammar";
-
- static final String PARSING_SCHEMA = // 0 args
- "Driver.ParsingSchema";
-
- static final String PARSE_FAILED = // 0 args
- "Driver.ParseFailed";
-
- static final String COMPILING_SCHEMA = // 0 args
- "Driver.CompilingSchema";
-
- static final String FAILED_TO_GENERATE_CODE = // 0 args
- "Driver.FailedToGenerateCode";
-
- static final String FILE_PROLOG_COMMENT = // 1 arg
- "Driver.FilePrologComment";
-
- static final String DATE_FORMAT = // 0 args
- "Driver.DateFormat";
-
- static final String TIME_FORMAT = // 0 args
- "Driver.TimeFormat";
-
- static final String AT = // 0 args
- "Driver.At";
-
- static final String VERSION = // 0 args
- "Driver.Version";
-
- static final String FULLVERSION = // 0 args
- "Driver.FullVersion";
-
- static final String BUILD_ID = // 0 args
- "Driver.BuildID";
-
- static final String ERROR_MSG = // 1:arg
- "Driver.ErrorMessage";
-
- static final String WARNING_MSG = // 1:arg
- "Driver.WarningMessage";
-
- static final String INFO_MSG = // 1:arg
- "Driver.InfoMessage";
-
- static final String ERR_NOT_A_BINDING_FILE = // 2 arg
- "Driver.NotABindingFile";
-
- static final String ERR_TOO_MANY_SCHEMA = // 0 args
- "ModelLoader.TooManySchema";
-
- static final String ERR_BINDING_FILE_NOT_SUPPORTED_FOR_RNC = // 0 args
- "ModelLoader.BindingFileNotSupportedForRNC";
-
- static final String DEFAULT_VERSION = // 0 args
- "Driver.DefaultVersion";
-
- static final String DEFAULT_PACKAGE_WARNING = // 0 args
- "Driver.DefaultPackageWarning";
-
- static final String NOT_A_VALID_FILENAME = // 2 args
- "Driver.NotAValidFileName";
- static final String FAILED_TO_PARSE = // 2 args
- "Driver.FailedToParse";
- static final String NOT_A_FILE_NOR_URL = // 1 arg
- "Driver.NotAFileNorURL";
-
- static final String FIELD_RENDERER_CONFLICT = // 2 args
- "FIELD_RENDERER_CONFLICT";
-
- static final String NAME_CONVERTER_CONFLICT = // 2 args
- "NAME_CONVERTER_CONFLICT";
- static final String FAILED_TO_LOAD = // 2 args
- "FAILED_TO_LOAD";
-
- static final String PLUGIN_LOAD_FAILURE = // 1 arg
- "PLUGIN_LOAD_FAILURE";
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/ModelLoader.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/ModelLoader.java
deleted file mode 100644
index f84cfdd8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/ModelLoader.java
+++ /dev/null
@@ -1,598 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.xjc;
-
-import java.io.IOException;
-import java.io.StringReader;
-
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.tools.internal.xjc.reader.ExtensionBindingChecker;
-import com.sun.tools.internal.xjc.reader.dtd.TDTDReader;
-import com.sun.tools.internal.xjc.reader.internalizer.DOMForest;
-import com.sun.tools.internal.xjc.reader.internalizer.DOMForestScanner;
-import com.sun.tools.internal.xjc.reader.internalizer.InternalizationLogic;
-import com.sun.tools.internal.xjc.reader.internalizer.SCDBasedBindingSet;
-import com.sun.tools.internal.xjc.reader.internalizer.VersionChecker;
-import com.sun.tools.internal.xjc.reader.relaxng.RELAXNGCompiler;
-import com.sun.tools.internal.xjc.reader.relaxng.RELAXNGInternalizationLogic;
-import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl;
-import com.sun.tools.internal.xjc.reader.xmlschema.parser.CustomizationContextChecker;
-import com.sun.tools.internal.xjc.reader.xmlschema.parser.IncorrectNamespaceURIChecker;
-import com.sun.tools.internal.xjc.reader.xmlschema.parser.SchemaConstraintChecker;
-import com.sun.tools.internal.xjc.reader.xmlschema.parser.XMLSchemaInternalizationLogic;
-import com.sun.tools.internal.xjc.util.ErrorReceiverFilter;
-import com.sun.xml.internal.bind.v2.util.XmlFactory;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.parser.JAXPParser;
-import com.sun.xml.internal.xsom.parser.XMLParser;
-import com.sun.xml.internal.xsom.parser.XSOMParser;
-import javax.xml.XMLConstants;
-
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.util.CheckingSchemaBuilder;
-import com.sun.xml.internal.rngom.digested.DPattern;
-import com.sun.xml.internal.rngom.digested.DSchemaBuilderImpl;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import com.sun.xml.internal.rngom.parse.compact.CompactParseable;
-import com.sun.xml.internal.rngom.parse.xml.SAXParseable;
-import com.sun.xml.internal.rngom.xml.sax.XMLReaderCreator;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLFilter;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * Builds a {@link Model} object.
- *
- * This is an utility class that makes it easy to load a grammar object
- * from various sources.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class ModelLoader {
-
- private final Options opt;
- private final ErrorReceiverFilter errorReceiver;
- private final JCodeModel codeModel;
- /**
- * {@link DOMForest#transform(boolean)} creates this on the side.
- */
- private SCDBasedBindingSet scdBasedBindingSet;
-
-
- /**
- * A convenience method to load schemas into a {@link Model}.
- */
- public static Model load( Options opt, JCodeModel codeModel, ErrorReceiver er ) {
- return new ModelLoader(opt,codeModel,er).load();
- }
-
-
- public ModelLoader(Options _opt, JCodeModel _codeModel, ErrorReceiver er) {
- this.opt = _opt;
- this.codeModel = _codeModel;
- this.errorReceiver = new ErrorReceiverFilter(er);
- }
-
- @SuppressWarnings("CallToThreadDumpStack")
- private Model load() {
- Model grammar;
-
- if(!sanityCheck())
- return null;
-
-
- try {
- switch (opt.getSchemaLanguage()) {
- case DTD :
- // TODO: make sure that bindFiles,size()<=1
- InputSource bindFile = null;
- if (opt.getBindFiles().length > 0)
- bindFile = opt.getBindFiles()[0];
- // if there is no binding file, make a dummy one.
- if (bindFile == null) {
- // if no binding information is specified, provide a default
- bindFile =
- new InputSource(
- new StringReader(
- "<?xml version='1.0'?><xml-java-binding-schema><options package='"
- + (opt.defaultPackage==null?"generated":opt.defaultPackage)
- + "'/></xml-java-binding-schema>"));
- }
-
- checkTooManySchemaErrors();
- grammar = loadDTD(opt.getGrammars()[0], bindFile );
- break;
-
- case RELAXNG :
- checkTooManySchemaErrors();
- grammar = loadRELAXNG();
- break;
-
- case RELAXNG_COMPACT :
- checkTooManySchemaErrors();
- grammar = loadRELAXNGCompact();
- break;
-
- case WSDL:
- grammar = annotateXMLSchema( loadWSDL() );
- break;
-
- case XMLSCHEMA:
- grammar = annotateXMLSchema( loadXMLSchema() );
- break;
-
- default :
- throw new AssertionError(); // assertion failed
- }
-
- if (errorReceiver.hadError()) {
- grammar = null;
- } else {
- grammar.setPackageLevelAnnotations(opt.packageLevelAnnotations);
- }
-
- return grammar;
-
- } catch (SAXException e) {
- // parsing error in the input document.
- // this error must have been reported to the user vis error handler
- // so don't print it again.
- if (opt.verbose) {
- // however, a bug in XJC might throw unexpected SAXException.
- // thus when one is debugging, it is useful to print what went
- // wrong.
- if (e.getException() != null)
- e.getException().printStackTrace();
- else
- e.printStackTrace();
- }
- return null;
- } catch (AbortException e) {
- // error should have been reported already, since this is requested by the error receiver
- return null;
- }
- }
-
-
-
- /**
- * Do some extra checking and return false if the compilation
- * should abort.
- */
- private boolean sanityCheck() {
- if( opt.getSchemaLanguage()==Language.XMLSCHEMA ) {
- Language guess = opt.guessSchemaLanguage();
-
- String[] msg = null;
- switch(guess) {
- case DTD:
- msg = new String[]{"DTD","-dtd"};
- break;
- case RELAXNG:
- msg = new String[]{"RELAX NG","-relaxng"};
- break;
- case RELAXNG_COMPACT:
- msg = new String[]{"RELAX NG compact syntax","-relaxng-compact"};
- break;
- case WSDL:
- msg = new String[]{"WSDL","-wsdl"};
- break;
- }
- if( msg!=null )
- errorReceiver.warning( null,
- Messages.format(
- Messages.EXPERIMENTAL_LANGUAGE_WARNING,
- msg[0], msg[1] ));
- }
- return true;
- }
-
-
- /**
- * {@link XMLParser} implementation that adds additional processors into the chain.
- *
- * <p>
- * This parser will parse a DOM forest as:
- * DOMForestParser -->
- * ExtensionBindingChecker -->
- * ProhibitedFeatureFilter -->
- * XSOMParser
- */
- private class XMLSchemaParser implements XMLParser {
- private final XMLParser baseParser;
-
- private XMLSchemaParser(XMLParser baseParser) {
- this.baseParser = baseParser;
- }
-
- public void parse(InputSource source, ContentHandler handler,
- ErrorHandler errorHandler, EntityResolver entityResolver ) throws SAXException, IOException {
- // set up the chain of handlers.
- handler = wrapBy( new ExtensionBindingChecker(XMLConstants.W3C_XML_SCHEMA_NS_URI,opt,errorReceiver), handler );
- handler = wrapBy( new IncorrectNamespaceURIChecker(errorReceiver), handler );
- handler = wrapBy( new CustomizationContextChecker(errorReceiver), handler );
-// handler = wrapBy( new VersionChecker(controller), handler );
-
- baseParser.parse( source, handler, errorHandler, entityResolver );
- }
- /**
- * Wraps the specified content handler by a filter.
- * It is little awkward to use a helper implementation class like XMLFilterImpl
- * as the method parameter, but this simplifies the code.
- */
- private ContentHandler wrapBy( XMLFilterImpl filter, ContentHandler handler ) {
- filter.setContentHandler(handler);
- return filter;
- }
- }
-
- private void checkTooManySchemaErrors() {
- if( opt.getGrammars().length!=1 )
- errorReceiver.error(null,Messages.format(Messages.ERR_TOO_MANY_SCHEMA));
- }
-
- /**
- * Parses a DTD file into an annotated grammar.
- *
- * @param source
- * DTD file
- * @param bindFile
- * External binding file.
- */
- private Model loadDTD( InputSource source, InputSource bindFile) {
-
- // parse the schema as a DTD.
- return TDTDReader.parse(
- source,
- bindFile,
- errorReceiver,
- opt);
- }
-
- /**
- * Builds DOMForest and performs the internalization.
- *
- * @throws SAXException
- * when a fatal error happens
- */
- public DOMForest buildDOMForest( InternalizationLogic logic )
- throws SAXException {
-
- // parse into DOM forest
- DOMForest forest = new DOMForest(logic, opt);
-
- forest.setErrorHandler(errorReceiver);
- if(opt.entityResolver!=null)
- forest.setEntityResolver(opt.entityResolver);
-
- // parse source grammars
- for (InputSource value : opt.getGrammars()) {
- errorReceiver.pollAbort();
- forest.parse(value, true);
- }
-
- // parse external binding files
- for (InputSource value : opt.getBindFiles()) {
- errorReceiver.pollAbort();
- Document dom = forest.parse(value, true);
- if(dom==null) continue; // error must have been reported
- Element root = dom.getDocumentElement();
- // TODO: it somehow doesn't feel right to do a validation in the Driver class.
- // think about moving it to somewhere else.
- if (!fixNull(root.getNamespaceURI()).equals(Const.JAXB_NSURI)
- || !root.getLocalName().equals("bindings"))
- errorReceiver.error(new SAXParseException(Messages.format(Messages.ERR_NOT_A_BINDING_FILE,
- root.getNamespaceURI(),
- root.getLocalName()),
- null,
- value.getSystemId(),
- -1, -1));
- }
-
- scdBasedBindingSet = forest.transform(opt.isExtensionMode());
-
- return forest;
- }
-
- private String fixNull(String s) {
- if(s==null) return "";
- else return s;
- }
-
- /**
- * Parses a set of XML Schema files into an annotated grammar.
- */
- public XSSchemaSet loadXMLSchema() throws SAXException {
-
- if( opt.strictCheck && !SchemaConstraintChecker.check(opt.getGrammars(),errorReceiver,opt.entityResolver, opt.disableXmlSecurity)) {
- // schema error. error should have been reported
- return null;
- }
-
- if(opt.getBindFiles().length==0) {
- // no external binding. try the speculative no DOMForest execution,
- // which is faster if the speculation succeeds.
- try {
- return createXSOMSpeculative();
- } catch( SpeculationFailure e) {
- // failed. go the slow way
- }
- }
-
- // the default slower way is to parse everything into DOM first.
- // so that we can take external annotations into account.
- DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() );
- return createXSOM(forest, scdBasedBindingSet);
- }
-
- /**
- * Parses a set of schemas inside a WSDL file.
- *
- * A WSDL file may contain multiple &lt;xsd:schema> elements.
- */
- private XSSchemaSet loadWSDL()
- throws SAXException {
-
-
- // build DOMForest just like we handle XML Schema
- DOMForest forest = buildDOMForest( new XMLSchemaInternalizationLogic() );
-
- DOMForestScanner scanner = new DOMForestScanner(forest);
-
- XSOMParser xsomParser = createXSOMParser( forest );
-
- // find <xsd:schema>s and parse them individually
- for( InputSource grammar : opt.getGrammars() ) {
- Document wsdlDom = forest.get( grammar.getSystemId() );
- if (wsdlDom == null) {
- String systemId = Options.normalizeSystemId(grammar.getSystemId());
- if (forest.get(systemId) != null) {
- grammar.setSystemId(systemId);
- wsdlDom = forest.get( grammar.getSystemId() );
- }
- }
-
- NodeList schemas = wsdlDom.getElementsByTagNameNS(XMLConstants.W3C_XML_SCHEMA_NS_URI,"schema");
- for( int i=0; i<schemas.getLength(); i++ )
- scanner.scan( (Element)schemas.item(i), xsomParser.getParserHandler() );
- }
- return xsomParser.getResult();
- }
-
- /**
- * Annotates the obtained schema set.
- *
- * @return
- * null if an error happens. In that case, the error messages
- * will be properly reported to the controller by this method.
- */
- public Model annotateXMLSchema(XSSchemaSet xs) {
- if (xs == null)
- return null;
- return BGMBuilder.build(xs, codeModel, errorReceiver, opt);
- }
-
- /**
- * Potentially problematic - make sure the parser instance passed is initialized
- * with proper security feature.
- *
- * @param parser
- * @return
- */
- public XSOMParser createXSOMParser(XMLParser parser) {
- // set up other parameters to XSOMParser
- XSOMParser reader = new XSOMParser(new XMLSchemaParser(parser));
- reader.setAnnotationParser(new AnnotationParserFactoryImpl(opt));
- reader.setErrorHandler(errorReceiver);
- reader.setEntityResolver(opt.entityResolver);
- return reader;
- }
-
- public XSOMParser createXSOMParser(final DOMForest forest) {
- XSOMParser p = createXSOMParser(forest.createParser());
- p.setEntityResolver(new EntityResolver() {
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
- // DOMForest only parses documents that are reachable through systemIds,
- // and it won't pick up references like <xs:import namespace="..." /> without
- // @schemaLocation. So we still need to use an entity resolver here to resolve
- // these references, yet we don't want to just run them blindly, since if we do that
- // DOMForestParser always get the translated system ID when catalog is used
- // (where DOMForest records trees with their original system IDs.)
- if(systemId!=null && forest.get(systemId)!=null)
- return new InputSource(systemId);
- if(opt.entityResolver!=null)
- return opt.entityResolver.resolveEntity(publicId,systemId);
-
- return null;
- }
- });
- return p;
- }
-
-
- private static final class SpeculationFailure extends Error {}
-
- private static final class SpeculationChecker extends XMLFilterImpl {
- @Override
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- if(localName.equals("bindings") && uri.equals(Const.JAXB_NSURI))
- throw new SpeculationFailure();
- super.startElement(uri,localName,qName,attributes);
- }
- }
-
- /**
- * Parses schemas directly into XSOM by assuming that there's
- * no external annotations.
- * <p>
- * When an external annotation is found, a {@link SpeculationFailure} is thrown,
- * and we will do it all over again by using the slow way.
- */
- private XSSchemaSet createXSOMSpeculative() throws SAXException, SpeculationFailure {
-
- // check if the schema contains external binding files. If so, speculation is a failure.
-
- XMLParser parser = new XMLParser() {
- private final JAXPParser base = new JAXPParser(XmlFactory.createParserFactory(opt.disableXmlSecurity));
-
- public void parse(InputSource source, ContentHandler handler,
- ErrorHandler errorHandler, EntityResolver entityResolver ) throws SAXException, IOException {
- // set up the chain of handlers.
- handler = wrapBy( new SpeculationChecker(), handler );
- handler = wrapBy( new VersionChecker(null,errorReceiver,entityResolver), handler );
-
- base.parse( source, handler, errorHandler, entityResolver );
- }
- /**
- * Wraps the specified content handler by a filter.
- * It is little awkward to use a helper implementation class like XMLFilterImpl
- * as the method parameter, but this simplifies the code.
- */
- private ContentHandler wrapBy( XMLFilterImpl filter, ContentHandler handler ) {
- filter.setContentHandler(handler);
- return filter;
- }
- };
-
- XSOMParser reader = createXSOMParser(parser);
-
- // parse source grammars
- for (InputSource value : opt.getGrammars())
- reader.parse(value);
-
- return reader.getResult();
- }
-
- /**
- * Parses a {@link DOMForest} into a {@link XSSchemaSet}.
- *
- * @return
- * null if the parsing failed.
- */
- public XSSchemaSet createXSOM(DOMForest forest, SCDBasedBindingSet scdBasedBindingSet) throws SAXException {
- // set up other parameters to XSOMParser
- XSOMParser reader = createXSOMParser(forest);
-
- // re-parse the transformed schemas
- for (String systemId : forest.getRootDocuments()) {
- errorReceiver.pollAbort();
- Document dom = forest.get(systemId);
- if (!dom.getDocumentElement().getNamespaceURI().equals(Const.JAXB_NSURI)) {
- reader.parse(systemId);
- }
- }
-
- XSSchemaSet result = reader.getResult();
-
- if(result!=null)
- scdBasedBindingSet.apply(result,errorReceiver);
-
- return result;
- }
-
- /**
- * Parses a RELAX NG grammar into an annotated grammar.
- */
- private Model loadRELAXNG() throws SAXException {
-
- // build DOM forest
- final DOMForest forest = buildDOMForest( new RELAXNGInternalizationLogic() );
-
- // use JAXP masquerading to validate the input document.
- // DOMForest -> ExtensionBindingChecker -> RNGOM
-
- XMLReaderCreator xrc = new XMLReaderCreator() {
- public XMLReader createXMLReader() {
-
- // foreset parser cannot change the receivers while it's working,
- // so we need to have one XMLFilter that works as a buffer
- XMLFilter buffer = new XMLFilterImpl() {
- @Override
- public void parse(InputSource source) throws IOException, SAXException {
- forest.createParser().parse( source, this, this, this );
- }
- };
-
- XMLFilter f = new ExtensionBindingChecker(Const.RELAXNG_URI,opt,errorReceiver);
- f.setParent(buffer);
-
- f.setEntityResolver(opt.entityResolver);
-
- return f;
- }
- };
-
- Parseable p = new SAXParseable( opt.getGrammars()[0], errorReceiver, xrc );
-
- return loadRELAXNG(p);
-
- }
-
- /**
- * Loads RELAX NG compact syntax
- */
- private Model loadRELAXNGCompact() {
- if(opt.getBindFiles().length>0)
- errorReceiver.error(new SAXParseException(
- Messages.format(Messages.ERR_BINDING_FILE_NOT_SUPPORTED_FOR_RNC),null));
-
- // TODO: entity resolver?
- Parseable p = new CompactParseable( opt.getGrammars()[0], errorReceiver );
-
- return loadRELAXNG(p);
-
- }
-
- /**
- * Common part between the XML syntax and the compact syntax.
- */
- private Model loadRELAXNG(Parseable p) {
- SchemaBuilder sb = new CheckingSchemaBuilder(new DSchemaBuilderImpl(),errorReceiver);
-
- try {
- DPattern out = (DPattern)p.parse(sb);
- return RELAXNGCompiler.build(out,codeModel,opt);
- } catch (IllegalSchemaException e) {
- errorReceiver.error(e.getMessage(),e);
- return null;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/Options.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/Options.java
deleted file mode 100644
index 19fd50c1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/Options.java
+++ /dev/null
@@ -1,1053 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.xjc;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.reflect.Array;
-import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import com.sun.codemodel.internal.CodeWriter;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.codemodel.internal.JResourceFile;
-import com.sun.codemodel.internal.writer.FileCodeWriter;
-import com.sun.codemodel.internal.writer.PrologCodeWriter;
-import com.sun.istack.internal.tools.DefaultAuthenticator;
-import com.sun.org.apache.xml.internal.resolver.CatalogManager;
-import com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver;
-import com.sun.tools.internal.xjc.api.ClassNameAllocator;
-import com.sun.tools.internal.xjc.api.SpecVersion;
-import com.sun.tools.internal.xjc.generator.bean.field.FieldRendererFactory;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.reader.Util;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.nio.charset.Charset;
-import java.nio.charset.IllegalCharsetNameException;
-import java.util.Locale;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-
-/**
- * Global options.
- *
- * <p>
- * This class stores invocation configuration for XJC.
- * The configuration in this class should be abstract enough so that
- * it could be parsed from both command-line or Ant.
- */
-public class Options
-{
- /** If "-debug" is specified. */
- public boolean debugMode;
-
- /** If the "-verbose" option is specified. */
- public boolean verbose;
-
- /** If the "-quiet" option is specified. */
- public boolean quiet;
-
- /** If the -readOnly option is specified. */
- public boolean readOnly;
-
- /** No file header comment (to be more friendly with diff.) */
- public boolean noFileHeader;
-
- /** When on, fixes getter/setter generation to match the Bean Introspection API */
- public boolean enableIntrospection;
-
- /** When on, generates content property for types with multiple xs:any derived elements (which is supposed to be correct behaviour) */
- public boolean contentForWildcard;
-
- /** Encoding to be used by generated java sources, null for platform default. */
- public String encoding;
-
- /**
- * If true XML security features when parsing XML documents will be disabled.
- * The default value is false.
- *
- * Boolean
- * @since 2.2.6
- */
- public boolean disableXmlSecurity;
-
- /**
- * Check the source schemas with extra scrutiny.
- * The exact meaning depends on the schema language.
- */
- public boolean strictCheck =true;
-
- /**
- * If -explicit-annotation option is specified.
- * <p>
- * This generates code that works around issues specific to 1.4 runtime.
- */
- public boolean runtime14 = false;
-
- /**
- * If true, try to resolve name conflicts automatically by assigning mechanical numbers.
- */
- public boolean automaticNameConflictResolution = false;
-
- /**
- * strictly follow the compatibility rules and reject schemas that
- * contain features from App. E.2, use vendor binding extensions
- */
- public static final int STRICT = 1;
- /**
- * loosely follow the compatibility rules and allow the use of vendor
- * binding extensions
- */
- public static final int EXTENSION = 2;
-
- /**
- * this switch determines how carefully the compiler will follow
- * the compatibility rules in the spec. Either <code>STRICT</code>
- * or <code>EXTENSION</code>.
- */
- public int compatibilityMode = STRICT;
-
- public boolean isExtensionMode() {
- return compatibilityMode==EXTENSION;
- }
-
- private static final Logger logger = com.sun.xml.internal.bind.Util.getClassLogger();
-
- /**
- * Generates output for the specified version of the runtime.
- */
- public SpecVersion target = SpecVersion.LATEST;
-
-
- public Options() {
- try {
- Class.forName("javax.xml.bind.JAXBPermission");
- } catch (ClassNotFoundException cnfe) {
- target = SpecVersion.V2_1;
- }
- }
-
- /**
- * Target directory when producing files.
- * <p>
- * This field is not used when XJC is driven through the XJC API.
- * Plugins that need to generate extra files should do so by using
- * {@link JPackage#addResourceFile(JResourceFile)}.
- */
- public File targetDir = new File(".");
-
- /**
- * Actually stores {@link CatalogResolver}, but the field
- * type is made to {@link EntityResolver} so that XJC can be
- * used even if resolver.jar is not available in the classpath.
- */
- public EntityResolver entityResolver = null;
-
- /**
- * Type of input schema language. One of the <code>SCHEMA_XXX</code>
- * constants.
- */
- private Language schemaLanguage = null;
-
- /**
- * The -p option that should control the default Java package that
- * will contain the generated code. Null if unspecified.
- */
- public String defaultPackage = null;
-
- /**
- * Similar to the -p option, but this one works with a lower priority,
- * and customizations overrides this. Used by JAX-RPC.
- */
- public String defaultPackage2 = null;
-
- /**
- * Input schema files as a list of {@link InputSource}s.
- */
- private final List<InputSource> grammars = new ArrayList<InputSource>();
-
- private final List<InputSource> bindFiles = new ArrayList<InputSource>();
-
- // Proxy setting.
- private String proxyHost = null;
- private String proxyPort = null;
- public String proxyAuth = null;
-
- /**
- * {@link Plugin}s that are enabled in this compilation.
- */
- public final List<Plugin> activePlugins = new ArrayList<Plugin>();
-
- /**
- * All discovered {@link Plugin}s.
- * This is lazily parsed, so that we can take '-cp' option into account.
- *
- * @see #getAllPlugins()
- */
- private List<Plugin> allPlugins;
-
- /**
- * Set of URIs that plug-ins recognize as extension bindings.
- */
- public final Set<String> pluginURIs = new HashSet<String>();
-
- /**
- * This allocator has the final say on deciding the class name.
- */
- public ClassNameAllocator classNameAllocator;
-
- /**
- * This switch controls whether or not xjc will generate package level annotations
- */
- public boolean packageLevelAnnotations = true;
-
- /**
- * This {@link FieldRendererFactory} determines how the fields are generated.
- */
- private FieldRendererFactory fieldRendererFactory = new FieldRendererFactory();
- /**
- * Used to detect if two {@link Plugin}s try to overwrite {@link #fieldRendererFactory}.
- */
- private Plugin fieldRendererFactoryOwner = null;
-
- /**
- * If this is non-null, we use this {@link NameConverter} over the one
- * given in the schema/binding.
- */
- private NameConverter nameConverter = null;
- /**
- * Used to detect if two {@link Plugin}s try to overwrite {@link #nameConverter}.
- */
- private Plugin nameConverterOwner = null;
-
- /**
- * Gets the active {@link FieldRendererFactory} that shall be used to build {@link Model}.
- *
- * @return always non-null.
- */
- public FieldRendererFactory getFieldRendererFactory() {
- return fieldRendererFactory;
- }
-
- /**
- * Sets the {@link FieldRendererFactory}.
- *
- * <p>
- * This method is for plugins to call to set a custom {@link FieldRendererFactory}.
- *
- * @param frf
- * The {@link FieldRendererFactory} to be installed. Must not be null.
- * @param owner
- * Identifies the plugin that owns this {@link FieldRendererFactory}.
- * When two {@link Plugin}s try to call this method, this allows XJC
- * to report it as a user-friendly error message.
- *
- * @throws BadCommandLineException
- * If a conflit happens, this exception carries a user-friendly error
- * message, indicating a conflict.
- */
- public void setFieldRendererFactory(FieldRendererFactory frf, Plugin owner) throws BadCommandLineException {
- // since this method is for plugins, make it bit more fool-proof than usual
- if(frf==null)
- throw new IllegalArgumentException();
- if(fieldRendererFactoryOwner!=null) {
- throw new BadCommandLineException(
- Messages.format(Messages.FIELD_RENDERER_CONFLICT,
- fieldRendererFactoryOwner.getOptionName(),
- owner.getOptionName() ));
- }
- this.fieldRendererFactoryOwner = owner;
- this.fieldRendererFactory = frf;
- }
-
-
- /**
- * Gets the active {@link NameConverter} that shall be used to build {@link Model}.
- *
- * @return can be null, in which case it's up to the binding.
- */
- public NameConverter getNameConverter() {
- return nameConverter;
- }
-
- /**
- * Sets the {@link NameConverter}.
- *
- * <p>
- * This method is for plugins to call to set a custom {@link NameConverter}.
- *
- * @param nc
- * The {@link NameConverter} to be installed. Must not be null.
- * @param owner
- * Identifies the plugin that owns this {@link NameConverter}.
- * When two {@link Plugin}s try to call this method, this allows XJC
- * to report it as a user-friendly error message.
- *
- * @throws BadCommandLineException
- * If a conflit happens, this exception carries a user-friendly error
- * message, indicating a conflict.
- */
- public void setNameConverter(NameConverter nc, Plugin owner) throws BadCommandLineException {
- // since this method is for plugins, make it bit more fool-proof than usual
- if(nc==null)
- throw new IllegalArgumentException();
- if(nameConverter!=null) {
- throw new BadCommandLineException(
- Messages.format(Messages.NAME_CONVERTER_CONFLICT,
- nameConverterOwner.getOptionName(),
- owner.getOptionName() ));
- }
- this.nameConverterOwner = owner;
- this.nameConverter = nc;
- }
-
- /**
- * Gets all the {@link Plugin}s discovered so far.
- *
- * <p>
- * A plugins are enumerated when this method is called for the first time,
- * by taking {@link #classpaths} into account. That means
- * "-cp plugin.jar" has to come before you specify options to enable it.
- */
- public List<Plugin> getAllPlugins() {
- if(allPlugins==null) {
- allPlugins = new ArrayList<Plugin>();
- ClassLoader ucl = getUserClassLoader(SecureLoader.getClassClassLoader(getClass()));
- allPlugins.addAll(Arrays.asList(findServices(Plugin.class,ucl)));
- }
-
- return allPlugins;
- }
-
- public Language getSchemaLanguage() {
- if( schemaLanguage==null)
- schemaLanguage = guessSchemaLanguage();
- return schemaLanguage;
- }
- public void setSchemaLanguage(Language _schemaLanguage) {
- this.schemaLanguage = _schemaLanguage;
- }
-
- /** Input schema files. */
- public InputSource[] getGrammars() {
- return grammars.toArray(new InputSource[grammars.size()]);
- }
-
- /**
- * Adds a new input schema.
- */
- public void addGrammar( InputSource is ) {
- grammars.add(absolutize(is));
- }
-
- private InputSource fileToInputSource( File source ) {
- try {
- String url = source.toURL().toExternalForm();
- return new InputSource(Util.escapeSpace(url));
- } catch (MalformedURLException e) {
- return new InputSource(source.getPath());
- }
- }
-
- public void addGrammar( File source ) {
- addGrammar(fileToInputSource(source));
- }
-
- /**
- * Recursively scan directories and add all XSD files in it.
- */
- public void addGrammarRecursive( File dir ) {
- addRecursive(dir,".xsd",grammars);
- }
-
- private void addRecursive( File dir, String suffix, List<InputSource> result ) {
- File[] files = dir.listFiles();
- if(files==null) return; // work defensively
-
- for( File f : files ) {
- if(f.isDirectory())
- addRecursive(f,suffix,result);
- else
- if(f.getPath().endsWith(suffix))
- result.add(absolutize(fileToInputSource(f)));
- }
- }
-
-
- private InputSource absolutize(InputSource is) {
- // absolutize all the system IDs in the input, so that we can map system IDs to DOM trees.
- try {
- URL baseURL = new File(".").getCanonicalFile().toURL();
- is.setSystemId( new URL(baseURL,is.getSystemId()).toExternalForm() );
- } catch( IOException e ) {
- logger.log(Level.FINE, "{0}, {1}", new Object[]{is.getSystemId(), e.getLocalizedMessage()});
- }
- return is;
- }
-
- /** Input external binding files. */
- public InputSource[] getBindFiles() {
- return bindFiles.toArray(new InputSource[bindFiles.size()]);
- }
-
- /**
- * Adds a new binding file.
- */
- public void addBindFile( InputSource is ) {
- bindFiles.add(absolutize(is));
- }
-
- /**
- * Adds a new binding file.
- */
- public void addBindFile( File bindFile ) {
- bindFiles.add(fileToInputSource(bindFile));
- }
-
- /**
- * Recursively scan directories and add all ".xjb" files in it.
- */
- public void addBindFileRecursive( File dir ) {
- addRecursive(dir,".xjb",bindFiles);
- }
-
- public final List<URL> classpaths = new ArrayList<URL>();
- /**
- * Gets a classLoader that can load classes specified via the
- * -classpath option.
- */
- public ClassLoader getUserClassLoader( ClassLoader parent ) {
- if (classpaths.isEmpty())
- return parent;
- return new URLClassLoader(
- classpaths.toArray(new URL[classpaths.size()]),parent);
- }
-
-
- /**
- * Parses an option <code>args[i]</code> and return
- * the number of tokens consumed.
- *
- * @return
- * 0 if the argument is not understood. Returning 0
- * will let the caller report an error.
- * @exception BadCommandLineException
- * If the callee wants to provide a custom message for an error.
- */
- public int parseArgument( String[] args, int i ) throws BadCommandLineException {
- if (args[i].equals("-classpath") || args[i].equals("-cp")) {
- String a = requireArgument(args[i], args, ++i);
- for (String p : a.split(File.pathSeparator)) {
- File file = new File(p);
- try {
- classpaths.add(file.toURL());
- } catch (MalformedURLException e) {
- throw new BadCommandLineException(
- Messages.format(Messages.NOT_A_VALID_FILENAME,file),e);
- }
- }
- return 2;
- }
- if (args[i].equals("-d")) {
- targetDir = new File(requireArgument("-d",args,++i));
- if( !targetDir.exists() )
- throw new BadCommandLineException(
- Messages.format(Messages.NON_EXISTENT_DIR,targetDir));
- return 2;
- }
- if (args[i].equals("-readOnly")) {
- readOnly = true;
- return 1;
- }
- if (args[i].equals("-p")) {
- defaultPackage = requireArgument("-p",args,++i);
- if(defaultPackage.length()==0) { // user specified default package
- // there won't be any package to annotate, so disable them
- // automatically as a usability feature
- packageLevelAnnotations = false;
- }
- return 2;
- }
- if (args[i].equals("-debug")) {
- debugMode = true;
- verbose = true;
- return 1;
- }
- if (args[i].equals("-nv")) {
- strictCheck = false;
- return 1;
- }
- if( args[i].equals("-npa")) {
- packageLevelAnnotations = false;
- return 1;
- }
- if( args[i].equals("-no-header")) {
- noFileHeader = true;
- return 1;
- }
- if (args[i].equals("-verbose")) {
- verbose = true;
- return 1;
- }
- if (args[i].equals("-quiet")) {
- quiet = true;
- return 1;
- }
- if (args[i].equals("-XexplicitAnnotation")) {
- runtime14 = true;
- return 1;
- }
- if (args[i].equals("-enableIntrospection")) {
- enableIntrospection = true;
- return 1;
- }
- if (args[i].equals("-disableXmlSecurity")) {
- disableXmlSecurity = true;
- return 1;
- }
- if (args[i].equals("-contentForWildcard")) {
- contentForWildcard = true;
- return 1;
- }
- if (args[i].equals("-XautoNameResolution")) {
- automaticNameConflictResolution = true;
- return 1;
- }
- if (args[i].equals("-b")) {
- addFile(requireArgument("-b",args,++i),bindFiles,".xjb");
- return 2;
- }
- if (args[i].equals("-dtd")) {
- schemaLanguage = Language.DTD;
- return 1;
- }
- if (args[i].equals("-relaxng")) {
- schemaLanguage = Language.RELAXNG;
- return 1;
- }
- if (args[i].equals("-relaxng-compact")) {
- schemaLanguage = Language.RELAXNG_COMPACT;
- return 1;
- }
- if (args[i].equals("-xmlschema")) {
- schemaLanguage = Language.XMLSCHEMA;
- return 1;
- }
- if (args[i].equals("-wsdl")) {
- schemaLanguage = Language.WSDL;
- return 1;
- }
- if (args[i].equals("-extension")) {
- compatibilityMode = EXTENSION;
- return 1;
- }
- if (args[i].equals("-target")) {
- String token = requireArgument("-target",args,++i);
- target = SpecVersion.parse(token);
- if(target==null)
- throw new BadCommandLineException(Messages.format(Messages.ILLEGAL_TARGET_VERSION,token));
- return 2;
- }
- if (args[i].equals("-httpproxyfile")) {
- if (i == args.length - 1 || args[i + 1].startsWith("-")) {
- throw new BadCommandLineException(
- Messages.format(Messages.MISSING_PROXYFILE));
- }
-
- File file = new File(args[++i]);
- if(!file.exists()) {
- throw new BadCommandLineException(
- Messages.format(Messages.NO_SUCH_FILE,file));
- }
-
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8"));
- parseProxy(in.readLine());
- in.close();
- } catch (IOException e) {
- throw new BadCommandLineException(
- Messages.format(Messages.FAILED_TO_PARSE,file,e.getMessage()),e);
- }
-
- return 2;
- }
- if (args[i].equals("-httpproxy")) {
- if (i == args.length - 1 || args[i + 1].startsWith("-")) {
- throw new BadCommandLineException(
- Messages.format(Messages.MISSING_PROXY));
- }
-
- parseProxy(args[++i]);
- return 2;
- }
- if (args[i].equals("-host")) {
- proxyHost = requireArgument("-host",args,++i);
- return 2;
- }
- if (args[i].equals("-port")) {
- proxyPort = requireArgument("-port",args,++i);
- return 2;
- }
- if( args[i].equals("-catalog") ) {
- // use Sun's "XML Entity and URI Resolvers" by Norman Walsh
- // to resolve external entities.
- // http://www.sun.com/xml/developers/resolver/
-
- File catalogFile = new File(requireArgument("-catalog",args,++i));
- try {
- addCatalog(catalogFile);
- } catch (IOException e) {
- throw new BadCommandLineException(
- Messages.format(Messages.FAILED_TO_PARSE,catalogFile,e.getMessage()),e);
- }
- return 2;
- }
- if( args[i].equals("-Xtest-class-name-allocator") ) {
- classNameAllocator = new ClassNameAllocator() {
- public String assignClassName(String packageName, String className) {
- System.out.printf("assignClassName(%s,%s)\n",packageName,className);
- return className+"_Type";
- }
- };
- return 1;
- }
-
- if (args[i].equals("-encoding")) {
- encoding = requireArgument("-encoding", args, ++i);
- try {
- if (!Charset.isSupported(encoding)) {
- throw new BadCommandLineException(
- Messages.format(Messages.UNSUPPORTED_ENCODING, encoding));
- }
- } catch (IllegalCharsetNameException icne) {
- throw new BadCommandLineException(
- Messages.format(Messages.UNSUPPORTED_ENCODING, encoding));
- }
- return 2;
- }
-
- // see if this is one of the extensions
- for( Plugin plugin : getAllPlugins() ) {
- try {
- if( ('-'+plugin.getOptionName()).equals(args[i]) ) {
- activePlugins.add(plugin);
- plugin.onActivated(this);
- pluginURIs.addAll(plugin.getCustomizationURIs());
-
- // give the plugin a chance to parse arguments to this option.
- // this is new in 2.1, and due to the backward compatibility reason,
- // if plugin didn't understand it, we still return 1 to indicate
- // that this option is consumed.
- int r = plugin.parseArgument(this,args,i);
- if(r!=0)
- return r;
- else
- return 1;
- }
-
- int r = plugin.parseArgument(this,args,i);
- if(r!=0) return r;
- } catch (IOException e) {
- throw new BadCommandLineException(e.getMessage(),e);
- }
- }
-
- return 0; // unrecognized
- }
-
- private void parseProxy(String text) throws BadCommandLineException {
- int i = text.lastIndexOf('@');
- int j = text.lastIndexOf(':');
-
- if (i > 0) {
- proxyAuth = text.substring(0, i);
- if (j > i) {
- proxyHost = text.substring(i + 1, j);
- proxyPort = text.substring(j + 1);
- } else {
- proxyHost = text.substring(i + 1);
- proxyPort = "80";
- }
- } else {
- //no auth info
- if (j < 0) {
- //no port
- proxyHost = text;
- proxyPort = "80";
- } else {
- proxyHost = text.substring(0, j);
- proxyPort = text.substring(j + 1);
- }
- }
- try {
- Integer.valueOf(proxyPort);
- } catch (NumberFormatException e) {
- throw new BadCommandLineException(Messages.format(Messages.ILLEGAL_PROXY,text));
- }
- }
-
- /**
- * Obtains an operand and reports an error if it's not there.
- */
- public String requireArgument(String optionName, String[] args, int i) throws BadCommandLineException {
- if (i == args.length || args[i].startsWith("-")) {
- throw new BadCommandLineException(
- Messages.format(Messages.MISSING_OPERAND,optionName));
- }
- return args[i];
- }
-
- /**
- * Parses a token to a file (or a set of files)
- * and add them as {@link InputSource} to the specified list.
- *
- * @param suffix
- * If the given token is a directory name, we do a recusive search
- * and find all files that have the given suffix.
- */
- private void addFile(String name, List<InputSource> target, String suffix) throws BadCommandLineException {
- Object src;
- try {
- src = Util.getFileOrURL(name);
- } catch (IOException e) {
- throw new BadCommandLineException(
- Messages.format(Messages.NOT_A_FILE_NOR_URL,name));
- }
- if(src instanceof URL) {
- target.add(absolutize(new InputSource(Util.escapeSpace(((URL)src).toExternalForm()))));
- } else {
- File fsrc = (File)src;
- if(fsrc.isDirectory()) {
- addRecursive(fsrc,suffix,target);
- } else {
- target.add(absolutize(fileToInputSource(fsrc)));
- }
- }
- }
-
- /**
- * Adds a new catalog file.
- */
- public void addCatalog(File catalogFile) throws IOException {
- if(entityResolver==null) {
- CatalogManager.getStaticManager().setIgnoreMissingProperties(true);
- entityResolver = new CatalogResolver(true);
- }
- ((CatalogResolver)entityResolver).getCatalog().parseCatalog(catalogFile.getPath());
- }
-
- /**
- * Parses arguments and fill fields of this object.
- *
- * @exception BadCommandLineException
- * thrown when there's a problem in the command-line arguments
- */
- public void parseArguments( String[] args ) throws BadCommandLineException {
-
- for (int i = 0; i < args.length; i++) {
- if(args[i].length()==0)
- throw new BadCommandLineException();
- if (args[i].charAt(0) == '-') {
- int j = parseArgument(args,i);
- if(j==0)
- throw new BadCommandLineException(
- Messages.format(Messages.UNRECOGNIZED_PARAMETER, args[i]));
- i += (j-1);
- } else {
- if(args[i].endsWith(".jar"))
- scanEpisodeFile(new File(args[i]));
- else
- addFile(args[i],grammars,".xsd");
- }
- }
-
- // configure proxy
- if (proxyHost != null || proxyPort != null) {
- if (proxyHost != null && proxyPort != null) {
- System.setProperty("http.proxyHost", proxyHost);
- System.setProperty("http.proxyPort", proxyPort);
- System.setProperty("https.proxyHost", proxyHost);
- System.setProperty("https.proxyPort", proxyPort);
- } else if (proxyHost == null) {
- throw new BadCommandLineException(
- Messages.format(Messages.MISSING_PROXYHOST));
- } else {
- throw new BadCommandLineException(
- Messages.format(Messages.MISSING_PROXYPORT));
- }
- if (proxyAuth != null) {
- DefaultAuthenticator.getAuthenticator().setProxyAuth(proxyAuth);
- }
- }
-
- if (grammars.isEmpty())
- throw new BadCommandLineException(
- Messages.format(Messages.MISSING_GRAMMAR));
-
- if( schemaLanguage==null )
- schemaLanguage = guessSchemaLanguage();
-
-// if(target==SpecVersion.V2_2 && !isExtensionMode())
-// throw new BadCommandLineException(
-// "Currently 2.2 is still not finalized yet, so using it requires the -extension switch." +
-// "NOTE THAT 2.2 SPEC MAY CHANGE BEFORE IT BECOMES FINAL.");
-
- if(pluginLoadFailure!=null)
- throw new BadCommandLineException(
- Messages.format(Messages.PLUGIN_LOAD_FAILURE,pluginLoadFailure));
- }
-
- /**
- * Finds the <tt>META-INF/sun-jaxb.episode</tt> file to add as a binding customization.
- */
- public void scanEpisodeFile(File jar) throws BadCommandLineException {
- try {
- URLClassLoader ucl = new URLClassLoader(new URL[]{jar.toURL()});
- Enumeration<URL> resources = ucl.findResources("META-INF/sun-jaxb.episode");
- while (resources.hasMoreElements()) {
- URL url = resources.nextElement();
- addBindFile(new InputSource(url.toExternalForm()));
- }
- } catch (IOException e) {
- throw new BadCommandLineException(
- Messages.format(Messages.FAILED_TO_LOAD,jar,e.getMessage()), e);
- }
- }
-
-
- /**
- * Guesses the schema language.
- */
- public Language guessSchemaLanguage() {
-
- // otherwise, use the file extension.
- // not a good solution, but very easy.
- if ((grammars != null) && (grammars.size() > 0)) {
- String name = grammars.get(0).getSystemId().toLowerCase();
-
- if (name.endsWith(".rng"))
- return Language.RELAXNG;
- if (name.endsWith(".rnc"))
- return Language.RELAXNG_COMPACT;
- if (name.endsWith(".dtd"))
- return Language.DTD;
- if (name.endsWith(".wsdl"))
- return Language.WSDL;
- }
-
- // by default, assume XML Schema
- return Language.XMLSCHEMA;
- }
-
- /**
- * Creates a configured CodeWriter that produces files into the specified directory.
- */
- public CodeWriter createCodeWriter() throws IOException {
- return createCodeWriter(new FileCodeWriter( targetDir, readOnly, encoding ));
- }
-
- /**
- * Creates a configured CodeWriter that produces files into the specified directory.
- */
- public CodeWriter createCodeWriter( CodeWriter core ) {
- if(noFileHeader)
- return core;
-
- return new PrologCodeWriter( core,getPrologComment() );
- }
-
- /**
- * Gets the string suitable to be used as the prolog comment baked into artifacts.
- * This is the string like "This file was generated by the JAXB RI on YYYY/mm/dd..."
- */
- public String getPrologComment() {
- // generate format syntax: <date> 'at' <time>
- String format =
- Messages.format(Messages.DATE_FORMAT)
- + " '"
- + Messages.format(Messages.AT)
- + "' "
- + Messages.format(Messages.TIME_FORMAT);
- SimpleDateFormat dateFormat = new SimpleDateFormat(format, Locale.ENGLISH);
-
- return Messages.format(
- Messages.FILE_PROLOG_COMMENT,
- dateFormat.format(new Date()));
- }
-
- /**
- * If a plugin failed to load, report.
- */
- private static String pluginLoadFailure;
-
- /**
- * Looks for all "META-INF/services/[className]" files and
- * create one instance for each class name found inside this file.
- */
- private static <T> T[] findServices( Class<T> clazz, ClassLoader classLoader ) {
- // if true, print debug output
- final boolean debug = com.sun.tools.internal.xjc.util.Util.getSystemProperty(Options.class,"findServices")!=null;
-
- // if we are running on Mustang or Dolphin, use ServiceLoader
- // so that we can take advantage of JSR-277 module system.
- try {
- Class<?> serviceLoader = Class.forName("java.util.ServiceLoader");
- if(debug)
- System.out.println("Using java.util.ServiceLoader");
- Iterable<T> itr = (Iterable<T>)serviceLoader.getMethod("load",Class.class,ClassLoader.class).invoke(null,clazz,classLoader);
- List<T> r = new ArrayList<T>();
- for (T t : itr)
- r.add(t);
- return r.toArray((T[])Array.newInstance(clazz,r.size()));
- } catch (ClassNotFoundException e) {
- // fall through
- } catch (IllegalAccessException e) {
- Error x = new IllegalAccessError();
- x.initCause(e);
- throw x;
- } catch (InvocationTargetException e) {
- Throwable x = e.getTargetException();
- if (x instanceof RuntimeException)
- throw (RuntimeException) x;
- if (x instanceof Error)
- throw (Error) x;
- throw new Error(x);
- } catch (NoSuchMethodException e) {
- Error x = new NoSuchMethodError();
- x.initCause(e);
- throw x;
- }
-
- String serviceId = "META-INF/services/" + clazz.getName();
-
- // used to avoid creating the same instance twice
- Set<String> classNames = new HashSet<String>();
-
- if(debug) {
- System.out.println("Looking for "+serviceId+" for add-ons");
- }
-
- // try to find services in CLASSPATH
- try {
- Enumeration<URL> e = classLoader.getResources(serviceId);
- if(e==null) return (T[])Array.newInstance(clazz,0);
-
- ArrayList<T> a = new ArrayList<T>();
- while(e.hasMoreElements()) {
- URL url = e.nextElement();
- BufferedReader reader=null;
-
- if(debug) {
- System.out.println("Checking "+url+" for an add-on");
- }
-
- try {
- reader = new BufferedReader(new InputStreamReader(url.openStream()));
- String impl;
- while((impl = reader.readLine())!=null ) {
- // try to instanciate the object
- impl = impl.trim();
- if(classNames.add(impl)) {
- Class implClass = classLoader.loadClass(impl);
- if(!clazz.isAssignableFrom(implClass)) {
- pluginLoadFailure = impl+" is not a subclass of "+clazz+". Skipping";
- if(debug)
- System.out.println(pluginLoadFailure);
- continue;
- }
- if(debug) {
- System.out.println("Attempting to instanciate "+impl);
- }
- a.add(clazz.cast(implClass.newInstance()));
- }
- }
- reader.close();
- } catch( Exception ex ) {
- // let it go.
- StringWriter w = new StringWriter();
- ex.printStackTrace(new PrintWriter(w));
- pluginLoadFailure = w.toString();
- if(debug) {
- System.out.println(pluginLoadFailure);
- }
- if( reader!=null ) {
- try {
- reader.close();
- } catch( IOException ex2 ) {
- // ignore
- }
- }
- }
- }
-
- return a.toArray((T[])Array.newInstance(clazz,a.size()));
- } catch( Throwable e ) {
- // ignore any error
- StringWriter w = new StringWriter();
- e.printStackTrace(new PrintWriter(w));
- pluginLoadFailure = w.toString();
- if(debug) {
- System.out.println(pluginLoadFailure);
- }
- return (T[])Array.newInstance(clazz,0);
- }
- }
-
- // this is a convenient place to expose the build version to xjc plugins
- public static String getBuildID() {
- return Messages.format(Messages.BUILD_ID);
- }
-
- public static String normalizeSystemId(String systemId) {
- try {
- systemId = new URI(systemId).normalize().toString();
- } catch (URISyntaxException e) {
- // leave the system ID untouched. In my experience URI is often too strict
- }
- return systemId;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/Plugin.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/Plugin.java
deleted file mode 100644
index af0d8baf..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/Plugin.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-
-import com.sun.tools.internal.xjc.generator.bean.field.FieldRendererFactory;
-import com.sun.tools.internal.xjc.model.CPluginCustomization;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.outline.Outline;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-/**
- * Add-on that works on the generated source code.
- *
- * <p>
- * This add-on will be called after the default bean generation
- * has finished.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- *
- * @since
- * JAXB RI 2.0 EA
- */
-public abstract class Plugin {
-
- /**
- * Gets the option name to turn on this add-on.
- *
- * <p>
- * For example, if "abc" is returned, "-abc" will
- * turn on this plugin. A plugin needs to be turned
- * on explicitly, or else no other methods of {@link Plugin}
- * will be invoked.
- *
- * <p>
- * Starting 2.1, when an option matches the name returned
- * from this method, XJC will then invoke {@link #parseArgument(Options, String[], int)},
- * allowing plugins to handle arguments to this option.
- */
- public abstract String getOptionName();
-
- /**
- * Gets the description of this add-on. Used to generate
- * a usage screen.
- *
- * @return
- * localized description message. should be terminated by \n.
- */
- public abstract String getUsage();
-
- /**
- * Parses an option <code>args[i]</code> and augment
- * the <code>opt</code> object appropriately, then return
- * the number of tokens consumed.
- *
- * <p>
- * The callee doesn't need to recognize the option that the
- * getOptionName method returns.
- *
- * <p>
- * Once a plugin is activated, this method is called
- * for options that XJC didn't recognize. This allows
- * a plugin to define additional options to customize
- * its behavior.
- *
- * <p>
- * Since options can appear in no particular order,
- * XJC allows sub-options of a plugin to show up before
- * the option that activates a plugin (one that's returned
- * by {@link #getOptionName().)
- *
- * But nevertheless a {@link Plugin} needs to be activated
- * to participate in further processing.
- *
- * @return
- * 0 if the argument is not understood.
- * Otherwise return the number of tokens that are
- * consumed, including the option itself.
- * (so if you have an option like "-foo 3", return 2.)
- * @exception BadCommandLineException
- * If the option was recognized but there's an error.
- * This halts the argument parsing process and causes
- * XJC to abort, reporting an error.
- */
- public int parseArgument( Options opt, String[] args, int i ) throws BadCommandLineException, IOException {
- return 0;
- }
-
- /**
- * Returns the list of namespace URIs that are supported by this plug-in
- * as schema annotations.
- *
- * <p>
- * If a plug-in returns a non-empty list, the JAXB RI will recognize
- * these namespace URIs as vendor extensions
- * (much like "http://java.sun.com/xml/ns/jaxb/xjc"). This allows users
- * to write those annotations inside a schema, or in external binding files,
- * and later plug-ins can access those annotations as DOM nodes.
- *
- * <p>
- * See <a href="http://java.sun.com/webservices/docs/1.5/jaxb/vendorCustomizations.html">
- * http://java.sun.com/webservices/docs/1.5/jaxb/vendorCustomizations.html</a>
- * for the syntax that users need to use to enable extension URIs.
- *
- * @return
- * can be empty, be never be null.
- */
- public List<String> getCustomizationURIs() {
- return Collections.emptyList();
- }
-
- /**
- * Checks if the given tag name is a valid tag name for the customization element in this plug-in.
- *
- * <p>
- * This method is invoked by XJC to determine if the user-specified customization element
- * is really a customization or not. This information is used to pick the proper error message.
- *
- * <p>
- * A plug-in is still encouraged to do the validation of the customization element in the
- * {@link #run} method before using any {@link CPluginCustomization}, to make sure that it
- * has proper child elements and attributes.
- *
- * @param nsUri
- * the namespace URI of the element. Never null.
- * @param localName
- * the local name of the element. Never null.
- */
- public boolean isCustomizationTagName(String nsUri,String localName) {
- return false;
- }
-
- /**
- * Notifies a plugin that it's activated.
- *
- * <p>
- * This method is called when a plugin is activated
- * through the command line option (as specified by {@link #getOptionName()}.
- *
- * <p>
- * This is a good opportunity to use
- * {@link Options#setFieldRendererFactory(FieldRendererFactory, Plugin)}
- * if a plugin so desires.
- *
- * <p>
- * Noop by default.
- *
- * @since JAXB 2.0 EA4
- */
- public void onActivated(Options opts) throws BadCommandLineException {
- // noop
- }
-
- /**
- * Performs the post-processing of the {@link Model}.
- *
- * <p>
- * This method is invoked after XJC has internally finished
- * the model construction. This is a chance for a plugin to
- * affect the way code generation is performed.
- *
- * <p>
- * Compared to the {@link #run(Outline, Options, ErrorHandler)}
- * method, this method allows a plugin to work at the higher level
- * conceptually closer to the abstract JAXB model, as opposed to
- * Java syntax level.
- *
- * <p>
- * Note that this method is invoked only when a {@link Plugin}
- * is activated.
- *
- * @param model
- * The object that represents the classes/properties to
- * be generated.
- *
- * @param errorHandler
- * Errors should be reported to this handler.
- *
- * @since JAXB 2.0.2
- */
- public void postProcessModel(Model model, ErrorHandler errorHandler) {
- // noop
- }
-
- /**
- * Run the add-on.
- *
- * <p>
- * This method is invoked after XJC has internally finished
- * the code generation. Plugins can tweak some of the generated
- * code (or add more code) by using {@link Outline} and {@link Options}.
- *
- * <p>
- * Note that this method is invoked only when a {@link Plugin}
- * is activated.
- *
- * @param outline
- * This object allows access to various generated code.
- *
- * @param errorHandler
- * Errors should be reported to this handler.
- *
- * @return
- * If the add-on executes successfully, return true.
- * If it detects some errors but those are reported and
- * recovered gracefully, return false.
- *
- * @throws SAXException
- * After an error is reported to {@link ErrorHandler}, the
- * same exception can be thrown to indicate a fatal irrecoverable
- * error. {@link ErrorHandler} itself may throw it, if it chooses
- * not to recover from the error.
- */
- public abstract boolean run(
- Outline outline, Options opt, ErrorHandler errorHandler ) throws SAXException ;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/ProgressCodeWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/ProgressCodeWriter.java
deleted file mode 100644
index 636b3b5e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/ProgressCodeWriter.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Writer;
-
-import com.sun.codemodel.internal.CodeWriter;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.codemodel.internal.writer.FilterCodeWriter;
-
-/**
- * {@link CodeWriter} that reports progress to {@link XJCListener}.
- */
-final class ProgressCodeWriter extends FilterCodeWriter {
-
- private int current;
- private final int totalFileCount;
-
- public ProgressCodeWriter( CodeWriter output, XJCListener progress, int totalFileCount ) {
- super(output);
- this.progress = progress;
- this.totalFileCount = totalFileCount;
- if(progress==null)
- throw new IllegalArgumentException();
- }
-
- private final XJCListener progress;
-
- public Writer openSource(JPackage pkg, String fileName) throws IOException {
- report(pkg,fileName);
- return super.openSource(pkg, fileName);
- }
-
- public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
- report(pkg,fileName);
- return super.openBinary(pkg,fileName);
- }
-
- private void report(JPackage pkg, String fileName) {
- String name = pkg.name().replace('.', File.separatorChar);
- if(name.length()!=0) name += File.separatorChar;
- name += fileName;
-
- if(progress.isCanceled())
- throw new AbortException();
- progress.generatedFile(name,current++,totalFileCount);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/SchemaCache.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/SchemaCache.java
deleted file mode 100644
index 2277dd47..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/SchemaCache.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.xjc;
-
-import java.net.URL;
-
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-import javax.xml.validation.ValidatorHandler;
-
-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.allowExternalAccess;
-
-/**
- * Wraps a JAXP {@link Schema} object and lazily instantiate it.
- *
- * This object is thread-safe. There should be only one instance of
- * this for the whole VM.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class SchemaCache {
-
- private Schema schema;
-
- private final URL source;
-
- public SchemaCache(URL source) {
- this.source = source;
- }
-
- public ValidatorHandler newValidator() {
- synchronized(this) {
- if(schema==null) {
- try {
- // do not disable secure processing - these are well-known schemas
- SchemaFactory sf = XmlFactory.createSchemaFactory(XMLConstants.W3C_XML_SCHEMA_NS_URI, false);
- 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);
- }
- }
- }
-
- ValidatorHandler handler = schema.newValidatorHandler();
- return handler;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/SecureLoader.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/SecureLoader.java
deleted file mode 100644
index e8b5f080..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/SecureLoader.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc;
-
-/**
- * Class defined for safe calls of getClassLoader methods of any kind (context/system/class
- * classloader. This MUST be package private and defined in every package which
- * uses such invocations.
- * @author snajper
- */
-class SecureLoader {
-
- static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
- static void setContextClassLoader(final ClassLoader cl) {
- if (System.getSecurityManager() == null) {
- Thread.currentThread().setContextClassLoader(cl);
- } else {
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- Thread.currentThread().setContextClassLoader(cl);
- return null;
- }
- });
- }
- }
-
- static ClassLoader getParentClassLoader(final ClassLoader cl) {
- if (System.getSecurityManager() == null) {
- return cl.getParent();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return cl.getParent();
- }
- });
- }
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/XJCFacade.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/XJCFacade.java
deleted file mode 100644
index b2dc366b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/XJCFacade.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.xjc;
-
-import java.io.Closeable;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URLClassLoader;
-
-/**
- * A shabby driver to invoke XJC1 or XJC2 depending on the command line switch.
- *
- * <p>
- * This class is compiled with -source 1.2 so that we can report a nice
- * user-friendly "you require Tiger" error message.
- *
- * @author Kohsuke Kawaguchi
- */
-public class XJCFacade {
-
- private static final String JDK6_REQUIRED = "XJC requires JDK 6.0 or later. Please download it from http://www.oracle.com/technetwork/java/javase/downloads";
-
- public static void main(String[] args) throws Throwable {
- String v = "2.0"; // by default, we go 2.0
-
- for (int i = 0; i < args.length; i++) {
- if (args[i].equals("-source")) {
- if (i + 1 < args.length) {
- v = parseVersion(args[i + 1]);
- }
- }
- }
-
- ClassLoader oldContextCl = SecureLoader.getContextClassLoader();
- try {
- ClassLoader cl = ClassLoaderBuilder.createProtectiveClassLoader(SecureLoader.getClassClassLoader(XJCFacade.class), v);
- SecureLoader.setContextClassLoader(cl);
- Class<?> driver = cl.loadClass("com.sun.tools.internal.xjc.Driver");
- Method mainMethod = driver.getDeclaredMethod("main", new Class[]{String[].class});
- try {
- mainMethod.invoke(null, new Object[]{args});
- } catch (InvocationTargetException e) {
- if (e.getTargetException() != null) {
- throw e.getTargetException();
- }
- }
- } catch (UnsupportedClassVersionError e) {
- System.err.println(JDK6_REQUIRED);
- } finally {
- ClassLoader cl = SecureLoader.getContextClassLoader();
- SecureLoader.setContextClassLoader(oldContextCl);
-
- //close/cleanup all classLoaders but the one which loaded this class
- while (cl != null && !oldContextCl.equals(cl)) {
- if (cl instanceof Closeable) {
- //JDK7+, ParallelWorldClassLoader
- ((Closeable) cl).close();
- } else {
- if (cl instanceof URLClassLoader) {
- //JDK6 - API jars are loaded by instance of URLClassLoader
- //so use proprietary API to release holded resources
- try {
- Class<?> clUtil = oldContextCl.loadClass("sun.misc.ClassLoaderUtil");
- Method release = clUtil.getDeclaredMethod("releaseLoader", URLClassLoader.class);
- release.invoke(null, cl);
- } catch (ClassNotFoundException ex) {
- //not Sun JDK 6, ignore
- System.err.println(JDK6_REQUIRED);
- }
- }
- }
- cl = SecureLoader.getParentClassLoader(cl);
- }
- }
- }
-
- public static String parseVersion(String version) {
- // no other versions supported as of now
- return "2.0";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/XJCListener.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/XJCListener.java
deleted file mode 100644
index 68a05556..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/XJCListener.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc;
-
-import java.io.PrintStream;
-
-import com.sun.tools.internal.xjc.api.ErrorListener;
-import com.sun.tools.internal.xjc.outline.Outline;
-
-/**
- * Call-back interface that can be implemented by the caller of {@link Driver}
- * to receive output from XJC.
- *
- * <p>
- * Most of the messages XJC produce once the real work starts is structured
- * as (message,source). Those outputs will be reported to various methods on
- * {@link ErrorListener}, which is inherited by this interface.
- *
- * <p>
- * The other messages (such as the usage screen when there was an error in
- * the command line option) will go to the {@link #message(String)} method.
- *
- * @author Kohsuke Kawaguchi
- * @since JAXB 2.0 EA
- */
-public abstract class XJCListener implements ErrorListener {
-
- /**
- * @deprecated
- * Override {@link #generatedFile(String, int, int)}.
- * Deprecated in 2.0.1.
- */
- public void generatedFile(String fileName) {}
-
- /**
- * Called for each file generated by XJC.
- *
- * <p>
- * XJC may generate not only source files but also resources files.
- * The file name includes the path portions that correspond with the package name.
- *
- * <p>
- * When generating files into a directory, file names will be relative to the
- * output directory. When generating files into a zip file, file names will be
- * those in the zip file.
- *
- * @param fileName
- * file names like "org/acme/foo/Foo.java" or "org/acme/foo/jaxb.properties".
- *
- * @since 2.0.1
- */
- public void generatedFile(String fileName, int current, int total ) {
- generatedFile(fileName); // backward compatibility
- }
-
- /**
- * Other miscellenous messages that do not have structures
- * will be reported through this method.
- *
- * This method is used like {@link PrintStream#println(String)}.
- * The callee is expected to add '\n'.
- */
- public void message(String msg) {}
-
- /**
- * Called after the schema is compiled and the code generation strategy is determined,
- * but before any code is actually generated as files.
- *
- * @param outline
- * never null. this is the root object that represents the code generation strategy.
- */
- public void compiled(Outline outline) {}
-
- /**
- * XJC will periodically invoke this method to see if it should cancel a compilation.
- *
- * <p>
- * As long as this method returns false, XJC will keep going. If this method ever returns
- * true, XJC will abort the processing right away and
- * returns non-zero from {@link Driver#run(String[], XJCListener)}.
- * Note that XJC will not report an abortion through the {@link #message(String)} method.
- *
- * <p>
- * Note that despite all the efforts to check this method frequently, XJC may still fail to
- * invoke this method for a long time. Such scenario would include network related problems
- * or other I/O block (you can't even interrupt the thread while I/O is blocking.)
- * So just beware that this is not a cure-all.
- *
- * @return
- * true if the {@link XJCListener} wants to abort the processing.
- * @since 2.1
- */
- public boolean isCanceled() {
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/accessors/PluginImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/accessors/PluginImpl.java
deleted file mode 100644
index 37ff1fbb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/accessors/PluginImpl.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.addon.accessors;
-
-import com.sun.codemodel.internal.JAnnotationUse;
-import com.sun.codemodel.internal.JClass;
-import java.io.IOException;
-import com.sun.tools.internal.xjc.BadCommandLineException;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.Plugin;
-import com.sun.tools.internal.xjc.outline.ClassOutline;
-import com.sun.tools.internal.xjc.outline.Outline;
-import java.lang.reflect.Field;
-import java.util.Iterator;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import org.xml.sax.ErrorHandler;
-
-/**
- * Generates synchronized methods.
- *
- * @author
- * Martin Grebac (martin.grebac@sun.com)
- */
-public class PluginImpl extends Plugin {
-
- public String getOptionName() {
- return "Xpropertyaccessors";
- }
-
- public String getUsage() {
- return " -Xpropertyaccessors : Use XmlAccessType PROPERTY instead of FIELD for generated classes";
- }
-
- @Override
- public int parseArgument(Options opt, String[] args, int i) throws BadCommandLineException, IOException {
- return 0; // no option recognized
- }
-
- public boolean run( Outline model, Options opt, ErrorHandler errorHandler ) {
-
- for( ClassOutline co : model.getClasses() ) {
- Iterator<JAnnotationUse> ann = co.ref.annotations().iterator();
- while (ann.hasNext()) {
- try {
- JAnnotationUse a = ann.next();
- Field clazzField = a.getClass().getDeclaredField("clazz");
- clazzField.setAccessible(true);
- JClass cl = (JClass) clazzField.get(a);
- if (cl.equals(model.getCodeModel()._ref(XmlAccessorType.class))) {
- a.param("value", XmlAccessType.PROPERTY);
- break;
- }
- } catch (IllegalArgumentException ex) {
- Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
- } catch (IllegalAccessException ex) {
- Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
- } catch (NoSuchFieldException ex) {
- Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
- } catch (SecurityException ex) {
- Logger.getLogger(PluginImpl.class.getName()).log(Level.SEVERE, null, ex);
- }
- }
- }
- return true;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/at_generated/PluginImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/at_generated/PluginImpl.java
deleted file mode 100644
index 0fd82ee6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/at_generated/PluginImpl.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.addon.at_generated;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import com.sun.codemodel.internal.JAnnotatable;
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JFieldVar;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.tools.internal.xjc.Driver;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.Plugin;
-import com.sun.tools.internal.xjc.outline.ClassOutline;
-import com.sun.tools.internal.xjc.outline.EnumOutline;
-import com.sun.tools.internal.xjc.outline.Outline;
-
-import org.xml.sax.ErrorHandler;
-
-/**
- * {@link Plugin} that marks the generated code by using JSR-250's '@Generated'.
- *
- * @author Kohsuke Kawaguchi
- */
-public class PluginImpl extends Plugin {
-
- public String getOptionName() {
- return "mark-generated";
- }
-
- public String getUsage() {
- return " -mark-generated : mark the generated code as @javax.annotation.Generated";
- }
-
- private JClass annotation;
-
- public boolean run( Outline model, Options opt, ErrorHandler errorHandler ) {
- // we want this to work without requiring JSR-250 jar.
- annotation = model.getCodeModel().ref("javax.annotation.Generated");
-
- for( ClassOutline co : model.getClasses() )
- augument(co);
- for( EnumOutline eo : model.getEnums() )
- augument(eo);
-
- //TODO: process generated ObjectFactory classes?
-
- return true;
- }
-
- private void augument(EnumOutline eo) {
- annotate(eo.clazz);
- }
-
- /**
- * Adds "@Generated" to the classes, methods, and fields.
- */
- private void augument(ClassOutline co) {
- annotate(co.implClass);
- for (JMethod m : co.implClass.methods())
- annotate(m);
- for (JFieldVar f : co.implClass.fields().values())
- annotate(f);
- }
-
- private void annotate(JAnnotatable m) {
- m.annotate(annotation)
- .param("value",Driver.class.getName())
- .param("date", getISO8601Date())
- .param("comments", "JAXB RI v" + Options.getBuildID());
- }
-
- // cache the timestamp so that all the @Generated annotations match
- private String date = null;
-
- /**
- * calculate the date value in ISO8601 format for the @Generated annotation
- * @return the date value
- */
- private String getISO8601Date() {
- if(date==null) {
- StringBuffer tstamp = new StringBuffer();
- tstamp.append((new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ssZ")).format(new Date()));
- // hack to get ISO 8601 style timezone - is there a better way that doesn't require
- // a bunch of timezone offset calculations?
- tstamp.insert(tstamp.length()-2, ':');
- date = tstamp.toString();
- }
- return date;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/code_injector/Const.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/code_injector/Const.java
deleted file mode 100644
index e26a30ed..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/code_injector/Const.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.addon.code_injector;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public class Const {
- /**
- * Customization namespace URI.
- */
- public static final String NS = "http://jaxb.dev.java.net/plugin/code-injector";
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/code_injector/PluginImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/code_injector/PluginImpl.java
deleted file mode 100644
index a8729e94..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/code_injector/PluginImpl.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.addon.code_injector;
-
-import java.util.Collections;
-import java.util.List;
-
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.Plugin;
-import com.sun.tools.internal.xjc.model.CPluginCustomization;
-import com.sun.tools.internal.xjc.outline.ClassOutline;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.tools.internal.xjc.util.DOMUtils;
-
-import org.xml.sax.ErrorHandler;
-
-/**
- * Entry point of a plugin.
- *
- * See the javadoc of {@link Plugin} for what those methods mean.
- *
- * @author Kohsuke Kawaguchi
- */
-public class PluginImpl extends Plugin {
- public String getOptionName() {
- return "Xinject-code";
- }
-
- public List<String> getCustomizationURIs() {
- return Collections.singletonList(Const.NS);
- }
-
- public boolean isCustomizationTagName(String nsUri, String localName) {
- return nsUri.equals(Const.NS) && localName.equals("code");
- }
-
- public String getUsage() {
- return " -Xinject-code : inject specified Java code fragments into the generated code";
- }
-
- // meat of the processing
- public boolean run(Outline model, Options opt, ErrorHandler errorHandler) {
- for( ClassOutline co : model.getClasses() ) {
- CPluginCustomization c = co.target.getCustomizations().find(Const.NS,"code");
- if(c==null)
- continue; // no customization --- nothing to inject here
-
- c.markAsAcknowledged();
- // TODO: ideally you should validate this DOM element to make sure
- // that there's no typo/etc. JAXP 1.3 can do this very easily.
- String codeFragment = DOMUtils.getElementText(c.element);
-
- // inject the specified code fragment into the implementation class.
- co.implClass.direct(codeFragment);
- }
-
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/episode/PluginImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/episode/PluginImpl.java
deleted file mode 100644
index ed3e149f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/episode/PluginImpl.java
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.addon.episode;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import com.sun.tools.internal.xjc.BadCommandLineException;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.Plugin;
-import com.sun.tools.internal.xjc.outline.ClassOutline;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.tools.internal.xjc.outline.EnumOutline;
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.xml.internal.txw2.TXW;
-import com.sun.xml.internal.txw2.output.StreamSerializer;
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSDeclaration;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.bind.v2.schemagen.episode.Bindings;
-import com.sun.xml.internal.bind.v2.schemagen.episode.SchemaBindings;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * Creates the episode file,
- *
- * @author Kohsuke Kawaguchi
- * @author Ben Tomasini (ben.tomasini@gmail.com)
- */
-public class PluginImpl extends Plugin {
-
- private File episodeFile;
-
- public String getOptionName() {
- return "episode";
- }
-
- public String getUsage() {
- return " -episode <FILE> : generate the episode file for separate compilation";
- }
-
- public int parseArgument(Options opt, String[] args, int i) throws BadCommandLineException, IOException {
- if(args[i].equals("-episode")) {
- episodeFile = new File(opt.requireArgument("-episode",args,++i));
- return 2;
- }
- return 0;
- }
-
- /**
- * Capture all the generated classes from global schema components
- * and generate them in an episode file.
- */
- public boolean run(Outline model, Options opt, ErrorHandler errorHandler) throws SAXException {
- try {
- // reorganize qualifying components by their namespaces to
- // generate the list nicely
- Map<XSSchema, PerSchemaOutlineAdaptors> perSchema = new HashMap<XSSchema,PerSchemaOutlineAdaptors>();
- boolean hasComponentInNoNamespace = false;
-
- // Combine classes and enums into a single list
- List<OutlineAdaptor> outlines = new ArrayList<OutlineAdaptor>();
-
- for (ClassOutline co : model.getClasses()) {
- XSComponent sc = co.target.getSchemaComponent();
- String fullName = co.implClass.fullName();
- String packageName = co.implClass.getPackage().name();
- OutlineAdaptor adaptor = new OutlineAdaptor(sc,
- OutlineAdaptor.OutlineType.CLASS, fullName, packageName);
- outlines.add(adaptor);
- }
-
- for (EnumOutline eo : model.getEnums()) {
- XSComponent sc = eo.target.getSchemaComponent();
- String fullName = eo.clazz.fullName();
- String packageName = eo.clazz.getPackage().name();
- OutlineAdaptor adaptor = new OutlineAdaptor(sc,
- OutlineAdaptor.OutlineType.ENUM, fullName, packageName);
- outlines.add(adaptor);
- }
-
- for (OutlineAdaptor oa : outlines) {
- XSComponent sc = oa.schemaComponent;
-
- if (sc == null) continue;
- if (!(sc instanceof XSDeclaration))
- continue;
- XSDeclaration decl = (XSDeclaration) sc;
- if (decl.isLocal())
- continue; // local components cannot be referenced from outside, so no need to list.
-
- PerSchemaOutlineAdaptors list = perSchema.get(decl.getOwnerSchema());
- if (list == null) {
- list = new PerSchemaOutlineAdaptors();
- perSchema.put(decl.getOwnerSchema(), list);
- }
-
- list.add(oa);
-
- if (decl.getTargetNamespace().equals(""))
- hasComponentInNoNamespace = true;
- }
-
- OutputStream os = new FileOutputStream(episodeFile);
- Bindings bindings = TXW.create(Bindings.class, new StreamSerializer(os, "UTF-8"));
- if(hasComponentInNoNamespace) // otherwise jaxb binding NS should be the default namespace
- bindings._namespace(Const.JAXB_NSURI,"jaxb");
- else
- bindings._namespace(Const.JAXB_NSURI,"");
- bindings.version("2.1");
- bindings._comment("\n\n"+opt.getPrologComment()+"\n ");
-
- // generate listing per schema
- for (Map.Entry<XSSchema,PerSchemaOutlineAdaptors> e : perSchema.entrySet()) {
- PerSchemaOutlineAdaptors ps = e.getValue();
- Bindings group = bindings.bindings();
- String tns = e.getKey().getTargetNamespace();
- if(!tns.equals(""))
- group._namespace(tns,"tns");
-
- group.scd("x-schema::"+(tns.equals("")?"":"tns"));
- SchemaBindings schemaBindings = group.schemaBindings();
- schemaBindings.map(false);
- if (ps.packageNames.size() == 1)
- {
- final String packageName = ps.packageNames.iterator().next();
- if (packageName != null && packageName.length() > 0) {
- schemaBindings._package().name(packageName);
- }
- }
-
- for (OutlineAdaptor oa : ps.outlineAdaptors) {
- Bindings child = group.bindings();
- oa.buildBindings(child);
- }
- group.commit(true);
- }
-
- bindings.commit();
-
- return true;
- } catch (IOException e) {
- errorHandler.error(new SAXParseException("Failed to write to "+episodeFile,null,e));
- return false;
- }
- }
-
- /**
- * Computes SCD.
- * This is fairly limited as JAXB can only map a certain kind of components to classes.
- */
- private static final XSFunction<String> SCD = new XSFunction<String>() {
- private String name(XSDeclaration decl) {
- if(decl.getTargetNamespace().equals(""))
- return decl.getName();
- else
- return "tns:"+decl.getName();
- }
-
- public String complexType(XSComplexType type) {
- return "~"+name(type);
- }
-
- public String simpleType(XSSimpleType simpleType) {
- return "~"+name(simpleType);
- }
-
- public String elementDecl(XSElementDecl decl) {
- return name(decl);
- }
-
- // the rest is doing nothing
- public String annotation(XSAnnotation ann) {
- throw new UnsupportedOperationException();
- }
-
- public String attGroupDecl(XSAttGroupDecl decl) {
- throw new UnsupportedOperationException();
- }
-
- public String attributeDecl(XSAttributeDecl decl) {
- throw new UnsupportedOperationException();
- }
-
- public String attributeUse(XSAttributeUse use) {
- throw new UnsupportedOperationException();
- }
-
- public String schema(XSSchema schema) {
- throw new UnsupportedOperationException();
- }
-
- public String facet(XSFacet facet) {
- throw new UnsupportedOperationException();
- }
-
- public String notation(XSNotation notation) {
- throw new UnsupportedOperationException();
- }
-
- public String identityConstraint(XSIdentityConstraint decl) {
- throw new UnsupportedOperationException();
- }
-
- public String xpath(XSXPath xpath) {
- throw new UnsupportedOperationException();
- }
-
- public String particle(XSParticle particle) {
- throw new UnsupportedOperationException();
- }
-
- public String empty(XSContentType empty) {
- throw new UnsupportedOperationException();
- }
-
- public String wildcard(XSWildcard wc) {
- throw new UnsupportedOperationException();
- }
-
- public String modelGroupDecl(XSModelGroupDecl decl) {
- throw new UnsupportedOperationException();
- }
-
- public String modelGroup(XSModelGroup group) {
- throw new UnsupportedOperationException();
- }
- };
-
- private final static class OutlineAdaptor {
-
- private enum OutlineType {
-
- CLASS(new BindingsBuilder() {
- public void build(OutlineAdaptor adaptor, Bindings bindings) {
- bindings.klass().ref(adaptor.implName);
-
- }
- }),
- ENUM(new BindingsBuilder() {
- public void build(OutlineAdaptor adaptor, Bindings bindings) {
- bindings.typesafeEnumClass().ref(adaptor.implName);
- }
- });
-
- private final BindingsBuilder bindingsBuilder;
-
- private OutlineType(BindingsBuilder bindingsBuilder) {
- this.bindingsBuilder = bindingsBuilder;
- }
-
- private interface BindingsBuilder {
- void build(OutlineAdaptor adaptor, Bindings bindings);
- }
-
- };
-
- private final XSComponent schemaComponent;
- private final OutlineType outlineType;
- private final String implName;
- private final String packageName;
-
- public OutlineAdaptor(XSComponent schemaComponent, OutlineType outlineType,
- String implName, String packageName) {
- this.schemaComponent = schemaComponent;
- this.outlineType = outlineType;
- this.implName = implName;
- this.packageName = packageName;
- }
-
- private void buildBindings(Bindings bindings) {
- bindings.scd(schemaComponent.apply(SCD));
- outlineType.bindingsBuilder.build(this, bindings);
- }
- }
-
- private final static class PerSchemaOutlineAdaptors {
-
- private final List<OutlineAdaptor> outlineAdaptors = new ArrayList<OutlineAdaptor>();
-
- private final Set<String> packageNames = new HashSet<String>();
-
- private void add(OutlineAdaptor outlineAdaptor)
- {
- this.outlineAdaptors.add(outlineAdaptor);
- this.packageNames.add(outlineAdaptor.packageName);
- }
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/episode/package-info.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/episode/package-info.java
deleted file mode 100644
index a3bae15a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/episode/package-info.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-@XmlNamespace(Const.JAXB_NSURI)
-package com.sun.tools.internal.xjc.addon.episode;
-
-import com.sun.xml.internal.txw2.annotation.XmlNamespace;
-import com.sun.tools.internal.xjc.reader.Const;
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/locator/SourceLocationAddOn.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/locator/SourceLocationAddOn.java
deleted file mode 100644
index 6d900cb7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/locator/SourceLocationAddOn.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.addon.locator;
-
-import java.io.IOException;
-
-import javax.xml.bind.annotation.XmlTransient;
-
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JVar;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.tools.internal.xjc.BadCommandLineException;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.Plugin;
-import com.sun.tools.internal.xjc.outline.ClassOutline;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.xml.internal.bind.Locatable;
-import com.sun.xml.internal.bind.annotation.XmlLocation;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.Locator;
-
-/**
- * Generates JAXB objects that implement {@link Locatable}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class SourceLocationAddOn extends Plugin {
-
- public String getOptionName() {
- return "Xlocator";
- }
-
- public String getUsage() {
- return " -Xlocator : enable source location support for generated code";
- }
-
- public int parseArgument(Options opt, String[] args, int i) throws BadCommandLineException, IOException {
- return 0; // no option recognized
- }
-
- private static final String fieldName = "locator";
-
- public boolean run(
- Outline outline,
- Options opt,
- ErrorHandler errorHandler ) {
-
- for( ClassOutline ci : outline.getClasses() ) {
- JDefinedClass impl = ci.implClass;
- if (ci.getSuperClass() == null) {
- JVar $loc = impl.field(JMod.PROTECTED, Locator.class, fieldName);
- $loc.annotate(XmlLocation.class);
- $loc.annotate(XmlTransient.class);
-
- impl._implements(Locatable.class);
-
- impl.method(JMod.PUBLIC, Locator.class, "sourceLocation").body()._return($loc);
-
- JMethod setter = impl.method(JMod.PUBLIC, Void.TYPE, "setSourceLocation");
- JVar $newLoc = setter.param(Locator.class, "newLocator");
- setter.body().assign($loc, $newLoc);
- }
- }
-
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/sync/SynchronizedMethodAddOn.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/sync/SynchronizedMethodAddOn.java
deleted file mode 100644
index b148d5c7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/addon/sync/SynchronizedMethodAddOn.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.addon.sync;
-
-import java.io.IOException;
-
-import com.sun.codemodel.internal.JMethod;
-import com.sun.tools.internal.xjc.BadCommandLineException;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.Plugin;
-import com.sun.tools.internal.xjc.outline.ClassOutline;
-import com.sun.tools.internal.xjc.outline.Outline;
-
-import org.xml.sax.ErrorHandler;
-
-/**
- * Generates synchronized methods.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class SynchronizedMethodAddOn extends Plugin {
-
- public String getOptionName() {
- return "Xsync-methods";
- }
-
- public String getUsage() {
- return " -Xsync-methods : generate accessor methods with the 'synchronized' keyword";
- }
-
- public int parseArgument(Options opt, String[] args, int i) throws BadCommandLineException, IOException {
- return 0; // no option recognized
- }
-
- public boolean run( Outline model, Options opt, ErrorHandler errorHandler ) {
-
- for( ClassOutline co : model.getClasses() )
- augument(co);
-
- return true;
- }
-
- /**
- * Adds "synchoronized" to all the methods.
- */
- private void augument(ClassOutline co) {
- for (JMethod m : co.implClass.methods())
- m.getMods().setSynchronized(true);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/ClassNameAllocator.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/ClassNameAllocator.java
deleted file mode 100644
index 9d6ab877..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/ClassNameAllocator.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api;
-
-/**
- * Callback interface that allows the driver of the XJC API
- * to rename JAXB-generated classes/interfaces/enums.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface ClassNameAllocator {
- /**
- * Hook that allows the client of the XJC API to rename some of the JAXB-generated classes.
- *
- * <p>
- * When registered, this calllbcak is consulted for every package-level
- * classes/interfaces/enums (hereafter, simply "classes")
- * that the JAXB RI generates. Note that
- * the JAXB RI does not use this allocator for nested/inner classes.
- *
- * <p>
- * If the allocator chooses to rename some classes. It is
- * the allocator's responsibility to find unique names.
- * If the returned name collides with other classes, the JAXB RI will
- * report errors.
- *
- * @param packageName
- * The package name, such as "" or "foo.bar". Never be null.
- * @param className
- * The short name of the proposed class name. Such as
- * "Foo" or "Bar". Never be null, never be empty.
- * Always a valid Java identifier.
- *
- * @return
- * The short name of the class name that should be used.
- * The class will be generated into the same package with this name.
- * The return value must be a valid Java identifier. May not be null.
- */
- String assignClassName( String packageName, String className );
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/ErrorListener.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/ErrorListener.java
deleted file mode 100644
index 3c88bf2a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/ErrorListener.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXParseException;
-
-/**
- * Implemented by the driver of the compiler engine to handle
- * errors found during the compiliation.
- *
- * <p>
- * This class implements {@link ErrorHandler} so it can be
- * passed to anywhere where {@link ErrorHandler} is expected.
- *
- * <p>
- * However, to make the error handling easy (and make it work
- * with visitor patterns nicely), this interface is not allowed
- * to abort the processing. It merely receives errors.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface ErrorListener extends com.sun.xml.internal.bind.api.ErrorListener {
- void error(SAXParseException exception);
- void fatalError(SAXParseException exception);
- void warning(SAXParseException exception);
- /**
- * Used to report possibly verbose information that
- * can be safely ignored.
- */
- void info(SAXParseException exception);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/J2SJAXBModel.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/J2SJAXBModel.java
deleted file mode 100644
index 3150f6ee..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/J2SJAXBModel.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api;
-
-import java.io.IOException;
-
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-
-/**
- * {@link JAXBModel} that exposes additional information available
- * only for the java->schema direction.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface J2SJAXBModel extends JAXBModel {
- /**
- * Returns the name of the XML Type bound to the
- * specified Java type.
- *
- * @param javaType
- * must not be null. This must be one of the {@link Reference}s specified
- * in the {@link JavaCompiler#bind} method.
- *
- * @return
- * null if it is not a part of the input to {@link JavaCompiler#bind}.
- *
- * @throws IllegalArgumentException
- * if the parameter is null
- */
- QName getXmlTypeName(Reference javaType);
-
- /**
- * Generates the schema documents from the model.
- *
- * @param outputResolver
- * this object controls the output to which schemas
- * will be sent.
- *
- * @throws IOException
- * if {@link SchemaOutputResolver} throws an {@link IOException}.
- */
- void generateSchema(SchemaOutputResolver outputResolver, ErrorListener errorListener) throws IOException;
-
- /**
- * Generates the episode file from the model.
- *
- * <p>
- * The "episode file" is really just a JAXB customization file (but with vendor extensions,
- * at this point), that can be used later with a schema compilation to support separate
- * compilation.
- *
- * @param output
- * This receives the generated episode file.
- * @since 2.1
- */
- void generateEpisodeFile(Result output);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/JAXBModel.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/JAXBModel.java
deleted file mode 100644
index 77ac4dbc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/JAXBModel.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api;
-
-import java.util.List;
-
-import javax.xml.bind.JAXBContext;
-
-/**
- * The in-memory representation of the JAXB binding.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface JAXBModel {
-
- /**
- * Returns a list of fully-qualified class names, which should
- * be used at the runtime to create a new {@link JAXBContext}.
- *
- * <p>
- * Until the JAXB team fixes the bootstrapping issue, we have
- * two bootstrapping methods. This one is to use a list of class names
- * to call {@link JAXBContext#newInstance(Class[])} method. If
- * this method returns non-null, the caller is expected to use
- * that method. <b>This is meant to be a temporary workaround.</b>
- *
- * @return
- * non-null read-only list.
- *
- * @deprecated
- * this method is provided for now to allow gradual migration for JAX-RPC.
- */
- List<String> getClassList();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/JavaCompiler.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/JavaCompiler.java
deleted file mode 100644
index 5b5664dc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/JavaCompiler.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api;
-
-import java.util.Collection;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import javax.annotation.processing.ProcessingEnvironment;
-
-
-/**
- * Java-to-Schema compiler.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface JavaCompiler {
-
- /**
- * Compiles the given annotated Java source code.
- *
- * <p>
- * This operation takes a set of "root types", then compute the list of
- * all the types that need to be bound by forming a transitive reflexive
- * closure of types that are referenced by the root types.
- *
- * <p>
- * Errors will be sent to {@link javax.annotation.processing.ProcessingEnvironment#getMessager()}.
- *
- * @param rootTypes
- * The list of types that needs to be bound to XML.
- * "root references" from JAX-RPC to JAXB is always in the form of (type,annotations) pair.
- *
- * @param additionalElementDecls
- * Add element declarations for the specified element names to
- * the XML types mapped from the corresponding {@link Reference}s.
- * Those {@link Reference}s must be included in the <tt>rootTypes</tt> parameter.
- * In this map, a {@link Reference} can be null, in which case the element name is
- * declared to have an empty complex type.
- * (&lt;xs:element name='foo'>&lt;xs:complexType/>&lt;/xs:element>)
- * This parameter can be null, in which case the method behaves as if the empty map is given.
- *
- * @param defaultNamespaceRemap
- * If not-null, all the uses of the empty default namespace ("") will
- * be replaced by this namespace URI.
- *
- * @param source
- * The caller supplied view to the annotated source code that JAXB is going to process.
- *
- * @return
- * Non-null if no error was reported. Otherwise null.
- */
- J2SJAXBModel bind(
- Collection<Reference> rootTypes,
- Map<QName, Reference> additionalElementDecls,
- String defaultNamespaceRemap,
- ProcessingEnvironment source);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/Mapping.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/Mapping.java
deleted file mode 100644
index 070a9409..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/Mapping.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api;
-
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-/**
- * JAXB-induced mapping between a Java class
- * and an XML element declaration. A part of the compiler artifacts.
- *
- * <p>
- * To be precise, this is a mapping between two Java classes and an
- * XML element declaration. There's one Java class/interface that
- * represents the element, and there's another Java class/interface that
- * represents the type of the element.
- *
- * The former is called "element representation" and the latter is called
- * "type representation".
- *
- * <p>
- * The {@link Mapping} interface provides operation that lets the caller
- * convert an instance of the element representation to that of the
- * type representation or vice versa.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface Mapping {
- /**
- * Name of the XML element.
- *
- * @return
- * never be null.
- */
- QName getElement();
-
- /**
- * Returns the fully-qualified name of the java class for the type of this element.
- *
- * TODO: does this method returns the name of the wrapper bean when it's qualified
- * for the wrapper style? Seems no (consider &lt;xs:element name='foo' type='xs:long' />),
- * but then how does JAX-RPC captures that bean?
- *
- * @return
- * never be null.
- */
- TypeAndAnnotation getType();
-
- /**
- * If this element is a so-called "wrapper-style" element,
- * obtains its member information.
- *
- * <p>
- * The notion of the wrapper style should be defined by the JAXB spec,
- * and ideally it should differ from that of the JAX-RPC only at
- * the point where the JAX-RPC imposes additional restriction
- * on the element name.
- *
- * <p>
- * As of this writing the JAXB spec doesn't define "the wrapper style"
- * and as such the exact definition of what XJC thinks
- * "the wrapper style" isn't spec-ed.
- *
- * <p>
- * Ths returned list includes {@link Property} defined not just
- * in this class but in all its base classes.
- *
- * @return
- * null if this isn't a wrapper-style element.
- * Otherwise list of {@link Property}s. The order signifies
- * the order they appeared inside a schema.
- */
- List<? extends Property> getWrapperStyleDrilldown();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/Property.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/Property.java
deleted file mode 100644
index d53ed2e9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/Property.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api;
-
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JType;
-
-/**
- * Represents a property of a wrapper-style element.
- *
- * <p>
- * Carrys information about one property of a wrapper-style
- * element. This interface is solely intended for the use by
- * the JAX-RPC and otherwise the use is discouraged.
- *
- * <p>
- * REVISIT: use CodeModel.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- * @see Mapping
- */
-public interface Property {
- /**
- * The name of the property.
- *
- * <p>
- * This method returns a valid identifier suitable for
- * the use as a variable name.
- *
- * @return
- * always non-null. Camel-style name like "foo" or "barAndZot".
- * Note that it may contain non-ASCII characters (CJK, etc.)
- * The caller is responsible for proper escaping if it
- * wants to print this as a variable name.
- */
- String name();
-
- /**
- * The Java type of the property.
- *
- * @return
- * always non-null.
- * {@link JType} is a representation of a Java type in a codeModel.
- * If you just need the fully-qualified class name, call {@link JType#fullName()}.
- */
- JType type();
-
- /**
- * Name of the XML element that corresponds to the property.
- *
- * <p>
- * Each child of a wrapper style element corresponds with an
- * element, and this method returns that name.
- *
- * @return
- * always non-null valid {@link QName}.
- */
- QName elementName();
-
- QName rawName();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/Reference.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/Reference.java
deleted file mode 100644
index 49728282..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/Reference.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api;
-
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-import javax.lang.model.type.TypeMirror;
-
-/**
- * Reference to a JAXB type (from JAX-RPC.)
- *
- * <p>
- * A reference is a Java type (represented as a {@link javax.lang.model.type.TypeMirror})
- * and a set of annotations (represented as a {@link javax.lang.model.element.Element}).
- * Together they describe a root reference to a JAXB type binding.
- *
- * <p>
- * Those two values can be supplied independently, or you can use
- * other convenience constructors to supply two values at once.
- *
- *
- * @author Kohsuke Kawaguchi
- */
-public final class Reference {
- /**
- * The JAXB type being referenced. Must not be null.
- */
- public final TypeMirror type;
- /**
- * The declaration from which annotations for the {@link #type} is read.
- * Must not be null.
- */
- public final Element annotations;
-
- /**
- * Creates a reference from the return type of the method
- * and annotations on the method.
- */
- public Reference(ExecutableElement method) {
- this(method.getReturnType(),method);
- }
-
- /**
- * Creates a reference from the parameter type
- * and annotations on the parameter.
- */
- public Reference(VariableElement param) {
- this(param.asType(), param);
- }
-
- /**
- * Creates a reference from a class declaration and its annotations.
- */
- public Reference(TypeElement type, ProcessingEnvironment env) {
- this(env.getTypeUtils().getDeclaredType(type),type);
- }
-
- /**
- * Creates a reference by providing two values independently.
- */
- public Reference(TypeMirror type, Element annotations) {
- if(type==null || annotations==null)
- throw new IllegalArgumentException();
- this.type = type;
- this.annotations = annotations;
- }
-
- public boolean equals(Object o) {
- if (this == o) return true;
- if (!(o instanceof Reference)) return false;
-
- final Reference that = (Reference) o;
-
- return annotations.equals(that.annotations) && type.equals(that.type);
- }
-
- public int hashCode() {
- return 29 * type.hashCode() + annotations.hashCode();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/S2JJAXBModel.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/S2JJAXBModel.java
deleted file mode 100644
index 79c2cbf1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/S2JJAXBModel.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api;
-
-import java.util.Collection;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-import javax.xml.bind.annotation.XmlSeeAlso;
-
-import com.sun.codemodel.internal.CodeWriter;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JClass;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.Plugin;
-
-/**
- * {@link JAXBModel} that exposes additional information available
- * only for the schema->java direction.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface S2JJAXBModel extends JAXBModel {
-
- /**
- * Gets a {@link Mapping} object for the given global element.
- *
- * @return
- * null if the element name is not a defined global element in the schema.
- */
- Mapping get( QName elementName );
-
- /**
- * Gets all the <tt>ObjectFactory</tt> classes generated by the compilation.
- *
- * <p>
- * This should be used for generating {@link XmlSeeAlso} on the SEI.
- */
- List<JClass> getAllObjectFactories();
-
-
- /**
- * Gets a read-only view of all the {@link Mapping}s.
- */
- Collection<? extends Mapping> getMappings();
-
- /**
- * Returns the fully-qualified name of the Java type that is bound to the
- * specified XML type.
- *
- * @param xmlTypeName
- * must not be null.
- * @return
- * null if the XML type is not bound to any Java type.
- */
- TypeAndAnnotation getJavaType(QName xmlTypeName);
-
- /**
- * Generates artifacts.
- *
- * <p>
- * TODO: if JAXB supports various modes of code generations
- * (such as public interface only or implementation only or
- * etc), we should define bit flags to control those.
- *
- * <p>
- * This operation is only supported for a model built from a schema.
- *
- * @param extensions
- * The JAXB RI extensions to run. This can be null or empty
- * array if the caller wishes not to run any extension.
- * <br>
- *
- * Those specified extensions
- * will participate in the code generation. Specifying an extension
- * in this list has the same effect of turning that extension on
- * via command line.
- * <br>
- *
- * It is the caller's responsibility to configure each augmenter
- * properly by using {@link Plugin#parseArgument(Options, String[], int)}.
- *
- * @return
- * object filled with the generated code. Use
- * {@link JCodeModel#build(CodeWriter)} to write them
- * to a disk.
- */
- JCodeModel generateCode( Plugin[] extensions, ErrorListener errorListener );
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/SchemaCompiler.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/SchemaCompiler.java
deleted file mode 100644
index cb748325..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/SchemaCompiler.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.tools.internal.xjc.Options;
-
-import org.w3c.dom.Element;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-
-/**
- * Schema-to-Java compiler.
- *
- * <p>
- * The caller can parse multiple schema documents,
- * JAXB external binding files (or potentially WSDL
- * and JSR-109.next mapping files in the future).
- *
- * <p>
- * All the errors found during this process will be sent
- * to the registered {@link ErrorListener}.
- *
- * <p>
- * Once all the documents are parsed, call the {@link #bind()}
- * method to get the compiled {@link JAXBModel} object.
- *
- *
- * <h2>Tips: namespace URI -> package customization</h2>
- * <p>
- * The caller can feed the following synthesized schema
- * to achive the namespace URI -> Java package customization:
- * <pre><xmp>
- * <schema targetNamespace="xml.namespace.uri"
- * xmlns="http://www.w3.org/2001/XMLSchema"
- * xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
- * jaxb:version="1.0">
- * <annotation><appinfo>
- * <jaxb:schemaBindings>
- * <jaxb:package name="java.package.name"/>
- * </jaxb:schemaBindings>
- * </appinfo></annotation>
- * </schema>
- * </xmp></pre>
- * Feed this synthesized schema document for each namespace URI
- * you need to map.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface SchemaCompiler {
- /**
- * Parses schemas or external bindings
- * through SAX events by feeding events into
- * SAX {@link ContentHandler}.
- *
- * @param systemId
- * The system ID of the document to be read in.
- *
- * @see #parseSchema(String, XMLStreamReader)
- */
- ContentHandler getParserHandler( String systemId );
-
- /**
- * Parses a schema or an external binding file
- * from an external source.
- *
- * @param source
- * Its system Id must be set to an absolute URI.
- */
- void parseSchema( InputSource source );
-
- /**
- * Specifies the target spec version for this compilaion.
- *
- * @param version
- * If null, XJC will generate the source code that
- * takes advantage of the latest JAXB spec that it understands.
- * @since 2.1 EA2
- */
- void setTargetVersion( SpecVersion version );
-
- /**
- * Parses a schema or an external binding file
- * from the specified DOM element.
- *
- * <p>
- * The given DOM element is treated as if it's the root of a
- * virtual document.
- *
- * <p>
- * XJC will not be able to print location information for
- * errors found in this document, since DOM doesn't have them.
- * For this reason, use of this method is strongly discouraged.
- *
- * @param systemId
- * We need an absolute system ID that uniquely designates the virtual
- * document. This should be different from the system ID of
- * the document which contains this element.
- * <p>
- * One way to do that is by adding a fragment identifier
- * to the system ID of the document. For example, if the document
- * is "foo.wsdl" and you are passing in its types section, you
- * can use an unique identifier like "foo.wsdl#types"
- */
- void parseSchema( String systemId, Element element );
-
- /**
- * Parses a schema or an external binding file
- * from the given source.
- *
- * <p>
- * A stream reader must be pointing at the element or
- * at the start of the document.
- * XML is parsed until the corresponding end tag, then the
- * sub tree is processed as a schema document.
- *
- * <p>
- * When this method returns successfully, the parser is at
- * the next token of the end element.
- *
- * @param systemId
- * The absolute system ID of the document that is being parsed.
- * This information is necessary to avoid double-inclusion
- * and etc.
- *
- * Note that {@link XMLStreamReader#getLocation()} only
- * returns the system ID of the entity it is parsing, not
- * necessarily the system ID of the document itself.
- *
- * @throws XMLStreamException
- * If an error happens while parsing a document.
- * Note that not only the parser but also the XJC itself
- * may throw this error (as a result of the additional validation
- * for example.)
- */
- void parseSchema( String systemId, XMLStreamReader reader ) throws XMLStreamException;
-
- void setErrorListener( ErrorListener errorListener );
- void setEntityResolver( EntityResolver entityResolver );
-
-
- /**
- * Sets the default Java package name into which the generated code will be placed.
- *
- * <p>
- * Customizations in the binding files/schemas will have precedence over this setting.
- * Set to null to use the default package name computation algorithm as specified by
- * the JAXB spec (which is the default behavior.)
- *
- * <p>
- * Initially this parameter is set to null.
- *
- * @param packageName
- * Java pckage name such as "org.foo.bar". Use "" to represent the root package,
- * and null to defer to the default computation algorithm.
- *
- * @see #forcePackageName(String)
- */
- void setDefaultPackageName( String packageName );
-
- /**
- * Forces all the JAXB-generated classes to go into the specific package.
- *
- * <p>
- * This setting takes precedence over the {@link #setDefaultPackageName(String)}
- * or any of the customization found in the JAXB binding files. This method
- * is designed to implement the semantics of the command-line '-p' option.
- *
- * <p>
- * This somewhat ugly semantics actually have a long history now and too late
- * to change.
- *
- * @see #setDefaultPackageName(String)
- */
- void forcePackageName( String packageName );
-
- /**
- * Sets the {@link ClassNameAllocator} to be used for the binding operation.
- *
- * <p>
- * This mechanism would allow the caller to participate in the binding operation.
- *
- * @see ClassNameAllocator
- */
- void setClassNameAllocator( ClassNameAllocator allocator );
-
- /**
- * Clears all the schema files parsed so far.
- *
- * @since 2.1.1
- */
- void resetSchema();
-
- /**
- * Obtains the compiled schema object model.
- *
- * Once this method is called, no other method should be
- * invoked on the {@link SchemaCompiler}.
- *
- * @return
- * null if the compilation fails. The errors should have been
- * delivered to the registered error handler in such a case.
- */
- S2JJAXBModel bind();
-
- /**
- * Allows the calling code to tweak more schema compilation details.
- *
- * <p>
- * The caller can use this method to obtain an {@link Options} instance,
- * then tweak settings on it. The updated settings will be used when the
- * {@link #bind()} method is invoked.
- *
- * <p>
- * The returned {@link Options} object is useful for example to specify
- * command-line arguments.
- *
- * @since 2.0.2
- * @deprecated
- * This method is not really "deprecated" (in the sense of being removed
- * from future versions), but the JAXB team is not committed to evolve
- * {@link Options} class in the compatible fashion. So please don't
- * use this method unless you know what you're doing.
- */
- @NotNull Options getOptions();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/SpecVersion.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/SpecVersion.java
deleted file mode 100644
index d95795c1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/SpecVersion.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api;
-
-/**
- * Represents the spec version constant.
- *
- * @author Kohsuke Kawaguchi
- */
-public enum SpecVersion {
- V2_0, V2_1, V2_2;
-
- /**
- * Returns true if this version is equal or later than the given one.
- */
- public boolean isLaterThan(SpecVersion t) {
- return this.ordinal()>=t.ordinal();
- }
-
- /**
- * Parses "2.0", "2.1", and "2.2" into the {@link SpecVersion} object.
- *
- * @return null for parsing failure.
- */
- public static SpecVersion parse(String token) {
- if(token.equals("2.0"))
- return V2_0;
- if(token.equals("2.1"))
- return V2_1;
- if(token.equals("2.2"))
- return V2_2;
- return null;
- }
-
- public static final SpecVersion LATEST = V2_2;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/TypeAndAnnotation.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/TypeAndAnnotation.java
deleted file mode 100644
index 79155da8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/TypeAndAnnotation.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api;
-
-import com.sun.codemodel.internal.JAnnotatable;
-import com.sun.codemodel.internal.JType;
-
-/**
- * Java type and associated JAXB annotations.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface TypeAndAnnotation {
- /**
- * Returns the Java type.
- *
- * <p>
- * {@link JType} is a representation of a Java type in a codeModel.
- * If you just need the fully-qualified class name, call {@link JType#fullName()}.
- *
- * @return
- * never be null.
- */
- JType getTypeClass();
-
- /**
- * Annotates the given program element by additional JAXB annotations that need to be there
- * at the point of reference.
- */
- void annotate( JAnnotatable programElement );
-
- /**
- * Two {@link TypeAndAnnotation} are equal if they
- * has the same type and annotations.
- */
- boolean equals(Object o);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/XJC.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/XJC.java
deleted file mode 100644
index 2150dad7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/XJC.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api;
-
-import com.sun.tools.internal.xjc.api.impl.s2j.SchemaCompilerImpl;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-
-/**
- * Entry point to the programatic API to access
- * schema compiler (XJC) and schema generator (schemagen).
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class XJC {
-
- /**
- * Gets a fresh {@link SchemaCompiler}.
- *
- * @return
- * always return non-null object.
- */
- public static SchemaCompiler createSchemaCompiler() {
- return new SchemaCompilerImpl();
- }
-
- /**
- * Computes the namespace URI -> package name conversion
- * as specified by the JAXB spec.
- *
- * @param namespaceUri
- * Namespace URI. Can be empty, but must not be null.
- * @return
- * A Java package name (e.g., "foo.bar"). "" to represent the root package.
- * This method returns null if the method fails to derive the package name
- * (there are certain namespace URIs with which this algorithm does not
- * work --- such as ":::" as the URI.)
- */
- public static String getDefaultPackageName( String namespaceUri ) {
- if(namespaceUri==null) throw new IllegalArgumentException();
- return NameConverter.standard.toPackageName( namespaceUri );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/AbstractMappingImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/AbstractMappingImpl.java
deleted file mode 100644
index ee17c091..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/AbstractMappingImpl.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api.impl.s2j;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.api.Mapping;
-import com.sun.tools.internal.xjc.api.Property;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CElement;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.model.CElementPropertyInfo;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-import com.sun.tools.internal.xjc.model.CTypeRef;
-import com.sun.xml.internal.bind.v2.model.core.ClassInfo;
-import com.sun.xml.internal.bind.v2.model.core.ReferencePropertyInfo;
-
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSTerm;
-
-/**
- * Partial common implementation between {@link ElementMappingImpl} and {@link BeanMappingImpl}
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class AbstractMappingImpl<InfoT extends CElement> implements Mapping {
-
- protected final JAXBModelImpl parent;
- protected final InfoT clazz;
- /**
- * Lazily computed.
- *
- * @see #getWrapperStyleDrilldown()
- */
- private List<Property> drilldown = null;
- private boolean drilldownComputed = false;
-
- protected AbstractMappingImpl(JAXBModelImpl parent, InfoT clazz) {
- this.parent = parent;
- this.clazz = clazz;
- }
-
- public final QName getElement() {
- return clazz.getElementName();
- }
-
- public final String getClazz() {
- return clazz.getType().fullName();
- }
-
- public final List<? extends Property> getWrapperStyleDrilldown() {
- if (!drilldownComputed) {
- drilldownComputed = true;
- drilldown = calcDrilldown();
- }
- return drilldown;
- }
-
- protected abstract List<Property> calcDrilldown();
-
- /**
- * Derived classes can use this method to implement {@link #calcDrilldown}.
- */
- protected List<Property> buildDrilldown(CClassInfo typeBean) {
- //JAXWS 2.1 spec 2.3.1.2:
- //Wrapper style if the wrapper elements only contain child elements,
- //they must not contain xsd:choice
- if (containingChoice(typeBean)) {
- return null;
- }
-
- List<Property> result;
-
- CClassInfo bc = typeBean.getBaseClass();
- if (bc != null) {
- result = buildDrilldown(bc);
- if (result == null) {
- return null; // aborted
- }
- } else {
- result = new ArrayList<Property>();
- }
-
- for (CPropertyInfo p : typeBean.getProperties()) {
- if (p instanceof CElementPropertyInfo) {
- CElementPropertyInfo ep = (CElementPropertyInfo) p;
-// wrong. A+,B,C is eligible for drill-down.
-// if(ep.isCollection())
-// // content model like A+,B,C is not eligible
-// return null;
-
- List<? extends CTypeRef> ref = ep.getTypes();
- if (ref.size() != 1) {// content model like (A|B),C is not eligible
- return null;
- }
-
- result.add(createPropertyImpl(ep, ref.get(0).getTagName()));
- } else if (p instanceof ReferencePropertyInfo) {
- CReferencePropertyInfo rp = (CReferencePropertyInfo) p;
-
- Collection<CElement> elements = rp.getElements();
- if (elements.size() != 1) {
- return null;
- }
-
- CElement ref = elements.iterator().next();
- if (ref instanceof ClassInfo) {
- result.add(createPropertyImpl(rp, ref.getElementName()));
- } else {
- CElementInfo eref = (CElementInfo) ref;
- if (!eref.getSubstitutionMembers().isEmpty()) {
- return null; // elements with a substitution group isn't qualified for the wrapper style
- }
- // JAX-WS doesn't want to see JAXBElement, so we have to hide it for them.
- ElementAdapter fr;
- if (rp.isCollection()) {
- fr = new ElementCollectionAdapter(parent.outline.getField(rp), eref);
- } else {
- fr = new ElementSingleAdapter(parent.outline.getField(rp), eref);
- }
-
- result.add(new PropertyImpl(this,
- fr, eref.getElementName()));
- }
- } else {// to be eligible for the wrapper style, only elements are allowed.
- // according to the JAX-RPC spec 2.3.1.2, element refs are disallowed
- return null;
- }
-
- }
-
- return result;
- }
-
- private boolean containingChoice(CClassInfo typeBean) {
- XSComponent component = typeBean.getSchemaComponent();
- if (component instanceof XSComplexType) {
- XSContentType contentType = ((XSComplexType) component).getContentType();
- XSParticle particle = contentType.asParticle();
- if (particle != null) {
- XSTerm term = particle.getTerm();
- XSModelGroup modelGroup = term.asModelGroup();
- if (modelGroup != null) {
- return (modelGroup.getCompositor() == XSModelGroup.Compositor.CHOICE);
- }
- }
- }
-
- return false;
- }
-
- private Property createPropertyImpl(CPropertyInfo p, QName tagName) {
- return new PropertyImpl(this,
- parent.outline.getField(p), tagName);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/BeanMappingImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/BeanMappingImpl.java
deleted file mode 100644
index 6b8e5880..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/BeanMappingImpl.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api.impl.s2j;
-
-import java.util.List;
-
-import com.sun.tools.internal.xjc.api.Mapping;
-import com.sun.tools.internal.xjc.api.Property;
-import com.sun.tools.internal.xjc.api.TypeAndAnnotation;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-
-/**
- * Partial implementation of {@link Mapping}
- * for bean classes.
- *
- * @author Kohsuke Kawaguchi
- */
-final class BeanMappingImpl extends AbstractMappingImpl<CClassInfo> {
-
- private final TypeAndAnnotationImpl taa = new TypeAndAnnotationImpl(parent.outline,clazz);
-
- BeanMappingImpl(JAXBModelImpl parent, CClassInfo classInfo) {
- super(parent,classInfo);
- assert classInfo.isElement();
- }
-
- public TypeAndAnnotation getType() {
- return taa;
- }
-
- public final String getTypeClass() {
- return getClazz();
- }
-
- public List<Property> calcDrilldown() {
- if(!clazz.isOrdered())
- return null; // all is not eligible for the wrapper style
- return buildDrilldown(clazz);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/DowngradingErrorHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/DowngradingErrorHandler.java
deleted file mode 100644
index ed61d6e3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/DowngradingErrorHandler.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api.impl.s2j;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * {@link ErrorHandler} that reports all errors as warnings.
- *
- * @author Kohsuke Kawaguchi
- */
-final class DowngradingErrorHandler implements ErrorHandler {
- private final ErrorHandler core;
-
- public DowngradingErrorHandler(ErrorHandler core) {
- this.core = core;
- }
-
- public void warning(SAXParseException exception) throws SAXException {
- core.warning(exception);
- }
-
- public void error(SAXParseException exception) throws SAXException {
- core.warning(exception);
- }
-
- public void fatalError(SAXParseException exception) throws SAXException {
- core.warning(exception);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementAdapter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementAdapter.java
deleted file mode 100644
index f9943070..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementAdapter.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api.impl.s2j;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-import com.sun.tools.internal.xjc.outline.ClassOutline;
-import com.sun.tools.internal.xjc.outline.FieldAccessor;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JVar;
-import com.sun.codemodel.internal.JConditional;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JInvocation;
-
-/**
- * {@link FieldOutline} that wraps another {@link FieldOutline}
- * and allows JAX-WS to access values without using about
- * {@link JAXBElement}.
- *
- * <p>
- * That means if a value is requested, we unwrap JAXBElement
- * and give it to them. If a value is set, we wrap that into
- * JAXBElement, etc.
- *
- * <p>
- * This can be used only with {@link CReferencePropertyInfo}
- * (or else it won't be {@link JAXBElement),
- * with one {@link CElementInfo} (or else we can't infer the tag name.)
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class ElementAdapter implements FieldOutline {
- protected final FieldOutline core;
-
- /**
- * The only one {@link CElementInfo} that can be in the property.
- */
- protected final CElementInfo ei;
-
- public ElementAdapter(FieldOutline core, CElementInfo ei) {
- this.core = core;
- this.ei = ei;
- }
-
- public ClassOutline parent() {
- return core.parent();
- }
-
- public CPropertyInfo getPropertyInfo() {
- return core.getPropertyInfo();
- }
-
- protected final Outline outline() {
- return core.parent().parent();
- }
-
- protected final JCodeModel codeModel() {
- return outline().getCodeModel();
- }
-
- protected abstract class FieldAccessorImpl implements FieldAccessor {
- final FieldAccessor acc;
-
- public FieldAccessorImpl(JExpression target) {
- acc = core.create(target);
- }
-
- public void unsetValues(JBlock body) {
- acc.unsetValues(body);
- }
-
- public JExpression hasSetValue() {
- return acc.hasSetValue();
- }
-
- public FieldOutline owner() {
- return ElementAdapter.this;
- }
-
- public CPropertyInfo getPropertyInfo() {
- return core.getPropertyInfo();
- }
-
- /**
- * Wraps a type value into a {@link JAXBElement}.
- */
- protected final JInvocation createJAXBElement(JExpression $var) {
- JCodeModel cm = codeModel();
-
- return JExpr._new(cm.ref(JAXBElement.class))
- .arg(JExpr._new(cm.ref(QName.class))
- .arg(ei.getElementName().getNamespaceURI())
- .arg(ei.getElementName().getLocalPart()))
- .arg(getRawType().boxify().erasure().dotclass())
- .arg($var);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementCollectionAdapter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementCollectionAdapter.java
deleted file mode 100644
index 1fa4bf13..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementCollectionAdapter.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api.impl.s2j;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.JAXBElement;
-
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JConditional;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JForEach;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import static com.sun.tools.internal.xjc.outline.Aspect.EXPOSED;
-import com.sun.tools.internal.xjc.outline.FieldAccessor;
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-
-/**
- * {@link ElementAdapter} that works with a collection
- * of {@link JAXBElement}.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ElementCollectionAdapter extends ElementAdapter {
- public ElementCollectionAdapter(FieldOutline core, CElementInfo ei) {
- super(core, ei);
- }
-
- public JType getRawType() {
- return codeModel().ref(List.class).narrow(itemType().boxify());
- }
-
- private JType itemType() {
- return ei.getContentInMemoryType().toType(outline(), EXPOSED);
- }
-
- public FieldAccessor create(JExpression targetObject) {
- return new FieldAccessorImpl(targetObject);
- }
-
- final class FieldAccessorImpl extends ElementAdapter.FieldAccessorImpl {
- public FieldAccessorImpl(JExpression target) {
- super(target);
- }
-
- public void toRawValue(JBlock block, JVar $var) {
- JCodeModel cm = outline().getCodeModel();
- JClass elementType = ei.toType(outline(),EXPOSED).boxify();
-
- // [RESULT]
- // $var = new ArrayList();
- // for( JAXBElement e : [core.toRawValue] ) {
- // if(e==null)
- // $var.add(null);
- // else
- // $var.add(e.getValue());
- // }
-
- block.assign($var,JExpr._new(cm.ref(ArrayList.class).narrow(itemType().boxify())));
- JVar $col = block.decl(core.getRawType(), "col" + hashCode());
- acc.toRawValue(block,$col);
- JForEach loop = block.forEach(elementType, "v" + hashCode()/*unique string handling*/, $col);
-
- JConditional cond = loop.body()._if(loop.var().eq(JExpr._null()));
- cond._then().invoke($var,"add").arg(JExpr._null());
- cond._else().invoke($var,"add").arg(loop.var().invoke("getValue"));
- }
-
- public void fromRawValue(JBlock block, String uniqueName, JExpression $var) {
- JCodeModel cm = outline().getCodeModel();
- JClass elementType = ei.toType(outline(),EXPOSED).boxify();
-
- // [RESULT]
- // $t = new ArrayList();
- // for( Type e : $var ) {
- // $var.add(new JAXBElement(e));
- // }
- // [core.fromRawValue]
-
- JClass col = cm.ref(ArrayList.class).narrow(elementType);
- JVar $t = block.decl(col,uniqueName+"_col",JExpr._new(col));
-
- JForEach loop = block.forEach(itemType(), uniqueName+"_i", $t);
- loop.body().invoke($var,"add").arg(createJAXBElement(loop.var()));
-
- acc.fromRawValue(block, uniqueName, $t);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementMappingImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementMappingImpl.java
deleted file mode 100644
index 7ca51efb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementMappingImpl.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api.impl.s2j;
-
-import java.util.List;
-
-import com.sun.tools.internal.xjc.api.Property;
-import com.sun.tools.internal.xjc.api.TypeAndAnnotation;
-import com.sun.tools.internal.xjc.model.CAdapter;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.model.CElementPropertyInfo;
-import com.sun.tools.internal.xjc.model.CTypeInfo;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.model.TypeUseFactory;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class ElementMappingImpl extends AbstractMappingImpl<CElementInfo> {
-
- private final TypeAndAnnotation taa;
-
- protected ElementMappingImpl(JAXBModelImpl parent, CElementInfo elementInfo) {
- super(parent,elementInfo);
-
- TypeUse t = clazz.getContentType();
- if(clazz.getProperty().isCollection())
- t = TypeUseFactory.makeCollection(t);
- CAdapter a = clazz.getProperty().getAdapter();
- if(a!=null)
- t = TypeUseFactory.adapt(t,a);
- taa = new TypeAndAnnotationImpl(parent.outline,t);
- }
-
- public TypeAndAnnotation getType() {
- return taa;
- }
-
- public final List<Property> calcDrilldown() {
- CElementPropertyInfo p = clazz.getProperty();
-
- if(p.getAdapter()!=null)
- return null; // if adapted, avoid drill down
-
- if(p.isCollection())
- // things like <xs:element name="foo" type="xs:NMTOKENS" /> is not eligible.
- return null;
-
- CTypeInfo typeClass = p.ref().get(0);
-
- if(!(typeClass instanceof CClassInfo))
- // things like <xs:element name="foo" type="xs:string" /> is not eligible.
- return null;
-
- CClassInfo ci = (CClassInfo)typeClass;
-
- // if the type is abstract we can't use it.
- if(ci.isAbstract())
- return null;
-
- // the 'all' compositor doesn't qualify
- if(!ci.isOrdered())
- return null;
-
- return buildDrilldown(ci);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementSingleAdapter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementSingleAdapter.java
deleted file mode 100644
index 31e73c3a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/ElementSingleAdapter.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api.impl.s2j;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JVar;
-import com.sun.codemodel.internal.JConditional;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JInvocation;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-import com.sun.tools.internal.xjc.outline.FieldAccessor;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-
-/**
- * {@link ElementAdapter} that works with a single {@link JAXBElement}.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ElementSingleAdapter extends ElementAdapter {
- public ElementSingleAdapter(FieldOutline core, CElementInfo ei) {
- super(core, ei);
- }
-
- public JType getRawType() {
- return ei.getContentInMemoryType().toType(outline(), Aspect.EXPOSED);
- }
-
- public FieldAccessor create(JExpression targetObject) {
- return new FieldAccessorImpl(targetObject);
- }
-
- final class FieldAccessorImpl extends ElementAdapter.FieldAccessorImpl {
- public FieldAccessorImpl(JExpression target) {
- super(target);
- }
-
- public void toRawValue(JBlock block, JVar $var) {
- // [RESULT]
- // if([core.hasSetValue])
- // $var = [core.toRawValue].getValue();
- // else
- // $var = null;
-
- JConditional cond = block._if(acc.hasSetValue());
- JVar $v = cond._then().decl(core.getRawType(), "v" + hashCode());// TODO: unique value control
- acc.toRawValue(cond._then(),$v);
- cond._then().assign($var,$v.invoke("getValue"));
- cond._else().assign($var, JExpr._null());
- }
-
- public void fromRawValue(JBlock block, String uniqueName, JExpression $var) {
- // [RESULT]
- // [core.fromRawValue](new JAXBElement(tagName, TYPE, $var));
-
- acc.fromRawValue(block,uniqueName, createJAXBElement($var));
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/JAXBModelImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/JAXBModelImpl.java
deleted file mode 100644
index f3317db8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/JAXBModelImpl.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api.impl.s2j;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JClass;
-import com.sun.tools.internal.xjc.Plugin;
-import com.sun.tools.internal.xjc.api.ErrorListener;
-import com.sun.tools.internal.xjc.api.JAXBModel;
-import com.sun.tools.internal.xjc.api.Mapping;
-import com.sun.tools.internal.xjc.api.S2JJAXBModel;
-import com.sun.tools.internal.xjc.api.TypeAndAnnotation;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.tools.internal.xjc.outline.PackageOutline;
-
-/**
- * {@link JAXBModel} implementation.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-final class JAXBModelImpl implements S2JJAXBModel {
- /*package*/ final Outline outline;
-
- /**
- * All the known classes.
- */
- private final Model model;
-
- private final Map<QName,Mapping> byXmlName = new HashMap<QName,Mapping>();
-
- JAXBModelImpl(Outline outline) {
- this.model = outline.getModel();
- this.outline = outline;
-
- for (CClassInfo ci : model.beans().values()) {
- if(!ci.isElement())
- continue;
- byXmlName.put(ci.getElementName(),new BeanMappingImpl(this,ci));
- }
- for (CElementInfo ei : model.getElementMappings(null).values()) {
- byXmlName.put(ei.getElementName(),new ElementMappingImpl(this,ei));
- }
- }
-
- public JCodeModel generateCode(Plugin[] extensions,ErrorListener errorListener) {
- // we no longer do any code generation
- return outline.getCodeModel();
- }
-
- public List<JClass> getAllObjectFactories() {
- List<JClass> r = new ArrayList<JClass>();
- for (PackageOutline pkg : outline.getAllPackageContexts()) {
- r.add(pkg.objectFactory());
- }
- return r;
- }
-
- public final Mapping get(QName elementName) {
- return byXmlName.get(elementName);
- }
-
- public final Collection<? extends Mapping> getMappings() {
- return byXmlName.values();
- }
-
- public TypeAndAnnotation getJavaType(QName xmlTypeName) {
- // TODO: primitive type handling?
- TypeUse use = model.typeUses().get(xmlTypeName);
- if(use==null) return null;
-
- return new TypeAndAnnotationImpl(outline,use);
- }
-
- public final List<String> getClassList() {
- List<String> classList = new ArrayList<String>();
-
- // list up root classes
- for( PackageOutline p : outline.getAllPackageContexts() )
- classList.add( p.objectFactory().fullName() );
- return classList;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/PropertyImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/PropertyImpl.java
deleted file mode 100644
index b9618c7c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/PropertyImpl.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api.impl.s2j;
-
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.api.Mapping;
-import com.sun.tools.internal.xjc.api.Property;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public /*for BSH*/ final class PropertyImpl implements Property {
- protected final FieldOutline fr;
- protected final QName elementName;
- protected final Mapping parent;
- protected final JCodeModel codeModel;
-
- PropertyImpl( Mapping parent, FieldOutline fr, QName elementName ) {
- this.parent = parent;
- this.fr = fr;
- this.elementName = elementName;
- this.codeModel = fr.getRawType().owner();
- }
-
- public final String name() {
- return fr.getPropertyInfo().getName(false);
- }
-
- /** Returns raw schema name for simpleType property. May return null for other types. */
- public final QName rawName() {
- if (fr instanceof ElementAdapter) {
- CElementInfo eInfo = ((ElementAdapter)fr).ei;
- if ((eInfo != null) && (eInfo.getProperty() != null)) {
- return eInfo.getProperty().getTypes().get(0).getTypeName();
- }
- }
- return null;
- }
-
- public final QName elementName() {
- return elementName;
- }
-
- public final JType type() {
- return fr.getRawType();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/SchemaCompilerImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/SchemaCompilerImpl.java
deleted file mode 100644
index accd3dac..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/SchemaCompilerImpl.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.xjc.api.impl.s2j;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import javax.xml.XMLConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.validation.SchemaFactory;
-
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.SAXParseException2;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.ModelLoader;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.api.ClassNameAllocator;
-import com.sun.tools.internal.xjc.api.ErrorListener;
-import com.sun.tools.internal.xjc.api.SchemaCompiler;
-import com.sun.tools.internal.xjc.api.SpecVersion;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.tools.internal.xjc.reader.internalizer.DOMForest;
-import com.sun.tools.internal.xjc.reader.internalizer.SCDBasedBindingSet;
-import com.sun.tools.internal.xjc.reader.xmlschema.parser.LSInputSAXWrapper;
-import com.sun.tools.internal.xjc.reader.xmlschema.parser.XMLSchemaInternalizationLogic;
-import com.sun.xml.internal.bind.unmarshaller.DOMScanner;
-import com.sun.xml.internal.bind.v2.util.XmlFactory;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.ls.LSInput;
-import org.w3c.dom.ls.LSResourceResolver;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.LocatorImpl;
-
-/**
- * {@link SchemaCompiler} implementation.
- *
- * This class builds a {@link DOMForest} until the {@link #bind()} method,
- * then this method does the rest of the hard work.
- *
- * @see ModelLoader
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class SchemaCompilerImpl extends ErrorReceiver implements SchemaCompiler {
-
- /**
- * User-specified error receiver.
- * This field can be null, in which case errors need to be discarded.
- */
- private ErrorListener errorListener;
-
- protected final Options opts = new Options();
-
- protected @NotNull DOMForest forest;
-
- /**
- * Set to true once an error is found.
- */
- private boolean hadError;
-
- public SchemaCompilerImpl() {
- opts.compatibilityMode = Options.EXTENSION;
- resetSchema();
-
- if(System.getProperty("xjc-api.test")!=null) {
- opts.debugMode = true;
- opts.verbose = true;
- }
- }
-
- @NotNull
- public Options getOptions() {
- return opts;
- }
-
- public ContentHandler getParserHandler( String systemId ) {
- return forest.getParserHandler(systemId,true);
- }
-
- public void parseSchema( String systemId, Element element ) {
- checkAbsoluteness(systemId);
- try {
- DOMScanner scanner = new DOMScanner();
-
- // use a locator that sets the system ID correctly
- // so that we can resolve relative URLs in most of the case.
- // it still doesn't handle xml:base and XInclude and all those things
- // correctly. There's just no way to make all those things work with DOM!
- LocatorImpl loc = new LocatorImpl();
- loc.setSystemId(systemId);
- scanner.setLocator(loc);
-
- scanner.setContentHandler(getParserHandler(systemId));
- scanner.scan(element);
- } catch (SAXException e) {
- // since parsing DOM shouldn't cause a SAX exception
- // and our handler will never throw it, it's not clear
- // if this will ever happen.
- fatalError(new SAXParseException2(
- e.getMessage(), null, systemId,-1,-1, e));
- }
- }
-
- public void parseSchema(InputSource source) {
- checkAbsoluteness(source.getSystemId());
- try {
- forest.parse(source,true);
- } catch (SAXException e) {
- // parsers are required to report an error to ErrorHandler,
- // so we should never see this error.
- e.printStackTrace();
- }
- }
-
- public void setTargetVersion(SpecVersion version) {
- if(version==null)
- version = SpecVersion.LATEST;
- opts.target = version;
- }
-
- public void parseSchema(String systemId, XMLStreamReader reader) throws XMLStreamException {
- checkAbsoluteness(systemId);
- forest.parse(systemId,reader,true);
- }
-
- /**
- * Checks if the system ID is absolute.
- */
- @SuppressWarnings("ResultOfObjectAllocationIgnored")
- private void checkAbsoluteness(String systemId) {
- // we need to be able to handle system IDs like "urn:foo", which java.net.URL can't process,
- // but OTOH we also need to be able to process system IDs like "file://a b c/def.xsd",
- // which java.net.URI can't process. So for now, let's fail only if both of them fail.
- // eventually we need a proper URI class that works for us.
- try {
- new URL(systemId);
- } catch( MalformedURLException mue) {
- try {
- new URI(systemId);
- } catch (URISyntaxException e ) {
- throw new IllegalArgumentException("system ID '"+systemId+"' isn't absolute",e);
- }
- }
- }
-
- public void setEntityResolver(EntityResolver entityResolver) {
- forest.setEntityResolver(entityResolver);
- opts.entityResolver = entityResolver;
- }
-
- public void setDefaultPackageName(String packageName) {
- opts.defaultPackage2 = packageName;
- }
-
- public void forcePackageName(String packageName) {
- opts.defaultPackage = packageName;
- }
-
- public void setClassNameAllocator(ClassNameAllocator allocator) {
- opts.classNameAllocator = allocator;
- }
-
- public void resetSchema() {
- forest = new DOMForest(new XMLSchemaInternalizationLogic(), opts);
- forest.setErrorHandler(this);
- forest.setEntityResolver(opts.entityResolver);
- }
-
- public JAXBModelImpl bind() {
- // this has been problematic. turn it off.
-// if(!forest.checkSchemaCorrectness(this))
-// return null;
-
- // parse all the binding files given via XJC -b options.
- // this also takes care of the binding files given in the -episode option.
- for (InputSource is : opts.getBindFiles())
- parseSchema(is);
-
- // internalization
- SCDBasedBindingSet scdBasedBindingSet = forest.transform(opts.isExtensionMode());
-
- if (!NO_CORRECTNESS_CHECK) {
- // correctness check
- SchemaFactory sf = XmlFactory.createSchemaFactory(XMLConstants.W3C_XML_SCHEMA_NS_URI, opts.disableXmlSecurity);
-
- // fix for https://jaxb.dev.java.net/issues/show_bug.cgi?id=795
- // taken from SchemaConstraintChecker, TODO XXX FIXME UGLY
- if (opts.entityResolver != null) {
- sf.setResourceResolver(new LSResourceResolver() {
- public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) {
- try {
- // XSOM passes the namespace URI to the publicID parameter.
- // we do the same here .
- InputSource is = opts.entityResolver.resolveEntity(namespaceURI, systemId);
- if (is == null) return null;
- return new LSInputSAXWrapper(is);
- } catch (SAXException e) {
- // TODO: is this sufficient?
- return null;
- } catch (IOException e) {
- // TODO: is this sufficient?
- return null;
- }
- }
- });
- }
-
- sf.setErrorHandler(new DowngradingErrorHandler(this));
- forest.weakSchemaCorrectnessCheck(sf);
- if (hadError)
- return null; // error in the correctness check. abort now
- }
-
- JCodeModel codeModel = new JCodeModel();
-
- ModelLoader gl = new ModelLoader(opts,codeModel,this);
- try {
- XSSchemaSet result = gl.createXSOM(forest, scdBasedBindingSet);
- if(result==null)
- return null;
-
- // we need info about each field, so we go ahead and generate the
- // skeleton at this point.
- // REVISIT: we should separate FieldRenderer and FieldAccessor
- // so that accessors can be used before we build the code.
- Model model = gl.annotateXMLSchema(result);
- if(model==null) return null;
-
- if(hadError) return null; // if we have any error by now, abort
-
- model.setPackageLevelAnnotations(opts.packageLevelAnnotations);
-
- Outline context = model.generateCode(opts,this);
- if(context==null) return null;
-
- if(hadError) return null;
-
- return new JAXBModelImpl(context);
- } catch( SAXException e ) {
- // since XSOM uses our parser that scans DOM,
- // no parser error is possible.
- // all the other errors will be directed to ErrorReceiver
- // before it's thrown, so when the exception is thrown
- // the error should have already been reported.
-
- // thus ignore.
- return null;
- }
- }
-
- public void setErrorListener(ErrorListener errorListener) {
- this.errorListener = errorListener;
- }
-
- public void info(SAXParseException exception) {
- if(errorListener!=null)
- errorListener.info(exception);
- }
- public void warning(SAXParseException exception) {
- if(errorListener!=null)
- errorListener.warning(exception);
- }
- public void error(SAXParseException exception) {
- hadError = true;
- if(errorListener!=null)
- errorListener.error(exception);
- }
- public void fatalError(SAXParseException exception) {
- hadError = true;
- if(errorListener!=null)
- errorListener.fatalError(exception);
- }
-
- /**
- * We use JAXP 1.3 to do a schema correctness check, but we know
- * it doesn't always work. So in case some people hit the problem,
- * this switch is here so that they can turn it off as a workaround.
- */
- private static boolean NO_CORRECTNESS_CHECK = false;
-
- static {
- try {
- NO_CORRECTNESS_CHECK = Boolean.getBoolean(SchemaCompilerImpl.class.getName()+".noCorrectnessCheck");
- } catch( Throwable t) {
- // ignore
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/TypeAndAnnotationImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/TypeAndAnnotationImpl.java
deleted file mode 100644
index c4140d26..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/TypeAndAnnotationImpl.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api.impl.s2j;
-
-import javax.xml.bind.annotation.XmlAttachmentRef;
-import javax.xml.bind.annotation.XmlList;
-
-import com.sun.codemodel.internal.JAnnotatable;
-import com.sun.codemodel.internal.JPrimitiveType;
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.api.TypeAndAnnotation;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlJavaTypeAdapterWriter;
-import com.sun.tools.internal.xjc.model.CAdapter;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import static com.sun.tools.internal.xjc.outline.Aspect.EXPOSED;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.xml.internal.bind.v2.runtime.SwaRefAdapterMarker;
-
-/**
- * {@link TypeAndAnnotation} implementation.
- *
- * @author Kohsuke Kawaguchi
- */
-final class TypeAndAnnotationImpl implements TypeAndAnnotation {
- private final TypeUse typeUse;
- private final Outline outline;
-
- public TypeAndAnnotationImpl(Outline outline, TypeUse typeUse) {
- this.typeUse = typeUse;
- this.outline = outline;
- }
-
- public JType getTypeClass() {
- CAdapter a = typeUse.getAdapterUse();
- NType nt;
- if(a!=null)
- nt = a.customType;
- else
- nt = typeUse.getInfo().getType();
-
- JType jt = nt.toType(outline,EXPOSED);
-
- JPrimitiveType prim = jt.boxify().getPrimitiveType();
- if(!typeUse.isCollection() && prim!=null)
- jt = prim;
-
- if(typeUse.isCollection())
- jt = jt.array();
-
- return jt;
- }
-
- public void annotate(JAnnotatable programElement) {
- if(typeUse.getAdapterUse()==null && !typeUse.isCollection())
- return; // nothing
-
- CAdapter adapterUse = typeUse.getAdapterUse();
- if(adapterUse!=null) {
- // ugly, ugly hack
- if(adapterUse.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
- programElement.annotate(XmlAttachmentRef.class);
- } else {
- // [RESULT]
- // @XmlJavaTypeAdapter( Foo.class )
- programElement.annotate2(XmlJavaTypeAdapterWriter.class).value(
- adapterUse.adapterType.toType(outline,EXPOSED));
- }
- }
- if(typeUse.isCollection())
- programElement.annotate(XmlList.class);
- }
-
- public String toString() {
- StringBuilder builder = new StringBuilder();
- // TODO: support annotations
- builder.append(getTypeClass());
- return builder.toString();
- }
-
- public boolean equals(Object o) {
- if (!(o instanceof TypeAndAnnotationImpl)) return false;
- TypeAndAnnotationImpl that = (TypeAndAnnotationImpl) o;
- return this.typeUse==that.typeUse;
- }
-
- public int hashCode() {
- return typeUse.hashCode();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/package.html b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/package.html
deleted file mode 100644
index 2733ae0b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/s2j/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
-implementation of the XJC API for schema to java.
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/package.html b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/package.html
deleted file mode 100644
index bc3faca7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/package.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
-API for programmatic invocation of XJC and schemagen.
-
-<p>
-This package provides a way to invoke XJC from within another program.
-The primary target of this API is the JAX-WS RI, but we hope that
-this API would be useful for other integration purposes as well.
-
-<h2>Getting Started: Using XJC</h2>
-<p>
-To invoke XJC, a typical client would do something like this:
-<pre>
- SchemaCompiler sc = XJC.createSchemaCompiler();
- sc.parseSchema(new InputSource(schema1Url.toExternalForm()));
- sc.parseSchema(new InputSource(schema2Url.toExternalForm()));
- ...
- S2JModel model = sc.bind();
-</pre>
-<p>
-The bind operation causes XJC to do the bulk of the work, such as
-figuring out what classes to generate, what methods/fields to generate, etc.
-The obtained model contains useful introspective information about
-how the binding was performed (such as the mapping between XML types
-and generated Java classes)
-
-<p>
-Once the model is obtained, generate the code into the file system as follows:
-<pre>
- JCodeModel cm = model.generateCode( null, ... );
- cm.build(new FileCodeWriter(outputDir));
-</pre>
-
-
-<h2>Implementation Note</h2>
-<p>
-This package shouldn't contain any implementation code.
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/ApClassLoader.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/ApClassLoader.java
deleted file mode 100644
index 16bbf0c0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/ApClassLoader.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api.util;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.File;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.net.MalformedURLException;
-
-import com.sun.istack.internal.Nullable;
-
-/**
- * {@link ClassLoader} that loads Annotation Processing and specified classes
- * both into the same classloader, so that they can reference each other.
- *
- * @author Bhakti Mehta
- * @since 2.0 beta
- */
-public final class ApClassLoader extends URLClassLoader {
- /**
- * List of package prefixes we want to mask the
- * parent classLoader from loading
- */
- private final String[] packagePrefixes;
-
- /**
- *
- * @param packagePrefixes
- * The package prefixes that are forced to resolve within this class loader.
- * @param parent
- * The parent class loader to delegate to. Null to indicate bootstrap classloader.
- */
- public ApClassLoader(@Nullable ClassLoader parent, String[] packagePrefixes) throws ToolsJarNotFoundException {
- super(getToolsJar(parent),parent);
- if(getURLs().length==0)
- // if tools.jar was found in our classloader, no need to create
- // a parallel classes
- this.packagePrefixes = new String[0];
- else
- this.packagePrefixes = packagePrefixes;
- }
-
- public Class loadClass(String className) throws ClassNotFoundException {
- for( String prefix : packagePrefixes ) {
- if (className.startsWith(prefix) ) {
- // we need to load those classes in this class loader
- // without delegation.
- return findClass(className);
- }
- }
-
- return super.loadClass(className);
-
- }
-
- protected Class findClass(String name) throws ClassNotFoundException {
-
- StringBuilder sb = new StringBuilder(name.length() + 6);
- sb.append(name.replace('.','/')).append(".class");
-
- InputStream is = getResourceAsStream(sb.toString());
- if (is==null)
- throw new ClassNotFoundException("Class not found" + sb);
-
- try {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- byte[] buf = new byte[1024];
- int len;
- while((len=is.read(buf))>=0)
- baos.write(buf,0,len);
-
- buf = baos.toByteArray();
-
- // define package if not defined yet
- int i = name.lastIndexOf('.');
- if (i != -1) {
- String pkgname = name.substring(0, i);
- Package pkg = getPackage(pkgname);
- if(pkg==null)
- definePackage(pkgname, null, null, null, null, null, null, null);
- }
-
- return defineClass(name,buf,0,buf.length);
- } catch (IOException e) {
- throw new ClassNotFoundException(name,e);
- } finally {
- try {
- is.close();
- } catch (IOException ioe) {
- //ignore
- }
- }
- }
-
- /**
- * Returns a class loader that can load classes from JDK tools.jar.
- * @param parent
- */
- private static URL[] getToolsJar(@Nullable ClassLoader parent) throws ToolsJarNotFoundException {
-
- try {
- Class.forName("com.sun.tools.javac.Main", false, parent);
- return new URL[0];
- // we can already load them in the parent class loader.
- // so no need to look for tools.jar.
- // this happens when we are run inside IDE/Ant, or
- // in Mac OS.
- } catch (ClassNotFoundException e) {
- // otherwise try to find tools.jar
- }
-
- File jreHome = new File(System.getProperty("java.home"));
- File toolsJar = new File( jreHome.getParent(), "lib/tools.jar" );
-
- if (!toolsJar.exists()) {
- throw new ToolsJarNotFoundException(toolsJar);
- }
-
- try {
- return new URL[]{toolsJar.toURL()};
- } catch (MalformedURLException e) {
- // impossible
- throw new AssertionError(e);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/FilerCodeWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/FilerCodeWriter.java
deleted file mode 100644
index f4ed46cc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/FilerCodeWriter.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api.util;
-
-import javax.tools.StandardLocation;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Writer;
-
-import com.sun.codemodel.internal.CodeWriter;
-import com.sun.codemodel.internal.JPackage;
-import javax.annotation.processing.Filer;
-
-import static javax.tools.StandardLocation.CLASS_PATH;
-import static javax.tools.StandardLocation.SOURCE_PATH;
-
-/**
- * {@link CodeWriter} that generates source code to {@link Filer}.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class FilerCodeWriter extends CodeWriter {
-
- private final Filer filer;
-
- public FilerCodeWriter(Filer filer) {
- this.filer = filer;
- }
-
- public OutputStream openBinary(JPackage pkg, String fileName) throws IOException {
- StandardLocation loc;
- if(fileName.endsWith(".java")) {
- // Annotation Processing doesn't do the proper Unicode escaping on Java source files,
- // so we can't rely on Filer.createSourceFile.
- loc = SOURCE_PATH;
- } else {
- // put non-Java files directly to the output folder
- loc = CLASS_PATH;
- }
- return filer.createResource(loc, pkg.name(), fileName).openOutputStream();
- }
-
- public Writer openSource(JPackage pkg, String fileName) throws IOException {
- String name;
- if(pkg.isUnnamed())
- name = fileName;
- else
- name = pkg.name()+'.'+fileName;
-
- name = name.substring(0,name.length()-5); // strip ".java"
-
- return filer.createSourceFile(name).openWriter();
- }
-
- public void close() {
- ; // noop
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages.java
deleted file mode 100644
index d52668f4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api.util;
-
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Message resources
- */
-enum Messages {
- TOOLS_JAR_NOT_FOUND, // 1 arg
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
-
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages.properties
deleted file mode 100644
index f35ba6d9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TOOLS_JAR_NOT_FOUND = \
- JDK''s tools.jar was not found in {0}. Usually this means you are running JRE, not JDK. Please use the java command in JDK 5.0 or later (not JRE.)
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_de.properties
deleted file mode 100644
index 3a8e6240..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_de.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TOOLS_JAR_NOT_FOUND = Die tools.jar von JDK wurde in {0} nicht gefunden. Im Allgemeinen bedeutet dies, dass Sie JRE und nicht JDK ausf\u00FChren. Verwenden Sie den java-Befehl in JDK 5.0 oder h\u00F6her (nicht JRE.)
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_es.properties
deleted file mode 100644
index 927e2dea..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_es.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TOOLS_JAR_NOT_FOUND = No se ha encontrado el archivo tools.jar de JDK en {0}. Normalmente, esto significa que est\u00E1 ejecutando JRE, no JDK. Utilice el comando java en JDK 5.0 o posterior (no JRE).
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_fr.properties
deleted file mode 100644
index 2d823849..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_fr.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TOOLS_JAR_NOT_FOUND = Le fichier tools.jar de JDK est introuvable dans {0}. G\u00E9n\u00E9ralement, cela signifie que vous ex\u00E9cutez JRE, et non JDK. Utilisez la commande Java dans JDK version 5.0 ou sup\u00E9rieure (et non JRE).
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_it.properties
deleted file mode 100644
index 20480a17..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_it.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TOOLS_JAR_NOT_FOUND = tools.jar di JDK non trovato in {0}. In genere ci\u00F2 significa che si sta eseguendo JRE e non JDK. Usare il comando java JDK 5.0 o versione successiva (non JRE).
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_ja.properties
deleted file mode 100644
index e9553ffe..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_ja.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TOOLS_JAR_NOT_FOUND = JDK\u306Etools.jar\u304C{0}\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u901A\u5E38\u3001\u3053\u308C\u306FJDK\u3067\u306F\u306A\u304FJRE\u3092\u5B9F\u884C\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u610F\u5473\u3057\u307E\u3059\u3002(JRE\u3067\u306F\u306A\u304F)JDK 5.0\u4EE5\u4E0A\u306Ejava\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_ko.properties
deleted file mode 100644
index fa87567a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_ko.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TOOLS_JAR_NOT_FOUND = JDK\uC758 tools.jar\uC744 {0}\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC77C\uBC18\uC801\uC73C\uB85C JDK\uAC00 \uC544\uB2CC JRE\uB97C \uC2E4\uD589 \uC911\uC778 \uACBD\uC6B0 \uC774 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD569\uB2C8\uB2E4. JRE\uAC00 \uC544\uB2CC JDK 5.0 \uB610\uB294 \uC774\uD6C4 \uBC84\uC804\uC5D0\uC11C java \uBA85\uB839\uC744 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_pt_BR.properties
deleted file mode 100644
index 11d675d0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_pt_BR.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TOOLS_JAR_NOT_FOUND = tools.jar de JDK n\u00E3o foi encontrado em {0}. Geralmente, isso significa que voc\u00EA est\u00E1 executando JRE, n\u00E3o JDK. Use o comando java no JDK 5.0 ou posterior (n\u00E3o JRE).
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_zh_CN.properties
deleted file mode 100644
index 1ae29b83..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_zh_CN.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TOOLS_JAR_NOT_FOUND = \u5728{0}\u4E2D\u672A\u627E\u5230 JDK \u7684 tools.jar\u3002\u901A\u5E38\u8FD9\u610F\u5473\u7740\u60A8\u8FD0\u884C\u7684\u662F JRE, \u800C\u4E0D\u662F JDK\u3002\u8BF7\u5728 JDK 5.0 \u6216\u66F4\u9AD8\u7248\u672C (\u800C\u4E0D\u662F JRE) \u4E2D\u4F7F\u7528 java \u547D\u4EE4\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_zh_TW.properties
deleted file mode 100644
index 232f2e02..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_zh_TW.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TOOLS_JAR_NOT_FOUND = \u5728 {0} \u4E2D\u627E\u4E0D\u5230 JDK \u7684 tools.jar. \u9019\u901A\u5E38\u8868\u793A\u60A8\u6240\u57F7\u884C\u7684\u662F JRE, \u800C\u975E JDK. \u8ACB\u4F7F\u7528 JDK 5.0 \u6216\u66F4\u65B0\u7248\u672C (\u975E JRE) \u4E2D\u7684 Java \u547D\u4EE4.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/ToolsJarNotFoundException.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/ToolsJarNotFoundException.java
deleted file mode 100644
index a1c4a307..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/ToolsJarNotFoundException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.api.util;
-
-import java.io.File;
-
-/**
- * Signals an error when tools.jar was not found.
- *
- * Simply print out the message obtained by {@link #getMessage()}.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class ToolsJarNotFoundException extends Exception {
- /**
- * Location where we expected to find tools.jar
- */
- public final File toolsJar;
-
- public ToolsJarNotFoundException(File toolsJar) {
- super(calcMessage(toolsJar));
- this.toolsJar = toolsJar;
- }
-
- private static String calcMessage(File toolsJar) {
- return Messages.TOOLS_JAR_NOT_FOUND.format(toolsJar.getPath());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/package.html b/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/package.html
deleted file mode 100644
index e1bedd82..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
- Utility code shared between JAXB and JAX-WS
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAccessorOrderWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAccessorOrderWriter.java
deleted file mode 100644
index e5e8ecb8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAccessorOrderWriter.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlAccessOrder;
-import javax.xml.bind.annotation.XmlAccessorOrder;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlAccessorOrderWriter
- extends JAnnotationWriter<XmlAccessorOrder>
-{
-
-
- XmlAccessorOrderWriter value(XmlAccessOrder value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAccessorTypeWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAccessorTypeWriter.java
deleted file mode 100644
index ae7c008d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAccessorTypeWriter.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlAccessorTypeWriter
- extends JAnnotationWriter<XmlAccessorType>
-{
-
-
- XmlAccessorTypeWriter value(XmlAccessType value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAnyAttributeWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAnyAttributeWriter.java
deleted file mode 100644
index 22d5b3d6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAnyAttributeWriter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlAnyAttributeWriter
- extends JAnnotationWriter<XmlAnyAttribute>
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAnyElementWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAnyElementWriter.java
deleted file mode 100644
index 139a665d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAnyElementWriter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlAnyElement;
-import com.sun.codemodel.internal.JAnnotationWriter;
-import com.sun.codemodel.internal.JType;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlAnyElementWriter
- extends JAnnotationWriter<XmlAnyElement>
-{
-
-
- XmlAnyElementWriter value(Class value);
-
- XmlAnyElementWriter value(JType value);
-
- XmlAnyElementWriter lax(boolean value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAttachmentRefWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAttachmentRefWriter.java
deleted file mode 100644
index b9c8db48..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAttachmentRefWriter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlAttachmentRef;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlAttachmentRefWriter
- extends JAnnotationWriter<XmlAttachmentRef>
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAttributeWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAttributeWriter.java
deleted file mode 100644
index fc32e7b8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlAttributeWriter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlAttributeWriter
- extends JAnnotationWriter<XmlAttribute>
-{
-
-
- XmlAttributeWriter name(String value);
-
- XmlAttributeWriter namespace(String value);
-
- XmlAttributeWriter required(boolean value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementDeclWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementDeclWriter.java
deleted file mode 100644
index 91981dfc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementDeclWriter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlElementDecl;
-import com.sun.codemodel.internal.JAnnotationWriter;
-import com.sun.codemodel.internal.JType;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlElementDeclWriter
- extends JAnnotationWriter<XmlElementDecl>
-{
-
-
- XmlElementDeclWriter name(String value);
-
- XmlElementDeclWriter scope(Class value);
-
- XmlElementDeclWriter scope(JType value);
-
- XmlElementDeclWriter namespace(String value);
-
- XmlElementDeclWriter defaultValue(String value);
-
- XmlElementDeclWriter substitutionHeadNamespace(String value);
-
- XmlElementDeclWriter substitutionHeadName(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementRefWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementRefWriter.java
deleted file mode 100644
index ebd9f434..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementRefWriter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlElementRef;
-import com.sun.codemodel.internal.JAnnotationWriter;
-import com.sun.codemodel.internal.JType;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlElementRefWriter
- extends JAnnotationWriter<XmlElementRef>
-{
-
-
- XmlElementRefWriter name(String value);
-
- XmlElementRefWriter type(Class value);
-
- XmlElementRefWriter type(JType value);
-
- XmlElementRefWriter namespace(String value);
-
- XmlElementRefWriter required(boolean value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementRefsWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementRefsWriter.java
deleted file mode 100644
index a7276b00..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementRefsWriter.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlElementRefs;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlElementRefsWriter
- extends JAnnotationWriter<XmlElementRefs>
-{
-
-
- XmlElementRefWriter value();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementWrapperWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementWrapperWriter.java
deleted file mode 100644
index bd604e3c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementWrapperWriter.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlElementWrapper;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlElementWrapperWriter
- extends JAnnotationWriter<XmlElementWrapper>
-{
-
-
- XmlElementWrapperWriter name(String value);
-
- XmlElementWrapperWriter namespace(String value);
-
- XmlElementWrapperWriter required(boolean value);
-
- XmlElementWrapperWriter nillable(boolean value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementWriter.java
deleted file mode 100644
index f78d0c8e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementWriter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlElement;
-import com.sun.codemodel.internal.JAnnotationWriter;
-import com.sun.codemodel.internal.JType;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlElementWriter
- extends JAnnotationWriter<XmlElement>
-{
-
-
- XmlElementWriter name(String value);
-
- XmlElementWriter type(Class value);
-
- XmlElementWriter type(JType value);
-
- XmlElementWriter namespace(String value);
-
- XmlElementWriter defaultValue(String value);
-
- XmlElementWriter required(boolean value);
-
- XmlElementWriter nillable(boolean value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementsWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementsWriter.java
deleted file mode 100644
index d7e165bc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlElementsWriter.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlElements;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlElementsWriter
- extends JAnnotationWriter<XmlElements>
-{
-
-
- XmlElementWriter value();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlEnumValueWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlEnumValueWriter.java
deleted file mode 100644
index 5f22405a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlEnumValueWriter.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlEnumValue;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlEnumValueWriter
- extends JAnnotationWriter<XmlEnumValue>
-{
-
-
- XmlEnumValueWriter value(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlEnumWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlEnumWriter.java
deleted file mode 100644
index 814110e3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlEnumWriter.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlEnum;
-import com.sun.codemodel.internal.JAnnotationWriter;
-import com.sun.codemodel.internal.JType;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlEnumWriter
- extends JAnnotationWriter<XmlEnum>
-{
-
-
- XmlEnumWriter value(Class value);
-
- XmlEnumWriter value(JType value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlIDREFWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlIDREFWriter.java
deleted file mode 100644
index 213d0b8b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlIDREFWriter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlIDREF;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlIDREFWriter
- extends JAnnotationWriter<XmlIDREF>
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlIDWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlIDWriter.java
deleted file mode 100644
index e6a0a74a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlIDWriter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlID;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlIDWriter
- extends JAnnotationWriter<XmlID>
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlInlineBinaryDataWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlInlineBinaryDataWriter.java
deleted file mode 100644
index d82eee23..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlInlineBinaryDataWriter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlInlineBinaryData;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlInlineBinaryDataWriter
- extends JAnnotationWriter<XmlInlineBinaryData>
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlJavaTypeAdapterWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlJavaTypeAdapterWriter.java
deleted file mode 100644
index f7495457..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlJavaTypeAdapterWriter.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import com.sun.codemodel.internal.JAnnotationWriter;
-import com.sun.codemodel.internal.JType;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlJavaTypeAdapterWriter
- extends JAnnotationWriter<XmlJavaTypeAdapter>
-{
-
-
- XmlJavaTypeAdapterWriter type(Class value);
-
- XmlJavaTypeAdapterWriter type(JType value);
-
- XmlJavaTypeAdapterWriter value(Class value);
-
- XmlJavaTypeAdapterWriter value(JType value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlListWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlListWriter.java
deleted file mode 100644
index 5444bd85..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlListWriter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlList;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlListWriter
- extends JAnnotationWriter<XmlList>
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlMimeTypeWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlMimeTypeWriter.java
deleted file mode 100644
index 2bf6dbba..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlMimeTypeWriter.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlMimeType;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlMimeTypeWriter
- extends JAnnotationWriter<XmlMimeType>
-{
-
-
- XmlMimeTypeWriter value(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlMixedWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlMixedWriter.java
deleted file mode 100644
index 9fb7ab24..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlMixedWriter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlMixed;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlMixedWriter
- extends JAnnotationWriter<XmlMixed>
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlNsWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlNsWriter.java
deleted file mode 100644
index e8d33c4b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlNsWriter.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlNs;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlNsWriter
- extends JAnnotationWriter<XmlNs>
-{
-
-
- XmlNsWriter prefix(String value);
-
- XmlNsWriter namespaceURI(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlRegistryWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlRegistryWriter.java
deleted file mode 100644
index b964e91a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlRegistryWriter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlRegistry;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlRegistryWriter
- extends JAnnotationWriter<XmlRegistry>
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlRootElementWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlRootElementWriter.java
deleted file mode 100644
index 1071c904..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlRootElementWriter.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlRootElementWriter
- extends JAnnotationWriter<XmlRootElement>
-{
-
-
- XmlRootElementWriter name(String value);
-
- XmlRootElementWriter namespace(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaTypeWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaTypeWriter.java
deleted file mode 100644
index 7601f031..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaTypeWriter.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlSchemaType;
-import com.sun.codemodel.internal.JAnnotationWriter;
-import com.sun.codemodel.internal.JType;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlSchemaTypeWriter
- extends JAnnotationWriter<XmlSchemaType>
-{
-
-
- XmlSchemaTypeWriter name(String value);
-
- XmlSchemaTypeWriter type(Class value);
-
- XmlSchemaTypeWriter type(JType value);
-
- XmlSchemaTypeWriter namespace(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaTypesWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaTypesWriter.java
deleted file mode 100644
index 2f0957ea..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaTypesWriter.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlSchemaTypes;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlSchemaTypesWriter
- extends JAnnotationWriter<XmlSchemaTypes>
-{
-
-
- XmlSchemaTypeWriter value();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaWriter.java
deleted file mode 100644
index 05849e65..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSchemaWriter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlSchema;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlSchemaWriter
- extends JAnnotationWriter<XmlSchema>
-{
-
-
- XmlSchemaWriter location(String value);
-
- XmlSchemaWriter namespace(String value);
-
- XmlNsWriter xmlns();
-
- XmlSchemaWriter elementFormDefault(XmlNsForm value);
-
- XmlSchemaWriter attributeFormDefault(XmlNsForm value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSeeAlsoWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSeeAlsoWriter.java
deleted file mode 100644
index 6b203799..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlSeeAlsoWriter.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlSeeAlso;
-import com.sun.codemodel.internal.JAnnotationWriter;
-import com.sun.codemodel.internal.JType;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlSeeAlsoWriter
- extends JAnnotationWriter<XmlSeeAlso>
-{
-
-
- XmlSeeAlsoWriter value(Class value);
-
- XmlSeeAlsoWriter value(JType value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlTransientWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlTransientWriter.java
deleted file mode 100644
index 61bfb4dd..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlTransientWriter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlTransient;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlTransientWriter
- extends JAnnotationWriter<XmlTransient>
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlTypeWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlTypeWriter.java
deleted file mode 100644
index 05172dbd..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlTypeWriter.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlType;
-import com.sun.codemodel.internal.JAnnotationWriter;
-import com.sun.codemodel.internal.JType;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlTypeWriter
- extends JAnnotationWriter<XmlType>
-{
-
-
- XmlTypeWriter name(String value);
-
- XmlTypeWriter namespace(String value);
-
- XmlTypeWriter propOrder(String value);
-
- XmlTypeWriter factoryClass(Class value);
-
- XmlTypeWriter factoryClass(JType value);
-
- XmlTypeWriter factoryMethod(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlValueWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlValueWriter.java
deleted file mode 100644
index 308b93c6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/spec/XmlValueWriter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.annotation.spec;
-
-import javax.xml.bind.annotation.XmlValue;
-import com.sun.codemodel.internal.JAnnotationWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface XmlValueWriter
- extends JAnnotationWriter<XmlValue>
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/BeanGenerator.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/BeanGenerator.java
deleted file mode 100644
index 79105d6f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/BeanGenerator.java
+++ /dev/null
@@ -1,834 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean;
-
-import static com.sun.tools.internal.xjc.outline.Aspect.EXPOSED;
-
-import java.io.Serializable;
-import java.net.URL;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.annotation.XmlAttachmentRef;
-import javax.xml.bind.annotation.XmlID;
-import javax.xml.bind.annotation.XmlIDREF;
-import javax.xml.bind.annotation.XmlMimeType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.ClassType;
-import com.sun.codemodel.internal.JAnnotatable;
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JClassAlreadyExistsException;
-import com.sun.codemodel.internal.JClassContainer;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JEnumConstant;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JFieldVar;
-import com.sun.codemodel.internal.JForEach;
-import com.sun.codemodel.internal.JInvocation;
-import com.sun.codemodel.internal.JJavaName;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.codemodel.internal.fmt.JStaticJavaFile;
-import com.sun.tools.internal.xjc.AbortException;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.api.SpecVersion;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlAnyAttributeWriter;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlEnumValueWriter;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlEnumWriter;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlJavaTypeAdapterWriter;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlMimeTypeWriter;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlRootElementWriter;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlSeeAlsoWriter;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlTypeWriter;
-import com.sun.tools.internal.xjc.generator.bean.field.FieldRenderer;
-import com.sun.tools.internal.xjc.model.CAdapter;
-import com.sun.tools.internal.xjc.model.CAttributePropertyInfo;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CClassInfoParent;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.model.CEnumConstant;
-import com.sun.tools.internal.xjc.model.CEnumLeafInfo;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.CTypeRef;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.model.CClassRef;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.ClassOutline;
-import com.sun.tools.internal.xjc.outline.EnumConstantOutline;
-import com.sun.tools.internal.xjc.outline.EnumOutline;
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.tools.internal.xjc.outline.PackageOutline;
-import com.sun.tools.internal.xjc.util.CodeModelClassFactory;
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.SwaRefAdapterMarker;
-import com.sun.xml.internal.xsom.XmlString;
-import com.sun.istack.internal.NotNull;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-
-/**
- * Generates fields and accessors.
- */
-public final class BeanGenerator implements Outline {
-
- /** Simplifies class/interface creation and collision detection. */
- private final CodeModelClassFactory codeModelClassFactory;
- private final ErrorReceiver errorReceiver;
- /** all {@link PackageOutline}s keyed by their {@link PackageOutline#_package}. */
- private final Map<JPackage, PackageOutlineImpl> packageContexts = new LinkedHashMap<JPackage, PackageOutlineImpl>();
- /** all {@link ClassOutline}s keyed by their {@link ClassOutline#target}. */
- private final Map<CClassInfo, ClassOutlineImpl> classes = new LinkedHashMap<CClassInfo, ClassOutlineImpl>();
- /** all {@link EnumOutline}s keyed by their {@link EnumOutline#target}. */
- private final Map<CEnumLeafInfo, EnumOutline> enums = new LinkedHashMap<CEnumLeafInfo, EnumOutline>();
- /**
- * Generated runtime classes.
- */
- private final Map<Class, JClass> generatedRuntime = new LinkedHashMap<Class, JClass>();
- /** the model object which we are processing. */
- private final Model model;
- private final JCodeModel codeModel;
- /**
- * for each property, the information about the generated field.
- */
- private final Map<CPropertyInfo, FieldOutline> fields = new LinkedHashMap<CPropertyInfo, FieldOutline>();
- /**
- * elements that generate classes to the generated classes.
- */
- /*package*/ final Map<CElementInfo, ElementOutlineImpl> elements = new LinkedHashMap<CElementInfo, ElementOutlineImpl>();
-
- /**
- * Generates beans into code model according to the BGM,
- * and produces the reflection model.
- *
- * @param _errorReceiver
- * This object will receive all the errors discovered
- * during the back-end stage.
- *
- * @return
- * returns a {@link Outline} which will in turn
- * be used to further generate marshaller/unmarshaller,
- * or null if the processing fails (errors should have been
- * reported to the error recevier.)
- */
- public static Outline generate(Model model, ErrorReceiver _errorReceiver) {
-
- try {
- return new BeanGenerator(model, _errorReceiver);
- } catch (AbortException e) {
- return null;
- }
- }
-
- private BeanGenerator(Model _model, ErrorReceiver _errorReceiver) {
-
- this.model = _model;
- this.codeModel = model.codeModel;
- this.errorReceiver = _errorReceiver;
- this.codeModelClassFactory = new CodeModelClassFactory(errorReceiver);
-
- // build enum classes
- for (CEnumLeafInfo p : model.enums().values()) {
- enums.put(p, generateEnumDef(p));
- }
-
- JPackage[] packages = getUsedPackages(EXPOSED);
-
- // generates per-package code and remember the results as contexts.
- for (JPackage pkg : packages) {
- getPackageContext(pkg);
- }
-
- // create the class definitions for all the beans first.
- // this should also fill in PackageContext#getClasses
- for (CClassInfo bean : model.beans().values()) {
- getClazz(bean);
- }
-
- // compute the package-level setting
- for (PackageOutlineImpl p : packageContexts.values()) {
- p.calcDefaultValues();
- }
-
- JClass OBJECT = codeModel.ref(Object.class);
-
- // inheritance relationship needs to be set before we generate fields, or otherwise
- // we'll fail to compute the correct type signature (namely the common base type computation)
- for (ClassOutlineImpl cc : getClasses()) {
-
- // setup inheritance between implementation hierarchy.
- CClassInfo superClass = cc.target.getBaseClass();
- if (superClass != null) {
- // use the specified super class
- model.strategy._extends(cc, getClazz(superClass));
- } else {
- CClassRef refSuperClass = cc.target.getRefBaseClass();
- if (refSuperClass != null) {
- cc.implClass._extends(refSuperClass.toType(this, EXPOSED));
- } else {
- // use the default one, if any
- if (model.rootClass != null && cc.implClass._extends().equals(OBJECT)) {
- cc.implClass._extends(model.rootClass);
- }
- if (model.rootInterface != null) {
- cc.ref._implements(model.rootInterface);
- }
- }
- }
-
- // if serialization support is turned on, generate
- // [RESULT]
- // class ... implements Serializable {
- // private static final long serialVersionUID = <id>;
- // ....
- // }
- if (model.serializable) {
- cc.implClass._implements(Serializable.class);
- if (model.serialVersionUID != null) {
- cc.implClass.field(
- JMod.PRIVATE | JMod.STATIC | JMod.FINAL,
- codeModel.LONG,
- "serialVersionUID",
- JExpr.lit(model.serialVersionUID));
- }
- }
-
- CClassInfoParent base = cc.target.parent();
- if ((base != null) && (base instanceof CClassInfo)) {
- String pkg = base.getOwnerPackage().name();
- String shortName = base.fullName().substring(base.fullName().indexOf(pkg)+pkg.length()+1);
- if (cc.target.shortName.equals(shortName)) {
- getErrorReceiver().error(cc.target.getLocator(), Messages.ERR_KEYNAME_COLLISION.format(shortName));
- }
- }
-
- }
-
- // fill in implementation classes
- for (ClassOutlineImpl co : getClasses()) {
- generateClassBody(co);
- }
-
- for (EnumOutline eo : enums.values()) {
- generateEnumBody(eo);
- }
-
- // create factories for the impl-less elements
- for (CElementInfo ei : model.getAllElements()) {
- getPackageContext(ei._package()).objectFactoryGenerator().populate(ei);
- }
-
- if (model.options.debugMode) {
- generateClassList();
- }
- }
-
- /**
- * Generates a class that knows how to create an instance of JAXBContext
- *
- * <p>
- * This is used in the debug mode so that a new properly configured
- * {@link JAXBContext} object can be used.
- */
- @SuppressWarnings("CallToThreadDumpStack")
- private void generateClassList() {
- try {
- JDefinedClass jc = codeModel.rootPackage()._class("JAXBDebug");
- JMethod m = jc.method(JMod.PUBLIC | JMod.STATIC, JAXBContext.class, "createContext");
- JVar $classLoader = m.param(ClassLoader.class, "classLoader");
- m._throws(JAXBException.class);
- JInvocation inv = codeModel.ref(JAXBContext.class).staticInvoke("newInstance");
- m.body()._return(inv);
-
- switch (model.strategy) {
- case INTF_AND_IMPL: {
- StringBuilder buf = new StringBuilder();
- for (PackageOutlineImpl po : packageContexts.values()) {
- if (buf.length() > 0) {
- buf.append(':');
- }
- buf.append(po._package().name());
- }
- inv.arg(buf.toString()).arg($classLoader);
- break;
- }
- case BEAN_ONLY:
- for (ClassOutlineImpl cc : getClasses()) {
- inv.arg(cc.implRef.dotclass());
- }
- for (PackageOutlineImpl po : packageContexts.values()) {
- inv.arg(po.objectFactory().dotclass());
- }
- break;
- default:
- throw new IllegalStateException();
- }
- } catch (JClassAlreadyExistsException e) {
- e.printStackTrace();
- // after all, we are in the debug mode. a little sloppiness is OK.
- // this error is not fatal. just continue.
- }
- }
-
- public Model getModel() {
- return model;
- }
-
- public JCodeModel getCodeModel() {
- return codeModel;
- }
-
- public JClassContainer getContainer(CClassInfoParent parent, Aspect aspect) {
- CClassInfoParent.Visitor<JClassContainer> v;
- switch (aspect) {
- case EXPOSED:
- v = exposedContainerBuilder;
- break;
- case IMPLEMENTATION:
- v = implContainerBuilder;
- break;
- default:
- assert false;
- throw new IllegalStateException();
- }
- return parent.accept(v);
- }
-
- public final JType resolve(CTypeRef ref, Aspect a) {
- return ref.getTarget().getType().toType(this, a);
- }
- private final CClassInfoParent.Visitor<JClassContainer> exposedContainerBuilder =
- new CClassInfoParent.Visitor<JClassContainer>() {
-
- public JClassContainer onBean(CClassInfo bean) {
- return getClazz(bean).ref;
- }
-
- public JClassContainer onElement(CElementInfo element) {
- // hmm...
- return getElement(element).implClass;
- }
-
- public JClassContainer onPackage(JPackage pkg) {
- return model.strategy.getPackage(pkg, EXPOSED);
- }
- };
- private final CClassInfoParent.Visitor<JClassContainer> implContainerBuilder =
- new CClassInfoParent.Visitor<JClassContainer>() {
-
- public JClassContainer onBean(CClassInfo bean) {
- return getClazz(bean).implClass;
- }
-
- public JClassContainer onElement(CElementInfo element) {
- return getElement(element).implClass;
- }
-
- public JClassContainer onPackage(JPackage pkg) {
- return model.strategy.getPackage(pkg, Aspect.IMPLEMENTATION);
- }
- };
-
- /**
- * Returns all <i>used</i> JPackages.
- *
- * A JPackage is considered as "used" if a ClassItem or
- * a InterfaceItem resides in that package.
- *
- * This value is dynamically calculated every time because
- * one can freely remove ClassItem/InterfaceItem.
- *
- * @return
- * Given the same input, the order of packages in the array
- * is always the same regardless of the environment.
- */
- public final JPackage[] getUsedPackages(Aspect aspect) {
- Set<JPackage> s = new TreeSet<JPackage>();
-
- for (CClassInfo bean : model.beans().values()) {
- JClassContainer cont = getContainer(bean.parent(), aspect);
- if (cont.isPackage()) {
- s.add((JPackage) cont);
- }
- }
-
- for (CElementInfo e : model.getElementMappings(null).values()) {
- // at the first glance you might think we should be iterating all elements,
- // not just global ones, but if you think about it, local ones live inside
- // another class, so those packages are already enumerated when we were
- // walking over CClassInfos.
- s.add(e._package());
- }
-
- return s.toArray(new JPackage[s.size()]);
- }
-
- public ErrorReceiver getErrorReceiver() {
- return errorReceiver;
- }
-
- public CodeModelClassFactory getClassFactory() {
- return codeModelClassFactory;
- }
-
- public PackageOutlineImpl getPackageContext(JPackage p) {
- PackageOutlineImpl r = packageContexts.get(p);
- if (r == null) {
- r = new PackageOutlineImpl(this, model, p);
- packageContexts.put(p, r);
- }
- return r;
- }
-
- /**
- * Generates the minimum {@link JDefinedClass} skeleton
- * without filling in its body.
- */
- private ClassOutlineImpl generateClassDef(CClassInfo bean) {
- ImplStructureStrategy.Result r = model.strategy.createClasses(this, bean);
- JClass implRef;
-
- if (bean.getUserSpecifiedImplClass() != null) {
- // create a place holder for a user-specified class.
- JDefinedClass usr;
- try {
- usr = codeModel._class(bean.getUserSpecifiedImplClass());
- // but hide that file so that it won't be generated.
- usr.hide();
- } catch (JClassAlreadyExistsException e) {
- // it's OK for this to collide.
- usr = e.getExistingClass();
- }
- usr._extends(r.implementation);
- implRef = usr;
- } else {
- implRef = r.implementation;
- }
-
- return new ClassOutlineImpl(this, bean, r.exposed, r.implementation, implRef);
- }
-
- public Collection<ClassOutlineImpl> getClasses() {
- // make sure that classes are fully populated
- assert model.beans().size() == classes.size();
- return classes.values();
- }
-
- public ClassOutlineImpl getClazz(CClassInfo bean) {
- ClassOutlineImpl r = classes.get(bean);
- if (r == null) {
- classes.put(bean, r = generateClassDef(bean));
- }
- return r;
- }
-
- public ElementOutlineImpl getElement(CElementInfo ei) {
- ElementOutlineImpl def = elements.get(ei);
- if (def == null && ei.hasClass()) {
- // create one. in the constructor it adds itself to the elements.
- def = new ElementOutlineImpl(this, ei);
- }
- return def;
- }
-
- public EnumOutline getEnum(CEnumLeafInfo eli) {
- return enums.get(eli);
- }
-
- public Collection<EnumOutline> getEnums() {
- return enums.values();
- }
-
- public Iterable<? extends PackageOutline> getAllPackageContexts() {
- return packageContexts.values();
- }
-
- public FieldOutline getField(CPropertyInfo prop) {
- return fields.get(prop);
- }
-
- /**
- * Generates the body of a class.
- *
- */
- private void generateClassBody(ClassOutlineImpl cc) {
- CClassInfo target = cc.target;
-
- // used to simplify the generated annotations
- String mostUsedNamespaceURI = cc._package().getMostUsedNamespaceURI();
-
- // [RESULT]
- // @XmlType(name="foo", targetNamespace="bar://baz")
- XmlTypeWriter xtw = cc.implClass.annotate2(XmlTypeWriter.class);
- writeTypeName(cc.target.getTypeName(), xtw, mostUsedNamespaceURI);
-
- if (model.options.target.isLaterThan(SpecVersion.V2_1)) {
- // @XmlSeeAlso
- Iterator<CClassInfo> subclasses = cc.target.listSubclasses();
- if (subclasses.hasNext()) {
- XmlSeeAlsoWriter saw = cc.implClass.annotate2(XmlSeeAlsoWriter.class);
- while (subclasses.hasNext()) {
- CClassInfo s = subclasses.next();
- saw.value(getClazz(s).implRef);
- }
- }
- }
-
- if (target.isElement()) {
- String namespaceURI = target.getElementName().getNamespaceURI();
- String localPart = target.getElementName().getLocalPart();
-
- // [RESULT]
- // @XmlRootElement(name="foo", targetNamespace="bar://baz")
- XmlRootElementWriter xrew = cc.implClass.annotate2(XmlRootElementWriter.class);
- xrew.name(localPart);
- if (!namespaceURI.equals(mostUsedNamespaceURI)) // only generate if necessary
- {
- xrew.namespace(namespaceURI);
- }
- }
-
- if (target.isOrdered()) {
- for (CPropertyInfo p : target.getProperties()) {
- if (!(p instanceof CAttributePropertyInfo)) {
- if (!((p instanceof CReferencePropertyInfo)
- && ((CReferencePropertyInfo) p).isDummy())) {
- xtw.propOrder(p.getName(false));
- }
- }
- }
- } else {
- // produce empty array
- xtw.getAnnotationUse().paramArray("propOrder");
- }
-
- for (CPropertyInfo prop : target.getProperties()) {
- generateFieldDecl(cc, prop);
- }
-
- if (target.declaresAttributeWildcard()) {
- generateAttributeWildcard(cc);
- }
-
- // generate some class level javadoc
- cc.ref.javadoc().append(target.javadoc);
-
- cc._package().objectFactoryGenerator().populate(cc);
- }
-
- private void writeTypeName(QName typeName, XmlTypeWriter xtw, String mostUsedNamespaceURI) {
- if (typeName == null) {
- xtw.name("");
- } else {
- xtw.name(typeName.getLocalPart());
- final String typeNameURI = typeName.getNamespaceURI();
- if (!typeNameURI.equals(mostUsedNamespaceURI)) // only generate if necessary
- {
- xtw.namespace(typeNameURI);
- }
- }
- }
-
- /**
- * Generates an attribute wildcard property on a class.
- */
- private void generateAttributeWildcard(ClassOutlineImpl cc) {
- String FIELD_NAME = "otherAttributes";
- String METHOD_SEED = model.getNameConverter().toClassName(FIELD_NAME);
-
- JClass mapType = codeModel.ref(Map.class).narrow(QName.class, String.class);
- JClass mapImpl = codeModel.ref(HashMap.class).narrow(QName.class, String.class);
-
- // [RESULT]
- // Map<QName,String> m = new HashMap<QName,String>();
- JFieldVar $ref = cc.implClass.field(JMod.PRIVATE,
- mapType, FIELD_NAME, JExpr._new(mapImpl));
- $ref.annotate2(XmlAnyAttributeWriter.class);
-
- MethodWriter writer = cc.createMethodWriter();
-
- JMethod $get = writer.declareMethod(mapType, "get" + METHOD_SEED);
- $get.javadoc().append(
- "Gets a map that contains attributes that aren't bound to any typed property on this class.\n\n"
- + "<p>\n"
- + "the map is keyed by the name of the attribute and \n"
- + "the value is the string value of the attribute.\n"
- + "\n"
- + "the map returned by this method is live, and you can add new attribute\n"
- + "by updating the map directly. Because of this design, there's no setter.\n");
- $get.javadoc().addReturn().append("always non-null");
-
- $get.body()._return($ref);
- }
-
- /**
- * Generates the minimum {@link JDefinedClass} skeleton
- * without filling in its body.
- */
- private EnumOutline generateEnumDef(CEnumLeafInfo e) {
- JDefinedClass type;
-
- type = getClassFactory().createClass(
- getContainer(e.parent, EXPOSED), e.shortName, e.getLocator(), ClassType.ENUM);
- type.javadoc().append(e.javadoc);
-
- return new EnumOutline(e, type) {
-
- @Override
- public
- @NotNull
- Outline parent() {
- return BeanGenerator.this;
- }
- };
- }
-
- private void generateEnumBody(EnumOutline eo) {
- JDefinedClass type = eo.clazz;
- CEnumLeafInfo e = eo.target;
-
- XmlTypeWriter xtw = type.annotate2(XmlTypeWriter.class);
- writeTypeName(e.getTypeName(), xtw,
- eo._package().getMostUsedNamespaceURI());
-
- JCodeModel cModel = model.codeModel;
-
- // since constant values are never null, no point in using the boxed types.
- JType baseExposedType = e.base.toType(this, EXPOSED).unboxify();
- JType baseImplType = e.base.toType(this, Aspect.IMPLEMENTATION).unboxify();
-
-
- XmlEnumWriter xew = type.annotate2(XmlEnumWriter.class);
- xew.value(baseExposedType);
-
-
- boolean needsValue = e.needsValueField();
-
- // for each member <m>,
- // [RESULT]
- // <EnumName>(<deserializer of m>(<value>));
-
- Set<String> enumFieldNames = new HashSet<String>(); // record generated field names to detect collision
-
- for (CEnumConstant mem : e.members) {
- String constName = mem.getName();
-
- if (!JJavaName.isJavaIdentifier(constName)) {
- // didn't produce a name.
- getErrorReceiver().error(e.getLocator(),
- Messages.ERR_UNUSABLE_NAME.format(mem.getLexicalValue(), constName));
- }
-
- if (!enumFieldNames.add(constName)) {
- getErrorReceiver().error(e.getLocator(), Messages.ERR_NAME_COLLISION.format(constName));
- }
-
- // [RESULT]
- // <Const>(...)
- // ASSUMPTION: datatype is outline-independent
- JEnumConstant constRef = type.enumConstant(constName);
- if (needsValue) {
- constRef.arg(e.base.createConstant(this, new XmlString(mem.getLexicalValue())));
- }
-
- if (!mem.getLexicalValue().equals(constName)) {
- constRef.annotate2(XmlEnumValueWriter.class).value(mem.getLexicalValue());
- }
-
- // set javadoc
- if (mem.javadoc != null) {
- constRef.javadoc().append(mem.javadoc);
- }
-
- eo.constants.add(new EnumConstantOutline(mem, constRef) {
- });
- }
-
-
- if (needsValue) {
- // [RESULT]
- // final <valueType> value;
- JFieldVar $value = type.field(JMod.PRIVATE | JMod.FINAL, baseExposedType, "value");
-
- // [RESULT]
- // public <valuetype> value() { return value; }
- type.method(JMod.PUBLIC, baseExposedType, "value").body()._return($value);
-
- // [RESULT]
- // <constructor>(<valueType> v) {
- // this.value=v;
- // }
- {
- JMethod m = type.constructor(0);
- m.body().assign($value, m.param(baseImplType, "v"));
- }
-
- // [RESULT]
- // public static <Const> fromValue(<valueType> v) {
- // for( <Const> c : <Const>.values() ) {
- // if(c.value == v) // or equals
- // return c;
- // }
- // throw new IllegalArgumentException(...);
- // }
- {
- JMethod m = type.method(JMod.PUBLIC | JMod.STATIC, type, "fromValue");
- JVar $v = m.param(baseExposedType, "v");
- JForEach fe = m.body().forEach(type, "c", type.staticInvoke("values"));
- JExpression eq;
- if (baseExposedType.isPrimitive()) {
- eq = fe.var().ref($value).eq($v);
- } else {
- eq = fe.var().ref($value).invoke("equals").arg($v);
- }
-
- fe.body()._if(eq)._then()._return(fe.var());
-
- JInvocation ex = JExpr._new(cModel.ref(IllegalArgumentException.class));
-
- JExpression strForm;
- if (baseExposedType.isPrimitive()) {
- strForm = cModel.ref(String.class).staticInvoke("valueOf").arg($v);
- } else if (baseExposedType == cModel.ref(String.class)) {
- strForm = $v;
- } else {
- strForm = $v.invoke("toString");
- }
- m.body()._throw(ex.arg(strForm));
- }
- } else {
- // [RESULT]
- // public String value() { return name(); }
- type.method(JMod.PUBLIC, String.class, "value").body()._return(JExpr.invoke("name"));
-
- // [RESULT]
- // public <Const> fromValue(String v) { return valueOf(v); }
- JMethod m = type.method(JMod.PUBLIC | JMod.STATIC, type, "fromValue");
- m.body()._return(JExpr.invoke("valueOf").arg(m.param(String.class, "v")));
- }
- }
-
- /**
- * Determines the FieldRenderer used for the given FieldUse,
- * then generates the field declaration and accessor methods.
- *
- * The <code>fields</code> map will be updated with the newly
- * created FieldRenderer.
- */
- private FieldOutline generateFieldDecl(ClassOutlineImpl cc, CPropertyInfo prop) {
- FieldRenderer fr = prop.realization;
- if (fr == null) // none is specified. use the default factory
- {
- fr = model.options.getFieldRendererFactory().getDefault();
- }
-
- FieldOutline field = fr.generate(cc, prop);
- fields.put(prop, field);
-
- return field;
- }
-
- /**
- * Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary.
- * Also generates other per-property annotations
- * (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary.
- */
- public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) {
- CAdapter adapter = prop.getAdapter();
- if (adapter != null) {
- if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
- field.annotate(XmlAttachmentRef.class);
- } else {
- // [RESULT]
- // @XmlJavaTypeAdapter( Foo.class )
- XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class);
- xjtw.value(adapter.adapterType.toType(this, EXPOSED));
- }
- }
-
- switch (prop.id()) {
- case ID:
- field.annotate(XmlID.class);
- break;
- case IDREF:
- field.annotate(XmlIDREF.class);
- break;
- }
-
- if (prop.getExpectedMimeType() != null) {
- field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString());
- }
- }
-
- public final JClass addRuntime(Class clazz) {
- JClass g = generatedRuntime.get(clazz);
- if (g == null) {
- // put code into a separate package to avoid name conflicts.
- JPackage implPkg = getUsedPackages(Aspect.IMPLEMENTATION)[0].subPackage("runtime");
- g = generateStaticClass(clazz, implPkg);
- generatedRuntime.put(clazz, g);
- }
- return g;
- }
-
- public JClass generateStaticClass(Class src, JPackage out) {
- String shortName = getShortName(src.getName());
-
- // some people didn't like our jars to contain files with .java extension,
- // so when we build jars, we'' use ".java_". But when we run from the workspace,
- // we want the original source code to be used, so we check both here.
- // see bug 6211503.
- URL res = src.getResource(shortName + ".java");
- if (res == null) {
- res = src.getResource(shortName + ".java_");
- }
- if (res == null) {
- throw new InternalError("Unable to load source code of " + src.getName() + " as a resource");
- }
-
- JStaticJavaFile sjf = new JStaticJavaFile(out, shortName, res, null);
- out.addResourceFile(sjf);
- return sjf.getJClass();
- }
-
- private String getShortName(String name) {
- return name.substring(name.lastIndexOf('.') + 1);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ClassOutlineImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ClassOutlineImpl.java
deleted file mode 100644
index 8588d7ed..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ClassOutlineImpl.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.outline.ClassOutline;
-
-/**
- * {@link ClassOutline} enhanced with schema2java specific
- * information.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class ClassOutlineImpl extends ClassOutline {
- private final BeanGenerator _parent;
-
-
- public MethodWriter createMethodWriter() {
- return _parent.getModel().strategy.createMethodWriter(this);
- }
-
- /**
- * Gets {@link #_package} as {@link PackageOutlineImpl},
- * since it's guaranteed to be of that type.
- */
- public PackageOutlineImpl _package() {
- return (PackageOutlineImpl)super._package();
- }
-
- ClassOutlineImpl( BeanGenerator _parent,
- CClassInfo _target, JDefinedClass exposedClass, JDefinedClass _implClass, JClass _implRef ) {
- super(_target,exposedClass,_implRef,_implClass);
- this._parent = _parent;
- _package().classes.add(this);
- }
-
- public BeanGenerator parent() {
- return _parent;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/DualObjectFactoryGenerator.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/DualObjectFactoryGenerator.java
deleted file mode 100644
index 7d41b65c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/DualObjectFactoryGenerator.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean;
-
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.model.Model;
-
-/**
- * {@link ObjectFactoryGenerator} used when we generate
- * interfaces and implementations in separate packages.
- *
- * <p>
- * {@link #publicOFG} and {@link #privateOFG} gives you access to
- * {@code ObjectFactory}s in both packages, if you need to.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class DualObjectFactoryGenerator extends ObjectFactoryGenerator {
- public final ObjectFactoryGenerator publicOFG;
- public final ObjectFactoryGenerator privateOFG;
-
- DualObjectFactoryGenerator(BeanGenerator outline, Model model, JPackage targetPackage) {
- this.publicOFG = new PublicObjectFactoryGenerator(outline,model,targetPackage);
- this.privateOFG = new PrivateObjectFactoryGenerator(outline,model,targetPackage);
-
- // put the marker so that we can detect missing jaxb.properties
- publicOFG.getObjectFactory().field(JMod.PRIVATE|JMod.STATIC|JMod.FINAL,
- Void.class, "_useJAXBProperties", JExpr._null());
- }
-
- void populate(CElementInfo ei) {
- publicOFG.populate(ei);
- privateOFG.populate(ei);
- }
-
- void populate(ClassOutlineImpl cc) {
- publicOFG.populate(cc);
- privateOFG.populate(cc);
- }
-
- /**
- * Returns the private version (which is what gets used at runtime.)
- */
- public JDefinedClass getObjectFactory() {
- return privateOFG.getObjectFactory();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ElementOutlineImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ElementOutlineImpl.java
deleted file mode 100644
index c460f316..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ElementOutlineImpl.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean;
-
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JFieldVar;
-import com.sun.codemodel.internal.JInvocation;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.ElementOutline;
-
-/**
- * {@link ElementOutline} implementation.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ElementOutlineImpl extends ElementOutline {
- private final BeanGenerator parent;
-
- public BeanGenerator parent() {
- return parent;
- }
-
- /*package*/ ElementOutlineImpl(BeanGenerator parent, CElementInfo ei) {
- super(ei,
- parent.getClassFactory().createClass(
- parent.getContainer( ei.parent, Aspect.EXPOSED ), ei.shortName(), ei.getLocator() ));
- this.parent = parent;
- parent.elements.put(ei,this);
-
- JCodeModel cm = parent.getCodeModel();
-
- implClass._extends(
- cm.ref(JAXBElement.class).narrow(
- target.getContentInMemoryType().toType(parent,Aspect.EXPOSED).boxify()));
-
- if(ei.hasClass()) {
- JType implType = ei.getContentInMemoryType().toType(parent,Aspect.IMPLEMENTATION);
- JExpression declaredType = JExpr.cast(cm.ref(Class.class),implType.boxify().dotclass()); // why do we have to cast?
- JClass scope=null;
- if(ei.getScope()!=null)
- scope = parent.getClazz(ei.getScope()).implRef;
- JExpression scopeClass = scope==null?JExpr._null():scope.dotclass();
- JFieldVar valField = implClass.field(JMod.PROTECTED|JMod.FINAL|JMod.STATIC,QName.class,"NAME",createQName(cm,ei.getElementName()));
-
- // take this opportunity to generate a constructor in the element class
- JMethod cons = implClass.constructor(JMod.PUBLIC);
- cons.body().invoke("super")
- .arg(valField)
- .arg(declaredType)
- .arg(scopeClass)
- .arg(cons.param(implType,"value"));
-
- // generate no-arg constructor in the element class (bug #391; section 5.6.2 in JAXB spec 2.1)
- JMethod noArgCons = implClass.constructor(JMod.PUBLIC);
- noArgCons.body().invoke("super")
- .arg(valField)
- .arg(declaredType)
- .arg(scopeClass)
- .arg(JExpr._null());
-
- }
- }
-
- /**
- * Generates an expression that evaluates to "new QName(...)"
- */
- private JInvocation createQName(JCodeModel codeModel,QName name) {
- return JExpr._new(codeModel.ref(QName.class)).arg(name.getNamespaceURI()).arg(name.getLocalPart());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ImplStructureStrategy.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ImplStructureStrategy.java
deleted file mode 100644
index 98179c85..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ImplStructureStrategy.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Use is subject to the license terms.
- */
-package com.sun.tools.internal.xjc.generator.bean;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
-
-import com.sun.codemodel.internal.JClassContainer;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JDocComment;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlAccessorTypeWriter;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-
-/**
- * Decides how a bean token is mapped to the generated classes.
- *
- * <p>
- * The actual implementations of this interface is tightly coupled with
- * the backend, but the front-end gets to choose which strategy to be used.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-@XmlEnum(Boolean.class)
-public enum ImplStructureStrategy {
- /**
- * Generates beans only. The simplest code generation.
- */
- @XmlEnumValue("true")
- BEAN_ONLY() {
- protected Result createClasses(Outline outline, CClassInfo bean) {
- JClassContainer parent = outline.getContainer( bean.parent(), Aspect.EXPOSED );
-
- JDefinedClass impl = outline.getClassFactory().createClass(
- parent,
- JMod.PUBLIC|(parent.isPackage()?0:JMod.STATIC)|(bean.isAbstract()?JMod.ABSTRACT:0),
- bean.shortName, bean.getLocator() );
- impl.annotate2(XmlAccessorTypeWriter.class).value(XmlAccessType.FIELD);
-
- return new Result(impl,impl);
- }
-
- protected JPackage getPackage(JPackage pkg, Aspect a) {
- return pkg;
- }
-
- protected MethodWriter createMethodWriter(final ClassOutlineImpl target) {
- assert target.ref==target.implClass;
-
- return new MethodWriter(target) {
- private final JDefinedClass impl = target.implClass;
-
- private JMethod implMethod;
-
- public JVar addParameter(JType type, String name) {
- return implMethod.param(type,name);
- }
-
- public JMethod declareMethod(JType returnType, String methodName) {
- implMethod = impl.method( JMod.PUBLIC, returnType, methodName );
- return implMethod;
- }
-
- public JDocComment javadoc() {
- return implMethod.javadoc();
- }
- };
- }
-
- protected void _extends(ClassOutlineImpl derived, ClassOutlineImpl base) {
- derived.implClass._extends(base.implRef);
- }
- },
-
- /**
- * Generates the interfaces to describe beans (content interfaces)
- * and then the beans themselves in a hidden impl package.
- *
- * Similar to JAXB 1.0.
- */
- @XmlEnumValue("false")
- INTF_AND_IMPL() {
- protected Result createClasses( Outline outline, CClassInfo bean ) {
- JClassContainer parent = outline.getContainer( bean.parent(), Aspect.EXPOSED );
-
- JDefinedClass intf = outline.getClassFactory().createInterface(
- parent, bean.shortName, bean.getLocator() );
-
- parent = outline.getContainer(bean.parent(), Aspect.IMPLEMENTATION);
- JDefinedClass impl = outline.getClassFactory().createClass(
- parent,
- JMod.PUBLIC|(parent.isPackage()?0:JMod.STATIC)|(bean.isAbstract()?JMod.ABSTRACT:0),
- bean.shortName+"Impl", bean.getLocator() );
- impl.annotate2(XmlAccessorTypeWriter.class).value(XmlAccessType.FIELD);
-
- impl._implements(intf);
-
- return new Result(intf,impl);
- }
-
- protected JPackage getPackage(JPackage pkg, Aspect a) {
- switch(a) {
- case EXPOSED:
- return pkg;
- case IMPLEMENTATION:
- return pkg.subPackage("impl");
- default:
- assert false;
- throw new IllegalStateException();
- }
- }
-
- protected MethodWriter createMethodWriter(final ClassOutlineImpl target) {
- return new MethodWriter(target) {
- private final JDefinedClass intf = target.ref;
- private final JDefinedClass impl = target.implClass;
-
- private JMethod intfMethod;
- private JMethod implMethod;
-
- public JVar addParameter(JType type, String name) {
- // TODO: do we still need to deal with the case where intf is null?
- if(intf!=null)
- intfMethod.param(type,name);
- return implMethod.param(type,name);
- }
-
- public JMethod declareMethod(JType returnType, String methodName) {
- if(intf!=null)
- intfMethod = intf.method( 0, returnType, methodName );
- implMethod = impl.method( JMod.PUBLIC, returnType, methodName );
- return implMethod;
- }
-
- public JDocComment javadoc() {
- if(intf!=null)
- return intfMethod.javadoc();
- else
- return implMethod.javadoc();
- }
- };
- }
-
- protected void _extends(ClassOutlineImpl derived, ClassOutlineImpl base) {
- derived.implClass._extends(base.implRef);
- derived.ref._implements(base.ref);
- }
- };
-
-
- /**
- * Creates class(es) for the given bean.
- */
- protected abstract Result createClasses( Outline outline, CClassInfo bean );
-
- /**
- * Gets the specified aspect of the given package.
- */
- protected abstract JPackage getPackage( JPackage pkg, Aspect a );
-
- protected abstract MethodWriter createMethodWriter( ClassOutlineImpl target );
-
- /**
- * Sets up an inheritance relationship.
- */
- protected abstract void _extends( ClassOutlineImpl derived, ClassOutlineImpl base );
-
- public static final class Result {
- /**
- * Corresponds to {@link Aspect#EXPOSED}
- */
- public final JDefinedClass exposed;
- /**
- * Corresponds to {@link Aspect#IMPLEMENTATION}
- */
- public final JDefinedClass implementation;
-
- public Result(JDefinedClass exposed, JDefinedClass implementation) {
- this.exposed = exposed;
- this.implementation = implementation;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle.properties
deleted file mode 100644
index abcc8c55..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle.properties
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-METHOD_COLLISION = \
- The "{0}" method is defined on both "{1}" and "{2}" and is causing a collision.
-
-# {0} - enumeration constant value (but something that couldn�t be translated to a valid java identifier e.g. starting special character, number, ..) e.g. Cannot derive a valid Java identifier from "5.6.0". Specify a customization to change the name.
-ERR_UNUSABLE_NAME = \
- Cannot derive a valid Java identifier from "{0}". Specify a customization to change the name.
-
-ERR_KEYNAME_COLLISION = \
- Complex type and its child element share the same name "{0}". \
- Use a class customization to resolve this conflict.
-
-ERR_NAME_COLLISION = \
- Type-safe enum has more than one values that share the same name "{0}". \
- Use a typesafeEnumMemberName customization to resolve this conflict.
-
-ILLEGAL_CONSTRUCTOR_PARAM = \
- Illegal constructor parameter {0}
-
-OBJECT_FACTORY_CONFLICT = \
- Two declarations cause a collision in the ObjectFactory class.
-
-OBJECT_FACTORY_CONFLICT_RELATED = \
- (Related to above error) This is the other declaration.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_de.properties
deleted file mode 100644
index 4334095c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_de.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-METHOD_COLLISION = Die "{0}"-Methode wird sowohl auf "{1}" als auch auf "{2}" definiert und verursacht eine Kollision.
-
-# {0} - enumeration constant value (but something that couldn't be translated to a valid java identifier e.g. starting special character, number, ..) e.g. Cannot derive a valid Java identifier from "5.6.0". Specify a customization to change the name.
-ERR_UNUSABLE_NAME = Es kann keine g\u00FCltige Java-ID von "{0}" abgeleitet werden. Geben Sie eine Anpassung zur \u00C4nderung des Namens an.
-
-ERR_KEYNAME_COLLISION = Komplexer Typ und sein untergeordnetes Element verwenden denselben Namen "{0}". L\u00F6sen Sie diesen Konflikt mit einer Klassenanpassung.
-
-ERR_NAME_COLLISION = Typesafe-Enumeration enth\u00E4lt mehrere Werte, die denselben Namen "{0}" verwenden. Verwenden Sie eine typesafeEnumMemberName-Anpassung, um diesen Konflikt zu l\u00F6sen.
-
-ILLEGAL_CONSTRUCTOR_PARAM = Ung\u00FCltiger Konstruktorparameter {0}
-
-OBJECT_FACTORY_CONFLICT = Zwei Deklarationen verursachen eine Kollision in der ObjectFactory-Klasse.
-
-OBJECT_FACTORY_CONFLICT_RELATED = Dies ist die andere Deklaration.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_es.properties
deleted file mode 100644
index 75a13923..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_es.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-METHOD_COLLISION = El m\u00E9todo "{0}" est\u00E1 definido en "{1}" y en "{2}" y est\u00E1 produciendo una colisi\u00F3n.
-
-# {0} - enumeration constant value (but something that couldn't be translated to a valid java identifier e.g. starting special character, number, ..) e.g. Cannot derive a valid Java identifier from "5.6.0". Specify a customization to change the name.
-ERR_UNUSABLE_NAME = No se puede obtener un identificador Java v\u00E1lido de "{0}". Especifique una personalizaci\u00F3n para cambiar el nombre.
-
-ERR_KEYNAME_COLLISION = El tipo complejo y su elemento secundario comparten el mismo nombre "{0}". Utilice una personalizaci\u00F3n de clase para resolver este conflicto.
-
-ERR_NAME_COLLISION = La enumeraci\u00F3n de tipo seguro tiene m\u00E1s de un valor que comparten el mismo nombre "{0}". Utilice una personalizaci\u00F3n typesafeEnumMemberName para resolver este conflicto.
-
-ILLEGAL_CONSTRUCTOR_PARAM = Par\u00E1metro de constructor no v\u00E1lido {0}
-
-OBJECT_FACTORY_CONFLICT = Dos declaraciones producen una colisi\u00F3n en la clase ObjectFactory.
-
-OBJECT_FACTORY_CONFLICT_RELATED = (Relacionado con el error anterior) \u00C9sta es la otra declaraci\u00F3n.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_fr.properties
deleted file mode 100644
index bc4a933d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_fr.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-METHOD_COLLISION = La m\u00E9thode "{0}" est d\u00E9finie \u00E0 la fois sur "{1}" et "{2}", et elle entra\u00EEne une collision
-
-# {0} - enumeration constant value (but something that couldn't be translated to a valid java identifier e.g. starting special character, number, ..) e.g. Cannot derive a valid Java identifier from "5.6.0". Specify a customization to change the name.
-ERR_UNUSABLE_NAME = Impossible de d\u00E9river un identificateur Java valide de "{0}". Indiquez une personnalisation pour modifier le nom.
-
-ERR_KEYNAME_COLLISION = Le type complexe et son \u00E9l\u00E9ment enfant portent le m\u00EAme nom "{0}". Utilisez une personnalisation de classe pour r\u00E9soudre ce conflit.
-
-ERR_NAME_COLLISION = L''\u00E9num\u00E9ration Typesafe comporte plusieurs valeurs portant le m\u00EAme nom "{0}". Utilisez une personnalisation typesafeEnumMemberName pour r\u00E9soudre ce conflit.
-
-ILLEGAL_CONSTRUCTOR_PARAM = Param\u00E8tre de constructeur {0} interdit
-
-OBJECT_FACTORY_CONFLICT = Deux d\u00E9clarations entra\u00EEnent une collision dans la classe ObjectFactory.
-
-OBJECT_FACTORY_CONFLICT_RELATED = (voir erreur ci-dessus) Il s'agit de l'autre d\u00E9claration.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_it.properties
deleted file mode 100644
index 4abe9c6d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_it.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-METHOD_COLLISION = Il metodo "{0}" \u00E8 definito su "{1}" e su "{2}" causando un conflitto.
-
-# {0} - enumeration constant value (but something that couldn't be translated to a valid java identifier e.g. starting special character, number, ..) e.g. Cannot derive a valid Java identifier from "5.6.0". Specify a customization to change the name.
-ERR_UNUSABLE_NAME = Impossibile derivare un identificativo Java valido da "{0}". Specificare una personalizzazione per modificare il nome.
-
-ERR_KEYNAME_COLLISION = Il tipo complesso e il relativo elemento figlio condividono lo stesso nome "{0}". Usare una personalizzazione di classe per risolvere il conflitto.
-
-ERR_NAME_COLLISION = L''enumerazione Typesafe ha pi\u00F9 valori che condividono lo stesso nome "{0}". Usare una personalizzazione typesafeEnumMemberName per risolvere il conflitto.
-
-ILLEGAL_CONSTRUCTOR_PARAM = Parametro del costruttore non valido {0}
-
-OBJECT_FACTORY_CONFLICT = Due dichiarazioni causano un conflitto nella classe ObjectFactory.
-
-OBJECT_FACTORY_CONFLICT_RELATED = (Relativo all'errore riportato sopra) Questa \u00E8 l'altra dichiarazione.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_ja.properties
deleted file mode 100644
index c4af55f1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_ja.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-METHOD_COLLISION = "{0}"\u30E1\u30BD\u30C3\u30C9\u304C"{1}"\u3068"{2}"\u306E\u4E21\u65B9\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u885D\u7A81\u304C\u767A\u751F\u3057\u3066\u3044\u307E\u3059\u3002
-
-# {0} - enumeration constant value (but something that couldn't be translated to a valid java identifier e.g. starting special character, number, ..) e.g. Cannot derive a valid Java identifier from "5.6.0". Specify a customization to change the name.
-ERR_UNUSABLE_NAME = "{0}"\u304B\u3089\u6709\u52B9\u306AJava\u8B58\u5225\u5B50\u3092\u5C0E\u51FA\u3067\u304D\u307E\u305B\u3093\u3002\u540D\u524D\u3092\u5909\u66F4\u3059\u308B\u306B\u306F\u3001\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002
-
-ERR_KEYNAME_COLLISION = \u8907\u5408\u578B\u3068\u305D\u306E\u5B50\u8981\u7D20\u304C\u540C\u3058\u540D\u524D"{0}"\u3092\u5171\u6709\u3057\u3066\u3044\u307E\u3059\u3002\u3053\u306E\u7AF6\u5408\u3092\u89E3\u6C7A\u3059\u308B\u306B\u306F\u3001\u30AF\u30E9\u30B9\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
-
-ERR_NAME_COLLISION = \u30BF\u30A4\u30D7\u30BB\u30FC\u30D5\u306E\u5217\u6319\u578B\u306B\u3001\u540C\u3058\u540D\u524D"{0}"\u3092\u5171\u6709\u3059\u308B\u8907\u6570\u306E\u5024\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u7AF6\u5408\u3092\u89E3\u6C7A\u3059\u308B\u306B\u306F\u3001typesafeEnumMemberName\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
-
-ILLEGAL_CONSTRUCTOR_PARAM = \u4E0D\u6B63\u306A\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF{0}
-
-OBJECT_FACTORY_CONFLICT = 2\u3064\u306E\u5BA3\u8A00\u306B\u3088\u308A\u3001ObjectFactory\u30AF\u30E9\u30B9\u3067\u885D\u7A81\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
-
-OBJECT_FACTORY_CONFLICT_RELATED = (\u524D\u8FF0\u306E\u30A8\u30E9\u30FC\u306B\u95A2\u9023\u3057\u3066)\u3053\u308C\u306F\u4ED6\u65B9\u306E\u5BA3\u8A00\u3067\u3059\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_ko.properties
deleted file mode 100644
index c1036140..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_ko.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-METHOD_COLLISION = "{0}" \uBA54\uC18C\uB4DC\uAC00 "{1}"\uACFC(\uC640) "{2}"\uC5D0 \uC815\uC758\uB418\uC5B4 \uC788\uC5B4 \uCDA9\uB3CC\uC774 \uBC1C\uC0DD\uD569\uB2C8\uB2E4.
-
-# {0} - enumeration constant value (but something that couldn't be translated to a valid java identifier e.g. starting special character, number, ..) e.g. Cannot derive a valid Java identifier from "5.6.0". Specify a customization to change the name.
-ERR_UNUSABLE_NAME = "{0}"\uC5D0\uC11C \uC801\uD569\uD55C Java \uC2DD\uBCC4\uC790\uB97C \uD30C\uC0DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uC9C0\uC815\uD558\uC5EC \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uC2ED\uC2DC\uC624.
-
-ERR_KEYNAME_COLLISION = \uBCF5\uD569 \uC720\uD615\uACFC \uD574\uB2F9 \uD558\uC704 \uC694\uC18C\uC5D0 \uB3D9\uC77C\uD55C \uC774\uB984 "{0}"\uC774(\uAC00) \uC0AC\uC6A9\uB429\uB2C8\uB2E4. \uD074\uB798\uC2A4 \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uC774 \uCDA9\uB3CC\uC744 \uD574\uACB0\uD558\uC2ED\uC2DC\uC624.
-
-ERR_NAME_COLLISION = type-safe enum\uC5D0 \uB3D9\uC77C\uD55C \uC774\uB984 "{0}"\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB294 \uAC12\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. typesafeEnumMemberName \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uC774 \uCDA9\uB3CC\uC744 \uD574\uACB0\uD558\uC2ED\uC2DC\uC624.
-
-ILLEGAL_CONSTRUCTOR_PARAM = {0}\uC740(\uB294) \uC798\uBABB\uB41C \uC0DD\uC131\uC790 \uB9E4\uAC1C\uBCC0\uC218\uC785\uB2C8\uB2E4.
-
-OBJECT_FACTORY_CONFLICT = \uB450 \uAC1C\uC758 \uC120\uC5B8\uC73C\uB85C \uC778\uD574 ObjectFactory \uD074\uB798\uC2A4\uC5D0 \uCDA9\uB3CC\uC774 \uBC1C\uC0DD\uD569\uB2C8\uB2E4.
-
-OBJECT_FACTORY_CONFLICT_RELATED = (\uC704 \uC624\uB958\uC640 \uAD00\uB828\uB428) \uB2E4\uB978 \uC120\uC5B8\uC785\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_pt_BR.properties
deleted file mode 100644
index a62de4bc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_pt_BR.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-METHOD_COLLISION = O m\u00E9todo "{0}" foi definido em "{1}" e em "{2}" e est\u00E1 causando uma colis\u00E3o.
-
-# {0} - enumeration constant value (but something that couldn't be translated to a valid java identifier e.g. starting special character, number, ..) e.g. Cannot derive a valid Java identifier from "5.6.0". Specify a customization to change the name.
-ERR_UNUSABLE_NAME = N\u00E3o \u00E9 poss\u00EDvel derivar um identificador Java v\u00E1lido de "{0}". Especifique uma personaliza\u00E7\u00E3o para alterar o nome.
-
-ERR_KEYNAME_COLLISION = O tipo de complexo e seu elemento filho compartilham o mesmo nome "{0}". Use uma personaliza\u00E7\u00E3o de classe para resolver esse conflito.
-
-ERR_NAME_COLLISION = A enumera\u00E7\u00E3o type-safe tem mais de um valor que compartilha o mesmo nome "{0}". Use uma personaliza\u00E7\u00E3o de typesafeEnumMemberName para resolver esse conflito.
-
-ILLEGAL_CONSTRUCTOR_PARAM = Par\u00E2metro {0} de construtor inv\u00E1lido
-
-OBJECT_FACTORY_CONFLICT = Duas declara\u00E7\u00F5es causam uma colis\u00E3o na classe ObjectFactory.
-
-OBJECT_FACTORY_CONFLICT_RELATED = (Relacionada ao erro acima). Esta \u00E9 a outra declara\u00E7\u00E3o.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_zh_CN.properties
deleted file mode 100644
index 33c00095..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_zh_CN.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-METHOD_COLLISION = "{1}" \u548C "{2}" \u4E0A\u90FD\u5B9A\u4E49\u4E86 "{0}" \u65B9\u6CD5, \u8FD9\u4F1A\u5BFC\u81F4\u53D1\u751F\u51B2\u7A81\u3002
-
-# {0} - enumeration constant value (but something that couldn't be translated to a valid java identifier e.g. starting special character, number, ..) e.g. Cannot derive a valid Java identifier from "5.6.0". Specify a customization to change the name.
-ERR_UNUSABLE_NAME = \u65E0\u6CD5\u4ECE "{0}" \u6D3E\u751F\u6709\u6548 Java \u6807\u8BC6\u7B26\u3002\u8BF7\u6307\u5B9A\u5B9A\u5236\u8BBE\u7F6E\u6765\u66F4\u6539\u540D\u79F0\u3002
-
-ERR_KEYNAME_COLLISION = \u590D\u6742\u7C7B\u578B\u53CA\u5176\u5B50\u5143\u7D20\u5171\u4EAB\u76F8\u540C\u7684\u540D\u79F0 "{0}"\u3002\u8BF7\u4F7F\u7528\u7C7B\u5B9A\u5236\u8BBE\u7F6E\u6765\u89E3\u51B3\u6B64\u51B2\u7A81\u3002
-
-ERR_NAME_COLLISION = \u7C7B\u578B\u5B89\u5168\u7684\u679A\u4E3E\u6709\u591A\u4E2A\u503C\u5171\u4EAB\u76F8\u540C\u7684\u540D\u79F0 "{0}"\u3002\u8BF7\u4F7F\u7528 typesafeEnumMemberName \u5B9A\u5236\u8BBE\u7F6E\u6765\u89E3\u51B3\u6B64\u51B2\u7A81\u3002
-
-ILLEGAL_CONSTRUCTOR_PARAM = \u975E\u6CD5\u6784\u9020\u5668\u53C2\u6570{0}
-
-OBJECT_FACTORY_CONFLICT = \u4E24\u4E2A\u58F0\u660E\u5BFC\u81F4 ObjectFactory \u7C7B\u4E2D\u53D1\u751F\u51B2\u7A81\u3002
-
-OBJECT_FACTORY_CONFLICT_RELATED = (\u4E0E\u4E0A\u4E00\u9519\u8BEF\u6709\u5173) \u8FD9\u662F\u53E6\u4E00\u4E2A\u58F0\u660E\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_zh_TW.properties
deleted file mode 100644
index 6536a585..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_zh_TW.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-METHOD_COLLISION = "{1}" \u548C "{2}" \u90FD\u6709\u5B9A\u7FA9 "{0}" \u65B9\u6CD5, \u56E0\u800C\u5C0E\u81F4\u885D\u7A81.
-
-# {0} - enumeration constant value (but something that couldn't be translated to a valid java identifier e.g. starting special character, number, ..) e.g. Cannot derive a valid Java identifier from "5.6.0". Specify a customization to change the name.
-ERR_UNUSABLE_NAME = \u7121\u6CD5\u5F9E "{0}" \u4E2D\u884D\u751F\u6709\u6548\u7684 Java ID. \u8ACB\u6307\u5B9A\u4E00\u500B\u81EA\u8A02\u9805\u76EE\u4EE5\u8B8A\u66F4\u540D\u7A31.
-
-ERR_KEYNAME_COLLISION = \u8907\u96DC\u985E\u578B\u53CA\u5176\u5B50\u9805\u5143\u7D20\u5171\u7528\u76F8\u540C\u7684\u540D\u7A31 "{0}". \u8ACB\u4F7F\u7528\u985E\u5225\u81EA\u8A02\u9805\u76EE\u4EE5\u89E3\u6C7A\u6B64\u885D\u7A81.
-
-ERR_NAME_COLLISION = \u985E\u578B\u5B89\u5168 Enum \u6709\u4E00\u500B\u4EE5\u4E0A\u7684\u503C\u5171\u7528\u76F8\u540C\u7684\u540D\u7A31 "{0}". \u8ACB\u4F7F\u7528 typesafeEnumMemberName \u81EA\u8A02\u9805\u76EE\u4EE5\u89E3\u6C7A\u6B64\u885D\u7A81.
-
-ILLEGAL_CONSTRUCTOR_PARAM = \u7121\u6548\u7684\u5EFA\u69CB\u5B50\u53C3\u6578 {0}
-
-OBJECT_FACTORY_CONFLICT = \u5169\u500B\u5BA3\u544A\u5C0E\u81F4 ObjectFactory \u985E\u5225\u767C\u751F\u885D\u7A81.
-
-OBJECT_FACTORY_CONFLICT_RELATED = (\u8207\u4E0A\u8FF0\u932F\u8AA4\u6709\u95DC) \u6B64\u70BA\u53E6\u4E00\u500B\u5BA3\u544A.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/Messages.java
deleted file mode 100644
index 4c3eae6f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/Messages.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-enum Messages {
- // AnnotationParser
- METHOD_COLLISION, // 3 args
- ERR_UNUSABLE_NAME, // 2 args
- ERR_KEYNAME_COLLISION, // 1 arg
- ERR_NAME_COLLISION, // 1 arg
- ILLEGAL_CONSTRUCTOR_PARAM, // 1 arg
- OBJECT_FACTORY_CONFLICT, // 1 arg
- OBJECT_FACTORY_CONFLICT_RELATED,
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getPackage().getName() + ".MessageBundle");
-
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MethodWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MethodWriter.java
deleted file mode 100644
index 78a16757..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MethodWriter.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Use is subject to the license terms.
- */
-package com.sun.tools.internal.xjc.generator.bean;
-
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JDocComment;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.outline.ClassOutline;
-
-/**
- * The back-end may or may not generate the content interface
- * separately from the implementation class. If so, a method
- * needs to be declared on both the interface and the implementation class.
- * <p>
- * This class hides those details and allow callers to declare
- * methods just once.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class MethodWriter {
- protected final JCodeModel codeModel;
-
- protected MethodWriter(ClassOutline context) {
- this.codeModel = context.parent().getCodeModel();
- }
-
- /**
- * Declares a method in both the interface and the implementation.
- *
- * @return
- * JMethod object that represents a newly declared method
- * on the implementation class.
- */
- public abstract JMethod declareMethod( JType returnType, String methodName );
-
- public final JMethod declareMethod( Class returnType, String methodName ) {
- return declareMethod( codeModel.ref(returnType), methodName );
- }
-
- /**
- * To generate javadoc for the previously declared method, use this method
- * to obtain a {@link JDocComment} object. This may return a value
- * different from declareMethod().javadoc().
- */
- public abstract JDocComment javadoc();
-
-
- /**
- * Adds a parameter to the previously declared method.
- *
- * @return
- * JVar object that represents a newly added parameter
- * on the implementation class.
- */
- public abstract JVar addParameter( JType type, String name );
-
- public final JVar addParameter( Class type, String name ) {
- return addParameter( codeModel.ref(type), name );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ObjectFactoryGenerator.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ObjectFactoryGenerator.java
deleted file mode 100644
index dd130f21..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ObjectFactoryGenerator.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean;
-
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-
-/**
- * Generates <code>ObjectFactory</code> then wraps it and provides
- * access to it.
- *
- * <p>
- * The ObjectFactory contains
- * factory methods for each schema derived content class
- *
- * @author
- * Ryan Shoemaker
- */
-public abstract class ObjectFactoryGenerator {
- /**
- * Adds code for the given {@link CElementInfo} to ObjectFactory.
- */
- abstract void populate( CElementInfo ei );
-
- /**
- * Adds code that is relevant to a given {@link ClassOutlineImpl} to
- * ObjectFactory.
- */
- abstract void populate( ClassOutlineImpl cc );
-
- /**
- * Returns a reference to the generated (public) ObjectFactory
- */
- public abstract JDefinedClass getObjectFactory();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ObjectFactoryGeneratorImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ObjectFactoryGeneratorImpl.java
deleted file mode 100644
index 92ee6f7b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/ObjectFactoryGeneratorImpl.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.annotation.XmlInlineBinaryData;
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JFieldVar;
-import com.sun.codemodel.internal.JInvocation;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlElementDeclWriter;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlRegistryWriter;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.Constructor;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.FieldAccessor;
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-import com.sun.xml.internal.bind.v2.TODO;
-
-/**
- * Generates <code>ObjectFactory</code> then wraps it and provides
- * access to it.
- *
- * <p>
- * The ObjectFactory contains
- * factory methods for each schema derived content class
- *
- * @author
- * Ryan Shoemaker
- */
-abstract class ObjectFactoryGeneratorImpl extends ObjectFactoryGenerator {
-
- private final BeanGenerator outline;
- private final Model model;
- private final JCodeModel codeModel;
- /**
- * Ref to {@link Class}.
- */
- private final JClass classRef;
-
- /**
- * Reference to the generated ObjectFactory class.
- */
- private final JDefinedClass objectFactory;
-
- /** map of qname to the QName constant field. */
- private final HashMap<QName,JFieldVar> qnameMap = new HashMap<QName,JFieldVar>();
-
- /**
- * Names of the element factory methods that are created.
- * Used to detect collisions.
- *
- * The value is used for reporting error locations.
- */
- private final Map<String,CElementInfo> elementFactoryNames = new HashMap<String,CElementInfo>();
-
- /**
- * Names of the value factory methods that are created.
- * Used to detect collisions.
- *
- * The value is used for reporting error locations.
- */
- private final Map<String,ClassOutlineImpl> valueFactoryNames = new HashMap<String,ClassOutlineImpl>();
-
- /**
- * Returns a reference to the generated (public) ObjectFactory
- */
- public JDefinedClass getObjectFactory() {
- return objectFactory;
- }
-
-
-
-
- public ObjectFactoryGeneratorImpl( BeanGenerator outline, Model model, JPackage targetPackage ) {
- this.outline = outline;
- this.model = model;
- this.codeModel = this.model.codeModel;
- this.classRef = codeModel.ref(Class.class);
-
- // create the ObjectFactory class skeleton
- objectFactory = this.outline.getClassFactory().createClass(
- targetPackage, "ObjectFactory", null );
- objectFactory.annotate2(XmlRegistryWriter.class);
-
- // generate the default constructor
- //
- // m1 result:
- // public ObjectFactory() {}
- JMethod m1 = objectFactory.constructor(JMod.PUBLIC);
- m1.javadoc().append("Create a new ObjectFactory that can be used to " +
- "create new instances of schema derived classes " +
- "for package: " + targetPackage.name());
-
- // add some class javadoc
- objectFactory.javadoc().append(
- "This object contains factory methods for each \n" +
- "Java content interface and Java element interface \n" +
- "generated in the " + targetPackage.name() + " package. \n" +
- "<p>An ObjectFactory allows you to programatically \n" +
- "construct new instances of the Java representation \n" +
- "for XML content. The Java representation of XML \n" +
- "content can consist of schema derived interfaces \n" +
- "and classes representing the binding of schema \n" +
- "type definitions, element declarations and model \n" +
- "groups. Factory methods for each of these are \n" +
- "provided in this class." );
-
- }
-
- /**
- * Adds code for the given {@link CElementInfo} to ObjectFactory.
- */
- protected final void populate( CElementInfo ei, Aspect impl, Aspect exposed ) {
- JType exposedElementType = ei.toType(outline,exposed);
- JType exposedType = ei.getContentInMemoryType().toType(outline,exposed);
- JType implType = ei.getContentInMemoryType().toType(outline,impl);
- String namespaceURI = ei.getElementName().getNamespaceURI();
- String localPart = ei.getElementName().getLocalPart();
-
- JClass scope=null;
- if(ei.getScope()!=null)
- scope = outline.getClazz(ei.getScope()).implClass;
-
-
- JMethod m;
-
- if(ei.isAbstract()) {
- // TODO: see the "Abstract elements and mighty IXmlElement" e-mail
- // that I sent to jaxb-tech
- TODO.checkSpec();
- }
-
- {// collision check
- CElementInfo existing = elementFactoryNames.put(ei.getSqueezedName(),ei);
- if( existing!=null ) {
- outline.getErrorReceiver().error(existing.getLocator(),
- Messages.OBJECT_FACTORY_CONFLICT.format(ei.getSqueezedName()));
- outline.getErrorReceiver().error(ei.getLocator(),
- Messages.OBJECT_FACTORY_CONFLICT_RELATED.format());
- return;
- }
- }
-
- // no arg constructor
- // [RESULT] if the element doesn't have its own class, something like:
- //
- // @XmlElementMapping(uri = "", name = "foo")
- // public JAXBElement<Foo> createFoo( Foo value ) {
- // return new JAXBElement<Foo>(
- // new QName("","foo"),(Class)FooImpl.class,scope,(FooImpl)value);
- // }
- // NOTE: when we generate value classes Foo==FooImpl
- //
- // [RESULT] otherwise
- //
- // @XmlElementMapping(uri = "", name = "foo")
- // public Foo createFoo( FooType value ) {
- // return new Foo((FooTypeImpl)value);
- // }
- // NOTE: when we generate value classes FooType==FooTypeImpl
- //
- // to deal with
- // new JAXBElement<List<String>>( ..., List.class, ... );
- // we sometimes have to produce (Class)List.class instead of just List.class
-
- m = objectFactory.method( JMod.PUBLIC, exposedElementType, "create" + ei.getSqueezedName() );
- JVar $value = m.param(exposedType,"value");
-
- JExpression declaredType;
- if(implType.boxify().isParameterized() || !exposedType.equals(implType))
- declaredType = JExpr.cast(classRef,implType.boxify().dotclass());
- else
- declaredType = implType.boxify().dotclass();
- JExpression scopeClass = scope==null?JExpr._null():scope.dotclass();
-
- // build up the return extpression
- JInvocation exp = JExpr._new(exposedElementType);
- if(!ei.hasClass()) {
- exp.arg(getQNameInvocation(ei));
- exp.arg(declaredType);
- exp.arg(scopeClass);
- }
- if(implType==exposedType)
- exp.arg($value);
- else
- exp.arg(JExpr.cast(implType,$value));
-
- m.body()._return( exp );
-
- m.javadoc()
- .append("Create an instance of ")
- .append(exposedElementType)
- .append("}");
-
- XmlElementDeclWriter xemw = m.annotate2(XmlElementDeclWriter.class);
- xemw.namespace(namespaceURI).name(localPart);
- if(scope!=null)
- xemw.scope(scope);
-
- if(ei.getSubstitutionHead()!=null) {
- QName n = ei.getSubstitutionHead().getElementName();
- xemw.substitutionHeadNamespace(n.getNamespaceURI());
- xemw.substitutionHeadName(n.getLocalPart());
- }
-
- if(ei.getDefaultValue()!=null)
- xemw.defaultValue(ei.getDefaultValue());
-
- if(ei.getProperty().inlineBinaryData())
- m.annotate(XmlInlineBinaryData.class);
-
- // if the element is adapter, put that annotation on the factory method
- outline.generateAdapterIfNecessary(ei.getProperty(),m);
- }
-
- /**
- * return a JFieldVar that represents the QName field for the given information.
- *
- * if it doesn't exist, create a static field in the class and store a new JFieldVar.
- */
- private JExpression getQNameInvocation(CElementInfo ei) {
- QName name = ei.getElementName();
- if(qnameMap.containsKey(name)) {
- return qnameMap.get(name);
- }
-
- if(qnameMap.size()>1024)
- // stop gap measure to avoid 'code too large' error in javac.
- return createQName(name);
-
- // [RESULT]
- // private static final QName _XYZ_NAME = new QName("uri", "local");
- JFieldVar qnameField = objectFactory.field(
- JMod.PRIVATE | JMod.STATIC | JMod.FINAL,
- QName.class,
- '_' + ei.getSqueezedName() + "_QNAME", createQName(name));
-
- qnameMap.put(name, qnameField);
-
- return qnameField;
- }
-
- /**
- * Generates an expression that evaluates to "new QName(...)"
- */
- private JInvocation createQName(QName name) {
- return JExpr._new(codeModel.ref(QName.class)).arg(name.getNamespaceURI()).arg(name.getLocalPart());
- }
-
- protected final void populate( ClassOutlineImpl cc, JClass sigType ) {
- // add static factory method for this class to JAXBContext.
- //
- // generate methods like:
- // public static final SIGTYPE createFoo() {
- // return new FooImpl();
- // }
-
- if(!cc.target.isAbstract()) {
- JMethod m = objectFactory.method(
- JMod.PUBLIC, sigType, "create" + cc.target.getSqueezedName() );
- m.body()._return( JExpr._new(cc.implRef) );
-
- // add some jdoc to avoid javadoc warnings in jdk1.4
- m.javadoc()
- .append("Create an instance of ")
- .append(cc.ref);
- }
-
-
- // add static factory methods for all the other constructors.
- Collection<? extends Constructor> consl = cc.target.getConstructors();
- if(consl.size()!=0) {
- // if we are going to add constructors with parameters,
- // first we need to have a default constructor.
- cc.implClass.constructor(JMod.PUBLIC);
- }
-
- {// collision check
- String name = cc.target.getSqueezedName();
- ClassOutlineImpl existing = valueFactoryNames.put(name,cc);
- if( existing!=null ) {
- outline.getErrorReceiver().error(existing.target.getLocator(),
- Messages.OBJECT_FACTORY_CONFLICT.format(name));
- outline.getErrorReceiver().error(cc.target.getLocator(),
- Messages.OBJECT_FACTORY_CONFLICT_RELATED.format());
- return;
- }
- }
-
- for( Constructor cons : consl ) {
- // method on ObjectFactory
- // [RESULT]
- // Foo createFoo( T1 a, T2 b, T3 c, ... ) throws JAXBException {
- // return new FooImpl(a,b,c,...);
- // }
- JMethod m = objectFactory.method( JMod.PUBLIC,
- cc.ref, "create" + cc.target.getSqueezedName() );
- JInvocation inv = JExpr._new(cc.implRef);
- m.body()._return(inv);
-
- // let's not throw this exception.
- // m._throws(codeModel.ref(JAXBException.class));
-
- // add some jdoc to avoid javadoc warnings in jdk1.4
- m.javadoc()
- .append( "Create an instance of " )
- .append( cc.ref )
- .addThrows(JAXBException.class).append("if an error occurs");
-
- // constructor
- // [RESULT]
- // FooImpl( T1 a, T2 b, T3 c, ... ) {
- // }
- JMethod c = cc.implClass.constructor(JMod.PUBLIC);
-
- for( String fieldName : cons.fields ) {
- CPropertyInfo field = cc.target.getProperty(fieldName);
- if(field==null) {
- outline.getErrorReceiver().error(cc.target.getLocator(),
- Messages.ILLEGAL_CONSTRUCTOR_PARAM.format(fieldName));
- continue;
- }
-
- fieldName = camelize(fieldName);
-
- FieldOutline fo = outline.getField(field);
- FieldAccessor accessor = fo.create(JExpr._this());
-
- // declare a parameter on this factory method and set
- // it to the field
- inv.arg(m.param( fo.getRawType(), fieldName ));
-
- JVar $var = c.param( fo.getRawType(), fieldName );
- accessor.fromRawValue(c.body(),'_'+fieldName,$var);
- }
- }
- }
-
-
- /** Change the first character to the lower case. */
- private static String camelize( String s ) {
- return Character.toLowerCase(s.charAt(0)) + s.substring(1);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/PackageOutlineImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/PackageOutlineImpl.java
deleted file mode 100644
index b5b44e35..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/PackageOutlineImpl.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlSchema;
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlSchemaWriter;
-import com.sun.tools.internal.xjc.model.CAttributePropertyInfo;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CElement;
-import com.sun.tools.internal.xjc.model.CElementPropertyInfo;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.CPropertyVisitor;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-import com.sun.tools.internal.xjc.model.CTypeRef;
-import com.sun.tools.internal.xjc.model.CValuePropertyInfo;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.outline.PackageOutline;
-import com.sun.tools.internal.xjc.outline.Aspect;
-
-/**
- * {@link PackageOutline} enhanced with schema2java specific
- * information.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com), Martin Grebac (martin.grebac@oracle.com)
- */
-public final class PackageOutlineImpl implements PackageOutline {
- private final Model _model;
- private final JPackage _package;
- private final ObjectFactoryGenerator objectFactoryGenerator;
-
- /*package*/ final Set<ClassOutlineImpl> classes = new HashSet<ClassOutlineImpl>();
- private final Set<ClassOutlineImpl> classesView = Collections.unmodifiableSet(classes);
-
- private String mostUsedNamespaceURI;
- private XmlNsForm elementFormDefault;
- private XmlNsForm attributeFormDefault;
-
- /**
- * The namespace URI most commonly used in classes in this package.
- * This should be used as the namespace URI for {@link XmlSchema#namespace()}.
- *
- * <p>
- * Null if no default
- *
- * @see #calcDefaultValues().
- */
- public String getMostUsedNamespaceURI() {
- return mostUsedNamespaceURI;
- }
-
- /**
- * The attribute form default for this package.
- * <p>
- * The value is computed by examining what would yield the smallest generated code.
- */
- public XmlNsForm getAttributeFormDefault() {
- assert attributeFormDefault!=null;
- return attributeFormDefault;
- }
-
- /**
- * The element form default for this package.
- * <p>
- * The value is computed by examining what would yield the smallest generated code.
- */
- public XmlNsForm getElementFormDefault() {
- assert elementFormDefault!=null;
- return elementFormDefault;
- }
-
- public JPackage _package() {
- return _package;
- }
-
- public ObjectFactoryGenerator objectFactoryGenerator() {
- return objectFactoryGenerator;
- }
-
- public Set<ClassOutlineImpl> getClasses() {
- return classesView;
- }
-
- public JDefinedClass objectFactory() {
- return objectFactoryGenerator.getObjectFactory();
- }
-
- protected PackageOutlineImpl( BeanGenerator outline, Model model, JPackage _pkg ) {
- this._model = model;
- this._package = _pkg;
- switch(model.strategy) {
- case BEAN_ONLY:
- objectFactoryGenerator = new PublicObjectFactoryGenerator(outline,model,_pkg);
- break;
- case INTF_AND_IMPL:
- objectFactoryGenerator = new DualObjectFactoryGenerator(outline,model,_pkg);
- break;
- default:
- throw new IllegalStateException();
- }
- }
-
- /**
- * Compute the most common namespace URI in this package
- * (to put into {@link XmlSchema#namespace()} and what value
- * we should put into {@link XmlSchema#elementFormDefault()}.
- *
- * This method is called after {@link #classes} field is filled up.
- */
- public void calcDefaultValues() {
- // short-circuit if xjc was told not to generate package level annotations in
- // package-info.java
- if(!_model.isPackageLevelAnnotations()) {
- mostUsedNamespaceURI = "";
- elementFormDefault = XmlNsForm.UNQUALIFIED;
- return;
- }
-
- // used to visit properties
- CPropertyVisitor<Void> propVisitor = new CPropertyVisitor<Void>() {
- public Void onElement(CElementPropertyInfo p) {
- for (CTypeRef tr : p.getTypes()) {
- countURI(propUriCountMap, tr.getTagName());
- }
- return null;
- }
-
- public Void onReference(CReferencePropertyInfo p) {
- for (CElement e : p.getElements()) {
- countURI(propUriCountMap, e.getElementName());
- }
- return null;
- }
-
- public Void onAttribute(CAttributePropertyInfo p) {
- return null;
- }
-
- public Void onValue(CValuePropertyInfo p) {
- return null;
- }
- };
-
-
- for (ClassOutlineImpl co : classes) {
- CClassInfo ci = co.target;
- countURI(uriCountMap, ci.getTypeName());
- countURI(uriCountMap, ci.getElementName());
-
- for( CPropertyInfo p : ci.getProperties() )
- p.accept(propVisitor);
- }
- mostUsedNamespaceURI = getMostUsedURI(uriCountMap);
-
- elementFormDefault = getFormDefault();
- attributeFormDefault = XmlNsForm.UNQUALIFIED;
- try {
- XmlNsForm modelValue = _model.getAttributeFormDefault(mostUsedNamespaceURI);
- attributeFormDefault = modelValue;
- } catch (Exception e) {
- // ignore and accept default
- }
-
- // generate package-info.java
- // we won't get this far if the user specified -npa
- if(!mostUsedNamespaceURI.equals("") || elementFormDefault==XmlNsForm.QUALIFIED || (attributeFormDefault == XmlNsForm.QUALIFIED)) {
- XmlSchemaWriter w = _model.strategy.getPackage(_package, Aspect.IMPLEMENTATION).annotate2(XmlSchemaWriter.class);
- if(!mostUsedNamespaceURI.equals(""))
- w.namespace(mostUsedNamespaceURI);
- if(elementFormDefault==XmlNsForm.QUALIFIED)
- w.elementFormDefault(elementFormDefault);
- if(attributeFormDefault==XmlNsForm.QUALIFIED)
- w.attributeFormDefault(attributeFormDefault);
- }
- }
-
- // Map to keep track of how often each type or element uri is used in this package
- // mostly used to calculate mostUsedNamespaceURI
- private HashMap<String, Integer> uriCountMap = new HashMap<String, Integer>();
-
- // Map to keep track of how often each property uri is used in this package
- // used to calculate elementFormDefault
- private HashMap<String, Integer> propUriCountMap = new HashMap<String, Integer>();
-
- /**
- * pull the uri out of the specified QName and keep track of it in the
- * specified hash map
- *
- * @param qname
- */
- private void countURI(HashMap<String, Integer> map, QName qname) {
- if (qname == null) return;
-
- String uri = qname.getNamespaceURI();
-
- if (map.containsKey(uri)) {
- map.put(uri, map.get(uri) + 1);
- } else {
- map.put(uri, 1);
- }
- }
-
- /**
- * Iterate through the hash map looking for the namespace used
- * most frequently. Ties are arbitrarily broken by the order
- * in which the map keys are iterated over.
- *
- * <p>
- * Because JAX-WS often reassigns the "" namespace URI,
- * and when that happens it unintentionally also renames (normally
- * unqualified) local elements, prefer non-"" URI when there's a tie.
- */
- private String getMostUsedURI(HashMap<String, Integer> map) {
- String mostPopular = null;
- int count = 0;
-
- for (Map.Entry<String,Integer> e : map.entrySet()) {
- String uri = e.getKey();
- int uriCount = e.getValue();
- if (mostPopular == null) {
- mostPopular = uri;
- count = uriCount;
- } else {
- if (uriCount > count || (uriCount==count && mostPopular.equals(""))) {
- mostPopular = uri;
- count = uriCount;
- }
- }
- }
-
- if (mostPopular == null) return "";
- return mostPopular;
- }
-
- /**
- * Calculate the element form defaulting.
- *
- * Compare the most frequently used property URI to the most frequently used
- * element/type URI. If they match, then return QUALIFIED
- */
- private XmlNsForm getFormDefault() {
- if (getMostUsedURI(propUriCountMap).equals("")) return XmlNsForm.UNQUALIFIED;
- else return XmlNsForm.QUALIFIED;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/PrivateObjectFactoryGenerator.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/PrivateObjectFactoryGenerator.java
deleted file mode 100644
index b0bea460..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/PrivateObjectFactoryGenerator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean;
-
-import javax.xml.bind.JAXBContext;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.codemodel.internal.fmt.JPropertyFile;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.runtime.JAXBContextFactory;
-
-/**
- * Generates private ObjectFactory.
- *
- * <p>
- * This class also puts a copy of {@link JAXBContextFactory}
- * to the impl package.
- *
- * @author Kohsuke Kawaguchi
- */
-final class PrivateObjectFactoryGenerator extends ObjectFactoryGeneratorImpl {
- public PrivateObjectFactoryGenerator(BeanGenerator outline, Model model, JPackage targetPackage) {
- super(outline, model, targetPackage.subPackage("impl"));
-
- JPackage implPkg = targetPackage.subPackage("impl");
-
- // put JAXBContextFactory into the impl package
- JClass factory = outline.generateStaticClass(JAXBContextFactory.class,implPkg);
-
- // and then put jaxb.properties to point to it
- JPropertyFile jaxbProperties = new JPropertyFile("jaxb.properties");
- targetPackage.addResourceFile(jaxbProperties);
- jaxbProperties.add(
- JAXBContext.JAXB_CONTEXT_FACTORY,
- factory.fullName());
- }
-
- void populate(CElementInfo ei) {
- populate(ei,Aspect.IMPLEMENTATION,Aspect.IMPLEMENTATION);
- }
-
- void populate(ClassOutlineImpl cc) {
- populate(cc,cc.implRef);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/PublicObjectFactoryGenerator.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/PublicObjectFactoryGenerator.java
deleted file mode 100644
index f7db9776..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/PublicObjectFactoryGenerator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean;
-
-import com.sun.codemodel.internal.JPackage;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.outline.Aspect;
-
-/**
- * Generates public ObjectFactory.
- *
- * @author Kohsuke Kawaguchi
- */
-final class PublicObjectFactoryGenerator extends ObjectFactoryGeneratorImpl {
- public PublicObjectFactoryGenerator(BeanGenerator outline, Model model, JPackage targetPackage) {
- super(outline, model, targetPackage);
- }
-
- void populate(CElementInfo ei) {
- populate(ei,Aspect.IMPLEMENTATION,Aspect.EXPOSED);
- }
-
- void populate(ClassOutlineImpl cc) {
- populate(cc,cc.ref);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/AbstractField.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/AbstractField.java
deleted file mode 100644
index 7f77ddee..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/AbstractField.java
+++ /dev/null
@@ -1,491 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import javax.xml.bind.annotation.W3CDomHandler;
-import javax.xml.bind.annotation.XmlList;
-import javax.xml.bind.annotation.XmlMixed;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.bind.annotation.XmlInlineBinaryData;
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JAnnotatable;
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JFieldVar;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlAnyElementWriter;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlAttributeWriter;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlElementRefWriter;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlElementRefsWriter;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlElementWriter;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlElementsWriter;
-import com.sun.tools.internal.xjc.generator.annotation.spec.XmlSchemaTypeWriter;
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.model.CAttributePropertyInfo;
-import com.sun.tools.internal.xjc.model.CElement;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.model.CElementPropertyInfo;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-import com.sun.tools.internal.xjc.model.CTypeInfo;
-import com.sun.tools.internal.xjc.model.CTypeRef;
-import com.sun.tools.internal.xjc.model.CValuePropertyInfo;
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import static com.sun.tools.internal.xjc.outline.Aspect.IMPLEMENTATION;
-import com.sun.tools.internal.xjc.outline.ClassOutline;
-import com.sun.tools.internal.xjc.outline.FieldAccessor;
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-import com.sun.tools.internal.xjc.reader.TypeUtil;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.api.SpecVersion;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import com.sun.xml.internal.bind.v2.TODO;
-
-/**
- * Useful base class for implementing {@link FieldOutline}.
- *
- * <p>
- * This class just provides a few utility methods and keep some
- * important variables so that they can be readily accessed any time.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-abstract class AbstractField implements FieldOutline {
-
- protected final ClassOutlineImpl outline;
-
- protected final CPropertyInfo prop;
-
- protected final JCodeModel codeModel;
-
- /**
- * The type of this field, which can hold all the possible types.
- */
- protected final JType implType;
-
- /**
- * The publicly visible type of this field.
- * If we are generating value classes implType==exposedType.
- */
- protected final JType exposedType;
-
- protected AbstractField( ClassOutlineImpl outline, CPropertyInfo prop ) {
- this.outline = outline;
- this.prop = prop;
- this.codeModel = outline.parent().getCodeModel();
- this.implType = getType(IMPLEMENTATION);
- this.exposedType = getType(Aspect.EXPOSED);
- }
-
- public final ClassOutline parent() {
- return outline;
- }
-
- public final CPropertyInfo getPropertyInfo() {
- return prop;
- }
-
-
- /**
- * Annotate the field according to the recipes given as {@link CPropertyInfo}.
- */
- protected void annotate( JAnnotatable field ) {
-
- assert(field!=null);
-
- /*
- TODO: consider moving this logic to somewhere else
- so that it can be better shared, for how a field gets
- annotated doesn't really depend on how we generate accessors.
-
- so perhaps we should separate those two.
- */
-
- // TODO: consider a visitor
- if (prop instanceof CAttributePropertyInfo) {
- annotateAttribute(field);
- } else if (prop instanceof CElementPropertyInfo) {
- annotateElement(field);
- } else if (prop instanceof CValuePropertyInfo) {
- field.annotate(XmlValue.class);
- } else if (prop instanceof CReferencePropertyInfo) {
- annotateReference(field);
- }
-
- outline.parent().generateAdapterIfNecessary(prop,field);
-
- QName st = prop.getSchemaType();
- if(st!=null)
- field.annotate2(XmlSchemaTypeWriter.class)
- .name(st.getLocalPart())
- .namespace(st.getNamespaceURI());
-
- if(prop.inlineBinaryData())
- field.annotate(XmlInlineBinaryData.class);
- }
-
- private void annotateReference(JAnnotatable field) {
- CReferencePropertyInfo rp = (CReferencePropertyInfo) prop;
-
- TODO.prototype();
- // this is just a quick hack to get the basic test working
-
- Collection<CElement> elements = rp.getElements();
-
- XmlElementRefWriter refw;
- if(elements.size()==1) {
- refw = field.annotate2(XmlElementRefWriter.class);
- CElement e = elements.iterator().next();
- refw.name(e.getElementName().getLocalPart())
- .namespace(e.getElementName().getNamespaceURI())
- .type(e.getType().toType(outline.parent(),IMPLEMENTATION));
- if(getOptions().target.isLaterThan(SpecVersion.V2_2))
- refw.required(rp.isRequired());
- } else
- if(elements.size()>1) {
- XmlElementRefsWriter refsw = field.annotate2(XmlElementRefsWriter.class);
- for( CElement e : elements ) {
- refw = refsw.value();
- refw.name(e.getElementName().getLocalPart())
- .namespace(e.getElementName().getNamespaceURI())
- .type(e.getType().toType(outline.parent(),IMPLEMENTATION));
- if(getOptions().target.isLaterThan(SpecVersion.V2_2))
- refw.required(rp.isRequired());
- }
- }
-
- if(rp.isMixed())
- field.annotate(XmlMixed.class);
-
- NClass dh = rp.getDOMHandler();
- if(dh!=null) {
- XmlAnyElementWriter xaew = field.annotate2(XmlAnyElementWriter.class);
- xaew.lax(rp.getWildcard().allowTypedObject);
-
- final JClass value = dh.toType(outline.parent(),IMPLEMENTATION);
- if(!value.equals(codeModel.ref(W3CDomHandler.class))) {
- xaew.value(value);
- }
- }
-
- }
-
- /**
- * Annotate the element property 'field'
- */
- private void annotateElement(JAnnotatable field) {
- CElementPropertyInfo ep = (CElementPropertyInfo) prop;
- List<CTypeRef> types = ep.getTypes();
-
- if(ep.isValueList()) {
- field.annotate(XmlList.class);
- }
-
- assert ep.getXmlName()==null;
-// if( eName!=null ) { // wrapper
-// XmlElementWrapperWriter xcw = field.annotate2(XmlElementWrapperWriter.class);
-// xcw.name(eName.getLocalPart())
-// .namespace(eName.getNamespaceURI());
-// }
-
- if (types.size() == 1) {
- CTypeRef t = types.get(0);
- writeXmlElementAnnotation(field, t, resolve(t,IMPLEMENTATION), false);
- } else {
- for (CTypeRef t : types) {
- // generate @XmlElements
- writeXmlElementAnnotation(field, t, resolve(t,IMPLEMENTATION), true);
- }
- xesw = null;
- }
- }
-
- /**
- * Generate the simplest XmlElement annotation possible taking all semantic optimizations
- * into account. This method is essentially equivalent to:
- *
- * xew.name(ctype.getTagName().getLocalPart())
- * .namespace(ctype.getTagName().getNamespaceURI())
- * .type(jtype)
- * .defaultValue(ctype.getDefaultValue());
- *
- * @param field
- * @param ctype
- * @param jtype
- * @param checkWrapper true if the method might need to generate XmlElements
- */
- private void writeXmlElementAnnotation( JAnnotatable field, CTypeRef ctype, JType jtype,
- boolean checkWrapper ) {
-
- // lazily create - we don't know if we need to generate anything yet
- XmlElementWriter xew = null;
-
- // these values are used to determine how to optimize the generated annotation
- XmlNsForm formDefault = parent()._package().getElementFormDefault();
- String propName = prop.getName(false);
-
- String enclosingTypeNS;
-
- if(parent().target.getTypeName()==null)
- enclosingTypeNS = parent()._package().getMostUsedNamespaceURI();
- else
- enclosingTypeNS = parent().target.getTypeName().getNamespaceURI();
-
- // generate the name property?
- String generatedName = ctype.getTagName().getLocalPart();
- if(!generatedName.equals(propName)) {
- if(xew == null) xew = getXew(checkWrapper, field);
- xew.name(generatedName);
- }
-
- // generate the namespace property?
- String generatedNS = ctype.getTagName().getNamespaceURI();
- if (((formDefault == XmlNsForm.QUALIFIED) && !generatedNS.equals(enclosingTypeNS)) ||
- ((formDefault == XmlNsForm.UNQUALIFIED) && !generatedNS.equals(""))) {
- if(xew == null) xew = getXew(checkWrapper, field);
- xew.namespace(generatedNS);
- }
-
- // generate the required() property?
- CElementPropertyInfo ep = (CElementPropertyInfo) prop;
- if(ep.isRequired() && exposedType.isReference()) {
- if(xew == null) xew = getXew(checkWrapper, field);
- xew.required(true);
- }
-
- // generate the type property?
-
- // I'm not too sure if this is the right place to handle this, but
- // if the schema definition is requiring this element, we should point to a primitive type,
- // not wrapper type (to correctly carry forward the required semantics.)
- // if it's a collection, we can't use a primitive, however.
- if(ep.isRequired() && !prop.isCollection())
- jtype = jtype.unboxify();
-
- // when generating code for 1.4, the runtime can't infer that ArrayList<Foo> derives
- // from Collection<Foo> (because List isn't parameterized), so always expclitly
- // generate @XmlElement(type=...)
- if( !jtype.equals(exposedType) || (getOptions().runtime14 && prop.isCollection())) {
- if(xew == null) xew = getXew(checkWrapper, field);
- xew.type(jtype);
- }
-
- // generate defaultValue property?
- final String defaultValue = ctype.getDefaultValue();
- if (defaultValue!=null) {
- if(xew == null) xew = getXew(checkWrapper, field);
- xew.defaultValue(defaultValue);
- }
-
- // generate the nillable property?
- if (ctype.isNillable()) {
- if(xew == null) xew = getXew(checkWrapper, field);
- xew.nillable(true);
- }
- }
-
- /**
- * Gets the {@link Options} in the current compilation context.
- */
- protected final Options getOptions() {
- return parent().parent().getModel().options;
- }
-
- // ugly hack to lazily create
- private XmlElementsWriter xesw = null;
-
- private XmlElementWriter getXew(boolean checkWrapper, JAnnotatable field) {
- XmlElementWriter xew;
- if(checkWrapper) {
- if(xesw==null) {
- xesw = field.annotate2(XmlElementsWriter.class);
- }
- xew = xesw.value();
- } else {
- xew = field.annotate2(XmlElementWriter.class);
- }
- return xew;
- }
-
- /**
- * Annotate the attribute property 'field'
- */
- private void annotateAttribute(JAnnotatable field) {
- CAttributePropertyInfo ap = (CAttributePropertyInfo) prop;
- QName attName = ap.getXmlName();
-
- // [RESULT]
- // @XmlAttribute(name="foo", required=true, namespace="bar://baz")
- XmlAttributeWriter xaw = field.annotate2(XmlAttributeWriter.class);
-
- final String generatedName = attName.getLocalPart();
- final String generatedNS = attName.getNamespaceURI();
-
- // Issue 570; always force generating name="" when do it when globalBindings underscoreBinding is set to non default value
- // generate name property?
- if(!generatedName.equals(ap.getName(false)) || !generatedName.equals(ap.getName(true)) || (outline.parent().getModel().getNameConverter() != NameConverter.standard)) {
- xaw.name(generatedName);
- }
-
- // generate namespace property?
- if(!generatedNS.equals("")) { // assume attributeFormDefault == unqualified
- xaw.namespace(generatedNS);
- }
-
- // generate required property?
- if(ap.isRequired()) {
- xaw.required(true);
- }
- }
-
- /**
- * Useful base class for implementing {@link FieldAccessor}.
- */
- protected abstract class Accessor implements FieldAccessor {
-
- /**
- * Evaluates to the target object this accessor should access.
- */
- protected final JExpression $target;
-
- protected Accessor( JExpression $target ) {
- this.$target = $target;
- }
-
- public final FieldOutline owner() {
- return AbstractField.this;
- }
-
- public final CPropertyInfo getPropertyInfo() {
- return prop;
- }
- }
-
-
-//
-//
-// utility methods
-//
-//
-
- /**
- * Generates the field declaration.
- */
- protected final JFieldVar generateField( JType type ) {
- return outline.implClass.field( JMod.PROTECTED, type, prop.getName(false) );
- }
-
- /**
- * Case from {@link #exposedType} to {@link #implType} if necessary.
- */
- protected final JExpression castToImplType( JExpression exp ) {
- if(implType==exposedType)
- return exp;
- else
- return JExpr.cast(implType,exp);
- }
-
- /**
- * Compute the type of a {@link CPropertyInfo}
- * @param aspect
- */
- protected JType getType(final Aspect aspect) {
- if(prop.getAdapter()!=null)
- return prop.getAdapter().customType.toType(outline.parent(),aspect);
-
- final class TypeList extends ArrayList<JType> {
- void add( CTypeInfo t ) {
- add( t.getType().toType(outline.parent(),aspect) );
- if(t instanceof CElementInfo) {
- // UGLY. element substitution is implemented in a way that
- // the derived elements are not assignable to base elements.
- // so when we compute the signature, we have to take derived types
- // into account
- add( ((CElementInfo)t).getSubstitutionMembers());
- }
- }
-
- void add( Collection<? extends CTypeInfo> col ) {
- for (CTypeInfo typeInfo : col)
- add(typeInfo);
- }
- }
- TypeList r = new TypeList();
- r.add(prop.ref());
-
- JType t;
- if(prop.baseType!=null)
- t = prop.baseType;
- else
- t = TypeUtil.getCommonBaseType(codeModel,r);
-
- // if item type is unboxable, convert t=Integer -> t=int
- // the in-memory data structure can't have primitives directly,
- // but this guarantees that items cannot legal hold null,
- // which helps us improve the boundary signature between our
- // data structure and user code
- if(prop.isUnboxable())
- t = t.unboxify();
- return t;
- }
-
- /**
- * Returns contents to be added to javadoc.
- */
- protected final List<Object> listPossibleTypes( CPropertyInfo prop ) {
- List<Object> r = new ArrayList<Object>();
- for( CTypeInfo tt : prop.ref() ) {
- JType t = tt.getType().toType(outline.parent(),Aspect.EXPOSED);
- if( t.isPrimitive() || t.isArray() )
- r.add(t.fullName());
- else {
- r.add(t);
- r.add("\n");
- }
- }
-
- return r;
- }
-
- /**
- * return the Java type for the given type reference in the model.
- */
- private JType resolve(CTypeRef typeRef,Aspect a) {
- return outline.parent().resolve(typeRef,a);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/AbstractFieldWithVar.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/AbstractFieldWithVar.java
deleted file mode 100644
index e7ab6da2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/AbstractFieldWithVar.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JFieldRef;
-import com.sun.codemodel.internal.JFieldVar;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-
-/**
- *
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com), Martin Grebac
- */
-abstract class AbstractFieldWithVar extends AbstractField {
-
- /**
- * Field declaration of the actual list object that we use
- * to store data.
- */
- private JFieldVar field;
-
- /**
- * Invoke {@link #createField()} after calling the
- * constructor.
- */
- AbstractFieldWithVar( ClassOutlineImpl outline, CPropertyInfo prop ) {
- super(outline,prop);
- }
-
- protected final void createField() {
- field = outline.implClass.field( JMod.PROTECTED,
- getFieldType(), prop.getName(false) );
-
- annotate(field);
- }
-
- /**
- * Gets the name of the getter method.
- *
- * <p>
- * This encapsulation is necessary because sometimes we use
- * {@code isXXXX} as the method name.
- */
- protected String getGetterMethod() {
- if (getOptions().enableIntrospection) {
- return ((getFieldType().isPrimitive() &&
- getFieldType().boxify().getPrimitiveType()==codeModel.BOOLEAN) ?
- "is":"get") + prop.getName(true);
- } else {
- return (getFieldType().boxify().getPrimitiveType()==codeModel.BOOLEAN?"is":"get")+prop.getName(true);
- }
- }
-
- /**
- * Returns the type used to store the value of the field in memory.
- */
- protected abstract JType getFieldType();
-
- protected JFieldVar ref() { return field; }
-
- public final JType getRawType() {
- return exposedType;
- }
-
- protected abstract class Accessor extends AbstractField.Accessor {
-
- protected Accessor(JExpression $target) {
- super($target);
- this.$ref = $target.ref(AbstractFieldWithVar.this.ref());
- }
-
- /**
- * Reference to the field bound by the target object.
- */
- protected final JFieldRef $ref;
-
- public final void toRawValue(JBlock block, JVar $var) {
- if (getOptions().enableIntrospection) {
- block.assign($var,$target.invoke(getGetterMethod()));
- } else {
- block.assign($var,$target.invoke(getGetterMethod()));
- }
- }
-
- public final void fromRawValue(JBlock block, String uniqueName, JExpression $var) {
- block.invoke($target,("set"+prop.getName(true))).arg($var);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/AbstractListField.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/AbstractListField.java
deleted file mode 100644
index 50fdf456..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/AbstractListField.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import java.util.List;
-
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JFieldRef;
-import com.sun.codemodel.internal.JFieldVar;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JOp;
-import com.sun.codemodel.internal.JPrimitiveType;
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-
-/**
- * Common code for property renderer that generates a List as
- * its underlying data structure.
- *
- * <p>
- * For performance reasons, the actual list object used to store
- * data is lazily created.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-abstract class AbstractListField extends AbstractField {
- /** The field that stores the list. */
- protected JFieldVar field;
-
- /**
- * a method that lazily initializes a List.
- * Lazily created.
- *
- * [RESULT]
- * List _getFoo() {
- * if(field==null)
- * field = create new list;
- * return field;
- * }
- */
- private JMethod internalGetter;
-
- /**
- * If this collection property is a collection of a primitive type,
- * this variable refers to that primitive type.
- * Otherwise null.
- */
- protected final JPrimitiveType primitiveType;
-
- protected final JClass listT = codeModel.ref(List.class).narrow(exposedType.boxify());
-
- /**
- * True to create a new instance of List eagerly in the constructor.
- * False otherwise.
- *
- * <p>
- * Setting it to true makes the generated code slower (as more list instances need to be
- * allocated), but it works correctly if the user specifies the custom type of a list.
- */
- private final boolean eagerInstanciation;
-
- /**
- * Call {@link #generate()} method right after this.
- */
- protected AbstractListField(ClassOutlineImpl outline, CPropertyInfo prop, boolean eagerInstanciation) {
- super(outline,prop);
- this.eagerInstanciation = eagerInstanciation;
-
- if( implType instanceof JPrimitiveType ) {
- // primitive types don't have this tricky distinction
- assert implType==exposedType;
- primitiveType = (JPrimitiveType)implType;
- } else
- primitiveType = null;
- }
-
- protected final void generate() {
-
- // for the collectionType customization to take effect, the field needs to be strongly typed,
- // not just List<Foo>.
- field = outline.implClass.field( JMod.PROTECTED, listT, prop.getName(false) );
- if(eagerInstanciation)
- field.init(newCoreList());
-
- annotate(field);
-
- // generate the rest of accessors
- generateAccessors();
- }
-
- private void generateInternalGetter() {
- internalGetter = outline.implClass.method(JMod.PROTECTED,listT,"_get"+prop.getName(true));
- if(!eagerInstanciation) {
- // if eagerly instanciated, the field can't be null
- fixNullRef(internalGetter.body());
- }
- internalGetter.body()._return(field);
- }
-
- /**
- * Generates statement(s) so that the successive {@link Accessor#ref(boolean)} with
- * true will always return a non-null list.
- *
- * This is useful to avoid generating redundant internal getter.
- */
- protected final void fixNullRef(JBlock block) {
- block._if(field.eq(JExpr._null()))._then()
- .assign(field,newCoreList());
- }
-
- public JType getRawType() {
- return codeModel.ref(List.class).narrow(exposedType.boxify());
- }
-
- private JExpression newCoreList() {
- return JExpr._new(getCoreListType());
- }
-
- /**
- * Concrete class that implements the List interface.
- * Used as the actual data storage.
- */
- protected abstract JClass getCoreListType();
-
-
- /** Generates accessor methods. */
- protected abstract void generateAccessors();
-
-
-
- /**
- *
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
- protected abstract class Accessor extends AbstractField.Accessor {
-
- /**
- * Reference to the {@link AbstractListField#field}
- * of the target object.
- */
- protected final JFieldRef field;
-
- protected Accessor( JExpression $target ) {
- super($target);
- field = $target.ref(AbstractListField.this.field);
- }
-
-
- protected final JExpression unbox( JExpression exp ) {
- if(primitiveType==null) return exp;
- else return primitiveType.unwrap(exp);
- }
- protected final JExpression box( JExpression exp ) {
- if(primitiveType==null) return exp;
- else return primitiveType.wrap(exp);
- }
-
- /**
- * Returns a reference to the List field that stores the data.
- * <p>
- * Using this method hides the fact that the list is lazily
- * created.
- *
- * @param canBeNull
- * if true, the returned expression may be null (this is
- * when the list is still not constructed.) This could be
- * useful when the caller can deal with null more efficiently.
- * When the list is null, it should be treated as if the list
- * is empty.
- *
- * if false, the returned expression will never be null.
- * This is the behavior users would see.
- */
- protected final JExpression ref(boolean canBeNull) {
- if(canBeNull)
- return field;
- if(internalGetter==null)
- generateInternalGetter();
- return $target.invoke(internalGetter);
- }
-
- public JExpression count() {
- return JOp.cond( field.eq(JExpr._null()), JExpr.lit(0), field.invoke("size") );
- }
-
- public void unsetValues( JBlock body ) {
- body.assign(field,JExpr._null());
- }
- public JExpression hasSetValue() {
- return field.ne(JExpr._null()).cand(field.invoke("isEmpty").not());
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ArrayField.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ArrayField.java
deleted file mode 100644
index dc051050..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ArrayField.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import com.sun.codemodel.internal.JAssignmentTarget;
-import java.util.List;
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JForLoop;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JOp;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.generator.bean.MethodWriter;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-
-/**
- * Realizes a property as an "indexed property"
- * as specified in the JAXB spec.
- *
- * <p>
- * We will generate the following set of methods:
- * <pre>
- * T[] getX();
- * T getX( int idx );
- * void setX(T[] values);
- * void setX( int idx, T value );
- * </pre>
- *
- * We still use List as our back storage.
- * This renderer also handles boxing/unboxing if
- * T is a boxed type.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-final class ArrayField extends AbstractListField {
-
- class Accessor extends AbstractListField.Accessor {
- protected Accessor( JExpression $target ) {
- super($target);
- }
-
- public void toRawValue(JBlock block, JVar $var) {
- block.assign($var,$target.invoke($getAll));
- }
-
- public void fromRawValue(JBlock block, String uniqueName, JExpression $var) {
- block.invoke($target,$setAll).arg($var);
- }
-
- @Override
- public JExpression hasSetValue() {
- return field.ne(JExpr._null()).cand(field.ref("length").gt(JExpr.lit(0)));
- }
-
- }
-
- private JMethod $setAll;
-
- private JMethod $getAll;
-
- ArrayField(ClassOutlineImpl context, CPropertyInfo prop) {
- super(context,prop,false);
- generateArray();
- }
-
- protected final void generateArray() {
- field = outline.implClass.field( JMod.PROTECTED, getCoreListType(), prop.getName(false) );
- annotate(field);
-
- // generate the rest of accessors
- generateAccessors();
- }
-
- public void generateAccessors() {
-
- MethodWriter writer = outline.createMethodWriter();
- Accessor acc = create(JExpr._this());
- JVar $idx,$value; JBlock body;
-
- // [RESULT] T[] getX() {
- // if( <var>==null ) return new T[0];
- // T[] retVal = new T[this._return.length] ;
- // System.arraycopy(this._return, 0, "retVal", 0, this._return.length);
- // return (retVal);
- // }
- $getAll = writer.declareMethod( exposedType.array(),"get"+prop.getName(true));
- writer.javadoc().append(prop.javadoc);
- body = $getAll.body();
-
- body._if( acc.ref(true).eq(JExpr._null()) )._then()
- ._return(JExpr.newArray(exposedType,0));
- JVar var = body.decl(exposedType.array(), "retVal", JExpr.newArray(implType,acc.ref(true).ref("length")));
- body.add(codeModel.ref(System.class).staticInvoke("arraycopy")
- .arg(acc.ref(true)).arg(JExpr.lit(0))
- .arg(var)
- .arg(JExpr.lit(0)).arg(acc.ref(true).ref("length")));
- body._return(JExpr.direct("retVal"));
-
- List<Object> returnTypes = listPossibleTypes(prop);
- writer.javadoc().addReturn().append("array of\n").append(returnTypes);
-
- // [RESULT]
- // ET getX(int idx) {
- // if( <var>==null ) throw new IndexOutOfBoundsException();
- // return unbox(<var>.get(idx));
- // }
- JMethod $get = writer.declareMethod(exposedType,"get"+prop.getName(true));
- $idx = writer.addParameter(codeModel.INT,"idx");
-
- $get.body()._if(acc.ref(true).eq(JExpr._null()))._then()
- ._throw(JExpr._new(codeModel.ref(IndexOutOfBoundsException.class)));
-
- writer.javadoc().append(prop.javadoc);
- $get.body()._return(acc.ref(true).component($idx));
-
- writer.javadoc().addReturn().append("one of\n").append(returnTypes);
-
- // [RESULT] int getXLength() {
- // if( <var>==null ) throw new IndexOutOfBoundsException();
- // return <ref>.length;
- // }
- JMethod $getLength = writer.declareMethod(codeModel.INT,"get"+prop.getName(true)+"Length");
- $getLength.body()._if(acc.ref(true).eq(JExpr._null()))._then()
- ._return(JExpr.lit(0));
- $getLength.body()._return(acc.ref(true).ref("length"));
-
- // [RESULT] void setX(ET[] values) {
- // int len = values.length;
- // for( int i=0; i<len; i++ )
- // <ref>[i] = values[i];
- // }
- $setAll = writer.declareMethod(
- codeModel.VOID,
- "set"+prop.getName(true));
-
- writer.javadoc().append(prop.javadoc);
- $value = writer.addParameter(exposedType.array(),"values");
- JVar $len = $setAll.body().decl(codeModel.INT,"len", $value.ref("length"));
-
- $setAll.body().assign(
- (JAssignmentTarget) acc.ref(true),
- castToImplTypeArray(JExpr.newArray(
- codeModel.ref(exposedType.erasure().fullName()),
- $len)));
-
- JForLoop _for = $setAll.body()._for();
- JVar $i = _for.init( codeModel.INT, "i", JExpr.lit(0) );
- _for.test( JOp.lt($i,$len) );
- _for.update( $i.incr() );
- _for.body().assign(acc.ref(true).component($i), castToImplType(acc.box($value.component($i))));
-
- writer.javadoc().addParam($value)
- .append("allowed objects are\n")
- .append(returnTypes);
-
- // [RESULT] ET setX(int idx, ET value)
- // <ref>[idx] = value
- JMethod $set = writer.declareMethod(
- exposedType,
- "set"+prop.getName(true));
- $idx = writer.addParameter( codeModel.INT, "idx" );
- $value = writer.addParameter( exposedType, "value" );
-
- writer.javadoc().append(prop.javadoc);
-
- body = $set.body();
- body._return( JExpr.assign(acc.ref(true).component($idx),
- castToImplType(acc.box($value))));
-
- writer.javadoc().addParam($value)
- .append("allowed object is\n")
- .append(returnTypes);
-
- }
-
- @Override
- public JType getRawType() {
- return exposedType.array();
- }
-
- protected JClass getCoreListType() {
- return exposedType.array();
- }
-
- public Accessor create(JExpression targetObject) {
- return new Accessor(targetObject);
- }
-
- /**
- * Case from {@link #exposedType} to array of {@link #implType} .
- */
- protected final JExpression castToImplTypeArray( JExpression exp ) {
- return JExpr.cast(implType.array(), exp);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ConstField.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ConstField.java
deleted file mode 100644
index b8641cdf..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ConstField.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JFieldVar;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JPrimitiveType;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.outline.FieldAccessor;
-
-/**
- * Realizes a property as a "public static final" property on the interface.
- * This class can handle both boxed/unboxed types and both
- * single/colllection.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-final class ConstField extends AbstractField {
-// /**
-// * Number of items in this property, when
-// * {@link #isCollection}==true.
-// */
-// private final int count=1;
-
- /** Generated constant property on the interface. */
- private final JFieldVar $ref;
-
- ConstField( ClassOutlineImpl outline, CPropertyInfo prop ) {
- super(outline,prop);
-
- // we only support value constraints for a single-value property.
- assert !prop.isCollection();
-
- JPrimitiveType ptype = implType.boxify().getPrimitiveType();
-
- // generate the constant
- JExpression defaultValue = null;
- if(prop.defaultValue!=null)
- defaultValue = prop.defaultValue.compute(outline.parent());
-
- $ref = outline.ref.field(JMod.PUBLIC|JMod.STATIC|JMod.FINAL,
- ptype!=null?ptype:implType, prop.getName(true), defaultValue );
- $ref.javadoc().append(prop.javadoc);
-
- annotate($ref);
- }
-
- public JType getRawType() {
-// if( isCollection ) return getInfo().array();
- return exposedType;
- }
-
-
- public FieldAccessor create(JExpression target) {
- return new Accessor(target);
- }
-
- private class Accessor extends AbstractField.Accessor {
-
- Accessor( JExpression $target ) {
- super($target);
- }
-
- public void unsetValues( JBlock body ) {
- ; // can't unset values
- }
- public JExpression hasSetValue() {
- return null; // can't generate the isSet/unset methods
- }
- public void toRawValue(JBlock block, JVar $var) {
- // TODO: rethink abstraction. Those constant fields
- // don't have "access" to them.
- throw new UnsupportedOperationException();
- }
-
- public void fromRawValue(JBlock block, String uniqueName, JExpression $var) {
- throw new UnsupportedOperationException();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ConstFieldRenderer.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ConstFieldRenderer.java
deleted file mode 100644
index 9b75ff5a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ConstFieldRenderer.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-
-/**
- * {@link FieldRenderer} for possibly constant field.
- *
- * <p>
- * Since we don't know if the constant can be actually generated until
- * we get to the codemodel building phase, this renderer lazily
- * determines if it wants to generate a constant field or a normal property.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ConstFieldRenderer implements FieldRenderer {
-
- private final FieldRenderer fallback;
-
- protected ConstFieldRenderer(FieldRenderer fallback) {
- this.fallback = fallback;
- }
-
- public FieldOutline generate(ClassOutlineImpl outline, CPropertyInfo prop) {
- if(prop.defaultValue.compute(outline.parent())==null)
- return fallback.generate(outline, prop);
- else
- return new ConstField(outline,prop);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ContentListField.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ContentListField.java
deleted file mode 100644
index c2f687aa..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/ContentListField.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.generator.bean.MethodWriter;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import java.io.Serializable;
-
-/**
- * Realizes a property as an untyped {@link List}.
- *
- * <pre>
- * List getXXX();
- * </pre>
- *
- * <h2>Default value handling</h2>
- * <p>
- * Since unmarshaller just adds new values into the storage,
- * we can't fill the storage by default values at the time of
- * instanciation. (or oherwise values found in the document will
- * be appended to default values, where it should overwrite them.)
- * <p>
- * Therefore, when the object is created, the storage will be empty.
- * When the getXXX method is called, we'll check if the storage is
- * modified in anyway. If it is modified, it must mean that the values
- * are found in the document, so we just return it.
- *
- * Otherwise we will fill in default values and return it to the user.
- *
- * <p>
- * When a list has default values, its dirty flag is set to true.
- * Marshaller will check this and treat it appropriately.
- *
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class ContentListField extends AbstractListField {
-
- /**
- * A concrete class that implements the List interface.
- * An instance of this class will be used to store data
- * for this field.
- */
- private final JClass coreList;
-
- /** List getFIELD() method. */
- private JMethod $get;
-
- /**
- * @param coreList
- * A concrete class that implements the List interface.
- * An instance of this class will be used to store data
- * for this field.
- */
- protected ContentListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
- // the JAXB runtime picks ArrayList if the signature is List,
- // so don't do eager allocation if it's ArrayList.
- // otherwise we need to do eager allocation so that the collection type specified by the user
- // will be used.
- super(context, prop, false);
- this.coreList = coreList;
- generate();
- }
-
- protected final JClass getCoreListType() {
- return coreList;
- }
-
- @Override
- public void generateAccessors() {
- final MethodWriter writer = outline.createMethodWriter();
- final Accessor acc = create(JExpr._this());
-
- // [RESULT]
- // List getXXX() {
- // return <ref>;
- // }
- $get = writer.declareMethod(listT,"get"+prop.getName(true));
- writer.javadoc().append(prop.javadoc);
- JBlock block = $get.body();
- fixNullRef(block); // avoid using an internal getter
- block._return(acc.ref(true));
-
- String pname = NameConverter.standard.toVariableName(prop.getName(true));
- writer.javadoc().append(
- "Gets the value of the "+pname+" property.\n\n"+
- "<p>\n" +
- "This accessor method returns a reference to the live list,\n" +
- "not a snapshot. Therefore any modification you make to the\n" +
- "returned list will be present inside the JAXB object.\n" +
- "This is why there is not a <CODE>set</CODE> method for the " +pname+ " property.\n" +
- "\n"+
- "<p>\n" +
- "For example, to add a new item, do as follows:\n"+
- "<pre>\n"+
- " get"+prop.getName(true)+"().add(newItem);\n"+
- "</pre>\n"+
- "\n\n"
- );
-
- writer.javadoc().append(
- "<p>\n" +
- "Objects of the following type(s) are allowed in the list\n")
- .append(listPossibleTypes(prop));
- }
-
- public Accessor create(JExpression targetObject) {
- return new Accessor(targetObject);
- }
-
- class Accessor extends AbstractListField.Accessor {
- protected Accessor( JExpression $target ) {
- super($target);
- }
-
- public void toRawValue(JBlock block, JVar $var) {
- // [RESULT]
- // $<var>.addAll(bean.getLIST());
- // list.toArray( array );
- block.assign($var,JExpr._new(codeModel.ref(ArrayList.class).narrow(exposedType.boxify())).arg(
- $target.invoke($get)
- ));
- }
-
- public void fromRawValue(JBlock block, String uniqueName, JExpression $var) {
- // [RESULT]
- // bean.getLIST().addAll($<var>);
- JVar $list = block.decl(listT,uniqueName+'l',$target.invoke($get));
- block.invoke($list,"addAll").arg($var);
- }
- }
-
- @Override
- protected JType getType(final Aspect aspect) {
- if (Aspect.IMPLEMENTATION.equals(aspect)) {
- return super.getType(aspect);
- }
- return codeModel.ref(Serializable.class);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/DefaultFieldRenderer.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/DefaultFieldRenderer.java
deleted file mode 100644
index 2069d6c1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/DefaultFieldRenderer.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import java.util.ArrayList;
-
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-import java.io.Serializable;
-
-/**
- * Default implementation of the FieldRendererFactory
- * that faithfully implements the semantics demanded by the JAXB spec.
- *
- * <p>
- * This class is just a facade --- it just determines which
- * {@link FieldRenderer} to use and just delegate the work.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-final class DefaultFieldRenderer implements FieldRenderer {
-
- private final FieldRendererFactory frf;
-
- /**
- * Use {@link FieldRendererFactory#getDefault()}.
- */
- DefaultFieldRenderer(FieldRendererFactory frf) {
- this.frf = frf;
- }
-
- public DefaultFieldRenderer(FieldRendererFactory frf, FieldRenderer defaultCollectionFieldRenderer ) {
- this.frf = frf;
- this.defaultCollectionFieldRenderer = defaultCollectionFieldRenderer;
- }
-
- private FieldRenderer defaultCollectionFieldRenderer;
-
-
- public FieldOutline generate(ClassOutlineImpl outline, CPropertyInfo prop) {
- return decideRenderer(outline,prop).generate(outline,prop);
- }
-
- private FieldRenderer decideRenderer(ClassOutlineImpl outline, CPropertyInfo prop) {
-
- if (prop instanceof CReferencePropertyInfo) {
- CReferencePropertyInfo p = (CReferencePropertyInfo)prop;
- if (p.isDummy()) {
- return frf.getDummyList(outline.parent().getCodeModel().ref(ArrayList.class));
- }
- if (p.isContent() && (p.isMixedExtendedCust())) {
- return frf.getContentList(outline.parent().getCodeModel().ref(ArrayList.class).narrow(Serializable.class));
- }
- }
-
- if(!prop.isCollection()) {
- // non-collection field
-
- // TODO: check for bidning info for optionalPrimitiveType=boxed or
- // noHasMethod=false and noDeletedMethod=false
- if(prop.isUnboxable())
- // this one uses a primitive type as much as possible
- return frf.getRequiredUnboxed();
- else
- // otherwise use the default non-collection field
- return frf.getSingle();
- }
-
- if( defaultCollectionFieldRenderer==null ) {
- return frf.getList(outline.parent().getCodeModel().ref(ArrayList.class));
- }
-
- // this field is a collection field.
- // use untyped list as the default. This is consistent
- // to the JAXB spec.
- return defaultCollectionFieldRenderer;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/DummyListField.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/DummyListField.java
deleted file mode 100644
index 244c8c0e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/DummyListField.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import com.sun.codemodel.internal.JAnnotatable;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-import com.sun.xml.internal.bind.annotation.OverrideAnnotationOf;
-
-/**
- * Realizes a property as an untyped {@link List}.
- *
- * <pre>
- * List getXXX();
- * </pre>
- *
- * <h2>Default value handling</h2>
- * <p>
- * Since unmarshaller just adds new values into the storage,
- * we can't fill the storage by default values at the time of
- * instanciation. (or oherwise values found in the document will
- * be appended to default values, where it should overwrite them.)
- * <p>
- * Therefore, when the object is created, the storage will be empty.
- * When the getXXX method is called, we'll check if the storage is
- * modified in anyway. If it is modified, it must mean that the values
- * are found in the document, so we just return it.
- *
- * Otherwise we will fill in default values and return it to the user.
- *
- * <p>
- * When a list has default values, its dirty flag is set to true.
- * Marshaller will check this and treat it appropriately.
- *
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class DummyListField extends AbstractListField {
-
- /**
- * A concrete class that imp lements the List interface.
- * An instance of this class will be used to store data
- * for this field.
- */
- private final JClass coreList;
-
-
- /** List getFIELD() method. */
- private JMethod $get;
-
- /**
- * @param coreList
- * A concrete class that implements the List interface.
- * An instance of this class will be used to store data
- * for this field.
- */
- protected DummyListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
- // the JAXB runtime picks ArrayList if the signature is List,
- // so don't do eager allocation if it's ArrayList.
- // otherwise we need to do eager allocation so that the collection type specified by the user
- // will be used.
- super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
- this.coreList = coreList.narrow(exposedType.boxify());
- generate();
- }
-
- /**
- * Annotate the field according to the recipes given as {@link CPropertyInfo}.
- */
- @Override
- protected void annotate( JAnnotatable field ) {
- super.annotate(field);
-
- if (prop instanceof CReferencePropertyInfo) {
- CReferencePropertyInfo pref = (CReferencePropertyInfo)prop;
- if (pref.isDummy()) {
- annotateDummy(field);
- }
- }
-
- }
-
- private void annotateDummy(JAnnotatable field) {
- field.annotate(OverrideAnnotationOf.class);
- }
-
- protected final JClass getCoreListType() {
- return coreList;
- }
-
- @Override
- public void generateAccessors() { }
-
- public Accessor create(JExpression targetObject) {
- return new Accessor(targetObject);
- }
-
- class Accessor extends AbstractListField.Accessor {
- protected Accessor( JExpression $target ) {
- super($target);
- }
-
- public void toRawValue(JBlock block, JVar $var) {
- // [RESULT]
- // $<var>.addAll(bean.getLIST());
- // list.toArray( array );
- block.assign($var,JExpr._new(codeModel.ref(ArrayList.class).narrow(exposedType.boxify())).arg(
- $target.invoke($get)
- ));
- }
-
- public void fromRawValue(JBlock block, String uniqueName, JExpression $var) {
- // [RESULT]
- // bean.getLIST().addAll($<var>);
- JVar $list = block.decl(listT,uniqueName+'l',$target.invoke($get));
- block.invoke($list,"addAll").arg($var);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/FieldRenderer.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/FieldRenderer.java
deleted file mode 100644
index 7b7ecfb7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/FieldRenderer.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-
-
-/**
- * Abstract model of one field in a generated class.
- *
- * <p>
- * Responsible for "realizing" a Java property by actually generating
- * members(s) to store the property value and a set of methods
- * to manipulate them.
- *
- * <p>
- * Objects that implement this interface also encapsulates the
- * <b>internal</b> access to the field.
- *
- * <p>
- * For discussion of the model this interface is representing, see
- * the "field meta model" design document.
- *
- * REVISIT:
- * refactor this to two interfaces that provide
- * (1) internal access and (2) external access.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface FieldRenderer {
- /**
- * Generates accesssors and fields for the given implementation
- * class, then return {@link FieldOutline} for accessing
- * the generated field.
- */
- public FieldOutline generate( ClassOutlineImpl context, CPropertyInfo prop);
-
-// //
-// // field renderers
-// //
-// public static final FieldRenderer DEFAULT
-// = new DefaultFieldRenderer();
-//
-// public static final FieldRenderer ARRAY
-// = new GenericFieldRenderer(ArrayField.class);
-//
-// public static final FieldRenderer REQUIRED_UNBOXED
-// = new GenericFieldRenderer(UnboxedField.class);
-//
-// public static final FieldRenderer SINGLE
-// = new GenericFieldRenderer(SingleField.class);
-//
-// public static final FieldRenderer SINGLE_PRIMITIVE_ACCESS
-// = new GenericFieldRenderer(SinglePrimitiveAccessField.class);
-//
-// public static final FieldRenderer JAXB_DEFAULT
-// = new DefaultFieldRenderer();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/FieldRendererFactory.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/FieldRendererFactory.java
deleted file mode 100644
index ced30ded..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/FieldRendererFactory.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import com.sun.tools.internal.xjc.Options;
-import com.sun.codemodel.internal.JClass;
-
-/**
- * Factory for {@link FieldRenderer}.
- *
- * <p>
- * This class can be overridden by a plugin to change the code generation
- * behavior of XJC. Note that such changes aren't composable; for a given
- * schema compilation, only one instance of {@link FieldRendererFactory} is
- * used.
- *
- * <p>
- * See {@link Options#fieldRendererFactory}
- *
- * <p>
- * To be more precise, since {@link FieldRenderer} is just a strategy pattern
- * and by itself is stateless, the "factory methods" don't necessarily need
- * to create new instances of {@link FieldRenderer} --- it can just return
- * a set of pre-created instances.
- *
- * @author Kohsuke Kawaguchi
- */
-public class FieldRendererFactory {
-
- public FieldRenderer getDefault() {
- return DEFAULT;
- }
- public FieldRenderer getArray() {
- return ARRAY;
- }
- public FieldRenderer getRequiredUnboxed() {
- return REQUIRED_UNBOXED;
- }
- public FieldRenderer getSingle() {
- return SINGLE;
- }
- public FieldRenderer getSinglePrimitiveAccess() {
- return SINGLE_PRIMITIVE_ACCESS;
- }
- public FieldRenderer getList(JClass coreList) {
- return new UntypedListFieldRenderer(coreList);
- }
- public FieldRenderer getContentList(JClass coreList) {
- return new UntypedListFieldRenderer(coreList, false, true);
- }
- public FieldRenderer getDummyList(JClass coreList) {
- return new UntypedListFieldRenderer(coreList, true, false);
- }
- public FieldRenderer getConst(FieldRenderer fallback) {
- return new ConstFieldRenderer(fallback);
- }
-
- private final FieldRenderer DEFAULT
- = new DefaultFieldRenderer(this);
-
- private static final FieldRenderer ARRAY
- = new GenericFieldRenderer(ArrayField.class);
-
- private static final FieldRenderer REQUIRED_UNBOXED
- = new GenericFieldRenderer(UnboxedField.class);
-
- private static final FieldRenderer SINGLE
- = new GenericFieldRenderer(SingleField.class);
-
- private static final FieldRenderer SINGLE_PRIMITIVE_ACCESS
- = new GenericFieldRenderer(SinglePrimitiveAccessField.class);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/GenericFieldRenderer.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/GenericFieldRenderer.java
deleted file mode 100644
index 00cb11f7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/GenericFieldRenderer.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-
-/**
- * Creates
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class GenericFieldRenderer implements FieldRenderer {
- private Constructor constructor;
-
- public GenericFieldRenderer( Class fieldClass ) {
- try {
- constructor = fieldClass.getDeclaredConstructor(new Class[]{ClassOutlineImpl.class,CPropertyInfo.class});
- } catch (NoSuchMethodException e) {
- throw new NoSuchMethodError(e.getMessage());
- }
- }
-
- public FieldOutline generate(ClassOutlineImpl context, CPropertyInfo prop) {
- try {
- return (FieldOutline)constructor.newInstance(new Object[]{context,prop});
- } catch (InstantiationException e) {
- throw new InstantiationError(e.getMessage());
- } catch (IllegalAccessException e) {
- throw new IllegalAccessError(e.getMessage());
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if(t instanceof RuntimeException)
- throw (RuntimeException)t;
- if(t instanceof Error)
- throw (Error)t;
-
- // impossible
- throw new AssertionError(t);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/IsSetField.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/IsSetField.java
deleted file mode 100644
index 3fbebc60..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/IsSetField.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.generator.bean.MethodWriter;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.outline.FieldAccessor;
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-
-/**
- *
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class IsSetField extends AbstractField {
-
- private final FieldOutline core;
-
- private final boolean generateUnSetMethod;
- private final boolean generateIsSetMethod;
-
- protected IsSetField( ClassOutlineImpl outline, CPropertyInfo prop,
- FieldOutline core, boolean unsetMethod, boolean issetMethod ) {
- super(outline,prop);
- this.core = core;
- this.generateIsSetMethod = issetMethod;
- this.generateUnSetMethod = unsetMethod;
-
- generate(outline,prop);
- }
-
-
- private void generate( ClassOutlineImpl outline, CPropertyInfo prop ) {
- // add isSetXXX and unsetXXX.
- MethodWriter writer = outline.createMethodWriter();
-
- JCodeModel codeModel = outline.parent().getCodeModel();
-
- FieldAccessor acc = core.create(JExpr._this());
-
- if( generateIsSetMethod ) {
- // [RESULT] boolean isSetXXX()
- JExpression hasSetValue = acc.hasSetValue();
- if( hasSetValue==null ) {
- // this field renderer doesn't support the isSet/unset methods generation.
- // issue an error
- throw new UnsupportedOperationException();
- }
- writer.declareMethod(codeModel.BOOLEAN,"isSet"+this.prop.getName(true))
- .body()._return( hasSetValue );
- }
-
- if( generateUnSetMethod ) {
- // [RESULT] void unsetXXX()
- acc.unsetValues(
- writer.declareMethod(codeModel.VOID,"unset"+this.prop.getName(true)).body() );
- }
- }
-
- public JType getRawType() {
- return core.getRawType();
- }
-
- public FieldAccessor create(JExpression targetObject) {
- return new Accessor(targetObject);
- }
-
- private class Accessor extends AbstractField.Accessor {
-
- private final FieldAccessor core;
-
- Accessor( JExpression $target ) {
- super($target);
- this.core = IsSetField.this.core.create($target);
- }
-
-
- public void unsetValues( JBlock body ) {
- core.unsetValues(body);
- }
- public JExpression hasSetValue() {
- return core.hasSetValue();
- }
- public void toRawValue(JBlock block, JVar $var) {
- core.toRawValue(block,$var);
- }
-
- public void fromRawValue(JBlock block, String uniqueName, JExpression $var) {
- core.fromRawValue(block,uniqueName,$var);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/IsSetFieldRenderer.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/IsSetFieldRenderer.java
deleted file mode 100644
index c2e3412c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/IsSetFieldRenderer.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-
-/**
- * FieldRenderer that wraps another field generator
- * and produces isSetXXX unsetXXX methods.
- *
- * <p>
- * This follows the decorator design pattern so that
- * the caller of FieldRenderer can forget about details
- * of the method generation.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class IsSetFieldRenderer implements FieldRenderer {
- private final FieldRenderer core;
- private final boolean generateUnSetMethod;
- private final boolean generateIsSetMethod;
-
- public IsSetFieldRenderer(
- FieldRenderer core,
- boolean generateUnSetMethod, boolean generateIsSetMethod ) {
-
- this.core = core;
- this.generateUnSetMethod = generateUnSetMethod;
- this.generateIsSetMethod = generateIsSetMethod;
- }
-
- public FieldOutline generate(ClassOutlineImpl context, CPropertyInfo prop) {
- return new IsSetField(context,prop,
- core.generate(context, prop),
- generateUnSetMethod,generateIsSetMethod);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle.properties
deleted file mode 100644
index d4f372e2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DEFAULT_SETTER_JAVADOC = \
- Sets the value of the {0} property.
-
-DEFAULT_GETTER_JAVADOC = \
- Gets the value of the {0} property.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_de.properties
deleted file mode 100644
index 39d9cead..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_de.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DEFAULT_SETTER_JAVADOC = Legt den Wert der {0}-Eigenschaft fest.
-
-DEFAULT_GETTER_JAVADOC = Ruft den Wert der {0}-Eigenschaft ab.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_es.properties
deleted file mode 100644
index 802fabae..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_es.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DEFAULT_SETTER_JAVADOC = Define el valor de la propiedad {0}.
-
-DEFAULT_GETTER_JAVADOC = Obtiene el valor de la propiedad {0}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_fr.properties
deleted file mode 100644
index b62521eb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_fr.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DEFAULT_SETTER_JAVADOC = D\u00E9finit la valeur de la propri\u00E9t\u00E9 {0}.
-
-DEFAULT_GETTER_JAVADOC = Obtient la valeur de la propri\u00E9t\u00E9 {0}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_it.properties
deleted file mode 100644
index 8a3c10ed..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_it.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DEFAULT_SETTER_JAVADOC = Imposta il valore della propriet\u00E0 {0}.
-
-DEFAULT_GETTER_JAVADOC = Recupera il valore della propriet\u00E0 {0}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_ja.properties
deleted file mode 100644
index 0f62cab1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_ja.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DEFAULT_SETTER_JAVADOC = {0}\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u5024\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002
-
-DEFAULT_GETTER_JAVADOC = {0}\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u5024\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_ko.properties
deleted file mode 100644
index 00894d28..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_ko.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DEFAULT_SETTER_JAVADOC = {0} \uC18D\uC131\uC758 \uAC12\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.
-
-DEFAULT_GETTER_JAVADOC = {0} \uC18D\uC131\uC758 \uAC12\uC744 \uAC00\uC838\uC635\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_pt_BR.properties
deleted file mode 100644
index b79c72ce..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_pt_BR.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DEFAULT_SETTER_JAVADOC = Define o valor da propriedade {0}.
-
-DEFAULT_GETTER_JAVADOC = Obt\u00E9m o valor da propriedade {0}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_zh_CN.properties
deleted file mode 100644
index b38eb128..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_zh_CN.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DEFAULT_SETTER_JAVADOC = \u8BBE\u7F6E{0}\u5C5E\u6027\u7684\u503C\u3002
-
-DEFAULT_GETTER_JAVADOC = \u83B7\u53D6{0}\u5C5E\u6027\u7684\u503C\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_zh_TW.properties
deleted file mode 100644
index 8c3f5acc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_zh_TW.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DEFAULT_SETTER_JAVADOC = \u8A2D\u5B9A {0} \u7279\u6027\u7684\u503C.
-
-DEFAULT_GETTER_JAVADOC = \u53D6\u5F97 {0} \u7279\u6027\u7684\u503C.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/Messages.java
deleted file mode 100644
index c8f5d6a1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/Messages.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Message resources
- */
-public enum Messages {
- DEFAULT_GETTER_JAVADOC, // 1 arg
- DEFAULT_SETTER_JAVADOC, // 1 arg
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName().substring(0, Messages.class.getName().lastIndexOf('.'))+ ".MessageBundle");
-
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/NoExtendedContentField.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/NoExtendedContentField.java
deleted file mode 100644
index a60654ed..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/NoExtendedContentField.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.generator.bean.MethodWriter;
-import com.sun.tools.internal.xjc.model.CElement;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import java.io.Serializable;
-import java.util.Set;
-
-/**
- * Realizes a property as an untyped {@link List}.
- *
- * <pre>
- * List getXXX();
- * </pre>
- *
- * <h2>Default value handling</h2>
- * <p>
- * Since unmarshaller just adds new values into the storage,
- * we can't fill the storage by default values at the time of
- * instanciation. (or oherwise values found in the document will
- * be appended to default values, where it should overwrite them.)
- * <p>
- * Therefore, when the object is created, the storage will be empty.
- * When the getXXX method is called, we'll check if the storage is
- * modified in anyway. If it is modified, it must mean that the values
- * are found in the document, so we just return it.
- *
- * Otherwise we will fill in default values and return it to the user.
- *
- * <p>
- * When a list has default values, its dirty flag is set to true.
- * Marshaller will check this and treat it appropriately.
- *
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class NoExtendedContentField extends AbstractListField {
-
- /**
- * A concrete class that implements the List interface.
- * An instance of this class will be used to store data
- * for this field.
- */
- private final JClass coreList;
-
- /** List getFIELD() method. */
- private JMethod $get;
-
- /**
- * @param coreList
- * A concrete class that implements the List interface.
- * An instance of this class will be used to store data
- * for this field.
- */
- protected NoExtendedContentField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
- // the JAXB runtime picks ArrayList if the signature is List,
- // so don't do eager allocation if it's ArrayList.
- // otherwise we need to do eager allocation so that the collection type specified by the user
- // will be used.
- super(context, prop, false);
- this.coreList = coreList;
- generate();
- }
-
- protected final JClass getCoreListType() {
- return coreList;
- }
-
- @Override
- public void generateAccessors() {
- final MethodWriter writer = outline.createMethodWriter();
- final Accessor acc = create(JExpr._this());
-
- // [RESULT]
- // List getXXX() {
- // return <ref>;
- // }
- $get = writer.declareMethod(listT,"get"+prop.getName(true));
- writer.javadoc().append(prop.javadoc);
- JBlock block = $get.body();
- fixNullRef(block); // avoid using an internal getter
- block._return(acc.ref(true));
-
- String pname = NameConverter.standard.toVariableName(prop.getName(true));
- writer.javadoc().append(
- "Gets the value of the "+pname+" property.\n\n"+
- "<p>\n" +
- "This accessor method returns a reference to the live list,\n" +
- "not a snapshot. Therefore any modification you make to the\n" +
- "returned list will be present inside the JAXB object.\n" +
- "This is why there is not a <CODE>set</CODE> method for the " +pname+ " property.\n" +
- "\n"+
- "<p>\n" +
- "For example, to add a new item, do as follows:\n"+
- "<pre>\n"+
- " get"+prop.getName(true)+"().add(newItem);\n"+
- "</pre>\n"+
- "\n\n"
- );
-
- writer.javadoc().append(
- "<p>\n" +
- "Objects of the following type(s) are allowed in the list\n")
- .append(listPossibleTypes(prop));
- }
-
- public Accessor create(JExpression targetObject) {
- return new Accessor(targetObject);
- }
-
- class Accessor extends AbstractListField.Accessor {
- protected Accessor( JExpression $target ) {
- super($target);
- }
-
- public void toRawValue(JBlock block, JVar $var) {
- // [RESULT]
- // $<var>.addAll(bean.getLIST());
- // list.toArray( array );
- block.assign($var,JExpr._new(codeModel.ref(ArrayList.class).narrow(getType(Aspect.EXPOSED).boxify())).arg(
- $target.invoke($get)
- ));
- }
-
- public void fromRawValue(JBlock block, String uniqueName, JExpression $var) {
- // [RESULT]
- // bean.getLIST().addAll($<var>);
- JVar $list = block.decl(listT,uniqueName+'l',$target.invoke($get));
- block.invoke($list,"addAll").arg($var);
- }
- }
-
- @Override
- protected JType getType(final Aspect aspect) {
- if (Aspect.IMPLEMENTATION.equals(aspect)) {
- return super.getType(aspect);
- }
-
- if (prop instanceof CReferencePropertyInfo) {
- Set<CElement> elements = ((CReferencePropertyInfo)prop).getElements();
- if ((elements != null) && (elements.size() > 0)) {
- return codeModel.ref(Serializable.class);
- }
- }
-
- return codeModel.ref(String.class);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/SingleField.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/SingleField.java
deleted file mode 100644
index ab48d4b8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/SingleField.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import java.util.List;
-
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JConditional;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.generator.bean.MethodWriter;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.outline.FieldAccessor;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-
-/**
- * Realizes a property through one getter and one setter.
- * This renders:
- *
- * <pre>
- * T' field;
- * T getXXX() { ... }
- * void setXXX(T value) { ... }
- * </pre>
- *
- * <p>
- * Normally T'=T, but under some tricky circumstances they could be different
- * (like T'=Integer, T=int.)
- *
- * This realization is only applicable to fields with (1,1)
- * or (0,1) multiplicity.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class SingleField extends AbstractFieldWithVar {
-
- protected SingleField(ClassOutlineImpl context, CPropertyInfo prop) {
- this(context,prop,false);
- }
-
- /**
- *
- * @param forcePrimitiveAccess
- * forces the setter/getter to expose the primitive type.
- * it's a pointless customization, but it's nevertheless in the spec.
- */
- protected SingleField(ClassOutlineImpl context, CPropertyInfo prop, boolean forcePrimitiveAccess ) {
- super(context, prop);
- assert !exposedType.isPrimitive() && !implType.isPrimitive();
-
- createField();
-
- MethodWriter writer = context.createMethodWriter();
- NameConverter nc = context.parent().getModel().getNameConverter();
-
- // [RESULT]
- // Type getXXX() {
- // #ifdef default value
- // if(value==null)
- // return defaultValue;
- // #endif
- // return value;
- // }
- JExpression defaultValue = null;
- if(prop.defaultValue!=null)
- defaultValue = prop.defaultValue.compute(outline.parent());
-
- // if Type is a wrapper and we have a default value,
- // we can use the primitive type.
- JType getterType;
- if (getOptions().enableIntrospection) {
- if (forcePrimitiveAccess)
- getterType = exposedType.unboxify();
- else
- getterType = exposedType;
- } else {
- if (defaultValue != null || forcePrimitiveAccess)
- getterType = exposedType.unboxify();
- else
- getterType = exposedType;
- }
-
- JMethod $get = writer.declareMethod( getterType,getGetterMethod() );
- String javadoc = prop.javadoc;
- if(javadoc.length()==0)
- javadoc = Messages.DEFAULT_GETTER_JAVADOC.format(nc.toVariableName(prop.getName(true)));
- writer.javadoc().append(javadoc);
-
-
- if(defaultValue==null) {
- $get.body()._return(ref());
- } else {
- JConditional cond = $get.body()._if(ref().eq(JExpr._null()));
- cond._then()._return(defaultValue);
- cond._else()._return(ref());
- }
-
- List<Object> possibleTypes = listPossibleTypes(prop);
- writer.javadoc().addReturn()
- .append("possible object is\n")
- .append(possibleTypes);
-
- // [RESULT]
- // void setXXX(Type newVal) {
- // this.value = newVal;
- // }
- JMethod $set = writer.declareMethod( codeModel.VOID, "set"+prop.getName(true) );
- JType setterType = exposedType;
- if(forcePrimitiveAccess) setterType = setterType.unboxify();
- JVar $value = writer.addParameter( setterType, "value" );
- JBlock body = $set.body();
- if ($value.type().equals(implType)) {
- body.assign(JExpr._this().ref(ref()), $value);
- } else {
- body.assign(JExpr._this().ref(ref()), castToImplType($value));
- }
-
- // setter always get the default javadoc. See issue #381
- writer.javadoc().append(Messages.DEFAULT_SETTER_JAVADOC.format(nc.toVariableName(prop.getName(true))));
- writer.javadoc().addParam($value)
- .append("allowed object is\n")
- .append(possibleTypes);
- }
-
- public final JType getFieldType() {
- return implType;
- }
-
- public FieldAccessor create(JExpression targetObject) {
- return new Accessor(targetObject);
- }
-
- protected class Accessor extends AbstractFieldWithVar.Accessor {
- protected Accessor(JExpression $target) {
- super($target);
- }
-
- public void unsetValues( JBlock body ) {
- body.assign( $ref, JExpr._null() );
- }
- public JExpression hasSetValue() {
- return $ref.ne( JExpr._null() );
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/SinglePrimitiveAccessField.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/SinglePrimitiveAccessField.java
deleted file mode 100644
index a9745646..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/SinglePrimitiveAccessField.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-
-/**
- * {@link SingleField} that forces the primitive accessor type.
- *
- * @author Kohsuke Kawaguchi
- */
-public class SinglePrimitiveAccessField extends SingleField {
- protected SinglePrimitiveAccessField(ClassOutlineImpl context, CPropertyInfo prop) {
- super(context, prop,true);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/UnboxedField.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/UnboxedField.java
deleted file mode 100644
index 128360df..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/UnboxedField.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JPrimitiveType;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.generator.bean.MethodWriter;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.FieldAccessor;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-
-/**
- * A required primitive property.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class UnboxedField extends AbstractFieldWithVar {
-
- /**
- * The primitive version of {@link #implType} and {@link #exposedType}.
- */
- private final JPrimitiveType ptype;
-
-
- protected UnboxedField( ClassOutlineImpl outline, CPropertyInfo prop ) {
- super(outline,prop);
- // primitive types don't have this distintion
- assert implType==exposedType;
-
- ptype = (JPrimitiveType) implType;
- assert ptype!=null;
-
- createField();
-
- // apparently a required attribute can be still defaulted.
- // so this assertion is incorrect.
- // assert prop.defaultValue==null;
-
- MethodWriter writer = outline.createMethodWriter();
- NameConverter nc = outline.parent().getModel().getNameConverter();
-
- JBlock body;
-
- // [RESULT]
- // Type getXXX() {
- // return value;
- // }
- JMethod $get = writer.declareMethod( ptype, getGetterMethod() );
- String javadoc = prop.javadoc;
- if(javadoc.length()==0)
- javadoc = Messages.DEFAULT_GETTER_JAVADOC.format(nc.toVariableName(prop.getName(true)));
- writer.javadoc().append(javadoc);
-
- $get.body()._return(ref());
-
-
- // [RESULT]
- // void setXXX( Type value ) {
- // this.value = value;
- // }
- JMethod $set = writer.declareMethod( codeModel.VOID, "set"+prop.getName(true) );
- JVar $value = writer.addParameter( ptype, "value" );
- body = $set.body();
- body.assign(JExpr._this().ref(ref()),$value);
- // setter always get the default javadoc. See issue #381
- writer.javadoc().append(Messages.DEFAULT_SETTER_JAVADOC.format(nc.toVariableName(prop.getName(true))));
-
- }
-
- protected JType getType(Aspect aspect) {
- return super.getType(aspect).boxify().getPrimitiveType();
- }
-
- protected JType getFieldType() {
- return ptype;
- }
-
- public FieldAccessor create(JExpression targetObject) {
- return new Accessor(targetObject) {
-
- public void unsetValues( JBlock body ) {
- // you can't unset a value
- }
-
- public JExpression hasSetValue() {
- return JExpr.TRUE;
- }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/UntypedListField.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/UntypedListField.java
deleted file mode 100644
index 3c76d184..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/UntypedListField.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.generator.bean.MethodWriter;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-
-/**
- * Realizes a property as an untyped {@link List}.
- *
- * <pre>
- * List getXXX();
- * </pre>
- *
- * <h2>Default value handling</h2>
- * <p>
- * Since unmarshaller just adds new values into the storage,
- * we can't fill the storage by default values at the time of
- * instanciation. (or oherwise values found in the document will
- * be appended to default values, where it should overwrite them.)
- * <p>
- * Therefore, when the object is created, the storage will be empty.
- * When the getXXX method is called, we'll check if the storage is
- * modified in anyway. If it is modified, it must mean that the values
- * are found in the document, so we just return it.
- *
- * Otherwise we will fill in default values and return it to the user.
- *
- * <p>
- * When a list has default values, its dirty flag is set to true.
- * Marshaller will check this and treat it appropriately.
- *
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class UntypedListField extends AbstractListField {
-
- /**
- * A concrete class that implements the List interface.
- * An instance of this class will be used to store data
- * for this field.
- */
- private final JClass coreList;
-
-
- /** List getFIELD() method. */
- private JMethod $get;
-
- /**
- * @param coreList
- * A concrete class that implements the List interface.
- * An instance of this class will be used to store data
- * for this field.
- */
- protected UntypedListField(ClassOutlineImpl context, CPropertyInfo prop, JClass coreList) {
- // the JAXB runtime picks ArrayList if the signature is List,
- // so don't do eager allocation if it's ArrayList.
- // otherwise we need to do eager allocation so that the collection type specified by the user
- // will be used.
- super(context, prop, !coreList.fullName().equals("java.util.ArrayList"));
- this.coreList = coreList.narrow(exposedType.boxify());
- generate();
- }
-
- protected final JClass getCoreListType() {
- return coreList;
- }
-
- @Override
- public void generateAccessors() {
- final MethodWriter writer = outline.createMethodWriter();
- final Accessor acc = create(JExpr._this());
-
- // [RESULT]
- // List getXXX() {
- // return <ref>;
- // }
- $get = writer.declareMethod(listT,"get"+prop.getName(true));
- writer.javadoc().append(prop.javadoc);
- JBlock block = $get.body();
- fixNullRef(block); // avoid using an internal getter
- block._return(acc.ref(true));
-
- String pname = NameConverter.standard.toVariableName(prop.getName(true));
- writer.javadoc().append(
- "Gets the value of the "+pname+" property.\n\n"+
- "<p>\n" +
- "This accessor method returns a reference to the live list,\n" +
- "not a snapshot. Therefore any modification you make to the\n" +
- "returned list will be present inside the JAXB object.\n" +
- "This is why there is not a <CODE>set</CODE> method for the " +pname+ " property.\n" +
- "\n"+
- "<p>\n" +
- "For example, to add a new item, do as follows:\n"+
- "<pre>\n"+
- " get"+prop.getName(true)+"().add(newItem);\n"+
- "</pre>\n"+
- "\n\n"
- );
-
- writer.javadoc().append(
- "<p>\n" +
- "Objects of the following type(s) are allowed in the list\n")
- .append(listPossibleTypes(prop));
- }
-
- public Accessor create(JExpression targetObject) {
- return new Accessor(targetObject);
- }
-
- class Accessor extends AbstractListField.Accessor {
- protected Accessor( JExpression $target ) {
- super($target);
- }
-
- public void toRawValue(JBlock block, JVar $var) {
- // [RESULT]
- // $<var>.addAll(bean.getLIST());
- // list.toArray( array );
- block.assign($var,JExpr._new(codeModel.ref(ArrayList.class).narrow(exposedType.boxify())).arg(
- $target.invoke($get)
- ));
- }
-
- public void fromRawValue(JBlock block, String uniqueName, JExpression $var) {
- // [RESULT]
- // bean.getLIST().addAll($<var>);
- JVar $list = block.decl(listT,uniqueName+'l',$target.invoke($get));
- block.invoke($list,"addAll").arg($var);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/UntypedListFieldRenderer.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/UntypedListFieldRenderer.java
deleted file mode 100644
index 72c95f1a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/UntypedListFieldRenderer.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.bean.field;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.tools.internal.xjc.generator.bean.ClassOutlineImpl;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-
-/**
- *
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class UntypedListFieldRenderer implements FieldRenderer {
-
- private JClass coreList;
- private boolean dummy;
- private boolean content;
-
- protected UntypedListFieldRenderer( JClass coreList) {
- this(coreList, false, false);
- }
-
- protected UntypedListFieldRenderer( JClass coreList, boolean dummy, boolean content) {
- this.coreList = coreList;
- this.dummy = dummy;
- this.content = content;
- }
-
- public FieldOutline generate(ClassOutlineImpl context, CPropertyInfo prop) {
- if (dummy) {
- return new DummyListField(context, prop, coreList);
- }
- if (content) {
- return new ContentListField(context, prop, coreList);
- }
- return new UntypedListField(context, prop, coreList);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/package.html b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/package.html
deleted file mode 100644
index 5ab3a588..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<body><p>
-FieldRenderer and its implementation classes.
-Unless you are deriving from these classes to define your own custom renderer,
-you shouldn't be using these classes directly. Use the outline package.
-</p></body>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/package-info.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/package-info.java
deleted file mode 100644
index a5937502..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/package-info.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * <h1>Code Generator</h1>.
- *
- * This package hosts code for generating CodeModel AST from {@link com.sun.tools.internal.xjc.model Model}
- * classes.
- */
-package com.sun.tools.internal.xjc.generator;
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/BlockReference.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/BlockReference.java
deleted file mode 100644
index 1da69196..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/BlockReference.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.util;
-
-import com.sun.codemodel.internal.JBlock;
-
-/**
- * Holds a reference to a {@link JBlock} object.
- *
- * <p>
- * This interface is usually used when one wants to create
- * a new JBlock object lazily.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface BlockReference {
- /**
- * @param create
- * If false, the method will return null if the block is
- * not yet created.
- */
- JBlock get(boolean create);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/ExistingBlockReference.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/ExistingBlockReference.java
deleted file mode 100644
index 295b1a21..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/ExistingBlockReference.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.util;
-
-import com.sun.codemodel.internal.JBlock;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class ExistingBlockReference implements BlockReference {
- private final JBlock block;
-
- public ExistingBlockReference( JBlock _block ) {
- this.block = _block;
- }
-
- public JBlock get(boolean create) {
- return block;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/LazyBlockReference.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/LazyBlockReference.java
deleted file mode 100644
index 31a19de3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/LazyBlockReference.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.util;
-
-import com.sun.codemodel.internal.JBlock;
-
-/**
- * Lazy block reference.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class LazyBlockReference implements BlockReference {
-
- private JBlock block = null;
-
- /**
- * Called when a block needs to be created.
- * Only called once in the whole life time of this object.
- */
- protected abstract JBlock create();
-
- public JBlock get(boolean create) {
- if(!create) return block;
- if(block==null)
- block = create();
- return block;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/WhitespaceNormalizer.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/WhitespaceNormalizer.java
deleted file mode 100644
index 5013f5e8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/util/WhitespaceNormalizer.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.generator.util;
-
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JStringLiteral;
-import com.sun.xml.internal.bind.WhiteSpaceProcessor;
-
-/**
- * Generates code that performs the whitespace normalization.
- */
-public abstract class WhitespaceNormalizer
-{
- /**
- * Generates the expression that normalizes
- * the given expression (which evaluates to java.lang.String).
- *
- * @param codeModel
- * The owner code model object under which a new expression
- * will be created.
- */
- public abstract JExpression generate( JCodeModel codeModel, JExpression literal );
-
- /**
- * Parses "preserve","replace" or "collapse" into
- * the corresponding WhitespaceNormalizer object.
- *
- * @param method
- * Either "preserve", "replace", or "collapse"
- *
- * @exception IllegalArgumentException
- * when the specified method is invalid.
- */
- public static WhitespaceNormalizer parse( String method ) {
- if( method.equals("preserve") )
- return PRESERVE;
-
- if( method.equals("replace") )
- return REPLACE;
-
- if( method.equals("collapse") )
- return COLLAPSE;
-
- throw new IllegalArgumentException(method);
- }
-
- public static final WhitespaceNormalizer PRESERVE = new WhitespaceNormalizer() {
- public JExpression generate( JCodeModel codeModel, JExpression literal ) {
- return literal;
- }
- };
-
- public static final WhitespaceNormalizer REPLACE = new WhitespaceNormalizer() {
- public JExpression generate( JCodeModel codeModel, JExpression literal ) {
- // WhitespaceProcessor.replace(<literal>);
- if( literal instanceof JStringLiteral )
- // optimize
- return JExpr.lit( WhiteSpaceProcessor.replace(((JStringLiteral)literal).str) );
- else
- return codeModel.ref(WhiteSpaceProcessor.class)
- .staticInvoke("replace").arg(literal);
- }
- };
-
- public static final WhitespaceNormalizer COLLAPSE = new WhitespaceNormalizer() {
- public JExpression generate( JCodeModel codeModel, JExpression literal ) {
- // WhitespaceProcessor.replace(<literal>);
- if( literal instanceof JStringLiteral )
- // optimize
- return JExpr.lit( WhiteSpaceProcessor.collapse(((JStringLiteral)literal).str) );
- else
- return codeModel.ref(WhiteSpaceProcessor.class)
- .staticInvoke("collapse").arg(literal);
- }
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/AbstractCElement.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/AbstractCElement.java
deleted file mode 100644
index 1015bbe6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/AbstractCElement.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import javax.xml.bind.annotation.XmlTransient;
-
-import com.sun.xml.internal.xsom.XSComponent;
-
-import org.xml.sax.Locator;
-
-/**
- * Partial default implementation of {@link CElement}.
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class AbstractCElement extends AbstractCTypeInfoImpl implements CElement {
-
- /**
- * The location in the source file where this class was declared.
- */
- @XmlTransient
- private final Locator locator;
-
- private boolean isAbstract;
-
- protected AbstractCElement(Model model, XSComponent source, Locator locator, CCustomizations customizations) {
- super(model, source, customizations);
- this.locator = locator;
- }
-
- public Locator getLocator() {
- return locator;
- }
-
- public boolean isAbstract() {
- return isAbstract;
- }
-
- public void setAbstract() {
- isAbstract = true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/AbstractCTypeInfoImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/AbstractCTypeInfoImpl.java
deleted file mode 100644
index 94d2a8fa..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/AbstractCTypeInfoImpl.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import javax.activation.MimeType;
-
-import com.sun.codemodel.internal.JExpression;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XmlString;
-
-/**
- * Partial implementation of {@link CTypeInfo}.
- *
- * <p>
- * The inheritance of {@link TypeUse} by {@link CTypeInfo}
- * isn't a normal inheritance (see {@link CTypeInfo} for more.)
- * This class implments methods on {@link TypeUse} for {@link CTypeInfo}.
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class AbstractCTypeInfoImpl implements CTypeInfo {
-
- private final CCustomizations customizations;
-
- private final XSComponent source;
-
- protected AbstractCTypeInfoImpl(Model model, XSComponent source, CCustomizations customizations) {
- if(customizations==null)
- customizations = CCustomizations.EMPTY;
- else
- customizations.setParent(model,this);
- this.customizations = customizations;
- this.source = source;
- }
-
- public final boolean isCollection() {
- return false;
- }
-
- public final CAdapter getAdapterUse() {
- return null;
- }
-
- public final ID idUse() {
- return ID.NONE;
- }
-
- public final XSComponent getSchemaComponent() {
- return source;
- }
-
- /**
- * @deprecated
- * why are you calling an unimplemented method?
- */
- public final boolean canBeReferencedByIDREF() {
- // we aren't doing any error check in XJC, so no point in implementing this method.
- throw new UnsupportedOperationException();
- }
-
- /**
- * No default {@link MimeType}.
- */
- public MimeType getExpectedMimeType() {
- return null;
- }
-
- public CCustomizations getCustomizations() {
- return customizations;
- }
-
- // this is just a convenient default
- public JExpression createConstant(Outline outline, XmlString lexical) {
- return null;
- }
-
- public final Locatable getUpstream() {
- throw new UnsupportedOperationException();
- }
-
- public final Location getLocation() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/AutoClassNameAllocator.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/AutoClassNameAllocator.java
deleted file mode 100644
index 674af3b8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/AutoClassNameAllocator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import java.util.Set;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.HashSet;
-
-import com.sun.tools.internal.xjc.api.ClassNameAllocator;
-
-/**
- * {@link ClassNameAllocator} filter that performs automatic name conflict resolution.
- *
- * @author Kohsuke Kawaguchi
- */
-public class AutoClassNameAllocator implements ClassNameAllocator {
- private final ClassNameAllocator core;
-
- private final Map<String,Set<String>> names = new HashMap<String,Set<String>>();
-
- public AutoClassNameAllocator(ClassNameAllocator core) {
- this.core = core;
- }
-
- public String assignClassName(String packageName, String className) {
- className = determineName(packageName, className);
- if(core!=null)
- className = core.assignClassName(packageName,className);
- return className;
- }
-
- private String determineName(String packageName, String className) {
- Set<String> s = names.get(packageName);
- if(s==null) {
- s = new HashSet<String>();
- names.put(packageName,s);
- }
-
- if(s.add(className))
- return className;
-
- for(int i=2;true;i++) {
- if(s.add(className+i))
- return className+i;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CAdapter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CAdapter.java
deleted file mode 100644
index 33b5d37a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CAdapter.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.tools.internal.xjc.model.nav.EagerNClass;
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.model.nav.NavigatorImpl;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.xml.internal.bind.v2.model.core.Adapter;
-
-/**
- * Extended {@link Adapter} for use within XJC.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class CAdapter extends Adapter<NType,NClass> {
-
- /**
- * If non-null, the same as {@link #adapterType} but more conveniently typed.
- */
- private JClass adapterClass1;
-
- /**
- * If non-null, the same as {@link #adapterType} but more conveniently typed.
- */
- private Class<? extends XmlAdapter> adapterClass2;
-
- /**
- * When the adapter class is statically known to us.
- *
- * @param copy
- * true to copy the adapter class into the user package,
- * or otherwise just refer to the class specified via the
- * adapter parameter.
- */
- public CAdapter(Class<? extends XmlAdapter> adapter, boolean copy) {
- super(getRef(adapter,copy),NavigatorImpl.theInstance);
- this.adapterClass1 = null;
- this.adapterClass2 = adapter;
- }
-
- static NClass getRef( final Class<? extends XmlAdapter> adapter, boolean copy ) {
- if(copy) {
- // TODO: this is a hack. the code generation should be defered until
- // the backend. (right now constant generation happens in the front-end)
- return new EagerNClass(adapter) {
- @Override
- public JClass toType(Outline o, Aspect aspect) {
- return o.addRuntime(adapter);
- }
- public String fullName() {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
- };
- } else {
- return NavigatorImpl.theInstance.ref(adapter);
- }
- }
-
- public CAdapter(JClass adapter) {
- super( NavigatorImpl.theInstance.ref(adapter), NavigatorImpl.theInstance);
- this.adapterClass1 = adapter;
- this.adapterClass2 = null;
- }
-
- public JClass getAdapterClass(Outline o) {
- if(adapterClass1==null)
- adapterClass1 = o.getCodeModel().ref(adapterClass2);
- return adapterType.toType(o, Aspect.EXPOSED);
- }
-
- /**
- * Returns true if the adapter is for whitespace normalization.
- * Such an adapter can be ignored when producing a list.
- */
- public boolean isWhitespaceAdapter() {
- return adapterClass2==CollapsedStringAdapter.class || adapterClass2==NormalizedStringAdapter.class;
- }
-
- /**
- * Returns the adapter class if the adapter type is statically known to XJC.
- * <p>
- * This method is mostly for enabling certain optimized code generation.
- */
- public Class<? extends XmlAdapter> getAdapterIfKnown() {
- return adapterClass2;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CArrayInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CArrayInfo.java
deleted file mode 100644
index 1f30f2f0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CArrayInfo.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JType;
-import com.sun.xml.internal.bind.v2.model.util.ArrayInfoUtil;
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.xml.internal.bind.v2.model.core.ArrayInfo;
-import com.sun.xml.internal.xsom.XSComponent;
-
-import org.xml.sax.Locator;
-
-/**
- * Because XJC doesn't generate the array binding, this class will
- * never show up in the model constructed by XJC.
- *
- * <p>
- * This class is nevertheless defined to make the type checker happy.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class CArrayInfo extends AbstractCTypeInfoImpl implements ArrayInfo<NType,NClass>, CNonElement, NType {
-
- private final CNonElement itemType;
-
- private final QName typeName;
-
- public CArrayInfo(Model model,CNonElement itemType, XSComponent source, CCustomizations customizations) {
- super(model,source,customizations);
- this.itemType = itemType;
- assert itemType.getTypeName()!=null;
- this.typeName = ArrayInfoUtil.calcArrayTypeName(itemType.getTypeName());
- }
-
- public CNonElement getItemType() {
- return itemType;
- }
-
- public QName getTypeName() {
- return typeName;
- }
-
- public boolean isSimpleType() {
- return false;
- }
-
- @Deprecated // guaranteed to return this
- public CNonElement getInfo() {
- return this;
- }
-
- public JType toType(Outline o, Aspect aspect) {
- return itemType.toType(o,aspect).array();
- }
-
- public NType getType() {
- return this;
- }
-
- public boolean isBoxedType() {
- return false;
- }
-
- public String fullName() {
- return itemType.getType().fullName()+"[]";
- }
-
- public Locator getLocator() {
- return Model.EMPTY_LOCATOR;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CAttributePropertyInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CAttributePropertyInfo.java
deleted file mode 100644
index 37eafe20..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CAttributePropertyInfo.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.xml.internal.bind.v2.model.core.AttributePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.istack.internal.Nullable;
-
-import org.xml.sax.Locator;
-
-/**
- * {@link AttributePropertyInfo} for the compiler.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class CAttributePropertyInfo extends CSingleTypePropertyInfo implements AttributePropertyInfo<NType,NClass> {
-
- private final QName attName;
- private final boolean isRequired;
-
- /**
- * @param type
- * Represents the bound type of this attribute.
- * @param typeName
- * XML Schema type name of this attribute. Optional for other schema languages.
- */
- public CAttributePropertyInfo(String name, XSComponent source, CCustomizations customizations,
- Locator locator, QName attName, TypeUse type, @Nullable QName typeName,
- boolean required ) {
- super(name, type, typeName, source, customizations, locator);
- isRequired = required;
- this.attName = attName;
- }
-
- public boolean isRequired() {
- return isRequired;
- }
-
- public QName getXmlName() {
- return attName;
- }
-
- /**
- * An optional attribute can never be unboxable,
- * for we need null to represent the absence.
- */
- public boolean isUnboxable() {
- if(!isRequired) return false;
- return super.isUnboxable();
- }
-
- @Override
- public boolean isOptionalPrimitive() {
- return !isRequired && super.isUnboxable();
- }
-
- public <V> V accept(CPropertyVisitor<V> visitor) {
- return visitor.onAttribute(this);
- }
-
- public final PropertyKind kind() {
- return PropertyKind.ATTRIBUTE;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CBuiltinLeafInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CBuiltinLeafInfo.java
deleted file mode 100644
index 71422bde..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CBuiltinLeafInfo.java
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import java.awt.*;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.activation.DataHandler;
-import javax.activation.MimeType;
-import javax.xml.bind.DatatypeConverter;
-import javax.xml.bind.annotation.XmlIDREF;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
-import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.datatype.Duration;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.core.BuiltinLeafInfo;
-import com.sun.xml.internal.bind.v2.model.core.Element;
-import com.sun.xml.internal.bind.v2.model.core.LeafInfo;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.model.nav.NavigatorImpl;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.tools.internal.xjc.runtime.ZeroOneBooleanAdapter;
-import com.sun.tools.internal.xjc.util.NamespaceContextAdapter;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XmlString;
-
-import org.xml.sax.Locator;
-
-/**
- * Encapsulates the default handling for leaf classes (which are bound
- * to text in XML.) In particular this class knows how to convert
- * the lexical value into the Java class according to this default rule.
- *
- * <p>
- * This represents the spec-defined default handling for the Java
- * type ({@link #getType()}.
- *
- * <p>
- * For those Java classes (such as {@link String} or {@link Boolean})
- * where the spec designates a specific default handling, there are
- * constants in this class (such as {@link #STRING} or {@link #BOOLEAN}.)
- *
- * <p>
- * The generated type-safe enum classes are also a leaf class,
- * and as such there are {@link CEnumLeafInfo} that represents it
- * as {@link CBuiltinLeafInfo}.
- *
- * <p>
- * This class represents the <b>default handling</b>, and therefore
- * we can only have one instance per one {@link NType}. Handling of
- * other XML Schema types (such as xs:token) are represented as
- * a general {@link TypeUse} objects.
- *
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class CBuiltinLeafInfo implements CNonElement, BuiltinLeafInfo<NType,NClass>, LeafInfo<NType,NClass>, Location {
-
- private final NType type;
- /**
- * Can be null for anonymous types.
- */
- private final QName typeName;
-
- private final QName[] typeNames;
-
- private final ID id;
-
- // no derived class other than the spec-defined ones. definitely not for enum.
- private CBuiltinLeafInfo(NType typeToken, ID id, QName... typeNames) {
- this.type = typeToken;
- this.typeName = typeNames.length>0?typeNames[0]:null;
- this.typeNames = typeNames;
- this.id = id;
- }
-
- /**
- * Gets the code model representation of this type.
- */
- public JType toType(Outline o, Aspect aspect) {
- return getType().toType(o,aspect);
- }
-
- /**
- * Since {@link CBuiltinLeafInfo} represents a default binding,
- * it is never a collection.
- */
- @Deprecated
- public final boolean isCollection() {
- return false;
- }
-
- /**
- * Guaranteed to return this.
- */
- @Deprecated
- public CNonElement getInfo() {
- return this;
- }
-
- public ID idUse() {
- return id;
- }
-
- /**
- * {@link CBuiltinLeafInfo} never has a default associated MIME type.
- */
- public MimeType getExpectedMimeType() {
- return null;
- }
-
- @Deprecated
- public final CAdapter getAdapterUse() {
- return null;
- }
-
- public Locator getLocator() {
- return Model.EMPTY_LOCATOR;
- }
-
- public final XSComponent getSchemaComponent() {
- throw new UnsupportedOperationException("TODO. If you hit this, let us know.");
- }
-
- /**
- * Creates a {@link TypeUse} that represents a collection of this {@link CBuiltinLeafInfo}.
- */
- public final TypeUse makeCollection() {
- return TypeUseFactory.makeCollection(this);
- }
-
- /**
- * Creates a {@link TypeUse} that represents an adapted use of this {@link CBuiltinLeafInfo}.
- */
- public final TypeUse makeAdapted( Class<? extends XmlAdapter> adapter, boolean copy ) {
- return TypeUseFactory.adapt(this,adapter,copy);
- }
-
- /**
- * Creates a {@link TypeUse} that represents a MIME-type assocaited version of this {@link CBuiltinLeafInfo}.
- */
- public final TypeUse makeMimeTyped( MimeType mt ) {
- return TypeUseFactory.makeMimeTyped(this,mt);
- }
-
- /**
- * @deprecated always return false at this level.
- */
- public final boolean isElement() {
- return false;
- }
-
- /**
- * @deprecated always return null at this level.
- */
- public final QName getElementName() {
- return null;
- }
-
- /**
- * @deprecated always return null at this level.
- */
- public final Element<NType,NClass> asElement() {
- return null;
- }
-
- /**
- * A reference to the representation of the type.
- */
- public NType getType() {
- return type;
- }
-
- /**
- * Returns all the type names recognized by this bean info.
- *
- * @return
- * do not modify the returned array.
- */
- public final QName[] getTypeNames() {
- return typeNames;
- }
-
- /**
- * Leaf-type cannot be referenced from IDREF.
- *
- * @deprecated
- * why are you calling a method whose return value is always known?
- */
- public final boolean canBeReferencedByIDREF() {
- return false;
- }
-
- public QName getTypeName() {
- return typeName;
- }
-
- public Locatable getUpstream() {
- return null;
- }
-
- public Location getLocation() {
- // this isn't very accurate, but it's not too bad
- // doing it correctly need leaves to hold navigator.
- // otherwise revisit the design so that we take navigator as a parameter
- return this;
- }
-
- public boolean isSimpleType() {
- return true;
- }
-
- /**
- * {@link CBuiltinLeafInfo} for Java classes that have
- * the spec defined built-in binding semantics.
- */
- private static abstract class Builtin extends CBuiltinLeafInfo {
- protected Builtin(Class c, String typeName) {
- this(c,typeName,com.sun.xml.internal.bind.v2.model.core.ID.NONE);
- }
- protected Builtin(Class c, String typeName, ID id) {
- super(NavigatorImpl.theInstance.ref(c), id, new QName(WellKnownNamespace.XML_SCHEMA,typeName));
- LEAVES.put(getType(),this);
- }
-
- /**
- * No vendor customization in the built-in classes.
- */
- public CCustomizations getCustomizations() {
- return CCustomizations.EMPTY;
- }
- }
-
- private static final class NoConstantBuiltin extends Builtin {
- public NoConstantBuiltin(Class c, String typeName) {
- super(c, typeName);
- }
- public JExpression createConstant(Outline outline, XmlString lexical) {
- return null;
- }
- }
-
- /**
- * All built-in leaves.
- */
- public static final Map<NType,CBuiltinLeafInfo> LEAVES = new HashMap<NType,CBuiltinLeafInfo>();
-
-
- public static final CBuiltinLeafInfo ANYTYPE = new NoConstantBuiltin(Object.class,"anyType");
- public static final CBuiltinLeafInfo STRING = new Builtin(String.class,"string") {
- public JExpression createConstant(Outline outline, XmlString lexical) {
- return JExpr.lit(lexical.value);
- }
- };
- public static final CBuiltinLeafInfo BOOLEAN = new Builtin(Boolean.class,"boolean") {
- public JExpression createConstant(Outline outline, XmlString lexical) {
- return JExpr.lit(DatatypeConverter.parseBoolean(lexical.value));
- }
- };
- public static final CBuiltinLeafInfo INT = new Builtin(Integer.class,"int") {
- public JExpression createConstant(Outline outline, XmlString lexical) {
- return JExpr.lit(DatatypeConverter.parseInt(lexical.value));
- }
- };
- public static final CBuiltinLeafInfo LONG = new Builtin(Long.class,"long") {
- public JExpression createConstant(Outline outline, XmlString lexical) {
- return JExpr.lit(DatatypeConverter.parseLong(lexical.value));
- }
- };
- public static final CBuiltinLeafInfo BYTE = new Builtin(Byte.class,"byte") {
- public JExpression createConstant(Outline outline, XmlString lexical) {
- return JExpr.cast(
- outline.getCodeModel().BYTE,
- JExpr.lit(DatatypeConverter.parseByte(lexical.value)));
- }
- };
- public static final CBuiltinLeafInfo SHORT = new Builtin(Short.class,"short") {
- public JExpression createConstant(Outline outline, XmlString lexical) {
- return JExpr.cast(
- outline.getCodeModel().SHORT,
- JExpr.lit(DatatypeConverter.parseShort(lexical.value)));
- }
- };
- public static final CBuiltinLeafInfo FLOAT = new Builtin(Float.class,"float") {
- public JExpression createConstant(Outline outline, XmlString lexical) {
- return JExpr.lit(DatatypeConverter.parseFloat(lexical.value));
- }
- };
- public static final CBuiltinLeafInfo DOUBLE = new Builtin(Double.class,"double") {
- public JExpression createConstant(Outline outline, XmlString lexical) {
- return JExpr.lit(DatatypeConverter.parseDouble(lexical.value));
- }
- };
- public static final CBuiltinLeafInfo QNAME = new Builtin(QName.class,"QName") {
- public JExpression createConstant(Outline outline, XmlString lexical) {
- QName qn = DatatypeConverter.parseQName(lexical.value,new NamespaceContextAdapter(lexical));
- return JExpr._new(outline.getCodeModel().ref(QName.class))
- .arg(qn.getNamespaceURI())
- .arg(qn.getLocalPart())
- .arg(qn.getPrefix());
- }
- };
- // XMLGregorianCalendar is mutable, so we can't support default values anyhow.
- // For CALENAR we are uses a most unlikely name so as to avoid potential name
- // conflicts in the furture.
- public static final CBuiltinLeafInfo CALENDAR = new NoConstantBuiltin(XMLGregorianCalendar.class,"\u0000");
- public static final CBuiltinLeafInfo DURATION = new NoConstantBuiltin(Duration.class,"duration");
-
- public static final CBuiltinLeafInfo BIG_INTEGER = new Builtin(BigInteger.class,"integer") {
- public JExpression createConstant(Outline outline, XmlString lexical) {
- return JExpr._new(outline.getCodeModel().ref(BigInteger.class)).arg(lexical.value.trim());
- }
- };
-
- public static final CBuiltinLeafInfo BIG_DECIMAL = new Builtin(BigDecimal.class,"decimal") {
- public JExpression createConstant(Outline outline, XmlString lexical) {
- return JExpr._new(outline.getCodeModel().ref(BigDecimal.class)).arg(lexical.value.trim());
- }
- };
-
- public static final CBuiltinLeafInfo BASE64_BYTE_ARRAY = new Builtin(byte[].class,"base64Binary") {
- public JExpression createConstant(Outline outline, XmlString lexical) {
- return outline.getCodeModel().ref(DatatypeConverter.class).staticInvoke("parseBase64Binary").arg(lexical.value);
- }
- };
-
- public static final CBuiltinLeafInfo DATA_HANDLER = new NoConstantBuiltin(DataHandler.class,"base64Binary");
- public static final CBuiltinLeafInfo IMAGE = new NoConstantBuiltin(Image.class,"base64Binary");
- public static final CBuiltinLeafInfo XML_SOURCE = new NoConstantBuiltin(Source.class,"base64Binary");
-
- public static final TypeUse HEXBIN_BYTE_ARRAY =
- STRING.makeAdapted(HexBinaryAdapter.class,false);
-
-
- // TODO: not sure if they should belong here,
- // but I couldn't find other places that fit.
- public static final TypeUse TOKEN =
- STRING.makeAdapted(CollapsedStringAdapter.class,false);
-
- public static final TypeUse NORMALIZED_STRING =
- STRING.makeAdapted(NormalizedStringAdapter.class,false);
-
- public static final TypeUse ID = TypeUseFactory.makeID(TOKEN,com.sun.xml.internal.bind.v2.model.core.ID.ID);
-
- /**
- * boolean restricted to 0 or 1.
- */
- public static final TypeUse BOOLEAN_ZERO_OR_ONE =
- STRING.makeAdapted(ZeroOneBooleanAdapter.class,true);
-
- /**
- * IDREF.
- *
- * IDREF is has a whitespace normalization semantics of token, but
- * we don't want {@link XmlJavaTypeAdapter} and {@link XmlIDREF} to interact.
- */
- public static final TypeUse IDREF = TypeUseFactory.makeID(ANYTYPE,com.sun.xml.internal.bind.v2.model.core.ID.IDREF);
-
- /**
- * For all list of strings, such as NMTOKENS, ENTITIES.
- */
- public static final TypeUse STRING_LIST =
- STRING.makeCollection();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClass.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClass.java
deleted file mode 100644
index 6948b951..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClass.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-/**
- * Either {@link CClassInfo} or {@link CClassRef}.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface CClass extends CNonElement, CElement {
- // how can anything be CNonElement and CElement at the same time, you may ask.
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClassInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClassInfo.java
deleted file mode 100644
index 297af633..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClassInfo.java
+++ /dev/null
@@ -1,501 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlID;
-import javax.xml.bind.annotation.XmlIDREF;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.istack.internal.Nullable;
-import com.sun.tools.internal.xjc.Language;
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIFactoryMethod;
-import com.sun.xml.internal.bind.v2.model.core.ClassInfo;
-import com.sun.xml.internal.bind.v2.model.core.Element;
-import com.sun.xml.internal.xsom.XSComponent;
-
-import org.xml.sax.Locator;
-
-/**
- * Mutable {@link ClassInfo} represenatation.
- *
- * <p>
- * Schema parsers build these objects.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class CClassInfo extends AbstractCElement implements ClassInfo<NType,NClass>, CClassInfoParent, CClass, NClass {
-
- @XmlIDREF
- private CClass baseClass;
-
- /**
- * List of all subclasses, together with {@link #nextSibling}.
- *
- * If this class has no sub-class, this field is null. Otherwise,
- * this field points to a sub-class of this class. From there you can enumerate
- * all the sub-classes by using {@link #nextSibling}.
- */
- private CClassInfo firstSubclass;
-
- /**
- * @see #firstSubclass
- */
- private CClassInfo nextSibling = null;
-
- /**
- * @see #getTypeName()
- */
- private final QName typeName;
-
- /**
- * Custom {@link #getSqueezedName() squeezed name}, if any.
- */
- private /*almost final*/ @Nullable String squeezedName;
-
- /**
- * If this class also gets {@link XmlRootElement}, the class name.
- */
- private final @Nullable QName elementName;
-
- private boolean isOrdered = true;
-
- private final List<CPropertyInfo> properties = new ArrayList<CPropertyInfo>();
-
- /**
- * TODO: revisit this design.
- * we should at least do a basic encapsulation to avoid careless
- * mistakes. Maybe we should even differ the javadoc generation
- * by queueing runners.
- */
- public String javadoc;
-
- @XmlIDREF
- private final CClassInfoParent parent;
-
- /**
- * short name.
- */
- public final String shortName;
-
- /**
- * Optional user-specified implementation override class.
- */
- private @Nullable String implClass;
-
- /**
- * The {@link Model} object to which this bean belongs.
- */
- public final Model model;
-
- /**
- * @see #hasAttributeWildcard()
- */
- private boolean hasAttributeWildcard;
-
-
- public CClassInfo(Model model,JPackage pkg, String shortName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) {
- this(model,model.getPackage(pkg),shortName,location,typeName,elementName,source,customizations);
- }
-
- public CClassInfo(Model model,CClassInfoParent p, String shortName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) {
- super(model,source,location,customizations);
- this.model = model;
- this.parent = p;
- this.shortName = model.allocator.assignClassName(parent,shortName);
- this.typeName = typeName;
- this.elementName = elementName;
-
- Language schemaLanguage = model.options.getSchemaLanguage();
- if ((schemaLanguage != null) &&
- (schemaLanguage.equals(Language.XMLSCHEMA) || schemaLanguage.equals(Language.WSDL))) {
- BIFactoryMethod factoryMethod = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIFactoryMethod.class);
- if(factoryMethod!=null) {
- factoryMethod.markAsAcknowledged();
- this.squeezedName = factoryMethod.name;
- }
- }
-
- model.add(this);
- }
-
- public CClassInfo(Model model,JCodeModel cm, String fullName, Locator location, QName typeName, QName elementName, XSComponent source, CCustomizations customizations) {
- super(model,source,location,customizations);
- this.model = model;
- int idx = fullName.indexOf('.');
- if(idx<0) {
- this.parent = model.getPackage(cm.rootPackage());
- this.shortName = model.allocator.assignClassName(parent,fullName);
- } else {
- this.parent = model.getPackage(cm._package(fullName.substring(0,idx)));
- this.shortName = model.allocator.assignClassName(parent,fullName.substring(idx+1));
- }
- this.typeName = typeName;
- this.elementName = elementName;
-
- model.add(this);
- }
-
- public boolean hasAttributeWildcard() {
- return hasAttributeWildcard;
- }
-
- public void hasAttributeWildcard(boolean hasAttributeWildcard) {
- this.hasAttributeWildcard = hasAttributeWildcard;
- }
-
- public boolean hasSubClasses() {
- return firstSubclass!=null;
- }
-
- /**
- * Returns true if a new attribute wildcard property needs to be
- * declared on this class.
- */
- public boolean declaresAttributeWildcard() {
- return hasAttributeWildcard && !inheritsAttributeWildcard();
- }
-
- /**
- * Returns true if this class inherits a wildcard attribute property
- * from its ancestor classes.
- */
- public boolean inheritsAttributeWildcard() {
- if (getRefBaseClass() != null) {
- CClassRef cref = (CClassRef)baseClass;
- if (cref.getSchemaComponent().getForeignAttributes().size() > 0) {
- return true;
- }
- } else {
- for( CClassInfo c=getBaseClass(); c!=null; c=c.getBaseClass() ) {
- if(c.hasAttributeWildcard)
- return true;
- }
- }
- return false;
- }
-
-
- public NClass getClazz() {
- return this;
- }
-
- public CClassInfo getScope() {
- return null;
- }
-
- @XmlID
- public String getName() {
- return fullName();
- }
-
- /**
- * Returns the "squeezed name" of this bean token.
- * <p>
- * The squeezed name of a bean is the concatenation of
- * the names of its outer classes and itself.
- * <p>
- * Thus if the bean is "org.acme.foo.Bean", then the squeezed name is "Bean",
- * if the bean is "org.acme.foo.Outer1.Outer2.Bean", then "Outer1Outer2Bean".
- * <p>
- * This is used by the code generator
- */
- @XmlElement
- public String getSqueezedName() {
- if (squeezedName != null) return squeezedName;
- return calcSqueezedName.onBean(this);
- }
-
- private static final CClassInfoParent.Visitor<String> calcSqueezedName = new Visitor<String>() {
- public String onBean(CClassInfo bean) {
- return bean.parent.accept(this)+bean.shortName;
- }
-
- public String onElement(CElementInfo element) {
- return element.parent.accept(this)+element.shortName();
- }
-
- public String onPackage(JPackage pkg) {
- return "";
- }
- };
-
- /**
- * Returns a mutable list.
- */
- public List<CPropertyInfo> getProperties() {
- return properties;
- }
-
- public boolean hasValueProperty() {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Gets a propery by name.
- */
- public CPropertyInfo getProperty(String name) {
- // TODO: does this method need to be fast?
- for( CPropertyInfo p : properties )
- if(p.getName(false).equals(name))
- return p;
- return null;
- }
-
- public boolean hasProperties() {
- return !getProperties().isEmpty();
- }
-
- public boolean isElement() {
- return elementName!=null;
- }
-
- /**
- * Guaranteed to return this.
- */
- @Deprecated
- public CNonElement getInfo() {
- return this;
- }
-
- public Element<NType,NClass> asElement() {
- if(isElement())
- return this;
- else
- return null;
- }
-
- public boolean isOrdered() {
- return isOrdered;
- }
-
- /**
- * @deprecated
- * if you are calling this method directly, you must be doing something wrong.
- */
- public boolean isFinal() {
- return false;
- }
-
- public void setOrdered(boolean value) {
- isOrdered = value;
- }
-
- public QName getElementName() {
- return elementName;
- }
-
- public QName getTypeName() {
- return typeName;
- }
-
- public boolean isSimpleType() {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Returns the FQCN of this bean.
- */
- public String fullName() {
- String r = parent.fullName();
- if(r.length()==0) return shortName;
- else return r+'.'+shortName;
- }
-
- public CClassInfoParent parent() {
- return parent;
- }
-
- public void setUserSpecifiedImplClass(String implClass) {
- assert this.implClass==null;
- assert implClass!=null;
- this.implClass = implClass;
- }
-
- public String getUserSpecifiedImplClass() {
- return implClass;
- }
-
-
- /**
- * Adds a new property.
- */
- public void addProperty(CPropertyInfo prop) {
- if(prop.ref().isEmpty())
- // this property isn't contributing anything
- // this happens when you try to map an empty sequence to a property
- return;
- prop.setParent(this);
- properties.add(prop);
- }
-
- /**
- * This method accepts both {@link CClassInfo} (which means the base class
- * is also generated), or {@link CClassRef} (which means the base class is
- * already generated and simply referenced.)
- *
- * The latter is treated somewhat special --- from the rest of the model
- * this external base class is invisible. This modeling might need more
- * thoughts to get right.
- */
- public void setBaseClass(CClass base) {
- assert baseClass==null;
- assert base!=null;
- baseClass = base;
-
- assert nextSibling==null;
- if (base instanceof CClassInfo) {
- CClassInfo realBase = (CClassInfo) base;
- this.nextSibling = realBase.firstSubclass;
- realBase.firstSubclass = this;
- }
- }
-
- /**
- * This inherited version returns null if this class extends from {@link CClassRef}.
- *
- * @see #getRefBaseClass()
- */
- public CClassInfo getBaseClass() {
- if (baseClass instanceof CClassInfo) {
- return (CClassInfo) baseClass;
- } else {
- return null;
- }
- }
-
- public CClassRef getRefBaseClass() {
- if (baseClass instanceof CClassRef) {
- return (CClassRef) baseClass;
- } else {
- return null;
- }
- }
-
- /**
- * Enumerates all the sub-classes of this class.
- */
- public Iterator<CClassInfo> listSubclasses() {
- return new Iterator<CClassInfo>() {
- CClassInfo cur = firstSubclass;
- public boolean hasNext() {
- return cur!=null;
- }
-
- public CClassInfo next() {
- CClassInfo r = cur;
- cur = cur.nextSibling;
- return r;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
-
- public CClassInfo getSubstitutionHead() {
- CClassInfo c=getBaseClass();
- while(c!=null && !c.isElement())
- c=c.getBaseClass();
- return c;
- }
-
-
- /**
- * Interfaces to be implemented.
- * Lazily constructed.
- */
- private Set<JClass> _implements = null;
-
- public void _implements(JClass c) {
- if(_implements==null)
- _implements = new HashSet<JClass>();
- _implements.add(c);
- }
-
-
- /** Constructor declarations. array of {@link Constructor}s. */
- private final List<Constructor> constructors = new ArrayList<Constructor>(1);
-
- /** Creates a new constructor declaration and adds it. */
- public void addConstructor( String... fieldNames ) {
- constructors.add(new Constructor(fieldNames));
- }
-
- /** list all constructor declarations. */
- public Collection<? extends Constructor> getConstructors() {
- return constructors;
- }
-
- public final <T> T accept(Visitor<T> visitor) {
- return visitor.onBean(this);
- }
-
- public JPackage getOwnerPackage() {
- return parent.getOwnerPackage();
- }
-
- public final NClass getType() {
- return this;
- }
-
- public final JClass toType(Outline o, Aspect aspect) {
- switch(aspect) {
- case IMPLEMENTATION:
- return o.getClazz(this).implRef;
- case EXPOSED:
- return o.getClazz(this).ref;
- default:
- throw new IllegalStateException();
- }
- }
-
- public boolean isBoxedType() {
- return false;
- }
-
- public String toString() {
- return fullName();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClassInfoParent.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClassInfoParent.java
deleted file mode 100644
index 98575a61..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClassInfoParent.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import com.sun.codemodel.internal.JPackage;
-
-/**
- * Parent of a {@link CClassInfo}/{@link CElementInfo}.
- *
- * TODO: rename
- *
- * Either {@link CClassInfo} or {@link CClassInfoParent.Package}.
- */
-public interface CClassInfoParent {
- /**
- * Returns the fully-qualified name.
- */
- String fullName();
-
- <T> T accept( Visitor<T> visitor );
-
- /**
- * Gets the nearest {@link JPackage}.
- */
- JPackage getOwnerPackage();
-
- /**
- * Visitor of {@link CClassInfoParent}
- */
- public static interface Visitor<T> {
- T onBean( CClassInfo bean );
- T onPackage( JPackage pkg );
- T onElement( CElementInfo element );
- }
-
- /**
- * {@link JPackage} as a {@link CClassInfoParent}.
- *
- * Use {@link Model#getPackage} to obtain an instance.
- */
- public static final class Package implements CClassInfoParent {
- public final JPackage pkg;
-
- public Package(JPackage pkg) {
- this.pkg = pkg;
- }
-
- public String fullName() {
- return pkg.name();
- }
-
- public <T> T accept(Visitor<T> visitor) {
- return visitor.onPackage(pkg);
- }
-
- public JPackage getOwnerPackage() {
- return pkg;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClassRef.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClassRef.java
deleted file mode 100644
index f7e5bb15..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CClassRef.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIClass;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIEnum;
-import com.sun.xml.internal.xsom.XSComponent;
-
-/**
- * Refernece to an existing class.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class CClassRef extends AbstractCElement implements NClass, CClass {
-
- private final String fullyQualifiedClassName;
-
- /**
- *
- * @param decl
- * The {@link BIClass} declaration that has {@link BIClass#getExistingClassRef()}
- */
- public CClassRef(Model model, XSComponent source, BIClass decl, CCustomizations customizations) {
- super(model, source, decl.getLocation(), customizations);
- fullyQualifiedClassName = decl.getExistingClassRef();
- assert fullyQualifiedClassName!=null;
- }
-
- /**
- *
- * @param decl
- * The {@link BIClass} declaration that has {@link BIEnum#ref}
- */
- public CClassRef(Model model, XSComponent source, BIEnum decl, CCustomizations customizations) {
- super(model, source, decl.getLocation(), customizations);
- fullyQualifiedClassName = decl.ref;
- assert fullyQualifiedClassName!=null;
- }
-
- public void setAbstract() {
- // assume that the referenced class is marked as abstract to begin with.
- }
-
- public boolean isAbstract() {
- // no way to find out for sure
- return false;
- }
-
- public NType getType() {
- return this;
- }
-
- /**
- * Cached for both performance and single identity.
- */
- private JClass clazz;
-
- public JClass toType(Outline o, Aspect aspect) {
- if(clazz==null)
- clazz = o.getCodeModel().ref(fullyQualifiedClassName);
- return clazz;
- }
-
- public String fullName() {
- return fullyQualifiedClassName;
- }
-
- public QName getTypeName() {
- return null;
- }
-
- /**
- * Guaranteed to return this.
- */
- @Deprecated
- public CNonElement getInfo() {
- return this;
- }
-
-// are these going to bite us?
-// we can compute some of them, but not all.
-
- public CElement getSubstitutionHead() {
- return null;
- }
-
- public CClassInfo getScope() {
- return null;
- }
-
- public QName getElementName() {
- return null;
- }
-
- public boolean isBoxedType() {
- return false;
- }
-
- public boolean isSimpleType() {
- return false;
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CCustomizable.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CCustomizable.java
deleted file mode 100644
index b9041ba2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CCustomizable.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import com.sun.tools.internal.xjc.Plugin;
-import com.sun.xml.internal.xsom.XSComponent;
-
-import org.xml.sax.Locator;
-
-/**
- * Implemented by model components that can have customizations contributed by {@link Plugin}s.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface CCustomizable {
- /**
- * Gets the list of customizations attached to this model component.
- *
- * @return
- * can be an empty list but never be null. The returned list is read-only.
- * Do not modify.
- *
- * @see Plugin#getCustomizationURIs()
- */
- CCustomizations getCustomizations();
-
- /**
- * Gets the source location in the schema from which this model component is created.
- *
- * @return never null.
- */
- Locator getLocator();
-
- /**
- * If this model object is built from XML Schema,
- * this property returns a schema component from which the model is built.
- *
- * @return
- * null if the model is built from sources other than XML Schema
- * (such as DTD.)
- */
- XSComponent getSchemaComponent();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CCustomizations.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CCustomizations.java
deleted file mode 100644
index a0dc6b2d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CCustomizations.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import com.sun.tools.internal.xjc.Plugin;
-
-/**
- * Represents the list of {@link CPluginCustomization}s attached to a JAXB model component.
- *
- * <p>
- * When {@link Plugin}s register the customization namespace URIs through {@link Plugin#getCustomizationURIs()},
- * XJC will treat those URIs just like XJC's own extension "http://java.sun.com/xml/ns/xjc" and make them
- * available as DOM nodes through {@link CPluginCustomization}. A {@link Plugin} can then access
- * this information to change its behavior.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class CCustomizations extends ArrayList<CPluginCustomization> {
-
- /**
- * All {@link CCustomizations} used by a {@link Model} form a single linked list
- * so that we can look for unacknowledged customizations later.
- *
- * @see CPluginCustomization#markAsAcknowledged()
- * @see #setParent(Model,CCustomizable)
- */
- /*package*/ CCustomizations next;
-
- /**
- * The owner model component that carries these customizations.
- */
- private CCustomizable owner;
-
- public CCustomizations() {
- }
-
- public CCustomizations(Collection<? extends CPluginCustomization> cPluginCustomizations) {
- super(cPluginCustomizations);
- }
-
- /*package*/ void setParent(Model model,CCustomizable owner) {
- if(this.owner!=null) return;
-
-// // loop check
-// for( CCustomizations c = model.customizations; c!=null; c=c.next )
-// assert c!=this;
-
- this.next = model.customizations;
- model.customizations = this;
- assert owner!=null;
- this.owner = owner;
- }
-
- /**
- * Gets the model component that carries this customization.
- *
- * @return never null.
- */
- public CCustomizable getOwner() {
- assert owner!=null;
- return owner;
- }
-
- /**
- * Finds the first {@link CPluginCustomization} that belongs to the given namespace URI.
- * @return null if not found
- */
- public CPluginCustomization find( String nsUri ) {
- for (CPluginCustomization p : this) {
- if(fixNull(p.element.getNamespaceURI()).equals(nsUri))
- return p;
- }
- return null;
- }
-
- /**
- * Finds the first {@link CPluginCustomization} that belongs to the given namespace URI and the local name.
- * @return null if not found
- */
- public CPluginCustomization find( String nsUri, String localName ) {
- for (CPluginCustomization p : this) {
- if(fixNull(p.element.getNamespaceURI()).equals(nsUri)
- && fixNull(p.element.getLocalName()).equals(localName))
- return p;
- }
- return null;
- }
-
- private String fixNull(String s) {
- if(s==null) return "";
- else return s;
- }
-
- /**
- * Convenient singleton instance that represents an empty {@link CCustomizations}.
- */
- public static final CCustomizations EMPTY = new CCustomizations();
-
- /**
- * Merges two {@link CCustomizations} objects into one.
- */
- public static CCustomizations merge(CCustomizations lhs, CCustomizations rhs) {
- if(lhs==null || lhs.isEmpty()) return rhs;
- if(rhs==null || rhs.isEmpty()) return lhs;
-
- CCustomizations r = new CCustomizations(lhs);
- r.addAll(rhs);
- return r;
- }
-
- public boolean equals(Object o) {
- return this==o;
- }
-
- public int hashCode() {
- return System.identityHashCode(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CDefaultValue.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CDefaultValue.java
deleted file mode 100644
index 82e27be3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CDefaultValue.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import com.sun.codemodel.internal.JExpression;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.xml.internal.xsom.XmlString;
-
-/**
- * Object that computes the default value expression lazily.
- *
- * The computation is done lazily because often the default value
- * needs to refer to things (such as enum classes) that are only generated
- * after some of the outline is built.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class CDefaultValue {
- public abstract JExpression compute(Outline outline);
-
- /**
- * Creates a new {@link CDefaultValue} that computes the default value
- * by applying a lexical representation to a {@link TypeUse}.
- */
- public static CDefaultValue create(final TypeUse typeUse, final XmlString defaultValue) {
- return new CDefaultValue() {
- public JExpression compute(Outline outline) {
- return typeUse.createConstant(outline,defaultValue);
- }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CElement.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CElement.java
deleted file mode 100644
index ba1dfef7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CElement.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.xml.internal.bind.v2.model.core.Element;
-
-/**
- * Either {@link CElementInfo}, {@link CClassInfo}, or {@link CClassRef}.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface CElement extends CTypeInfo, Element<NType,NClass> {
- /**
- * Marks this element as an abstract element.
- */
- void setAbstract();
-
- /**
- * Returns true iff this element is an abstract element.
- */
- boolean isAbstract();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CElementInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CElementInfo.java
deleted file mode 100644
index 4608ed35..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CElementInfo.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JPackage;
-import com.sun.codemodel.internal.JType;
-import com.sun.istack.internal.Nullable;
-import static com.sun.tools.internal.xjc.model.CElementPropertyInfo.CollectionMode.NOT_REPEATED;
-import static com.sun.tools.internal.xjc.model.CElementPropertyInfo.CollectionMode.REPEATED_VALUE;
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.model.nav.NavigatorImpl;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIInlineBinaryData;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIFactoryMethod;
-import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.xml.internal.bind.v2.model.core.ElementInfo;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XmlString;
-
-import org.xml.sax.Locator;
-
-/**
- * {@link ElementInfo} implementation for the compile-time model.
- *
- * <p>
- * As an NType, it represents the Java representation of this element
- * (either JAXBElement&lt;T> or Foo).
- *
- * @author Kohsuke Kawaguchi
- */
-public final class CElementInfo extends AbstractCElement
- implements ElementInfo<NType,NClass>, NType, CClassInfoParent {
-
- private final QName tagName;
-
- /**
- * Represents {@code JAXBElement&lt;ContentType>}.
- */
- private NType type;
-
- /**
- * If this element produces its own class, the short name of that class.
- * Otherwise null.
- */
- private String className;
-
- /**
- * If this element is global, the element info is considered to be
- * package-level, and this points to the package in which this element
- * lives in.
- *
- * <p>
- * For local elements, this points to the parent {@link CClassInfo}.
- */
- public final CClassInfoParent parent;
-
- private CElementInfo substitutionHead;
-
- /**
- * Lazily computed.
- */
- private Set<CElementInfo> substitutionMembers;
-
- /**
- * {@link Model} that owns this object.
- */
- private final Model model;
-
- private CElementPropertyInfo property;
-
- /**
- * Custom {@link #getSqueezedName() squeezed name}, if any.
- */
- private /*almost final*/ @Nullable String squeezedName;
-
- /**
- * Creates an element in the given parent.
- *
- * <p>
- * When using this construction, {@link #initContentType(TypeUse, XSElementDecl, XmlString)}
- * must not be invoked.
- */
- public CElementInfo(Model model,QName tagName, CClassInfoParent parent, TypeUse contentType, XmlString defaultValue, XSElementDecl source, CCustomizations customizations, Locator location ) {
- super(model,source,location,customizations);
- this.tagName = tagName;
- this.model = model;
- this.parent = parent;
- if(contentType!=null)
- initContentType(contentType, source, defaultValue);
-
- model.add(this);
- }
-
- /**
- * Creates an element with a class in the given parent.
- *
- * <p>
- * When using this construction, the caller must use
- * {@link #initContentType(TypeUse, XSElementDecl, XmlString)} to fill in the content type
- * later.
- *
- * This is to avoid a circular model construction dependency between buidling a type
- * inside an element and element itself. To build a content type, you need to have
- * {@link CElementInfo} for a parent, so we can't take it as a constructor parameter.
- */
- public CElementInfo(Model model,QName tagName, CClassInfoParent parent, String className, CCustomizations customizations, Locator location ) {
- this(model,tagName,parent,null,null,null,customizations,location);
- this.className = className;
- }
-
- public void initContentType(TypeUse contentType, @Nullable XSElementDecl source, XmlString defaultValue) {
- assert this.property==null; // must not be called twice
-
- this.property = new CElementPropertyInfo("Value",
- contentType.isCollection()?REPEATED_VALUE:NOT_REPEATED,
- contentType.idUse(),
- contentType.getExpectedMimeType(),
- source,null,getLocator(),true);
- this.property.setAdapter(contentType.getAdapterUse());
- BIInlineBinaryData.handle(source,property);
- property.getTypes().add(new CTypeRef(contentType.getInfo(),tagName,CTypeRef.getSimpleTypeName(source), true,defaultValue));
- this.type = NavigatorImpl.createParameterizedType(
- NavigatorImpl.theInstance.ref(JAXBElement.class),
- getContentInMemoryType() );
-
- BIFactoryMethod factoryMethod = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIFactoryMethod.class);
- if(factoryMethod!=null) {
- factoryMethod.markAsAcknowledged();
- this.squeezedName = factoryMethod.name;
- }
-
- }
-
- public final String getDefaultValue() {
- return getProperty().getTypes().get(0).getDefaultValue();
- }
-
- public final JPackage _package() {
- return parent.getOwnerPackage();
- }
-
- public CNonElement getContentType() {
- return getProperty().ref().get(0);
- }
-
- public NType getContentInMemoryType() {
- if(getProperty().getAdapter()==null) {
- NType itemType = getContentType().getType();
- if(!property.isCollection())
- return itemType;
-
- return NavigatorImpl.createParameterizedType(List.class,itemType);
- } else {
- return getProperty().getAdapter().customType;
- }
- }
-
- public CElementPropertyInfo getProperty() {
- return property;
- }
-
- public CClassInfo getScope() {
- if(parent instanceof CClassInfo)
- return (CClassInfo)parent;
- return null;
- }
-
- /**
- * @deprecated why are you calling a method that returns this?
- */
- public NType getType() {
- return this;
- }
-
- public QName getElementName() {
- return tagName;
- }
-
- public JType toType(Outline o, Aspect aspect) {
- if(className==null)
- return type.toType(o,aspect);
- else
- return o.getElement(this).implClass;
- }
-
- /**
- * Returns the "squeezed name" of this element.
- *
- * @see CClassInfo#getSqueezedName()
- */
- @XmlElement
- public String getSqueezedName() {
- if(squeezedName!=null) return squeezedName;
-
- StringBuilder b = new StringBuilder();
- CClassInfo s = getScope();
- if(s!=null)
- b.append(s.getSqueezedName());
- if(className!=null)
- b.append(className);
- else
- b.append( model.getNameConverter().toClassName(tagName.getLocalPart()));
- return b.toString();
- }
-
- public CElementInfo getSubstitutionHead() {
- return substitutionHead;
- }
-
- public Collection<CElementInfo> getSubstitutionMembers() {
- if(substitutionMembers==null)
- return Collections.emptyList();
- else
- return substitutionMembers;
- }
-
- public void setSubstitutionHead(CElementInfo substitutionHead) {
- // don't set it twice
- assert this.substitutionHead==null;
- assert substitutionHead!=null;
- this.substitutionHead = substitutionHead;
-
- if(substitutionHead.substitutionMembers==null)
- substitutionHead.substitutionMembers = new HashSet<CElementInfo>();
- substitutionHead.substitutionMembers.add(this);
- }
-
- public boolean isBoxedType() {
- return false;
- }
-
- public String fullName() {
- if(className==null)
- return type.fullName();
- else {
- String r = parent.fullName();
- if(r.length()==0) return className;
- else return r+'.'+className;
- }
- }
-
- public <T> T accept(Visitor<T> visitor) {
- return visitor.onElement(this);
- }
-
- public JPackage getOwnerPackage() {
- return parent.getOwnerPackage();
- }
-
- public String shortName() {
- return className;
- }
-
- /**
- * True if this element has its own class
- * (as opposed to be represented as an instance of {@link JAXBElement}.
- */
- public boolean hasClass() {
- return className!=null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CElementPropertyInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CElementPropertyInfo.java
deleted file mode 100644
index 7962448b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CElementPropertyInfo.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import java.util.AbstractList;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import javax.activation.MimeType;
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.reader.RawTypeSet;
-import com.sun.xml.internal.bind.v2.model.core.ElementPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.xsom.XSComponent;
-
-import org.xml.sax.Locator;
-
-/**
- * {@link ElementPropertyInfo} for the compiler.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class CElementPropertyInfo extends CPropertyInfo implements ElementPropertyInfo<NType,NClass> {
-
- /**
- * True if this property can never be absent legally.
- */
- private final boolean required;
-
- private final MimeType expectedMimeType;
- /**
- *
- * <p>
- * Currently, this is set inside {@link RawTypeSet} in a very ugly way.
- */
- private CAdapter adapter;
-
- private final boolean isValueList;
-
- private ID id;
-
-
- /**
- * List of referenced types.
- */
- private final List<CTypeRef> types = new ArrayList<CTypeRef>();
-
- private final List<CNonElement> ref = new AbstractList<CNonElement>() {
- public CNonElement get(int index) {
- return getTypes().get(index).getTarget();
- }
- public int size() {
- return getTypes().size();
- }
- };
-
- // TODO: shouldn't they get id and expectedMimeType from TypeUses of CTypeRef?
- public CElementPropertyInfo(String name, CollectionMode collection, ID id, MimeType expectedMimeType, XSComponent source,
- CCustomizations customizations, Locator locator, boolean required) {
- super(name, collection.col, source, customizations, locator);
- this.required = required;
- this.id = id;
- this.expectedMimeType = expectedMimeType;
- this.isValueList = collection.val;
- }
-
- public ID id() {
- return id;
- }
-
- public List<CTypeRef> getTypes() {
- return types;
- }
-
- public List<CNonElement> ref() {
- return ref;
- }
-
- public QName getSchemaType() {
- if(types.size()!=1)
- // if more than one kind is here, can't produce @XmlSchemaType.
- // TODO: is it allowed to have one generated if types
- return null;
-
- CTypeRef t = types.get(0);
- if(needsExplicitTypeName(t.getTarget(),t.typeName))
- return t.typeName;
- else
- return null;
- }
-
- /**
- * XJC never uses the wrapper element. Always return null.
- */
- @Deprecated
- public QName getXmlName() {
- return null;
- }
-
- public boolean isCollectionRequired() {
- // in XJC, we never recognize a nillable collection pattern, so this is always false.
- return false;
- }
-
- public boolean isCollectionNillable() {
- // in XJC, we never recognize a nillable collection pattern, so this is always false.
- return false;
- }
-
- public boolean isRequired() {
- return required;
- }
-
- public boolean isValueList() {
- return isValueList;
- }
-
- public boolean isUnboxable() {
- if(!isCollection() && !required)
- // if the property can be legally absent, it's not unboxable
- return false;
- // we need to have null to represent the absence of value. not unboxable.
- for (CTypeRef t : getTypes()) {
- if(t.isNillable())
- return false;
- }
- return super.isUnboxable();
- }
-
- @Override
- public boolean isOptionalPrimitive() {
- // we need to have null to represent the absence of value. not unboxable.
- for (CTypeRef t : getTypes()) {
- if(t.isNillable())
- return false;
- }
- return !isCollection() && !required && super.isUnboxable();
- }
-
- public <V> V accept(CPropertyVisitor<V> visitor) {
- return visitor.onElement(this);
- }
-
- public CAdapter getAdapter() {
- return adapter;
- }
-
- public void setAdapter(CAdapter a) {
- assert adapter==null;
- adapter = a;
- }
-
- public final PropertyKind kind() {
- return PropertyKind.ELEMENT;
- }
-
- public MimeType getExpectedMimeType() {
- return expectedMimeType;
- }
-
- public static enum CollectionMode {
- NOT_REPEATED(false,false),
- REPEATED_ELEMENT(true,false),
- REPEATED_VALUE(true,true);
-
- private final boolean col,val;
-
- CollectionMode(boolean col,boolean val) {
- this.col = col;
- this.val = val;
- }
-
- public boolean isRepeated() { return col; }
- }
-
- @Override
- public QName collectElementNames(Map<QName, CPropertyInfo> table) {
- for (CTypeRef t : types) {
- QName n = t.getTagName();
- if(table.containsKey(n)) return n;
- table.put(n, this);
- }
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CEnumConstant.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CEnumConstant.java
deleted file mode 100644
index 6044bd6c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CEnumConstant.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.xml.internal.bind.v2.model.core.EnumConstant;
-
-import com.sun.xml.internal.xsom.XSComponent;
-import org.xml.sax.Locator;
-
-/**
- * Enumeration constant.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class CEnumConstant implements EnumConstant<NType,NClass>, CCustomizable {
- /** Name of the constant. */
- public final String name;
- /** Javadoc comment. Can be null. */
- public final String javadoc;
- /** Lexical representation of this enum constant. Always non-null. */
- private final String lexical;
-
- private CEnumLeafInfo parent;
-
- private final XSComponent source;
-
- private final CCustomizations customizations;
-
- private final Locator locator;
-
- /**
- * @param name
- */
- public CEnumConstant(String name, String javadoc, String lexical, XSComponent source, CCustomizations customizations, Locator loc) {
- assert name!=null;
- this.name = name;
- this.javadoc = javadoc;
- this.lexical = lexical;
- this.source = source;
- this.customizations = customizations;
- this.locator = loc;
- }
-
- public CEnumLeafInfo getEnclosingClass() {
- return parent;
- }
-
- /*package*/ void setParent(CEnumLeafInfo parent) {
- this.parent = parent;
- }
-
- public String getLexicalValue() {
- return lexical;
- }
-
- public String getName() {
- return name;
- }
-
- public XSComponent getSchemaComponent() {
- return source;
- }
-
- public CCustomizations getCustomizations() {
- return customizations;
- }
-
- public Locator getLocator() {
- return locator;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CEnumLeafInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CEnumLeafInfo.java
deleted file mode 100644
index b662b40d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CEnumLeafInfo.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import java.util.Collection;
-
-import javax.activation.MimeType;
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.core.EnumLeafInfo;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.core.Element;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XmlString;
-
-import org.xml.sax.Locator;
-
-/**
- * Transducer that converts a string into an "enumeration class."
- *
- * The structure of the generated class needs to precisely
- * follow the JAXB spec.
- *
- * @author
- * <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public final class CEnumLeafInfo implements EnumLeafInfo<NType,NClass>, NClass, CNonElement
-{
- /**
- * The {@link Model} object to which this bean belongs.
- */
- public final Model model;
-
- /**
- * The parent into which the enum class should be generated.
- */
- public final CClassInfoParent parent;
-
- /**
- * Short name of the generated type-safe enum.
- */
- public final String shortName;
-
- private final QName typeName;
-
- private final XSComponent source;
-
- /**
- * Represents the underlying type of this enumeration
- * and its conversion.
- *
- * <p>
- * To parse XML into a constant, we use the base type
- * to do lexical -> value, then use a map to pick up the right one.
- *
- * <p>
- * Hence this also represents the type of the Java value.
- * For example, if this is an enumeration of xs:int,
- * then this field will be Java int.
- */
- public final CNonElement base;
-
-
- /**
- * List of enum members.
- */
- public final Collection<CEnumConstant> members;
-
- private final CCustomizations customizations;
-
- /**
- * @see #getLocator()
- */
- private final Locator sourceLocator;
-
- public String javadoc;
-
- public CEnumLeafInfo(Model model,
- QName typeName,
- CClassInfoParent container,
- String shortName,
- CNonElement base,
- Collection<CEnumConstant> _members,
- XSComponent source,
- CCustomizations customizations,
- Locator _sourceLocator) {
- this.model = model;
- this.parent = container;
- this.shortName = model.allocator.assignClassName(parent,shortName);
- this.base = base;
- this.members = _members;
- this.source = source;
- if(customizations==null)
- customizations = CCustomizations.EMPTY;
- this.customizations = customizations;
- this.sourceLocator = _sourceLocator;
- this.typeName = typeName;
-
- for( CEnumConstant mem : members )
- mem.setParent(this);
-
- model.add(this);
-
- // TODO: can we take advantage of the fact that enum can be XmlRootElement?
- }
-
- /**
- * Source line information that points to the place
- * where this type-safe enum is defined.
- * Used to report error messages.
- */
- public Locator getLocator() {
- return sourceLocator;
- }
-
- public QName getTypeName() {
- return typeName;
- }
-
- public NType getType() {
- return this;
- }
-
- /**
- * @deprecated
- * why are you calling the method whose return value is known?
- */
- public boolean canBeReferencedByIDREF() {
- return false;
- }
-
- public boolean isElement() {
- return false;
- }
-
- public QName getElementName() {
- return null;
- }
-
- public Element<NType,NClass> asElement() {
- return null;
- }
-
- public NClass getClazz() {
- return this;
- }
-
- public XSComponent getSchemaComponent() {
- return source;
- }
-
- public JClass toType(Outline o, Aspect aspect) {
- return o.getEnum(this).clazz;
- }
-
- public boolean isAbstract() {
- return false;
- }
-
- public boolean isBoxedType() {
- return false;
- }
-
- public String fullName() {
- return parent.fullName()+'.'+shortName;
- }
-
- public boolean isPrimitive() {
- return false;
- }
-
- public boolean isSimpleType() {
- return true;
- }
-
-
- /**
- * The spec says the value field in the enum class will be generated
- * only under certain circumstances.
- *
- * @return
- * true if the generated enum class should have the value field.
- */
- public boolean needsValueField() {
- for (CEnumConstant cec : members) {
- if(!cec.getName().equals(cec.getLexicalValue()))
- return true;
- }
- return false;
- }
-
- public JExpression createConstant(Outline outline, XmlString literal) {
- // correctly identifying which constant it maps to is hard, so
- // here I'm cheating
- JClass type = toType(outline,Aspect.EXPOSED);
- for (CEnumConstant mem : members) {
- if(mem.getLexicalValue().equals(literal.value))
- return type.staticRef(mem.getName());
- }
- return null;
- }
-
- @Deprecated
- public boolean isCollection() {
- return false;
- }
-
- @Deprecated
- public CAdapter getAdapterUse() {
- return null;
- }
-
- @Deprecated
- public CNonElement getInfo() {
- return this;
- }
-
- public ID idUse() {
- return ID.NONE;
- }
-
- public MimeType getExpectedMimeType() {
- return null;
- }
-
- public Collection<CEnumConstant> getConstants() {
- return members;
- }
-
- public NonElement<NType,NClass> getBaseType() {
- return base;
- }
-
- public CCustomizations getCustomizations() {
- return customizations;
- }
-
- public Locatable getUpstream() {
- throw new UnsupportedOperationException();
- }
-
- public Location getLocation() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CNonElement.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CNonElement.java
deleted file mode 100644
index 62abcc30..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CNonElement.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-
-/**
- * {@link NonElement} at compile-time.
- *
- * <p>
- * This interface implements {@link TypeUse} so that a {@link CNonElement}
- * instance can be used as a {@link TypeUse} instance.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface CNonElement extends NonElement<NType,NClass>, TypeUse, CTypeInfo {
- /**
- * Guaranteed to return this.
- */
- @Deprecated
- CNonElement getInfo();
-
- /**
- * Guaranteed to return false.
- */
- @Deprecated
- boolean isCollection();
-
- /**
- * Guaranteed to return null.
- */
- @Deprecated
- CAdapter getAdapterUse();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CPluginCustomization.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CPluginCustomization.java
deleted file mode 100644
index e973a50d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CPluginCustomization.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import com.sun.tools.internal.xjc.Plugin;
-
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-/**
- * Vendor extension customization contributed from {@link Plugin}s.
- *
- * @author Kohsuke Kawaguchi
- */
-public class CPluginCustomization {
- /**
- * The annotation found in a schema (or in an external binding file.)
- *
- * Always non-null.
- */
- public final Element element;
-
- /**
- * The source location where this customization is placed.
- *
- * <p>
- * When an error is found in this customization, this information
- * should be used to point the user to the source of the problem.
- *
- * Always non-nul.
- */
- public final Locator locator;
-
- private boolean acknowledged;
-
- /**
- * When a {@link Plugin} "uses" this annotation, call this method
- * to mark it.
- *
- * <p>
- * {@link CPluginCustomization}s that are not marked will be
- * reporeted as an error to users. This allows us to catch
- * customizations that are not used by anybody.
- */
- public void markAsAcknowledged() {
- acknowledged = true;
- }
-
- public CPluginCustomization(Element element, Locator locator) {
- this.element = element;
- this.locator = locator;
- }
-
- public boolean isAcknowledged() {
- return acknowledged;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CPropertyInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CPropertyInfo.java
deleted file mode 100644
index 99105262..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CPropertyInfo.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import java.lang.annotation.Annotation;
-import java.util.Collection;
-import java.util.Map;
-
-import javax.xml.XMLConstants;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JJavaName;
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.generator.bean.field.FieldRenderer;
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.RuntimeUtil;
-import com.sun.xml.internal.xsom.XSComponent;
-
-import org.xml.sax.Locator;
-
-/**
- * Model of a property to be generated.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class CPropertyInfo implements PropertyInfo<NType,NClass>, CCustomizable {
-
- @XmlTransient
- private CClassInfo parent;
- private String privateName;
- private String publicName;
- private final boolean isCollection;
-
- @XmlTransient
- public final Locator locator;
-
- /**
- * @see #getSchemaComponent()
- */
- private final XSComponent source;
-
- /**
- * If the base type of the property is overriden,
- * this field is set to non-null.
- */
- public JType baseType;
-
- /**
- * Javadoc for this property. Must not be null.
- */
- public String javadoc="";
-
- /**
- * Property with {@link @XmlInlineBinaryData}.
- */
- public boolean inlineBinaryData;
-
- /**
- * Specifies how the field is generated by the backend.
- */
- @XmlJavaTypeAdapter(RuntimeUtil.ToStringAdapter.class)
- public FieldRenderer realization;
-
- /**
- * If non-null, keeps the default value in Java representation.
- *
- * If {@link #isCollection} is true, this field is always null,
- * for we don't handle default values for a list.
- */
- public CDefaultValue defaultValue;
-
- private final CCustomizations customizations;
-
- protected CPropertyInfo(String name, boolean collection, XSComponent source,
- CCustomizations customizations, Locator locator) {
- this.publicName = name;
- String n = null;
-
- Model m = Ring.get(Model.class);
- if (m != null) {
- n = m.getNameConverter().toVariableName(name);
- } else {
- n = NameConverter.standard.toVariableName(name);
- }
-
- if(!JJavaName.isJavaIdentifier(n))
- n = '_'+n; // avoid colliding with the reserved names like 'abstract'.
- this.privateName = n;
-
- this.isCollection = collection;
- this.locator = locator;
- if(customizations==null)
- this.customizations = CCustomizations.EMPTY;
- else
- this.customizations = customizations;
- this.source = source;
- }
-
- // called from CClassInfo when added
- final void setParent( CClassInfo parent ) {
- assert this.parent==null;
- assert parent!=null;
- this.parent = parent;
- customizations.setParent(parent.model,this);
- }
-
- public CTypeInfo parent() {
- return parent;
- }
-
- public Locator getLocator() {
- return locator;
- }
-
- /**
- * If this model object is built from XML Schema,
- * this property returns a schema component from which the model is built.
- *
- * @return
- * null if the model is built from sources other than XML Schema
- * (such as DTD.)
- */
- public final XSComponent getSchemaComponent() {
- return source;
- }
-
- public abstract CAdapter getAdapter();
-
- /**
- * Name of the property.
- *
- * <p>
- * This method is implemented to follow the contract of
- * {@link PropertyInfo#getName()}, and therefore it always
- * returns the name of the annotated field.
- * <p>
- * This name is normally not useful for the rest of XJC,
- * which usually wants to access the "public name" of the property.
- * A "public name" of the property is a name like "FooBar" which
- * is used as a seed for generating the accessor methods.
- * This is the name controlled by the schema customization via users.
- *
- * <p>
- * If the caller is calling this method statically, it's usually
- * the sign of a mistake. Use {@link #getName(boolean)} method instead,
- * which forces you to think about which name you want to get.
- *
- * @deprecated
- * marked as deprecated so that we can spot the use of this method.
- *
- * @see #getName(boolean)
- */
- public String getName() {
- return getName(false);
- }
-
- /**
- * Gets the name of the property.
- *
- * @param isPublic
- * if true, this method returns a name like "FooBar", which
- * should be used as a seed for generating user-visible names
- * (such as accessors like "getFooBar".)
- *
- * <p>
- * if false, this method returns the "name of the property"
- * as defined in the j2s side of the spec. This name is usually
- * something like "fooBar", which often corresponds to the XML
- * element/attribute name of this property (for taking advantage
- * of annotation defaulting as much as possible)
- */
- public String getName(boolean isPublic) {
- return isPublic?publicName:privateName;
- }
-
- /**
- * Overrides the name of the property.
- *
- * This method can be used from {@link Plugin#postProcessModel(Model, ErrorHandler)}.
- * But the caller should do so with the understanding that this is inherently
- * dangerous method.
- */
- public void setName(boolean isPublic, String newName) {
- if(isPublic)
- publicName = newName;
- else
- privateName = newName;
- }
-
- public String displayName() {
- return parent.toString()+'#'+getName(false);
- }
-
- public boolean isCollection() {
- return isCollection;
- }
-
-
- public abstract Collection<? extends CTypeInfo> ref();
-
- /**
- * Returns true if this property is "unboxable".
- *
- * <p>
- * In general, a property often has to be capable of representing null
- * to indicate the absence of the value. This requires properties
- * to be generated as <tt>@XmlElement Float f</tt>, not as
- * <tt>@XmlElement float f;</tt>. But this is slow.
- *
- * <p>
- * Fortunately, there are cases where we know that the property can
- * never legally be absent. When this condition holds we can generate
- * the optimized "unboxed form".
- *
- * <p>
- * The exact such conditions depend
- * on the kind of properties, so refer to the implementation code
- * for the details.
- *
- * <p>
- * This method returns true when the property can be generated
- * as "unboxed form", false otherwise.
- *
- * <p>
- * When this property is a collection, this method returns true
- * if items in the collection is unboxable. Obviously, the collection
- * itself is always a reference type.
- */
- public boolean isUnboxable() {
- Collection<? extends CTypeInfo> ts = ref();
- if(ts.size()!=1)
- // if the property is heterogeneous, no way.
- // ts.size()==0 is a special case that can happen for wildcards.
- return false;
-
- if(baseType!=null && (baseType instanceof JClass))
- return false;
-
- CTypeInfo t = ts.iterator().next();
- // only a primitive type is eligible.
- return t.getType().isBoxedType();
- }
-
- /**
- * Returns true if this property needs to represent null
- * just for the purpose of representing an absence of the property.
- */
- public boolean isOptionalPrimitive() {
- return false;
- }
-
- public CCustomizations getCustomizations() {
- return customizations;
- }
-
- public boolean inlineBinaryData() {
- return inlineBinaryData;
- }
-
- public abstract <V> V accept( CPropertyVisitor<V> visitor );
-
- /**
- * Checks if the given {@link TypeUse} would need an explicit {@link XmlSchemaType}
- * annotation with the given type name.
- */
- protected static boolean needsExplicitTypeName(TypeUse type, QName typeName) {
- if(typeName==null)
- // this is anonymous type. can't have @XmlSchemaType
- return false;
-
- if(!XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(typeName.getNamespaceURI()))
- // if we put application-defined type name, it will be undefined
- // by the time we generate a schema.
- return false;
-
- if(type.isCollection())
- // there's no built-in binding for a list simple type,
- // so any collection type always need @XmlSchemaType
- return true;
-
- QName itemType = type.getInfo().getTypeName();
- if(itemType==null)
- // this is somewhat strange case, as it means the bound type is anonymous
- // but it's eventually derived by a named type and used.
- // but we can certainly use typeName as @XmlSchemaType value here
- return true;
-
- // if it's the default type name for this item, then no need
- return !itemType.equals(typeName);
- }
-
- /**
- * Puts the element names that this property possesses to the map,
- * so that we can find two properties that own the same element name,
- * which is an error.
- *
- * @return
- * null if no conflict was found. Otherwise return the QName that has the collision.
- */
- public QName collectElementNames(Map<QName,CPropertyInfo> table) {
- return null;
- }
-
- public final <A extends Annotation> A readAnnotation(Class<A> annotationType) {
- throw new UnsupportedOperationException();
- }
-
- public final boolean hasAnnotation(Class<? extends Annotation> annotationType) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CPropertyVisitor.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CPropertyVisitor.java
deleted file mode 100644
index 84f0b9ef..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CPropertyVisitor.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-/**
- * Visitor for {@link CPropertyInfo}.
- *
- * Ideally it should be defined on the runtime core model, but the runtime is on diet.
- * Hence it's defined here.
- *
- * @see CPropertyInfo#accept(CPropertyVisitor)
- *
- * @author Kohsuke Kawaguchi
- */
-public interface CPropertyVisitor<V> {
- V onElement( CElementPropertyInfo p );
- V onAttribute( CAttributePropertyInfo p );
- V onValue( CValuePropertyInfo p );
- V onReference( CReferencePropertyInfo p );
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CReferencePropertyInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CReferencePropertyInfo.java
deleted file mode 100644
index 39c81585..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CReferencePropertyInfo.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.Map;
-
-import javax.activation.MimeType;
-import javax.xml.bind.annotation.W3CDomHandler;
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.model.nav.NavigatorImpl;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.core.ReferencePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.WildcardMode;
-import com.sun.xml.internal.xsom.XSComponent;
-
-import org.xml.sax.Locator;
-
-/**
- * {@link ReferencePropertyInfo} for the compiler.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class CReferencePropertyInfo extends CPropertyInfo implements ReferencePropertyInfo<NType,NClass> {
-
- /**
- * True if this property can never be absent legally.
- */
- private final boolean required;
-
- /**
- * List of referenced elements.
- */
- private final Set<CElement> elements = new HashSet<CElement>();
-
- private final boolean isMixed;
- private WildcardMode wildcard;
- private boolean dummy;
- private boolean content;
- private boolean isMixedExtendedCust = false;
-
- public CReferencePropertyInfo(String name, boolean collection, boolean required, boolean isMixed, XSComponent source,
- CCustomizations customizations, Locator locator, boolean dummy, boolean content, boolean isMixedExtended) { // 'dummy' and 'content' here for NHIN fix - a hack in order to be able to handle extended mixed types better
- super(name, (collection||isMixed) && (!dummy), source, customizations, locator);
- this.isMixed = isMixed;
- this.required = required;
- this.dummy = dummy;
- this.content = content;
- this.isMixedExtendedCust = isMixedExtended;
- }
-
- public Set<? extends CTypeInfo> ref() {
-// if(wildcard==null && !isMixed())
-// return getElements();
-
- // ugly hack to get the signature right for substitution groups
- // when a class is generated for elements,they don't form a nice type hierarchy,
- // so the Java types of the substitution members need to be taken into account
- // when computing the signature
-
- final class RefList extends HashSet<CTypeInfo> {
- RefList() {
- super(elements.size());
- addAll(elements);
- }
- @Override
- public boolean addAll( Collection<? extends CTypeInfo> col ) {
- boolean r = false;
- for (CTypeInfo e : col) {
- if(e instanceof CElementInfo) {
- // UGLY. element substitution is implemented in a way that
- // the derived elements are not assignable to base elements.
- // so when we compute the signature, we have to take derived types
- // into account
- r |= addAll( ((CElementInfo)e).getSubstitutionMembers());
- }
- r |= add(e);
- }
- return r;
- }
- }
-
- RefList r = new RefList();
- if(wildcard!=null) {
- if(wildcard.allowDom)
- r.add(CWildcardTypeInfo.INSTANCE);
- if(wildcard.allowTypedObject)
- // we aren't really adding an AnyType.
- // this is a kind of hack to generate Object as a signature
- r.add(CBuiltinLeafInfo.ANYTYPE);
- }
- if(isMixed())
- r.add(CBuiltinLeafInfo.STRING);
-
- return r;
- }
-
- public Set<CElement> getElements() {
- return elements;
- }
-
- public boolean isMixed() {
- return isMixed;
- }
-
- public boolean isDummy() {
- return dummy;
- }
-
- public boolean isContent() {
- return content;
- }
-
- public boolean isMixedExtendedCust() {
- return isMixedExtendedCust;
- }
-
- /**
- * We'll never use a wrapper element in XJC. Always return null.
- */
- @Deprecated
- public QName getXmlName() {
- return null;
- }
-
- /**
- * Reference properties refer to elements, and none of the Java primitive type
- * maps to an element. Thus a reference property is always unboxable.
- */
- @Override
- public boolean isUnboxable() {
- return false;
- }
-
- // the same as above
- @Override
- public boolean isOptionalPrimitive() {
- return false;
- }
-
- public <V> V accept(CPropertyVisitor<V> visitor) {
- return visitor.onReference(this);
- }
-
- public CAdapter getAdapter() {
- return null;
- }
-
- public final PropertyKind kind() {
- return PropertyKind.REFERENCE;
- }
-
- /**
- * A reference property can never be ID/IDREF because they always point to
- * other element classes.
- */
- public ID id() {
- return ID.NONE;
- }
-
- public WildcardMode getWildcard() {
- return wildcard;
- }
-
- public void setWildcard(WildcardMode mode) {
- this.wildcard = mode;
- }
-
- public NClass getDOMHandler() {
- // TODO: support other DOM handlers
- if(getWildcard()!=null)
- return NavigatorImpl.create(W3CDomHandler.class);
- else
- return null;
- }
-
- public MimeType getExpectedMimeType() {
- return null;
- }
-
- public boolean isCollectionNillable() {
- // in XJC, we never recognize a nillable collection pattern, so this is always false.
- return false;
- }
-
- public boolean isCollectionRequired() {
- // in XJC, we never recognize a nillable collection pattern, so this is always false.
- return false;
- }
-
- // reference property cannot have a type.
- public QName getSchemaType() {
- return null;
- }
-
- public boolean isRequired() {
- return required;
- }
-
- @Override
- public QName collectElementNames(Map<QName, CPropertyInfo> table) {
- for (CElement e : elements) {
- QName n = e.getElementName();
- if(table.containsKey(n))
- return n;
- table.put(n,this);
- }
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CSingleTypePropertyInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CSingleTypePropertyInfo.java
deleted file mode 100644
index 8e43f49c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CSingleTypePropertyInfo.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import java.util.Collections;
-import java.util.List;
-
-import javax.activation.MimeType;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.xsom.XSComponent;
-
-import org.xml.sax.Locator;
-
-/**
- * {@link CPropertyInfo} backed by a single {@link TypeUse}.
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class CSingleTypePropertyInfo extends CPropertyInfo {
- protected final TypeUse type;
-
- private final QName schemaType;
-
- /**
- *
- * @param typeName
- * XML Schema type name of this property's single value. Optional
- * for other schema languages. This is used to determine if we should
- * generate {@link @XmlSchemaType} annotation to improve the roundtrip.
- */
- protected CSingleTypePropertyInfo(String name, TypeUse type, QName typeName, XSComponent source, CCustomizations customizations, Locator locator) {
- super(name, type.isCollection(), source, customizations, locator);
- this.type = type;
-
- if(needsExplicitTypeName(type,typeName))
- schemaType = typeName;
- else
- schemaType = null;
- }
-
- public QName getSchemaType() {
- return schemaType;
- }
-
- public final ID id() {
- return type.idUse();
- }
-
- public final MimeType getExpectedMimeType() {
- return type.getExpectedMimeType();
- }
-
- public final List<? extends CTypeInfo> ref() {
- return Collections.singletonList(getTarget());
- }
-
- public final CNonElement getTarget() {
- CNonElement r = type.getInfo();
- assert r!=null;
- return r;
- }
-
- public final CAdapter getAdapter() {
- return type.getAdapterUse();
- }
-
- public final CSingleTypePropertyInfo getSource() {
- return this;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeInfo.java
deleted file mode 100644
index 6c1f0012..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeInfo.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfo;
-
-/**
- * {@link TypeInfo} at the compile-time.
- * Either {@link CClassInfo}, {@link CBuiltinLeafInfo}, or {@link CElementInfo}.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface CTypeInfo extends TypeInfo<NType,NClass>, CCustomizable {
-
- /**
- * Returns the {@link JClass} that represents the class being bound,
- * under the given {@link Outline}.
- *
- * @see NType#toType(Outline, Aspect)
- */
- JType toType(Outline o, Aspect aspect);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeRef.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeRef.java
deleted file mode 100644
index bcea98fe..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CTypeRef.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import javax.xml.XMLConstants;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.TypeRef;
-import com.sun.xml.internal.bind.v2.runtime.RuntimeUtil;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.XmlString;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.istack.internal.Nullable;
-
-/**
- * {@link TypeRef} for XJC.
- *
- * TODO: do we need the source schema component support here?
- *
- * @author Kohsuke Kawaguchi
- */
-public final class CTypeRef implements TypeRef<NType,NClass> {
- /**
- * In-memory type.
- *
- * This is the type used when
- */
- @XmlJavaTypeAdapter(RuntimeUtil.ToStringAdapter.class)
- private final CNonElement type;
-
- private final QName elementName;
-
- /**
- * XML Schema type name of {@link #type}, if available.
- */
- /*package*/ final @Nullable QName typeName;
-
- private final boolean nillable;
- public final XmlString defaultValue;
-
- public CTypeRef(CNonElement type, XSElementDecl decl) {
- this(type, BGMBuilder.getName(decl),getSimpleTypeName(decl), decl.isNillable(), decl.getDefaultValue() );
-
- }
-
- public QName getTypeName() {
- return typeName;
- }
-
- public static QName getSimpleTypeName(XSElementDecl decl) {
- if(decl==null || !decl.getType().isSimpleType())
- return null; // null if not simple type
- return resolveSimpleTypeName(decl.getType());
- }
-
- /**
- * Recursively search for type name.
- *
- * This is needed to find correct type for refs like:
- *
- *<xs:simpleType name="parent">
- * <xs:restriction base="xs:date"/>
- *</xs:simpleType>
- *<xs:simpleType name="child">
- * <xs:restriction base="parent"/>
- *</xs:simpleType>
- *
- *<xs:element name="testField" type="child"/>
- *
- * @param declType given type
- * @return simpleTypeName or null
- */
- private static QName resolveSimpleTypeName(XSType declType) {
- QName name = BGMBuilder.getName(declType);
- QName result = null;
- if (name != null && !XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(name.getNamespaceURI())) {
- result = resolveSimpleTypeName(declType.getBaseType());
- } else {
- if ( !"anySimpleType".equals(declType.getName()) ) {
- result = name;
- }
- }
- return result;
- }
-
- public CTypeRef(CNonElement type, QName elementName, QName typeName, boolean nillable, XmlString defaultValue) {
- assert type!=null;
- assert elementName!=null;
-
- this.type = type;
- this.elementName = elementName;
- this.typeName = typeName;
- this.nillable = nillable;
- this.defaultValue = defaultValue;
- }
-
- public CNonElement getTarget() {
- return type;
- }
-
- public QName getTagName() {
- return elementName;
- }
-
- public boolean isNillable() {
- return nillable;
- }
-
- /**
- * Inside XJC, use {@link #defaultValue} that has context information.
- * This method is to override the one defined in the runtime model.
- *
- * @see #defaultValue
- */
- public String getDefaultValue() {
- if(defaultValue!=null)
- return defaultValue.value;
- else
- return null;
- }
-
- public boolean isLeaf() {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
- public PropertyInfo<NType, NClass> getSource() {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CValuePropertyInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CValuePropertyInfo.java
deleted file mode 100644
index 4f8dc4ff..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CValuePropertyInfo.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.core.ValuePropertyInfo;
-import com.sun.xml.internal.xsom.XSComponent;
-
-import org.xml.sax.Locator;
-
-/**
- * {@link ValuePropertyInfo} implementation for XJC.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class CValuePropertyInfo extends CSingleTypePropertyInfo implements ValuePropertyInfo<NType,NClass> {
- public CValuePropertyInfo(String name, XSComponent source, CCustomizations customizations, Locator locator, TypeUse type, QName typeName) {
- super(name, type, typeName, source, customizations, locator);
- }
-
- public final PropertyKind kind() {
- return PropertyKind.VALUE;
- }
-
- public <V> V accept(CPropertyVisitor<V> visitor) {
- return visitor.onValue(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CWildcardTypeInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CWildcardTypeInfo.java
deleted file mode 100644
index b5e42066..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/CWildcardTypeInfo.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.model.nav.NavigatorImpl;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.xml.internal.bind.v2.model.core.WildcardTypeInfo;
-
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-/**
- * {@link CTypeInfo} for the DOM node.
- *
- * TODO: support other DOM models.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class CWildcardTypeInfo extends AbstractCTypeInfoImpl implements WildcardTypeInfo<NType,NClass> {
- private CWildcardTypeInfo() {
- super(null,null,null);
- }
-
- public static final CWildcardTypeInfo INSTANCE = new CWildcardTypeInfo();
-
- public JType toType(Outline o, Aspect aspect) {
- return o.getCodeModel().ref(Element.class);
- }
-
- public NType getType() {
- return NavigatorImpl.create(Element.class);
- }
-
- public Locator getLocator() {
- return Model.EMPTY_LOCATOR;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/ClassNameAllocatorWrapper.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/ClassNameAllocatorWrapper.java
deleted file mode 100644
index 9ae8a430..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/ClassNameAllocatorWrapper.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import com.sun.codemodel.internal.JPackage;
-import com.sun.tools.internal.xjc.api.ClassNameAllocator;
-
-/**
- * Wraps {@link ClassNameAllocator} and provides convenience.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ClassNameAllocatorWrapper implements ClassNameAllocator {
- private final ClassNameAllocator core;
-
- ClassNameAllocatorWrapper(ClassNameAllocator core) {
- if(core==null)
- core = new ClassNameAllocator() {
- public String assignClassName(String packageName, String className) {
- return className;
- }
- };
- this.core = core;
- }
-
- public String assignClassName(String packageName, String className) {
- return core.assignClassName(packageName,className);
- }
-
- public String assignClassName(JPackage pkg, String className) {
- return core.assignClassName(pkg.name(),className);
- }
-
- public String assignClassName(CClassInfoParent parent, String className) {
- if (parent instanceof CClassInfoParent.Package) {
- CClassInfoParent.Package p = (CClassInfoParent.Package) parent;
- return assignClassName(p.pkg,className);
- }
- // not a package-level class
- return className;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Constructor.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Constructor.java
deleted file mode 100644
index 550722b6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Constructor.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-/**
- * Constructor declaration.
- *
- * <p>
- * a constructor declaration consists of a set of fields to be initialized.
- * For example, if a class is defined as:
- *
- * <pre>
- * Class: Foo
- * Field: String a
- * Field: int b
- * Field: BigInteger c
- * </pre>
- *
- * Then a constructor declaration of {"a","c"} will conceptually
- * generate the following consturctor:
- *
- * <pre>
- * Foo( String _a, BigInteger _c ) {
- * a=_a; c=_c;
- * }
- * </pre>
- *
- * (Only conceptually, because Foo will likely to become an interface
- * so we can't simply generate a constructor like this.)
- *
- * @author
- * <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class Constructor
-{
- // Since Constructor is typically built when there is no FieldItem
- // nor FieldUse, we need to rely on Strings.
- public Constructor( String[] _fields ) { this.fields = _fields; }
-
- /** array of field names to be initialized. */
- public final String[] fields;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Model.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Model.java
deleted file mode 100644
index a1727127..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Model.java
+++ /dev/null
@@ -1,491 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.Plugin;
-import com.sun.tools.internal.xjc.api.ClassNameAllocator;
-import com.sun.tools.internal.xjc.generator.bean.BeanGenerator;
-import com.sun.tools.internal.xjc.generator.bean.ImplStructureStrategy;
-import com.sun.tools.internal.xjc.model.nav.NClass;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.model.nav.NavigatorImpl;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.tools.internal.xjc.reader.xmlschema.Messages;
-import com.sun.tools.internal.xjc.util.ErrorReceiverFilter;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import com.sun.xml.internal.bind.v2.model.core.Ref;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.util.FlattenIterator;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.LocatorImpl;
-
-/**
- * Root of the object model that represents the code that needs to be generated.
- *
- * <p>
- * A {@link Model} is a schema language neutral representation of the
- * result of a schema parsing. The back-end then works against this model
- * to turn this into a series of Java source code.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class Model implements TypeInfoSet<NType,NClass,Void,Void>, CCustomizable {
-
- /**
- * Generated beans.
- */
- private final Map<NClass,CClassInfo> beans = new LinkedHashMap<NClass,CClassInfo>();
-
- /**
- * Generated enums.
- */
- private final Map<NClass,CEnumLeafInfo> enums = new LinkedHashMap<NClass,CEnumLeafInfo>();
-
- /**
- * The element mappings.
- */
- private final Map<NClass/*scope*/,Map<QName,CElementInfo>> elementMappings =
- new HashMap<NClass,Map<QName,CElementInfo>>();
-
- private final Iterable<? extends CElementInfo> allElements =
- new Iterable<CElementInfo>() {
- public Iterator<CElementInfo> iterator() {
- return new FlattenIterator<CElementInfo>(elementMappings.values());
- }
- };
-
- /**
- * {@link TypeUse}s for all named types.
- * <p>
- * I really don't want to promote the notion of a 'type' in any place except in the XML Schema code,
- * but this needs to be exposed for JAX-RPC. A reference to a named XML type will be converted into
- * a reference to a Java type with annotations.
- */
- private final Map<QName,TypeUse> typeUses = new LinkedHashMap<QName, TypeUse>();
-
- /**
- * {@link NameConverter} to be used.
- */
- private NameConverter nameConverter;
-
- /**
- * Single linked list that connects all {@link CCustomizations} that belong to this model.
- *
- * @see CCustomizations#next
- */
- /*package*/ CCustomizations customizations;
-
- /**
- * This field controls the generation of package level annotations for s2j
- */
- private boolean packageLevelAnnotations = true;
-
- /**
- * If this model was built from XML Schema, this field
- * stores the root object of the parse schema model.
- * Otherwise null.
- *
- * @sine 2.1.1
- */
- public final XSSchemaSet schemaComponent;
-
- private CCustomizations gloablCustomizations = new CCustomizations();
-
- /**
- * @param nc
- * Usually this should be set in the constructor, but we do allow this parameter
- * to be initially null, and then set later.
- * @param schemaComponent
- * The source schema model, if this is built from XSD.
- */
- public Model( Options opts, JCodeModel cm, NameConverter nc, ClassNameAllocator allocator, XSSchemaSet schemaComponent ) {
- this.options = opts;
- this.codeModel = cm;
- this.nameConverter = nc;
- this.defaultSymbolSpace = new SymbolSpace(codeModel);
- defaultSymbolSpace.setType(codeModel.ref(Object.class));
-
- elementMappings.put(null,new HashMap<QName,CElementInfo>());
-
- if(opts.automaticNameConflictResolution)
- allocator = new AutoClassNameAllocator(allocator);
- this.allocator = new ClassNameAllocatorWrapper(allocator);
- this.schemaComponent = schemaComponent;
- this.gloablCustomizations.setParent(this,this);
- }
-
- public void setNameConverter(NameConverter nameConverter) {
- assert this.nameConverter==null;
- assert nameConverter!=null;
- this.nameConverter = nameConverter;
- }
-
- /**
- * Gets the name converter that shall be used to parse XML names into Java names.
- */
- public final NameConverter getNameConverter() {
- return nameConverter;
- }
-
- public boolean isPackageLevelAnnotations() {
- return packageLevelAnnotations;
- }
-
- public void setPackageLevelAnnotations(boolean packageLevelAnnotations) {
- this.packageLevelAnnotations = packageLevelAnnotations;
- }
-
- /**
- * This model uses this code model exclusively.
- */
- @XmlTransient
- public final JCodeModel codeModel;
-
- /**
- * Command-line options used for building this model.
- */
- public final Options options;
-
- /**
- * True to generate serializable classes.
- */
- @XmlAttribute
- public boolean serializable;
-
- /**
- * serial version UID to be generated.
- *
- * null if not to generate serialVersionUID field.
- */
- @XmlAttribute
- public Long serialVersionUID;
-
- /**
- * If non-null, all the generated classes should eventually derive from this class.
- */
- @XmlTransient
- public JClass rootClass;
-
- /**
- * If non-null, all the generated interfaces should eventually derive from this interface.
- */
- @XmlTransient
- public JClass rootInterface;
-
- /**
- * Specifies the code generation strategy.
- * Must not be null.
- */
- public ImplStructureStrategy strategy = ImplStructureStrategy.BEAN_ONLY;
-
- /**
- * This allocator has the final say on deciding the class name.
- * Must not be null.
- *
- * <p>
- * Model classes are responsible for using the allocator.
- * This allocator interaction should be transparent to the user/builder
- * of the model.
- */
- /*package*/ final ClassNameAllocatorWrapper allocator;
-
- /**
- * Default ID/IDREF symbol space. Any ID/IDREF without explicit
- * reference to a symbol space is assumed to use this default
- * symbol space.
- */
- @XmlTransient
- public final SymbolSpace defaultSymbolSpace;
-
- /** All the defined {@link SymbolSpace}s keyed by their name. */
- private final Map<String,SymbolSpace> symbolSpaces = new HashMap<String,SymbolSpace>();
-
- public SymbolSpace getSymbolSpace( String name ) {
- SymbolSpace ss = symbolSpaces.get(name);
- if(ss==null)
- symbolSpaces.put(name,ss=new SymbolSpace(codeModel));
- return ss;
- }
-
- /**
- * Fully-generate the source code into the given model.
- *
- * @return
- * null if there was any errors. Otherwise it returns a valid
- * {@link Outline} object, which captures how the model objects
- * are mapped to the generated source code.
- * <p>
- * Add-ons can use those information to further augment the generated
- * source code.
- */
- public Outline generateCode(Options opt,ErrorReceiver receiver) {
- ErrorReceiverFilter ehf = new ErrorReceiverFilter(receiver);
-
- // run extensions // moved to BGMBuilder._build() - issue with hyperjaxb3
-// for( Plugin ma : opt.activePlugins )
-// ma.postProcessModel(this,ehf);
-
- Outline o = BeanGenerator.generate(this, ehf);
-
- try {// run extensions
- for( Plugin ma : opt.activePlugins )
- ma.run(o,opt,ehf);
- } catch (SAXException e) {
- // fatal error. error should have been reported
- return null;
- }
-
- // check for unused plug-in customizations.
- // these can be only checked after the plug-ins run, so it's here.
- // the JAXB bindings are checked by XMLSchema's builder.
- Set<CCustomizations> check = new HashSet<CCustomizations>();
- for( CCustomizations c=customizations; c!=null; c=c.next ) {
- if(!check.add(c)) {
- throw new AssertionError(); // detect a loop
- }
- for (CPluginCustomization p : c) {
- if(!p.isAcknowledged()) {
- ehf.error(
- p.locator,
- Messages.format(
- Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION,
- p.element.getNodeName()
- ));
- ehf.error(
- c.getOwner().getLocator(),
- Messages.format(
- Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION));
- }
- }
- }
-
- if(ehf.hadError())
- o = null;
- return o;
- }
-
- /**
- * Represents the "top-level binding".
- *
- * <p>
- * This is used to support the use of a schema inside WSDL.
- * For XML Schema, the top-level binding is a map from
- * global element declarations to its representation class.
- *
- * <p>
- * For other schema languages, it should follow the appendicies in
- * WSDL (but in practice no one would use WSDL with a schema language
- * other than XML Schema, so it doesn't really matter.)
- *
- * <p>
- * This needs to be filled by the front-end.
- */
- public final Map<QName,CClassInfo> createTopLevelBindings() {
- Map<QName,CClassInfo> r = new HashMap<QName,CClassInfo>();
- for( CClassInfo b : beans().values() ) {
- if(b.isElement())
- r.put(b.getElementName(),b);
- }
- return r;
- }
-
- public Navigator<NType,NClass,Void,Void> getNavigator() {
- return NavigatorImpl.theInstance;
- }
-
- public CNonElement getTypeInfo(NType type) {
- CBuiltinLeafInfo leaf = CBuiltinLeafInfo.LEAVES.get(type);
- if(leaf!=null) return leaf;
-
- return getClassInfo(getNavigator().asDecl(type));
- }
-
- public CBuiltinLeafInfo getAnyTypeInfo() {
- return CBuiltinLeafInfo.ANYTYPE;
- }
-
- public CNonElement getTypeInfo(Ref<NType,NClass> ref) {
- // TODO: handle XmlValueList
- assert !ref.valueList;
- return getTypeInfo(ref.type);
- }
-
- public Map<NClass,CClassInfo> beans() {
- return beans;
- }
-
- public Map<NClass,CEnumLeafInfo> enums() {
- return enums;
- }
-
- public Map<QName,TypeUse> typeUses() {
- return typeUses;
- }
-
- /**
- * No array mapping generation for XJC.
- */
- public Map<NType, ? extends CArrayInfo> arrays() {
- return Collections.emptyMap();
- }
-
- public Map<NType, ? extends CBuiltinLeafInfo> builtins() {
- return CBuiltinLeafInfo.LEAVES;
- }
-
- public CClassInfo getClassInfo(NClass t) {
- return beans.get(t);
- }
-
- public CElementInfo getElementInfo(NClass scope,QName name) {
- Map<QName,CElementInfo> m = elementMappings.get(scope);
- if(m!=null) {
- CElementInfo r = m.get(name);
- if(r!=null) return r;
- }
- return elementMappings.get(null).get(name);
- }
-
- public Map<QName,CElementInfo> getElementMappings(NClass scope) {
- return elementMappings.get(scope);
- }
-
- public Iterable<? extends CElementInfo> getAllElements() {
- return allElements;
- }
-
- /**
- * @deprecated
- * Always return null. Perhaps you are interested in {@link #schemaComponent}?
- */
- public XSComponent getSchemaComponent() {
- return null;
- }
-
- /**
- * @deprecated
- * No line number available for the "root" component.
- */
- public Locator getLocator() {
- LocatorImpl r = new LocatorImpl();
- r.setLineNumber(-1);
- r.setColumnNumber(-1);
- return r;
- }
-
- /**
- * Gets the global customizations.
- */
- public CCustomizations getCustomizations() {
- return gloablCustomizations;
- }
-
- /**
- * Not implemented in the compile-time model.
- */
- public Map<String, String> getXmlNs(String namespaceUri) {
- return Collections.emptyMap();
- }
-
- public Map<String, String> getSchemaLocations() {
- return Collections.emptyMap();
- }
-
- public XmlNsForm getElementFormDefault(String nsUri) {
- throw new UnsupportedOperationException();
- }
-
- public XmlNsForm getAttributeFormDefault(String nsUri) {
- throw new UnsupportedOperationException();
- }
-
- public void dump(Result out) {
- // TODO
- throw new UnsupportedOperationException();
- }
-
- /*package*/ void add( CEnumLeafInfo e ) {
- enums.put( e.getClazz(), e );
- }
-
- /*package*/ void add( CClassInfo ci ) {
- beans.put( ci.getClazz(), ci );
- }
-
- /*package*/ void add( CElementInfo ei ) {
- NClass clazz = null;
- if(ei.getScope()!=null)
- clazz = ei.getScope().getClazz();
-
- Map<QName,CElementInfo> m = elementMappings.get(clazz);
- if(m==null)
- elementMappings.put(clazz,m=new HashMap<QName,CElementInfo>());
- m.put(ei.getElementName(),ei);
- }
-
-
- private final Map<JPackage,CClassInfoParent.Package> cache = new HashMap<JPackage,CClassInfoParent.Package>();
-
- public CClassInfoParent.Package getPackage(JPackage pkg) {
- CClassInfoParent.Package r = cache.get(pkg);
- if(r==null)
- cache.put(pkg,r=new CClassInfoParent.Package(pkg));
- return r;
- }
-
- /*package*/ static final Locator EMPTY_LOCATOR;
-
- static {
- LocatorImpl l = new LocatorImpl();
- l.setColumnNumber(-1);
- l.setLineNumber(-1);
- EMPTY_LOCATOR = l;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Multiplicity.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Multiplicity.java
deleted file mode 100644
index 0a90ecf3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Multiplicity.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import java.math.BigInteger;
-
-
-
-/**
- * represents a possible number of occurence.
- *
- * Usually, denoted by a pair of integers like (1,1) or (5,10).
- * A special value "unbounded" is allowed as the upper bound.
- *
- * <p>
- * For example, (0,unbounded) corresponds to the '*' occurence of DTD.
- * (0,1) corresponds to the '?' occurence of DTD.
- *
- * @author
- * <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public final class Multiplicity {
- public final BigInteger min;
- public final BigInteger max; // null is used to represent "unbounded".
-
- public static Multiplicity create(BigInteger min, BigInteger max ) {
- if (BigInteger.ZERO.equals(min) && max==null) return STAR;
- if (BigInteger.ONE.equals(min) && max==null) return PLUS;
- if (max!=null) {
- if(BigInteger.ZERO.equals(min) && BigInteger.ZERO.equals(max)) return ZERO;
- if(BigInteger.ZERO.equals(min) && BigInteger.ONE.equals(max)) return OPTIONAL;
- if(BigInteger.ONE.equals(min) && BigInteger.ONE.equals(max)) return ONE;
- }
- return new Multiplicity(min, max);
- }
-
- public static Multiplicity create(int min, Integer max ) {
- return Multiplicity.create(BigInteger.valueOf(min), BigInteger.valueOf(max.intValue()));
- }
-
- private Multiplicity(BigInteger min, BigInteger max) {
- this.min = min;
- this.max = max;
- }
-
- private Multiplicity(int min, int max) {
- this(BigInteger.valueOf(min), BigInteger.valueOf(max));
- }
-
- private Multiplicity(int min, Integer max) {
- this(BigInteger.valueOf(min), (max == null) ? null : BigInteger.valueOf(max));
- }
-
- @Override
- public boolean equals(Object o) {
- if (!(o instanceof Multiplicity)) return false;
-
- Multiplicity that = (Multiplicity) o;
-
- if (!this.min.equals(that.min)) return false;
- if (this.max != null ? !this.max.equals(that.max) : that.max != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return min.add(max).intValue();
- }
-
- /** returns true if the multiplicity is (1,1). */
- public boolean isUnique() {
- if(max==null) return false;
- return BigInteger.ONE.equals(min) && BigInteger.ONE.equals(max);
- }
-
- /** returns true if the multiplicity is (0,1) */
- public boolean isOptional() {
- if(max==null) return false;
- return BigInteger.ZERO.equals(min) && BigInteger.ONE.equals(max);
- }
-
- /** returns true if the multiplicity is (0,1) or (1,1). */
- public boolean isAtMostOnce() {
- if(max==null) return false;
- return max.compareTo(BigInteger.ONE)<=0;
- }
-
- /** returns true if the multiplicity is (0,0). */
- public boolean isZero() {
- if(max==null) return false;
- return BigInteger.ZERO.equals(max);
- }
-
- /**
- * Returns true if the multiplicity represented by this object
- * completely includes the multiplicity represented by the
- * other object. For example, we say [1,3] includes [1,2] but
- * [2,4] doesn't include [1,3].
- */
- public boolean includes( Multiplicity rhs ) {
- if (rhs.min.compareTo(min) == -1) return false;
- if (max==null) return true;
- if (rhs.max==null) return false;
- return rhs.max.compareTo(max) <= 0;
- }
-
- /**
- * Returns the string representation of the 'max' property.
- * Either a number or a token "unbounded".
- */
- public String getMaxString() {
- if(max==null) return "unbounded";
- else return max.toString();
- }
-
- /** gets the string representation.
- * mainly debug purpose.
- */
- @Override
- public String toString() {
- return "("+min+','+getMaxString()+')';
- }
-
- /** the constant representing the (0,0) multiplicity. */
- public static final Multiplicity ZERO = new Multiplicity(0,0);
-
- /** the constant representing the (1,1) multiplicity. */
- public static final Multiplicity ONE = new Multiplicity(1,1);
-
- /** the constant representing the (0,1) multiplicity. */
- public static final Multiplicity OPTIONAL = new Multiplicity(0,1);
-
- /** the constant representing the (0,unbounded) multiplicity. */
- public static final Multiplicity STAR = new Multiplicity(0,null);
-
- /** the constant representing the (1,unbounded) multiplicity. */
- public static final Multiplicity PLUS = new Multiplicity(1,null);
-
-// arithmetic methods
- public static Multiplicity choice( Multiplicity lhs, Multiplicity rhs ) {
- return create(
- lhs.min.min(rhs.min),
- (lhs.max==null || rhs.max==null) ? null : lhs.max.max(rhs.max) );
- }
- public static Multiplicity group( Multiplicity lhs, Multiplicity rhs ) {
- return create(
- lhs.min.add(rhs.min),
- (lhs.max==null || rhs.max==null) ? null : lhs.max.add(rhs.max) );
- }
- public static Multiplicity multiply( Multiplicity lhs, Multiplicity rhs ) {
- BigInteger min = lhs.min.multiply(rhs.min);
- BigInteger max;
- if (isZero(lhs.max) || isZero(rhs.max))
- max = BigInteger.ZERO;
- else
- if (lhs.max==null || rhs.max==null)
- max = null;
- else
- max = lhs.max.multiply(rhs.max);
- return create(min,max);
- }
-
- private static boolean isZero(BigInteger i) {
- return (i != null && BigInteger.ZERO.equals(i));
- }
-
- public static Multiplicity oneOrMore( Multiplicity c ) {
- if(c.max==null) return c; // (x,*) => (x,*)
- if(BigInteger.ZERO.equals(c.max)) return c; // (0,0) => (0,0)
- else return create( c.min, null ); // (x,y) => (x,*)
- }
-
- public Multiplicity makeOptional() {
- if (BigInteger.ZERO.equals(min)) return this;
- return create(BigInteger.ZERO, max);
- }
-
- public Multiplicity makeRepeated() {
- if (max==null || BigInteger.ZERO.equals(max)) return this; // (0,0)* = (0,0) and (n,unbounded)* = (n,unbounded)
- return create(min,null);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Populatable.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Populatable.java
deleted file mode 100644
index f42b6724..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/Populatable.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import com.sun.tools.internal.xjc.outline.Outline;
-
-/**
- * Mark model components which does additional code generation.
- *
- * TODO: currently this is only used for enum xducers. Think about a way
- * to generalize this.
- *
- * TODO: is this a sensible abstraction? Who's responsible for registering
- * populatable components to the model? Isn't it better if the back end
- * just gives every component a chance to build it automatically?
- *
- * @author Kohsuke Kawaguchi
- */
-public interface Populatable {
- public void populate( Model model, Outline context );
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/SymbolSpace.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/SymbolSpace.java
deleted file mode 100644
index 920093fe..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/SymbolSpace.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JType;
-
-/**
- * Symbol space for ID/IDREF.
- *
- * In XJC, the whole ID space is considered to be splitted into
- * one or more "symbol space". For an IDREF to match an ID, we impose
- * additional restriction to the one stated in the XML rec.
- *
- * <p>
- * That is, XJC'll require that the IDREF belongs to the same symbol
- * space as the ID. Having this concept allows us to assign more
- * specific type to IDREF.
- *
- * <p>
- * See the design document for detail.
- *
- * @author
- * <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class SymbolSpace
-{
- private JType type;
- private final JCodeModel codeModel;
-
- public SymbolSpace( JCodeModel _codeModel ) {
- this.codeModel = _codeModel;
- }
-
- /**
- * Gets the Java type of this symbol space.
- *
- * <p>
- * A symbol space is said to have a Java type X if all classes
- * pointed by IDs belonging to this symbol space are assignable
- * to X.
- */
- public JType getType() {
- if(type==null) return codeModel.ref(Object.class);
- return type;
- }
-
- public void setType( JType _type ) {
- if( this.type==null )
- this.type = _type;
- }
-
- public String toString() {
- if(type==null) return "undetermined";
- else return type.name();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/TypeUse.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/TypeUse.java
deleted file mode 100644
index 15b5584b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/TypeUse.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import javax.activation.MimeType;
-
-import com.sun.codemodel.internal.JExpression;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.xsom.XmlString;
-
-/**
- * Information about how another type is referenced.
- *
- * <p>
- * In practice it is often easier to use {@link CTypeInfo}
- * instead of {@link NType}, so this interface defines {@link #getInfo()}.
- *
- * @author Kohsuke Kawaguchi
- * @see TypeUseImpl
- */
-public interface TypeUse {
- /**
- * If the use can hold multiple values of the specified type.
- */
- boolean isCollection();
-
- /**
- * If this type use is adapting the type, returns the adapter.
- * Otherwise return null.
- */
- CAdapter getAdapterUse();
-
- /**
- * Individual item type.
- */
- CNonElement getInfo();
-
- /**
- * Whether the referenced type (individual item type in case of collection)
- * is ID/IDREF.
- *
- * <p>
- * ID is a property of a relationship. When a bean Foo has an ID property
- * called 'bar' whose type is String, Foo isn't an ID, String isn't an ID,
- * but this relationship is an ID (in the sense that Foo uses this String
- * as an ID.)
- *
- * <p>
- * The same thing can be said with IDREF. When Foo refers to Bar by means of
- * IDREF, neither Foo nor Bar is IDREF.
- *
- * <p>
- * That's why we have this method in {@link TypeUse}.
- */
- ID idUse();
-
- /**
- * A {@link TypeUse} can have an associated MIME type.
- */
- MimeType getExpectedMimeType();
-
- /**
- * Creates a constant for the given lexical value.
- *
- * <p>
- * For example, to create a constant 1 for <tt>xs:int</tt>, you'd do:
- * <pre>
- * CBuiltinLeafInfo.INT.createConstant( codeModel, "1", null );
- * </pre>
- *
- * <p>
- * This method is invoked at the backend as a part of the code generation process.
- *
- * @throws IllegalStateException
- * if the type isn't bound to a text in XML.
- *
- * @return null
- * if the constant cannot be created for this {@link TypeUse}
- * (such as when it's a collection)
- */
- JExpression createConstant(Outline outline, XmlString lexical);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/TypeUseFactory.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/TypeUseFactory.java
deleted file mode 100644
index 5ca32493..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/TypeUseFactory.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import javax.activation.MimeType;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-import com.sun.xml.internal.bind.v2.TODO;
-import com.sun.xml.internal.bind.v2.model.core.Adapter;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-
-/**
- * Factory methods to create a new {@link TypeUse} from an existing one.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class TypeUseFactory {
- private TypeUseFactory() {}
-
- public static TypeUse makeID( TypeUse t, ID id ) {
- if(t.idUse()!=ID.NONE)
- // I don't think we let users tweak the idness, so
- // this error must indicate an inconsistency within the RI/spec.
- throw new IllegalStateException();
- return new TypeUseImpl( t.getInfo(), t.isCollection(), id, t.getExpectedMimeType(), t.getAdapterUse() );
- }
-
- public static TypeUse makeMimeTyped( TypeUse t, MimeType mt ) {
- if(t.getExpectedMimeType()!=null)
- // I don't think we let users tweak the idness, so
- // this error must indicate an inconsistency within the RI/spec.
- throw new IllegalStateException();
- return new TypeUseImpl( t.getInfo(), t.isCollection(), t.idUse(), mt, t.getAdapterUse() );
- }
-
- public static TypeUse makeCollection( TypeUse t ) {
- if(t.isCollection()) return t;
- CAdapter au = t.getAdapterUse();
- if(au!=null && !au.isWhitespaceAdapter()) {
- // we can't process this right now.
- // for now bind to a weaker type
- TODO.checkSpec();
- return CBuiltinLeafInfo.STRING_LIST;
- }
- return new TypeUseImpl( t.getInfo(), true, t.idUse(), t.getExpectedMimeType(), null );
- }
-
- public static TypeUse adapt(TypeUse t, CAdapter adapter) {
- assert t.getAdapterUse()==null; // TODO: we don't know how to handle double adapters yet.
- return new TypeUseImpl(t.getInfo(),t.isCollection(),t.idUse(),t.getExpectedMimeType(),adapter);
- }
-
- /**
- * Creates a new adapter {@link TypeUse} by using the existing {@link Adapter} class.
- */
- public static TypeUse adapt( TypeUse t, Class<? extends XmlAdapter> adapter, boolean copy ) {
- return adapt( t, new CAdapter(adapter,copy) );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/TypeUseImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/TypeUseImpl.java
deleted file mode 100644
index 35230f61..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/TypeUseImpl.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model;
-
-import javax.activation.MimeType;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JStringLiteral;
-import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.xml.internal.bind.v2.ClassFactory;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.xsom.XmlString;
-
-
-/**
- * General-purpose {@link TypeUse} implementation.
- *
- * @author Kohsuke Kawaguchi
- */
-final class TypeUseImpl implements TypeUse {
- private final CNonElement coreType;
- private final boolean collection;
- private final CAdapter adapter;
- private final ID id;
- private final MimeType expectedMimeType;
-
-
- public TypeUseImpl(CNonElement itemType, boolean collection, ID id, MimeType expectedMimeType, CAdapter adapter) {
- this.coreType = itemType;
- this.collection = collection;
- this.id = id;
- this.expectedMimeType = expectedMimeType;
- this.adapter = adapter;
- }
-
- public boolean isCollection() {
- return collection;
- }
-
- public CNonElement getInfo() {
- return coreType;
- }
-
- public CAdapter getAdapterUse() {
- return adapter;
- }
-
- public ID idUse() {
- return id;
- }
-
- public MimeType getExpectedMimeType() {
- return expectedMimeType;
- }
-
- public boolean equals(Object o) {
- if (this == o) return true;
- if (!(o instanceof TypeUseImpl)) return false;
-
- final TypeUseImpl that = (TypeUseImpl) o;
-
- if (collection != that.collection) return false;
- if (this.id != that.id ) return false;
- if (adapter != null ? !adapter.equals(that.adapter) : that.adapter != null) return false;
- if (coreType != null ? !coreType.equals(that.coreType) : that.coreType != null) return false;
-
- return true;
- }
-
- public int hashCode() {
- int result;
- result = (coreType != null ? coreType.hashCode() : 0);
- result = 29 * result + (collection ? 1 : 0);
- result = 29 * result + (adapter != null ? adapter.hashCode() : 0);
- return result;
- }
-
-
- public JExpression createConstant(Outline outline, XmlString lexical) {
- if(isCollection()) return null;
-
- if(adapter==null) return coreType.createConstant(outline, lexical);
-
- // [RESULT] new Adapter().unmarshal(CONSTANT);
- JExpression cons = coreType.createConstant(outline, lexical);
- Class<? extends XmlAdapter> atype = adapter.getAdapterIfKnown();
-
- // try to run the adapter now rather than later.
- if(cons instanceof JStringLiteral && atype!=null) {
- JStringLiteral scons = (JStringLiteral) cons;
- XmlAdapter a = ClassFactory.create(atype);
- try {
- Object value = a.unmarshal(scons.str);
- if(value instanceof String) {
- return JExpr.lit((String)value);
- }
- } catch (Exception e) {
- // assume that we can't eagerly bind this
- }
- }
-
- return JExpr._new(adapter.getAdapterClass(outline)).invoke("unmarshal").arg(cons);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNClass.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNClass.java
deleted file mode 100644
index 4fd6199b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNClass.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model.nav;
-
-import java.lang.reflect.Modifier;
-import java.util.HashSet;
-import java.util.Set;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public class EagerNClass extends EagerNType implements NClass {
- /*package*/ final Class c;
-
- public EagerNClass(Class type) {
- super(type);
- this.c = type;
- }
-
- @Override
- public boolean isBoxedType() {
- return boxedTypes.contains(c);
- }
-
- @Override
- public JClass toType(Outline o, Aspect aspect) {
- return o.getCodeModel().ref(c);
- }
-
- public boolean isAbstract() {
- return Modifier.isAbstract(c.getModifiers());
- }
-
- private static final Set<Class> boxedTypes = new HashSet<Class>();
-
- static {
- boxedTypes.add(Boolean.class);
- boxedTypes.add(Character.class);
- boxedTypes.add(Byte.class);
- boxedTypes.add(Short.class);
- boxedTypes.add(Integer.class);
- boxedTypes.add(Long.class);
- boxedTypes.add(Float.class);
- boxedTypes.add(Double.class);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java
deleted file mode 100644
index 2b6be6a9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model.nav;
-
-import java.lang.reflect.Type;
-
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class EagerNType implements NType {
- /*package*/ final Type t;
-
- public EagerNType(Type type) {
- this.t = type;
- assert t!=null;
- }
-
- public JType toType(Outline o, Aspect aspect) {
- try {
- return o.getCodeModel().parseType(t.toString());
- } catch (ClassNotFoundException e) {
- throw new NoClassDefFoundError(e.getMessage());
- }
- }
-
- public boolean equals(Object o) {
- if (this == o) return true;
- if (!(o instanceof EagerNType)) return false;
-
- final EagerNType eagerNType = (EagerNType) o;
-
- return t.equals(eagerNType.t);
- }
-
- public boolean isBoxedType() {
- return false;
- }
-
- public int hashCode() {
- return t.hashCode();
- }
-
- public String fullName() {
- return Utils.REFLECTION_NAVIGATOR.getTypeName(t);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NClass.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NClass.java
deleted file mode 100644
index 56213e73..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NClass.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model.nav;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface NClass extends NType {
- JClass toType(Outline o, Aspect aspect);
-
- boolean isAbstract();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NClassByJClass.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NClassByJClass.java
deleted file mode 100644
index 26fe6618..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NClassByJClass.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model.nav;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class NClassByJClass implements NClass {
- /*package*/ final JClass clazz;
-
- NClassByJClass(JClass clazz) {
- this.clazz = clazz;
- }
-
- public JClass toType(Outline o, Aspect aspect) {
- return clazz;
- }
-
- public boolean isAbstract() {
- return clazz.isAbstract();
- }
-
- public boolean isBoxedType() {
- return clazz.getPrimitiveType()!=null;
- }
-
- public String fullName() {
- return clazz.fullName();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NParameterizedType.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NParameterizedType.java
deleted file mode 100644
index 35f45d44..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NParameterizedType.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model.nav;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-
-/**
- * Parameterized type.
- *
- * @author Kohsuke Kawaguchi
- */
-final class NParameterizedType implements NClass {
-
- final NClass rawType;
- final NType[] args;
-
- NParameterizedType(NClass rawType, NType[] args) {
- this.rawType = rawType;
- this.args = args;
- assert args.length>0;
- }
-
- public JClass toType(Outline o, Aspect aspect) {
- JClass r = rawType.toType(o,aspect);
-
- for( NType arg : args )
- r = r.narrow(arg.toType(o,aspect).boxify());
-
- return r;
- }
-
- public boolean isAbstract() {
- return rawType.isAbstract();
- }
-
- public boolean isBoxedType() {
- return false;
- }
-
-
- public String fullName() {
- StringBuilder buf = new StringBuilder();
- buf.append(rawType.fullName());
- buf.append('<');
- for( int i=0; i<args.length; i++ ) {
- if(i!=0)
- buf.append(',');
- buf.append(args[i].fullName());
- }
- buf.append('>');
- return buf.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NType.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NType.java
deleted file mode 100644
index 2c940c0d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NType.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.model.nav;
-
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.outline.Aspect;
-import com.sun.tools.internal.xjc.outline.Outline;
-
-/**
- * A type.
- *
- * See the package documentaion for details.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface NType {
- /**
- * Returns the representation of this type in code model.
- * <p>
- * This operation requires the whole model to be built,
- * and hence it takes {@link Outline}.
- * <p>
- * Under some code generation strategy, some bean classes
- * are considered implementation specific (such as impl.FooImpl class)
- * These classes always have accompanying "exposed" type (such as
- * the Foo interface).
- * <p>
- * For such Jekyll and Hyde type, the aspect parameter determines
- * which personality is returned.
- *
- * @param aspect
- * If {@link Aspect#IMPLEMENTATION}, this method returns the
- * implementation specific class that this type represents.
- * If {@link Aspect#EXPOSED}, this method returns the
- * publicly exposed type that this type represents.
- *
- * For ordinary classes, the aspect parameter is meaningless.
- *
- */
- JType toType(Outline o, Aspect aspect);
-
- /**
- * Returns true iff this type represents a class that has a unboxed form.
- *
- * For example, for {@link String} this is false, but for {@link Integer}
- * this is true.
- */
- boolean isBoxedType();
-
- /**
- * Human readable name of this type.
- */
- String fullName();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java
deleted file mode 100644
index f83aa643..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.xjc.model.nav;
-
-import java.lang.reflect.Type;
-import java.util.Collection;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-
-/**
- * {@link Navigator} implementation for XJC.
- *
- * Most of the Navigator methods are used for parsing the model, which doesn't happen
- * in XJC. So Most of the methods aren't really implemented. Implementations should
- * be filled in as needed.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class NavigatorImpl implements Navigator<NType,NClass,Void,Void> {
- public static final NavigatorImpl theInstance = new NavigatorImpl();
-
- private NavigatorImpl() {
- }
-
- public NClass getSuperClass(NClass nClass) {
- throw new UnsupportedOperationException();
- }
-
- public NType getBaseClass(NType nt, NClass base) {
- if(nt instanceof EagerNType) {
- EagerNType ent = (EagerNType) nt;
- if (base instanceof EagerNClass) {
- EagerNClass enc = (EagerNClass) base;
- return create(Utils.REFLECTION_NAVIGATOR.getBaseClass(ent.t, enc.c));
- }
- // lazy class can never be a base type of an eager type
- return null;
- }
- if (nt instanceof NClassByJClass) {
- NClassByJClass nnt = (NClassByJClass) nt;
- if (base instanceof EagerNClass) {
- EagerNClass enc = (EagerNClass) base;
- return ref(nnt.clazz.getBaseClass(enc.c));
- }
- }
-
- throw new UnsupportedOperationException();
- }
-
- public String getClassName(NClass nClass) {
- throw new UnsupportedOperationException();
- }
-
- public String getTypeName(NType type) {
- return type.fullName();
- }
-
- public String getClassShortName(NClass nClass) {
- throw new UnsupportedOperationException();
- }
-
- public Collection<? extends Void> getDeclaredFields(NClass nClass) {
- throw new UnsupportedOperationException();
- }
-
- public Void getDeclaredField(NClass clazz, String fieldName) {
- throw new UnsupportedOperationException();
- }
-
- public Collection<? extends Void> getDeclaredMethods(NClass nClass) {
- throw new UnsupportedOperationException();
- }
-
- public NClass getDeclaringClassForField(Void aVoid) {
- throw new UnsupportedOperationException();
- }
-
- public NClass getDeclaringClassForMethod(Void aVoid) {
- throw new UnsupportedOperationException();
- }
-
- public NType getFieldType(Void aVoid) {
- throw new UnsupportedOperationException();
- }
-
- public String getFieldName(Void aVoid) {
- throw new UnsupportedOperationException();
- }
-
- public String getMethodName(Void aVoid) {
- throw new UnsupportedOperationException();
- }
-
- public NType getReturnType(Void aVoid) {
- throw new UnsupportedOperationException();
- }
-
- public NType[] getMethodParameters(Void aVoid) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isStaticMethod(Void aVoid) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isFinalMethod(Void aVoid) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isSubClassOf(NType sub, NType sup) {
- throw new UnsupportedOperationException();
- }
-
- public NClass ref(Class c) {
- return create(c);
- }
-
- public NClass ref(JClass c) {
- if(c==null) return null;
- return new NClassByJClass(c);
- }
-
- public NType use(NClass nc) {
- return nc;
- }
-
- public NClass asDecl(NType nt) {
- if(nt instanceof NClass)
- return (NClass)nt;
- else
- return null;
- }
-
- public NClass asDecl(Class c) {
- return ref(c);
- }
-
- public boolean isArray(NType nType) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isArrayButNotByteArray(NType t) {
- throw new UnsupportedOperationException();
- }
-
-
- public NType getComponentType(NType nType) {
- throw new UnsupportedOperationException();
- }
-
- public NType getTypeArgument(NType nt, int i) {
- if (nt instanceof EagerNType) {
- EagerNType ent = (EagerNType) nt;
- return create(Utils.REFLECTION_NAVIGATOR.getTypeArgument(ent.t,i));
- }
- if (nt instanceof NClassByJClass) {
- NClassByJClass nnt = (NClassByJClass) nt;
- return ref(nnt.clazz.getTypeParameters().get(i));
- }
-
- throw new UnsupportedOperationException();
- }
-
- public boolean isParameterizedType(NType nt) {
- if (nt instanceof EagerNType) {
- EagerNType ent = (EagerNType) nt;
- return Utils.REFLECTION_NAVIGATOR.isParameterizedType(ent.t);
- }
- if (nt instanceof NClassByJClass) {
- NClassByJClass nnt = (NClassByJClass) nt;
- return nnt.clazz.isParameterized();
- }
-
- throw new UnsupportedOperationException();
- }
-
- public boolean isPrimitive(NType type) {
- throw new UnsupportedOperationException();
- }
-
- public NType getPrimitive(Class primitiveType) {
- return create(primitiveType);
- }
-
- @SuppressWarnings("FinalStaticMethod")
- public static final NType create(Type t) {
- if(t==null) return null;
- if(t instanceof Class)
- return create((Class)t);
-
- return new EagerNType(t);
- }
-
- public static NClass create( Class c ) {
- if(c==null) return null;
- return new EagerNClass(c);
- }
-
- /**
- * Creates a {@link NType} representation for a parameterized type
- * {@code RawType&lt;ParamType1,ParamType2,...> }.
- */
- public static NType createParameterizedType( NClass rawType, NType... args ) {
- return new NParameterizedType(rawType,args);
- }
-
- public static NType createParameterizedType( Class rawType, NType... args ) {
- return new NParameterizedType(create(rawType),args);
- }
-
- public Location getClassLocation(final NClass c) {
- // not really needed for XJC but doesn't hurt to have one
- return new Location() {
- @Override
- public String toString() {
- return c.fullName();
- }
- };
- }
-
- public Location getFieldLocation(Void v) {
- throw new IllegalStateException();
- }
-
- public Location getMethodLocation(Void v) {
- throw new IllegalStateException();
- }
-
- public boolean hasDefaultConstructor(NClass nClass) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isStaticField(Void aVoid) {
- throw new IllegalStateException();
- }
-
- public boolean isPublicMethod(Void aVoid) {
- throw new IllegalStateException();
- }
-
- public boolean isPublicField(Void aVoid) {
- throw new IllegalStateException();
- }
-
- public boolean isEnum(NClass c) {
- return isSubClassOf(c,create(Enum.class));
- }
-
- public <T> NType erasure(NType type) {
- if(type instanceof NParameterizedType) {
- NParameterizedType pt = (NParameterizedType) type;
- return pt.rawType;
- }
- return type;
- }
-
- public boolean isAbstract(NClass clazz) {
- return clazz.isAbstract();
- }
-
- /**
- * @deprecated
- * no class generated by XJC is final.
- */
- public boolean isFinal(NClass clazz) {
- return false;
- }
-
- public Void[] getEnumConstants(NClass clazz) {
- throw new UnsupportedOperationException();
- }
-
- public NType getVoidType() {
- return ref(void.class);
- }
-
- public String getPackageName(NClass clazz) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
- @Override
- public NClass loadObjectFactory(NClass referencePoint, String pkg) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isBridgeMethod(Void method) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isOverriding(Void method,NClass clazz) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isInterface(NClass clazz) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isTransient(Void f) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isInnerClass(NClass clazz) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean isSameType(NType t1, NType t2) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java
deleted file mode 100644
index 3c1f5bdf..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.xjc.model.nav;
-
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Utils class.
- *
- * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages.
- *
- * Has *package private* access to avoid inappropriate usage.
- */
-final class Utils {
-
- private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
-
- /**
- * static ReflectionNavigator field to avoid usage of reflection every time we use it.
- */
- static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
-
- static { // we statically initializing REFLECTION_NAVIGATOR property
- try {
- final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
-
- // requires accessClassInPackage privilege
- final Method getInstance = AccessController.doPrivileged(
- new PrivilegedAction<Method>() {
- @Override
- public Method run() {
- try {
- Method getInstance = refNav.getDeclaredMethod("getInstance");
- getInstance.setAccessible(true);
- return getInstance;
- } catch (NoSuchMethodException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
- }
- }
- }
- );
-
- //noinspection unchecked
- REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
- } catch (ClassNotFoundException e) {
- throw new IllegalStateException("Can't find ReflectionNavigator class");
- } catch (InvocationTargetException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
- } catch (IllegalAccessException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
- } catch (SecurityException e) {
- LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
- throw e;
- }
- }
-
- /**
- * private constructor to avoid util class instantiating
- */
- private Utils() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/package.html b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/package.html
deleted file mode 100644
index 3f4a8946..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/package.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
- <p>
- Compile-time representation of Java type system.
-
- <p>
- These classes are used as TypeT and ClassDeclT of the model parameterization.
- This implementaion is designed to be capable of representing pre-existing classes
- (such as java.lang.String) as well as the generated classes (represented as JDefinedClass.)
-
- <h2>Handling of Primitive Types</h2>
- <p>
- Primitive types have two forms (int and Integer), and this complicates the binding process.
- For this reason, inside the front end, we always use the boxed types. We'll use the unboxed
- form only in the back end when we know the field doesn't need to represent the null value.
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/package-info.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/package-info.java
deleted file mode 100644
index 22bfb767..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/package-info.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * Implementation of the {@link com.sun.xml.internal.bind.v2.model.core} package for XJC.
- *
- * <p>
- * This model is the recipes for the code generation.
- * It captures the essence of the JAXB-bound beans,
- * so that the actual Java code can be generated from this object model
- * mechanically without knowing anything about how the model was built.
- *
- * <p>
- * Most of the classes/interfaces in this package has one-to-one relationship
- * with the parameterized core model in the {@link com.sun.xml.internal.bind.v2.model.core} package.
- * Refer to the core model for better documentation.
- *
- * <p>
- * The model for XJC also exposes a few additional information on top of the core model.
- * Those are defined in this package. This includes such information as:
- *
- * <dl>
- * <dt>Source location information
- * <dd>{@link Locator} object that can be used to tell where the model components
- * are created from in terms of the source file. Useful for error reporting.
- *
- * <dt>Source schema component
- * <dd>{@link XSComponent} object from which the model components are created from.
- * See {@link CCustomizable#getSchemaComponent()} for example.
- *
- * <dt>Plugin customizations
- * <dd>See {@link CCustomizable}.
- * </dl>
- */
-package com.sun.tools.internal.xjc.model;
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/Aspect.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/Aspect.java
deleted file mode 100644
index 5df92c81..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/Aspect.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.outline;
-
-import com.sun.tools.internal.xjc.generator.bean.ImplStructureStrategy;
-
-/**
- * Sometimes a single JAXB-generated bean spans across multiple Java classes/interfaces.
- * We call them "aspects of a bean".
- *
- * <p>
- * This is an enumeration of all possible aspects.
- *
- * @author Kohsuke Kawaguchi
- *
- * TODO: move this to the model package
- */
-public enum Aspect {
- /**
- * The exposed part of the bean.
- * <p>
- * This corresponds to the content interface when we are geneting one.
- * This would be the same as the {@link #IMPLEMENTATION} when we are
- * just generating beans.
- *
- * <p>
- * This could be an interface, or it could be a class.
- *
- * We don't have any other {@link ImplStructureStrategy} at this point,
- * but generally you can't assume anything about where this could be
- * or whether that's equal to {@link #IMPLEMENTATION}.
- */
- EXPOSED,
- /**
- * The part of the bean that holds all the implementations.
- *
- * <p>
- * This is always a class, never an interface.
- */
- IMPLEMENTATION
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/ClassOutline.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/ClassOutline.java
deleted file mode 100644
index f9332b2e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/ClassOutline.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Use is subject to the license terms.
- */
-package com.sun.tools.internal.xjc.outline;
-
-import java.util.List;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.istack.internal.NotNull;
-
-/**
- * Outline object that provides per-{@link CClassInfo} information
- * for filling in methods/fields for a bean.
- *
- * This interface is accessible from {@link Outline}
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class ClassOutline {
-
- /**
- * A {@link Outline} that encloses all the class outlines.
- */
- public abstract @NotNull Outline parent();
-
- /**
- * {@link PackageOutline} that contains this class.
- */
- public @NotNull PackageOutline _package() {
- return parent().getPackageContext(ref._package());
- }
-
- /**
- * This {@link ClassOutline} holds information about this {@link CClassInfo}.
- */
- public final @NotNull CClassInfo target;
-
- /**
- * The exposed aspect of the a bean.
- *
- * implClass is always assignable to this type.
- * <p>
- * Usually this is the public content interface, but
- * it could be the same as the implClass.
- */
- public final @NotNull JDefinedClass ref;
-
- /**
- * The implementation aspect of a bean.
- * The actual place where fields/methods should be generated into.
- */
- public final @NotNull JDefinedClass implClass;
-
- /**
- * The implementation class that shall be used for reference.
- * <p>
- * Usually this field holds the same value as the {@link #implClass} method,
- * but sometimes it holds the user-specified implementation class
- * when it is specified.
- * <p>
- * This is the type that needs to be used for generating fields.
- */
- public final @NotNull JClass implRef;
-
-
-
-
- protected ClassOutline( CClassInfo _target, JDefinedClass exposedClass, JClass implRef, JDefinedClass _implClass) {
- this.target = _target;
- this.ref = exposedClass;
- this.implRef = implRef;
- this.implClass = _implClass;
- }
-
- /**
- * Gets all the {@link FieldOutline}s newly declared
- * in this class.
- */
- public final FieldOutline[] getDeclaredFields() {
- List<CPropertyInfo> props = target.getProperties();
- FieldOutline[] fr = new FieldOutline[props.size()];
- for( int i=0; i<fr.length; i++ )
- fr[i] = parent().getField(props.get(i));
- return fr;
- }
-
- /**
- * Returns the super class of this class, if it has the
- * super class and it is also a JAXB-bound class.
- * Otherwise null.
- */
- public final ClassOutline getSuperClass() {
- CClassInfo s = target.getBaseClass();
- if(s==null) return null;
- return parent().getClazz(s);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/ElementOutline.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/ElementOutline.java
deleted file mode 100644
index d2de9bde..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/ElementOutline.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.outline;
-
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-
-/**
- * Outline object that provides per-{@link CElementInfo} information
- * for filling in methods/fields for a bean.
- *
- * This interface is accessible from {@link Outline}. This object is
- * not created for all {@link CElementInfo}s.
- * It is only for those {@link CElementInfo} that has a class.
- * (IOW, {@link CElementInfo#hasClass()}
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class ElementOutline {
-
- /**
- * A {@link Outline} that encloses all the class outlines.
- */
- public abstract Outline parent();
-
- /**
- * {@link PackageOutline} that contains this class.
- */
- public PackageOutline _package() {
- return parent().getPackageContext(implClass._package());
- }
-
- /**
- * This {@link ElementOutline} holds information about this {@link CElementInfo}.
- */
- public final CElementInfo target;
-
- /**
- * The implementation aspect of a bean.
- * The actual place where fields/methods should be generated into.
- */
- public final JDefinedClass implClass;
-
-
- protected ElementOutline(CElementInfo target, JDefinedClass implClass) {
- this.target = target;
- this.implClass = implClass;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/EnumConstantOutline.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/EnumConstantOutline.java
deleted file mode 100644
index 43ab2d52..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/EnumConstantOutline.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.outline;
-
-import com.sun.codemodel.internal.JEnumConstant;
-import com.sun.tools.internal.xjc.generator.bean.BeanGenerator;
-import com.sun.tools.internal.xjc.model.CEnumConstant;
-import com.sun.tools.internal.xjc.model.CEnumLeafInfo;
-
-/**
- * Outline object that provides per-{@link CEnumConstant} information.
- *
- * This object can be obtained from {@link EnumOutline}
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class EnumConstantOutline {
- /**
- * This {@link EnumOutline} holds information about this {@link CEnumLeafInfo}.
- */
- public final CEnumConstant target;
-
- /**
- * The generated enum constant.
- */
- public final JEnumConstant constRef;
-
- /**
- * Reserved for {@link BeanGenerator}.
- */
- protected EnumConstantOutline(CEnumConstant target, JEnumConstant constRef) {
- this.target = target;
- this.constRef = constRef;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/EnumOutline.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/EnumOutline.java
deleted file mode 100644
index be7072f2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/EnumOutline.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.outline;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.tools.internal.xjc.model.CEnumLeafInfo;
-import com.sun.istack.internal.NotNull;
-
-/**
- * Outline object that provides per-{@link CEnumLeafInfo} information
- * for filling in methods/fields for a bean.
- *
- * This object can be obtained from {@link Outline}
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class EnumOutline {
-
- /**
- * This {@link EnumOutline} holds information about this {@link CEnumLeafInfo}.
- */
- public final CEnumLeafInfo target;
-
- /**
- * The generated enum class.
- */
- public final JDefinedClass clazz;
-
- /**
- * Constants.
- */
- public final List<EnumConstantOutline> constants = new ArrayList<EnumConstantOutline>();
-
- /**
- * {@link PackageOutline} that contains this class.
- */
- public @NotNull
- PackageOutline _package() {
- return parent().getPackageContext(clazz._package());
- }
-
- /**
- * A {@link Outline} that encloses all the class outlines.
- */
- public abstract @NotNull Outline parent();
-
- protected EnumOutline(CEnumLeafInfo target, JDefinedClass clazz) {
- this.target = target;
- this.clazz = clazz;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/FieldAccessor.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/FieldAccessor.java
deleted file mode 100644
index ff8af194..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/FieldAccessor.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.outline;
-
-import com.sun.codemodel.internal.JBlock;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-
-/**
- * Encapsulates the access on a field.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface FieldAccessor {
-
- /**
- * Dumps everything in this field into the given variable.
- *
- * <p>
- * This generates code that accesses the field from outside.
- *
- * @param block
- * The code will be generated into this block.
- * @param $var
- * Variable whose type is {@link FieldOutline#getRawType()}
- */
- void toRawValue( JBlock block, JVar $var );
-
- /**
- * Sets the value of the field from the specified expression.
- *
- * <p>
- * This generates code that accesses the field from outside.
- *
- * @param block
- * The code will be generated into this block.
- * @param uniqueName
- * Identifier that the caller guarantees to be unique in
- * the given block. When the callee needs to produce additional
- * variables, it can do so by adding suffixes to this unique
- * name. For example, if the uniqueName is "abc", then the
- * caller guarantees that any identifier "abc.*" is unused
- * in this block.
- * @param $var
- * The expression that evaluates to a value of the type
- * {@link FieldOutline#getRawType()}.
- */
- void fromRawValue( JBlock block, String uniqueName, JExpression $var );
-
- /**
- * Generates a code fragment to remove any "set" value
- * and move this field to the "unset" state.
- *
- * @param body
- * The code will be appended at the end of this block.
- */
- void unsetValues( JBlock body );
-
- /**
- * Return an expression that evaluates to true only when
- * this field has a set value(s).
- *
- * @return null
- * if the isSetXXX/unsetXXX method does not make sense
- * for the given field.
- */
- JExpression hasSetValue();
-
- /**
- * Gets the {@link FieldOutline} from which
- * this object is created.
- */
- FieldOutline owner();
-
- /**
- * Short for <tt>owner().getPropertyInfo()</tt>
- */
- CPropertyInfo getPropertyInfo();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/FieldOutline.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/FieldOutline.java
deleted file mode 100644
index 0b5c85ab..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/FieldOutline.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.outline;
-
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-
-/**
- * Representation of a field of {@link ClassOutline}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface FieldOutline {
-
- /**
- * Gets the enclosing {@link ClassOutline}.
- */
- ClassOutline parent();
-
- /** Gets the corresponding model object. */
- CPropertyInfo getPropertyInfo();
-
- /**
- * Gets the type of the "raw value".
- *
- * <p>
- * This type can represent the entire value of this field.
- * For fields that can carry multiple values, this is an array.
- *
- * <p>
- * This type allows the client of the outline to generate code
- * to set/get values from a property.
- */
- JType getRawType();
-
- /**
- * Creates a new {@link FieldAccessor} of this field
- * for the specified object.
- *
- * @param targetObject
- * Evaluates to an object, and the field on this object
- * will be accessed.
- */
- FieldAccessor create( JExpression targetObject );
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/Outline.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/Outline.java
deleted file mode 100644
index e41695ca..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/Outline.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.outline;
-
-import java.util.Collection;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JClassContainer;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CClassInfoParent;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.model.CEnumLeafInfo;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.CTypeRef;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.util.CodeModelClassFactory;
-
-/**
- * Root of the outline. Captures which code is generated for which model component.
- *
- * <p>
- * This object also provides access to varioues utilities, such as
- * error reporting etc, for the convenience of code that builds the outline.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface Outline
-{
- /**
- * This outline is for this model.
- */
- Model getModel();
-
- /**
- * Short for {@code getModel().codeModel}.
- */
- JCodeModel getCodeModel();
-
- /** Gets the object that wraps the generated field for a given {@link CPropertyInfo}. */
- FieldOutline getField( CPropertyInfo fu );
-
- /**
- * Gets per-package context information.
- *
- * This method works for every visible package
- * (those packages which are supposed to be used by client applications.)
- *
- * @return
- * If this grammar doesn't produce anything in the specified
- * package, return null.
- */
- PackageOutline getPackageContext( JPackage _Package );
-
- /**
- * Returns all the {@link ClassOutline}s known to this object.
- */
- Collection<? extends ClassOutline> getClasses();
-
- /**
- * Obtains per-class context information.
- */
- ClassOutline getClazz( CClassInfo clazz );
-
- /**
- * If the {@link CElementInfo} generates a class,
- * returns such a class. Otherwise return null.
- */
- ElementOutline getElement(CElementInfo ei);
-
- EnumOutline getEnum(CEnumLeafInfo eli);
-
- /**
- * Gets all the {@link EnumOutline}s.
- */
- Collection<EnumOutline> getEnums();
-
- /** Gets all package-wise contexts at once. */
- Iterable<? extends PackageOutline> getAllPackageContexts();
-
- /**
- * Gets a reference to
- * <code>new CodeModelClassFactory(getErrorHandler())</code>.
- */
- CodeModelClassFactory getClassFactory();
-
- /**
- * Any error during the back-end proccessing should be
- * sent to this object.
- */
- ErrorReceiver getErrorReceiver();
-
- JClassContainer getContainer(CClassInfoParent parent, Aspect aspect );
-
- /**
- * Resolves a type reference to the actual (possibly generated) type.
- *
- * Short for {@code resolve(ref.getType(),aspect)}.
- */
- JType resolve(CTypeRef ref,Aspect aspect);
-
- /**
- * Copies the specified class into the user's package and returns
- * a reference to it.
- */
- JClass addRuntime(Class clazz);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/PackageOutline.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/PackageOutline.java
deleted file mode 100644
index 5c427b9c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/PackageOutline.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.outline;
-
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlSchema;
-
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.tools.internal.xjc.generator.bean.ObjectFactoryGenerator;
-
-/**
- * Outline object that provides per-package information.
- *
- * This interface is accessible from {@link Outline}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface PackageOutline {
-
- /**
- * The exposed package this context is representing.
- *
- * <p>
- * An exposed package is a package visible to users, a package
- * supposed to be used by client applications. Sometime
- * we have another parallel package that's not visible to users.
- */
- JPackage _package();
-
- /**
- * Generated ObjectFactory from package.
- *
- * This method allows a caller to obtain a reference to such
- * ObjectFactory from its package.
- *
- * Must not be null.
- */
- JDefinedClass objectFactory();
-
- /**
- * Generates an ObjectFactory class for this package.
- */
- ObjectFactoryGenerator objectFactoryGenerator();
-
- /**
- * Gets {@link ClassOutline}s whose {@link ClassOutline#_package()}
- * points to this object.
- *
- * @return can be empty but never null.
- */
- Set<? extends ClassOutline> getClasses();
-
- /**
- * The namespace URI most commonly used in classes in this package.
- * This should be used as the namespace URI for {@link XmlSchema#namespace()}.
- *
- * <p>
- * Null if no default
- */
- public String getMostUsedNamespaceURI();
-
- /**
- * The element form default for this package.
- * <p>
- * The value is computed by examining what would yield the smallest generated code.
- */
- public XmlNsForm getElementFormDefault();
-
- /**
- * The attribute form default for this package.
- * <p>
- * The value is computed by examining what would yield the smallest generated code.
- */
- public XmlNsForm getAttributeFormDefault();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/package.html b/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/package.html
deleted file mode 100644
index a0881f13..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/outline/package.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
- Provides the outline of the generated Java source code so that
- additional processings (such as adding more annotations) can be
- done on the generated code.
-
- <p>
- Code generation phase builds an outline little by little, while
- each step is using the outline built by the prior steps.
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/package-info.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/package-info.java
deleted file mode 100644
index 078d372e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/package-info.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * <h1>Schema to Java compiler</h1>.
- *
- * <p>
- * This module contains the code that implements the schema compiler 'XJC'.
- *
- *
- * <h2>XJC Architecture Diagram</h2>
- * {@DotDiagram
- digraph G {
- rankdir=TB;
-
- // data
- node [shape=box]; // style=filled,color=lightpink];
- schema -> "DOM forest" [label="DOMForest.parse()"];
- "DOM forest" -> "schema OM" [label="SOM specific parser"];
- "schema OM" -> model [label="language specific builder"];
-
- model -> codeModel [label="BeanGenerator.generate()"];
- codeModel -> "Java source files" [label="JCodeModel.build()"];
- model -> outline [label="BeanGenerator.generate()"];
-
- edge [style=dotted,label="associate"]
- outline -> codeModel;
- outline -> model;
- }
- * }
- *
- * <h2>Overview</h2>
- * <p>
- * XJC consists of the following major components.
- * <dl>
- * <dt>{@link com.sun.tools.internal.xjc.reader Schema reader}
- * <dd>
- * Schema readers read XML Schema documents (or DTD, RELAX NG, ...)
- * and builds a model.
- *
- * <dt>{@link com.sun.tools.internal.xjc.model Model}
- * <dd>
- * Model represents the 'blueprint' of the code to be generated.
- * Model talks in terms of higher level constructs like 'class' and 'property'
- * without getting too much into the details of the Java source code.
- *
- * <dt>{@link com.sun.tools.internal.xjc.generator Code generator}
- * <dd>
- * Code generators use a model as an input and builds Java code AST
- * into CodeModel. It also produces an {@link com.sun.tools.internal.xjc.outline.Outline} which captures
- * this work.
- *
- * <dt>{@link com.sun.tools.internal.xjc.outline.Outline Outline}
- * <dd>
- * Outline can be thought as a series of links between a model
- * and CodeModel.
- * </dl>
- *
- * {@DotDiagram
- * digraph G {
- * rankdir = LR;
- * schema -> reader -> model -> backend -> outline;
- * }
- * }
- *
- * @ArchitectureDocument
- */
-package com.sun.tools.internal.xjc;
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/AbstractExtensionBindingChecker.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/AbstractExtensionBindingChecker.java
deleted file mode 100644
index 061caebb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/AbstractExtensionBindingChecker.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader;
-
-import java.util.Set;
-import java.util.HashSet;
-
-import com.sun.tools.internal.xjc.util.SubtreeCutter;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.Plugin;
-import com.sun.xml.internal.bind.v2.util.EditDistance;
-
-import org.xml.sax.helpers.NamespaceSupport;
-import org.xml.sax.Locator;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.SAXException;
-
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-
-/**
- * Common code between {@code DTDExtensionBindingChecker} and {@link ExtensionBindingChecker}.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class AbstractExtensionBindingChecker extends SubtreeCutter {
- /** Remembers in-scope namespace bindings. */
- protected final NamespaceSupport nsSupport = new NamespaceSupport();
-
- /**
- * Set of namespace URIs that designates enabled extensions.
- */
- protected final Set<String> enabledExtensions = new HashSet<String>();
-
- private final Set<String> recognizableExtensions = new HashSet<String>();
-
- private Locator locator;
-
- /**
- * Namespace URI of the target schema language. Elements in this
- * namespace are always allowed.
- */
- protected final String schemaLanguage;
-
- /**
- * If false, any use of extensions is reported as an error.
- */
- protected final boolean allowExtensions;
-
- private final Options options;
-
- /**
- * @param handler
- * This error handler will receive detected errors.
- */
- public AbstractExtensionBindingChecker( String schemaLanguage, Options options, ErrorHandler handler ) {
- this.schemaLanguage = schemaLanguage;
- this.allowExtensions = options.compatibilityMode!=Options.STRICT;
- this.options = options;
- setErrorHandler(handler);
-
- for (Plugin plugin : options.getAllPlugins())
- recognizableExtensions.addAll(plugin.getCustomizationURIs());
- recognizableExtensions.add(Const.XJC_EXTENSION_URI);
- }
-
- /**
- * Verify that the given URI is indeed a valid extension namespace URI,
- * and if so enable it.
- * <p>
- * This method does all the error handling.
- */
- protected final void checkAndEnable(String uri) throws SAXException {
- if( !isRecognizableExtension(uri) ) {
- String nearest = EditDistance.findNearest(uri, recognizableExtensions);
- // not the namespace URI we know of
- error( Messages.ERR_UNSUPPORTED_EXTENSION.format(uri,nearest) );
- } else
- if( !isSupportedExtension(uri) ) {
- // recognizable but not not supported, meaning
- // the plug-in isn't enabled
-
- // look for plug-in that handles this URI
- Plugin owner = null;
- for( Plugin p : options.getAllPlugins() ) {
- if(p.getCustomizationURIs().contains(uri)) {
- owner = p;
- break;
- }
- }
- if(owner!=null)
- // we know the plug-in that supports this namespace, but it's not enabled
- error( Messages.ERR_PLUGIN_NOT_ENABLED.format(owner.getOptionName(),uri));
- else {
- // this shouldn't happen, but be defensive...
- error( Messages.ERR_UNSUPPORTED_EXTENSION.format(uri) );
- }
- }
-
- // as an error recovery enable this namespace URI anyway.
- enabledExtensions.add(uri);
- }
-
- /**
- * If the tag name belongs to a plugin namespace-wise, check its local name
- * to make sure it's correct.
- */
- protected final void verifyTagName(String namespaceURI, String localName, String qName) throws SAXException {
- if(options.pluginURIs.contains(namespaceURI)) {
- // make sure that this is a valid tag name
- boolean correct = false;
- for( Plugin p : options.activePlugins ) {
- if(p.isCustomizationTagName(namespaceURI,localName)) {
- correct = true;
- break;
- }
- }
- if(!correct) {
- error( Messages.ERR_ILLEGAL_CUSTOMIZATION_TAGNAME.format(qName) );
- startCutting();
- }
- }
- }
-
- /**
- * Checks if the given namespace URI is supported as the extension
- * bindings.
- */
- protected final boolean isSupportedExtension( String namespaceUri ) {
- return namespaceUri.equals(Const.XJC_EXTENSION_URI) || options.pluginURIs.contains(namespaceUri);
- }
-
- /**
- * Checks if the given namespace URI can be potentially recognized
- * by this XJC.
- */
- protected final boolean isRecognizableExtension( String namespaceUri ) {
- return recognizableExtensions.contains(namespaceUri);
- }
-
- @Override
- public void setDocumentLocator(Locator locator) {
- super.setDocumentLocator(locator);
- this.locator = locator;
- }
-
- @Override
- public void startDocument() throws SAXException {
- super.startDocument();
-
- nsSupport.reset();
- enabledExtensions.clear();
- }
-
- @Override
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
- if (WellKnownNamespace.XML_NAMESPACE_URI.equals(uri)) return;
- super.startPrefixMapping(prefix, uri); //xml prefix shall not be declared based on jdk api javado
- nsSupport.pushContext();
- nsSupport.declarePrefix(prefix,uri);
- }
-
- @Override
- public void endPrefixMapping(String prefix) throws SAXException {
- if ("xml".equals(prefix)) return; //xml prefix shall not be declared based on jdk api javadoc
- super.endPrefixMapping(prefix);
- nsSupport.popContext();
- }
-
-
- /**
- * Reports an error and returns the created SAXParseException
- */
- protected final SAXParseException error( String msg ) throws SAXException {
- SAXParseException spe = new SAXParseException( msg, locator );
- getErrorHandler().error(spe);
- return spe;
- }
-
- /**
- * Reports a warning.
- */
- protected final void warning( String msg ) throws SAXException {
- SAXParseException spe = new SAXParseException( msg, locator );
- getErrorHandler().warning(spe);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Const.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Const.java
deleted file mode 100644
index 5026c2fb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Const.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader;
-
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-
-
-/**
- * Useful constant values.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class Const {
-
- /** XML namespace URI. */
- public final static String XMLNS_URI =
- "http://www.w3.org/2000/xmlns/";
-
- /** JAXB customization URI. */
- public final static String JAXB_NSURI =
- "http://java.sun.com/xml/ns/jaxb";
-
- /** XJC vendor extension namespace URI. */
- public final static String XJC_EXTENSION_URI =
- "http://java.sun.com/xml/ns/jaxb/xjc";
-
- /** RELAX NG namespace URI. */
- public static final String RELAXNG_URI =
- "http://relaxng.org/ns/structure/1.0";
-
- /** URI to represent DTD. */
- public static final String DTD = "DTD";
-
- /**
- * Attribute name of the expected media type.
- *
- * @see WellKnownNamespace#XML_MIME_URI
- * @see http://www.w3.org/TR/xml-media-types/
- */
- public static final String EXPECTED_CONTENT_TYPES = "expectedContentTypes";
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/ExtensionBindingChecker.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/ExtensionBindingChecker.java
deleted file mode 100644
index 061afc0f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/ExtensionBindingChecker.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader;
-
-import java.util.StringTokenizer;
-
-import com.sun.tools.internal.xjc.Options;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-/**
- * This filter checks jaxb:extensionBindingPrefix and
- * pass/filter extension bindings.
- *
- * <p>
- * This filter also remembers enabled extension namespaces
- * and filters out any extension namespaces that doesn't belong
- * to those. The net effect is that disabled customizations
- * will never pass through this filter.
- *
- * <p>
- * Note that we can't just filter out all foreign namespaces,
- * as we need to use user-defined tags in documentations to generate javadoc.
- *
- * <p>
- * The class needs to know the list of extension binding namespaces
- * that the RI recognizes.
- * To add new URI, modify the isSupportedExtension method.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class ExtensionBindingChecker extends AbstractExtensionBindingChecker {
-
- /**
- * Number of the elements encountered. Used to detect the root element.
- */
- private int count=0;
-
- public ExtensionBindingChecker(String schemaLanguage, Options options, ErrorHandler handler) {
- super(schemaLanguage, options, handler);
- }
-
- /**
- * Returns true if the elements with the given namespace URI
- * should be blocked by this filter.
- */
- private boolean needsToBePruned( String uri ) {
- if( uri.equals(schemaLanguage) )
- return false;
- if( uri.equals(Const.JAXB_NSURI) )
- return false;
- if( enabledExtensions.contains(uri) )
- return false;
-
- // we don't need to prune something unless
- // the rest of the processor recognizes it as something special.
- // this allows us to send the documentation and other harmless
- // foreign XML fragments, which may be picked up as documents.
- return isRecognizableExtension(uri);
- }
-
-
- @Override
- public void startDocument() throws SAXException {
- super.startDocument();
- count=0;
- }
-
- @Override
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
- throws SAXException {
-
- if(!isCutting()) {
- String v = atts.getValue(Const.JAXB_NSURI,"extensionBindingPrefixes");
- if(v!=null) {
- if(count!=0)
- // the binding attribute is allowed only at the root level.
- error( Messages.ERR_UNEXPECTED_EXTENSION_BINDING_PREFIXES.format() );
-
- if(!allowExtensions)
- error( Messages.ERR_VENDOR_EXTENSION_DISALLOWED_IN_STRICT_MODE.format() );
-
- // then remember the associated namespace URIs.
- StringTokenizer tokens = new StringTokenizer(v);
- while(tokens.hasMoreTokens()) {
- String prefix = tokens.nextToken();
- String uri = nsSupport.getURI(prefix);
- if( uri==null )
- // undeclared prefix
- error( Messages.ERR_UNDECLARED_PREFIX.format(prefix) );
- else
- checkAndEnable(uri);
- }
- }
-
- if( needsToBePruned(namespaceURI) ) {
- // start pruning the tree. Call the super class method directly.
- if( isRecognizableExtension(namespaceURI) ) {
- // but this is a supported customization.
- // isn't the user forgetting @jaxb:extensionBindingPrefixes?
- warning( Messages.ERR_SUPPORTED_EXTENSION_IGNORED.format(namespaceURI) );
- }
- startCutting();
- } else
- verifyTagName(namespaceURI, localName, qName);
- }
-
- count++;
- super.startElement(namespaceURI, localName, qName, atts);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle.properties
deleted file mode 100644
index 421f73d7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle.properties
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-ERR_UNDECLARED_PREFIX = \
- Prefix "{0}" is undeclared
-
-ERR_UNEXPECTED_EXTENSION_BINDING_PREFIXES = \
- extensionBindingPrefixes attribute must be declared at the root element
-
-ERR_VENDOR_EXTENSION_DISALLOWED_IN_STRICT_MODE = \
- vendor extension bindings (jaxb:extensionBindingPrefixes) are not allowed in the strict mode. Use -extension.
-
-ERR_UNSUPPORTED_EXTENSION = \
- Unsupported binding namespace "{0}". Perhaps you meant "{1}"?
-
-ERR_SUPPORTED_EXTENSION_IGNORED = \
- Binding declaration namespace "{0}" will be ignored because it is \
- not designated by the jaxb:extensionBindingPrefixes attribute.
-
-ERR_RELEVANT_LOCATION = \
- The following location is relevant to the above error
-
-
-ERR_CLASS_NOT_FOUND = \
- Unable to find type "{0}". Without knowing the proper inheritance hierarchy of this type, \
- XJC may fail to generate some signatures correctly. \
- Make this class available via the -classpath option.
-
-DUPLICATE_PROPERTY = \
- Property "{0}" is already defined. Use &lt;jaxb:property> to resolve this conflict.
-
-DUPLICATE_ELEMENT = \
- Element "{0}" shows up in more than one properties.
-
-# Usage not found. Assuming the intention was to use it together with DUPLICATE_ELEMENT but ERR_RELEVANT_LOCATION is used instead.
-DUPLICATE_PROPERTY_LOC = \
- (related to above error) another definition is given here.
-
-PROPERTY_CLASS_IS_RESERVED = \
- Property name "Class" is reserved by java.lang.Object.
-
-ERR_ILLEGAL_CUSTOMIZATION_TAGNAME = \
- "{0}" is not a valid customization.
-
-ERR_PLUGIN_NOT_ENABLED = \
- Using "{1}" customizations requires the "-{0}" switch to enable this plug-in.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_de.properties
deleted file mode 100644
index d144045f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_de.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-ERR_UNDECLARED_PREFIX = Pr\u00E4fix "{0}" ist nicht deklariert
-
-ERR_UNEXPECTED_EXTENSION_BINDING_PREFIXES = extensionBindingPrefixes-Attribut muss im Root-Element deklariert sein
-
-ERR_VENDOR_EXTENSION_DISALLOWED_IN_STRICT_MODE = Herstellererweiterungs-Bindings (jaxb:extensionBindingPrefixes) sind im Strict-Modus nicht zul\u00E4ssig. Verwenden Sie -extension.
-
-ERR_UNSUPPORTED_EXTENSION = Nicht unterst\u00FCtzter Binding Namespace "{0}". Vielleicht haben Sie "{1}" gemeint?
-
-ERR_SUPPORTED_EXTENSION_IGNORED = Binding-Deklarations-Namespace "{0}" wird ignoriert, weil er nicht vom jaxb:extensionBindingPrefixes-Attribut bezeichnet wird.
-
-ERR_RELEVANT_LOCATION = Das folgende Verzeichnis ist f\u00FCr den obigen Fehler relevant
-
-
-ERR_CLASS_NOT_FOUND = Typ "{0}" kann nicht gefunden werden. Ohne die richtige Vererbungshierarchie dieses Typs zu kennen, kann XJC m\u00F6glicherweise einige Signaturen nicht ordnungsgem\u00E4\u00DF generieren. Machen Sie diese Klasse \u00FCber die Option -classpath verf\u00FCgbar.
-
-DUPLICATE_PROPERTY = Eigenschaft "{0}" ist bereits definiert. Verwenden Sie &lt;jaxb:property> zur L\u00F6sung dieses Konflikts.
-
-DUPLICATE_ELEMENT = Element "{0}" ist in mehr als einer Eigenschaft vorhanden.
-
-# Usage not found. Assuming the intention was to use it together with DUPLICATE_ELEMENT but ERR_RELEVANT_LOCATION is used instead.
-DUPLICATE_PROPERTY_LOC = Hier wird eine andere Definition angegeben.
-
-PROPERTY_CLASS_IS_RESERVED = Eigenschaftsname "Class" ist von java.lang.Object reserviert.
-
-ERR_ILLEGAL_CUSTOMIZATION_TAGNAME = "{0}" ist keine g\u00FCltige Anpassung.
-
-ERR_PLUGIN_NOT_ENABLED = Die Verwendung von "{1}"-Anpassungen erfordert den Switch "-{0}" zur Aktivierung dieses Plug-ins.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_es.properties
deleted file mode 100644
index 18d76ad9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_es.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-ERR_UNDECLARED_PREFIX = No se ha declarado el prefijo "{0}"
-
-ERR_UNEXPECTED_EXTENSION_BINDING_PREFIXES = Hay que declarar el atributo extensionBindingPrefixes en el elemento ra\u00EDz
-
-ERR_VENDOR_EXTENSION_DISALLOWED_IN_STRICT_MODE = los enlaces de extensi\u00F3n de proveedor (jaxb:extensionBindingPrefixes) no est\u00E1n permitidos en el modo estricto. Utilice -extension.
-
-ERR_UNSUPPORTED_EXTENSION = Espacio de nombres de enlace "{0}" no soportado. Quiz\u00E1 quiso decir "{1}".
-
-ERR_SUPPORTED_EXTENSION_IGNORED = Se ignorar\u00E1 el espacio de nombres de la declaraci\u00F3n de enlace "{0}" porque no est\u00E1 designado por el atributo jaxb:extensionBindingPrefixes.
-
-ERR_RELEVANT_LOCATION = La siguiente ubicaci\u00F3n tiene que ver con el error anterior
-
-
-ERR_CLASS_NOT_FOUND = No se ha encontrado el tipo "{0}". Si no se conoce la jerarqu\u00EDa de herencia adecuada de este tipo, XJC podr\u00EDa no generar correctamente algunas firmas. Haga que esta clase est\u00E9 disponible a trav\u00E9s de la opci\u00F3n -classpath.
-
-DUPLICATE_PROPERTY = La propiedad "{0}" ya est\u00E1 definida. Utilice &lt;jaxb:property> para resolver este conflicto.
-
-DUPLICATE_ELEMENT = El elemento "{0}" aparece en m\u00E1s de una propiedad.
-
-# Usage not found. Assuming the intention was to use it together with DUPLICATE_ELEMENT but ERR_RELEVANT_LOCATION is used instead.
-DUPLICATE_PROPERTY_LOC = (relacionado con el error anterior) aqu\u00ED se proporciona otra definici\u00F3n.
-
-PROPERTY_CLASS_IS_RESERVED = El nombre de propiedad "Class" est\u00E1 reservado por java.lang.Object.
-
-ERR_ILLEGAL_CUSTOMIZATION_TAGNAME = "{0}" no es una personalizaci\u00F3n v\u00E1lida.
-
-ERR_PLUGIN_NOT_ENABLED = Para utilizar personalizaciones "{1}", es necesario que el conmutador "-{0}" active este plugin.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_fr.properties
deleted file mode 100644
index 420d015d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_fr.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-ERR_UNDECLARED_PREFIX = Le pr\u00E9fixe "{0}" n''est pas d\u00E9clar\u00E9
-
-ERR_UNEXPECTED_EXTENSION_BINDING_PREFIXES = L'attribut extensionBindingPrefixes doit \u00EAtre d\u00E9clar\u00E9 au niveau de l'\u00E9l\u00E9ment racine
-
-ERR_VENDOR_EXTENSION_DISALLOWED_IN_STRICT_MODE = les bindings d'extension fournisseur (jaxb:extensionBindingPrefixes) ne sont pas autoris\u00E9es en mode strict. Utilisez -extension.
-
-ERR_UNSUPPORTED_EXTENSION = Espace de noms de binding "{0}" non pris en charge. Vous vouliez peut-\u00EAtre dire "{1}" ?
-
-ERR_SUPPORTED_EXTENSION_IGNORED = L''espace de noms de d\u00E9claration de binding "{0}" ne sera pas pris en compte car il n''est pas indiqu\u00E9 par l''attribut jaxb:extensionBindingPrefixes.
-
-ERR_RELEVANT_LOCATION = L'emplacement suivant est associ\u00E9 \u00E0 l'erreur ci-dessus
-
-
-ERR_CLASS_NOT_FOUND = Type "{0}" introuvable. S''il ne conna\u00EEt pas la hi\u00E9rarchie d''h\u00E9ritage appropri\u00E9e de ce type, XJC risque de ne pas pouvoir g\u00E9n\u00E9rer certaines signatures correctement. Rendez cette classe disponible via l''option -classpath.
-
-DUPLICATE_PROPERTY = La propri\u00E9t\u00E9 "{0}" est d\u00E9j\u00E0 d\u00E9finie. Utilisez &lt;jaxb:property> pour r\u00E9soudre ce conflit.
-
-DUPLICATE_ELEMENT = L''\u00E9l\u00E9ment "{0}" appara\u00EEt dans plusieurs propri\u00E9t\u00E9s.
-
-# Usage not found. Assuming the intention was to use it together with DUPLICATE_ELEMENT but ERR_RELEVANT_LOCATION is used instead.
-DUPLICATE_PROPERTY_LOC = (voir erreur ci-dessus) une autre d\u00E9finition est donn\u00E9e ici.
-
-PROPERTY_CLASS_IS_RESERVED = Le nom de propri\u00E9t\u00E9 "Class" est r\u00E9serv\u00E9 par java.lang.Object.
-
-ERR_ILLEGAL_CUSTOMIZATION_TAGNAME = "{0}" n''est pas une personnalisation valide.
-
-ERR_PLUGIN_NOT_ENABLED = L''utilisation de personnalisations "{1}" exige le commutateur "-{0}" pour activer ce module d''extension.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_it.properties
deleted file mode 100644
index c1e3d9c3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_it.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-ERR_UNDECLARED_PREFIX = Prefisso ''{0}'' non dichiarato
-
-ERR_UNEXPECTED_EXTENSION_BINDING_PREFIXES = L'attributo extensionBindingPrefixes deve essere dichiarato nell'elemento radice
-
-ERR_VENDOR_EXTENSION_DISALLOWED_IN_STRICT_MODE = le associazioni dell'estensione del fornitore (jaxb:extensionBindingPrefixes) non sono consentite in modalit\u00E0 di controllo rigoroso. Usare -extension.
-
-ERR_UNSUPPORTED_EXTENSION = Spazio di nomi di associazione non supportato "{0}". Si intendeva forse "{1}"?
-
-ERR_SUPPORTED_EXTENSION_IGNORED = Lo spazio di nomi della dichiarazione di associazione "{0}" verr\u00E0 ignorato poich\u00E9 non \u00E8 designato dall''attributo jaxb:extensionBindingPrefixes.
-
-ERR_RELEVANT_LOCATION = La seguente posizione \u00E8 relativa all'errore riportato sopra
-
-
-ERR_CLASS_NOT_FOUND = Impossibile trovare il tipo "{0}". Senza la gerarchia di eredit\u00E0 corretta di questo tipo, la corretta generazione di alcune firme da parte di XJC potrebbe non riuscire. Rendere disponibile questa classe tramite l''opzione -classpath.
-
-DUPLICATE_PROPERTY = Propriet\u00E0 "{0}" gi\u00E0 definita. Usare &lt;jaxb:property> per risolvere questo conflitto.
-
-DUPLICATE_ELEMENT = L''elemento "{0}" viene visualizzato in pi\u00F9 propriet\u00E0.
-
-# Usage not found. Assuming the intention was to use it together with DUPLICATE_ELEMENT but ERR_RELEVANT_LOCATION is used instead.
-DUPLICATE_PROPERTY_LOC = (relativo all'errore riportato sopra) qui viene fornita un'altra definizione.
-
-PROPERTY_CLASS_IS_RESERVED = Il nome della propriet\u00E0 "Class" \u00E8 riservato da java.lang.Object.
-
-ERR_ILLEGAL_CUSTOMIZATION_TAGNAME = "{0}" non \u00E8 una personalizzazione valida.
-
-ERR_PLUGIN_NOT_ENABLED = L''uso delle personalizzazioni "{1}" richiede l''abilitazione di questo plugin da parte del parametro "-{0}".
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_ja.properties
deleted file mode 100644
index 5a06ac97..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_ja.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-ERR_UNDECLARED_PREFIX = \u63A5\u982D\u8F9E"{0}"\u306F\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-
-ERR_UNEXPECTED_EXTENSION_BINDING_PREFIXES = extensionBindingPrefixes\u5C5E\u6027\u306F\u30EB\u30FC\u30C8\u8981\u7D20\u3067\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-ERR_VENDOR_EXTENSION_DISALLOWED_IN_STRICT_MODE = \u30D9\u30F3\u30C0\u30FC\u62E1\u5F35\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0(jaxb:extensionBindingPrefixes)\u306Fstrict\u30E2\u30FC\u30C9\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002-extension\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-ERR_UNSUPPORTED_EXTENSION = \u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9"{0}"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"{1}"\u306E\u8AA4\u308A\u3067\u3042\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
-
-ERR_SUPPORTED_EXTENSION_IGNORED = \u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u5BA3\u8A00\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9"{0}"\u306F\u3001jaxb:extensionBindingPrefixes\u5C5E\u6027\u3067\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u7121\u8996\u3055\u308C\u307E\u3059\u3002
-
-ERR_RELEVANT_LOCATION = \u6B21\u306E\u5834\u6240\u306F\u524D\u8FF0\u306E\u30A8\u30E9\u30FC\u306B\u95A2\u9023\u3057\u3066\u3044\u307E\u3059
-
-
-ERR_CLASS_NOT_FOUND = \u30BF\u30A4\u30D7"{0}"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u3053\u306E\u30BF\u30A4\u30D7\u306E\u6B63\u3057\u3044\u7D99\u627F\u968E\u5C64\u304C\u4E0D\u660E\u306A\u5834\u5408\u3001XJC\u306F\u3044\u304F\u3064\u304B\u306E\u7F72\u540D\u3092\u6B63\u3057\u304F\u751F\u6210\u3067\u304D\u306A\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002-classpath\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u3066\u3053\u306E\u30AF\u30E9\u30B9\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-DUPLICATE_PROPERTY = \u30D7\u30ED\u30D1\u30C6\u30A3"{0}"\u306F\u3059\u3067\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u3053\u306E\u7AF6\u5408\u3092\u89E3\u6C7A\u3059\u308B\u306B\u306F\u3001&lt;jaxb:property>\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
-
-DUPLICATE_ELEMENT = \u8981\u7D20"{0}"\u304C\u8907\u6570\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u5B58\u5728\u3057\u307E\u3059\u3002
-
-# Usage not found. Assuming the intention was to use it together with DUPLICATE_ELEMENT but ERR_RELEVANT_LOCATION is used instead.
-DUPLICATE_PROPERTY_LOC = (\u524D\u8FF0\u306E\u30A8\u30E9\u30FC\u306B\u95A2\u9023\u3057\u3066)\u5225\u306E\u5B9A\u7FA9\u304C\u3053\u3053\u3067\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
-
-PROPERTY_CLASS_IS_RESERVED = \u30D7\u30ED\u30D1\u30C6\u30A3\u540D"Class"\u306Fjava.lang.Object\u3067\u4E88\u7D04\u3055\u308C\u3066\u3044\u307E\u3059\u3002
-
-ERR_ILLEGAL_CUSTOMIZATION_TAGNAME = "{0}"\u306F\u6709\u52B9\u306A\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-
-ERR_PLUGIN_NOT_ENABLED = "{1}"\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001"-{0}"\u30B9\u30A4\u30C3\u30C1\u3067\u3053\u306E\u30D7\u30E9\u30B0\u30A4\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_ko.properties
deleted file mode 100644
index ac7f92f4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_ko.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-ERR_UNDECLARED_PREFIX = "{0}" \uC811\uB450\uC5B4\uAC00 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-ERR_UNEXPECTED_EXTENSION_BINDING_PREFIXES = extensionBindingPrefixes \uC18D\uC131\uC740 \uB8E8\uD2B8 \uC694\uC18C\uC5D0 \uC120\uC5B8\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-ERR_VENDOR_EXTENSION_DISALLOWED_IN_STRICT_MODE = \uACF5\uAE09\uC5C5\uCCB4 \uD655\uC7A5 \uBC14\uC778\uB529(jaxb:extensionBindingPrefixes)\uC740 \uC5C4\uACA9\uD55C \uBAA8\uB4DC\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. -extension\uC744 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624.
-
-ERR_UNSUPPORTED_EXTENSION = "{0}"\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uBC14\uC778\uB529 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC785\uB2C8\uB2E4. "{1}"\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB824\uACE0 \uD55C \uAC83\uC785\uB2C8\uAE4C?
-
-ERR_SUPPORTED_EXTENSION_IGNORED = \uBC14\uC778\uB529 \uC120\uC5B8 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 "{0}"\uC740(\uB294) jaxb:extensionBindingPrefixes \uC18D\uC131\uC73C\uB85C \uC9C0\uC815\uB41C \uAC83\uC774 \uC544\uB2C8\uBBC0\uB85C \uBB34\uC2DC\uB429\uB2C8\uB2E4.
-
-ERR_RELEVANT_LOCATION = \uB2E4\uC74C \uC704\uCE58\uAC00 \uC704 \uC624\uB958\uC640 \uAD00\uB828\uC774 \uC788\uC2B5\uB2C8\uB2E4.
-
-
-ERR_CLASS_NOT_FOUND = "{0}" \uC720\uD615\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774 \uC720\uD615\uC758 \uC801\uC808\uD55C \uC0C1\uC18D \uACC4\uCE35\uC774 \uC778\uC2DD\uB418\uC9C0 \uC54A\uC73C\uBA74 XJC\uAC00 \uC77C\uBD80 \uC11C\uBA85 \uC0DD\uC131\uC744 \uC2E4\uD328\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. -classpath \uC635\uC158\uC744 \uD1B5\uD574 \uC774 \uD074\uB798\uC2A4\uB97C \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uC0C1\uD0DC\uB85C \uC124\uC815\uD558\uC2ED\uC2DC\uC624.
-
-DUPLICATE_PROPERTY = "{0}" \uC18D\uC131\uC740 \uC774\uBBF8 \uC815\uC758\uB418\uC5C8\uC2B5\uB2C8\uB2E4. &lt;jaxb:property>\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC774 \uCDA9\uB3CC\uC744 \uD574\uACB0\uD558\uC2ED\uC2DC\uC624.
-
-DUPLICATE_ELEMENT = "{0}" \uC694\uC18C\uAC00 \uB450 \uAC1C \uC774\uC0C1\uC758 \uC18D\uC131\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.
-
-# Usage not found. Assuming the intention was to use it together with DUPLICATE_ELEMENT but ERR_RELEVANT_LOCATION is used instead.
-DUPLICATE_PROPERTY_LOC = (\uC704 \uC624\uB958\uC640 \uAD00\uB828\uB428) \uB2E4\uB978 \uC815\uC758\uAC00 \uC5EC\uAE30\uC5D0 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-PROPERTY_CLASS_IS_RESERVED = \uC18D\uC131 \uC774\uB984 "Class"\uB294 java.lang.Object\uC5D0\uC11C \uC608\uC57D\uD55C \uC774\uB984\uC785\uB2C8\uB2E4.
-
-ERR_ILLEGAL_CUSTOMIZATION_TAGNAME = "{0}"\uC740(\uB294) \uC801\uD569\uD55C \uC0AC\uC6A9\uC790 \uC815\uC758\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
-
-ERR_PLUGIN_NOT_ENABLED = "{1}" \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uC0AC\uC6A9\uD558\uB824\uBA74 "-{0}" \uC2A4\uC704\uCE58\uB97C \uD1B5\uD574 \uC774 \uD50C\uB7EC\uADF8\uC778\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_pt_BR.properties
deleted file mode 100644
index d2d39acc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_pt_BR.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-ERR_UNDECLARED_PREFIX = O prefixo "{0}" n\u00E3o foi declarado
-
-ERR_UNEXPECTED_EXTENSION_BINDING_PREFIXES = o atributo extensionBindingPrefixes deve ser declarado no elemento-raiz
-
-ERR_VENDOR_EXTENSION_DISALLOWED_IN_STRICT_MODE = binds de extens\u00E3o do fornecedor (jaxb:extensionBindingPrefixes) n\u00E3o s\u00E3o permitidos no modo restrito. Use -extension.
-
-ERR_UNSUPPORTED_EXTENSION = Namespace de bind "{0}" n\u00E3o suportado. Voc\u00EA quis dizer "{1}"?
-
-ERR_SUPPORTED_EXTENSION_IGNORED = O namespace "{0}" da declara\u00E7\u00E3o de bind ser\u00E1 ignorado porque n\u00E3o foi designado pelo atributo jaxb:extensionBindingPrefixes.
-
-ERR_RELEVANT_LOCATION = A localiza\u00E7\u00E3o a seguir \u00E9 relevante para o erro acima
-
-
-ERR_CLASS_NOT_FOUND = N\u00E3o \u00E9 poss\u00EDvel localizar o tipo "{0}". Sem saber a hierarquia de heran\u00E7a adequada deste tipo, pode ser que o XJC falhe ao gerar algumas assinaturas corretamente. Torne esta classe dispon\u00EDvel usando a op\u00E7\u00E3o -classpath.
-
-DUPLICATE_PROPERTY = A propriedade "{0}" j\u00E1 foi definida. Use &lt;jaxb:property> para resolver este conflito.
-
-DUPLICATE_ELEMENT = Elemento "{0}" mostrado em mais de uma propriedade.
-
-# Usage not found. Assuming the intention was to use it together with DUPLICATE_ELEMENT but ERR_RELEVANT_LOCATION is used instead.
-DUPLICATE_PROPERTY_LOC = (relacionado ao erro acima) outra defini\u00E7\u00E3o \u00E9 fornecida aqui.
-
-PROPERTY_CLASS_IS_RESERVED = "Classe" do nome da propriedade \u00E9 reservada por java.lang.Object.
-
-ERR_ILLEGAL_CUSTOMIZATION_TAGNAME = "{0}" n\u00E3o \u00E9 uma personaliza\u00E7\u00E3o v\u00E1lida.
-
-ERR_PLUGIN_NOT_ENABLED = Usar a personaliza\u00E7\u00E3o "{1}" requer a chave "-{0}" para ativar este plug-in.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_zh_CN.properties
deleted file mode 100644
index a85af2a3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_zh_CN.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-ERR_UNDECLARED_PREFIX = \u672A\u58F0\u660E\u524D\u7F00 "{0}"
-
-ERR_UNEXPECTED_EXTENSION_BINDING_PREFIXES = \u5FC5\u987B\u5728\u6839\u5143\u7D20\u4E2D\u58F0\u660E extensionBindingPrefixes \u5C5E\u6027
-
-ERR_VENDOR_EXTENSION_DISALLOWED_IN_STRICT_MODE = \u4E25\u683C\u6A21\u5F0F\u4E2D\u4E0D\u5141\u8BB8\u6709\u4F9B\u5E94\u5546\u6269\u5C55\u7ED1\u5B9A (jaxb:extensionBindingPrefixes)\u3002\u8BF7\u4F7F\u7528 -extension\u3002
-
-ERR_UNSUPPORTED_EXTENSION = \u4E0D\u652F\u6301\u7ED1\u5B9A\u540D\u79F0\u7A7A\u95F4 "{0}"\u3002\u60A8\u662F\u5426\u6253\u7B97 "{1}"?
-
-ERR_SUPPORTED_EXTENSION_IGNORED = \u7531\u4E8E\u7ED1\u5B9A\u58F0\u660E\u540D\u79F0\u7A7A\u95F4 "{0}" \u4E0D\u662F\u7531 jaxb:extensionBindingPrefixes \u5C5E\u6027\u6307\u5B9A\u7684, \u56E0\u6B64\u5C06\u5FFD\u7565\u8BE5\u540D\u79F0\u7A7A\u95F4\u3002
-
-ERR_RELEVANT_LOCATION = \u4EE5\u4E0B\u4F4D\u7F6E\u4E0E\u4E0A\u4E00\u9519\u8BEF\u6709\u5173
-
-
-ERR_CLASS_NOT_FOUND = \u627E\u4E0D\u5230\u7C7B\u578B "{0}"\u3002\u5728\u4E0D\u77E5\u9053\u6B64\u7C7B\u578B\u7684\u6B63\u786E\u7EE7\u627F\u5206\u5C42\u7ED3\u6784\u7684\u60C5\u51B5\u4E0B, XJC \u53EF\u80FD\u65E0\u6CD5\u6B63\u786E\u751F\u6210\u67D0\u4E9B\u7B7E\u540D\u3002\u8BF7\u901A\u8FC7 -classpath \u9009\u9879\u4F7F\u6B64\u7C7B\u53EF\u7528\u3002
-
-DUPLICATE_PROPERTY = \u5C5E\u6027 "{0}" \u5DF2\u5B9A\u4E49\u3002\u8BF7\u4F7F\u7528 &lt;jaxb:property> \u89E3\u51B3\u6B64\u51B2\u7A81\u3002
-
-DUPLICATE_ELEMENT = \u5143\u7D20 "{0}" \u663E\u793A\u5728\u591A\u4E2A\u5C5E\u6027\u4E2D\u3002
-
-# Usage not found. Assuming the intention was to use it together with DUPLICATE_ELEMENT but ERR_RELEVANT_LOCATION is used instead.
-DUPLICATE_PROPERTY_LOC = (\u4E0E\u4E0A\u4E00\u9519\u8BEF\u76F8\u5173) \u5728\u6B64\u5904\u6307\u5B9A\u4E86\u5176\u4ED6\u5B9A\u4E49\u3002
-
-PROPERTY_CLASS_IS_RESERVED = \u5C5E\u6027\u540D "Class" \u4FDD\u7559\u4F9B java.lang.Object \u4F7F\u7528\u3002
-
-ERR_ILLEGAL_CUSTOMIZATION_TAGNAME = "{0}" \u4E0D\u662F\u6709\u6548\u7684\u5B9A\u5236\u8BBE\u7F6E\u3002
-
-ERR_PLUGIN_NOT_ENABLED = \u4F7F\u7528 "{1}" \u5B9A\u5236\u8BBE\u7F6E\u65F6, \u9700\u8981 "-{0}" \u5F00\u5173\u624D\u80FD\u542F\u7528\u6B64\u63D2\u4EF6\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_zh_TW.properties
deleted file mode 100644
index 914cb241..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_zh_TW.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-ERR_UNDECLARED_PREFIX = \u672A\u5BA3\u544A\u524D\u7F6E\u78BC "{0}"
-
-ERR_UNEXPECTED_EXTENSION_BINDING_PREFIXES = \u5FC5\u9808\u5728\u6839\u5143\u7D20\u5BA3\u544A extensionBindingPrefixes \u5C6C\u6027
-
-ERR_VENDOR_EXTENSION_DISALLOWED_IN_STRICT_MODE = \u5728\u56B4\u683C\u6A21\u5F0F\u4E0B\u4E0D\u5141\u8A31\u4F7F\u7528\u5EE0\u5546\u64F4\u5145\u5957\u4EF6\u9023\u7D50 (jaxb:extensionBindingPrefixes). \u8ACB\u4F7F\u7528 -extension.
-
-ERR_UNSUPPORTED_EXTENSION = \u4E0D\u652F\u63F4\u7684\u9023\u7D50\u547D\u540D\u7A7A\u9593 "{0}". \u4E5F\u8A31\u60A8\u6307\u7684\u662F "{1}"?
-
-ERR_SUPPORTED_EXTENSION_IGNORED = \u5C07\u5FFD\u7565\u9023\u7D50\u5BA3\u544A\u547D\u540D\u7A7A\u9593 "{0}", \u56E0\u5176\u4E0D\u662F\u7531 jaxb:extensionBindingPrefixes \u5C6C\u6027\u6307\u5B9A.
-
-ERR_RELEVANT_LOCATION = \u4E0B\u5217\u4F4D\u7F6E\u8207\u4E0A\u8FF0\u932F\u8AA4\u6709\u95DC
-
-
-ERR_CLASS_NOT_FOUND = \u627E\u4E0D\u5230\u985E\u578B "{0}". \u4E0D\u77E5\u9053\u6B64\u985E\u578B\u6B63\u78BA\u4E4B\u7E7C\u627F\u968E\u5C64\u7684\u60C5\u6CC1\u4E0B, XJC \u53EF\u80FD\u7121\u6CD5\u6B63\u78BA\u7522\u751F\u67D0\u4E9B\u7C3D\u7AE0. \u8ACB\u4F7F\u7528 -classpath \u9078\u9805\u5C07\u6B64\u985E\u5225\u8A2D\u70BA\u53EF\u7528.
-
-DUPLICATE_PROPERTY = \u7279\u6027 "{0}" \u5DF2\u7D93\u5B9A\u7FA9. \u8ACB\u4F7F\u7528 &lt;jaxb:property> \u4EE5\u89E3\u6C7A\u6B64\u885D\u7A81.
-
-DUPLICATE_ELEMENT = \u5143\u7D20 "{0}" \u5728\u4E00\u500B\u4EE5\u4E0A\u7684\u7279\u6027\u4E2D\u51FA\u73FE.
-
-# Usage not found. Assuming the intention was to use it together with DUPLICATE_ELEMENT but ERR_RELEVANT_LOCATION is used instead.
-DUPLICATE_PROPERTY_LOC = (\u8207\u4E0A\u8FF0\u932F\u8AA4\u6709\u95DC) \u53E6\u4E00\u500B\u5B9A\u7FA9\u5DF2\u6307\u5B9A\u65BC\u6B64\u8655.
-
-PROPERTY_CLASS_IS_RESERVED = \u7279\u6027\u540D\u7A31 "Class" \u662F java.lang.Object \u7684\u4FDD\u7559\u540D\u7A31.
-
-ERR_ILLEGAL_CUSTOMIZATION_TAGNAME = "{0}" \u4E0D\u662F\u6709\u6548\u7684\u81EA\u8A02\u9805\u76EE.
-
-ERR_PLUGIN_NOT_ENABLED = \u4F7F\u7528 "{1}" \u81EA\u8A02\u9805\u76EE\u9700\u8981 "-{0}" \u53C3\u6578\u624D\u80FD\u555F\u7528\u6B64 Plugin.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Messages.java
deleted file mode 100644
index dff179c7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Messages.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-public enum Messages {
- DUPLICATE_PROPERTY, // 1 arg
- DUPLICATE_ELEMENT, // 1 arg
-
- ERR_UNDECLARED_PREFIX,
- ERR_UNEXPECTED_EXTENSION_BINDING_PREFIXES,
- ERR_UNSUPPORTED_EXTENSION,
- ERR_SUPPORTED_EXTENSION_IGNORED,
- ERR_RELEVANT_LOCATION,
- ERR_CLASS_NOT_FOUND,
- PROPERTY_CLASS_IS_RESERVED,
- ERR_VENDOR_EXTENSION_DISALLOWED_IN_STRICT_MODE,
- ERR_ILLEGAL_CUSTOMIZATION_TAGNAME, // 1 arg
- ERR_PLUGIN_NOT_ENABLED, // 2 args
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getPackage().getName() +".MessageBundle");
-
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/ModelChecker.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/ModelChecker.java
deleted file mode 100644
index 6b80142b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/ModelChecker.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader;
-
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.Model;
-
-/**
- * Checks errors on model classes.
- *
- * <p>
- * This should be used as a {@link Ring} component.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class ModelChecker {
- private final Model model = Ring.get(Model.class);
- private final ErrorReceiver errorReceiver = Ring.get(ErrorReceiver.class);
-
- public ModelChecker() {
- }
-
- public void check() {
- for( CClassInfo ci : model.beans().values() )
- check(ci);
- }
-
- private void check( CClassInfo ci ) {
- List<CPropertyInfo> props = ci.getProperties();
- Map<QName,CPropertyInfo> collisionTable = new HashMap<QName,CPropertyInfo>();
-
- OUTER:
- for( int i=0; i<props.size(); i++ ) {
- CPropertyInfo p1 = props.get(i);
-
- if(p1.getName(true).equals("Class")) {
- errorReceiver.error(p1.locator,Messages.PROPERTY_CLASS_IS_RESERVED.format());
- continue;
- }
-
- QName n = p1.collectElementNames(collisionTable);
- if(n!=null) {
- CPropertyInfo p2 = collisionTable.get(n);
-
- if (p2.getName(true).equals(n.toString()) || p2.getName(false).equals(n.toString())) {
- errorReceiver.error(p1.locator, Messages.DUPLICATE_ELEMENT.format(n));
- errorReceiver.error(p2.locator, Messages.ERR_RELEVANT_LOCATION.format());
- }
- }
-
- for( int j=i+1; j<props.size(); j++ ) {
- if(checkPropertyCollision(p1,props.get(j)))
- continue OUTER;
- }
- for( CClassInfo c=ci.getBaseClass(); c!=null; c=c.getBaseClass() ) {
- for( CPropertyInfo p2 : c.getProperties() )
- if(checkPropertyCollision(p1,p2))
- continue OUTER;
- }
- }
- }
-
- private boolean checkPropertyCollision(CPropertyInfo p1, CPropertyInfo p2) {
- if(!p1.getName(true).equals(p2.getName(true)))
- return false;
- errorReceiver.error(p1.locator,Messages.DUPLICATE_PROPERTY.format(p1.getName(true)));
- errorReceiver.error(p2.locator,Messages.ERR_RELEVANT_LOCATION.format());
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/RawTypeSet.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/RawTypeSet.java
deleted file mode 100644
index 48561e26..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/RawTypeSet.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.activation.MimeType;
-
-import com.sun.tools.internal.xjc.model.CElementPropertyInfo;
-import static com.sun.tools.internal.xjc.model.CElementPropertyInfo.CollectionMode.*;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-import com.sun.tools.internal.xjc.model.CTypeRef;
-import com.sun.tools.internal.xjc.model.Multiplicity;
-import com.sun.tools.internal.xjc.model.nav.NType;
-import com.sun.xml.internal.bind.v2.model.core.Element;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import java.math.BigInteger;
-
-/**
- * Set of {@link Ref}.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class RawTypeSet {
-
-
- public final Set<Ref> refs;
-
- /**
- * True if this type set can form references to types.
- */
- public final Mode canBeTypeRefs;
-
- /**
- * The occurence of the whole references.
- */
- public final Multiplicity mul;
-
- // computed inside canBeTypeRefs()
- private CElementPropertyInfo.CollectionMode collectionMode;
-
- /**
- * Should be called from one of the raw type set builders.
- */
- public RawTypeSet( Set<Ref> refs, Multiplicity m ) {
- this.refs = refs;
- mul = m;
- canBeTypeRefs = canBeTypeRefs();
- }
-
- public CElementPropertyInfo.CollectionMode getCollectionMode() {
- return collectionMode;
- }
-
- public boolean isRequired() {
- return mul.min.compareTo(BigInteger.ZERO) == 1;
- }
-
-
- /**
- * Represents the possible binding option for this {@link RawTypeSet}.
- */
- public enum Mode {
- /**
- * This {@link RawTypeSet} can be either an reference property or
- * an element property, and XJC recommends element property.
- */
- SHOULD_BE_TYPEREF(0),
- /**
- * This {@link RawTypeSet} can be either an reference property or
- * an element property, and XJC recommends reference property.
- */
- CAN_BE_TYPEREF(1),
- /**
- * This {@link RawTypeSet} can be only bound to a reference property.
- */
- MUST_BE_REFERENCE(2);
-
- private final int rank;
-
- Mode(int rank) {
- this.rank = rank;
- }
-
- Mode or(Mode that) {
- switch(Math.max(this.rank,that.rank)) {
- case 0: return SHOULD_BE_TYPEREF;
- case 1: return CAN_BE_TYPEREF;
- case 2: return MUST_BE_REFERENCE;
- }
- throw new AssertionError();
- }
- }
-
- /**
- * Returns true if {@link #refs} can form refs of types.
- *
- * If there are multiple {@link Ref}s with the same type,
- * we cannot make them into type refs. Or if any of the {@link Ref}
- * says they cannot be in type refs, we cannot do that either.
- *
- * TODO: just checking if the refs are the same is not suffice.
- * If two refs derive from each other, they cannot form a list of refs
- * (because of a possible ambiguity).
- */
- private Mode canBeTypeRefs() {
- Set<NType> types = new HashSet<NType>();
-
- collectionMode = mul.isAtMostOnce()?NOT_REPEATED:REPEATED_ELEMENT;
-
- // the way we compute this is that we start from the most optimistic value,
- // and then gradually degrade as we find something problematic.
- Mode mode = Mode.SHOULD_BE_TYPEREF;
-
- for( Ref r : refs ) {
- mode = mode.or(r.canBeType(this));
- if(mode== Mode.MUST_BE_REFERENCE)
- return mode; // no need to continue the processing
-
- if(!types.add(r.toTypeRef(null).getTarget().getType()))
- return Mode.MUST_BE_REFERENCE; // collision
- if(r.isListOfValues()) {
- if(refs.size()>1 || !mul.isAtMostOnce())
- return Mode.MUST_BE_REFERENCE; // restriction on @XmlList
- collectionMode = REPEATED_VALUE;
- }
- }
- return mode;
- }
-
-
-
-
- public void addTo(CElementPropertyInfo prop) {
- assert canBeTypeRefs!= Mode.MUST_BE_REFERENCE;
- if(mul.isZero())
- return; // the property can't have any value
-
- List<CTypeRef> dst = prop.getTypes();
- for( Ref t : refs )
- dst.add(t.toTypeRef(prop));
- }
-
- public void addTo(CReferencePropertyInfo prop) {
- if(mul.isZero())
- return; // the property can't have any value
- for( Ref t : refs )
- t.toElementRef(prop);
- }
-
- public ID id() {
- for( Ref t : refs ) {
- ID id = t.id();
- if(id!=ID.NONE) return id;
- }
- return ID.NONE;
- }
-
- public MimeType getExpectedMimeType() {
- for( Ref t : refs ) {
- MimeType mt = t.getExpectedMimeType();
- if(mt!=null) return mt;
- }
- return null;
- }
-
-
- /**
- * A reference to something.
- *
- * <p>
- * A {@link Ref} can be either turned into {@link CTypeRef} to form
- * an element property, or {@link Element} to form a reference property.
- */
- public static abstract class Ref {
- /**
- * @param ep
- * the property to which the returned {@link CTypeRef} will be
- * added to.
- */
- protected abstract CTypeRef toTypeRef(CElementPropertyInfo ep);
- protected abstract void toElementRef(CReferencePropertyInfo prop);
- /**
- * Can this {@link Ref} be a type ref?
- * @return false to veto.
- * @param parent
- */
- protected abstract Mode canBeType(RawTypeSet parent);
- protected abstract boolean isListOfValues();
- /**
- * When this {@link RawTypeSet} binds to a {@link CElementPropertyInfo},
- * this method is used to determine if the property is ID or not.
- */
- protected abstract ID id();
-
- /**
- * When this {@link RawTypeSet} binds to a {@link CElementPropertyInfo},
- * this method is used to determine if the property has an associated expected MIME type or not.
- */
- protected MimeType getExpectedMimeType() { return null; }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Ring.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Ring.java
deleted file mode 100644
index 78481cde..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Ring.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.model.Model;
-
-/**
- * Holds all the binding related singleton components in a "ring",
- * and let you access those components, creating them as necessary.
- *
- * <p>
- * A {@link Ring} is local to a thread,
- * and only one instanceof {@link Ring} can be active at any given time.
- *
- * Use {@link #begin()} and {@link #end(Ring)} to start/end a ring scope.
- * Inside a scope, use {@link #get()} to obtain the instance.
- *
- * <p>
- * When a {@link Model} is built by the reader, an active {@link Ring} scope
- * is assumed.
- *
- *
- * <h2>Components in Ring</h2>
- * <p>
- * Depending on the schema language we are dealing with, different
- * components are in the model. But at least the following components
- * are in the ring.
- *
- * <ul>
- * <li>{@link ErrorReceiver}
- * </ul>
- *
- * @author Kohsuke Kawaguchi
- */
-public final class Ring {
-
- private final Map<Class,Object> components = new HashMap<Class,Object>();
-
- private static final ThreadLocal<Ring> instances = new ThreadLocal<Ring>();
-
- private Ring() {}
-
- public static <T> void add( Class<T> clazz, T instance ) {
- assert !get().components.containsKey(clazz);
- get().components.put(clazz,instance);
- }
-
- public static <T> void add( T o ) {
- add((Class<T>)o.getClass(),o);
- }
-
- public static <T> T get( Class<T> key ) {
- T t = (T)get().components.get(key);
- if(t==null) {
- try {
- Constructor<T> c = key.getDeclaredConstructor();
- c.setAccessible(true);
- t = c.newInstance();
- if(!get().components.containsKey(key))
- // many components register themselves.
- add(key,t);
- } catch (InstantiationException e) {
- throw new Error(e);
- } catch (IllegalAccessException e) {
- throw new Error(e);
- } catch (NoSuchMethodException e) {
- throw new Error(e);
- } catch (InvocationTargetException e) {
- throw new Error(e);
- }
- }
-
- assert t!=null;
- return t;
- }
-
- /**
- * A {@link Ring} instance is associated with a thread.
- */
- public static Ring get() {
- return instances.get();
- }
-
- /**
- * Starts a new scope.
- */
- public static Ring begin() {
- Ring r = null;
- synchronized (instances) {
- r = instances.get();
- instances.set(new Ring());
- }
- return r;
- }
-
- /**
- * Ends a scope.
- */
- public static void end(Ring old) {
- synchronized (instances) {
- instances.remove();
- instances.set(old);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/TypeUtil.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/TypeUtil.java
deleted file mode 100644
index 55c9025b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/TypeUtil.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-
-import org.xml.sax.Locator;
-import org.xml.sax.SAXParseException;
-
-/**
- * Type-related utility methods.
- *
- * @author
- * <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class TypeUtil {
-
-
- /**
- * Computes the common base type of two types.
- *
- * @param types
- * set of {@link JType} objects.
- */
- public static JType getCommonBaseType( JCodeModel codeModel, Collection<? extends JType> types ) {
- return getCommonBaseType( codeModel, types.toArray(new JType[types.size()]) );
- }
-
- /**
- * Computes the common base type of types.
- *
- * TODO: this is a very interesting problem. Since one type has possibly
- * multiple base types, it's not an easy problem.
- * The current implementation is very naive.
- *
- * To make the result deterministic across differente JVMs, we have to
- * use a Set whose ordering is deterministic.
- */
- public static JType getCommonBaseType(JCodeModel codeModel, JType... t) {
- // first, eliminate duplicates.
- Set<JType> uniqueTypes = new TreeSet<JType>(typeComparator);
- for (JType type : t)
- uniqueTypes.add(type);
-
- // if this yields only one type. return now.
- // this is the only case where we can return a primitive type
- // from this method
- if (uniqueTypes.size() == 1)
- return uniqueTypes.iterator().next();
-
- // assertion failed. nullType can be used only under a very special circumstance
- assert !uniqueTypes.isEmpty();
-
- // the null type doesn't need to be taken into account.
- uniqueTypes.remove(codeModel.NULL);
-
- // box all the types and compute the intersection of all types
- Set<JClass> s = null;
-
- for (JType type : uniqueTypes) {
- JClass cls = type.boxify();
-
- if (s == null)
- s = getAssignableTypes(cls);
- else
- s.retainAll(getAssignableTypes(cls));
- }
-
- // any JClass can be casted to Object, so make sure it's always there
- s.add( codeModel.ref(Object.class));
-
- // refine 's' by removing "lower" types.
- // for example, if we have both java.lang.Object and
- // java.io.InputStream, then we don't want to use java.lang.Object.
-
- JClass[] raw = s.toArray(new JClass[s.size()]);
- s.clear();
-
- for (int i = 0; i < raw.length; i++) { // for each raw[i]
- int j;
- for (j = 0; j < raw.length; j++) { // see if raw[j] "includes" raw[i]
- if (i == j)
- continue;
-
- if (raw[i].isAssignableFrom(raw[j]))
- break; // raw[j] is derived from raw[i], hence j includes i.
- }
-
- if (j == raw.length)
- // no other type inclueds raw[i]. remember this value.
- s.add(raw[i]);
- }
-
- assert !s.isEmpty(); // since at least java.lang.Object has to be there
-
- // we now pick the candidate for the return type
- JClass result = pickOne(s);
-
- // finally, sometimes this method is used to compute the base type of types like
- // JAXBElement<A>, JAXBElement<B>, and JAXBElement<C>.
- // for those inputs, at this point result=JAXBElement.
- //
- // here, we'll try to figure out the parameterization
- // so that we can return JAXBElement<? extends D> instead of just "JAXBElement".
- if(result.isParameterized())
- return result;
-
- // for each uniqueType we store the list of base type parameterization
- List<List<JClass>> parameters = new ArrayList<List<JClass>>(uniqueTypes.size());
- int paramLen = -1;
-
- for (JType type : uniqueTypes) {
- JClass cls = type.boxify();
- JClass bp = cls.getBaseClass(result);
- // if there's no parameterization in the base type,
- // we won't do any better than <?>. Thus no point in trying to figure out the parameterization.
- // just return the base type.
- if(bp.equals(result))
- return result;
-
- assert bp.isParameterized();
- List<JClass> tp = bp.getTypeParameters();
- parameters.add(tp);
-
- assert paramLen==-1 || paramLen==tp.size();
- // since 'bp' always is a parameterized version of 'result', it should always
- // have the same number of parameters.
- paramLen = tp.size();
- }
-
- List<JClass> paramResult = new ArrayList<JClass>();
- List<JClass> argList = new ArrayList<JClass>(parameters.size());
- // for each type parameter compute the common base type
- for( int i=0; i<paramLen; i++ ) {
- argList.clear();
- for (List<JClass> list : parameters)
- argList.add(list.get(i));
-
- // compute the lower bound.
- JClass bound = (JClass)getCommonBaseType(codeModel,argList);
- boolean allSame = true;
- for (JClass a : argList)
- allSame &= a.equals(bound);
- if(!allSame)
- bound = bound.wildcard();
-
- paramResult.add(bound);
- }
-
- return result.narrow(paramResult);
- }
-
- private static JClass pickOne(Set<JClass> s) {
- // we may have more than one candidates at this point.
- // any user-defined generated types should have
- // precedence over system-defined existing types.
- //
- // so try to return such a type if any.
- for (JClass c : s)
- if (c instanceof JDefinedClass)
- return c;
-
- // we can do more if we like. for example,
- // we can avoid types in the RI runtime.
- // but for now, just return the first one.
- return s.iterator().next();
- }
-
- private static Set<JClass> getAssignableTypes( JClass t ) {
- Set<JClass> r = new TreeSet<JClass>(typeComparator);
- getAssignableTypes(t,r);
- return r;
- }
-
- /**
- * Returns the set of all classes/interfaces that a given type
- * implements/extends, including itself.
- *
- * For example, if you pass java.io.FilterInputStream, then the returned
- * set will contain java.lang.Object, java.lang.InputStream, and
- * java.lang.FilterInputStream.
- */
- private static void getAssignableTypes( JClass t, Set<JClass> s ) {
- if(!s.add(t))
- return;
-
- // add its raw type
- s.add(t.erasure());
-
- // if this type is added for the first time,
- // recursively process the super class.
- JClass _super = t._extends();
- if(_super!=null)
- getAssignableTypes(_super,s);
-
- // recursively process all implemented interfaces
- Iterator<JClass> itr = t._implements();
- while(itr.hasNext())
- getAssignableTypes(itr.next(),s);
- }
-
- /**
- * Obtains a {@link JType} object for the string representation
- * of a type.
- */
- public static JType getType( JCodeModel codeModel,
- String typeName, ErrorReceiver errorHandler, Locator errorSource ) {
-
- try {
- return codeModel.parseType(typeName);
- } catch( ClassNotFoundException ee ) {
-
- // make it a warning
- errorHandler.warning( new SAXParseException(
- Messages.ERR_CLASS_NOT_FOUND.format(typeName)
- ,errorSource));
-
- // recover by assuming that it's a class that derives from Object
- return codeModel.directClass(typeName);
- }
- }
-
- /**
- * Compares {@link JType} objects by their names.
- */
- private static final Comparator<JType> typeComparator = new Comparator<JType>() {
- public int compare(JType t1, JType t2) {
- return t1.fullName().compareTo(t2.fullName());
- }
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Util.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Util.java
deleted file mode 100644
index 2b184644..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/Util.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.xml.sax.InputSource;
-
-public class Util
-{
- /**
- * Parses the specified string either as an {@link URL} or as a {@link File}.
- *
- * @throws IOException
- * if the parameter is neither.
- */
- public static Object getFileOrURL(String fileOrURL) throws IOException {
- try {
- return new URL(fileOrURL);
- } catch (MalformedURLException e) {
- return new File(fileOrURL).getCanonicalFile();
- }
- }
- /**
- * Gets an InputSource from a string, which contains either
- * a file name or an URL.
- */
- public static InputSource getInputSource(String fileOrURL) {
- try {
- Object o = getFileOrURL(fileOrURL);
- if(o instanceof URL) {
- return new InputSource(escapeSpace(((URL)o).toExternalForm()));
- } else {
- String url = ((File)o).toURL().toExternalForm();
- return new InputSource(escapeSpace(url));
- }
- } catch (IOException e) {
- return new InputSource(fileOrURL);
- }
- }
-
- public static String escapeSpace( String url ) {
- // URLEncoder didn't work.
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < url.length(); i++) {
- // TODO: not sure if this is the only character that needs to be escaped.
- if (url.charAt(i) == ' ')
- buf.append("%20");
- else
- buf.append(url.charAt(i));
- }
- return buf.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Block.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Block.java
deleted file mode 100644
index 06021f1b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Block.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd;
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class Block {
- final boolean isOptional;
- final boolean isRepeated;
-
- /**
- * {@link Element}s that belong to this block.
- * <p>
- * We want to preserve the order they are added, but we don't want
- * dupliates.
- */
- final Set<Element> elements = new LinkedHashSet<Element>();
-
- Block(boolean optional, boolean repeated) {
- isOptional = optional;
- isRepeated = repeated;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Element.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Element.java
deleted file mode 100644
index 06c74f98..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Element.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CElementPropertyInfo;
-import static com.sun.tools.internal.xjc.model.CElementPropertyInfo.CollectionMode.*;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-import com.sun.tools.internal.xjc.model.CTypeRef;
-import com.sun.tools.internal.xjc.model.CValuePropertyInfo;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.reader.dtd.bindinfo.BIConversion;
-import com.sun.tools.internal.xjc.reader.dtd.bindinfo.BIElement;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.core.WildcardMode;
-import com.sun.xml.internal.dtdparser.DTDEventListener;
-
-import org.xml.sax.Locator;
-
-/**
- * DTD Element.
- *
- * <p>
- * This class extends {@link Term} to participate in the content model tree.
- *
- * <p>
- * This class is repsonsible for binding the element.
- *
- * @author Kohsuke Kawaguchi
- */
-final class Element extends Term implements Comparable<Element> {
-
- /**
- * Name of the element.
- */
- final String name;
-
- private final TDTDReader owner;
-
- /**
- * @see DTDEventListener#endContentModel(String, short)
- */
- private short contentModelType;
-
- private Term contentModel;
-
- /**
- * True if this element is referenced from another element.
- */
- boolean isReferenced;
-
- /**
- * If this element maps to a class, that class representation.
- * Otherwise null.
- */
- private CClassInfo classInfo;
-
- /**
- * True if {@link #classInfo} field is computed.
- */
- private boolean classInfoComputed;
-
- /**
- * List of attribute properties on this element
- */
- final List<CPropertyInfo> attributes = new ArrayList<CPropertyInfo>();
-
- /**
- * Normalized blocks of the content model.
- */
- private final List<Block> normalizedBlocks = new ArrayList<Block>();
-
- /**
- * True if this element needs to be a class.
- *
- * Currently, if an element is referenced from a construct like (A|B|C),
- * we require those A,B, and C to be a class.
- */
- private boolean mustBeClass;
-
- /**
- * The source location where this element is defined.
- */
- private Locator locator;
-
- public Element(TDTDReader owner,String name) {
- this.owner = owner;
- this.name = name;
- }
-
- void normalize(List<Block> r, boolean optional) {
- Block o = new Block(optional,false);
- o.elements.add(this);
- r.add(o);
- }
-
- void addAllElements(Block b) {
- b.elements.add(this);
- }
-
- boolean isOptional() {
- return false;
- }
-
- boolean isRepeated() {
- return false;
- }
-
-
- /**
- * Define its content model.
- */
- void define(short contentModelType, Term contentModel, Locator locator) {
- assert this.contentModel==null; // may not be called twice
- this.contentModelType = contentModelType;
- this.contentModel = contentModel;
- this.locator = locator;
- contentModel.normalize(normalizedBlocks,false);
-
- for( Block b : normalizedBlocks ) {
- if(b.isRepeated || b.elements.size()>1) {
- for( Element e : b.elements ) {
- owner.getOrCreateElement(e.name).mustBeClass = true;
- }
- }
- }
- }
-
- /**
- * When this element is an PCDATA-only content model,
- * returns the conversion for it. Otherwise the behavior is undefined.
- */
- private TypeUse getConversion() {
- assert contentModel == Term.EMPTY; // this is PCDATA-only element
-
- BIElement e = owner.bindInfo.element(name);
- if(e!=null) {
- BIConversion conv = e.getConversion();
- if(conv!=null)
- return conv.getTransducer();
- }
- return CBuiltinLeafInfo.STRING;
- }
-
- /**
- * Return null if this class is not bound to a class.
- */
- CClassInfo getClassInfo() {
- if(!classInfoComputed) {
- classInfoComputed = true;
- classInfo = calcClass();
- }
- return classInfo;
- }
-
- private CClassInfo calcClass() {
- BIElement e = owner.bindInfo.element(name);
- if(e==null) {
- if(contentModelType!=DTDEventListener.CONTENT_MODEL_MIXED
- || !attributes.isEmpty()
- || mustBeClass)
- return createDefaultClass();
- if(contentModel!=Term.EMPTY) {
- throw new UnsupportedOperationException("mixed content model not supported");
- } else {
- // just #PCDATA
- if(isReferenced)
- return null;
- else
- // if no one else is referencing, assumed to be the root.
- return createDefaultClass();
- }
- } else {
- return e.clazz;
- }
- }
-
- private CClassInfo createDefaultClass() {
- String className = owner.model.getNameConverter().toClassName(name);
- QName tagName = new QName("",name);
-
- return new CClassInfo(owner.model,owner.getTargetPackage(),className,locator,null,tagName,null,null/*TODO*/);
- }
-
- void bind() {
- CClassInfo ci = getClassInfo();
- assert ci!=null || attributes.isEmpty();
- for( CPropertyInfo p : attributes )
- ci.addProperty(p);
-
- switch(contentModelType) {
- case DTDEventListener.CONTENT_MODEL_ANY:
- CReferencePropertyInfo rp = new CReferencePropertyInfo("Content",true,false,true,null,null/*TODO*/,locator, false, false, false);
- rp.setWildcard(WildcardMode.SKIP);
- ci.addProperty(rp);
- return;
- case DTDEventListener.CONTENT_MODEL_CHILDREN:
- break; // handling follows
- case DTDEventListener.CONTENT_MODEL_MIXED:
- if(contentModel!=Term.EMPTY)
- throw new UnsupportedOperationException("mixed content model unsupported yet");
-
- if(ci!=null) {
- // if this element is mapped to a class, just put one property
- CValuePropertyInfo p = new CValuePropertyInfo("value", null,null/*TODO*/,locator,getConversion(),null);
- ci.addProperty(p);
- }
- return;
- case DTDEventListener.CONTENT_MODEL_EMPTY:
- // no content model
- assert ci!=null;
- return;
- }
-
- // normalize
- List<Block> n = new ArrayList<Block>();
- contentModel.normalize(n,false);
-
- {// check collision among Blocks
- Set<String> names = new HashSet<String>();
- boolean collision = false;
-
- OUTER:
- for( Block b : n )
- for( Element e : b.elements )
- if(!names.add(e.name)) {
- collision = true;
- break OUTER;
- }
-
- if(collision) {
- // collapse all blocks into one
- Block all = new Block(true,true);
- for( Block b : n )
- all.elements.addAll(b.elements);
- n.clear();
- n.add(all);
- }
- }
-
- for( Block b : n ) {
- CElementPropertyInfo p;
- if(b.isRepeated || b.elements.size()>1) {
- // collection
- StringBuilder name = new StringBuilder();
- for( Element e : b.elements ) {
- if(name.length()>0)
- name.append("Or");
- name.append(owner.model.getNameConverter().toPropertyName(e.name));
- }
- p = new CElementPropertyInfo(name.toString(), REPEATED_ELEMENT, ID.NONE, null, null,null/*TODO*/, locator, !b.isOptional );
- for( Element e : b.elements ) {
- CClassInfo child = owner.getOrCreateElement(e.name).getClassInfo();
- assert child!=null; // we are requiring them to be classes.
- p.getTypes().add(new CTypeRef(child,new QName("",e.name),null,false,null));
- }
- } else {
- // single property
- String name = b.elements.iterator().next().name;
- String propName = owner.model.getNameConverter().toPropertyName(name);
-
- TypeUse refType;
- Element ref = owner.getOrCreateElement(name);
- if(ref.getClassInfo()!=null)
- refType = ref.getClassInfo();
- else {
- refType = ref.getConversion().getInfo();
- }
-
- p = new CElementPropertyInfo(propName,
- refType.isCollection()?REPEATED_VALUE:NOT_REPEATED, ID.NONE, null, null,null/*TODO*/, locator, !b.isOptional );
-
- p.getTypes().add(new CTypeRef(refType.getInfo(),new QName("",name),null,false,null));
- }
- ci.addProperty(p);
- }
- }
-
- public int compareTo(Element that) {
- return this.name.compareTo(that.name);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle.properties
deleted file mode 100644
index 4ca8d9d6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle.properties
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TDTDReader.NoRootElement = \
- No root element was specified.
-
-TDTDReader.UndefinedElementInBindInfo = \
- Binding information contains element "{0}", but it's not defined in DTD.
-
-TDTDReader.ConversionForNonValueElement = \
- Conversion declaration is specified for the element "{0}", but \
- the content model of this element is not #PCDATA.
-
-TDTDReader.ContentProperty.ParticleMismatch = \
- The content model of the element "{0}" does not match \
- the content-property declaration of the specified binding information.
-
-TDTDReader.ContentProperty.DeclarationTooShort = \
- The content-property declaration for the element "{0}" is too short.
-
-TDTDReader.BindInfo.NonExistentElementDeclaration = \
- DTD does not contain the element "{0}"
-
-TDTDReader.BindInfo.NonExistentInterfaceMember = \
- "{0}" is specified as a member of an interface, \
- but there is no such class nor interface.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_de.properties
deleted file mode 100644
index e99fd27b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_de.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TDTDReader.NoRootElement = Es wurde kein Root-Element angegeben.
-
-TDTDReader.UndefinedElementInBindInfo = Binding-Informationen enthalten Element "{0}", dieses ist jedoch nicht in DTD definiert.
-
-TDTDReader.ConversionForNonValueElement = Konvertierungsdeklaration ist f\u00FCr Element "{0}" angegeben, das Contentmodell dieses Elements ist jedoch nicht #PCDATA.
-
-TDTDReader.ContentProperty.ParticleMismatch = Das Contentmodell des Elements "{0}" stimmt nicht mit der content-property-Deklaration der angegebenen Binding-Informationen \u00FCberein.
-
-TDTDReader.ContentProperty.DeclarationTooShort = Die content-property-Deklaration f\u00FCr das Element "{0}" ist zu kurz.
-
-TDTDReader.BindInfo.NonExistentElementDeclaration = DTD enth\u00E4lt das Element "{0}" nicht
-
-TDTDReader.BindInfo.NonExistentInterfaceMember = "{0}" ist als Member einer Schnittstelle angegeben, es ist doch weder eine derartige Klasse noch eine derartige Schnittstelle vorhanden.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_es.properties
deleted file mode 100644
index 411e48fe..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_es.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TDTDReader.NoRootElement = No se ha especificado ning\u00FAn elemento ra\u00EDz.
-
-TDTDReader.UndefinedElementInBindInfo = La informaci\u00F3n de enlace contiene el elemento "{0}", pero no est\u00E1 definida en el DTD.
-
-TDTDReader.ConversionForNonValueElement = Se ha especificado la declaraci\u00F3n de conversi\u00F3n para el elemento "{0}", pero el modelo de contenido de este elemento no es #PCDATA.
-
-TDTDReader.ContentProperty.ParticleMismatch = El modelo de contenido del elemento "{0}" no coincide con la declaraci\u00F3n de content-property de la informaci\u00F3n de enlace especificada.
-
-TDTDReader.ContentProperty.DeclarationTooShort = La declaraci\u00F3n de content-property del elemento "{0}" es demasiado corta.
-
-TDTDReader.BindInfo.NonExistentElementDeclaration = El DTD no contiene el elemento "{0}"
-
-TDTDReader.BindInfo.NonExistentInterfaceMember = "{0}" se ha especificado como miembro de una interfaz, pero no existe esa clase ni esa interfaz.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_fr.properties
deleted file mode 100644
index 630547d5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_fr.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TDTDReader.NoRootElement = Aucun \u00E9l\u00E9ment racine n'a \u00E9t\u00E9 indiqu\u00E9.
-
-TDTDReader.UndefinedElementInBindInfo = Les informations de binding contiennent l''\u00E9l\u00E9ment "{0}", mais ne sont pas d\u00E9finies dans la DTD.
-
-TDTDReader.ConversionForNonValueElement = La d\u00E9claration de conversion est indiqu\u00E9e pour l''\u00E9l\u00E9ment "{0}", mais le mod\u00E8le de contenu de cet \u00E9l\u00E9ment n''est pas #PCDATA.
-
-TDTDReader.ContentProperty.ParticleMismatch = Le mod\u00E8le de contenu de l''\u00E9l\u00E9ment "{0}" ne correspond pas \u00E0 la d\u00E9claration content-property des informations de binding indiqu\u00E9es.
-
-TDTDReader.ContentProperty.DeclarationTooShort = La d\u00E9claration content-property pour l''\u00E9l\u00E9ment "{0}" est trop courte.
-
-TDTDReader.BindInfo.NonExistentElementDeclaration = La DTD ne contient pas l''\u00E9l\u00E9ment "{0}"
-
-TDTDReader.BindInfo.NonExistentInterfaceMember = "{0}" est indiqu\u00E9 en tant que membre d''une interface, mais il n''existe aucune classe ni interface de ce type.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_it.properties
deleted file mode 100644
index d77bda74..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_it.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TDTDReader.NoRootElement = Nessun elemento radice specificato.
-
-TDTDReader.UndefinedElementInBindInfo = Le informazioni di associazione contengono l''elemento "{0}" ma questi non \u00E8 definito in DTD.
-
-TDTDReader.ConversionForNonValueElement = Dichiarazione di conversione specificata per l''elemento "{0}" ma il modello di contenuto di questo elemento non \u00E8 #PCDATA.
-
-TDTDReader.ContentProperty.ParticleMismatch = Il modello di contenuto dell''elemento "{0}" non corrisponde alla dichiarazione di contenuto-propriet\u00E0 delle informazioni di associazione specificate.
-
-TDTDReader.ContentProperty.DeclarationTooShort = La dichiarazione di contenuto-propriet\u00E0 per l''elemento "{0}" \u00E8 troppo breve.
-
-TDTDReader.BindInfo.NonExistentElementDeclaration = DTD non contiene l''elemento "{0}"
-
-TDTDReader.BindInfo.NonExistentInterfaceMember = "{0}" \u00E8 specificato come membro di un''interfaccia ma non esiste tale classe o interfaccia.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_ja.properties
deleted file mode 100644
index 2df26529..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_ja.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TDTDReader.NoRootElement = \u30EB\u30FC\u30C8\u8981\u7D20\u304C\u6307\u5B9A\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002
-
-TDTDReader.UndefinedElementInBindInfo = \u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u60C5\u5831\u306B\u8981\u7D20"{0}"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u3053\u308C\u306FDTD\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-
-TDTDReader.ConversionForNonValueElement = \u8981\u7D20"{0}"\u306B\u5909\u63DB\u5BA3\u8A00\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u3053\u306E\u8981\u7D20\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306F#PCDATA\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-
-TDTDReader.ContentProperty.ParticleMismatch = \u8981\u7D20"{0}"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u304C\u3001\u6307\u5B9A\u3055\u308C\u305F\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u60C5\u5831\u306Econtent-property\u5BA3\u8A00\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002
-
-TDTDReader.ContentProperty.DeclarationTooShort = \u8981\u7D20"{0}"\u306Econtent-property\u5BA3\u8A00\u304C\u77ED\u3059\u304E\u307E\u3059\u3002
-
-TDTDReader.BindInfo.NonExistentElementDeclaration = DTD\u306B\u8981\u7D20"{0}"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093
-
-TDTDReader.BindInfo.NonExistentInterfaceMember = "{0}"\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30E1\u30F3\u30D0\u30FC\u3068\u3057\u3066\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u305D\u306E\u3088\u3046\u306A\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306F\u3042\u308A\u307E\u305B\u3093\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_ko.properties
deleted file mode 100644
index 77bc989c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_ko.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TDTDReader.NoRootElement = \uB8E8\uD2B8 \uC694\uC18C\uAC00 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-TDTDReader.UndefinedElementInBindInfo = \uBC14\uC778\uB529 \uC815\uBCF4\uAC00 "{0}" \uC694\uC18C\uB97C \uD3EC\uD568\uD558\uACE0 \uC788\uC9C0\uB9CC DTD\uC5D0 \uC815\uC758\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-TDTDReader.ConversionForNonValueElement = "{0}" \uC694\uC18C\uC5D0 \uB300\uD55C \uBCC0\uD658 \uC120\uC5B8\uC774 \uC9C0\uC815\uB418\uC5C8\uC9C0\uB9CC \uC774 \uC694\uC18C\uC758 \uCF58\uD150\uCE20 \uBAA8\uB378\uC740 #PCDATA\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
-
-TDTDReader.ContentProperty.ParticleMismatch = "{0}" \uC694\uC18C\uC758 \uCF58\uD150\uCE20 \uBAA8\uB378\uC774 \uC9C0\uC815\uB41C \uBC14\uC778\uB529 \uC815\uBCF4\uC758 content-property \uC120\uC5B8\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-TDTDReader.ContentProperty.DeclarationTooShort = "{0}" \uC694\uC18C\uC5D0 \uB300\uD55C content-property \uC120\uC5B8\uC774 \uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4.
-
-TDTDReader.BindInfo.NonExistentElementDeclaration = DTD\uC5D0 "{0}" \uC694\uC18C\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-TDTDReader.BindInfo.NonExistentInterfaceMember = "{0}"\uC774(\uAC00) \uC778\uD130\uD398\uC774\uC2A4\uC758 \uBA64\uBC84\uB85C \uC9C0\uC815\uB418\uC5C8\uC9C0\uB9CC \uD574\uB2F9 \uD074\uB798\uC2A4\uC640 \uC778\uD130\uD398\uC774\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_pt_BR.properties
deleted file mode 100644
index 9111c316..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_pt_BR.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TDTDReader.NoRootElement = Nenhum elemento-raiz especificado.
-
-TDTDReader.UndefinedElementInBindInfo = As informa\u00E7\u00F5es de bind cont\u00EAm o elemento "{0}", mas n\u00E3o foram definidas no DTD.
-
-TDTDReader.ConversionForNonValueElement = A declara\u00E7\u00E3o de convers\u00E3o foi especificada para o elemento "{0}", mas o modelo do conte\u00FAdo deste elemento n\u00E3o \u00E9 #PCDATA.
-
-TDTDReader.ContentProperty.ParticleMismatch = O modelo do conte\u00FAdo do elemento "{0}" n\u00E3o corresponde \u00E0 declara\u00E7\u00E3o de propriedade do conte\u00FAdo das informa\u00E7\u00F5es de bind especificadas.
-
-TDTDReader.ContentProperty.DeclarationTooShort = A declara\u00E7\u00E3o de propriedade do conte\u00FAdo do elemento "{0}" \u00E9 muito curta.
-
-TDTDReader.BindInfo.NonExistentElementDeclaration = DTD n\u00E3o cont\u00E9m o elemento "{0}"
-
-TDTDReader.BindInfo.NonExistentInterfaceMember = "{0}" especificado como membro de uma interface, mas n\u00E3o h\u00E1 classe, nem interface.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_zh_CN.properties
deleted file mode 100644
index 579a1397..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_zh_CN.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TDTDReader.NoRootElement = \u672A\u6307\u5B9A\u6839\u5143\u7D20\u3002
-
-TDTDReader.UndefinedElementInBindInfo = \u7ED1\u5B9A\u4FE1\u606F\u5305\u542B\u5143\u7D20 "{0}", \u4F46\u8BE5\u5143\u7D20\u672A\u5728 DTD \u4E2D\u5B9A\u4E49\u3002
-
-TDTDReader.ConversionForNonValueElement = \u4E3A\u5143\u7D20 "{0}" \u6307\u5B9A\u4E86\u8F6C\u6362\u58F0\u660E, \u4F46\u6B64\u5143\u7D20\u7684\u5185\u5BB9\u6A21\u578B\u4E0D\u662F #PCDATA\u3002
-
-TDTDReader.ContentProperty.ParticleMismatch = \u5143\u7D20 "{0}" \u7684\u5185\u5BB9\u6A21\u578B\u4E0E\u6307\u5B9A\u7ED1\u5B9A\u4FE1\u606F\u7684\u5185\u5BB9\u5C5E\u6027\u58F0\u660E\u4E0D\u5339\u914D\u3002
-
-TDTDReader.ContentProperty.DeclarationTooShort = \u5143\u7D20 "{0}" \u7684\u5185\u5BB9\u5C5E\u6027\u58F0\u660E\u592A\u77ED\u3002
-
-TDTDReader.BindInfo.NonExistentElementDeclaration = DTD \u4E0D\u5305\u542B\u5143\u7D20 "{0}"
-
-TDTDReader.BindInfo.NonExistentInterfaceMember = "{0}" \u5DF2\u6307\u5B9A\u4E3A\u63A5\u53E3\u7684\u6210\u5458, \u4F46\u6CA1\u6709\u8FD9\u6837\u7684\u7C7B\u548C\u63A5\u53E3\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_zh_TW.properties
deleted file mode 100644
index f77915df..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_zh_TW.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-TDTDReader.NoRootElement = \u672A\u6307\u5B9A\u6839\u5143\u7D20.
-
-TDTDReader.UndefinedElementInBindInfo = \u9023\u7D50\u8CC7\u8A0A\u5305\u542B\u5143\u7D20 "{0}", \u4F46\u5176\u672A\u5B9A\u7FA9\u65BC DTD \u4E2D.
-
-TDTDReader.ConversionForNonValueElement = \u5DF2\u70BA\u5143\u7D20 "{0}" \u6307\u5B9A\u8F49\u63DB\u5BA3\u544A, \u4F46\u6B64\u5143\u7D20\u7684\u5167\u5BB9\u6A21\u578B\u4E0D\u662F #PCDATA.
-
-TDTDReader.ContentProperty.ParticleMismatch = \u5143\u7D20 "{0}" \u7684\u5167\u5BB9\u6A21\u578B\u4E0D\u7B26\u5408\u6307\u5B9A\u4E4B\u9023\u7D50\u8CC7\u8A0A\u7684 content-property \u5BA3\u544A.
-
-TDTDReader.ContentProperty.DeclarationTooShort = \u5143\u7D20 "{0}" \u7684 content-property \u5BA3\u544A\u592A\u77ED.
-
-TDTDReader.BindInfo.NonExistentElementDeclaration = DTD \u672A\u5305\u542B\u5143\u7D20 "{0}"
-
-TDTDReader.BindInfo.NonExistentInterfaceMember = "{0}" \u5DF2\u6307\u5B9A\u70BA\u67D0\u4ECB\u9762\u7684\u6210\u54E1, \u4F46\u6C92\u6709\u6B64\u985E\u5225\u6216\u4ECB\u9762.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Messages.java
deleted file mode 100644
index 52631a54..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Messages.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-class Messages
-{
- /** Loads a string resource and formats it with specified arguments. */
- static String format( String property, Object... args ) {
- String text = ResourceBundle.getBundle(Messages.class.getPackage().getName() + ".MessageBundle").getString(property);
- return MessageFormat.format(text,args);
- }
-
-
- public static final String ERR_NO_ROOT_ELEMENT = // arg:0
- "TDTDReader.NoRootElement";
-
- public static final String ERR_UNDEFINED_ELEMENT_IN_BINDINFO = // arg:1
- "TDTDReader.UndefinedElementInBindInfo";
-
- public static final String ERR_CONVERSION_FOR_NON_VALUE_ELEMENT = // arg:1
- "TDTDReader.ConversionForNonValueElement";
-
- public static final String ERR_CONTENT_PROPERTY_PARTICLE_MISMATCH = // arg:1
- "TDTDReader.ContentProperty.ParticleMismatch";
-
- public static final String ERR_CONTENT_PROPERTY_DECLARATION_TOO_SHORT = // arg:1
- "TDTDReader.ContentProperty.DeclarationTooShort";
-
- public static final String ERR_BINDINFO_NON_EXISTENT_ELEMENT_DECLARATION = // arg:1
- "TDTDReader.BindInfo.NonExistentElementDeclaration";
-
- public static final String ERR_BINDINFO_NON_EXISTENT_INTERFACE_MEMBER = // arg:1
- "TDTDReader.BindInfo.NonExistentInterfaceMember";
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/ModelGroup.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/ModelGroup.java
deleted file mode 100644
index e22761e5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/ModelGroup.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.sun.xml.internal.dtdparser.DTDEventListener;
-
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class ModelGroup extends Term {
- enum Kind {
- CHOICE, SEQUENCE
- }
-
- Kind kind;
-
- private final List<Term> terms = new ArrayList<Term>();
-
- void normalize(List<Block> r, boolean optional) {
- switch(kind) {
- case SEQUENCE:
- for( Term t : terms )
- t.normalize(r,optional);
- return;
- case CHOICE:
- Block b = new Block(isOptional()||optional,isRepeated());
- addAllElements(b);
- r.add(b);
- return;
- }
- }
-
- void addAllElements(Block b) {
- for( Term t : terms )
- t.addAllElements(b);
- }
-
- boolean isOptional() {
- switch(kind) {
- case SEQUENCE:
- for( Term t : terms )
- if(!t.isOptional())
- return false;
- return true;
- case CHOICE:
- for( Term t : terms )
- if(t.isOptional())
- return true;
- return false;
- default:
- throw new IllegalArgumentException();
- }
- }
-
- boolean isRepeated() {
- switch(kind) {
- case SEQUENCE:
- return true;
- case CHOICE:
- for( Term t : terms )
- if(t.isRepeated())
- return true;
- return false;
- default:
- throw new IllegalArgumentException();
- }
- }
-
- void setKind(short connectorType) {
- Kind k;
- switch(connectorType) {
- case DTDEventListener.SEQUENCE:
- k = Kind.SEQUENCE;
- break;
- case DTDEventListener.CHOICE:
- k = Kind.CHOICE;
- break;
- default:
- throw new IllegalArgumentException();
- }
-
- assert kind==null || k==kind;
- kind = k;
- }
-
- void addTerm(Term t) {
- if (t instanceof ModelGroup) {
- ModelGroup mg = (ModelGroup) t;
- if(mg.kind==this.kind) {
- terms.addAll(mg.terms);
- return;
- }
- }
- terms.add(t);
- }
-
-
- Term wrapUp() {
- switch(terms.size()) {
- case 0:
- return EMPTY;
- case 1:
- assert kind==null;
- return terms.get(0);
- default:
- assert kind!=null;
- return this;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Occurence.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Occurence.java
deleted file mode 100644
index 8307145b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Occurence.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd;
-
-import java.util.List;
-
-import com.sun.xml.internal.dtdparser.DTDEventListener;
-
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class Occurence extends Term {
- final Term term;
- final boolean isOptional;
- final boolean isRepeated;
-
- Occurence(Term term, boolean optional, boolean repeated) {
- this.term = term;
- isOptional = optional;
- isRepeated = repeated;
- }
-
- static Term wrap( Term t, int occurence ) {
- switch(occurence) {
- case DTDEventListener.OCCURENCE_ONCE:
- return t;
- case DTDEventListener.OCCURENCE_ONE_OR_MORE:
- return new Occurence(t,false,true);
- case DTDEventListener.OCCURENCE_ZERO_OR_MORE:
- return new Occurence(t,true,true);
- case DTDEventListener.OCCURENCE_ZERO_OR_ONE:
- return new Occurence(t,true,false);
- default:
- throw new IllegalArgumentException();
- }
- }
-
- void normalize(List<Block> r, boolean optional) {
- if(isRepeated) {
- Block b = new Block(isOptional||optional,true);
- addAllElements(b);
- r.add(b);
- } else {
- term.normalize(r,optional||isOptional);
- }
- }
-
- void addAllElements(Block b) {
- term.addAllElements(b);
- }
-
- boolean isOptional() {
- return isOptional||term.isOptional();
- }
-
- boolean isRepeated() {
- return isRepeated||term.isRepeated();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/TDTDReader.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/TDTDReader.java
deleted file mode 100644
index f592a608..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/TDTDReader.java
+++ /dev/null
@@ -1,463 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Stack;
-
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.tools.internal.xjc.AbortException;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.model.CAttributePropertyInfo;
-import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.model.TypeUseFactory;
-import com.sun.tools.internal.xjc.model.CDefaultValue;
-import com.sun.tools.internal.xjc.reader.ModelChecker;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.dtd.bindinfo.BIAttribute;
-import com.sun.tools.internal.xjc.reader.dtd.bindinfo.BIElement;
-import com.sun.tools.internal.xjc.reader.dtd.bindinfo.BIInterface;
-import com.sun.tools.internal.xjc.reader.dtd.bindinfo.BindInfo;
-import com.sun.tools.internal.xjc.util.CodeModelClassFactory;
-import com.sun.tools.internal.xjc.util.ErrorReceiverFilter;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import com.sun.xml.internal.dtdparser.DTDHandlerBase;
-import com.sun.xml.internal.dtdparser.DTDParser;
-import com.sun.xml.internal.dtdparser.InputEntity;
-import com.sun.xml.internal.xsom.XmlString;
-import com.sun.istack.internal.SAXParseException2;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.LocatorImpl;
-
-/**
- * Parses DTD grammar along with binding information into BGM.
- *
- * @author
- * <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class TDTDReader extends DTDHandlerBase
-{
- /**
- * Parses DTD grammar and a binding information into BGM.
- *
- * <p>
- * This method is just a utility method that covers 80% of the use
- * cases.
- *
- * @param bindingInfo
- * binding information file, if any. Can be null.
- */
- public static Model parse(
- InputSource dtd,
- InputSource bindingInfo,
- ErrorReceiver errorReceiver,
- Options opts) {
-
- try {
- // set up a ring
- final Ring old = Ring.begin();
- try {
- ErrorReceiverFilter ef = new ErrorReceiverFilter(errorReceiver);
-
- JCodeModel cm = new JCodeModel();
- Model model = new Model(opts,cm,NameConverter.standard,opts.classNameAllocator,null);
-
- Ring.add(cm);
- Ring.add(model);
- Ring.add(ErrorReceiver.class,ef);
-
- TDTDReader reader = new TDTDReader( ef, opts, bindingInfo);
-
- DTDParser parser = new DTDParser();
- parser.setDtdHandler(reader);
- if( opts.entityResolver!=null )
- parser.setEntityResolver(opts.entityResolver);
-
- try {
- parser.parse(dtd);
- } catch (SAXParseException e) {
- return null; // this error was already handled by GrammarReaderController
- }
-
- Ring.get(ModelChecker.class).check();
-
- if(ef.hadError()) return null;
- else return model;
- } finally {
- Ring.end(old);
- }
- } catch (IOException e) {
- errorReceiver.error(new SAXParseException2(e.getMessage(),null,e));
- return null;
- } catch (SAXException e) {
- errorReceiver.error(new SAXParseException2(e.getMessage(),null,e));
- return null;
- } catch (AbortException e) {
- // parsing was aborted but the error was already reported
- return null;
- }
- }
- protected TDTDReader(ErrorReceiver errorReceiver, Options opts, InputSource _bindInfo)
- throws AbortException {
- this.entityResolver = opts.entityResolver;
- this.errorReceiver = new ErrorReceiverFilter(errorReceiver);
- bindInfo = new BindInfo(model,_bindInfo, this.errorReceiver);
- classFactory = new CodeModelClassFactory(errorReceiver);
- }
-
- private final EntityResolver entityResolver;
-
- /**
- * binding information.
- *
- * <p>
- * This is always non-null even if no binding information was specified.
- * (In that case, a dummy object will be provided.)
- */
- final BindInfo bindInfo;
-
- final Model model = Ring.get(Model.class);
-
- private final CodeModelClassFactory classFactory;
-
- private final ErrorReceiverFilter errorReceiver;
-
- /**
- * Element name to its content model definition.
- */
- private final Map<String,Element> elements = new HashMap<String,Element>();
-
-
- public void startDTD(InputEntity entity) throws SAXException {
- }
-
- public void endDTD() throws SAXException {
-
- // bind them all.
- // we need to know how elements are referencing each other before we do this,
- // so this can be only done at the endDTD method
- for( Element e : elements.values() )
- e.bind();
-
- // if there was an error by now, just abort.
- if (errorReceiver.hadError())
- return;
-
- processInterfaceDeclarations();
-
- // check XJC extensions and realize them
- model.serialVersionUID = bindInfo.getSerialVersionUID();
- if(model.serialVersionUID!=null)
- model.serializable=true;
- model.rootClass = bindInfo.getSuperClass();
- model.rootInterface = bindInfo.getSuperInterface();
-
-// TODO: do we need to reimplement them?
-// // performs annotation
-// Annotator.annotate(model, this);
-// FieldCollisionChecker.check( model, this );
-
-
- processConstructorDeclarations();
- }
-
- /** Processes interface declarations. */
- private void processInterfaceDeclarations() {
-
-
- Map<String,InterfaceAcceptor> fromName = new HashMap<String,InterfaceAcceptor>();
-
- // first, create empty InterfaceItem declaration for all interfaces
- Map<BIInterface,JClass> decls = new HashMap<BIInterface,JClass>();
-
- for( BIInterface decl : bindInfo.interfaces() ) {
- final JDefinedClass intf = classFactory.createInterface(
- bindInfo.getTargetPackage(), decl.name(), copyLocator() );
- decls.put(decl,intf);
- fromName.put(decl.name(),new InterfaceAcceptor() {
- public void implement(JClass c) {
- intf._implements(c);
- }
- });
- }
-
- for( final CClassInfo ci : model.beans().values() ) {
- fromName.put(ci.getName(),new InterfaceAcceptor() {
- public void implement(JClass c) {
- ci._implements(c);
- }
- });
- }
-
- // traverse the interface declarations again
- // and populate its expression according to the members attribute.
- for( Map.Entry<BIInterface,JClass> e : decls.entrySet() ) {
- BIInterface decl = e.getKey();
- JClass c = e.getValue();
-
- for (String member : decl.members()) {
- InterfaceAcceptor acc = fromName.get(member);
- if (acc == null) {
- // there is no such class/interface
- // TODO: error location
- error(decl.getSourceLocation(),
- Messages.ERR_BINDINFO_NON_EXISTENT_INTERFACE_MEMBER,
- member);
- continue;
- }
-
- acc.implement(c);
- }
- }
-
- // TODO: check the cyclic interface definition
- }
-
- private static interface InterfaceAcceptor {
- void implement( JClass c );
- }
-
-
- JPackage getTargetPackage() {
- return bindInfo.getTargetPackage();
- }
-
-
- /**
- * Creates constructor declarations as specified in the
- * binding information.
- *
- * <p>
- * Also checks that the binding file does not contain
- * declarations for non-existent elements.
- */
- private void processConstructorDeclarations() {
- for( BIElement decl: bindInfo.elements() ) {
- Element e = elements.get(decl.name());
- if(e==null) {
- error(decl.getSourceLocation(),
- Messages.ERR_BINDINFO_NON_EXISTENT_ELEMENT_DECLARATION,decl.name());
- continue; // continue to process next declaration
- }
-
- if(!decl.isClass())
- // only element-class declaration has constructor definitions
- continue;
-
- decl.declareConstructors(e.getClassInfo());
- }
- }
-
- public void attributeDecl(String elementName, String attributeName, String attributeType, String[] enumeration, short attributeUse, String defaultValue) throws SAXException {
- getOrCreateElement(elementName).attributes.add(
- createAttribute(elementName, attributeName, attributeType, enumeration, attributeUse, defaultValue)
- );
- }
-
- protected CPropertyInfo createAttribute(
- String elementName, String attributeName, String attributeType,
- String[] enums, short attributeUse, String defaultValue )
- throws SAXException {
-
- boolean required = attributeUse==USE_REQUIRED;
-
- // get the attribute-property declaration
- BIElement edecl = bindInfo.element(elementName);
- BIAttribute decl=null;
- if(edecl!=null) decl=edecl.attribute(attributeName);
-
- String propName;
- if(decl==null) propName = model.getNameConverter().toPropertyName(attributeName);
- else propName = decl.getPropertyName();
-
- QName qname = new QName("",attributeName);
-
- // if no declaration is specified, just wrap it by
- // a FieldItem and let the normalizer handle its content.
- TypeUse use;
-
- if(decl!=null && decl.getConversion()!=null)
- use = decl.getConversion().getTransducer();
- else
- use = builtinConversions.get(attributeType);
-
- CPropertyInfo r = new CAttributePropertyInfo(
- propName, null,null/*TODO*/, copyLocator(), qname, use, null, required );
-
- if(defaultValue!=null)
- r.defaultValue = CDefaultValue.create( use, new XmlString(defaultValue) );
-
- return r;
- }
-
-
-
- Element getOrCreateElement( String elementName ) {
- Element r = elements.get(elementName);
- if(r==null) {
- r = new Element(this,elementName);
- elements.put(elementName,r);
- }
-
- return r;
- }
-
-
- public void startContentModel(String elementName, short contentModelType) throws SAXException {
- assert modelGroups.isEmpty();
- modelGroups.push(new ModelGroup());
- }
-
- public void endContentModel(String elementName, short contentModelType) throws SAXException {
- assert modelGroups.size()==1;
- Term term = modelGroups.pop().wrapUp();
-
- Element e = getOrCreateElement(elementName);
- e.define( contentModelType, term, copyLocator() );
- }
-
-
- private final Stack<ModelGroup> modelGroups = new Stack<ModelGroup>();
-
- public void startModelGroup() throws SAXException {
- modelGroups.push(new ModelGroup());
- }
-
- public void endModelGroup(short occurence) throws SAXException {
- Term t = Occurence.wrap( modelGroups.pop().wrapUp(), occurence );
- modelGroups.peek().addTerm(t);
- }
-
- public void connector(short connectorType) throws SAXException {
- modelGroups.peek().setKind(connectorType);
- }
-
- // TODO: for now, we just ignore all the content model specification
- // and treat it as (A,B,C,....)
-
- public void childElement(String elementName, short occurence) throws SAXException {
- Element child = getOrCreateElement(elementName);
- modelGroups.peek().addTerm( Occurence.wrap( child, occurence ) );
- child.isReferenced = true;
- }
-
-
-
-
-
- /**
- * Mutable {@link Locator} instance that points to
- * the current source line.
- * <p>
- * Use {@link #copyLocator()} to get a immutable clone.
- */
- private Locator locator;
-
- public void setDocumentLocator(Locator loc) {
- this.locator = loc;
- }
-
- /**
- * Creates a snapshot of the current {@link #locator} values.
- */
- private Locator copyLocator(){
- return new LocatorImpl(locator);
- }
-
-
-
-//
-//
-// builtin datatype handling
-//
-//
-
- /** Transducers for the built-in types. Read-only. */
- private static final Map<String,TypeUse> builtinConversions;
-
-
- static {
- // list of datatypes which have built-in conversions.
- // note that although xs:token and xs:normalizedString are not
- // specified in the spec, they need to be here because they
- // have different whitespace normalization semantics.
- Map<String,TypeUse> m = new HashMap<String,TypeUse>();
-
- m.put("CDATA", CBuiltinLeafInfo.NORMALIZED_STRING);
- m.put("ENTITY", CBuiltinLeafInfo.TOKEN);
- m.put("ENTITIES", CBuiltinLeafInfo.STRING.makeCollection());
- m.put("NMTOKEN", CBuiltinLeafInfo.TOKEN);
- m.put("NMTOKENS", CBuiltinLeafInfo.STRING.makeCollection());
- m.put("ID", CBuiltinLeafInfo.ID);
- m.put("IDREF", CBuiltinLeafInfo.IDREF);
- m.put("IDREFS", TypeUseFactory.makeCollection(CBuiltinLeafInfo.IDREF));
- m.put("ENUMERATION",CBuiltinLeafInfo.TOKEN);
-
- builtinConversions = Collections.unmodifiableMap(m);
- }
-
-
-//
-//
-// error related utility methods
-//
-//
- public void error(SAXParseException e) throws SAXException {
- errorReceiver.error(e);
- }
-
- public void fatalError(SAXParseException e) throws SAXException {
- errorReceiver.fatalError(e);
- }
-
- public void warning(SAXParseException e) throws SAXException {
- errorReceiver.warning(e);
- }
-
- protected final void error( Locator loc, String prop, Object... args ) {
- errorReceiver.error(loc,Messages.format(prop,args));
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Term.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Term.java
deleted file mode 100644
index d413f552..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/Term.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd;
-
-import java.util.List;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-abstract class Term {
- abstract void normalize( List<Block> r, boolean optional );
-
- abstract void addAllElements(Block b);
-
- abstract boolean isOptional();
-
- abstract boolean isRepeated();
-
- /**
- * Represents empty term.
- * <p>
- * This special term is only used to represent #PCDATA-only content model.
- */
- static final Term EMPTY = new Term() {
- void normalize(List<Block> r, boolean optional) {
- }
-
- void addAllElements(Block b) {
- }
-
- boolean isOptional() {
- return false;
- }
-
- boolean isRepeated() {
- return false;
- }
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIAttribute.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIAttribute.java
deleted file mode 100644
index db73d0ce..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIAttribute.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd.bindinfo;
-
-import java.util.ArrayList;
-
-import com.sun.tools.internal.xjc.generator.bean.field.FieldRenderer;
-import com.sun.tools.internal.xjc.generator.bean.field.FieldRendererFactory;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-
-/** &lt;attribute> declaration in the binding file. */
-public class BIAttribute
-{
- /**
- * Wraps a given &lt;attribute> element.
- * <p>
- * Should be created only from {@link BIElement}.
- */
- BIAttribute( BIElement _parent, Element _e ) {
- this.parent = _parent;
- this.element = _e;
- }
-
- private final BIElement parent;
- private final Element element;
-
- /** Gets the name of this attribute-property declaration. */
- public final String name() {
- return element.getAttribute("name");
- }
-
-
- /**
- * Gets the conversion method for this attribute, if any.
- *
- * @return
- * If the convert attribute is not specified, this
- * method returns null.
- */
- public BIConversion getConversion() {
- if (element.getAttributeNode("convert") == null)
- return null;
-
- String cnv = element.getAttribute("convert");
- return parent.conversion(cnv);
- }
-
- /**
- * Gets the realization of this particle, if any.
- *
- * @return
- * null if the "collection" attribute was not specified.
- */
- public final FieldRenderer getRealization() {
- Attr a = element.getAttributeNode("collection");
- if(a==null) return null;
-
- String v = element.getAttribute("collection").trim();
-
- FieldRendererFactory frf = parent.parent.model.options.getFieldRendererFactory();
- if(v.equals("array")) return frf.getArray();
- if(v.equals("list"))
- return frf.getList(
- parent.parent.codeModel.ref(ArrayList.class));
-
- // the correctness of the attribute value must be
- // checked by the validator.
- throw new InternalError("unexpected collection value: "+v);
- }
-
- /**
- * Gets the property name for this attribute.
- *
- * @return
- * always a non-null, valid string.
- */
- public final String getPropertyName() {
- String r = DOMUtil.getAttribute(element,"property");
- if(r!=null) return r;
- else return name();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIConstructor.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIConstructor.java
deleted file mode 100644
index d13e8006..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIConstructor.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd.bindinfo;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import com.sun.tools.internal.xjc.model.CClassInfo;
-
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-/**
- * &lt;constructor> declaration in the binding file.
- *
- * <p>
- * Since JAXB will generate both interfaces and implementations,
- * A constructor declaration will create:
- *
- * <ul>
- * <li> a method declaration in the factory interface
- * <li> a method implementation in the factory implementation class
- * <li> a constructor implementation in the actual implementation class
- * </ul>
- */
-public class BIConstructor
-{
- BIConstructor( Element _node ) {
- this.dom = _node;
-
- StringTokenizer tokens = new StringTokenizer(
- DOMUtil.getAttribute(_node,"properties"));
-
- List<String> vec = new ArrayList<String>();
- while(tokens.hasMoreTokens())
- vec.add(tokens.nextToken());
- properties = vec.toArray(new String[0]);
-
- if( properties.length==0 )
- throw new AssertionError("this error should be catched by the validator");
- }
-
- /** &lt;constructor> element in the source binding file. */
- private final Element dom;
-
- /** properties specified by @properties. */
- private final String[] properties;
-
- /**
- * Creates a constructor declaration into the ClassItem.
- *
- * @param cls
- * ClassItem object that corresponds to the
- * element declaration that contains this declaration.
- */
- public void createDeclaration( CClassInfo cls ) {
- cls.addConstructor(properties);
- }
-
- /** Gets the location where this declaration is declared. */
- public Locator getSourceLocation() {
- return DOMLocator.getLocationInfo(dom);
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIContent.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIContent.java
deleted file mode 100644
index fefe08b4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIContent.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd.bindinfo;
-
-import java.util.ArrayList;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.generator.bean.field.FieldRenderer;
-
-import org.w3c.dom.Element;
-
-/**
- * Particles in the &lt;content> declaration in the binding file.
- *
- */
-public class BIContent
-{
- /**
- * Wraps a given particle.
- *
- * <p>
- * This object should be created through
- * the {@link #create(Element, BIElement)} method.
- */
- private BIContent( Element e, BIElement _parent ) {
- this.element = e;
- this.parent = _parent;
- this.opts = parent.parent.model.options;
- }
-
- /** The particle element which this object is wrapping. */
- protected final Element element;
-
- /** The parent object.*/
- protected final BIElement parent;
-
- private final Options opts;
-
- /**
- * Gets the realization of this particle, if any.
- *
- * @return
- * null if the "collection" attribute was not specified.
- */
- public final FieldRenderer getRealization() {
- String v = DOMUtil.getAttribute(element,"collection");
- if(v==null) return null;
-
- v = v.trim();
- if(v.equals("array")) return opts.getFieldRendererFactory().getArray();
- if(v.equals("list"))
- return opts.getFieldRendererFactory().getList(
- parent.parent.codeModel.ref(ArrayList.class));
-
- // the correctness of the attribute value must be
- // checked by the validator.
- throw new InternalError("unexpected collection value: "+v);
- }
-
- /**
- * Gets the property name of this particle.
- *
- * @return
- * always a non-null, valid string.
- */
- public final String getPropertyName() {
- String r = DOMUtil.getAttribute(element,"property");
-
- // in case of <element-ref>, @property is optional and
- // defaults to @name.
- // in all other cases, @property is mandatory.
- if(r!=null) return r;
- return DOMUtil.getAttribute(element,"name");
- }
-
- /**
- * Gets the type of this property, if any.
- * <p>
- * &lt;element-ref> particle doesn't have the type.
- *
- * @return
- * null if none is specified.
- */
- public final JClass getType() {
- try {
- String type = DOMUtil.getAttribute(element,"supertype");
- if(type==null) return null;
-
- // TODO: does this attribute defaults to the current package?
- int idx = type.lastIndexOf('.');
- if(idx<0) return parent.parent.codeModel.ref(type);
- else return parent.parent.getTargetPackage().ref(type);
- } catch( ClassNotFoundException e ) {
- // TODO: better error handling
- throw new NoClassDefFoundError(e.getMessage());
- }
- }
-
-
-
-
-
- /**
- * Creates an appropriate subclass of BIContent
- * by sniffing the tag name.
- * <p>
- * This method should be only called by the BIElement class.
- */
- static BIContent create( Element e, BIElement _parent ) {
- return new BIContent(e,_parent);
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIConversion.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIConversion.java
deleted file mode 100644
index b926e607..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIConversion.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd.bindinfo;
-
-import com.sun.tools.internal.xjc.model.TypeUse;
-
-/**
- * conversion declaration (&lt;conversion> and &lt;enumeration>).
- */
-public interface BIConversion
-{
- /** Gets the conversion name. */
- String name();
-
- /** Gets a transducer for this conversion. */
- TypeUse getTransducer();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIElement.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIElement.java
deleted file mode 100644
index 8718d24d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIElement.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd.bindinfo;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-
-/**
- * &lt;element> declaration in the binding file.
- */
-public final class BIElement
-{
- /**
- * Wraps a given &lt;element> element in the binding file.
- *
- * <p>
- * Should be created only from {@link BindInfo}.
- */
- BIElement( BindInfo bi, Element _e ) {
- this.parent = bi;
- this.e = _e;
-
- {
- Element c = DOMUtil.getElement(e,"content");
- if(c!=null) {
- if(DOMUtil.getAttribute(c,"property")!=null) {
- // if @property is there, this is a general declaration
- this.rest = BIContent.create(c,this);
- } else {
- // this must be a model-based declaration
- for( Element p : DOMUtil.getChildElements(c) ) {
- if(p.getLocalName().equals("rest"))
- this.rest = BIContent.create(p,this);
- else
- this.contents.add(BIContent.create(p,this));
- }
- }
- }
- }
-
- // parse <attribute>s
- for( Element atr : DOMUtil.getChildElements(e,"attribute") ) {
- BIAttribute a = new BIAttribute( this, atr );
- attributes.put(a.name(),a);
- }
-
- if(isClass()) {
- // if this is a class-declaration, create JClass object now
- String className = DOMUtil.getAttribute(e,"class");
- if(className==null)
- // none was specified. infer the name.
- className = NameConverter.standard.toClassName(name());
- this.className = className;
- } else {
- // this is not an element-class declaration
- className = null;
- }
-
- // process conversion declarations
- for( Element conv : DOMUtil.getChildElements(e,"conversion") ) {
- BIConversion c = new BIUserConversion(bi,conv);
- conversions.put(c.name(),c);
- }
- for( Element en : DOMUtil.getChildElements(e,"enumeration") ) {
- BIConversion c = BIEnumeration.create(en,this);
- conversions.put(c.name(),c);
- }
-
- // parse <constructor>s
- for( Element c : DOMUtil.getChildElements(e,"constructor") ) {
- constructors.add( new BIConstructor(c) );
- }
-
- String name = name();
- QName tagName = new QName("",name);
-
- this.clazz = new CClassInfo(parent.model,parent.getTargetPackage(),className,getLocation(),null,tagName,null,null/*TODO*/);
- }
-
- /**
- * Gets the source location where this element is declared.
- */
- public Locator getLocation() {
- return DOMLocator.getLocationInfo(e);
- }
-
-
- /** The parent {@link BindInfo} object to which this object belongs. */
- final BindInfo parent;
-
- /** &lt;element> element which this object is wrapping. */
- private final Element e;
-
- /**
- * The bean representation for this element.
- */
- public final CClassInfo clazz;
-
- /**
- * Content-property declarations.
- * <p>
- * This vector will be empty if no content-property declaration is made.
- */
- private final List<BIContent> contents = new ArrayList<BIContent>();
-
- /** Conversion declarations. */
- private final Map<String,BIConversion> conversions = new HashMap<String,BIConversion>();
-
- /**
- * The "rest" content-property declaration.
- * <p>
- * This field is null when there was no "rest" declaration.
- */
- private BIContent rest;
-
- /** Attribute-property declarations. */
- private final Map<String,BIAttribute> attributes = new HashMap<String,BIAttribute>();
-
- /** Constructor declarations. */
- private final List<BIConstructor> constructors = new ArrayList<BIConstructor>();
-
- /**
- * the class which is generated by this declaration.
- * This field will be null if this declaration is an element-property
- * declaration.
- */
- private final String className;
-
-
-
- /** Gets the element name. */
- public String name() { return DOMUtil.getAttribute(e,"name"); }
-
- /**
- * Checks if the element type is "class".
- * If false, that means this element will be a value.
- */
- public boolean isClass() {
- return "class".equals(e.getAttribute("type"));
- }
-
- /**
- * Checks if this element is designated as a root element.
- */
- public boolean isRoot() {
- return "true".equals(e.getAttribute("root"));
- }
-
- /**
- * Gets the JClass object that represents this declaration.
- *
- * <p>
- * This method returns null if this declaration
- * is an element-property declaration.
- */
- public String getClassName() {
- return className;
- }
-
- /**
- * Creates constructor declarations for this element.
- *
- * <p>
- * This method should only be called by DTDReader <b>after</b>
- * the normalization has completed.
- *
- * @param src
- * The ClassItem object that corresponds to this declaration
- */
- public void declareConstructors( CClassInfo src ) {
- for( BIConstructor c : constructors )
- c.createDeclaration(src);
- }
-
- /**
- * Gets the conversion method for this element.
- *
- * <p>
- * This method can be called only when this element
- * declaration is designated as element-value.
- *
- * @return
- * If the convert attribute is not specified, this
- * method returns null.
- */
- public BIConversion getConversion() {
- String cnv = DOMUtil.getAttribute(e,"convert");
- if(cnv==null) return null;
-
- return conversion(cnv);
- }
-
- /**
- * Resolves the conversion name to the conversion declaration.
- *
- * <p>
- * Element-local declarations are checked first.
- *
- * @return
- * A non-null valid BIConversion object.
- */
- public BIConversion conversion( String name ) {
- BIConversion r = conversions.get(name);
- if(r!=null) return r;
-
- // check the global conversion declarations
- return parent.conversion(name);
- }
-
-
- /**
- * Iterates all content-property declarations (except 'rest').
- */
- public List<BIContent> getContents() {
- return contents;
- }
-
- /**
- * Gets the attribute-property declaration, if any.
- *
- * @return
- * null if attribute declaration was not given by that name.
- */
- public BIAttribute attribute( String name ) {
- return attributes.get(name);
- }
-
- /**
- * Gets the 'rest' content-property declaration, if any.
- * @return
- * if there is no 'rest' declaration, return null.
- */
- public BIContent getRest() { return this.rest; }
-
- /** Gets the location where this declaration is declared. */
- public Locator getSourceLocation() {
- return DOMLocator.getLocationInfo(e);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIEnumeration.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIEnumeration.java
deleted file mode 100644
index bdd5b899..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIEnumeration.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd.bindinfo;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo;
-import com.sun.tools.internal.xjc.model.CClassInfoParent;
-import com.sun.tools.internal.xjc.model.CEnumConstant;
-import com.sun.tools.internal.xjc.model.CEnumLeafInfo;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.model.TypeUse;
-
-import org.w3c.dom.Element;
-
-/**
- * &lt;enumeration> declaration in the binding file.
- */
-public final class BIEnumeration implements BIConversion
-{
- /** Creates an object from &lt;enumeration> declaration. */
- private BIEnumeration( Element _e, TypeUse _xducer ) {
- this.e = _e;
- this.xducer = _xducer;
- }
-
- /** &lt;enumeration> element in DOM. */
- private final Element e;
-
- private final TypeUse xducer;
-
- public String name() { return DOMUtil.getAttribute(e,"name"); }
-
- /** Returns a transducer for this enumeration declaration. */
- public TypeUse getTransducer() { return xducer; }
-
-
-
-
- /** Creates a global enumeration declaration. */
- static BIEnumeration create( Element dom, BindInfo parent ) {
- // create a class in the target package.
- return new BIEnumeration(
- dom,
- new CEnumLeafInfo(
- parent.model,
- null,
- new CClassInfoParent.Package(parent.getTargetPackage()),
- DOMUtil.getAttribute(dom,"name"),
- CBuiltinLeafInfo.STRING,
- buildMemberList(parent.model,dom),
- null, null/*TODO*/,
- DOMLocator.getLocationInfo(dom)));
- }
-
- /** Creates an element-local enumeration declaration. */
- static BIEnumeration create( Element dom, BIElement parent ) {
- // create a class as a nested class
- return new BIEnumeration(
- dom,
- new CEnumLeafInfo(
- parent.parent.model,
- null,
- parent.clazz,
- DOMUtil.getAttribute(dom,"name"),
- CBuiltinLeafInfo.STRING,
- buildMemberList(parent.parent.model,dom),
- null, null/*TODO*/,
- DOMLocator.getLocationInfo(dom) ));
- }
-
- private static List<CEnumConstant> buildMemberList( Model model, Element dom ) {
- List<CEnumConstant> r = new ArrayList<CEnumConstant>();
-
- String members = DOMUtil.getAttribute(dom,"members");
- if(members==null) members=""; // TODO: error handling
-
- StringTokenizer tokens = new StringTokenizer(members);
- while(tokens.hasMoreTokens()) {
- String token = tokens.nextToken();
- r.add(new CEnumConstant(model.getNameConverter().toConstantName(token),
- null,token,null/*TODO*/,null,null));
- }
-
- return r;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIInterface.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIInterface.java
deleted file mode 100644
index 39e6391a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIInterface.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd.bindinfo;
-
-import java.util.StringTokenizer;
-
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-/**
- * &lt;interface> declaration in the binding file.
- */
-public final class BIInterface
-{
- BIInterface( Element e ) {
- this.dom = e;
- name = DOMUtil.getAttribute(e,"name");
- members = parseTokens(DOMUtil.getAttribute(e,"members"));
-
- if(DOMUtil.getAttribute(e,"properties")!=null) {
- fields = parseTokens(DOMUtil.getAttribute(e,"properties"));
- throw new AssertionError("//interface/@properties is not supported");
- } else // no property was specified
- fields = new String[0];
- }
-
- /** &lt;interface> element in the binding file. */
- private final Element dom;
-
- /** Name of the generated Java interface. */
- private final String name;
-
- /**
- * Gets the name of this interface.
- * This name should also used as the class name.
- */
- public String name() { return name; }
-
-
- private final String[] members;
-
- /**
- * Gets the names of interfaces/classes that implement
- * this interface.
- */
- public String[] members() { return members; }
-
-
- private final String[] fields;
-
- /** Gets the names of fields in this interface. */
- public String[] fields() { return fields; }
-
-
- /** Gets the location where this declaration is declared. */
- public Locator getSourceLocation() {
- return DOMLocator.getLocationInfo(dom);
- }
-
-
-
- /** splits a list into an array of strings. */
- private static String[] parseTokens( String value ) {
- StringTokenizer tokens = new StringTokenizer(value);
-
- String[] r = new String[tokens.countTokens()];
- int i=0;
- while(tokens.hasMoreTokens())
- r[i++] = tokens.nextToken();
-
- return r;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIUserConversion.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIUserConversion.java
deleted file mode 100644
index 16adc735..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BIUserConversion.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd.bindinfo;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.Map;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JClassAlreadyExistsException;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.codemodel.internal.JPrimitiveType;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.tools.internal.xjc.model.CAdapter;
-import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.model.TypeUseFactory;
-
-import com.sun.xml.internal.bind.v2.util.XmlFactory;
-import org.w3c.dom.Element;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-/**
- * &lt;conversion> declaration in the binding file.
- * This declaration declares a conversion by user-specified methods.
- */
-public class BIUserConversion implements BIConversion
-{
- /**
- * Wraps a given &lt;conversion> element in the binding file.
- */
- BIUserConversion( BindInfo bi, Element _e ) {
- this.owner = bi;
- this.e = _e;
- }
-
- private static void add( Map<String,BIConversion> m, BIConversion c ) {
- m.put( c.name(), c );
- }
-
- /** Adds all built-in conversions into the given map. */
- static void addBuiltinConversions( BindInfo bi, Map<String,BIConversion> m ) {
- add( m, new BIUserConversion( bi, parse("<conversion name='boolean' type='java.lang.Boolean' parse='getBoolean' />")));
- add( m, new BIUserConversion( bi, parse("<conversion name='byte' type='java.lang.Byte' parse='parseByte' />")));
- add( m, new BIUserConversion( bi, parse("<conversion name='short' type='java.lang.Short' parse='parseShort' />")));
- add( m, new BIUserConversion( bi, parse("<conversion name='int' type='java.lang.Integer' parse='parseInt' />")));
- add( m, new BIUserConversion( bi, parse("<conversion name='long' type='java.lang.Long' parse='parseLong' />")));
- add( m, new BIUserConversion( bi, parse("<conversion name='float' type='java.lang.Float' parse='parseFloat' />")));
- add( m, new BIUserConversion( bi, parse("<conversion name='double' type='java.lang.Double' parse='parseDouble' />")));
- }
-
- private static Element parse(String text) {
- try {
- //this is parsing well known schemas, do not configure secure processing - always true
- DocumentBuilderFactory dbf = XmlFactory.createDocumentBuilderFactory(false);
- InputSource is = new InputSource(new StringReader(text));
- return dbf.newDocumentBuilder().parse(is).getDocumentElement();
- } catch (SAXException x) {
- throw new Error(x);
- } catch (IOException x) {
- throw new Error(x);
- } catch (ParserConfigurationException x) {
- throw new Error(x);
- }
- }
-
-
- /** The owner {@link BindInfo} object to which this object belongs. */
- private final BindInfo owner;
-
- /** &lt;conversion> element which this object is wrapping. */
- private final Element e;
-
-
-
- /** Gets the location where this declaration is declared. */
- public Locator getSourceLocation() {
- return DOMLocator.getLocationInfo(e);
- }
-
- /** Gets the conversion name. */
- public String name() { return DOMUtil.getAttribute(e,"name"); }
-
- /** Gets a transducer for this conversion. */
- public TypeUse getTransducer() {
-
- String ws = DOMUtil.getAttribute(e,"whitespace");
- if(ws==null) ws = "collapse";
-
- String type = DOMUtil.getAttribute(e,"type");
- if(type==null) type=name();
- JType t=null;
-
- int idx = type.lastIndexOf('.');
- if(idx<0) {
- // no package name is specified.
- try {
- t = JPrimitiveType.parse(owner.codeModel,type);
- } catch( IllegalArgumentException ex ) {
- // otherwise treat it as a class name in the current package
- type = owner.getTargetPackage().name()+'.'+type;
- }
- }
- if(t==null) {
- try {
- // TODO: revisit this later
- JDefinedClass cls = owner.codeModel._class(type);
- cls.hide();
- t = cls;
- } catch( JClassAlreadyExistsException ex ) {
- t = ex.getExistingClass();
- }
- }
-
- String parse = DOMUtil.getAttribute(e,"parse");
- if(parse==null) parse="new";
-
- String print = DOMUtil.getAttribute(e,"print");
- if(print==null) print="toString";
-
- JDefinedClass adapter = generateAdapter(owner.codeModel, parse, print, t.boxify());
-
- // XmlJavaType customization always converts between string and an user-defined type.
- return TypeUseFactory.adapt(CBuiltinLeafInfo.STRING,new CAdapter(adapter));
- }
-
- // TODO: anyway to reuse this code between XML Schema compiler?
- private JDefinedClass generateAdapter(JCodeModel cm, String parseMethod, String printMethod, JClass inMemoryType) {
- JDefinedClass adapter = null;
-
- int id = 1;
- while(adapter==null) {
- try {
- JPackage pkg = owner.getTargetPackage();
- adapter = pkg._class("Adapter"+id);
- } catch (JClassAlreadyExistsException ex) {
- // try another name in search for an unique name.
- // this isn't too efficient, but we expect people to usually use
- // a very small number of adapters.
- id++;
- }
- }
-
- adapter._extends(cm.ref(XmlAdapter.class).narrow(String.class).narrow(inMemoryType));
-
- JMethod unmarshal = adapter.method(JMod.PUBLIC, inMemoryType, "unmarshal");
- JVar $value = unmarshal.param(String.class, "value");
-
- JExpression inv;
-
- if( parseMethod.equals("new") ) {
- // "new" indicates that the constructor of the target type
- // will do the unmarshalling.
-
- // RESULT: new <type>()
- inv = JExpr._new(inMemoryType).arg($value);
- } else {
- int idx = parseMethod.lastIndexOf('.');
- if(idx<0) {
- // parseMethod specifies the static method of the target type
- // which will do the unmarshalling.
-
- // because of an error check at the constructor,
- // we can safely assume that this cast works.
- inv = inMemoryType.staticInvoke(parseMethod).arg($value);
- } else {
- inv = JExpr.direct(parseMethod+"(value)");
- }
- }
- unmarshal.body()._return(inv);
-
-
- JMethod marshal = adapter.method(JMod.PUBLIC, String.class, "marshal");
- $value = marshal.param(inMemoryType,"value");
-
- int idx = printMethod.lastIndexOf('.');
- if(idx<0) {
- // printMethod specifies a method in the target type
- // which performs the serialization.
-
- // RESULT: <value>.<method>()
- inv = $value.invoke(printMethod);
- } else {
- // RESULT: <className>.<method>(<value>)
- inv = JExpr.direct(printMethod+"(value)");
- }
- marshal.body()._return(inv);
-
- return adapter;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BindInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BindInfo.java
deleted file mode 100644
index c2a6a3d1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/BindInfo.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd.bindinfo;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.validation.ValidatorHandler;
-
-import com.sun.codemodel.internal.ClassType;
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JClassAlreadyExistsException;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.istack.internal.SAXParseException2;
-import com.sun.tools.internal.xjc.AbortException;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.SchemaCache;
-import com.sun.tools.internal.xjc.model.CCustomizations;
-import com.sun.tools.internal.xjc.model.CPluginCustomization;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.tools.internal.xjc.util.CodeModelClassFactory;
-import com.sun.tools.internal.xjc.util.ErrorReceiverFilter;
-import com.sun.tools.internal.xjc.util.ForkContentHandler;
-
-import com.sun.xml.internal.bind.v2.util.XmlFactory;
-import javax.xml.parsers.DocumentBuilderFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-/**
- * Root of the binding information.
- */
-public class BindInfo
-{
- /** Controller object that can be used to report errors. */
- protected final ErrorReceiver errorReceiver;
-
- /*package*/ final Model model;
-
- /**
- * The -p option that should control the default Java package that
- * will contain the generated code. Null if unspecified. This takes
- * precedence over the value specified in the binding file.
- */
- private final String defaultPackage;
-
- public BindInfo(Model model, InputSource source, ErrorReceiver _errorReceiver) throws AbortException {
- this( model, parse(model,source,_errorReceiver), _errorReceiver);
- }
-
- public BindInfo(Model model, Document _dom, ErrorReceiver _errorReceiver) {
- this.model = model;
- this.dom = _dom.getDocumentElement();
- this.codeModel = model.codeModel;
- this.errorReceiver = _errorReceiver;
- this.classFactory = new CodeModelClassFactory(_errorReceiver);
- // TODO: decide name converter from the binding file
-
- this.defaultPackage = model.options.defaultPackage;
-
- // copy global customizations to the model
- model.getCustomizations().addAll(getGlobalCustomizations());
-
- // process element declarations
- for( Element ele : DOMUtil.getChildElements(dom,"element")) {
- BIElement e = new BIElement(this,ele);
- elements.put(e.name(),e);
- }
-
- // add built-in conversions
- BIUserConversion.addBuiltinConversions(this,conversions);
-
- // process conversion declarations
- for( Element cnv : DOMUtil.getChildElements(dom,"conversion")) {
- BIConversion c = new BIUserConversion(this,cnv);
- conversions.put(c.name(),c);
- }
- for( Element en : DOMUtil.getChildElements(dom,"enumeration")) {
- BIConversion c = BIEnumeration.create( en, this );
- conversions.put(c.name(),c);
- }
- // TODO: check the uniquness of conversion name
-
-
- // process interface definitions
- for( Element itf : DOMUtil.getChildElements(dom,"interface")) {
- BIInterface c = new BIInterface(itf);
- interfaces.put(c.name(),c);
- }
- }
-
-
- /** CodeModel object that is used by this binding file. */
- final JCodeModel codeModel;
-
- /** Wrap the codeModel object and automate error reporting. */
- final CodeModelClassFactory classFactory;
-
- /** DOM tree that represents binding info. */
- private final Element dom;
-
- /** Conversion declarations. */
- private final Map<String,BIConversion> conversions = new HashMap<String,BIConversion>();
-
- /** Element declarations keyed by names. */
- private final Map<String,BIElement> elements = new HashMap<String,BIElement>();
-
- /** interface declarations keyed by names. */
- private final Map<String,BIInterface> interfaces = new HashMap<String,BIInterface>();
-
-
- /** XJC extension namespace. */
- private static final String XJC_NS = Const.XJC_EXTENSION_URI;
-
-//
-//
-// Exposed public methods
-//
-//
- /** Gets the serialVersionUID if it's turned on. */
- public Long getSerialVersionUID() {
- Element serial = DOMUtil.getElement(dom,XJC_NS,"serializable");
- if(serial==null) return null;
-
- String v = DOMUtil.getAttribute(serial,"uid");
- if(v==null) v="1";
- return new Long(v);
- }
-
- /** Gets the xjc:superClass customization if it's turned on. */
- public JClass getSuperClass() {
- Element sc = DOMUtil.getElement(dom,XJC_NS,"superClass");
- if (sc == null) return null;
-
- JDefinedClass c;
-
- try {
- String v = DOMUtil.getAttribute(sc,"name");
- if(v==null) return null;
- c = codeModel._class(v);
- c.hide();
- } catch (JClassAlreadyExistsException e) {
- c = e.getExistingClass();
- }
-
- return c;
- }
-
- /** Gets the xjc:superInterface customization if it's turned on. */
- public JClass getSuperInterface() {
- Element sc = DOMUtil.getElement(dom,XJC_NS,"superInterface");
- if (sc == null) return null;
-
- String name = DOMUtil.getAttribute(sc,"name");
- if (name == null) return null;
-
- JDefinedClass c;
-
- try {
- c = codeModel._class(name, ClassType.INTERFACE);
- c.hide();
- } catch (JClassAlreadyExistsException e) {
- c = e.getExistingClass();
- }
-
- return c;
- }
-
- /**
- * Gets the specified package name (options/@package).
- */
- public JPackage getTargetPackage() {
- if(model.options.defaultPackage!=null)
- // "-p" takes precedence over everything else
- return codeModel._package(model.options.defaultPackage);
-
- String p;
- if( defaultPackage!=null )
- p = defaultPackage;
- else
- p = getOption("package", "");
- return codeModel._package(p);
- }
-
- /**
- * Gets the conversion declaration from the binding info.
- *
- * @return
- * A non-null valid BIConversion object.
- */
- public BIConversion conversion(String name) {
- BIConversion r = conversions.get(name);
- if (r == null)
- throw new AssertionError("undefined conversion name: this should be checked by the validator before we read it");
- return r;
- }
-
- /**
- * Gets the element declaration from the binding info.
- *
- * @return
- * If there is no declaration with a given name,
- * this method returns null.
- */
- public BIElement element( String name ) {
- return elements.get(name);
- }
- /** Iterates all {@link BIElement}s in a read-only set. */
- public Collection<BIElement> elements() {
- return elements.values();
- }
-
- /** Returns all {@link BIInterface}s in a read-only set. */
- public Collection<BIInterface> interfaces() {
- return interfaces.values();
- }
-
- /**
- * Gets the list of top-level {@link CPluginCustomization}s.
- */
- private CCustomizations getGlobalCustomizations() {
- CCustomizations r=null;
- for( Element e : DOMUtil.getChildElements(dom) ) {
- if(!model.options.pluginURIs.contains(e.getNamespaceURI()))
- continue; // this isn't a plugin customization
- if(r==null)
- r = new CCustomizations();
- r.add(new CPluginCustomization(e, DOMLocator.getLocationInfo(e)));
- }
-
- if(r==null) r = CCustomizations.EMPTY;
- return new CCustomizations(r);
- }
-
-
-
-
-//
-//
-// Internal utility methods
-//
-//
-
-
- /** Gets the value from the option element. */
- private String getOption(String attName, String defaultValue) {
- Element opt = DOMUtil.getElement(dom,"options");
- if (opt != null) {
- String s = DOMUtil.getAttribute(opt,attName);
- if (s != null)
- return s;
- }
- return defaultValue;
- }
-
- /**
- * Lazily parsed schema for the binding file.
- */
- private static SchemaCache bindingFileSchema = new SchemaCache(BindInfo.class.getResource("bindingfile.xsd"));
-
- /**
- * Parses an InputSource into dom4j Document.
- * Returns null in case of an exception.
- */
- private static Document parse( Model model, InputSource is, ErrorReceiver receiver ) throws AbortException {
- try {
- ValidatorHandler validator = bindingFileSchema.newValidator();
-
- // set up the pipe line as :
- // /-> extensionChecker -> validator
- // parser-> -<
- // \-> DOM builder
- SAXParserFactory pf = XmlFactory.createParserFactory(model.options.disableXmlSecurity);
- DocumentBuilderFactory domFactory = XmlFactory.createDocumentBuilderFactory(model.options.disableXmlSecurity);
- DOMBuilder builder = new DOMBuilder(domFactory);
-
- ErrorReceiverFilter controller = new ErrorReceiverFilter(receiver);
- validator.setErrorHandler(controller);
- XMLReader reader = pf.newSAXParser().getXMLReader();
- reader.setErrorHandler(controller);
-
- DTDExtensionBindingChecker checker = new DTDExtensionBindingChecker("", model.options, controller);
- checker.setContentHandler(validator);
-
- reader.setContentHandler(new ForkContentHandler(checker,builder));
-
- reader.parse(is);
-
- if(controller.hadError()) throw new AbortException();
- return (Document)builder.getDOM();
- } catch( IOException e ) {
- receiver.error( new SAXParseException2(e.getMessage(),null,e) );
- } catch( SAXException e ) {
- receiver.error( new SAXParseException2(e.getMessage(),null,e) );
- } catch( ParserConfigurationException e ) {
- receiver.error( new SAXParseException2(e.getMessage(),null,e) );
- }
-
- throw new AbortException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DOMBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DOMBuilder.java
deleted file mode 100644
index 39833e73..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DOMBuilder.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd.bindinfo;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import com.sun.xml.internal.bind.marshaller.SAX2DOMEx;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class DOMBuilder extends SAX2DOMEx {
- private Locator locator;
-
- public DOMBuilder(DocumentBuilderFactory f) throws ParserConfigurationException {
- super(f);
- }
-
- @Override
- public void setDocumentLocator(Locator locator) {
- super.setDocumentLocator(locator);
- this.locator = locator;
- }
-
- @Override
- public void startElement(String namespace, String localName, String qName, Attributes attrs) {
- super.startElement(namespace, localName, qName, attrs);
- DOMLocator.setLocationInfo(getCurrentElement(),locator);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DOMLocator.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DOMLocator.java
deleted file mode 100644
index e58e1603..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DOMLocator.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd.bindinfo;
-
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-class DOMLocator {
- private static final String locationNamespace =
- "http://www.sun.com/xmlns/jaxb/dom-location";
- private static final String systemId = "systemid";
- private static final String column = "column";
- private static final String line = "line";
-
- /** Sets the location information to a specified element. */
- public static void setLocationInfo( Element e, Locator loc ) {
- e.setAttributeNS(locationNamespace,"loc:"+systemId,loc.getSystemId());
- e.setAttributeNS(locationNamespace,"loc:"+column,Integer.toString(loc.getLineNumber()));
- e.setAttributeNS(locationNamespace,"loc:"+line,Integer.toString(loc.getColumnNumber()));
- }
-
- /**
- * Gets the location information from an element.
- *
- * <p>
- * For this method to work, the setLocationInfo method has to be
- * called before.
- */
- public static Locator getLocationInfo( final Element e ) {
- if(DOMUtil.getAttribute(e,locationNamespace,systemId)==null)
- return null; // no location information
-
- return new Locator(){
- public int getLineNumber() {
- return Integer.parseInt(DOMUtil.getAttribute(e,locationNamespace,line));
- }
- public int getColumnNumber() {
- return Integer.parseInt(DOMUtil.getAttribute(e,locationNamespace,column));
- }
- public String getSystemId() {
- return DOMUtil.getAttribute(e,locationNamespace,systemId);
- }
- // we are not interested in PUBLIC ID.
- public String getPublicId() { return null; }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DOMUtil.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DOMUtil.java
deleted file mode 100644
index a4c9e931..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DOMUtil.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd.bindinfo;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public final class DOMUtil {
- final static String getAttribute(Element e,String attName) {
- if(e.getAttributeNode(attName)==null) return null;
- return e.getAttribute(attName);
- }
-
- public static String getAttribute(Element e, String nsUri, String local) {
- if(e.getAttributeNodeNS(nsUri,local)==null) return null;
- return e.getAttributeNS(nsUri,local);
- }
-
- public static Element getElement(Element e, String nsUri, String localName) {
- NodeList l = e.getChildNodes();
- for(int i=0;i<l.getLength();i++) {
- Node n = l.item(i);
- if(n.getNodeType()==Node.ELEMENT_NODE) {
- Element r = (Element)n;
- if(equals(r.getLocalName(),localName) && equals(fixNull(r.getNamespaceURI()),nsUri))
- return r;
- }
- }
- return null;
- }
-
- /**
- * Used for defensive string comparisons, as many DOM methods often return null
- * depending on how they are created.
- */
- private static boolean equals(String a,String b) {
- if(a==b) return true;
- if(a==null || b==null) return false;
- return a.equals(b);
- }
-
- /**
- * DOM API returns null for the default namespace whereas it should return "".
- */
- private static String fixNull(String s) {
- if(s==null) return "";
- else return s;
- }
-
- public static Element getElement(Element e, String localName) {
- return getElement(e,"",localName);
- }
-
- public static List<Element> getChildElements(Element e) {
- List<Element> r = new ArrayList<Element>();
- NodeList l = e.getChildNodes();
- for(int i=0;i<l.getLength();i++) {
- Node n = l.item(i);
- if(n.getNodeType()==Node.ELEMENT_NODE)
- r.add((Element)n);
- }
- return r;
- }
-
- public static List<Element> getChildElements(Element e,String localName) {
- List<Element> r = new ArrayList<Element>();
- NodeList l = e.getChildNodes();
- for(int i=0;i<l.getLength();i++) {
- Node n = l.item(i);
- if(n.getNodeType()==Node.ELEMENT_NODE) {
- Element c = (Element)n;
- if(c.getLocalName().equals(localName))
- r.add(c);
- }
- }
- return r;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DTDExtensionBindingChecker.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DTDExtensionBindingChecker.java
deleted file mode 100644
index 190e9821..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/DTDExtensionBindingChecker.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd.bindinfo;
-
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.reader.AbstractExtensionBindingChecker;
-import com.sun.tools.internal.xjc.reader.Const;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLFilter;
-
-/**
- * {@link XMLFilter} that checks the use of extension namespace URIs
- * (to see if they have corresponding plugins), and otherwise report an error.
- *
- * <p>
- * This code also masks the recognized extensions from the validator that
- * will be plugged as the next component to this.
- *
- * @author Kohsuke Kawaguchi
- */
-final class DTDExtensionBindingChecker extends AbstractExtensionBindingChecker {
- public DTDExtensionBindingChecker(String schemaLanguage, Options options, ErrorHandler handler) {
- super(schemaLanguage, options, handler);
- }
-
- /**
- * Returns true if the elements with the given namespace URI
- * should be blocked by this filter.
- */
- private boolean needsToBePruned( String uri ) {
- if( uri.equals(schemaLanguage) )
- return false;
- if( uri.equals(Const.JAXB_NSURI) )
- return false;
- if( uri.equals(Const.XJC_EXTENSION_URI) )
- return false;
- // we don't want validator to see extensions that we understand ,
- // because they will complain.
- // OTOH, if this is an extension that we didn't understand,
- // we want the validator to report an error
- return enabledExtensions.contains(uri);
- }
-
-
-
- public void startElement(String uri, String localName, String qName, Attributes atts)
- throws SAXException {
-
- if( !isCutting() ) {
- if(!uri.equals("")) {
- // "" is the standard namespace
- checkAndEnable(uri);
-
- verifyTagName(uri, localName, qName);
-
- if(needsToBePruned(uri))
- startCutting();
- }
- }
-
- super.startElement(uri, localName, qName, atts);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle.properties
deleted file mode 100644
index 93c55548..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-BIConstructor.UndefinedField = \
- Property "{0}" is declared in the <constructor> declaration \
- but is not defined in DTD
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_de.properties
deleted file mode 100644
index 37dccc37..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_de.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-BIConstructor.UndefinedField = Eigenschaft "{0}" ist in der <constructor>-Deklaration deklariert, ist jedoch in DTD nicht definiert
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_es.properties
deleted file mode 100644
index 16894140..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_es.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-BIConstructor.UndefinedField = La propiedad "{0}" est\u00E1 declarada en la declaraci\u00F3n <constructor>, pero no est\u00E1 definida en el DTD
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_fr.properties
deleted file mode 100644
index fcf3f2d6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_fr.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-BIConstructor.UndefinedField = La propri\u00E9t\u00E9 "{0}" est d\u00E9clar\u00E9e dans la d\u00E9claration <constructor> mais n''est pas d\u00E9finie dans la DTD
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_it.properties
deleted file mode 100644
index 5a42066f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_it.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-BIConstructor.UndefinedField = La propriet\u00E0 "{0}" \u00E8 dichiarata nella dichiarazione <constructor> ma non \u00E8 definita in DTD
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_ja.properties
deleted file mode 100644
index a9ccba37..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_ja.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-BIConstructor.UndefinedField = \u30D7\u30ED\u30D1\u30C6\u30A3"{0}"\u306F<constructor>\u5BA3\u8A00\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001DTD\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_ko.properties
deleted file mode 100644
index c24d5e29..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_ko.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-BIConstructor.UndefinedField = "{0}" \uC18D\uC131\uC774 <constructor> \uC120\uC5B8\uC5D0\uC11C \uC120\uC5B8\uB418\uC5C8\uC9C0\uB9CC DTD\uC5D0 \uC815\uC758\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_pt_BR.properties
deleted file mode 100644
index 8290addd..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_pt_BR.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-BIConstructor.UndefinedField = A propriedade "{0}" foi declarada na declara\u00E7\u00E3o <constructor>, mas n\u00E3o foi definida no DTD
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_zh_CN.properties
deleted file mode 100644
index 20410f8d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_zh_CN.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-BIConstructor.UndefinedField = \u5C5E\u6027 "{0}" \u5DF2\u5728 <constructor> \u58F0\u660E\u4E2D\u58F0\u660E, \u4F46\u672A\u5728 DTD \u4E2D\u5B9A\u4E49
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_zh_TW.properties
deleted file mode 100644
index 8c2cb859..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_zh_TW.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-BIConstructor.UndefinedField = \u7279\u6027 "{0}" \u5DF2\u5728 <constructor> \u5BA3\u544A\u4E2D\u5BA3\u544A, \u4F46\u672A\u5B9A\u7FA9\u65BC DTD \u4E2D
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/Messages.java
deleted file mode 100644
index 67f0c570..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/Messages.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.dtd.bindinfo;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-class Messages
-{
- /** Loads a string resource and formats it with specified arguments. */
- static String format( String property, Object... args ) {
- String text = ResourceBundle.getBundle(Messages.class.getPackage().getName() + ".MessageBundle").getString(property);
- return MessageFormat.format(text,args);
- }
-
-
- static final String ERR_UNDEFINED_FIELD = // arg:1
- "BIConstructor.UndefinedField";
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/bindingfile.rng b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/bindingfile.rng
deleted file mode 100644
index 78e87323..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/bindingfile.rng
+++ /dev/null
@@ -1,317 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<!--
-DTD binding information file which is supported by this version of XJC.
-
-- Changes from the EA1 is marked by "CHANGE:"
-- "ref:key" and "ref:keyref" are used to specify cross-reference
- information.
-- "a:defaultValue" is used to specify the default behavior.
- Note that default behaviors are hard-coded to the source code.
- Values specified in this schema is not used in the actual processing.
--->
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
- xmlns:a="http://relaxng.org/ns/annotation/1.0"
- xmlns:ref="urn:crossreference"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
-
- <start>
- <element name="xml-java-binding-schema">
- <optional>
- <attribute name="version">
- <value>1.0ea2</value>
- </attribute>
- </optional>
-
- <interleave>
- <optional>
- <element name="options">
- <optional>
- <attribute name="package"/>
- </optional>
- </element>
- </optional>
- <optional>
- <element name="xjc:serializable">
- <optional>
- <attribute name="uid">
- <data type="long"/>
- </attribute>
- </optional>
- </element>
- </optional>
- <optional>
- <element name="xjc:superClass">
- <attribute name="name"/>
- </element>
- </optional>
- <!-- light-weight runtime -->
- <optional>
- <element name="xjc:noMarshaller">
- <empty/>
- </element>
- </optional>
- <optional>
- <element name="xjc:noUnmarshaller">
- <empty/>
- </element>
- </optional>
- <optional>
- <element name="xjc:noValidator">
- <empty/>
- </element>
- </optional>
- <optional>
- <element name="xjc:noValidatingUnmarshaller">
- <empty/>
- </element>
- </optional>
- <zeroOrMore>
- <choice>
- <ref name="toplevel.declaration"/>
- <ref name="global.or.local.declaration"/>
- </choice>
- </zeroOrMore>
- </interleave>
- </element>
- </start>
-
-
-
-
- <!-- element-class declaration -->
- <define name="toplevel.declaration" combine="choice">
- <element name="element">
- <attribute name="name"/>
- <attribute name="type">
- <value>class</value>
- </attribute>
- <optional>
- <attribute name="class">
- <ref name="java.classname.datatype"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="root" a:defaultValue="false">
- <choice>
- <value>true</value>
- <value>false</value>
- </choice>
- </attribute>
- </optional>
-
- <interleave>
- <!-- attribute-property declaration -->
- <zeroOrMore>
- <element name="attribute">
- <attribute name="name"/>
- <optional>
- <attribute name="property"/>
- </optional>
- <optional>
- <ref name="collection.att"/>
- </optional>
- <optional>
- <attribute name="convert">
- <text ref:keyref="conversion"/>
- </attribute>
- </optional>
- </element>
- </zeroOrMore>
-
- <zeroOrMore>
- <ref name="global.or.local.declaration"/>
- </zeroOrMore>
-
- <!-- element-local declarations -->
- <zeroOrMore>
- <element name="constructor">
- <attribute name="properties">
- <list>
- <oneOrMore>
- <!-- point to a property defined in this element -->
- <data type="token"/>
- </oneOrMore>
- </list>
- </attribute>
- </element>
- </zeroOrMore>
-
- <optional>
- <element name="content">
- <interleave>
- <choice>
- <!-- general content-property declaration -->
- <ref name="collection.particle.decl"/>
-
- <!-- model-based content property declaration -->
- <group>
- <zeroOrMore>
- <choice>
- <element name="element-ref">
- <attribute name="name"/>
- <optional>
- <attribute name="property"/>
- </optional>
- <optional>
- <ref name="collection.att"/>
- </optional>
- </element>
- <element>
- <choice>
- <name>sequence</name>
- <name>choice</name>
- </choice>
- <ref name="collection.particle.decl"/>
- </element>
- </choice>
- </zeroOrMore>
- <optional><!-- followed by an optional <rest> -->
- <element name="rest">
- <ref name="collection.particle.decl"/>
- </element>
- </optional>
- </group>
- </choice>
- </interleave>
- </element>
- </optional>
- </interleave>
- </element>
- </define>
-
- <define name="collection.particle.decl">
- <attribute name="property"/>
- <optional>
- <ref name="collection.att"/>
- </optional>
- <optional>
- <attribute name="supertype"/>
- </optional>
- </define>
-
- <define name="collection.att">
- <attribute name="collection">
- <!-- CHANGE: array is removed and set,vector are added -->
- <choice>
- <value>list</value>
- <value>set</value>
- <value>vector</value>
- </choice>
- </attribute>
- </define>
-
-
-
- <!-- conversion declaration -->
- <define name="global.or.local.declaration" combine="choice">
- <element name="conversion">
- <attribute name="name" ref:key="conversion"/>
- <optional>
- <!-- defaults to @name -->
- <attribute name="type"/>
- </optional>
- <optional>
- <attribute name="parse" a:defaultValue="new"/>
- </optional>
- <optional>
- <attribute name="print" a:defaultValue="toString"/>
- </optional>
- <optional>
- <attribute name="whitespace" a:defaultValue="collapse">
- <choice>
- <value>preserve</value>
- <value>replace</value><!-- CHANGE: it was normalize -->
- <value>collapse</value>
- </choice>
- </attribute>
- </optional>
- </element>
- </define>
-
- <!-- element-value declaration -->
- <define name="toplevel.declaration" combine="choice">
- <element name="element">
- <attribute name="name"/>
- <attribute name="type">
- <value>value</value>
- </attribute>
- <optional>
- <attribute name="convert">
- <text ref:keyref="conversion"/>
- </attribute>
- </optional>
- </element>
- </define>
-
- <!-- interface declaration -->
- <define name="toplevel.declaration" combine="choice">
- <element name="interface">
- <attribute name="name">
- <ref name="java.classname.datatype"/>
- </attribute>
- <attribute name="members">
- <list>
- <oneOrMore>
- <ref name="java.classname.datatype"/>
- </oneOrMore>
- </list>
- </attribute>
- <!-- CHANGE: TODO: @properties is not supported yet -->
- </element>
- </define>
-
- <!-- enumeration declaration -->
- <define name="global.or.local.declaration" combine="choice">
- <element name="enumeration">
- <attribute name="name">
- <ref name="java.classname.datatype"/>
- </attribute>
- <attribute name="members">
- <list>
- <oneOrMore>
- <data type="token"/>
- </oneOrMore>
- </list>
- </attribute>
- </element>
- </define>
-
-
-
- <!-- valid Java name -->
- <define name="java.name.datatype">
- <!-- TODO: add pattern facet or implement a custom datatype -->
- <data type="token"/>
- </define>
-
- <define name="java.classname.datatype">
- <ref name="java.name.datatype"/>
- </define>
-</grammar>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/bindingfile.xsd b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/bindingfile.xsd
deleted file mode 100644
index 20a058f4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/bindingfile.xsd
+++ /dev/null
@@ -1,271 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<!--
- DTD binding information file which is supported by this version of XJC.
-
- - Changes from the EA1 is marked by "CHANGE:"
- - "ref:key" and "ref:keyref" are used to specify cross-reference
- information.
- - "a:defaultValue" is used to specify the default behavior.
- Note that default behaviors are hard-coded to the source code.
- Values specified in this schema is not used in the actual processing.
--->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
- <xs:import namespace="http://java.sun.com/xml/ns/jaxb/xjc" schemaLocation="xjc.xsd"/>
- <xs:element name="xml-java-binding-schema">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="options"/>
- <xs:element ref="xjc:serializable"/>
- <xs:element ref="xjc:superClass"/>
- <xs:element ref="xjc:noMarshaller"/>
- <xs:element ref="xjc:noUnmarshaller"/>
- <xs:element ref="xjc:noValidator"/>
- <xs:element ref="xjc:noValidatingUnmarshaller"/>
- <xs:choice>
- <xs:group ref="toplevel.declaration"/>
- <xs:element ref="global.or.local.declaration"/>
- </xs:choice>
- </xs:choice>
- <xs:attribute name="version">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="1.0ea2"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- <xs:element name="options">
- <xs:complexType>
- <xs:attribute name="package"/>
- </xs:complexType>
- </xs:element>
- <!-- element-class declaration -->
- <xs:group name="toplevel.declaration">
- <xs:choice>
- <xs:element name="element">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="attribute"/>
- <xs:element ref="global.or.local.declaration"/>
- <xs:element ref="constructor"/>
- <xs:element ref="content"/>
- </xs:choice>
- <xs:attribute name="name" use="required"/>
- <xs:attribute name="type" use="required">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="class"/>
- <xs:enumeration value="value"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="class" type="java.classname.datatype"/>
- <xs:attribute name="root">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="convert"/>
- </xs:complexType>
- </xs:element>
- <xs:element ref="interface"/>
- </xs:choice>
- </xs:group>
- <xs:element name="attribute">
- <xs:complexType>
- <xs:attribute name="name" use="required"/>
- <xs:attribute name="property"/>
- <xs:attribute name="collection">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="list"/>
- <xs:enumeration value="set"/>
- <xs:enumeration value="vector"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="convert"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="constructor">
- <xs:complexType>
- <xs:attribute name="properties" use="required">
- <xs:simpleType>
- <xs:restriction>
- <xs:simpleType>
- <xs:list itemType="xs:token"/>
- </xs:simpleType>
- <xs:minLength value="1"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- <xs:element name="content">
- <xs:complexType>
- <xs:sequence minOccurs="0">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="element-ref"/>
- <xs:choice>
- <xs:element ref="sequence"/>
- <xs:element ref="choice"/>
- </xs:choice>
- </xs:choice>
- <xs:element minOccurs="0" ref="rest"/>
- </xs:sequence>
- <xs:attribute name="property"/>
- <xs:attribute name="collection">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="list"/>
- <xs:enumeration value="set"/>
- <xs:enumeration value="vector"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="supertype"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="element-ref">
- <xs:complexType>
- <xs:attribute name="name" use="required"/>
- <xs:attribute name="property"/>
- <xs:attribute name="collection">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="list"/>
- <xs:enumeration value="set"/>
- <xs:enumeration value="vector"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- <xs:element name="sequence">
- <xs:complexType>
- <xs:attributeGroup ref="collection.particle.decl"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="choice">
- <xs:complexType>
- <xs:attributeGroup ref="collection.particle.decl"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="rest">
- <xs:complexType>
- <xs:attributeGroup ref="collection.particle.decl"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="interface">
- <xs:complexType>
- <xs:attribute name="name" use="required" type="java.classname.datatype"/>
- <xs:attribute name="members" use="required">
- <xs:simpleType>
- <xs:restriction>
- <xs:simpleType>
- <xs:list itemType="java.classname.datatype"/>
- </xs:simpleType>
- <xs:minLength value="1"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- <xs:attributeGroup name="collection.particle.decl">
- <xs:attribute name="property" use="required"/>
- <xs:attribute name="collection">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="list"/>
- <xs:enumeration value="set"/>
- <xs:enumeration value="vector"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="supertype"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="collection.att">
- <xs:attribute name="collection" use="required">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="list"/>
- <xs:enumeration value="set"/>
- <xs:enumeration value="vector"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:attributeGroup>
- <!-- conversion declaration -->
- <xs:element name="global.or.local.declaration" abstract="true"/>
- <xs:element name="conversion" substitutionGroup="global.or.local.declaration">
- <xs:complexType>
- <xs:attribute name="name" use="required"/>
- <xs:attribute name="type"/>
- <xs:attribute name="parse"/>
- <xs:attribute name="print"/>
- <xs:attribute name="whitespace">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="preserve"/>
- <xs:enumeration value="replace"/>
- <xs:enumeration value="collapse"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- <xs:element name="enumeration" substitutionGroup="global.or.local.declaration">
- <xs:complexType>
- <xs:attribute name="name" use="required" type="java.classname.datatype"/>
- <xs:attribute name="members" use="required">
- <xs:simpleType>
- <xs:restriction>
- <xs:simpleType>
- <xs:list itemType="xs:token"/>
- </xs:simpleType>
- <xs:minLength value="1"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- <!-- element-value declaration -->
- <!-- interface declaration -->
- <!-- enumeration declaration -->
- <!-- valid Java name -->
- <xs:simpleType name="java.name.datatype">
- <xs:restriction base="xs:token"/>
- </xs:simpleType>
- <xs:simpleType name="java.classname.datatype">
- <xs:restriction base="java.name.datatype"/>
- </xs:simpleType>
-</xs:schema>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package.html b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package.html
deleted file mode 100644
index 55eb6cf9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<body><p>Object Model that represents DTD binding information.</p></body>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/xjc.xsd b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/xjc.xsd
deleted file mode 100644
index 9ad55698..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/xjc.xsd
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://java.sun.com/xml/ns/jaxb/xjc" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
- <xs:import schemaLocation="bindingfile.xsd"/>
- <xs:element name="serializable">
- <xs:complexType>
- <xs:attribute name="uid" type="xs:long"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="superClass">
- <xs:complexType>
- <xs:attribute name="name" use="required"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="noMarshaller">
- <xs:complexType/>
- </xs:element>
- <xs:element name="noUnmarshaller">
- <xs:complexType/>
- </xs:element>
- <xs:element name="noValidator">
- <xs:complexType/>
- </xs:element>
- <xs:element name="noValidatingUnmarshaller">
- <xs:complexType/>
- </xs:element>
-</xs:schema>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Choice.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Choice.java
deleted file mode 100644
index 9e33a617..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Choice.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.gbind;
-
-/**
- * {@link Expression} that represents the union of two expressions "A|B".
- *
- * @author Kohsuke Kawaguchi
- */
-public final class Choice extends Expression {
- /**
- * "A" of "A|B".
- */
- private final Expression lhs;
- /**
- * "B" of "A|B".
- */
- private final Expression rhs;
- /**
- * Compute this value eagerly for better performance
- */
- private final boolean isNullable;
-
- public Choice(Expression lhs, Expression rhs) {
- this.lhs = lhs;
- this.rhs = rhs;
- this.isNullable = lhs.isNullable() || rhs.isNullable();
- }
-
- boolean isNullable() {
- return isNullable;
- }
-
- ElementSet lastSet() {
- return ElementSets.union(lhs.lastSet(),rhs.lastSet());
- }
-
- void buildDAG(ElementSet incoming) {
- lhs.buildDAG(incoming);
- rhs.buildDAG(incoming);
- }
-
- public String toString() {
- return '('+lhs.toString()+'|'+rhs.toString()+')';
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/ConnectedComponent.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/ConnectedComponent.java
deleted file mode 100644
index 03d7afd3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/ConnectedComponent.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.gbind;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Represents one strongly-connected component
- * of the {@link Element} graph.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class ConnectedComponent implements Iterable<Element> {
- /**
- * {@link Element}s that belong to this component.
- */
- private final List<Element> elements = new ArrayList<Element>();
-
- /*package*/ boolean isRequired;
-
- /**
- * Returns true iff this {@link ConnectedComponent}
- * can match a substring whose length is greater than 1.
- *
- * <p>
- * That means this property will become a collection property.
- */
- public final boolean isCollection() {
- assert !elements.isEmpty();
-
- // a strongly connected component by definition has a cycle,
- // so if its size is bigger than 1 there must be a cycle.
- if(elements.size()>1)
- return true;
-
- // if size is 1, it might be still forming a self-cycle
- Element n = elements.get(0);
- return n.hasSelfLoop();
- }
-
- /**
- * Returns true iff this {@link ConnectedComponent}
- * forms a cut set of a graph.
- *
- * <p>
- * That means any valid element sequence must have at least
- * one value for this property.
- */
- public final boolean isRequired() {
- return isRequired;
- }
-
- /*package*/void add(Element e) {
- assert !elements.contains(e);
- elements.add(e);
- }
-
- public Iterator<Element> iterator() {
- return elements.iterator();
- }
-
- /**
- * Just produces debug representation
- */
- public String toString() {
- String s = elements.toString();
- if(isRequired())
- s += '!';
- if(isCollection())
- s += '*';
- return s;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Element.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Element.java
deleted file mode 100644
index ff75c6e0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Element.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.gbind;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-
-/**
- * {@link Expression} that represents an alphabet of a regular language.
- *
- * <p>
- * Since this package is about a regular expression over element declarations,
- * this represents an XML element declaration (hence the name.)
- *
- * Element needs to be interned, meaning one {@link Element} per one tag name.
- *
- * <p>
- * Implements {@link ElementSet} to represent a self.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class Element extends Expression implements ElementSet {
- /**
- * Once we build a graph from {@link Expression},
- * we represent an edge e1 -> e2 by {@code e1.foreEdges.contains(e2)}
- * and {@code e2.backEdges.contains(e1)}.
- */
- final Set<Element> foreEdges = new LinkedHashSet<Element>();
- final Set<Element> backEdges = new LinkedHashSet<Element>();
-
- /**
- * Previous element in the DFS post-order traveral
- * of the element graph.
- *
- * <p>
- * We use {@code prevPostOrder==null} as a check if the element is visted in DFS,
- * so this chain terminates by a self-reference, not by having null.
- *
- * Set in {@link #assignDfsPostOrder(Element)}
- */
- /*package*/ Element prevPostOrder;
-
- /**
- * {@link ConnectedComponent} to which this element belongs.
- *
- * Set in {@link #buildStronglyConnectedComponents(List<ConnectedComponent>)}
- */
- private ConnectedComponent cc;
-
- protected Element() {
- }
-
- ElementSet lastSet() {
- return this;
- }
-
- boolean isNullable() {
- return false;
- }
-
- /**
- * True if this {@link Element} is {@link SourceNode}.
- */
- boolean isSource() {
- return false;
- }
-
- /**
- * True if this {@link Element} is {@link SinkNode}.
- */
- boolean isSink() {
- return false;
- }
-
- void buildDAG(ElementSet incoming) {
- incoming.addNext(this);
- }
-
- public void addNext(Element element) {
- foreEdges.add(element);
- element.backEdges.add(this);
- }
-
- public boolean contains(ElementSet rhs) {
- return this==rhs || rhs==ElementSet.EMPTY_SET;
- }
-
- /**
- * Just to satisfy the {@link ElementSet} contract.
- *
- * @deprecated
- * if you statically call this method, there's something wrong.
- */
- public Iterator<Element> iterator() {
- return Collections.singleton(this).iterator();
- }
-
- /**
- * Traverses the {@link Element} graph with DFS
- * and set {@link #prevPostOrder}.
- *
- * Should be first invoked on the source node of the graph.
- */
- /*package*/ Element assignDfsPostOrder(Element prev) {
- if(prevPostOrder!=null)
- return prev; // already visited
-
- prevPostOrder = this; // set a dummy value to prepare for cycles
-
- for (Element next : foreEdges) {
- prev = next.assignDfsPostOrder(prev);
- }
- this.prevPostOrder = prev; // set to the real value
- return this;
- }
-
- /**
- * Builds a set of strongly connected components and puts them
- * all into the given set.
- */
- public void buildStronglyConnectedComponents(List<ConnectedComponent> ccs) {
-
- // store visited elements - loop detection
- List<Element> visitedElements = new ArrayList<Element>();
-
- for(Element cur=this; cur!=cur.prevPostOrder; cur=cur.prevPostOrder) {
-
- if(visitedElements.contains(cur)) {
- // if I've already processed cur element, I'm in a loop
- break;
- } else {
- visitedElements.add(cur);
- }
-
- if(cur.belongsToSCC())
- continue;
-
- // start a new component
- ConnectedComponent cc = new ConnectedComponent();
- ccs.add(cc);
-
- cur.formConnectedComponent(cc);
- }
- }
-
- private boolean belongsToSCC() {
- return cc!=null || isSource() || isSink();
- }
-
- /**
- * Forms a strongly connected component by doing a reverse DFS.
- */
- private void formConnectedComponent(ConnectedComponent group) {
- if(belongsToSCC())
- return;
-
- this.cc=group;
- group.add(this);
- for (Element prev : backEdges)
- prev.formConnectedComponent(group);
- }
-
- public boolean hasSelfLoop() {
- // if foreEdges have a loop, backEdges must have one. Or vice versa
- assert foreEdges.contains(this)==backEdges.contains(this);
-
- return foreEdges.contains(this);
- }
-
- /**
- * Checks if the given {@link ConnectedComponent} forms a cut-set
- * of a graph.
- *
- * @param visited
- * Used to keep track of visited nodes.
- * @return
- * true if it is indeed a cut-set. false if not.
- */
- /*package*/ final boolean checkCutSet(ConnectedComponent cc, Set<Element> visited) {
- assert belongsToSCC(); // SCC discomposition must be done first
-
- if(isSink())
- // the definition of the cut set is that without those nodes
- // you can't reach from soruce to sink
- return false;
-
- if(!visited.add(this))
- return true;
-
- if(this.cc==cc)
- return true;
-
- for (Element next : foreEdges) {
- if(!next.checkCutSet(cc,visited))
- // we've found a path to the sink
- return false;
- }
-
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/ElementSet.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/ElementSet.java
deleted file mode 100644
index d2c85d85..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/ElementSet.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.gbind;
-
-import java.util.Collections;
-import java.util.Iterator;
-
-/**
- * A set over a list of {@link Element}.
- *
- * @author Kohsuke Kawaguchi
- */
-interface ElementSet extends Iterable<Element> {
- /**
- * For each element in this set, adds an edge to the given element.
- */
- void addNext(Element element);
-
- public static final ElementSet EMPTY_SET = new ElementSet() {
- public void addNext(Element element) {
- // noop
- }
-
- public boolean contains(ElementSet element) {
- return this==element;
- }
-
- public Iterator<Element> iterator() {
- return Collections.<Element>emptySet().iterator();
- }
- };
-
- /**
- * Doesn't have to be strict (it's OK for this method to return false
- * when it's actually true) since this is used just for optimization.
- *
- * (Erring on the other side is NG)
- */
- boolean contains(ElementSet rhs);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/ElementSets.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/ElementSets.java
deleted file mode 100644
index fedfdcdd..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/ElementSets.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.gbind;
-
-import java.util.LinkedHashSet;
-
-/**
- * Factory methods for {@link ElementSet}.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class ElementSets {
- /**
- * Returns an union of two {@link ElementSet}s.
- *
- * This method performs better if lhs is bigger than rhs
- */
- public static ElementSet union(ElementSet lhs, ElementSet rhs) {
- if(lhs.contains(rhs))
- return lhs;
- if(lhs==ElementSet.EMPTY_SET)
- return rhs;
- if(rhs==ElementSet.EMPTY_SET)
- return lhs;
- return new MultiValueSet(lhs,rhs);
- }
-
- /**
- * {@link ElementSet} that has multiple {@link Element}s in it.
- *
- * This isn't particularly efficient or anything, but it will do for now.
- */
- private static final class MultiValueSet extends LinkedHashSet<Element> implements ElementSet {
- public MultiValueSet(ElementSet lhs, ElementSet rhs) {
- addAll(lhs);
- addAll(rhs);
- // not that anything will break with size==1 MultiValueSet,
- // but it does suggest that we are missing an easy optimization
- assert size()>1;
- }
-
- private void addAll(ElementSet lhs) {
- if(lhs instanceof MultiValueSet) {
- super.addAll((MultiValueSet)lhs);
- } else {
- for (Element e : lhs)
- add(e);
- }
- }
-
- public boolean contains(ElementSet rhs) {
- // this isn't complete but sound
- return super.contains(rhs) || rhs==ElementSet.EMPTY_SET;
- }
-
- public void addNext(Element element) {
- for (Element e : this)
- e.addNext(element);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Expression.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Expression.java
deleted file mode 100644
index f9cc3f70..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Expression.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.gbind;
-
-import java.util.Set;
-
-/**
- * This builds content models.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class Expression {
-
- /**
- * Computes <tt>LAST(exp)</tt>
- */
- abstract ElementSet lastSet();
-
- /**
- * True of <tt>\epsilon \in L(exp)</tt>
- */
- abstract boolean isNullable();
-
- /**
- * Builds up a DAG among {@link Element}s in this expression.
- */
- abstract void buildDAG(ElementSet incoming);
-
- /**
- * {@link Expression} that represents epsilon, the length-0 string.
- */
- public static final Expression EPSILON = new Expression() {
- ElementSet lastSet() {
- return ElementSet.EMPTY_SET;
- }
-
- boolean isNullable() {
- return true;
- }
-
- void buildDAG(ElementSet incoming) {
- // noop
- }
-
- public String toString() {
- return "-";
- }
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Graph.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Graph.java
deleted file mode 100644
index 2ea459ad..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Graph.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.gbind;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Graph of {@link Element}s.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class Graph implements Iterable<ConnectedComponent> {
- private final Element source = new SourceNode();
- private final Element sink = new SinkNode();
-
- /**
- * Strongly connected components of this graph.
- */
- private final List<ConnectedComponent> ccs = new ArrayList<ConnectedComponent>();
-
- /**
- * Builds a {@link Graph} from an {@link Expression} tree.
- *
- * {@link Expression} given to the graph will be modified forever,
- * and it will not be able to create another {@link Graph}.
- */
- public Graph(Expression body) {
- // attach source and sink
- Expression whole = new Sequence(new Sequence(source,body),sink);
-
- // build up a graph
- whole.buildDAG(ElementSet.EMPTY_SET);
-
- // decompose into strongly connected components.
- // the algorithm is standard DFS-based algorithm,
- // one illustration of this algorithm is available at
- // http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/strongComponent.htm
- source.assignDfsPostOrder(sink);
- source.buildStronglyConnectedComponents(ccs);
-
- // cut-set check
- Set<Element> visited = new HashSet<Element>();
- for (ConnectedComponent cc : ccs) {
- visited.clear();
- if(source.checkCutSet(cc,visited)) {
- cc.isRequired = true;
- }
- }
- }
-
- /**
- * List up {@link ConnectedComponent}s of this graph in an order.
- */
- public Iterator<ConnectedComponent> iterator() {
- return ccs.iterator();
- }
-
- public String toString() {
- return ccs.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/OneOrMore.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/OneOrMore.java
deleted file mode 100644
index 85113a09..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/OneOrMore.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.gbind;
-
-/**
- * {@link Expression} that represents kleene-star operation (A+)
- *
- * @author Kohsuke Kawaguchi
- */
-public final class OneOrMore extends Expression {
- /**
- * 'A' of 'A+'.
- */
- private final Expression child;
-
- public OneOrMore(Expression child) {
- this.child = child;
- }
-
- ElementSet lastSet() {
- return child.lastSet();
- }
-
- boolean isNullable() {
- return child.isNullable();
- }
-
- void buildDAG(ElementSet incoming) {
- child.buildDAG(ElementSets.union(incoming,child.lastSet()));
- }
-
- public String toString() {
- return child.toString()+'+';
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Sequence.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Sequence.java
deleted file mode 100644
index 1763ba22..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/Sequence.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.gbind;
-
-/**
- * {@link Expression} that represents a concatanation of two expressions
- * "A,B".
- *
- * @author Kohsuke Kawaguchi
- */
-public final class Sequence extends Expression {
- /**
- * 'A' of 'A,B'
- */
- private final Expression lhs;
- /**
- * 'B' of 'A,B'
- */
- private final Expression rhs;
- /**
- * Compute this value eagerly for better performance
- */
- private final boolean isNullable;
-
- /**
- * Cached value of {@link #lastSet()} for better performance.
- * Sequence tends to be where the recursive lastSet computation occurs.
- */
- private ElementSet lastSet;
-
- public Sequence(Expression lhs, Expression rhs) {
- this.lhs = lhs;
- this.rhs = rhs;
- isNullable = lhs.isNullable() && rhs.isNullable();
- }
-
- ElementSet lastSet() {
- if(lastSet==null) {
- if(rhs.isNullable())
- lastSet = ElementSets.union(lhs.lastSet(),rhs.lastSet());
- else
- lastSet = rhs.lastSet();
- }
- return lastSet;
- }
-
- boolean isNullable() {
- return isNullable;
- }
-
- void buildDAG(ElementSet incoming) {
- lhs.buildDAG(incoming);
- if(lhs.isNullable())
- rhs.buildDAG(ElementSets.union(incoming,lhs.lastSet()));
- else
- rhs.buildDAG(lhs.lastSet());
- }
-
- public String toString() {
- return '('+lhs.toString()+','+rhs.toString()+')';
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/SinkNode.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/SinkNode.java
deleted file mode 100644
index fa9946c9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/SinkNode.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.gbind;
-
-/**
- * Sink node of a grpah.
- * @author Kohsuke Kawaguchi
- */
-public final class SinkNode extends Element {
- public String toString() {
- return "#sink";
- }
-
- @Override
- boolean isSink() {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/SourceNode.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/SourceNode.java
deleted file mode 100644
index a5b9bbc9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/SourceNode.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.gbind;
-
-/**
- * Source node of a graph.
- * @author Kohsuke Kawaguchi
- */
-public final class SourceNode extends Element {
- public String toString() {
- return "#source";
- }
-
- @Override
- boolean isSource() {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/package.html b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/package.html
deleted file mode 100644
index b2911987..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/gbind/package.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-
-
-<body>
- Binary expressions are left-associative. IOW, ((A,B),C) instead of (A,(B,C))
-</body>
-</html>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/AbstractReferenceFinderImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/AbstractReferenceFinderImpl.java
deleted file mode 100644
index f0ec687b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/AbstractReferenceFinderImpl.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.internalizer;
-
-import com.sun.istack.internal.SAXParseException2;
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-/**
- * XMLFilter that finds references to other schema files from
- * SAX events.
- * <p/>
- * This implementation is a base implementation for typical case
- * where we just need to look for a particular attribute which
- * contains an URL to another schema file.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class AbstractReferenceFinderImpl extends XMLFilterImpl {
-
- protected final DOMForest parent;
-
- protected AbstractReferenceFinderImpl(DOMForest _parent) {
- this.parent = _parent;
- }
-
- /**
- * IF the given element contains a reference to an external resource,
- * return its URL.
- *
- * @param nsURI Namespace URI of the current element
- * @param localName Local name of the current element
- * @return It's OK to return a relative URL.
- */
- protected abstract String findExternalResource(String nsURI, String localName, Attributes atts);
-
- @Override
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
- throws SAXException {
- super.startElement(namespaceURI, localName, qName, atts);
-
- String relativeRef = findExternalResource(namespaceURI, localName, atts);
- if (relativeRef == null) {
- return; // not found
- }
- try {
- // absolutize URL.
- String lsi = locator.getSystemId();
- String ref;
- URI relRefURI = new URI(relativeRef);
- if (relRefURI.isAbsolute())
- ref = relativeRef;
- else {
- if (lsi.startsWith("jar:")) {
- int bangIdx = lsi.indexOf('!');
- if (bangIdx > 0) {
- ref = lsi.substring(0, bangIdx + 1)
- + new URI(lsi.substring(bangIdx + 1)).resolve(new URI(relativeRef)).toString();
- } else {
- ref = relativeRef;
- }
- } else {
- ref = new URI(lsi).resolve(new URI(relativeRef)).toString();
- }
- }
-
- // then parse this schema as well,
- // but don't mark this document as a root.
- if (parent != null) { // this is there to allow easier testing
- parent.parse(ref, false);
- }
- } catch (URISyntaxException e) {
- String msg = e.getMessage();
- if (new File(relativeRef).exists()) {
- msg = Messages.format(Messages.ERR_FILENAME_IS_NOT_URI) + ' ' + msg;
- }
-
- SAXParseException spe = new SAXParseException2(
- Messages.format(Messages.ERR_UNABLE_TO_PARSE, relativeRef, msg),
- locator, e);
-
- fatalError(spe);
- throw spe;
- } catch (IOException e) {
- SAXParseException spe = new SAXParseException2(
- Messages.format(Messages.ERR_UNABLE_TO_PARSE, relativeRef, e.getMessage()),
- locator, e);
-
- fatalError(spe);
- throw spe;
- }
- }
-
- private Locator locator;
-
- @Override
- public void setDocumentLocator(Locator locator) {
- super.setDocumentLocator(locator);
- this.locator = locator;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContentHandlerNamespacePrefixAdapter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContentHandlerNamespacePrefixAdapter.java
deleted file mode 100644
index eaa805fa..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContentHandlerNamespacePrefixAdapter.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.internalizer;
-
-import javax.xml.XMLConstants;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.AttributesImpl;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * {@link XMLReader} filter for supporting
- * <tt>http://xml.org/sax/features/namespace-prefixes</tt> feature.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ContentHandlerNamespacePrefixAdapter extends XMLFilterImpl {
- /**
- * True if <tt>http://xml.org/sax/features/namespace-prefixes</tt> is set to true.
- */
- private boolean namespacePrefixes = false;
-
- private String[] nsBinding = new String[8];
- private int len;
-
- public ContentHandlerNamespacePrefixAdapter() {
- }
-
- public ContentHandlerNamespacePrefixAdapter(XMLReader parent) {
- setParent(parent);
- }
-
- @Override
- public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
- if(name.equals(PREFIX_FEATURE))
- return namespacePrefixes;
- return super.getFeature(name);
- }
-
- @Override
- public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
- if(name.equals(PREFIX_FEATURE)) {
- this.namespacePrefixes = value;
- return;
- }
- if(name.equals(NAMESPACE_FEATURE) && value)
- return;
- super.setFeature(name, value);
- }
-
-
- @Override
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
- if (XMLConstants.XML_NS_URI.equals(uri)) return; //xml prefix shall not be declared based on jdk api javadoc
- if(len==nsBinding.length) {
- // reallocate
- String[] buf = new String[nsBinding.length*2];
- System.arraycopy(nsBinding,0,buf,0,nsBinding.length);
- nsBinding = buf;
- }
- nsBinding[len++] = prefix;
- nsBinding[len++] = uri;
- super.startPrefixMapping(prefix,uri);
- }
-
- @Override
- public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
- if(namespacePrefixes) {
- this.atts.setAttributes(atts);
- // add namespace bindings back as attributes
- for( int i=0; i<len; i+=2 ) {
- String prefix = nsBinding[i];
- if(prefix.length()==0)
- this.atts.addAttribute(XMLConstants.XML_NS_URI,"xmlns","xmlns","CDATA",nsBinding[i+1]);
- else
- this.atts.addAttribute(XMLConstants.XML_NS_URI,prefix,"xmlns:"+prefix,"CDATA",nsBinding[i+1]);
- }
- atts = this.atts;
- }
- len=0;
- super.startElement(uri, localName, qName, atts);
- }
-
- private final AttributesImpl atts = new AttributesImpl();
-
- private static final String PREFIX_FEATURE = "http://xml.org/sax/features/namespace-prefixes";
- private static final String NAMESPACE_FEATURE = "http://xml.org/sax/features/namespaces";
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.java
deleted file mode 100644
index f1331485..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.xjc.reader.internalizer;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-import java.util.WeakHashMap;
-
-/**
- * Simple utility ensuring that the value is cached only in case it is non-internal implementation
- */
-abstract class ContextClassloaderLocal<V> {
-
- private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
-
- private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<ClassLoader, V>();
-
- public V get() throws Error {
- ClassLoader tccl = getContextClassLoader();
- V instance = CACHE.get(tccl);
- if (instance == null) {
- instance = createNewInstance();
- CACHE.put(tccl, instance);
- }
- return instance;
- }
-
- public void set(V instance) {
- CACHE.put(getContextClassLoader(), instance);
- }
-
- protected abstract V initialValue() throws Exception;
-
- private V createNewInstance() {
- try {
- return initialValue();
- } catch (Exception e) {
- throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e);
- }
- }
-
- private static String format(String property, Object... args) {
- String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property);
- return MessageFormat.format(text, args);
- }
-
- private static ClassLoader getContextClassLoader() {
- return (ClassLoader)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- ClassLoader cl = null;
- try {
- cl = Thread.currentThread().getContextClassLoader();
- } catch (SecurityException ex) {
- }
- return cl;
- }
- });
- }
-}
-
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.properties
deleted file mode 100644
index 1a8fc17a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/ContextClassloaderLocal.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-# Error messages for ContextClassloaderLocal utility class
-FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0}
-
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMBuilder.java
deleted file mode 100644
index a4bb1fc5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMBuilder.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.internalizer;
-
-import java.util.Set;
-
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.xml.internal.bind.marshaller.SAX2DOMEx;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-
-/**
- * Builds DOM while keeping the location information.
- *
- * <p>
- * This class also looks for outer most &lt;jaxb:bindings>
- * customizations.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-class DOMBuilder extends SAX2DOMEx {
- /**
- * Grows a DOM tree under the given document, and
- * stores location information to the given table.
- *
- * @param outerMostBindings
- * This set will receive newly found outermost
- * jaxb:bindings customizations.
- */
- public DOMBuilder( Document dom, LocatorTable ltable, Set outerMostBindings ) {
- super( dom );
- this.locatorTable = ltable;
- this.outerMostBindings = outerMostBindings;
- }
-
- /** Location information will be stored into this object. */
- private final LocatorTable locatorTable;
-
- private final Set outerMostBindings;
-
- private Locator locator;
-
- public void setDocumentLocator(Locator locator) {
- this.locator = locator;
- super.setDocumentLocator(locator);
- }
-
-
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts) {
- super.startElement(namespaceURI, localName, qName, atts);
-
- Element e = getCurrentElement();
- locatorTable.storeStartLocation( e, locator );
-
- // check if this element is an outer-most <jaxb:bindings>
- if( Const.JAXB_NSURI.equals(e.getNamespaceURI())
- && "bindings".equals(e.getLocalName()) ) {
-
- // if this is the root node (meaning that this file is an
- // external binding file) or if the parent is XML Schema element
- // (meaning that this is an "inlined" external binding)
- Node p = e.getParentNode();
- if( p instanceof Document
- ||( p instanceof Element && !e.getNamespaceURI().equals(p.getNamespaceURI()))) {
- outerMostBindings.add(e); // remember this value
- }
- }
- }
-
- public void endElement(String namespaceURI, String localName, String qName) {
- locatorTable.storeEndLocation( getCurrentElement(), locator );
- super.endElement(namespaceURI, localName, qName);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java
deleted file mode 100644
index bea319e5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java
+++ /dev/null
@@ -1,574 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.xjc.reader.internalizer;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.XMLStreamReaderToContentHandler;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.tools.internal.xjc.util.ErrorReceiverFilter;
-import com.sun.xml.internal.bind.marshaller.DataWriter;
-import com.sun.xml.internal.bind.v2.util.XmlFactory;
-import com.sun.xml.internal.xsom.parser.JAXPParser;
-import com.sun.xml.internal.xsom.parser.XMLParser;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.*;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.sax.SAXResult;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.validation.SchemaFactory;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.util.*;
-
-import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowExternalAccess;
-import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI;
-
-
-/**
- * Builds a DOM forest and maintains association from
- * system IDs to DOM trees.
- *
- * <p>
- * A forest is a transitive reflexive closure of referenced documents.
- * IOW, if a document is in a forest, all the documents referenced from
- * it is in a forest, too. To support this semantics, {@link DOMForest}
- * uses {@link InternalizationLogic} to find referenced documents.
- *
- * <p>
- * Some documents are marked as "root"s, meaning those documents were
- * put into a forest explicitly, not because it is referenced from another
- * document. (However, a root document can be referenced from other
- * documents, too.)
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class DOMForest {
- /** actual data storage map&lt;SystemId,Document>. */
- private final Map<String,Document> core = new HashMap<String,Document>();
-
- /**
- * To correctly feed documents to a schema parser, we need to remember
- * which documents (of the forest) were given as the root
- * documents, and which of them are read as included/imported
- * documents.
- *
- * <p>
- * Set of system ids as strings.
- */
- private final Set<String> rootDocuments = new HashSet<String>();
-
- /** Stores location information for all the trees in this forest. */
- public final LocatorTable locatorTable = new LocatorTable();
-
- /** Stores all the outer-most &lt;jaxb:bindings> customizations. */
- public final Set<Element> outerMostBindings = new HashSet<Element>();
-
- /** Used to resolve references to other schema documents. */
- private EntityResolver entityResolver = null;
-
- /** Errors encountered during the parsing will be sent to this object. */
- private ErrorReceiver errorReceiver = null;
-
- /** Schema language dependent part of the processing. */
- protected final InternalizationLogic logic;
-
- private final SAXParserFactory parserFactory;
- private final DocumentBuilder documentBuilder;
-
- private final Options options;
-
- public DOMForest(
- SAXParserFactory parserFactory, DocumentBuilder documentBuilder,
- InternalizationLogic logic ) {
-
- this.parserFactory = parserFactory;
- this.documentBuilder = documentBuilder;
- this.logic = logic;
- this.options = null;
- }
-
- public DOMForest( InternalizationLogic logic, Options opt ) {
-
- if (opt == null) throw new AssertionError("Options object null");
- this.options = opt;
-
- try {
- DocumentBuilderFactory dbf = XmlFactory.createDocumentBuilderFactory(opt.disableXmlSecurity);
- this.documentBuilder = dbf.newDocumentBuilder();
- this.parserFactory = XmlFactory.createParserFactory(opt.disableXmlSecurity);
- } catch( ParserConfigurationException e ) {
- throw new AssertionError(e);
- }
-
- this.logic = logic;
- }
-
- /**
- * Gets the DOM tree associated with the specified system ID,
- * or null if none is found.
- */
- public Document get( String systemId ) {
- Document doc = core.get(systemId);
-
- if( doc==null && systemId.startsWith("file:/") && !systemId.startsWith("file://") ) {
- // As of JDK1.4, java.net.URL.toExternal method returns URLs like
- // "file:/abc/def/ghi" which is an incorrect file protocol URL according to RFC1738.
- // Some other correctly functioning parts return the correct URLs ("file:///abc/def/ghi"),
- // and this descripancy breaks DOM look up by system ID.
-
- // this extra check solves this problem.
- doc = core.get( "file://"+systemId.substring(5) );
- }
-
- if( doc==null && systemId.startsWith("file:") ) {
- // on Windows, filenames are case insensitive.
- // perform case-insensitive search for improved user experience
- String systemPath = getPath(systemId);
- for (String key : core.keySet()) {
- if(key.startsWith("file:") && getPath(key).equalsIgnoreCase(systemPath)) {
- doc = core.get(key);
- break;
- }
- }
- }
-
- return doc;
- }
-
- /**
- * Strips off the leading 'file:///' portion from an URL.
- */
- private String getPath(String key) {
- key = key.substring(5); // skip 'file:'
- while(key.length()>0 && key.charAt(0)=='/') {
- key = key.substring(1);
- }
- return key;
- }
-
- /**
- * Returns a read-only set of root document system IDs.
- */
- public Set<String> getRootDocuments() {
- return Collections.unmodifiableSet(rootDocuments);
- }
-
- /**
- * Picks one document at random and returns it.
- */
- public Document getOneDocument() {
- for (Document dom : core.values()) {
- if (!dom.getDocumentElement().getNamespaceURI().equals(Const.JAXB_NSURI))
- return dom;
- }
- // we should have caught this error very early on
- throw new AssertionError();
- }
-
- /**
- * Checks the correctness of the XML Schema documents and return true
- * if it's OK.
- *
- * <p>
- * This method performs a weaker version of the tests where error messages
- * are provided without line number information. So whenever possible
- * use {@link SchemaConstraintChecker}.
- *
- * @see SchemaConstraintChecker
- */
- public boolean checkSchemaCorrectness(ErrorReceiver errorHandler) {
- try {
- boolean disableXmlSecurity = false;
- if (options != null) {
- disableXmlSecurity = options.disableXmlSecurity;
- }
- SchemaFactory sf = XmlFactory.createSchemaFactory(W3C_XML_SCHEMA_NS_URI, disableXmlSecurity);
- ErrorReceiverFilter filter = new ErrorReceiverFilter(errorHandler);
- sf.setErrorHandler(filter);
- Set<String> roots = getRootDocuments();
- Source[] sources = new Source[roots.size()];
- int i=0;
- for (String root : roots) {
- sources[i++] = new DOMSource(get(root),root);
- }
- sf.newSchema(sources);
- return !filter.hadError();
- } catch (SAXException e) {
- // the errors should have been reported
- return false;
- }
- }
-
- /**
- * Gets the system ID from which the given DOM is parsed.
- * <p>
- * Poor-man's base URI.
- */
- public String getSystemId( Document dom ) {
- for (Map.Entry<String,Document> e : core.entrySet()) {
- if (e.getValue() == dom)
- return e.getKey();
- }
- return null;
- }
-
- public Document parse( InputSource source, boolean root ) throws SAXException {
- if( source.getSystemId()==null )
- throw new IllegalArgumentException();
-
- return parse( source.getSystemId(), source, root );
- }
-
- /**
- * Parses an XML at the given location (
- * and XMLs referenced by it) into DOM trees
- * and stores them to this forest.
- *
- * @return the parsed DOM document object.
- */
- public Document parse( String systemId, boolean root ) throws SAXException, IOException {
-
- systemId = Options.normalizeSystemId(systemId);
-
- if( core.containsKey(systemId) )
- // this document has already been parsed. Just ignore.
- return core.get(systemId);
-
- InputSource is=null;
-
- // allow entity resolver to find the actual byte stream.
- if( entityResolver!=null )
- is = entityResolver.resolveEntity(null,systemId);
- if( is==null )
- is = new InputSource(systemId);
-
- // but we still use the original system Id as the key.
- return parse( systemId, is, root );
- }
-
- /**
- * Returns a {@link ContentHandler} to feed SAX events into.
- *
- * <p>
- * The client of this class can feed SAX events into the handler
- * to parse a document into this DOM forest.
- *
- * This version requires that the DOM object to be created and registered
- * to the map beforehand.
- */
- private ContentHandler getParserHandler( Document dom ) {
- ContentHandler handler = new DOMBuilder(dom,locatorTable,outerMostBindings);
- handler = new WhitespaceStripper(handler,errorReceiver,entityResolver);
- handler = new VersionChecker(handler,errorReceiver,entityResolver);
-
- // insert the reference finder so that
- // included/imported schemas will be also parsed
- XMLFilterImpl f = logic.createExternalReferenceFinder(this);
- f.setContentHandler(handler);
-
- if(errorReceiver!=null)
- f.setErrorHandler(errorReceiver);
- if(entityResolver!=null)
- f.setEntityResolver(entityResolver);
-
- return f;
- }
-
- public interface Handler extends ContentHandler {
- /**
- * Gets the DOM that was built.
- */
- public Document getDocument();
- }
-
- private static abstract class HandlerImpl extends XMLFilterImpl implements Handler {
- }
-
- /**
- * Returns a {@link ContentHandler} to feed SAX events into.
- *
- * <p>
- * The client of this class can feed SAX events into the handler
- * to parse a document into this DOM forest.
- */
- public Handler getParserHandler( String systemId, boolean root ) {
- final Document dom = documentBuilder.newDocument();
- core.put( systemId, dom );
- if(root)
- rootDocuments.add(systemId);
-
- ContentHandler handler = getParserHandler(dom);
-
- // we will register the DOM to the map once the system ID becomes available.
- // but the SAX allows the event source to not to provide that information,
- // so be prepared for such case.
- HandlerImpl x = new HandlerImpl() {
- public Document getDocument() {
- return dom;
- }
- };
- x.setContentHandler(handler);
-
- return x;
- }
-
- /**
- * Parses the given document and add it to the DOM forest.
- *
- * @return
- * null if there was a parse error. otherwise non-null.
- */
- public Document parse( String systemId, InputSource inputSource, boolean root ) throws SAXException {
- Document dom = documentBuilder.newDocument();
-
- systemId = Options.normalizeSystemId(systemId);
-
- // put into the map before growing a tree, to
- // prevent recursive reference from causing infinite loop.
- core.put( systemId, dom );
- if(root)
- rootDocuments.add(systemId);
-
- try {
- XMLReader reader = parserFactory.newSAXParser().getXMLReader();
- reader.setContentHandler(getParserHandler(dom));
- if(errorReceiver!=null)
- reader.setErrorHandler(errorReceiver);
- if(entityResolver!=null)
- reader.setEntityResolver(entityResolver);
- reader.parse(inputSource);
- } catch( ParserConfigurationException e ) {
- // in practice, this exception won't happen.
- errorReceiver.error(e.getMessage(),e);
- core.remove(systemId);
- rootDocuments.remove(systemId);
- return null;
- } catch( IOException e ) {
- errorReceiver.error(Messages.format(Messages.DOMFOREST_INPUTSOURCE_IOEXCEPTION, systemId, e.toString()),e);
- core.remove(systemId);
- rootDocuments.remove(systemId);
- return null;
- }
-
- return dom;
- }
-
- public Document parse( String systemId, XMLStreamReader parser, boolean root ) throws XMLStreamException {
- Document dom = documentBuilder.newDocument();
-
- systemId = Options.normalizeSystemId(systemId);
-
- if(root)
- rootDocuments.add(systemId);
-
- if(systemId==null)
- throw new IllegalArgumentException("system id cannot be null");
- core.put( systemId, dom );
-
- new XMLStreamReaderToContentHandler(parser,getParserHandler(dom),false,false).bridge();
-
- return dom;
- }
-
- /**
- * Performs internalization.
- *
- * This method should be called only once, only after all the
- * schemas are parsed.
- *
- * @return
- * the returned bindings need to be applied after schema
- * components are built.
- */
- public SCDBasedBindingSet transform(boolean enableSCD) {
- return Internalizer.transform(this, enableSCD, options.disableXmlSecurity);
- }
-
- /**
- * Performs the schema correctness check by using JAXP 1.3.
- *
- * <p>
- * This is "weak", because {@link SchemaFactory#newSchema(Source[])}
- * doesn't handle inclusions very correctly (it ends up parsing it
- * from its original source, not in this tree), and because
- * it doesn't handle two documents for the same namespace very
- * well.
- *
- * <p>
- * We should eventually fix JAXP (and Xerces), but meanwhile
- * this weaker and potentially wrong correctness check is still
- * better than nothing when used inside JAX-WS (JAXB CLI and Ant
- * does a better job of checking this.)
- *
- * <p>
- * To receive errors, use {@link SchemaFactory#setErrorHandler(ErrorHandler)}.
- */
- public void weakSchemaCorrectnessCheck(SchemaFactory sf) {
- List<SAXSource> sources = new ArrayList<SAXSource>();
- for( String systemId : getRootDocuments() ) {
- Document dom = get(systemId);
- if (dom.getDocumentElement().getNamespaceURI().equals(Const.JAXB_NSURI))
- continue; // this isn't a schema. we have to do a negative check because if we see completely unrelated ns, we want to report that as an error
-
- SAXSource ss = createSAXSource(systemId);
- try {
- ss.getXMLReader().setFeature("http://xml.org/sax/features/namespace-prefixes",true);
- } catch (SAXException e) {
- throw new AssertionError(e); // Xerces wants this. See 6395322.
- }
- sources.add(ss);
- }
-
- try {
- allowExternalAccess(sf, "file,http", options.disableXmlSecurity).newSchema(sources.toArray(new SAXSource[0]));
- } catch (SAXException e) {
- // error should have been reported.
- } catch (RuntimeException re) {
- // JAXP RI isn't very trustworthy when it comes to schema error check,
- // and we know some cases where it just dies with NPE. So handle it gracefully.
- // this masks a bug in the JAXP RI, but we need a release that we have to make.
- try {
- sf.getErrorHandler().warning(
- new SAXParseException(Messages.format(
- Messages.ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR,re.getMessage()),
- null,null,-1,-1,re));
- } catch (SAXException e) {
- // ignore
- }
- }
- }
-
- /**
- * Creates a {@link SAXSource} that, when parsed, reads from this {@link DOMForest}
- * (instead of parsing the original source identified by the system ID.)
- */
- public @NotNull SAXSource createSAXSource(String systemId) {
- ContentHandlerNamespacePrefixAdapter reader = new ContentHandlerNamespacePrefixAdapter(new XMLFilterImpl() {
- // XMLReader that uses XMLParser to parse. We need to use XMLFilter to indrect
- // handlers, since SAX allows handlers to be changed while parsing.
- @Override
- public void parse(InputSource input) throws SAXException, IOException {
- createParser().parse(input, this, this, this);
- }
-
- @Override
- public void parse(String systemId) throws SAXException, IOException {
- parse(new InputSource(systemId));
- }
- });
-
- return new SAXSource(reader,new InputSource(systemId));
- }
-
- /**
- * Creates {@link XMLParser} for XSOM which reads documents from
- * this DOMForest rather than doing a fresh parse.
- *
- * The net effect is that XSOM will read transformed XML Schemas
- * instead of the original documents.
- */
- public XMLParser createParser() {
- return new DOMForestParser(this, new JAXPParser(XmlFactory.createParserFactory(options.disableXmlSecurity)));
- }
-
- public EntityResolver getEntityResolver() {
- return entityResolver;
- }
-
- public void setEntityResolver(EntityResolver entityResolver) {
- this.entityResolver = entityResolver;
- }
-
- public ErrorReceiver getErrorHandler() {
- return errorReceiver;
- }
-
- public void setErrorHandler(ErrorReceiver errorHandler) {
- this.errorReceiver = errorHandler;
- }
-
- /**
- * Gets all the parsed documents.
- */
- public Document[] listDocuments() {
- return core.values().toArray(new Document[core.size()]);
- }
-
- /**
- * Gets all the system IDs of the documents.
- */
- public String[] listSystemIDs() {
- return core.keySet().toArray(new String[core.keySet().size()]);
- }
-
- /**
- * Dumps the contents of the forest to the specified stream.
- *
- * This is a debug method. As such, error handling is sloppy.
- */
- @SuppressWarnings("CallToThreadDumpStack")
- public void dump( OutputStream out ) throws IOException {
- try {
- // create identity transformer
- boolean disableXmlSecurity = false;
- if (options != null) {
- disableXmlSecurity = options.disableXmlSecurity;
- }
- TransformerFactory tf = XmlFactory.createTransformerFactory(disableXmlSecurity);
- Transformer it = tf.newTransformer();
-
- for (Map.Entry<String, Document> e : core.entrySet()) {
- out.write( ("---<< "+e.getKey()+'\n').getBytes() );
-
- DataWriter dw = new DataWriter(new OutputStreamWriter(out),null);
- dw.setIndentStep(" ");
- it.transform( new DOMSource(e.getValue()),
- new SAXResult(dw));
-
- out.write( "\n\n\n".getBytes() );
- }
- } catch( TransformerException e ) {
- e.printStackTrace();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForestParser.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForestParser.java
deleted file mode 100644
index 8c66e347..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForestParser.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.internalizer;
-
-import java.io.IOException;
-
-import com.sun.xml.internal.xsom.parser.XMLParser;
-
-import org.w3c.dom.Document;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-
-/**
- * {@link XMLParser} implementation that
- * parses XML from a DOM forest instead of parsing it from
- * its original location.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-class DOMForestParser implements XMLParser {
-
- /** DOM forest to be "parsed". */
- private final DOMForest forest;
-
- /** Scanner object will do the actual SAX events generation. */
- private final DOMForestScanner scanner;
-
- private final XMLParser fallbackParser;
-
- /**
- * @param fallbackParser
- * This parser will be used when DOMForestParser needs to parse
- * documents that are not in the forest.
- */
- DOMForestParser( DOMForest forest, XMLParser fallbackParser ) {
- this.forest = forest;
- this.scanner = new DOMForestScanner(forest);
- this.fallbackParser = fallbackParser;
- }
-
- public void parse(
- InputSource source,
- ContentHandler contentHandler,
- ErrorHandler errorHandler,
- EntityResolver entityResolver )
- throws SAXException, IOException {
-
- String systemId = source.getSystemId();
- Document dom = forest.get(systemId);
-
- if(dom==null) {
- // if no DOM tree is built for it,
- // let the fall back parser parse the original document.
- //
- // for example, XSOM parses datatypes.xsd (XML Schema part 2)
- // but this will never be built into the forest.
- fallbackParser.parse( source, contentHandler, errorHandler, entityResolver );
- return;
- }
-
- scanner.scan( dom, contentHandler );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForestScanner.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForestScanner.java
deleted file mode 100644
index ecf6431e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForestScanner.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.internalizer;
-
-import com.sun.xml.internal.bind.unmarshaller.DOMScanner;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * Produces a complete series of SAX events from any DOM node
- * in the DOMForest.
- *
- * <p>
- * This class hides a logic of re-associating {@link Locator}
- * to the generated SAX event stream.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class DOMForestScanner {
-
- private final DOMForest forest;
-
- /**
- * Scans DOM nodes of the given forest.
- *
- * DOM node parameters to the scan method must be a part of
- * this forest.
- */
- public DOMForestScanner( DOMForest _forest ) {
- this.forest = _forest;
- }
-
- /**
- * Generates the whole set of SAX events by treating
- * element e as if it's a root element.
- */
- public void scan( Element e, ContentHandler contentHandler ) throws SAXException {
- DOMScanner scanner = new DOMScanner();
-
- // insert the location resolver into the pipe line
- LocationResolver resolver = new LocationResolver(scanner);
- resolver.setContentHandler(contentHandler);
-
- // parse this DOM.
- scanner.setContentHandler(resolver);
- scanner.scan(e);
- }
-
- /**
- * Generates the whole set of SAX events from the given Document
- * in the DOMForest.
- */
- public void scan( Document d, ContentHandler contentHandler ) throws SAXException {
- scan( d.getDocumentElement(), contentHandler );
- }
-
- /**
- * Intercepts the invocation of the setDocumentLocator method
- * and passes itself as the locator.
- *
- * If the client calls one of the methods on the Locator interface,
- * use the LocatorTable to resolve the source location.
- */
- private class LocationResolver extends XMLFilterImpl implements Locator {
- LocationResolver( DOMScanner _parent ) {
- this.parent = _parent;
- }
-
- private final DOMScanner parent;
-
- /**
- * Flag that tells us whether we are processing a start element event
- * or an end element event.
- *
- * DOMScanner's getCurrentLocation method doesn't tell us which, but
- * this information is necessary to return the correct source line information.
- *
- * Thus we set this flag appropriately before we pass an event to
- * the next ContentHandler, thereby making it possible to figure
- * out which location to return.
- */
- private boolean inStart = false;
-
- @Override
- public void setDocumentLocator(Locator locator) {
- // ignore one set by the parent.
-
- super.setDocumentLocator(this);
- }
-
- @Override
- public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
- inStart = false;
- super.endElement(namespaceURI, localName, qName);
- }
-
- @Override
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
- throws SAXException {
- inStart = true;
- super.startElement(namespaceURI, localName, qName, atts);
- }
-
- private Locator findLocator() {
- Node n = parent.getCurrentLocation();
- if( n instanceof Element ) {
- Element e = (Element)n;
- if( inStart )
- return forest.locatorTable.getStartLocation( e );
- else
- return forest.locatorTable.getEndLocation( e );
- }
- return null;
- }
-
- //
- //
- // Locator methods
- //
- //
- public int getColumnNumber() {
- Locator l = findLocator();
- if(l!=null) return l.getColumnNumber();
- return -1;
- }
-
- public int getLineNumber() {
- Locator l = findLocator();
- if(l!=null) return l.getLineNumber();
- return -1;
- }
-
- public String getPublicId() {
- Locator l = findLocator();
- if(l!=null) return l.getPublicId();
- return null;
- }
-
- public String getSystemId() {
- Locator l = findLocator();
- if(l!=null) return l.getSystemId();
- return null;
- }
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/InternalizationLogic.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/InternalizationLogic.java
deleted file mode 100644
index 1f6f414a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/InternalizationLogic.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.internalizer;
-
-import org.w3c.dom.Element;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * Encapsulates schema-language dependent internalization logic.
- *
- * {@link Internalizer} and {@link DOMForest} are responsible for
- * doing schema language independent part, and this object is responsible
- * for schema language dependent part.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface InternalizationLogic {
- /**
- * Creates a new instance of XMLFilter that can be used to
- * find references to external schemas.
- *
- * <p>
- * Schemas that are included/imported need to be a part of
- * {@link DOMForest}, and this filter will be expected to
- * find such references.
- *
- * <p>
- * Once such a reference is found, the filter is expected to
- * call the parse method of DOMForest.
- *
- * <p>
- * {@link DOMForest} will register ErrorHandler to the returned
- * object, so any error should be sent to that error handler.
- *
- * @return
- * This method returns {@link XMLFilterImpl} because
- * the filter has to be usable for two directions
- * (wrapping a reader and wrapping a ContentHandler)
- */
- XMLFilterImpl createExternalReferenceFinder( DOMForest parent );
-
- /**
- * Checks if the specified element is a valid target node
- * to attach a customization.
- *
- * @param parent
- * The owner DOMForest object. Probably useful only
- * to obtain context information, such as error handler.
- * @param bindings
- * &lt;jaxb:bindings> element or a customization element.
- * @return
- * true if it's OK, false if not.
- */
- boolean checkIfValidTargetNode( DOMForest parent, Element bindings, Element target );
-
- /**
- * Prepares an element that actually receives customizations.
- *
- * <p>
- * For example, in XML Schema, target nodes can be any schema
- * element but it is always the &lt;xsd:appinfo> element that
- * receives customization.
- *
- * @param target
- * The target node designated by the customization.
- * @return
- * Always return non-null valid object
- */
- Element refineTarget( Element target );
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/Internalizer.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/Internalizer.java
deleted file mode 100644
index fbd74515..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/Internalizer.java
+++ /dev/null
@@ -1,615 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.internal.xjc.reader.internalizer;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.text.ParseException;
-
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-
-import com.sun.istack.internal.SAXParseException2;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.tools.internal.xjc.util.DOMUtils;
-import com.sun.xml.internal.bind.v2.util.EditDistance;
-import com.sun.xml.internal.bind.v2.util.XmlFactory;
-import com.sun.xml.internal.xsom.SCD;
-import java.io.File;
-import java.io.IOException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.xml.XMLConstants;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXParseException;
-
-/**
- * Internalizes external binding declarations.
- *
- * <p>
- * The {@link #transform(DOMForest,boolean)} method is the entry point.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-class Internalizer {
-
- private static final String WSDL_NS = "http://schemas.xmlsoap.org/wsdl/";
-
- private final XPath xpath;
-
- /**
- * Internalize all &lt;jaxb:bindings> customizations in the given forest.
- *
- * @return
- * if the SCD support is enabled, the return bindings need to be applied
- * after schema components are parsed.
- * If disabled, the returned binding set will be empty.
- * SCDs are only for XML Schema, and doesn't make any sense for other
- * schema languages.
- */
- static SCDBasedBindingSet transform( DOMForest forest, boolean enableSCD, boolean disableSecureProcessing ) {
- return new Internalizer(forest, enableSCD, disableSecureProcessing).transform();
- }
-
-
- private Internalizer(DOMForest forest, boolean enableSCD, boolean disableSecureProcessing) {
- this.errorHandler = forest.getErrorHandler();
- this.forest = forest;
- this.enableSCD = enableSCD;
- xpath = XmlFactory.createXPathFactory(disableSecureProcessing).newXPath();
- }
-
- /**
- * DOMForest object currently being processed.
- */
- private final DOMForest forest;
-
- /**
- * All errors found during the transformation is sent to this object.
- */
- private ErrorReceiver errorHandler;
-
- /**
- * If true, the SCD-based target selection is supported.
- */
- private boolean enableSCD;
-
-
- private SCDBasedBindingSet transform() {
-
- // either target nodes are conventional DOM nodes (as per spec),
- Map<Element,List<Node>> targetNodes = new HashMap<Element,List<Node>>();
- // ... or it will be schema components by means of SCD (RI extension)
- SCDBasedBindingSet scd = new SCDBasedBindingSet(forest);
-
- //
- // identify target nodes for all <jaxb:bindings>
- //
- for (Element jaxbBindings : forest.outerMostBindings) {
- // initially, the inherited context is itself
- buildTargetNodeMap(jaxbBindings, jaxbBindings, null, targetNodes, scd);
- }
-
- //
- // then move them to their respective positions.
- //
- for (Element jaxbBindings : forest.outerMostBindings) {
- move(jaxbBindings, targetNodes);
- }
-
- return scd;
- }
-
- /**
- * Validates attributes of a &lt;jaxb:bindings> element.
- */
- private void validate( Element bindings ) {
- NamedNodeMap atts = bindings.getAttributes();
- for( int i=0; i<atts.getLength(); i++ ) {
- Attr a = (Attr)atts.item(i);
- if( a.getNamespaceURI()!=null )
- continue; // all foreign namespace OK.
- if( a.getLocalName().equals("node") )
- continue;
- if( a.getLocalName().equals("schemaLocation"))
- continue;
- if( a.getLocalName().equals("scd") )
- continue;
-
- // enhancements
- if( a.getLocalName().equals("required") ) //
- continue;
- if( a.getLocalName().equals("multiple") ) //
- continue;
-
-
- // TODO: flag error for this undefined attribute
- }
- }
-
- /**
- * Determines the target node of the "bindings" element
- * by using the inherited target node, then put
- * the result into the "result" map and the "scd" map.
- *
- * @param inheritedTarget
- * The current target node. This always exists, even if
- * the user starts specifying targets via SCD (in that case
- * this inherited target is just not going to be used.)
- * @param inheritedSCD
- * If the ancestor &lt;bindings> node specifies @scd to
- * specify the target via SCD, then this parameter represents that context.
- */
- private void buildTargetNodeMap( Element bindings, @NotNull Node inheritedTarget,
- @Nullable SCDBasedBindingSet.Target inheritedSCD,
- Map<Element,List<Node>> result, SCDBasedBindingSet scdResult ) {
- // start by the inherited target
- Node target = inheritedTarget;
- ArrayList<Node> targetMultiple = null;
-
- validate(bindings); // validate this node
-
- boolean required = true;
- boolean multiple = false;
-
- if(bindings.getAttribute("required") != null) {
- String requiredAttr = bindings.getAttribute("required");
-
- if(requiredAttr.equals("no") || requiredAttr.equals("false") || requiredAttr.equals("0"))
- required = false;
- }
-
- if(bindings.getAttribute("multiple") != null) {
- String requiredAttr = bindings.getAttribute("multiple");
-
- if(requiredAttr.equals("yes") || requiredAttr.equals("true") || requiredAttr.equals("1"))
- multiple = true;
- }
-
-
- // look for @schemaLocation
- if( bindings.getAttributeNode("schemaLocation")!=null ) {
- String schemaLocation = bindings.getAttribute("schemaLocation");
-
- // enhancement - schemaLocation="*" = bind to all schemas..
- if(schemaLocation.equals("*")) {
- for(String systemId : forest.listSystemIDs()) {
- if (result.get(bindings) == null)
- result.put(bindings, new ArrayList<Node>());
- result.get(bindings).add(forest.get(systemId).getDocumentElement());
-
- Element[] children = DOMUtils.getChildElements(bindings, Const.JAXB_NSURI, "bindings");
- for (Element value : children)
- buildTargetNodeMap(value, forest.get(systemId).getDocumentElement(), inheritedSCD, result, scdResult);
- }
- return;
- } else {
- try {
- // TODO: use the URI class
- // TODO: honor xml:base
- URL loc = new URL(
- new URL(forest.getSystemId(bindings.getOwnerDocument())), schemaLocation
- );
- schemaLocation = loc.toExternalForm();
- target = forest.get(schemaLocation);
- if ((target == null) && (loc.getProtocol().startsWith("file"))) {
- File f = new File(loc.getFile());
- schemaLocation = new File(f.getCanonicalPath()).toURI().toString();
- }
- } catch( MalformedURLException e ) {
- } catch( IOException e ) {
- Logger.getLogger(Internalizer.class.getName()).log(Level.FINEST, e.getLocalizedMessage());
- }
-
- target = forest.get(schemaLocation);
- if(target==null) {
- reportError( bindings,
- Messages.format(Messages.ERR_INCORRECT_SCHEMA_REFERENCE,
- schemaLocation,
- EditDistance.findNearest(schemaLocation,forest.listSystemIDs())));
-
- return; // abort processing this <jaxb:bindings>
- }
-
- target = ((Document)target).getDocumentElement();
- }
- }
-
- // look for @node
- if( bindings.getAttributeNode("node")!=null ) {
- String nodeXPath = bindings.getAttribute("node");
-
- // evaluate this XPath
- NodeList nlst;
- try {
- xpath.setNamespaceContext(new NamespaceContextImpl(bindings));
- nlst = (NodeList)xpath.evaluate(nodeXPath,target,XPathConstants.NODESET);
- } catch (XPathExpressionException e) {
- if(required) {
- reportError( bindings,
- Messages.format(Messages.ERR_XPATH_EVAL,e.getMessage()), e );
- return; // abort processing this <jaxb:bindings>
- } else {
- return;
- }
- }
-
- if( nlst.getLength()==0 ) {
- if(required)
- reportError( bindings,
- Messages.format(Messages.NO_XPATH_EVAL_TO_NO_TARGET, nodeXPath) );
- return; // abort
- }
-
- if( nlst.getLength()!=1 ) {
- if(!multiple) {
- reportError( bindings,
- Messages.format(Messages.NO_XPATH_EVAL_TOO_MANY_TARGETS, nodeXPath,nlst.getLength()) );
-
- return; // abort
- } else {
- if(targetMultiple == null) targetMultiple = new ArrayList<Node>();
- for(int i = 0; i < nlst.getLength(); i++) {
- targetMultiple.add(nlst.item(i));
- }
- }
- }
-
- // check
- if(!multiple || nlst.getLength() == 1) {
- Node rnode = nlst.item(0);
- if (!(rnode instanceof Element)) {
- reportError(bindings,
- Messages.format(Messages.NO_XPATH_EVAL_TO_NON_ELEMENT, nodeXPath));
- return; // abort
- }
-
- if (!forest.logic.checkIfValidTargetNode(forest, bindings, (Element) rnode)) {
- reportError(bindings,
- Messages.format(Messages.XPATH_EVAL_TO_NON_SCHEMA_ELEMENT,
- nodeXPath, rnode.getNodeName()));
- return; // abort
- }
-
- target = rnode;
- } else {
- for(Node rnode : targetMultiple) {
- if (!(rnode instanceof Element)) {
- reportError(bindings,
- Messages.format(Messages.NO_XPATH_EVAL_TO_NON_ELEMENT, nodeXPath));
- return; // abort
- }
-
- if (!forest.logic.checkIfValidTargetNode(forest, bindings, (Element) rnode)) {
- reportError(bindings,
- Messages.format(Messages.XPATH_EVAL_TO_NON_SCHEMA_ELEMENT,
- nodeXPath, rnode.getNodeName()));
- return; // abort
- }
- }
- }
- }
-
- // look for @scd
- if( bindings.getAttributeNode("scd")!=null ) {
- String scdPath = bindings.getAttribute("scd");
- if(!enableSCD) {
- // SCD selector was found, but it's not activated. report an error
- // but recover by handling it anyway. this also avoids repeated error messages.
- reportError(bindings,
- Messages.format(Messages.SCD_NOT_ENABLED));
- enableSCD = true;
- }
-
- try {
- inheritedSCD = scdResult.createNewTarget( inheritedSCD, bindings,
- SCD.create(scdPath, new NamespaceContextImpl(bindings)) );
- } catch (ParseException e) {
- reportError( bindings, Messages.format(Messages.ERR_SCD_EVAL,e.getMessage()),e );
- return; // abort processing this bindings
- }
- }
-
- // update the result map
- if (inheritedSCD != null) {
- inheritedSCD.addBinidng(bindings);
- } else if (!multiple || targetMultiple == null) {
- if (result.get(bindings) == null)
- result.put(bindings, new ArrayList<Node>());
- result.get(bindings).add(target);
- } else {
- for (Node rnode : targetMultiple) {
- if (result.get(bindings) == null)
- result.put(bindings, new ArrayList<Node>());
-
- result.get(bindings).add(rnode);
- }
-
- }
-
-
- // look for child <jaxb:bindings> and process them recursively
- Element[] children = DOMUtils.getChildElements( bindings, Const.JAXB_NSURI, "bindings" );
- for (Element value : children)
- if(!multiple || targetMultiple == null)
- buildTargetNodeMap(value, target, inheritedSCD, result, scdResult);
- else {
- for(Node rnode : targetMultiple) {
- buildTargetNodeMap(value, rnode, inheritedSCD, result, scdResult);
- }
- }
- }
-
- /**
- * Moves JAXB customizations under their respective target nodes.
- */
- private void move(Element bindings, Map<Element, List<Node>> targetNodes) {
- List<Node> nodelist = targetNodes.get(bindings);
-
- if(nodelist == null) {
- return; // abort
- }
-
- for (Node target : nodelist) {
- if (target == null) // this must be the result of an error on the external binding.
- // recover from the error by ignoring this node
- {
- return;
- }
-
- for (Element item : DOMUtils.getChildElements(bindings)) {
- String localName = item.getLocalName();
-
- if ("bindings".equals(localName)) {
- // process child <jaxb:bindings> recursively
- move(item, targetNodes);
- } else if ("globalBindings".equals(localName)) {
- // <jaxb:globalBindings> always go to the root of document.
- Element root = forest.getOneDocument().getDocumentElement();
- if (root.getNamespaceURI().equals(WSDL_NS)) {
- NodeList elements = root.getElementsByTagNameNS(XMLConstants.W3C_XML_SCHEMA_NS_URI, "schema");
- if ((elements == null) || (elements.getLength() < 1)) {
- reportError(item, Messages.format(Messages.ORPHANED_CUSTOMIZATION, item.getNodeName()));
- return;
- } else {
- moveUnder(item, (Element)elements.item(0));
- }
- } else {
- moveUnder(item, root);
- }
- } else {
- if (!(target instanceof Element)) {
- reportError(item,
- Messages.format(Messages.CONTEXT_NODE_IS_NOT_ELEMENT));
- return; // abort
- }
-
- if (!forest.logic.checkIfValidTargetNode(forest, item, (Element) target)) {
- reportError(item,
- Messages.format(Messages.ORPHANED_CUSTOMIZATION, item.getNodeName()));
- return; // abort
- }
-
- // move this node under the target
- moveUnder(item, (Element) target);
- }
- }
- }
- }
-
- /**
- * Moves the "decl" node under the "target" node.
- *
- * @param decl
- * A JAXB customization element (e.g., &lt;jaxb:class>)
- *
- * @param target
- * XML Schema element under which the declaration should move.
- * For example, &lt;xs:element>
- */
- private void moveUnder( Element decl, Element target ) {
- Element realTarget = forest.logic.refineTarget(target);
-
- declExtensionNamespace( decl, target );
-
- // copy in-scope namespace declarations of the decl node
- // to the decl node itself so that this move won't change
- // the in-scope namespace bindings.
- Element p = decl;
- Set<String> inscopes = new HashSet<String>();
- while(true) {
- NamedNodeMap atts = p.getAttributes();
- for( int i=0; i<atts.getLength(); i++ ) {
- Attr a = (Attr)atts.item(i);
- if( Const.XMLNS_URI.equals(a.getNamespaceURI()) ) {
- String prefix;
- if( a.getName().indexOf(':')==-1 ) prefix = "";
- else prefix = a.getLocalName();
-
- if( inscopes.add(prefix) && p!=decl ) {
- // if this is the first time we see this namespace bindings,
- // copy the declaration.
- // if p==decl, there's no need to. Note that
- // we want to add prefix to inscopes even if p==Decl
-
- decl.setAttributeNodeNS( (Attr)a.cloneNode(true) );
- }
- }
- }
-
- if( p.getParentNode() instanceof Document )
- break;
-
- p = (Element)p.getParentNode();
- }
-
- if( !inscopes.contains("") ) {
- // if the default namespace was undeclared in the context of decl,
- // it must be explicitly set to "" since the new environment might
- // have a different default namespace URI.
- decl.setAttributeNS(Const.XMLNS_URI,"xmlns","");
- }
-
-
- // finally move the declaration to the target node.
- if( realTarget.getOwnerDocument()!=decl.getOwnerDocument() ) {
- // if they belong to different DOM documents, we need to clone them
- Element original = decl;
- decl = (Element)realTarget.getOwnerDocument().importNode(decl,true);
-
- // this effectively clones a ndoe,, so we need to copy locators.
- copyLocators( original, decl );
- }
-
- realTarget.appendChild( decl );
- }
-
- /**
- * Recursively visits sub-elements and declare all used namespaces.
- * TODO: the fact that we recognize all namespaces in the extension
- * is a bad design.
- */
- private void declExtensionNamespace(Element decl, Element target) {
- // if this comes from external namespaces, add the namespace to
- // @extensionBindingPrefixes.
- if( !Const.JAXB_NSURI.equals(decl.getNamespaceURI()) )
- declareExtensionNamespace( target, decl.getNamespaceURI() );
-
- NodeList lst = decl.getChildNodes();
- for( int i=0; i<lst.getLength(); i++ ) {
- Node n = lst.item(i);
- if( n instanceof Element )
- declExtensionNamespace( (Element)n, target );
- }
- }
-
-
- /** Attribute name. */
- private static final String EXTENSION_PREFIXES = "extensionBindingPrefixes";
-
- /**
- * Adds the specified namespace URI to the jaxb:extensionBindingPrefixes
- * attribute of the target document.
- */
- private void declareExtensionNamespace( Element target, String nsUri ) {
- // look for the attribute
- Element root = target.getOwnerDocument().getDocumentElement();
- Attr att = root.getAttributeNodeNS(Const.JAXB_NSURI,EXTENSION_PREFIXES);
- if( att==null ) {
- String jaxbPrefix = allocatePrefix(root,Const.JAXB_NSURI);
- // no such attribute. Create one.
- att = target.getOwnerDocument().createAttributeNS(
- Const.JAXB_NSURI,jaxbPrefix+':'+EXTENSION_PREFIXES);
- root.setAttributeNodeNS(att);
- }
-
- String prefix = allocatePrefix(root,nsUri);
- if( att.getValue().indexOf(prefix)==-1 )
- // avoid redeclaring the same namespace twice.
- att.setValue( att.getValue()+' '+prefix);
- }
-
- /**
- * Declares a new prefix on the given element and associates it
- * with the specified namespace URI.
- * <p>
- * Note that this method doesn't use the default namespace
- * even if it can.
- */
- private String allocatePrefix( Element e, String nsUri ) {
- // look for existing namespaces.
- NamedNodeMap atts = e.getAttributes();
- for( int i=0; i<atts.getLength(); i++ ) {
- Attr a = (Attr)atts.item(i);
- if( Const.XMLNS_URI.equals(a.getNamespaceURI()) ) {
- if( a.getName().indexOf(':')==-1 ) continue;
-
- if( a.getValue().equals(nsUri) )
- return a.getLocalName(); // found one
- }
- }
-
- // none found. allocate new.
- while(true) {
- String prefix = "p"+(int)(Math.random()*1000000)+'_';
- if(e.getAttributeNodeNS(Const.XMLNS_URI,prefix)!=null)
- continue; // this prefix is already allocated.
-
- e.setAttributeNS(Const.XMLNS_URI,"xmlns:"+prefix,nsUri);
- return prefix;
- }
- }
-
-
- /**
- * Copies location information attached to the "src" node to the "dst" node.
- */
- private void copyLocators( Element src, Element dst ) {
- forest.locatorTable.storeStartLocation(
- dst, forest.locatorTable.getStartLocation(src) );
- forest.locatorTable.storeEndLocation(
- dst, forest.locatorTable.getEndLocation(src) );
-
- // recursively process child elements
- Element[] srcChilds = DOMUtils.getChildElements(src);
- Element[] dstChilds = DOMUtils.getChildElements(dst);
-
- for( int i=0; i<srcChilds.length; i++ )
- copyLocators( srcChilds[i], dstChilds[i] );
- }
-
-
- private void reportError( Element errorSource, String formattedMsg ) {
- reportError( errorSource, formattedMsg, null );
- }
-
- private void reportError( Element errorSource,
- String formattedMsg, Exception nestedException ) {
-
- SAXParseException e = new SAXParseException2( formattedMsg,
- forest.locatorTable.getStartLocation(errorSource),
- nestedException );
- errorHandler.error(e);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/LocatorTable.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/LocatorTable.java
deleted file mode 100644
index fc765fcb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/LocatorTable.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.internalizer;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-import org.xml.sax.helpers.LocatorImpl;
-
-/**
- * Stores {@link Locator} objects for every {@link Element}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class LocatorTable {
- /** Locations of the start element. */
- private final Map startLocations = new HashMap();
-
- /** Locations of the end element. */
- private final Map endLocations = new HashMap();
-
- public void storeStartLocation( Element e, Locator loc ) {
- startLocations.put(e,new LocatorImpl(loc));
- }
-
- public void storeEndLocation( Element e, Locator loc ) {
- endLocations.put(e,new LocatorImpl(loc));
- }
-
- public Locator getStartLocation( Element e ) {
- return (Locator)startLocations.get(e);
- }
-
- public Locator getEndLocation( Element e ) {
- return (Locator)endLocations.get(e);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle.properties
deleted file mode 100644
index 435c39c6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle.properties
+++ /dev/null
@@ -1,104 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-AbstractReferenceFinderImpl.UnableToParse = \
- Unable to parse "{0}" : {1}
-
-
-
-# {0} - schema location, {1} - (correct) schema location e.g.: "classpath:/foo/bar/Schema.xsd" is not a part of this compilation. Is this a mistake for "file:/bar/foo/Schema2.xsd"? OR "http://localhost:8080/MyService/TestService?wsdl" is not a part of this compilation. Is this a mistake for "http://localhost:8080/MyService/TestService?wsdl#types3"?
-Internalizer.IncorrectSchemaReference = \
- "{0}" is not a part of this compilation. Is this a mistake for "{1}"?
-
-Internalizer.XPathEvaluationError = \
- XPath error: {0}
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNoTarget = \
- XPath evaluation of "{0}" results in empty target node
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaulatesToTooManyTargets = \
- XPath evaluation of "{0}" results in too many ({1}) target nodes
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNonElement = \
- XPath evaluation of "{0}" needs to result in an element.
-
-Internalizer.XPathEvaluatesToNonSchemaElement = \
- XPath evaluation of "{0}" needs to result in an element of the schema language, \
- but it results in {1}
-
-Internalizer.ContextNodeIsNotElement = \
- Context node is not an element.
-
-Internalizer.OrphanedCustomization = \
- The "{0}" customization is not associated with any schema element.
-
-Internalizer.IncorrectVersion = \
- JAXB version attribute must be "1.0"
-
-Internalizer.VersionNotPresent = \
- JAXB version attribute must be present
-
-Internalizer.TwoVersionAttributes = \
- Both jaxb:version and version are present
-
-ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR = \
- We were unable to ensure the correctness of the schema: {0}
-
-SCD_NOT_ENABLED = \
- Schema component designator support is disabled by default. Use the -extension switch to enable this vendor extension.
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVAL = \
- Invalid SCD: {0}
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVALUATED_EMPTY = \
- SCD "{0}" didn't match any schema component
-
-# SCD = Schema Component Designator.
-ERR_SCD_MATCHED_MULTIPLE_NODES = \
- SCD "{0}" matched {1} schema components whereas only 1 is expected
-
-# Not concatenated with any other string (written on a separate line) but printed after (and related to) ERR_SCD_MATCHED_MULTIPLE_NODES, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST = \
- (related to above) one of the matched schema components is defined here
-
-# Not concatenated with any other string (written on a separate line) but printed after (related to ERR_SCD_MATCHED_MULTIPLE_NODES) ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND = \
- (related to above) another matched schema component is defined here
-
-ERR_FILENAME_IS_NOT_URI = \
- File name is not an URI.
-
-DOMFOREST_INPUTSOURCE_IOEXCEPTION = \
- IOException thrown when processing "{0}". Exception: {1}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_de.properties
deleted file mode 100644
index 6888112d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_de.properties
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-AbstractReferenceFinderImpl.UnableToParse = Parsen von "{0}" nicht m\u00F6glich: {1}
-
-
-
-# {0} - schema location, {1} - (correct) schema location e.g.: "classpath:/foo/bar/Schema.xsd" is not a part of this compilation. Is this a mistake for "file:/bar/foo/Schema2.xsd"? OR "http://localhost:8080/MyService/TestService?wsdl" is not a part of this compilation. Is this a mistake for "http://localhost:8080/MyService/TestService?wsdl#types3"?
-Internalizer.IncorrectSchemaReference = "{0}" ist nicht Bestandteil dieser Kompilierung. Ist dies ein Fehler bei "{1}"?
-
-Internalizer.XPathEvaluationError = XPath-Fehler: {0}
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNoTarget = XPath-Auswertung von "{0}" ergibt leeren Zielknoten
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaulatesToTooManyTargets = XPath-Auswertung von "{0}" ergibt zu viele ({1})-Zielknoten
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNonElement = XPath-Auswertung von "{0}" muss ein Element ergeben.
-
-Internalizer.XPathEvaluatesToNonSchemaElement = XPath-Auswertung von "{0}" muss ein Element der Schemasprache ergeben, ergibt jedoch {1}
-
-Internalizer.ContextNodeIsNotElement = Kontextknoten ist kein Element.
-
-Internalizer.OrphanedCustomization = Die "{0}"-Anpassung ist mit keinem Schemaelement verkn\u00FCpft.
-
-Internalizer.IncorrectVersion = JAXB-Versionsattribut muss "1.0" sein
-
-Internalizer.VersionNotPresent = JAXB-Versionsattribut muss vorhanden sein
-
-Internalizer.TwoVersionAttributes = Sowohl jaxb:version als auch Version sind vorhanden
-
-ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR = Die Richtigkeit des Schemas konnte nicht sichergestellt werden: {0}
-
-SCD_NOT_ENABLED = Die Unterst\u00FCtzung des Schemakomponentenbezeichners ist standardm\u00E4\u00DFig deaktiviert. Verwenden Sie den Switch "-extension", um diese Herstellererweiterung zu aktivieren.
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVAL = Ung\u00FCltiger SCD: {0}
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVALUATED_EMPTY = SCD "{0}" stimmt mit keiner Schemakomponente \u00FCberein
-
-# SCD = Schema Component Designator.
-ERR_SCD_MATCHED_MULTIPLE_NODES = SCD "{0}" hat mit {1} Schemakomponenten \u00FCbereingestimmt, w\u00E4hrend nur 1 erwartet wurde
-
-# Not concatenated with any other string (written on a separate line) but printed after (and related to) ERR_SCD_MATCHED_MULTIPLE_NODES, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST = Eine der \u00FCbereinstimmenden Schemakomponenten ist hier definiert
-
-# Not concatenated with any other string (written on a separate line) but printed after (related to ERR_SCD_MATCHED_MULTIPLE_NODES) ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND = Eine andere Schemakomponente ist hier definiert
-
-ERR_FILENAME_IS_NOT_URI = Dateiname ist kein URI.
-
-DOMFOREST_INPUTSOURCE_IOEXCEPTION = IOException bei der Verarbeitung von "{0}" ausgel\u00F6st. Ausnahme: {1}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_es.properties
deleted file mode 100644
index 50d64c14..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_es.properties
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-AbstractReferenceFinderImpl.UnableToParse = No se ha podido analizar "{0}": {1}
-
-
-
-# {0} - schema location, {1} - (correct) schema location e.g.: "classpath:/foo/bar/Schema.xsd" is not a part of this compilation. Is this a mistake for "file:/bar/foo/Schema2.xsd"? OR "http://localhost:8080/MyService/TestService?wsdl" is not a part of this compilation. Is this a mistake for "http://localhost:8080/MyService/TestService?wsdl#types3"?
-Internalizer.IncorrectSchemaReference = "{0}" no forma parte de esta compilaci\u00F3n. \u00BFEs un error de "{1}"?
-
-Internalizer.XPathEvaluationError = Error de XPath: {0}
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNoTarget = La evaluaci\u00F3n de XPath de "{0}" produce un nodo de destino vac\u00EDo
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaulatesToTooManyTargets = La evaluaci\u00F3n de XPath de "{0}" produce demasiados nodos de destino ({1})
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNonElement = La evaluaci\u00F3n de XPath de "{0}" debe producir un elemento.
-
-Internalizer.XPathEvaluatesToNonSchemaElement = La evaluaci\u00F3n de XPath "{0}" debe producir un elemento del lenguaje del esquema, pero produce {1}
-
-Internalizer.ContextNodeIsNotElement = El nodo de contexto no es un elemento.
-
-Internalizer.OrphanedCustomization = La personalizaci\u00F3n de "{0}" no est\u00E1 asociada a ning\u00FAn elemento de esquema.
-
-Internalizer.IncorrectVersion = El atributo de la versi\u00F3n de JAXB debe ser "1.0"
-
-Internalizer.VersionNotPresent = El atributo de la versi\u00F3n debe existir
-
-Internalizer.TwoVersionAttributes = Tanto jaxb:version como version existen
-
-ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR = No se ha podido garantizar que sea correcto el esquema: {0}
-
-SCD_NOT_ENABLED = El soporte del designador de componentes de esquema est\u00E1 desactivado por defecto. Utilice el conmutador -extension para activar esta extensi\u00F3n de proveedor.
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVAL = Designador de componentes de esquema no v\u00E1lido: {0}
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVALUATED_EMPTY = El designador de componentes de esquema "{0}" no coincide con ning\u00FAn componente de esquema
-
-# SCD = Schema Component Designator.
-ERR_SCD_MATCHED_MULTIPLE_NODES = El designador de componentes de esquema "{0}" coincide con {1} componentes de esquema, aunque s\u00F3lo se esperaba 1
-
-# Not concatenated with any other string (written on a separate line) but printed after (and related to) ERR_SCD_MATCHED_MULTIPLE_NODES, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST = (Relacionado con lo anterior) Uno de los componentes de esquema coincidentes se define aqu\u00ED.
-
-# Not concatenated with any other string (written on a separate line) but printed after (related to ERR_SCD_MATCHED_MULTIPLE_NODES) ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND = (Relacionado con lo anterior) Otro de los componentes de esquema coincidentes se define aqu\u00ED.
-
-ERR_FILENAME_IS_NOT_URI = El nombre de archivo no es un URI.
-
-DOMFOREST_INPUTSOURCE_IOEXCEPTION = Se ha devuelto una excepci\u00F3n de E/S al procesar "{0}". Excepci\u00F3n: {1}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_fr.properties
deleted file mode 100644
index 43c42389..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_fr.properties
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-AbstractReferenceFinderImpl.UnableToParse = Impossible d''analyser "{0}" : {1}
-
-
-
-# {0} - schema location, {1} - (correct) schema location e.g.: "classpath:/foo/bar/Schema.xsd" is not a part of this compilation. Is this a mistake for "file:/bar/foo/Schema2.xsd"? OR "http://localhost:8080/MyService/TestService?wsdl" is not a part of this compilation. Is this a mistake for "http://localhost:8080/MyService/TestService?wsdl#types3"?
-Internalizer.IncorrectSchemaReference = "{0}" ne fait pas partie de cette compilation. S''agit-il d''une erreur pour "{1}" ?
-
-Internalizer.XPathEvaluationError = Erreur XPath : {0}
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNoTarget = L''\u00E9valuation XPath de "{0}" g\u00E9n\u00E8re un noeud cible vide
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaulatesToTooManyTargets = L''\u00E9valuation XPath de "{0}" g\u00E9n\u00E8re un trop grand nombre de noeuds cible ({1})
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNonElement = L''\u00E9valuation XPath de "{0}" doit g\u00E9n\u00E9rer un \u00E9l\u00E9ment.
-
-Internalizer.XPathEvaluatesToNonSchemaElement = L''\u00E9valuation XPath de"{0}" doit g\u00E9n\u00E9rer un \u00E9l\u00E9ment de la langue de sch\u00E9ma, mais elle g\u00E9n\u00E8re {1}
-
-Internalizer.ContextNodeIsNotElement = Le noeud de contexte n'est pas un \u00E9l\u00E9ment.
-
-Internalizer.OrphanedCustomization = La personnalisation "{0}" n''est associ\u00E9e \u00E0 aucun \u00E9l\u00E9ment de sch\u00E9ma.
-
-Internalizer.IncorrectVersion = L'attribut de version JAXB doit \u00EAtre "1.0"
-
-Internalizer.VersionNotPresent = L'attribut de version JAXB doit \u00EAtre pr\u00E9sent
-
-Internalizer.TwoVersionAttributes = jaxb:version et version sont tous deux pr\u00E9sents
-
-ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR = Nous n''avons pas pu garantir l''exactitude du sch\u00E9ma : {0}
-
-SCD_NOT_ENABLED = La prise en charge de l'indicateur de composant de sch\u00E9ma est d\u00E9sactiv\u00E9e par d\u00E9faut. Utilisez le commutateur -extension pour activer cette extension fournisseur.
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVAL = Indicateur de composant de sch\u00E9ma non valide : {0}
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVALUATED_EMPTY = L''indicateur de composant de sch\u00E9ma "{0}" ne correspond \u00E0 aucun composant de sch\u00E9ma
-
-# SCD = Schema Component Designator.
-ERR_SCD_MATCHED_MULTIPLE_NODES = L''indicateur de composant de sch\u00E9ma "{0}" correspond \u00E0 {1} composants de sch\u00E9ma alors qu''un seul est attendu
-
-# Not concatenated with any other string (written on a separate line) but printed after (and related to) ERR_SCD_MATCHED_MULTIPLE_NODES, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST = (voir ci-dessus) l'un des composants de sch\u00E9ma correspondants est d\u00E9fini ici
-
-# Not concatenated with any other string (written on a separate line) but printed after (related to ERR_SCD_MATCHED_MULTIPLE_NODES) ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND = (voir ci-dessus) un autre composant de sch\u00E9ma correspondant est d\u00E9fini ici
-
-ERR_FILENAME_IS_NOT_URI = Le nom de fichier n'est pas un URI.
-
-DOMFOREST_INPUTSOURCE_IOEXCEPTION = Exception d''E/S g\u00E9n\u00E9r\u00E9e lors du traitement de "{0}". Exception : {1}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_it.properties
deleted file mode 100644
index 27799704..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_it.properties
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-AbstractReferenceFinderImpl.UnableToParse = Impossibile analizzare "{0}" : {1}
-
-
-
-# {0} - schema location, {1} - (correct) schema location e.g.: "classpath:/foo/bar/Schema.xsd" is not a part of this compilation. Is this a mistake for "file:/bar/foo/Schema2.xsd"? OR "http://localhost:8080/MyService/TestService?wsdl" is not a part of this compilation. Is this a mistake for "http://localhost:8080/MyService/TestService?wsdl#types3"?
-Internalizer.IncorrectSchemaReference = "{0}" non fa parte di questa compilazione. Si tratta di un errore per "{1}"?
-
-Internalizer.XPathEvaluationError = Errore XPath: {0}
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNoTarget = La valutazione XPath di "{0}" restituisce un nodo di destinazione vuoto
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaulatesToTooManyTargets = La valutazione XPath di "{0}" restituisce troppi ({1}) nodi di destinazione
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNonElement = La valutazione XPath di "{0}" deve restituire un elemento.
-
-Internalizer.XPathEvaluatesToNonSchemaElement = La valutazione XPath di "{0}" deve restituire un elemento della lingua dello schema ma restituisce {1}.
-
-Internalizer.ContextNodeIsNotElement = Il nodo contesto non \u00E8 un elemento.
-
-Internalizer.OrphanedCustomization = La personalizzazione "{0}" non \u00E8 associata ad alcun elemento dello schema.
-
-Internalizer.IncorrectVersion = L'attributo JAXB version deve essere "1.0"
-
-Internalizer.VersionNotPresent = L'attributo JAXB version deve essere presente
-
-Internalizer.TwoVersionAttributes = Sono presenti jaxb:version e version
-
-ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR = Impossibile assicurare la correttezza dello schema: {0}
-
-SCD_NOT_ENABLED = Il supporto del designatore del componente dello schema \u00E8 disabilitato per impostazione predefinita. Usare il parametro -extension per abilitare questa estensione del fornitore.
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVAL = SCD non valido: {0}
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVALUATED_EMPTY = L''SCD "{0}" non corrisponde ad alcun componente dello schema
-
-# SCD = Schema Component Designator.
-ERR_SCD_MATCHED_MULTIPLE_NODES = L''SCD "{0}" corrisponde a {1} componenti dello schema mentre ne \u00E8 previsto solo 1
-
-# Not concatenated with any other string (written on a separate line) but printed after (and related to) ERR_SCD_MATCHED_MULTIPLE_NODES, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST = (relativo a quanto riportato sopra) qui \u00E8 definito uno dei componenti dello schema corrispondenti
-
-# Not concatenated with any other string (written on a separate line) but printed after (related to ERR_SCD_MATCHED_MULTIPLE_NODES) ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND = (relativo a quanto riportato sopra) qui \u00E8 definito un altro componente dello schema corrispondente
-
-ERR_FILENAME_IS_NOT_URI = Il nome file non \u00E8 un URI.
-
-DOMFOREST_INPUTSOURCE_IOEXCEPTION = IOException restituita durante l''elaborazione di "{0}". Eccezione: {1}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_ja.properties
deleted file mode 100644
index 7ef1bd3d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_ja.properties
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-AbstractReferenceFinderImpl.UnableToParse = "{0}"\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093: {1}
-
-
-
-# {0} - schema location, {1} - (correct) schema location e.g.: "classpath:/foo/bar/Schema.xsd" is not a part of this compilation. Is this a mistake for "file:/bar/foo/Schema2.xsd"? OR "http://localhost:8080/MyService/TestService?wsdl" is not a part of this compilation. Is this a mistake for "http://localhost:8080/MyService/TestService?wsdl#types3"?
-Internalizer.IncorrectSchemaReference = "{0}"\u306F\u3053\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u306E\u4E00\u90E8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002"{1}"\u306E\u8AA4\u308A\u3067\u3042\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
-
-Internalizer.XPathEvaluationError = XPath\u30A8\u30E9\u30FC: {0}
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNoTarget = "{0}"\u306EXPath\u8A55\u4FA1\u3067\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30CE\u30FC\u30C9\u304C\u7A7A\u3068\u306A\u308A\u307E\u3057\u305F
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaulatesToTooManyTargets = "{0}"\u306EXPath\u8A55\u4FA1\u3067\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30CE\u30FC\u30C9\u304C\u591A\u304F\u306A\u308A\u3059\u304E\u307E\u3057\u305F({1})
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNonElement = "{0}"\u306EXPath\u8A55\u4FA1\u3067\u306F\u8981\u7D20\u3068\u306A\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-
-Internalizer.XPathEvaluatesToNonSchemaElement = "{0}"\u306EXPath\u8A55\u4FA1\u3067\u306F\u30B9\u30AD\u30FC\u30DE\u8A00\u8A9E\u306E\u8981\u7D20\u3068\u306A\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u304C\u3001{1}\u3068\u306A\u308A\u307E\u3057\u305F
-
-Internalizer.ContextNodeIsNotElement = \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30CE\u30FC\u30C9\u306F\u8981\u7D20\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-
-Internalizer.OrphanedCustomization = "{0}"\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u306F\u30B9\u30AD\u30FC\u30DE\u8981\u7D20\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-
-Internalizer.IncorrectVersion = JAXB\u306Eversion\u5C5E\u6027\u306F"1.0"\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-Internalizer.VersionNotPresent = JAXB\u306Eversion\u5C5E\u6027\u304C\u5B58\u5728\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-Internalizer.TwoVersionAttributes = jaxb:version\u3068version\u306E\u4E21\u65B9\u304C\u5B58\u5728\u3057\u307E\u3059
-
-ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR = \u30B9\u30AD\u30FC\u30DE\u304C\u6B63\u3057\u3044\u304B\u3069\u3046\u304B\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: {0}
-
-SCD_NOT_ENABLED = \u30B9\u30AD\u30FC\u30DE\u30FB\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u6307\u5B9A\u5B50\u306E\u30B5\u30DD\u30FC\u30C8\u306F\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002\u3053\u306E\u30D9\u30F3\u30C0\u30FC\u62E1\u5F35\u6A5F\u80FD\u3092\u6709\u52B9\u306B\u3059\u308B\u306B\u306F\u3001-extension\u30B9\u30A4\u30C3\u30C1\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVAL = \u7121\u52B9\u306ASCD: {0}
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVALUATED_EMPTY = SCD "{0}"\u306F\u30B9\u30AD\u30FC\u30DE\u30FB\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093\u3067\u3057\u305F
-
-# SCD = Schema Component Designator.
-ERR_SCD_MATCHED_MULTIPLE_NODES = SCD "{0}"\u306F{1}\u500B\u306E\u30B9\u30AD\u30FC\u30DE\u30FB\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3068\u4E00\u81F4\u3057\u307E\u3057\u305F\u304C\u3001\u4E88\u671F\u3055\u308C\u308B\u306E\u306F1\u3064\u306E\u307F\u3067\u3059
-
-# Not concatenated with any other string (written on a separate line) but printed after (and related to) ERR_SCD_MATCHED_MULTIPLE_NODES, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST = (\u524D\u8FF0\u306E\u5185\u5BB9\u306B\u95A2\u9023\u3057\u3066)\u4E00\u81F4\u3057\u305F\u30B9\u30AD\u30FC\u30DE\u30FB\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E1\u3064\u304C\u3053\u3053\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
-
-# Not concatenated with any other string (written on a separate line) but printed after (related to ERR_SCD_MATCHED_MULTIPLE_NODES) ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND = (\u524D\u8FF0\u306E\u5185\u5BB9\u306B\u95A2\u9023\u3057\u3066)\u5225\u306E\u30B9\u30AD\u30FC\u30DE\u30FB\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u3053\u3053\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
-
-ERR_FILENAME_IS_NOT_URI = \u30D5\u30A1\u30A4\u30EB\u540D\u304CURI\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-
-DOMFOREST_INPUTSOURCE_IOEXCEPTION = "{0}"\u306E\u51E6\u7406\u4E2D\u306BIOException\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3057\u305F\u3002\u4F8B\u5916: {1}\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_ko.properties
deleted file mode 100644
index 030356b2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_ko.properties
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-AbstractReferenceFinderImpl.UnableToParse = "{0}"\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC74C: {1}
-
-
-
-# {0} - schema location, {1} - (correct) schema location e.g.: "classpath:/foo/bar/Schema.xsd" is not a part of this compilation. Is this a mistake for "file:/bar/foo/Schema2.xsd"? OR "http://localhost:8080/MyService/TestService?wsdl" is not a part of this compilation. Is this a mistake for "http://localhost:8080/MyService/TestService?wsdl#types3"?
-Internalizer.IncorrectSchemaReference = "{0}"\uC740(\uB294) \uC774 \uCEF4\uD30C\uC77C\uC5D0 \uC18D\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. "{1}"\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB824\uACE0 \uD55C \uAC83\uC785\uB2C8\uAE4C?
-
-Internalizer.XPathEvaluationError = XPath \uC624\uB958: {0}
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNoTarget = "{0}"\uC758 XPath \uD3C9\uAC00\uB85C \uBE48 \uB300\uC0C1 \uB178\uB4DC\uAC00 \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaulatesToTooManyTargets = "{0}"\uC758 XPath \uD3C9\uAC00\uB85C \uB108\uBB34 \uB9CE\uC740 ({1}) \uB300\uC0C1 \uB178\uB4DC\uAC00 \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNonElement = "{0}"\uC758 XPath \uD3C9\uAC00\uB85C \uC694\uC18C\uAC00 \uC0DD\uC131\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-Internalizer.XPathEvaluatesToNonSchemaElement = "{0}"\uC758 XPath \uD3C9\uAC00\uB85C \uC2A4\uD0A4\uB9C8 \uC5B8\uC5B4 \uC694\uC18C\uAC00 \uC0DD\uC131\uB418\uC5B4\uC57C \uD558\uC9C0\uB9CC {1}\uC774(\uAC00) \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-Internalizer.ContextNodeIsNotElement = \uCEE8\uD14D\uC2A4\uD2B8 \uB178\uB4DC\uAC00 \uC694\uC18C\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
-
-Internalizer.OrphanedCustomization = "{0}" \uC0AC\uC6A9\uC790 \uC815\uC758\uAC00 \uC2A4\uD0A4\uB9C8 \uC694\uC18C\uC640 \uC5F0\uAD00\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-Internalizer.IncorrectVersion = JAXB \uBC84\uC804 \uC18D\uC131\uC740 "1.0"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-Internalizer.VersionNotPresent = JAXB \uBC84\uC804 \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-Internalizer.TwoVersionAttributes = jaxb:version\uACFC version\uC774 \uC788\uC2B5\uB2C8\uB2E4.
-
-ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR = \uC2A4\uD0A4\uB9C8\uAC00 \uC815\uD655\uD55C\uC9C0 \uD655\uC778\uD560 \uC218 \uC5C6\uC74C: {0}
-
-SCD_NOT_ENABLED = \uC2A4\uD0A4\uB9C8 \uAD6C\uC131 \uC694\uC18C \uC9C0\uC815\uC790 \uC9C0\uC6D0\uC740 \uAE30\uBCF8\uC801\uC73C\uB85C \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC774 \uACF5\uAE09\uC5C5\uCCB4 \uD655\uC7A5\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD558\uC2ED\uC2DC\uC624.
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVAL = \uBD80\uC801\uD569\uD55C SCD: {0}
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVALUATED_EMPTY = SCD "{0}"\uC774(\uAC00) \uC2A4\uD0A4\uB9C8 \uAD6C\uC131 \uC694\uC18C\uC640 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-# SCD = Schema Component Designator.
-ERR_SCD_MATCHED_MULTIPLE_NODES = SCD "{0}"\uC774(\uAC00) {1}\uAC1C\uC758 \uC2A4\uD0A4\uB9C8 \uAD6C\uC131 \uC694\uC18C\uC640 \uC77C\uCE58\uD558\uC9C0\uB9CC \uD55C \uAC1C\uB9CC \uD544\uC694\uD569\uB2C8\uB2E4.
-
-# Not concatenated with any other string (written on a separate line) but printed after (and related to) ERR_SCD_MATCHED_MULTIPLE_NODES, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST = (\uC704 \uC624\uB958\uC640 \uAD00\uB828\uB428) \uC77C\uCE58\uB41C \uC2A4\uD0A4\uB9C8 \uAD6C\uC131 \uC694\uC18C \uC911 \uD558\uB098\uAC00 \uC5EC\uAE30\uC5D0 \uC815\uC758\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-# Not concatenated with any other string (written on a separate line) but printed after (related to ERR_SCD_MATCHED_MULTIPLE_NODES) ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND = (\uC704 \uC624\uB958\uC640 \uAD00\uB828\uB428) \uC77C\uCE58\uB41C \uB2E4\uB978 \uC2A4\uD0A4\uB9C8 \uAD6C\uC131 \uC694\uC18C\uAC00 \uC5EC\uAE30\uC5D0 \uC815\uC758\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-ERR_FILENAME_IS_NOT_URI = \uD30C\uC77C \uC774\uB984\uC774 URI\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
-
-DOMFOREST_INPUTSOURCE_IOEXCEPTION = "{0}"\uC744(\uB97C) \uCC98\uB9AC\uD558\uB294 \uC911 IOException\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uC608\uC678 \uC0AC\uD56D: {1}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_pt_BR.properties
deleted file mode 100644
index 7853db05..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_pt_BR.properties
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-AbstractReferenceFinderImpl.UnableToParse = N\u00E3o \u00E9 poss\u00EDvel fazer parse de "{0}" : {1}
-
-
-
-# {0} - schema location, {1} - (correct) schema location e.g.: "classpath:/foo/bar/Schema.xsd" is not a part of this compilation. Is this a mistake for "file:/bar/foo/Schema2.xsd"? OR "http://localhost:8080/MyService/TestService?wsdl" is not a part of this compilation. Is this a mistake for "http://localhost:8080/MyService/TestService?wsdl#types3"?
-Internalizer.IncorrectSchemaReference = "{0}" n\u00E3o faz parte desta compila\u00E7\u00E3o. \u00C9 um erro do "{1}"?
-
-Internalizer.XPathEvaluationError = Erro de XPath: {0}
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNoTarget = A avalia\u00E7\u00E3o do XPath de "{0}" resulta no n\u00F3 do alvo vazio
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaulatesToTooManyTargets = A avalia\u00E7\u00E3o do XPath de "{0}" resulta em um n\u00FAmero excessivo de n\u00F3s do alvo ({1})
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNonElement = A avalia\u00E7\u00E3o do XPath de "{0}" precisa resultar em um elemento.
-
-Internalizer.XPathEvaluatesToNonSchemaElement = A avalia\u00E7\u00E3o do XPath de "{0}" precisa resultar em um elemento do idioma do esquema, mas resulta em {1}
-
-Internalizer.ContextNodeIsNotElement = O n\u00F3 de contexto n\u00E3o \u00E9 um elemento.
-
-Internalizer.OrphanedCustomization = A personaliza\u00E7\u00E3o "{0}" n\u00E3o est\u00E1 associada a um elemento do esquema.
-
-Internalizer.IncorrectVersion = O atributo da vers\u00E3o JAXB deve ser "1.0"
-
-Internalizer.VersionNotPresent = O atributo da vers\u00E3o JAXB deve estar presente
-
-Internalizer.TwoVersionAttributes = jaxb:version e version est\u00E3o presentes
-
-ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR = N\u00E3o foi poss\u00EDvel garantir a corre\u00E7\u00E3o do esquema: {0}
-
-SCD_NOT_ENABLED = O suporte do designador do componente do esquema foi desativado por default. Use a chave -extension para ativar esta extens\u00E3o do fornecedor.
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVAL = SCD inv\u00E1lido: {0}
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVALUATED_EMPTY = O SCD "{0}" n\u00E3o correspondeu a um componente do esquema
-
-# SCD = Schema Component Designator.
-ERR_SCD_MATCHED_MULTIPLE_NODES = SCD "{0}" correspondia aos componentes do esquema {1}, enquanto s\u00F3 1 era esperado
-
-# Not concatenated with any other string (written on a separate line) but printed after (and related to) ERR_SCD_MATCHED_MULTIPLE_NODES, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST = (relacionado ao item acima) um dos componentes do esquema correspondido foi definido aqui
-
-# Not concatenated with any other string (written on a separate line) but printed after (related to ERR_SCD_MATCHED_MULTIPLE_NODES) ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND = (relacionado ao item acima) outro componente do esquema correspondido foi definido aqui
-
-ERR_FILENAME_IS_NOT_URI = O nome do arquivo n\u00E3o \u00E9 um URI.
-
-DOMFOREST_INPUTSOURCE_IOEXCEPTION = IOException gerada ao processar "{0}". Exce\u00E7\u00E3o: {1}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_zh_CN.properties
deleted file mode 100644
index b62280f3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_zh_CN.properties
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-AbstractReferenceFinderImpl.UnableToParse = \u65E0\u6CD5\u89E3\u6790 "{0}": {1}
-
-
-
-# {0} - schema location, {1} - (correct) schema location e.g.: "classpath:/foo/bar/Schema.xsd" is not a part of this compilation. Is this a mistake for "file:/bar/foo/Schema2.xsd"? OR "http://localhost:8080/MyService/TestService?wsdl" is not a part of this compilation. Is this a mistake for "http://localhost:8080/MyService/TestService?wsdl#types3"?
-Internalizer.IncorrectSchemaReference = "{0}" \u672A\u5305\u542B\u5728\u6B64\u7F16\u8BD1\u4E2D\u3002\u8FD9\u662F\u5426\u5C5E\u4E8E "{1}" \u7684\u9519\u8BEF?
-
-Internalizer.XPathEvaluationError = XPath \u9519\u8BEF: {0}
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNoTarget = "{0}" \u7684 XPath \u6C42\u503C\u751F\u6210\u4E86\u7A7A\u7684\u76EE\u6807\u8282\u70B9
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaulatesToTooManyTargets = "{0}" \u7684 XPath \u6C42\u503C\u751F\u6210\u4E86\u8FC7\u591A\u7684 ({1}) \u76EE\u6807\u8282\u70B9
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNonElement = "{0}" \u7684 XPath \u6C42\u503C\u5FC5\u987B\u751F\u6210\u5143\u7D20\u3002
-
-Internalizer.XPathEvaluatesToNonSchemaElement = "{0}" \u7684 XPath \u6C42\u503C\u5FC5\u987B\u751F\u6210\u6A21\u5F0F\u8BED\u8A00\u7684\u5143\u7D20, \u4F46\u5B9E\u9645\u751F\u6210\u7684\u662F{1}
-
-Internalizer.ContextNodeIsNotElement = \u4E0A\u4E0B\u6587\u8282\u70B9\u4E0D\u662F\u5143\u7D20\u3002
-
-Internalizer.OrphanedCustomization = "{0}" \u5B9A\u5236\u8BBE\u7F6E\u672A\u4E0E\u4EFB\u4F55\u6A21\u5F0F\u5143\u7D20\u5173\u8054\u3002
-
-Internalizer.IncorrectVersion = JAXB \u7248\u672C\u5C5E\u6027\u5FC5\u987B\u4E3A "1.0"
-
-Internalizer.VersionNotPresent = JAXB \u7248\u672C\u5C5E\u6027\u5FC5\u987B\u5B58\u5728
-
-Internalizer.TwoVersionAttributes = jaxb:version \u548C\u7248\u672C\u540C\u65F6\u5B58\u5728
-
-ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR = \u6211\u4EEC\u65E0\u6CD5\u786E\u4FDD\u6A21\u5F0F\u7684\u6B63\u786E\u6027: {0}
-
-SCD_NOT_ENABLED = \u9ED8\u8BA4\u60C5\u51B5\u4E0B\u7981\u7528\u6A21\u5F0F\u7EC4\u4EF6\u6307\u793A\u7B26\u652F\u6301\u3002\u4F7F\u7528 -extension \u5F00\u5173\u53EF\u4EE5\u542F\u7528\u6B64\u4F9B\u5E94\u5546\u6269\u5C55\u3002
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVAL = SCD \u65E0\u6548: {0}
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVALUATED_EMPTY = SCD "{0}" \u4E0D\u5339\u914D\u4EFB\u4F55\u6A21\u5F0F\u7EC4\u4EF6
-
-# SCD = Schema Component Designator.
-ERR_SCD_MATCHED_MULTIPLE_NODES = SCD "{0}" \u5339\u914D {1} \u4E2A\u6A21\u5F0F\u7EC4\u4EF6, \u4F46\u53EA\u5E94\u5339\u914D 1 \u4E2A
-
-# Not concatenated with any other string (written on a separate line) but printed after (and related to) ERR_SCD_MATCHED_MULTIPLE_NODES, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST = (\u4E0E\u4E0A\u6587\u76F8\u5173) \u6B64\u5904\u5B9A\u4E49\u4E86\u67D0\u4E2A\u5339\u914D\u7684\u6A21\u5F0F\u7EC4\u4EF6
-
-# Not concatenated with any other string (written on a separate line) but printed after (related to ERR_SCD_MATCHED_MULTIPLE_NODES) ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND = (\u4E0E\u4E0A\u6587\u76F8\u5173) \u6B64\u5904\u5B9A\u4E49\u4E86\u53E6\u4E00\u4E2A\u5339\u914D\u7684\u6A21\u5F0F\u7EC4\u4EF6
-
-ERR_FILENAME_IS_NOT_URI = \u6587\u4EF6\u540D\u4E0D\u662F URI\u3002
-
-DOMFOREST_INPUTSOURCE_IOEXCEPTION = \u5904\u7406 "{0}" \u65F6\u629B\u51FA IOException\u3002\u5F02\u5E38\u9519\u8BEF: {1}\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_zh_TW.properties
deleted file mode 100644
index afb90de5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_zh_TW.properties
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-AbstractReferenceFinderImpl.UnableToParse = \u7121\u6CD5\u5256\u6790 "{0}" : {1}
-
-
-
-# {0} - schema location, {1} - (correct) schema location e.g.: "classpath:/foo/bar/Schema.xsd" is not a part of this compilation. Is this a mistake for "file:/bar/foo/Schema2.xsd"? OR "http://localhost:8080/MyService/TestService?wsdl" is not a part of this compilation. Is this a mistake for "http://localhost:8080/MyService/TestService?wsdl#types3"?
-Internalizer.IncorrectSchemaReference = "{0}" \u4E0D\u662F\u6B64\u7DE8\u8B6F\u7684\u4E00\u90E8\u5206. \u9019\u662F "{1}" \u7684\u932F\u8AA4\u55CE?
-
-Internalizer.XPathEvaluationError = XPath \u932F\u8AA4: {0}
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNoTarget = "{0}" \u7684 XPath \u8A55\u4F30\u5C0E\u81F4\u7A7A\u767D\u7684\u76EE\u6A19\u7BC0\u9EDE
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaulatesToTooManyTargets = "{0}" \u7684 XPath \u8A55\u4F30\u5C0E\u81F4\u592A\u591A ({1}) \u76EE\u6A19\u7BC0\u9EDE
-
-# {0} - xpath location (location of element/node/... in XML) e.g.: XPath evaluation of "/foo/bar" needs to result in an element.
-Internalizer.XPathEvaluatesToNonElement = "{0}" \u7684 XPath \u8A55\u4F30\u7D50\u679C\u5FC5\u9808\u662F\u4E00\u500B\u5143\u7D20.
-
-Internalizer.XPathEvaluatesToNonSchemaElement = "{0}" \u7684 XPath \u8A55\u4F30\u5FC5\u9808\u7522\u751F\u7DB1\u8981\u8A9E\u8A00\u7684\u5143\u7D20, \u4F46\u5176\u7522\u751F {1}
-
-Internalizer.ContextNodeIsNotElement = \u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u7BC0\u9EDE\u4E0D\u662F\u5143\u7D20.
-
-Internalizer.OrphanedCustomization = "{0}" \u81EA\u8A02\u9805\u76EE\u672A\u8207\u4EFB\u4F55\u7DB1\u8981\u5143\u7D20\u76F8\u95DC\u806F.
-
-Internalizer.IncorrectVersion = JAXB \u7248\u672C\u5C6C\u6027\u5FC5\u9808\u70BA "1.0"
-
-Internalizer.VersionNotPresent = \u5FC5\u9808\u6709 JAXB \u7248\u672C\u5C6C\u6027
-
-Internalizer.TwoVersionAttributes = jaxb:version \u8207 version \u5747\u5B58\u5728
-
-ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR = \u6211\u5011\u7121\u6CD5\u78BA\u5B9A\u7DB1\u8981\u7684\u6B63\u78BA\u6027: {0}
-
-SCD_NOT_ENABLED = \u7DB1\u8981\u5143\u4EF6\u6307\u793A\u9805\u652F\u63F4\u9810\u8A2D\u70BA\u505C\u7528. \u8ACB\u4F7F\u7528 -extension \u53C3\u6578\u555F\u7528\u6B64\u5EE0\u5546\u64F4\u5145\u5957\u4EF6.
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVAL = \u7121\u6548\u7684 SCD: {0}
-
-# SCD = Schema Component Designator.
-ERR_SCD_EVALUATED_EMPTY = SCD "{0}" \u4E0D\u7B26\u5408\u4EFB\u4F55\u7DB1\u8981\u5143\u4EF6
-
-# SCD = Schema Component Designator.
-ERR_SCD_MATCHED_MULTIPLE_NODES = SCD "{0}" \u8207 {1} \u500B\u7DB1\u8981\u5143\u4EF6\u76F8\u7B26, \u800C\u9810\u671F\u53EA\u80FD\u8207 1 \u500B\u7DB1\u8981\u5143\u4EF6\u76F8\u7B26
-
-# Not concatenated with any other string (written on a separate line) but printed after (and related to) ERR_SCD_MATCHED_MULTIPLE_NODES, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST = (\u8207\u4E0A\u8FF0\u932F\u8AA4\u6709\u95DC) \u5176\u4E2D\u4E00\u500B\u76F8\u7B26\u7684\u7DB1\u8981\u5143\u4EF6\u5B9A\u7FA9\u65BC\u6B64\u8655
-
-# Not concatenated with any other string (written on a separate line) but printed after (related to ERR_SCD_MATCHED_MULTIPLE_NODES) ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST, followed by a line with the position of the problem in a particular file.
-ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND = (\u8207\u4E0A\u8FF0\u932F\u8AA4\u6709\u95DC) \u53E6\u4E00\u500B\u76F8\u7B26\u7684\u7DB1\u8981\u5143\u4EF6\u5B9A\u7FA9\u65BC\u6B64\u8655
-
-ERR_FILENAME_IS_NOT_URI = \u6A94\u6848\u540D\u7A31\u4E0D\u662F URI.
-
-DOMFOREST_INPUTSOURCE_IOEXCEPTION = \u8655\u7406 "{0}" \u6642\u767C\u751F IOException. \u7570\u5E38\u72C0\u6CC1: {1}.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/Messages.java
deleted file mode 100644
index cea756bc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/Messages.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.internalizer;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-class Messages
-{
- /** Loads a string resource and formats it with specified arguments. */
- static String format( String property, Object... args ) {
- String text = ResourceBundle.getBundle(Messages.class.getPackage().getName() +".MessageBundle").getString(property);
- return MessageFormat.format(text,args);
- }
-
- static final String ERR_INCORRECT_SCHEMA_REFERENCE = // args:2
- "Internalizer.IncorrectSchemaReference";
- static final String ERR_XPATH_EVAL = // arg:1
- "Internalizer.XPathEvaluationError";
- static final String NO_XPATH_EVAL_TO_NO_TARGET = // arg:1
- "Internalizer.XPathEvaluatesToNoTarget";
- static final String NO_XPATH_EVAL_TOO_MANY_TARGETS = // arg:2
- "Internalizer.XPathEvaulatesToTooManyTargets";
- static final String NO_XPATH_EVAL_TO_NON_ELEMENT = // arg:1
- "Internalizer.XPathEvaluatesToNonElement";
- static final String XPATH_EVAL_TO_NON_SCHEMA_ELEMENT = // arg:2
- "Internalizer.XPathEvaluatesToNonSchemaElement";
- static final String SCD_NOT_ENABLED = // arg:0
- "SCD_NOT_ENABLED";
- static final String ERR_SCD_EVAL = // arg: 1
- "ERR_SCD_EVAL";
- static final String ERR_SCD_EVALUATED_EMPTY = // arg:1
- "ERR_SCD_EVALUATED_EMPTY";
- static final String ERR_SCD_MATCHED_MULTIPLE_NODES = // arg:2
- "ERR_SCD_MATCHED_MULTIPLE_NODES";
- static final String ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST = // arg:1
- "ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST";
- static final String ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND = // arg:1
- "ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND";
- static final String CONTEXT_NODE_IS_NOT_ELEMENT = // arg:0
- "Internalizer.ContextNodeIsNotElement";
- static final String ERR_INCORRECT_VERSION = // arg:0
- "Internalizer.IncorrectVersion";
- static final String ERR_VERSION_NOT_FOUND = // arg:0
- "Internalizer.VersionNotPresent";
- static final String TWO_VERSION_ATTRIBUTES = // arg:0
- "Internalizer.TwoVersionAttributes";
- static final String ORPHANED_CUSTOMIZATION = // arg:1
- "Internalizer.OrphanedCustomization";
- static final String ERR_UNABLE_TO_PARSE = // arg:2
- "AbstractReferenceFinderImpl.UnableToParse";
- static final String ERR_FILENAME_IS_NOT_URI = // arg:0
- "ERR_FILENAME_IS_NOT_URI";
- static final String ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR = // arg:1
- "ERR_GENERAL_SCHEMA_CORRECTNESS_ERROR";
- static final String DOMFOREST_INPUTSOURCE_IOEXCEPTION = // arg:2
- "DOMFOREST_INPUTSOURCE_IOEXCEPTION";
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/NamespaceContextImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/NamespaceContextImpl.java
deleted file mode 100644
index 058c2406..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/NamespaceContextImpl.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
- /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.tools.internal.xjc.reader.internalizer;
-
-import java.util.Iterator;
-import javax.xml.XMLConstants;
-import javax.xml.namespace.NamespaceContext;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * Implements {@link NamespaceContext} by looking at the in-scope
- * namespace binding of a DOM element.
- *
- * @author Kohsuke Kawaguchi
- */
-final class NamespaceContextImpl implements NamespaceContext {
- private final Element e;
-
- public NamespaceContextImpl(Element e) {
- this.e = e;
- }
-
- public String getNamespaceURI(String prefix) {
- Node parent = e;
- String namespace = null;
- final String prefixColon = prefix + ':';
-
- if (prefix.equals("xml")) {
- namespace = XMLConstants.XML_NS_URI;
- } else {
- int type;
-
- while ((null != parent) && (null == namespace)
- && (((type = parent.getNodeType()) == Node.ELEMENT_NODE)
- || (type == Node.ENTITY_REFERENCE_NODE))) {
- if (type == Node.ELEMENT_NODE) {
- if (parent.getNodeName().startsWith(prefixColon))
- return parent.getNamespaceURI();
- NamedNodeMap nnm = parent.getAttributes();
-
- for (int i = 0; i < nnm.getLength(); i++) {
- Node attr = nnm.item(i);
- String aname = attr.getNodeName();
- boolean isPrefix = aname.startsWith("xmlns:");
-
- if (isPrefix || aname.equals("xmlns")) {
- int index = aname.indexOf(':');
- String p = isPrefix ? aname.substring(index + 1) : "";
-
- if (p.equals(prefix)) {
- namespace = attr.getNodeValue();
-
- break;
- }
- }
- }
- }
-
- parent = parent.getParentNode();
- }
- }
-
- if(prefix.equals(""))
- return ""; // default namespace
- return namespace;
- }
-
- public String getPrefix(String namespaceURI) {
- throw new UnsupportedOperationException();
- }
-
- public Iterator getPrefixes(String namespaceURI) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/SCDBasedBindingSet.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/SCDBasedBindingSet.java
deleted file mode 100644
index 9e539590..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/SCDBasedBindingSet.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.internalizer;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.UnmarshallerHandler;
-import javax.xml.validation.ValidatorHandler;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.SAXParseException2;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIDeclaration;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BindInfo;
-import com.sun.tools.internal.xjc.util.ForkContentHandler;
-import com.sun.tools.internal.xjc.util.DOMUtils;
-import com.sun.xml.internal.xsom.SCD;
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * Set of binding nodes that have target nodes specified via SCD.
- *
- * This is parsed during {@link Internalizer} works on the tree,
- * but applying this has to wait for {@link XSSchemaSet} to be parsed.
- *
- * @author Kohsuke Kawaguchi
- * @see SCD
- */
-public final class SCDBasedBindingSet {
-
- /**
- * Represents the target schema component of the
- * customization identified by SCD.
- *
- * @author Kohsuke Kawaguchi
- */
- final class Target {
- /**
- * SCDs can be specified via multiple steps, like:
- *
- * <xmp>
- * <bindings scd="foo/bar">
- * <bindings scd="zot/xyz">
- * </xmp>
- *
- * This field and {@link #nextSibling} form a single-linked list that
- * represent the children that shall be evaluated within this target.
- * Think of it as {@code List<Target>}.
- */
- private Target firstChild;
- private final Target nextSibling;
-
- /**
- * Compiled SCD.
- */
- private final @NotNull SCD scd;
-
- /**
- * The element on which SCD was found.
- */
- private final @NotNull Element src;
-
- /**
- * Bindings that apply to this SCD.
- */
- private final List<Element> bindings = new ArrayList<Element>();
-
- private Target(Target parent, Element src, SCD scd) {
- if(parent==null) {
- this.nextSibling = topLevel;
- topLevel = this;
- } else {
- this.nextSibling = parent.firstChild;
- parent.firstChild = this;
- }
- this.src = src;
- this.scd = scd;
- }
-
- /**
- * Adds a new binding declaration to be associated to the schema component
- * identified by {@link #scd}.
- */
- void addBinidng(Element binding) {
- bindings.add(binding);
- }
-
- /**
- * Applies bindings to the schema component for this and its siblings.
- */
- private void applyAll(Collection<? extends XSComponent> contextNode) {
- for( Target self=this; self!=null; self=self.nextSibling )
- self.apply(contextNode);
- }
-
- /**
- * Applies bindings to the schema component for just this node.
- */
- private void apply(Collection<? extends XSComponent> contextNode) {
- // apply the SCD...
- Collection<XSComponent> childNodes = scd.select(contextNode);
- if(childNodes.isEmpty()) {
- // no node matched
- if(src.getAttributeNode("if-exists")!=null) {
- // if this attribute exists, it's not an error if SCD didn't match.
- return;
- }
-
- reportError( src, Messages.format(Messages.ERR_SCD_EVALUATED_EMPTY,scd) );
- return;
- }
-
- if(firstChild!=null)
- firstChild.applyAll(childNodes);
-
- if(!bindings.isEmpty()) {
- // error to match more than one components
- Iterator<XSComponent> itr = childNodes.iterator();
- XSComponent target = itr.next();
- if(itr.hasNext()) {
- reportError( src, Messages.format(Messages.ERR_SCD_MATCHED_MULTIPLE_NODES,scd,childNodes.size()) );
- errorReceiver.error( target.getLocator(), Messages.format(Messages.ERR_SCD_MATCHED_MULTIPLE_NODES_FIRST) );
- errorReceiver.error( itr.next().getLocator(), Messages.format(Messages.ERR_SCD_MATCHED_MULTIPLE_NODES_SECOND) );
- }
-
- // apply bindings to the target
- for (Element binding : bindings) {
- for (Element item : DOMUtils.getChildElements(binding)) {
- String localName = item.getLocalName();
-
- if ("bindings".equals(localName))
- continue; // this should be already in Target.bindings of some SpecVersion.
-
- try {
- new DOMForestScanner(forest).scan(item,loader);
- BIDeclaration decl = (BIDeclaration)unmarshaller.getResult();
-
- // add this binding to the target
- XSAnnotation ann = target.getAnnotation(true);
- BindInfo bi = (BindInfo)ann.getAnnotation();
- if(bi==null) {
- bi = new BindInfo();
- ann.setAnnotation(bi);
- }
- bi.addDecl(decl);
- } catch (SAXException e) {
- // the error should have already been reported.
- } catch (JAXBException e) {
- // if validation didn't fail, then unmarshalling can't go wrong
- throw new AssertionError(e);
- }
- }
- }
- }
- }
- }
-
- private Target topLevel;
-
- /**
- * The forest where binding elements came from. Needed to report line numbers for errors.
- */
- private final DOMForest forest;
-
-
- // variables used only during the apply method
- //
- private ErrorReceiver errorReceiver;
- private UnmarshallerHandler unmarshaller;
- private ForkContentHandler loader; // unmarshaller+validator
-
- SCDBasedBindingSet(DOMForest forest) {
- this.forest = forest;
- }
-
- Target createNewTarget(Target parent, Element src, SCD scd) {
- return new Target(parent,src,scd);
- }
-
- /**
- * Applies the additional binding customizations.
- */
- public void apply(XSSchemaSet schema, ErrorReceiver errorReceiver) {
- if(topLevel!=null) {
- this.errorReceiver = errorReceiver;
- Unmarshaller u = BindInfo.getCustomizationUnmarshaller();
- this.unmarshaller = u.getUnmarshallerHandler();
- ValidatorHandler v = BindInfo.bindingFileSchema.newValidator();
- v.setErrorHandler(errorReceiver);
- loader = new ForkContentHandler(v,unmarshaller);
-
- topLevel.applyAll(schema.getSchemas());
-
- this.loader = null;
- this.unmarshaller = null;
- this.errorReceiver = null;
- }
- }
-
- private void reportError( Element errorSource, String formattedMsg ) {
- reportError( errorSource, formattedMsg, null );
- }
-
- private void reportError( Element errorSource,
- String formattedMsg, Exception nestedException ) {
-
- SAXParseException e = new SAXParseException2( formattedMsg,
- forest.locatorTable.getStartLocation(errorSource),
- nestedException );
- errorReceiver.error(e);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/VersionChecker.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/VersionChecker.java
deleted file mode 100644
index 75cc1208..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/VersionChecker.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.internalizer;
-
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Arrays;
-
-import com.sun.tools.internal.xjc.reader.Const;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.LocatorImpl;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * Checks the jaxb:version attribute on a XML Schema document.
- *
- * jaxb:version is optional if no binding customization is used,
- * but if present, its value must be "1.0".
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class VersionChecker extends XMLFilterImpl {
-
- /**
- * We store the value of the version attribute in this variable
- * when we hit the root element.
- */
- private String version = null ;
-
- /** Will be set to true once we hit the root element. */
- private boolean seenRoot = false;
-
- /** Will be set to true once we hit a binding declaration. */
- private boolean seenBindings = false;
-
- private Locator locator;
-
- /**
- * Stores the location of the start tag of the root tag.
- */
- private Locator rootTagStart;
-
- public VersionChecker( XMLReader parent ) {
- setParent(parent);
- }
-
- public VersionChecker( ContentHandler handler,ErrorHandler eh,EntityResolver er ) {
- setContentHandler(handler);
- if(eh!=null) setErrorHandler(eh);
- if(er!=null) setEntityResolver(er);
- }
-
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
- throws SAXException {
-
- super.startElement(namespaceURI, localName, qName, atts);
-
- if(!seenRoot) {
- // if this is the root element
- seenRoot = true;
- rootTagStart = new LocatorImpl(locator);
-
- version = atts.getValue(Const.JAXB_NSURI,"version");
- if( namespaceURI.equals(Const.JAXB_NSURI) ) {
- String version2 = atts.getValue("","version");
- if( version!=null && version2!=null ) {
- // we have both @version and @jaxb:version. error.
- SAXParseException e = new SAXParseException(
- Messages.format( Messages.TWO_VERSION_ATTRIBUTES ), locator );
- getErrorHandler().error(e);
- }
- if( version==null )
- version = version2;
- }
-
- }
-
- if( Const.JAXB_NSURI.equals(namespaceURI) )
- seenBindings = true;
- }
-
- public void endDocument() throws SAXException {
- super.endDocument();
-
- if( seenBindings && version==null ) {
- // if we see a binding declaration but not version attribute
- SAXParseException e = new SAXParseException(
- Messages.format(Messages.ERR_VERSION_NOT_FOUND),rootTagStart);
- getErrorHandler().error(e);
- }
-
- // if present, the value must be either 1.0 or 2.0
- if( version!=null && !VERSIONS.contains(version) ) {
- SAXParseException e = new SAXParseException(
- Messages.format(Messages.ERR_INCORRECT_VERSION),rootTagStart);
- getErrorHandler().error(e);
- }
- }
-
- public void setDocumentLocator(Locator locator) {
- super.setDocumentLocator(locator);
- this.locator = locator;
- }
-
- private static final Set<String> VERSIONS = new HashSet<String>(Arrays.asList("1.0","2.0","2.1"));
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/WhitespaceStripper.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/WhitespaceStripper.java
deleted file mode 100644
index 4f2afc27..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/WhitespaceStripper.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.internalizer;
-
-import com.sun.xml.internal.bind.WhiteSpaceProcessor;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * Strips ignorable whitespace from SAX event stream.
- *
- * <p>
- * This filter works only when the event stream doesn't
- * contain any mixed content.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-class WhitespaceStripper extends XMLFilterImpl {
-
- private int state = 0;
-
- private char[] buf = new char[1024];
- private int bufLen = 0;
-
- private static final int AFTER_START_ELEMENT = 1;
- private static final int AFTER_END_ELEMENT = 2;
-
- public WhitespaceStripper(XMLReader reader) {
- setParent(reader);
- }
-
- public WhitespaceStripper(ContentHandler handler,ErrorHandler eh,EntityResolver er) {
- setContentHandler(handler);
- if(eh!=null) setErrorHandler(eh);
- if(er!=null) setEntityResolver(er);
- }
-
- public void characters(char[] ch, int start, int length) throws SAXException {
- switch(state) {
- case AFTER_START_ELEMENT:
- // we have to store the characters here, even if it consists entirely
- // of whitespaces. This is because successive characters event might
- // include non-whitespace char, in which case all the whitespaces in
- // this event may suddenly become significant.
- if( bufLen+length>buf.length ) {
- // reallocate buffer
- char[] newBuf = new char[Math.max(bufLen+length,buf.length*2)];
- System.arraycopy(buf,0,newBuf,0,bufLen);
- buf = newBuf;
- }
- System.arraycopy(ch,start,buf,bufLen,length);
- bufLen += length;
- break;
- case AFTER_END_ELEMENT:
- // check if this is ignorable.
- int len = start+length;
- for( int i=start; i<len; i++ )
- if( !WhiteSpaceProcessor.isWhiteSpace(ch[i]) ) {
- super.characters(ch, start, length);
- return;
- }
- // if it's entirely whitespace, ignore it.
- break;
- }
- }
-
- public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
- processPendingText();
- super.startElement(uri, localName, qName, atts);
- state = AFTER_START_ELEMENT;
- bufLen = 0;
- }
-
- public void endElement(String uri, String localName, String qName) throws SAXException {
- processPendingText();
- super.endElement(uri, localName, qName);
- state = AFTER_END_ELEMENT;
- }
-
- /**
- * Forwars the buffered characters if it contains any non-whitespace
- * character.
- */
- private void processPendingText() throws SAXException {
- if(state==AFTER_START_ELEMENT) {
- for( int i=bufLen-1; i>=0; i-- )
- if( !WhiteSpaceProcessor.isWhiteSpace(buf[i]) ) {
- super.characters(buf, 0, bufLen);
- return;
- }
- }
- }
-
- public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
- // ignore completely.
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/package.html b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/package.html
deleted file mode 100644
index e8c0263d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<body><p>internalization of external binding files and &lt;jaxb:bindings> customizations.</p></body>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/package.html b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/package.html
deleted file mode 100644
index d912b3eb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<body><p>Front-end that reads schema(s) and produce BGM.</p></body>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/BindStyle.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/BindStyle.java
deleted file mode 100644
index e2282920..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/BindStyle.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.relaxng;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-enum BindStyle {
- TYPE, ELEMENT
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/ContentModelBinder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/ContentModelBinder.java
deleted file mode 100644
index d1cbc077..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/ContentModelBinder.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.relaxng;
-
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.model.CAttributePropertyInfo;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CElementPropertyInfo;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-import com.sun.tools.internal.xjc.model.Multiplicity;
-import com.sun.tools.internal.xjc.reader.RawTypeSet;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-
-import com.sun.xml.internal.rngom.digested.DAttributePattern;
-import com.sun.xml.internal.rngom.digested.DChoicePattern;
-import com.sun.xml.internal.rngom.digested.DMixedPattern;
-import com.sun.xml.internal.rngom.digested.DOneOrMorePattern;
-import com.sun.xml.internal.rngom.digested.DOptionalPattern;
-import com.sun.xml.internal.rngom.digested.DPattern;
-import com.sun.xml.internal.rngom.digested.DPatternWalker;
-import com.sun.xml.internal.rngom.digested.DZeroOrMorePattern;
-
-import static com.sun.tools.internal.xjc.model.CElementPropertyInfo.CollectionMode.REPEATED_ELEMENT;
-
-/**
- * Recursively visits {@link DPattern} and
- * decides which patterns to map to properties.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ContentModelBinder extends DPatternWalker {
- private final RELAXNGCompiler compiler;
- private final CClassInfo clazz;
-
- private boolean insideOptional = false;
- private int iota=1;
-
- public ContentModelBinder(RELAXNGCompiler compiler,CClassInfo clazz) {
- this.compiler = compiler;
- this.clazz = clazz;
- }
-
- public Void onMixed(DMixedPattern p) {
- throw new UnsupportedOperationException();
- }
-
- public Void onChoice(DChoicePattern p) {
- boolean old = insideOptional;
- insideOptional = true;
- super.onChoice(p);
- insideOptional = old;
- return null;
- }
-
- public Void onOptional(DOptionalPattern p) {
- boolean old = insideOptional;
- insideOptional = true;
- super.onOptional(p);
- insideOptional = old;
- return null;
- }
-
- public Void onZeroOrMore(DZeroOrMorePattern p) {
- return onRepeated(p,true);
- }
-
- public Void onOneOrMore(DOneOrMorePattern p) {
- return onRepeated(p,insideOptional);
-
- }
-
- private Void onRepeated(DPattern p,boolean optional) {
- RawTypeSet rts = RawTypeSetBuilder.build(compiler, p, optional? Multiplicity.STAR : Multiplicity.PLUS);
- if(rts.canBeTypeRefs==RawTypeSet.Mode.SHOULD_BE_TYPEREF) {
- CElementPropertyInfo prop = new CElementPropertyInfo(
- calcName(p),REPEATED_ELEMENT,ID.NONE,null,null,null,p.getLocation(),!optional);
- rts.addTo(prop);
- clazz.addProperty(prop);
- } else {
- CReferencePropertyInfo prop = new CReferencePropertyInfo(
- calcName(p),true,!optional,false/*TODO*/,null,null,p.getLocation(), false, false, false);
- rts.addTo(prop);
- clazz.addProperty(prop);
- }
-
- return null;
- }
-
- public Void onAttribute(DAttributePattern p) {
- // TODO: support multiple names
- QName name = p.getName().listNames().iterator().next();
-
- CAttributePropertyInfo ap = new CAttributePropertyInfo(
- calcName(p), null,null/*TODO*/, p.getLocation(), name,
- p.getChild().accept(compiler.typeUseBinder), null,
- !insideOptional);
- clazz.addProperty(ap);
-
- return null;
- }
-
- private String calcName(DPattern p) {
- // TODO
- return "field"+(iota++);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/DatatypeLib.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/DatatypeLib.java
deleted file mode 100644
index 9ec264d6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/DatatypeLib.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.relaxng;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.reader.xmlschema.SimpleTypeBuilder;
-
-import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
-
-/**
- * Data-bindable datatype library.
- *
- * @author Kohsuke Kawaguchi
- */
-final class DatatypeLib {
- /**
- * Datatype library's namespace URI.
- */
- public final String nsUri;
-
- private final Map<String,TypeUse> types = new HashMap<String,TypeUse>();
-
- public DatatypeLib(String nsUri) {
- this.nsUri = nsUri;
- }
-
- /**
- * Maps the type name to the information.
- */
- TypeUse get(String name) {
- return types.get(name);
- }
-
- /**
- * Datatype library for the built-in type.
- */
- public static final DatatypeLib BUILTIN = new DatatypeLib("");
-
- /**
- * Datatype library for XML Schema datatypes.
- */
- public static final DatatypeLib XMLSCHEMA = new DatatypeLib(WellKnownNamespaces.XML_SCHEMA_DATATYPES);
-
- static {
- BUILTIN.types.put("token",CBuiltinLeafInfo.TOKEN);
- BUILTIN.types.put("string",CBuiltinLeafInfo.STRING);
- XMLSCHEMA.types.putAll(SimpleTypeBuilder.builtinConversions);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/DefineFinder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/DefineFinder.java
deleted file mode 100644
index eb7ccaf7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/DefineFinder.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.relaxng;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import com.sun.xml.internal.rngom.digested.DDefine;
-import com.sun.xml.internal.rngom.digested.DGrammarPattern;
-import com.sun.xml.internal.rngom.digested.DPatternWalker;
-import com.sun.xml.internal.rngom.digested.DRefPattern;
-
-/**
- * Recursively find all {@link DDefine}s in the grammar.
- *
- * @author Kohsuke Kawaguchi
- */
-final class DefineFinder extends DPatternWalker {
-
- public final Set<DDefine> defs = new HashSet<DDefine>();
-
- public Void onGrammar(DGrammarPattern p) {
- for( DDefine def : p ) {
- defs.add(def);
- def.getPattern().accept(this);
- }
-
- return p.getStart().accept(this);
- }
-
- /**
- * We visit all {@link DDefine}s from {@link DGrammarPattern},
- * so no point in resolving refs.
- */
- public Void onRef(DRefPattern p) {
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/NameCalculator.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/NameCalculator.java
deleted file mode 100644
index 3c7f0105..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/NameCalculator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.relaxng;
-
-import com.sun.xml.internal.rngom.digested.DPatternWalker;
-
-/**
- * Decides the name for a particle.
- * @author Kohsuke Kawaguchi
- */
-class NameCalculator extends DPatternWalker {
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/RELAXNGCompiler.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/RELAXNGCompiler.java
deleted file mode 100644
index 03cfbf5e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/RELAXNGCompiler.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.relaxng;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CClassInfoParent;
-import com.sun.tools.internal.xjc.model.CEnumConstant;
-import com.sun.tools.internal.xjc.model.CEnumLeafInfo;
-import com.sun.tools.internal.xjc.model.CNonElement;
-import com.sun.tools.internal.xjc.model.CTypeInfo;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-
-import com.sun.xml.internal.rngom.digested.DChoicePattern;
-import com.sun.xml.internal.rngom.digested.DDefine;
-import com.sun.xml.internal.rngom.digested.DElementPattern;
-import com.sun.xml.internal.rngom.digested.DPattern;
-import com.sun.xml.internal.rngom.digested.DPatternWalker;
-import com.sun.xml.internal.rngom.digested.DRefPattern;
-import com.sun.xml.internal.rngom.digested.DValuePattern;
-import com.sun.xml.internal.rngom.nc.NameClass;
-import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public final class RELAXNGCompiler {
- /**
- * Schema to compile.
- */
- final DPattern grammar;
-
- /**
- * All named patterns in this schema.
- */
- final Set<DDefine> defs;
-
- final Options opts;
-
- final Model model;
-
- /**
- * The package to which we generate the code into.
- */
- final JPackage pkg;
-
- final Map<String,DatatypeLib> datatypes = new HashMap<String, DatatypeLib>();
-
- /**
- * Patterns that are mapped to Java concepts.
- *
- * <p>
- * The value is an array because we map elements with finite names
- * to multiple classes.
- *
- * TODO: depending on the type of the key, the type of the values can be further
- * restricted. Make this into its own class to represent those constraints better.
- */
- final Map<DPattern,CTypeInfo[]> classes = new HashMap<DPattern,CTypeInfo[]>();
-
- /**
- * Classes that need to be bound.
- *
- * The value is the content model to be bound.
- */
- final Map<CClassInfo,DPattern> bindQueue = new HashMap<CClassInfo,DPattern>();
-
- final TypeUseBinder typeUseBinder = new TypeUseBinder(this);
-
- public static Model build(DPattern grammar, JCodeModel codeModel, Options opts ) {
- RELAXNGCompiler compiler = new RELAXNGCompiler(grammar, codeModel, opts);
- compiler.compile();
- return compiler.model;
- }
-
- public RELAXNGCompiler(DPattern grammar, JCodeModel codeModel, Options opts) {
- this.grammar = grammar;
- this.opts = opts;
- this.model = new Model(opts,codeModel, NameConverter.smart,opts.classNameAllocator,null);
-
- datatypes.put("",DatatypeLib.BUILTIN);
- datatypes.put(WellKnownNamespaces.XML_SCHEMA_DATATYPES,DatatypeLib.XMLSCHEMA);
-
- // find all defines
- DefineFinder deff = new DefineFinder();
- grammar.accept(deff);
- this.defs = deff.defs;
-
- if(opts.defaultPackage2!=null)
- pkg = codeModel._package(opts.defaultPackage2);
- else
- if(opts.defaultPackage!=null)
- pkg = codeModel._package(opts.defaultPackage);
- else
- pkg = codeModel.rootPackage();
- }
-
- private void compile() {
- // decide which patterns to map to classes
- promoteElementDefsToClasses();
- promoteTypeSafeEnums();
- // TODO: promote patterns with <jaxb:class> to classes
- // TODO: promote 'type' patterns to classes
- promoteTypePatternsToClasses();
-
- for (Map.Entry<CClassInfo,DPattern> e : bindQueue.entrySet())
- bindContentModel(e.getKey(),e.getValue());
- }
-
- private void bindContentModel(CClassInfo clazz, DPattern pattern) {
- // first we decide which patterns in it map to properties
- // then we process each of them by using RawTypeSetBuilder.
- // much like DefaultParticleBinder in XSD
- pattern.accept(new ContentModelBinder(this,clazz));
- }
-
- private void promoteTypeSafeEnums() {
- // we'll be trying a lot of choices,
- // and most of them will not be type-safe enum.
- // using the same list improves the memory efficiency.
- List<CEnumConstant> members = new ArrayList<CEnumConstant>();
-
- OUTER:
- for( DDefine def : defs ) {
- DPattern p = def.getPattern();
- if (p instanceof DChoicePattern) {
- DChoicePattern cp = (DChoicePattern) p;
-
- members.clear();
-
- // check if the choice consists of all value patterns
- // and that they are of the same datatype
- DValuePattern vp = null;
-
- for( DPattern child : cp ) {
- if(child instanceof DValuePattern) {
- DValuePattern c = (DValuePattern) child;
- if(vp==null)
- vp=c;
- else {
- if(!vp.getDatatypeLibrary().equals(c.getDatatypeLibrary())
- || !vp.getType().equals(c.getType()) )
- continue OUTER; // different type name
- }
-
- members.add(new CEnumConstant(
- model.getNameConverter().toConstantName(c.getValue()),
- null, c.getValue(), null, null/*TODO*/, c.getLocation()
- ));
- } else
- continue OUTER; // not a value
- }
-
- if(members.isEmpty())
- continue; // empty choice
-
- CNonElement base = CBuiltinLeafInfo.STRING;
-
- DatatypeLib lib = datatypes.get(vp.getNs());
- if(lib!=null) {
- TypeUse use = lib.get(vp.getType());
- if(use instanceof CNonElement)
- base = (CNonElement)use;
- }
-
- CEnumLeafInfo xducer = new CEnumLeafInfo(model, null,
- new CClassInfoParent.Package(pkg), def.getName(), base,
- new ArrayList<CEnumConstant>(members),
- null, null/*TODO*/, cp.getLocation());
-
- classes.put(cp,new CTypeInfo[]{xducer});
- }
- }
- }
-
-
- private void promoteElementDefsToClasses() {
- // look for elements among named patterns
- for( DDefine def : defs ) {
- DPattern p = def.getPattern();
- if (p instanceof DElementPattern) {
- DElementPattern ep = (DElementPattern) p;
-
- mapToClass(ep);
- }
- }
-
- // also look for root elements
- grammar.accept(new DPatternWalker() {
- public Void onRef(DRefPattern p) {
- return null; // stop recursion
- }
-
- public Void onElement(DElementPattern p) {
- mapToClass(p);
- return null;
- }
- });
- }
-
- private void mapToClass(DElementPattern p) {
- NameClass nc = p.getName();
- if(nc.isOpen())
- return; // infinite name. can't map to a class.
-
- Set<QName> names = nc.listNames();
-
- CClassInfo[] types = new CClassInfo[names.size()];
- int i=0;
- for( QName n : names ) {
- // TODO: read class names from customization
- String name = model.getNameConverter().toClassName(n.getLocalPart());
-
- bindQueue.put(
- types[i++] = new CClassInfo(model,pkg,name,p.getLocation(),null,n,null,null/*TODO*/),
- p.getChild() );
- }
-
- classes.put(p,types);
- }
-
- /**
- * Looks for named patterns that are not bound to classes so far,
- * but that can be bound to classes.
- */
- private void promoteTypePatternsToClasses() {
-
-// for( DDefine def : defs ) {
-// ;
-//
-// def.getPattern().accept(new InheritanceChecker());
-// }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/RELAXNGInternalizationLogic.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/RELAXNGInternalizationLogic.java
deleted file mode 100644
index 0f0a672f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/RELAXNGInternalizationLogic.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.relaxng;
-
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.tools.internal.xjc.reader.internalizer.AbstractReferenceFinderImpl;
-import com.sun.tools.internal.xjc.reader.internalizer.DOMForest;
-import com.sun.tools.internal.xjc.reader.internalizer.InternalizationLogic;
-
-import org.w3c.dom.Element;
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * RELAX NG specific internalization logic.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class RELAXNGInternalizationLogic implements InternalizationLogic {
-
- /**
- * This filter looks for &lt;xs:import> and &lt;xs:include>
- * and parses those documents referenced by them.
- */
- private static final class ReferenceFinder extends AbstractReferenceFinderImpl {
- ReferenceFinder( DOMForest parent ) {
- super(parent);
- }
-
- protected String findExternalResource( String nsURI, String localName, Attributes atts) {
- if( Const.RELAXNG_URI.equals(nsURI)
- && ("include".equals(localName) || "externalRef".equals(localName) ) )
- return atts.getValue("href");
- else
- return null;
- }
- };
-
- public XMLFilterImpl createExternalReferenceFinder(DOMForest parent) {
- return new ReferenceFinder(parent);
- }
-
- public boolean checkIfValidTargetNode(DOMForest parent, Element bindings, Element target) {
- return Const.RELAXNG_URI.equals(target.getNamespaceURI());
- }
-
- public Element refineTarget(Element target) {
- // no refinement necessary
- return target;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/RawTypeSetBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/RawTypeSetBuilder.java
deleted file mode 100644
index 623c90bb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/RawTypeSetBuilder.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.relaxng;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CElementPropertyInfo;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-import com.sun.tools.internal.xjc.model.CTypeInfo;
-import com.sun.tools.internal.xjc.model.CTypeRef;
-import com.sun.tools.internal.xjc.model.Multiplicity;
-import com.sun.tools.internal.xjc.reader.RawTypeSet;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-
-import com.sun.xml.internal.rngom.digested.DAttributePattern;
-import com.sun.xml.internal.rngom.digested.DElementPattern;
-import com.sun.xml.internal.rngom.digested.DOneOrMorePattern;
-import com.sun.xml.internal.rngom.digested.DPattern;
-import com.sun.xml.internal.rngom.digested.DPatternWalker;
-import com.sun.xml.internal.rngom.digested.DZeroOrMorePattern;
-
-/**
- * Builds {@link RawTypeSet} for RELAX NG.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class RawTypeSetBuilder extends DPatternWalker {
- public static RawTypeSet build( RELAXNGCompiler compiler, DPattern contentModel, Multiplicity mul ) {
- RawTypeSetBuilder builder = new RawTypeSetBuilder(compiler,mul);
- contentModel.accept(builder);
- return builder.create();
- }
-
- /**
- * Multiplicity of the property.
- */
- private Multiplicity mul;
-
- /**
- * Accumulates discovered {@link RawTypeSet.Ref}s.
- */
- private final Set<RawTypeSet.Ref> refs = new HashSet<RawTypeSet.Ref>();
-
- private final RELAXNGCompiler compiler;
-
- public RawTypeSetBuilder(RELAXNGCompiler compiler,Multiplicity mul) {
- this.mul = mul;
- this.compiler = compiler;
- }
-
- private RawTypeSet create() {
- return new RawTypeSet(refs,mul);
- }
-
- public Void onAttribute(DAttributePattern p) {
- // attributes form their own properties
- return null;
- }
-
- public Void onElement(DElementPattern p) {
- CTypeInfo[] tis = compiler.classes.get(p);
- if(tis!=null) {
- for( CTypeInfo ti : tis )
- refs.add(new CClassInfoRef((CClassInfo)ti));
- } else {
- // TODO
- assert false;
- }
- return null;
- }
-
- public Void onZeroOrMore(DZeroOrMorePattern p) {
- mul = mul.makeRepeated();
- return super.onZeroOrMore(p);
- }
-
- public Void onOneOrMore(DOneOrMorePattern p) {
- mul = mul.makeRepeated();
- return super.onOneOrMore(p);
- }
-
- /**
- * For {@link CClassInfo}s that map to elements.
- */
- private static final class CClassInfoRef extends RawTypeSet.Ref {
- private final CClassInfo ci;
- CClassInfoRef(CClassInfo ci) {
- this.ci = ci;
- assert ci.isElement();
- }
-
- protected ID id() {
- return ID.NONE;
- }
-
- protected boolean isListOfValues() {
- return false;
- }
-
- protected RawTypeSet.Mode canBeType(RawTypeSet parent) {
- return RawTypeSet.Mode.SHOULD_BE_TYPEREF;
- }
-
- protected void toElementRef(CReferencePropertyInfo prop) {
- prop.getElements().add(ci);
- }
-
- protected CTypeRef toTypeRef(CElementPropertyInfo ep) {
- return new CTypeRef(ci,ci.getElementName(),ci.getTypeName(),false,null);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/TypePatternBinder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/TypePatternBinder.java
deleted file mode 100644
index 1a4ba681..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/TypePatternBinder.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.relaxng;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.Stack;
-
-import com.sun.xml.internal.rngom.digested.DAttributePattern;
-import com.sun.xml.internal.rngom.digested.DChoicePattern;
-import com.sun.xml.internal.rngom.digested.DDefine;
-import com.sun.xml.internal.rngom.digested.DListPattern;
-import com.sun.xml.internal.rngom.digested.DMixedPattern;
-import com.sun.xml.internal.rngom.digested.DOneOrMorePattern;
-import com.sun.xml.internal.rngom.digested.DOptionalPattern;
-import com.sun.xml.internal.rngom.digested.DPatternWalker;
-import com.sun.xml.internal.rngom.digested.DRefPattern;
-import com.sun.xml.internal.rngom.digested.DZeroOrMorePattern;
-
-/**
- * Fumigate the named patterns that can be bound to inheritance.
- *
- * @author Kohsuke Kawaguchi
- */
-final class TypePatternBinder extends DPatternWalker {
- private boolean canInherit;
- private final Stack<Boolean> stack = new Stack<Boolean>();
-
- /**
- * Patterns that are determined not to be bindable to inheritance.
- */
- private final Set<DDefine> cannotBeInherited = new HashSet<DDefine>();
-
-
- void reset() {
- canInherit = true;
- stack.clear();
- }
-
- public Void onRef(DRefPattern p) {
- if(!canInherit) {
- cannotBeInherited.add(p.getTarget());
- } else {
- // if the whole pattern is like "A,B", we can only inherit from
- // either A or B. For now, always derive from A.
- // it might be worthwhile to have a smarter binding logic where
- // we pick A and B based on their 'usefulness' --- by taking into
- // account how many other paterns are derived from those.
- canInherit = false;
- }
- return null;
- }
-
- /*
- Set the flag to false if we hit a pattern that cannot include
- a <ref> to be bound as an inheritance.
-
- All the following code are the same
- */
- public Void onChoice(DChoicePattern p) {
- push(false);
- super.onChoice(p);
- pop();
- return null;
- }
-
- public Void onAttribute(DAttributePattern p) {
- push(false);
- super.onAttribute(p);
- pop();
- return null;
- }
-
- public Void onList(DListPattern p) {
- push(false);
- super.onList(p);
- pop();
- return null;
- }
-
- public Void onMixed(DMixedPattern p) {
- push(false);
- super.onMixed(p);
- pop();
- return null;
- }
-
- public Void onOneOrMore(DOneOrMorePattern p) {
- push(false);
- super.onOneOrMore(p);
- pop();
- return null;
- }
-
- public Void onZeroOrMore(DZeroOrMorePattern p) {
- push(false);
- super.onZeroOrMore(p);
- pop();
- return null;
- }
-
- public Void onOptional(DOptionalPattern p) {
- push(false);
- super.onOptional(p);
- pop();
- return null;
- }
-
- private void push(boolean v) {
- stack.push(canInherit);
- canInherit = v;
- }
-
- private void pop() {
- canInherit = stack.pop();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/TypeUseBinder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/TypeUseBinder.java
deleted file mode 100644
index 55a7f0e1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/relaxng/TypeUseBinder.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.relaxng;
-
-import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.model.TypeUseFactory;
-
-import com.sun.xml.internal.rngom.digested.DAttributePattern;
-import com.sun.xml.internal.rngom.digested.DChoicePattern;
-import com.sun.xml.internal.rngom.digested.DContainerPattern;
-import com.sun.xml.internal.rngom.digested.DDataPattern;
-import com.sun.xml.internal.rngom.digested.DElementPattern;
-import com.sun.xml.internal.rngom.digested.DEmptyPattern;
-import com.sun.xml.internal.rngom.digested.DGrammarPattern;
-import com.sun.xml.internal.rngom.digested.DGroupPattern;
-import com.sun.xml.internal.rngom.digested.DInterleavePattern;
-import com.sun.xml.internal.rngom.digested.DListPattern;
-import com.sun.xml.internal.rngom.digested.DMixedPattern;
-import com.sun.xml.internal.rngom.digested.DNotAllowedPattern;
-import com.sun.xml.internal.rngom.digested.DOneOrMorePattern;
-import com.sun.xml.internal.rngom.digested.DOptionalPattern;
-import com.sun.xml.internal.rngom.digested.DPattern;
-import com.sun.xml.internal.rngom.digested.DPatternVisitor;
-import com.sun.xml.internal.rngom.digested.DRefPattern;
-import com.sun.xml.internal.rngom.digested.DTextPattern;
-import com.sun.xml.internal.rngom.digested.DValuePattern;
-import com.sun.xml.internal.rngom.digested.DZeroOrMorePattern;
-
-/**
- * Walks the pattern tree and binds it to a {@link TypeUse}.
- *
- * The singleton instance is kept in {@link RELAXNGCompiler}.
- *
- * TODO: I should really normalize before process.
- *
- * @author Kohsuke Kawaguchi
- */
-final class TypeUseBinder implements DPatternVisitor<TypeUse> {
- private final RELAXNGCompiler compiler;
-
- public TypeUseBinder(RELAXNGCompiler compiler) {
- this.compiler = compiler;
- }
-
-
- public TypeUse onGrammar(DGrammarPattern p) {
- return CBuiltinLeafInfo.STRING;
- }
-
- public TypeUse onChoice(DChoicePattern p) {
- // can't support unions
- return CBuiltinLeafInfo.STRING;
- }
-
- public TypeUse onData(DDataPattern p) {
- return onDataType(p.getDatatypeLibrary(), p.getType());
- }
-
- public TypeUse onValue(DValuePattern p) {
- return onDataType(p.getDatatypeLibrary(),p.getType());
- }
-
- private TypeUse onDataType(String datatypeLibrary, String type) {
- DatatypeLib lib = compiler.datatypes.get(datatypeLibrary);
- if(lib!=null) {
- TypeUse use = lib.get(type);
- if(use!=null)
- return use;
- }
-
- // unknown
- return CBuiltinLeafInfo.STRING;
- }
-
- public TypeUse onInterleave(DInterleavePattern p) {
- return onContainer(p);
- }
-
- public TypeUse onGroup(DGroupPattern p) {
- return onContainer(p);
- }
-
- private TypeUse onContainer(DContainerPattern p) {
- TypeUse t=null;
- for( DPattern child : p ) {
- TypeUse s = child.accept(this);
- if(t!=null && t!=s)
- return CBuiltinLeafInfo.STRING; // heterogenous
- t = s;
- }
- return t;
- }
-
- public TypeUse onNotAllowed(DNotAllowedPattern p) {
- // TODO
- return error();
- }
-
- public TypeUse onEmpty(DEmptyPattern p) {
- return CBuiltinLeafInfo.STRING;
- }
-
- public TypeUse onList(DListPattern p) {
- return p.getChild().accept(this);
- }
-
- public TypeUse onOneOrMore(DOneOrMorePattern p) {
- return TypeUseFactory.makeCollection( p.getChild().accept(this) );
- }
-
- public TypeUse onZeroOrMore(DZeroOrMorePattern p) {
- return TypeUseFactory.makeCollection( p.getChild().accept(this) );
- }
-
- public TypeUse onOptional(DOptionalPattern p) {
- return CBuiltinLeafInfo.STRING;
- }
-
- public TypeUse onRef(DRefPattern p) {
- // TODO: check for enums
- return p.getTarget().getPattern().accept(this);
- }
-
- public TypeUse onText(DTextPattern p) {
- return CBuiltinLeafInfo.STRING;
- }
-
-//
-//
-// Not allowed in this context
-//
-//
- public TypeUse onAttribute(DAttributePattern p) {
- return error();
- }
-
- public TypeUse onElement(DElementPattern p) {
- return error();
- }
-
- public TypeUse onMixed(DMixedPattern p) {
- return error();
- }
-
- private TypeUse error() {
- throw new IllegalStateException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/Abstractifier.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/Abstractifier.java
deleted file mode 100644
index a05df63e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/Abstractifier.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import com.sun.tools.internal.xjc.model.CElement;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-
-/**
- * {@link ClassBinder} that marks abstract components as abstract.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-class Abstractifier extends ClassBinderFilter {
- public Abstractifier(ClassBinder core) {
- super(core);
- }
-
- public CElement complexType(XSComplexType xs) {
- CElement ci = super.complexType(xs);
- if(ci!=null && xs.isAbstract())
- ci.setAbstract();
- return ci;
- }
-
- public CElement elementDecl(XSElementDecl xs) {
- CElement ci = super.elementDecl(xs);
- if(ci!=null && xs.isAbstract())
- ci.setAbstract();
- return ci;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BGMBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BGMBuilder.java
deleted file mode 100644
index b222e39c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BGMBuilder.java
+++ /dev/null
@@ -1,568 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerFactory;
-
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.fmt.JTextFile;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.Plugin;
-import com.sun.tools.internal.xjc.generator.bean.field.FieldRendererFactory;
-import com.sun.tools.internal.xjc.model.CClassInfoParent;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.reader.ModelChecker;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIDeclaration;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIDom;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIGlobalBinding;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BISchemaBinding;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BISerializable;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BindInfo;
-import com.sun.tools.internal.xjc.util.CodeModelClassFactory;
-import com.sun.tools.internal.xjc.util.ErrorReceiverFilter;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import com.sun.xml.internal.bind.v2.util.XmlFactory;
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSDeclaration;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSTerm;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.util.XSFinder;
-
-import org.xml.sax.Locator;
-
-/**
- * Root of the XML Schema binder.
- *
- * <div><img src="doc-files/binding_chart.png"/></div>
- *
- * @author Kohsuke Kawaguchi
- */
-public class BGMBuilder extends BindingComponent {
-
- /**
- * Entry point.
- */
- public static Model build( XSSchemaSet _schemas, JCodeModel codeModel,
- ErrorReceiver _errorReceiver, Options opts ) {
- // set up a ring
- final Ring old = Ring.begin();
- try {
- ErrorReceiverFilter ef = new ErrorReceiverFilter(_errorReceiver);
-
- Ring.add(XSSchemaSet.class,_schemas);
- Ring.add(codeModel);
- Model model = new Model(opts, codeModel, null/*set later*/, opts.classNameAllocator, _schemas);
- Ring.add(model);
- Ring.add(ErrorReceiver.class,ef);
- Ring.add(CodeModelClassFactory.class,new CodeModelClassFactory(ef));
-
- BGMBuilder builder = new BGMBuilder(opts.defaultPackage,opts.defaultPackage2,
- opts.isExtensionMode(),opts.getFieldRendererFactory(), opts.activePlugins);
- builder._build();
-
- if(ef.hadError()) return null;
- else return model;
- } finally {
- Ring.end(old);
- }
- }
-
-
- /**
- * True if the compiler is running in the extension mode
- * (as opposed to the strict conformance mode.)
- */
- public final boolean inExtensionMode;
-
- /**
- * If this is non-null, this package name takes over
- * all the schema customizations.
- */
- public final String defaultPackage1;
-
- /**
- * If this is non-null, this package name will be
- * used when no customization is specified.
- */
- public final String defaultPackage2;
-
- private final BindGreen green = Ring.get(BindGreen.class);
- private final BindPurple purple = Ring.get(BindPurple.class);
-
- public final Model model = Ring.get(Model.class);
-
- public final FieldRendererFactory fieldRendererFactory;
-
- /**
- * Lazily computed {@link RefererFinder}.
- *
- * @see #getReferer
- */
- private RefererFinder refFinder;
-
- private List<Plugin> activePlugins;
-
- protected BGMBuilder(String defaultPackage1, String defaultPackage2,
- boolean _inExtensionMode, FieldRendererFactory fieldRendererFactory,
- List<Plugin> activePlugins) {
- this.inExtensionMode = _inExtensionMode;
- this.defaultPackage1 = defaultPackage1;
- this.defaultPackage2 = defaultPackage2;
- this.fieldRendererFactory = fieldRendererFactory;
- this.activePlugins = activePlugins;
- promoteGlobalBindings();
- }
-
- private void _build() {
- // do the binding
- buildContents();
- getClassSelector().executeTasks();
-
- // additional error check
- // Reports unused customizations to the user as errors.
- Ring.get(UnusedCustomizationChecker.class).run();
-
- Ring.get(ModelChecker.class).check();
-
- for( Plugin ma : activePlugins )
- ma.postProcessModel(model, Ring.get(ErrorReceiver.class));
-
- }
-
-
- /** List up all the global bindings. */
- private void promoteGlobalBindings() {
- // promote any global bindings in the schema
- XSSchemaSet schemas = Ring.get(XSSchemaSet.class);
-
- for( XSSchema s : schemas.getSchemas() ) {
- BindInfo bi = getBindInfo(s);
-
- // collect all global customizations
- model.getCustomizations().addAll(bi.toCustomizationList());
-
- BIGlobalBinding gb = bi.get(BIGlobalBinding.class);
- if(gb==null)
- continue;
-
- gb.markAsAcknowledged();
-
- if(globalBinding==null) {
- globalBinding = gb;
- } else {
- if (!globalBinding.isEqual(gb)) { // see Issue 687 - this may happen with syntactically imported documents
- // acknowledge this customization and report an error
- // otherwise the user will see "customization is attached to a wrong place" error,
- // which is incorrect
- getErrorReporter().error( gb.getLocation(),
- Messages.ERR_MULTIPLE_GLOBAL_BINDINGS);
- getErrorReporter().error( globalBinding.getLocation(),
- Messages.ERR_MULTIPLE_GLOBAL_BINDINGS_OTHER);
- }
- }
- }
-
- if( globalBinding==null ) {
- // no global customization is present.
- // use the default one
- globalBinding = new BIGlobalBinding();
- BindInfo big = new BindInfo();
- big.addDecl(globalBinding);
- big.setOwner(this,null);
- }
-
- // code generation mode
- model.strategy = globalBinding.getCodeGenerationStrategy();
- model.rootClass = globalBinding.getSuperClass();
- model.rootInterface = globalBinding.getSuperInterface();
-
- particleBinder = globalBinding.isSimpleMode() ? new ExpressionParticleBinder() : new DefaultParticleBinder();
-
- // check XJC extensions and realize them
- BISerializable serial = globalBinding.getSerializable();
- if(serial!=null) {
- model.serializable = true;
- model.serialVersionUID = serial.uid;
- }
-
- // obtain the name conversion mode
- if (globalBinding.nameConverter!=null)
- model.setNameConverter(globalBinding.nameConverter);
-
- // attach global conversions to the appropriate simple types
- globalBinding.dispatchGlobalConversions(schemas);
-
- globalBinding.errorCheck();
- }
-
- /**
- * Global bindings.
- *
- * The empty global binding is set as the default, so that
- * there will be no need to test if the value is null.
- */
- private BIGlobalBinding globalBinding;
-
- /**
- * Gets the global bindings.
- */
- public @NotNull BIGlobalBinding getGlobalBinding() { return globalBinding; }
-
-
- private ParticleBinder particleBinder;
-
- /**
- * Gets the particle binder for this binding.
- */
- public @NotNull ParticleBinder getParticleBinder() { return particleBinder; }
-
-
- /**
- * Name converter that implements "XML->Java name conversion"
- * as specified in the spec.
- *
- * This object abstracts the detail that we use different name
- * conversion depending on the customization.
- *
- * <p>
- * This object should be used to perform any name conversion
- * needs, instead of the JJavaName class in CodeModel.
- */
- public NameConverter getNameConverter() { return model.getNameConverter(); }
-
- /** Fill-in the contents of each classes. */
- private void buildContents() {
- ClassSelector cs = getClassSelector();
- SimpleTypeBuilder stb = Ring.get(SimpleTypeBuilder.class);
-
- for( XSSchema s : Ring.get(XSSchemaSet.class).getSchemas() ) {
- BISchemaBinding sb = getBindInfo(s).get(BISchemaBinding.class);
-
- if(sb!=null && !sb.map) {
- sb.markAsAcknowledged();
- continue; // no mapping for this package
- }
-
- getClassSelector().pushClassScope( new CClassInfoParent.Package(
- getClassSelector().getPackage(s.getTargetNamespace())) );
-
- checkMultipleSchemaBindings(s);
- processPackageJavadoc(s);
- populate(s.getAttGroupDecls(),s);
- populate(s.getAttributeDecls(),s);
- populate(s.getElementDecls(),s);
- populate(s.getModelGroupDecls(),s);
-
- // fill in typeUses
- for (XSType t : s.getTypes().values()) {
- stb.refererStack.push(t);
- model.typeUses().put( getName(t), cs.bindToType(t,s) );
- stb.refererStack.pop();
- }
-
- getClassSelector().popClassScope();
- }
- }
-
- /** Reports an error if there are more than one jaxb:schemaBindings customization. */
- private void checkMultipleSchemaBindings( XSSchema schema ) {
- ArrayList<Locator> locations = new ArrayList<Locator>();
-
- BindInfo bi = getBindInfo(schema);
- for( BIDeclaration bid : bi ) {
- if( bid.getName()==BISchemaBinding.NAME )
- locations.add( bid.getLocation() );
- }
- if(locations.size()<=1) return; // OK
-
- // error
- getErrorReporter().error( locations.get(0),
- Messages.ERR_MULTIPLE_SCHEMA_BINDINGS,
- schema.getTargetNamespace() );
- for( int i=1; i<locations.size(); i++ )
- getErrorReporter().error( (Locator)locations.get(i),
- Messages.ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION);
- }
-
- /**
- * Calls {@link ClassSelector} for each item in the iterator
- * to populate class items if there is any.
- */
- private void populate( Map<String,? extends XSComponent> col, XSSchema schema ) {
- ClassSelector cs = getClassSelector();
- for( XSComponent sc : col.values() )
- cs.bindToType(sc,schema);
- }
-
- /**
- * Generates <code>package.html</code> if the customization
- * says so.
- */
- private void processPackageJavadoc( XSSchema s ) {
- // look for the schema-wide customization
- BISchemaBinding cust = getBindInfo(s).get(BISchemaBinding.class);
- if(cust==null) return; // not present
-
- cust.markAsAcknowledged();
- if( cust.getJavadoc()==null ) return; // no javadoc customization
-
- // produce a HTML file
- JTextFile html = new JTextFile("package.html");
- html.setContents(cust.getJavadoc());
- getClassSelector().getPackage(s.getTargetNamespace()).addResourceFile(html);
- }
-
-
-
-
-
-
- /**
- * Gets or creates the BindInfo object associated to a schema component.
- *
- * @return
- * Always return a non-null valid BindInfo object.
- * Even if no declaration was specified, this method creates
- * a new BindInfo so that new decls can be added.
- */
- public BindInfo getOrCreateBindInfo( XSComponent schemaComponent ) {
-
- BindInfo bi = _getBindInfoReadOnly(schemaComponent);
- if(bi!=null) return bi;
-
- // XSOM is read-only, so we cannot add new annotations.
- // for components that didn't have annotations,
- // we maintain an external map.
- bi = new BindInfo();
- bi.setOwner(this,schemaComponent);
- externalBindInfos.put(schemaComponent,bi);
- return bi;
- }
-
-
- /**
- * Used as a constant instance to represent the empty {@link BindInfo}.
- */
- private final BindInfo emptyBindInfo = new BindInfo();
-
- /**
- * Gets the BindInfo object associated to a schema component.
- *
- * @return
- * always return a valid {@link BindInfo} object. If none
- * is specified for the given component, a dummy empty BindInfo
- * will be returned.
- */
- public BindInfo getBindInfo( XSComponent schemaComponent ) {
- BindInfo bi = _getBindInfoReadOnly(schemaComponent);
- if(bi!=null) return bi;
- else return emptyBindInfo;
- }
-
- /**
- * Gets the BindInfo object associated to a schema component.
- *
- * @return
- * null if no bind info is associated to this schema component.
- */
- private BindInfo _getBindInfoReadOnly( XSComponent schemaComponent ) {
-
- BindInfo bi = externalBindInfos.get(schemaComponent);
- if(bi!=null) return bi;
-
- XSAnnotation annon = schemaComponent.getAnnotation();
- if(annon!=null) {
- bi = (BindInfo)annon.getAnnotation();
- if(bi!=null) {
- if(bi.getOwner()==null)
- bi.setOwner(this,schemaComponent);
- return bi;
- }
- }
-
- return null;
- }
-
- /**
- * A map that stores binding declarations augmented by XJC.
- */
- private final Map<XSComponent,BindInfo> externalBindInfos = new HashMap<XSComponent,BindInfo>();
-
- /**
- * Gets the {@link BIDom} object that applies to the given particle.
- */
- protected final BIDom getLocalDomCustomization( XSParticle p ) {
- if (p == null) {
- return null;
- }
- BIDom dom = getBindInfo(p).get(BIDom.class);
- if(dom!=null) return dom;
-
- // if not, the term might have one.
- dom = getBindInfo(p.getTerm()).get(BIDom.class);
- if(dom!=null) return dom;
-
- XSTerm t = p.getTerm();
- // type could also have one, in case of the dom customization
- if(t.isElementDecl())
- return getBindInfo(t.asElementDecl().getType()).get(BIDom.class);
- // similarly the model group in a model group definition may have one.
- if(t.isModelGroupDecl())
- return getBindInfo(t.asModelGroupDecl().getModelGroup()).get(BIDom.class);
-
- return null;
- }
-
- /**
- * Returns true if the component should be processed by purple.
- */
- private final XSFinder toPurple = new XSFinder() {
- @Override
- public Boolean attributeUse(XSAttributeUse use) {
- // attribute use always maps to a property
- return true;
- }
-
- @Override
- public Boolean simpleType(XSSimpleType xsSimpleType) {
- // simple type always maps to a type, hence we should take purple
- return true;
- }
-
- @Override
- public Boolean wildcard(XSWildcard xsWildcard) {
- // attribute wildcards always maps to a property.
- // element wildcards should have been processed with particle binders
- return true;
- }
- };
- /**
- * If the component maps to a property, forwards to purple, otherwise to green.
- *
- * If the component is mapped to a type, this method needs to return true.
- * See the chart at the class javadoc.
- */
- public void ying( XSComponent sc, @Nullable XSComponent referer ) {
- if(sc.apply(toPurple)==true || getClassSelector().bindToType(sc,referer)!=null)
- sc.visit(purple);
- else
- sc.visit(green);
- }
-
- private Transformer identityTransformer;
-
- /**
- * Gets the shared instance of the identity transformer.
- */
- public Transformer getIdentityTransformer() {
- try {
- if(identityTransformer==null) {
- TransformerFactory tf = XmlFactory.createTransformerFactory(model.options.disableXmlSecurity);
- identityTransformer = tf.newTransformer();
- }
- return identityTransformer;
- } catch (TransformerConfigurationException e) {
- throw new Error(e); // impossible
- }
- }
-
- /**
- * Find all types that refer to the given complex type.
- */
- public Set<XSComponent> getReferer(XSType c) {
- if(refFinder==null) {
- refFinder = new RefererFinder();
- refFinder.schemaSet(Ring.get(XSSchemaSet.class));
- }
- return refFinder.getReferer(c);
- }
-
- /**
- * Returns the QName of the declaration.
- * @return null
- * if the declaration is anonymous.
- */
- public static QName getName(XSDeclaration decl) {
- String local = decl.getName();
- if(local==null) return null;
- return new QName(decl.getTargetNamespace(),local);
- }
-
- /**
- * Derives a name from a schema component.
- *
- * This method handles prefix/suffix modification and
- * XML-to-Java name conversion.
- *
- * @param name
- * The base name. This should be things like element names
- * or type names.
- * @param comp
- * The component from which the base name was taken.
- * Used to determine how names are modified.
- */
- public String deriveName( String name, XSComponent comp ) {
- XSSchema owner = comp.getOwnerSchema();
-
- name = getNameConverter().toClassName(name);
-
- if( owner!=null ) {
- BISchemaBinding sb = getBindInfo(owner).get(BISchemaBinding.class);
-
- if(sb!=null) name = sb.mangleClassName(name,comp);
- }
-
- return name;
- }
-
- public boolean isGenerateMixedExtensions() {
- if (globalBinding != null) {
- return globalBinding.isGenerateMixedExtensions();
- }
- return false;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindBlue.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindBlue.java
deleted file mode 100644
index 02910146..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindBlue.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-
-/**
- * This is the first color invoked from the parent component.
- *
- * @author Kohsuke Kawaguchi
- */
-final class BindBlue extends ColorBinder {
-
- public void complexType(XSComplexType ct) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
- public void elementDecl(XSElementDecl e) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
-
-
-
- public void wildcard(XSWildcard xsWildcard) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
- public void attGroupDecl(XSAttGroupDecl xsAttGroupDecl) {
- // TODO
- throw new UnsupportedOperationException();
- }
-
- public void attributeDecl(XSAttributeDecl xsAttributeDecl) {
- // TODO
- throw new UnsupportedOperationException();
- }
-
- public void attributeUse(XSAttributeUse use) {
- // TODO
- throw new UnsupportedOperationException();
- }
-
- public void modelGroupDecl(XSModelGroupDecl xsModelGroupDecl) {
- // TODO
- throw new UnsupportedOperationException();
- }
-
- public void modelGroup(XSModelGroup xsModelGroup) {
- // TODO
- throw new UnsupportedOperationException();
- }
-
- public void particle(XSParticle xsParticle) {
- // TODO
- throw new UnsupportedOperationException();
- }
-
- public void empty(XSContentType xsContentType) {
- // TODO
- throw new UnsupportedOperationException();
- }
-
-
-/**
- * Components that always map to a type
- */
- public void simpleType(XSSimpleType type) {
- throw new IllegalStateException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindGreen.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindGreen.java
deleted file mode 100644
index 85af4a64..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindGreen.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.util.Iterator;
-
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.ct.ComplexTypeFieldBuilder;
-import com.sun.xml.internal.xsom.XSAttContainer;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public final class BindGreen extends ColorBinder {
-
- private final ComplexTypeFieldBuilder ctBuilder = Ring.get(ComplexTypeFieldBuilder.class);
-
- public void attGroupDecl(XSAttGroupDecl ag) {
- attContainer(ag);
- }
-
- public void attContainer(XSAttContainer cont) {
- // inline
- Iterator itr = cont.iterateDeclaredAttributeUses();
- while(itr.hasNext())
- builder.ying((XSAttributeUse)itr.next(),cont);
- itr = cont.iterateAttGroups();
- while(itr.hasNext())
- builder.ying((XSAttGroupDecl)itr.next(),cont);
-
- XSWildcard w = cont.getAttributeWildcard();
- if(w!=null)
- builder.ying(w,cont);
- }
-
- public void complexType(XSComplexType ct) {
- ctBuilder.build(ct);
- }
-
-
-
-
-
-
-
-
- public void attributeDecl(XSAttributeDecl xsAttributeDecl) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
- public void wildcard(XSWildcard xsWildcard) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
- public void modelGroupDecl(XSModelGroupDecl xsModelGroupDecl) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
- public void modelGroup(XSModelGroup xsModelGroup) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
- public void elementDecl(XSElementDecl xsElementDecl) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
- public void particle(XSParticle xsParticle) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
- public void empty(XSContentType xsContentType) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
-
-/*
-
- Components for which ying should yield to purple.
-
-*/
- public void simpleType(XSSimpleType xsSimpleType) {
- // simple type always maps to a type, so this is never possible
- throw new IllegalStateException();
- }
-
- public void attributeUse(XSAttributeUse use) {
- // attribute use always maps to a property
- throw new IllegalStateException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindPurple.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindPurple.java
deleted file mode 100644
index 44c1e806..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindPurple.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CDefaultValue;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.model.CClass;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public class BindPurple extends ColorBinder {
- public void attGroupDecl(XSAttGroupDecl xsAttGroupDecl) {
- // TODO
- throw new UnsupportedOperationException();
- }
-
- public void attributeDecl(XSAttributeDecl xsAttributeDecl) {
- // TODO
- throw new UnsupportedOperationException();
- }
-
- /**
- * Attribute use always becomes a property.
- */
- public void attributeUse(XSAttributeUse use) {
- boolean hasFixedValue = use.getFixedValue()!=null;
- BIProperty pc = BIProperty.getCustomization(use);
-
- // map to a constant property ?
- boolean toConstant = pc.isConstantProperty() && hasFixedValue;
- TypeUse attType = bindAttDecl(use.getDecl());
-
- CPropertyInfo prop = pc.createAttributeProperty( use, attType );
-
- if(toConstant) {
- prop.defaultValue = CDefaultValue.create(attType,use.getFixedValue());
- prop.realization = builder.fieldRendererFactory.getConst(prop.realization);
- } else
- if(!attType.isCollection() && (prop.baseType == null ? true : !prop.baseType.isPrimitive())) {
- // don't support a collection default value. That's difficult to do.
- // primitive types default value is problematic too - we can't check whether it has been set or no ( ==null) isn't possible TODO: emit a waring in these cases
-
- if(use.getDefaultValue()!=null) {
- // this attribute use has a default value.
- // the item type is guaranteed to be a leaf type... or TODO: is it really so?
- // don't support default values if it's a list
- prop.defaultValue = CDefaultValue.create(attType,use.getDefaultValue());
- } else
- if(use.getFixedValue()!=null) {
- prop.defaultValue = CDefaultValue.create(attType,use.getFixedValue());
- }
- } else if(prop.baseType != null && prop.baseType.isPrimitive()) {
- ErrorReporter errorReporter = Ring.get(ErrorReporter.class);
-
- errorReporter.warning(prop.getLocator(), Messages.WARN_DEFAULT_VALUE_PRIMITIVE_TYPE, prop.baseType.name());
- }
-
- getCurrentBean().addProperty(prop);
- }
-
- private TypeUse bindAttDecl(XSAttributeDecl decl) {
- SimpleTypeBuilder stb = Ring.get(SimpleTypeBuilder.class);
- stb.refererStack.push( decl );
- try {
- return stb.build(decl.getType());
- } finally {
- stb.refererStack.pop();
- }
- }
-
-
- public void complexType(XSComplexType ct) {
- CClass ctBean = selector.bindToType(ct,null,false);
- if(getCurrentBean()!=ctBean)
- // in some case complex type and element binds to the same class
- // don't make it has-a. Just make it is-a.
- getCurrentBean().setBaseClass(ctBean);
- }
-
- public void wildcard(XSWildcard xsWildcard) {
- // element wildcards are processed by particle binders,
- // so this one is for attribute wildcard.
-
- getCurrentBean().hasAttributeWildcard(true);
- }
-
- public void modelGroupDecl(XSModelGroupDecl xsModelGroupDecl) {
- // TODO
- throw new UnsupportedOperationException();
- }
-
- public void modelGroup(XSModelGroup xsModelGroup) {
- // TODO
- throw new UnsupportedOperationException();
- }
-
- public void elementDecl(XSElementDecl xsElementDecl) {
- // TODO
- throw new UnsupportedOperationException();
- }
-
- public void simpleType(XSSimpleType type) {
- createSimpleTypeProperty(type,"Value");
- }
-
- public void particle(XSParticle xsParticle) {
- // TODO
- throw new UnsupportedOperationException();
- }
-
- public void empty(XSContentType ct) {
- // empty generates nothing
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindRed.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindRed.java
deleted file mode 100644
index 0b329a30..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindRed.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.ct.ComplexTypeFieldBuilder;
-import com.sun.xml.internal.bind.v2.TODO;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-
-/**
- * This is where a binding of a new class starts.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class BindRed extends ColorBinder {
-
- private final ComplexTypeFieldBuilder ctBuilder = Ring.get(ComplexTypeFieldBuilder.class);
-
- public void complexType(XSComplexType ct) {
- ctBuilder.build(ct);
- }
-
- public void wildcard(XSWildcard xsWildcard) {
- // TODO: implement this method later
- // I guess we might allow this to be mapped to a generic element property ---
- // not sure exactly how do we do it.
- TODO.checkSpec();
- throw new UnsupportedOperationException();
- }
-
- public void elementDecl(XSElementDecl e) {
- SimpleTypeBuilder stb = Ring.get(SimpleTypeBuilder.class);
- stb.refererStack.push(e); // referer is element
- builder.ying(e.getType(),e);
- stb.refererStack.pop();
- }
-
- public void simpleType(XSSimpleType type) {
- SimpleTypeBuilder stb = Ring.get(SimpleTypeBuilder.class);
- stb.refererStack.push(type); // referer is itself
- createSimpleTypeProperty(type,"Value");
- stb.refererStack.pop();
- }
-
-/*
- Components that can never be mapped to a class
-*/
- public void attGroupDecl(XSAttGroupDecl ag) {
- throw new IllegalStateException();
- }
- public void attributeDecl(XSAttributeDecl ad) {
- throw new IllegalStateException();
- }
- public void attributeUse(XSAttributeUse au) {
- throw new IllegalStateException();
- }
- public void empty(XSContentType xsContentType) {
- throw new IllegalStateException();
- }
- public void modelGroupDecl(XSModelGroupDecl xsModelGroupDecl) {
- throw new IllegalStateException();
- }
- public void modelGroup(XSModelGroup xsModelGroup) {
- throw new IllegalStateException();
- }
- public void particle(XSParticle p) {
- throw new IllegalStateException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindYellow.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindYellow.java
deleted file mode 100644
index d6406e5b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindYellow.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public final class BindYellow extends ColorBinder {
- public void complexType(XSComplexType ct) {
- }
-
- public void wildcard(XSWildcard xsWildcard) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
- public void elementDecl(XSElementDecl xsElementDecl) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
- public void simpleType(XSSimpleType xsSimpleType) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
- public void attributeDecl(XSAttributeDecl xsAttributeDecl) {
- // TODO: implement this method later
- throw new UnsupportedOperationException();
- }
-
-
-/*
-
- Components that can never map to a type
-
-*/
- public void attGroupDecl(XSAttGroupDecl xsAttGroupDecl) {
- throw new IllegalStateException();
- }
-
- public void attributeUse(XSAttributeUse use) {
- throw new IllegalStateException();
- }
-
- public void modelGroupDecl(XSModelGroupDecl xsModelGroupDecl) {
- throw new IllegalStateException();
- }
-
- public void modelGroup(XSModelGroup xsModelGroup) {
- throw new IllegalStateException();
- }
-
- public void particle(XSParticle xsParticle) {
- throw new IllegalStateException();
- }
-
- public void empty(XSContentType xsContentType) {
- throw new IllegalStateException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindingComponent.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindingComponent.java
deleted file mode 100644
index 3798292d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/BindingComponent.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import com.sun.tools.internal.xjc.reader.Ring;
-
-/**
- * Component accessible from {@link Ring}.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class BindingComponent {
- protected BindingComponent() {
- Ring.add(this);
- }
-
-//
-//
-// Accessor to common components.
-//
-//
-
- protected final ErrorReporter getErrorReporter() {
- return Ring.get(ErrorReporter.class);
- }
- protected final ClassSelector getClassSelector() {
- return Ring.get(ClassSelector.class);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ClassBinder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ClassBinder.java
deleted file mode 100644
index 7e5b3d28..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ClassBinder.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CElement;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-
-/**
- * Marker interface for an object that determines how to map
- * a component to a class. If a component is mapped to a class,
- * this object returns a {@link CClassInfo} pr {@link CElementInfo} object.
- *
- * Otherwise, return null.
- */
-interface ClassBinder extends XSFunction<CElement> {
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ClassBinderFilter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ClassBinderFilter.java
deleted file mode 100644
index f9c0aa06..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ClassBinderFilter.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import com.sun.tools.internal.xjc.model.CElement;
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSXPath;
-
-/**
- * {@link ClassBinder} that delegates the call to another {@link ClassBinder}.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-abstract class ClassBinderFilter implements ClassBinder {
- private final ClassBinder core;
-
- protected ClassBinderFilter(ClassBinder core) {
- this.core = core;
- }
-
- public CElement annotation(XSAnnotation xsAnnotation) {
- return core.annotation(xsAnnotation);
- }
-
- public CElement attGroupDecl(XSAttGroupDecl xsAttGroupDecl) {
- return core.attGroupDecl(xsAttGroupDecl);
- }
-
- public CElement attributeDecl(XSAttributeDecl xsAttributeDecl) {
- return core.attributeDecl(xsAttributeDecl);
- }
-
- public CElement attributeUse(XSAttributeUse xsAttributeUse) {
- return core.attributeUse(xsAttributeUse);
- }
-
- public CElement complexType(XSComplexType xsComplexType) {
- return core.complexType(xsComplexType);
- }
-
- public CElement schema(XSSchema xsSchema) {
- return core.schema(xsSchema);
- }
-
- public CElement facet(XSFacet xsFacet) {
- return core.facet(xsFacet);
- }
-
- public CElement notation(XSNotation xsNotation) {
- return core.notation(xsNotation);
- }
-
- public CElement simpleType(XSSimpleType xsSimpleType) {
- return core.simpleType(xsSimpleType);
- }
-
- public CElement particle(XSParticle xsParticle) {
- return core.particle(xsParticle);
- }
-
- public CElement empty(XSContentType xsContentType) {
- return core.empty(xsContentType);
- }
-
- public CElement wildcard(XSWildcard xsWildcard) {
- return core.wildcard(xsWildcard);
- }
-
- public CElement modelGroupDecl(XSModelGroupDecl xsModelGroupDecl) {
- return core.modelGroupDecl(xsModelGroupDecl);
- }
-
- public CElement modelGroup(XSModelGroup xsModelGroup) {
- return core.modelGroup(xsModelGroup);
- }
-
- public CElement elementDecl(XSElementDecl xsElementDecl) {
- return core.elementDecl(xsElementDecl);
- }
-
- public CElement identityConstraint(XSIdentityConstraint xsIdentityConstraint) {
- return core.identityConstraint(xsIdentityConstraint);
- }
-
- public CElement xpath(XSXPath xsxPath) {
- return core.xpath(xsxPath);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ClassSelector.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ClassSelector.java
deleted file mode 100644
index e4095ab9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ClassSelector.java
+++ /dev/null
@@ -1,485 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.io.StringWriter;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.Stack;
-
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JJavaName;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.codemodel.internal.util.JavadocEscapeWriter;
-import com.sun.istack.internal.NotNull;
-import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CClassInfoParent;
-import com.sun.tools.internal.xjc.model.CElement;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.model.CTypeInfo;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.model.CClass;
-import com.sun.tools.internal.xjc.model.CNonElement;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BISchemaBinding;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.LocalScoping;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSDeclaration;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.impl.util.SchemaWriter;
-import com.sun.xml.internal.xsom.util.ComponentNameFunction;
-
-import org.xml.sax.Locator;
-
-/**
- * Manages association between {@link XSComponent}s and generated
- * {@link CTypeInfo}s.
- *
- * <p>
- * This class determines which component is mapped to (or is not mapped to)
- * what types.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class ClassSelector extends BindingComponent {
- /** Center of owner classes. */
- private final BGMBuilder builder = Ring.get(BGMBuilder.class);
-
-
- /**
- * Map from XSComponents to {@link Binding}s. Keeps track of all
- * content interfaces that are already built or being built.
- */
- private final Map<XSComponent,Binding> bindMap = new HashMap<XSComponent,Binding>();
-
- /**
- * UGLY HACK.
- * <p>
- * To avoid cyclic dependency between binding elements and types,
- * we need additional markers that tell which elements are definitely not bound
- * to a class.
- * <p>
- * the cyclic dependency is as follows:
- * elements need to bind its types first, because otherwise it can't
- * determine T of JAXBElement<T>.
- * OTOH, types need to know whether its parent is bound to a class to decide
- * which class name to use.
- */
- /*package*/ final Map<XSComponent,CElementInfo> boundElements = new HashMap<XSComponent,CElementInfo>();
-
- /**
- * A list of {@link Binding}s object that needs to be built.
- */
- private final Stack<Binding> bindQueue = new Stack<Binding>();
-
- /**
- * {@link CClassInfo}s that are already {@link Binding#build() built}.
- */
- private final Set<CClassInfo> built = new HashSet<CClassInfo>();
-
- /**
- * Object that determines components that are mapped
- * to classes.
- */
- private final ClassBinder classBinder;
-
- /**
- * {@link CClassInfoParent}s that determines where a new class
- * should be created.
- */
- private final Stack<CClassInfoParent> classScopes = new Stack<CClassInfoParent>();
-
- /**
- * The component that is being bound to {@link #currentBean}.
- */
- private XSComponent currentRoot;
- /**
- * The bean representation we are binding right now.
- */
- private CClassInfo currentBean;
-
-
- private final class Binding {
- private final XSComponent sc;
- private final CTypeInfo bean;
-
- public Binding(XSComponent sc, CTypeInfo bean) {
- this.sc = sc;
- this.bean = bean;
- }
-
- void build() {
- if(!(this.bean instanceof CClassInfo))
- return; // no need to "build"
-
- CClassInfo bean = (CClassInfo)this.bean;
-
- if(!built.add(bean))
- return; // already built
-
- for( String reservedClassName : reservedClassNames ) {
- if( bean.getName().equals(reservedClassName) ) {
- getErrorReporter().error( sc.getLocator(),
- Messages.ERR_RESERVED_CLASS_NAME, reservedClassName );
- break;
- }
- }
-
- // if this schema component is an element declaration
- // and it satisfies a set of conditions specified in the spec,
- // this class will receive a constructor.
- if(needValueConstructor(sc)) {
- // TODO: fragile. There is no guarantee that the property name
- // is in fact "value".
- bean.addConstructor("value");
- }
-
- if(bean.javadoc==null)
- addSchemaFragmentJavadoc(bean,sc);
-
- // build the body
- if(builder.getGlobalBinding().getFlattenClasses()==LocalScoping.NESTED)
- pushClassScope(bean);
- else
- pushClassScope(bean.parent());
- XSComponent oldRoot = currentRoot;
- CClassInfo oldBean = currentBean;
- currentRoot = sc;
- currentBean = bean;
- sc.visit(Ring.get(BindRed.class));
- currentBean = oldBean;
- currentRoot = oldRoot;
- popClassScope();
-
- // acknowledge property customization on this schema component,
- // since it is OK to have a customization at the point of declaration
- // even when no one is using it.
- BIProperty prop = builder.getBindInfo(sc).get(BIProperty.class);
- if(prop!=null) prop.markAsAcknowledged();
- }
- }
-
-
- // should be instanciated only from BGMBuilder.
- public ClassSelector() {
- classBinder = new Abstractifier(new DefaultClassBinder());
- Ring.add(ClassBinder.class,classBinder);
-
- classScopes.push(null); // so that the getClassFactory method returns null
-
- XSComplexType anyType = Ring.get(XSSchemaSet.class).getComplexType(WellKnownNamespace.XML_SCHEMA,"anyType");
- bindMap.put(anyType,new Binding(anyType,CBuiltinLeafInfo.ANYTYPE));
- }
-
- /** Gets the current class scope. */
- public final CClassInfoParent getClassScope() {
- assert !classScopes.isEmpty();
- return classScopes.peek();
- }
-
- public final void pushClassScope( CClassInfoParent clsFctry ) {
- assert clsFctry!=null;
- classScopes.push(clsFctry);
- }
-
- public final void popClassScope() {
- classScopes.pop();
- }
-
- public XSComponent getCurrentRoot() {
- return currentRoot;
- }
-
- public CClassInfo getCurrentBean() {
- return currentBean;
- }
-
- /**
- * Checks if the given component is bound to a class.
- */
- public final CElement isBound( XSElementDecl x, XSComponent referer ) {
- CElementInfo r = boundElements.get(x);
- if(r!=null)
- return r;
- return bindToType(x,referer);
- }
-
- /**
- * Checks if the given component is being mapped to a type.
- * If so, build that type and return that object.
- * If it is not being mapped to a type item, return null.
- */
- public CTypeInfo bindToType( XSComponent sc, XSComponent referer ) {
- return _bindToClass(sc,referer,false);
- }
-
- //
- // some schema components are guaranteed to map to a particular CTypeInfo.
- // the following versions capture those constraints in the signature
- // and making the bindToType invocation more type safe.
- //
-
- public CElement bindToType( XSElementDecl e, XSComponent referer ) {
- return (CElement)_bindToClass(e,referer,false);
- }
-
- public CClass bindToType( XSComplexType t, XSComponent referer, boolean cannotBeDelayed ) {
- // this assumption that a complex type always binds to a ClassInfo
- // does not hold for xs:anyType --- our current approach of handling
- // this idiosynchracy is to make sure that xs:anyType doesn't use
- // this codepath.
- return (CClass)_bindToClass(t,referer,cannotBeDelayed);
- }
-
- public TypeUse bindToType( XSType t, XSComponent referer ) {
- if(t instanceof XSSimpleType) {
- return Ring.get(SimpleTypeBuilder.class).build((XSSimpleType)t);
- } else
- return (CNonElement)_bindToClass(t,referer,false);
- }
-
- /**
- * The real meat of the "bindToType" code.
- *
- * @param cannotBeDelayed
- * if the binding of the body of the class cannot be defered
- * and needs to be done immediately. If the flag is false,
- * the binding of the body will be done later, to avoid
- * cyclic binding problem.
- * @param referer
- * The component that refers to <tt>sc</tt>. This can be null,
- * if figuring out the referer is too hard, in which case
- * the error message might be less user friendly.
- */
- // TODO: consider getting rid of "cannotBeDelayed"
- CTypeInfo _bindToClass( @NotNull XSComponent sc, XSComponent referer, boolean cannotBeDelayed ) {
- // check if this class is already built.
- if(!bindMap.containsKey(sc)) {
- // craete a bind task
-
- // if this is a global declaration, make sure they will be generated
- // under a package.
- boolean isGlobal = false;
- if( sc instanceof XSDeclaration ) {
- isGlobal = ((XSDeclaration)sc).isGlobal();
- if( isGlobal )
- pushClassScope( new CClassInfoParent.Package(
- getPackage(((XSDeclaration)sc).getTargetNamespace())) );
- }
-
- // otherwise check if this component should become a class.
- CElement bean = sc.apply(classBinder);
-
- if( isGlobal )
- popClassScope();
-
- if(bean==null)
- return null;
-
- // can this namespace generate a class?
- if (bean instanceof CClassInfo) {
- XSSchema os = sc.getOwnerSchema();
- BISchemaBinding sb = builder.getBindInfo(os).get(BISchemaBinding.class);
- if(sb!=null && !sb.map) {
- // nope
- getErrorReporter().error(sc.getLocator(),
- Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS, sc.apply( new ComponentNameFunction() ) );
- getErrorReporter().error(sb.getLocation(),
- Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE, os.getTargetNamespace() );
- if(referer!=null)
- getErrorReporter().error(referer.getLocator(),
- Messages.ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER, referer.apply( new ComponentNameFunction() ) );
- }
- }
-
-
- queueBuild( sc, bean );
- }
-
- Binding bind = bindMap.get(sc);
- if( cannotBeDelayed )
- bind.build();
-
- return bind.bean;
- }
-
- /**
- * Runs all the pending build tasks.
- */
- public void executeTasks() {
- while( bindQueue.size()!=0 )
- bindQueue.pop().build();
- }
-
-
-
-
-
-
-
-
- /**
- * Determines if the given component needs to have a value
- * constructor (a constructor that takes a parmater.) on ObjectFactory.
- */
- private boolean needValueConstructor( XSComponent sc ) {
- if(!(sc instanceof XSElementDecl)) return false;
-
- XSElementDecl decl = (XSElementDecl)sc;
- if(!decl.getType().isSimpleType()) return false;
-
- return true;
- }
-
- private static final String[] reservedClassNames = new String[]{"ObjectFactory"};
-
- public void queueBuild( XSComponent sc, CElement bean ) {
- // it is an error if the same component is built twice,
- // or the association is modified.
- Binding b = new Binding(sc,bean);
- bindQueue.push(b);
- Binding old = bindMap.put(sc, b);
- assert old==null || old.bean==bean;
- }
-
-
- /**
- * Copies a schema fragment into the javadoc of the generated class.
- */
- private void addSchemaFragmentJavadoc( CClassInfo bean, XSComponent sc ) {
-
- // first, pick it up from <documentation> if any.
- String doc = builder.getBindInfo(sc).getDocumentation();
- if(doc!=null)
- append(bean, doc);
-
- // then the description of where this component came from
- Locator loc = sc.getLocator();
- String fileName = null;
- if(loc!=null) {
- fileName = loc.getPublicId();
- if(fileName==null)
- fileName = loc.getSystemId();
- }
- if(fileName==null) fileName="";
-
- String lineNumber=Messages.format( Messages.JAVADOC_LINE_UNKNOWN);
- if(loc!=null && loc.getLineNumber()!=-1)
- lineNumber = String.valueOf(loc.getLineNumber());
-
- String componentName = sc.apply( new ComponentNameFunction() );
- String jdoc = Messages.format( Messages.JAVADOC_HEADING, componentName, fileName, lineNumber );
- append(bean,jdoc);
-
- // then schema fragment
- StringWriter out = new StringWriter();
- out.write("<pre>\n");
- SchemaWriter sw = new SchemaWriter(new JavadocEscapeWriter(out));
- sc.visit(sw);
- out.write("</pre>");
- append(bean,out.toString());
- }
-
- private void append(CClassInfo bean, String doc) {
- if(bean.javadoc==null)
- bean.javadoc = doc+'\n';
- else
- bean.javadoc += '\n'+doc+'\n';
- }
-
-
- /**
- * Set of package names that are tested (set of <code>String</code>s.)
- *
- * This set is used to avoid duplicating "incorrect package name"
- * errors.
- */
- private static Set<String> checkedPackageNames = new HashSet<String>();
-
- /**
- * Gets the Java package to which classes from
- * this namespace should go.
- *
- * <p>
- * Usually, the getOuterClass method should be used
- * to determine where to put a class.
- */
- public JPackage getPackage(String targetNamespace) {
- XSSchema s = Ring.get(XSSchemaSet.class).getSchema(targetNamespace);
-
- BISchemaBinding sb =
- builder.getBindInfo(s).get(BISchemaBinding.class);
- if(sb!=null) sb.markAsAcknowledged();
-
- String name = null;
-
- // "-p" takes precedence over everything else
- if( builder.defaultPackage1 != null )
- name = builder.defaultPackage1;
-
- // use the <jaxb:package> customization
- if( name == null && sb!=null && sb.getPackageName()!=null )
- name = sb.getPackageName();
-
- // the JAX-RPC option goes below the <jaxb:package>
- if( name == null && builder.defaultPackage2 != null )
- name = builder.defaultPackage2;
-
- // generate the package name from the targetNamespace
- if( name == null )
- name = builder.getNameConverter().toPackageName( targetNamespace );
-
- // hardcode a package name because the code doesn't compile
- // if it generated into the default java package
- if( name == null )
- name = "generated"; // the last resort
-
-
- // check if the package name is a valid name.
- if( checkedPackageNames.add(name) ) {
- // this is the first time we hear about this package name.
- if( !JJavaName.isJavaPackageName(name) )
- // TODO: s.getLocator() is not very helpful.
- // ideally, we'd like to use the locator where this package name
- // comes from.
- getErrorReporter().error(s.getLocator(),
- Messages.ERR_INCORRECT_PACKAGE_NAME, targetNamespace, name );
- }
-
- return Ring.get(JCodeModel.class)._package(name);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/CollisionInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/CollisionInfo.java
deleted file mode 100644
index 5878c66b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/CollisionInfo.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import org.xml.sax.Locator;
-
-/**
- * Details of a name collision.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-final class CollisionInfo {
- private final String name;
- private final Locator source1;
- private final Locator source2;
-
- public CollisionInfo(String name, Locator source1, Locator source2) {
- this.name = name;
- this.source1 = source1;
- this.source2 = source2;
- }
-
- /**
- * Returns a localized message that describes the collision.
- */
- public String toString() {
- return Messages.format( Messages.MSG_COLLISION_INFO,
- name, printLocator(source1), printLocator(source2) );
- }
-
- private String printLocator(Locator loc) {
- if( loc==null ) return "";
-
- int line = loc.getLineNumber();
- String sysId = loc.getSystemId();
- if(sysId==null) sysId = Messages.format(Messages.MSG_UNKNOWN_FILE);
-
- if( line!=-1 )
- return Messages.format( Messages.MSG_LINE_X_OF_Y,
- Integer.toString(line), sysId );
- else
- return sysId;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ColorBinder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ColorBinder.java
deleted file mode 100644
index 01597558..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ColorBinder.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-abstract class ColorBinder extends BindingComponent implements XSVisitor {
- protected final BGMBuilder builder = Ring.get(BGMBuilder.class);
- protected final ClassSelector selector = getClassSelector();
-
- protected final CClassInfo getCurrentBean() {
- return selector.getCurrentBean();
- }
- protected final XSComponent getCurrentRoot() {
- return selector.getCurrentRoot();
- }
-
-
- protected final void createSimpleTypeProperty(XSSimpleType type,String propName) {
- BIProperty prop = BIProperty.getCustomization(type);
-
- SimpleTypeBuilder stb = Ring.get(SimpleTypeBuilder.class);
- // since we are building the simple type here, use buildDef
- CPropertyInfo p = prop.createValueProperty(propName,false,type,stb.buildDef(type),BGMBuilder.getName(type));
- getCurrentBean().addProperty(p);
- }
-
-
-
-
-
- public final void annotation(XSAnnotation xsAnnotation) {
- throw new IllegalStateException();
- }
-
- public final void schema(XSSchema xsSchema) {
- throw new IllegalStateException();
- }
-
- public final void facet(XSFacet xsFacet) {
- throw new IllegalStateException();
- }
-
- public final void notation(XSNotation xsNotation) {
- throw new IllegalStateException();
- }
-
- public final void identityConstraint(XSIdentityConstraint xsIdentityConstraint) {
- throw new IllegalStateException();
- }
-
- public final void xpath(XSXPath xsxPath) {
- throw new IllegalStateException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/DefaultClassBinder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/DefaultClassBinder.java
deleted file mode 100644
index 438352d6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/DefaultClassBinder.java
+++ /dev/null
@@ -1,558 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-import static com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder.getName;
-
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JJavaName;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CClassInfoParent;
-import com.sun.tools.internal.xjc.model.CClassRef;
-import com.sun.tools.internal.xjc.model.CCustomizations;
-import com.sun.tools.internal.xjc.model.CElement;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIClass;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIGlobalBinding;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BISchemaBinding;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BindInfo;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIXSubstitutable;
-import com.sun.tools.internal.xjc.reader.xmlschema.ct.ComplexTypeFieldBuilder;
-import com.sun.tools.internal.xjc.reader.xmlschema.ct.ComplexTypeBindingMode;
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSDeclaration;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSXPath;
-
-import org.xml.sax.Locator;
-
-/**
- * Default classBinder implementation. Honors &lt;jaxb:class> customizations
- * and default bindings.
- */
-final class DefaultClassBinder implements ClassBinder
-{
- private final SimpleTypeBuilder stb = Ring.get(SimpleTypeBuilder.class);
- private final Model model = Ring.get(Model.class);
-
- protected final BGMBuilder builder = Ring.get(BGMBuilder.class);
- protected final ClassSelector selector = Ring.get(ClassSelector.class);
-
- protected final XSSchemaSet schemas = Ring.get(XSSchemaSet.class);
-
- public CElement attGroupDecl(XSAttGroupDecl decl) {
- return allow(decl,decl.getName());
- }
-
- public CElement attributeDecl(XSAttributeDecl decl) {
- return allow(decl,decl.getName());
- }
-
- public CElement modelGroup(XSModelGroup mgroup) {
- return never();
- }
-
- public CElement modelGroupDecl(XSModelGroupDecl decl) {
- return never();
- }
-
-
- public CElement complexType(XSComplexType type) {
- CElement ci = allow(type,type.getName());
- if(ci!=null) return ci;
-
- // no customization is given -- do as the default binding.
-
- BindInfo bi = builder.getBindInfo(type);
-
- if(type.isGlobal()) {
- QName tagName = null;
- String className = deriveName(type);
- Locator loc = type.getLocator();
-
- if(getGlobalBinding().isSimpleMode()) {
- // in the simple mode, we may optimize it away
- XSElementDecl referer = getSoleElementReferer(type);
- if(referer!=null && isCollapsable(referer)) {
- // if a global element contains
- // a collpsable complex type, we bind this element to a named one
- // and collapses element and complex type.
- tagName = getName(referer);
- className = deriveName(referer);
- loc = referer.getLocator();
- }
- }
-
- // by default, global ones get their own classes.
-
- JPackage pkg = selector.getPackage(type.getTargetNamespace());
-
- return new CClassInfo(model,pkg,className, loc,getTypeName(type),tagName,type,bi.toCustomizationList());
- } else {
- XSElementDecl element = type.getScope();
-
- if( element.isGlobal() && isCollapsable(element)) {
- if(builder.getBindInfo(element).get(BIClass.class)!=null)
- // the parent element was bound to a class. Don't bind this again to
- // cause unnecessary wrapping
- return null;
-
- // generate one class from element and complex type together.
- // this needs to be done before selector.isBound to avoid infinite recursion.
-
- // but avoid doing so when the element is mapped to a class,
- // which creates unnecessary classes
- return new CClassInfo( model, selector.getClassScope(),
- deriveName(element), element.getLocator(), null,
- getName(element), element, bi.toCustomizationList() );
- }
-
-
- CElement parentType = selector.isBound(element,type);
-
- String className;
- CClassInfoParent scope;
-
-
- if( parentType!=null
- && parentType instanceof CElementInfo
- && ((CElementInfo)parentType).hasClass() ) {
- // special case where we put a nested 'Type' element
- scope = (CElementInfo)parentType;
- className = "Type";
- } else {
- // since the parent element isn't bound to a type, merge the customizations associated to it, too.
-// custs = CCustomizations.merge( custs, builder.getBindInfo(type.getScope()).toCustomizationList());
- className = builder.getNameConverter().toClassName(element.getName());
-
- BISchemaBinding sb = builder.getBindInfo(
- type.getOwnerSchema() ).get(BISchemaBinding.class);
- if(sb!=null) className = sb.mangleAnonymousTypeClassName(className);
- scope = selector.getClassScope();
- }
-
- return new CClassInfo(model, scope, className, type.getLocator(), null, null, type, bi.toCustomizationList() );
- }
- }
-
- private QName getTypeName(XSComplexType type) {
- if(type.getRedefinedBy()!=null)
- return null;
- else
- return getName(type);
- }
-
- /**
- * Returns true if the complex type of the given element can be "optimized away"
- * and unified with its parent element decl to form a single class.
- */
- private boolean isCollapsable(XSElementDecl decl) {
- XSType type = decl.getType();
-
- if(!type.isComplexType())
- return false; // not a complex type
-
- if(decl.getSubstitutables().size()>1 || decl.getSubstAffiliation()!=null)
- // because element substitution calls for a proper JAXBElement hierarchy
- return false;
-
- if(decl.isNillable())
- // because nillable needs JAXBElement to represent correctly
- return false;
-
- BIXSubstitutable bixSubstitutable = builder.getBindInfo(decl).get(BIXSubstitutable.class);
- if(bixSubstitutable !=null) {
- // see https://jaxb.dev.java.net/issues/show_bug.cgi?id=289
- // this customization forces non-collapsing behavior.
- bixSubstitutable.markAsAcknowledged();
- return false;
- }
-
- if( getGlobalBinding().isSimpleMode() && decl.isGlobal()) {
- // in the simple mode, we do more aggressive optimization, and get rid of
- // a complex type class if it's only used once from a global element
- XSElementDecl referer = getSoleElementReferer(decl.getType());
- if(referer!=null) {
- assert referer==decl; // I must be the sole referer
- return true;
- }
- }
-
- if(!type.isLocal() || !type.isComplexType())
- return false;
-
- return true;
- }
-
- /**
- * If only one global {@link XSElementDecl} is refering to {@link XSType},
- * return that element, otherwise null.
- */
- private @Nullable XSElementDecl getSoleElementReferer(@NotNull XSType t) {
- Set<XSComponent> referer = builder.getReferer(t);
-
- XSElementDecl sole = null;
- for (XSComponent r : referer) {
- if(r instanceof XSElementDecl) {
- XSElementDecl x = (XSElementDecl) r;
- if(!x.isGlobal())
- // local element references can be ignored, as their names are either given
- // by the property, or by the JAXBElement (for things like mixed contents)
- continue;
- if(sole==null) sole=x;
- else return null; // more than one
- } else {
- // if another type refers to this type, that means
- // this type has a sub-type, so type substitution is possible now.
- return null;
- }
- }
-
- return sole;
- }
-
- public CElement elementDecl(XSElementDecl decl) {
- CElement r = allow(decl,decl.getName());
-
- if(r==null) {
- QName tagName = getName(decl);
- CCustomizations custs = builder.getBindInfo(decl).toCustomizationList();
-
- if(decl.isGlobal()) {
- if(isCollapsable(decl)) {
- // we want the returned type to be built as a complex type,
- // so the binding cannot be delayed.
- return selector.bindToType(decl.getType().asComplexType(),decl,true);
- } else {
- String className = null;
- if(getGlobalBinding().isGenerateElementClass())
- className = deriveName(decl);
-
- // otherwise map global elements to JAXBElement
- CElementInfo cei = new CElementInfo(
- model, tagName, selector.getClassScope(), className, custs, decl.getLocator());
- selector.boundElements.put(decl,cei);
-
- stb.refererStack.push(decl); // referer is element
- cei.initContentType( selector.bindToType(decl.getType(),decl), decl, decl.getDefaultValue() );
- stb.refererStack.pop();
- r = cei;
- }
- }
- }
-
- // have the substitution member derive from the substitution head
- XSElementDecl top = decl.getSubstAffiliation();
- if(top!=null) {
- CElement topci = selector.bindToType(top,decl);
-
- if(r instanceof CClassInfo && topci instanceof CClassInfo)
- ((CClassInfo)r).setBaseClass((CClassInfo)topci);
- if (r instanceof CElementInfo && topci instanceof CElementInfo)
- ((CElementInfo)r).setSubstitutionHead((CElementInfo)topci);
- }
-
- return r;
- }
-
- public CClassInfo empty( XSContentType ct ) { return null; }
-
- public CClassInfo identityConstraint(XSIdentityConstraint xsIdentityConstraint) {
- return never();
- }
-
- public CClassInfo xpath(XSXPath xsxPath) {
- return never();
- }
-
- public CClassInfo attributeUse(XSAttributeUse use) {
- return never();
- }
-
- public CElement simpleType(XSSimpleType type) {
- CElement c = allow(type,type.getName());
- if(c!=null) return c;
-
- if(getGlobalBinding().isSimpleTypeSubstitution() && type.isGlobal()) {
- return new CClassInfo(model,selector.getClassScope(),
- deriveName(type), type.getLocator(), getName(type), null, type, null );
- }
-
- return never();
- }
-
- public CClassInfo particle(XSParticle particle) {
- return never();
- }
-
- public CClassInfo wildcard(XSWildcard wc) {
- return never();
- }
-
-
- // these methods won't be used
- public CClassInfo annotation(XSAnnotation annon) {
- assert false;
- return null;
- }
-
- public CClassInfo notation(XSNotation not) {
- assert false;
- return null;
- }
-
- public CClassInfo facet(XSFacet decl) {
- assert false;
- return null;
- }
- public CClassInfo schema(XSSchema schema) {
- assert false;
- return null;
- }
-
-
-
-
-
- /**
- * Makes sure that the component doesn't carry a {@link BIClass}
- * customization.
- *
- * @return
- * return value is unused. Since most of the caller needs to
- * return null, to make the code a little bit shorter, this
- * method always return null (so that the caller can always
- * say <code>return never(sc);</code>.
- */
- private CClassInfo never() {
- // all we need to do here is just not to acknowledge
- // any class customization. Then this class customization
- // will be reported as an error later when we check all
- // unacknowledged customizations.
-
-
-// BIDeclaration cust=owner.getBindInfo(component).get(BIClass.NAME);
-// if(cust!=null) {
-// // error
-// owner.errorReporter.error(
-// cust.getLocation(),
-// "test {0}", NameGetter.get(component) );
-// }
- return null;
- }
-
- /**
- * Checks if a component carries a customization to map it to a class.
- * If so, make it a class.
- *
- * @param defaultBaseName
- * The token which will be used as the basis of the class name
- * if the class name is not specified in the customization.
- * This is usually the name of an element declaration, and so on.
- *
- * This parameter can be null, in that case it would be an error
- * if a name is not given by the customization.
- */
- private CElement allow( XSComponent component, String defaultBaseName ) {
-
- BIClass decl = null;
-
- if(component instanceof XSComplexType) {
- XSType complexType = (XSType)component;
-
- BIClass lastFoundRecursiveBiClass = null;
-
- if(complexType.getName() != null) {
- while( ! schemas.getAnyType().equals(complexType)) {
- BindInfo bindInfo = builder.getBindInfo(complexType);
- BIClass biClass = bindInfo.get(BIClass.class);
-
- if(biClass != null && "true".equals(biClass.getRecursive()))
- lastFoundRecursiveBiClass = biClass;
-
- complexType = complexType.getBaseType();
- }
- }
-
- // use this as biclass for current component
- decl = lastFoundRecursiveBiClass;
-
- }
-
- BindInfo bindInfo = builder.getBindInfo(component);
- if(decl == null) {
- decl = bindInfo.get(BIClass.class);
- if(decl==null) return null;
- }
-
- decl.markAsAcknowledged();
-
- // first consider binding to the class reference.
- String ref = decl.getExistingClassRef();
- if(ref!=null) {
- if(!JJavaName.isFullyQualifiedClassName(ref)) {
- Ring.get(ErrorReceiver.class).error( decl.getLocation(),
- Messages.format(Messages.ERR_INCORRECT_CLASS_NAME,ref) );
- // recover by ignoring @ref
- } else {
- if(component instanceof XSComplexType) {
- // UGLY UGLY UGLY
- // since we are not going to bind this complex type, we need to figure out
- // its binding mode without actually binding it (and also expose this otherwise
- // hidden mechanism into this part of the code.)
- //
- // this code is potentially dangerous as the base class might have been bound
- // in different ways. To be correct, we need to figure out how the content type
- // would have been bound, from the schema.
- Ring.get(ComplexTypeFieldBuilder.class).recordBindingMode(
- (XSComplexType)component, ComplexTypeBindingMode.NORMAL
- );
- }
- return new CClassRef(model, component, decl, bindInfo.toCustomizationList() );
- }
- }
-
- String clsName = decl.getClassName();
- if(clsName==null) {
- // if the customiztion doesn't give us a name, derive one
- // from the current component.
- if( defaultBaseName==null ) {
- Ring.get(ErrorReceiver.class).error( decl.getLocation(),
- Messages.format(Messages.ERR_CLASS_NAME_IS_REQUIRED) );
-
- // recover by generating a pseudo-random name
- defaultBaseName = "undefined"+component.hashCode();
- }
- clsName = builder.deriveName( defaultBaseName, component );
- } else {
- if( !JJavaName.isJavaIdentifier(clsName) ) {
- // not a valid Java class name
- Ring.get(ErrorReceiver.class).error( decl.getLocation(),
- Messages.format( Messages.ERR_INCORRECT_CLASS_NAME, clsName ));
- // recover by a dummy name
- clsName = "Undefined"+component.hashCode();
- }
- }
-
- QName typeName = null;
- QName elementName = null;
-
- if(component instanceof XSType) {
- XSType t = (XSType) component;
- typeName = getName(t);
- }
-
- if (component instanceof XSElementDecl) {
- XSElementDecl e = (XSElementDecl) component;
- elementName = getName(e);
- }
-
- if (component instanceof XSElementDecl && !isCollapsable((XSElementDecl)component)) {
- XSElementDecl e = ((XSElementDecl)component);
-
- CElementInfo cei = new CElementInfo(model, elementName,
- selector.getClassScope(), clsName,
- bindInfo.toCustomizationList(), decl.getLocation() );
- selector.boundElements.put(e,cei);
-
- stb.refererStack.push(component); // referer is element
- cei.initContentType(
- selector.bindToType(e.getType(),e),
- e,e.getDefaultValue());
- stb.refererStack.pop();
- return cei;
- // TODO: support javadoc and userSpecifiedImplClass
- } else {
- CClassInfo bt = new CClassInfo(model,selector.getClassScope(),
- clsName, decl.getLocation(), typeName, elementName, component, bindInfo.toCustomizationList() );
-
- // set javadoc class comment.
- if(decl.getJavadoc()!=null )
- bt.javadoc = decl.getJavadoc()+"\n\n";
- // add extra blank lines so that the schema fragment
- // and user-specified javadoc would be separated
-
-
- // if the implClass is given, set it to ClassItem
- String implClass = decl.getUserSpecifiedImplClass();
- if( implClass!=null )
- bt.setUserSpecifiedImplClass( implClass );
-
- return bt;
- }
- }
-
- private BIGlobalBinding getGlobalBinding() {
- return builder.getGlobalBinding();
- }
-
- /**
- * Derives a name from a schema component.
- * Use the name of the schema component as the default name.
- */
- private String deriveName( XSDeclaration comp ) {
- return builder.deriveName( comp.getName(), comp );
- }
-
- /**
- * Derives a name from a schema component.
- * For complex types, we take redefinition into account when
- * deriving a default name.
- */
- private String deriveName( XSComplexType comp ) {
- String seed = builder.deriveName( comp.getName(), comp );
- int cnt = comp.getRedefinedCount();
- for( ; cnt>0; cnt-- )
- seed = "Original"+seed;
- return seed;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/DefaultParticleBinder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/DefaultParticleBinder.java
deleted file mode 100644
index 5874f6f4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/DefaultParticleBinder.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSTerm;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.visitor.XSTermVisitor;
-import java.math.BigInteger;
-
-/**
- * {@link ParticleBinder} that follows the JAXB spec.
- *
- * @author Kohsuke Kawaguchi
- */
-final class DefaultParticleBinder extends ParticleBinder {
-
- @Override
- public void build( XSParticle p, Collection<XSParticle> forcedProps ) {
- Checker checker = checkCollision(p,forcedProps);
-
- if(checker.hasNameCollision()) {
- CReferencePropertyInfo prop = new CReferencePropertyInfo(
- getCurrentBean().getBaseClass()==null?"Content":"Rest",
- true, false, false, p,
- builder.getBindInfo(p).toCustomizationList(),
- p.getLocator(), false, false, false);
- RawTypeSetBuilder.build(p,false).addTo(prop);
- prop.javadoc = Messages.format( Messages.MSG_FALLBACK_JAVADOC,
- checker.getCollisionInfo().toString() );
-
- getCurrentBean().addProperty(prop);
- } else {
- new Builder(checker.markedParticles).particle(p);
- }
- }
-
- @Override
- public boolean checkFallback( XSParticle p ) {
- return checkCollision(p,Collections.<XSParticle>emptyList()).hasNameCollision();
- }
-
- private Checker checkCollision( XSParticle p, Collection<XSParticle> forcedProps ) {
- // scan the tree by a checker.
- Checker checker = new Checker(forcedProps);
-
- CClassInfo superClass = getCurrentBean().getBaseClass();
-
- if(superClass!=null)
- checker.readSuperClass(superClass);
- checker.particle(p);
-
- return checker;
- }
-
-
-
-
-
-
-
-
-
-
- /**
- * Marks particles that need to be mapped to properties,
- * by reading customization info.
- */
- private final class Checker implements XSTermVisitor {
-
- Checker(Collection<XSParticle> forcedProps) {
- this.forcedProps = forcedProps;
- }
-
- boolean hasNameCollision() {
- return collisionInfo!=null;
- }
-
- CollisionInfo getCollisionInfo() {
- return collisionInfo;
- }
-
- /**
- * If a collision is found, this field will be non-null.
- */
- private CollisionInfo collisionInfo = null;
-
- /** Used to check name collision. */
- private final NameCollisionChecker cchecker = new NameCollisionChecker();
-
- /**
- * @see DefaultParticleBinder#build(XSParticle, Collection<com.sun.xml.internal.xsom.XSParticle>)
- */
- private final Collection<XSParticle> forcedProps;
-
- public void particle( XSParticle p ) {
-
- if(getLocalPropCustomization(p)!=null
- || builder.getLocalDomCustomization(p)!=null) {
- // if a property customization is specfied,
- // check that value and turn around.
- check(p);
- mark(p);
- return;
- }
-
- XSTerm t = p.getTerm();
-
- if(p.isRepeated() && (t.isModelGroup() || t.isModelGroupDecl())) {
- // a repeated model group gets its own property
- mark(p);
- return;
- }
-
- if(forcedProps.contains(p)) {
- // this particle must become a property
- mark(p);
- return;
- }
-
- outerParticle = p;
- t.visit(this);
- }
-
- /**
- * This field points to the parent XSParticle.
- * The value is only valid when we are processing XSTerm.
- */
- private XSParticle outerParticle;
-
- public void elementDecl(XSElementDecl decl) {
- check(outerParticle);
- mark(outerParticle);
- }
-
- public void modelGroup(XSModelGroup mg) {
- // choice gets mapped to a property
- if(mg.getCompositor()== XSModelGroup.Compositor.CHOICE && builder.getGlobalBinding().isChoiceContentPropertyEnabled()) {
- mark(outerParticle);
- return;
- }
-
- for( XSParticle child : mg.getChildren() )
- particle(child);
- }
-
- public void modelGroupDecl(XSModelGroupDecl decl) {
- modelGroup(decl.getModelGroup());
- }
-
- public void wildcard(XSWildcard wc) {
- mark(outerParticle);
- }
-
- void readSuperClass( CClassInfo ci ) {
- cchecker.readSuperClass(ci);
- }
-
-
-
-
- /**
- * Checks the name collision of a newly found particle.
- */
- private void check( XSParticle p ) {
- if( collisionInfo==null )
- collisionInfo = cchecker.check(p);
- }
-
- /**
- * Marks a particle that it's going to be mapped to a property.
- */
- private void mark( XSParticle p ) {
- markedParticles.put(p,computeLabel(p));
- }
-
- /**
- * Marked particles.
- *
- * A map from XSParticle to its label.
- */
- public final Map<XSParticle,String> markedParticles = new HashMap<XSParticle,String>();
-
-
- /**
- * Checks name collisions among particles that belong to sequences.
- */
- private final class NameCollisionChecker {
-
- /**
- * Checks the label conflict of a particle.
- * This method shall be called for each marked particle.
- *
- * @return
- * a description of a collision if a name collision is
- * found. Otherwise null.
- */
- CollisionInfo check( XSParticle p ) {
- // this can be used for particles with a property customization,
- // which may not have element declaration as its term.
-// // we only check particles with element declarations.
-// _assert( p.getTerm().isElementDecl() );
-
- String label = computeLabel(p);
- if( occupiedLabels.containsKey(label) ) {
- // collide with occupied labels
- return new CollisionInfo(label,p.getLocator(),
- occupiedLabels.get(label).locator);
- }
-
- for( XSParticle jp : particles ) {
- if(!check( p, jp )) {
- // problem was found. no need to check further
- return new CollisionInfo( label, p.getLocator(), jp.getLocator() );
- }
- }
- particles.add(p);
- return null;
- }
-
- /** List of particles reported through the check method. */
- private final List<XSParticle> particles = new ArrayList<XSParticle>();
-
- /**
- * Label names already used in the base type.
- */
- private final Map<String,CPropertyInfo> occupiedLabels = new HashMap<String,CPropertyInfo>();
-
- /**
- * Checks the conflict of two particles.
- * @return
- * true if the check was successful.
- */
- private boolean check( XSParticle p1, XSParticle p2 ) {
- return !computeLabel(p1).equals(computeLabel(p2));
- }
-
- /**
- * Reads fields of the super class and includes them
- * to name collision tests.
- */
- void readSuperClass( CClassInfo base ) {
- for( ; base!=null; base=base.getBaseClass() ) {
- for( CPropertyInfo p : base.getProperties() )
- occupiedLabels.put(p.getName(true),p);
- }
- }
- }
-
-
-
-
-
- /** Keep the computed label names for particles. */
- private final Map<XSParticle,String> labelCache = new Hashtable<XSParticle,String>();
-
- /**
- * Hides the computeLabel method of the outer class
- * and adds caching.
- */
- private String computeLabel( XSParticle p ) {
- String label = labelCache.get(p);
- if(label==null)
- labelCache.put( p, label=DefaultParticleBinder.this.computeLabel(p) );
- return label;
- }
- }
-
-
-
-
-
-
-
-
-
-
-
-
- /**
- * Builds properties by using the result computed by Checker
- */
- private final class Builder implements XSTermVisitor {
- Builder( Map<XSParticle,String> markedParticles ) {
- this.markedParticles = markedParticles;
- }
-
- /** All marked particles. */
- private final Map<XSParticle,String/*label*/> markedParticles;
-
- /**
- * When we are visiting inside an optional particle, this flag
- * is set to true.
- *
- * <p>
- * This allows us to correctly generate primitive/boxed types.
- */
- private boolean insideOptionalParticle;
-
-
- /** Returns true if a particle is marked. */
- private boolean marked( XSParticle p ) {
- return markedParticles.containsKey(p);
- }
- /** Gets a label of a particle. */
- private String getLabel( XSParticle p ) {
- return markedParticles.get(p);
- }
-
- public void particle( XSParticle p ) {
- XSTerm t = p.getTerm();
-
- if(marked(p)) {
- BIProperty cust = BIProperty.getCustomization(p);
- CPropertyInfo prop = cust.createElementOrReferenceProperty(
- getLabel(p), false, p, RawTypeSetBuilder.build(p,insideOptionalParticle));
- getCurrentBean().addProperty(prop);
- } else {
- // repeated model groups should have been marked already
- assert !p.isRepeated();
-
- boolean oldIOP = insideOptionalParticle;
- insideOptionalParticle |= BigInteger.ZERO.equals(p.getMinOccurs());
- // this is an unmarked particle
- t.visit(this);
- insideOptionalParticle = oldIOP;
- }
- }
-
- public void elementDecl( XSElementDecl e ) {
- // because the corresponding particle must be marked.
- assert false;
- }
-
- public void wildcard( XSWildcard wc ) {
- // because the corresponding particle must be marked.
- assert false;
- }
-
- public void modelGroupDecl( XSModelGroupDecl decl ) {
- modelGroup(decl.getModelGroup());
- }
-
- public void modelGroup( XSModelGroup mg ) {
- boolean oldIOP = insideOptionalParticle;
- insideOptionalParticle |= mg.getCompositor()==XSModelGroup.CHOICE;
-
- for( XSParticle p : mg.getChildren())
- particle(p);
-
- insideOptionalParticle = oldIOP;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ErrorReporter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ErrorReporter.java
deleted file mode 100644
index e69c8086..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ErrorReporter.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.reader.Ring;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXParseException;
-
-/**
- * Provides error report capability to other owner components
- * by encapsulating user-specified {@link ErrorHandler}
- * and exposing utlity methods.
- *
- * <p>
- * This class also wraps SAXException to a RuntimeException
- * so that the exception thrown inside the error handler
- * can abort the process.
- *
- * <p>
- * At the end of the day, we need to know if there was any error.
- * So it is important that all the error messages go through this
- * object. This is done by hiding the errorHandler from the rest
- * of the components.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class ErrorReporter extends BindingComponent {
-
- /**
- * Error handler to report any binding error to.
- * To report errors, use the error method.
- */
- private final ErrorReceiver errorReceiver = Ring.get(ErrorReceiver.class);
-
-
- //
- // helper methods for classes in this package.
- // properties are localized through the Messages.properties file
- // in this package
- //
- void error( Locator loc, String prop, Object... args ) {
- errorReceiver.error( loc, Messages.format(prop,args) );
- }
-
- void warning( Locator loc, String prop, Object... args ) {
- errorReceiver.warning( new SAXParseException(
- Messages.format(prop,args), loc ));
- }
-
-
-
- /*
- private String format( String prop, Object[] args ) {
- // use a bit verbose code to make it portable.
- String className = this.getClass().getName();
- int idx = className.lastIndexOf('.');
- String packageName = className.substring(0,idx);
-
- String fmt = ResourceBundle.getBundle(packageName+".Messages").getString(prop);
-
- return MessageFormat.format(fmt,args);
- }
- */
-
-////
-////
-//// ErrorHandler implementation
-////
-////
-// public void error(SAXParseException exception) {
-// errorReceiver.error(exception);
-// }
-//
-// public void fatalError(SAXParseException exception) {
-// errorReceiver.fatalError(exception);
-// }
-//
-// public void warning(SAXParseException exception) {
-// errorReceiver.warning(exception);
-// }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ExpressionBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ExpressionBuilder.java
deleted file mode 100644
index 2e36077a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ExpressionBuilder.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.reader.gbind.Choice;
-import com.sun.tools.internal.xjc.reader.gbind.Element;
-import com.sun.tools.internal.xjc.reader.gbind.Expression;
-import com.sun.tools.internal.xjc.reader.gbind.OneOrMore;
-import com.sun.tools.internal.xjc.reader.gbind.Sequence;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.visitor.XSTermFunction;
-import java.math.BigInteger;
-
-/**
- * Visits {@link XSParticle} and creates a corresponding {@link Expression} tree.
- * @author Kohsuke Kawaguchi
- */
-public final class ExpressionBuilder implements XSTermFunction<Expression> {
-
- public static Expression createTree(XSParticle p) {
- return new ExpressionBuilder().particle(p);
- }
-
- private ExpressionBuilder() {}
-
- /**
- * Wildcard instance needs to be consolidated to one,
- * and this is such instance (if any.)
- */
- private GWildcardElement wildcard = null;
-
- private final Map<QName,GElementImpl> decls = new HashMap<QName,GElementImpl>();
-
- private XSParticle current;
-
- /**
- * We can only have one {@link XmlAnyElement} property,
- * so all the wildcards need to be treated as one node.
- */
- public Expression wildcard(XSWildcard wc) {
- if(wildcard==null)
- wildcard = new GWildcardElement();
- wildcard.merge(wc);
- wildcard.particles.add(current);
- return wildcard;
- }
-
- public Expression modelGroupDecl(XSModelGroupDecl decl) {
- return modelGroup(decl.getModelGroup());
- }
-
- public Expression modelGroup(XSModelGroup group) {
- XSModelGroup.Compositor comp = group.getCompositor();
- if(comp==XSModelGroup.CHOICE) {
- // empty choice is not epsilon, but empty set,
- // so this initial value is incorrect. But this
- // kinda works.
- // properly handling empty set requires more work.
- Expression e = Expression.EPSILON;
- for (XSParticle p : group.getChildren()) {
- if(e==null) e = particle(p);
- else e = new Choice(e,particle(p));
- }
- return e;
- } else {
- Expression e = Expression.EPSILON;
- for (XSParticle p : group.getChildren()) {
- if(e==null) e = particle(p);
- else e = new Sequence(e,particle(p));
- }
- return e;
- }
- }
-
- public Element elementDecl(XSElementDecl decl) {
- QName n = BGMBuilder.getName(decl);
-
- GElementImpl e = decls.get(n);
- if(e==null)
- decls.put(n,e=new GElementImpl(n,decl));
-
- e.particles.add(current);
- assert current.getTerm()==decl;
-
- return e;
- }
-
- public Expression particle(XSParticle p) {
- current = p;
- Expression e = p.getTerm().apply(this);
-
- if(p.isRepeated())
- e = new OneOrMore(e);
-
- if (BigInteger.ZERO.equals(p.getMinOccurs()))
- e = new Choice(e,Expression.EPSILON);
-
- return e;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ExpressionParticleBinder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ExpressionParticleBinder.java
deleted file mode 100644
index 162a47b9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ExpressionParticleBinder.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.util.Collection;
-
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.Multiplicity;
-import com.sun.tools.internal.xjc.reader.RawTypeSet;
-import com.sun.tools.internal.xjc.reader.gbind.ConnectedComponent;
-import com.sun.tools.internal.xjc.reader.gbind.Element;
-import com.sun.tools.internal.xjc.reader.gbind.Expression;
-import com.sun.tools.internal.xjc.reader.gbind.Graph;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
-import com.sun.xml.internal.bind.v2.model.core.WildcardMode;
-import com.sun.xml.internal.xsom.XSParticle;
-
-/**
- * {@link ParticleBinder} that uses {@link ExpressionBuilder} et al
- * for better, more intuitive (but non spec-conforming) binding.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ExpressionParticleBinder extends ParticleBinder {
- public void build(XSParticle p, Collection<XSParticle> forcedProps) {
- // this class isn't about spec conformance, but
- // for the ease of use.
- // so we don't give a damn about 'forcedProps'.
- // although, for a future note, it's conceivable to expand
- // the binding algorithm to cover this notion.
-
- Expression tree = ExpressionBuilder.createTree(p);
- Graph g = new Graph(tree);
- for (ConnectedComponent cc : g) {
- buildProperty(cc);
- }
- }
-
- /**
- * Builds a property ouf ot a connected component.
- */
- private void buildProperty(ConnectedComponent cc) {
- StringBuilder propName = new StringBuilder(); // property name
- int nameTokenCount = 0; // combine only up to 3
-
- RawTypeSetBuilder rtsb = new RawTypeSetBuilder();
- for (Element e : cc) {
- GElement ge = (GElement)e;
-
- if(nameTokenCount<3) {
- if(nameTokenCount!=0)
- propName.append("And");
- propName.append(makeJavaName(cc.isCollection(),ge.getPropertyNameSeed()));
- nameTokenCount++;
- }
-
- if(e instanceof GElementImpl) {
- GElementImpl ei = (GElementImpl) e;
- rtsb.elementDecl(ei.decl);
- continue;
- }
- if(e instanceof GWildcardElement) {
- GWildcardElement w = (GWildcardElement)e;
- rtsb.getRefs().add(new RawTypeSetBuilder.WildcardRef(
- w.isStrict() ? WildcardMode.STRICT : WildcardMode.SKIP));
- continue;
- }
- assert false : e; // no other kind should be here
- }
-
- Multiplicity m = Multiplicity.ONE;
- if(cc.isCollection())
- m = m.makeRepeated();
- if(!cc.isRequired())
- m = m.makeOptional();
-
- RawTypeSet rts = new RawTypeSet(rtsb.getRefs(),m);
-
- XSParticle p = findSourceParticle(cc);
-
- BIProperty cust = BIProperty.getCustomization(p);
- CPropertyInfo prop = cust.createElementOrReferenceProperty(
- propName.toString(), false, p, rts );
- getCurrentBean().addProperty(prop);
- }
-
- /**
- * Finds a {@link XSParticle} that can serve as the representative property of
- * the given {@link ConnectedComponent}.
- *
- * The representative property is used for reporting an error location and
- * taking {@link BIProperty} customization. Right now, the algorithm is just pick
- * the first one with {@link BIProperty}, but one can think of a better algorithm,
- * such as taking a choice of (A|B) if CC={A,B}.
- */
- private XSParticle findSourceParticle(ConnectedComponent cc) {
- XSParticle first = null;
-
- for (Element e : cc) {
- GElement ge = (GElement)e;
- for (XSParticle p : ge.particles) {
- if(first==null)
- first = p;
- if(getLocalPropCustomization(p)!=null)
- return p;
- }
- // if there are multiple property customizations,
- // all but one will be left unused, which will be detected as an error
- // later, so no need to check that now.
- }
-
- // if no customization was found, just use the first one.
- return first;
- }
-
- public boolean checkFallback(XSParticle p) {
- // this algorithm never falls back to 'getContent'.
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/GElement.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/GElement.java
deleted file mode 100644
index c87962b7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/GElement.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import com.sun.tools.internal.xjc.reader.gbind.Element;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSParticle;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-abstract class GElement extends Element {
- /**
- * All the {@link XSParticle}s (whose term is {@link XSElementDecl})
- * that are coereced into a single {@link Element}.
- */
- final Set<XSParticle> particles = new HashSet<XSParticle>();
-
- /**
- * Gets the seed (raw XML name) to be used to generate a property name.
- */
- abstract String getPropertyNameSeed();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/GElementImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/GElementImpl.java
deleted file mode 100644
index ee2891ad..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/GElementImpl.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.reader.gbind.Element;
-import com.sun.xml.internal.xsom.XSElementDecl;
-
-/**
- * {@link Element} that wraps {@link XSElementDecl}.
- *
- * @author Kohsuke Kawaguchi
- */
-final class GElementImpl extends GElement {
- public final QName tagName;
-
- /**
- * The representative {@link XSElementDecl}.
- *
- * Even though multiple {@link XSElementDecl}s maybe represented by
- * a single {@link GElementImpl} (especially when they are local),
- * the schema spec requires that they share the same type and other
- * characteristic.
- *
- * (To be really precise, you may have different default values,
- * nillability, all that, so if that becomes a real issue we have
- * to reconsider this design.)
- */
- public final XSElementDecl decl;
-
- public GElementImpl(QName tagName, XSElementDecl decl) {
- this.tagName = tagName;
- this.decl = decl;
- }
-
- public String toString() {
- return tagName.toString();
- }
-
- String getPropertyNameSeed() {
- return tagName.getLocalPart();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/GWildcardElement.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/GWildcardElement.java
deleted file mode 100644
index c32cb766..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/GWildcardElement.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import com.sun.tools.internal.xjc.reader.gbind.Element;
-import com.sun.xml.internal.xsom.XSWildcard;
-
-/**
- * {@link Element} that represents a wildcard,
- * for the "ease of binding" we always just bind this to DOM elements.
- * @author Kohsuke Kawaguchi
- */
-final class GWildcardElement extends GElement {
-
- /**
- * If true, bind to <tt>Object</tt> for eager JAXB unmarshalling.
- * Otherwise bind to DOM (I hate "you can put both" semantics,
- * so I'm not going to do that in this binding mode.)
- */
- private boolean strict = true;
-
- public String toString() {
- return "#any";
- }
-
- String getPropertyNameSeed() {
- return "any";
- }
-
- public void merge(XSWildcard wc) {
- switch(wc.getMode()) {
- case XSWildcard.LAX:
- case XSWildcard.SKIP:
- strict = false;
- }
- }
-
- public boolean isStrict() {
- return strict;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle.properties
deleted file mode 100644
index ffca23ff..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle.properties
+++ /dev/null
@@ -1,200 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-BGMBuilder.NoGlobalElement = \
- Schema contains no global element declaration.
-
-UnusedCustomizationChecker.WarnUnusedExpectedContentTypes = \
- An xmime:expectedContentTypes attribute is present on an incorrect element
-
-BGMBuilder.MultipleSchemaBindings = \
- Multiple <schemaBindings> are defined for the target namespace "{0}"
-
-BGMBuilder.MultipleSchemaBindings.Location = \
- Another <schemaBindings> is defined here
-
-
-
-ClassSelector.ClassNameIsRequired = \
- Cannot derive a name from schema. A name attribute specified to the <class> customization.
-
-ClassSelector.IncorrectClassName = \
- Specified name ''{0}'' is not a valid Java identifier.
-
-ClassSelector.IncorrectPackageName = \
- The package name ''{1}'' used for this schema is not a valid package name.
-
-# {0} - name-identifier-format-enum
-ClassSelector.JavadocHeading = \
- <p>Java class for {0}.\n\n<p>The following schema fragment specifies the expected \
- content contained within this class.
-
-ClassSelector.JavadocLineUnknown = \
- unknown
-
-ClassSelector.ReservedClassName = \
- Attempt to create a class having the same name as the reserved word "{0}".
-
-
-CollisionInfo.CollisionInfo = \
- The field name "{0}" is used by two different parts of a schema. See: \n\
- {1}\n\
- {2}
-
-CollisionInfo.UnknownFile = \
- unknown file
-
-# Concatenated with CollisionInfo.CollisionInfo (CollisionInfo.CollisionInfo + CollisionInfo.LineXOfY + CollisionInfo.LineXOfY) e.g.: The field name "FieldName" is used by two different parts of a schema. See: line X of file:Schema.xsd line Y of file:Schema2.xsd
-CollisionInfo.LineXOfY = \
- line {0} of {1}
-
-
-ConversionFinder.CannotBeTypeSafeEnum = \
- A type safe enum customization is specified to a simple type that cannot \
- be mapped to a type safe enum.
-ConversionFinder.CannotBeTypeSafeEnum.Location = \
- The relevant simple type declaration is specified at this location
-ConversionFinder.NoEnumNameAvailable = \
- A name attribute is required to customize an anonymous simple type to type-safe enum.
-ConversionFinder.NoEnumFacet= \
- enum class customization is specified on a type that has no enumeration facet.
-ERR_ILLEGAL_EXPECTED_MIME_TYPE = \
- Unable to parse the expected MIME type "{0}". {1}.
-
-
-DatatypeBuilder.DatatypeError = \
- Simple type error: {0}
-
-
-
-
-
-
-DefaultParticleBinder.UnableToGenerateNameFromModelGroup = \
- Unable to generate a property name from a model group. A customization is required.
-
-# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = \
- Gets the rest of the content model. \n\
- \n\
- <p>\n\
- You are getting this "catch-all" property because of the following reason: \n\
- {0}\n\
- <p>\n\
- To get rid of this property, apply a property customization to one \n\
- of both of the following declarations to change their names: \n
-
-
-
-
-
-
-
-FieldBuilder.IncorrectFixedValue = \
- The value specified in the fixed attribute "{0}" is not a valid value for the datatype
-
-FieldBuilder.IncorrectDefaultValue = \
- The value specified in the default attribute "{0}" is not a valid value for the datatype
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse = \
- "{0}" is specified by a customization but this attribute has incompatible type "{1}"
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse.Source = \
- The relevant customization is specified at this location
-
-FieldBuilder.Javadoc.NilProperty = \
- This property is used to control \
- <a href="http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#Nils">the xsi:nil feature</a> \
- of W3C XML Schema. \nSetting this property to true will cause \
- the output to be &lt;{0} xsi:nil="true" /> regardless of the \
- values of the other properties.
-
-FieldBuilder.Javadoc.ValueObject = \
- get/set the complex type value associated with this element.\n \
- when you unmarshal a document that contains xsi:type, the get{1} method \
- would return an instance of derived classes of '{'@link {0}'}'. Similarly, if you set \
- an instance of derived classes, then you would get the instance with xsi:type \
- when you marshal out to XML.
-
-
-SimpleTypeBuilder.UnnestedJavaTypeCustomization = \
- <javaType> customization in this context must be nested (JAXB spec sec 6.8.1): \n\
- \t<property>\n\
- \t <baseType>\n\
- \t <javaType ...>\n\
- \t </baseType>\n\
- \t</property>
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization = \
- compiler was unable to honor this {0} customization. It is attached to a wrong place, \
- or it's inconsistent with other bindings.
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization.Relevant = \
- (the above customization is attached to the following location in the schema)
-
-ERR_ENUM_MEMBER_NAME_COLLISION = \
- Two enum members yield the same constant name {0}
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_ENUM_MEMBER_NAME_COLLISION, followed by a line with the position of the problem in a particular file
-ERR_ENUM_MEMBER_NAME_COLLISION_RELATED = \
- (related to above) the other enum is defined at this location
-
-WARN_ENUM_MEMBER_SIZE_CAP = \
- Simple type "{0}" was not mapped to Enum due to EnumMemberSizeCap limit. Facets count: {1}, current limit: {2}. \
- You can use customization attribute "typesafeEnumMaxMembers" to extend the limit.
-
-ERR_CANNOT_GENERATE_ENUM_NAME = \
- Cannot generate a constant name from the enumeration value "{0}". \
- Use <jaxb:typesafeEnumMember name="..."/> to specify one.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-ERR_MULTIPLE_GLOBAL_BINDINGS = \
- only one globalBindings customization is allowed in a whole compilation
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_MULTIPLE_GLOBAL_BINDINGS, followed by a line with the position of the problem in a particular file, e.g. parsing a schema... \n [ERROR] only one globalBindings customization is allowed in a whole compilation \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/base.xjb \n [ERROR] (related to above) but one is already given at this location \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/sub1.xjb
-ERR_MULTIPLE_GLOBAL_BINDINGS_OTHER = \
- (related to above) but one is already given at this location
-
-ERR_REFERENCE_TO_NONEXPORTED_CLASS = \
- {0} is in a referenced schema and do not have the corresponding Java class specified by \
- <jaxb:class ref="..."/> customization. Therefore it cannot be referenced from outside.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE = \
- (related to above) The schema for namespace "{0}" (which includes the above component) is \
- designated for reference only by this customization.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS and ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER = \
- (related to above) The problematic schema component is referenced from this component: {0}
-
-WARN_DEFAULT_VALUE_PRIMITIVE_TYPE = \
- Cannot generate default value for primitive type "{0}".
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_de.properties
deleted file mode 100644
index 038e23ad..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_de.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-BGMBuilder.NoGlobalElement = Schema enth\u00E4lt keine globale Elementdeklaration.
-
-UnusedCustomizationChecker.WarnUnusedExpectedContentTypes = Ein xmime:expectedContentTypes-Attribut ist in einem ung\u00FCltigen Element vorhanden
-
-BGMBuilder.MultipleSchemaBindings = Mehrere <schemaBindings> sind f\u00FCr den Ziel-Namespace "{0}" definiert
-
-BGMBuilder.MultipleSchemaBindings.Location = Ein weiteres <schemaBindings> ist hier definiert
-
-
-
-ClassSelector.ClassNameIsRequired = Aus dem Schema kann kein Name abgeleitet werden. Ein Namensattribut, das f\u00FCr die <class>-Anpassung angegeben ist.
-
-ClassSelector.IncorrectClassName = Der angegebene Name ''{0}'' ist keine g\u00FCltige Java-ID.
-
-ClassSelector.IncorrectPackageName = Der Packagename ''{1}'', der f\u00FCr dieses Schema verwendet wird, ist kein g\u00FCltiger Packagename.
-
-# {0} - name-identifier-format-enum
-ClassSelector.JavadocHeading = <p>Java-Klasse f\u00FCr {0}.\n\n<p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
-
-ClassSelector.JavadocLineUnknown = unbekannt
-
-ClassSelector.ReservedClassName = Versuch, eine Klasse zu erstellen, die denselben Namen wie das reservierte Wort "{0}" hat.
-
-
-CollisionInfo.CollisionInfo = Der Feldname "{0}" wird von zwei verschiedenen Teilen eines Schemas verwendet. Siehe: \n{1}\n{2}
-
-CollisionInfo.UnknownFile = unbekannte Datei
-
-# Concatenated with CollisionInfo.CollisionInfo (CollisionInfo.CollisionInfo + CollisionInfo.LineXOfY + CollisionInfo.LineXOfY) e.g.: The field name "FieldName" is used by two different parts of a schema. See: line X of file:Schema.xsd line Y of file:Schema2.xsd
-CollisionInfo.LineXOfY = Zeile {0} von {1}
-
-
-ConversionFinder.CannotBeTypeSafeEnum = Eine Typesafe-Enumerationsanpassung ist f\u00FCr einen einfachen Typ angegeben, der keiner Typesafe-Enumeration zugeordnet werden kann.
-ConversionFinder.CannotBeTypeSafeEnum.Location = Die relevante einfache Typdeklaration wird in diesem Verzeichnis angegeben
-ConversionFinder.NoEnumNameAvailable = Ein Namensattribut ist erforderlich, um einen anonymen einfachen Typ an eine Typesafe-Enumeration anzupassen
-ConversionFinder.NoEnumFacet= Enumerationsklassenanpassung ist f\u00FCr einen Typ angegeben, der kein Enumerations-Facet hat.
-ERR_ILLEGAL_EXPECTED_MIME_TYPE = Der erwartete MIME-Typ "{0}" kann nicht geparst werden. {1}.
-
-
-DatatypeBuilder.DatatypeError = Fehler bei einfachem Typ: {0}
-
-
-
-
-
-
-DefaultParticleBinder.UnableToGenerateNameFromModelGroup = Ein Eigenschaftsname kann nicht aus einer Modellgruppe generiert werden. Eine Anpassung ist erforderlich.
-
-# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = Ruft das restliche Contentmodell ab. \n\n<p>\nSie rufen diese "catch-all"-Eigenschaft aus folgendem Grund ab: \n{0}\n<p>\nUm diese Eigenschaft zu entfernen, wenden Sie eine Eigenschaftenanpassung f\u00FCr eine\nder beiden folgenden Deklarationen an, um deren Namen zu \u00E4ndern: \n
-
-
-
-
-
-
-
-FieldBuilder.IncorrectFixedValue = Der in dem festen Attribut "{0}" angegebene Wert ist kein g\u00FCltiger Wert f\u00FCr den Datentyp
-
-FieldBuilder.IncorrectDefaultValue = Der in dem Standardattribut "{0}" angegebene Wert ist kein g\u00FCltiger Wert f\u00FCr den Datentyp
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse = "{0}" wird von einer Anpassung angegeben, dieses Attribut hat jedoch einen inkompatiblen Typ "{1}"
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse.Source = Die relevante Anpassung wird in diesem\tVerzeichnis angegeben
-
-FieldBuilder.Javadoc.NilProperty = Diese Eigenschaft wird verwendet, um <a href="http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#Nils">the xsi:nil feature</a> des W3C XML-Schemas zu kontrollieren. \nWenn diese Eigenschaft auf "True" festgelegt wird, ist die Ausgabe &lt;{0} xsi:nil="True" /> ungeachtet der Werte der anderen Eigenschaften.
-
-FieldBuilder.Javadoc.ValueObject = Verwenden Sie get/set f\u00FCr den komplexen Typwert, der mit diesem Element verkn\u00FCpft ist.\n Beim Unmarshalling eines Dokuments, das xsi:type enth\u00E4lt, w\u00FCrde die get-{1}-Methode eine Instanz der abgeleiteten Klassen von ''{''@link {0}''}'' zur\u00FCckgeben. Wenn Sie eine Instanz der abgeleiteten Klassen mit "set" festlegen, w\u00FCrden Sie eine Instanz mit xsi:type beim Marshalling in XML erhalten.
-
-
-SimpleTypeBuilder.UnnestedJavaTypeCustomization = <javaType>-Anpassung in diesem Kontext muss verschachtelt sein (JAXB-Spezifikation, Abschnitt 6.8.1): \n\t<property>\n\t <baseType>\n\t <javaType ...>\n\t </baseType>\n\t</property>
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization = Compiler konnte diese {0}-Anpassung nicht ber\u00FCcksichtigen. Sie ist dem falschen Ort zugeordnet oder ist mit anderen Bindings inkonsistent.
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization.Relevant = (die obige Anpassung ist dem folgenden Verzeichnis in dem Schema zugeordnet)
-
-ERR_ENUM_MEMBER_NAME_COLLISION = Zwei Enumerations-Member ergeben denselben Konstantennamen {0}
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_ENUM_MEMBER_NAME_COLLISION, followed by a line with the position of the problem in a particular file
-ERR_ENUM_MEMBER_NAME_COLLISION_RELATED = Die andere Enumeration ist in diesem Verzeichnis definiert
-
-WARN_ENUM_MEMBER_SIZE_CAP = Einfacher Typ "{0}" war Enum wegen EnumMemberSizeCap-Grenzwert nicht zugeordnet. Anzahl Facets: {1}, aktueller Grenzwert: {2}. Sie k\u00F6nnen das Anpassungsattribut "typesafeEnumMaxMembers" verwenden, um den Grenzwert zu erweitern.
-
-ERR_CANNOT_GENERATE_ENUM_NAME = Aus dem Enumerationswert "{0}" kann kein Konstantenname generiert werden. Geben Sie einen Konstantennamen mit <jaxb:typesafeEnumMember name="..."/> an.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-ERR_MULTIPLE_GLOBAL_BINDINGS = nur eine globalBindings-Anpassung ist in einer gesamten Kompilierung zul\u00E4ssig
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_MULTIPLE_GLOBAL_BINDINGS, followed by a line with the position of the problem in a particular file, e.g. parsing a schema... \n [ERROR] only one globalBindings customization is allowed in a whole compilation \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/base.xjb \n [ERROR] (related to above) but one is already given at this location \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/sub1.xjb
-ERR_MULTIPLE_GLOBAL_BINDINGS_OTHER = in diesem Verzeichnis ist jedoch bereits eine Anpassung angegeben
-
-ERR_REFERENCE_TO_NONEXPORTED_CLASS = {0} befindet sich in einem referenzierten Schema und enth\u00E4lt die entsprechende Java-Klasse nicht, die mit der <jaxb:class ref="..."/>-Anpassung angegeben wird. Deshalb kann sie nicht von au\u00DFen referenziert werden.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE = Das Schema f\u00FCr Namespace "{0}" (das die obige Komponente enth\u00E4lt) ist nur zur Referenz durch diese Anpassung ausgelegt.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS and ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER = Die problematische Schemakomponente wird von dieser Komponente referenziert: {0}
-
-WARN_DEFAULT_VALUE_PRIMITIVE_TYPE = Standardwert f\u00FCr primitiven Typ "{0}" kann nicht generiert werden.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_es.properties
deleted file mode 100644
index b42a4c02..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_es.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-BGMBuilder.NoGlobalElement = El esquema no contiene ninguna declaraci\u00F3n de elementos globales.
-
-UnusedCustomizationChecker.WarnUnusedExpectedContentTypes = Hay un atributo xmime:expectedContentTypes en un elemento incorrecto
-
-BGMBuilder.MultipleSchemaBindings = Hay definidos m\u00FAltiples <schemaBindings> para el espacio de nombres de destino "{0}"
-
-BGMBuilder.MultipleSchemaBindings.Location = Aqu\u00ED hay definido otro <schemaBindings>
-
-
-
-ClassSelector.ClassNameIsRequired = No se puede derivar un nombre del esquema. Se ha especificado un atributo de nombre para la personalizaci\u00F3n de <clase>.
-
-ClassSelector.IncorrectClassName = El nombre especificado ''{0}'' no es un identificador Java v\u00E1lido.
-
-ClassSelector.IncorrectPackageName = El nombre del paquete ''{1}'' utilizado para este esquema no es v\u00E1lido.
-
-# {0} - name-identifier-format-enum
-ClassSelector.JavadocHeading = <p>Clase Java para {0}.\n\n<p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase.
-
-ClassSelector.JavadocLineUnknown = desconocido
-
-ClassSelector.ReservedClassName = Se ha intentado crear una clase con el mismo nombre que la palabra reservada "{0}".
-
-
-CollisionInfo.CollisionInfo = El nombre de campo "{0}" se est\u00E1 utilizando en dos partes diferentes de un esquema. Consulte: \n{1}\n{2}
-
-CollisionInfo.UnknownFile = archivo desconocido
-
-# Concatenated with CollisionInfo.CollisionInfo (CollisionInfo.CollisionInfo + CollisionInfo.LineXOfY + CollisionInfo.LineXOfY) e.g.: The field name "FieldName" is used by two different parts of a schema. See: line X of file:Schema.xsd line Y of file:Schema2.xsd
-CollisionInfo.LineXOfY = l\u00EDnea {0} de {1}
-
-
-ConversionFinder.CannotBeTypeSafeEnum = Se ha especificado una personalizaci\u00F3n de enumeraci\u00F3n de tipo seguro en un tipo simple que no se puede asignar a una enumeraci\u00F3n de tipo seguro.
-ConversionFinder.CannotBeTypeSafeEnum.Location = La declaraci\u00F3n de tipo simple correspondiente se ha especificado en esta ubicaci\u00F3n
-ConversionFinder.NoEnumNameAvailable = Se necesita un atributo de nombre para personalizar un tipo simple an\u00F3nimo en una enumeraci\u00F3n de tipo seguro.
-ConversionFinder.NoEnumFacet= la personalizaci\u00F3n de clase de enumeraci\u00F3n se ha especificado en un tipo que no tiene ninguna faceta de enumeraci\u00F3n.
-ERR_ILLEGAL_EXPECTED_MIME_TYPE = No se ha podido analizar el tipo MIME esperado "{0}". {1}.
-
-
-DatatypeBuilder.DatatypeError = Error de tipo simple: {0}
-
-
-
-
-
-
-DefaultParticleBinder.UnableToGenerateNameFromModelGroup = No se ha podido generar un nombre de propiedad a partir de un grupo de modelos. Se necesita una personalizaci\u00F3n.
-
-# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = Obtiene el resto del modelo de contenido. \n\n<p>\nHa obtenido esta propiedad que permite capturar todo por el siguiente motivo: \n{0}\n<p>\nPara deshacerse de esta propiedad, aplique una personalizaci\u00F3n de propiedad a una\nde las dos declaraciones siguientes para cambiarles de nombre: \n
-
-
-
-
-
-
-
-FieldBuilder.IncorrectFixedValue = El valor especificado en el atributo fijo "{0}" no es un valor v\u00E1lido para el tipo de dato
-
-FieldBuilder.IncorrectDefaultValue = El valor especificado en el atributo por defecto "{0}" no es un valor v\u00E1lido para el tipo de dato
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse = "{0}" lo ha especificado una personalizaci\u00F3n, pero este atributo es de un tipo "{1}" incompatible
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse.Source = La personalizaci\u00F3n correspondiente se especifica\ten esta ubicaci\u00F3n
-
-FieldBuilder.Javadoc.NilProperty = Esta propiedad se utiliza para controlar <a href="http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#Nils">la funci\u00F3n xsi:nil</a> del esquema XML de W3C. \nAl definir esta propiedad en true, la salida ser\u00E1 &lt;{0} xsi:nil="true" /> con independencia de los valores de las otras propiedades.
-
-FieldBuilder.Javadoc.ValueObject = obtenga/defina el valor de tipo complejo asociado a este elemento.\n Cuando se anula la canalizaci\u00F3n de un documento que contiene xsi:type, el m\u00E9todo get{1} devuelve una instancia de clases derivadas de ''{''@link {0}''}''. Igualmente, si define una instancia de clases derivadas, obtendr\u00E1 la instancia con xsi:type cuando realice la canalizaci\u00F3n a XML.
-
-
-SimpleTypeBuilder.UnnestedJavaTypeCustomization = La personalizaci\u00F3n de <javaType> en este contexto se debe anidar (especificaci\u00F3n JAXB secci\u00F3n 6.8.1): \n\t<property>\n\t <baseType>\n\t <javaType ...>\n\t </baseType>\n\t</property>
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization = el compilador no ha podido mantener esta personalizaci\u00F3n de {0}. Est\u00E1 asociada a un lugar incorrecto o es inconsistente con otros enlaces.
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization.Relevant = (la personalizaci\u00F3n anterior est\u00E1 asociada a la siguiente ubicaci\u00F3n del esquema)
-
-ERR_ENUM_MEMBER_NAME_COLLISION = Dos miembros de la enumeraci\u00F3n producen el mismo nombre de constante {0}
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_ENUM_MEMBER_NAME_COLLISION, followed by a line with the position of the problem in a particular file
-ERR_ENUM_MEMBER_NAME_COLLISION_RELATED = (Relacionado con lo anterior) La otra enumeraci\u00F3n se define en esta ubicaci\u00F3n.
-
-WARN_ENUM_MEMBER_SIZE_CAP = El tipo simple "{0}" no se ha asignado a Enum debido al l\u00EDmite de EnumMemberSizeCap. Recuento de facetas: {1}, l\u00EDmite actual: {2}. Puede utilizar el atributo de personalizaci\u00F3n "typesafeEnumMaxMembers" para ampliar el l\u00EDmite.
-
-ERR_CANNOT_GENERATE_ENUM_NAME = No se puede generar un nombre de constante a partir del valor de enumeraci\u00F3n "{0}". Utilice <jaxb:typesafeEnumMember name="..."/> para especificarlo.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-ERR_MULTIPLE_GLOBAL_BINDINGS = S\u00F3lo se permite una personalizaci\u00F3n globalBindings en una compilaci\u00F3n completa.
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_MULTIPLE_GLOBAL_BINDINGS, followed by a line with the position of the problem in a particular file, e.g. parsing a schema... \n [ERROR] only one globalBindings customization is allowed in a whole compilation \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/base.xjb \n [ERROR] (related to above) but one is already given at this location \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/sub1.xjb
-ERR_MULTIPLE_GLOBAL_BINDINGS_OTHER = (Relacionado con lo anterior), pero ya se ha especificado una en esta ubicaci\u00F3n.
-
-ERR_REFERENCE_TO_NONEXPORTED_CLASS = {0} se encuentra en un esquema al que se ha hecho referencia y no tiene la clase Java correspondiente que ha especificado la personalizaci\u00F3n de <jaxb:class ref="..."/>. Por lo tanto, no se puede hacer referencia a \u00E9l desde el exterior.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE = (Relacionado con lo anterior) Esta personalizaci\u00F3n ha designado el esquema del espacio de nombres "{0}" (que incluye el componente anterior) \u00FAnicamente para referencia.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS and ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER = (Relacionado con lo anterior) Se hace referencia al componente de esquema problem\u00E1tico desde este componente: {0}.
-
-WARN_DEFAULT_VALUE_PRIMITIVE_TYPE = No se puede generar el valor por defecto para el tipo primitivo "{0}".
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_fr.properties
deleted file mode 100644
index c1919edc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_fr.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-BGMBuilder.NoGlobalElement = Le sch\u00E9ma contient une d\u00E9claration d'\u00E9l\u00E9ment global.
-
-UnusedCustomizationChecker.WarnUnusedExpectedContentTypes = Un attribut xmime:expectedContentTypes figure sur un \u00E9l\u00E9ment incorrect
-
-BGMBuilder.MultipleSchemaBindings = Plusieurs \u00E9l\u00E9ments <schemaBindings> sont d\u00E9finis pour l''espace de noms cible "{0}"
-
-BGMBuilder.MultipleSchemaBindings.Location = Un autre \u00E9l\u00E9ment <schemaBindings> est d\u00E9fini ici
-
-
-
-ClassSelector.ClassNameIsRequired = Impossible de d\u00E9river un nom du sch\u00E9ma. Attribut de nom indiqu\u00E9 pour la personnalisation <class>.
-
-ClassSelector.IncorrectClassName = Le nom ''{0}'' indiqu\u00E9 n''est pas un identificateur Java valide.
-
-ClassSelector.IncorrectPackageName = Le nom de package ''{1}'' utilis\u00E9 pour ce sch\u00E9ma n''est pas un nom de package valide.
-
-# {0} - name-identifier-format-enum
-ClassSelector.JavadocHeading = <p>Classe Java pour {0}.\n\n<p>Le fragment de sch\u00E9ma suivant indique le contenu attendu figurant dans cette classe.
-
-ClassSelector.JavadocLineUnknown = inconnu
-
-ClassSelector.ReservedClassName = Tentative de cr\u00E9ation d''une classe portant le m\u00EAme nom que le mot r\u00E9serv\u00E9 \"{0}\".
-
-
-CollisionInfo.CollisionInfo = Le nom de champ "{0}" est utilis\u00E9 par deux parties diff\u00E9rentes d''un sch\u00E9ma. Reportez-vous \u00E0 : \n{1}\n{2}
-
-CollisionInfo.UnknownFile = fichier inconnu
-
-# Concatenated with CollisionInfo.CollisionInfo (CollisionInfo.CollisionInfo + CollisionInfo.LineXOfY + CollisionInfo.LineXOfY) e.g.: The field name "FieldName" is used by two different parts of a schema. See: line X of file:Schema.xsd line Y of file:Schema2.xsd
-CollisionInfo.LineXOfY = ligne {0} sur {1}
-
-
-ConversionFinder.CannotBeTypeSafeEnum = Une personnalisation d'\u00E9num\u00E9ration Typesafe est indiqu\u00E9e dans un type simple qui ne peut pas \u00EAtre mapp\u00E9 avec une \u00E9num\u00E9ration Typesafe.
-ConversionFinder.CannotBeTypeSafeEnum.Location = La d\u00E9claration de type simple pertinente est indiqu\u00E9e \u00E0 cet emplacement
-ConversionFinder.NoEnumNameAvailable = Un attribut de nom est obligatoire pour personnaliser un type simple anonyme en \u00E9num\u00E9ration Typesafe.
-ConversionFinder.NoEnumFacet= la personnalisation de classe d'\u00E9num\u00E9ration est indiqu\u00E9e sur un type qui ne comporte aucun facet d'\u00E9num\u00E9ration.
-ERR_ILLEGAL_EXPECTED_MIME_TYPE = Impossible d''analyser le type MIME attendu "{0}". {1}.
-
-
-DatatypeBuilder.DatatypeError = Erreur de type simple : {0}
-
-
-
-
-
-
-DefaultParticleBinder.UnableToGenerateNameFromModelGroup = Impossible de g\u00E9n\u00E9rer un nom de propri\u00E9t\u00E9 \u00E0 partir d'un groupe de mod\u00E8les. Une personnalisation est obligatoire.
-
-# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = Obtient le reste du mod\u00E8le de contenu. \n\n<p>\nVous obtenez la propri\u00E9t\u00E9 "catch-all" pour la raison suivante : \n{0}\n<p>\nPour vous d\u00E9barrasser de cette propri\u00E9t\u00E9, appliquez une personnalisation de propri\u00E9t\u00E9 \u00E0 l''une \ndes deux d\u00E9clarations suivantes afin de modifier leurs noms : \n
-
-
-
-
-
-
-
-FieldBuilder.IncorrectFixedValue = La valeur indiqu\u00E9e dans l''attribut fixe "{0}" n''est pas une valeur valide pour le type de donn\u00E9es
-
-FieldBuilder.IncorrectDefaultValue = La valeur indiqu\u00E9e dans l''attribut par d\u00E9faut "{0}" n''est pas une valeur valide pour le type de donn\u00E9es
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse = "{0}" est indiqu\u00E9 par une personnalisation mais cet attribut est d''un type incompatible ("{1}")
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse.Source = La personnalisation pertinente est indiqu\u00E9e\t\u00E0 cet emplacement
-
-FieldBuilder.Javadoc.NilProperty = Cette propri\u00E9t\u00E9 est utilis\u00E9e pour contr\u00F4ler <a href="http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#Nils">la fonctionnalit\u00E9 xsi:nil</a> de W3C XML Schema. \nLa d\u00E9finition de cette propri\u00E9t\u00E9 sur True entra\u00EEnera le r\u00E9sultat &lt;{0} xsi:nil="true" />, ind\u00E9pendamment des valeurs des autres propri\u00E9t\u00E9s.
-
-FieldBuilder.Javadoc.ValueObject = obtenez/d\u00E9finissez la valeur de type complexe associ\u00E9e \u00E0 cet \u00E9l\u00E9ment.\n Lorsque vous d\u00E9s\u00E9rialisez un document qui contient xsi:type, la m\u00E9thode get{1} renvoie une instance des classes d\u00E9riv\u00E9es de ''{''@link {0}''}''. De la m\u00EAme mani\u00E8re, si vous d\u00E9finissez une instance des classes d\u00E9riv\u00E9es, vous obtenez l''instance avec xsl.type lorsque vous effectuez la s\u00E9rialisation en XML.
-
-
-SimpleTypeBuilder.UnnestedJavaTypeCustomization = La personnalisation <javaType> dans ce contexte doit \u00EAtre imbriqu\u00E9e (sp\u00E9cification JAXB sec 6.8.1) : \n\t<property>\n\t <baseType>\n\t <javaType ...>\n\t </baseType>\n\t</property>
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization = le compilateur n''a pas pu honorer cette personnalisation {0}. Il est joint \u00E0 un emplacement incorrect ou incoh\u00E9rent par rapport aux autres bindings.
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization.Relevant = (la personnalisation ci-dessus est jointe \u00E0 l'emplacement suivant dans le sch\u00E9ma)
-
-ERR_ENUM_MEMBER_NAME_COLLISION = Deux membres d''\u00E9num\u00E9ration renvoient le m\u00EAme nom constant {0}
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_ENUM_MEMBER_NAME_COLLISION, followed by a line with the position of the problem in a particular file
-ERR_ENUM_MEMBER_NAME_COLLISION_RELATED = (voir ci-dessus) l'autre \u00E9num\u00E9ration est d\u00E9finie \u00E0 cet emplacement
-
-WARN_ENUM_MEMBER_SIZE_CAP = Le type simple "{0}" n''a pas \u00E9t\u00E9 mapp\u00E9 avec l''\u00E9num\u00E9ration en raison de la limite EnumMemberSizeCap. Nombre de facets : {1}, limite en cours : {2}. Vous pouvez utiliser l''attribut de personnalisation "typesafeEnumMaxMembers" pour \u00E9tendre la limite.
-
-ERR_CANNOT_GENERATE_ENUM_NAME = Impossible de g\u00E9n\u00E9rer un nom constant \u00E0 partir de la valeur d''\u00E9num\u00E9ration "{0}". Utilisez <jaxb:typesafeEnumMember name="..."/> pour en indiquer un.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-ERR_MULTIPLE_GLOBAL_BINDINGS = une seule personnalisation globalBindings est autoris\u00E9e dans toute la compilation
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_MULTIPLE_GLOBAL_BINDINGS, followed by a line with the position of the problem in a particular file, e.g. parsing a schema... \n [ERROR] only one globalBindings customization is allowed in a whole compilation \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/base.xjb \n [ERROR] (related to above) but one is already given at this location \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/sub1.xjb
-ERR_MULTIPLE_GLOBAL_BINDINGS_OTHER = (voir ci-dessus) mais l'un est d\u00E9j\u00E0 donn\u00E9 \u00E0 cet emplacement
-
-ERR_REFERENCE_TO_NONEXPORTED_CLASS = {0} figure dans un sch\u00E9ma r\u00E9f\u00E9renc\u00E9 et la classe Java correspondante n''est pas indiqu\u00E9e par la personnalisation <jaxb:class ref="..."/>. Par cons\u00E9quent, il ne peut pas \u00EAtre r\u00E9f\u00E9renc\u00E9 de l''ext\u00E9rieur.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE = (voir ci-dessus) Le sch\u00E9ma de l''espace de noms "{0}" (qui inclut le composant ci-dessus) est indiqu\u00E9 par cette personnalisation pour r\u00E9f\u00E9rence uniquement.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS and ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER = (voir ci-dessus) Le composant de sch\u00E9ma probl\u00E9matique est r\u00E9f\u00E9renc\u00E9 \u00E0 partir de ce composant : {0}
-
-WARN_DEFAULT_VALUE_PRIMITIVE_TYPE = Impossible de g\u00E9n\u00E9rer une valeur par d\u00E9faut pour le type primitif "{0}".
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_it.properties
deleted file mode 100644
index dd6de657..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_it.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-BGMBuilder.NoGlobalElement = Lo schema non contiene alcuna dichiarazione di elementi globali.
-
-UnusedCustomizationChecker.WarnUnusedExpectedContentTypes = Un attributo xmime:expectedContentTypes \u00E8 presente su un elemento errato
-
-BGMBuilder.MultipleSchemaBindings = Sono definite pi\u00F9 <schemaBindings> per lo spazio di nomi di destinazione "{0}"
-
-BGMBuilder.MultipleSchemaBindings.Location = Qui \u00E8 definito un'altra <schemaBindings>
-
-
-
-ClassSelector.ClassNameIsRequired = Impossibile derivare un nome dallo schema. Un attributo name specificato per la personalizzazione <class>.
-
-ClassSelector.IncorrectClassName = Il nome specificato "{0}" non \u00E8 un identificativo Java valido.
-
-ClassSelector.IncorrectPackageName = Il nome del package ''{1}'' usato per questo schema non \u00E8 un nome di package valido.
-
-# {0} - name-identifier-format-enum
-ClassSelector.JavadocHeading = <p>Classe Java per {0}.\n\n<p>Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe.
-
-ClassSelector.JavadocLineUnknown = sconosciuto
-
-ClassSelector.ReservedClassName = Tentativo di creare una classe con il nome corrispondente alla parola riservata "{0}".
-
-
-CollisionInfo.CollisionInfo = Il nome di campo "{0}" \u00E8 usato da due diverse parti di uno schema. Vedere: \n{1}\n{2}
-
-CollisionInfo.UnknownFile = file sconosciuto
-
-# Concatenated with CollisionInfo.CollisionInfo (CollisionInfo.CollisionInfo + CollisionInfo.LineXOfY + CollisionInfo.LineXOfY) e.g.: The field name "FieldName" is used by two different parts of a schema. See: line X of file:Schema.xsd line Y of file:Schema2.xsd
-CollisionInfo.LineXOfY = riga {0} di {1}
-
-
-ConversionFinder.CannotBeTypeSafeEnum = Una personalizzazione dell'enumerazione Typesafe \u00E8 specificata per un tipo semplice che non pu\u00F2 essere mappato a un'enumerazione Typesafe.
-ConversionFinder.CannotBeTypeSafeEnum.Location = La relativa dichiarazione di tipo semplice \u00E8 specificata in questa posizione
-ConversionFinder.NoEnumNameAvailable = \u00C8 richiesto un attributo name per personalizzare un tipo semplice anonimo nell'enumerazione Typesafe.
-ConversionFinder.NoEnumFacet= la personalizzazione della classe di enumerazione \u00E8 specificata su un tipo che non ha alcun facet di enumerazione.
-ERR_ILLEGAL_EXPECTED_MIME_TYPE = Impossibile analizzare il tipo MIME previsto "{0}". {1}.
-
-
-DatatypeBuilder.DatatypeError = Errore di tipo semplice: {0}
-
-
-
-
-
-
-DefaultParticleBinder.UnableToGenerateNameFromModelGroup = Impossibile generare un nome di propriet\u00E0 da un gruppo di modelli. \u00C8 richiesta una personalizzazione.
-
-# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = Recupera il resto del modello di contenuto. \n\n<p>\nQuesta propriet\u00E0 "catch-all" viene recuperata per il seguente motivo: \n{0}\n<p>\nPer eliminare questa propriet\u00E0, applicare una personalizzazione della propriet\u00E0 a una \ndelle seguenti due dichiarazioni per modificarne il nome: \n
-
-
-
-
-
-
-
-FieldBuilder.IncorrectFixedValue = Il valore specificato nell''attributo fisso "{0}" non \u00E8 un valore valido per il tipo di dati
-
-FieldBuilder.IncorrectDefaultValue = Il valore specificato nell''attributo predefinito "{0}" non \u00E8 un valore valido per il tipo di dati
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse = "{0}" \u00E8 specificato da una personalizzazione ma questo attributo ha un tipo incompatibile "{1}"
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse.Source = La relativa personalizzazione \u00E8 specificata\tin questa posizione
-
-FieldBuilder.Javadoc.NilProperty = Questa propriet\u00E0 viene usata per controllare <a href="http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#Nils">la funzione xsi:nil</a> dello schema XML W3C. \nL''impostazione di questa propriet\u00E0 su true produrr\u00E0 un output corrispondente a &lt;{0} xsi:nil="true" /> indipendentemente dai valori delle altre propriet\u00E0.
-
-FieldBuilder.Javadoc.ValueObject = ottenere/impostare il valore del tipo complesso associato a questo elemento.\n Quando viene eseguito l''unmarshalling di un documento contenente xsi:type, il metodo get{1} restituisce un''istanza delle classi derivate di ''{''@link {0}''}''. Analogamente, se viene impostata un''istanza delle classi derivate, si ottiene l''istanza con xsi:type quando viene eseguito il marshalling in XML.
-
-
-SimpleTypeBuilder.UnnestedJavaTypeCustomization = la personalizzazione <javaType> in questo contesto deve essere nidificata (JAXB spec sec 6.8.1): \n\t<property>\n\t <baseType>\n\t <javaType ...>\n\t </baseType>\n\t</property>
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization = il compilatore non \u00E8 stato in grado di rispettare questa personalizzazione {0}. \u00C8 allegata alla posizione errata o non \u00E8 coerente con altre associazioni.
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization.Relevant = (la personalizzazione riportata sopra \u00E8 allegata alla seguente posizione nello schema)
-
-ERR_ENUM_MEMBER_NAME_COLLISION = Due membri dell''enumerazione producono lo stesso nome di costante {0}
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_ENUM_MEMBER_NAME_COLLISION, followed by a line with the position of the problem in a particular file
-ERR_ENUM_MEMBER_NAME_COLLISION_RELATED = (relativo a quanto riportato sopra) l'altra enumerazione \u00E8 definita in questa posizione
-
-WARN_ENUM_MEMBER_SIZE_CAP = Il tipo semplice "{0}" non \u00E8 stato mappato all''enumerazione a causa del limite EnumMemberSizeCap. Conteggio facet: {1}, limite corrente: {2}. \u00C8 possibile usare l''attributo di personalizzazione "typesafeEnumMaxMembers" per estendere il limite.
-
-ERR_CANNOT_GENERATE_ENUM_NAME = Impossibile generare un nome di costante dal valore di enumerazione "{0}". Usare <jaxb:typesafeEnumMember name="..."/> per specificarne uno.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-ERR_MULTIPLE_GLOBAL_BINDINGS = in un'intera compilazione \u00E8 consentita solo una personalizzazione globalBindings
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_MULTIPLE_GLOBAL_BINDINGS, followed by a line with the position of the problem in a particular file, e.g. parsing a schema... \n [ERROR] only one globalBindings customization is allowed in a whole compilation \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/base.xjb \n [ERROR] (related to above) but one is already given at this location \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/sub1.xjb
-ERR_MULTIPLE_GLOBAL_BINDINGS_OTHER = (relativo a quanto riportato sopra) ma solo una \u00E8 gi\u00E0 stata fornita in questa posizione
-
-ERR_REFERENCE_TO_NONEXPORTED_CLASS = {0} si trova in uno schema di riferimento e non dispone della classe Java corrispondente specificata dalla personalizzazione <jaxb:class ref="..."/>, pertanto non \u00E8 possibile farvi riferimento dall''esterno.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE = (relativo a quanto riportato sopra) Lo schema per lo spazio di nomi "{0}" (che include il componente riportato sopra) \u00E8 designato per riferimento solo da questa personalizzazione.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS and ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER = (relativo a quanto riportato sopra) Al componente dello schema che presenta problemi viene fatto riferimento da questo componente: {0}
-
-WARN_DEFAULT_VALUE_PRIMITIVE_TYPE = Impossibile generare il valore predefinito per il tipo predefinito "{0}".
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_ja.properties
deleted file mode 100644
index 3326f9e8..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_ja.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-BGMBuilder.NoGlobalElement = \u30B9\u30AD\u30FC\u30DE\u306B\u30B0\u30ED\u30FC\u30D0\u30EB\u8981\u7D20\u5BA3\u8A00\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-
-UnusedCustomizationChecker.WarnUnusedExpectedContentTypes = xmime:expectedContentTypes\u5C5E\u6027\u304C\u6B63\u3057\u304F\u306A\u3044\u8981\u7D20\u306B\u5B58\u5728\u3057\u307E\u3059
-
-BGMBuilder.MultipleSchemaBindings = \u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9"{0}"\u306B\u5BFE\u3057\u3066\u8907\u6570\u306E<schemaBindings>\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
-
-BGMBuilder.MultipleSchemaBindings.Location = \u5225\u306E<schemaBindings>\u304C\u3053\u3053\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
-
-
-
-ClassSelector.ClassNameIsRequired = \u30B9\u30AD\u30FC\u30DE\u304B\u3089\u540D\u524D\u3092\u5C0E\u51FA\u3067\u304D\u307E\u305B\u3093\u3002<class>\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u306B\u5BFE\u3057\u3066name\u5C5E\u6027\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\u3002
-
-ClassSelector.IncorrectClassName = \u6307\u5B9A\u3057\u305F\u540D\u524D''{0}''\u306F\u6709\u52B9\u306AJava\u8B58\u5225\u5B50\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-
-ClassSelector.IncorrectPackageName = \u3053\u306E\u30B9\u30AD\u30FC\u30DE\u306B\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u540D''{1}''\u306F\u3001\u6709\u52B9\u306A\u30D1\u30C3\u30B1\u30FC\u30B8\u540D\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-
-# {0} - name-identifier-format-enum
-ClassSelector.JavadocHeading = <p>{0}\u306EJava\u30AF\u30E9\u30B9\u3002\n\n<p>\u6B21\u306E\u30B9\u30AD\u30FC\u30DE\u30FB\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u306F\u3001\u3053\u306E\u30AF\u30E9\u30B9\u5185\u306B\u542B\u307E\u308C\u308B\u4E88\u671F\u3055\u308C\u308B\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002
-
-ClassSelector.JavadocLineUnknown = \u4E0D\u660E
-
-ClassSelector.ReservedClassName = \u4E88\u7D04\u8A9E\"{0}\"\u3068\u540C\u3058\u540D\u524D\u306E\u30AF\u30E9\u30B9\u3092\u4F5C\u6210\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307E\u3059\u3002
-
-
-CollisionInfo.CollisionInfo = \u3053\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u540D"{0}"\u306F\u3001\u30B9\u30AD\u30FC\u30DE\u306E2\u3064\u306E\u7570\u306A\u308B\u90E8\u5206\u3067\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u95A2\u9023\u9805\u76EE: \n{1}\n{2}
-
-CollisionInfo.UnknownFile = \u4E0D\u660E\u306A\u30D5\u30A1\u30A4\u30EB
-
-# Concatenated with CollisionInfo.CollisionInfo (CollisionInfo.CollisionInfo + CollisionInfo.LineXOfY + CollisionInfo.LineXOfY) e.g.: The field name "FieldName" is used by two different parts of a schema. See: line X of file:Schema.xsd line Y of file:Schema2.xsd
-CollisionInfo.LineXOfY = \u884C{0}/{1}
-
-
-ConversionFinder.CannotBeTypeSafeEnum = \u30BF\u30A4\u30D7\u30BB\u30FC\u30D5\u306E\u5217\u6319\u578B\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u304C\u3001\u30BF\u30A4\u30D7\u30BB\u30FC\u30D5\u306E\u5217\u6319\u578B\u306B\u30DE\u30C3\u30D7\u3067\u304D\u306A\u3044\u5358\u7D14\u578B\u306B\u5BFE\u3057\u3066\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
-ConversionFinder.CannotBeTypeSafeEnum.Location = \u95A2\u9023\u3059\u308B\u5358\u7D14\u578B\u5BA3\u8A00\u304C\u3053\u306E\u5834\u6240\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
-ConversionFinder.NoEnumNameAvailable = \u533F\u540D\u306E\u5358\u7D14\u578B\u3092\u30BF\u30A4\u30D7\u30BB\u30FC\u30D5\u306E\u5217\u6319\u578B\u306B\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3059\u308B\u306B\u306F\u3001name\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002
-ConversionFinder.NoEnumFacet= \u5217\u6319\u5024\u30D5\u30A1\u30BB\u30C3\u30C8\u304C\u306A\u3044\u578B\u306B\u5217\u6319\u578B\u30AF\u30E9\u30B9\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
-ERR_ILLEGAL_EXPECTED_MIME_TYPE = \u4E88\u671F\u3055\u308C\u308BMIME\u30BF\u30A4\u30D7"{0}"\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093\u3002{1}\u3002
-
-
-DatatypeBuilder.DatatypeError = \u5358\u7D14\u578B\u30A8\u30E9\u30FC: {0}
-
-
-
-
-
-
-DefaultParticleBinder.UnableToGenerateNameFromModelGroup = \u30E2\u30C7\u30EB\u30FB\u30B0\u30EB\u30FC\u30D7\u304B\u3089\u30D7\u30ED\u30D1\u30C6\u30A3\u540D\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u304C\u5FC5\u8981\u3067\u3059\u3002
-
-# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = \u6B8B\u308A\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002\n\n<p>\n\u6B21\u306E\u7406\u7531\u3067\u3053\u306E"catch-all"\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u53D6\u5F97\u3057\u3066\u3044\u307E\u3059\u3002\n{0}\n<p>\n\u3053\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u524A\u9664\u3059\u308B\u306B\u306F\u3001\u6B21\u306E\u4E21\u65B9\u306E\u5BA3\u8A00\u306E1\u3064\u306B\u30D7\u30ED\u30D1\u30C6\u30A3\u30FB\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u9069\u7528\u3057\u3066\u3001\n\u540D\u524D\u3092\u5909\u66F4\u3057\u307E\u3059\u3002\n
-
-
-
-
-
-
-
-FieldBuilder.IncorrectFixedValue = \u56FA\u5B9A\u5C5E\u6027"{0}"\u306B\u6307\u5B9A\u3055\u308C\u305F\u5024\u306F\u3001\u30C7\u30FC\u30BF\u578B\u306B\u6709\u52B9\u306A\u5024\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-
-FieldBuilder.IncorrectDefaultValue = \u30C7\u30D5\u30A9\u30EB\u30C8\u5C5E\u6027"{0}"\u306B\u6307\u5B9A\u3055\u308C\u305F\u5024\u306F\u3001\u30C7\u30FC\u30BF\u578B\u306B\u6709\u52B9\u306A\u5024\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse = "{0}"\u304C\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3067\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u3053\u306E\u5C5E\u6027\u306B\u306F\u4E92\u63DB\u6027\u306E\u306A\u3044\u578B"{1}"\u304C\u3042\u308A\u307E\u3059
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse.Source = \u3053\u306E\u5834\u6240\u306B\u95A2\u9023\u3059\u308B\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u304C\t\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
-
-FieldBuilder.Javadoc.NilProperty = \u3053\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u306F\u3001W3C XML\u30B9\u30AD\u30FC\u30DE\u306E<a href="http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#Nils">xsi:nil\u6A5F\u80FD</a>\u306E\u5236\u5FA1\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\n\u3053\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u3092true\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u4ED6\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u5024\u306B\u95A2\u4FC2\u306A\u304F\u3001\u51FA\u529B\u304C&lt;{0} xsi:nil="true" />\u306B\u306A\u308A\u307E\u3059\u3002
-
-FieldBuilder.Javadoc.ValueObject = \u3053\u306E\u8981\u7D20\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u305F\u8907\u5408\u578B\u306E\u5024\u3092\u53D6\u5F97/\u8A2D\u5B9A\u3057\u307E\u3059\u3002\n xsi:type\u3092\u542B\u3080\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u30A2\u30F3\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u3059\u308B\u3068\u304D\u306B\u3001get{1}\u30E1\u30BD\u30C3\u30C9\u306F''{''@link {0}''}''\u306E\u5C0E\u51FA\u30AF\u30E9\u30B9\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u8FD4\u3057\u307E\u3059\u3002\u540C\u69D8\u306B\u3001\u5C0E\u51FA\u30AF\u30E9\u30B9\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u8A2D\u5B9A\u3059\u308B\u3068\u3001XML\u306B\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u3059\u308B\u3068\u304D\u306Bxsi:type\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002
-
-
-SimpleTypeBuilder.UnnestedJavaTypeCustomization = <javaType> \u3053\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u306F\u30CD\u30B9\u30C8\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059(JAXB\u4ED5\u69D8\u30BB\u30AF\u30B7\u30E7\u30F36.8.1): \n\t<property>\n\t <baseType>\n\t <javaType ...>\n\t </baseType>\n\t</property>
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization = \u30B3\u30F3\u30D1\u30A4\u30E9\u306F\u3053\u306E{0}\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u9593\u9055\u3063\u305F\u5834\u6240\u306B\u30A2\u30BF\u30C3\u30C1\u3055\u308C\u3066\u3044\u308B\u304B\u3001\u4ED6\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3068\u77DB\u76FE\u3057\u3066\u3044\u307E\u3059\u3002
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization.Relevant = (\u524D\u8FF0\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u306F\u3001\u30B9\u30AD\u30FC\u30DE\u5185\u306E\u6B21\u306E\u5834\u6240\u306B\u30A2\u30BF\u30C3\u30C1\u3055\u308C\u3066\u3044\u307E\u3059)
-
-ERR_ENUM_MEMBER_NAME_COLLISION = 2\u3064\u306E\u5217\u6319\u578B\u30E1\u30F3\u30D0\u30FC\u3067\u540C\u3058\u5B9A\u6570\u540D{0}\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_ENUM_MEMBER_NAME_COLLISION, followed by a line with the position of the problem in a particular file
-ERR_ENUM_MEMBER_NAME_COLLISION_RELATED = (\u524D\u8FF0\u306E\u5185\u5BB9\u306B\u95A2\u9023\u3057\u3066)\u4ED6\u65B9\u306E\u5217\u6319\u578B\u304C\u3053\u306E\u5834\u6240\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
-
-WARN_ENUM_MEMBER_SIZE_CAP = EnumMemberSizeCap\u5236\u9650\u306B\u3088\u308A\u3001\u5358\u7D14\u578B"{0}"\u306F\u5217\u6319\u578B\u306B\u30DE\u30C3\u30D7\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30D5\u30A1\u30BB\u30C3\u30C8\u6570: {1}\u3001\u73FE\u5728\u306E\u5236\u9650: {2}\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u5C5E\u6027"typesafeEnumMaxMembers"\u3092\u4F7F\u7528\u3057\u3066\u3001\u3053\u306E\u5236\u9650\u3092\u62E1\u5F35\u3067\u304D\u307E\u3059\u3002
-
-ERR_CANNOT_GENERATE_ENUM_NAME = \u5217\u6319\u5024"{0}"\u304B\u3089\u5B9A\u6570\u540D\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002<jaxb:typesafeEnumMember name="..."/>\u3092\u4F7F\u7528\u3057\u3066\u6307\u5B9A\u3057\u307E\u3059\u3002
-
-# Wrapped into an Exception. Not concatenated with any other string.
-ERR_MULTIPLE_GLOBAL_BINDINGS = \u30B3\u30F3\u30D1\u30A4\u30EB\u5168\u4F53\u30671\u3064\u306EglobalBindings\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_MULTIPLE_GLOBAL_BINDINGS, followed by a line with the position of the problem in a particular file, e.g. parsing a schema... \n [ERROR] only one globalBindings customization is allowed in a whole compilation \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/base.xjb \n [ERROR] (related to above) but one is already given at this location \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/sub1.xjb
-ERR_MULTIPLE_GLOBAL_BINDINGS_OTHER = (\u524D\u8FF0\u306E\u5185\u5BB9\u306B\u95A2\u9023\u3057\u3066)\u305F\u3060\u3057\u30011\u3064\u306F\u3053\u306E\u5834\u6240\u3067\u3059\u3067\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
-
-ERR_REFERENCE_TO_NONEXPORTED_CLASS = {0}\u306F\u53C2\u7167\u3055\u308C\u308B\u30B9\u30AD\u30FC\u30DE\u3067\u3042\u308A\u3001<jaxb:class ref="..."/>\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u306B\u3088\u3063\u3066\u6307\u5B9A\u3055\u308C\u305F\u5BFE\u5FDC\u3059\u308BJava\u30AF\u30E9\u30B9\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u3057\u305F\u304C\u3063\u3066\u5916\u90E8\u304B\u3089\u53C2\u7167\u3067\u304D\u307E\u305B\u3093\u3002
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE = (\u524D\u8FF0\u306E\u5185\u5BB9\u306B\u95A2\u9023\u3057\u3066)\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9"{0}"\u306E\u30B9\u30AD\u30FC\u30DE(\u524D\u8FF0\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u542B\u3080)\u306F\u3001\u3053\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3067\u53C2\u7167\u5C02\u7528\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS and ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER = (\u524D\u8FF0\u306E\u5185\u5BB9\u306B\u95A2\u9023\u3057\u3066)\u554F\u984C\u306E\u30B9\u30AD\u30FC\u30DE\u30FB\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306F\u3053\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304B\u3089\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059: {0}
-
-WARN_DEFAULT_VALUE_PRIMITIVE_TYPE = \u30D7\u30EA\u30DF\u30C6\u30A3\u30D6\u578B"{0}"\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_ko.properties
deleted file mode 100644
index a04505d3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_ko.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-BGMBuilder.NoGlobalElement = \uC2A4\uD0A4\uB9C8\uC5D0 \uD3EC\uD568\uB41C \uC804\uC5ED \uC694\uC18C \uC120\uC5B8\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-UnusedCustomizationChecker.WarnUnusedExpectedContentTypes = xmime:expectedContentTypes \uC18D\uC131\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 \uC694\uC18C\uC5D0 \uC788\uC2B5\uB2C8\uB2E4.
-
-BGMBuilder.MultipleSchemaBindings = \uB300\uC0C1 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 "{0}"\uC5D0 \uB300\uD55C <schemaBindings>\uAC00 \uC5EC\uB7EC \uAC1C \uC815\uC758\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-BGMBuilder.MultipleSchemaBindings.Location = \uB2E4\uB978 <schemaBindings>\uAC00 \uC5EC\uAE30\uC5D0 \uC815\uC758\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-
-
-ClassSelector.ClassNameIsRequired = \uC2A4\uD0A4\uB9C8\uC5D0\uC11C \uC774\uB984\uC744 \uD30C\uC0DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. <class> \uC0AC\uC6A9\uC790 \uC815\uC758\uC5D0 \uB300\uD55C name \uC18D\uC131\uC774 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-ClassSelector.IncorrectClassName = \uC9C0\uC815\uB41C \uC774\uB984 ''{0}''\uC740(\uB294) \uC801\uD569\uD55C Java \uC2DD\uBCC4\uC790\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
-
-ClassSelector.IncorrectPackageName = \uC774 \uC2A4\uD0A4\uB9C8\uC5D0 \uC0AC\uC6A9\uB41C \uD328\uD0A4\uC9C0 \uC774\uB984 ''{1}''\uC740(\uB294) \uC801\uD569\uD55C \uD328\uD0A4\uC9C0 \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-
-# {0} - name-identifier-format-enum
-ClassSelector.JavadocHeading = <p>{0}\uC5D0 \uB300\uD55C Java \uD074\uB798\uC2A4\uC785\uB2C8\uB2E4.\n\n<p>\uB2E4\uC74C \uC2A4\uD0A4\uB9C8 \uB2E8\uD3B8\uC774 \uC774 \uD074\uB798\uC2A4\uC5D0 \uD3EC\uD568\uB418\uB294 \uD544\uC694\uD55C \uCF58\uD150\uCE20\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.
-
-ClassSelector.JavadocLineUnknown = \uC54C \uC218 \uC5C6\uC74C
-
-ClassSelector.ReservedClassName = \uC608\uC57D\uC5B4 "{0}"\uACFC(\uC640) \uB3D9\uC77C\uD55C \uC774\uB984\uC744 \uC0AC\uC6A9\uD558\uB294 \uD074\uB798\uC2A4\uB97C \uC0DD\uC131\uD558\uB824\uACE0 \uC2DC\uB3C4\uD588\uC2B5\uB2C8\uB2E4.
-
-
-CollisionInfo.CollisionInfo = \uD544\uB4DC \uC774\uB984 "{0}"\uC774(\uAC00) \uC2A4\uD0A4\uB9C8\uC758 \uB2E4\uB978 \uB450 \uBD80\uBD84\uC5D0 \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uCC38\uC870: \n{1}\n{2}
-
-CollisionInfo.UnknownFile = \uC54C \uC218 \uC5C6\uB294 \uD30C\uC77C
-
-# Concatenated with CollisionInfo.CollisionInfo (CollisionInfo.CollisionInfo + CollisionInfo.LineXOfY + CollisionInfo.LineXOfY) e.g.: The field name "FieldName" is used by two different parts of a schema. See: line X of file:Schema.xsd line Y of file:Schema2.xsd
-CollisionInfo.LineXOfY = {1}\uC758 {0}\uD589
-
-
-ConversionFinder.CannotBeTypeSafeEnum = type-safe enum \uC0AC\uC6A9\uC790 \uC815\uC758\uAC00 type-safe enum\uC5D0 \uB9E4\uD551\uD560 \uC218 \uC5C6\uB294 \uB2E8\uC21C \uC720\uD615\uC5D0 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-ConversionFinder.CannotBeTypeSafeEnum.Location = \uAD00\uB828\uB41C \uB2E8\uC21C \uC720\uD615 \uC120\uC5B8\uC774 \uC774 \uC704\uCE58\uC5D0 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-ConversionFinder.NoEnumNameAvailable = type-safe enum\uC5D0 \uB300\uD55C \uC775\uBA85 \uB2E8\uC21C \uC720\uD615\uC744 \uC0AC\uC6A9\uC790 \uC815\uC758\uD558\uB824\uBA74 name \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-ConversionFinder.NoEnumFacet= \uBAA9\uB85D \uD328\uC2EF\uC774 \uC5C6\uB294 \uC720\uD615\uC5D0 \uB300\uD574 enum \uD074\uB798\uC2A4 \uC0AC\uC6A9\uC790 \uC815\uC758\uAC00 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-ERR_ILLEGAL_EXPECTED_MIME_TYPE = MIME \uC720\uD615 "{0}"\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. {1}.
-
-
-DatatypeBuilder.DatatypeError = \uB2E8\uC21C \uC720\uD615 \uC624\uB958: {0}
-
-
-
-
-
-
-DefaultParticleBinder.UnableToGenerateNameFromModelGroup = \uBAA8\uB378 \uADF8\uB8F9\uC5D0\uC11C \uC18D\uC131 \uC774\uB984\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
-
-# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = \uB098\uBA38\uC9C0 \uCF58\uD150\uCE20 \uBAA8\uB378\uC744 \uAC00\uC838\uC635\uB2C8\uB2E4. \n\n<p>\n\uB2E4\uC74C \uC6D0\uC778\uC73C\uB85C \uC778\uD574 \uC774 "catch-all" \uC18D\uC131\uC744 \uAC00\uC838\uC624\uACE0 \uC788\uC2B5\uB2C8\uB2E4.\n{0}\n<p>\n\uC774 \uC18D\uC131\uC744 \uC81C\uAC70\uD558\uB824\uBA74 \uB2E4\uC74C \uC120\uC5B8 \uC911 \uD558\uB098\uC5D0 \n\uC18D\uC131 \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uC801\uC6A9\uD558\uC5EC \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uC2ED\uC2DC\uC624. \n
-
-
-
-
-
-
-
-FieldBuilder.IncorrectFixedValue = \uACE0\uC815 \uC18D\uC131 "{0}"\uC5D0 \uC9C0\uC815\uB41C \uAC12\uC740 \uB370\uC774\uD130 \uC720\uD615\uC5D0 \uB300\uD574 \uC801\uD569\uD55C \uAC12\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-
-FieldBuilder.IncorrectDefaultValue = \uAE30\uBCF8 \uC18D\uC131 "{0}"\uC5D0 \uC9C0\uC815\uB41C \uAC12\uC740 \uB370\uC774\uD130 \uC720\uD615\uC5D0 \uB300\uD574 \uC801\uD569\uD55C \uAC12\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse = "{0}"\uC740(\uB294) \uC0AC\uC6A9\uC790 \uC815\uC758\uC5D0 \uC758\uD574 \uC9C0\uC815\uB418\uC5C8\uC9C0\uB9CC \uC774 \uC18D\uC131\uC5D0 \uD638\uD658\uB418\uC9C0 \uC54A\uB294 \uC720\uD615 "{1}"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse.Source = \uAD00\uB828\uB41C \uC0AC\uC6A9\uC790 \uC815\uC758\uAC00\t\uC774 \uC704\uCE58\uC5D0 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-FieldBuilder.Javadoc.NilProperty = \uC774 \uC18D\uC131\uC740 W3C XML \uC2A4\uD0A4\uB9C8\uC758 <a href="http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#Nils">xsi:nil \uAE30\uB2A5</a>\uC744 \uC81C\uC5B4\uD558\uB294 \uB370 \uC0AC\uC6A9\uB429\uB2C8\uB2E4. \n\uC774 \uC18D\uC131\uC744 true\uB85C \uC124\uC815\uD558\uBA74 \uB2E4\uB978 \uC18D\uC131\uC758 \uAC12\uC5D0 \uAD00\uACC4\uC5C6\uC774 \uCD9C\uB825\uC774 &lt;{0} xsi:nil="true" />\uAC00 \uB429\uB2C8\uB2E4.
-
-FieldBuilder.Javadoc.ValueObject = \uC774 \uC694\uC18C\uC640 \uC5F0\uAD00\uB41C \uBCF5\uD569 \uC720\uD615 \uAC12\uC744 \uAC00\uC838\uC624\uAC70\uB098 \uC124\uC815\uD569\uB2C8\uB2E4.\n xsi:type\uC774 \uD3EC\uD568\uB41C \uBB38\uC11C\uC758 \uB9C8\uC15C\uB9C1\uC744 \uD574\uC81C\uD558\uBA74 get{1} \uBA54\uC18C\uB4DC\uAC00 ''{''@link {0}''}'' \uD30C\uC0DD \uD074\uB798\uC2A4\uC758 \uC778\uC2A4\uD134\uC2A4\uB97C \uBC18\uD658\uD569\uB2C8\uB2E4. \uB9C8\uCC2C\uAC00\uC9C0\uB85C \uD30C\uC0DD \uD074\uB798\uC2A4\uC758 \uC778\uC2A4\uD134\uC2A4\uB97C \uC124\uC815\uD560 \uACBD\uC6B0 XML\uB85C \uB9C8\uC15C\uB9C1\uD558\uBA74 xsi:type\uC774 \uD3EC\uD568\uB41C \uC778\uC2A4\uD134\uC2A4\uB97C \uAC00\uC838\uC635\uB2C8\uB2E4.
-
-
-SimpleTypeBuilder.UnnestedJavaTypeCustomization = \uC774 \uCEE8\uD14D\uC2A4\uD2B8\uC758 <javaType> \uC0AC\uC6A9\uC790 \uC815\uC758\uB294 \uC911\uCCA9\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4(JAXB \uC0AC\uC591 6.8.1\uC808). \n\t<property>\n\t <baseType>\n\t <javaType ...>\n\t </baseType>\n\t</property>
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization = \uCEF4\uD30C\uC77C\uB7EC\uAC00 \uC774 {0} \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uB530\uB97C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC798\uBABB\uB41C \uC704\uCE58\uC5D0 \uC5F0\uACB0\uB418\uC5B4 \uC788\uAC70\uB098 \uB2E4\uB978 \uBC14\uC778\uB529\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization.Relevant = (\uC704 \uC0AC\uC6A9\uC790 \uC815\uC758\uB294 \uC2A4\uD0A4\uB9C8\uC758 \uB2E4\uC74C \uC704\uCE58\uC5D0 \uC5F0\uACB0\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.)
-
-ERR_ENUM_MEMBER_NAME_COLLISION = \uB450 \uAC1C\uC758 enum \uBA64\uBC84\uAC00 \uB3D9\uC77C\uD55C \uC0C1\uC218 \uC774\uB984 {0}\uC744(\uB97C) \uC0DD\uC131\uD569\uB2C8\uB2E4.
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_ENUM_MEMBER_NAME_COLLISION, followed by a line with the position of the problem in a particular file
-ERR_ENUM_MEMBER_NAME_COLLISION_RELATED = (\uC704 \uC624\uB958\uC640 \uAD00\uB828\uB428) \uB2E4\uB978 enum\uC774 \uC774 \uC704\uCE58\uC5D0 \uC815\uC758\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-WARN_ENUM_MEMBER_SIZE_CAP = EnumMemberSizeCap \uC81C\uD55C\uC73C\uB85C \uC778\uD574 \uB2E8\uC21C \uC720\uD615 "{0}"\uC774(\uAC00) enum\uC5D0 \uB9E4\uD551\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uD328\uC2EF \uC218: {1}, \uD604\uC7AC \uC81C\uD55C: {2}. \uC0AC\uC6A9\uC790 \uC815\uC758 \uC18D\uC131 "typesafeEnumMaxMembers"\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC81C\uD55C\uC744 \uB298\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-
-ERR_CANNOT_GENERATE_ENUM_NAME = \uBAA9\uB85D \uAC12 "{0}"\uC5D0\uC11C \uC0C1\uC218 \uC774\uB984\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. <jaxb:typesafeEnumMember name="..."/>\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC9C0\uC815\uD558\uC2ED\uC2DC\uC624.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-ERR_MULTIPLE_GLOBAL_BINDINGS = \uD558\uB098\uC758 globalBindings \uC0AC\uC6A9\uC790 \uC815\uC758\uB9CC \uC804\uCCB4 \uCEF4\uD30C\uC77C\uC5D0\uC11C \uD5C8\uC6A9\uB429\uB2C8\uB2E4.
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_MULTIPLE_GLOBAL_BINDINGS, followed by a line with the position of the problem in a particular file, e.g. parsing a schema... \n [ERROR] only one globalBindings customization is allowed in a whole compilation \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/base.xjb \n [ERROR] (related to above) but one is already given at this location \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/sub1.xjb
-ERR_MULTIPLE_GLOBAL_BINDINGS_OTHER = (\uC704 \uC624\uB958\uC640 \uAD00\uB828\uB428) \uC774\uBBF8 \uC774 \uC704\uCE58\uC5D0 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-ERR_REFERENCE_TO_NONEXPORTED_CLASS = {0}\uC740(\uB294) \uCC38\uC870\uB41C \uC2A4\uD0A4\uB9C8\uC5D0 \uC788\uC73C\uBA70 <jaxb:class ref="..."/> \uC0AC\uC6A9\uC790 \uC815\uC758\uB85C \uC9C0\uC815\uB41C \uD574\uB2F9 Java \uD074\uB798\uC2A4\uB97C \uD3EC\uD568\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB530\uB77C\uC11C \uC678\uBD80\uC5D0\uC11C \uCC38\uC870\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE = (\uC704 \uC624\uB958\uC640 \uAD00\uB828\uB428) "{0}" \uB124\uC784\uC2A4\uD398\uC774\uC2A4(\uC704 \uAD6C\uC131 \uC694\uC18C \uD3EC\uD568)\uC5D0 \uB300\uD55C \uC2A4\uD0A4\uB9C8\uB294 \uC774 \uC0AC\uC6A9\uC790 \uC815\uC758\uC5D0 \uC758\uD574\uC11C\uB9CC \uCC38\uC870\uB418\uB3C4\uB85D \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS and ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER = (\uC704 \uC624\uB958\uC640 \uAD00\uB828\uB428) \uBB38\uC81C\uB97C \uC77C\uC73C\uD0A4\uB294 \uC2A4\uD0A4\uB9C8 \uAD6C\uC131 \uC694\uC18C\uAC00 \uC774 \uAD6C\uC131 \uC694\uC18C\uC5D0\uC11C \uCC38\uC870\uB428: {0}
-
-WARN_DEFAULT_VALUE_PRIMITIVE_TYPE = \uAE30\uBCF8 \uC720\uD615 "{0}"\uC5D0 \uB300\uD55C \uAE30\uBCF8\uAC12\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_pt_BR.properties
deleted file mode 100644
index ae748ea5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_pt_BR.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-BGMBuilder.NoGlobalElement = O esquema n\u00E3o cont\u00E9m uma declara\u00E7\u00E3o de elemento global.
-
-UnusedCustomizationChecker.WarnUnusedExpectedContentTypes = Um atributo xmime:expectedContentTypes est\u00E1 presente em um elemento incorreto
-
-BGMBuilder.MultipleSchemaBindings = V\u00E1rios <schemaBindings> est\u00E3o definidos para o namespace "{0}" do alvo
-
-BGMBuilder.MultipleSchemaBindings.Location = Outro <schemaBindings> foi definido aqui
-
-
-
-ClassSelector.ClassNameIsRequired = N\u00E3o \u00E9 poss\u00EDvel derivar um nome do esquema. Um atributo de nome foi especificado para a personaliza\u00E7\u00E3o <class>.
-
-ClassSelector.IncorrectClassName = O nome ''{0}'' especificado n\u00E3o \u00E9 um identificador Java v\u00E1lido.
-
-ClassSelector.IncorrectPackageName = O nome do pacote ''{1}'' usado para este esquema n\u00E3o \u00E9 v\u00E1lido.
-
-# {0} - name-identifier-format-enum
-ClassSelector.JavadocHeading = <p>Classe Java de {0}.\n\n<p>O seguinte fragmento do esquema especifica o conte\u00FAdo esperado contido dentro desta classe.
-
-ClassSelector.JavadocLineUnknown = desconhecida
-
-ClassSelector.ReservedClassName = Tentativa de criar uma classe com o nome igual \u00E0 palavra reservada "{0}".
-
-
-CollisionInfo.CollisionInfo = O nome do campo "{0}" \u00E9 usado por duas partes diferentes de um esquema. Consulte: \n{1}\n{2}
-
-CollisionInfo.UnknownFile = arquivo desconhecido
-
-# Concatenated with CollisionInfo.CollisionInfo (CollisionInfo.CollisionInfo + CollisionInfo.LineXOfY + CollisionInfo.LineXOfY) e.g.: The field name "FieldName" is used by two different parts of a schema. See: line X of file:Schema.xsd line Y of file:Schema2.xsd
-CollisionInfo.LineXOfY = linha {0} de {1}
-
-
-ConversionFinder.CannotBeTypeSafeEnum = Uma personaliza\u00E7\u00E3o da enumera\u00E7\u00E3o type safe \u00E9 especificada para um tipo simples que n\u00E3o pode ser mapeado para uma enumera\u00E7\u00E3o type safe.
-ConversionFinder.CannotBeTypeSafeEnum.Location = A declara\u00E7\u00E3o de tipo simples relevante foi especificada nesta localiza\u00E7\u00E3o
-ConversionFinder.NoEnumNameAvailable = Um atributo de nome \u00E9 necess\u00E1rio para personalizar um tipo simples an\u00F4nimo para a enumera\u00E7\u00E3o type-safe.
-ConversionFinder.NoEnumFacet= personaliza\u00E7\u00E3o de classe de enumera\u00E7\u00E3o especificada em um tipo que n\u00E3o tem faceta de enumera\u00E7\u00E3o.
-ERR_ILLEGAL_EXPECTED_MIME_TYPE = N\u00E3o \u00E9 poss\u00EDvel fazer parse do tipo MIME "{0}". {1}.
-
-
-DatatypeBuilder.DatatypeError = Erro de tipo simples: {0}
-
-
-
-
-
-
-DefaultParticleBinder.UnableToGenerateNameFromModelGroup = N\u00E3o \u00E9 poss\u00EDvel gerar um nome de propriedade de um grupo de modelos. Uma personaliza\u00E7\u00E3o \u00E9 necess\u00E1ria.
-
-# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = Obt\u00E9m o restante do modelo do conte\u00FAdo. \n\n<p>\nVoc\u00EA est\u00E1 obtendo esta propriedade "catch-all" pelo seguinte motivo: \n{0}\n<p>\nPara eliminar esta propriedade, aplique uma personaliza\u00E7\u00E3o de propriedade a uma \ndas seguintes declara\u00E7\u00F5es, a fim de alterar seus nomes: \n
-
-
-
-
-
-
-
-FieldBuilder.IncorrectFixedValue = O valor especificado no atributo fixo "{0}" n\u00E3o \u00E9 um valor v\u00E1lido para o tipo de dados
-
-FieldBuilder.IncorrectDefaultValue = O valor especificado no atributo default "{0}" n\u00E3o \u00E9 um valor v\u00E1lido para o tipo de dados
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse = "{0}" foi especificado por uma personaliza\u00E7\u00E3o, mas este atributo tem o tipo "{1}" incompat\u00EDvel
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse.Source = A personaliza\u00E7\u00E3o relevante foi especificada\n nesta localiza\u00E7\u00E3o
-
-FieldBuilder.Javadoc.NilProperty = Esta propriedade \u00E9 usada para controlar <a href="http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#Nils">o recurso xsi:nil</a> do Esquema XML de W3C. \nA defini\u00E7\u00E3o desta propriedade como verdadeira far\u00E1 com que a sa\u00EDda seja &lt;{0} xsi:nil="true" /> independentemente dos valores de outras propriedades.
-
-FieldBuilder.Javadoc.ValueObject = obtenha/defina o valor de tipo complexo associado a este elemento.\n Quando voc\u00EA cancelar o marshal de um documento que cont\u00E9m xsi:type, o m\u00E9todo get{1} retornar\u00E1 uma inst\u00E2ncia de classes derivadas de ''{''@link {0}''}''. Da mesma forma, se definir uma inst\u00E2ncia de classes derivadas, ent\u00E3o voc\u00EA obter\u00E1 a inst\u00E2ncia com xsi:type quando efetuar marshal fora do XML.
-
-
-SimpleTypeBuilder.UnnestedJavaTypeCustomization = A personaliza\u00E7\u00E3o <javaType> deste contexto deve ser aninhada (especifica\u00E7\u00E3o JAXB se\u00E7\u00E3o 6.8.1): \n\t<property>\n\t <baseType>\n\t <javaType ...>\n\t </baseType>\n\t</property>
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization = o compilador n\u00E3o conseguiu honrar esta personaliza\u00E7\u00E3o {0}. Ele foi anexado a um local incorreto ou est\u00E1 inconsistente com outros binds.
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization.Relevant = (a personaliza\u00E7\u00E3o acima est\u00E1 anexada \u00E0 seguinte localiza\u00E7\u00E3o no esquema)
-
-ERR_ENUM_MEMBER_NAME_COLLISION = Dois membros de enumera\u00E7\u00E3o geram o mesmo nome da constante {0}
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_ENUM_MEMBER_NAME_COLLISION, followed by a line with the position of the problem in a particular file
-ERR_ENUM_MEMBER_NAME_COLLISION_RELATED = (relacionado ao item acima) a outra enumera\u00E7\u00E3o \u00E9 definida nesta localiza\u00E7\u00E3o
-
-WARN_ENUM_MEMBER_SIZE_CAP = O tipo simples "{0}" n\u00E3o foi mapeado para a Enumera\u00E7\u00E3o em decorr\u00EAncia do limite EnumMemberSizeCap. Contagem de facetas: {1}, limite atual: {2}. Voc\u00EA pode usar o atributo de personaliza\u00E7\u00E3o "typesafeEnumMaxMembers" para estender o limite.
-
-ERR_CANNOT_GENERATE_ENUM_NAME = N\u00E3o \u00E9 poss\u00EDvel gerar um nome de constante para o valor de enumera\u00E7\u00E3o "{0}". Use <jaxb:typesafeEnumMember name="..."/> para especificar um.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-ERR_MULTIPLE_GLOBAL_BINDINGS = s\u00F3 \u00E9 permitida uma personaliza\u00E7\u00E3o globalBindings em uma compila\u00E7\u00E3o inteira
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_MULTIPLE_GLOBAL_BINDINGS, followed by a line with the position of the problem in a particular file, e.g. parsing a schema... \n [ERROR] only one globalBindings customization is allowed in a whole compilation \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/base.xjb \n [ERROR] (related to above) but one is already given at this location \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/sub1.xjb
-ERR_MULTIPLE_GLOBAL_BINDINGS_OTHER = (referenciada acima) mas uma j\u00E1 foi fornecida nesta localiza\u00E7\u00E3o
-
-ERR_REFERENCE_TO_NONEXPORTED_CLASS = {0} est\u00E1 em um esquema referenciado e n\u00E3o tem a classe Java correspondente especificada pela personaliza\u00E7\u00E3o <jaxb:class ref="..."/>. Portanto, pode ser referenciado de um local externo.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE = (relacionado ao item acima) O esquema do namespace "{0}" (que inclui o componente acima) foi designado para refer\u00EAncia somente por esta personaliza\u00E7\u00E3o.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS and ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER = (relacionado ao item acima) O componente do esquema problem\u00E1tico foi mencionado por este componente: {0}
-
-WARN_DEFAULT_VALUE_PRIMITIVE_TYPE = N\u00E3o \u00E9 poss\u00EDvel gerar o valor default para o tipo primitivo "{0}".
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_zh_CN.properties
deleted file mode 100644
index c0e8f828..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_zh_CN.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-BGMBuilder.NoGlobalElement = \u6A21\u5F0F\u4E0D\u5305\u542B\u5168\u5C40\u5143\u7D20\u58F0\u660E\u3002
-
-UnusedCustomizationChecker.WarnUnusedExpectedContentTypes = xmime:expectedContentTypes \u5C5E\u6027\u4F4D\u4E8E\u4E0D\u6B63\u786E\u7684\u5143\u7D20\u4E0A
-
-BGMBuilder.MultipleSchemaBindings = \u4E3A\u76EE\u6807\u540D\u79F0\u7A7A\u95F4 "{0}" \u5B9A\u4E49\u4E86\u591A\u4E2A <schemaBindings>
-
-BGMBuilder.MultipleSchemaBindings.Location = \u5728\u6B64\u5904\u5B9A\u4E49\u4E86\u5176\u4ED6 <schemaBindings>
-
-
-
-ClassSelector.ClassNameIsRequired = \u65E0\u6CD5\u4ECE\u6A21\u5F0F\u6D3E\u751F\u540D\u79F0\u3002\u4E3A <class> \u5B9A\u5236\u8BBE\u7F6E\u6307\u5B9A\u4E86\u540D\u79F0\u5C5E\u6027\u3002
-
-ClassSelector.IncorrectClassName = \u6307\u5B9A\u7684\u540D\u79F0 ''{0}'' \u4E0D\u662F\u6709\u6548\u7684 Java \u6807\u8BC6\u7B26\u3002
-
-ClassSelector.IncorrectPackageName = \u7528\u4E8E\u6B64\u6A21\u5F0F\u7684\u7A0B\u5E8F\u5305\u540D\u79F0 ''{1}'' \u4E0D\u662F\u6709\u6548\u7684\u7A0B\u5E8F\u5305\u540D\u79F0\u3002
-
-# {0} - name-identifier-format-enum
-ClassSelector.JavadocHeading = <p>{0}\u7684 Java \u7C7B\u3002\n\n<p>\u4EE5\u4E0B\u6A21\u5F0F\u7247\u6BB5\u6307\u5B9A\u5305\u542B\u5728\u6B64\u7C7B\u4E2D\u7684\u9884\u671F\u5185\u5BB9\u3002
-
-ClassSelector.JavadocLineUnknown = \u672A\u77E5
-
-ClassSelector.ReservedClassName = \u5C1D\u8BD5\u521B\u5EFA\u4E0E\u4FDD\u7559\u5173\u952E\u5B57 "{0}" \u540C\u540D\u7684\u7C7B\u3002
-
-
-CollisionInfo.CollisionInfo = \u5B57\u6BB5\u540D\u79F0 "{0}" \u7531\u6A21\u5F0F\u7684\u4E24\u4E2A\u4E0D\u540C\u90E8\u5206\u4F7F\u7528\u3002\u8BF7\u53C2\u9605: \n{1}\n{2}
-
-CollisionInfo.UnknownFile = \u672A\u77E5\u6587\u4EF6
-
-# Concatenated with CollisionInfo.CollisionInfo (CollisionInfo.CollisionInfo + CollisionInfo.LineXOfY + CollisionInfo.LineXOfY) e.g.: The field name "FieldName" is used by two different parts of a schema. See: line X of file:Schema.xsd line Y of file:Schema2.xsd
-CollisionInfo.LineXOfY = {1}\u7684\u7B2C {0} \u884C
-
-
-ConversionFinder.CannotBeTypeSafeEnum = \u4E3A\u65E0\u6CD5\u6620\u5C04\u5230\u7C7B\u578B\u5B89\u5168\u7684\u679A\u4E3E\u7684\u7B80\u5355\u7C7B\u578B\u6307\u5B9A\u4E86\u7C7B\u578B\u5B89\u5168\u7684\u679A\u4E3E\u5B9A\u5236\u8BBE\u7F6E\u3002
-ConversionFinder.CannotBeTypeSafeEnum.Location = \u5728\u6B64\u4F4D\u7F6E\u4E2D\u6307\u5B9A\u76F8\u5173\u7B80\u5355\u7C7B\u578B\u58F0\u660E
-ConversionFinder.NoEnumNameAvailable = \u4E3A\u7C7B\u578B\u5B89\u5168\u7684\u679A\u4E3E\u5B9A\u5236\u533F\u540D\u7B80\u5355\u7C7B\u578B\u65F6, \u9700\u8981\u540D\u79F0\u5C5E\u6027\u3002
-ConversionFinder.NoEnumFacet= \u5728\u6CA1\u6709\u679A\u4E3E\u9762\u7684\u7C7B\u578B\u4E0A\u6307\u5B9A\u4E86\u679A\u4E3E\u7C7B\u5B9A\u5236\u8BBE\u7F6E\u3002
-ERR_ILLEGAL_EXPECTED_MIME_TYPE = \u65E0\u6CD5\u89E3\u6790\u9884\u671F\u7684 MIME \u7C7B\u578B "{0}"\u3002{1}\u3002
-
-
-DatatypeBuilder.DatatypeError = \u7B80\u5355\u7C7B\u578B\u9519\u8BEF: {0}
-
-
-
-
-
-
-DefaultParticleBinder.UnableToGenerateNameFromModelGroup = \u65E0\u6CD5\u4ECE\u6A21\u578B\u7EC4\u751F\u6210\u5C5E\u6027\u540D\u3002\u9700\u8981\u5B9A\u5236\u8BBE\u7F6E\u3002
-
-# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = \u83B7\u53D6\u5185\u5BB9\u6A21\u578B\u7684\u5176\u4F59\u90E8\u5206\u3002\n\n<p>\n\u7531\u4E8E\u4EE5\u4E0B\u539F\u56E0, \u60A8\u83B7\u53D6\u7684\u662F\u6B64 "catch-all" \u5C5E\u6027: \n{0}\n<p>\n\u8981\u6E05\u9664\u6B64\u5C5E\u6027, \u8BF7\u5C06\u5C5E\u6027\u5B9A\u5236\u8BBE\u7F6E\u5E94\u7528\u4E8E\u4EE5\u4E0B\u4E24\u4E2A\u58F0\u660E\n\u6216\u5176\u4E2D\u4E00\u4E2A\u4EE5\u66F4\u6539\u5176\u540D\u79F0: \n
-
-
-
-
-
-
-
-FieldBuilder.IncorrectFixedValue = \u56FA\u5B9A\u5C5E\u6027 "{0}" \u4E2D\u6307\u5B9A\u7684\u503C\u4E0D\u662F\u6570\u636E\u7C7B\u578B\u7684\u6709\u6548\u503C
-
-FieldBuilder.IncorrectDefaultValue = \u9ED8\u8BA4\u5C5E\u6027 "{0}" \u4E2D\u6307\u5B9A\u7684\u503C\u4E0D\u662F\u6570\u636E\u7C7B\u578B\u7684\u6709\u6548\u503C
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse = "{0}" \u662F\u7531\u5B9A\u5236\u8BBE\u7F6E\u6307\u5B9A\u7684, \u4F46\u6B64\u5C5E\u6027\u5177\u6709\u4E0D\u517C\u5BB9\u7C7B\u578B "{1}"
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse.Source = \u5728\u6B64\u4F4D\u7F6E\u6307\u5B9A\u4E86\u76F8\u5173\t\u5B9A\u5236\u8BBE\u7F6E
-
-FieldBuilder.Javadoc.NilProperty = \u6B64\u5C5E\u6027\u7528\u4E8E\u63A7\u5236 W3C XML \u6A21\u5F0F\u7684 <a href="http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#Nils">xsi:nil \u529F\u80FD</a>\u3002\n\u5C06\u6B64\u5C5E\u6027\u8BBE\u7F6E\u4E3A\u201C\u771F\u201D\u5C06\u4F1A\u5BFC\u81F4\u8F93\u51FA\u4E3A &lt;{0} xsi:nil="true" />, \u800C\u4E0D\u8003\u8651\u5176\u4ED6\u5C5E\u6027\u7684\u503C\u3002
-
-FieldBuilder.Javadoc.ValueObject = \u83B7\u53D6/\u8BBE\u7F6E\u4E0E\u6B64\u5143\u7D20\u5173\u8054\u7684\u590D\u6742\u7C7B\u578B\u503C\u3002\n\u5728\u5BF9\u5305\u542B xsi:type \u7684\u6587\u6863\u8FDB\u884C\u89E3\u7F16\u96C6\u65F6, get{1} \u65B9\u6CD5\u5C06\u8FD4\u56DE ''{''@link {0}''}'' \u7684\u6D3E\u751F\u7C7B\u7684\u5B9E\u4F8B\u3002\u540C\u6837, \u5982\u679C\u8BBE\u7F6E\u6D3E\u751F\u7C7B\u7684\u5B9E\u4F8B, \u5219\u5728\u7F16\u96C6 XML \u8F93\u51FA\u65F6\u4E5F\u5C06\u83B7\u53D6\u5177\u6709 xsi:type \u7684\u5B9E\u4F8B\u3002
-
-
-SimpleTypeBuilder.UnnestedJavaTypeCustomization = \u5FC5\u987B\u5D4C\u5957\u6B64\u4E0A\u4E0B\u6587\u4E2D\u7684 <javaType> \u5B9A\u5236\u8BBE\u7F6E (JAXB \u89C4\u8303\u7B2C 6.8.1 \u8282): \n\t<property>\n\t <baseType>\n\t <javaType ...>\n\t </baseType>\n\t</property>
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization = \u7F16\u8BD1\u5668\u65E0\u6CD5\u652F\u6301\u6B64{0}\u5B9A\u5236\u8BBE\u7F6E\u3002\u8BE5\u5B9A\u5236\u8BBE\u7F6E\u9644\u52A0\u5230\u9519\u8BEF\u7684\u4F4D\u7F6E, \u6216\u8005\u4E0E\u5176\u4ED6\u7ED1\u5B9A\u4E0D\u4E00\u81F4\u3002
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization.Relevant = (\u4E0A\u8FF0\u5B9A\u5236\u8BBE\u7F6E\u5DF2\u9644\u52A0\u5230\u6A21\u5F0F\u4E2D\u7684\u4EE5\u4E0B\u4F4D\u7F6E)
-
-ERR_ENUM_MEMBER_NAME_COLLISION = \u4E24\u4E2A\u679A\u4E3E\u6210\u5458\u4EA7\u751F\u4E86\u76F8\u540C\u7684\u5E38\u91CF\u540D{0}
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_ENUM_MEMBER_NAME_COLLISION, followed by a line with the position of the problem in a particular file
-ERR_ENUM_MEMBER_NAME_COLLISION_RELATED = (\u4E0E\u4E0A\u6587\u76F8\u5173) \u5728\u6B64\u4F4D\u7F6E\u5B9A\u4E49\u4E86\u53E6\u4E00\u4E2A\u679A\u4E3E
-
-WARN_ENUM_MEMBER_SIZE_CAP = \u7531\u4E8E EnumMemberSizeCap \u9650\u5236, \u7B80\u5355\u7C7B\u578B "{0}" \u672A\u6620\u5C04\u5230\u679A\u4E3E\u3002\u9762\u8BA1\u6570: {1}, \u5F53\u524D\u9650\u5236: {2}\u3002\u53EF\u4EE5\u4F7F\u7528\u5B9A\u5236\u8BBE\u7F6E\u5C5E\u6027 "typesafeEnumMaxMembers" \u6269\u5C55\u8BE5\u9650\u5236\u3002
-
-ERR_CANNOT_GENERATE_ENUM_NAME = \u65E0\u6CD5\u4ECE\u679A\u4E3E\u7C7B\u578B "{0}" \u751F\u6210\u5E38\u91CF\u540D\u3002\u8BF7\u4F7F\u7528 <jaxb:typesafeEnumMember name="..."/> \u6307\u5B9A\u4E00\u4E2A\u5E38\u91CF\u540D\u3002
-
-# Wrapped into an Exception. Not concatenated with any other string.
-ERR_MULTIPLE_GLOBAL_BINDINGS = \u6574\u4E2A\u7F16\u8BD1\u4E2D\u53EA\u5141\u8BB8\u6709\u4E00\u4E2A globalBindings \u5B9A\u5236\u8BBE\u7F6E
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_MULTIPLE_GLOBAL_BINDINGS, followed by a line with the position of the problem in a particular file, e.g. parsing a schema... \n [ERROR] only one globalBindings customization is allowed in a whole compilation \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/base.xjb \n [ERROR] (related to above) but one is already given at this location \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/sub1.xjb
-ERR_MULTIPLE_GLOBAL_BINDINGS_OTHER = (\u4E0E\u4E0A\u6587\u76F8\u5173) \u4F46\u6B64\u4F4D\u7F6E\u5DF2\u6307\u5B9A\u4E00\u4E2A
-
-ERR_REFERENCE_TO_NONEXPORTED_CLASS = {0}\u4F4D\u4E8E\u5F15\u7528\u7684\u6A21\u5F0F\u4E2D, \u5E76\u4E14\u6CA1\u6709\u7531 <jaxb:class ref="..."/> \u5B9A\u5236\u8BBE\u7F6E\u6307\u5B9A\u7684\u76F8\u5E94 Java \u7C7B\u3002\u56E0\u6B64\u65E0\u6CD5\u4ECE\u5916\u90E8\u5F15\u7528\u5B83\u3002
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE = (\u4E0E\u4E0A\u6587\u76F8\u5173) \u540D\u79F0\u7A7A\u95F4 "{0}" (\u5305\u542B\u4E0A\u8FF0\u7EC4\u4EF6) \u7684\u6A21\u5F0F\u5DF2\u6307\u5B9A\u4E3A\u53EA\u80FD\u7531\u6B64\u5B9A\u5236\u8BBE\u7F6E\u5F15\u7528\u3002
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS and ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER = (\u4E0E\u4E0A\u6587\u76F8\u5173) \u4ECE\u6B64\u7EC4\u4EF6\u5F15\u7528\u4E86\u6709\u95EE\u9898\u7684\u6A21\u5F0F\u7EC4\u4EF6: {0}
-
-WARN_DEFAULT_VALUE_PRIMITIVE_TYPE = \u65E0\u6CD5\u4E3A\u57FA\u5143\u7C7B\u578B "{0}" \u751F\u6210\u9ED8\u8BA4\u503C\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_zh_TW.properties
deleted file mode 100644
index db19a145..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_zh_TW.properties
+++ /dev/null
@@ -1,131 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-BGMBuilder.NoGlobalElement = \u7DB1\u8981\u672A\u5305\u542B\u5168\u57DF\u5143\u7D20\u5BA3\u544A.
-
-UnusedCustomizationChecker.WarnUnusedExpectedContentTypes = xmime:expectedContentTypes \u5C6C\u6027\u5B58\u5728\u4E0D\u6B63\u78BA\u7684\u5143\u7D20\u4E2D
-
-BGMBuilder.MultipleSchemaBindings = \u70BA\u76EE\u6A19\u547D\u540D\u7A7A\u9593 "{0}" \u5B9A\u7FA9\u4E86\u591A\u500B <schemaBindings>
-
-BGMBuilder.MultipleSchemaBindings.Location = \u53E6\u4E00\u500B <schemaBindings> \u5B9A\u7FA9\u65BC\u6B64\u8655
-
-
-
-ClassSelector.ClassNameIsRequired = \u7121\u6CD5\u5F9E\u7DB1\u8981\u884D\u751F\u540D\u7A31. \u5DF2\u6307\u5B9A\u4E00\u500B\u540D\u7A31\u5C6C\u6027\u81F3 <class> \u81EA\u8A02\u9805\u76EE.
-
-ClassSelector.IncorrectClassName = \u6307\u5B9A\u7684\u540D\u7A31 ''{0}'' \u4E0D\u662F\u6709\u6548\u7684 Java ID.
-
-ClassSelector.IncorrectPackageName = \u4F7F\u7528\u65BC\u6B64\u7DB1\u8981\u7684\u5957\u88DD\u7A0B\u5F0F\u540D\u7A31 ''{1}'' \u4E0D\u662F\u6709\u6548\u7684\u5957\u88DD\u7A0B\u5F0F\u540D\u7A31.
-
-# {0} - name-identifier-format-enum
-ClassSelector.JavadocHeading = <p>{0} \u7684 Java \u985E\u5225.\n\n<p>\u4E0B\u5217\u7DB1\u8981\u7247\u6BB5\u6703\u6307\u5B9A\u6B64\u985E\u5225\u4E2D\u5305\u542B\u7684\u9810\u671F\u5167\u5BB9.
-
-ClassSelector.JavadocLineUnknown = \u4E0D\u660E
-
-ClassSelector.ReservedClassName = \u5617\u8A66\u4F7F\u7528\u548C\u4FDD\u7559\u5B57 "{0}" \u76F8\u540C\u7684\u540D\u7A31\u4F86\u5EFA\u7ACB\u985E\u5225.
-
-
-CollisionInfo.CollisionInfo = \u7DB1\u8981\u7684\u5169\u500B\u4E0D\u540C\u90E8\u5206\u5747\u4F7F\u7528\u6B04\u4F4D\u540D\u7A31 "{0}". \u8ACB\u53C3\u95B1: \n{1}\n{2}
-
-CollisionInfo.UnknownFile = \u4E0D\u660E\u7684\u6A94\u6848
-
-# Concatenated with CollisionInfo.CollisionInfo (CollisionInfo.CollisionInfo + CollisionInfo.LineXOfY + CollisionInfo.LineXOfY) e.g.: The field name "FieldName" is used by two different parts of a schema. See: line X of file:Schema.xsd line Y of file:Schema2.xsd
-CollisionInfo.LineXOfY = {1} \u7684\u7B2C {0} \u884C
-
-
-ConversionFinder.CannotBeTypeSafeEnum = \u985E\u578B\u5B89\u5168 Enum \u81EA\u8A02\u9805\u76EE\u5DF2\u6307\u5B9A\u81F3\u67D0\u500B\u7121\u6CD5\u5C0D\u61C9\u81F3\u985E\u578B\u5B89\u5168 Enum \u7684\u7C21\u55AE\u985E\u578B.
-ConversionFinder.CannotBeTypeSafeEnum.Location = \u6B64\u4F4D\u7F6E\u6307\u5B9A\u4E86\u76F8\u95DC\u7684\u7C21\u55AE\u985E\u578B\u5BA3\u544A
-ConversionFinder.NoEnumNameAvailable = \u9700\u8981\u540D\u7A31\u5C6C\u6027, \u624D\u80FD\u5C07\u533F\u540D\u7684\u7C21\u55AE\u985E\u578B\u81EA\u8A02\u70BA\u985E\u578B\u5B89\u5168 Enum.
-ConversionFinder.NoEnumFacet= Enum \u985E\u5225\u81EA\u8A02\u9805\u76EE\u5DF2\u6307\u5B9A\u65BC\u6C92\u6709\u5217\u8209 Facet \u7684\u985E\u578B\u4E2D.
-ERR_ILLEGAL_EXPECTED_MIME_TYPE = \u7121\u6CD5\u5256\u6790\u9810\u671F\u7684 MIME \u985E\u578B "{0}". {1}.
-
-
-DatatypeBuilder.DatatypeError = \u7C21\u55AE\u985E\u578B\u932F\u8AA4: {0}
-
-
-
-
-
-
-DefaultParticleBinder.UnableToGenerateNameFromModelGroup = \u7121\u6CD5\u5F9E\u6A21\u578B\u7FA4\u7D44\u7522\u751F\u7279\u6027\u540D\u7A31. \u9700\u8981\u81EA\u8A02\u9805\u76EE.
-
-# {0} - CollisionInfo.CollisionInfo is injected with parameters field name, location at first schema, location at second schema e.g.: Gets the rest of the content model. You are getting this "catch-all" property because of the following reason: The field name "OverviewURL" is used by two different parts of a schema. See: line 392 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd line 390 of file:/C:/Development/Projects/jUDDI_v3/uddi-ws/src/main/resources/uddi_v3.xsd To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property.
-DefaultParticleBinder.FallbackJavadoc = \u53D6\u5F97\u5176\u9918\u7684\u5167\u5BB9\u6A21\u578B. \n\n<p>\n\u57FA\u65BC\u4E0B\u5217\u539F\u56E0, \u60A8\u53D6\u5F97\u6B64 "catch-all" \u7279\u6027: \n{0}\n<p>\n\u70BA\u53BB\u9664\u6B64\u7279\u6027, \u8ACB\u5C07\u7279\u6027\u81EA\u8A02\u9805\u76EE\u5957\u7528\u81F3\u4E0B\u5217\u5169\u500B\u5BA3\u544A\u7684\n\u5176\u4E2D\u4E4B\u4E00, \u4EE5\u8B8A\u66F4\u5B83\u5011\u7684\u540D\u7A31: \n
-
-
-
-
-
-
-
-FieldBuilder.IncorrectFixedValue = \u5728\u56FA\u5B9A\u5C6C\u6027 "{0}" \u4E2D\u6307\u5B9A\u7684\u503C\u4E0D\u662F\u8CC7\u6599\u985E\u578B\u7684\u6709\u6548\u503C
-
-FieldBuilder.IncorrectDefaultValue = \u5728\u9810\u8A2D\u5C6C\u6027 "{0}" \u4E2D\u6307\u5B9A\u7684\u503C\u4E0D\u662F\u8CC7\u6599\u985E\u578B\u7684\u6709\u6548\u503C
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse = "{0}" \u662F\u7531\u81EA\u8A02\u9805\u76EE\u6240\u6307\u5B9A, \u4F46\u6B64\u5C6C\u6027\u6709\u4E0D\u76F8\u5BB9\u7684\u985E\u578B "{1}"
-
-FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse.Source = \u76F8\u95DC\u7684\u81EA\u8A02\u9805\u76EE\u5DF2\u6307\u5B9A\u65BC\t\u6B64\u4F4D\u7F6E
-
-FieldBuilder.Javadoc.NilProperty = \u6B64\u7279\u6027\u662F\u7528\u4F86\u63A7\u5236 W3C XML \u7DB1\u8981\u7684 <a href="http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/#Nils"> xsi:nil \u529F\u80FD.</a>\n\u7121\u8AD6\u5176\u4ED6\u7279\u6027\u7684\u503C\u70BA\u4F55, \u5C07\u6B64\u7279\u6027\u8A2D\u70BA true \u5C07\u5C0E\u81F4\u8F38\u51FA\u70BA &lt;{0} xsi:nil="true" />.
-
-FieldBuilder.Javadoc.ValueObject = \u53D6\u5F97/\u8A2D\u5B9A\u8207\u6B64\u5143\u7D20\u76F8\u95DC\u806F\u7684\u8907\u96DC\u985E\u578B\u503C.\n \u7576\u60A8\u89E3\u9664\u5C01\u9001\u8655\u7406 (Unmarshal) \u5305\u542B xsi:type \u7684\u6587\u4EF6\u6642, get{1} \u65B9\u6CD5\u6703\u50B3\u56DE ''{''@link {0}''}'' \u4E4B\u884D\u751F\u985E\u5225\u7684\u57F7\u884C\u8655\u7406. \u540C\u6A23\u5730, \u82E5\u60A8\u8A2D\u5B9A\u6240\u884D\u751F\u985E\u5225\u7684\u57F7\u884C\u8655\u7406, \u7576\u60A8\u5C01\u9001\u8655\u7406 (Marshal) \u81F3 XML \u6642, \u6703\u53D6\u5F97\u542B\u6709 xsi:type \u7684\u57F7\u884C\u8655\u7406.
-
-
-SimpleTypeBuilder.UnnestedJavaTypeCustomization = \u6B64\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u4E2D\u7684 <javaType> \u81EA\u8A02\u9805\u76EE\u5FC5\u9808\u70BA\u5DE2\u72C0 (JAXB \u898F\u683C\u7B2C 6.8.1 \u7BC0): \n\t<property>\n\t <baseType>\n\t <javaType ...>\n\t </baseType>\n\t</property>
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization = \u7DE8\u8B6F\u5668\u7121\u6CD5\u63A5\u53D7\u6B64 {0} \u81EA\u8A02\u9805\u76EE. \u8A72\u81EA\u8A02\u9805\u76EE\u9023\u9644\u81F3\u932F\u8AA4\u7684\u4F4D\u7F6E, \u6216\u8207\u5176\u4ED6\u9023\u7D50\u4E0D\u4E00\u81F4.
-
-UnusedCustomizationChecker.UnacknolwedgedCustomization.Relevant = (\u4E0A\u8FF0\u81EA\u8A02\u9805\u76EE\u5DF2\u9023\u9644\u81F3\u7DB1\u8981\u4E2D\u7684\u4E0B\u5217\u4F4D\u7F6E)
-
-ERR_ENUM_MEMBER_NAME_COLLISION = \u5169\u500B Enum \u6210\u54E1\u7522\u751F\u76F8\u540C\u7684\u5E38\u6578\u540D\u7A31 {0}
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_ENUM_MEMBER_NAME_COLLISION, followed by a line with the position of the problem in a particular file
-ERR_ENUM_MEMBER_NAME_COLLISION_RELATED = (\u8207\u4E0A\u8FF0\u6709\u95DC) \u53E6\u4E00\u500B Enum \u5B9A\u7FA9\u65BC\u6B64\u4F4D\u7F6E
-
-WARN_ENUM_MEMBER_SIZE_CAP = \u7531\u65BC EnumMemberSizeCap \u9650\u5236, \u7C21\u55AE\u985E\u578B "{0}" \u672A\u5C0D\u61C9\u81F3 Enum. Facet \u8A08\u6578: {1}, \u76EE\u524D\u9650\u5236: {2}. \u60A8\u53EF\u4F7F\u7528\u81EA\u8A02\u9805\u76EE\u5C6C\u6027 "typesafeEnumMaxMembers" \u4F86\u64F4\u5145\u9650\u5236.
-
-ERR_CANNOT_GENERATE_ENUM_NAME = \u7121\u6CD5\u5F9E\u5217\u8209\u503C "{0}" \u7522\u751F\u5E38\u6578\u540D\u7A31. \u8ACB\u4F7F\u7528 <jaxb:typesafeEnumMember name="..."/> \u6307\u5B9A\u5E38\u6578\u540D\u7A31.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-ERR_MULTIPLE_GLOBAL_BINDINGS = \u5728\u6574\u500B\u7DE8\u8B6F\u4E2D\u50C5\u5141\u8A31\u4F7F\u7528\u4E00\u500B globalBindings \u81EA\u8A02\u9805\u76EE
-
-# Not concatenated with any other String (written on a separate line) but printed after ERR_MULTIPLE_GLOBAL_BINDINGS, followed by a line with the position of the problem in a particular file, e.g. parsing a schema... \n [ERROR] only one globalBindings customization is allowed in a whole compilation \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/base.xjb \n [ERROR] (related to above) but one is already given at this location \n line 8 of file:/C:/kohsuke/Sun/JAXB/jaxb-ri/sandbox/issue98/sub1.xjb
-ERR_MULTIPLE_GLOBAL_BINDINGS_OTHER = (\u8207\u4E0A\u8FF0\u6709\u95DC) \u4F46\u6B64\u4F4D\u7F6E\u5DF2\u6307\u5B9A\u4E00\u500B
-
-ERR_REFERENCE_TO_NONEXPORTED_CLASS = {0} \u4F4D\u65BC\u53C3\u7167\u7684\u7DB1\u8981\u4E2D, \u4E26\u4E14\u6C92\u6709 <jaxb:class ref="..."/> \u81EA\u8A02\u9805\u76EE\u6307\u5B9A\u7684\u5C0D\u61C9 Java \u985E\u5225. \u56E0\u6B64\u7121\u6CD5\u5F9E\u5916\u90E8\u53C3\u7167.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE = (\u8207\u4E0A\u8FF0\u6709\u95DC) \u547D\u540D\u7A7A\u9593 "{0}" (\u5305\u542B\u4E0A\u8FF0\u5143\u4EF6) \u7684\u7DB1\u8981\u5DF2\u6307\u5B9A\u70BA\u50C5\u4F9B\u6B64\u81EA\u8A02\u9805\u76EE\u53C3\u7167.
-
-# Not concatenated with any other string (written on a separate line) but printed after ERR_REFERENCE_TO_NONEXPORTED_CLASS and ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE.
-ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER = (\u8207\u4E0A\u8FF0\u6709\u95DC) \u6709\u554F\u984C\u7684\u7DB1\u8981\u5143\u4EF6\u662F\u5F9E\u4E0B\u5217\u5143\u4EF6\u53C3\u7167: {0}
-
-WARN_DEFAULT_VALUE_PRIMITIVE_TYPE = \u7121\u6CD5\u7522\u751F\u539F\u59CB\u985E\u578B "{0}" \u7684\u9810\u8A2D\u503C.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/Messages.java
deleted file mode 100644
index 094c44b9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/Messages.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-public class Messages
-{
- /** Loads a string resource and formats it with specified arguments. */
- public static String format( String property, Object... args ) {
- String text = ResourceBundle.getBundle(Messages.class.getPackage().getName() +".MessageBundle").getString(property);
- return MessageFormat.format(text,args);
- }
-
-
- static final String WARN_NO_GLOBAL_ELEMENT =
- "BGMBuilder.NoGlobalElement";
-
- public static final String WARN_UNUSED_EXPECTED_CONTENT_TYPES =
- "UnusedCustomizationChecker.WarnUnusedExpectedContentTypes";
-
- static final String ERR_MULTIPLE_SCHEMA_BINDINGS =
- "BGMBuilder.MultipleSchemaBindings"; // arg:1
-
- static final String ERR_MULTIPLE_SCHEMA_BINDINGS_LOCATION =
- "BGMBuilder.MultipleSchemaBindings.Location"; // arg:0
-
- static final String JAVADOC_HEADING = // 1 arg
- "ClassSelector.JavadocHeading";
-
- static final String ERR_RESERVED_CLASS_NAME = // 1 arg
- "ClassSelector.ReservedClassName";
-
- static final String ERR_CLASS_NAME_IS_REQUIRED =
- "ClassSelector.ClassNameIsRequired"; // arg:0
-
- static final String ERR_INCORRECT_CLASS_NAME =
- "ClassSelector.IncorrectClassName"; // arg:1
-
- static final String ERR_INCORRECT_PACKAGE_NAME =
- "ClassSelector.IncorrectPackageName"; // arg:2
-
- static final String ERR_CANNOT_BE_TYPE_SAFE_ENUM =
- "ConversionFinder.CannotBeTypeSafeEnum"; // arg:0
-
- static final String ERR_CANNOT_BE_TYPE_SAFE_ENUM_LOCATION =
- "ConversionFinder.CannotBeTypeSafeEnum.Location"; // arg:0
-
- static final String ERR_NO_ENUM_NAME_AVAILABLE =
- "ConversionFinder.NoEnumNameAvailable"; // arg:0
-
- static final String ERR_NO_ENUM_FACET =
- "ConversionFinder.NoEnumFacet"; // arg:0
-
- static final String ERR_ILLEGAL_EXPECTED_MIME_TYPE =
- "ERR_ILLEGAL_EXPECTED_MIME_TYPE"; // args:2
-
- static final String ERR_DATATYPE_ERROR =
- "DatatypeBuilder.DatatypeError"; // arg:1
-
- static final String ERR_UNABLE_TO_GENERATE_NAME_FROM_MODELGROUP =
- "DefaultParticleBinder.UnableToGenerateNameFromModelGroup"; // arg:0
-
- static final String ERR_INCORRECT_FIXED_VALUE =
- "FieldBuilder.IncorrectFixedValue"; // arg:1
-
- static final String ERR_INCORRECT_DEFAULT_VALUE =
- "FieldBuilder.IncorrectDefaultValue"; // arg:1
-
- static final String ERR_CONFLICT_BETWEEN_USERTYPE_AND_ACTUALTYPE_ATTUSE =
- "FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse"; // arg:2
-
- static final String ERR_CONFLICT_BETWEEN_USERTYPE_AND_ACTUALTYPE_ATTUSE_SOURCE =
- "FieldBuilder.ConflictBetweenUserTypeAndActualType.AttUse.Source"; // arg:0
-
- static final String ERR_UNNESTED_JAVATYPE_CUSTOMIZATION_ON_SIMPLETYPE =
- "SimpleTypeBuilder.UnnestedJavaTypeCustomization"; // arg:0
-
- static final String JAVADOC_NIL_PROPERTY =
- "FieldBuilder.Javadoc.NilProperty"; // arg:1
-
- static final String JAVADOC_LINE_UNKNOWN = // 0 args
- "ClassSelector.JavadocLineUnknown";
-
- static final String JAVADOC_VALUEOBJECT_PROPERTY =
- "FieldBuilder.Javadoc.ValueObject"; // args:2
-
- static final String MSG_COLLISION_INFO =
- "CollisionInfo.CollisionInfo"; // args:3
-
- static final String MSG_UNKNOWN_FILE =
- "CollisionInfo.UnknownFile"; // arg:1
-
- static final String MSG_LINE_X_OF_Y =
- "CollisionInfo.LineXOfY"; // args:2
-
- static final String MSG_FALLBACK_JAVADOC =
- "DefaultParticleBinder.FallbackJavadoc"; // arg:1
-
- static final String ERR_ENUM_MEMBER_NAME_COLLISION =
- "ERR_ENUM_MEMBER_NAME_COLLISION";
- static final String ERR_ENUM_MEMBER_NAME_COLLISION_RELATED =
- "ERR_ENUM_MEMBER_NAME_COLLISION_RELATED";
- static final String ERR_CANNOT_GENERATE_ENUM_NAME =
- "ERR_CANNOT_GENERATE_ENUM_NAME";
- static final String WARN_ENUM_MEMBER_SIZE_CAP =
- "WARN_ENUM_MEMBER_SIZE_CAP"; // args: 3
-
-
- // they are shared from the model
- public static final String ERR_UNACKNOWLEDGED_CUSTOMIZATION =
- "UnusedCustomizationChecker.UnacknolwedgedCustomization"; // arg:1
- public static final String ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION =
- "UnusedCustomizationChecker.UnacknolwedgedCustomization.Relevant"; // arg:0
-
- public static final String ERR_MULTIPLE_GLOBAL_BINDINGS =
- "ERR_MULTIPLE_GLOBAL_BINDINGS";
- public static final String ERR_MULTIPLE_GLOBAL_BINDINGS_OTHER =
- "ERR_MULTIPLE_GLOBAL_BINDINGS_OTHER";
-
- public static final String ERR_REFERENCE_TO_NONEXPORTED_CLASS =
- "ERR_REFERENCE_TO_NONEXPORTED_CLASS";
- public static final String ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE =
- "ERR_REFERENCE_TO_NONEXPORTED_CLASS_MAP_FALSE";
- public static final String ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER =
- "ERR_REFERENCE_TO_NONEXPORTED_CLASS_REFERER";
-
- static final String WARN_DEFAULT_VALUE_PRIMITIVE_TYPE =
- "WARN_DEFAULT_VALUE_PRIMITIVE_TYPE";
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MultiplicityCounter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MultiplicityCounter.java
deleted file mode 100644
index c4881066..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MultiplicityCounter.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.math.BigInteger;
-import com.sun.tools.internal.xjc.model.Multiplicity;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.visitor.XSTermFunction;
-
-import static com.sun.tools.internal.xjc.model.Multiplicity.ONE;
-import static com.sun.tools.internal.xjc.model.Multiplicity.ZERO;
-
-/**
- * Counts {@link Multiplicity} for a particle/term.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class MultiplicityCounter implements XSTermFunction<Multiplicity> {
-
- public static final MultiplicityCounter theInstance = new MultiplicityCounter();
-
- private MultiplicityCounter() {}
-
- public Multiplicity particle( XSParticle p ) {
- Multiplicity m = p.getTerm().apply(this);
-
- BigInteger max;
- if (m.max==null || (BigInteger.valueOf(XSParticle.UNBOUNDED).equals(p.getMaxOccurs())))
- max=null;
- else
- max=p.getMaxOccurs();
-
- return Multiplicity.multiply( m, Multiplicity.create(p.getMinOccurs(),max) );
- }
-
- public Multiplicity wildcard(XSWildcard wc) {
- return ONE;
- }
-
- public Multiplicity modelGroupDecl(XSModelGroupDecl decl) {
- return modelGroup(decl.getModelGroup());
- }
-
- public Multiplicity modelGroup(XSModelGroup group) {
- boolean isChoice = group.getCompositor() == XSModelGroup.CHOICE;
-
- Multiplicity r = ZERO;
-
- for( XSParticle p : group.getChildren()) {
- Multiplicity m = particle(p);
-
- if(r==null) {
- r=m;
- continue;
- }
- if(isChoice) {
- r = Multiplicity.choice(r,m);
- } else {
- r = Multiplicity.group(r,m);
- }
- }
- return r;
- }
-
- public Multiplicity elementDecl(XSElementDecl decl) {
- return ONE;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ParticleBinder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ParticleBinder.java
deleted file mode 100644
index d477a4f1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ParticleBinder.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.text.ParseException;
-import java.util.Collection;
-import java.util.Collections;
-
-import com.sun.codemodel.internal.JJavaName;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIDeclaration;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSTerm;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.visitor.XSTermVisitor;
-
-/**
- * Binds the content models of {@link XSParticle} as properties of the class that's being built.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class ParticleBinder {
-
- protected final BGMBuilder builder = Ring.get(BGMBuilder.class);
-
- protected ParticleBinder() {
- // make sure that this object is available as ParticleBinder, not as their actual implementation classes
- Ring.add(ParticleBinder.class,this);
- }
-
- /**
- * Builds the {@link CPropertyInfo}s from the given particle
- * (and its descendants), and set them to the class returned by
- * {@link ClassSelector#getCurrentBean()}.
- */
- public final void build( XSParticle p ) {
- build(p, Collections.<XSParticle>emptySet());
- }
-
- /**
- * The version of the build method that forces a specified set of particles
- * to become a property.
- */
- public abstract void build( XSParticle p, Collection<XSParticle> forcedProps );
-
- /**
- * Similar to the build method but this method only checks if
- * the BGM that will be built by the build method will
- * do the fallback (map all the properties into one list) or not.
- *
- * @return
- * false if the fallback will not happen.
- */
- public abstract boolean checkFallback( XSParticle p );
-
-
-//
-//
-// convenient utility methods
-//
-//
-
- protected final CClassInfo getCurrentBean() {
- return getClassSelector().getCurrentBean();
- }
-
-
- /**
- * Gets the BIProperty object that applies to the given particle.
- */
- protected final BIProperty getLocalPropCustomization( XSParticle p ) {
- return getLocalCustomization(p,BIProperty.class);
- }
-
- protected final <T extends BIDeclaration> T getLocalCustomization( XSParticle p, Class<T> type ) {
- // check the property customization of this component first
- T cust = builder.getBindInfo(p).get(type);
- if(cust!=null) return cust;
-
- // if not, the term might have one.
- cust = builder.getBindInfo(p.getTerm()).get(type);
- if(cust!=null) return cust;
-
- return null;
- }
-
- /**
- * Computes the label of a given particle.
- * Usually, the getLabel method should be used instead.
- */
- protected final String computeLabel( XSParticle p ) {
- // if the particle carries a customization, use that value.
- // since we are binding content models, it's always non-constant properties.
- BIProperty cust = getLocalPropCustomization(p);
- if(cust!=null && cust.getPropertyName(false)!=null)
- return cust.getPropertyName(false);
-
- // no explicit property name is given. Compute one.
-
- XSTerm t = p.getTerm();
-
-// // first, check if a term is going to be a class, if so, use that name.
-// ClassItem ci = owner.selector.select(t);
-// if(ci!=null) {
-// return makeJavaName(ci.getTypeAsDefined().name());
-// }
-
- // if it fails, compute the default name according to the spec.
- if(t.isElementDecl())
- // for element, take the element name.
- return makeJavaName(p,t.asElementDecl().getName());
- if(t.isModelGroupDecl())
- // for named model groups, take that name
- return makeJavaName(p,t.asModelGroupDecl().getName());
- if(t.isWildcard())
- // the spec says it will map to "any" by default.
- return makeJavaName(p,"Any");
- if(t.isModelGroup()) {
- try {
- return getSpecDefaultName(t.asModelGroup(),p.isRepeated());
- } catch( ParseException e ) {
- // unable to generate a name.
- getErrorReporter().error(t.getLocator(),
- Messages.ERR_UNABLE_TO_GENERATE_NAME_FROM_MODELGROUP);
- return "undefined"; // recover from error by assuming something
- }
- }
-
- // there are only four types of XSTerm.
- throw new AssertionError();
- }
-
- /** Converts an XML name to the corresponding Java name. */
- protected final String makeJavaName( boolean isRepeated, String xmlName ) {
- String name = builder.getNameConverter().toPropertyName(xmlName);
- if(builder.getGlobalBinding().isSimpleMode() && isRepeated )
- name = JJavaName.getPluralForm(name);
- return name;
- }
-
- protected final String makeJavaName( XSParticle p, String xmlName ) {
- return makeJavaName(p.isRepeated(),xmlName);
- }
-
- /**
- * Computes a name from unnamed model group by following the spec.
- *
- * Taking first three elements and combine them.
- *
- * @param repeated
- * if the said model group is repeated more than once
- *
- * @exception ParseException
- * If the method cannot generate a name. For example, when
- * a model group doesn't contain any element reference/declaration
- * at all.
- */
- protected final String getSpecDefaultName( XSModelGroup mg, final boolean repeated ) throws ParseException {
-
- final StringBuilder name = new StringBuilder();
-
- mg.visit(new XSTermVisitor() {
- /**
- * Count the number of tokens we combined.
- * We will concat up to 3.
- */
- private int count=0;
-
- /**
- * Is the current particple/term repeated?
- */
- private boolean rep = repeated;
-
- public void wildcard(XSWildcard wc) {
- append("any");
- }
-
- public void modelGroupDecl(XSModelGroupDecl mgd) {
- modelGroup(mgd.getModelGroup());
- }
-
- public void modelGroup(XSModelGroup mg) {
- String operator;
- if(mg.getCompositor()==XSModelGroup.CHOICE) operator = "Or";
- else operator = "And";
-
- int size = mg.getSize();
- for( int i=0; i<size; i++ ) {
- XSParticle p = mg.getChild(i);
- boolean oldRep = rep;
- rep |= p.isRepeated();
- p.getTerm().visit(this);
- rep = oldRep;
-
- if(count==3) return; // we have enough
- if(i!=size-1) name.append(operator);
- }
- }
-
- public void elementDecl(XSElementDecl ed) {
- append(ed.getName());
- }
-
- private void append(String token) {
- if( count<3 ) {
- name.append(makeJavaName(rep,token));
- count++;
- }
- }
- });
-
- if(name.length()==0) throw new ParseException("no element",-1);
-
- return name.toString();
- }
-
-
-
- protected final ErrorReporter getErrorReporter() {
- return Ring.get(ErrorReporter.class);
- }
- protected final ClassSelector getClassSelector() {
- return Ring.get(ClassSelector.class);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/RawTypeSetBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/RawTypeSetBuilder.java
deleted file mode 100644
index 0e8b49e0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/RawTypeSetBuilder.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import javax.activation.MimeType;
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.model.CAdapter;
-import com.sun.tools.internal.xjc.model.CClass;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CCustomizations;
-import com.sun.tools.internal.xjc.model.CElement;
-import com.sun.tools.internal.xjc.model.CElementInfo;
-import com.sun.tools.internal.xjc.model.CElementPropertyInfo;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-import com.sun.tools.internal.xjc.model.CTypeRef;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.model.Multiplicity;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.reader.RawTypeSet;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIDom;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIGlobalBinding;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIXSubstitutable;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.core.WildcardMode;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.visitor.XSTermVisitor;
-
-/**
- * Builds {@link RawTypeSet} for XML Schema.
- *
- * @author Kohsuke Kawaguchi
- */
-public class RawTypeSetBuilder implements XSTermVisitor {
- /**
- * @param optional
- * if this whole property is optional due to the
- * occurrence constraints on ancestors, set this to true.
- * this will prevent the primitive types to be generated.
- */
- public static RawTypeSet build( XSParticle p, boolean optional ) {
- RawTypeSetBuilder rtsb = new RawTypeSetBuilder();
- rtsb.particle(p);
- Multiplicity mul = MultiplicityCounter.theInstance.particle(p);
-
- if(optional)
- mul = mul.makeOptional();
-
- return new RawTypeSet(rtsb.refs,mul);
- }
-
- /**
- * To avoid declaring the same element twice for a content model like
- * (A,A), we keep track of element names here while we are building up
- * this instance.
- */
- private final Set<QName> elementNames = new LinkedHashSet<QName>();
-
- private final Set<RawTypeSet.Ref> refs = new LinkedHashSet<RawTypeSet.Ref>();
-
- protected final BGMBuilder builder = Ring.get(BGMBuilder.class);
-
- public RawTypeSetBuilder() {}
-
-
- /**
- * Gets the {@link RawTypeSet.Ref}s that were built.
- */
- public Set<RawTypeSet.Ref> getRefs() {
- return refs;
- }
-
- /**
- * Build up {@link #refs} and compute the total multiplicity of this {@link RawTypeSet.Ref} set.
- */
- private void particle( XSParticle p ) {
- // if the DOM customization is present, bind it like a wildcard
- BIDom dom = builder.getLocalDomCustomization(p);
- if(dom!=null) {
- dom.markAsAcknowledged();
- refs.add(new WildcardRef(WildcardMode.SKIP));
- } else {
- p.getTerm().visit(this);
- }
- }
-
- public void wildcard(XSWildcard wc) {
- refs.add(new WildcardRef(wc));
- }
-
- public void modelGroupDecl(XSModelGroupDecl decl) {
- modelGroup(decl.getModelGroup());
- }
-
- public void modelGroup(XSModelGroup group) {
- for( XSParticle p : group.getChildren())
- particle(p);
- }
-
- public void elementDecl(XSElementDecl decl) {
-
- QName n = BGMBuilder.getName(decl);
- if(elementNames.add(n)) {
- CElement elementBean = Ring.get(ClassSelector.class).bindToType(decl,null);
- if(elementBean==null)
- refs.add(new XmlTypeRef(decl));
- else {
- // yikes!
- if(elementBean instanceof CClass)
- refs.add(new CClassRef(decl,(CClass)elementBean));
- else
- refs.add(new CElementInfoRef(decl,(CElementInfo)elementBean));
- }
- }
- }
-
- /**
- * Reference to a wildcard.
- */
- public static final class WildcardRef extends RawTypeSet.Ref {
- private final WildcardMode mode;
-
- WildcardRef(XSWildcard wildcard) {
- this.mode = getMode(wildcard);
- }
- WildcardRef(WildcardMode mode) {
- this.mode = mode;
- }
-
- private static WildcardMode getMode(XSWildcard wildcard) {
- switch(wildcard.getMode()) {
- case XSWildcard.LAX:
- return WildcardMode.LAX;
- case XSWildcard.STRTICT:
- return WildcardMode.STRICT;
- case XSWildcard.SKIP:
- return WildcardMode.SKIP;
- default:
- throw new IllegalStateException();
- }
- }
-
- protected CTypeRef toTypeRef(CElementPropertyInfo ep) {
- // we don't allow a mapping to typeRef if the wildcard is present
- throw new IllegalStateException();
- }
-
- protected void toElementRef(CReferencePropertyInfo prop) {
- prop.setWildcard(mode);
- }
-
- protected RawTypeSet.Mode canBeType(RawTypeSet parent) {
- return RawTypeSet.Mode.MUST_BE_REFERENCE;
- }
-
- protected boolean isListOfValues() {
- return false;
- }
-
- protected ID id() {
- return ID.NONE;
- }
- }
-
- /**
- * Reference to a class that maps from an element.
- */
- public static final class CClassRef extends RawTypeSet.Ref {
- public final CClass target;
- public final XSElementDecl decl;
-
- CClassRef(XSElementDecl decl, CClass target) {
- this.decl = decl;
- this.target = target;
- }
-
- protected CTypeRef toTypeRef(CElementPropertyInfo ep) {
- return new CTypeRef(target,decl);
- }
-
- protected void toElementRef(CReferencePropertyInfo prop) {
- prop.getElements().add(target);
- }
-
- protected RawTypeSet.Mode canBeType(RawTypeSet parent) {
- // if element substitution can occur, no way it can be mapped to a list of types
- if(decl.getSubstitutables().size()>1)
- return RawTypeSet.Mode.MUST_BE_REFERENCE;
-
- return RawTypeSet.Mode.SHOULD_BE_TYPEREF;
- }
-
- protected boolean isListOfValues() {
- return false;
- }
-
- protected ID id() {
- return ID.NONE;
- }
- }
-
- /**
- * Reference to a class that maps from an element.
- */
- public final class CElementInfoRef extends RawTypeSet.Ref {
- public final CElementInfo target;
- public final XSElementDecl decl;
-
- CElementInfoRef(XSElementDecl decl, CElementInfo target) {
- this.decl = decl;
- this.target = target;
- }
-
- protected CTypeRef toTypeRef(CElementPropertyInfo ep) {
- assert !target.isCollection();
- CAdapter a = target.getProperty().getAdapter();
- if(a!=null && ep!=null) ep.setAdapter(a);
-
- return new CTypeRef(target.getContentType(),decl);
- }
-
- protected void toElementRef(CReferencePropertyInfo prop) {
- prop.getElements().add(target);
- }
-
- protected RawTypeSet.Mode canBeType(RawTypeSet parent) {
- // if element substitution can occur, no way it can be mapped to a list of types
- if(decl.getSubstitutables().size()>1)
- return RawTypeSet.Mode.MUST_BE_REFERENCE;
- // BIXSubstitutable also simulates this effect. Useful for separate compilation
- BIXSubstitutable subst = builder.getBindInfo(decl).get(BIXSubstitutable.class);
- if(subst!=null) {
- subst.markAsAcknowledged();
- return RawTypeSet.Mode.MUST_BE_REFERENCE;
- }
-
- // we have no place to put an adater if this thing maps to a type
- CElementPropertyInfo p = target.getProperty();
- // if we have an adapter or IDness, which requires special
- // annotation, and there's more than one element,
- // we have no place to put the special annotation, so we need JAXBElement.
- if((parent.refs.size()>1 || !parent.mul.isAtMostOnce()) && p.id()!=ID.NONE)
- return RawTypeSet.Mode.MUST_BE_REFERENCE;
- if(parent.refs.size() > 1 && p.getAdapter() != null)
- return RawTypeSet.Mode.MUST_BE_REFERENCE;
-
- if(target.hasClass())
- // if the CElementInfo was explicitly bound to a class (which happen if and only if
- // the user requested so, then map that to reference property so that the user sees a class
- return RawTypeSet.Mode.CAN_BE_TYPEREF;
- else
- return RawTypeSet.Mode.SHOULD_BE_TYPEREF;
- }
-
- protected boolean isListOfValues() {
- return target.getProperty().isValueList();
- }
-
- protected ID id() {
- return target.getProperty().id();
- }
-
- @Override
- protected MimeType getExpectedMimeType() {
- return target.getProperty().getExpectedMimeType();
- }
- }
-
- /**
- * References to a type. Could be global or local.
- */
- public static final class XmlTypeRef extends RawTypeSet.Ref {
- private final XSElementDecl decl;
- private final TypeUse target;
-
- public XmlTypeRef(XSElementDecl decl) {
- this.decl = decl;
- SimpleTypeBuilder stb = Ring.get(SimpleTypeBuilder.class);
- stb.refererStack.push(decl);
- TypeUse r = Ring.get(ClassSelector.class).bindToType(decl.getType(),decl);
- stb.refererStack.pop();
- target = r;
- }
-
- protected CTypeRef toTypeRef(CElementPropertyInfo ep) {
- if(ep!=null && target.getAdapterUse()!=null)
- ep.setAdapter(target.getAdapterUse());
- return new CTypeRef(target.getInfo(),decl);
- }
-
- /**
- * The whole type set can be later bound to a reference property,
- * in which case we need to generate additional code to wrap this
- * type reference into an element class.
- *
- * This method generates such an element class and returns it.
- */
- protected void toElementRef(CReferencePropertyInfo prop) {
- CClassInfo scope = Ring.get(ClassSelector.class).getCurrentBean();
- Model model = Ring.get(Model.class);
-
- CCustomizations custs = Ring.get(BGMBuilder.class).getBindInfo(decl).toCustomizationList();
-
- if(target instanceof CClassInfo && Ring.get(BIGlobalBinding.class).isSimpleMode()) {
- CClassInfo bean = new CClassInfo(model,scope,
- model.getNameConverter().toClassName(decl.getName()),
- decl.getLocator(), null, BGMBuilder.getName(decl), decl,
- custs);
- bean.setBaseClass((CClassInfo)target);
- prop.getElements().add(bean);
- } else {
- CElementInfo e = new CElementInfo(model,BGMBuilder.getName(decl),scope,target,
- decl.getDefaultValue(), decl, custs, decl.getLocator());
- prop.getElements().add(e);
- }
- }
-
- protected RawTypeSet.Mode canBeType(RawTypeSet parent) {
- // if we have an adapter or IDness, which requires special
- // annotation, and there's more than one element,
- // we have no place to put the special annotation, so we need JAXBElement.
- if((parent.refs.size()>1 || !parent.mul.isAtMostOnce()) && target.idUse()!=ID.NONE)
- return RawTypeSet.Mode.MUST_BE_REFERENCE;
- if(parent.refs.size() > 1 && target.getAdapterUse() != null)
- return RawTypeSet.Mode.MUST_BE_REFERENCE;
-
- // nillable and optional at the same time. needs an element wrapper to distinguish those
- // two states. But this is not a hard requirement.
- if(decl.isNillable() && parent.mul.isOptional())
- return RawTypeSet.Mode.CAN_BE_TYPEREF;
-
- return RawTypeSet.Mode.SHOULD_BE_TYPEREF;
- }
-
- protected boolean isListOfValues() {
- return target.isCollection();
- }
-
- protected ID id() {
- return target.idUse();
- }
-
- @Override
- protected MimeType getExpectedMimeType() {
- return target.getExpectedMimeType();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/RefererFinder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/RefererFinder.java
deleted file mode 100644
index 274c808a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/RefererFinder.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.Collections;
-
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-
-/**
- * Finds which {@link XSComponent}s refer to which {@link XSComplexType}s.
- *
- * @author Kohsuke Kawaguchi
- */
-final class RefererFinder implements XSVisitor {
- private final Set<Object> visited = new HashSet<Object>();
-
- private final Map<XSComponent,Set<XSComponent>> referers = new HashMap<XSComponent,Set<XSComponent>>();
-
- public Set<XSComponent> getReferer(XSComponent src) {
- Set<XSComponent> r = referers.get(src);
- if(r==null) return Collections.emptySet();
- return r;
- }
-
-
- public void schemaSet(XSSchemaSet xss) {
- if(!visited.add(xss)) return;
-
- for (XSSchema xs : xss.getSchemas()) {
- schema(xs);
- }
- }
-
- public void schema(XSSchema xs) {
- if(!visited.add(xs)) return;
-
- for (XSComplexType ct : xs.getComplexTypes().values()) {
- complexType(ct);
- }
-
- for (XSElementDecl e : xs.getElementDecls().values()) {
- elementDecl(e);
- }
- }
-
- public void elementDecl(XSElementDecl e) {
- if(!visited.add(e)) return;
-
- refer(e,e.getType());
- e.getType().visit(this);
- }
-
- public void complexType(XSComplexType ct) {
- if(!visited.add(ct)) return;
-
- refer(ct,ct.getBaseType());
- ct.getBaseType().visit(this);
- ct.getContentType().visit(this);
- }
-
- public void modelGroupDecl(XSModelGroupDecl decl) {
- if(!visited.add(decl)) return;
-
- modelGroup(decl.getModelGroup());
- }
-
- public void modelGroup(XSModelGroup group) {
- if(!visited.add(group)) return;
-
- for (XSParticle p : group.getChildren()) {
- particle(p);
- }
- }
-
- public void particle(XSParticle particle) {
- // since the particle method is side-effect free, no need to check for double-visit.
- particle.getTerm().visit(this);
- }
-
-
- // things we don't care
- public void simpleType(XSSimpleType simpleType) {}
- public void annotation(XSAnnotation ann) {}
- public void attGroupDecl(XSAttGroupDecl decl) {}
- public void attributeDecl(XSAttributeDecl decl) {}
- public void attributeUse(XSAttributeUse use) {}
- public void facet(XSFacet facet) {}
- public void notation(XSNotation notation) {}
- public void identityConstraint(XSIdentityConstraint decl) {}
- public void xpath(XSXPath xp) {}
- public void wildcard(XSWildcard wc) {}
- public void empty(XSContentType empty) {}
-
- /**
- * Called for each reference to record the fact.
- *
- * So far we only care about references to types.
- */
- private void refer(XSComponent source, XSType target) {
- Set<XSComponent> r = referers.get(target);
- if(r==null) {
- r = new HashSet<XSComponent>();
- referers.put(target,r);
- }
- r.add(source);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/SimpleTypeBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/SimpleTypeBuilder.java
deleted file mode 100644
index 7ca5bad5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/SimpleTypeBuilder.java
+++ /dev/null
@@ -1,918 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.io.StringWriter;
-import java.math.BigInteger;
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Stack;
-
-import javax.activation.MimeTypeParseException;
-import javax.xml.bind.DatatypeConverter;
-
-import com.sun.codemodel.internal.JJavaName;
-import com.sun.codemodel.internal.util.JavadocEscapeWriter;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo;
-import com.sun.tools.internal.xjc.model.CClassInfo;
-import com.sun.tools.internal.xjc.model.CClassInfoParent;
-import com.sun.tools.internal.xjc.model.CClassRef;
-import com.sun.tools.internal.xjc.model.CEnumConstant;
-import com.sun.tools.internal.xjc.model.CEnumLeafInfo;
-import com.sun.tools.internal.xjc.model.CNonElement;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.model.TypeUseFactory;
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIConversion;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIEnum;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIEnumMember;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BindInfo;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.EnumMemberMode;
-import com.sun.tools.internal.xjc.util.MimeTypeRange;
-
-import static com.sun.xml.internal.bind.v2.WellKnownNamespace.XML_MIME_URI;
-
-import com.sun.xml.internal.bind.v2.runtime.SwaRefAdapterMarker;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSListSimpleType;
-import com.sun.xml.internal.xsom.XSRestrictionSimpleType;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSUnionSimpleType;
-import com.sun.xml.internal.xsom.XSVariety;
-import com.sun.xml.internal.xsom.impl.util.SchemaWriter;
-import com.sun.xml.internal.xsom.visitor.XSSimpleTypeFunction;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-
-import org.xml.sax.Locator;
-
-/**
- * Builds {@link TypeUse} from simple types.
- *
- * <p>
- * This code consists of two main portions. The {@link #compose(XSSimpleType)} method
- * and {@link #composer} forms an outer cycle, which gradually ascends the type
- * inheritance chain until it finds the suitable binding. When it does this
- * {@link #initiatingType} is set to the type which started binding, so that we can refer
- * to the actual constraint facets and such that are applicable on the type.
- *
- * <p>
- * For each intermediate type in the chain, the {@link #find(XSSimpleType)} method
- * is used to find the binding on that type, sine the outer loop is doing the ascending,
- * this method only sees if the current type has some binding available.
- *
- * <p>
- * There is at least one ugly code that you need to aware of
- * when you are modifying the code. See the documentation
- * about <a href="package.html#stref_cust">
- * "simple type customization at the point of reference."</a>
- *
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class SimpleTypeBuilder extends BindingComponent {
-
- protected final BGMBuilder builder = Ring.get(BGMBuilder.class);
-
- private final Model model = Ring.get(Model.class);
-
- /**
- * The component that is refering to the simple type
- * which we are building. This is ugly but necessary
- * to support the customization of simple types at
- * its point of reference. See my comment at the header
- * of this class for details.
- *
- * UGLY: Implemented as a Stack of XSComponent to fix a bug
- */
- public final Stack<XSComponent> refererStack = new Stack<XSComponent>();
-
- /**
- * Records what xmime:expectedContentTypes annotations we honored and processed,
- * so that we can later check if the user had these annotations in the places
- * where we didn't anticipate them.
- */
- private final Set<XSComponent> acknowledgedXmimeContentTypes = new HashSet<XSComponent>();
-
- /**
- * The type that was originally passed to this {@link SimpleTypeBuilder#build(XSSimpleType)}.
- * Never null.
- */
- private XSSimpleType initiatingType;
-
- /** {@link TypeUse}s for the built-in types. Read-only. */
- public static final Map<String,TypeUse> builtinConversions = new HashMap<String,TypeUse>();
-
-
- /**
- * Entry point from outside. Builds a BGM type expression
- * from a simple type schema component.
- *
- * @param type
- * the simple type to be bound.
- */
- public TypeUse build( XSSimpleType type ) {
- XSSimpleType oldi = initiatingType;
- this.initiatingType = type;
-
- TypeUse e = checkRefererCustomization(type);
- if(e==null)
- e = compose(type);
-
- initiatingType = oldi;
-
- return e;
- }
-
- /**
- * A version of the {@link #build(XSSimpleType)} method
- * used to bind the definition of a class generated from
- * the given simple type.
- */
- public TypeUse buildDef( XSSimpleType type ) {
- XSSimpleType oldi = initiatingType;
- this.initiatingType = type;
-
- TypeUse e = type.apply(composer);
-
- initiatingType = oldi;
-
- return e;
- }
-
-
- /**
- * Returns a javaType customization specified to the referer, if present.
- * @return can be null.
- */
- private BIConversion getRefererCustomization() {
- BindInfo info = builder.getBindInfo(getReferer());
- BIProperty prop = info.get(BIProperty.class);
- if(prop==null) return null;
- return prop.getConv();
- }
-
- public XSComponent getReferer() {
- return refererStack.peek();
- }
-
- /**
- * Checks if the referer has a conversion customization or not.
- * If it does, use it to bind this simple type. Otherwise
- * return null;
- */
- private TypeUse checkRefererCustomization( XSSimpleType type ) {
-
- // assertion check. referer must be set properly
- // before the build method is called.
- // since the handling of the simple type point-of-reference
- // customization is very error prone, it deserves a strict
- // assertion check.
- // UGLY CODE WARNING
- XSComponent top = getReferer();
-
- if( top instanceof XSElementDecl ) {
- // if the parent is element type, its content type must be us.
- XSElementDecl eref = (XSElementDecl)top;
- assert eref.getType()==type;
-
- // for elements, you can't use <property>,
- // so we allow javaType to appear directly.
- BindInfo info = builder.getBindInfo(top);
- BIConversion conv = info.get(BIConversion.class);
- if(conv!=null) {
- conv.markAsAcknowledged();
- // the conversion is given.
- return conv.getTypeUse(type);
- }
- detectJavaTypeCustomization();
- } else
- if( top instanceof XSAttributeDecl ) {
- XSAttributeDecl aref = (XSAttributeDecl)top;
- assert aref.getType()==type;
- detectJavaTypeCustomization();
- } else
- if( top instanceof XSComplexType ) {
- XSComplexType tref = (XSComplexType)top;
- assert tref.getBaseType()==type || tref.getContentType()==type;
- detectJavaTypeCustomization();
- } else
- if( top == type ) {
- // this means the simple type is built by itself and
- // not because it's referenced by something.
- } else
- // unexpected referer type.
- assert false;
-
- // now we are certain that the referer is OK.
- // see if it has a conversion customization.
- BIConversion conv = getRefererCustomization();
- if(conv!=null) {
- conv.markAsAcknowledged();
- // the conversion is given.
- return conv.getTypeUse(type);
- } else
- // not found
- return null;
- }
-
- /**
- * Detect "javaType" customizations placed directly on simple types, rather
- * than being enclosed by "property" and "baseType" customizations (see
- * sec 6.8.1 of the spec).
- *
- * Report an error if any exist.
- */
- private void detectJavaTypeCustomization() {
- BindInfo info = builder.getBindInfo(getReferer());
- BIConversion conv = info.get(BIConversion.class);
-
- if( conv != null ) {
- // ack this conversion to prevent further error messages
- conv.markAsAcknowledged();
-
- // report the error
- getErrorReporter().error( conv.getLocation(),
- Messages.ERR_UNNESTED_JAVATYPE_CUSTOMIZATION_ON_SIMPLETYPE );
- }
- }
-
- /**
- * Recursively decend the type inheritance chain to find a binding.
- */
- TypeUse compose( XSSimpleType t ) {
- TypeUse e = find(t);
- if(e!=null) return e;
- return t.apply(composer);
- }
-
- public final XSSimpleTypeFunction<TypeUse> composer = new XSSimpleTypeFunction<TypeUse>() {
-
- public TypeUse listSimpleType(XSListSimpleType type) {
- // bind item type individually and then compose them into a list
- // facets on the list shouldn't be taken account when binding item types,
- // so weed to call build(), not compose().
- XSSimpleType itemType = type.getItemType();
- refererStack.push(itemType);
- TypeUse tu = TypeUseFactory.makeCollection(build(type.getItemType()));
- refererStack.pop();
- return tu;
- }
-
- public TypeUse unionSimpleType(XSUnionSimpleType type) {
- boolean isCollection = false;
- for( int i=0; i<type.getMemberSize(); i++ )
- if(type.getMember(i).getVariety()==XSVariety.LIST || type.getMember(i).getVariety()==XSVariety.UNION) {
- isCollection = true;
- break;
- }
-
- TypeUse r = CBuiltinLeafInfo.STRING;
- if(isCollection)
- r = TypeUseFactory.makeCollection(r);
- return r;
- }
-
- public TypeUse restrictionSimpleType(XSRestrictionSimpleType type) {
- // just process the base type.
- return compose(type.getSimpleBaseType());
- }
- };
-
-
- /**
- * Checks if there's any binding available on the given type.
- *
- * @return
- * null if not (which causes the {@link #compose(XSSimpleType)} method
- * to do ascending.
- */
- private TypeUse find( XSSimpleType type ) {
- TypeUse r;
- boolean noAutoEnum = false;
-
- // check for user specified conversion
- BindInfo info = builder.getBindInfo(type);
- BIConversion conv = info.get(BIConversion.class);
-
- if( conv!=null ) {
- // a conversion was found
- conv.markAsAcknowledged();
- return conv.getTypeUse(type);
- }
-
- // look for enum customization, which is another user specified conversion
- BIEnum en = info.get(BIEnum.class);
- if( en!=null ) {
- en.markAsAcknowledged();
-
- if(!en.isMapped()) {
- noAutoEnum = true;
- } else {
- // if an enum customization is specified, make sure
- // the type is OK
- if( !canBeMappedToTypeSafeEnum(type) ) {
- getErrorReporter().error( en.getLocation(),
- Messages.ERR_CANNOT_BE_TYPE_SAFE_ENUM );
- getErrorReporter().error( type.getLocator(),
- Messages.ERR_CANNOT_BE_TYPE_SAFE_ENUM_LOCATION );
- // recover by ignoring this customization
- return null;
- }
-
- // reference?
- if(en.ref!=null) {
- if(!JJavaName.isFullyQualifiedClassName(en.ref)) {
- Ring.get(ErrorReceiver.class).error( en.getLocation(),
- Messages.format(Messages.ERR_INCORRECT_CLASS_NAME, en.ref) );
- // recover by ignoring @ref
- return null;
- }
-
- return new CClassRef(model, type, en, info.toCustomizationList() );
- }
-
- // list and union cannot be mapped to a type-safe enum,
- // so in this stage we can safely cast it to XSRestrictionSimpleType
- return bindToTypeSafeEnum( (XSRestrictionSimpleType)type,
- en.className, en.javadoc, en.members,
- getEnumMemberMode().getModeWithEnum(),
- en.getLocation() );
- }
- }
-
-
- // if the type is built in, look for the default binding
- if(type.getTargetNamespace().equals(WellKnownNamespace.XML_SCHEMA)) {
- String name = type.getName();
- if(name!=null) {
- r = lookupBuiltin(name);
- if(r!=null)
- return r;
- }
- }
-
- // also check for swaRef
- if(type.getTargetNamespace().equals(WellKnownNamespace.SWA_URI)) {
- String name = type.getName();
- if(name!=null && name.equals("swaRef"))
- return CBuiltinLeafInfo.STRING.makeAdapted(SwaRefAdapterMarker.class,false);
- }
-
-
- // see if this type should be mapped to a type-safe enumeration by default.
- // if so, built a EnumXDucer from it and return it.
- if(type.isRestriction() && !noAutoEnum) {
- XSRestrictionSimpleType rst = type.asRestriction();
- if(shouldBeMappedToTypeSafeEnumByDefault(rst)) {
- r = bindToTypeSafeEnum(rst,null,null, Collections.<String, BIEnumMember>emptyMap(),
- getEnumMemberMode(),null);
- if(r!=null)
- return r;
- }
- }
-
- return (CNonElement)getClassSelector()._bindToClass(type,null,false);
- }
-
- private static Set<XSRestrictionSimpleType> reportedEnumMemberSizeWarnings;
-
- /**
- * Returns true if a type-safe enum should be created from
- * the given simple type by default without an explicit &lt;jaxb:enum> customization.
- */
- private boolean shouldBeMappedToTypeSafeEnumByDefault( XSRestrictionSimpleType type ) {
-
- // if not, there will be a problem wrt the class name of this type safe enum type.
- if( type.isLocal() ) return false;
-
- // if redefined, we should map the new definition, not the old one.
- if( type.getRedefinedBy()!=null ) return false;
-
- List<XSFacet> facets = type.getDeclaredFacets(XSFacet.FACET_ENUMERATION);
- if( facets.isEmpty() )
- // if the type itself doesn't have the enumeration facet,
- // it won't be mapped to a type-safe enum.
- return false;
-
- if(facets.size() > builder.getGlobalBinding().getDefaultEnumMemberSizeCap()) {
- // if there are too many facets, it's not very useful
- // produce warning when simple type is not mapped to enum
- // see issue https://jaxb.dev.java.net/issues/show_bug.cgi?id=711
-
- if(reportedEnumMemberSizeWarnings == null)
- reportedEnumMemberSizeWarnings = new HashSet<XSRestrictionSimpleType>();
-
- if(!reportedEnumMemberSizeWarnings.contains(type)) {
- getErrorReporter().warning(type.getLocator(), Messages.WARN_ENUM_MEMBER_SIZE_CAP,
- type.getName(), facets.size(), builder.getGlobalBinding().getDefaultEnumMemberSizeCap());
-
- reportedEnumMemberSizeWarnings.add(type);
- }
-
- return false;
- }
-
- if( !canBeMappedToTypeSafeEnum(type) )
- // we simply can't map this to an enumeration
- return false;
-
- // check for collisions among constant names. if a collision will happen,
- // don't try to bind it to an enum.
-
- // return true only when this type is derived from one of the "enum base type".
- for( XSSimpleType t = type; t!=null; t=t.getSimpleBaseType() )
- if( t.isGlobal() && builder.getGlobalBinding().canBeMappedToTypeSafeEnum(t) )
- return true;
-
- return false;
- }
-
-
- private static final Set<String> builtinTypeSafeEnumCapableTypes;
-
- static {
- Set<String> s = new HashSet<String>();
-
- // see a bullet of 6.5.1 of the spec.
- String[] typeNames = new String[] {
- "string", "boolean", "float", "decimal", "double", "anyURI"
- };
- s.addAll(Arrays.asList(typeNames));
-
- builtinTypeSafeEnumCapableTypes = Collections.unmodifiableSet(s);
- }
-
-
- /**
- * Returns true if the given simple type can be mapped to a
- * type-safe enum class.
- *
- * <p>
- * JAXB spec places a restrictrion as to what type can be
- * mapped to a type-safe enum. This method enforces this
- * constraint.
- */
- public static boolean canBeMappedToTypeSafeEnum( XSSimpleType type ) {
- do {
- if( WellKnownNamespace.XML_SCHEMA.equals(type.getTargetNamespace()) ) {
- // type must be derived from one of these types
- String localName = type.getName();
- if( localName!=null ) {
- if( localName.equals("anySimpleType") )
- return false; // catch all case
- if( localName.equals("ID") || localName.equals("IDREF") )
- return false; // not ID/IDREF
-
- // other allowed list
- if( builtinTypeSafeEnumCapableTypes.contains(localName) )
- return true;
- }
- }
-
- type = type.getSimpleBaseType();
- } while( type!=null );
-
- return false;
- }
-
-
-
- /**
- * Builds a type-safe enum conversion from a simple type
- * with enumeration facets.
- *
- * @param className
- * The class name of the type-safe enum. Or null to
- * create a default name.
- * @param javadoc
- * Additional javadoc that will be added at the beginning of the
- * class, or null if none is necessary.
- * @param members
- * A map from enumeration values (as String) to BIEnumMember objects.
- * if some of the value names need to be overrided.
- * Cannot be null, but the map may not contain entries
- * for all enumeration values.
- * @param loc
- * The source location where the above customizations are
- * specified, or null if none is available.
- */
- private TypeUse bindToTypeSafeEnum( XSRestrictionSimpleType type,
- String className, String javadoc, Map<String,BIEnumMember> members,
- EnumMemberMode mode, Locator loc ) {
-
- if( loc==null ) // use the location of the simple type as the default
- loc = type.getLocator();
-
- if( className==null ) {
- // infer the class name. For this to be possible,
- // the simple type must be a global one.
- if( !type.isGlobal() ) {
- getErrorReporter().error( loc, Messages.ERR_NO_ENUM_NAME_AVAILABLE );
- // recover by returning a meaningless conversion
- return CBuiltinLeafInfo.STRING;
- }
- className = type.getName();
- }
-
- // we apply name conversion in any case
- className = builder.deriveName(className,type);
-
- {// compute Javadoc
- StringWriter out = new StringWriter();
- SchemaWriter sw = new SchemaWriter(new JavadocEscapeWriter(out));
- type.visit((XSVisitor)sw);
-
- if(javadoc!=null) javadoc += "\n\n";
- else javadoc = "";
-
- javadoc += Messages.format( Messages.JAVADOC_HEADING, type.getName() )
- +"\n<p>\n<pre>\n"+out.getBuffer()+"</pre>";
-
- }
-
- // build base type
- refererStack.push(type.getSimpleBaseType());
- TypeUse use = build(type.getSimpleBaseType());
- refererStack.pop();
-
- if(use.isCollection())
- return null; // can't bind a list to enum constant
-
- CNonElement baseDt = use.getInfo(); // for now just ignore that case
-
- if(baseDt instanceof CClassInfo)
- return null; // can't bind to an enum if the base is a class, since we don't have the value constrctor
-
- // if the member names collide, re-generate numbered constant names.
- XSFacet[] errorRef = new XSFacet[1];
- List<CEnumConstant> memberList = buildCEnumConstants(type, false, members, errorRef);
- if(memberList==null || checkMemberNameCollision(memberList)!=null) {
- switch(mode) {
- case SKIP:
- // abort
- return null;
- case ERROR:
- // error
- if(memberList==null) {
- getErrorReporter().error( errorRef[0].getLocator(),
- Messages.ERR_CANNOT_GENERATE_ENUM_NAME,
- errorRef[0].getValue() );
- } else {
- CEnumConstant[] collision = checkMemberNameCollision(memberList);
- getErrorReporter().error( collision[0].getLocator(),
- Messages.ERR_ENUM_MEMBER_NAME_COLLISION,
- collision[0].getName() );
- getErrorReporter().error( collision[1].getLocator(),
- Messages.ERR_ENUM_MEMBER_NAME_COLLISION_RELATED );
- }
- return null; // recover from error
- case GENERATE:
- // generate
- memberList = buildCEnumConstants(type,true,members,null);
- break;
- }
- }
- if(memberList.isEmpty()) {
- getErrorReporter().error( loc, Messages.ERR_NO_ENUM_FACET );
- return null;
- }
-
- // use the name of the simple type as the name of the class.
- CClassInfoParent scope;
- if(type.isGlobal())
- scope = new CClassInfoParent.Package(getClassSelector().getPackage(type.getTargetNamespace()));
- else
- scope = getClassSelector().getClassScope();
- CEnumLeafInfo xducer = new CEnumLeafInfo( model, BGMBuilder.getName(type), scope,
- className, baseDt, memberList, type,
- builder.getBindInfo(type).toCustomizationList(), loc );
- xducer.javadoc = javadoc;
-
- BIConversion conv = new BIConversion.Static( type.getLocator(),xducer);
- conv.markAsAcknowledged();
-
- // attach this new conversion object to this simple type
- // so that successive look up will use the same object.
- builder.getOrCreateBindInfo(type).addDecl(conv);
-
- return conv.getTypeUse(type);
- }
-
- /**
- *
- * @param errorRef
- * if constant names couldn't be generated, return a reference to that enum facet.
- * @return
- * null if unable to generate names for some of the constants.
- */
- private List<CEnumConstant> buildCEnumConstants(XSRestrictionSimpleType type, boolean needsToGenerateMemberName, Map<String, BIEnumMember> members, XSFacet[] errorRef) {
- List<CEnumConstant> memberList = new ArrayList<CEnumConstant>();
- int idx=1;
- Set<String> enums = new HashSet<String>(); // to avoid duplicates. See issue #366
-
- for( XSFacet facet : type.getDeclaredFacets(XSFacet.FACET_ENUMERATION)) {
- String name=null;
- String mdoc=builder.getBindInfo(facet).getDocumentation();
-
- if(!enums.add(facet.getValue().value))
- continue; // ignore the 2nd occasion
-
- if( needsToGenerateMemberName ) {
- // generate names for all member names.
- // this will even override names specified by the user. that's crazy.
- name = "VALUE_"+(idx++);
- } else {
- String facetValue = facet.getValue().value;
- BIEnumMember mem = members.get(facetValue);
- if( mem==null )
- // look at the one attached to the facet object
- mem = builder.getBindInfo(facet).get(BIEnumMember.class);
-
- if (mem!=null) {
- name = mem.name;
- if (mdoc == null) {
- mdoc = mem.javadoc;
- }
- }
-
- if(name==null) {
- StringBuilder sb = new StringBuilder();
- for( int i=0; i<facetValue.length(); i++) {
- char ch = facetValue.charAt(i);
- if(Character.isJavaIdentifierPart(ch))
- sb.append(ch);
- else
- sb.append('_');
- }
- name = model.getNameConverter().toConstantName(sb.toString());
- }
- }
-
- if(!JJavaName.isJavaIdentifier(name)) {
- if(errorRef!=null) errorRef[0] = facet;
- return null; // unable to generate a name
- }
-
- memberList.add(new CEnumConstant(name,mdoc,facet.getValue().value,facet,builder.getBindInfo(facet).toCustomizationList(),facet.getLocator()));
- }
- return memberList;
- }
-
- /**
- * Returns non-null if {@link CEnumConstant}s have name collisions among them.
- *
- * @return
- * if there's a collision, return two {@link CEnumConstant}s that collided.
- * otherwise return null.
- */
- private CEnumConstant[] checkMemberNameCollision( List<CEnumConstant> memberList ) {
- Map<String,CEnumConstant> names = new HashMap<String,CEnumConstant>();
- for (CEnumConstant c : memberList) {
- CEnumConstant old = names.put(c.getName(),c);
- if(old!=null)
- // collision detected
- return new CEnumConstant[]{old,c};
- }
- return null;
- }
-
-
-
- private EnumMemberMode getEnumMemberMode() {
- return builder.getGlobalBinding().getEnumMemberMode();
- }
-
- private TypeUse lookupBuiltin( String typeLocalName ) {
- if(typeLocalName.equals("integer") || typeLocalName.equals("long")) {
- /*
- attempt an optimization so that we can
- improve the binding for types like this:
-
- <simpleType>
- <restriciton baseType="integer">
- <maxInclusive value="100" />
- </
- </
-
- ... to int, not BigInteger.
- */
-
- BigInteger xe = readFacet(XSFacet.FACET_MAXEXCLUSIVE,-1);
- BigInteger xi = readFacet(XSFacet.FACET_MAXINCLUSIVE,0);
- BigInteger max = min(xe,xi); // most restrictive one takes precedence
-
- if(max!=null) {
- BigInteger ne = readFacet(XSFacet.FACET_MINEXCLUSIVE,+1);
- BigInteger ni = readFacet(XSFacet.FACET_MININCLUSIVE,0);
- BigInteger min = max(ne,ni);
-
- if(min!=null) {
- if(min.compareTo(INT_MIN )>=0 && max.compareTo(INT_MAX )<=0)
- typeLocalName = "int";
- else
- if(min.compareTo(LONG_MIN)>=0 && max.compareTo(LONG_MAX)<=0)
- typeLocalName = "long";
- }
- }
- } else
- if(typeLocalName.equals("boolean") && isRestrictedTo0And1()) {
- // this is seen in the SOAP schema and too common to ignore
- return CBuiltinLeafInfo.BOOLEAN_ZERO_OR_ONE;
- } else
- if(typeLocalName.equals("base64Binary")) {
- return lookupBinaryTypeBinding();
- } else
- if(typeLocalName.equals("anySimpleType")) {
- if(getReferer() instanceof XSAttributeDecl || getReferer() instanceof XSSimpleType)
- return CBuiltinLeafInfo.STRING;
- else
- return CBuiltinLeafInfo.ANYTYPE;
- }
- return builtinConversions.get(typeLocalName);
- }
-
- /**
- * Decides the way xs:base64Binary binds.
- *
- * This method checks the expected media type.
- */
- private TypeUse lookupBinaryTypeBinding() {
- XSComponent referer = getReferer();
- String emt = referer.getForeignAttribute(XML_MIME_URI, Const.EXPECTED_CONTENT_TYPES);
- if(emt!=null) {
- acknowledgedXmimeContentTypes.add(referer);
- try {
- // see http://www.xml.com/lpt/a/2004/07/21/dive.html
- List<MimeTypeRange> types = MimeTypeRange.parseRanges(emt);
- MimeTypeRange mt = MimeTypeRange.merge(types);
-
- // see spec table I-1 in appendix I section 2.1.1 for bindings
- if(mt.majorType.equalsIgnoreCase("image"))
- return CBuiltinLeafInfo.IMAGE.makeMimeTyped(mt.toMimeType());
-
- if(( mt.majorType.equalsIgnoreCase("application") || mt.majorType.equalsIgnoreCase("text"))
- && isXml(mt.subType))
- return CBuiltinLeafInfo.XML_SOURCE.makeMimeTyped(mt.toMimeType());
-
- if((mt.majorType.equalsIgnoreCase("text") && (mt.subType.equalsIgnoreCase("plain")) )) {
- return CBuiltinLeafInfo.STRING.makeMimeTyped(mt.toMimeType());
- }
-
- return CBuiltinLeafInfo.DATA_HANDLER.makeMimeTyped(mt.toMimeType());
- } catch (ParseException e) {
- getErrorReporter().error( referer.getLocator(),
- Messages.format(Messages.ERR_ILLEGAL_EXPECTED_MIME_TYPE,emt, e.getMessage()) );
- // recover by using the default
- } catch (MimeTypeParseException e) {
- getErrorReporter().error( referer.getLocator(),
- Messages.format(Messages.ERR_ILLEGAL_EXPECTED_MIME_TYPE,emt, e.getMessage()) );
- }
- }
- // default
- return CBuiltinLeafInfo.BASE64_BYTE_ARRAY;
- }
-
- public boolean isAcknowledgedXmimeContentTypes(XSComponent c) {
- return acknowledgedXmimeContentTypes.contains(c);
- }
-
- /**
- * Returns true if the specified sub-type is an XML type.
- */
- private boolean isXml(String subType) {
- return subType.equals("xml") || subType.endsWith("+xml");
- }
-
- /**
- * Returns true if the {@link #initiatingType} is restricted
- * to '0' and '1'. This logic is not complete, but it at least
- * finds the such definition in SOAP @mustUnderstand.
- */
- private boolean isRestrictedTo0And1() {
- XSFacet pattern = initiatingType.getFacet(XSFacet.FACET_PATTERN);
- if(pattern!=null) {
- String v = pattern.getValue().value;
- if(v.equals("0|1") || v.equals("1|0") || v.equals("\\d"))
- return true;
- }
- XSFacet enumf = initiatingType.getFacet(XSFacet.FACET_ENUMERATION);
- if(enumf!=null) {
- String v = enumf.getValue().value;
- if(v.equals("0") || v.equals("1"))
- return true;
- }
- return false;
- }
-
- private BigInteger readFacet(String facetName,int offset) {
- XSFacet me = initiatingType.getFacet(facetName);
- if(me==null)
- return null;
- BigInteger bi = DatatypeConverter.parseInteger(me.getValue().value);
- if(offset!=0)
- bi = bi.add(BigInteger.valueOf(offset));
- return bi;
- }
-
- private BigInteger min(BigInteger a, BigInteger b) {
- if(a==null) return b;
- if(b==null) return a;
- return a.min(b);
- }
-
- private BigInteger max(BigInteger a, BigInteger b) {
- if(a==null) return b;
- if(b==null) return a;
- return a.max(b);
- }
-
- private static final BigInteger LONG_MIN = BigInteger.valueOf(Long.MIN_VALUE);
- private static final BigInteger LONG_MAX = BigInteger.valueOf(Long.MAX_VALUE);
- private static final BigInteger INT_MIN = BigInteger.valueOf(Integer.MIN_VALUE);
- private static final BigInteger INT_MAX = BigInteger.valueOf(Integer.MAX_VALUE);
-
- static {
- // list of datatypes which have built-in conversions.
- // note that although xs:token and xs:normalizedString are not
- // specified in the spec, they need to be here because they
- // have different whitespace normalization semantics.
- Map<String,TypeUse> m = builtinConversions;
-
- // TODO: this is so dumb
- m.put("string", CBuiltinLeafInfo.STRING);
- m.put("anyURI", CBuiltinLeafInfo.STRING);
- m.put("boolean", CBuiltinLeafInfo.BOOLEAN);
- // we'll also look at the expected media type, so don't just add this to the map
- // m.put("base64Binary", CBuiltinLeafInfo.BASE64_BYTE_ARRAY);
- m.put("hexBinary", CBuiltinLeafInfo.HEXBIN_BYTE_ARRAY);
- m.put("float", CBuiltinLeafInfo.FLOAT);
- m.put("decimal", CBuiltinLeafInfo.BIG_DECIMAL);
- m.put("integer", CBuiltinLeafInfo.BIG_INTEGER);
- m.put("long", CBuiltinLeafInfo.LONG);
- m.put("unsignedInt", CBuiltinLeafInfo.LONG);
- m.put("int", CBuiltinLeafInfo.INT);
- m.put("unsignedShort", CBuiltinLeafInfo.INT);
- m.put("short", CBuiltinLeafInfo.SHORT);
- m.put("unsignedByte", CBuiltinLeafInfo.SHORT);
- m.put("byte", CBuiltinLeafInfo.BYTE);
- m.put("double", CBuiltinLeafInfo.DOUBLE);
- m.put("QName", CBuiltinLeafInfo.QNAME);
- m.put("NOTATION", CBuiltinLeafInfo.QNAME);
- m.put("dateTime", CBuiltinLeafInfo.CALENDAR);
- m.put("date", CBuiltinLeafInfo.CALENDAR);
- m.put("time", CBuiltinLeafInfo.CALENDAR);
- m.put("gYearMonth", CBuiltinLeafInfo.CALENDAR);
- m.put("gYear", CBuiltinLeafInfo.CALENDAR);
- m.put("gMonthDay", CBuiltinLeafInfo.CALENDAR);
- m.put("gDay", CBuiltinLeafInfo.CALENDAR);
- m.put("gMonth", CBuiltinLeafInfo.CALENDAR);
- m.put("duration", CBuiltinLeafInfo.DURATION);
- m.put("token", CBuiltinLeafInfo.TOKEN);
- m.put("normalizedString",CBuiltinLeafInfo.NORMALIZED_STRING);
- m.put("ID", CBuiltinLeafInfo.ID);
- m.put("IDREF", CBuiltinLeafInfo.IDREF);
- // TODO: handling dateTime, time, and date type
-// String[] names = {
-// "date", "dateTime", "time", "hexBinary" };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/UnusedCustomizationChecker.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/UnusedCustomizationChecker.java
deleted file mode 100644
index 973a8b92..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/UnusedCustomizationChecker.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIDeclaration;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttContainer;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSListSimpleType;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSRestrictionSimpleType;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSUnionSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.visitor.XSSimpleTypeVisitor;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-
-/**
- * Reports all unacknowledged customizations as errors.
- *
- * <p>
- * Since we scan the whole content tree, we use this to check for unused
- * <tt>xmime:expectedContentTypes</tt> attributes. TODO: if we find this kind of error checks more
- * common, use the visitors so that we don't have to mix everything in one class.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-class UnusedCustomizationChecker extends BindingComponent implements XSVisitor, XSSimpleTypeVisitor {
- private final BGMBuilder builder = Ring.get(BGMBuilder.class);
- private final SimpleTypeBuilder stb = Ring.get(SimpleTypeBuilder.class);
-
- private final Set<XSComponent> visitedComponents = new HashSet<XSComponent>();
-
- /**
- * Runs the check.
- */
- void run() {
- for( XSSchema s : Ring.get(XSSchemaSet.class).getSchemas() ) {
- schema(s);
- run( s.getAttGroupDecls() );
- run( s.getAttributeDecls() );
- run( s.getComplexTypes() );
- run( s.getElementDecls() );
- run( s.getModelGroupDecls() );
- run( s.getNotations() );
- run( s.getSimpleTypes() );
- }
- }
-
- private void run( Map<String,? extends XSComponent> col ) {
- for( XSComponent c : col.values() )
- c.visit(this);
- }
-
-
- /**
- * Checks unused customizations on this component
- * and returns true if this is the first time this
- * component is checked.
- */
- private boolean check( XSComponent c ) {
- if( !visitedComponents.add(c) )
- return false; // already processed
-
- for( BIDeclaration decl : builder.getBindInfo(c).getDecls() )
- check(decl, c);
-
- checkExpectedContentTypes(c);
-
- return true;
- }
-
- private void checkExpectedContentTypes(XSComponent c) {
- if(c.getForeignAttribute(WellKnownNamespace.XML_MIME_URI, Const.EXPECTED_CONTENT_TYPES)==null)
- return; // no such attribute
- if(c instanceof XSParticle)
- return; // particles get the same foreign attributes as local element decls,
- // so we need to skip them
-
- if(!stb.isAcknowledgedXmimeContentTypes(c)) {
- // this is not used
- getErrorReporter().warning(c.getLocator(),Messages.WARN_UNUSED_EXPECTED_CONTENT_TYPES);
- }
- }
-
- private void check(BIDeclaration decl, XSComponent c) {
- if( !decl.isAcknowledged() ) {
- getErrorReporter().error(
- decl.getLocation(),
- Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION,
- decl.getName().getLocalPart()
- );
- getErrorReporter().error(
- c.getLocator(),
- Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION_LOCATION);
- // mark it as acknowledged to avoid
- // duplicated error messages.
- decl.markAsAcknowledged();
- }
- for (BIDeclaration d : decl.getChildren())
- check(d,c);
- }
-
-
- public void annotation(XSAnnotation ann) {}
-
- public void attGroupDecl(XSAttGroupDecl decl) {
- if(check(decl))
- attContainer(decl);
- }
-
- public void attributeDecl(XSAttributeDecl decl) {
- if(check(decl))
- decl.getType().visit((XSSimpleTypeVisitor)this);
- }
-
- public void attributeUse(XSAttributeUse use) {
- if(check(use))
- use.getDecl().visit(this);
- }
-
- public void complexType(XSComplexType type) {
- if(check(type)) {
- // don't need to check the base type -- it must be global, thus
- // it is covered already
- type.getContentType().visit(this);
- attContainer(type);
- }
- }
-
- private void attContainer( XSAttContainer cont ) {
- for( Iterator itr = cont.iterateAttGroups(); itr.hasNext(); )
- ((XSAttGroupDecl)itr.next()).visit(this);
-
- for( Iterator itr = cont.iterateDeclaredAttributeUses(); itr.hasNext(); )
- ((XSAttributeUse)itr.next()).visit(this);
-
- XSWildcard wc = cont.getAttributeWildcard();
- if(wc!=null) wc.visit(this);
- }
-
- public void schema(XSSchema schema) {
- check(schema);
- }
-
- public void facet(XSFacet facet) {
- check(facet);
- }
-
- public void notation(XSNotation notation) {
- check(notation);
- }
-
- public void wildcard(XSWildcard wc) {
- check(wc);
- }
-
- public void modelGroupDecl(XSModelGroupDecl decl) {
- if(check(decl))
- decl.getModelGroup().visit(this);
- }
-
- public void modelGroup(XSModelGroup group) {
- if(check(group)) {
- for( int i=0; i<group.getSize(); i++ )
- group.getChild(i).visit(this);
- }
- }
-
- public void elementDecl(XSElementDecl decl) {
- if(check(decl)) {
- decl.getType().visit(this);
- for( XSIdentityConstraint id : decl.getIdentityConstraints() )
- id.visit(this);
- }
- }
-
- public void simpleType(XSSimpleType simpleType) {
- if(check(simpleType))
- simpleType.visit( (XSSimpleTypeVisitor)this );
- }
-
- public void particle(XSParticle particle) {
- if(check(particle))
- particle.getTerm().visit(this);
- }
-
- public void empty(XSContentType empty) {
- check(empty);
- }
-
- public void listSimpleType(XSListSimpleType type) {
- if(check(type))
- type.getItemType().visit((XSSimpleTypeVisitor)this);
- }
-
- public void restrictionSimpleType(XSRestrictionSimpleType type) {
- if(check(type))
- type.getBaseType().visit(this);
- }
-
- public void unionSimpleType(XSUnionSimpleType type) {
- if(check(type)) {
- for( int i=0; i<type.getMemberSize(); i++ )
- type.getMember(i).visit((XSSimpleTypeVisitor)this);
- }
- }
-
- public void identityConstraint(XSIdentityConstraint id) {
- if(check(id)) {
- id.getSelector().visit(this);
- for( XSXPath xp : id.getFields() )
- xp.visit(this);
- }
- }
-
- public void xpath(XSXPath xp) {
- check(xp);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/WildcardNameClassBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/WildcardNameClassBuilder.java
deleted file mode 100644
index 708be621..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/WildcardNameClassBuilder.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema;
-
-import java.util.Iterator;
-
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.visitor.XSWildcardFunction;
-
-import com.sun.xml.internal.rngom.nc.AnyNameExceptNameClass;
-import com.sun.xml.internal.rngom.nc.ChoiceNameClass;
-import com.sun.xml.internal.rngom.nc.NameClass;
-import com.sun.xml.internal.rngom.nc.NsNameClass;
-
-/**
- * Builds a name class representation of a wildcard.
- *
- * <p>
- * Singleton. Use the build method to create a NameClass.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class WildcardNameClassBuilder implements XSWildcardFunction<NameClass> {
- private WildcardNameClassBuilder() {}
-
- private static final XSWildcardFunction<NameClass> theInstance =
- new WildcardNameClassBuilder();
-
- public static NameClass build( XSWildcard wc ) {
- return wc.apply(theInstance);
- }
-
- public NameClass any(XSWildcard.Any wc) {
- return NameClass.ANY;
- }
-
- public NameClass other(XSWildcard.Other wc) {
- return new AnyNameExceptNameClass(
- new ChoiceNameClass(
- new NsNameClass(""),
- new NsNameClass(wc.getOtherNamespace())));
- }
-
- public NameClass union(XSWildcard.Union wc) {
- NameClass nc = null;
- for (Iterator itr = wc.iterateNamespaces(); itr.hasNext();) {
- String ns = (String) itr.next();
-
- if(nc==null) nc = new NsNameClass(ns);
- else
- nc = new ChoiceNameClass(nc,new NsNameClass(ns));
- }
-
- // there should be at least one.
- assert nc!=null;
-
- return nc;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/AbstractDeclarationImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/AbstractDeclarationImpl.java
deleted file mode 100644
index 50008904..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/AbstractDeclarationImpl.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
-import com.sun.xml.internal.bind.annotation.XmlLocation;
-import com.sun.xml.internal.xsom.XSComponent;
-
-import org.xml.sax.Locator;
-
-/**
- * Abstract partial implementation of {@link BIDeclaration}
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-abstract class AbstractDeclarationImpl implements BIDeclaration {
-
- @Deprecated // eventually delete this in favor of using JAXB
- protected AbstractDeclarationImpl(Locator loc) {
- this.loc = loc;
- }
-
- protected AbstractDeclarationImpl() {}
-
-
- @XmlLocation
- Locator loc; // set by JAXB
- public Locator getLocation() { return loc; }
-
- protected BindInfo parent;
- public void setParent(BindInfo p) { this.parent=p; }
-
- protected final XSComponent getOwner() {
- return parent.getOwner();
- }
- protected final BGMBuilder getBuilder() {
- return parent.getBuilder();
- }
- protected final JCodeModel getCodeModel() {
- return Ring.get(JCodeModel.class);
- }
-
-
- private boolean isAcknowledged = false;
-
- public final boolean isAcknowledged() { return isAcknowledged; }
-
- public void onSetOwner() {
- }
-
- public Collection<BIDeclaration> getChildren() {
- return Collections.emptyList();
- }
-
- public void markAsAcknowledged() {
- isAcknowledged = true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/AnnotationParserFactoryImpl.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/AnnotationParserFactoryImpl.java
deleted file mode 100644
index 9997e065..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/AnnotationParserFactoryImpl.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.UnmarshallerHandler;
-import javax.xml.bind.helpers.DefaultValidationEventHandler;
-import javax.xml.validation.ValidatorHandler;
-
-import com.sun.tools.internal.xjc.Options;
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.xml.internal.xsom.parser.AnnotationContext;
-import com.sun.xml.internal.xsom.parser.AnnotationParser;
-import com.sun.xml.internal.xsom.parser.AnnotationParserFactory;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * Implementation of XSOM {@link AnnotationParserFactory} that
- * parses JAXB customization declarations.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class AnnotationParserFactoryImpl implements AnnotationParserFactory {
- public AnnotationParserFactoryImpl(Options opts) {
- this.options=opts;
- }
-
- private final Options options;
- /**
- * Lazily created validator, so that the schema for binding won't be
- * prepared unless absolutely necessary.
- */
- private ValidatorHandler validator;
-
- public AnnotationParser create() {
- return new AnnotationParser() {
- private Unmarshaller u = BindInfo.getCustomizationUnmarshaller();
-
- private UnmarshallerHandler handler;
-
- public ContentHandler getContentHandler(
- AnnotationContext context, String parentElementName,
- final ErrorHandler errorHandler, EntityResolver entityResolver ) {
-
- // return a ContentHandler that validates the customization and also
- // parses them into the internal structure.
- if(handler!=null)
- // interface contract violation.
- // this method will be called only once.
- throw new AssertionError();
-
- if(options.debugMode)
- try {
- u.setEventHandler(new DefaultValidationEventHandler());
- } catch (JAXBException e) {
- throw new AssertionError(e); // ridiculous!
- }
-
- handler = u.getUnmarshallerHandler();
-
- // configure so that the validator will receive events for JAXB islands
- return new ForkingFilter(handler) {
- @Override
- public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
- super.startElement(uri, localName, qName, atts);
- if((uri.equals(Const.JAXB_NSURI) || uri.equals(Const.XJC_EXTENSION_URI))
- && getSideHandler()==null) {
- // set up validator
- if(validator==null)
- validator = BindInfo.bindingFileSchema.newValidator();
- validator.setErrorHandler(errorHandler);
- startForking(uri,localName,qName,atts,new ValidatorProtecter(validator));
- }
-
- // check for xmime:expectedContentTypes attributes in annotations and report them
- for( int i=atts.getLength()-1; i>=0; i-- ) {
- if(atts.getURI(i).equals(WellKnownNamespace.XML_MIME_URI)
- && atts.getLocalName(i).equals(Const.EXPECTED_CONTENT_TYPES))
- errorHandler.warning(new SAXParseException(
- com.sun.tools.internal.xjc.reader.xmlschema.Messages.format(
- com.sun.tools.internal.xjc.reader.xmlschema.Messages.WARN_UNUSED_EXPECTED_CONTENT_TYPES),
- getDocumentLocator()
- ));
- }
- }
- };
- }
-
- public BindInfo getResult( Object existing ) {
- if(handler==null)
- // interface contract violation.
- // the getContentHandler method must have been called.
- throw new AssertionError();
-
- try {
- BindInfo result = (BindInfo)handler.getResult();
-
- if(existing!=null) {
- BindInfo bie = (BindInfo)existing;
- bie.absorb(result);
- return bie;
- } else {
- if(!result.isPointless())
- return result; // just annotation. no meaningful customization
- else
- return null;
- }
- } catch (JAXBException e) {
- throw new AssertionError(e);
- }
- }
- };
- }
-
- private static final class ValidatorProtecter extends XMLFilterImpl {
- public ValidatorProtecter(ContentHandler h) {
- setContentHandler(h);
- }
-
- @Override
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
- // work around a bug in the validator implementation in Tiger
- super.startPrefixMapping(prefix.intern(),uri);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIClass.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIClass.java
deleted file mode 100644
index 7b0475e2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIClass.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import com.sun.istack.internal.Nullable;
-
-/**
- * Class declaration.
- *
- * This customization turns arbitrary schema component into a Java
- * content interface.
- *
- * <p>
- * This customization is acknowledged by the ClassSelector.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-@XmlRootElement(name="class")
-public final class BIClass extends AbstractDeclarationImpl {
- protected BIClass() {
- }
-
- @XmlAttribute(name="name")
- private String className;
-
- /**
- * Gets the specified class name, or null if not specified.
- * (Not a fully qualified name.)
- *
- * @return
- * Returns a class name. The caller should <em>NOT</em>
- * apply XML-to-Java name conversion to the name
- * returned from this method.
- */
- public @Nullable String getClassName() {
- if( className==null ) return null;
-
- BIGlobalBinding gb = getBuilder().getGlobalBinding();
- NameConverter nc = getBuilder().model.getNameConverter();
-
- if(gb.isJavaNamingConventionEnabled()) return nc.toClassName(className);
- else
- // don't change it
- return className;
- }
-
- @XmlAttribute(name="implClass")
- private String userSpecifiedImplClass;
-
- /**
- * Gets the fully qualified name of the
- * user-specified implementation class, if any.
- * Or null.
- */
- public String getUserSpecifiedImplClass() {
- return userSpecifiedImplClass;
- }
-
- @XmlAttribute(name="ref")
- private String ref;
-
- @XmlAttribute(name="recursive", namespace=Const.XJC_EXTENSION_URI)
- private String recursive;
-
- /**
- * Reference to the existing class, or null.
- * Fully qualified name.
- *
- * <p>
- * Caller needs to perform error check on this.
- */
- public String getExistingClassRef() {
- return ref;
- }
-
- public String getRecursive() {
- return recursive;
- }
-
- @XmlElement
- private String javadoc;
- /**
- * Gets the javadoc comment specified in the customization.
- * Can be null if none is specified.
- */
- public String getJavadoc() { return javadoc; }
-
- public QName getName() { return NAME; }
-
- public void setParent(BindInfo p) {
- super.setParent(p);
- // if this specifies a reference to external class,
- // then it's OK even if noone actually refers this class.
- if(ref!=null)
- markAsAcknowledged();
- }
-
- /** Name of this declaration. */
- public static final QName NAME = new QName( Const.JAXB_NSURI, "class" );
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIConversion.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIConversion.java
deleted file mode 100644
index f89c9ef7..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIConversion.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.DatatypeConverter;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JClassAlreadyExistsException;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JExpr;
-import com.sun.codemodel.internal.JExpression;
-import com.sun.codemodel.internal.JMethod;
-import com.sun.codemodel.internal.JMod;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.codemodel.internal.JType;
-import com.sun.codemodel.internal.JVar;
-import com.sun.codemodel.internal.JConditional;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.model.CAdapter;
-import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.model.TypeUseFactory;
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.TypeUtil;
-import com.sun.tools.internal.xjc.reader.xmlschema.ClassSelector;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.xsom.XSSimpleType;
-
-import org.xml.sax.Locator;
-
-/**
- * Conversion declaration.
- *
- * <p>
- * A conversion declaration specifies how an XML type gets mapped
- * to a Java type.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class BIConversion extends AbstractDeclarationImpl {
- @Deprecated
- public BIConversion( Locator loc ) {
- super(loc);
- }
-
- protected BIConversion() {
- }
-
- /**
- * Gets the {@link TypeUse} object that this conversion represents.
- * <p>
- * The returned {@link TypeUse} object is properly adapted.
- *
- * @param owner
- * A {@link BIConversion} is always associated with one
- * {@link XSSimpleType}, but that's not always available
- * when a {@link BIConversion} is built. So we pass this
- * as a parameter to this method.
- */
- public abstract TypeUse getTypeUse( XSSimpleType owner );
-
- public QName getName() { return NAME; }
-
- /** Name of the conversion declaration. */
- public static final QName NAME = new QName(
- Const.JAXB_NSURI, "conversion" );
-
- /**
- * Implementation that returns a statically-determined constant {@link TypeUse}.
- */
- public static final class Static extends BIConversion {
- /**
- * Always non-null.
- */
- private final TypeUse transducer;
-
- public Static(Locator loc, TypeUse transducer) {
- super(loc);
- this.transducer = transducer;
- }
-
- public TypeUse getTypeUse(XSSimpleType owner) {
- return transducer;
- }
- }
-
- /**
- * User-specified &lt;javaType> customization.
- *
- * The parse/print methods are allowed to be null,
- * and their default values are determined based on the
- * owner of the token.
- */
- @XmlRootElement(name="javaType")
- public static class User extends BIConversion {
- @XmlAttribute
- private String parseMethod;
- @XmlAttribute
- private String printMethod;
- @XmlAttribute(name="name")
- private String type = "java.lang.String";
-
- /**
- * If null, computed from {@link #type}.
- * Sometimes this can be set instead of {@link #type}.
- */
- private JType inMemoryType;
-
- public User(Locator loc, String parseMethod, String printMethod, JType inMemoryType) {
- super(loc);
- this.parseMethod = parseMethod;
- this.printMethod = printMethod;
- this.inMemoryType = inMemoryType;
- }
-
- public User() {
- }
-
- /**
- * Cache used by {@link #getTypeUse(XSSimpleType)} to improve the performance.
- */
- private TypeUse typeUse;
-
- public TypeUse getTypeUse(XSSimpleType owner) {
- if(typeUse!=null)
- return typeUse;
-
- JCodeModel cm = getCodeModel();
-
- if(inMemoryType==null)
- inMemoryType = TypeUtil.getType(cm,type,Ring.get(ErrorReceiver.class),getLocation());
-
- JDefinedClass adapter = generateAdapter(parseMethodFor(owner),printMethodFor(owner),owner);
-
- // XmlJavaType customization always converts between string and an user-defined type.
- typeUse = TypeUseFactory.adapt(CBuiltinLeafInfo.STRING,new CAdapter(adapter));
-
- return typeUse;
- }
-
- /**
- * generate the adapter class.
- */
- private JDefinedClass generateAdapter(String parseMethod, String printMethod,XSSimpleType owner) {
- JDefinedClass adapter = null;
-
- int id = 1;
- while(adapter==null) {
- try {
- JPackage pkg = Ring.get(ClassSelector.class).getClassScope().getOwnerPackage();
- adapter = pkg._class("Adapter"+id);
- } catch (JClassAlreadyExistsException e) {
- // try another name in search for an unique name.
- // this isn't too efficient, but we expect people to usually use
- // a very small number of adapters.
- id++;
- }
- }
-
- JClass bim = inMemoryType.boxify();
-
- adapter._extends(getCodeModel().ref(XmlAdapter.class).narrow(String.class).narrow(bim));
-
- JMethod unmarshal = adapter.method(JMod.PUBLIC, bim, "unmarshal");
- JVar $value = unmarshal.param(String.class, "value");
-
- JExpression inv;
-
- if( parseMethod.equals("new") ) {
- // "new" indicates that the constructor of the target type
- // will do the unmarshalling.
-
- // RESULT: new <type>()
- inv = JExpr._new(bim).arg($value);
- } else {
- int idx = parseMethod.lastIndexOf('.');
- if(idx<0) {
- // parseMethod specifies the static method of the target type
- // which will do the unmarshalling.
-
- // because of an error check at the constructor,
- // we can safely assume that this cast works.
- inv = bim.staticInvoke(parseMethod).arg($value);
- } else {
- inv = JExpr.direct(parseMethod+"(value)");
- }
- }
- unmarshal.body()._return(inv);
-
-
- JMethod marshal = adapter.method(JMod.PUBLIC, String.class, "marshal");
- $value = marshal.param(bim,"value");
-
- if(printMethod.startsWith("javax.xml.bind.DatatypeConverter.")) {
- // UGLY: if this conversion is the system-driven conversion,
- // check for null
- marshal.body()._if($value.eq(JExpr._null()))._then()._return(JExpr._null());
- }
-
- int idx = printMethod.lastIndexOf('.');
- if(idx<0) {
- // printMethod specifies a method in the target type
- // which performs the serialization.
-
- // RESULT: <value>.<method>()
- inv = $value.invoke(printMethod);
-
- // check value is not null ... if(value == null) return null;
- JConditional jcon = marshal.body()._if($value.eq(JExpr._null()));
- jcon._then()._return(JExpr._null());
- } else {
- // RESULT: <className>.<method>(<value>)
- if(this.printMethod==null) {
- // HACK HACK HACK
- JType t = inMemoryType.unboxify();
- inv = JExpr.direct(printMethod+"(("+findBaseConversion(owner).toLowerCase()+")("+t.fullName()+")value)");
- } else
- inv = JExpr.direct(printMethod+"(value)");
- }
- marshal.body()._return(inv);
-
- return adapter;
- }
-
- private String printMethodFor(XSSimpleType owner) {
- if(printMethod!=null) return printMethod;
-
- if(inMemoryType.unboxify().isPrimitive()) {
- String method = getConversionMethod("print",owner);
- if(method!=null)
- return method;
- }
-
- return "toString";
- }
-
- private String parseMethodFor(XSSimpleType owner) {
- if(parseMethod!=null) return parseMethod;
-
- if(inMemoryType.unboxify().isPrimitive()) {
- String method = getConversionMethod("parse", owner);
- if(method!=null) {
- // this cast is necessary for conversion between primitive Java types
- return '('+inMemoryType.unboxify().fullName()+')'+method;
- }
- }
-
- return "new";
- }
-
- private static final String[] knownBases = new String[]{
- "Float", "Double", "Byte", "Short", "Int", "Long", "Boolean"
- };
-
- private String getConversionMethod(String methodPrefix, XSSimpleType owner) {
- String bc = findBaseConversion(owner);
- if(bc==null) return null;
-
- return DatatypeConverter.class.getName()+'.'+methodPrefix+bc;
- }
-
- private String findBaseConversion(XSSimpleType owner) {
- // find the base simple type mapping.
- for( XSSimpleType st=owner; st!=null; st = st.getSimpleBaseType() ) {
- if( !WellKnownNamespace.XML_SCHEMA.equals(st.getTargetNamespace()) )
- continue; // user-defined type
-
- String name = st.getName().intern();
- for( String s : knownBases )
- if(name.equalsIgnoreCase(s))
- return s;
- }
-
- return null;
- }
-
- public QName getName() { return NAME; }
-
- /** Name of the conversion declaration. */
- public static final QName NAME = new QName(
- Const.JAXB_NSURI, "javaType" );
- }
-
- @XmlRootElement(name="javaType",namespace=Const.XJC_EXTENSION_URI)
- public static class UserAdapter extends BIConversion {
- @XmlAttribute(name="name")
- private String type = null;
-
- @XmlAttribute
- private String adapter = null;
-
- private TypeUse typeUse;
-
- public TypeUse getTypeUse(XSSimpleType owner) {
- if(typeUse!=null)
- return typeUse;
-
- JCodeModel cm = getCodeModel();
-
- JDefinedClass a;
- try {
- a = cm._class(adapter);
- a.hide(); // we assume this is given by the user
- a._extends(cm.ref(XmlAdapter.class).narrow(String.class).narrow(
- cm.ref(type)));
- } catch (JClassAlreadyExistsException e) {
- a = e.getExistingClass();
- }
-
- // TODO: it's not correct to say that it adapts from String,
- // but OTOH I don't think we can compute that.
- typeUse = TypeUseFactory.adapt(
- CBuiltinLeafInfo.STRING,
- new CAdapter(a));
-
- return typeUse;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIDeclaration.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIDeclaration.java
deleted file mode 100644
index 866e0288..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIDeclaration.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import java.util.Collection;
-
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
-
-import org.xml.sax.Locator;
-
-/**
- * Base interface for all binding customization declarations.
- *
- * <p>
- * Because of the setParent method, one customization declaration
- * can be attached to one component alone.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface BIDeclaration {
-
- /**
- * Sets the parent BindInfo object of this declaration.
- * A declaration object can use this pointer to access
- * context information, such as other customizations.
- *
- * <p>
- * This method can be only called from {@link BindInfo},
- * and only once. This is a good opportunity to do some
- * follow-up initialization after JAXB unmarshalling
- * populated {@link BIDeclaration}.
- */
- void setParent( BindInfo parent );
-
- /**
- * Gets the name of this binding declaration,
- * which is the same as the tag name of the binding element.
- */
- QName getName();
-
- /**
- * Gets the source location where this declaration was written.
- * For declarations that are generated by XJC itself,
- * this method returns null.
- */
- Locator getLocation();
-
- /**
- * Marks this declaration to be acknowledged -- either actually
- * used or the existence is admitted (for example when
- * a property customization is given at the point of definition.)
- *
- * <p>
- * Declarations that are not acknowledged will be considered
- * as an error.
- */
- void markAsAcknowledged();
-
- /**
- * Checks if this declaration was acknowledged.
- */
- boolean isAcknowledged();
-
- /**
- * Called when the parent {@link BindInfo} got its owner set.
- *
- * This is when declarations are connected to {@link BGMBuilder} and
- * its sibling components.
- */
- void onSetOwner();
-
- /**
- * Gets child {@link BIDeclaration}s if any.
- *
- * @return
- * can be empty but always non-null. read-only.
- */
- Collection<BIDeclaration> getChildren();
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIDom.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIDom.java
deleted file mode 100644
index cfbf2c56..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIDom.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.reader.Const;
-
-/**
- * DOM customization.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-@XmlRootElement(name="dom")
-public class BIDom extends AbstractDeclarationImpl {
-
- // unsupported yet
- @XmlAttribute
- String type;
-
- public final QName getName() { return NAME; }
-
- /** Name of the conversion declaration. */
- public static final QName NAME = new QName(Const.JAXB_NSURI,"dom");
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIEnum.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIEnum.java
deleted file mode 100644
index d701739d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIEnum.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.tools.internal.xjc.reader.xmlschema.SimpleTypeBuilder;
-
-/**
- * Enumeration customization.
- * <p>
- * This customization binds a simple type to a type-safe enum class.
- * The actual binding process takes place in {@link SimpleTypeBuilder}.
- *
- * <p>
- * This customization is acknowledged by {@link SimpleTypeBuilder}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-@XmlRootElement(name="typesafeEnumClass")
-public final class BIEnum extends AbstractDeclarationImpl {
-
- /**
- * If false, it means not to bind to a type-safe enum.
- *
- * this takes precedence over all the other properties of this class.
- */
- @XmlAttribute(name="map")
- private boolean map = true;
-
- /** Gets the specified class name, or null if not specified. */
- @XmlAttribute(name="name")
- public String className = null;
-
- /**
- * @see BIClass#getExistingClassRef()
- */
- @XmlAttribute(name="ref")
- public String ref;
-
- /**
- * Gets the javadoc comment specified in the customization.
- * Can be null if none is specified.
- */
- @XmlElement
- public final String javadoc = null;
-
- public boolean isMapped() {
- return map;
- }
-
- /**
- * Gets the map that contains XML value->BIEnumMember pairs.
- * This table is built from &lt;enumMember> customizations.
- *
- * Always return non-null.
- */
- @XmlTransient
- public final Map<String,BIEnumMember> members = new HashMap<String,BIEnumMember>();
-
- public QName getName() { return NAME; }
-
- public void setParent(BindInfo p) {
- super.setParent(p);
- for( BIEnumMember mem : members.values() )
- mem.setParent(p);
-
- // if this specifies a reference to external class,
- // then it's OK even if noone actually refers this class.
- if(ref!=null)
- markAsAcknowledged();
- }
-
- /** Name of this declaration. */
- public static final QName NAME = new QName(
- Const.JAXB_NSURI, "enum" );
-
- // setter method for JAXB runtime
- @XmlElement(name="typesafeEnumMember")
- private void setMembers(BIEnumMember2[] mems) {
- for (BIEnumMember2 e : mems)
- members.put(e.value,e);
- }
-
-
-
- /**
- * {@link BIEnumMember} used inside {@link BIEnum} has additional 'value' attribute.
- */
- static class BIEnumMember2 extends BIEnumMember {
- /**
- * The lexical representaion of the constant to which we are attaching.
- */
- @XmlAttribute(required=true)
- String value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIEnumMember.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIEnumMember.java
deleted file mode 100644
index be9f2672..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIEnumMember.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.reader.Const;
-
-/**
- * Enumeration member customization.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-@XmlRootElement(name="typesafeEnumMember")
-public class BIEnumMember extends AbstractDeclarationImpl {
- protected BIEnumMember() {
- name = null;
- javadoc = null;
- }
-
- /** Gets the specified class name, or null if not specified. */
- // regardless of the BIGlobalBinding.isJavaNamingConventionEnabled flag,
- // we don't modify the constant name.
- @XmlAttribute
- public final String name;
-
- /**
- * Gets the javadoc comment specified in the customization.
- * Can be null if none is specified.
- */
- @XmlElement
- public final String javadoc;
-
- public QName getName() { return NAME; }
-
- /** Name of this declaration. */
- public static final QName NAME = new QName(
- Const.JAXB_NSURI, "typesafeEnumMember" );
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIFactoryMethod.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIFactoryMethod.java
deleted file mode 100644
index 51ccfb54..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIFactoryMethod.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
-
-/**
- * Controls the <tt>ObjectFactory</tt> method name.
- *
- * @author Kohsuke Kawaguchi
- */
-@XmlRootElement(name="factoryMethod")
-public class BIFactoryMethod extends AbstractDeclarationImpl {
- @XmlAttribute
- public String name;
-
- /**
- * If the given component has {@link BIInlineBinaryData} customization,
- * reflect that to the specified property.
- */
- public static void handle(XSComponent source, CPropertyInfo prop) {
- BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class);
- if(inline!=null) {
- prop.inlineBinaryData = true;
- inline.markAsAcknowledged();
- }
- }
-
-
- public final QName getName() { return NAME; }
-
- /** Name of the declaration. */
- public static final QName NAME = new QName(Const.JAXB_NSURI,"factoryMethod");
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIGlobalBinding.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIGlobalBinding.java
deleted file mode 100644
index 91854cfb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIGlobalBinding.java
+++ /dev/null
@@ -1,577 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlEnumValue;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.ClassType;
-import com.sun.codemodel.internal.JClassAlreadyExistsException;
-import com.sun.codemodel.internal.JCodeModel;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.generator.bean.ImplStructureStrategy;
-import static com.sun.tools.internal.xjc.generator.bean.ImplStructureStrategy.BEAN_ONLY;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.SimpleTypeBuilder;
-import com.sun.tools.internal.xjc.util.ReadOnlyAdapter;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.xsom.XSDeclaration;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.XSSimpleType;
-
-/**
- * Global binding customization. The code is highly temporary.
- *
- * <p>
- * One of the information contained in a global customization
- * is the default binding for properties. This object contains a
- * BIProperty object to keep this information.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-@XmlRootElement(name="globalBindings")
-public final class BIGlobalBinding extends AbstractDeclarationImpl {
-
-
- /**
- * Gets the name converter that will govern the XML->Java
- * name conversion process for this compilation.
- *
- * <p>
- * The "underscoreBinding" customization will determine
- * the exact object returned from this method. The rest of XJC
- * should just use the NameConverter interface.
- *
- * <p>
- * Always non-null.
- */
- @XmlTransient
- public NameConverter nameConverter = NameConverter.standard;
-
- // JAXB will use this property to set nameConverter
- @XmlAttribute
- void setUnderscoreBinding( UnderscoreBinding ub ) {
- nameConverter = ub.nc;
- }
-
- UnderscoreBinding getUnderscoreBinding() {
- throw new IllegalStateException(); // no need for this
- }
-
- public JDefinedClass getSuperClass() {
- if(superClass==null) return null;
- return superClass.getClazz(ClassType.CLASS);
- }
-
- public JDefinedClass getSuperInterface() {
- if(superInterface==null) return null;
- return superInterface.getClazz(ClassType.INTERFACE);
- }
-
- public BIProperty getDefaultProperty() {
- return defaultProperty;
- }
-
- public boolean isJavaNamingConventionEnabled() {
- return isJavaNamingConventionEnabled;
- }
-
- public BISerializable getSerializable() {
- return serializable;
- }
-
- public boolean isGenerateElementClass() {
- return generateElementClass;
- }
-
- public boolean isGenerateMixedExtensions() {
- return generateMixedExtensions;
- }
-
- public boolean isChoiceContentPropertyEnabled() {
- return choiceContentProperty;
- }
-
- public int getDefaultEnumMemberSizeCap() {
- return defaultEnumMemberSizeCap;
- }
-
- public boolean isSimpleMode() {
- return simpleMode!=null;
- }
-
- public boolean isRestrictionFreshType() {
- return treatRestrictionLikeNewType !=null;
- }
-
- public EnumMemberMode getEnumMemberMode() {
- return generateEnumMemberName;
- }
-
- public boolean isSimpleTypeSubstitution() {
- return simpleTypeSubstitution;
- }
-
- public ImplStructureStrategy getCodeGenerationStrategy() {
- return codeGenerationStrategy;
- }
-
- public LocalScoping getFlattenClasses() {
- return flattenClasses;
- }
-
- /**
- * Performs error check
- */
- public void errorCheck() {
- ErrorReceiver er = Ring.get(ErrorReceiver.class);
- for (QName n : enumBaseTypes) {
- XSSchemaSet xs = Ring.get(XSSchemaSet.class);
- XSSimpleType st = xs.getSimpleType(n.getNamespaceURI(), n.getLocalPart());
- if(st==null) {
- er.error(loc,Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(n));
- continue;
- }
-
- if(!SimpleTypeBuilder.canBeMappedToTypeSafeEnum(st)) {
- er.error(loc,Messages.ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE.format(n));
- continue;
- }
- }
- }
-
- private static enum UnderscoreBinding {
- @XmlEnumValue("asWordSeparator")
- WORD_SEPARATOR(NameConverter.standard),
- @XmlEnumValue("asCharInWord")
- CHAR_IN_WORD(NameConverter.jaxrpcCompatible);
-
- final NameConverter nc;
-
- UnderscoreBinding(NameConverter nc) {
- this.nc = nc;
- }
- }
-
- /**
- * Returns true if the "isJavaNamingConventionEnabled" option is turned on.
- *
- * In this mode, the compiler is expected to apply XML-to-Java name
- * conversion algorithm even to names given by customizations.
- *
- * This method is intended to be called by other BIXXX classes.
- * The effect of this switch should be hidden inside this package.
- * IOW, the reader.xmlschema package shouldn't be aware of this switch.
- */
- @XmlAttribute(name="enableJavaNamingConventions")
- /*package*/ boolean isJavaNamingConventionEnabled = true;
-
- /**
- * True to generate classes for every simple type.
- */
- @XmlAttribute(name="mapSimpleTypeDef")
- boolean simpleTypeSubstitution = false;
-
- /**
- * Gets the default defaultProperty customization.
- */
- @XmlTransient
- private BIProperty defaultProperty;
-
- /*
- Three properties used to construct a default property
- */
- @XmlAttribute
- private boolean fixedAttributeAsConstantProperty = false;
- @XmlAttribute
- private CollectionTypeAttribute collectionType = new CollectionTypeAttribute();
- @XmlAttribute
- void setGenerateIsSetMethod(boolean b) {
- optionalProperty = b ? OptionalPropertyMode.ISSET : OptionalPropertyMode.WRAPPER;
- }
-
-
- /**
- * Returns true if the compiler needs to generate type-safe enum
- * member names when enumeration values cannot be used as constant names.
- */
- @XmlAttribute(name="typesafeEnumMemberName")
- EnumMemberMode generateEnumMemberName = EnumMemberMode.SKIP;
-
- /**
- * The code generation strategy.
- */
- @XmlAttribute(name="generateValueClass")
- ImplStructureStrategy codeGenerationStrategy = BEAN_ONLY;
-
- /**
- * Set of datatype names. For a type-safe enum class
- * to be generated, the underlying XML datatype must be derived from
- * one of the types in this set.
- */
- // default value is set in the post-init action
- @XmlAttribute(name="typesafeEnumBase")
- private Set<QName> enumBaseTypes;
-
- /**
- * Returns {@link BISerializable} if the extension is specified,
- * or null otherwise.
- */
- @XmlElement
- private BISerializable serializable = null;
-
- /**
- * If &lt;xjc:superClass> extension is specified,
- * returns the specified root class. Otherwise null.
- */
- @XmlElement(namespace=Const.XJC_EXTENSION_URI)
- ClassNameBean superClass = null;
-
- /**
- * If &lt;xjc:superInterface> extension is specified,
- * returns the specified root class. Otherwise null.
- */
- @XmlElement(namespace=Const.XJC_EXTENSION_URI)
- ClassNameBean superInterface = null;
-
- /**
- * Generate the simpler optimized code, but not necessarily
- * conforming to the spec.
- */
- @XmlElement(name="simple",namespace=Const.XJC_EXTENSION_URI)
- String simpleMode = null;
-
- /**
- * Handles complex type restriction as if it were a new type.
- */
- @XmlElement(name="treatRestrictionLikeNewType",namespace=Const.XJC_EXTENSION_URI)
- String treatRestrictionLikeNewType = null;
-
- /**
- * True to generate a class for elements by default.
- */
- @XmlAttribute
- boolean generateElementClass = false;
-
- @XmlAttribute
- boolean generateMixedExtensions = false;
-
- @XmlElement(namespace=Const.XJC_EXTENSION_URI)
- Boolean generateElementProperty = null;
-
- @XmlAttribute(name="generateElementProperty") // for JAXB unmarshaller
- private void setGenerateElementPropertyStd(boolean value) {
- generateElementProperty = value;
- }
-
- @XmlAttribute
- boolean choiceContentProperty = false;
-
- @XmlAttribute
- OptionalPropertyMode optionalProperty = OptionalPropertyMode.WRAPPER;
-
- /**
- * Default cap to the number of constants in the enum.
- * We won't attempt to produce a type-safe enum by default
- * if there are more enumeration facets than specified in this field.
- */
- @XmlAttribute(name="typesafeEnumMaxMembers")
- int defaultEnumMemberSizeCap = 256;
-
- /**
- * If true, interfaces/classes that are normally generated as a nested interface/class
- * will be generated into the package, allowing the generated classes to be flat.
- *
- * See <a href="http://monaco.sfbay/detail.jsf?cr=4969415">Bug 4969415</a> for the motivation.
- */
- @XmlAttribute(name="localScoping")
- LocalScoping flattenClasses = LocalScoping.NESTED;
-
- /**
- * Globally-defined conversion customizations.
- *
- * @see #setGlobalConversions
- */
- @XmlTransient
- private final Map<QName,BIConversion> globalConversions = new HashMap<QName, BIConversion>();
-
- // method for JAXB unmarshaller
- @XmlElement(name="javaType")
- private void setGlobalConversions(GlobalStandardConversion[] convs) {
- for (GlobalStandardConversion u : convs) {
- globalConversions.put(u.xmlType,u);
- }
- }
-
- @XmlElement(name="javaType",namespace=Const.XJC_EXTENSION_URI)
- private void setGlobalConversions2(GlobalVendorConversion[] convs) {
- for (GlobalVendorConversion u : convs) {
- globalConversions.put(u.xmlType,u);
- }
- }
-
- //
- // these customizations were valid in 1.0, but in 2.0 we don't
- // use them. OTOH, we don't want to issue an error for them,
- // so we just define a mapping and ignore the value.
- //
- @XmlElement(namespace=Const.XJC_EXTENSION_URI)
- String noMarshaller = null;
- @XmlElement(namespace=Const.XJC_EXTENSION_URI)
- String noUnmarshaller = null;
- @XmlElement(namespace=Const.XJC_EXTENSION_URI)
- String noValidator = null;
- @XmlElement(namespace=Const.XJC_EXTENSION_URI)
- String noValidatingUnmarshaller = null;
- @XmlElement(namespace=Const.XJC_EXTENSION_URI)
- TypeSubstitutionElement typeSubstitution = null;
-
- /**
- * Another 1.0 compatibility customization (but we accept it
- * and treat it as {@link #serializable})
- */
- @XmlElement(name="serializable",namespace=Const.XJC_EXTENSION_URI)
- void setXjcSerializable(BISerializable s) {
- this.serializable = s;
- }
-
-
-
- private static final class TypeSubstitutionElement {
- @XmlAttribute
- String type;
- }
-
- public void onSetOwner() {
- super.onSetOwner();
- // if one is given by options, use that
- NameConverter nc = Ring.get(Model.class).options.getNameConverter();
- if(nc!=null)
- nameConverter = nc;
- }
-
- /**
- * Creates a bind info object with the default values
- */
- public BIGlobalBinding() {
- }
-
- public void setParent(BindInfo parent) {
- super.setParent(parent);
- // fill in the remaining default values
- if(enumBaseTypes==null)
- enumBaseTypes = Collections.singleton(new QName(WellKnownNamespace.XML_SCHEMA,"string"));
-
- this.defaultProperty = new BIProperty(getLocation(),null,null,null,
- collectionType, fixedAttributeAsConstantProperty, optionalProperty, generateElementProperty );
- defaultProperty.setParent(parent); // don't forget to initialize the defaultProperty
- }
-
- /**
- * Moves global BIConversion to the right object.
- */
- public void dispatchGlobalConversions( XSSchemaSet schema ) {
- // also set parent to the global conversions
- for( Map.Entry<QName,BIConversion> e : globalConversions.entrySet() ) {
-
- QName name = e.getKey();
- BIConversion conv = e.getValue();
-
- XSSimpleType st = schema.getSimpleType(name.getNamespaceURI(),name.getLocalPart());
- if(st==null) {
- Ring.get(ErrorReceiver.class).error(
- getLocation(),
- Messages.ERR_UNDEFINED_SIMPLE_TYPE.format(name)
- );
- continue; // abort
- }
-
- getBuilder().getOrCreateBindInfo(st).addDecl(conv);
- }
- }
-
-
- /**
- * Checks if the given XML Schema built-in type can be mapped to
- * a type-safe enum class.
- *
- * @param typeName
- */
- public boolean canBeMappedToTypeSafeEnum( QName typeName ) {
- return enumBaseTypes.contains(typeName);
- }
-
- public boolean canBeMappedToTypeSafeEnum( String nsUri, String localName ) {
- return canBeMappedToTypeSafeEnum(new QName(nsUri,localName));
- }
-
- public boolean canBeMappedToTypeSafeEnum( XSDeclaration decl ) {
- return canBeMappedToTypeSafeEnum( decl.getTargetNamespace(), decl.getName() );
- }
-
-
- public QName getName() { return NAME; }
- public static final QName NAME = new QName(
- Const.JAXB_NSURI, "globalBindings" );
-
-
- /**
- * Used to unmarshal
- * <xmp>
- * <[element] name="className" />
- * </xmp>
- */
- static final class ClassNameBean {
- @XmlAttribute(required=true)
- String name;
-
- /**
- * Computed from {@link #name} on demand.
- */
- @XmlTransient
- JDefinedClass clazz;
-
- JDefinedClass getClazz(ClassType t) {
- if (clazz != null) return clazz;
- try {
- JCodeModel codeModel = Ring.get(JCodeModel.class);
- clazz = codeModel._class(name, t);
- clazz.hide();
- return clazz;
- } catch (JClassAlreadyExistsException e) {
- return e.getExistingClass();
- }
- }
- }
-
- static final class ClassNameAdapter extends ReadOnlyAdapter<ClassNameBean,String> {
- public String unmarshal(ClassNameBean bean) throws Exception {
- return bean.name;
- }
- }
-
- /**
- * Global &lt;jaxb:javaType>.
- */
- static final class GlobalStandardConversion extends BIConversion.User {
- @XmlAttribute
- QName xmlType;
-
- @Override
- public boolean equals(Object obj) {
- if(obj instanceof GlobalStandardConversion) {
- return ((GlobalStandardConversion)obj).xmlType.equals(xmlType);
- }
-
- return false;
- }
-
- @Override
- public int hashCode() {
- int hash = 7;
- hash = 73 * hash + (this.xmlType != null ? this.xmlType.hashCode() : 0);
- return hash;
- }
- }
-
- /**
- * Global &lt;xjc:javaType>.
- */
- static final class GlobalVendorConversion extends BIConversion.UserAdapter {
- @XmlAttribute
- QName xmlType;
-
- @Override
- public boolean equals(Object obj) {
- if(obj instanceof GlobalVendorConversion) {
- return ((GlobalVendorConversion)obj).xmlType.equals(xmlType);
- }
-
- return false;
- }
-
- @Override
- public int hashCode() {
- int hash = 7;
- hash = 73 * hash + (this.xmlType != null ? this.xmlType.hashCode() : 0);
- return hash;
- }
- }
-
- /* don't want to override equals to avoid overriding hashcode for this complex object, too */
- public boolean isEqual(BIGlobalBinding b) {
- boolean equal =
- this.isJavaNamingConventionEnabled == b.isJavaNamingConventionEnabled &&
- this.simpleTypeSubstitution == b.simpleTypeSubstitution &&
- this.fixedAttributeAsConstantProperty == b.fixedAttributeAsConstantProperty &&
- this.generateEnumMemberName == b.generateEnumMemberName &&
- this.codeGenerationStrategy == b.codeGenerationStrategy &&
- this.serializable == b.serializable &&
- this.superClass == b.superClass &&
- this.superInterface == b.superInterface &&
- this.generateElementClass == b.generateElementClass &&
- this.generateMixedExtensions == b.generateMixedExtensions &&
- this.generateElementProperty == b.generateElementProperty &&
- this.choiceContentProperty == b.choiceContentProperty &&
- this.optionalProperty == b.optionalProperty &&
- this.defaultEnumMemberSizeCap == b.defaultEnumMemberSizeCap &&
- this.flattenClasses == b.flattenClasses;
-
- if (!equal) return false;
-
- return isEqual(this.nameConverter, b.nameConverter) &&
- isEqual(this.noMarshaller, b.noMarshaller) &&
- isEqual(this.noUnmarshaller, b.noUnmarshaller) &&
- isEqual(this.noValidator, b.noValidator) &&
- isEqual(this.noValidatingUnmarshaller, b.noValidatingUnmarshaller) &&
- isEqual(this.typeSubstitution, b.typeSubstitution) &&
- isEqual(this.simpleMode, b.simpleMode) &&
- isEqual(this.enumBaseTypes, b.enumBaseTypes) &&
- isEqual(this.treatRestrictionLikeNewType, b.treatRestrictionLikeNewType) &&
- isEqual(this.globalConversions, b.globalConversions);
- }
-
- private boolean isEqual(Object a, Object b) {
- if (a != null) {
- return a.equals(b);
- }
- return (b == null);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.java
deleted file mode 100644
index f3da5a34..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIInlineBinaryData.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlInlineBinaryData;
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.xml.internal.xsom.XSComponent;
-
-/**
- * Generates {@link @XmlInlineBinaryData}.
- *
- * @author Kohsuke Kawaguchi
- */
-@XmlRootElement(name="inlineBinaryData")
-public class BIInlineBinaryData extends AbstractDeclarationImpl {
-
- /**
- * If the given component has {@link BIInlineBinaryData} customization,
- * reflect that to the specified property.
- */
- public static void handle(XSComponent source, CPropertyInfo prop) {
- BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class);
- if(inline!=null) {
- prop.inlineBinaryData = true;
- inline.markAsAcknowledged();
- }
- }
-
-
- public final QName getName() { return NAME; }
-
- /** Name of the declaration. */
- public static final QName NAME = new QName(Const.JAXB_NSURI,"inlineBinaryData");
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIProperty.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIProperty.java
deleted file mode 100644
index e5caba63..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIProperty.java
+++ /dev/null
@@ -1,754 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.namespace.QName;
-
-import com.sun.codemodel.internal.JJavaName;
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.generator.bean.field.FieldRenderer;
-import com.sun.tools.internal.xjc.generator.bean.field.FieldRendererFactory;
-import com.sun.tools.internal.xjc.generator.bean.field.IsSetFieldRenderer;
-import com.sun.tools.internal.xjc.model.CAttributePropertyInfo;
-import com.sun.tools.internal.xjc.model.CCustomizations;
-import com.sun.tools.internal.xjc.model.CElementPropertyInfo;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.CReferencePropertyInfo;
-import com.sun.tools.internal.xjc.model.CValuePropertyInfo;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.tools.internal.xjc.reader.RawTypeSet;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.TypeUtil;
-import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.util.XSFinder;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-
-import org.xml.sax.Locator;
-
-/**
- * Property customization.
- *
- * This customization turns an arbitrary schema component
- * into a Java property (some restrictions apply.)
- *
- * <p>
- * All the getter methods (such as <code>getBaseType</code> or
- * <code>getBindStyle</code>) honors the delegation chain of
- * property customization specified in the spec. Namely,
- * if two property customizations are attached to an attribute
- * use and an attribute decl, then anything unspecified in the
- * attribute use defaults to attribute decl.
- *
- * <p>
- * Property customizations are acknowledged
- * (1) when they are actually used, and
- * (2) when they are given at the component, which is mapped to a class.
- * (so-called "point of declaration" customization)
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-@XmlRootElement(name="property")
-public final class BIProperty extends AbstractDeclarationImpl {
-
- // can be null
- @XmlAttribute
- private String name = null;
-
- // can be null
- @XmlElement
- private String javadoc = null;
-
- // can be null
- @XmlElement
- private BaseTypeBean baseType = null;
-
- // TODO: report 'unsupported' error if this is true
- @XmlAttribute
- private boolean generateFailFastSetterMethod = false;
-
-
-
- public BIProperty(Locator loc, String _propName, String _javadoc,
- BaseTypeBean _baseType, CollectionTypeAttribute collectionType, Boolean isConst,
- OptionalPropertyMode optionalProperty, Boolean genElemProp) {
- super(loc);
-
- this.name = _propName;
- this.javadoc = _javadoc;
- this.baseType = _baseType;
- this.collectionType = collectionType;
- this.isConstantProperty = isConst;
- this.optionalProperty = optionalProperty;
- this.generateElementProperty = genElemProp;
- }
-
- protected BIProperty() {}
-
- @Override
- public Collection<BIDeclaration> getChildren() {
- BIConversion conv = getConv();
- if(conv==null)
- return super.getChildren();
- else
- return Collections.<BIDeclaration>singleton(conv);
- }
-
- public void setParent( BindInfo parent ) {
- super.setParent(parent);
- if(baseType!=null && baseType.conv!=null)
- baseType.conv.setParent(parent);
- }
-
-
-
- /**
- * Returns the customized property name.
- *
- * This method honors the "enableJavaNamingConvention" customization
- * and formats the property name accordingly if necessary.
- *
- * Thus the caller should <em>NOT</em> apply the XML-to-Java name
- * conversion algorithm to the value returned from this method.
- *
- * @param forConstant
- * If the property name is intended for a constant property name,
- * set to true. This will change the result
- *
- * @return
- * This method can return null if the customization doesn't
- * specify the name.
- */
- public String getPropertyName( boolean forConstant ) {
- if(name!=null) {
- BIGlobalBinding gb = getBuilder().getGlobalBinding();
- NameConverter nc = getBuilder().model.getNameConverter();
-
- if( gb.isJavaNamingConventionEnabled() && !forConstant )
- // apply XML->Java conversion
- return nc.toPropertyName(name);
- else
- return name; // ... or don't change the value
- }
- BIProperty next = getDefault();
- if(next!=null) return next.getPropertyName(forConstant);
- else return null;
- }
-
- /**
- * Gets the associated javadoc.
- *
- * @return
- * null if none is specfieid.
- */
- public String getJavadoc() {
- return javadoc;
- }
-
- // can be null
- public JType getBaseType() {
- if(baseType!=null && baseType.name!=null) {
- return TypeUtil.getType(getCodeModel(),
- baseType.name,
- Ring.get(ErrorReceiver.class),getLocation());
- }
- BIProperty next = getDefault();
- if(next!=null) return next.getBaseType();
- else return null;
- }
-
-
- // can be null
- @XmlAttribute
- private CollectionTypeAttribute collectionType = null;
-
- /**
- * Gets the realization of this field.
- * @return Always return non-null.
- */
- CollectionTypeAttribute getCollectionType() {
- if(collectionType!=null) return collectionType;
- return getDefault().getCollectionType();
- }
-
-
- @XmlAttribute
- private OptionalPropertyMode optionalProperty = null;
-
- // virtual property for @generateIsSetMethod
- @XmlAttribute
- void setGenerateIsSetMethod(boolean b) {
- optionalProperty = b ? OptionalPropertyMode.ISSET : OptionalPropertyMode.WRAPPER;
- }
-
- public OptionalPropertyMode getOptionalPropertyMode() {
- if(optionalProperty!=null) return optionalProperty;
- return getDefault().getOptionalPropertyMode();
- }
-
- // null if delegated
- @XmlAttribute
- private Boolean generateElementProperty = null;
- /**
- * If true, the property will automatically be a reference property.
- * (Talk about confusing names!)
- */
- private Boolean generateElementProperty() {
- if(generateElementProperty!=null) return generateElementProperty;
- BIProperty next = getDefault();
- if(next!=null) return next.generateElementProperty();
-
- return null;
- }
-
-
- // true, false, or null (which means the value should be inherited.)
- @XmlAttribute(name="fixedAttributeAsConstantProperty")
- private Boolean isConstantProperty;
- /**
- * Gets the inherited value of the "fixedAttrToConstantProperty" customization.
- *
- * <p>
- * Note that returning true from this method doesn't necessarily mean
- * that a property needs to be mapped to a constant property.
- * It just means that it's mapped to a constant property
- * <b>if an attribute use carries a fixed value.</b>
- *
- * <p>
- * I don't like this semantics but that's what the spec implies.
- */
- public boolean isConstantProperty() {
- if(isConstantProperty!=null) return isConstantProperty;
-
- BIProperty next = getDefault();
- if(next!=null) return next.isConstantProperty();
-
- // globalBinding always has true or false in this property,
- // so this can't happen
- throw new AssertionError();
- }
-
- public CValuePropertyInfo createValueProperty(String defaultName,boolean forConstant,
- XSComponent source,TypeUse tu, QName typeName) {
-
- markAsAcknowledged();
- constantPropertyErrorCheck();
-
- String name = getPropertyName(forConstant);
- if(name==null) {
- name = defaultName;
- if(tu.isCollection() && getBuilder().getGlobalBinding().isSimpleMode())
- name = JJavaName.getPluralForm(name);
- }
-
- CValuePropertyInfo prop = wrapUp(new CValuePropertyInfo(name, source, getCustomizations(source), source.getLocator(), tu, typeName), source);
- BIInlineBinaryData.handle(source, prop);
- return prop;
- }
-
- public CAttributePropertyInfo createAttributeProperty( XSAttributeUse use, TypeUse tu ) {
-
- boolean forConstant =
- getCustomization(use).isConstantProperty() &&
- use.getFixedValue()!=null;
-
- String name = getPropertyName(forConstant);
- if(name==null) {
- NameConverter conv = getBuilder().getNameConverter();
- if(forConstant)
- name = conv.toConstantName(use.getDecl().getName());
- else
- name = conv.toPropertyName(use.getDecl().getName());
- if(tu.isCollection() && getBuilder().getGlobalBinding().isSimpleMode())
- name = JJavaName.getPluralForm(name);
- }
-
- markAsAcknowledged();
- constantPropertyErrorCheck();
-
- return wrapUp(new CAttributePropertyInfo(name,use,getCustomizations(use),use.getLocator(),
- BGMBuilder.getName(use.getDecl()), tu,
- BGMBuilder.getName(use.getDecl().getType()), use.isRequired() ),use);
- }
-
- /**
- *
- *
- * @param defaultName
- * If the name is not customized, this name will be used
- * as the default. Note that the name conversion <b>MUST</b>
- * be applied before this method is called if necessary.
- * @param source
- * Source schema component from which a field is built.
- */
- public CElementPropertyInfo createElementProperty(String defaultName, boolean forConstant, XSParticle source,
- RawTypeSet types) {
-
- if(!types.refs.isEmpty())
- // if this property is empty, don't acknowleedge the customization
- // this allows pointless property customization to be reported as an error
- markAsAcknowledged();
- constantPropertyErrorCheck();
-
- String name = getPropertyName(forConstant);
- if(name==null)
- name = defaultName;
-
- CElementPropertyInfo prop = wrapUp(
- new CElementPropertyInfo(
- name, types.getCollectionMode(),
- types.id(),
- types.getExpectedMimeType(),
- source, getCustomizations(source),
- source.getLocator(), types.isRequired()),
- source);
-
- types.addTo(prop);
-
- BIInlineBinaryData.handle(source.getTerm(), prop);
- return prop;
- }
-
- public CReferencePropertyInfo createDummyExtendedMixedReferenceProperty(
- String defaultName, XSComponent source, RawTypeSet types) {
- return createReferenceProperty(
- defaultName,
- false,
- source,
- types,
- true,
- true,
- false,
- true);
- }
-
- public CReferencePropertyInfo createContentExtendedMixedReferenceProperty(
- String defaultName, XSComponent source, RawTypeSet types) {
- return createReferenceProperty(
- defaultName,
- false,
- source,
- types,
- true,
- false,
- true,
- true);
- }
-
- public CReferencePropertyInfo createReferenceProperty(
- String defaultName, boolean forConstant, XSComponent source,
- RawTypeSet types, boolean isMixed, boolean dummy, boolean content, boolean isMixedExtended) {
-
- if (types == null) { // this is a special case where we need to generate content because potential subtypes would need to be able to override what's store inside
- content = true;
- } else {
- if(!types.refs.isEmpty())
- // if this property is empty, don't acknowleedge the customization
- // this allows pointless property customization to be reported as an error
- markAsAcknowledged();
- }
- constantPropertyErrorCheck();
-
- String name = getPropertyName(forConstant);
- if(name==null)
- name = defaultName;
-
- CReferencePropertyInfo prop = wrapUp(
- new CReferencePropertyInfo(
- name,
- (types == null) ? true : types.getCollectionMode().isRepeated()||isMixed,
- (types == null) ? false : types.isRequired(),
- isMixed,
- source,
- getCustomizations(source), source.getLocator(), dummy, content, isMixedExtended),
- source);
- if (types != null) {
- types.addTo(prop);
- }
-
- BIInlineBinaryData.handle(source, prop);
- return prop;
- }
-
- public CPropertyInfo createElementOrReferenceProperty(
- String defaultName, boolean forConstant, XSParticle source,
- RawTypeSet types) {
-
- boolean generateRef;
-
- switch(types.canBeTypeRefs) {
- case CAN_BE_TYPEREF:
- case SHOULD_BE_TYPEREF:
- // it's up to the use
- Boolean b = generateElementProperty();
- if(b==null) // follow XJC recommendation
- generateRef = types.canBeTypeRefs== RawTypeSet.Mode.CAN_BE_TYPEREF;
- else // use the value user gave us
- generateRef = b;
- break;
- case MUST_BE_REFERENCE:
- generateRef = true;
- break;
- default:
- throw new AssertionError();
- }
-
- if(generateRef) {
- return createReferenceProperty(defaultName,forConstant,source,types, false, false, false, false);
- } else {
- return createElementProperty(defaultName,forConstant,source,types);
- }
- }
-
- /**
- * Common finalization of {@link CPropertyInfo} for the create***Property methods.
- */
- private <T extends CPropertyInfo> T wrapUp(T prop, XSComponent source) {
- prop.javadoc = concat(javadoc,
- getBuilder().getBindInfo(source).getDocumentation());
- if(prop.javadoc==null)
- prop.javadoc="";
-
- // decide the realization.
- FieldRenderer r;
- OptionalPropertyMode opm = getOptionalPropertyMode();
- if(prop.isCollection()) {
- CollectionTypeAttribute ct = getCollectionType();
- r = ct.get(getBuilder().model);
- } else {
- FieldRendererFactory frf = getBuilder().fieldRendererFactory;
-
- if(prop.isOptionalPrimitive()) {
- // the property type can be primitive type if we are to ignore absence
- switch(opm) {
- case PRIMITIVE:
- r = frf.getRequiredUnboxed();
- break;
- case WRAPPER:
- // force the wrapper type
- r = frf.getSingle();
- break;
- case ISSET:
- r = frf.getSinglePrimitiveAccess();
- break;
- default:
- throw new Error();
- }
- } else {
- r = frf.getDefault();
- }
- }
- if(opm==OptionalPropertyMode.ISSET) {
- // only isSet is allowed on a collection. these 3 modes aren't really symmetric.
-
- // if the property is a primitive type, we need an explicit unset because
- // we can't overload the meaning of set(null).
- // if it's a collection, we need to be able to unset it so that we can distinguish
- // null list and empty list.
- r = new IsSetFieldRenderer( r, prop.isOptionalPrimitive()||prop.isCollection(), true );
- }
-
- prop.realization = r;
-
- JType bt = getBaseType();
- if(bt!=null)
- prop.baseType = bt;
-
- return prop;
- }
-
- private CCustomizations getCustomizations( XSComponent src ) {
- return getBuilder().getBindInfo(src).toCustomizationList();
- }
-
- private CCustomizations getCustomizations( XSComponent... src ) {
- CCustomizations c = null;
- for (XSComponent s : src) {
- CCustomizations r = getCustomizations(s);
- if(c==null) c = r;
- else c = CCustomizations.merge(c,r);
- }
- return c;
- }
-
- private CCustomizations getCustomizations( XSAttributeUse src ) {
- // customizations for an attribute use should include those defined in the local attribute.
- // this is so that the schema like:
- //
- // <xs:attribute name="foo" type="xs:int">
- // <xs:annotation><xs:appinfo>
- // <hyperjaxb:... />
- //
- // would be picked up
- if(src.getDecl().isLocal())
- return getCustomizations(src,src.getDecl());
- else
- return getCustomizations((XSComponent)src);
- }
-
- private CCustomizations getCustomizations( XSParticle src ) {
- // customizations for a particle should include those defined in the term unless it's global
- // this is so that the schema like:
- //
- // <xs:sequence>
- // <xs:element name="foo" type="xs:int">
- // <xs:annotation><xs:appinfo>
- // <hyperjaxb:... />
- //
- // would be picked up
- if(src.getTerm().isElementDecl()) {
- XSElementDecl xed = src.getTerm().asElementDecl();
- if(xed.isGlobal())
- return getCustomizations((XSComponent)src);
- }
-
- return getCustomizations(src,src.getTerm());
- }
-
-
-
- public void markAsAcknowledged() {
- if( isAcknowledged() ) return;
-
- // mark the parent as well.
- super.markAsAcknowledged();
-
- BIProperty def = getDefault();
- if(def!=null) def.markAsAcknowledged();
- }
-
- private void constantPropertyErrorCheck() {
- if( isConstantProperty!=null && getOwner()!=null ) {
- // run additional check on the isCOnstantProperty value.
- // this value is not allowed if the schema component doesn't have
- // a fixed value constraint.
- //
- // the setParent method associates a customization with the rest of
- // XSOM object graph, so this is the earliest possible moment where
- // we can test this.
-
- if( !hasFixedValue.find(getOwner()) ) {
- Ring.get(ErrorReceiver.class).error(
- getLocation(),
- Messages.ERR_ILLEGAL_FIXEDATTR.format()
- );
- // set this value to null to avoid the same error to be reported more than once.
- isConstantProperty = null;
- }
- }
- }
-
- /**
- * Function object that returns true if a component has
- * a fixed value constraint.
- */
- private final XSFinder hasFixedValue = new XSFinder() {
- public Boolean attributeDecl(XSAttributeDecl decl) {
- return decl.getFixedValue()!=null;
- }
-
- public Boolean attributeUse(XSAttributeUse use) {
- return use.getFixedValue()!=null;
- }
-
- public Boolean schema(XSSchema s) {
- // we allow globalBindings to have isConstantProperty==true,
- // so this method returns true to allow this.
- return true;
- }
- };
-
- /**
- * Finds a BIProperty which this object should delegate to.
- *
- * @return
- * always return non-null for normal BIProperties.
- * If this object is contained in the BIGlobalBinding, then
- * this method returns null to indicate that there's no more default.
- */
- protected BIProperty getDefault() {
- if(getOwner()==null) return null;
- BIProperty next = getDefault(getBuilder(),getOwner());
- if(next==this) return null; // global.
- else return next;
- }
-
- private static BIProperty getDefault( BGMBuilder builder, XSComponent c ) {
- while(c!=null) {
- c = c.apply(defaultCustomizationFinder);
- if(c!=null) {
- BIProperty prop = builder.getBindInfo(c).get(BIProperty.class);
- if(prop!=null) return prop;
- }
- }
-
- // default to the global one
- return builder.getGlobalBinding().getDefaultProperty();
- }
-
-
- /**
- * Finds a property customization that describes how the given
- * component should be mapped to a property (if it's mapped to
- * a property at all.)
- *
- * <p>
- * Consider an attribute use that does NOT carry a property
- * customization. This schema component is nonetheless considered
- * to carry a (sort of) implicit property customization, whose values
- * are defaulted.
- *
- * <p>
- * This method can be think of the method that returns this implied
- * property customization.
- *
- * <p>
- * Note that this doesn't mean the given component needs to be
- * mapped to a property. But if it does map to a property, it needs
- * to follow this customization.
- *
- * I think this semantics is next to non-sense but I couldn't think
- * of any other way to follow the spec.
- *
- * @param c
- * A customization effective on this component will be returned.
- * Can be null just to get the global customization.
- * @return
- * Always return non-null valid object.
- */
- public static BIProperty getCustomization( XSComponent c ) {
- BGMBuilder builder = Ring.get(BGMBuilder.class);
-
- // look for a customization on this component
- if( c!=null ) {
- BIProperty prop = builder.getBindInfo(c).get(BIProperty.class);
- if(prop!=null) return prop;
- }
-
- // if no such thing exists, defeault.
- return getDefault(builder,c);
- }
-
- private final static XSFunction<XSComponent> defaultCustomizationFinder = new XSFunction<XSComponent>() {
-
- public XSComponent attributeUse(XSAttributeUse use) {
- return use.getDecl(); // inherit from the declaration
- }
-
- public XSComponent particle(XSParticle particle) {
- return particle.getTerm(); // inherit from the term
- }
-
- public XSComponent schema(XSSchema schema) {
- // no more delegation
- return null;
- }
-
- // delegates to the context schema object
- public XSComponent attributeDecl(XSAttributeDecl decl) { return decl.getOwnerSchema(); }
- public XSComponent wildcard(XSWildcard wc) { return wc.getOwnerSchema(); }
- public XSComponent modelGroupDecl(XSModelGroupDecl decl) { return decl.getOwnerSchema(); }
- public XSComponent modelGroup(XSModelGroup group) { return group.getOwnerSchema(); }
- public XSComponent elementDecl(XSElementDecl decl) { return decl.getOwnerSchema(); }
- public XSComponent complexType(XSComplexType type) { return type.getOwnerSchema(); }
- public XSComponent simpleType(XSSimpleType st) { return st.getOwnerSchema(); }
-
- // property customizations are not allowed on these components.
- public XSComponent attGroupDecl(XSAttGroupDecl decl) { throw new IllegalStateException(); }
- public XSComponent empty(XSContentType empty) { throw new IllegalStateException(); }
- public XSComponent annotation(XSAnnotation xsAnnotation) { throw new IllegalStateException(); }
- public XSComponent facet(XSFacet xsFacet) { throw new IllegalStateException(); }
- public XSComponent notation(XSNotation xsNotation) { throw new IllegalStateException(); }
- public XSComponent identityConstraint(XSIdentityConstraint x) { throw new IllegalStateException(); }
- public XSComponent xpath(XSXPath xsxPath) { throw new IllegalStateException(); }
- };
-
-
- private static String concat( String s1, String s2 ) {
- if(s1==null) return s2;
- if(s2==null) return s1;
- return s1+"\n\n"+s2;
- }
-
- public QName getName() { return NAME; }
-
- /** Name of this declaration. */
- public static final QName NAME = new QName(
- Const.JAXB_NSURI, "property" );
-
- public BIConversion getConv() {
- if(baseType!=null)
- return baseType.conv;
- else
- return null;
- }
-
- private static final class BaseTypeBean {
- /**
- * If there's a nested javaType customization, this field
- * will keep that customization. Otherwise null.
- *
- * This customization, if present, is used to customize
- * the simple type mapping at the point of reference.
- */
- @XmlElementRef
- BIConversion conv;
-
- /**
- * Java type name.
- */
- @XmlAttribute
- String name;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BISchemaBinding.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BISchemaBinding.java
deleted file mode 100644
index 03759775..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BISchemaBinding.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSType;
-
-/**
- * Schema-wide binding customization.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-@XmlRootElement(name="schemaBindings")
-public final class BISchemaBinding extends AbstractDeclarationImpl {
-
- /**
- * Name conversion rules. All defaults to {@link BISchemaBinding#defaultNamingRule}.
- */
- @XmlType(propOrder={})
- private static final class NameRules {
- @XmlElement
- NamingRule typeName = defaultNamingRule;
- @XmlElement
- NamingRule elementName = defaultNamingRule;
- @XmlElement
- NamingRule attributeName = defaultNamingRule;
- @XmlElement
- NamingRule modelGroupName = defaultNamingRule;
- @XmlElement
- NamingRule anonymousTypeName = defaultNamingRule;
- }
-
- @XmlElement
- private NameRules nameXmlTransform = new NameRules();
-
- private static final class PackageInfo {
- @XmlAttribute
- String name;
- @XmlElement
- String javadoc;
- }
-
- @XmlElement(name="package")
- private PackageInfo packageInfo = new PackageInfo();
-
- /**
- * If false, it means not to generate any classes from this namespace.
- * No ObjectFactory, no classes (the only way to bind them is by using
- * &lt;jaxb:class ref="..."/>)
- */
- @XmlAttribute(name="map")
- public boolean map = true;
-
- /**
- * Default naming rule, that doesn't change the name.
- */
- private static final NamingRule defaultNamingRule = new NamingRule("","");
-
-
- /**
- * Default naming rules of the generated interfaces.
- *
- * It simply adds prefix and suffix to the name, but
- * the caller shouldn't care how the name mangling is
- * done.
- */
- public static final class NamingRule {
- @XmlAttribute
- private String prefix = "";
- @XmlAttribute
- private String suffix = "";
-
- public NamingRule( String _prefix, String _suffix ) {
- this.prefix = _prefix;
- this.suffix = _suffix;
- }
-
- public NamingRule() {
- }
-
- /** Changes the name according to the rule. */
- public String mangle( String originalName ) {
- return prefix+originalName+suffix;
- }
- }
-
- /**
- * Transforms the default name produced from XML name
- * by following the customization.
- *
- * This shouldn't be applied to a class name specified
- * by a customization.
- *
- * @param cmp
- * The schema component from which the default name is derived.
- */
- public String mangleClassName( String name, XSComponent cmp ) {
- if( cmp instanceof XSType )
- return nameXmlTransform.typeName.mangle(name);
- if( cmp instanceof XSElementDecl )
- return nameXmlTransform.elementName.mangle(name);
- if( cmp instanceof XSAttributeDecl )
- return nameXmlTransform.attributeName.mangle(name);
- if( cmp instanceof XSModelGroup || cmp instanceof XSModelGroupDecl )
- return nameXmlTransform.modelGroupName.mangle(name);
-
- // otherwise no modification
- return name;
- }
-
- public String mangleAnonymousTypeClassName( String name ) {
- return nameXmlTransform.anonymousTypeName.mangle(name);
- }
-
-
- public String getPackageName() { return packageInfo.name; }
-
- public String getJavadoc() { return packageInfo.javadoc; }
-
- public QName getName() { return NAME; }
- public static final QName NAME = new QName(
- Const.JAXB_NSURI, "schemaBinding" );
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BISerializable.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BISerializable.java
deleted file mode 100644
index 44490d68..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BISerializable.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.annotation.XmlAttribute;
-
-
-/**
- * This customization will enable serialization support on XJC.
- * This is used as a child of a {@link BIGlobalBinding} object,
- * and this doesn't implement BIDeclaration by itself.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class BISerializable {
-
- /** serial version UID, or null to avoid generating the serialVersionUID field. */
- @XmlAttribute
- public Long uid;
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIXDom.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIXDom.java
deleted file mode 100644
index 7007065c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIXDom.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import com.sun.tools.internal.xjc.reader.Const;
-
-/**
- * Compatibility with 1.0.
- *
- * Read &lt;xjc:dom> as &lt;jaxb:dom>.
- *
- * @author Kohsuke Kawaguchi
- */
-@XmlRootElement(name="dom",namespace=Const.XJC_EXTENSION_URI)
-public class BIXDom extends BIDom {
-
- // unsupported yet
- @XmlAttribute
- String type = "w3c";
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIXPluginCustomization.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIXPluginCustomization.java
deleted file mode 100644
index febc28d2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIXPluginCustomization.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.Plugin;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.reader.Ring;
-
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-/**
- * Customization specified via {@link Plugin#getCustomizationURIs()}.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class BIXPluginCustomization extends AbstractDeclarationImpl {
-
- /**
- * Customization element.
- */
- public final Element element;
-
- private QName name;
-
- public BIXPluginCustomization(Element e, Locator _loc) {
- super(_loc);
- element = e;
- }
-
- public void onSetOwner() {
- super.onSetOwner();
- if(!Ring.get(Model.class).options.pluginURIs.contains(element.getNamespaceURI()))
- markAsAcknowledged();
- }
-
- public final QName getName() {
- if(name==null)
- name = new QName(element.getNamespaceURI(),element.getLocalName());
- return name;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIXSubstitutable.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIXSubstitutable.java
deleted file mode 100644
index e16ed948..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIXSubstitutable.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.reader.Const;
-
-/**
- * Forces a non-collapsing behavior to allow extension schemas
- * to perform element substitutions.
- *
- * See https://jaxb.dev.java.net/issues/show_bug.cgi?id=289
- *
- * @author Kohsuke Kawaguchi
- * @since 2.1.1
- */
-@XmlRootElement(name="substitutable",namespace= Const.XJC_EXTENSION_URI)
-public final class BIXSubstitutable extends AbstractDeclarationImpl {
- public final QName getName() { return NAME; }
-
- /** Name of the conversion declaration. */
- public static final QName NAME = new QName(Const.XJC_EXTENSION_URI,"substitutable");
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BindInfo.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BindInfo.java
deleted file mode 100644
index 15927407..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BindInfo.java
+++ /dev/null
@@ -1,357 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import java.io.FilterWriter;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlMixed;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import com.sun.codemodel.internal.JDocComment;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.tools.internal.xjc.SchemaCache;
-import com.sun.tools.internal.xjc.model.CCustomizations;
-import com.sun.tools.internal.xjc.model.CPluginCustomization;
-import com.sun.tools.internal.xjc.model.Model;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
-import com.sun.xml.internal.bind.annotation.XmlLocation;
-import com.sun.xml.internal.bind.marshaller.MinimumEscapeHandler;
-import com.sun.xml.internal.xsom.XSComponent;
-
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-
-/**
- * Container for customization declarations.
- *
- * We use JAXB ourselves and parse this object from "xs:annotation".
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke,kawaguchi@sun.com)
- */
-@XmlRootElement(namespace= WellKnownNamespace.XML_SCHEMA,name="annotation")
-@XmlType(namespace=WellKnownNamespace.XML_SCHEMA,name="foobar")
-public final class BindInfo implements Iterable<BIDeclaration> {
-
- private BGMBuilder builder;
-
- @XmlLocation
- private Locator location;
-
- /**
- * Documentation taken from &lt;xs:documentation>s.
- */
- @XmlElement(namespace=WellKnownNamespace.XML_SCHEMA)
- private Documentation documentation;
-
- /**
- * Returns true if this {@link BindInfo} doesn't contain any useful
- * information.
- *
- * This flag is used to discard unused {@link BindInfo}s early to save memory footprint.
- */
- public boolean isPointless() {
- if(size()>0) return false;
- if(documentation!=null && !documentation.contents.isEmpty())
- return false;
-
- return true;
- }
-
- private static final class Documentation {
- @XmlAnyElement
- @XmlMixed
- List<Object> contents = new ArrayList<Object>();
-
- void addAll(Documentation rhs) {
- if(rhs==null) return;
-
- if(contents==null)
- contents = new ArrayList<Object>();
- if(!contents.isEmpty())
- contents.add("\n\n");
- contents.addAll(rhs.contents);
- }
- }
-
- /** list of individual declarations. */
- private final List<BIDeclaration> decls = new ArrayList<BIDeclaration>();
-
- private static final class AppInfo {
- /**
- * Receives {@link BIDeclaration}s and other DOMs.
- */
- @XmlAnyElement(lax=true,value=DomHandlerEx.class)
- List<Object> contents = new ArrayList<Object>();
-
- public void addTo(BindInfo bi) {
- if(contents==null) return;
-
- for (Object o : contents) {
- if(o instanceof BIDeclaration)
- bi.addDecl((BIDeclaration)o);
- // this is really PITA! I can't get the source location
- if(o instanceof DomHandlerEx.DomAndLocation) {
- DomHandlerEx.DomAndLocation e = (DomHandlerEx.DomAndLocation)o;
- String nsUri = e.element.getNamespaceURI();
- if(nsUri==null || nsUri.equals("")
- || nsUri.equals(WellKnownNamespace.XML_SCHEMA))
- continue; // this is definitely not a customization
- bi.addDecl(new BIXPluginCustomization(e.element,e.loc));
- }
- }
- }
- }
-
-
- // only used by JAXB
- @XmlElement(namespace=WellKnownNamespace.XML_SCHEMA)
- void setAppinfo(AppInfo aib) {
- aib.addTo(this);
- }
-
-
-
- /**
- * Gets the location of this annotation in the source file.
- *
- * @return
- * If the declarations are in fact specified in the source
- * code, a non-null valid object will be returned.
- * If this BindInfo is generated internally by XJC, then
- * null will be returned.
- */
- public Locator getSourceLocation() { return location; }
-
-
- private XSComponent owner;
- /**
- * Sets the owner schema component and a reference to BGMBuilder.
- * This method is called from the BGMBuilder before
- * any BIDeclaration inside it is used.
- */
- public void setOwner( BGMBuilder _builder, XSComponent _owner ) {
- this.owner = _owner;
- this.builder = _builder;
- for (BIDeclaration d : decls)
- d.onSetOwner();
- }
- public XSComponent getOwner() { return owner; }
-
- /**
- * Back pointer to the BGMBuilder which is building
- * a BGM from schema components including this customization.
- */
- public BGMBuilder getBuilder() { return builder; }
-
- /** Adds a new declaration. */
- public void addDecl( BIDeclaration decl ) {
- if(decl==null) throw new IllegalArgumentException();
- decl.setParent(this);
- decls.add(decl);
- }
-
- /**
- * Gets the first declaration with a given name, or null
- * if none is found.
- */
- public <T extends BIDeclaration>
- T get( Class<T> kind ) {
- for( BIDeclaration decl : decls ) {
- if( kind.isInstance(decl) )
- return kind.cast(decl);
- }
- return null; // not found
- }
-
- /**
- * Gets all the declarations
- */
- public BIDeclaration[] getDecls() {
- return decls.toArray(new BIDeclaration[decls.size()]);
- }
-
- /**
- * Gets the documentation parsed from &lt;xs:documentation>s.
- * The returned collection is to be added to {@link JDocComment#append(Object)}.
- * @return maybe null.
- */
- public String getDocumentation() {
- // TODO: FIXME: correctly turn individual items to String including DOM
- if(documentation==null || documentation.contents==null) return null;
-
- StringBuilder buf = new StringBuilder();
- for (Object c : documentation.contents) {
- if(c instanceof String) {
- buf.append(c.toString());
- }
- if(c instanceof Element) {
- Transformer t = builder.getIdentityTransformer();
- StringWriter w = new StringWriter();
- try {
- Writer fw = new FilterWriter(w) {
- char[] buf = new char[1];
-
- public void write(int c) throws IOException {
- buf[0] = (char)c;
- write(buf,0,1);
- }
-
- public void write(char[] cbuf, int off, int len) throws IOException {
- MinimumEscapeHandler.theInstance.escape(cbuf,off,len,false,out);
- }
-
- public void write(String str, int off, int len) throws IOException {
- write(str.toCharArray(),off,len);
- }
- };
- t.transform(new DOMSource((Element)c),new StreamResult(fw));
- } catch (TransformerException e) {
- throw new Error(e); // impossible
- }
- buf.append("\n<pre>\n");
- buf.append(w);
- buf.append("\n</pre>\n");
- }
- }
- return buf.toString();
- }
-
- /**
- * Merges all the declarations inside the given BindInfo
- * to this BindInfo.
- */
- public void absorb( BindInfo bi ) {
- for( BIDeclaration d : bi )
- d.setParent(this);
- this.decls.addAll( bi.decls );
-
- if(this.documentation==null)
- this.documentation = bi.documentation;
- else
- this.documentation.addAll(bi.documentation);
- }
-
- /** Gets the number of declarations. */
- public int size() { return decls.size(); }
-
- public BIDeclaration get( int idx ) { return decls.get(idx); }
-
- public Iterator<BIDeclaration> iterator() {
- return decls.iterator();
- }
-
- /**
- * Gets the list of {@link CPluginCustomization}s from this.
- *
- * <p>
- * Note that calling this method marks all those plug-in customizations
- * as 'used'. So call it only when it's really necessary.
- */
- public CCustomizations toCustomizationList() {
- CCustomizations r=null;
- for( BIDeclaration d : this ) {
- if(d instanceof BIXPluginCustomization) {
- BIXPluginCustomization pc = (BIXPluginCustomization) d;
- pc.markAsAcknowledged();
- if(!Ring.get(Model.class).options.pluginURIs.contains(pc.getName().getNamespaceURI()))
- continue; // this isn't a plugin customization
- if(r==null)
- r = new CCustomizations();
- r.add(new CPluginCustomization(pc.element,pc.getLocation()));
- }
- }
-
- if(r==null) r = CCustomizations.EMPTY;
- return new CCustomizations(r);
- }
- /** An instance with the empty contents. */
- public final static BindInfo empty = new BindInfo();
-
- /**
- * Lazily prepared {@link JAXBContext}.
- */
- private static volatile JAXBContext customizationContext;
-
- public static JAXBContext getCustomizationContext() {
- try {
- if (customizationContext == null) {
- synchronized (BindInfo.class) {
- if (customizationContext == null) {
- customizationContext = JAXBContext.newInstance(
- BindInfo.class, // for xs:annotation
- BIClass.class,
- BIConversion.User.class,
- BIConversion.UserAdapter.class,
- BIDom.class,
- BIFactoryMethod.class,
- BIInlineBinaryData.class,
- BIXDom.class,
- BIXSubstitutable.class,
- BIEnum.class,
- BIEnumMember.class,
- BIGlobalBinding.class,
- BIProperty.class,
- BISchemaBinding.class);
- }
- }
- }
- return customizationContext;
- } catch (JAXBException e) {
- throw new AssertionError(e);
- }
- }
-
- public static Unmarshaller getCustomizationUnmarshaller() {
- try {
- return getCustomizationContext().createUnmarshaller();
- } catch (JAXBException e) {
- throw new AssertionError(e);
- }
- }
-
- /**
- * Lazily parsed schema for the binding file.
- */
- public static final SchemaCache bindingFileSchema = new SchemaCache(BindInfo.class.getResource("binding.xsd"));
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/CollectionTypeAttribute.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/CollectionTypeAttribute.java
deleted file mode 100644
index b6f59d11..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/CollectionTypeAttribute.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlValue;
-
-import com.sun.tools.internal.xjc.generator.bean.field.FieldRenderer;
-import com.sun.tools.internal.xjc.generator.bean.field.UntypedListFieldRenderer;
-import com.sun.tools.internal.xjc.generator.bean.field.FieldRendererFactory;
-import com.sun.tools.internal.xjc.model.Model;
-
-/**
- * Bean used by JAXB to bind a collection type attribute to our {@link FieldRenderer}.
- * @author Kohsuke Kawaguchi
- */
-final class CollectionTypeAttribute {
- @XmlValue
- String collectionType = null;
-
- /**
- * Computed from {@link #collectionType} on demand.
- */
- @XmlTransient
- private FieldRenderer fr;
-
- FieldRenderer get(Model m) {
- if(fr==null)
- fr = calcFr(m);
- return fr;
- }
-
- private FieldRenderer calcFr(Model m) {
- FieldRendererFactory frf = m.options.getFieldRendererFactory();
- if (collectionType==null)
- return frf.getDefault();
-
- if (collectionType.equals("indexed"))
- return frf.getArray();
-
- return frf.getList(m.codeModel.ref(collectionType));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/DomHandlerEx.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/DomHandlerEx.java
deleted file mode 100644
index 596e2eb9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/DomHandlerEx.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.annotation.DomHandler;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.sax.SAXResult;
-
-import com.sun.xml.internal.bind.marshaller.SAX2DOMEx;
-
-import com.sun.xml.internal.bind.v2.util.XmlFactory;
-import javax.xml.parsers.DocumentBuilderFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.Locator;
-import org.xml.sax.helpers.LocatorImpl;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * {@link DomHandler} that produces a W3C DOM but with a location information.
- *
- * @author Kohsuke Kawaguchi
- */
-final class DomHandlerEx implements DomHandler<DomHandlerEx.DomAndLocation,DomHandlerEx.ResultImpl> {
-
- public static final class DomAndLocation {
- public final Element element;
- public final Locator loc;
-
- public DomAndLocation(Element element, Locator loc) {
- this.element = element;
- this.loc = loc;
- }
- }
-
- public ResultImpl createUnmarshaller(ValidationEventHandler errorHandler) {
- return new ResultImpl();
- }
-
- public DomAndLocation getElement(ResultImpl r) {
- return new DomAndLocation( ((Document)r.s2d.getDOM()).getDocumentElement(), r.location );
- }
-
- public Source marshal(DomAndLocation domAndLocation, ValidationEventHandler errorHandler) {
- return new DOMSource(domAndLocation.element);
- }
-
- public static final class ResultImpl extends SAXResult {
- final SAX2DOMEx s2d;
-
- Locator location = null;
-
- ResultImpl() {
- try {
- DocumentBuilderFactory factory = XmlFactory.createDocumentBuilderFactory(false); // safe - only used for BI
- s2d = new SAX2DOMEx(factory);
- } catch (ParserConfigurationException e) {
- throw new AssertionError(e); // impossible
- }
-
- XMLFilterImpl f = new XMLFilterImpl() {
- @Override
- public void setDocumentLocator(Locator locator) {
- super.setDocumentLocator(locator);
- location = new LocatorImpl(locator);
- }
- };
- f.setContentHandler(s2d);
-
- setHandler(f);
- }
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/EnumMemberMode.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/EnumMemberMode.java
deleted file mode 100644
index f4be63e5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/EnumMemberMode.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
-
-/**
- * Enum member name handling mode.
- *
- * @author Kohsuke Kawaguchi
- */
-@XmlEnum
-public enum EnumMemberMode {
- @XmlEnumValue("skipGeneration")
- SKIP,
- @XmlEnumValue("generateError")
- ERROR,
- @XmlEnumValue("generateName")
- GENERATE
-
- ;
-
- /**
- * The mode will change to this when there's &lt;jaxb:enum> customization.
- */
- public EnumMemberMode getModeWithEnum() {
- if(this==SKIP) return ERROR;
- return this;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/ForkingFilter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/ForkingFilter.java
deleted file mode 100644
index 37a63e7a..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/ForkingFilter.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import java.util.ArrayList;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLFilter;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * {@link XMLFilter} that can fork an event to another {@link ContentHandler}
- * in the middle.
- *
- * <p>
- * The side handler receives SAX events before the next handler in the filter chain does.
- *
- * @author Kohsuke Kawaguchi
- */
-public class ForkingFilter extends XMLFilterImpl {
-
- /**
- * Non-null if we are also forking events to this handler.
- */
- private ContentHandler side;
-
- /**
- * The depth of the current element that the {@link #side} handler
- * is seeing.
- */
- private int depth;
-
- /**
- * In-scope namespace mapping.
- * namespaces[2n ] := prefix
- * namespaces[2n+1] := namespace URI
- */
- private final ArrayList<String> namespaces = new ArrayList<String>();
-
- private Locator loc;
-
- public ForkingFilter() {
- }
-
- public ForkingFilter(ContentHandler next) {
- setContentHandler(next);
- }
-
- public ContentHandler getSideHandler() {
- return side;
- }
-
- @Override
- public void setDocumentLocator(Locator locator) {
- super.setDocumentLocator(locator);
- this.loc = locator;
- }
-
- public Locator getDocumentLocator() {
- return loc;
- }
-
- @Override
- public void startDocument() throws SAXException {
- reset();
- super.startDocument();
- }
-
- private void reset() {
- namespaces.clear();
- side = null;
- depth = 0;
- }
-
- @Override
- public void endDocument() throws SAXException {
- loc = null;
- reset();
- super.endDocument();
- }
-
- @Override
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
- if (WellKnownNamespace.XML_NAMESPACE_URI.equals(uri)) return; //xml prefix shall not be declared based on jdk api javadoc
- if(side!=null)
- side.startPrefixMapping(prefix,uri);
- namespaces.add(prefix);
- namespaces.add(uri);
- super.startPrefixMapping(prefix,uri);
- }
-
- @Override
- public void endPrefixMapping(String prefix) throws SAXException {
- if ("xml".equals(prefix)) return; //xml prefix shall not be declared based on jdk api javadoc
- if(side!=null)
- side.endPrefixMapping(prefix);
- super.endPrefixMapping(prefix);
- namespaces.remove(namespaces.size()-1);
- namespaces.remove(namespaces.size()-1);
- }
-
- @Override
- public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
- if(side!=null) {
- side.startElement(uri,localName,qName,atts);
- depth++;
- }
- super.startElement(uri, localName, qName, atts);
- }
-
- /**
- * Starts the event forking.
- */
- public void startForking(String uri, String localName, String qName, Attributes atts, ContentHandler side) throws SAXException {
- if(this.side!=null) throw new IllegalStateException(); // can't fork to two handlers
-
- this.side = side;
- depth = 1;
- side.setDocumentLocator(loc);
- side.startDocument();
- for( int i=0; i<namespaces.size(); i+=2 )
- side.startPrefixMapping(namespaces.get(i),namespaces.get(i+1));
- side.startElement(uri,localName,qName,atts);
- }
-
- @Override
- public void endElement(String uri, String localName, String qName) throws SAXException {
- if(side!=null) {
- side.endElement(uri,localName,qName);
- depth--;
- if(depth==0) {
- for( int i=namespaces.size()-2; i>=0; i-=2 )
- side.endPrefixMapping(namespaces.get(i));
- side.endDocument();
- side = null;
- }
- }
- super.endElement(uri, localName, qName);
- }
-
- @Override
- public void characters(char ch[], int start, int length) throws SAXException {
- if(side!=null)
- side.characters(ch, start, length);
- super.characters(ch, start, length);
- }
-
- @Override
- public void ignorableWhitespace(char ch[], int start, int length) throws SAXException {
- if(side!=null)
- side.ignorableWhitespace(ch, start, length);
- super.ignorableWhitespace(ch, start, length);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/LocalScoping.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/LocalScoping.java
deleted file mode 100644
index fbd1c783..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/LocalScoping.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.annotation.XmlEnumValue;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public enum LocalScoping {
- @XmlEnumValue("nested")
- NESTED,
- @XmlEnumValue("toplevel")
- TOPLEVEL
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle.properties
deleted file mode 100644
index 48fd5b66..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle.properties
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-NGCCRuntimeEx.Unimplemented = \
- The "{0}" feature is not implemented yet
-
-NGCCRuntimeEx.Unsupported = \
- The "{0}" feature is an unsupported optional feature
-
-NGCCRuntimeEx.UndefinedPrefix = \
- Prefix "{0}" is undefined
-
-
-
-MagicTransducer.AttributeRequired = \
- parseMethod/printMethod attributes are both required.
-
-ERR_ILLEGAL_FIXEDATTR = \
- fixedAttributeAsConstantProperty is allowed only with attributes with a fixed value constraint.
-
-ERR_UNDEFINED_SIMPLE_TYPE = \
- undefined simple type "{0}".
-
-ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE = \
- Simple type "{0}" is not allowed by the spec to be bound to a type-safe enum.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_de.properties
deleted file mode 100644
index 05a58b47..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_de.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-NGCCRuntimeEx.Unimplemented = Das "{0}"-Feature ist noch nicht implementiert
-
-NGCCRuntimeEx.Unsupported = Das "{0}"-Feature ist ein nicht unterst\u00FCtztes optionales Feature
-
-NGCCRuntimeEx.UndefinedPrefix = Pr\u00E4fix "{0}" ist undefiniert
-
-
-
-MagicTransducer.AttributeRequired = parseMethod-/printMethod-Attribute sind beide erforderlich.
-
-ERR_ILLEGAL_FIXEDATTR = fixedAttributeAsConstantProperty ist nur bei Attributen mit einem Constraint mit festen Werten zul\u00E4ssig.
-
-ERR_UNDEFINED_SIMPLE_TYPE = undefinierter einfacher Typ "{0}".
-
-ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE = Die Spezifikation l\u00E4sst nicht zu, dass der einfache Typ "{0}" an eine Typesafe-Enumeration gebunden wird.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_es.properties
deleted file mode 100644
index a65b93c6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_es.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-NGCCRuntimeEx.Unimplemented = La funci\u00F3n "{0}" a\u00FAn no est\u00E1 implantada
-
-NGCCRuntimeEx.Unsupported = La funci\u00F3n "{0}" es una funci\u00F3n opcional no soportada
-
-NGCCRuntimeEx.UndefinedPrefix = No se ha definido el prefijo "{0}"
-
-
-
-MagicTransducer.AttributeRequired = Se necesitan los atributos parseMethod/printMethod.
-
-ERR_ILLEGAL_FIXEDATTR = fixedAttributeAsConstantProperty s\u00F3lo est\u00E1 permitido con atributos que tienen una restricci\u00F3n de valores fija.
-
-ERR_UNDEFINED_SIMPLE_TYPE = tipo simple "{0}" no definido.
-
-ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE = La especificaci\u00F3n no permite que el tipo simple "{0}" est\u00E9 enlazado a una enumeraci\u00F3n de tipo seguro.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_fr.properties
deleted file mode 100644
index 015ef08d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_fr.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-NGCCRuntimeEx.Unimplemented = La fonctionnalit\u00E9 "{0}" n''est pas encore impl\u00E9ment\u00E9e
-
-NGCCRuntimeEx.Unsupported = La fonctionnalit\u00E9 "{0}" est une fonctionnalit\u00E9 facultative non prise en charge
-
-NGCCRuntimeEx.UndefinedPrefix = Le pr\u00E9fixe "{0}" n''est pas d\u00E9fini
-
-
-
-MagicTransducer.AttributeRequired = Les attributs parseMethod/printMethod sont tous deux obligatoires.
-
-ERR_ILLEGAL_FIXEDATTR = fixedAttributeAsConstantProperty est autoris\u00E9 uniquement avec les attributs comportant une contrainte de valeur fixe.
-
-ERR_UNDEFINED_SIMPLE_TYPE = type simple "{0}" non d\u00E9fini.
-
-ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE = La sp\u00E9cification n''autorise pas le type simple "{0}" \u00E0 \u00EAtre li\u00E9 \u00E0 une \u00E9num\u00E9ration Typesafe.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_it.properties
deleted file mode 100644
index f8076411..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_it.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-NGCCRuntimeEx.Unimplemented = La funzione "{0}" non \u00E8 ancora implementata
-
-NGCCRuntimeEx.Unsupported = "{0}" \u00E8 una funzione opzionale non supportata
-
-NGCCRuntimeEx.UndefinedPrefix = Prefisso ''{0}'' non definito
-
-
-
-MagicTransducer.AttributeRequired = Sono richiesti entrambi gli attributi parseMethod/printMethod.
-
-ERR_ILLEGAL_FIXEDATTR = fixedAttributeAsConstantProperty \u00E8 consentito solo con attributi con un vincolo di valore fisso.
-
-ERR_UNDEFINED_SIMPLE_TYPE = tipo semplice "{0}" non definito.
-
-ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE = La specifica non consente l''associazione del tipo semplice "{0}" a un''enumerazione Typesafe.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_ja.properties
deleted file mode 100644
index 849f222d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_ja.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-NGCCRuntimeEx.Unimplemented = "{0}"\u6A5F\u80FD\u306F\u307E\u3060\u5B9F\u88C5\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-
-NGCCRuntimeEx.Unsupported = "{0}"\u6A5F\u80FD\u306F\u672A\u30B5\u30DD\u30FC\u30C8\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u6A5F\u80FD\u3067\u3059
-
-NGCCRuntimeEx.UndefinedPrefix = \u63A5\u982D\u8F9E"{0}"\u306F\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-
-
-
-MagicTransducer.AttributeRequired = parseMethod/printMethod\u5C5E\u6027\u306F\u4E21\u65B9\u3068\u3082\u5FC5\u9808\u3067\u3059\u3002
-
-ERR_ILLEGAL_FIXEDATTR = fixedAttributeAsConstantProperty\u306F\u3001\u56FA\u5B9A\u5024\u5236\u7D04\u3092\u6301\u3064\u5C5E\u6027\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002
-
-ERR_UNDEFINED_SIMPLE_TYPE = \u5358\u7D14\u578B"{0}"\u306F\u672A\u5B9A\u7FA9\u3067\u3059\u3002
-
-ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE = \u5358\u7D14\u578B"{0}"\u306F\u3001\u30BF\u30A4\u30D7\u30BB\u30FC\u30D5\u306E\u5217\u6319\u578B\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u308B\u4ED5\u69D8\u3067\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_ko.properties
deleted file mode 100644
index 449a9aa2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_ko.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-NGCCRuntimeEx.Unimplemented = "{0}" \uAE30\uB2A5\uC740 \uC544\uC9C1 \uAD6C\uD604\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-NGCCRuntimeEx.Unsupported = "{0}" \uAE30\uB2A5\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC120\uD0DD\uC801 \uAE30\uB2A5\uC785\uB2C8\uB2E4.
-
-NGCCRuntimeEx.UndefinedPrefix = "{0}" \uC811\uB450\uC5B4\uAC00 \uC815\uC758\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-
-
-MagicTransducer.AttributeRequired = parseMethod/printMethod \uC18D\uC131\uC774 \uBAA8\uB450 \uD544\uC694\uD569\uB2C8\uB2E4.
-
-ERR_ILLEGAL_FIXEDATTR = fixedAttributeAsConstantProperty\uB294 \uACE0\uC815 \uAC12 \uC0C1\uC218\uAC00 \uC788\uB294 \uC18D\uC131\uC5D0\uC11C\uB9CC \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-
-ERR_UNDEFINED_SIMPLE_TYPE = "{0}"\uC740(\uB294) \uC815\uC758\uB418\uC9C0 \uC54A\uC740 \uB2E8\uC21C \uC720\uD615\uC785\uB2C8\uB2E4.
-
-ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE = \uB2E8\uC21C \uC720\uD615 "{0}"\uC740(\uB294) \uC0AC\uC591\uC5D0 \uB530\uB77C type-safe enum\uC5D0 \uBC14\uC778\uB4DC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_pt_BR.properties
deleted file mode 100644
index 4255b66f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_pt_BR.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-NGCCRuntimeEx.Unimplemented = O recurso "{0}" n\u00E3o foi implementado ainda
-
-NGCCRuntimeEx.Unsupported = O recurso "{0}" \u00E9 um recurso opcional n\u00E3o suportado
-
-NGCCRuntimeEx.UndefinedPrefix = O prefixo "{0}" \u00E9 indefinido
-
-
-
-MagicTransducer.AttributeRequired = os atributos parseMethod/printMethod s\u00E3o necess\u00E1rios.
-
-ERR_ILLEGAL_FIXEDATTR = fixedAttributeAsConstantProperty s\u00F3 \u00E9 permitido com atributos com uma constraint de valor fixo.
-
-ERR_UNDEFINED_SIMPLE_TYPE = tipo "{0}" simples indefinido.
-
-ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE = Tipo "{0}" simples n\u00E3o permitido pela especifica\u00E7\u00E3o para ser associado a um enumera\u00E7\u00E3o type-safe.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_zh_CN.properties
deleted file mode 100644
index 28ac31c2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_zh_CN.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-NGCCRuntimeEx.Unimplemented = "{0}" \u529F\u80FD\u5C1A\u672A\u5B9E\u73B0
-
-NGCCRuntimeEx.Unsupported = "{0}" \u529F\u80FD\u662F\u4E0D\u652F\u6301\u7684\u53EF\u9009\u529F\u80FD
-
-NGCCRuntimeEx.UndefinedPrefix = \u672A\u5B9A\u4E49\u524D\u7F00 "{0}"
-
-
-
-MagicTransducer.AttributeRequired = \u540C\u65F6\u9700\u8981 parseMethod/printMethod \u5C5E\u6027\u3002
-
-ERR_ILLEGAL_FIXEDATTR = fixedAttributeAsConstantProperty \u53EA\u5141\u8BB8\u7528\u4E8E\u5177\u6709\u56FA\u5B9A\u503C\u7EA6\u675F\u6761\u4EF6\u7684\u5C5E\u6027\u3002
-
-ERR_UNDEFINED_SIMPLE_TYPE = \u672A\u5B9A\u4E49\u7B80\u5355\u7C7B\u578B "{0}"\u3002
-
-ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE = \u89C4\u8303\u4E0D\u5141\u8BB8\u7B80\u5355\u7C7B\u578B "{0}" \u7ED1\u5B9A\u5230\u7C7B\u578B\u5B89\u5168\u7684\u679A\u4E3E\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_zh_TW.properties
deleted file mode 100644
index 3a121088..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_zh_TW.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-NGCCRuntimeEx.Unimplemented = "{0}" \u529F\u80FD\u5C1A\u672A\u5BE6\u884C
-
-NGCCRuntimeEx.Unsupported = "{0}" \u529F\u80FD\u662F\u4E0D\u652F\u63F4\u7684\u9078\u64C7\u6027\u529F\u80FD
-
-NGCCRuntimeEx.UndefinedPrefix = \u524D\u7F6E\u78BC "{0}" \u672A\u5B9A\u7FA9
-
-
-
-MagicTransducer.AttributeRequired = \u9700\u8981 parseMethod \u53CA printMethod \u5C6C\u6027.
-
-ERR_ILLEGAL_FIXEDATTR = \u7576\u5C6C\u6027\u6709\u56FA\u5B9A\u503C\u9650\u5236\u689D\u4EF6\u6642, \u624D\u5141\u8A31\u4F7F\u7528 fixedAttributeAsConstantProperty.
-
-ERR_UNDEFINED_SIMPLE_TYPE = \u672A\u5B9A\u7FA9\u7684\u7C21\u55AE\u985E\u578B "{0}".
-
-ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE = \u4F9D\u64DA\u898F\u683C, \u4E0D\u5141\u8A31\u5C07\u7C21\u55AE\u985E\u578B "{0}" \u9023\u7D50\u81F3\u985E\u578B\u5B89\u5168 Enum.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/Messages.java
deleted file mode 100644
index a94d1cfe..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/Messages.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-enum Messages
-{
- ERR_CANNOT_BE_BOUND_TO_SIMPLETYPE,
- ERR_UNDEFINED_SIMPLE_TYPE,
- ERR_ILLEGAL_FIXEDATTR
- ;
-
- /** Loads a string resource and formats it with specified arguments. */
- String format( Object... args ) {
- String text = ResourceBundle.getBundle(Messages.class.getPackage().getName() + ".MessageBundle").getString(name());
- return MessageFormat.format(text,args);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/OptionalPropertyMode.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/OptionalPropertyMode.java
deleted file mode 100644
index 5fe2c6a2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/OptionalPropertyMode.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.annotation.XmlEnumValue;
-
-/**
- * Represents three constants of globalBindings/@optionalProperty.
- *
- * @author Kohsuke Kawaguchi
- */
-public enum OptionalPropertyMode {
- @XmlEnumValue("primitive")
- PRIMITIVE,
- @XmlEnumValue("wrapper")
- WRAPPER,
- @XmlEnumValue("isSet")
- ISSET
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/binding.rng b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/binding.rng
deleted file mode 100644
index 3f1edf28..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/binding.rng
+++ /dev/null
@@ -1,913 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<!DOCTYPE grammar [
-
-
-<!ENTITY XJCURI "http://java.sun.com/xml/ns/jaxb/xjc">
-]>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:cc="http://www.xml.gr.jp/xmlns/relaxngcc"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:xjc="&XJCURI;"
- xmlns:p="post-processor-to-build-schema-for-validation"
-
- ns="http://java.sun.com/xml/ns/jaxb"
-
- cc:runtime-type="com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.NGCCRuntimeEx"
- cc:package="com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.parser"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
-<!-- cc:$runtime-type="com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx">-->
-
- <cc:java-import>
- import com.sun.codemodel.internal.*;
- import com.sun.tools.internal.xjc.generator.bean.field.*;
- import com.sun.tools.internal.xjc.model.*;
- import com.sun.xml.internal.bind.api.impl.NameConverter;
- import com.sun.xml.internal.bind.v2.WellKnownNamespace;
- import com.sun.xml.internal.bind.marshaller.SAX2DOMEx;
- import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.*;
- import com.sun.tools.internal.xjc.reader.Const;
- import org.xml.sax.*;
- import org.w3c.dom.Document;
- import org.xml.sax.helpers.DefaultHandler;
- import java.util.*;
- import javax.xml.namespace.QName;
- import javax.xml.parsers.ParserConfigurationException;
- </cc:java-import>
-
- <start cc:class="Root">
- <choice>
- <!-- root of the external binding file. -->
- <ref name="declaration"/>
- <!-- root of the internal binding -->
- <ref name="annotation"/>
- </choice>
- </start>
-
- <!--
- in context of XML Schema annotation
- -->
- <define name="annotation" cc:access="public" cc:class="AnnotationState"
- cc:return-type="BindInfo" cc:return-value="bi">
-
- <cc:java-import>
- import java.io.StringWriter;
- import com.sun.xml.internal.bind.marshaller.DataWriter;
- </cc:java-import>
- <cc:java-body>
- // customization declarations
- public BindInfo bi;
-
- private StringWriter w;
-
- private SAX2DOMEx sax2dom;
- </cc:java-body>
-
- <element name="xs:annotation">
- bi = new BindInfo($runtime.copyLocator());
- $runtime.currentBindInfo = bi;
-
- <p:ignore><ref name="anyAttributes"/></p:ignore>
- <zeroOrMore>
- <choice>
- <element name="xs:appinfo">
- <p:ignore><ref name="anyAttributes"/></p:ignore>
- <zeroOrMore>
- <choice>
- <group>
- result = <ref name="declaration" />
- bi.addDecl(result);
- </group>
- <element>
- <anyName><except>
- <nsName ns="&XJCURI;"/>
- <nsName /><!-- JAXB namespace URI -->
- <nsName ns="http://www.w3.org/2001/XMLSchema" />
- </except></anyName>
-
- if($runtime.isExtensionURI($uri)) {
- // parse this sub-tree as an extension
- try {
- sax2dom = new SAX2DOMEx();
- } catch( ParserConfigurationException e ) {
- throw new Error(e); // impossible
- }
- $runtime.redirectSubtree(sax2dom,$uri,$localName,$qname);
- } else {
- // ignore this sub-tree
- sax2dom = null;
- $runtime.redirectSubtree(new DefaultHandler(),$uri,$localName,$qname);
- }
- <empty/>
- <p:ignore><ref name="anyContents"/></p:ignore>
- if(sax2dom!=null) {
- bi.addDecl(new BIXPluginCustomization(((Document)sax2dom.getDOM()).getDocumentElement(),$runtime.copyLocator()));
- }
- </element>
- <text/>
- </choice>
- </zeroOrMore>
- </element>
- <!-- ignore documentations -->
- <element name="xs:documentation">
- <p:ignore><ref name="anyAttributes"/></p:ignore>
- <zeroOrMore>
- <choice>
- <group>
- msg = <text />
- bi.appendDocumentation($runtime.truncateDocComment(msg),true);
- </group>
- <group>
- <element>
- <anyName />
- w = new StringWriter();
- DataWriter xw = new DataWriter(w,"UTF-8");
- xw.setXmlDecl(false);
- $runtime.redirectSubtree(xw,$uri,$localName,$qname);
- <empty/>
- <p:ignore><ref name="anyContents"/></p:ignore>
- </element>
- <![CDATA[
- bi.appendDocumentation("<pre>"+
- $runtime.escapeMarkup($runtime.truncateDocComment(w.toString()))+
- "</pre>",
- false );
- w=null;
- ]]>
- </group>
- </choice>
- </zeroOrMore>
- </element>
- </choice>
- </zeroOrMore>
- </element>
- </define>
-
-
-
- <!--
-
- Individual customization declarations
-
- -->
-
- <define name="declaration"
- cc:return-type="BIDeclaration" cc:return-value="result">
-
- <cc:java-body>
- private BIDeclaration result;
- </cc:java-body>
- <!-- result field will have the parsed object -->
- <choice>
- result = <ref name="globalBindings" />
- result = <ref name="schemaBindings" />
- result = <ref name="class"/>
- result = <ref name="conversion"/>
- result = <ref name="property"/>
- result = <ref name="typesafeEnum"/>
- result = <ref name="enumMember"/>
- <!-- result = <ref name="idSymbolSpace"/-->
- <!-- result = <ref name="dom"/-->
- </choice>
- </define>
-
-
- <define name="globalBindings"
- cc:return-type="BIGlobalBinding" cc:return-value="makeResult()">
-
- <cc:java-body>
- private Locator loc;
- private Map globalConvs = new HashMap();
- private NameConverter nameConverter = NameConverter.standard;
- private String enableJavaNamingConvention = "true";
- private String fixedAttrToConstantProperty = "false";
- private String needIsSetMethod = "false";
- private String simpleTypeSubstitution = "false";
- private boolean flattenClasses = false;
- private Set enumBaseTypes = new HashSet();
- private int defaultEnumSizeCap = 256;
- private boolean generateEnumMemberName = false;
- private boolean choiceContentPropertyWithModelGroupBinding = false;
- private boolean xSmartWildcardDefaultBinding = false;
- private boolean xSimpleMode;
- private boolean generateValueClass = true;
- private boolean generateElementClass = false;
- private boolean generateMixedExtensions = false;
-
- public BIGlobalBinding makeResult() {
- if( enumBaseTypes.size()==0 )
- enumBaseTypes.add(new QName(WellKnownNamespace.XML_SCHEMA,"NCName")); // defaults to NCName
-
- return new BIGlobalBinding(
- globalConvs,nameConverter,
- choiceContentPropertyWithModelGroupBinding,
- generateValueClass,
- generateElementClass,
- $runtime.parseBoolean(enableJavaNamingConvention),
- $runtime.parseBoolean(fixedAttrToConstantProperty),
- $runtime.parseBoolean(needIsSetMethod),
- $runtime.parseBoolean(simpleTypeSubstitution),
- generateEnumMemberName,
- flattenClasses,
- enumBaseTypes,
- defaultEnumSizeCap,
- ct,
- serializable,
- xSuperClass,
- xSuperInterface,
- xSimpleMode,
- xSmartWildcardDefaultBinding,
- loc);
- }
- </cc:java-body>
- <element name="globalBindings">
- loc = $runtime.copyLocator();
-
- <optional>
- <attribute name="underscoreBinding">
- <choice>
- <value>asWordSeparator</value><!-- default -->
- <group>
- <value>asCharInWord</value>
- nameConverter = NameConverter.jaxrpcCompatible;
- </group>
- </choice>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="enableJavaNamingConventions">
- enableJavaNamingConvention = <data type="boolean"/>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="fixedAttributeAsConstantProperty">
- fixedAttrToConstantProperty = <data type="boolean"/>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="generateIsSetMethod">
- needIsSetMethod = <data type="boolean"/>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="mapSimpleTypeDef">
- simpleTypeSubstitution = <data type="boolean"/>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="localScoping">
- <choice>
- <group>
- <value>nested</value>
- flattenClasses = false;
- </group>
- <group>
- <value>toplevel</value>
- flattenClasses = true;
- </group>
- </choice>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="collectionType">
- ct = <ref name="collectionType" />
- </attribute>
- </optional>
-
- <optional>
- <attribute name="typesafeEnumMemberName">
- <choice>
- <value>generateError</value> <!-- default -->
- <group>
- <value>generateName</value>
- generateEnumMemberName = true;
- </group>
- </choice>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="typesafeEnumBase">
- <list>
- <oneOrMore>
- value = <data type="QName"/>
- QName qn = $runtime.parseQName(value);
- enumBaseTypes.add( qn );
- </oneOrMore>
- </list>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="typesafeEnumMaxMembers">
- <list>
- <oneOrMore>
- value = <data type="int"/>
- defaultEnumSizeCap = Integer.parseInt(value);
- </oneOrMore>
- </list>
- </attribute>
- </optional>
-
-
- <optional>
- <attribute name="choiceContentProperty">
- value = <data type="boolean"/>
- choiceContentPropertyWithModelGroupBinding = $runtime.parseBoolean(value);
- </attribute>
- </optional>
-
- <optional>
- <attribute name="generateValueClass">
- value = <data type="boolean"/>
- generateValueClass = $runtime.parseBoolean(value);
- </attribute>
- </optional>
-
- <optional>
- <attribute name="generateElementClass">
- value = <data type="boolean"/>
- generateElementClass = $runtime.parseBoolean(value);
- </attribute>
- </optional>
-
- <optional>
- <attribute name="generateMixedExtensions">
- value = <data type="boolean"/>
- generateMixedExtensions = $runtime.parseBoolean(value);
- </attribute>
- </optional>
-
- <!-- unimplemented attributes -->
- <optional>
- <attribute name="enableValidation">
- value = <data type="boolean"/>
- if( $runtime.parseBoolean(value)==true )
- $runtime.reportUnsupportedFeature("enableValidation");
- </attribute>
- </optional>
- <optional>
- <attribute name="enableFailFastCheck">
- value = <data type="boolean"/>
- if( $runtime.parseBoolean(value)==true )
- $runtime.reportUnsupportedFeature("enableFailFastCheck");
- </attribute>
- </optional>
-
- <!-- body -->
- <zeroOrMore>
- <choice>
- <element name="javaType">
- <attribute name="xmlType">
- xmlType = <data type="QName"/>
- </attribute>
- conv = <ref name="conversionBody" />
-
- globalConvs.put( $runtime.parseQName(xmlType), conv );
- </element>
- <element name="serializable">
- <optional>
- <attribute name="uid">
- serialuid = <data type="long"/>
- </attribute>
- </optional>
- if(serialuid!=null)
- serializable = new BISerializable(Long.parseLong(serialuid));
- else
- serializable = new BISerializable(null);
- </element>
-
- <!-- global vendor extensions -->
- serializable = <ref name="serializable"/>
- xSuperClass = <ref name="superClass"/>
- xSuperInterface = <ref name="superInterface"/>
- <ref name="typeSubstitution" />
- <element name="xjc:smartWildcardDefaultBinding">
- <!--
- changes the default binding of wildcards so that unknown elements will be
- bound to DOM. This feature is not publicly available, and we may change it
- later.
- -->
- xSmartWildcardDefaultBinding = true;
- <empty />
- </element>
-
- <element name="xjc:simple">
- xSimpleMode = true;
- <empty />
- </element>
-
- <!--
- light-weight runtime. we no longer support them,
- but we don't issue an error when we see them.
- -->
- <element name="xjc:noMarshaller">
- <empty />
- </element>
- <element name="xjc:noUnmarshaller">
- <empty />
- </element>
- <element name="xjc:noValidator">
- <empty />
- </element>
- <element name="xjc:noValidatingUnmarshaller">
- <empty />
- </element>
- </choice>
- </zeroOrMore>
- </element>
- </define>
-
-
- <define name="schemaBindings"
- cc:return-type="BISchemaBinding" cc:return-value="makeResult()">
-
- <cc:java-body>
- private Locator loc;
- public BISchemaBinding makeResult() {
- return new BISchemaBinding(packageName,javadoc,tt,et,at,mt,nt,loc);
- }
- </cc:java-body>
-
- <element name="schemaBindings">
- loc = $runtime.copyLocator();
-
- <optional>
- <element name="package">
- <optional>
- packageName = <attribute name="name"/>
- </optional>
- <optional>
- javadoc = <ref name="javadoc"/>
- </optional>
- </element>
- </optional>
-
- <optional>
- <element name="nameXmlTransform">
- <!-- use newer version of RELAXNGCC and wrap them by <interleave> -->
- <zeroOrMore>
- <choice>
- <element name="typeName">
- tt = <ref name="nameXmlTransformRule"/>
- </element>
- <element name="elementName">
- et = <ref name="nameXmlTransformRule"/>
- </element>
- <element name="attributeName">
- at = <ref name="nameXmlTransformRule"/>
- </element>
- <element name="modelGroupName">
- mt = <ref name="nameXmlTransformRule"/>
- </element>
- <element name="anonymousTypeName">
- nt = <ref name="nameXmlTransformRule"/>
- </element>
- </choice>
- </zeroOrMore>
- </element>
- </optional>
- </element>
- </define>
-
- <define name="nameXmlTransformRule"
- cc:return-type="BISchemaBinding.NamingRule"
- cc:return-value="new BISchemaBinding.NamingRule(prefix,suffix)">
-
- <cc:java-body>
- private String prefix="";
- private String suffix="";
- </cc:java-body>
-
-
- <optional>
- <attribute name="prefix">
- prefix = <data type="NCName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="suffix">
- suffix = <data type="NCName"/>
- </attribute>
- </optional>
- </define>
-
-
-
- <define name="javadoc" cc:return-type="String" cc:return-value="javadoc">
- <element name="javadoc">
- javadoc = <text />
- javadoc = $runtime.truncateDocComment(javadoc);
- </element>
- </define>
-
- <define name="collectionType" cc:class="CollectionTypeState"
- cc:return-type="FieldRenderer" cc:return-value="r">
- <cc:java-body>
- private FieldRenderer r = null;
- </cc:java-body>
- type = <data type="token"/>
-
- if( type.equals("indexed") )
- r = FieldRenderer.ARRAY;
- else
- try {
- r = new UntypedListFieldRenderer( $runtime.codeModel.ref(type) );
- } catch( ClassNotFoundException e ) {
- throw new NoClassDefFoundError(e.getMessage());
- }
- </define>
-
-
-
- <define name="class" cc:class="BIClassState"
- cc:return-type="BIClass" cc:return-value="makeResult()">
-
- <cc:java-body>
- private Locator loc;
- public BIClass makeResult() {
- return new BIClass(loc,name,implClass,javadoc);
- }
- </cc:java-body>
-
- <element name="class">
- loc = $runtime.copyLocator();
- <optional>
- javadoc = <ref name="javadoc"/>
- </optional>
- <optional>
- <attribute name="name">
- name = <data type="identifier" datatypeLibrary="http://java.sun.com/xml/ns/relaxng/java-datatypes"/>
- </attribute>
- </optional>
- <optional>
- implClass = <attribute name="implClass"/>
- </optional>
- </element>
- </define>
-
- <define name="property"
- cc:return-type="BIProperty" cc:return-value="makeResult()">
-
- <cc:java-body>
- private Locator loc;
- private Boolean isConst = null;
- private Boolean isSet = null;
- private Boolean genElemProp = null;
-
- public BIProperty makeResult() throws SAXException {
- JType baseTypeRef = null;
- if(baseType!=null)
- baseTypeRef = $runtime.getType(baseType);
-
- return new BIProperty(loc,name,javadoc,baseTypeRef,conv,ct,isConst,isSet,genElemProp);
- }
- </cc:java-body>
-
- <element name="property">
- loc = $runtime.copyLocator();
- <optional>
- name = <attribute name="name"/>
- </optional>
- <optional>
- baseType = <attribute name="baseType"/>
- </optional>
- <optional>
- <attribute name="collectionType">
- ct = <ref name="collectionType" />
- </attribute>
- </optional>
- <optional>
- <attribute name="fixedAttributeAsConstantProperty">
- isConstStr = <data type="boolean"/>
- isConst = $runtime.parseBoolean(isConstStr)?Boolean.TRUE:Boolean.FALSE;
- </attribute>
- </optional>
- <optional>
- <attribute name="generateIsSetMethod">
- isSetStr = <data type="boolean"/>
- isSet = $runtime.parseBoolean(isSetStr)?Boolean.TRUE:Boolean.FALSE;
- </attribute>
- </optional>
- <optional>
- <attribute name="generateElementProperty">
- genElemPropStr = <data type="boolean"/>
- genElemProp = $runtime.parseBoolean(genElemPropStr)?Boolean.TRUE:Boolean.FALSE;
- </attribute>
- </optional>
- <optional>
- <attribute name="generateFailFastSetterMethod">
- failFast = <data type="boolean"/>
- </attribute>
- if( $runtime.parseBoolean(failFast) ) {
- $runtime.reportUnimplementedFeature("generateFailFastSetterMethod");
- }
- </optional>
-
-
- <interleave>
- <optional>
- javadoc = <ref name="javadoc"/>
- </optional>
- <optional>
- <element name="baseType">
- conv = <ref name="conversion"/>
- </element>
- </optional>
- </interleave>
- </element>
- </define>
-
- <define name="conversion"
- cc:return-type="BIConversion" cc:return-value="r">
- <element name="javaType">
- r = <ref name="conversionBody"/>
- </element>
- </define>
-
-
- <define name="conversionBody"
- cc:return-type="BIConversion" cc:return-value="makeResult()">
-
- <cc:java-import>
- import com.sun.tools.internal.xjc.generator.util.WhitespaceNormalizer;
- </cc:java-import>
- <cc:java-body><![CDATA[
- public BIConversion makeResult() throws SAXException {
- return new BIConversion.User( $runtime.copyLocator(), parse, print, $runtime.getType(type) );
- }
-
- // initialize with default values.
- private String type = "java.lang.String"; // in case a schema has an error
- private String parse = null;
- private String print = null;
- private boolean context = false;
- ]]></cc:java-body>
-
-
- <optional>
- parse = <attribute name="parseMethod" />
- </optional>
- <optional>
- print = <attribute name="printMethod" />
- </optional>
- <attribute name="name" cc:alias="type"/>
- <optional>
- <attribute name="hasNsContext">
- _context = <data type="boolean"/>
- context = $runtime.parseBoolean(_context);
- </attribute>
- </optional>
- </define>
-
-
- <!-- type safe enum customization -->
- <define name="typesafeEnum"
- cc:return-type="BIEnum" cc:return-value="makeResult()">
-
- <cc:java-import>
- import java.util.HashMap;
- </cc:java-import>
- <cc:java-body>
- private HashMap members = new HashMap();
- private boolean dontBind = false;
- private Locator loc,loc2;
-
- private BIEnum makeResult() {
- return new BIEnum(loc,dontBind,name,javadoc,members);
- }
- </cc:java-body>
-
- <element name="typesafeEnumClass">
- loc = $runtime.copyLocator();
- <choice>
- <attribute name="map">
- <value>false</value>
- dontBind = true;
- </attribute>
- <group>
- <optional>
- name = <attribute name="name"/>
- </optional>
- <optional>
- javadoc = <ref name="javadoc" />
- </optional>
- <zeroOrMore>
- jname = null;
- javadoc = null;
- <element name="typesafeEnumMember">
- loc2 = $runtime.copyLocator();
- <optional>
- jname = <attribute name="name"/>
- </optional>
- value = <attribute name="value"/>
- <optional>
- javadoc = <ref name="javadoc" />
- </optional>
- members.put( value, new BIEnumMember(loc2,jname,javadoc) );
- </element>
- </zeroOrMore>
- </group>
- </choice>
- </element>
- </define>
-
-
- <!-- stand-alone type safe enum member customization -->
- <!--
- Note that only the name attribute is allowed here, and the same element
- under the typesafeEnumClass is handled differently.
- -->
- <define name="enumMember"
- cc:return-type="BIEnumMember" cc:return-value="makeResult()">
- <cc:java-body>
- private Locator loc;
- private BIEnumMember makeResult() {
- return new BIEnumMember(loc,name,javadoc);
- }
- </cc:java-body>
-
- <element name="typesafeEnumMember">
- loc = $runtime.copyLocator();
- name = <attribute name="name"/>
- <optional>
- javadoc = <ref name="javadoc" />
- </optional>
- </element>
- </define>
-
-
- <!-- XJC-exntension: root class support -->
- <define name="superClass" cc:return-type="JDefinedClass" cc:return-value="makeResult()">
- <cc:java-body>
- private JDefinedClass makeResult() {
- try {
- JDefinedClass c = $runtime.codeModel._class(name);
- c.hide();
- return c;
- } catch( JClassAlreadyExistsException e ) {
- return e.getExistingClass();
- }
- }
- </cc:java-body>
-
- <element name="xjc:superClass">
- name = <attribute name="name" />
- </element>
- </define>
-
- <!-- XJC-exntension: root interface support -->
- <define name="superInterface" cc:return-type="JDefinedClass" cc:return-value="makeResult()">
- <cc:java-body>
- private JDefinedClass makeResult() {
- try {
- JDefinedClass c = $runtime.codeModel._class(name,ClassType.INTERFACE);
- c.hide();
- return c;
- } catch( JClassAlreadyExistsException e ) {
- return e.getExistingClass();
- }
- }
- </cc:java-body>
-
- <element name="xjc:superInterface">
- name = <attribute name="name" />
- </element>
- </define>
-
- <!-- XJC-exntension: serialization support -->
- <define name="serializable" cc:return-type="BISerializable" cc:return-value="makeResult()">
- <cc:java-body>
- private long uid = 1;
- private BISerializable makeResult() {
- return new BISerializable(uid);
- }
- </cc:java-body>
-
- <element name="xjc:serializable">
-// loc = $runtime.copyLocator();
- <optional>
- <attribute name="uid">
- v = <data type="long"/>
- uid = Long.parseLong(v);
- </attribute>
- </optional>
- </element>
- </define>
-
-
- <!-- XJC extension: type substitution -->
- <define name="typeSubstitution" cc:return-type="boolean" cc:return-value="true">
- <element name="xjc:typeSubstitution">
- <attribute name="type"><value>complex</value></attribute>
- </element>
- </define>
-
-
- <!-- XJC extension: ID symbol space support -->
- <!--define name="idSymbolSpace" cc:return-type="BIXIdSymbolSpace" cc:return-value="makeResult()">
- <cc:java-body>
- private Locator loc;
- private BIXIdSymbolSpace makeResult() {
- return new BIXIdSymbolSpace(loc,name);
- }
- </cc:java-body>
-
- <element name="xjc:idSymbolSpace">
- loc = $runtime.copyLocator();
- name = <attribute name="name"/>
- </element>
- </define-->
-
-
- <!-- XJC extension: DOM support -->
- <!--define name="dom" cc:return-type="BIXDom" cc:return-value="makeResult()">
- <cc:java-import>
- import com.sun.tools.internal.xjc.grammar.ext.*;
- </cc:java-import>
- <cc:java-body>
- private String factoryName = "w3c";
- private Locator loc;
- private BIXDom makeResult() {
- try {
- return new BIXDom(DOMItemFactory.getInstance(factoryName),loc);
- } catch( DOMItemFactory.UndefinedNameException e ) {
- throw new InternalError(); // impossible since we use validation to reject incorrect values
- }
- }
- </cc:java-body>
-
- <element name="xjc:dom">
- loc = $runtime.copyLocator();
- <optional>
- <attribute name="type">
- <choice>
- factoryName = <value>dom4j</value>
- factoryName = <value>w3c</value>
- </choice>
- </attribute>
- </optional>
- </element>
- </define-->
-
-
-
-
-
-
- <p:ignore>
- <!-- these patterns are ignored when using RelaxNGCC -->
- <define name="anyContents">
- <zeroOrMore>
- <choice>
- <text/>
- <ref name="anyAttributes"/>
- <element>
- <anyName/>
- <ref name="anyContents"/>
- </element>
- </choice>
- </zeroOrMore>
- </define>
-
- <define name="anyAttributes">
- <zeroOrMore>
- <attribute>
- <anyName/>
- <text/>
- </attribute>
- </zeroOrMore>
- </define>
- </p:ignore>
-</grammar>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/binding.xsd b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/binding.xsd
deleted file mode 100644
index 3faefe3b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/binding.xsd
+++ /dev/null
@@ -1,327 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<!-- THIS IS A GENERATED FILE. DO NOT MODIFY. -->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://java.sun.com/xml/ns/jaxb" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
- <xs:annotation>
- <xs:documentation>
- JAXB customization schema
- </xs:documentation>
- </xs:annotation>
-
- <xs:import namespace="http://java.sun.com/xml/ns/jaxb/xjc" schemaLocation="xjc.xsd"/>
- <xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="xs.xsd"/>
- <xs:element name="bindings">
- <xs:complexType>
- <xs:sequence>
- <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
- </xs:sequence>
- <xs:attribute name="schemaLocation" type="xs:string" />
- <xs:attribute name="node" type="xs:string" />
- </xs:complexType>
- </xs:element>
- <xs:element name="declaration" abstract="true"/>
- <xs:element name="globalBindings" substitutionGroup="jaxb:declaration">
- <xs:annotation>
- <xs:documentation>
- Defines global customization. Only one of this is allowed per compilation.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="javaType">
- <xs:complexType>
- <xs:attribute name="xmlType" use="required" type="xs:QName"/>
- <xs:attributeGroup ref="jaxb:conversionBody"/>
- </xs:complexType>
- </xs:element>
- <xs:element ref="jaxb:serializable"/>
- <xs:element ref="xjc:serializable"/>
- <xs:element ref="xjc:superClass"/>
- <xs:element ref="xjc:superInterface"/>
- <xs:element ref="xjc:typeSubstitution"/>
- <xs:element ref="xjc:smartWildcardDefaultBinding"/>
- <xs:element ref="xjc:simple"/>
- <xs:element ref="xjc:treatRestrictionLikeNewType"/>
- <xs:group ref="xjc:globalJavaType" />
- <xs:element ref="xjc:generateElementProperty"/>
- <xs:element ref="xjc:noMarshaller"/>
- <xs:element ref="xjc:noUnmarshaller"/>
- <xs:element ref="xjc:noValidator"/>
- <xs:element ref="xjc:noValidatingUnmarshaller"/>
- </xs:choice>
- <xs:attribute name="underscoreBinding">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="asWordSeparator"/>
- <xs:enumeration value="asCharInWord"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="optionalProperty">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="wrapper"/>
- <xs:enumeration value="primitive"/>
- <xs:enumeration value="isSet"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="enableJavaNamingConventions" type="xs:boolean"/>
- <xs:attribute name="fixedAttributeAsConstantProperty" type="xs:boolean"/>
- <xs:attribute name="generateIsSetMethod" type="xs:boolean"/>
- <xs:attribute name="mapSimpleTypeDef" type="xs:boolean"/>
- <xs:attribute name="localScoping">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="nested" />
- <xs:enumeration value="toplevel" />
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="collectionType" type="jaxb:collectionType"/>
- <xs:attribute name="typesafeEnumMemberName">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="generateError"/>
- <xs:enumeration value="generateName"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="typesafeEnumBase">
- <xs:simpleType>
- <xs:restriction>
- <xs:simpleType>
- <xs:list itemType="xs:QName"/>
- </xs:simpleType>
- <xs:minLength value="1"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="typesafeEnumMaxMembers">
- <xs:simpleType>
- <xs:restriction>
- <xs:simpleType>
- <xs:list itemType="xs:int"/>
- </xs:simpleType>
- <xs:minLength value="1"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="choiceContentProperty" type="xs:boolean"/>
- <xs:attribute name="generateValueClass" type="xs:boolean"/>
- <xs:attribute name="generateElementClass" type="xs:boolean"/>
- <xs:attribute name="generateMixedExtensions" type="xs:boolean"/>
- <xs:attribute name="generateElementProperty" type="xs:boolean"/>
- <xs:attribute name="enableValidation" type="xs:boolean"/>
- <xs:attribute name="enableFailFastCheck" type="xs:boolean"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="serializable">
- <xs:complexType>
- <xs:attribute name="uid" type="xs:long"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="schemaBindings" substitutionGroup="jaxb:declaration">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" ref="jaxb:package"/>
- <xs:element minOccurs="0" ref="jaxb:nameXmlTransform"/>
- </xs:sequence>
- <xs:attribute name="map" type="xs:boolean" />
- </xs:complexType>
- </xs:element>
- <xs:element name="package">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" ref="jaxb:javadoc"/>
- </xs:sequence>
- <xs:attribute name="name"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="nameXmlTransform">
- <xs:complexType>
- <xs:all>
- <xs:element ref="jaxb:typeName" minOccurs='0'/>
- <xs:element ref="jaxb:elementName" minOccurs='0'/>
- <xs:element ref="jaxb:attributeName" minOccurs='0'/>
- <xs:element ref="jaxb:modelGroupName" minOccurs='0'/>
- <xs:element ref="jaxb:anonymousTypeName" minOccurs='0'/>
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element name="typeName">
- <xs:complexType>
- <xs:attributeGroup ref="jaxb:nameXmlTransformRule"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="elementName">
- <xs:complexType>
- <xs:attributeGroup ref="jaxb:nameXmlTransformRule"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="attributeName">
- <xs:complexType>
- <xs:attributeGroup ref="jaxb:nameXmlTransformRule"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="modelGroupName">
- <xs:complexType>
- <xs:attributeGroup ref="jaxb:nameXmlTransformRule"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="anonymousTypeName">
- <xs:complexType>
- <xs:attributeGroup ref="jaxb:nameXmlTransformRule"/>
- </xs:complexType>
- </xs:element>
- <xs:attributeGroup name="nameXmlTransformRule">
- <xs:attribute name="prefix" type="xs:NCName"/>
- <xs:attribute name="suffix" type="xs:NCName"/>
- </xs:attributeGroup>
- <xs:element name="javadoc" type="xs:string"/>
- <xs:simpleType name="collectionType">
- <xs:restriction base="xs:token"/>
- </xs:simpleType>
- <xs:element name="class" substitutionGroup="jaxb:declaration">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" ref="jaxb:javadoc"/>
- </xs:sequence>
- <xs:attribute name="name" type="xs:string"/>
- <xs:attribute name="implClass"/>
- <xs:attribute name="ref"/>
- <xs:attribute ref="xjc:recursive" use="optional"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="property" substitutionGroup="jaxb:declaration">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="jaxb:javadoc"/>
- <xs:element ref="jaxb:baseType"/>
- </xs:choice>
- <xs:attribute name="name"/>
- <xs:attribute name="collectionType" type="jaxb:collectionType"/>
- <xs:attribute name="fixedAttributeAsConstantProperty" type="xs:boolean"/>
- <xs:attribute name="generateIsSetMethod" type="xs:boolean"/>
- <xs:attribute name="generateElementProperty" type="xs:boolean"/>
- <xs:attribute name="generateFailFastSetterMethod" type="xs:boolean"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="baseType">
- <xs:complexType>
- <xs:sequence>
- <xs:choice minOccurs="0"><!-- XML Schema is brain dead -->
- <xs:element ref="jaxb:javaType" />
- <xs:element ref="xjc:javaType" />
- </xs:choice>
- </xs:sequence>
- <xs:attribute name="name"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="javaType" substitutionGroup="jaxb:declaration">
- <xs:complexType>
- <xs:attributeGroup ref="jaxb:conversionBody"/>
- </xs:complexType>
- </xs:element>
- <xs:attributeGroup name="conversionBody">
- <xs:attribute name="parseMethod"/>
- <xs:attribute name="printMethod"/>
- <xs:attribute name="name" use="required"/>
- <xs:attribute name="hasNsContext" type="xs:boolean"/>
- </xs:attributeGroup>
- <xs:element name="typesafeEnumClass" substitutionGroup="jaxb:declaration">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" ref="jaxb:javadoc"/>
- <xs:element minOccurs="0" maxOccurs="unbounded" name="typesafeEnumMember">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" ref="jaxb:javadoc"/>
- </xs:sequence>
- <xs:attribute name="name"/>
- <xs:attribute name="value" use="required"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="map">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="name"/>
- <xs:attribute name="ref"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="typesafeEnumMember" substitutionGroup="jaxb:declaration">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" ref="jaxb:javadoc"/>
- </xs:sequence>
- <xs:attribute name="name" use="required"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="dom">
- <xs:complexType>
- <xs:attribute name="type" default="w3c"/>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="inlineBinaryData">
- <xs:annotation><xs:documentation><![CDATA[
- Disable binary optimization.
-
- Used on elements like <xs:element name="foo" type="xs:base64Binary"/> to indicate
- that this base64 binary data is always inlined and never subjected to the binary
- transfer optimization (such as XOP/MTOM)
- ]]></xs:documentation></xs:annotation>
- <xs:complexType />
- </xs:element>
-
- <xs:element name="factoryMethod">
- <xs:annotation><xs:documentation><![CDATA[
- Controls the name of the factory method on ObjectFactory.
- ]]></xs:documentation></xs:annotation>
- <xs:complexType>
- <xs:sequence />
- <xs:attribute name="name" type="xs:string" use="required" />
- </xs:complexType>
- </xs:element>
-
- <xs:group name="anyContents">
- <xs:sequence>
- <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
- </xs:sequence>
- </xs:group>
- <xs:attributeGroup name="anyContents">
- <xs:attributeGroup ref="jaxb:anyAttributes"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="anyAttributes">
- <xs:anyAttribute processContents="skip"/>
- </xs:attributeGroup>
-</xs:schema>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package-info.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package-info.java
deleted file mode 100644
index 4323a495..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package-info.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-@XmlSchema(elementFormDefault = QUALIFIED, namespace=Const.JAXB_NSURI)
-package com.sun.tools.internal.xjc.reader.xmlschema.bindinfo;
-
-import javax.xml.bind.annotation.XmlSchema;
-
-import com.sun.tools.internal.xjc.reader.Const;
-
-import static javax.xml.bind.annotation.XmlNsForm.QUALIFIED;
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package.html b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package.html
deleted file mode 100644
index 17d2298b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/package.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<body>
-Object Model that represents customization declarations.
-
-<p>
- <a href="http://relaxngcc.sourceforge.net/">RelaxNGCC</a> is used to parse
- XML syntax into this representation, and the other parts of XJC will use
- this object model.
-</p>
-</body>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/xjc.xsd b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/xjc.xsd
deleted file mode 100644
index ed2dc815..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/xjc.xsd
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://java.sun.com/xml/ns/jaxb/xjc" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
- <xs:import namespace="http://java.sun.com/xml/ns/jaxb" schemaLocation="binding.xsd"/>
- <xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="xs.xsd"/>
- <xs:element name="smartWildcardDefaultBinding">
- <xs:complexType/>
- </xs:element>
- <xs:element name="simple">
- <xs:complexType/>
- </xs:element>
- <xs:element name="treatRestrictionLikeNewType">
- <xs:complexType/>
- </xs:element>
- <xs:element name="noMarshaller">
- <xs:complexType/>
- </xs:element>
- <xs:element name="noUnmarshaller">
- <xs:complexType/>
- </xs:element>
- <xs:element name="noValidator">
- <xs:complexType/>
- </xs:element>
- <xs:element name="substitutable">
- <xs:complexType/>
- </xs:element>
- <xs:element name="noValidatingUnmarshaller">
- <xs:complexType/>
- </xs:element>
- <xs:element name="superClass">
- <xs:complexType>
- <xs:attribute name="name" use="required"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="superInterface">
- <xs:complexType>
- <xs:attribute name="name" use="required"/>
- </xs:complexType>
- </xs:element>
-
- <xs:complexType name="javaTypeContent">
- <xs:attribute name="name" use="required"/>
- <xs:attribute name="adapter" use="required"/>
- </xs:complexType>
- <xs:element name="javaType" type="xjc:javaTypeContent"/>
- <xs:group name="globalJavaType">
- <xs:sequence>
- <xs:element name="javaType">
- <xs:complexType>
- <xs:complexContent>
- <xs:extension base="xjc:javaTypeContent">
- <xs:attribute name="xmlType" use="required" type="xs:QName"/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:group>
-
- <xs:element name="allowMixedTypeExtensions" type="xs:boolean" />
-
- <xs:element name="generateElementProperty" type="xs:boolean" />
- <xs:element name="dom">
- <xs:complexType>
- <xs:attribute name="type" default="w3c"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="serializable">
- <xs:complexType>
- <xs:attribute name="uid" type="xs:long"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="typeSubstitution">
- <xs:complexType>
- <xs:attribute name="type" use="required">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="complex"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
-
- <xs:attribute name="recursive"/>
-
-</xs:schema>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/xs.xsd b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/xs.xsd
deleted file mode 100644
index d7c68fdd..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/xs.xsd
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
- <xs:import namespace="http://java.sun.com/xml/ns/jaxb" schemaLocation="binding.xsd"/>
- <xs:import namespace="http://java.sun.com/xml/ns/jaxb/xjc" schemaLocation="xjc.xsd"/>
- <xs:element name="annotation">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="xs:appinfo"/>
- <xs:element ref="xs:documentation"/>
- </xs:choice>
- <xs:attributeGroup ref="jaxb:anyAttributes"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="appinfo">
- <xs:complexType mixed="true">
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:any processContents="lax" />
- </xs:choice>
- <xs:attributeGroup ref="jaxb:anyAttributes"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="documentation">
- <xs:complexType mixed="true">
- <xs:sequence>
- <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
- </xs:sequence>
- <xs:attributeGroup ref="jaxb:anyAttributes"/>
- </xs:complexType>
- </xs:element>
-</xs:schema>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java
deleted file mode 100644
index e15b3aa9..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.ct;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import com.sun.tools.internal.xjc.reader.xmlschema.WildcardNameClassBuilder;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSDeclaration;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-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;
-import com.sun.xml.internal.rngom.nc.SimpleNameClass;
-
-/**
- * Binds a complex type derived from another complex type by extension.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-abstract class AbstractExtendedComplexTypeBuilder extends CTBuilder {
-
- /**
- * Map from {@link XSComplexType} to {@link NameClass}[2] that
- * represents the names used in its child elements [0] and
- * attributes [1].
- */
- protected final Map<XSComplexType, NameClass[]> characteristicNameClasses = new HashMap<XSComplexType, NameClass[]>();
-
- /**
- * 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++ )
- nc = new ChoiceNameClass(nc, group.getChild(i).getTerm().apply(this));
- return nc;
- }
-
- public NameClass elementDecl(XSElementDecl decl) {
- return getNameClass(decl);
- }
- };
-
- /**
- * Checks if the particles/attributes defined in the type parameter
- * collides with the name classes of anc/enc.
- *
- * @return true if there's a collision.
- */
- protected boolean checkCollision(NameClass anc, NameClass enc, XSComplexType type) {
- NameClass[] chnc = characteristicNameClasses.get(type);
- if (chnc == null) {
- chnc = new NameClass[2];
- chnc[0] = getNameClass(type.getContentType());
-
- // build attribute name classes
- NameClass nc = NameClass.NULL;
- Iterator itr = type.iterateAttributeUses();
- while( itr.hasNext() )
- anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl()));
- XSWildcard wc = type.getAttributeWildcard();
- if(wc!=null)
- nc = new ChoiceNameClass(nc, WildcardNameClassBuilder.build(wc));
- chnc[1] = nc;
-
- characteristicNameClasses.put(type, chnc);
- }
-
- return chnc[0].hasOverlapWith(enc) || chnc[1].hasOverlapWith(anc);
- }
-
- /**
- * Looks for the derivation chain t_1 > t_2 > ... > t
- * and find t_i such that t_i derives by restriction but
- * for every j>i, t_j derives by extension.
- *
- * @return null
- * If there's no such t_i or if t_i is any type.
- */
- protected XSComplexType getLastRestrictedType(XSComplexType t) {
- if (t.getBaseType() == schemas.getAnyType()) {
- return null; // we don't count the restriction from anyType
- }
- if (t.getDerivationMethod() == XSType.RESTRICTION) {
- return t;
- }
-
- XSComplexType baseType = t.getBaseType().asComplexType();
- if (baseType != null) {
- return getLastRestrictedType(baseType);
- } else {
- return null;
- }
- }
-
- /**
- * Checks if this new extension is safe.
- *
- * UGLY.
- * <p>
- * If you have ctA extending ctB and ctB restricting ctC, our
- * Java classes will look like CtAImpl extending CtBImpl
- * extending CtCImpl.
- *
- * <p>
- * Since a derived class unmarshaller uses the base class unmarshaller,
- * this could potentially result in incorrect unmarshalling.
- * We used to just reject such a case, but then we found that
- * there are schemas that are using it.
- *
- * <p>
- * One generalized observation that we reached is that if the extension
- * is only adding new elements/attributes which has never been used
- * in any of its base class (IOW, if none of the particle / attribute use /
- * attribute wildcard can match the name of newly added elements/attributes)
- * then it is safe to add them.
- *
- * <p>
- * This function checks if the derivation chain to this type is
- * not using restriction, and if it is, then checks if it is safe
- * according to the above condition.
- *
- * @return false
- * If this complex type needs to be rejected.
- */
- protected boolean checkIfExtensionSafe(XSComplexType baseType, XSComplexType thisType) {
- XSComplexType lastType = getLastRestrictedType(baseType);
-
- if (lastType == null) {
- return true; // no restriction in derivation chain
- }
- NameClass anc = NameClass.NULL;
- // build name class for attributes in new complex type
- Iterator itr = thisType.iterateDeclaredAttributeUses();
- while (itr.hasNext()) {
- anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl()));
- }
- // TODO: attribute wildcard
-
- NameClass enc = getNameClass(thisType.getExplicitContent());
-
- // check against every base type ... except the root anyType
- while (lastType != lastType.getBaseType()) {
- if (checkCollision(anc, enc, lastType)) {
- return false;
- }
-
- if (lastType.getBaseType().isSimpleType()) // if the base type is a simple type, there won't be
- // any further name collision.
- {
- return true;
- }
-
- lastType = lastType.getBaseType().asComplexType();
- }
-
- return true; // OK
- }
-
- /**
- * Gets a {@link NameClass} that represents all the terms in the given content type.
- * If t is not a particle, just return an empty name class.
- */
- private NameClass getNameClass(XSContentType t) {
- if(t==null) return NameClass.NULL;
- XSParticle p = t.asParticle();
- if(p==null) return NameClass.NULL;
- else return p.getTerm().apply(contentModelNameClassBuilder);
- }
-
- /**
- * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
- */
- private NameClass getNameClass(XSDeclaration decl) {
- return new SimpleNameClass(new QName(decl.getTargetNamespace(), decl.getName()));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/CTBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/CTBuilder.java
deleted file mode 100644
index f069abe6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/CTBuilder.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.ct;
-
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.reader.Ring;
-import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
-import com.sun.tools.internal.xjc.reader.xmlschema.BindGreen;
-import com.sun.tools.internal.xjc.reader.xmlschema.ClassSelector;
-import com.sun.tools.internal.xjc.reader.xmlschema.SimpleTypeBuilder;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-
-/**
- * Builds a field expression from a complex type.
- *
- * Depending on a "kind" of complex type, the binding is
- * quite different. For example, how a complex type is bound
- * when it is extended from another complex type is very
- * different from how it's bound when it has, say, mixed content model.
- *
- * Each different algorithm of binding a complex type is implemented
- * as an implementation of this interface.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-abstract class CTBuilder {
- /**
- * Returns true if this owner can handle the given complex type.
- */
- abstract boolean isApplicable(XSComplexType ct);
-
- /**
- * Binds the given complex type. This method will be called
- * only when the <code>isApplicable</code> method returns true.
- */
- abstract void build(XSComplexType ct);
-
- protected final ComplexTypeFieldBuilder builder = Ring.get(ComplexTypeFieldBuilder.class);
- protected final ClassSelector selector = Ring.get(ClassSelector.class);
- protected final SimpleTypeBuilder simpleTypeBuilder = Ring.get(SimpleTypeBuilder.class);
- protected final ErrorReceiver errorReceiver = Ring.get(ErrorReceiver.class);
- protected final BindGreen green = Ring.get(BindGreen.class);
- protected final XSSchemaSet schemas = Ring.get(XSSchemaSet.class);
- protected final BGMBuilder bgmBuilder = Ring.get(BGMBuilder.class);
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ChoiceContentComplexTypeBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ChoiceContentComplexTypeBuilder.java
deleted file mode 100644
index 6c7f86cc..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ChoiceContentComplexTypeBuilder.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.ct;
-
-import java.util.Collections;
-
-import static com.sun.tools.internal.xjc.reader.xmlschema.ct.ComplexTypeBindingMode.NORMAL;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSParticle;
-
-/**
- * Binds a complex type whose immediate child is a choice
- * model group to a choice content interface.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ChoiceContentComplexTypeBuilder extends CTBuilder {
-
- public boolean isApplicable(XSComplexType ct) {
- if( !bgmBuilder.getGlobalBinding().isChoiceContentPropertyEnabled() )
- return false;
-
- if( ct.getBaseType()!=schemas.getAnyType() )
- // My reading of the spec is that if a complex type is
- // derived from another complex type by extension,
- // its top level model group is always a sequence
- // that combines the base type content model and
- // the extension defined in the new complex type.
- return false;
-
- XSParticle p = ct.getContentType().asParticle();
- if(p==null)
- return false;
-
- XSModelGroup mg = getTopLevelModelGroup(p);
-
- if( mg.getCompositor()!=XSModelGroup.CHOICE )
- return false;
-
- if( p.isRepeated() )
- return false;
-
- return true;
- }
-
-
-
- private XSModelGroup getTopLevelModelGroup(XSParticle p) {
- XSModelGroup mg = p.getTerm().asModelGroup();
- if( p.getTerm().isModelGroupDecl() )
- mg = p.getTerm().asModelGroupDecl().getModelGroup();
- return mg;
- }
-
- public void build(XSComplexType ct) {
- XSParticle p = ct.getContentType().asParticle();
-
- builder.recordBindingMode(ct,NORMAL);
-
- bgmBuilder.getParticleBinder().build(p,Collections.singleton(p));
-
- green.attContainer(ct);
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ComplexTypeBindingMode.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ComplexTypeBindingMode.java
deleted file mode 100644
index b9b480b6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ComplexTypeBindingMode.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.ct;
-
-/**
- * Three-state flag for a complex type.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public enum ComplexTypeBindingMode {
-
- /**
- * Neither FALLBACK nor NOMOREEXTENSION.
- */
- NORMAL,
-
- /**
- * If a complex type has falled back to the general list content and
- * it is not NOMOREEXTENSION.
- */
- FALLBACK_CONTENT,
-
- /**
- * If a complex type has falled back to the rest content and
- * it is not NOMOREEXTENSION.
- */
- FALLBACK_REST,
-
- /**
- * If a complex type has fallen to the dummy property in order
- * to override previously inherited content.
- */
- FALLBACK_EXTENSION
-
-//
-// /**
-// * If a complex type is derived by restriction from a complex type
-// * other than the ur-type. Once this flag is turned on, no more
-// * derivation by extension is allowed.
-// */
-// static final ComplexTypeBindingMode NOMOREEXTENSION = new ComplexTypeBindingMode("noMoreExtension");
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ComplexTypeFieldBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ComplexTypeFieldBuilder.java
deleted file mode 100644
index 8aa1a1ab..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ComplexTypeFieldBuilder.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.ct;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
-import com.sun.tools.internal.xjc.reader.xmlschema.BindingComponent;
-import com.sun.xml.internal.xsom.XSComplexType;
-
-/**
- * single entry point of building a field expression from a complex type.
- *
- * One object is created for one {@link BGMBuilder}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class ComplexTypeFieldBuilder extends BindingComponent {
-
- /**
- * All installed available complex type builders.
- *
- * <p>
- * Builders are tried in this order, to put specific ones first.
- */
- private final CTBuilder[] complexTypeBuilders = new CTBuilder[]{
- new MultiWildcardComplexTypeBuilder(),
- new MixedExtendedComplexTypeBuilder(),
- new MixedComplexTypeBuilder(),
- new FreshComplexTypeBuilder(),
- new ExtendedComplexTypeBuilder(),
- new RestrictedComplexTypeBuilder(),
- new STDerivedComplexTypeBuilder()
- };
-
- /** Records ComplexTypeBindingMode for XSComplexType. */
- private final Map<XSComplexType,ComplexTypeBindingMode> complexTypeBindingModes =
- new HashMap<XSComplexType,ComplexTypeBindingMode>();
-
- /**
- * Binds a complex type to a field expression.
- */
- public void build( XSComplexType type ) {
- for( CTBuilder ctb : complexTypeBuilders )
- if( ctb.isApplicable(type) ) {
- ctb.build(type);
- return;
- }
-
- assert false; // shall never happen
- }
-
- /**
- * Records the binding mode of the given complex type.
- *
- * <p>
- * Binding of a derived complex type often depends on that of the
- * base complex type. For example, when a base type is bound to
- * the getRest() method, all the derived complex types will be bound
- * in the same way.
- *
- * <p>
- * For this reason, we have to record how each complex type is being
- * bound.
- */
- public void recordBindingMode( XSComplexType type, ComplexTypeBindingMode flag ) {
- // it is an error to override the flag.
- Object o = complexTypeBindingModes.put(type,flag);
- assert o==null;
- }
-
- /**
- * Obtains the binding mode recorded through
- * {@link #recordBindingMode(XSComplexType, ComplexTypeBindingMode)}.
- */
- protected ComplexTypeBindingMode getBindingMode( XSComplexType type ) {
- ComplexTypeBindingMode r = complexTypeBindingModes.get(type);
- assert r!=null;
- return r;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ExtendedComplexTypeBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ExtendedComplexTypeBuilder.java
deleted file mode 100644
index 208b5ec2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/ExtendedComplexTypeBuilder.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.ct;
-
-
-import com.sun.tools.internal.xjc.model.CClass;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSType;
-
-
-/**
- * Binds a complex type derived from another complex type by extension.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-final class ExtendedComplexTypeBuilder extends AbstractExtendedComplexTypeBuilder {
-
- public boolean isApplicable(XSComplexType ct) {
- XSType baseType = ct.getBaseType();
- return baseType!=schemas.getAnyType()
- && baseType.isComplexType()
- && ct.getDerivationMethod()==XSType.EXTENSION;
- }
-
- public void build(XSComplexType ct) {
- XSComplexType baseType = ct.getBaseType().asComplexType();
-
- // build the base class
- CClass baseClass = selector.bindToType(baseType, ct, true);
- assert baseClass != null; // global complex type must map to a class
-
- selector.getCurrentBean().setBaseClass(baseClass);
-
- // derivation by extension.
- ComplexTypeBindingMode baseTypeFlag = builder.getBindingMode(baseType);
-
- XSContentType explicitContent = ct.getExplicitContent();
-
- if (!checkIfExtensionSafe(baseType, ct)) {
- // error. We can't handle any further extension
- errorReceiver.error(ct.getLocator(),
- Messages.ERR_NO_FURTHER_EXTENSION.format(
- baseType.getName(), ct.getName() )
- );
- return;
- }
-
- // explicit content is always either empty or a particle.
- if (explicitContent != null && explicitContent.asParticle() != null) {
- if (baseTypeFlag == ComplexTypeBindingMode.NORMAL) {
- // if we have additional explicit content, process them.
- builder.recordBindingMode(ct,
- bgmBuilder.getParticleBinder().checkFallback(explicitContent.asParticle())
- ? ComplexTypeBindingMode.FALLBACK_REST
- : ComplexTypeBindingMode.NORMAL);
-
- bgmBuilder.getParticleBinder().build(explicitContent.asParticle());
-
- } else {
- // the base class has already done the fallback.
- // don't add anything new
- builder.recordBindingMode(ct, baseTypeFlag );
- }
- } else {
- // if it's empty, no additional processing is necessary
- builder.recordBindingMode(ct, baseTypeFlag);
- }
-
- // adds attributes and we are through.
- green.attContainer(ct);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/FreshComplexTypeBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/FreshComplexTypeBuilder.java
deleted file mode 100644
index e5d04a62..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/FreshComplexTypeBuilder.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.ct;
-
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
-import static com.sun.tools.internal.xjc.reader.xmlschema.ct.ComplexTypeBindingMode.FALLBACK_CONTENT;
-import static com.sun.tools.internal.xjc.reader.xmlschema.ct.ComplexTypeBindingMode.NORMAL;
-import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSTerm;
-import com.sun.xml.internal.xsom.visitor.XSContentTypeVisitor;
-
-/**
- * Builds a complex type that inherits from the anyType complex type.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-final class FreshComplexTypeBuilder extends CTBuilder {
-
- public boolean isApplicable(XSComplexType ct) {
- return ct.getBaseType()==schemas.getAnyType()
- && !ct.isMixed(); // not mixed
- }
-
- public void build(final XSComplexType ct) {
- XSContentType contentType = ct.getContentType();
-
- contentType.visit(new XSContentTypeVisitor() {
- public void simpleType(XSSimpleType st) {
- builder.recordBindingMode(ct,ComplexTypeBindingMode.NORMAL);
-
- simpleTypeBuilder.refererStack.push(ct);
- TypeUse use = simpleTypeBuilder.build(st);
- simpleTypeBuilder.refererStack.pop();
-
- BIProperty prop = BIProperty.getCustomization(ct);
- CPropertyInfo p = prop.createValueProperty("Value",false,ct,use, BGMBuilder.getName(st));
- selector.getCurrentBean().addProperty(p);
- }
-
- public void particle(XSParticle p) {
- // determine the binding of this complex type.
-
- builder.recordBindingMode(ct,
- bgmBuilder.getParticleBinder().checkFallback(p)?FALLBACK_CONTENT:NORMAL);
-
- bgmBuilder.getParticleBinder().build(p);
-
- XSTerm term = p.getTerm();
- if(term.isModelGroup() && term.asModelGroup().getCompositor()==XSModelGroup.ALL)
- selector.getCurrentBean().setOrdered(false);
-
- }
-
- public void empty(XSContentType e) {
- builder.recordBindingMode(ct,NORMAL);
- }
- });
-
- // adds attributes and we are through.
- green.attContainer(ct);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle.properties
deleted file mode 100644
index 08892605..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ERR_NO_FURTHER_EXTENSION = \
- Base complex type "{0}" is derived by restriction, while this complex type "{1}" \
- is derived by extension. This is not currently handled by XJC, but we are \
- seeking input on this issue. Please report this to the JAXB team.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_de.properties
deleted file mode 100644
index 170b86b3..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_de.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ERR_NO_FURTHER_EXTENSION = Komplexer Basistyp "{0}" wird von Einschr\u00E4nkung abgeleitet, w\u00E4hrend dieser komplexe Typ "{1}" von Erweiterung abgeleitet wird. Dies wird aktuell von XJC nicht unterst\u00FCtzt, es wird jedoch an einer L\u00F6sung dieses Problems gearbeitet. Melden Sie dieses Problem dem JAXB-Team.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_es.properties
deleted file mode 100644
index 39b2466c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_es.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ERR_NO_FURTHER_EXTENSION = El tipo complejo base "{0}" se deriva por restricci\u00F3n, mientras que este tipo complejo "{1}" se deriva por extensi\u00F3n. Actualmente, esto no lo maneja XJC, pero estamos buscando datos sobre este problema. Informe sobre esto al equipo de JAXB.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_fr.properties
deleted file mode 100644
index a89a30fa..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_fr.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ERR_NO_FURTHER_EXTENSION = Le type complexe de base "{0}" est d\u00E9riv\u00E9 par restriction, tandis que le type complexe "{1}" est d\u00E9riv\u00E9 par extension. Cela n''est pas g\u00E9r\u00E9 actuellement par XJC, mais nous recherchons une entr\u00E9e traitant de ce probl\u00E8me. Signalez cela \u00E0 l''\u00E9quipe JAXB.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_it.properties
deleted file mode 100644
index 89966cf4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_it.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ERR_NO_FURTHER_EXTENSION = Il tipo complesso di base "{0}" \u00E8 derivato mediante limitazione mentre questo tipo complesso "{1}" \u00E8 derivato mediante estensione. Questo tipo non \u00E8 attualmente gestito da XJC ma si desidera ricevere input su questo problema. Riportare al team JAXB.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_ja.properties
deleted file mode 100644
index 27007760..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_ja.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ERR_NO_FURTHER_EXTENSION = \u57FA\u672C\u8907\u5408\u578B"{0}"\u306F\u5236\u9650\u306B\u3088\u3063\u3066\u5C0E\u51FA\u3055\u308C\u307E\u3059\u304C\u3001\u3053\u306E\u8907\u5408\u578B"{1}"\u306F\u62E1\u5F35\u306B\u3088\u3063\u3066\u5C0E\u51FA\u3055\u308C\u307E\u3059\u3002\u3053\u308C\u306F\u73FE\u5728XJC\u3067\u306F\u51E6\u7406\u3055\u308C\u307E\u305B\u3093\u304C\u3001\u3053\u306E\u554F\u984C\u306B\u95A2\u3059\u308B\u60C5\u5831\u304C\u5FC5\u8981\u3067\u3059\u3002\u3053\u306E\u554F\u984C\u3092JAXB\u30C1\u30FC\u30E0\u306B\u5831\u544A\u3057\u3066\u304F\u3060\u3055\u3044\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_ko.properties
deleted file mode 100644
index b51fed8e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_ko.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ERR_NO_FURTHER_EXTENSION = \uAE30\uBCF8 \uBCF5\uD569 \uC720\uD615 "{0}"\uC740(\uB294) \uC81C\uD55C \uC0AC\uD56D\uC5D0 \uB530\uB77C \uD30C\uC0DD\uB418\uC9C0\uB9CC \uC774 \uBCF5\uD569 \uC720\uD615 "{1}"\uC740(\uB294) \uD655\uC7A5\uC5D0 \uB530\uB77C \uD30C\uC0DD\uB429\uB2C8\uB2E4. \uC774\uB294 \uD604\uC7AC XJC\uB97C \uD1B5\uD574 \uCC98\uB9AC\uB418\uC9C0 \uC54A\uC9C0\uB9CC \uC774 \uBB38\uC81C\uC5D0 \uB300\uD55C \uD574\uACB0 \uBC29\uBC95\uC774 \uBAA8\uC0C9\uB418\uACE0 \uC788\uC2B5\uB2C8\uB2E4. JAXB \uD300\uC5D0 \uC774 \uBB38\uC81C\uB97C \uBCF4\uACE0\uD558\uC2ED\uC2DC\uC624.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_pt_BR.properties
deleted file mode 100644
index 1eed04a6..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_pt_BR.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ERR_NO_FURTHER_EXTENSION = O tipo-base complexo "{0}" \u00E9 derivado pela restri\u00E7\u00E3o, enquanto este tipo complexo "{1}" \u00E9 derivado pela extens\u00E3o. Isso n\u00E3o est\u00E1 sendo tratado atualmente pelo XJC, mas estamos procurando a entrada sobre este problema. Reporte isso \u00E0 equipe do JAXB.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_zh_CN.properties
deleted file mode 100644
index 473a579f..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_zh_CN.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ERR_NO_FURTHER_EXTENSION = \u57FA\u672C\u590D\u6742\u7C7B\u578B "{0}" \u7531\u9650\u5236\u6D3E\u751F, \u800C\u6B64\u590D\u6742\u7C7B\u578B "{1}" \u7531\u6269\u5C55\u6D3E\u751F\u3002XJC \u76EE\u524D\u65E0\u6CD5\u5904\u7406\u6B64\u95EE\u9898, \u4F46\u6211\u4EEC\u6B63\u5728\u6536\u96C6\u89E3\u51B3\u6B64\u95EE\u9898\u7684\u60F3\u6CD5\u3002\u8BF7\u5C06\u6B64\u95EE\u9898\u62A5\u544A\u7ED9 JAXB \u56E2\u961F\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_zh_TW.properties
deleted file mode 100644
index 1f25991c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_zh_TW.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ERR_NO_FURTHER_EXTENSION = \u57FA\u672C\u8907\u96DC\u985E\u578B "{0}" \u662F\u7531\u9650\u5236\u884D\u751F, \u800C\u6B64\u8907\u96DC\u985E\u578B "{1}" \u662F\u7531\u64F4\u5145\u5957\u4EF6\u884D\u751F. XJC \u76EE\u524D\u7121\u6CD5\u8655\u7406\u6B64\u554F\u984C, \u4F46\u6211\u5011\u6B63\u5728\u5C0B\u6C42\u6B64\u554F\u984C\u7684\u89E3\u6C7A\u65B9\u6CD5. \u8ACB\u5411 JAXB \u5C0F\u7D44\u56DE\u5831\u6B64\u554F\u984C.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/Messages.java
deleted file mode 100644
index a618c30d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/Messages.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.ct;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Message resources
- */
-enum Messages {
- ERR_NO_FURTHER_EXTENSION;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getPackage().getName() + ".MessageBundle");
-
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MixedComplexTypeBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MixedComplexTypeBuilder.java
deleted file mode 100644
index 4bc72639..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MixedComplexTypeBuilder.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.ct;
-
-import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo;
-import com.sun.tools.internal.xjc.model.CClass;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.reader.RawTypeSet;
-import com.sun.tools.internal.xjc.reader.xmlschema.RawTypeSetBuilder;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
-import static com.sun.tools.internal.xjc.reader.xmlschema.ct.ComplexTypeBindingMode.FALLBACK_CONTENT;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSType;
-import java.util.List;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class MixedComplexTypeBuilder extends CTBuilder {
-
- public boolean isApplicable(XSComplexType ct) {
- XSType bt = ct.getBaseType();
- if(bt ==schemas.getAnyType() && ct.isMixed())
- return true; // fresh mixed complex type
-
- // there's no complex type in the inheritance tree yet
- if (bt.isComplexType() &&
- !bt.asComplexType().isMixed() &&
- ct.isMixed() &&
- ct.getDerivationMethod() == XSType.EXTENSION) {
- if (!bgmBuilder.isGenerateMixedExtensions() && (ct.getContentType().asParticle() == null)) {
- return false;
- }
- return true;
- }
-
- return false;
- }
-
- public void build(XSComplexType ct) {
- XSContentType contentType = ct.getContentType();
-
- boolean generateMixedExtensions = bgmBuilder.isGenerateMixedExtensions();
- if (generateMixedExtensions) {
- if (!(ct.getBaseType() == schemas.getAnyType() && ct.isMixed())) {
- XSComplexType baseType = ct.getBaseType().asComplexType();
- // build the base class
- CClass baseClass = selector.bindToType(baseType, ct, true);
- selector.getCurrentBean().setBaseClass(baseClass);
- }
- }
-
- builder.recordBindingMode(ct, FALLBACK_CONTENT);
- BIProperty prop = BIProperty.getCustomization(ct);
-
- CPropertyInfo p;
-
- if (generateMixedExtensions) {
- List<XSComplexType> cType = ct.getSubtypes();
- boolean isSubtyped = (cType != null) && (cType.size() > 0);
-
- if (contentType.asEmpty() != null) {
- if (isSubtyped) {
- p = prop.createContentExtendedMixedReferenceProperty("Content", ct, null);
- } else {
- p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null);
- }
- } else if (contentType.asParticle() == null) {
- p = prop.createContentExtendedMixedReferenceProperty("Content", ct, null);
- } else {
- RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(), false);
- p = prop.createContentExtendedMixedReferenceProperty("Content", ct, ts);
- }
-
- } else {
- if(contentType.asEmpty()!=null) {
- p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null);
- } else {
- RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false);
- p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false);
- }
- }
-
- selector.getCurrentBean().addProperty(p);
-
- // adds attributes and we are through.
- green.attContainer(ct);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MixedExtendedComplexTypeBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MixedExtendedComplexTypeBuilder.java
deleted file mode 100644
index 8c7a06f4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MixedExtendedComplexTypeBuilder.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.ct;
-
-import com.sun.tools.internal.xjc.model.CClass;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.reader.RawTypeSet;
-import com.sun.tools.internal.xjc.reader.xmlschema.RawTypeSetBuilder;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIGlobalBinding;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSType;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class MixedExtendedComplexTypeBuilder extends AbstractExtendedComplexTypeBuilder {
-
- public boolean isApplicable(XSComplexType ct) {
-
- if (!bgmBuilder.isGenerateMixedExtensions()) return false;
-
- XSType bt = ct.getBaseType();
- if (bt.isComplexType() &&
- bt.asComplexType().isMixed() &&
- ct.isMixed() &&
- ct.getDerivationMethod()==XSType.EXTENSION &&
- ct.getContentType().asParticle() != null &&
- ct.getExplicitContent().asEmpty() == null
- ) {
- return true;
- }
-
- return false;
- }
-
- public void build(XSComplexType ct) {
- XSComplexType baseType = ct.getBaseType().asComplexType();
-
- // build the base class
- CClass baseClass = selector.bindToType(baseType, ct, true);
- assert baseClass != null; // global complex type must map to a class
-
- if (!checkIfExtensionSafe(baseType, ct)) {
- // error. We can't handle any further extension
- errorReceiver.error(ct.getLocator(),
- Messages.ERR_NO_FURTHER_EXTENSION.format(
- baseType.getName(), ct.getName() )
- );
- return;
- }
-
- selector.getCurrentBean().setBaseClass(baseClass);
- builder.recordBindingMode(ct, ComplexTypeBindingMode.FALLBACK_EXTENSION);
-
- BIProperty prop = BIProperty.getCustomization(ct);
- CPropertyInfo p;
-
- RawTypeSet ts = RawTypeSetBuilder.build(ct.getContentType().asParticle(), false);
- p = prop.createDummyExtendedMixedReferenceProperty("contentOverrideFor" + ct.getName(), ct, ts);
-
- selector.getCurrentBean().addProperty(p);
-
- // adds attributes and we are through.
- green.attContainer(ct);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MultiWildcardComplexTypeBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MultiWildcardComplexTypeBuilder.java
deleted file mode 100644
index c4a78716..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MultiWildcardComplexTypeBuilder.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.ct;
-
-import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.reader.RawTypeSet;
-import com.sun.tools.internal.xjc.reader.xmlschema.RawTypeSetBuilder;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
-import static com.sun.tools.internal.xjc.reader.xmlschema.ct.ComplexTypeBindingMode.FALLBACK_CONTENT;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSType;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class MultiWildcardComplexTypeBuilder extends CTBuilder {
-
- public boolean isApplicable(XSComplexType ct) {
- if (!bgmBuilder.model.options.contentForWildcard) {
- return false;
- }
- XSType bt = ct.getBaseType();
- if (bt ==schemas.getAnyType() && ct.getContentType() != null) {
- XSParticle part = ct.getContentType().asParticle();
- if ((part != null) && (part.getTerm().isModelGroup())) {
- XSParticle[] parts = part.getTerm().asModelGroup().getChildren();
- int wildcardCount = 0;
- int i = 0;
- while ((i < parts.length) && (wildcardCount <= 1)) {
- if (parts[i].getTerm().isWildcard()) {
- wildcardCount += 1;
- }
- i++;
- }
- return (wildcardCount > 1);
- }
- }
- return false;
- }
-
- public void build(XSComplexType ct) {
- XSContentType contentType = ct.getContentType();
-
- builder.recordBindingMode(ct, FALLBACK_CONTENT);
- BIProperty prop = BIProperty.getCustomization(ct);
-
- CPropertyInfo p;
-
- if(contentType.asEmpty()!=null) {
- p = prop.createValueProperty("Content",false,ct,CBuiltinLeafInfo.STRING,null);
- } else {
- RawTypeSet ts = RawTypeSetBuilder.build(contentType.asParticle(),false);
- p = prop.createReferenceProperty("Content", false, ct, ts, true, false, true, false);
- }
-
- selector.getCurrentBean().addProperty(p);
-
- // adds attributes and we are through.
- green.attContainer(ct);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/RestrictedComplexTypeBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/RestrictedComplexTypeBuilder.java
deleted file mode 100644
index 08c09b7c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/RestrictedComplexTypeBuilder.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.ct;
-
-import com.sun.tools.internal.xjc.model.CClass;
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.reader.RawTypeSet;
-import com.sun.tools.internal.xjc.reader.xmlschema.RawTypeSetBuilder;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIGlobalBinding;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSType;
-
-/**
- * Binds a complex type derived from another complex type
- * by restriction.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-final class RestrictedComplexTypeBuilder extends CTBuilder {
-
- public boolean isApplicable(XSComplexType ct) {
- XSType baseType = ct.getBaseType();
- return baseType!=schemas.getAnyType()
- && baseType.isComplexType()
- && ct.getDerivationMethod()==XSType.RESTRICTION;
- }
-
- public void build(XSComplexType ct) {
-
- if (bgmBuilder.getGlobalBinding().isRestrictionFreshType()) {
- // handle derivation-by-restriction like a whole new type
- new FreshComplexTypeBuilder().build(ct);
- return;
- }
-
- XSComplexType baseType = ct.getBaseType().asComplexType();
-
- // build the base class
- CClass baseClass = selector.bindToType(baseType,ct,true);
- assert baseClass!=null; // global complex type must map to a class
-
- selector.getCurrentBean().setBaseClass(baseClass);
-
- if (bgmBuilder.isGenerateMixedExtensions()) {
- boolean forceFallbackInExtension = baseType.isMixed() &&
- ct.isMixed() &&
- (ct.getExplicitContent() != null) &&
- bgmBuilder.inExtensionMode;
- if (forceFallbackInExtension) {
- builder.recordBindingMode(ct, ComplexTypeBindingMode.NORMAL);
-
- BIProperty prop = BIProperty.getCustomization(ct);
- CPropertyInfo p;
-
- XSParticle particle = ct.getContentType().asParticle();
- if (particle != null) {
- RawTypeSet ts = RawTypeSetBuilder.build(particle, false);
- p = prop.createDummyExtendedMixedReferenceProperty("Content", ct, ts);
- selector.getCurrentBean().addProperty(p);
- }
- } else {
- // determine the binding of this complex type.
- builder.recordBindingMode(ct,builder.getBindingMode(baseType));
- }
- } else {
- builder.recordBindingMode(ct,builder.getBindingMode(baseType));
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/STDerivedComplexTypeBuilder.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/STDerivedComplexTypeBuilder.java
deleted file mode 100644
index b70120eb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/STDerivedComplexTypeBuilder.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.ct;
-
-import com.sun.tools.internal.xjc.model.CPropertyInfo;
-import com.sun.tools.internal.xjc.model.TypeUse;
-import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
-import com.sun.tools.internal.xjc.reader.xmlschema.BGMBuilder;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSType;
-
-/**
- * Binds a complex type derived from a simple type.
- * When a complex type is derived from a simple type, it is always
- * by extension.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-final class STDerivedComplexTypeBuilder extends CTBuilder {
-
- public boolean isApplicable(XSComplexType ct) {
- return ct.getBaseType().isSimpleType();
- }
-
- public void build(XSComplexType ct) {
- assert ct.getDerivationMethod()==XSType.EXTENSION;
-
- // base type is a simple type
- XSSimpleType baseType = ct.getBaseType().asSimpleType();
-
- // determine the binding of this complex type.
- builder.recordBindingMode(ct,ComplexTypeBindingMode.NORMAL);
-
- simpleTypeBuilder.refererStack.push(ct);
- TypeUse use = simpleTypeBuilder.build(baseType);
- simpleTypeBuilder.refererStack.pop();
-
- BIProperty prop = BIProperty.getCustomization(ct);
- CPropertyInfo p = prop.createValueProperty("Value",false,baseType,use, BGMBuilder.getName(baseType));
- selector.getCurrentBean().addProperty(p);
-
- // adds attributes and we are through.
- green.attContainer(ct);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/CustomizationContextChecker.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/CustomizationContextChecker.java
deleted file mode 100644
index cfdd86c5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/CustomizationContextChecker.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.parser;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.Stack;
-
-import javax.xml.namespace.QName;
-
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * Checks if binding declarations are placed where they are allowed.
- *
- * <p>
- * For example, if a &lt;jaxb:property> customization is given under
- * the &lt;xs:simpleContent> element, this class raises an error.
- *
- * <p>
- * our main checkpoint of misplaced customizations are in BGMBuilder.
- * There, we mark a customization whenever we use it. At the end of the
- * day, we look for unmarked customizations and raise errors for them.
- *
- * <p>
- * Between this approach and the JAXB spec 1.0 is a problem that
- * the spec allows/prohibits customizations at schema element level,
- * while BGMBuilder and XSOM works on schema component levels.
- *
- * <p>
- * For example, a property customization is allowed on a complex type
- * schema component, but it's only allowed on the &lt;complexType>
- * element. The spec team informed us that they would consider resolving
- * this discrepancy in favor of RI, but meanwhile we need to detect
- * errors correctly.
- *
- * <p>
- * This filter is implemented for this purpose.
- *
- *
- * <h2>Customization and allowed locations</h2>
- *
- * - globalBinding/schemaBinding
- * schema
- *
- * - class
- * complexType(*), modelGroupDecl, modelGroup, element
- *
- * - property
- * attribute, element, any, modelGroup, modelGroupRef, complexType(*)
- *
- * - javaType
- * simpleType(*)
- *
- * - typesafeEnumClass
- * simpleType(*)
- *
- * - typesafeEnumMember
- * simpleType(*), enumeration
- *
- * Components marked with '*' needs a check by this component
- * since more than one schema element corresponds to one schema component
- * of that type.
- *
- * <p>
- * For simple types, customizations are allowed only under the &lt;xs:simpleType>
- * element, and for complex types they are allowed only under the
- * &lt;xs:cimplexType> element.
- *
- * <p>
- * So the bottom line is that it would be suffice if we just make sure
- * that no customization will be attached under other elements of
- * simple types and complex types. Those are:
- *
- * - simpleType/restriction
- * - list
- * - union
- * - complexType/(simple or complex)Content
- * - complexType/(simple or complex)Content/(restriction of extension)
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class CustomizationContextChecker extends XMLFilterImpl {
-
- /** Keep names of all the ancestor elements. */
- private final Stack<QName> elementNames = new Stack<QName>();
-
- private final ErrorHandler errorHandler;
-
- private Locator locator;
-
- /** Set of element names that cannot have JAXB customizations. */
- private static final Set<String> prohibitedSchemaElementNames = new HashSet<String>();
-
- /**
- * @param _errorHandler
- * Detected errors will be sent to this object.
- */
- public CustomizationContextChecker( ErrorHandler _errorHandler ) {
- this.errorHandler = _errorHandler;
- }
-
- static {
- prohibitedSchemaElementNames.add("restriction");
- prohibitedSchemaElementNames.add("extension");
- prohibitedSchemaElementNames.add("simpleContent");
- prohibitedSchemaElementNames.add("complexContent");
- prohibitedSchemaElementNames.add("list");
- prohibitedSchemaElementNames.add("union");
- }
-
-
-
-
- /** Gets the stack top. */
- private QName top() {
- return elementNames.peek();
- }
-
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
- QName newElement = new QName(namespaceURI,localName);
-
- if( newElement.getNamespaceURI().equals(Const.JAXB_NSURI)
- && top().getNamespaceURI().equals(WellKnownNamespace.XML_SCHEMA) ) {
- // we hit a JAXB customization. the stack top should be
- // <xs:appinfo>
- if( elementNames.size()>=3 ) {
- // the above statement checks if the following statement doesn't
- // cause an exception.
- QName schemaElement = elementNames.get( elementNames.size()-3 );
- if( prohibitedSchemaElementNames.contains(schemaElement.getLocalPart()) ) {
- // the owner schema element is in the wanted list.
- errorHandler.error( new SAXParseException(
- Messages.format(
- Messages.ERR_UNACKNOWLEDGED_CUSTOMIZATION,
- localName ),
- locator ) );
- }
- }
-
-
- }
-
- elementNames.push(newElement);
-
- super.startElement(namespaceURI, localName, qName, atts );
- }
-
- public void endElement(String namespaceURI, String localName, String qName)
- throws SAXException {
-
- super.endElement(namespaceURI, localName, qName);
-
- elementNames.pop();
- }
-
- public void setDocumentLocator(Locator locator) {
- super.setDocumentLocator(locator);
- this.locator = locator;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/IncorrectNamespaceURIChecker.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/IncorrectNamespaceURIChecker.java
deleted file mode 100644
index 75648e34..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/IncorrectNamespaceURIChecker.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.parser;
-
-import com.sun.tools.internal.xjc.reader.Const;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import org.xml.sax.Attributes;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * This filter detects the use of incorrect JAXB namespace URI.
- *
- * When the binding compiler looks at a schema file, it always look
- * for the namespace URI of the elements (which is correct, BTW.)
- *
- * <p>
- * However, one unfortunate downside of this philosophically correct
- * behavior is that there is no provision or safety check when an user
- * misspelled JAXB binding customization namespace.
- *
- * <p>
- * This checker inspects the input document and look for the use of the
- * prefix "jaxb". If the document doesn't associate any prefix to the
- * JAXB customization URI and if it does associate the jaxb prefix,
- * this checker will issue a warning.
- *
- * <p>
- * This warning can happen to completely correct schema (because
- * nothing prevents you from using the prefix "jaxb" for other purpose
- * while using a JAXB compiler on the same schema) but in practice
- * this would be quite unlikely.
- *
- * <p>
- * This justifies the use of this filter.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class IncorrectNamespaceURIChecker extends XMLFilterImpl {
-
- public IncorrectNamespaceURIChecker( ErrorHandler handler ) {
- this.errorHandler = handler;
- }
-
- private ErrorHandler errorHandler;
-
- private Locator locator = null;
-
- /** Sets to true once we see the jaxb prefix in use. */
- private boolean isJAXBPrefixUsed = false;
- /** Sets to true once we see the JAXB customization namespace URI. */
- private boolean isCustomizationUsed = false;
-
- @Override
- public void endDocument() throws SAXException {
- if( isJAXBPrefixUsed && !isCustomizationUsed ) {
- SAXParseException e = new SAXParseException(
- Messages.format(Messages.WARN_INCORRECT_URI, Const.JAXB_NSURI),
- locator );
- errorHandler.warning(e);
- }
-
- super.endDocument();
- }
-
- @Override
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
- if (WellKnownNamespace.XML_NAMESPACE_URI.equals(uri)) return; //xml prefix shall not be declared based on jdk api javadoc
- if( prefix.equals("jaxb") )
- isJAXBPrefixUsed = true;
- if( uri.equals(Const.JAXB_NSURI) )
- isCustomizationUsed = true;
-
- super.startPrefixMapping(prefix, uri);
- }
-
- @Override
- public void endPrefixMapping(String prefix) throws SAXException {
- if ("xml".equals(prefix)) return; //xml prefix shall not be declared based on jdk api javadoc
- super.endPrefixMapping(prefix);
- }
-
- @Override
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
- throws SAXException {
- super.startElement(namespaceURI, localName, qName, atts);
-
- // I'm not sure if this is necessary (SAX might report the change of the default prefix
- // through the startPrefixMapping method, and I think it does indeed.)
- //
- // but better safe than sorry.
-
- if( namespaceURI.equals(Const.JAXB_NSURI) )
- isCustomizationUsed = true;
- }
-
- @Override
- public void setDocumentLocator( Locator locator ) {
- super.setDocumentLocator( locator );
- this.locator = locator;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/LSInputSAXWrapper.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/LSInputSAXWrapper.java
deleted file mode 100644
index 995af100..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/LSInputSAXWrapper.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.parser;
-
-import java.io.InputStream;
-import java.io.Reader;
-
-import org.w3c.dom.ls.LSInput;
-import org.xml.sax.InputSource;
-
-/**
- * LSInput implementation that wraps a SAX InputSource
- *
- * @author Ryan.Shoemaker@Sun.COM
- */
-public class LSInputSAXWrapper implements LSInput {
- private InputSource core;
-
- public LSInputSAXWrapper(InputSource inputSource) {
- assert inputSource!=null;
- core = inputSource;
- }
-
- public Reader getCharacterStream() {
- return core.getCharacterStream();
- }
-
- public void setCharacterStream(Reader characterStream) {
- core.setCharacterStream(characterStream);
- }
-
- public InputStream getByteStream() {
- return core.getByteStream();
- }
-
- public void setByteStream(InputStream byteStream) {
- core.setByteStream(byteStream);
- }
-
- public String getStringData() {
- return null;
- }
-
- public void setStringData(String stringData) {
- // no-op
- }
-
- public String getSystemId() {
- return core.getSystemId();
- }
-
- public void setSystemId(String systemId) {
- core.setSystemId(systemId);
- }
-
- public String getPublicId() {
- return core.getPublicId();
- }
-
- public void setPublicId(String publicId) {
- core.setPublicId(publicId);
- }
-
- public String getBaseURI() {
- return null;
- }
-
- public void setBaseURI(String baseURI) {
- // no-op
- }
-
- public String getEncoding() {
- return core.getEncoding();
- }
-
- public void setEncoding(String encoding) {
- core.setEncoding(encoding);
- }
-
- public boolean getCertifiedText() {
- return true;
- }
-
- public void setCertifiedText(boolean certifiedText) {
- // no-op
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle.properties
deleted file mode 100644
index 686e2772..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CustomizationContextChecker.UnacknolwedgedCustomization = \
- Specified {0} customization is not used.
-
-
-SchemaConstraintChecker.UnableToCheckCorrectness = \
- Unable to check the correctness of the schema due to OutOfMemoryError. \
- This typically happens when your schema contains constructs like maxOccurs="999". \
- In the future compilation, add the '-nv' option to skip the correctness check \
- for faster compilation.
-
-
-
-
-IncorrectNamespaceURIChecker.WarnIncorrectURI = \
- No JAXB customization was detected in the schema but the prefix "jaxb" is used for \
- other namespace URIs. If you did intend to use JAXB customization, make sure the namespace URI is "{0}"
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_de.properties
deleted file mode 100644
index cca5b7e2..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_de.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CustomizationContextChecker.UnacknolwedgedCustomization = Angegebene {0}-Anpassung wird nicht verwendet.
-
-
-SchemaConstraintChecker.UnableToCheckCorrectness = Die Richtigkeit des Schemas kann wegen OutOfMemoryError nicht gepr\u00FCft werden. Dies geschieht im Allgemeinen, wenn Ihr Schema Konstrukte enth\u00E4lt wie maxOccurs="999". F\u00FCgen Sie bei der zuk\u00FCnftigen Kompilierung die Option '-nv' hinzu, um die Pr\u00FCfung auf Richtigkeit zu \u00FCberspringen, damit die Kompilierung beschleunigt wird.
-
-
-
-
-IncorrectNamespaceURIChecker.WarnIncorrectURI = Es wurde keine JAXB-Anpassung in dem Schema ermittelt, das Pr\u00E4fix "jaxb" wird jedoch f\u00FCr andere Namespace-URIs verwendet. Wenn Sie die JAXB-Anpassung verwenden m\u00F6chten, stellen Sie sicher, dass der Namespace-URI "{0}" ist
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_es.properties
deleted file mode 100644
index 657925ed..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_es.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CustomizationContextChecker.UnacknolwedgedCustomization = La personalizaci\u00F3n de {0} especificada no se utiliza.
-
-
-SchemaConstraintChecker.UnableToCheckCorrectness = No se ha podido comprobar si el esquema es correcto debido al error OutOfMemoryError. Normalmente, esto ocurre cuando el esquema contiene construcciones como maxOccurs="999". En la compilaci\u00F3n futura, agregue la opci\u00F3n '-nv' para omitir esta comprobaci\u00F3n para que la compilaci\u00F3n sea m\u00E1s r\u00E1pida.
-
-
-
-
-IncorrectNamespaceURIChecker.WarnIncorrectURI = No se ha detectado ninguna personalizaci\u00F3n JAXB en el esquema, pero se utiliza el prefijo "jaxb" para otros URI de espacios de nombres. Si ten\u00EDa pensado utilizar la personalizaci\u00F3n JAXB, aseg\u00FArese de que el URI del espacio de nombres es "{0}"
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_fr.properties
deleted file mode 100644
index dd571a2c..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_fr.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CustomizationContextChecker.UnacknolwedgedCustomization = La personnalisation {0} indiqu\u00E9e n''est pas utilis\u00E9e.
-
-
-SchemaConstraintChecker.UnableToCheckCorrectness = Impossible de v\u00E9rifier l'exactitude du sch\u00E9ma en raison d'une erreur OutOfMemoryError. Cela se produit g\u00E9n\u00E9ralement lorsque le sch\u00E9ma contient des structures telles que maxOccurs = "999". Dans la future compilation, ajoutez l'option '-nv' pour ne pas tenir compte de la v\u00E9rification d'exactitude pour une compilation plus rapide.
-
-
-
-
-IncorrectNamespaceURIChecker.WarnIncorrectURI = Aucune personnalisation JAXB n''a \u00E9t\u00E9 d\u00E9tect\u00E9e dans le sch\u00E9ma mais le pr\u00E9fixe "jaxb" est utilis\u00E9 pour d''autres URI d''espace de noms. Si vous vouliez utiliser la personnalisation JAXB, assurez-vous que l''URI d''espace de noms est "{0}"
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_it.properties
deleted file mode 100644
index a7e48a1d..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_it.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CustomizationContextChecker.UnacknolwedgedCustomization = La personalizzazione specificata {0} non viene usata.
-
-
-SchemaConstraintChecker.UnableToCheckCorrectness = Impossibile controllare la correttezza dello schema a causa di OutOfMemoryError. In genere ci\u00F2 si verifica quando lo schema contiene costrutti come maxOccurs="999". Per le compilazioni future, aggiungere l'opzione '-nv' per ignorare il controllo di correttezza per una compilazione pi\u00F9 rapida.
-
-
-
-
-IncorrectNamespaceURIChecker.WarnIncorrectURI = Nessuna personalizzazione JAXB rilevata nello schema ma il prefisso "jaxb" viene usato per altri URI dello spazio di nomi. Se non si intende usare la personalizzazione JAXB, assicurarsi che l''URI dello spazio di nomi sia "{0}"
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_ja.properties
deleted file mode 100644
index c5cef195..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_ja.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CustomizationContextChecker.UnacknolwedgedCustomization = \u6307\u5B9A\u3057\u305F{0}\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u306F\u4F7F\u7528\u3055\u308C\u307E\u305B\u3093\u3002
-
-
-SchemaConstraintChecker.UnableToCheckCorrectness = OutOfMemoryError\u306B\u3088\u308A\u3001\u30B9\u30AD\u30FC\u30DE\u304C\u6B63\u3057\u3044\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3002\u3053\u308C\u306F\u901A\u5E38\u3001\u30B9\u30AD\u30FC\u30DE\u306BmaxOccurs="999"\u306E\u3088\u3046\u306A\u69CB\u9020\u4F53\u304C\u542B\u307E\u308C\u308B\u5834\u5408\u306B\u767A\u751F\u3057\u307E\u3059\u3002\u5C06\u6765\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3067\u306F\u3001'-nv'\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8FFD\u52A0\u3057\u3066\u3001\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u9AD8\u901F\u306B\u3059\u308B\u305F\u3081\u306B\u6B63\u78BA\u3055\u306E\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u307E\u3059\u3002
-
-
-
-
-IncorrectNamespaceURIChecker.WarnIncorrectURI = \u30B9\u30AD\u30FC\u30DE\u3067JAXB\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u304C\u691C\u51FA\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u304C\u3001\u4ED6\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9URI\u306B\u63A5\u982D\u8F9E"jaxb"\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002JAXB\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3059\u308B\u5834\u5408\u306F\u3001\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9URI\u304C"{0}"\u3067\u3042\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_ko.properties
deleted file mode 100644
index 6a9bf389..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_ko.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CustomizationContextChecker.UnacknolwedgedCustomization = \uC9C0\uC815\uB41C {0} \uC0AC\uC6A9\uC790 \uC815\uC758\uAC00 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-
-SchemaConstraintChecker.UnableToCheckCorrectness = OutOfMemoryError\uB85C \uC778\uD574 \uC2A4\uD0A4\uB9C8\uAC00 \uC815\uD655\uD55C\uC9C0 \uD655\uC778\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC77C\uBC18\uC801\uC73C\uB85C \uC774 \uC624\uB958\uB294 \uC2A4\uD0A4\uB9C8\uC5D0 maxOccurs="999"\uC640 \uAC19\uC740 \uAD6C\uBB38\uC774 \uD3EC\uD568\uB41C \uACBD\uC6B0 \uBC1C\uC0DD\uD569\uB2C8\uB2E4. \uC774\uD6C4 \uCEF4\uD30C\uC77C\uC5D0\uC11C \uCEF4\uD30C\uC77C\uC744 \uB354 \uBE60\uB974\uAC8C \uC218\uD589\uD558\uB824\uBA74 '-nv' \uC635\uC158\uC744 \uCD94\uAC00\uD558\uC5EC \uC815\uD655\uC131 \uAC80\uC0AC\uB97C \uAC74\uB108 \uB6F0\uC2ED\uC2DC\uC624.
-
-
-
-
-IncorrectNamespaceURIChecker.WarnIncorrectURI = JAXB \uC0AC\uC6A9\uC790 \uC815\uC758\uAC00 \uC2A4\uD0A4\uB9C8\uC5D0\uC11C \uAC10\uC9C0\uB418\uC9C0 \uC54A\uC558\uC9C0\uB9CC "jaxb" \uC811\uB450\uC5B4\uAC00 \uB2E4\uB978 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 URI\uC5D0 \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4. JAXB \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uC0AC\uC6A9\uD558\uB824\uACE0 \uD55C \uACBD\uC6B0 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 URI\uAC00 "{0}"\uC778\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_pt_BR.properties
deleted file mode 100644
index 9684ddcf..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_pt_BR.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CustomizationContextChecker.UnacknolwedgedCustomization = Personaliza\u00E7\u00E3o {0} especificada n\u00E3o usada.
-
-
-SchemaConstraintChecker.UnableToCheckCorrectness = N\u00E3o \u00E9 poss\u00EDvel verificar a corre\u00E7\u00E3o do esquema em decorr\u00EAncia de OutOfMemoryError. Geralmente isso ocorre quando seu esquema cont\u00E9m constru\u00E7\u00F5es como maxOccurs="999". Na pr\u00F3xima compila\u00E7\u00E3o, adicione a op\u00E7\u00E3o '-nv' para ignorar a verifica\u00E7\u00E3o de corre\u00E7\u00E3o e obter compila\u00E7\u00E3o mais r\u00E1pida.
-
-
-
-
-IncorrectNamespaceURIChecker.WarnIncorrectURI = N\u00E3o foi detectada uma personaliza\u00E7\u00E3o do JAXB no esquema, mas o prefixo ''jaxb'' \u00E9 usado para outros URIs de namespace. Se voc\u00EA pretende usar a personaliza\u00E7\u00E3o do JAXB, certifique-se de que o URI do namespace seja "{0}"
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_zh_CN.properties
deleted file mode 100644
index 766125f1..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_zh_CN.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CustomizationContextChecker.UnacknolwedgedCustomization = \u672A\u4F7F\u7528\u6307\u5B9A\u7684{0}\u5B9A\u5236\u8BBE\u7F6E\u3002
-
-
-SchemaConstraintChecker.UnableToCheckCorrectness = \u7531\u4E8E\u51FA\u73B0 OutOfMemoryError, \u65E0\u6CD5\u68C0\u67E5\u6A21\u5F0F\u7684\u6B63\u786E\u6027\u3002\u5F53\u6A21\u5F0F\u5305\u542B\u7C7B\u4F3C maxOccurs="999" \u7684\u7ED3\u6784\u65F6, \u901A\u5E38\u4F1A\u53D1\u751F\u6B64\u60C5\u51B5\u3002\u5728\u4EE5\u540E\u7F16\u8BD1\u65F6, \u6DFB\u52A0 '-nv' \u9009\u9879\u53EF\u8DF3\u8FC7\u6B63\u786E\u6027\u68C0\u67E5, \u4ECE\u800C\u66F4\u5FEB\u5730\u6267\u884C\u7F16\u8BD1\u3002
-
-
-
-
-IncorrectNamespaceURIChecker.WarnIncorrectURI = \u5728\u6A21\u5F0F\u4E2D\u672A\u68C0\u6D4B\u5230 JAXB \u5B9A\u5236\u8BBE\u7F6E, \u4F46\u5BF9\u5176\u4ED6\u540D\u79F0\u7A7A\u95F4 URI \u4F7F\u7528\u4E86\u524D\u7F00 "jaxb"\u3002\u5982\u679C\u60A8\u786E\u5B9E\u6253\u7B97\u4F7F\u7528 JAXB \u5B9A\u5236\u8BBE\u7F6E, \u8BF7\u786E\u4FDD\u540D\u79F0\u7A7A\u95F4 URI \u4E3A "{0}"
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_zh_TW.properties
deleted file mode 100644
index 616214f5..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_zh_TW.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CustomizationContextChecker.UnacknolwedgedCustomization = \u672A\u4F7F\u7528\u6307\u5B9A\u7684 {0} \u81EA\u8A02\u9805\u76EE.
-
-
-SchemaConstraintChecker.UnableToCheckCorrectness = \u56E0\u70BA OutOfMemoryError, \u7121\u6CD5\u6AA2\u67E5\u7DB1\u8981\u7684\u6B63\u78BA\u6027. \u7576\u60A8\u7684\u7DB1\u8981\u5305\u542B\u50CF\u662F maxOccurs="999" \u7684\u5EFA\u69CB\u9805\u76EE\u6642, \u901A\u5E38\u5C31\u6703\u767C\u751F\u6B64\u554F\u984C. \u5728\u5F80\u5F8C\u7684\u7DE8\u8B6F\u4E2D, \u65B0\u589E '-nv' \u9078\u9805\u53EF\u7565\u904E\u6B63\u78BA\u6027\u6AA2\u67E5\u4EE5\u52A0\u5FEB\u7DE8\u8B6F\u901F\u5EA6.
-
-
-
-
-IncorrectNamespaceURIChecker.WarnIncorrectURI = \u672A\u5728\u7DB1\u8981\u4E2D\u5075\u6E2C\u5230 JAXB \u81EA\u8A02\u9805\u76EE, \u4F46\u524D\u7F6E\u78BC "jaxb" \u5DF2\u4F7F\u7528\u65BC\u5176\u4ED6\u547D\u540D\u7A7A\u9593 URI. \u82E5\u60A8\u4E0D\u60F3\u4F7F\u7528 JAXB \u81EA\u8A02\u9805\u76EE, \u8ACB\u78BA\u5B9A\u547D\u540D\u7A7A\u9593 URI \u70BA "{0}"
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/Messages.java
deleted file mode 100644
index ae0cbf60..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/Messages.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.parser;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-class Messages
-{
- /** Loads a string resource and formats it with specified arguments. */
- static String format( String property, Object... args ) {
- String text = ResourceBundle.getBundle(Messages.class.getPackage().getName() +".MessageBundle").getString(property);
- return MessageFormat.format(text,args);
- }
-
-
-
- static final String ERR_UNACKNOWLEDGED_CUSTOMIZATION =
- "CustomizationContextChecker.UnacknolwedgedCustomization"; // arg:1
-
- static final String WARN_INCORRECT_URI = // 1 args
- "IncorrectNamespaceURIChecker.WarnIncorrectURI";
-
- static final String WARN_UNABLE_TO_CHECK_CORRECTNESS = // 0 args
- "SchemaConstraintChecker.UnableToCheckCorrectness";
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java
deleted file mode 100644
index 19b10a92..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.parser;
-
-import java.io.File;
-import java.io.IOException;
-
-import javax.xml.transform.Source;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.validation.SchemaFactory;
-
-import com.sun.tools.internal.xjc.ConsoleErrorReporter;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.util.ErrorReceiverFilter;
-
-import com.sun.xml.internal.bind.v2.util.XmlFactory;
-import org.w3c.dom.ls.LSInput;
-import org.w3c.dom.ls.LSResourceResolver;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI;
-
-/**
- * Checks XML Schema XML representation constraints and
- * schema component constraints by using JAXP 1.3 validation framework.
- * <p/>
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- * @author Ryan Shoemaker (ryan.shoemaker@sun.com)
- */
-public class SchemaConstraintChecker {
-
- /**
- * @param schemas Schema files to be checked.
- * @param errorHandler detected errors will be reported to this handler.
- * @return true if there was no error, false if there were errors.
- */
- public static boolean check(InputSource[] schemas,
- ErrorReceiver errorHandler,
- final EntityResolver entityResolver,
- boolean disableXmlSecurity) {
-
- ErrorReceiverFilter errorFilter = new ErrorReceiverFilter(errorHandler);
- 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() {
- public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) {
- try {
- // XSOM passes the namespace URI to the publicID parameter.
- // we do the same here .
- InputSource is = entityResolver.resolveEntity(namespaceURI, systemId);
- if(is==null) return null;
- return new LSInputSAXWrapper(is);
- } catch (SAXException e) {
- // TODO: is this sufficient?
- return null;
- } catch (IOException e) {
- // TODO: is this sufficient?
- return null;
- }
- }
- });
- }
-
- 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?
- hadErrors = true;
- } catch( OutOfMemoryError e) {
- errorHandler.warning(null,Messages.format(Messages.WARN_UNABLE_TO_CHECK_CORRECTNESS));
- }
-
- return !(hadErrors || errorFilter.hadError());
- }
-
- /**
- * convert an array of {@link InputSource InputSource} into an
- * array of {@link Source Source}
- *
- * @param schemas array of {@link InputSource InputSource}
- * @return array of {@link Source Source}
- */
- private static Source[] getSchemaSource(InputSource[] schemas, EntityResolver entityResolver) throws SAXException {
- SAXSource[] sources = new SAXSource[schemas.length];
- for (int i = 0; i < schemas.length; i++) {
- sources[i] = new SAXSource(schemas[i]);
-// sources[i].getXMLReader().setEntityResolver(entityResolver);
- }
- return sources;
- }
-
- // quick test
- public static void main(String[] args) throws IOException {
- InputSource[] sources = new InputSource[args.length];
- for (int i = 0; i < args.length; i++)
- sources[i] = new InputSource(new File(args[i]).toURL().toExternalForm());
-
- check(sources, new ConsoleErrorReporter(), null, true);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/XMLSchemaInternalizationLogic.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/XMLSchemaInternalizationLogic.java
deleted file mode 100644
index e56fe8c4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/XMLSchemaInternalizationLogic.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.reader.xmlschema.parser;
-
-import com.sun.tools.internal.xjc.reader.internalizer.AbstractReferenceFinderImpl;
-import com.sun.tools.internal.xjc.reader.internalizer.DOMForest;
-import com.sun.tools.internal.xjc.reader.internalizer.InternalizationLogic;
-import com.sun.tools.internal.xjc.util.DOMUtils;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * XML Schema specific internalization logic.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class XMLSchemaInternalizationLogic implements InternalizationLogic {
-
- /**
- * This filter looks for &lt;xs:import> and &lt;xs:include>
- * and parses those documents referenced by them.
- */
- private static final class ReferenceFinder extends AbstractReferenceFinderImpl {
- ReferenceFinder( DOMForest parent ) {
- super(parent);
- }
-
- protected String findExternalResource( String nsURI, String localName, Attributes atts) {
- if( WellKnownNamespace.XML_SCHEMA.equals(nsURI)
- && ("import".equals(localName) || "include".equals(localName) ) )
- return atts.getValue("schemaLocation");
- else
- return null;
- }
- }
-
- public XMLFilterImpl createExternalReferenceFinder(DOMForest parent) {
- return new ReferenceFinder(parent);
- }
-
- public boolean checkIfValidTargetNode(DOMForest parent, Element bindings, Element target) {
- return WellKnownNamespace.XML_SCHEMA.equals(target.getNamespaceURI());
- }
-
- public Element refineTarget(Element target) {
- // look for existing xs:annotation
- Element annotation = DOMUtils.getFirstChildElement(target, WellKnownNamespace.XML_SCHEMA, "annotation");
- if(annotation==null)
- // none exists. need to make one
- annotation = insertXMLSchemaElement( target, "annotation" );
-
- // then look for appinfo
- Element appinfo = DOMUtils.getFirstChildElement(annotation, WellKnownNamespace.XML_SCHEMA, "appinfo" );
- if(appinfo==null)
- // none exists. need to make one
- appinfo = insertXMLSchemaElement( annotation, "appinfo" );
-
- return appinfo;
- }
-
- /**
- * Creates a new XML Schema element of the given local name
- * and insert it as the first child of the given parent node.
- *
- * @return
- * Newly create element.
- */
- private Element insertXMLSchemaElement( Element parent, String localName ) {
- // use the same prefix as the parent node to avoid modifying
- // the namespace binding.
- String qname = parent.getTagName();
- int idx = qname.indexOf(':');
- if(idx==-1) qname = localName;
- else qname = qname.substring(0,idx+1)+localName;
-
- Element child = parent.getOwnerDocument().createElementNS( WellKnownNamespace.XML_SCHEMA, qname );
-
- NodeList children = parent.getChildNodes();
-
- if( children.getLength()==0 )
- parent.appendChild(child);
- else
- parent.insertBefore( child, children.item(0) );
-
- return child;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/JAXBContextFactory.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/JAXBContextFactory.java
deleted file mode 100644
index f7a46742..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/JAXBContextFactory.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.runtime;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-
-/**
- * This class implements the actual logic of {@link JAXBContext#newInstance}.
- *
- * <p>
- * This class works as a facade and all the actual work is delegated to
- * a JAXB provider that happens to be in the runtime (not necessarily the JAXB RI.)
- * This allows the generated code to be run with any JAXB provider.
- *
- * <p>
- * This code is only used when XJC generates interfaces/implementations.
- *
- * <p>
- * The trick to make this work is two ObjectFactory classes that we generate
- * in the interface/implementation mode.
- *
- * <p>
- * The public ObjectFactory follows the spec, and this is the one that's exposed
- * to users. The public ObjectFactory refers to interfaces, so they aren't
- * directly usable by a JAXB 2.0 implementation.
- *
- * <p>
- * The private one lives in the impl package, and this one is indistinguishable
- * from the ObjectFactory that we generate for the value class generation mode.
- * This private ObjectFactory refers to implementation classes, which are
- * also indistinguishable from value classes that JAXB generates.
- *
- * <p>
- * All in all, the private ObjectFactory plus implementation classes give
- * a JAXB provider an illusion that they are dealing with value classes
- * that happens to implement some interfaces.
- *
- * <p>
- * In this way, the JAXB RI can provide the portability even for the
- * interface/implementation generation mode.
- *
- * @since 2.0
- * @author Kohsuke Kawaguchi
- */
-public class JAXBContextFactory {
- private static final String DOT_OBJECT_FACTORY = ".ObjectFactory";
- private static final String IMPL_DOT_OBJECT_FACTORY = ".impl.ObjectFactory";
-
- /**
- * The JAXB API will invoke this method via reflection
- */
- public static JAXBContext createContext( Class[] classes, Map properties ) throws JAXBException {
- Class[] r = new Class[classes.length];
- boolean modified = false;
-
- // find any reference to our 'public' ObjectFactory and
- // replace that to our 'private' ObjectFactory.
- for( int i=0; i<r.length; i++ ) {
- Class c = classes[i];
- String name = c.getName();
- if(name.endsWith(DOT_OBJECT_FACTORY)
- && !name.endsWith(IMPL_DOT_OBJECT_FACTORY)) {
- // we never generate into the root package, so no need to worry about FQCN "ObjectFactory"
-
- // if we find one, tell the real JAXB provider to
- // load foo.bar.impl.ObjectFactory
- name = name.substring(0,name.length()-DOT_OBJECT_FACTORY.length())+IMPL_DOT_OBJECT_FACTORY;
-
- try {
- c = getClassClassLoader(c).loadClass(name);
- } catch (ClassNotFoundException e) {
- throw new JAXBException(e);
- }
-
- modified = true;
- }
-
- r[i] = c;
- }
-
- if(!modified) {
- // if the class list doesn't contain any of our classes,
- // this ContextFactory shouldn't have been called in the first place
- // if we simply continue, we'll just end up with the infinite recursion.
-
- // the only case that I can think of where this could happen is
- // when the user puts additional classes into the JAXB-generated
- // package and pass them to JAXBContext.newInstance().
- // Under normal use, this shouldn't happen.
-
- // anyway, bail out now.
- // if you hit this problem and wondering how to get around the problem,
- // subscribe and send a note to users@jaxb.dev.java.net (http://jaxb.dev.java.net/)
- throw new JAXBException("Unable to find a JAXB implementation to delegate");
- }
-
- // delegate to the JAXB provider in the system
- return JAXBContext.newInstance(r,properties);
- }
-
-
- /**
- * The JAXB API will invoke this method via reflection
- */
- public static JAXBContext createContext( String contextPath,
- ClassLoader classLoader, Map properties ) throws JAXBException {
-
- List<Class> classes = new ArrayList<Class>();
- StringTokenizer tokens = new StringTokenizer(contextPath,":");
-
- // each package should be pointing to a JAXB RI generated
- // content interface package.
- //
- // translate them into a list of private ObjectFactories.
- try {
- while(tokens.hasMoreTokens()) {
- String pkg = tokens.nextToken();
- classes.add(classLoader.loadClass(pkg+IMPL_DOT_OBJECT_FACTORY));
- }
- } catch (ClassNotFoundException e) {
- throw new JAXBException(e);
- }
-
- // delegate to the JAXB provider in the system
- return JAXBContext.newInstance(classes.toArray(new Class[classes.size()]),properties);
- }
-
- private static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/ZeroOneBooleanAdapter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/ZeroOneBooleanAdapter.java
deleted file mode 100644
index 3c825eb4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/ZeroOneBooleanAdapter.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.runtime;
-
-import javax.xml.bind.DatatypeConverter;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-/**
- * Serializes <tt>boolean</tt> as 0 or 1.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.0
- */
-public class ZeroOneBooleanAdapter extends XmlAdapter<String,Boolean> {
- public Boolean unmarshal(String v) {
- if(v==null) return null;
- return DatatypeConverter.parseBoolean(v);
- }
-
- public String marshal(Boolean v) {
- if(v==null) return null;
- if(v) {
- return "1";
- } else {
- return "0";
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/package.html b/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/package.html
deleted file mode 100644
index 7844eb21..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/package.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
- Code generated into the user's packages in certain compilation mode.
-
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/CodeModelClassFactory.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/CodeModelClassFactory.java
deleted file mode 100644
index 9a597e33..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/CodeModelClassFactory.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.util;
-
-import com.sun.codemodel.internal.ClassType;
-import com.sun.codemodel.internal.JClassAlreadyExistsException;
-import com.sun.codemodel.internal.JClassContainer;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JJavaName;
-import com.sun.codemodel.internal.JMod;
-import com.sun.tools.internal.xjc.ErrorReceiver;
-
-import org.xml.sax.Locator;
-import org.xml.sax.SAXParseException;
-
-/**
- * Create new {@link JDefinedClass} and report class collision errors,
- * if necessary.
- *
- * This is just a helper class that simplifies the class name collision
- * detection. This object maintains no state, so it is OK to use
- * multiple instances of this.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class CodeModelClassFactory {
-
- /** errors are reported to this object. */
- private ErrorReceiver errorReceiver;
-
- /** unique id generator. */
- private int ticketMaster = 0;
-
-
- public CodeModelClassFactory( ErrorReceiver _errorReceiver ) {
- this.errorReceiver = _errorReceiver;
- }
-
- public JDefinedClass createClass( JClassContainer parent, String name, Locator source ) {
- return createClass( parent, JMod.PUBLIC, name, source );
- }
- public JDefinedClass createClass( JClassContainer parent, int mod, String name, Locator source ) {
- return createClass(parent,mod,name,source,ClassType.CLASS);
- }
-
- public JDefinedClass createInterface( JClassContainer parent, String name, Locator source ) {
- return createInterface( parent, JMod.PUBLIC, name, source );
- }
- public JDefinedClass createInterface( JClassContainer parent, int mod, String name, Locator source ) {
- return createClass(parent,mod,name,source,ClassType.INTERFACE);
- }
- public JDefinedClass createClass(
- JClassContainer parent, String name, Locator source, ClassType kind ) {
- return createClass(parent,JMod.PUBLIC,name,source,kind);
- }
- public JDefinedClass createClass(
- JClassContainer parent, int mod, String name, Locator source, ClassType kind ) {
-
- if(!JJavaName.isJavaIdentifier(name)) {
- // report the error
- errorReceiver.error( new SAXParseException(
- Messages.format( Messages.ERR_INVALID_CLASSNAME, name ), source ));
- return createDummyClass(parent);
- }
-
-
- try {
- if(parent.isClass() && kind==ClassType.CLASS)
- mod |= JMod.STATIC;
-
- JDefinedClass r = parent._class(mod,name,kind);
- // use the metadata field to store the source location,
- // so that we can report class name collision errors.
- r.metadata = source;
-
- return r;
- } catch( JClassAlreadyExistsException e ) {
- // class collision.
- JDefinedClass cls = e.getExistingClass();
-
- // report the error
- errorReceiver.error( new SAXParseException(
- Messages.format( Messages.ERR_CLASSNAME_COLLISION, cls.fullName() ),
- (Locator)cls.metadata ));
- errorReceiver.error( new SAXParseException(
- Messages.format( Messages.ERR_CLASSNAME_COLLISION_SOURCE, name ),
- source ));
-
- if( !name.equals(cls.name()) ) {
- // on Windows, FooBar and Foobar causes name collision
- errorReceiver.error( new SAXParseException(
- Messages.format( Messages.ERR_CASE_SENSITIVITY_COLLISION,
- name, cls.name() ), null ) );
- }
-
- if(Util.equals((Locator)cls.metadata,source)) {
- errorReceiver.error( new SAXParseException(
- Messages.format( Messages.ERR_CHAMELEON_SCHEMA_GONE_WILD ),
- source ));
- }
-
- return createDummyClass(parent);
- }
- }
-
- /**
- * Create a dummy class to recover from an error.
- *
- * We won't generate the code, so the client will never see this class
- * getting generated.
- */
- private JDefinedClass createDummyClass(JClassContainer parent) {
- try {
- return parent._class("$$$garbage$$$"+(ticketMaster++));
- } catch( JClassAlreadyExistsException ee ) {
- return ee.getExistingClass();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/DOMUtils.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/DOMUtils.java
deleted file mode 100644
index e0690262..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/DOMUtils.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * DOMUtils.java
- *
- * Created on May 7th 2002
- */
-
-package com.sun.tools.internal.xjc.util;
-
-import java.util.ArrayList;
-
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-/**
- *
- * @author Vivek Pandey
- * @version 1.0
- *
- */
-public class DOMUtils {
- /** Gets the fist child of the given name, or null. */
- public static Element getFirstChildElement( Element parent, String nsUri, String localPart ) {
- NodeList children = parent.getChildNodes();
- for( int i=0; i<children.getLength(); i++ ) {
- Node item = children.item(i);
- if(!(item instanceof Element )) continue;
-
- if(nsUri.equals(item.getNamespaceURI())
- && localPart.equals(item.getLocalName()) )
- return (Element)item;
- }
- return null;
- }
-
- /** Gets the child elements of the given name. */
- public static Element[] getChildElements(Element parent, String nsUri, String localPart ) {
- ArrayList a = new ArrayList();
- NodeList children = parent.getChildNodes();
- for( int i=0; i<children.getLength(); i++ ) {
- Node item = children.item(i);
- if(!(item instanceof Element )) continue;
-
- if(nsUri.equals(item.getNamespaceURI())
- && localPart.equals(item.getLocalName()) )
- a.add(item);
- }
- return (Element[]) a.toArray(new Element[a.size()]);
- }
-
- /** Gets all the child elements. */
- public static Element[] getChildElements( Element parent ) {
- ArrayList a = new ArrayList();
- NodeList children = parent.getChildNodes();
- for( int i=0; i<children.getLength(); i++ ) {
- Node item = children.item(i);
- if(!(item instanceof Element )) continue;
-
- a.add(item);
- }
- return (Element[]) a.toArray(new Element[a.size()]);
- }
-
-
- public static String getElementText(Element element) throws DOMException{
- for (Node child = element.getFirstChild(); child != null;
- child = child.getNextSibling()) {
- if(child.getNodeType() == Node.TEXT_NODE)
- return child.getNodeValue();
- }
- return element.getNodeValue();
- }
-
- public static Element getElement(Document parent, String name){
- NodeList children = parent.getElementsByTagName(name);
- if(children.getLength() >= 1)
- return (Element)children.item(0);
- return null;
- }
-
- public static Element getElement(Document parent, QName qname){
- NodeList children = parent.getElementsByTagNameNS(qname.getNamespaceURI(), qname.getLocalPart());
- if(children.getLength() >= 1)
- return (Element)children.item(0);
- return null;
- }
-
- public static Element getElement(Document parent, String namespaceURI,
- String localName) {
- NodeList children = parent.getElementsByTagNameNS(namespaceURI, localName);
- if(children.getLength() >= 1)
- return (Element)children.item(0);
- return null;
- }
-
- public static Element[] getElements(NodeList children) {
- Element[] elements = null;
- int len = 0;
- for (int i = 0; i < children.getLength(); ++i) {
- if (elements == null)
- elements = new Element[1];
- if (elements.length == len) {
- Element[] buf = new Element[elements.length + 1];
- System.arraycopy(elements, 0, buf, 0, elements.length);
- elements = buf;
- }
- elements[len++] = (Element)children.item(i);
- }
- return elements;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ErrorReceiverFilter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ErrorReceiverFilter.java
deleted file mode 100644
index ed5fb5bb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ErrorReceiverFilter.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.util;
-
-import com.sun.tools.internal.xjc.ErrorReceiver;
-import com.sun.tools.internal.xjc.api.ErrorListener;
-
-import org.xml.sax.SAXParseException;
-
-/**
- * Filter implementation of the ErrorReceiver.
- *
- * If an error is encountered, this filter sets a flag.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class ErrorReceiverFilter extends ErrorReceiver {
-
- public ErrorReceiverFilter() {}
-
- public ErrorReceiverFilter( ErrorListener h ) {
- setErrorReceiver(h);
- }
-
- private ErrorListener core;
- public void setErrorReceiver( ErrorListener handler ) {
- core = handler;
- }
-
- private boolean hadError = false;
- public final boolean hadError() { return hadError; }
-
- public void info(SAXParseException exception) {
- if(core!=null) core.info(exception);
- }
-
- public void warning(SAXParseException exception) {
- if(core!=null) core.warning(exception);
- }
-
- public void error(SAXParseException exception) {
- hadError = true;
- if(core!=null) core.error(exception);
- }
-
- public void fatalError(SAXParseException exception) {
- hadError = true;
- if(core!=null) core.fatalError(exception);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ForkContentHandler.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ForkContentHandler.java
deleted file mode 100644
index 6fe40d6e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ForkContentHandler.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.util;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-/**
- * ContentHandler that "forks" the incoming SAX2 events to
- * two ContentHandlers.
- *
- *
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class ForkContentHandler implements ContentHandler {
-
- /**
- * Creates a ForkContentHandler.
- *
- * @param first
- * This handler will receive a SAX event first.
- * @param second
- * This handler will receive a SAX event after the first handler
- * receives it.
- */
- public ForkContentHandler( ContentHandler first, ContentHandler second ) {
- lhs = first;
- rhs = second;
- }
-
- /**
- * Creates ForkContentHandlers so that the specified handlers
- * will receive SAX events in the order of the array.
- */
- public static ContentHandler create( ContentHandler[] handlers ) {
- if(handlers.length==0)
- throw new IllegalArgumentException();
-
- ContentHandler result = handlers[0];
- for( int i=1; i<handlers.length; i++ )
- result = new ForkContentHandler( result, handlers[i] );
- return result;
- }
-
-
- private final ContentHandler lhs,rhs;
-
- public void setDocumentLocator (Locator locator) {
- lhs.setDocumentLocator(locator);
- rhs.setDocumentLocator(locator);
- }
-
- public void startDocument() throws SAXException {
- lhs.startDocument();
- rhs.startDocument();
- }
-
- public void endDocument () throws SAXException {
- lhs.endDocument();
- rhs.endDocument();
- }
-
- public void startPrefixMapping (String prefix, String uri) throws SAXException {
- lhs.startPrefixMapping(prefix,uri);
- rhs.startPrefixMapping(prefix,uri);
- }
-
- public void endPrefixMapping (String prefix) throws SAXException {
- lhs.endPrefixMapping(prefix);
- rhs.endPrefixMapping(prefix);
- }
-
- public void startElement (String uri, String localName, String qName, Attributes attributes) throws SAXException {
- lhs.startElement(uri,localName,qName,attributes);
- rhs.startElement(uri,localName,qName,attributes);
- }
-
- public void endElement (String uri, String localName, String qName) throws SAXException {
- lhs.endElement(uri,localName,qName);
- rhs.endElement(uri,localName,qName);
- }
-
- public void characters (char ch[], int start, int length) throws SAXException {
- lhs.characters(ch,start,length);
- rhs.characters(ch,start,length);
- }
-
- public void ignorableWhitespace (char ch[], int start, int length) throws SAXException {
- lhs.ignorableWhitespace(ch,start,length);
- rhs.ignorableWhitespace(ch,start,length);
- }
-
- public void processingInstruction (String target, String data) throws SAXException {
- lhs.processingInstruction(target,data);
- rhs.processingInstruction(target,data);
- }
-
- public void skippedEntity (String name) throws SAXException {
- lhs.skippedEntity(name);
- rhs.skippedEntity(name);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ForkEntityResolver.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ForkEntityResolver.java
deleted file mode 100644
index 839619ab..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ForkEntityResolver.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.util;
-
-import java.io.IOException;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * {@link EntityResolver} that delegates to two {@link EntityResolver}s.
- *
- * @author Kohsuke Kawaguchi
- */
-public class ForkEntityResolver implements EntityResolver {
- private final EntityResolver lhs;
- private final EntityResolver rhs;
-
- public ForkEntityResolver(EntityResolver lhs, EntityResolver rhs) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
- InputSource is = lhs.resolveEntity(publicId, systemId);
- if(is!=null)
- return is;
- return rhs.resolveEntity(publicId,systemId);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle.properties
deleted file mode 100644
index 864ece07..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle.properties
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CodeModelClassFactory.ClassNameCollision = \
- A class/interface with the same name "{0}" is already in use. \
- Use a class customization to resolve this conflict.
-
-CodeModelClassFactory.ClassNameCollision.Source = \
- (Relevant to above error) another "{0}" is generated from here.
-
-ERR_INVALID_CLASSNAME = \
- Invalid class name "{0}". Either XJC has failed to derive a class name \
- from XML name, or invalid name is given. Use <jaxb:class> customization \
- to override a name.
-
-CodeModelClassFactory.CaseSensitivityCollision = \
- This error is caused because on Windows you cannot have both "{0}.java" and "{1}.java" \
- in the same directory.
-
-ERR_CHAMELEON_SCHEMA_GONE_WILD = \
- (Relevant to above error) This confusing error happened most likely because the schema uses a technique called \
- "chameleon schema", which causes a single definition to be loaded multiple times into \
- different namespaces. See http://forums.java.net/jive/thread.jspa?threadID=18631 for \
- more about this.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_de.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_de.properties
deleted file mode 100644
index 900eea18..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_de.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CodeModelClassFactory.ClassNameCollision = Eine Klasse/Schnittstelle mit demselben Namen "{0}" wird bereits verwendet. Verwenden Sie eine Klassenanpassung, um diesen Konflikt zu l\u00F6sen.
-
-CodeModelClassFactory.ClassNameCollision.Source = eine weitere "{0}" wird von hier generiert.
-
-ERR_INVALID_CLASSNAME = Ung\u00FCltiger Klassenname "{0}". Entweder konnte XJC keinen Klassennamen aus dem XML-Namen ableiten, oder ein ung\u00FCltiger Name wird angegeben. Verwenden Sie die <jaxb:class>-Anpassung, um einen Namen zu \u00FCberschreiben.
-
-CodeModelClassFactory.CaseSensitivityCollision = Dieser Fehler wird verursacht, weil bei Windows nicht "{0}.java" und "{1}.java" im selben Verzeichnis vorhanden sein k\u00F6nnen.
-
-ERR_CHAMELEON_SCHEMA_GONE_WILD = Dieser verwirrende Fehler tritt wahrscheinlich auf, weil das Schema eine Technik namens "Cham\u00E4leon-Schema" verwendet, die dazu f\u00FChrt, dass eine einzelne Definition mehrmals in unterschiedliche Namespaces geladen wird. Weitere Informationen dazu finden Sie unter "http://forums.java.net/jive/thread.jspa?threadID=18631".
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_es.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_es.properties
deleted file mode 100644
index 54998ddb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_es.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CodeModelClassFactory.ClassNameCollision = Ya se est\u00E1 utilizando una clase/interfaz con el mismo nombre"{0}". Utilice una personalizaci\u00F3n de clase para resolver este conflicto.
-
-CodeModelClassFactory.ClassNameCollision.Source = (Relacionado con el error anterior) desde aqu\u00ED se genera otro "{0}".
-
-ERR_INVALID_CLASSNAME = Nombre de clase no v\u00E1lido "{0}". XJC no ha derivado correctamente un nombre de clase a partir del nombre XML o se ha proporcionado un nombre no v\u00E1lido. Utilice la personalizaci\u00F3n de <jaxb:class> para sustituir un nombre.
-
-CodeModelClassFactory.CaseSensitivityCollision = Este error se debe a que en Windows no se puede tener "{0}.java" y "{1}.java" en el mismo directorio.
-
-ERR_CHAMELEON_SCHEMA_GONE_WILD = (Relacionado con el error anterior) Probablemente, este error tan confuso se ha producido porque el esquema utiliza una t\u00E9cnica que se denomina "esquema de camale\u00F3n", que hace que una \u00FAnica definici\u00F3n se cargue varias veces en espacios de nombres diferentes. Visite http://forums.java.net/jive/thread.jspa?threadID=18631 para obtener m\u00E1s informaci\u00F3n acerca de este tema.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_fr.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_fr.properties
deleted file mode 100644
index 53250d09..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_fr.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CodeModelClassFactory.ClassNameCollision = Une classe/interface portant le m\u00EAme nom "{0}" est d\u00E9j\u00E0 utilis\u00E9e. Utilisez une personnalisation de classe pour r\u00E9soudre ce conflit.
-
-CodeModelClassFactory.ClassNameCollision.Source = (voir erreur ci-dessus) un autre \u00E9l\u00E9ment "{0}" est g\u00E9n\u00E9r\u00E9 \u00E0 partir d''ici.
-
-ERR_INVALID_CLASSNAME = Nom de classe "{0}" non valide. JXC n''a pas pu d\u00E9river un nom de classe du nom XML ou un nom non valide a \u00E9t\u00E9 donn\u00E9. Utilisez la personnalisation <jaxb:class> pour remplacer un nom.
-
-CodeModelClassFactory.CaseSensitivityCollision = Cette erreur est due au fait que "{0}.java" et "{1}.java" ne peuvent pas figurer dans le m\u00EAme r\u00E9pertoire sur Windows.
-
-ERR_CHAMELEON_SCHEMA_GONE_WILD = (voir erreur ci-dessus) Cette erreur qui porte \u00E0 confusion s'est produite probablement parce que le sch\u00E9ma utilise une technique appel\u00E9e "sch\u00E9ma cam\u00E9l\u00E9on", qui entra\u00EEne le chargement d'une m\u00EAme d\u00E9finition \u00E0 plusieurs reprises dans diff\u00E9rents espaces de noms. Pour plus d'informations, reportez-vous \u00E0 http://forums.java.net/jive/thread.jspa?threadID=18631.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_it.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_it.properties
deleted file mode 100644
index e0a81af0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_it.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CodeModelClassFactory.ClassNameCollision = \u00C8 gi\u00E0 in uso una classe/interfaccia con lo stesso nome "{0}". Usare una personalizzazione di classe per risolvere il conflitto.
-
-CodeModelClassFactory.ClassNameCollision.Source = (Relativo all''errore riportato sopra) da qui viene generato un altro "{0}".
-
-ERR_INVALID_CLASSNAME = Nome classe "{0}" non valido. XJC non \u00E8 riuscito a derivare un nome classe dal nome XML oppure \u00E8 stato fornito un nome non valido. Usare la personalizzazione <jaxb:class> per sostituire un nome.
-
-CodeModelClassFactory.CaseSensitivityCollision = Questo errore \u00E8 causato dal fatto che in Windows non \u00E8 possibile avere "{0}.java" e "{1}.java" nella stessa directory.
-
-ERR_CHAMELEON_SCHEMA_GONE_WILD = (Relativo all''errore riportato sopra) Questo errore che genera confusione si \u00E8 verificato molto probabilmente perch\u00E9 lo schema usa una tecnica denominata "schema camaleonte" che provoca il caricamento di una singola definizione pi\u00F9 volte in diversi spazi di nomi. Per ulteriori informazioni su questo argomento, vedere http://forums.java.net/jive/thread.jspa?threadID=18631.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_ja.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_ja.properties
deleted file mode 100644
index 8c3d7513..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_ja.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CodeModelClassFactory.ClassNameCollision = \u540C\u3058\u540D\u524D"{0}"\u306E\u30AF\u30E9\u30B9/\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304C\u3059\u3067\u306B\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u3053\u306E\u7AF6\u5408\u3092\u89E3\u6C7A\u3059\u308B\u306B\u306F\u3001\u30AF\u30E9\u30B9\u30FB\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-CodeModelClassFactory.ClassNameCollision.Source = (\u524D\u8FF0\u306E\u30A8\u30E9\u30FC\u306B\u95A2\u9023\u3057\u3066)\u5225\u306E"{0}"\u304C\u3053\u3053\u304B\u3089\u751F\u6210\u3055\u308C\u307E\u3059\u3002
-
-ERR_INVALID_CLASSNAME = \u30AF\u30E9\u30B9\u540D"{0}"\u304C\u7121\u52B9\u3067\u3059\u3002XJC\u304CXML\u540D\u304B\u3089\u30AF\u30E9\u30B9\u540D\u3092\u5C0E\u51FA\u3067\u304D\u306A\u304B\u3063\u305F\u304B\u3001\u7121\u52B9\u306A\u540D\u524D\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\u3002\u540D\u524D\u3092\u4E0A\u66F8\u304D\u3059\u308B\u306B\u306F\u3001<jaxb:class>\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
-
-CodeModelClassFactory.CaseSensitivityCollision = \u3053\u306E\u30A8\u30E9\u30FC\u306F\u3001Windows\u3067\u306F"{0}.java"\u3068"{1}.java"\u306E\u4E21\u65B9\u3092\u540C\u3058\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u4F7F\u7528\u3067\u304D\u306A\u3044\u305F\u3081\u306B\u767A\u751F\u3057\u307E\u3059\u3002
-
-ERR_CHAMELEON_SCHEMA_GONE_WILD = (\u524D\u8FF0\u306E\u30A8\u30E9\u30FC\u306B\u95A2\u9023\u3057\u3066)\u3053\u306E\u308F\u304B\u308A\u306B\u304F\u3044\u30A8\u30E9\u30FC\u306F\u3001\u30B9\u30AD\u30FC\u30DE\u304C\u300C\u30AB\u30E1\u30EC\u30AA\u30F3\u30FB\u30B9\u30AD\u30FC\u30DE\u300D\u3068\u547C\u3070\u308C\u308B\u65B9\u6CD5\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u305F\u3081\u306B\u767A\u751F\u3057\u305F\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u65B9\u6CD5\u3067\u306F\u30011\u3064\u306E\u5B9A\u7FA9\u304C\u7570\u306A\u308B\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306B\u8907\u6570\u56DE\u30ED\u30FC\u30C9\u3055\u308C\u307E\u3059\u3002\u3053\u306E\u554F\u984C\u306E\u8A73\u7D30\u306F\u3001http://forums.java.net/jive/thread.jspa?threadID=18631\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_ko.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_ko.properties
deleted file mode 100644
index 33daea16..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_ko.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CodeModelClassFactory.ClassNameCollision = \uB3D9\uC77C\uD55C \uC774\uB984 "{0}"\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB294 \uD074\uB798\uC2A4/\uC778\uD130\uD398\uC774\uC2A4\uAC00 \uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC785\uB2C8\uB2E4. \uD074\uB798\uC2A4 \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uC774 \uCDA9\uB3CC\uC744 \uD574\uACB0\uD558\uC2ED\uC2DC\uC624.
-
-CodeModelClassFactory.ClassNameCollision.Source = (\uC704 \uC624\uB958\uC640 \uAD00\uB828\uB428) \uB2E4\uB978 "{0}"\uC774(\uAC00) \uC5EC\uAE30\uC11C \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-ERR_INVALID_CLASSNAME = "{0}"\uC740(\uB294) \uBD80\uC801\uD569\uD55C \uD074\uB798\uC2A4 \uC774\uB984\uC785\uB2C8\uB2E4. XJC\uAC00 XML \uC774\uB984\uC5D0\uC11C \uD074\uB798\uC2A4 \uC774\uB984 \uD30C\uC0DD\uC744 \uC2E4\uD328\uD588\uAC70\uB098 \uBD80\uC801\uD569\uD55C \uC774\uB984\uC774 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4. <jaxb:class> \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uC774\uB984\uC744 \uBB34\uD6A8\uD654\uD558\uC2ED\uC2DC\uC624.
-
-CodeModelClassFactory.CaseSensitivityCollision = Windows\uC5D0\uC11C\uB294 \uB3D9\uC77C\uD55C \uB514\uB809\uD1A0\uB9AC\uC5D0 "{0}.java"\uC640 "{1}.java"\uB97C \uD568\uAED8 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC73C\uBBC0\uB85C \uC774 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-
-ERR_CHAMELEON_SCHEMA_GONE_WILD = (\uC704 \uC624\uB958\uC640 \uAD00\uB828\uB428) \uC774 \uC624\uB958\uB294 \uC2A4\uD0A4\uB9C8\uC5D0 "\uCE74\uBA5C\uB808\uC628 \uC2A4\uD0A4\uB9C8"\uB77C\uB294 \uAE30\uC220\uC774 \uC0AC\uC6A9\uB418\uC5B4 \uD558\uB098\uC758 \uC815\uC758\uAC00 \uB2E4\uB978 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uC5EC\uB7EC \uBC88 \uB85C\uB4DC\uB418\uC5B4 \uBC1C\uC0DD\uD55C \uAC83\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 http://forums.java.net/jive/thread.jspa?threadID=18631\uC744 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_pt_BR.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_pt_BR.properties
deleted file mode 100644
index be1ae8d4..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_pt_BR.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CodeModelClassFactory.ClassNameCollision = Uma classe/interface com o mesmo nome "{0}" j\u00E1 est\u00E1 sendo usada. Use a personaliza\u00E7\u00E3o de classe para resolver este conflito.
-
-CodeModelClassFactory.ClassNameCollision.Source = (Relevante para o erro acima) outro "{0}" foi gerado daqui.
-
-ERR_INVALID_CLASSNAME = Nome de classe inv\u00E1lido "{0}". O XJC falhou ao derivar um nome de classe do nome do XML ou foi fornecido um nome inv\u00E1lido. Use a personaliza\u00E7\u00E3o <jaxb:class> para substituir um nome.
-
-CodeModelClassFactory.CaseSensitivityCollision = Este erro foi causado porque no Windows voc\u00EA n\u00E3o pode ter "{0}.java" e "{1}.java" no mesmo diret\u00F3rio.
-
-ERR_CHAMELEON_SCHEMA_GONE_WILD = (Relevante para o erro acima) Este erro confuso aconteceu provavelmente porque o esquema usa uma t\u00E9cnica denominada "esquema camale\u00E3o" que faz com que uma defini\u00E7\u00E3o \u00FAnica seja carregada v\u00E1rias vezes em diferentes namespaces. Consulte http://forums.java.net/jive/thread.jspa?threadID=18631 para obter mais informa\u00E7\u00F5es.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_zh_CN.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_zh_CN.properties
deleted file mode 100644
index 7f4e2fdb..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_zh_CN.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CodeModelClassFactory.ClassNameCollision = \u5177\u6709\u76F8\u540C\u540D\u79F0 "{0}" \u7684\u7C7B/\u63A5\u53E3\u5DF2\u5728\u4F7F\u7528\u3002\u8BF7\u4F7F\u7528\u7C7B\u5B9A\u5236\u8BBE\u7F6E\u6765\u89E3\u51B3\u6B64\u51B2\u7A81\u3002
-
-CodeModelClassFactory.ClassNameCollision.Source = (\u4E0E\u4E0A\u4E00\u9519\u8BEF\u76F8\u5173) \u5728\u6B64\u5904\u751F\u6210\u4E86\u5176\u4ED6 "{0}"\u3002
-
-ERR_INVALID_CLASSNAME = \u7C7B\u540D "{0}" \u65E0\u6548\u3002XJC \u65E0\u6CD5\u4ECE XML \u540D\u79F0\u6D3E\u751F\u7C7B\u540D, \u6216\u8005\u6307\u5B9A\u7684\u540D\u79F0\u65E0\u6548\u3002\u8BF7\u4F7F\u7528 <jaxb:class> \u5B9A\u5236\u8BBE\u7F6E\u8986\u76D6\u540D\u79F0\u3002
-
-CodeModelClassFactory.CaseSensitivityCollision = \u51FA\u73B0\u6B64\u9519\u8BEF\u7684\u539F\u56E0\u662F, \u5728 Windows \u4E0A "{0}.java" \u548C "{1}.java" \u4E0D\u80FD\u4F4D\u4E8E\u540C\u4E00\u76EE\u5F55\u3002
-
-ERR_CHAMELEON_SCHEMA_GONE_WILD = (\u4E0E\u4E0A\u4E00\u9519\u8BEF\u76F8\u5173) \u51FA\u73B0\u6B64\u4EE4\u4EBA\u6DF7\u6DC6\u7684\u9519\u8BEF\u7684\u539F\u56E0\u6700\u53EF\u80FD\u662F\u6A21\u5F0F\u4F7F\u7528\u4E86\u4E00\u79CD\u540D\u4E3A "\u53D8\u8272\u9F99\u6A21\u5F0F" \u7684\u6280\u672F, \u8BE5\u6280\u672F\u4F1A\u5BFC\u81F4\u5355\u4E2A\u5B9A\u4E49\u591A\u6B21\u52A0\u8F7D\u5230\u4E0D\u540C\u7684\u540D\u79F0\u7A7A\u95F4\u3002\u6709\u5173\u6B64\u9519\u8BEF\u7684\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u8BBF\u95EE http://forums.java.net/jive/thread.jspa?threadID=18631\u3002
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_zh_TW.properties b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_zh_TW.properties
deleted file mode 100644
index 48c5fa19..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_zh_TW.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Message resource file
-#
-
-
-
-CodeModelClassFactory.ClassNameCollision = \u76F8\u540C\u540D\u7A31 "{0}" \u7684\u985E\u5225/\u4ECB\u9762\u5DF2\u5728\u4F7F\u7528\u4E2D. \u8ACB\u4F7F\u7528\u985E\u5225\u81EA\u8A02\u9805\u76EE\u4EE5\u89E3\u6C7A\u6B64\u885D\u7A81.
-
-CodeModelClassFactory.ClassNameCollision.Source = (\u8207\u4E0A\u8FF0\u932F\u8AA4\u6709\u95DC) \u53E6\u4E00\u500B "{0}" \u5F9E\u6B64\u8655\u7522\u751F.
-
-ERR_INVALID_CLASSNAME = \u7121\u6548\u7684\u985E\u5225\u540D\u7A31 "{0}". XJC \u7121\u6CD5\u5F9E XML \u540D\u7A31\u4E2D\u884D\u751F\u985E\u5225\u540D\u7A31, \u6216\u662F\u6307\u5B9A\u7684\u540D\u7A31\u7121\u6548. \u8ACB\u4F7F\u7528 <jaxb:class> \u81EA\u8A02\u9805\u76EE\u8986\u5BEB\u540D\u7A31.
-
-CodeModelClassFactory.CaseSensitivityCollision = \u767C\u751F\u6B64\u932F\u8AA4\u7684\u539F\u56E0, \u662F\u56E0\u70BA\u5728 Windows \u4E2D, "{0}.java" \u8207 "{1}.java" \u4E0D\u80FD\u540C\u6642\u5728\u76F8\u540C\u7684\u76EE\u9304\u4E2D.
-
-ERR_CHAMELEON_SCHEMA_GONE_WILD = (\u8207\u4E0A\u8FF0\u932F\u8AA4\u6709\u95DC) \u4E4B\u6240\u4EE5\u767C\u751F\u9019\u500B\u4EE4\u4EBA\u56F0\u60D1\u7684\u932F\u8AA4, \u6700\u53EF\u80FD\u7684\u539F\u56E0\u662F\u7DB1\u8981\u4F7F\u7528\u4E00\u7A2E\u7A31\u70BA\u300C\u4FDD\u8B77\u96B1\u85CF\u7DB1\u8981\u300D(Chameleon Schema) \u7684\u6280\u8853, \u6703\u5C0E\u81F4\u55AE\u4E00\u5B9A\u7FA9\u591A\u6B21\u8F09\u5165\u4E0D\u540C\u7684\u547D\u540D\u7A7A\u9593. \u8ACB\u53C3\u95B1 http://forums.java.net/jive/thread.jspa?threadID=18631 \u4EE5\u53D6\u5F97\u66F4\u591A\u8207\u6B64\u76F8\u95DC\u7684\u8CC7\u8A0A.
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/Messages.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/Messages.java
deleted file mode 100644
index 57904acd..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/Messages.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.util;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-class Messages
-{
- /** Loads a string resource and formats it with specified arguments. */
- static String format( String property, Object... args ) {
- String text = ResourceBundle.getBundle(Messages.class.getPackage().getName() +".MessageBundle").getString(property);
- return MessageFormat.format(text,args);
- }
-
-
- static final String ERR_CLASSNAME_COLLISION =
- "CodeModelClassFactory.ClassNameCollision";
-
- static final String ERR_CLASSNAME_COLLISION_SOURCE =
- "CodeModelClassFactory.ClassNameCollision.Source";
-
- static final String ERR_INVALID_CLASSNAME =
- "ERR_INVALID_CLASSNAME";
-
- static final String ERR_CASE_SENSITIVITY_COLLISION = // 2 args
- "CodeModelClassFactory.CaseSensitivityCollision";
-
- static final String ERR_CHAMELEON_SCHEMA_GONE_WILD = // no argts
- "ERR_CHAMELEON_SCHEMA_GONE_WILD";
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MimeTypeRange.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MimeTypeRange.java
deleted file mode 100644
index 2e0d22ee..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MimeTypeRange.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.util;
-
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public class MimeTypeRange {
- public final String majorType;
- public final String subType;
-
- public final Map<String,String> parameters = new HashMap<String, String>();
-
- /**
- * Each media-range MAY be followed by one or more accept-params,
- * beginning with the "q" parameter for indicating a relative quality
- * factor. The first "q" parameter (if any) separates the media-range
- * parameter(s) from the accept-params. Quality factors allow the user
- * or user agent to indicate the relative degree of preference for that
- * media-range, using the qvalue scale from 0 to 1 (section 3.9). The
- * default value is q=1.
- */
- public final float q;
-
- // accept-extension is not implemented
-
- public static List<MimeTypeRange> parseRanges(String s) throws ParseException {
- StringCutter cutter = new StringCutter(s,true);
- List<MimeTypeRange> r = new ArrayList<MimeTypeRange>();
- while(cutter.length()>0) {
- r.add(new MimeTypeRange(cutter));
- }
- return r;
- }
-
- public MimeTypeRange(String s) throws ParseException {
- this(new StringCutter(s,true));
- }
-
- /**
- * Used only to produce the static constants within this class.
- */
- private static MimeTypeRange create(String s) {
- try {
- return new MimeTypeRange(s);
- } catch (ParseException e) {
- // we only use this method for known inputs
- throw new Error(e);
- }
- }
-
- /**
- * @param cutter
- * A string like "text/html; charset=utf-8;
- */
- private MimeTypeRange(StringCutter cutter) throws ParseException {
- majorType = cutter.until("/");
- cutter.next("/");
- subType = cutter.until("[;,]");
-
- float q = 1.0f;
-
- while(cutter.length()>0) {
- String sep = cutter.next("[;,]");
- if(sep.equals(","))
- break;
-
- String key = cutter.until("=");
- cutter.next("=");
- String value;
- char ch = cutter.peek();
- if(ch=='"') {
- // quoted
- cutter.next("\"");
- value = cutter.until("\"");
- cutter.next("\"");
- } else {
- value = cutter.until("[;,]");
- }
-
- if(key.equals("q")) {
- q = Float.parseFloat(value);
- } else {
- parameters.put(key,value);
- }
- }
-
- this.q = q;
- }
-
- public MimeType toMimeType() throws MimeTypeParseException {
- // due to the additional error check done in the MimeType class,
- // an error at this point is possible
- return new MimeType(toString());
- }
-
- public String toString() {
- StringBuilder sb = new StringBuilder(majorType+'/'+subType);
- if(q!=1)
- sb.append("; q=").append(q);
-
- for( Map.Entry<String,String> p : parameters.entrySet() ) {
- // I'm too lazy to quote the value
- sb.append("; ").append(p.getKey()).append('=').append(p.getValue());
- }
- return sb.toString();
- }
-
- public static final MimeTypeRange ALL = create("*/*");
-
- /**
- * Creates a range by merging all the given types.
- */
- public static MimeTypeRange merge( Collection<MimeTypeRange> types ) {
- if(types.size()==0) throw new IllegalArgumentException();
- if(types.size()==1) return types.iterator().next();
-
- String majorType=null;
- for (MimeTypeRange mt : types) {
- if(majorType==null) majorType = mt.majorType;
- if(!majorType.equals(mt.majorType))
- return ALL;
- }
-
- return create(majorType+"/*");
- }
-
- public static void main(String[] args) throws ParseException {
- for( MimeTypeRange m : parseRanges(args[0]))
- System.out.println(m.toString());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/NamespaceContextAdapter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/NamespaceContextAdapter.java
deleted file mode 100644
index 31f7661b..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/NamespaceContextAdapter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.util;
-
-import java.util.Collections;
-import java.util.Iterator;
-
-import javax.xml.namespace.NamespaceContext;
-
-import com.sun.xml.internal.xsom.XmlString;
-
-import org.relaxng.datatype.ValidationContext;
-
-/**
- * Take a {@link ValidationContext} and make it look like a {@link NamespaceContext}.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class NamespaceContextAdapter implements NamespaceContext {
- private XmlString xstr;
-
- public NamespaceContextAdapter(XmlString xstr) {
- this.xstr = xstr;
- }
-
- public String getNamespaceURI(String prefix) {
- return xstr.resolvePrefix(prefix);
- }
-
- public String getPrefix(String namespaceURI) {
- return null;
- }
-
- public Iterator getPrefixes(String namespaceURI) {
- return Collections.EMPTY_LIST.iterator();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/NullStream.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/NullStream.java
deleted file mode 100644
index 8199f353..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/NullStream.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.util;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * Just consumes the byte stream. Kind of like /dev/null.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class NullStream extends OutputStream {
-
- public void write(int b) throws IOException {
- }
-
- public void close() throws IOException {
- }
-
- public void flush() throws IOException {
- }
-
- public void write(byte[] b, int off, int len) throws IOException {
- }
-
- public void write(byte[] b) throws IOException {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ReadOnlyAdapter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ReadOnlyAdapter.java
deleted file mode 100644
index f832eaf0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/ReadOnlyAdapter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.util;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-/**
- * {@link XmlAdapter} used inside XJC is almost always unmarshal-only.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class ReadOnlyAdapter<OnTheWire,InMemory> extends XmlAdapter<OnTheWire,InMemory> {
- public final OnTheWire marshal(InMemory onTheWire) {
- // the unmarshaller uses this method
- // to get the current collection object from the property.
- // so we can't just throw UnsupportedOperationException here
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/StringCutter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/StringCutter.java
deleted file mode 100644
index 2db3aca0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/StringCutter.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.util;
-
-import java.text.ParseException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Utility class to parse a string
- *
- * @author Kohsuke Kawaguchi
- */
-public final class StringCutter {
- private final String original;
- private String s;
- private boolean ignoreWhitespace;
-
- public StringCutter(String s, boolean ignoreWhitespace) {
- this.s = this.original = s;
- this.ignoreWhitespace = ignoreWhitespace;
- }
-
- public void skip(String regexp) throws ParseException {
- next(regexp);
- }
-
- public String next(String regexp) throws ParseException {
- trim();
- Pattern p = Pattern.compile(regexp);
- Matcher m = p.matcher(s);
- if(m.lookingAt()) {
- String r = m.group();
- s = s.substring(r.length());
- trim();
- return r;
- } else
- throw error();
- }
-
- private ParseException error() {
- return new ParseException(original,original.length()-s.length());
- }
-
- public String until(String regexp) throws ParseException {
- Pattern p = Pattern.compile(regexp);
- Matcher m = p.matcher(s);
- if(m.find()) {
- String r = s.substring(0,m.start());
- s = s.substring(m.start());
- if(ignoreWhitespace)
- r = r.trim();
- return r;
- } else {
- // return everything left
- String r = s;
- s = "";
- return r;
- }
- }
-
- public char peek() {
- return s.charAt(0);
- }
-
- private void trim() {
- if(ignoreWhitespace)
- s = s.trim();
- }
-
- public int length() {
- return s.length();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/SubtreeCutter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/SubtreeCutter.java
deleted file mode 100644
index 2bb14444..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/SubtreeCutter.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.util;
-
-import org.xml.sax.helpers.XMLFilterImpl;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.XMLFilter;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.Attributes;
-
-/**
- * {@link XMLFilter} that can cut sub-trees.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class SubtreeCutter extends XMLFilterImpl {
- /**
- * When we are pruning a sub tree, this field holds the depth of
- * elements that are being cut. Used to resume event forwarding.
- *
- * As long as this value is 0, we will pass through data.
- */
- private int cutDepth=0;
-
-
- /**
- * This object will receive SAX events while a sub tree is being
- * pruned.
- */
- private static final ContentHandler stub = new DefaultHandler();
-
- /**
- * This field remembers the user-specified ContentHandler.
- * So that we can restore it once the sub tree is completely pruned.
- */
- private ContentHandler next;
-
-
- public void startDocument() throws SAXException {
- cutDepth=0;
- super.startDocument();
- }
-
- public boolean isCutting() {
- return cutDepth>0;
- }
-
- /**
- * Starts cutting a sub-tree. Should be called from within the
- * {@link #startElement(String, String, String, Attributes)} implementation
- * before the execution is passed to {@link SubtreeCutter#startElement(String, String, String, Attributes)} .
- * The current element will be cut.
- */
- public void startCutting() {
- super.setContentHandler(stub);
- cutDepth=1;
- }
-
- public void setContentHandler(ContentHandler handler) {
- next = handler;
- // changes take effect immediately unless the sub-tree is being pruned
- if(getContentHandler()!=stub)
- super.setContentHandler(handler);
- }
-
- public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
- if(cutDepth>0)
- cutDepth++;
- super.startElement(uri, localName, qName, atts);
- }
-
- public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
- super.endElement(namespaceURI, localName, qName);
-
- if( cutDepth!=0 ) {
- cutDepth--;
- if( cutDepth == 1 ) {
- // pruning completed. restore the user handler
- super.setContentHandler(next);
- cutDepth=0;
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/Util.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/Util.java
deleted file mode 100644
index f3711d9e..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/Util.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.util;
-
-import org.xml.sax.Locator;
-
-
-/**
- * Other miscellaneous utility methods.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class Util {
- private Util() {} // no instanciation please
-
- /**
- * An easier-to-use version of the System.getProperty method
- * that doesn't throw an exception even if a property cannot be
- * read.
- */
- public static String getSystemProperty( String name ) {
- try {
- return System.getProperty(name);
- } catch( SecurityException e ) {
- return null;
- }
- }
-
- /**
- * Compares if two {@link Locator}s point to the exact same position.
- */
- public static boolean equals(Locator lhs, Locator rhs) {
- return lhs.getLineNumber()==rhs.getLineNumber()
- && lhs.getColumnNumber()==rhs.getColumnNumber()
- && equals(lhs.getSystemId(),rhs.getSystemId())
- && equals(lhs.getPublicId(),rhs.getPublicId());
- }
-
- private static boolean equals(String lhs, String rhs) {
- if(lhs==null && rhs==null) return true;
- if(lhs==null || rhs==null) return false;
- return lhs.equals(rhs);
- }
-
- /**
- * Calls the other getSystemProperty method with
- * "[clazz]&#x2E;[name].
- */
- public static String getSystemProperty( Class clazz, String name ) {
- return getSystemProperty( clazz.getName()+'.'+name );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/tools/internal/xjc/writer/SignatureWriter.java b/src/share/jaxws_classes/com/sun/tools/internal/xjc/writer/SignatureWriter.java
deleted file mode 100644
index c6c888c0..00000000
--- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/writer/SignatureWriter.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.tools.internal.xjc.writer;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import com.sun.codemodel.internal.JClass;
-import com.sun.codemodel.internal.JClassContainer;
-import com.sun.codemodel.internal.JDefinedClass;
-import com.sun.codemodel.internal.JPackage;
-import com.sun.codemodel.internal.JType;
-import com.sun.tools.internal.xjc.outline.ClassOutline;
-import com.sun.tools.internal.xjc.outline.FieldOutline;
-import com.sun.tools.internal.xjc.outline.Outline;
-
-/**
- * Dumps an annotated grammar in a simple format that
- * makes signature check easy.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class SignatureWriter {
-
- public static void write( Outline model, Writer out )
- throws IOException {
-
- new SignatureWriter(model,out).dump();
- }
-
- private SignatureWriter( Outline model, Writer out ) {
- this.out = out;
- this.classes = model.getClasses();
-
- for( ClassOutline ci : classes )
- classSet.put( ci.ref, ci );
- }
-
- /** All the ClassItems in this grammar. */
- private final Collection<? extends ClassOutline> classes;
- /** Map from content interfaces to ClassItem. */
- private final Map<JDefinedClass,ClassOutline> classSet = new HashMap<JDefinedClass,ClassOutline>();
-
- private final Writer out;
- private int indent=0;
- private void printIndent() throws IOException {
- for( int i=0; i<indent; i++ )
- out.write(" ");
- }
- private void println(String s) throws IOException {
- printIndent();
- out.write(s);
- out.write('\n');
- }
-
- private void dump() throws IOException {
-
- // collect packages used in the class.
- Set<JPackage> packages = new TreeSet<JPackage>(new Comparator<JPackage>() {
- public int compare(JPackage lhs, JPackage rhs) {
- return lhs.name().compareTo(rhs.name());
- }
- });
- for( ClassOutline ci : classes )
- packages.add(ci._package()._package());
-
- for( JPackage pkg : packages )
- dump( pkg );
-
- out.flush();
- }
-
- private void dump( JPackage pkg ) throws IOException {
- println("package "+pkg.name()+" {");
- indent++;
- dumpChildren(pkg);
- indent--;
- println("}");
- }
-
- private void dumpChildren( JClassContainer cont ) throws IOException {
- Iterator itr = cont.classes();
- while(itr.hasNext()) {
- JDefinedClass cls = (JDefinedClass)itr.next();
- ClassOutline ci = classSet.get(cls);
- if(ci!=null)
- dump(ci);
- }
- }
-
- private void dump( ClassOutline ci ) throws IOException {
- JDefinedClass cls = ci.implClass;
-
- StringBuilder buf = new StringBuilder();
- buf.append("interface ");
- buf.append(cls.name());
-
- boolean first=true;
- Iterator itr = cls._implements();
- while(itr.hasNext()) {
- if(first) {
- buf.append(" extends ");
- first=false;
- } else {
- buf.append(", ");
- }
- buf.append( printName((JClass)itr.next()) );
- }
- buf.append(" {");
- println(buf.toString());
- indent++;
-
- // dump the field
- for( FieldOutline fo : ci.getDeclaredFields() ) {
- String type = printName(fo.getRawType());
- println(type+' '+fo.getPropertyInfo().getName(true)+';');
- }
-
- dumpChildren(cls);
-
- indent--;
- println("}");
- }
-
- /** Get the display name of a type. */
- private String printName( JType t ) {
- String name = t.fullName();
- if(name.startsWith("java.lang."))
- name = name.substring(10); // chop off the package name
- return name;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/AccessorFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/AccessorFactory.java
deleted file mode 100644
index 1ed50934..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/AccessorFactory.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-import javax.xml.bind.JAXBException;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * A means to allow the user to provide customized Accessor
- * to be used by JAXB.
- */
-public interface AccessorFactory {
- /**
- * Access a field of the class.
- *
- * @param bean the class to be processed.
- * @param f the field within the class to be accessed.
- * @param readOnly the isStatic value of the field's modifier.
- * @return Accessor the accessor for this field
- *
- * @throws JAXBException reports failures of the method.
- */
- Accessor createFieldAccessor(Class bean, Field f, boolean readOnly) throws JAXBException;
-
- /**
- * Access a property of the class.
- *
- * @param bean the class to be processed
- * @param getter the getter method to be accessed. The value can be null.
- * @param setter the setter method to be accessed. The value can be null.
- * @return Accessor the accessor for these methods
- *
- * @throws JAXBException reports failures of the method.
- */
- Accessor createPropertyAccessor(Class bean, Method getter, Method setter) throws JAXBException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/AccessorFactoryImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/AccessorFactoryImpl.java
deleted file mode 100644
index d1be782f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/AccessorFactoryImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-import javax.xml.bind.JAXBException;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-public class AccessorFactoryImpl implements InternalAccessorFactory {
-
- private static AccessorFactoryImpl instance = new AccessorFactoryImpl();
- private AccessorFactoryImpl(){}
-
- public static AccessorFactoryImpl getInstance(){
- return instance;
- }
-
- /**
- * Access a field of the class.
- *
- * @param bean the class to be processed.
- * @param field the field within the class to be accessed.
- * @param readOnly the isStatic value of the field's modifier.
- * @return Accessor the accessor for this field
- *
- * @throws JAXBException reports failures of the method.
- */
- public Accessor createFieldAccessor(Class bean, Field field, boolean readOnly) {
- return readOnly
- ? new Accessor.ReadOnlyFieldReflection(field)
- : new Accessor.FieldReflection(field);
- }
-
- /**
- * Access a field of the class.
- *
- * @param bean the class to be processed.
- * @param field the field within the class to be accessed.
- * @param readOnly the isStatic value of the field's modifier.
- * @param supressWarning supress security warning about accessing fields through reflection
- * @return Accessor the accessor for this field
- *
- * @throws JAXBException reports failures of the method.
- */
- public Accessor createFieldAccessor(Class bean, Field field, boolean readOnly, boolean supressWarning) {
- return readOnly
- ? new Accessor.ReadOnlyFieldReflection(field, supressWarning)
- : new Accessor.FieldReflection(field, supressWarning);
- }
-
- /**
- * Access a property of the class.
- *
- * @param bean the class to be processed
- * @param getter the getter method to be accessed. The value can be null.
- * @param setter the setter method to be accessed. The value can be null.
- * @return Accessor the accessor for these methods
- *
- * @throws JAXBException reports failures of the method.
- */
- public Accessor createPropertyAccessor(Class bean, Method getter, Method setter) {
- if (getter == null) {
- return new Accessor.SetterOnlyReflection(setter);
- }
- if (setter == null) {
- return new Accessor.GetterOnlyReflection(getter);
- }
- return new Accessor.GetterSetterReflection(getter, setter);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/AnyTypeAdapter.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/AnyTypeAdapter.java
deleted file mode 100644
index 47349b21..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/AnyTypeAdapter.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-/**
- * {@link XmlAdapter} useful for mapping interfaces.
- *
- * See <a href="https://jaxb.dev.java.net/guide/Mapping_interfaces.html">The JAXB user's guide</a>
- * for more about this adapter class.
- *
- * @author Kohsuke Kawaguchi
- * @since JAXB 2.1
- */
-public final class AnyTypeAdapter extends XmlAdapter<Object,Object> {
- /**
- * Noop. Just returns the object given as the argument.
- */
- public Object unmarshal(Object v) {
- return v;
- }
-
- /**
- * Noop. Just returns the object given as the argument.
- */
- public Object marshal(Object v) {
- return v;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/CycleRecoverable.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/CycleRecoverable.java
deleted file mode 100644
index 3092dc4d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/CycleRecoverable.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind;
-
-import javax.xml.bind.Marshaller;
-
-/**
- * Optional interface that can be implemented by JAXB-bound objects
- * to handle cycles in the object graph.
- *
- * <p>
- * As discussed in <a href="https://jaxb.dev.java.net/guide/Mapping_cyclic_references_to_XML.html">
- * the users' guide</a>, normally a cycle in the object graph causes the marshaller to report an error,
- * and when an error is found, the JAXB RI recovers by cutting the cycle arbitrarily.
- * This is not always a desired behavior.
- *
- * <p>
- * Implementing this interface allows user application to change this behavior.
- * Also see <a href="http://forums.java.net/jive/thread.jspa?threadID=13670">this related discussion</a>.
- *
- * @since JAXB 2.1 EA2
- * @author Kohsuke Kawaguchi
- */
-public interface CycleRecoverable {
- /**
- * Called when a cycle is detected by the JAXB RI marshaller
- * to nominate a new object to be marshalled instead.
- *
- * @param context
- * This object is provided by the JAXB RI to inform
- * the object about the marshalling process that's going on.
- *
- *
- * @return
- * the object to be marshalled instead of <tt>this</tt> object.
- * Or return null to indicate that the JAXB RI should behave
- * just like when your object does not implement {@link CycleRecoverable}
- * (IOW, cut the cycle arbitrarily and try to go on.)
- */
- Object onCycleDetected(Context context);
-
- /**
- * This interface is implemented by the JAXB RI to provide
- * information about the on-going marshalling process.
- *
- * <p>
- * We may add more methods in the future, so please do not
- * implement this interface in your application.
- */
- public interface Context {
- /**
- * Returns the marshaller object that's doing the marshalling.
- *
- * @return
- * always non-null.
- */
- Marshaller getMarshaller();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java
deleted file mode 100644
index 7f58b05f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java
+++ /dev/null
@@ -1,1137 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.GregorianCalendar;
-import java.util.Map;
-import java.util.TimeZone;
-import java.util.WeakHashMap;
-
-import javax.xml.bind.DatatypeConverter;
-import javax.xml.bind.DatatypeConverterInterface;
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * This class is the JAXB RI's default implementation of the
- * {@link DatatypeConverterInterface}.
- *
- * <p>
- * When client applications specify the use of the static print/parse
- * methods in {@link DatatypeConverter}, it will delegate
- * to this class.
- *
- * <p>
- * This class is responsible for whitespace normalization.
- *
- * @author <ul><li>Ryan Shoemaker, Martin Grebac</li></ul>
- * @since JAXB1.0
- * @deprecated in JAXB 2.2.4 - use javax.xml.bind.DatatypeConverterImpl instead
- * or let us know why you can't
- */
-@Deprecated
-public final class DatatypeConverterImpl implements DatatypeConverterInterface {
-
- @Deprecated
- public static final DatatypeConverterInterface theInstance = new DatatypeConverterImpl();
-
- protected DatatypeConverterImpl() {
- // shall not be used
- }
-
- public static BigInteger _parseInteger(CharSequence s) {
- return new BigInteger(removeOptionalPlus(WhiteSpaceProcessor.trim(s)).toString());
- }
-
- public static String _printInteger(BigInteger val) {
- return val.toString();
- }
-
- /**
- * Faster but less robust String->int conversion.
- *
- * Note that:
- * <ol>
- * <li>XML Schema allows '+', but {@link Integer#valueOf(String)} is not.
- * <li>XML Schema allows leading and trailing (but not in-between) whitespaces.
- * {@link Integer#valueOf(String)} doesn't allow any.
- * </ol>
- */
- public static int _parseInt(CharSequence s) {
- int len = s.length();
- int sign = 1;
-
- int r = 0;
-
- for (int i = 0; i < len; i++) {
- char ch = s.charAt(i);
- if (WhiteSpaceProcessor.isWhiteSpace(ch)) {
- // skip whitespace
- } else if ('0' <= ch && ch <= '9') {
- r = r * 10 + (ch - '0');
- } else if (ch == '-') {
- sign = -1;
- } else if (ch == '+') {
- // noop
- } else {
- throw new NumberFormatException("Not a number: " + s);
- }
- }
-
- return r * sign;
- }
-
- public static long _parseLong(CharSequence s) {
- return Long.valueOf(removeOptionalPlus(WhiteSpaceProcessor.trim(s)).toString());
- }
-
- public static short _parseShort(CharSequence s) {
- return (short) _parseInt(s);
- }
-
- public static String _printShort(short val) {
- return String.valueOf(val);
- }
-
- public static BigDecimal _parseDecimal(CharSequence content) {
- content = WhiteSpaceProcessor.trim(content);
-
- if (content.length() <= 0) {
- return null;
- }
-
- return new BigDecimal(content.toString());
-
- // from purely XML Schema perspective,
- // this implementation has a problem, since
- // in xs:decimal "1.0" and "1" is equal whereas the above
- // code will return different values for those two forms.
- //
- // the code was originally using com.sun.msv.datatype.xsd.NumberType.load,
- // but a profiling showed that the process of normalizing "1.0" into "1"
- // could take non-trivial time.
- //
- // also, from the user's point of view, one might be surprised if
- // 1 (not 1.0) is returned from "1.000"
- }
-
- public static float _parseFloat(CharSequence _val) {
- String s = WhiteSpaceProcessor.trim(_val).toString();
- /* Incompatibilities of XML Schema's float "xfloat" and Java's float "jfloat"
-
- * jfloat.valueOf ignores leading and trailing whitespaces,
- whereas this is not allowed in xfloat.
- * jfloat.valueOf allows "float type suffix" (f, F) to be
- appended after float literal (e.g., 1.52e-2f), whereare
- this is not the case of xfloat.
-
- gray zone
- ---------
- * jfloat allows ".523". And there is no clear statement that mentions
- this case in xfloat. Although probably this is allowed.
- *
- */
-
- if (s.equals("NaN")) {
- return Float.NaN;
- }
- if (s.equals("INF")) {
- return Float.POSITIVE_INFINITY;
- }
- if (s.equals("-INF")) {
- return Float.NEGATIVE_INFINITY;
- }
-
- if (s.length() == 0
- || !isDigitOrPeriodOrSign(s.charAt(0))
- || !isDigitOrPeriodOrSign(s.charAt(s.length() - 1))) {
- throw new NumberFormatException();
- }
-
- // these screening process is necessary due to the wobble of Float.valueOf method
- return Float.parseFloat(s);
- }
-
- public static String _printFloat(float v) {
- if (Float.isNaN(v)) {
- return "NaN";
- }
- if (v == Float.POSITIVE_INFINITY) {
- return "INF";
- }
- if (v == Float.NEGATIVE_INFINITY) {
- return "-INF";
- }
- return String.valueOf(v);
- }
-
- public static double _parseDouble(CharSequence _val) {
- String val = WhiteSpaceProcessor.trim(_val).toString();
-
- if (val.equals("NaN")) {
- return Double.NaN;
- }
- if (val.equals("INF")) {
- return Double.POSITIVE_INFINITY;
- }
- if (val.equals("-INF")) {
- return Double.NEGATIVE_INFINITY;
- }
-
- if (val.length() == 0
- || !isDigitOrPeriodOrSign(val.charAt(0))
- || !isDigitOrPeriodOrSign(val.charAt(val.length() - 1))) {
- throw new NumberFormatException(val);
- }
-
-
- // these screening process is necessary due to the wobble of Float.valueOf method
- return Double.parseDouble(val);
- }
-
- public static Boolean _parseBoolean(CharSequence literal) {
- if (literal == null) {
- return null;
- }
-
- int i = 0;
- int len = literal.length();
- char ch;
- boolean value = false;
-
- if (literal.length() <= 0) {
- return null;
- }
-
- do {
- ch = literal.charAt(i++);
- } while (WhiteSpaceProcessor.isWhiteSpace(ch) && i < len);
-
- int strIndex = 0;
-
- switch (ch) {
- case '1':
- value = true;
- break;
- case '0':
- value = false;
- break;
- case 't':
- String strTrue = "rue";
- do {
- ch = literal.charAt(i++);
- } while ((strTrue.charAt(strIndex++) == ch) && i < len && strIndex < 3);
-
- if (strIndex == 3) {
- value = true;
- } else {
- return false;
- }
-// throw new IllegalArgumentException("String \"" + literal + "\" is not valid boolean value.");
-
- break;
- case 'f':
- String strFalse = "alse";
- do {
- ch = literal.charAt(i++);
- } while ((strFalse.charAt(strIndex++) == ch) && i < len && strIndex < 4);
-
-
- if (strIndex == 4) {
- value = false;
- } else {
- return false;
- }
-// throw new IllegalArgumentException("String \"" + literal + "\" is not valid boolean value.");
-
- break;
- }
-
- if (i < len) {
- do {
- ch = literal.charAt(i++);
- } while (WhiteSpaceProcessor.isWhiteSpace(ch) && i < len);
- }
-
- if (i == len) {
- return value;
- } else {
- return null;
- }
-// throw new IllegalArgumentException("String \"" + literal + "\" is not valid boolean value.");
- }
-
- public static String _printBoolean(boolean val) {
- return val ? "true" : "false";
- }
-
- public static byte _parseByte(CharSequence literal) {
- return (byte) _parseInt(literal);
- }
-
- public static String _printByte(byte val) {
- return String.valueOf(val);
- }
-
- /**
- * @return null if fails to convert.
- */
- public static QName _parseQName(CharSequence text, NamespaceContext nsc) {
- int length = text.length();
-
- // trim whitespace
- int start = 0;
- while (start < length && WhiteSpaceProcessor.isWhiteSpace(text.charAt(start))) {
- start++;
- }
-
- int end = length;
- while (end > start && WhiteSpaceProcessor.isWhiteSpace(text.charAt(end - 1))) {
- end--;
- }
-
- if (end == start) {
- throw new IllegalArgumentException("input is empty");
- }
-
-
- String uri;
- String localPart;
- String prefix;
-
- // search ':'
- int idx = start + 1; // no point in searching the first char. that's not valid.
- while (idx < end && text.charAt(idx) != ':') {
- idx++;
- }
-
- if (idx == end) {
- uri = nsc.getNamespaceURI("");
- localPart = text.subSequence(start, end).toString();
- prefix = "";
- } else {
- // Prefix exists, check everything
- prefix = text.subSequence(start, idx).toString();
- localPart = text.subSequence(idx + 1, end).toString();
- uri = nsc.getNamespaceURI(prefix);
- // uri can never be null according to javadoc,
- // but some users reported that there are implementations that return null.
- if (uri == null || uri.length() == 0) // crap. the NamespaceContext interface is broken.
- // error: unbound prefix
- {
- throw new IllegalArgumentException("prefix " + prefix + " is not bound to a namespace");
- }
- }
-
- return new QName(uri, localPart, prefix);
- }
-
- public static GregorianCalendar _parseDateTime(CharSequence s) {
- String val = WhiteSpaceProcessor.trim(s).toString();
- return getDatatypeFactory().newXMLGregorianCalendar(val).toGregorianCalendar();
- }
-
- public static String _printDateTime(Calendar val) {
- return CalendarFormatter.doFormat("%Y-%M-%DT%h:%m:%s%z", val);
- }
-
- public static String _printDate(Calendar val) {
- return CalendarFormatter.doFormat((new StringBuilder("%Y-%M-%D").append("%z")).toString(),val);
- }
-
- public static String _printInt(int val) {
- return String.valueOf(val);
- }
-
- public static String _printLong(long val) {
- return String.valueOf(val);
- }
-
- public static String _printDecimal(BigDecimal val) {
- return val.toPlainString();
- }
-
- public static String _printDouble(double v) {
- if (Double.isNaN(v)) {
- return "NaN";
- }
- if (v == Double.POSITIVE_INFINITY) {
- return "INF";
- }
- if (v == Double.NEGATIVE_INFINITY) {
- return "-INF";
- }
- return String.valueOf(v);
- }
-
- public static String _printQName(QName val, NamespaceContext nsc) {
- // Double-check
- String qname;
- String prefix = nsc.getPrefix(val.getNamespaceURI());
- String localPart = val.getLocalPart();
-
- if (prefix == null || prefix.length() == 0) { // be defensive
- qname = localPart;
- } else {
- qname = prefix + ':' + localPart;
- }
-
- return qname;
- }
-
-// base64 decoder
- private static final byte[] decodeMap = initDecodeMap();
- private static final byte PADDING = 127;
-
- private static byte[] initDecodeMap() {
- byte[] map = new byte[128];
- int i;
- for (i = 0; i < 128; i++) {
- map[i] = -1;
- }
-
- for (i = 'A'; i <= 'Z'; i++) {
- map[i] = (byte) (i - 'A');
- }
- for (i = 'a'; i <= 'z'; i++) {
- map[i] = (byte) (i - 'a' + 26);
- }
- for (i = '0'; i <= '9'; i++) {
- map[i] = (byte) (i - '0' + 52);
- }
- map['+'] = 62;
- map['/'] = 63;
- map['='] = PADDING;
-
- return map;
- }
-
- /**
- * computes the length of binary data speculatively.
- *
- * <p>
- * Our requirement is to create byte[] of the exact length to store the binary data.
- * If we do this in a straight-forward way, it takes two passes over the data.
- * Experiments show that this is a non-trivial overhead (35% or so is spent on
- * the first pass in calculating the length.)
- *
- * <p>
- * So the approach here is that we compute the length speculatively, without looking
- * at the whole contents. The obtained speculative value is never less than the
- * actual length of the binary data, but it may be bigger. So if the speculation
- * goes wrong, we'll pay the cost of reallocation and buffer copying.
- *
- * <p>
- * If the base64 text is tightly packed with no indentation nor illegal char
- * (like what most web services produce), then the speculation of this method
- * will be correct, so we get the performance benefit.
- */
- private static int guessLength(String text) {
- final int len = text.length();
-
- // compute the tail '=' chars
- int j = len - 1;
- for (; j >= 0; j--) {
- byte code = decodeMap[text.charAt(j)];
- if (code == PADDING) {
- continue;
- }
- if (code == -1) // most likely this base64 text is indented. go with the upper bound
- {
- return text.length() / 4 * 3;
- }
- break;
- }
-
- j++; // text.charAt(j) is now at some base64 char, so +1 to make it the size
- int padSize = len - j;
- if (padSize > 2) // something is wrong with base64. be safe and go with the upper bound
- {
- return text.length() / 4 * 3;
- }
-
- // so far this base64 looks like it's unindented tightly packed base64.
- // take a chance and create an array with the expected size
- return text.length() / 4 * 3 - padSize;
- }
-
- /**
- * @param text
- * base64Binary data is likely to be long, and decoding requires
- * each character to be accessed twice (once for counting length, another
- * for decoding.)
- *
- * A benchmark showed that taking {@link String} is faster, presumably
- * because JIT can inline a lot of string access (with data of 1K chars, it was twice as fast)
- */
- public static byte[] _parseBase64Binary(String text) {
- final int buflen = guessLength(text);
- final byte[] out = new byte[buflen];
- int o = 0;
-
- final int len = text.length();
- int i;
-
- final byte[] quadruplet = new byte[4];
- int q = 0;
-
- // convert each quadruplet to three bytes.
- for (i = 0; i < len; i++) {
- char ch = text.charAt(i);
- byte v = decodeMap[ch];
-
- if (v != -1) {
- quadruplet[q++] = v;
- }
-
- if (q == 4) {
- // quadruplet is now filled.
- out[o++] = (byte) ((quadruplet[0] << 2) | (quadruplet[1] >> 4));
- if (quadruplet[2] != PADDING) {
- out[o++] = (byte) ((quadruplet[1] << 4) | (quadruplet[2] >> 2));
- }
- if (quadruplet[3] != PADDING) {
- out[o++] = (byte) ((quadruplet[2] << 6) | (quadruplet[3]));
- }
- q = 0;
- }
- }
-
- if (buflen == o) // speculation worked out to be OK
- {
- return out;
- }
-
- // we overestimated, so need to create a new buffer
- byte[] nb = new byte[o];
- System.arraycopy(out, 0, nb, 0, o);
- return nb;
- }
- private static final char[] encodeMap = initEncodeMap();
-
- private static char[] initEncodeMap() {
- char[] map = new char[64];
- int i;
- for (i = 0; i < 26; i++) {
- map[i] = (char) ('A' + i);
- }
- for (i = 26; i < 52; i++) {
- map[i] = (char) ('a' + (i - 26));
- }
- for (i = 52; i < 62; i++) {
- map[i] = (char) ('0' + (i - 52));
- }
- map[62] = '+';
- map[63] = '/';
-
- return map;
- }
-
- public static char encode(int i) {
- return encodeMap[i & 0x3F];
- }
-
- public static byte encodeByte(int i) {
- return (byte) encodeMap[i & 0x3F];
- }
-
- public static String _printBase64Binary(byte[] input) {
- return _printBase64Binary(input, 0, input.length);
- }
-
- public static String _printBase64Binary(byte[] input, int offset, int len) {
- char[] buf = new char[((len + 2) / 3) * 4];
- int ptr = _printBase64Binary(input, offset, len, buf, 0);
- assert ptr == buf.length;
- return new String(buf);
- }
-
- /**
- * Encodes a byte array into a char array by doing base64 encoding.
- *
- * The caller must supply a big enough buffer.
- *
- * @return
- * the value of {@code ptr+((len+2)/3)*4}, which is the new offset
- * in the output buffer where the further bytes should be placed.
- */
- public static int _printBase64Binary(byte[] input, int offset, int len, char[] buf, int ptr) {
- // encode elements until only 1 or 2 elements are left to encode
- int remaining = len;
- int i;
- for (i = offset;remaining >= 3; remaining -= 3, i += 3) {
- buf[ptr++] = encode(input[i] >> 2);
- buf[ptr++] = encode(
- ((input[i] & 0x3) << 4)
- | ((input[i + 1] >> 4) & 0xF));
- buf[ptr++] = encode(
- ((input[i + 1] & 0xF) << 2)
- | ((input[i + 2] >> 6) & 0x3));
- buf[ptr++] = encode(input[i + 2] & 0x3F);
- }
- // encode when exactly 1 element (left) to encode
- if (remaining == 1) {
- buf[ptr++] = encode(input[i] >> 2);
- buf[ptr++] = encode(((input[i]) & 0x3) << 4);
- buf[ptr++] = '=';
- buf[ptr++] = '=';
- }
- // encode when exactly 2 elements (left) to encode
- if (remaining == 2) {
- buf[ptr++] = encode(input[i] >> 2);
- buf[ptr++] = encode(((input[i] & 0x3) << 4)
- | ((input[i + 1] >> 4) & 0xF));
- buf[ptr++] = encode((input[i + 1] & 0xF) << 2);
- buf[ptr++] = '=';
- }
- return ptr;
- }
-
- public static void _printBase64Binary(byte[] input, int offset, int len, XMLStreamWriter output) throws XMLStreamException {
- int remaining = len;
- int i;
- char[] buf = new char[4];
-
- for (i = offset; remaining >= 3; remaining -= 3, i += 3) {
- buf[0] = encode(input[i] >> 2);
- buf[1] = encode(
- ((input[i] & 0x3) << 4)
- | ((input[i + 1] >> 4) & 0xF));
- buf[2] = encode(
- ((input[i + 1] & 0xF) << 2)
- | ((input[i + 2] >> 6) & 0x3));
- buf[3] = encode(input[i + 2] & 0x3F);
- output.writeCharacters(buf, 0, 4);
- }
- // encode when exactly 1 element (left) to encode
- if (remaining == 1) {
- buf[0] = encode(input[i] >> 2);
- buf[1] = encode(((input[i]) & 0x3) << 4);
- buf[2] = '=';
- buf[3] = '=';
- output.writeCharacters(buf, 0, 4);
- }
- // encode when exactly 2 elements (left) to encode
- if (remaining == 2) {
- buf[0] = encode(input[i] >> 2);
- buf[1] = encode(((input[i] & 0x3) << 4)
- | ((input[i + 1] >> 4) & 0xF));
- buf[2] = encode((input[i + 1] & 0xF) << 2);
- buf[3] = '=';
- output.writeCharacters(buf, 0, 4);
- }
- }
-
- /**
- * Encodes a byte array into another byte array by first doing base64 encoding
- * then encoding the result in ASCII.
- *
- * The caller must supply a big enough buffer.
- *
- * @return
- * the value of {@code ptr+((len+2)/3)*4}, which is the new offset
- * in the output buffer where the further bytes should be placed.
- */
- public static int _printBase64Binary(byte[] input, int offset, int len, byte[] out, int ptr) {
- byte[] buf = out;
- int remaining = len;
- int i;
- for (i=offset; remaining >= 3; remaining -= 3, i += 3 ) {
- buf[ptr++] = encodeByte(input[i]>>2);
- buf[ptr++] = encodeByte(
- ((input[i]&0x3)<<4) |
- ((input[i+1]>>4)&0xF));
- buf[ptr++] = encodeByte(
- ((input[i+1]&0xF)<<2)|
- ((input[i+2]>>6)&0x3));
- buf[ptr++] = encodeByte(input[i+2]&0x3F);
- }
- // encode when exactly 1 element (left) to encode
- if (remaining == 1) {
- buf[ptr++] = encodeByte(input[i]>>2);
- buf[ptr++] = encodeByte(((input[i])&0x3)<<4);
- buf[ptr++] = '=';
- buf[ptr++] = '=';
- }
- // encode when exactly 2 elements (left) to encode
- if (remaining == 2) {
- buf[ptr++] = encodeByte(input[i]>>2);
- buf[ptr++] = encodeByte(
- ((input[i]&0x3)<<4) |
- ((input[i+1]>>4)&0xF));
- buf[ptr++] = encodeByte((input[i+1]&0xF)<<2);
- buf[ptr++] = '=';
- }
-
- return ptr;
- }
-
- private static CharSequence removeOptionalPlus(CharSequence s) {
- int len = s.length();
-
- if (len <= 1 || s.charAt(0) != '+') {
- return s;
- }
-
- s = s.subSequence(1, len);
- char ch = s.charAt(0);
- if ('0' <= ch && ch <= '9') {
- return s;
- }
- if ('.' == ch) {
- return s;
- }
-
- throw new NumberFormatException();
- }
-
- private static boolean isDigitOrPeriodOrSign(char ch) {
- if ('0' <= ch && ch <= '9') {
- return true;
- }
- if (ch == '+' || ch == '-' || ch == '.') {
- return true;
- }
- return false;
- }
-
- private static final Map<ClassLoader, DatatypeFactory> DF_CACHE = Collections.synchronizedMap(new WeakHashMap<ClassLoader, DatatypeFactory>());
-
- public static DatatypeFactory getDatatypeFactory() {
- ClassLoader tccl = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- DatatypeFactory df = DF_CACHE.get(tccl);
- if (df == null) {
- synchronized (DatatypeConverterImpl.class) {
- df = DF_CACHE.get(tccl);
- if (df == null) { // to prevent multiple initialization
- try {
- df = DatatypeFactory.newInstance();
- } catch (DatatypeConfigurationException e) {
- throw new Error(Messages.FAILED_TO_INITIALE_DATATYPE_FACTORY.format(),e);
- }
- DF_CACHE.put(tccl, df);
- }
- }
- }
- return df;
- }
-
- private static final class CalendarFormatter {
-
- public static String doFormat(String format, Calendar cal) throws IllegalArgumentException {
- int fidx = 0;
- int flen = format.length();
- StringBuilder buf = new StringBuilder();
-
- while (fidx < flen) {
- char fch = format.charAt(fidx++);
-
- if (fch != '%') { // not a meta character
- buf.append(fch);
- continue;
- }
-
- // seen meta character. we don't do error check against the format
- switch (format.charAt(fidx++)) {
- case 'Y': // year
- formatYear(cal, buf);
- break;
-
- case 'M': // month
- formatMonth(cal, buf);
- break;
-
- case 'D': // days
- formatDays(cal, buf);
- break;
-
- case 'h': // hours
- formatHours(cal, buf);
- break;
-
- case 'm': // minutes
- formatMinutes(cal, buf);
- break;
-
- case 's': // parse seconds.
- formatSeconds(cal, buf);
- break;
-
- case 'z': // time zone
- formatTimeZone(cal, buf);
- break;
-
- default:
- // illegal meta character. impossible.
- throw new InternalError();
- }
- }
-
- return buf.toString();
- }
-
- private static void formatYear(Calendar cal, StringBuilder buf) {
- int year = cal.get(Calendar.YEAR);
-
- String s;
- if (year <= 0) // negative value
- {
- s = Integer.toString(1 - year);
- } else // positive value
- {
- s = Integer.toString(year);
- }
-
- while (s.length() < 4) {
- s = '0' + s;
- }
- if (year <= 0) {
- s = '-' + s;
- }
-
- buf.append(s);
- }
-
- private static void formatMonth(Calendar cal, StringBuilder buf) {
- formatTwoDigits(cal.get(Calendar.MONTH) + 1, buf);
- }
-
- private static void formatDays(Calendar cal, StringBuilder buf) {
- formatTwoDigits(cal.get(Calendar.DAY_OF_MONTH), buf);
- }
-
- private static void formatHours(Calendar cal, StringBuilder buf) {
- formatTwoDigits(cal.get(Calendar.HOUR_OF_DAY), buf);
- }
-
- private static void formatMinutes(Calendar cal, StringBuilder buf) {
- formatTwoDigits(cal.get(Calendar.MINUTE), buf);
- }
-
- private static void formatSeconds(Calendar cal, StringBuilder buf) {
- formatTwoDigits(cal.get(Calendar.SECOND), buf);
- if (cal.isSet(Calendar.MILLISECOND)) { // milliseconds
- int n = cal.get(Calendar.MILLISECOND);
- if (n != 0) {
- String ms = Integer.toString(n);
- while (ms.length() < 3) {
- ms = '0' + ms; // left 0 paddings.
- }
- buf.append('.');
- buf.append(ms);
- }
- }
- }
-
- /** formats time zone specifier. */
- private static void formatTimeZone(Calendar cal, StringBuilder buf) {
- TimeZone tz = cal.getTimeZone();
-
- if (tz == null) {
- return;
- }
-
- // otherwise print out normally.
- int offset = tz.getOffset(cal.getTime().getTime());
-
- if (offset == 0) {
- buf.append('Z');
- return;
- }
-
- if (offset >= 0) {
- buf.append('+');
- } else {
- buf.append('-');
- offset *= -1;
- }
-
- offset /= 60 * 1000; // offset is in milli-seconds
-
- formatTwoDigits(offset / 60, buf);
- buf.append(':');
- formatTwoDigits(offset % 60, buf);
- }
-
- /** formats Integer into two-character-wide string. */
- private static void formatTwoDigits(int n, StringBuilder buf) {
- // n is always non-negative.
- if (n < 10) {
- buf.append('0');
- }
- buf.append(n);
- }
- }
-
- // DEPRECATED METHODS, KEPT FOR JAXB1 GENERATED CLASSES COMPATIBILITY, WILL BE REMOVED IN FUTURE
-
- @Deprecated
- public String parseString(String lexicalXSDString) {
- return lexicalXSDString;
- }
-
- @Deprecated
- public BigInteger parseInteger(String lexicalXSDInteger) {
- return _parseInteger(lexicalXSDInteger);
- }
-
- @Deprecated
- public String printInteger(BigInteger val) {
- return _printInteger(val);
- }
-
- @Deprecated
- public int parseInt(String s) {
- return _parseInt(s);
- }
-
- @Deprecated
- public long parseLong(String lexicalXSLong) {
- return _parseLong(lexicalXSLong);
- }
-
- @Deprecated
- public short parseShort(String lexicalXSDShort) {
- return _parseShort(lexicalXSDShort);
- }
-
- @Deprecated
- public String printShort(short val) {
- return _printShort(val);
- }
-
- @Deprecated
- public BigDecimal parseDecimal(String content) {
- return _parseDecimal(content);
- }
-
- @Deprecated
- public float parseFloat(String lexicalXSDFloat) {
- return _parseFloat(lexicalXSDFloat);
- }
-
- @Deprecated
- public String printFloat(float v) {
- return _printFloat(v);
- }
-
- @Deprecated
- public double parseDouble(String lexicalXSDDouble) {
- return _parseDouble(lexicalXSDDouble);
- }
-
- @Deprecated
- public boolean parseBoolean(String lexicalXSDBoolean) {
- Boolean b = _parseBoolean(lexicalXSDBoolean);
- return (b == null) ? false : b.booleanValue();
- }
-
- @Deprecated
- public String printBoolean(boolean val) {
- return val ? "true" : "false";
- }
-
- @Deprecated
- public byte parseByte(String lexicalXSDByte) {
- return _parseByte(lexicalXSDByte);
- }
-
- @Deprecated
- public String printByte(byte val) {
- return _printByte(val);
- }
-
- @Deprecated
- public QName parseQName(String lexicalXSDQName, NamespaceContext nsc) {
- return _parseQName(lexicalXSDQName, nsc);
- }
-
- @Deprecated
- public Calendar parseDateTime(String lexicalXSDDateTime) {
- return _parseDateTime(lexicalXSDDateTime);
- }
-
- @Deprecated
- public String printDateTime(Calendar val) {
- return _printDateTime(val);
- }
-
- @Deprecated
- public byte[] parseBase64Binary(String lexicalXSDBase64Binary) {
- return _parseBase64Binary(lexicalXSDBase64Binary);
- }
-
- @Deprecated
- public byte[] parseHexBinary(String s) {
- final int len = s.length();
-
- // "111" is not a valid hex encoding.
- if (len % 2 != 0) {
- throw new IllegalArgumentException("hexBinary needs to be even-length: " + s);
- }
-
- byte[] out = new byte[len / 2];
-
- for (int i = 0; i < len; i += 2) {
- int h = hexToBin(s.charAt(i));
- int l = hexToBin(s.charAt(i + 1));
- if (h == -1 || l == -1) {
- throw new IllegalArgumentException("contains illegal character for hexBinary: " + s);
- }
-
- out[i / 2] = (byte) (h * 16 + l);
- }
-
- return out;
- }
-
- @Deprecated
- private static int hexToBin(char ch) {
- if ('0' <= ch && ch <= '9') {
- return ch - '0';
- }
- if ('A' <= ch && ch <= 'F') {
- return ch - 'A' + 10;
- }
- if ('a' <= ch && ch <= 'f') {
- return ch - 'a' + 10;
- }
- return -1;
- }
-
- @Deprecated
- private static final char[] hexCode = "0123456789ABCDEF".toCharArray();
-
- @Deprecated
- public String printHexBinary(byte[] data) {
- StringBuilder r = new StringBuilder(data.length * 2);
- for (byte b : data) {
- r.append(hexCode[(b >> 4) & 0xF]);
- r.append(hexCode[(b & 0xF)]);
- }
- return r.toString();
- }
-
- @Deprecated
- public long parseUnsignedInt(String lexicalXSDUnsignedInt) {
- return _parseLong(lexicalXSDUnsignedInt);
- }
-
- @Deprecated
- public String printUnsignedInt(long val) {
- return _printLong(val);
- }
-
- @Deprecated
- public int parseUnsignedShort(String lexicalXSDUnsignedShort) {
- return _parseInt(lexicalXSDUnsignedShort);
- }
-
- @Deprecated
- public Calendar parseTime(String lexicalXSDTime) {
- return getDatatypeFactory().newXMLGregorianCalendar(lexicalXSDTime).toGregorianCalendar();
- }
-
- @Deprecated
- public String printTime(Calendar val) {
- return CalendarFormatter.doFormat("%h:%m:%s%z", val);
- }
-
- @Deprecated
- public Calendar parseDate(String lexicalXSDDate) {
- return getDatatypeFactory().newXMLGregorianCalendar(lexicalXSDDate).toGregorianCalendar();
- }
-
- @Deprecated
- public String printDate(Calendar val) {
- return _printDate(val);
- }
-
- @Deprecated
- public String parseAnySimpleType(String lexicalXSDAnySimpleType) {
- return lexicalXSDAnySimpleType;
- }
-
- @Deprecated
- public String printString(String val) {
- return val;
- }
-
- @Deprecated
- public String printInt(int val) {
- return _printInt(val);
- }
-
- @Deprecated
- public String printLong(long val) {
- return _printLong(val);
- }
-
- @Deprecated
- public String printDecimal(BigDecimal val) {
- return _printDecimal(val);
- }
-
- @Deprecated
- public String printDouble(double v) {
- return _printDouble(v);
- }
-
- @Deprecated
- public String printQName(QName val, NamespaceContext nsc) {
- return _printQName(val, nsc);
- }
-
- @Deprecated
- public String printBase64Binary(byte[] val) {
- return _printBase64Binary(val);
- }
-
- @Deprecated
- public String printUnsignedShort(int val) {
- return String.valueOf(val);
- }
-
- @Deprecated
- public String printAnySimpleType(String val) {
- return val;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/IDResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/IDResolver.java
deleted file mode 100644
index a20c91f8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/IDResolver.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind;
-
-import java.util.concurrent.Callable;
-
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.annotation.XmlIDREF;
-
-import org.xml.sax.SAXException;
-
-/**
- * Pluggable ID/IDREF handling layer.
- *
- * <p>
- * <b>THIS INTERFACE IS SUBJECT TO CHANGE WITHOUT NOTICE.</b>
- *
- * <p>
- * This 'interface' can be implemented by applications and specified to
- * {@link Unmarshaller#setProperty(String, Object)} to ovierride the ID/IDREF
- * processing of the JAXB RI like this:
- *
- * <pre>
- * unmarshaller.setProperty(IDResolver.class.getName(),new MyIDResolverImpl());
- * </pre>
- *
- * <h2>Error Handling</h2>
- * <p>
- * This component runs inside the JAXB RI unmarshaller. Therefore, it needs
- * to coordinate with the JAXB RI unmarshaller when it comes to reporting
- * errors. This makes sure that applications see consistent error handling behaviors.
- *
- * <p>
- * When the {@link #startDocument(ValidationEventHandler)} method is invoked,
- * the unmarshaller passes in a {@link ValidationEventHandler} that can be used
- * by this component to report any errors encountered during the ID/IDREF processing.
- *
- * <p>
- * When an error is detected, the error should be first reported to this
- * {@link ValidationEventHandler}. If the error is fatal or the event handler
- * decided to abort, the implementation should throw a {@link SAXException}.
- * This signals the unmarshaller to abort the processing.
- *
- * @author Kohsuke Kawaguchi
- * @since JAXB 2.0 beta
- */
-public abstract class IDResolver {
-
- /**
- * Called when the unmarshalling starts.
- *
- * <p>
- * Since one {@link Unmarshaller} may be used multiple times
- * to unmarshal documents, one {@link IDResolver} may be used multiple times, too.
- *
- * @param eventHandler
- * Any errors found during the unmarshalling should be reported to this object.
- */
- public void startDocument(ValidationEventHandler eventHandler) throws SAXException {
-
- }
-
- /**
- * Called after the unmarshalling completes.
- *
- * <p>
- * This is a good opporunity to reset any internal state of this object,
- * so that it doesn't keep references to other objects unnecessarily.
- */
- public void endDocument() throws SAXException {
-
- }
-
- /**
- * Binds the given object to the specified ID.
- *
- * <p>
- * While a document is being unmarshalled, every time
- * an ID value is found, this method is invoked to
- * remember the association between ID and objects.
- * This association is supposed to be used later to resolve
- * IDREFs.
- *
- * <p>
- * This method is invoked right away as soon as a new ID value is found.
- *
- * @param id
- * The ID value found in the document being unmarshalled.
- * Always non-null.
- * @param obj
- * The object being unmarshalled which is going to own the ID.
- * Always non-null.
- */
- public abstract void bind( String id, Object obj ) throws SAXException;
-
- /**
- * Obtains the object to be pointed by the IDREF value.
- *
- * <p>
- * While a document is being unmarshalled, every time
- * an IDREF value is found, this method is invoked immediately to
- * obtain the object that the IDREF is pointing to.
- *
- * <p>
- * This method returns a {@link Callable} to support forward-references.
- * When this method returns with a non-null return value,
- * the JAXB RI unmarshaller invokes the {@link Callable#call()} method immediately.
- * If the implementation can find the target object (in which case
- * it was a backward reference), then a non-null object shall be returned,
- * and it is used as the target object.
- *
- * <p>
- * When a forward-reference happens, the <tt>call</tt> method
- * should return null. In this case the JAXB RI unmarshaller invokes
- * the <tt>call</tt> method again after all the documents are fully unmarshalled.
- * If the <tt>call</tt> method still returns null, then the JAXB RI unmarshaller
- * treats it as an error.
- *
- * <p>
- * A {@link Callable} object returned from this method may not throw
- * any exception other than a {@link SAXException} (which means a fatal error.)
- *
- * @param id
- * The IDREF value found in the document being unmarshalled.
- * Always non-null.
- * @param targetType
- * The expected type to which ID resolves to. JAXB infers this
- * information from the signature of the fields that has {@link XmlIDREF}.
- * When a property is a collection, this parameter will be the type
- * of the individual item in the collection.
- * @return
- * null if the implementation is sure that the parameter combination
- * will never yield a valid object. Otherwise non-null.
- */
- public abstract Callable<?> resolve( String id, Class targetType ) throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/InternalAccessorFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/InternalAccessorFactory.java
deleted file mode 100644
index 79726d99..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/InternalAccessorFactory.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind;
-
-import java.lang.reflect.Field;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import javax.xml.bind.JAXBException;
-
-/**
- * A means to allow the user to provide customized Accessor
- * to be used by JAXB. Adds ability to suppress warnings.
- */
-public interface InternalAccessorFactory extends AccessorFactory {
- /**
- * Access a field of the class.
- *
- * @param bean the class to be processed.
- * @param f the field within the class to be accessed.
- * @param readOnly the isStatic value of the field's modifier.
- * @param supressWarnings suppress reflection warnings
- * @return Accessor the accessor for this field
- *
- * @throws JAXBException reports failures of the method.
- */
- Accessor createFieldAccessor(Class bean, Field f, boolean readOnly, boolean supressWarnings) throws JAXBException;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/Locatable.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/Locatable.java
deleted file mode 100644
index f9f80e61..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/Locatable.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind;
-
-import com.sun.xml.internal.bind.annotation.XmlLocation;
-
-import org.xml.sax.Locator;
-
-/**
- * Optional interface implemented by JAXB objects to expose
- * location information from which an object is unmarshalled.
- *
- * <p>
- * This is used during JAXB RI 1.0.x.
- * In JAXB 2.0, use {@link XmlLocation}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- *
- * @since JAXB RI 1.0
- */
-public interface Locatable {
- /**
- * @return
- * null if the location information is unavaiable,
- * or otherwise return a immutable valid {@link Locator}
- * object.
- */
- Locator sourceLocation();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.java
deleted file mode 100644
index f424fb71..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Message resources
- */
-enum Messages {
- FAILED_TO_INITIALE_DATATYPE_FACTORY, // 0 args
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
-
- @Override
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.properties
deleted file mode 100644
index 1da585a5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/Messages.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-FAILED_TO_INITIALE_DATATYPE_FACTORY = \
- Failed to initialize JAXP 1.3 DatatypeFactory class.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/Util.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/Util.java
deleted file mode 100644
index c6a077eb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/Util.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind;
-
-import java.util.logging.Logger;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public final class Util {
- private Util() {} // no instanciation
-
- /**
- * Gets the logger for the caller's class.
- *
- * @since 2.0
- */
- public static Logger getClassLogger() {
- try {
- StackTraceElement[] trace = new Exception().getStackTrace();
- return Logger.getLogger(trace[1].getClassName());
- } catch( SecurityException e) {
- return Logger.getLogger("com.sun.xml.internal.bind"); // use the default
- }
- }
-
- /**
- * Reads the system property value and takes care of {@link SecurityException}.
- */
- public static String getSystemProperty(String name) {
- try {
- return System.getProperty(name);
- } catch( SecurityException e ) {
- return null;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/ValidationEventLocatorEx.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/ValidationEventLocatorEx.java
deleted file mode 100644
index a9a0d680..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/ValidationEventLocatorEx.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind;
-
-import javax.xml.bind.ValidationEventLocator;
-
-/**
- * Defines additional accessor methods for the event source location.
- * <p>
- * This interface exposes the location information only available
- * in the JAXB RI specific extension.
- * <p>
- * <em>DO NOT IMPLEMENT THIS INTERFACE BY YOUR CODE</em> because
- * we might add more methods on this interface in the future release
- * of the RI.
- *
- * <h2>Usage</h2>
- * <p>
- * If you obtain a reference to {@link javax.xml.bind.ValidationEventLocator},
- * check if you can cast it to {@link ValidationEventLocatorEx} first, like this:
- * <pre>
- * void foo( ValidationEvent e ) {
- * ValidationEventLocator loc = e.getLocator();
- * if( loc instanceof ValidationEventLocatorEx ) {
- * String fieldName = ((ValidationEventLocatorEx)loc).getFieldName();
- * if( fieldName!=null ) {
- * // do something with location.
- * }
- * }
- * }
- * </pre>
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface ValidationEventLocatorEx extends ValidationEventLocator {
- /**
- * Returns the field name of the object where the error occured.
- * <p>
- * This method always returns null when you are doing
- * a validation during unmarshalling.
- *
- * When not null, the field name indicates the field of the object
- * designated by the {@link #getObject()} method where the error
- * occured.
- */
- String getFieldName();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/WhiteSpaceProcessor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/WhiteSpaceProcessor.java
deleted file mode 100644
index 551bee91..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/WhiteSpaceProcessor.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind;
-
-/**
- * Processes white space normalization.
- *
- * @since 1.0
- */
-public abstract class WhiteSpaceProcessor {
-
-// benchmarking (see test/src/ReplaceTest.java in the CVS Attic)
-// showed that this code is slower than the current code.
-//
-// public static String replace(String text) {
-// final int len = text.length();
-// StringBuffer result = new StringBuffer(len);
-//
-// for (int i = 0; i < len; i++) {
-// char ch = text.charAt(i);
-// if (isWhiteSpace(ch))
-// result.append(' ');
-// else
-// result.append(ch);
-// }
-//
-// return result.toString();
-// }
-
- public static String replace(String text) {
- return replace( (CharSequence)text ).toString();
- }
-
- /**
- * @since 2.0
- */
- public static CharSequence replace(CharSequence text) {
- int i=text.length()-1;
-
- // look for the first whitespace char.
- while( i>=0 && !isWhiteSpaceExceptSpace(text.charAt(i)) )
- i--;
-
- if( i<0 )
- // no such whitespace. replace(text)==text.
- return text;
-
- // we now know that we need to modify the text.
- // allocate a char array to do it.
- StringBuilder buf = new StringBuilder(text);
-
- buf.setCharAt(i--,' ');
- for( ; i>=0; i-- )
- if( isWhiteSpaceExceptSpace(buf.charAt(i)))
- buf.setCharAt(i,' ');
-
- return new String(buf);
- }
-
- /**
- * Equivalent of {@link String#trim()}.
- * @since 2.0
- */
- public static CharSequence trim(CharSequence text) {
- int len = text.length();
- int start = 0;
-
- while( start<len && isWhiteSpace(text.charAt(start)) )
- start++;
-
- int end = len-1;
-
- while( end>start && isWhiteSpace(text.charAt(end)) )
- end--;
-
- if(start==0 && end==len-1)
- return text; // no change
- else
- return text.subSequence(start,end+1);
- }
-
- public static String collapse(String text) {
- return collapse( (CharSequence)text ).toString();
- }
-
- /**
- * This is usually the biggest processing bottleneck.
- *
- * @since 2.0
- */
- public static CharSequence collapse(CharSequence text) {
- int len = text.length();
-
- // most of the texts are already in the collapsed form.
- // so look for the first whitespace in the hope that we will
- // never see it.
- int s=0;
- while(s<len) {
- if(isWhiteSpace(text.charAt(s)))
- break;
- s++;
- }
- if(s==len)
- // the input happens to be already collapsed.
- return text;
-
- // we now know that the input contains spaces.
- // let's sit down and do the collapsing normally.
-
- StringBuilder result = new StringBuilder(len /*allocate enough size to avoid re-allocation*/ );
-
- if(s!=0) {
- for( int i=0; i<s; i++ )
- result.append(text.charAt(i));
- result.append(' ');
- }
-
- boolean inStripMode = true;
- for (int i = s+1; i < len; i++) {
- char ch = text.charAt(i);
- boolean b = isWhiteSpace(ch);
- if (inStripMode && b)
- continue; // skip this character
-
- inStripMode = b;
- if (inStripMode)
- result.append(' ');
- else
- result.append(ch);
- }
-
- // remove trailing whitespaces
- len = result.length();
- if (len > 0 && result.charAt(len - 1) == ' ')
- result.setLength(len - 1);
- // whitespaces are already collapsed,
- // so all we have to do is to remove the last one character
- // if it's a whitespace.
-
- return result;
- }
-
- /**
- * Returns true if the specified string is all whitespace.
- */
- public static boolean isWhiteSpace(CharSequence s) {
- for( int i=s.length()-1; i>=0; i-- )
- if(!isWhiteSpace(s.charAt(i)))
- return false;
- return true;
- }
-
- /** returns true if the specified char is a white space character. */
- public static boolean isWhiteSpace(char ch) {
- // most of the characters are non-control characters.
- // so check that first to quickly return false for most of the cases.
- if( ch>0x20 ) return false;
-
- // other than we have to do four comparisons.
- return ch == 0x9 || ch == 0xA || ch == 0xD || ch == 0x20;
- }
-
- /**
- * Returns true if the specified char is a white space character
- * but not 0x20.
- */
- protected static boolean isWhiteSpaceExceptSpace(char ch) {
- // most of the characters are non-control characters.
- // so check that first to quickly return false for most of the cases.
- if( ch>=0x20 ) return false;
-
- // other than we have to do four comparisons.
- return ch == 0x9 || ch == 0xA || ch == 0xD;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/XmlAccessorFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/XmlAccessorFactory.java
deleted file mode 100644
index 940f346f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/XmlAccessorFactory.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind;
-
-import static java.lang.annotation.ElementType.PACKAGE;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Identifies a user provided customized Accessor
- * to be used.
- */
-
-@Retention(RUNTIME)
-@Target({TYPE,PACKAGE})
-public @interface XmlAccessorFactory {
- Class<? extends AccessorFactory> value();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/annotation/OverrideAnnotationOf.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/annotation/OverrideAnnotationOf.java
deleted file mode 100644
index f5e494ff..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/annotation/OverrideAnnotationOf.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * Designates an annotation from base class which shall be overriden by annotation placed together with this.
- *
- * @author Martin Grebac
- */
-@Retention(RUNTIME)
-@Target({FIELD})
-public @interface OverrideAnnotationOf {
- String value() default "content";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/annotation/XmlIsSet.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/annotation/XmlIsSet.java
deleted file mode 100644
index c2e9f6f4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/annotation/XmlIsSet.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlValue;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * Designates a boolean field/property as a flag to indicate
- * whether another property is present or not.
- *
- * <p>
- * Sometimes you'd want to map a Java primitive type to an
- * optional element/attribute. Doing this makes it impossible
- * to represent the absence of the property, thus you always
- * end up producing the value when you marshal to XML.
- *
- * For example,
- * <pre>
- * {@link XmlElement}
- * class Foo {
- * {@link XmlElement}
- * int x;
- * }
- *
- * marshaller.marshal(new Foo());
- * </pre>
- * and you get:
- * <pre><xmp>
- * <foo><x>0</x></foo>
- * </xmp></pre>
- *
- * <p>
- * By creating a side boolean field/property that has this annotation,
- * you can indicate the absence of the property by setting this boolean
- * to false.
- * <pre>
- * {@link XmlElement}
- * class Foo {
- * {@link XmlElement}
- * int x;
- * {@link XmlIsSet}("x")
- * boolean xIsPresent;
- * }
- *
- * Foo f = new Foo();
- * f.x = 5;
- * f.xIsPresent = false;
- *
- * marshaller.marshal(f);
- *
- * <xmp>
- * <foo/>
- * </xmp>
- *
- * f.xIsPresent = true;
- * <xmp>
- * <foo><x>5</x></foo>
- * </xmp>
- * </pre>
- *
- * <p>
- * A property/field annotated with {@link XmlIsSet} itself will not show up in XML.
- * It is an error to use this annotation on the same property/field
- * as {@link XmlElement}, {@link XmlAttribute}, {@link XmlValue}, or {@link XmlElementRef},
- * ...<b>TBD</b>.
- *
- * @deprecated
- * this hasn't been implemented in the RI, and this hasn't been speced yet.
- * I believe Joe asked for this feature. I'd like to drop this.
- *
- * @author Kohsuke Kawaguchi
- */
-@Retention(RUNTIME)
-@Target({FIELD,METHOD})
-public @interface XmlIsSet {
- /**
- * Specifies the name of the property to attach to.
- */
- String value();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/annotation/XmlLocation.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/annotation/XmlLocation.java
deleted file mode 100644
index 4276b404..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/annotation/XmlLocation.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import org.xml.sax.Locator;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-
-/**
- * Marks a property that receives a location from which the object is unmarshalled.
- *
- * <h2>Usage</h2>
- * <p>
- * The @XmlLocation can be specified on:
- * <ul>
- * <li>a field whose type is {@link Locator}, or
- * <li>a method that takes a {@link Locator} as the sole parameter
- * </ul>
- *
- * <p>
- * When a class that contains such a field/method is unmarshalled by the JAXB RI,
- * such a field/method will receive an immutable {@link Locator} object that describes
- * the location in the XML document where the object is unmarshalled from.
- *
- * <p>
- * If the unmarshaller does not know the source location information, the locator
- * will not be set. For example, this happens when it is unmarshalling from a DOM tree.
- * This also happens if you use JAXB implementations other than the JAXB RI.
- *
- * <p>
- * This information can be used by applications, for example to provide user-friendly
- * error information.
- *
- *
- * @author Kohsuke Kawaguchi
- * @since JAXB RI 2.0 EA
- */
-@Retention(RUNTIME) @Target({FIELD,METHOD})
-public @interface XmlLocation {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/AccessorException.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/AccessorException.java
deleted file mode 100644
index b49f9ae2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/AccessorException.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.api;
-
-
-/**
- * Signals an error in {@link RawAccessor}.
- *
- * <p>
- * This error is not reported to the user handler. Once reported
- * the error should be wrapped into another exception.
- *
- * <p>
- * This exception happens primarily when JAXB accesses the getter/setter
- * method and it throws a checked exception.
- *
- * <p>
- * <b>Subject to change without notice</b>.
- *
- * @author Kohsuke Kawaguchi
- *
- * @since 2.0 EA1
- */
-public final class AccessorException extends Exception {
- public AccessorException() {
- }
-
- public AccessorException(String message) {
- super(message);
- }
-
- public AccessorException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public AccessorException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Bridge.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Bridge.java
deleted file mode 100644
index f7a19fa9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Bridge.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.api;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.bind.v2.runtime.BridgeContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-
-/**
- * Mini-marshaller/unmarshaller that is specialized for a particular
- * element name and a type.
- *
- * <p>
- * Instances of this class is stateless and multi-thread safe.
- * They are reentrant.
- *
- * <p>
- * All the marshal operation generates fragments.
- *
- * <p>
- * <b>Subject to change without notice</b>.
- *
- * @since JAXB 2.0 EA1
- * @author Kohsuke Kawaguchi
- */
-public abstract class Bridge<T> {
- protected Bridge(JAXBContextImpl context) {
- this.context = context;
- }
-
- protected final JAXBContextImpl context;
-
- /**
- * Gets the {@link JAXBRIContext} to which this object belongs.
- *
- * @since 2.1
- */
- public @NotNull JAXBRIContext getContext() {
- return context;
- }
-
- /**
- *
- * @throws JAXBException
- * if there was an error while marshalling.
- *
- * @since 2.0 EA1
- */
- public final void marshal(T object,XMLStreamWriter output) throws JAXBException {
- marshal(object,output,null);
- }
- public final void marshal(T object,XMLStreamWriter output, AttachmentMarshaller am) throws JAXBException {
- Marshaller m = context.marshallerPool.take();
- m.setAttachmentMarshaller(am);
- marshal(m,object,output);
- m.setAttachmentMarshaller(null);
- context.marshallerPool.recycle(m);
- }
-
- public final void marshal(@NotNull BridgeContext context,T object,XMLStreamWriter output) throws JAXBException {
- marshal( ((BridgeContextImpl)context).marshaller, object, output );
- }
-
- public abstract void marshal(@NotNull Marshaller m,T object,XMLStreamWriter output) throws JAXBException;
-
-
- /**
- * Marshals the specified type object with the implicit element name
- * associated with this instance of {@link Bridge}.
- *
- * @param nsContext
- * if this marshalling is done to marshal a subelement, this {@link NamespaceContext}
- * represents in-scope namespace bindings available for that element. Can be null,
- * in which case JAXB assumes no in-scope namespaces.
- * @throws JAXBException
- * if there was an error while marshalling.
- *
- * @since 2.0 EA1
- */
- public void marshal(T object,OutputStream output, NamespaceContext nsContext) throws JAXBException {
- marshal(object,output,nsContext,null);
- }
- /**
- * @since 2.0.2
- */
- public void marshal(T object,OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException {
- Marshaller m = context.marshallerPool.take();
- m.setAttachmentMarshaller(am);
- marshal(m,object,output,nsContext);
- m.setAttachmentMarshaller(null);
- context.marshallerPool.recycle(m);
- }
-
- public final void marshal(@NotNull BridgeContext context,T object,OutputStream output, NamespaceContext nsContext) throws JAXBException {
- marshal( ((BridgeContextImpl)context).marshaller, object, output, nsContext );
- }
-
- public abstract void marshal(@NotNull Marshaller m,T object,OutputStream output, NamespaceContext nsContext) throws JAXBException;
-
-
- public final void marshal(T object,Node output) throws JAXBException {
- Marshaller m = context.marshallerPool.take();
- marshal(m,object,output);
- context.marshallerPool.recycle(m);
- }
-
- public final void marshal(@NotNull BridgeContext context,T object,Node output) throws JAXBException {
- marshal( ((BridgeContextImpl)context).marshaller, object, output );
- }
-
- public abstract void marshal(@NotNull Marshaller m,T object,Node output) throws JAXBException;
-
-
- /**
- * @since 2.0 EA4
- */
- public final void marshal(T object, ContentHandler contentHandler) throws JAXBException {
- marshal(object,contentHandler,null);
- }
- /**
- * @since 2.0.2
- */
- public final void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException {
- Marshaller m = context.marshallerPool.take();
- m.setAttachmentMarshaller(am);
- marshal(m,object,contentHandler);
- m.setAttachmentMarshaller(null);
- context.marshallerPool.recycle(m);
- }
- public final void marshal(@NotNull BridgeContext context,T object, ContentHandler contentHandler) throws JAXBException {
- marshal( ((BridgeContextImpl)context).marshaller, object, contentHandler );
- }
- public abstract void marshal(@NotNull Marshaller m,T object, ContentHandler contentHandler) throws JAXBException;
-
- /**
- * @since 2.0 EA4
- */
- public final void marshal(T object, Result result) throws JAXBException {
- Marshaller m = context.marshallerPool.take();
- marshal(m,object,result);
- context.marshallerPool.recycle(m);
- }
- public final void marshal(@NotNull BridgeContext context,T object, Result result) throws JAXBException {
- marshal( ((BridgeContextImpl)context).marshaller, object, result );
- }
- public abstract void marshal(@NotNull Marshaller m,T object, Result result) throws JAXBException;
-
-
-
- private T exit(T r, Unmarshaller u) {
- u.setAttachmentUnmarshaller(null);
- context.unmarshallerPool.recycle(u);
- return r;
- }
-
- /**
- * Unmarshals the specified type object.
- *
- * @param in
- * the parser must be pointing at a start tag
- * that encloses the XML type that this {@link Bridge} is
- * instanciated for.
- *
- * @return
- * never null.
- *
- * @throws JAXBException
- * if there was an error while unmarshalling.
- *
- * @since 2.0 EA1
- */
- public final @NotNull T unmarshal(@NotNull XMLStreamReader in) throws JAXBException {
- return unmarshal(in,null);
- }
- /**
- * @since 2.0.3
- */
- public final @NotNull T unmarshal(@NotNull XMLStreamReader in, @Nullable AttachmentUnmarshaller au) throws JAXBException {
- Unmarshaller u = context.unmarshallerPool.take();
- u.setAttachmentUnmarshaller(au);
- return exit(unmarshal(u,in),u);
- }
- public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull XMLStreamReader in) throws JAXBException {
- return unmarshal( ((BridgeContextImpl)context).unmarshaller, in );
- }
- public abstract @NotNull T unmarshal(@NotNull Unmarshaller u, @NotNull XMLStreamReader in) throws JAXBException;
-
- /**
- * Unmarshals the specified type object.
- *
- * @param in
- * the parser must be pointing at a start tag
- * that encloses the XML type that this {@link Bridge} is
- * instanciated for.
- *
- * @return
- * never null.
- *
- * @throws JAXBException
- * if there was an error while unmarshalling.
- *
- * @since 2.0 EA1
- */
- public final @NotNull T unmarshal(@NotNull Source in) throws JAXBException {
- return unmarshal(in,null);
- }
- /**
- * @since 2.0.3
- */
- public final @NotNull T unmarshal(@NotNull Source in, @Nullable AttachmentUnmarshaller au) throws JAXBException {
- Unmarshaller u = context.unmarshallerPool.take();
- u.setAttachmentUnmarshaller(au);
- return exit(unmarshal(u,in),u);
- }
- public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull Source in) throws JAXBException {
- return unmarshal( ((BridgeContextImpl)context).unmarshaller, in );
- }
- public abstract @NotNull T unmarshal(@NotNull Unmarshaller u, @NotNull Source in) throws JAXBException;
-
- /**
- * Unmarshals the specified type object.
- *
- * @param in
- * the parser must be pointing at a start tag
- * that encloses the XML type that this {@link Bridge} is
- * instanciated for.
- *
- * @return
- * never null.
- *
- * @throws JAXBException
- * if there was an error while unmarshalling.
- *
- * @since 2.0 EA1
- */
- public final @NotNull T unmarshal(@NotNull InputStream in) throws JAXBException {
- Unmarshaller u = context.unmarshallerPool.take();
- return exit(unmarshal(u,in),u);
- }
- public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull InputStream in) throws JAXBException {
- return unmarshal( ((BridgeContextImpl)context).unmarshaller, in );
- }
- public abstract @NotNull T unmarshal(@NotNull Unmarshaller u, @NotNull InputStream in) throws JAXBException;
-
- /**
- * Unmarshals the specified type object.
- *
- * @param n
- * Node to be unmarshalled.
- *
- * @return
- * never null.
- *
- * @throws JAXBException
- * if there was an error while unmarshalling.
- *
- * @since 2.0 FCS
- */
- public final @NotNull T unmarshal(@NotNull Node n) throws JAXBException {
- return unmarshal(n,null);
- }
- /**
- * @since 2.0.3
- */
- public final @NotNull T unmarshal(@NotNull Node n, @Nullable AttachmentUnmarshaller au) throws JAXBException {
- Unmarshaller u = context.unmarshallerPool.take();
- u.setAttachmentUnmarshaller(au);
- return exit(unmarshal(u,n),u);
- }
- public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull Node n) throws JAXBException {
- return unmarshal( ((BridgeContextImpl)context).unmarshaller, n );
- }
- public abstract @NotNull T unmarshal(@NotNull Unmarshaller context, @NotNull Node n) throws JAXBException;
-
- /**
- * Gets the {@link TypeReference} from which this bridge was created.
- */
- public abstract TypeReference getTypeReference();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/BridgeContext.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/BridgeContext.java
deleted file mode 100644
index 152a3abf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/BridgeContext.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.api;
-
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-
-/**
- * Holds thread specific state information for {@link Bridge}s,
- * to make {@link Bridge} thread-safe.
- *
- * <p>
- * This object cannot be used concurrently; two threads cannot
- * use the same object with {@link Bridge}s at the same time, nor
- * a thread can use a {@link BridgeContext} with one {@link Bridge} while
- * the same context is in use by another {@link Bridge}.
- *
- * <p>
- * {@link BridgeContext} is relatively a heavy-weight object, and
- * therefore it is expected to be cached by the JAX-RPC RI.
- *
- * <p>
- * <b>Subject to change without notice</b>.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.0 EA1
- * @see Bridge
- * @deprecated
- * The caller no longer needs to use this, as {@link Bridge} has
- * methods that can work without {@link BridgeContext}.
- */
-public abstract class BridgeContext {
- protected BridgeContext() {}
-
- /**
- * Registers the error handler that receives unmarshalling/marshalling errors.
- *
- * @param handler
- * can be null, in which case all errors will be considered fatal.
- *
- * @since 2.0 EA1
- */
- public abstract void setErrorHandler(ValidationEventHandler handler);
-
- /**
- * Sets the {@link AttachmentMarshaller}.
- *
- * @since 2.0 EA1
- */
- public abstract void setAttachmentMarshaller(AttachmentMarshaller m);
-
- /**
- * Sets the {@link AttachmentUnmarshaller}.
- *
- * @since 2.0 EA1
- */
- public abstract void setAttachmentUnmarshaller(AttachmentUnmarshaller m);
-
- /**
- * Gets the last {@link AttachmentMarshaller} set through
- * {@link AttachmentMarshaller}.
- *
- * @since 2.0 EA2
- */
- public abstract AttachmentMarshaller getAttachmentMarshaller();
-
- /**
- * Gets the last {@link AttachmentUnmarshaller} set through
- * {@link AttachmentUnmarshaller}.
- *
- * @since 2.0 EA2
- */
- public abstract AttachmentUnmarshaller getAttachmentUnmarshaller();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/ClassResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/ClassResolver.java
deleted file mode 100644
index 91d5724f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/ClassResolver.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.api;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.annotation.XmlAnyElement;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-/**
- * Dynamically locates classes to represent elements discovered during the unmarshalling.
- *
- * <p>
- * <b>THIS INTERFACE IS SUBJECT TO CHANGE WITHOUT NOTICE.</b>
- *
- * <h2>Background</h2>
- * <p>
- * {@link JAXBContext#newInstance(Class...)} requires that application informs JAXB
- * about all the classes that it may see in the instance document. While this allows
- * JAXB to take time to optimize the unmarshalling, it is sometimes inconvenient
- * for applications.
- *
- * <p>
- * This is where {@link ClassResolver} comes to resucue.
- *
- * <p>
- * A {@link ClassResolver} instance can be specified on {@link Unmarshaller} via
- * {@link Unmarshaller#setProperty(String, Object)} as follows:
- *
- * <pre>
- * unmarshaller.setProperty( ClassResolver.class.getName(), new MyClassResolverImpl() );
- * </pre>
- *
- * <p>
- * When an {@link Unmarshaller} encounters (i) an unknown root element or (ii) unknown
- * elements where unmarshaller is trying to unmarshal into {@link XmlAnyElement} with
- * <tt>lax=true</tt>, unmarshaller calls {@link #resolveElementName(String, String)}
- * method to see if the application may be able to supply a class that corresponds
- * to that class.
- *
- * <p>
- * When a {@link Class} is returned, a new {@link JAXBContext} is created with
- * all the classes known to it so far, plus a new class returned. This operation
- * may fail (for example because of some conflicting annotations.) This failure
- * is handled just like {@link Exception}s thrown from
- * {@link ClassResolver#resolveElementName(String, String)}.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.1
- */
-public abstract class ClassResolver {
- /**
- * JAXB calls this method when it sees an unknown element.
- *
- * <p>
- * See the class javadoc for details.
- *
- * @param nsUri
- * Namespace URI of the unknown element. Can be empty but never null.
- * @param localName
- * Local name of the unknown element. Never be empty nor null.
- *
- * @return
- * If a non-null class is returned, it will be used to unmarshal this element.
- * If null is returned, the resolution is assumed to be failed, and
- * the unmarshaller will behave as if there was no {@link ClassResolver}
- * to begin with (that is, to report it to {@link ValidationEventHandler},
- * then move on.)
- *
- * @throws Exception
- * Throwing any {@link RuntimeException} causes the unmarshaller to stop
- * immediately. The exception will be propagated up the call stack.
- * Throwing any other checked {@link Exception} results in the error
- * reproted to {@link ValidationEventHandler} (just like any other error
- * during the unmarshalling.)
- */
- public abstract @Nullable Class<?> resolveElementName(@NotNull String nsUri, @NotNull String localName) throws Exception;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/CompositeStructure.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/CompositeStructure.java
deleted file mode 100644
index db6ffde0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/CompositeStructure.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.api;
-
-/**
- * A JAXB Bean that works like a DOM.
- *
- * <p>
- * This bean is bound to XML as a sequence of elements, where each
- * element[i] is from bridges[i] (which defines the tag name and the expected type)
- * and values[i] (which defines the actual value.)
- *
- * <p>
- * This object allows you to treat multiple unrelated JAXB beans as a single tree.
- * This in turn allows you to marshal this tree in one marshal method invocation,
- * which is faster than multiple invocations of the marshal method.
- *
- * <p>
- * The binding of this class is always known to {@link JAXBRIContext}, so it can be
- * used without passing anything to {@link JAXBRIContext#newInstance}.
- * This object can be only used for marshalling, not for unmarshalling.
- *
- * @author Kohsuke Kawaguchi
- */
-public class CompositeStructure {
- public Bridge[] bridges;
- public Object[] values;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/ErrorListener.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/ErrorListener.java
deleted file mode 100644
index d41b1f02..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/ErrorListener.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.api;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXParseException;
-
-/**
- * Implemented by the driver of the compiler engine to handle
- * errors found during the compiliation.
- *
- * <p>
- * This class implements {@link ErrorHandler} so it can be
- * passed to anywhere where {@link ErrorHandler} is expected.
- *
- * <p>
- * However, to make the error handling easy (and make it work
- * with visitor patterns nicely), this interface is not allowed
- * to abort the processing. It merely receives errors.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- * @since 2.1 EA2
- */
-public interface ErrorListener extends ErrorHandler {
- void error(SAXParseException exception);
- void fatalError(SAXParseException exception);
- void warning(SAXParseException exception);
- /**
- * Used to report possibly verbose information that
- * can be safely ignored.
- */
- void info(SAXParseException exception);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java
deleted file mode 100644
index 704eaf17..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java
+++ /dev/null
@@ -1,537 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.api;
-
-import java.io.IOException;
-import java.lang.reflect.Type;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.bind.annotation.XmlAttachmentRef;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import com.sun.xml.internal.bind.v2.ContextFactory;
-import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet;
-import java.util.HashMap;
-
-/**
- * {@link JAXBContext} enhanced with JAXB RI specific functionalities.
- *
- * <p>
- * <b>Subject to change without notice</b>.
- *
- * @since 2.0 EA1
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class JAXBRIContext extends JAXBContext {
-
- protected JAXBRIContext() {}
-
- /**
- * Creates a new {@link JAXBRIContext}.
- *
- * <p>
- * {@link JAXBContext#newInstance(Class[]) JAXBContext.newInstance()} methods may
- * return other JAXB providers that are not compatible with the JAX-RPC RI.
- * This method guarantees that the JAX-WS RI will finds the JAXB RI.
- *
- * @param classes
- * Classes to be bound. See {@link JAXBContext#newInstance(Class[])} for the meaning.
- * @param typeRefs
- * See {@link #TYPE_REFERENCES} for the meaning of this parameter.
- * Can be null.
- * @param subclassReplacements
- * See {@link #SUBCLASS_REPLACEMENTS} for the meaning of this parameter.
- * Can be null.
- * @param defaultNamespaceRemap
- * See {@link #DEFAULT_NAMESPACE_REMAP} for the meaning of this parameter.
- * Can be null (and should be null for ordinary use of JAXB.)
- * @param c14nSupport
- * See {@link #CANONICALIZATION_SUPPORT} for the meaning of this parameter.
- * @param ar
- * See {@link #ANNOTATION_READER} for the meaning of this parameter.
- * Can be null.
- * @since JAXB 2.1 EA2
- */
- public static JAXBRIContext newInstance(@NotNull Class[] classes,
- @Nullable Collection<TypeReference> typeRefs,
- @Nullable Map<Class,Class> subclassReplacements,
- @Nullable String defaultNamespaceRemap, boolean c14nSupport,
- @Nullable RuntimeAnnotationReader ar) throws JAXBException {
- return newInstance(classes, typeRefs, subclassReplacements,
- defaultNamespaceRemap, c14nSupport, ar, false, false, false, false);
- }
-
- /**
- * Creates a new {@link JAXBRIContext}.
- *
- * <p>
- * {@link JAXBContext#newInstance(Class[]) JAXBContext.newInstance()} methods may
- * return other JAXB providers that are not compatible with the JAX-RPC RI.
- * This method guarantees that the JAX-WS RI will finds the JAXB RI.
- *
- * @param classes
- * Classes to be bound. See {@link JAXBContext#newInstance(Class[])} for the meaning.
- * @param typeRefs
- * See {@link #TYPE_REFERENCES} for the meaning of this parameter.
- * Can be null.
- * @param subclassReplacements
- * See {@link #SUBCLASS_REPLACEMENTS} for the meaning of this parameter.
- * Can be null.
- * @param defaultNamespaceRemap
- * See {@link #DEFAULT_NAMESPACE_REMAP} for the meaning of this parameter.
- * Can be null (and should be null for ordinary use of JAXB.)
- * @param c14nSupport
- * See {@link #CANONICALIZATION_SUPPORT} for the meaning of this parameter.
- * @param ar
- * See {@link #ANNOTATION_READER} for the meaning of this parameter.
- * Can be null.
- * @param xmlAccessorFactorySupport
- * See {@link #XMLACCESSORFACTORY_SUPPORT} for the meaning of this parameter.
- * @param allNillable
- * See {@link #TREAT_EVERYTHING_NILLABLE} for the meaning of this parameter.
- * @param retainPropertyInfo
- * See {@link #RETAIN_REFERENCE_TO_INFO} for the meaning of this parameter.
- * @param supressAccessorWarnings
- * See {@link #SUPRESS_ACCESSOR_WARNINGS} for the meaning of this parameter.
- */
- public static JAXBRIContext newInstance(@NotNull Class[] classes,
- @Nullable Collection<TypeReference> typeRefs,
- @Nullable Map<Class,Class> subclassReplacements,
- @Nullable String defaultNamespaceRemap, boolean c14nSupport,
- @Nullable RuntimeAnnotationReader ar,
- boolean xmlAccessorFactorySupport,
- boolean allNillable,
- boolean retainPropertyInfo,
- boolean supressAccessorWarnings) throws JAXBException {
- Map<String, Object> properties = new HashMap<String, Object>();
- if (typeRefs != null) properties.put(JAXBRIContext.TYPE_REFERENCES, typeRefs);
- if (subclassReplacements != null) properties.put(JAXBRIContext.SUBCLASS_REPLACEMENTS, subclassReplacements);
- if (defaultNamespaceRemap != null) properties.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, defaultNamespaceRemap);
- if (ar != null) properties.put(JAXBRIContext.ANNOTATION_READER, ar);
- properties.put(JAXBRIContext.CANONICALIZATION_SUPPORT, Boolean.valueOf(c14nSupport));
- properties.put(JAXBRIContext.XMLACCESSORFACTORY_SUPPORT, Boolean.valueOf(xmlAccessorFactorySupport));
- properties.put(JAXBRIContext.TREAT_EVERYTHING_NILLABLE, Boolean.valueOf(allNillable));
- properties.put(JAXBRIContext.RETAIN_REFERENCE_TO_INFO, Boolean.valueOf(retainPropertyInfo));
- properties.put(JAXBRIContext.SUPRESS_ACCESSOR_WARNINGS, Boolean.valueOf(supressAccessorWarnings));
- return (JAXBRIContext) ContextFactory.createContext(classes, properties);
- }
-
- /**
- * @deprecated
- * Compatibility with older versions.
- */
- public static JAXBRIContext newInstance(@NotNull Class[] classes,
- @Nullable Collection<TypeReference> typeRefs,
- @Nullable String defaultNamespaceRemap, boolean c14nSupport ) throws JAXBException {
- return newInstance(classes,typeRefs, Collections.<Class,Class>emptyMap(),
- defaultNamespaceRemap,c14nSupport,null);
- }
-
- /**
- * Returns true if this context includes a class
- * that has {@link XmlAttachmentRef}.
- *
- * @since 2.1
- */
- public abstract boolean hasSwaRef();
-
- /**
- * If the given object is bound to an element in XML by JAXB,
- * returns the element name.
- *
- * @return null
- * if the object is not bound to an element.
- * @throws JAXBException
- * if the object is not known to this context.
- *
- * @since 2.0 EA1
- */
- public abstract @Nullable QName getElementName(@NotNull Object o) throws JAXBException;
-
- /**
- * Allows to retrieve the element name based on Class.
- * @param o
- * @return
- * @throws javax.xml.bind.JAXBException
- * @since 2.1.10
- */
- public abstract @Nullable QName getElementName(@NotNull Class o) throws JAXBException;
-
- /**
- * Creates a mini-marshaller/unmarshaller that can process a {@link TypeReference}.
- *
- * @return
- * null if the specified reference is not given to {@link JAXBRIContext#newInstance}.
- *
- * @since 2.0 EA1
- */
- public abstract Bridge createBridge(@NotNull TypeReference ref);
-
- /**
- * Creates a new {@link BridgeContext} instance.
- *
- * @return
- * always a valid non-null instance.
- *
- * @since 2.0 EA1
- */
- public abstract @NotNull BridgeContext createBridgeContext();
-
- /**
- * Gets a {@link RawAccessor} for the specified element property of the specified wrapper bean class.
- *
- * <p>
- * This method is designed to assist the JAX-RPC RI fill in a wrapper bean (in the doc/lit/wrap mode.)
- * In the said mode, a wrapper bean is supposed to only have properties that match elements,
- * and for each element that appear in the content model there's one property.
- *
- * <p>
- * Therefore, this method takes a wrapper bean and a tag name that identifies a property
- * on the given wrapper bean, then returns a {@link RawAccessor} that allows the caller
- * to set/get a value from the property of the bean.
- *
- * <p>
- * This method is not designed for a performance. The caller is expected to cache the result.
- *
- * @param <B>
- * type of the wrapper bean
- * @param <V>
- * type of the property of the bean
- * @return
- * always return non-null valid accessor object.
- * @throws JAXBException
- * if the specified wrapper bean is not bound by JAXB, or if it doesn't have an element property
- * of the given name.
- *
- * @since 2.0 EA1
- */
- public abstract <B,V> RawAccessor<B,V> getElementPropertyAccessor( Class<B> wrapperBean, String nsUri, String localName )
- throws JAXBException;
-
- /**
- * Gets the namespace URIs statically known to this {@link JAXBContext}.
- *
- * <p>
- * When JAXB is used to marshal into sub-trees, it declares
- * these namespace URIs at each top-level element that it marshals.
- *
- * To avoid repeated namespace declarations at sub-elements, the application
- * may declare those namespaces at a higher level.
- *
- * @return
- * always non-null.
- *
- * @since 2.0 EA2
- */
- public abstract @NotNull List<String> getKnownNamespaceURIs();
-
-
- /**
- * Generates the schema documents from the model.
- *
- * <p>
- * The caller can use the additionalElementDecls parameter to
- * add element declarations to the generate schema.
- * For example, if the JAX-RPC passes in the following entry:
- *
- * {foo}bar -> DeclaredType for java.lang.String
- *
- * then JAXB generates the following element declaration (in the schema
- * document for the namespace "foo")"
- *
- * &lt;xs:element name="bar" type="xs:string" />
- *
- * This can be used for generating schema components necessary for WSDL.
- *
- * @param outputResolver
- * this object controls the output to which schemas
- * will be sent.
- *
- * @throws IOException
- * if {@link SchemaOutputResolver} throws an {@link IOException}.
- */
- @Override
- public abstract void generateSchema(@NotNull SchemaOutputResolver outputResolver) throws IOException;
-
- /**
- * Returns the name of the XML Type bound to the
- * specified Java type.
- *
- * @param tr
- * must not be null. This must be one of the {@link TypeReference}s specified
- * in the {@link JAXBRIContext#newInstance} method.
- *
- * @throws IllegalArgumentException
- * if the parameter is null or not a part of the {@link TypeReference}s specified
- * in the {@link JAXBRIContext#newInstance} method.
- *
- * @return null
- * if the referenced type is an anonymous and therefore doesn't have a name.
- */
- public abstract QName getTypeName(@NotNull TypeReference tr);
-
- /**
- * Gets the build information of the JAXB runtime.
- *
- * @return
- * may be null, if the runtime is loaded by a class loader that doesn't support
- * the access to the manifest informatino.
- */
- public abstract @NotNull String getBuildId();
-
- /**
- * Generates the episode file that represents the binding known to this {@link JAXBContext},
- * so that XJC can later do separate compilation.
- *
- * <p>
- * Episode file is really just a JAXB customization file, except that currently
- * we use the RI-specific SCD to refer to schema components.
- *
- * @param output
- * This receives the generated episode file.
- *
- * @since 2.1
- */
- public abstract void generateEpisode(Result output);
-
- /**
- * Allows you to access the runtime model information of the JAXB XML/Java binding.
- *
- * <p>
- * This is useful for doing a deeper integration with the JAXB RI.
- * For more information about the model, see https://jaxb2-reflection.dev.java.net/
- *
- * @since 2.1.10
- */
- public abstract RuntimeTypeInfoSet getRuntimeTypeInfoSet();
-
- /**
- * Computes a Java identifier from a local name.
- *
- * <p>
- * This method faithfully implements the name mangling rule as specified in the JAXB spec.
- *
- * <p>
- * In JAXB, a collision with a Java reserved word (such as "return") never happens.
- * Accordingly, this method may return an identifier that collides with reserved words.
- *
- * <p>
- * Use <tt>JJavaName.isJavaIdentifier(String)</tt> to check for such collision.
- *
- * @return
- * Typically, this method returns "nameLikeThis".
- */
- public static @NotNull String mangleNameToVariableName(@NotNull String localName) {
- return NameConverter.standard.toVariableName(localName);
- }
-
- /**
- * Computes a Java class name from a local name.
- *
- * <p>
- * This method faithfully implements the name mangling rule as specified in the JAXB spec.
- *
- * @return
- * Typically, this method returns "NameLikeThis".
- */
- public static @NotNull String mangleNameToClassName(@NotNull String localName) {
- return NameConverter.standard.toClassName(localName);
- }
-
- /**
- * Computes a Java class name from a local name.
- *
- * <p>
- * This method faithfully implements the name mangling rule as specified in the JAXB spec.
- * This method works like {@link #mangleNameToClassName(String)} except that it looks
- * for "getClass" and returns something else.
- *
- * @return
- * Typically, this method returns "NameLikeThis".
- */
- public static @NotNull String mangleNameToPropertyName(@NotNull String localName) {
- return NameConverter.standard.toPropertyName(localName);
- }
-
- /**
- * Gets the parameterization of the given base type.
- *
- * <p>
- * For example, given the following
- * <pre><xmp>
- * interface Foo<T> extends List<List<T>> {}
- * interface Bar extends Foo<String> {}
- * </xmp></pre>
- * This method works like this:
- * <pre><xmp>
- * getBaseClass( Bar, List ) = List<List<String>
- * getBaseClass( Bar, Foo ) = Foo<String>
- * getBaseClass( Foo<? extends Number>, Collection ) = Collection<List<? extends Number>>
- * getBaseClass( ArrayList<? extends BigInteger>, List ) = List<? extends BigInteger>
- * </xmp></pre>
- *
- * @param type
- * The type that derives from {@code baseType}
- * @param baseType
- * The class whose parameterization we are interested in.
- * @return
- * The use of {@code baseType} in {@code type}.
- * or null if the type is not assignable to the base type.
- * @since 2.0 FCS
- */
- public static @Nullable Type getBaseType(@NotNull Type type, @NotNull Class baseType) {
- return Utils.REFLECTION_NAVIGATOR.getBaseClass(type, baseType);
- }
-
- /**
- * The property that you can specify to {@link JAXBContext#newInstance}
- * to reassign the default namespace URI to something else at the runtime.
- *
- * <p>
- * The value of the property is {@link String}, and it is used as the namespace URI
- * that succeeds the default namespace URI.
- *
- * @since 2.0 EA1
- */
- public static final String DEFAULT_NAMESPACE_REMAP = "com.sun.xml.internal.bind.defaultNamespaceRemap";
-
- /**
- * The property that you can specify to {@link JAXBContext#newInstance}
- * to put additional JAXB type references into the {@link JAXBContext}.
- *
- * <p>
- * The value of the property is {@link Collection}&lt;{@link TypeReference}>.
- * Those {@link TypeReference}s can then be used to create {@link Bridge}s.
- *
- * <p>
- * This mechanism allows additional element declarations that were not a part of
- * the schema into the created {@link JAXBContext}.
- *
- * @since 2.0 EA1
- */
- public static final String TYPE_REFERENCES = "com.sun.xml.internal.bind.typeReferences";
-
- /**
- * The property that you can specify to {@link JAXBContext#newInstance}
- * and {@link Marshaller#setProperty(String, Object)}
- * to enable the c14n marshalling support in the {@link JAXBContext}.
- *
- * Boolean
- * @see C14nSupport_ArchitectureDocument
- * @since 2.0 EA2
- */
- public static final String CANONICALIZATION_SUPPORT = "com.sun.xml.internal.bind.c14n";
-
- /**
- * The property that you can specify to {@link JAXBContext#newInstance}
- * to allow unmarshaller to honor <tt>xsi:nil</tt> anywhere, even if they are
- * not specifically allowed by the schema.
- *
- * Boolean
- * @since 2.1.3
- */
- public static final String TREAT_EVERYTHING_NILLABLE = "com.sun.xml.internal.bind.treatEverythingNillable";
-
- /**
- * The property that you can specify to {@link JAXBContext#newInstance}
- * to use alternative {@link RuntimeAnnotationReader} implementation.
- *
- * @since 2.1 EA2
- */
- public static final String ANNOTATION_READER = RuntimeAnnotationReader.class.getName();
-
- /**
- * Marshaller/Unmarshaller property to enable XOP processing.
- *
- * @since 2.0 EA2
- */
- public static final String ENABLE_XOP = "com.sun.xml.internal.bind.XOP";
-
- /**
- * The property that you can specify to {@link JAXBContext#newInstance}
- * to specify specific classes that replace the reference to generic classes.
- *
- * <p>
- * See the release notes for more details about this feature.
- *
- * @since 2.1 EA2
- */
- public static final String SUBCLASS_REPLACEMENTS = "com.sun.xml.internal.bind.subclassReplacements";
-
- /**
- * The property that you can specify to {@link JAXBContext#newInstance}
- * enable support of XmlAccessorFactory annotation in the {@link JAXBContext}.
- *
- * @since 2.1 EA2
- */
- public static final String XMLACCESSORFACTORY_SUPPORT = "com.sun.xml.internal.bind.XmlAccessorFactory";
-
- /**
- * Retains references to PropertyInfos.
- *
- * Boolean
- * @since 2.1.10
- */
- public static final String RETAIN_REFERENCE_TO_INFO = "retainReferenceToInfo";
-
- /**
- * Supress security warnings when trying to access fields through reflection.
- *
- * Boolean
- * @since 2.1.14, 2.2.2
- */
- public static final String SUPRESS_ACCESSOR_WARNINGS = "supressAccessorWarnings";
-
- /**
- * Improves handling of xsi:type used on leaf properties.
- *
- * Boolean
- * @since 2.2.3
- */
- public static final String IMPROVED_XSI_TYPE_HANDLING = "com.sun.xml.internal.bind.improvedXsiTypeHandling";
-
- /**
- * If true XML security features when parsing XML documents will be disabled.
- * The default value is false.
- *
- * Boolean
- * @since 2.2.6
- */
- public static final String DISABLE_XML_SECURITY = "com.sun.xml.internal.bind.disableXmlSecurity";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages.java
deleted file mode 100644
index 19d6f55e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.api;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- *
- * @since JAXB2.1.10
- */
-
-enum Messages {
- // TypeReference
- ARGUMENT_CANT_BE_NULL
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
-
- @Override
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages.properties
deleted file mode 100644
index ee629e25..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ARGUMENT_CANT_BE_NULL = \
- Argument(s) "{0}" can''t be null.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_de.properties
deleted file mode 100644
index 2c4b6dc9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_de.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ARGUMENT_CANT_BE_NULL = Argumente "{0}" m\u00FCssen angegeben werden.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_es.properties
deleted file mode 100644
index b4c45b5a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_es.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ARGUMENT_CANT_BE_NULL = Los argumentos"{0}" no pueden ser nulos.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_fr.properties
deleted file mode 100644
index b7ee5ae8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_fr.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ARGUMENT_CANT_BE_NULL = Les arguments "{0}" ne peuvent pas \u00EAtre NULL.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_it.properties
deleted file mode 100644
index 2a0e0507..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_it.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ARGUMENT_CANT_BE_NULL = L''argomento o gli argomenti {0} non possono essere nulli.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_ja.properties
deleted file mode 100644
index e5390e8b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_ja.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ARGUMENT_CANT_BE_NULL = \u5F15\u6570"{0}"\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_ko.properties
deleted file mode 100644
index e5cdc8f8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_ko.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ARGUMENT_CANT_BE_NULL = "{0}" \uC778\uC218\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_pt_BR.properties
deleted file mode 100644
index b89e4f4d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_pt_BR.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ARGUMENT_CANT_BE_NULL = Argumento(s) "{0}" n\u00E3o pode(m) ser nulo(s).
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_zh_CN.properties
deleted file mode 100644
index 9dd98f7f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_zh_CN.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ARGUMENT_CANT_BE_NULL = \u53C2\u6570 "{0}" \u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_zh_TW.properties
deleted file mode 100644
index 3566db97..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_zh_TW.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ARGUMENT_CANT_BE_NULL = \u5F15\u6578 "{0}" \u4E0D\u53EF\u70BA\u7A7A\u503C.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/RawAccessor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/RawAccessor.java
deleted file mode 100644
index 44bab569..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/RawAccessor.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.api;
-
-
-
-/**
- * Accesses a particular property of a bean.
- *
- * <p>
- * This interface allows JAX-RPC to access an element property of a JAXB bean.
- *
- * <p>
- * <b>Subject to change without notice</b>.
- *
- * @author Kohsuke Kawaguchi
- *
- * @since 2.0 EA1
- */
-public abstract class RawAccessor<B,V> {
-
- /**
- * Gets the value of the property of the given bean object.
- *
- * @param bean
- * must not be null.
- * @throws AccessorException
- * if failed to set a value. For example, the getter method
- * may throw an exception.
- *
- * @since 2.0 EA1
- */
- public abstract V get(B bean) throws AccessorException;
-
- /**
- * Sets the value of the property of the given bean object.
- *
- * @param bean
- * must not be null.
- * @param value
- * the value to be set. Setting value to null means resetting
- * to the VM default value (even for primitive properties.)
- * @throws AccessorException
- * if failed to set a value. For example, the setter method
- * may throw an exception.
- *
- * @since 2.0 EA1
- */
- public abstract void set(B bean,V value) throws AccessorException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java
deleted file mode 100644
index c414c84c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.api;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.Arrays;
-import java.util.Collection;
-
-import javax.xml.namespace.QName;
-
-/**
- * A reference to a JAXB-bound type.
- *
- * <p>
- * <b>Subject to change without notice</b>.
- *
- * @since 2.0 EA1
- * @author Kohsuke Kawaguchi
- */
-public final class TypeReference {
-
- /**
- * The associated XML element name that the JAX-RPC uses with this type reference.
- *
- * Always non-null. Strings are interned.
- */
- public final QName tagName;
-
- /**
- * The Java type that's being referenced.
- *
- * Always non-null.
- */
- public final Type type;
-
- /**
- * The annotations associated with the reference of this type.
- *
- * Always non-null.
- */
- public final Annotation[] annotations;
-
- public TypeReference(QName tagName, Type type, Annotation... annotations) {
- if(tagName==null || type==null || annotations==null) {
- String nullArgs = "";
-
- if(tagName == null) nullArgs = "tagName";
- if(type == null) nullArgs += (nullArgs.length() > 0 ? ", type" : "type");
- if(annotations == null) nullArgs += (nullArgs.length() > 0 ? ", annotations" : "annotations");
-
- Messages.ARGUMENT_CANT_BE_NULL.format(nullArgs);
-
- throw new IllegalArgumentException(Messages.ARGUMENT_CANT_BE_NULL.format(nullArgs));
- }
-
- this.tagName = new QName(tagName.getNamespaceURI().intern(), tagName.getLocalPart().intern(), tagName.getPrefix());
- this.type = type;
- this.annotations = annotations;
- }
-
- /**
- * Finds the specified annotation from the array and returns it.
- * Null if not found.
- */
- public <A extends Annotation> A get( Class<A> annotationType ) {
- for (Annotation a : annotations) {
- if(a.annotationType()==annotationType)
- return annotationType.cast(a);
- }
- return null;
- }
-
- /**
- * Creates a {@link TypeReference} for the item type,
- * if this {@link TypeReference} represents a collection type.
- * Otherwise returns an identical type.
- */
- public TypeReference toItemType() {
- // if we are to reinstitute this check, check JAXB annotations only
- // assert annotations.length==0; // not designed to work with adapters.
-
- Type base = Utils.REFLECTION_NAVIGATOR.getBaseClass(type, Collection.class);
- if(base==null)
- return this; // not a collection
-
- return new TypeReference(tagName, Utils.REFLECTION_NAVIGATOR.getTypeArgument(base,0));
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- TypeReference that = (TypeReference) o;
-
- if (!Arrays.equals(annotations, that.annotations)) return false;
- if (!tagName.equals(that.tagName)) return false;
- if (!type.equals(that.type)) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = tagName.hashCode();
- result = 31 * result + type.hashCode();
- result = 31 * result + Arrays.hashCode(annotations);
- return result;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java
deleted file mode 100644
index cbb7a0a7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.api;
-
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Utils class.
- *
- * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages.
- *
- * Has *package private* access to avoid inappropriate usage.
- */
-final class Utils {
-
- private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
-
- /**
- * static ReflectionNavigator field to avoid usage of reflection every time we use it.
- */
- static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
-
- static { // we statically initializing REFLECTION_NAVIGATOR property
- try {
- final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
-
- // requires accessClassInPackage privilege
- final Method getInstance = AccessController.doPrivileged(
- new PrivilegedAction<Method>() {
- @Override
- public Method run() {
- try {
- Method getInstance = refNav.getDeclaredMethod("getInstance");
- getInstance.setAccessible(true);
- return getInstance;
- } catch (NoSuchMethodException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
- }
- }
- }
- );
-
- //noinspection unchecked
- REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
- } catch (ClassNotFoundException e) {
- throw new IllegalStateException("Can't find ReflectionNavigator class");
- } catch (InvocationTargetException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
- } catch (IllegalAccessException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
- } catch (SecurityException e) {
- LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
- throw e;
- }
- }
-
- /**
- * private constructor to avoid util class instantiating
- */
- private Utils() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/impl/NameConverter.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/impl/NameConverter.java
deleted file mode 100644
index 086da1b3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/impl/NameConverter.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.api.impl;
-
-import javax.lang.model.SourceVersion;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-/**
- * Converts aribitrary strings into Java identifiers.
- *
- * @author
- * <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface NameConverter
-{
- /**
- * converts a string into an identifier suitable for classes.
- *
- * In general, this operation should generate "NamesLikeThis".
- */
- String toClassName( String token );
-
- /**
- * converts a string into an identifier suitable for interfaces.
- *
- * In general, this operation should generate "NamesLikeThis".
- * But for example, it can prepend every interface with 'I'.
- */
- String toInterfaceName( String token );
-
- /**
- * converts a string into an identifier suitable for properties.
- *
- * In general, this operation should generate "NamesLikeThis",
- * which will be used with known prefixes like "get" or "set".
- */
- String toPropertyName( String token );
-
- /**
- * converts a string into an identifier suitable for constants.
- *
- * In the standard Java naming convention, this operation should
- * generate "NAMES_LIKE_THIS".
- */
- String toConstantName( String token );
-
- /**
- * Converts a string into an identifier suitable for variables.
- *
- * In general it should generate "namesLikeThis".
- */
- String toVariableName( String token );
-
- /**
- * Converts a namespace URI into a package name.
- * This method should expect strings like
- * "http://foo.bar.zot/org", "urn:abc:def:ghi" "", or even "###"
- * (basically anything) and expected to return a package name,
- * liks "org.acme.foo".
- *
- */
- String toPackageName( String namespaceUri );
-
- /**
- * The name converter implemented by Code Model.
- *
- * This is the standard name conversion for JAXB.
- */
- public static final NameConverter standard = new Standard();
-
- static class Standard extends NameUtil implements NameConverter {
- public String toClassName(String s) {
- return toMixedCaseName(toWordList(s), true);
- }
- public String toVariableName(String s) {
- return toMixedCaseName(toWordList(s), false);
- }
- public String toInterfaceName( String token ) {
- return toClassName(token);
- }
- public String toPropertyName(String s) {
- String prop = toClassName(s);
- // property name "Class" with collide with Object.getClass,
- // so escape this.
- if(prop.equals("Class"))
- prop = "Clazz";
- return prop;
- }
- public String toConstantName( String token ) {
- return super.toConstantName(token);
- }
- /**
- * Computes a Java package name from a namespace URI,
- * as specified in the spec.
- *
- * @return
- * null if it fails to derive a package name.
- */
- public String toPackageName( String nsUri ) {
- // remove scheme and :, if present
- // spec only requires us to remove 'http' and 'urn'...
- int idx = nsUri.indexOf(':');
- String scheme = "";
- if(idx>=0) {
- scheme = nsUri.substring(0,idx);
- if( scheme.equalsIgnoreCase("http") || scheme.equalsIgnoreCase("urn") )
- nsUri = nsUri.substring(idx+1);
- }
-
- // tokenize string
- ArrayList<String> tokens = tokenize( nsUri, "/: " );
- if( tokens.size() == 0 ) {
- return null;
- }
-
- // remove trailing file type, if necessary
- if( tokens.size() > 1 ) {
- // for uri's like "www.foo.com" and "foo.com", there is no trailing
- // file, so there's no need to look at the last '.' and substring
- // otherwise, we loose the "com" (which would be wrong)
- String lastToken = tokens.get( tokens.size()-1 );
- idx = lastToken.lastIndexOf( '.' );
- if( idx > 0 ) {
- lastToken = lastToken.substring( 0, idx );
- tokens.set( tokens.size()-1, lastToken );
- }
- }
-
- // tokenize domain name and reverse. Also remove :port if it exists
- String domain = tokens.get( 0 );
- idx = domain.indexOf(':');
- if( idx >= 0) domain = domain.substring(0, idx);
- ArrayList<String> r = reverse( tokenize( domain, scheme.equals("urn")?".-":"." ) );
- if( r.get( r.size()-1 ).equalsIgnoreCase( "www" ) ) {
- // remove leading www
- r.remove( r.size()-1 );
- }
-
- // replace the domain name with tokenized items
- tokens.addAll( 1, r );
- tokens.remove( 0 );
-
- // iterate through the tokens and apply xml->java name algorithm
- for( int i = 0; i < tokens.size(); i++ ) {
-
- // get the token and remove illegal chars
- String token = tokens.get( i );
- token = removeIllegalIdentifierChars( token );
-
- // this will check for reserved keywords
- if (SourceVersion.isKeyword(token.toLowerCase())) {
- token = '_' + token;
- }
-
- tokens.set( i, token.toLowerCase() );
- }
-
- // concat all the pieces and return it
- return combine( tokens, '.' );
- }
-
-
- private static String removeIllegalIdentifierChars(String token) {
- StringBuilder newToken = new StringBuilder(token.length() + 1); // max expected length
- for( int i = 0; i < token.length(); i++ ) {
- char c = token.charAt( i );
- if (i == 0 && !Character.isJavaIdentifierStart(c)) { // c can't be used as FIRST char
- newToken.append('_');
- }
- if (!Character.isJavaIdentifierPart(c)) { // c can't be used
- newToken.append('_');
- } else {
- newToken.append(c); // c is valid
- }
- }
- return newToken.toString();
- }
-
-
- private static ArrayList<String> tokenize( String str, String sep ) {
- StringTokenizer tokens = new StringTokenizer(str,sep);
- ArrayList<String> r = new ArrayList<String>();
-
- while(tokens.hasMoreTokens())
- r.add( tokens.nextToken() );
-
- return r;
- }
-
- private static <T> ArrayList<T> reverse( List<T> a ) {
- ArrayList<T> r = new ArrayList<T>();
-
- for( int i=a.size()-1; i>=0; i-- )
- r.add( a.get(i) );
-
- return r;
- }
-
- private static String combine( List r, char sep ) {
- StringBuilder buf = new StringBuilder(r.get(0).toString());
-
- for( int i=1; i<r.size(); i++ ) {
- buf.append(sep);
- buf.append(r.get(i));
- }
-
- return buf.toString();
- }
- }
-
- /**
- * JAX-PRC compatible name converter implementation.
- *
- * The only difference is that we treat '_' as a valid character
- * and not as a word separator.
- */
- public static final NameConverter jaxrpcCompatible = new Standard() {
- protected boolean isPunct(char c) {
- return (c == '.' || c == '-' || c == ';' /*|| c == '_'*/ || c == '\u00b7'
- || c == '\u0387' || c == '\u06dd' || c == '\u06de');
- }
- protected boolean isLetter(char c) {
- return super.isLetter(c) || c=='_';
- }
-
- protected int classify(char c0) {
- if(c0=='_') return NameUtil.OTHER_LETTER;
- return super.classify(c0);
- }
- };
-
- /**
- * Smarter converter used for RELAX NG support.
- */
- public static final NameConverter smart = new Standard() {
- public String toConstantName( String token ) {
- String name = super.toConstantName(token);
- if(!SourceVersion.isKeyword(name))
- return name;
- else
- return '_'+name;
- }
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/impl/NameUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/impl/NameUtil.java
deleted file mode 100644
index 7c7242b4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/impl/NameUtil.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.api.impl;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Locale;
-
-/**
- * Methods that convert strings into various formats.
- *
- * <p>
- * What JAX-RPC name binding tells us is that even such basic method
- * like "isLetter" can be different depending on the situation.
- *
- * For this reason, a whole lot of methods are made non-static,
- * even though they look like they should be static.
- */
-class NameUtil {
- protected boolean isPunct(char c) {
- return c == '-' || c == '.' || c == ':' || c == '_' || c == '\u00b7' || c == '\u0387' || c == '\u06dd' || c == '\u06de';
- }
-
- protected static boolean isDigit(char c) {
- return c >= '0' && c <= '9' || Character.isDigit(c);
- }
-
- protected static boolean isUpper(char c) {
- return c >= 'A' && c <= 'Z' || Character.isUpperCase(c);
- }
-
- protected static boolean isLower(char c) {
- return c >= 'a' && c <= 'z' || Character.isLowerCase(c);
- }
-
- protected boolean isLetter(char c) {
- return c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z' || Character.isLetter(c);
- }
-
- private String toLowerCase(String s)
- {
- return s.toLowerCase(Locale.ENGLISH);
- }
-
- private String toUpperCase(char c)
- {
- return String.valueOf(c).toUpperCase(Locale.ENGLISH);
- }
-
- private String toUpperCase(String s)
- {
- return s.toUpperCase(Locale.ENGLISH);
- }
-
- /**
- * Capitalizes the first character of the specified string,
- * and de-capitalize the rest of characters.
- */
- public String capitalize(String s) {
- if (!isLower(s.charAt(0)))
- return s;
- StringBuilder sb = new StringBuilder(s.length());
- sb.append(toUpperCase(s.charAt(0)));
- sb.append(toLowerCase(s.substring(1)));
- return sb.toString();
- }
-
- // Precondition: s[start] is not punctuation
- private int nextBreak(String s, int start) {
- int n = s.length();
-
- char c1 = s.charAt(start);
- int t1 = classify(c1);
-
- for (int i=start+1; i<n; i++) {
- // shift (c1,t1) into (c0,t0)
- // char c0 = c1; --- conceptually, but c0 won't be used
- int t0 = t1;
-
- c1 = s.charAt(i);
- t1 = classify(c1);
-
- switch(actionTable[t0*5+t1]) {
- case ACTION_CHECK_PUNCT:
- if(isPunct(c1)) return i;
- break;
- case ACTION_CHECK_C2:
- if (i < n-1) {
- char c2 = s.charAt(i+1);
- if (isLower(c2))
- return i;
- }
- break;
- case ACTION_BREAK:
- return i;
- }
- }
- return -1;
- }
-
- // the 5-category classification that we use in this code
- // to find work breaks
- static protected final int UPPER_LETTER = 0;
- static protected final int LOWER_LETTER = 1;
- static protected final int OTHER_LETTER = 2;
- static protected final int DIGIT = 3;
- static protected final int OTHER = 4;
-
- /**
- * Look up table for actions.
- * type0*5+type1 would yield the action to be taken.
- */
- private static final byte[] actionTable = new byte[5*5];
-
- // action constants. see nextBreak for the meaning
- static private final byte ACTION_CHECK_PUNCT = 0;
- static private final byte ACTION_CHECK_C2 = 1;
- static private final byte ACTION_BREAK = 2;
- static private final byte ACTION_NOBREAK = 3;
-
- /**
- * Decide the action to be taken given
- * the classification of the preceding character 't0' and
- * the classification of the next character 't1'.
- */
- private static byte decideAction( int t0, int t1 ) {
- if(t0==OTHER && t1==OTHER) return ACTION_CHECK_PUNCT;
- if(!xor(t0==DIGIT,t1==DIGIT)) return ACTION_BREAK;
- if(t0==LOWER_LETTER && t1!=LOWER_LETTER) return ACTION_BREAK;
- if(!xor(t0<=OTHER_LETTER,t1<=OTHER_LETTER)) return ACTION_BREAK;
- if(!xor(t0==OTHER_LETTER,t1==OTHER_LETTER)) return ACTION_BREAK;
-
- if(t0==UPPER_LETTER && t1==UPPER_LETTER) return ACTION_CHECK_C2;
-
- return ACTION_NOBREAK;
- }
-
- private static boolean xor(boolean x,boolean y) {
- return (x&&y) || (!x&&!y);
- }
-
- static {
- // initialize the action table
- for( int t0=0; t0<5; t0++ )
- for( int t1=0; t1<5; t1++ )
- actionTable[t0*5+t1] = decideAction(t0,t1);
- }
-
- /**
- * Classify a character into 5 categories that determine the word break.
- */
- protected int classify(char c0) {
- switch(Character.getType(c0)) {
- case Character.UPPERCASE_LETTER: return UPPER_LETTER;
- case Character.LOWERCASE_LETTER: return LOWER_LETTER;
- case Character.TITLECASE_LETTER:
- case Character.MODIFIER_LETTER:
- case Character.OTHER_LETTER: return OTHER_LETTER;
- case Character.DECIMAL_DIGIT_NUMBER: return DIGIT;
- default: return OTHER;
- }
- }
-
-
- /**
- * Tokenizes a string into words and capitalizes the first
- * character of each word.
- *
- * <p>
- * This method uses a change in character type as a splitter
- * of two words. For example, "abc100ghi" will be splitted into
- * {"Abc", "100","Ghi"}.
- */
- public List<String> toWordList(String s) {
- ArrayList<String> ss = new ArrayList<String>();
- int n = s.length();
- for (int i = 0; i < n;) {
-
- // Skip punctuation
- while (i < n) {
- if (!isPunct(s.charAt(i)))
- break;
- i++;
- }
- if (i >= n) break;
-
- // Find next break and collect word
- int b = nextBreak(s, i);
- String w = (b == -1) ? s.substring(i) : s.substring(i, b);
- ss.add(escape(capitalize(w)));
- if (b == -1) break;
- i = b;
- }
-
-// we can't guarantee a valid Java identifier anyway,
-// so there's not much point in rejecting things in this way.
-// if (ss.size() == 0)
-// throw new IllegalArgumentException("Zero-length identifier");
- return ss;
- }
-
- protected String toMixedCaseName(List<String> ss, boolean startUpper) {
- StringBuilder sb = new StringBuilder();
- if(!ss.isEmpty()) {
- sb.append(startUpper ? ss.get(0) : toLowerCase(ss.get(0)));
- for (int i = 1; i < ss.size(); i++)
- sb.append(ss.get(i));
- }
- return sb.toString();
- }
-
- protected String toMixedCaseVariableName(String[] ss,
- boolean startUpper,
- boolean cdrUpper) {
- if (cdrUpper)
- for (int i = 1; i < ss.length; i++)
- ss[i] = capitalize(ss[i]);
- StringBuilder sb = new StringBuilder();
- if( ss.length>0 ) {
- sb.append(startUpper ? ss[0] : toLowerCase(ss[0]));
- for (int i = 1; i < ss.length; i++)
- sb.append(ss[i]);
- }
- return sb.toString();
- }
-
-
- /**
- * Formats a string into "THIS_KIND_OF_FORMAT_ABC_DEF".
- *
- * @return
- * Always return a string but there's no guarantee that
- * the generated code is a valid Java identifier.
- */
- public String toConstantName(String s) {
- return toConstantName(toWordList(s));
- }
-
- /**
- * Formats a string into "THIS_KIND_OF_FORMAT_ABC_DEF".
- *
- * @return
- * Always return a string but there's no guarantee that
- * the generated code is a valid Java identifier.
- */
- public String toConstantName(List<String> ss) {
- StringBuilder sb = new StringBuilder();
- if( !ss.isEmpty() ) {
- sb.append(toUpperCase(ss.get(0)));
- for (int i = 1; i < ss.size(); i++) {
- sb.append('_');
- sb.append(toUpperCase(ss.get(i)));
- }
- }
- return sb.toString();
- }
-
-
-
- /**
- * Escapes characters is the given string so that they can be
- * printed by only using US-ASCII characters.
- *
- * The escaped characters will be appended to the given
- * StringBuffer.
- *
- * @param sb
- * StringBuffer that receives escaped string.
- * @param s
- * String to be escaped. <code>s.substring(start)</code>
- * will be escaped and copied to the string buffer.
- */
- public static void escape(StringBuilder sb, String s, int start) {
- int n = s.length();
- for (int i = start; i < n; i++) {
- char c = s.charAt(i);
- if (Character.isJavaIdentifierPart(c))
- sb.append(c);
- else {
- sb.append('_');
- if (c <= '\u000f') sb.append("000");
- else if (c <= '\u00ff') sb.append("00");
- else if (c <= '\u0fff') sb.append('0');
- sb.append(Integer.toString(c, 16));
- }
- }
- }
-
- /**
- * Escapes characters that are unusable as Java identifiers
- * by replacing unsafe characters with safe characters.
- */
- private static String escape(String s) {
- int n = s.length();
- for (int i = 0; i < n; i++)
- if (!Character.isJavaIdentifierPart(s.charAt(i))) {
- StringBuilder sb = new StringBuilder(s.substring(0, i));
- escape(sb, s, i);
- return sb.toString();
- }
- return s;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/api/package-info.java
deleted file mode 100644
index 22fc4293..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/api/package-info.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * <h1>Runtime API for the JAX-WS RI</h1>.
- *
- * This API is designed for the use by the JAX-WS RI runtime. The API is is subject to
- * change without notice.
- *
- * <p>
- * In an container environment, such as in J2SE/J2EE, if a new version with
- * a modified runtime API is loaded into a child class loader, it will still be bound
- * against the old runtime API in the base class loader.
- *
- * <p>
- * So the compatibility of this API has to be managed carefully.
- */
-package com.sun.xml.internal.bind.api;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/CharacterEscapeHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/CharacterEscapeHandler.java
deleted file mode 100644
index 83bc797f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/CharacterEscapeHandler.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.marshaller;
-
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * Performs character escaping and write the result
- * to the output.
- *
- * @since 1.0.1
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface CharacterEscapeHandler {
-
- /**
- * @param ch The array of characters.
- * @param start The starting position.
- * @param length The number of characters to use.
- * @param isAttVal true if this is an attribute value literal.
- */
- void escape( char[] ch, int start, int length, boolean isAttVal, Writer out ) throws IOException;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/DataWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/DataWriter.java
deleted file mode 100644
index 49545667..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/DataWriter.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-//@@3RD PARTY CODE@@
-
-// DataWriter.java - XML writer for data-oriented files.
-
-package com.sun.xml.internal.bind.marshaller;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Stack;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-
-/**
- * Write data- or field-oriented XML.
- *
- * <p>This filter pretty-prints field-oriented XML without mixed content.
- * all added indentation and newlines will be passed on down
- * the filter chain (if any).</p>
- *
- * <p>In general, all whitespace in an XML document is potentially
- * significant, so a general-purpose XML writing tool like the
- * {@link XMLWriter} class cannot
- * add newlines or indentation.</p>
- *
- * <p>There is, however, a large class of XML documents where information
- * is strictly fielded: each element contains either character data
- * or other elements, but not both. For this special case, it is possible
- * for a writing tool to provide automatic indentation and newlines
- * without requiring extra work from the user. Note that this class
- * will likely not yield appropriate results for document-oriented
- * XML like XHTML pages, which mix character data and elements together.</p>
- *
- * <p>This writer will automatically place each start tag on a new line,
- * optionally indented if an indent step is provided (by default, there
- * is no indentation). If an element contains other elements, the end
- * tag will also appear on a new line with leading indentation. Consider,
- * for example, the following code:</p>
- *
- * <pre>
- * DataWriter w = new DataWriter();
- *
- * w.setIndentStep(2);
- * w.startDocument();
- * w.startElement("Person");
- * w.dataElement("name", "Jane Smith");
- * w.dataElement("date-of-birth", "1965-05-23");
- * w.dataElement("citizenship", "US");
- * w.endElement("Person");
- * w.endDocument();
- * </pre>
- *
- * <p>This code will produce the following document:</p>
- *
- * <pre>
- * &lt;?xml version="1.0" standalone="yes"?>
- *
- * &lt;Person>
- * &lt;name>Jane Smith&lt;/name>
- * &lt;date-of-birth>1965-05-23&lt;/date-of-birth>
- * &lt;citizenship>US&lt;/citizenship>
- * &lt;/Person>
- * </pre>
- *
- * <p>This class inherits from {@link XMLWriter},
- * and provides all of the same support for Namespaces.</p>
- *
- * @since 1.0
- * @author David Megginson, david@megginson.com
- * @version 0.2
- * @see XMLWriter
- */
-public class DataWriter extends XMLWriter
-{
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Constructors.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Create a new data writer for the specified output.
- *
- * @param writer The character stream where the XML document
- * will be written.
- * @param encoding
- * If non-null string is specified, it is written as a part
- * of the XML declaration.
- */
- public DataWriter ( Writer writer, String encoding, CharacterEscapeHandler _escapeHandler )
- {
- super(writer,encoding,_escapeHandler);
- }
-
-
- public DataWriter (Writer writer, String encoding ) {
- this( writer, encoding, DumbEscapeHandler.theInstance );
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Accessors and setters.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Return the current indent step.
- *
- * <p>Return the current indent step: each start tag will be
- * indented by this number of spaces times the number of
- * ancestors that the element has.</p>
- *
- * @return The number of spaces in each indentation step,
- * or 0 or less for no indentation.
- * @see #setIndentStep(int)
- *
- * @deprecated
- * Only return the length of the indent string.
- */
- public int getIndentStep ()
- {
- return indentStep.length();
- }
-
-
- /**
- * Set the current indent step.
- *
- * @param indentStep The new indent step (0 or less for no
- * indentation).
- * @see #getIndentStep()
- *
- * @deprecated
- * Should use the version that takes string.
- */
- public void setIndentStep (int indentStep)
- {
- StringBuilder buf = new StringBuilder();
- for( ; indentStep>0; indentStep-- )
- buf.append(' ');
- setIndentStep(buf.toString());
- }
-
- public void setIndentStep(String s) {
- this.indentStep = s;
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Override methods from XMLWriter.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Reset the writer so that it can be reused.
- *
- * <p>This method is especially useful if the writer failed
- * with an exception the last time through.</p>
- *
- * @see XMLWriter#reset()
- */
- public void reset ()
- {
- depth = 0;
- state = SEEN_NOTHING;
- stateStack = new Stack<Object>();
- super.reset();
- }
-
- protected void writeXmlDecl(String decl) throws IOException {
- super.writeXmlDecl(decl);
- write('\n');
- }
-
-
- /**
- * Write a start tag.
- *
- * <p>Each tag will begin on a new line, and will be
- * indented by the current indent step times the number
- * of ancestors that the element has.</p>
- *
- * <p>The newline and indentation will be passed on down
- * the filter chain through regular characters events.</p>
- *
- * @param uri The element's Namespace URI.
- * @param localName The element's local name.
- * @param qName The element's qualified (prefixed) name.
- * @param atts The element's attribute list.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the start tag, or if a filter further
- * down the chain raises an exception.
- * @see XMLWriter#startElement(String, String, String, Attributes)
- */
- public void startElement (String uri, String localName,
- String qName, Attributes atts)
- throws SAXException
- {
- stateStack.push(SEEN_ELEMENT);
- state = SEEN_NOTHING;
- if (depth > 0) {
- super.characters("\n");
- }
- doIndent();
- super.startElement(uri, localName, qName, atts);
- depth++;
- }
-
-
- /**
- * Write an end tag.
- *
- * <p>If the element has contained other elements, the tag
- * will appear indented on a new line; otherwise, it will
- * appear immediately following whatever came before.</p>
- *
- * <p>The newline and indentation will be passed on down
- * the filter chain through regular characters events.</p>
- *
- * @param uri The element's Namespace URI.
- * @param localName The element's local name.
- * @param qName The element's qualified (prefixed) name.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the end tag, or if a filter further
- * down the chain raises an exception.
- * @see XMLWriter#endElement(String, String, String)
- */
- public void endElement (String uri, String localName, String qName)
- throws SAXException
- {
- depth--;
- if (state == SEEN_ELEMENT) {
- super.characters("\n");
- doIndent();
- }
- super.endElement(uri, localName, qName);
- state = stateStack.pop();
- }
-
- public void endDocument() throws SAXException {
- try {
- write('\n');
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- super.endDocument();
- }
-
-// /**
-// * Write a empty element tag.
-// *
-// * <p>Each tag will appear on a new line, and will be
-// * indented by the current indent step times the number
-// * of ancestors that the element has.</p>
-// *
-// * <p>The newline and indentation will be passed on down
-// * the filter chain through regular characters events.</p>
-// *
-// * @param uri The element's Namespace URI.
-// * @param localName The element's local name.
-// * @param qName The element's qualified (prefixed) name.
-// * @param atts The element's attribute list.
-// * @exception org.xml.sax.SAXException If there is an error
-// * writing the empty tag, or if a filter further
-// * down the chain raises an exception.
-// * @see XMLWriter#emptyElement(String, String, String, Attributes)
-// */
-// public void emptyElement (String uri, String localName,
-// String qName, Attributes atts)
-// throws SAXException
-// {
-// state = SEEN_ELEMENT;
-// if (depth > 0) {
-// super.characters("\n");
-// }
-// doIndent();
-// super.emptyElement(uri, localName, qName, atts);
-// }
-
-
- /**
- * Write a sequence of characters.
- *
- * @param ch The characters to write.
- * @param start The starting position in the array.
- * @param length The number of characters to use.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the characters, or if a filter further
- * down the chain raises an exception.
- * @see XMLWriter#characters(char[], int, int)
- */
- public void characters (char ch[], int start, int length)
- throws SAXException
- {
- state = SEEN_DATA;
- super.characters(ch, start, length);
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal methods.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Print indentation for the current level.
- *
- * @exception org.xml.sax.SAXException If there is an error
- * writing the indentation characters, or if a filter
- * further down the chain raises an exception.
- */
- private void doIndent ()
- throws SAXException
- {
- if (depth > 0) {
- char[] ch = indentStep.toCharArray();
- for( int i=0; i<depth; i++ )
- characters(ch, 0, ch.length);
- }
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Constants.
- ////////////////////////////////////////////////////////////////////
-
- private final static Object SEEN_NOTHING = new Object();
- private final static Object SEEN_ELEMENT = new Object();
- private final static Object SEEN_DATA = new Object();
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal state.
- ////////////////////////////////////////////////////////////////////
-
- private Object state = SEEN_NOTHING;
- private Stack<Object> stateStack = new Stack<Object>();
-
- private String indentStep = "";
- private int depth = 0;
-
-}
-
-// end of DataWriter.java
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/DumbEscapeHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/DumbEscapeHandler.java
deleted file mode 100644
index 8d04564d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/DumbEscapeHandler.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.marshaller;
-
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * Escape everything above the US-ASCII code range.
- * A fallback position.
- *
- * Works with any JDK, any encoding.
- *
- * @since 1.0.1
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class DumbEscapeHandler implements CharacterEscapeHandler {
-
- private DumbEscapeHandler() {} // no instanciation please
-
- public static final CharacterEscapeHandler theInstance = new DumbEscapeHandler();
-
- public void escape(char[] ch, int start, int length, boolean isAttVal, Writer out) throws IOException {
- int limit = start+length;
- for (int i = start; i < limit; i++) {
- switch (ch[i]) {
- case '&':
- out.write("&amp;");
- break;
- case '<':
- out.write("&lt;");
- break;
- case '>':
- out.write("&gt;");
- break;
- case '\"':
- if (isAttVal) {
- out.write("&quot;");
- } else {
- out.write('\"');
- }
- break;
- default:
- if (ch[i] > '\u007f') {
- out.write("&#");
- out.write(Integer.toString(ch[i]));
- out.write(';');
- } else {
- out.write(ch[i]);
- }
- }
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages.java
deleted file mode 100644
index daa4fda4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.marshaller;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- *
- * @since JAXB1.0
- */
-public class Messages
-{
- public static String format( String property ) {
- return format( property, null );
- }
-
- public static String format( String property, Object arg1 ) {
- return format( property, new Object[]{arg1} );
- }
-
- public static String format( String property, Object arg1, Object arg2 ) {
- return format( property, new Object[]{arg1,arg2} );
- }
-
- public static String format( String property, Object arg1, Object arg2, Object arg3 ) {
- return format( property, new Object[]{arg1,arg2,arg3} );
- }
-
- // add more if necessary.
-
- /** Loads a string resource and formats it with specified arguments. */
- static String format( String property, Object[] args ) {
- String text = ResourceBundle.getBundle(Messages.class.getName()).getString(property);
- return MessageFormat.format(text,args);
- }
-
-//
-//
-// Message resources
-//
-//
- public static final String NOT_MARSHALLABLE = // 0 args
- "MarshallerImpl.NotMarshallable";
-
- public static final String UNSUPPORTED_RESULT = // 0 args
- "MarshallerImpl.UnsupportedResult";
-
- public static final String UNSUPPORTED_ENCODING = // 1 arg
- "MarshallerImpl.UnsupportedEncoding";
-
- public static final String NULL_WRITER = // 0 args
- "MarshallerImpl.NullWriterParam";
-
- public static final String ASSERT_FAILED = // 0 args
- "SAXMarshaller.AssertFailed";
-
- /**
- * @deprecated use ERR_MISSING_OBJECT2
- */
- public static final String ERR_MISSING_OBJECT = // 0 args
- "SAXMarshaller.MissingObject";
-
- /**
- * @deprecated
- * use {@link com.sun.xml.internal.bind.v2.runtime.XMLSerializer#reportMissingObjectError(String)}
- * Usage not found. TODO Remove
- */
- // public static final String ERR_MISSING_OBJECT2 = // 1 arg
- // "SAXMarshaller.MissingObject2";
-
- /**
- * @deprecated only used from 1.0
- */
- public static final String ERR_DANGLING_IDREF = // 1 arg
- "SAXMarshaller.DanglingIDREF";
-
- /**
- * @deprecated only used from 1.0
- */
- public static final String ERR_NOT_IDENTIFIABLE = // 0 args
- "SAXMarshaller.NotIdentifiable";
-
- public static final String DOM_IMPL_DOESNT_SUPPORT_CREATELEMENTNS = // 2 args
- "SAX2DOMEx.DomImplDoesntSupportCreateElementNs";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages.properties
deleted file mode 100644
index f46827d7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages.properties
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# Wrapped into a JAXBException. Not concatenated with any other string.
-MarshallerImpl.NotMarshallable = \
- the object parameter to marshal() is not marshallable
-
-# Not concatenated with any other string (written on a separate line).
-MarshallerImpl.UnsupportedResult = \
- unsupported javax.xml.parser.transform.Result parameter
-
-MarshallerImpl.UnsupportedEncoding = \
- unsupported encoding: {0}
-
-MarshallerImpl.NullWriterParam = \
- StAX writer parameter must not be null
-
-SAXMarshaller.AssertFailed = \
- assertion failed
-
-# Printed after [ERROR]: string.
-SAXMarshaller.MissingObject = \
- a required object is missing
-
-# Usage not found. TODO Remove
-#SAXMarshaller.MissingObject2 = \
-# a required field "{0}" is missing an object
-
-SAXMarshaller.DanglingIDREF = \
- A tree contains a reference to ID "{0}" but it's not a part of the object graph
-
-SAXMarshaller.NotIdentifiable = \
- An object is referenced as IDREF but its ID field is null
-
-SAX2DOMEx.DomImplDoesntSupportCreateElementNs = \
- DOM implementation ({0} from {1}) is broken. It does not support the createElementNS method.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_de.properties
deleted file mode 100644
index 67fe9eba..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_de.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# Wrapped into a JAXBException. Not concatenated with any other string.
-MarshallerImpl.NotMarshallable = die Methode marshal() kann nicht mit Objektparameter verwendet werden
-
-# Not concatenated with any other string (written on a separate line).
-MarshallerImpl.UnsupportedResult = nicht unterst\u00FCtzter javax.xml.parser.transform.Result-Parameter
-
-MarshallerImpl.UnsupportedEncoding = nicht unterst\u00FCtzte Codierung: {0}
-
-MarshallerImpl.NullWriterParam = StAX-Writer-Parameter muss angegeben werden
-
-SAXMarshaller.AssertFailed = Assertion nicht erfolgreich
-
-# Printed after [ERROR]: string.
-SAXMarshaller.MissingObject = ein erforderliches Objekt fehlt
-
-# Usage not found. TODO Remove
-#SAXMarshaller.MissingObject2 = \
-# a required field "{0}" is missing an object
-
-SAXMarshaller.DanglingIDREF = Ein Baum enth\u00E4lt eine Referenz auf ID "{0}", ist jedoch nicht Bestandteil des Objektdiagramms
-
-SAXMarshaller.NotIdentifiable = Ein Objekt wird als IDREF referenziert, das ID-Feld ist jedoch null
-
-SAX2DOMEx.DomImplDoesntSupportCreateElementNs = DOM-Implementierung ({0} von {1}) ist unterbrochen. Sie unterst\u00FCtzt die createElementNS-Methode nicht.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_es.properties
deleted file mode 100644
index 9c633bce..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_es.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# Wrapped into a JAXBException. Not concatenated with any other string.
-MarshallerImpl.NotMarshallable = No es posible utilizar el m\u00E9todo marshal() con el par\u00E1metro de objeto.
-
-# Not concatenated with any other string (written on a separate line).
-MarshallerImpl.UnsupportedResult = Par\u00E1metro javax.xml.parser.transform.Result no soportado.
-
-MarshallerImpl.UnsupportedEncoding = codificaci\u00F3n no soportada: {0}
-
-MarshallerImpl.NullWriterParam = El par\u00E1metro de escritor StAX no debe ser nulo
-
-SAXMarshaller.AssertFailed = fallo de afirmaci\u00F3n
-
-# Printed after [ERROR]: string.
-SAXMarshaller.MissingObject = falta un objeto necesario
-
-# Usage not found. TODO Remove
-#SAXMarshaller.MissingObject2 = \
-# a required field "{0}" is missing an object
-
-SAXMarshaller.DanglingIDREF = Un \u00E1rbol contiene una referencia al identificador "{0}", pero no forma parte del gr\u00E1fico del objeto
-
-SAXMarshaller.NotIdentifiable = Se hace referencia a un objeto como IDREF, pero su campo de identificador es nulo
-
-SAX2DOMEx.DomImplDoesntSupportCreateElementNs = Se ha interrumpido la implantaci\u00F3n de DOM ({0} desde {1}). No soporta el m\u00E9todo createElementNS.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_fr.properties
deleted file mode 100644
index d5315c15..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_fr.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# Wrapped into a JAXBException. Not concatenated with any other string.
-MarshallerImpl.NotMarshallable = Il n'est pas possible d'utiliser la m\u00E9thode marshal() avec le param\u00E8tre d'objet
-
-# Not concatenated with any other string (written on a separate line).
-MarshallerImpl.UnsupportedResult = param\u00E8tre javax.xml.parser.transform.Result non pris en charge
-
-MarshallerImpl.UnsupportedEncoding = encodage non pris en charge : {0}
-
-MarshallerImpl.NullWriterParam = Le param\u00E8tre de processus d'\u00E9criture StAX ne doit pas \u00EAtre NULL
-
-SAXMarshaller.AssertFailed = \u00E9chec de l'assertion
-
-# Printed after [ERROR]: string.
-SAXMarshaller.MissingObject = un objet obligatoire est manquant
-
-# Usage not found. TODO Remove
-#SAXMarshaller.MissingObject2 = \
-# a required field "{0}" is missing an object
-
-SAXMarshaller.DanglingIDREF = Une arborescence contient une r\u00E9f\u00E9rence \u00E0 l''ID "{0}", mais elle ne fait pas partie du graphique d''objet
-
-SAXMarshaller.NotIdentifiable = Un objet est r\u00E9f\u00E9renc\u00E9 en tant qu'IDREF mais son champ d'ID est NULL
-
-SAX2DOMEx.DomImplDoesntSupportCreateElementNs = L''impl\u00E9mentation DOM ({0} \u00E0 partir de {1}) est interrompue. Elle ne prend pas en charge la m\u00E9thode createElementNS.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_it.properties
deleted file mode 100644
index 4f8028e6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_it.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# Wrapped into a JAXBException. Not concatenated with any other string.
-MarshallerImpl.NotMarshallable = impossibile eseguire il marshalling del parametro dell'oggetto di cui eseguire il marshalling ()
-
-# Not concatenated with any other string (written on a separate line).
-MarshallerImpl.UnsupportedResult = parametro javax.xml.parser.transform.Result non supportato
-
-MarshallerImpl.UnsupportedEncoding = codifica non supportata: {0}
-
-MarshallerImpl.NullWriterParam = il parametro del processo di scrittura StAX non deve essere nullo
-
-SAXMarshaller.AssertFailed = asserzione non riuscita
-
-# Printed after [ERROR]: string.
-SAXMarshaller.MissingObject = oggetto richiesto mancante
-
-# Usage not found. TODO Remove
-#SAXMarshaller.MissingObject2 = \
-# a required field "{0}" is missing an object
-
-SAXMarshaller.DanglingIDREF = Una struttura contiene un riferimento all''ID "{0}" ma non fa parte del grafico dell''oggetto
-
-SAXMarshaller.NotIdentifiable = Viene fatto riferimento a un oggetto come IDREF ma il relativo campo ID \u00E8 nullo
-
-SAX2DOMEx.DomImplDoesntSupportCreateElementNs = Implementazione DOM ({0} da {1}) interrotta. Non supporta il metodo createElementNS.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_ja.properties
deleted file mode 100644
index 16a43a3f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_ja.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# Wrapped into a JAXBException. Not concatenated with any other string.
-MarshallerImpl.NotMarshallable = marshal()\u306Eobject\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u53EF\u80FD\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-
-# Not concatenated with any other string (written on a separate line).
-MarshallerImpl.UnsupportedResult = \u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044javax.xml.parser.transform.Result\u30D1\u30E9\u30E1\u30FC\u30BF
-
-MarshallerImpl.UnsupportedEncoding = \u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0: {0}
-
-MarshallerImpl.NullWriterParam = StAX writer\u30D1\u30E9\u30E1\u30FC\u30BF\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093
-
-SAXMarshaller.AssertFailed = \u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-
-# Printed after [ERROR]: string.
-SAXMarshaller.MissingObject = \u5FC5\u9808\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u3042\u308A\u307E\u305B\u3093
-
-# Usage not found. TODO Remove
-#SAXMarshaller.MissingObject2 = \
-# a required field "{0}" is missing an object
-
-SAXMarshaller.DanglingIDREF = \u30C4\u30EA\u30FC\u306BID "{0}"\u3078\u306E\u53C2\u7167\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u30FB\u30B0\u30E9\u30D5\u306E\u4E00\u90E8\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-
-SAXMarshaller.NotIdentifiable = \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306FIDREF\u3068\u3057\u3066\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001ID\u30D5\u30A3\u30FC\u30EB\u30C9\u304Cnull\u3067\u3059
-
-SAX2DOMEx.DomImplDoesntSupportCreateElementNs = DOM\u5B9F\u88C5({1}\u304B\u3089\u306E{0})\u304C\u58CA\u308C\u3066\u3044\u307E\u3059\u3002createElementNS\u30E1\u30BD\u30C3\u30C9\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_ko.properties
deleted file mode 100644
index 7fde2241..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_ko.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# Wrapped into a JAXBException. Not concatenated with any other string.
-MarshallerImpl.NotMarshallable = \uAC1D\uCCB4 \uB9E4\uAC1C\uBCC0\uC218\uC5D0 \uB300\uD574\uC11C\uB294 marshal() \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-# Not concatenated with any other string (written on a separate line).
-MarshallerImpl.UnsupportedResult = \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 javax.xml.parser.transform.Result \uB9E4\uAC1C\uBCC0\uC218
-
-MarshallerImpl.UnsupportedEncoding = \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC778\uCF54\uB529: {0}
-
-MarshallerImpl.NullWriterParam = StAX \uC4F0\uAE30 \uC7A5\uCE58 \uB9E4\uAC1C\uBCC0\uC218\uB294 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-SAXMarshaller.AssertFailed = \uBA85\uC81C\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-
-# Printed after [ERROR]: string.
-SAXMarshaller.MissingObject = \uD544\uC218 \uAC1D\uCCB4\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-# Usage not found. TODO Remove
-#SAXMarshaller.MissingObject2 = \
-# a required field "{0}" is missing an object
-
-SAXMarshaller.DanglingIDREF = \uD2B8\uB9AC\uAC00 ID "{0}"\uC5D0 \uB300\uD55C \uCC38\uC870\uB97C \uD3EC\uD568\uD558\uACE0 \uC788\uC9C0\uB9CC \uAC1D\uCCB4 \uADF8\uB798\uD504\uC5D0 \uC18D\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-SAXMarshaller.NotIdentifiable = \uAC1D\uCCB4\uAC00 IDREF\uB85C \uCC38\uC870\uB418\uC5C8\uC9C0\uB9CC \uD574\uB2F9 ID \uD544\uB4DC\uAC00 \uB110\uC785\uB2C8\uB2E4.
-
-SAX2DOMEx.DomImplDoesntSupportCreateElementNs = DOM \uAD6C\uD604({1}\uC758 {0})\uC774 \uC911\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. createElementNS \uBA54\uC18C\uB4DC\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_pt_BR.properties
deleted file mode 100644
index 75bf4171..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_pt_BR.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# Wrapped into a JAXBException. Not concatenated with any other string.
-MarshallerImpl.NotMarshallable = o par\u00E2metro do objeto para fazer marshal() n\u00E3o pode ser submetido a marshal
-
-# Not concatenated with any other string (written on a separate line).
-MarshallerImpl.UnsupportedResult = par\u00E2metro javax.xml.parser.transform.Result n\u00E3o suportado
-
-MarshallerImpl.UnsupportedEncoding = codifica\u00E7\u00E3o n\u00E3o suportada: {0}
-
-MarshallerImpl.NullWriterParam = o par\u00E2metro do gravador StAX n\u00E3o deve ser nulo
-
-SAXMarshaller.AssertFailed = falha na asser\u00E7\u00E3o
-
-# Printed after [ERROR]: string.
-SAXMarshaller.MissingObject = n\u00E3o foi encontrado um objeto obrigat\u00F3rio
-
-# Usage not found. TODO Remove
-#SAXMarshaller.MissingObject2 = \
-# a required field "{0}" is missing an object
-
-SAXMarshaller.DanglingIDREF = Uma \u00E1rvore cont\u00E9m uma refer\u00EAncia ao ID "{0}", mas n\u00E3o faz parte do gr\u00E1fico do objeto
-
-SAXMarshaller.NotIdentifiable = Um objeto \u00E9 mencionado como IDREF, mas seu campo ID \u00E9 nulo
-
-SAX2DOMEx.DomImplDoesntSupportCreateElementNs = A implementa\u00E7\u00E3o DOM ({0} de {1}) foi interrompida. Ela n\u00E3o suporta o m\u00E9todo createElementNS.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_zh_CN.properties
deleted file mode 100644
index 9c1479cc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_zh_CN.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# Wrapped into a JAXBException. Not concatenated with any other string.
-MarshallerImpl.NotMarshallable = \u65E0\u6CD5\u4F7F\u7528\u5E26\u6709\u5BF9\u8C61\u53C2\u6570\u7684 marshal()
-
-# Not concatenated with any other string (written on a separate line).
-MarshallerImpl.UnsupportedResult = \u4E0D\u652F\u6301 javax.xml.parser.transform.Result \u53C2\u6570
-
-MarshallerImpl.UnsupportedEncoding = \u4E0D\u652F\u6301\u7684\u7F16\u7801: {0}
-
-MarshallerImpl.NullWriterParam = StAX \u5199\u8FDB\u7A0B\u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A\u503C
-
-SAXMarshaller.AssertFailed = \u65AD\u8A00\u5931\u8D25
-
-# Printed after [ERROR]: string.
-SAXMarshaller.MissingObject = \u7F3A\u5C11\u5FC5\u9700\u7684\u5BF9\u8C61
-
-# Usage not found. TODO Remove
-#SAXMarshaller.MissingObject2 = \
-# a required field "{0}" is missing an object
-
-SAXMarshaller.DanglingIDREF = \u6811\u5305\u542B\u5BF9 ID "{0}" \u7684\u5F15\u7528, \u4F46\u4E0D\u662F\u5BF9\u8C61\u56FE\u7684\u4E00\u90E8\u5206
-
-SAXMarshaller.NotIdentifiable = \u5BF9\u8C61\u5C06\u4F5C\u4E3A IDREF \u5F15\u7528, \u4F46\u5176 ID \u5B57\u6BB5\u4E3A\u7A7A\u503C
-
-SAX2DOMEx.DomImplDoesntSupportCreateElementNs = DOM \u5B9E\u73B0 ({0}\u6765\u81EA{1}) \u5DF2\u4E2D\u65AD\u3002\u5B83\u4E0D\u652F\u6301 createElementNS \u65B9\u6CD5\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_zh_TW.properties
deleted file mode 100644
index 7f3cdb7a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_zh_TW.properties
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# Wrapped into a JAXBException. Not concatenated with any other string.
-MarshallerImpl.NotMarshallable = marshal() \u7684\u7269\u4EF6\u53C3\u6578\u7121\u6CD5\u5C01\u9001\u8655\u7406
-
-# Not concatenated with any other string (written on a separate line).
-MarshallerImpl.UnsupportedResult = \u4E0D\u652F\u63F4\u7684 javax.xml.parser.transform.Result \u53C3\u6578
-
-MarshallerImpl.UnsupportedEncoding = \u4E0D\u652F\u63F4\u7684\u7DE8\u78BC: {0}
-
-MarshallerImpl.NullWriterParam = StAX \u5BEB\u5165\u5668\u53C3\u6578\u4E0D\u5F97\u70BA\u7A7A\u503C
-
-SAXMarshaller.AssertFailed = \u5BA3\u544A\u5931\u6557
-
-# Printed after [ERROR]: string.
-SAXMarshaller.MissingObject = \u907A\u6F0F\u5FC5\u8981\u7684\u7269\u4EF6
-
-# Usage not found. TODO Remove
-#SAXMarshaller.MissingObject2 = \
-# a required field "{0}" is missing an object
-
-SAXMarshaller.DanglingIDREF = \u6A39\u72C0\u7D50\u69CB\u5305\u542B ID "{0}" \u7684\u53C3\u7167, \u4F46\u5B83\u4E0D\u662F\u7269\u4EF6\u5716\u8868\u7684\u4E00\u90E8\u5206
-
-SAXMarshaller.NotIdentifiable = \u7269\u4EF6\u88AB\u53C3\u7167\u70BA IDREF, \u4F46\u5176 ID \u6B04\u4F4D\u70BA\u7A7A\u503C
-
-SAX2DOMEx.DomImplDoesntSupportCreateElementNs = DOM \u5BE6\u884C ({1} \u7684 {0}) \u640D\u58DE. \u5B83\u4E0D\u652F\u63F4 createElementNS \u65B9\u6CD5.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/MinimumEscapeHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/MinimumEscapeHandler.java
deleted file mode 100644
index c062961c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/MinimumEscapeHandler.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.marshaller;
-
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * Performs no character escaping. Usable only when the output encoding
- * is UTF, but this handler gives the maximum performance.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class MinimumEscapeHandler implements CharacterEscapeHandler {
-
- private MinimumEscapeHandler() {} // no instanciation please
-
- public static final CharacterEscapeHandler theInstance = new MinimumEscapeHandler();
-
- public void escape(char[] ch, int start, int length, boolean isAttVal, Writer out) throws IOException {
- // avoid calling the Writerwrite method too much by assuming
- // that the escaping occurs rarely.
- // profiling revealed that this is faster than the naive code.
- int limit = start+length;
- for (int i = start; i < limit; i++) {
- char c = ch[i];
- if(c == '&' || c == '<' || c == '>' || c == '\r' || (c == '\"' && isAttVal) ) {
- if(i!=start)
- out.write(ch,start,i-start);
- start = i+1;
- switch (ch[i]) {
- case '&':
- out.write("&amp;");
- break;
- case '<':
- out.write("&lt;");
- break;
- case '>':
- out.write("&gt;");
- break;
- case '\"':
- out.write("&quot;");
- break;
- }
- }
- }
-
- if( start!=limit )
- out.write(ch,start,limit-start);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/NamespacePrefixMapper.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/NamespacePrefixMapper.java
deleted file mode 100644
index a3f7422e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/NamespacePrefixMapper.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.marshaller;
-
-import java.io.OutputStream;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.stream.XMLEventWriter;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.dom.DOMResult;
-
-import org.w3c.dom.Node;
-
-// be careful about changing this class. this class is supposed to be
-// extended by users and therefore we are not allowed to break
-// those user code.
-//
-// this means:
-// - don't add any abstract method
-// - don't change any existing method signature
-// - don't remove any existing method.
-
-/**
- * Implemented by the user application to determine URI -> prefix
- * mapping.
- *
- * This is considered as an interface, though it's implemented
- * as an abstract class to make it easy to add new methods in
- * a future.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class NamespacePrefixMapper {
-
- private static final String[] EMPTY_STRING = new String[0];
-
- /**
- * Returns a preferred prefix for the given namespace URI.
- *
- * This method is intended to be overrided by a derived class.
- *
- * <p>
- * As noted in the return value portion of the javadoc, there
- * are several cases where the preference cannot be honored.
- * Specifically, as of JAXB RI 2.0 and onward:
- *
- * <ol>
- * <li>
- * If the prefix returned is already in use as one of the in-scope
- * namespace bindings. This is partly necessary for correctness
- * (so that we don't unexpectedly change the meaning of QNames
- * bound to {@link String}), partly to simplify the marshaller.
- * <li>
- * If the prefix returned is "" yet the current {@link JAXBContext}
- * includes classes that use the empty namespace URI. This allows
- * the JAXB RI to reserve the "" prefix for the empty namespace URI,
- * which is the only possible prefix for the URI.
- * This restriction is also to simplify the marshaller.
- * </ol>
- *
- * @param namespaceUri
- * The namespace URI for which the prefix needs to be found.
- * Never be null. "" is used to denote the default namespace.
- * @param suggestion
- * When the content tree has a suggestion for the prefix
- * to the given namespaceUri, that suggestion is passed as a
- * parameter. Typicall this value comes from the QName.getPrefix
- * to show the preference of the content tree. This parameter
- * may be null, and this parameter may represent an already
- * occupied prefix.
- * @param requirePrefix
- * If this method is expected to return non-empty prefix.
- * When this flag is true, it means that the given namespace URI
- * cannot be set as the default namespace.
- *
- * @return
- * null if there's no prefered prefix for the namespace URI.
- * In this case, the system will generate a prefix for you.
- *
- * Otherwise the system will try to use the returned prefix,
- * but generally there's no guarantee if the prefix will be
- * actually used or not.
- *
- * return "" to map this namespace URI to the default namespace.
- * Again, there's no guarantee that this preference will be
- * honored.
- *
- * If this method returns "" when requirePrefix=true, the return
- * value will be ignored and the system will generate one.
- *
- * @since JAXB 1.0.1
- */
- public abstract String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix);
-
- /**
- * Returns a list of namespace URIs that should be declared
- * at the root element.
- *
- * <p>
- * By default, the JAXB RI 1.0.x produces namespace declarations only when
- * they are necessary, only at where they are used. Because of this
- * lack of look-ahead, sometimes the marshaller produces a lot of
- * namespace declarations that look redundant to human eyes. For example,
- * <pre><xmp>
- * <?xml version="1.0"?>
- * <root>
- * <ns1:child xmlns:ns1="urn:foo"> ... </ns1:child>
- * <ns2:child xmlns:ns2="urn:foo"> ... </ns2:child>
- * <ns3:child xmlns:ns3="urn:foo"> ... </ns3:child>
- * ...
- * </root>
- * </xmp></pre>
- *
- * <p>
- * The JAXB RI 2.x mostly doesn't exhibit this behavior any more,
- * as it declares all statically known namespace URIs (those URIs
- * that are used as element/attribute names in JAXB annotations),
- * but it may still declare additional namespaces in the middle of
- * a document, for example when (i) a QName as an attribute/element value
- * requires a new namespace URI, or (ii) DOM nodes as a portion of an object
- * tree requires a new namespace URI.
- *
- * <p>
- * If you know in advance that you are going to use a certain set of
- * namespace URIs, you can override this method and have the marshaller
- * declare those namespace URIs at the root element.
- *
- * <p>
- * For example, by returning <code>new String[]{"urn:foo"}</code>,
- * the marshaller will produce:
- * <pre><xmp>
- * <?xml version="1.0"?>
- * <root xmlns:ns1="urn:foo">
- * <ns1:child> ... </ns1:child>
- * <ns1:child> ... </ns1:child>
- * <ns1:child> ... </ns1:child>
- * ...
- * </root>
- * </xmp></pre>
- * <p>
- * To control prefixes assigned to those namespace URIs, use the
- * {@link #getPreferredPrefix(String, String, boolean)} method.
- *
- * @return
- * A list of namespace URIs as an array of {@link String}s.
- * This method can return a length-zero array but not null.
- * None of the array component can be null. To represent
- * the empty namespace, use the empty string <code>""</code>.
- *
- * @since
- * JAXB RI 1.0.2
- */
- public String[] getPreDeclaredNamespaceUris() {
- return EMPTY_STRING;
- }
-
- /**
- * Similar to {@link #getPreDeclaredNamespaceUris()} but allows the
- * (prefix,nsUri) pairs to be returned.
- *
- * <p>
- * With {@link #getPreDeclaredNamespaceUris()}, applications who wish to control
- * the prefixes as well as the namespaces needed to implement both
- * {@link #getPreDeclaredNamespaceUris()} and {@link #getPreferredPrefix(String, String, boolean)}.
- *
- * <p>
- * This version eliminates the needs by returning an array of pairs.
- *
- * @return
- * always return a non-null (but possibly empty) array. The array stores
- * data like (prefix1,nsUri1,prefix2,nsUri2,...) Use an empty string to represent
- * the empty namespace URI and the default prefix. Null is not allowed as a value
- * in the array.
- *
- * @since
- * JAXB RI 2.0 beta
- */
- public String[] getPreDeclaredNamespaceUris2() {
- return EMPTY_STRING;
- }
-
- /**
- * Returns a list of (prefix,namespace URI) pairs that represents
- * namespace bindings available on ancestor elements (that need not be repeated
- * by the JAXB RI.)
- *
- * <p>
- * Sometimes JAXB is used to marshal an XML document, which will be
- * used as a subtree of a bigger document. When this happens, it's nice
- * for a JAXB marshaller to be able to use in-scope namespace bindings
- * of the larger document and avoid declaring redundant namespace URIs.
- *
- * <p>
- * This is automatically done when you are marshalling to {@link XMLStreamWriter},
- * {@link XMLEventWriter}, {@link DOMResult}, or {@link Node}, because
- * those output format allows us to inspect what's currently available
- * as in-scope namespace binding. However, with other output format,
- * such as {@link OutputStream}, the JAXB RI cannot do this automatically.
- * That's when this method comes into play.
- *
- * <p>
- * Namespace bindings returned by this method will be used by the JAXB RI,
- * but will not be re-declared. They are assumed to be available when you insert
- * this subtree into a bigger document.
- *
- * <p>
- * It is <b>NOT</b> OK to return the same binding, or give
- * the receiver a conflicting binding information.
- * It's a responsibility of the caller to make sure that this doesn't happen
- * even if the ancestor elements look like:
- * <pre><xmp>
- * <foo:abc xmlns:foo="abc">
- * <foo:abc xmlns:foo="def">
- * <foo:abc xmlns:foo="abc">
- * ... JAXB marshalling into here.
- * </foo:abc>
- * </foo:abc>
- * </foo:abc>
- * </xmp></pre>
- *
- * @return
- * always return a non-null (but possibly empty) array. The array stores
- * data like (prefix1,nsUri1,prefix2,nsUri2,...) Use an empty string to represent
- * the empty namespace URI and the default prefix. Null is not allowed as a value
- * in the array.
- *
- * @since JAXB RI 2.0 beta
- */
- public String[] getContextualNamespaceDecls() {
- return EMPTY_STRING;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/NioEscapeHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/NioEscapeHandler.java
deleted file mode 100644
index df695f3c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/NioEscapeHandler.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.marshaller;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
-
-/**
- * Uses JDK1.4 NIO functionality to escape characters smartly.
- *
- * @since 1.0.1
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class NioEscapeHandler implements CharacterEscapeHandler {
-
- private final CharsetEncoder encoder;
-
- // exposing those variations upset javac 1.3.1, since it needs to
- // know about those classes to determine which overloaded version
- // of the method it wants to use. So comment it out for the compatibility.
-
-// public NioEscapeHandler(CharsetEncoder _encoder) {
-// this.encoder = _encoder;
-// if(encoder==null)
-// throw new NullPointerException();
-// }
-//
-// public NioEscapeHandler(Charset charset) {
-// this(charset.newEncoder());
-// }
-
- public NioEscapeHandler(String charsetName) {
-// this(Charset.forName(charsetName));
- this.encoder = Charset.forName(charsetName).newEncoder();
- }
-
- public void escape(char[] ch, int start, int length, boolean isAttVal, Writer out) throws IOException {
- int limit = start+length;
- for (int i = start; i < limit; i++) {
- switch (ch[i]) {
- case '&':
- out.write("&amp;");
- break;
- case '<':
- out.write("&lt;");
- break;
- case '>':
- out.write("&gt;");
- break;
- case '\"':
- if (isAttVal) {
- out.write("&quot;");
- } else {
- out.write('\"');
- }
- break;
- default:
- if( encoder.canEncode(ch[i]) ) {
- out.write(ch[i]);
- } else {
- out.write("&#");
- out.write(Integer.toString(ch[i]));
- out.write(';');
- }
- }
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/SAX2DOMEx.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/SAX2DOMEx.java
deleted file mode 100644
index 4aed2860..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/SAX2DOMEx.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.marshaller;
-
-import java.util.Stack;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import com.sun.xml.internal.bind.util.Which;
-import com.sun.istack.internal.FinalArrayList;
-
-import com.sun.xml.internal.bind.v2.util.XmlFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-
-/**
- * Builds a DOM tree from SAX2 events.
- *
- * @author Vivek Pandey
- * @since 1.0
- */
-public class SAX2DOMEx implements ContentHandler {
-
- private Node node = null;
- private boolean isConsolidate;
- protected final Stack<Node> nodeStack = new Stack<Node>();
- private final FinalArrayList<String> unprocessedNamespaces = new FinalArrayList<String>();
- /**
- * Document object that owns the specified node.
- */
- protected final Document document;
-
- /**
- * @param node
- * Nodes will be created and added under this object.
- */
- public SAX2DOMEx(Node node) {
- this(node, false);
- }
-
- /**
- * @param node
- * Nodes will be created and added under this object.
- */
- public SAX2DOMEx(Node node, boolean isConsolidate) {
- this.node = node;
- this.isConsolidate = isConsolidate;
- nodeStack.push(this.node);
-
- if (node instanceof Document) {
- this.document = (Document) node;
- } else {
- this.document = node.getOwnerDocument();
- }
- }
-
- /**
- * Creates a fresh empty DOM document and adds nodes under this document.
- */
- public SAX2DOMEx(DocumentBuilderFactory f) throws ParserConfigurationException {
- f.setValidating(false);
- document = f.newDocumentBuilder().newDocument();
- node = document;
- nodeStack.push(document);
- }
-
- /**
- * Creates a fresh empty DOM document and adds nodes under this document.
- * @deprecated
- */
- public SAX2DOMEx() throws ParserConfigurationException {
- DocumentBuilderFactory factory = XmlFactory.createDocumentBuilderFactory(false);
- factory.setValidating(false);
-
- document = factory.newDocumentBuilder().newDocument();
- node = document;
- nodeStack.push(document);
- }
-
- public final Element getCurrentElement() {
- return (Element) nodeStack.peek();
- }
-
- public Node getDOM() {
- return node;
- }
-
- public void startDocument() {
- }
-
- public void endDocument() {
- }
-
- protected void namespace(Element element, String prefix, String uri) {
- String qname;
- if ("".equals(prefix) || prefix == null) {
- qname = "xmlns";
- } else {
- qname = "xmlns:" + prefix;
- }
-
- // older version of Xerces (I confirmed that the bug is gone with Xerces 2.4.0)
- // have a problem of re-setting the same namespace attribute twice.
- // work around this bug removing it first.
- if (element.hasAttributeNS("http://www.w3.org/2000/xmlns/", qname)) {
- // further workaround for an old Crimson bug where the removeAttribtueNS
- // method throws NPE when the element doesn't have any attribute.
- // to be on the safe side, check the existence of attributes before
- // attempting to remove it.
- // for details about this bug, see org.apache.crimson.tree.ElementNode2
- // line 540 or the following message:
- // https://jaxb.dev.java.net/servlets/ReadMsg?list=users&msgNo=2767
- element.removeAttributeNS("http://www.w3.org/2000/xmlns/", qname);
- }
- // workaround until here
-
- element.setAttributeNS("http://www.w3.org/2000/xmlns/", qname, uri);
- }
-
- public void startElement(String namespace, String localName, String qName, Attributes attrs) {
- Node parent = nodeStack.peek();
-
- // some broken DOM implementation (we confirmed it with SAXON)
- // return null from this method.
- Element element = document.createElementNS(namespace, qName);
-
- if (element == null) {
- // if so, report an user-friendly error message,
- // rather than dying mysteriously with NPE.
- throw new AssertionError(
- Messages.format(Messages.DOM_IMPL_DOESNT_SUPPORT_CREATELEMENTNS,
- document.getClass().getName(),
- Which.which(document.getClass())));
- }
-
- // process namespace bindings
- for (int i = 0; i < unprocessedNamespaces.size(); i += 2) {
- String prefix = unprocessedNamespaces.get(i);
- String uri = unprocessedNamespaces.get(i + 1);
-
- namespace(element, prefix, uri);
- }
- unprocessedNamespaces.clear();
-
-
- if (attrs != null) {
- int length = attrs.getLength();
- for (int i = 0; i < length; i++) {
- String namespaceuri = attrs.getURI(i);
- String value = attrs.getValue(i);
- String qname = attrs.getQName(i);
- element.setAttributeNS(namespaceuri, qname, value);
- }
- }
- // append this new node onto current stack node
- parent.appendChild(element);
- // push this node onto stack
- nodeStack.push(element);
- }
-
- public void endElement(String namespace, String localName, String qName) {
- nodeStack.pop();
- }
-
- public void characters(char[] ch, int start, int length) {
- characters(new String(ch, start, length));
- }
-
- protected Text characters(String s) {
- Node parent = nodeStack.peek();
- Node lastChild = parent.getLastChild();
- Text text;
- if (isConsolidate && lastChild != null && lastChild.getNodeType() == Node.TEXT_NODE) {
- text = (Text) lastChild;
- text.appendData(s);
- } else {
- text = document.createTextNode(s);
- parent.appendChild(text);
- }
- return text;
- }
-
- public void ignorableWhitespace(char[] ch, int start, int length) {
- }
-
- public void processingInstruction(String target, String data) throws org.xml.sax.SAXException {
- Node parent = nodeStack.peek();
- Node n = document.createProcessingInstruction(target, data);
- parent.appendChild(n);
- }
-
- public void setDocumentLocator(Locator locator) {
- }
-
- public void skippedEntity(String name) {
- }
-
- public void startPrefixMapping(String prefix, String uri) {
- unprocessedNamespaces.add(prefix);
- unprocessedNamespaces.add(uri);
- }
-
- public void endPrefixMapping(String prefix) {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/XMLWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/XMLWriter.java
deleted file mode 100644
index 6d39a04b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/XMLWriter.java
+++ /dev/null
@@ -1,976 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// @@3RD PARTY CODE@@
-
-// XMLWriter.java - serialize an XML document.
-// Written by David Megginson, david@megginson.com
-// NO WARRANTY! This class is in the public domain.
-
-// Id: XMLWriter.java,v 1.5 2000/09/17 01:08:16 david Exp
-
-package com.sun.xml.internal.bind.marshaller;
-
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-
-/**
- * Filter to write an XML document from a SAX event stream.
- *
- * <p>This class can be used by itself or as part of a SAX event
- * stream: it takes as input a series of SAX2 ContentHandler
- * events and uses the information in those events to write
- * an XML document. Since this class is a filter, it can also
- * pass the events on down a filter chain for further processing
- * (you can use the XMLWriter to take a snapshot of the current
- * state at any point in a filter chain), and it can be
- * used directly as a ContentHandler for a SAX2 XMLReader.</p>
- *
- * <p>The client creates a document by invoking the methods for
- * standard SAX2 events, always beginning with the
- * {@link #startDocument startDocument} method and ending with
- * the {@link #endDocument endDocument} method. There are convenience
- * methods provided so that clients to not have to create empty
- * attribute lists or provide empty strings as parameters; for
- * example, the method invocation</p>
- *
- * <pre>
- * w.startElement("foo");
- * </pre>
- *
- * <p>is equivalent to the regular SAX2 ContentHandler method</p>
- *
- * <pre>
- * w.startElement("", "foo", "", new AttributesImpl());
- * </pre>
- *
- * <p>Except that it is more efficient because it does not allocate
- * a new empty attribute list each time. The following code will send
- * a simple XML document to standard output:</p>
- *
- * <pre>
- * XMLWriter w = new XMLWriter();
- *
- * w.startDocument();
- * w.startElement("greeting");
- * w.characters("Hello, world!");
- * w.endElement("greeting");
- * w.endDocument();
- * </pre>
- *
- * <p>The resulting document will look like this:</p>
- *
- * <pre>
- * &lt;?xml version="1.0" standalone="yes"?>
- *
- * &lt;greeting>Hello, world!&lt;/greeting>
- * </pre>
- *
- * <p>In fact, there is an even simpler convenience method,
- * <var>dataElement</var>, designed for writing elements that
- * contain only character data, so the code to generate the
- * document could be shortened to</p>
- *
- * <pre>
- * XMLWriter w = new XMLWriter();
- *
- * w.startDocument();
- * w.dataElement("greeting", "Hello, world!");
- * w.endDocument();
- * </pre>
- *
- * <h2>Whitespace</h2>
- *
- * <p>According to the XML Recommendation, <em>all</em> whitespace
- * in an XML document is potentially significant to an application,
- * so this class never adds newlines or indentation. If you
- * insert three elements in a row, as in</p>
- *
- * <pre>
- * w.dataElement("item", "1");
- * w.dataElement("item", "2");
- * w.dataElement("item", "3");
- * </pre>
- *
- * <p>you will end up with</p>
- *
- * <pre>
- * &lt;item>1&lt;/item>&lt;item>3&lt;/item>&lt;item>3&lt;/item>
- * </pre>
- *
- * <p>You need to invoke one of the <var>characters</var> methods
- * explicitly to add newlines or indentation. Alternatively, you
- * can use {@link DataWriter}, which
- * is derived from this class -- it is optimized for writing
- * purely data-oriented (or field-oriented) XML, and does automatic
- * linebreaks and indentation (but does not support mixed content
- * properly).</p>
- *
- *
- * <h2>Namespace Support</h2>
- *
- * <p>The writer contains extensive support for XML Namespaces, so that
- * a client application does not have to keep track of prefixes and
- * supply <var>xmlns</var> attributes. By default, the XML writer will
- * generate Namespace declarations in the form _NS1, _NS2, etc., wherever
- * they are needed, as in the following example:</p>
- *
- * <pre>
- * w.startDocument();
- * w.emptyElement("http://www.foo.com/ns/", "foo");
- * w.endDocument();
- * </pre>
- *
- * <p>The resulting document will look like this:</p>
- *
- * <pre>
- * &lt;?xml version="1.0" standalone="yes"?>
- *
- * &lt;_NS1:foo xmlns:_NS1="http://www.foo.com/ns/"/>
- * </pre>
- *
- * <p>In many cases, document authors will prefer to choose their
- * own prefixes rather than using the (ugly) default names. The
- * XML writer allows two methods for selecting prefixes:</p>
- *
- * <ol>
- * <li>the qualified name</li>
- * </ol>
- *
- * <p>Whenever the XML writer finds a new Namespace URI, it checks
- * to see if a qualified (prefixed) name is also available; if so
- * it attempts to use the name's prefix (as long as the prefix is
- * not already in use for another Namespace URI).</p>
- *
- * <p>The resulting document will look like this:</p>
- *
- * <pre>
- * &lt;?xml version="1.0" standalone="yes"?>
- *
- * &lt;foo:foo xmlns:foo="http://www.foo.com/ns/"/>
- * </pre>
- *
- * <p>The default Namespace simply uses an empty string as the prefix:</p>
- *
- * <pre>
- * w.setPrefix("http://www.foo.com/ns/", "");
- * w.startDocument();
- * w.emptyElement("http://www.foo.com/ns/", "foo");
- * w.endDocument();
- * </pre>
- *
- * <p>The resulting document will look like this:</p>
- *
- * <pre>
- * &lt;?xml version="1.0" standalone="yes"?>
- *
- * &lt;foo xmlns="http://www.foo.com/ns/"/>
- * </pre>
- *
- * <p>By default, the XML writer will not declare a Namespace until
- * it is actually used. Sometimes, this approach will create
- * a large number of Namespace declarations, as in the following
- * example:</p>
- *
- * <pre>
- * &lt;xml version="1.0" standalone="yes"?>
- *
- * &lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- * &lt;rdf:Description about="http://www.foo.com/ids/books/12345">
- * &lt;dc:title xmlns:dc="http://www.purl.org/dc/">A Dark Night&lt;/dc:title>
- * &lt;dc:creator xmlns:dc="http://www.purl.org/dc/">Jane Smith&lt;/dc:title>
- * &lt;dc:date xmlns:dc="http://www.purl.org/dc/">2000-09-09&lt;/dc:title>
- * &lt;/rdf:Description>
- * &lt;/rdf:RDF>
- * </pre>
- *
- * <p>The "rdf" prefix is declared only once, because the RDF Namespace
- * is used by the root element and can be inherited by all of its
- * descendants; the "dc" prefix, on the other hand, is declared three
- * times, because no higher element uses the Namespace. To solve this
- * problem, you can instruct the XML writer to predeclare Namespaces
- * on the root element even if they are not used there:</p>
- *
- * <pre>
- * w.forceNSDecl("http://www.purl.org/dc/");
- * </pre>
- *
- * <p>Now, the "dc" prefix will be declared on the root element even
- * though it's not needed there, and can be inherited by its
- * descendants:</p>
- *
- * <pre>
- * &lt;xml version="1.0" standalone="yes"?>
- *
- * &lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- * xmlns:dc="http://www.purl.org/dc/">
- * &lt;rdf:Description about="http://www.foo.com/ids/books/12345">
- * &lt;dc:title>A Dark Night&lt;/dc:title>
- * &lt;dc:creator>Jane Smith&lt;/dc:title>
- * &lt;dc:date>2000-09-09&lt;/dc:title>
- * &lt;/rdf:Description>
- * &lt;/rdf:RDF>
- * </pre>
- *
- * <p>This approach is also useful for declaring Namespace prefixes
- * that be used by qualified names appearing in attribute values or
- * character data.</p>
- *
- * @author David Megginson, david@megginson.com
- * @version 0.2
- * @since JAXB1.0
- * @see org.xml.sax.XMLFilter
- * @see org.xml.sax.ContentHandler
- */
-public class XMLWriter extends XMLFilterImpl
-{
-
- ////////////////////////////////////////////////////////////////////
- // Constructors.
- ////////////////////////////////////////////////////////////////////
-
-
-
-
- /**
- * Create a new XML writer.
- *
- * <p>Write to the writer provided.</p>
- *
- * @param writer
- * The output destination, or null to use standard output.
- * @param encoding
- * If non-null string is specified, it is written as a part
- * of the XML declaration.
- */
- public XMLWriter (Writer writer, String encoding, CharacterEscapeHandler _escapeHandler )
- {
- init(writer,encoding);
- this.escapeHandler = _escapeHandler;
- }
-
- public XMLWriter (Writer writer, String encoding ) {
- this( writer, encoding, DumbEscapeHandler.theInstance );
- }
-
-
-
- /**
- * Internal initialization method.
- *
- * <p>All of the public constructors invoke this method.
- *
- * @param writer The output destination, or null to use
- * standard output.
- */
- private void init (Writer writer,String encoding)
- {
- setOutput(writer,encoding);
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Public methods.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Reset the writer.
- *
- * <p>This method is especially useful if the writer throws an
- * exception before it is finished, and you want to reuse the
- * writer for a new document. It is usually a good idea to
- * invoke {@link #flush flush} before resetting the writer,
- * to make sure that no output is lost.</p>
- *
- * <p>This method is invoked automatically by the
- * {@link #startDocument startDocument} method before writing
- * a new document.</p>
- *
- * <p><strong>Note:</strong> this method will <em>not</em>
- * clear the prefix or URI information in the writer or
- * the selected output writer.</p>
- *
- * @see #flush()
- */
- public void reset ()
- {
- elementLevel = 0;
- startTagIsClosed = true;
- }
-
-
- /**
- * Flush the output.
- *
- * <p>This method flushes the output stream. It is especially useful
- * when you need to make certain that the entire document has
- * been written to output but do not want to close the output
- * stream.</p>
- *
- * <p>This method is invoked automatically by the
- * {@link #endDocument endDocument} method after writing a
- * document.</p>
- *
- * @see #reset()
- */
- public void flush ()
- throws IOException
- {
- output.flush();
- }
-
-
- /**
- * Set a new output destination for the document.
- *
- * @param writer The output destination, or null to use
- * standard output.
- * @see #flush()
- */
- public void setOutput (Writer writer,String _encoding)
- {
- if (writer == null) {
- output = new OutputStreamWriter(System.out);
- } else {
- output = writer;
- }
- encoding = _encoding;
- }
-
- /**
- * Set whether the writer should print out the XML declaration
- * (&lt;?xml version='1.0' ... ?>).
- * <p>
- * This option is set to true by default.
- */
- public void setXmlDecl( boolean _writeXmlDecl ) {
- this.writeXmlDecl = _writeXmlDecl;
- }
-
- /**
- * Sets the header string.
- *
- * This string will be written right after the xml declaration
- * without any escaping. Useful for generating a boiler-plate
- * DOCTYPE decl, PIs, and comments.
- *
- * @param _header
- * passing null will work as if the empty string is passed.
- */
- public void setHeader( String _header ) {
- this.header = _header;
- }
-
-
- private final HashMap<String,String> locallyDeclaredPrefix = new HashMap<String,String>();
- public void startPrefixMapping( String prefix, String uri ) throws SAXException {
- locallyDeclaredPrefix.put(prefix,uri);
- }
-
-
- ////////////////////////////////////////////////////////////////////
- // Methods from org.xml.sax.ContentHandler.
- ////////////////////////////////////////////////////////////////////
-
- /**
- * Write the XML declaration at the beginning of the document.
- *
- * Pass the event on down the filter chain for further processing.
- *
- * @exception org.xml.sax.SAXException If there is an error
- * writing the XML declaration, or if a handler further down
- * the filter chain raises an exception.
- * @see org.xml.sax.ContentHandler#startDocument()
- */
- public void startDocument ()
- throws SAXException
- {
- try {
- reset();
-
- if(writeXmlDecl) {
- String e="";
- if(encoding!=null)
- e = " encoding=\""+encoding+'\"';
-
- writeXmlDecl("<?xml version=\"1.0\""+e +" standalone=\"yes\"?>");
- }
-
- if(header!=null)
- write(header);
-
- super.startDocument();
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
- protected void writeXmlDecl(String decl) throws IOException {
- write(decl);
- }
-
-
- /**
- * Write a newline at the end of the document.
- *
- * Pass the event on down the filter chain for further processing.
- *
- * @exception org.xml.sax.SAXException If there is an error
- * writing the newline, or if a handler further down
- * the filter chain raises an exception.
- * @see org.xml.sax.ContentHandler#endDocument()
- */
- public void endDocument ()
- throws SAXException
- {
- try {
- super.endDocument();
- flush();
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
- /**
- * Write a start tag.
- *
- * Pass the event on down the filter chain for further processing.
- *
- * @param uri The Namespace URI, or the empty string if none
- * is available.
- * @param localName The element's local (unprefixed) name (required).
- * @param qName The element's qualified (prefixed) name, or the
- * empty string is none is available. This method will
- * use the qName as a template for generating a prefix
- * if necessary, but it is not guaranteed to use the
- * same qName.
- * @param atts The element's attribute list (must not be null).
- * @exception org.xml.sax.SAXException If there is an error
- * writing the start tag, or if a handler further down
- * the filter chain raises an exception.
- * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
- */
- public void startElement (String uri, String localName,
- String qName, Attributes atts)
- throws SAXException
- {
- try {
- if (!startTagIsClosed) {
- write(">");
- }
- elementLevel++;
-// nsSupport.pushContext();
-
- write('<');
- write(qName);
- writeAttributes(atts);
-
- // declare namespaces specified by the startPrefixMapping methods
- if(!locallyDeclaredPrefix.isEmpty()) {
- for (Map.Entry<String,String> e : locallyDeclaredPrefix.entrySet()) {
- String p = e.getKey();
- String u = e.getValue();
- if (u == null) {
- u = "";
- }
- write(' ');
- if ("".equals(p)) {
- write("xmlns=\"");
- } else {
- write("xmlns:");
- write(p);
- write("=\"");
- }
- char ch[] = u.toCharArray();
- writeEsc(ch, 0, ch.length, true);
- write('\"');
- }
- locallyDeclaredPrefix.clear(); // clear the contents
- }
-
-// if (elementLevel == 1) {
-// forceNSDecls();
-// }
-// writeNSDecls();
- super.startElement(uri, localName, qName, atts);
- startTagIsClosed = false;
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
- /**
- * Write an end tag.
- *
- * Pass the event on down the filter chain for further processing.
- *
- * @param uri The Namespace URI, or the empty string if none
- * is available.
- * @param localName The element's local (unprefixed) name (required).
- * @param qName The element's qualified (prefixed) name, or the
- * empty string is none is available. This method will
- * use the qName as a template for generating a prefix
- * if necessary, but it is not guaranteed to use the
- * same qName.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the end tag, or if a handler further down
- * the filter chain raises an exception.
- * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String, java.lang.String)
- */
- public void endElement (String uri, String localName, String qName)
- throws SAXException
- {
- try {
- if (startTagIsClosed) {
- write("</");
- write(qName);
- write('>');
- } else {
- write("/>");
- startTagIsClosed = true;
- }
- super.endElement(uri, localName, qName);
-// nsSupport.popContext();
- elementLevel--;
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
- /**
- * Write character data.
- *
- * Pass the event on down the filter chain for further processing.
- *
- * @param ch The array of characters to write.
- * @param start The starting position in the array.
- * @param len The number of characters to write.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the characters, or if a handler further down
- * the filter chain raises an exception.
- * @see org.xml.sax.ContentHandler#characters(char[], int, int)
- */
- public void characters (char ch[], int start, int len)
- throws SAXException
- {
- try {
- if (!startTagIsClosed) {
- write('>');
- startTagIsClosed = true;
- }
- writeEsc(ch, start, len, false);
- super.characters(ch, start, len);
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
- /**
- * Write ignorable whitespace.
- *
- * Pass the event on down the filter chain for further processing.
- *
- * @param ch The array of characters to write.
- * @param start The starting position in the array.
- * @param length The number of characters to write.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the whitespace, or if a handler further down
- * the filter chain raises an exception.
- * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
- */
- public void ignorableWhitespace (char ch[], int start, int length)
- throws SAXException
- {
- try {
- writeEsc(ch, start, length, false);
- super.ignorableWhitespace(ch, start, length);
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
-
- /**
- * Write a processing instruction.
- *
- * Pass the event on down the filter chain for further processing.
- *
- * @param target The PI target.
- * @param data The PI data.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the PI, or if a handler further down
- * the filter chain raises an exception.
- * @see org.xml.sax.ContentHandler#processingInstruction(java.lang.String, java.lang.String)
- */
- public void processingInstruction (String target, String data)
- throws SAXException
- {
- try {
- if (!startTagIsClosed) {
- write('>');
- startTagIsClosed = true;
- }
- write("<?");
- write(target);
- write(' ');
- write(data);
- write("?>");
- if (elementLevel < 1) {
- write('\n');
- }
- super.processingInstruction(target, data);
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Convenience methods.
- ////////////////////////////////////////////////////////////////////
-
-
-
- /**
- * Start a new element without a qname or attributes.
- *
- * <p>This method will provide a default empty attribute
- * list and an empty string for the qualified name.
- * It invokes {@link
- * #startElement(String, String, String, Attributes)}
- * directly.</p>
- *
- * @param uri The element's Namespace URI.
- * @param localName The element's local name.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the start tag, or if a handler further down
- * the filter chain raises an exception.
- * @see #startElement(String, String, String, Attributes)
- */
- public void startElement (String uri, String localName)
- throws SAXException
- {
- startElement(uri, localName, "", EMPTY_ATTS);
- }
-
-
- /**
- * Start a new element without a qname, attributes or a Namespace URI.
- *
- * <p>This method will provide an empty string for the
- * Namespace URI, and empty string for the qualified name,
- * and a default empty attribute list. It invokes
- * #startElement(String, String, String, Attributes)}
- * directly.</p>
- *
- * @param localName The element's local name.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the start tag, or if a handler further down
- * the filter chain raises an exception.
- * @see #startElement(String, String, String, Attributes)
- */
- public void startElement (String localName)
- throws SAXException
- {
- startElement("", localName, "", EMPTY_ATTS);
- }
-
-
- /**
- * End an element without a qname.
- *
- * <p>This method will supply an empty string for the qName.
- * It invokes {@link #endElement(String, String, String)}
- * directly.</p>
- *
- * @param uri The element's Namespace URI.
- * @param localName The element's local name.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the end tag, or if a handler further down
- * the filter chain raises an exception.
- * @see #endElement(String, String, String)
- */
- public void endElement (String uri, String localName)
- throws SAXException
- {
- endElement(uri, localName, "");
- }
-
-
- /**
- * End an element without a Namespace URI or qname.
- *
- * <p>This method will supply an empty string for the qName
- * and an empty string for the Namespace URI.
- * It invokes {@link #endElement(String, String, String)}
- * directly.</p>
- *
- * @param localName The element's local name.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the end tag, or if a handler further down
- * the filter chain raises an exception.
- * @see #endElement(String, String, String)
- */
- public void endElement (String localName)
- throws SAXException
- {
- endElement("", localName, "");
- }
-
-
- /**
- * Write an element with character data content.
- *
- * <p>This is a convenience method to write a complete element
- * with character data content, including the start tag
- * and end tag.</p>
- *
- * <p>This method invokes
- * {@link #startElement(String, String, String, Attributes)},
- * followed by
- * {@link #characters(String)}, followed by
- * {@link #endElement(String, String, String)}.</p>
- *
- * @param uri The element's Namespace URI.
- * @param localName The element's local name.
- * @param qName The element's default qualified name.
- * @param atts The element's attributes.
- * @param content The character data content.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the empty tag, or if a handler further down
- * the filter chain raises an exception.
- * @see #startElement(String, String, String, Attributes)
- * @see #characters(String)
- * @see #endElement(String, String, String)
- */
- public void dataElement (String uri, String localName,
- String qName, Attributes atts,
- String content)
- throws SAXException
- {
- startElement(uri, localName, qName, atts);
- characters(content);
- endElement(uri, localName, qName);
- }
-
-
- /**
- * Write an element with character data content but no attributes.
- *
- * <p>This is a convenience method to write a complete element
- * with character data content, including the start tag
- * and end tag. This method provides an empty string
- * for the qname and an empty attribute list.</p>
- *
- * <p>This method invokes
- * {@link #startElement(String, String, String, Attributes)},
- * followed by
- * {@link #characters(String)}, followed by
- * {@link #endElement(String, String, String)}.</p>
- *
- * @param uri The element's Namespace URI.
- * @param localName The element's local name.
- * @param content The character data content.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the empty tag, or if a handler further down
- * the filter chain raises an exception.
- * @see #startElement(String, String, String, Attributes)
- * @see #characters(String)
- * @see #endElement(String, String, String)
- */
- public void dataElement (String uri, String localName, String content)
- throws SAXException
- {
- dataElement(uri, localName, "", EMPTY_ATTS, content);
- }
-
-
- /**
- * Write an element with character data content but no attributes or Namespace URI.
- *
- * <p>This is a convenience method to write a complete element
- * with character data content, including the start tag
- * and end tag. The method provides an empty string for the
- * Namespace URI, and empty string for the qualified name,
- * and an empty attribute list.</p>
- *
- * <p>This method invokes
- * {@link #startElement(String, String, String, Attributes)},
- * followed by
- * {@link #characters(String)}, followed by
- * {@link #endElement(String, String, String)}.</p>
- *
- * @param localName The element's local name.
- * @param content The character data content.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the empty tag, or if a handler further down
- * the filter chain raises an exception.
- * @see #startElement(String, String, String, Attributes)
- * @see #characters(String)
- * @see #endElement(String, String, String)
- */
- public void dataElement (String localName, String content)
- throws SAXException
- {
- dataElement("", localName, "", EMPTY_ATTS, content);
- }
-
-
- /**
- * Write a string of character data, with XML escaping.
- *
- * <p>This is a convenience method that takes an XML
- * String, converts it to a character array, then invokes
- * {@link #characters(char[], int, int)}.</p>
- *
- * @param data The character data.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the string, or if a handler further down
- * the filter chain raises an exception.
- * @see #characters(char[], int, int)
- */
- public void characters (String data) throws SAXException {
- try {
- if (!startTagIsClosed) {
- write('>');
- startTagIsClosed = true;
- }
- char ch[] = data.toCharArray();
- characters(ch, 0, ch.length);
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal methods.
- ////////////////////////////////////////////////////////////////////
-
-
-
-
- /**
- * Write a raw character.
- *
- * @param c The character to write.
- */
- protected final void write (char c) throws IOException {
- output.write(c);
- }
-
-
- /**
- * Write a raw string.
- */
- protected final void write(String s) throws IOException {
- output.write(s);
- }
-
-
- /**
- * Write out an attribute list, escaping values.
- *
- * The names will have prefixes added to them.
- *
- * @param atts The attribute list to write.
- */
- private void writeAttributes (Attributes atts) throws IOException {
- int len = atts.getLength();
- for (int i = 0; i < len; i++) {
- char ch[] = atts.getValue(i).toCharArray();
- write(' ');
- write(atts.getQName(i));
- write("=\"");
- writeEsc(ch, 0, ch.length, true);
- write('"');
- }
- }
-
-
- /**
- * Write an array of data characters with escaping.
- *
- * @param ch The array of characters.
- * @param start The starting position.
- * @param length The number of characters to use.
- * @param isAttVal true if this is an attribute value literal.
- */
- private void writeEsc (char ch[], int start,
- int length, boolean isAttVal)
- throws IOException
- {
- escapeHandler.escape(ch, start, length, isAttVal, output);
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Constants.
- ////////////////////////////////////////////////////////////////////
-
- private final Attributes EMPTY_ATTS = new AttributesImpl();
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal state.
- ////////////////////////////////////////////////////////////////////
-
- private int elementLevel = 0;
- private Writer output;
- private String encoding;
- private boolean writeXmlDecl = true;
- /**
- * This string will be written right after the xml declaration
- * without any escaping. Useful for generating a boiler-plate DOCTYPE decl
- * , PIs, and comments.
- */
- private String header=null;
-
- private final CharacterEscapeHandler escapeHandler;
-
- private boolean startTagIsClosed = true;
-}
-
-// end of XMLWriter.java
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/DOMScanner.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/DOMScanner.java
deleted file mode 100644
index acdf50d7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/DOMScanner.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.unmarshaller;
-
-import java.util.Enumeration;
-
-import javax.xml.bind.ValidationEventLocator;
-import javax.xml.bind.helpers.AbstractUnmarshallerImpl;
-import javax.xml.bind.helpers.ValidationEventLocatorImpl;
-
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.LocatorEx;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.ProcessingInstruction;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-import org.xml.sax.helpers.NamespaceSupport;
-
-/**
- * Visits a W3C DOM tree and generates SAX2 events from it.
- *
- * <p>
- * This class is just intended to be used by {@link AbstractUnmarshallerImpl}.
- * The javax.xml.bind.helpers package is generally a wrong place to put
- * classes like this.
- *
- * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li></ul>
- * @since JAXB1.0
- */
-public class DOMScanner implements LocatorEx,InfosetScanner/*<Node> --- but can't do this to protect 1.0 clients, or can I? */
-{
-
- /** reference to the current node being scanned - used for determining
- * location info for validation events */
- private Node currentNode = null;
-
- /** To save memory, only one instance of AttributesImpl will be used. */
- private final AttributesImpl atts = new AttributesImpl();
-
- /** This handler will receive SAX2 events. */
- private ContentHandler receiver=null;
-
- private Locator locator=this;
-
- public DOMScanner() {
- }
-
-
- /**
- * Configures the locator object that the SAX {@link ContentHandler} will see.
- */
- public void setLocator( Locator loc ) {
- this.locator = loc;
- }
-
- public void scan(Object node) throws SAXException {
- if( node instanceof Document ) {
- scan( (Document)node );
- } else {
- scan( (Element)node );
- }
- }
-
- public void scan( Document doc ) throws SAXException {
- scan( doc.getDocumentElement() );
- }
-
- public void scan( Element e) throws SAXException {
- setCurrentLocation( e );
-
- receiver.setDocumentLocator(locator);
- receiver.startDocument();
-
- NamespaceSupport nss = new NamespaceSupport();
- buildNamespaceSupport( nss, e.getParentNode() );
-
- for( Enumeration en = nss.getPrefixes(); en.hasMoreElements(); ) {
- String prefix = (String)en.nextElement();
- receiver.startPrefixMapping( prefix, nss.getURI(prefix) );
- }
-
- visit(e);
-
- for( Enumeration en = nss.getPrefixes(); en.hasMoreElements(); ) {
- String prefix = (String)en.nextElement();
- receiver.endPrefixMapping( prefix );
- }
-
-
- setCurrentLocation( e );
- receiver.endDocument();
- }
-
- /**
- * Parses a subtree starting from the element e and
- * reports SAX2 events to the specified handler.
- *
- * @deprecated in JAXB 2.0
- * Use {@link #scan(Element)}
- */
- public void parse( Element e, ContentHandler handler ) throws SAXException {
- // it might be better to set receiver at the constructor.
- receiver = handler;
-
- setCurrentLocation( e );
- receiver.startDocument();
-
- receiver.setDocumentLocator(locator);
- visit(e);
-
- setCurrentLocation( e );
- receiver.endDocument();
- }
-
- /**
- * Similar to the parse method but it visits the ancestor nodes
- * and properly emulate the all in-scope namespace declarations.
- *
- * @deprecated in JAXB 2.0
- * Use {@link #scan(Element)}
- */
- public void parseWithContext( Element e, ContentHandler handler ) throws SAXException {
- setContentHandler(handler);
- scan(e);
- }
-
- /**
- * Recursively visit ancestors and build up {@link NamespaceSupport} oject.
- */
- private void buildNamespaceSupport(NamespaceSupport nss, Node node) {
- if(node==null || node.getNodeType()!=Node.ELEMENT_NODE)
- return;
-
- buildNamespaceSupport( nss, node.getParentNode() );
-
- nss.pushContext();
- NamedNodeMap atts = node.getAttributes();
- for( int i=0; i<atts.getLength(); i++ ) {
- Attr a = (Attr)atts.item(i);
- if( "xmlns".equals(a.getPrefix()) ) {
- nss.declarePrefix( a.getLocalName(), a.getValue() );
- continue;
- }
- if( "xmlns".equals(a.getName()) ) {
- nss.declarePrefix( "", a.getValue() );
- continue;
- }
- }
- }
-
- /**
- * Visits an element and its subtree.
- */
- public void visit( Element e ) throws SAXException {
- setCurrentLocation( e );
- final NamedNodeMap attributes = e.getAttributes();
-
- atts.clear();
- int len = attributes==null ? 0: attributes.getLength();
-
- for( int i=len-1; i>=0; i-- ) {
- Attr a = (Attr)attributes.item(i);
- String name = a.getName();
- // start namespace binding
- if(name.startsWith("xmlns")) {
- if(name.length()==5) {
- receiver.startPrefixMapping( "", a.getValue() );
- } else {
- String localName = a.getLocalName();
- if(localName==null) {
- // DOM built without namespace support has this problem
- localName = name.substring(6);
- }
- receiver.startPrefixMapping( localName, a.getValue() );
- }
- continue;
- }
-
- String uri = a.getNamespaceURI();
- if(uri==null) uri="";
-
- String local = a.getLocalName();
- if(local==null) local = a.getName();
- // add other attributes to the attribute list
- // that we will pass to the ContentHandler
- atts.addAttribute(
- uri,
- local,
- a.getName(),
- "CDATA",
- a.getValue());
- }
-
- String uri = e.getNamespaceURI();
- if(uri==null) uri="";
- String local = e.getLocalName();
- String qname = e.getTagName();
- if(local==null) local = qname;
- receiver.startElement( uri, local, qname, atts );
-
- // visit its children
- NodeList children = e.getChildNodes();
- int clen = children.getLength();
- for( int i=0; i<clen; i++ )
- visit(children.item(i));
-
-
-
- setCurrentLocation( e );
- receiver.endElement( uri, local, qname );
-
- // call the endPrefixMapping method
- for( int i=len-1; i>=0; i-- ) {
- Attr a = (Attr)attributes.item(i);
- String name = a.getName();
- if(name.startsWith("xmlns")) {
- if(name.length()==5)
- receiver.endPrefixMapping("");
- else
- receiver.endPrefixMapping(a.getLocalName());
- }
- }
- }
-
- private void visit( Node n ) throws SAXException {
- setCurrentLocation( n );
-
- // if a case statement gets too big, it should be made into a separate method.
- switch(n.getNodeType()) {
- case Node.CDATA_SECTION_NODE:
- case Node.TEXT_NODE:
- String value = n.getNodeValue();
- receiver.characters( value.toCharArray(), 0, value.length() );
- break;
- case Node.ELEMENT_NODE:
- visit( (Element)n );
- break;
- case Node.ENTITY_REFERENCE_NODE:
- receiver.skippedEntity(n.getNodeName());
- break;
- case Node.PROCESSING_INSTRUCTION_NODE:
- ProcessingInstruction pi = (ProcessingInstruction)n;
- receiver.processingInstruction(pi.getTarget(),pi.getData());
- break;
- }
- }
-
- private void setCurrentLocation( Node currNode ) {
- currentNode = currNode;
- }
-
- /**
- * The same as {@link #getCurrentElement()} but
- * better typed.
- */
- public Node getCurrentLocation() {
- return currentNode;
- }
-
- public Object getCurrentElement() {
- return currentNode;
- }
-
- public LocatorEx getLocator() {
- return this;
- }
-
- public void setContentHandler(ContentHandler handler) {
- this.receiver = handler;
- }
-
- public ContentHandler getContentHandler() {
- return this.receiver;
- }
-
-
- // LocatorEx implementation
- public String getPublicId() { return null; }
- public String getSystemId() { return null; }
- public int getLineNumber() { return -1; }
- public int getColumnNumber() { return -1; }
-
- public ValidationEventLocator getLocation() {
- return new ValidationEventLocatorImpl(getCurrentLocation());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/InfosetScanner.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/InfosetScanner.java
deleted file mode 100644
index 6eb67b7d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/InfosetScanner.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.unmarshaller;
-
-import javax.xml.bind.Binder;
-
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.LocatorEx;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-/**
- * Visits a DOM-ish API and generates SAX events.
- *
- * <p>
- * This interface is not tied to any particular DOM API.
- * Used by the {@link Binder}.
- *
- * <p>
- * Since we are parsing a DOM-ish tree, I don't think this
- * scanner itself will ever find an error, so this class
- * doesn't have its own error reporting scheme.
- *
- * <p>
- * This interface <b>MAY NOT</b> be implemented by the generated
- * runtime nor the generated code. We may add new methods on
- * this interface later. This is to be implemented by the static runtime
- * only.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- * @since 2.0
- */
-public interface InfosetScanner<XmlNode> {
- /**
- * Parses the given DOM-ish element/document and generates
- * SAX events.
- *
- * @throws ClassCastException
- * If the type of the node is not known to this implementation.
- *
- * @throws SAXException
- * If the {@link ContentHandler} throws a {@link SAXException}.
- * Do not throw an exception just because the scanner failed
- * (if that can happen we need to change the API.)
- */
- void scan( XmlNode node ) throws SAXException;
-
- /**
- * Sets the {@link ContentHandler}.
- *
- * This handler receives the SAX events.
- */
- void setContentHandler( ContentHandler handler );
- ContentHandler getContentHandler();
-
- /**
- * Gets the current element we are parsing.
- *
- * <p>
- * This method could
- * be called from the {@link ContentHandler#startElement(String, String, String, Attributes)}
- * or {@link ContentHandler#endElement(String, String, String)}.
- *
- * <p>
- * Otherwise the behavior of this method is undefined.
- *
- * @return
- * never return null.
- */
- XmlNode getCurrentElement();
-
- LocatorEx getLocator();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages.java
deleted file mode 100644
index 37a4d81c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.unmarshaller;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- *
- * @since JAXB1.0
- */
-public class Messages
-{
- public static String format( String property ) {
- return format( property, null );
- }
-
- public static String format( String property, Object arg1 ) {
- return format( property, new Object[]{arg1} );
- }
-
- public static String format( String property, Object arg1, Object arg2 ) {
- return format( property, new Object[]{arg1,arg2} );
- }
-
- public static String format( String property, Object arg1, Object arg2, Object arg3 ) {
- return format( property, new Object[]{arg1,arg2,arg3} );
- }
-
- // add more if necessary.
-
- /** Loads a string resource and formats it with specified arguments. */
- public static String format( String property, Object[] args ) {
- String text = ResourceBundle.getBundle(Messages.class.getName()).getString(property);
- return MessageFormat.format(text,args);
- }
-
-//
-//
-// Message resources
-//
-//
- public static final String UNEXPECTED_ENTER_ELEMENT = // arg:2
- "ContentHandlerEx.UnexpectedEnterElement";
-
- public static final String UNEXPECTED_LEAVE_ELEMENT = // arg:2
- "ContentHandlerEx.UnexpectedLeaveElement";
-
- public static final String UNEXPECTED_ENTER_ATTRIBUTE =// arg:2
- "ContentHandlerEx.UnexpectedEnterAttribute";
-
- public static final String UNEXPECTED_LEAVE_ATTRIBUTE =// arg:2
- "ContentHandlerEx.UnexpectedLeaveAttribute";
-
- public static final String UNEXPECTED_TEXT =// arg:1
- "ContentHandlerEx.UnexpectedText";
-
- public static final String UNEXPECTED_LEAVE_CHILD = // 0 args
- "ContentHandlerEx.UnexpectedLeaveChild";
-
- public static final String UNEXPECTED_ROOT_ELEMENT = // 1 arg
- "SAXUnmarshallerHandlerImpl.UnexpectedRootElement";
-
- // Usage not found. TODO Remove
- // public static final String UNEXPECTED_ROOT_ELEMENT2 = // 3 arg
- // "SAXUnmarshallerHandlerImpl.UnexpectedRootElement2";
-
- public static final String UNDEFINED_PREFIX = // 1 arg
- "Util.UndefinedPrefix";
-
- public static final String NULL_READER = // 0 args
- "Unmarshaller.NullReader";
-
- public static final String ILLEGAL_READER_STATE = // 1 arg
- "Unmarshaller.IllegalReaderState";
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages.properties
deleted file mode 100644
index 85f7dc6f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages.properties
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterElement = \
- Unexpected element '{'{0}'}':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveElement = \
- Unexpected end of element '{'{0}'}':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterAttribute = \
- Unexpected attribute '{'{0}'}':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveAttribute = \
- Unexpected end of attribute '{'{0}'}':{1}
-
-ContentHandlerEx.UnexpectedText = \
- Unexpected text "{0}"
-
-# Wrapped into an InternalError. e.g.: java.lang.InternalError: compiler error(unexpectedLeaveChild)
-ContentHandlerEx.UnexpectedLeaveChild = \
- compiler error(unexpectedLeaveChild)
-
-SAXUnmarshallerHandlerImpl.UnexpectedRootElement = \
- unexpected root element {0}
-
-# Usage not found. TODO Remove
-#SAXUnmarshallerHandlerImpl.UnexpectedRootElement2 = \
-# unexpected root element (uri:"{0}", local:"{1}"). Expected elements are {2}
-
-Util.UndefinedPrefix = \
- undefined prefix: {0}
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = \
- reader can not be null
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.IllegalReaderState = \
- reader must be on a START_ELEMENT event, not a {0} event
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_de.properties
deleted file mode 100644
index 3ae3da9b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_de.properties
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterElement = Unerwartetes Element ''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveElement = Unerwartetes Ende von Element ''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterAttribute = Unerwartetes Attribut ''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveAttribute = Unerwartetes Ende von Attribut ''{''{0}''}'':{1}
-
-ContentHandlerEx.UnexpectedText = Unerwarteter Text "{0}"
-
-# Wrapped into an InternalError. e.g.: java.lang.InternalError: compiler error(unexpectedLeaveChild)
-ContentHandlerEx.UnexpectedLeaveChild = Compilerfehler (unexpectedLeaveChild)
-
-SAXUnmarshallerHandlerImpl.UnexpectedRootElement = unerwartetes Root-Element {0}
-
-# Usage not found. TODO Remove
-#SAXUnmarshallerHandlerImpl.UnexpectedRootElement2 = \
-# unexpected root element (uri:"{0}", local:"{1}"). Expected elements are {2}
-
-Util.UndefinedPrefix = unerwartetes Pr\u00E4fix: {0}
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = Reader darf nicht null sein\t
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.IllegalReaderState = Reader muss auf ein START_ELEMENT-Ereignis gesetzt sein und kein {0}-Ereignis
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_es.properties
deleted file mode 100644
index 52ad15b4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_es.properties
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterElement = Elemento ''{''{0}''}'':{1} inesperado
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveElement = Fin de elemento ''{''{0}''}'':{1} inesperado
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterAttribute = Atributo ''{''{0}''}'':{1} inesperado
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveAttribute = Fin de atributo ''{''{0}''}'':{1} inesperado
-
-ContentHandlerEx.UnexpectedText = Texto "{0}" inesperado
-
-# Wrapped into an InternalError. e.g.: java.lang.InternalError: compiler error(unexpectedLeaveChild)
-ContentHandlerEx.UnexpectedLeaveChild = error del compilador (unexpectedLeaveChild)
-
-SAXUnmarshallerHandlerImpl.UnexpectedRootElement = elemento ra\u00EDz {0} inesperado
-
-# Usage not found. TODO Remove
-#SAXUnmarshallerHandlerImpl.UnexpectedRootElement2 = \
-# unexpected root element (uri:"{0}", local:"{1}"). Expected elements are {2}
-
-Util.UndefinedPrefix = prefijo no definido: {0}
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = El lector no puede ser nulo.\t
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.IllegalReaderState = El lector debe estar en un evento START_ELEMENT, no en un evento {0}.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_fr.properties
deleted file mode 100644
index 3060c1d5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_fr.properties
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterElement = El\u00E9ment ''{''{0}''}'':{1} inattendu
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveElement = Fin inattendue de l''\u00E9l\u00E9ment ''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterAttribute = Attribut ''{''{0}''}'':{1} inattendu
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveAttribute = Fin inattendue de l''attribut ''{''{0}''}'':{1}
-
-ContentHandlerEx.UnexpectedText = Texte "{0}" inattendu
-
-# Wrapped into an InternalError. e.g.: java.lang.InternalError: compiler error(unexpectedLeaveChild)
-ContentHandlerEx.UnexpectedLeaveChild = erreur de compilateur (unexpectedLeaveChild)
-
-SAXUnmarshallerHandlerImpl.UnexpectedRootElement = \u00E9l\u00E9ment racine {0} inattendu
-
-# Usage not found. TODO Remove
-#SAXUnmarshallerHandlerImpl.UnexpectedRootElement2 = \
-# unexpected root element (uri:"{0}", local:"{1}"). Expected elements are {2}
-
-Util.UndefinedPrefix = pr\u00E9fixe non d\u00E9fini : {0}
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = le processus de lecture ne peut pas \u00EAtre NULL\t
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.IllegalReaderState = le processus de lecture doit figurer sur un \u00E9v\u00E9nement START_ELEMENT, et non un \u00E9v\u00E9nement {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_it.properties
deleted file mode 100644
index febaafde..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_it.properties
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterElement = Elemento imprevisto ''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveElement = Fine imprevista dell''elemento ''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterAttribute = Attributo imprevisto ''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveAttribute = Fine imprevista dell''attributo ''{''{0}''}'':{1}
-
-ContentHandlerEx.UnexpectedText = Testo imprevisto "{0}"
-
-# Wrapped into an InternalError. e.g.: java.lang.InternalError: compiler error(unexpectedLeaveChild)
-ContentHandlerEx.UnexpectedLeaveChild = errore del compilatore (unexpectedLeaveChild)
-
-SAXUnmarshallerHandlerImpl.UnexpectedRootElement = elemento radice imprevisto {0}
-
-# Usage not found. TODO Remove
-#SAXUnmarshallerHandlerImpl.UnexpectedRootElement2 = \
-# unexpected root element (uri:"{0}", local:"{1}"). Expected elements are {2}
-
-Util.UndefinedPrefix = prefisso non definito: {0}
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = il processo di lettura non pu\u00F2 essere nullo\t
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.IllegalReaderState = il processo di lettura deve trovarsi su un evento START_ELEMENT non su un evento {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_ja.properties
deleted file mode 100644
index fed7c85f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_ja.properties
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterElement = \u4E88\u671F\u3057\u306A\u3044\u8981\u7D20''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveElement = \u4E88\u671F\u3057\u306A\u3044\u8981\u7D20\u306E\u7D42\u308F\u308A''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterAttribute = \u4E88\u671F\u3057\u306A\u3044\u5C5E\u6027''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveAttribute = \u4E88\u671F\u3057\u306A\u3044\u5C5E\u6027\u306E\u7D42\u308F\u308A''{''{0}''}'':{1}
-
-ContentHandlerEx.UnexpectedText = \u4E88\u671F\u3057\u306A\u3044\u30C6\u30AD\u30B9\u30C8"{0}"
-
-# Wrapped into an InternalError. e.g.: java.lang.InternalError: compiler error(unexpectedLeaveChild)
-ContentHandlerEx.UnexpectedLeaveChild = \u30B3\u30F3\u30D1\u30A4\u30EB\u30FB\u30A8\u30E9\u30FC(unexpectedLeaveChild)
-
-SAXUnmarshallerHandlerImpl.UnexpectedRootElement = \u4E88\u671F\u3057\u306A\u3044\u30EB\u30FC\u30C8\u8981\u7D20{0}
-
-# Usage not found. TODO Remove
-#SAXUnmarshallerHandlerImpl.UnexpectedRootElement2 = \
-# unexpected root element (uri:"{0}", local:"{1}"). Expected elements are {2}
-
-Util.UndefinedPrefix = \u672A\u5B9A\u7FA9\u306E\u63A5\u982D\u8F9E: {0}
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = \u30EA\u30FC\u30C0\u30FC\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093\t
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.IllegalReaderState = \u30EA\u30FC\u30C0\u30FC\u306F{0}\u30A4\u30D9\u30F3\u30C8\u3067\u306F\u306A\u304F\u3001START_ELEMENT\u306B\u5B58\u5728\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_ko.properties
deleted file mode 100644
index 9f38fca9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_ko.properties
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterElement = \uC608\uC0C1\uCE58 \uC54A\uC740 ''{''{0}''}'':{1} \uC694\uC18C
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveElement = \uC608\uC0C1\uCE58 \uC54A\uC740 ''{''{0}''}'':{1} \uC694\uC18C\uC758 \uB05D
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterAttribute = \uC608\uC0C1\uCE58 \uC54A\uC740 ''{''{0}''}'':{1} \uC18D\uC131
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveAttribute = \uC608\uC0C1\uCE58 \uC54A\uC740 ''{''{0}''}'':{1} \uC18D\uC131\uC758 \uB05D
-
-ContentHandlerEx.UnexpectedText = \uC608\uC0C1\uCE58 \uC54A\uC740 "{0}" \uD14D\uC2A4\uD2B8
-
-# Wrapped into an InternalError. e.g.: java.lang.InternalError: compiler error(unexpectedLeaveChild)
-ContentHandlerEx.UnexpectedLeaveChild = \uCEF4\uD30C\uC77C\uB7EC \uC624\uB958(unexpectedLeaveChild)
-
-SAXUnmarshallerHandlerImpl.UnexpectedRootElement = \uC608\uC0C1\uCE58 \uC54A\uC740 \uB8E8\uD2B8 \uC694\uC18C {0}
-
-# Usage not found. TODO Remove
-#SAXUnmarshallerHandlerImpl.UnexpectedRootElement2 = \
-# unexpected root element (uri:"{0}", local:"{1}"). Expected elements are {2}
-
-Util.UndefinedPrefix = \uC815\uC758\uB418\uC9C0 \uC54A\uC740 \uC811\uB450\uC5B4: {0}
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = \uC77D\uAE30 \uC7A5\uCE58\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\t
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.IllegalReaderState = \uC77D\uAE30 \uC7A5\uCE58\uB294 {0} \uC774\uBCA4\uD2B8\uAC00 \uC544\uB2CC START_ELEMENT \uC774\uBCA4\uD2B8\uC5D0 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_pt_BR.properties
deleted file mode 100644
index ff2c628b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_pt_BR.properties
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterElement = Elemento "{{0}}":{1} inesperado
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveElement = Fim inesperado do elemento "{{0}}":{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterAttribute = Atributo "{{0}}":{1} inesperado
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveAttribute = Fim inesperado do atributo "{{0}}":{1}
-
-ContentHandlerEx.UnexpectedText = Texto "{0}" inesperado
-
-# Wrapped into an InternalError. e.g.: java.lang.InternalError: compiler error(unexpectedLeaveChild)
-ContentHandlerEx.UnexpectedLeaveChild = erro do compilador (unexpectedLeaveChild)
-
-SAXUnmarshallerHandlerImpl.UnexpectedRootElement = elemento-raiz {0} inesperado
-
-# Usage not found. TODO Remove
-#SAXUnmarshallerHandlerImpl.UnexpectedRootElement2 = \
-# unexpected root element (uri:"{0}", local:"{1}"). Expected elements are {2}
-
-Util.UndefinedPrefix = prefixo indefinido: {0}
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = o leitor n\u00E3o pode ser nulo\t
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.IllegalReaderState = o leitor deve estar em um evento START_ELEMENT, n\u00E3o em um evento {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_zh_CN.properties
deleted file mode 100644
index e718ca7d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_zh_CN.properties
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterElement = \u610F\u5916\u7684\u5143\u7D20 ''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveElement = \u610F\u5916\u7684\u5143\u7D20\u7ED3\u5C3E ''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterAttribute = \u610F\u5916\u7684\u5C5E\u6027 ''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveAttribute = \u610F\u5916\u7684\u5C5E\u6027\u7ED3\u5C3E ''{''{0}''}'':{1}
-
-ContentHandlerEx.UnexpectedText = \u610F\u5916\u7684\u6587\u672C "{0}"
-
-# Wrapped into an InternalError. e.g.: java.lang.InternalError: compiler error(unexpectedLeaveChild)
-ContentHandlerEx.UnexpectedLeaveChild = \u7F16\u8BD1\u5668\u9519\u8BEF (unexpectedLeaveChild)
-
-SAXUnmarshallerHandlerImpl.UnexpectedRootElement = \u610F\u5916\u7684\u6839\u5143\u7D20{0}
-
-# Usage not found. TODO Remove
-#SAXUnmarshallerHandlerImpl.UnexpectedRootElement2 = \
-# unexpected root element (uri:"{0}", local:"{1}"). Expected elements are {2}
-
-Util.UndefinedPrefix = \u672A\u5B9A\u4E49\u7684\u524D\u7F00: {0}
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = \u8BFB\u8FDB\u7A0B\u4E0D\u80FD\u4E3A\u7A7A\u503C\t
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.IllegalReaderState = \u8BFB\u8FDB\u7A0B\u5FC5\u987B\u4F4D\u4E8E START_ELEMENT \u4E8B\u4EF6\u4E0A, \u800C\u4E0D\u662F{0}\u4E8B\u4EF6\u4E0A
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_zh_TW.properties
deleted file mode 100644
index cdb7bb99..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_zh_TW.properties
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# don't modify nor delete anything for backward compatibility
-#
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterElement = \u672A\u9810\u671F\u7684\u5143\u7D20 ''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveElement = \u672A\u9810\u671F\u7684\u5143\u7D20\u7D50\u5C3E ''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedEnterAttribute = \u672A\u9810\u671F\u7684\u5C6C\u6027 ''{''{0}''}'':{1}
-
-# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang
-ContentHandlerEx.UnexpectedLeaveAttribute = \u672A\u9810\u671F\u7684\u5C6C\u6027\u7D50\u5C3E ''{''{0}''}'':{1}
-
-ContentHandlerEx.UnexpectedText = \u672A\u9810\u671F\u7684\u6587\u5B57 "{0}"
-
-# Wrapped into an InternalError. e.g.: java.lang.InternalError: compiler error(unexpectedLeaveChild)
-ContentHandlerEx.UnexpectedLeaveChild = \u7DE8\u8B6F\u5668\u932F\u8AA4 (unexpectedLeaveChild)
-
-SAXUnmarshallerHandlerImpl.UnexpectedRootElement = \u672A\u9810\u671F\u7684\u6839\u5143\u7D20 {0}
-
-# Usage not found. TODO Remove
-#SAXUnmarshallerHandlerImpl.UnexpectedRootElement2 = \
-# unexpected root element (uri:"{0}", local:"{1}"). Expected elements are {2}
-
-Util.UndefinedPrefix = \u672A\u5B9A\u7FA9\u7684\u524D\u7F6E\u78BC: {0}
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.NullReader = \u8B80\u53D6\u5668\u4E0D\u53EF\u70BA\u7A7A\u503C\t
-
-# Not concatenated with any other string (written on a separate line).
-Unmarshaller.IllegalReaderState = \u8B80\u53D6\u5668\u5FC5\u9808\u4F4D\u65BC START_ELEMENT \u4E8B\u4EF6, \u800C\u975E {0} \u4E8B\u4EF6
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Patcher.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Patcher.java
deleted file mode 100644
index d3cd12aa..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Patcher.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.unmarshaller;
-
-import org.xml.sax.SAXException;
-
-/**
- * Runs by UnmarshallingContext after all the parsing is done.
- *
- * Primarily used to resolve forward IDREFs, but it can run any action.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface Patcher {
- /**
- * Runs an post-action.
- *
- * @throws SAXException
- * if an error is found during the action, it should be reporeted to the context.
- * The context may then throw a {@link SAXException} to abort the processing,
- * and that's when you can throw a {@link SAXException}.
- */
- void run() throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/util/AttributesImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/util/AttributesImpl.java
deleted file mode 100644
index 5541da62..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/util/AttributesImpl.java
+++ /dev/null
@@ -1,654 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// AttributesImpl.java - default implementation of Attributes.
-// http://www.saxproject.org
-// Written by David Megginson
-// NO WARRANTY! This class is in the public domain.
-package com.sun.xml.internal.bind.util;
-
-import org.xml.sax.Attributes;
-
-
-/**
- * Default implementation of the Attributes interface.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
- * for further information.
- * </blockquote>
- *
- * <p>This class provides a default implementation of the SAX2
- * {@link org.xml.sax.Attributes Attributes} interface, with the
- * addition of manipulators so that the list can be modified or
- * reused.</p>
- *
- * <p>There are two typical uses of this class:</p>
- *
- * <ol>
- * <li>to take a persistent snapshot of an Attributes object
- * in a {@link org.xml.sax.ContentHandler#startElement startElement} event; or</li>
- * <li>to construct or modify an Attributes object in a SAX2 driver or filter.</li>
- * </ol>
- *
- * <p>This class replaces the now-deprecated SAX1 {@link
- * org.xml.sax.helpers.AttributeListImpl AttributeListImpl}
- * class; in addition to supporting the updated Attributes
- * interface rather than the deprecated {@link org.xml.sax.AttributeList
- * AttributeList} interface, it also includes a much more efficient
- * implementation using a single array rather than a set of Vectors.</p>
- *
- * @since JAXB1.0
- * @since SAX 2.0
- * @author David Megginson
- * @version 2.0.1 (sax2r2)
- */
-public class AttributesImpl implements Attributes
-{
-
-
- ////////////////////////////////////////////////////////////////////
- // Constructors.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Construct a new, empty AttributesImpl object.
- */
- public AttributesImpl ()
- {
- length = 0;
- data = null;
- }
-
-
- /**
- * Copy an existing Attributes object.
- *
- * <p>This constructor is especially useful inside a
- * {@link org.xml.sax.ContentHandler#startElement startElement} event.</p>
- *
- * @param atts The existing Attributes object.
- */
- public AttributesImpl (Attributes atts)
- {
- setAttributes(atts);
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Implementation of org.xml.sax.Attributes.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Return the number of attributes in the list.
- *
- * @return The number of attributes in the list.
- * @see org.xml.sax.Attributes#getLength()
- */
- public int getLength ()
- {
- return length;
- }
-
-
- /**
- * Return an attribute's Namespace URI.
- *
- * @param index The attribute's index (zero-based).
- * @return The Namespace URI, the empty string if none is
- * available, or null if the index is out of range.
- * @see org.xml.sax.Attributes#getURI(int)
- */
- public String getURI (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5];
- } else {
- return null;
- }
- }
-
-
- /**
- * Return an attribute's local name.
- *
- * @param index The attribute's index (zero-based).
- * @return The attribute's local name, the empty string if
- * none is available, or null if the index if out of range.
- * @see org.xml.sax.Attributes#getLocalName(int)
- */
- public String getLocalName (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5+1];
- } else {
- return null;
- }
- }
-
-
- /**
- * Return an attribute's qualified (prefixed) name.
- *
- * @param index The attribute's index (zero-based).
- * @return The attribute's qualified name, the empty string if
- * none is available, or null if the index is out of bounds.
- * @see org.xml.sax.Attributes#getQName(int)
- */
- public String getQName (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5+2];
- } else {
- return null;
- }
- }
-
-
- /**
- * Return an attribute's type by index.
- *
- * @param index The attribute's index (zero-based).
- * @return The attribute's type, "CDATA" if the type is unknown, or null
- * if the index is out of bounds.
- * @see org.xml.sax.Attributes#getType(int)
- */
- public String getType (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5+3];
- } else {
- return null;
- }
- }
-
-
- /**
- * Return an attribute's value by index.
- *
- * @param index The attribute's index (zero-based).
- * @return The attribute's value or null if the index is out of bounds.
- * @see org.xml.sax.Attributes#getValue(int)
- */
- public String getValue (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5+4];
- } else {
- return null;
- }
- }
-
-
- /**
- * Look up an attribute's index by Namespace name.
- *
- * <p>In many cases, it will be more efficient to look up the name once and
- * use the index query methods rather than using the name query methods
- * repeatedly.</p>
- *
- * @param uri The attribute's Namespace URI, or the empty
- * string if none is available.
- * @param localName The attribute's local name.
- * @return The attribute's index, or -1 if none matches.
- * @see org.xml.sax.Attributes#getIndex(java.lang.String,java.lang.String)
- */
- public int getIndex (String uri, String localName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i].equals(uri) && data[i+1].equals(localName)) {
- return i / 5;
- }
- }
- return -1;
- }
-
- /**
- * Can be used if parameters are interned.
- */
- public int getIndexFast(String uri, String localName) {
- for (int i = (length-1)*5; i>=0; i-=5) {
- // local names tend to be different, so test it first
- if (data[i + 1] == localName && data[i] == uri ) {
- return i / 5;
- }
- }
- return -1;
- }
-
-
- /**
- * Look up an attribute's index by qualified (prefixed) name.
- *
- * @param qName The qualified name.
- * @return The attribute's index, or -1 if none matches.
- * @see org.xml.sax.Attributes#getIndex(java.lang.String)
- */
- public int getIndex (String qName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i+2].equals(qName)) {
- return i / 5;
- }
- }
- return -1;
- }
-
-
- /**
- * Look up an attribute's type by Namespace-qualified name.
- *
- * @param uri The Namespace URI, or the empty string for a name
- * with no explicit Namespace URI.
- * @param localName The local name.
- * @return The attribute's type, or null if there is no
- * matching attribute.
- * @see org.xml.sax.Attributes#getType(java.lang.String,java.lang.String)
- */
- public String getType (String uri, String localName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i].equals(uri) && data[i+1].equals(localName)) {
- return data[i+3];
- }
- }
- return null;
- }
-
-
- /**
- * Look up an attribute's type by qualified (prefixed) name.
- *
- * @param qName The qualified name.
- * @return The attribute's type, or null if there is no
- * matching attribute.
- * @see org.xml.sax.Attributes#getType(java.lang.String)
- */
- public String getType (String qName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i+2].equals(qName)) {
- return data[i+3];
- }
- }
- return null;
- }
-
-
- /**
- * Look up an attribute's value by Namespace-qualified name.
- *
- * @param uri The Namespace URI, or the empty string for a name
- * with no explicit Namespace URI.
- * @param localName The local name.
- * @return The attribute's value, or null if there is no
- * matching attribute.
- * @see org.xml.sax.Attributes#getValue(java.lang.String,java.lang.String)
- */
- public String getValue (String uri, String localName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i].equals(uri) && data[i+1].equals(localName)) {
- return data[i+4];
- }
- }
- return null;
- }
-
-
- /**
- * Look up an attribute's value by qualified (prefixed) name.
- *
- * @param qName The qualified name.
- * @return The attribute's value, or null if there is no
- * matching attribute.
- * @see org.xml.sax.Attributes#getValue(java.lang.String)
- */
- public String getValue (String qName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i+2].equals(qName)) {
- return data[i+4];
- }
- }
- return null;
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Manipulators.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Clear the attribute list for reuse.
- *
- * <p>Note that little memory is freed by this call:
- * the current array is kept so it can be
- * reused.</p>
- */
- public void clear ()
- {
- if (data != null) {
- for (int i = 0; i < (length * 5); i++)
- data [i] = null;
- }
- length = 0;
- }
-
-
- /**
- * Copy an entire Attributes object.
- *
- * <p>It may be more efficient to reuse an existing object
- * rather than constantly allocating new ones.</p>
- *
- * @param atts The attributes to copy.
- */
- public void setAttributes (Attributes atts)
- {
- clear();
- length = atts.getLength();
- if (length > 0) {
- data = new String[length*5];
- for (int i = 0; i < length; i++) {
- data[i*5] = atts.getURI(i);
- data[i*5+1] = atts.getLocalName(i);
- data[i*5+2] = atts.getQName(i);
- data[i*5+3] = atts.getType(i);
- data[i*5+4] = atts.getValue(i);
- }
- }
- }
-
-
- /**
- * Add an attribute to the end of the list.
- *
- * <p>For the sake of speed, this method does no checking
- * to see if the attribute is already in the list: that is
- * the responsibility of the application.</p>
- *
- * @param uri The Namespace URI, or the empty string if
- * none is available or Namespace processing is not
- * being performed.
- * @param localName The local name, or the empty string if
- * Namespace processing is not being performed.
- * @param qName The qualified (prefixed) name, or the empty string
- * if qualified names are not available.
- * @param type The attribute type as a string.
- * @param value The attribute value.
- */
- public void addAttribute (String uri, String localName, String qName,
- String type, String value)
- {
- ensureCapacity(length+1);
- data[length*5] = uri;
- data[length*5+1] = localName;
- data[length*5+2] = qName;
- data[length*5+3] = type;
- data[length*5+4] = value;
- length++;
- }
-
-
- /**
- * Set an attribute in the list.
- *
- * <p>For the sake of speed, this method does no checking
- * for name conflicts or well-formedness: such checks are the
- * responsibility of the application.</p>
- *
- * @param index The index of the attribute (zero-based).
- * @param uri The Namespace URI, or the empty string if
- * none is available or Namespace processing is not
- * being performed.
- * @param localName The local name, or the empty string if
- * Namespace processing is not being performed.
- * @param qName The qualified name, or the empty string
- * if qualified names are not available.
- * @param type The attribute type as a string.
- * @param value The attribute value.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setAttribute (int index, String uri, String localName,
- String qName, String type, String value)
- {
- if (index >= 0 && index < length) {
- data[index*5] = uri;
- data[index*5+1] = localName;
- data[index*5+2] = qName;
- data[index*5+3] = type;
- data[index*5+4] = value;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Remove an attribute from the list.
- *
- * @param index The index of the attribute (zero-based).
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void removeAttribute (int index)
- {
- if (index >= 0 && index < length) {
- if (index < length - 1) {
- System.arraycopy(data, (index+1)*5, data, index*5,
- (length-index-1)*5);
- }
- index = (length - 1) * 5;
- data [index++] = null;
- data [index++] = null;
- data [index++] = null;
- data [index++] = null;
- data [index] = null;
- length--;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the Namespace URI of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param uri The attribute's Namespace URI, or the empty
- * string for none.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setURI (int index, String uri)
- {
- if (index >= 0 && index < length) {
- data[index*5] = uri;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the local name of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param localName The attribute's local name, or the empty
- * string for none.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setLocalName (int index, String localName)
- {
- if (index >= 0 && index < length) {
- data[index*5+1] = localName;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the qualified name of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param qName The attribute's qualified name, or the empty
- * string for none.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setQName (int index, String qName)
- {
- if (index >= 0 && index < length) {
- data[index*5+2] = qName;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the type of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param type The attribute's type.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setType (int index, String type)
- {
- if (index >= 0 && index < length) {
- data[index*5+3] = type;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the value of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param value The attribute's value.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setValue (int index, String value)
- {
- if (index >= 0 && index < length) {
- data[index*5+4] = value;
- } else {
- badIndex(index);
- }
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal methods.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Ensure the internal array's capacity.
- *
- * @param n The minimum number of attributes that the array must
- * be able to hold.
- */
- private void ensureCapacity (int n) {
- if (n <= 0) {
- return;
- }
- int max;
- if (data == null || data.length == 0) {
- max = 25;
- }
- else if (data.length >= n * 5) {
- return;
- }
- else {
- max = data.length;
- }
- while (max < n * 5) {
- max *= 2;
- }
-
- String newData[] = new String[max];
- if (length > 0) {
- System.arraycopy(data, 0, newData, 0, length*5);
- }
- data = newData;
- }
-
-
- /**
- * Report a bad array index in a manipulator.
- *
- * @param index The index to report.
- * @exception java.lang.ArrayIndexOutOfBoundsException Always.
- */
- private void badIndex (int index)
- throws ArrayIndexOutOfBoundsException
- {
- String msg =
- "Attempt to modify attribute at illegal index: " + index;
- throw new ArrayIndexOutOfBoundsException(msg);
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal state.
- ////////////////////////////////////////////////////////////////////
-
- int length;
- String data [];
-
-}
-
-// end of AttributesImpl.java
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/util/SecureLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/util/SecureLoader.java
deleted file mode 100644
index be5391ce..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/util/SecureLoader.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.util;
-
-/**
- * Class defined for safe calls of getClassLoader methods of any kind (context/system/class
- * classloader. This MUST be package private and defined in every package which
- * uses such invocations.
- * @author snajper
- */
-class SecureLoader {
-
- static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/util/ValidationEventLocatorExImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/util/ValidationEventLocatorExImpl.java
deleted file mode 100644
index 55ffb344..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/util/ValidationEventLocatorExImpl.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.util;
-
-import javax.xml.bind.helpers.ValidationEventLocatorImpl;
-
-import com.sun.xml.internal.bind.ValidationEventLocatorEx;
-
-/**
- *
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class ValidationEventLocatorExImpl
- extends ValidationEventLocatorImpl implements ValidationEventLocatorEx {
-
- private final String fieldName;
-
- public ValidationEventLocatorExImpl( Object target, String fieldName ) {
- super(target);
- this.fieldName = fieldName;
- }
-
- public String getFieldName() {
- return fieldName;
- }
-
- /**
- * Returns a nice string representation for better debug experience.
- */
- public String toString() {
- StringBuffer buf = new StringBuffer();
- buf.append("[url=");
- buf.append(getURL());
- buf.append(",line=");
- buf.append(getLineNumber());
- buf.append(",column=");
- buf.append(getColumnNumber());
- buf.append(",node=");
- buf.append(getNode());
- buf.append(",object=");
- buf.append(getObject());
- buf.append(",field=");
- buf.append(getFieldName());
- buf.append("]");
-
- return buf.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/util/Which.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/util/Which.java
deleted file mode 100644
index 7a6ac88e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/util/Which.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.util;
-
-import java.net.URL;
-
-/**
- * Finds out where a class file is loaded from.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class Which {
-
- public static String which( Class clazz ) {
- return which( clazz.getName(), SecureLoader.getClassClassLoader(clazz));
- }
-
- /**
- * Search the specified classloader for the given classname.
- *
- * @param classname the fully qualified name of the class to search for
- * @param loader the classloader to search
- * @return the source location of the resource, or null if it wasn't found
- */
- public static String which(String classname, ClassLoader loader) {
-
- String classnameAsResource = classname.replace('.', '/') + ".class";
-
- if(loader == null) {
- loader = SecureLoader.getSystemClassLoader();
- }
-
- URL it = loader.getResource(classnameAsResource);
- if (it != null) {
- return it.toString();
- } else {
- return null;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/ClassFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/ClassFactory.java
deleted file mode 100644
index ba250944..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/ClassFactory.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.lang.ref.WeakReference;
-import java.util.Map;
-import java.util.WeakHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import com.sun.xml.internal.bind.Util;
-
-/**
- * Creates new instances of classes.
- *
- * <p>
- * This code handles the case where the class is not public or the constructor is
- * not public.
- *
- * @since 2.0
- * @author Kohsuke Kawaguchi
- */
-public final class ClassFactory {
- private static final Class[] emptyClass = new Class[0];
- private static final Object[] emptyObject = new Object[0];
-
- private static final Logger logger = Util.getClassLogger();
-
- /**
- * Cache from a class to its default constructor.
- *
- * To avoid synchronization among threads, we use {@link ThreadLocal}.
- */
- private static final ThreadLocal<Map<Class, WeakReference<Constructor>>> tls = new ThreadLocal<Map<Class,WeakReference<Constructor>>>() {
- @Override
- public Map<Class,WeakReference<Constructor>> initialValue() {
- return new WeakHashMap<Class,WeakReference<Constructor>>();
- }
- };
-
- public static void cleanCache() {
- if (tls != null) {
- try {
- tls.remove();
- } catch (Exception e) {
- logger.log(Level.WARNING, "Unable to clean Thread Local cache of classes used in Unmarshaller: {0}", e.getLocalizedMessage());
- }
- }
- }
-
- /**
- * Creates a new instance of the class but throw exceptions without catching it.
- */
- public static <T> T create0( final Class<T> clazz ) throws IllegalAccessException, InvocationTargetException, InstantiationException {
- Map<Class,WeakReference<Constructor>> m = tls.get();
- Constructor<T> cons = null;
- WeakReference<Constructor> consRef = m.get(clazz);
- if(consRef!=null)
- cons = consRef.get();
- if(cons==null) {
- try {
- cons = clazz.getDeclaredConstructor(emptyClass);
- } catch (NoSuchMethodException e) {
- logger.log(Level.INFO,"No default constructor found on "+clazz,e);
- NoSuchMethodError exp;
- if(clazz.getDeclaringClass()!=null && !Modifier.isStatic(clazz.getModifiers())) {
- exp = new NoSuchMethodError(Messages.NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS.format(clazz.getName()));
- } else {
- exp = new NoSuchMethodError(e.getMessage());
- }
- exp.initCause(e);
- throw exp;
- }
-
- int classMod = clazz.getModifiers();
-
- if(!Modifier.isPublic(classMod) || !Modifier.isPublic(cons.getModifiers())) {
- // attempt to make it work even if the constructor is not accessible
- try {
- cons.setAccessible(true);
- } catch(SecurityException e) {
- // but if we don't have a permission to do so, work gracefully.
- logger.log(Level.FINE,"Unable to make the constructor of "+clazz+" accessible",e);
- throw e;
- }
- }
-
- m.put(clazz,new WeakReference<Constructor>(cons));
- }
-
- return cons.newInstance(emptyObject);
- }
-
- /**
- * The same as {@link #create0} but with an error handling to make
- * the instantiation error fatal.
- */
- public static <T> T create( Class<T> clazz ) {
- try {
- return create0(clazz);
- } catch (InstantiationException e) {
- logger.log(Level.INFO,"failed to create a new instance of "+clazz,e);
- throw new InstantiationError(e.toString());
- } catch (IllegalAccessException e) {
- logger.log(Level.INFO,"failed to create a new instance of "+clazz,e);
- throw new IllegalAccessError(e.toString());
- } catch (InvocationTargetException e) {
- Throwable target = e.getTargetException();
-
- // most likely an error on the user's code.
- // just let it through for the ease of debugging
- if(target instanceof RuntimeException)
- throw (RuntimeException)target;
-
- // error. just forward it for the ease of debugging
- if(target instanceof Error)
- throw (Error)target;
-
- // a checked exception.
- // not sure how we should report this error,
- // but for now we just forward it by wrapping it into a runtime exception
- throw new IllegalStateException(target);
- }
- }
-
- /**
- * Call a method in the factory class to get the object.
- */
- public static Object create(Method method) {
- Throwable errorMsg;
- try {
- return method.invoke(null, emptyObject);
- } catch (InvocationTargetException ive) {
- Throwable target = ive.getTargetException();
-
- if(target instanceof RuntimeException)
- throw (RuntimeException)target;
-
- if(target instanceof Error)
- throw (Error)target;
-
- throw new IllegalStateException(target);
- } catch (IllegalAccessException e) {
- logger.log(Level.INFO,"failed to create a new instance of "+method.getReturnType().getName(),e);
- throw new IllegalAccessError(e.toString());
- } catch (IllegalArgumentException iae){
- logger.log(Level.INFO,"failed to create a new instance of "+method.getReturnType().getName(),iae);
- errorMsg = iae;
- } catch (NullPointerException npe){
- logger.log(Level.INFO,"failed to create a new instance of "+method.getReturnType().getName(),npe);
- errorMsg = npe;
- } catch (ExceptionInInitializerError eie){
- logger.log(Level.INFO,"failed to create a new instance of "+method.getReturnType().getName(),eie);
- errorMsg = eie;
- }
-
- NoSuchMethodError exp;
- exp = new NoSuchMethodError(errorMsg.getMessage());
- exp.initCause(errorMsg);
- throw exp;
- }
-
- /**
- * Infers the instanciable implementation class that can be assigned to the given field type.
- *
- * @return null
- * if inference fails.
- */
- public static <T> Class<? extends T> inferImplClass(Class<T> fieldType, Class[] knownImplClasses) {
- if(!fieldType.isInterface())
- return fieldType;
-
- for( Class<?> impl : knownImplClasses ) {
- if(fieldType.isAssignableFrom(impl))
- return impl.asSubclass(fieldType);
- }
-
- // if we can't find an implementation class,
- // let's just hope that we will never need to create a new object,
- // and returns null
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/ContextFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/ContextFactory.java
deleted file mode 100644
index 9a647984..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/ContextFactory.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-import java.util.logging.Level;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-
-import com.sun.istack.internal.FinalArrayList;
-import com.sun.xml.internal.bind.Util;
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.bind.api.TypeReference;
-import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.util.TypeCast;
-
-/**
- * This class is responsible for producing RI JAXBContext objects. In
- * the RI, this is the class that the javax.xml.bind.context.factory
- * property will point to.
- *
- * <p>
- * Used to create JAXBContext objects for v1.0.1 and forward
- *
- * @since 2.0
- * @author Kohsuke Kawaguchi
- */
-public class ContextFactory {
-
- /**
- * The API will invoke this method via reflection
- */
- public static JAXBContext createContext(Class[] classes, Map<String,Object> properties ) throws JAXBException {
- // fool-proof check, and copy the map to make it easier to find unrecognized properties.
- if(properties==null)
- properties = Collections.emptyMap();
- else
- properties = new HashMap<String,Object>(properties);
-
- String defaultNsUri = getPropertyValue(properties,JAXBRIContext.DEFAULT_NAMESPACE_REMAP,String.class);
-
- Boolean c14nSupport = getPropertyValue(properties,JAXBRIContext.CANONICALIZATION_SUPPORT,Boolean.class);
- if(c14nSupport==null)
- c14nSupport = false;
-
- Boolean disablesecurityProcessing = getPropertyValue(properties, JAXBRIContext.DISABLE_XML_SECURITY, Boolean.class);
- if (disablesecurityProcessing==null)
- disablesecurityProcessing = false;
-
- Boolean allNillable = getPropertyValue(properties,JAXBRIContext.TREAT_EVERYTHING_NILLABLE,Boolean.class);
- if(allNillable==null)
- allNillable = false;
-
- Boolean retainPropertyInfo = getPropertyValue(properties, JAXBRIContext.RETAIN_REFERENCE_TO_INFO, Boolean.class);
- if(retainPropertyInfo==null)
- retainPropertyInfo = false;
-
- Boolean supressAccessorWarnings = getPropertyValue(properties, JAXBRIContext.SUPRESS_ACCESSOR_WARNINGS, Boolean.class);
- if(supressAccessorWarnings==null)
- supressAccessorWarnings = false;
-
- Boolean improvedXsiTypeHandling = getPropertyValue(properties, JAXBRIContext.IMPROVED_XSI_TYPE_HANDLING, Boolean.class);
- if (improvedXsiTypeHandling == null) {
- String improvedXsiSystemProperty = Util.getSystemProperty(JAXBRIContext.IMPROVED_XSI_TYPE_HANDLING);
- if (improvedXsiSystemProperty == null) {
- improvedXsiTypeHandling = true;
- } else {
- improvedXsiTypeHandling = Boolean.valueOf(improvedXsiSystemProperty);
- }
- }
-
- Boolean xmlAccessorFactorySupport = getPropertyValue(properties,
- JAXBRIContext.XMLACCESSORFACTORY_SUPPORT,Boolean.class);
- if(xmlAccessorFactorySupport==null){
- xmlAccessorFactorySupport = false;
- Util.getClassLogger().log(Level.FINE, "Property " +
- JAXBRIContext.XMLACCESSORFACTORY_SUPPORT +
- "is not active. Using JAXB's implementation");
- }
-
- RuntimeAnnotationReader ar = getPropertyValue(properties,JAXBRIContext.ANNOTATION_READER,RuntimeAnnotationReader.class);
-
- Collection<TypeReference> tr = getPropertyValue(properties, JAXBRIContext.TYPE_REFERENCES, Collection.class);
- if (tr == null) {
- tr = Collections.<TypeReference>emptyList();
- }
-
- Map<Class,Class> subclassReplacements;
- try {
- subclassReplacements = TypeCast.checkedCast(
- getPropertyValue(properties, JAXBRIContext.SUBCLASS_REPLACEMENTS, Map.class), Class.class, Class.class);
- } catch (ClassCastException e) {
- throw new JAXBException(Messages.INVALID_TYPE_IN_MAP.format(),e);
- }
-
- if(!properties.isEmpty()) {
- throw new JAXBException(Messages.UNSUPPORTED_PROPERTY.format(properties.keySet().iterator().next()));
- }
-
- JAXBContextImpl.JAXBContextBuilder builder = new JAXBContextImpl.JAXBContextBuilder();
- builder.setClasses(classes);
- builder.setTypeRefs(tr);
- builder.setSubclassReplacements(subclassReplacements);
- builder.setDefaultNsUri(defaultNsUri);
- builder.setC14NSupport(c14nSupport);
- builder.setAnnotationReader(ar);
- builder.setXmlAccessorFactorySupport(xmlAccessorFactorySupport);
- builder.setAllNillable(allNillable);
- builder.setRetainPropertyInfo(retainPropertyInfo);
- builder.setSupressAccessorWarnings(supressAccessorWarnings);
- builder.setImprovedXsiTypeHandling(improvedXsiTypeHandling);
- builder.setDisableSecurityProcessing(disablesecurityProcessing);
- return builder.build();
- }
-
- /**
- * If a key is present in the map, remove the value and return it.
- */
- private static <T> T getPropertyValue(Map<String, Object> properties, String keyName, Class<T> type ) throws JAXBException {
- Object o = properties.get(keyName);
- if(o==null) return null;
-
- properties.remove(keyName);
- if(!type.isInstance(o))
- throw new JAXBException(Messages.INVALID_PROPERTY_VALUE.format(keyName,o));
- else
- return type.cast(o);
- }
-
- /**
- *
- * @param classes
- * @param typeRefs
- * @param subclassReplacements
- * @param defaultNsUri
- * @param c14nSupport
- * @param ar
- * @param xmlAccessorFactorySupport
- * @param allNillable
- * @param retainPropertyInfo
- * @return
- * @throws JAXBException
- * @deprecated use createContext(Class[] classes, Map<String,Object> properties) method instead
- */
- @Deprecated
- public static JAXBRIContext createContext( Class[] classes,
- Collection<TypeReference> typeRefs, Map<Class,Class> subclassReplacements,
- String defaultNsUri, boolean c14nSupport, RuntimeAnnotationReader ar,
- boolean xmlAccessorFactorySupport, boolean allNillable, boolean retainPropertyInfo) throws JAXBException {
-
- return createContext(classes, typeRefs, subclassReplacements,
- defaultNsUri, c14nSupport, ar, xmlAccessorFactorySupport,
- allNillable, retainPropertyInfo, false);
- }
-
- /**
- *
- * @param classes
- * @param typeRefs
- * @param subclassReplacements
- * @param defaultNsUri
- * @param c14nSupport
- * @param ar
- * @param xmlAccessorFactorySupport
- * @param allNillable
- * @param retainPropertyInfo
- * @param improvedXsiTypeHandling
- * @return
- * @throws JAXBException
- * @deprecated use createContext( Class[] classes, Map<String,Object> properties) method instead
- */
- @Deprecated
- public static JAXBRIContext createContext( Class[] classes,
- Collection<TypeReference> typeRefs, Map<Class,Class> subclassReplacements,
- String defaultNsUri, boolean c14nSupport, RuntimeAnnotationReader ar,
- boolean xmlAccessorFactorySupport, boolean allNillable, boolean retainPropertyInfo, boolean improvedXsiTypeHandling) throws JAXBException {
-
- JAXBContextImpl.JAXBContextBuilder builder = new JAXBContextImpl.JAXBContextBuilder();
- builder.setClasses(classes);
- builder.setTypeRefs(typeRefs);
- builder.setSubclassReplacements(subclassReplacements);
- builder.setDefaultNsUri(defaultNsUri);
- builder.setC14NSupport(c14nSupport);
- builder.setAnnotationReader(ar);
- builder.setXmlAccessorFactorySupport(xmlAccessorFactorySupport);
- builder.setAllNillable(allNillable);
- builder.setRetainPropertyInfo(retainPropertyInfo);
- builder.setImprovedXsiTypeHandling(improvedXsiTypeHandling);
- return builder.build();
- }
-
- /**
- * The API will invoke this method via reflection.
- */
- public static JAXBContext createContext( String contextPath,
- ClassLoader classLoader, Map<String,Object> properties ) throws JAXBException {
- FinalArrayList<Class> classes = new FinalArrayList<Class>();
- StringTokenizer tokens = new StringTokenizer(contextPath,":");
- List<Class> indexedClasses;
-
- // at least on of these must be true per package
- boolean foundObjectFactory;
- boolean foundJaxbIndex;
-
- while(tokens.hasMoreTokens()) {
- foundObjectFactory = foundJaxbIndex = false;
- String pkg = tokens.nextToken();
-
- // look for ObjectFactory and load it
- final Class<?> o;
- try {
- o = classLoader.loadClass(pkg+".ObjectFactory");
- classes.add(o);
- foundObjectFactory = true;
- } catch (ClassNotFoundException e) {
- // not necessarily an error
- }
-
- // look for jaxb.index and load the list of classes
- try {
- indexedClasses = loadIndexedClasses(pkg, classLoader);
- } catch (IOException e) {
- //TODO: think about this more
- throw new JAXBException(e);
- }
- if(indexedClasses != null) {
- classes.addAll(indexedClasses);
- foundJaxbIndex = true;
- }
-
- if( !(foundObjectFactory || foundJaxbIndex) ) {
- throw new JAXBException( Messages.BROKEN_CONTEXTPATH.format(pkg));
- }
- }
-
-
- return createContext(classes.toArray(new Class[classes.size()]),properties);
- }
-
- /**
- * Look for jaxb.index file in the specified package and load it's contents
- *
- * @param pkg package name to search in
- * @param classLoader ClassLoader to search in
- * @return a List of Class objects to load, null if there weren't any
- * @throws IOException if there is an error reading the index file
- * @throws JAXBException if there are any errors in the index file
- */
- private static List<Class> loadIndexedClasses(String pkg, ClassLoader classLoader) throws IOException, JAXBException {
- final String resource = pkg.replace('.', '/') + "/jaxb.index";
- final InputStream resourceAsStream = classLoader.getResourceAsStream(resource);
-
- if (resourceAsStream == null) {
- return null;
- }
-
- BufferedReader in =
- new BufferedReader(new InputStreamReader(resourceAsStream, "UTF-8"));
- try {
- FinalArrayList<Class> classes = new FinalArrayList<Class>();
- String className = in.readLine();
- while (className != null) {
- className = className.trim();
- if (className.startsWith("#") || (className.length() == 0)) {
- className = in.readLine();
- continue;
- }
-
- if (className.endsWith(".class")) {
- throw new JAXBException(Messages.ILLEGAL_ENTRY.format(className));
- }
-
- try {
- classes.add(classLoader.loadClass(pkg + '.' + className));
- } catch (ClassNotFoundException e) {
- throw new JAXBException(Messages.ERROR_LOADING_CLASS.format(className, resource),e);
- }
-
- className = in.readLine();
- }
- return classes;
- } finally {
- in.close();
- }
- }
-
- public static final String USE_JAXB_PROPERTIES = "_useJAXBProperties";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.java
deleted file mode 100644
index 2add9205..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-public enum Messages {
- ILLEGAL_ENTRY, // 1 arg
- ERROR_LOADING_CLASS, // 2 args
- INVALID_PROPERTY_VALUE, // 2 args
- UNSUPPORTED_PROPERTY, // 1 arg
- BROKEN_CONTEXTPATH, // 1 arg
- NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS, // 1 arg
- INVALID_TYPE_IN_MAP, // 0args
- 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());
-
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.properties
deleted file mode 100644
index 121a82a1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.properties
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not concatenated with any other string (written on a separate line).
-ILLEGAL_ENTRY = \
- illegal entry: "{0}", entries should be of the form "ClassName" or "OuterClass.InnerClass", not "ClassName.class" or "fully.qualified.ClassName"
-
-# {0} - class name, {1} - resource location e.g. error loading class "Foo" listed in foo/bar/jaxb.index, make sure that entries are accessable on CLASSPATH and of the form "ClassName" or "OuterClass.InnerClass", not "ClassName.class" or "fully.qualified.ClassName"
-ERROR_LOADING_CLASS = \
- error loading class "{0}" listed in {1}, make sure that entries are accessable on CLASSPATH and of the form "ClassName" or "OuterClass.InnerClass", not "ClassName.class" or "fully.qualified.ClassName"
-
-INVALID_PROPERTY_VALUE = \
- {1} is not a valid value for property "{0}"
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_PROPERTY = \
- property "{0}" is not supported
-
-#{0} - package name. e.g.: "foo.bar" doesn't contain ObjectFactory.class or jaxb.index
-BROKEN_CONTEXTPATH = \
- "{0}" doesn't contain ObjectFactory.class or jaxb.index
-
-NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS = \
- "{0}" is an inner class, and therefore it can never have a default no-argument constructor. Add 'static'.
-
-INVALID_TYPE_IN_MAP = \
- Map contains a wrong type
-
-INVALID_JAXP_IMPLEMENTATION = \
- You are running with invalid JAXP api or implementation. JAXP api/implementation of version 1.3.1 (included in JDK6) or higher is required. In case you are using ant, make sure ant 1.7.0 or higher is used - older versions of ant contain JAXP api/impl version 1.2 (in xml-apis.jar). If you want to keep using older ant versions, you have to configure it to use higher the JAXP api/impl versions.
-
-JAXP_SUPPORTED_PROPERTY =\
- Property "{0}" is supported and has been successfully set by used JAXP implementation.
-
-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."
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_de.properties
deleted file mode 100644
index a8eb88d7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_de.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not concatenated with any other string (written on a separate line).
-ILLEGAL_ENTRY = ung\u00FCltiger Eintrag: "{0}", Eintr\u00E4ge m\u00FCssen folgende Form aufweisen "ClassName" oder "OuterClass.InnerClass", nicht "ClassName.class" oder "fully.qualified.ClassName"
-
-# {0} - class name, {1} - resource location e.g. error loading class "Foo" listed in foo/bar/jaxb.index, make sure that entries are accessable on CLASSPATH and of the form "ClassName" or "OuterClass.InnerClass", not "ClassName.class" or "fully.qualified.ClassName"
-ERROR_LOADING_CLASS = Fehler beim Laden der Klasse "{0}", die in {1} aufgef\u00FChrt wird. Stellen Sie sicher, dass die Eintr\u00E4ge in CLASSPATH zug\u00E4nglich sind und die Form "ClassName" oder "OuterClass.InnerClass", und nicht "ClassName.class" oder "fully.qualified.ClassName" haben
-
-INVALID_PROPERTY_VALUE = {1} ist kein g\u00FCltiger Wert f\u00FCr Eigenschaft "{0}"
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_PROPERTY = Eigenschaft "{0}" wird nicht unterst\u00FCtzt.
-
-#{0} - package name. e.g.: "foo.bar" doesn't contain ObjectFactory.class or jaxb.index
-BROKEN_CONTEXTPATH = "{0}" enth\u00E4lt ObjectFactory.class oder jaxb.index nicht
-
-NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS = "{0}" ist eine innere Klasse und kann deshalb niemals einen "no-argument"-Standardkonstruktor haben. F\u00FCgen Sie "static" hinzu.
-
-INVALID_TYPE_IN_MAP = Zuordnung enth\u00E4lt falschen Typ
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_es.properties
deleted file mode 100644
index cae2dd9f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_es.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not concatenated with any other string (written on a separate line).
-ILLEGAL_ENTRY = Entrada no v\u00E1lida: "{0}"; las entradas deben tener el formato "ClassName" o "OuterClass.InnerClass", no "ClassName.class" ni "fully.qualified.ClassName".
-
-# {0} - class name, {1} - resource location e.g. error loading class "Foo" listed in foo/bar/jaxb.index, make sure that entries are accessable on CLASSPATH and of the form "ClassName" or "OuterClass.InnerClass", not "ClassName.class" or "fully.qualified.ClassName"
-ERROR_LOADING_CLASS = error al cargar la clase "{0}" que se indica en {1}; aseg\u00FArese de que es posible acceder a las entradas en CLASSPATH y que tienen el formato "ClassName" o "OuterClass.InnerClass", no "ClassName.class" ni "fully.qualified.ClassName"
-
-INVALID_PROPERTY_VALUE = {1} no es un valor v\u00E1lido para la propiedad "{0}"
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_PROPERTY = La propiedad "{0}" no est\u00E1 soportada.
-
-#{0} - package name. e.g.: "foo.bar" doesn't contain ObjectFactory.class or jaxb.index
-BROKEN_CONTEXTPATH = "{0}" no contiene ObjectFactory.class ni jaxb.index
-
-NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS = "{0}"es una clase interna y, por lo tanto, nunca puede tener un constructor sin argumentos por defecto. Agregue ''static''.
-
-INVALID_TYPE_IN_MAP = La asignaci\u00F3n contiene un tipo incorrecto
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_fr.properties
deleted file mode 100644
index facfa929..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_fr.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not concatenated with any other string (written on a separate line).
-ILLEGAL_ENTRY = entr\u00E9e "{0}" interdite, les entr\u00E9es doivent \u00EAtre au format "ClassName" ou "OuterClass.InnerClass", et non"ClassName.class" ou "fully.qualified.ClassName"
-
-# {0} - class name, {1} - resource location e.g. error loading class "Foo" listed in foo/bar/jaxb.index, make sure that entries are accessable on CLASSPATH and of the form "ClassName" or "OuterClass.InnerClass", not "ClassName.class" or "fully.qualified.ClassName"
-ERROR_LOADING_CLASS = erreur lors du chargement de la classe "{0}" list\u00E9e dans {1}, assurez-vous que les entr\u00E9es sont accessibles sur CLASSPATH et sont au format "ClassName" ou "OuterClass.InnerClass", et non "ClassName.class" ou "fully.qualified.ClassName"
-
-INVALID_PROPERTY_VALUE = {1} n''est pas une valeur valide pour la propri\u00E9t\u00E9 "{0}"
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_PROPERTY = la propri\u00E9t\u00E9 ''{0}'' n''est pas prise en charge
-
-#{0} - package name. e.g.: "foo.bar" doesn't contain ObjectFactory.class or jaxb.index
-BROKEN_CONTEXTPATH = "{0}" ne contient pas ObjectFactory.class ou jaxb.index
-
-NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS = "{0}" est une classe interne et ne peut donc jamais comporter de constructeur sans argument par d\u00E9faut. Ajoutez ''static''.
-
-INVALID_TYPE_IN_MAP = La mappe contient un type incorrect
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_it.properties
deleted file mode 100644
index ec229692..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_it.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not concatenated with any other string (written on a separate line).
-ILLEGAL_ENTRY = voce non valida: "{0}". Le voci devono avere il formato "ClassName" o "OuterClass.InnerClass", non "ClassName.class" o "fully.qualified.ClassName"
-
-# {0} - class name, {1} - resource location e.g. error loading class "Foo" listed in foo/bar/jaxb.index, make sure that entries are accessable on CLASSPATH and of the form "ClassName" or "OuterClass.InnerClass", not "ClassName.class" or "fully.qualified.ClassName"
-ERROR_LOADING_CLASS = errore di caricamento della classe "{0}" elencata in {1}. Assicurarsi che le voci siano accessibili su CLASSPATH e che abbiano il formato "ClassName" o "OuterClass.InnerClass", non "ClassName.class" o "fully.qualified.ClassName"
-
-INVALID_PROPERTY_VALUE = {1} non \u00E8 un valore valido per la propriet\u00E0 "{0}"
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_PROPERTY = propriet\u00E0 "{0}" non supportata
-
-#{0} - package name. e.g.: "foo.bar" doesn't contain ObjectFactory.class or jaxb.index
-BROKEN_CONTEXTPATH = "{0}" non contiene ObjectFactory.class o jaxb.index
-
-NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS = "{0}" \u00E8 una classe interna e pertanto non pu\u00F2 mai avere un costruttore senza argomenti predefinito. Aggiungere ''static''.
-
-INVALID_TYPE_IN_MAP = La mappa contiene un tipo errato
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_ja.properties
deleted file mode 100644
index 771584bb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_ja.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not concatenated with any other string (written on a separate line).
-ILLEGAL_ENTRY = \u4E0D\u6B63\u306A\u30A8\u30F3\u30C8\u30EA: "{0}"\u3002\u30A8\u30F3\u30C8\u30EA\u306F\u3001"ClassName.class"\u307E\u305F\u306F"fully.qualified.ClassName"\u3067\u306F\u306A\u304F\u3001"ClassName"\u307E\u305F\u306F"OuterClass.InnerClass"\u306E\u5F62\u5F0F\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-# {0} - class name, {1} - resource location e.g. error loading class "Foo" listed in foo/bar/jaxb.index, make sure that entries are accessable on CLASSPATH and of the form "ClassName" or "OuterClass.InnerClass", not "ClassName.class" or "fully.qualified.ClassName"
-ERROR_LOADING_CLASS = {1}\u306B\u30EA\u30B9\u30C8\u3055\u308C\u3066\u3044\u308B\u30AF\u30E9\u30B9"{0}"\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30A8\u30F3\u30C8\u30EA\u304CCLASSPATH\u4E0A\u3067\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u3067\u3042\u308A\u3001"ClassName.class"\u307E\u305F\u306F"fully.qualified.ClassName"\u3067\u306F\u306A\u304F\u3001"ClassName"\u307E\u305F\u306F"OuterClass.InnerClass"\u306E\u5F62\u5F0F\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-INVALID_PROPERTY_VALUE = {1}\u306F\u30D7\u30ED\u30D1\u30C6\u30A3"{0}"\u306B\u5BFE\u3057\u3066\u7121\u52B9\u306A\u5024\u3067\u3059
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_PROPERTY = \u30D7\u30ED\u30D1\u30C6\u30A3"{0}"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-
-#{0} - package name. e.g.: "foo.bar" doesn't contain ObjectFactory.class or jaxb.index
-BROKEN_CONTEXTPATH = "{0}"\u306B\u306FObjectFactory.class\u307E\u305F\u306Fjaxb.index\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093
-
-NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS = "{0}"\u306F\u5185\u90E8\u30AF\u30E9\u30B9\u3067\u3042\u308B\u305F\u3081\u3001\u5F15\u6570\u306A\u3057\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30B3\u30F3\u30C8\u30E9\u30AF\u30BF\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002''static''\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-INVALID_TYPE_IN_MAP = \u30DE\u30C3\u30D7\u306B\u4E0D\u6B63\u306A\u30BF\u30A4\u30D7\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_ko.properties
deleted file mode 100644
index 4affcb82..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_ko.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not concatenated with any other string (written on a separate line).
-ILLEGAL_ENTRY = \uC798\uBABB\uB41C \uD56D\uBAA9: "{0}". \uD56D\uBAA9\uC740 "ClassName.class" \uB610\uB294 "fully.qualified.ClassName" \uD615\uC2DD\uC774 \uC544\uB2CC "ClassName" \uB610\uB294 "OuterClass.InnerClass" \uD615\uC2DD\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-# {0} - class name, {1} - resource location e.g. error loading class "Foo" listed in foo/bar/jaxb.index, make sure that entries are accessable on CLASSPATH and of the form "ClassName" or "OuterClass.InnerClass", not "ClassName.class" or "fully.qualified.ClassName"
-ERROR_LOADING_CLASS = {1}\uC5D0 \uB098\uC5F4\uB41C "{0}" \uD074\uB798\uC2A4\uB97C \uB85C\uB4DC\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. CLASSPATH\uC5D0\uC11C \uD56D\uBAA9\uC5D0 \uC561\uC138\uC2A4\uD560 \uC218 \uC788\uC73C\uBA70 \uD56D\uBAA9\uC774 "ClassName.class" \uB610\uB294 "fully.qualified.ClassName" \uD615\uC2DD\uC774 \uC544\uB2CC "ClassName" \uB610\uB294 "OuterClass.InnerClass" \uD615\uC2DD\uC778\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-INVALID_PROPERTY_VALUE = {1}\uC740(\uB294) "{0}" \uC18D\uC131\uC5D0 \uB300\uD574 \uC801\uD569\uD55C \uAC12\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_PROPERTY = "{0}" \uC18D\uC131\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-#{0} - package name. e.g.: "foo.bar" doesn't contain ObjectFactory.class or jaxb.index
-BROKEN_CONTEXTPATH = "{0}"\uC5D0 ObjectFactory.class \uB610\uB294 jaxb.index\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS = "{0}"\uC740(\uB294) \uB0B4\uBD80 \uD074\uB798\uC2A4\uC774\uBBC0\uB85C \uC778\uC218\uAC00 \uC5C6\uB294 \uAE30\uBCF8 \uC0DD\uC131\uC790\uB97C \uD3EC\uD568\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ''static''\uC744 \uCD94\uAC00\uD558\uC2ED\uC2DC\uC624.
-
-INVALID_TYPE_IN_MAP = \uB9F5\uC5D0 \uC798\uBABB\uB41C \uC720\uD615\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_pt_BR.properties
deleted file mode 100644
index bb010790..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_pt_BR.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not concatenated with any other string (written on a separate line).
-ILLEGAL_ENTRY = entrada inv\u00E1lida: "{0}"; as entradas devem estar no formato "ClassName" ou "OuterClass.InnerClass", n\u00E3o no formato "ClassName.class" ou "fully.qualified.ClassName"
-
-# {0} - class name, {1} - resource location e.g. error loading class "Foo" listed in foo/bar/jaxb.index, make sure that entries are accessable on CLASSPATH and of the form "ClassName" or "OuterClass.InnerClass", not "ClassName.class" or "fully.qualified.ClassName"
-ERROR_LOADING_CLASS = erro ao carregar a classe "{0}" listada em {1}; certifique-se de que as entradas n\u00E3o sejam acessadas no CLASSPATH e no formato "ClassName" ou "OuterClass.InnerClass", n\u00E3o no formato "ClassName.class" ou "fully.qualified.ClassName"
-
-INVALID_PROPERTY_VALUE = {1} n\u00E3o \u00E9 um valor v\u00E1lido para a propriedade "{0}"
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_PROPERTY = a propriedade "{0}" n\u00E3o \u00E9 suportada
-
-#{0} - package name. e.g.: "foo.bar" doesn't contain ObjectFactory.class or jaxb.index
-BROKEN_CONTEXTPATH = "{0}" n\u00E3o cont\u00E9m ObjectFactory.class ou jaxb.index
-
-NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS = "{0}" \u00E9 uma classe interna e, portanto, nunca pode ter um construtor no-argument default. Adicione ''static''.
-
-INVALID_TYPE_IN_MAP = O mapa cont\u00E9m um tipo incorreto
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_zh_CN.properties
deleted file mode 100644
index 0a9c7003..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_zh_CN.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not concatenated with any other string (written on a separate line).
-ILLEGAL_ENTRY = \u975E\u6CD5\u6761\u76EE: "{0}", \u6761\u76EE\u7684\u683C\u5F0F\u5E94\u4E3A "ClassName" \u6216 "OuterClass.InnerClass", \u800C\u4E0D\u662F "ClassName.class" \u6216 "fully.qualified.ClassName"
-
-# {0} - class name, {1} - resource location e.g. error loading class "Foo" listed in foo/bar/jaxb.index, make sure that entries are accessable on CLASSPATH and of the form "ClassName" or "OuterClass.InnerClass", not "ClassName.class" or "fully.qualified.ClassName"
-ERROR_LOADING_CLASS = \u52A0\u8F7D{1}\u4E2D\u5217\u51FA\u7684\u7C7B "{0}" \u65F6\u51FA\u9519, \u8BF7\u786E\u4FDD\u6761\u76EE\u53EF\u5728 CLASSPATH \u4E2D\u8BBF\u95EE\u5E76\u4E14\u683C\u5F0F\u4E3A "ClassName" \u6216 "OuterClass.InnerClass", \u800C\u4E0D\u662F "ClassName.class" \u6216 "fully.qualified.ClassName"
-
-INVALID_PROPERTY_VALUE = {1}\u4E0D\u662F\u5C5E\u6027 "{0}" \u7684\u6709\u6548\u503C
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_PROPERTY = \u4E0D\u652F\u6301\u5C5E\u6027 "{0}"
-
-#{0} - package name. e.g.: "foo.bar" doesn't contain ObjectFactory.class or jaxb.index
-BROKEN_CONTEXTPATH = "{0}" \u4E0D\u5305\u542B ObjectFactory.class \u6216 jaxb.index
-
-NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS = "{0}" \u662F\u5185\u90E8\u7C7B, \u56E0\u6B64\u7EDD\u4E0D\u80FD\u5177\u6709\u9ED8\u8BA4\u65E0\u53C2\u6570\u6784\u9020\u5668\u3002\u8BF7\u6DFB\u52A0 ''\u9759\u6001''\u3002
-
-INVALID_TYPE_IN_MAP = \u6620\u5C04\u5305\u542B\u9519\u8BEF\u7C7B\u578B
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_zh_TW.properties
deleted file mode 100644
index 464a51ec..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_zh_TW.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not concatenated with any other string (written on a separate line).
-ILLEGAL_ENTRY = \u7121\u6548\u7684\u9805\u76EE: "{0}", \u9805\u76EE\u7684\u683C\u5F0F\u61C9\u70BA "ClassName" \u6216 "OuterClass.InnerClass", \u800C\u975E "ClassName.class" \u6216 "fully.qualified.ClassName"
-
-# {0} - class name, {1} - resource location e.g. error loading class "Foo" listed in foo/bar/jaxb.index, make sure that entries are accessable on CLASSPATH and of the form "ClassName" or "OuterClass.InnerClass", not "ClassName.class" or "fully.qualified.ClassName"
-ERROR_LOADING_CLASS = \u8F09\u5165 {1} \u4E2D\u5217\u51FA\u7684\u985E\u5225 "{0}" \u6642\u767C\u751F\u932F\u8AA4, \u8ACB\u78BA\u5B9A\u53EF\u5728\u985E\u5225\u8DEF\u5F91\u4E2D\u5B58\u53D6\u8A72\u9805\u76EE, \u4E14\u683C\u5F0F\u70BA "ClassName" \u6216 "OuterClass.InnerClass", \u800C\u975E "ClassName.class" \u6216 "fully.qualified.ClassName"
-
-INVALID_PROPERTY_VALUE = {1} \u4E0D\u662F\u7279\u6027 "{0}" \u7684\u6709\u6548\u503C
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_PROPERTY = \u4E0D\u652F\u63F4\u7279\u6027 "{0}"
-
-#{0} - package name. e.g.: "foo.bar" doesn't contain ObjectFactory.class or jaxb.index
-BROKEN_CONTEXTPATH = "{0}" \u672A\u5305\u542B ObjectFactory.class \u6216 jaxb.index
-
-NO_DEFAULT_CONSTRUCTOR_IN_INNER_CLASS = "{0}" \u662F\u5167\u90E8\u985E\u5225, \u56E0\u6B64\u6C38\u9060\u4E0D\u80FD\u6709\u9810\u8A2D\u7684\u7121\u5F15\u6578\u5EFA\u69CB\u5B50. \u8ACB\u65B0\u589E ''static''.
-
-INVALID_TYPE_IN_MAP = \u5C0D\u61C9\u5305\u542B\u932F\u8AA4\u7684\u985E\u578B
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/TODO.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/TODO.java
deleted file mode 100644
index 1490d07d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/TODO.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2;
-
-/**
- * Place holder for TODOs.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public abstract class TODO {
- /**
- * When this method is called,
- * that means we need to check the spec and corrects
- * the behavior.
- *
- * Search the usage of this method.
- */
- public static void checkSpec() {}
- public static void checkSpec(String comment) {}
-
- /**
- * When this method iscalled,
- * that means the current code is a mock up and
- * it needs to be properly implemented later.
- */
- public static void prototype() {}
-
- public static void prototype(String comment) {}
-
- /**
- * When this method is called, it means that there is an
- * unimplemeted portion of the spec in the schema generator.
- */
- public static void schemaGenerator(String comment) {}
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/WellKnownNamespace.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/WellKnownNamespace.java
deleted file mode 100644
index 94eabffa..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/WellKnownNamespace.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2;
-
-import javax.xml.XMLConstants;
-
-/**
- * Well-known namespace URIs.
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com), Martin Grebac (martin.grebac@oracle.com)
- * @since 2.0
- */
-public abstract class WellKnownNamespace {
- private WellKnownNamespace() {} // no instanciation please
-
- /**
- * @deprecated Use javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI instead;
- * @return
- * @throws CloneNotSupportedException
- */
- @Deprecated()
- public static final String XML_SCHEMA = XMLConstants.W3C_XML_SCHEMA_NS_URI;
-
- /**
- * @deprecated Use javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI instead
- * @return
- * @throws CloneNotSupportedException
- */
- @Deprecated()
- public static final String XML_SCHEMA_INSTANCE = XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI;
-
- /**
- * @deprecated Use javax.xml.XMLConstants.XML_NS_URI instead;
- * @return
- * @throws CloneNotSupportedException
- */
- @Deprecated()
- public static final String XML_NAMESPACE_URI = XMLConstants.XML_NS_URI;
-
- public static final String XOP = "http://www.w3.org/2004/08/xop/include";
-
- public static final String SWA_URI = "http://ws-i.org/profiles/basic/1.1/xsd";
-
- public static final String XML_MIME_URI = "http://www.w3.org/2005/05/xmlmime";
-
- public static final String JAXB = "http://java.sun.com/xml/ns/jaxb";
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/bytecode/ClassTailor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/bytecode/ClassTailor.java
deleted file mode 100644
index 7a53300c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/bytecode/ClassTailor.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.bytecode;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import com.sun.xml.internal.bind.Util;
-
-/**
- * Replaces a few constant pool tokens from a class "template" and then loads it into the VM.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class ClassTailor {
-
- private ClassTailor() {} // no instanciation please
-
- private static final Logger logger = Util.getClassLogger();
-
- /**
- * Returns the class name in the JVM format (such as "java/lang/String")
- */
- public static String toVMClassName( Class c ) {
- assert !c.isPrimitive();
- if(c.isArray())
- // I have no idea why it is designed like this, but javap says so.
- return toVMTypeName(c);
- return c.getName().replace('.','/');
- }
-
- public static String toVMTypeName( Class c ) {
- if(c.isArray()) {
- // TODO: study how an array type is encoded.
- return '['+toVMTypeName(c.getComponentType());
- }
- if(c.isPrimitive()) {
- if(c==Boolean.TYPE) return "Z";
- if(c==Character.TYPE) return "C";
- if(c==Byte.TYPE) return "B";
- if(c==Double.TYPE) return "D";
- if(c==Float.TYPE) return "F";
- if(c==Integer.TYPE) return "I";
- if(c==Long.TYPE) return "J";
- if(c==Short.TYPE) return "S";
-
- throw new IllegalArgumentException(c.getName());
- }
- return 'L'+c.getName().replace('.','/')+';';
- }
-
-
-
- public static byte[] tailor( Class templateClass, String newClassName, String... replacements ) {
- String vmname = toVMClassName(templateClass);
- return tailor(
- SecureLoader.getClassClassLoader(templateClass).getResourceAsStream(vmname+".class"),
- vmname, newClassName, replacements );
- }
-
-
- /**
- * Customizes a class file by replacing constant pools.
- *
- * @param image
- * The image of the template class.
- * @param replacements
- * A list of pair of strings that specify the substitution
- * {@code String[]{search_0, replace_0, search_1, replace_1, ..., search_n, replace_n }}
- *
- * The search strings found in the constant pool will be replaced by the corresponding
- * replacement string.
- */
- public static byte[] tailor( InputStream image, String templateClassName, String newClassName, String... replacements ) {
- DataInputStream in = new DataInputStream(image);
-
- try {
- ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
- DataOutputStream out = new DataOutputStream(baos);
-
- // skip until the constant pool count
- long l = in.readLong();
- out.writeLong(l);
-
- // read the constant pool size
- short count = in.readShort();
- out.writeShort(count);
-
- // replace constant pools
- for( int i=0; i<count; i++ ) {
- byte tag = in.readByte();
- out.writeByte(tag);
- switch(tag) {
- case 0:
- // this isn't described in the spec,
- // but class files often seem to have this '0' tag.
- // we can apparently just ignore it, but not sure
- // what this really means.
- break;
-
- case 1: // CONSTANT_UTF8
- {
- String value = in.readUTF();
- if(value.equals(templateClassName))
- value = newClassName;
- else {
- for( int j=0; j<replacements.length; j+=2 )
- if(value.equals(replacements[j])) {
- value = replacements[j+1];
- break;
- }
- }
- out.writeUTF(value);
- }
- break;
-
- case 3: // CONSTANT_Integer
- case 4: // CONSTANT_Float
- out.writeInt(in.readInt());
- break;
-
- case 5: // CONSTANT_Long
- case 6: // CONSTANT_Double
- i++; // doubles and longs take two entries
- out.writeLong(in.readLong());
- break;
-
- case 7: // CONSTANT_Class
- case 8: // CONSTANT_String
- out.writeShort(in.readShort());
- break;
-
- case 9: // CONSTANT_Fieldref
- case 10: // CONSTANT_Methodref
- case 11: // CONSTANT_InterfaceMethodref
- case 12: // CONSTANT_NameAndType
- out.writeInt(in.readInt());
- break;
-
- default:
- throw new IllegalArgumentException("Unknown constant type "+tag);
- }
- }
-
- // then copy the rest
- byte[] buf = new byte[512];
- int len;
- while((len=in.read(buf))>0)
- out.write(buf,0,len);
-
- in.close();
- out.close();
-
- // by now we got the properly tailored class file image
- return baos.toByteArray();
-
- } catch( IOException e ) {
- // never happen
- logger.log(Level.WARNING,"failed to tailor",e);
- return null;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/bytecode/SecureLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/bytecode/SecureLoader.java
deleted file mode 100644
index 90e0454b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/bytecode/SecureLoader.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.bytecode;
-
-/**
- * Class defined for safe calls of getClassLoader methods of any kind (context/system/class
- * classloader. This MUST be package private and defined in every package which
- * uses such invocations.
- * @author snajper
- */
-class SecureLoader {
-
- static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/bytecode/package.html b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/bytecode/package.html
deleted file mode 100644
index 7d854599..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/bytecode/package.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-
-
-<body>
- Code that deals with low level byte code manipulation.
-</body>
-</html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/AbstractInlineAnnotationReaderImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/AbstractInlineAnnotationReaderImpl.java
deleted file mode 100644
index 4651cb61..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/AbstractInlineAnnotationReaderImpl.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-
-import com.sun.xml.internal.bind.v2.model.core.ErrorHandler;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-
-/**
- * {@link AnnotationReader} that reads annotation from classes,
- * not from external binding files.
- *
- * This is meant to be used as a convenient partial implementation.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public abstract class AbstractInlineAnnotationReaderImpl<T,C,F,M>
- implements AnnotationReader<T,C,F,M> {
-
- private ErrorHandler errorHandler;
-
- public void setErrorHandler(ErrorHandler errorHandler) {
- if(errorHandler==null)
- throw new IllegalArgumentException();
- this.errorHandler = errorHandler;
- }
-
- /**
- * Always return a non-null valid {@link ErrorHandler}
- */
- public final ErrorHandler getErrorHandler() {
- assert errorHandler!=null : "error handler must be set before use";
- return errorHandler;
- }
-
- public final <A extends Annotation> A getMethodAnnotation(Class<A> annotation, M getter, M setter, Locatable srcPos) {
- A a1 = getter==null?null:getMethodAnnotation(annotation,getter,srcPos);
- A a2 = setter==null?null:getMethodAnnotation(annotation,setter,srcPos);
-
- if(a1==null) {
- if(a2==null)
- return null;
- else
- return a2;
- } else {
- if(a2==null)
- return a1;
- else {
- // both are present
- getErrorHandler().error(new IllegalAnnotationException(
- Messages.DUPLICATE_ANNOTATIONS.format(
- annotation.getName(), fullName(getter),fullName(setter)),
- a1, a2 ));
- // recover by ignoring one of them
- return a1;
- }
- }
- }
-
- public boolean hasMethodAnnotation(Class<? extends Annotation> annotation, String propertyName, M getter, M setter, Locatable srcPos) {
- boolean x = ( getter != null && hasMethodAnnotation(annotation, getter) );
- boolean y = ( setter != null && hasMethodAnnotation(annotation, setter) );
-
- if(x && y) {
- // both are present. have getMethodAnnotation report an error
- getMethodAnnotation(annotation,getter,setter,srcPos);
- }
-
- return x||y;
- }
-
- /**
- * Gets the fully-qualified name of the method.
- *
- * Used for error messages.
- */
- protected abstract String fullName(M m);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/AnnotationReader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/AnnotationReader.java
deleted file mode 100644
index b0c13a06..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/AnnotationReader.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.bind.v2.model.core.ErrorHandler;
-
-/**
- * Reads annotations for the given property.
- *
- * <p>
- * This is the lowest abstraction that encapsulates the difference
- * between reading inline annotations and external binding files.
- *
- * <p>
- * Because the former operates on a {@link Field} and {@link Method}
- * while the latter operates on a "property", the methods defined
- * on this interface takes both, and the callee gets to choose which
- * to use.
- *
- * <p>
- * Most of the get method takes {@link Locatable}, which points to
- * the place/context in which the annotation is read. The returned
- * annotation also implements {@link Locatable} (so that it can
- * point to the place where the annotation is placed), and its
- * {@link Locatable#getUpstream()} will return the given
- * {@link Locatable}.
- *
- *
- * <p>
- * Errors found during reading annotations are reported through the error handler.
- * A valid {@link ErrorHandler} must be registered before the {@link AnnotationReader}
- * is used.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public interface AnnotationReader<T,C,F,M> {
-
- /**
- * Sets the error handler that receives errors found
- * during reading annotations.
- *
- * @param errorHandler
- * must not be null.
- */
- void setErrorHandler(ErrorHandler errorHandler);
-
- /**
- * Reads an annotation on a property that consists of a field.
- */
- <A extends Annotation> A getFieldAnnotation(Class<A> annotation,
- F field, Locatable srcpos);
-
- /**
- * Checks if the given field has an annotation.
- */
- boolean hasFieldAnnotation(Class<? extends Annotation> annotationType, F field);
-
- /**
- * Checks if a class has the annotation.
- */
- boolean hasClassAnnotation(C clazz, Class<? extends Annotation> annotationType);
-
- /**
- * Gets all the annotations on a field.
- */
- Annotation[] getAllFieldAnnotations(F field, Locatable srcPos);
-
- /**
- * Reads an annotation on a property that consists of a getter and a setter.
- *
- */
- <A extends Annotation> A getMethodAnnotation(Class<A> annotation,
- M getter, M setter, Locatable srcpos);
-
- /**
- * Checks if the given method has an annotation.
- */
- boolean hasMethodAnnotation(Class<? extends Annotation> annotation, String propertyName, M getter, M setter, Locatable srcPos);
-
- /**
- * Gets all the annotations on a method.
- *
- * @param srcPos
- * the location from which this annotation is read.
- */
- Annotation[] getAllMethodAnnotations(M method, Locatable srcPos);
-
- // TODO: we do need this to read certain annotations,
- // but that shows inconsistency wrt the spec. consult the spec team about the abstraction.
- <A extends Annotation> A getMethodAnnotation(Class<A> annotation, M method, Locatable srcpos );
-
- boolean hasMethodAnnotation(Class<? extends Annotation> annotation, M method );
-
- /**
- * Reads an annotation on a parameter of the method.
- *
- * @return null
- * if the annotation was not found.
- */
- @Nullable
- <A extends Annotation> A getMethodParameterAnnotation(
- Class<A> annotation, M method, int paramIndex, Locatable srcPos );
-
- /**
- * Reads an annotation on a class.
- */
- @Nullable
- <A extends Annotation> A getClassAnnotation(Class<A> annotation, C clazz, Locatable srcpos) ;
-
- /**
- * Reads an annotation on the package that the given class belongs to.
- */
- @Nullable
- <A extends Annotation> A getPackageAnnotation(Class<A> annotation, C clazz, Locatable srcpos);
-
- /**
- * Reads a value of an annotation that returns a Class object.
- *
- * <p>
- * Depending on the underlying reflection library, you can't always
- * obtain the {@link Class} object directly (see the Annotation Processing MirrorTypeException
- * for example), so use this method to avoid that.
- *
- * @param name
- * The name of the annotation parameter to be read.
- */
- T getClassValue( Annotation a, String name );
-
- /**
- * Similar to {@link #getClassValue(Annotation, String)} method but
- * obtains an array parameter.
- */
- T[] getClassArrayValue( Annotation a, String name );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/AnnotationSource.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/AnnotationSource.java
deleted file mode 100644
index f1290079..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/AnnotationSource.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-
-/**
- * Implemented by objects that can have annotations.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface AnnotationSource {
- /**
- * Gets the value of the specified annotation from the given property.
- *
- * <p>
- * When this method is used for a property that consists of a getter and setter,
- * it returns the annotation on either of those methods. If both methods have
- * the same annotation, it is an error.
- *
- * @return
- * null if the annotation is not present.
- */
- <A extends Annotation> A readAnnotation(Class<A> annotationType);
-
- /**
- * Returns true if the property has the specified annotation.
- * <p>
- * Short for <code>readAnnotation(annotationType)!=null</code>,
- * but this method is typically faster.
- */
- boolean hasAnnotation(Class<? extends Annotation> annotationType);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/ClassLocatable.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/ClassLocatable.java
deleted file mode 100644
index 8c5d519d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/ClassLocatable.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-
-/**
- * {@link Locatable} implementation for a class.
- *
- * @author Kohsuke Kawaguchi
- */
-public class ClassLocatable<C> implements Locatable {
- private final Locatable upstream;
- private final C clazz;
- private final Navigator<?,C,?,?> nav;
-
- public ClassLocatable(Locatable upstream, C clazz, Navigator<?,C,?,?> nav) {
- this.upstream = upstream;
- this.clazz = clazz;
- this.nav = nav;
- }
-
- public Locatable getUpstream() {
- return upstream;
- }
-
- public Location getLocation() {
- return nav.getClassLocation(clazz);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/FieldLocatable.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/FieldLocatable.java
deleted file mode 100644
index 1a14205c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/FieldLocatable.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-
-/**
- * {@link Locatable} implementation for a field.
- *
- * @author Kohsuke Kawaguchi
- */
-public class FieldLocatable<F> implements Locatable {
- private final Locatable upstream;
- private final F field;
- private final Navigator<?,?,F,?> nav;
-
- public FieldLocatable(Locatable upstream, F field, Navigator<?,?,F,?> nav) {
- this.upstream = upstream;
- this.field = field;
- this.nav = nav;
- }
-
- public Locatable getUpstream() {
- return upstream;
- }
-
- public Location getLocation() {
- return nav.getFieldLocation(field);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Init.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Init.java
deleted file mode 100644
index fd53efd4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Init.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-/**
- * <p><b>Auto-generated, do not edit.</b></p>
- *
- */
-class Init {
-
-
- static Quick[] getAll() {
- return new Quick[] {new XmlAttributeQuick(null, null), new XmlElementQuick(null, null), new XmlElementDeclQuick(null, null), new XmlElementRefQuick(null, null), new XmlElementRefsQuick(null, null), new XmlEnumQuick(null, null), new XmlRootElementQuick(null, null), new XmlSchemaQuick(null, null), new XmlSchemaTypeQuick(null, null), new XmlTransientQuick(null, null), new XmlTypeQuick(null, null), new XmlValueQuick(null, null)};
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Locatable.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Locatable.java
deleted file mode 100644
index ef542b44..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Locatable.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import com.sun.xml.internal.bind.v2.runtime.Location;
-
-/**
- * {@link Location} that is chained.
- *
- * <p>
- * {@link Locatable} forms a tree structure, where each {@link Locatable}
- * points back to the upstream {@link Locatable}.
- * For example, imagine {@link Locatable} X that points to a particular annotation,
- * whose upstream is {@link Locatable} Y, which points to a particular method
- * (on which the annotation is put), whose upstream is {@link Locatable} Z,
- * which points to a particular class (in which the method is defined),
- * whose upstream is {@link Locatable} W,
- * which points to another class (which refers to the class Z), and so on.
- *
- * <p>
- * This chain will be turned into a list when we report the error to users.
- * This allows them to know where the error happened
- * and why that place became relevant.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface Locatable {
- /**
- * Gets the upstream {@link Location} information.
- *
- * @return
- * can be null.
- */
- Locatable getUpstream();
-
- /**
- * Gets the location object that this object points to.
- *
- * This operation could be inefficient and costly.
- */
- Location getLocation();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/LocatableAnnotation.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/LocatableAnnotation.java
deleted file mode 100644
index 45709c48..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/LocatableAnnotation.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.lang.reflect.Modifier;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.sun.xml.internal.bind.v2.runtime.Location;
-
-/**
- * {@link Annotation} that also implements {@link Locatable}.
- *
- * @author Kohsuke Kawaguchi
- */
-public class LocatableAnnotation implements InvocationHandler, Locatable, Location {
- private final Annotation core;
-
- private final Locatable upstream;
-
- /**
- * Wraps the annotation into a proxy so that the returned object will also implement
- * {@link Locatable}.
- */
- public static <A extends Annotation> A create( A annotation, Locatable parentSourcePos ) {
- if(annotation==null) return null;
- Class<? extends Annotation> type = annotation.annotationType();
- if(quicks.containsKey(type)) {
- // use the existing proxy implementation if available
- return (A)quicks.get(type).newInstance(parentSourcePos,annotation);
- }
-
- // otherwise take the slow route
-
- ClassLoader cl = SecureLoader.getClassClassLoader(LocatableAnnotation.class);
-
- try {
- Class loadableT = Class.forName(type.getName(), false, cl);
- if(loadableT !=type)
- return annotation; // annotation type not loadable from this class loader
-
- return (A)Proxy.newProxyInstance(cl,
- new Class[]{ type, Locatable.class },
- new LocatableAnnotation(annotation,parentSourcePos));
- } catch (ClassNotFoundException e) {
- // annotation not loadable
- return annotation;
- } catch (IllegalArgumentException e) {
- // Proxy.newProxyInstance throws this if it cannot resolve this annotation
- // in this classloader
- return annotation;
- }
-
- }
-
- LocatableAnnotation(Annotation core, Locatable upstream) {
- this.core = core;
- this.upstream = upstream;
- }
-
- public Locatable getUpstream() {
- return upstream;
- }
-
- public Location getLocation() {
- return this;
- }
-
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- try {
- if(method.getDeclaringClass()==Locatable.class)
- return method.invoke(this,args);
- if(Modifier.isStatic(method.getModifiers()))
- // malicious code can pass in a static Method object.
- // doing method.invoke() would end up executing it,
- // so we need to protect against it.
- throw new IllegalArgumentException();
-
- return method.invoke(core,args);
- } catch (InvocationTargetException e) {
- if(e.getTargetException()!=null)
- throw e.getTargetException();
- throw e;
- }
- }
-
- public String toString() {
- return core.toString();
- }
-
-
- /**
- * List of {@link Quick} implementations keyed by their annotation type.
- */
- private static final Map<Class,Quick> quicks = new HashMap<Class, Quick>();
-
- static {
- for( Quick q : Init.getAll() ) {
- quicks.put(q.annotationType(),q);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages.java
deleted file mode 100644
index 951e2e52..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Message resources
- */
-enum Messages {
- // AnnotationParser
- DUPLICATE_ANNOTATIONS,
- CLASS_NOT_FOUND
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
-
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages.properties
deleted file mode 100644
index 866807d2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DUPLICATE_ANNOTATIONS = \
- Annotation "{0}" is present on both "{1}" and "{2}"
-
-CLASS_NOT_FOUND = \
- \nError occured while invoking reflection on target classes. Make sure all referenced classes are on classpath: {0} \
- \nException: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_de.properties
deleted file mode 100644
index cfaa7bac..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_de.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DUPLICATE_ANNOTATIONS = Annotation "{0}" ist sowohl f\u00FCr "{1}" als auch f\u00FCr "{2}" vorhanden
-
-CLASS_NOT_FOUND = \nFehler beim Aufruf von Reflektion auf Zielklassen. Stellen Sie sicher, dass alle referenzierten Klassen im Classpath vorhanden sind: {0} \nAusnahme: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_es.properties
deleted file mode 100644
index f64f41ff..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_es.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DUPLICATE_ANNOTATIONS = La anotaci\u00F3n "{0}" se encuentra en "{1}" y en "{2}"
-
-CLASS_NOT_FOUND = \nSe ha producido un error al llamar a la reflexi\u00F3n en las clases de destino. Aseg\u00FArese de que todas las clases a las que se hace referencia se encuentran en la classpath: {0} \nExcepci\u00F3n: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_fr.properties
deleted file mode 100644
index a26137bc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_fr.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DUPLICATE_ANNOTATIONS = L''annotation "{0}" figure \u00E0 la fois sur "{1}" et "{2}"
-
-CLASS_NOT_FOUND = \nUne erreur s''est produite lors de l''appel de Reflection sur les classes cible. Assurez-vous que toutes les classes r\u00E9f\u00E9renc\u00E9es figurent sur le classpath {0} \nException : {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_it.properties
deleted file mode 100644
index 32f2f610..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_it.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DUPLICATE_ANNOTATIONS = L''annotazione "{0}" \u00E8 presente su "{1}" e su "{2}"
-
-CLASS_NOT_FOUND = \nSi \u00E8 verificato un errore durante il richiamo della riflessione sulle classi di destinazione. Assicurarsi che tutte le classi di riferimento si trovino sul classpath: {0} \nEccezione: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_ja.properties
deleted file mode 100644
index ea144a84..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_ja.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DUPLICATE_ANNOTATIONS = \u6CE8\u91C8"{0}"\u306F"{1}"\u3068"{2}"\u306E\u4E21\u65B9\u306B\u5B58\u5728\u3057\u307E\u3059
-
-CLASS_NOT_FOUND = \n\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30AF\u30E9\u30B9\u3067\u306E\u30EA\u30D5\u30EC\u30AF\u30B7\u30E7\u30F3\u306E\u547C\u51FA\u3057\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u53C2\u7167\u3055\u308C\u308B\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u304C\u30AF\u30E9\u30B9\u30D1\u30B9\u306B\u5B58\u5728\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044: {0}\n\u4F8B\u5916: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_ko.properties
deleted file mode 100644
index af6944e2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_ko.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DUPLICATE_ANNOTATIONS = "{0}" \uC8FC\uC11D\uC774 "{1}"\uACFC(\uC640) "{2}", \uB450 \uC704\uCE58\uC5D0 \uC788\uC2B5\uB2C8\uB2E4.
-
-CLASS_NOT_FOUND = \n\uB300\uC0C1 \uD074\uB798\uC2A4\uC5D0\uC11C \uB9AC\uD50C\uB809\uC158\uC744 \uD638\uCD9C\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uCC38\uC870\uB41C \uBAA8\uB4E0 \uD074\uB798\uC2A4\uAC00 \uD074\uB798\uC2A4 \uACBD\uB85C {0}\uC5D0 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. \n\uC608\uC678 \uC0AC\uD56D: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_pt_BR.properties
deleted file mode 100644
index 7dd1f59b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_pt_BR.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DUPLICATE_ANNOTATIONS = A anota\u00E7\u00E3o "{0}" est\u00E1 presente em "{1}" e "{2}"
-
-CLASS_NOT_FOUND = \nOcorreu um erro ao chamar a reflex\u00E3o nas classes do alvo. Certifique-se de que todas as classes mencionadas estejam no classpath: {0} \nExce\u00E7\u00E3o: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_zh_CN.properties
deleted file mode 100644
index ca268493..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_zh_CN.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DUPLICATE_ANNOTATIONS = "{1}" \u548C "{2}" \u4E0A\u90FD\u5B58\u5728\u6CE8\u91CA "{0}"
-
-CLASS_NOT_FOUND = \n\u5728\u76EE\u6807\u7C7B\u4E0A\u8C03\u7528\u53CD\u5C04\u65F6\u51FA\u9519\u3002\u8BF7\u786E\u4FDD\u6240\u6709\u5F15\u7528\u7684\u7C7B\u90FD\u4F4D\u4E8E\u7C7B\u8DEF\u5F84\u4E0A: {0} \n\u5F02\u5E38\u9519\u8BEF: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_zh_TW.properties
deleted file mode 100644
index c242b14f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_zh_TW.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-DUPLICATE_ANNOTATIONS = "{1}" \u8207 "{2}"\u90FD\u6709\u8A3B\u89E3 "{0}"
-
-CLASS_NOT_FOUND = \n\u5728\u76EE\u6A19\u985E\u5225\u4E0A\u547C\u53EB\u53CD\u6620\u6642\u767C\u751F\u932F\u8AA4. \u8ACB\u78BA\u5B9A\u6240\u6709\u53C3\u7167\u7684\u985E\u5225\u5747\u4F4D\u65BC\u985E\u5225\u8DEF\u5F91: {0} \n\u7570\u5E38\u72C0\u6CC1: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/MethodLocatable.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/MethodLocatable.java
deleted file mode 100644
index e4a0ed81..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/MethodLocatable.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-
-/**
- * {@link Locatable} implementation for a method.
- *
- * @author Kohsuke Kawaguchi
- */
-public class MethodLocatable<M> implements Locatable {
- private final Locatable upstream;
- private final M method;
- private final Navigator<?,?,?,M> nav;
-
- public MethodLocatable(Locatable upstream, M method, Navigator<?,?,?,M> nav) {
- this.upstream = upstream;
- this.method = method;
- this.nav = nav;
- }
-
- public Locatable getUpstream() {
- return upstream;
- }
-
- public Location getLocation() {
- return nav.getMethodLocation(method);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Quick.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Quick.java
deleted file mode 100644
index ed8f9c04..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Quick.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-
-import com.sun.xml.internal.bind.v2.runtime.Location;
-
-/**
- * Base implementation of {@link Locatable} {@link Annotation}.
- *
- * <p>
- * Derived classes of this class is provided for annotations that are commonly
- * used in JAXB, to improve the performance of {@link LocatableAnnotation#create}.
- *
- * @author Kohsuke Kawaguchi
- */
-public /*so that our code generator can refer to this class*/ abstract class Quick implements Annotation, Locatable, Location {
- private final Locatable upstream;
-
- protected Quick(Locatable upstream) {
- this.upstream = upstream;
- }
-
- /**
- * Gets the annotation object that this object is wrapping.
- */
- protected abstract Annotation getAnnotation();
-
- /**
- * Factory method to create a new instance of the same kind.
- * A {@link Quick} object also works as a factory of itself
- */
- protected abstract Quick newInstance( Locatable upstream, Annotation core );
-
- public final Location getLocation() {
- return this;
- }
-
- public final Locatable getUpstream() {
- return upstream;
- }
-
- public final String toString() {
- return getAnnotation().toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/RuntimeAnnotationReader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/RuntimeAnnotationReader.java
deleted file mode 100644
index 3a3cb281..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/RuntimeAnnotationReader.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeAnnotationReader extends AnnotationReader<Type,Class,Field,Method> {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/RuntimeInlineAnnotationReader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/RuntimeInlineAnnotationReader.java
deleted file mode 100644
index 996d3118..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/RuntimeInlineAnnotationReader.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * {@link AnnotationReader} that uses {@code java.lang.reflect} to
- * read annotations from class files.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public final class RuntimeInlineAnnotationReader extends AbstractInlineAnnotationReaderImpl<Type,Class,Field,Method>
- implements RuntimeAnnotationReader {
-
- public <A extends Annotation> A getFieldAnnotation(Class<A> annotation, Field field, Locatable srcPos) {
- return LocatableAnnotation.create(field.getAnnotation(annotation),srcPos);
- }
-
- public boolean hasFieldAnnotation(Class<? extends Annotation> annotationType, Field field) {
- return field.isAnnotationPresent(annotationType);
- }
-
- public boolean hasClassAnnotation(Class clazz, Class<? extends Annotation> annotationType) {
- return clazz.isAnnotationPresent(annotationType);
- }
-
- public Annotation[] getAllFieldAnnotations(Field field, Locatable srcPos) {
- Annotation[] r = field.getAnnotations();
- for( int i=0; i<r.length; i++ ) {
- r[i] = LocatableAnnotation.create(r[i],srcPos);
- }
- return r;
- }
-
- public <A extends Annotation> A getMethodAnnotation(Class<A> annotation, Method method, Locatable srcPos) {
- return LocatableAnnotation.create(method.getAnnotation(annotation),srcPos);
- }
-
- public boolean hasMethodAnnotation(Class<? extends Annotation> annotation, Method method) {
- return method.isAnnotationPresent(annotation);
- }
-
- public Annotation[] getAllMethodAnnotations(Method method, Locatable srcPos) {
- Annotation[] r = method.getAnnotations();
- for( int i=0; i<r.length; i++ ) {
- r[i] = LocatableAnnotation.create(r[i],srcPos);
- }
- return r;
- }
-
- public <A extends Annotation> A getMethodParameterAnnotation(Class<A> annotation, Method method, int paramIndex, Locatable srcPos) {
- Annotation[] pa = method.getParameterAnnotations()[paramIndex];
- for( Annotation a : pa ) {
- if(a.annotationType()==annotation)
- return LocatableAnnotation.create((A)a,srcPos);
- }
- return null;
- }
-
- public <A extends Annotation> A getClassAnnotation(Class<A> a, Class clazz, Locatable srcPos) {
- return LocatableAnnotation.create(((Class<?>)clazz).getAnnotation(a),srcPos);
- }
-
-
- /**
- * Cache for package-level annotations.
- */
- private final Map<Class<? extends Annotation>,Map<Package,Annotation>> packageCache =
- new HashMap<Class<? extends Annotation>,Map<Package,Annotation>>();
-
- public <A extends Annotation> A getPackageAnnotation(Class<A> a, Class clazz, Locatable srcPos) {
- Package p = clazz.getPackage();
- if(p==null) return null;
-
- Map<Package,Annotation> cache = packageCache.get(a);
- if(cache==null) {
- cache = new HashMap<Package,Annotation>();
- packageCache.put(a,cache);
- }
-
- if(cache.containsKey(p))
- return (A)cache.get(p);
- else {
- A ann = LocatableAnnotation.create(p.getAnnotation(a),srcPos);
- cache.put(p,ann);
- return ann;
- }
- }
-
- public Class getClassValue(Annotation a, String name) {
- try {
- return (Class)a.annotationType().getMethod(name).invoke(a);
- } catch (IllegalAccessException e) {
- // impossible
- throw new IllegalAccessError(e.getMessage());
- } catch (InvocationTargetException e) {
- // impossible
- throw new InternalError(Messages.CLASS_NOT_FOUND.format(a.annotationType(), e.getMessage()));
- } catch (NoSuchMethodException e) {
- throw new NoSuchMethodError(e.getMessage());
- }
- }
-
- public Class[] getClassArrayValue(Annotation a, String name) {
- try {
- return (Class[])a.annotationType().getMethod(name).invoke(a);
- } catch (IllegalAccessException e) {
- // impossible
- throw new IllegalAccessError(e.getMessage());
- } catch (InvocationTargetException e) {
- // impossible
- throw new InternalError(e.getMessage());
- } catch (NoSuchMethodException e) {
- throw new NoSuchMethodError(e.getMessage());
- }
- }
-
- protected String fullName(Method m) {
- return m.getDeclaringClass().getName()+'#'+m.getName();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/SecureLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/SecureLoader.java
deleted file mode 100644
index 3e3a4702..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/SecureLoader.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-/**
- * Class defined for safe calls of getClassLoader methods of any kind (context/system/class
- * classloader. This MUST be package private and defined in every package which
- * uses such invocations.
- * @author snajper
- */
-class SecureLoader {
-
- static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlAttributeQuick.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlAttributeQuick.java
deleted file mode 100644
index a7dee028..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlAttributeQuick.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import javax.xml.bind.annotation.XmlAttribute;
-
-
-/**
- * <p><b>Auto-generated, do not edit.</b></p>
- *
- */
-final class XmlAttributeQuick
- extends Quick
- implements XmlAttribute
-{
-
- private final XmlAttribute core;
-
- public XmlAttributeQuick(Locatable upstream, XmlAttribute core) {
- super(upstream);
- this.core = core;
- }
-
- protected Annotation getAnnotation() {
- return core;
- }
-
- protected Quick newInstance(Locatable upstream, Annotation core) {
- return new XmlAttributeQuick(upstream, ((XmlAttribute) core));
- }
-
- public Class<XmlAttribute> annotationType() {
- return XmlAttribute.class;
- }
-
- public String name() {
- return core.name();
- }
-
- public String namespace() {
- return core.namespace();
- }
-
- public boolean required() {
- return core.required();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementDeclQuick.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementDeclQuick.java
deleted file mode 100644
index 1bd5e568..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementDeclQuick.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import javax.xml.bind.annotation.XmlElementDecl;
-
-
-/**
- * <p><b>Auto-generated, do not edit.</b></p>
- *
- */
-final class XmlElementDeclQuick
- extends Quick
- implements XmlElementDecl
-{
-
- private final XmlElementDecl core;
-
- public XmlElementDeclQuick(Locatable upstream, XmlElementDecl core) {
- super(upstream);
- this.core = core;
- }
-
- protected Annotation getAnnotation() {
- return core;
- }
-
- protected Quick newInstance(Locatable upstream, Annotation core) {
- return new XmlElementDeclQuick(upstream, ((XmlElementDecl) core));
- }
-
- public Class<XmlElementDecl> annotationType() {
- return XmlElementDecl.class;
- }
-
- public String name() {
- return core.name();
- }
-
- public Class scope() {
- return core.scope();
- }
-
- public String namespace() {
- return core.namespace();
- }
-
- public String defaultValue() {
- return core.defaultValue();
- }
-
- public String substitutionHeadNamespace() {
- return core.substitutionHeadNamespace();
- }
-
- public String substitutionHeadName() {
- return core.substitutionHeadName();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementQuick.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementQuick.java
deleted file mode 100644
index b745944d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementQuick.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import javax.xml.bind.annotation.XmlElement;
-
-
-/**
- * <p><b>Auto-generated, do not edit.</b></p>
- *
- */
-final class XmlElementQuick
- extends Quick
- implements XmlElement
-{
-
- private final XmlElement core;
-
- public XmlElementQuick(Locatable upstream, XmlElement core) {
- super(upstream);
- this.core = core;
- }
-
- protected Annotation getAnnotation() {
- return core;
- }
-
- protected Quick newInstance(Locatable upstream, Annotation core) {
- return new XmlElementQuick(upstream, ((XmlElement) core));
- }
-
- public Class<XmlElement> annotationType() {
- return XmlElement.class;
- }
-
- public String name() {
- return core.name();
- }
-
- public Class type() {
- return core.type();
- }
-
- public String namespace() {
- return core.namespace();
- }
-
- public String defaultValue() {
- return core.defaultValue();
- }
-
- public boolean required() {
- return core.required();
- }
-
- public boolean nillable() {
- return core.nillable();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementRefQuick.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementRefQuick.java
deleted file mode 100644
index dffbe66c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementRefQuick.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import javax.xml.bind.annotation.XmlElementRef;
-
-
-/**
- * <p><b>Auto-generated, do not edit.</b></p>
- *
- */
-final class XmlElementRefQuick
- extends Quick
- implements XmlElementRef
-{
-
- private final XmlElementRef core;
-
- public XmlElementRefQuick(Locatable upstream, XmlElementRef core) {
- super(upstream);
- this.core = core;
- }
-
- protected Annotation getAnnotation() {
- return core;
- }
-
- protected Quick newInstance(Locatable upstream, Annotation core) {
- return new XmlElementRefQuick(upstream, ((XmlElementRef) core));
- }
-
- public Class<XmlElementRef> annotationType() {
- return XmlElementRef.class;
- }
-
- public String name() {
- return core.name();
- }
-
- public Class type() {
- return core.type();
- }
-
- public String namespace() {
- return core.namespace();
- }
-
- public boolean required() {
- return core.required();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementRefsQuick.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementRefsQuick.java
deleted file mode 100644
index a5ef63bd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlElementRefsQuick.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlElementRefs;
-
-
-/**
- * <p><b>Auto-generated, do not edit.</b></p>
- *
- */
-final class XmlElementRefsQuick
- extends Quick
- implements XmlElementRefs
-{
-
- private final XmlElementRefs core;
-
- public XmlElementRefsQuick(Locatable upstream, XmlElementRefs core) {
- super(upstream);
- this.core = core;
- }
-
- protected Annotation getAnnotation() {
- return core;
- }
-
- protected Quick newInstance(Locatable upstream, Annotation core) {
- return new XmlElementRefsQuick(upstream, ((XmlElementRefs) core));
- }
-
- public Class<XmlElementRefs> annotationType() {
- return XmlElementRefs.class;
- }
-
- public XmlElementRef[] value() {
- return core.value();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlEnumQuick.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlEnumQuick.java
deleted file mode 100644
index 540ce654..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlEnumQuick.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import javax.xml.bind.annotation.XmlEnum;
-
-
-/**
- * <p><b>Auto-generated, do not edit.</b></p>
- *
- */
-final class XmlEnumQuick
- extends Quick
- implements XmlEnum
-{
-
- private final XmlEnum core;
-
- public XmlEnumQuick(Locatable upstream, XmlEnum core) {
- super(upstream);
- this.core = core;
- }
-
- protected Annotation getAnnotation() {
- return core;
- }
-
- protected Quick newInstance(Locatable upstream, Annotation core) {
- return new XmlEnumQuick(upstream, ((XmlEnum) core));
- }
-
- public Class<XmlEnum> annotationType() {
- return XmlEnum.class;
- }
-
- public Class value() {
- return core.value();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlRootElementQuick.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlRootElementQuick.java
deleted file mode 100644
index fcf5eda3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlRootElementQuick.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import javax.xml.bind.annotation.XmlRootElement;
-
-
-/**
- * <p><b>Auto-generated, do not edit.</b></p>
- *
- */
-final class XmlRootElementQuick
- extends Quick
- implements XmlRootElement
-{
-
- private final XmlRootElement core;
-
- public XmlRootElementQuick(Locatable upstream, XmlRootElement core) {
- super(upstream);
- this.core = core;
- }
-
- protected Annotation getAnnotation() {
- return core;
- }
-
- protected Quick newInstance(Locatable upstream, Annotation core) {
- return new XmlRootElementQuick(upstream, ((XmlRootElement) core));
- }
-
- public Class<XmlRootElement> annotationType() {
- return XmlRootElement.class;
- }
-
- public String name() {
- return core.name();
- }
-
- public String namespace() {
- return core.namespace();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlSchemaQuick.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlSchemaQuick.java
deleted file mode 100644
index f1862ba9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlSchemaQuick.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import javax.xml.bind.annotation.XmlNs;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlSchema;
-
-
-/**
- * <p><b>Auto-generated, do not edit.</b></p>
- *
- */
-final class XmlSchemaQuick
- extends Quick
- implements XmlSchema
-{
-
- private final XmlSchema core;
-
- public XmlSchemaQuick(Locatable upstream, XmlSchema core) {
- super(upstream);
- this.core = core;
- }
-
- protected Annotation getAnnotation() {
- return core;
- }
-
- protected Quick newInstance(Locatable upstream, Annotation core) {
- return new XmlSchemaQuick(upstream, ((XmlSchema) core));
- }
-
- public Class<XmlSchema> annotationType() {
- return XmlSchema.class;
- }
-
- public String location() {
- return core.location();
- }
-
- public String namespace() {
- return core.namespace();
- }
-
- public XmlNs[] xmlns() {
- return core.xmlns();
- }
-
- public XmlNsForm elementFormDefault() {
- return core.elementFormDefault();
- }
-
- public XmlNsForm attributeFormDefault() {
- return core.attributeFormDefault();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlSchemaTypeQuick.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlSchemaTypeQuick.java
deleted file mode 100644
index 58f6ecda..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlSchemaTypeQuick.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import javax.xml.bind.annotation.XmlSchemaType;
-
-
-/**
- * <p><b>Auto-generated, do not edit.</b></p>
- *
- */
-final class XmlSchemaTypeQuick
- extends Quick
- implements XmlSchemaType
-{
-
- private final XmlSchemaType core;
-
- public XmlSchemaTypeQuick(Locatable upstream, XmlSchemaType core) {
- super(upstream);
- this.core = core;
- }
-
- protected Annotation getAnnotation() {
- return core;
- }
-
- protected Quick newInstance(Locatable upstream, Annotation core) {
- return new XmlSchemaTypeQuick(upstream, ((XmlSchemaType) core));
- }
-
- public Class<XmlSchemaType> annotationType() {
- return XmlSchemaType.class;
- }
-
- public String name() {
- return core.name();
- }
-
- public Class type() {
- return core.type();
- }
-
- public String namespace() {
- return core.namespace();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlTransientQuick.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlTransientQuick.java
deleted file mode 100644
index 0200bad8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlTransientQuick.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import javax.xml.bind.annotation.XmlTransient;
-
-
-/**
- * <p><b>Auto-generated, do not edit.</b></p>
- *
- */
-final class XmlTransientQuick
- extends Quick
- implements XmlTransient
-{
-
- private final XmlTransient core;
-
- public XmlTransientQuick(Locatable upstream, XmlTransient core) {
- super(upstream);
- this.core = core;
- }
-
- protected Annotation getAnnotation() {
- return core;
- }
-
- protected Quick newInstance(Locatable upstream, Annotation core) {
- return new XmlTransientQuick(upstream, ((XmlTransient) core));
- }
-
- public Class<XmlTransient> annotationType() {
- return XmlTransient.class;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlTypeQuick.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlTypeQuick.java
deleted file mode 100644
index abb8541b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlTypeQuick.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p><b>Auto-generated, do not edit.</b></p>
- *
- */
-final class XmlTypeQuick
- extends Quick
- implements XmlType
-{
-
- private final XmlType core;
-
- public XmlTypeQuick(Locatable upstream, XmlType core) {
- super(upstream);
- this.core = core;
- }
-
- protected Annotation getAnnotation() {
- return core;
- }
-
- protected Quick newInstance(Locatable upstream, Annotation core) {
- return new XmlTypeQuick(upstream, ((XmlType) core));
- }
-
- public Class<XmlType> annotationType() {
- return XmlType.class;
- }
-
- public String name() {
- return core.name();
- }
-
- public String namespace() {
- return core.namespace();
- }
-
- public String[] propOrder() {
- return core.propOrder();
- }
-
- public Class factoryClass() {
- return core.factoryClass();
- }
-
- public String factoryMethod() {
- return core.factoryMethod();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlValueQuick.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlValueQuick.java
deleted file mode 100644
index fdc0cb24..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/XmlValueQuick.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.annotation;
-
-import java.lang.annotation.Annotation;
-import javax.xml.bind.annotation.XmlValue;
-
-
-/**
- * <p><b>Auto-generated, do not edit.</b></p>
- *
- */
-final class XmlValueQuick
- extends Quick
- implements XmlValue
-{
-
- private final XmlValue core;
-
- public XmlValueQuick(Locatable upstream, XmlValue core) {
- super(upstream);
- this.core = core;
- }
-
- protected Annotation getAnnotation() {
- return core;
- }
-
- protected Quick newInstance(Locatable upstream, Annotation core) {
- return new XmlValueQuick(upstream, ((XmlValue) core));
- }
-
- public Class<XmlValue> annotationType() {
- return XmlValue.class;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/package.html b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/package.html
deleted file mode 100644
index bf2a7812..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
- Abstraction around reading annotations, to support internal/external annotations.
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/Adapter.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/Adapter.java
deleted file mode 100644
index c147c0e1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/Adapter.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-/**
- * {@link Adapter} that wraps {@link XmlJavaTypeAdapter}.
- *
- * @author Kohsuke Kawaguchi
- */
-public class Adapter<TypeT,ClassDeclT> {
- /**
- * The adapter class. Always non-null.
- *
- * A class that derives from {@link javax.xml.bind.annotation.adapters.XmlAdapter}.
- */
- public final ClassDeclT adapterType;
-
- /**
- * The type that the JAXB can handle natively.
- * The <tt>Default</tt> parameter of <tt>XmlAdapter&lt;Default,Custom></tt>.
- *
- * Always non-null.
- */
- public final TypeT defaultType;
-
- /**
- * The type that is stored in memory.
- * The <tt>Custom</tt> parameter of <tt>XmlAdapter&lt;Default,Custom></tt>.
- */
- public final TypeT customType;
-
-
-
- public Adapter(
- XmlJavaTypeAdapter spec,
- AnnotationReader<TypeT,ClassDeclT,?,?> reader,
- Navigator<TypeT,ClassDeclT,?,?> nav) {
-
- this( nav.asDecl(reader.getClassValue(spec,"value")), nav );
- }
-
- public Adapter(ClassDeclT adapterType,Navigator<TypeT,ClassDeclT,?,?> nav) {
- this.adapterType = adapterType;
- TypeT baseClass = nav.getBaseClass(nav.use(adapterType), nav.asDecl(XmlAdapter.class));
-
- // because the parameterization of XmlJavaTypeAdapter requires that the class derives from XmlAdapter.
- assert baseClass!=null;
-
- if(nav.isParameterizedType(baseClass))
- defaultType = nav.getTypeArgument(baseClass,0);
- else
- defaultType = nav.ref(Object.class);
-
- if(nav.isParameterizedType(baseClass))
- customType = nav.getTypeArgument(baseClass,1);
- else
- customType = nav.ref(Object.class);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ArrayInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ArrayInfo.java
deleted file mode 100644
index 1d985a77..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ArrayInfo.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-/**
- * Stand-alone array that can be marshalled/unmarshalled on its own
- * (without being part of any encloding {@link ClassInfo}.)
- *
- * <p>
- * Most of the times arrays are treated as properties of their enclosing classes,
- * but sometimes we do need to map an array class to its own XML type.
- * This object is used for that purpose.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface ArrayInfo<T,C> extends NonElement<T,C> {
- /**
- * T of T[]. The type of the items of the array.
- *
- * @return never null
- */
- NonElement<T,C> getItemType();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/AttributePropertyInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/AttributePropertyInfo.java
deleted file mode 100644
index 3d9eadec..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/AttributePropertyInfo.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import javax.xml.namespace.QName;
-
-/**
- * Attribute {@link PropertyInfo}.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface AttributePropertyInfo<T,C> extends PropertyInfo<T,C>, NonElementRef<T,C> {
- /**
- * Gets the type of the attribute.
- *
- * <p>
- * Note that when this property is a collection, this method returns
- * the type of each item in the collection.
- *
- * @return
- * always non-null.
- */
- NonElement<T,C> getTarget();
-
- /**
- * Returns true if this attribute is mandatory.
- */
- boolean isRequired();
-
- /**
- * Gets the attribute name.
- *
- * @return
- * must be non-null.
- */
- QName getXmlName();
-
- Adapter<T,C> getAdapter();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/BuiltinLeafInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/BuiltinLeafInfo.java
deleted file mode 100644
index 106925c3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/BuiltinLeafInfo.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import javax.xml.namespace.QName;
-
-/**
- * JAXB spec designates a few Java classes to be mapped to leaves in XML.
- *
- * <p>
- * Built-in leaves also have another priviledge; specifically, they often
- * have more than one XML type names associated with it.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface BuiltinLeafInfo<T,C> extends LeafInfo<T,C> {
- /**
- * {@inheritDoc}
- *
- * <p>
- * This method returns the 'primary' type name of this built-in leaf,
- * which should be used when values of this type are marshalled.
- *
- * @return
- * never null.
- */
- public QName getTypeName();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ClassInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ClassInfo.java
deleted file mode 100644
index 41b5ad76..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ClassInfo.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlValue;
-
-/**
- * Information about JAXB-bound class.
- *
- * <p>
- * All the JAXB annotations are already reflected to the model so that
- * the caller doesn't have to worry about them. For this reason, you
- * cannot access annotations on properties.
- *
- * <h2>XML representation</h2>
- * <p>
- * A JAXB-bound class always have at least one representation
- * (called "type representation"),but it can optionally have another
- * representation ("element representation").
- *
- * <p>
- * In the type representaion, a class
- * is represented as a set of attributes and (elements or values).
- * You can inspect the details of those attributes/elements/values by {@link #getProperties()}.
- * This representation corresponds to a complex/simple type in XML Schema.
- * You can obtain the schema type name by {@link #getTypeName()}.
- *
- * <p>
- * If a class has an element representation, {@link #isElement()} returns true.
- * This representation is mostly similar to the type representation
- * except that the whoe attributes/elements/values are wrapped into
- * one element. You can obtain the name of this element through {@link #asElement()}.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public interface ClassInfo<T,C> extends MaybeElement<T,C> {
-
- /**
- * Obtains the information about the base class.
- *
- * @return null
- * if this info extends from {@link Object}.
- */
- ClassInfo<T,C> getBaseClass();
-
- /**
- * Gets the declaration this object is wrapping.
- */
- C getClazz();
-
- /**
- * Gets the fully-qualified name of the class.
- */
- String getName();
-
- /**
- * Returns all the properties newly declared in this class.
- *
- * <p>
- * This excludes properties defined in the super class.
- *
- * <p>
- * If the properties are {@link #isOrdered() ordered},
- * it will be returned in the order that appear in XML.
- * Otherwise it will be returned in no particular order.
- *
- * <p>
- * Properties marked with {@link XmlTransient} will not show up
- * in this list. As far as JAXB is concerned, they are considered
- * non-existent.
- *
- * @return
- * always non-null, but can be empty.
- */
- List<? extends PropertyInfo<T,C>> getProperties();
-
- /**
- * Returns true if this class or its ancestor has {@link XmlValue}
- * property.
- */
- boolean hasValueProperty();
-
- /**
- * Gets the property that has the specified name.
- *
- * <p>
- * This is just a convenience method for:
- * <pre>
- * for( PropertyInfo p : getProperties() ) {
- * if(p.getName().equals(name))
- * return p;
- * }
- * return null;
- * </pre>
- *
- * @return null
- * if the property was not found.
- *
- * @see PropertyInfo#getName()
- */
- PropertyInfo<T,C> getProperty(String name);
-
- /**
- * If the class has properties, return true. This is only
- * true if the Collection object returned by {@link #getProperties()}
- * is not empty.
- */
- boolean hasProperties();
-
- /**
- * If this class is abstract and thus shall never be directly instanciated.
- */
- boolean isAbstract();
-
- /**
- * Returns true if the properties of this class is ordered in XML.
- * False if it't not.
- *
- * <p>
- * In RELAX NG context, ordered properties mean &lt;group> and
- * unordered properties mean &lt;interleave>.
- */
- boolean isOrdered();
-
- /**
- * If this class is marked as final and no further extension/restriction is allowed.
- */
- boolean isFinal();
-
- /**
- * True if there's a known sub-type of this class in {@link TypeInfoSet}.
- */
- boolean hasSubClasses();
-
- /**
- * Returns true if this bean class has an attribute wildcard.
- *
- * <p>
- * This is true if the class declares an attribute wildcard,
- * or it is inherited from its super classes.
- *
- * @see #inheritsAttributeWildcard()
- */
- boolean hasAttributeWildcard();
-
- /**
- * Returns true iff this class inherits a wildcard attribute
- * from its ancestor classes.
- */
- boolean inheritsAttributeWildcard();
-
- /**
- * Returns true iff this class declares a wildcard attribute.
- */
- boolean declaresAttributeWildcard();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/Element.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/Element.java
deleted file mode 100644
index 373cf06f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/Element.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import javax.xml.namespace.QName;
-
-/**
- * {@link TypeInfo} that maps to an element.
- *
- * Either {@link ElementInfo} or {@link ClassInfo}.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface Element<T,C> extends TypeInfo<T,C> {
- /**
- * Gets the element name of the class.
- *
- * @return
- * Always non-null.
- */
- QName getElementName();
-
- /**
- * If this element can substitute another element, return that element.
- *
- * <p>
- * Substitutability of elements are transitive.
- *
- * @return
- * null if no such element exists.
- */
- Element<T,C> getSubstitutionHead();
-
- /**
- * If non-null, this element is only active inside the given scope.
- */
- ClassInfo<T,C> getScope();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ElementInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ElementInfo.java
deleted file mode 100644
index 85de916d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ElementInfo.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import java.util.Collection;
-
-import javax.xml.bind.JAXBElement;
-
-/**
- * A particular use (specialization) of {@link JAXBElement}.
- *
- * TODO: is ElementInfo adaptable?
- *
- * @author Kohsuke Kawaguchi
- */
-public interface ElementInfo<T,C> extends Element<T,C> {
-
- /**
- * Gets the object that represents the value property.
- *
- * @return
- * non-null.
- */
- ElementPropertyInfo<T,C> getProperty();
-
- /**
- * Short for <code>getProperty().ref().get(0)</code>.
- *
- * The type of the value this element holds.
- *
- * Normally, this is the T of {@code JAXBElement<T>}.
- * But if the property is adapted, this is the on-the-wire type.
- *
- * Or if the element has a list of values, then this field
- * represents the type of the individual item.
- *
- * @see #getContentInMemoryType()
- */
- NonElement<T,C> getContentType();
-
- /**
- * T of {@code JAXBElement<T>}.
- *
- * <p>
- * This is tied to the in-memory representation.
- *
- * @see #getContentType()
- */
- T getContentInMemoryType();
-
- /**
- * Returns the representation for {@link JAXBElement}&lt;<i>contentInMemoryType</i>&gt;.
- *
- * <p>
- * This returns the signature in Java and thus isn't affected by the adapter.
- */
- T getType();
-
- /**
- * @inheritDoc
- *
- * {@link ElementInfo} can only substitute {@link ElementInfo}.
- */
- ElementInfo<T,C> getSubstitutionHead();
-
- /**
- * All the {@link ElementInfo}s whose {@link #getSubstitutionHead()} points
- * to this object.
- *
- * @return
- * can be empty but never null.
- */
- Collection<? extends ElementInfo<T,C>> getSubstitutionMembers();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ElementPropertyInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ElementPropertyInfo.java
deleted file mode 100644
index 1fae203d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ElementPropertyInfo.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-/**
- * Property that maps to an element.
- *
- * @author Kohsuke Kawaguchi
- */
-// TODO: there seems to be too much interactions between switches, and that's no good.
-public interface ElementPropertyInfo<T,C> extends PropertyInfo<T,C> {
- /**
- * Returns the information about the types allowed in this property.
- *
- * <p>
- * In a simple case like the following, an element property only has
- * one {@link TypeRef} that points to {@link String} and tag name "foo".
- * <pre>
- * &#64;XmlElement
- * String abc;
- * </pre>
- *
- * <p>
- * However, in a general case an element property can be heterogeneous,
- * meaning you can put different types in it, each with a different tag name
- * (and a few other settings.)
- * <pre>
- * // list can contain String or Integer.
- * &#64;XmlElements({
- * &#64;XmlElement(name="a",type=String.class),
- * &#64;XmlElement(name="b",type=Integer.class),
- * })
- * List&lt;Object> abc;
- * </pre>
- * <p>
- * In this case this method returns a list of two {@link TypeRef}s.
- *
- *
- * @return
- * Always non-null. Contains at least one entry.
- * If {@link #isValueList()}==true, there's always exactly one type.
- */
- List<? extends TypeRef<T,C>> getTypes();
-
- /**
- * Gets the wrapper element name.
- *
- * @return
- * must be null if {@link #isCollection()}==false or
- * if {@link #isValueList()}==true.
- *
- * Otherwise,
- * this can be null (in which case there'll be no wrapper),
- * or it can be non-null (in which case there'll be a wrapper)
- */
- QName getXmlName();
-
- /**
- * Checks if the wrapper element is required.
- *
- * @return
- * Always false if {@link #getXmlName()}==null.
- */
- boolean isCollectionRequired();
-
- /**
- * Returns true if this property is nillable
- * (meaning the absence of the value is treated as nil='true')
- *
- * <p>
- * This method is only used when this property is a collection.
- */
- boolean isCollectionNillable();
-
- /**
- * Returns true if this property is a collection but its XML
- * representation is a list of values, not repeated elements.
- *
- * <p>
- * If {@link #isCollection()}==false, this property is always false.
- *
- * <p>
- * When this flag is true, <tt>getTypes().size()==1</tt> always holds.
- */
- boolean isValueList();
-
- /**
- * Returns true if this element is mandatory.
- *
- * For collections, this property isn't used.
- * TODO: define the semantics when this is a collection
- */
- boolean isRequired();
-
- Adapter<T,C> getAdapter();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/EnumConstant.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/EnumConstant.java
deleted file mode 100644
index 52e853f3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/EnumConstant.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import javax.xml.bind.annotation.XmlEnumValue;
-
-/**
- * Individual constant of an enumeration.
- *
- * <p>
- * Javadoc in this class uses the following sample to explain the semantics:
- * <pre>
- * &#64;XmlEnum(Integer.class)
- * enum Foo {
- * &#64;XmlEnumValue("1")
- * ONE,
- * &#64;XmlEnumValue("2")
- * TWO
- * }
- * </pre>
- *
- * @see EnumLeafInfo
- * @author Kohsuke Kawaguchi
- */
-public interface EnumConstant<T,C> {
-
- /**
- * Gets the {@link EnumLeafInfo} to which this constant belongs to.
- *
- * @return never null.
- */
- EnumLeafInfo<T,C> getEnclosingClass();
-
- /**
- * Lexical value of this constant.
- *
- * <p>
- * This value should be evaluated against
- * {@link EnumLeafInfo#getBaseType()} to obtain the typed value.
- *
- * <p>
- * This is the same value as written in the {@link XmlEnumValue} annotation.
- * In the above example, this method returns "1" and "2".
- *
- * @return
- * never null.
- */
- String getLexicalValue();
-
- /**
- * Gets the constant name.
- *
- * <p>
- * In the above example this method return "ONE" and "TWO".
- *
- * @return
- * never null. A valid Java identifier.
- */
- String getName();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/EnumLeafInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/EnumLeafInfo.java
deleted file mode 100644
index e9af5e8c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/EnumLeafInfo.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-/**
- * {@link NonElement} that represents an {@link Enum} class.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface EnumLeafInfo<T,C> extends LeafInfo<T,C> {
- /**
- * The same as {@link #getType()} but an {@link EnumLeafInfo}
- * is guaranteed to represent an enum declaration, which is a
- * kind of a class declaration.
- *
- * @return
- * always non-null.
- */
- C getClazz();
-
- /**
- * Returns the base type of the enumeration.
- *
- * <p>
- * For example, with the following enum class, this method
- * returns {@link BuiltinLeafInfo} for {@link Integer}.
- *
- * <pre>
- * &amp;XmlEnum(Integer.class)
- * enum Foo {
- * &amp;XmlEnumValue("1")
- * ONE,
- * &amp;XmlEnumValue("2")
- * TWO
- * }
- * </pre>
- *
- * @return
- * never null.
- */
- NonElement<T,C> getBaseType();
-
- /**
- * Returns the read-only list of enumeration constants.
- *
- * @return
- * never null. Can be empty (really?).
- */
- Iterable<? extends EnumConstant> getConstants();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ErrorHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ErrorHandler.java
deleted file mode 100644
index bc74118a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ErrorHandler.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-
-/**
- * listen to static errors found during building a JAXB model from a set of classes.
- * Implemented by the client of {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder}.
- *
- * <p>
- * All the static errors have to be reported while constructing a
- * model, not when a model is used (IOW, until the {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder#link} completes.
- * Internally, {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder} wraps an {@link ErrorHandler} and all the model
- * components should report errors through it.
- *
- * <p>
- * {@link IllegalAnnotationException} is a checked exception to remind
- * the model classes to report it rather than to throw it.
- *
- * @see com.sun.xml.internal.bind.v2.model.impl.ModelBuilder
- * @author Kohsuke Kawaguchi
- */
-public interface ErrorHandler {
- /**
- * Receives a notification for an error in the annotated code.
- */
- void error( IllegalAnnotationException e );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ID.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ID.java
deleted file mode 100644
index ce5e6b1f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ID.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public enum ID {
- ID,IDREF,NONE
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/LeafInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/LeafInfo.java
deleted file mode 100644
index d35e4345..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/LeafInfo.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-/**
- * Either {@link BuiltinLeafInfo} or {@link EnumLeafInfo}.
- *
- * <p>
- * Those Java types are all mapped to a chunk of text, so we call
- * them "leaves".
- * This interface represents the mapping information for those
- * special Java types.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface LeafInfo<T,C> extends MaybeElement<T,C> {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/MapPropertyInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/MapPropertyInfo.java
deleted file mode 100644
index 2927b4d7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/MapPropertyInfo.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-/**
- * Property that maps to the following schema fragment.
- *
- * <pre><xmp>
- * <xs:complexType>
- * <xs:sequence>
- * <xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
- * <xs:complexType>
- * <xs:sequence>
- * <xs:element name="key" type="XXXX"/>
- * <xs:element name="value" type="YYYY"/>
- * </xs:sequence>
- * </xs:complexType>
- * </xs:element>
- * </xs:sequence>
- * </xs:complexType>
- * </xmp></pre>
- *
- * <p>
- * This property is used to represent a default binding of a {@link Map} property.
- * ({@link Map} properties with adapters will be represented by {@link ElementPropertyInfo}.)
- *
- *
- * <h2>Design Thinking Led to This</h2>
- * <p>
- * I didn't like the idea of adding such a special-purpose {@link PropertyInfo} to a model.
- * The alternative was to implicitly assume an adapter, and have internal representation of
- * the Entry class ready.
- * But the fact that the key type and the value type changes with the parameterization makes
- * it very difficult to have such a class (especially inside Annotation Processing, where we can't even generate
- * classes.)
- *
- * @author Kohsuke Kawaguchi
- */
-public interface MapPropertyInfo<T,C> extends PropertyInfo<T,C> {
- /**
- * Gets the wrapper element name.
- *
- * @return
- * always non-null.
- */
- QName getXmlName();
-
- /**
- * Returns true if this property is nillable
- * (meaning the absence of the value is treated as nil='true')
- *
- * <p>
- * This method is only used when this property is a collection.
- */
- boolean isCollectionNillable();
-
- /**
- * Type of the key of the map. K of {@code HashMap<K,V>}
- *
- * @return never null.
- */
- NonElement<T,C> getKeyType();
-
- /**
- * Type of the value of the map. V of {@code HashMap<K,V>}
- *
- * @return never null.
- */
- NonElement<T,C> getValueType();
-
- // TODO
- // Adapter<T,C> getKeyAdapter();
- // Adapter<T,C> getValueAdapter();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/MaybeElement.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/MaybeElement.java
deleted file mode 100644
index f81fa2ca..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/MaybeElement.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import javax.xml.namespace.QName;
-
-/**
- * Some {@link NonElement} can optionally be an {@link Element}.
- *
- * This interface captures such characteristics.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface MaybeElement<T,C> extends NonElement<T,C> {
- /**
- * If the class is bound to an element, return true.
- *
- * <p>
- * Note that when this is true, the class is bound to both an element
- * and a type.
- */
- boolean isElement();
-
- /**
- * Gets the element name of the class, if the class is bound
- * to an element.
- *
- * @return
- * non-null iff {@link #isElement()}.
- */
- QName getElementName();
-
- /**
- * Returns the {@link Element} aspect of this {@link ClassInfo}.
- *
- * @return
- * null if {@link #isElement()}==false, non-null if {@link #isElement()}==true.
- */
- Element<T,C> asElement();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/NonElement.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/NonElement.java
deleted file mode 100644
index a4a42f82..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/NonElement.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import javax.xml.namespace.QName;
-
-/**
- * {@link TypeInfo} that maps to an element.
- *
- * Either {@link LeafInfo} or {@link ClassInfo}.
- *
- * TODO: better ANYTYPE_NAME.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface NonElement<T,C> extends TypeInfo<T,C> {
- public static final QName ANYTYPE_NAME = new QName(WellKnownNamespace.XML_SCHEMA, "anyType");
-
- /**
- * Gets the primary XML type ANYTYPE_NAME of the class.
- *
- * <p>
- * A Java type can be mapped to multiple XML types, but one of them is
- * considered "primary" and used when we generate a schema.
- *
- * @return
- * null if the object doesn't have an explicit type ANYTYPE_NAME (AKA anonymous.)
- */
- QName getTypeName();
-
- /**
- * Returns true if this {@link NonElement} maps to text in XML,
- * without any attribute nor child elements.
- */
- boolean isSimpleType();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/NonElementRef.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/NonElementRef.java
deleted file mode 100644
index 6320b948..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/NonElementRef.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-
-
-/**
- * Reference to a {@link NonElement}.
- *
- * This interface defines properties of a reference.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface NonElementRef<T,C> {
- /**
- * Target of the reference.
- *
- * @return never null
- */
- NonElement<T,C> getTarget();
-
- /**
- * Gets the property which is the source of this reference.
- *
- * @return never null
- */
- PropertyInfo<T,C> getSource();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/PropertyInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/PropertyInfo.java
deleted file mode 100644
index 18a6177a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/PropertyInfo.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import java.util.Collection;
-
-import javax.activation.MimeType;
-import javax.xml.bind.annotation.XmlID;
-import javax.xml.bind.annotation.XmlIDREF;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.namespace.QName;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationSource;
-
-/**
- * Information about a JAXB-bound property.
- *
- * <p>
- * All the JAXB annotations are already incorporated into the model so that
- * the caller doesn't have to worry about reading them. For this reason, you
- * cannot access annotations on properties directly.
- *
- * TODO: don't we need a visitor?
- *
- * @author Kohsuke Kawaguchi
- */
-public interface PropertyInfo<T,C> extends AnnotationSource {
-
- /**
- * Gets the {@link ClassInfo} or {@link ElementInfo} to which this property belongs.
- */
- TypeInfo<T,C> parent();
-
- /**
- * Gets the name of the property.
- *
- * <p>
- * For example, "foo" or "bar".
- * Generally, a property name is different from XML,
- * (although they are often related, as a property name is often
- * computed from tag names / attribute names.)
- * In fact, <b>property names do not directly affect XML</b>.
- * The property name uniquely identifies a property within a class.
- *
- * @see XmlType#propOrder()
- */
- String getName();
-
- /**
- * Gets the display name of the property.
- *
- * <p>
- * This is a convenience method for
- * {@code parent().getName()+'#'+getName()}.
- */
- String displayName();
-
- /**
- * Returns true if this is a multi-valued collection property.
- * Otherwise false, in which case the property is a single value.
- */
- boolean isCollection();
-
- /**
- * List of {@link TypeInfo}s that this property references.
- *
- * This allows the caller to traverse the reference graph without
- * getting into the details of each different property type.
- *
- * @return
- * non-null read-only collection.
- */
- Collection<? extends TypeInfo<T,C>> ref();
-
- /**
- * Gets the kind of this property.
- *
- * @return
- * always non-null.
- */
- PropertyKind kind();
-
- /**
- * @return
- * null if the property is not adapted.
- */
- Adapter<T,C> getAdapter();
-
- /**
- * Returns the IDness of the value of this element.
- *
- * @see XmlID
- * @see XmlIDREF
- *
- * @return
- * always non-null
- */
- ID id();
-
- /**
- * Expected MIME type, if any.
- */
- MimeType getExpectedMimeType();
-
- /**
- * If this is true and this property indeed represents a binary data,
- * it should be always inlined.
- */
- boolean inlineBinaryData();
-
- /**
- * The effective value of {@link XmlSchemaType} annotation, if any.
- *
- * <p>
- * If the property doesn't have {@link XmlSchemaType} annotation,
- * this method returns null.
- *
- * <p>
- * Since a type name is a property of a Java type, not a Java property,
- * A schema type name of a Java type should be primarily obtained
- * by using {@link NonElement#getTypeName()}. This method is to correctly
- * implement the ugly semantics of {@link XmlSchemaType} (namely
- * when this returns non-null, it overrides the type names of all types
- * that are in this property.)
- */
- @Nullable QName getSchemaType();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/PropertyKind.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/PropertyKind.java
deleted file mode 100644
index e2a4cdfd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/PropertyKind.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import javax.xml.bind.annotation.XmlMimeType;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlInlineBinaryData;
-
-/**
- * An Enum that indicates if the property is
- * Element, ElementRef, Value, or Attribute.
- *
- * <p>
- * Corresponds to the four different kind of {@link PropertyInfo}.
- * @author Bhakti Mehta (bhakti.mehta@sun.com)
- */
-public enum PropertyKind {
- VALUE(true,false,Integer.MAX_VALUE),
- ATTRIBUTE(false,false,Integer.MAX_VALUE),
- ELEMENT(true,true,0),
- REFERENCE(false,true,1),
- MAP(false,true,2),
- ;
-
- /**
- * This kind of property can have {@link XmlMimeType} and {@link XmlInlineBinaryData}
- * annotation with it.
- */
- public final boolean canHaveXmlMimeType;
-
- /**
- * This kind of properties need to show up in {@link XmlType#propOrder()}.
- */
- public final boolean isOrdered;
-
- /**
- * {@link com.sun.xml.internal.bind.v2.runtime.property.PropertyFactory} benefits from having index numbers assigned to
- * {@link #ELEMENT}, {@link #REFERENCE}, and {@link #MAP} in this order.
- */
- public final int propertyIndex;
-
- PropertyKind(boolean canHaveExpectedContentType, boolean isOrdered, int propertyIndex) {
- this.canHaveXmlMimeType = canHaveExpectedContentType;
- this.isOrdered = isOrdered;
- this.propertyIndex = propertyIndex;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/Ref.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/Ref.java
deleted file mode 100644
index 6d3ed121..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/Ref.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import javax.xml.bind.annotation.XmlList;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.impl.ModelBuilderI;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-/**
- * Reference to a type in a model.
- *
- * TODO: isn't there a similarity between this and TypeUse in XJC?
- *
- * @author Kohsuke Kawaguchi
- */
-public final class Ref<T,C> {
- /**
- * The type being referenced.
- * <p>
- * If the type is adapted, this field is the same as the adapter's default type.
- */
- public final T type;
- /**
- * If the reference has an adapter, non-null.
- */
- public final Adapter<T,C> adapter;
- /**
- * If the {@link #type} is an array and it is a value list,
- * true.
- */
- public final boolean valueList;
-
- public Ref(T type) {
- this(type,null,false);
- }
-
- public Ref(T type, Adapter<T, C> adapter, boolean valueList) {
- this.adapter = adapter;
- if(adapter!=null)
- type=adapter.defaultType;
- this.type = type;
- this.valueList = valueList;
- }
-
- public Ref(ModelBuilderI<T,C,?,?> builder, T type, XmlJavaTypeAdapter xjta, XmlList xl ) {
- this(builder.getReader(),builder.getNavigator(),type,xjta,xl);
- }
-
- public Ref(AnnotationReader<T,C,?,?> reader,
- Navigator<T,C,?,?> nav,
- T type, XmlJavaTypeAdapter xjta, XmlList xl ) {
- Adapter<T,C> adapter=null;
- if(xjta!=null) {
- adapter = new Adapter<T,C>(xjta,reader,nav);
- type = adapter.defaultType;
- }
-
- this.type = type;
- this.adapter = adapter;
- this.valueList = xl!=null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ReferencePropertyInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ReferencePropertyInfo.java
deleted file mode 100644
index 35be01ff..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ReferencePropertyInfo.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import java.util.Collection;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-/**
- * {@link PropertyInfo} that holds references to other {@link Element}s.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface ReferencePropertyInfo<T,C> extends PropertyInfo<T,C> {
- /**
- * Returns the information about the possible elements in this property.
- *
- * <p>
- * As of 2004/08/17, the spec only allows you to use different element names
- * when a property is a collection, but I think there's really no reason
- * to limit it there --- if the user wants to use a different tag name
- * for different objects, I don't see why this can be limited to collections.
- *
- * <p>
- * So this is a generalization of the spec. We always allow a property to have
- * multiple types and use different tag names for it, depending on the actual type.
- *
- * <p>
- * In most of the cases, this collection only contains 1 item. So the runtime system
- * is encouraged to provide a faster code-path that is optimized toward such cases.
- *
- * @return
- * Always non-null. Contains at least one entry.
- */
- Set<? extends Element<T,C>> getElements();
-
- /**
- * {@inheritDoc}.
- *
- * If this {@link ReferencePropertyInfo} has a wildcard in it,
- * then the returned list will contain {@link WildcardTypeInfo}.
- */
- Collection<? extends TypeInfo<T,C>> ref();
-
- /**
- * Gets the wrapper element name.
- *
- * @return
- * must be null if not collection. If the property is a collection,
- * this can be null (in which case there'll be no wrapper),
- * or it can be non-null (in which case there'll be a wrapper)
- */
- QName getXmlName();
-
- /**
- * Returns true if this property is nillable
- * (meaning the absence of the value is treated as nil='true')
- *
- * <p>
- * This method is only used when this property is a collection.
- */
- boolean isCollectionNillable();
-
- /**
- * Checks if the wrapper element is required.
- *
- * @return
- * Always false if {@link #getXmlName()}==null.
- */
- boolean isCollectionRequired();
-
- /**
- * Returns true if this property can hold {@link String}s to represent
- * mixed content model.
- */
- boolean isMixed();
-
- /**
- * If this property supports the wildcard, returns its mode.
- *
- * @return null
- * if the wildcard is not allowed on this element.
- */
- WildcardMode getWildcard();
-
- /**
- * If this property supports the wildcard, returns its DOM handler.
- *
- * @return null
- * if the wildcard is not allowed on this element.
- */
- C getDOMHandler();
-
- /**
- * Returns true if this element is mandatory.
- */
- boolean isRequired();
-
- Adapter<T,C> getAdapter();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java
deleted file mode 100644
index 97e55888..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/RegistryInfo.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlRegistry;
-
-/**
- * Represents the information in a class with {@link XmlRegistry} annotaion.
- *
- * <p>
- * This interface is only meant to be used as a return type from {@link com.sun.xml.internal.bind.v2.model.impl.ModelBuilder}.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface RegistryInfo<T,C> {
- /**
- * Returns all the references to other types in this registry.
- */
- Set<TypeInfo<T,C>> getReferences();
-
- /**
- * Returns the class with {@link XmlRegistry}.
- */
- C getClazz();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/TypeInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/TypeInfo.java
deleted file mode 100644
index dceab05c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/TypeInfo.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import javax.xml.bind.annotation.XmlIDREF;
-
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-
-
-/**
- * Either {@link ClassInfo}, {@link ElementInfo}, or {@link LeafInfo}.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface TypeInfo<T,C> extends Locatable {
-
- /**
- * Gets the underlying Java type that object represents.
- *
- * @return
- * always non-null.
- */
- T getType();
-
- /**
- * True if this type is a valid target from a property annotated with {@link XmlIDREF}.
- */
- boolean canBeReferencedByIDREF();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/TypeInfoSet.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/TypeInfoSet.java
deleted file mode 100644
index 4b563eb6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/TypeInfoSet.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import java.util.Map;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.annotation.XmlSchema;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-/**
- * Root of models.&nbsp;Set of {@link TypeInfo}s.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface TypeInfoSet<T,C,F,M> {
-
- /**
- * {@link Navigator} for this model.
- */
- Navigator<T,C,F,M> getNavigator();
-
-// turns out we can't have AnnotationReader in XJC, so it's impossible to have this here.
-// perhaps we should revisit this in the future.
-// /**
-// * {@link AnnotationReader} for this model.
-// */
-// AnnotationReader<T,C,F,M> getReader();
-
- /**
- * Returns a {@link TypeInfo} for the given type.
- *
- * @return
- * null if the specified type cannot be bound by JAXB, or
- * not known to this set.
- */
- NonElement<T,C> getTypeInfo( T type );
-
- /**
- * Gets the {@link TypeInfo} for the any type.
- */
- NonElement<T,C> getAnyTypeInfo();
-
- /**
- * Returns a {@link ClassInfo}, {@link ArrayInfo}, or {@link LeafInfo}
- * for the given bean.
- *
- * <p>
- * This method is almost like refinement of {@link #getTypeInfo(Object)} except
- * our C cannot derive from T.
- *
- * @return
- * null if the specified type is not bound by JAXB or otherwise
- * unknown to this set.
- */
- NonElement<T,C> getClassInfo( C type );
-
- /**
- * Returns all the {@link ArrayInfo}s known to this set.
- */
- Map<? extends T,? extends ArrayInfo<T,C>> arrays();
-
- /**
- * Returns all the {@link ClassInfo}s known to this set.
- */
- Map<C,? extends ClassInfo<T,C>> beans();
-
- /**
- * Returns all the {@link BuiltinLeafInfo}s known to this set.
- */
- Map<T,? extends BuiltinLeafInfo<T,C>> builtins();
-
- /**
- * Returns all the {@link EnumLeafInfo}s known to this set.
- */
- Map<C,? extends EnumLeafInfo<T,C>> enums();
-
- /**
- * Returns a {@link ElementInfo} for the given element.
- *
- * @param scope
- * if null, return the info about a global element.
- * Otherwise return a local element in the given scope if available,
- * then look for a global element next.
- */
- ElementInfo<T,C> getElementInfo( C scope, QName name );
-
- /**
- * Returns a type information for the given reference.
- */
- NonElement<T,C> getTypeInfo(Ref<T,C> ref);
-
- /**
- * Returns all {@link ElementInfo}s in the given scope.
- *
- * @param scope
- * if non-null, this method only returns the local element mapping.
- */
- Map<QName,? extends ElementInfo<T,C>> getElementMappings( C scope );
-
- /**
- * Returns all the {@link ElementInfo} known to this set.
- */
- Iterable<? extends ElementInfo<T,C>> getAllElements();
-
-
- /**
- * Gets all {@link XmlSchema#xmlns()} found in this context for the given namespace URI.
- *
- * <p>
- * This operation is expected to be only used in schema generator, so it can be slow.
- *
- * @return
- * A map from prefixes to namespace URIs, which should be declared when generating a schema.
- * Could be empty but never null.
- */
- Map<String,String> getXmlNs(String namespaceUri);
-
- /**
- * Gets {@link XmlSchema#location()} found in this context.
- *
- * <p>
- * This operation is expected to be only used in schema generator, so it can be slow.
- *
- * @return
- * A map from namespace URI to the value of the location.
- * If the entry is missing, that means a schema should be generated for that namespace.
- * If the value is "", that means the schema location is implied
- * (&lt;xs:schema namespace="..."/> w/o schemaLocation.)
- */
- Map<String,String> getSchemaLocations();
-
- /**
- * Gets the reasonable {@link XmlNsForm} for the given namespace URI.
- *
- * <p>
- * The spec doesn't define very precisely what the {@link XmlNsForm} value
- * for the given namespace would be, so this method is implemented in rather
- * ad-hoc way. It should work as what most people expect for simple cases.
- *
- * @return never null.
- */
- XmlNsForm getElementFormDefault(String nsUri);
-
- /**
- * Gets the reasonable {@link XmlNsForm} for the given namespace URI.
- *
- * <p>
- * The spec doesn't define very precisely what the {@link XmlNsForm} value
- * for the given namespace would be, so this method is implemented in rather
- * ad-hoc way. It should work as what most people expect for simple cases.
- *
- * @return never null.
- */
- XmlNsForm getAttributeFormDefault(String nsUri);
-
- /**
- * Dumps this model into XML.
- *
- * For debug only.
- *
- * TODO: not sure if this actually works. We don't really know what are T,C.
- */
- public void dump( Result out ) throws JAXBException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/TypeRef.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/TypeRef.java
deleted file mode 100644
index 84544d9c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/TypeRef.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-import javax.xml.namespace.QName;
-
-/**
- * Information about a type referenced from {@link ElementPropertyInfo}.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface TypeRef<T,C> extends NonElementRef<T,C> {
- /**
- * The associated element name.
- *
- * @return
- * never null.
- */
- QName getTagName();
-
- /**
- * Returns true if this element is nillable.
- */
- boolean isNillable();
-
- /**
- * The default value for this element if any.
- * Otherwise null.
- */
- String getDefaultValue();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ValuePropertyInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ValuePropertyInfo.java
deleted file mode 100644
index cca5c76c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/ValuePropertyInfo.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-/**
- * Value {@link PropertyInfo}.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface ValuePropertyInfo<T,C> extends PropertyInfo<T,C>, NonElementRef<T,C> {
- Adapter<T,C> getAdapter();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/WildcardMode.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/WildcardMode.java
deleted file mode 100644
index 8f9e1ba9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/WildcardMode.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-/**
- * Mode of the wildcard.
- *
- * @author Kohsuke Kawaguchi
- */
-public enum WildcardMode {
- STRICT(false,true), SKIP(true,false), LAX(true,true);
-
- public final boolean allowDom;
- public final boolean allowTypedObject;
-
- WildcardMode(boolean allowDom, boolean allowTypedObject) {
- this.allowDom = allowDom;
- this.allowTypedObject = allowTypedObject;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/WildcardTypeInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/WildcardTypeInfo.java
deleted file mode 100644
index 0f70c2ed..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/WildcardTypeInfo.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.core;
-
-/**
- * Type referenced as a result of having the wildcard.
- *
- * TODO: think about how to gracefully handle the difference between LAX,SKIP, and STRICT.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface WildcardTypeInfo<T,C> extends TypeInfo<T,C> {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/package-info.java
deleted file mode 100644
index 1ac8d1eb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/core/package-info.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * The in-memory model of the JAXB-bound beans.
- *
- * <h2>Parameterizations</h2>
- * <p>
- * Interfaces in this package are parameterized to work with arbitrary Java reflection library.
- * This is necessary because the RI needs to work with both the runtime reflection library
- * ({@link java.lang.reflect}) and the Annotation Processing.
- *
- * <p>
- * The meaning of parameterizations are as follows:
- *
- * <dl>
- * <dt><b>T</b>
- * <dd>Represents an use of type, such as {@code int}, {@code Foo[]}, or {@code List<Foo>}.
- * Corresponds to {@link Type}.
- *
- * <dt><b>C</b>
- * <dd>Represents a declaration of a type (that is, class, interface, enum, or annotation.)
- * This doesn't include {@code int}, {@code Foo[]}, or {@code List<Foo>}, because
- * they don't have corresponding declarations.
- * Corresponds to {@link Class} (roughly).
- *
- * <dt><b>F</b>
- * <dd>Represents a field.
- * Corresponds to {@link Field}.
- *
- * <dt><b>M</b>
- * <dd>Represents a method.
- * Corresponds to {@link Method}.
- *
- * <dt>
- */
-@XmlSchema(namespace="http://jaxb.dev.java.net/xjc/model",elementFormDefault=QUALIFIED)
-package com.sun.xml.internal.bind.v2.model.core;
-
-import javax.xml.bind.annotation.XmlSchema;
-
-import static javax.xml.bind.annotation.XmlNsForm.QUALIFIED;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/AnyTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/AnyTypeImpl.java
deleted file mode 100644
index 0f966322..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/AnyTypeImpl.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import javax.xml.namespace.QName;
-import javax.xml.bind.annotation.XmlIDREF;
-
-import com.sun.xml.internal.bind.v2.runtime.Location;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfo;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-
-/**
- * {@link TypeInfo} implementation for <tt>xs:anyType</tt>.
- *
- * @author Kohsuke Kawaguchi
- */
-class AnyTypeImpl<T,C> implements NonElement<T,C> {
-
- private final T type;
- private final Navigator<T,C,?,?> nav;
-
- public AnyTypeImpl(Navigator<T,C,?,?> nav) {
- this.type = nav.ref(Object.class);
- this.nav = nav;
- }
-
- public QName getTypeName() {
- return ANYTYPE_NAME;
- }
-
- public T getType() {
- return type;
- }
-
- public Locatable getUpstream() {
- return null;
- }
-
- public boolean isSimpleType() {
- return false;
- }
-
- public Location getLocation() {
- return nav.getClassLocation(nav.asDecl(Object.class));
- }
-
- /**
- * xs:anyType can be referenced from {@link XmlIDREF}.
- *
- * @deprecated
- * why are you calling a method whose return value is always known?
- */
- public final boolean canBeReferencedByIDREF() {
- return true;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ArrayInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ArrayInfoImpl.java
deleted file mode 100644
index 4acf8c29..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ArrayInfoImpl.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.core.ArrayInfo;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.util.ArrayInfoUtil;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-
-/**
- *
- * <p>
- * Public because XJC needs to access it
- *
- * @author Kohsuke Kawaguchi
- */
-public class ArrayInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
- extends TypeInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
- implements ArrayInfo<TypeT,ClassDeclT>, Location {
-
- private final NonElement<TypeT,ClassDeclT> itemType;
-
- private final QName typeName;
-
- /**
- * The representation of T[] in the underlying reflection library.
- */
- private final TypeT arrayType;
-
- public ArrayInfoImpl(ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT> builder,
- Locatable upstream, TypeT arrayType) {
- super(builder, upstream);
- this.arrayType = arrayType;
- TypeT componentType = nav().getComponentType(arrayType);
- this.itemType = builder.getTypeInfo(componentType, this);
-
- QName n = itemType.getTypeName();
- if(n==null) {
- builder.reportError(new IllegalAnnotationException(Messages.ANONYMOUS_ARRAY_ITEM.format(
- nav().getTypeName(componentType)),this));
- n = new QName("#dummy"); // for error recovery
- }
- this.typeName = ArrayInfoUtil.calcArrayTypeName(n);
- }
-
- public NonElement<TypeT, ClassDeclT> getItemType() {
- return itemType;
- }
-
- public QName getTypeName() {
- return typeName;
- }
-
- public boolean isSimpleType() {
- return false;
- }
-
- public TypeT getType() {
- return arrayType;
- }
-
- /**
- * Leaf-type cannot be referenced from IDREF.
- *
- * @deprecated
- * why are you calling a method whose return value is always known?
- */
- public final boolean canBeReferencedByIDREF() {
- return false;
- }
-
- public Location getLocation() {
- return this;
- }
- public String toString() {
- return nav().getTypeName(arrayType);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/AttributePropertyInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/AttributePropertyInfoImpl.java
deleted file mode 100644
index 7409ea1e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/AttributePropertyInfoImpl.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchema;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import com.sun.xml.internal.bind.v2.model.core.AttributePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class AttributePropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
- extends SingleTypePropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
- implements AttributePropertyInfo<TypeT,ClassDeclT> {
-
- private final QName xmlName;
-
- private final boolean isRequired;
-
- AttributePropertyInfoImpl(ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent, PropertySeed<TypeT,ClassDeclT,FieldT,MethodT> seed ) {
- super(parent,seed);
- XmlAttribute att = seed.readAnnotation(XmlAttribute.class);
- assert att!=null;
-
- if(att.required())
- isRequired = true;
- else isRequired = nav().isPrimitive(getIndividualType());
-
- this.xmlName = calcXmlName(att);
- }
-
- private QName calcXmlName(XmlAttribute att) {
- String uri;
- String local;
-
- uri = att.namespace();
- local = att.name();
-
- // compute the default
- if(local.equals("##default"))
- local = NameConverter.standard.toVariableName(getName());
- if(uri.equals("##default")) {
- XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
- // JAX-RPC doesn't want the default namespace URI swapping to take effect to
- // local "unqualified" elements. UGLY.
- if(xs!=null) {
- switch(xs.attributeFormDefault()) {
- case QUALIFIED:
- uri = parent.getTypeName().getNamespaceURI();
- if(uri.length()==0)
- uri = parent.builder.defaultNsUri;
- break;
- case UNQUALIFIED:
- case UNSET:
- uri = "";
- }
- } else
- uri = "";
- }
-
- return new QName(uri.intern(),local.intern());
- }
-
- public boolean isRequired() {
- return isRequired;
- }
-
- public final QName getXmlName() {
- return xmlName;
- }
-
- public final PropertyKind kind() {
- return PropertyKind.ATTRIBUTE;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/BuiltinLeafInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/BuiltinLeafInfoImpl.java
deleted file mode 100644
index ba54d9f8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/BuiltinLeafInfoImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.core.BuiltinLeafInfo;
-import com.sun.xml.internal.bind.v2.model.core.LeafInfo;
-import com.sun.xml.internal.bind.v2.model.core.Element;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-/**
- * JAXB spec designates a few Java classes to be mapped to XML types
- * in a way that ignores restrictions placed on user-defined beans.
- *
- * @author Kohsuke Kawaguchi
- */
-public class BuiltinLeafInfoImpl<TypeT,ClassDeclT> extends LeafInfoImpl<TypeT,ClassDeclT> implements BuiltinLeafInfo<TypeT,ClassDeclT> {
-
- private final QName[] typeNames;
-
- protected BuiltinLeafInfoImpl(TypeT type, QName... typeNames) {
- super(type, typeNames.length>0?typeNames[0]:null);
- this.typeNames = typeNames;
- }
-
- /**
- * Returns all the type names recognized by this bean info.
- *
- * @return
- * do not modify the returned array.
- */
- public final QName[] getTypeNames() {
- return typeNames;
- }
-
- /**
- * @deprecated always return false at this level.
- */
- public final boolean isElement() {
- return false;
- }
-
- /**
- * @deprecated always return null at this level.
- */
- public final QName getElementName() {
- return null;
- }
-
- /**
- * @deprecated always return null at this level.
- */
- public final Element<TypeT,ClassDeclT> asElement() {
- return null;
- }
-
- /**
- * Creates all the {@link BuiltinLeafInfoImpl}s as specified in the spec.
- *
- * {@link LeafInfo}s are all defined by the spec.
- */
- public static <TypeT,ClassDeclT>
- Map<TypeT,BuiltinLeafInfoImpl<TypeT,ClassDeclT>> createLeaves( Navigator<TypeT,ClassDeclT,?,?> nav ) {
- Map<TypeT,BuiltinLeafInfoImpl<TypeT,ClassDeclT>> leaves = new HashMap<TypeT,BuiltinLeafInfoImpl<TypeT,ClassDeclT>>();
-
- for( RuntimeBuiltinLeafInfoImpl<?> leaf : RuntimeBuiltinLeafInfoImpl.builtinBeanInfos ) {
- TypeT t = nav.ref(leaf.getClazz());
- leaves.put( t, new BuiltinLeafInfoImpl<TypeT,ClassDeclT>(t,leaf.getTypeNames()) );
- }
-
- return leaves;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ClassInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ClassInfoImpl.java
deleted file mode 100644
index 5a3748e3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ClassInfoImpl.java
+++ /dev/null
@@ -1,1320 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.AbstractList;
-
-import javax.xml.bind.annotation.XmlAccessOrder;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorOrder;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlAttachmentRef;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlElementRefs;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlID;
-import javax.xml.bind.annotation.XmlIDREF;
-import javax.xml.bind.annotation.XmlInlineBinaryData;
-import javax.xml.bind.annotation.XmlList;
-import javax.xml.bind.annotation.XmlMimeType;
-import javax.xml.bind.annotation.XmlMixed;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
-
-import com.sun.istack.internal.FinalArrayList;
-import com.sun.xml.internal.bind.annotation.OverrideAnnotationOf;
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.annotation.MethodLocatable;
-import com.sun.xml.internal.bind.v2.model.core.ClassInfo;
-import com.sun.xml.internal.bind.v2.model.core.Element;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.core.ValuePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-import com.sun.xml.internal.bind.v2.util.EditDistance;
-
-
-/**
- * A part of the {@link ClassInfo} that doesn't depend on a particular
- * reflection library.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class ClassInfoImpl<T,C,F,M> extends TypeInfoImpl<T,C,F,M>
- implements ClassInfo<T,C>, Element<T,C> {
-
- protected final C clazz;
-
- /**
- * @see #getElementName()
- */
- private final QName elementName;
-
- /**
- * @see #getTypeName()
- */
- private final QName typeName;
-
- /**
- * Lazily created.
- *
- * @see #getProperties()
- */
- private FinalArrayList<PropertyInfoImpl<T,C,F,M>> properties;
-
- /**
- * The property order.
- *
- * null if unordered. {@link #DEFAULT_ORDER} if ordered but the order is defaulted
- *
- * @see #isOrdered()
- */
- private /*final*/ String[] propOrder;
-
- /**
- * Lazily computed.
- *
- * To avoid the cyclic references of the form C1 --base--> C2 --property--> C1.
- */
- private ClassInfoImpl<T,C,F,M> baseClass;
-
- private boolean baseClassComputed = false;
-
- private boolean hasSubClasses = false;
-
- /**
- * If this class has a declared (not inherited) attribute wildcard, keep the reference
- * to it.
- *
- * This parameter is initialized at the construction time and never change.
- */
- protected /*final*/ PropertySeed<T,C,F,M> attributeWildcard;
-
-
- /**
- * @see #getFactoryMethod()
- */
- private M factoryMethod = null;
-
- ClassInfoImpl(ModelBuilder<T,C,F,M> builder, Locatable upstream, C clazz) {
- super(builder,upstream);
- this.clazz = clazz;
- assert clazz!=null;
-
- // compute the element name
- elementName = parseElementName(clazz);
-
- // compute the type name
- XmlType t = reader().getClassAnnotation(XmlType.class,clazz,this);
- typeName = parseTypeName(clazz,t);
-
- if(t!=null) {
- String[] propOrder = t.propOrder();
- if(propOrder.length==0)
- this.propOrder = null; // unordered
- else {
- if(propOrder[0].length()==0)
- this.propOrder = DEFAULT_ORDER;
- else
- this.propOrder = propOrder;
- }
- } else {
- propOrder = DEFAULT_ORDER;
- }
-
- // obtain XmlAccessorOrder and set proporder (XmlAccessorOrder can be defined for whole package)
- // (<xs:all> vs <xs:sequence>)
- XmlAccessorOrder xao = reader().getPackageAnnotation(XmlAccessorOrder.class, clazz, this);
- if((xao != null) && (xao.value() == XmlAccessOrder.UNDEFINED)) {
- propOrder = null;
- }
-
- // obtain XmlAccessorOrder and set proporder (<xs:all> vs <xs:sequence>)
- xao = reader().getClassAnnotation(XmlAccessorOrder.class, clazz, this);
- if((xao != null) && (xao.value() == XmlAccessOrder.UNDEFINED)) {
- propOrder = null;
- }
-
- if(nav().isInterface(clazz)) {
- builder.reportError(new IllegalAnnotationException(
- Messages.CANT_HANDLE_INTERFACE.format(nav().getClassName(clazz)), this ));
- }
-
- // the class must have the default constructor
- if (!hasFactoryConstructor(t)){
- if(!nav().hasDefaultConstructor(clazz)){
- if(nav().isInnerClass(clazz)) {
- builder.reportError(new IllegalAnnotationException(
- Messages.CANT_HANDLE_INNER_CLASS.format(nav().getClassName(clazz)), this ));
- } else if (elementName != null) {
- builder.reportError(new IllegalAnnotationException(
- Messages.NO_DEFAULT_CONSTRUCTOR.format(nav().getClassName(clazz)), this ));
- }
- }
- }
- }
-
- public ClassInfoImpl<T,C,F,M> getBaseClass() {
- if (!baseClassComputed) {
- // compute the base class
- C s = nav().getSuperClass(clazz);
- if(s==null || s==nav().asDecl(Object.class)) {
- baseClass = null;
- } else {
- NonElement<T,C> b = builder.getClassInfo(s, true, this);
- if(b instanceof ClassInfoImpl) {
- baseClass = (ClassInfoImpl<T,C,F,M>) b;
- baseClass.hasSubClasses = true;
- } else {
- baseClass = null;
- }
- }
- baseClassComputed = true;
- }
- return baseClass;
- }
-
- /**
- * {@inheritDoc}
- *
- * The substitution hierarchy is the same as the inheritance hierarchy.
- */
- public final Element<T,C> getSubstitutionHead() {
- ClassInfoImpl<T,C,F,M> c = getBaseClass();
- while(c!=null && !c.isElement())
- c = c.getBaseClass();
- return c;
- }
-
- public final C getClazz() {
- return clazz;
- }
-
- /**
- * When a bean binds to an element, it's always through {@link XmlRootElement},
- * so this method always return null.
- *
- * @deprecated
- * you shouldn't be invoking this method on {@link ClassInfoImpl}.
- */
- public ClassInfoImpl<T,C,F,M> getScope() {
- return null;
- }
-
- public final T getType() {
- return nav().use(clazz);
- }
-
- /**
- * A {@link ClassInfo} can be referenced by {@link XmlIDREF} if
- * it has an ID property.
- */
- public boolean canBeReferencedByIDREF() {
- for (PropertyInfo<T,C> p : getProperties()) {
- if(p.id()== ID.ID)
- return true;
- }
- ClassInfoImpl<T,C,F,M> base = getBaseClass();
- if(base!=null)
- return base.canBeReferencedByIDREF();
- else
- return false;
- }
-
- public final String getName() {
- return nav().getClassName(clazz);
- }
-
- public <A extends Annotation> A readAnnotation(Class<A> a) {
- return reader().getClassAnnotation(a,clazz,this);
- }
-
- public Element<T,C> asElement() {
- if(isElement())
- return this;
- else
- return null;
- }
-
- public List<? extends PropertyInfo<T,C>> getProperties() {
- if(properties!=null) return properties;
-
- // check the access type first
- XmlAccessType at = getAccessType();
-
- properties = new FinalArrayList<PropertyInfoImpl<T,C,F,M>>();
-
- findFieldProperties(clazz,at);
-
- findGetterSetterProperties(at);
-
- if(propOrder==DEFAULT_ORDER || propOrder==null) {
- XmlAccessOrder ao = getAccessorOrder();
- if(ao==XmlAccessOrder.ALPHABETICAL)
- Collections.sort(properties);
- } else {
- //sort them as specified
- PropertySorter sorter = new PropertySorter();
- for (PropertyInfoImpl p : properties) {
- sorter.checkedGet(p); // have it check for errors
- }
- Collections.sort(properties,sorter);
- sorter.checkUnusedProperties();
- }
-
- {// additional error checks
- PropertyInfoImpl vp=null; // existing value property
- PropertyInfoImpl ep=null; // existing element property
-
- for (PropertyInfoImpl p : properties) {
- switch(p.kind()) {
- case ELEMENT:
- case REFERENCE:
- case MAP:
- ep = p;
- break;
- case VALUE:
- if(vp!=null) {
- // can't have multiple value properties.
- builder.reportError(new IllegalAnnotationException(
- Messages.MULTIPLE_VALUE_PROPERTY.format(),
- vp, p ));
- }
- if(getBaseClass()!=null) {
- builder.reportError(new IllegalAnnotationException(
- Messages.XMLVALUE_IN_DERIVED_TYPE.format(), p ));
- }
- vp = p;
- break;
- case ATTRIBUTE:
- break; // noop
- default:
- assert false;
- }
- }
-
- if(ep!=null && vp!=null) {
- // can't have element and value property at the same time
- builder.reportError(new IllegalAnnotationException(
- Messages.ELEMENT_AND_VALUE_PROPERTY.format(),
- vp, ep
- ));
- }
- }
-
- return properties;
- }
-
- private void findFieldProperties(C c, XmlAccessType at) {
-
- // always find properties from the super class first
- C sc = nav().getSuperClass(c);
- if (shouldRecurseSuperClass(sc)) {
- findFieldProperties(sc,at);
- }
-
- for( F f : nav().getDeclaredFields(c) ) {
- Annotation[] annotations = reader().getAllFieldAnnotations(f,this);
- boolean isDummy = reader().hasFieldAnnotation(OverrideAnnotationOf.class, f);
-
- if( nav().isTransient(f) ) {
- // it's an error for transient field to have any binding annotation
- if(hasJAXBAnnotation(annotations))
- builder.reportError(new IllegalAnnotationException(
- Messages.TRANSIENT_FIELD_NOT_BINDABLE.format(nav().getFieldName(f)),
- getSomeJAXBAnnotation(annotations)));
- } else
- if( nav().isStaticField(f) ) {
- // static fields are bound only when there's explicit annotation.
- if(hasJAXBAnnotation(annotations))
- addProperty(createFieldSeed(f),annotations, false);
- } else {
- if(at==XmlAccessType.FIELD
- ||(at==XmlAccessType.PUBLIC_MEMBER && nav().isPublicField(f))
- || hasJAXBAnnotation(annotations)) {
- if (isDummy) {
- ClassInfo<T, C> top = getBaseClass();
- while ((top != null) && (top.getProperty("content") == null)) {
- top = top.getBaseClass();
- }
- DummyPropertyInfo prop = (DummyPropertyInfo) top.getProperty("content");
- PropertySeed seed = createFieldSeed(f);
- ((DummyPropertyInfo)prop).addType(createReferenceProperty(seed));
- } else {
- addProperty(createFieldSeed(f), annotations, false);
- }
- }
- checkFieldXmlLocation(f);
- }
- }
- }
-
- public final boolean hasValueProperty() {
- ClassInfoImpl<T, C, F, M> bc = getBaseClass();
- if(bc!=null && bc.hasValueProperty())
- return true;
-
- for (PropertyInfo p : getProperties()) {
- if (p instanceof ValuePropertyInfo) return true;
- }
-
- return false;
- }
-
- public PropertyInfo<T,C> getProperty(String name) {
- for( PropertyInfo<T,C> p: getProperties() ) {
- if(p.getName().equals(name))
- return p;
- }
- return null;
- }
-
- /**
- * This hook is used by {@link RuntimeClassInfoImpl} to look for {@link XmlLocation}.
- */
- protected void checkFieldXmlLocation(F f) {
- }
-
- /**
- * Gets an annotation that are allowed on both class and type.
- */
- private <T extends Annotation> T getClassOrPackageAnnotation(Class<T> type) {
- T t = reader().getClassAnnotation(type,clazz,this);
- if(t!=null)
- return t;
- // defaults to the package level
- return reader().getPackageAnnotation(type,clazz,this);
- }
-
- /**
- * Computes the {@link XmlAccessType} on this class by looking at {@link XmlAccessorType}
- * annotations.
- */
- private XmlAccessType getAccessType() {
- XmlAccessorType xat = getClassOrPackageAnnotation(XmlAccessorType.class);
- if(xat!=null)
- return xat.value();
- else
- return XmlAccessType.PUBLIC_MEMBER;
- }
-
- /**
- * Gets the accessor order for this class by consulting {@link XmlAccessorOrder}.
- */
- private XmlAccessOrder getAccessorOrder() {
- XmlAccessorOrder xao = getClassOrPackageAnnotation(XmlAccessorOrder.class);
- if(xao!=null)
- return xao.value();
- else
- return XmlAccessOrder.UNDEFINED;
- }
-
- /**
- * Compares orders among {@link PropertyInfoImpl} according to {@link ClassInfoImpl#propOrder}.
- *
- * <p>
- * extends {@link HashMap} to save memory.
- */
- private final class PropertySorter extends HashMap<String,Integer> implements Comparator<PropertyInfoImpl> {
- /**
- * Mark property names that are used, so that we can report unused property names in the propOrder array.
- */
- PropertyInfoImpl[] used = new PropertyInfoImpl[propOrder.length];
-
- /**
- * If any name collides, it will be added to this set.
- * This is used to avoid repeating the same error message.
- */
- private Set<String> collidedNames;
-
- PropertySorter() {
- super(propOrder.length);
- for( String name : propOrder )
- if(put(name,size())!=null) {
- // two properties with the same name
- builder.reportError(new IllegalAnnotationException(
- Messages.DUPLICATE_ENTRY_IN_PROP_ORDER.format(name),ClassInfoImpl.this));
- }
- }
-
- public int compare(PropertyInfoImpl o1, PropertyInfoImpl o2) {
- int lhs = checkedGet(o1);
- int rhs = checkedGet(o2);
-
- return lhs-rhs;
- }
-
- private int checkedGet(PropertyInfoImpl p) {
- Integer i = get(p.getName());
- if(i==null) {
- // missing
- if (p.kind().isOrdered)
- builder.reportError(new IllegalAnnotationException(
- Messages.PROPERTY_MISSING_FROM_ORDER.format(p.getName()),p));
-
- // give it an order to recover from an error
- i = size();
- put(p.getName(),i);
- }
-
- // mark the used field
- int ii = i;
- if(ii<used.length) {
- if(used[ii]!=null && used[ii]!=p) {
- if(collidedNames==null) collidedNames = new HashSet<String>();
-
- if(collidedNames.add(p.getName()))
- // report the error only on the first time
- builder.reportError(new IllegalAnnotationException(
- Messages.DUPLICATE_PROPERTIES.format(p.getName()),p,used[ii]));
- }
- used[ii] = p;
- }
-
- return i;
- }
-
- /**
- * Report errors for unused propOrder entries.
- */
- public void checkUnusedProperties() {
- for( int i=0; i<used.length; i++ )
- if(used[i]==null) {
- String unusedName = propOrder[i];
- String nearest = EditDistance.findNearest(unusedName, new AbstractList<String>() {
- public String get(int index) {
- return properties.get(index).getName();
- }
-
- public int size() {
- return properties.size();
- }
- });
- boolean isOverriding = (i > (properties.size()-1)) ? false : properties.get(i).hasAnnotation(OverrideAnnotationOf.class);
- if (!isOverriding) {
- builder.reportError(new IllegalAnnotationException(
- Messages.PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY.format(unusedName,nearest),ClassInfoImpl.this));
- }
- }
- }
- }
-
- public boolean hasProperties() {
- return !properties.isEmpty();
- }
-
-
- /**
- * Picks the first non-null argument, or null if all arguments are null.
- */
- private static <T> T pickOne( T... args ) {
- for( T arg : args )
- if(arg!=null)
- return arg;
- return null;
- }
-
- private static <T> List<T> makeSet( T... args ) {
- List<T> l = new FinalArrayList<T>();
- for( T arg : args )
- if(arg!=null) l.add(arg);
- return l;
- }
-
- private static final class ConflictException extends Exception {
- final List<Annotation> annotations;
-
- public ConflictException(List<Annotation> one) {
- this.annotations = one;
- }
- }
-
- private static final class DuplicateException extends Exception {
- final Annotation a1,a2;
- public DuplicateException(Annotation a1, Annotation a2) {
- this.a1 = a1;
- this.a2 = a2;
- }
- }
-
- /**
- * Represents 6 groups of secondary annotations
- */
- private static enum SecondaryAnnotation {
- JAVA_TYPE (0x01, XmlJavaTypeAdapter.class),
- ID_IDREF (0x02, XmlID.class, XmlIDREF.class),
- BINARY (0x04, XmlInlineBinaryData.class, XmlMimeType.class, XmlAttachmentRef.class),
- ELEMENT_WRAPPER (0x08, XmlElementWrapper.class),
- LIST (0x10, XmlList.class),
- SCHEMA_TYPE (0x20, XmlSchemaType.class);
-
- /**
- * Each constant gets an unique bit mask so that the presence/absence
- * of them can be represented in a single byte.
- */
- final int bitMask;
- /**
- * List of annotations that belong to this member.
- */
- final Class<? extends Annotation>[] members;
-
- SecondaryAnnotation(int bitMask, Class<? extends Annotation>... members) {
- this.bitMask = bitMask;
- this.members = members;
- }
- }
-
- private static final SecondaryAnnotation[] SECONDARY_ANNOTATIONS = SecondaryAnnotation.values();
-
- /**
- * Represents 7 groups of properties.
- *
- * Each instance is also responsible for rejecting annotations
- * that are not allowed on that kind.
- */
- private static enum PropertyGroup {
- TRANSIENT (false,false,false,false,false,false),
- ANY_ATTRIBUTE (true, false,false,false,false,false),
- ATTRIBUTE (true, true, true, false,true, true ),
- VALUE (true, true, true, false,true, true ),
- ELEMENT (true, true, true, true, true, true ),
- ELEMENT_REF (true, false,false,true, false,false),
- MAP (false,false,false,true, false,false);
-
- /**
- * Bit mask that represents secondary annotations that are allowed on this group.
- *
- * T = not allowed, F = allowed
- */
- final int allowedsecondaryAnnotations;
-
- PropertyGroup(boolean... bits) {
- int mask = 0;
- assert bits.length==SECONDARY_ANNOTATIONS.length;
- for( int i=0; i<bits.length; i++ ) {
- if(bits[i])
- mask |= SECONDARY_ANNOTATIONS[i].bitMask;
- }
- allowedsecondaryAnnotations = ~mask;
- }
-
- boolean allows(SecondaryAnnotation a) {
- return (allowedsecondaryAnnotations&a.bitMask)==0;
- }
- }
-
- private static final Annotation[] EMPTY_ANNOTATIONS = new Annotation[0];
-
- /**
- * All the annotations in JAXB to their internal index.
- */
- private static final HashMap<Class,Integer> ANNOTATION_NUMBER_MAP = new HashMap<Class,Integer>();
- static {
- Class[] annotations = {
- XmlTransient.class, // 0
- XmlAnyAttribute.class, // 1
- XmlAttribute.class, // 2
- XmlValue.class, // 3
- XmlElement.class, // 4
- XmlElements.class, // 5
- XmlElementRef.class, // 6
- XmlElementRefs.class, // 7
- XmlAnyElement.class, // 8
- XmlMixed.class, // 9
- OverrideAnnotationOf.class,// 10
- };
-
- HashMap<Class,Integer> m = ANNOTATION_NUMBER_MAP;
-
- // characterizing annotations
- for( Class c : annotations )
- m.put(c, m.size() );
-
- // secondary annotations
- int index = 20;
- for( SecondaryAnnotation sa : SECONDARY_ANNOTATIONS ) {
- for( Class member : sa.members )
- m.put(member,index);
- index++;
- }
- }
-
- private void checkConflict(Annotation a, Annotation b) throws DuplicateException {
- assert b!=null;
- if(a!=null)
- throw new DuplicateException(a,b);
- }
-
- /**
- * Called only from {@link #getProperties()}.
- *
- * <p>
- * This is where we decide the type of the property and checks for annotations
- * that are not allowed.
- *
- * @param annotations
- * all annotations on this property. It's the same as
- * {@code seed.readAllAnnotation()}, but taken as a parameter
- * because the caller should know it already.
- */
- private void addProperty( PropertySeed<T,C,F,M> seed, Annotation[] annotations, boolean dummy ) {
- // since typically there's a very few annotations on a method,
- // this runs faster than checking for each annotation via readAnnotation(A)
-
-
- // characterizing annotations. these annotations (or lack thereof) decides
- // the kind of the property it goes to.
- // I wish I could use an array...
- XmlTransient t = null;
- XmlAnyAttribute aa = null;
- XmlAttribute a = null;
- XmlValue v = null;
- XmlElement e1 = null;
- XmlElements e2 = null;
- XmlElementRef r1 = null;
- XmlElementRefs r2 = null;
- XmlAnyElement xae = null;
- XmlMixed mx = null;
- OverrideAnnotationOf ov = null;
-
- // encountered secondary annotations are accumulated into a bit mask
- int secondaryAnnotations = 0;
-
- try {
- for( Annotation ann : annotations ) {
- Integer index = ANNOTATION_NUMBER_MAP.get(ann.annotationType());
- if(index==null) continue;
- switch(index) {
- case 0: checkConflict(t ,ann); t = (XmlTransient) ann; break;
- case 1: checkConflict(aa ,ann); aa = (XmlAnyAttribute) ann; break;
- case 2: checkConflict(a ,ann); a = (XmlAttribute) ann; break;
- case 3: checkConflict(v ,ann); v = (XmlValue) ann; break;
- case 4: checkConflict(e1 ,ann); e1 = (XmlElement) ann; break;
- case 5: checkConflict(e2 ,ann); e2 = (XmlElements) ann; break;
- case 6: checkConflict(r1 ,ann); r1 = (XmlElementRef) ann; break;
- case 7: checkConflict(r2 ,ann); r2 = (XmlElementRefs) ann; break;
- case 8: checkConflict(xae,ann); xae = (XmlAnyElement) ann; break;
- case 9: checkConflict(mx, ann); mx = (XmlMixed) ann; break;
- case 10: checkConflict(ov, ann); ov = (OverrideAnnotationOf) ann; break;
- default:
- // secondary annotations
- secondaryAnnotations |= (1<<(index-20));
- break;
- }
- }
-
- // determine the group kind, and also count the numbers, since
- // characterizing annotations are mutually exclusive.
- PropertyGroup group = null;
- int groupCount = 0;
-
- if(t!=null) {
- group = PropertyGroup.TRANSIENT;
- groupCount++;
- }
- if(aa!=null) {
- group = PropertyGroup.ANY_ATTRIBUTE;
- groupCount++;
- }
- if(a!=null) {
- group = PropertyGroup.ATTRIBUTE;
- groupCount++;
- }
- if(v!=null) {
- group = PropertyGroup.VALUE;
- groupCount++;
- }
- if(e1!=null || e2!=null) {
- group = PropertyGroup.ELEMENT;
- groupCount++;
- }
- if(r1!=null || r2!=null || xae!=null || mx!=null || ov != null) {
- group = PropertyGroup.ELEMENT_REF;
- groupCount++;
- }
-
- if(groupCount>1) {
- // collision between groups
- List<Annotation> err = makeSet(t,aa,a,v,pickOne(e1,e2),pickOne(r1,r2,xae));
- throw new ConflictException(err);
- }
-
- if(group==null) {
- // if no characterizing annotation was found, it's either element or map
- // sniff the signature and then decide.
- assert groupCount==0;
-
- // UGLY: the presence of XmlJavaTypeAdapter makes it an element property. ARGH.
- if(nav().isSubClassOf( seed.getRawType(), nav().ref(Map.class) )
- && !seed.hasAnnotation(XmlJavaTypeAdapter.class))
- group = PropertyGroup.MAP;
- else
- group = PropertyGroup.ELEMENT;
- } else if (group.equals(PropertyGroup.ELEMENT)) { // see issue 791 - make sure @XmlElement annotated map property is mapped to map
- if (nav().isSubClassOf( seed.getRawType(), nav().ref(Map.class)) && !seed.hasAnnotation(XmlJavaTypeAdapter.class)) {
- group = PropertyGroup.MAP;
- }
- }
-
- // group determined by now
- // make sure that there are no prohibited secondary annotations
- if( (secondaryAnnotations&group.allowedsecondaryAnnotations)!=0 ) {
- // uh oh. find the offending annotation
- for( SecondaryAnnotation sa : SECONDARY_ANNOTATIONS ) {
- if(group.allows(sa))
- continue;
- for( Class<? extends Annotation> m : sa.members ) {
- Annotation offender = seed.readAnnotation(m);
- if(offender!=null) {
- // found it
- builder.reportError(new IllegalAnnotationException(
- Messages.ANNOTATION_NOT_ALLOWED.format(m.getSimpleName()),offender));
- return;
- }
- }
- }
- // there must have been an offender
- assert false;
- }
-
- // actually create annotations
- switch(group) {
- case TRANSIENT:
- return;
- case ANY_ATTRIBUTE:
- // an attribute wildcard property
- if(attributeWildcard!=null) {
- builder.reportError(new IllegalAnnotationException(
- Messages.TWO_ATTRIBUTE_WILDCARDS.format(
- nav().getClassName(getClazz())),aa,attributeWildcard));
- return; // recover by ignore
- }
- attributeWildcard = seed;
-
- if(inheritsAttributeWildcard()) {
- builder.reportError(new IllegalAnnotationException(
- Messages.SUPER_CLASS_HAS_WILDCARD.format(),
- aa,getInheritedAttributeWildcard()));
- return;
- }
-
- // check the signature and make sure it's assignable to Map
- if(!nav().isSubClassOf(seed.getRawType(),nav().ref(Map.class))) {
- builder.reportError(new IllegalAnnotationException(
- Messages.INVALID_ATTRIBUTE_WILDCARD_TYPE.format(nav().getTypeName(seed.getRawType())),
- aa,getInheritedAttributeWildcard()));
- return;
- }
-
-
- return;
- case ATTRIBUTE:
- properties.add(createAttributeProperty(seed));
- return;
- case VALUE:
- properties.add(createValueProperty(seed));
- return;
- case ELEMENT:
- properties.add(createElementProperty(seed));
- return;
- case ELEMENT_REF:
- properties.add(createReferenceProperty(seed));
- return;
- case MAP:
- properties.add(createMapProperty(seed));
- return;
- default:
- assert false;
- }
- } catch( ConflictException x ) {
- // report a conflicting annotation
- List<Annotation> err = x.annotations;
-
- builder.reportError(new IllegalAnnotationException(
- Messages.MUTUALLY_EXCLUSIVE_ANNOTATIONS.format(
- nav().getClassName(getClazz())+'#'+seed.getName(),
- err.get(0).annotationType().getName(), err.get(1).annotationType().getName()),
- err.get(0), err.get(1) ));
-
- // recover by ignoring this property
- } catch( DuplicateException e ) {
- // both are present
- builder.reportError(new IllegalAnnotationException(
- Messages.DUPLICATE_ANNOTATIONS.format(e.a1.annotationType().getName()),
- e.a1, e.a2 ));
- // recover by ignoring this property
-
- }
- }
-
- protected ReferencePropertyInfoImpl<T,C,F,M> createReferenceProperty(PropertySeed<T,C,F,M> seed) {
- return new ReferencePropertyInfoImpl<T,C,F,M>(this,seed);
- }
-
- protected AttributePropertyInfoImpl<T,C,F,M> createAttributeProperty(PropertySeed<T,C,F,M> seed) {
- return new AttributePropertyInfoImpl<T,C,F,M>(this,seed);
- }
-
- protected ValuePropertyInfoImpl<T,C,F,M> createValueProperty(PropertySeed<T,C,F,M> seed) {
- return new ValuePropertyInfoImpl<T,C,F,M>(this,seed);
- }
-
- protected ElementPropertyInfoImpl<T,C,F,M> createElementProperty(PropertySeed<T,C,F,M> seed) {
- return new ElementPropertyInfoImpl<T,C,F,M>(this,seed);
- }
-
- protected MapPropertyInfoImpl<T,C,F,M> createMapProperty(PropertySeed<T,C,F,M> seed) {
- return new MapPropertyInfoImpl<T,C,F,M>(this,seed);
- }
-
-
- /**
- * Adds properties that consists of accessors.
- */
- private void findGetterSetterProperties(XmlAccessType at) {
- // in the first step we accumulate getters and setters
- // into this map keyed by the property name.
- Map<String,M> getters = new LinkedHashMap<String,M>();
- Map<String,M> setters = new LinkedHashMap<String,M>();
-
- C c = clazz;
- do {
- collectGetterSetters(clazz, getters, setters);
-
- // take super classes into account if they have @XmlTransient
- c = nav().getSuperClass(c);
- } while(shouldRecurseSuperClass(c));
-
-
- // compute the intersection
- Set<String> complete = new TreeSet<String>(getters.keySet());
- complete.retainAll(setters.keySet());
-
- resurrect(getters, complete);
- resurrect(setters, complete);
-
- // then look for read/write properties.
- for (String name : complete) {
- M getter = getters.get(name);
- M setter = setters.get(name);
-
- Annotation[] ga = getter!=null ? reader().getAllMethodAnnotations(getter,new MethodLocatable<M>(this,getter,nav())) : EMPTY_ANNOTATIONS;
- Annotation[] sa = setter!=null ? reader().getAllMethodAnnotations(setter,new MethodLocatable<M>(this,setter,nav())) : EMPTY_ANNOTATIONS;
-
- boolean hasAnnotation = hasJAXBAnnotation(ga) || hasJAXBAnnotation(sa);
- boolean isOverriding = false;
- if(!hasAnnotation) {
- // checking if the method is overriding others isn't free,
- // so we don't compute it if it's not necessary.
- isOverriding = (getter!=null && nav().isOverriding(getter,c))
- && (setter!=null && nav().isOverriding(setter,c));
- }
-
- if((at==XmlAccessType.PROPERTY && !isOverriding)
- || (at==XmlAccessType.PUBLIC_MEMBER && isConsideredPublic(getter) && isConsideredPublic(setter) && !isOverriding)
- || hasAnnotation) {
- // make sure that the type is consistent
- if(getter!=null && setter!=null
- && !nav().isSameType(nav().getReturnType(getter), nav().getMethodParameters(setter)[0])) {
- // inconsistent
- builder.reportError(new IllegalAnnotationException(
- Messages.GETTER_SETTER_INCOMPATIBLE_TYPE.format(
- nav().getTypeName(nav().getReturnType(getter)),
- nav().getTypeName(nav().getMethodParameters(setter)[0])
- ),
- new MethodLocatable<M>( this, getter, nav()),
- new MethodLocatable<M>( this, setter, nav())));
- continue;
- }
-
- // merge annotations from two list
- Annotation[] r;
- if(ga.length==0) {
- r = sa;
- } else
- if(sa.length==0) {
- r = ga;
- } else {
- r = new Annotation[ga.length+sa.length];
- System.arraycopy(ga,0,r,0,ga.length);
- System.arraycopy(sa,0,r,ga.length,sa.length);
- }
-
- addProperty(createAccessorSeed(getter, setter), r, false);
- }
- }
- // done with complete pairs
- getters.keySet().removeAll(complete);
- setters.keySet().removeAll(complete);
-
- // TODO: think about
- // class Foo {
- // int getFoo();
- // }
- // class Bar extends Foo {
- // void setFoo(int x);
- // }
- // and how it will be XML-ized.
- }
-
- private void collectGetterSetters(C c, Map<String,M> getters, Map<String,M> setters) {
- // take super classes into account if they have @XmlTransient.
- // always visit them first so that
- // 1) order is right
- // 2) overriden properties are handled accordingly
- C sc = nav().getSuperClass(c);
- if(shouldRecurseSuperClass(sc))
- collectGetterSetters(sc,getters,setters);
-
- Collection<? extends M> methods = nav().getDeclaredMethods(c);
- Map<String,List<M>> allSetters = new LinkedHashMap<String,List<M>>();
- for( M method : methods ) {
- boolean used = false; // if this method is added to getters or setters
-
- if(nav().isBridgeMethod(method))
- continue; // ignore
-
- String name = nav().getMethodName(method);
- int arity = nav().getMethodParameters(method).length;
-
- if(nav().isStaticMethod(method)) {
- ensureNoAnnotation(method);
- continue;
- }
-
- // is this a get method?
- String propName = getPropertyNameFromGetMethod(name);
- if(propName!=null && arity==0) {
- getters.put(propName,method);
- used = true;
- }
-
- // is this a set method?
- propName = getPropertyNameFromSetMethod(name);
- if(propName!=null && arity==1) {
- List<M> propSetters = allSetters.get(propName);
- if(null == propSetters){
- propSetters = new ArrayList<M>();
- allSetters.put(propName, propSetters);
- }
- propSetters.add(method);
- used = true; // used check performed later
- }
-
- if(!used)
- ensureNoAnnotation(method);
- }
-
- // Match getter with setters by comparing getter return type to setter param
- for (Map.Entry<String,M> entry : getters.entrySet()) {
- String propName = entry.getKey();
- M getter = entry.getValue();
- List<M> propSetters = allSetters.remove(propName);
- if (null == propSetters) {
- //no matching setter
- continue;
- }
- T getterType = nav().getReturnType(getter);
- for (M setter : propSetters) {
- T setterType = nav().getMethodParameters(setter)[0];
- if (nav().isSameType(setterType, getterType)) {
- setters.put(propName, setter);
- break;
- }
- }
- }
-
- // also allow set-only properties
- for (Map.Entry<String,List<M>> e : allSetters.entrySet()) {
- setters.put(e.getKey(),e.getValue().get(0));
- }
- }
-
- /**
- * Checks if the properties in this given super class should be aggregated into this class.
- */
- private boolean shouldRecurseSuperClass(C sc) {
- return sc!=null
- && (builder.isReplaced(sc) || reader().hasClassAnnotation(sc, XmlTransient.class));
- }
-
- /**
- * Returns true if the method is considered 'public'.
- */
- private boolean isConsideredPublic(M m) {
- return m ==null || nav().isPublicMethod(m);
- }
-
- /**
- * If the method has an explicit annotation, allow it to participate
- * to the processing even if it lacks the setter or the getter.
- */
- private void resurrect(Map<String, M> methods, Set<String> complete) {
- for (Map.Entry<String, M> e : methods.entrySet()) {
- if(complete.contains(e.getKey()))
- continue;
- if(hasJAXBAnnotation(reader().getAllMethodAnnotations(e.getValue(),this)))
- complete.add(e.getKey());
- }
- }
-
- /**
- * Makes sure that the method doesn't have any annotation, if it does,
- * report it as an error
- */
- private void ensureNoAnnotation(M method) {
- Annotation[] annotations = reader().getAllMethodAnnotations(method,this);
- for( Annotation a : annotations ) {
- if(isJAXBAnnotation(a)) {
- builder.reportError(new IllegalAnnotationException(
- Messages.ANNOTATION_ON_WRONG_METHOD.format(),
- a));
- return;
- }
- }
- }
-
- /**
- * Returns true if a given annotation is a JAXB annotation.
- */
- private static boolean isJAXBAnnotation(Annotation a) {
- return ANNOTATION_NUMBER_MAP.containsKey(a.annotationType());
- }
-
- /**
- * Returns true if the array contains a JAXB annotation.
- */
- private static boolean hasJAXBAnnotation(Annotation[] annotations) {
- return getSomeJAXBAnnotation(annotations)!=null;
- }
-
- private static Annotation getSomeJAXBAnnotation(Annotation[] annotations) {
- for( Annotation a : annotations )
- if(isJAXBAnnotation(a))
- return a;
- return null;
- }
-
-
- /**
- * Returns "Foo" from "getFoo" or "isFoo".
- *
- * @return null
- * if the method name doesn't look like a getter.
- */
- private static String getPropertyNameFromGetMethod(String name) {
- if(name.startsWith("get") && name.length()>3)
- return name.substring(3);
- if(name.startsWith("is") && name.length()>2)
- return name.substring(2);
- return null;
- }
-
- /**
- * Returns "Foo" from "setFoo".
- *
- * @return null
- * if the method name doesn't look like a setter.
- */
- private static String getPropertyNameFromSetMethod(String name) {
- if(name.startsWith("set") && name.length()>3)
- return name.substring(3);
- return null;
- }
-
- /**
- * Creates a new {@link FieldPropertySeed} object.
- *
- * <p>
- * Derived class can override this method to create a sub-class.
- */
- protected PropertySeed<T,C,F,M> createFieldSeed(F f) {
- return new FieldPropertySeed<T,C,F,M>(this, f);
- }
-
- /**
- * Creates a new {@link GetterSetterPropertySeed} object.
- */
- protected PropertySeed<T,C,F,M> createAccessorSeed(M getter, M setter) {
- return new GetterSetterPropertySeed<T,C,F,M>(this, getter,setter);
- }
-
- public final boolean isElement() {
- return elementName!=null;
- }
-
- public boolean isAbstract() {
- return nav().isAbstract(clazz);
- }
-
- public boolean isOrdered() {
- return propOrder!=null;
- }
-
- public final boolean isFinal() {
- return nav().isFinal(clazz);
- }
-
- public final boolean hasSubClasses() {
- return hasSubClasses;
- }
-
- public final boolean hasAttributeWildcard() {
- return declaresAttributeWildcard() || inheritsAttributeWildcard();
- }
-
- public final boolean inheritsAttributeWildcard() {
- return getInheritedAttributeWildcard()!=null;
- }
-
- public final boolean declaresAttributeWildcard() {
- return attributeWildcard!=null;
- }
-
- /**
- * Gets the {@link PropertySeed} object for the inherited attribute wildcard.
- */
- private PropertySeed<T,C,F,M> getInheritedAttributeWildcard() {
- for( ClassInfoImpl<T,C,F,M> c=getBaseClass(); c!=null; c=c.getBaseClass() )
- if(c.attributeWildcard!=null)
- return c.attributeWildcard;
- return null;
- }
-
- public final QName getElementName() {
- return elementName;
- }
-
- public final QName getTypeName() {
- return typeName;
- }
-
- public final boolean isSimpleType() {
- List<? extends PropertyInfo> props = getProperties();
- if(props.size()!=1) return false;
- return props.get(0).kind()==PropertyKind.VALUE;
- }
-
- /**
- * Called after all the {@link TypeInfo}s are collected into the {@link #owner}.
- */
- @Override
- /*package*/ void link() {
- getProperties(); // make sure properties!=null
-
- // property name collision cehck
- Map<String,PropertyInfoImpl> names = new HashMap<String,PropertyInfoImpl>();
- for( PropertyInfoImpl<T,C,F,M> p : properties ) {
- p.link();
- PropertyInfoImpl old = names.put(p.getName(),p);
- if(old!=null) {
- builder.reportError(new IllegalAnnotationException(
- Messages.PROPERTY_COLLISION.format(p.getName()),
- p, old ));
- }
- }
- super.link();
- }
-
- public Location getLocation() {
- return nav().getClassLocation(clazz);
- }
-
- /**
- * XmlType allows specification of factoryClass and
- * factoryMethod. There are to be used if no default
- * constructor is found.
- *
- * @return
- * true if the factory method was found. False if not.
- */
- private boolean hasFactoryConstructor(XmlType t){
- if (t == null) return false;
-
- String method = t.factoryMethod();
- T fClass = reader().getClassValue(t, "factoryClass");
- if (method.length() > 0){
- if(nav().isSameType(fClass, nav().ref(XmlType.DEFAULT.class))){
- fClass = nav().use(clazz);
- }
- for(M m: nav().getDeclaredMethods(nav().asDecl(fClass))){
- //- Find the zero-arg public static method with the required return type
- if (nav().getMethodName(m).equals(method) &&
- nav().isSameType(nav().getReturnType(m), nav().use(clazz)) &&
- nav().getMethodParameters(m).length == 0 &&
- nav().isStaticMethod(m)){
- factoryMethod = m;
- break;
- }
- }
- if (factoryMethod == null){
- builder.reportError(new IllegalAnnotationException(
- Messages.NO_FACTORY_METHOD.format(nav().getClassName(nav().asDecl(fClass)), method), this ));
- }
- } else if(!nav().isSameType(fClass, nav().ref(XmlType.DEFAULT.class))){
- builder.reportError(new IllegalAnnotationException(
- Messages.FACTORY_CLASS_NEEDS_FACTORY_METHOD.format(nav().getClassName(nav().asDecl(fClass))), this ));
- }
- return factoryMethod != null;
- }
-
- public Method getFactoryMethod(){
- return (Method) factoryMethod;
- }
-
- @Override
- public String toString() {
- return "ClassInfo("+clazz+')';
- }
-
- private static final String[] DEFAULT_ORDER = new String[0];
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/DummyPropertyInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/DummyPropertyInfo.java
deleted file mode 100644
index 89c6f920..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/DummyPropertyInfo.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-/**
- * {@link PropertyInfo} that allows to add additional elements to the collection.
- *
- * @author Martin Grebac
- */
-public interface DummyPropertyInfo<T, C, F, M> {
- void addType(PropertyInfoImpl<T, C, F, M> info);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ERPropertyInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ERPropertyInfoImpl.java
deleted file mode 100644
index 38be93ad..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ERPropertyInfoImpl.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-
-/**
- * Common part of {@link ElementPropertyInfoImpl} and {@link ReferencePropertyInfoImpl}.
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class ERPropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
- extends PropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> {
-
- public ERPropertyInfoImpl(ClassInfoImpl<TypeT, ClassDeclT, FieldT, MethodT> classInfo, PropertySeed<TypeT, ClassDeclT, FieldT, MethodT> propertySeed) {
- super(classInfo, propertySeed);
-
- XmlElementWrapper e = seed.readAnnotation(XmlElementWrapper.class);
-
- boolean nil = false;
- boolean required = false;
- if(!isCollection()) {
- xmlName = null;
- if(e!=null)
- classInfo.builder.reportError(new IllegalAnnotationException(
- Messages.XML_ELEMENT_WRAPPER_ON_NON_COLLECTION.format(
- nav().getClassName(parent.getClazz())+'.'+seed.getName()),
- e
- ));
- } else {
- if(e!=null) {
- xmlName = calcXmlName(e);
- nil = e.nillable();
- required = e.required();
- } else
- xmlName = null;
- }
-
- wrapperNillable = nil;
- wrapperRequired = required;
- }
-
- private final QName xmlName;
-
- /**
- * True if the wrapper tag name is nillable.
- */
- private final boolean wrapperNillable;
-
- /**
- * True if the wrapper tag is required.
- */
- private final boolean wrapperRequired;
-
- /**
- * Gets the wrapper element name.
- */
- public final QName getXmlName() {
- return xmlName;
- }
-
- public final boolean isCollectionNillable() {
- return wrapperNillable;
- }
-
- public final boolean isCollectionRequired() {
- return wrapperRequired;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ElementInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ElementInfoImpl.java
deleted file mode 100644
index 434ad01d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ElementInfoImpl.java
+++ /dev/null
@@ -1,430 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.annotation.Annotation;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import javax.activation.MimeType;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlAttachmentRef;
-import javax.xml.bind.annotation.XmlElementDecl;
-import javax.xml.bind.annotation.XmlID;
-import javax.xml.bind.annotation.XmlIDREF;
-import javax.xml.bind.annotation.XmlInlineBinaryData;
-import javax.xml.bind.annotation.XmlSchema;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
-
-import com.sun.istack.internal.FinalArrayList;
-import com.sun.xml.internal.bind.v2.TODO;
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationSource;
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.core.Adapter;
-import com.sun.xml.internal.bind.v2.model.core.ClassInfo;
-import com.sun.xml.internal.bind.v2.model.core.ElementInfo;
-import com.sun.xml.internal.bind.v2.model.core.ElementPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfo;
-import com.sun.xml.internal.bind.v2.model.core.TypeRef;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-import com.sun.xml.internal.bind.v2.runtime.SwaRefAdapter;
-
-/**
- * {@link ElementInfo} implementation.
- *
- * @author Kohsuke Kawaguchi
- */
-class ElementInfoImpl<T,C,F,M> extends TypeInfoImpl<T,C,F,M> implements ElementInfo<T,C> {
-
- private final QName tagName;
-
- private final NonElement<T,C> contentType;
-
- private final T tOfJAXBElementT;
-
- private final T elementType;
-
- private final ClassInfo<T,C> scope;
-
- /**
- * Annotation that controls the binding.
- */
- private final XmlElementDecl anno;
-
- /**
- * If this element can substitute another element, the element name.
- * @see #link()
- */
- private ElementInfoImpl<T,C,F,M> substitutionHead;
-
- /**
- * Lazily constructed list of {@link ElementInfo}s that can substitute this element.
- * This could be null.
- * @see #link()
- */
- private FinalArrayList<ElementInfoImpl<T,C,F,M>> substitutionMembers;
-
- /**
- * The factory method from which this mapping was created.
- */
- private final M method;
-
- /**
- * If the content type is adapter, return that adapter.
- */
- private final Adapter<T,C> adapter;
-
- private final boolean isCollection;
-
- private final ID id;
-
- private final PropertyImpl property;
- private final MimeType expectedMimeType;
- private final boolean inlineBinary;
- private final QName schemaType;
-
- /**
- * Singleton instance of {@link ElementPropertyInfo} for this element.
- */
- protected class PropertyImpl implements
- ElementPropertyInfo<T,C>,
- TypeRef<T,C>,
- AnnotationSource {
- //
- // TypeRef impl
- //
- public NonElement<T,C> getTarget() {
- return contentType;
- }
- public QName getTagName() {
- return tagName;
- }
-
- public List<? extends TypeRef<T,C>> getTypes() {
- return Collections.singletonList(this);
- }
-
- public List<? extends NonElement<T,C>> ref() {
- return Collections.singletonList(contentType);
- }
-
- public QName getXmlName() {
- return tagName;
- }
-
- public boolean isCollectionRequired() {
- return false;
- }
-
- public boolean isCollectionNillable() {
- return true;
- }
-
- public boolean isNillable() {
- return true;
- }
-
- public String getDefaultValue() {
- String v = anno.defaultValue();
- if(v.equals("\u0000"))
- return null;
- else
- return v;
- }
-
- public ElementInfoImpl<T,C,F,M> parent() {
- return ElementInfoImpl.this;
- }
-
- public String getName() {
- return "value";
- }
-
- public String displayName() {
- return "JAXBElement#value";
- }
-
- public boolean isCollection() {
- return isCollection;
- }
-
- /**
- * For {@link ElementInfo}s, a collection always means a list of values.
- */
- public boolean isValueList() {
- return isCollection;
- }
-
- public boolean isRequired() {
- return true;
- }
-
- public PropertyKind kind() {
- return PropertyKind.ELEMENT;
- }
-
- public Adapter<T,C> getAdapter() {
- return adapter;
- }
-
- public ID id() {
- return id;
- }
-
- public MimeType getExpectedMimeType() {
- return expectedMimeType;
- }
-
- public QName getSchemaType() {
- return schemaType;
- }
-
- public boolean inlineBinaryData() {
- return inlineBinary;
- }
-
- public PropertyInfo<T,C> getSource() {
- return this;
- }
-
- //
- //
- // AnnotationSource impl
- //
- //
- public <A extends Annotation> A readAnnotation(Class<A> annotationType) {
- return reader().getMethodAnnotation(annotationType,method,ElementInfoImpl.this);
- }
-
- public boolean hasAnnotation(Class<? extends Annotation> annotationType) {
- return reader().hasMethodAnnotation(annotationType,method);
- }
- }
-
- /**
- * @param m
- * The factory method on ObjectFactory that comes with {@link XmlElementDecl}.
- */
- public ElementInfoImpl(ModelBuilder<T,C,F,M> builder,
- RegistryInfoImpl<T,C,F,M> registry, M m ) throws IllegalAnnotationException {
- super(builder,registry);
-
- this.method = m;
- anno = reader().getMethodAnnotation( XmlElementDecl.class, m, this );
- assert anno!=null; // the caller should check this
- assert anno instanceof Locatable;
-
- elementType = nav().getReturnType(m);
- T baseClass = nav().getBaseClass(elementType,nav().asDecl(JAXBElement.class));
- if(baseClass==null)
- throw new IllegalAnnotationException(
- Messages.XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD.format(nav().getMethodName(m)),
- anno );
-
- tagName = parseElementName(anno);
- T[] methodParams = nav().getMethodParameters(m);
-
- // adapter
- Adapter<T,C> a = null;
- if(methodParams.length>0) {
- XmlJavaTypeAdapter adapter = reader().getMethodAnnotation(XmlJavaTypeAdapter.class,m,this);
- if(adapter!=null)
- a = new Adapter<T,C>(adapter,reader(),nav());
- else {
- XmlAttachmentRef xsa = reader().getMethodAnnotation(XmlAttachmentRef.class,m,this);
- if(xsa!=null) {
- TODO.prototype("in Annotation Processing swaRefAdapter isn't avaialble, so this returns null");
- a = new Adapter<T,C>(owner.nav.asDecl(SwaRefAdapter.class),owner.nav);
- }
- }
- }
- this.adapter = a;
-
- // T of JAXBElement<T>
- tOfJAXBElementT =
- methodParams.length>0 ? methodParams[0] // this is more reliable, as it works even for ObjectFactory that sometimes have to return public types
- : nav().getTypeArgument(baseClass,0); // fall back to infer from the return type if no parameter.
-
- if(adapter==null) {
- T list = nav().getBaseClass(tOfJAXBElementT,nav().asDecl(List.class));
- if(list==null) {
- isCollection = false;
- contentType = builder.getTypeInfo(tOfJAXBElementT,this); // suck this type into the current set.
- } else {
- isCollection = true;
- contentType = builder.getTypeInfo(nav().getTypeArgument(list,0),this);
- }
- } else {
- // but if adapted, use the adapted type
- contentType = builder.getTypeInfo(this.adapter.defaultType,this);
- isCollection = false;
- }
-
- // scope
- T s = reader().getClassValue(anno,"scope");
- if(nav().isSameType(s, nav().ref(XmlElementDecl.GLOBAL.class)))
- scope = null;
- else {
- // TODO: what happens if there's an error?
- NonElement<T,C> scp = builder.getClassInfo(nav().asDecl(s),this);
- if(!(scp instanceof ClassInfo)) {
- throw new IllegalAnnotationException(
- Messages.SCOPE_IS_NOT_COMPLEXTYPE.format(nav().getTypeName(s)),
- anno );
- }
- scope = (ClassInfo<T,C>)scp;
- }
-
- id = calcId();
-
- property = createPropertyImpl();
-
- this.expectedMimeType = Util.calcExpectedMediaType(property,builder);
- this.inlineBinary = reader().hasMethodAnnotation(XmlInlineBinaryData.class,method);
- this.schemaType = Util.calcSchemaType(reader(),property,registry.registryClass,
- getContentInMemoryType(),this);
- }
-
- final QName parseElementName(XmlElementDecl e) {
- String local = e.name();
- String nsUri = e.namespace();
- if(nsUri.equals("##default")) {
- // if defaulted ...
- XmlSchema xs = reader().getPackageAnnotation(XmlSchema.class,
- nav().getDeclaringClassForMethod(method),this);
- if(xs!=null)
- nsUri = xs.namespace();
- else {
- nsUri = builder.defaultNsUri;
- }
- }
-
- return new QName(nsUri.intern(),local.intern());
- }
-
- protected PropertyImpl createPropertyImpl() {
- return new PropertyImpl();
- }
-
- public ElementPropertyInfo<T,C> getProperty() {
- return property;
- }
-
- public NonElement<T,C> getContentType() {
- return contentType;
- }
-
- public T getContentInMemoryType() {
- if(adapter==null) {
- return tOfJAXBElementT;
- } else {
- return adapter.customType;
- }
- }
-
- public QName getElementName() {
- return tagName;
- }
-
- public T getType() {
- return elementType;
- }
-
- /**
- * Leaf-type cannot be referenced from IDREF.
- *
- * @deprecated
- * why are you calling a method whose return value is always known?
- */
- public final boolean canBeReferencedByIDREF() {
- return false;
- }
-
- private ID calcId() {
- // TODO: share code with PropertyInfoImpl
- if(reader().hasMethodAnnotation(XmlID.class,method)) {
- return ID.ID;
- } else
- if(reader().hasMethodAnnotation(XmlIDREF.class,method)) {
- return ID.IDREF;
- } else {
- return ID.NONE;
- }
- }
-
- public ClassInfo<T, C> getScope() {
- return scope;
- }
-
- public ElementInfo<T,C> getSubstitutionHead() {
- return substitutionHead;
- }
-
- public Collection<? extends ElementInfoImpl<T,C,F,M>> getSubstitutionMembers() {
- if(substitutionMembers==null)
- return Collections.emptyList();
- else
- return substitutionMembers;
- }
-
- /**
- * Called after all the {@link TypeInfo}s are collected into the {@link #owner}.
- */
- /*package*/ void link() {
- // substitution head
- if(anno.substitutionHeadName().length()!=0) {
- QName name = new QName(
- anno.substitutionHeadNamespace(), anno.substitutionHeadName() );
- substitutionHead = owner.getElementInfo(null,name);
- if(substitutionHead==null) {
- builder.reportError(
- new IllegalAnnotationException(Messages.NON_EXISTENT_ELEMENT_MAPPING.format(
- name.getNamespaceURI(),name.getLocalPart()), anno));
- // recover by ignoring this substitution declaration
- } else
- substitutionHead.addSubstitutionMember(this);
- } else
- substitutionHead = null;
- super.link();
- }
-
- private void addSubstitutionMember(ElementInfoImpl<T,C,F,M> child) {
- if(substitutionMembers==null)
- substitutionMembers = new FinalArrayList<ElementInfoImpl<T,C,F,M>>();
- substitutionMembers.add(child);
- }
-
- public Location getLocation() {
- return nav().getMethodLocation(method);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ElementPropertyInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ElementPropertyInfoImpl.java
deleted file mode 100644
index 286563db..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ElementPropertyInfoImpl.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.util.AbstractList;
-import java.util.Collections;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlList;
-import javax.xml.namespace.QName;
-
-import com.sun.istack.internal.FinalArrayList;
-import com.sun.xml.internal.bind.v2.model.core.ElementPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfo;
-import com.sun.xml.internal.bind.v2.model.core.TypeRef;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-
-/**
- * Common {@link ElementPropertyInfo} implementation used for both
- * Annotation Processing and runtime.
- *
- * @author Kohsuke Kawaguchi
- */
-class ElementPropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
- extends ERPropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
- implements ElementPropertyInfo<TypeT,ClassDeclT>
-{
- /**
- * Lazily computed.
- * @see #getTypes()
- */
- private List<TypeRefImpl<TypeT,ClassDeclT>> types;
-
- private final List<TypeInfo<TypeT,ClassDeclT>> ref = new AbstractList<TypeInfo<TypeT,ClassDeclT>>() {
- public TypeInfo<TypeT,ClassDeclT> get(int index) {
- return getTypes().get(index).getTarget();
- }
-
- public int size() {
- return getTypes().size();
- }
- };
-
- /**
- * Lazily computed.
- * @see #isRequired()
- */
- private Boolean isRequired;
-
- /**
- * @see #isValueList()
- */
- private final boolean isValueList;
-
- ElementPropertyInfoImpl(
- ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent,
- PropertySeed<TypeT,ClassDeclT,FieldT,MethodT> propertySeed) {
- super(parent, propertySeed);
-
- isValueList = seed.hasAnnotation(XmlList.class);
-
- }
-
- public List<? extends TypeRefImpl<TypeT,ClassDeclT>> getTypes() {
- if(types==null) {
- types = new FinalArrayList<TypeRefImpl<TypeT,ClassDeclT>>();
- XmlElement[] ann=null;
-
- XmlElement xe = seed.readAnnotation(XmlElement.class);
- XmlElements xes = seed.readAnnotation(XmlElements.class);
-
- if(xe!=null && xes!=null) {
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.MUTUALLY_EXCLUSIVE_ANNOTATIONS.format(
- nav().getClassName(parent.getClazz())+'#'+seed.getName(),
- xe.annotationType().getName(), xes.annotationType().getName()),
- xe, xes ));
- }
-
- isRequired = true;
-
- if(xe!=null)
- ann = new XmlElement[]{xe};
- else
- if(xes!=null)
- ann = xes.value();
-
- if(ann==null) {
- // default
- TypeT t = getIndividualType();
- if(!nav().isPrimitive(t) || isCollection())
- isRequired = false;
- // nillableness defaults to true if it's collection
- types.add(createTypeRef(calcXmlName((XmlElement)null),t,isCollection(),null));
- } else {
- for( XmlElement item : ann ) {
- // TODO: handle defaulting in names.
- QName name = calcXmlName(item);
- TypeT type = reader().getClassValue(item, "type");
- if (nav().isSameType(type, nav().ref(XmlElement.DEFAULT.class)))
- type = getIndividualType();
- if((!nav().isPrimitive(type) || isCollection()) && !item.required())
- isRequired = false;
- types.add(createTypeRef(name, type, item.nillable(), getDefaultValue(item.defaultValue()) ));
- }
- }
- types = Collections.unmodifiableList(types);
- assert !types.contains(null);
- }
- return types;
- }
-
- private String getDefaultValue(String value) {
- if(value.equals("\u0000"))
- return null;
- else
- return value;
- }
-
- /**
- * Used by {@link PropertyInfoImpl} to create new instances of {@link TypeRef}
- */
- protected TypeRefImpl<TypeT,ClassDeclT> createTypeRef(QName name,TypeT type,boolean isNillable,String defaultValue) {
- return new TypeRefImpl<TypeT,ClassDeclT>(this,name,type,isNillable,defaultValue);
- }
-
- public boolean isValueList() {
- return isValueList;
- }
-
- public boolean isRequired() {
- if(isRequired==null)
- getTypes(); // compute the value
- return isRequired;
- }
-
- public List<? extends TypeInfo<TypeT,ClassDeclT>> ref() {
- return ref;
- }
-
- public final PropertyKind kind() {
- return PropertyKind.ELEMENT;
- }
-
- protected void link() {
- super.link();
- for (TypeRefImpl<TypeT, ClassDeclT> ref : getTypes() ) {
- ref.link();
- }
-
- if(isValueList()) {
- // ugly test, because IDREF's are represented as text on the wire,
- // it's OK to be a value list in that case.
- if(id()!= ID.IDREF) {
- // check if all the item types are simple types
- // this can't be done when we compute types because
- // not all TypeInfos are available yet
- for (TypeRefImpl<TypeT,ClassDeclT> ref : types) {
- if(!ref.getTarget().isSimpleType()) {
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.XMLLIST_NEEDS_SIMPLETYPE.format(
- nav().getTypeName(ref.getTarget().getType())), this ));
- break;
- }
- }
- }
-
- if(!isCollection())
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.XMLLIST_ON_SINGLE_PROPERTY.format(), this
- ));
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/EnumConstantImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/EnumConstantImpl.java
deleted file mode 100644
index 009ee834..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/EnumConstantImpl.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import com.sun.xml.internal.bind.v2.model.core.EnumConstant;
-import com.sun.xml.internal.bind.v2.model.core.EnumLeafInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class EnumConstantImpl<T,C,F,M> implements EnumConstant<T,C> {
- protected final String lexical;
- protected final EnumLeafInfoImpl<T,C,F,M> owner;
- protected final String name;
-
- /**
- * All the constants of the {@link EnumConstantImpl} is linked in one list.
- */
- protected final EnumConstantImpl<T,C,F,M> next;
-
- public EnumConstantImpl(EnumLeafInfoImpl<T,C,F,M> owner, String name, String lexical, EnumConstantImpl<T,C,F,M> next) {
- this.lexical = lexical;
- this.owner = owner;
- this.name = name;
- this.next = next;
- }
-
- public EnumLeafInfo<T,C> getEnclosingClass() {
- return owner;
- }
-
- public final String getLexicalValue() {
- return lexical;
- }
-
- public final String getName() {
- return name;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/EnumLeafInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/EnumLeafInfoImpl.java
deleted file mode 100644
index 18d94486..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/EnumLeafInfoImpl.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.util.Iterator;
-
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.core.EnumConstant;
-import com.sun.xml.internal.bind.v2.model.core.EnumLeafInfo;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.core.Element;
-import com.sun.xml.internal.bind.v2.model.core.ClassInfo;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-import java.util.Collection;
-import javax.xml.bind.annotation.XmlSchemaType;
-
-/**
- * {@link EnumLeafInfo} implementation.
- *
- * @author Kohsuke Kawaguchi
- */
-class EnumLeafInfoImpl<T,C,F,M> extends TypeInfoImpl<T,C,F,M>
- implements EnumLeafInfo<T,C>, Element<T,C>, Iterable<EnumConstantImpl<T,C,F,M>> {
-
- /**
- * The enum class whose information this object represents.
- */
- /*package*/ final C clazz;
-
- NonElement<T,C> baseType;
-
- private final T type;
-
- /**
- * Can be null for anonymous types.
- */
- private final QName typeName;
-
- /**
- * All the {@link EnumConstantImpl}s are linked in this list.
- */
- private EnumConstantImpl<T,C,F,M> firstConstant;
-
- /**
- * If this enum is also bound to an element, that tag name.
- * Or else null.
- */
- private QName elementName;
-
- /**
- * Used to recognize token vs string.
- */
- protected boolean tokenStringType;
-
- /**
- * @param clazz
- * @param type
- * clazz and type should both point to the enum class
- * that this {@link EnumLeafInfo} represents.
- * Because of the type parameterization we have to take them separately.
- */
- public EnumLeafInfoImpl(ModelBuilder<T,C,F,M> builder,
- Locatable upstream, C clazz, T type ) {
- super(builder,upstream);
- this.clazz = clazz;
- this.type = type;
-
- elementName = parseElementName(clazz);
-
- // compute the type name
- // TODO: I guess it must be allowed for enums to have @XmlElement
- typeName = parseTypeName(clazz);
-
- // locate the base type.
- // this can be done eagerly because there shouldn't be no cycle.
- XmlEnum xe = builder.reader.getClassAnnotation(XmlEnum.class, clazz, this);
- if(xe!=null) {
- T base = builder.reader.getClassValue(xe, "value");
- baseType = builder.getTypeInfo(base,this);
- } else {
- baseType = builder.getTypeInfo(builder.nav.ref(String.class),this);
- }
- }
-
- /**
- * Build {@link EnumConstant}s and discover/report any error in it.
- */
- protected void calcConstants() {
- EnumConstantImpl<T,C,F,M> last = null;
-
- // first check if we represent xs:token derived type
- Collection<? extends F> fields = nav().getDeclaredFields(clazz);
- for (F f : fields) {
- if (nav().isSameType(nav().getFieldType(f), nav().ref(String.class))) {
- XmlSchemaType schemaTypeAnnotation = builder.reader.getFieldAnnotation(XmlSchemaType.class, f, this);
- if (schemaTypeAnnotation != null) {
- if ("token".equals(schemaTypeAnnotation.name())) {
- tokenStringType = true;
- break;
- }
- };
- }
- }
- F[] constants = nav().getEnumConstants(clazz);
- for( int i=constants.length-1; i>=0; i-- ) {
- F constant = constants[i];
- String name = nav().getFieldName(constant);
- XmlEnumValue xev = builder.reader.getFieldAnnotation(XmlEnumValue.class, constant, this);
-
- String literal;
- if(xev==null) literal = name;
- else literal = xev.value();
-
- last = createEnumConstant(name,literal,constant,last);
- }
- this.firstConstant = last;
- }
-
- protected EnumConstantImpl<T,C,F,M> createEnumConstant(String name, String literal, F constant, EnumConstantImpl<T,C,F,M> last) {
- return new EnumConstantImpl<T,C,F,M>(this, name, literal, last);
- }
-
-
- public T getType() {
- return type;
- }
-
- /**
- *
- * @return true if enum is restriction/extension from xs:token type, otherwise false
- */
- public boolean isToken() {
- return tokenStringType;
- }
-
- /**
- * Leaf-type cannot be referenced from IDREF.
- *
- * @deprecated
- * why are you calling a method whose return value is always known?
- */
- public final boolean canBeReferencedByIDREF() {
- return false;
- }
-
- public QName getTypeName() {
- return typeName;
- }
-
- public C getClazz() {
- return clazz;
- }
-
- public NonElement<T,C> getBaseType() {
- return baseType;
- }
-
- public boolean isSimpleType() {
- return true;
- }
-
- public Location getLocation() {
- return nav().getClassLocation(clazz);
- }
-
- public Iterable<? extends EnumConstantImpl<T,C,F,M>> getConstants() {
- if(firstConstant==null)
- calcConstants();
- return this;
- }
-
- @Override
- public void link() {
- // make sure we've computed constants
- getConstants();
- super.link();
- }
-
- /**
- * No substitution.
- *
- * @deprecated if you are invoking this method directly, there's something wrong.
- */
- public Element<T, C> getSubstitutionHead() {
- return null;
- }
-
- public QName getElementName() {
- return elementName;
- }
-
- public boolean isElement() {
- return elementName!=null;
- }
-
- public Element<T,C> asElement() {
- if(isElement())
- return this;
- else
- return null;
- }
-
- /**
- * When a bean binds to an element, it's always through {@link XmlRootElement},
- * so this method always return null.
- *
- * @deprecated
- * you shouldn't be invoking this method on {@link ClassInfoImpl}.
- */
- public ClassInfo<T,C> getScope() {
- return null;
- }
-
- public Iterator<EnumConstantImpl<T,C,F,M>> iterator() {
- return new Iterator<EnumConstantImpl<T,C,F,M>>() {
- private EnumConstantImpl<T,C,F,M> next = firstConstant;
- public boolean hasNext() {
- return next!=null;
- }
-
- public EnumConstantImpl<T,C,F,M> next() {
- EnumConstantImpl<T,C,F,M> r = next;
- next = next.next;
- return r;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/FieldPropertySeed.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/FieldPropertySeed.java
deleted file mode 100644
index b889fc45..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/FieldPropertySeed.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.annotation.Annotation;
-
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-
-/**
- * {@link PropertyInfo} implementation backed by a field.
- */
-class FieldPropertySeed<TypeT,ClassDeclT,FieldT,MethodT> implements
- PropertySeed<TypeT,ClassDeclT,FieldT,MethodT> {
-
- protected final FieldT field;
- private ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent;
-
- FieldPropertySeed(ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> classInfo, FieldT field) {
- this.parent = classInfo;
- this.field = field;
- }
-
- public <A extends Annotation> A readAnnotation(Class<A> a) {
- return parent.reader().getFieldAnnotation(a, field,this);
- }
-
- public boolean hasAnnotation(Class<? extends Annotation> annotationType) {
- return parent.reader().hasFieldAnnotation(annotationType,field);
- }
-
- public String getName() {
- // according to the spec team, the BeanIntrospector.decapitalize does not apply
- // to the fields. Don't call Introspector.decapitalize
- return parent.nav().getFieldName(field);
- }
-
- public TypeT getRawType() {
- return parent.nav().getFieldType(field);
- }
-
- /**
- * Use the enclosing class as the upsream {@link Location}.
- */
- public Locatable getUpstream() {
- return parent;
- }
-
- public Location getLocation() {
- return parent.nav().getFieldLocation(field);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/GetterSetterPropertySeed.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/GetterSetterPropertySeed.java
deleted file mode 100644
index 8df128fd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/GetterSetterPropertySeed.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.annotation.Annotation;
-import java.beans.Introspector;
-
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-
-/**
- * {@link PropertyInfo} implementation backed by a getter and a setter.
- *
- * We allow the getter or setter to be null, in which case the bean
- * can only participate in unmarshalling (or marshalling)
- */
-class GetterSetterPropertySeed<TypeT,ClassDeclT,FieldT,MethodT> implements
- PropertySeed<TypeT,ClassDeclT,FieldT,MethodT> {
-
- protected final MethodT getter;
- protected final MethodT setter;
- private ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent;
-
- GetterSetterPropertySeed(ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent, MethodT getter, MethodT setter) {
- this.parent = parent;
- this.getter = getter;
- this.setter = setter;
-
- if(getter==null && setter==null)
- throw new IllegalArgumentException();
- }
-
- public TypeT getRawType() {
- if(getter!=null)
- return parent.nav().getReturnType(getter);
- else
- return parent.nav().getMethodParameters(setter)[0];
- }
-
- public <A extends Annotation> A readAnnotation(Class<A> annotation) {
- return parent.reader().getMethodAnnotation(annotation, getter,setter,this);
- }
-
- public boolean hasAnnotation(Class<? extends Annotation> annotationType) {
- return parent.reader().hasMethodAnnotation(annotationType,getName(),getter,setter,this);
- }
-
- public String getName() {
- if(getter!=null)
- return getName(getter);
- else
- return getName(setter);
- }
-
- private String getName(MethodT m) {
- String seed = parent.nav().getMethodName(m);
- String lseed = seed.toLowerCase();
- if(lseed.startsWith("get") || lseed.startsWith("set"))
- return camelize(seed.substring(3));
- if(lseed.startsWith("is"))
- return camelize(seed.substring(2));
- return seed;
- }
-
-
- private static String camelize(String s) {
- return Introspector.decapitalize(s);
- }
-
- /**
- * Use the enclosing class as the upsream {@link Location}.
- */
- public Locatable getUpstream() {
- return parent;
- }
-
- public Location getLocation() {
- if(getter!=null)
- return parent.nav().getMethodLocation(getter);
- else
- return parent.nav().getMethodLocation(setter);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/LeafInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/LeafInfoImpl.java
deleted file mode 100644
index 1bf93b8d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/LeafInfoImpl.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.core.LeafInfo;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-abstract class LeafInfoImpl<TypeT,ClassDeclT> implements LeafInfo<TypeT,ClassDeclT>, Location {
- private final TypeT type;
- /**
- * Can be null for anonymous types.
- */
- private final QName typeName;
-
- protected LeafInfoImpl(TypeT type,QName typeName) {
- assert type!=null;
-
- this.type = type;
- this.typeName = typeName;
- }
-
- /**
- * A reference to the representation of the type.
- */
- public TypeT getType() {
- return type;
- }
-
- /**
- * Leaf-type cannot be referenced from IDREF.
- *
- * @deprecated
- * why are you calling a method whose return value is always known?
- */
- public final boolean canBeReferencedByIDREF() {
- return false;
- }
-
- public QName getTypeName() {
- return typeName;
- }
-
- public Locatable getUpstream() {
- return null;
- }
-
- public Location getLocation() {
- // this isn't very accurate, but it's not too bad
- // doing it correctly need leaves to hold navigator.
- // otherwise revisit the design so that we take navigator as a parameter
- return this;
- }
-
- public boolean isSimpleType() {
- return true;
- }
-
- public String toString() {
- return type.toString();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/MapPropertyInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/MapPropertyInfoImpl.java
deleted file mode 100644
index 6604dc51..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/MapPropertyInfoImpl.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Map;
-
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.core.MapPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class MapPropertyInfoImpl<T,C,F,M> extends PropertyInfoImpl<T,C,F,M> implements MapPropertyInfo<T,C> {
-
- private final QName xmlName;
- private boolean nil;
- private final T keyType;
- private final T valueType;
-
- // laziy computed to handle cyclic references
- private NonElement<T,C> keyTypeInfo;
- private NonElement<T,C> valueTypeInfo;
-
-
- public MapPropertyInfoImpl(ClassInfoImpl<T,C,F,M> ci, PropertySeed<T,C,F,M> seed) {
- super(ci, seed);
-
- XmlElementWrapper xe = seed.readAnnotation(XmlElementWrapper.class);
- xmlName = calcXmlName(xe);
- nil = xe!=null && xe.nillable();
-
- T raw = getRawType();
- T bt = nav().getBaseClass(raw, nav().asDecl(Map.class) );
- assert bt!=null; // Map property is only for Maps
-
- if(nav().isParameterizedType(bt)) {
- keyType = nav().getTypeArgument(bt,0);
- valueType = nav().getTypeArgument(bt,1);
- } else {
- keyType = valueType = nav().ref(Object.class);
- }
- }
-
- public Collection<? extends TypeInfo<T,C>> ref() {
- return Arrays.asList(getKeyType(),getValueType());
- }
-
- public final PropertyKind kind() {
- return PropertyKind.MAP;
- }
-
- public QName getXmlName() {
- return xmlName;
- }
-
- public boolean isCollectionNillable() {
- return nil;
- }
-
- public NonElement<T,C> getKeyType() {
- if(keyTypeInfo==null)
- keyTypeInfo = getTarget(keyType);
- return keyTypeInfo;
- }
-
- public NonElement<T,C> getValueType() {
- if(valueTypeInfo==null)
- valueTypeInfo = getTarget(valueType);
- return valueTypeInfo;
- }
-
- public NonElement<T,C> getTarget(T type) {
- assert parent.builder!=null : "this method must be called during the build stage";
- return parent.builder.getTypeInfo(type,this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.java
deleted file mode 100644
index d429eb65..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.model.impl;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Message resources
- */
-enum Messages {
- // ClassInfoImpl
- ID_MUST_BE_STRING, // 1 arg
-
- MUTUALLY_EXCLUSIVE_ANNOTATIONS, // 2 args
- DUPLICATE_ANNOTATIONS, // 1 arg
- NO_DEFAULT_CONSTRUCTOR, // 1 arg
- CANT_HANDLE_INTERFACE, // 1 arg
- CANT_HANDLE_INNER_CLASS, // 1 arg
- ANNOTATION_ON_WRONG_METHOD, // 0 args
- GETTER_SETTER_INCOMPATIBLE_TYPE, // 2 args
- DUPLICATE_ENTRY_IN_PROP_ORDER, // 1 arg
- DUPLICATE_PROPERTIES, // 1 arg
-
- XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD, // 1 arg
- SCOPE_IS_NOT_COMPLEXTYPE, // 1 arg
- CONFLICTING_XML_ELEMENT_MAPPING, // 2 args
-
- REFERENCE_TO_NON_ELEMENT, // 1 arg
-
- NON_EXISTENT_ELEMENT_MAPPING, // 2 args
-
- TWO_ATTRIBUTE_WILDCARDS, // 1 arg
- SUPER_CLASS_HAS_WILDCARD, // 0 args
- INVALID_ATTRIBUTE_WILDCARD_TYPE, // 1 arg
- PROPERTY_MISSING_FROM_ORDER, // 1 arg
- PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY, // 2 args
-
- INVALID_XML_ENUM_VALUE, // 2 arg
- NO_IMAGE_WRITER, // 1 arg
-
- ILLEGAL_MIME_TYPE, // 2 args
- ILLEGAL_ANNOTATION, // 1 arg
-
- MULTIPLE_VALUE_PROPERTY, // 0 args
- ELEMENT_AND_VALUE_PROPERTY, // 0 args
- CONFLICTING_XML_TYPE_MAPPING, // 1 arg
- XMLVALUE_IN_DERIVED_TYPE, // 0 args
- SIMPLE_TYPE_IS_REQUIRED, // 1 arg
- PROPERTY_COLLISION, // 1 arg
- INVALID_IDREF, // 1 arg
- INVALID_XML_ELEMENT_REF, // 1 arg
- NO_XML_ELEMENT_DECL, // 2 args
- XML_ELEMENT_WRAPPER_ON_NON_COLLECTION, // 1 arg
-
- ANNOTATION_NOT_ALLOWED, // 1 arg
- XMLLIST_NEEDS_SIMPLETYPE, // 1 arg
- XMLLIST_ON_SINGLE_PROPERTY, // 0 arg
- NO_FACTORY_METHOD, // 2 args
- FACTORY_CLASS_NEEDS_FACTORY_METHOD, // 1 arg
-
- INCOMPATIBLE_API_VERSION, // 2 args
- INCOMPATIBLE_API_VERSION_MUSTANG, // 2 args
- RUNNING_WITH_1_0_RUNTIME, // 2 args
-
- MISSING_JAXB_PROPERTIES, // 1arg
- TRANSIENT_FIELD_NOT_BINDABLE, // 1 arg
- THERE_MUST_BE_VALUE_IN_XMLVALUE, // 1 arg
- UNMATCHABLE_ADAPTER, // 2 args
- ANONYMOUS_ARRAY_ITEM, // 1 arg
-
- ACCESSORFACTORY_INSTANTIATION_EXCEPTION, // 2 arg
- ACCESSORFACTORY_ACCESS_EXCEPTION, // 2 arg
- CUSTOM_ACCESSORFACTORY_PROPERTY_ERROR, // 2 arg
- CUSTOM_ACCESSORFACTORY_FIELD_ERROR, // 2 arg
- XMLGREGORIANCALENDAR_INVALID, // 1 arg
- XMLGREGORIANCALENDAR_SEC, // 0 arg
- XMLGREGORIANCALENDAR_MIN, // 0 arg
- XMLGREGORIANCALENDAR_HR, // 0 arg
- XMLGREGORIANCALENDAR_DAY, // 0 arg
- XMLGREGORIANCALENDAR_MONTH, // 0 arg
- XMLGREGORIANCALENDAR_YEAR, // 0 arg
- XMLGREGORIANCALENDAR_TIMEZONE, // 0 arg
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
-
- @Override
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.properties
deleted file mode 100644
index 27af6c16..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages.properties
+++ /dev/null
@@ -1,216 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ID_MUST_BE_STRING = \
- Property "{0}" has an XmlID annotation but its type is not String.
-
-# {0} - field or field accessor (getter/setter) e.g.: foo.Bar#field has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement OR foo.Bar#getField() has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement
-MUTUALLY_EXCLUSIVE_ANNOTATIONS = \
- {0} has mutually exclusive annotations @{1} and @{2}
-
-DUPLICATE_ANNOTATIONS = \
- @{0} annotation is found on two places; one would be suffice.
-
-# {0} - class name. e.g.: java.lang.StackTraceElement does not have a no-arg default constructor.
-NO_DEFAULT_CONSTRUCTOR = \
- {0} does not have a no-arg default constructor.
-
-CANT_HANDLE_INTERFACE = \
- {0} is an interface, and JAXB can''t handle interfaces.
-
-CANT_HANDLE_INNER_CLASS = \
- {0} is a non-static inner class, and JAXB can''t handle those.
-
-ANNOTATION_ON_WRONG_METHOD = \
- JAXB annotation is placed on a method that is not a JAXB property
-
-GETTER_SETTER_INCOMPATIBLE_TYPE = \
- The type of the getter is {0} but that of the setter is {1}. They have to be the same.
-
-DUPLICATE_ENTRY_IN_PROP_ORDER = \
- Property "{0}" appears more than once in the @XmlType.propOrder
-
-DUPLICATE_PROPERTIES = \
- There are two properties named "{0}"
-
-XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = \
- The {0} method has @XmlElementMapping on it, but it doesn''t return a sub-type of JAXBElement.
-
-# {0} - (xsd) type name. e.g. ns:MyType is not bound to a complex type, and therefore illegal as the scope.
-SCOPE_IS_NOT_COMPLEXTYPE = \
- {0} is not bound to a complex type, and therefore illegal as the scope.
-
-CONFLICTING_XML_ELEMENT_MAPPING = \
- The element name '{'{0}'}'{1} has more than one mapping.
-
-REFERENCE_TO_NON_ELEMENT = \
- Property {0} is annotated with @XmlReference but doesn''t refer to an element.
-
-NON_EXISTENT_ELEMENT_MAPPING = \
- No element mapping exists for "{0}":"{1}"
-
-TWO_ATTRIBUTE_WILDCARDS = \
- {0} has two properties with the @XmlAnyAttribute annotation.
-
-SUPER_CLASS_HAS_WILDCARD = \
- Can''t have @XmlAnyAttribute when a base class has it already.
-
-INVALID_ATTRIBUTE_WILDCARD_TYPE = \
- @XmlAnyAttribute is placed on a property whose type is {0} but it needs to be assignable to java.util.Map.
-
-PROPERTY_MISSING_FROM_ORDER = \
- Property {0} is present but not specified in @XmlType.propOrder
-
-PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY = \
- Property {0} appears in @XmlType.propOrder, but no such property exists. Maybe you meant {1}?
-
-# {1} - (local) type name e.g.: '#foo' is not a valid value for 'NCName'
-INVALID_XML_ENUM_VALUE = \
- "{0}" is not a valid value for {1}.
-
-FAILED_TO_INITIALE_DATATYPE_FACTORY = \
- Failed to initialize JAXP 1.3 DatatypeFactory class.
-
-NO_IMAGE_WRITER = \
- No javax.imageio.ImageWriter is available for the specified MIME type "{0}"
-
-ILLEGAL_MIME_TYPE = \
- "{0}" is not a valid MIME type: {1}
-
-ILLEGAL_ANNOTATION = \
- {0} annotation cannot be placed here
-
-MULTIPLE_VALUE_PROPERTY = \
- @XmlValue is only allowed one per class, but two properties are annotated with @XmlValue.
-
-XMLVALUE_IN_DERIVED_TYPE = \
- @XmlValue is not allowed on a class that derives another class.
-
-ELEMENT_AND_VALUE_PROPERTY = \
- If a class has @XmlElement property, it cannot have @XmlValue property.
-
-CONFLICTING_XML_TYPE_MAPPING = \
- Two classes have the same XML type name "{0}". Use @XmlType.name and @XmlType.namespace to \
- assign different names to them.
-
-SIMPLE_TYPE_IS_REQUIRED = \
- @XmlAttribute/@XmlValue need to reference a Java type that maps to text in XML.
-
-PROPERTY_COLLISION = \
- Class has two properties of the same name "{0}"
-
-INVALID_IDREF = \
- XmlIDREF property is referencing a type "{0}" that doesn''t have an XmlID property.
-
-INVALID_XML_ELEMENT_REF = \
- Invalid @XmlElementRef : Type "{0}" or any of it's subclasses are not known to this context.
-
-NO_XML_ELEMENT_DECL = \
- There''s no ObjectFactory with an @XmlElementDecl for the element '{'{0}'}'{1}.
-
-XML_ELEMENT_WRAPPER_ON_NON_COLLECTION = \
- @XmlElementWrapper is only allowed on a collection property but "{0}" is not a collection property.
-
-ANNOTATION_NOT_ALLOWED = \
- {0} annotation is not allowed on this kind of property.
-
-XMLLIST_NEEDS_SIMPLETYPE = \
- {0} maps to a structured XML fragment (AKA complex type), and therefore incompatible with @XmlList.
-
-XMLLIST_ON_SINGLE_PROPERTY = \
- @XmlList cannot be placed on a single-value property
-
-NO_FACTORY_METHOD = \
- Factory class "{0}" does not have static zero args factory method "{1}".
-
-FACTORY_CLASS_NEEDS_FACTORY_METHOD = \
- XmlType has not defined a factory method for Factory class "{0}".
-
-MISSING_JAXB_PROPERTIES = \
- Package "{0}" is missing jaxb.properties file. Have you copied this from the generated source directory or include it in the classpath?
-
-TRANSIENT_FIELD_NOT_BINDABLE = \
- Transient field "{0}" cannot have any JAXB annotations.
-
-THERE_MUST_BE_VALUE_IN_XMLVALUE = \
- Object must have some value in its @XmlValue field: {0}
-
-INCOMPATIBLE_API_VERSION = \
- JAXB 2.1 API jar is being loaded (from {0}), but this RI (from {1}) requires JAXB 2.2 API jar.
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-INCOMPATIBLE_API_VERSION_MUSTANG = \
- JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from {1}) needs 2.2 API. \
- Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. \
- (See http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-RUNNING_WITH_1_0_RUNTIME = \
- You are trying to run JAXB 2.0 runtime (from {1}) but you have old JAXB 1.0 runtime earlier \
- in the classpath (at {0}) Please remove the JAXB 1.0 runtime for 2.0 runtime to work correctly.
-
-UNMATCHABLE_ADAPTER = \
- Adapter {0} is not applicable to the field type {1}.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_INSTANTIATION_EXCEPTION = \
- Unable to create instance of AccessorFactory, {0} for class {1}.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_ACCESS_EXCEPTION = \
- Unable to access instance of AccessorFactory, {0} for class {1}.
-
-CUSTOM_ACCESSORFACTORY_PROPERTY_ERROR = \
- Custom AccessorFactory, {0}, is reporting an error accessing a property. {1}
-
-CUSTOM_ACCESSORFACTORY_FIELD_ERROR = \
- Custom AccessorFactory, {0}, is reporting an error accessing a field. {1}
-
-ANONYMOUS_ARRAY_ITEM = \
- {0} is used as an array component type, so it cannot be anonymous.
-
-XMLGREGORIANCALENDAR_INVALID = \
- Invalid set of fields set for XMLGregorianCalendar type {0}.
-
-XMLGREGORIANCALENDAR_SEC = \
- Seconds not set.
-
-XMLGREGORIANCALENDAR_MIN = \
- Minutes not set.
-
-XMLGREGORIANCALENDAR_HR = \
- Hour not set.
-
-XMLGREGORIANCALENDAR_DAY = \
- Day not set.
-
-XMLGREGORIANCALENDAR_MONTH = \
- Month not set.
-
-XMLGREGORIANCALENDAR_YEAR = \
- Year not set.
-
-XMLGREGORIANCALENDAR_TIMEZONE = \
- Timezone not set.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_de.properties
deleted file mode 100644
index bb42cb47..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_de.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ID_MUST_BE_STRING = Eigenschaft "{0}" enth\u00E4lt eine XmlID-Annotation, der Typ ist jedoch nicht "String".
-
-# {0} - field or field accessor (getter/setter) e.g.: foo.Bar#field has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement OR foo.Bar#getField() has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement
-MUTUALLY_EXCLUSIVE_ANNOTATIONS = {0} enth\u00E4lt sich gegenseitig ausschlie\u00DFende Annotationen @{1} und @{2}
-
-DUPLICATE_ANNOTATIONS = @{0}-Annotation wird an zwei Stellen gefunden, eine Stelle w\u00FCrde ausreichen.
-
-# {0} - class name. e.g.: java.lang.StackTraceElement does not have a no-arg default constructor.
-NO_DEFAULT_CONSTRUCTOR = {0} enth\u00E4lt keinen "no-arg"-Standardkonstruktor.
-
-CANT_HANDLE_INTERFACE = {0} ist eine Schnittstelle, und JAXB kann keine Schnittstellen verarbeiten.
-
-CANT_HANDLE_INNER_CLASS = {0} ist eine nicht-statische innere Klasse, und JAXB kann diese nicht verarbeiten.
-
-ANNOTATION_ON_WRONG_METHOD = JAXB-Annotation wurde auf eine Methode gesetzt, die keine JAXB-Eigenschaft ist
-
-GETTER_SETTER_INCOMPATIBLE_TYPE = Der Getter-Typ ist {0}, der Setter-Typ hingegen {1}. Sie m\u00FCssen identisch sein.
-
-DUPLICATE_ENTRY_IN_PROP_ORDER = Eigenschaft "{0}" ist mehr als einmal in @XmlType.propOrder enthalten
-
-DUPLICATE_PROPERTIES = Es sind zwei Eigenschaften namens "{0}" vorhanden
-
-XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = Die {0}-Methode enth\u00E4lt @XmlElementMapping, gibt jedoch keinen Subtyp von JAXBElement zur\u00FCck.
-
-# {0} - (xsd) type name. e.g. ns:MyType is not bound to a complex type, and therefore illegal as the scope.
-SCOPE_IS_NOT_COMPLEXTYPE = {0} ist nicht an einen komplexen Typ gebunden und somit als Geltungsbereich unzul\u00E4ssig.
-
-CONFLICTING_XML_ELEMENT_MAPPING = Der Elementname ''{''{0}''}''{1} enth\u00E4lt mehr als eine Zuordnung.
-
-REFERENCE_TO_NON_ELEMENT = Eigenschaft {0} ist mit @XmlReference-Annotation versehen, referenziert jedoch kein Element.
-
-NON_EXISTENT_ELEMENT_MAPPING = Es ist keine Elementzuordnung f\u00FCr "{0}" vorhanden:"{1}"
-
-TWO_ATTRIBUTE_WILDCARDS = {0} enth\u00E4lt zwei Eigenschaften mit der @XmlAnyAttribute-Annotation.
-
-SUPER_CLASS_HAS_WILDCARD = @XmlAnyAttribute ist nicht zul\u00E4ssig, wenn es bereits in einer Basisklasse vorhanden ist.
-
-INVALID_ATTRIBUTE_WILDCARD_TYPE = @XmlAnyAttribute ist auf eine Eigenschaft gesetzt, deren Typ {0} ist, muss jedoch java.util.Map zugeordnet werden k\u00F6nnen.
-
-PROPERTY_MISSING_FROM_ORDER = Eigenschaft {0} ist vorhanden, jedoch in @XmlType.propOrder nicht angegeben
-
-PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY = Eigenschaft {0} ist in @XmlType.propOrder enthalten, eine derartige Eigenschaft ist jedoch nicht vorhanden. Haben Sie {1} gemeint?
-
-# {1} - (local) type name e.g.: '#foo' is not a valid value for 'NCName'
-INVALID_XML_ENUM_VALUE = "{0}" ist kein g\u00FCltiger Wert f\u00FCr {1}.
-
-FAILED_TO_INITIALE_DATATYPE_FACTORY = JAXP 1.3 DatatypeFactory-Klasse konnte nicht initialisiert werden.
-
-NO_IMAGE_WRITER = Es ist kein javax.imageio.ImageWriter f\u00FCr den angegebenen MIME-Typ "{0}" verf\u00FCgbar
-
-ILLEGAL_MIME_TYPE = "{0}" ist kein g\u00FCltiger MIME-Typ: {1}
-
-ILLEGAL_ANNOTATION = {0}-Annotation darf nicht hier stehen
-
-MULTIPLE_VALUE_PROPERTY = Es ist nur ein @XmlValue pro Klasse zul\u00E4ssig, zwei Eigenschaften enthalten jedoch die Annotation @XmlValue.
-
-XMLVALUE_IN_DERIVED_TYPE = @XmlValue ist bei einer Klasse nicht zul\u00E4ssig, die eine andere Klasse ableitet.
-
-ELEMENT_AND_VALUE_PROPERTY = Wenn eine Klasse die Eigenschaft @XmlElement enth\u00E4lt, kann sie die Eigenschaft @XmlValue nicht enthalten.
-
-CONFLICTING_XML_TYPE_MAPPING = Zwei Klassen haben denselben XML-Typnamen"{0}". Verwenden Sie @XmlType.name und @XmlType.namespace, um ihnen unterschiedliche Namen zuzuweisen.
-
-SIMPLE_TYPE_IS_REQUIRED = @XmlAttribute/@XmlValue muss einen Java-Typ referenzieren, der Text in XML zugeordnet ist.
-
-PROPERTY_COLLISION = Klasse enth\u00E4lt zwei Eigenschaften mit demselben Namen "{0}"
-
-INVALID_IDREF = XmlIDREF-Eigenschaft referenziert einen Typ "{0}", der keine XmlID-Eigenschaft enth\u00E4lt.
-
-INVALID_XML_ELEMENT_REF = Ung\u00FCltige @XmlElementRef: Typ "{0}" oder eine seiner Unterklassen sind in diesem Kontext nicht bekannt.
-
-NO_XML_ELEMENT_DECL = Es ist keine ObjectFactory mit @XmlElementDecl f\u00FCr das Element ''{''{0}''}''{1} vorhanden.
-
-XML_ELEMENT_WRAPPER_ON_NON_COLLECTION = @XmlElementWrapper ist nur bei einer Collection-Eigenschaft zul\u00E4ssig, "{0}" ist jedoch keine Collection-Eigenschaft.
-
-ANNOTATION_NOT_ALLOWED = {0}-Annotation ist bei dieser Art von Eigenschaft nicht zul\u00E4ssig.
-
-XMLLIST_NEEDS_SIMPLETYPE = {0} ist einem strukturierten XML-Fragment (d.h. einem komplexen Typ) zugeordnet und deshalb nicht mit @XmlList kompatibel.
-
-XMLLIST_ON_SINGLE_PROPERTY = @XmlList kann nicht auf eine Einzelwerteigenschaft gesetzt werden
-
-NO_FACTORY_METHOD = Factory-Klasse "{0}" hat keine statische "zero-arguments" Factory-Methode "{1}".
-
-FACTORY_CLASS_NEEDS_FACTORY_METHOD = XmlType hat keine Factory-Methode f\u00FCr Factory-Klasse "{0}" definiert.
-
-MISSING_JAXB_PROPERTIES = In Package "{0}" fehlt die jaxb.properties-Datei. Haben Sie diese aus dem generierten Quellverzeichnis kopiert oder im Classpath aufgenommen?
-
-TRANSIENT_FIELD_NOT_BINDABLE = Transientes Feld "{0}" darf keine JAXB-Annotationen enthalten.
-
-THERE_MUST_BE_VALUE_IN_XMLVALUE = Objekt muss einen Wert im @XmlValue-Feld enthalten: {0}
-
-INCOMPATIBLE_API_VERSION = JAXB 2.1 API-JAR wird geladen (aus {0}), diese RI (aus {1}) erfordert jedoch JAXB 2.2 API-JAR.
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-INCOMPATIBLE_API_VERSION_MUSTANG = JAXB 2.1-API wird aus dem Bootstrap Classloader geladen, diese RI (aus {1}) erfordert jedoch 2.2-API. Verwenden Sie das "Endorsed"-Verzeichnisverfahren, um jaxb-api.jar in den Bootstrap Classloader zu setzen. (Siehe http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-RUNNING_WITH_1_0_RUNTIME = Sie versuchen, JAXB 2.0 Runtime (aus {1}) auszuf\u00FChren, es ist jedoch an fr\u00FCherer Stelle im Classpath ein altes JAXB 1.0 Runtime (bei {0}) vorhanden. Entfernen Sie JAXB 1.0 Runtime, damit 2.0 Runtime ordnungsgem\u00E4\u00DF ausgef\u00FChrt werden kann.
-
-UNMATCHABLE_ADAPTER = Adapter {0} ist f\u00FCr den Feldtyp {1} nicht anwendbar.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_INSTANTIATION_EXCEPTION = Instanz von AccessorFactory {0} f\u00FCr Klasse {1} kann nicht erstellt werden.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_ACCESS_EXCEPTION = Auf Instanz von AccessorFactory, {0}, f\u00FCr Klasse {1} kann nicht zugegriffen werden.
-
-CUSTOM_ACCESSORFACTORY_PROPERTY_ERROR = Benutzerdefinierte AccessorFactory, {0}, meldet einen Fehler beim Zugriff auf eine Eigenschaft. {1}
-
-CUSTOM_ACCESSORFACTORY_FIELD_ERROR = Benutzerdefinierte AccessorFactory, {0}, meldet einen Fehler beim Zugriff auf ein Feld. {1}
-
-ANONYMOUS_ARRAY_ITEM = {0} wird als Array-Komponententyp verwendet, kann also nicht anonym sein.
-
-XMLGREGORIANCALENDAR_INVALID = Ung\u00FCltige Gruppe von Feldern f\u00FCr XMLGregorianCalendar-Typ {0} festgelegt.
-
-XMLGREGORIANCALENDAR_SEC = Sekunden nicht festgelegt.
-
-XMLGREGORIANCALENDAR_MIN = Minuten nicht festgelegt.
-
-XMLGREGORIANCALENDAR_HR = Stunde nicht festgelegt.
-
-XMLGREGORIANCALENDAR_DAY = Tag nicht festgelegt.
-
-XMLGREGORIANCALENDAR_MONTH = Monat nicht festgelegt.
-
-XMLGREGORIANCALENDAR_YEAR = Jahr nicht festgelegt.
-
-XMLGREGORIANCALENDAR_TIMEZONE = Zeitzone nicht festgelegt.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_es.properties
deleted file mode 100644
index 8d71bedb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_es.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ID_MUST_BE_STRING = La propiedad "{0}" tiene una anotaci\u00F3n XmlID, pero no es del tipo Cadena.
-
-# {0} - field or field accessor (getter/setter) e.g.: foo.Bar#field has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement OR foo.Bar#getField() has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement
-MUTUALLY_EXCLUSIVE_ANNOTATIONS = {0} posee las anotaciones que se excluyen mutuamente @{1} y @{2}
-
-DUPLICATE_ANNOTATIONS = La anotaci\u00F3n @{0} se encuentra en dos lugares. Uno deber\u00EDa ser suficiente.
-
-# {0} - class name. e.g.: java.lang.StackTraceElement does not have a no-arg default constructor.
-NO_DEFAULT_CONSTRUCTOR = {0} no tiene un constructor por defecto sin argumentos.
-
-CANT_HANDLE_INTERFACE = {0} es una interfaz y JAXB no puede manejar interfaces.
-
-CANT_HANDLE_INNER_CLASS = {0} es una clase interna no est\u00E1tica y JAXB no las puede manejar.
-
-ANNOTATION_ON_WRONG_METHOD = La anotaci\u00F3n JAXB est\u00E1 colocada en un m\u00E9todo que no es una propiedad de JAXB
-
-GETTER_SETTER_INCOMPATIBLE_TYPE = El tipo de getter es {0}, pero el de setter es {1}. Tienen que ser del mismo tipo.
-
-DUPLICATE_ENTRY_IN_PROP_ORDER = La propiedad "{0}" aparece m\u00E1s de una vez en @XmlType.propOrder
-
-DUPLICATE_PROPERTIES = Hay dos propiedades con el nombre "{0}"
-
-XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = El m\u00E9todo {0} incluye @XmlElementMapping, pero no devuelve un subtipo del elemento JAXB.
-
-# {0} - (xsd) type name. e.g. ns:MyType is not bound to a complex type, and therefore illegal as the scope.
-SCOPE_IS_NOT_COMPLEXTYPE = {0} no est\u00E1 enlazado a un tipo complejo y, por lo tanto, no es v\u00E1lido, al igual que el \u00E1mbito.
-
-CONFLICTING_XML_ELEMENT_MAPPING = El nombre del elemento ''{''{0}''}''{1} tiene m\u00E1s de una asignaci\u00F3n.
-
-REFERENCE_TO_NON_ELEMENT = La propiedad {0} est\u00E1 anotada con @XmlReference, pero no hace referencia a un elemento.
-
-NON_EXISTENT_ELEMENT_MAPPING = No existe ninguna asignaci\u00F3n de elemento para "{0}":"{1}"
-
-TWO_ATTRIBUTE_WILDCARDS = {0} posee dos propiedades con la anotaci\u00F3n @XmlAnyAttribute.
-
-SUPER_CLASS_HAS_WILDCARD = No puede tener @XmlAnyAttribute cuando una clase base ya lo tiene.
-
-INVALID_ATTRIBUTE_WILDCARD_TYPE = @XmlAnyAttribute est\u00E1 colocado en una propiedad de tipo {0}, pero es necesario que se pueda asignar a java.util.Map.
-
-PROPERTY_MISSING_FROM_ORDER = La propiedad {0} existe, pero no est\u00E1 especificada en @XmlType.propOrder
-
-PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY = La propiedad {0} aparece en @XmlType.propOrder, pero no existe. Quiz\u00E1 quiso decir {1}.
-
-# {1} - (local) type name e.g.: '#foo' is not a valid value for 'NCName'
-INVALID_XML_ENUM_VALUE = "{0}" no es un valor v\u00E1lido para {1}.
-
-FAILED_TO_INITIALE_DATATYPE_FACTORY = Fallo al inicializar la clase DatatypeFactory de JAXP 1.3.
-
-NO_IMAGE_WRITER = No hay disponible ning\u00FAn javax.imageio.ImageWriter para el tipo MIME especificado "{0}"
-
-ILLEGAL_MIME_TYPE = "{0}" no es un tipo MIME v\u00E1lido: {1}
-
-ILLEGAL_ANNOTATION = La anotaci\u00F3n {0} no se puede colocar aqu\u00ED
-
-MULTIPLE_VALUE_PROPERTY = S\u00F3lo se permite un @XmlValue por clase, pero hay dos propiedades anotadas con @XmlValue.
-
-XMLVALUE_IN_DERIVED_TYPE = @XmlValue no est\u00E1 permitido en una clase que se deriva de otra clase.
-
-ELEMENT_AND_VALUE_PROPERTY = Si una clase tiene la propiedad @XmlElement, no puede tener la propiedad @XmlValue.
-
-CONFLICTING_XML_TYPE_MAPPING = Hay dos clases que tienen el mismo nombre de tipo XML "{0}". Utilice @XmlType.name y @XmlType.namespace para asignarles nombres diferentes.
-
-SIMPLE_TYPE_IS_REQUIRED = @XmlAttribute/@XmlValue tienen que hacer referencia a un tipo Java que se asigne a texto en XML.
-
-PROPERTY_COLLISION = La clase tiene dos propiedades con el mismo nombre "{0}"
-
-INVALID_IDREF = La propiedad XmlIDREF hace referencia a un tipo "{0}" que no tiene una propiedad XmlID.
-
-INVALID_XML_ELEMENT_REF = @XmlElementRef no v\u00E1lido: el tipo "{0}" o alguna de sus subclases son desconocidos en este contexto.
-
-NO_XML_ELEMENT_DECL = No hay ning\u00FAn ObjectFactory con @XmlElementDecl para el elemento ''{''{0}''}''{1}.
-
-XML_ELEMENT_WRAPPER_ON_NON_COLLECTION = @XmlElementWrapper s\u00F3lo est\u00E1 permitido en una propiedad de recopilaci\u00F3n, pero "{0}" no es una propiedad de recopilaci\u00F3n.
-
-ANNOTATION_NOT_ALLOWED = La anotaci\u00F3n {0} no est\u00E1 permitida en este tipo de propiedad.
-
-XMLLIST_NEEDS_SIMPLETYPE = {0} se asigna a un fragmento XML estructurado (tambi\u00E9n conocido como tipo complejo) y, por lo tanto, es incompatible con @XmlList.
-
-XMLLIST_ON_SINGLE_PROPERTY = @XmlList no se puede colocar en una propiedad de un solo valor
-
-NO_FACTORY_METHOD = La clase de f\u00E1brica "{0}" no tiene un m\u00E9todo de f\u00E1brica sin argumentos est\u00E1tico "{1}".
-
-FACTORY_CLASS_NEEDS_FACTORY_METHOD = XmlType no tiene definido un m\u00E9todo de f\u00E1brica para la clase de f\u00E1brica "{0}".
-
-MISSING_JAXB_PROPERTIES = Falta el archivo jaxb.properties en el paquete "{0}". \u00BFLo ha copiado del directorio de origen generado o lo ha incluido en la classpath?
-
-TRANSIENT_FIELD_NOT_BINDABLE = El campo transitorio "{0}" no puede tener ninguna anotaci\u00F3n de JAXB.
-
-THERE_MUST_BE_VALUE_IN_XMLVALUE = El objeto debe tener alg\u00FAn valor en el campo @XmlValue: {0}
-
-INCOMPATIBLE_API_VERSION = El archivo jar de la API de JAXB 2.1 se est\u00E1 cargando (desde {0}), pero esta implantaci\u00F3n de referencia (de {1}) necesita el archivo jar de la API de JAXB 2.2.
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-INCOMPATIBLE_API_VERSION_MUSTANG = La API de JAXB 2.1 se est\u00E1 cargando desde el classloader de inicializaci\u00F3n de datos, pero esta implantaci\u00F3n de referencia (de {1}) necesita la API de la versi\u00F3n 2.2. Utilice el mecanismo de directorio aprobado para colocar jaxb-api.jar en el classloader de inicializaci\u00F3n de datos. (Visite http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-RUNNING_WITH_1_0_RUNTIME = Est\u00E1 intentando ejecutar JAXB 2.0 en tiempo de ejecuci\u00F3n (desde {1}), pero tiene un JAXB 1.0 en tiempo de ejecuci\u00F3n antiguo en la classpath (en {0}). Elimine JAXB 1.0 en tiempo de ejecuci\u00F3n para que la versi\u00F3n 2.0 en tiempo de ejecuci\u00F3n funcione correctamente.
-
-UNMATCHABLE_ADAPTER = El adaptador {0} no es aplicable al tipo de campo {1}.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_INSTANTIATION_EXCEPTION = No se ha podido crear la instancia de AccessorFactory, {0} para la clase {1}.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_ACCESS_EXCEPTION = No se ha podido acceder a la instancia de AccessorFactory, {0} para la clase {1}.
-
-CUSTOM_ACCESSORFACTORY_PROPERTY_ERROR = El elemento AccessorFactory personalizado, {0}, est\u00E1 informando de un error al acceder a una propiedad. {1}
-
-CUSTOM_ACCESSORFACTORY_FIELD_ERROR = El elemento AccessorFactory personalizado, {0}, est\u00E1 informando de un error al acceder a un campo. {1}
-
-ANONYMOUS_ARRAY_ITEM = {0} se utiliza como un tipo de componente de matriz, por lo que no puede ser an\u00F3nimo.
-
-XMLGREGORIANCALENDAR_INVALID = Juego de campos no v\u00E1lido definido para el tipo XMLGregorianCalendar {0}.
-
-XMLGREGORIANCALENDAR_SEC = No se han definido los segundos.
-
-XMLGREGORIANCALENDAR_MIN = No se han definido los minutos.
-
-XMLGREGORIANCALENDAR_HR = No se ha definido la hora.
-
-XMLGREGORIANCALENDAR_DAY = No se ha definido el d\u00EDa.
-
-XMLGREGORIANCALENDAR_MONTH = No se ha definido el mes.
-
-XMLGREGORIANCALENDAR_YEAR = No se ha definido el a\u00F1o.
-
-XMLGREGORIANCALENDAR_TIMEZONE = No se ha definido la zona horaria.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_fr.properties
deleted file mode 100644
index ce7b2261..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_fr.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ID_MUST_BE_STRING = La propri\u00E9t\u00E9 "{0}" comporte une annotation XmlID qui n''est pas de type String.
-
-# {0} - field or field accessor (getter/setter) e.g.: foo.Bar#field has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement OR foo.Bar#getField() has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement
-MUTUALLY_EXCLUSIVE_ANNOTATIONS = {0} comporte des annotations @{1} et @{2} mutuellement exclusives
-
-DUPLICATE_ANNOTATIONS = L''annotation @{0} figure \u00E0 deux emplacements ; un seul est suffisant.
-
-# {0} - class name. e.g.: java.lang.StackTraceElement does not have a no-arg default constructor.
-NO_DEFAULT_CONSTRUCTOR = {0} ne comporte aucun constructeur sans argument par d\u00E9faut.
-
-CANT_HANDLE_INTERFACE = {0} est une interface et JAXB ne peut pas g\u00E9rer les interfaces.
-
-CANT_HANDLE_INNER_CLASS = {0} est une classe interne non statique et JAXB ne peut pas g\u00E9rer ce type de classe.
-
-ANNOTATION_ON_WRONG_METHOD = L'annotation JAXB figure sur une m\u00E9thode qui n'est pas une propri\u00E9t\u00E9 JAXB
-
-GETTER_SETTER_INCOMPATIBLE_TYPE = Le type de m\u00E9thode get est {0} mais celui de la m\u00E9thode set est {1}. Ils doivent \u00EAtre identiques.
-
-DUPLICATE_ENTRY_IN_PROP_ORDER = La propri\u00E9t\u00E9 "{0}" appara\u00EEt plusieurs fois dans l''annotation @XmlType.propOrder
-
-DUPLICATE_PROPERTIES = Il existe deux propri\u00E9t\u00E9s nomm\u00E9es "{0}"
-
-XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = L''annotation @XmlElementMapping figure sur la m\u00E9thode {0}, mais elle ne renvoie aucun sous-type de JAXBElement.
-
-# {0} - (xsd) type name. e.g. ns:MyType is not bound to a complex type, and therefore illegal as the scope.
-SCOPE_IS_NOT_COMPLEXTYPE = {0} n''est pas li\u00E9 \u00E0 un type complexe et est donc interdit en tant que port\u00E9e.
-
-CONFLICTING_XML_ELEMENT_MAPPING = Le nom d''\u00E9l\u00E9ment ''{''{0}''}''{1} comporte plusieurs mappings.
-
-REFERENCE_TO_NON_ELEMENT = La propri\u00E9t\u00E9 {0} est annot\u00E9e avec @XmlReference mais ne fait r\u00E9f\u00E9rence \u00E0 aucun \u00E9l\u00E9ment.
-
-NON_EXISTENT_ELEMENT_MAPPING = Aucun mapping d''\u00E9l\u00E9ments n''existe pour "{0}":"{1}"
-
-TWO_ATTRIBUTE_WILDCARDS = {0} comporte deux propri\u00E9t\u00E9s avec l''annotation @XmlAnyAttribute.
-
-SUPER_CLASS_HAS_WILDCARD = L'annotation @XmlAnyAttribute n'est pas possible lorsqu'elle figure d\u00E9j\u00E0 sur une classe de base.
-
-INVALID_ATTRIBUTE_WILDCARD_TYPE = L''annotation @XmlAnyAttribute figure sur une propri\u00E9t\u00E9 dont le type est {0}, mais elle doit pouvoir \u00EAtre affect\u00E9e \u00E0 java.util.Map.
-
-PROPERTY_MISSING_FROM_ORDER = La propri\u00E9t\u00E9 {0} est pr\u00E9sente, mais n''est pas indiqu\u00E9e dans @XmlType.propOrder
-
-PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY = La propri\u00E9t\u00E9 {0} appara\u00EEt dans @XmlType.propOrder, mais ce type de propri\u00E9t\u00E9 n''existe pas. Vous vouliez peut-\u00EAtre dire {1} ?
-
-# {1} - (local) type name e.g.: '#foo' is not a valid value for 'NCName'
-INVALID_XML_ENUM_VALUE = "{0}" n''est pas une valeur valide pour {1}.
-
-FAILED_TO_INITIALE_DATATYPE_FACTORY = Echec de l'initialisation de la classe JAXP 1.3 DatatypeFactory.
-
-NO_IMAGE_WRITER = Aucune classe javax.imageio.ImageWriter n''est disponible pour le type MIME "{0}" indiqu\u00E9
-
-ILLEGAL_MIME_TYPE = "{0}" n''est pas un type MIME valide : {1}
-
-ILLEGAL_ANNOTATION = L''annotation {0} ne peut pas \u00EAtre plac\u00E9e ici
-
-MULTIPLE_VALUE_PROPERTY = Une seule annotation @XmlValue est autoris\u00E9e par classe, mais deux propri\u00E9t\u00E9s sont annot\u00E9es avec @XmlValue.
-
-XMLVALUE_IN_DERIVED_TYPE = L'annotation @XmlValue n'est pas autoris\u00E9e sur une classe qui d\u00E9rive d'une autre classe.
-
-ELEMENT_AND_VALUE_PROPERTY = Si une classe comporte la propri\u00E9t\u00E9 @XmlElement, elle ne peut pas comporter la propri\u00E9t\u00E9 @XmlValue.
-
-CONFLICTING_XML_TYPE_MAPPING = Deux classes portent le m\u00EAme nom de type XML "{0}". Utilisez @XmlType.name et XmlType.namespace pour leur affecter des noms diff\u00E9rents.
-
-SIMPLE_TYPE_IS_REQUIRED = @XmlAttribute/@XmlValue doit r\u00E9f\u00E9rencer un type Java correspondant au texte du XML.
-
-PROPERTY_COLLISION = La classe comporte deux propri\u00E9t\u00E9s du m\u00EAme nom ("{0}")
-
-INVALID_IDREF = La propri\u00E9t\u00E9 XmlIDREF r\u00E9f\u00E9rence un type "{0}" qui ne comporte aucune propri\u00E9t\u00E9 XmlID.
-
-INVALID_XML_ELEMENT_REF = @XmlElementRef non valide : le type "{0}" ou ses sous-classes ne sont pas connus dans ce contexte.
-
-NO_XML_ELEMENT_DECL = Il n''existe aucune classe ObjectFactory comportant une annotation @XmlElementDecl pour l''\u00E9l\u00E9ment ''{''{0}''}''{1}.
-
-XML_ELEMENT_WRAPPER_ON_NON_COLLECTION = @XmlElementWrapper est autoris\u00E9e uniquement sur une propri\u00E9t\u00E9 de collection, mais "{0}" n''est pas une propri\u00E9t\u00E9 de collection.
-
-ANNOTATION_NOT_ALLOWED = L''annotation {0} n''est pas autoris\u00E9e sur ce type de propri\u00E9t\u00E9.
-
-XMLLIST_NEEDS_SIMPLETYPE = {0} correspond \u00E0 un fragment XML structur\u00E9 (c''est-\u00E0-dire un type complexe), qui n''est donc pas compatible avec @XmlList.
-
-XMLLIST_ON_SINGLE_PROPERTY = @XmlList ne peut pas figurer sur une propri\u00E9t\u00E9 monovaleur
-
-NO_FACTORY_METHOD = La classe de fabrique "{0}" ne comporte aucune m\u00E9thode de fabrique sans argument statique "{1}".
-
-FACTORY_CLASS_NEEDS_FACTORY_METHOD = XmlType n''a d\u00E9fini aucune m\u00E9thode de fabrique pour la classe Factory "{0}".
-
-MISSING_JAXB_PROPERTIES = Le fichier jaxb.properties est manquant dans le package "{0}". L''avez-vous copi\u00E9 \u00E0 partir du r\u00E9pertoire source g\u00E9n\u00E9r\u00E9 ou inclus dans le classpath ?
-
-TRANSIENT_FIELD_NOT_BINDABLE = Le champ non persistant "{0}" ne peut comporter aucune annotation JAXB.
-
-THERE_MUST_BE_VALUE_IN_XMLVALUE = Le champ @XmlValue de l''objet doit comporter une valeur : {0}
-
-INCOMPATIBLE_API_VERSION = Le fichier JAR de l''API JAXB 2.1 est en cours de chargement (\u00E0 partir de {0}), mais cette impl\u00E9mentation de r\u00E9f\u00E9rence (\u00E0 partir de {1}) exige le fichier JAR de l''API JAXB 2.2.
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-INCOMPATIBLE_API_VERSION_MUSTANG = L''API JAXB 2.1 est en cours de chargement \u00E0 partir du chargeur de classe "boostrap", mais cette impl\u00E9mentation de r\u00E9f\u00E9rence (\u00E0 partir de {1}) n\u00E9cessite l''API 2.2. Utilisez le m\u00E9canisme de r\u00E9pertoire "endorsed" pour placer jaxb-api.jar dans le chargeur de classe "boostrap". (Voir http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-RUNNING_WITH_1_0_RUNTIME = Vous essayez d''ex\u00E9cuter le runtime JAXB 2.0 (\u00E0 partir de {1}) mais l''ancien runtime JAXB 1.0 figure avant dans le classpath (au niveau de {0}). Enlevez le runtime JAXB 1.0 pour que le runtime 2.0 fonctionne correctement.
-
-UNMATCHABLE_ADAPTER = L''adaptateur {0} n''est pas applicable au type de champ {1}.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_INSTANTIATION_EXCEPTION = Impossible de cr\u00E9er une instance d''AccessorFactory {0} pour la classe {1}.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_ACCESS_EXCEPTION = Impossible d''acc\u00E9der \u00E0 l''instance d''AccessorFactory {0} pour la classe {1}.
-
-CUSTOM_ACCESSORFACTORY_PROPERTY_ERROR = L''instance AccessorFactory personnalis\u00E9e, {0}, signale une erreur lors de l''acc\u00E8s \u00E0 une propri\u00E9t\u00E9. {1}
-
-CUSTOM_ACCESSORFACTORY_FIELD_ERROR = L''instance AccessorFactory personnalis\u00E9e, {0}, signale une erreur lors de l''acc\u00E8s \u00E0 un champ. {1}
-
-ANONYMOUS_ARRAY_ITEM = {0} est utilis\u00E9 en tant que type de composant de tableau, il ne peut donc pas \u00EAtre anonyme.
-
-XMLGREGORIANCALENDAR_INVALID = Ensemble de champs non valide d\u00E9fini pour le type XMLGregorianCalendar {0}.
-
-XMLGREGORIANCALENDAR_SEC = Secondes non d\u00E9finies.
-
-XMLGREGORIANCALENDAR_MIN = Minutes non d\u00E9finies.
-
-XMLGREGORIANCALENDAR_HR = Heure non d\u00E9finie.
-
-XMLGREGORIANCALENDAR_DAY = Jour non d\u00E9fini.
-
-XMLGREGORIANCALENDAR_MONTH = Mois non d\u00E9fini.
-
-XMLGREGORIANCALENDAR_YEAR = Ann\u00E9e non d\u00E9finie.
-
-XMLGREGORIANCALENDAR_TIMEZONE = Fuseau horaire non d\u00E9fini.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_it.properties
deleted file mode 100644
index a7a34c45..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_it.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ID_MUST_BE_STRING = La propriet\u00E0 "{0}" contiene un''annotazione XmlID ma non \u00E8 di tipo String.
-
-# {0} - field or field accessor (getter/setter) e.g.: foo.Bar#field has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement OR foo.Bar#getField() has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement
-MUTUALLY_EXCLUSIVE_ANNOTATIONS = {0} contiene le annotazioni @{1} e @{2} che si escludono a vicenda
-
-DUPLICATE_ANNOTATIONS = L''annotazione @{0} si trova in due posizioni. Una posizione \u00E8 sufficiente.
-
-# {0} - class name. e.g.: java.lang.StackTraceElement does not have a no-arg default constructor.
-NO_DEFAULT_CONSTRUCTOR = {0} non dispone di un costruttore senza argomenti predefinito.
-
-CANT_HANDLE_INTERFACE = {0} \u00E8 un''interfaccia e JAXB non pu\u00F2 gestire interfacce.
-
-CANT_HANDLE_INNER_CLASS = {0} \u00E8 una classe interna non statica e JAXB non pu\u00F2 gestire tali classi.
-
-ANNOTATION_ON_WRONG_METHOD = L'annotazione JAXB \u00E8 posizionata su un metodo che non \u00E8 una propriet\u00E0 JAXB
-
-GETTER_SETTER_INCOMPATIBLE_TYPE = Il tipo del getter \u00E8 {0} mentre quello del setter \u00E8 {1}. Devono essere uguali.
-
-DUPLICATE_ENTRY_IN_PROP_ORDER = La propriet\u00E0 "{0}" \u00E8 presente pi\u00F9 volte in @XmlType.propOrder
-
-DUPLICATE_PROPERTIES = Esistono due propriet\u00E0 denominate "{0}"
-
-XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = Sul metodo {0} \u00E8 presente @XmlElementMapping ma non restituisce un sottotipo di JAXBElement.
-
-# {0} - (xsd) type name. e.g. ns:MyType is not bound to a complex type, and therefore illegal as the scope.
-SCOPE_IS_NOT_COMPLEXTYPE = {0} non \u00E8 associato a un tipo complesso e pertanto non \u00E8 valido come l''ambito.
-
-CONFLICTING_XML_ELEMENT_MAPPING = Il nome dell''elemento ''{''{0}''}''{1} ha pi\u00F9 mapping.
-
-REFERENCE_TO_NON_ELEMENT = La propriet\u00E0 {0} \u00E8 annotata con @XmlReference ma non fa riferimento a un elemento.
-
-NON_EXISTENT_ELEMENT_MAPPING = Non esiste alcun mapping dell''elemento per "{0}":"{1}"
-
-TWO_ATTRIBUTE_WILDCARDS = {0} ha due propriet\u00E0 con l''annotazione @XmlAnyAttribute.
-
-SUPER_CLASS_HAS_WILDCARD = Impossibile avere @XmlAnyAttribute se \u00E8 gi\u00E0 presente in una classe di base.
-
-INVALID_ATTRIBUTE_WILDCARD_TYPE = @XmlAnyAttribute \u00E8 posizionato su una propriet\u00E0 il cui tipo \u00E8 {0} ma deve essere assegnabile a Java.util.Map.
-
-PROPERTY_MISSING_FROM_ORDER = La propriet\u00E0 {0} \u00E8 presente ma non specificata in @XmlType.propOrder
-
-PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY = La propriet\u00E0 {0} viene visualizzata in @XmlType.propOrder ma \u00E8 inesistente. Si intendeva forse {1}?
-
-# {1} - (local) type name e.g.: '#foo' is not a valid value for 'NCName'
-INVALID_XML_ENUM_VALUE = "{0}" non \u00E8 un valore valido per {1}.
-
-FAILED_TO_INITIALE_DATATYPE_FACTORY = Inizializzazione della classe DatatypeFactory di JAXP 1.3 non riuscita.
-
-NO_IMAGE_WRITER = Nessun javax.imageio.ImageWriter disponibile per il tipo MIME specificato "{0}"
-
-ILLEGAL_MIME_TYPE = "{0}" non \u00E8 un tipo MIME valido: {1}
-
-ILLEGAL_ANNOTATION = Impossibile posizionare qui l''annotazione {0}
-
-MULTIPLE_VALUE_PROPERTY = \u00C8 consentito un solo @XmlValue per classe ma due propriet\u00E0 sono annotate con @XmlValue.
-
-XMLVALUE_IN_DERIVED_TYPE = @XmlValue non \u00E8 consentito su una classe derivante da un'altra classe.
-
-ELEMENT_AND_VALUE_PROPERTY = Se una classe ha la propriet\u00E0 @XmlElement non pu\u00F2 avere la propriet\u00E0 @XmlValue.
-
-CONFLICTING_XML_TYPE_MAPPING = Due classi hanno lo stesso nome del tipo XML "{0}". Usare @XmlType.name e @XmlType.namespace per assegnare loro nomi diversi.
-
-SIMPLE_TYPE_IS_REQUIRED = \u00C8 necessario che @XmlAttribute/@XmlValue faccia riferimento a un tipo Java mappato al testo in XML.
-
-PROPERTY_COLLISION = La classe ha due propriet\u00E0 dello stesso nome "{0}"
-
-INVALID_IDREF = La propriet\u00E0 XmlIDREF fa riferimento a un tipo "{0}" che non ha una propriet\u00E0 XmlID.
-
-INVALID_XML_ELEMENT_REF = @XmlElementRef non valido: il tipo "{0}" o una delle relative classi secondarie sono sconosciuti a questo contesto.
-
-NO_XML_ELEMENT_DECL = Non \u00E8 presente alcun ObjectFactory con un @XmlElementDecl per l''elemento ''{''{0}''}''{1}.
-
-XML_ELEMENT_WRAPPER_ON_NON_COLLECTION = @XmlElementWrapper \u00E8 consentito solo su una propriet\u00E0 della raccolta ma "{0}" non \u00E8 una propriet\u00E0 della raccolta.
-
-ANNOTATION_NOT_ALLOWED = L''annotazione {0} non \u00E8 consentita su questo tipo di propriet\u00E0.
-
-XMLLIST_NEEDS_SIMPLETYPE = {0} \u00E8 mappato a un frammento XML strutturato (tipo complesso AKA) e pertanto \u00E8 incompatibile con @XmlList.
-
-XMLLIST_ON_SINGLE_PROPERTY = Impossibile posizionare @XmlList su una propriet\u00E0 a valore singolo
-
-NO_FACTORY_METHOD = La classe factory "{0}" non dispone del metodo factory ad argomenti zero statici "{1}".
-
-FACTORY_CLASS_NEEDS_FACTORY_METHOD = XmlType non ha definito un metodo factory per la classe factory "{0}".
-
-MISSING_JAXB_PROPERTIES = File jaxb.properties mancante nel package "{0}". \u00C8 stato copiato dalla directory di origine generato o bisogna includerlo nel classpath?
-
-TRANSIENT_FIELD_NOT_BINDABLE = Il campo transitorio "{0}" non pu\u00F2 avere annotazioni JAXB.
-
-THERE_MUST_BE_VALUE_IN_XMLVALUE = L''oggetto deve avere un valore nel relativo campo @XmlValue: {0}
-
-INCOMPATIBLE_API_VERSION = \u00C8 in corso il caricamento del file jar API JAXB 2.1 (da {0}) ma questa RI (da {1}) richiede un file jar API JAXB 2.2.
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-INCOMPATIBLE_API_VERSION_MUSTANG = \u00C8 in corso il caricamento dell''API JAXB 2.1 dal classloader di bootstrap ma questa RI (da {1}) richiede l''API 2.2. Usare il meccanismo della directory "endorsed" per posizionare jaxb-api.jar nel classloader di bootstrap (vedere http://java.sun.com/j2se/1.6.0/docs/guide/standards/).
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-RUNNING_WITH_1_0_RUNTIME = Si sta tentando di eseguire il runtime JAXB 2.0 (da {1}) ma si dispone di un runtime JAXB 1.0 di versione precedente nel classpath (in {0}). Rimuovere il runtime JAXB 1.0 affinch\u00E9 il runtime 2.0 possa funzionare correttamente.
-
-UNMATCHABLE_ADAPTER = L''adattatore {0} non \u00E8 applicabile al tipo di campo {1}.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_INSTANTIATION_EXCEPTION = Impossibile creare l''istanza di AccessorFactory, {0} per la classe {1}.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_ACCESS_EXCEPTION = Impossibile accedere all''istanza di AccessorFactory, {0} per la classe {1}.
-
-CUSTOM_ACCESSORFACTORY_PROPERTY_ERROR = AccessorFactory personalizzato, {0}, riporta un errore durante l''accesso a una propriet\u00E0. {1}
-
-CUSTOM_ACCESSORFACTORY_FIELD_ERROR = AccessorFactory personalizzato, {0}, riporta un errore durante l''accesso a un campo. {1}
-
-ANONYMOUS_ARRAY_ITEM = {0} viene usato come tipo di componente di array pertanto non pu\u00F2 essere anonimo.
-
-XMLGREGORIANCALENDAR_INVALID = Set di campi non valido impostato per il tipo XMLGregorianCalendar {0}.
-
-XMLGREGORIANCALENDAR_SEC = Secondi non impostati.
-
-XMLGREGORIANCALENDAR_MIN = Minuti non impostati.
-
-XMLGREGORIANCALENDAR_HR = Ora non impostata.
-
-XMLGREGORIANCALENDAR_DAY = Giorno non impostato.
-
-XMLGREGORIANCALENDAR_MONTH = Mese non impostato.
-
-XMLGREGORIANCALENDAR_YEAR = Anno non impostato.
-
-XMLGREGORIANCALENDAR_TIMEZONE = Fuso orario non impostato.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_ja.properties
deleted file mode 100644
index 3e20a877..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_ja.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ID_MUST_BE_STRING = \u30D7\u30ED\u30D1\u30C6\u30A3"{0}"\u306B\u306FXmlID\u6CE8\u91C8\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u30BF\u30A4\u30D7\u304C\u6587\u5B57\u5217\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-
-# {0} - field or field accessor (getter/setter) e.g.: foo.Bar#field has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement OR foo.Bar#getField() has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement
-MUTUALLY_EXCLUSIVE_ANNOTATIONS = {0}\u306B\u306F\u76F8\u4E92\u306B\u6392\u4ED6\u7684\u306A\u6CE8\u91C8@{1}\u304A\u3088\u3073@{2}\u304C\u3042\u308A\u307E\u3059
-
-DUPLICATE_ANNOTATIONS = @{0}\u6CE8\u91C8\u304C2\u7B87\u6240\u3067\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u30021\u3064\u3067\u5341\u5206\u3067\u3059\u3002
-
-# {0} - class name. e.g.: java.lang.StackTraceElement does not have a no-arg default constructor.
-NO_DEFAULT_CONSTRUCTOR = {0}\u306B\u306F\u5F15\u6570\u306A\u3057\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u304C\u3042\u308A\u307E\u305B\u3093\u3002
-
-CANT_HANDLE_INTERFACE = {0}\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u3059\u3002JAXB\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3092\u51E6\u7406\u3067\u304D\u307E\u305B\u3093\u3002
-
-CANT_HANDLE_INNER_CLASS = {0}\u306F\u9759\u7684\u3067\u306A\u3044\u5185\u90E8\u30AF\u30E9\u30B9\u3067\u3059\u3002JAXB\u306F\u305D\u308C\u3089\u3092\u51E6\u7406\u3067\u304D\u307E\u305B\u3093\u3002
-
-ANNOTATION_ON_WRONG_METHOD = JAXB\u6CE8\u91C8\u306F\u3001JAXB\u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u306F\u306A\u3044\u30E1\u30BD\u30C3\u30C9\u306B\u914D\u7F6E\u3055\u308C\u3066\u3044\u307E\u3059
-
-GETTER_SETTER_INCOMPATIBLE_TYPE = getter\u306E\u30BF\u30A4\u30D7\u306F{0}\u3067\u3059\u304C\u3001setter\u306E\u30BF\u30A4\u30D7\u306F{1}\u3067\u3059\u3002\u540C\u3058\u30BF\u30A4\u30D7\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-
-DUPLICATE_ENTRY_IN_PROP_ORDER = \u30D7\u30ED\u30D1\u30C6\u30A3"{0}"\u304C@XmlType.propOrder\u306B\u8907\u6570\u3042\u308A\u307E\u3059
-
-DUPLICATE_PROPERTIES = "{0}"\u3068\u3044\u3046\u540D\u524D\u306E2\u3064\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u5B58\u5728\u3057\u307E\u3059
-
-XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = {0}\u30E1\u30BD\u30C3\u30C9\u306B\u306F@XmlElementMapping\u304C\u3042\u308A\u307E\u3059\u304C\u3001JAXBElement\u306E\u30B5\u30D6\u30BF\u30A4\u30D7\u3092\u8FD4\u3057\u307E\u305B\u3093\u3002
-
-# {0} - (xsd) type name. e.g. ns:MyType is not bound to a complex type, and therefore illegal as the scope.
-SCOPE_IS_NOT_COMPLEXTYPE = {0}\u306F\u8907\u5408\u578B\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u30B9\u30B3\u30FC\u30D7\u3068\u3057\u3066\u4E0D\u6B63\u3067\u3059\u3002
-
-CONFLICTING_XML_ELEMENT_MAPPING = \u8981\u7D20\u540D''{''{0}''}''{1}\u306B\u8907\u6570\u306E\u30DE\u30C3\u30D4\u30F3\u30B0\u304C\u3042\u308A\u307E\u3059\u3002
-
-REFERENCE_TO_NON_ELEMENT = \u30D7\u30ED\u30D1\u30C6\u30A3{0}\u306B\u306F@XmlReference\u306E\u6CE8\u91C8\u304C\u4ED8\u3044\u3066\u3044\u307E\u3059\u304C\u3001\u8981\u7D20\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u305B\u3093\u3002
-
-NON_EXISTENT_ELEMENT_MAPPING = "{0}"\u306E\u8981\u7D20\u30DE\u30C3\u30D4\u30F3\u30B0\u304C\u5B58\u5728\u3057\u307E\u305B\u3093:"{1}"
-
-TWO_ATTRIBUTE_WILDCARDS = {0}\u306B@XmlAnyAttribute\u6CE8\u91C8\u3092\u6301\u30642\u3064\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u3042\u308A\u307E\u3059\u3002
-
-SUPER_CLASS_HAS_WILDCARD = @XmlAnyAttribute\u304C\u30D9\u30FC\u30B9\u30FB\u30AF\u30E9\u30B9\u306B\u3059\u3067\u306B\u3042\u308B\u5834\u5408\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
-
-INVALID_ATTRIBUTE_WILDCARD_TYPE = @XmlAnyAttribute\u306F\u30BF\u30A4\u30D7\u304C{0}\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u914D\u7F6E\u3055\u308C\u307E\u3059\u304C\u3001java.util.Map\u306B\u5272\u5F53\u53EF\u80FD\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-
-PROPERTY_MISSING_FROM_ORDER = \u30D7\u30ED\u30D1\u30C6\u30A3{0}\u304C\u5B58\u5728\u3057\u307E\u3059\u304C\u3001@XmlType.propOrder\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-
-PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY = \u30D7\u30ED\u30D1\u30C6\u30A3{0}\u304C@XmlType.propOrder\u306B\u3042\u308A\u307E\u3059\u304C\u3001\u305D\u306E\u3088\u3046\u306A\u30D7\u30ED\u30D1\u30C6\u30A3\u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002{1}\u306E\u8AA4\u308A\u3067\u3042\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
-
-# {1} - (local) type name e.g.: '#foo' is not a valid value for 'NCName'
-INVALID_XML_ENUM_VALUE = "{0}"\u306F{1}\u306B\u5BFE\u3059\u308B\u6709\u52B9\u306A\u5024\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-
-FAILED_TO_INITIALE_DATATYPE_FACTORY = JAXP 1.3 DatatypeFactory\u30AF\u30E9\u30B9\u306E\u521D\u671F\u5316\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-
-NO_IMAGE_WRITER = \u6307\u5B9A\u3057\u305FMIME \u30BF\u30A4\u30D7"{0}"\u306B\u4F7F\u7528\u3067\u304D\u308Bjavax.imageio.ImageWriter\u304C\u3042\u308A\u307E\u305B\u3093
-
-ILLEGAL_MIME_TYPE = "{0}"\u306F\u6709\u52B9\u306AMIME\u30BF\u30A4\u30D7\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {1}
-
-ILLEGAL_ANNOTATION = {0}\u6CE8\u91C8\u3092\u3053\u3053\u306B\u914D\u7F6E\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-
-MULTIPLE_VALUE_PROPERTY = @XmlValue\u306F\u5404\u30AF\u30E9\u30B9\u306B1\u3064\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u304C\u30012\u3064\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u306B@XmlValue\u306E\u6CE8\u91C8\u304C\u4ED8\u3044\u3066\u3044\u307E\u3059\u3002
-
-XMLVALUE_IN_DERIVED_TYPE = @XmlValue\u306F\u3001\u5225\u306E\u30AF\u30E9\u30B9\u3092\u5C0E\u51FA\u3059\u308B\u30AF\u30E9\u30B9\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002
-
-ELEMENT_AND_VALUE_PROPERTY = \u30AF\u30E9\u30B9\u306B@XmlElement\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u3042\u308B\u5834\u5408\u3001@XmlValue\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
-
-CONFLICTING_XML_TYPE_MAPPING = 2\u3064\u306E\u30AF\u30E9\u30B9\u306B\u540C\u3058XML\u30BF\u30A4\u30D7\u540D"{0}"\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002@XmlType.name\u304A\u3088\u3073@XmlType.namespace\u3092\u4F7F\u7528\u3057\u3066\u3001\u5225\u306E\u540D\u524D\u3092\u5272\u308A\u5F53\u3066\u3066\u304F\u3060\u3055\u3044\u3002
-
-SIMPLE_TYPE_IS_REQUIRED = @XmlAttribute/@XmlValue\u306F\u3001XML\u5185\u306E\u30C6\u30AD\u30B9\u30C8\u306B\u30DE\u30C3\u30D7\u3055\u308C\u308BJava\u30BF\u30A4\u30D7\u3092\u53C2\u7167\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-
-PROPERTY_COLLISION = \u30AF\u30E9\u30B9\u306B\u540C\u3058\u540D\u524D"{0}"\u3092\u6301\u30642\u3064\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u3042\u308A\u307E\u3059
-
-INVALID_IDREF = XmlIDREF\u30D7\u30ED\u30D1\u30C6\u30A3\u306F\u3001XmlID\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u306A\u3044\u30BF\u30A4\u30D7"{0}"\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u3059\u3002
-
-INVALID_XML_ELEMENT_REF = @XmlElementRef\u304C\u7121\u52B9\u3067\u3059: \u30BF\u30A4\u30D7"{0}"\u307E\u305F\u306F\u305D\u306E\u30B5\u30D6\u30AF\u30E9\u30B9\u306F\u3053\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3067\u306F\u8A8D\u8B58\u3055\u308C\u307E\u305B\u3093\u3002
-
-NO_XML_ELEMENT_DECL = \u8981\u7D20''{''{0}''}''{1}\u306E@XmlElementDecl\u3092\u6301\u3064ObjectFactory\u304C\u3042\u308A\u307E\u305B\u3093\u3002
-
-XML_ELEMENT_WRAPPER_ON_NON_COLLECTION = @XmlElementWrapper\u306F\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u304C\u3001"{0}"\u306F\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-
-ANNOTATION_NOT_ALLOWED = {0}\u6CE8\u91C8\u306F\u3053\u306E\u7A2E\u985E\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002
-
-XMLLIST_NEEDS_SIMPLETYPE = {0}\u306F\u69CB\u9020\u5316\u3055\u308C\u305FXML\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8(\u8907\u5408\u578B)\u306B\u30DE\u30C3\u30D7\u3055\u308C\u308B\u305F\u3081\u3001@XmlList\u3068\u4E92\u63DB\u6027\u304C\u3042\u308A\u307E\u305B\u3093\u3002
-
-XMLLIST_ON_SINGLE_PROPERTY = @XmlList\u3092\u3001\u5358\u4E00\u306E\u5024\u3092\u6301\u3064\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u914D\u7F6E\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-
-NO_FACTORY_METHOD = \u30D5\u30A1\u30AF\u30C8\u30EA\u30FB\u30AF\u30E9\u30B9"{0}"\u306B\u5F15\u6570\u304C\u30BC\u30ED\u306E\u9759\u7684\u306A\u30D5\u30A1\u30AF\u30C8\u30EA\u30FB\u30E1\u30BD\u30C3\u30C9"{1}"\u304C\u3042\u308A\u307E\u305B\u3093\u3002
-
-FACTORY_CLASS_NEEDS_FACTORY_METHOD = XmlType\u3067\u306F\u30D5\u30A1\u30AF\u30C8\u30EA\u30FB\u30AF\u30E9\u30B9"{0}"\u306E\u30D5\u30A1\u30AF\u30C8\u30EA\u30FB\u30E1\u30BD\u30C3\u30C9\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-
-MISSING_JAXB_PROPERTIES = \u30D1\u30C3\u30B1\u30FC\u30B8"{0}"\u306Bjaxb.properties\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3055\u308C\u305F\u30BD\u30FC\u30B9\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304B\u3089\u30B3\u30D4\u30FC\u3057\u305F\u304B\u3001\u30AF\u30E9\u30B9\u30D1\u30B9\u306B\u542B\u3081\u307E\u3057\u305F\u304B\u3002
-
-TRANSIENT_FIELD_NOT_BINDABLE = \u4E00\u6642\u30D5\u30A3\u30FC\u30EB\u30C9"{0}"\u306BJAXB\u6CE8\u91C8\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
-
-THERE_MUST_BE_VALUE_IN_XMLVALUE = \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E@XmlValue\u30D5\u30A3\u30FC\u30EB\u30C9\u306B\u306F\u5024\u304C\u5FC5\u8981\u3067\u3059: {0}
-
-INCOMPATIBLE_API_VERSION = JAXB 2.1 API jar\u304C({0}\u304B\u3089)\u30ED\u30FC\u30C9\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u3053\u306E({1}\u304B\u3089\u306E)RI\u306B\u306FJAXB 2.2 API jar\u304C\u5FC5\u8981\u3067\u3059\u3002
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-INCOMPATIBLE_API_VERSION_MUSTANG = JAXB 2.1 API\u306F\u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u304B\u3089\u30ED\u30FC\u30C9\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u3053\u306E({1}\u304B\u3089\u306E)RI\u306B\u306F2.2 API\u304C\u5FC5\u8981\u3067\u3059\u3002jaxb-api.jar\u3092\u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u306B\u914D\u7F6E\u3059\u308B\u306B\u306F\u3001\u63A8\u5968\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u30FB\u30E1\u30AB\u30CB\u30BA\u30E0\u3092\u4F7F\u7528\u3057\u307E\u3059(http://java.sun.com/j2se/1.6.0/docs/guide/standards/\u3092\u53C2\u7167)
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-RUNNING_WITH_1_0_RUNTIME = ({1}\u304B\u3089)JAXB 2.0\u30E9\u30F3\u30BF\u30A4\u30E0\u3092\u5B9F\u884C\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307E\u3059\u304C\u3001({0}\u306E)\u30AF\u30E9\u30B9\u30D1\u30B9\u306B\u4EE5\u524D\u306EJAXB 1.0\u30E9\u30F3\u30BF\u30A4\u30E0\u304C\u3042\u308A\u307E\u3059\u30022.0\u30E9\u30F3\u30BF\u30A4\u30E0\u304C\u6B63\u3057\u304F\u52D5\u4F5C\u3059\u308B\u3088\u3046\u306B\u3001JAXB 1.0\u30E9\u30F3\u30BF\u30A4\u30E0\u3092\u524A\u9664\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-UNMATCHABLE_ADAPTER = \u30A2\u30C0\u30D7\u30BF{0}\u3092\u30D5\u30A3\u30FC\u30EB\u30C9\u30FB\u30BF\u30A4\u30D7{1}\u306B\u9069\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_INSTANTIATION_EXCEPTION = \u30AF\u30E9\u30B9{1}\u306EAccessorFactory {0}\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_ACCESS_EXCEPTION = \u30AF\u30E9\u30B9{1}\u306EAccessorFactory {0}\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\u3002
-
-CUSTOM_ACCESSORFACTORY_PROPERTY_ERROR = \u30AB\u30B9\u30BF\u30E0AccessorFactory {0}\u306F\u3001\u30D7\u30ED\u30D1\u30C6\u30A3\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u4E2D\u306B\u767A\u751F\u3057\u305F\u30A8\u30E9\u30FC\u3092\u30EC\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u3059\u3002{1}
-
-CUSTOM_ACCESSORFACTORY_FIELD_ERROR = \u30AB\u30B9\u30BF\u30E0AccessorFactory {0}\u306F\u3001\u30D5\u30A3\u30FC\u30EB\u30C9\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u4E2D\u306B\u767A\u751F\u3057\u305F\u30A8\u30E9\u30FC\u3092\u30EC\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u3059\u3002{1}
-
-ANONYMOUS_ARRAY_ITEM = {0}\u306F\u914D\u5217\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u533F\u540D\u306B\u3067\u304D\u307E\u305B\u3093\u3002
-
-XMLGREGORIANCALENDAR_INVALID = XMLGregorianCalendar\u30BF\u30A4\u30D7{0}\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u30FB\u30BB\u30C3\u30C8\u304C\u7121\u52B9\u3067\u3059\u3002
-
-XMLGREGORIANCALENDAR_SEC = \u79D2\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-
-XMLGREGORIANCALENDAR_MIN = \u5206\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-
-XMLGREGORIANCALENDAR_HR = \u6642\u9593\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-
-XMLGREGORIANCALENDAR_DAY = \u65E5\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-
-XMLGREGORIANCALENDAR_MONTH = \u6708\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-
-XMLGREGORIANCALENDAR_YEAR = \u5E74\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-
-XMLGREGORIANCALENDAR_TIMEZONE = \u30BF\u30A4\u30E0\u30BE\u30FC\u30F3\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_ko.properties
deleted file mode 100644
index 090f6515..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_ko.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ID_MUST_BE_STRING = "{0}" \uC18D\uC131\uC5D0 XmlID \uC8FC\uC11D\uC774 \uC788\uC9C0\uB9CC \uD574\uB2F9 \uC720\uD615\uC740 \uBB38\uC790\uC5F4\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-
-# {0} - field or field accessor (getter/setter) e.g.: foo.Bar#field has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement OR foo.Bar#getField() has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement
-MUTUALLY_EXCLUSIVE_ANNOTATIONS = {0}\uC758 @{1} \uC8FC\uC11D\uACFC @{2} \uC8FC\uC11D\uC740 \uD568\uAED8 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-DUPLICATE_ANNOTATIONS = @{0} \uC8FC\uC11D\uC774 \uB450 \uC704\uCE58\uC5D0\uC11C \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uD55C \uC704\uCE58\uC5D0\uB9CC \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-# {0} - class name. e.g.: java.lang.StackTraceElement does not have a no-arg default constructor.
-NO_DEFAULT_CONSTRUCTOR = {0}\uC5D0 \uC778\uC218\uAC00 \uC5C6\uB294 \uAE30\uBCF8 \uC0DD\uC131\uC790\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-CANT_HANDLE_INTERFACE = {0}\uC740(\uB294) \uC778\uD130\uD398\uC774\uC2A4\uC774\uBA70 JAXB\uB294 \uC778\uD130\uD398\uC774\uC2A4\uB97C \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-CANT_HANDLE_INNER_CLASS = {0}\uC740(\uB294) non-static \uB0B4\uBD80 \uD074\uB798\uC2A4\uC774\uBA70 JAXB\uB294 \uD574\uB2F9 \uD074\uB798\uC2A4\uB97C \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-ANNOTATION_ON_WRONG_METHOD = JAXB \uC18D\uC131\uC774 \uC544\uB2CC \uBA54\uC18C\uB4DC\uC5D0 JAXB \uC8FC\uC11D\uC774 \uBC30\uCE58\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-GETTER_SETTER_INCOMPATIBLE_TYPE = getter\uC758 \uC720\uD615\uC740 {0}, setter\uC758 \uC720\uD615\uC740 {1}\uC785\uB2C8\uB2E4. \uB450 \uC720\uD615\uC740 \uB3D9\uC77C\uD574\uC57C \uD569\uB2C8\uB2E4.
-
-DUPLICATE_ENTRY_IN_PROP_ORDER = "{0}" \uC18D\uC131\uC774 @XmlType.propOrder\uC5D0\uC11C \uB450 \uBC88 \uC774\uC0C1 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.
-
-DUPLICATE_PROPERTIES = \uC774\uB984\uC774 "{0}"\uC778 \uC18D\uC131\uC774 \uB450 \uAC1C \uC788\uC2B5\uB2C8\uB2E4.
-
-XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = {0} \uBA54\uC18C\uB4DC\uC5D0 @XmlElementMapping\uC774 \uC788\uC9C0\uB9CC JAXBElement\uC758 \uD558\uC704 \uC720\uD615\uC744 \uBC18\uD658\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-# {0} - (xsd) type name. e.g. ns:MyType is not bound to a complex type, and therefore illegal as the scope.
-SCOPE_IS_NOT_COMPLEXTYPE = {0}\uC774(\uAC00) \uBCF5\uD569 \uC720\uD615\uC5D0 \uBC14\uC778\uB4DC\uB418\uC9C0 \uC54A\uC544 \uBC94\uC704\uB85C \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-CONFLICTING_XML_ELEMENT_MAPPING = \uC694\uC18C \uC774\uB984 ''{''{0}''}''{1}\uC5D0 \uB9E4\uD551\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4.
-
-REFERENCE_TO_NON_ELEMENT = {0} \uC18D\uC131\uC740 @XmlReference\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uC9C0\uB9CC \uC694\uC18C\uB97C \uCC38\uC870\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-NON_EXISTENT_ELEMENT_MAPPING = "{0}":"{1}"\uC5D0 \uB300\uD55C \uC694\uC18C \uB9E4\uD551\uC774 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-TWO_ATTRIBUTE_WILDCARDS = {0}\uC5D0 @XmlAnyAttribute \uC8FC\uC11D\uC774 \uC788\uB294 \uC18D\uC131\uC774 \uB450 \uAC1C \uC788\uC2B5\uB2C8\uB2E4.
-
-SUPER_CLASS_HAS_WILDCARD = \uAE30\uBCF8 \uD074\uB798\uC2A4\uC5D0 \uC774\uBBF8 \uD3EC\uD568\uB41C \uACBD\uC6B0 @XmlAnyAttribute\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-INVALID_ATTRIBUTE_WILDCARD_TYPE = @XmlAnyAttribute\uB294 \uC720\uD615\uC774 {0}\uC778 \uC18D\uC131\uC5D0 \uBC30\uCE58\uB418\uC5C8\uC9C0\uB9CC java.util.Map\uC5D0 \uC9C0\uC815\uD560 \uC218 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-PROPERTY_MISSING_FROM_ORDER = {0} \uC18D\uC131\uC774 \uC788\uC9C0\uB9CC @XmlType.propOrder\uC5D0 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY = {0} \uC18D\uC131\uC774 @XmlType.propOrder\uC5D0 \uB098\uD0C0\uB098\uC9C0\uB9CC \uD574\uB2F9 \uC18D\uC131\uC774 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. {1}\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB824\uACE0 \uD55C \uAC83\uC785\uB2C8\uAE4C?
-
-# {1} - (local) type name e.g.: '#foo' is not a valid value for 'NCName'
-INVALID_XML_ENUM_VALUE = "{0}"\uC740(\uB294) {1}\uC5D0 \uB300\uD574 \uC801\uD569\uD55C \uAC12\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-
-FAILED_TO_INITIALE_DATATYPE_FACTORY = JAXP 1.3 DatatypeFactory \uD074\uB798\uC2A4 \uCD08\uAE30\uD654\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-
-NO_IMAGE_WRITER = \uC9C0\uC815\uB41C MIME \uC720\uD615 "{0}"\uC5D0 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C javax.imageio.ImageWriter\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-ILLEGAL_MIME_TYPE = "{0}"\uC740(\uB294) \uC801\uD569\uD55C MIME \uC720\uD615\uC774 \uC544\uB2D8: {1}
-
-ILLEGAL_ANNOTATION = {0} \uC8FC\uC11D\uC740 \uC5EC\uAE30\uC5D0 \uBC30\uCE58\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-MULTIPLE_VALUE_PROPERTY = @XmlValue\uB294 \uD074\uB798\uC2A4\uB2F9 \uD558\uB098\uB9CC \uD5C8\uC6A9\uB418\uC9C0\uB9CC \uB450 \uAC1C\uC758 \uC18D\uC131\uC774 @XmlValue\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-XMLVALUE_IN_DERIVED_TYPE = @XmlValue\uB294 \uB2E4\uB978 \uD074\uB798\uC2A4\uB97C \uD30C\uC0DD\uD558\uB294 \uD074\uB798\uC2A4\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-ELEMENT_AND_VALUE_PROPERTY = \uD074\uB798\uC2A4\uC5D0 @XmlElement \uC18D\uC131\uC774 \uC788\uC744 \uACBD\uC6B0 @XmlValue \uC18D\uC131\uC744 \uD3EC\uD568\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-CONFLICTING_XML_TYPE_MAPPING = \uB450 \uAC1C\uC758 \uD074\uB798\uC2A4\uC5D0 \uB3D9\uC77C\uD55C XML \uC720\uD615 \uC774\uB984 "{0}"\uC774(\uAC00) \uC0AC\uC6A9\uB429\uB2C8\uB2E4. @XmlType.name \uBC0F @XmlType.namespace\uB97C \uC0AC\uC6A9\uD558\uC5EC \uD574\uB2F9 \uD074\uB798\uC2A4\uC5D0 \uB2E4\uB978 \uC774\uB984\uC744 \uC9C0\uC815\uD558\uC2ED\uC2DC\uC624.
-
-SIMPLE_TYPE_IS_REQUIRED = @XmlAttribute/@XmlValue\uB294 XML\uC5D0\uC11C \uD14D\uC2A4\uD2B8\uC5D0 \uB9E4\uD551\uB418\uB294 Java \uC720\uD615\uC744 \uCC38\uC870\uD574\uC57C \uD569\uB2C8\uB2E4.
-
-PROPERTY_COLLISION = \uD074\uB798\uC2A4\uC5D0 \uB3D9\uC77C\uD55C \uC774\uB984 "{0}"\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB294 \uC18D\uC131\uC774 \uB450 \uAC1C \uC788\uC2B5\uB2C8\uB2E4.
-
-INVALID_IDREF = XmlIDREF \uC18D\uC131\uC774 XmlID \uC18D\uC131\uC744 \uD3EC\uD568\uD558\uC9C0 \uC54A\uB294 "{0}" \uC720\uD615\uC744 \uCC38\uC870\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4.
-
-INVALID_XML_ELEMENT_REF = \uBD80\uC801\uD569\uD55C @XmlElementRef: \uC774 \uCEE8\uD14D\uC2A4\uD2B8\uC5D0\uC11C "{0}" \uC720\uD615 \uB610\uB294 \uD574\uB2F9 \uD558\uC704 \uD074\uB798\uC2A4\uB97C \uC778\uC2DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-NO_XML_ELEMENT_DECL = ''{''{0}''}''{1} \uC694\uC18C\uC5D0 \uB300\uD574 @XmlElementDecl\uC774 \uD3EC\uD568\uB41C ObjectFactory\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-XML_ELEMENT_WRAPPER_ON_NON_COLLECTION = @XmlElementWrapper\uB294 \uBAA8\uC74C \uC18D\uC131\uC5D0\uC11C\uB9CC \uD5C8\uC6A9\uB418\uC9C0\uB9CC "{0}"\uC740(\uB294) \uBAA8\uC74C \uC18D\uC131\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-
-ANNOTATION_NOT_ALLOWED = {0} \uC8FC\uC11D\uC740 \uC774 \uC885\uB958\uC758 \uC18D\uC131\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-XMLLIST_NEEDS_SIMPLETYPE = {0}\uC740(\uB294) \uAD6C\uC870\uD654\uB41C XML \uB2E8\uD3B8(AKA \uBCF5\uD569 \uC720\uD615)\uC5D0 \uB9E4\uD551\uB418\uBBC0\uB85C @XmlList\uC640 \uD638\uD658\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-XMLLIST_ON_SINGLE_PROPERTY = @XmlList\uB294 \uB2E8\uC77C \uAC12 \uC18D\uC131\uC5D0 \uBC30\uCE58\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-NO_FACTORY_METHOD = \uD329\uD1A0\uB9AC \uD074\uB798\uC2A4 "{0}"\uC5D0 \uC778\uC218\uAC00 \uC5C6\uB294 static \uD329\uD1A0\uB9AC \uBA54\uC18C\uB4DC "{1}"\uC774(\uAC00) \uC5C6\uC2B5\uB2C8\uB2E4.
-
-FACTORY_CLASS_NEEDS_FACTORY_METHOD = XmlType\uC774 \uD329\uD1A0\uB9AC \uD074\uB798\uC2A4 "{0}"\uC5D0 \uB300\uD55C \uD329\uD1A0\uB9AC \uBA54\uC18C\uB4DC\uB97C \uC815\uC758\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-MISSING_JAXB_PROPERTIES = "{0}" \uD328\uD0A4\uC9C0\uC5D0 jaxb.properties \uD30C\uC77C\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC774 \uD30C\uC77C\uC744 \uC0DD\uC131\uB41C \uC18C\uC2A4 \uB514\uB809\uD1A0\uB9AC\uC5D0\uC11C \uBCF5\uC0AC\uD558\uAC70\uB098 \uD074\uB798\uC2A4 \uACBD\uB85C\uC5D0 \uD3EC\uD568\uC2DC\uCF30\uC2B5\uB2C8\uAE4C?
-
-TRANSIENT_FIELD_NOT_BINDABLE = \uC784\uC2DC \uD544\uB4DC "{0}"\uC5D0\uB294 JAXB \uC8FC\uC11D\uC774 \uD3EC\uD568\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-THERE_MUST_BE_VALUE_IN_XMLVALUE = \uAC1D\uCCB4\uC758 @XmlValue \uD544\uB4DC\uC5D0 \uAC12\uC774 \uC788\uC5B4\uC57C \uD568: {0}
-
-INCOMPATIBLE_API_VERSION = JAXB 2.1 API jar\uC774 {0}\uC5D0\uC11C \uB85C\uB4DC\uB418\uACE0 \uC788\uC9C0\uB9CC {1}\uC758 \uC774 RI\uC5D0\uB294 JAXB 2.2 API jar\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-INCOMPATIBLE_API_VERSION_MUSTANG = JAXB 2.1 API\uAC00 \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uB85C\uB354\uC5D0\uC11C \uB85C\uB4DC\uB418\uACE0 \uC788\uC9C0\uB9CC {1}\uC758 \uC774 RI\uC5D0\uB294 2.2 API\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uC778\uC99D\uB41C \uB514\uB809\uD1A0\uB9AC \uBC29\uC2DD\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uB85C\uB354\uC5D0 jaxb-api.jar\uC744 \uBC30\uCE58\uD558\uC2ED\uC2DC\uC624. http://java.sun.com/j2se/1.6.0/docs/guide/standards/\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-RUNNING_WITH_1_0_RUNTIME = {1}\uC5D0\uC11C JAXB 2.0 \uB7F0\uD0C0\uC784\uC744 \uC2E4\uD589\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uACE0 \uC788\uC9C0\uB9CC {0}\uC758 \uD074\uB798\uC2A4 \uACBD\uB85C\uC5D0 \uC774\uBBF8 \uC774\uC804 JAXB 1.0 \uB7F0\uD0C0\uC784\uC774 \uC788\uC2B5\uB2C8\uB2E4. 2.0 \uB7F0\uD0C0\uC784\uC774 \uC81C\uB300\uB85C \uC791\uB3D9\uB418\uB3C4\uB85D JAXB 1.0 \uB7F0\uD0C0\uC784\uC744 \uC81C\uAC70\uD558\uC2ED\uC2DC\uC624.
-
-UNMATCHABLE_ADAPTER = {0} \uC5B4\uB311\uD130\uB294 \uD544\uB4DC \uC720\uD615 {1}\uC5D0 \uC801\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_INSTANTIATION_EXCEPTION = {1} \uD074\uB798\uC2A4\uC5D0 \uB300\uD55C AccessorFactory {0}\uC758 \uC778\uC2A4\uD134\uC2A4\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_ACCESS_EXCEPTION = {1} \uD074\uB798\uC2A4\uC5D0 \uB300\uD55C AccessorFactory {0}\uC758 \uC778\uC2A4\uD134\uC2A4\uC5D0 \uC561\uC138\uC2A4\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-CUSTOM_ACCESSORFACTORY_PROPERTY_ERROR = \uC0AC\uC6A9\uC790 \uC815\uC758 AccessorFactory {0}\uC774(\uAC00) \uC18D\uC131 \uC561\uC138\uC2A4 \uC624\uB958\uB97C \uBCF4\uACE0\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4. {1}
-
-CUSTOM_ACCESSORFACTORY_FIELD_ERROR = \uC0AC\uC6A9\uC790 \uC815\uC758 AccessorFactory {0}\uC774(\uAC00) \uD544\uB4DC \uC561\uC138\uC2A4 \uC624\uB958\uB97C \uBCF4\uACE0\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4. {1}
-
-ANONYMOUS_ARRAY_ITEM = {0}\uC740(\uB294) \uBC30\uC5F4 \uAD6C\uC131 \uC694\uC18C \uC720\uD615\uC73C\uB85C \uC0AC\uC6A9\uB418\uBBC0\uB85C \uC775\uBA85\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-XMLGREGORIANCALENDAR_INVALID = XMLGregorianCalendar \uC720\uD615 {0}\uC5D0 \uB300\uD574 \uBD80\uC801\uD569\uD55C \uD544\uB4DC \uC9D1\uD569\uC774 \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-XMLGREGORIANCALENDAR_SEC = \uCD08\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-XMLGREGORIANCALENDAR_MIN = \uBD84\uC774 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-XMLGREGORIANCALENDAR_HR = \uC2DC\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-XMLGREGORIANCALENDAR_DAY = \uC77C\uC774 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-XMLGREGORIANCALENDAR_MONTH = \uC6D4\uC774 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-XMLGREGORIANCALENDAR_YEAR = \uC5F0\uB3C4\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-XMLGREGORIANCALENDAR_TIMEZONE = \uC2DC\uAC04\uB300\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_pt_BR.properties
deleted file mode 100644
index ce9b9b97..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_pt_BR.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ID_MUST_BE_STRING = A propriedade "{0}" tem uma anota\u00E7\u00E3o XmlID, mas seu tipo n\u00E3o \u00E9 String.
-
-# {0} - field or field accessor (getter/setter) e.g.: foo.Bar#field has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement OR foo.Bar#getField() has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement
-MUTUALLY_EXCLUSIVE_ANNOTATIONS = {0} tem anota\u00E7\u00F5es mutuamente exclusivas @{1} e @{2}
-
-DUPLICATE_ANNOTATIONS = anota\u00E7\u00E3o @{0} encontrada em dois locais; um \u00E9 suficiente.
-
-# {0} - class name. e.g.: java.lang.StackTraceElement does not have a no-arg default constructor.
-NO_DEFAULT_CONSTRUCTOR = {0} n\u00E3o tem um construtor no-arg default.
-
-CANT_HANDLE_INTERFACE = {0} \u00E9 uma interface e JAXB n\u00E3o pode tratar interfaces.
-
-CANT_HANDLE_INNER_CLASS = {0} \u00E9 uma classe interna n\u00E3o est\u00E1tica e JAXB n\u00E3o pode trat\u00E1-la.
-
-ANNOTATION_ON_WRONG_METHOD = A anota\u00E7\u00E3o JAXB foi colocada em um m\u00E9todo que n\u00E3o \u00E9 uma propriedade JAXB
-
-GETTER_SETTER_INCOMPATIBLE_TYPE = O tipo de getter \u00E9 {0}, mas o do setter \u00E9 {1}. Eles devem ser iguais.
-
-DUPLICATE_ENTRY_IN_PROP_ORDER = A propriedade "{0}" aparece mais de uma vez em @XmlType.propOrder
-
-DUPLICATE_PROPERTIES = H\u00E1 duas propriedades com o nome "{0}"
-
-XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = O m\u00E9todo {0} tem @XmlElementMapping nele, mas ele n\u00E3o retorna um subtipo de JAXBElement.
-
-# {0} - (xsd) type name. e.g. ns:MyType is not bound to a complex type, and therefore illegal as the scope.
-SCOPE_IS_NOT_COMPLEXTYPE = {0} n\u00E3o est\u00E1 associado a um tipo complexo e, portanto, o escopo \u00E9 inv\u00E1lido.
-
-CONFLICTING_XML_ELEMENT_MAPPING = O nome do elemento "{{0}}"{1} tem mais de um mapeamento.
-
-REFERENCE_TO_NON_ELEMENT = A propriedade {0} foi anotada com @XmlReference, mas n\u00E3o se refere a um elemento.
-
-NON_EXISTENT_ELEMENT_MAPPING = N\u00E3o existe mapeamento de elemento para "{0}":"{1}"
-
-TWO_ATTRIBUTE_WILDCARDS = {0} tem duas propriedades com a anota\u00E7\u00E3o @XmlAnyAttribute.
-
-SUPER_CLASS_HAS_WILDCARD = N\u00E3o pode ter @XmlAnyAttribute quando uma classe-base j\u00E1 a possui.
-
-INVALID_ATTRIBUTE_WILDCARD_TYPE = @XmlAnyAttribute \u00E9 colocado em uma propriedade cujo tipo \u00E9 {0}, mas ele precisa ser atribu\u00EDdo a java.util.Map.
-
-PROPERTY_MISSING_FROM_ORDER = A propriedade {0} est\u00E1 presente, mas n\u00E3o foi especificada em @XmlType.propOrder
-
-PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY = A propriedade {0} aparece na @XmlType.propOrder, mas essa propriedade n\u00E3o existe. Voc\u00EA quis dizer {1}?
-
-# {1} - (local) type name e.g.: '#foo' is not a valid value for 'NCName'
-INVALID_XML_ENUM_VALUE = "{0}" n\u00E3o \u00E9 um valor v\u00E1lido para {1}.
-
-FAILED_TO_INITIALE_DATATYPE_FACTORY = Falha ao inicializar a classe DatatypeFactory de JAXP 1.3.
-
-NO_IMAGE_WRITER = Nenhum javax.imageio.ImageWriter dispon\u00EDvel para o tipo MIME "{0}" especificado
-
-ILLEGAL_MIME_TYPE = "{0}" n\u00E3o \u00E9 um tipo MIME v\u00E1lido: {1}
-
-ILLEGAL_ANNOTATION = a anota\u00E7\u00E3o {0} n\u00E3o pode ser colocada aqui
-
-MULTIPLE_VALUE_PROPERTY = S\u00F3 \u00E9 permitido um @XmlValue por classe, mas duas propriedades foram anotadas com @XmlValue.
-
-XMLVALUE_IN_DERIVED_TYPE = @XmlValue n\u00E3o \u00E9 permitido em uma classe que deriva outra classe.
-
-ELEMENT_AND_VALUE_PROPERTY = Se uma classe tiver a propriedade @XmlElement, ela n\u00E3o poder\u00E1 ter a propriedade @XmlValue.
-
-CONFLICTING_XML_TYPE_MAPPING = Duas classes t\u00EAm o mesmo nome do tipo XML "{0}". Use @XmlType.name e @XmlType.namespace para atribuir outros nomes a elas.
-
-SIMPLE_TYPE_IS_REQUIRED = @XmlAttribute/@XmlValue precisa fazer refer\u00EAncia a um tipo Java que \u00E9 mapeado ao texto em XML.
-
-PROPERTY_COLLISION = A classe tem duas propriedades do mesmo nome "{0}"
-
-INVALID_IDREF = A propriedade XmlIDREF est\u00E1 fazendo refer\u00EAncia a um tipo "{0}" que n\u00E3o tem uma propriedade XmlID.
-
-INVALID_XML_ELEMENT_REF = @XmlElementRef Inv\u00E1lido: o tipo "{0}" ou qualquer uma de suas subclasses n\u00E3o \u00E9 conhecida neste contexto.
-
-NO_XML_ELEMENT_DECL = N\u00E3o h\u00E1 ObjectFactory com um @XmlElementDecl para o elemento "{{0}}"{1}.
-
-XML_ELEMENT_WRAPPER_ON_NON_COLLECTION = @XmlElementWrapper s\u00F3 \u00E9 permitido em uma propriedade de coleta, mas "{0}" n\u00E3o \u00E9 uma propriedade de coleta.
-
-ANNOTATION_NOT_ALLOWED = a anota\u00E7\u00E3o {0} n\u00E3o \u00E9 permitida neste tipo de propriedade.
-
-XMLLIST_NEEDS_SIMPLETYPE = {0} \u00E9 mapeado para um fragmento XML estruturado (tipo complexo AKA) e, portanto, \u00E9 incompat\u00EDvel com @XmlList.
-
-XMLLIST_ON_SINGLE_PROPERTY = @XmlList n\u00E3o pode ser colocado em uma propriedade de valor \u00FAnico
-
-NO_FACTORY_METHOD = A classe de factory "{0}" n\u00E3o tem o m\u00E9todo de factory de argumentos zero est\u00E1ticos "{1}".
-
-FACTORY_CLASS_NEEDS_FACTORY_METHOD = XmlType n\u00E3o definiu um m\u00E9todo de factory para a classe de Factory "{0}".
-
-MISSING_JAXB_PROPERTIES = O pacote "{0}" n\u00E3o encontrou o arquivo jaxb.properties. Voc\u00EA copiou este arquivo do diret\u00F3rio de origem gerado ou incluiu-o no classpath?
-
-TRANSIENT_FIELD_NOT_BINDABLE = O campo transiente "{0}" n\u00E3o pode ter uma anota\u00E7\u00E3o JAXB.
-
-THERE_MUST_BE_VALUE_IN_XMLVALUE = O objeto deve ter algum valor no campo @XmlValue: {0}
-
-INCOMPATIBLE_API_VERSION = O jar da API do JAXB 2.1 est\u00E1 sendo carregado (de {0}), mas este RI (de {1}) requer o jar da API do JAXB 2.2.
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-INCOMPATIBLE_API_VERSION_MUSTANG = A API do JAXB 2.1 est\u00E1 sendo carregada do carregador de classes de bootstrap, mas este RI (de {1}) precisa da API 2.2. Use o mecanismo do diret\u00F3rio endossado para colocar jaxb-api.jar no carregador de classes de bootstrap. (Consulte http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-RUNNING_WITH_1_0_RUNTIME = Voc\u00EA est\u00E1 tentando executar o runtime do JAXB 2.0 (de {1}) mas voc\u00EA tem o runtime do JAXB 1.0 antigo no classpath (em {0}). Remova o runtime do JAXB 1.0 do runtime do 2.0 para funcionar corretamente.
-
-UNMATCHABLE_ADAPTER = O adaptador {0} n\u00E3o \u00E9 aplic\u00E1vel ao tipo de campo {1}.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_INSTANTIATION_EXCEPTION = N\u00E3o \u00E9 poss\u00EDvel criar a inst\u00E2ncia de AccessorFactory {0} para a classe {1}.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_ACCESS_EXCEPTION = N\u00E3o \u00E9 poss\u00EDvel acessar a inst\u00E2ncia de AccessorFactory {0} para a classe {1}.
-
-CUSTOM_ACCESSORFACTORY_PROPERTY_ERROR = A AccessorFactory {0} personalizada est\u00E1 reportando um erro ao acessar a propriedade. {1}
-
-CUSTOM_ACCESSORFACTORY_FIELD_ERROR = A AccessorFactory {0} personalizada est\u00E1 reportando um erro ao acessar um campo. {1}
-
-ANONYMOUS_ARRAY_ITEM = {0} foi usado como um tipo de componente do array; portanto, n\u00E3o pode ser an\u00F4nimo.
-
-XMLGREGORIANCALENDAR_INVALID = Conjunto inv\u00E1lido de campos definido para o tipo XMLGregorianCalendar {0}.
-
-XMLGREGORIANCALENDAR_SEC = Segundos n\u00E3o definidos.
-
-XMLGREGORIANCALENDAR_MIN = Minutos n\u00E3o definidos.
-
-XMLGREGORIANCALENDAR_HR = Hora n\u00E3o definida.
-
-XMLGREGORIANCALENDAR_DAY = Dia n\u00E3o definido.
-
-XMLGREGORIANCALENDAR_MONTH = M\u00EAs n\u00E3o definido.
-
-XMLGREGORIANCALENDAR_YEAR = Ano n\u00E3o definido.
-
-XMLGREGORIANCALENDAR_TIMEZONE = Fuso hor\u00E1rio n\u00E3o definido.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_zh_CN.properties
deleted file mode 100644
index bcdaad52..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_zh_CN.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ID_MUST_BE_STRING = \u5C5E\u6027 "{0}" \u5177\u6709 XmlID \u6CE8\u91CA, \u4F46\u5B83\u4E0D\u662F\u5B57\u7B26\u4E32\u7C7B\u578B\u3002
-
-# {0} - field or field accessor (getter/setter) e.g.: foo.Bar#field has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement OR foo.Bar#getField() has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement
-MUTUALLY_EXCLUSIVE_ANNOTATIONS = {0}\u5177\u6709\u4E92\u76F8\u6392\u65A5\u7684\u6CE8\u91CA @{1} \u548C @{2}
-
-DUPLICATE_ANNOTATIONS = \u53D1\u73B0 @{0} \u6CE8\u91CA\u4F4D\u4E8E\u4E24\u4E2A\u4F4D\u7F6E; \u6709\u4E00\u4E2A\u4F4D\u7F6E\u5C31\u8DB3\u591F\u3002
-
-# {0} - class name. e.g.: java.lang.StackTraceElement does not have a no-arg default constructor.
-NO_DEFAULT_CONSTRUCTOR = {0}\u6CA1\u6709\u65E0\u53C2\u6570\u9ED8\u8BA4\u6784\u9020\u5668\u3002
-
-CANT_HANDLE_INTERFACE = {0}\u662F\u63A5\u53E3, \u800C JAXB \u65E0\u6CD5\u5904\u7406\u63A5\u53E3\u3002
-
-CANT_HANDLE_INNER_CLASS = {0}\u662F\u975E\u9759\u6001\u5185\u90E8\u7C7B, \u800C JAXB \u65E0\u6CD5\u5904\u7406\u8FD9\u4E9B\u7C7B\u3002
-
-ANNOTATION_ON_WRONG_METHOD = \u5728\u5176\u4E2D\u653E\u5165 JAXB \u6CE8\u91CA\u7684\u65B9\u6CD5\u4E0D\u662F JAXB \u5C5E\u6027
-
-GETTER_SETTER_INCOMPATIBLE_TYPE = getter \u7684\u7C7B\u578B\u4E3A{0}, \u800C setter \u7684\u7C7B\u578B\u4E3A{1}\u3002\u5B83\u4EEC\u7684\u7C7B\u578B\u5FC5\u987B\u76F8\u540C\u3002
-
-DUPLICATE_ENTRY_IN_PROP_ORDER = \u5C5E\u6027 "{0}" \u5728 @XmlType.propOrder \u4E2D\u51FA\u73B0\u591A\u6B21
-
-DUPLICATE_PROPERTIES = \u6709\u4E24\u4E2A\u540D\u4E3A "{0}" \u7684\u5C5E\u6027
-
-XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = {0}\u65B9\u6CD5\u5177\u6709 @XmlElementMapping, \u4F46\u8BE5\u65B9\u6CD5\u672A\u8FD4\u56DE JAXBElement \u7684\u5B50\u7C7B\u578B\u3002
-
-# {0} - (xsd) type name. e.g. ns:MyType is not bound to a complex type, and therefore illegal as the scope.
-SCOPE_IS_NOT_COMPLEXTYPE = {0}\u672A\u7ED1\u5B9A\u5230\u590D\u6742\u7C7B\u578B, \u56E0\u6B64\u4F5C\u4E3A\u8303\u56F4\u65F6\u662F\u975E\u6CD5\u7684\u3002
-
-CONFLICTING_XML_ELEMENT_MAPPING = \u5143\u7D20\u540D\u79F0 ''{''{0}''}''{1}\u5177\u6709\u591A\u4E2A\u6620\u5C04\u3002
-
-REFERENCE_TO_NON_ELEMENT = \u5C5E\u6027{0}\u5E26\u6709 @XmlReference \u6CE8\u91CA, \u4F46\u672A\u5F15\u7528\u5143\u7D20\u3002
-
-NON_EXISTENT_ELEMENT_MAPPING = "{0}":"{1}" \u6CA1\u6709\u5143\u7D20\u6620\u5C04
-
-TWO_ATTRIBUTE_WILDCARDS = {0}\u5177\u6709\u4E24\u4E2A\u5E26\u6709 @XmlAnyAttribute \u6CE8\u91CA\u7684\u5C5E\u6027\u3002
-
-SUPER_CLASS_HAS_WILDCARD = \u5982\u679C\u57FA\u7C7B\u5DF2\u6709 @XmlAnyAttribute, \u5219\u4E0D\u80FD\u518D\u6709\u8BE5\u6CE8\u91CA\u3002
-
-INVALID_ATTRIBUTE_WILDCARD_TYPE = @XmlAnyAttribute \u653E\u7F6E\u5728\u7C7B\u578B\u4E3A{0}\u7684\u5C5E\u6027\u4E0A, \u4F46\u5B83\u5FC5\u987B\u53EF\u5206\u914D\u7ED9 java.util.Map\u3002
-
-PROPERTY_MISSING_FROM_ORDER = \u5C5E\u6027{0}\u5DF2\u5B58\u5728, \u4F46\u672A\u5728 @XmlType.propOrder \u4E2D\u6307\u5B9A
-
-PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY = \u5C5E\u6027{0}\u51FA\u73B0\u5728 @XmlType.propOrder \u4E2D, \u4F46\u4E0D\u5B58\u5728\u8FD9\u79CD\u5C5E\u6027\u3002\u60A8\u662F\u5426\u6253\u7B97{1}?
-
-# {1} - (local) type name e.g.: '#foo' is not a valid value for 'NCName'
-INVALID_XML_ENUM_VALUE = "{0}" \u4E0D\u662F{1}\u7684\u6709\u6548\u503C\u3002
-
-FAILED_TO_INITIALE_DATATYPE_FACTORY = \u65E0\u6CD5\u521D\u59CB\u5316 JAXP 1.3 DatatypeFactory \u7C7B\u3002
-
-NO_IMAGE_WRITER = \u6307\u5B9A MIME \u7C7B\u578B "{0}" \u6CA1\u6709\u53EF\u7528\u7684 javax.imageio.ImageWriter
-
-ILLEGAL_MIME_TYPE = "{0}" \u4E0D\u662F\u6709\u6548\u7684 MIME \u7C7B\u578B: {1}
-
-ILLEGAL_ANNOTATION = \u4E0D\u80FD\u5728\u6B64\u5904\u653E\u7F6E{0}\u6CE8\u91CA
-
-MULTIPLE_VALUE_PROPERTY = \u6BCF\u4E2A\u7C7B\u53EA\u5141\u8BB8\u6709\u4E00\u4E2A @XmlValue, \u4F46\u6709\u4E24\u4E2A\u5C5E\u6027\u5E26\u6709 @XmlValue \u6CE8\u91CA\u3002
-
-XMLVALUE_IN_DERIVED_TYPE = \u6D3E\u751F\u5176\u4ED6\u7C7B\u7684\u7C7B\u4E0D\u5141\u8BB8\u6709 @XmlValue\u3002
-
-ELEMENT_AND_VALUE_PROPERTY = \u5982\u679C\u7C7B\u5177\u6709 @XmlElement \u5C5E\u6027, \u5219\u4E0D\u80FD\u5177\u6709 @XmlValue \u5C5E\u6027\u3002
-
-CONFLICTING_XML_TYPE_MAPPING = \u4E24\u4E2A\u7C7B\u5177\u6709\u76F8\u540C\u7684 XML \u7C7B\u578B\u540D\u79F0 "{0}"\u3002\u8BF7\u4F7F\u7528 @XmlType.name \u548C @XmlType.namespace \u4E3A\u7C7B\u5206\u914D\u4E0D\u540C\u7684\u540D\u79F0\u3002
-
-SIMPLE_TYPE_IS_REQUIRED = @XmlAttribute/@XmlValue \u5FC5\u987B\u5F15\u7528\u6620\u5C04\u5230 XML \u4E2D\u7684\u6587\u672C\u7684 Java \u7C7B\u578B\u3002
-
-PROPERTY_COLLISION = \u7C7B\u7684\u4E24\u4E2A\u5C5E\u6027\u5177\u6709\u76F8\u540C\u540D\u79F0 "{0}"
-
-INVALID_IDREF = XmlIDREF \u5C5E\u6027\u5F15\u7528\u4E86\u7C7B\u578B "{0}", \u4F46\u6CA1\u6709 XmlID \u5C5E\u6027\u3002
-
-INVALID_XML_ELEMENT_REF = @XmlElementRef \u65E0\u6548: \u7C7B\u578B "{0}" \u6216\u5176\u4EFB\u610F\u5B50\u7C7B\u5BF9\u6B64\u4E0A\u4E0B\u6587\u662F\u672A\u77E5\u7684\u3002
-
-NO_XML_ELEMENT_DECL = \u5143\u7D20 ''{''{0}''}''{1}\u4E0D\u5B58\u5728\u5177\u6709 @XmlElementDecl \u7684 ObjectFactory\u3002
-
-XML_ELEMENT_WRAPPER_ON_NON_COLLECTION = @XmlElementWrapper \u53EA\u80FD\u4F4D\u4E8E\u96C6\u5408\u5C5E\u6027\u4E0A, \u800C "{0}" \u4E0D\u662F\u96C6\u5408\u5C5E\u6027\u3002
-
-ANNOTATION_NOT_ALLOWED = \u6B64\u7C7B\u578B\u5C5E\u6027\u4E0A\u4E0D\u5141\u8BB8\u6709{0}\u6CE8\u91CA\u3002
-
-XMLLIST_NEEDS_SIMPLETYPE = {0}\u6620\u5C04\u5230\u7ED3\u6784\u5316 XML \u7247\u6BB5 (\u5373\u590D\u6742\u7C7B\u578B), \u56E0\u6B64\u4E0E @XmlList \u4E0D\u517C\u5BB9\u3002
-
-XMLLIST_ON_SINGLE_PROPERTY = @XmlList \u4E0D\u80FD\u653E\u7F6E\u5728\u5355\u503C\u5C5E\u6027\u4E0A
-
-NO_FACTORY_METHOD = \u5DE5\u5382\u7C7B "{0}" \u6CA1\u6709\u9759\u6001\u96F6\u53C2\u6570\u5DE5\u5382\u65B9\u6CD5 "{1}"\u3002
-
-FACTORY_CLASS_NEEDS_FACTORY_METHOD = XmlType \u6CA1\u6709\u4E3A\u5DE5\u5382\u7C7B "{0}" \u5B9A\u4E49\u5DE5\u5382\u65B9\u6CD5\u3002
-
-MISSING_JAXB_PROPERTIES = \u7A0B\u5E8F\u5305 "{0}" \u7F3A\u5C11 jaxb.properties \u6587\u4EF6\u3002\u662F\u5426\u5DF2\u4ECE\u751F\u6210\u7684\u6E90\u76EE\u5F55\u590D\u5236\u6B64\u6587\u4EF6\u6216\u5DF2\u5C06\u6B64\u6587\u4EF6\u5305\u542B\u5728\u7C7B\u8DEF\u5F84\u4E2D?
-
-TRANSIENT_FIELD_NOT_BINDABLE = \u4E34\u65F6\u5B57\u6BB5 "{0}" \u4E0D\u80FD\u6709\u4EFB\u4F55 JAXB \u6CE8\u91CA\u3002
-
-THERE_MUST_BE_VALUE_IN_XMLVALUE = \u5BF9\u8C61\u7684 @XmlValue \u5B57\u6BB5\u4E2D\u5FC5\u987B\u5305\u542B\u67D0\u4E00\u503C: {0}
-
-INCOMPATIBLE_API_VERSION = \u6B63\u5728\u52A0\u8F7D (\u4ECE{0}) JAXB 2.1 API jar, \u4F46\u6B64 RI (\u6765\u81EA{1}) \u9700\u8981 JAXB 2.2 API jar\u3002
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-INCOMPATIBLE_API_VERSION_MUSTANG = \u6B63\u5728\u4ECE\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u52A0\u8F7D JAXB 2.1 API, \u4F46\u6B64 RI (\u6765\u81EA{1}) \u9700\u8981 2.2 API\u3002\u8BF7\u4F7F\u7528\u6388\u6743\u76EE\u5F55\u673A\u5236\u5C06 jaxb-api.jar \u653E\u5728\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u4E2D\u3002(\u8BF7\u53C2\u9605 http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-RUNNING_WITH_1_0_RUNTIME = \u60A8\u6B63\u5728\u5C1D\u8BD5\u8FD0\u884C JAXB 2.0 \u8FD0\u884C\u65F6 (\u4ECE{1}), \u4F46\u7C7B\u8DEF\u5F84 (\u4F4D\u4E8E{0}\u4E2D) \u4E2D\u5148\u524D\u5305\u542B\u65E7 JAXB 1.0 \u8FD0\u884C\u65F6\u3002\u8981\u4F7F 2.0 \u8FD0\u884C\u65F6\u6B63\u5E38\u5DE5\u4F5C, \u8BF7\u5220\u9664 JAXB 1.0 \u8FD0\u884C\u65F6\u3002
-
-UNMATCHABLE_ADAPTER = \u9002\u914D\u5668{0}\u4E0D\u9002\u7528\u4E8E\u5B57\u6BB5\u7C7B\u578B{1}\u3002
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_INSTANTIATION_EXCEPTION = \u65E0\u6CD5\u4E3A\u7C7B{1}\u521B\u5EFA AccessorFactory {0}\u7684\u5B9E\u4F8B\u3002
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_ACCESS_EXCEPTION = \u65E0\u6CD5\u8BBF\u95EE\u7C7B{1}\u7684 AccessorFactory {0}\u7684\u5B9E\u4F8B\u3002
-
-CUSTOM_ACCESSORFACTORY_PROPERTY_ERROR = \u8BBF\u95EE\u5C5E\u6027\u65F6\u5B9A\u5236 AccessorFactory {0}\u62A5\u544A\u9519\u8BEF\u3002{1}
-
-CUSTOM_ACCESSORFACTORY_FIELD_ERROR = \u8BBF\u95EE\u5B57\u6BB5\u65F6\u5B9A\u5236 AccessorFactory {0}\u62A5\u544A\u9519\u8BEF\u3002{1}
-
-ANONYMOUS_ARRAY_ITEM = {0}\u7528\u4F5C\u6570\u7EC4\u7EC4\u4EF6\u7C7B\u578B, \u56E0\u6B64\u4E0D\u80FD\u662F\u533F\u540D\u7684\u3002
-
-XMLGREGORIANCALENDAR_INVALID = \u4E3A XMLGregorianCalendar \u7C7B\u578B{0}\u8BBE\u7F6E\u7684\u5B57\u6BB5\u96C6\u65E0\u6548\u3002
-
-XMLGREGORIANCALENDAR_SEC = \u672A\u8BBE\u7F6E\u79D2\u3002
-
-XMLGREGORIANCALENDAR_MIN = \u672A\u8BBE\u7F6E\u5206\u949F\u3002
-
-XMLGREGORIANCALENDAR_HR = \u672A\u8BBE\u7F6E\u5C0F\u65F6\u3002
-
-XMLGREGORIANCALENDAR_DAY = \u672A\u8BBE\u7F6E\u5929\u3002
-
-XMLGREGORIANCALENDAR_MONTH = \u672A\u8BBE\u7F6E\u6708\u3002
-
-XMLGREGORIANCALENDAR_YEAR = \u672A\u8BBE\u7F6E\u5E74\u3002
-
-XMLGREGORIANCALENDAR_TIMEZONE = \u672A\u8BBE\u7F6E\u65F6\u533A\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_zh_TW.properties
deleted file mode 100644
index 9b9b80eb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_zh_TW.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ID_MUST_BE_STRING = \u7279\u6027 "{0}" \u542B\u6709 XmlID \u8A3B\u89E3, \u4F46\u5176\u985E\u578B\u4E0D\u662F\u300C\u5B57\u4E32\u300D.
-
-# {0} - field or field accessor (getter/setter) e.g.: foo.Bar#field has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement OR foo.Bar#getField() has mutually exclusive annotations @javax.xml.bind.annotation.XmlAttribute and @javax.xml.bind.annotation.XmlElement
-MUTUALLY_EXCLUSIVE_ANNOTATIONS = {0} \u542B\u6709\u4E92\u65A5\u7684\u8A3B\u89E3 @{1} \u8207 @{2}
-
-DUPLICATE_ANNOTATIONS = \u5728\u5169\u500B\u4E0D\u540C\u4F4D\u7F6E\u767C\u73FE @{0} \u8A3B\u89E3; \u53EA\u9700\u8981\u4E00\u500B\u8A3B\u89E3.
-
-# {0} - class name. e.g.: java.lang.StackTraceElement does not have a no-arg default constructor.
-NO_DEFAULT_CONSTRUCTOR = {0} \u6C92\u6709\u7121\u5F15\u6578\u7684\u9810\u8A2D\u5EFA\u69CB\u5B50.
-
-CANT_HANDLE_INTERFACE = {0} \u662F\u4ECB\u9762, \u800C JAXB \u7121\u6CD5\u8655\u7406\u4ECB\u9762.
-
-CANT_HANDLE_INNER_CLASS = {0} \u662F\u975E\u975C\u614B\u5167\u90E8\u985E\u5225, \u800C JAXB \u7121\u6CD5\u8655\u7406\u90A3\u4E9B\u985E\u5225.
-
-ANNOTATION_ON_WRONG_METHOD = JAXB \u8A3B\u89E3\u653E\u7F6E\u65BC\u975E JAXB \u7279\u6027\u7684\u65B9\u6CD5\u4E2D
-
-GETTER_SETTER_INCOMPATIBLE_TYPE = getter \u7684\u985E\u578B\u70BA {0}, \u4F46 setter \u7684\u985E\u578B\u70BA {1}. \u5169\u8005\u985E\u578B\u5FC5\u9808\u76F8\u540C.
-
-DUPLICATE_ENTRY_IN_PROP_ORDER = \u7279\u6027 "{0}" \u5728 @XmlType.propOrder \u4E2D\u51FA\u73FE\u4E00\u6B21\u4EE5\u4E0A
-
-DUPLICATE_PROPERTIES = \u6709\u5169\u500B\u540D\u7A31\u70BA "{0}" \u7684\u7279\u6027
-
-XML_ELEMENT_MAPPING_ON_NON_IXMLELEMENT_METHOD = {0} \u65B9\u6CD5\u4E2D\u542B\u6709 @XmlElementMapping, \u4F46\u672A\u50B3\u56DE\u5B50\u985E\u578B JAXBElement.
-
-# {0} - (xsd) type name. e.g. ns:MyType is not bound to a complex type, and therefore illegal as the scope.
-SCOPE_IS_NOT_COMPLEXTYPE = {0} \u672A\u9023\u7D50\u81F3\u8907\u96DC\u985E\u578B, \u56E0\u6B64\u4E0D\u662F\u6709\u6548\u7684\u7BC4\u570D.
-
-CONFLICTING_XML_ELEMENT_MAPPING = \u5143\u7D20\u540D\u7A31 ''{''{0}''}''{1} \u6709\u4E00\u500B\u4EE5\u4E0A\u7684\u5C0D\u61C9.
-
-REFERENCE_TO_NON_ELEMENT = \u7279\u6027 {0} \u5DF2\u4F7F\u7528 @XmlReference \u52A0\u8A3B, \u4F46\u672A\u53C3\u7167\u5143\u7D20.
-
-NON_EXISTENT_ELEMENT_MAPPING = "{0}":"{1}" \u6C92\u6709\u5143\u7D20\u5C0D\u61C9
-
-TWO_ATTRIBUTE_WILDCARDS = {0} \u6709\u5169\u500B\u7279\u6027\u542B\u6709 @XmlAnyAttribute \u8A3B\u89E3.
-
-SUPER_CLASS_HAS_WILDCARD = \u7576\u57FA\u790E\u985E\u5225\u5DF2\u5305\u542B @XmlAnyAttribute \u6642, \u5C31\u4E0D\u80FD\u518D\u4F7F\u7528\u5B83.
-
-INVALID_ATTRIBUTE_WILDCARD_TYPE = @XmlAnyAttribute \u653E\u7F6E\u65BC\u985E\u578B\u70BA {0} \u7684\u7279\u6027\u4E2D, \u4F46\u5176\u5FC5\u9808\u53EF\u6307\u5B9A\u7D66 java.util.Map.
-
-PROPERTY_MISSING_FROM_ORDER = \u7279\u6027 {0} \u5B58\u5728, \u4F46\u672A\u65BC @XmlType.propOrder \u4E2D\u6307\u5B9A
-
-PROPERTY_ORDER_CONTAINS_UNUSED_ENTRY = \u7279\u6027 {0} \u986F\u793A\u65BC @XmlType.propOrder \u4E2D, \u4F46\u6B64\u7279\u6027\u4E0D\u5B58\u5728. \u4E5F\u8A31\u60A8\u6307\u7684\u662F {1}?
-
-# {1} - (local) type name e.g.: '#foo' is not a valid value for 'NCName'
-INVALID_XML_ENUM_VALUE = "{0}" \u4E0D\u662F {1} \u7684\u6709\u6548\u503C.
-
-FAILED_TO_INITIALE_DATATYPE_FACTORY = \u7121\u6CD5\u8D77\u59CB JAXP 1.3 DatatypeFactory \u985E\u5225.
-
-NO_IMAGE_WRITER = \u6307\u5B9A\u7684 MIME \u985E\u578B "{0}" \u6C92\u6709\u53EF\u7528\u7684 javax.imageio.ImageWriter
-
-ILLEGAL_MIME_TYPE = "{0}" \u4E0D\u662F\u6709\u6548\u7684 MIME \u985E\u578B: {1}
-
-ILLEGAL_ANNOTATION = {0} \u8A3B\u89E3\u4E0D\u53EF\u653E\u7F6E\u65BC\u6B64\u8655
-
-MULTIPLE_VALUE_PROPERTY = \u4E00\u500B\u985E\u5225\u53EA\u80FD\u6709\u4E00\u500B @XmlValue, \u4F46\u6709\u5169\u500B\u7279\u6027\u5747\u4F7F\u7528 @XmlValue \u8A3B\u89E3.
-
-XMLVALUE_IN_DERIVED_TYPE = \u6703\u884D\u751F\u5176\u4ED6\u985E\u5225\u7684\u985E\u5225, \u4E0D\u5141\u8A31\u4F7F\u7528 @XmlValue.
-
-ELEMENT_AND_VALUE_PROPERTY = \u82E5\u985E\u5225\u5305\u542B @XmlElement \u7279\u6027, \u5247\u4E0D\u5F97\u4F7F\u7528 @XmlValue \u7279\u6027.
-
-CONFLICTING_XML_TYPE_MAPPING = \u6709\u5169\u500B\u985E\u5225\u542B\u6709\u76F8\u540C\u7684 XML \u985E\u578B\u540D\u7A31 "{0}". \u8ACB\u4F7F\u7528 @XmlType.name \u8207 @XmlType.namespace \u70BA\u5B83\u5011\u6307\u5B9A\u4E0D\u540C\u7684\u540D\u7A31.
-
-SIMPLE_TYPE_IS_REQUIRED = @XmlAttribute/@XmlValue \u5FC5\u9808\u53C3\u7167\u5C0D\u61C9\u81F3 XML \u4E2D\u6587\u5B57\u7684 Java \u985E\u578B.
-
-PROPERTY_COLLISION = \u985E\u5225\u6709\u76F8\u540C\u540D\u7A31 "{0}" \u7684\u5169\u500B\u7279\u6027
-
-INVALID_IDREF = XmlIDREF \u7279\u6027\u53C3\u7167\u7684\u985E\u578B "{0}" \u672A\u5305\u542B XmlID \u7279\u6027.
-
-INVALID_XML_ELEMENT_REF = \u7121\u6548\u7684 @XmlElementRef : \u6B64\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u4E0D\u8A8D\u5F97\u985E\u578B "{0}" \u6216\u5176\u4EFB\u4E00\u5B50\u985E\u5225.
-
-NO_XML_ELEMENT_DECL = \u6C92\u6709\u542B\u6709\u5143\u7D20 ''{''{0}''}''{1} \u4E4B @XmlElementDecl \u7684 ObjectFactory.
-
-XML_ELEMENT_WRAPPER_ON_NON_COLLECTION = \u53EA\u80FD\u5728\u96C6\u5408\u7279\u6027\u4E2D\u4F7F\u7528 @XmlElementWrapper, \u4F46 "{0}" \u4E0D\u662F\u96C6\u5408\u7279\u6027.
-
-ANNOTATION_NOT_ALLOWED = \u4E0D\u5141\u8A31\u5728\u6B64\u7A2E\u7279\u6027\u4E2D\u4F7F\u7528 {0} \u8A3B\u89E3.
-
-XMLLIST_NEEDS_SIMPLETYPE = {0} \u5C0D\u61C9\u81F3\u7D50\u69CB\u5316\u7684 XML \u7247\u6BB5 (\u4EA6\u7A31\u70BA\u8907\u96DC\u985E\u578B), \u56E0\u6B64\u8207 @XmlList \u4E0D\u76F8\u5BB9.
-
-XMLLIST_ON_SINGLE_PROPERTY = @XmlList \u7121\u6CD5\u653E\u7F6E\u65BC\u55AE\u4E00\u503C\u7279\u6027\u4E2D
-
-NO_FACTORY_METHOD = \u8655\u7406\u7AD9\u985E\u5225 "{0}" \u672A\u5305\u542B\u975C\u614B\u96F6\u5F15\u6578\u8655\u7406\u7AD9\u65B9\u6CD5 "{1}".
-
-FACTORY_CLASS_NEEDS_FACTORY_METHOD = XmlType \u672A\u5B9A\u7FA9\u8655\u7406\u7AD9\u985E\u5225 "{0}" \u7684\u8655\u7406\u7AD9\u65B9\u6CD5.
-
-MISSING_JAXB_PROPERTIES = \u5957\u88DD\u7A0B\u5F0F "{0}" \u907A\u6F0F jaxb.properties \u6A94\u6848. \u60A8\u662F\u5426\u5DF2\u5F9E\u7522\u751F\u7684\u4F86\u6E90\u76EE\u9304\u4E2D\u8907\u88FD\u8A72\u6A94\u6848, \u6216\u5C07\u5176\u5305\u542B\u65BC\u985E\u5225\u8DEF\u5F91\u4E2D?
-
-TRANSIENT_FIELD_NOT_BINDABLE = \u77AC\u6642\u6B04 "{0}" \u4E0D\u80FD\u5305\u542B\u4EFB\u4F55 JAXB \u8A3B\u89E3.
-
-THERE_MUST_BE_VALUE_IN_XMLVALUE = \u7269\u4EF6\u7684 @XmlValue \u6B04\u4F4D: {0} \u4E2D\u5FC5\u9808\u542B\u6709\u503C
-
-INCOMPATIBLE_API_VERSION = \u6B63\u5728\u8F09\u5165 JAXB 2.1 API jar (\u5F9E {0}), \u4F46\u6B64 RI (\u4F86\u81EA {1}) \u9700\u8981 JAXB 2.2 API jar.
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-INCOMPATIBLE_API_VERSION_MUSTANG = \u6B63\u5728\u5F9E\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8F09\u5165\u5668\u8F09\u5165 JAXB 2.1 API, \u4F46\u6B64 RI (\u4F86\u81EA {1}) \u9700\u8981 2.2 API. \u8ACB\u4F7F\u7528\u8A8D\u53EF\u7684\u76EE\u9304\u6A5F\u5236\u4EE5\u5C07 jaxb-api.jar \u653E\u7F6E\u65BC\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8F09\u5165\u5668\u4E2D. (\u8ACB\u53C3\u95B1 http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
-
-# {0}, {1} - absolute class location e.g. JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/c:/foo/bar/jaxb-impl.jar!/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API.
-RUNNING_WITH_1_0_RUNTIME = \u60A8\u6B63\u5728\u5617\u8A66\u57F7\u884C JAXB 2.0 \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C (\u5F9E {1}), \u4F46\u5148\u524D\u65BC\u985E\u5225\u8DEF\u5F91\u4E2D\u5DF2\u7D93\u6709\u820A\u7684 JAXB 1.0 \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C (\u4F4D\u65BC {0}). \u8ACB\u79FB\u9664 JAXB 1.0 \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C, \u4F7F 2.0 \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u80FD\u9806\u5229\u904B\u4F5C.
-
-UNMATCHABLE_ADAPTER = \u8F49\u63A5\u5668 {0} \u4E0D\u9069\u7528\u65BC\u6B04\u4F4D\u985E\u578B {1}.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_INSTANTIATION_EXCEPTION = \u7121\u6CD5\u5EFA\u7ACB\u985E\u5225 {1} \u4E4B AccessorFactory \u7684\u57F7\u884C\u8655\u7406 {0}.
-
-# {0} - com.sun.xml.internal.bind.XmlAccessorFactory, {1} - class name
-ACCESSORFACTORY_ACCESS_EXCEPTION = \u7121\u6CD5\u5B58\u53D6\u985E\u5225 {1} \u4E4B AccessorFactory \u7684\u57F7\u884C\u8655\u7406 {0}.
-
-CUSTOM_ACCESSORFACTORY_PROPERTY_ERROR = \u81EA\u8A02\u7684 AccessorFactory {0} \u6B63\u5728\u56DE\u5831\u5B58\u53D6\u7279\u6027\u7684\u932F\u8AA4. {1}
-
-CUSTOM_ACCESSORFACTORY_FIELD_ERROR = \u81EA\u8A02\u7684 AccessorFactory {0} \u6B63\u5728\u56DE\u5831\u5B58\u53D6\u6B04\u4F4D\u7684\u932F\u8AA4. {1}
-
-ANONYMOUS_ARRAY_ITEM = {0} \u6703\u7576\u4F5C\u9663\u5217\u5143\u4EF6\u985E\u578B\u4F7F\u7528, \u56E0\u6B64\u4E0D\u53EF\u4EE5\u533F\u540D.
-
-XMLGREGORIANCALENDAR_INVALID = XMLGregorianCalendar \u985E\u578B {0} \u8A2D\u5B9A\u4E86\u7121\u6548\u7684\u6B04\u4F4D\u96C6.
-
-XMLGREGORIANCALENDAR_SEC = \u672A\u8A2D\u5B9A\u300C\u79D2\u300D.
-
-XMLGREGORIANCALENDAR_MIN = \u672A\u8A2D\u5B9A\u300C\u5206\u300D.
-
-XMLGREGORIANCALENDAR_HR = \u672A\u8A2D\u5B9A\u300C\u6642\u300D.
-
-XMLGREGORIANCALENDAR_DAY = \u672A\u8A2D\u5B9A\u300C\u65E5\u671F\u300D.
-
-XMLGREGORIANCALENDAR_MONTH = \u672A\u8A2D\u5B9A\u300C\u6708\u4EFD\u300D.
-
-XMLGREGORIANCALENDAR_YEAR = \u672A\u8A2D\u5B9A\u300C\u5E74\u4EFD\u300D.
-
-XMLGREGORIANCALENDAR_TIMEZONE = \u672A\u8A2D\u5B9A\u300C\u6642\u5340\u300D.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java
deleted file mode 100644
index 29ce0466..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java
+++ /dev/null
@@ -1,485 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlAttachmentRef;
-import javax.xml.bind.annotation.XmlRegistry;
-import javax.xml.bind.annotation.XmlSchema;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.util.Which;
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.annotation.ClassLocatable;
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.core.ClassInfo;
-import com.sun.xml.internal.bind.v2.model.core.ErrorHandler;
-import com.sun.xml.internal.bind.v2.model.core.LeafInfo;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.core.Ref;
-import com.sun.xml.internal.bind.v2.model.core.RegistryInfo;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfo;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-import com.sun.xml.internal.bind.WhiteSpaceProcessor;
-
-/**
- * Builds a {@link TypeInfoSet} (a set of JAXB properties)
- * by using {@link ElementInfoImpl} and {@link ClassInfoImpl}.
- * from annotated Java classes.
- *
- * <p>
- * This class uses {@link Navigator} and {@link AnnotationReader} to
- * work with arbitrary annotation source and arbitrary Java model.
- * For this purpose this class is parameterized.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class ModelBuilder<T,C,F,M> implements ModelBuilderI<T,C,F,M> {
- private static final Logger logger;
-
- /**
- * {@link TypeInfo}s that are built will go into this set.
- */
- final TypeInfoSetImpl<T,C,F,M> typeInfoSet;
-
- public final AnnotationReader<T,C,F,M> reader;
-
- public final Navigator<T,C,F,M> nav;
-
- /**
- * Used to detect collisions among global type names.
- */
- private final Map<QName,TypeInfo> typeNames = new HashMap<QName,TypeInfo>();
-
- /**
- * JAXB doesn't want to use namespaces unless we are told to, but WS-I BP
- * conformace requires JAX-RPC to always use a non-empty namespace URI.
- * (see http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#WSDLTYPES R2105)
- *
- * <p>
- * To work around this issue, we allow the use of the empty namespaces to be
- * replaced by a particular designated namespace URI.
- *
- * <p>
- * This field keeps the value of that replacing namespace URI.
- * When there's no replacement, this field is set to "".
- */
- public final String defaultNsUri;
-
-
- /**
- * Packages whose registries are already added.
- */
- /*package*/ final Map<String,RegistryInfoImpl<T,C,F,M>> registries
- = new HashMap<String,RegistryInfoImpl<T,C,F,M>>();
-
- private final Map<C,C> subclassReplacements;
-
- /**
- * @see #setErrorHandler
- */
- private ErrorHandler errorHandler;
- private boolean hadError;
-
- /**
- * Set to true if the model includes {@link XmlAttachmentRef}. JAX-WS
- * needs to know this information.
- */
- public boolean hasSwaRef;
-
- private final ErrorHandler proxyErrorHandler = new ErrorHandler() {
- public void error(IllegalAnnotationException e) {
- reportError(e);
- }
- };
-
- public ModelBuilder(
- AnnotationReader<T, C, F, M> reader,
- Navigator<T, C, F, M> navigator,
- Map<C, C> subclassReplacements,
- String defaultNamespaceRemap
- ) {
-
- this.reader = reader;
- this.nav = navigator;
- this.subclassReplacements = subclassReplacements;
- if(defaultNamespaceRemap==null)
- defaultNamespaceRemap = "";
- this.defaultNsUri = defaultNamespaceRemap;
- reader.setErrorHandler(proxyErrorHandler);
- typeInfoSet = createTypeInfoSet();
- }
-
- /**
- * Makes sure that we are running with 2.1 JAXB API,
- * and report an error if not.
- */
- static {
- try {
- XmlSchema s = null;
- s.location();
- } catch (NullPointerException e) {
- // as epxected
- } catch (NoSuchMethodError e) {
- // this is not a 2.1 API. Where is it being loaded from?
- Messages res;
- if (SecureLoader.getClassClassLoader(XmlSchema.class) == null) {
- res = Messages.INCOMPATIBLE_API_VERSION_MUSTANG;
- } else {
- res = Messages.INCOMPATIBLE_API_VERSION;
- }
-
- throw new LinkageError( res.format(
- Which.which(XmlSchema.class),
- Which.which(ModelBuilder.class)
- ));
- }
- }
-
- /**
- * Makes sure that we don't have conflicting 1.0 runtime,
- * and report an error if we do.
- */
- static {
- try {
- WhiteSpaceProcessor.isWhiteSpace("xyz");
- } catch (NoSuchMethodError e) {
- // we seem to be getting 1.0 runtime
- throw new LinkageError( Messages.RUNNING_WITH_1_0_RUNTIME.format(
- Which.which(WhiteSpaceProcessor.class),
- Which.which(ModelBuilder.class)
- ));
- }
- }
-
- /**
- * Logger init
- */
- static {
- logger = Logger.getLogger(ModelBuilder.class.getName());
- }
-
- protected TypeInfoSetImpl<T,C,F,M> createTypeInfoSet() {
- return new TypeInfoSetImpl<T,C,F,M>(nav,reader,BuiltinLeafInfoImpl.createLeaves(nav));
- }
-
- /**
- * Builds a JAXB {@link ClassInfo} model from a given class declaration
- * and adds that to this model owner.
- *
- * <p>
- * Return type is either {@link ClassInfo} or {@link LeafInfo} (for types like
- * {@link String} or {@link Enum}-derived ones)
- */
- public NonElement<T,C> getClassInfo( C clazz, Locatable upstream ) {
- return getClassInfo(clazz,false,upstream);
- }
-
- /**
- * For limited cases where the caller needs to search for a super class.
- * This is necessary because we don't want {@link #subclassReplacements}
- * to kick in for the super class search, which will cause infinite recursion.
- */
- public NonElement<T,C> getClassInfo( C clazz, boolean searchForSuperClass, Locatable upstream ) {
- assert clazz!=null;
- NonElement<T,C> r = typeInfoSet.getClassInfo(clazz);
- if(r!=null)
- return r;
-
- if(nav.isEnum(clazz)) {
- EnumLeafInfoImpl<T,C,F,M> li = createEnumLeafInfo(clazz,upstream);
- typeInfoSet.add(li);
- r = li;
- addTypeName(r);
- } else {
- boolean isReplaced = subclassReplacements.containsKey(clazz);
- if(isReplaced && !searchForSuperClass) {
- // handle it as if the replacement was specified
- r = getClassInfo(subclassReplacements.get(clazz),upstream);
- } else
- if(reader.hasClassAnnotation(clazz,XmlTransient.class) || isReplaced) {
- // handle it as if the base class was specified
- r = getClassInfo( nav.getSuperClass(clazz), searchForSuperClass,
- new ClassLocatable<C>(upstream,clazz,nav) );
- } else {
- ClassInfoImpl<T,C,F,M> ci = createClassInfo(clazz,upstream);
- typeInfoSet.add(ci);
-
- // compute the closure by eagerly expanding references
- for( PropertyInfo<T,C> p : ci.getProperties() ) {
- if(p.kind()== PropertyKind.REFERENCE) {
- // make sure that we have a registry for this package
- addToRegistry(clazz, (Locatable) p);
- Class[] prmzdClasses = getParametrizedTypes(p);
- if (prmzdClasses != null) {
- for (Class prmzdClass : prmzdClasses) {
- if (prmzdClass != clazz) {
- addToRegistry((C) prmzdClass, (Locatable) p);
- }
- }
- }
- }
-
- for( TypeInfo<T,C> t : p.ref() )
- ; // just compute a reference should be suffice
- }
- ci.getBaseClass(); // same as above.
-
- r = ci;
- addTypeName(r);
- }
- }
-
-
- // more reference closure expansion. @XmlSeeAlso
- XmlSeeAlso sa = reader.getClassAnnotation(XmlSeeAlso.class, clazz, upstream);
- if(sa!=null) {
- for( T t : reader.getClassArrayValue(sa,"value") ) {
- getTypeInfo(t,(Locatable)sa);
- }
- }
-
-
- return r;
- }
-
- /**
- * Adding package's ObjectFactory methods to registry
- * @param clazz which package will be used
- * @param p location
- */
- private void addToRegistry(C clazz, Locatable p) {
- String pkg = nav.getPackageName(clazz);
- if (!registries.containsKey(pkg)) {
- // insert the package's object factory
- C c = nav.loadObjectFactory(clazz, pkg);
- if (c != null)
- addRegistry(c, p);
- }
- }
-
- /**
- * Getting parametrized classes of {@code JAXBElement<...>} property
- * @param p property which parametrized types we will try to get
- * @return null - if it's not JAXBElement property, or it's not parametrized, and array of parametrized classes in other case
- */
- private Class[] getParametrizedTypes(PropertyInfo p) {
- try {
- Type pType = ((RuntimePropertyInfo) p).getIndividualType();
- if (pType instanceof ParameterizedType) {
- ParameterizedType prmzdType = (ParameterizedType) pType;
- if (prmzdType.getRawType() == JAXBElement.class) {
- Type[] actualTypes = prmzdType.getActualTypeArguments();
- Class[] result = new Class[actualTypes.length];
- for (int i = 0; i < actualTypes.length; i++) {
- result[i] = (Class) actualTypes[i];
- }
- return result;
- }
- }
- } catch (Exception e) {
- logger.log(Level.FINE, "Error in ModelBuilder.getParametrizedTypes. " + e.getMessage());
- }
- return null;
- }
-
- /**
- * Checks the uniqueness of the type name.
- */
- private void addTypeName(NonElement<T, C> r) {
- QName t = r.getTypeName();
- if(t==null) return;
-
- TypeInfo old = typeNames.put(t,r);
- if(old!=null) {
- // collision
- reportError(new IllegalAnnotationException(
- Messages.CONFLICTING_XML_TYPE_MAPPING.format(r.getTypeName()),
- old, r ));
- }
- }
-
- /**
- * Have the builder recognize the type (if it hasn't done so yet),
- * and returns a {@link NonElement} that represents it.
- *
- * @return
- * always non-null.
- */
- public NonElement<T,C> getTypeInfo(T t,Locatable upstream) {
- NonElement<T,C> r = typeInfoSet.getTypeInfo(t);
- if(r!=null) return r;
-
- if(nav.isArray(t)) { // no need for checking byte[], because above typeInfoset.getTypeInfo() would return non-null
- ArrayInfoImpl<T,C,F,M> ai =
- createArrayInfo(upstream, t);
- addTypeName(ai);
- typeInfoSet.add(ai);
- return ai;
- }
-
- C c = nav.asDecl(t);
- assert c!=null : t.toString()+" must be a leaf, but we failed to recognize it.";
- return getClassInfo(c,upstream);
- }
-
- /**
- * This method is used to add a root reference to a model.
- */
- public NonElement<T,C> getTypeInfo(Ref<T,C> ref) {
- // TODO: handle XmlValueList
- assert !ref.valueList;
- C c = nav.asDecl(ref.type);
- if(c!=null && reader.getClassAnnotation(XmlRegistry.class,c,null/*TODO: is this right?*/)!=null) {
- if(!registries.containsKey(nav.getPackageName(c)))
- addRegistry(c,null);
- return null; // TODO: is this correct?
- } else
- return getTypeInfo(ref.type,null);
- }
-
-
- protected EnumLeafInfoImpl<T,C,F,M> createEnumLeafInfo(C clazz,Locatable upstream) {
- return new EnumLeafInfoImpl<T,C,F,M>(this,upstream,clazz,nav.use(clazz));
- }
-
- protected ClassInfoImpl<T,C,F,M> createClassInfo(C clazz, Locatable upstream ) {
- return new ClassInfoImpl<T,C,F,M>(this,upstream,clazz);
- }
-
- protected ElementInfoImpl<T,C,F,M> createElementInfo(
- RegistryInfoImpl<T,C,F,M> registryInfo, M m) throws IllegalAnnotationException {
- return new ElementInfoImpl<T,C,F,M>(this,registryInfo,m);
- }
-
- protected ArrayInfoImpl<T,C,F,M> createArrayInfo(Locatable upstream, T arrayType) {
- return new ArrayInfoImpl<T, C, F, M>(this,upstream,arrayType);
- }
-
-
- /**
- * Visits a class with {@link XmlRegistry} and records all the element mappings
- * in it.
- */
- public RegistryInfo<T,C> addRegistry(C registryClass, Locatable upstream ) {
- return new RegistryInfoImpl<T,C,F,M>(this,upstream,registryClass);
- }
-
- /**
- * Gets a {@link RegistryInfo} for the given package.
- *
- * @return
- * null if no registry exists for the package.
- * unlike other getXXX methods on this class,
- * this method is side-effect free.
- */
- public RegistryInfo<T,C> getRegistry(String packageName) {
- return registries.get(packageName);
- }
-
- private boolean linked;
-
- /**
- * Called after all the classes are added to the type set
- * to "link" them together.
- *
- * <p>
- * Don't expose implementation classes in the signature.
- *
- * @return
- * fully built {@link TypeInfoSet} that represents the model,
- * or null if there was an error.
- */
- public TypeInfoSet<T,C,F,M> link() {
-
- assert !linked;
- linked = true;
-
- for( ElementInfoImpl ei : typeInfoSet.getAllElements() )
- ei.link();
-
- for( ClassInfoImpl ci : typeInfoSet.beans().values() )
- ci.link();
-
- for( EnumLeafInfoImpl li : typeInfoSet.enums().values() )
- li.link();
-
- if(hadError)
- return null;
- else
- return typeInfoSet;
- }
-
-//
-//
-// error handling
-//
-//
-
- /**
- * Sets the error handler that receives errors discovered during the model building.
- *
- * @param errorHandler
- * can be null.
- */
- public void setErrorHandler(ErrorHandler errorHandler) {
- this.errorHandler = errorHandler;
- }
-
- public final void reportError(IllegalAnnotationException e) {
- hadError = true;
- if(errorHandler!=null)
- errorHandler.error(e);
- }
-
- public boolean isReplaced(C sc) {
- return subclassReplacements.containsKey(sc);
- }
-
- @Override
- public Navigator<T, C, F, M> getNavigator() {
- return nav;
- }
-
- @Override
- public AnnotationReader<T, C, F, M> getReader() {
- return reader;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilderI.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilderI.java
deleted file mode 100644
index c3a0d5d9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilderI.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-/**
- * User: Iaroslav Savytskyi
- * Date: 24/05/12
- */
-public interface ModelBuilderI<T,C,F,M> {
-
- Navigator<T,C,F,M> getNavigator();
-
- AnnotationReader<T,C,F,M> getReader();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/PropertyInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/PropertyInfoImpl.java
deleted file mode 100644
index a62c30a3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/PropertyInfoImpl.java
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.util.Collection;
-import java.lang.annotation.Annotation;
-
-import javax.activation.MimeType;
-import javax.xml.bind.annotation.XmlAttachmentRef;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlID;
-import javax.xml.bind.annotation.XmlIDREF;
-import javax.xml.bind.annotation.XmlInlineBinaryData;
-import javax.xml.bind.annotation.XmlMimeType;
-import javax.xml.bind.annotation.XmlSchema;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.TODO;
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.core.Adapter;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfo;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-import com.sun.xml.internal.bind.v2.runtime.SwaRefAdapter;
-
-/**
- * Default partial implementation for {@link PropertyInfo}.
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class PropertyInfoImpl<T,C,F,M>
- implements PropertyInfo<T,C>, Locatable, Comparable<PropertyInfoImpl> /*by their names*/ {
-
- /**
- * Object that reads annotations.
- */
- protected final PropertySeed<T,C,F,M> seed;
-
- private final boolean isCollection;
-
- private final ID id;
-
- private final MimeType expectedMimeType;
- private final boolean inlineBinary;
- private final QName schemaType;
-
- protected final ClassInfoImpl<T,C,F,M> parent;
-
- private final Adapter<T,C> adapter;
-
- protected PropertyInfoImpl(ClassInfoImpl<T,C,F,M> parent, PropertySeed<T,C,F,M> spi) {
- this.seed = spi;
- this.parent = parent;
-
- if(parent==null)
- /*
- Various people reported a bug where this parameter is somehow null.
- In an attempt to catch the error better, let's do an explicit check here.
-
- http://forums.java.net/jive/thread.jspa?threadID=18479
- http://forums.java.net/jive/thread.jspa?messageID=165946
- */
- throw new AssertionError();
-
- MimeType mt = Util.calcExpectedMediaType(seed,parent.builder);
- if(mt!=null && !kind().canHaveXmlMimeType) {
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.ILLEGAL_ANNOTATION.format(XmlMimeType.class.getName()),
- seed.readAnnotation(XmlMimeType.class)
- ));
- mt = null;
- }
- this.expectedMimeType = mt;
- this.inlineBinary = seed.hasAnnotation(XmlInlineBinaryData.class);
-
- T t = seed.getRawType();
-
- // check if there's an adapter applicable to the whole property
- XmlJavaTypeAdapter xjta = getApplicableAdapter(t);
- if(xjta!=null) {
- isCollection = false;
- adapter = new Adapter<T,C>(xjta,reader(),nav());
- } else {
- // check if the adapter is applicable to the individual item in the property
-
- this.isCollection = nav().isSubClassOf(t, nav().ref(Collection.class))
- || nav().isArrayButNotByteArray(t);
-
- xjta = getApplicableAdapter(getIndividualType());
- if(xjta==null) {
- // ugly ugly hack, but we implement swaRef as adapter
- XmlAttachmentRef xsa = seed.readAnnotation(XmlAttachmentRef.class);
- if(xsa!=null) {
- parent.builder.hasSwaRef = true;
- adapter = new Adapter<T,C>(nav().asDecl(SwaRefAdapter.class),nav());
- } else {
- adapter = null;
-
- // if this field has adapter annotation but not applicable,
- // that must be an error of the user
- xjta = seed.readAnnotation(XmlJavaTypeAdapter.class);
- if(xjta!=null) {
- T ad = reader().getClassValue(xjta,"value");
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.UNMATCHABLE_ADAPTER.format(
- nav().getTypeName(ad), nav().getTypeName(t)),
- xjta
- ));
- }
- }
- } else {
- adapter = new Adapter<T,C>(xjta,reader(),nav());
- }
- }
-
- this.id = calcId();
- this.schemaType = Util.calcSchemaType(reader(),seed,parent.clazz,
- getIndividualType(),this);
- }
-
-
- public ClassInfoImpl<T,C,F,M> parent() {
- return parent;
- }
-
- protected final Navigator<T,C,F,M> nav() {
- return parent.nav();
- }
- protected final AnnotationReader<T,C,F,M> reader() {
- return parent.reader();
- }
-
- public T getRawType() {
- return seed.getRawType();
- }
-
- public T getIndividualType() {
- if(adapter!=null)
- return adapter.defaultType;
- T raw = getRawType();
- if(!isCollection()) {
- return raw;
- } else {
- if(nav().isArrayButNotByteArray(raw))
- return nav().getComponentType(raw);
-
- T bt = nav().getBaseClass(raw, nav().asDecl(Collection.class) );
- if(nav().isParameterizedType(bt))
- return nav().getTypeArgument(bt,0);
- else
- return nav().ref(Object.class);
- }
- }
-
- public final String getName() {
- return seed.getName();
- }
-
- /**
- * Checks if the given adapter is applicable to the declared property type.
- */
- private boolean isApplicable(XmlJavaTypeAdapter jta, T declaredType ) {
- if(jta==null) return false;
-
- T type = reader().getClassValue(jta,"type");
- if(nav().isSameType(declaredType, type))
- return true; // for types explicitly marked in XmlJavaTypeAdapter.type()
-
- T ad = reader().getClassValue(jta,"value");
- T ba = nav().getBaseClass(ad, nav().asDecl(XmlAdapter.class));
- if(!nav().isParameterizedType(ba))
- return true; // can't check type applicability. assume Object, which means applicable to any.
- T inMemType = nav().getTypeArgument(ba, 1);
-
- return nav().isSubClassOf(declaredType,inMemType);
- }
-
- private XmlJavaTypeAdapter getApplicableAdapter(T type) {
- XmlJavaTypeAdapter jta = seed.readAnnotation(XmlJavaTypeAdapter.class);
- if(jta!=null && isApplicable(jta,type))
- return jta;
-
- // check the applicable adapters on the package
- XmlJavaTypeAdapters jtas = reader().getPackageAnnotation(XmlJavaTypeAdapters.class, parent.clazz, seed );
- if(jtas!=null) {
- for (XmlJavaTypeAdapter xjta : jtas.value()) {
- if(isApplicable(xjta,type))
- return xjta;
- }
- }
- jta = reader().getPackageAnnotation(XmlJavaTypeAdapter.class, parent.clazz, seed );
- if(isApplicable(jta,type))
- return jta;
-
- // then on the target class
- C refType = nav().asDecl(type);
- if(refType!=null) {
- jta = reader().getClassAnnotation(XmlJavaTypeAdapter.class, refType, seed );
- if(jta!=null && isApplicable(jta,type)) // the one on the type always apply.
- return jta;
- }
-
- return null;
- }
-
- /**
- * This is the default implementation of the getAdapter method
- * defined on many of the {@link PropertyInfo}-derived classes.
- */
- public Adapter<T,C> getAdapter() {
- return adapter;
- }
-
-
- public final String displayName() {
- return nav().getClassName(parent.getClazz())+'#'+getName();
- }
-
- public final ID id() {
- return id;
- }
-
- private ID calcId() {
- if(seed.hasAnnotation(XmlID.class)) {
- // check the type
- if(!nav().isSameType(getIndividualType(), nav().ref(String.class)))
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.ID_MUST_BE_STRING.format(getName()), seed )
- );
- return ID.ID;
- } else
- if(seed.hasAnnotation(XmlIDREF.class)) {
- return ID.IDREF;
- } else {
- return ID.NONE;
- }
- }
-
- public final MimeType getExpectedMimeType() {
- return expectedMimeType;
- }
-
- public final boolean inlineBinaryData() {
- return inlineBinary;
- }
-
- public final QName getSchemaType() {
- return schemaType;
- }
-
- public final boolean isCollection() {
- return isCollection;
- }
-
- /**
- * Called after all the {@link TypeInfo}s are collected into the governing {@link TypeInfoSet}.
- *
- * Derived class can do additional actions to complete the model.
- */
- protected void link() {
- if(id==ID.IDREF) {
- // make sure that the refereced type has ID
- for (TypeInfo<T,C> ti : ref()) {
- if(!ti.canBeReferencedByIDREF())
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.INVALID_IDREF.format(
- parent.builder.nav.getTypeName(ti.getType())), this ));
- }
- }
- }
-
- /**
- * A {@link PropertyInfoImpl} is always referenced by its enclosing class,
- * so return that as the upstream.
- */
- public Locatable getUpstream() {
- return parent;
- }
-
- public Location getLocation() {
- return seed.getLocation();
- }
-
-
-//
-//
-// convenience methods for derived classes
-//
-//
-
-
- /**
- * Computes the tag name from a {@link XmlElement} by taking the defaulting into account.
- */
- protected final QName calcXmlName(XmlElement e) {
- if(e!=null)
- return calcXmlName(e.namespace(),e.name());
- else
- return calcXmlName("##default","##default");
- }
-
- /**
- * Computes the tag name from a {@link XmlElementWrapper} by taking the defaulting into account.
- */
- protected final QName calcXmlName(XmlElementWrapper e) {
- if(e!=null)
- return calcXmlName(e.namespace(),e.name());
- else
- return calcXmlName("##default","##default");
- }
-
- private QName calcXmlName(String uri,String local) {
- // compute the default
- TODO.checkSpec();
- if(local.length()==0 || local.equals("##default"))
- local = seed.getName();
- if(uri.equals("##default")) {
- XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
- // JAX-RPC doesn't want the default namespace URI swapping to take effect to
- // local "unqualified" elements. UGLY.
- if(xs!=null) {
- switch(xs.elementFormDefault()) {
- case QUALIFIED:
- QName typeName = parent.getTypeName();
- if(typeName!=null)
- uri = typeName.getNamespaceURI();
- else
- uri = xs.namespace();
- if(uri.length()==0)
- uri = parent.builder.defaultNsUri;
- break;
- case UNQUALIFIED:
- case UNSET:
- uri = "";
- }
- } else {
- uri = "";
- }
- }
- return new QName(uri.intern(),local.intern());
- }
-
- public int compareTo(PropertyInfoImpl that) {
- return this.getName().compareTo(that.getName());
- }
-
- public final <A extends Annotation> A readAnnotation(Class<A> annotationType) {
- return seed.readAnnotation(annotationType);
- }
-
- public final boolean hasAnnotation(Class<? extends Annotation> annotationType) {
- return seed.hasAnnotation(annotationType);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/PropertySeed.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/PropertySeed.java
deleted file mode 100644
index bdba3033..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/PropertySeed.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationSource;
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-
-/**
- * Exposes the core information that forms a {@link PropertyInfo}.
- */
-interface PropertySeed<T,C,F,M> extends Locatable, AnnotationSource {
-
- /**
- * The name of the property is a spec defined concept --- although it doesn't do
- * so explicitly in anywhere.
- *
- * @see PropertyInfo#getName()
- */
- String getName();
-
-
- /**
- * Gets the actual data type of the field.
- *
- * <p>
- * The data of the property is stored by using this type.
- *
- * <p>
- * The difference between the {@link RuntimePropertyInfo#getIndividualType()}
- * and this method is clear when the property is a multi-value property.
- * The {@link RuntimePropertyInfo#getIndividualType()} method returns the type of the item,
- * but this method returns the actual collection type.
- */
- T getRawType();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ReferencePropertyInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ReferencePropertyInfoImpl.java
deleted file mode 100644
index 482df238..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ReferencePropertyInfoImpl.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.util.Collections;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlElementRefs;
-import javax.xml.bind.annotation.XmlMixed;
-import javax.xml.bind.annotation.XmlSchema;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.core.ClassInfo;
-import com.sun.xml.internal.bind.v2.model.core.Element;
-import com.sun.xml.internal.bind.v2.model.core.ElementInfo;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.core.ReferencePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.WildcardMode;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-import java.util.Iterator;
-
-/**
- * Implementation of {@link ReferencePropertyInfo}.
- *
- * @author Kohsuke Kawaguchi
- */
-class ReferencePropertyInfoImpl<T,C,F,M>
- extends ERPropertyInfoImpl<T,C,F,M>
- implements ReferencePropertyInfo<T,C>, DummyPropertyInfo<T, C, F, M>
-{
- /**
- * Lazily computed.
- * @see #getElements()
- */
- private Set<Element<T,C>> types;
- private Set<ReferencePropertyInfoImpl<T,C,F,M>> subTypes = new LinkedHashSet<ReferencePropertyInfoImpl<T,C,F,M>>();
-
- private final boolean isMixed;
-
- private final WildcardMode wildcard;
- private final C domHandler;
- /**
- * Lazily computed.
- * @see #isRequired()
- */
- private Boolean isRequired;
-
- public ReferencePropertyInfoImpl(
- ClassInfoImpl<T,C,F,M> classInfo,
- PropertySeed<T,C,F,M> seed) {
-
- super(classInfo, seed);
-
- isMixed = seed.readAnnotation(XmlMixed.class) != null;
-
- XmlAnyElement xae = seed.readAnnotation(XmlAnyElement.class);
- if(xae==null) {
- wildcard = null;
- domHandler = null;
- } else {
- wildcard = xae.lax()?WildcardMode.LAX:WildcardMode.SKIP;
- domHandler = nav().asDecl(reader().getClassValue(xae,"value"));
- }
- }
-
- public Set<? extends Element<T,C>> ref() {
- return getElements();
- }
-
- public PropertyKind kind() {
- return PropertyKind.REFERENCE;
- }
-
- public Set<? extends Element<T,C>> getElements() {
- if(types==null)
- calcTypes(false);
- assert types!=null;
- return types;
- }
-
- /**
- * Compute {@link #types}.
- *
- * @param last
- * if true, every {@link XmlElementRef} must yield at least one type.
- */
- private void calcTypes(boolean last) {
- XmlElementRef[] ann;
- types = new LinkedHashSet<Element<T,C>>();
- XmlElementRefs refs = seed.readAnnotation(XmlElementRefs.class);
- XmlElementRef ref = seed.readAnnotation(XmlElementRef.class);
-
- if(refs!=null && ref!=null) {
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.MUTUALLY_EXCLUSIVE_ANNOTATIONS.format(
- nav().getClassName(parent.getClazz())+'#'+seed.getName(),
- ref.annotationType().getName(), refs.annotationType().getName()),
- ref, refs ));
- }
-
- if(refs!=null)
- ann = refs.value();
- else {
- if(ref!=null)
- ann = new XmlElementRef[]{ref};
- else
- ann = null;
- }
-
- isRequired = !isCollection(); // this is by default, to remain compatible with 2.1
-
- if(ann!=null) {
- Navigator<T,C,F,M> nav = nav();
- AnnotationReader<T,C,F,M> reader = reader();
-
- final T defaultType = nav.ref(XmlElementRef.DEFAULT.class);
- final C je = nav.asDecl(JAXBElement.class);
-
- for( XmlElementRef r : ann ) {
- boolean yield;
- T type = reader.getClassValue(r,"type");
- if(nav().isSameType(type, defaultType))
- type = nav.erasure(getIndividualType());
- if(nav.getBaseClass(type,je)!=null)
- yield = addGenericElement(r);
- else
- yield = addAllSubtypes(type);
-
- // essentially "isRequired &= isRequired(r)" except that we'd like to skip evaluating isRequird(r)
- // if the value is already false.
- if(isRequired && !isRequired(r))
- isRequired = false;
-
- if(last && !yield) {
- // a reference didn't produce any type.
- // diagnose the problem
- if(nav().isSameType(type, nav.ref(JAXBElement.class))) {
- // no XmlElementDecl
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.NO_XML_ELEMENT_DECL.format(
- getEffectiveNamespaceFor(r), r.name()),
- this
- ));
- } else {
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.INVALID_XML_ELEMENT_REF.format(type),this));
- }
-
- // reporting one error would do.
- // often the element ref field is using @XmlElementRefs
- // to point to multiple JAXBElements.
- // reporting one error for each @XmlElemetnRef is thus often redundant.
- return;
- }
- }
- }
-
- for (ReferencePropertyInfoImpl<T, C, F, M> info : subTypes) {
- PropertySeed sd = info.seed;
- refs = sd.readAnnotation(XmlElementRefs.class);
- ref = sd.readAnnotation(XmlElementRef.class);
-
- if (refs != null && ref != null) {
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.MUTUALLY_EXCLUSIVE_ANNOTATIONS.format(
- nav().getClassName(parent.getClazz())+'#'+seed.getName(),
- ref.annotationType().getName(), refs.annotationType().getName()),
- ref, refs ));
- }
-
- if (refs != null) {
- ann = refs.value();
- } else {
- if (ref != null) {
- ann = new XmlElementRef[]{ref};
- } else {
- ann = null;
- }
- }
-
- if (ann != null) {
- Navigator<T,C,F,M> nav = nav();
- AnnotationReader<T,C,F,M> reader = reader();
-
- final T defaultType = nav.ref(XmlElementRef.DEFAULT.class);
- final C je = nav.asDecl(JAXBElement.class);
-
- for( XmlElementRef r : ann ) {
- boolean yield;
- T type = reader.getClassValue(r,"type");
- if (nav().isSameType(type, defaultType)) {
- type = nav.erasure(getIndividualType());
- }
- if (nav.getBaseClass(type,je) != null) {
- yield = addGenericElement(r, info);
-
- } else {
- yield = addAllSubtypes(type);
- }
-
- if(last && !yield) {
- // a reference didn't produce any type.
- // diagnose the problem
- if(nav().isSameType(type, nav.ref(JAXBElement.class))) {
- // no XmlElementDecl
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.NO_XML_ELEMENT_DECL.format(
- getEffectiveNamespaceFor(r), r.name()),
- this
- ));
- } else {
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.INVALID_XML_ELEMENT_REF.format(),this));
- }
-
- // reporting one error would do.
- // often the element ref field is using @XmlElementRefs
- // to point to multiple JAXBElements.
- // reporting one error for each @XmlElemetnRef is thus often redundant.
- return;
- }
- }
- }
- }
-
- types = Collections.unmodifiableSet(types);
- }
-
- public boolean isRequired() {
- if(isRequired==null)
- calcTypes(false);
- return isRequired;
- }
-
- /**
- * If we find out that we are working with 2.1 API, remember the fact so that
- * we don't waste time generating exceptions every time we call {@link #isRequired(XmlElementRef)}.
- */
- private static boolean is2_2 = true;
-
- /**
- * Reads the value of {@code XmlElementRef.required()}.
- *
- * If we are working as 2.1 RI, this defaults to true.
- */
- private boolean isRequired(XmlElementRef ref) {
- if(!is2_2) return true;
-
- try {
- return ref.required();
- } catch(LinkageError e) {
- is2_2 = false;
- return true; // the value defaults to true
- }
- }
-
- /**
- * @return
- * true if the reference yields at least one type
- */
- private boolean addGenericElement(XmlElementRef r) {
- String nsUri = getEffectiveNamespaceFor(r);
- // TODO: check spec. defaulting of localName.
- return addGenericElement(parent.owner.getElementInfo(parent.getClazz(),new QName(nsUri,r.name())));
- }
-
- private boolean addGenericElement(XmlElementRef r, ReferencePropertyInfoImpl<T,C,F,M> info) {
- String nsUri = info.getEffectiveNamespaceFor(r);
- ElementInfo ei = parent.owner.getElementInfo(info.parent.getClazz(), new QName(nsUri, r.name()));
- types.add(ei);
- return true;
- }
-
- private String getEffectiveNamespaceFor(XmlElementRef r) {
- String nsUri = r.namespace();
-
- XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
- if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) {
- // JAX-RPC doesn't want the default namespace URI swapping to take effect to
- // local "unqualified" elements. UGLY.
- if(nsUri.length()==0)
- nsUri = parent.builder.defaultNsUri;
- }
-
- return nsUri;
- }
-
- private boolean addGenericElement(ElementInfo<T,C> ei) {
- if(ei==null)
- return false;
- types.add(ei);
- for( ElementInfo<T,C> subst : ei.getSubstitutionMembers() )
- addGenericElement(subst);
- return true;
- }
-
- private boolean addAllSubtypes(T type) {
- Navigator<T,C,F,M> nav = nav();
-
- // this allows the explicitly referenced type to be sucked in to the model
- NonElement<T,C> t = parent.builder.getClassInfo(nav.asDecl(type),this);
- if(!(t instanceof ClassInfo))
- // this is leaf.
- return false;
-
- boolean result = false;
-
- ClassInfo<T,C> c = (ClassInfo<T,C>) t;
- if(c.isElement()) {
- types.add(c.asElement());
- result = true;
- }
-
- // look for other possible types
- for( ClassInfo<T,C> ci : parent.owner.beans().values() ) {
- if(ci.isElement() && nav.isSubClassOf(ci.getType(),type)) {
- types.add(ci.asElement());
- result = true;
- }
- }
-
- // don't allow local elements to substitute.
- for( ElementInfo<T,C> ei : parent.owner.getElementMappings(null).values()) {
- if(nav.isSubClassOf(ei.getType(),type)) {
- types.add(ei);
- result = true;
- }
- }
-
- return result;
- }
-
-
- @Override
- protected void link() {
- super.link();
-
- // until we get the whole thing into TypeInfoSet,
- // we never really know what are all the possible types that can be assigned on this field.
- // so recompute this value when we have all the information.
- calcTypes(true);
-
- }
-
- public final void addType(PropertyInfoImpl<T,C,F,M> info) {
- //noinspection unchecked
- subTypes.add((ReferencePropertyInfoImpl)info);
- }
-
- public final boolean isMixed() {
- return isMixed;
- }
-
- public final WildcardMode getWildcard() {
- return wildcard;
- }
-
- public final C getDOMHandler() {
- return domHandler;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RegistryInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RegistryInfoImpl.java
deleted file mode 100644
index 2488f01d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RegistryInfoImpl.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlElementDecl;
-
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.annotation.MethodLocatable;
-import com.sun.xml.internal.bind.v2.model.core.RegistryInfo;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfo;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-import com.sun.xml.internal.bind.v2.ContextFactory;
-
-/**
- * Implementation of {@link RegistryInfo}.
- *
- * @author Kohsuke Kawaguchi
- */
-// experimenting with shorter type parameters for <T,C,F,M> quadruple.
-// the idea is that they show so often that you'd understand the meaning
-// without relying on the whole name.
-final class RegistryInfoImpl<T,C,F,M> implements Locatable, RegistryInfo<T,C> {
-
- final C registryClass;
- private final Locatable upstream;
- private final Navigator<T,C,F,M> nav;
-
- /**
- * Types that are referenced from this registry.
- */
- private final Set<TypeInfo<T,C>> references = new LinkedHashSet<TypeInfo<T,C>>();
-
- /**
- * Picks up references in this registry to other types.
- */
- RegistryInfoImpl(ModelBuilder<T,C,F,M> builder, Locatable upstream, C registryClass) {
- this.nav = builder.nav;
- this.registryClass = registryClass;
- this.upstream = upstream;
- builder.registries.put(getPackageName(),this);
-
- if(nav.getDeclaredField(registryClass,ContextFactory.USE_JAXB_PROPERTIES)!=null) {
- // the user is trying to use ObjectFactory that we generate for interfaces,
- // that means he's missing jaxb.properties
- builder.reportError(new IllegalAnnotationException(
- Messages.MISSING_JAXB_PROPERTIES.format(getPackageName()),
- this
- ));
- // looking at members will only add more errors, so just abort now
- return;
- }
-
- for( M m : nav.getDeclaredMethods(registryClass) ) {
- XmlElementDecl em = builder.reader.getMethodAnnotation(
- XmlElementDecl.class, m, this );
-
- if(em==null) {
- if(nav.getMethodName(m).startsWith("create")) {
- // this is a factory method. visit this class
- references.add(
- builder.getTypeInfo(nav.getReturnType(m),
- new MethodLocatable<M>(this,m,nav)));
- }
-
- continue;
- }
-
- ElementInfoImpl<T,C,F,M> ei;
- try {
- ei = builder.createElementInfo(this,m);
- } catch (IllegalAnnotationException e) {
- builder.reportError(e);
- continue; // recover by ignoring this element
- }
-
- // register this mapping
- // TODO: any chance this could cause a stack overflow (by recursively visiting classes)?
- builder.typeInfoSet.add(ei,builder);
- references.add(ei);
- }
- }
-
- public Locatable getUpstream() {
- return upstream;
- }
-
- public Location getLocation() {
- return nav.getClassLocation(registryClass);
- }
-
- public Set<TypeInfo<T,C>> getReferences() {
- return references;
- }
-
- /**
- * Gets the name of the package that this registry governs.
- */
- public String getPackageName() {
- return nav.getPackageName(registryClass);
- }
-
- public C getClazz() {
- return registryClass;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java
deleted file mode 100644
index 1d6c5247..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.reflect.Type;
-
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class RuntimeAnyTypeImpl extends AnyTypeImpl<Type,Class> implements RuntimeNonElement {
- private RuntimeAnyTypeImpl() {
- super(Utils.REFLECTION_NAVIGATOR);
- }
-
- public <V> Transducer<V> getTransducer() {
- return null;
- }
-
- static final RuntimeNonElement theInstance = new RuntimeAnyTypeImpl();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeArrayInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeArrayInfoImpl.java
deleted file mode 100644
index 2ba4044a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeArrayInfoImpl.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeArrayInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class RuntimeArrayInfoImpl extends ArrayInfoImpl<Type,Class,Field,Method> implements RuntimeArrayInfo {
- RuntimeArrayInfoImpl(RuntimeModelBuilder builder, Locatable upstream, Class arrayType) {
- super(builder, upstream, arrayType);
- }
-
- public Class getType() {
- return (Class)super.getType();
- }
-
- public RuntimeNonElement getItemType() {
- return (RuntimeNonElement)super.getItemType();
- }
-
- public <V> Transducer<V> getTransducer() {
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAttributePropertyInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAttributePropertyInfoImpl.java
deleted file mode 100644
index f0baa0dd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAttributePropertyInfoImpl.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.List;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeAttributePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class RuntimeAttributePropertyInfoImpl extends AttributePropertyInfoImpl<Type,Class,Field,Method>
- implements RuntimeAttributePropertyInfo {
-
- RuntimeAttributePropertyInfoImpl(RuntimeClassInfoImpl classInfo, PropertySeed<Type,Class,Field,Method> seed) {
- super(classInfo, seed);
- }
-
- public boolean elementOnlyContent() {
- return true;
- }
-
- public RuntimeNonElement getTarget() {
- return (RuntimeNonElement) super.getTarget();
- }
-
- public List<? extends RuntimeNonElement> ref() {
- return (List<? extends RuntimeNonElement>)super.ref();
- }
-
- public RuntimePropertyInfo getSource() {
- return this;
- }
-
- public void link() {
- getTransducer();
- super.link();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java
deleted file mode 100644
index 434d3d94..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java
+++ /dev/null
@@ -1,1039 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.model.impl;
-
-import java.awt.Component;
-import java.awt.Graphics;
-import java.awt.Image;
-import java.awt.MediaTracker;
-import java.awt.image.BufferedImage;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.Type;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import javax.activation.DataHandler;
-import javax.activation.DataSource;
-import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
-import javax.imageio.ImageIO;
-import javax.imageio.ImageWriter;
-import javax.imageio.stream.ImageOutputStream;
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.helpers.ValidationEventImpl;
-import javax.xml.datatype.DatatypeConstants;
-import javax.xml.datatype.Duration;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.stream.StreamResult;
-
-import com.sun.istack.internal.ByteArrayDataSource;
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.WhiteSpaceProcessor;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.TODO;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeBuiltinLeafInfo;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.output.Pcdata;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-import com.sun.xml.internal.bind.v2.util.ByteArrayOutputStreamEx;
-import com.sun.xml.internal.bind.v2.util.DataSourceSource;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link BuiltinLeafInfoImpl} with a support for runtime.
- *
- * <p>
- * In particular this class defines {@link Transducer}s for the built-in types.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class RuntimeBuiltinLeafInfoImpl<T> extends BuiltinLeafInfoImpl<Type,Class>
- implements RuntimeBuiltinLeafInfo, Transducer<T> {
-
- private RuntimeBuiltinLeafInfoImpl(Class type, QName... typeNames) {
- super(type, typeNames);
- LEAVES.put(type,this);
- }
-
- public final Class getClazz() {
- return (Class)getType();
- }
-
-
- public final Transducer getTransducer() {
- return this;
- }
-
- public boolean useNamespace() {
- return false;
- }
-
- public final boolean isDefault() {
- return true;
- }
-
- public void declareNamespace(T o, XMLSerializer w) throws AccessorException {
- }
-
- public QName getTypeName(T instance) {
- return null;
- }
-
- /**
- * Those built-in types that print to {@link String}.
- */
- private static abstract class StringImpl<T> extends RuntimeBuiltinLeafInfoImpl<T> {
- protected StringImpl(Class type, QName... typeNames) {
- super(type,typeNames);
- }
-
- public abstract String print(T o) throws AccessorException;
-
- public void writeText(XMLSerializer w, T o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- w.text(print(o),fieldName);
- }
-
- public void writeLeafElement(XMLSerializer w, Name tagName, T o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- w.leafElement(tagName,print(o),fieldName);
- }
- }
-
- /**
- * Those built-in types that print to {@link Pcdata}.
- */
- private static abstract class PcdataImpl<T> extends RuntimeBuiltinLeafInfoImpl<T> {
- protected PcdataImpl(Class type, QName... typeNames) {
- super(type,typeNames);
- }
-
- public abstract Pcdata print(T o) throws AccessorException;
-
- public final void writeText(XMLSerializer w, T o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- w.text(print(o),fieldName);
- }
-
- public final void writeLeafElement(XMLSerializer w, Name tagName, T o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- w.leafElement(tagName,print(o),fieldName);
- }
-
- }
-
- /**
- * All instances of {@link RuntimeBuiltinLeafInfoImpl}s keyed by their type.
- */
- public static final Map<Type,RuntimeBuiltinLeafInfoImpl<?>> LEAVES = new HashMap<Type, RuntimeBuiltinLeafInfoImpl<?>>();
-
- private static QName createXS(String typeName) {
- return new QName(WellKnownNamespace.XML_SCHEMA,typeName);
- }
-
- public static final RuntimeBuiltinLeafInfoImpl<String> STRING;
-
- private static final String DATE = "date";
-
- /**
- * List of all {@link RuntimeBuiltinLeafInfoImpl}s.
- *
- * <p>
- * This corresponds to the built-in Java classes that are specified to be
- * handled differently than ordinary classes. See table 8-2 "Mapping of Standard Java classes".
- */
- public static final List<RuntimeBuiltinLeafInfoImpl<?>> builtinBeanInfos;
-
- public static final String MAP_ANYURI_TO_URI = "mapAnyUriToUri";
-
- static {
-
- String MAP_ANYURI_TO_URI_VALUE = AccessController.doPrivileged(
- new PrivilegedAction<String>() {
- @Override
- public String run() {
- return System.getProperty(MAP_ANYURI_TO_URI);
- }
- }
- );
- QName[] qnames = (MAP_ANYURI_TO_URI_VALUE == null) ? new QName[] {
- createXS("string"),
- createXS("anySimpleType"),
- createXS("normalizedString"),
- createXS("anyURI"),
- createXS("token"),
- createXS("language"),
- createXS("Name"),
- createXS("NCName"),
- createXS("NMTOKEN"),
- createXS("ENTITY")}
- :
- new QName[] {
- createXS("string"),
- createXS("anySimpleType"),
- createXS("normalizedString"),
- createXS("token"),
- createXS("language"),
- createXS("Name"),
- createXS("NCName"),
- createXS("NMTOKEN"),
- createXS("ENTITY")};
-
- STRING = new StringImplImpl(String.class, qnames);
-
- ArrayList<RuntimeBuiltinLeafInfoImpl<?>> secondaryList = new ArrayList<RuntimeBuiltinLeafInfoImpl<?>>();
- /*
- There are cases where more than one Java classes map to the same XML type.
- But when we see the same XML type in an incoming document, we only pick
- one of those Java classes to unmarshal. This Java class is called 'primary'.
- The rest are called 'secondary'.
-
- Currently we lack the proper infrastructure to handle those nicely.
- For now, we rely on a hack.
-
- We define secondary mappings first, then primary ones later. GrammarInfo
- builds a map from type name to BeanInfo. By defining primary ones later,
- those primary bindings will overwrite the secondary ones.
- */
-
- /*
- secondary bindings
- */
- secondaryList.add(
- new StringImpl<Character>(Character.class, createXS("unsignedShort")) {
- public Character parse(CharSequence text) {
- // TODO.checkSpec("default mapping for char is not defined yet");
- return (char)DatatypeConverterImpl._parseInt(text);
- }
- public String print(Character v) {
- return Integer.toString(v);
- }
- });
- secondaryList.add(
- new StringImpl<Calendar>(Calendar.class, DatatypeConstants.DATETIME) {
- public Calendar parse(CharSequence text) {
- return DatatypeConverterImpl._parseDateTime(text.toString());
- }
- public String print(Calendar v) {
- return DatatypeConverterImpl._printDateTime(v);
- }
- });
- secondaryList.add(
- new StringImpl<GregorianCalendar>(GregorianCalendar.class, DatatypeConstants.DATETIME) {
- public GregorianCalendar parse(CharSequence text) {
- return DatatypeConverterImpl._parseDateTime(text.toString());
- }
- public String print(GregorianCalendar v) {
- return DatatypeConverterImpl._printDateTime(v);
- }
- });
- secondaryList.add(
- new StringImpl<Date>(Date.class, DatatypeConstants.DATETIME) {
- public Date parse(CharSequence text) {
- return DatatypeConverterImpl._parseDateTime(text.toString()).getTime();
- }
- public String print(Date v) {
- XMLSerializer xs = XMLSerializer.getInstance();
- QName type = xs.getSchemaType();
- GregorianCalendar cal = new GregorianCalendar(0,0,0);
- cal.setTime(v);
- if ((type != null) && (WellKnownNamespace.XML_SCHEMA.equals(type.getNamespaceURI())) &&
- DATE.equals(type.getLocalPart())) {
- return DatatypeConverterImpl._printDate(cal);
- } else {
- return DatatypeConverterImpl._printDateTime(cal);
- }
- }
- });
- secondaryList.add(
- new StringImpl<File>(File.class, createXS("string")) {
- public File parse(CharSequence text) {
- return new File(WhiteSpaceProcessor.trim(text).toString());
- }
- public String print(File v) {
- return v.getPath();
- }
- });
- secondaryList.add(
- new StringImpl<URL>(URL.class, createXS("anyURI")) {
- public URL parse(CharSequence text) throws SAXException {
- TODO.checkSpec("JSR222 Issue #42");
- try {
- return new URL(WhiteSpaceProcessor.trim(text).toString());
- } catch (MalformedURLException e) {
- UnmarshallingContext.getInstance().handleError(e);
- return null;
- }
- }
- public String print(URL v) {
- return v.toExternalForm();
- }
- });
- if (MAP_ANYURI_TO_URI_VALUE == null) {
- secondaryList.add(
- new StringImpl<URI>(URI.class, createXS("string")) {
- public URI parse(CharSequence text) throws SAXException {
- try {
- return new URI(text.toString());
- } catch (URISyntaxException e) {
- UnmarshallingContext.getInstance().handleError(e);
- return null;
- }
- }
-
- public String print(URI v) {
- return v.toString();
- }
- });
- }
- secondaryList.add(
- new StringImpl<Class>(Class.class, createXS("string")) {
- public Class parse(CharSequence text) throws SAXException {
- TODO.checkSpec("JSR222 Issue #42");
- try {
- String name = WhiteSpaceProcessor.trim(text).toString();
- ClassLoader cl = UnmarshallingContext.getInstance().classLoader;
- if(cl==null)
- cl = Thread.currentThread().getContextClassLoader();
-
- if(cl!=null)
- return cl.loadClass(name);
- else
- return Class.forName(name);
- } catch (ClassNotFoundException e) {
- UnmarshallingContext.getInstance().handleError(e);
- return null;
- }
- }
- public String print(Class v) {
- return v.getName();
- }
- });
-
- /*
- classes that map to base64Binary / MTOM related classes.
- a part of the secondary binding.
- */
- secondaryList.add(
- new PcdataImpl<Image>(Image.class, createXS("base64Binary")) {
- public Image parse(CharSequence text) throws SAXException {
- try {
- InputStream is;
- if(text instanceof Base64Data)
- is = ((Base64Data)text).getInputStream();
- else
- is = new ByteArrayInputStream(decodeBase64(text)); // TODO: buffering is inefficient
-
- // technically we should check the MIME type here, but
- // normally images can be content-sniffed.
- // so the MIME type check will only make us slower and draconian, both of which
- // JAXB 2.0 isn't interested.
- try {
- return ImageIO.read(is);
- } finally {
- is.close();
- }
- } catch (IOException e) {
- UnmarshallingContext.getInstance().handleError(e);
- return null;
- }
- }
-
- private BufferedImage convertToBufferedImage(Image image) throws IOException {
- if (image instanceof BufferedImage) {
- return (BufferedImage)image;
-
- } else {
- MediaTracker tracker = new MediaTracker(new Component(){}); // not sure if this is the right thing to do.
- tracker.addImage(image, 0);
- try {
- tracker.waitForAll();
- } catch (InterruptedException e) {
- throw new IOException(e.getMessage());
- }
- BufferedImage bufImage = new BufferedImage(
- image.getWidth(null),
- image.getHeight(null),
- BufferedImage.TYPE_INT_ARGB);
-
- Graphics g = bufImage.createGraphics();
- g.drawImage(image, 0, 0, null);
- return bufImage;
- }
- }
-
- public Base64Data print(Image v) {
- ByteArrayOutputStreamEx imageData = new ByteArrayOutputStreamEx();
- XMLSerializer xs = XMLSerializer.getInstance();
-
- String mimeType = xs.getXMIMEContentType();
- if(mimeType==null || mimeType.startsWith("image/*"))
- // because PNG is lossless, it's a good default
- //
- // mime type can be a range, in which case we can't just pass that
- // to ImageIO.getImageWritersByMIMEType, so here I'm just assuming
- // the default of PNG. Not sure if this is complete.
- mimeType = "image/png";
-
- try {
- Iterator<ImageWriter> itr = ImageIO.getImageWritersByMIMEType(mimeType);
- if(itr.hasNext()) {
- ImageWriter w = itr.next();
- ImageOutputStream os = ImageIO.createImageOutputStream(imageData);
- w.setOutput(os);
- w.write(convertToBufferedImage(v));
- os.close();
- w.dispose();
- } else {
- // no encoder
- xs.handleEvent(new ValidationEventImpl(
- ValidationEvent.ERROR,
- Messages.NO_IMAGE_WRITER.format(mimeType),
- xs.getCurrentLocation(null) ));
- // TODO: proper error reporting
- throw new RuntimeException("no encoder for MIME type "+mimeType);
- }
- } catch (IOException e) {
- xs.handleError(e);
- // TODO: proper error reporting
- throw new RuntimeException(e);
- }
- Base64Data bd = new Base64Data();
- imageData.set(bd,mimeType);
- return bd;
- }
- });
- secondaryList.add(
- new PcdataImpl<DataHandler>(DataHandler.class, createXS("base64Binary")) {
- public DataHandler parse(CharSequence text) {
- if(text instanceof Base64Data)
- return ((Base64Data)text).getDataHandler();
- else
- return new DataHandler(new ByteArrayDataSource(decodeBase64(text),
- UnmarshallingContext.getInstance().getXMIMEContentType()));
- }
-
- public Base64Data print(DataHandler v) {
- Base64Data bd = new Base64Data();
- bd.set(v);
- return bd;
- }
- });
- secondaryList.add(
- new PcdataImpl<Source>(Source.class, createXS("base64Binary")) {
- public Source parse(CharSequence text) throws SAXException {
- try {
- if(text instanceof Base64Data)
- return new DataSourceSource( ((Base64Data)text).getDataHandler() );
- else
- return new DataSourceSource(new ByteArrayDataSource(decodeBase64(text),
- UnmarshallingContext.getInstance().getXMIMEContentType()));
- } catch (MimeTypeParseException e) {
- UnmarshallingContext.getInstance().handleError(e);
- return null;
- }
- }
-
- public Base64Data print(Source v) {
- XMLSerializer xs = XMLSerializer.getInstance();
- Base64Data bd = new Base64Data();
-
- String contentType = xs.getXMIMEContentType();
- MimeType mt = null;
- if(contentType!=null)
- try {
- mt = new MimeType(contentType);
- } catch (MimeTypeParseException e) {
- xs.handleError(e);
- // recover by ignoring the content type specification
- }
-
- if( v instanceof DataSourceSource ) {
- // if so, we already have immutable DataSource so
- // this can be done efficiently
- DataSource ds = ((DataSourceSource)v).getDataSource();
-
- String dsct = ds.getContentType();
- if(dsct!=null && (contentType==null || contentType.equals(dsct))) {
- bd.set(new DataHandler(ds));
- return bd;
- }
- }
-
- // general case. slower.
-
- // find out the encoding
- String charset=null;
- if(mt!=null)
- charset = mt.getParameter("charset");
- if(charset==null)
- charset = "UTF-8";
-
- try {
- ByteArrayOutputStreamEx baos = new ByteArrayOutputStreamEx();
- Transformer tr = xs.getIdentityTransformer();
- String defaultEncoding = tr.getOutputProperty(OutputKeys.ENCODING);
- tr.setOutputProperty(OutputKeys.ENCODING, charset);
- tr.transform(v, new StreamResult(new OutputStreamWriter(baos,charset)));
- tr.setOutputProperty(OutputKeys.ENCODING, defaultEncoding);
- baos.set(bd,"application/xml; charset="+charset);
- return bd;
- } catch (TransformerException e) {
- // TODO: marshaller error handling
- xs.handleError(e);
- } catch (UnsupportedEncodingException e) {
- xs.handleError(e);
- }
-
- // error recoverly
- bd.set(new byte[0],"application/xml");
- return bd;
- }
- });
- secondaryList.add(
- new StringImpl<XMLGregorianCalendar>(XMLGregorianCalendar.class,
- createXS("anySimpleType"),
- DatatypeConstants.DATE,
- DatatypeConstants.DATETIME,
- DatatypeConstants.TIME,
- DatatypeConstants.GMONTH,
- DatatypeConstants.GDAY,
- DatatypeConstants.GYEAR,
- DatatypeConstants.GYEARMONTH,
- DatatypeConstants.GMONTHDAY
- ) {
- public String print(XMLGregorianCalendar cal) {
- XMLSerializer xs = XMLSerializer.getInstance();
-
- QName type = xs.getSchemaType();
- if (type != null) {
- try {
- checkXmlGregorianCalendarFieldRef(type, cal);
- String format = xmlGregorianCalendarFormatString.get(type);
- if (format != null) {
- return format(format, cal);
- }
- } catch (javax.xml.bind.MarshalException e) {
- // see issue 649
- xs.handleEvent(new ValidationEventImpl(ValidationEvent.WARNING, e.getMessage(),
- xs.getCurrentLocation(null) ));
- return "";
- }
- }
- return cal.toXMLFormat();
- }
-
- public XMLGregorianCalendar parse(CharSequence lexical) throws SAXException {
- try {
- return DatatypeConverterImpl.getDatatypeFactory()
- .newXMLGregorianCalendar(lexical.toString().trim()); // (.trim() - issue 396)
- } catch (Exception e) {
- UnmarshallingContext.getInstance().handleError(e);
- return null;
- }
- }
-
- // code duplicated from JAXP RI 1.3. See 6277586
- private String format( String format, XMLGregorianCalendar value ) {
- StringBuilder buf = new StringBuilder();
- int fidx=0,flen=format.length();
-
- while(fidx<flen) {
- char fch = format.charAt(fidx++);
- if(fch!='%') {// not a meta char
- buf.append(fch);
- continue;
- }
-
- switch(format.charAt(fidx++)) {
- case 'Y':
- printNumber(buf,value.getEonAndYear(), 4);
- break;
- case 'M':
- printNumber(buf,value.getMonth(),2);
- break;
- case 'D':
- printNumber(buf,value.getDay(),2);
- break;
- case 'h':
- printNumber(buf,value.getHour(),2);
- break;
- case 'm':
- printNumber(buf,value.getMinute(),2);
- break;
- case 's':
- printNumber(buf,value.getSecond(),2);
- if (value.getFractionalSecond() != null) {
- String frac = value.getFractionalSecond().toPlainString();
- //skip leading zero.
- buf.append(frac.substring(1, frac.length()));
- }
- break;
- case 'z':
- int offset = value.getTimezone();
- if(offset == 0) {
- buf.append('Z');
- } else if (offset != DatatypeConstants.FIELD_UNDEFINED) {
- if(offset<0) {
- buf.append('-');
- offset *= -1;
- } else {
- buf.append('+');
- }
- printNumber(buf,offset/60,2);
- buf.append(':');
- printNumber(buf,offset%60,2);
- }
- break;
- default:
- throw new InternalError(); // impossible
- }
- }
-
- return buf.toString();
- }
- private void printNumber( StringBuilder out, BigInteger number, int nDigits) {
- String s = number.toString();
- for( int i=s.length(); i<nDigits; i++ )
- out.append('0');
- out.append(s);
- }
- private void printNumber( StringBuilder out, int number, int nDigits ) {
- String s = String.valueOf(number);
- for( int i=s.length(); i<nDigits; i++ )
- out.append('0');
- out.append(s);
- }
- @Override
- public QName getTypeName(XMLGregorianCalendar cal) {
- return cal.getXMLSchemaType();
- }
- });
-
- ArrayList<RuntimeBuiltinLeafInfoImpl<?>> primaryList = new ArrayList<RuntimeBuiltinLeafInfoImpl<?>>();
-
- /*
- primary bindings
- */
- primaryList.add(STRING);
- primaryList.add(new StringImpl<Boolean>(Boolean.class,
- createXS("boolean")
- ) {
- public Boolean parse(CharSequence text) {
- return DatatypeConverterImpl._parseBoolean(text);
- }
-
- public String print(Boolean v) {
- return v.toString();
- }
- });
- primaryList.add(new PcdataImpl<byte[]>(byte[].class,
- createXS("base64Binary"),
- createXS("hexBinary")
- ) {
- public byte[] parse(CharSequence text) {
- return decodeBase64(text);
- }
-
- public Base64Data print(byte[] v) {
- XMLSerializer w = XMLSerializer.getInstance();
- Base64Data bd = new Base64Data();
- String mimeType = w.getXMIMEContentType();
- bd.set(v,mimeType);
- return bd;
- }
- });
- primaryList.add(new StringImpl<Byte>(Byte.class,
- createXS("byte")
- ) {
- public Byte parse(CharSequence text) {
- return DatatypeConverterImpl._parseByte(text);
- }
-
- public String print(Byte v) {
- return DatatypeConverterImpl._printByte(v);
- }
- });
- primaryList.add(new StringImpl<Short>(Short.class,
- createXS("short"),
- createXS("unsignedByte")
- ) {
- public Short parse(CharSequence text) {
- return DatatypeConverterImpl._parseShort(text);
- }
-
- public String print(Short v) {
- return DatatypeConverterImpl._printShort(v);
- }
- });
- primaryList.add(new StringImpl<Integer>(Integer.class,
- createXS("int"),
- createXS("unsignedShort")
- ) {
- public Integer parse(CharSequence text) {
- return DatatypeConverterImpl._parseInt(text);
- }
-
- public String print(Integer v) {
- return DatatypeConverterImpl._printInt(v);
- }
- });
- primaryList.add(
- new StringImpl<Long>(Long.class,
- createXS("long"),
- createXS("unsignedInt")
- ) {
- public Long parse(CharSequence text) {
- return DatatypeConverterImpl._parseLong(text);
- }
-
- public String print(Long v) {
- return DatatypeConverterImpl._printLong(v);
- }
- });
- primaryList.add(
- new StringImpl<Float>(Float.class,
- createXS("float")
- ) {
- public Float parse(CharSequence text) {
- return DatatypeConverterImpl._parseFloat(text.toString());
- }
-
- public String print(Float v) {
- return DatatypeConverterImpl._printFloat(v);
- }
- });
- primaryList.add(
- new StringImpl<Double>(Double.class,
- createXS("double")
- ) {
- public Double parse(CharSequence text) {
- return DatatypeConverterImpl._parseDouble(text);
- }
-
- public String print(Double v) {
- return DatatypeConverterImpl._printDouble(v);
- }
- });
- primaryList.add(
- new StringImpl<BigInteger>(BigInteger.class,
- createXS("integer"),
- createXS("positiveInteger"),
- createXS("negativeInteger"),
- createXS("nonPositiveInteger"),
- createXS("nonNegativeInteger"),
- createXS("unsignedLong")
- ) {
- public BigInteger parse(CharSequence text) {
- return DatatypeConverterImpl._parseInteger(text);
- }
-
- public String print(BigInteger v) {
- return DatatypeConverterImpl._printInteger(v);
- }
- });
- primaryList.add(
- new StringImpl<BigDecimal>(BigDecimal.class,
- createXS("decimal")
- ) {
- public BigDecimal parse(CharSequence text) {
- return DatatypeConverterImpl._parseDecimal(text.toString());
- }
-
- public String print(BigDecimal v) {
- return DatatypeConverterImpl._printDecimal(v);
- }
- }
- );
- primaryList.add(
- new StringImpl<QName>(QName.class,
- createXS("QName")
- ) {
- public QName parse(CharSequence text) throws SAXException {
- try {
- return DatatypeConverterImpl._parseQName(text.toString(),UnmarshallingContext.getInstance());
- } catch (IllegalArgumentException e) {
- UnmarshallingContext.getInstance().handleError(e);
- return null;
- }
- }
-
- public String print(QName v) {
- return DatatypeConverterImpl._printQName(v,XMLSerializer.getInstance().getNamespaceContext());
- }
-
- @Override
- public boolean useNamespace() {
- return true;
- }
-
- @Override
- public void declareNamespace(QName v, XMLSerializer w) {
- w.getNamespaceContext().declareNamespace(v.getNamespaceURI(),v.getPrefix(),false);
- }
- });
- if (MAP_ANYURI_TO_URI_VALUE != null) {
- primaryList.add(
- new StringImpl<URI>(URI.class, createXS("anyURI")) {
- public URI parse(CharSequence text) throws SAXException {
- try {
- return new URI(text.toString());
- } catch (URISyntaxException e) {
- UnmarshallingContext.getInstance().handleError(e);
- return null;
- }
- }
-
- public String print(URI v) {
- return v.toString();
- }
- });
- }
- primaryList.add(
- new StringImpl<Duration>(Duration.class, createXS("duration")) {
- public String print(Duration duration) {
- return duration.toString();
- }
-
- public Duration parse(CharSequence lexical) {
- TODO.checkSpec("JSR222 Issue #42");
- return DatatypeConverterImpl.getDatatypeFactory().newDuration(lexical.toString());
- }
- }
- );
- primaryList.add(
- new StringImpl<Void>(Void.class) {
- // 'void' binding isn't defined by the spec, but when the JAX-RPC processes user-defined
- // methods like "int actionFoo()", they need this pseudo-void property.
-
- public String print(Void value) {
- return "";
- }
-
- public Void parse(CharSequence lexical) {
- return null;
- }
- });
-
- List<RuntimeBuiltinLeafInfoImpl<?>> l = new ArrayList<RuntimeBuiltinLeafInfoImpl<?>>(secondaryList.size()+primaryList.size()+1);
- l.addAll(secondaryList);
-
- // UUID may fail to load if we are running on JDK 1.4. Handle gracefully
- try {
- l.add(new UUIDImpl());
- } catch (LinkageError e) {
- // ignore
- }
-
- l.addAll(primaryList);
-
- builtinBeanInfos = Collections.unmodifiableList(l);
- }
-
- private static byte[] decodeBase64(CharSequence text) {
- if (text instanceof Base64Data) {
- Base64Data base64Data = (Base64Data) text;
- return base64Data.getExact();
- } else {
- return DatatypeConverterImpl._parseBase64Binary(text.toString());
- }
- }
-
- private static void checkXmlGregorianCalendarFieldRef(QName type,
- XMLGregorianCalendar cal)throws javax.xml.bind.MarshalException{
- StringBuilder buf = new StringBuilder();
- int bitField = xmlGregorianCalendarFieldRef.get(type);
- final int l = 0x1;
- int pos = 0;
- while (bitField != 0x0){
- int bit = bitField & l;
- bitField >>>= 4;
- pos++;
-
- if (bit == 1) {
- switch(pos){
- case 1:
- if (cal.getSecond() == DatatypeConstants.FIELD_UNDEFINED){
- buf.append(" ").append(Messages.XMLGREGORIANCALENDAR_SEC);
- }
- break;
- case 2:
- if (cal.getMinute() == DatatypeConstants.FIELD_UNDEFINED){
- buf.append(" ").append(Messages.XMLGREGORIANCALENDAR_MIN);
- }
- break;
- case 3:
- if (cal.getHour() == DatatypeConstants.FIELD_UNDEFINED){
- buf.append(" ").append(Messages.XMLGREGORIANCALENDAR_HR);
- }
- break;
- case 4:
- if (cal.getDay() == DatatypeConstants.FIELD_UNDEFINED){
- buf.append(" ").append(Messages.XMLGREGORIANCALENDAR_DAY);
- }
- break;
- case 5:
- if (cal.getMonth() == DatatypeConstants.FIELD_UNDEFINED){
- buf.append(" ").append(Messages.XMLGREGORIANCALENDAR_MONTH);
- }
- break;
- case 6:
- if (cal.getYear() == DatatypeConstants.FIELD_UNDEFINED){
- buf.append(" ").append(Messages.XMLGREGORIANCALENDAR_YEAR);
- }
- break;
- case 7: // ignore timezone setting
- break;
- }
- }
- }
- if (buf.length() > 0){
- throw new javax.xml.bind.MarshalException(
- Messages.XMLGREGORIANCALENDAR_INVALID.format(type.getLocalPart())
- + buf.toString());
- }
- }
-
- /**
- * Format string for the {@link XMLGregorianCalendar}.
- */
- private static final Map<QName,String> xmlGregorianCalendarFormatString = new HashMap<QName, String>();
-
- static {
- Map<QName,String> m = xmlGregorianCalendarFormatString;
- // See 4971612: be careful for SCCS substitution
- m.put(DatatypeConstants.DATETIME, "%Y-%M-%DT%h:%m:%s"+ "%z");
- m.put(DatatypeConstants.DATE, "%Y-%M-%D" +"%z");
- m.put(DatatypeConstants.TIME, "%h:%m:%s"+ "%z");
- m.put(DatatypeConstants.GMONTH, "--%M--%z");
- m.put(DatatypeConstants.GDAY, "---%D" + "%z");
- m.put(DatatypeConstants.GYEAR, "%Y" + "%z");
- m.put(DatatypeConstants.GYEARMONTH, "%Y-%M" + "%z");
- m.put(DatatypeConstants.GMONTHDAY, "--%M-%D" +"%z");
- }
-
- /**
- * Field designations for XMLGregorianCalendar format string.
- * sec 0x0000001
- * min 0x0000010
- * hrs 0x0000100
- * day 0x0001000
- * month 0x0010000
- * year 0x0100000
- * timezone 0x1000000
- */
- private static final Map<QName, Integer> xmlGregorianCalendarFieldRef =
- new HashMap<QName, Integer>();
- static {
- Map<QName, Integer> f = xmlGregorianCalendarFieldRef;
- f.put(DatatypeConstants.DATETIME, 0x1111111);
- f.put(DatatypeConstants.DATE, 0x1111000);
- f.put(DatatypeConstants.TIME, 0x1000111);
- f.put(DatatypeConstants.GDAY, 0x1001000);
- f.put(DatatypeConstants.GMONTH, 0x1010000);
- f.put(DatatypeConstants.GYEAR, 0x1100000);
- f.put(DatatypeConstants.GYEARMONTH, 0x1110000);
- f.put(DatatypeConstants.GMONTHDAY, 0x1011000);
- }
-
- /**
- * {@link RuntimeBuiltinLeafInfoImpl} for {@link UUID}.
- *
- * This class is given a name so that failing to load this class won't cause a fatal problem.
- */
- private static class UUIDImpl extends StringImpl<UUID> {
- public UUIDImpl() {
- super(UUID.class, RuntimeBuiltinLeafInfoImpl.createXS("string"));
- }
-
- public UUID parse(CharSequence text) throws SAXException {
- TODO.checkSpec("JSR222 Issue #42");
- try {
- return UUID.fromString(WhiteSpaceProcessor.trim(text).toString());
- } catch (IllegalArgumentException e) {
- UnmarshallingContext.getInstance().handleError(e);
- return null;
- }
- }
-
- public String print(UUID v) {
- return v.toString();
- }
- }
-
- private static class StringImplImpl extends StringImpl<String> {
-
- public StringImplImpl(Class type, QName[] typeNames) {
- super(type, typeNames);
- }
-
- public String parse(CharSequence text) {
- return text.toString();
- }
-
- public String print(String s) {
- return s;
- }
-
- @Override
- public final void writeText(XMLSerializer w, String o, String fieldName) throws IOException, SAXException, XMLStreamException {
- w.text(o, fieldName);
- }
-
- @Override
- public final void writeLeafElement(XMLSerializer w, Name tagName, String o, String fieldName) throws IOException, SAXException, XMLStreamException {
- w.leafElement(tagName, o, fieldName);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeClassInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeClassInfoImpl.java
deleted file mode 100644
index 57bd79ea..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeClassInfoImpl.java
+++ /dev/null
@@ -1,403 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.io.IOException;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.Type;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.AccessorFactory;
-import com.sun.xml.internal.bind.AccessorFactoryImpl;
-import com.sun.xml.internal.bind.InternalAccessorFactory;
-import com.sun.xml.internal.bind.XmlAccessorFactory;
-import com.sun.xml.internal.bind.annotation.XmlLocation;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.ClassFactory;
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeClassInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElement;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeValuePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-import com.sun.xml.internal.bind.v2.runtime.Location;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-class RuntimeClassInfoImpl extends ClassInfoImpl<Type,Class,Field,Method>
- implements RuntimeClassInfo, RuntimeElement {
-
- /**
- * If this class has a property annotated with {@link XmlLocation},
- * this field will get the accessor for it.
- *
- * TODO: support method based XmlLocation
- */
- private Accessor<?,Locator> xmlLocationAccessor;
-
- private AccessorFactory accessorFactory;
-
- private boolean supressAccessorWarnings = false;
-
- public RuntimeClassInfoImpl(RuntimeModelBuilder modelBuilder, Locatable upstream, Class clazz) {
- super(modelBuilder, upstream, clazz);
- accessorFactory = createAccessorFactory(clazz);
- }
-
- protected AccessorFactory createAccessorFactory(Class clazz) {
- XmlAccessorFactory factoryAnn;
- AccessorFactory accFactory = null;
-
- // user providing class to be used.
- JAXBContextImpl context = ((RuntimeModelBuilder) builder).context;
- if (context!=null) {
- this.supressAccessorWarnings = context.supressAccessorWarnings;
- if (context.xmlAccessorFactorySupport) {
- factoryAnn = findXmlAccessorFactoryAnnotation(clazz);
- if (factoryAnn != null) {
- try {
- accFactory = factoryAnn.value().newInstance();
- } catch (InstantiationException e) {
- builder.reportError(new IllegalAnnotationException(
- Messages.ACCESSORFACTORY_INSTANTIATION_EXCEPTION.format(
- factoryAnn.getClass().getName(), nav().getClassName(clazz)), this));
- } catch (IllegalAccessException e) {
- builder.reportError(new IllegalAnnotationException(
- Messages.ACCESSORFACTORY_ACCESS_EXCEPTION.format(
- factoryAnn.getClass().getName(), nav().getClassName(clazz)),this));
- }
- }
- }
- }
-
-
- // Fall back to local AccessorFactory when no
- // user not providing one or as error recovery.
- if (accFactory == null){
- accFactory = AccessorFactoryImpl.getInstance();
- }
- return accFactory;
- }
-
- protected XmlAccessorFactory findXmlAccessorFactoryAnnotation(Class clazz) {
- XmlAccessorFactory factoryAnn = reader().getClassAnnotation(XmlAccessorFactory.class,clazz,this);
- if (factoryAnn == null) {
- factoryAnn = reader().getPackageAnnotation(XmlAccessorFactory.class,clazz,this);
- }
- return factoryAnn;
- }
-
-
- public Method getFactoryMethod(){
- return super.getFactoryMethod();
- }
-
- public final RuntimeClassInfoImpl getBaseClass() {
- return (RuntimeClassInfoImpl)super.getBaseClass();
- }
-
- @Override
- protected ReferencePropertyInfoImpl createReferenceProperty(PropertySeed<Type,Class,Field,Method> seed) {
- return new RuntimeReferencePropertyInfoImpl(this,seed);
- }
-
- @Override
- protected AttributePropertyInfoImpl createAttributeProperty(PropertySeed<Type,Class,Field,Method> seed) {
- return new RuntimeAttributePropertyInfoImpl(this,seed);
- }
-
- @Override
- protected ValuePropertyInfoImpl createValueProperty(PropertySeed<Type,Class,Field,Method> seed) {
- return new RuntimeValuePropertyInfoImpl(this,seed);
- }
-
- @Override
- protected ElementPropertyInfoImpl createElementProperty(PropertySeed<Type,Class,Field,Method> seed) {
- return new RuntimeElementPropertyInfoImpl(this,seed);
- }
-
- @Override
- protected MapPropertyInfoImpl createMapProperty(PropertySeed<Type,Class,Field,Method> seed) {
- return new RuntimeMapPropertyInfoImpl(this,seed);
- }
-
-
- @Override
- public List<? extends RuntimePropertyInfo> getProperties() {
- return (List<? extends RuntimePropertyInfo>)super.getProperties();
- }
-
- @Override
- public RuntimePropertyInfo getProperty(String name) {
- return (RuntimePropertyInfo)super.getProperty(name);
- }
-
-
- public void link() {
- getTransducer(); // populate the transducer
- super.link();
- }
-
- private Accessor<?,Map<QName,String>> attributeWildcardAccessor;
-
- public <B> Accessor<B,Map<QName,String>> getAttributeWildcard() {
- for( RuntimeClassInfoImpl c=this; c!=null; c=c.getBaseClass() ) {
- if(c.attributeWildcard!=null) {
- if(c.attributeWildcardAccessor==null)
- c.attributeWildcardAccessor = c.createAttributeWildcardAccessor();
- return (Accessor<B,Map<QName,String>>)c.attributeWildcardAccessor;
- }
- }
- return null;
- }
-
- private boolean computedTransducer = false;
- private Transducer xducer = null;
-
- public Transducer getTransducer() {
- if(!computedTransducer) {
- computedTransducer = true;
- xducer = calcTransducer();
- }
- return xducer;
- }
-
- /**
- * Creates a transducer if this class is bound to a text in XML.
- */
- private Transducer calcTransducer() {
- RuntimeValuePropertyInfo valuep=null;
- if(hasAttributeWildcard())
- return null; // has attribute wildcard. Can't be handled as a leaf
- for (RuntimeClassInfoImpl ci = this; ci != null; ci = ci.getBaseClass()) {
- for( RuntimePropertyInfo pi : ci.getProperties() )
- if(pi.kind()==PropertyKind.VALUE) {
- valuep = (RuntimeValuePropertyInfo)pi;
- } else {
- // this bean has something other than a value
- return null;
- }
- }
- if(valuep==null)
- return null;
- if( !valuep.getTarget().isSimpleType() )
- return null; // if there's an error, recover from it by returning null.
-
- return new TransducerImpl(getClazz(),TransducedAccessor.get(
- ((RuntimeModelBuilder)builder).context,valuep));
- }
-
- /**
- * Creates
- */
- private Accessor<?,Map<QName,String>> createAttributeWildcardAccessor() {
- assert attributeWildcard!=null;
- return ((RuntimePropertySeed)attributeWildcard).getAccessor();
- }
-
- @Override
- protected RuntimePropertySeed createFieldSeed(Field field) {
- final boolean readOnly = Modifier.isStatic(field.getModifiers());
- Accessor acc;
- try {
- if (supressAccessorWarnings) {
- acc = ((InternalAccessorFactory)accessorFactory).createFieldAccessor(clazz, field, readOnly, supressAccessorWarnings);
- } else {
- acc = accessorFactory.createFieldAccessor(clazz, field, readOnly);
- }
- } catch(JAXBException e) {
- builder.reportError(new IllegalAnnotationException(
- Messages.CUSTOM_ACCESSORFACTORY_FIELD_ERROR.format(
- nav().getClassName(clazz), e.toString()), this ));
- acc = Accessor.getErrorInstance(); // error recovery
- }
- return new RuntimePropertySeed(super.createFieldSeed(field), acc );
- }
-
- @Override
- public RuntimePropertySeed createAccessorSeed(Method getter, Method setter) {
- Accessor acc;
- try {
- acc = accessorFactory.createPropertyAccessor(clazz, getter, setter);
- } catch(JAXBException e) {
- builder.reportError(new IllegalAnnotationException(
- Messages.CUSTOM_ACCESSORFACTORY_PROPERTY_ERROR.format(
- nav().getClassName(clazz), e.toString()), this ));
- acc = Accessor.getErrorInstance(); // error recovery
- }
- return new RuntimePropertySeed( super.createAccessorSeed(getter,setter),
- acc );
- }
-
- @Override
- protected void checkFieldXmlLocation(Field f) {
- if(reader().hasFieldAnnotation(XmlLocation.class,f))
- // TODO: check for XmlLocation signature
- // TODO: check a collision with the super class
- xmlLocationAccessor = new Accessor.FieldReflection<Object,Locator>(f);
- }
-
- public Accessor<?,Locator> getLocatorField() {
- return xmlLocationAccessor;
- }
-
- static final class RuntimePropertySeed implements PropertySeed<Type,Class,Field,Method> {
- /**
- * @see #getAccessor()
- */
- private final Accessor acc;
-
- private final PropertySeed<Type,Class,Field,Method> core;
-
- public RuntimePropertySeed(PropertySeed<Type,Class,Field,Method> core, Accessor acc) {
- this.core = core;
- this.acc = acc;
- }
-
- public String getName() {
- return core.getName();
- }
-
- public <A extends Annotation> A readAnnotation(Class<A> annotationType) {
- return core.readAnnotation(annotationType);
- }
-
- public boolean hasAnnotation(Class<? extends Annotation> annotationType) {
- return core.hasAnnotation(annotationType);
- }
-
- public Type getRawType() {
- return core.getRawType();
- }
-
- public Location getLocation() {
- return core.getLocation();
- }
-
- public Locatable getUpstream() {
- return core.getUpstream();
- }
-
- public Accessor getAccessor() {
- return acc;
- }
- }
-
-
-
- /**
- * {@link Transducer} implementation used when this class maps to PCDATA in XML.
- *
- * TODO: revisit the exception handling
- */
- private static final class TransducerImpl<BeanT> implements Transducer<BeanT> {
- private final TransducedAccessor<BeanT> xacc;
- private final Class<BeanT> ownerClass;
-
- public TransducerImpl(Class<BeanT> ownerClass,TransducedAccessor<BeanT> xacc) {
- this.xacc = xacc;
- this.ownerClass = ownerClass;
- }
-
- public boolean useNamespace() {
- return xacc.useNamespace();
- }
-
- public boolean isDefault() {
- return false;
- }
-
- public void declareNamespace(BeanT bean, XMLSerializer w) throws AccessorException {
- try {
- xacc.declareNamespace(bean,w);
- } catch (SAXException e) {
- throw new AccessorException(e);
- }
- }
-
- public @NotNull CharSequence print(BeanT o) throws AccessorException {
- try {
- CharSequence value = xacc.print(o);
- if(value==null)
- throw new AccessorException(Messages.THERE_MUST_BE_VALUE_IN_XMLVALUE.format(o));
- return value;
- } catch (SAXException e) {
- throw new AccessorException(e);
- }
- }
-
- public BeanT parse(CharSequence lexical) throws AccessorException, SAXException {
- UnmarshallingContext ctxt = UnmarshallingContext.getInstance();
- BeanT inst;
- if(ctxt!=null)
- inst = (BeanT)ctxt.createInstance(ownerClass);
- else
- // when this runs for parsing enum constants,
- // there's no UnmarshallingContext.
- inst = ClassFactory.create(ownerClass);
-
- xacc.parse(inst,lexical);
- return inst;
- }
-
- public void writeText(XMLSerializer w, BeanT o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- if(!xacc.hasValue(o))
- throw new AccessorException(Messages.THERE_MUST_BE_VALUE_IN_XMLVALUE.format(o));
- xacc.writeText(w,o,fieldName);
- }
-
- public void writeLeafElement(XMLSerializer w, Name tagName, BeanT o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- if(!xacc.hasValue(o))
- throw new AccessorException(Messages.THERE_MUST_BE_VALUE_IN_XMLVALUE.format(o));
- xacc.writeLeafElement(w,tagName,o,fieldName);
- }
-
- public QName getTypeName(BeanT instance) {
- return null;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java
deleted file mode 100644
index 9bc98962..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-import com.sun.xml.internal.bind.v2.model.core.Adapter;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeClassInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class RuntimeElementInfoImpl extends ElementInfoImpl<Type,Class,Field,Method>
- implements RuntimeElementInfo {
-
- public RuntimeElementInfoImpl(RuntimeModelBuilder modelBuilder, RegistryInfoImpl registry, Method method) throws IllegalAnnotationException {
- super(modelBuilder, registry, method);
-
- Adapter<Type,Class> a = getProperty().getAdapter();
-
- if(a!=null)
- adapterType = a.adapterType;
- else
- adapterType = null;
- }
-
- @Override
- protected PropertyImpl createPropertyImpl() {
- return new RuntimePropertyImpl();
- }
-
- class RuntimePropertyImpl extends PropertyImpl implements RuntimeElementPropertyInfo, RuntimeTypeRef {
- public Accessor getAccessor() {
- if(adapterType==null)
- return Accessor.JAXB_ELEMENT_VALUE;
- else
- return Accessor.JAXB_ELEMENT_VALUE.adapt(
- (Class)getAdapter().defaultType,(Class)adapterType);
- }
-
- public Type getRawType() {
- return Collection.class;
- }
-
- public Type getIndividualType() {
- return getContentType().getType();
- }
-
-
- public boolean elementOnlyContent() {
- return false; // this method doesn't make sense here
- }
-
- public List<? extends RuntimeTypeRef> getTypes() {
- return Collections.singletonList(this);
- }
-
- public List<? extends RuntimeNonElement> ref() {
- return (List<? extends RuntimeNonElement>)super.ref();
- }
-
- public RuntimeNonElement getTarget() {
- return (RuntimeNonElement)super.getTarget();
- }
-
- public RuntimePropertyInfo getSource() {
- return this;
- }
-
- public Transducer getTransducer() {
- return RuntimeModelBuilder.createTransducer(this);
- }
- }
-
- /**
- * The adapter specified by <code>getProperty().getAdapter()</code>.
- */
- private final Class<? extends XmlAdapter> adapterType;
-
- public RuntimeElementPropertyInfo getProperty() {
- return (RuntimeElementPropertyInfo)super.getProperty();
- }
-
- public Class<? extends JAXBElement> getType() {
- //noinspection unchecked
- return (Class<? extends JAXBElement>) Utils.REFLECTION_NAVIGATOR.erasure(super.getType());
- }
-
- public RuntimeClassInfo getScope() {
- return (RuntimeClassInfo)super.getScope();
- }
-
- public RuntimeNonElement getContentType() {
- return (RuntimeNonElement)super.getContentType();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementPropertyInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementPropertyInfoImpl.java
deleted file mode 100644
index f17587ed..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementPropertyInfoImpl.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfo;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class RuntimeElementPropertyInfoImpl extends ElementPropertyInfoImpl<Type,Class,Field,Method>
- implements RuntimeElementPropertyInfo {
-
- private final Accessor acc;
-
- RuntimeElementPropertyInfoImpl(RuntimeClassInfoImpl classInfo, PropertySeed<Type,Class,Field,Method> seed) {
- super(classInfo, seed);
- Accessor rawAcc = ((RuntimeClassInfoImpl.RuntimePropertySeed)seed).getAccessor();
- if(getAdapter()!=null && !isCollection())
- // adapter for a single-value property is handled by accessor.
- // adapter for a collection property is handled by lister.
- rawAcc = rawAcc.adapt(getAdapter());
- this.acc = rawAcc;
- }
-
- public Accessor getAccessor() {
- return acc;
- }
-
- public boolean elementOnlyContent() {
- return true;
- }
-
- public List<? extends RuntimeTypeInfo> ref() {
- return (List<? extends RuntimeTypeInfo>)super.ref();
- }
-
- @Override
- protected RuntimeTypeRefImpl createTypeRef(QName name, Type type, boolean isNillable, String defaultValue) {
- return new RuntimeTypeRefImpl(this,name,type,isNillable,defaultValue);
- }
-
- public List<RuntimeTypeRefImpl> getTypes() {
- return (List<RuntimeTypeRefImpl>)super.getTypes();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeEnumConstantImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeEnumConstantImpl.java
deleted file mode 100644
index 9e5e2c69..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeEnumConstantImpl.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class RuntimeEnumConstantImpl extends EnumConstantImpl<Type,Class,Field,Method> {
- public RuntimeEnumConstantImpl(
- RuntimeEnumLeafInfoImpl owner, String name, String lexical,
- EnumConstantImpl<Type,Class,Field,Method> next) {
- super(owner, name, lexical, next);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeEnumLeafInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeEnumLeafInfoImpl.java
deleted file mode 100644
index bab3d2fe..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeEnumLeafInfoImpl.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.annotation.FieldLocatable;
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeEnumLeafInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-import org.xml.sax.SAXException;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class RuntimeEnumLeafInfoImpl<T extends Enum<T>,B> extends EnumLeafInfoImpl<Type,Class,Field,Method>
- implements RuntimeEnumLeafInfo, Transducer<T> {
-
- public Transducer<T> getTransducer() {
- return this;
- }
-
- /**
- * {@link Transducer} that knows how to convert a lexical value
- * into the Java value that we can handle.
- */
- private final Transducer<B> baseXducer;
-
- private final Map<B,T> parseMap = new HashMap<B,T>();
- private final Map<T,B> printMap;
-
- RuntimeEnumLeafInfoImpl(RuntimeModelBuilder builder, Locatable upstream, Class<T> enumType) {
- super(builder,upstream,enumType,enumType);
- this.printMap = new EnumMap<T,B>(enumType);
-
- baseXducer = ((RuntimeNonElement)baseType).getTransducer();
- }
-
- @Override
- public RuntimeEnumConstantImpl createEnumConstant(String name, String literal, Field constant, EnumConstantImpl<Type,Class,Field,Method> last) {
- T t;
- try {
- try {
- constant.setAccessible(true);
- } catch (SecurityException e) {
- // in case the constant is already accessible, swallow this error.
- // if the constant is indeed not accessible, we will get IllegalAccessException
- // in the following line, and that is not too late.
- }
- t = (T)constant.get(null);
- } catch (IllegalAccessException e) {
- // impossible, because this is an enum constant
- throw new IllegalAccessError(e.getMessage());
- }
-
- B b = null;
- try {
- b = baseXducer.parse(literal);
- } catch (Exception e) {
- builder.reportError(new IllegalAnnotationException(
- Messages.INVALID_XML_ENUM_VALUE.format(literal,baseType.getType().toString()), e,
- new FieldLocatable<Field>(this,constant,nav()) ));
- }
-
- parseMap.put(b,t);
- printMap.put(t,b);
-
- return new RuntimeEnumConstantImpl(this, name, literal, last);
- }
-
- public QName[] getTypeNames() {
- return new QName[]{getTypeName()};
- }
-
- public boolean isDefault() {
- return false;
- }
-
- @Override
- public Class getClazz() {
- return clazz;
- }
-
- public boolean useNamespace() {
- return baseXducer.useNamespace();
- }
-
- public void declareNamespace(T t, XMLSerializer w) throws AccessorException {
- baseXducer.declareNamespace(printMap.get(t),w);
- }
-
- public CharSequence print(T t) throws AccessorException {
- return baseXducer.print(printMap.get(t));
- }
-
- public T parse(CharSequence lexical) throws AccessorException, SAXException {
- // TODO: error handling
-
- B b = baseXducer.parse(lexical);
-
- if (tokenStringType) {
- b = (B) ((String)b).trim();
- }
-
- return parseMap.get(b);
- }
-
- public void writeText(XMLSerializer w, T t, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- baseXducer.writeText(w,printMap.get(t),fieldName);
- }
-
- public void writeLeafElement(XMLSerializer w, Name tagName, T o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- baseXducer.writeLeafElement(w,tagName,printMap.get(o),fieldName);
- }
-
- public QName getTypeName(T instance) {
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeMapPropertyInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeMapPropertyInfoImpl.java
deleted file mode 100644
index 68cffb7f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeMapPropertyInfoImpl.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.List;
-
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeMapPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfo;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class RuntimeMapPropertyInfoImpl extends MapPropertyInfoImpl<Type,Class,Field,Method> implements RuntimeMapPropertyInfo {
- private final Accessor acc;
-
- RuntimeMapPropertyInfoImpl(RuntimeClassInfoImpl classInfo, PropertySeed<Type,Class,Field,Method> seed) {
- super(classInfo, seed);
- this.acc = ((RuntimeClassInfoImpl.RuntimePropertySeed)seed).getAccessor();
- }
-
- public Accessor getAccessor() {
- return acc;
- }
-
- public boolean elementOnlyContent() {
- return true;
- }
-
- public RuntimeNonElement getKeyType() {
- return (RuntimeNonElement)super.getKeyType();
- }
-
- public RuntimeNonElement getValueType() {
- return (RuntimeNonElement)super.getValueType();
- }
-
- public List<? extends RuntimeTypeInfo> ref() {
- return (List<? extends RuntimeTypeInfo>)super.ref();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java
deleted file mode 100644
index a1a9c4dc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.Map;
-
-import javax.activation.MimeType;
-
-import com.sun.xml.internal.bind.WhiteSpaceProcessor;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElementRef;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet;
-import com.sun.xml.internal.bind.v2.runtime.FilterTransducer;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-import com.sun.xml.internal.bind.v2.runtime.InlineBinaryTransducer;
-import com.sun.xml.internal.bind.v2.runtime.MimeTypedTransducer;
-import com.sun.xml.internal.bind.v2.runtime.SchemaTypeTransducer;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-import com.sun.istack.internal.Nullable;
-
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import javax.xml.namespace.QName;
-import org.xml.sax.SAXException;
-
-/**
- * {@link ModelBuilder} that works at the run-time by using
- * the {@code java.lang.reflect} package.
- *
- * <p>
- * This extends {@link ModelBuilder} by providing more functionalities such
- * as accessing the fields and classes.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class RuntimeModelBuilder extends ModelBuilder<Type,Class,Field,Method> {
- /**
- * The {@link JAXBContextImpl} for which the model is built.
- * Null when created for reflection.
- */
- public final @Nullable JAXBContextImpl context;
-
- public RuntimeModelBuilder(JAXBContextImpl context, RuntimeAnnotationReader annotationReader, Map<Class, Class> subclassReplacements, String defaultNamespaceRemap) {
- super(annotationReader, Utils.REFLECTION_NAVIGATOR, subclassReplacements, defaultNamespaceRemap);
- this.context = context;
- }
-
- @Override
- public RuntimeNonElement getClassInfo( Class clazz, Locatable upstream ) {
- return (RuntimeNonElement)super.getClassInfo(clazz,upstream);
- }
-
- @Override
- public RuntimeNonElement getClassInfo( Class clazz, boolean searchForSuperClass, Locatable upstream ) {
- return (RuntimeNonElement)super.getClassInfo(clazz,searchForSuperClass,upstream);
- }
-
- @Override
- protected RuntimeEnumLeafInfoImpl createEnumLeafInfo(Class clazz, Locatable upstream) {
- return new RuntimeEnumLeafInfoImpl(this,upstream,clazz);
- }
-
- @Override
- protected RuntimeClassInfoImpl createClassInfo( Class clazz, Locatable upstream ) {
- return new RuntimeClassInfoImpl(this,upstream,clazz);
- }
-
- @Override
- public RuntimeElementInfoImpl createElementInfo(RegistryInfoImpl<Type,Class,Field,Method> registryInfo, Method method) throws IllegalAnnotationException {
- return new RuntimeElementInfoImpl(this,registryInfo, method);
- }
-
- @Override
- public RuntimeArrayInfoImpl createArrayInfo(Locatable upstream, Type arrayType) {
- return new RuntimeArrayInfoImpl(this, upstream, (Class)arrayType);
- }
-
- @Override
- protected RuntimeTypeInfoSetImpl createTypeInfoSet() {
- return new RuntimeTypeInfoSetImpl(reader);
- }
-
- @Override
- public RuntimeTypeInfoSet link() {
- return (RuntimeTypeInfoSet)super.link();
- }
-
- /**
- * Creates a {@link Transducer} given a reference.
- *
- * Used to implement {@link RuntimeNonElementRef#getTransducer()}.
- * Shouldn't be called from anywhere else.
- *
- * TODO: this is not the proper place for this class to be in.
- */
- public static Transducer createTransducer(RuntimeNonElementRef ref) {
- Transducer t = ref.getTarget().getTransducer();
- RuntimePropertyInfo src = ref.getSource();
- ID id = src.id();
-
- if(id==ID.IDREF)
- return RuntimeBuiltinLeafInfoImpl.STRING;
-
- if(id==ID.ID)
- t = new IDTransducerImpl(t);
-
- MimeType emt = src.getExpectedMimeType();
- if(emt!=null)
- t = new MimeTypedTransducer(t,emt);
-
- if(src.inlineBinaryData())
- t = new InlineBinaryTransducer(t);
-
- if(src.getSchemaType()!=null) {
- if (src.getSchemaType().equals(createXSSimpleType())) {
- return RuntimeBuiltinLeafInfoImpl.STRING;
- }
- t = new SchemaTypeTransducer(t,src.getSchemaType());
- }
-
- return t;
- }
-
- private static QName createXSSimpleType() {
- return new QName(WellKnownNamespace.XML_SCHEMA,"anySimpleType");
- }
-
- /**
- * Transducer implementation for ID.
- *
- * This transducer wraps another {@link Transducer} and adds
- * handling for ID.
- */
- private static final class IDTransducerImpl<ValueT> extends FilterTransducer<ValueT> {
- public IDTransducerImpl(Transducer<ValueT> core) {
- super(core);
- }
-
- @Override
- public ValueT parse(CharSequence lexical) throws AccessorException, SAXException {
- String value = WhiteSpaceProcessor.trim(lexical).toString();
- UnmarshallingContext.getInstance().addToIdTable(value);
- return core.parse(value);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeReferencePropertyInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeReferencePropertyInfoImpl.java
deleted file mode 100644
index eab9ac6a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeReferencePropertyInfoImpl.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.Set;
-
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElement;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeReferencePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class RuntimeReferencePropertyInfoImpl extends ReferencePropertyInfoImpl<Type,Class,Field,Method>
- implements RuntimeReferencePropertyInfo {
-
- private final Accessor acc;
-
- public RuntimeReferencePropertyInfoImpl(RuntimeClassInfoImpl classInfo, PropertySeed<Type,Class,Field,Method> seed) {
- super(classInfo,seed);
- Accessor rawAcc = ((RuntimeClassInfoImpl.RuntimePropertySeed)seed).getAccessor();
- if(getAdapter()!=null && !isCollection())
- // adapter for a single-value property is handled by accessor.
- // adapter for a collection property is handled by lister.
- rawAcc = rawAcc.adapt(getAdapter());
- this.acc = rawAcc;
- }
-
- public Set<? extends RuntimeElement> getElements() {
- return (Set<? extends RuntimeElement>)super.getElements();
- }
-
- public Set<? extends RuntimeElement> ref() {
- return (Set<? extends RuntimeElement>)super.ref();
- }
-
- public Accessor getAccessor() {
- return acc;
- }
-
- public boolean elementOnlyContent() {
- return !isMixed();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java
deleted file mode 100644
index 5079a5d8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet;
-
-/**
- * {@link TypeInfoSet} specialized for runtime.
- *
- * @author Kohsuke Kawaguchi
- */
-final class RuntimeTypeInfoSetImpl extends TypeInfoSetImpl<Type,Class,Field,Method> implements RuntimeTypeInfoSet {
- public RuntimeTypeInfoSetImpl(AnnotationReader<Type,Class,Field,Method> reader) {
- super(Utils.REFLECTION_NAVIGATOR,reader,RuntimeBuiltinLeafInfoImpl.LEAVES);
- }
-
- @Override
- protected RuntimeNonElement createAnyType() {
- return RuntimeAnyTypeImpl.theInstance;
- }
-
- public RuntimeNonElement getTypeInfo( Type type ) {
- return (RuntimeNonElement)super.getTypeInfo(type);
- }
-
- public RuntimeNonElement getAnyTypeInfo() {
- return (RuntimeNonElement)super.getAnyTypeInfo();
- }
-
- public RuntimeNonElement getClassInfo(Class clazz) {
- return (RuntimeNonElement)super.getClassInfo(clazz);
- }
-
- public Map<Class,RuntimeClassInfoImpl> beans() {
- return (Map<Class,RuntimeClassInfoImpl>)super.beans();
- }
-
- public Map<Type,RuntimeBuiltinLeafInfoImpl<?>> builtins() {
- return (Map<Type,RuntimeBuiltinLeafInfoImpl<?>>)super.builtins();
- }
-
- public Map<Class,RuntimeEnumLeafInfoImpl<?,?>> enums() {
- return (Map<Class,RuntimeEnumLeafInfoImpl<?,?>>)super.enums();
- }
-
- public Map<Class,RuntimeArrayInfoImpl> arrays() {
- return (Map<Class,RuntimeArrayInfoImpl>)super.arrays();
- }
-
- public RuntimeElementInfoImpl getElementInfo(Class scope,QName name) {
- return (RuntimeElementInfoImpl)super.getElementInfo(scope,name);
- }
-
- public Map<QName,RuntimeElementInfoImpl> getElementMappings(Class scope) {
- return (Map<QName,RuntimeElementInfoImpl>)super.getElementMappings(scope);
- }
-
- public Iterable<RuntimeElementInfoImpl> getAllElements() {
- return (Iterable<RuntimeElementInfoImpl>)super.getAllElements();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeRefImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeRefImpl.java
deleted file mode 100644
index ebbde652..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeRefImpl.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.reflect.Type;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class RuntimeTypeRefImpl extends TypeRefImpl<Type,Class> implements RuntimeTypeRef {
-
- public RuntimeTypeRefImpl(RuntimeElementPropertyInfoImpl elementPropertyInfo, QName elementName, Type type, boolean isNillable, String defaultValue) {
- super(elementPropertyInfo, elementName, type, isNillable, defaultValue);
- }
-
- public RuntimeNonElement getTarget() {
- return (RuntimeNonElement)super.getTarget();
- }
-
- public Transducer getTransducer() {
- return RuntimeModelBuilder.createTransducer(this);
- }
-
- public RuntimePropertyInfo getSource() {
- return (RuntimePropertyInfo)owner;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeValuePropertyInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeValuePropertyInfoImpl.java
deleted file mode 100644
index 8d090797..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeValuePropertyInfoImpl.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.List;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeValuePropertyInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class RuntimeValuePropertyInfoImpl extends ValuePropertyInfoImpl<Type,Class,Field,Method>
- implements RuntimeValuePropertyInfo {
-
- RuntimeValuePropertyInfoImpl(RuntimeClassInfoImpl classInfo, PropertySeed<Type,Class,Field,Method> seed) {
- super(classInfo, seed);
- }
-
- public boolean elementOnlyContent() {
- return false;
- }
-
- public RuntimePropertyInfo getSource() {
- return (RuntimePropertyInfo)super.getSource();
- }
-
- public RuntimeNonElement getTarget() {
- return (RuntimeNonElement)super.getTarget();
- }
-
- public List<? extends RuntimeNonElement> ref() {
- return (List<? extends RuntimeNonElement>)super.ref();
- }
-
- public void link() {
- getTransducer();
- super.link();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/SecureLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/SecureLoader.java
deleted file mode 100644
index 6ed823d3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/SecureLoader.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-/**
- * Class defined for safe calls of getClassLoader methods of any kind (context/system/class
- * classloader. This MUST be package private and defined in every package which
- * uses such invocations.
- * @author snajper
- */
-class SecureLoader {
-
- static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/SingleTypePropertyInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/SingleTypePropertyInfoImpl.java
deleted file mode 100644
index 5b35ae2c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/SingleTypePropertyInfoImpl.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.util.Collections;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlList;
-
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElementRef;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * {@link PropertyInfoImpl} that can only have one type.
- *
- * Specifically, {@link AttributePropertyInfoImpl} and {@link ValuePropertyInfoImpl}.
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class SingleTypePropertyInfoImpl<T,C,F,M>
- extends PropertyInfoImpl<T,C,F,M> {
-
- /**
- * Computed lazily.
- *
- * @see {@link #getTarget()}.
- */
- private NonElement<T,C> type;
-
- public SingleTypePropertyInfoImpl(ClassInfoImpl<T,C,F,M> classInfo, PropertySeed<T,C,F,M> seed) {
- super(classInfo, seed);
- if(this instanceof RuntimePropertyInfo) {
- Accessor rawAcc = ((RuntimeClassInfoImpl.RuntimePropertySeed)seed).getAccessor();
- if(getAdapter()!=null && !isCollection())
- // adapter for a single-value property is handled by accessor.
- // adapter for a collection property is handled by lister.
- rawAcc = rawAcc.adapt(((RuntimePropertyInfo)this).getAdapter());
- this.acc = rawAcc;
- } else
- this.acc = null;
- }
-
- public List<? extends NonElement<T,C>> ref() {
- return Collections.singletonList(getTarget());
- }
-
- public NonElement<T,C> getTarget() {
- if(type==null) {
- assert parent.builder!=null : "this method must be called during the build stage";
- type = parent.builder.getTypeInfo(getIndividualType(),this);
- }
- return type;
- }
-
- public PropertyInfo<T,C> getSource() {
- return this;
- }
-
- public void link() {
- super.link();
-
- if (!(NonElement.ANYTYPE_NAME.equals(type.getTypeName()) || type.isSimpleType() || id()==ID.IDREF)) {
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.SIMPLE_TYPE_IS_REQUIRED.format(),
- seed
- ));
- }
-
- if(!isCollection() && seed.hasAnnotation(XmlList.class)) {
- parent.builder.reportError(new IllegalAnnotationException(
- Messages.XMLLIST_ON_SINGLE_PROPERTY.format(), this
- ));
- }
- }
-
-//
-//
-// technically these code belong to runtime implementation, but moving the code up here
-// allows this to be shared between RuntimeValuePropertyInfoImpl and RuntimeAttributePropertyInfoImpl
-//
-//
-
- private final Accessor acc;
- /**
- * Lazily created.
- */
- private Transducer xducer;
-
- public Accessor getAccessor() {
- return acc;
- }
-
-
- public Transducer getTransducer() {
- if(xducer==null) {
- xducer = RuntimeModelBuilder.createTransducer((RuntimeNonElementRef)this);
- if(xducer==null) {
- // this situation is checked by by the link method.
- // avoid repeating the same error by silently recovering
- xducer = RuntimeBuiltinLeafInfoImpl.STRING;
- }
- }
- return xducer;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/TypeInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/TypeInfoImpl.java
deleted file mode 100644
index 74bde945..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/TypeInfoImpl.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSchema;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfo;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-/**
- * Common implementation between {@link ClassInfoImpl} and {@link ElementInfoImpl}.
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class TypeInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
- implements TypeInfo<TypeT,ClassDeclT>, Locatable {
-
- /**
- * The Java class that caused this Java class to be a part of the JAXB processing.
- *
- * null if it's specified explicitly by the user.
- */
- private final Locatable upstream;
-
- /**
- * {@link TypeInfoSet} to which this class belongs.
- */
- protected final TypeInfoSetImpl<TypeT,ClassDeclT,FieldT,MethodT> owner;
-
- /**
- * Reference to the {@link ModelBuilder}, only until we link {@link TypeInfo}s all together,
- * because we don't want to keep {@link ModelBuilder} too long.
- */
- protected ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT> builder;
-
- protected TypeInfoImpl(
- ModelBuilder<TypeT,ClassDeclT,FieldT,MethodT> builder,
- Locatable upstream) {
-
- this.builder = builder;
- this.owner = builder.typeInfoSet;
- this.upstream = upstream;
- }
-
- public Locatable getUpstream() {
- return upstream;
- }
-
- /*package*/ void link() {
- builder = null;
- }
-
- protected final Navigator<TypeT,ClassDeclT,FieldT,MethodT> nav() {
- return owner.nav;
- }
-
- protected final AnnotationReader<TypeT,ClassDeclT,FieldT,MethodT> reader() {
- return owner.reader;
- }
-
- /**
- * Parses an {@link XmlRootElement} annotation on a class
- * and determine the element name.
- *
- * @return null
- * if none was found.
- */
- protected final QName parseElementName(ClassDeclT clazz) {
- XmlRootElement e = reader().getClassAnnotation(XmlRootElement.class,clazz,this);
- if(e==null)
- return null;
-
- String local = e.name();
- if(local.equals("##default")) {
- // if defaulted...
- local = NameConverter.standard.toVariableName(nav().getClassShortName(clazz));
- }
- String nsUri = e.namespace();
- if(nsUri.equals("##default")) {
- // if defaulted ...
- XmlSchema xs = reader().getPackageAnnotation(XmlSchema.class,clazz,this);
- if(xs!=null)
- nsUri = xs.namespace();
- else {
- nsUri = builder.defaultNsUri;
- }
- }
-
- return new QName(nsUri.intern(),local.intern());
- }
-
- protected final QName parseTypeName(ClassDeclT clazz) {
- return parseTypeName( clazz, reader().getClassAnnotation(XmlType.class,clazz,this) );
- }
-
- /**
- * Parses a (potentially-null) {@link XmlType} annotation on a class
- * and determine the actual value.
- *
- * @param clazz
- * The class on which the XmlType annotation is checked.
- * @param t
- * The {@link XmlType} annotation on the clazz. This value
- * is taken as a parameter to improve the performance for the case where
- * 't' is pre-computed.
- */
- protected final QName parseTypeName(ClassDeclT clazz, XmlType t) {
- String nsUri="##default";
- String local="##default";
- if(t!=null) {
- nsUri = t.namespace();
- local = t.name();
- }
-
- if(local.length()==0)
- return null; // anonymous
-
-
- if(local.equals("##default"))
- // if defaulted ...
- local = NameConverter.standard.toVariableName(nav().getClassShortName(clazz));
-
- if(nsUri.equals("##default")) {
- // if defaulted ...
- XmlSchema xs = reader().getPackageAnnotation(XmlSchema.class,clazz,this);
- if(xs!=null)
- nsUri = xs.namespace();
- else {
- nsUri = builder.defaultNsUri;
- }
- }
-
- return new QName(nsUri.intern(),local.intern());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/TypeInfoSetImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/TypeInfoSetImpl.java
deleted file mode 100644
index 93c1ab18..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/TypeInfoSetImpl.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.annotation.XmlNs;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlRegistry;
-import javax.xml.bind.annotation.XmlSchema;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.core.BuiltinLeafInfo;
-import com.sun.xml.internal.bind.v2.model.core.ClassInfo;
-import com.sun.xml.internal.bind.v2.model.core.LeafInfo;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.core.Ref;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfo;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-import com.sun.xml.internal.bind.v2.runtime.RuntimeUtil;
-import com.sun.xml.internal.bind.v2.util.FlattenIterator;
-
-/**
- * Set of {@link TypeInfo}s.
- *
- * <p>
- * This contains a fixed set of {@link LeafInfo}s and arbitrary set of {@link ClassInfo}s.
- *
- * <p>
- * Members are annotated with JAXB annotations so that we can dump it easily.
- *
- * @author Kohsuke Kawaguchi
- */
-class TypeInfoSetImpl<T,C,F,M> implements TypeInfoSet<T,C,F,M> {
-
- @XmlTransient
- public final Navigator<T,C,F,M> nav;
-
- @XmlTransient
- public final AnnotationReader<T,C,F,M> reader;
-
- /**
- * All the leaves.
- */
- private final Map<T,BuiltinLeafInfo<T,C>> builtins =
- new LinkedHashMap<T,BuiltinLeafInfo<T,C>>();
-
- /** All {@link EnumLeafInfoImpl}s. */
- private final Map<C,EnumLeafInfoImpl<T,C,F,M>> enums =
- new LinkedHashMap<C,EnumLeafInfoImpl<T,C,F,M>>();
-
- /** All {@link ArrayInfoImpl}s. */
- private final Map<T,ArrayInfoImpl<T,C,F,M>> arrays =
- new LinkedHashMap<T,ArrayInfoImpl<T,C,F,M>>();
-
- /**
- * All the user-defined classes.
- *
- * Using {@link LinkedHashMap} allows us to process classes
- * in the order they are given to us. When the user incorrectly
- * puts an unexpected class into a reference graph, this causes
- * an error to be reported on a class closer to the user's code.
- */
- @XmlJavaTypeAdapter(RuntimeUtil.ToStringAdapter.class)
- private final Map<C,ClassInfoImpl<T,C,F,M>> beans
- = new LinkedHashMap<C,ClassInfoImpl<T,C,F,M>>();
-
- @XmlTransient
- private final Map<C,ClassInfoImpl<T,C,F,M>> beansView =
- Collections.unmodifiableMap(beans);
-
- /**
- * The element mapping.
- */
- private final Map<C,Map<QName,ElementInfoImpl<T,C,F,M>>> elementMappings =
- new LinkedHashMap<C,Map<QName,ElementInfoImpl<T,C,F,M>>>();
-
- private final Iterable<? extends ElementInfoImpl<T,C,F,M>> allElements =
- new Iterable<ElementInfoImpl<T,C,F,M>>() {
- public Iterator<ElementInfoImpl<T,C,F,M>> iterator() {
- return new FlattenIterator<ElementInfoImpl<T,C,F,M>>(elementMappings.values());
- }
- };
-
- /**
- * {@link TypeInfo} for <tt>xs:anyType</tt>.
- *
- * anyType is the only {@link TypeInfo} that works with an interface,
- * and accordingly it requires a lot of special casing.
- */
- private final NonElement<T,C> anyType;
-
- /**
- * Lazily parsed set of {@link XmlNs}s.
- *
- * @see #getXmlNs(String)
- */
- private Map<String,Map<String,String>> xmlNsCache;
-
- public TypeInfoSetImpl(Navigator<T,C,F,M> nav,
- AnnotationReader<T,C,F,M> reader,
- Map<T,? extends BuiltinLeafInfoImpl<T,C>> leaves) {
- this.nav = nav;
- this.reader = reader;
- this.builtins.putAll(leaves);
-
- this.anyType = createAnyType();
-
- // register primitive types.
- for (Map.Entry<Class, Class> e : RuntimeUtil.primitiveToBox.entrySet()) {
- this.builtins.put( nav.getPrimitive(e.getKey()), leaves.get(nav.ref(e.getValue())) );
- }
-
- // make sure at lease we got a map for global ones.
- elementMappings.put(null,new LinkedHashMap<QName,ElementInfoImpl<T,C,F,M>>());
- }
-
- protected NonElement<T,C> createAnyType() {
- return new AnyTypeImpl<T,C>(nav);
- }
-
- public Navigator<T,C,F,M> getNavigator() {
- return nav;
- }
-
- /**
- * Adds a new {@link ClassInfo} to the set.
- */
- public void add( ClassInfoImpl<T,C,F,M> ci ) {
- beans.put( ci.getClazz(), ci );
- }
-
- /**
- * Adds a new {@link LeafInfo} to the set.
- */
- public void add( EnumLeafInfoImpl<T,C,F,M> li ) {
- enums.put( li.clazz, li );
- }
-
- public void add(ArrayInfoImpl<T, C, F, M> ai) {
- arrays.put( ai.getType(), ai );
- }
-
- /**
- * Returns a {@link TypeInfo} for the given type.
- *
- * @return
- * null if the specified type cannot be bound by JAXB, or
- * not known to this set.
- */
- public NonElement<T,C> getTypeInfo( T type ) {
- type = nav.erasure(type); // replace type variables by their bounds
-
- LeafInfo<T,C> l = builtins.get(type);
- if(l!=null) return l;
-
- if( nav.isArray(type) ) {
- return arrays.get(type);
- }
-
- C d = nav.asDecl(type);
- if(d==null) return null;
- return getClassInfo(d);
- }
-
- public NonElement<T,C> getAnyTypeInfo() {
- return anyType;
- }
-
- /**
- * This method is used to add a root reference to a model.
- */
- public NonElement<T,C> getTypeInfo(Ref<T,C> ref) {
- // TODO: handle XmlValueList
- assert !ref.valueList;
- C c = nav.asDecl(ref.type);
- if(c!=null && reader.getClassAnnotation(XmlRegistry.class,c,null/*TODO: is this right?*/)!=null) {
- return null; // TODO: is this correct?
- } else
- return getTypeInfo(ref.type);
- }
-
- /**
- * Returns all the {@link ClassInfo}s known to this set.
- */
- public Map<C,? extends ClassInfoImpl<T,C,F,M>> beans() {
- return beansView;
- }
-
- public Map<T, ? extends BuiltinLeafInfo<T,C>> builtins() {
- return builtins;
- }
-
- public Map<C, ? extends EnumLeafInfoImpl<T,C,F,M>> enums() {
- return enums;
- }
-
- public Map<? extends T, ? extends ArrayInfoImpl<T,C,F,M>> arrays() {
- return arrays;
- }
-
- /**
- * Returns a {@link ClassInfo} for the given bean.
- *
- * <p>
- * This method is almost like refinement of {@link #getTypeInfo(Object)} except
- * our C cannot derive from T.
- *
- * @return
- * null if the specified type is not bound by JAXB or otherwise
- * unknown to this set.
- */
- public NonElement<T,C> getClassInfo( C type ) {
- LeafInfo<T,C> l = builtins.get(nav.use(type));
- if(l!=null) return l;
-
- l = enums.get(type);
- if(l!=null) return l;
-
- if(nav.asDecl(Object.class).equals(type))
- return anyType;
-
- return beans.get(type);
- }
-
- public ElementInfoImpl<T,C,F,M> getElementInfo( C scope, QName name ) {
- while(scope!=null) {
- Map<QName,ElementInfoImpl<T,C,F,M>> m = elementMappings.get(scope);
- if(m!=null) {
- ElementInfoImpl<T,C,F,M> r = m.get(name);
- if(r!=null) return r;
- }
- scope = nav.getSuperClass(scope);
- }
- return elementMappings.get(null).get(name);
- }
-
- /**
- * @param builder
- * used for reporting errors.
- */
- public final void add( ElementInfoImpl<T,C,F,M> ei, ModelBuilder<T,C,F,M> builder ) {
- C scope = null;
- if(ei.getScope()!=null)
- scope = ei.getScope().getClazz();
-
- Map<QName,ElementInfoImpl<T,C,F,M>> m = elementMappings.get(scope);
- if(m==null)
- elementMappings.put(scope,m=new LinkedHashMap<QName,ElementInfoImpl<T,C,F,M>>());
-
- ElementInfoImpl<T,C,F,M> existing = m.put(ei.getElementName(),ei);
-
- if(existing!=null) {
- QName en = ei.getElementName();
- builder.reportError(
- new IllegalAnnotationException(
- Messages.CONFLICTING_XML_ELEMENT_MAPPING.format(en.getNamespaceURI(),en.getLocalPart()),
- ei, existing ));
- }
- }
-
- public Map<QName,? extends ElementInfoImpl<T,C,F,M>> getElementMappings( C scope ) {
- return elementMappings.get(scope);
- }
-
- public Iterable<? extends ElementInfoImpl<T,C,F,M>> getAllElements() {
- return allElements;
- }
-
- public Map<String,String> getXmlNs(String namespaceUri) {
- if(xmlNsCache==null) {
- xmlNsCache = new HashMap<String,Map<String,String>>();
-
- for (ClassInfoImpl<T, C, F, M> ci : beans().values()) {
- XmlSchema xs = reader.getPackageAnnotation( XmlSchema.class, ci.getClazz(), null );
- if(xs==null)
- continue;
-
- String uri = xs.namespace();
- Map<String,String> m = xmlNsCache.get(uri);
- if(m==null)
- xmlNsCache.put(uri,m=new HashMap<String, String>());
-
- for( XmlNs xns : xs.xmlns() ) {
- m.put(xns.prefix(),xns.namespaceURI());
- }
- }
- }
-
- Map<String,String> r = xmlNsCache.get(namespaceUri);
- if(r!=null) return r;
- else return Collections.emptyMap();
- }
-
- public Map<String,String> getSchemaLocations() {
- Map<String, String> r = new HashMap<String,String>();
- for (ClassInfoImpl<T, C, F, M> ci : beans().values()) {
- XmlSchema xs = reader.getPackageAnnotation( XmlSchema.class, ci.getClazz(), null );
- if(xs==null)
- continue;
-
- String loc = xs.location();
- if(loc.equals(XmlSchema.NO_LOCATION))
- continue; // unspecified
-
- r.put(xs.namespace(),loc);
- }
- return r;
- }
-
- public final XmlNsForm getElementFormDefault(String nsUri) {
- for (ClassInfoImpl<T, C, F, M> ci : beans().values()) {
- XmlSchema xs = reader.getPackageAnnotation( XmlSchema.class, ci.getClazz(), null );
- if(xs==null)
- continue;
-
- if(!xs.namespace().equals(nsUri))
- continue;
-
- XmlNsForm xnf = xs.elementFormDefault();
- if(xnf!=XmlNsForm.UNSET)
- return xnf;
- }
- return XmlNsForm.UNSET;
- }
-
- public final XmlNsForm getAttributeFormDefault(String nsUri) {
- for (ClassInfoImpl<T,C,F,M> ci : beans().values()) {
- XmlSchema xs = reader.getPackageAnnotation( XmlSchema.class, ci.getClazz(), null );
- if(xs==null)
- continue;
-
- if(!xs.namespace().equals(nsUri))
- continue;
-
- XmlNsForm xnf = xs.attributeFormDefault();
- if(xnf!=XmlNsForm.UNSET)
- return xnf;
- }
- return XmlNsForm.UNSET;
- }
-
- /**
- * Dumps this model into XML.
- *
- * For debug only.
- *
- * TODO: not sure if this actually works. We don't really know what are T,C.
- */
- public void dump( Result out ) throws JAXBException {
- JAXBContext context = JAXBContext.newInstance(this.getClass());
- Marshaller m = context.createMarshaller();
- m.marshal(this,out);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/TypeRefImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/TypeRefImpl.java
deleted file mode 100644
index f727aa7d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/TypeRefImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.TypeRef;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class TypeRefImpl<TypeT,ClassDeclT> implements TypeRef<TypeT,ClassDeclT> {
- private final QName elementName;
- private final TypeT type;
- protected final ElementPropertyInfoImpl<TypeT,ClassDeclT,?,?> owner;
- private NonElement<TypeT,ClassDeclT> ref;
- private final boolean isNillable;
- private String defaultValue;
-
- public TypeRefImpl(ElementPropertyInfoImpl<TypeT, ClassDeclT, ?, ?> owner, QName elementName, TypeT type, boolean isNillable, String defaultValue) {
- this.owner = owner;
- this.elementName = elementName;
- this.type = type;
- this.isNillable = isNillable;
- this.defaultValue = defaultValue;
- assert owner!=null;
- assert elementName!=null;
- assert type!=null;
- }
-
- public NonElement<TypeT,ClassDeclT> getTarget() {
- if(ref==null)
- calcRef();
- return ref;
- }
-
- public QName getTagName() {
- return elementName;
- }
-
- public boolean isNillable() {
- return isNillable;
- }
-
- public String getDefaultValue() {
- return defaultValue;
- }
-
- protected void link() {
- // if we have'nt computed the ref yet, do so now.
- calcRef();
- }
-
- private void calcRef() {
- // we can't do this eagerly because of a cyclic dependency
- ref = owner.parent.builder.getTypeInfo(type,owner);
- assert ref!=null;
- }
-
- public PropertyInfo<TypeT,ClassDeclT> getSource() {
- return owner;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Util.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Util.java
deleted file mode 100644
index 9ddec3db..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Util.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
-import javax.xml.bind.annotation.XmlMimeType;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlSchemaTypes;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationSource;
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
-
-/**
- * Common code between {@link PropertyInfoImpl} and {@link ElementInfoImpl}.
- *
- * @author Kohsuke Kawaguchi
- */
-final class Util {
- static <T,C,F,M> QName calcSchemaType(
- AnnotationReader<T,C,F,M> reader,
- AnnotationSource primarySource, C enclosingClass, T individualType, Locatable src ) {
-
- XmlSchemaType xst = primarySource.readAnnotation(XmlSchemaType.class);
- if(xst!=null) {
- return new QName(xst.namespace(),xst.name());
- }
-
- // check the defaulted annotation
- XmlSchemaTypes xsts = reader.getPackageAnnotation(XmlSchemaTypes.class,enclosingClass,src);
- XmlSchemaType[] values = null;
- if(xsts!=null)
- values = xsts.value();
- else {
- xst = reader.getPackageAnnotation(XmlSchemaType.class,enclosingClass,src);
- if(xst!=null) {
- values = new XmlSchemaType[1];
- values[0] = xst;
- }
- }
- if(values!=null) {
- for( XmlSchemaType item : values ) {
- if(reader.getClassValue(item,"type").equals(individualType)) {
- return new QName(item.namespace(),item.name());
- }
- }
- }
-
- return null;
- }
-
- static MimeType calcExpectedMediaType(AnnotationSource primarySource,
- ModelBuilder builder ) {
- XmlMimeType xmt = primarySource.readAnnotation(XmlMimeType.class);
- if(xmt==null)
- return null;
-
- try {
- return new MimeType(xmt.value());
- } catch (MimeTypeParseException e) {
- builder.reportError(new IllegalAnnotationException(
- Messages.ILLEGAL_MIME_TYPE.format(xmt.value(),e.getMessage()),
- xmt
- ));
- return null;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java
deleted file mode 100644
index 4255bfcd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.model.impl;
-
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Utils class.
- *
- * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages.
- *
- * Has *package private* access to avoid inappropriate usage.
- */
-final class Utils {
-
- private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
-
- /**
- * static ReflectionNavigator field to avoid usage of reflection every time we use it.
- */
- static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
-
- static { // we statically initializing REFLECTION_NAVIGATOR property
- try {
- final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
-
- // requires accessClassInPackage privilege
- final Method getInstance = AccessController.doPrivileged(
- new PrivilegedAction<Method>() {
- @Override
- public Method run() {
- try {
- Method getInstance = refNav.getDeclaredMethod("getInstance");
- getInstance.setAccessible(true);
- return getInstance;
- } catch (NoSuchMethodException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
- }
- }
- }
- );
-
- //noinspection unchecked
- REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
- } catch (ClassNotFoundException e) {
- throw new IllegalStateException("Can't find ReflectionNavigator class");
- } catch (InvocationTargetException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
- } catch (IllegalAccessException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
- } catch (SecurityException e) {
- LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
- throw e;
- }
- }
-
- /**
- * private constructor to avoid util class instantiating
- */
- private Utils() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ValuePropertyInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ValuePropertyInfoImpl.java
deleted file mode 100644
index e6ae7438..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ValuePropertyInfoImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.impl;
-
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.core.ValuePropertyInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class ValuePropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
- extends SingleTypePropertyInfoImpl<TypeT,ClassDeclT,FieldT,MethodT>
- implements ValuePropertyInfo<TypeT,ClassDeclT> {
-
- ValuePropertyInfoImpl(
- ClassInfoImpl<TypeT,ClassDeclT,FieldT,MethodT> parent,
- PropertySeed<TypeT,ClassDeclT,FieldT,MethodT> seed) {
-
- super(parent,seed);
- }
-
- public PropertyKind kind() {
- return PropertyKind.VALUE;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/package.html b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/package.html
deleted file mode 100644
index 249a04b8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/package.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-
-
-<body>
-Implementation of the com.sun.xml.internal.bind.j2s.model package.
-</body>
-</html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/GenericArrayTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/GenericArrayTypeImpl.java
deleted file mode 100644
index 4c7ca27f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/GenericArrayTypeImpl.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.nav;
-
-import java.lang.reflect.GenericArrayType;
-import java.lang.reflect.Type;
-
-/**
- * Implementation of GenericArrayType interface for core reflection.
- */
-final class GenericArrayTypeImpl implements GenericArrayType {
- private Type genericComponentType;
-
- GenericArrayTypeImpl(Type ct) {
- assert ct!=null;
- genericComponentType = ct;
- }
-
- /**
- * Returns a <tt>Type</tt> object representing the component type
- * of this array.
- *
- * @return a <tt>Type</tt> object representing the component type
- * of this array
- * @since 1.5
- */
- public Type getGenericComponentType() {
- return genericComponentType; // return cached component type
- }
-
- public String toString() {
- Type componentType = getGenericComponentType();
- StringBuilder sb = new StringBuilder();
-
- if (componentType instanceof Class)
- sb.append(((Class) componentType).getName());
- else
- sb.append(componentType.toString());
- sb.append("[]");
- return sb.toString();
- }
-
- @Override
- public boolean equals(Object o) {
- if (o instanceof GenericArrayType) {
- GenericArrayType that = (GenericArrayType) o;
-
- Type thatComponentType = that.getGenericComponentType();
- return genericComponentType.equals(thatComponentType);
- } else
- return false;
- }
-
- @Override
- public int hashCode() {
- return genericComponentType.hashCode();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java
deleted file mode 100644
index 3c671f6d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java
+++ /dev/null
@@ -1,408 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.nav;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.lang.reflect.Type;
-import java.util.Collection;
-
-import com.sun.xml.internal.bind.v2.runtime.Location;
-
-/**
- * Provides unified view of the underlying reflection library,
- * such as {@code java.lang.reflect} and/or Annotation Processing.
- *
- * <p>
- * This interface provides navigation over the reflection model
- * to decouple the caller from any particular implementation.
- * This allows the JAXB RI to reuse much of the code between
- * the compile time (which works on top of Annotation Processing) and the run-time
- * (which works on top of {@code java.lang.reflect})
- *
- * <p>
- * {@link Navigator} instances are stateless and immutable.
- *
- *
- * <h2>Parameterization</h2>
- * <h3>C</h3>
- * <p>
- * A Java class declaration (not an interface, a class and an enum.)
- *
- * <h3>T</h3>
- * <p>
- * A Java type. This includs declaration, but also includes such
- * things like arrays, primitive types, parameterized types, and etc.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public interface Navigator<T,C,F,M> {
- /**
- * Gets the base class of the specified class.
- *
- * @return
- * null if the parameter represents {@link Object}.
- */
- C getSuperClass(C clazz);
-
- /**
- * Gets the parameterization of the given base type.
- *
- * <p>
- * For example, given the following
- * <pre><xmp>
- * interface Foo<T> extends List<List<T>> {}
- * interface Bar extends Foo<String> {}
- * </xmp></pre>
- * This method works like this:
- * <pre><xmp>
- * getBaseClass( Bar, List ) = List<List<String>
- * getBaseClass( Bar, Foo ) = Foo<String>
- * getBaseClass( Foo<? extends Number>, Collection ) = Collection<List<? extends Number>>
- * getBaseClass( ArrayList<? extends BigInteger>, List ) = List<? extends BigInteger>
- * </xmp></pre>
- *
- * @param type
- * The type that derives from {@code baseType}
- * @param baseType
- * The class whose parameterization we are interested in.
- * @return
- * The use of {@code baseType} in {@code type}.
- * or null if the type is not assignable to the base type.
- */
- T getBaseClass(T type, C baseType);
-
- /**
- * Gets the fully-qualified name of the class.
- * ("java.lang.Object" for {@link Object})
- */
- String getClassName(C clazz);
-
- /**
- * Gets the display name of the type object
- *
- * @return
- * a human-readable name that the type represents.
- */
- String getTypeName(T rawType);
-
- /**
- * Gets the short name of the class ("Object" for {@link Object}.)
- *
- * For nested classes, this method should just return the inner name.
- * (for example "Inner" for "com.acme.Outer$Inner".
- */
- String getClassShortName(C clazz);
-
- /**
- * Gets all the declared fields of the given class.
- */
- Collection<? extends F> getDeclaredFields(C clazz);
-
- /**
- * Gets the named field declared on the given class.
- *
- * This method doesn't visit ancestors, but does recognize
- * non-public fields.
- *
- * @return
- * null if not found
- */
- F getDeclaredField(C clazz, String fieldName);
-
- /**
- * Gets all the declared methods of the given class
- * (regardless of their access modifiers, regardless
- * of whether they override methods of the base classes.)
- *
- * <p>
- * Note that this method does not list methods declared on base classes.
- *
- * @return
- * can be empty but always non-null.
- */
- Collection<? extends M> getDeclaredMethods(C clazz);
-
- /**
- * Gets the class that declares the given field.
- */
- C getDeclaringClassForField(F field);
-
- /**
- * Gets the class that declares the given method.
- */
- C getDeclaringClassForMethod(M method);
-
- /**
- * Gets the type of the field.
- */
- T getFieldType(F f);
-
- /**
- * Gets the name of the field.
- */
- String getFieldName(F field);
-
- /**
- * Gets the name of the method, such as "toString" or "equals".
- */
- String getMethodName(M m);
-
- /**
- * Gets the return type of a method.
- */
- T getReturnType(M m);
-
- /**
- * Returns the list of parameters to the method.
- */
- T[] getMethodParameters(M method);
-
- /**
- * Returns true if the method is static.
- */
- boolean isStaticMethod(M method);
-
- /**
- * Checks if {@code sub} is a sub-type of {@code sup}.
- *
- * TODO: should this method take T or C?
- */
- boolean isSubClassOf(T sub, T sup);
-
- /**
- * Gets the representation of the given Java type in {@code T}.
- *
- * @param c
- * can be a primitive, array, class, or anything.
- * (therefore the return type has to be T, not C)
- */
- T ref(Class c);
-
- /**
- * Gets the T for the given C.
- */
- T use(C c);
-
- /**
- * If the given type is an use of class declaration,
- * returns the type casted as {@code C}.
- * Otherwise null.
- *
- * <p>
- * TODO: define the exact semantics.
- */
- C asDecl(T type);
-
- /**
- * Gets the {@code C} representation for the given class.
- *
- * The behavior is undefined if the class object represents
- * primitives, arrays, and other types that are not class declaration.
- */
- C asDecl(Class c);
-
- /**
- * Checks if the type is an array type.
- */
- boolean isArray(T t);
-
- /**
- * Checks if the type is an array type but not byte[].
- */
- boolean isArrayButNotByteArray(T t);
-
- /**
- * Gets the component type of the array.
- *
- * @param t
- * must be an array.
- */
- T getComponentType(T t);
-
- /**
- * Gets the i-th type argument from a parameterized type.
- *
- * For example, {@code getTypeArgument([Map<Integer,String>],0)=Integer}
- *
- * @throws IllegalArgumentException
- * If t is not a parameterized type
- * @throws IndexOutOfBoundsException
- * If i is out of range.
- *
- * @see #isParameterizedType(Object)
- */
- T getTypeArgument(T t, int i);
-
- /**
- * Returns true if t is a parameterized type.
- */
- boolean isParameterizedType(T t);
-
- /**
- * Checks if the given type is a primitive type.
- */
- boolean isPrimitive(T t);
-
- /**
- * Returns the representation for the given primitive type.
- *
- * @param primitiveType
- * must be Class objects like {@link Integer#TYPE}.
- */
- T getPrimitive(Class primitiveType);
-
- /**
- * Returns a location of the specified class.
- */
- Location getClassLocation(C clazz);
-
- Location getFieldLocation(F field);
-
- Location getMethodLocation(M getter);
-
- /**
- * Returns true if the given class has a no-arg default constructor.
- * The constructor does not need to be public.
- */
- boolean hasDefaultConstructor(C clazz);
-
- /**
- * Returns true if the field is static.
- */
- boolean isStaticField(F field);
-
- /**
- * Returns true if the method is public.
- */
- boolean isPublicMethod(M method);
-
- /**
- * Returns true if the method is final.
- */
- boolean isFinalMethod(M method);
-
- /**
- * Returns true if the field is public.
- */
- boolean isPublicField(F field);
-
- /**
- * Returns true if this is an enum class.
- */
- boolean isEnum(C clazz);
-
- /**
- * Computes the erasure
- */
- <P> T erasure(T contentInMemoryType);
- // This unused P is necessary to make ReflectionNavigator.erasure work nicely
-
- /**
- * Returns true if this is an abstract class.
- */
- boolean isAbstract(C clazz);
-
- /**
- * Returns true if this is a final class.
- */
- boolean isFinal(C clazz);
-
- /**
- * Gets the enumeration constants from an enum class.
- *
- * @param clazz
- * must derive from {@link Enum}.
- *
- * @return
- * can be empty but never null.
- */
- F[] getEnumConstants(C clazz);
-
- /**
- * Gets the representation of the primitive "void" type.
- */
- T getVoidType();
-
- /**
- * Gets the package name of the given class.
- *
- * @return
- * i.e. "", "java.lang" but not null.
- */
- String getPackageName(C clazz);
-
- /**
- * Finds ObjectFactory for the given referencePoint.
- *
- * @param referencePoint
- * The class that refers to the specified class.
- * @return
- * null if not found.
- */
- C loadObjectFactory(C referencePoint, String packageName);
-
- /**
- * Returns true if this method is a bridge method as defined in JLS.
- */
- boolean isBridgeMethod(M method);
-
- /**
- * Returns true if the given method is overriding another one
- * defined in the base class 'base' or its ancestors.
- */
- boolean isOverriding(M method, C base);
-
- /**
- * Returns true if 'clazz' is an interface.
- */
- boolean isInterface(C clazz);
-
- /**
- * Returns true if the field is transient.
- */
- boolean isTransient(F f);
-
- /**
- * Returns true if the given class is an inner class.
- *
- * This is only used to improve the error diagnostics, so
- * it's OK to fail to detect some inner classes as such.
- *
- * Note that this method should return false for nested classes
- * (static classes.)
- */
- boolean isInnerClass(C clazz);
-
- /**
- * Checks if types are the same
- * @param t1 type
- * @param t2 type
- * @return true if types are the same
- */
- boolean isSameType(T t1, T t2);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ParameterizedTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ParameterizedTypeImpl.java
deleted file mode 100644
index 0bb3551d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ParameterizedTypeImpl.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.nav;
-
-import java.lang.reflect.MalformedParameterizedTypeException;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.lang.reflect.TypeVariable;
-import java.util.Arrays;
-
-
-/**
- * {@link ParameterizedType} implementation.
- */
-class ParameterizedTypeImpl implements ParameterizedType {
- private Type[] actualTypeArguments;
- private Class<?> rawType;
- private Type ownerType;
-
- ParameterizedTypeImpl(Class<?> rawType,
- Type[] actualTypeArguments,
- Type ownerType) {
- this.actualTypeArguments = actualTypeArguments;
- this.rawType = rawType;
- if (ownerType != null) {
- this.ownerType = ownerType;
- } else {
- this.ownerType = rawType.getDeclaringClass();
- }
- validateConstructorArguments();
- }
-
- private void validateConstructorArguments() {
- TypeVariable/*<?>*/[] formals = rawType.getTypeParameters();
- // check correct arity of actual type args
- if (formals.length != actualTypeArguments.length) {
- throw new MalformedParameterizedTypeException();
- }
-/*
- for (int i = 0; i < actualTypeArguments.length; i++) {
- // check actuals against formals' bounds
- }
-*/
- }
-
- public Type[] getActualTypeArguments() {
- return actualTypeArguments.clone();
- }
-
- public Class<?> getRawType() {
- return rawType;
- }
-
- public Type getOwnerType() {
- return ownerType;
- }
-
- /*
- * From the JavaDoc for java.lang.reflect.ParameterizedType
- * "Instances of classes that implement this interface must
- * implement an equals() method that equates any two instances
- * that share the same generic type declaration and have equal
- * type parameters."
- */
- @Override
- public boolean equals(Object o) {
- if (o instanceof ParameterizedType) {
- // Check that information is equivalent
- ParameterizedType that = (ParameterizedType) o;
-
- if (this == that)
- return true;
-
- Type thatOwner = that.getOwnerType();
- Type thatRawType = that.getRawType();
-
-/*
- if (false) { // Debugging
- boolean ownerEquality = (ownerType == null ?
- thatOwner == null :
- ownerType.equals(thatOwner));
- boolean rawEquality = (rawType == null ?
- thatRawType == null :
- rawType.equals(thatRawType));
-
- boolean typeArgEquality = Arrays.equals(actualTypeArguments, // avoid clone
- that.getActualTypeArguments());
- for (Type t : actualTypeArguments) {
- System.out.printf("\t\t%s%s%n", t, t.getClass());
- }
-
- System.out.printf("\towner %s\traw %s\ttypeArg %s%n",
- ownerEquality, rawEquality, typeArgEquality);
- return ownerEquality && rawEquality && typeArgEquality;
- }
-*/
-
-
- return
- (ownerType == null ?
- thatOwner == null :
- ownerType.equals(thatOwner)) &&
- (rawType == null ?
- thatRawType == null :
- rawType.equals(thatRawType)) &&
- Arrays.equals(actualTypeArguments, // avoid clone
- that.getActualTypeArguments());
- } else
- return false;
- }
-
- @Override
- public int hashCode() {
- return Arrays.hashCode(actualTypeArguments) ^
- (ownerType == null ? 0 : ownerType.hashCode()) ^
- (rawType == null ? 0 : rawType.hashCode());
- }
-
- public String toString() {
- StringBuilder sb = new StringBuilder();
-
- if (ownerType != null) {
- if (ownerType instanceof Class)
- sb.append(((Class) ownerType).getName());
- else
- sb.append(ownerType.toString());
-
- sb.append(".");
-
- if (ownerType instanceof ParameterizedTypeImpl) {
- // Find simple name of nested type by removing the
- // shared prefix with owner.
- sb.append(rawType.getName().replace(((ParameterizedTypeImpl) ownerType).rawType.getName() + "$",
- ""));
- } else
- sb.append(rawType.getName());
- } else
- sb.append(rawType.getName());
-
- if (actualTypeArguments != null &&
- actualTypeArguments.length > 0) {
- sb.append("<");
- boolean first = true;
- for (Type t : actualTypeArguments) {
- if (!first)
- sb.append(", ");
- if (t instanceof Class)
- sb.append(((Class) t).getName());
- else
- sb.append(t.toString());
- first = false;
- }
- sb.append(">");
- }
-
- return sb.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java
deleted file mode 100644
index 665001f8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java
+++ /dev/null
@@ -1,633 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.model.nav;
-
-import java.lang.reflect.Array;
-import java.lang.reflect.Field;
-import java.lang.reflect.GenericArrayType;
-import java.lang.reflect.GenericDeclaration;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.lang.reflect.TypeVariable;
-import java.lang.reflect.WildcardType;
-import java.util.Arrays;
-import java.util.Collection;
-
-import com.sun.xml.internal.bind.v2.runtime.Location;
-
-/**
- * {@link Navigator} implementation for {@code java.lang.reflect}.
- *
- */
-/*package*/final class ReflectionNavigator implements Navigator<Type, Class, Field, Method> {
-
-// ---------- Singleton -----------------
- private static final ReflectionNavigator INSTANCE = new ReflectionNavigator();
-
- /*package*/static ReflectionNavigator getInstance() {
- return INSTANCE;
- }
-
- private ReflectionNavigator() {
- }
-// ---------------------------------------
-
- public Class getSuperClass(Class clazz) {
- if (clazz == Object.class) {
- return null;
- }
- Class sc = clazz.getSuperclass();
- if (sc == null) {
- sc = Object.class; // error recovery
- }
- return sc;
- }
-
- private static final TypeVisitor<Type, Class> baseClassFinder = new TypeVisitor<Type, Class>() {
-
- public Type onClass(Class c, Class sup) {
- // t is a raw type
- if (sup == c) {
- return sup;
- }
-
- Type r;
-
- Type sc = c.getGenericSuperclass();
- if (sc != null) {
- r = visit(sc, sup);
- if (r != null) {
- return r;
- }
- }
-
- for (Type i : c.getGenericInterfaces()) {
- r = visit(i, sup);
- if (r != null) {
- return r;
- }
- }
-
- return null;
- }
-
- public Type onParameterizdType(ParameterizedType p, Class sup) {
- Class raw = (Class) p.getRawType();
- if (raw == sup) {
- // p is of the form sup<...>
- return p;
- } else {
- // recursively visit super class/interfaces
- Type r = raw.getGenericSuperclass();
- if (r != null) {
- r = visit(bind(r, raw, p), sup);
- }
- if (r != null) {
- return r;
- }
- for (Type i : raw.getGenericInterfaces()) {
- r = visit(bind(i, raw, p), sup);
- if (r != null) {
- return r;
- }
- }
- return null;
- }
- }
-
- public Type onGenericArray(GenericArrayType g, Class sup) {
- // not clear what I should do here
- return null;
- }
-
- public Type onVariable(TypeVariable v, Class sup) {
- return visit(v.getBounds()[0], sup);
- }
-
- public Type onWildcard(WildcardType w, Class sup) {
- // not clear what I should do here
- return null;
- }
-
- /**
- * Replaces the type variables in {@code t} by its actual arguments.
- *
- * @param decl
- * provides a list of type variables. See {@link GenericDeclaration#getTypeParameters()}
- * @param args
- * actual arguments. See {@link ParameterizedType#getActualTypeArguments()}
- */
- private Type bind(Type t, GenericDeclaration decl, ParameterizedType args) {
- return binder.visit(t, new BinderArg(decl, args.getActualTypeArguments()));
- }
- };
-
- private static class BinderArg {
-
- final TypeVariable[] params;
- final Type[] args;
-
- BinderArg(TypeVariable[] params, Type[] args) {
- this.params = params;
- this.args = args;
- assert params.length == args.length;
- }
-
- public BinderArg(GenericDeclaration decl, Type[] args) {
- this(decl.getTypeParameters(), args);
- }
-
- Type replace(TypeVariable v) {
- for (int i = 0; i < params.length; i++) {
- if (params[i].equals(v)) {
- return args[i];
- }
- }
- return v; // this is a free variable
- }
- }
- private static final TypeVisitor<Type, BinderArg> binder = new TypeVisitor<Type, BinderArg>() {
-
- public Type onClass(Class c, BinderArg args) {
- return c;
- }
-
- public Type onParameterizdType(ParameterizedType p, BinderArg args) {
- Type[] params = p.getActualTypeArguments();
-
- boolean different = false;
- for (int i = 0; i < params.length; i++) {
- Type t = params[i];
- params[i] = visit(t, args);
- different |= t != params[i];
- }
-
- Type newOwner = p.getOwnerType();
- if (newOwner != null) {
- newOwner = visit(newOwner, args);
- }
- different |= p.getOwnerType() != newOwner;
-
- if (!different) {
- return p;
- }
-
- return new ParameterizedTypeImpl((Class<?>) p.getRawType(), params, newOwner);
- }
-
- public Type onGenericArray(GenericArrayType g, BinderArg types) {
- Type c = visit(g.getGenericComponentType(), types);
- if (c == g.getGenericComponentType()) {
- return g;
- }
-
- return new GenericArrayTypeImpl(c);
- }
-
- public Type onVariable(TypeVariable v, BinderArg types) {
- return types.replace(v);
- }
-
- public Type onWildcard(WildcardType w, BinderArg types) {
- // TODO: this is probably still incorrect
- // bind( "? extends T" ) with T= "? extends Foo" should be "? extends Foo",
- // not "? extends (? extends Foo)"
- Type[] lb = w.getLowerBounds();
- Type[] ub = w.getUpperBounds();
- boolean diff = false;
-
- for (int i = 0; i < lb.length; i++) {
- Type t = lb[i];
- lb[i] = visit(t, types);
- diff |= (t != lb[i]);
- }
-
- for (int i = 0; i < ub.length; i++) {
- Type t = ub[i];
- ub[i] = visit(t, types);
- diff |= (t != ub[i]);
- }
-
- if (!diff) {
- return w;
- }
-
- return new WildcardTypeImpl(lb, ub);
- }
- };
-
- public Type getBaseClass(Type t, Class sup) {
- return baseClassFinder.visit(t, sup);
- }
-
- public String getClassName(Class clazz) {
- return clazz.getName();
- }
-
- public String getTypeName(Type type) {
- if (type instanceof Class) {
- Class c = (Class) type;
- if (c.isArray()) {
- return getTypeName(c.getComponentType()) + "[]";
- }
- return c.getName();
- }
- return type.toString();
- }
-
- public String getClassShortName(Class clazz) {
- return clazz.getSimpleName();
- }
-
- public Collection<? extends Field> getDeclaredFields(Class clazz) {
- return Arrays.asList(clazz.getDeclaredFields());
- }
-
- public Field getDeclaredField(Class clazz, String fieldName) {
- try {
- return clazz.getDeclaredField(fieldName);
- } catch (NoSuchFieldException e) {
- return null;
- }
- }
-
- public Collection<? extends Method> getDeclaredMethods(Class clazz) {
- return Arrays.asList(clazz.getDeclaredMethods());
- }
-
- public Class getDeclaringClassForField(Field field) {
- return field.getDeclaringClass();
- }
-
- public Class getDeclaringClassForMethod(Method method) {
- return method.getDeclaringClass();
- }
-
- public Type getFieldType(Field field) {
- if (field.getType().isArray()) {
- Class c = field.getType().getComponentType();
- if (c.isPrimitive()) {
- return Array.newInstance(c, 0).getClass();
- }
- }
- return fix(field.getGenericType());
- }
-
- public String getFieldName(Field field) {
- return field.getName();
- }
-
- public String getMethodName(Method method) {
- return method.getName();
- }
-
- public Type getReturnType(Method method) {
- return fix(method.getGenericReturnType());
- }
-
- public Type[] getMethodParameters(Method method) {
- return method.getGenericParameterTypes();
- }
-
- public boolean isStaticMethod(Method method) {
- return Modifier.isStatic(method.getModifiers());
- }
-
- public boolean isFinalMethod(Method method) {
- return Modifier.isFinal(method.getModifiers());
- }
-
- public boolean isSubClassOf(Type sub, Type sup) {
- return erasure(sup).isAssignableFrom(erasure(sub));
- }
-
- public Class ref(Class c) {
- return c;
- }
-
- public Class use(Class c) {
- return c;
- }
-
- public Class asDecl(Type t) {
- return erasure(t);
- }
-
- public Class asDecl(Class c) {
- return c;
- }
- /**
- * Implements the logic for {@link #erasure(Type)}.
- */
- private static final TypeVisitor<Class, Void> eraser = new TypeVisitor<Class, Void>() {
-
- public Class onClass(Class c, Void v) {
- return c;
- }
-
- public Class onParameterizdType(ParameterizedType p, Void v) {
- // TODO: why getRawType returns Type? not Class?
- return visit(p.getRawType(), null);
- }
-
- public Class onGenericArray(GenericArrayType g, Void v) {
- return Array.newInstance(
- visit(g.getGenericComponentType(), null),
- 0).getClass();
- }
-
- public Class onVariable(TypeVariable tv, Void v) {
- return visit(tv.getBounds()[0], null);
- }
-
- public Class onWildcard(WildcardType w, Void v) {
- return visit(w.getUpperBounds()[0], null);
- }
- };
-
- /**
- * Returns the runtime representation of the given type.
- *
- * This corresponds to the notion of the erasure in JSR-14.
- *
- * <p>
- * Because of the difference in the way Annotation Processing and the Java reflection
- * treats primitive type and array type, we can't define this method
- * on {@link Navigator}.
- *
- * <p>
- * It made me realize how difficult it is to define the common navigation
- * layer for two different underlying reflection library. The other way
- * is to throw away the entire parameterization and go to the wrapper approach.
- */
- public <T> Class<T> erasure(Type t) {
- return eraser.visit(t, null);
- }
-
- public boolean isAbstract(Class clazz) {
- return Modifier.isAbstract(clazz.getModifiers());
- }
-
- public boolean isFinal(Class clazz) {
- return Modifier.isFinal(clazz.getModifiers());
- }
-
- /**
- * Returns the {@link Type} object that represents {@code clazz&lt;T1,T2,T3>}.
- */
- public Type createParameterizedType(Class rawType, Type... arguments) {
- return new ParameterizedTypeImpl(rawType, arguments, null);
- }
-
- public boolean isArray(Type t) {
- if (t instanceof Class) {
- Class c = (Class) t;
- return c.isArray();
- }
- if (t instanceof GenericArrayType) {
- return true;
- }
- return false;
- }
-
- public boolean isArrayButNotByteArray(Type t) {
- if (t instanceof Class) {
- Class c = (Class) t;
- return c.isArray() && c != byte[].class;
- }
- if (t instanceof GenericArrayType) {
- t = ((GenericArrayType) t).getGenericComponentType();
- return t != Byte.TYPE;
- }
- return false;
- }
-
- public Type getComponentType(Type t) {
- if (t instanceof Class) {
- Class c = (Class) t;
- return c.getComponentType();
- }
- if (t instanceof GenericArrayType) {
- return ((GenericArrayType) t).getGenericComponentType();
- }
-
- throw new IllegalArgumentException();
- }
-
- public Type getTypeArgument(Type type, int i) {
- if (type instanceof ParameterizedType) {
- ParameterizedType p = (ParameterizedType) type;
- return fix(p.getActualTypeArguments()[i]);
- } else {
- throw new IllegalArgumentException();
- }
- }
-
- public boolean isParameterizedType(Type type) {
- return type instanceof ParameterizedType;
- }
-
- public boolean isPrimitive(Type type) {
- if (type instanceof Class) {
- Class c = (Class) type;
- return c.isPrimitive();
- }
- return false;
- }
-
- public Type getPrimitive(Class primitiveType) {
- assert primitiveType.isPrimitive();
- return primitiveType;
- }
-
- public Location getClassLocation(final Class clazz) {
- return new Location() {
-
- @Override
- public String toString() {
- return clazz.getName();
- }
- };
- }
-
- public Location getFieldLocation(final Field field) {
- return new Location() {
-
- @Override
- public String toString() {
- return field.toString();
- }
- };
- }
-
- public Location getMethodLocation(final Method method) {
- return new Location() {
-
- @Override
- public String toString() {
- return method.toString();
- }
- };
- }
-
- public boolean hasDefaultConstructor(Class c) {
- try {
- c.getDeclaredConstructor();
- return true;
- } catch (NoSuchMethodException e) {
- return false; // todo: do this WITHOUT exception throw
- }
- }
-
- public boolean isStaticField(Field field) {
- return Modifier.isStatic(field.getModifiers());
- }
-
- public boolean isPublicMethod(Method method) {
- return Modifier.isPublic(method.getModifiers());
- }
-
- public boolean isPublicField(Field field) {
- return Modifier.isPublic(field.getModifiers());
- }
-
- public boolean isEnum(Class c) {
- return Enum.class.isAssignableFrom(c);
- }
-
- public Field[] getEnumConstants(Class clazz) {
- try {
- Object[] values = clazz.getEnumConstants();
- Field[] fields = new Field[values.length];
- for (int i = 0; i < values.length; i++) {
- fields[i] = clazz.getField(((Enum) values[i]).name());
- }
- return fields;
- } catch (NoSuchFieldException e) {
- // impossible
- throw new NoSuchFieldError(e.getMessage());
- }
- }
-
- public Type getVoidType() {
- return Void.class;
- }
-
- public String getPackageName(Class clazz) {
- String name = clazz.getName();
- int idx = name.lastIndexOf('.');
- if (idx < 0) {
- return "";
- } else {
- return name.substring(0, idx);
- }
- }
-
- @Override
- public Class loadObjectFactory(Class referencePoint, String pkg) {
- ClassLoader cl= SecureLoader.getClassClassLoader(referencePoint);
- if (cl == null)
- cl = SecureLoader.getSystemClassLoader();
-
- try {
- return cl.loadClass(pkg + ".ObjectFactory");
- } catch (ClassNotFoundException e) {
- return null;
- }
- }
-
- public boolean isBridgeMethod(Method method) {
- return method.isBridge();
- }
-
- public boolean isOverriding(Method method, Class base) {
- // this isn't actually correct,
- // as the JLS considers
- // class Derived extends Base<Integer> {
- // Integer getX() { ... }
- // }
- // class Base<T> {
- // T getX() { ... }
- // }
- // to be overrided. Handling this correctly needs a careful implementation
-
- String name = method.getName();
- Class[] params = method.getParameterTypes();
-
- while (base != null) {
- try {
- if (base.getDeclaredMethod(name, params) != null) {
- return true;
- }
- } catch (NoSuchMethodException e) {
- // recursively go into the base class
- }
-
- base = base.getSuperclass();
- }
-
- return false;
- }
-
- public boolean isInterface(Class clazz) {
- return clazz.isInterface();
- }
-
- public boolean isTransient(Field f) {
- return Modifier.isTransient(f.getModifiers());
- }
-
- public boolean isInnerClass(Class clazz) {
- return clazz.getEnclosingClass() != null && !Modifier.isStatic(clazz.getModifiers());
- }
-
- @Override
- public boolean isSameType(Type t1, Type t2) {
- return t1.equals(t2);
- }
-
- /**
- * JDK 5.0 has a bug of creating {@link GenericArrayType} where it shouldn't.
- * fix that manually to work around the problem.
- *
- * See bug 6202725.
- */
- private Type fix(Type t) {
- if (!(t instanceof GenericArrayType)) {
- return t;
- }
-
- GenericArrayType gat = (GenericArrayType) t;
- if (gat.getGenericComponentType() instanceof Class) {
- Class c = (Class) gat.getGenericComponentType();
- return Array.newInstance(c, 0).getClass();
- }
-
- return t;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/SecureLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/SecureLoader.java
deleted file mode 100644
index 6bab3133..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/SecureLoader.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.nav;
-
-/**
- * Class defined for safe calls of getClassLoader methods of any kind (context/system/class
- * classloader. This MUST be package private and defined in every package which
- * uses such invocations.
- * @author snajper
- */
-class SecureLoader {
-
- static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ClassLoader>() {
- public ClassLoader run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/TypeVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/TypeVisitor.java
deleted file mode 100644
index 07f22dd0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/TypeVisitor.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.nav;
-
-import java.lang.reflect.GenericArrayType;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.lang.reflect.TypeVariable;
-import java.lang.reflect.WildcardType;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-abstract class TypeVisitor<T,P> {
- public final T visit( Type t, P param ) {
- assert t!=null;
-
- if (t instanceof Class)
- return onClass((Class)t,param);
- if (t instanceof ParameterizedType)
- return onParameterizdType( (ParameterizedType)t,param);
- if(t instanceof GenericArrayType)
- return onGenericArray((GenericArrayType)t,param);
- if(t instanceof WildcardType)
- return onWildcard((WildcardType)t,param);
- if(t instanceof TypeVariable)
- return onVariable((TypeVariable)t,param);
-
- // covered all the cases
- assert false;
- throw new IllegalArgumentException();
- }
-
- protected abstract T onClass(Class c, P param);
- protected abstract T onParameterizdType(ParameterizedType p, P param);
- protected abstract T onGenericArray(GenericArrayType g, P param);
- protected abstract T onVariable(TypeVariable v, P param);
- protected abstract T onWildcard(WildcardType w, P param);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/WildcardTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/WildcardTypeImpl.java
deleted file mode 100644
index edafad77..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/WildcardTypeImpl.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.nav;
-
-import java.lang.reflect.Type;
-import java.lang.reflect.WildcardType;
-import java.util.Arrays;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class WildcardTypeImpl implements WildcardType {
-
- private final Type[] ub;
- private final Type[] lb;
-
- public WildcardTypeImpl(Type[] ub, Type[] lb) {
- this.ub = ub;
- this.lb = lb;
- }
-
- public Type[] getUpperBounds() {
- return ub;
- }
-
- public Type[] getLowerBounds() {
- return lb;
- }
-
- public int hashCode() {
- return Arrays.hashCode(lb) ^ Arrays.hashCode(ub);
- }
-
- public boolean equals(Object obj) {
- if (obj instanceof WildcardType) {
- WildcardType that = (WildcardType) obj;
- return Arrays.equals(that.getLowerBounds(),lb)
- && Arrays.equals(that.getUpperBounds(),ub);
- }
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/package.html b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/package.html
deleted file mode 100644
index ace18492..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
- Abstraction around the reflection library, to support various reflection models (such as java.lang.reflect and Annotation Processing).
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeArrayInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeArrayInfo.java
deleted file mode 100644
index 462b0333..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeArrayInfo.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-
-import com.sun.xml.internal.bind.v2.model.core.ArrayInfo;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeArrayInfo extends ArrayInfo<Type,Class>, RuntimeNonElement {
- /**
- * Represents <tt>T[]</tt>.
- *
- * The same as {@link TypeInfo#getType()} but at the runtime, an array
- * is guaranteed to have a {@link Class} representation, not just any {@link Type}.
- */
- Class getType();
-
- /**
- * {@inheritDoc}
- */
- RuntimeNonElement getItemType();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeAttributePropertyInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeAttributePropertyInfo.java
deleted file mode 100644
index 65a08cc3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeAttributePropertyInfo.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-
-import com.sun.xml.internal.bind.v2.model.core.AttributePropertyInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeAttributePropertyInfo extends AttributePropertyInfo<Type,Class>, RuntimePropertyInfo, RuntimeNonElementRef {
- // refinement
- RuntimeNonElement getTarget();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeBuiltinLeafInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeBuiltinLeafInfo.java
deleted file mode 100644
index 42eee3a4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeBuiltinLeafInfo.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-
-import com.sun.xml.internal.bind.v2.model.core.BuiltinLeafInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeBuiltinLeafInfo extends BuiltinLeafInfo<Type,Class>, RuntimeLeafInfo {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeClassInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeClassInfo.java
deleted file mode 100644
index 854e74fc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeClassInfo.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.core.ClassInfo;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.annotation.XmlLocation;
-
-import org.xml.sax.Locator;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public interface RuntimeClassInfo extends ClassInfo<Type,Class>, RuntimeNonElement {
- RuntimeClassInfo getBaseClass();
-
- // refined to return RuntimePropertyInfo
- List<? extends RuntimePropertyInfo> getProperties();
- RuntimePropertyInfo getProperty(String name);
-
- Method getFactoryMethod();
-
- /**
- * If {@link #hasAttributeWildcard()} is true,
- * returns the accessor to access the property.
- *
- * @return
- * unoptimized accessor.
- * non-null iff {@link #hasAttributeWildcard()}==true.
- *
- * @see Accessor#optimize()
- */
- <BeanT> Accessor<BeanT,Map<QName,String>> getAttributeWildcard();
-
- /**
- * If this JAXB bean has a property annotated with {@link XmlLocation},
- * this method returns it.
- *
- * @return may be null.
- */
- <BeanT> Accessor<BeanT,Locator> getLocatorField();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeElement.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeElement.java
deleted file mode 100644
index 6fc6292f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeElement.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-
-import com.sun.xml.internal.bind.v2.model.core.Element;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeElement extends Element<Type,Class>, RuntimeTypeInfo {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeElementInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeElementInfo.java
deleted file mode 100644
index 06da4773..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeElementInfo.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-
-import javax.xml.bind.JAXBElement;
-
-import com.sun.xml.internal.bind.v2.model.core.ElementInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeElementInfo extends ElementInfo<Type,Class>, RuntimeElement {
- RuntimeClassInfo getScope();
-
- RuntimeElementPropertyInfo getProperty();
-
- /**
- * Returns the custom {@link JAXBElement} class tailored this element.
- */
- Class<? extends JAXBElement> getType();
-
- /**
- * {@inheritDoc}
- */
- RuntimeNonElement getContentType();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeElementPropertyInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeElementPropertyInfo.java
deleted file mode 100644
index 2d2aa105..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeElementPropertyInfo.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-import java.util.Collection;
-import java.util.List;
-
-import com.sun.xml.internal.bind.v2.model.core.ElementPropertyInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeElementPropertyInfo extends ElementPropertyInfo<Type,Class>, RuntimePropertyInfo {
- /** {@inheritDoc} */
- Collection<? extends RuntimeTypeInfo> ref();
-
- List<? extends RuntimeTypeRef> getTypes();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeEnumLeafInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeEnumLeafInfo.java
deleted file mode 100644
index cc83fa60..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeEnumLeafInfo.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-
-import com.sun.xml.internal.bind.v2.model.core.EnumLeafInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeEnumLeafInfo extends EnumLeafInfo<Type,Class>, RuntimeLeafInfo {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeLeafInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeLeafInfo.java
deleted file mode 100644
index 8f7f5a77..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeLeafInfo.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.core.LeafInfo;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeLeafInfo extends LeafInfo<Type,Class>, RuntimeNonElement {
- /**
- * {@inheritDoc}
- *
- * @return
- * always non-null.
- */
- <V> Transducer<V> getTransducer();
-
- /**
- * The same as {@link #getType()} but returns the type as a {@link Class}.
- * <p>
- * Note that the returned {@link Class} object does not necessarily represents
- * a class declaration. It can be primitive types.
- */
- Class getClazz();
-
- /**
- * Returns all the type names recognized by this type for unmarshalling.
- *
- * <p>
- * While conceptually this method belongs to {@link RuntimeNonElement},
- * if we do that we have to put a lot of dummy implementations everywhere,
- * so it's placed here, where it's actually needed.
- *
- * @return
- * Always non-null. Do not modify the returned array.
- */
- QName[] getTypeNames();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeMapPropertyInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeMapPropertyInfo.java
deleted file mode 100644
index 66be07a9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeMapPropertyInfo.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-
-import com.sun.xml.internal.bind.v2.model.core.MapPropertyInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeMapPropertyInfo extends RuntimePropertyInfo, MapPropertyInfo<Type,Class> {
- RuntimeNonElement getKeyType();
- RuntimeNonElement getValueType();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeNonElement.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeNonElement.java
deleted file mode 100644
index 5806e6ef..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeNonElement.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeNonElement extends NonElement<Type,Class>, RuntimeTypeInfo {
- /**
- * This method doesn't take the reference properties defined on
- * {@link RuntimeNonElementRef} into account (such as ID-ness.)
- *
- * @see RuntimeNonElementRef#getTransducer()
- */
- <V> Transducer<V> getTransducer();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeNonElementRef.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeNonElementRef.java
deleted file mode 100644
index 0aecf611..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeNonElementRef.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-
-import com.sun.xml.internal.bind.v2.model.core.NonElementRef;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-
-/**
- * Runtime version of {@link NonElementRef}.
- *
- * <p>
- * Inside the implementation, reference decorators implement this interface
- * and this interface is used for chaining. Also, every {@link RuntimeNonElement}
- * implementation implements this interface so that undecorated plain
- * reference can be represented without using a separate object.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeNonElementRef extends NonElementRef<Type,Class> {
- // refinements
- RuntimeNonElement getTarget();
- RuntimePropertyInfo getSource();
-
- /**
- * If the XML representation of the referenced Java type is just a text,
- * return a transducer that converts between the bean and XML.
- */
- Transducer getTransducer();
-
- // TransducedAccessor should be created
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimePropertyInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimePropertyInfo.java
deleted file mode 100644
index 33b14467..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimePropertyInfo.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-import java.util.Collection;
-
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * {@link PropertyInfo} that exposes more information.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public interface RuntimePropertyInfo extends PropertyInfo<Type,Class> {
-
- /** {@inheritDoc} */
- Collection<? extends RuntimeTypeInfo> ref();
-
-
- /**
- * Gets the {@link Accessor} for this property.
- *
- * <p>
- * Even for a multi-value property, this method returns an accessor
- * to that property. IOW, the accessor works against the raw type.
- *
- * <p>
- * This methods returns unoptimized accessor (because optimization
- * accessors are often combined into bigger pieces, and optimization
- * generally works better if you can look at a bigger piece, as opposed
- * to individually optimize a smaller components)
- *
- * @return
- * never null.
- *
- * @see Accessor#optimize()
- */
- Accessor getAccessor();
-
- /**
- * Returns true if this property has an element-only content. False otherwise.
- */
- public boolean elementOnlyContent();
-
- /**
- * Gets the "raw" type of the field.
- *
- * The raw type is the actual signature of the property.
- * For example, if the field is the primitive int, this will be the primitive int.
- * If the field is Object, this will be Object.
- * If the property is the collection and typed as {@code Collection<Integer>},
- * this method returns {@code Collection<Integer>}.
- *
- * @return always non-null.
- */
- Type getRawType();
-
- /**
- * Gets the type of the individual item.
- *
- * The individual type is the signature of the property used to store individual
- * values. For a non-collection field, this is the same as {@link #getRawType()}.
- * For acollection property, this is the type used to store individual value.
- * So if {@link #getRawType()} is {@code Collection<Integer>}, this method will
- * return {@link Integer}.
- *
- * @return always non-null.
- */
- Type getIndividualType();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeReferencePropertyInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeReferencePropertyInfo.java
deleted file mode 100644
index 8b1e892f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeReferencePropertyInfo.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-import java.util.Set;
-
-import com.sun.xml.internal.bind.v2.model.core.ReferencePropertyInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeReferencePropertyInfo extends ReferencePropertyInfo<Type,Class>, RuntimePropertyInfo {
- Set<? extends RuntimeElement> getElements();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfo.java
deleted file mode 100644
index abf79fe6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfo.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-
-import com.sun.xml.internal.bind.v2.model.core.TypeInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeTypeInfo extends TypeInfo<Type,Class> {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java
deleted file mode 100644
index fe7596b1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
-
-/**
- * {@link TypeInfoSet} refined for runtime.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeTypeInfoSet extends TypeInfoSet<Type,Class,Field,Method>{
- Map<Class,? extends RuntimeArrayInfo> arrays();
- Map<Class,? extends RuntimeClassInfo> beans();
- Map<Type,? extends RuntimeBuiltinLeafInfo> builtins();
- Map<Class,? extends RuntimeEnumLeafInfo> enums();
- RuntimeNonElement getTypeInfo( Type type );
- RuntimeNonElement getAnyTypeInfo();
- RuntimeNonElement getClassInfo( Class type );
- RuntimeElementInfo getElementInfo( Class scope, QName name );
- Map<QName,? extends RuntimeElementInfo> getElementMappings( Class scope );
- Iterable<? extends RuntimeElementInfo> getAllElements();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeRef.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeRef.java
deleted file mode 100644
index 6ac6ce09..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeRef.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-
-import com.sun.xml.internal.bind.v2.model.core.TypeRef;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeTypeRef extends TypeRef<Type,Class>, RuntimeNonElementRef {
- RuntimeNonElement getTarget();
- RuntimePropertyInfo getSource();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeValuePropertyInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeValuePropertyInfo.java
deleted file mode 100644
index 5b8a87d9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeValuePropertyInfo.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.runtime;
-
-import java.lang.reflect.Type;
-
-import com.sun.xml.internal.bind.v2.model.core.ValuePropertyInfo;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface RuntimeValuePropertyInfo extends ValuePropertyInfo<Type,Class>,RuntimePropertyInfo,RuntimeNonElementRef {
- RuntimeNonElement getTarget();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/package-info.java
deleted file mode 100644
index cce3bc5a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/package-info.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * The specialization of {@link com.sun.xml.internal.bind.v2.model.core} for the runtime.
- *
- * <p>
- * This package offers stronger types and additional methods available at the runtime
- * to access objects according to the model. Most of the interfaces correspond one to one
- * with the core package, and they are simply named with {@code Runtime} prefix.
- */
-@XmlSchema(namespace="http://jaxb.dev.java.net/xjc/model",elementFormDefault=XmlNsForm.QUALIFIED)
-package com.sun.xml.internal.bind.v2.model.runtime;
-
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlSchema;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/util/ArrayInfoUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/util/ArrayInfoUtil.java
deleted file mode 100644
index 2a18e66f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/util/ArrayInfoUtil.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.model.util;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.TODO;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-
-/**
- * Util class for ArrayInfo
- *
- * @author Iaroslav Savytskyi
- */
-public class ArrayInfoUtil {
-
- private ArrayInfoUtil() {}
-
- /**
- * Computes the type name of the array from that of the item type.
- */
- public static QName calcArrayTypeName(QName n) {
- String uri;
- if(n.getNamespaceURI().equals(WellKnownNamespace.XML_SCHEMA)) {
- TODO.checkSpec("this URI");
- uri = "http://jaxb.dev.java.net/array";
- } else
- uri = n.getNamespaceURI();
- return new QName(uri,n.getLocalPart()+"Array");
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/package-info.java
deleted file mode 100644
index b52f12cc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/package-info.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * <h1>The JAXB 2.0 runtime</h1>.
- *
- * <h1>Overview</h1>
- * <p>
- * This module provides code that implements {@link JAXBContext}.
- * Roughly speaking the runtime works like this:
- *
- * <ol>
- * <li>There's a set of classes and interfaces that model JAXB-bound types.
- * You can think of this as a reflection library for JAXB.
- * <li>There's a set of classes that constitute the unmarshaller and marshaller.
- * Each class represents a small portion, and they are composed to perform
- * the operations.
- * <li>{@link JAXBContextImpl} builds itself by reading the model and
- * composing unmarshallers and marshallers.
- * </ol>
- *
- * <h1>Interesting Pieces inside Runtime</h1>
- * <p>
- * The followings are the interesting pieces inside the runtime.
- *
- * <dl>
- * <dt>{@link com.sun.xml.internal.bind.v2.model model}
- * <dd>
- * This set of classes and interfaces models JAXB-bound types.
- *
- * <dt>{@link com.sun.xml.internal.bind.v2.runtime XML I/O}
- * <dd>
- * This set of classes implements the JAXB API and provides the XML I/O functionality.
- * </dl>
- *
- * <p>
- * The classes <b>NOT</b> in the {@link com.sun.xml.internal.bind.v2} package (and its subpackages)
- * are also used by old JAXB 1.0 clients.
- *
- * <h1>Models</h1>
- * <p>
- * "Model" is the portion of the code that represents JAXB-bound types.
- *
- * <p>
- * The following picture illustrates the relationship among major
- * packages of the binding model.
- *
- * <div>
- * <img src="doc-files/packages.png"/>
- * </div>
- *
- * <p>
- * The core model contracts are all interfaces, and they are parameterized
- * so that they can be used
- * with different reflection libraries. This is necessary, as the model
- * is used:
- * <ol>
- * <li> at runtime to process loaded classes,
- * <li> at tool-time to process source files / class files, and
- * <li> at schema compile time to generate source code.
- * </ol>
- * They all use different reflection libraries.
- *
- * <p>
- * This portion is used by all
- * three running mode of JAXB.
- * <a href="model/impl/package-summary.html">The corresponding base-level implementaion</a>
- * is also parameterized.
- *
- * <p>
- * The runtime model contract and implementation are used only at the run-time.
- * These packages fix the parameterization to the Java reflection,
- * and also exposes additional functionalities to actually do the
- * unmarshalling/marshalling. These classes have "Runtime" prefix.
- *
- * <p>
- * Finally XJC has its own implementation of the contract in
- * its own package. This package also fixes the parameterization
- * to its own reflection library.
- *
- * <p>
- * When you work on the code, it is often helpful to know the layer you are in.
- *
- *
- * <p>
- * The binding model design roughly looks like the following.
- * For more details, see the javadoc of each component.
- *
- * <div>
- * <img src="doc-files/j2s_architecture.gif"/>
- * </div>
- *
- * <b><i>TODO: link to classes from above pictures</i></b>
- *
- *
- * <h3>Evolution Rules</h3>
- * None of the class in this package or below should be directly
- * referenced by the generated code. Hence they can be changed freely
- * from versions to versions.
- *
- *
- *
- *
- * <h1>Performance Characteristics</h1>
- * <p>
- * Model construction happens inside {@link JAXBContext#newInstance(Class[])}.
- * It's desirable for this step to be fast and consume less memory,
- * but it's not too performance sensitive.
- *
- * <p>
- * Code that implements the unmarshaller and the marshaller OTOH
- * needs to be very carefully written to achieve maximum sustaining
- * performance.
- *
- *
- *
- *
- * <h1>Bootstrap Sequence</h1>
- * <p>
- * The following picture illustrates how the {@link JAXBContext#newInstance(Class[])} method
- * triggers activities.
- *
- * {@SequenceDiagram
- boxwid=1.2;
-
- pobject(U,"user");
- object(A,"JAXB API");
- object(CF,"ContextFactory");
- pobject(JC);
- step();
-
- message(U,A,"JAXBContext.newInstance()");
- active(A);
- message(A,A,"locate JAXB RI 2.0");
- active(A);
- step();
- inactive(A);
-
- message(A,CF,"createContext");
- active(CF);
-
- create_message(CF,JC,"c:JAXBContextImpl");
- active(JC);
-
- message(JC,JC,"build runtime model");
- message(JC,JC,"build JaxBeanInfos");
- inactive(JC);
-
- rmessage(A,U,"return c");
- inactive(CF);
- inactive(A);
-
- complete(JC);
- complete(CF);
- complete(A);
- * }
- *
- * @ArchitectureDocument
- */
-package com.sun.xml.internal.bind.v2;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/AnyTypeBeanInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/AnyTypeBeanInfo.java
deleted file mode 100644
index 5f2c6ba3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/AnyTypeBeanInfo.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.io.IOException;
-
-import javax.xml.bind.annotation.W3CDomHandler;
-import javax.xml.bind.helpers.ValidationEventImpl;
-import javax.xml.bind.ValidationEvent;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfo;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.DomLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiTypeLoader;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-/**
- * {@link JaxBeanInfo} for handling <tt>xs:anyType</tt>.
- *
- * @author Kohsuke Kawaguchi
- */
-final class AnyTypeBeanInfo extends JaxBeanInfo<Object> implements AttributeAccessor {
-
- private boolean nilIncluded = false;
-
- public AnyTypeBeanInfo(JAXBContextImpl grammar,RuntimeTypeInfo anyTypeInfo) {
- super(grammar, anyTypeInfo, Object.class, new QName(WellKnownNamespace.XML_SCHEMA,"anyType"), false, true, false);
- }
-
- public String getElementNamespaceURI(Object element) {
- throw new UnsupportedOperationException();
- }
-
- public String getElementLocalName(Object element) {
- throw new UnsupportedOperationException();
- }
-
- public Object createInstance(UnmarshallingContext context) {
- throw new UnsupportedOperationException();
- // return JAXBContextImpl.createDom().createElementNS("","noname");
- }
-
- public boolean reset(Object element, UnmarshallingContext context) {
- return false;
-// NodeList nl = element.getChildNodes();
-// while(nl.getLength()>0)
-// element.removeChild(nl.item(0));
-// NamedNodeMap al = element.getAttributes();
-// while(al.getLength()>0)
-// element.removeAttributeNode((Attr)al.item(0));
-// return true;
- }
-
- public String getId(Object element, XMLSerializer target) {
- return null;
- }
-
- public void serializeBody(Object element, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
- NodeList childNodes = ((Element)element).getChildNodes();
- int len = childNodes.getLength();
- for( int i=0; i<len; i++ ) {
- Node child = childNodes.item(i);
- switch(child.getNodeType()) {
- case Node.CDATA_SECTION_NODE:
- case Node.TEXT_NODE:
- target.text(child.getNodeValue(),null);
- break;
- case Node.ELEMENT_NODE:
- target.writeDom((Element)child,domHandler,null,null);
- break;
- }
- }
- }
-
- public void serializeAttributes(Object element, XMLSerializer target) throws SAXException {
- NamedNodeMap al = ((Element)element).getAttributes();
- int len = al.getLength();
- for( int i=0; i<len; i++ ) {
- Attr a = (Attr)al.item(i);
- // work defensively
- String uri = a.getNamespaceURI();
- if(uri==null) uri="";
- String local = a.getLocalName();
- String name = a.getName();
- if(local==null) local = name;
- if (uri.equals(WellKnownNamespace.XML_SCHEMA_INSTANCE) && ("nil".equals(local))) {
- isNilIncluded = true;
- }
- if(name.startsWith("xmlns")) continue;// DOM reports ns decls as attributes
-
- target.attribute(uri,local,a.getValue());
- }
- }
-
- public void serializeRoot(Object element, XMLSerializer target) throws SAXException {
- target.reportError(
- new ValidationEventImpl(
- ValidationEvent.ERROR,
- Messages.UNABLE_TO_MARSHAL_NON_ELEMENT.format(element.getClass().getName()),
- null,
- null));
- }
-
- public void serializeURIs(Object element, XMLSerializer target) {
- NamedNodeMap al = ((Element)element).getAttributes();
- int len = al.getLength();
- NamespaceContext2 context = target.getNamespaceContext();
- for( int i=0; i<len; i++ ) {
- Attr a = (Attr)al.item(i);
- if ("xmlns".equals(a.getPrefix())) {
- context.force(a.getValue(), a.getLocalName());
- continue;
- }
- if ("xmlns".equals(a.getName())) {
- if (element instanceof org.w3c.dom.Element) {
- context.declareNamespace(a.getValue(), null, false);
- continue;
- } else {
- context.force(a.getValue(), "");
- continue;
- }
- }
- String nsUri = a.getNamespaceURI();
- if(nsUri!=null && nsUri.length()>0)
- context.declareNamespace( nsUri, a.getPrefix(), true );
- }
- }
-
- public Transducer<Object> getTransducer() {
- return null;
- }
-
- public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
- if(typeSubstitutionCapable)
- return substLoader;
- else
- return domLoader;
- }
-
- private static final W3CDomHandler domHandler = new W3CDomHandler();
- private static final DomLoader domLoader = new DomLoader(domHandler);
- private final XsiTypeLoader substLoader = new XsiTypeLoader(this);
-
- }
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ArrayBeanInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ArrayBeanInfoImpl.java
deleted file mode 100644
index 4cef4dde..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ArrayBeanInfoImpl.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime;
-
-import java.io.IOException;
-import java.lang.reflect.Array;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.helpers.ValidationEventImpl;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeArrayInfo;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Receiver;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.TagName;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link JaxBeanInfo} implementation that binds T[] to a complex type
- * with an element for each item.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ArrayBeanInfoImpl extends JaxBeanInfo {
-
- private final Class itemType;
- private final JaxBeanInfo itemBeanInfo;
- private Loader loader;
-
- public ArrayBeanInfoImpl(JAXBContextImpl owner, RuntimeArrayInfo rai) {
- super(owner,rai,rai.getType(), rai.getTypeName(), false, true, false);
- this.itemType = jaxbType.getComponentType();
- this.itemBeanInfo = owner.getOrCreate(rai.getItemType());
- }
-
- @Override
- protected void link(JAXBContextImpl grammar) {
- getLoader(grammar,false);
- super.link(grammar);
- }
-
- private final class ArrayLoader extends Loader implements Receiver {
- public ArrayLoader(JAXBContextImpl owner) {
- super(false);
- itemLoader = itemBeanInfo.getLoader(owner,true);
- }
-
- private final Loader itemLoader;
-
- @Override
- public void startElement(UnmarshallingContext.State state, TagName ea) {
- state.setTarget(new ArrayList());
- }
-
- @Override
- public void leaveElement(UnmarshallingContext.State state, TagName ea) {
- state.setTarget(toArray((List)state.getTarget()));
- }
-
- @Override
- public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- if(ea.matches("","item")) {
- state.setLoader(itemLoader);
- state.setReceiver(this);
- } else {
- super.childElement(state,ea);
- }
- }
-
- @Override
- public Collection<QName> getExpectedChildElements() {
- return Collections.singleton(new QName("","item"));
- }
-
- public void receive(UnmarshallingContext.State state, Object o) {
- ((List)state.getTarget()).add(o);
- }
- }
-
- protected Object toArray( List list ) {
- int len = list.size();
- Object array = Array.newInstance(itemType,len);
- for( int i=0; i<len; i++ )
- Array.set(array,i,list.get(i));
- return array;
- }
-
- public void serializeBody(Object array, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
- int len = Array.getLength(array);
- for( int i=0; i<len; i++ ) {
- Object item = Array.get(array,i);
- // TODO: check the namespace URI.
- target.startElement("","item",null,null);
- if(item==null) {
- target.writeXsiNilTrue();
- } else {
- target.childAsXsiType(item,"arrayItem",itemBeanInfo, false);
- }
- target.endElement();
- }
- }
-
- public final String getElementNamespaceURI(Object array) {
- throw new UnsupportedOperationException();
- }
-
- public final String getElementLocalName(Object array) {
- throw new UnsupportedOperationException();
- }
-
- public final Object createInstance(UnmarshallingContext context) {
- // we first create a List and then later convert it to an array
- return new ArrayList();
- }
-
- public final boolean reset(Object array, UnmarshallingContext context) {
- return false;
- }
-
- public final String getId(Object array, XMLSerializer target) {
- return null;
- }
-
- public final void serializeAttributes(Object array, XMLSerializer target) {
- // noop
- }
-
- public final void serializeRoot(Object array, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
- target.reportError(
- new ValidationEventImpl(
- ValidationEvent.ERROR,
- Messages.UNABLE_TO_MARSHAL_NON_ELEMENT.format(array.getClass().getName()),
- null,
- null));
- }
-
- public final void serializeURIs(Object array, XMLSerializer target) {
- // noop
- }
-
- public final Transducer getTransducer() {
- return null;
- }
-
- public final Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
- if(loader==null)
- loader = new ArrayLoader(context);
-
- // type substitution not possible
- return loader;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/AssociationMap.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/AssociationMap.java
deleted file mode 100644
index 8b94bd9c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/AssociationMap.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.util.HashSet;
-import java.util.IdentityHashMap;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Bi-directional map between elements, inner peers,
- * and outer peers.
- *
- * <p>
- * TODO: this should be rewritten for efficiency.
- *
- * @since 2.0
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class AssociationMap<XmlNode> {
- final static class Entry<XmlNode> {
- /** XML element. */
- private XmlNode element;
- /** inner peer, or null. */
- private Object inner;
- /** outer peer, or null. */
- private Object outer;
-
- public XmlNode element() {
- return element;
- }
- public Object inner() {
- return inner;
- }
- public Object outer() {
- return outer;
- }
- }
-
- private final Map<XmlNode,Entry<XmlNode>> byElement = new IdentityHashMap<XmlNode,Entry<XmlNode>>();
- private final Map<Object,Entry<XmlNode>> byPeer = new IdentityHashMap<Object,Entry<XmlNode>>();
- private final Set<XmlNode> usedNodes = new HashSet<XmlNode>();
-
- /** Records the new element&lt;->inner peer association. */
- public void addInner( XmlNode element, Object inner ) {
- Entry<XmlNode> e = byElement.get(element);
- if(e!=null) {
- if(e.inner!=null)
- byPeer.remove(e.inner);
- e.inner = inner;
- } else {
- e = new Entry<XmlNode>();
- e.element = element;
- e.inner = inner;
- }
-
- byElement.put(element,e);
-
- Entry<XmlNode> old = byPeer.put(inner,e);
- if(old!=null) {
- if(old.outer!=null)
- byPeer.remove(old.outer);
- if(old.element!=null)
- byElement.remove(old.element);
- }
- }
-
- /** Records the new element&lt;->outer peer association. */
- public void addOuter( XmlNode element, Object outer ) {
- Entry<XmlNode> e = byElement.get(element);
- if(e!=null) {
- if(e.outer!=null)
- byPeer.remove(e.outer);
- e.outer = outer;
- } else {
- e = new Entry<XmlNode>();
- e.element = element;
- e.outer = outer;
- }
-
- byElement.put(element,e);
-
- Entry<XmlNode> old = byPeer.put(outer,e);
- if(old!=null) {
- old.outer=null;
-
- if(old.inner==null)
- // remove this entry
- byElement.remove(old.element);
- }
- }
-
- public void addUsed( XmlNode n ) {
- usedNodes.add(n);
- }
-
- public Entry<XmlNode> byElement( Object e ) {
- return byElement.get(e);
- }
-
- public Entry<XmlNode> byPeer( Object o ) {
- return byPeer.get(o);
- }
-
- public Object getInnerPeer( XmlNode element ) {
- Entry e = byElement(element);
- if(e==null) return null;
- else return e.inner;
- }
-
- public Object getOuterPeer( XmlNode element ) {
- Entry e = byElement(element);
- if(e==null) return null;
- else return e.outer;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/AttributeAccessor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/AttributeAccessor.java
deleted file mode 100644
index dae4ecec..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/AttributeAccessor.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-/**
- *
- * @author snajper
- */
-public interface AttributeAccessor<BeanT> {
-
- public boolean isNilIncluded();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BinderImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BinderImpl.java
deleted file mode 100644
index 264b5705..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BinderImpl.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import javax.xml.bind.Binder;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.PropertyException;
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.validation.Schema;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.unmarshaller.InfosetScanner;
-import com.sun.xml.internal.bind.v2.runtime.output.DOMOutput;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.InterningXmlVisitor;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-
-/**
- * Implementation of {@link Binder}.
- *
- * TODO: investigate how much in-place unmarshalling is implemented
- * - some preliminary work is there. Probably buggy.
- * TODO: work on the marshaller side.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class BinderImpl<XmlNode> extends Binder<XmlNode> {
-
- /**
- * The parent context object.
- */
- private final JAXBContextImpl context;
-
- /**
- * Lazily created unmarshaller to do XML->Java binding.
- * @see #getUnmarshaller()
- */
- private UnmarshallerImpl unmarshaller;
-
- /**
- * Lazily create marshaller to do Java->XML binding.
- * @see #getMarshaller()
- */
- private MarshallerImpl marshaller;
-
- private final InfosetScanner<XmlNode> scanner;
-
- /**
- * A {@link Binder} always works with the same
- * association map.
- */
- private final AssociationMap<XmlNode> assoc = new AssociationMap<XmlNode>();
-
- BinderImpl(JAXBContextImpl _context,InfosetScanner<XmlNode> scanner) {
- this.context = _context;
- this.scanner = scanner;
- }
-
- private UnmarshallerImpl getUnmarshaller() {
- if(unmarshaller==null)
- unmarshaller = new UnmarshallerImpl(context,assoc);
- return unmarshaller;
- }
-
- private MarshallerImpl getMarshaller() {
- if(marshaller==null)
- marshaller = new MarshallerImpl(context,assoc);
- return marshaller;
- }
-
- public void marshal(Object jaxbObject, XmlNode xmlNode) throws JAXBException {
- if ((xmlNode == null) || (jaxbObject == null))
- throw new IllegalArgumentException();
- getMarshaller().marshal(jaxbObject,createOutput(xmlNode));
- }
-
- // TODO move this to a sub class once we support something other than W3C DOM
- private DOMOutput createOutput(XmlNode xmlNode) {
- return new DOMOutput((Node)xmlNode,assoc);
- }
-
-
- public Object updateJAXB(XmlNode xmlNode) throws JAXBException {
- return associativeUnmarshal(xmlNode,true,null);
- }
-
- public Object unmarshal( XmlNode xmlNode ) throws JAXBException {
- return associativeUnmarshal(xmlNode,false,null);
- }
-
- public <T> JAXBElement<T> unmarshal(XmlNode xmlNode, Class<T> expectedType) throws JAXBException {
- if(expectedType==null) throw new IllegalArgumentException();
- return (JAXBElement)associativeUnmarshal(xmlNode,true,expectedType);
- }
-
- public void setSchema(Schema schema) {
- getMarshaller().setSchema(schema);
- getUnmarshaller().setSchema(schema);
- }
-
- public Schema getSchema() {
- return getUnmarshaller().getSchema();
- }
-
- private Object associativeUnmarshal(XmlNode xmlNode, boolean inplace, Class expectedType) throws JAXBException {
- if (xmlNode == null)
- throw new IllegalArgumentException();
-
- JaxBeanInfo bi = null;
- if(expectedType!=null)
- bi = context.getBeanInfo(expectedType, true);
-
- InterningXmlVisitor handler = new InterningXmlVisitor(
- getUnmarshaller().createUnmarshallerHandler(scanner,inplace,bi));
- scanner.setContentHandler(new SAXConnector(handler,scanner.getLocator()));
- try {
- scanner.scan(xmlNode);
- } catch( SAXException e ) {
- throw unmarshaller.createUnmarshalException(e);
- }
-
- return handler.getContext().getResult();
- }
-
- public XmlNode getXMLNode(Object jaxbObject) {
- if(jaxbObject==null)
- throw new IllegalArgumentException();
- AssociationMap.Entry<XmlNode> e = assoc.byPeer(jaxbObject);
- if(e==null) return null;
- return e.element();
- }
-
- public Object getJAXBNode(XmlNode xmlNode) {
- if(xmlNode==null)
- throw new IllegalArgumentException();
- AssociationMap.Entry e = assoc.byElement(xmlNode);
- if(e==null) return null;
- if(e.outer()!=null) return e.outer();
- return e.inner();
- }
-
- public XmlNode updateXML(Object jaxbObject) throws JAXBException {
- return updateXML(jaxbObject,getXMLNode(jaxbObject));
- }
-
- public XmlNode updateXML(Object jaxbObject, XmlNode xmlNode) throws JAXBException {
- if(jaxbObject==null || xmlNode==null) throw new IllegalArgumentException();
-
- // TODO
- // for now just marshal
- // TODO: object model independenc
- Element e = (Element)xmlNode;
- Node ns = e.getNextSibling();
- Node p = e.getParentNode();
- p.removeChild(e);
-
- // if the type object is passed, the following step is necessary to make
- // the marshalling successful.
- JaxBeanInfo bi = context.getBeanInfo(jaxbObject, true);
- if(!bi.isElement())
- jaxbObject = new JAXBElement(new QName(e.getNamespaceURI(),e.getLocalName()),bi.jaxbType,jaxbObject);
-
-
- getMarshaller().marshal(jaxbObject,p);
- Node newNode = p.getLastChild();
- p.removeChild(newNode);
- p.insertBefore(newNode,ns);
-
- return (XmlNode)newNode;
- }
-
- public void setEventHandler(ValidationEventHandler handler) throws JAXBException {
- getUnmarshaller().setEventHandler(handler);
- getMarshaller().setEventHandler(handler);
- }
-
- public ValidationEventHandler getEventHandler() {
- return getUnmarshaller().getEventHandler();
- }
-
- public Object getProperty(String name) throws PropertyException {
- if (name == null)
- throw new IllegalArgumentException(Messages.NULL_PROPERTY_NAME.format());
-
- // exclude RI properties that don't make sense for Binder
- if (excludeProperty(name)) {
- throw new PropertyException(name);
- }
-
- Object prop = null;
- PropertyException pe = null;
-
- try {
- prop = getMarshaller().getProperty(name);
- return prop;
- } catch (PropertyException p) {
- pe = p;
- }
-
- try {
- prop = getUnmarshaller().getProperty(name);
- return prop;
- } catch (PropertyException p) {
- pe = p;
- }
-
- pe.setStackTrace(Thread.currentThread().getStackTrace());
- throw pe;
- }
-
- public void setProperty(String name, Object value) throws PropertyException {
- if (name == null)
- throw new IllegalArgumentException(Messages.NULL_PROPERTY_NAME.format());
-
- // exclude RI properties that don't make sense for Binder
- if (excludeProperty(name)) {
- throw new PropertyException(name, value);
- }
-
- PropertyException pe = null;
-
- try {
- getMarshaller().setProperty(name, value);
- return;
- } catch (PropertyException p) {
- pe = p;
- }
-
- try {
- getUnmarshaller().setProperty(name, value);
- return;
- } catch (PropertyException p) {
- pe = p;
- }
-
- // replace the stacktrace - we don't want to see a trace
- // originating from Un|Marshaller.setProperty
- pe.setStackTrace(Thread.currentThread().getStackTrace());
- throw pe;
- }
-
- private boolean excludeProperty(String name) {
- return name.equals(
- MarshallerImpl.ENCODING_HANDLER) ||
- name.equals(MarshallerImpl.XMLDECLARATION) ||
- name.equals(MarshallerImpl.XML_HEADERS);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BridgeAdapter.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BridgeAdapter.java
deleted file mode 100644
index 252f0ea6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BridgeAdapter.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.MarshalException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.UnmarshalException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.bind.api.TypeReference;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl;
-
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-/**
- * {@link Bridge} decorator for {@link XmlAdapter}.
- *
- * @author Kohsuke Kawaguchi
- */
-final class BridgeAdapter<OnWire,InMemory> extends InternalBridge<InMemory> {
- private final InternalBridge<OnWire> core;
- private final Class<? extends XmlAdapter<OnWire,InMemory>> adapter;
-
- public BridgeAdapter(InternalBridge<OnWire> core, Class<? extends XmlAdapter<OnWire,InMemory>> adapter) {
- super(core.getContext());
- this.core = core;
- this.adapter = adapter;
- }
-
- public void marshal(Marshaller m, InMemory inMemory, XMLStreamWriter output) throws JAXBException {
- core.marshal(m,adaptM(m,inMemory),output);
- }
-
- public void marshal(Marshaller m, InMemory inMemory, OutputStream output, NamespaceContext nsc) throws JAXBException {
- core.marshal(m,adaptM(m,inMemory),output,nsc);
- }
-
- public void marshal(Marshaller m, InMemory inMemory, Node output) throws JAXBException {
- core.marshal(m,adaptM(m,inMemory),output);
- }
-
- public void marshal(Marshaller context, InMemory inMemory, ContentHandler contentHandler) throws JAXBException {
- core.marshal(context,adaptM(context,inMemory),contentHandler);
- }
-
- public void marshal(Marshaller context, InMemory inMemory, Result result) throws JAXBException {
- core.marshal(context,adaptM(context,inMemory),result);
- }
-
- private OnWire adaptM(Marshaller m,InMemory v) throws JAXBException {
- XMLSerializer serializer = ((MarshallerImpl)m).serializer;
- serializer.pushCoordinator();
- try {
- return _adaptM(serializer, v);
- } finally {
- serializer.popCoordinator();
- }
- }
-
- private OnWire _adaptM(XMLSerializer serializer, InMemory v) throws MarshalException {
- XmlAdapter<OnWire,InMemory> a = serializer.getAdapter(adapter);
- try {
- return a.marshal(v);
- } catch (Exception e) {
- serializer.handleError(e,v,null);
- throw new MarshalException(e);
- }
- }
-
-
- public @NotNull InMemory unmarshal(Unmarshaller u, XMLStreamReader in) throws JAXBException {
- return adaptU(u, core.unmarshal(u,in));
- }
-
- public @NotNull InMemory unmarshal(Unmarshaller u, Source in) throws JAXBException {
- return adaptU(u, core.unmarshal(u,in));
- }
-
- public @NotNull InMemory unmarshal(Unmarshaller u, InputStream in) throws JAXBException {
- return adaptU(u, core.unmarshal(u,in));
- }
-
- public @NotNull InMemory unmarshal(Unmarshaller u, Node n) throws JAXBException {
- return adaptU(u, core.unmarshal(u,n));
- }
-
- public TypeReference getTypeReference() {
- return core.getTypeReference();
- }
-
- private @NotNull InMemory adaptU(Unmarshaller _u, OnWire v) throws JAXBException {
- UnmarshallerImpl u = (UnmarshallerImpl) _u;
- XmlAdapter<OnWire,InMemory> a = u.coordinator.getAdapter(adapter);
- u.coordinator.pushCoordinator();
- try {
- return a.unmarshal(v);
- } catch (Exception e) {
- throw new UnmarshalException(e);
- } finally {
- u.coordinator.popCoordinator();
- }
- }
-
- void marshal(InMemory o, XMLSerializer out) throws IOException, SAXException, XMLStreamException {
- try {
- core.marshal(_adaptM( XMLSerializer.getInstance(), o ), out );
- } catch (MarshalException e) {
- // recover from error by not marshalling this element.
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BridgeContextImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BridgeContextImpl.java
deleted file mode 100644
index 96599c9f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BridgeContextImpl.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-
-import com.sun.xml.internal.bind.api.BridgeContext;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl;
-
-/**
- * {@link BridgeContext} implementation.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class BridgeContextImpl extends BridgeContext {
-
- public final UnmarshallerImpl unmarshaller;
- public final MarshallerImpl marshaller;
-
- BridgeContextImpl(JAXBContextImpl context) {
- unmarshaller = context.createUnmarshaller();
- marshaller = context.createMarshaller();
- }
-
- public void setErrorHandler(ValidationEventHandler handler) {
- try {
- unmarshaller.setEventHandler(handler);
- marshaller.setEventHandler(handler);
- } catch (JAXBException e) {
- // impossible
- throw new Error(e);
- }
- }
-
- public void setAttachmentMarshaller(AttachmentMarshaller m) {
- marshaller.setAttachmentMarshaller(m);
- }
-
- public void setAttachmentUnmarshaller(AttachmentUnmarshaller u) {
- unmarshaller.setAttachmentUnmarshaller(u);
- }
-
- public AttachmentMarshaller getAttachmentMarshaller() {
- return marshaller.getAttachmentMarshaller();
- }
-
- public AttachmentUnmarshaller getAttachmentUnmarshaller() {
- return unmarshaller.getAttachmentUnmarshaller();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BridgeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BridgeImpl.java
deleted file mode 100644
index 27eda797..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/BridgeImpl.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.bind.api.TypeReference;
-import com.sun.xml.internal.bind.marshaller.SAX2DOMEx;
-import com.sun.xml.internal.bind.v2.runtime.output.SAXOutput;
-import com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl;
-
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-/**
- * {@link Bridge} implementaiton.
- *
- * @author Kohsuke Kawaguchi
- */
-final class BridgeImpl<T> extends InternalBridge<T> {
-
- /**
- * Tag name associated with this {@link Bridge}.
- * Used for marshalling.
- */
- private final Name tagName;
- private final JaxBeanInfo<T> bi;
- private final TypeReference typeRef;
-
- public BridgeImpl(JAXBContextImpl context, Name tagName, JaxBeanInfo<T> bi,TypeReference typeRef) {
- super(context);
- this.tagName = tagName;
- this.bi = bi;
- this.typeRef = typeRef;
- }
-
- public void marshal(Marshaller _m, T t, XMLStreamWriter output) throws JAXBException {
- MarshallerImpl m = (MarshallerImpl)_m;
- m.write(tagName,bi,t,XMLStreamWriterOutput.create(output,context),new StAXPostInitAction(output,m.serializer));
- }
-
- public void marshal(Marshaller _m, T t, OutputStream output, NamespaceContext nsContext) throws JAXBException {
- MarshallerImpl m = (MarshallerImpl)_m;
-
- Runnable pia = null;
- if(nsContext!=null)
- pia = new StAXPostInitAction(nsContext,m.serializer);
-
- m.write(tagName,bi,t,m.createWriter(output),pia);
- }
-
- public void marshal(Marshaller _m, T t, Node output) throws JAXBException {
- MarshallerImpl m = (MarshallerImpl)_m;
- m.write(tagName,bi,t,new SAXOutput(new SAX2DOMEx(output)),new DomPostInitAction(output,m.serializer));
- }
-
- public void marshal(Marshaller _m, T t, ContentHandler contentHandler) throws JAXBException {
- MarshallerImpl m = (MarshallerImpl)_m;
- m.write(tagName,bi,t,new SAXOutput(contentHandler),null);
- }
-
- public void marshal(Marshaller _m, T t, Result result) throws JAXBException {
- MarshallerImpl m = (MarshallerImpl)_m;
- m.write(tagName,bi,t, m.createXmlOutput(result),m.createPostInitAction(result));
- }
-
- public @NotNull T unmarshal(Unmarshaller _u, XMLStreamReader in) throws JAXBException {
- UnmarshallerImpl u = (UnmarshallerImpl)_u;
- return ((JAXBElement<T>)u.unmarshal0(in,bi)).getValue();
- }
-
- public @NotNull T unmarshal(Unmarshaller _u, Source in) throws JAXBException {
- UnmarshallerImpl u = (UnmarshallerImpl)_u;
- return ((JAXBElement<T>)u.unmarshal0(in,bi)).getValue();
- }
-
- public @NotNull T unmarshal(Unmarshaller _u, InputStream in) throws JAXBException {
- UnmarshallerImpl u = (UnmarshallerImpl)_u;
- return ((JAXBElement<T>)u.unmarshal0(in,bi)).getValue();
- }
-
- public @NotNull T unmarshal(Unmarshaller _u, Node n) throws JAXBException {
- UnmarshallerImpl u = (UnmarshallerImpl)_u;
- return ((JAXBElement<T>)u.unmarshal0(n,bi)).getValue();
- }
-
- public TypeReference getTypeReference() {
- return typeRef;
- }
-
- public void marshal(T value, XMLSerializer out) throws IOException, SAXException, XMLStreamException {
- out.startElement(tagName,null);
- if(value==null) {
- out.writeXsiNilTrue();
- } else {
- out.childAsXsiType(value,null,bi,false);
- }
- out.endElement();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java
deleted file mode 100644
index bd6f6cd8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java
+++ /dev/null
@@ -1,439 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.helpers.ValidationEventImpl;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.istack.internal.FinalArrayList;
-import com.sun.xml.internal.bind.Util;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.ClassFactory;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeClassInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.property.AttributeProperty;
-import com.sun.xml.internal.bind.v2.runtime.property.Property;
-import com.sun.xml.internal.bind.v2.runtime.property.PropertyFactory;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.StructureLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiTypeLoader;
-
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.LocatorImpl;
-
-/**
- * {@link JaxBeanInfo} implementation for j2s bean.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class ClassBeanInfoImpl<BeanT> extends JaxBeanInfo<BeanT> implements AttributeAccessor<BeanT> {
-
- /**
- * Properties of this bean class but not its ancestor classes.
- */
- public final Property<BeanT>[] properties;
-
- /**
- * Non-null if this bean has an ID property.
- */
- private Property<? super BeanT> idProperty;
-
- /**
- * Immutable configured loader for this class.
- *
- * <p>
- * Set from the link method, but considered final.
- */
- private Loader loader;
- private Loader loaderWithTypeSubst;
-
- /**
- * Set only until the link phase to avoid leaking memory.
- */
- private RuntimeClassInfo ci;
-
- private final Accessor<? super BeanT,Map<QName,String>> inheritedAttWildcard;
- private final Transducer<BeanT> xducer;
-
- /**
- * {@link ClassBeanInfoImpl} that represents the super class of {@link #jaxbType}.
- */
- public final ClassBeanInfoImpl<? super BeanT> superClazz;
-
- private final Accessor<? super BeanT,Locator> xmlLocatorField;
-
- private final Name tagName;
-
- private boolean retainPropertyInfo = false;
-
- /**
- * The {@link AttributeProperty}s for this type and all its ancestors.
- * If {@link JAXBContextImpl#c14nSupport} is true, this is sorted alphabetically.
- */
- private /*final*/ AttributeProperty<BeanT>[] attributeProperties;
-
- /**
- * {@link Property}s that need to receive {@link Property#serializeURIs(Object, XMLSerializer)} callback.
- */
- private /*final*/ Property<BeanT>[] uriProperties;
-
- private final Method factoryMethod;
-
- /*package*/ ClassBeanInfoImpl(JAXBContextImpl owner, RuntimeClassInfo ci) {
- super(owner,ci,ci.getClazz(),ci.getTypeName(),ci.isElement(),false,true);
-
- this.ci = ci;
- this.inheritedAttWildcard = ci.getAttributeWildcard();
- this.xducer = ci.getTransducer();
- this.factoryMethod = ci.getFactoryMethod();
- this.retainPropertyInfo = owner.retainPropertyInfo;
-
- // make the factory accessible
- if(factoryMethod!=null) {
- int classMod = factoryMethod.getDeclaringClass().getModifiers();
-
- if(!Modifier.isPublic(classMod) || !Modifier.isPublic(factoryMethod.getModifiers())) {
- // attempt to make it work even if the constructor is not accessible
- try {
- factoryMethod.setAccessible(true);
- } catch(SecurityException e) {
- // but if we don't have a permission to do so, work gracefully.
- logger.log(Level.FINE,"Unable to make the method of "+factoryMethod+" accessible",e);
- throw e;
- }
- }
- }
-
-
- if(ci.getBaseClass()==null)
- this.superClazz = null;
- else
- this.superClazz = owner.getOrCreate(ci.getBaseClass());
-
- if(superClazz!=null && superClazz.xmlLocatorField!=null)
- xmlLocatorField = superClazz.xmlLocatorField;
- else
- xmlLocatorField = ci.getLocatorField();
-
- // create property objects
- Collection<? extends RuntimePropertyInfo> ps = ci.getProperties();
- this.properties = new Property[ps.size()];
- int idx=0;
- boolean elementOnly = true;
- for( RuntimePropertyInfo info : ps ) {
- Property p = PropertyFactory.create(owner,info);
- if(info.id()==ID.ID)
- idProperty = p;
- properties[idx++] = p;
- elementOnly &= info.elementOnlyContent();
- checkOverrideProperties(p);
- }
- // super class' idProperty might not be computed at this point,
- // so check that later
-
- hasElementOnlyContentModel( elementOnly );
- // again update this value later when we know that of the super class
-
- if(ci.isElement())
- tagName = owner.nameBuilder.createElementName(ci.getElementName());
- else
- tagName = null;
-
- setLifecycleFlags();
- }
-
- private void checkOverrideProperties(Property p) {
- ClassBeanInfoImpl bi = this;
- while ((bi = bi.superClazz) != null) {
- Property[] props = bi.properties;
- if (props == null) break;
- for (Property superProperty : props) {
- if (superProperty != null) {
- String spName = superProperty.getFieldName();
- if ((spName != null) && (spName.equals(p.getFieldName()))) {
- superProperty.setHiddenByOverride(true);
- }
- }
- }
- }
- }
-
- @Override
- protected void link(JAXBContextImpl grammar) {
- if(uriProperties!=null)
- return; // avoid linking twice
-
- super.link(grammar);
-
- if(superClazz!=null)
- superClazz.link(grammar);
-
- getLoader(grammar,true); // make sure to build the loader if we haven't done so.
-
- // propagate values from super class
- if(superClazz!=null) {
- if(idProperty==null)
- idProperty = superClazz.idProperty;
-
- if(!superClazz.hasElementOnlyContentModel())
- hasElementOnlyContentModel(false);
- }
-
- // create a list of attribute/URI handlers
- List<AttributeProperty> attProps = new FinalArrayList<AttributeProperty>();
- List<Property> uriProps = new FinalArrayList<Property>();
- for (ClassBeanInfoImpl bi = this; bi != null; bi = bi.superClazz) {
- for (int i = 0; i < bi.properties.length; i++) {
- Property p = bi.properties[i];
- if(p instanceof AttributeProperty)
- attProps.add((AttributeProperty) p);
- if(p.hasSerializeURIAction())
- uriProps.add(p);
- }
- }
- if(grammar.c14nSupport)
- Collections.sort(attProps);
-
- if(attProps.isEmpty())
- attributeProperties = EMPTY_PROPERTIES;
- else
- attributeProperties = attProps.toArray(new AttributeProperty[attProps.size()]);
-
- if(uriProps.isEmpty())
- uriProperties = EMPTY_PROPERTIES;
- else
- uriProperties = uriProps.toArray(new Property[uriProps.size()]);
- }
-
- @Override
- public void wrapUp() {
- for (Property p : properties)
- p.wrapUp();
- ci = null;
- super.wrapUp();
- }
-
- public String getElementNamespaceURI(BeanT bean) {
- return tagName.nsUri;
- }
-
- public String getElementLocalName(BeanT bean) {
- return tagName.localName;
- }
-
- public BeanT createInstance(UnmarshallingContext context) throws IllegalAccessException, InvocationTargetException, InstantiationException, SAXException {
-
- BeanT bean = null;
- if (factoryMethod == null){
- bean = ClassFactory.create0(jaxbType);
- }else {
- Object o = ClassFactory.create(factoryMethod);
- if( jaxbType.isInstance(o) ){
- bean = (BeanT)o;
- } else {
- throw new InstantiationException("The factory method didn't return a correct object");
- }
- }
-
- if(xmlLocatorField!=null)
- // need to copy because Locator is mutable
- try {
- xmlLocatorField.set(bean,new LocatorImpl(context.getLocator()));
- } catch (AccessorException e) {
- context.handleError(e);
- }
- return bean;
- }
-
- public boolean reset(BeanT bean, UnmarshallingContext context) throws SAXException {
- try {
- if(superClazz!=null)
- superClazz.reset(bean,context);
- for( Property<BeanT> p : properties )
- p.reset(bean);
- return true;
- } catch (AccessorException e) {
- context.handleError(e);
- return false;
- }
- }
-
- public String getId(BeanT bean, XMLSerializer target) throws SAXException {
- if(idProperty!=null) {
- try {
- return idProperty.getIdValue(bean);
- } catch (AccessorException e) {
- target.reportError(null,e);
- }
- }
- return null;
- }
-
- public void serializeRoot(BeanT bean, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
- if(tagName==null) {
- Class beanClass = bean.getClass();
- String message;
- if (beanClass.isAnnotationPresent(XmlRootElement.class)) {
- message = Messages.UNABLE_TO_MARSHAL_UNBOUND_CLASS.format(beanClass.getName());
- } else {
- message = Messages.UNABLE_TO_MARSHAL_NON_ELEMENT.format(beanClass.getName());
- }
- target.reportError(new ValidationEventImpl(ValidationEvent.ERROR,message,null, null));
- } else {
- target.startElement(tagName,bean);
- target.childAsSoleContent(bean,null);
- target.endElement();
- if (retainPropertyInfo) {
- target.currentProperty.remove();
- }
- }
- }
-
- public void serializeBody(BeanT bean, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
- if (superClazz != null) {
- superClazz.serializeBody(bean, target);
- }
- try {
- for (Property<BeanT> p : properties) {
- if (retainPropertyInfo) {
- target.currentProperty.set(p);
- }
- boolean isThereAnOverridingProperty = p.isHiddenByOverride();
- if (!isThereAnOverridingProperty || bean.getClass().equals(jaxbType)) {
- p.serializeBody(bean, target, null);
- } else if (isThereAnOverridingProperty) {
- // need to double check the override - it should be safe to do after the model has been created because it's targeted to override properties only
- Class beanClass = bean.getClass();
- if (Utils.REFLECTION_NAVIGATOR.getDeclaredField(beanClass, p.getFieldName()) == null) {
- p.serializeBody(bean, target, null);
- }
- }
- }
- } catch (AccessorException e) {
- target.reportError(null, e);
- }
- }
-
- public void serializeAttributes(BeanT bean, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
- for( AttributeProperty<BeanT> p : attributeProperties )
- try {
- if (retainPropertyInfo) {
- final Property parentProperty = target.getCurrentProperty();
- target.currentProperty.set(p);
- p.serializeAttributes(bean,target);
- target.currentProperty.set(parentProperty);
- } else {
- p.serializeAttributes(bean,target);
- }
- if (p.attName.equals(WellKnownNamespace.XML_SCHEMA_INSTANCE, "nil")) {
- isNilIncluded = true;
- }
- } catch (AccessorException e) {
- target.reportError(null,e);
- }
-
- try {
- if(inheritedAttWildcard!=null) {
- Map<QName,String> map = inheritedAttWildcard.get(bean);
- target.attWildcardAsAttributes(map,null);
- }
- } catch (AccessorException e) {
- target.reportError(null,e);
- }
- }
-
- public void serializeURIs(BeanT bean, XMLSerializer target) throws SAXException {
- try {
- if (retainPropertyInfo) {
- final Property parentProperty = target.getCurrentProperty();
- for( Property<BeanT> p : uriProperties ) {
- target.currentProperty.set(p);
- p.serializeURIs(bean,target);
- }
- target.currentProperty.set(parentProperty);
- } else {
- for( Property<BeanT> p : uriProperties ) {
- p.serializeURIs(bean,target);
- }
- }
- if(inheritedAttWildcard!=null) {
- Map<QName,String> map = inheritedAttWildcard.get(bean);
- target.attWildcardAsURIs(map,null);
- }
- } catch (AccessorException e) {
- target.reportError(null,e);
- }
- }
-
- public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
- if(loader==null) {
- // these variables have to be set before they are initialized,
- // because the initialization may build other loaders and they may refer to this.
- StructureLoader sl = new StructureLoader(this);
- loader = sl;
- if(ci.hasSubClasses())
- loaderWithTypeSubst = new XsiTypeLoader(this);
- else
- // optimization. we know there can be no @xsi:type
- loaderWithTypeSubst = loader;
-
-
- sl.init(context,this,ci.getAttributeWildcard());
- }
- if(typeSubstitutionCapable)
- return loaderWithTypeSubst;
- else
- return loader;
- }
-
- public Transducer<BeanT> getTransducer() {
- return xducer;
- }
-
- private static final AttributeProperty[] EMPTY_PROPERTIES = new AttributeProperty[0];
-
- private static final Logger logger = Util.getClassLogger();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/CompositeStructureBeanInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/CompositeStructureBeanInfo.java
deleted file mode 100644
index 5ff96dd6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/CompositeStructureBeanInfo.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.helpers.ValidationEventImpl;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.CompositeStructure;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-
-import org.xml.sax.SAXException;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public class CompositeStructureBeanInfo extends JaxBeanInfo<CompositeStructure> {
- public CompositeStructureBeanInfo(JAXBContextImpl context) {
- super(context,null, CompositeStructure.class,false,true,false);
- }
-
- public String getElementNamespaceURI(CompositeStructure o) {
- throw new UnsupportedOperationException();
- }
-
- public String getElementLocalName(CompositeStructure o) {
- throw new UnsupportedOperationException();
- }
-
- public CompositeStructure createInstance(UnmarshallingContext context) throws IllegalAccessException, InvocationTargetException, InstantiationException, SAXException {
- throw new UnsupportedOperationException();
- }
-
- public boolean reset(CompositeStructure o, UnmarshallingContext context) throws SAXException {
- throw new UnsupportedOperationException();
- }
-
- public String getId(CompositeStructure o, XMLSerializer target) throws SAXException {
- return null;
- }
-
- public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
- // no unmarshaller support for this.
- throw new UnsupportedOperationException();
- }
-
- public void serializeRoot(CompositeStructure o, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
- target.reportError(
- new ValidationEventImpl(
- ValidationEvent.ERROR,
- Messages.UNABLE_TO_MARSHAL_NON_ELEMENT.format(o.getClass().getName()),
- null,
- null));
- }
-
- public void serializeURIs(CompositeStructure o, XMLSerializer target) throws SAXException {
- // noop
- }
-
- public void serializeAttributes(CompositeStructure o, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
- // noop
- }
-
- public void serializeBody(CompositeStructure o, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
- int len = o.bridges.length;
- for( int i=0; i<len; i++ ) {
- Object value = o.values[i];
- InternalBridge bi = (InternalBridge)o.bridges[i];
- bi.marshal( value, target );
- }
- }
-
- public Transducer<CompositeStructure> getTransducer() {
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ContentHandlerAdaptor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ContentHandlerAdaptor.java
deleted file mode 100644
index 7b7081d3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ContentHandlerAdaptor.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime;
-
-import com.sun.istack.internal.FinalArrayList;
-import com.sun.istack.internal.SAXException2;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import javax.xml.stream.XMLStreamException;
-import java.io.IOException;
-
-/**
- * Receives SAX2 events and send the equivalent events to
- * {@link XMLSerializer}
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-final class ContentHandlerAdaptor extends DefaultHandler {
-
- /** Stores newly declared prefix-URI mapping. */
- private final FinalArrayList<String> prefixMap = new FinalArrayList<String>();
-
- /** Events will be sent to this object. */
- private final XMLSerializer serializer;
-
- private final StringBuffer text = new StringBuffer();
-
-
- ContentHandlerAdaptor( XMLSerializer _serializer ) {
- this.serializer = _serializer;
- }
-
- public void startDocument() {
- prefixMap.clear();
- }
-
- public void startPrefixMapping(String prefix, String uri) {
- prefixMap.add(prefix);
- prefixMap.add(uri);
- }
-
- private boolean containsPrefixMapping(String prefix, String uri) {
- for( int i=0; i<prefixMap.size(); i+=2 ) {
- if(prefixMap.get(i).equals(prefix)
- && prefixMap.get(i+1).equals(uri))
- return true;
- }
- return false;
- }
-
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
- throws SAXException {
- try {
- flushText();
-
- int len = atts.getLength();
-
- String p = getPrefix(qName);
-
- // is this prefix going to be declared on this element?
- if(containsPrefixMapping(p,namespaceURI))
- serializer.startElementForce(namespaceURI,localName,p,null);
- else
- serializer.startElement(namespaceURI,localName, p,null);
-
- // declare namespace events
- for (int i = 0; i < prefixMap.size(); i += 2) {
- // forcibly set this binding, instead of using declareNsUri.
- // this guarantees that namespaces used in DOM will show up
- // as-is in the marshalled output (instead of reassigned to something else,
- // which may happen if you'd use declareNsUri.)
- serializer.getNamespaceContext().force(
- prefixMap.get(i + 1), prefixMap.get(i));
- }
- // make sure namespaces needed by attributes are bound
- for( int i=0; i<len; i++ ) {
- String qname = atts.getQName(i);
- if(qname.startsWith("xmlns") || atts.getURI(i).length() == 0)
- continue;
- String prefix = getPrefix(qname);
-
- serializer.getNamespaceContext().declareNamespace(
- atts.getURI(i), prefix, true );
- }
-
- serializer.endNamespaceDecls(null);
- // fire attribute events
- for( int i=0; i<len; i++ ) {
- // be defensive.
- if(atts.getQName(i).startsWith("xmlns"))
- continue;
- serializer.attribute( atts.getURI(i), atts.getLocalName(i), atts.getValue(i));
- }
- prefixMap.clear();
- serializer.endAttributes();
- } catch (IOException e) {
- throw new SAXException2(e);
- } catch (XMLStreamException e) {
- throw new SAXException2(e);
- }
- }
-
- // make sure namespaces needed by attributes are bound
- private String getPrefix(String qname) {
- int idx = qname.indexOf(':');
- String prefix = (idx == -1) ? "" : qname.substring(0, idx);
- return prefix;
- }
-
- public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
- try {
- flushText();
- serializer.endElement();
- } catch (IOException e) {
- throw new SAXException2(e);
- } catch (XMLStreamException e) {
- throw new SAXException2(e);
- }
- }
-
- private void flushText() throws SAXException, IOException, XMLStreamException {
- if( text.length()!=0 ) {
- serializer.text(text.toString(),null);
- text.setLength(0);
- }
- }
-
- public void characters(char[] ch, int start, int length) {
- text.append(ch,start,length);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Coordinator.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Coordinator.java
deleted file mode 100644
index 6e66188b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Coordinator.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.util.HashMap;
-
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.ValidationEventLocator;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.bind.helpers.ValidationEventImpl;
-
-import com.sun.xml.internal.bind.v2.ClassFactory;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * Object that coordinates the marshalling/unmarshalling.
- *
- * <p>
- * This class takes care of the logic that allows code to obtain
- * {@link UnmarshallingContext} and {@link XMLSerializer} instances
- * during the unmarshalling/marshalling.
- *
- * <p>
- * This is done by using a {@link ThreadLocal}. Therefore one unmarshalling/marshalling
- * episode has to be done from the beginning till end by the same thread.
- * (Note that the same {@link Coordinator} can be then used by a different thread
- * for an entirely different episode.)
- *
- * This class also maintains the user-configured instances of {@link XmlAdapter}s.
- *
- * <p>
- * This class implements {@link ErrorHandler} and propages erros to this object
- * as the {@link ValidationEventHandler}, which will be implemented in a derived class.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class Coordinator implements ErrorHandler, ValidationEventHandler {
-
- private final HashMap<Class<? extends XmlAdapter>,XmlAdapter> adapters =
- new HashMap<Class<? extends XmlAdapter>,XmlAdapter>();
-
-
- public final XmlAdapter putAdapter(Class<? extends XmlAdapter> c, XmlAdapter a) {
- if(a==null)
- return adapters.remove(c);
- else
- return adapters.put(c,a);
- }
-
- /**
- * Gets the instance of the adapter.
- *
- * @return
- * always non-null.
- */
- public final <T extends XmlAdapter> T getAdapter(Class<T> key) {
- T v = key.cast(adapters.get(key));
- if(v==null) {
- v = ClassFactory.create(key);
- putAdapter(key,v);
- }
- return v;
- }
-
- public <T extends XmlAdapter> boolean containsAdapter(Class<T> type) {
- return adapters.containsKey(type);
- }
-
- // this much is necessary to avoid calling get and set twice when we push.
- private static final ThreadLocal<Coordinator> activeTable = new ThreadLocal<Coordinator>();
-
- /**
- * The {@link Coordinator} in charge before this {@link Coordinator}.
- */
- private Coordinator old;
-
- /**
- * Called whenever an execution flow enters the realm of this {@link Coordinator}.
- */
- protected final void pushCoordinator() {
- old = activeTable.get();
- activeTable.set(this);
- }
-
- /**
- * Called whenever an execution flow exits the realm of this {@link Coordinator}.
- */
- protected final void popCoordinator() {
- if (old != null)
- activeTable.set(old);
- else
- activeTable.remove();
- old = null; // avoid memory leak
- }
-
- public static Coordinator _getInstance() {
- return activeTable.get();
- }
-
-//
-//
-// ErrorHandler implementation
-//
-//
- /**
- * Gets the current location. Used for reporting the error source location.
- */
- protected abstract ValidationEventLocator getLocation();
-
- public final void error(SAXParseException exception) throws SAXException {
- propagateEvent( ValidationEvent.ERROR, exception );
- }
-
- public final void warning(SAXParseException exception) throws SAXException {
- propagateEvent( ValidationEvent.WARNING, exception );
- }
-
- public final void fatalError(SAXParseException exception) throws SAXException {
- propagateEvent( ValidationEvent.FATAL_ERROR, exception );
- }
-
- private void propagateEvent( int severity, SAXParseException saxException )
- throws SAXException {
-
- ValidationEventImpl ve =
- new ValidationEventImpl( severity, saxException.getMessage(), getLocation() );
-
- Exception e = saxException.getException();
- if( e != null ) {
- ve.setLinkedException( e );
- } else {
- ve.setLinkedException( saxException );
- }
-
- // call the client's event handler. If it returns false, then bail-out
- // and terminate the unmarshal operation.
- boolean result = handleEvent( ve );
- if( ! result ) {
- // bail-out of the parse with a SAX exception, but convert it into
- // an UnmarshalException back in in the AbstractUnmarshaller
- throw saxException;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/DomPostInitAction.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/DomPostInitAction.java
deleted file mode 100644
index 9b08a4e1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/DomPostInitAction.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.xml.XMLConstants;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * Post-init action for {@link MarshallerImpl} that incorporate the in-scope namespace bindings
- * from a DOM node.
- *
- * TODO: do we really need this? think about a better way to put this logic back into marshaller.
- *
- * @author Kohsuke Kawaguchi
- */
-final class DomPostInitAction implements Runnable {
-
- private final Node node;
- private final XMLSerializer serializer;
-
- DomPostInitAction(Node node, XMLSerializer serializer) {
- this.node = node;
- this.serializer = serializer;
- }
-
- // declare the currently in-scope namespace bindings
- public void run() {
- Set<String> declaredPrefixes = new HashSet<String>();
- for( Node n=node; n!=null && n.getNodeType()==Node.ELEMENT_NODE; n=n.getParentNode() ) {
- NamedNodeMap atts = n.getAttributes();
- if(atts==null) continue; // broken DOM. but be graceful.
- for( int i=0; i<atts.getLength(); i++ ) {
- Attr a = (Attr)atts.item(i);
- String nsUri = a.getNamespaceURI();
- if(nsUri==null || !nsUri.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI))
- continue; // not a namespace declaration
- String prefix = a.getLocalName();
- if(prefix==null)
- continue; // broken DOM. skip to be safe
- if(prefix.equals("xmlns")) {
- prefix = "";
- }
- String value = a.getValue();
- if(value==null)
- continue; // broken DOM. skip to be safe
- if(declaredPrefixes.add(prefix)) {
- serializer.addInscopeBinding(value,prefix);
- }
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java
deleted file mode 100644
index 58bcbdf5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime;
-
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.property.Property;
-import com.sun.xml.internal.bind.v2.runtime.property.PropertyFactory;
-import com.sun.xml.internal.bind.v2.runtime.property.UnmarshallerChain;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.ChildLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Discarder;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Intercepter;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.TagName;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link JaxBeanInfo} implementation for {@link RuntimeElementInfo}.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class ElementBeanInfoImpl extends JaxBeanInfo<JAXBElement> {
-
- private Loader loader;
-
- private final Property property;
-
- // used to create new instances of JAXBElement.
- private final QName tagName;
- public final Class expectedType;
- private final Class scope;
-
- /**
- * If non-null, use this to create an instance.
- * It takes one value.
- */
- private final Constructor<? extends JAXBElement> constructor;
-
- ElementBeanInfoImpl(JAXBContextImpl grammar, RuntimeElementInfo rei) {
- super(grammar,rei,(Class<JAXBElement>)rei.getType(),true,false,true);
-
- this.property = PropertyFactory.create(grammar,rei.getProperty());
-
- tagName = rei.getElementName();
- expectedType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getContentInMemoryType());
- scope = rei.getScope()==null ? JAXBElement.GlobalScope.class : rei.getScope().getClazz();
-
- Class type = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getType());
- if(type==JAXBElement.class)
- constructor = null;
- else {
- try {
- constructor = type.getConstructor(expectedType);
- } catch (NoSuchMethodException e) {
- NoSuchMethodError x = new NoSuchMethodError("Failed to find the constructor for " + type + " with " + expectedType);
- x.initCause(e);
- throw x;
- }
- }
- }
-
- /**
- * The constructor for the sole instanceof {@link JaxBeanInfo} for
- * handling user-created {@link JAXBElement}.
- *
- * Such {@link JaxBeanInfo} is used only for marshalling.
- *
- * This is a hack.
- */
- protected ElementBeanInfoImpl(final JAXBContextImpl grammar) {
- super(grammar,null,JAXBElement.class,true,false,true);
- tagName = null;
- expectedType = null;
- scope = null;
- constructor = null;
-
- this.property = new Property<JAXBElement>() {
- public void reset(JAXBElement o) {
- throw new UnsupportedOperationException();
- }
-
- public void serializeBody(JAXBElement e, XMLSerializer target, Object outerPeer) throws SAXException, IOException, XMLStreamException {
- Class scope = e.getScope();
- if(e.isGlobalScope()) scope = null;
- QName n = e.getName();
- ElementBeanInfoImpl bi = grammar.getElement(scope,n);
- if(bi==null) {
- // infer what to do from the type
- JaxBeanInfo tbi;
- try {
- tbi = grammar.getBeanInfo(e.getDeclaredType(),true);
- } catch (JAXBException x) {
- // if e.getDeclaredType() isn't known to this JAXBContext
- target.reportError(null,x);
- return;
- }
- Object value = e.getValue();
- target.startElement(n.getNamespaceURI(),n.getLocalPart(),n.getPrefix(),null);
- if(value==null) {
- target.writeXsiNilTrue();
- } else {
- target.childAsXsiType(value,"value",tbi, false);
- }
- target.endElement();
- } else {
- try {
- bi.property.serializeBody(e,target,e);
- } catch (AccessorException x) {
- target.reportError(null,x);
- }
- }
- }
-
- public void serializeURIs(JAXBElement o, XMLSerializer target) {
- }
-
- public boolean hasSerializeURIAction() {
- return false;
- }
-
- public String getIdValue(JAXBElement o) {
- return null;
- }
-
- public PropertyKind getKind() {
- return PropertyKind.ELEMENT;
- }
-
- public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
- }
-
- public Accessor getElementPropertyAccessor(String nsUri, String localName) {
- throw new UnsupportedOperationException();
- }
-
- public void wrapUp() {
- }
-
- public RuntimePropertyInfo getInfo() {
- return property.getInfo();
- }
-
- public boolean isHiddenByOverride() {
- return false;
- }
-
- public void setHiddenByOverride(boolean hidden) {
- throw new UnsupportedOperationException("Not supported on jaxbelements.");
- }
-
- public String getFieldName() {
- return null;
- }
-
- };
- }
-
- /**
- * Use the previous {@link UnmarshallingContext.State}'s target to store
- * {@link JAXBElement} object to be unmarshalled. This allows the property {@link Loader}
- * to correctly find the parent object.
- * This is a hack.
- */
- private final class IntercepterLoader extends Loader implements Intercepter {
- private final Loader core;
-
- public IntercepterLoader(Loader core) {
- this.core = core;
- }
-
- @Override
- public final void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- state.setLoader(core);
- state.setIntercepter(this);
-
- // TODO: make sure there aren't too many duplicate of this code
- // create the object to unmarshal
- Object child;
- UnmarshallingContext context = state.getContext();
-
- // let's see if we can reuse the existing peer object
- child = context.getOuterPeer();
-
- if(child!=null && jaxbType!=child.getClass())
- child = null; // unexpected type.
-
- if(child!=null)
- reset((JAXBElement)child,context);
-
- if(child==null)
- child = context.createInstance(ElementBeanInfoImpl.this);
-
- fireBeforeUnmarshal(ElementBeanInfoImpl.this, child, state);
-
- context.recordOuterPeer(child);
- UnmarshallingContext.State p = state.getPrev();
- p.setBackup(p.getTarget());
- p.setTarget(child);
-
- core.startElement(state,ea);
- }
-
- public Object intercept(UnmarshallingContext.State state, Object o) throws SAXException {
- JAXBElement e = (JAXBElement)state.getTarget();
- state.setTarget(state.getBackup());
- state.setBackup(null);
-
- if (state.isNil()) {
- e.setNil(true);
- state.setNil(false);
- }
-
- if(o!=null)
- // if the value is a leaf type, it's often already set to the element
- // through Accessor.
- e.setValue(o);
-
- fireAfterUnmarshal(ElementBeanInfoImpl.this, e, state);
-
- return e;
- }
- }
-
- public String getElementNamespaceURI(JAXBElement e) {
- return e.getName().getNamespaceURI();
- }
-
- public String getElementLocalName(JAXBElement e) {
- return e.getName().getLocalPart();
- }
-
- public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
- if(loader==null) {
- // this has to be done lazily to avoid cyclic reference issue
- UnmarshallerChain c = new UnmarshallerChain(context);
- QNameMap<ChildLoader> result = new QNameMap<ChildLoader>();
- property.buildChildElementUnmarshallers(c,result);
- if(result.size()==1)
- // for ElementBeanInfoImpl created from RuntimeElementInfo
- this.loader = new IntercepterLoader(result.getOne().getValue().loader);
- else
- // for special ElementBeanInfoImpl only used for marshalling
- this.loader = Discarder.INSTANCE;
- }
- return loader;
- }
-
- public final JAXBElement createInstance(UnmarshallingContext context) throws IllegalAccessException, InvocationTargetException, InstantiationException {
- return createInstanceFromValue(null);
- }
-
- public final JAXBElement createInstanceFromValue(Object o) throws IllegalAccessException, InvocationTargetException, InstantiationException {
- if(constructor==null)
- return new JAXBElement(tagName,expectedType,scope,o);
- else
- return constructor.newInstance(o);
- }
-
- public boolean reset(JAXBElement e, UnmarshallingContext context) {
- e.setValue(null);
- return true;
- }
-
- public String getId(JAXBElement e, XMLSerializer target) {
- // TODO: is this OK? Should we be returning the ID value of the type property?
- /*
- There's one case where we JAXBElement needs to be designated as ID,
- and that is when there's a global element whose type is ID.
- */
- Object o = e.getValue();
- if(o instanceof String)
- return (String)o;
- else
- return null;
- }
-
- public void serializeBody(JAXBElement element, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
- try {
- property.serializeBody(element,target,null);
- } catch (AccessorException x) {
- target.reportError(null,x);
- }
- }
-
- public void serializeRoot(JAXBElement e, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
- serializeBody(e,target);
- }
-
- public void serializeAttributes(JAXBElement e, XMLSerializer target) {
- // noop
- }
-
- public void serializeURIs(JAXBElement e, XMLSerializer target) {
- // noop
- }
-
- public final Transducer<JAXBElement> getTransducer() {
- return null;
- }
-
- @Override
- public void wrapUp() {
- super.wrapUp();
- property.wrapUp();
- }
-
- @Override
- public void link(JAXBContextImpl grammar) {
- super.link(grammar);
- getLoader(grammar,true); // make sure to build them, if we hadn't done so
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/FilterTransducer.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/FilterTransducer.java
deleted file mode 100644
index 12d0916c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/FilterTransducer.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.io.IOException;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.api.AccessorException;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link Transducer} that delegates to another {@link Transducer}.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class FilterTransducer<T> implements Transducer<T> {
- protected final Transducer<T> core;
-
- protected FilterTransducer(Transducer<T> core) {
- this.core = core;
- }
-
- public final boolean isDefault() {
- // this must be used as a decorating transducer,
- // so it may never be default.
- return false;
- }
-
- public boolean useNamespace() {
- return core.useNamespace();
- }
-
- public void declareNamespace(T o, XMLSerializer w) throws AccessorException {
- core.declareNamespace(o, w);
- }
-
- public @NotNull CharSequence print(@NotNull T o) throws AccessorException {
- return core.print(o);
- }
-
- public T parse(CharSequence lexical) throws AccessorException, SAXException {
- return core.parse(lexical);
- }
-
- public void writeText(XMLSerializer w, T o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- core.writeText(w, o, fieldName);
- }
-
- public void writeLeafElement(XMLSerializer w, Name tagName, T o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- core.writeLeafElement(w,tagName,o,fieldName);
- }
-
- public QName getTypeName(T instance) {
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/IllegalAnnotationException.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/IllegalAnnotationException.java
deleted file mode 100644
index 8caf6555..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/IllegalAnnotationException.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-
-import com.sun.xml.internal.bind.v2.model.annotation.Locatable;
-
-/**
- * Signals an incorrect use of JAXB annotations.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- * @since JAXB 2.0 EA1
- */
-public class IllegalAnnotationException extends JAXBException {
-
- /**
- * Read-only list of {@link Location}s.
- */
- private final List<List<Location>> pos;
-
- private static final long serialVersionUID = 1L;
-
- public IllegalAnnotationException(String message, Locatable src) {
- super(message);
- pos = build(src);
- }
-
- public IllegalAnnotationException(String message, Annotation src) {
- this(message,cast(src));
- }
-
- public IllegalAnnotationException(String message, Locatable src1, Locatable src2) {
- super(message);
- pos = build(src1,src2);
- }
-
- public IllegalAnnotationException(String message, Annotation src1, Annotation src2) {
- this(message,cast(src1),cast(src2));
- }
-
- public IllegalAnnotationException(String message, Annotation src1, Locatable src2) {
- this(message,cast(src1),src2);
- }
-
- public IllegalAnnotationException(String message, Throwable cause, Locatable src) {
- super(message, cause);
- pos = build(src);
- }
-
- private static Locatable cast(Annotation a) {
- if(a instanceof Locatable)
- return (Locatable)a;
- else
- return null;
- }
-
- private List<List<Location>> build(Locatable... srcs) {
- List<List<Location>> r = new ArrayList<List<Location>>();
- for( Locatable l : srcs ) {
- if(l!=null) {
- List<Location> ll = convert(l);
- if(ll!=null && !ll.isEmpty())
- r.add(ll);
- }
- }
- return Collections.unmodifiableList(r);
- }
-
- /**
- * Builds a list of {@link Location}s out of a {@link Locatable}.
- */
- private List<Location> convert(Locatable src) {
- if(src==null) return null;
-
- List<Location> r = new ArrayList<Location>();
- for( ; src!=null; src=src.getUpstream())
- r.add(src.getLocation());
- return Collections.unmodifiableList(r);
- }
-
-
-
- /**
- * Returns a read-only list of {@link Location} that indicates
- * where in the source code the problem has happened.
- *
- * <p>
- * Normally, an annotation error happens on one particular
- * annotation, in which case this method returns a list that
- * contains another list, which in turn contains the location
- * information that leads to the error location
- * (IOW, <tt>[ [pos1,pos2,...,posN] ]</tt>)
- *
- * <p>
- * Sometimes, an error could occur because of two or more conflicting
- * annotations, in which case this method returns a list
- * that contains many lists, where each list contains
- * the location information that leads to each of the conflicting
- * annotations
- * (IOW, <tt>[ [pos11,pos12,...,pos1N],[pos21,pos22,...,pos2M], ... ]</tt>)
- *
- * <p>
- * Yet some other time, the runtime can fail to provide any
- * error location, in which case this method returns an empty list.
- * (IOW, <tt>[]</tt>). We do try hard to make sure this won't happen,
- * so please <a href="http://jaxb.dev.java.net/">let us know</a>
- * if you see this behavior.
- *
- *
- * <h3>List of {@link Location}</h3>
- * <p>
- * Each error location is identified not just by one {@link Location}
- * object, but by a sequence of {@link Location}s that shows why
- * the runtime is led to the place of the error.
- * This list is sorted such that the most specific {@link Location} comes
- * to the first in the list, sort of like a stack trace.
- *
- * <p>
- * For example, suppose you specify class <tt>Foo</tt> to {@link JAXBContext},
- * <tt>Foo</tt> derives from <tt>Bar</tt>, <tt>Bar</tt> has a field <tt>pea</tt>
- * that points to <tt>Zot</tt>, <tt>Zot</tt> contains a <tt>gum</tt>
- * property, and this property has an errornous annotation.
- * Then when this exception is thrown, the list of {@link Location}s
- * will look something like
- * <tt>[ "gum property", "Zot class", "pea property", "Bar class", "Foo class" ]</tt>
- *
- *
- * @return
- * can be empty when no source position is available,
- * but never null. The returned list will never contain
- * null nor length-0 {@link List}.
- */
- public List<List<Location>> getSourcePos() {
- return pos;
- }
-
- /**
- * Returns the exception name, message, and related information
- * together in one string.
- *
- * <p>
- * Overriding this method (instead of {@link #printStackTrace} allows
- * this crucial detail to show up even when this exception is nested
- * inside other exceptions.
- */
- public String toString() {
- StringBuilder sb = new StringBuilder(getMessage());
-
- for( List<Location> locs : pos ) {
- sb.append("\n\tthis problem is related to the following location:");
- for( Location loc : locs )
- sb.append("\n\t\tat ").append(loc.toString());
- }
-
- return sb.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/IllegalAnnotationsException.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/IllegalAnnotationsException.java
deleted file mode 100644
index 52ccb71c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/IllegalAnnotationsException.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-
-import com.sun.xml.internal.bind.v2.model.core.ErrorHandler;
-
-/**
- * A list of {@link IllegalAnnotationException} wrapped in one exception.
- *
- * <p>
- * This exception is used to report all the errors to the client application
- * through {@link JAXBContext#newInstance}.
- *
- * @since JAXB 2.0 EA1
- * @author Kohsuke Kawaguchi
- */
-public class IllegalAnnotationsException extends JAXBException {
- private final List<IllegalAnnotationException> errors;
-
- private static final long serialVersionUID = 1L;
-
- public IllegalAnnotationsException(List<IllegalAnnotationException> errors) {
- super(errors.size()+" counts of IllegalAnnotationExceptions");
- assert !errors.isEmpty() : "there must be at least one error";
- this.errors = Collections.unmodifiableList(new ArrayList<IllegalAnnotationException>(errors));
- }
-
- public String toString() {
- StringBuilder sb = new StringBuilder(super.toString());
- sb.append('\n');
-
- for( IllegalAnnotationException error : errors )
- sb.append(error.toString()).append('\n');
-
- return sb.toString();
- }
-
- /**
- * Returns a read-only list of {@link IllegalAnnotationException}s
- * wrapped in this exception.
- *
- * @return
- * a non-null list.
- */
- public List<IllegalAnnotationException> getErrors() {
- return errors;
- }
-
- public static class Builder implements ErrorHandler {
- private final List<IllegalAnnotationException> list = new ArrayList<IllegalAnnotationException>();
- public void error(IllegalAnnotationException e) {
- list.add(e);
- }
- /**
- * If an error was reported, throw the exception.
- * Otherwise exit normally.
- */
- public void check() throws IllegalAnnotationsException {
- if(list.isEmpty())
- return;
- throw new IllegalAnnotationsException(list);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/InlineBinaryTransducer.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/InlineBinaryTransducer.java
deleted file mode 100644
index b3c3f47e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/InlineBinaryTransducer.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.io.IOException;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.api.AccessorException;
-
-import org.xml.sax.SAXException;
-
-/**
- * Transducer that signals the runtime that this binary data shall be always inlined.
- *
- * @author Kohsuke Kawaguchi
- */
-public class InlineBinaryTransducer<V> extends FilterTransducer<V> {
- public InlineBinaryTransducer(Transducer<V> core) {
- super(core);
- }
-
- @Override
- public @NotNull CharSequence print(@NotNull V o) throws AccessorException {
- XMLSerializer w = XMLSerializer.getInstance();
- boolean old = w.setInlineBinaryFlag(true);
- try {
- return core.print(o);
- } finally {
- w.setInlineBinaryFlag(old);
- }
- }
-
- @Override
- public void writeText(XMLSerializer w, V o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- boolean old = w.setInlineBinaryFlag(true);
- try {
- core.writeText(w,o,fieldName);
- } finally {
- w.setInlineBinaryFlag(old);
- }
- }
-
- @Override
- public void writeLeafElement(XMLSerializer w, Name tagName, V o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- boolean old = w.setInlineBinaryFlag(true);
- try {
- core.writeLeafElement(w, tagName, o, fieldName);
- } finally {
- w.setInlineBinaryFlag(old);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/InternalBridge.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/InternalBridge.java
deleted file mode 100644
index 2d5cf22d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/InternalBridge.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.io.IOException;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.Bridge;
-
-import org.xml.sax.SAXException;
-
-/**
- * Additional methods on {@link Bridge} that are only available for the JAXB runtime.
- * @author Kohsuke Kawaguchi
- */
-abstract class InternalBridge<T> extends Bridge<T> {
- protected InternalBridge(JAXBContextImpl context) {
- super(context);
- }
-
- public JAXBContextImpl getContext() {
- return context;
- }
-
- /**
- * Called from {@link CompositeStructureBeanInfo} to marshal this bridge as a sub-tree.
- */
- abstract void marshal( T o, XMLSerializer out ) throws IOException, SAXException, XMLStreamException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java
deleted file mode 100644
index f7b1db6b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java
+++ /dev/null
@@ -1,1128 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime;
-
-import java.io.IOException;
-import java.lang.ref.WeakReference;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.TreeSet;
-import javax.xml.bind.Binder;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.JAXBIntrospector;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.Validator;
-import javax.xml.bind.annotation.XmlAttachmentRef;
-import javax.xml.bind.annotation.XmlList;
-import javax.xml.bind.annotation.XmlNs;
-import javax.xml.bind.annotation.XmlSchema;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Result;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.sax.SAXTransformerFactory;
-import javax.xml.transform.sax.TransformerHandler;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Pool;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.bind.api.BridgeContext;
-import com.sun.xml.internal.bind.api.CompositeStructure;
-import com.sun.xml.internal.bind.api.ErrorListener;
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.bind.api.RawAccessor;
-import com.sun.xml.internal.bind.api.TypeReference;
-import com.sun.xml.internal.bind.unmarshaller.DOMScanner;
-import com.sun.xml.internal.bind.util.Which;
-import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader;
-import com.sun.xml.internal.bind.v2.model.annotation.RuntimeInlineAnnotationReader;
-import com.sun.xml.internal.bind.v2.model.core.Adapter;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.core.Ref;
-import com.sun.xml.internal.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl;
-import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeArrayInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeBuiltinLeafInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeClassInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeEnumLeafInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeLeafInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet;
-import com.sun.xml.internal.bind.v2.runtime.output.Encoded;
-import com.sun.xml.internal.bind.v2.runtime.property.AttributeProperty;
-import com.sun.xml.internal.bind.v2.runtime.property.Property;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.TagName;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-import com.sun.xml.internal.bind.v2.schemagen.XmlSchemaGenerator;
-import com.sun.xml.internal.bind.v2.util.EditDistance;
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-import com.sun.xml.internal.bind.v2.util.XmlFactory;
-import com.sun.xml.internal.txw2.output.ResultFactory;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * This class provides the implementation of JAXBContext.
- *
- */
-public final class JAXBContextImpl extends JAXBRIContext {
-
- /**
- * All the bridge classes.
- */
- private final Map<TypeReference,Bridge> bridges = new LinkedHashMap<TypeReference,Bridge>();
-
- /**
- * Shared instance of {@link DocumentBuilder}.
- * Lock before use. Lazily created.
- */
- private static DocumentBuilder db;
-
- private final QNameMap<JaxBeanInfo> rootMap = new QNameMap<JaxBeanInfo>();
- private final HashMap<QName,JaxBeanInfo> typeMap = new HashMap<QName,JaxBeanInfo>();
-
- /**
- * Map from JAXB-bound {@link Class} to its {@link JaxBeanInfo}.
- */
- private final Map<Class,JaxBeanInfo> beanInfoMap = new LinkedHashMap<Class,JaxBeanInfo>();
-
- /**
- * All created {@link JaxBeanInfo}s.
- * Updated from each {@link JaxBeanInfo}s constructors to avoid infinite recursion
- * for a cyclic reference.
- *
- * <p>
- * This map is only used while the {@link JAXBContextImpl} is built and set to null
- * to avoid keeping references too long.
- */
- protected Map<RuntimeTypeInfo,JaxBeanInfo> beanInfos = new LinkedHashMap<RuntimeTypeInfo, JaxBeanInfo>();
-
- private final Map<Class/*scope*/,Map<QName,ElementBeanInfoImpl>> elements = new LinkedHashMap<Class, Map<QName, ElementBeanInfoImpl>>();
-
- /**
- * Pool of {@link Marshaller}s.
- */
- public final Pool<Marshaller> marshallerPool = new Pool.Impl<Marshaller>() {
- protected @NotNull Marshaller create() {
- return createMarshaller();
- }
- };
-
- public final Pool<Unmarshaller> unmarshallerPool = new Pool.Impl<Unmarshaller>() {
- protected @NotNull Unmarshaller create() {
- return createUnmarshaller();
- }
- };
-
- /**
- * Used to assign indices to known names in this grammar.
- * Reset to null once the build phase is completed.
- */
- public NameBuilder nameBuilder = new NameBuilder();
-
- /**
- * Keeps the list of known names.
- * This field is set once the build pahse is completed.
- */
- public final NameList nameList;
-
- /**
- * Input to the JAXBContext.newInstance, so that we can recreate
- * {@link RuntimeTypeInfoSet} whenever we need.
- */
- private final String defaultNsUri;
- private final Class[] classes;
-
- /**
- * true to reorder attributes lexicographically in preparation of the c14n support.
- */
- protected final boolean c14nSupport;
-
- /**
- * Flag that user has provided a custom AccessorFactory for JAXB to use
- */
- public final boolean xmlAccessorFactorySupport;
-
- /**
- * @see JAXBRIContext#TREAT_EVERYTHING_NILLABLE
- */
- public final boolean allNillable;
-
- /**
- * Store properties, so that they can be recovered in the run (is here because of JSON encoding of Jersey).
- */
- public final boolean retainPropertyInfo;
-
- /**
- * Suppress reflection accessor warnings.
- */
- public final boolean supressAccessorWarnings;
-
- /**
- * Improved xsi type handling.
- */
- public final boolean improvedXsiTypeHandling;
-
- /**
- * Disable security processing.
- */
- public final boolean disableSecurityProcessing;
-
- private WeakReference<RuntimeTypeInfoSet> typeInfoSetCache;
-
- private @NotNull RuntimeAnnotationReader annotationReader;
-
- private /*almost final*/ boolean hasSwaRef;
- private final @NotNull Map<Class,Class> subclassReplacements;
-
- /**
- * If true, we aim for faster {@link JAXBContext} instantiation performance,
- * instead of going after efficient sustained unmarshalling/marshalling performance.
- *
- * @since 2.0.4
- */
- public final boolean fastBoot;
-
- private Set<XmlNs> xmlNsSet = null;
-
- /**
- * Returns declared XmlNs annotations (from package-level annotation XmlSchema
- *
- * @return set of all present XmlNs annotations
- */
- public Set<XmlNs> getXmlNsSet() {
- return xmlNsSet;
- }
-
- private JAXBContextImpl(JAXBContextBuilder builder) throws JAXBException {
-
- this.defaultNsUri = builder.defaultNsUri;
- this.retainPropertyInfo = builder.retainPropertyInfo;
- this.annotationReader = builder.annotationReader;
- this.subclassReplacements = builder.subclassReplacements;
- this.c14nSupport = builder.c14nSupport;
- this.classes = builder.classes;
- this.xmlAccessorFactorySupport = builder.xmlAccessorFactorySupport;
- this.allNillable = builder.allNillable;
- this.supressAccessorWarnings = builder.supressAccessorWarnings;
- this.improvedXsiTypeHandling = builder.improvedXsiTypeHandling;
- this.disableSecurityProcessing = builder.disableSecurityProcessing;
-
- Collection<TypeReference> typeRefs = builder.typeRefs;
-
- boolean fastB;
- try {
- fastB = Boolean.getBoolean(JAXBContextImpl.class.getName()+".fastBoot");
- } catch (SecurityException e) {
- fastB = false;
- }
- this.fastBoot = fastB;
-
- RuntimeTypeInfoSet typeSet = getTypeInfoSet();
-
- // at least prepare the empty table so that we don't have to check for null later
- elements.put(null,new LinkedHashMap<QName, ElementBeanInfoImpl>());
-
- // recognize leaf bean infos
- for( RuntimeBuiltinLeafInfo leaf : RuntimeBuiltinLeafInfoImpl.builtinBeanInfos ) {
- LeafBeanInfoImpl<?> bi = new LeafBeanInfoImpl(this,leaf);
- beanInfoMap.put(leaf.getClazz(),bi);
- for( QName t : bi.getTypeNames() )
- typeMap.put(t,bi);
- }
-
- for (RuntimeEnumLeafInfo e : typeSet.enums().values()) {
- JaxBeanInfo<?> bi = getOrCreate(e);
- for (QName qn : bi.getTypeNames())
- typeMap.put( qn, bi );
- if(e.isElement())
- rootMap.put( e.getElementName(), bi );
- }
-
- for (RuntimeArrayInfo a : typeSet.arrays().values()) {
- JaxBeanInfo<?> ai = getOrCreate(a);
- for (QName qn : ai.getTypeNames())
- typeMap.put( qn, ai );
- }
-
- for( Entry<Class, ? extends RuntimeClassInfo> e : typeSet.beans().entrySet() ) {
- ClassBeanInfoImpl<?> bi = getOrCreate(e.getValue());
-
- XmlSchema xs = this.annotationReader.getPackageAnnotation(XmlSchema.class, e.getKey(), null);
- if(xs != null) {
- if(xs.xmlns() != null && xs.xmlns().length > 0) {
- if(xmlNsSet == null)
- xmlNsSet = new HashSet<XmlNs>();
- xmlNsSet.addAll(Arrays.asList(xs.xmlns()));
- }
- }
-
- if(bi.isElement())
- rootMap.put( e.getValue().getElementName(), bi );
-
- for (QName qn : bi.getTypeNames())
- typeMap.put( qn, bi );
- }
-
- // fill in element mappings
- for( RuntimeElementInfo n : typeSet.getAllElements() ) {
- ElementBeanInfoImpl bi = getOrCreate(n);
- if(n.getScope()==null)
- rootMap.put(n.getElementName(),bi);
-
- RuntimeClassInfo scope = n.getScope();
- Class scopeClazz = scope==null?null:scope.getClazz();
- Map<QName,ElementBeanInfoImpl> m = elements.get(scopeClazz);
- if(m==null) {
- m = new LinkedHashMap<QName, ElementBeanInfoImpl>();
- elements.put(scopeClazz,m);
- }
- m.put(n.getElementName(),bi);
- }
-
- // this one is so that we can handle plain JAXBElements.
- beanInfoMap.put(JAXBElement.class,new ElementBeanInfoImpl(this));
- // another special BeanInfoImpl just for marshalling
- beanInfoMap.put(CompositeStructure.class,new CompositeStructureBeanInfo(this));
-
- getOrCreate(typeSet.getAnyTypeInfo());
-
- // then link them all!
- for (JaxBeanInfo bi : beanInfos.values())
- bi.link(this);
-
- // register primitives for boxed types just to make GrammarInfo fool-proof
- for( Map.Entry<Class,Class> e : RuntimeUtil.primitiveToBox.entrySet() )
- beanInfoMap.put( e.getKey(), beanInfoMap.get(e.getValue()) );
-
- // build bridges
- Navigator<Type, Class, Field, Method> nav = typeSet.getNavigator();
-
- for (TypeReference tr : typeRefs) {
- XmlJavaTypeAdapter xjta = tr.get(XmlJavaTypeAdapter.class);
- Adapter<Type,Class> a=null;
- XmlList xl = tr.get(XmlList.class);
-
- // eventually compute the in-memory type
- Class erasedType = (Class) nav.erasure(tr.type);
-
- if(xjta!=null) {
- a = new Adapter<Type,Class>(xjta.value(),nav);
- }
- if(tr.get(XmlAttachmentRef.class)!=null) {
- a = new Adapter<Type,Class>(SwaRefAdapter.class,nav);
- hasSwaRef = true;
- }
-
- if(a!=null) {
- erasedType = (Class) nav.erasure(a.defaultType);
- }
-
- Name name = nameBuilder.createElementName(tr.tagName);
-
- InternalBridge bridge;
- if(xl==null)
- bridge = new BridgeImpl(this, name,getBeanInfo(erasedType,true),tr);
- else
- bridge = new BridgeImpl(this, name,new ValueListBeanInfoImpl(this,erasedType),tr);
-
- if(a!=null)
- bridge = new BridgeAdapter(bridge,a.adapterType);
-
- bridges.put(tr,bridge);
- }
-
- this.nameList = nameBuilder.conclude();
-
- for (JaxBeanInfo bi : beanInfos.values())
- bi.wrapUp();
-
- // no use for them now
- nameBuilder = null;
- beanInfos = null;
- }
-
- /**
- * True if this JAXBContext has {@link XmlAttachmentRef}.
- */
- public boolean hasSwaRef() {
- return hasSwaRef;
- }
-
- public RuntimeTypeInfoSet getRuntimeTypeInfoSet() {
- try {
- return getTypeInfoSet();
- } catch (IllegalAnnotationsException e) {
- // impossible, once the model is constructred
- throw new AssertionError(e);
- }
- }
-
- /**
- * Creates a {@link RuntimeTypeInfoSet}.
- */
- public RuntimeTypeInfoSet getTypeInfoSet() throws IllegalAnnotationsException {
-
- // check cache
- if(typeInfoSetCache!=null) {
- RuntimeTypeInfoSet r = typeInfoSetCache.get();
- if(r!=null)
- return r;
- }
-
- final RuntimeModelBuilder builder = new RuntimeModelBuilder(this,annotationReader,subclassReplacements,defaultNsUri);
-
- IllegalAnnotationsException.Builder errorHandler = new IllegalAnnotationsException.Builder();
- builder.setErrorHandler(errorHandler);
-
- for( Class c : classes ) {
- if(c==CompositeStructure.class)
- // CompositeStructure doesn't have TypeInfo, so skip it.
- // We'll add JaxBeanInfo for this later automatically
- continue;
- builder.getTypeInfo(new Ref<Type,Class>(c));
- }
-
- this.hasSwaRef |= builder.hasSwaRef;
- RuntimeTypeInfoSet r = builder.link();
-
- errorHandler.check();
- assert r!=null : "if no error was reported, the link must be a success";
-
- typeInfoSetCache = new WeakReference<RuntimeTypeInfoSet>(r);
-
- return r;
- }
-
-
- public ElementBeanInfoImpl getElement(Class scope, QName name) {
- Map<QName,ElementBeanInfoImpl> m = elements.get(scope);
- if(m!=null) {
- ElementBeanInfoImpl bi = m.get(name);
- if(bi!=null)
- return bi;
- }
- m = elements.get(null);
- return m.get(name);
- }
-
-
-
-
-
- private ElementBeanInfoImpl getOrCreate( RuntimeElementInfo rei ) {
- JaxBeanInfo bi = beanInfos.get(rei);
- if(bi!=null) return (ElementBeanInfoImpl)bi;
-
- // all elements share the same type, so we can't register them to beanInfoMap
- return new ElementBeanInfoImpl(this, rei);
- }
-
- protected JaxBeanInfo getOrCreate( RuntimeEnumLeafInfo eli ) {
- JaxBeanInfo bi = beanInfos.get(eli);
- if(bi!=null) return bi;
- bi = new LeafBeanInfoImpl(this,eli);
- beanInfoMap.put(bi.jaxbType,bi);
- return bi;
- }
-
- protected ClassBeanInfoImpl getOrCreate( RuntimeClassInfo ci ) {
- ClassBeanInfoImpl bi = (ClassBeanInfoImpl)beanInfos.get(ci);
- if(bi!=null) return bi;
- bi = new ClassBeanInfoImpl(this,ci);
- beanInfoMap.put(bi.jaxbType,bi);
- return bi;
- }
-
- protected JaxBeanInfo getOrCreate( RuntimeArrayInfo ai ) {
- JaxBeanInfo abi = beanInfos.get(ai);
- if(abi!=null) return abi;
-
- abi = new ArrayBeanInfoImpl(this,ai);
-
- beanInfoMap.put(ai.getType(),abi);
- return abi;
- }
-
- public JaxBeanInfo getOrCreate(RuntimeTypeInfo e) {
- if(e instanceof RuntimeElementInfo)
- return getOrCreate((RuntimeElementInfo)e);
- if(e instanceof RuntimeClassInfo)
- return getOrCreate((RuntimeClassInfo)e);
- if(e instanceof RuntimeLeafInfo) {
- JaxBeanInfo bi = beanInfos.get(e); // must have been created
- assert bi!=null;
- return bi;
- }
- if(e instanceof RuntimeArrayInfo)
- return getOrCreate((RuntimeArrayInfo)e);
- if(e.getType()==Object.class) {
- // anyType
- JaxBeanInfo bi = beanInfoMap.get(Object.class);
- if(bi==null) {
- bi = new AnyTypeBeanInfo(this,e);
- beanInfoMap.put(Object.class,bi);
- }
- return bi;
- }
-
- throw new IllegalArgumentException();
- }
-
- /**
- * Gets the {@link JaxBeanInfo} object that can handle
- * the given JAXB-bound object.
- *
- * <p>
- * This method traverses the base classes of the given object.
- *
- * @return null
- * if <tt>c</tt> isn't a JAXB-bound class and <tt>fatal==false</tt>.
- */
- public final JaxBeanInfo getBeanInfo(Object o) {
- // don't allow xs:anyType beanInfo to handle all the unbound objects
- for( Class c=o.getClass(); c!=Object.class; c=c.getSuperclass()) {
- JaxBeanInfo bi = beanInfoMap.get(c);
- if(bi!=null) return bi;
- }
- if(o instanceof Element)
- return beanInfoMap.get(Object.class); // return the BeanInfo for xs:anyType
- for( Class c : o.getClass().getInterfaces()) {
- JaxBeanInfo bi = beanInfoMap.get(c);
- if(bi!=null) return bi;
- }
- return null;
- }
-
- /**
- * Gets the {@link JaxBeanInfo} object that can handle
- * the given JAXB-bound object.
- *
- * @param fatal
- * if true, the failure to look up will throw an exception.
- * Otherwise it will just return null.
- */
- public final JaxBeanInfo getBeanInfo(Object o,boolean fatal) throws JAXBException {
- JaxBeanInfo bi = getBeanInfo(o);
- if(bi!=null) return bi;
- if(fatal) {
- if(o instanceof Document)
- throw new JAXBException(Messages.ELEMENT_NEEDED_BUT_FOUND_DOCUMENT.format(o.getClass()));
- throw new JAXBException(Messages.UNKNOWN_CLASS.format(o.getClass()));
- }
- return null;
- }
-
- /**
- * Gets the {@link JaxBeanInfo} object that can handle
- * the given JAXB-bound class.
- *
- * <p>
- * This method doesn't look for base classes.
- *
- * @return null
- * if <tt>c</tt> isn't a JAXB-bound class and <tt>fatal==false</tt>.
- */
- public final <T> JaxBeanInfo<T> getBeanInfo(Class<T> clazz) {
- return (JaxBeanInfo<T>)beanInfoMap.get(clazz);
- }
-
- /**
- * Gets the {@link JaxBeanInfo} object that can handle
- * the given JAXB-bound class.
- *
- * @param fatal
- * if true, the failure to look up will throw an exception.
- * Otherwise it will just return null.
- */
- public final <T> JaxBeanInfo<T> getBeanInfo(Class<T> clazz,boolean fatal) throws JAXBException {
- JaxBeanInfo<T> bi = getBeanInfo(clazz);
- if(bi!=null) return bi;
- if(fatal)
- throw new JAXBException(clazz.getName()+" is not known to this context");
- return null;
- }
-
- /**
- * Based on the tag name, determine what object to unmarshal,
- * and then set a new object and its loader to the current unmarshaller state.
- *
- * @return
- * null if the given name pair is not recognized.
- */
- public final Loader selectRootLoader( UnmarshallingContext.State state, TagName tag ) {
- JaxBeanInfo beanInfo = rootMap.get(tag.uri,tag.local);
- if(beanInfo==null)
- return null;
-
- return beanInfo.getLoader(this,true);
- }
-
- /**
- * Gets the {@link JaxBeanInfo} for the given named XML Schema type.
- *
- * @return
- * null if the type name is not recognized. For schema
- * languages other than XML Schema, this method always
- * returns null.
- */
- public JaxBeanInfo getGlobalType(QName name) {
- return typeMap.get(name);
- }
-
- /**
- * Finds a type name that this context recognizes which is
- * "closest" to the given type name.
- *
- * <p>
- * This method is used for error recovery.
- */
- public String getNearestTypeName(QName name) {
- String[] all = new String[typeMap.size()];
- int i=0;
- for (QName qn : typeMap.keySet()) {
- if(qn.getLocalPart().equals(name.getLocalPart()))
- return qn.toString(); // probably a match, as people often gets confused about namespace.
- all[i++] = qn.toString();
- }
-
- String nearest = EditDistance.findNearest(name.toString(), all);
-
- if(EditDistance.editDistance(nearest,name.toString())>10)
- return null; // too far apart.
-
- return nearest;
- }
-
- /**
- * Returns the set of valid root tag names.
- * For diagnostic use.
- */
- public Set<QName> getValidRootNames() {
- Set<QName> r = new TreeSet<QName>(QNAME_COMPARATOR);
- for (QNameMap.Entry e : rootMap.entrySet()) {
- r.add(e.createQName());
- }
- return r;
- }
-
- /**
- * Cache of UTF-8 encoded local names to improve the performance for the marshalling.
- */
- private Encoded[] utf8nameTable;
-
- public synchronized Encoded[] getUTF8NameTable() {
- if(utf8nameTable==null) {
- Encoded[] x = new Encoded[nameList.localNames.length];
- for( int i=0; i<x.length; i++ ) {
- Encoded e = new Encoded(nameList.localNames[i]);
- e.compact();
- x[i] = e;
- }
- utf8nameTable = x;
- }
- return utf8nameTable;
- }
-
- public int getNumberOfLocalNames() {
- return nameList.localNames.length;
- }
-
- public int getNumberOfElementNames() {
- return nameList.numberOfElementNames;
- }
-
- public int getNumberOfAttributeNames() {
- return nameList.numberOfAttributeNames;
- }
-
- /**
- * Creates a new identity transformer.
- */
- static Transformer createTransformer(boolean disableSecureProcessing) {
- try {
- SAXTransformerFactory tf = (SAXTransformerFactory)XmlFactory.createTransformerFactory(disableSecureProcessing);
- return tf.newTransformer();
- } catch (TransformerConfigurationException e) {
- throw new Error(e); // impossible
- }
- }
-
- /**
- * Creates a new identity transformer.
- */
- public static TransformerHandler createTransformerHandler(boolean disableSecureProcessing) {
- try {
- SAXTransformerFactory tf = (SAXTransformerFactory)XmlFactory.createTransformerFactory(disableSecureProcessing);
- return tf.newTransformerHandler();
- } catch (TransformerConfigurationException e) {
- throw new Error(e); // impossible
- }
- }
-
- /**
- * Creates a new DOM document.
- */
- static Document createDom(boolean disableSecurityProcessing) {
- synchronized(JAXBContextImpl.class) {
- if(db==null) {
- try {
- DocumentBuilderFactory dbf = XmlFactory.createDocumentBuilderFactory(disableSecurityProcessing);
- db = dbf.newDocumentBuilder();
- } catch (ParserConfigurationException e) {
- // impossible
- throw new FactoryConfigurationError(e);
- }
- }
- return db.newDocument();
- }
- }
-
- public MarshallerImpl createMarshaller() {
- return new MarshallerImpl(this,null);
- }
-
- public UnmarshallerImpl createUnmarshaller() {
- return new UnmarshallerImpl(this,null);
- }
-
- public Validator createValidator() {
- throw new UnsupportedOperationException(Messages.NOT_IMPLEMENTED_IN_2_0.format());
- }
-
- @Override
- public JAXBIntrospector createJAXBIntrospector() {
- return new JAXBIntrospector() {
- public boolean isElement(Object object) {
- return getElementName(object)!=null;
- }
-
- public QName getElementName(Object jaxbElement) {
- try {
- return JAXBContextImpl.this.getElementName(jaxbElement);
- } catch (JAXBException e) {
- return null;
- }
- }
- };
- }
-
- private NonElement<Type,Class> getXmlType(RuntimeTypeInfoSet tis, TypeReference tr) {
- if(tr==null)
- throw new IllegalArgumentException();
-
- XmlJavaTypeAdapter xjta = tr.get(XmlJavaTypeAdapter.class);
- XmlList xl = tr.get(XmlList.class);
-
- Ref<Type,Class> ref = new Ref<Type,Class>(annotationReader, tis.getNavigator(), tr.type, xjta, xl );
-
- return tis.getTypeInfo(ref);
- }
-
- @Override
- public void generateEpisode(Result output) {
- if(output==null)
- throw new IllegalArgumentException();
- createSchemaGenerator().writeEpisodeFile(ResultFactory.createSerializer(output));
- }
-
- @Override
- @SuppressWarnings("ThrowableInitCause")
- public void generateSchema(SchemaOutputResolver outputResolver) throws IOException {
- if(outputResolver==null)
- throw new IOException(Messages.NULL_OUTPUT_RESOLVER.format());
-
- final SAXParseException[] e = new SAXParseException[1];
- final SAXParseException[] w = new SAXParseException[1];
-
- createSchemaGenerator().write(outputResolver, new ErrorListener() {
- public void error(SAXParseException exception) {
- e[0] = exception;
- }
-
- public void fatalError(SAXParseException exception) {
- e[0] = exception;
- }
-
- public void warning(SAXParseException exception) {
- w[0] = exception;
- }
-
- public void info(SAXParseException exception) {}
- });
-
- if (e[0]!=null) {
- IOException x = new IOException(Messages.FAILED_TO_GENERATE_SCHEMA.format());
- x.initCause(e[0]);
- throw x;
- }
- if (w[0]!=null) {
- IOException x = new IOException(Messages.ERROR_PROCESSING_SCHEMA.format());
- x.initCause(w[0]);
- throw x;
- }
- }
-
- private XmlSchemaGenerator<Type,Class,Field,Method> createSchemaGenerator() {
- RuntimeTypeInfoSet tis;
- try {
- tis = getTypeInfoSet();
- } catch (IllegalAnnotationsException e) {
- // this shouldn't happen because we've already
- throw new AssertionError(e);
- }
-
- XmlSchemaGenerator<Type,Class,Field,Method> xsdgen =
- new XmlSchemaGenerator<Type,Class,Field,Method>(tis.getNavigator(),tis);
-
- // JAX-RPC uses Bridge objects that collide with
- // @XmlRootElement.
- // we will avoid collision here
- Set<QName> rootTagNames = new HashSet<QName>();
- for (RuntimeElementInfo ei : tis.getAllElements()) {
- rootTagNames.add(ei.getElementName());
- }
- for (RuntimeClassInfo ci : tis.beans().values()) {
- if(ci.isElement())
- rootTagNames.add(ci.asElement().getElementName());
- }
-
- for (TypeReference tr : bridges.keySet()) {
- if(rootTagNames.contains(tr.tagName))
- continue;
-
- if(tr.type==void.class || tr.type==Void.class) {
- xsdgen.add(tr.tagName,false,null);
- } else
- if(tr.type==CompositeStructure.class) {
- // this is a special class we introduced for JAX-WS that we *don't* want in the schema
- } else {
- NonElement<Type,Class> typeInfo = getXmlType(tis,tr);
- xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo);
- }
- }
- return xsdgen;
- }
-
- public QName getTypeName(TypeReference tr) {
- try {
- NonElement<Type,Class> xt = getXmlType(getTypeInfoSet(),tr);
- if(xt==null) throw new IllegalArgumentException();
- return xt.getTypeName();
- } catch (IllegalAnnotationsException e) {
- // impossible given that JAXBRIContext has been successfully built in the first place
- throw new AssertionError(e);
- }
- }
-
- @Override
- public <T> Binder<T> createBinder(Class<T> domType) {
- if(domType==Node.class)
- return (Binder<T>)createBinder();
- else
- return super.createBinder(domType);
- }
-
- @Override
- public Binder<Node> createBinder() {
- return new BinderImpl<Node>(this,new DOMScanner());
- }
-
- public QName getElementName(Object o) throws JAXBException {
- JaxBeanInfo bi = getBeanInfo(o,true);
- if(!bi.isElement())
- return null;
- return new QName(bi.getElementNamespaceURI(o),bi.getElementLocalName(o));
- }
-
- public QName getElementName(Class o) throws JAXBException {
- JaxBeanInfo bi = getBeanInfo(o,true);
- if(!bi.isElement())
- return null;
- return new QName(bi.getElementNamespaceURI(o),bi.getElementLocalName(o));
- }
-
- public Bridge createBridge(TypeReference ref) {
- return bridges.get(ref);
- }
-
- public @NotNull BridgeContext createBridgeContext() {
- return new BridgeContextImpl(this);
- }
-
- public RawAccessor getElementPropertyAccessor(Class wrapperBean, String nsUri, String localName) throws JAXBException {
- JaxBeanInfo bi = getBeanInfo(wrapperBean,true);
- if(!(bi instanceof ClassBeanInfoImpl))
- throw new JAXBException(wrapperBean+" is not a bean");
-
- for( ClassBeanInfoImpl cb = (ClassBeanInfoImpl) bi; cb!=null; cb=cb.superClazz) {
- for (Property p : cb.properties) {
- final Accessor acc = p.getElementPropertyAccessor(nsUri,localName);
- if(acc!=null)
- return new RawAccessor() {
- // Accessor.set/get are designed for unmarshaller/marshaller, and hence
- // they go through an adapter behind the scene.
- // this isn't desirable for JAX-WS, which essentially uses this method
- // just as a reflection library. So use the "unadapted" version to
- // achieve the desired semantics
- public Object get(Object bean) throws AccessorException {
- return acc.getUnadapted(bean);
- }
-
- public void set(Object bean, Object value) throws AccessorException {
- acc.setUnadapted(bean,value);
- }
- };
- }
- }
- throw new JAXBException(new QName(nsUri,localName)+" is not a valid property on "+wrapperBean);
- }
-
- public List<String> getKnownNamespaceURIs() {
- return Arrays.asList(nameList.namespaceURIs);
- }
-
- public String getBuildId() {
- Package pkg = getClass().getPackage();
- if(pkg==null) return null;
- return pkg.getImplementationVersion();
- }
-
- @Override
- public String toString() {
- StringBuilder buf = new StringBuilder(Which.which(getClass()) + " Build-Id: " + getBuildId());
- buf.append("\nClasses known to this context:\n");
-
- Set<String> names = new TreeSet<String>(); // sort them so that it's easy to read
-
- for (Class key : beanInfoMap.keySet())
- names.add(key.getName());
-
- for(String name: names)
- buf.append(" ").append(name).append('\n');
-
- return buf.toString();
- }
-
- /**
- * Gets the value of the xmime:contentType attribute on the given object, or null
- * if for some reason it couldn't be found, including any error.
- */
- public String getXMIMEContentType( Object o ) {
- JaxBeanInfo bi = getBeanInfo(o);
- if(!(bi instanceof ClassBeanInfoImpl))
- return null;
-
- ClassBeanInfoImpl cb = (ClassBeanInfoImpl) bi;
- for (Property p : cb.properties) {
- if (p instanceof AttributeProperty) {
- AttributeProperty ap = (AttributeProperty) p;
- if(ap.attName.equals(WellKnownNamespace.XML_MIME_URI,"contentType"))
- try {
- return (String)ap.xacc.print(o);
- } catch (AccessorException e) {
- return null;
- } catch (SAXException e) {
- return null;
- } catch (ClassCastException e) {
- return null;
- }
- }
- }
- return null;
- }
-
- /**
- * Creates a {@link JAXBContextImpl} that includes the specified additional classes.
- */
- public JAXBContextImpl createAugmented(Class<?> clazz) throws JAXBException {
- Class[] newList = new Class[classes.length+1];
- System.arraycopy(classes,0,newList,0,classes.length);
- newList[classes.length] = clazz;
-
- JAXBContextBuilder builder = new JAXBContextBuilder(this);
- builder.setClasses(newList);
- return builder.build();
- }
-
- private static final Comparator<QName> QNAME_COMPARATOR = new Comparator<QName>() {
- public int compare(QName lhs, QName rhs) {
- int r = lhs.getLocalPart().compareTo(rhs.getLocalPart());
- if(r!=0) return r;
-
- return lhs.getNamespaceURI().compareTo(rhs.getNamespaceURI());
- }
- };
-
- public static class JAXBContextBuilder {
-
- private boolean retainPropertyInfo = false;
- private boolean supressAccessorWarnings = false;
- private String defaultNsUri = "";
- private @NotNull RuntimeAnnotationReader annotationReader = new RuntimeInlineAnnotationReader();
- private @NotNull Map<Class,Class> subclassReplacements = Collections.emptyMap();
- private boolean c14nSupport = false;
- private Class[] classes;
- private Collection<TypeReference> typeRefs;
- private boolean xmlAccessorFactorySupport = false;
- private boolean allNillable;
- private boolean improvedXsiTypeHandling = true;
- private boolean disableSecurityProcessing = true;
-
- public JAXBContextBuilder() {};
-
- public JAXBContextBuilder(JAXBContextImpl baseImpl) {
- this.supressAccessorWarnings = baseImpl.supressAccessorWarnings;
- this.retainPropertyInfo = baseImpl.retainPropertyInfo;
- this.defaultNsUri = baseImpl.defaultNsUri;
- this.annotationReader = baseImpl.annotationReader;
- this.subclassReplacements = baseImpl.subclassReplacements;
- this.c14nSupport = baseImpl.c14nSupport;
- this.classes = baseImpl.classes;
- this.typeRefs = baseImpl.bridges.keySet();
- this.xmlAccessorFactorySupport = baseImpl.xmlAccessorFactorySupport;
- this.allNillable = baseImpl.allNillable;
- this.disableSecurityProcessing = baseImpl.disableSecurityProcessing;
- }
-
- public JAXBContextBuilder setRetainPropertyInfo(boolean val) {
- this.retainPropertyInfo = val;
- return this;
- }
-
- public JAXBContextBuilder setSupressAccessorWarnings(boolean val) {
- this.supressAccessorWarnings = val;
- return this;
- }
-
- public JAXBContextBuilder setC14NSupport(boolean val) {
- this.c14nSupport = val;
- return this;
- }
-
- public JAXBContextBuilder setXmlAccessorFactorySupport(boolean val) {
- this.xmlAccessorFactorySupport = val;
- return this;
- }
-
- public JAXBContextBuilder setDefaultNsUri(String val) {
- this.defaultNsUri = val;
- return this;
- }
-
- public JAXBContextBuilder setAllNillable(boolean val) {
- this.allNillable = val;
- return this;
- }
-
- public JAXBContextBuilder setClasses(Class[] val) {
- this.classes = val;
- return this;
- }
-
- public JAXBContextBuilder setAnnotationReader(RuntimeAnnotationReader val) {
- this.annotationReader = val;
- return this;
- }
-
- public JAXBContextBuilder setSubclassReplacements(Map<Class,Class> val) {
- this.subclassReplacements = val;
- return this;
- }
-
- public JAXBContextBuilder setTypeRefs(Collection<TypeReference> val) {
- this.typeRefs = val;
- return this;
- }
-
- public JAXBContextBuilder setImprovedXsiTypeHandling(boolean val) {
- this.improvedXsiTypeHandling = val;
- return this;
- }
-
- public JAXBContextBuilder setDisableSecurityProcessing(boolean val) {
- this.disableSecurityProcessing = val;
- return this;
- }
-
- public JAXBContextImpl build() throws JAXBException {
-
- // fool-proof
- if (this.defaultNsUri == null) {
- this.defaultNsUri = "";
- }
-
- if (this.subclassReplacements == null) {
- this.subclassReplacements = Collections.emptyMap();
- }
-
- if (this.annotationReader == null) {
- this.annotationReader = new RuntimeInlineAnnotationReader();
- }
-
- if (this.typeRefs == null) {
- this.typeRefs = Collections.<TypeReference>emptyList();
- }
-
- return new JAXBContextImpl(this);
- }
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JaxBeanInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JaxBeanInfo.java
deleted file mode 100644
index 2bd664f6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JaxBeanInfo.java
+++ /dev/null
@@ -1,550 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.Util;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfo;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-
-import org.xml.sax.SAXException;
-
-/**
- * Encapsulates various JAXB operations on objects bound by JAXB.
- * Immutable and thread-safe.
- *
- * <p>
- * Each JAXB-bound class has a corresponding {@link JaxBeanInfo} object,
- * which performs all the JAXB related operations on behalf of
- * the JAXB-bound object.
- *
- * <p>
- * Given a class, the corresponding {@link JaxBeanInfo} can be located
- * via {@link JAXBContextImpl#getBeanInfo(Class,boolean)}.
- *
- * <p>
- * Typically, {@link JaxBeanInfo} implementations should be generated
- * by XJC/JXC. Those impl classes will register themselves to their
- * master <tt>ObjectFactory</tt> class.
- *
- * <p>
- * The type parameter BeanT is the Java class of the bean that this represents.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class JaxBeanInfo<BeanT> {
-
- protected boolean isNilIncluded = false;
-
- /**
- * For {@link JaxBeanInfo} that has multiple type names.
- */
- protected JaxBeanInfo(JAXBContextImpl grammar, RuntimeTypeInfo rti, Class<BeanT> jaxbType, QName[] typeNames, boolean isElement,boolean isImmutable, boolean hasLifecycleEvents) {
- this(grammar,rti,jaxbType,(Object)typeNames,isElement,isImmutable,hasLifecycleEvents);
- }
-
- /**
- * For {@link JaxBeanInfo} that has one type name.
- */
- protected JaxBeanInfo(JAXBContextImpl grammar, RuntimeTypeInfo rti, Class<BeanT> jaxbType, QName typeName, boolean isElement,boolean isImmutable, boolean hasLifecycleEvents) {
- this(grammar,rti,jaxbType,(Object)typeName,isElement,isImmutable,hasLifecycleEvents);
- }
-
- /**
- * For {@link JaxBeanInfo} that has no type names.
- */
- protected JaxBeanInfo(JAXBContextImpl grammar, RuntimeTypeInfo rti, Class<BeanT> jaxbType, boolean isElement,boolean isImmutable, boolean hasLifecycleEvents) {
- this(grammar,rti,jaxbType,(Object)null,isElement,isImmutable,hasLifecycleEvents);
- }
-
- private JaxBeanInfo(JAXBContextImpl grammar, RuntimeTypeInfo rti, Class<BeanT> jaxbType, Object typeName, boolean isElement,boolean isImmutable, boolean hasLifecycleEvents) {
- grammar.beanInfos.put(rti,this);
-
- this.jaxbType = jaxbType;
- this.typeName = typeName;
- this.flag = (short)((isElement?FLAG_IS_ELEMENT:0)
- |(isImmutable?FLAG_IS_IMMUTABLE:0)
- |(hasLifecycleEvents?FLAG_HAS_LIFECYCLE_EVENTS:0));
- }
-
- /**
- * Various boolean flags combined into one field to improve memory footprint.
- */
- protected short flag;
-
- private static final short FLAG_IS_ELEMENT = 1;
- private static final short FLAG_IS_IMMUTABLE = 2;
- private static final short FLAG_HAS_ELEMENT_ONLY_CONTENTMODEL = 4;
- private static final short FLAG_HAS_BEFORE_UNMARSHAL_METHOD = 8;
- private static final short FLAG_HAS_AFTER_UNMARSHAL_METHOD = 16;
- private static final short FLAG_HAS_BEFORE_MARSHAL_METHOD = 32;
- private static final short FLAG_HAS_AFTER_MARSHAL_METHOD = 64;
- private static final short FLAG_HAS_LIFECYCLE_EVENTS = 128;
-
- /** cache of lifecycle methods */
- private LifecycleMethods lcm = null;
-
- /**
- * True if {@link #jaxbType} has the lifecycle method.
- */
- public final boolean hasBeforeUnmarshalMethod() {
- return (flag&FLAG_HAS_BEFORE_UNMARSHAL_METHOD) != 0;
- }
-
- /**
- * True if {@link #jaxbType} has the lifecycle method.
- */
- public final boolean hasAfterUnmarshalMethod() {
- return (flag&FLAG_HAS_AFTER_UNMARSHAL_METHOD) != 0;
- }
-
- /**
- * True if {@link #jaxbType} has the lifecycle method.
- */
- public final boolean hasBeforeMarshalMethod() {
- return (flag&FLAG_HAS_BEFORE_MARSHAL_METHOD) != 0;
- }
-
- /**
- * True if {@link #jaxbType} has the lifecycle method.
- */
- public final boolean hasAfterMarshalMethod() {
- return (flag&FLAG_HAS_AFTER_MARSHAL_METHOD) != 0;
- }
-
- /**
- * Gets the JAXB bound class type that this {@link JaxBeanInfo}
- * handles.
- *
- * <p>
- * IOW, when a bean info object is requested for T,
- * sometimes the bean info for one of its base classes might be
- * returned.
- */
- public final Class<BeanT> jaxbType;
-
- /**
- * Returns true if the bean is mapped to/from an XML element.
- *
- * <p>
- * When this method returns true, {@link #getElementNamespaceURI(Object)}
- * and {@link #getElementLocalName(Object)} returns the element name of
- * the bean.
- */
- public final boolean isElement() {
- return (flag&FLAG_IS_ELEMENT)!=0;
- }
-
- /**
- * Returns true if the bean is immutable.
- *
- * <p>
- * If this is true, Binder won't try to ueuse this object, and the unmarshaller
- * won't create a new instance of it before it starts.
- */
- public final boolean isImmutable() {
- return (flag&FLAG_IS_IMMUTABLE)!=0;
- }
-
- /**
- * True if this bean has an element-only content model.
- * <p>
- * If this flag is true, the unmarshaller can work
- * faster by ignoring whitespaces more efficiently.
- */
- public final boolean hasElementOnlyContentModel() {
- return (flag&FLAG_HAS_ELEMENT_ONLY_CONTENTMODEL)!=0;
- }
-
- /**
- * True if this bean has an element-only content model.
- * <p>
- * Should be considered immutable, though I can't mark it final
- * because it cannot be computed in this constructor.
- */
- protected final void hasElementOnlyContentModel(boolean value) {
- if(value)
- flag |= FLAG_HAS_ELEMENT_ONLY_CONTENTMODEL;
- else
- flag &= ~FLAG_HAS_ELEMENT_ONLY_CONTENTMODEL;
- }
-
- public boolean isNilIncluded() {
- return isNilIncluded;
- }
-
- /**
- * This method is used to determine which of the sub-classes should be
- * interrogated for the existence of lifecycle methods.
- *
- * @return true if the un|marshaller should look for lifecycle methods
- * on this beanInfo, false otherwise.
- */
- public boolean lookForLifecycleMethods() {
- return (flag&FLAG_HAS_LIFECYCLE_EVENTS)!=0;
- }
-
- /**
- * Returns the namespace URI portion of the element name,
- * if the bean that this class represents is mapped from/to
- * an XML element.
- *
- * @throws UnsupportedOperationException
- * if {@link #isElement} is false.
- */
- public abstract String getElementNamespaceURI(BeanT o);
-
- /**
- * Returns the local name portion of the element name,
- * if the bean that this class represents is mapped from/to
- * an XML element.
- *
- * @throws UnsupportedOperationException
- * if {@link #isElement} is false.
- */
- public abstract String getElementLocalName(BeanT o);
-
- /**
- * Type names associated with this {@link JaxBeanInfo}.
- *
- * @see #getTypeNames()
- */
- private final Object typeName; // either null, QName, or QName[]. save memory since most of them have just one.
-
- /**
- * Returns XML Schema type names if the bean is mapped from
- * a complex/simple type of XML Schema.
- *
- * <p>
- * This is an ugly necessity to correctly handle
- * the type substitution semantics of XML Schema.
- *
- * <p>
- * A single Java class maybe mapped to more than one
- * XML types. All the types listed here are recognized
- * when we are unmarshalling XML.
- *
- * <p>
- * null if the class is not bound to a named schema type.
- *
- * <p>
- */
- public Collection<QName> getTypeNames() {
- if(typeName==null) return Collections.emptyList();
- if(typeName instanceof QName) return Collections.singletonList((QName)typeName);
- return Arrays.asList((QName[])typeName);
- }
-
- /**
- * Returns the XML type name to be used to marshal the specified instance.
- *
- * <P>
- * Most of the times the type can be determined regardless of the actual
- * instance, but there's a few exceptions (most notably {@link XMLGregorianCalendar}),
- * so as a general rule we need an instance to determine it.
- */
- public QName getTypeName(@NotNull BeanT instance) {
- if(typeName==null) return null;
- if(typeName instanceof QName) return (QName)typeName;
- return ((QName[])typeName)[0];
- }
-
- /**
- * Creates a new instance of the bean.
- *
- * <p>
- * This operation is only supported when {@link #isImmutable} is false.
- *
- * @param context
- * Sometimes the created bean remembers the corresponding source location,
- */
- public abstract BeanT createInstance(UnmarshallingContext context) throws IllegalAccessException, InvocationTargetException, InstantiationException, SAXException;
-
- /**
- * Resets the object to the initial state, as if the object
- * is created fresh.
- *
- * <p>
- * This is used to reuse an existing object for unmarshalling.
- *
- * @param context
- * used for reporting any errors.
- *
- * @return
- * true if the object was successfuly resetted.
- * False if the object is not resettable, in which case the object will be
- * discarded and new one will be created.
- * <p>
- * If the object is resettable but failed by an error, it should be reported to the context,
- * then return false. If the object is not resettable to begin with, do not report an error.
- *
- * @throws SAXException
- * as a result of reporting an error, the context may throw a {@link SAXException}.
- */
- public abstract boolean reset( BeanT o, UnmarshallingContext context ) throws SAXException;
-
- /**
- * Gets the ID value of the given bean, if it has an ID value.
- * Otherwise return null.
- */
- public abstract String getId(BeanT o, XMLSerializer target) throws SAXException;
-
- /**
- * Serializes child elements and texts into the specified target.
- */
- public abstract void serializeBody( BeanT o, XMLSerializer target ) throws SAXException, IOException, XMLStreamException;
-
- /**
- * Serializes attributes into the specified target.
- */
- public abstract void serializeAttributes( BeanT o, XMLSerializer target ) throws SAXException, IOException, XMLStreamException;
-
- /**
- * Serializes the bean as the root element.
- *
- * <p>
- * In the java-to-schema binding, an object might marshal in two different
- * ways depending on whether it is used as the root of the graph or not.
- * In the former case, an object could marshal as an element, whereas
- * in the latter case, it marshals as a type.
- *
- * <p>
- * This method is used to marshal the root of the object graph to allow
- * this semantics to be implemented.
- *
- * <p>
- * It is doubtful to me if it's a good idea for an object to marshal
- * in two ways depending on the context.
- *
- * <p>
- * For schema-to-java, this is equivalent to {@link #serializeBody(Object, XMLSerializer)}.
- */
- public abstract void serializeRoot( BeanT o, XMLSerializer target ) throws SAXException, IOException, XMLStreamException;
-
- /**
- * Declares all the namespace URIs this object is using at
- * its top-level scope into the specified target.
- */
- public abstract void serializeURIs( BeanT o, XMLSerializer target ) throws SAXException;
-
- /**
- * Gets the {@link Loader} that will unmarshall the given object.
- *
- * @param context
- * The {@link JAXBContextImpl} object that governs this object.
- * This object is taken as a parameter so that {@link JaxBeanInfo} doesn't have
- * to store them on its own.
- *
- * When this method is invoked from within the unmarshaller, tihs parameter can be
- * null (because the loader is constructed already.)
- *
- * @param typeSubstitutionCapable
- * If true, the returned {@link Loader} is capable of recognizing @xsi:type (if necessary)
- * and unmarshals a subtype. This allowes an optimization where this bean info
- * is guaranteed not to have a type substitution.
- * If false, the returned {@link Loader} doesn't look for @xsi:type.
- * @return
- * must return non-null valid object
- */
- public abstract Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable);
-
- /**
- * If the bean's representation in XML is just a text,
- * this method return a {@link Transducer} that lets you convert
- * values between the text and the bean.
- */
- public abstract Transducer<BeanT> getTransducer();
-
-
- /**
- * Called after all the {@link JaxBeanInfo}s are created.
- * @param grammar
- */
- protected void link(JAXBContextImpl grammar) {
- }
-
- /**
- * Called at the end of the {@link JAXBContext} initialization phase
- * to clean up any unnecessary references.
- */
- public void wrapUp() {}
-
-
- private static final Class[] unmarshalEventParams = { Unmarshaller.class, Object.class };
- private static Class[] marshalEventParams = { Marshaller.class };
-
- /**
- * use reflection to determine which of the 4 object lifecycle methods exist on
- * the JAXB bound type.
- */
- protected final void setLifecycleFlags() {
- try {
- Class<BeanT> jt = jaxbType;
-
- if (lcm == null) {
- lcm = new LifecycleMethods();
- }
-
- while (jt != null) {
- for (Method m : jt.getDeclaredMethods()) {
- String name = m.getName();
-
- if (lcm.beforeUnmarshal == null) {
- if (name.equals("beforeUnmarshal")) {
- if (match(m, unmarshalEventParams)) {
- cacheLifecycleMethod(m, FLAG_HAS_BEFORE_UNMARSHAL_METHOD);
- }
- }
- }
-
- if (lcm.afterUnmarshal == null) {
- if (name.equals("afterUnmarshal")) {
- if (match(m, unmarshalEventParams)) {
- cacheLifecycleMethod(m, FLAG_HAS_AFTER_UNMARSHAL_METHOD);
- }
- }
- }
-
- if (lcm.beforeMarshal == null) {
- if (name.equals("beforeMarshal")) {
- if (match(m, marshalEventParams)) {
- cacheLifecycleMethod(m, FLAG_HAS_BEFORE_MARSHAL_METHOD);
- }
- }
- }
-
- if (lcm.afterMarshal == null) {
- if (name.equals("afterMarshal")) {
- if (match(m, marshalEventParams)) {
- cacheLifecycleMethod(m, FLAG_HAS_AFTER_MARSHAL_METHOD);
- }
- }
- }
- }
- jt = (Class<BeanT>) jt.getSuperclass();
- }
- } catch (SecurityException e) {
- // this happens when we don't have enough permission.
- logger.log(Level.WARNING, Messages.UNABLE_TO_DISCOVER_EVENTHANDLER.format(
- jaxbType.getName(), e));
- }
- }
-
- private boolean match(Method m, Class[] params) {
- return Arrays.equals(m.getParameterTypes(),params);
- }
-
- /**
- * Cache a reference to the specified lifecycle method for the jaxbType
- * associated with this beanInfo.
- *
- * @param m Method reference
- * @param lifecycleFlag byte representing which of the 4 lifecycle methods
- * is being cached
- */
- private void cacheLifecycleMethod(Method m, short lifecycleFlag) {
- //LifecycleMethods lcm = getLifecycleMethods();
- if(lcm==null) {
- lcm = new LifecycleMethods();
- //lcmCache.put(jaxbType, lcm);
- }
-
- m.setAccessible(true);
-
- flag |= lifecycleFlag;
-
- switch (lifecycleFlag) {
- case FLAG_HAS_BEFORE_UNMARSHAL_METHOD:
- lcm.beforeUnmarshal = m;
- break;
- case FLAG_HAS_AFTER_UNMARSHAL_METHOD:
- lcm.afterUnmarshal = m;
- break;
- case FLAG_HAS_BEFORE_MARSHAL_METHOD:
- lcm.beforeMarshal = m;
- break;
- case FLAG_HAS_AFTER_MARSHAL_METHOD:
- lcm.afterMarshal = m;
- break;
- }
- }
-
- /**
- * Return the LifecycleMethods cache for this ClassBeanInfo's corresponding
- * jaxbType if it exists, else return null.
- *
- */
- public final LifecycleMethods getLifecycleMethods() {
- return lcm;
- }
-
- /**
- * Invokes the beforeUnmarshal method if applicable.
- */
- public final void invokeBeforeUnmarshalMethod(UnmarshallerImpl unm, Object child, Object parent) throws SAXException {
- Method m = getLifecycleMethods().beforeUnmarshal;
- invokeUnmarshallCallback(m, child, unm, parent);
- }
-
- /**
- * Invokes the afterUnmarshal method if applicable.
- */
- public final void invokeAfterUnmarshalMethod(UnmarshallerImpl unm, Object child, Object parent) throws SAXException {
- Method m = getLifecycleMethods().afterUnmarshal;
- invokeUnmarshallCallback(m, child, unm, parent);
- }
-
- private void invokeUnmarshallCallback(Method m, Object child, UnmarshallerImpl unm, Object parent) throws SAXException {
- try {
- m.invoke(child,unm,parent);
- } catch (IllegalAccessException e) {
- UnmarshallingContext.getInstance().handleError(e, false);
- } catch (InvocationTargetException e) {
- UnmarshallingContext.getInstance().handleError(e, false);
- }
- }
-
- private static final Logger logger = Util.getClassLogger();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/LeafBeanInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/LeafBeanInfoImpl.java
deleted file mode 100644
index 02426456..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/LeafBeanInfoImpl.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime;
-
-import java.io.IOException;
-
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.helpers.ValidationEventImpl;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeLeafInfo;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.TextLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiTypeLoader;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link JaxBeanInfo} implementation for immutable leaf classes.
- *
- * <p>
- * Leaf classes are always bound to a text and they are often immutable.
- * The JAXB spec allows this binding for a few special Java classes plus
- * type-safe enums.
- *
- * <p>
- * This implementation obtains necessary information from {@link RuntimeLeafInfo}.
- *
- * @author Kohsuke Kawaguchi
- */
-final class LeafBeanInfoImpl<BeanT> extends JaxBeanInfo<BeanT> {
-
- private final Loader loader;
- private final Loader loaderWithSubst;
-
- private final Transducer<BeanT> xducer;
-
- /**
- * Non-null only if the leaf is also an element.
- */
- private final Name tagName;
-
- public LeafBeanInfoImpl(JAXBContextImpl grammar, RuntimeLeafInfo li) {
- super(grammar,li,li.getClazz(),li.getTypeNames(),li.isElement(),true,false);
-
- xducer = li.getTransducer();
- loader = new TextLoader(xducer);
- loaderWithSubst = new XsiTypeLoader(this);
-
- if(isElement())
- tagName = grammar.nameBuilder.createElementName(li.getElementName());
- else
- tagName = null;
- }
-
- @Override
- public QName getTypeName(BeanT instance) {
- QName tn = xducer.getTypeName(instance);
- if(tn!=null) return tn;
- // rely on default
- return super.getTypeName(instance);
- }
-
- public final String getElementNamespaceURI(BeanT t) {
- return tagName.nsUri;
- }
-
- public final String getElementLocalName(BeanT t) {
- return tagName.localName;
- }
-
- public BeanT createInstance(UnmarshallingContext context) {
- throw new UnsupportedOperationException();
- }
-
- public final boolean reset(BeanT bean, UnmarshallingContext context) {
- return false;
- }
-
- public final String getId(BeanT bean, XMLSerializer target) {
- return null;
- }
-
- public final void serializeBody(BeanT bean, XMLSerializer w) throws SAXException, IOException, XMLStreamException {
- // most of the times leaves are printed as leaf element/attribute property,
- // so this code is only used for example when you have multiple XmlElement on a property
- // and some of them are leaves. Hence this doesn't need to be super-fast.
- try {
- xducer.writeText(w,bean,null);
- } catch (AccessorException e) {
- w.reportError(null,e);
- }
- }
-
- public final void serializeAttributes(BeanT bean, XMLSerializer target) {
- // noop
- }
-
- public final void serializeRoot(BeanT bean, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
- if(tagName==null) {
- target.reportError(
- new ValidationEventImpl(
- ValidationEvent.ERROR,
- Messages.UNABLE_TO_MARSHAL_NON_ELEMENT.format(bean.getClass().getName()),
- null,
- null));
- }
- else {
- target.startElement(tagName,bean);
- target.childAsSoleContent(bean,null);
- target.endElement();
- }
- }
-
- public final void serializeURIs(BeanT bean, XMLSerializer target) throws SAXException {
- // TODO: maybe we should create another LeafBeanInfoImpl class for
- // context-dependent xducers?
- if(xducer.useNamespace()) {
- try {
- xducer.declareNamespace(bean,target);
- } catch (AccessorException e) {
- target.reportError(null,e);
- }
- }
- }
-
- public final Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
- if(typeSubstitutionCapable)
- return loaderWithSubst;
- else
- return loader;
- }
-
- public Transducer<BeanT> getTransducer() {
- return xducer;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/LifecycleMethods.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/LifecycleMethods.java
deleted file mode 100644
index e168217f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/LifecycleMethods.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.lang.reflect.Method;
-
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-
-/**
- * This class is a simple container for caching lifecycle methods that are
- * discovered during construction of (@link JAXBContext}.
- *
- * @see JaxBeanInfo#lcm
- * @see Loader#fireBeforeUnmarshal(JaxBeanInfo, Object, UnmarshallingContext.State)
- * @see Loader#fireAfterUnmarshal(JaxBeanInfo, Object, UnmarshallingContext.State)
- * @see XMLSerializer#fireMarshalEvent(Object, Method)
- */
-final class LifecycleMethods {
- Method beforeUnmarshal;
- Method afterUnmarshal;
- Method beforeMarshal;
- Method afterMarshal;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Location.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Location.java
deleted file mode 100644
index 05e8852a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Location.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-
-
-/**
- * Location information for {@link IllegalAnnotationException}.
- *
- * @author Kohsuke Kawaguchi
- * @since JAXB 2.0 EA1
- */
-// internally, Location is created from Locatable.
-public interface Location {
- /**
- * Returns a human-readable string that represents this position.
- *
- * @return
- * never null.
- */
- String toString();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/MarshallerImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/MarshallerImpl.java
deleted file mode 100644
index 94d7623b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/MarshallerImpl.java
+++ /dev/null
@@ -1,619 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.io.BufferedWriter;
-import java.io.Closeable;
-import java.io.FileOutputStream;
-import java.io.Flushable;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-
-import java.net.URI;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.MarshalException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.PropertyException;
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.bind.helpers.AbstractMarshallerImpl;
-import javax.xml.stream.XMLEventWriter;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Result;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.sax.SAXResult;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.validation.Schema;
-import javax.xml.validation.ValidatorHandler;
-import javax.xml.namespace.NamespaceContext;
-
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler;
-import com.sun.xml.internal.bind.marshaller.DataWriter;
-import com.sun.xml.internal.bind.marshaller.DumbEscapeHandler;
-import com.sun.xml.internal.bind.marshaller.MinimumEscapeHandler;
-import com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper;
-import com.sun.xml.internal.bind.marshaller.NioEscapeHandler;
-import com.sun.xml.internal.bind.marshaller.SAX2DOMEx;
-import com.sun.xml.internal.bind.marshaller.XMLWriter;
-import com.sun.xml.internal.bind.v2.runtime.output.C14nXmlOutput;
-import com.sun.xml.internal.bind.v2.runtime.output.Encoded;
-import com.sun.xml.internal.bind.v2.runtime.output.ForkXmlOutput;
-import com.sun.xml.internal.bind.v2.runtime.output.IndentingUTF8XmlOutput;
-import com.sun.xml.internal.bind.v2.runtime.output.NamespaceContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.output.SAXOutput;
-import com.sun.xml.internal.bind.v2.runtime.output.UTF8XmlOutput;
-import com.sun.xml.internal.bind.v2.runtime.output.XMLEventWriterOutput;
-import com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput;
-import com.sun.xml.internal.bind.v2.runtime.output.XmlOutput;
-import com.sun.xml.internal.bind.v2.util.FatalAdapter;
-
-import java.net.URISyntaxException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-/**
- * Implementation of {@link Marshaller} interface for the JAXB RI.
- *
- * <p>
- * Eventually all the {@link #marshal} methods call into
- * the {@link #write} method.
- *
- * @author Kohsuke Kawaguchi
- * @author Vivek Pandey
- */
-public /*to make unit tests happy*/ final class MarshallerImpl extends AbstractMarshallerImpl implements ValidationEventHandler
-{
- /** Indentation string. Default is four whitespaces. */
- private String indent = " ";
-
- /** Used to assign prefixes to namespace URIs. */
- private NamespacePrefixMapper prefixMapper = null;
-
- /** Object that handles character escaping. */
- private CharacterEscapeHandler escapeHandler = null;
-
- /** XML BLOB written after the XML declaration. */
- private String header=null;
-
- /** reference to the context that created this object */
- final JAXBContextImpl context;
-
- protected final XMLSerializer serializer;
-
- /**
- * Non-null if we do the marshal-time validation.
- */
- private Schema schema;
-
- /** Marshaller.Listener */
- private Listener externalListener = null;
-
- /** Configured for c14n? */
- private boolean c14nSupport;
-
- // while createing XmlOutput those values may be set.
- // if these are non-null they need to be cleaned up
- private Flushable toBeFlushed;
- private Closeable toBeClosed;
-
- /**
- * @param assoc
- * non-null if the marshaller is working inside {@link BinderImpl}.
- */
- public MarshallerImpl( JAXBContextImpl c, AssociationMap assoc ) {
- context = c;
- serializer = new XMLSerializer(this);
- c14nSupport = context.c14nSupport;
-
- try {
- setEventHandler(this);
- } catch (JAXBException e) {
- throw new AssertionError(e); // impossible
- }
- }
-
- public JAXBContextImpl getContext() {
- return context;
- }
-
- /**
- * Marshals to {@link OutputStream} with the given in-scope namespaces
- * taken into account.
- *
- * @since 2.1.5
- */
- public void marshal(Object obj, OutputStream out, NamespaceContext inscopeNamespace) throws JAXBException {
- write(obj, createWriter(out), new StAXPostInitAction(inscopeNamespace,serializer));
- }
-
- @Override
- public void marshal(Object obj, XMLStreamWriter writer) throws JAXBException {
- write(obj, XMLStreamWriterOutput.create(writer,context), new StAXPostInitAction(writer,serializer));
- }
-
- @Override
- public void marshal(Object obj, XMLEventWriter writer) throws JAXBException {
- write(obj, new XMLEventWriterOutput(writer), new StAXPostInitAction(writer,serializer));
- }
-
- public void marshal(Object obj, XmlOutput output) throws JAXBException {
- write(obj, output, null );
- }
-
- /**
- * Creates {@link XmlOutput} from the given {@link Result} object.
- */
- final XmlOutput createXmlOutput(Result result) throws JAXBException {
- if (result instanceof SAXResult)
- return new SAXOutput(((SAXResult) result).getHandler());
-
- if (result instanceof DOMResult) {
- final Node node = ((DOMResult) result).getNode();
-
- if (node == null) {
- Document doc = JAXBContextImpl.createDom(getContext().disableSecurityProcessing);
- ((DOMResult) result).setNode(doc);
- return new SAXOutput(new SAX2DOMEx(doc));
- } else {
- return new SAXOutput(new SAX2DOMEx(node));
- }
- }
- if (result instanceof StreamResult) {
- StreamResult sr = (StreamResult) result;
-
- if (sr.getWriter() != null)
- return createWriter(sr.getWriter());
- else if (sr.getOutputStream() != null)
- return createWriter(sr.getOutputStream());
- else if (sr.getSystemId() != null) {
- String fileURL = sr.getSystemId();
-
- try {
- fileURL = new URI(fileURL).getPath();
- } catch (URISyntaxException use) {
- // otherwise assume that it's a file name
- }
-
- try {
- FileOutputStream fos = new FileOutputStream(fileURL);
- assert toBeClosed==null;
- toBeClosed = fos;
- return createWriter(fos);
- } catch (IOException e) {
- throw new MarshalException(e);
- }
- }
- }
-
- // unsupported parameter type
- throw new MarshalException(Messages.UNSUPPORTED_RESULT.format());
- }
-
- /**
- * Creates an appropriate post-init action object.
- */
- final Runnable createPostInitAction(Result result) {
- if (result instanceof DOMResult) {
- Node node = ((DOMResult) result).getNode();
- return new DomPostInitAction(node,serializer);
- }
- return null;
- }
-
- public void marshal(Object target,Result result) throws JAXBException {
- write(target, createXmlOutput(result), createPostInitAction(result));
- }
-
-
- /**
- * Used by {@link BridgeImpl} to write an arbitrary object as a fragment.
- */
- protected final <T> void write(Name rootTagName, JaxBeanInfo<T> bi, T obj, XmlOutput out,Runnable postInitAction) throws JAXBException {
- try {
- try {
- prewrite(out, true, postInitAction);
- serializer.startElement(rootTagName,null);
- if(bi.jaxbType==Void.class || bi.jaxbType==void.class) {
- // special case for void
- serializer.endNamespaceDecls(null);
- serializer.endAttributes();
- } else { // normal cases
- if(obj==null)
- serializer.writeXsiNilTrue();
- else
- serializer.childAsXsiType(obj,"root",bi, false);
- }
- serializer.endElement();
- postwrite();
- } catch( SAXException e ) {
- throw new MarshalException(e);
- } catch (IOException e) {
- throw new MarshalException(e);
- } catch (XMLStreamException e) {
- throw new MarshalException(e);
- } finally {
- serializer.close();
- }
- } finally {
- cleanUp();
- }
- }
-
- /**
- * All the marshal method invocation eventually comes down to this call.
- */
- private void write(Object obj, XmlOutput out, Runnable postInitAction) throws JAXBException {
- try {
- if( obj == null )
- throw new IllegalArgumentException(Messages.NOT_MARSHALLABLE.format());
-
- if( schema!=null ) {
- // send the output to the validator as well
- ValidatorHandler validator = schema.newValidatorHandler();
- validator.setErrorHandler(new FatalAdapter(serializer));
- // work around a bug in JAXP validator in Tiger
- XMLFilterImpl f = new XMLFilterImpl() {
- @Override
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
- super.startPrefixMapping(prefix.intern(), uri.intern());
- }
- };
- f.setContentHandler(validator);
- out = new ForkXmlOutput( new SAXOutput(f) {
- @Override
- public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws SAXException, IOException, XMLStreamException {
- super.startDocument(serializer, false, nsUriIndex2prefixIndex, nsContext);
- }
- @Override
- public void endDocument(boolean fragment) throws SAXException, IOException, XMLStreamException {
- super.endDocument(false);
- }
- }, out );
- }
-
- try {
- prewrite(out,isFragment(),postInitAction);
- serializer.childAsRoot(obj);
- postwrite();
- } catch( SAXException e ) {
- throw new MarshalException(e);
- } catch (IOException e) {
- throw new MarshalException(e);
- } catch (XMLStreamException e) {
- throw new MarshalException(e);
- } finally {
- serializer.close();
- }
- } finally {
- cleanUp();
- }
- }
-
- private void cleanUp() {
- if(toBeFlushed!=null)
- try {
- toBeFlushed.flush();
- } catch (IOException e) {
- // ignore
- }
- if(toBeClosed!=null)
- try {
- toBeClosed.close();
- } catch (IOException e) {
- // ignore
- }
- toBeFlushed = null;
- toBeClosed = null;
- }
-
- // common parts between two write methods.
-
- private void prewrite(XmlOutput out, boolean fragment, Runnable postInitAction) throws IOException, SAXException, XMLStreamException {
- serializer.startDocument(out,fragment,getSchemaLocation(),getNoNSSchemaLocation());
- if(postInitAction!=null) postInitAction.run();
- if(prefixMapper!=null) {
- // be defensive as we work with the user's code
- String[] decls = prefixMapper.getContextualNamespaceDecls();
- if(decls!=null) { // defensive check
- for( int i=0; i<decls.length; i+=2 ) {
- String prefix = decls[i];
- String nsUri = decls[i+1];
- if(nsUri!=null && prefix!=null) // defensive check
- serializer.addInscopeBinding(nsUri,prefix);
- }
- }
- }
- serializer.setPrefixMapper(prefixMapper);
- }
-
- private void postwrite() throws IOException, SAXException, XMLStreamException {
- serializer.endDocument();
- serializer.reconcileID(); // extra check
- }
-
-
- //
- //
- // create XMLWriter by specifing various type of output.
- //
- //
-
- protected CharacterEscapeHandler createEscapeHandler( String encoding ) {
- if( escapeHandler!=null )
- // user-specified one takes precedence.
- return escapeHandler;
-
- if( encoding.startsWith("UTF") )
- // no need for character reference. Use the handler
- // optimized for that pattern.
- return MinimumEscapeHandler.theInstance;
-
- // otherwise try to find one from the encoding
- try {
- // try new JDK1.4 NIO
- return new NioEscapeHandler( getJavaEncoding(encoding) );
- } catch( Throwable e ) {
- // if that fails, fall back to the dumb mode
- return DumbEscapeHandler.theInstance;
- }
- }
-
- public XmlOutput createWriter( Writer w, String encoding ) {
- // XMLWriter doesn't do buffering, so do it here if it looks like a good idea
- if(!(w instanceof BufferedWriter))
- w = new BufferedWriter(w);
-
- assert toBeFlushed==null;
- toBeFlushed = w;
-
- CharacterEscapeHandler ceh = createEscapeHandler(encoding);
- XMLWriter xw;
-
- if(isFormattedOutput()) {
- DataWriter d = new DataWriter(w,encoding,ceh);
- d.setIndentStep(indent);
- xw=d;
- } else
- xw = new XMLWriter(w,encoding,ceh);
-
- xw.setXmlDecl(!isFragment());
- xw.setHeader(header);
- return new SAXOutput(xw); // TODO: don't we need a better writer?
- }
-
- public XmlOutput createWriter(Writer w) {
- return createWriter(w, getEncoding());
- }
-
- public XmlOutput createWriter( OutputStream os ) throws JAXBException {
- return createWriter(os, getEncoding());
- }
-
- public XmlOutput createWriter( OutputStream os, String encoding ) throws JAXBException {
- // UTF8XmlOutput does buffering on its own, and
- // otherwise createWriter(Writer) inserts a buffering,
- // so no point in doing a buffering here.
-
- if(encoding.equals("UTF-8")) {
- Encoded[] table = context.getUTF8NameTable();
- final UTF8XmlOutput out;
- if(isFormattedOutput())
- out = new IndentingUTF8XmlOutput(os, indent, table, escapeHandler);
- else {
- if(c14nSupport)
- out = new C14nXmlOutput(os, table, context.c14nSupport, escapeHandler);
- else
- out = new UTF8XmlOutput(os, table, escapeHandler);
- }
- if(header!=null)
- out.setHeader(header);
- return out;
- }
-
- try {
- return createWriter(
- new OutputStreamWriter(os,getJavaEncoding(encoding)),
- encoding );
- } catch( UnsupportedEncodingException e ) {
- throw new MarshalException(
- Messages.UNSUPPORTED_ENCODING.format(encoding),
- e );
- }
- }
-
-
- @Override
- public Object getProperty(String name) throws PropertyException {
- if( INDENT_STRING.equals(name) )
- return indent;
- if( ENCODING_HANDLER.equals(name) || ENCODING_HANDLER2.equals(name) )
- return escapeHandler;
- if( PREFIX_MAPPER.equals(name) )
- return prefixMapper;
- if( XMLDECLARATION.equals(name) )
- return !isFragment();
- if( XML_HEADERS.equals(name) )
- return header;
- if( C14N.equals(name) )
- return c14nSupport;
- if ( OBJECT_IDENTITY_CYCLE_DETECTION.equals(name))
- return serializer.getObjectIdentityCycleDetection();
-
- return super.getProperty(name);
- }
-
- @Override
- public void setProperty(String name, Object value) throws PropertyException {
- if( INDENT_STRING.equals(name) ) {
- checkString(name, value);
- indent = (String)value;
- return;
- }
- if( ENCODING_HANDLER.equals(name) || ENCODING_HANDLER2.equals(name)) {
- if(!(value instanceof CharacterEscapeHandler))
- throw new PropertyException(
- Messages.MUST_BE_X.format(
- name,
- CharacterEscapeHandler.class.getName(),
- value.getClass().getName() ) );
- escapeHandler = (CharacterEscapeHandler)value;
- return;
- }
- if( PREFIX_MAPPER.equals(name) ) {
- if(!(value instanceof NamespacePrefixMapper))
- throw new PropertyException(
- Messages.MUST_BE_X.format(
- name,
- NamespacePrefixMapper.class.getName(),
- value.getClass().getName() ) );
- prefixMapper = (NamespacePrefixMapper)value;
- return;
- }
- if( XMLDECLARATION.equals(name) ) {
- checkBoolean(name, value);
- // com.sun.xml.internal.bind.xmlDeclaration is an alias for JAXB_FRAGMENT
- // setting it to false is treated the same as setting fragment to true.
- super.setProperty(JAXB_FRAGMENT, !(Boolean)value);
- return;
- }
- if( XML_HEADERS.equals(name) ) {
- checkString(name, value);
- header = (String)value;
- return;
- }
- if( C14N.equals(name) ) {
- checkBoolean(name,value);
- c14nSupport = (Boolean)value;
- return;
- }
- if (OBJECT_IDENTITY_CYCLE_DETECTION.equals(name)) {
- checkBoolean(name,value);
- serializer.setObjectIdentityCycleDetection((Boolean)value);
- return;
- }
-
- super.setProperty(name, value);
- }
-
- /*
- * assert that the given object is a Boolean
- */
- private void checkBoolean( String name, Object value ) throws PropertyException {
- if(!(value instanceof Boolean))
- throw new PropertyException(
- Messages.MUST_BE_X.format(
- name,
- Boolean.class.getName(),
- value.getClass().getName() ) );
- }
-
- /*
- * assert that the given object is a String
- */
- private void checkString( String name, Object value ) throws PropertyException {
- if(!(value instanceof String))
- throw new PropertyException(
- Messages.MUST_BE_X.format(
- name,
- String.class.getName(),
- value.getClass().getName() ) );
- }
-
- @Override
- public <A extends XmlAdapter> void setAdapter(Class<A> type, A adapter) {
- if(type==null)
- throw new IllegalArgumentException();
- serializer.putAdapter(type,adapter);
- }
-
- @Override
- public <A extends XmlAdapter> A getAdapter(Class<A> type) {
- if(type==null)
- throw new IllegalArgumentException();
- if(serializer.containsAdapter(type))
- // so as not to create a new instance when this method is called
- return serializer.getAdapter(type);
- else
- return null;
- }
-
- @Override
- public void setAttachmentMarshaller(AttachmentMarshaller am) {
- serializer.attachmentMarshaller = am;
- }
-
- @Override
- public AttachmentMarshaller getAttachmentMarshaller() {
- return serializer.attachmentMarshaller;
- }
-
- @Override
- public Schema getSchema() {
- return schema;
- }
-
- @Override
- public void setSchema(Schema s) {
- this.schema = s;
- }
-
- /**
- * Default error handling behavior fot {@link Marshaller}.
- */
- public boolean handleEvent(ValidationEvent event) {
- // draconian by default
- return false;
- }
-
- @Override
- public Listener getListener() {
- return externalListener;
- }
-
- @Override
- public void setListener(Listener listener) {
- externalListener = listener;
- }
-
- // features supported
- protected static final String INDENT_STRING = "com.sun.xml.internal.bind.indentString";
- protected static final String PREFIX_MAPPER = "com.sun.xml.internal.bind.namespacePrefixMapper";
- protected static final String ENCODING_HANDLER = "com.sun.xml.internal.bind.characterEscapeHandler";
- protected static final String ENCODING_HANDLER2 = "com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler";
- protected static final String XMLDECLARATION = "com.sun.xml.internal.bind.xmlDeclaration";
- protected static final String XML_HEADERS = "com.sun.xml.internal.bind.xmlHeaders";
- protected static final String C14N = JAXBRIContext.CANONICALIZATION_SUPPORT;
- protected static final String OBJECT_IDENTITY_CYCLE_DETECTION = "com.sun.xml.internal.bind.objectIdentitityCycleDetection";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages.java
deleted file mode 100644
index 095cd481..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Message resources
- */
-enum Messages {
- ILLEGAL_PARAMETER, // 2 args
- UNABLE_TO_FIND_CONVERSION_METHOD, // 3 args
- MISSING_ID, // 1 arg
- NOT_IMPLEMENTED_IN_2_0,
- UNRECOGNIZED_ELEMENT_NAME,
- TYPE_MISMATCH, // 3 args
- MISSING_OBJECT, // 1 arg
- NOT_IDENTIFIABLE, // 0 args
- DANGLING_IDREF, // 1 arg
- NULL_OUTPUT_RESOLVER, // 0 args
- UNABLE_TO_MARSHAL_NON_ELEMENT, // 1 arg
- UNABLE_TO_MARSHAL_UNBOUND_CLASS, // 1 arg
- UNSUPPORTED_PROPERTY, // 1 arg
- NULL_PROPERTY_NAME, // 0 args
- MUST_BE_X, // 3 args
- NOT_MARSHALLABLE, // 0 args
- UNSUPPORTED_RESULT, // 0 args
- UNSUPPORTED_ENCODING, // 1 arg
- SUBSTITUTED_BY_ANONYMOUS_TYPE, // 3 arg
- CYCLE_IN_MARSHALLER, // 1 arg
- UNABLE_TO_DISCOVER_EVENTHANDLER, // 1 arg
- ELEMENT_NEEDED_BUT_FOUND_DOCUMENT, // 1 arg
- UNKNOWN_CLASS, // 1 arg
- FAILED_TO_GENERATE_SCHEMA, // 0 args
- ERROR_PROCESSING_SCHEMA, // 0 args
- ILLEGAL_CONTENT, // 2 args
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
-
- @Override
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages.properties
deleted file mode 100644
index ba919761..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. Not concatenated with any other string.
-NOT_MARSHALLABLE = \
- the object parameter to marshal() is not marshallable
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_RESULT = \
- unsupported javax.xml.parser.transform.Result parameter
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_ENCODING = \
- unsupported encoding: {0}
-
-ILLEGAL_PARAMETER = \
- Illegal "{0}" parameter: {1}
-
-# {0} - class name, {2} - method name
-UNABLE_TO_FIND_CONVERSION_METHOD = \
- {0} doesn''t have a method {1} {2}();
-
-MISSING_ID = \
- Object "{0}" is found in an IDREF property but this object doesn't have an ID.
-
-NOT_IMPLEMENTED_IN_2_0 = \
- This feature is not available in JAXB RI 2.0
-
-UNRECOGNIZED_ELEMENT_NAME = \
- The tag name "{0}" is not known to this JAXBContext.
-
-TYPE_MISMATCH = \
- "{1}" property of a "{0}" object contains an object of type "{2}" but this is not allowed. \
- See javadoc of this property for what this property can accept.
-
-MISSING_OBJECT = \
- a required field "{0}" is missing an object
-
-NOT_IDENTIFIABLE = \
- An object is referenced as IDREF but its ID field is null
-
-DANGLING_IDREF = \
- A tree contains a reference to ID "{0}" but it's not a part of the object graph
-
-# Wrapped into a IOException. Not concatenated with any other string.
-NULL_OUTPUT_RESOLVER = \
- schema output resolver must not be null
-
-UNABLE_TO_MARSHAL_NON_ELEMENT = \
- unable to marshal type "{0}" as an element because it is missing an @XmlRootElement annotation
-
-UNABLE_TO_MARSHAL_UNBOUND_CLASS = \
- unable to marshal type "{0}" as an element because it is not known to this context.
-
-UNSUPPORTED_PROPERTY = \
- "{0}" is not a supported property
-
-NULL_PROPERTY_NAME = \
- property name parameter can not be null
-
-MUST_BE_X = \
- property "{0}" must be an instance of type {1}, not {2}
-
-# {0}, {1}, {2} - class name. e.g.: Instance of "com.test.implementation.Implementation" is substituting "com.test.abstractbase.AbstractType", but "com.test.implementation.Implementation" is bound to an anonymous type.
-SUBSTITUTED_BY_ANONYMOUS_TYPE = \
- Instance of "{1}" is substituting "{0}", but "{2}" is bound to an anonymous type.
-
-CYCLE_IN_MARSHALLER = \
- A cycle is detected in the object graph. This will cause infinitely deep XML: {0}
-
-# {0} - class name
-UNABLE_TO_DISCOVER_EVENTHANDLER = \
- Unable to list methods of "{0}". If there is any event callback handler on this class, it will be ignored.
-
-ELEMENT_NEEDED_BUT_FOUND_DOCUMENT = \
- A DOM document "{0}" is found but an element is needed. Use Document.getDocumentElement() and set that object instead.
-
-UNKNOWN_CLASS = \
- {0} nor any of its super class is known to this context.
-
-FAILED_TO_GENERATE_SCHEMA = \
- Failed to generate schema.
-
-ERROR_PROCESSING_SCHEMA = \
- Error during schema processing.
-
-ILLEGAL_CONTENT = \
- Illegal XML content in <{0}>: "{1}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_de.properties
deleted file mode 100644
index f8128791..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_de.properties
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. Not concatenated with any other string.
-NOT_MARSHALLABLE = die Methode marshal() kann nicht mit Objektparameter verwendet werden
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_RESULT = nicht unterst\u00FCtzter javax.xml.parser.transform.Result-Parameter
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_ENCODING = nicht unterst\u00FCtzte Codierung: {0}
-
-ILLEGAL_PARAMETER = Ung\u00FCltiger "{0}"-Parameter: {1}
-
-# {0} - class name, {2} - method name
-UNABLE_TO_FIND_CONVERSION_METHOD = {0} enth\u00E4lt keine Methode {1} {2}();
-
-MISSING_ID = Objekt "{0}" ist in einer IDREF-Eigenschaft enthalten, dieses Objekt hat jedoch keine ID.
-
-NOT_IMPLEMENTED_IN_2_0 = Dieses Feature ist in JAXB RI 2.0 nicht verf\u00FCgbar
-
-UNRECOGNIZED_ELEMENT_NAME = Der Tag-Name "{0}" ist diesem JAXBContext nicht bekannt.
-
-TYPE_MISMATCH = "{1}"-Eigenschaft eines "{0}"-Objekts enth\u00E4lt ein Objekt vom Typ "{2}", dies ist jedoch nicht zul\u00E4ssig. In javadoc f\u00FCr diese Eigenschaft wird beschrieben, was diese Eigenschaft akzeptieren kann.
-
-MISSING_OBJECT = bei einem Pflichtfeld "{0}" fehlt ein Objekt
-
-NOT_IDENTIFIABLE = Ein Objekt wird als IDREF referenziert, das ID-Feld ist jedoch null
-
-DANGLING_IDREF = Ein Baum enth\u00E4lt eine Referenz auf ID "{0}", ist jedoch nicht Bestandteil des Objektdiagramms
-
-# Wrapped into a IOException. Not concatenated with any other string.
-NULL_OUTPUT_RESOLVER = Schemaausgabe-Resolver darf nicht null sein
-
-UNABLE_TO_MARSHAL_NON_ELEMENT = Marshalling von Typ "{0}" als Element ist nicht m\u00F6glich, weil eine @XmlRootElement-Annotation fehlt
-
-UNABLE_TO_MARSHAL_UNBOUND_CLASS = Marshalling von Typ "{0}" als Element ist nicht m\u00F6glich, weil er diesem Kontext nicht bekannt ist
-
-UNSUPPORTED_PROPERTY = "{0}" ist keine unterst\u00FCtzte Eigenschaft
-
-NULL_PROPERTY_NAME = Parameter f\u00FCr Eigenschaftsname darf nicht null sein
-
-MUST_BE_X = Eigenschaft "{0}" muss eine Instanz vom Typ {1} sein, und nicht {2}
-
-# {0}, {1}, {2} - class name. e.g.: Instance of "com.test.implementation.Implementation" is substituting "com.test.abstractbase.AbstractType", but "com.test.implementation.Implementation" is bound to an anonymous type.
-SUBSTITUTED_BY_ANONYMOUS_TYPE = Instanz von "{1}" ersetzt "{0}", "{2}" ist jedoch an einen anonymen Typ gebunden.
-
-CYCLE_IN_MARSHALLER = Ein Zyklus wird in dem Objektdiagramm ermittelt. Dies verursacht ein endlos tiefes XML: {0}
-
-# {0} - class name
-UNABLE_TO_DISCOVER_EVENTHANDLER = Methoden von "{0}" k\u00F6nnen nicht aufgelistet werden. Wenn ein Ereignis-Callback Handler auf dieser Klasse vorhanden ist, wird er ignoriert.
-
-ELEMENT_NEEDED_BUT_FOUND_DOCUMENT = Ein DOM-Dokument "{0}" wurde gefunden, es ist jedoch ein Element erforderlich. Verwenden Sie Document.getDocumentElement(), und legen Sie dieses Objekt stattdessen fest.
-
-UNKNOWN_CLASS = Weder {0} noch eine der zugeh\u00F6rigen Superklassen ist diesem Kontext bekannt.
-
-FAILED_TO_GENERATE_SCHEMA = Generieren von Schema nicht erfolgreich.
-
-ERROR_PROCESSING_SCHEMA = Fehler bei der Schemaverarbeitung.
-
-ILLEGAL_CONTENT = Ung\u00FCltiger XML-Content in <{0}>: "{1}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_es.properties
deleted file mode 100644
index 07b869b9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_es.properties
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. Not concatenated with any other string.
-NOT_MARSHALLABLE = No es posible utilizar el m\u00E9todo marshal() con el par\u00E1metro de objeto.
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_RESULT = Par\u00E1metro javax.xml.parser.transform.Result no soportado.
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_ENCODING = Codificaci\u00F3n no soportada: {0}.
-
-ILLEGAL_PARAMETER = Par\u00E1metro "{0}" no v\u00E1lido: {1}
-
-# {0} - class name, {2} - method name
-UNABLE_TO_FIND_CONVERSION_METHOD = {0} no tiene un m\u00E9todo {1} {2}();
-
-MISSING_ID = El objeto "{0}" se encuentra en una propiedad IDREF, pero este objeto no tiene un identificador.
-
-NOT_IMPLEMENTED_IN_2_0 = Esta funci\u00F3n no est\u00E1 disponible en la implantaci\u00F3n de referencia de JAXB 2.0.
-
-UNRECOGNIZED_ELEMENT_NAME = El nombre de la etiqueta "{0}" no es conocido en este contexto de JAXB.
-
-TYPE_MISMATCH = La propiedad "{1}" de un objeto "{0}" contiene un objeto del tipo "{2}", pero esto no est\u00E1 permitido. Consulte la documentaci\u00F3n javadoc de esta propiedad para saber qu\u00E9 permite.
-
-MISSING_OBJECT = falta un objeto en un campo necesario"{0}"
-
-NOT_IDENTIFIABLE = Se hace referencia a un objeto como IDREF, pero su campo de identificador es nulo
-
-DANGLING_IDREF = Un \u00E1rbol contiene una referencia al identificador "{0}", pero no forma parte del gr\u00E1fico del objeto
-
-# Wrapped into a IOException. Not concatenated with any other string.
-NULL_OUTPUT_RESOLVER = La resoluci\u00F3n de salida del esquema no debe ser nula.
-
-UNABLE_TO_MARSHAL_NON_ELEMENT = no se ha podido canalizar el tipo "{0}" como un elemento, porque le falta una anotaci\u00F3n @XmlRootElement
-
-UNABLE_TO_MARSHAL_UNBOUND_CLASS = no se ha podido canalizar el tipo "{0}" como un elemento, porque no se conoce en este contexto.
-
-UNSUPPORTED_PROPERTY = "{0}" no es una propiedad soportada
-
-NULL_PROPERTY_NAME = el par\u00E1metro del nombre de propiedad no puede ser nulo
-
-MUST_BE_X = la propiedad "{0}" debe ser una instancia del tipo {1}, no {2}
-
-# {0}, {1}, {2} - class name. e.g.: Instance of "com.test.implementation.Implementation" is substituting "com.test.abstractbase.AbstractType", but "com.test.implementation.Implementation" is bound to an anonymous type.
-SUBSTITUTED_BY_ANONYMOUS_TYPE = La instancia de "{1}" sustituye a "{0}", pero "{2}" est\u00E1 enlazado a un tipo an\u00F3nimo.
-
-CYCLE_IN_MARSHALLER = Se ha detectado un ciclo en el gr\u00E1fico de objeto. Esto provocar\u00E1 un XML con profundidad infinita: {0}
-
-# {0} - class name
-UNABLE_TO_DISCOVER_EVENTHANDLER = No se han podido mostrar los m\u00E9todos de "{0}". Si hay un elemento CallbackHandler de eventos en esta clase, se ignorar\u00E1.
-
-ELEMENT_NEEDED_BUT_FOUND_DOCUMENT = Se ha encontrado un documento DOM "{0}", pero se necesita un elemento. Utilice Document.getDocumentElement() y defina ese objeto en su lugar.
-
-UNKNOWN_CLASS = {0} ni ninguna de sus superclases se conocen en este contexto.
-
-FAILED_TO_GENERATE_SCHEMA = Fallo al generar el esquema.
-
-ERROR_PROCESSING_SCHEMA = Error durante el procesamiento del esquema.
-
-ILLEGAL_CONTENT = Contenido XML no v\u00E1lido en <{0}>: "{1}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_fr.properties
deleted file mode 100644
index 3511a0c8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_fr.properties
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. Not concatenated with any other string.
-NOT_MARSHALLABLE = Il n'est pas possible d'utiliser la m\u00E9thode marshal() avec le param\u00E8tre d'objet
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_RESULT = param\u00E8tre javax.xml.parser.transform.Result non pris en charge
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_ENCODING = encodage non pris en charge : {0}
-
-ILLEGAL_PARAMETER = Param\u00E8tre "{0}" interdit : {1}
-
-# {0} - class name, {2} - method name
-UNABLE_TO_FIND_CONVERSION_METHOD = {0} ne comporte aucune m\u00E9thode {1} {2}() ;
-
-MISSING_ID = L"objet "{0}" a \u00E9t\u00E9 d\u00E9tect\u00E9 dans une propri\u00E9t\u00E9 IDREF, mais cet objet ne comporte aucun ID.
-
-NOT_IMPLEMENTED_IN_2_0 = Cette fonctionnalit\u00E9 n'est pas disponible dans JAXB RI 2.0
-
-UNRECOGNIZED_ELEMENT_NAME = Le nom de balise "{0}" est inconnu pour ce contexte JAXBContext.
-
-TYPE_MISMATCH = La propri\u00E9t\u00E9 "{1}" d''un objet "{0}" contient un objet de type "{2}" mais cela n''est pas autoris\u00E9. Pour savoir ce que cette propri\u00E9t\u00E9 peut accepter, consultez Javadoc.
-
-MISSING_OBJECT = un objet est manquant dans un champ obligatoire "{0}"
-
-NOT_IDENTIFIABLE = Un objet est r\u00E9f\u00E9renc\u00E9 en tant qu'IDREF mais son champ d'ID est NULL
-
-DANGLING_IDREF = Une arborescence contient une r\u00E9f\u00E9rence \u00E0 l''ID "{0}" mais elle ne fait pas partie du graphique d''objet
-
-# Wrapped into a IOException. Not concatenated with any other string.
-NULL_OUTPUT_RESOLVER = le r\u00E9solveur de sortie de sch\u00E9ma ne doit pas \u00EAtre NULL
-
-UNABLE_TO_MARSHAL_NON_ELEMENT = impossible de s\u00E9rialiser le type "{0}" en tant qu''\u00E9l\u00E9ment car il lui manque une annotation @XmlRootElement
-
-UNABLE_TO_MARSHAL_UNBOUND_CLASS = impossible de s\u00E9rialiser le type "{0}" en tant qu''\u00E9l\u00E9ment car il est inconnu dans ce contexte.
-
-UNSUPPORTED_PROPERTY = "{0}" n''est pas une propri\u00E9t\u00E9 prise en charge
-
-NULL_PROPERTY_NAME = le param\u00E8tre de nom de propri\u00E9t\u00E9 ne peut pas \u00EAtre NULL
-
-MUST_BE_X = la propri\u00E9t\u00E9 "{0}" doit \u00EAtre une instance de type {1}, non pas {2}
-
-# {0}, {1}, {2} - class name. e.g.: Instance of "com.test.implementation.Implementation" is substituting "com.test.abstractbase.AbstractType", but "com.test.implementation.Implementation" is bound to an anonymous type.
-SUBSTITUTED_BY_ANONYMOUS_TYPE = L''instance de "{1}" remplace "{0}", mais "{2}" est li\u00E9 \u00E0 un type anonyme.
-
-CYCLE_IN_MARSHALLER = Un cycle est d\u00E9tect\u00E9 dans le graphique d''objet. Cela g\u00E9n\u00E9rera un fichier XML d''une profondeur infinie : {0}
-
-# {0} - class name
-UNABLE_TO_DISCOVER_EVENTHANDLER = Impossible de lister les m\u00E9thodes de "{0}". S''il existe un gestionnaire de callback d''\u00E9v\u00E9nement sur cette classe, il ne sera pas pris en compte.
-
-ELEMENT_NEEDED_BUT_FOUND_DOCUMENT = Un document DOM "{0}" a \u00E9t\u00E9 d\u00E9tect\u00E9 mais un \u00E9l\u00E9ment est n\u00E9cessaire. Utilisez Document.getDocumentElement() et d\u00E9finissez cet objet \u00E0 la place.
-
-UNKNOWN_CLASS = {0} ni aucune de ses superclasses n''est connue dans ce contexte.
-
-FAILED_TO_GENERATE_SCHEMA = Echec de la g\u00E9n\u00E9ration du sch\u00E9ma.
-
-ERROR_PROCESSING_SCHEMA = Erreur lors du traitement du sch\u00E9ma.
-
-ILLEGAL_CONTENT = Contenu XML interdit dans <{0}> : "{1}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_it.properties
deleted file mode 100644
index cda3510e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_it.properties
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. Not concatenated with any other string.
-NOT_MARSHALLABLE = impossibile eseguire il marshalling del parametro dell'oggetto di cui eseguire il marshalling ()
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_RESULT = parametro javax.xml.parser.transform.Result non supportato
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_ENCODING = codifica non supportata: {0}
-
-ILLEGAL_PARAMETER = Parametro "{0}" non valido: {1}
-
-# {0} - class name, {2} - method name
-UNABLE_TO_FIND_CONVERSION_METHOD = {0} non ha un metodo {1} {2}();
-
-MISSING_ID = Oggetto "{0}" trovato in una propriet\u00E0 IDREF ma questo oggetto non ha un ID.
-
-NOT_IMPLEMENTED_IN_2_0 = Questa funzione non \u00E8 disponibile in JAXB RI 2.0
-
-UNRECOGNIZED_ELEMENT_NAME = Nome della tag "{0}" sconosciuto a questo JAXBContext.
-
-TYPE_MISMATCH = La propriet\u00E0 "{1}" di un oggetto "{0}" contiene un oggetto di tipo "{2}" non consentito. Vedere il javadoc di questa propriet\u00E0 per quello che pu\u00F2 essere accettato dalla propriet\u00E0.
-
-MISSING_OBJECT = oggetto mancante in un campo obbligatorio ''{0}''
-
-NOT_IDENTIFIABLE = Viene fatto riferimento a un oggetto come IDREF ma il relativo campo ID \u00E8 nullo
-
-DANGLING_IDREF = Una struttura contiene un riferimento all''ID "{0}" ma non fa parte del grafico dell''oggetto
-
-# Wrapped into a IOException. Not concatenated with any other string.
-NULL_OUTPUT_RESOLVER = il resolver di output dello schema non deve essere nullo
-
-UNABLE_TO_MARSHAL_NON_ELEMENT = impossibile eseguire il marshalling del tipo "{0}" come elemento poich\u00E9 manca un''annotazione @XmlRootElement
-
-UNABLE_TO_MARSHAL_UNBOUND_CLASS = impossibile eseguire il marshalling del tipo "{0}" come elemento poich\u00E9 \u00E8 sconosciuto a questo contesto.
-
-UNSUPPORTED_PROPERTY = "{0}" non \u00E8 una propriet\u00E0 supportata
-
-NULL_PROPERTY_NAME = il parametro del nome della propriet\u00E0 non pu\u00F2 essere nullo
-
-MUST_BE_X = la propriet\u00E0 "{0}" deve essere un''istanza di tipo {1}, non {2}
-
-# {0}, {1}, {2} - class name. e.g.: Instance of "com.test.implementation.Implementation" is substituting "com.test.abstractbase.AbstractType", but "com.test.implementation.Implementation" is bound to an anonymous type.
-SUBSTITUTED_BY_ANONYMOUS_TYPE = L''istanza di "{1}" sta sostituendo "{0}" ma "{2}" \u00E8 associato a un tipo anonimo.
-
-CYCLE_IN_MARSHALLER = \u00C8 stato rilevato un ciclo nel grafico dell''oggetto. Questo provocher\u00E0 un XML con profondit\u00E0 infinita: {0}
-
-# {0} - class name
-UNABLE_TO_DISCOVER_EVENTHANDLER = Impossibile elencare i metodi di "{0}". Gli handler di callback degli eventi presenti su questa classe verranno ignorati.
-
-ELEMENT_NEEDED_BUT_FOUND_DOCUMENT = \u00C8 stato trovato un documento DOM "{0}" ma \u00E8 richiesto un elemento. Usare Document.getDocumentElement() e impostare invece tale oggetto.
-
-UNKNOWN_CLASS = {0} e le relative classi superiori sono sconosciute a questo contesto.
-
-FAILED_TO_GENERATE_SCHEMA = Generazione dello schema non riuscita.
-
-ERROR_PROCESSING_SCHEMA = Errore durante l'elaborazione dello schema.
-
-ILLEGAL_CONTENT = Contenuto XML non valido in <{0}>: "{1}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_ja.properties
deleted file mode 100644
index d6358a03..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_ja.properties
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. Not concatenated with any other string.
-NOT_MARSHALLABLE = marshal()\u306Eobject\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u53EF\u80FD\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_RESULT = \u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044javax.xml.parser.transform.Result\u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u3059
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_ENCODING = \u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0: {0}
-
-ILLEGAL_PARAMETER = "{0}"\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u4E0D\u6B63\u3067\u3059: {1}
-
-# {0} - class name, {2} - method name
-UNABLE_TO_FIND_CONVERSION_METHOD = {0}\u306B\u30E1\u30BD\u30C3\u30C9{1} {2}()\u304C\u3042\u308A\u307E\u305B\u3093;
-
-MISSING_ID = \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8"{0}"\u304CIDREF\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u304C\u3001\u3053\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u306FID\u304C\u3042\u308A\u307E\u305B\u3093\u3002
-
-NOT_IMPLEMENTED_IN_2_0 = \u3053\u306E\u6A5F\u80FD\u306FJAXB RI 2.0\u3067\u306F\u4F7F\u7528\u4E0D\u53EF\u3067\u3059
-
-UNRECOGNIZED_ELEMENT_NAME = \u30BF\u30B0\u540D"{0}"\u306F\u3053\u306EJAXBContext\u3067\u306F\u8A8D\u8B58\u3055\u308C\u307E\u305B\u3093\u3002
-
-TYPE_MISMATCH = "{0}"\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E"{1}"\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u306F"{2}"\u30BF\u30A4\u30D7\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u3053\u308C\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002\u3053\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u53D7\u5165\u53EF\u80FD\u306A\u30BF\u30A4\u30D7\u306B\u3064\u3044\u3066\u306F\u3001\u3053\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u306Ejavadoc\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-MISSING_OBJECT = \u5FC5\u9808\u30D5\u30A3\u30FC\u30EB\u30C9"{0}"\u306B\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u3042\u308A\u307E\u305B\u3093
-
-NOT_IDENTIFIABLE = \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306FIDREF\u3068\u3057\u3066\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001ID\u30D5\u30A3\u30FC\u30EB\u30C9\u304Cnull\u3067\u3059
-
-DANGLING_IDREF = \u30C4\u30EA\u30FC\u306BID "{0}"\u3078\u306E\u53C2\u7167\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u30FB\u30B0\u30E9\u30D5\u306E\u4E00\u90E8\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-
-# Wrapped into a IOException. Not concatenated with any other string.
-NULL_OUTPUT_RESOLVER = \u30B9\u30AD\u30FC\u30DE\u51FA\u529B\u30EA\u30BE\u30EB\u30D0\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093
-
-UNABLE_TO_MARSHAL_NON_ELEMENT = @XmlRootElement\u6CE8\u91C8\u304C\u306A\u3044\u305F\u3081\u3001\u30BF\u30A4\u30D7"{0}"\u3092\u8981\u7D20\u3068\u3057\u3066\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u3067\u304D\u307E\u305B\u3093
-
-UNABLE_TO_MARSHAL_UNBOUND_CLASS = \u3053\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3067\u8A8D\u8B58\u3055\u308C\u306A\u3044\u305F\u3081\u3001\u30BF\u30A4\u30D7"{0}"\u3092\u8981\u7D20\u3068\u3057\u3066\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u3067\u304D\u307E\u305B\u3093\u3002
-
-UNSUPPORTED_PROPERTY = "{0}"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-
-NULL_PROPERTY_NAME = \u30D7\u30ED\u30D1\u30C6\u30A3\u306Ename\u30D1\u30E9\u30E1\u30FC\u30BF\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093
-
-MUST_BE_X = \u30D7\u30ED\u30D1\u30C6\u30A3"{0}"\u306F\u3001{2}\u3067\u306F\u306A\u304F\u30BF\u30A4\u30D7{1}\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-# {0}, {1}, {2} - class name. e.g.: Instance of "com.test.implementation.Implementation" is substituting "com.test.abstractbase.AbstractType", but "com.test.implementation.Implementation" is bound to an anonymous type.
-SUBSTITUTED_BY_ANONYMOUS_TYPE = "{1}"\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u306F"{0}"\u3092\u4EE3\u7528\u3057\u3066\u3044\u307E\u3059\u304C\u3001"{2}"\u306F\u533F\u540D\u30BF\u30A4\u30D7\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u3059\u3002
-
-CYCLE_IN_MARSHALLER = \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u30FB\u30B0\u30E9\u30D5\u3067\u5FAA\u74B0\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F\u3002\u3053\u308C\u306B\u3088\u308AXML\u304C\u7121\u9650\u306B\u6DF1\u304F\u306A\u308A\u307E\u3059: {0}
-
-# {0} - class name
-UNABLE_TO_DISCOVER_EVENTHANDLER = "{0}"\u306E\u30E1\u30BD\u30C3\u30C9\u3092\u30EA\u30B9\u30C8\u3067\u304D\u307E\u305B\u3093\u3002\u3053\u306E\u30AF\u30E9\u30B9\u306B\u30A4\u30D9\u30F3\u30C8\u30FB\u30B3\u30FC\u30EB\u30D0\u30C3\u30AF\u30FB\u30CF\u30F3\u30C9\u30E9\u304C\u3042\u308B\u5834\u5408\u306F\u7121\u8996\u3055\u308C\u307E\u3059\u3002
-
-ELEMENT_NEEDED_BUT_FOUND_DOCUMENT = DOM\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8"{0}"\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u304C\u3001\u8981\u7D20\u304C\u5FC5\u8981\u3067\u3059\u3002Document.getDocumentElement()\u3092\u4F7F\u7528\u3057\u3066\u3001\u304B\u308F\u308A\u306B\u305D\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-UNKNOWN_CLASS = {0}\u304A\u3088\u3073\u305D\u306E\u30B9\u30FC\u30D1\u30FC\u30FB\u30AF\u30E9\u30B9\u306F\u3053\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3067\u306F\u8A8D\u8B58\u3055\u308C\u307E\u305B\u3093\u3002
-
-FAILED_TO_GENERATE_SCHEMA = \u30B9\u30AD\u30FC\u30DE\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-
-ERROR_PROCESSING_SCHEMA = \u30B9\u30AD\u30FC\u30DE\u306E\u51E6\u7406\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
-
-ILLEGAL_CONTENT = <{0}>\u306EXML\u30B3\u30F3\u30C6\u30F3\u30C4\u304C\u4E0D\u6B63\u3067\u3059: "{1}"\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_ko.properties
deleted file mode 100644
index 0a7361f7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_ko.properties
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. Not concatenated with any other string.
-NOT_MARSHALLABLE = \uAC1D\uCCB4 \uB9E4\uAC1C\uBCC0\uC218\uC5D0 \uB300\uD574\uC11C\uB294 marshal() \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_RESULT = \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 javax.xml.parser.transform.Result \uB9E4\uAC1C\uBCC0\uC218
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_ENCODING = \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC778\uCF54\uB529: {0}
-
-ILLEGAL_PARAMETER = \uC798\uBABB\uB41C "{0}" \uB9E4\uAC1C\uBCC0\uC218: {1}
-
-# {0} - class name, {2} - method name
-UNABLE_TO_FIND_CONVERSION_METHOD = {0}\uC5D0 {1} {2}(); \uBA54\uC18C\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-MISSING_ID = "{0}" \uAC1D\uCCB4\uAC00 IDREF \uC18D\uC131\uC5D0\uC11C \uBC1C\uACAC\uB418\uC5C8\uC9C0\uB9CC \uC774 \uAC1D\uCCB4\uC5D0 ID\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-NOT_IMPLEMENTED_IN_2_0 = \uC774 \uAE30\uB2A5\uC740 JAXB RI 2.0\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-UNRECOGNIZED_ELEMENT_NAME = \uC774 JAXBContext\uC5D0\uC11C \uD0DC\uADF8 \uC774\uB984 "{0}"\uC744(\uB97C) \uC778\uC2DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-TYPE_MISMATCH = "{0}" \uAC1D\uCCB4\uC758 "{1}" \uC18D\uC131\uC5D0 "{2}" \uC720\uD615\uC758 \uAC1D\uCCB4\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0\uB9CC \uC774 \uC720\uD615\uC740 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC774 \uC18D\uC131\uC5D0 \uC0AC\uC6A9\uD560 \uC218 \uC788\uB294 \uC720\uD615\uC740 \uC774 \uC18D\uC131\uC758 javadoc\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.
-
-MISSING_OBJECT = \uD544\uC218 \uD544\uB4DC "{0}"\uC5D0 \uAC1D\uCCB4\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-NOT_IDENTIFIABLE = \uAC1D\uCCB4\uAC00 IDREF\uB85C \uCC38\uC870\uB418\uC5C8\uC9C0\uB9CC \uD574\uB2F9 ID \uD544\uB4DC\uAC00 \uB110\uC785\uB2C8\uB2E4.
-
-DANGLING_IDREF = \uD2B8\uB9AC\uAC00 ID "{0}"\uC5D0 \uB300\uD55C \uCC38\uC870\uB97C \uD3EC\uD568\uD558\uACE0 \uC788\uC9C0\uB9CC \uAC1D\uCCB4 \uADF8\uB798\uD504\uC5D0 \uC18D\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-# Wrapped into a IOException. Not concatenated with any other string.
-NULL_OUTPUT_RESOLVER = \uC2A4\uD0A4\uB9C8 \uCD9C\uB825 \uBD84\uC11D\uAE30\uB294 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-UNABLE_TO_MARSHAL_NON_ELEMENT = @XmlRootElement \uC8FC\uC11D\uC774 \uB204\uB77D\uB418\uC5B4 "{0}" \uC720\uD615\uC744 \uC694\uC18C\uB85C \uB9C8\uC15C\uB9C1\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-UNABLE_TO_MARSHAL_UNBOUND_CLASS = "{0}" \uC720\uD615\uC740 \uC774 \uCEE8\uD14D\uC2A4\uD2B8\uC5D0\uC11C \uC778\uC2DD\uD560 \uC218 \uC5C6\uC73C\uBBC0\uB85C \uC694\uC18C\uB85C \uB9C8\uC15C\uB9C1\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-UNSUPPORTED_PROPERTY = "{0}"\uC740(\uB294) \uC9C0\uC6D0\uB418\uB294 \uC18D\uC131\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-
-NULL_PROPERTY_NAME = \uC18D\uC131 \uC774\uB984 \uB9E4\uAC1C\uBCC0\uC218\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-MUST_BE_X = "{0}" \uC18D\uC131\uC740 {2}\uC774(\uAC00) \uC544\uB2CC {1} \uC720\uD615\uC758 \uC778\uC2A4\uD134\uC2A4\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-
-# {0}, {1}, {2} - class name. e.g.: Instance of "com.test.implementation.Implementation" is substituting "com.test.abstractbase.AbstractType", but "com.test.implementation.Implementation" is bound to an anonymous type.
-SUBSTITUTED_BY_ANONYMOUS_TYPE = "{1}"\uC758 \uC778\uC2A4\uD134\uC2A4\uAC00 "{0}"\uC744(\uB97C) \uB300\uCCB4\uD558\uACE0 \uC788\uC9C0\uB9CC "{2}"\uC774(\uAC00) \uC775\uBA85 \uC720\uD615\uC5D0 \uBC14\uC778\uB4DC\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
-
-CYCLE_IN_MARSHALLER = \uAC1D\uCCB4 \uADF8\uB798\uD504\uC5D0\uC11C \uC21C\uD658\uC774 \uAC10\uC9C0\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC774\uB85C \uC778\uD574 XML\uC774 \uBB34\uD55C\uB300\uB85C \uAE4A\uC5B4\uC9D0: {0}
-
-# {0} - class name
-UNABLE_TO_DISCOVER_EVENTHANDLER = "{0}"\uC758 \uBA54\uC18C\uB4DC\uB97C \uB098\uC5F4\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774 \uD074\uB798\uC2A4\uC5D0 \uC774\uBCA4\uD2B8 \uCF5C\uBC31 \uCC98\uB9AC\uAE30\uAC00 \uC788\uC744 \uACBD\uC6B0 \uBB34\uC2DC\uB429\uB2C8\uB2E4.
-
-ELEMENT_NEEDED_BUT_FOUND_DOCUMENT = DOM \uBB38\uC11C "{0}"\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC9C0\uB9CC \uC694\uC18C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. Document.getDocumentElement()\uB97C \uC0AC\uC6A9\uD558\uACE0 \uD574\uB2F9 \uAC1D\uCCB4\uB97C \uC124\uC815\uD558\uC2ED\uC2DC\uC624.
-
-UNKNOWN_CLASS = \uC774 \uCEE8\uD14D\uC2A4\uD2B8\uC5D0\uC11C {0}\uACFC(\uC640) \uD574\uB2F9 \uC218\uD37C \uD074\uB798\uC2A4\uB97C \uC778\uC2DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-FAILED_TO_GENERATE_SCHEMA = \uC2A4\uD0A4\uB9C8 \uC0DD\uC131\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-
-ERROR_PROCESSING_SCHEMA = \uC2A4\uD0A4\uB9C8 \uCC98\uB9AC \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-
-ILLEGAL_CONTENT = <{0}>\uC5D0 \uC798\uBABB\uB41C XML \uCF58\uD150\uCE20\uAC00 \uC788\uC74C: "{1}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_pt_BR.properties
deleted file mode 100644
index 4885f3c4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_pt_BR.properties
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. Not concatenated with any other string.
-NOT_MARSHALLABLE = o par\u00E2metro do objeto para fazer marshal() n\u00E3o pode ser submetido a marshal
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_RESULT = par\u00E2metro javax.xml.parser.transform.Result n\u00E3o suportado
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_ENCODING = codifica\u00E7\u00E3o n\u00E3o suportada: {0}
-
-ILLEGAL_PARAMETER = par\u00E2metro "{0}" inv\u00E1lido: {1}
-
-# {0} - class name, {2} - method name
-UNABLE_TO_FIND_CONVERSION_METHOD = {0} n\u00E3o tem um m\u00E9todo {1} {2}();
-
-MISSING_ID = O objeto "{0}" foi encontrado em uma propriedade IDREF, mas este objeto n\u00E3o tem um ID.
-
-NOT_IMPLEMENTED_IN_2_0 = Este recurso n\u00E3o est\u00E1 dispon\u00EDvel no JAXB RI 2.0
-
-UNRECOGNIZED_ELEMENT_NAME = O nome da tag "{0}" n\u00E3o \u00E9 conhecido para este JAXBContext.
-
-TYPE_MISMATCH = a propriedade "{1}" de um objeto "{0}" cont\u00E9m um objeto do tipo "{2}", mas esse tipo n\u00E3o \u00E9 permitido. Consulte javadoc desta propriedade para saber o que essa propriedade pode aceitar.
-
-MISSING_OBJECT = n\u00E3o foi encontrado um campo "{0}" obrigat\u00F3rio em um objeto
-
-NOT_IDENTIFIABLE = Um objeto \u00E9 mencionado como IDREF, mas seu campo ID \u00E9 nulo
-
-DANGLING_IDREF = Uma \u00E1rvore cont\u00E9m uma refer\u00EAncia ao ID "{0}", mas n\u00E3o faz parte do gr\u00E1fico do objeto
-
-# Wrapped into a IOException. Not concatenated with any other string.
-NULL_OUTPUT_RESOLVER = o resolvedor de sa\u00EDda do esquema n\u00E3o deve ser nulo
-
-UNABLE_TO_MARSHAL_NON_ELEMENT = n\u00E3o \u00E9 poss\u00EDvel fazer marshalling do tipo "{0}" como um elemento porque ele n\u00E3o foi encontrado em uma anota\u00E7\u00E3o @XmlRootElement
-
-UNABLE_TO_MARSHAL_UNBOUND_CLASS = n\u00E3o \u00E9 poss\u00EDvel fazer marshalling do tipo "{0}" como um elemento porque ele n\u00E3o foi encontrado para este contexto.
-
-UNSUPPORTED_PROPERTY = "{0}" n\u00E3o \u00E9 uma propriedade suportada
-
-NULL_PROPERTY_NAME = o par\u00E2metro de nome da propriedade n\u00E3o pode ser nulo
-
-MUST_BE_X = a propriedade "{0}" deve ser uma inst\u00E2ncia do tipo {1}, n\u00E3o {2}
-
-# {0}, {1}, {2} - class name. e.g.: Instance of "com.test.implementation.Implementation" is substituting "com.test.abstractbase.AbstractType", but "com.test.implementation.Implementation" is bound to an anonymous type.
-SUBSTITUTED_BY_ANONYMOUS_TYPE = A inst\u00E2ncia de "{1}" est\u00E1 substituindo "{0}", mas "{2}" est\u00E1 vinculado a um tipo an\u00F4nimo.
-
-CYCLE_IN_MARSHALLER = Foi detectado um ciclo no gr\u00E1fico do objeto. Isso causar\u00E1 XML profundo infinitamente: {0}
-
-# {0} - class name
-UNABLE_TO_DISCOVER_EVENTHANDLER = N\u00E3o \u00E9 poss\u00EDvel listar os m\u00E9todos de "{0}". Se houver qualquer handler de callback do evento nesta classe, ele ser\u00E1 ignorado.
-
-ELEMENT_NEEDED_BUT_FOUND_DOCUMENT = Um documento DOM "{0}" foi encontrado, mas \u00E9 necess\u00E1rio um elemento. Use Document.getDocumentElement() e defina esse objeto.
-
-UNKNOWN_CLASS = {0} e nenhuma de sua superclasse \u00E9 conhecida para este contexto.
-
-FAILED_TO_GENERATE_SCHEMA = Falha ao gerar o esquema.
-
-ERROR_PROCESSING_SCHEMA = Erro durante o processamento do esquema.
-
-ILLEGAL_CONTENT = Conte\u00FAdo XML inv\u00E1lido em <{0}>: "{1}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_zh_CN.properties
deleted file mode 100644
index f33c2546..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_zh_CN.properties
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. Not concatenated with any other string.
-NOT_MARSHALLABLE = \u65E0\u6CD5\u4F7F\u7528\u5E26\u6709\u5BF9\u8C61\u53C2\u6570\u7684 marshal()
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_RESULT = \u4E0D\u652F\u6301 javax.xml.parser.transform.Result \u53C2\u6570
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_ENCODING = \u4E0D\u652F\u6301\u7684\u7F16\u7801: {0}
-
-ILLEGAL_PARAMETER = \u975E\u6CD5 "{0}" \u53C2\u6570: {1}
-
-# {0} - class name, {2} - method name
-UNABLE_TO_FIND_CONVERSION_METHOD = {0}\u6CA1\u6709\u65B9\u6CD5{1} {2}();
-
-MISSING_ID = \u53D1\u73B0\u5BF9\u8C61 "{0}" \u4F4D\u4E8E IDREF \u5C5E\u6027\u4E2D, \u4F46\u6B64\u5BF9\u8C61\u6CA1\u6709 ID\u3002
-
-NOT_IMPLEMENTED_IN_2_0 = \u6B64\u529F\u80FD\u5728 JAXB RI 2.0 \u4E2D\u4E0D\u53EF\u7528
-
-UNRECOGNIZED_ELEMENT_NAME = \u6807\u8BB0\u540D\u79F0 "{0}" \u5BF9\u6B64 JAXBContext \u662F\u672A\u77E5\u7684\u3002
-
-TYPE_MISMATCH = "{0}" \u5BF9\u8C61\u7684 "{1}" \u5C5E\u6027\u5305\u542B "{2}" \u7C7B\u578B\u7684\u5BF9\u8C61, \u4F46\u8FD9\u662F\u4E0D\u5141\u8BB8\u7684\u3002\u6709\u5173\u6B64\u5C5E\u6027\u53EF\u63A5\u53D7\u7684\u7C7B\u578B, \u8BF7\u53C2\u9605\u6B64\u5C5E\u6027\u7684 javadoc\u3002
-
-MISSING_OBJECT = \u5FC5\u586B\u5B57\u6BB5 "{0}" \u7F3A\u5C11\u5BF9\u8C61
-
-NOT_IDENTIFIABLE = \u5BF9\u8C61\u5C06\u4F5C\u4E3A IDREF \u5F15\u7528, \u4F46\u5176 ID \u5B57\u6BB5\u4E3A\u7A7A\u503C
-
-DANGLING_IDREF = \u6811\u5305\u542B\u5BF9 ID "{0}" \u7684\u5F15\u7528, \u4F46\u4E0D\u662F\u5BF9\u8C61\u56FE\u7684\u4E00\u90E8\u5206
-
-# Wrapped into a IOException. Not concatenated with any other string.
-NULL_OUTPUT_RESOLVER = \u6A21\u5F0F\u8F93\u51FA\u89E3\u6790\u5668\u4E0D\u80FD\u4E3A\u7A7A\u503C
-
-UNABLE_TO_MARSHAL_NON_ELEMENT = \u7531\u4E8E\u7C7B\u578B "{0}" \u7F3A\u5C11 @XmlRootElement \u6CE8\u91CA, \u65E0\u6CD5\u5C06\u8BE5\u7C7B\u578B\u7F16\u96C6\u4E3A\u5143\u7D20
-
-UNABLE_TO_MARSHAL_UNBOUND_CLASS = \u7531\u4E8E\u7C7B\u578B "{0}" \u5BF9\u6B64\u4E0A\u4E0B\u6587\u662F\u672A\u77E5\u7684, \u65E0\u6CD5\u5C06\u8BE5\u7C7B\u578B\u7F16\u96C6\u4E3A\u5143\u7D20\u3002
-
-UNSUPPORTED_PROPERTY = "{0}" \u4E0D\u662F\u652F\u6301\u7684\u5C5E\u6027
-
-NULL_PROPERTY_NAME = \u5C5E\u6027\u540D\u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A\u503C
-
-MUST_BE_X = \u5C5E\u6027 "{0}" \u5FC5\u987B\u4E3A{1}\u7C7B\u578B\u7684\u5B9E\u4F8B, \u800C\u4E0D\u662F{2}\u7C7B\u578B\u7684\u5B9E\u4F8B
-
-# {0}, {1}, {2} - class name. e.g.: Instance of "com.test.implementation.Implementation" is substituting "com.test.abstractbase.AbstractType", but "com.test.implementation.Implementation" is bound to an anonymous type.
-SUBSTITUTED_BY_ANONYMOUS_TYPE = "{1}" \u7684\u5B9E\u4F8B\u66FF\u4EE3\u4E86 "{0}", \u4F46 "{2}" \u7ED1\u5B9A\u5230\u533F\u540D\u7C7B\u578B\u3002
-
-CYCLE_IN_MARSHALLER = \u5728\u5BF9\u8C61\u56FE\u4E2D\u68C0\u6D4B\u5230\u5FAA\u73AF\u3002\u8FD9\u5C06\u4EA7\u751F\u65E0\u9650\u6DF1\u7684 XML: {0}
-
-# {0} - class name
-UNABLE_TO_DISCOVER_EVENTHANDLER = \u65E0\u6CD5\u5217\u51FA "{0}" \u7684\u65B9\u6CD5\u3002\u5982\u679C\u6B64\u7C7B\u4E0A\u5B58\u5728\u4EFB\u610F\u4E8B\u4EF6\u56DE\u8C03\u5904\u7406\u7A0B\u5E8F, \u5219\u5C06\u5FFD\u7565\u8BE5\u5904\u7406\u7A0B\u5E8F\u3002
-
-ELEMENT_NEEDED_BUT_FOUND_DOCUMENT = \u627E\u5230 DOM \u6587\u6863 "{0}", \u4F46\u9700\u8981\u4E00\u4E2A\u5143\u7D20\u3002\u8BF7\u6539\u7528 Document.getDocumentElement() \u5E76\u8BBE\u7F6E\u8BE5\u5BF9\u8C61\u3002
-
-UNKNOWN_CLASS = {0}\u4EE5\u53CA\u5176\u4EFB\u4F55\u8D85\u7C7B\u5BF9\u6B64\u4E0A\u4E0B\u6587\u90FD\u662F\u672A\u77E5\u7684\u3002
-
-FAILED_TO_GENERATE_SCHEMA = \u65E0\u6CD5\u751F\u6210\u6A21\u5F0F\u3002
-
-ERROR_PROCESSING_SCHEMA = \u6A21\u5F0F\u5904\u7406\u671F\u95F4\u51FA\u9519\u3002
-
-ILLEGAL_CONTENT = <{0}> \u4E2D\u7684\u975E\u6CD5 XML \u5185\u5BB9: "{1}"\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_zh_TW.properties
deleted file mode 100644
index b1e23c97..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_zh_TW.properties
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. Not concatenated with any other string.
-NOT_MARSHALLABLE = marshal() \u7684\u7269\u4EF6\u53C3\u6578\u7121\u6CD5\u5C01\u9001\u8655\u7406
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_RESULT = \u4E0D\u652F\u63F4\u7684 javax.xml.parser.transform.Result \u53C3\u6578
-
-# Not concatenated with any other string (written on a separate line).
-UNSUPPORTED_ENCODING = \u4E0D\u652F\u63F4\u7684\u7DE8\u78BC: {0}
-
-ILLEGAL_PARAMETER = \u7121\u6548\u7684 "{0}" \u53C3\u6578: {1}
-
-# {0} - class name, {2} - method name
-UNABLE_TO_FIND_CONVERSION_METHOD = {0} \u672A\u5305\u542B\u65B9\u6CD5 {1} {2}();
-
-MISSING_ID = \u5728 IDREF \u7279\u6027\u4E2D\u627E\u5230\u7269\u4EF6 "{0}", \u4F46\u6B64\u7269\u4EF6\u6C92\u6709 ID.
-
-NOT_IMPLEMENTED_IN_2_0 = JAXB RI 2.0 \u4E2D\u672A\u63D0\u4F9B\u6B64\u529F\u80FD
-
-UNRECOGNIZED_ELEMENT_NAME = JAXBContext \u4E0D\u8A8D\u5F97\u6A19\u8A18\u540D\u7A31 "{0}".
-
-TYPE_MISMATCH = \u7269\u4EF6 "{0}" \u7684\u7279\u6027 "{1}" \u5305\u542B\u985E\u578B "{2}" \u7684\u7269\u4EF6, \u4F46\u9019\u662F\u4E0D\u5141\u8A31\u7684. \u8ACB\u53C3\u95B1\u6B64\u7279\u6027\u7684 javadoc, \u77AD\u89E3\u6B64\u7279\u6027\u53EF\u63A5\u53D7\u7684\u7269\u4EF6\u985E\u578B.
-
-MISSING_OBJECT = \u5FC5\u8981\u7684\u6B04\u4F4D "{0}" \u7F3A\u5C11\u7269\u4EF6
-
-NOT_IDENTIFIABLE = \u7269\u4EF6\u88AB\u53C3\u7167\u70BA IDREF, \u4F46\u5176 ID \u6B04\u4F4D\u70BA\u7A7A\u503C
-
-DANGLING_IDREF = \u6A39\u72C0\u7D50\u69CB\u5305\u542B ID "{0}" \u7684\u53C3\u7167, \u4F46\u5B83\u4E0D\u662F\u7269\u4EF6\u5716\u8868\u7684\u4E00\u90E8\u5206
-
-# Wrapped into a IOException. Not concatenated with any other string.
-NULL_OUTPUT_RESOLVER = \u7DB1\u8981\u8F38\u51FA\u89E3\u6790\u5668\u4E0D\u5F97\u70BA\u7A7A\u503C
-
-UNABLE_TO_MARSHAL_NON_ELEMENT = \u7121\u6CD5\u5C07\u985E\u578B "{0}" \u5C01\u9001\u8655\u7406\u70BA\u5143\u7D20, \u56E0\u5176\u907A\u6F0F @XmlRootElement \u8A3B\u89E3
-
-UNABLE_TO_MARSHAL_UNBOUND_CLASS = \u7121\u6CD5\u5C07\u985E\u578B "{0}" \u5C01\u9001\u8655\u7406\u70BA\u5143\u7D20, \u6B64\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u4E0D\u8A8D\u5F97\u5B83.
-
-UNSUPPORTED_PROPERTY = "{0}" \u4E0D\u662F\u652F\u63F4\u7684\u7279\u6027
-
-NULL_PROPERTY_NAME = \u7279\u6027\u540D\u7A31\u53C3\u6578\u4E0D\u53EF\u70BA\u7A7A\u503C
-
-MUST_BE_X = \u7279\u6027 "{0}" \u5FC5\u9808\u662F\u985E\u578B {1} (\u800C\u975E {2}) \u7684\u57F7\u884C\u8655\u7406
-
-# {0}, {1}, {2} - class name. e.g.: Instance of "com.test.implementation.Implementation" is substituting "com.test.abstractbase.AbstractType", but "com.test.implementation.Implementation" is bound to an anonymous type.
-SUBSTITUTED_BY_ANONYMOUS_TYPE = "{1}" \u7684\u57F7\u884C\u8655\u7406\u5C07\u66FF\u4EE3 "{0}", \u4F46 "{2}" \u5DF2\u9023\u7D50\u81F3\u533F\u540D\u985E\u578B.
-
-CYCLE_IN_MARSHALLER = \u5728\u7269\u4EF6\u5716\u8868\u4E2D\u5075\u6E2C\u5230\u5FAA\u74B0. \u9019\u5C07\u5C0E\u81F4\u7121\u9650\u6DF1\u7684 XML: {0}
-
-# {0} - class name
-UNABLE_TO_DISCOVER_EVENTHANDLER = \u7121\u6CD5\u5217\u793A "{0}" \u7684\u65B9\u6CD5. \u82E5\u6B64\u985E\u5225\u4E2D\u6709\u4EFB\u4F55\u4E8B\u4EF6\u56DE\u547C\u8655\u7406\u7A0B\u5F0F, \u5C07\u6703\u88AB\u5FFD\u7565.
-
-ELEMENT_NEEDED_BUT_FOUND_DOCUMENT = \u767C\u73FE DOM \u6587\u4EF6 "{0}", \u4F46\u9700\u8981\u7684\u662F\u5143\u7D20. \u8ACB\u6539\u7528 Document.getDocumentElement() \u4E26\u8A2D\u5B9A\u8A72\u7269\u4EF6.
-
-UNKNOWN_CLASS = {0} \u6216\u5176\u4EFB\u4F55\u8D85\u7D1A\u985E\u5225\u90FD\u77E5\u9053\u6B64\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883.
-
-FAILED_TO_GENERATE_SCHEMA = \u7121\u6CD5\u7522\u751F\u7DB1\u8981.
-
-ERROR_PROCESSING_SCHEMA = \u8655\u7406\u7DB1\u8981\u6642\u767C\u751F\u932F\u8AA4.
-
-ILLEGAL_CONTENT = <{0}> \u4E2D\u6709\u7121\u6548\u7684 XML \u5167\u5BB9: "{1}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/MimeTypedTransducer.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/MimeTypedTransducer.java
deleted file mode 100644
index 3a213bd0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/MimeTypedTransducer.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.awt.*;
-import java.io.IOException;
-
-import javax.activation.MimeType;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link Transducer} decorator that wraps another {@link Transducer}
- * and sets the expected MIME type to the context.
- *
- * <p>
- * Combined with {@link Transducer} implementations (such as one for {@link Image}),
- * this is used to control the marshalling of the BLOB types.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class MimeTypedTransducer<V> extends FilterTransducer<V> {
- private final MimeType expectedMimeType;
-
- public MimeTypedTransducer(Transducer<V> core,MimeType expectedMimeType) {
- super(core);
- this.expectedMimeType = expectedMimeType;
- }
-
- @Override
- public CharSequence print(V o) throws AccessorException {
- XMLSerializer w = XMLSerializer.getInstance();
- MimeType old = w.setExpectedMimeType(expectedMimeType);
- try {
- return core.print(o);
- } finally {
- w.setExpectedMimeType(old);
- }
- }
-
- @Override
- public void writeText(XMLSerializer w, V o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- MimeType old = w.setExpectedMimeType(expectedMimeType);
- try {
- core.writeText(w, o, fieldName);
- } finally {
- w.setExpectedMimeType(old);
- }
- }
-
- @Override
- public void writeLeafElement(XMLSerializer w, Name tagName, V o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- MimeType old = w.setExpectedMimeType(expectedMimeType);
- try {
- core.writeLeafElement(w, tagName, o, fieldName);
- } finally {
- w.setExpectedMimeType(old);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Name.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Name.java
deleted file mode 100644
index 5c433ae0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Name.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import javax.xml.namespace.QName;
-
-/**
- * The internal representation of an XML name.
- *
- * <p>
- * This class keeps indicies for URI and local name for enabling faster processing.
- *
- * <p>
- * {@link Name}s are ordered lexicographically (nsUri first, local name next.)
- * This is the same order required by canonical XML.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class Name implements Comparable<Name> {
- /**
- * Namespace URI. interned.
- */
- public final String nsUri;
-
- /**
- * Local name. interned.
- */
- public final String localName;
-
- /**
- * Index -1 is reserved for representing the empty namespace URI of attributes.
- */
- public final short nsUriIndex;
- public final short localNameIndex;
-
- /**
- * Index of the Name for an EII or AII
- */
- public final short qNameIndex;
-
- /**
- * Specifies if the Name is associated with an EII or AII
- */
- public final boolean isAttribute;
-
- Name(int qNameIndex, int nsUriIndex, String nsUri, int localIndex, String localName, boolean isAttribute) {
- this.qNameIndex = (short)qNameIndex;
- this.nsUri = nsUri;
- this.localName = localName;
- this.nsUriIndex = (short)nsUriIndex;
- this.localNameIndex = (short)localIndex;
- this.isAttribute = isAttribute;
- }
-
- public String toString() {
- return '{'+nsUri+'}'+localName;
- }
-
- /**
- * Creates a {@link QName} from this.
- */
- public QName toQName() {
- return new QName(nsUri,localName);
- }
-
- public boolean equals( String nsUri, String localName ) {
- return localName.equals(this.localName) && nsUri.equals(this.nsUri);
- }
-
- public int compareTo(Name that) {
- int r = this.nsUri.compareTo(that.nsUri);
- if(r!=0) return r;
- return this.localName.compareTo(that.localName);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/NameBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/NameBuilder.java
deleted file mode 100644
index 6fa373d9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/NameBuilder.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-
-/**
- * Creates {@link Name}s and assign index numbers to them.
- *
- * <p>
- * During this process, this class also finds out which namespace URIs
- * are statically known to be un-bindable as the default namespace.
- * Those are the namespace URIs that are used by attribute names.
- *
- * @author Kohsuke Kawaguchi
- */
-@SuppressWarnings({"StringEquality"})
-public final class NameBuilder {
- private Map<String,Integer> uriIndexMap = new HashMap<String, Integer>();
- private Set<String> nonDefaultableNsUris = new HashSet<String>();
- private Map<String,Integer> localNameIndexMap = new HashMap<String, Integer>();
- private QNameMap<Integer> elementQNameIndexMap = new QNameMap<Integer>();
- private QNameMap<Integer> attributeQNameIndexMap = new QNameMap<Integer>();
-
- public Name createElementName(QName name) {
- return createElementName(name.getNamespaceURI(),name.getLocalPart());
- }
-
- public Name createElementName(String nsUri, String localName) {
- return createName(nsUri, localName, false, elementQNameIndexMap);
- }
-
- public Name createAttributeName(QName name) {
- return createAttributeName(name.getNamespaceURI(),name.getLocalPart());
- }
-
- public Name createAttributeName(String nsUri, String localName) {
- assert nsUri.intern()==nsUri;
- assert localName.intern()==localName;
-
- if(nsUri.length()==0)
- return new Name(
- allocIndex(attributeQNameIndexMap,"",localName),
- -1,
- nsUri,
- allocIndex(localNameIndexMap,localName),
- localName,
- true);
- else {
- nonDefaultableNsUris.add(nsUri);
- return createName(nsUri,localName, true, attributeQNameIndexMap);
- }
- }
-
- private Name createName(String nsUri, String localName, boolean isAttribute, QNameMap<Integer> map) {
- assert nsUri.intern()==nsUri;
- assert localName.intern()==localName;
-
- return new Name(
- allocIndex(map,nsUri,localName),
- allocIndex(uriIndexMap,nsUri),
- nsUri,
- allocIndex(localNameIndexMap,localName),
- localName,
- isAttribute );
- }
-
- private int allocIndex(Map<String,Integer> map, String str) {
- Integer i = map.get(str);
- if(i==null) {
- i = map.size();
- map.put(str,i);
- }
- return i;
- }
-
- private int allocIndex(QNameMap<Integer> map, String nsUri, String localName) {
- Integer i = map.get(nsUri,localName);
- if(i==null) {
- i = map.size();
- map.put(nsUri,localName,i);
- }
- return i;
- }
-
- /**
- * Wraps up everything and creates {@link NameList}.
- */
- public NameList conclude() {
- boolean[] nsUriCannotBeDefaulted = new boolean[uriIndexMap.size()];
- for (Map.Entry<String,Integer> e : uriIndexMap.entrySet()) {
- nsUriCannotBeDefaulted[e.getValue()] = nonDefaultableNsUris.contains(e.getKey());
- }
-
- NameList r = new NameList(
- list(uriIndexMap),
- nsUriCannotBeDefaulted,
- list(localNameIndexMap),
- elementQNameIndexMap.size(),
- attributeQNameIndexMap.size() );
- // delete them so that the create method can never be called again
- uriIndexMap = null;
- localNameIndexMap = null;
- return r;
- }
-
- private String[] list(Map<String, Integer> map) {
- String[] r = new String[map.size()];
- for (Map.Entry<String, Integer> e : map.entrySet())
- r[e.getValue()] = e.getKey();
- return r;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/NameList.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/NameList.java
deleted file mode 100644
index f833ccb7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/NameList.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-/**
- * Namespace URIs and local names sorted by their indices.
- * Number of Names used for EIIs and AIIs
- *
- * @author Kohsuke Kawaguchi
- */
-public final class NameList {
- /**
- * Namespace URIs by their indices. No nulls in this array.
- * Read-only.
- */
- public final String[] namespaceURIs;
-
- /**
- * For each entry in {@link #namespaceURIs}, whether the namespace URI
- * can be declared as the default. If namespace URI is used in attributes,
- * we always need a prefix, so we can't.
- *
- * True if this URI has to have a prefix.
- */
- public final boolean[] nsUriCannotBeDefaulted;
-
- /**
- * Local names by their indices. No nulls in this array.
- * Read-only.
- */
- public final String[] localNames;
-
- /**
- * Number of Names for elements
- */
- public final int numberOfElementNames;
-
- /**
- * Number of Names for attributes
- */
- public final int numberOfAttributeNames;
-
- public NameList(String[] namespaceURIs, boolean[] nsUriCannotBeDefaulted, String[] localNames, int numberElementNames, int numberAttributeNames) {
- this.namespaceURIs = namespaceURIs;
- this.nsUriCannotBeDefaulted = nsUriCannotBeDefaulted;
- this.localNames = localNames;
- this.numberOfElementNames = numberElementNames;
- this.numberOfAttributeNames = numberAttributeNames;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/NamespaceContext2.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/NamespaceContext2.java
deleted file mode 100644
index c7231cf6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/NamespaceContext2.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import javax.xml.namespace.NamespaceContext;
-
-import com.sun.istack.internal.NotNull;
-
-/**
- * Maintains namespace&lt;->prefix bindings.
- *
- * <p>
- * This interface extends {@link NamespaceContext} and provides
- * an additional functionality, which is necessary to declare
- * namespaced attributes on elements. The added method is for
- * self-consumption by the marshaller.
- *
- * This object is composed into a Serializer.
- */
-public interface NamespaceContext2 extends NamespaceContext
-{
- /**
- * Declares a new namespace binding within the current context.
- *
- * <p>
- * The prefix is automatically assigned by MarshallingContext. If
- * a given namespace URI is already declared, nothing happens.
- *
- * <p>
- * It is <b>NOT</b> an error to declare the same namespace URI
- * more than once.
- *
- * <p>
- * For marshalling to work correctly, all namespace bindings
- * for an element must be declared between its startElement method and
- * its endAttributes event. Calling the same method with the same
- * parameter between the endAttributes and the endElement returns
- * the same prefix.
- *
- * @param requirePrefix
- * If this parameter is true, this method must assign a prefix
- * to this namespace, even if it's already bound to the default
- * namespace. IOW, this method will never return null if this
- * flag is true. This functionality is necessary to declare
- * namespace URI used for attribute names.
- * @param preferedPrefix
- * If the caller has any particular preference to the
- * prefix, pass that as a parameter. The callee will try
- * to honor it. Set null if there's no particular preference.
- *
- * @return
- * returns the assigned prefix. If the namespace is bound to
- * the default namespace, null is returned.
- */
- String declareNamespace( String namespaceUri, String preferedPrefix, boolean requirePrefix );
-
- /**
- * Forcibly make a namespace declaration in effect.
- *
- * If the (prefix,uri) binding is already in-scope, this method
- * simply returns the assigned prefix index. Otherwise a new
- * declaration will be put.
- */
- int force(@NotNull String uri, @NotNull String prefix);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/RuntimeUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/RuntimeUtil.java
deleted file mode 100644
index 12d9d2d3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/RuntimeUtil.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public class RuntimeUtil {
- /**
- * XmlAdapter for printing arbitrary object by using {@link Object#toString()}.
- */
- public static final class ToStringAdapter extends XmlAdapter<String,Object> {
- public Object unmarshal(String s) {
- throw new UnsupportedOperationException();
- }
-
- public String marshal(Object o) {
- if(o==null) return null;
- return o.toString();
- }
- }
-
- /**
- * Map from {@link Class} objects representing primitive types
- * to {@link Class} objects representing their boxed types.
- * <p>
- * e.g., int -> Integer.
- */
- public static final Map<Class,Class> boxToPrimitive;
-
- /**
- * Reverse map of {@link #boxToPrimitive}.
- */
- public static final Map<Class,Class> primitiveToBox;
-
- static {
- Map<Class,Class> b = new HashMap<Class,Class>();
- b.put(Byte.TYPE,Byte.class);
- b.put(Short.TYPE,Short.class);
- b.put(Integer.TYPE,Integer.class);
- b.put(Long.TYPE,Long.class);
- b.put(Character.TYPE,Character.class);
- b.put(Boolean.TYPE,Boolean.class);
- b.put(Float.TYPE,Float.class);
- b.put(Double.TYPE,Double.class);
- b.put(Void.TYPE,Void.class);
-
- primitiveToBox = Collections.unmodifiableMap(b);
-
- Map<Class,Class> p = new HashMap<Class,Class>();
- for( Map.Entry<Class,Class> e : b.entrySet() )
- p.put(e.getValue(),e.getKey());
-
- boxToPrimitive = Collections.unmodifiableMap(p);
- }
-
- /**
- * Reports a print conversion error while marshalling.
- */
-/*
- public static void handlePrintConversionException(
- Object caller, Exception e, XMLSerializer serializer ) throws SAXException {
-
- if( e instanceof SAXException )
- // assume this exception is not from application.
- // (e.g., when a marshaller aborts the processing, this exception
- // will be thrown)
- throw (SAXException)e;
-
- ValidationEvent ve = new PrintConversionEventImpl(
- ValidationEvent.ERROR, e.getMessage(),
- new ValidationEventLocatorImpl(caller), e );
- serializer.reportError(ve);
- }
-*/
-
- /**
- * Reports that the type of an object in a property is unexpected.
- */
-/*
- public static void handleTypeMismatchError( XMLSerializer serializer,
- Object parentObject, String fieldName, Object childObject ) throws SAXException {
-
- ValidationEvent ve = new ValidationEventImpl(
- ValidationEvent.ERROR, // maybe it should be a fatal error.
- Messages.TYPE_MISMATCH.format(
- getTypeName(parentObject),
- fieldName,
- getTypeName(childObject) ),
- new ValidationEventLocatorExImpl(parentObject,fieldName) );
-
- serializer.reportError(ve);
- }
-*/
-
- private static String getTypeName( Object o ) {
- return o.getClass().getName();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/SchemaTypeTransducer.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/SchemaTypeTransducer.java
deleted file mode 100644
index da4e3ff9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/SchemaTypeTransducer.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.io.IOException;
-
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link Transducer} that signals the runtime that this datatype
- * is marshalled to a different XML Schema type.
- *
- * <p>
- * This transducer is used to implement the semantics of {@link XmlSchemaType} annotation.
- *
- *
- * @see XMLSerializer#schemaType
- * @author Kohsuke Kawaguchi
- */
-public class SchemaTypeTransducer<V> extends FilterTransducer<V> {
- private final QName schemaType;
-
- public SchemaTypeTransducer(Transducer<V> core, QName schemaType) {
- super(core);
- this.schemaType = schemaType;
- }
-
- @Override
- public CharSequence print(V o) throws AccessorException {
- XMLSerializer w = XMLSerializer.getInstance();
- QName old = w.setSchemaType(schemaType);
- try {
- return core.print(o);
- } finally {
- w.setSchemaType(old);
- }
- }
-
- @Override
- public void writeText(XMLSerializer w, V o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- QName old = w.setSchemaType(schemaType);
- try {
- core.writeText(w,o,fieldName);
- } finally {
- w.setSchemaType(old);
- }
- }
-
- @Override
- public void writeLeafElement(XMLSerializer w, Name tagName, V o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException {
- QName old = w.setSchemaType(schemaType);
- try {
- core.writeLeafElement(w, tagName, o, fieldName);
- } finally {
- w.setSchemaType(old);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/StAXPostInitAction.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/StAXPostInitAction.java
deleted file mode 100644
index c17d99a9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/StAXPostInitAction.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLEventWriter;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * Post-init action for {@link MarshallerImpl} that incorporate the in-scope namespace bindings
- * from a StAX writer.
- *
- * <p>
- * It's always used either with {@link XMLStreamWriter}, {@link XMLEventWriter}, or bare
- * {@link NamespaceContext},
- * but to reduce the # of classes in the runtime I wrote only one class that handles both.
- *
- * @author Kohsuke Kawaguchi
- */
-final class StAXPostInitAction implements Runnable {
- private final XMLStreamWriter xsw;
- private final XMLEventWriter xew;
- private final NamespaceContext nsc;
- private final XMLSerializer serializer;
-
- StAXPostInitAction(XMLStreamWriter xsw,XMLSerializer serializer) {
- this.xsw = xsw;
- this.xew = null;
- this.nsc = null;
- this.serializer = serializer;
- }
-
- StAXPostInitAction(XMLEventWriter xew,XMLSerializer serializer) {
- this.xsw = null;
- this.xew = xew;
- this.nsc = null;
- this.serializer = serializer;
- }
-
- StAXPostInitAction(NamespaceContext nsc,XMLSerializer serializer) {
- this.xsw = null;
- this.xew = null;
- this.nsc = nsc;
- this.serializer = serializer;
- }
-
- public void run() {
- NamespaceContext ns = nsc;
- if(xsw!=null) ns = xsw.getNamespaceContext();
- if(xew!=null) ns = xew.getNamespaceContext();
-
- // StAX javadoc isn't very clear on the behavior,
- // so work defensively in anticipation of broken implementations.
- if(ns==null)
- return;
-
- // we can't enumerate all the in-scope namespace bindings in StAX,
- // so we only look for the known static namespace URIs.
- // this is less than ideal, but better than nothing.
- for( String nsUri : serializer.grammar.nameList.namespaceURIs ) {
- String p = ns.getPrefix(nsUri);
- if(p!=null)
- serializer.addInscopeBinding(nsUri,p);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/SwaRefAdapter.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/SwaRefAdapter.java
deleted file mode 100644
index e0291d1d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/SwaRefAdapter.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-
-import javax.activation.DataHandler;
-import javax.xml.bind.annotation.XmlAttachmentRef;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-
-
-/**
- * {@link XmlAdapter} that binds the value as a SOAP attachment.
- *
- * <p>
- * On the user classes the SwA handling is done by using the {@link XmlAttachmentRef}
- * annotation, but internally we treat it as a {@link XmlJavaTypeAdapter} with this
- * adapter class. This is true with both XJC and the runtime.
- *
- * <p>
- * the model builder code and the code generator does the conversion and
- * shield the rest of the RI from this mess.
- * Also see @see <a href="http://webservices.xml.com/pub/a/ws/2003/09/16/wsbp.html?page=2">http://webservices.xml.com/pub/a/ws/2003/09/16/wsbp.html?page=2</a>.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class SwaRefAdapter extends XmlAdapter<String,DataHandler> {
-
- public SwaRefAdapter() {
- }
-
- public DataHandler unmarshal(String cid) {
- AttachmentUnmarshaller au = UnmarshallingContext.getInstance().parent.getAttachmentUnmarshaller();
- // TODO: error check
- return au.getAttachmentAsDataHandler(cid);
- }
-
- public String marshal(DataHandler data) {
- if(data==null) return null;
- AttachmentMarshaller am = XMLSerializer.getInstance().attachmentMarshaller;
- // TODO: error check
- return am.addSwaRefAttachment(data);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/SwaRefAdapterMarker.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/SwaRefAdapterMarker.java
deleted file mode 100644
index 1aa3dd91..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/SwaRefAdapterMarker.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-
-import javax.activation.DataHandler;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-
-/**
- * Marker class used to identify swaref attachments and to generate appropriate annotations later.
- */
-public class SwaRefAdapterMarker extends XmlAdapter<String, DataHandler> {
-
- public DataHandler unmarshal(String v) throws Exception {
- throw new IllegalStateException("Not implemented");
- }
-
- public String marshal(DataHandler v) throws Exception {
- throw new IllegalStateException("Not implemented");
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Transducer.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Transducer.java
deleted file mode 100644
index dcf39c24..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Transducer.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.io.IOException;
-
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.datatype.XMLGregorianCalendar;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.reflect.opt.OptimizedTransducedAccessorFactory;
-
-import org.xml.sax.SAXException;
-
-
-/**
- * Responsible for converting a Java object to a lexical representation
- * and vice versa.
- *
- * <p>
- * An implementation of this interface hides how this conversion happens.
- *
- * <p>
- * {@link Transducer}s are immutable.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public interface Transducer<ValueT> {
-
- /**
- * If this {@link Transducer} is the default transducer for the <code>ValueT</code>,
- * this method returns true.
- *
- * Used exclusively by {@link OptimizedTransducedAccessorFactory#get(RuntimePropertyInfo)}
- */
- boolean isDefault();
-
- /**
- * If true, this {@link Transducer} doesn't declare any namespace,
- * and therefore {@link #declareNamespace(Object, XMLSerializer)} is no-op.
- *
- * It also means that the {@link #parse(CharSequence)} method
- * won't use the context parameter.
- */
- boolean useNamespace();
-
- /**
- * Declares the namespace URIs used in the given value to {@code w}.
- *
- * @param o
- * never be null.
- * @param w
- * may be null if {@code !{@link #useNamespace()}}.
- */
- void declareNamespace( ValueT o, XMLSerializer w ) throws AccessorException;
-
- /**
- * Converts the given value to its lexical representation.
- *
- * @param o
- * never be null.
- * @return
- * always non-null valid lexical representation.
- */
- @NotNull CharSequence print(@NotNull ValueT o) throws AccessorException;
-
- /**
- * Converts the lexical representation to a value object.
- *
- * @param lexical
- * never be null.
- * @throws AccessorException
- * if the transducer is used to parse an user bean that uses {@link XmlValue},
- * then this exception may occur when it tries to set the leaf value to the bean.
- * @throws SAXException
- * if the lexical form is incorrect, the error should be reported
- * and SAXException may thrown (or it can return null to recover.)
- */
- ValueT parse(CharSequence lexical) throws AccessorException, SAXException;
-
- /**
- * Sends the result of the {@link #print(Object)} operation
- * to one of the {@link XMLSerializer#text(String, String)} method,
- * but with the best representation of the value, not necessarily String.
- */
- void writeText(XMLSerializer w, ValueT o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException;
-
- /**
- * Sends the result of the {@link #print(Object)} operation
- * to one of the {@link XMLSerializer#leafElement(Name, String, String)} method.
- * but with the best representation of the value, not necessarily String.
- */
- void writeLeafElement(XMLSerializer w, Name tagName, @NotNull ValueT o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException;
-
- /**
- * Transducers implicitly work against a single XML type,
- * but sometimes (most notably {@link XMLGregorianCalendar},
- * an instance may choose different XML types.
- *
- * @return
- * return non-null from this method allows transducers
- * to specify the type it wants to marshal to.
- * Most of the time this method returns null, in which case
- * the implicitly associated type will be used.
- */
- QName getTypeName(@NotNull ValueT instance);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java
deleted file mode 100644
index ad94478f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime;
-
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Utils class.
- *
- * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages.
- *
- * Has *package private* access to avoid inappropriate usage.
- */
-final class Utils {
-
- private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
-
- /**
- * static ReflectionNavigator field to avoid usage of reflection every time we use it.
- */
- static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
-
- static { // we statically initializing REFLECTION_NAVIGATOR property
- try {
- final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
-
- // requires accessClassInPackage privilege
- final Method getInstance = AccessController.doPrivileged(
- new PrivilegedAction<Method>() {
- @Override
- public Method run() {
- try {
- Method getInstance = refNav.getDeclaredMethod("getInstance");
- getInstance.setAccessible(true);
- return getInstance;
- } catch (NoSuchMethodException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
- }
- }
- }
- );
-
- //noinspection unchecked
- REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
- } catch (ClassNotFoundException e) {
- throw new IllegalStateException("Can't find ReflectionNavigator class");
- } catch (InvocationTargetException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
- } catch (IllegalAccessException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
- } catch (SecurityException e) {
- LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
- throw e;
- }
- }
-
- /**
- * private constructor to avoid util class instantiating
- */
- private Utils() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ValueListBeanInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ValueListBeanInfoImpl.java
deleted file mode 100644
index 4ce08973..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ValueListBeanInfoImpl.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime;
-
-import java.io.IOException;
-import java.lang.reflect.Array;
-import java.util.List;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.helpers.ValidationEventImpl;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.istack.internal.FinalArrayList;
-import com.sun.xml.internal.bind.WhiteSpaceProcessor;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link JaxBeanInfo} implementation that binds T[] to a list of simple types.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ValueListBeanInfoImpl extends JaxBeanInfo {
-
- private final Class itemType;
- private final Transducer xducer; // for items
-
- public ValueListBeanInfoImpl(JAXBContextImpl owner, Class arrayType) throws JAXBException {
- super(owner, null, arrayType, false, true, false);
- this.itemType = jaxbType.getComponentType();
- this.xducer = owner.getBeanInfo(arrayType.getComponentType(),true).getTransducer();
- assert xducer!=null;
- }
-
- private final Loader loader = new Loader(true) {
- @Override
- public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
- List<Object> r = new FinalArrayList<Object>();
-
- int idx = 0;
- int len = text.length();
-
- while(true) {
- int p = idx;
- while( p<len && !WhiteSpaceProcessor.isWhiteSpace(text.charAt(p)) )
- p++;
-
- CharSequence token = text.subSequence(idx,p);
- if (!token.equals(""))
- try {
- r.add(xducer.parse(token));
- } catch (AccessorException e) {
- handleGenericException(e,true);
- continue; // move on to next
- }
-
- if(p==len) break; // done
-
- while( p<len && WhiteSpaceProcessor.isWhiteSpace(text.charAt(p)) )
- p++;
- if(p==len) break; // done
-
- idx = p;
- }
-
- state.setTarget(toArray(r));
- }
- };
-
- private Object toArray( List list ) {
- int len = list.size();
- Object array = Array.newInstance(itemType,len);
- for( int i=0; i<len; i++ )
- Array.set(array,i,list.get(i));
- return array;
- }
-
- public void serializeBody(Object array, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
- int len = Array.getLength(array);
- for( int i=0; i<len; i++ ) {
- Object item = Array.get(array,i);
- try {
- xducer.writeText(target,item,"arrayItem");
- } catch (AccessorException e) {
- target.reportError("arrayItem",e);
- }
- }
- }
-
- public final void serializeURIs(Object array, XMLSerializer target) throws SAXException {
- if(xducer.useNamespace()) {
- int len = Array.getLength(array);
- for( int i=0; i<len; i++ ) {
- Object item = Array.get(array,i);
- try {
- xducer.declareNamespace(item,target);
- } catch (AccessorException e) {
- target.reportError("arrayItem",e);
- }
- }
- }
- }
-
- public final String getElementNamespaceURI(Object array) {
- throw new UnsupportedOperationException();
- }
-
- public final String getElementLocalName(Object array) {
- throw new UnsupportedOperationException();
- }
-
- public final Object createInstance(UnmarshallingContext context) {
- throw new UnsupportedOperationException();
- }
-
- public final boolean reset(Object array, UnmarshallingContext context) {
- return false;
- }
-
- public final String getId(Object array, XMLSerializer target) {
- return null;
- }
-
- public final void serializeAttributes(Object array, XMLSerializer target) {
- // noop
- }
-
- public final void serializeRoot(Object array, XMLSerializer target) throws SAXException {
- target.reportError(
- new ValidationEventImpl(
- ValidationEvent.ERROR,
- Messages.UNABLE_TO_MARSHAL_NON_ELEMENT.format(array.getClass().getName()),
- null,
- null));
- }
-
- public final Transducer getTransducer() {
- return null;
- }
-
- public final Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable) {
- // type substitution impossible
- return loader;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/XMLSerializer.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/XMLSerializer.java
deleted file mode 100644
index 941b5684..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/XMLSerializer.java
+++ /dev/null
@@ -1,1077 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime;
-
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.activation.MimeType;
-import javax.xml.bind.DatatypeConverter;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.ValidationEventLocator;
-import javax.xml.bind.annotation.DomHandler;
-import javax.xml.bind.annotation.XmlNs;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.bind.helpers.NotIdentifiableEventImpl;
-import javax.xml.bind.helpers.ValidationEventImpl;
-import javax.xml.bind.helpers.ValidationEventLocatorImpl;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.sax.SAXResult;
-
-import com.sun.istack.internal.SAXException2;
-import com.sun.xml.internal.bind.CycleRecoverable;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper;
-import com.sun.xml.internal.bind.util.ValidationEventLocatorExImpl;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeBuiltinLeafInfo;
-import com.sun.xml.internal.bind.v2.runtime.output.MTOMXmlOutput;
-import com.sun.xml.internal.bind.v2.runtime.output.NamespaceContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.output.Pcdata;
-import com.sun.xml.internal.bind.v2.runtime.output.XmlOutput;
-import com.sun.xml.internal.bind.v2.runtime.property.Property;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.IntData;
-import com.sun.xml.internal.bind.v2.util.CollisionCheckStack;
-
-import org.xml.sax.SAXException;
-
-/**
- * Receives XML serialization event and writes to {@link XmlOutput}.
- *
- * <p>
- * This object coordinates the overall marshalling efforts across different
- * content-tree objects and different target formats.
- *
- * <p>
- * The following CFG gives the proper sequence of method invocation.
- *
- * <pre>
- * MARSHALLING := ELEMENT
- * ELEMENT := "startElement" NSDECL* "endNamespaceDecls"
- * ATTRIBUTE* "endAttributes" BODY "endElement"
- *
- * NSDECL := "declareNamespace"
- *
- * ATTRIBUTE := "attribute"
- * ATTVALUES := "text"*
- *
- *
- * BODY := ( "text" | ELEMENT )*
- * </pre>
- *
- * <p>
- * A marshalling of one element consists of two stages. The first stage is
- * for marshalling attributes and collecting namespace declarations.
- * The second stage is for marshalling characters/child elements of that element.
- *
- * <p>
- * Observe that multiple invocation of "text" is allowed.
- *
- * <p>
- * Also observe that the namespace declarations are allowed only between
- * "startElement" and "endAttributes".
- *
- * <h2>Exceptions in marshaller</h2>
- * <p>
- * {@link IOException}, {@link SAXException}, and {@link XMLStreamException}
- * are thrown from {@link XmlOutput}. They are always considered fatal, and
- * therefore caught only by {@link MarshallerImpl}.
- * <p>
- * {@link AccessorException} can be thrown when an access to a property/field
- * fails, and this is considered as a recoverable error, so it's caught everywhere.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class XMLSerializer extends Coordinator {
- public final JAXBContextImpl grammar;
-
- /** The XML printer. */
- private XmlOutput out;
-
- public final NameList nameList;
-
- public final int[] knownUri2prefixIndexMap;
-
- private final NamespaceContextImpl nsContext;
-
- private NamespaceContextImpl.Element nse;
-
- // Introduced based on Jersey requirements - to be able to retrieve marshalled name
- ThreadLocal<Property> currentProperty = new ThreadLocal<Property>();
-
- /**
- * Set to true if a text is already written,
- * and we need to print ' ' for additional text methods.
- */
- private boolean textHasAlreadyPrinted = false;
-
- /**
- * Set to false once we see the start tag of the root element.
- */
- private boolean seenRoot = false;
-
- /** Marshaller object to which this object belongs. */
- private final MarshallerImpl marshaller;
-
- /** Objects referenced through IDREF. */
- private final Set<Object> idReferencedObjects = new HashSet<Object>();
-
- /** Objects with ID. */
- private final Set<Object> objectsWithId = new HashSet<Object>();
-
- /**
- * Used to detect cycles in the object.
- * Also used to learn what's being marshalled.
- */
- private final CollisionCheckStack<Object> cycleDetectionStack = new CollisionCheckStack<Object>();
-
- /** Optional attributes to go with root element. */
- private String schemaLocation;
- private String noNsSchemaLocation;
-
- /** Lazily created identitiy transformer. */
- private Transformer identityTransformer;
-
- /** Lazily created. */
- private ContentHandlerAdaptor contentHandlerAdapter;
-
- private boolean fragment;
-
- /**
- * Cached instance of {@link Base64Data}.
- */
- private Base64Data base64Data;
-
- /**
- * Cached instance of {@link IntData}.
- */
- private final IntData intData = new IntData();
-
- public AttachmentMarshaller attachmentMarshaller;
-
- /*package*/ XMLSerializer( MarshallerImpl _owner ) {
- this.marshaller = _owner;
- this.grammar = marshaller.context;
- nsContext = new NamespaceContextImpl(this);
- nameList = marshaller.context.nameList;
- knownUri2prefixIndexMap = new int[nameList.namespaceURIs.length];
- }
-
- /**
- * Gets the cached instance of {@link Base64Data}.
- *
- * @deprecated
- * {@link Base64Data} is no longer cached, so that
- * XMLStreamWriterEx impl can retain the data, like JAX-WS does.
- */
- public Base64Data getCachedBase64DataInstance() {
- return new Base64Data();
- }
-
- /**
- * Gets the ID value from an identifiable object.
- */
- private String getIdFromObject(Object identifiableObject) throws SAXException, JAXBException {
- return grammar.getBeanInfo(identifiableObject,true).getId(identifiableObject,this);
- }
-
- private void handleMissingObjectError(String fieldName) throws SAXException, IOException, XMLStreamException {
- reportMissingObjectError(fieldName);
- // as a marshaller, we should be robust, so we'll continue to marshal
- // this document by skipping this missing object.
- endNamespaceDecls(null);
- endAttributes();
- }
-
-
- public void reportError( ValidationEvent ve ) throws SAXException {
- ValidationEventHandler handler;
-
- try {
- handler = marshaller.getEventHandler();
- } catch( JAXBException e ) {
- throw new SAXException2(e);
- }
-
- if(!handler.handleEvent(ve)) {
- if(ve.getLinkedException() instanceof Exception)
- throw new SAXException2((Exception)ve.getLinkedException());
- else
- throw new SAXException2(ve.getMessage());
- }
- }
-
- /**
- * Report an error found as an exception.
- *
- * @param fieldName
- * the name of the property being processed when an error is found.
- */
- public final void reportError(String fieldName, Throwable t) throws SAXException {
- ValidationEvent ve = new ValidationEventImpl(ValidationEvent.ERROR,
- t.getMessage(), getCurrentLocation(fieldName), t);
- reportError(ve);
- }
-
- public void startElement(Name tagName, Object outerPeer) {
- startElement();
- nse.setTagName(tagName,outerPeer);
- }
-
- public void startElement(String nsUri, String localName, String preferredPrefix, Object outerPeer) {
- startElement();
- int idx = nsContext.declareNsUri(nsUri, preferredPrefix, false);
- nse.setTagName(idx,localName,outerPeer);
- }
-
- /**
- * Variation of {@link #startElement(String, String, String, Object)} that forces
- * a specific prefix. Needed to preserve the prefix when marshalling DOM.
- */
- public void startElementForce(String nsUri, String localName, String forcedPrefix, Object outerPeer) {
- startElement();
- int idx = nsContext.force(nsUri, forcedPrefix);
- nse.setTagName(idx,localName,outerPeer);
- }
-
- public void endNamespaceDecls(Object innerPeer) throws IOException, XMLStreamException {
- nsContext.collectionMode = false;
- nse.startElement(out,innerPeer);
- }
-
- /**
- * Switches to the "marshal child texts/elements" mode.
- * This method has to be called after the 1st pass is completed.
- */
- public void endAttributes() throws SAXException, IOException, XMLStreamException {
- if(!seenRoot) {
- seenRoot = true;
- if(schemaLocation!=null || noNsSchemaLocation!=null) {
- int p = nsContext.getPrefixIndex(WellKnownNamespace.XML_SCHEMA_INSTANCE);
- if(schemaLocation!=null)
- out.attribute(p,"schemaLocation",schemaLocation);
- if(noNsSchemaLocation!=null)
- out.attribute(p,"noNamespaceSchemaLocation",noNsSchemaLocation);
- }
- }
-
- out.endStartTag();
- }
-
- /**
- * Ends marshalling of an element.
- * Pops the internal stack.
- */
- public void endElement() throws SAXException, IOException, XMLStreamException {
- nse.endElement(out);
- nse = nse.pop();
- textHasAlreadyPrinted = false;
- }
-
- public void leafElement( Name tagName, String data, String fieldName ) throws SAXException, IOException, XMLStreamException {
- if(seenRoot) {
- textHasAlreadyPrinted = false;
- nse = nse.push();
- out.beginStartTag(tagName);
- out.endStartTag();
- if(data != null)
- try {
- out.text(data,false);
- } catch (IllegalArgumentException e) {
- throw new IllegalArgumentException(Messages.ILLEGAL_CONTENT.format(fieldName, e.getMessage()));
- }
- out.endTag(tagName);
- nse = nse.pop();
- } else {
- // root element has additional processing like xsi:schemaLocation,
- // so we need to go the slow way
- startElement(tagName,null);
- endNamespaceDecls(null);
- endAttributes();
- try {
- out.text(data, false);
- } catch (IllegalArgumentException e) {
- throw new IllegalArgumentException(Messages.ILLEGAL_CONTENT.format(fieldName, e.getMessage()));
- }
- endElement();
- }
- }
-
- public void leafElement( Name tagName, Pcdata data, String fieldName ) throws SAXException, IOException, XMLStreamException {
- if(seenRoot) {
- textHasAlreadyPrinted = false;
- nse = nse.push();
- out.beginStartTag(tagName);
- out.endStartTag();
- if(data != null)
- out.text(data,false);
- out.endTag(tagName);
- nse = nse.pop();
- } else {
- // root element has additional processing like xsi:schemaLocation,
- // so we need to go the slow way
- startElement(tagName,null);
- endNamespaceDecls(null);
- endAttributes();
- out.text(data,false);
- endElement();
- }
- }
-
- public void leafElement( Name tagName, int data, String fieldName ) throws SAXException, IOException, XMLStreamException {
- intData.reset(data);
- leafElement(tagName,intData,fieldName);
- }
-
- /**
- * Marshalls text.
- *
- * <p>
- * This method can be called after the {@link #endAttributes()}
- * method to marshal texts inside elements.
- * If the method is called more than once, those texts are considered
- * as separated by whitespaces. For example,
- *
- * <pre>
- * c.startElement("","foo");
- * c.endAttributes();
- * c.text("abc");
- * c.text("def");
- * c.startElement("","bar");
- * c.endAttributes();
- * c.endElement();
- * c.text("ghi");
- * c.endElement();
- * </pre>
- *
- * will generate <code>&lt;foo>abc def&lt;bar/>ghi&lt;/foo></code>.
- */
- public void text( String text, String fieldName ) throws SAXException, IOException, XMLStreamException {
- // If the assertion fails, it must be a bug of xjc.
- // right now, we are not expecting the text method to be called.
- if(text==null) {
- reportMissingObjectError(fieldName);
- return;
- }
-
- out.text(text,textHasAlreadyPrinted);
- textHasAlreadyPrinted = true;
- }
-
- /**
- * The {@link #text(String, String)} method that takes {@link Pcdata}.
- */
- public void text( Pcdata text, String fieldName ) throws SAXException, IOException, XMLStreamException {
- // If the assertion fails, it must be a bug of xjc.
- // right now, we are not expecting the text method to be called.
- if(text==null) {
- reportMissingObjectError(fieldName);
- return;
- }
-
- out.text(text,textHasAlreadyPrinted);
- textHasAlreadyPrinted = true;
- }
-
- public void attribute(String uri, String local, String value) throws SAXException {
- int prefix;
- if(uri.length()==0) {
- // default namespace. don't need prefix
- prefix = -1;
- } else {
- prefix = nsContext.getPrefixIndex(uri);
- }
-
- try {
- out.attribute(prefix,local,value);
- } catch (IOException e) {
- throw new SAXException2(e);
- } catch (XMLStreamException e) {
- throw new SAXException2(e);
- }
- }
-
- public void attribute(Name name, CharSequence value) throws IOException, XMLStreamException {
- // TODO: consider having the version that takes Pcdata.
- // it's common for an element to have int attributes
- out.attribute(name,value.toString());
- }
-
- public NamespaceContext2 getNamespaceContext() {
- return nsContext;
- }
-
-
- public String onID( Object owner, String value ) {
- objectsWithId.add(owner);
- return value;
- }
-
- public String onIDREF( Object obj ) throws SAXException {
- String id;
- try {
- id = getIdFromObject(obj);
- } catch (JAXBException e) {
- reportError(null,e);
- return null; // recover by returning null
- }
- idReferencedObjects.add(obj);
- if(id==null) {
- reportError( new NotIdentifiableEventImpl(
- ValidationEvent.ERROR,
- Messages.NOT_IDENTIFIABLE.format(),
- new ValidationEventLocatorImpl(obj) ) );
- }
- return id;
- }
-
-
- // TODO: think about the exception handling.
- // I suppose we don't want to use SAXException. -kk
-
- public void childAsRoot(Object obj) throws JAXBException, IOException, SAXException, XMLStreamException {
- final JaxBeanInfo beanInfo = grammar.getBeanInfo(obj, true);
-
- // since the same object will be reported to childAsRoot or
- // childAsXsiType, don't make it a part of the collision check.
- // but we do need to push it so that getXMIMEContentType will work.
- cycleDetectionStack.pushNocheck(obj);
-
- final boolean lookForLifecycleMethods = beanInfo.lookForLifecycleMethods();
- if (lookForLifecycleMethods) {
- fireBeforeMarshalEvents(beanInfo, obj);
- }
-
- beanInfo.serializeRoot(obj,this);
-
- if (lookForLifecycleMethods) {
- fireAfterMarshalEvents(beanInfo, obj);
- }
-
- cycleDetectionStack.pop();
- }
-
- /**
- * Pushes the object to {@link #cycleDetectionStack} and also
- * detect any cycles.
- *
- * When a cycle is found, this method tries to recover from it.
- *
- * @return
- * the object that should be marshalled instead of the given <tt>obj</tt>,
- * or null if the error is found and we need to avoid marshalling this object
- * to prevent infinite recursion. When this method returns null, the error
- * has already been reported.
- */
- private Object pushObject(Object obj, String fieldName) throws SAXException {
- if(!cycleDetectionStack.push(obj))
- return obj;
-
- // allow the object to nominate its replacement
- if(obj instanceof CycleRecoverable) {
- obj = ((CycleRecoverable)obj).onCycleDetected(new CycleRecoverable.Context(){
- public Marshaller getMarshaller() {
- return marshaller;
- }
- });
- if(obj!=null) {
- // object nominated its replacement.
- // we still need to make sure that the nominated.
- // this may cause inifinite recursion on its own.
- cycleDetectionStack.pop();
- return pushObject(obj,fieldName);
- } else
- return null;
- }
-
- // cycle detected and no one is catching the error.
- reportError(new ValidationEventImpl(
- ValidationEvent.ERROR,
- Messages.CYCLE_IN_MARSHALLER.format(cycleDetectionStack.getCycleString()),
- getCurrentLocation(fieldName),
- null));
- return null;
- }
-
- /**
- * The equivalent of:
- *
- * <pre>
- * childAsURIs(child, fieldName);
- * endNamespaceDecls();
- * childAsAttributes(child, fieldName);
- * endAttributes();
- * childAsBody(child, fieldName);
- * </pre>
- *
- * This produces the given child object as the sole content of
- * an element.
- * Used to reduce the code size in the generated marshaller.
- */
- public final void childAsSoleContent( Object child, String fieldName) throws SAXException, IOException, XMLStreamException {
- if(child==null) {
- handleMissingObjectError(fieldName);
- } else {
- child = pushObject(child,fieldName);
- if(child==null) {
- // error recovery
- endNamespaceDecls(null);
- endAttributes();
- cycleDetectionStack.pop();
- }
-
- JaxBeanInfo beanInfo;
- try {
- beanInfo = grammar.getBeanInfo(child,true);
- } catch (JAXBException e) {
- reportError(fieldName,e);
- // recover by ignore
- endNamespaceDecls(null);
- endAttributes();
- cycleDetectionStack.pop();
- return;
- }
-
- final boolean lookForLifecycleMethods = beanInfo.lookForLifecycleMethods();
- if (lookForLifecycleMethods) {
- fireBeforeMarshalEvents(beanInfo, child);
- }
-
- beanInfo.serializeURIs(child,this);
- endNamespaceDecls(child);
- beanInfo.serializeAttributes(child,this);
- endAttributes();
- beanInfo.serializeBody(child,this);
-
- if (lookForLifecycleMethods) {
- fireAfterMarshalEvents(beanInfo, child);
- }
-
- cycleDetectionStack.pop();
- }
- }
-
-
- // the version of childAsXXX where it produces @xsi:type if the expected type name
- // and the actual type name differs.
-
- /**
- * This method is called when a type child object is found.
- *
- * <p>
- * This method produces events of the following form:
- * <pre>
- * NSDECL* "endNamespaceDecls" ATTRIBUTE* "endAttributes" BODY
- * </pre>
- * optionally including @xsi:type if necessary.
- *
- * @param child
- * Object to be marshalled. The {@link JaxBeanInfo} for
- * this object must return a type name.
- * @param expected
- * Expected type of the object.
- * @param fieldName
- * property name of the parent objeect from which 'o' comes.
- * Used as a part of the error message in case anything goes wrong
- * with 'o'.
- */
- public final void childAsXsiType( Object child, String fieldName, JaxBeanInfo expected, boolean nillable) throws SAXException, IOException, XMLStreamException {
- if(child==null) {
- handleMissingObjectError(fieldName);
- } else {
- child = pushObject(child,fieldName);
- if(child==null) { // error recovery
- endNamespaceDecls(null);
- endAttributes();
- return;
- }
-
- boolean asExpected = child.getClass()==expected.jaxbType;
- JaxBeanInfo actual = expected;
- QName actualTypeName = null;
-
- if((asExpected) && (actual.lookForLifecycleMethods())) {
- fireBeforeMarshalEvents(actual, child);
- }
-
- if(!asExpected) {
- try {
- actual = grammar.getBeanInfo(child,true);
- if (actual.lookForLifecycleMethods()) {
- fireBeforeMarshalEvents(actual, child);
- }
- } catch (JAXBException e) {
- reportError(fieldName,e);
- endNamespaceDecls(null);
- endAttributes();
- return; // recover by ignore
- }
- if(actual==expected)
- asExpected = true;
- else {
- actualTypeName = actual.getTypeName(child);
- if(actualTypeName==null) {
- reportError(new ValidationEventImpl(
- ValidationEvent.ERROR,
- Messages.SUBSTITUTED_BY_ANONYMOUS_TYPE.format(
- expected.jaxbType.getName(),
- child.getClass().getName(),
- actual.jaxbType.getName()),
- getCurrentLocation(fieldName)));
- // recover by not printing @xsi:type
- } else {
- getNamespaceContext().declareNamespace(WellKnownNamespace.XML_SCHEMA_INSTANCE,"xsi",true);
- getNamespaceContext().declareNamespace(actualTypeName.getNamespaceURI(),null,false);
- }
- }
- }
- actual.serializeURIs(child,this);
-
- if (nillable) {
- getNamespaceContext().declareNamespace(WellKnownNamespace.XML_SCHEMA_INSTANCE,"xsi",true);
- }
-
- endNamespaceDecls(child);
- if(!asExpected) {
- attribute(WellKnownNamespace.XML_SCHEMA_INSTANCE,"type",
- DatatypeConverter.printQName(actualTypeName,getNamespaceContext()));
- }
-
- actual.serializeAttributes(child,this);
- boolean nilDefined = actual.isNilIncluded();
- if ((nillable) && (!nilDefined)) {
- attribute(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil","true");
- }
-
- endAttributes();
- actual.serializeBody(child,this);
-
- if (actual.lookForLifecycleMethods()) {
- fireAfterMarshalEvents(actual, child);
- }
-
- cycleDetectionStack.pop();
- }
- }
-
- /**
- * Invoke the afterMarshal api on the external listener (if it exists) and on the bean embedded
- * afterMarshal api(if it exists).
- *
- * This method is called only after the callee has determined that beanInfo.lookForLifecycleMethods == true.
- *
- * @param beanInfo
- * @param currentTarget
- */
- private void fireAfterMarshalEvents(final JaxBeanInfo beanInfo, Object currentTarget) {
- // first invoke bean embedded listener
- if (beanInfo.hasAfterMarshalMethod()) {
- Method m = beanInfo.getLifecycleMethods().afterMarshal;
- fireMarshalEvent(currentTarget, m);
- }
-
- // then invoke external listener before bean embedded listener
- Marshaller.Listener externalListener = marshaller.getListener();
- if (externalListener != null) {
- externalListener.afterMarshal(currentTarget);
- }
-
- }
-
- /**
- * Invoke the beforeMarshal api on the external listener (if it exists) and on the bean embedded
- * beforeMarshal api(if it exists).
- *
- * This method is called only after the callee has determined that beanInfo.lookForLifecycleMethods == true.
- *
- * @param beanInfo
- * @param currentTarget
- */
- private void fireBeforeMarshalEvents(final JaxBeanInfo beanInfo, Object currentTarget) {
- // first invoke bean embedded listener
- if (beanInfo.hasBeforeMarshalMethod()) {
- Method m = beanInfo.getLifecycleMethods().beforeMarshal;
- fireMarshalEvent(currentTarget, m);
- }
-
- // then invoke external listener
- Marshaller.Listener externalListener = marshaller.getListener();
- if (externalListener != null) {
- externalListener.beforeMarshal(currentTarget);
- }
- }
-
- private void fireMarshalEvent(Object target, Method m) {
- try {
- m.invoke(target, marshaller);
- } catch (Exception e) {
- // this really only happens if there is a bug in the ri
- throw new IllegalStateException(e);
- }
- }
-
- public void attWildcardAsURIs(Map<QName,String> attributes, String fieldName) {
- if(attributes==null) return;
- for( Map.Entry<QName,String> e : attributes.entrySet() ) {
- QName n = e.getKey();
- String nsUri = n.getNamespaceURI();
- if(nsUri.length()>0) {
- String p = n.getPrefix();
- if(p.length()==0) p=null;
- nsContext.declareNsUri(nsUri, p, true);
- }
- }
- }
-
- public void attWildcardAsAttributes(Map<QName,String> attributes, String fieldName) throws SAXException {
- if(attributes==null) return;
- for( Map.Entry<QName,String> e : attributes.entrySet() ) {
- QName n = e.getKey();
- attribute(n.getNamespaceURI(),n.getLocalPart(),e.getValue());
- }
- }
-
- /**
- * Short for the following call sequence:
- *
- * <pre>
- getNamespaceContext().declareNamespace(WellKnownNamespace.XML_SCHEMA_INSTANCE,"xsi",true);
- endNamespaceDecls();
- attribute(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil","true");
- endAttributes();
- * </pre>
- */
- public final void writeXsiNilTrue() throws SAXException, IOException, XMLStreamException {
- getNamespaceContext().declareNamespace(WellKnownNamespace.XML_SCHEMA_INSTANCE,"xsi",true);
- endNamespaceDecls(null);
- attribute(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil","true");
- endAttributes();
- }
-
- public <E> void writeDom(E element, DomHandler<E, ?> domHandler, Object parentBean, String fieldName) throws SAXException {
- Source source = domHandler.marshal(element,this);
- if(contentHandlerAdapter==null)
- contentHandlerAdapter = new ContentHandlerAdaptor(this);
- try {
- getIdentityTransformer().transform(source,new SAXResult(contentHandlerAdapter));
- } catch (TransformerException e) {
- reportError(fieldName,e);
- }
- }
-
- public Transformer getIdentityTransformer() {
- if (identityTransformer==null)
- identityTransformer = JAXBContextImpl.createTransformer(grammar.disableSecurityProcessing);
- return identityTransformer;
- }
-
- public void setPrefixMapper(NamespacePrefixMapper prefixMapper) {
- nsContext.setPrefixMapper(prefixMapper);
- }
-
- /**
- * Reset this object to write to the specified output.
- *
- * @param schemaLocation
- * if non-null, this value is printed on the root element as xsi:schemaLocation
- * @param noNsSchemaLocation
- * Similar to 'schemaLocation' but this one works for xsi:noNamespaceSchemaLocation
- */
- public void startDocument(XmlOutput out,boolean fragment,String schemaLocation,String noNsSchemaLocation) throws IOException, SAXException, XMLStreamException {
- pushCoordinator();
- nsContext.reset();
- nse = nsContext.getCurrent();
- if(attachmentMarshaller!=null && attachmentMarshaller.isXOPPackage())
- out = new MTOMXmlOutput(out);
- this.out = out;
- objectsWithId.clear();
- idReferencedObjects.clear();
- textHasAlreadyPrinted = false;
- seenRoot = false;
- this.schemaLocation = schemaLocation;
- this.noNsSchemaLocation = noNsSchemaLocation;
- this.fragment = fragment;
- this.inlineBinaryFlag = false;
- this.expectedMimeType = null;
- cycleDetectionStack.reset();
-
- out.startDocument(this,fragment,knownUri2prefixIndexMap,nsContext);
- }
-
- public void endDocument() throws IOException, SAXException, XMLStreamException {
- out.endDocument(fragment);
- }
-
- public void close() {
- out = null;
- clearCurrentProperty();
- popCoordinator();
- }
-
- /**
- * This method can be called after {@link #startDocument} is called
- * but before the marshalling begins, to set the currently in-scope namespace
- * bindings.
- *
- * <p>
- * This method is useful to avoid redundant namespace declarations when
- * the marshalling is producing a sub-document.
- */
- public void addInscopeBinding(String nsUri,String prefix) {
- nsContext.put(nsUri,prefix);
- }
-
- /**
- * Gets the MIME type with which the binary content shall be printed.
- *
- * <p>
- * This method shall be used from those {@link RuntimeBuiltinLeafInfo} that are
- * bound to base64Binary.
- *
- * @see JAXBContextImpl#getXMIMEContentType(Object)
- */
- public String getXMIMEContentType() {
- // xmime:contentType takes precedence
- String v = grammar.getXMIMEContentType(cycleDetectionStack.peek());
- if(v!=null) return v;
-
- // then look for the current in-scope @XmlMimeType
- if(expectedMimeType!=null)
- return expectedMimeType.toString();
-
- return null;
- }
-
- private void startElement() {
- nse = nse.push();
-
- if( !seenRoot ) {
-
- if (grammar.getXmlNsSet() != null) {
- for(XmlNs xmlNs : grammar.getXmlNsSet())
- nsContext.declareNsUri(
- xmlNs.namespaceURI(),
- xmlNs.prefix() == null ? "" : xmlNs.prefix(),
- xmlNs.prefix() != null);
- }
-
- // seenRoot set to true in endAttributes
- // first declare all known URIs
- String[] knownUris = nameList.namespaceURIs;
- for( int i=0; i<knownUris.length; i++ )
- knownUri2prefixIndexMap[i] = nsContext.declareNsUri(knownUris[i], null, nameList.nsUriCannotBeDefaulted[i]);
-
- // then declare user-specified namespace URIs.
- // work defensively. we are calling an user-defined method.
- String[] uris = nsContext.getPrefixMapper().getPreDeclaredNamespaceUris();
- if( uris!=null ) {
- for (String uri : uris) {
- if (uri != null)
- nsContext.declareNsUri(uri, null, false);
- }
- }
- String[] pairs = nsContext.getPrefixMapper().getPreDeclaredNamespaceUris2();
- if( pairs!=null ) {
- for( int i=0; i<pairs.length; i+=2 ) {
- String prefix = pairs[i];
- String nsUri = pairs[i+1];
- if(prefix!=null && nsUri!=null)
- // in this case, we don't want the redundant binding consolidation
- // to happen (such as declaring the same namespace URI twice with
- // different prefixes.) Hence we call the put method directly.
- nsContext.put(nsUri,prefix);
- }
- }
-
- if(schemaLocation!=null || noNsSchemaLocation!=null) {
- nsContext.declareNsUri(WellKnownNamespace.XML_SCHEMA_INSTANCE,"xsi",true);
- }
- }
-
- nsContext.collectionMode = true;
- textHasAlreadyPrinted = false;
- }
-
- private MimeType expectedMimeType;
-
- /**
- * This method is used by {@link MimeTypedTransducer} to set the expected MIME type
- * for the encapsulated {@link Transducer}.
- */
- public MimeType setExpectedMimeType(MimeType expectedMimeType) {
- MimeType old = this.expectedMimeType;
- this.expectedMimeType = expectedMimeType;
- return old;
- }
-
- /**
- * True to force inlining.
- */
- private boolean inlineBinaryFlag;
-
- public boolean setInlineBinaryFlag(boolean value) {
- boolean old = inlineBinaryFlag;
- this.inlineBinaryFlag = value;
- return old;
- }
-
- public boolean getInlineBinaryFlag() {
- return inlineBinaryFlag;
- }
-
- /**
- * Field used to support an {@link XmlSchemaType} annotation.
- *
- * <p>
- * When we are marshalling a property with an effective {@link XmlSchemaType},
- * this field is set to hold the QName of that type. The {@link Transducer} that
- * actually converts a Java object into XML can look this property to decide
- * how to marshal the value.
- */
- private QName schemaType;
-
- public QName setSchemaType(QName st) {
- QName old = schemaType;
- schemaType = st;
- return old;
- }
-
- public QName getSchemaType() {
- return schemaType;
- }
-
- public void setObjectIdentityCycleDetection(boolean val) {
- cycleDetectionStack.setUseIdentity(val);
- }
- public boolean getObjectIdentityCycleDetection() {
- return cycleDetectionStack.getUseIdentity();
- }
-
- void reconcileID() throws SAXException {
- // find objects that were not a part of the object graph
- idReferencedObjects.removeAll(objectsWithId);
-
- for( Object idObj : idReferencedObjects ) {
- try {
- String id = getIdFromObject(idObj);
- reportError( new NotIdentifiableEventImpl(
- ValidationEvent.ERROR,
- Messages.DANGLING_IDREF.format(id),
- new ValidationEventLocatorImpl(idObj) ) );
- } catch (JAXBException e) {
- // this error should have been reported already. just ignore here.
- }
- }
-
- // clear the garbage
- idReferencedObjects.clear();
- objectsWithId.clear();
- }
-
- public boolean handleError(Exception e) {
- return handleError(e,cycleDetectionStack.peek(),null);
- }
-
- public boolean handleError(Exception e,Object source,String fieldName) {
- return handleEvent(
- new ValidationEventImpl(
- ValidationEvent.ERROR,
- e.getMessage(),
- new ValidationEventLocatorExImpl(source,fieldName),
- e));
- }
-
- public boolean handleEvent(ValidationEvent event) {
- try {
- return marshaller.getEventHandler().handleEvent(event);
- } catch (JAXBException e) {
- // impossible
- throw new Error(e);
- }
- }
-
- private void reportMissingObjectError(String fieldName) throws SAXException {
- reportError(new ValidationEventImpl(
- ValidationEvent.ERROR,
- Messages.MISSING_OBJECT.format(fieldName),
- getCurrentLocation(fieldName),
- new NullPointerException() ));
- }
-
- /**
- * Called when a referenced object doesn't have an ID.
- */
- public void errorMissingId(Object obj) throws SAXException {
- reportError( new ValidationEventImpl(
- ValidationEvent.ERROR,
- Messages.MISSING_ID.format(obj),
- new ValidationEventLocatorImpl(obj)) );
- }
-
- public ValidationEventLocator getCurrentLocation(String fieldName) {
- return new ValidationEventLocatorExImpl(cycleDetectionStack.peek(),fieldName);
- }
-
- protected ValidationEventLocator getLocation() {
- return getCurrentLocation(null);
- }
-
- /**
- * May return null when the property hasn't been set.
- * Introduced based on Jersey requirements.
- */
- public Property getCurrentProperty() {
- return currentProperty.get();
- }
-
- /**
- * Takes care of cleaning the currentProperty. Must be called from the same thread that created the XMLSerializer.
- */
- public void clearCurrentProperty() {
- if (currentProperty != null) {
- currentProperty.remove();
- }
- }
-
- /**
- * When called from within the realm of the marshaller, this method
- * returns the current {@link XMLSerializer} in charge.
- */
- public static XMLSerializer getInstance() {
- return (XMLSerializer)Coordinator._getInstance();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/C14nXmlOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/C14nXmlOutput.java
deleted file mode 100644
index d3abd385..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/C14nXmlOutput.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Arrays;
-import java.util.Collections;
-
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.istack.internal.FinalArrayList;
-import com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler;
-
-/**
- * {@link XmlOutput} that generates canonical XML.
- *
- * @see com.sun.xml.internal.bind.api.C14nSupport_ArchitectureDocument
- * @author Kohsuke Kawaguchi
- */
-public class C14nXmlOutput extends UTF8XmlOutput {
- public C14nXmlOutput(OutputStream out, Encoded[] localNames, boolean namedAttributesAreOrdered, CharacterEscapeHandler escapeHandler) {
- super(out, localNames, escapeHandler);
- this.namedAttributesAreOrdered = namedAttributesAreOrdered;
-
- for( int i=0; i<staticAttributes.length; i++ )
- staticAttributes[i] = new StaticAttribute();
- }
-
- /**
- * Hosts statically known attributes.
- *
- * {@link StaticAttribute} instances are reused.
- */
- private StaticAttribute[] staticAttributes = new StaticAttribute[8];
- private int len = 0;
-
- /**
- * Used to sort namespace declarations. Reused.
- */
- private int[] nsBuf = new int[8];
-
- /**
- * Hosts other attributes whose name are not statically known
- * (AKA attribute wildcard.)
- *
- * As long as this map is empty, there's no need for sorting.
- * see {@link com.sun.xml.internal.bind.api.C14nSupport_ArchitectureDocument} for more details.
- */
- private final FinalArrayList<DynamicAttribute> otherAttributes = new FinalArrayList<DynamicAttribute>();
-
- /**
- * True if {@link JAXBRIContext} is created with c14n support on,
- * in which case all named attributes are sorted by the marshaller
- * and we won't have to do it here.
- */
- private final boolean namedAttributesAreOrdered;
-
- final class StaticAttribute implements Comparable<StaticAttribute> {
- Name name;
- String value;
-
- public void set(Name name, String value) {
- this.name = name;
- this.value = value;
- }
-
- void write() throws IOException {
- C14nXmlOutput.super.attribute(name,value);
- }
-
- DynamicAttribute toDynamicAttribute() {
- int nsUriIndex = name.nsUriIndex;
- int prefix;
- if(nsUriIndex==-1)
- prefix = -1;
- else
- prefix = nsUriIndex2prefixIndex[nsUriIndex];
- return new DynamicAttribute(
- prefix, name.localName, value );
- }
-
- public int compareTo(StaticAttribute that) {
- return this.name.compareTo(that.name);
- }
-
- }
-
- final class DynamicAttribute implements Comparable<DynamicAttribute> {
- final int prefix;
- final String localName;
- final String value;
-
- public DynamicAttribute(int prefix, String localName, String value) {
- this.prefix = prefix;
- this.localName = localName;
- this.value = value;
- }
-
- private String getURI() {
- if(prefix==-1) return "";
- else return nsContext.getNamespaceURI(prefix);
- }
-
- public int compareTo(DynamicAttribute that) {
- int r = this.getURI().compareTo(that.getURI());
- if(r!=0) return r;
- return this.localName.compareTo(that.localName);
- }
- }
-
- @Override
- public void attribute(Name name, String value) throws IOException {
- if(staticAttributes.length==len) {
- // reallocate
- int newLen = len*2;
- StaticAttribute[] newbuf = new StaticAttribute[newLen];
- System.arraycopy(staticAttributes,0,newbuf,0,len);
- for(int i=len;i<newLen;i++)
- staticAttributes[i] = new StaticAttribute();
- staticAttributes = newbuf;
- }
-
- staticAttributes[len++].set(name,value);
- }
-
- @Override
- public void attribute(int prefix, String localName, String value) throws IOException {
- otherAttributes.add(new DynamicAttribute(prefix,localName,value));
- }
-
- @Override
- public void endStartTag() throws IOException {
- if(otherAttributes.isEmpty()) {
- if(len!=0) {
- // sort is expensive even for size 0 array,
- // so it's worth checking len==0
- if(!namedAttributesAreOrdered)
- Arrays.sort(staticAttributes,0,len);
- // this is the common case
- for( int i=0; i<len; i++ )
- staticAttributes[i].write();
- len = 0;
- }
- } else {
- // this is the exceptional case
-
- // sort all the attributes, not just the other attributes
- for( int i=0; i<len; i++ )
- otherAttributes.add(staticAttributes[i].toDynamicAttribute());
- len = 0;
- Collections.sort(otherAttributes);
-
- // write them all
- int size = otherAttributes.size();
- for( int i=0; i<size; i++ ) {
- DynamicAttribute a = otherAttributes.get(i);
- super.attribute(a.prefix,a.localName,a.value);
- }
- otherAttributes.clear();
- }
- super.endStartTag();
- }
-
- /**
- * Write namespace declarations after sorting them.
- */
- @Override
- protected void writeNsDecls(int base) throws IOException {
- int count = nsContext.getCurrent().count();
-
- if(count==0)
- return; // quickly reject the most common case
-
- if(count>nsBuf.length)
- nsBuf = new int[count];
-
- for( int i=count-1; i>=0; i-- )
- nsBuf[i] = base+i;
-
- // do a bubble sort. Hopefully # of ns decls are small enough to justify bubble sort.
- // faster algorithm is more compliated to implement
- for( int i=0; i<count; i++ ) {
- for( int j=i+1; j<count; j++ ) {
- String p = nsContext.getPrefix(nsBuf[i]);
- String q = nsContext.getPrefix(nsBuf[j]);
- if( p.compareTo(q) > 0 ) {
- // swap
- int t = nsBuf[j];
- nsBuf[j] = nsBuf[i];
- nsBuf[i] = t;
- }
- }
- }
-
- // write them out
- for( int i=0; i<count; i++ )
- writeNsDecl(nsBuf[i]);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/DOMOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/DOMOutput.java
deleted file mode 100644
index 054fcf82..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/DOMOutput.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import com.sun.xml.internal.bind.v2.runtime.AssociationMap;
-import com.sun.xml.internal.bind.marshaller.SAX2DOMEx;
-
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-
-/**
- * {@link XmlOutput} implementation that does associative marshalling to DOM.
- *
- * <p>
- * This is used for binder.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class DOMOutput extends SAXOutput {
- private final AssociationMap assoc;
-
- public DOMOutput(Node node, AssociationMap assoc) {
- super(new SAX2DOMEx(node));
- this.assoc = assoc;
- assert assoc!=null;
- }
-
- private SAX2DOMEx getBuilder() {
- return (SAX2DOMEx)out;
- }
-
- @Override
- public void endStartTag() throws SAXException {
- super.endStartTag();
-
- Object op = nsContext.getCurrent().getOuterPeer();
- if(op!=null)
- assoc.addOuter( getBuilder().getCurrentElement(), op );
-
- Object ip = nsContext.getCurrent().getInnerPeer();
- if(ip!=null)
- assoc.addInner( getBuilder().getCurrentElement(), ip );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/Encoded.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/Encoded.java
deleted file mode 100644
index 05fd60a2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/Encoded.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import java.io.IOException;
-
-/**
- * Buffer for UTF-8 encoded string.
- *
- * See http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 for the UTF-8 encoding.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class Encoded {
- public byte[] buf;
-
- public int len;
-
- public Encoded() {}
-
- public Encoded(String text) {
- set(text);
- }
-
- public void ensureSize(int size) {
- if(buf==null || buf.length<size)
- buf = new byte[size];
- }
-
- public final void set( String text ) {
- int length = text.length();
-
- ensureSize(length*3+1); // +1 for append
-
- int ptr = 0;
-
- for (int i = 0; i < length; i++) {
- final char chr = text.charAt(i);
- if (chr > 0x7F) {
- if (chr > 0x7FF) {
- if(Character.MIN_HIGH_SURROGATE<=chr && chr<=Character.MAX_LOW_SURROGATE) {
- // surrogate
- int uc = (((chr & 0x3ff) << 10) | (text.charAt(++i) & 0x3ff)) + 0x10000;
-
- buf[ptr++] = (byte)(0xF0 | ((uc >> 18)));
- buf[ptr++] = (byte)(0x80 | ((uc >> 12) & 0x3F));
- buf[ptr++] = (byte)(0x80 | ((uc >> 6) & 0x3F));
- buf[ptr++] = (byte)(0x80 + (uc & 0x3F));
- continue;
- }
- buf[ptr++] = (byte)(0xE0 + (chr >> 12));
- buf[ptr++] = (byte)(0x80 + ((chr >> 6) & 0x3F));
- } else {
- buf[ptr++] = (byte)(0xC0 + (chr >> 6));
- }
- buf[ptr++] = (byte)(0x80 + (chr & 0x3F));
- } else {
- buf[ptr++] = (byte)chr;
- }
- }
-
- len = ptr;
- }
-
- /**
- * Fill in the buffer by encoding the specified characters
- * while escaping characters like &lt;
- *
- * @param isAttribute
- * if true, characters like \t, \r, and \n are also escaped.
- */
- public final void setEscape(String text, boolean isAttribute) {
- int length = text.length();
- ensureSize(length*6+1); // in the worst case the text is like """""", so we need 6 bytes per char
-
- int ptr = 0;
-
- for (int i = 0; i < length; i++) {
- final char chr = text.charAt(i);
-
- int ptr1 = ptr;
- if (chr > 0x7F) {
- if (chr > 0x7FF) {
- if(Character.MIN_HIGH_SURROGATE<=chr && chr<=Character.MAX_LOW_SURROGATE) {
- // surrogate
- int uc = (((chr & 0x3ff) << 10) | (text.charAt(++i) & 0x3ff)) + 0x10000;
-
- buf[ptr++] = (byte)(0xF0 | ((uc >> 18)));
- buf[ptr++] = (byte)(0x80 | ((uc >> 12) & 0x3F));
- buf[ptr++] = (byte)(0x80 | ((uc >> 6) & 0x3F));
- buf[ptr++] = (byte)(0x80 + (uc & 0x3F));
- continue;
- }
- buf[ptr1++] = (byte)(0xE0 + (chr >> 12));
- buf[ptr1++] = (byte)(0x80 + ((chr >> 6) & 0x3F));
- } else {
- buf[ptr1++] = (byte)(0xC0 + (chr >> 6));
- }
- buf[ptr1++] = (byte)(0x80 + (chr & 0x3F));
- } else {
- byte[] ent;
-
- if((ent=attributeEntities[chr])!=null) {
- // the majority of the case is just printed as a char,
- // so it's very important to reject them as quickly as possible
-
- // check again to see if this really needs to be escaped
- if(isAttribute || entities[chr]!=null)
- ptr1 = writeEntity(ent,ptr1);
- else
- buf[ptr1++] = (byte)chr;
- } else
- buf[ptr1++] = (byte)chr;
- }
- ptr = ptr1;
- }
- len = ptr;
- }
-
- private int writeEntity( byte[] entity, int ptr ) {
- System.arraycopy(entity,0,buf,ptr,entity.length);
- return ptr+entity.length;
- }
-
- /**
- * Writes the encoded bytes to the given output stream.
- */
- public final void write(UTF8XmlOutput out) throws IOException {
- out.write(buf,0,len);
- }
-
- /**
- * Appends a new character to the end of the buffer.
- * This assumes that you have enough space in the buffer.
- */
- public void append(char b) {
- buf[len++] = (byte)b;
- }
-
- /**
- * Reallocate the buffer to the exact size of the data
- * to reduce the memory footprint.
- */
- public void compact() {
- byte[] b = new byte[len];
- System.arraycopy(buf,0,b,0,len);
- buf = b;
- }
-
- /**
- * UTF-8 encoded entities keyed by their character code.
- * e.g., entities['&'] == AMP_ENTITY.
- *
- * In attributes we need to encode more characters.
- */
- private static final byte[][] entities = new byte[0x80][];
- private static final byte[][] attributeEntities = new byte[0x80][];
-
- static {
- add('&',"&amp;",false);
- add('<',"&lt;",false);
- add('>',"&gt;",false);
- add('"',"&quot;",true);
- add('\t',"&#x9;",true);
- add('\r',"&#xD;",false);
- add('\n',"&#xA;",true);
- }
-
- private static void add(char c, String s, boolean attOnly) {
- byte[] image = UTF8XmlOutput.toBytes(s);
- attributeEntities[c] = image;
- if(!attOnly)
- entities[c] = image;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/FastInfosetStreamWriterOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/FastInfosetStreamWriterOutput.java
deleted file mode 100644
index 12ddb02c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/FastInfosetStreamWriterOutput.java
+++ /dev/null
@@ -1,463 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data;
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Map;
-import java.util.WeakHashMap;
-import javax.xml.bind.JAXBContext;
-import com.sun.xml.internal.org.jvnet.fastinfoset.VocabularyApplicationData;
-import org.xml.sax.SAXException;
-
-/**
- * {@link XmlOutput} for {@link LowLevelStAXDocumentSerializer}.
- * <p>
- * This class is responsible for managing the indexing of elements, attributes
- * and local names that are known to JAXB by way of the JAXBContext (generated
- * from JAXB beans or schema). The pre-encoded UTF-8 representations of known
- * local names are also utilized.
- * <p>
- * The lookup of elements, attributes and local names with respect to a context
- * is very efficient. It relies on an incrementing base line so that look up is
- * performed in O(1) time and only uses static memory. When the base line reaches
- * a point where integer overflow will occur the arrays and base line are reset
- * (such an event is rare and will have little impact on performance).
- * <p>
- * A weak map of JAXB contexts to optimized tables for attributes, elements and
- * local names is utilized and stored on the LowLevel StAX serializer. Thus,
- * optimized serializing can work other multiple serializing of JAXB beans using
- * the same LowLevel StAX serializer instance. This approach works best when JAXB
- * contexts are only created once per schema or JAXB beans (which is the recommended
- * practice as the creation JAXB contexts are expensive, they are thread safe and
- * can be reused).
- *
- * @author Paul.Sandoz@Sun.Com
- */
-public final class FastInfosetStreamWriterOutput extends XMLStreamWriterOutput {
- private final StAXDocumentSerializer fiout;
- private final Encoded[] localNames;
- private final TablesPerJAXBContext tables;
-
- /**
- * Holder for the optimzed element, attribute and
- * local name tables.
- */
- final static class TablesPerJAXBContext {
- final int[] elementIndexes;
- final int[] elementIndexPrefixes;
-
- final int[] attributeIndexes;
- final int[] localNameIndexes;
-
- /**
- * The offset of the index
- */
- int indexOffset;
-
- /**
- * The the maximum known value of an index
- */
- int maxIndex;
-
- /**
- * True if the tables require clearing
- */
- boolean requiresClear;
-
- /**
- * Create a new set of tables for a JAXB context.
- * <p>
- * @param content the JAXB context.
- * @param initialIndexOffset the initial index offset to calculate
- * the maximum possible index
- *
- */
- TablesPerJAXBContext(JAXBContextImpl context, int initialIndexOffset) {
- elementIndexes = new int[context.getNumberOfElementNames()];
- elementIndexPrefixes = new int[context.getNumberOfElementNames()];
- attributeIndexes = new int[context.getNumberOfAttributeNames()];
- localNameIndexes = new int[context.getNumberOfLocalNames()];
-
- indexOffset = 1;
- maxIndex = initialIndexOffset + elementIndexes.length + attributeIndexes.length;
- }
-
- /**
- * Require that tables are cleared.
- */
- public void requireClearTables() {
- requiresClear = true;
- }
-
- /**
- * Clear or reset the tables.
- * <p>
- * @param initialIndexOffset the initial index offset to calculate
- * the maximum possible index
- */
- public void clearOrResetTables(int intialIndexOffset) {
- if (requiresClear) {
- requiresClear = false;
-
- // Increment offset to new position
- indexOffset += maxIndex;
- // Reset the maximum known value of an index
- maxIndex = intialIndexOffset + elementIndexes.length + attributeIndexes.length;
- // Check if there is enough free space
- // If overflow
- if ((indexOffset + maxIndex) < 0) {
- clearAll();
- }
- } else {
- // Reset the maximum known value of an index
- maxIndex = intialIndexOffset + elementIndexes.length + attributeIndexes.length;
- // Check if there is enough free space
- // If overflow
- if ((indexOffset + maxIndex) < 0) {
- resetAll();
- }
- }
- }
-
- private void clearAll() {
- clear(elementIndexes);
- clear(attributeIndexes);
- clear(localNameIndexes);
- indexOffset = 1;
- }
-
- private void clear(int[] array) {
- for (int i = 0; i < array.length; i++) {
- array[i] = 0;
- }
- }
-
- /**
- * Increment the maximum know index value
- * <p>
- * The indexes are preserved.
- */
- public void incrementMaxIndexValue() {
- // Increment the maximum value of an index
- maxIndex++;
- // Check if there is enough free space
- // If overflow
- if ((indexOffset + maxIndex) < 0) {
- resetAll();
- }
- }
-
- private void resetAll() {
- clear(elementIndexes);
- clear(attributeIndexes);
- clear(localNameIndexes);
- indexOffset = 1;
- }
-
- private void reset(int[] array) {
- for (int i = 0; i < array.length; i++) {
- if (array[i] > indexOffset) {
- array[i] = array[i] - indexOffset + 1;
- } else {
- array[i] = 0;
- }
- }
- }
-
- }
-
- /**
- * Holder of JAXB contexts -> tables.
- * <p>
- * An instance will be registered with the
- * {@link LowLevelStAXDocumentSerializer}.
- */
- final static class AppData implements VocabularyApplicationData {
- final Map<JAXBContext, TablesPerJAXBContext> contexts =
- new WeakHashMap<JAXBContext, TablesPerJAXBContext>();
- final Collection<TablesPerJAXBContext> collectionOfContexts = contexts.values();
-
- /**
- * Clear all the tables.
- */
- public void clear() {
- for(TablesPerJAXBContext c : collectionOfContexts)
- c.requireClearTables();
- }
- }
-
- public FastInfosetStreamWriterOutput(StAXDocumentSerializer out,
- JAXBContextImpl context) {
- super(out);
-
- this.fiout = out;
- this.localNames = context.getUTF8NameTable();
-
- final VocabularyApplicationData vocabAppData = fiout.getVocabularyApplicationData();
- AppData appData = null;
- if (vocabAppData == null || !(vocabAppData instanceof AppData)) {
- appData = new AppData();
- fiout.setVocabularyApplicationData(appData);
- } else {
- appData = (AppData)vocabAppData;
- }
-
- final TablesPerJAXBContext tablesPerContext = appData.contexts.get(context);
- if (tablesPerContext != null) {
- tables = tablesPerContext;
- /**
- * Obtain the current local name index. Thus will be used to
- * calculate the maximum index value when serializing for this context
- */
- tables.clearOrResetTables(out.getLocalNameIndex());
- } else {
- tables = new TablesPerJAXBContext(context, out.getLocalNameIndex());
- appData.contexts.put(context, tables);
- }
- }
-
- @Override
- public void startDocument(XMLSerializer serializer, boolean fragment,
- int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext)
- throws IOException, SAXException, XMLStreamException {
- super.startDocument(serializer, fragment, nsUriIndex2prefixIndex, nsContext);
-
- if (fragment)
- fiout.initiateLowLevelWriting();
- }
-
- @Override
- public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException {
- super.endDocument(fragment);
- }
-
- @Override
- public void beginStartTag(Name name) throws IOException {
- fiout.writeLowLevelTerminationAndMark();
-
- if (nsContext.getCurrent().count() == 0) {
- final int qNameIndex = tables.elementIndexes[name.qNameIndex] - tables.indexOffset;
- final int prefixIndex = nsUriIndex2prefixIndex[name.nsUriIndex];
-
- if (qNameIndex >= 0 &&
- tables.elementIndexPrefixes[name.qNameIndex] == prefixIndex) {
- fiout.writeLowLevelStartElementIndexed(EncodingConstants.ELEMENT, qNameIndex);
- } else {
- tables.elementIndexes[name.qNameIndex] = fiout.getNextElementIndex() + tables.indexOffset;
- tables.elementIndexPrefixes[name.qNameIndex] = prefixIndex;
- writeLiteral(EncodingConstants.ELEMENT | EncodingConstants.ELEMENT_LITERAL_QNAME_FLAG,
- name,
- nsContext.getPrefix(prefixIndex),
- nsContext.getNamespaceURI(prefixIndex));
- }
- } else {
- beginStartTagWithNamespaces(name);
- }
- }
-
- public void beginStartTagWithNamespaces(Name name) throws IOException {
- final NamespaceContextImpl.Element nse = nsContext.getCurrent();
-
- fiout.writeLowLevelStartNamespaces();
- for (int i = nse.count() - 1; i >= 0; i--) {
- final String uri = nse.getNsUri(i);
- if (uri.length() == 0 && nse.getBase() == 1)
- continue; // no point in definint xmlns='' on the root
- fiout.writeLowLevelNamespace(nse.getPrefix(i), uri);
- }
- fiout.writeLowLevelEndNamespaces();
-
- final int qNameIndex = tables.elementIndexes[name.qNameIndex] - tables.indexOffset;
- final int prefixIndex = nsUriIndex2prefixIndex[name.nsUriIndex];
-
- if (qNameIndex >= 0 &&
- tables.elementIndexPrefixes[name.qNameIndex] == prefixIndex) {
- fiout.writeLowLevelStartElementIndexed(0, qNameIndex);
- } else {
- tables.elementIndexes[name.qNameIndex] = fiout.getNextElementIndex() + tables.indexOffset;
- tables.elementIndexPrefixes[name.qNameIndex] = prefixIndex;
- writeLiteral(EncodingConstants.ELEMENT_LITERAL_QNAME_FLAG,
- name,
- nsContext.getPrefix(prefixIndex),
- nsContext.getNamespaceURI(prefixIndex));
- }
- }
-
- @Override
- public void attribute(Name name, String value) throws IOException {
- fiout.writeLowLevelStartAttributes();
-
- final int qNameIndex = tables.attributeIndexes[name.qNameIndex] - tables.indexOffset;
- if (qNameIndex >= 0) {
- fiout.writeLowLevelAttributeIndexed(qNameIndex);
- } else {
- tables.attributeIndexes[name.qNameIndex] = fiout.getNextAttributeIndex() + tables.indexOffset;
-
- final int namespaceURIId = name.nsUriIndex;
- if (namespaceURIId == -1) {
- writeLiteral(EncodingConstants.ATTRIBUTE_LITERAL_QNAME_FLAG,
- name,
- "",
- "");
- } else {
- final int prefix = nsUriIndex2prefixIndex[namespaceURIId];
- writeLiteral(EncodingConstants.ATTRIBUTE_LITERAL_QNAME_FLAG,
- name,
- nsContext.getPrefix(prefix),
- nsContext.getNamespaceURI(prefix));
- }
- }
-
- fiout.writeLowLevelAttributeValue(value);
- }
-
- private void writeLiteral(int type, Name name, String prefix, String namespaceURI) throws IOException {
- final int localNameIndex = tables.localNameIndexes[name.localNameIndex] - tables.indexOffset;
-
- if (localNameIndex < 0) {
- tables.localNameIndexes[name.localNameIndex] = fiout.getNextLocalNameIndex() + tables.indexOffset;
-
- fiout.writeLowLevelStartNameLiteral(
- type,
- prefix,
- localNames[name.localNameIndex].buf,
- namespaceURI);
- } else {
- fiout.writeLowLevelStartNameLiteral(
- type,
- prefix,
- localNameIndex,
- namespaceURI);
- }
- }
-
- @Override
- public void endStartTag() throws IOException {
- fiout.writeLowLevelEndStartElement();
- }
-
- @Override
- public void endTag(Name name) throws IOException {
- fiout.writeLowLevelEndElement();
- }
-
- @Override
- public void endTag(int prefix, String localName) throws IOException {
- fiout.writeLowLevelEndElement();
- }
-
-
- @Override
- public void text(Pcdata value, boolean needsSeparatingWhitespace) throws IOException {
- if (needsSeparatingWhitespace)
- fiout.writeLowLevelText(" ");
-
- /*
- * Check if the CharSequence is from a base64Binary data type
- */
- if (!(value instanceof Base64Data)) {
- final int len = value.length();
- if(len <buf.length) {
- value.writeTo(buf, 0);
- fiout.writeLowLevelText(buf, len);
- } else {
- fiout.writeLowLevelText(value.toString());
- }
- } else {
- final Base64Data dataValue = (Base64Data)value;
- // Write out the octets using the base64 encoding algorithm
- fiout.writeLowLevelOctets(dataValue.get(), dataValue.getDataLen());
- }
- }
-
-
- @Override
- public void text(String value, boolean needsSeparatingWhitespace) throws IOException {
- if (needsSeparatingWhitespace)
- fiout.writeLowLevelText(" ");
-
- fiout.writeLowLevelText(value);
- }
-
-
- @Override
- public void beginStartTag(int prefix, String localName) throws IOException {
- fiout.writeLowLevelTerminationAndMark();
-
- int type = EncodingConstants.ELEMENT;
- if (nsContext.getCurrent().count() > 0) {
- final NamespaceContextImpl.Element nse = nsContext.getCurrent();
-
- fiout.writeLowLevelStartNamespaces();
- for (int i = nse.count() - 1; i >= 0; i--) {
- final String uri = nse.getNsUri(i);
- if (uri.length() == 0 && nse.getBase() == 1)
- continue; // no point in definint xmlns='' on the root
- fiout.writeLowLevelNamespace(nse.getPrefix(i), uri);
- }
- fiout.writeLowLevelEndNamespaces();
-
- type= 0;
- }
-
- final boolean isIndexed = fiout.writeLowLevelStartElement(
- type,
- nsContext.getPrefix(prefix),
- localName,
- nsContext.getNamespaceURI(prefix));
-
- if (!isIndexed)
- tables.incrementMaxIndexValue();
- }
-
- @Override
- public void attribute(int prefix, String localName, String value) throws IOException {
- fiout.writeLowLevelStartAttributes();
-
- boolean isIndexed;
- if (prefix == -1)
- isIndexed = fiout.writeLowLevelAttribute("", "", localName);
- else
- isIndexed = fiout.writeLowLevelAttribute(
- nsContext.getPrefix(prefix),
- nsContext.getNamespaceURI(prefix),
- localName);
-
- if (!isIndexed)
- tables.incrementMaxIndexValue();
-
- fiout.writeLowLevelAttributeValue(value);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/ForkXmlOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/ForkXmlOutput.java
deleted file mode 100644
index 507b27ac..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/ForkXmlOutput.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import java.io.IOException;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link XmlOutput} that writes to two {@link XmlOutput}s.
- * @author Kohsuke Kawaguchi
- */
-public final class ForkXmlOutput extends XmlOutputAbstractImpl {
- private final XmlOutput lhs;
- private final XmlOutput rhs;
-
- public ForkXmlOutput(XmlOutput lhs, XmlOutput rhs) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- @Override
- public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException {
- lhs.startDocument(serializer, fragment, nsUriIndex2prefixIndex, nsContext);
- rhs.startDocument(serializer, fragment, nsUriIndex2prefixIndex, nsContext);
- }
-
- @Override
- public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException {
- lhs.endDocument(fragment);
- rhs.endDocument(fragment);
- }
-
- @Override
- public void beginStartTag(Name name) throws IOException, XMLStreamException {
- lhs.beginStartTag(name);
- rhs.beginStartTag(name);
- }
-
- @Override
- public void attribute(Name name, String value) throws IOException, XMLStreamException {
- lhs.attribute(name, value);
- rhs.attribute(name, value);
- }
-
- @Override
- public void endTag(Name name) throws IOException, SAXException, XMLStreamException {
- lhs.endTag(name);
- rhs.endTag(name);
- }
-
- public void beginStartTag(int prefix, String localName) throws IOException, XMLStreamException {
- lhs.beginStartTag(prefix,localName);
- rhs.beginStartTag(prefix,localName);
- }
-
- public void attribute(int prefix, String localName, String value) throws IOException, XMLStreamException {
- lhs.attribute(prefix,localName,value);
- rhs.attribute(prefix,localName,value);
- }
-
- public void endStartTag() throws IOException, SAXException {
- lhs.endStartTag();
- rhs.endStartTag();
- }
-
- public void endTag(int prefix, String localName) throws IOException, SAXException, XMLStreamException {
- lhs.endTag(prefix,localName);
- rhs.endTag(prefix,localName);
- }
-
- public void text(String value, boolean needsSeparatingWhitespace) throws IOException, SAXException, XMLStreamException {
- lhs.text(value,needsSeparatingWhitespace);
- rhs.text(value,needsSeparatingWhitespace);
- }
-
- public void text(Pcdata value, boolean needsSeparatingWhitespace) throws IOException, SAXException, XMLStreamException {
- lhs.text(value,needsSeparatingWhitespace);
- rhs.text(value,needsSeparatingWhitespace);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/IndentingUTF8XmlOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/IndentingUTF8XmlOutput.java
deleted file mode 100644
index 1ec47f6d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/IndentingUTF8XmlOutput.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.v2.runtime.Name;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link UTF8XmlOutput} with indentation.
- *
- * TODO: not sure if it's a good idea to move the indenting functionality to another class.
- *
- * Doesn't have to be final, but it helps the JVM.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class IndentingUTF8XmlOutput extends UTF8XmlOutput {
-
- /**
- * Null if the writer should perform no indentation.
- *
- * Otherwise this will keep the 8 copies of the string for indentation.
- * (so that we can write 8 indentation at once.)
- */
- private final Encoded indent8;
-
- /**
- * Length of one indentation.
- */
- private final int unitLen;
-
- private int depth = 0;
-
- private boolean seenText = false;
-
- /**
- *
- * @param indentStr
- * set to null for no indentation and optimal performance.
- * otherwise the string is used for indentation.
- */
- public IndentingUTF8XmlOutput(OutputStream out, String indentStr, Encoded[] localNames, CharacterEscapeHandler escapeHandler) {
- super(out, localNames, escapeHandler);
-
- if(indentStr!=null) {
- Encoded e = new Encoded(indentStr);
- indent8 = new Encoded();
- indent8.ensureSize(e.len*8);
- unitLen = e.len;
- for( int i=0; i<8; i++ )
- System.arraycopy(e.buf, 0, indent8.buf, unitLen*i, unitLen);
- } else {
- this.indent8 = null;
- this.unitLen = 0;
- }
- }
-
- @Override
- public void beginStartTag(int prefix, String localName) throws IOException {
- indentStartTag();
- super.beginStartTag(prefix, localName);
- }
-
- @Override
- public void beginStartTag(Name name) throws IOException {
- indentStartTag();
- super.beginStartTag(name);
- }
-
- private void indentStartTag() throws IOException {
- closeStartTag();
- if(!seenText)
- printIndent();
- depth++;
- seenText = false;
- }
-
- @Override
- public void endTag(Name name) throws IOException {
- indentEndTag();
- super.endTag(name);
- }
-
- @Override
- public void endTag(int prefix, String localName) throws IOException {
- indentEndTag();
- super.endTag(prefix, localName);
- }
-
- private void indentEndTag() throws IOException {
- depth--;
- if(!closeStartTagPending && !seenText)
- printIndent();
- seenText = false;
- }
-
- private void printIndent() throws IOException {
- write('\n');
- int i = depth%8;
-
- write( indent8.buf, 0, i*unitLen );
-
- i>>=3; // really i /= 8;
-
- for( ; i>0; i-- )
- indent8.write(this);
- }
-
- @Override
- public void text(String value, boolean needSP) throws IOException {
- seenText = true;
- super.text(value, needSP);
- }
-
- @Override
- public void text(Pcdata value, boolean needSP) throws IOException {
- seenText = true;
- super.text(value, needSP);
- }
-
- @Override
- public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException {
- write('\n');
- super.endDocument(fragment);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/MTOMXmlOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/MTOMXmlOutput.java
deleted file mode 100644
index 404e2561..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/MTOMXmlOutput.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import java.io.IOException;
-
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link XmlOutput} decorator that supports MTOM.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class MTOMXmlOutput extends XmlOutputAbstractImpl {
-
- private final XmlOutput next;
-
- /**
- * Remembers the last namespace URI and local name so that we can pass them to
- * {@link AttachmentMarshaller}.
- */
- private String nsUri,localName;
-
- public MTOMXmlOutput(XmlOutput next) {
- this.next = next;
- }
-
- public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException {
- super.startDocument(serializer,fragment,nsUriIndex2prefixIndex, nsContext);
- next.startDocument(serializer, fragment, nsUriIndex2prefixIndex, nsContext);
- }
-
- public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException {
- next.endDocument(fragment);
- super.endDocument(fragment);
- }
-
- public void beginStartTag(Name name) throws IOException, XMLStreamException {
- next.beginStartTag(name);
- this.nsUri = name.nsUri;
- this.localName = name.localName;
- }
-
- public void beginStartTag(int prefix, String localName) throws IOException, XMLStreamException {
- next.beginStartTag(prefix, localName);
- this.nsUri = nsContext.getNamespaceURI(prefix);
- this.localName = localName;
- }
-
- public void attribute( Name name, String value ) throws IOException, XMLStreamException {
- next.attribute(name, value);
- }
-
- public void attribute( int prefix, String localName, String value ) throws IOException, XMLStreamException {
- next.attribute(prefix, localName, value);
- }
-
- public void endStartTag() throws IOException, SAXException {
- next.endStartTag();
- }
-
- public void endTag(Name name) throws IOException, SAXException, XMLStreamException {
- next.endTag(name);
- }
-
- public void endTag(int prefix, String localName) throws IOException, SAXException, XMLStreamException {
- next.endTag(prefix, localName);
- }
-
- public void text( String value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException {
- next.text(value,needsSeparatingWhitespace);
- }
-
- public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException {
- if(value instanceof Base64Data && !serializer.getInlineBinaryFlag()) {
- Base64Data b64d = (Base64Data) value;
- String cid;
- if(b64d.hasData())
- cid = serializer.attachmentMarshaller.addMtomAttachment(
- b64d.get(),0,b64d.getDataLen(),b64d.getMimeType(),nsUri,localName);
- else
- cid = serializer.attachmentMarshaller.addMtomAttachment(
- b64d.getDataHandler(),nsUri,localName);
-
- if(cid!=null) {
- nsContext.getCurrent().push();
- int prefix = nsContext.declareNsUri(WellKnownNamespace.XOP,"xop",false);
- beginStartTag(prefix,"Include");
- attribute(-1,"href",cid);
- endStartTag();
- endTag(prefix,"Include");
- nsContext.getCurrent().pop();
- return;
- }
- }
- next.text(value, needsSeparatingWhitespace);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/NamespaceContextImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/NamespaceContextImpl.java
deleted file mode 100644
index 4a191d86..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/NamespaceContextImpl.java
+++ /dev/null
@@ -1,559 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.Iterator;
-
-import javax.xml.XMLConstants;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.NamespaceContext2;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-import org.xml.sax.SAXException;
-
-/**
- * Keeps track of in-scope namespace bindings for the marshaller.
- *
- * <p>
- * This class is also used to keep track of tag names for each element
- * for the marshaller (for the performance reason.)
- *
- * @author Kohsuke Kawaguchi
- */
-public final class NamespaceContextImpl implements NamespaceContext2 {
- private final XMLSerializer owner;
-
- private String[] prefixes = new String[4];
- private String[] nsUris = new String[4];
-// /**
-// * True if the correponding namespace declaration is an authentic one that should be printed.
-// *
-// * False if it's a re-discovered in-scope namespace binding available at the ancestor elements
-// * outside this marhsalling. The false value is used to incorporate the in-scope namespace binding
-// * information from {@link #inscopeNamespaceContext}. When false, such a declaration does not need
-// * to be printed, as it's already available in ancestors.
-// */
-// private boolean[] visible = new boolean[4];
-//
-// /**
-// * {@link NamespaceContext} that informs this {@link XMLSerializer} about the
-// * in-scope namespace bindings of the ancestor elements outside this marshalling.
-// *
-// * <p>
-// * This is used when the marshaller is marshalling into a subtree that has ancestor
-// * elements created outside the JAXB marshaller.
-// *
-// * Its {@link NamespaceContext#getPrefix(String)} is used to discover in-scope namespace
-// * binding,
-// */
-// private final NamespaceContext inscopeNamespaceContext;
-
- /**
- * Number of URIs declared. Identifies the valid portion of
- * the {@link #prefixes} and {@link #nsUris} arrays.
- */
- private int size;
-
- private Element current;
-
- /**
- * This is the {@link Element} whose prev==null.
- * This element is used to hold the contextual namespace bindings
- * that are assumed to be outside of the document we are marshalling.
- * Specifically the xml prefix and any other user-specified bindings.
- *
- * @see NamespacePrefixMapper#getPreDeclaredNamespaceUris()
- */
- private final Element top;
-
- /**
- * Never null.
- */
- private NamespacePrefixMapper prefixMapper = defaultNamespacePrefixMapper;
-
- /**
- * True to allow new URIs to be declared. False otherwise.
- */
- public boolean collectionMode;
-
-
- public NamespaceContextImpl(XMLSerializer owner) {
- this.owner = owner;
-
- current = top = new Element(this,null);
- // register namespace URIs that are implicitly bound
- put(XMLConstants.XML_NS_URI,XMLConstants.XML_NS_PREFIX);
- }
-
- public void setPrefixMapper( NamespacePrefixMapper mapper ) {
- if(mapper==null)
- mapper = defaultNamespacePrefixMapper;
- this.prefixMapper = mapper;
- }
-
- public NamespacePrefixMapper getPrefixMapper() {
- return prefixMapper;
- }
-
- public void reset() {
- current = top;
- size = 1;
- collectionMode = false;
- }
-
- /**
- * Returns the prefix index to the specified URI.
- * This method allocates a new URI if necessary.
- */
- public int declareNsUri( String uri, String preferedPrefix, boolean requirePrefix ) {
- preferedPrefix = prefixMapper.getPreferredPrefix(uri,preferedPrefix,requirePrefix);
-
- if(uri.length()==0) {
- for( int i=size-1; i>=0; i-- ) {
- if(nsUris[i].length()==0)
- return i; // already declared
- if(prefixes[i].length()==0) {
- // the default prefix is already taken.
- // move that URI to another prefix, then assign "" to the default prefix.
- assert current.defaultPrefixIndex==-1 && current.oldDefaultNamespaceUriIndex==-1;
-
- String oldUri = nsUris[i];
- String[] knownURIs = owner.nameList.namespaceURIs;
-
- if(current.baseIndex<=i) {
- // this default prefix is declared in this context. just reassign it
-
- nsUris[i] = "";
-
- int subst = put(oldUri,null);
-
- // update uri->prefix table if necessary
- for( int j=knownURIs.length-1; j>=0; j-- ) {
- if(knownURIs[j].equals(oldUri)) {
- owner.knownUri2prefixIndexMap[j] = subst;
- break;
- }
- }
- if (current.elementLocalName != null) {
- current.setTagName(subst, current.elementLocalName, current.getOuterPeer());
- }
- return i;
- } else {
- // first, if the previous URI assigned to "" is
- // a "known URI", remember what we've reallocated
- // so that we can fix it when this context pops.
- for( int j=knownURIs.length-1; j>=0; j-- ) {
- if(knownURIs[j].equals(oldUri)) {
- current.defaultPrefixIndex = i;
- current.oldDefaultNamespaceUriIndex = j;
- // assert commented out; too strict/not valid any more
- // assert owner.knownUri2prefixIndexMap[j]==current.defaultPrefixIndex;
- // update the table to point to the prefix we'll declare
- owner.knownUri2prefixIndexMap[j] = size;
- break;
- }
- }
- if (current.elementLocalName!=null) {
- current.setTagName(size, current.elementLocalName, current.getOuterPeer());
- }
-
- put(nsUris[i],null);
- return put("", "");
- }
- }
- }
-
- // "" isn't in use
- return put("", "");
- } else {
- // check for the existing binding
- for( int i=size-1; i>=0; i-- ) {
- String p = prefixes[i];
- if(nsUris[i].equals(uri)) {
- if (!requirePrefix || p.length()>0)
- return i;
- // declared but this URI is bound to empty. Look further
- }
- if(p.equals(preferedPrefix)) {
- // the suggested prefix is already taken. can't use it
- preferedPrefix = null;
- }
- }
-
- if(preferedPrefix==null && requirePrefix)
- // we know we can't bind to "", but we don't have any possible name at hand.
- // generate it here to avoid this namespace to be bound to "".
- preferedPrefix = makeUniquePrefix();
-
- // haven't been declared. allocate a new one
- // if the preferred prefix is already in use, it should have been set to null by this time
- return put(uri, preferedPrefix);
- }
- }
-
- public int force(@NotNull String uri, @NotNull String prefix) {
- // check for the existing binding
-
- for( int i=size-1; i>=0; i-- ) {
- if(prefixes[i].equals(prefix)) {
- if(nsUris[i].equals(uri))
- return i; // found duplicate
- else
- // the prefix is used for another namespace. we need to declare it
- break;
- }
- }
-
- return put(uri, prefix);
- }
-
- /**
- * Puts this new binding into the declared prefixes list
- * without doing any duplicate check.
- *
- * This can be used to forcibly set namespace declarations.
- *
- * <p>
- * Most of the time {@link #declareNamespace(String, String, boolean)} shall be used.
- *
- * @return
- * the index of this new binding.
- */
- public int put(@NotNull String uri, @Nullable String prefix) {
- if(size==nsUris.length) {
- // reallocate
- String[] u = new String[nsUris.length*2];
- String[] p = new String[prefixes.length*2];
- System.arraycopy(nsUris,0,u,0,nsUris.length);
- System.arraycopy(prefixes,0,p,0,prefixes.length);
- nsUris = u;
- prefixes = p;
- }
- if(prefix==null) {
- if(size==1)
- prefix = ""; // if this is the first user namespace URI we see, use "".
- else {
- // otherwise make up an unique name
- prefix = makeUniquePrefix();
- }
- }
- nsUris[size] = uri;
- prefixes[size] = prefix;
-
- return size++;
- }
-
- private String makeUniquePrefix() {
- String prefix;
- prefix = new StringBuilder(5).append("ns").append(size).toString();
- while(getNamespaceURI(prefix)!=null) {
- prefix += '_'; // under a rare circumstance there might be existing 'nsNNN', so rename them
- }
- return prefix;
- }
-
-
- public Element getCurrent() {
- return current;
- }
-
- /**
- * Returns the prefix index of the specified URI.
- * It is an error if the URI is not declared.
- */
- public int getPrefixIndex( String uri ) {
- for( int i=size-1; i>=0; i-- ) {
- if(nsUris[i].equals(uri))
- return i;
- }
- throw new IllegalStateException();
- }
-
- /**
- * Gets the prefix from a prefix index.
- *
- * The behavior is undefined if the index is out of range.
- */
- public String getPrefix(int prefixIndex) {
- return prefixes[prefixIndex];
- }
-
- public String getNamespaceURI(int prefixIndex) {
- return nsUris[prefixIndex];
- }
-
- /**
- * Gets the namespace URI that is bound to the specified prefix.
- *
- * @return null
- * if the prefix is unbound.
- */
- public String getNamespaceURI(String prefix) {
- for( int i=size-1; i>=0; i-- )
- if(prefixes[i].equals(prefix))
- return nsUris[i];
- return null;
- }
-
- /**
- * Returns the prefix of the specified URI,
- * or null if none exists.
- */
- public String getPrefix( String uri ) {
- if(collectionMode) {
- return declareNamespace(uri,null,false);
- } else {
- for( int i=size-1; i>=0; i-- )
- if(nsUris[i].equals(uri))
- return prefixes[i];
- return null;
- }
- }
-
- public Iterator<String> getPrefixes(String uri) {
- String prefix = getPrefix(uri);
- if(prefix==null)
- return Collections.<String>emptySet().iterator();
- else
- return Collections.singleton(uri).iterator();
- }
-
- public String declareNamespace(String namespaceUri, String preferedPrefix, boolean requirePrefix) {
- int idx = declareNsUri(namespaceUri,preferedPrefix,requirePrefix);
- return getPrefix(idx);
- }
-
- /**
- * Number of total bindings declared.
- */
- public int count() {
- return size;
- }
-
-
- /**
- * This model of namespace declarations maintain the following invariants.
- *
- * <ul>
- * <li>If a non-empty prefix is declared, it will never be reassigned to different namespace URIs.
- * <li>
- */
- public final class Element {
-
- public final NamespaceContextImpl context;
-
- /**
- * {@link Element}s form a doubly-linked list.
- */
- private final Element prev;
- private Element next;
-
- private int oldDefaultNamespaceUriIndex;
- private int defaultPrefixIndex;
-
-
- /**
- * The numbe of prefixes declared by ancestor {@link Element}s.
- */
- private int baseIndex;
-
- /**
- * The depth of the {@link Element}.
- *
- * This value is equivalent as the result of the following computation.
- *
- * <pre>
- * int depth() {
- * int i=-1;
- * for(Element e=this; e!=null;e=e.prev)
- * i++;
- * return i;
- * }
- * </pre>
- */
- private final int depth;
-
-
-
- private int elementNamePrefix;
- private String elementLocalName;
-
- /**
- * Tag name of this element.
- * Either this field is used or the {@link #elementNamePrefix} and {@link #elementLocalName} pair.
- */
- private Name elementName;
-
- /**
- * Used for the binder. The JAXB object that corresponds to this element.
- */
- private Object outerPeer;
- private Object innerPeer;
-
-
- private Element(NamespaceContextImpl context,Element prev) {
- this.context = context;
- this.prev = prev;
- this.depth = (prev==null) ? 0 : prev.depth+1;
- }
-
- /**
- * Returns true if this {@link Element} represents the root element that
- * we are marshalling.
- */
- public boolean isRootElement() {
- return depth==1;
- }
-
- public Element push() {
- if(next==null)
- next = new Element(context,this);
- next.onPushed();
- return next;
- }
-
- public Element pop() {
- if(oldDefaultNamespaceUriIndex>=0) {
- // restore the old default namespace URI binding
- context.owner.knownUri2prefixIndexMap[oldDefaultNamespaceUriIndex] = defaultPrefixIndex;
- }
- context.size = baseIndex;
- context.current = prev;
- // release references to user objects
- outerPeer = innerPeer = null;
- return prev;
- }
-
- private void onPushed() {
- oldDefaultNamespaceUriIndex = defaultPrefixIndex = -1;
- baseIndex = context.size;
- context.current = this;
- }
-
- public void setTagName( int prefix, String localName, Object outerPeer ) {
- assert localName!=null;
- this.elementNamePrefix = prefix;
- this.elementLocalName = localName;
- this.elementName = null;
- this.outerPeer = outerPeer;
- }
-
- public void setTagName( Name tagName, Object outerPeer ) {
- assert tagName!=null;
- this.elementName = tagName;
- this.outerPeer = outerPeer;
- }
-
- public void startElement(XmlOutput out, Object innerPeer) throws IOException, XMLStreamException {
- this.innerPeer = innerPeer;
- if(elementName!=null) {
- out.beginStartTag(elementName);
- } else {
- out.beginStartTag(elementNamePrefix,elementLocalName);
- }
- }
-
- public void endElement(XmlOutput out) throws IOException, SAXException, XMLStreamException {
- if(elementName!=null) {
- out.endTag(elementName);
- elementName = null;
- } else {
- out.endTag(elementNamePrefix,elementLocalName);
- }
- }
-
- /**
- * Gets the number of bindings declared on this element.
- */
- public final int count() {
- return context.size-baseIndex;
- }
-
- /**
- * Gets the prefix declared in this context.
- *
- * @param idx
- * between 0 and {@link #count()}
- */
- public final String getPrefix(int idx) {
- return context.prefixes[baseIndex+idx];
- }
-
- /**
- * Gets the namespace URI declared in this context.
- *
- * @param idx
- * between 0 and {@link #count()}
- */
- public final String getNsUri(int idx) {
- return context.nsUris[baseIndex+idx];
- }
-
- public int getBase() {
- return baseIndex;
- }
-
- public Object getOuterPeer() {
- return outerPeer;
- }
-
- public Object getInnerPeer() {
- return innerPeer;
- }
-
- /**
- * Gets the parent {@link Element}.
- */
- public Element getParent() {
- return prev;
- }
- }
-
-
- /**
- * Default {@link NamespacePrefixMapper} implementation used when
- * it is not specified by the user.
- */
- private static final NamespacePrefixMapper defaultNamespacePrefixMapper = new NamespacePrefixMapper() {
- public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) {
- if( namespaceUri.equals(WellKnownNamespace.XML_SCHEMA_INSTANCE) )
- return "xsi";
- if( namespaceUri.equals(WellKnownNamespace.XML_SCHEMA) )
- return "xs";
- if( namespaceUri.equals(WellKnownNamespace.XML_MIME_URI) )
- return "xmime";
- return suggestion;
- }
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/Pcdata.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/Pcdata.java
deleted file mode 100644
index 43e69a3d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/Pcdata.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import java.io.IOException;
-
-/**
- * Text data in XML.
- *
- * <p>
- * This class is used inside the marshaller/unmarshaller to
- * send/receive text data.
- *
- * <p>
- * On top of {@link CharSequence}, this class has an
- * ability to write itself to the {@link XmlOutput}. This allows
- * the implementation to choose the most efficient way possible
- * when writing to XML (for example, it can skip the escaping
- * of buffer copying.)
- *
- * TODO: visitor pattern support?
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class Pcdata implements CharSequence {
-
- /**
- * Writes itself to {@link UTF8XmlOutput}.
- *
- * <p>
- * This is the most performance critical path for the marshaller,
- * so it warrants its own method.
- */
- public abstract void writeTo(UTF8XmlOutput output) throws IOException;
-
- /**
- * Writes itself to the character array.
- *
- * <p>
- * This method is used by most other {@link XmlOutput}.
- * The default implementation involves in one extra char[] copying.
- *
- * <p>
- * The caller must provide a big enough buffer that can hold
- * enough characters returned by the {@link #length()} method.
- */
- public void writeTo(char[] buf, int start) {
- toString().getChars(0,length(),buf,start);
- }
-
- public abstract String toString();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/SAXOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/SAXOutput.java
deleted file mode 100644
index 9436b270..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/SAXOutput.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import java.io.IOException;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.util.AttributesImpl;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.LocatorImpl;
-
-/**
- * {@link XmlOutput} implementation that writes to SAX {@link ContentHandler}.
- *
- * @author Kohsuke Kawaguchi
- */
-public class SAXOutput extends XmlOutputAbstractImpl {
- protected final ContentHandler out;
-
- public SAXOutput(ContentHandler out) {
- this.out = out;
- out.setDocumentLocator(new LocatorImpl());
- }
-
- private String elementNsUri,elementLocalName,elementQName;
-
- private char[] buf = new char[256];
-
- private final AttributesImpl atts = new AttributesImpl();
-
-
- // not called if we are generating fragments
- @Override
- public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws SAXException, IOException, XMLStreamException {
- super.startDocument(serializer, fragment,nsUriIndex2prefixIndex,nsContext);
- if(!fragment)
- out.startDocument();
- }
-
- public void endDocument(boolean fragment) throws SAXException, IOException, XMLStreamException {
- if(!fragment)
- out.endDocument();
- super.endDocument(fragment);
- }
-
- public void beginStartTag(int prefix, String localName) {
- elementNsUri = nsContext.getNamespaceURI(prefix);
- elementLocalName = localName;
- elementQName = getQName(prefix,localName);
- atts.clear();
- }
-
- public void attribute(int prefix, String localName, String value) {
- String qname;
- String nsUri;
- if(prefix==-1) {
- nsUri = "";
- qname = localName;
- } else {
- nsUri = nsContext.getNamespaceURI(prefix);
- String p = nsContext.getPrefix(prefix);
- if(p.length()==0)
- // this is more likely a bug in the application code (NamespacePrefixMapper implementation)
- // this only happens when it tries to assign "" prefix to a non-"" URI,
- // which is by itself violation of namespace rec. But let's just be safe.
- // See http://forums.java.net/jive/thread.jspa?messageID=212598#212598
- qname = localName;
- else
- qname = p +':'+localName;
- }
- atts.addAttribute( nsUri, localName, qname, "CDATA", value );
- }
-
- public void endStartTag() throws SAXException {
- NamespaceContextImpl.Element ns = nsContext.getCurrent();
- if(ns!=null) {
- int sz = ns.count();
- for( int i=0; i<sz; i++ ) {
- String p = ns.getPrefix(i);
- String uri = ns.getNsUri(i);
- if(uri.length()==0 && ns.getBase()==1)
- continue; // no point in defining xmlns='' on the root
- out.startPrefixMapping(p,uri);
- }
- }
- out.startElement(elementNsUri,elementLocalName,elementQName,atts);
- }
-
- public void endTag(int prefix, String localName) throws SAXException {
- out.endElement(
- nsContext.getNamespaceURI(prefix),
- localName,
- getQName(prefix, localName)
- );
-
- NamespaceContextImpl.Element ns = nsContext.getCurrent();
- if(ns!=null) {
- int sz = ns.count();
- for( int i=sz-1; i>=0; i-- ) {
- String p = ns.getPrefix(i);
- String uri = ns.getNsUri(i);
- if(uri.length()==0 && ns.getBase()==1)
- continue; // no point in definint xmlns='' on the root
- out.endPrefixMapping(p);
- }
- }
- }
-
- private String getQName(int prefix, String localName) {
- String qname;
- String p = nsContext.getPrefix(prefix);
- if(p.length()==0)
- qname = localName;
- else
- qname = p+':'+localName;
- return qname;
- }
-
- public void text(String value, boolean needsSP) throws IOException, SAXException, XMLStreamException {
- int vlen = value.length();
- if(buf.length<=vlen) {
- buf = new char[Math.max(buf.length*2,vlen+1)];
- }
- if(needsSP) {
- value.getChars(0,vlen,buf,1);
- buf[0] = ' ';
- } else {
- value.getChars(0,vlen,buf,0);
- }
- out.characters(buf,0,vlen+(needsSP?1:0));
- }
-
- public void text(Pcdata value, boolean needsSP) throws IOException, SAXException, XMLStreamException {
- int vlen = value.length();
- if(buf.length<=vlen) {
- buf = new char[Math.max(buf.length*2,vlen+1)];
- }
- if(needsSP) {
- value.writeTo(buf,1);
- buf[0] = ' ';
- } else {
- value.writeTo(buf,0);
- }
- out.characters(buf,0,vlen+(needsSP?1:0));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/SecureLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/SecureLoader.java
deleted file mode 100644
index 7c679da2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/SecureLoader.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-/**
- * Class defined for safe calls of getClassLoader methods of any kind (context/system/class
- * classloader. This MUST be package private and defined in every package which
- * uses such invocations.
- * @author snajper
- */
-class SecureLoader {
-
- static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/StAXExStreamWriterOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/StAXExStreamWriterOutput.java
deleted file mode 100644
index 5d304084..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/StAXExStreamWriterOutput.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data;
-
-import com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx;
-
-/**
- * {@link XmlOutput} for {@link XMLStreamWriterEx}.
- *
- * @author Paul Sandoz.
- */
-public final class StAXExStreamWriterOutput extends XMLStreamWriterOutput {
- private final XMLStreamWriterEx out;
-
- public StAXExStreamWriterOutput(XMLStreamWriterEx out) {
- super(out);
- this.out = out;
- }
-
- public void text(Pcdata value, boolean needsSeparatingWhitespace) throws XMLStreamException {
- if(needsSeparatingWhitespace) {
- out.writeCharacters(" ");
- }
-
- if (!(value instanceof Base64Data)) {
- out.writeCharacters(value.toString());
- } else {
- Base64Data v = (Base64Data)value;
- out.writeBinary(v.getDataHandler());
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/UTF8XmlOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/UTF8XmlOutput.java
deleted file mode 100644
index e549b68c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/UTF8XmlOutput.java
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import java.io.StringWriter;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.MarshallerImpl;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link XmlOutput} implementation specialized for UTF-8.
- *
- * @author Kohsuke Kawaguchi
- * @author Paul Sandoz
- */
-public class UTF8XmlOutput extends XmlOutputAbstractImpl {
- protected final OutputStream out;
-
- /** prefixes encoded. */
- private Encoded[] prefixes = new Encoded[8];
-
- /**
- * Of the {@link #prefixes}, number of filled entries.
- * This is almost the same as {@link NamespaceContextImpl#count()},
- * except that it allows us to handle contextual in-scope namespace bindings correctly.
- */
- private int prefixCount;
-
- /** local names encoded in UTF-8. All entries are pre-filled. */
- private final Encoded[] localNames;
-
- /** Temporary buffer used to encode text. */
- /*
- * TODO
- * The textBuffer could write directly to the _octetBuffer
- * when encoding a string if Encoder is modified.
- * This will avoid an additional memory copy.
- */
- private final Encoded textBuffer = new Encoded();
-
- /** Buffer of octets for writing. */
- // TODO: Obtain buffer size from property on the JAXB context
- protected final byte[] octetBuffer = new byte[1024];
-
- /** Index in buffer to write to. */
- protected int octetBufferIndex;
-
- /**
- * Set to true to indicate that we need to write '>'
- * to close a start tag. Deferring the write of this char
- * allows us to write "/>" for empty elements.
- */
- protected boolean closeStartTagPending = false;
-
- /**
- * @see MarshallerImpl#header
- */
- private String header;
-
- private CharacterEscapeHandler escapeHandler = null;
-
- /**
- *
- * @param localNames
- * local names encoded in UTF-8.
- */
- public UTF8XmlOutput(OutputStream out, Encoded[] localNames, CharacterEscapeHandler escapeHandler) {
- this.out = out;
- this.localNames = localNames;
- for( int i=0; i<prefixes.length; i++ )
- prefixes[i] = new Encoded();
- this.escapeHandler = escapeHandler;
- }
-
- public void setHeader(String header) {
- this.header = header;
- }
-
- @Override
- public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException {
- super.startDocument(serializer, fragment,nsUriIndex2prefixIndex,nsContext);
-
- octetBufferIndex = 0;
- if(!fragment) {
- write(XML_DECL);
- }
- if(header!=null) {
- textBuffer.set(header);
- textBuffer.write(this);
- }
- }
-
- @Override
- public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException {
- flushBuffer();
- super.endDocument(fragment);
- }
-
- /**
- * Writes '>' to close the start tag, if necessary.
- */
- protected final void closeStartTag() throws IOException {
- if(closeStartTagPending) {
- write('>');
- closeStartTagPending = false;
- }
- }
-
- public void beginStartTag(int prefix, String localName) throws IOException {
- closeStartTag();
- int base= pushNsDecls();
- write('<');
- writeName(prefix,localName);
- writeNsDecls(base);
- }
-
- @Override
- public void beginStartTag(Name name) throws IOException {
- closeStartTag();
- int base = pushNsDecls();
- write('<');
- writeName(name);
- writeNsDecls(base);
- }
-
- private int pushNsDecls() {
- int total = nsContext.count();
- NamespaceContextImpl.Element ns = nsContext.getCurrent();
-
- if(total > prefixes.length) {
- // reallocate
- int m = Math.max(total,prefixes.length*2);
- Encoded[] buf = new Encoded[m];
- System.arraycopy(prefixes,0,buf,0,prefixes.length);
- for( int i=prefixes.length; i<buf.length; i++ )
- buf[i] = new Encoded();
- prefixes = buf;
- }
-
- int base = Math.min(prefixCount,ns.getBase());
- int size = nsContext.count();
- for( int i=base; i<size; i++ ) {
- String p = nsContext.getPrefix(i);
-
- Encoded e = prefixes[i];
-
- if(p.length()==0) {
- e.buf = EMPTY_BYTE_ARRAY;
- e.len = 0;
- } else {
- e.set(p);
- e.append(':');
- }
- }
- prefixCount = size;
- return base;
- }
-
- protected void writeNsDecls(int base) throws IOException {
- NamespaceContextImpl.Element ns = nsContext.getCurrent();
- int size = nsContext.count();
-
- for( int i=ns.getBase(); i<size; i++ )
- writeNsDecl(i);
- }
-
- /**
- * Writes a single namespace declaration for the specified prefix.
- */
- protected final void writeNsDecl(int prefixIndex) throws IOException {
- String p = nsContext.getPrefix(prefixIndex);
-
- if(p.length()==0) {
- if(nsContext.getCurrent().isRootElement()
- && nsContext.getNamespaceURI(prefixIndex).length()==0)
- return; // no point in declaring xmlns="" on the root element
- write(XMLNS_EQUALS);
- } else {
- Encoded e = prefixes[prefixIndex];
- write(XMLNS_COLON);
- write(e.buf,0,e.len-1); // skip the trailing ':'
- write(EQUALS);
- }
- doText(nsContext.getNamespaceURI(prefixIndex),true);
- write('\"');
- }
-
- private void writePrefix(int prefix) throws IOException {
- prefixes[prefix].write(this);
- }
-
- private void writeName(Name name) throws IOException {
- writePrefix(nsUriIndex2prefixIndex[name.nsUriIndex]);
- localNames[name.localNameIndex].write(this);
- }
-
- private void writeName(int prefix, String localName) throws IOException {
- writePrefix(prefix);
- textBuffer.set(localName);
- textBuffer.write(this);
- }
-
- @Override
- public void attribute(Name name, String value) throws IOException {
- write(' ');
- if(name.nsUriIndex==-1) {
- localNames[name.localNameIndex].write(this);
- } else
- writeName(name);
- write(EQUALS);
- doText(value,true);
- write('\"');
- }
-
- public void attribute(int prefix, String localName, String value) throws IOException {
- write(' ');
- if(prefix==-1) {
- textBuffer.set(localName);
- textBuffer.write(this);
- } else
- writeName(prefix,localName);
- write(EQUALS);
- doText(value,true);
- write('\"');
- }
-
- public void endStartTag() throws IOException {
- closeStartTagPending = true;
- }
-
- @Override
- public void endTag(Name name) throws IOException {
- if(closeStartTagPending) {
- write(EMPTY_TAG);
- closeStartTagPending = false;
- } else {
- write(CLOSE_TAG);
- writeName(name);
- write('>');
- }
- }
-
- public void endTag(int prefix, String localName) throws IOException {
- if(closeStartTagPending) {
- write(EMPTY_TAG);
- closeStartTagPending = false;
- } else {
- write(CLOSE_TAG);
- writeName(prefix,localName);
- write('>');
- }
- }
-
- public void text(String value, boolean needSP) throws IOException {
- closeStartTag();
- if(needSP)
- write(' ');
- doText(value,false);
- }
-
- public void text(Pcdata value, boolean needSP) throws IOException {
- closeStartTag();
- if(needSP)
- write(' ');
- value.writeTo(this);
- }
-
- private void doText(String value,boolean isAttribute) throws IOException {
- if (escapeHandler != null) {
- StringWriter sw = new StringWriter();
- escapeHandler.escape(value.toCharArray(), 0, value.length(), isAttribute, sw);
- textBuffer.set(sw.toString());
- } else {
- textBuffer.setEscape(value, isAttribute);
- }
- textBuffer.write(this);
- }
-
- public final void text(int value) throws IOException {
- closeStartTag();
- /*
- * TODO
- * Change to use the octet buffer directly
- */
-
- // max is -2147483648 and 11 digits
- boolean minus = (value<0);
- textBuffer.ensureSize(11);
- byte[] buf = textBuffer.buf;
- int idx = 11;
-
- do {
- int r = value%10;
- if(r<0) r = -r;
- buf[--idx] = (byte)('0'|r); // really measn 0x30+r but 0<=r<10, so bit-OR would do.
- value /= 10;
- } while(value!=0);
-
- if(minus) buf[--idx] = (byte)'-';
-
- write(buf,idx,11-idx);
- }
-
- /**
- * Writes the given byte[] as base64 encoded binary to the output.
- *
- * <p>
- * Being defined on this class allows this method to access the buffer directly,
- * which translates to a better performance.
- */
- public void text(byte[] data, int dataLen) throws IOException {
- closeStartTag();
-
- int start = 0;
-
- while(dataLen>0) {
- // how many bytes (in data) can we write without overflowing the buffer?
- int batchSize = Math.min(((octetBuffer.length-octetBufferIndex)/4)*3,dataLen);
-
- // write the batch
- octetBufferIndex = DatatypeConverterImpl._printBase64Binary(data,start,batchSize,octetBuffer,octetBufferIndex);
-
- if(batchSize<dataLen)
- flushBuffer();
-
- start += batchSize;
- dataLen -= batchSize;
-
- }
- }
-
-//
-//
-// series of the write method that places bytes to the output
-// (by doing some buffering internal to this class)
-//
-
- /**
- * Writes one byte directly into the buffer.
- *
- * <p>
- * This method can be used somewhat like the {@code text} method,
- * but it doesn't perform character escaping.
- */
- public final void write(int i) throws IOException {
- if (octetBufferIndex < octetBuffer.length) {
- octetBuffer[octetBufferIndex++] = (byte)i;
- } else {
- out.write(octetBuffer);
- octetBufferIndex = 1;
- octetBuffer[0] = (byte)i;
- }
- }
-
- protected final void write(byte[] b) throws IOException {
- write(b, 0, b.length);
- }
-
- protected final void write(byte[] b, int start, int length) throws IOException {
- if ((octetBufferIndex + length) < octetBuffer.length) {
- System.arraycopy(b, start, octetBuffer, octetBufferIndex, length);
- octetBufferIndex += length;
- } else {
- out.write(octetBuffer, 0, octetBufferIndex);
- out.write(b, start, length);
- octetBufferIndex = 0;
- }
- }
-
- protected final void flushBuffer() throws IOException {
- out.write(octetBuffer, 0, octetBufferIndex);
- octetBufferIndex = 0;
- }
-
- static byte[] toBytes(String s) {
- byte[] buf = new byte[s.length()];
- for( int i=s.length()-1; i>=0; i-- )
- buf[i] = (byte)s.charAt(i);
- return buf;
- }
-
- // per instance copy to prevent an attack where malicious OutputStream
- // rewrites the byte array.
- private final byte[] XMLNS_EQUALS = _XMLNS_EQUALS.clone();
- private final byte[] XMLNS_COLON = _XMLNS_COLON.clone();
- private final byte[] EQUALS = _EQUALS.clone();
- private final byte[] CLOSE_TAG = _CLOSE_TAG.clone();
- private final byte[] EMPTY_TAG = _EMPTY_TAG.clone();
- private final byte[] XML_DECL = _XML_DECL.clone();
-
- // masters
- private static final byte[] _XMLNS_EQUALS = toBytes(" xmlns=\"");
- private static final byte[] _XMLNS_COLON = toBytes(" xmlns:");
- private static final byte[] _EQUALS = toBytes("=\"");
- private static final byte[] _CLOSE_TAG = toBytes("</");
- private static final byte[] _EMPTY_TAG = toBytes("/>");
- private static final byte[] _XML_DECL = toBytes("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
-
- // no need to copy
- private static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XMLEventWriterOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XMLEventWriterOutput.java
deleted file mode 100644
index 9a2b7c2f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XMLEventWriterOutput.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import java.io.IOException;
-
-import javax.xml.stream.XMLEventFactory;
-import javax.xml.stream.XMLEventWriter;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.events.Attribute;
-import javax.xml.stream.events.Characters;
-
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link XmlOutput} that writes to StAX {@link XMLEventWriter}.
- *
- * @author Kohsuke Kawaguchi
- */
-public class XMLEventWriterOutput extends XmlOutputAbstractImpl {
- private final XMLEventWriter out;
- private final XMLEventFactory ef;
-
- /** One whitespace. */
- private final Characters sp;
-
- public XMLEventWriterOutput(XMLEventWriter out) {
- this.out = out;
- ef = XMLEventFactory.newInstance();
- sp = ef.createCharacters(" ");
- }
-
- // not called if we are generating fragments
- @Override
- public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException {
- super.startDocument(serializer, fragment,nsUriIndex2prefixIndex,nsContext);
- if(!fragment)
- out.add(ef.createStartDocument());
- }
-
- public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException {
- if(!fragment) {
- out.add(ef.createEndDocument());
- out.flush();
- }
- super.endDocument(fragment);
- }
-
- public void beginStartTag(int prefix, String localName) throws IOException, XMLStreamException {
- out.add(
- ef.createStartElement(
- nsContext.getPrefix(prefix),
- nsContext.getNamespaceURI(prefix),
- localName));
-
- NamespaceContextImpl.Element nse = nsContext.getCurrent();
- if(nse.count()>0) {
- for( int i=nse.count()-1; i>=0; i-- ) {
- String uri = nse.getNsUri(i);
- if(uri.length()==0 && nse.getBase()==1)
- continue; // no point in definint xmlns='' on the root
- out.add(ef.createNamespace(nse.getPrefix(i),uri));
- }
- }
- }
-
- public void attribute(int prefix, String localName, String value) throws IOException, XMLStreamException {
- Attribute att;
- if(prefix==-1)
- att = ef.createAttribute(localName,value);
- else
- att = ef.createAttribute(
- nsContext.getPrefix(prefix),
- nsContext.getNamespaceURI(prefix),
- localName, value);
-
- out.add(att);
- }
-
- public void endStartTag() throws IOException, SAXException {
- // noop
- }
-
- public void endTag(int prefix, String localName) throws IOException, SAXException, XMLStreamException {
- out.add(
- ef.createEndElement(
- nsContext.getPrefix(prefix),
- nsContext.getNamespaceURI(prefix),
- localName));
- }
-
- public void text(String value, boolean needsSeparatingWhitespace) throws IOException, SAXException, XMLStreamException {
- if(needsSeparatingWhitespace)
- out.add(sp);
- out.add(ef.createCharacters(value));
- }
-
- public void text(Pcdata value, boolean needsSeparatingWhitespace) throws IOException, SAXException, XMLStreamException {
- text(value.toString(),needsSeparatingWhitespace);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XMLStreamWriterOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XMLStreamWriterOutput.java
deleted file mode 100644
index c4721fd5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XMLStreamWriterOutput.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.output;
-
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl;
-import org.xml.sax.SAXException;
-
-/**
- * {@link XmlOutput} that writes to StAX {@link XMLStreamWriter}.
- * <p>
- * TODO:
- * Finding the optimized FI implementations is a bit hacky and not very
- * extensible. Can we use the service provider mechanism in general for
- * concrete implementations of XmlOutputAbstractImpl.
- *
- * @author Kohsuke Kawaguchi
- */
-public class XMLStreamWriterOutput extends XmlOutputAbstractImpl {
-
- /**
- * Creates a new {@link XmlOutput} from a {@link XMLStreamWriter}.
- * This method recognizes an FI StAX writer.
- */
- public static XmlOutput create(XMLStreamWriter out, JAXBContextImpl context) {
- // try optimized path
- final Class writerClass = out.getClass();
- if (writerClass==FI_STAX_WRITER_CLASS) {
- try {
- return FI_OUTPUT_CTOR.newInstance(out, context);
- } catch (Exception e) {
- }
- }
- if (STAXEX_WRITER_CLASS!=null && STAXEX_WRITER_CLASS.isAssignableFrom(writerClass)) {
- try {
- return STAXEX_OUTPUT_CTOR.newInstance(out);
- } catch (Exception e) {
- }
- }
-
- // otherwise the normal writer.
- return new XMLStreamWriterOutput(out);
- }
-
-
- private final XMLStreamWriter out;
-
- protected final char[] buf = new char[256];
-
- protected XMLStreamWriterOutput(XMLStreamWriter out) {
- this.out = out;
- }
-
- // not called if we are generating fragments
- @Override
- public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException {
- super.startDocument(serializer, fragment,nsUriIndex2prefixIndex,nsContext);
- if(!fragment)
- out.writeStartDocument();
- }
-
- @Override
- public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException {
- if(!fragment) {
- out.writeEndDocument();
- out.flush();
- }
- super.endDocument(fragment);
- }
-
- public void beginStartTag(int prefix, String localName) throws IOException, XMLStreamException {
- out.writeStartElement(
- nsContext.getPrefix(prefix),
- localName,
- nsContext.getNamespaceURI(prefix));
-
- NamespaceContextImpl.Element nse = nsContext.getCurrent();
- if(nse.count()>0) {
- for( int i=nse.count()-1; i>=0; i-- ) {
- String uri = nse.getNsUri(i);
- if(uri.length()==0 && nse.getBase()==1)
- continue; // no point in definint xmlns='' on the root
- out.writeNamespace(nse.getPrefix(i),uri);
- }
- }
- }
-
- public void attribute(int prefix, String localName, String value) throws IOException, XMLStreamException {
- if(prefix==-1)
- out.writeAttribute(localName,value);
- else
- out.writeAttribute(
- nsContext.getPrefix(prefix),
- nsContext.getNamespaceURI(prefix),
- localName, value);
- }
-
- public void endStartTag() throws IOException, SAXException {
- // noop
- }
-
- public void endTag(int prefix, String localName) throws IOException, SAXException, XMLStreamException {
- out.writeEndElement();
- }
-
- public void text(String value, boolean needsSeparatingWhitespace) throws IOException, SAXException, XMLStreamException {
- if(needsSeparatingWhitespace)
- out.writeCharacters(" ");
- out.writeCharacters(value);
- }
-
- public void text(Pcdata value, boolean needsSeparatingWhitespace) throws IOException, SAXException, XMLStreamException {
- if(needsSeparatingWhitespace)
- out.writeCharacters(" ");
-
- int len = value.length();
- if(len <buf.length) {
- value.writeTo(buf,0);
- out.writeCharacters(buf,0,len);
- } else {
- out.writeCharacters(value.toString());
- }
- }
-
- /**
- * Reference to FI's XMLStreamWriter class, if FI can be loaded.
- */
- private static final Class FI_STAX_WRITER_CLASS = initFIStAXWriterClass();
- private static final Constructor<? extends XmlOutput> FI_OUTPUT_CTOR = initFastInfosetOutputClass();
-
- private static Class initFIStAXWriterClass() {
- try {
- Class<?> llfisw = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.stax.LowLevelFastInfosetStreamWriter");
- Class<?> sds = Class.forName("com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer");
- // Check if StAXDocumentSerializer implements LowLevelFastInfosetStreamWriter
- if (llfisw.isAssignableFrom(sds))
- return sds;
- else
- return null;
- } catch (Throwable e) {
- return null;
- }
- }
-
- private static Constructor<? extends XmlOutput> initFastInfosetOutputClass() {
- try {
- if (FI_STAX_WRITER_CLASS == null)
- return null;
- Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.output.FastInfosetStreamWriterOutput");
- return c.getConstructor(FI_STAX_WRITER_CLASS, JAXBContextImpl.class);
- } catch (Throwable e) {
- return null;
- }
- }
-
- //
- // StAX-ex
- //
- private static final Class STAXEX_WRITER_CLASS = initStAXExWriterClass();
- private static final Constructor<? extends XmlOutput> STAXEX_OUTPUT_CTOR = initStAXExOutputClass();
-
- private static Class initStAXExWriterClass() {
- try {
- return Class.forName("com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx");
- } catch (Throwable e) {
- return null;
- }
- }
-
- private static Constructor<? extends XmlOutput> initStAXExOutputClass() {
- try {
- Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.output.StAXExStreamWriterOutput");
- return c.getConstructor(STAXEX_WRITER_CLASS);
- } catch (Throwable e) {
- return null;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XmlOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XmlOutput.java
deleted file mode 100644
index f1033ed0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XmlOutput.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import java.io.IOException;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.NameList;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-import org.xml.sax.SAXException;
-
-/**
- * Well-formed XML writer.
- *
- * <p>
- * Implementations of this interface is used to connect {@link XMLSerializer}
- * to the actual target. This allows {@link XMLSerializer} to be API agnostic.
- *
- *
- * <h2>Notes</h2>
- * <p>
- * {@link JAXBContext} assigns indices to URIs and local names
- * that are statically known by using {@link NameList}.
- * {@link XmlOutput} implementation can use these indices to improve
- * the performance. For example, those namespace URI indices can be
- * turned into prefixes quickly.
- *
- * <p>
- * {@link XmlOutput} still allows arbitrary namepsace URIs / local names
- * to be written.
- *
- * <p>
- * The {@link NamespaceContextImpl} object, which is shared between {@link XmlOutput} and
- * {@link XMLSerializer}, keeps track of the in-scope namespace bindings. By the time
- * the {@link #beginStartTag} method is called, all the namespace bindings for the new
- * element is already declared. Similarly, after the {@link #endTag} method is called,
- * in-scope bindings will be removed. This book keeping is all done outside {@link XmlOutput}.
- *
- * <p>
- * {@link XmlOutput} and {@link XMLSerializer} uses indices to
- * reference prefixes/URIs to be written. {@link NamespaceContextImpl} can
- * convert prefix indices to URIs and the string representations of prefixes.
- * Binding from indices to URIs and prefixes do not change while indices
- * are "in scope", so {@link XmlOutput} is again expected to take advantage of
- * this to improve the perofmrnace.
- *
- * <p>
- * prefix index 0 is reserved for "xml", and this binding is assumed to be always there.
- * {@link NamespaceContextImpl} can handle this index correctly, but this binding will never
- * be reported to {@link XmlOutput} through {@link #beginStartTag}.
- *
- * <p>
- * One pecurilar behavior of a {@link NamespaceContextImpl} object is that it tries
- * to define redundant xmlns="" on the root element. Implementations of {@link XmlOutput}
- * is encouraged to check for this and avoid generating redundant namespace declarations.
- *
- *
- *
- * <h2>Call Sequence</h2>
- * <p>
- * {@link XMLSerializer} calls the writer methods in the following order:
- *
- * <pre>
- * CALLSEQUENCE := {@link #startDocument startDocument} ELEMENT {@link #endDocument endDocument}
- * | ELEMENT // for fragment
- *
- * ELEMENT := {@link #beginStartTag beginStartTag} {@link #attribute attribute}* {@link #endStartTag endStartTag} CONTENTS {@link #endTag endTag}
- *
- * CONTENTS := (ELEMENT | {@link #text text})*
- * </pre>
- *
- * TODO: for FI, consider making attribute values from Strings to CharSequences.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface XmlOutput {
-//
-//
-// Contracts
-//
-//
- /**
- * Called at the very beginning.
- *
- * @param serializer
- * the {@link XMLSerializer} that coordinates this whole marshalling episode.
- * @param fragment
- * true if we are marshalling a fragment.
- */
- public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException;
-
- /**
- * Called at the very end. This is the last method to be invoked.
- *
- * @param fragment
- * false if we are writing the whole document.
- */
- public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException;
-
- /**
- * Writes a start tag.
- *
- * <p>
- * At this point {@link NamespaceContextImpl} holds namespace declarations needed for this
- * new element.
- *
- * <p>
- * This method is used for writing tags that are indexed.
- */
- public void beginStartTag(Name name) throws IOException, XMLStreamException;
-
- public void beginStartTag(int prefix, String localName) throws IOException, XMLStreamException;
-
- public void attribute( Name name, String value ) throws IOException, XMLStreamException;
-
- /**
- * @param prefix
- * -1 if this attribute does not have a prefix
- * (this handling differs from that of elements.)
- */
- public void attribute( int prefix, String localName, String value ) throws IOException, XMLStreamException;
-
- public void endStartTag() throws IOException, SAXException;
-
- public void endTag(Name name) throws IOException, SAXException, XMLStreamException;
-
- public void endTag(int prefix, String localName) throws IOException, SAXException, XMLStreamException;
-
- /**
- * Writes XML text with character escaping, if necessary.
- *
- * @param value
- * this string can contain characters that might need escaping
- * (such as '&amp;' or '>')
- * @param needsSeparatingWhitespace
- */
- public void text( String value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException;
-
- /**
- * Writes XML text with character escaping, if necessary.
- *
- * @param value
- * this string can contain characters that might need escaping
- * (such as '&amp;' or '>')
- * @param needsSeparatingWhitespace
- */
- public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XmlOutputAbstractImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XmlOutputAbstractImpl.java
deleted file mode 100644
index d7363e7c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/XmlOutputAbstractImpl.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-import org.xml.sax.SAXException;
-
-/**
- * Abstract implementation of {@link XmlOutput}
- *
- * Implements the optimal methods, where defer to
- * the non-optimal methods.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class XmlOutputAbstractImpl implements XmlOutput {
-//
-//
-// Contracts
-//
-//
- /**
- * Called at the very beginning.
- *
- * @param serializer
- * the {@link XMLSerializer} that coordinates this whole marshalling episode.
- * @param fragment
- * true if we are marshalling a fragment.
- */
- public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException {
- this.nsUriIndex2prefixIndex = nsUriIndex2prefixIndex;
- this.nsContext = nsContext;
- this.serializer = serializer;
- }
-
- /**
- * Called at the very end.
- *
- * @param fragment
- * false if we are writing the whole document.
- */
- public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException {
- serializer = null;
- }
-
- /**
- * Writes a start tag.
- *
- * <p>
- * At this point {@link #nsContext} holds namespace declarations needed for this
- * new element.
- *
- * <p>
- * This method is used for writing tags that are indexed.
- */
- public void beginStartTag(Name name) throws IOException, XMLStreamException {
- beginStartTag( nsUriIndex2prefixIndex[name.nsUriIndex], name.localName );
- }
-
- public abstract void beginStartTag(int prefix, String localName) throws IOException, XMLStreamException;
-
- public void attribute( Name name, String value ) throws IOException, XMLStreamException {
- short idx = name.nsUriIndex;
- if(idx==-1)
- attribute(-1,name.localName, value);
- else
- attribute( nsUriIndex2prefixIndex[idx], name.localName, value );
- }
- /**
- * @param prefix
- * -1 if this attribute does not have a prefix
- * (this handling differs from that of elements.)
- */
- public abstract void attribute( int prefix, String localName, String value ) throws IOException, XMLStreamException;
-
- public abstract void endStartTag() throws IOException, SAXException;
-
- public void endTag(Name name) throws IOException, SAXException, XMLStreamException {
- endTag( nsUriIndex2prefixIndex[name.nsUriIndex], name.localName);
- }
- public abstract void endTag(int prefix, String localName) throws IOException, SAXException, XMLStreamException;
-
-
-
-
-//
-//
-// Utilities for implementations
-//
-//
- /**
- * The conversion table from the namespace URI index to prefix index.
- *
- * This array is shared with {@link XMLSerializer} and
- * is updated by it automatically.
- *
- * This allows {@link Name#nsUriIndex} to be converted to prefix index
- * (for {@link NamespaceContextImpl}) quickly.
- */
- protected int[] nsUriIndex2prefixIndex;
-
- /**
- * Set by the marshaller before the start tag is written for the root element.
- */
- protected NamespaceContextImpl nsContext;
-
- protected XMLSerializer serializer;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/package-info.java
deleted file mode 100644
index d51a6ebb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/package-info.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * Code that writes well-formed XML ({@link XmlOutput} and its implementations}.
- */
-package com.sun.xml.internal.bind.v2.runtime.output;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/package.html b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/package.html
deleted file mode 100644
index f4221da5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/package.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-
-
-<body>
-Code that implements JAXBContext, Unmarshaller, and Marshaller.
-</body>
-</html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayERProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayERProperty.java
deleted file mode 100644
index aaa286ee..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayERProperty.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.property;
-
-import java.io.IOException;
-import java.util.Collection;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Lister;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.ChildLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.TagName;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Receiver;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Scope;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiNilLoader;
-
-import org.xml.sax.SAXException;
-
-/**
- * Commonality between {@link ArrayElementProperty} and {@link ArrayReferenceNodeProperty}.
- *
- * Mostly handles the unmarshalling of the wrapper element.
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class ArrayERProperty<BeanT,ListT,ItemT> extends ArrayProperty<BeanT,ListT,ItemT> {
-
- /**
- * Wrapper tag name if any, or null.
- */
- protected final Name wrapperTagName;
-
- /**
- * True if the wrapper tag name is nillable.
- * Always false if {@link #wrapperTagName}==null.
- */
- protected final boolean isWrapperNillable;
-
- protected ArrayERProperty(JAXBContextImpl grammar, RuntimePropertyInfo prop, QName tagName, boolean isWrapperNillable) {
- super(grammar,prop);
- if(tagName==null)
- this.wrapperTagName = null;
- else
- this.wrapperTagName = grammar.nameBuilder.createElementName(tagName);
- this.isWrapperNillable = isWrapperNillable;
- }
-
- /**
- * Used to handle the collection wrapper element.
- */
- private static final class ItemsLoader extends Loader {
-
- private final Accessor acc;
- private final Lister lister;
-
- public ItemsLoader(Accessor acc, Lister lister, QNameMap<ChildLoader> children) {
- super(false);
- this.acc = acc;
- this.lister = lister;
- this.children = children;
- }
-
- @Override
- public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- UnmarshallingContext context = state.getContext();
- context.startScope(1);
- // inherit the target so that our children can access its target
- state.setTarget(state.getPrev().getTarget());
-
- // start it now, so that even if there's no children we can still return empty collection
- context.getScope(0).start(acc,lister);
- }
-
- private final QNameMap<ChildLoader> children;
-
- @Override
- public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- ChildLoader child = children.get(ea.uri,ea.local);
- if (child == null) {
- child = children.get(CATCH_ALL);
- }
- if (child == null) {
- super.childElement(state,ea);
- return;
- }
- state.setLoader(child.loader);
- state.setReceiver(child.receiver);
- }
-
- @Override
- public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- state.getContext().endScope(1);
- }
-
- @Override
- public Collection<QName> getExpectedChildElements() {
- return children.keySet();
- }
- }
-
- public final void serializeBody(BeanT o, XMLSerializer w, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException {
- ListT list = acc.get(o);
-
- if(list!=null) {
- if(wrapperTagName!=null) {
- w.startElement(wrapperTagName,null);
- w.endNamespaceDecls(list);
- w.endAttributes();
- }
-
- serializeListBody(o,w,list);
-
- if(wrapperTagName!=null)
- w.endElement();
- } else {
- // list is null
- if(isWrapperNillable) {
- w.startElement(wrapperTagName,null);
- w.writeXsiNilTrue();
- w.endElement();
- } // otherwise don't print the wrapper tag name
- }
- }
-
- /**
- * Serializes the items of the list.
- * This method is invoked after the necessary wrapper tag is produced (if necessary.)
- *
- * @param list
- * always non-null.
- */
- protected abstract void serializeListBody(BeanT o, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException, AccessorException;
-
- /**
- * Creates the unmarshaler to unmarshal the body.
- */
- protected abstract void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders);
-
-
- public final void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) {
- if(wrapperTagName!=null) {
- UnmarshallerChain c = new UnmarshallerChain(chain.context);
- QNameMap<ChildLoader> m = new QNameMap<ChildLoader>();
- createBodyUnmarshaller(c,m);
- Loader loader = new ItemsLoader(acc, lister, m);
- if(isWrapperNillable || chain.context.allNillable)
- loader = new XsiNilLoader(loader);
- loaders.put(wrapperTagName,new ChildLoader(loader,null));
- } else {
- createBodyUnmarshaller(chain,loaders);
- }
- }
-
- /**
- * {@link Receiver} that puts the child object into the {@link Scope} object.
- */
- protected final class ReceiverImpl implements Receiver {
- private final int offset;
-
- protected ReceiverImpl(int offset) {
- this.offset = offset;
- }
-
- public void receive(UnmarshallingContext.State state, Object o) throws SAXException {
- state.getContext().getScope(offset).add(acc,lister,o);
- }
- }}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayElementLeafProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayElementLeafProperty.java
deleted file mode 100644
index cdf2a4d9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayElementLeafProperty.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import java.io.IOException;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementPropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link ArrayProperty} that contains only one leaf type.
- *
- * <p>
- * This class is optimized for the case where there's only one kind of types
- * in the array and that type is a leaf type.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-final class ArrayElementLeafProperty<BeanT,ListT,ItemT> extends ArrayElementProperty<BeanT,ListT,ItemT> {
-
- private final Transducer<ItemT> xducer;
-
- public ArrayElementLeafProperty(JAXBContextImpl p, RuntimeElementPropertyInfo prop) {
- super(p, prop);
-
- // unless those are true, use the ArrayElementNodeProperty.
- assert prop.getTypes().size()==1;
-// assert prop.getTypes().get(0).getType().isLeaf(); // this assertion is incorrect in case it's IDREF
-
- xducer = prop.getTypes().get(0).getTransducer();
- assert xducer!=null;
- }
-
- public void serializeItem(JaxBeanInfo bi, ItemT item, XMLSerializer w) throws SAXException, AccessorException, IOException, XMLStreamException {
- xducer.declareNamespace(item,w);
- w.endNamespaceDecls(item);
- w.endAttributes();
- // this is leaf, so by definition there's no type substitution
- // if there's, we'll be using ArrayElementNodeProperty
- xducer.writeText(w,item,fieldName);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayElementNodeProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayElementNodeProperty.java
deleted file mode 100644
index f0761cc0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayElementNodeProperty.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import java.io.IOException;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementPropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link ArrayProperty} that contains node values.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ArrayElementNodeProperty<BeanT,ListT,ItemT> extends ArrayElementProperty<BeanT,ListT,ItemT> {
-
- public ArrayElementNodeProperty(JAXBContextImpl p, RuntimeElementPropertyInfo prop) {
- super(p, prop);
- }
-
- public void serializeItem(JaxBeanInfo expected, ItemT item, XMLSerializer w) throws SAXException, IOException, XMLStreamException {
- if(item==null) {
- w.writeXsiNilTrue();
- } else {
- w.childAsXsiType(item,fieldName,expected, false);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayElementProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayElementProperty.java
deleted file mode 100644
index 1e87e222..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayElementProperty.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import java.io.IOException;
-import java.lang.reflect.Type;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.core.TypeRef;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.RuntimeUtil;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.ListIterator;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Lister;
-import com.sun.xml.internal.bind.v2.runtime.reflect.NullSafeAccessor;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.ChildLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.DefaultValueLoaderDecorator;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Receiver;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.TextLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiNilLoader;
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link Property} implementation for multi-value property that maps to an element.
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class ArrayElementProperty<BeanT,ListT,ItemT> extends ArrayERProperty<BeanT,ListT,ItemT> {
-
- private final Map<Class,TagAndType> typeMap = new HashMap<Class,TagAndType>();
- /**
- * Set by the constructor and reset in the {@link #wrapUp()} method.
- */
- private Map<TypeRef<Type,Class>,JaxBeanInfo> refs = new HashMap<TypeRef<Type, Class>, JaxBeanInfo>();
- /**
- * Set by the constructor and reset in the {@link #wrapUp()} method.
- */
- protected RuntimeElementPropertyInfo prop;
-
- /**
- * Tag name used when we see null in the collection. Can be null.
- */
- private final Name nillableTagName;
-
- protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) {
- super(grammar, prop, prop.getXmlName(), prop.isCollectionNillable());
- this.prop = prop;
-
- List<? extends RuntimeTypeRef> types = prop.getTypes();
-
- Name n = null;
-
- for (RuntimeTypeRef typeRef : types) {
- Class type = (Class)typeRef.getTarget().getType();
- if(type.isPrimitive())
- type = RuntimeUtil.primitiveToBox.get(type);
-
- JaxBeanInfo beanInfo = grammar.getOrCreate(typeRef.getTarget());
- TagAndType tt = new TagAndType(
- grammar.nameBuilder.createElementName(typeRef.getTagName()),
- beanInfo);
- typeMap.put(type,tt);
- refs.put(typeRef,beanInfo);
- if(typeRef.isNillable() && n==null)
- n = tt.tagName;
- }
-
- nillableTagName = n;
- }
-
- @Override
- public void wrapUp() {
- super.wrapUp();
- refs = null;
- prop = null; // avoid keeping model objects live
- }
-
- protected void serializeListBody(BeanT beanT, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException, AccessorException {
- ListIterator<ItemT> itr = lister.iterator(list, w);
-
- boolean isIdref = itr instanceof Lister.IDREFSIterator; // UGLY
-
- while(itr.hasNext()) {
- try {
- ItemT item = itr.next();
- if (item != null) {
- Class itemType = item.getClass();
- if(isIdref)
- // This should be the only place where we need to be aware
- // that the iterator is iterating IDREFS.
- itemType = ((Lister.IDREFSIterator)itr).last().getClass();
-
- // normally, this returns non-null
- TagAndType tt = typeMap.get(itemType);
- while(tt==null && itemType!=null) {
- // otherwise we'll just have to try the slow way
- itemType = itemType.getSuperclass();
- tt = typeMap.get(itemType);
- }
-
- if(tt==null) {
- // item is not of the expected type.
-// w.reportError(new ValidationEventImpl(ValidationEvent.ERROR,
-// Messages.UNEXPECTED_JAVA_TYPE.format(
-// item.getClass().getName(),
-// getExpectedClassNameList()
-// ),
-// w.getCurrentLocation(fieldName)));
-// continue;
-
- // see the similar code in SingleElementNodeProperty.
- // for the purpose of simple type substitution, make it a non-error
-
- w.startElement(typeMap.values().iterator().next().tagName,null);
- w.childAsXsiType(item,fieldName,w.grammar.getBeanInfo(Object.class), false);
- } else {
- w.startElement(tt.tagName,null);
- serializeItem(tt.beanInfo,item,w);
- }
-
- w.endElement();
- } else {
- if(nillableTagName!=null) {
- w.startElement(nillableTagName,null);
- w.writeXsiNilTrue();
- w.endElement();
- }
- }
- } catch (JAXBException e) {
- w.reportError(fieldName,e);
- // recover by ignoring this item
- }
- }
- }
-
- /**
- * Serializes one item of the property.
- */
- protected abstract void serializeItem(JaxBeanInfo expected, ItemT item, XMLSerializer w) throws SAXException, AccessorException, IOException, XMLStreamException;
-
-
- public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) {
-
- // all items go to the same lister,
- // so they should share the same offset.
- int offset = chain.allocateOffset();
- Receiver recv = new ReceiverImpl(offset);
-
- for (RuntimeTypeRef typeRef : prop.getTypes()) {
-
- Name tagName = chain.context.nameBuilder.createElementName(typeRef.getTagName());
- Loader item = createItemUnmarshaller(chain,typeRef);
-
- if(typeRef.isNillable() || chain.context.allNillable)
- item = new XsiNilLoader.Array(item);
- if(typeRef.getDefaultValue()!=null)
- item = new DefaultValueLoaderDecorator(item,typeRef.getDefaultValue());
-
- loaders.put(tagName,new ChildLoader(item,recv));
- }
- }
-
- public final PropertyKind getKind() {
- return PropertyKind.ELEMENT;
- }
-
- /**
- * Creates a loader handler that unmarshals the body of the item.
- *
- * <p>
- * This will be sandwiched into <item> ... </item>.
- *
- * <p>
- * When unmarshalling the body of item, the Pack of {@link Lister} is available
- * as the handler state.
- *
- * @param chain
- * @param typeRef
- */
- private Loader createItemUnmarshaller(UnmarshallerChain chain, RuntimeTypeRef typeRef) {
- if(PropertyFactory.isLeaf(typeRef.getSource())) {
- final Transducer xducer = typeRef.getTransducer();
- return new TextLoader(xducer);
- } else {
- return refs.get(typeRef).getLoader(chain.context,true);
- }
- }
-
- public Accessor getElementPropertyAccessor(String nsUri, String localName) {
- if(wrapperTagName!=null) {
- if(wrapperTagName.equals(nsUri,localName))
- return acc;
- } else {
- for (TagAndType tt : typeMap.values()) {
- if(tt.tagName.equals(nsUri,localName))
- // when we can't distinguish null and empty list, JAX-WS doesn't want to see
- // null (just like any user apps), but since we are providing a raw accessor,
- // which just grabs the value from the field, we wrap it so that it won't return
- // null.
- return new NullSafeAccessor<BeanT,ListT,Object>(acc,lister);
- }
- }
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java
deleted file mode 100644
index 01574d81..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Lister;
-
-
-/**
- * {@link Property} implementation for multi-value properties
- * (including arrays and collections.)
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-abstract class ArrayProperty<BeanT,ListT,ItemT> extends PropertyImpl<BeanT> {
- protected final Accessor<BeanT,ListT> acc;
- protected final Lister<BeanT,ListT,ItemT,Object> lister;
-
- protected ArrayProperty(JAXBContextImpl context, RuntimePropertyInfo prop) {
- super(context,prop);
-
- assert prop.isCollection();
- lister = Lister.create(
- Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()),prop.id(),prop.getAdapter());
- assert lister!=null;
- acc = prop.getAccessor().optimize(context);
- assert acc!=null;
- }
-
- public void reset(BeanT o) throws AccessorException {
- lister.reset(o,acc);
- }
-
- public final String getIdValue(BeanT bean) {
- // mutli-value property can't be ID
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayReferenceNodeProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayReferenceNodeProperty.java
deleted file mode 100644
index 598bf41d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayReferenceNodeProperty.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import java.io.IOException;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.annotation.DomHandler;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.v2.ClassFactory;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.core.WildcardMode;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElement;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeReferencePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.ListIterator;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.ChildLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Receiver;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.WildcardLoader;
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-
-import org.xml.sax.SAXException;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class ArrayReferenceNodeProperty<BeanT,ListT,ItemT> extends ArrayERProperty<BeanT,ListT,ItemT> {
-
- /**
- * Expected element names and what class to unmarshal.
- */
- private final QNameMap<JaxBeanInfo> expectedElements = new QNameMap<JaxBeanInfo>();
-
- private final boolean isMixed;
-
- private final DomHandler domHandler;
- private final WildcardMode wcMode;
-
- public ArrayReferenceNodeProperty(JAXBContextImpl p, RuntimeReferencePropertyInfo prop) {
- super(p, prop, prop.getXmlName(), prop.isCollectionNillable());
-
- for (RuntimeElement e : prop.getElements()) {
- JaxBeanInfo bi = p.getOrCreate(e);
- expectedElements.put( e.getElementName().getNamespaceURI(),e.getElementName().getLocalPart(), bi );
- }
-
- isMixed = prop.isMixed();
-
- if(prop.getWildcard()!=null) {
- domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
- wcMode = prop.getWildcard();
- } else {
- domHandler = null;
- wcMode = null;
- }
- }
-
- protected final void serializeListBody(BeanT o, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException {
- ListIterator<ItemT> itr = lister.iterator(list, w);
-
- while(itr.hasNext()) {
- try {
- ItemT item = itr.next();
- if (item != null) {
- if(isMixed && item.getClass()==String.class) {
- w.text((String)item,null);
- } else {
- JaxBeanInfo bi = w.grammar.getBeanInfo(item,true);
- if(bi.jaxbType==Object.class && domHandler!=null)
- // even if 'v' is a DOM node, it always derive from Object,
- // so the getBeanInfo returns BeanInfo for Object
- w.writeDom(item,domHandler,o,fieldName);
- else
- bi.serializeRoot(item,w);
- }
- }
- } catch (JAXBException e) {
- w.reportError(fieldName,e);
- // recover by ignoring this item
- }
- }
- }
-
- public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) {
- final int offset = chain.allocateOffset();
-
- Receiver recv = new ReceiverImpl(offset);
-
- for( QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet() ) {
- final JaxBeanInfo beanInfo = n.getValue();
- loaders.put(n.nsUri,n.localName,new ChildLoader(beanInfo.getLoader(chain.context,true),recv));
- }
-
- if(isMixed) {
- // handler for processing mixed contents.
- loaders.put(TEXT_HANDLER,
- new ChildLoader(new MixedTextLoader(recv),null));
- }
-
- if(domHandler!=null) {
- loaders.put(CATCH_ALL,
- new ChildLoader(new WildcardLoader(domHandler,wcMode),recv));
- }
- }
-
- private static final class MixedTextLoader extends Loader {
-
- private final Receiver recv;
-
- public MixedTextLoader(Receiver recv) {
- super(true);
- this.recv = recv;
- }
-
- public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
- if(text.length()!=0) // length 0 text is pointless
- recv.receive(state,text.toString());
- }
- }
-
-
- public PropertyKind getKind() {
- return PropertyKind.REFERENCE;
- }
-
- @Override
- public Accessor getElementPropertyAccessor(String nsUri, String localName) {
- // TODO: unwrap JAXBElement
- if(wrapperTagName!=null) {
- if(wrapperTagName.equals(nsUri,localName))
- return acc;
- } else {
- if(expectedElements.containsKey(nsUri,localName))
- return acc;
- }
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/AttributeProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/AttributeProperty.java
deleted file mode 100644
index 451c6911..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/AttributeProperty.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import java.io.IOException;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-import com.sun.xml.internal.bind.v2.model.core.AttributePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeAttributePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.ChildLoader;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link Property} implementation for {@link AttributePropertyInfo}.
- *
- * <p>
- * This one works for both leaves and nodes, scalars and arrays.
- *
- * <p>
- * Implements {@link Comparable} so that it can be sorted lexicographically.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public final class AttributeProperty<BeanT> extends PropertyImpl<BeanT>
- implements Comparable<AttributeProperty> {
-
- /**
- * Attribute name.
- */
- public final Name attName;
-
- /**
- * Heart of the conversion logic.
- */
- public final TransducedAccessor<BeanT> xacc;
-
- private final Accessor acc;
-
- public AttributeProperty(JAXBContextImpl context, RuntimeAttributePropertyInfo prop) {
- super(context,prop);
- this.attName = context.nameBuilder.createAttributeName(prop.getXmlName());
- this.xacc = TransducedAccessor.get(context,prop);
- this.acc = prop.getAccessor(); // we only use this for binder, so don't waste memory by optimizing
- }
-
- /**
- * Marshals one attribute.
- *
- * @see JaxBeanInfo#serializeAttributes(Object, XMLSerializer)
- */
- public void serializeAttributes(BeanT o, XMLSerializer w) throws SAXException, AccessorException, IOException, XMLStreamException {
- CharSequence value = xacc.print(o);
- if(value!=null)
- w.attribute(attName,value.toString());
- }
-
- public void serializeURIs(BeanT o, XMLSerializer w) throws AccessorException, SAXException {
- xacc.declareNamespace(o,w);
- }
-
- public boolean hasSerializeURIAction() {
- return xacc.useNamespace();
- }
-
- public void buildChildElementUnmarshallers(UnmarshallerChain chainElem, QNameMap<ChildLoader> handlers) {
- throw new IllegalStateException();
- }
-
-
- public PropertyKind getKind() {
- return PropertyKind.ATTRIBUTE;
- }
-
- public void reset(BeanT o) throws AccessorException {
- acc.set(o,null);
- }
-
- public String getIdValue(BeanT bean) throws AccessorException, SAXException {
- return xacc.print(bean).toString();
- }
-
- public int compareTo(AttributeProperty that) {
- return this.attName.compareTo(that.attName);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ListElementProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ListElementProperty.java
deleted file mode 100644
index 8d754c53..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ListElementProperty.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.property;
-
-import java.io.IOException;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-import com.sun.xml.internal.bind.v2.model.core.ElementPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.ListTransducedAccessorImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.ChildLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.DefaultValueLoaderDecorator;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.LeafPropertyLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link Property} implementation for {@link ElementPropertyInfo} whose
- * {@link ElementPropertyInfo#isValueList()} is true.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ListElementProperty<BeanT,ListT,ItemT> extends ArrayProperty<BeanT,ListT,ItemT> {
-
- private final Name tagName;
- private final String defaultValue;
-
- /**
- * Converts all the values to a list and back.
- */
- private final TransducedAccessor<BeanT> xacc;
-
- public ListElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop) {
- super(grammar, prop);
-
- assert prop.isValueList();
- assert prop.getTypes().size()==1; // required by the contract of isValueList
- RuntimeTypeRef ref = prop.getTypes().get(0);
-
- tagName = grammar.nameBuilder.createElementName(ref.getTagName());
- defaultValue = ref.getDefaultValue();
-
- // transducer for each item
- Transducer xducer = ref.getTransducer();
- // transduced accessor for the whole thing
- xacc = new ListTransducedAccessorImpl(xducer,acc,lister);
- }
-
- public PropertyKind getKind() {
- return PropertyKind.ELEMENT;
- }
-
- public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
- Loader l = new LeafPropertyLoader(xacc);
- l = new DefaultValueLoaderDecorator(l, defaultValue);
- handlers.put(tagName, new ChildLoader(l,null));
- }
-
- @Override
- public void serializeBody(BeanT o, XMLSerializer w, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException {
- ListT list = acc.get(o);
-
- if(list!=null) {
- if(xacc.useNamespace()) {
- w.startElement(tagName,null);
- xacc.declareNamespace(o,w);
- w.endNamespaceDecls(list);
- w.endAttributes();
- xacc.writeText(w,o,fieldName);
- w.endElement();
- } else {
- xacc.writeLeafElement(w, tagName, o, fieldName);
- }
- }
- }
-
- @Override
- public Accessor getElementPropertyAccessor(String nsUri, String localName) {
- if(tagName!=null) {
- if(tagName.equals(nsUri,localName))
- return acc;
- }
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages.java
deleted file mode 100644
index 737e86c1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Message resources
- */
-enum Messages {
- UNSUBSTITUTABLE_TYPE, // 3 args
- UNEXPECTED_JAVA_TYPE, // 2 args
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
-
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages.properties
deleted file mode 100644
index b40d0972..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not in use anymore - commented.
-UNSUBSTITUTABLE_TYPE = \
- type {0} is mapped to {1} but it cannot substitute {2} here
-
-UNEXPECTED_JAVA_TYPE = \
- Java class {0} is not allowed in this property. Expected types are: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_de.properties
deleted file mode 100644
index fa2eb9a6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_de.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not in use anymore - commented.
-UNSUBSTITUTABLE_TYPE = Typ {0} ist {1} zugeordnet, kann jedoch {2} hier nicht ersetzen
-
-UNEXPECTED_JAVA_TYPE = Java-Klasse {0} ist in dieser Eigenschaft nicht zul\u00E4ssig. Folgende Typen werden erwartet: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_es.properties
deleted file mode 100644
index 2c3c4fa6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_es.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not in use anymore - commented.
-UNSUBSTITUTABLE_TYPE = el tipo {0} est\u00E1 asignado a {1}, pero no puede sustituir a {2} aqu\u00ED
-
-UNEXPECTED_JAVA_TYPE = La clase Java {0} no est\u00E1 permitida en esta propiedad. Los tipos esperados son: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_fr.properties
deleted file mode 100644
index af5f98be..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_fr.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not in use anymore - commented.
-UNSUBSTITUTABLE_TYPE = le type {0} est mapp\u00E9 avec {1} mais il ne peut pas remplacer {2} ici
-
-UNEXPECTED_JAVA_TYPE = La classe Java {0} n''est pas autoris\u00E9e dans cette propri\u00E9t\u00E9. Les types attendus sont : {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_it.properties
deleted file mode 100644
index a3a1c929..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_it.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not in use anymore - commented.
-UNSUBSTITUTABLE_TYPE = il tipo {0} \u00E8 mappato a {1} ma qui non pu\u00F2 sostituire {2}
-
-UNEXPECTED_JAVA_TYPE = La classe Java {0} non \u00E8 consentita in questa propriet\u00E0. I tipi previsti sono: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_ja.properties
deleted file mode 100644
index 24b39276..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_ja.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not in use anymore - commented.
-UNSUBSTITUTABLE_TYPE = \u30BF\u30A4\u30D7{0}\u304C{1}\u306B\u30DE\u30C3\u30D7\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u3053\u3053\u3067{2}\u3092\u4EE3\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-
-UNEXPECTED_JAVA_TYPE = Java\u30AF\u30E9\u30B9{0}\u306F\u3053\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u4E88\u671F\u3055\u308C\u308B\u30BF\u30A4\u30D7\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_ko.properties
deleted file mode 100644
index 57677719..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_ko.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not in use anymore - commented.
-UNSUBSTITUTABLE_TYPE = {0} \uC720\uD615\uC774 {1}\uC5D0 \uB9E4\uD551\uB418\uC5C8\uC9C0\uB9CC \uC5EC\uAE30\uC11C {2}\uC744(\uB97C) \uB300\uCCB4\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-UNEXPECTED_JAVA_TYPE = Java \uD074\uB798\uC2A4 {0}\uC740(\uB294) \uC774 \uC18D\uC131\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uD544\uC694\uD55C \uC720\uD615: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_pt_BR.properties
deleted file mode 100644
index a16ecec4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_pt_BR.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not in use anymore - commented.
-UNSUBSTITUTABLE_TYPE = o tipo {0} foi mapeado para {1}, mas n\u00E3o pode substituir {2} aqui
-
-UNEXPECTED_JAVA_TYPE = A classe Java {0} n\u00E3o \u00E9 permitida nesta propriedade. Os tipos esperados s\u00E3o: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_zh_CN.properties
deleted file mode 100644
index 0acaa88a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_zh_CN.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not in use anymore - commented.
-UNSUBSTITUTABLE_TYPE = \u7C7B\u578B{0}\u6620\u5C04\u5230{1}, \u4F46\u5B83\u4E0D\u80FD\u66FF\u4EE3\u6B64\u5904\u7684{2}
-
-UNEXPECTED_JAVA_TYPE = \u6B64\u5C5E\u6027\u4E2D\u4E0D\u5141\u8BB8\u6709 Java \u7C7B{0}\u3002\u6240\u9700\u7C7B\u578B\u4E3A: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_zh_TW.properties
deleted file mode 100644
index 1fd0d1c4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_zh_TW.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Not in use anymore - commented.
-UNSUBSTITUTABLE_TYPE = \u985E\u578B {0} \u5C0D\u61C9\u81F3 {1}, \u4F46\u5176\u7121\u6CD5\u53D6\u4EE3\u6B64\u8655\u7684 {2}
-
-UNEXPECTED_JAVA_TYPE = \u4E0D\u5141\u8A31\u5728\u6B64\u7279\u6027\u4E2D\u4F7F\u7528 Java \u985E\u5225 {0}. \u9810\u671F\u7684\u985E\u578B\u70BA: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Property.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Property.java
deleted file mode 100644
index 54799c83..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Property.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import java.io.IOException;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-import org.xml.sax.SAXException;
-
-/**
- * A JAXB property that constitutes a JAXB-bound bean.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface Property<BeanT> extends StructureLoaderBuilder {
-
-// // is this method necessary? --> probably not
-// RuntimePropertyInfo owner();
-
- /**
- * Resets the property value on the given object.
- *
- * <p>
- * ... for example by setting 0 or null.
- */
- void reset( BeanT o ) throws AccessorException;
-
- /**
- * @see JaxBeanInfo#serializeBody(Object, XMLSerializer)
- *
- * @param outerPeer
- * used when this property is expected to print out an element
- * and that should be associated with this outer peer. normally null.
- * this is only used for {@link JaxBeanInfo} for {@link JAXBElement}s.
- * @throws AccessorException
- * If thrown, caught by the caller and reported.
- */
- public void serializeBody(BeanT beanT, XMLSerializer target, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException;
-
- /**
- * @see JaxBeanInfo#serializeURIs(Object, XMLSerializer)
- */
- public void serializeURIs(BeanT beanT, XMLSerializer target) throws SAXException, AccessorException;
-
- /**
- * Returns true if
- * {@link #serializeURIs(Object,XMLSerializer)} performs some meaningful action.
- */
- public boolean hasSerializeURIAction();
-
-// /**
-// * Builds the unmarshaller.
-// *
-// * @param grammar
-// * the context object to which this property ultimately belongs to.
-// * a property will only belong to one grammar, but to reduce the memory footprint
-// * we don't keep that information stored in {@link Property}, and instead we
-// * just pass the value as a parameter when needed.
-// */
-// Unmarshaller.Handler createUnmarshallerHandler(JAXBContextImpl grammar, Unmarshaller.Handler tail);
-
- /**
- * Gets the value of the property.
- *
- * This method is only used when the corresponding {@link PropertyInfo#id()} is {@link ID#ID},
- * and therefore the return type is fixed to {@link String}.
- */
- String getIdValue(BeanT bean) throws AccessorException, SAXException;
-
- /**
- * Gets the Kind of property
- * @return
- * always non-null.
- */
- PropertyKind getKind();
-
-
- // UGLY HACK to support JAX-WS
- // if other clients want to access those functionalities,
- // we should design a better model
- /**
- * If this property is mapped to the specified element,
- * return an accessor to it.
- *
- * @return
- * null if the property is not mapped to the specified element.
- */
- Accessor getElementPropertyAccessor(String nsUri,String localName);
-
- /**
- * Called at the end of the {@link JAXBContext} initialization phase
- * to clean up any unnecessary references.
- */
- void wrapUp();
-
- /**
- * Provides more {@link RuntimePropertyInfo} information on the property.
- *
- * @return
- * null if RETAIN_REFERENCE_TO_INFO property is not set on the {@link JAXBContext}
- */
- public RuntimePropertyInfo getInfo();
-
- public boolean isHiddenByOverride();
-
- public void setHiddenByOverride(boolean hidden);
-
- public String getFieldName();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/PropertyFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/PropertyFactory.java
deleted file mode 100644
index 7eba7949..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/PropertyFactory.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Collection;
-
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeAttributePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeValuePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-
-/**
- * Create {@link Property} objects.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public abstract class PropertyFactory {
- private PropertyFactory() {}
-
-
- /**
- * Constructors of the {@link Property} implementation.
- */
- private static final Constructor<? extends Property>[] propImpls;
-
- static {
- Class<? extends Property>[] implClasses = new Class[] {
- SingleElementLeafProperty.class,
- null, // single reference leaf --- but there's no such thing as "reference leaf"
- null, // no such thing as "map leaf"
-
- ArrayElementLeafProperty.class,
- null, // array reference leaf --- but there's no such thing as "reference leaf"
- null, // no such thing as "map leaf"
-
- SingleElementNodeProperty.class,
- SingleReferenceNodeProperty.class,
- SingleMapNodeProperty.class,
-
- ArrayElementNodeProperty.class,
- ArrayReferenceNodeProperty.class,
- null, // map is always a single property (Map doesn't implement Collection)
- };
-
- propImpls = new Constructor[implClasses.length];
- for( int i=0; i<propImpls.length; i++ ) {
- if(implClasses[i]!=null)
- // this pointless casting necessary for Mustang
- propImpls[i] = (Constructor)implClasses[i].getConstructors()[0];
- }
- }
-
- /**
- * Creates/obtains a properly configured {@link Property}
- * object from the given description.
- */
- public static Property create( JAXBContextImpl grammar, RuntimePropertyInfo info ) {
-
- PropertyKind kind = info.kind();
-
- switch(kind) {
- case ATTRIBUTE:
- return new AttributeProperty(grammar,(RuntimeAttributePropertyInfo)info);
- case VALUE:
- return new ValueProperty(grammar,(RuntimeValuePropertyInfo)info);
- case ELEMENT:
- if(((RuntimeElementPropertyInfo)info).isValueList())
- return new ListElementProperty(grammar,(RuntimeElementPropertyInfo) info);
- break;
- case REFERENCE:
- case MAP:
- break;
- default:
- assert false;
- }
-
-
- boolean isCollection = info.isCollection();
- boolean isLeaf = isLeaf(info);
-
- Constructor<? extends Property> c = propImpls[(isLeaf?0:6)+(isCollection?3:0)+kind.propertyIndex];
- try {
- return c.newInstance( grammar, info );
- } catch (InstantiationException e) {
- throw new InstantiationError(e.getMessage());
- } catch (IllegalAccessException e) {
- throw new IllegalAccessError(e.getMessage());
- } catch (InvocationTargetException e) {
- Throwable t = e.getCause();
- if(t instanceof Error)
- throw (Error)t;
- if(t instanceof RuntimeException)
- throw (RuntimeException)t;
-
- throw new AssertionError(t);
- }
- }
-
- /**
- * Look for the case that can be optimized as a leaf,
- * which is a kind of type whose XML representation is just PCDATA.
- */
- static boolean isLeaf(RuntimePropertyInfo info) {
- Collection<? extends RuntimeTypeInfo> types = info.ref();
- if(types.size()!=1) return false;
-
- RuntimeTypeInfo rti = types.iterator().next();
- if(!(rti instanceof RuntimeNonElement)) return false;
-
- if(info.id()==ID.IDREF)
- // IDREF is always handled as leaf -- Transducer maps IDREF String back to an object
- return true;
-
- if(((RuntimeNonElement)rti).getTransducer()==null)
- // Transducer!=null means definitely binds to PCDATA.
- // even if transducer==null, a referene might be IDREF,
- // in which case it will still produce PCDATA in this reference.
- return false;
-
- if(!info.getIndividualType().equals(rti.getType()))
- return false;
-
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/PropertyImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/PropertyImpl.java
deleted file mode 100644
index 82e2890c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/PropertyImpl.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import java.io.IOException;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-import org.xml.sax.SAXException;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-abstract class PropertyImpl<BeanT> implements Property<BeanT> {
- /**
- * Name of this field.
- */
- protected final String fieldName;
- private RuntimePropertyInfo propertyInfo = null;
- private boolean hiddenByOverride = false;
-
- public PropertyImpl(JAXBContextImpl context, RuntimePropertyInfo prop) {
- fieldName = prop.getName();
- if (context.retainPropertyInfo) {
- propertyInfo = prop;
- }
- }
-
- public RuntimePropertyInfo getInfo() {
- return propertyInfo;
- }
-
- public void serializeBody(BeanT o, XMLSerializer w, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException {
- }
-
- public void serializeURIs(BeanT o, XMLSerializer w) throws SAXException, AccessorException {
- }
-
- public boolean hasSerializeURIAction() {
- return false;
- }
-
- public Accessor getElementPropertyAccessor(String nsUri, String localName) {
- // default implementation. should be overrided
- return null;
- }
-
- public void wrapUp() {/*noop*/}
-
- public boolean isHiddenByOverride() {
- return hiddenByOverride;
- }
-
- public void setHiddenByOverride(boolean hidden) {
- this.hiddenByOverride = hidden;
- }
-
- public String getFieldName() {
- return fieldName;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleElementLeafProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleElementLeafProperty.java
deleted file mode 100644
index 19e7ce83..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleElementLeafProperty.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import java.io.IOException;
-import java.lang.reflect.Modifier;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef;
-import com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.ChildLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.DefaultValueLoaderDecorator;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.LeafPropertyLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.LeafPropertyXsiLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiNilLoader;
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link Property} that contains a leaf value.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-final class SingleElementLeafProperty<BeanT> extends PropertyImpl<BeanT> {
-
- private final Name tagName;
- private final boolean nillable;
- private final Accessor acc;
- private final String defaultValue;
- private final TransducedAccessor<BeanT> xacc;
- private final boolean improvedXsiTypeHandling;
- private final boolean idRef;
-
- public SingleElementLeafProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) {
- super(context, prop);
- RuntimeTypeRef ref = prop.getTypes().get(0);
- tagName = context.nameBuilder.createElementName(ref.getTagName());
- assert tagName != null;
- nillable = ref.isNillable();
- defaultValue = ref.getDefaultValue();
- this.acc = prop.getAccessor().optimize(context);
-
- xacc = TransducedAccessor.get(context, ref);
- assert xacc != null;
-
- improvedXsiTypeHandling = context.improvedXsiTypeHandling;
- idRef = ref.getSource().id() == ID.IDREF;
- }
-
- public void reset(BeanT o) throws AccessorException {
- acc.set(o, null);
- }
-
- public String getIdValue(BeanT bean) throws AccessorException, SAXException {
- return xacc.print(bean).toString();
- }
-
- @Override
- public void serializeBody(BeanT o, XMLSerializer w, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException {
- boolean hasValue = xacc.hasValue(o);
-
- Object obj = null;
-
- try {
- obj = acc.getUnadapted(o);
- } catch (AccessorException ae) {
- ; // noop
- }
-
- Class valueType = acc.getValueType();
-
- // check for different type than expected. If found, add xsi:type declaration
- if (xsiTypeNeeded(o, w, obj, valueType)) {
- w.startElement(tagName, outerPeer);
- w.childAsXsiType(obj, fieldName, w.grammar.getBeanInfo(valueType), false);
- w.endElement();
- } else { // current type is expected
- if (hasValue) {
- xacc.writeLeafElement(w, tagName, o, fieldName);
- } else if (nillable) {
- w.startElement(tagName, null);
- w.writeXsiNilTrue();
- w.endElement();
- }
- }
- }
-
- /**
- * Checks if xsi type needed to be specified
- */
- private boolean xsiTypeNeeded(BeanT bean, XMLSerializer w, Object value, Class valueTypeClass) {
- if (!improvedXsiTypeHandling) // improved xsi type set
- return false;
- if (acc.isAdapted()) // accessor is not adapted
- return false;
- if (value == null) // value is not null
- return false;
- if (value.getClass().equals(valueTypeClass)) // value represented by different class
- return false;
- if (idRef) // IDREF
- return false;
- if (valueTypeClass.isPrimitive()) // is not primitive
- return false;
- return acc.isValueTypeAbstractable() || isNillableAbstract(bean, w.grammar, value, valueTypeClass);
- }
-
- /**
- * Checks if element is nillable and represented by abstract class.
- */
- private boolean isNillableAbstract(BeanT bean, JAXBContextImpl context, Object value, Class valueTypeClass) {
- if (!nillable) // check if element is nillable
- return false;
- if (valueTypeClass != Object.class) // required type wasn't recognized
- return false;
- if (bean.getClass() != JAXBElement.class) // is JAXBElement
- return false;
- JAXBElement jaxbElement = (JAXBElement) bean;
- Class valueClass = value.getClass();
- Class declaredTypeClass = jaxbElement.getDeclaredType();
- if (declaredTypeClass.equals(valueClass)) // JAXBElement<class> is different from unadapted class)
- return false;
- if (!declaredTypeClass.isAssignableFrom(valueClass)) // and is subclass from it
- return false;
- if (!Modifier.isAbstract(declaredTypeClass.getModifiers())) // declared class is abstract
- return false;
- return acc.isAbstractable(declaredTypeClass); // and is not builtin type
- }
-
- public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
- Loader l = new LeafPropertyLoader(xacc);
- if (defaultValue != null)
- l = new DefaultValueLoaderDecorator(l, defaultValue);
- if (nillable || chain.context.allNillable)
- l = new XsiNilLoader.Single(l, acc);
-
- // LeafPropertyXsiLoader doesn't work well with nillable elements
- if (improvedXsiTypeHandling)
- l = new LeafPropertyXsiLoader(l, xacc, acc);
-
- handlers.put(tagName, new ChildLoader(l, null));
- }
-
-
- public PropertyKind getKind() {
- return PropertyKind.ELEMENT;
- }
-
- @Override
- public Accessor getElementPropertyAccessor(String nsUri, String localName) {
- if (tagName.equals(nsUri, localName))
- return acc;
- else
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleElementNodeProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleElementNodeProperty.java
deleted file mode 100644
index a734eec5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleElementNodeProperty.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import java.io.IOException;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.Type;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.core.TypeRef;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.ChildLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.DefaultValueLoaderDecorator;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiNilLoader;
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-
-import javax.xml.bind.JAXBElement;
-import org.xml.sax.SAXException;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-final class SingleElementNodeProperty<BeanT,ValueT> extends PropertyImpl<BeanT> {
-
- private final Accessor<BeanT,ValueT> acc;
-
- private final boolean nillable;
-
- private final QName[] acceptedElements;
-
- private final Map<Class,TagAndType> typeNames = new HashMap<Class,TagAndType>();
-
- private RuntimeElementPropertyInfo prop;
-
- /**
- * The tag name used to produce xsi:nil. The first one in the list.
- */
- private final Name nullTagName;
-
- public SingleElementNodeProperty(JAXBContextImpl context, RuntimeElementPropertyInfo prop) {
- super(context,prop);
- acc = prop.getAccessor().optimize(context);
- this.prop = prop;
-
- QName nt = null;
- boolean nil = false;
-
- acceptedElements = new QName[prop.getTypes().size()];
- for( int i=0; i<acceptedElements.length; i++ )
- acceptedElements[i] = prop.getTypes().get(i).getTagName();
-
- for (RuntimeTypeRef e : prop.getTypes()) {
- JaxBeanInfo beanInfo = context.getOrCreate(e.getTarget());
- if(nt==null) nt = e.getTagName();
- typeNames.put( beanInfo.jaxbType, new TagAndType(
- context.nameBuilder.createElementName(e.getTagName()),beanInfo) );
- nil |= e.isNillable();
- }
-
- nullTagName = context.nameBuilder.createElementName(nt);
-
- nillable = nil;
- }
-
- @Override
- public void wrapUp() {
- super.wrapUp();
- prop = null;
- }
-
- public void reset(BeanT bean) throws AccessorException {
- acc.set(bean,null);
- }
-
- public String getIdValue(BeanT beanT) {
- return null;
- }
-
- @Override
- public void serializeBody(BeanT o, XMLSerializer w, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException {
- ValueT v = acc.get(o);
- if (v!=null) {
- Class vtype = v.getClass();
- TagAndType tt=typeNames.get(vtype); // quick way that usually works
-
- if(tt==null) {// slow way that always works
- for (Map.Entry<Class,TagAndType> e : typeNames.entrySet()) {
- if(e.getKey().isAssignableFrom(vtype)) {
- tt = e.getValue();
- break;
- }
- }
- }
-
- boolean addNilDecl = (o instanceof JAXBElement) && ((JAXBElement)o).isNil();
- if(tt==null) {
- // actually this is an error, because the actual type was not a sub-type
- // of any of the types specified in the annotations,
- // but for the purpose of experimenting with simple type substitution,
- // it's convenient to marshal this anyway (for example so that classes
- // generated from simple types like String can be marshalled as expected.)
- w.startElement(typeNames.values().iterator().next().tagName,null);
- w.childAsXsiType(v,fieldName,w.grammar.getBeanInfo(Object.class), addNilDecl && nillable);
- } else {
- w.startElement(tt.tagName,null);
- w.childAsXsiType(v,fieldName,tt.beanInfo, addNilDecl && nillable);
- }
- w.endElement();
- } else if (nillable) {
- w.startElement(nullTagName,null);
- w.writeXsiNilTrue();
- w.endElement();
- }
- }
-
- public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
- JAXBContextImpl context = chain.context;
-
- for (TypeRef<Type,Class> e : prop.getTypes()) {
- JaxBeanInfo bi = context.getOrCreate((RuntimeTypeInfo) e.getTarget());
- // if the expected Java type is already final, type substitution won't really work anyway.
- // this also traps cases like trying to substitute xsd:long element with xsi:type='xsd:int'
- Loader l = bi.getLoader(context,!Modifier.isFinal(bi.jaxbType.getModifiers()));
- if(e.getDefaultValue()!=null)
- l = new DefaultValueLoaderDecorator(l,e.getDefaultValue());
- if(nillable || chain.context.allNillable)
- l = new XsiNilLoader.Single(l,acc);
- handlers.put( e.getTagName(), new ChildLoader(l,acc));
- }
- }
-
- public PropertyKind getKind() {
- return PropertyKind.ELEMENT;
- }
-
- @Override
- public Accessor getElementPropertyAccessor(String nsUri, String localName) {
- for( QName n : acceptedElements) {
- if(n.getNamespaceURI().equals(nsUri) && n.getLocalPart().equals(localName))
- return acc;
- }
- return null;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java
deleted file mode 100644
index 5ae4bba5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.property;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Arrays;
-import java.util.Set;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.ClassFactory;
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeMapPropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.ChildLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.TagName;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Receiver;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.State;
-
-import org.xml.sax.SAXException;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class SingleMapNodeProperty<BeanT,ValueT extends Map> extends PropertyImpl<BeanT> {
-
- private final Accessor<BeanT,ValueT> acc;
- /**
- * The tag name that surrounds the whole property.
- */
- private final Name tagName;
- /**
- * The tag name that corresponds to the 'entry' element.
- */
- private final Name entryTag;
- private final Name keyTag;
- private final Name valueTag;
-
- private final boolean nillable;
-
- private JaxBeanInfo keyBeanInfo;
- private JaxBeanInfo valueBeanInfo;
-
- /**
- * The implementation class for this property.
- * If the property is null, we create an instance of this class.
- */
- private final Class<? extends ValueT> mapImplClass;
-
- public SingleMapNodeProperty(JAXBContextImpl context, RuntimeMapPropertyInfo prop) {
- super(context, prop);
- acc = prop.getAccessor().optimize(context);
- this.tagName = context.nameBuilder.createElementName(prop.getXmlName());
- this.entryTag = context.nameBuilder.createElementName("","entry");
- this.keyTag = context.nameBuilder.createElementName("","key");
- this.valueTag = context.nameBuilder.createElementName("","value");
- this.nillable = prop.isCollectionNillable();
- this.keyBeanInfo = context.getOrCreate(prop.getKeyType());
- this.valueBeanInfo = context.getOrCreate(prop.getValueType());
-
- // infer the implementation class
- //noinspection unchecked
- Class<ValueT> sig = (Class<ValueT>) Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType());
- mapImplClass = ClassFactory.inferImplClass(sig,knownImplClasses);
- // TODO: error check for mapImplClass==null
- // what is the error reporting path for this part of the code?
- }
-
- private static final Class[] knownImplClasses = {
- HashMap.class, TreeMap.class, LinkedHashMap.class
- };
-
- public void reset(BeanT bean) throws AccessorException {
- acc.set(bean,null);
- }
-
-
- /**
- * A Map property can never be ID.
- */
- public String getIdValue(BeanT bean) {
- return null;
- }
-
- public PropertyKind getKind() {
- return PropertyKind.MAP;
- }
-
- public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
- keyLoader = keyBeanInfo.getLoader(chain.context,true);
- valueLoader = valueBeanInfo.getLoader(chain.context,true);
- handlers.put(tagName,new ChildLoader(itemsLoader,null));
- }
-
- private Loader keyLoader;
- private Loader valueLoader;
-
- /**
- * Handles &lt;items> and &lt;/items>.
- *
- * The target will be set to a {@link Map}.
- */
- 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
-
- @Override
- public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- // create or obtain the Map object
- try {
- target.set((BeanT)state.getPrev().getTarget());
- map.set(acc.get(target.get()));
- depthCounter++;
- if(map.get() == null) {
- map.set(ClassFactory.create(mapImplClass));
- }
- map.get().clear();
- state.setTarget(map.get());
- } catch (AccessorException e) {
- // recover from error by setting a dummy Map that receives and discards the values
- handleGenericException(e,true);
- state.setTarget(new HashMap());
- }
- }
-
- @Override
- 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();
- }
- } catch (AccessorException ex) {
- handleGenericException(ex,true);
- }
- }
-
- @Override
- public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- if(ea.matches(entryTag)) {
- state.setLoader(entryLoader);
- } else {
- super.childElement(state,ea);
- }
- }
-
- @Override
- public Collection<QName> getExpectedChildElements() {
- return Collections.singleton(entryTag.toQName());
- }
- };
-
- /**
- * Handles &lt;entry> and &lt;/entry>.
- *
- * The target will be set to a {@link Map}.
- */
- private final Loader entryLoader = new Loader(false) {
- @Override
- public void startElement(UnmarshallingContext.State state, TagName ea) {
- state.setTarget(new Object[2]); // this is inefficient
- }
-
- @Override
- public void leaveElement(UnmarshallingContext.State state, TagName ea) {
- Object[] keyValue = (Object[])state.getTarget();
- Map map = (Map) state.getPrev().getTarget();
- map.put(keyValue[0],keyValue[1]);
- }
-
- @Override
- public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- if(ea.matches(keyTag)) {
- state.setLoader(keyLoader);
- state.setReceiver(keyReceiver);
- return;
- }
- if(ea.matches(valueTag)) {
- state.setLoader(valueLoader);
- state.setReceiver(valueReceiver);
- return;
- }
- super.childElement(state,ea);
- }
-
- @Override
- public Collection<QName> getExpectedChildElements() {
- return Arrays.asList(keyTag.toQName(),valueTag.toQName());
- }
- };
-
- private static final class ReceiverImpl implements Receiver {
- private final int index;
- public ReceiverImpl(int index) {
- this.index = index;
- }
- public void receive(UnmarshallingContext.State state, Object o) {
- ((Object[])state.getTarget())[index] = o;
- }
- }
-
- private static final Receiver keyReceiver = new ReceiverImpl(0);
- private static final Receiver valueReceiver = new ReceiverImpl(1);
-
- @Override
- public void serializeBody(BeanT o, XMLSerializer w, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException {
- ValueT v = acc.get(o);
- if(v!=null) {
- bareStartTag(w,tagName,v);
- for( Map.Entry e : (Set<Map.Entry>)v.entrySet() ) {
- bareStartTag(w,entryTag,null);
-
- Object key = e.getKey();
- if(key!=null) {
- w.startElement(keyTag,key);
- w.childAsXsiType(key,fieldName,keyBeanInfo, false);
- w.endElement();
- }
-
- Object value = e.getValue();
- if(value!=null) {
- w.startElement(valueTag,value);
- w.childAsXsiType(value,fieldName,valueBeanInfo, false);
- w.endElement();
- }
-
- w.endElement();
- }
- w.endElement();
- } else
- if(nillable) {
- w.startElement(tagName,null);
- w.writeXsiNilTrue();
- w.endElement();
- }
- }
-
- private void bareStartTag(XMLSerializer w, Name tagName, Object peer) throws IOException, XMLStreamException, SAXException {
- w.startElement(tagName,peer);
- w.endNamespaceDecls(peer);
- w.endAttributes();
- }
-
- @Override
- public Accessor getElementPropertyAccessor(String nsUri, String localName) {
- if(tagName.equals(nsUri,localName))
- return acc;
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleReferenceNodeProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleReferenceNodeProperty.java
deleted file mode 100644
index 3352da4e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleReferenceNodeProperty.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.annotation.DomHandler;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.ClassFactory;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.core.WildcardMode;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElement;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeReferencePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.ChildLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.WildcardLoader;
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-
-import org.xml.sax.SAXException;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class SingleReferenceNodeProperty<BeanT,ValueT> extends PropertyImpl<BeanT> {
-
- private final Accessor<BeanT,ValueT> acc;
-
- private final QNameMap<JaxBeanInfo> expectedElements = new QNameMap<JaxBeanInfo>();
-
- private final DomHandler domHandler;
- private final WildcardMode wcMode;
-
- public SingleReferenceNodeProperty(JAXBContextImpl context, RuntimeReferencePropertyInfo prop) {
- super(context,prop);
- acc = prop.getAccessor().optimize(context);
-
- for (RuntimeElement e : prop.getElements()) {
- expectedElements.put( e.getElementName(), context.getOrCreate(e) );
- }
-
- if(prop.getWildcard()!=null) {
- domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler());
- wcMode = prop.getWildcard();
- } else {
- domHandler = null;
- wcMode = null;
- }
- }
-
- public void reset(BeanT bean) throws AccessorException {
- acc.set(bean,null);
- }
-
- public String getIdValue(BeanT beanT) {
- return null;
- }
-
- public void serializeBody(BeanT o, XMLSerializer w, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException {
- ValueT v = acc.get(o);
- if(v!=null) {
- try {
- JaxBeanInfo bi = w.grammar.getBeanInfo(v,true);
- if(bi.jaxbType==Object.class && domHandler!=null)
- // even if 'v' is a DOM node, it always derive from Object,
- // so the getBeanInfo returns BeanInfo for Object
- w.writeDom(v,domHandler,o,fieldName);
- else
- bi.serializeRoot(v,w);
- } catch (JAXBException e) {
- w.reportError(fieldName,e);
- // recover by ignoring this property
- }
- }
- }
-
- public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) {
- for (QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet())
- handlers.put(n.nsUri,n.localName, new ChildLoader(n.getValue().getLoader(chain.context,true),acc));
-
- if(domHandler!=null)
- handlers.put(CATCH_ALL,new ChildLoader(new WildcardLoader(domHandler,wcMode),acc));
-
- }
-
- public PropertyKind getKind() {
- return PropertyKind.REFERENCE;
- }
-
- @Override
- public Accessor getElementPropertyAccessor(String nsUri, String localName) {
- JaxBeanInfo bi = expectedElements.get(nsUri, localName);
- if(bi!=null) {
- if(bi instanceof ElementBeanInfoImpl) {
- final ElementBeanInfoImpl ebi = (ElementBeanInfoImpl) bi;
- // a JAXBElement. We need to handle JAXBElement for JAX-WS
- return new Accessor<BeanT,Object>(ebi.expectedType) {
- public Object get(BeanT bean) throws AccessorException {
- ValueT r = acc.get(bean);
- if(r instanceof JAXBElement) {
- return ((JAXBElement)r).getValue();
- } else
- // this is sloppy programming, but hey...
- return r;
- }
-
- public void set(BeanT bean, Object value) throws AccessorException {
- if(value!=null) {
- try {
- value = ebi.createInstanceFromValue(value);
- } catch (IllegalAccessException e) {
- throw new AccessorException(e);
- } catch (InvocationTargetException e) {
- throw new AccessorException(e);
- } catch (InstantiationException e) {
- throw new AccessorException(e);
- }
- }
- acc.set(bean,(ValueT)value);
- }
- };
- } else {
- // a custom element type, like @XmlRootElement class Foo { ... }
- return acc;
- }
- } else
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/StructureLoaderBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/StructureLoaderBuilder.java
deleted file mode 100644
index 68094e64..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/StructureLoaderBuilder.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.ChildLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.StructureLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.ValuePropertyLoader;
-
-/**
- * Component that contributes element unmarshallers into
- * {@link StructureLoader}.
- *
- * TODO: think of a better name.
- *
- * @author Bhakti Mehta
- */
-public interface StructureLoaderBuilder {
- /**
- * Every Property class has an implementation of buildChildElementUnmarshallers
- * which will fill in the specified {@link QNameMap} by elements that are expected
- * by this property.
- */
- void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers);
-
- /**
- * Magic {@link QName} used to store a handler for the text.
- *
- * <p>
- * To support the mixed content model, {@link StructureLoader} can have
- * at most one {@link ValuePropertyLoader} for processing text
- * found amoung elements.
- *
- * This special text handler is put into the {@link QNameMap} parameter
- * of the {@link #buildChildElementUnmarshallers} method by using
- * this magic token as the key.
- */
- public static final QName TEXT_HANDLER = new QName("\u0000","text");
-
- /**
- * Magic {@link QName} used to store a handler for the rest of the elements.
- *
- * <p>
- * To support the wildcard, {@link StructureLoader} can have
- * at most one {@link Loader} for processing elements
- * that didn't match any of the named elements.
- *
- * This special text handler is put into the {@link QNameMap} parameter
- * of the {@link #buildChildElementUnmarshallers} method by using
- * this magic token as the key.
- */
- public static final QName CATCH_ALL = new QName("\u0000","catchAll");
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/TagAndType.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/TagAndType.java
deleted file mode 100644
index be558ba9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/TagAndType.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-
-/**
- * Pair of {@link QName} and {@link JaxBeanInfo}.
- *
- * @author Kohsuke Kawaguchi
- */
-class TagAndType {
- final Name tagName;
- final JaxBeanInfo beanInfo;
- TagAndType(Name tagName, JaxBeanInfo beanInfo) {
- this.tagName = tagName;
- this.beanInfo = beanInfo;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/UnmarshallerChain.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/UnmarshallerChain.java
deleted file mode 100644
index d3ab28a4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/UnmarshallerChain.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Scope;
-
-
-/**
- * Pass around a 'ticket dispenser' when creating new
- * unmarshallers. This controls the index of the slot
- * allocated to the chain of handlers.
-
- *
- * <p>
- * A ticket dispenser also maintains the offset for handlers
- * to access state slots. A handler records this value when it's created.
- *
- *
- */
-public final class UnmarshallerChain {
- /**
- * This offset allows child unmarshallers to have its own {@link Scope} without colliding with siblings.
- */
- private int offset = 0;
-
- public final JAXBContextImpl context;
-
- public UnmarshallerChain(JAXBContextImpl context) {
- this.context = context;
- }
-
- /**
- * Allocates a new {@link Scope} offset.
- */
- public int allocateOffset() {
- return offset++;
- }
-
- /**
- * Gets the number of total scope offset allocated.
- */
- public int getScopeSize() {
- return offset;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java
deleted file mode 100644
index c6f9b842..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.property;
-
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Utils class.
- *
- * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages.
- *
- * Has *package private* access to avoid inappropriate usage.
- */
-final class Utils {
-
- private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
-
- /**
- * static ReflectionNavigator field to avoid usage of reflection every time we use it.
- */
- static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
-
- static { // we statically initializing REFLECTION_NAVIGATOR property
- try {
- final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
-
- // requires accessClassInPackage privilege
- final Method getInstance = AccessController.doPrivileged(
- new PrivilegedAction<Method>() {
- @Override
- public Method run() {
- try {
- Method getInstance = refNav.getDeclaredMethod("getInstance");
- getInstance.setAccessible(true);
- return getInstance;
- } catch (NoSuchMethodException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
- }
- }
- }
- );
-
- //noinspection unchecked
- REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
- } catch (ClassNotFoundException e) {
- throw new IllegalStateException("Can't find ReflectionNavigator class");
- } catch (InvocationTargetException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
- } catch (IllegalAccessException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
- } catch (SecurityException e) {
- LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
- throw e;
- }
- }
-
- /**
- * private constructor to avoid util class instantiating
- */
- private Utils() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ValueProperty.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ValueProperty.java
deleted file mode 100644
index 6f0242e8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ValueProperty.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.property;
-
-
-import java.io.IOException;
-
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeValuePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.ChildLoader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.ValuePropertyLoader;
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link Property} implementation for {@link XmlValue} properties.
- *
- * <p>
- * This one works for both leaves and nodes, scalars and arrays.
- *
- * @author Bhakti Mehta (bhakti.mehta@sun.com)
- */
-public final class ValueProperty<BeanT> extends PropertyImpl<BeanT> {
-
- /**
- * Heart of the conversion logic.
- */
- private final TransducedAccessor<BeanT> xacc;
- private final Accessor<BeanT,?> acc;
-
-
- public ValueProperty(JAXBContextImpl context, RuntimeValuePropertyInfo prop) {
- super(context,prop);
- xacc = TransducedAccessor.get(context,prop);
- acc = prop.getAccessor(); // we only use this for binder, so don't waste memory by optimizing
- }
-
- public final void serializeBody(BeanT o, XMLSerializer w, Object outerPeer) throws SAXException, AccessorException, IOException, XMLStreamException {
- if(xacc.hasValue(o))
- xacc.writeText(w,o,fieldName);
- }
-
- public void serializeURIs(BeanT o, XMLSerializer w) throws SAXException, AccessorException {
- xacc.declareNamespace(o,w);
- }
-
- public boolean hasSerializeURIAction() {
- return xacc.useNamespace();
- }
-
- public void buildChildElementUnmarshallers(UnmarshallerChain chainElem, QNameMap<ChildLoader> handlers) {
- handlers.put(StructureLoaderBuilder.TEXT_HANDLER,
- new ChildLoader(new ValuePropertyLoader(xacc),null));
- }
-
- public PropertyKind getKind() {
- return PropertyKind.VALUE;
- }
-
- public void reset(BeanT o) throws AccessorException {
- acc.set(o,null);
- }
-
- public String getIdValue(BeanT bean) throws AccessorException, SAXException {
- return xacc.print(bean).toString();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java
deleted file mode 100644
index 7923cab2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.reflect;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.Type;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.bind.Util;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.bind.v2.model.core.Adapter;
-import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Receiver;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-
-import org.xml.sax.SAXException;
-
-/**
- * Accesses a particular property of a bean.
- * <p/>
- * <p/>
- * This interface encapsulates the access to the actual data store.
- * The intention is to generate implementations for a particular bean
- * and a property to improve the performance.
- * <p/>
- * <p/>
- * Accessor can be used as a receiver. Upon receiving an object
- * it sets that to the field.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- * @see Accessor.FieldReflection
- * @see TransducedAccessor
- */
-public abstract class Accessor<BeanT, ValueT> implements Receiver {
-
- public final Class<ValueT> valueType;
-
- public Class<ValueT> getValueType() {
- return valueType;
- }
-
- protected Accessor(Class<ValueT> valueType) {
- this.valueType = valueType;
- }
-
- /**
- * Returns the optimized version of the same accessor.
- *
- * @param context The {@link JAXBContextImpl} that owns the whole thing.
- * (See {@link RuntimeModelBuilder#context}.)
- * @return At least the implementation can return <tt>this</tt>.
- */
- public Accessor<BeanT, ValueT> optimize(@Nullable JAXBContextImpl context) {
- return this;
- }
-
-
- /**
- * Gets the value of the property of the given bean object.
- *
- * @param bean must not be null.
- * @throws AccessorException if failed to set a value. For example, the getter method
- * may throw an exception.
- * @since 2.0 EA1
- */
- public abstract ValueT get(BeanT bean) throws AccessorException;
-
- /**
- * Sets the value of the property of the given bean object.
- *
- * @param bean must not be null.
- * @param value the value to be set. Setting value to null means resetting
- * to the VM default value (even for primitive properties.)
- * @throws AccessorException if failed to set a value. For example, the setter method
- * may throw an exception.
- * @since 2.0 EA1
- */
- public abstract void set(BeanT bean, ValueT value) throws AccessorException;
-
-
- /**
- * Sets the value without adapting the value.
- * <p/>
- * This ugly entry point is only used by JAX-WS.
- * See {@link JAXBRIContext#getElementPropertyAccessor}
- */
- public Object getUnadapted(BeanT bean) throws AccessorException {
- return get(bean);
- }
-
- /**
- * Returns true if this accessor wraps an adapter.
- * <p/>
- * This method needs to be used with care, but it helps some optimization.
- */
- public boolean isAdapted() {
- return false;
- }
-
- /**
- * Sets the value without adapting the value.
- * <p/>
- * This ugly entry point is only used by JAX-WS.
- * See {@link JAXBRIContext#getElementPropertyAccessor}
- */
- public void setUnadapted(BeanT bean, Object value) throws AccessorException {
- set(bean, (ValueT) value);
- }
-
- public void receive(UnmarshallingContext.State state, Object o) throws SAXException {
- try {
- set((BeanT) state.getTarget(), (ValueT) o);
- } catch (AccessorException e) {
- Loader.handleGenericException(e, true);
- } catch (IllegalAccessError iae) {
- // throw UnmarshalException instead IllegalAccesssError | Issue 475
- Loader.handleGenericError(iae);
- }
- }
-
- private static List<Class> nonAbstractableClasses = Arrays.asList(new Class[]{
- Object.class,
- java.util.Calendar.class,
- javax.xml.datatype.Duration.class,
- javax.xml.datatype.XMLGregorianCalendar.class,
- java.awt.Image.class,
- javax.activation.DataHandler.class,
- javax.xml.transform.Source.class,
- java.util.Date.class,
- java.io.File.class,
- java.net.URI.class,
- java.net.URL.class,
- Class.class,
- String.class,
- javax.xml.transform.Source.class}
- );
-
- public boolean isValueTypeAbstractable() {
- return !nonAbstractableClasses.contains(getValueType());
- }
-
- /**
- * Checks if it is not builtin jaxb class
- * @param clazz to be checked
- * @return true if it is NOT builtin class
- */
- public boolean isAbstractable(Class clazz) {
- return !nonAbstractableClasses.contains(clazz);
- }
-
- /**
- * Wraps this {@link Accessor} into another {@link Accessor}
- * and performs the type adaption as necessary.
- */
- public final <T> Accessor<BeanT, T> adapt(Class<T> targetType, final Class<? extends XmlAdapter<T, ValueT>> adapter) {
- return new AdaptedAccessor<BeanT, ValueT, T>(targetType, this, adapter);
- }
-
- public final <T> Accessor<BeanT, T> adapt(Adapter<Type, Class> adapter) {
- return new AdaptedAccessor<BeanT, ValueT, T>(
- (Class<T>) Utils.REFLECTION_NAVIGATOR.erasure(adapter.defaultType),
- this,
- adapter.adapterType);
- }
-
- /**
- * Flag that will be set to true after issueing a warning
- * about the lack of permission to access non-public fields.
- */
- private static boolean accessWarned = false;
-
-
- /**
- * {@link Accessor} that uses Java reflection to access a field.
- */
- public static class FieldReflection<BeanT, ValueT> extends Accessor<BeanT, ValueT> {
- public final Field f;
-
- private static final Logger logger = Util.getClassLogger();
-
- public FieldReflection(Field f) {
- this(f, false);
- }
-
- public FieldReflection(Field f, boolean supressAccessorWarnings) {
- super((Class<ValueT>) f.getType());
- this.f = f;
-
- int mod = f.getModifiers();
- if (!Modifier.isPublic(mod) || Modifier.isFinal(mod) || !Modifier.isPublic(f.getDeclaringClass().getModifiers())) {
- try {
- // attempt to make it accessible, but do so in the security context of the calling application.
- // don't do this in the doPrivilege block, as that would create a security hole for anyone
- // to make any field accessible.
- f.setAccessible(true);
- } catch (SecurityException e) {
- if ((!accessWarned) && (!supressAccessorWarnings)) {
- // this happens when we don't have enough permission.
- logger.log(Level.WARNING, Messages.UNABLE_TO_ACCESS_NON_PUBLIC_FIELD.format(
- f.getDeclaringClass().getName(),
- f.getName()),
- e);
- }
- accessWarned = true;
- }
- }
- }
-
- public ValueT get(BeanT bean) {
- try {
- return (ValueT) f.get(bean);
- } catch (IllegalAccessException e) {
- throw new IllegalAccessError(e.getMessage());
- }
- }
-
- public void set(BeanT bean, ValueT value) {
- try {
- if (value == null)
- value = (ValueT) uninitializedValues.get(valueType);
- f.set(bean, value);
- } catch (IllegalAccessException e) {
- throw new IllegalAccessError(e.getMessage());
- }
- }
-
- @Override
- public Accessor<BeanT, ValueT> optimize(JAXBContextImpl context) {
- if (context != null && context.fastBoot)
- // let's not waste time on doing this for the sake of faster boot.
- return this;
- Accessor<BeanT, ValueT> acc = OptimizedAccessorFactory.get(f);
- if (acc != null)
- return acc;
- else
- return this;
- }
- }
-
- /**
- * Read-only access to {@link Field}. Used to handle a static field.
- */
- public static final class ReadOnlyFieldReflection<BeanT, ValueT> extends FieldReflection<BeanT, ValueT> {
- public ReadOnlyFieldReflection(Field f, boolean supressAccessorWarnings) {
- super(f, supressAccessorWarnings);
- }
- public ReadOnlyFieldReflection(Field f) {
- super(f);
- }
-
- @Override
- public void set(BeanT bean, ValueT value) {
- // noop
- }
-
- @Override
- public Accessor<BeanT, ValueT> optimize(JAXBContextImpl context) {
- return this;
- }
- }
-
-
- /**
- * {@link Accessor} that uses Java reflection to access a getter and a setter.
- */
- public static class GetterSetterReflection<BeanT, ValueT> extends Accessor<BeanT, ValueT> {
- public final Method getter;
- public final Method setter;
-
- private static final Logger logger = Util.getClassLogger();
-
- public GetterSetterReflection(Method getter, Method setter) {
- super(
- (Class<ValueT>) (getter != null ?
- getter.getReturnType() :
- setter.getParameterTypes()[0]));
- this.getter = getter;
- this.setter = setter;
-
- if (getter != null)
- makeAccessible(getter);
- if (setter != null)
- makeAccessible(setter);
- }
-
- private void makeAccessible(Method m) {
- if (!Modifier.isPublic(m.getModifiers()) || !Modifier.isPublic(m.getDeclaringClass().getModifiers())) {
- try {
- m.setAccessible(true);
- } catch (SecurityException e) {
- if (!accessWarned)
- // this happens when we don't have enough permission.
- logger.log(Level.WARNING, Messages.UNABLE_TO_ACCESS_NON_PUBLIC_FIELD.format(
- m.getDeclaringClass().getName(),
- m.getName()),
- e);
- accessWarned = true;
- }
- }
- }
-
- public ValueT get(BeanT bean) throws AccessorException {
- try {
- return (ValueT) getter.invoke(bean);
- } catch (IllegalAccessException e) {
- throw new IllegalAccessError(e.getMessage());
- } catch (InvocationTargetException e) {
- throw handleInvocationTargetException(e);
- }
- }
-
- public void set(BeanT bean, ValueT value) throws AccessorException {
- try {
- if (value == null)
- value = (ValueT) uninitializedValues.get(valueType);
- setter.invoke(bean, value);
- } catch (IllegalAccessException e) {
- throw new IllegalAccessError(e.getMessage());
- } catch (InvocationTargetException e) {
- throw handleInvocationTargetException(e);
- }
- }
-
- private AccessorException handleInvocationTargetException(InvocationTargetException e) {
- // don't block a problem in the user code
- Throwable t = e.getTargetException();
- if (t instanceof RuntimeException)
- throw (RuntimeException) t;
- if (t instanceof Error)
- throw (Error) t;
-
- // otherwise it's a checked exception.
- // I'm not sure how to handle this.
- // we can throw a checked exception from here,
- // but because get/set would be called from so many different places,
- // the handling would be tedious.
- return new AccessorException(t);
- }
-
- @Override
- public Accessor<BeanT, ValueT> optimize(JAXBContextImpl context) {
- if (getter == null || setter == null)
- // if we aren't complete, OptimizedAccessor won't always work
- return this;
- if (context != null && context.fastBoot)
- // let's not waste time on doing this for the sake of faster boot.
- return this;
-
- Accessor<BeanT, ValueT> acc = OptimizedAccessorFactory.get(getter, setter);
- if (acc != null)
- return acc;
- else
- return this;
- }
- }
-
- /**
- * A version of {@link GetterSetterReflection} that doesn't have any setter.
- * <p/>
- * <p/>
- * This provides a user-friendly error message.
- */
- public static class GetterOnlyReflection<BeanT, ValueT> extends GetterSetterReflection<BeanT, ValueT> {
- public GetterOnlyReflection(Method getter) {
- super(getter, null);
- }
-
- @Override
- public void set(BeanT bean, ValueT value) throws AccessorException {
- throw new AccessorException(Messages.NO_SETTER.format(getter.toString()));
- }
- }
-
- /**
- * A version of {@link GetterSetterReflection} thaat doesn't have any getter.
- * <p/>
- * <p/>
- * This provides a user-friendly error message.
- */
- public static class SetterOnlyReflection<BeanT, ValueT> extends GetterSetterReflection<BeanT, ValueT> {
- public SetterOnlyReflection(Method setter) {
- super(null, setter);
- }
-
- @Override
- public ValueT get(BeanT bean) throws AccessorException {
- throw new AccessorException(Messages.NO_GETTER.format(setter.toString()));
- }
- }
-
- /**
- * Gets the special {@link Accessor} used to recover from errors.
- */
- @SuppressWarnings("unchecked")
- public static <A, B> Accessor<A, B> getErrorInstance() {
- return ERROR;
- }
-
- private static final Accessor ERROR = new Accessor<Object, Object>(Object.class) {
- public Object get(Object o) {
- return null;
- }
-
- public void set(Object o, Object o1) {
- }
- };
-
- /**
- * {@link Accessor} for {@link JAXBElement#getValue()}.
- */
- public static final Accessor<JAXBElement, Object> JAXB_ELEMENT_VALUE = new Accessor<JAXBElement, Object>(Object.class) {
- public Object get(JAXBElement jaxbElement) {
- return jaxbElement.getValue();
- }
-
- public void set(JAXBElement jaxbElement, Object o) {
- jaxbElement.setValue(o);
- }
- };
-
- /**
- * Uninitialized map keyed by their classes.
- */
- private static final Map<Class, Object> uninitializedValues = new HashMap<Class, Object>();
-
- static {
-/*
- static byte default_value_byte = 0;
- static boolean default_value_boolean = false;
- static char default_value_char = 0;
- static float default_value_float = 0;
- static double default_value_double = 0;
- static int default_value_int = 0;
- static long default_value_long = 0;
- static short default_value_short = 0;
-*/
- uninitializedValues.put(byte.class, Byte.valueOf((byte) 0));
- uninitializedValues.put(boolean.class, false);
- uninitializedValues.put(char.class, Character.valueOf((char) 0));
- uninitializedValues.put(float.class, Float.valueOf(0));
- uninitializedValues.put(double.class, Double.valueOf(0));
- uninitializedValues.put(int.class, Integer.valueOf(0));
- uninitializedValues.put(long.class, Long.valueOf(0));
- uninitializedValues.put(short.class, Short.valueOf((short) 0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/AdaptedAccessor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/AdaptedAccessor.java
deleted file mode 100644
index cf325df4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/AdaptedAccessor.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.ClassFactory;
-import com.sun.xml.internal.bind.v2.model.core.Adapter;
-import com.sun.xml.internal.bind.v2.runtime.Coordinator;
-
-/**
- * {@link Accessor} that adapts the value by using {@link Adapter}.
- *
- * @see Accessor#adapt
- * @author Kohsuke Kawaguchi
- */
-final class AdaptedAccessor<BeanT,InMemValueT,OnWireValueT> extends Accessor<BeanT,OnWireValueT> {
- private final Accessor<BeanT,InMemValueT> core;
- private final Class<? extends XmlAdapter<OnWireValueT,InMemValueT>> adapter;
-
- /*pacakge*/ AdaptedAccessor(Class<OnWireValueT> targetType, Accessor<BeanT, InMemValueT> extThis, Class<? extends XmlAdapter<OnWireValueT, InMemValueT>> adapter) {
- super(targetType);
- this.core = extThis;
- this.adapter = adapter;
- }
-
- @Override
- public boolean isAdapted() {
- return true;
- }
-
- public OnWireValueT get(BeanT bean) throws AccessorException {
- InMemValueT v = core.get(bean);
-
- XmlAdapter<OnWireValueT,InMemValueT> a = getAdapter();
- try {
- return a.marshal(v);
- } catch (Exception e) {
- throw new AccessorException(e);
- }
- }
-
- public void set(BeanT bean, OnWireValueT o) throws AccessorException {
- XmlAdapter<OnWireValueT, InMemValueT> a = getAdapter();
- try {
- core.set(bean, (o == null ? null : a.unmarshal(o)));
- } catch (Exception e) {
- throw new AccessorException(e);
- }
- }
-
- public Object getUnadapted(BeanT bean) throws AccessorException {
- return core.getUnadapted(bean);
- }
-
- public void setUnadapted(BeanT bean, Object value) throws AccessorException {
- core.setUnadapted(bean,value);
- }
-
- /**
- * Sometimes Adapters are used directly by JAX-WS outside any
- * {@link Coordinator}. Use this lazily-created cached
- * {@link XmlAdapter} in such cases.
- */
- private XmlAdapter<OnWireValueT, InMemValueT> staticAdapter;
-
- private XmlAdapter<OnWireValueT, InMemValueT> getAdapter() {
- Coordinator coordinator = Coordinator._getInstance();
- if(coordinator!=null)
- return coordinator.getAdapter(adapter);
- else {
- synchronized(this) {
- if(staticAdapter==null)
- staticAdapter = ClassFactory.create(adapter);
- }
- return staticAdapter;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/AdaptedLister.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/AdaptedLister.java
deleted file mode 100644
index 161bf34d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/AdaptedLister.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.bind.JAXBException;
-
-import com.sun.xml.internal.bind.v2.runtime.Coordinator;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.api.AccessorException;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link Lister} that adapts individual item types.
- */
-final class AdaptedLister<BeanT,PropT,InMemItemT,OnWireItemT,PackT> extends Lister<BeanT,PropT,OnWireItemT,PackT> {
- private final Lister<BeanT,PropT,InMemItemT,PackT> core;
- private final Class<? extends XmlAdapter<OnWireItemT,InMemItemT>> adapter;
-
- /*package*/ AdaptedLister(
- Lister<BeanT,PropT,InMemItemT,PackT> core,
- Class<? extends XmlAdapter<OnWireItemT,InMemItemT>> adapter) {
-
- this.core = core;
- this.adapter = adapter;
- }
-
- private XmlAdapter<OnWireItemT,InMemItemT> getAdapter() {
- return Coordinator._getInstance().getAdapter(adapter);
- }
-
- public ListIterator<OnWireItemT> iterator(PropT prop, XMLSerializer context) {
- return new ListIteratorImpl( core.iterator(prop,context), context );
- }
-
- public PackT startPacking(BeanT bean, Accessor<BeanT, PropT> accessor) throws AccessorException {
- return core.startPacking(bean,accessor);
- }
-
- public void addToPack(PackT pack, OnWireItemT item) throws AccessorException {
- InMemItemT r;
- try {
- r = getAdapter().unmarshal(item);
- } catch (Exception e) {
- throw new AccessorException(e);
- }
- core.addToPack(pack,r);
- }
-
- public void endPacking(PackT pack, BeanT bean, Accessor<BeanT,PropT> accessor) throws AccessorException {
- core.endPacking(pack,bean,accessor);
- }
-
- public void reset(BeanT bean, Accessor<BeanT, PropT> accessor) throws AccessorException {
- core.reset(bean,accessor);
- }
-
- private final class ListIteratorImpl implements ListIterator<OnWireItemT> {
- private final ListIterator<InMemItemT> core;
- private final XMLSerializer serializer;
-
- public ListIteratorImpl(ListIterator<InMemItemT> core,XMLSerializer serializer) {
- this.core = core;
- this.serializer = serializer;
- }
-
- public boolean hasNext() {
- return core.hasNext();
- }
-
- public OnWireItemT next() throws SAXException, JAXBException {
- InMemItemT next = core.next();
- try {
- return getAdapter().marshal(next);
- } catch (Exception e) {
- serializer.reportError(null,e);
- return null; // recover this error by returning null
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/DefaultTransducedAccessor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/DefaultTransducedAccessor.java
deleted file mode 100644
index d2cb049e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/DefaultTransducedAccessor.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import java.io.IOException;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link TransducedAccessor} that prints to {@link String}.
- *
- * <p>
- * The print method that works for {@link String} determines the dispatching
- * of the {@link #writeText(XMLSerializer,Object,String)} and
- * {@link #writeLeafElement(XMLSerializer, Name, Object, String)} methods,
- * so those are implemented here.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class DefaultTransducedAccessor<T> extends TransducedAccessor<T> {
-
- public abstract String print(T o) throws AccessorException, SAXException;
-
- public void writeLeafElement(XMLSerializer w, Name tagName, T o, String fieldName) throws SAXException, AccessorException, IOException, XMLStreamException {
- w.leafElement(tagName,print(o),fieldName);
- }
-
- public void writeText(XMLSerializer w, T o, String fieldName) throws AccessorException, SAXException, IOException, XMLStreamException {
- w.text(print(o),fieldName);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/ListIterator.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/ListIterator.java
deleted file mode 100644
index 2895e576..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/ListIterator.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import java.util.Iterator;
-
-import javax.xml.bind.JAXBException;
-
-import org.xml.sax.SAXException;
-
-/**
- * Almost like {@link Iterator} but can throw JAXB specific exceptions.
- * @author Kohsuke Kawaguchi
- */
-public interface ListIterator<E> {
- /**
- * Works like {@link Iterator#hasNext()}.
- */
- boolean hasNext();
-
- /**
- * Works like {@link Iterator#next()}.
- *
- * @throws SAXException
- * if an error is found, reported, and we were told to abort
- * @throws JAXBException
- * if an error is found, reported, and we were told to abort
- */
- E next() throws SAXException, JAXBException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/ListTransducedAccessorImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/ListTransducedAccessorImpl.java
deleted file mode 100644
index 9ed77c32..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/ListTransducedAccessorImpl.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import javax.xml.bind.JAXBException;
-
-import com.sun.xml.internal.bind.WhiteSpaceProcessor;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link TransducedAccessor} for a list simple type.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class ListTransducedAccessorImpl<BeanT,ListT,ItemT,PackT> extends DefaultTransducedAccessor<BeanT> {
- /**
- * {@link Transducer} for each item type.
- */
- private final Transducer<ItemT> xducer;
- /**
- * {@link Lister} for handling list of tokens.
- */
- private final Lister<BeanT,ListT,ItemT,PackT> lister;
- /**
- * {@link Accessor} to get/set the list.
- */
- private final Accessor<BeanT,ListT> acc;
-
- public ListTransducedAccessorImpl(Transducer<ItemT> xducer, Accessor<BeanT,ListT> acc, Lister<BeanT,ListT,ItemT,PackT> lister) {
- this.xducer = xducer;
- this.lister = lister;
- this.acc = acc;
- }
-
- public boolean useNamespace() {
- return xducer.useNamespace();
- }
-
- public void declareNamespace(BeanT bean, XMLSerializer w) throws AccessorException, SAXException {
- ListT list = acc.get(bean);
-
- if(list!=null) {
- ListIterator<ItemT> itr = lister.iterator(list, w);
-
- while(itr.hasNext()) {
- try {
- ItemT item = itr.next();
- if (item != null) {
- xducer.declareNamespace(item,w);
- }
- } catch (JAXBException e) {
- w.reportError(null,e);
- }
- }
- }
- }
-
- // TODO: this is inefficient, consider a redesign
- // perhaps we should directly write to XMLSerializer,
- // or maybe add more methods like writeLeafElement.
- public String print(BeanT o) throws AccessorException, SAXException {
- ListT list = acc.get(o);
-
- if(list==null)
- return null;
-
- StringBuilder buf = new StringBuilder();
- XMLSerializer w = XMLSerializer.getInstance();
- ListIterator<ItemT> itr = lister.iterator(list, w);
-
- while(itr.hasNext()) {
- try {
- ItemT item = itr.next();
- if (item != null) {
- if(buf.length()>0) buf.append(' ');
- buf.append(xducer.print(item));
- }
- } catch (JAXBException e) {
- w.reportError(null,e);
- }
- }
- return buf.toString();
- }
-
- private void processValue(BeanT bean, CharSequence s) throws AccessorException, SAXException {
- PackT pack = lister.startPacking(bean,acc);
-
- int idx = 0;
- int len = s.length();
-
- while(true) {
- int p = idx;
- while( p<len && !WhiteSpaceProcessor.isWhiteSpace(s.charAt(p)) )
- p++;
-
- CharSequence token = s.subSequence(idx,p);
- if (!token.equals(""))
- lister.addToPack(pack,xducer.parse(token));
-
- if(p==len) break; // done
-
- while( p<len && WhiteSpaceProcessor.isWhiteSpace(s.charAt(p)) )
- p++;
- if(p==len) break; // done
-
- idx = p;
- }
-
- lister.endPacking(pack,bean,acc);
- }
-
- public void parse(BeanT bean, CharSequence lexical) throws AccessorException, SAXException {
- processValue(bean,lexical);
- }
-
- public boolean hasValue(BeanT bean) throws AccessorException {
- return acc.get(bean)!=null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java
deleted file mode 100644
index bac70532..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java
+++ /dev/null
@@ -1,494 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.reflect;
-
-import java.lang.ref.WeakReference;
-import java.lang.reflect.Array;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.WeakHashMap;
-import java.util.LinkedList;
-import java.util.HashSet;
-import java.util.TreeSet;
-import java.util.Stack;
-import java.util.concurrent.Callable;
-
-import javax.xml.bind.JAXBException;
-
-import com.sun.istack.internal.SAXException2;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.ClassFactory;
-import com.sun.xml.internal.bind.v2.TODO;
-import com.sun.xml.internal.bind.v2.model.core.Adapter;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Patcher;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.LocatorEx;
-
-import org.xml.sax.SAXException;
-
-/**
- * Used to list individual values of a multi-value property, and
- * to pack individual values into a multi-value property.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public abstract class Lister<BeanT,PropT,ItemT,PackT> {
-
- protected Lister() {}
-
- /**
- * Iterates values of a multi-value property.
- *
- * @param context
- * This parameter is used to support ID/IDREF handling.
- */
- public abstract ListIterator<ItemT> iterator(PropT multiValueProp, XMLSerializer context);
-
- /**
- * Setting values to a multi-value property starts by creating
- * a transient object called "pack" from the current field.
- */
- public abstract PackT startPacking(BeanT bean, Accessor<BeanT, PropT> acc) throws AccessorException;
-
- /**
- * Once the {@link #startPacking} is called, you can
- * add values to the pack by using this method.
- */
- public abstract void addToPack( PackT pack, ItemT newValue ) throws AccessorException;
-
- /**
- * Finally, call this method to
- * wraps up the {@code pack}. This method may update the field of
- * the given bean.
- */
- public abstract void endPacking( PackT pack, BeanT bean, Accessor<BeanT,PropT> acc ) throws AccessorException;
-
- /**
- * Clears the values of the property.
- */
- public abstract void reset(BeanT o,Accessor<BeanT,PropT> acc) throws AccessorException;
-
-
- /**
- * Gets a reference to the appropriate {@link Lister} object
- * if the field is a multi-value field. Otherwise null.
- *
- * @param fieldType
- * the type of the field that stores the collection
- * @param idness
- * ID-ness of the property.
- * @param adapter
- * adapter to be used for individual items. can be null.
- */
- public static <BeanT,PropT,ItemT,PackT>
- Lister<BeanT,PropT,ItemT,PackT> create(Type fieldType,ID idness, Adapter<Type,Class> adapter) {
-
- Class rawType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(fieldType);
- Class itemType;
-
- Lister l;
- if( rawType.isArray() ) {
- itemType = rawType.getComponentType();
- l = getArrayLister(itemType);
- } else
- if( Collection.class.isAssignableFrom(rawType) ) {
- Type bt = Utils.REFLECTION_NAVIGATOR.getBaseClass(fieldType,Collection.class);
- if(bt instanceof ParameterizedType)
- itemType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)bt).getActualTypeArguments()[0]);
- else
- itemType = Object.class;
- l = new CollectionLister(getImplClass(rawType));
- } else
- return null;
-
- if(idness==ID.IDREF)
- l = new IDREFS(l,itemType);
-
- if(adapter!=null)
- l = new AdaptedLister(l,adapter.adapterType);
-
- return l;
- }
-
- private static Class getImplClass(Class<?> fieldType) {
- return ClassFactory.inferImplClass(fieldType,COLLECTION_IMPL_CLASSES);
- }
-
- /**
- * Cache instances of {@link ArrayLister}s.
- */
- private static final Map<Class,WeakReference<Lister>> arrayListerCache =
- Collections.synchronizedMap(new WeakHashMap<Class,WeakReference<Lister>>());
-
- /**
- * Creates a lister for array type.
- */
- private static Lister getArrayLister( Class componentType ) {
- Lister l=null;
- if(componentType.isPrimitive())
- l = primitiveArrayListers.get(componentType);
- else {
- WeakReference<Lister> wr = arrayListerCache.get(componentType);
- if(wr!=null)
- l = wr.get();
- if(l==null) {
- l = new ArrayLister(componentType);
- arrayListerCache.put(componentType,new WeakReference<Lister>(l));
- }
- }
- assert l!=null;
- return l;
- }
-
- /**
- * {@link Lister} for an array.
- *
- * <p>
- * Array packing is slower, but we expect this to be used less frequently than
- * the {@link CollectionLister}.
- */
- private static final class ArrayLister<BeanT,ItemT> extends Lister<BeanT,ItemT[],ItemT,Pack<ItemT>> {
-
- private final Class<ItemT> itemType;
-
- public ArrayLister(Class<ItemT> itemType) {
- this.itemType = itemType;
- }
-
- public ListIterator<ItemT> iterator(final ItemT[] objects, XMLSerializer context) {
- return new ListIterator<ItemT>() {
- int idx=0;
- public boolean hasNext() {
- return idx<objects.length;
- }
-
- public ItemT next() {
- return objects[idx++];
- }
- };
- }
-
- public Pack startPacking(BeanT current, Accessor<BeanT, ItemT[]> acc) {
- return new Pack<ItemT>(itemType);
- }
-
- public void addToPack(Pack<ItemT> objects, ItemT o) {
- objects.add(o);
- }
-
- public void endPacking( Pack<ItemT> pack, BeanT bean, Accessor<BeanT,ItemT[]> acc ) throws AccessorException {
- acc.set(bean,pack.build());
- }
-
- public void reset(BeanT o,Accessor<BeanT,ItemT[]> acc) throws AccessorException {
- acc.set(o,(ItemT[])Array.newInstance(itemType,0));
- }
-
- }
-
- public static final class Pack<ItemT> extends ArrayList<ItemT> {
- private final Class<ItemT> itemType;
-
- public Pack(Class<ItemT> itemType) {
- this.itemType = itemType;
- }
-
- public ItemT[] build() {
- return super.toArray( (ItemT[])Array.newInstance(itemType,size()) );
- }
- }
-
- /**
- * Listers for the primitive type arrays, keyed by their primitive Class object.
- */
- /*package*/ static final Map<Class,Lister> primitiveArrayListers = new HashMap<Class,Lister>();
-
- static {
- // register primitive array listers
- PrimitiveArrayListerBoolean.register();
- PrimitiveArrayListerByte.register();
- PrimitiveArrayListerCharacter.register();
- PrimitiveArrayListerDouble.register();
- PrimitiveArrayListerFloat.register();
- PrimitiveArrayListerInteger.register();
- PrimitiveArrayListerLong.register();
- PrimitiveArrayListerShort.register();
- }
-
- /**
- * {@link Lister} for a collection
- */
- public static final class CollectionLister<BeanT,T extends Collection> extends Lister<BeanT,T,Object,T> {
-
- /**
- * Sometimes we need to create a new instance of a collection.
- * This is such an implementation class.
- */
- private final Class<? extends T> implClass;
-
- public CollectionLister(Class<? extends T> implClass) {
- this.implClass = implClass;
- }
-
- public ListIterator iterator(T collection, XMLSerializer context) {
- final Iterator itr = collection.iterator();
- return new ListIterator() {
- public boolean hasNext() {
- return itr.hasNext();
- }
- public Object next() {
- return itr.next();
- }
- };
- }
-
- public T startPacking(BeanT bean, Accessor<BeanT, T> acc) throws AccessorException {
- T collection = acc.get(bean);
- if(collection==null) {
- collection = ClassFactory.create(implClass);
- if(!acc.isAdapted())
- acc.set(bean,collection);
- }
- collection.clear();
- return collection;
- }
-
- public void addToPack(T collection, Object o) {
- collection.add(o);
- }
-
- public void endPacking( T collection, BeanT bean, Accessor<BeanT,T> acc ) throws AccessorException {
- // this needs to be done in the endPacking, because
- // sometimes the accessor uses an adapter, and the adapter needs to see
- // the whole thing.
-
- // but always doing so causes a problem when this collection property
- // is getter-only
-
- // invoke set when possible (see Issue 488)
- try {
- if (acc.isAdapted()) {
- acc.set(bean,collection);
- }
- } catch (AccessorException ae) {
- if(acc.isAdapted()) throw ae;
- }
- }
-
- public void reset(BeanT bean, Accessor<BeanT, T> acc) throws AccessorException {
- T collection = acc.get(bean);
- if(collection == null) {
- return;
- }
- collection.clear();
- }
- }
-
- /**
- * {@link Lister} for IDREFS.
- */
- private static final class IDREFS<BeanT,PropT> extends Lister<BeanT,PropT,String,IDREFS<BeanT,PropT>.Pack> {
- private final Lister<BeanT,PropT,Object,Object> core;
- /**
- * Expected type to which IDREF resolves to.
- */
- private final Class itemType;
-
- public IDREFS(Lister core, Class itemType) {
- this.core = core;
- this.itemType = itemType;
- }
-
- public ListIterator<String> iterator(PropT prop, XMLSerializer context) {
- final ListIterator i = core.iterator(prop,context);
-
- return new IDREFSIterator(i, context);
- }
-
- public Pack startPacking(BeanT bean, Accessor<BeanT, PropT> acc) {
- return new Pack(bean,acc);
- }
-
- public void addToPack(Pack pack, String item) {
- pack.add(item);
- }
-
- public void endPacking(Pack pack, BeanT bean, Accessor<BeanT, PropT> acc) {
- }
-
- public void reset(BeanT bean, Accessor<BeanT, PropT> acc) throws AccessorException {
- core.reset(bean,acc);
- }
-
- /**
- * PackT for this lister.
- */
- private class Pack implements Patcher {
- private final BeanT bean;
- private final List<String> idrefs = new ArrayList<String>();
- private final UnmarshallingContext context;
- private final Accessor<BeanT,PropT> acc;
- private final LocatorEx location;
-
- public Pack(BeanT bean, Accessor<BeanT,PropT> acc) {
- this.bean = bean;
- this.acc = acc;
- this.context = UnmarshallingContext.getInstance();
- this.location = new LocatorEx.Snapshot(context.getLocator());
- context.addPatcher(this);
- }
-
- public void add(String item) {
- idrefs.add(item);
- }
-
- /**
- * Resolves IDREFS and fill in the actual array.
- */
- public void run() throws SAXException {
- try {
- Object pack = core.startPacking(bean,acc);
-
- for( String id : idrefs ) {
- Callable callable = context.getObjectFromId(id,itemType);
- Object t;
-
- try {
- t = (callable!=null) ? callable.call() : null;
- } catch (SAXException e) {
- throw e;
- } catch (Exception e) {
- throw new SAXException2(e);
- }
-
- if(t==null) {
- context.errorUnresolvedIDREF(bean,id,location);
- } else {
- TODO.prototype(); // TODO: check if the type of t is proper.
- core.addToPack(pack,t);
- }
- }
-
- core.endPacking(pack,bean,acc);
- } catch (AccessorException e) {
- context.handleError(e);
- }
- }
- }
- }
-
- /**
- * {@link Iterator} for IDREFS lister.
- *
- * <p>
- * Only in ArrayElementProperty we need to get the actual
- * referenced object. This is a kind of ugly way to make that work.
- */
- public static final class IDREFSIterator implements ListIterator<String> {
- private final ListIterator i;
- private final XMLSerializer context;
- private Object last;
-
- private IDREFSIterator(ListIterator i, XMLSerializer context) {
- this.i = i;
- this.context = context;
- }
-
- public boolean hasNext() {
- return i.hasNext();
- }
-
- /**
- * Returns the last referenced object (not just its ID)
- */
- public Object last() {
- return last;
- }
-
- public String next() throws SAXException, JAXBException {
- last = i.next();
- String id = context.grammar.getBeanInfo(last,true).getId(last,context);
- if(id==null) {
- context.errorMissingId(last);
- }
- return id;
- }
- }
-
- /**
- * Gets the special {@link Lister} used to recover from an error.
- */
- @SuppressWarnings("unchecked")
- public static <A,B,C,D> Lister<A,B,C,D> getErrorInstance() {
- return ERROR;
- }
-
- public static final Lister ERROR = new Lister() {
- public ListIterator iterator(Object o, XMLSerializer context) {
- return EMPTY_ITERATOR;
- }
-
- public Object startPacking(Object o, Accessor accessor) {
- return null;
- }
-
- public void addToPack(Object o, Object o1) {
- }
-
- public void endPacking(Object o, Object o1, Accessor accessor) {
- }
-
- public void reset(Object o, Accessor accessor) {
- }
- };
-
- private static final ListIterator EMPTY_ITERATOR = new ListIterator() {
- public boolean hasNext() {
- return false;
- }
-
- public Object next() {
- throw new IllegalStateException();
- }
- };
-
- private static final Class[] COLLECTION_IMPL_CLASSES = new Class[] {
- ArrayList.class,
- LinkedList.class,
- HashSet.class,
- TreeSet.class,
- Stack.class
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages.java
deleted file mode 100644
index cbcfb869..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Message resources
- */
-enum Messages {
- // Accessor
- UNABLE_TO_ACCESS_NON_PUBLIC_FIELD, // 2 args
- UNASSIGNABLE_TYPE, // 2 args
- NO_SETTER, // 1 arg
- NO_GETTER, // 1 arg
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
-
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages.properties
deleted file mode 100644
index 8bff1f85..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNABLE_TO_ACCESS_NON_PUBLIC_FIELD = \
- Unable to make {0}.{1} accessible.
-
-UNASSIGNABLE_TYPE = \
- The type of the field is {0}, but the type of the object is {1}
-
-# these are normally developer error, so they should be verbose.
-NO_SETTER = \
- The property has a getter "{0}" but no setter. \
- For unmarshalling, please define setters. \
- (Or if this is a collection property, make sure that the getter returns a collection instance.)
-
-NO_GETTER = \
- The property has a setter "{0}" but no getter. \
- For marshaller, please define getters.
-
-INVALID_XML_ENUM_VALUE = \
- "{0}" is not a valid value for {1}.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_de.properties
deleted file mode 100644
index f9800922..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_de.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNABLE_TO_ACCESS_NON_PUBLIC_FIELD = {0}.{1} kann nicht zug\u00E4nglich gemacht werden.
-
-UNASSIGNABLE_TYPE = Der Typ des Feldes ist {0}, der Typ des Objekts ist jedoch {1}
-
-# these are normally developer error, so they should be verbose.
-NO_SETTER = Die Eigenschaft enth\u00E4lt einen Getter "{0}", jedoch keinen Setter. F\u00FCr das Unmarshalling m\u00FCssen Sie Setter definieren. (Wenn es sich jedoch um eine Collection-Eigenschaft handelt, muss der Getter eine Collection-Instanz zur\u00FCckgeben.)
-
-NO_GETTER = Die Eigenschaft enth\u00E4lt einen Setter "{0}", jedoch keinen Getter. F\u00FCr das Marshalling m\u00FCssen Sie Getter definieren.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_es.properties
deleted file mode 100644
index 2373b323..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_es.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNABLE_TO_ACCESS_NON_PUBLIC_FIELD = No se ha podido permitir el acceso a {0}.{1}.
-
-UNASSIGNABLE_TYPE = El tipo del campo es {0}, pero el tipo del objeto es {1}
-
-# these are normally developer error, so they should be verbose.
-NO_SETTER = La propiedad tiene un getter "{0}" pero no un setter. Para anular la canalizaci\u00F3n, defina setters. (O bien, si se trata de una propiedad de recopilaci\u00F3n, aseg\u00FArese de que el getter devuelve una instancia de recopilaci\u00F3n.)
-
-NO_GETTER = La propiedad tiene un setter "{0}", pero no un getter. Defina getters para el marshaller.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_fr.properties
deleted file mode 100644
index 14c1f60a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_fr.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNABLE_TO_ACCESS_NON_PUBLIC_FIELD = Impossible de rendre {0}.{1} accessible.
-
-UNASSIGNABLE_TYPE = Le type du champ est {0}, mais le type de l''objet est {1}
-
-# these are normally developer error, so they should be verbose.
-NO_SETTER = La propri\u00E9t\u00E9 comporte une m\u00E9thode get "{0}" mais aucune m\u00E9thode set. Pour la d\u00E9s\u00E9rialisation, d\u00E9finissez des m\u00E9thodes set. (S''il s''agit d''une propri\u00E9t\u00E9 de collection, assurez-vous que la m\u00E9thode get renvoie une instance de collection.)
-
-NO_GETTER = La propri\u00E9t\u00E9 comporte une m\u00E9thode set "{0}" mais aucune m\u00E9thode get. Pour le s\u00E9rialiseur, d\u00E9finissez des m\u00E9thodes get.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_it.properties
deleted file mode 100644
index 4d6a9561..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_it.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNABLE_TO_ACCESS_NON_PUBLIC_FIELD = Impossibile rendere accessibile {0}.{1}.
-
-UNASSIGNABLE_TYPE = Il tipo del campo \u00E8 {0} mentre quello dell''oggetto \u00E8 {1}
-
-# these are normally developer error, so they should be verbose.
-NO_SETTER = La propriet\u00E0 dispone di un getter "{0}" ma non di un setter. Per eseguire l''unmarshalling, definire i setter (oppure, se si tratta di una propriet\u00E0 della raccolta, assicurarsi che il getter restituisca un''istanza della raccolta).
-
-NO_GETTER = La propriet\u00E0 dispone di un setter "{0}" ma non di un getter. Per il marshaller, definire i getter.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_ja.properties
deleted file mode 100644
index b386384e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_ja.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNABLE_TO_ACCESS_NON_PUBLIC_FIELD = {0}.{1}\u3092\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306B\u3067\u304D\u307E\u305B\u3093\u3002
-
-UNASSIGNABLE_TYPE = \u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30BF\u30A4\u30D7\u306F{0}\u3067\u3059\u304C\u3001\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u30BF\u30A4\u30D7\u306F{1}\u3067\u3059
-
-# these are normally developer error, so they should be verbose.
-NO_SETTER = \u30D7\u30ED\u30D1\u30C6\u30A3\u306Bgetter "{0}"\u304C\u3042\u308A\u307E\u3059\u304C\u3001setter\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u30A2\u30F3\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u306E\u305F\u3081\u306B\u3001setter\u3092\u5B9A\u7FA9\u3057\u3066\u304F\u3060\u3055\u3044(\u307E\u305F\u306F\u3001\u3053\u308C\u304C\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u5834\u5408\u306F\u3001getter\u304C\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u30FB\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u8FD4\u3059\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044)\u3002
-
-NO_GETTER = \u30D7\u30ED\u30D1\u30C6\u30A3\u306Bsetter "{0}"\u304C\u3042\u308A\u307E\u3059\u304C\u3001getter\u304C\u3042\u308A\u307E\u305B\u3093\u3002marshaller\u306E\u305F\u3081\u306B\u3001getter\u3092\u5B9A\u7FA9\u3057\u3066\u304F\u3060\u3055\u3044\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_ko.properties
deleted file mode 100644
index 00b8dd0d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_ko.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNABLE_TO_ACCESS_NON_PUBLIC_FIELD = {0}.{1}\uC744(\uB97C) \uC561\uC138\uC2A4 \uAC00\uB2A5\uD55C \uC0C1\uD0DC\uB85C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-UNASSIGNABLE_TYPE = \uD544\uB4DC\uC758 \uC720\uD615\uC740 {0}, \uAC1D\uCCB4\uC758 \uC720\uD615\uC740 {1}\uC785\uB2C8\uB2E4.
-
-# these are normally developer error, so they should be verbose.
-NO_SETTER = \uC18D\uC131\uC5D0 getter "{0}"\uC740(\uB294) \uC788\uC9C0\uB9CC setter\uB294 \uC5C6\uC2B5\uB2C8\uB2E4. \uB9C8\uC15C\uB9C1 \uD574\uC81C\uC5D0 \uB300\uD55C setter\uB97C \uC815\uC758\uD558\uC2ED\uC2DC\uC624. \uB610\uB294 \uC774 \uC18D\uC131\uC774 \uBAA8\uC74C \uC18D\uC131\uC77C \uACBD\uC6B0 getter\uAC00 \uBAA8\uC74C \uC778\uC2A4\uD134\uC2A4\uB97C \uBC18\uD658\uD558\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-NO_GETTER = \uC18D\uC131\uC5D0 setter "{0}"\uC740(\uB294) \uC788\uC9C0\uB9CC getter\uB294 \uC5C6\uC2B5\uB2C8\uB2E4. \uB9C8\uC15C\uB7EC\uC5D0 \uB300\uD55C getter\uB97C \uC815\uC758\uD558\uC2ED\uC2DC\uC624.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_pt_BR.properties
deleted file mode 100644
index 1a771ac0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_pt_BR.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNABLE_TO_ACCESS_NON_PUBLIC_FIELD = N\u00E3o \u00E9 poss\u00EDvel tornar {0}.{1} acess\u00EDvel.
-
-UNASSIGNABLE_TYPE = O tipo de campo \u00E9 {0}, mas o tipo de objeto \u00E9 {1}
-
-# these are normally developer error, so they should be verbose.
-NO_SETTER = A propriedade tem um getter "{0}", mas nenhum setter. Para cancelar o marshal, defina os setters. (Ou, se esta for uma propriedade de coleta, certifique-se de que getter retorne uma inst\u00E2ncia da coleta).
-
-NO_GETTER = A propriedade tem um setter "{0}", mas nenhum getter. Para marshaller, defina os getters.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_zh_CN.properties
deleted file mode 100644
index eaa43818..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_zh_CN.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNABLE_TO_ACCESS_NON_PUBLIC_FIELD = \u65E0\u6CD5\u4F7F{0}.{1}\u6210\u4E3A\u53EF\u8BBF\u95EE\u7684\u3002
-
-UNASSIGNABLE_TYPE = \u5B57\u6BB5\u7684\u7C7B\u578B\u4E3A{0}, \u800C\u5BF9\u8C61\u7684\u7C7B\u578B\u4E3A{1}
-
-# these are normally developer error, so they should be verbose.
-NO_SETTER = \u6B64\u5C5E\u6027\u5177\u6709 getter "{0}" \u4F46\u6CA1\u6709 setter\u3002\u8981\u89E3\u7F16\u96C6, \u8BF7\u5B9A\u4E49 setter\u3002(\u5982\u679C\u8FD9\u662F\u96C6\u5408\u5C5E\u6027, \u8BF7\u786E\u4FDD getter \u8FD4\u56DE\u96C6\u5408\u5B9E\u4F8B\u3002)
-
-NO_GETTER = \u6B64\u5C5E\u6027\u5177\u6709 setter "{0}" \u4F46\u6CA1\u6709 getter\u3002\u8981\u7528\u4E8E\u7F16\u96C6\u5668, \u8BF7\u5B9A\u4E49 getter\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_zh_TW.properties
deleted file mode 100644
index 5e734b7e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_zh_TW.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-UNABLE_TO_ACCESS_NON_PUBLIC_FIELD = \u7121\u6CD5\u5C07 {0}.{1} \u8A2D\u70BA\u53EF\u5B58\u53D6.
-
-UNASSIGNABLE_TYPE = \u6B04\u4F4D\u7684\u985E\u578B\u70BA {0}, \u4F46\u7269\u4EF6\u7684\u985E\u578B\u70BA {1}
-
-# these are normally developer error, so they should be verbose.
-NO_SETTER = \u7279\u6027\u5305\u542B getter "{0}", \u4F46\u672A\u5305\u542B setter. \u82E5\u8981\u89E3\u9664\u5C01\u9001\u8655\u7406 (Unmarshal), \u8ACB\u5B9A\u7FA9 setter. (\u6216\u8005, \u82E5\u9019\u662F\u96C6\u5408\u7279\u6027, \u8ACB\u78BA\u5B9A getter \u6703\u50B3\u56DE\u96C6\u5408\u57F7\u884C\u8655\u7406.)
-
-NO_GETTER = \u7279\u6027\u5305\u542B setter "{0}", \u4F46\u672A\u5305\u542B getter. \u8ACB\u5B9A\u7FA9\u5C01\u9001\u8655\u7406\u7A0B\u5F0F (Marshaller) \u7684 getter.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/NullSafeAccessor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/NullSafeAccessor.java
deleted file mode 100644
index 752e0e70..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/NullSafeAccessor.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-
-/**
- * {@link Accessor} wrapper that replaces a null with an empty collection.
- *
- * <p>
- * This is so that JAX-WS property accessor will work like an ordinary getter.
- *
- *
- * @author Kohsuke Kawaguchi
- */
-public class NullSafeAccessor<B,V,P> extends Accessor<B,V> {
- private final Accessor<B,V> core;
- private final Lister<B,V,?,P> lister;
-
- public NullSafeAccessor(Accessor<B,V> core, Lister<B,V,?,P> lister) {
- super(core.getValueType());
- this.core = core;
- this.lister = lister;
- }
-
- public V get(B bean) throws AccessorException {
- V v = core.get(bean);
- if(v==null) {
- // creates a new object
- P pack = lister.startPacking(bean,core);
- lister.endPacking(pack,bean,core);
- v = core.get(bean);
- }
- return v;
- }
-
- public void set(B bean, V value) throws AccessorException {
- core.set(bean,value);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerBoolean.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerBoolean.java
deleted file mode 100644
index 853b2373..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerBoolean.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-/**
- * {@link Lister} for primitive type arrays.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
- * </p>
- */
-final class PrimitiveArrayListerBoolean<BeanT> extends Lister<BeanT,boolean[],Boolean,PrimitiveArrayListerBoolean.BooleanArrayPack> {
-
- private PrimitiveArrayListerBoolean() {
- }
-
- /*package*/ static void register() {
- Lister.primitiveArrayListers.put(Boolean.TYPE,new PrimitiveArrayListerBoolean());
- }
-
- public ListIterator<Boolean> iterator(final boolean[] objects, XMLSerializer context) {
- return new ListIterator<Boolean>() {
- int idx=0;
- public boolean hasNext() {
- return idx<objects.length;
- }
-
- public Boolean next() {
- return objects[idx++];
- }
- };
- }
-
- public BooleanArrayPack startPacking(BeanT current, Accessor<BeanT, boolean[]> acc) {
- return new BooleanArrayPack();
- }
-
- public void addToPack(BooleanArrayPack objects, Boolean o) {
- objects.add(o);
- }
-
- public void endPacking( BooleanArrayPack pack, BeanT bean, Accessor<BeanT,boolean[]> acc ) throws AccessorException {
- acc.set(bean,pack.build());
- }
-
- public void reset(BeanT o,Accessor<BeanT,boolean[]> acc) throws AccessorException {
- acc.set(o,new boolean[0]);
- }
-
- static final class BooleanArrayPack {
- boolean[] buf = new boolean[16];
- int size;
-
- void add(Boolean b) {
- if(buf.length==size) {
- // realloc
- boolean[] nb = new boolean[buf.length*2];
- System.arraycopy(buf,0,nb,0,buf.length);
- buf = nb;
- }
- if(b!=null)
- buf[size++] = b;
- }
-
- boolean[] build() {
- if(buf.length==size)
- // if we are lucky enough
- return buf;
-
- boolean[] r = new boolean[size];
- System.arraycopy(buf,0,r,0,size);
- return r;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerByte.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerByte.java
deleted file mode 100644
index de8715cc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerByte.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-/**
- * {@link Lister} for primitive type arrays.
- *
- * <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
- */
-final class PrimitiveArrayListerByte<BeanT> extends Lister<BeanT,byte[],Byte,PrimitiveArrayListerByte.ByteArrayPack> {
-
- private PrimitiveArrayListerByte() {
- }
-
- /*package*/ static void register() {
- Lister.primitiveArrayListers.put(Byte.TYPE,new PrimitiveArrayListerByte());
- }
-
- public ListIterator<Byte> iterator(final byte[] objects, XMLSerializer context) {
- return new ListIterator<Byte>() {
- int idx=0;
- public boolean hasNext() {
- return idx<objects.length;
- }
-
- public Byte next() {
- return objects[idx++];
- }
- };
- }
-
- public ByteArrayPack startPacking(BeanT current, Accessor<BeanT, byte[]> acc) {
- return new ByteArrayPack();
- }
-
- public void addToPack(ByteArrayPack objects, Byte o) {
- objects.add(o);
- }
-
- public void endPacking( ByteArrayPack pack, BeanT bean, Accessor<BeanT,byte[]> acc ) throws AccessorException {
- acc.set(bean,pack.build());
- }
-
- public void reset(BeanT o,Accessor<BeanT,byte[]> acc) throws AccessorException {
- acc.set(o,new byte[0]);
- }
-
- static final class ByteArrayPack {
- byte[] buf = new byte[16];
- int size;
-
- void add(Byte b) {
- if(buf.length==size) {
- // realloc
- byte[] nb = new byte[buf.length*2];
- System.arraycopy(buf,0,nb,0,buf.length);
- buf = nb;
- }
- if(b!=null)
- buf[size++] = b;
- }
-
- byte[] build() {
- if(buf.length==size)
- // if we are lucky enough
- return buf;
-
- byte[] r = new byte[size];
- System.arraycopy(buf,0,r,0,size);
- return r;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerCharacter.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerCharacter.java
deleted file mode 100644
index c50f53b0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerCharacter.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-/**
- * {@link Lister} for primitive type arrays.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
- * </p>
- */
-final class PrimitiveArrayListerCharacter<BeanT> extends Lister<BeanT,char[],Character,PrimitiveArrayListerCharacter.CharacterArrayPack> {
-
- private PrimitiveArrayListerCharacter() {
- }
-
- /*package*/ static void register() {
- Lister.primitiveArrayListers.put(Character.TYPE,new PrimitiveArrayListerCharacter());
- }
-
- public ListIterator<Character> iterator(final char[] objects, XMLSerializer context) {
- return new ListIterator<Character>() {
- int idx=0;
- public boolean hasNext() {
- return idx<objects.length;
- }
-
- public Character next() {
- return objects[idx++];
- }
- };
- }
-
- public CharacterArrayPack startPacking(BeanT current, Accessor<BeanT, char[]> acc) {
- return new CharacterArrayPack();
- }
-
- public void addToPack(CharacterArrayPack objects, Character o) {
- objects.add(o);
- }
-
- public void endPacking( CharacterArrayPack pack, BeanT bean, Accessor<BeanT,char[]> acc ) throws AccessorException {
- acc.set(bean,pack.build());
- }
-
- public void reset(BeanT o,Accessor<BeanT,char[]> acc) throws AccessorException {
- acc.set(o,new char[0]);
- }
-
- static final class CharacterArrayPack {
- char[] buf = new char[16];
- int size;
-
- void add(Character b) {
- if(buf.length==size) {
- // realloc
- char[] nb = new char[buf.length*2];
- System.arraycopy(buf,0,nb,0,buf.length);
- buf = nb;
- }
- if(b!=null)
- buf[size++] = b;
- }
-
- char[] build() {
- if(buf.length==size)
- // if we are lucky enough
- return buf;
-
- char[] r = new char[size];
- System.arraycopy(buf,0,r,0,size);
- return r;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerDouble.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerDouble.java
deleted file mode 100644
index bd6e03cd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerDouble.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-/**
- * {@link Lister} for primitive type arrays.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
- * </p>
- */
-final class PrimitiveArrayListerDouble<BeanT> extends Lister<BeanT,double[],Double,PrimitiveArrayListerDouble.DoubleArrayPack> {
-
- private PrimitiveArrayListerDouble() {
- }
-
- /*package*/ static void register() {
- Lister.primitiveArrayListers.put(Double.TYPE,new PrimitiveArrayListerDouble());
- }
-
- public ListIterator<Double> iterator(final double[] objects, XMLSerializer context) {
- return new ListIterator<Double>() {
- int idx=0;
- public boolean hasNext() {
- return idx<objects.length;
- }
-
- public Double next() {
- return objects[idx++];
- }
- };
- }
-
- public DoubleArrayPack startPacking(BeanT current, Accessor<BeanT, double[]> acc) {
- return new DoubleArrayPack();
- }
-
- public void addToPack(DoubleArrayPack objects, Double o) {
- objects.add(o);
- }
-
- public void endPacking( DoubleArrayPack pack, BeanT bean, Accessor<BeanT,double[]> acc ) throws AccessorException {
- acc.set(bean,pack.build());
- }
-
- public void reset(BeanT o,Accessor<BeanT,double[]> acc) throws AccessorException {
- acc.set(o,new double[0]);
- }
-
- static final class DoubleArrayPack {
- double[] buf = new double[16];
- int size;
-
- void add(Double b) {
- if(buf.length==size) {
- // realloc
- double[] nb = new double[buf.length*2];
- System.arraycopy(buf,0,nb,0,buf.length);
- buf = nb;
- }
- if(b!=null)
- buf[size++] = b;
- }
-
- double[] build() {
- if(buf.length==size)
- // if we are lucky enough
- return buf;
-
- double[] r = new double[size];
- System.arraycopy(buf,0,r,0,size);
- return r;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerFloat.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerFloat.java
deleted file mode 100644
index 5ced3035..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerFloat.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-/**
- * {@link Lister} for primitive type arrays.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
- * </p>
- */
-final class PrimitiveArrayListerFloat<BeanT> extends Lister<BeanT,float[],Float,PrimitiveArrayListerFloat.FloatArrayPack> {
-
- private PrimitiveArrayListerFloat() {
- }
-
- /*package*/ static void register() {
- Lister.primitiveArrayListers.put(Float.TYPE,new PrimitiveArrayListerFloat());
- }
-
- public ListIterator<Float> iterator(final float[] objects, XMLSerializer context) {
- return new ListIterator<Float>() {
- int idx=0;
- public boolean hasNext() {
- return idx<objects.length;
- }
-
- public Float next() {
- return objects[idx++];
- }
- };
- }
-
- public FloatArrayPack startPacking(BeanT current, Accessor<BeanT, float[]> acc) {
- return new FloatArrayPack();
- }
-
- public void addToPack(FloatArrayPack objects, Float o) {
- objects.add(o);
- }
-
- public void endPacking( FloatArrayPack pack, BeanT bean, Accessor<BeanT,float[]> acc ) throws AccessorException {
- acc.set(bean,pack.build());
- }
-
- public void reset(BeanT o,Accessor<BeanT,float[]> acc) throws AccessorException {
- acc.set(o,new float[0]);
- }
-
- static final class FloatArrayPack {
- float[] buf = new float[16];
- int size;
-
- void add(Float b) {
- if(buf.length==size) {
- // realloc
- float[] nb = new float[buf.length*2];
- System.arraycopy(buf,0,nb,0,buf.length);
- buf = nb;
- }
- if(b!=null)
- buf[size++] = b;
- }
-
- float[] build() {
- if(buf.length==size)
- // if we are lucky enough
- return buf;
-
- float[] r = new float[size];
- System.arraycopy(buf,0,r,0,size);
- return r;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerInteger.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerInteger.java
deleted file mode 100644
index 98a07546..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerInteger.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-/**
- * {@link Lister} for primitive type arrays.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
- * </p>
- */
-final class PrimitiveArrayListerInteger<BeanT> extends Lister<BeanT,int[],Integer,PrimitiveArrayListerInteger.IntegerArrayPack> {
-
- private PrimitiveArrayListerInteger() {
- }
-
- /*package*/ static void register() {
- Lister.primitiveArrayListers.put(Integer.TYPE,new PrimitiveArrayListerInteger());
- }
-
- public ListIterator<Integer> iterator(final int[] objects, XMLSerializer context) {
- return new ListIterator<Integer>() {
- int idx=0;
- public boolean hasNext() {
- return idx<objects.length;
- }
-
- public Integer next() {
- return objects[idx++];
- }
- };
- }
-
- public IntegerArrayPack startPacking(BeanT current, Accessor<BeanT, int[]> acc) {
- return new IntegerArrayPack();
- }
-
- public void addToPack(IntegerArrayPack objects, Integer o) {
- objects.add(o);
- }
-
- public void endPacking( IntegerArrayPack pack, BeanT bean, Accessor<BeanT,int[]> acc ) throws AccessorException {
- acc.set(bean,pack.build());
- }
-
- public void reset(BeanT o,Accessor<BeanT,int[]> acc) throws AccessorException {
- acc.set(o,new int[0]);
- }
-
- static final class IntegerArrayPack {
- int[] buf = new int[16];
- int size;
-
- void add(Integer b) {
- if(buf.length==size) {
- // realloc
- int[] nb = new int[buf.length*2];
- System.arraycopy(buf,0,nb,0,buf.length);
- buf = nb;
- }
- if(b!=null)
- buf[size++] = b;
- }
-
- int[] build() {
- if(buf.length==size)
- // if we are lucky enough
- return buf;
-
- int[] r = new int[size];
- System.arraycopy(buf,0,r,0,size);
- return r;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerLong.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerLong.java
deleted file mode 100644
index 4412b7ed..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerLong.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-/**
- * {@link Lister} for primitive type arrays.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
- * </p>
- */
-final class PrimitiveArrayListerLong<BeanT> extends Lister<BeanT,long[],Long,PrimitiveArrayListerLong.LongArrayPack> {
-
- private PrimitiveArrayListerLong() {
- }
-
- /*package*/ static void register() {
- Lister.primitiveArrayListers.put(Long.TYPE,new PrimitiveArrayListerLong());
- }
-
- public ListIterator<Long> iterator(final long[] objects, XMLSerializer context) {
- return new ListIterator<Long>() {
- int idx=0;
- public boolean hasNext() {
- return idx<objects.length;
- }
-
- public Long next() {
- return objects[idx++];
- }
- };
- }
-
- public LongArrayPack startPacking(BeanT current, Accessor<BeanT, long[]> acc) {
- return new LongArrayPack();
- }
-
- public void addToPack(LongArrayPack objects, Long o) {
- objects.add(o);
- }
-
- public void endPacking( LongArrayPack pack, BeanT bean, Accessor<BeanT,long[]> acc ) throws AccessorException {
- acc.set(bean,pack.build());
- }
-
- public void reset(BeanT o,Accessor<BeanT,long[]> acc) throws AccessorException {
- acc.set(o,new long[0]);
- }
-
- static final class LongArrayPack {
- long[] buf = new long[16];
- int size;
-
- void add(Long b) {
- if(buf.length==size) {
- // realloc
- long[] nb = new long[buf.length*2];
- System.arraycopy(buf,0,nb,0,buf.length);
- buf = nb;
- }
- if(b!=null)
- buf[size++] = b;
- }
-
- long[] build() {
- if(buf.length==size)
- // if we are lucky enough
- return buf;
-
- long[] r = new long[size];
- System.arraycopy(buf,0,r,0,size);
- return r;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerShort.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerShort.java
deleted file mode 100644
index 8493f846..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/PrimitiveArrayListerShort.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-
-/**
- * {@link Lister} for primitive type arrays.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * B y t e ArrayLister is used as the master to generate the rest of the
- * lister classes. Do not modify the generated copies.
- * </p>
- */
-final class PrimitiveArrayListerShort<BeanT> extends Lister<BeanT,short[],Short,PrimitiveArrayListerShort.ShortArrayPack> {
-
- private PrimitiveArrayListerShort() {
- }
-
- /*package*/ static void register() {
- Lister.primitiveArrayListers.put(Short.TYPE,new PrimitiveArrayListerShort());
- }
-
- public ListIterator<Short> iterator(final short[] objects, XMLSerializer context) {
- return new ListIterator<Short>() {
- int idx=0;
- public boolean hasNext() {
- return idx<objects.length;
- }
-
- public Short next() {
- return objects[idx++];
- }
- };
- }
-
- public ShortArrayPack startPacking(BeanT current, Accessor<BeanT, short[]> acc) {
- return new ShortArrayPack();
- }
-
- public void addToPack(ShortArrayPack objects, Short o) {
- objects.add(o);
- }
-
- public void endPacking( ShortArrayPack pack, BeanT bean, Accessor<BeanT,short[]> acc ) throws AccessorException {
- acc.set(bean,pack.build());
- }
-
- public void reset(BeanT o,Accessor<BeanT,short[]> acc) throws AccessorException {
- acc.set(o,new short[0]);
- }
-
- static final class ShortArrayPack {
- short[] buf = new short[16];
- int size;
-
- void add(Short b) {
- if(buf.length==size) {
- // realloc
- short[] nb = new short[buf.length*2];
- System.arraycopy(buf,0,nb,0,buf.length);
- buf = nb;
- }
- if(b!=null)
- buf[size++] = b;
- }
-
- short[] build() {
- if(buf.length==size)
- // if we are lucky enough
- return buf;
-
- short[] r = new short[size];
- System.arraycopy(buf,0,r,0,size);
- return r;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java
deleted file mode 100644
index cb346f2e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect;
-
-import java.io.IOException;
-import java.util.concurrent.Callable;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.SAXException2;
-import com.sun.xml.internal.bind.WhiteSpaceProcessor;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElementRef;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.opt.OptimizedTransducedAccessorFactory;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Patcher;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.LocatorEx;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link Accessor} and {@link Transducer} combined into one object.
- *
- * <p>
- * This allows efficient conversions between primitive values and
- * String without using boxing.
- *
- * <p>
- * This abstraction only works for a single-value property.
- *
- * <p>
- * An instance of {@link TransducedAccessor} implicitly holds a
- * field of the {@code BeanT} that the accessors access.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class TransducedAccessor<BeanT> {
-
- /**
- * @see Transducer#useNamespace()
- */
- public boolean useNamespace() {
- return false;
- }
-
- /**
- * Obtain the value of the field and declares the namespace URIs used in
- * the value.
- *
- * @see Transducer#declareNamespace(Object, XMLSerializer)
- */
- public void declareNamespace( BeanT o, XMLSerializer w ) throws AccessorException, SAXException {
- }
-
- /**
- * Prints the responsible field of the given bean to the writer.
- *
- * <p>
- * Use {@link XMLSerializer#getInstance()} to access to the namespace bindings
- *
- * @return
- * if the accessor didn't yield a value, return null.
- */
- public abstract @Nullable CharSequence print(@NotNull BeanT o) throws AccessorException, SAXException;
-
- /**
- * Parses the text value into the responsible field of the given bean.
- *
- * <p>
- * Use {@link UnmarshallingContext#getInstance()} to access to the namespace bindings
- *
- * @throws AccessorException
- * if the transducer is used to parse an user bean that uses {@link XmlValue},
- * then this exception may occur when it tries to set the leaf value to the bean.
- * @throws RuntimeException
- * if the lexical form is incorrect. The method may throw a RuntimeException,
- * but it shouldn't cause the entire unmarshalling to fail.
- * @throws SAXException
- * if the parse method found an error, the error is reported, and then
- * the processing is aborted.
- */
- public abstract void parse(BeanT o, CharSequence lexical) throws AccessorException, SAXException;
-
- /**
- * Checks if the field has a value.
- */
- public abstract boolean hasValue(BeanT o) throws AccessorException;
-
-
-
-
-
-
-
-
-
-
-
- /**
- * Gets the {@link TransducedAccessor} appropriately configured for
- * the given property.
- *
- * <p>
- * This allows the implementation to use an optimized code.
- */
- public static <T> TransducedAccessor<T> get(JAXBContextImpl context, RuntimeNonElementRef ref) {
- Transducer xducer = RuntimeModelBuilder.createTransducer(ref);
- RuntimePropertyInfo prop = ref.getSource();
-
- if(prop.isCollection()) {
- return new ListTransducedAccessorImpl(xducer,prop.getAccessor(),
- Lister.create(Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()), prop.id(), prop.getAdapter()));
- }
-
- if(prop.id()==ID.IDREF)
- return new IDREFTransducedAccessorImpl(prop.getAccessor());
-
- if(xducer.isDefault() && context != null && !context.fastBoot) {
- TransducedAccessor xa = OptimizedTransducedAccessorFactory.get(prop);
- if(xa!=null) return xa;
- }
-
- if(xducer.useNamespace())
- return new CompositeContextDependentTransducedAccessorImpl( context, xducer, prop.getAccessor() );
- else
- return new CompositeTransducedAccessorImpl( context, xducer, prop.getAccessor() );
- }
-
- /**
- * Convenience method to write the value as a text inside an element
- * without any attributes.
- * Can be overridden for improved performance.
- *
- * <p>
- * The callee assumes that there's an associated value in the field.
- * No @xsi:type handling is expected.
- */
- public abstract void writeLeafElement(XMLSerializer w, Name tagName, BeanT o, String fieldName) throws SAXException, AccessorException, IOException, XMLStreamException;
-
- /**
- * Invokes one of the {@link XMLSerializer#text(String, String)} method
- * with the representation of data bested suited for this transduced accessor.
- */
- public abstract void writeText(XMLSerializer w, BeanT o, String fieldName) throws AccessorException, SAXException, IOException, XMLStreamException;
-
- static class CompositeContextDependentTransducedAccessorImpl<BeanT,ValueT> extends CompositeTransducedAccessorImpl<BeanT,ValueT> {
- public CompositeContextDependentTransducedAccessorImpl(JAXBContextImpl context,Transducer<ValueT> xducer, Accessor<BeanT,ValueT> acc) {
- super(context,xducer,acc);
- assert xducer.useNamespace();
- }
-
- @Override
- public boolean useNamespace() {
- return true;
- }
-
- @Override
- public void declareNamespace(BeanT bean, XMLSerializer w) throws AccessorException {
- ValueT o = acc.get(bean);
- if(o!=null)
- xducer.declareNamespace(o,w);
- }
-
- @Override
- public void writeLeafElement(XMLSerializer w, Name tagName, BeanT o, String fieldName) throws SAXException, AccessorException, IOException, XMLStreamException {
- w.startElement(tagName,null);
- declareNamespace(o,w);
- w.endNamespaceDecls(null);
- w.endAttributes();
- xducer.writeText(w,acc.get(o),fieldName);
- w.endElement();
- }
- }
-
-
- /**
- * Implementation of {@link TransducedAccessor} that
- * simply combines a {@link Transducer} and {@link Accessor}.
- */
- public static class CompositeTransducedAccessorImpl<BeanT,ValueT> extends TransducedAccessor<BeanT> {
- protected final Transducer<ValueT> xducer;
- protected final Accessor<BeanT,ValueT> acc;
-
- public CompositeTransducedAccessorImpl(JAXBContextImpl context, Transducer<ValueT> xducer, Accessor<BeanT,ValueT> acc) {
- this.xducer = xducer;
- this.acc = acc.optimize(context);
- }
-
- public CharSequence print(BeanT bean) throws AccessorException {
- ValueT o = acc.get(bean);
- if(o==null) return null;
- return xducer.print(o);
- }
-
- public void parse(BeanT bean, CharSequence lexical) throws AccessorException, SAXException {
- acc.set(bean,xducer.parse(lexical));
- }
-
- public boolean hasValue(BeanT bean) throws AccessorException {
- return acc.getUnadapted(bean)!=null;
- }
-
- @Override
- public void writeLeafElement(XMLSerializer w, Name tagName, BeanT o, String fieldName) throws SAXException, AccessorException, IOException, XMLStreamException {
- xducer.writeLeafElement(w,tagName,acc.get(o),fieldName);
- }
-
- @Override
- public void writeText(XMLSerializer w, BeanT o, String fieldName) throws AccessorException, SAXException, IOException, XMLStreamException {
- xducer.writeText(w,acc.get(o),fieldName);
- }
- }
-
- /**
- * {@link TransducedAccessor} for IDREF.
- *
- * BeanT: the type of the bean that contains this the IDREF field.
- * TargetT: the type of the bean pointed by IDREF.
- */
- private static final class IDREFTransducedAccessorImpl<BeanT,TargetT> extends DefaultTransducedAccessor<BeanT> {
- private final Accessor<BeanT,TargetT> acc;
- /**
- * The object that an IDREF resolves to should be
- * assignable to this type.
- */
- private final Class<TargetT> targetType;
-
- public IDREFTransducedAccessorImpl(Accessor<BeanT, TargetT> acc) {
- this.acc = acc;
- this.targetType = acc.getValueType();
- }
-
- public String print(BeanT bean) throws AccessorException, SAXException {
- TargetT target = acc.get(bean);
- if(target==null) return null;
-
- XMLSerializer w = XMLSerializer.getInstance();
- try {
- String id = w.grammar.getBeanInfo(target,true).getId(target,w);
- if(id==null)
- w.errorMissingId(target);
- return id;
- } catch (JAXBException e) {
- w.reportError(null,e);
- return null;
- }
- }
-
- private void assign( BeanT bean, TargetT t, UnmarshallingContext context ) throws AccessorException {
- if(!targetType.isInstance(t))
- context.handleError(Messages.UNASSIGNABLE_TYPE.format(targetType,t.getClass()));
- else
- acc.set(bean,t);
- }
-
- public void parse(final BeanT bean, CharSequence lexical) throws AccessorException, SAXException {
- final String idref = WhiteSpaceProcessor.trim(lexical).toString();
- final UnmarshallingContext context = UnmarshallingContext.getInstance();
-
- final Callable callable = context.getObjectFromId(idref,acc.valueType);
- if(callable==null) {
- // the IDResolver decided to abort it now
- context.errorUnresolvedIDREF(bean,idref,context.getLocator());
- return;
- }
-
- TargetT t;
- try {
- t = (TargetT)callable.call();
- } catch (SAXException e) {// from callable.call
- throw e;
- } catch (RuntimeException e) {// from callable.call
- throw e;
- } catch (Exception e) {// from callable.call
- throw new SAXException2(e);
- }
- if(t!=null) {
- assign(bean,t,context);
- } else {
- // try again later
- final LocatorEx loc = new LocatorEx.Snapshot(context.getLocator());
- context.addPatcher(new Patcher() {
- public void run() throws SAXException {
- try {
- TargetT t = (TargetT)callable.call();
- if(t==null) {
- context.errorUnresolvedIDREF(bean,idref,loc);
- } else {
- assign(bean,t,context);
- }
- } catch (AccessorException e) {
- context.handleError(e);
- } catch (SAXException e) {// from callable.call
- throw e;
- } catch (RuntimeException e) {// from callable.call
- throw e;
- } catch (Exception e) {// from callable.call
- throw new SAXException2(e);
- }
- }
- });
- }
- }
-
- public boolean hasValue(BeanT bean) throws AccessorException {
- return acc.get(bean)!=null;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java
deleted file mode 100644
index 66598a14..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.reflect;
-
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Utils class.
- *
- * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages.
- *
- * Has *package private* access to avoid inappropriate usage.
- */
-final class Utils {
-
- private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
-
- /**
- * static ReflectionNavigator field to avoid usage of reflection every time we use it.
- */
- static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
-
- static { // we statically initializing REFLECTION_NAVIGATOR property
- try {
- final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
-
- // requires accessClassInPackage privilege
- final Method getInstance = AccessController.doPrivileged(
- new PrivilegedAction<Method>() {
- @Override
- public Method run() {
- try {
- Method getInstance = refNav.getDeclaredMethod("getInstance");
- getInstance.setAccessible(true);
- return getInstance;
- } catch (NoSuchMethodException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
- }
- }
- }
- );
-
- //noinspection unchecked
- REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
- } catch (ClassNotFoundException e) {
- throw new IllegalStateException("Can't find ReflectionNavigator class");
- } catch (InvocationTargetException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
- } catch (IllegalAccessException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
- } catch (SecurityException e) {
- LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
- throw e;
- }
- }
-
- /**
- * private constructor to avoid util class instantiating
- */
- private Utils() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java
deleted file mode 100644
index adc2610b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.reflect.opt;
-
-import java.io.InputStream;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import com.sun.xml.internal.bind.Util;
-import com.sun.xml.internal.bind.v2.bytecode.ClassTailor;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class AccessorInjector {
-
- private static final Logger logger = Util.getClassLogger();
-
- protected static final boolean noOptimize =
- Util.getSystemProperty(ClassTailor.class.getName()+".noOptimize")!=null;
-
- static {
- if(noOptimize)
- logger.info("The optimized code generation is disabled");
- }
-
- /**
- * Loads the optimized class and returns it.
- *
- * @return null
- * if it fails for some reason.
- */
- public static Class<?> prepare(
- Class beanClass, String templateClassName, String newClassName, String... replacements ) {
-
- if(noOptimize)
- return null;
-
- try {
- 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 = 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;
- } catch(SecurityException e) {
- // we don't have enough permission to do this
- logger.log(Level.INFO,"Unable to create an optimized TransducedAccessor ",e);
- return null;
- }
- }
-
-
- /**
- * Customizes a class file by replacing constant pools.
- *
- * @param templateClassName
- * The resource that contains the template class file.
- * @param replacements
- * A list of pair of strings that specify the substitution
- * {@code String[]{search_0, replace_0, search_1, replace_1, ..., search_n, replace_n }
- *
- * The search strings found in the constant pool will be replaced by the corresponding
- * replacement string.
- */
- private static byte[] tailor( String templateClassName, String newClassName, String... replacements ) {
- InputStream resource;
- if(CLASS_LOADER!=null)
- resource = CLASS_LOADER.getResourceAsStream(templateClassName+".class");
- else
- resource = ClassLoader.getSystemResourceAsStream(templateClassName+".class");
- if(resource==null)
- return null;
-
- return ClassTailor.tailor(resource,templateClassName,newClassName,replacements);
- }
-
- private static final ClassLoader CLASS_LOADER = SecureLoader.getClassClassLoader(AccessorInjector.class);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Bean.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Bean.java
deleted file mode 100644
index 7e90bddb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Bean.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-
-/**
- * Used by {@link TransducedAccessor} templates.
- *
- * <p>
- * Fields needs to have a distinctive name.
- *
- * @author Kohsuke Kawaguchi
- */
-final class Bean {
- public boolean f_boolean;
- public char f_char;
- public byte f_byte;
- public short f_short;
- int f_int;
- public long f_long;
- public float f_float;
- public double f_double;
- /**
- * Field of a reference type.
- * We need a distinctive type so that it can be easily replaced.
- */
- public Ref f_ref;
-
- public boolean get_boolean() { throw new UnsupportedOperationException(); }
- public void set_boolean(boolean b) { throw new UnsupportedOperationException(); }
-
- public char get_char() { throw new UnsupportedOperationException(); }
- public void set_char(char b) { throw new UnsupportedOperationException(); }
-
- public byte get_byte() { throw new UnsupportedOperationException(); }
- public void set_byte(byte b) { throw new UnsupportedOperationException(); }
-
- public short get_short() { throw new UnsupportedOperationException(); }
- public void set_short(short b) { throw new UnsupportedOperationException(); }
-
- public int get_int() { throw new UnsupportedOperationException(); }
- public void set_int(int b) { throw new UnsupportedOperationException(); }
-
- public long get_long() { throw new UnsupportedOperationException(); }
- public void set_long(long b) { throw new UnsupportedOperationException(); }
-
- public float get_float() { throw new UnsupportedOperationException(); }
- public void set_float(float b) { throw new UnsupportedOperationException(); }
-
- public double get_double() { throw new UnsupportedOperationException(); }
- public void set_double(double b) { throw new UnsupportedOperationException(); }
-
- public Ref get_ref() { throw new UnsupportedOperationException(); }
- public void set_ref(Ref r) { throw new UnsupportedOperationException(); }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Const.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Const.java
deleted file mode 100644
index 302f9a86..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Const.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public final class Const {
- public static byte default_value_byte = 0;
- public static boolean default_value_boolean = false;
- public static char default_value_char = 0;
- public static float default_value_float = 0;
- public static double default_value_double = 0;
- public static int default_value_int = 0;
- public static long default_value_long = 0;
- public static short default_value_short = 0;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Boolean.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Boolean.java
deleted file mode 100644
index e1e36db9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Boolean.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for boolean fields.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- */
-public class FieldAccessor_Boolean extends Accessor {
- public FieldAccessor_Boolean() {
- super(Boolean.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).f_boolean;
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).f_boolean = value==null ? Const.default_value_boolean : (Boolean)value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Byte.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Byte.java
deleted file mode 100644
index 71af46e0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Byte.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for byte fields.
- *
- * <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- *
- * @author Kohsuke Kawaguchi
- */
-public class FieldAccessor_Byte extends Accessor {
- public FieldAccessor_Byte() {
- super(Byte.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).f_byte;
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).f_byte = value==null ? Const.default_value_byte : (Byte)value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Character.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Character.java
deleted file mode 100644
index 171b42f7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Character.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for char fields.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- */
-public class FieldAccessor_Character extends Accessor {
- public FieldAccessor_Character() {
- super(Character.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).f_char;
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).f_char = value==null ? Const.default_value_char : (Character)value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Double.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Double.java
deleted file mode 100644
index be024e9a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Double.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for double fields.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- */
-public class FieldAccessor_Double extends Accessor {
- public FieldAccessor_Double() {
- super(Double.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).f_double;
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).f_double = value==null ? Const.default_value_double : (Double)value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Float.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Float.java
deleted file mode 100644
index d5e1af13..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Float.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for float fields.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- */
-public class FieldAccessor_Float extends Accessor {
- public FieldAccessor_Float() {
- super(Float.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).f_float;
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).f_float = value==null ? Const.default_value_float : (Float)value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Integer.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Integer.java
deleted file mode 100644
index 467fa79a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Integer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for int fields.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- */
-public class FieldAccessor_Integer extends Accessor {
- public FieldAccessor_Integer() {
- super(Integer.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).f_int;
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).f_int = value==null ? Const.default_value_int : (Integer)value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Long.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Long.java
deleted file mode 100644
index 1980cb33..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Long.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for long fields.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- */
-public class FieldAccessor_Long extends Accessor {
- public FieldAccessor_Long() {
- super(Long.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).f_long;
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).f_long = value==null ? Const.default_value_long : (Long)value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Ref.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Ref.java
deleted file mode 100644
index 0c5e6bdf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Ref.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for reference type fields.
- *
- * @author Kohsuke Kawaguchi
- */
-public class FieldAccessor_Ref extends Accessor {
- public FieldAccessor_Ref() {
- super(Ref.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).f_ref;
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).f_ref = (Ref)value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Short.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Short.java
deleted file mode 100644
index 49a000ae..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/FieldAccessor_Short.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for short fields.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the FieldAccessors are generated from <code>FieldAccessor_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- */
-public class FieldAccessor_Short extends Accessor {
- public FieldAccessor_Short() {
- super(Short.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).f_short;
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).f_short = value==null ? Const.default_value_short : (Short)value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java
deleted file mode 100644
index 78f4746a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.reflect.opt;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.ref.WeakReference;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.WeakHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import com.sun.xml.internal.bind.Util;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * A {@link ClassLoader} used to "inject" optimized accessor classes
- * into the VM.
- *
- * <p>
- * Its parent class loader needs to be set to the one that can see the user
- * class.
- *
- * @author Kohsuke Kawaguchi
- */
-final class Injector {
-
- /**
- * {@link Injector}s keyed by their parent {@link ClassLoader}.
- *
- * We only need one injector per one user class loader.
- */
- private static final ReentrantReadWriteLock irwl = new ReentrantReadWriteLock();
- private static final Lock ir = irwl.readLock();
- private static final Lock iw = irwl.writeLock();
- private static final Map<ClassLoader, WeakReference<Injector>> injectors =
- new WeakHashMap<ClassLoader, WeakReference<Injector>>();
- private static final Logger logger = Util.getClassLogger();
-
- /**
- * Injects a new class into the given class loader.
- *
- * @return null
- * if it fails to inject.
- */
- static Class inject(ClassLoader cl, String className, byte[] image) {
- Injector injector = get(cl);
- if (injector != null) {
- return injector.inject(className, image);
- } else {
- return null;
- }
- }
-
- /**
- * Returns the already injected class, or null.
- */
- static Class find(ClassLoader cl, String className) {
- Injector injector = get(cl);
- if (injector != null) {
- return injector.find(className);
- } else {
- return null;
- }
- }
-
- /**
- * Gets or creates an {@link Injector} for the given class loader.
- *
- * @return null
- * if it fails.
- */
- private static Injector get(ClassLoader cl) {
- Injector injector = null;
- WeakReference<Injector> wr;
- ir.lock();
- try {
- wr = injectors.get(cl);
- } finally {
- ir.unlock();
- }
- if (wr != null) {
- injector = wr.get();
- }
- if (injector == null) {
- try {
- wr = new WeakReference<Injector>(injector = new Injector(cl));
- iw.lock();
- try {
- if (!injectors.containsKey(cl)) {
- injectors.put(cl, wr);
- }
- } finally {
- iw.unlock();
- }
- } catch (SecurityException e) {
- logger.log(Level.FINE, "Unable to set up a back-door for the injector", e);
- return null;
- }
- }
- return injector;
- }
- /**
- * Injected classes keyed by their names.
- */
- private final Map<String, Class> classes = new HashMap<String, Class>();
- private final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock();
- private final Lock r = rwl.readLock();
- private final Lock w = rwl.writeLock();
- private final ClassLoader parent;
- /**
- * True if this injector is capable of injecting accessors.
- * False otherwise, which happens if this classloader can't see {@link Accessor}.
- */
- private final boolean loadable;
- private static final Method defineClass;
- private static final Method resolveClass;
- private static final Method findLoadedClass;
-
- static {
- try {
- defineClass = ClassLoader.class.getDeclaredMethod("defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE);
- resolveClass = ClassLoader.class.getDeclaredMethod("resolveClass", Class.class);
- findLoadedClass = ClassLoader.class.getDeclaredMethod("findLoadedClass", String.class);
- } catch (NoSuchMethodException e) {
- // impossible
- throw new NoSuchMethodError(e.getMessage());
- }
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
-
- @Override
- public Void run() {
- // TODO: check security implication
- // do these setAccessible allow anyone to call these methods freely?s
- defineClass.setAccessible(true);
- resolveClass.setAccessible(true);
- findLoadedClass.setAccessible(true);
- return null;
- }
- });
- }
-
- private Injector(ClassLoader parent) {
- this.parent = parent;
- assert parent != null;
-
- boolean loadableCheck = false;
-
- try {
- loadableCheck = parent.loadClass(Accessor.class.getName()) == Accessor.class;
- } catch (ClassNotFoundException e) {
- // not loadable
- }
-
- this.loadable = loadableCheck;
- }
-
- @SuppressWarnings("LockAcquiredButNotSafelyReleased")
- private Class inject(String className, byte[] image) {
- if (!loadable) // this injector cannot inject anything
- {
- return null;
- }
-
- boolean wlocked = false;
- boolean rlocked = false;
- try {
-
- r.lock();
- rlocked = true;
-
- Class c = classes.get(className);
-
- // Unlock now during the findLoadedClass process to avoid
- // deadlocks
- r.unlock();
- rlocked = false;
-
- //find loaded class from classloader
- if (c == null) {
-
- try {
- c = (Class) findLoadedClass.invoke(parent, className.replace('/', '.'));
- } catch (IllegalArgumentException e) {
- logger.log(Level.FINE, "Unable to find " + className, e);
- } catch (IllegalAccessException e) {
- logger.log(Level.FINE, "Unable to find " + className, e);
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- logger.log(Level.FINE, "Unable to find " + className, t);
- }
-
- if (c != null) {
-
- w.lock();
- wlocked = true;
-
- classes.put(className, c);
-
- w.unlock();
- wlocked = false;
-
- return c;
- }
- }
-
- if (c == null) {
-
- r.lock();
- rlocked = true;
-
- c = classes.get(className);
-
- // Unlock now during the define/resolve process to avoid
- // deadlocks
- r.unlock();
- rlocked = false;
-
- if (c == null) {
-
- // we need to inject a class into the
- try {
- c = (Class) defineClass.invoke(parent, className.replace('/', '.'), image, 0, image.length);
- resolveClass.invoke(parent, c);
- } catch (IllegalAccessException e) {
- logger.log(Level.FINE, "Unable to inject " + className, e);
- return null;
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof LinkageError) {
- logger.log(Level.FINE, "duplicate class definition bug occured? Please report this : " + className, t);
- } else {
- logger.log(Level.FINE, "Unable to inject " + className, t);
- }
- return null;
- } catch (SecurityException e) {
- logger.log(Level.FINE, "Unable to inject " + className, e);
- return null;
- } catch (LinkageError e) {
- logger.log(Level.FINE, "Unable to inject " + className, e);
- return null;
- }
-
- w.lock();
- wlocked = true;
-
- // During the time we were unlocked, we could have tried to
- // load the class from more than one thread. Check now to see
- // if someone else beat us to registering this class
- if (!classes.containsKey(className)) {
- classes.put(className, c);
- }
-
- w.unlock();
- wlocked = false;
- }
- }
- return c;
- } finally {
- if (rlocked) {
- r.unlock();
- }
- if (wlocked) {
- w.unlock();
- }
- }
- }
-
- private Class find(String className) {
- r.lock();
- try {
- return classes.get(className);
- } finally {
- r.unlock();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Boolean.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Boolean.java
deleted file mode 100644
index 07fde9b0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Boolean.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for boolean getter/setter.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- */
-public class MethodAccessor_Boolean extends Accessor {
- public MethodAccessor_Boolean() {
- super(Boolean.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).get_boolean();
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).set_boolean( value==null ? Const.default_value_boolean : (Boolean)value );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Byte.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Byte.java
deleted file mode 100644
index e43c889d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Byte.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for boolean getter/setter.
- *
- * <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- *
- * @author Kohsuke Kawaguchi
- */
-public class MethodAccessor_Byte extends Accessor {
- public MethodAccessor_Byte() {
- super(Byte.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).get_byte();
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).set_byte( value==null ? Const.default_value_byte : (Byte)value );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Character.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Character.java
deleted file mode 100644
index 856d3550..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Character.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for boolean getter/setter.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- */
-public class MethodAccessor_Character extends Accessor {
- public MethodAccessor_Character() {
- super(Character.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).get_char();
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).set_char( value==null ? Const.default_value_char : (Character)value );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Double.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Double.java
deleted file mode 100644
index 4b12972b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Double.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for boolean getter/setter.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- */
-public class MethodAccessor_Double extends Accessor {
- public MethodAccessor_Double() {
- super(Double.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).get_double();
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).set_double( value==null ? Const.default_value_double : (Double)value );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Float.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Float.java
deleted file mode 100644
index 54d9af2c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Float.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for boolean getter/setter.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- */
-public class MethodAccessor_Float extends Accessor {
- public MethodAccessor_Float() {
- super(Float.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).get_float();
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).set_float( value==null ? Const.default_value_float : (Float)value );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Integer.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Integer.java
deleted file mode 100644
index 8b5ea50f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Integer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for boolean getter/setter.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- */
-public class MethodAccessor_Integer extends Accessor {
- public MethodAccessor_Integer() {
- super(Integer.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).get_int();
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).set_int( value==null ? Const.default_value_int : (Integer)value );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Long.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Long.java
deleted file mode 100644
index f7d2c261..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Long.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for boolean getter/setter.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- */
-public class MethodAccessor_Long extends Accessor {
- public MethodAccessor_Long() {
- super(Long.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).get_long();
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).set_long( value==null ? Const.default_value_long : (Long)value );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Ref.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Ref.java
deleted file mode 100644
index d756b074..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Ref.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for reference types getter/setter.
- *
- * @author Kohsuke Kawaguchi
- */
-public class MethodAccessor_Ref extends Accessor {
- public MethodAccessor_Ref() {
- super(Ref.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).get_ref();
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).set_ref((Ref)value);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Short.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Short.java
deleted file mode 100644
index f91bc0b7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/MethodAccessor_Short.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-/**
- * Template {@link Accessor} for boolean getter/setter.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the MethodAccessors are generated from <code>MethodAccessor_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- */
-public class MethodAccessor_Short extends Accessor {
- public MethodAccessor_Short() {
- super(Short.class);
- }
-
- public Object get(Object bean) {
- return ((Bean)bean).get_short();
- }
-
- public void set(Object bean, Object value) {
- ((Bean)bean).set_short( value==null ? Const.default_value_short : (Short)value );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedAccessorFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedAccessorFactory.java
deleted file mode 100644
index ee1506f5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedAccessorFactory.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.reflect.opt;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import com.sun.xml.internal.bind.Util;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.RuntimeUtil;
-
-import static com.sun.xml.internal.bind.v2.bytecode.ClassTailor.toVMClassName;
-import static com.sun.xml.internal.bind.v2.bytecode.ClassTailor.toVMTypeName;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public abstract class OptimizedAccessorFactory {
- private OptimizedAccessorFactory() {} // no instanciation please
-
- private static final Logger logger = Util.getClassLogger();
-
-
- private static final String fieldTemplateName;
- private static final String methodTemplateName;
-
- static {
- String s = FieldAccessor_Byte.class.getName();
- fieldTemplateName = s.substring(0,s.length()-"Byte".length()).replace('.','/');
-
- s = MethodAccessor_Byte.class.getName();
- methodTemplateName = s.substring(0,s.length()-"Byte".length()).replace('.','/');
- }
-
- /**
- * Gets the optimized {@link Accessor} that accesses the given getter/setter.
- *
- * @return null
- * if for some reason it fails to create an optimized version.
- */
- public static final <B,V> Accessor<B,V> get(Method getter, Method setter) {
- // make sure the method signatures are what we expect
- if(getter.getParameterTypes().length!=0)
- return null;
- Class<?>[] sparams = setter.getParameterTypes();
- if(sparams.length!=1)
- return null;
- if(sparams[0]!=getter.getReturnType())
- return null;
- if(setter.getReturnType()!=Void.TYPE)
- return null;
- if(getter.getDeclaringClass()!=setter.getDeclaringClass())
- return null;
- if(Modifier.isPrivate(getter.getModifiers()) || Modifier.isPrivate(setter.getModifiers()))
- // we can't access private fields
- return null;
-
- Class t = sparams[0];
- String typeName = t.getName().replace('.','_');
- if (t.isArray()) {
- typeName = "AOf_";
- String compName = t.getComponentType().getName().replace('.','_');
- while (compName.startsWith("[L")) {
- compName = compName.substring(2);
- typeName += "AOf_";
- }
- typeName = typeName + compName;
- }
-
- String newClassName = toVMClassName(getter.getDeclaringClass())+"$JaxbAccessorM_"+getter.getName()+'_'+setter.getName()+'_'+typeName;
- Class opt;
-
- if(t.isPrimitive())
- opt = AccessorInjector.prepare( getter.getDeclaringClass(),
- methodTemplateName+RuntimeUtil.primitiveToBox.get(t).getSimpleName(),
- newClassName,
- toVMClassName(Bean.class),
- toVMClassName(getter.getDeclaringClass()),
- "get_"+t.getName(),
- getter.getName(),
- "set_"+t.getName(),
- setter.getName());
- else
- opt = AccessorInjector.prepare( getter.getDeclaringClass(),
- methodTemplateName+"Ref",
- newClassName,
- toVMClassName(Bean.class),
- toVMClassName(getter.getDeclaringClass()),
- toVMClassName(Ref.class),
- toVMClassName(t),
- "()"+toVMTypeName(Ref.class),
- "()"+toVMTypeName(t),
- '('+toVMTypeName(Ref.class)+")V",
- '('+toVMTypeName(t)+")V",
- "get_ref",
- getter.getName(),
- "set_ref",
- setter.getName());
-
- if(opt==null)
- return null;
-
- Accessor<B,V> acc = instanciate(opt);
- 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;
- }
-
-
- /**
- * Gets the optimized {@link Accessor} that accesses the given field.
- *
- * @return null
- * if for some reason it fails to create an optimized version.
- */
- public static final <B,V> Accessor<B,V> get(Field field) {
- int mods = field.getModifiers();
- if(Modifier.isPrivate(mods) || Modifier.isFinal(mods))
- // we can't access private fields
- return null;
-
- String newClassName = toVMClassName(field.getDeclaringClass())+"$JaxbAccessorF_"+field.getName();
-
- Class opt;
-
- if(field.getType().isPrimitive())
- opt = AccessorInjector.prepare( field.getDeclaringClass(),
- fieldTemplateName+RuntimeUtil.primitiveToBox.get(field.getType()).getSimpleName(),
- newClassName,
- toVMClassName(Bean.class),
- toVMClassName(field.getDeclaringClass()),
- "f_"+field.getType().getName(),
- field.getName() );
- else
- opt = AccessorInjector.prepare( field.getDeclaringClass(),
- fieldTemplateName+"Ref",
- newClassName,
- toVMClassName(Bean.class),
- toVMClassName(field.getDeclaringClass()),
- toVMClassName(Ref.class),
- toVMClassName(field.getType()),
- toVMTypeName(Ref.class),
- toVMTypeName(field.getType()),
- "f_ref",
- field.getName() );
-
- if(opt==null)
- return null;
-
- Accessor<B,V> acc = instanciate(opt);
- if (acc!=null) {
- if (logger.isLoggable(Level.FINE)) {
- logger.log(Level.FINE, "Using optimized Accessor for {0}", field);
- }
- }
- return acc;
- }
-
- private static <B,V> Accessor<B,V> instanciate(Class opt) {
- try {
- return (Accessor<B,V>)opt.newInstance();
- } catch (InstantiationException e) {
- logger.log(Level.INFO,"failed to load an optimized Accessor",e);
- } catch (IllegalAccessException e) {
- logger.log(Level.INFO,"failed to load an optimized Accessor",e);
- } catch (SecurityException e) {
- logger.log(Level.INFO,"failed to load an optimized Accessor",e);
- }
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedTransducedAccessorFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedTransducedAccessorFactory.java
deleted file mode 100644
index 90f8d27d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedTransducedAccessorFactory.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.Type;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import com.sun.xml.internal.bind.Util;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeClassInfo;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-
-import static com.sun.xml.internal.bind.v2.bytecode.ClassTailor.toVMClassName;
-
-/**
- * Prepares optimized {@link TransducedAccessor} from templates.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class OptimizedTransducedAccessorFactory {
- private OptimizedTransducedAccessorFactory() {} // no instanciation please
-
- // http://java.sun.com/docs/books/vmspec/2nd-edition/html/ConstantPool.doc.html#75929
- // "same runtime package"
-
- private static final Logger logger = Util.getClassLogger();
-
- private static final String fieldTemplateName;
- private static final String methodTemplateName;
-
- static {
- String s = TransducedAccessor_field_Byte.class.getName();
- fieldTemplateName = s.substring(0,s.length()-"Byte".length()).replace('.','/');
-
- s = TransducedAccessor_method_Byte.class.getName();
- methodTemplateName = s.substring(0,s.length()-"Byte".length()).replace('.','/');
- }
-
- /**
- * Gets the optimized {@link TransducedAccessor} if possible.
- *
- * @return null
- * if for some reason it fails to create an optimized version.
- */
- public static final TransducedAccessor get(RuntimePropertyInfo prop) {
- Accessor acc = prop.getAccessor();
-
- // consider using an optimized TransducedAccessor implementations.
- Class opt=null;
-
- TypeInfo<Type,Class> parent = prop.parent();
- if(!(parent instanceof RuntimeClassInfo))
- return null;
-
- Class dc = ((RuntimeClassInfo)parent).getClazz();
- String newClassName = toVMClassName(dc)+"_JaxbXducedAccessor_"+prop.getName();
-
-
- if(acc instanceof Accessor.FieldReflection) {
- // TODO: we also need to make sure that the default xducer is used.
- Accessor.FieldReflection racc = (Accessor.FieldReflection) acc;
- Field field = racc.f;
-
- int mods = field.getModifiers();
- if(Modifier.isPrivate(mods) || Modifier.isFinal(mods))
- // we can't access private fields.
- // TODO: think about how to improve this case
- return null;
-
- Class<?> t = field.getType();
- if(t.isPrimitive())
- opt = AccessorInjector.prepare( dc,
- fieldTemplateName+suffixMap.get(t),
- newClassName,
- toVMClassName(Bean.class),
- toVMClassName(dc),
- "f_"+t.getName(),
- field.getName() );
- }
-
- if(acc.getClass()==Accessor.GetterSetterReflection.class) {
- Accessor.GetterSetterReflection gacc = (Accessor.GetterSetterReflection) acc;
-
- if(gacc.getter==null || gacc.setter==null)
- return null; // incomplete
-
- Class<?> t = gacc.getter.getReturnType();
-
- if(Modifier.isPrivate(gacc.getter.getModifiers())
- || Modifier.isPrivate(gacc.setter.getModifiers()))
- // we can't access private methods.
- return null;
-
-
- if(t.isPrimitive())
- opt = AccessorInjector.prepare( dc,
- methodTemplateName+suffixMap.get(t),
- newClassName,
- toVMClassName(Bean.class),
- toVMClassName(dc),
- "get_"+t.getName(),
- gacc.getter.getName(),
- "set_"+t.getName(),
- gacc.setter.getName());
- }
-
- if(opt==null)
- return null;
-
- logger.log(Level.FINE,"Using optimized TransducedAccessor for "+prop.displayName());
-
-
- try {
- return (TransducedAccessor)opt.newInstance();
- } catch (InstantiationException e) {
- logger.log(Level.INFO,"failed to load an optimized TransducedAccessor",e);
- } catch (IllegalAccessException e) {
- logger.log(Level.INFO,"failed to load an optimized TransducedAccessor",e);
- } catch (SecurityException e) {
- logger.log(Level.INFO,"failed to load an optimized TransducedAccessor",e);
- }
- return null;
- }
-
- private static final Map<Class,String> suffixMap = new HashMap<Class, String>();
-
- static {
- suffixMap.put(Byte.TYPE,"Byte");
- suffixMap.put(Short.TYPE,"Short");
- suffixMap.put(Integer.TYPE,"Integer");
- suffixMap.put(Long.TYPE,"Long");
- suffixMap.put(Boolean.TYPE,"Boolean");
- suffixMap.put(Float.TYPE,"Float");
- suffixMap.put(Double.TYPE,"Double");
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Ref.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Ref.java
deleted file mode 100644
index 35faccf6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Ref.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-
-/**
- * Used by {@link TransducedAccessor} templates.
- *
- * @author Kohsuke Kawaguchi
- * @see Bean
- */
-final class Ref {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/SecureLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/SecureLoader.java
deleted file mode 100644
index 8bad036e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/SecureLoader.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-/**
- * Class defined for safe calls of getClassLoader methods of any kind (context/system/class
- * classloader. This MUST be package private and defined in every package which
- * uses such invocations.
- * @author snajper
- */
-class SecureLoader {
-
- static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Boolean.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Boolean.java
deleted file mode 100644
index d1bbc73b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Boolean.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.DefaultTransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-
-/**
- * Template {@link TransducedAccessor} for a boolean field.
- *
- * <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- *
- * @author Kohsuke Kawaguchi
- *
- * @see TransducedAccessor#get
- */
-public final class TransducedAccessor_field_Boolean extends DefaultTransducedAccessor {
- public String print(Object o) {
- return DatatypeConverterImpl._printBoolean( ((Bean)o).f_boolean );
- }
-
- public void parse(Object o, CharSequence lexical) {
- Boolean b = DatatypeConverterImpl._parseBoolean(lexical);
-
- if(b != null)
- ((Bean)o).f_boolean=b;
- }
-
- public boolean hasValue(Object o) {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Byte.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Byte.java
deleted file mode 100644
index d399d98e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Byte.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.DefaultTransducedAccessor;
-
-/**
- * Template {@link TransducedAccessor} for a byte field.
- *
- * <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- *
- * @author Kohsuke Kawaguchi
- *
- * @see TransducedAccessor#get
- */
-public final class TransducedAccessor_field_Byte extends DefaultTransducedAccessor {
- public String print(Object o) {
- return DatatypeConverterImpl._printByte( ((Bean)o).f_byte );
- }
-
- public void parse(Object o, CharSequence lexical) {
- ((Bean)o).f_byte=DatatypeConverterImpl._parseByte(lexical);
- }
-
- public boolean hasValue(Object o) {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Double.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Double.java
deleted file mode 100644
index 54f7dbe6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Double.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.DefaultTransducedAccessor;
-
-/**
- * Template {@link TransducedAccessor} for a double field.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- *
- * @see TransducedAccessor#get
- */
-public final class TransducedAccessor_field_Double extends DefaultTransducedAccessor {
- public String print(Object o) {
- return DatatypeConverterImpl._printDouble( ((Bean)o).f_double );
- }
-
- public void parse(Object o, CharSequence lexical) {
- ((Bean)o).f_double=DatatypeConverterImpl._parseDouble(lexical);
- }
-
- public boolean hasValue(Object o) {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Float.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Float.java
deleted file mode 100644
index 6b67f61e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Float.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.DefaultTransducedAccessor;
-
-/**
- * Template {@link TransducedAccessor} for a float field.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- *
- * @see TransducedAccessor#get
- */
-public final class TransducedAccessor_field_Float extends DefaultTransducedAccessor {
- public String print(Object o) {
- return DatatypeConverterImpl._printFloat( ((Bean)o).f_float );
- }
-
- public void parse(Object o, CharSequence lexical) {
- ((Bean)o).f_float=DatatypeConverterImpl._parseFloat(lexical);
- }
-
- public boolean hasValue(Object o) {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Integer.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Integer.java
deleted file mode 100644
index 6ebd80bf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Integer.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import java.io.IOException;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.DefaultTransducedAccessor;
-
-import org.xml.sax.SAXException;
-
-/**
- * Template {@link TransducedAccessor} for a byte field.
- *
- * <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- *
- * @author Kohsuke Kawaguchi
- *
- * @see TransducedAccessor#get
- */
-public final class TransducedAccessor_field_Integer extends DefaultTransducedAccessor {
- public String print(Object o) {
- return DatatypeConverterImpl._printInt( ((Bean)o).f_int );
- }
-
- public void parse(Object o, CharSequence lexical) {
- ((Bean)o).f_int=DatatypeConverterImpl._parseInt(lexical);
- }
-
- public boolean hasValue(Object o) {
- return true;
- }
-
- @Override
- public void writeLeafElement(XMLSerializer w, Name tagName, Object o, String fieldName) throws SAXException, AccessorException, IOException, XMLStreamException {
- w.leafElement(tagName, ((Bean)o).f_int, fieldName );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Long.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Long.java
deleted file mode 100644
index beb68e56..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Long.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.DefaultTransducedAccessor;
-
-/**
- * Template {@link TransducedAccessor} for a long field.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- *
- * @see TransducedAccessor#get
- */
-public final class TransducedAccessor_field_Long extends DefaultTransducedAccessor {
- public String print(Object o) {
- return DatatypeConverterImpl._printLong( ((Bean)o).f_long );
- }
-
- public void parse(Object o, CharSequence lexical) {
- ((Bean)o).f_long=DatatypeConverterImpl._parseLong(lexical);
- }
-
- public boolean hasValue(Object o) {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Short.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Short.java
deleted file mode 100644
index 437f9117..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_field_Short.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.DefaultTransducedAccessor;
-
-/**
- * Template {@link TransducedAccessor} for a short field.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- *
- * @see TransducedAccessor#get
- */
-public final class TransducedAccessor_field_Short extends DefaultTransducedAccessor {
- public String print(Object o) {
- return DatatypeConverterImpl._printShort( ((Bean)o).f_short );
- }
-
- public void parse(Object o, CharSequence lexical) {
- ((Bean)o).f_short=DatatypeConverterImpl._parseShort(lexical);
- }
-
- public boolean hasValue(Object o) {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Boolean.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Boolean.java
deleted file mode 100644
index f7cd6ccd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Boolean.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.DefaultTransducedAccessor;
-
-/**
- * Template {@link TransducedAccessor} for a boolean field.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- *
- * @see TransducedAccessor#get
- */
-public final class TransducedAccessor_method_Boolean extends DefaultTransducedAccessor {
- public String print(Object o) {
- return DatatypeConverterImpl._printBoolean( ((Bean)o).get_boolean() );
- }
-
- public void parse(Object o, CharSequence lexical) {
- ((Bean)o).set_boolean(DatatypeConverterImpl._parseBoolean(lexical));
- }
-
- public boolean hasValue(Object o) {
- return true;
- }
-//
-// public void writeLeafElement(Object o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
-// w.leafElement(tagName, ((Bean)o).get_boolean(), fieldName );
-// }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Byte.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Byte.java
deleted file mode 100644
index de700f06..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Byte.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.DefaultTransducedAccessor;
-
-/**
- * Template {@link TransducedAccessor} for a byte field.
- *
- * <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- *
- * @author Kohsuke Kawaguchi
- *
- * @see TransducedAccessor#get
- */
-public final class TransducedAccessor_method_Byte extends DefaultTransducedAccessor {
- public String print(Object o) {
- return DatatypeConverterImpl._printByte( ((Bean)o).get_byte() );
- }
-
- public void parse(Object o, CharSequence lexical) {
- ((Bean)o).set_byte(DatatypeConverterImpl._parseByte(lexical));
- }
-
- public boolean hasValue(Object o) {
- return true;
- }
-//
-// public void writeLeafElement(Object o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
-// w.leafElement(tagName, ((Bean)o).get_byte(), fieldName );
-// }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Double.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Double.java
deleted file mode 100644
index fe87c4bb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Double.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.DefaultTransducedAccessor;
-
-/**
- * Template {@link TransducedAccessor} for a double field.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- *
- * @see TransducedAccessor#get
- */
-public final class TransducedAccessor_method_Double extends DefaultTransducedAccessor {
- public String print(Object o) {
- return DatatypeConverterImpl._printDouble( ((Bean)o).get_double() );
- }
-
- public void parse(Object o, CharSequence lexical) {
- ((Bean)o).set_double(DatatypeConverterImpl._parseDouble(lexical));
- }
-
- public boolean hasValue(Object o) {
- return true;
- }
-//
-// public void writeLeafElement(Object o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
-// w.leafElement(tagName, ((Bean)o).get_double(), fieldName );
-// }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Float.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Float.java
deleted file mode 100644
index 16a51cfd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Float.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.DefaultTransducedAccessor;
-
-/**
- * Template {@link TransducedAccessor} for a float field.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- *
- * @see TransducedAccessor#get
- */
-public final class TransducedAccessor_method_Float extends DefaultTransducedAccessor {
- public String print(Object o) {
- return DatatypeConverterImpl._printFloat( ((Bean)o).get_float() );
- }
-
- public void parse(Object o, CharSequence lexical) {
- ((Bean)o).set_float(DatatypeConverterImpl._parseFloat(lexical));
- }
-
- public boolean hasValue(Object o) {
- return true;
- }
-//
-// public void writeLeafElement(Object o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
-// w.leafElement(tagName, ((Bean)o).get_float(), fieldName );
-// }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Integer.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Integer.java
deleted file mode 100644
index a1dd3694..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Integer.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import java.io.IOException;
-
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.Name;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.DefaultTransducedAccessor;
-
-import org.xml.sax.SAXException;
-
-/**
- * Template {@link TransducedAccessor} for a byte field.
- *
- * <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- *
- * @author Kohsuke Kawaguchi
- *
- * @see TransducedAccessor#get
- */
-public final class TransducedAccessor_method_Integer extends DefaultTransducedAccessor {
- public String print(Object o) {
- return DatatypeConverterImpl._printInt( ((Bean)o).get_int() );
- }
-
- public void parse(Object o, CharSequence lexical) {
- ((Bean)o).set_int(DatatypeConverterImpl._parseInt(lexical));
- }
-
- public boolean hasValue(Object o) {
- return true;
- }
-
- @Override
- public void writeLeafElement(XMLSerializer w, Name tagName, Object o, String fieldName) throws SAXException, AccessorException, IOException, XMLStreamException {
- w.leafElement(tagName, ((Bean)o).get_int(), fieldName );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Long.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Long.java
deleted file mode 100644
index 3ca90705..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Long.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.DefaultTransducedAccessor;
-
-/**
- * Template {@link TransducedAccessor} for a long field.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- *
- * @see TransducedAccessor#get
- */
-public final class TransducedAccessor_method_Long extends DefaultTransducedAccessor {
- public String print(Object o) {
- return DatatypeConverterImpl._printLong( ((Bean)o).get_long() );
- }
-
- public void parse(Object o, CharSequence lexical) {
- ((Bean)o).set_long(DatatypeConverterImpl._parseLong(lexical));
- }
-
- public boolean hasValue(Object o) {
- return true;
- }
-//
-// public void writeLeafElement(Object o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
-// w.leafElement(tagName, ((Bean)o).get_long(), fieldName );
-// }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Short.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Short.java
deleted file mode 100644
index f4a50ef1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/TransducedAccessor_method_Short.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.reflect.opt;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.DefaultTransducedAccessor;
-
-/**
- * Template {@link TransducedAccessor} for a short field.
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- * <p>
- * All the TransducedAccessor_field are generated from <code>TransducedAccessor_field_B y t e</code>
- * </p>
- * @author Kohsuke Kawaguchi
- *
- * @see TransducedAccessor#get
- */
-public final class TransducedAccessor_method_Short extends DefaultTransducedAccessor {
- public String print(Object o) {
- return DatatypeConverterImpl._printShort( ((Bean)o).get_short() );
- }
-
- public void parse(Object o, CharSequence lexical) {
- ((Bean)o).set_short(DatatypeConverterImpl._parseShort(lexical));
- }
-
- public boolean hasValue(Object o) {
- return true;
- }
-//
-// public void writeLeafElement(Object o, QName tagName, String fieldName, XMLSerializer w) throws SAXException, AccessorException {
-// w.leafElement(tagName, ((Bean)o).get_short(), fieldName );
-// }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package.html b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package.html
deleted file mode 100644
index a9956b8d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/package.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
-Hosts optimized
-{@link com.sun.xml.internal.bind.v2.runtime.reflect.Accessor},
-{@link com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor}, and
-{@link com.sun.xml.internal.bind.v2.runtime.Transducer}.
-
-<h2>How it works</h2>
-<p>
- Most of the classes in this package are "templates." At run-time,
- A template class file is slightly modified to match the target Java Bean,
- then it will be loaded into the VM.
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/package.html b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/package.html
deleted file mode 100644
index 55d2bcce..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
- Abstraction around accessing data of actual objects.
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/AttributesEx.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/AttributesEx.java
deleted file mode 100644
index 0323b8e6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/AttributesEx.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import org.xml.sax.Attributes;
-
-/**
- * {@link Attributes} extension that allows attribute values
- * to be exposed as {@link CharSequence}.
- *
- * <p>
- * All namespace URIs and local names are assumed to be interned.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface AttributesEx extends Attributes {
- /**
- * The same as {@link #getValue(int)}
- */
- CharSequence getData(int idx);
-
- /**
- * The same as {@link #getValue(String,String)}
- */
- CharSequence getData(String nsUri,String localName);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/AttributesExImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/AttributesExImpl.java
deleted file mode 100644
index 8a3191aa..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/AttributesExImpl.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import com.sun.xml.internal.bind.util.AttributesImpl;
-
-/**
- * {@link AttributesEx} implementation.
- *
- * TODO: proper implementation that holds CharSequence
- *
- * @author Kohsuke Kawaguchi
- */
-public final class AttributesExImpl extends AttributesImpl implements AttributesEx {
- public CharSequence getData(int idx) {
- return getValue(idx);
- }
-
- public CharSequence getData(String nsUri, String localName) {
- return getValue(nsUri,localName);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Base64Data.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Base64Data.java
deleted file mode 100644
index 8dc652c3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Base64Data.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.activation.DataHandler;
-import javax.activation.DataSource;
-import javax.xml.stream.XMLStreamException;
-
-import javax.xml.stream.XMLStreamWriter;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
-import com.sun.xml.internal.bind.v2.runtime.output.Pcdata;
-import com.sun.xml.internal.bind.v2.runtime.output.UTF8XmlOutput;
-import com.sun.xml.internal.bind.v2.util.ByteArrayOutputStreamEx;
-import com.sun.istack.internal.Nullable;
-
-/**
- * Fed to unmarshaller when the 'text' data is actually
- * a virtual image of base64 encoding of the binary data
- * transferred on the wire.
- *
- * Used for the MTOM support.
- *
- * This object is mutable and the owner of this object can
- * reuse it with new data.
- *
- * Also used by the marshaller to write out the binary data
- * that could be possibly attached.
- *
- * @see XmlVisitor#text(CharSequence)
- * @see XMLSerializer#text(Pcdata,String)
- *
- * @author Kohsuke Kawaguchi, Martin Grebac
- */
-public final class Base64Data extends Pcdata {
-
- // either dataHandler or (data,dataLen,mimeType?) must be present
- private DataHandler dataHandler;
- private byte[] data;
- /**
- * Length of the valid data in {@link #data}.
- */
- private int dataLen;
- /**
- * Optional MIME type of {@link #data}.
- *
- * Unused when {@link #dataHandler} is set.
- * Use {@link DataHandler#getContentType()} in that case.
- */
- private @Nullable
- String mimeType;
-
- /**
- * Fills in the data object by a portion of the byte[].
- *
- * @param len
- * data[0] to data[len-1] are treated as the data.
- */
- public void set(byte[] data, int len, @Nullable String mimeType) {
- this.data = data;
- this.dataLen = len;
- this.dataHandler = null;
- this.mimeType = mimeType;
- }
-
- /**
- * Fills in the data object by the byte[] of the exact length.
- *
- * @param data
- * this buffer may be owned directly by the unmarshaleld JAXB object.
- */
- public void set(byte[] data, @Nullable String mimeType) {
- set(data, data.length, mimeType);
- }
-
- /**
- * Fills in the data object by a {@link DataHandler}.
- */
- public void set(DataHandler data) {
- assert data != null;
- this.dataHandler = data;
- this.data = null;
- }
-
- /**
- * Gets the raw data.
- */
- public DataHandler getDataHandler() {
- if (dataHandler == null) {
- dataHandler = new DataHandler(new DataSource() {
-
- public String getContentType() {
- return getMimeType();
- }
-
- public InputStream getInputStream() {
- return new ByteArrayInputStream(data, 0, dataLen);
- }
-
- public String getName() {
- return null;
- }
-
- public OutputStream getOutputStream() {
- throw new UnsupportedOperationException();
- }
- });
- }
-
- return dataHandler;
- }
-
- /**
- * Gets the byte[] of the exact length.
- */
- public byte[] getExact() {
- get();
- if (dataLen != data.length) {
- byte[] buf = new byte[dataLen];
- System.arraycopy(data, 0, buf, 0, dataLen);
- data = buf;
- }
- return data;
- }
-
- /**
- * Gets the data as an {@link InputStream}.
- */
- public InputStream getInputStream() throws IOException {
- if (dataHandler != null) {
- return dataHandler.getInputStream();
- } else {
- return new ByteArrayInputStream(data, 0, dataLen);
- }
- }
-
- /**
- * Returns false if this object only has {@link DataHandler} and therefore
- * {@link #get()} operation is likely going to be expensive.
- */
- public boolean hasData() {
- return data != null;
- }
-
- /**
- * Gets the raw data. The size of the byte array maybe larger than the actual length.
- */
- public byte[] get() {
- if (data == null) {
- try {
- ByteArrayOutputStreamEx baos = new ByteArrayOutputStreamEx(1024);
- InputStream is = dataHandler.getDataSource().getInputStream();
- baos.readFrom(is);
- is.close();
- data = baos.getBuffer();
- dataLen = baos.size();
- } catch (IOException e) {
- // TODO: report the error to the unmarshaller
- dataLen = 0; // recover by assuming length-0 data
- }
- }
- return data;
- }
-
- public int getDataLen() {
- return dataLen;
- }
-
- public String getMimeType() {
- if (mimeType == null) {
- return "application/octet-stream";
- }
- return mimeType;
- }
-
- /**
- * Gets the number of characters needed to represent
- * this binary data in the base64 encoding.
- */
- public int length() {
- // for each 3 bytes you use 4 chars
- // if the remainder is 1 or 2 there will be 4 more
- get(); // fill in the buffer if necessary
- return ((dataLen + 2) / 3) * 4;
- }
-
- /**
- * Encode this binary data in the base64 encoding
- * and returns the character at the specified position.
- */
- public char charAt(int index) {
- // we assume that the length() method is called before this method
- // (otherwise how would the caller know that the index is valid?)
- // so we assume that the byte[] is already populated
-
- int offset = index % 4;
- int base = (index / 4) * 3;
-
- byte b1, b2;
-
- switch (offset) {
- case 0:
- return DatatypeConverterImpl.encode(data[base] >> 2);
- case 1:
- if (base + 1 < dataLen) {
- b1 = data[base + 1];
- } else {
- b1 = 0;
- }
- return DatatypeConverterImpl.encode(
- ((data[base] & 0x3) << 4)
- | ((b1 >> 4) & 0xF));
- case 2:
- if (base + 1 < dataLen) {
- b1 = data[base + 1];
- if (base + 2 < dataLen) {
- b2 = data[base + 2];
- } else {
- b2 = 0;
- }
-
- return DatatypeConverterImpl.encode(
- ((b1 & 0xF) << 2)
- | ((b2 >> 6) & 0x3));
- } else {
- return '=';
- }
- case 3:
- if (base + 2 < dataLen) {
- return DatatypeConverterImpl.encode(data[base + 2] & 0x3F);
- } else {
- return '=';
- }
- }
-
- throw new IllegalStateException();
- }
-
- /**
- * Internally this is only used to split a text to a list,
- * which doesn't happen that much for base64.
- * So this method should be smaller than faster.
- */
- 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++) {
- buf.append(charAt(i));
- }
- return buf;
- }
-
- /**
- * Returns the base64 encoded string of this data.
- */
- public String toString() {
- get(); // fill in the buffer
- return DatatypeConverterImpl._printBase64Binary(data, 0, dataLen);
- }
-
- @Override
- public void writeTo(char[] buf, int start) {
- get();
- DatatypeConverterImpl._printBase64Binary(data, 0, dataLen, buf, start);
- }
-
- public void writeTo(UTF8XmlOutput output) throws IOException {
- // TODO: this is inefficient if the data source is note byte[] but DataHandler
- get();
- output.text(data, dataLen);
- }
-
- public void writeTo(XMLStreamWriter output) throws IOException, XMLStreamException {
- get();
- DatatypeConverterImpl._printBase64Binary(data, 0, dataLen, output);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ChildLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ChildLoader.java
deleted file mode 100644
index a8a4514f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ChildLoader.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-/**
- * Pair of {@link Loader} and {@link Receiver}.
- *
- * Used by {@link StructureLoader}.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class ChildLoader {
- public final Loader loader;
- public final Receiver receiver;
-
- public ChildLoader(Loader loader, Receiver receiver) {
- assert loader!=null;
- this.loader = loader;
- this.receiver = receiver;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DefaultIDResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DefaultIDResolver.java
deleted file mode 100644
index a2f2b2f1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DefaultIDResolver.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import java.util.HashMap;
-import java.util.concurrent.Callable;
-
-import javax.xml.bind.ValidationEventHandler;
-
-import com.sun.xml.internal.bind.IDResolver;
-
-import org.xml.sax.SAXException;
-
-/**
- * Default implementation of {@link IDResolver}.
- *
- * @author Kohsuke Kawaguchi
- */
-final class DefaultIDResolver extends IDResolver {
- /** Records ID->Object map. */
- private HashMap<String,Object> idmap = null;
-
- @Override
- public void startDocument(ValidationEventHandler eventHandler) throws SAXException {
- if(idmap!=null)
- idmap.clear();
- }
-
- @Override
- public void bind(String id, Object obj) {
- if(idmap==null) idmap = new HashMap<String,Object>();
- idmap.put(id,obj);
- }
-
- @Override
- public Callable resolve(final String id, Class targetType) {
- return new Callable() {
- public Object call() throws Exception {
- if(idmap==null) return null;
- return idmap.get(id);
- }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DefaultValueLoaderDecorator.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DefaultValueLoaderDecorator.java
deleted file mode 100644
index bfa62502..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DefaultValueLoaderDecorator.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import org.xml.sax.SAXException;
-
-/**
- * Decorates another {@link Loader} by setting a default value.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class DefaultValueLoaderDecorator extends Loader {
- private final Loader l;
- private final String defaultValue;
-
- public DefaultValueLoaderDecorator(Loader l, String defaultValue) {
- this.l = l;
- this.defaultValue = defaultValue;
- }
-
- @Override
- public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- // install the default value, but don't override the one given by the parent loader
- if(state.getElementDefaultValue() == null)
- state.setElementDefaultValue(defaultValue);
-
- state.setLoader(l);
- l.startElement(state,ea);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Discarder.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Discarder.java
deleted file mode 100644
index 931bec71..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Discarder.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-
-
-/**
- * {@link Loader} implementation that discards the whole sub-tree.
- *
- * Mostly used for recovering fom errors.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class Discarder extends Loader {
- public static final Loader INSTANCE = new Discarder();
-
- private Discarder() {
- super(false);
- }
-
- @Override
- public void childElement(UnmarshallingContext.State state, TagName ea) {
- state.setTarget(null);
- // registering this allows the discarder to process the whole subtree.
- state.setLoader(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DomLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DomLoader.java
deleted file mode 100644
index 30c8d755..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/DomLoader.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import javax.xml.bind.annotation.DomHandler;
-import javax.xml.transform.Result;
-import javax.xml.transform.sax.TransformerHandler;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import org.xml.sax.SAXException;
-
-/**
- * Loads a DOM.
- *
- * @author Kohsuke Kawaguchi
- */
-public class DomLoader<ResultT extends Result> extends Loader {
-
- private final DomHandler<?,ResultT> dom;
-
- /**
- * Used to capture the state.
- *
- * This instance is created for each unmarshalling episode.
- */
- private final class State {
-
- /** This handler will receive SAX events. */
- private TransformerHandler handler = null;
-
- /** {@link #handler} will produce this result. */
- private final ResultT result;
-
- // nest level of elements.
- int depth = 1;
-
- public State( UnmarshallingContext context ) throws SAXException {
- handler = JAXBContextImpl.createTransformerHandler(context.getJAXBContext().disableSecurityProcessing);
- result = dom.createUnmarshaller(context);
-
- handler.setResult(result);
-
- // emulate the start of documents
- try {
- handler.setDocumentLocator(context.getLocator());
- handler.startDocument();
- declarePrefixes( context, context.getAllDeclaredPrefixes() );
- } catch( SAXException e ) {
- context.handleError(e);
- throw e;
- }
- }
-
- public Object getElement() {
- return dom.getElement(result);
- }
-
- private void declarePrefixes( UnmarshallingContext context, String[] prefixes ) throws SAXException {
- for( int i=prefixes.length-1; i>=0; i-- ) {
- String nsUri = context.getNamespaceURI(prefixes[i]);
- if(nsUri==null) throw new IllegalStateException("prefix \'"+prefixes[i]+"\' isn't bound");
- handler.startPrefixMapping(prefixes[i],nsUri );
- }
- }
-
- private void undeclarePrefixes( String[] prefixes ) throws SAXException {
- for( int i=prefixes.length-1; i>=0; i-- )
- handler.endPrefixMapping( prefixes[i] );
- }
- }
-
- public DomLoader(DomHandler<?, ResultT> dom) {
- super(true);
- this.dom = dom;
- }
-
- @Override
- public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- UnmarshallingContext context = state.getContext();
- if (state.getTarget() == null)
- state.setTarget(new State(context));
-
- State s = (State) state.getTarget();
- try {
- s.declarePrefixes(context, context.getNewlyDeclaredPrefixes());
- s.handler.startElement(ea.uri, ea.local, ea.getQname(), ea.atts);
- } catch (SAXException e) {
- context.handleError(e);
- throw e;
- }
- }
-
- @Override
- public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- state.setLoader(this);
- State s = (State) state.getPrev().getTarget();
- s.depth++;
- state.setTarget(s);
- }
-
- @Override
- public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
- if(text.length()==0)
- return; // there's no point in creating an empty Text node in DOM.
- try {
- State s = (State) state.getTarget();
- s.handler.characters(text.toString().toCharArray(),0,text.length());
- } catch( SAXException e ) {
- state.getContext().handleError(e);
- throw e;
- }
- }
-
- @Override
- public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- State s = (State) state.getTarget();
- UnmarshallingContext context = state.getContext();
-
- try {
- s.handler.endElement(ea.uri, ea.local, ea.getQname());
- s.undeclarePrefixes(context.getNewlyDeclaredPrefixes());
- } catch( SAXException e ) {
- context.handleError(e);
- throw e;
- }
-
- if((--s.depth)==0) {
- // emulate the end of the document
- try {
- s.undeclarePrefixes(context.getAllDeclaredPrefixes());
- s.handler.endDocument();
- } catch( SAXException e ) {
- context.handleError(e);
- throw e;
- }
-
- // we are done
- state.setTarget(s.getElement());
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/FastInfosetConnector.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/FastInfosetConnector.java
deleted file mode 100644
index c7495151..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/FastInfosetConnector.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.bind.WhiteSpaceProcessor;
-import com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmIndexes;
-import org.xml.sax.SAXException;
-
-/**
- * Reads from FastInfoset StAX parser and feeds into JAXB Unmarshaller.
- * <p>
- * This class will peek at future events to ascertain if characters need to be
- * buffered or not.
- *
- * @author Paul Sandoz.
- */
-final class FastInfosetConnector extends StAXConnector {
-
- // event source
- private final StAXDocumentParser fastInfosetStreamReader;
-
- // Flag set to true if text has been reported
- private boolean textReported;
-
- // Buffer for octets
- private final Base64Data base64Data = new Base64Data();
-
- // Buffer for characters
- private final StringBuilder buffer = new StringBuilder();
-
- public FastInfosetConnector(StAXDocumentParser fastInfosetStreamReader,
- XmlVisitor visitor) {
- super(visitor);
- fastInfosetStreamReader.setStringInterning(true);
- this.fastInfosetStreamReader = fastInfosetStreamReader;
- }
-
- public void bridge() throws XMLStreamException {
- try {
- // remembers the nest level of elements to know when we are done.
- int depth=0;
-
- // if the parser is at the start tag, proceed to the first element
- int event = fastInfosetStreamReader.getEventType();
- if(event == XMLStreamConstants.START_DOCUMENT) {
- // nextTag doesn't correctly handle DTDs
- while( !fastInfosetStreamReader.isStartElement() )
- event = fastInfosetStreamReader.next();
- }
-
-
- if( event!=XMLStreamConstants.START_ELEMENT)
- throw new IllegalStateException("The current event is not START_ELEMENT\n but " + event);
-
- // TODO: we don't have to rely on this hack --- we can just emulate
- // start/end prefix mappings. But for now, I'll rely on this hack.
- handleStartDocument(fastInfosetStreamReader.getNamespaceContext());
-
- OUTER:
- while(true) {
- // These are all of the events listed in the javadoc for
- // XMLEvent.
- // The spec only really describes 11 of them.
- switch (event) {
- case XMLStreamConstants.START_ELEMENT :
- handleStartElement();
- depth++;
- break;
- case XMLStreamConstants.END_ELEMENT :
- depth--;
- handleEndElement();
- if(depth==0) break OUTER;
- break;
- case XMLStreamConstants.CHARACTERS :
- case XMLStreamConstants.CDATA :
- case XMLStreamConstants.SPACE :
- if (predictor.expectText()) {
- // Peek at the next event to see if there are
- // fragmented characters
- event = fastInfosetStreamReader.peekNext();
- if (event == XMLStreamConstants.END_ELEMENT)
- processNonIgnorableText();
- else if (event == XMLStreamConstants.START_ELEMENT)
- processIgnorableText();
- else
- handleFragmentedCharacters();
- }
- break;
- // otherwise simply ignore
- }
-
- event=fastInfosetStreamReader.next();
- }
-
- fastInfosetStreamReader.next(); // move beyond the end tag.
-
- handleEndDocument();
- } catch (SAXException e) {
- throw new XMLStreamException(e);
- }
- }
-
- protected Location getCurrentLocation() {
- return fastInfosetStreamReader.getLocation();
- }
-
- protected String getCurrentQName() {
- return fastInfosetStreamReader.getNameString();
- }
-
- private void handleStartElement() throws SAXException {
- processUnreportedText();
-
- for (int i = 0; i < fastInfosetStreamReader.accessNamespaceCount(); i++) {
- visitor.startPrefixMapping(fastInfosetStreamReader.getNamespacePrefix(i),
- fastInfosetStreamReader.getNamespaceURI(i));
- }
-
- tagName.uri = fastInfosetStreamReader.accessNamespaceURI();
- tagName.local = fastInfosetStreamReader.accessLocalName();
- tagName.atts = fastInfosetStreamReader.getAttributesHolder();
-
- visitor.startElement(tagName);
- }
-
- private void handleFragmentedCharacters() throws XMLStreamException, SAXException {
- buffer.setLength(0);
-
- // Append characters of first character event
- buffer.append(fastInfosetStreamReader.getTextCharacters(),
- fastInfosetStreamReader.getTextStart(),
- fastInfosetStreamReader.getTextLength());
-
- // Consume all character
- while(true) {
- switch(fastInfosetStreamReader.peekNext()) {
- case XMLStreamConstants.START_ELEMENT :
- processBufferedText(true);
- return;
- case XMLStreamConstants.END_ELEMENT :
- processBufferedText(false);
- return;
- case XMLStreamConstants.CHARACTERS :
- case XMLStreamConstants.CDATA :
- case XMLStreamConstants.SPACE :
- // Append characters of second and subsequent character events
- fastInfosetStreamReader.next();
- buffer.append(fastInfosetStreamReader.getTextCharacters(),
- fastInfosetStreamReader.getTextStart(),
- fastInfosetStreamReader.getTextLength());
- break;
- default:
- fastInfosetStreamReader.next();
- }
- }
- }
-
- private void handleEndElement() throws SAXException {
- processUnreportedText();
-
- tagName.uri = fastInfosetStreamReader.accessNamespaceURI();
- tagName.local = fastInfosetStreamReader.accessLocalName();
-
- visitor.endElement(tagName);
-
- for (int i = fastInfosetStreamReader.accessNamespaceCount() - 1; i >= 0; i--) {
- visitor.endPrefixMapping(fastInfosetStreamReader.getNamespacePrefix(i));
- }
- }
-
- final private class CharSequenceImpl implements CharSequence {
- char[] ch;
- int start;
- int length;
-
- CharSequenceImpl() {
- }
-
- CharSequenceImpl(final char[] ch, final int start, final int length) {
- this.ch = ch;
- this.start = start;
- this.length = length;
- }
-
- public void set() {
- ch = fastInfosetStreamReader.getTextCharacters();
- start = fastInfosetStreamReader.getTextStart();
- length = fastInfosetStreamReader.getTextLength();
- }
-
- // CharSequence interface
-
- public final int length() {
- return length;
- }
-
- public final char charAt(final int index) {
- return ch[start + index];
- }
-
- public final CharSequence subSequence(final int start, final int end) {
- return new CharSequenceImpl(ch, this.start + start, end - start);
- }
-
- public String toString() {
- return new String(ch, start, length);
- }
- }
-
- final private CharSequenceImpl charArray = new CharSequenceImpl();
-
- private void processNonIgnorableText() throws SAXException {
- textReported = true;
- boolean isTextAlgorithmAplied =
- (fastInfosetStreamReader.getTextAlgorithmBytes() != null);
-
- if (isTextAlgorithmAplied &&
- fastInfosetStreamReader.getTextAlgorithmIndex() == EncodingAlgorithmIndexes.BASE64) {
- base64Data.set(fastInfosetStreamReader.getTextAlgorithmBytesClone(),null);
- visitor.text(base64Data);
- } else {
- if (isTextAlgorithmAplied) {
- fastInfosetStreamReader.getText();
- }
-
- charArray.set();
- visitor.text(charArray);
- }
- }
-
- private void processIgnorableText() throws SAXException {
- boolean isTextAlgorithmAplied =
- (fastInfosetStreamReader.getTextAlgorithmBytes() != null);
-
- if (isTextAlgorithmAplied &&
- fastInfosetStreamReader.getTextAlgorithmIndex() == EncodingAlgorithmIndexes.BASE64) {
- base64Data.set(fastInfosetStreamReader.getTextAlgorithmBytesClone(),null);
- visitor.text(base64Data);
- textReported = true;
- } else {
- if (isTextAlgorithmAplied) {
- fastInfosetStreamReader.getText();
- }
-
- charArray.set();
- if (!WhiteSpaceProcessor.isWhiteSpace(charArray)) {
- visitor.text(charArray);
- textReported = true;
- }
- }
- }
-
- private void processBufferedText(boolean ignorable) throws SAXException {
- if (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer)) {
- visitor.text(buffer);
- textReported = true;
- }
- }
-
- private void processUnreportedText() throws SAXException {
- if(!textReported && predictor.expectText()) {
- visitor.text("");
- }
- textReported = false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/IntArrayData.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/IntArrayData.java
deleted file mode 100644
index 0b4ddbda..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/IntArrayData.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import java.io.IOException;
-
-import com.sun.xml.internal.bind.v2.runtime.output.Pcdata;
-import com.sun.xml.internal.bind.v2.runtime.output.UTF8XmlOutput;
-
-/**
- * Typed {@link CharSequence} for int[].
- *
- * <p>
- * Fed to unmarshaller when the 'text' data is actually
- * a virtual image of int array.
- *
- * <p>
- * This class holds int[] as a triplet of (data,start,len)
- * where 'start' and 'len' represents the start position of the
- * data and the length.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class IntArrayData extends Pcdata {
-
- private int[] data;
- private int start;
- private int len;
-
- /**
- * String representation of the data. Lazily computed.
- */
- private StringBuilder literal;
-
-
- public IntArrayData(int[] data, int start, int len) {
- set(data, start, len);
- }
-
- public IntArrayData() {
- }
-
- /**
- * Sets the int[] data to this object.
- *
- * <p>
- * This method doesn't make a copy for a performance reason.
- * The caller is still free to modify the array it passed to this method,
- * but he should do so with a care. The unmarshalling code isn't expecting
- * the value to be changed while it's being routed.
- */
- public void set(int[] data, int start, int len) {
- this.data = data;
- this.start = start;
- this.len = len;
- this.literal = null;
- }
-
- public int length() {
- return getLiteral().length();
- }
-
- public char charAt(int index) {
- return getLiteral().charAt(index);
- }
-
- public CharSequence subSequence(int start, int end) {
- return getLiteral().subSequence(start,end);
- }
-
- /**
- * Computes the literal form from the data.
- */
- private StringBuilder getLiteral() {
- if(literal!=null) return literal;
-
- literal = new StringBuilder();
- int p = start;
- for( int i=len; i>0; i-- ) {
- if(literal.length()>0) literal.append(' ');
- literal.append(data[p++]);
- }
-
- return literal;
- }
-
- public String toString() {
- return literal.toString();
- }
-
- public void writeTo(UTF8XmlOutput output) throws IOException {
- int p = start;
- for( int i=len; i>0; i-- ) {
- if(i!=len)
- output.write(' ');
- output.text(data[p++]);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/IntData.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/IntData.java
deleted file mode 100644
index 1e736a13..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/IntData.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import java.io.IOException;
-
-import com.sun.xml.internal.bind.v2.runtime.output.Pcdata;
-import com.sun.xml.internal.bind.v2.runtime.output.UTF8XmlOutput;
-
-/**
- * {@link Pcdata} that represents a single integer.
- *
- * @author Kohsuke Kawaguchi
- */
-public class IntData extends Pcdata {
- /**
- * The int value that this {@link Pcdata} represents.
- *
- * Modifiable.
- */
- private int data;
-
- /**
- * Length of the {@link #data} in ASCII string.
- * For example if data=-10, then length=3
- */
- private int length;
-
- public void reset(int i) {
- this.data = i;
- if(i==Integer.MIN_VALUE)
- length = 11;
- else
- length = (i < 0) ? stringSizeOfInt(-i) + 1 : stringSizeOfInt(i);
- }
-
- private final static int [] sizeTable = { 9, 99, 999, 9999, 99999, 999999, 9999999,
- 99999999, 999999999, Integer.MAX_VALUE };
-
- // Requires positive x
- private static int stringSizeOfInt(int x) {
- for (int i=0; ; i++)
- if (x <= sizeTable[i])
- return i+1;
- }
-
- public String toString() {
- return String.valueOf(data);
- }
-
-
- public int length() {
- return length;
- }
-
- public char charAt(int index) {
- return toString().charAt(index);
- }
-
- public CharSequence subSequence(int start, int end) {
- return toString().substring(start,end);
- }
-
- public void writeTo(UTF8XmlOutput output) throws IOException {
- output.text(data);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Intercepter.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Intercepter.java
deleted file mode 100644
index d0d016c9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Intercepter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import org.xml.sax.SAXException;
-
-/**
- * Used solely by {@link com.sun.xml.internal.bind.v2.runtime.ElementBeanInfoImpl} to wrap
- * the loaded value object into a JAXBElement object.
- *
- * UGLY HACK.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface Intercepter {
- /**
- * Called when the child loader is deactivated.
- *
- * @param state
- * points to the parent's current state.
- * @param o
- * object that was loaded. may be null.
- */
- Object intercept(UnmarshallingContext.State state, Object o) throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/InterningXmlVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/InterningXmlVisitor.java
deleted file mode 100644
index 60cde81e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/InterningXmlVisitor.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import javax.xml.namespace.NamespaceContext;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- * {@link XmlVisitor} decorator that interns all string tokens.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class InterningXmlVisitor implements XmlVisitor {
- private final XmlVisitor next;
-
- private final AttributesImpl attributes = new AttributesImpl();
-
- public InterningXmlVisitor(XmlVisitor next) {
- this.next = next;
- }
-
- public void startDocument(LocatorEx locator, NamespaceContext nsContext) throws SAXException {
- next.startDocument(locator,nsContext);
- }
-
- public void endDocument() throws SAXException {
- next.endDocument();
- }
-
- public void startElement(TagName tagName ) throws SAXException {
- attributes.setAttributes(tagName.atts);
- tagName.atts = attributes;
- tagName.uri = intern(tagName.uri);
- tagName.local = intern(tagName.local);
- next.startElement(tagName);
- }
-
- public void endElement(TagName tagName ) throws SAXException {
- tagName.uri = intern(tagName.uri);
- tagName.local = intern(tagName.local);
- next.endElement(tagName);
- }
-
- public void startPrefixMapping( String prefix, String nsUri ) throws SAXException {
- next.startPrefixMapping(intern(prefix),intern(nsUri));
- }
-
- public void endPrefixMapping( String prefix ) throws SAXException {
- next.endPrefixMapping(intern(prefix));
- }
-
- public void text( CharSequence pcdata ) throws SAXException {
- next.text(pcdata);
- }
-
- public UnmarshallingContext getContext() {
- return next.getContext();
- }
-
- public TextPredictor getPredictor() {
- return next.getPredictor();
- }
-
- private static class AttributesImpl implements Attributes {
- private Attributes core;
-
- void setAttributes(Attributes att) {
- this.core = att;
- }
-
- public int getIndex(String qName) {
- return core.getIndex(qName);
- }
-
- public int getIndex(String uri, String localName) {
- return core.getIndex(uri, localName);
- }
-
- public int getLength() {
- return core.getLength();
- }
-
- public String getLocalName(int index) {
- return intern(core.getLocalName(index));
- }
-
- public String getQName(int index) {
- return intern(core.getQName(index));
- }
-
- public String getType(int index) {
- return intern(core.getType(index));
- }
-
- public String getType(String qName) {
- return intern(core.getType(qName));
- }
-
- public String getType(String uri, String localName) {
- return intern(core.getType(uri, localName));
- }
-
- public String getURI(int index) {
- return intern(core.getURI(index));
- }
-
- //
- // since values may vary a lot,
- // we don't (probably shouldn't) intern values.
- //
-
- public String getValue(int index) {
- return core.getValue(index);
- }
-
- public String getValue(String qName) {
- return core.getValue(qName);
- }
-
- public String getValue(String uri, String localName) {
- return core.getValue(uri, localName);
- }
- }
-
- private static String intern(String s) {
- if(s==null) return null;
- else return s.intern();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyLoader.java
deleted file mode 100644
index 300f5f33..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyLoader.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-
-import org.xml.sax.SAXException;
-
-/**
- * Unmarshals a text into a property of the parent element.
- *
- * @see ValuePropertyLoader
- * @author Kohsuke Kawaguchi
- */
-public class LeafPropertyLoader extends Loader {
-
- private final TransducedAccessor xacc;
-
- public LeafPropertyLoader(TransducedAccessor xacc) {
- super(true);
- this.xacc = xacc;
- }
-
- public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
- try {
- xacc.parse(state.getPrev().getTarget(), text);
- } catch (AccessorException e) {
- handleGenericException(e,true);
- } catch (RuntimeException e) {
- handleParseConversionException(state,e);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyXsiLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyXsiLoader.java
deleted file mode 100644
index 5c13bf34..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LeafPropertyXsiLoader.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import java.util.Collection;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl;
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-public final class LeafPropertyXsiLoader extends Loader {
-
- private final Loader defaultLoader;
- private final TransducedAccessor xacc;
- private final Accessor acc;
-
- public LeafPropertyXsiLoader(Loader defaultLoader, TransducedAccessor xacc, Accessor acc) {
- this.defaultLoader = defaultLoader;
- this.expectText = true;
- this.xacc = xacc;
- this.acc = acc;
- }
-
-
- @Override
- public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- final Loader loader = selectLoader(state, ea);
- state.setLoader(loader);
- loader.startElement(state, ea);
- }
-
- protected Loader selectLoader(UnmarshallingContext.State state, TagName ea) throws SAXException {
-
- UnmarshallingContext context = state.getContext();
- JaxBeanInfo beanInfo = null;
-
- // look for @xsi:type
- Attributes atts = ea.atts;
- int idx = atts.getIndex(WellKnownNamespace.XML_SCHEMA_INSTANCE, "type");
-
- if (idx >= 0) {
- String value = atts.getValue(idx);
-
- QName type = DatatypeConverterImpl._parseQName(value, context);
-
- if (type == null)
- return defaultLoader;
-
- beanInfo = context.getJAXBContext().getGlobalType(type);
- if (beanInfo == null)
- return defaultLoader;
- ClassBeanInfoImpl cbii;
- try {
- cbii = (ClassBeanInfoImpl) beanInfo;
- } catch (ClassCastException cce) {
- return defaultLoader;
- }
-
- if (null == cbii.getTransducer()) {
- return defaultLoader;
- }
-
- return new LeafPropertyLoader(
- new TransducedAccessor.CompositeTransducedAccessorImpl(
- state.getContext().getJAXBContext(),
- cbii.getTransducer(),
- acc));
- }
-
- return defaultLoader;
- }
-
- @Override
- public Collection<QName> getExpectedChildElements() {
- return defaultLoader.getExpectedChildElements();
- }
-
- @Override
- public Collection<QName> getExpectedAttributes() {
- return defaultLoader.getExpectedAttributes();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Loader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Loader.java
deleted file mode 100644
index f3d6c859..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Loader.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.helpers.ValidationEventImpl;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-
-import org.xml.sax.SAXException;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public abstract class Loader {
-
- // allow derived classes to change it later
- protected boolean expectText;
-
- protected Loader(boolean expectText) {
- this.expectText = expectText;
- }
-
- protected Loader() {
- }
-
-//
-//
-//
-// Contract
-//
-//
-//
- /**
- * Called when the loader is activated, which is when a new start tag is seen
- * and when the parent designated this loader as the child loader.
- *
- * <p>
- * The callee may change <tt>state.loader</tt> to designate another {@link Loader}
- * for the processing. It's the responsibility of the callee to forward the startElement
- * event in such a case.
- *
- * @param ea
- * info about the start tag. never null.
- */
- public void startElement(UnmarshallingContext.State state,TagName ea) throws SAXException {
- }
-
- /**
- * Called when this loaderis an active loaderand we see a new child start tag.
- *
- * <p>
- * The callee is expected to designate another loaderas a loaderthat processes
- * this element, then it should also register a {@link Receiver}.
- * The designated loaderwill become an active loader.
- *
- * <p>
- * The default implementation reports an error saying an element is unexpected.
- */
- public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- // notify the error, then recover by ignoring the whole element.
- reportUnexpectedChildElement(ea, true);
- state.setLoader(Discarder.INSTANCE);
- state.setReceiver(null);
- }
-
- @SuppressWarnings({"StringEquality"})
- protected final void reportUnexpectedChildElement(TagName ea, boolean canRecover) throws SAXException {
- if (canRecover) {
- // this error happens particurly often (when input documents contain a lot of unexpected elements to be ignored),
- // so don't bother computing all the messages and etc if we know that
- // there's no event handler to receive the error in the end. See #286
- UnmarshallingContext context = UnmarshallingContext.getInstance();
- if (!context.parent.hasEventHandler() // is somebody listening?
- || !context.shouldErrorBeReported()) // should we report error?
- return;
- }
- if(ea.uri!=ea.uri.intern() || ea.local!=ea.local.intern())
- reportError(Messages.UNINTERNED_STRINGS.format(), canRecover );
- else
- reportError(Messages.UNEXPECTED_ELEMENT.format(ea.uri,ea.local,computeExpectedElements()), canRecover );
- }
-
- /**
- * Returns a set of tag names expected as possible child elements in this context.
- */
- public Collection<QName> getExpectedChildElements() {
- return Collections.emptyList();
- }
-
- /**
- * Returns a set of tag names expected as possible child elements in this context.
- */
- public Collection<QName> getExpectedAttributes() {
- return Collections.emptyList();
- }
-
- /**
- * Called when this loaderis an active loaderand we see a chunk of text.
- *
- * The runtime makes sure that adjacent characters (even those separated
- * by comments, PIs, etc) are reported as one event.
- * IOW, you won't see two text event calls in a row.
- */
- public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
- // make str printable
- text = text.toString().replace('\r',' ').replace('\n',' ').replace('\t',' ').trim();
- reportError(Messages.UNEXPECTED_TEXT.format(text), true );
- }
-
- /**
- * True if this loader expects the {@link #text(UnmarshallingContext.State, CharSequence)} method
- * to be called. False otherwise.
- */
- public final boolean expectText() {
- return expectText;
- }
-
-
- /**
- * Called when this loaderis an active loaderand we see an end tag.
- */
- public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- }
-
-
-
-
-
-
-
-
-
-
-//
-//
-//
-// utility methods
-//
-//
-//
- /**
- * Computes the names of possible root elements for a better error diagnosis.
- */
- private String computeExpectedElements() {
- StringBuilder r = new StringBuilder();
-
- for( QName n : getExpectedChildElements() ) {
- if(r.length()!=0) r.append(',');
- r.append("<{").append(n.getNamespaceURI()).append('}').append(n.getLocalPart()).append('>');
- }
- if(r.length()==0) {
- return "(none)";
- }
-
- return r.toString();
- }
-
- /**
- * Fires the beforeUnmarshal event if necessary.
- *
- * @param state
- * state of the newly create child object.
- */
- protected final void fireBeforeUnmarshal(JaxBeanInfo beanInfo, Object child, UnmarshallingContext.State state) throws SAXException {
- if(beanInfo.lookForLifecycleMethods()) {
- UnmarshallingContext context = state.getContext();
- Unmarshaller.Listener listener = context.parent.getListener();
- if(beanInfo.hasBeforeUnmarshalMethod()) {
- beanInfo.invokeBeforeUnmarshalMethod(context.parent, child, state.getPrev().getTarget());
- }
- if(listener!=null) {
- listener.beforeUnmarshal(child, state.getPrev().getTarget());
- }
- }
- }
-
- /**
- * Fires the afterUnmarshal event if necessary.
- *
- * @param state
- * state of the parent object
- */
- protected final void fireAfterUnmarshal(JaxBeanInfo beanInfo, Object child, UnmarshallingContext.State state) throws SAXException {
- // fire the event callback
- if(beanInfo.lookForLifecycleMethods()) {
- UnmarshallingContext context = state.getContext();
- Unmarshaller.Listener listener = context.parent.getListener();
- if(beanInfo.hasAfterUnmarshalMethod()) {
- beanInfo.invokeAfterUnmarshalMethod(context.parent, child, state.getTarget());
- }
- if(listener!=null)
- listener.afterUnmarshal(child, state.getTarget());
- }
- }
-
-
- /**
- * Last resort when something goes terribly wrong within the unmarshaller.
- */
- protected static void handleGenericException(Exception e) throws SAXException {
- handleGenericException(e,false);
- }
-
- public static void handleGenericException(Exception e, boolean canRecover) throws SAXException {
- reportError(e.getMessage(), e, canRecover );
- }
-
- public static void handleGenericError(Error e) throws SAXException {
- reportError(e.getMessage(), false);
- }
-
- protected static void reportError(String msg, boolean canRecover) throws SAXException {
- reportError(msg, null, canRecover );
- }
-
- public static void reportError(String msg, Exception nested, boolean canRecover) throws SAXException {
- UnmarshallingContext context = UnmarshallingContext.getInstance();
- context.handleEvent( new ValidationEventImpl(
- canRecover? ValidationEvent.ERROR : ValidationEvent.FATAL_ERROR,
- msg,
- context.getLocator().getLocation(),
- nested ), canRecover );
- }
-
- /**
- * This method is called by the generated derived class
- * when a datatype parse method throws an exception.
- */
- protected static void handleParseConversionException(UnmarshallingContext.State state, Exception e) throws SAXException {
- // wrap it into a ParseConversionEvent and report it
- state.getContext().handleError(e);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java
deleted file mode 100644
index c84a91a2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorEx.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import java.net.URL;
-
-import javax.xml.bind.ValidationEventLocator;
-
-import org.xml.sax.Locator;
-import org.w3c.dom.Node;
-
-/**
- * Object that returns the current location that the {@link XmlVisitor} is parsing.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface LocatorEx extends Locator {
- /**
- * Gets the current location in a {@link ValidationEventLocator} object.
- */
- ValidationEventLocator getLocation();
-
- /**
- * Immutable snapshot of a {@link LocatorEx}
- */
- public static final class Snapshot implements LocatorEx, ValidationEventLocator {
- private final int columnNumber,lineNumber,offset;
- private final String systemId,publicId;
- private final URL url;
- private final Object object;
- private final Node node;
-
- public Snapshot(LocatorEx loc) {
- columnNumber = loc.getColumnNumber();
- lineNumber = loc.getLineNumber();
- systemId = loc.getSystemId();
- publicId = loc.getPublicId();
-
- ValidationEventLocator vel = loc.getLocation();
- offset = vel.getOffset();
- url = vel.getURL();
- object = vel.getObject();
- node = vel.getNode();
- }
-
- public Object getObject() {
- return object;
- }
-
- public Node getNode() {
- return node;
- }
-
- public int getOffset() {
- return offset;
- }
-
- public URL getURL() {
- return url;
- }
-
- public int getColumnNumber() {
- return columnNumber;
- }
-
- public int getLineNumber() {
- return lineNumber;
- }
-
- public String getSystemId() {
- return systemId;
- }
-
- public String getPublicId() {
- return publicId;
- }
-
- public ValidationEventLocator getLocation() {
- return this;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorExWrapper.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorExWrapper.java
deleted file mode 100644
index 7233e395..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/LocatorExWrapper.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import javax.xml.bind.ValidationEventLocator;
-import javax.xml.bind.helpers.ValidationEventLocatorImpl;
-
-import org.xml.sax.Locator;
-
-/**
- * {@link LocatorEx} implemented by {@link Locator}.
- *
- * @author Kohsuke Kawaguchi
- */
-class LocatorExWrapper implements LocatorEx {
- private final Locator locator;
-
- public LocatorExWrapper(Locator locator) {
- this.locator = locator;
- }
-
- public ValidationEventLocator getLocation() {
- return new ValidationEventLocatorImpl(locator);
- }
-
- public String getPublicId() {
- return locator.getPublicId();
- }
-
- public String getSystemId() {
- return locator.getSystemId();
- }
-
- public int getLineNumber() {
- return locator.getLineNumber();
- }
-
- public int getColumnNumber() {
- return locator.getColumnNumber();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/MTOMDecorator.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/MTOMDecorator.java
deleted file mode 100644
index c9a75beb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/MTOMDecorator.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import javax.activation.DataHandler;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-import javax.xml.namespace.NamespaceContext;
-
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-
-import org.xml.sax.SAXException;
-
-/**
- * Decorator of {@link XmlVisitor} that performs XOP processing.
- * Used to support MTOM.
- *
- * @author Kohsuke Kawaguchi
- */
-final class MTOMDecorator implements XmlVisitor {
-
- private final XmlVisitor next;
-
- private final AttachmentUnmarshaller au;
-
- private UnmarshallerImpl parent;
-
- private final Base64Data base64data = new Base64Data();
-
- /**
- * True if we are between the start and the end of xop:Include
- */
- private boolean inXopInclude;
-
- /**
- * UGLY HACK: we need to ignore the whitespace that follows
- * the attached base64 image.
- *
- * This happens twice; once before &lt;/xop:Include>, another
- * after &lt;/xop:Include>. The spec guarantees that
- * no valid pcdata can follow &lt;/xop:Include>.
- */
- private boolean followXop;
-
- public MTOMDecorator(UnmarshallerImpl parent,XmlVisitor next, AttachmentUnmarshaller au) {
- this.parent = parent;
- this.next = next;
- this.au = au;
- }
-
- public void startDocument(LocatorEx loc, NamespaceContext nsContext) throws SAXException {
- next.startDocument(loc,nsContext);
- }
-
- public void endDocument() throws SAXException {
- next.endDocument();
- }
-
- public void startElement(TagName tagName) throws SAXException {
- if(tagName.local.equals("Include") && tagName.uri.equals(WellKnownNamespace.XOP)) {
- // found xop:Include
- String href = tagName.atts.getValue("href");
- DataHandler attachment = au.getAttachmentAsDataHandler(href);
- if(attachment==null) {
- // report an error and ignore
- parent.getEventHandler().handleEvent(null);
- // TODO
- }
- base64data.set(attachment);
- next.text(base64data);
- inXopInclude = true;
- followXop = true;
- } else
- next.startElement(tagName);
- }
-
- public void endElement(TagName tagName) throws SAXException {
- if(inXopInclude) {
- // consume </xop:Include> by ourselves.
- inXopInclude = false;
- followXop = true;
- return;
- }
- next.endElement(tagName);
- }
-
- public void startPrefixMapping(String prefix, String nsUri) throws SAXException {
- next.startPrefixMapping(prefix,nsUri);
- }
-
- public void endPrefixMapping(String prefix) throws SAXException {
- next.endPrefixMapping(prefix);
- }
-
- public void text( CharSequence pcdata ) throws SAXException {
- if(!followXop)
- next.text(pcdata);
- else
- followXop = false;
- }
-
- public UnmarshallingContext getContext() {
- return next.getContext();
- }
-
- public TextPredictor getPredictor() {
- return next.getPredictor();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages.java
deleted file mode 100644
index 2390f67f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-enum Messages {
- UNRESOLVED_IDREF, // 1 arg
- UNEXPECTED_ELEMENT, // 3 args
- UNEXPECTED_TEXT, // 1 arg
- NOT_A_QNAME, // 1 arg
- UNRECOGNIZED_TYPE_NAME, // 1 arg
- UNRECOGNIZED_TYPE_NAME_MAYBE, // 2 args
- UNABLE_TO_CREATE_MAP, // 1 arg
- UNINTERNED_STRINGS, // no args
- ERRORS_LIMIT_EXCEEDED, // no arg
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
-
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages.properties
deleted file mode 100644
index b4eb4cc5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages.properties
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NOT_A_QNAME = \
- {0} is not a valid QName
-
-# Not concatenated with any other string.
-UNRECOGNIZED_TYPE_NAME = \
- unrecognized type name: {0}
-
-UNRECOGNIZED_TYPE_NAME_MAYBE = \
- unrecognized type name: {0}. Did you mean {1}?
-
-UNRESOLVED_IDREF = \
- Undefined ID "{0}".
-
-# Printed after [ERROR]: string.
-UNEXPECTED_ELEMENT = \
- unexpected element (uri:"{0}", local:"{1}"). Expected elements are {2}
-
-UNEXPECTED_TEXT = \
- unexpected text "{0}"
-
-UNABLE_TO_CREATE_MAP = \
- The type of the field is {0}, but JAXB doesn't know how to create an instance \
- assignable to it. Create an instance in the constructor, or use a type that can \
- be assignable from HashMap.
-
-UNINTERNED_STRINGS = \
- Namespace URIs and local names to the unmarshaller needs to be interned.
-
-# user have to set Logger.getLogger("com.sun.xml.internal.bind").setLevel(Level.FINEST)
-ERRORS_LIMIT_EXCEEDED = \
- Errors limit exceeded. To receive all errors set 'com.sun.xml.internal.bind' logger to FINEST level.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_de.properties
deleted file mode 100644
index 31b70518..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_de.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NOT_A_QNAME = {0} ist kein g\u00FCltiger QName
-
-# Not concatenated with any other string.
-UNRECOGNIZED_TYPE_NAME = unbekannter Typname: {0}
-
-UNRECOGNIZED_TYPE_NAME_MAYBE = unbekannter Typname: {0}. Haben Sie {1} gemeint?
-
-UNRESOLVED_IDREF = Undefinierte ID "{0}".
-
-# Printed after [ERROR]: string.
-UNEXPECTED_ELEMENT = unerwartetes Element (URI:"{0}", lokal:"{1}"). Erwartete Elemente sind {2}
-
-UNEXPECTED_TEXT = unerwarteter Text "{0}"
-
-UNABLE_TO_CREATE_MAP = Der Typ des Feldes ist {0}, JAXB wei\u00DF jedoch nicht, wie eine Instanz erstellt werden soll, die ihm zugewiesen werden kann. Erstellen Sie eine Instanz im Konstruktor, oder verwenden Sie einen Typ, der aus HashMap zugewiesen werden kann.
-
-UNINTERNED_STRINGS = Die Methode intern() muss f\u00FCr Namespace-URIs und lokale Unmarshaller-Namen angewendet werden.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_es.properties
deleted file mode 100644
index e625d685..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_es.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NOT_A_QNAME = {0} no es un QName v\u00E1lido
-
-# Not concatenated with any other string.
-UNRECOGNIZED_TYPE_NAME = Nombre de tipo no reconocido: {0}.
-
-UNRECOGNIZED_TYPE_NAME_MAYBE = nombre de tipo no reconocido: {0}. \u00BFQuiso decir {1}?
-
-UNRESOLVED_IDREF = Identificador no definido "{0}".
-
-# Printed after [ERROR]: string.
-UNEXPECTED_ELEMENT = elemento inesperado (URI:"{0}", local:"{1}"). Los elementos esperados son {2}
-
-UNEXPECTED_TEXT = texto inesperado "{0}"
-
-UNABLE_TO_CREATE_MAP = El tipo del campo es {0}, pero JAXB no sabe c\u00F3mo crear una instancia que se le pueda asignar. Cree una instancia en el constructor o utilice un tipo que se pueda asignar desde HashMap.
-
-UNINTERNED_STRINGS = Se debe aplicar el m\u00E9todo intern() a los URI de espacios de nombres y los nombres locales del unmarshaller.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_fr.properties
deleted file mode 100644
index f6aec339..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_fr.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NOT_A_QNAME = {0} n''est pas un QName valide
-
-# Not concatenated with any other string.
-UNRECOGNIZED_TYPE_NAME = nom de type non reconnu : {0}
-
-UNRECOGNIZED_TYPE_NAME_MAYBE = non de type non reconnu : {0}. Vouliez-vous dire {1} ?
-
-UNRESOLVED_IDREF = ID "{0}" non d\u00E9fini.
-
-# Printed after [ERROR]: string.
-UNEXPECTED_ELEMENT = \u00E9l\u00E9ment inattendu (URI : "{0}", local : "{1}"). Les \u00E9l\u00E9ments attendus sont {2}
-
-UNEXPECTED_TEXT = texte "{0}" inattendu
-
-UNABLE_TO_CREATE_MAP = Le type du champ est {0}, mais JAXB ne sait pas comment cr\u00E9er une instance qui peut lui \u00EAtre affect\u00E9e. Cr\u00E9ez une instance dans le constructeur ou utilisez un type qui peut \u00EAtre affect\u00E9 \u00E0 partir de HashMap.
-
-UNINTERNED_STRINGS = La m\u00E9thode intern() doit \u00EAtre appliqu\u00E9e aux URI d'espace de noms et aux noms locaux du d\u00E9s\u00E9rialiseur.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_it.properties
deleted file mode 100644
index 1134a032..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_it.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NOT_A_QNAME = {0} non \u00E8 un QName valido
-
-# Not concatenated with any other string.
-UNRECOGNIZED_TYPE_NAME = nome tipo non riconosciuto: {0}
-
-UNRECOGNIZED_TYPE_NAME_MAYBE = nome tipo non riconosciuto: {0}. Si intendeva {1}?
-
-UNRESOLVED_IDREF = ID non definito: "{0}".
-
-# Printed after [ERROR]: string.
-UNEXPECTED_ELEMENT = elemento non previsto (uri:"{0}", local:"{1}"). Gli elementi previsti sono {2}
-
-UNEXPECTED_TEXT = testo non previsto "{0}"
-
-UNABLE_TO_CREATE_MAP = Il tipo del campo \u00E8 {0} ma JAXB non \u00E8 in grado di creare un''istanza a esso assegnabile. Creare un''istanza nel costruttore o usare un tipo che possa essere assegnabile da HashMap.
-
-UNINTERNED_STRINGS = Il metodo intern() deve essere applicato agli URI dello spazio di nomi e ai nomi locali dell'unmarshaller.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_ja.properties
deleted file mode 100644
index 98da8627..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_ja.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NOT_A_QNAME = {0}\u306F\u6709\u52B9\u306AQName\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-
-# Not concatenated with any other string.
-UNRECOGNIZED_TYPE_NAME = \u30BF\u30A4\u30D7\u306E\u540D\u524D\u3092\u8A8D\u8B58\u3067\u304D\u307E\u305B\u3093: {0}
-
-UNRECOGNIZED_TYPE_NAME_MAYBE = \u30BF\u30A4\u30D7\u306E\u540D\u524D\u3092\u8A8D\u8B58\u3067\u304D\u307E\u305B\u3093: {0}\u3002{1}\u306E\u8AA4\u308A\u3067\u3042\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
-
-UNRESOLVED_IDREF = \u672A\u5B9A\u7FA9\u306EID "{0}"\u3067\u3059\u3002
-
-# Printed after [ERROR]: string.
-UNEXPECTED_ELEMENT = \u4E88\u671F\u3057\u306A\u3044\u8981\u7D20(URI:"{0}"\u3001\u30ED\u30FC\u30AB\u30EB:"{1}")\u3067\u3059\u3002\u4E88\u671F\u3055\u308C\u308B\u8981\u7D20\u306F{2}\u3067\u3059
-
-UNEXPECTED_TEXT = \u4E88\u671F\u3057\u306A\u3044\u30C6\u30AD\u30B9\u30C8"{0}"
-
-UNABLE_TO_CREATE_MAP = \u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30BF\u30A4\u30D7\u306F{0}\u3067\u3059\u304C\u3001JAXB\u3067\u306F\u5272\u5F53\u53EF\u80FD\u306A\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u306E\u4F5C\u6210\u65B9\u6CD5\u304C\u4E0D\u660E\u3067\u3059\u3002\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u5185\u306B\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u4F5C\u6210\u3059\u308B\u304B\u3001HashMap\u304B\u3089\u5272\u5F53\u53EF\u80FD\u306A\u30BF\u30A4\u30D7\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-UNINTERNED_STRINGS = unmarshaller\u306B\u5BFE\u3059\u308B\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9URI\u304A\u3088\u3073\u30ED\u30FC\u30AB\u30EB\u540D\u3092\u30A4\u30F3\u30BF\u30FC\u30F3\u5316\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_ko.properties
deleted file mode 100644
index bd24f97b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_ko.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NOT_A_QNAME = {0}\uC740(\uB294) \uC801\uD569\uD55C QName\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-
-# Not concatenated with any other string.
-UNRECOGNIZED_TYPE_NAME = \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uC720\uD615 \uC774\uB984: {0}
-
-UNRECOGNIZED_TYPE_NAME_MAYBE = \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uC720\uD615 \uC774\uB984: {0}. {1}\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB824\uACE0 \uD55C \uAC83\uC785\uB2C8\uAE4C?
-
-UNRESOLVED_IDREF = "{0}"\uC740(\uB294) \uC815\uC758\uB418\uC9C0 \uC54A\uC740 ID\uC785\uB2C8\uB2E4.
-
-# Printed after [ERROR]: string.
-UNEXPECTED_ELEMENT = \uC608\uC0C1\uCE58 \uC54A\uC740 \uC694\uC18C(URI: "{0}", \uB85C\uCEEC: "{1}")\uC785\uB2C8\uB2E4. \uD544\uC694\uD55C \uC694\uC18C\uB294 {2}\uC785\uB2C8\uB2E4.
-
-UNEXPECTED_TEXT = \uC608\uC0C1\uCE58 \uC54A\uC740 "{0}" \uD14D\uC2A4\uD2B8
-
-UNABLE_TO_CREATE_MAP = \uC774 \uD544\uB4DC\uC758 \uC720\uD615\uC740 {0}\uC774\uC9C0\uB9CC JAXB\uAC00 \uC774 \uD544\uB4DC\uC5D0 \uC9C0\uC815 \uAC00\uB2A5\uD55C \uC778\uC2A4\uD134\uC2A4\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0DD\uC131\uC790\uC5D0 \uC778\uC2A4\uD134\uC2A4\uB97C \uC0DD\uC131\uD558\uAC70\uB098 HashMap\uC5D0\uC11C \uC9C0\uC815 \uAC00\uB2A5\uD55C \uC720\uD615\uC744 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624.
-
-UNINTERNED_STRINGS = \uC5B8\uB9C8\uC15C\uB7EC\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4 URI \uBC0F \uB85C\uCEEC \uC774\uB984\uC5D0 \uB300\uD574 intern() \uBA54\uC18C\uB4DC\uB97C \uD638\uCD9C\uD574\uC57C \uD569\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_pt_BR.properties
deleted file mode 100644
index 44905610..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_pt_BR.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NOT_A_QNAME = {0} n\u00E3o \u00E9 um QName v\u00E1lido
-
-# Not concatenated with any other string.
-UNRECOGNIZED_TYPE_NAME = nome do tipo n\u00E3o reconhecido: {0}
-
-UNRECOGNIZED_TYPE_NAME_MAYBE = nome do tipo n\u00E3o reconhecido: {0}. Voc\u00EA quis dizer {1}?
-
-UNRESOLVED_IDREF = ID Indefinido "{0}".
-
-# Printed after [ERROR]: string.
-UNEXPECTED_ELEMENT = elemento inesperado (uri:"{0}", local:"{1}"). Os elementos esperados s\u00E3o {2}
-
-UNEXPECTED_TEXT = texto inesperado "{0}"
-
-UNABLE_TO_CREATE_MAP = O tipo de campo \u00E9 {0}, mas JAXB n\u00E3o sabe como criar uma inst\u00E2ncia atribu\u00EDvel a ele. Crie uma inst\u00E2ncia no construtor ou use um tipo que pode ser atribu\u00EDvel do HashMap.
-
-UNINTERNED_STRINGS = URIs de namespace e nomes locais para o unmarshaller precisam ser internos.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_zh_CN.properties
deleted file mode 100644
index a809dedb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_zh_CN.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NOT_A_QNAME = {0}\u4E0D\u662F\u6709\u6548\u7684 QName
-
-# Not concatenated with any other string.
-UNRECOGNIZED_TYPE_NAME = \u65E0\u6CD5\u8BC6\u522B\u7C7B\u578B\u540D\u79F0: {0}
-
-UNRECOGNIZED_TYPE_NAME_MAYBE = \u65E0\u6CD5\u8BC6\u522B\u7C7B\u578B\u540D\u79F0: {0}\u3002\u662F\u5426\u6253\u7B97{1}?
-
-UNRESOLVED_IDREF = \u672A\u5B9A\u4E49\u7684 ID "{0}"\u3002
-
-# Printed after [ERROR]: string.
-UNEXPECTED_ELEMENT = \u610F\u5916\u7684\u5143\u7D20 (uri:"{0}", local:"{1}")\u3002\u6240\u9700\u5143\u7D20\u4E3A{2}
-
-UNEXPECTED_TEXT = \u610F\u5916\u7684\u6587\u672C "{0}"
-
-UNABLE_TO_CREATE_MAP = \u6B64\u5B57\u6BB5\u7684\u7C7B\u578B\u4E3A{0}, \u4F46 JAXB \u4E0D\u77E5\u9053\u5982\u4F55\u521B\u5EFA\u53EF\u5206\u914D\u7ED9\u8BE5\u7C7B\u578B\u7684\u5B9E\u4F8B\u3002\u8BF7\u5728\u6784\u9020\u5668\u4E2D\u521B\u5EFA\u5B9E\u4F8B, \u6216\u8005\u4F7F\u7528\u53EF\u4ECE HashMap \u5206\u914D\u7684\u7C7B\u578B\u3002
-
-UNINTERNED_STRINGS = \u89E3\u7F16\u96C6\u5668\u7684\u540D\u79F0\u7A7A\u95F4 URI \u548C\u672C\u5730\u540D\u79F0\u9700\u8981\u4FDD\u7559\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_zh_TW.properties
deleted file mode 100644
index ffe8cc5b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_zh_TW.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-NOT_A_QNAME = {0} \u4E0D\u662F\u6709\u6548\u7684 QName
-
-# Not concatenated with any other string.
-UNRECOGNIZED_TYPE_NAME = \u7121\u6CD5\u8FA8\u8B58\u7684\u985E\u578B\u540D\u7A31: {0}
-
-UNRECOGNIZED_TYPE_NAME_MAYBE = \u7121\u6CD5\u8FA8\u8B58\u7684\u985E\u578B\u540D\u7A31: {0}. \u60A8\u6307\u7684\u662F {1} \u55CE?
-
-UNRESOLVED_IDREF = \u672A\u5B9A\u7FA9\u7684 ID "{0}".
-
-# Printed after [ERROR]: string.
-UNEXPECTED_ELEMENT = \u672A\u9810\u671F\u7684\u5143\u7D20 (URI:"{0}", \u672C\u6A5F:"{1}"). \u9810\u671F\u7684\u5143\u7D20\u70BA {2}
-
-UNEXPECTED_TEXT = \u672A\u9810\u671F\u7684\u6587\u5B57 "{0}"
-
-UNABLE_TO_CREATE_MAP = \u6B04\u4F4D\u7684\u985E\u578B\u70BA {0}, \u4F46 JAXB \u4E0D\u77E5\u9053\u5982\u4F55\u5EFA\u7ACB\u53EF\u6307\u5B9A\u7D66\u5B83\u7684\u57F7\u884C\u8655\u7406. \u8ACB\u5728\u5EFA\u69CB\u5B50\u4E2D\u5EFA\u7ACB\u57F7\u884C\u8655\u7406, \u6216\u4F7F\u7528\u53EF\u5F9E HashMap \u6307\u5B9A\u7684\u985E\u578B.
-
-UNINTERNED_STRINGS = \u5FC5\u9808\u99D0\u7559 (intern) \u89E3\u9664\u5C01\u9001\u8655\u7406\u7A0B\u5F0F (Unmarshaller) \u7684\u547D\u540D\u7A7A\u9593 URI \u8207\u672C\u6A5F\u540D\u7A31.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Patcher.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Patcher.java
deleted file mode 100644
index 62f845e4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Patcher.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import org.xml.sax.SAXException;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface Patcher {
- void run() throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ProxyLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ProxyLoader.java
deleted file mode 100644
index 67adf61e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ProxyLoader.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link Loader} that delegates the processing to another {@link Loader}
- * at {@link #startElement(UnmarshallingContext.State, TagName)}.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class ProxyLoader extends Loader {
- public ProxyLoader() {
- super(false);
- }
-
- @Override
- public final void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- Loader loader = selectLoader(state,ea);
- state.setLoader(loader);
- loader.startElement(state,ea);
- }
-
- /**
- * Picks the loader to delegate to.
- *
- * @return never null.
- */
- protected abstract Loader selectLoader(UnmarshallingContext.State state, TagName ea) throws SAXException;
-
- @Override
- public final void leaveElement(UnmarshallingContext.State state, TagName ea) {
- // this loader is used just to forward to another loader,
- // so we should never get this event.
- throw new IllegalStateException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Receiver.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Receiver.java
deleted file mode 100644
index b38b19b1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Receiver.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import org.xml.sax.SAXException;
-
-/**
- * Receives an object by a child {@link Loader}.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface Receiver {
- /**
- * Called when the child loader is deactivated.
- *
- * @param state
- * points to the parent's current state.
- * @param o
- * object that was loaded. may be null.
- */
- void receive(UnmarshallingContext.State state, Object o) throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SAXConnector.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SAXConnector.java
deleted file mode 100644
index a7e9abc6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SAXConnector.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import com.sun.xml.internal.bind.Util;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.UnmarshallerHandler;
-
-import com.sun.xml.internal.bind.WhiteSpaceProcessor;
-import com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-/**
- * Receives SAX events and convert them to our internal events.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class SAXConnector implements UnmarshallerHandler {
-
- private LocatorEx loc;
-
- private static final Logger logger = Util.getClassLogger();
-
- /**
- * SAX may fire consecutive characters event, but we don't allow it.
- * so use this buffer to perform buffering.
- */
- private final StringBuilder buffer = new StringBuilder();
-
- private final XmlVisitor next;
- private final UnmarshallingContext context;
- private final XmlVisitor.TextPredictor predictor;
-
- private static final class TagNameImpl extends TagName {
- String qname;
- @Override
- public String getQname() {
- return qname;
- }
- }
-
- private final TagNameImpl tagName = new TagNameImpl();
-
- /**
- * @param externalLocator
- * If the caller is producing SAX events from sources other than Unicode and angle brackets,
- * the caller can override the default SAX {@link Locator} object by this object
- * to provide better location information.
- */
- public SAXConnector(XmlVisitor next, LocatorEx externalLocator ) {
- this.next = next;
- this.context = next.getContext();
- this.predictor = next.getPredictor();
- this.loc = externalLocator;
- }
-
- @Override
- public Object getResult() throws JAXBException, IllegalStateException {
- return context.getResult();
- }
-
- public UnmarshallingContext getContext() {
- return context;
- }
-
- @Override
- public void setDocumentLocator(final Locator locator) {
- if(loc!=null)
- return; // we already have an external locator. ignore.
-
- this.loc = new LocatorExWrapper(locator);
- }
-
- @Override
- public void startDocument() throws SAXException {
- if (logger.isLoggable(Level.FINER)) {
- logger.log(Level.FINER, "SAXConnector.startDocument");
- }
- next.startDocument(loc,null);
- }
-
- @Override
- public void endDocument() throws SAXException {
- if (logger.isLoggable(Level.FINER)) {
- logger.log(Level.FINER, "SAXConnector.endDocument");
- }
- next.endDocument();
- }
-
- @Override
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
- if (logger.isLoggable(Level.FINER)) {
- logger.log(Level.FINER, "SAXConnector.startPrefixMapping: {0}:{1}", new Object[]{prefix, uri});
- }
- next.startPrefixMapping(prefix,uri);
- }
-
- @Override
- public void endPrefixMapping(String prefix) throws SAXException {
- if (logger.isLoggable(Level.FINER)) {
- logger.log(Level.FINER, "SAXConnector.endPrefixMapping: {0}", new Object[]{prefix});
- }
- next.endPrefixMapping(prefix);
- }
-
- @Override
- public void startElement(String uri, String local, String qname, Attributes atts) throws SAXException {
- if (logger.isLoggable(Level.FINER)) {
- logger.log(Level.FINER, "SAXConnector.startElement: {0}:{1}:{2}, attrs: {3}", new Object[]{uri, local, qname, atts});
- }
- // work gracefully with misconfigured parsers that don't support namespaces
- if( uri==null || uri.length()==0 )
- uri="";
- if( local==null || local.length()==0 )
- local=qname;
- if( qname==null || qname.length()==0 )
- qname=local;
-
- processText(!context.getCurrentState().isMixed());
-
- tagName.uri = uri;
- tagName.local = local;
- tagName.qname = qname;
- tagName.atts = atts;
- next.startElement(tagName);
- }
-
- @Override
- public void endElement(String uri, String localName, String qName) throws SAXException {
- if (logger.isLoggable(Level.FINER)) {
- logger.log(Level.FINER, "SAXConnector.startElement: {0}:{1}:{2}", new Object[]{uri, localName, qName});
- }
- processText(false);
- tagName.uri = uri;
- tagName.local = localName;
- tagName.qname = qName;
- next.endElement(tagName);
- }
-
-
- @Override
- public final void characters( char[] buf, int start, int len ) {
- if (logger.isLoggable(Level.FINEST)) {
- logger.log(Level.FINEST, "SAXConnector.characters: {0}", buf);
- }
- if( predictor.expectText() )
- buffer.append(buf,start,len);
- }
-
- @Override
- public final void ignorableWhitespace( char[] buf, int start, int len ) {
- if (logger.isLoggable(Level.FINEST)) {
- logger.log(Level.FINEST, "SAXConnector.characters{0}", buf);
- }
- characters(buf,start,len);
- }
-
- @Override
- public void processingInstruction(String target, String data) {
- // nop
- }
-
- @Override
- public void skippedEntity(String name) {
- // nop
- }
-
- private void processText( boolean ignorable ) throws SAXException {
- if (predictor.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer)))
- next.text(buffer);
- buffer.setLength(0);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Scope.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Scope.java
deleted file mode 100644
index bfd98e9b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Scope.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Lister;
-
-import org.xml.sax.SAXException;
-
-/**
- * Holds the information about packing scope.
- *
- * <p>
- * When no packing is started yet, all the fields should be set to null.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class Scope<BeanT,PropT,ItemT,PackT> {
-
- public final UnmarshallingContext context;
-
- private BeanT bean;
- private Accessor<BeanT,PropT> acc;
- private PackT pack;
- private Lister<BeanT,PropT,ItemT,PackT> lister;
-
- Scope(UnmarshallingContext context) {
- this.context = context;
- }
-
- /**
- * Returns true if this scope object is filled by a packing in progress.
- */
- public boolean hasStarted() {
- return bean!=null;
- }
-
- /**
- * Initializes all the fields to null.
- */
- public void reset() {
- if(bean==null) {
- // already initialized
- assert clean();
- return;
- }
-
- bean = null;
- acc = null;
- pack = null;
- lister = null;
- }
-
- /**
- * Finishes up the current packing in progress (if any) and
- * resets this object.
- */
- public void finish() throws AccessorException {
- if(hasStarted()) {
- lister.endPacking(pack,bean,acc);
- reset();
- }
- assert clean();
- }
-
- private boolean clean() {
- return bean==null && acc==null && pack==null && lister==null;
- }
-
- /**
- * Adds a new item to this packing scope.
- */
- public void add( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister, ItemT value) throws SAXException{
- try {
- if(!hasStarted()) {
- this.bean = (BeanT)context.getCurrentState().getTarget();
- this.acc = acc;
- this.lister = lister;
- this.pack = lister.startPacking(bean,acc);
- }
-
- lister.addToPack(pack,value);
- } catch (AccessorException e) {
- Loader.handleGenericException(e,true);
- // recover from this error by ignoring future items.
- this.lister = Lister.getErrorInstance();
- this.acc = Accessor.getErrorInstance();
- }
- }
-
- /**
- * Starts the packing scope, without adding any item.
- *
- * This allows us to return an empty pack, thereby allowing the user
- * to distinguish empty array vs null array.
- */
- public void start( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister) throws SAXException{
- try {
- if(!hasStarted()) {
- this.bean = (BeanT)context.getCurrentState().getTarget();
- this.acc = acc;
- this.lister = lister;
- this.pack = lister.startPacking(bean,acc);
- }
- } catch (AccessorException e) {
- Loader.handleGenericException(e,true);
- // recover from this error by ignoring future items.
- this.lister = Lister.getErrorInstance();
- this.acc = Accessor.getErrorInstance();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SecureLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SecureLoader.java
deleted file mode 100644
index 2cc371e2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SecureLoader.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-/**
- * Class defined for safe calls of getClassLoader methods of any kind (context/system/class
- * classloader. This MUST be package private and defined in every package which
- * uses such invocations.
- * @author snajper
- */
-class SecureLoader {
-
- static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXConnector.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXConnector.java
deleted file mode 100644
index 9dd85a6b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXConnector.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import javax.xml.bind.ValidationEventLocator;
-import javax.xml.bind.helpers.ValidationEventLocatorImpl;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLStreamException;
-
-import org.xml.sax.SAXException;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-abstract class StAXConnector {
- public abstract void bridge() throws XMLStreamException;
-
-
- // event sink
- protected final XmlVisitor visitor;
-
- protected final UnmarshallingContext context;
- protected final XmlVisitor.TextPredictor predictor;
-
- private final class TagNameImpl extends TagName {
- public String getQname() {
- return StAXConnector.this.getCurrentQName();
- }
- }
-
- protected final TagName tagName = new TagNameImpl();
-
- protected StAXConnector(XmlVisitor visitor) {
- this.visitor = visitor;
- context = visitor.getContext();
- predictor = visitor.getPredictor();
- }
-
- /**
- * Gets the {@link Location}. Used for implementing the line number information.
- * @return must not null.
- */
- protected abstract Location getCurrentLocation();
-
- /**
- * Gets the QName of the current element.
- */
- protected abstract String getCurrentQName();
-
- protected final void handleStartDocument(NamespaceContext nsc) throws SAXException {
- visitor.startDocument(new LocatorEx() {
- public ValidationEventLocator getLocation() {
- return new ValidationEventLocatorImpl(this);
- }
- public int getColumnNumber() {
- return getCurrentLocation().getColumnNumber();
- }
- public int getLineNumber() {
- return getCurrentLocation().getLineNumber();
- }
- public String getPublicId() {
- return getCurrentLocation().getPublicId();
- }
- public String getSystemId() {
- return getCurrentLocation().getSystemId();
- }
- },nsc);
- }
-
- protected final void handleEndDocument() throws SAXException {
- visitor.endDocument();
- }
-
- protected static String fixNull(String s) {
- if(s==null) return "";
- else return s;
- }
-
- protected final String getQName(String prefix, String localName) {
- if(prefix==null || prefix.length()==0)
- return localName;
- else
- return prefix + ':' + localName;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXEventConnector.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXEventConnector.java
deleted file mode 100644
index 688bb143..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXEventConnector.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLEventReader;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.events.Attribute;
-import javax.xml.stream.events.Characters;
-import javax.xml.stream.events.EndElement;
-import javax.xml.stream.events.Namespace;
-import javax.xml.stream.events.StartElement;
-import javax.xml.stream.events.XMLEvent;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * This is a simple utility class that adapts StAX events from an
- * {@link XMLEventReader} to unmarshaller events on a
- * {@link XmlVisitor}, bridging between the two
- * parser technologies.
- *
- * @author Ryan.Shoemaker@Sun.COM
- * @version 1.0
- */
-final class StAXEventConnector extends StAXConnector {
-
- // StAX event source
- private final XMLEventReader staxEventReader;
-
- /** Current event. */
- private XMLEvent event;
-
- /**
- * Shared and reused {@link Attributes}.
- */
- private final AttributesImpl attrs = new AttributesImpl();
-
- /**
- * SAX may fire consective characters event, but we don't allow it.
- * so use this buffer to perform buffering.
- */
- private final StringBuilder buffer = new StringBuilder();
-
- private boolean seenText;
-
- /**
- * Construct a new StAX to SAX adapter that will convert a StAX event
- * stream into a SAX event stream.
- *
- * @param staxCore
- * StAX event source
- * @param visitor
- * sink
- */
- public StAXEventConnector(XMLEventReader staxCore, XmlVisitor visitor) {
- super(visitor);
- staxEventReader = staxCore;
- }
-
- public void bridge() throws XMLStreamException {
-
- try {
- // remembers the nest level of elements to know when we are done.
- int depth=0;
-
- event = staxEventReader.peek();
-
- if( !event.isStartDocument() && !event.isStartElement() )
- throw new IllegalStateException();
-
- // if the parser is on START_DOCUMENT, skip ahead to the first element
- do {
- event = staxEventReader.nextEvent();
- } while( !event.isStartElement() );
-
- handleStartDocument(event.asStartElement().getNamespaceContext());
-
- OUTER:
- while(true) {
- // These are all of the events listed in the javadoc for
- // XMLEvent.
- // The spec only really describes 11 of them.
- switch (event.getEventType()) {
- case XMLStreamConstants.START_ELEMENT :
- handleStartElement(event.asStartElement());
- depth++;
- break;
- case XMLStreamConstants.END_ELEMENT :
- depth--;
- handleEndElement(event.asEndElement());
- if(depth==0) break OUTER;
- break;
- case XMLStreamConstants.CHARACTERS :
- case XMLStreamConstants.CDATA :
- case XMLStreamConstants.SPACE :
- handleCharacters(event.asCharacters());
- break;
- }
-
-
- event=staxEventReader.nextEvent();
- }
-
- handleEndDocument();
- event = null; // avoid keeping a stale reference
- } catch (SAXException e) {
- throw new XMLStreamException(e);
- }
- }
-
- protected Location getCurrentLocation() {
- return event.getLocation();
- }
-
- protected String getCurrentQName() {
- QName qName;
- if(event.isEndElement())
- qName = event.asEndElement().getName();
- else
- qName = event.asStartElement().getName();
- return getQName(qName.getPrefix(), qName.getLocalPart());
- }
-
-
- private void handleCharacters(Characters event) throws SAXException, XMLStreamException {
- if(!predictor.expectText())
- return; // text isn't expected. simply skip
-
- seenText = true;
-
- // check the next event
- XMLEvent next;
- while(true) {
- next = staxEventReader.peek();
- if(!isIgnorable(next))
- break;
- staxEventReader.nextEvent();
- }
-
- if(isTag(next)) {
- // this is by far the common case --- you have <foo>abc</foo> or <foo>abc<bar/>...</foo>
- visitor.text(event.getData());
- return;
- }
-
- // otherwise we have things like "abc<!-- test -->def".
- // concatenate all text
- buffer.append(event.getData());
-
- while(true) {
- while(true) {
- next = staxEventReader.peek();
- if(!isIgnorable(next))
- break;
- staxEventReader.nextEvent();
- }
-
- if(isTag(next)) {
- // found all adjacent text
- visitor.text(buffer);
- buffer.setLength(0);
- return;
- }
-
- buffer.append(next.asCharacters().getData());
- staxEventReader.nextEvent(); // consume
- }
- }
-
- private boolean isTag(XMLEvent event) {
- int eventType = event.getEventType();
- return eventType==XMLEvent.START_ELEMENT || eventType==XMLEvent.END_ELEMENT;
- }
-
- private boolean isIgnorable(XMLEvent event) {
- int eventType = event.getEventType();
- return eventType==XMLEvent.COMMENT || eventType==XMLEvent.PROCESSING_INSTRUCTION;
- }
-
- private void handleEndElement(EndElement event) throws SAXException {
- if(!seenText && predictor.expectText()) {
- visitor.text("");
- }
-
- // fire endElement
- QName qName = event.getName();
- tagName.uri = fixNull(qName.getNamespaceURI());
- tagName.local = qName.getLocalPart();
- visitor.endElement(tagName);
-
- // end namespace bindings
- for( Iterator<Namespace> i = event.getNamespaces(); i.hasNext();) {
- String prefix = fixNull(i.next().getPrefix()); // be defensive
- visitor.endPrefixMapping(prefix);
- }
-
- seenText = false;
- }
-
- private void handleStartElement(StartElement event) throws SAXException {
- // start namespace bindings
- for (Iterator i = event.getNamespaces(); i.hasNext();) {
- Namespace ns = (Namespace)i.next();
- visitor.startPrefixMapping(
- fixNull(ns.getPrefix()),
- fixNull(ns.getNamespaceURI()));
- }
-
- // fire startElement
- QName qName = event.getName();
- tagName.uri = fixNull(qName.getNamespaceURI());
- String localName = qName.getLocalPart();
- tagName.uri = fixNull(qName.getNamespaceURI());
- tagName.local = localName;
- tagName.atts = getAttributes(event);
- visitor.startElement(tagName);
-
- seenText = false;
- }
-
-
-
- /**
- * Get the attributes associated with the given START_ELEMENT StAXevent.
- *
- * @return the StAX attributes converted to an org.xml.sax.Attributes
- */
- private Attributes getAttributes(StartElement event) {
- attrs.clear();
-
- // in SAX, namespace declarations are not part of attributes by default.
- // (there's a property to control that, but as far as we are concerned
- // we don't use it.) So don't add xmlns:* to attributes.
-
- // gather non-namespace attrs
- for (Iterator i = event.getAttributes(); i.hasNext();) {
- Attribute staxAttr = (Attribute)i.next();
-
- QName name = staxAttr.getName();
- String uri = fixNull(name.getNamespaceURI());
- String localName = name.getLocalPart();
- String prefix = name.getPrefix();
- String qName;
- if (prefix == null || prefix.length() == 0)
- qName = localName;
- else
- qName = prefix + ':' + localName;
- String type = staxAttr.getDTDType();
- String value = staxAttr.getValue();
-
- attrs.addAttribute(uri, localName, qName, type, value);
- }
-
- return attrs;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXExConnector.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXExConnector.java
deleted file mode 100644
index 8effcb1c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXExConnector.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx;
-import org.xml.sax.SAXException;
-
-/**
- * Reads XML from StAX {@link XMLStreamReader} and
- * feeds events to {@link XmlVisitor}.
- *
- * @author Ryan.Shoemaker@Sun.COM
- * @author Kohsuke Kawaguchi
- * @version JAXB 2.0
- */
-final class StAXExConnector extends StAXStreamConnector {
-
- // StAX event source
- private final XMLStreamReaderEx in;
-
- public StAXExConnector(XMLStreamReaderEx in, XmlVisitor visitor) {
- super(in,visitor);
- this.in = in;
- }
-
- @Override
- protected void handleCharacters() throws XMLStreamException, SAXException {
- if( predictor.expectText() ) {
- CharSequence pcdata = in.getPCDATA();
- if(pcdata instanceof com.sun.xml.internal.org.jvnet.staxex.Base64Data) {
- com.sun.xml.internal.org.jvnet.staxex.Base64Data bd = (com.sun.xml.internal.org.jvnet.staxex.Base64Data) pcdata;
- Base64Data binary = new Base64Data();
- if(!bd.hasData())
- binary.set(bd.getDataHandler());
- else
- binary.set( bd.get(), bd.getDataLen(), bd.getMimeType() );
- // we make an assumption here that the binary data shows up on its own
- // not adjacent to other text. So it's OK to fire it off right now.
- visitor.text(binary);
- textReported = true;
- } else {
- buffer.append(pcdata);
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXStreamConnector.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXStreamConnector.java
deleted file mode 100644
index a3b51b05..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StAXStreamConnector.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import java.lang.reflect.Constructor;
-
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import com.sun.xml.internal.bind.WhiteSpaceProcessor;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- * Reads XML from StAX {@link XMLStreamReader} and
- * feeds events to {@link XmlVisitor}.
- * <p>
- * TODO:
- * Finding the optimized FI implementations is a bit hacky and not very
- * extensible. Can we use the service provider mechanism in general for
- * concrete implementations of StAXConnector.
- *
- * @author Ryan.Shoemaker@Sun.COM
- * @author Kohsuke Kawaguchi
- * @version JAXB 2.0
- */
-class StAXStreamConnector extends StAXConnector {
-
- /**
- * Creates a {@link StAXConnector} from {@link XMLStreamReader}.
- *
- * This method checks if the parser is FI parser and acts accordingly.
- */
- public static StAXConnector create(XMLStreamReader reader, XmlVisitor visitor) {
- // try optimized codepath
- final Class readerClass = reader.getClass();
- if (FI_STAX_READER_CLASS != null && FI_STAX_READER_CLASS.isAssignableFrom(readerClass) && FI_CONNECTOR_CTOR!=null) {
- try {
- return FI_CONNECTOR_CTOR.newInstance(reader,visitor);
- } catch (Exception t) {
- }
- }
-
- // Quick hack until SJSXP fixes 6270116
- boolean isZephyr = readerClass.getName().equals("com.sun.xml.internal.stream.XMLReaderImpl");
- if (getBoolProp(reader,"org.codehaus.stax2.internNames") &&
- getBoolProp(reader,"org.codehaus.stax2.internNsUris"))
- ; // no need for interning
- else
- if (isZephyr)
- ; // no need for interning
- else
- if (checkImplementaionNameOfSjsxp(reader))
- ; // no need for interning.
- else
- visitor = new InterningXmlVisitor(visitor);
-
- if (STAX_EX_READER_CLASS!=null && STAX_EX_READER_CLASS.isAssignableFrom(readerClass)) {
- try {
- return STAX_EX_CONNECTOR_CTOR.newInstance(reader,visitor);
- } catch (Exception t) {
- }
- }
-
- return new StAXStreamConnector(reader,visitor);
- }
-
- private static boolean checkImplementaionNameOfSjsxp(XMLStreamReader reader) {
- try {
- Object name = reader.getProperty("http://java.sun.com/xml/stream/properties/implementation-name");
- return name!=null && name.equals("sjsxp");
- } catch (Exception e) {
- // be defensive against broken StAX parsers since javadoc is not clear
- // about when an error happens
- return false;
- }
- }
-
- private static boolean getBoolProp(XMLStreamReader r, String n) {
- try {
- Object o = r.getProperty(n);
- if(o instanceof Boolean) return (Boolean)o;
- return false;
- } catch (Exception e) {
- // be defensive against broken StAX parsers since javadoc is not clear
- // about when an error happens
- return false;
- }
- }
-
-
- // StAX event source
- private final XMLStreamReader staxStreamReader;
-
- /**
- * SAX may fire consecutive characters event, but we don't allow it.
- * so use this buffer to perform buffering.
- */
- protected final StringBuilder buffer = new StringBuilder();
-
- /**
- * Set to true if the text() event is reported, and therefore
- * the following text() event should be suppressed.
- */
- protected boolean textReported = false;
-
- protected StAXStreamConnector(XMLStreamReader staxStreamReader, XmlVisitor visitor) {
- super(visitor);
- this.staxStreamReader = staxStreamReader;
- }
-
- public void bridge() throws XMLStreamException {
-
- try {
- // remembers the nest level of elements to know when we are done.
- int depth=0;
-
- // if the parser is at the start tag, proceed to the first element
- int event = staxStreamReader.getEventType();
- if(event == XMLStreamConstants.START_DOCUMENT) {
- // nextTag doesn't correctly handle DTDs
- while( !staxStreamReader.isStartElement() )
- event = staxStreamReader.next();
- }
-
-
- if( event!=XMLStreamConstants.START_ELEMENT)
- throw new IllegalStateException("The current event is not START_ELEMENT\n but " + event);
-
- handleStartDocument(staxStreamReader.getNamespaceContext());
-
- OUTER:
- while(true) {
- // These are all of the events listed in the javadoc for
- // XMLEvent.
- // The spec only really describes 11 of them.
- switch (event) {
- case XMLStreamConstants.START_ELEMENT :
- handleStartElement();
- depth++;
- break;
- case XMLStreamConstants.END_ELEMENT :
- depth--;
- handleEndElement();
- if(depth==0) break OUTER;
- break;
- case XMLStreamConstants.CHARACTERS :
- case XMLStreamConstants.CDATA :
- case XMLStreamConstants.SPACE :
- handleCharacters();
- break;
- // otherwise simply ignore
- }
-
- event=staxStreamReader.next();
- }
-
- staxStreamReader.next(); // move beyond the end tag.
-
- handleEndDocument();
- } catch (SAXException e) {
- throw new XMLStreamException(e);
- }
- }
-
- protected Location getCurrentLocation() {
- return staxStreamReader.getLocation();
- }
-
- protected String getCurrentQName() {
- return getQName(staxStreamReader.getPrefix(),staxStreamReader.getLocalName());
- }
-
- private void handleEndElement() throws SAXException {
- processText(false);
-
- // fire endElement
- tagName.uri = fixNull(staxStreamReader.getNamespaceURI());
- tagName.local = staxStreamReader.getLocalName();
- visitor.endElement(tagName);
-
- // end namespace bindings
- int nsCount = staxStreamReader.getNamespaceCount();
- for (int i = nsCount - 1; i >= 0; i--) {
- visitor.endPrefixMapping(fixNull(staxStreamReader.getNamespacePrefix(i)));
- }
- }
-
- private void handleStartElement() throws SAXException {
- processText(true);
-
- // start namespace bindings
- int nsCount = staxStreamReader.getNamespaceCount();
- for (int i = 0; i < nsCount; i++) {
- visitor.startPrefixMapping(
- fixNull(staxStreamReader.getNamespacePrefix(i)),
- fixNull(staxStreamReader.getNamespaceURI(i)));
- }
-
- // fire startElement
- tagName.uri = fixNull(staxStreamReader.getNamespaceURI());
- tagName.local = staxStreamReader.getLocalName();
- tagName.atts = attributes;
-
- visitor.startElement(tagName);
- }
-
- /**
- * Proxy of {@link Attributes} that read from {@link XMLStreamReader}.
- */
- private final Attributes attributes = new Attributes() {
- public int getLength() {
- return staxStreamReader.getAttributeCount();
- }
-
- public String getURI(int index) {
- String uri = staxStreamReader.getAttributeNamespace(index);
- if(uri==null) return "";
- return uri;
- }
-
- public String getLocalName(int index) {
- return staxStreamReader.getAttributeLocalName(index);
- }
-
- public String getQName(int index) {
- String prefix = staxStreamReader.getAttributePrefix(index);
- if(prefix==null || prefix.length()==0)
- return getLocalName(index);
- else
- return prefix + ':' + getLocalName(index);
- }
-
- public String getType(int index) {
- return staxStreamReader.getAttributeType(index);
- }
-
- public String getValue(int index) {
- return staxStreamReader.getAttributeValue(index);
- }
-
- public int getIndex(String uri, String localName) {
- for( int i=getLength()-1; i>=0; i-- )
- if( localName.equals(getLocalName(i)) && uri.equals(getURI(i)))
- return i;
- return -1;
- }
-
- // this method sholdn't be used that often (if at all)
- // so it's OK to be slow.
- public int getIndex(String qName) {
- for( int i=getLength()-1; i>=0; i-- ) {
- if(qName.equals(getQName(i)))
- return i;
- }
- return -1;
- }
-
- public String getType(String uri, String localName) {
- int index = getIndex(uri,localName);
- if(index<0) return null;
- return getType(index);
- }
-
- public String getType(String qName) {
- int index = getIndex(qName);
- if(index<0) return null;
- return getType(index);
- }
-
- public String getValue(String uri, String localName) {
- int index = getIndex(uri,localName);
- if(index<0) return null;
- return getValue(index);
- }
-
- public String getValue(String qName) {
- int index = getIndex(qName);
- if(index<0) return null;
- return getValue(index);
- }
- };
-
- protected void handleCharacters() throws XMLStreamException, SAXException {
- if( predictor.expectText() )
- buffer.append(
- staxStreamReader.getTextCharacters(),
- staxStreamReader.getTextStart(),
- staxStreamReader.getTextLength() );
- }
-
- private void processText( boolean ignorable ) throws SAXException {
- if( predictor.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer) || context.getCurrentState().isMixed())) {
- if(textReported) {
- textReported = false;
- } else {
- visitor.text(buffer);
- }
- }
- buffer.setLength(0);
- }
-
-
-
- /**
- * Reference to FI's StAXReader class, if FI can be loaded.
- */
- private static final Class FI_STAX_READER_CLASS = initFIStAXReaderClass();
- private static final Constructor<? extends StAXConnector> FI_CONNECTOR_CTOR = initFastInfosetConnectorClass();
-
- private static Class initFIStAXReaderClass() {
- try {
- Class<?> fisr = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.stax.FastInfosetStreamReader");
- Class<?> sdp = Class.forName("com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser");
- // Check if StAXDocumentParser implements FastInfosetStreamReader
- if (fisr.isAssignableFrom(sdp))
- return sdp;
- else
- return null;
- } catch (Throwable e) {
- return null;
- }
- }
-
- private static Constructor<? extends StAXConnector> initFastInfosetConnectorClass() {
- try {
- if (FI_STAX_READER_CLASS == null)
- return null;
-
- Class c = Class.forName(
- "com.sun.xml.internal.bind.v2.runtime.unmarshaller.FastInfosetConnector");
- return c.getConstructor(FI_STAX_READER_CLASS,XmlVisitor.class);
- } catch (Throwable e) {
- return null;
- }
- }
-
- //
- // reference to StAXEx classes
- //
- private static final Class STAX_EX_READER_CLASS = initStAXExReader();
- private static final Constructor<? extends StAXConnector> STAX_EX_CONNECTOR_CTOR = initStAXExConnector();
-
- private static Class initStAXExReader() {
- try {
- return Class.forName("com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx");
- } catch (Throwable e) {
- return null;
- }
- }
-
- private static Constructor<? extends StAXConnector> initStAXExConnector() {
- try {
- Class c = Class.forName("com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXExConnector");
- return c.getConstructor(STAX_EX_READER_CLASS,XmlVisitor.class);
- } catch (Throwable e) {
- return null;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java
deleted file mode 100644
index 941944b0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/StructureLoader.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import com.sun.xml.internal.bind.v2.runtime.property.AttributeProperty;
-import com.sun.xml.internal.bind.v2.runtime.property.Property;
-import com.sun.xml.internal.bind.v2.runtime.property.StructureLoaderBuilder;
-import com.sun.xml.internal.bind.v2.runtime.property.UnmarshallerChain;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.v2.util.QNameMap;
-
-import java.util.Iterator;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- * Loads children of an element.
- *
- * <p>
- * This loader works with a single {@link JaxBeanInfo} and handles
- * attributes, child elements, or child text.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class StructureLoader extends Loader {
- /**
- * This map statically stores information of the
- * unmarshaller loader and can be used while unmarshalling
- * Since creating new QNames is expensive use this optimized
- * version of the map
- */
- private final QNameMap<ChildLoader> childUnmarshallers = new QNameMap<ChildLoader>();
-
- /**
- * Loader that processes elements that didn't match anf of the {@link #childUnmarshallers}.
- * Can be null.
- */
- private /*final*/ ChildLoader catchAll;
-
- /**
- * If we have a loader for processing text. Otherwise null.
- */
- private /*final*/ ChildLoader textHandler;
-
- /**
- * Unmarshallers for attribute values.
- * May be null if no attribute is expected and {@link #attCatchAll}==null.
- */
- private /*final*/ QNameMap<TransducedAccessor> attUnmarshallers;
-
- /**
- * This will receive all the attributes
- * that were not processed. Never be null.
- */
- private /*final*/ Accessor<Object,Map<QName,String>> attCatchAll;
-
- private final JaxBeanInfo beanInfo;
-
- /**
- * The number of scopes this dispatcher needs to keep active.
- */
- private /*final*/ int frameSize;
-
- // this class is potentially useful for general audience, not just for ClassBeanInfoImpl,
- // but since right now that is the only user, we make the construction code very specific
- // to ClassBeanInfoImpl. See rev.1.5 of this file for the original general purpose definition.
- public StructureLoader(ClassBeanInfoImpl beanInfo) {
- super(true);
- this.beanInfo = beanInfo;
- }
-
- /**
- * Completes the initialization.
- *
- * <p>
- * To fix the cyclic reference issue, the main part of the initialization needs to be done
- * after a {@link StructureLoader} is set to {@link ClassBeanInfoImpl#loader}.
- */
- public void init( JAXBContextImpl context, ClassBeanInfoImpl beanInfo, Accessor<?,Map<QName,String>> attWildcard) {
- UnmarshallerChain chain = new UnmarshallerChain(context);
- for (ClassBeanInfoImpl bi = beanInfo; bi != null; bi = bi.superClazz) {
- for (int i = bi.properties.length - 1; i >= 0; i--) {
- Property p = bi.properties[i];
-
- switch(p.getKind()) {
- case ATTRIBUTE:
- if(attUnmarshallers==null)
- attUnmarshallers = new QNameMap<TransducedAccessor>();
- AttributeProperty ap = (AttributeProperty) p;
- attUnmarshallers.put(ap.attName.toQName(),ap.xacc);
- break;
- case ELEMENT:
- case REFERENCE:
- case MAP:
- case VALUE:
- p.buildChildElementUnmarshallers(chain,childUnmarshallers);
- break;
- }
- }
- }
-
- this.frameSize = chain.getScopeSize();
-
- textHandler = childUnmarshallers.get(StructureLoaderBuilder.TEXT_HANDLER);
- catchAll = childUnmarshallers.get(StructureLoaderBuilder.CATCH_ALL);
-
- if(attWildcard!=null) {
- attCatchAll = (Accessor<Object,Map<QName,String>>) attWildcard;
- // we use attUnmarshallers==null as a sign to skip the attribute processing
- // altogether, so if we have an att wildcard we need to have an empty qname map.
- if(attUnmarshallers==null)
- attUnmarshallers = EMPTY;
- } else {
- attCatchAll = null;
- }
- }
-
- @Override
- public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- UnmarshallingContext context = state.getContext();
-
- // create the object to unmarshal
- Object child;
- assert !beanInfo.isImmutable();
-
- // let's see if we can reuse the existing peer object
- child = context.getInnerPeer();
-
- if(child != null && beanInfo.jaxbType!=child.getClass())
- child = null; // unexpected type.
-
- if(child != null)
- beanInfo.reset(child,context);
-
- if(child == null)
- child = context.createInstance(beanInfo);
-
- context.recordInnerPeer(child);
-
- state.setTarget(child);
-
- fireBeforeUnmarshal(beanInfo, child, state);
-
-
- context.startScope(frameSize);
-
- if(attUnmarshallers!=null) {
- Attributes atts = ea.atts;
- for (int i = 0; i < atts.getLength(); i ++){
- String auri = atts.getURI(i);
- // may be empty string based on parser settings
- String alocal = atts.getLocalName(i);
- if ("".equals(alocal)) {
- alocal = atts.getQName(i);
- }
- String avalue = atts.getValue(i);
- TransducedAccessor xacc = attUnmarshallers.get(auri, alocal);
- try {
- if(xacc!=null) {
- xacc.parse(child,avalue);
- } else if (attCatchAll!=null) {
- String qname = atts.getQName(i);
- if(atts.getURI(i).equals(WellKnownNamespace.XML_SCHEMA_INSTANCE))
- continue; // xsi:* attributes are meant to be processed by us, not by user apps.
- Object o = state.getTarget();
- Map<QName,String> map = attCatchAll.get(o);
- if(map==null) {
- // TODO: use ClassFactory.inferImplClass(sig,knownImplClasses)
-
- // if null, create a new map.
- if(attCatchAll.valueType.isAssignableFrom(HashMap.class))
- map = new HashMap<QName,String>();
- else {
- // we don't know how to create a map for this.
- // report an error and back out
- context.handleError(Messages.UNABLE_TO_CREATE_MAP.format(attCatchAll.valueType));
- return;
- }
- attCatchAll.set(o,map);
- }
-
- String prefix;
- int idx = qname.indexOf(':');
- if(idx<0) prefix="";
- else prefix=qname.substring(0,idx);
-
- map.put(new QName(auri,alocal,prefix),avalue);
- }
- } catch (AccessorException e) {
- handleGenericException(e,true);
- }
- }
- }
- }
-
- @Override
- public void childElement(UnmarshallingContext.State state, TagName arg) throws SAXException {
- ChildLoader child = childUnmarshallers.get(arg.uri,arg.local);
- if (child == null) {
- child = catchAll;
- if (child==null) {
- super.childElement(state,arg);
- return;
- }
- }
-
- state.setLoader(child.loader);
- state.setReceiver(child.receiver);
- }
-
- @Override
- public Collection<QName> getExpectedChildElements() {
- return childUnmarshallers.keySet();
- }
-
- @Override
- public Collection<QName> getExpectedAttributes() {
- return attUnmarshallers.keySet();
- }
-
- @Override
- public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
- if(textHandler!=null)
- textHandler.loader.text(state,text);
- }
-
- @Override
- public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- state.getContext().endScope(frameSize);
- fireAfterUnmarshal(beanInfo, state.getTarget(), state.getPrev());
- }
-
- private static final QNameMap<TransducedAccessor> EMPTY = new QNameMap<TransducedAccessor>();
-
- public JaxBeanInfo getBeanInfo() {
- return beanInfo;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/TagName.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/TagName.java
deleted file mode 100644
index feb06dad..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/TagName.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.runtime.Name;
-
-import org.xml.sax.Attributes;
-
-/**
- * Represents an XML tag name (and attributes for start tags.)
- *
- * <p>
- * This object is used so reduce the number of method call parameters
- * among unmarshallers.
- *
- * An instance of this is expected to be reused by the caller of
- * {@link XmlVisitor}. Note that the rest of the unmarshaller may
- * modify any of the fields while processing an event (such as to
- * intern strings, replace attributes),
- * so {@link XmlVisitor} should reset all fields for each use.
- *
- * <p>
- * The 'qname' parameter, which holds the qualified name of the tag
- * (such as 'foo:bar' or 'zot'), is not used in the typical unmarshalling
- * route and it's also expensive to compute for some input.
- * Thus this parameter is computed lazily.
- *
- * @author Kohsuke Kawaguchi
- */
-@SuppressWarnings({"StringEquality"})
-public abstract class TagName {
- /**
- * URI of the attribute/element name.
- *
- * Can be empty, but never null. Interned.
- */
- public String uri;
- /**
- * Local part of the attribute/element name.
- *
- * Never be null. Interned.
- */
- public String local;
-
- /**
- * Used only for the enterElement event.
- * Otherwise the value is undefined.
- *
- * This might be {@link AttributesEx}.
- */
- public Attributes atts;
-
- public TagName() {
- }
-
- /**
- * Checks if the given name pair matches this name.
- */
- public final boolean matches( String nsUri, String local ) {
- return this.uri==nsUri && this.local==local;
- }
-
- /**
- * Checks if the given name pair matches this name.
- */
- public final boolean matches( Name name ) {
- return this.local==name.localName && this.uri==name.nsUri;
- }
-
-// /**
-// * @return
-// * Can be empty but always non-null. NOT interned.
-// */
-// public final String getPrefix() {
-// int idx = qname.indexOf(':');
-// if(idx<0) return "";
-// else return qname.substring(0,idx);
-// }
-
- public String toString() {
- return '{'+uri+'}'+local;
- }
-
- /**
- * Gets the qualified name of the tag.
- *
- * @return never null.
- */
- public abstract String getQname();
-
- /**
- * Gets the prefix. This is slow.
- *
- * @return can be "" but never null.
- */
- public String getPrefix() {
- String qname = getQname();
- int idx = qname.indexOf(':');
- if(idx<0) return "";
- else return qname.substring(0,idx);
- }
-
- /**
- * Creates {@link QName}.
- */
- public QName createQName() {
- return new QName(uri,local,getPrefix());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/TextLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/TextLoader.java
deleted file mode 100644
index a482ae6a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/TextLoader.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.runtime.Transducer;
-
-import org.xml.sax.SAXException;
-
-/**
- * Unmarshals a text into an object.
- *
- * <p>
- * If the caller can use {@link LeafPropertyLoader}, that's usually faster.
- *
- * @see LeafPropertyLoader
- * @see ValuePropertyLoader
- * @author Kohsuke Kawaguchi
- */
-public class TextLoader extends Loader {
-
- private final Transducer xducer;
-
- public TextLoader(Transducer xducer) {
- super(true);
- this.xducer = xducer;
- }
-
- public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
- try {
- state.setTarget(xducer.parse(text));
- } catch (AccessorException e) {
- handleGenericException(e,true);
- } catch (RuntimeException e) {
- handleParseConversionException(state,e);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallerImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallerImpl.java
deleted file mode 100644
index a02012d7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallerImpl.java
+++ /dev/null
@@ -1,619 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.PropertyException;
-import javax.xml.bind.UnmarshalException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.UnmarshallerHandler;
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-import javax.xml.bind.helpers.AbstractUnmarshallerImpl;
-import javax.xml.stream.XMLEventReader;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.events.XMLEvent;
-import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.Schema;
-
-import com.sun.xml.internal.bind.IDResolver;
-import com.sun.xml.internal.bind.api.ClassResolver;
-import com.sun.xml.internal.bind.unmarshaller.DOMScanner;
-import com.sun.xml.internal.bind.unmarshaller.InfosetScanner;
-import com.sun.xml.internal.bind.unmarshaller.Messages;
-import com.sun.xml.internal.bind.v2.ClassFactory;
-import com.sun.xml.internal.bind.v2.runtime.AssociationMap;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import com.sun.xml.internal.bind.v2.util.XmlFactory;
-
-import java.io.Closeable;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Default Unmarshaller implementation.
- *
- * <p>
- * This class can be extended by the generated code to provide
- * type-safe unmarshall methods.
- *
- * @author
- * <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
- public final class UnmarshallerImpl extends AbstractUnmarshallerImpl implements ValidationEventHandler, Closeable
-{
- /** Owning {@link JAXBContext} */
- protected final JAXBContextImpl context;
-
- /**
- * schema which will be used to validate during calls to unmarshal
- */
- private Schema schema;
-
- public final UnmarshallingContext coordinator;
-
- /** Unmarshaller.Listener */
- private Listener externalListener;
-
- /**
- * The attachment unmarshaller used to support MTOM and swaRef.
- */
- private AttachmentUnmarshaller attachmentUnmarshaller;
- private IDResolver idResolver = new DefaultIDResolver();
-
- public UnmarshallerImpl( JAXBContextImpl context, AssociationMap assoc ) {
- this.context = context;
- this.coordinator = new UnmarshallingContext( this, assoc );
-
- try {
- setEventHandler(this);
- } catch (JAXBException e) {
- throw new AssertionError(e); // impossible
- }
- }
-
- public UnmarshallerHandler getUnmarshallerHandler() {
- return getUnmarshallerHandler(true,null);
- }
-
- private XMLReader reader = null;
-
- /**
- * Obtains a configured XMLReader.
- *
- * This method is used when the client-specified
- * {@link SAXSource} object doesn't have XMLReader.
- *
- * {@link Unmarshaller} is not re-entrant, so we will
- * only use one instance of XMLReader.
- *
- * Overriden in order to fix potential security issue.
- */
- @Override
- protected XMLReader getXMLReader() throws JAXBException {
- if (reader == null) {
- try {
- SAXParserFactory parserFactory = XmlFactory.createParserFactory(context.disableSecurityProcessing);
- // there is no point in asking a validation because
- // there is no guarantee that the document will come with
- // a proper schemaLocation.
- parserFactory.setValidating(false);
- reader = parserFactory.newSAXParser().getXMLReader();
- } catch (ParserConfigurationException e) {
- throw new JAXBException(e);
- } catch (SAXException e) {
- throw new JAXBException(e);
- }
- }
- return reader;
- }
-
- private SAXConnector getUnmarshallerHandler( boolean intern, JaxBeanInfo expectedType ) {
- XmlVisitor h = createUnmarshallerHandler(null, false, expectedType);
- if (intern) {
- h = new InterningXmlVisitor(h);
- }
- return new SAXConnector(h,null);
- }
-
- /**
- * Creates and configures a new unmarshalling pipe line.
- * Depending on the setting, we put a validator as a filter.
- *
- * @return
- * A component that implements both {@link UnmarshallerHandler}
- * and {@link ValidationEventHandler}. All the parsing errors
- * should be reported to this error handler for the unmarshalling
- * process to work correctly.
- *
- * Also, returned handler expects all the XML names to be interned.
- *
- */
- public final XmlVisitor createUnmarshallerHandler(InfosetScanner scanner, boolean inplace, JaxBeanInfo expectedType ) {
-
- coordinator.reset(scanner,inplace,expectedType,idResolver);
- XmlVisitor unmarshaller = coordinator;
-
- // delegate to JAXP 1.3 for validation if the client provided a schema
- if (schema != null) {
- unmarshaller = new ValidatingUnmarshaller(schema,unmarshaller);
- }
-
- if(attachmentUnmarshaller!=null && attachmentUnmarshaller.isXOPPackage()) {
- unmarshaller = new MTOMDecorator(this,unmarshaller,attachmentUnmarshaller);
- }
-
- return unmarshaller;
- }
-
- private static final DefaultHandler dummyHandler = new DefaultHandler();
-
- public static boolean needsInterning( XMLReader reader ) {
- // attempt to set it to true, which could fail
- try {
- reader.setFeature("http://xml.org/sax/features/string-interning",true);
- } catch (SAXException e) {
- // if it fails that's fine. we'll work around on our side
- }
-
- try {
- if (reader.getFeature("http://xml.org/sax/features/string-interning")) {
- return false; // no need for intern
- }
- } catch (SAXException e) {
- // unrecognized/unsupported
- }
- // otherwise we need intern
- return true;
- }
-
- protected Object unmarshal( XMLReader reader, InputSource source ) throws JAXBException {
- return unmarshal0(reader,source,null);
- }
-
- protected <T> JAXBElement<T> unmarshal( XMLReader reader, InputSource source, Class<T> expectedType ) throws JAXBException {
- if(expectedType==null) {
- throw new IllegalArgumentException();
- }
- return (JAXBElement)unmarshal0(reader,source,getBeanInfo(expectedType));
- }
-
- private Object unmarshal0( XMLReader reader, InputSource source, JaxBeanInfo expectedType ) throws JAXBException {
-
- SAXConnector connector = getUnmarshallerHandler(needsInterning(reader),expectedType);
-
- reader.setContentHandler(connector);
- // saxErrorHandler will be set by the getUnmarshallerHandler method.
- // configure XMLReader so that the error will be sent to it.
- // This is essential for the UnmarshallerHandler to be able to abort
- // unmarshalling when an error is found.
- //
- // Note that when this XMLReader is provided by the client code,
- // it might be already configured to call a client error handler.
- // This will clobber such handler, if any.
- //
- // Ryan noted that we might want to report errors to such a client
- // error handler as well.
- reader.setErrorHandler(coordinator);
-
- try {
- reader.parse(source);
- } catch( IOException e ) {
- coordinator.clearStates();
- throw new UnmarshalException(e);
- } catch( SAXException e ) {
- coordinator.clearStates();
- throw createUnmarshalException(e);
- }
-
- Object result = connector.getResult();
-
- // avoid keeping unnecessary references too long to let the GC
- // reclaim more memory.
- // setting null upsets some parsers, so use a dummy instance instead.
- reader.setContentHandler(dummyHandler);
- reader.setErrorHandler(dummyHandler);
-
- return result;
- }
-
- @Override
- public <T> JAXBElement<T> unmarshal( Source source, Class<T> expectedType ) throws JAXBException {
- if (source instanceof SAXSource) {
- SAXSource ss = (SAXSource) source;
-
- XMLReader locReader = ss.getXMLReader();
- if (locReader == null) {
- locReader = getXMLReader();
- }
-
- return unmarshal(locReader, ss.getInputSource(), expectedType);
- }
- if (source instanceof StreamSource) {
- return unmarshal(getXMLReader(), streamSourceToInputSource((StreamSource) source), expectedType);
- }
- if (source instanceof DOMSource) {
- return unmarshal(((DOMSource) source).getNode(), expectedType);
- }
-
- // we don't handle other types of Source
- throw new IllegalArgumentException();
- }
-
- public Object unmarshal0( Source source, JaxBeanInfo expectedType ) throws JAXBException {
- if (source instanceof SAXSource) {
- SAXSource ss = (SAXSource) source;
-
- XMLReader locReader = ss.getXMLReader();
- if (locReader == null) {
- locReader = getXMLReader();
- }
-
- return unmarshal0(locReader, ss.getInputSource(), expectedType);
- }
- if (source instanceof StreamSource) {
- return unmarshal0(getXMLReader(), streamSourceToInputSource((StreamSource) source), expectedType);
- }
- if (source instanceof DOMSource) {
- return unmarshal0(((DOMSource) source).getNode(), expectedType);
- }
-
- // we don't handle other types of Source
- throw new IllegalArgumentException();
- }
-
-
- @Override
- public final ValidationEventHandler getEventHandler() {
- try {
- return super.getEventHandler();
- } catch (JAXBException e) {
- // impossible
- throw new AssertionError();
- }
- }
-
- /**
- * Returns true if an event handler is installed.
- * <p>
- * The default handler ignores any errors, and for that this method returns false.
- */
- public final boolean hasEventHandler() {
- return getEventHandler()!=this;
- }
-
- @Override
- public <T> JAXBElement<T> unmarshal(Node node, Class<T> expectedType) throws JAXBException {
- if (expectedType == null) {
- throw new IllegalArgumentException();
- }
- return (JAXBElement)unmarshal0(node,getBeanInfo(expectedType));
- }
-
- public final Object unmarshal( Node node ) throws JAXBException {
- return unmarshal0(node,null);
- }
-
- // just to make the the test harness happy by making this method accessible
- @Deprecated
- public final Object unmarshal( SAXSource source ) throws JAXBException {
- return super.unmarshal(source);
- }
-
- public final Object unmarshal0( Node node, JaxBeanInfo expectedType ) throws JAXBException {
- try {
- final DOMScanner scanner = new DOMScanner();
-
- InterningXmlVisitor handler = new InterningXmlVisitor(createUnmarshallerHandler(null,false,expectedType));
- scanner.setContentHandler(new SAXConnector(handler,scanner));
-
- if(node.getNodeType() == Node.ELEMENT_NODE) {
- scanner.scan((Element)node);
- } else if(node.getNodeType() == Node.DOCUMENT_NODE) {
- scanner.scan((Document)node);
- } else {
- throw new IllegalArgumentException("Unexpected node type: "+node);
- }
-
- Object retVal = handler.getContext().getResult();
- handler.getContext().clearResult();
- return retVal;
- } catch( SAXException e ) {
- throw createUnmarshalException(e);
- }
- }
-
- @Override
- public Object unmarshal(XMLStreamReader reader) throws JAXBException {
- return unmarshal0(reader,null);
- }
-
- @Override
- public <T> JAXBElement<T> unmarshal(XMLStreamReader reader, Class<T> expectedType) throws JAXBException {
- if (expectedType==null) {
- throw new IllegalArgumentException();
- }
- return (JAXBElement)unmarshal0(reader,getBeanInfo(expectedType));
- }
-
- public Object unmarshal0(XMLStreamReader reader, JaxBeanInfo expectedType) throws JAXBException {
- if (reader == null) {
- throw new IllegalArgumentException(
- Messages.format(Messages.NULL_READER));
- }
-
- int eventType = reader.getEventType();
- if (eventType != XMLStreamConstants.START_ELEMENT
- && eventType != XMLStreamConstants.START_DOCUMENT) {
- // TODO: convert eventType into event name
- throw new IllegalStateException(
- Messages.format(Messages.ILLEGAL_READER_STATE,eventType));
- }
-
- XmlVisitor h = createUnmarshallerHandler(null,false,expectedType);
- StAXConnector connector=StAXStreamConnector.create(reader,h);
-
- try {
- connector.bridge();
- } catch (XMLStreamException e) {
- throw handleStreamException(e);
- }
-
- Object retVal = h.getContext().getResult();
- h.getContext().clearResult();
- return retVal;
- }
-
- @Override
- public <T> JAXBElement<T> unmarshal(XMLEventReader reader, Class<T> expectedType) throws JAXBException {
- if(expectedType==null) {
- throw new IllegalArgumentException();
- }
- return (JAXBElement)unmarshal0(reader,getBeanInfo(expectedType));
- }
-
- @Override
- public Object unmarshal(XMLEventReader reader) throws JAXBException {
- return unmarshal0(reader,null);
- }
-
- private Object unmarshal0(XMLEventReader reader,JaxBeanInfo expectedType) throws JAXBException {
- if (reader == null) {
- throw new IllegalArgumentException(
- Messages.format(Messages.NULL_READER));
- }
-
- try {
- XMLEvent event = reader.peek();
-
- if (!event.isStartElement() && !event.isStartDocument()) {
- // TODO: convert event into event name
- throw new IllegalStateException(
- Messages.format(
- Messages.ILLEGAL_READER_STATE,event.getEventType()));
- }
-
- // Quick hack until SJSXP fixes 6270116
- boolean isZephyr = reader.getClass().getName().equals("com.sun.xml.internal.stream.XMLReaderImpl");
- XmlVisitor h = createUnmarshallerHandler(null,false,expectedType);
- if(!isZephyr) {
- h = new InterningXmlVisitor(h);
- }
- new StAXEventConnector(reader,h).bridge();
- return h.getContext().getResult();
- } catch (XMLStreamException e) {
- throw handleStreamException(e);
- }
- }
-
- public Object unmarshal0( InputStream input, JaxBeanInfo expectedType ) throws JAXBException {
- return unmarshal0(getXMLReader(),new InputSource(input),expectedType);
- }
-
- private static JAXBException handleStreamException(XMLStreamException e) {
- // StAXStreamConnector wraps SAXException to XMLStreamException.
- // XMLStreamException doesn't print its nested stack trace when it prints
- // its stack trace, so if we wrap XMLStreamException in JAXBException,
- // it becomes harder to find out the real problem.
- // So we unwrap them here. But we don't want to unwrap too eagerly, because
- // that could throw away some meaningful exception information.
- Throwable ne = e.getNestedException();
- if(ne instanceof JAXBException) {
- return (JAXBException)ne;
- }
- if(ne instanceof SAXException) {
- return new UnmarshalException(ne);
- }
- return new UnmarshalException(e);
- }
-
- @Override
- public Object getProperty(String name) throws PropertyException {
- if(name.equals(IDResolver.class.getName())) {
- return idResolver;
- }
- return super.getProperty(name);
- }
-
- @Override
- public void setProperty(String name, Object value) throws PropertyException {
- if(name.equals(FACTORY)) {
- coordinator.setFactories(value);
- return;
- }
- if(name.equals(IDResolver.class.getName())) {
- idResolver = (IDResolver)value;
- return;
- }
- if(name.equals(ClassResolver.class.getName())) {
- coordinator.classResolver = (ClassResolver)value;
- return;
- }
- if(name.equals(ClassLoader.class.getName())) {
- coordinator.classLoader = (ClassLoader)value;
- return;
- }
- super.setProperty(name, value);
- }
-
- public static final String FACTORY = "com.sun.xml.internal.bind.ObjectFactory";
-
- @Override
- public void setSchema(Schema schema) {
- this.schema = schema;
- }
-
- @Override
- public Schema getSchema() {
- return schema;
- }
-
- @Override
- public AttachmentUnmarshaller getAttachmentUnmarshaller() {
- return attachmentUnmarshaller;
- }
-
- @Override
- public void setAttachmentUnmarshaller(AttachmentUnmarshaller au) {
- this.attachmentUnmarshaller = au;
- }
-
- /**
- * @deprecated since 2.0
- */
- @Override
- public boolean isValidating() {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @deprecated since 2.0
- */
- @Override
- public void setValidating(boolean validating) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public <A extends XmlAdapter> void setAdapter(Class<A> type, A adapter) {
- if (type==null) {
- throw new IllegalArgumentException();
- }
- coordinator.putAdapter(type,adapter);
- }
-
- @Override
- public <A extends XmlAdapter> A getAdapter(Class<A> type) {
- if(type==null) {
- throw new IllegalArgumentException();
- }
- if(coordinator.containsAdapter(type)) {
- return coordinator.getAdapter(type);
- } else {
- return null;
- }
- }
-
- // opening up for public use
- @Override
- public UnmarshalException createUnmarshalException( SAXException e ) {
- return super.createUnmarshalException(e);
- }
-
-
- /**
- * Default error handling behavior for {@link Unmarshaller}.
- */
- public boolean handleEvent(ValidationEvent event) {
- return event.getSeverity()!=ValidationEvent.FATAL_ERROR;
- }
-
- private static InputSource streamSourceToInputSource( StreamSource ss ) {
- InputSource is = new InputSource();
- is.setSystemId( ss.getSystemId() );
- is.setByteStream( ss.getInputStream() );
- is.setCharacterStream( ss.getReader() );
-
- return is;
- }
-
- public <T> JaxBeanInfo<T> getBeanInfo(Class<T> clazz) throws JAXBException {
- return context.getBeanInfo(clazz,true);
- }
-
- @Override
- public Listener getListener() {
- return externalListener;
- }
-
- @Override
- public void setListener(Listener listener) {
- externalListener = listener;
- }
-
- public UnmarshallingContext getContext() {
- return coordinator;
- }
-
- @Override
- @SuppressWarnings("FinalizeDeclaration")
- protected void finalize() throws Throwable {
- try {
- ClassFactory.cleanCache();
- } finally {
- super.finalize();
- }
- }
-
- /**
- * Must be called from same thread which created the UnmarshallerImpl instance.
- * @throws IOException
- */
- public void close() throws IOException {
- ClassFactory.cleanCache();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallingContext.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallingContext.java
deleted file mode 100644
index c51d4fe3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/UnmarshallingContext.java
+++ /dev/null
@@ -1,1344 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Callable;
-
-import javax.xml.XMLConstants;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.UnmarshalException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.ValidationEventLocator;
-import javax.xml.bind.helpers.ValidationEventImpl;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.SAXParseException2;
-import com.sun.xml.internal.bind.IDResolver;
-import com.sun.xml.internal.bind.Util;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.api.ClassResolver;
-import com.sun.xml.internal.bind.unmarshaller.InfosetScanner;
-import com.sun.xml.internal.bind.v2.ClassFactory;
-import com.sun.xml.internal.bind.v2.runtime.AssociationMap;
-import com.sun.xml.internal.bind.v2.runtime.Coordinator;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.LocatorImpl;
-
-/**
- * Center of the unmarshalling.
- *
- * <p>
- * This object is responsible for coordinating {@link Loader}s to
- * perform the whole unmarshalling.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class UnmarshallingContext extends Coordinator
- implements NamespaceContext, ValidationEventHandler, ErrorHandler, XmlVisitor, XmlVisitor.TextPredictor {
-
- private static final Logger logger = Logger.getLogger(UnmarshallingContext.class.getName());
-
- /**
- * Root state.
- */
- private final State root;
-
- /**
- * The currently active state.
- */
- private State current;
-
- private static final LocatorEx DUMMY_INSTANCE;
-
- static {
- LocatorImpl loc = new LocatorImpl();
- loc.setPublicId(null);
- loc.setSystemId(null);
- loc.setLineNumber(-1);
- loc.setColumnNumber(-1);
- DUMMY_INSTANCE = new LocatorExWrapper(loc);
- }
-
- private @NotNull LocatorEx locator = DUMMY_INSTANCE;
-
- /** Root object that is being unmarshalled. */
- private Object result;
-
- /**
- * If non-null, this unmarshaller will unmarshal {@code JAXBElement<EXPECTEDTYPE>}
- * regardless of the tag name, as opposed to deciding the root object by using
- * the tag name.
- *
- * The property has a package-level access, because we cannot copy this value
- * to {@link UnmarshallingContext} when it is created. The property
- * on {@link Unmarshaller} could be changed after the handler is created.
- */
- private JaxBeanInfo expectedType;
-
- /**
- * Handles ID/IDREF.
- */
- private IDResolver idResolver;
-
- /**
- * This flag is set to true at the startDocument event
- * and false at the endDocument event.
- *
- * Until the first document is unmarshalled, we don't
- * want to return an object. So this variable is initialized
- * to true.
- */
- private boolean isUnmarshalInProgress = true;
- private boolean aborted = false;
-
- public final UnmarshallerImpl parent;
-
- /**
- * If the unmarshaller is doing associative unmarshalling,
- * this field is initialized to non-null.
- */
- private final AssociationMap assoc;
-
- /**
- * Indicates whether we are doing in-place unmarshalling
- * or not.
- *
- * <p>
- * This flag is unused when {@link #assoc}==null.
- * If it's non-null, then <tt>true</tt> indicates
- * that we are doing in-place associative unmarshalling.
- * If <tt>false</tt>, then we are doing associative unmarshalling
- * without object reuse.
- */
- private boolean isInplaceMode;
-
- /**
- * This object is consulted to get the element object for
- * the current element event.
- *
- * This is used when we are building an association map.
- */
- private InfosetScanner scanner;
-
- private Object currentElement;
-
- /**
- * @see XmlVisitor#startDocument(LocatorEx, NamespaceContext)
- */
- private NamespaceContext environmentNamespaceContext;
-
- /**
- * Used to discover additional classes when we hit unknown elements/types.
- */
- public @Nullable ClassResolver classResolver;
-
- /**
- * User-supplied {@link ClassLoader} for converting name to {@link Class}.
- * For backward compatibility, when null, use thread context classloader.
- */
- public @Nullable ClassLoader classLoader;
-
- /**
- * The variable introduced to avoid reporting n^10 similar errors.
- * After error is reported counter is decremented. When it became 0 - errors should not be reported any more.
- *
- * volatile is required to ensure that concurrent threads will see changed value
- */
- private static volatile int errorsCounter = 10;
-
- /**
- * State information for each element.
- */
- public final class State {
- /**
- * Loader that owns this element.
- */
- private Loader loader;
- /**
- * Once {@link #loader} is completed, this receiver
- * receives the result.
- */
- private Receiver receiver;
-
- private Intercepter intercepter;
-
- /**
- * Object being unmarshalled by this {@link #loader}.
- */
- private Object target;
-
- /**
- * Hack for making JAXBElement unmarshalling work.
- *
- * <p>
- * While the unmarshalling is in progress, the {@link #target} field stores the object being unmarshalled.
- * This makes it convenient to keep track of the unmarshalling activity in context of XML infoset, but
- * since there's only one {@link State} per element, this mechanism only works when there's one object
- * per element, which breaks down when we have {@link JAXBElement}, since the presence of JAXBElement
- * requires that we have two objects unmarshalled (a JAXBElement X and a value object Y bound to an XML type.)
- *
- * <p>
- * So to make room for storing both, this {@link #backup} field is used. When we create X instance
- * in the above example, we set that to {@code state.prev.target} and displace its old value to
- * {@code state.prev.backup} (where Y goes to {@code state.target}.) Upon the completion of the unmarshalling
- * of Y, we revert this.
- *
- * <p>
- * While this attributes X incorrectly to its parent element, this preserves the parent/child
- * relationship between unmarshalled objects and {@link State} parent/child relationship, and
- * it thereby makes {@link Receiver} mechanism simpler.
- *
- * <p>
- * Yes, I know this is a hack, and no, I'm not proud of it.
- *
- * @see ElementBeanInfoImpl.IntercepterLoader#startElement(State, TagName)
- * @see ElementBeanInfoImpl.IntercepterLoader#intercept(State, Object)
- */
- private Object backup;
-
- /**
- * Number of {@link UnmarshallingContext#nsBind}s declared thus far.
- * (The value of {@link UnmarshallingContext#nsLen} when this state is pushed.
- */
- private int numNsDecl;
-
- /**
- * If this element has an element default value.
- *
- * This should be set by either a parent {@link Loader} when
- * {@link Loader#childElement(State, TagName)} is called
- * or by a child {@link Loader} when
- * {@link Loader#startElement(State, TagName)} is called.
- */
- private String elementDefaultValue;
-
- /**
- * {@link State} for the parent element
- *
- * {@link State} objects form a doubly linked list.
- */
- private State prev;
- private State next;
-
- private boolean nil = false;
-
- /**
- * specifies that we are working with mixed content
- */
- private boolean mixed = false;
-
- /**
- * Gets the context.
- */
- public UnmarshallingContext getContext() {
- return UnmarshallingContext.this;
- }
-
- @SuppressWarnings("LeakingThisInConstructor")
- private State(State prev) {
- this.prev = prev;
- if (prev!=null) {
- prev.next = this;
- if (prev.mixed) // parent is in mixed mode
- this.mixed = true;
- }
- }
-
- private void push() {
- if (logger.isLoggable(Level.FINEST)) {
- logger.log(Level.FINEST, "State.push");
- }
- if (next==null) {
- assert current == this;
- next = new State(this);
- }
- nil = false;
- State n = next;
- n.numNsDecl = nsLen;
- current = n;
- }
-
- private void pop() {
- if (logger.isLoggable(Level.FINEST)) {
- logger.log(Level.FINEST, "State.pop");
- }
- assert prev!=null;
- loader = null;
- nil = false;
- mixed = false;
- receiver = null;
- intercepter = null;
- elementDefaultValue = null;
- target = null;
- current = prev;
- next = null;
- }
-
- public boolean isMixed() {
- return mixed;
- }
-
- public Object getTarget() {
- return target;
- }
-
- public void setLoader(Loader loader) {
- if (loader instanceof StructureLoader) // set mixed mode
- mixed = !((StructureLoader)loader).getBeanInfo().hasElementOnlyContentModel();
- this.loader = loader;
- }
-
- public void setReceiver(Receiver receiver) {
- this.receiver = receiver;
- }
-
- public State getPrev() {
- return prev;
- }
-
- public void setIntercepter(Intercepter intercepter) {
- this.intercepter = intercepter;
- }
-
- public void setBackup(Object backup) {
- this.backup = backup;
- }
-
- public void setTarget(Object target) {
- this.target = target;
- }
-
- public Object getBackup() {
- return backup;
- }
-
- public boolean isNil() {
- return nil;
- }
-
- public void setNil(boolean nil) {
- this.nil = nil;
- }
-
- public Loader getLoader() {
- return loader;
- }
-
- public String getElementDefaultValue() {
- return elementDefaultValue;
- }
-
- public void setElementDefaultValue(String elementDefaultValue) {
- this.elementDefaultValue = elementDefaultValue;
- }
- }
-
- /**
- * Stub to the user-specified factory method.
- */
- private static class Factory {
- private final Object factorInstance;
- private final Method method;
-
- public Factory(Object factorInstance, Method method) {
- this.factorInstance = factorInstance;
- this.method = method;
- }
-
- public Object createInstance() throws SAXException {
- try {
- return method.invoke(factorInstance);
- } catch (IllegalAccessException e) {
- getInstance().handleError(e,false);
- } catch (InvocationTargetException e) {
- getInstance().handleError(e,false);
- }
- return null; // can never be executed
- }
- }
-
-
- /**
- * Creates a new unmarshaller.
- *
- * @param assoc
- * Must be both non-null when the unmarshaller does the
- * in-place unmarshalling. Otherwise must be both null.
- */
- public UnmarshallingContext( UnmarshallerImpl _parent, AssociationMap assoc) {
- this.parent = _parent;
- this.assoc = assoc;
- this.root = this.current = new State(null);
- }
-
- public void reset(InfosetScanner scanner,boolean isInplaceMode, JaxBeanInfo expectedType, IDResolver idResolver) {
- this.scanner = scanner;
- this.isInplaceMode = isInplaceMode;
- this.expectedType = expectedType;
- this.idResolver = idResolver;
- }
-
- public JAXBContextImpl getJAXBContext() {
- return parent.context;
- }
-
- public State getCurrentState() {
- return current;
- }
-
- /**
- * On top of {@link JAXBContextImpl#selectRootLoader(State, TagName)},
- * this method also consults {@link ClassResolver}.
- *
- * @throws SAXException
- * if {@link ValidationEventHandler} reported a failure.
- */
- public Loader selectRootLoader(State state, TagName tag) throws SAXException {
- try {
- Loader l = getJAXBContext().selectRootLoader(state, tag);
- if(l!=null) return l;
-
- if(classResolver!=null) {
- Class<?> clazz = classResolver.resolveElementName(tag.uri, tag.local);
- if(clazz!=null) {
- JAXBContextImpl enhanced = getJAXBContext().createAugmented(clazz);
- JaxBeanInfo<?> bi = enhanced.getBeanInfo(clazz);
- return bi.getLoader(enhanced,true);
- }
- }
- } catch (RuntimeException e) {
- throw e;
- } catch (Exception e) {
- handleError(e);
- }
-
- return null;
- }
-
- public void clearStates() {
- State last = current;
- while (last.next != null) last = last.next;
- while (last.prev != null) {
- last.loader = null;
- last.nil = false;
- last.receiver = null;
- last.intercepter = null;
- last.elementDefaultValue = null;
- last.target = null;
- last = last.prev;
- last.next.prev = null;
- last.next = null;
- }
- current = last;
- }
-
- /**
- * User-specified factory methods.
- */
- private final Map<Class,Factory> factories = new HashMap<Class, Factory>();
-
- public void setFactories(Object factoryInstances) {
- factories.clear();
- if(factoryInstances==null) {
- return;
- }
- if(factoryInstances instanceof Object[]) {
- for( Object factory : (Object[])factoryInstances ) {
- // look for all the public methods inlcuding derived ones
- addFactory(factory);
- }
- } else {
- addFactory(factoryInstances);
- }
- }
-
- private void addFactory(Object factory) {
- for( Method m : factory.getClass().getMethods() ) {
- // look for methods whose signature is T createXXX()
- if(!m.getName().startsWith("create"))
- continue;
- if(m.getParameterTypes().length>0)
- continue;
-
- Class type = m.getReturnType();
-
- factories.put(type,new Factory(factory,m));
- }
- }
-
- @Override
- public void startDocument(LocatorEx locator, NamespaceContext nsContext) throws SAXException {
- if(locator!=null)
- this.locator = locator;
- this.environmentNamespaceContext = nsContext;
- // reset the object
- result = null;
- current = root;
-
- patchersLen=0;
- aborted = false;
- isUnmarshalInProgress = true;
- nsLen=0;
-
- if(expectedType!=null)
- root.loader = EXPECTED_TYPE_ROOT_LOADER;
- else
- root.loader = DEFAULT_ROOT_LOADER;
-
- idResolver.startDocument(this);
- }
-
- @Override
- public void startElement(TagName tagName) throws SAXException {
- pushCoordinator();
- try {
- _startElement(tagName);
- } finally {
- popCoordinator();
- }
- }
-
- private void _startElement(TagName tagName) throws SAXException {
- // remember the current element if we are interested in it.
- // because the inner peer might not be found while we consume
- // the enter element token, we need to keep this information
- // longer than this callback. That's why we assign it to a field.
- if( assoc!=null )
- currentElement = scanner.getCurrentElement();
-
- Loader h = current.loader;
- current.push();
-
- // tell the parent about the new child
- h.childElement(current,tagName);
- assert current.loader!=null; // the childElement should register this
- // and tell the new child that you are activated
- current.loader.startElement(current,tagName);
- }
-
- @Override
- public void text(CharSequence pcdata) throws SAXException {
- pushCoordinator();
- try {
- if (current.elementDefaultValue != null) {
- if (pcdata.length() == 0) {
- // send the default value into the unmarshaller instead
- pcdata = current.elementDefaultValue;
- }
- }
- current.loader.text(current, pcdata);
- } finally {
- popCoordinator();
- }
- }
-
- @Override
- public final void endElement(TagName tagName) throws SAXException {
- pushCoordinator();
- try {
- State child = current;
-
- // tell the child that your time is up
- child.loader.leaveElement(child,tagName);
-
- // child.pop will erase them so store them now
- Object target = child.target;
- Receiver recv = child.receiver;
- Intercepter intercepter = child.intercepter;
- child.pop();
-
- // then let the parent know
- if(intercepter!=null)
- target = intercepter.intercept(current,target);
- if(recv!=null)
- recv.receive(current,target);
- } finally {
- popCoordinator();
- }
- }
-
- @Override
- public void endDocument() throws SAXException {
- runPatchers();
- idResolver.endDocument();
-
- isUnmarshalInProgress = false;
- currentElement = null;
- locator = DUMMY_INSTANCE;
- environmentNamespaceContext = null;
-
- // at the successful completion, scope must be all closed
- assert root==current;
- }
-
- /**
- * You should be always calling this through {@link TextPredictor}.
- */
- @Deprecated
- @Override
- public boolean expectText() {
- return current.loader.expectText;
- }
-
- /**
- * You should be always getting {@link TextPredictor} from {@link XmlVisitor}.
- */
- @Deprecated
- @Override
- public TextPredictor getPredictor() {
- return this;
- }
-
- @Override
- public UnmarshallingContext getContext() {
- return this;
- }
-
- /**
- * Gets the result of the unmarshalling
- */
- public Object getResult() throws UnmarshalException {
- if(isUnmarshalInProgress)
- throw new IllegalStateException();
-
- if(!aborted) return result;
-
- // there was an error.
- throw new UnmarshalException((String)null);
- }
-
- void clearResult() {
- if (isUnmarshalInProgress) {
- throw new IllegalStateException();
- }
- result = null;
- }
-
- /**
- * Creates a new instance of the specified class.
- * In the unmarshaller, we need to check the user-specified factory class.
- */
- public Object createInstance( Class<?> clazz ) throws SAXException {
- if(!factories.isEmpty()) {
- Factory factory = factories.get(clazz);
- if(factory!=null)
- return factory.createInstance();
- }
- return ClassFactory.create(clazz);
- }
-
- /**
- * Creates a new instance of the specified class.
- * In the unmarshaller, we need to check the user-specified factory class.
- */
- public Object createInstance( JaxBeanInfo beanInfo ) throws SAXException {
- if(!factories.isEmpty()) {
- Factory factory = factories.get(beanInfo.jaxbType);
- if(factory!=null)
- return factory.createInstance();
- }
- try {
- return beanInfo.createInstance(this);
- } catch (IllegalAccessException e) {
- Loader.reportError("Unable to create an instance of "+beanInfo.jaxbType.getName(),e,false);
- } catch (InvocationTargetException e) {
- Loader.reportError("Unable to create an instance of "+beanInfo.jaxbType.getName(),e,false);
- } catch (InstantiationException e) {
- Loader.reportError("Unable to create an instance of "+beanInfo.jaxbType.getName(),e,false);
- }
- return null; // can never be here
- }
-
-
-
-//
-//
-// error handling
-//
-//
-
- /**
- * Reports an error to the user, and asks if s/he wants
- * to recover. If the canRecover flag is false, regardless
- * of the client instruction, an exception will be thrown.
- *
- * Only if the flag is true and the user wants to recover from an error,
- * the method returns normally.
- *
- * The thrown exception will be catched by the unmarshaller.
- */
- public void handleEvent(ValidationEvent event, boolean canRecover ) throws SAXException {
- ValidationEventHandler eventHandler = parent.getEventHandler();
-
- boolean recover = eventHandler.handleEvent(event);
-
- // if the handler says "abort", we will not return the object
- // from the unmarshaller.getResult()
- if(!recover) aborted = true;
-
- if( !canRecover || !recover )
- throw new SAXParseException2( event.getMessage(), locator,
- new UnmarshalException(
- event.getMessage(),
- event.getLinkedException() ) );
- }
-
- @Override
- public boolean handleEvent(ValidationEvent event) {
- try {
- // if the handler says "abort", we will not return the object.
- boolean recover = parent.getEventHandler().handleEvent(event);
- if(!recover) aborted = true;
- return recover;
- } catch( RuntimeException re ) {
- // if client event handler causes a runtime exception, then we
- // have to return false.
- return false;
- }
- }
-
- /**
- * Reports an exception found during the unmarshalling to the user.
- * This method is a convenience method that calls into
- * {@link #handleEvent(ValidationEvent, boolean)}
- */
- public void handleError(Exception e) throws SAXException {
- handleError(e,true);
- }
-
- public void handleError(Exception e,boolean canRecover) throws SAXException {
- handleEvent(new ValidationEventImpl(ValidationEvent.ERROR,e.getMessage(),locator.getLocation(),e),canRecover);
- }
-
- public void handleError(String msg) {
- handleEvent(new ValidationEventImpl(ValidationEvent.ERROR,msg,locator.getLocation()));
- }
-
- @Override
- protected ValidationEventLocator getLocation() {
- return locator.getLocation();
- }
-
- /**
- * Gets the current source location information in SAX {@link Locator}.
- * <p>
- * Sometimes the unmarshaller works against a different kind of XML source,
- * making this information meaningless.
- */
- public LocatorEx getLocator() { return locator; }
-
- /**
- * Called when there's no corresponding ID value.
- */
- public void errorUnresolvedIDREF(Object bean, String idref, LocatorEx loc) throws SAXException {
- handleEvent( new ValidationEventImpl(
- ValidationEvent.ERROR,
- Messages.UNRESOLVED_IDREF.format(idref),
- loc.getLocation()), true );
- }
-
-
-//
-//
-// ID/IDREF related code
-//
-//
- /**
- * Submitted patchers in the order they've submitted.
- * Many XML vocabulary doesn't use ID/IDREF at all, so we
- * initialize it with null.
- */
- private Patcher[] patchers = null;
- private int patchersLen = 0;
-
- /**
- * Adds a job that will be executed at the last of the unmarshalling.
- * This method is used to support ID/IDREF feature, but it can be used
- * for other purposes as well.
- *
- * @param job
- * The run method of this object is called.
- */
- public void addPatcher( Patcher job ) {
- // re-allocate buffer if necessary
- if( patchers==null )
- patchers = new Patcher[32];
- if( patchers.length == patchersLen ) {
- Patcher[] buf = new Patcher[patchersLen*2];
- System.arraycopy(patchers,0,buf,0,patchersLen);
- patchers = buf;
- }
- patchers[patchersLen++] = job;
- }
-
- /** Executes all the patchers. */
- private void runPatchers() throws SAXException {
- if( patchers!=null ) {
- for( int i=0; i<patchersLen; i++ ) {
- patchers[i].run();
- patchers[i] = null; // free memory
- }
- }
- }
-
- /**
- * Adds the object which is currently being unmarshalled
- * to the ID table.
- *
- * @return
- * Returns the value passed as the parameter.
- * This is a hack, but this makes it easier for ID
- * transducer to do its job.
- */
- // TODO: what shall we do if the ID is already declared?
- //
- // throwing an exception is one way. Overwriting the previous one
- // is another way. The latter allows us to process invalid documents,
- // while the former makes it impossible to handle them.
- //
- // I prefer to be flexible in terms of invalid document handling,
- // so chose not to throw an exception.
- //
- // I believe this is an implementation choice, not the spec issue.
- // -kk
- public String addToIdTable( String id ) throws SAXException {
- // Hmm...
- // in cases such as when ID is used as an attribute, or as @XmlValue
- // the target wilil be current.target.
- // but in some other cases, such as when ID is used as a child element
- // or a value of JAXBElement, it's current.prev.target.
- // I don't know if this detection logic is complete
- Object o = current.target;
- if(o==null)
- o = current.prev.target;
- idResolver.bind(id,o);
- return id;
- }
-
- /**
- * Looks up the ID table and gets associated object.
- *
- * <p>
- * The exception thrown from {@link Callable#call()} means the unmarshaller should abort
- * right away.
- *
- * @see IDResolver#resolve(String, Class)
- */
- public Callable getObjectFromId( String id, Class targetType ) throws SAXException {
- return idResolver.resolve(id,targetType);
- }
-
-//
-//
-// namespace binding maintainance
-//
-//
- private String[] nsBind = new String[16];
- private int nsLen=0;
-
- @Override
- public void startPrefixMapping( String prefix, String uri ) {
- if(nsBind.length==nsLen) {
- // expand the buffer
- String[] n = new String[nsLen*2];
- System.arraycopy(nsBind,0,n,0,nsLen);
- nsBind=n;
- }
- nsBind[nsLen++] = prefix;
- nsBind[nsLen++] = uri;
- }
- @Override
- public void endPrefixMapping( String prefix ) {
- nsLen-=2;
- }
- private String resolveNamespacePrefix( String prefix ) {
- if(prefix.equals("xml"))
- return XMLConstants.XML_NS_URI;
-
- for( int i=nsLen-2; i>=0; i-=2 ) {
- if(prefix.equals(nsBind[i]))
- return nsBind[i+1];
- }
-
- if(environmentNamespaceContext!=null)
- // temporary workaround until Zephyr fixes 6337180
- return environmentNamespaceContext.getNamespaceURI(prefix.intern());
-
- // by default, the default ns is bound to "".
- // but allow environmentNamespaceContext to take precedence
- if(prefix.equals(""))
- return "";
-
- // unresolved. error.
- return null;
- }
-
- /**
- * Returns a list of prefixes newly declared on the current element.
- *
- * @return
- * A possible zero-length array of prefixes. The default prefix
- * is represented by the empty string.
- */
- public String[] getNewlyDeclaredPrefixes() {
- return getPrefixList( current.prev.numNsDecl );
- }
-
- /**
- * Returns a list of all in-scope prefixes.
- *
- * @return
- * A possible zero-length array of prefixes. The default prefix
- * is represented by the empty string.
- */
- public String[] getAllDeclaredPrefixes() {
- return getPrefixList(0);
- }
-
- private String[] getPrefixList( int startIndex ) {
- int size = (current.numNsDecl - startIndex)/2;
- String[] r = new String[size];
- for( int i=0; i<r.length; i++ )
- r[i] = nsBind[startIndex+i*2];
- return r;
- }
-
- // NamespaceContext2 implementation
- //
- @Override
- public Iterator<String> getPrefixes(String uri) {
- // TODO: could be implemented much faster
- // wrap it into unmodifiable list so that the remove method
- // will throw UnsupportedOperationException.
- return Collections.unmodifiableList(
- getAllPrefixesInList(uri)).iterator();
- }
-
- private List<String> getAllPrefixesInList(String uri) {
- List<String> a = new ArrayList<String>();
-
- if( uri==null )
- throw new IllegalArgumentException();
- if( uri.equals(XMLConstants.XML_NS_URI) ) {
- a.add(XMLConstants.XML_NS_PREFIX);
- return a;
- }
- if( uri.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI) ) {
- a.add(XMLConstants.XMLNS_ATTRIBUTE);
- return a;
- }
-
- for( int i=nsLen-2; i>=0; i-=2 )
- if(uri.equals(nsBind[i+1]))
- if( getNamespaceURI(nsBind[i]).equals(nsBind[i+1]) )
- // make sure that this prefix is still effective.
- a.add(nsBind[i]);
-
- return a;
- }
-
- @Override
- public String getPrefix(String uri) {
- if( uri==null )
- throw new IllegalArgumentException();
- if( uri.equals(XMLConstants.XML_NS_URI) )
- return XMLConstants.XML_NS_PREFIX;
- if( uri.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI) )
- return XMLConstants.XMLNS_ATTRIBUTE;
-
- for( int i=nsLen-2; i>=0; i-=2 )
- if(uri.equals(nsBind[i+1]))
- if( getNamespaceURI(nsBind[i]).equals(nsBind[i+1]) )
- // make sure that this prefix is still effective.
- return nsBind[i];
-
- if(environmentNamespaceContext!=null)
- return environmentNamespaceContext.getPrefix(uri);
-
- return null;
- }
-
- @Override
- public String getNamespaceURI(String prefix) {
- if (prefix == null)
- throw new IllegalArgumentException();
- if (prefix.equals(XMLConstants.XMLNS_ATTRIBUTE))
- return XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
-
- return resolveNamespacePrefix(prefix);
- }
-
-//
-//
-//
-// scope management
-//
-//
-//
- private Scope[] scopes = new Scope[16];
- /**
- * Points to the top of the scope stack (=size-1).
- */
- private int scopeTop=0;
-
- {
- for( int i=0; i<scopes.length; i++ )
- scopes[i] = new Scope(this);
- }
-
- /**
- * Starts a new packing scope.
- *
- * <p>
- * This method allocates a specified number of fresh {@link Scope} objects.
- * They can be accessed by the {@link #getScope} method until the corresponding
- * {@link #endScope} method is invoked.
- *
- * <p>
- * A new scope will mask the currently active scope. Only one frame of {@link Scope}s
- * can be accessed at any given time.
- *
- * @param frameSize
- * The # of slots to be allocated.
- */
- public void startScope(int frameSize) {
- scopeTop += frameSize;
-
- // reallocation
- if(scopeTop>=scopes.length) {
- Scope[] s = new Scope[Math.max(scopeTop+1,scopes.length*2)];
- System.arraycopy(scopes,0,s,0,scopes.length);
- for( int i=scopes.length; i<s.length; i++ )
- s[i] = new Scope(this);
- scopes = s;
- }
- }
-
- /**
- * Ends the current packing scope.
- *
- * <p>
- * If any packing in progress will be finalized by this method.
- *
- * @param frameSize
- * The same size that gets passed to the {@link #startScope(int)}
- * method.
- */
- public void endScope(int frameSize) throws SAXException {
- try {
- for( ; frameSize>0; frameSize--, scopeTop-- )
- scopes[scopeTop].finish();
- } catch (AccessorException e) {
- handleError(e);
-
- // the error might have left scopes in inconsistent state,
- // so replace them by fresh ones
- for( ; frameSize>0; frameSize-- )
- scopes[scopeTop--] = new Scope(this);
- }
- }
-
- /**
- * Gets the currently active {@link Scope}.
- *
- * @param offset
- * a number between [0,frameSize)
- *
- * @return
- * always a valid {@link Scope} object.
- */
- public Scope getScope(int offset) {
- return scopes[scopeTop-offset];
- }
-
-//
-//
-//
-//
-//
-//
-//
-
- private static final Loader DEFAULT_ROOT_LOADER = new DefaultRootLoader();
- private static final Loader EXPECTED_TYPE_ROOT_LOADER = new ExpectedTypeRootLoader();
-
- /**
- * Root loader that uses the tag name and possibly its @xsi:type
- * to decide how to start unmarshalling.
- */
- private static final class DefaultRootLoader extends Loader implements Receiver {
- /**
- * Receives the root element and determines how to start
- * unmarshalling.
- */
- @Override
- public void childElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- Loader loader = state.getContext().selectRootLoader(state,ea);
- if(loader!=null) {
- state.loader = loader;
- state.receiver = this;
- return;
- }
-
- // the registry doesn't know about this element.
- // try its xsi:type
- JaxBeanInfo beanInfo = XsiTypeLoader.parseXsiType(state, ea, null);
- if(beanInfo==null) {
- // we don't even know its xsi:type
- reportUnexpectedChildElement(ea,false);
- return;
- }
-
- state.loader = beanInfo.getLoader(null,false);
- state.prev.backup = new JAXBElement<Object>(ea.createQName(),Object.class,null);
- state.receiver = this;
- }
-
- @Override
- public Collection<QName> getExpectedChildElements() {
- return getInstance().getJAXBContext().getValidRootNames();
- }
-
- @Override
- public void receive(State state, Object o) {
- if(state.backup!=null) {
- ((JAXBElement<Object>)state.backup).setValue(o);
- o = state.backup;
- }
- if (state.nil) {
- ((JAXBElement<Object>)o).setNil(true);
- }
- state.getContext().result = o;
- }
- }
-
- /**
- * Root loader that uses {@link UnmarshallingContext#expectedType}
- * to decide how to start unmarshalling.
- */
- private static final class ExpectedTypeRootLoader extends Loader implements Receiver {
- /**
- * Receives the root element and determines how to start
- * unmarshalling.
- */
- @Override
- public void childElement(UnmarshallingContext.State state, TagName ea) {
- UnmarshallingContext context = state.getContext();
-
- // unmarshals the specified type
- QName qn = new QName(ea.uri,ea.local);
- state.prev.target = new JAXBElement(qn,context.expectedType.jaxbType,null,null);
- state.receiver = this;
- // this is bit wasteful, as in theory we should have each expectedType keep
- // nillable version --- but that increases the combination from two to four,
- // which adds the resident memory footprint. Since XsiNilLoader is small,
- // I intentionally allocate a new instance freshly.
- state.loader = new XsiNilLoader(context.expectedType.getLoader(null,true));
- }
-
- @Override
- public void receive(State state, Object o) {
- JAXBElement e = (JAXBElement)state.target;
- e.setValue(o);
- state.getContext().recordOuterPeer(e);
- state.getContext().result = e;
- }
- }
-
-//
-// in-place unmarshalling related capabilities
-//
- /**
- * Notifies the context about the inner peer of the current element.
- *
- * <p>
- * If the unmarshalling is building the association, the context
- * will use this information. Otherwise it will be just ignored.
- */
- public void recordInnerPeer(Object innerPeer) {
- if(assoc!=null)
- assoc.addInner(currentElement,innerPeer);
- }
-
- /**
- * Gets the inner peer JAXB object associated with the current element.
- *
- * @return
- * null if the current element doesn't have an inner peer,
- * or if we are not doing the in-place unmarshalling.
- */
- public Object getInnerPeer() {
- if(assoc!=null && isInplaceMode)
- return assoc.getInnerPeer(currentElement);
- else
- return null;
- }
-
- /**
- * Notifies the context about the outer peer of the current element.
- *
- * <p>
- * If the unmarshalling is building the association, the context
- * will use this information. Otherwise it will be just ignored.
- */
- public void recordOuterPeer(Object outerPeer) {
- if(assoc!=null)
- assoc.addOuter(currentElement,outerPeer);
- }
-
- /**
- * Gets the outer peer JAXB object associated with the current element.
- *
- * @return
- * null if the current element doesn't have an inner peer,
- * or if we are not doing the in-place unmarshalling.
- */
- public Object getOuterPeer() {
- if(assoc!=null && isInplaceMode)
- return assoc.getOuterPeer(currentElement);
- else
- return null;
- }
-
- /**
- * Gets the xmime:contentType value for the current object.
- *
- * @see JAXBContextImpl#getXMIMEContentType(Object)
- */
- public String getXMIMEContentType() {
- /*
- this won't work when the class is like
-
- class Foo {
- @XmlValue Image img;
- }
-
- because the target will return Foo, not the class enclosing Foo
- which will have xmime:contentType
- */
- Object t = current.target;
- if(t==null) return null;
- return getJAXBContext().getXMIMEContentType(t);
- }
-
- /**
- * When called from within the realm of the unmarshaller, this method
- * returns the current {@link UnmarshallingContext} in charge.
- */
- public static UnmarshallingContext getInstance() {
- return (UnmarshallingContext) Coordinator._getInstance();
- }
-
- /**
- * Allows to access elements which are expected in current state.
- * Useful for getting elements for current parent.
- *
- * @return
- */
- public Collection<QName> getCurrentExpectedElements() {
- pushCoordinator();
- try {
- State s = getCurrentState();
- Loader l = s.loader;
- return (l != null) ? l.getExpectedChildElements() : null;
- } finally {
- popCoordinator();
- }
- }
-
- /**
- * Allows to access attributes which are expected in current state.
- * Useful for getting attributes for current parent.
- *
- * @return
- */
- public Collection<QName> getCurrentExpectedAttributes() {
- pushCoordinator();
- try {
- State s = getCurrentState();
- Loader l = s.loader;
- return (l != null) ? l.getExpectedAttributes() : null;
- } finally {
- popCoordinator();
- }
- }
-
- /**
- * Gets StructureLoader if used as loader.
- * Useful when determining if element is mixed or not.
- *
- */
- public StructureLoader getStructureLoader() {
- if(current.loader instanceof StructureLoader)
- return (StructureLoader)current.loader;
-
- return null;
- }
-
- /**
- * Based on current {@link Logger} {@link Level} and errorCounter value determines if error should be reported.
- *
- * If the method called and return true it is expected that error will be reported. And that's why
- * errorCounter is automatically decremented during the check.
- *
- * NOT THREAD SAFE!!! In case of heave concurrency access several additional errors could be reported. It's not expected to be the
- * problem. Otherwise add synchronization here.
- *
- * @return true in case if {@link Level#FINEST} is set OR we haven't exceed errors reporting limit.
- */
- public boolean shouldErrorBeReported() throws SAXException {
- if (logger.isLoggable(Level.FINEST))
- return true;
-
- if (errorsCounter >= 0) {
- --errorsCounter;
- if (errorsCounter == 0) // it's possible to miss this because of concurrency. If required add synchronization here
- handleEvent(new ValidationEventImpl(ValidationEvent.WARNING, Messages.ERRORS_LIMIT_EXCEEDED.format(),
- getLocator().getLocation(), null), true);
- }
- return errorsCounter >= 0;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ValidatingUnmarshaller.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ValidatingUnmarshaller.java
deleted file mode 100644
index 244dab43..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ValidatingUnmarshaller.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.validation.Schema;
-import javax.xml.validation.ValidatorHandler;
-
-import com.sun.xml.internal.bind.v2.util.FatalAdapter;
-
-import org.xml.sax.SAXException;
-
-/**
- * {@link XmlVisitor} decorator that validates the events by using JAXP validation API.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ValidatingUnmarshaller implements XmlVisitor, XmlVisitor.TextPredictor {
-
- private final XmlVisitor next;
- private final ValidatorHandler validator;
- private NamespaceContext nsContext = null;
-
- /**
- * {@link TextPredictor} of the next {@link XmlVisitor}.
- */
- private final TextPredictor predictor;
-
- private char[] buf = new char[256];
-
- /**
- * Creates a new instance of ValidatingUnmarshaller.
- */
- public ValidatingUnmarshaller( Schema schema, XmlVisitor next ) {
- this.validator = schema.newValidatorHandler();
- this.next = next;
- this.predictor = next.getPredictor();
- // if the user bothers to use a validator, make validation errors fatal
- // so that it will abort unmarshalling.
- validator.setErrorHandler(new FatalAdapter(getContext()));
- }
-
- public void startDocument(LocatorEx locator, NamespaceContext nsContext) throws SAXException {
- this.nsContext = nsContext;
- validator.setDocumentLocator(locator);
- validator.startDocument();
- next.startDocument(locator,nsContext);
- }
-
- public void endDocument() throws SAXException {
- this.nsContext = null;
- validator.endDocument();
- next.endDocument();
- }
-
- public void startElement(TagName tagName) throws SAXException {
- if(nsContext != null) {
- String tagNamePrefix = tagName.getPrefix().intern();
- if(tagNamePrefix != "") {
- validator.startPrefixMapping(tagNamePrefix, nsContext.getNamespaceURI(tagNamePrefix));
- }
- }
- validator.startElement(tagName.uri,tagName.local,tagName.getQname(),tagName.atts);
- next.startElement(tagName);
- }
-
- public void endElement(TagName tagName ) throws SAXException {
- validator.endElement(tagName.uri,tagName.local,tagName.getQname());
- next.endElement(tagName);
- }
-
- public void startPrefixMapping(String prefix, String nsUri) throws SAXException {
- validator.startPrefixMapping(prefix,nsUri);
- next.startPrefixMapping(prefix,nsUri);
- }
-
- public void endPrefixMapping(String prefix) throws SAXException {
- validator.endPrefixMapping(prefix);
- next.endPrefixMapping(prefix);
- }
-
- public void text( CharSequence pcdata ) throws SAXException {
- int len = pcdata.length();
- if(buf.length<len) {
- buf = new char[len];
- }
- for( int i=0;i<len; i++ )
- buf[i] = pcdata.charAt(i); // isn't this kinda slow?
-
- validator.characters(buf,0,len);
- if(predictor.expectText())
- next.text(pcdata);
- }
-
- public UnmarshallingContext getContext() {
- return next.getContext();
- }
-
- public TextPredictor getPredictor() {
- return this;
- }
-
- // should be always invoked through TextPredictor
- @Deprecated
- public boolean expectText() {
- // validator needs to make sure that there's no text
- // even when it's not expected. So always have them
- // send text, ignoring optimization hints from the unmarshaller
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ValuePropertyLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ValuePropertyLoader.java
deleted file mode 100644
index 1bc81f0d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/ValuePropertyLoader.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import javax.xml.bind.JAXBElement;
-
-import com.sun.xml.internal.bind.v2.runtime.reflect.TransducedAccessor;
-import com.sun.xml.internal.bind.api.AccessorException;
-
-import org.xml.sax.SAXException;
-
-/**
- * Reads a text value and set to the current target.
- *
- * @see LeafPropertyLoader
- * @author Kohsuke Kawaguchi
- */
-public class ValuePropertyLoader extends Loader {
-
- private final TransducedAccessor xacc;
-
- public ValuePropertyLoader(TransducedAccessor xacc) {
- super(true);
- this.xacc = xacc;
- }
-
- public void text(UnmarshallingContext.State state, CharSequence text) throws SAXException {
- try {
- xacc.parse(state.getTarget(),text);
- } catch (AccessorException e) {
- handleGenericException(e,true);
- } catch (RuntimeException e) {
- if(state.getPrev() != null) {
- if (!(state.getPrev().getTarget() instanceof JAXBElement))
- handleParseConversionException(state,e);
- // else
- // do nothing - issue 601 - don't report exceptions like
- // NumberFormatException when unmarshalling "nillable" element
- // (I suppose JAXBElement indicates this
- } else {
- handleParseConversionException(state,e);
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/WildcardLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/WildcardLoader.java
deleted file mode 100644
index e10435c2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/WildcardLoader.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import javax.xml.bind.annotation.DomHandler;
-
-import com.sun.xml.internal.bind.v2.model.core.WildcardMode;
-
-import org.xml.sax.SAXException;
-
-/**
- * Feed incoming events to {@link DomHandler} and builds a DOM tree.
- *
- * <p>
- * Note that the SAXException returned by the ContentHandler is
- * unreported. So we have to catch them and report it, then rethrow
- * it if necessary.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class WildcardLoader extends ProxyLoader {
-
- private final DomLoader dom;
-
- private final WildcardMode mode;
-
- public WildcardLoader(DomHandler dom, WildcardMode mode) {
- this.dom = new DomLoader(dom);
- this.mode = mode;
- }
-
- protected Loader selectLoader(UnmarshallingContext.State state, TagName tag) throws SAXException {
- UnmarshallingContext context = state.getContext();
-
- if(mode.allowTypedObject) {
- Loader l = context.selectRootLoader(state,tag);
- if(l!=null)
- return l;
- }
- if(mode.allowDom)
- return dom;
-
- // simply discard.
- return Discarder.INSTANCE;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XmlVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XmlVisitor.java
deleted file mode 100644
index c86bcff7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XmlVisitor.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.runtime.unmarshaller;
-
-import javax.xml.namespace.NamespaceContext;
-
-import org.xml.sax.SAXException;
-
-/**
- * Walks the XML document structure.
- *
- * Implemented by the unmarshaller and called by the API-specific connectors.
- *
- * <h2>Event Call Sequence</h2>
- *
- * The {@link XmlVisitor} expects the event callbacks in the following order:
- * <pre>
- * CALL SEQUENCE := startDocument ELEMENT endDocument
- * ELEMENT := startPrefixMapping ELEMENT endPrefixMapping
- * | startElement BODY endElement
- * BODY := text? (ELEMENT text?)*
- * </pre>
- * Note in particular that text events may not be called in a row;
- * consecutive characters (even those separated by PIs and comments)
- * must be reported as one event, unlike SAX.
- *
- * <p>
- * All namespace URIs, local names, and prefixes of element and attribute
- * names must be interned. qnames need not be interned.
- *
- *
- * <h2>Typed PCDATA</h2>
- * For efficiency, JAXB RI defines a few {@link CharSequence} implementations
- * that can be used as a parameter to the {@link #text(CharSequence)} method.
- * For example, see {@link Base64Data}.
- *
- * <h2>Error Handling</h2>
- * The visitor may throw {@link SAXException} to abort the unmarshalling process
- * in the middle.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface XmlVisitor {
- /**
- * Notifies a start of the document.
- *
- * @param locator
- * This live object returns the location information as the parsing progresses.
- * must not be null.
- * @param nsContext
- * Some broken XML APIs can't iterate all the in-scope namespace bindings,
- * which makes it impossible to emulate {@link #startPrefixMapping(String, String)} correctly
- * when unmarshalling a subtree. Connectors that use such an API can
- * pass in additional {@link NamespaceContext} object that knows about the
- * in-scope namespace bindings. Otherwise (and normally) it is null.
- *
- * <p>
- * Ideally this object should be immutable and only represent the namespace URI bindings
- * in the context (those done above the element that JAXB started unmarshalling),
- * but it can also work even if it changes as the parsing progress (to include
- * namespaces declared on the current element being parsed.)
- */
- void startDocument(LocatorEx locator, NamespaceContext nsContext) throws SAXException;
- void endDocument() throws SAXException;
-
- /**
- * Notifies a start tag of a new element.
- *
- * namespace URIs and local names must be interned.
- */
- void startElement(TagName tagName) throws SAXException;
- void endElement(TagName tagName) throws SAXException;
-
- /**
- * Called before {@link #startElement} event to notify a new namespace binding.
- */
- void startPrefixMapping( String prefix, String nsUri ) throws SAXException;
- /**
- * Called after {@link #endElement} event to notify the end of a binding.
- */
- void endPrefixMapping( String prefix ) throws SAXException;
-
- /**
- * Text events.
- *
- * <p>
- * The caller should consult {@link TextPredictor} to see
- * if the unmarshaller is expecting any PCDATA. If the above is returning
- * false, the caller is OK to skip any text in XML. The net effect is
- * that we can ignore whitespaces quickly.
- *
- * @param pcdata
- * represents character data. This object can be mutable
- * (such as {@link StringBuilder}); it only needs to be fixed
- * while this method is executing.
- */
- void text( CharSequence pcdata ) throws SAXException;
-
- /**
- * Returns the {@link UnmarshallingContext} at the end of the chain.
- *
- * @return
- * always return the same object, so caching the result is recommended.
- */
- UnmarshallingContext getContext();
-
- /**
- * Gets the predictor that can be used for the caller to avoid
- * calling {@link #text(CharSequence)} unnecessarily.
- */
- TextPredictor getPredictor();
-
- interface TextPredictor {
- /**
- * Returns true if the visitor is expecting a text event as the next event.
- *
- * <p>
- * This is primarily intended to be used for optimization to avoid buffering
- * characters unnecessarily. If this method returns false and the connector
- * sees whitespace it can safely skip it.
- *
- * <p>
- * If this method returns true, all the whitespaces are considered significant
- * and thus need to be reported as a {@link XmlVisitor#text} event. Furthermore,
- * if the element has no children (like &lt;foo/>), then it has to be reported
- * an empty {@link XmlVisitor#text} event.
- */
- boolean expectText();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiNilLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiNilLoader.java
deleted file mode 100644
index c01acf34..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiNilLoader.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import java.util.Collection;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
-
-import org.xml.sax.SAXException;
-
-/**
- * Looks for xsi:nil='true' and sets the target to null.
- * Otherwise delegate to another handler.
- *
- * @author Kohsuke Kawaguchi
- */
-public class XsiNilLoader extends ProxyLoader {
-
- private final Loader defaultLoader;
-
- public XsiNilLoader(Loader defaultLoader) {
- this.defaultLoader = defaultLoader;
- assert defaultLoader!=null;
- }
-
- protected Loader selectLoader(UnmarshallingContext.State state, TagName ea) throws SAXException {
- int idx = ea.atts.getIndex(WellKnownNamespace.XML_SCHEMA_INSTANCE,"nil");
-
- if (idx!=-1) {
- Boolean b = DatatypeConverterImpl._parseBoolean(ea.atts.getValue(idx));
-
- if (b != null && b) {
- onNil(state);
- boolean hasOtherAttributes = (ea.atts.getLength() - 1) > 0;
- // see issues 6759703 and 565 - need to preserve attributes even if the element is nil; only when the type is stored in JAXBElement
- if (!(hasOtherAttributes && (state.getPrev().getTarget() instanceof JAXBElement))) {
- return Discarder.INSTANCE;
- }
- }
- }
- return defaultLoader;
- }
-
- @Override
- public Collection<QName> getExpectedChildElements() {
- return defaultLoader.getExpectedChildElements();
- }
-
- @Override
- public Collection<QName> getExpectedAttributes() {
- return defaultLoader.getExpectedAttributes();
- }
-
- /**
- * Called when xsi:nil='true' was found.
- */
- protected void onNil(UnmarshallingContext.State state) throws SAXException {
- }
-
- public static final class Single extends XsiNilLoader {
- private final Accessor acc;
- public Single(Loader l, Accessor acc) {
- super(l);
- this.acc = acc;
- }
-
- @Override
- protected void onNil(UnmarshallingContext.State state) throws SAXException {
- try {
- acc.set(state.getPrev().getTarget(),null);
- state.getPrev().setNil(true);
- } catch (AccessorException e) {
- handleGenericException(e,true);
- }
- }
-
- }
-
- public static final class Array extends XsiNilLoader {
- public Array(Loader core) {
- super(core);
- }
-
- @Override
- protected void onNil(UnmarshallingContext.State state) {
- // let the receiver add this to the lister
- state.setTarget(null);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiTypeLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiTypeLoader.java
deleted file mode 100644
index 654f1940..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/XsiTypeLoader.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.runtime.unmarshaller;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
-import com.sun.istack.internal.Nullable;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- * Looks at @xsi:type and forwards to the right {@link Loader}.
- *
- * @author Kohsuke Kawaguchi
- */
-public class XsiTypeLoader extends Loader {
-
- /**
- * Use this when no @xsi:type was found.
- */
- private final JaxBeanInfo defaultBeanInfo;
-
- public XsiTypeLoader(JaxBeanInfo defaultBeanInfo) {
- super(true);
- this.defaultBeanInfo = defaultBeanInfo;
- }
-
- public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
- JaxBeanInfo beanInfo = parseXsiType(state,ea,defaultBeanInfo);
- if(beanInfo==null)
- beanInfo = defaultBeanInfo;
-
- Loader loader = beanInfo.getLoader(null,false);
- state.setLoader(loader);
- loader.startElement(state,ea);
- }
-
- /*pacakge*/ static JaxBeanInfo parseXsiType(UnmarshallingContext.State state, TagName ea, @Nullable JaxBeanInfo defaultBeanInfo) throws SAXException {
- UnmarshallingContext context = state.getContext();
- JaxBeanInfo beanInfo = null;
-
- // look for @xsi:type
- Attributes atts = ea.atts;
- int idx = atts.getIndex(WellKnownNamespace.XML_SCHEMA_INSTANCE,"type");
-
- if(idx>=0) {
- // we'll consume the value only when it's a recognized value,
- // so don't consume it just yet.
- String value = atts.getValue(idx);
-
- QName type = DatatypeConverterImpl._parseQName(value,context);
- if(type==null) {
- reportError(Messages.NOT_A_QNAME.format(value),true);
- } else {
- if(defaultBeanInfo!=null && defaultBeanInfo.getTypeNames().contains(type))
- // if this xsi:type is something that the default type can already handle,
- // let it do so. This is added as a work around to bug https://jax-ws.dev.java.net/issues/show_bug.cgi?id=195
- // where a redundant xsi:type="xs:dateTime" causes JAXB to unmarshal XMLGregorianCalendar,
- // where Date is expected.
- // this is not a complete fix, as we still won't be able to handle simple type substitution in general,
- // but none-the-less
- return defaultBeanInfo;
-
- beanInfo = context.getJAXBContext().getGlobalType(type);
- if(beanInfo==null) { // let's report an error
- if (context.parent.hasEventHandler() // is somebody listening?
- && context.shouldErrorBeReported()) { // should we report error?
- String nearest = context.getJAXBContext().getNearestTypeName(type);
- if(nearest!=null)
- reportError(Messages.UNRECOGNIZED_TYPE_NAME_MAYBE.format(type,nearest),true);
- else
- reportError(Messages.UNRECOGNIZED_TYPE_NAME.format(type),true);
- }
- }
- // TODO: resurrect the following check
- // else
- // if(!target.isAssignableFrom(actual)) {
- // reportError(context,
- // Messages.UNSUBSTITUTABLE_TYPE.format(value,actual.getName(),target.getName()),
- // true);
- // actual = targetBeanInfo; // ditto
- // }
- }
- }
- return beanInfo;
- }
-
- static final QName XsiTypeQNAME = new QName(WellKnownNamespace.XML_SCHEMA_INSTANCE,"type");
-
- @Override
- public Collection<QName> getExpectedAttributes() {
- final Collection<QName> expAttrs = new HashSet<QName>();
- expAttrs.addAll(super.getExpectedAttributes());
- expAttrs.add(XsiTypeQNAME);
- return Collections.unmodifiableCollection(expAttrs);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/FoolProofResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/FoolProofResolver.java
deleted file mode 100644
index 0cbbe9e0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/FoolProofResolver.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen;
-
-import java.io.IOException;
-import java.util.logging.Logger;
-
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.transform.Result;
-
-import com.sun.xml.internal.bind.Util;
-
-/**
- * {@link SchemaOutputResolver} that wraps the user-specified resolver
- * and makes sure that it's following the contract.
- *
- * <p>
- * This protects the rest of the {@link XmlSchemaGenerator} from client programming
- * error.
- */
-final class FoolProofResolver extends SchemaOutputResolver {
- private static final Logger logger = Util.getClassLogger();
- private final SchemaOutputResolver resolver;
-
- public FoolProofResolver(SchemaOutputResolver resolver) {
- assert resolver!=null;
- this.resolver = resolver;
- }
-
- public Result createOutput(String namespaceUri, String suggestedFileName) throws IOException {
- logger.entering(getClass().getName(),"createOutput",new Object[]{namespaceUri,suggestedFileName});
- Result r = resolver.createOutput(namespaceUri,suggestedFileName);
- if(r!=null) {
- String sysId = r.getSystemId();
- logger.finer("system ID = "+sysId);
- if(sysId!=null) {
- // TODO: make sure that the system Id is absolute
-
- // don't use java.net.URI, because it doesn't allow some characters (like SP)
- // which can legally used as file names.
-
- // but don't use java.net.URL either, because it doesn't allow a made-up URI
- // like kohsuke://foo/bar/zot
- } else
- throw new AssertionError("system ID cannot be null");
- }
- logger.exiting(getClass().getName(),"createOutput",r);
- return r;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Form.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Form.java
deleted file mode 100644
index 232a21b6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Form.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen;
-
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.LocalAttribute;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.LocalElement;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.Schema;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-
-/**
- * Represents the form default value.
- *
- * @author Kohsuke Kawaguchi
- */
-enum Form {
- QUALIFIED(XmlNsForm.QUALIFIED,true) {
- void declare(String attName,Schema schema) {
- schema._attribute(attName,"qualified");
- }
- },
- UNQUALIFIED(XmlNsForm.UNQUALIFIED,false) {
- void declare(String attName,Schema schema) {
- // pointless, but required by the spec.
- // people need to understand that @attributeFormDefault is a syntax sugar
- schema._attribute(attName,"unqualified");
- }
- },
- UNSET(XmlNsForm.UNSET,false) {
- void declare(String attName,Schema schema) {
- }
- };
-
- /**
- * The same constant defined in the spec.
- */
- private final XmlNsForm xnf;
-
- /**
- * What's the effective value? UNSET means unqualified per XSD spec.)
- */
- public final boolean isEffectivelyQualified;
-
- Form(XmlNsForm xnf, boolean effectivelyQualified) {
- this.xnf = xnf;
- this.isEffectivelyQualified = effectivelyQualified;
- }
-
- /**
- * Writes the attribute on the generated &lt;schema> element.
- */
- abstract void declare(String attName, Schema schema);
-
- /**
- * Given the effective 'form' value, write (or suppress) the @form attribute
- * on the generated XML.
- */
- public void writeForm(LocalElement e, QName tagName) {
- _writeForm(e,tagName);
- }
-
- public void writeForm(LocalAttribute a, QName tagName) {
- _writeForm(a,tagName);
- }
-
- private void _writeForm(TypedXmlWriter e, QName tagName) {
- boolean qualified = tagName.getNamespaceURI().length()>0;
-
- if(qualified && this!=QUALIFIED)
- e._attribute("form","qualified");
- else
- if(!qualified && this==QUALIFIED)
- e._attribute("form","unqualified");
- }
-
- /**
- * Gets the constant the corresponds to the given {@link XmlNsForm}.
- */
- public static Form get(XmlNsForm xnf) {
- for (Form v : values()) {
- if(v.xnf==xnf)
- return v;
- }
- throw new IllegalArgumentException();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/GroupKind.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/GroupKind.java
deleted file mode 100644
index e80140fd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/GroupKind.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen;
-
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.Particle;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.ContentModelContainer;
-
-/**
- * Enum for model group type.
- *
- * @author Kohsuke Kawaguchi
- */
-enum GroupKind {
- ALL("all"), SEQUENCE("sequence"), CHOICE("choice");
-
- private final String name;
-
- GroupKind(String name) {
- this.name = name;
- }
-
- /**
- * Writes the model group.
- */
- Particle write(ContentModelContainer parent) {
- return parent._element(name,Particle.class);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages.java
deleted file mode 100644
index 625e10ff..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen;
-
-import java.util.ResourceBundle;
-import java.text.MessageFormat;
-
-/**
- * Message resources
- */
-enum Messages {
- ANONYMOUS_TYPE_CYCLE // 1 arg
- ;
-
- private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
-
- @Override
- public String toString() {
- return format();
- }
-
- public String format( Object... args ) {
- return MessageFormat.format( rb.getString(name()), args );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages.properties
deleted file mode 100644
index d568910f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ANONYMOUS_TYPE_CYCLE= Error occured during schema generation, however the schema could be generated. \
-There is a circular dependency on an element in your schema: {0} \
-This element \
-is not defined as global element and thus references were not generated and \
-the type has been inlined where possible. To allow references for the type, add \
-XmlRootElement annotation to your type definition class.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_de.properties
deleted file mode 100644
index 1ce6d2d3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_de.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ANONYMOUS_TYPE_CYCLE= Bei der Schemagenerierung ist ein Fehler aufgetreten, das Schema konnte jedoch generiert werden. Es ist eine zyklische Abh\u00E4ngigkeit von einem Element in Ihrem Schema vorhanden: {0} Dieses Element ist nicht als globales Element definiert, somit wurden keine Referenzen generiert und der Typ wurde wenn m\u00F6glich eingebettet. Um Referenzen f\u00FCr den Typ zuzulassen, f\u00FCgen Sie eine XmlRootElement-Annotation der Typdefinitionsklasse hinzu.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_es.properties
deleted file mode 100644
index 1b5372e6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_es.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ANONYMOUS_TYPE_CYCLE= Se ha producido un error durante la generaci\u00F3n del esquema, aunque el esquema se ha podido generar. Existe una dependencia circular en un elemento del esquema: {0} Este elemento no est\u00E1 definido como un elemento global y, por lo tanto, no se han generado referencias y el tipo se ha puesto en l\u00EDnea cuando ha sido posible. Para permitir referencias para el tipo, agregue la anotaci\u00F3n XmlRootElement a la clase de definici\u00F3n de tipos.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_fr.properties
deleted file mode 100644
index c4ed6e59..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_fr.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ANONYMOUS_TYPE_CYCLE= Une erreur s''est produite lors de la g\u00E9n\u00E9ration du sch\u00E9ma, mais ce dernier a pu \u00EAtre g\u00E9n\u00E9r\u00E9. Il existe une d\u00E9pendance circulaire sur un \u00E9l\u00E9ment du sch\u00E9ma : {0}. Cet \u00E9l\u00E9ment n''est pas d\u00E9fini en tant qu''\u00E9l\u00E9ment global, les r\u00E9f\u00E9rences n''ont donc pas \u00E9t\u00E9 g\u00E9n\u00E9r\u00E9es et le type a \u00E9t\u00E9 incorpor\u00E9 l\u00E0 o\u00F9 cela \u00E9tait possible. Pour autoriser les r\u00E9f\u00E9rences pour le type, ajoutez l''annotation XmlRootElement \u00E0 la classe de d\u00E9finition du type.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_it.properties
deleted file mode 100644
index 417f24ef..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_it.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ANONYMOUS_TYPE_CYCLE= Si \u00E8 verificato un errore durante la generazione dello schema, tuttavia \u00E8 stato possibile generare quest''ultimo. Esiste una dipendenza circolare su un elemento nello schema: {0} Questo elemento non \u00E8 definito come elemento globale e pertanto non sono stati generati riferimenti e il tipo \u00E8 inserito in linea dove possibile. Per consentire i riferimenti per il tipo, aggiungere l''annotazione XmlRootElement alla classe di definizione del tipo in uso.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_ja.properties
deleted file mode 100644
index 689b3c9e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_ja.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ANONYMOUS_TYPE_CYCLE= \u30B9\u30AD\u30FC\u30DE\u751F\u6210\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u304C\u3001\u30B9\u30AD\u30FC\u30DE\u3092\u751F\u6210\u3067\u304D\u307E\u3057\u305F\u3002\u30B9\u30AD\u30FC\u30DE\u5185\u306E\u8981\u7D20\u306B\u5FAA\u74B0\u4F9D\u5B58\u95A2\u4FC2\u304C\u3042\u308A\u307E\u3059: {0}\u3002\u3053\u306E\u8981\u7D20\u306F\u30B0\u30ED\u30FC\u30D0\u30EB\u8981\u7D20\u3068\u3057\u3066\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u53C2\u7167\u306F\u751F\u6210\u3055\u308C\u305A\u3001\u30BF\u30A4\u30D7\u306F\u4F7F\u7528\u53EF\u80FD\u306A\u5834\u6240\u3067\u30A4\u30F3\u30E9\u30A4\u30F3\u5316\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30BF\u30A4\u30D7\u306E\u53C2\u7167\u3092\u8A31\u53EF\u3059\u308B\u306B\u306F\u3001\u30BF\u30A4\u30D7\u5B9A\u7FA9\u30AF\u30E9\u30B9\u306BXmlRootElement\u6CE8\u91C8\u3092\u8FFD\u52A0\u3057\u307E\u3059\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_ko.properties
deleted file mode 100644
index b1682c96..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_ko.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ANONYMOUS_TYPE_CYCLE= \uC2A4\uD0A4\uB9C8 \uC0DD\uC131 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC9C0\uB9CC \uC2A4\uD0A4\uB9C8\uB97C \uC0DD\uC131\uD560 \uC218 \uC788\uC5C8\uC2B5\uB2C8\uB2E4. \uC2A4\uD0A4\uB9C8\uC758 \uC694\uC18C\uC5D0 \uC21C\uD658 \uC885\uC18D\uC131\uC774 \uC788\uC74C: {0}. \uC774 \uC694\uC18C\uB294 \uC804\uC5ED \uC694\uC18C\uB85C \uC815\uC758\uB418\uC9C0 \uC54A\uC544 \uCC38\uC870\uAC00 \uC0DD\uC131\uB418\uC9C0 \uC54A\uC558\uC73C\uBA70 \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uC720\uD615\uC774 \uC778\uB77C\uC778\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC720\uD615\uC5D0 \uB300\uD55C \uCC38\uC870\uB97C \uD5C8\uC6A9\uD558\uB824\uBA74 \uC720\uD615 \uC815\uC758 \uD074\uB798\uC2A4\uC5D0 XmlRootElement \uC8FC\uC11D\uC744 \uCD94\uAC00\uD558\uC2ED\uC2DC\uC624.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_pt_BR.properties
deleted file mode 100644
index ddbecae9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_pt_BR.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ANONYMOUS_TYPE_CYCLE= Ocorreu um erro durante a gera\u00E7\u00E3o do esquema, no entanto, foi poss\u00EDvel ger\u00E1-lo. H\u00E1 uma depend\u00EAncia circular ou um elemento em seu esquema: {0} Este elemento n\u00E3o foi definido como elemento global e, por isso, as refer\u00EAncias n\u00E3o foram geradas e o tipo foi alinhado, quando poss\u00EDvel. Para permitir refer\u00EAncias ao tipo, adicione a anota\u00E7\u00E3o XmlRootElement \u00E0 classe de defini\u00E7\u00E3o do tipo.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_zh_CN.properties
deleted file mode 100644
index 24dcbfd4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_zh_CN.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ANONYMOUS_TYPE_CYCLE= \u6A21\u5F0F\u751F\u6210\u671F\u95F4\u51FA\u9519, \u4F46\u53EF\u4EE5\u751F\u6210\u6A21\u5F0F\u3002\u6A21\u5F0F\u4E2D\u7684\u67D0\u4E00\u5143\u7D20\u5B58\u5728\u5FAA\u73AF\u76F8\u5173\u6027: {0}\u3002\u6B64\u5143\u7D20\u672A\u5B9A\u4E49\u4E3A\u5168\u5C40\u5143\u7D20, \u56E0\u6B64\u672A\u751F\u6210\u5F15\u7528\u5E76\u5DF2\u5C3D\u53EF\u80FD\u5730\u5C06\u7C7B\u578B\u5185\u5D4C\u3002\u8981\u5141\u8BB8\u7C7B\u578B\u7684\u5F15\u7528, \u8BF7\u5411\u7C7B\u578B\u5B9A\u4E49\u7C7B\u6DFB\u52A0 XmlRootElement \u6CE8\u91CA\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_zh_TW.properties
deleted file mode 100644
index acb37b39..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_zh_TW.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-ANONYMOUS_TYPE_CYCLE= \u7DB1\u8981\u7522\u751F\u671F\u9593\u767C\u751F\u932F\u8AA4, \u4F46\u53EF\u4EE5\u7522\u751F\u7DB1\u8981. \u60A8\u7DB1\u8981\u4E2D\u7684\u67D0\u500B\u5143\u7D20\u6709\u5FAA\u74B0\u76F8\u4F9D\u6027: {0}. \u6B64\u5143\u7D20\u672A\u5B9A\u7FA9\u70BA\u5168\u57DF\u5143\u7D20, \u56E0\u6B64\u672A\u7522\u751F\u53C3\u7167, \u4E26\u4E14\u5DF2\u76E1\u53EF\u80FD\u5167\u7F6E\u8A72\u985E\u578B. \u82E5\u8981\u5141\u8A31\u8A72\u985E\u578B\u7684\u53C3\u7167, \u8ACB\u65B0\u589E XmlRootElement \u8A3B\u89E3\u81F3\u60A8\u7684\u985E\u578B\u5B9A\u7FA9\u985E\u5225.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/MultiMap.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/MultiMap.java
deleted file mode 100644
index d12c17a6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/MultiMap.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen;
-
-import java.util.TreeMap;
-import java.util.Map;
-
-/**
- * A special {@link Map} that 'conceptually' stores a set of values for each key.
- *
- * <p>
- * When multiple values are stored, however, this class doesn't let the caller
- * see individual values, and instead it returns a specially designated "MANY" value,
- * which is given as a parameter to the constructor.
- *
- * @author Kohsuke Kawaguchi
- */
-final class MultiMap<K extends Comparable<K>,V> extends TreeMap<K,V> {
- private final V many;
-
- public MultiMap(V many) {
- this.many = many;
- }
-
- @Override
- public V put(K key, V value) {
- V old = super.put(key, value);
- if(old!=null && !old.equals(value)) {
- // different value stored
- super.put(key,many);
- }
- return old;
- }
-
- @Override
- public void putAll(Map<? extends K, ? extends V> map) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Tree.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Tree.java
deleted file mode 100644
index fc643951..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Tree.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.ContentModelContainer;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.Particle;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.TypeDefParticle;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.Occurs;
-
-/**
- * Normalized representation of the content model.
- *
- * <p>
- * This is built from bottom up so that we can eliminate redundant constructs,
- * and produce the most concise content model definition in XML.
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class Tree {
-
- /**
- * Returns "T?" from "T".
- *
- * @param really
- * if false this method becomes no-op. This is so that we can write
- * the caller fluently.
- */
- Tree makeOptional(boolean really) {
- return really?new Optional(this) :this;
- }
-
- /**
- * Returns "T+" from "T".
- *
- * @param really
- * if false this method becomes no-op. This is so that we can write
- * the caller fluently.
- */
- Tree makeRepeated(boolean really) {
- return really?new Repeated(this) :this;
- }
-
- /**
- * Returns a group tree.
- */
- static Tree makeGroup(GroupKind kind, List<Tree> children ) {
- // pointless binary operator.
- if(children.size()==1)
- return children.get(0);
-
- // we neither have epsilon or emptySet, so can't handle children.length==0 nicely
-
- // eliminated nesting groups of the same kind.
- // this is where binary tree would have shined.
- List<Tree> normalizedChildren = new ArrayList<Tree>(children.size());
- for (Tree t : children) {
- if (t instanceof Group) {
- Group g = (Group) t;
- if(g.kind==kind) {
- normalizedChildren.addAll(Arrays.asList(g.children));
- continue;
- }
- }
- normalizedChildren.add(t);
- }
-
- return new Group(kind,normalizedChildren.toArray(new Tree[normalizedChildren.size()]));
- }
-
- /**
- * Returns true if this tree accepts empty sequence.
- */
- abstract boolean isNullable();
-
- /**
- * Returns true if the top node of this tree can
- * appear as a valid top-level content model in XML Schema.
- *
- * <p>
- * Model groups and occurrences that have model group in it can.
- */
- boolean canBeTopLevel() { return false; }
-
- /**
- * Writes out the content model.
- *
- * Normall this runs recursively until we write out the whole content model.
- */
- protected abstract void write(ContentModelContainer parent, boolean isOptional, boolean repeated);
-
- /**
- * Writes inside the given complex type.
- */
- protected void write(TypeDefParticle ct) {
- if(canBeTopLevel())
- write(ct._cast(ContentModelContainer.class), false, false);
- else
- // need a dummy wrapper
- new Group(GroupKind.SEQUENCE,this).write(ct);
- }
-
- /**
- * Convenience method to write occurrence constraints.
- */
- protected final void writeOccurs(Occurs o, boolean isOptional, boolean repeated) {
- if(isOptional)
- o.minOccurs(0);
- if(repeated)
- o.maxOccurs("unbounded");
- }
-
- /**
- * Represents a terminal tree node, such as element, wildcard, etc.
- */
- abstract static class Term extends Tree {
- boolean isNullable() {
- return false;
- }
- }
-
- /**
- * "T?"
- */
- private static final class Optional extends Tree {
- private final Tree body;
-
- private Optional(Tree body) {
- this.body = body;
- }
-
- @Override
- boolean isNullable() {
- return true;
- }
-
- @Override
- Tree makeOptional(boolean really) {
- return this;
- }
-
- @Override
- protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated) {
- body.write(parent,true,repeated);
- }
- }
-
- /**
- * "T+"
- */
- private static final class Repeated extends Tree {
- private final Tree body;
-
- private Repeated(Tree body) {
- this.body = body;
- }
-
- @Override
- boolean isNullable() {
- return body.isNullable();
- }
-
- @Override
- Tree makeRepeated(boolean really) {
- return this;
- }
-
- @Override
- protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated) {
- body.write(parent,isOptional,true);
- }
- }
-
- /**
- * "S|T", "S,T", and "S&amp;T".
- */
- private static final class Group extends Tree {
- private final GroupKind kind;
- private final Tree[] children;
-
- private Group(GroupKind kind, Tree... children) {
- this.kind = kind;
- this.children = children;
- }
-
- @Override
- boolean canBeTopLevel() {
- return true;
- }
-
- @Override
- boolean isNullable() {
- if(kind== GroupKind.CHOICE) {
- for (Tree t : children) {
- if(t.isNullable())
- return true;
- }
- return false;
- } else {
- for (Tree t : children) {
- if(!t.isNullable())
- return false;
- }
- return true;
- }
- }
-
- @Override
- protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated) {
- Particle c = kind.write(parent);
- writeOccurs(c,isOptional,repeated);
-
- for (Tree child : children) {
- child.write(c,false,false);
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Util.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Util.java
deleted file mode 100644
index 91e49c8c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Util.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen;
-
-
-/**
- * TODO: JAX-WS dependes on this class - consider moving it somewhere more stable, Notify JAX-WS before modifying anything...
- *
- * Other miscellaneous utility methods.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class Util {
- private Util() {} // no instanciation please
-
- /**
- * Escape any characters that would cause the single arg constructor
- * of java.net.URI to complain about illegal chars.
- *
- * @param s source string to be escaped
- */
- public static String escapeURI(String s) {
- StringBuilder sb = new StringBuilder();
- for( int i = 0; i < s.length(); i++ ) {
- char c = s.charAt(i);
- if(Character.isSpaceChar(c)) {
- sb.append("%20");
- } else {
- sb.append(c);
- }
- }
- return sb.toString();
- }
-
- /**
- * Calculate the parent URI path of the given URI path.
- *
- * @param uriPath the uriPath (as returned by java.net.URI#getPath()
- * @return the parent URI path of the given URI path
- */
- public static String getParentUriPath(String uriPath) {
- int idx = uriPath.lastIndexOf('/');
-
- if (uriPath.endsWith("/")) {
- uriPath = uriPath.substring(0,idx); // trim trailing slash
- idx = uriPath.lastIndexOf('/'); // move idx to parent context
- }
-
- return uriPath.substring(0, idx)+"/";
- }
-
- /**
- * Calculate the normalized form of the given uriPath.
- *
- * For example:
- * /a/b/c/ -> /a/b/c/
- * /a/b/c -> /a/b/
- * /a/ -> /a/
- * /a -> /
- *
- * @param uriPath path of a URI (as returned by java.net.URI#getPath()
- * @return the normalized uri path
- */
- public static String normalizeUriPath(String uriPath) {
- if (uriPath.endsWith("/"))
- return uriPath;
-
- // the uri path should always have at least a leading slash,
- // so no need to make sure that ( idx == -1 )
- int idx = uriPath.lastIndexOf('/');
- return uriPath.substring(0, idx+1);
- }
-
- /**
- * determine if two Strings are equal ignoring case allowing null values
- *
- * @param s string 1
- * @param t string 2
- * @return true iff the given strings are equal ignoring case, false if they aren't
- * equal or either of them are null.
- */
- public static boolean equalsIgnoreCase(String s, String t) {
- if (s == t) return true;
- if ((s != null) && (t != null)) {
- return s.equalsIgnoreCase(t);
- }
- return false;
- }
-
- /**
- * determine if two Strings are iqual allowing null values
- *
- * @param s string 1
- * @param t string 2
- * @return true iff the strings are equal, false if they aren't equal or either of
- * them are null.
- */
- public static boolean equal(String s, String t) {
- if (s == t) return true;
- if ((s != null) && (t != null)) {
- return s.equals(t);
- }
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/XmlSchemaGenerator.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/XmlSchemaGenerator.java
deleted file mode 100644
index a9cb5bed..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/XmlSchemaGenerator.java
+++ /dev/null
@@ -1,1615 +0,0 @@
-/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Writer;
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.LinkedHashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.ArrayList;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.activation.MimeType;
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-import javax.xml.transform.stream.StreamResult;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.Util;
-import com.sun.xml.internal.bind.api.CompositeStructure;
-import com.sun.xml.internal.bind.api.ErrorListener;
-import com.sun.xml.internal.bind.v2.TODO;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
-import com.sun.xml.internal.bind.v2.util.CollisionCheckStack;
-import com.sun.xml.internal.bind.v2.util.StackRecorder;
-import static com.sun.xml.internal.bind.v2.WellKnownNamespace.XML_SCHEMA;
-import com.sun.xml.internal.bind.v2.model.core.Adapter;
-import com.sun.xml.internal.bind.v2.model.core.ArrayInfo;
-import com.sun.xml.internal.bind.v2.model.core.AttributePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.ClassInfo;
-import com.sun.xml.internal.bind.v2.model.core.Element;
-import com.sun.xml.internal.bind.v2.model.core.ElementInfo;
-import com.sun.xml.internal.bind.v2.model.core.ElementPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.EnumConstant;
-import com.sun.xml.internal.bind.v2.model.core.EnumLeafInfo;
-import com.sun.xml.internal.bind.v2.model.core.MapPropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.MaybeElement;
-import com.sun.xml.internal.bind.v2.model.core.NonElement;
-import com.sun.xml.internal.bind.v2.model.core.NonElementRef;
-import com.sun.xml.internal.bind.v2.model.core.PropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.ReferencePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfo;
-import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
-import com.sun.xml.internal.bind.v2.model.core.TypeRef;
-import com.sun.xml.internal.bind.v2.model.core.ValuePropertyInfo;
-import com.sun.xml.internal.bind.v2.model.core.WildcardMode;
-import com.sun.xml.internal.bind.v2.model.impl.ClassInfoImpl;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.runtime.SwaRefAdapter;
-import static com.sun.xml.internal.bind.v2.schemagen.Util.*;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.Any;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.AttrDecls;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.ComplexExtension;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.ComplexType;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.ComplexTypeHost;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.ExplicitGroup;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.Import;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.List;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.LocalAttribute;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.LocalElement;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.Schema;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.SimpleExtension;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.SimpleRestrictionModel;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.SimpleType;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.SimpleTypeHost;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.TopLevelAttribute;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.TopLevelElement;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.TypeHost;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.ContentModelContainer;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.TypeDefParticle;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.AttributeType;
-import com.sun.xml.internal.bind.v2.schemagen.episode.Bindings;
-import com.sun.xml.internal.txw2.TXW;
-import com.sun.xml.internal.txw2.TxwException;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.output.ResultFactory;
-import com.sun.xml.internal.txw2.output.XmlSerializer;
-import java.util.Collection;
-import java.util.HashSet;
-import org.xml.sax.SAXParseException;
-
-/**
- * Generates a set of W3C XML Schema documents from a set of Java classes.
- *
- * <p>
- * A client must invoke methods in the following order:
- * <ol>
- * <li>Create a new {@link XmlSchemaGenerator}
- * <li>Invoke {@link #add} methods, multiple times if necessary.
- * <li>Invoke {@link #write}
- * <li>Discard the {@link XmlSchemaGenerator}.
- * </ol>
- *
- * @author Ryan Shoemaker
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public final class XmlSchemaGenerator<T,C,F,M> {
-
- private static final Logger logger = Util.getClassLogger();
-
- /**
- * Java classes to be written, organized by their namespace.
- *
- * <p>
- * We use a {@link TreeMap} here so that the suggested names will
- * be consistent across JVMs.
- *
- * @see SchemaOutputResolver#createOutput(String, String)
- */
- private final Map<String,Namespace> namespaces = new TreeMap<String,Namespace>(NAMESPACE_COMPARATOR);
-
- /**
- * {@link ErrorListener} to send errors to.
- */
- private ErrorListener errorListener;
-
- /** model navigator **/
- private Navigator<T,C,F,M> navigator;
-
- private final TypeInfoSet<T,C,F,M> types;
-
- /**
- * Representation for xs:string.
- */
- private final NonElement<T,C> stringType;
-
- /**
- * Represents xs:anyType.
- */
- private final NonElement<T,C> anyType;
-
- /**
- * Used to detect cycles in anonymous types.
- */
- private final CollisionCheckStack<ClassInfo<T,C>> collisionChecker = new CollisionCheckStack<ClassInfo<T,C>>();
-
- public XmlSchemaGenerator( Navigator<T,C,F,M> navigator, TypeInfoSet<T,C,F,M> types ) {
- this.navigator = navigator;
- this.types = types;
-
- this.stringType = types.getTypeInfo(navigator.ref(String.class));
- this.anyType = types.getAnyTypeInfo();
-
- // populate the object
- for( ClassInfo<T,C> ci : types.beans().values() )
- add(ci);
- for( ElementInfo<T,C> ei1 : types.getElementMappings(null).values() )
- add(ei1);
- for( EnumLeafInfo<T,C> ei : types.enums().values() )
- add(ei);
- for( ArrayInfo<T,C> a : types.arrays().values())
- add(a);
- }
-
- private Namespace getNamespace(String uri) {
- Namespace n = namespaces.get(uri);
- if(n==null)
- namespaces.put(uri,n=new Namespace(uri));
- return n;
- }
-
- /**
- * Adds a new class to the list of classes to be written.
- *
- * <p>
- * A {@link ClassInfo} may have two namespaces --- one for the element name
- * and the other for the type name. If they are different, we put the same
- * {@link ClassInfo} to two {@link Namespace}s.
- */
- public void add( ClassInfo<T,C> clazz ) {
- assert clazz!=null;
-
- String nsUri = null;
-
- if(clazz.getClazz()==navigator.asDecl(CompositeStructure.class))
- return; // this is a special class we introduced for JAX-WS that we *don't* want in the schema
-
- if(clazz.isElement()) {
- // put element -> type reference
- nsUri = clazz.getElementName().getNamespaceURI();
- Namespace ns = getNamespace(nsUri);
- ns.classes.add(clazz);
- ns.addDependencyTo(clazz.getTypeName());
-
- // schedule writing this global element
- add(clazz.getElementName(),false,clazz);
- }
-
- QName tn = clazz.getTypeName();
- if(tn!=null) {
- nsUri = tn.getNamespaceURI();
- } else {
- // anonymous type
- if(nsUri==null)
- return;
- }
-
- Namespace n = getNamespace(nsUri);
- n.classes.add(clazz);
-
- // search properties for foreign namespace references
- for( PropertyInfo<T,C> p : clazz.getProperties()) {
- n.processForeignNamespaces(p, 1);
- if (p instanceof AttributePropertyInfo) {
- AttributePropertyInfo<T,C> ap = (AttributePropertyInfo<T,C>) p;
- String aUri = ap.getXmlName().getNamespaceURI();
- if(aUri.length()>0) {
- // global attribute
- getNamespace(aUri).addGlobalAttribute(ap);
- n.addDependencyTo(ap.getXmlName());
- }
- }
- if (p instanceof ElementPropertyInfo) {
- ElementPropertyInfo<T,C> ep = (ElementPropertyInfo<T,C>) p;
- for (TypeRef<T,C> tref : ep.getTypes()) {
- String eUri = tref.getTagName().getNamespaceURI();
- if(eUri.length()>0 && !eUri.equals(n.uri)) {
- getNamespace(eUri).addGlobalElement(tref);
- n.addDependencyTo(tref.getTagName());
- }
- }
- }
-
- if(generateSwaRefAdapter(p))
- n.useSwaRef = true;
-
- MimeType mimeType = p.getExpectedMimeType();
- if( mimeType != null ) {
- n.useMimeNs = true;
- }
-
- }
-
- // recurse on baseTypes to make sure that we can refer to them in the schema
- ClassInfo<T,C> bc = clazz.getBaseClass();
- if (bc != null) {
- add(bc);
- n.addDependencyTo(bc.getTypeName());
- }
- }
-
- /**
- * Adds a new element to the list of elements to be written.
- */
- public void add( ElementInfo<T,C> elem ) {
- assert elem!=null;
-
- @SuppressWarnings("UnusedAssignment")
- boolean nillable = false; // default value
-
- QName name = elem.getElementName();
- Namespace n = getNamespace(name.getNamespaceURI());
- ElementInfo ei;
-
- if (elem.getScope() != null) { // (probably) never happens
- ei = this.types.getElementInfo(elem.getScope().getClazz(), name);
- } else {
- ei = this.types.getElementInfo(null, name);
- }
-
- XmlElement xmlElem = ei.getProperty().readAnnotation(XmlElement.class);
-
- if (xmlElem == null) {
- nillable = false;
- } else {
- nillable = xmlElem.nillable();
- }
-
- n.elementDecls.put(name.getLocalPart(),n.new ElementWithType(nillable, elem.getContentType()));
-
- // search for foreign namespace references
- n.processForeignNamespaces(elem.getProperty(), 1);
- }
-
- public void add( EnumLeafInfo<T,C> envm ) {
- assert envm!=null;
-
- String nsUri = null;
-
- if(envm.isElement()) {
- // put element -> type reference
- nsUri = envm.getElementName().getNamespaceURI();
- Namespace ns = getNamespace(nsUri);
- ns.enums.add(envm);
- ns.addDependencyTo(envm.getTypeName());
-
- // schedule writing this global element
- add(envm.getElementName(),false,envm);
- }
-
- final QName typeName = envm.getTypeName();
- if (typeName != null) {
- nsUri = typeName.getNamespaceURI();
- } else {
- if(nsUri==null)
- return; // anonymous type
- }
-
- Namespace n = getNamespace(nsUri);
- n.enums.add(envm);
-
- // search for foreign namespace references
- n.addDependencyTo(envm.getBaseType().getTypeName());
- }
-
- public void add( ArrayInfo<T,C> a ) {
- assert a!=null;
-
- final String namespaceURI = a.getTypeName().getNamespaceURI();
- Namespace n = getNamespace(namespaceURI);
- n.arrays.add(a);
-
- // search for foreign namespace references
- n.addDependencyTo(a.getItemType().getTypeName());
- }
-
- /**
- * Adds an additional element declaration.
- *
- * @param tagName
- * The name of the element declaration to be added.
- * @param type
- * The type this element refers to.
- * Can be null, in which case the element refers to an empty anonymous complex type.
- */
- public void add( QName tagName, boolean isNillable, NonElement<T,C> type ) {
-
- if(type!=null && type.getType()==navigator.ref(CompositeStructure.class))
- return; // this is a special class we introduced for JAX-WS that we *don't* want in the schema
-
-
- Namespace n = getNamespace(tagName.getNamespaceURI());
- n.elementDecls.put(tagName.getLocalPart(), n.new ElementWithType(isNillable,type));
-
- // search for foreign namespace references
- if(type!=null)
- n.addDependencyTo(type.getTypeName());
- }
-
- /**
- * Writes out the episode file.
- */
- public void writeEpisodeFile(XmlSerializer out) {
- Bindings root = TXW.create(Bindings.class, out);
-
- if(namespaces.containsKey("")) // otherwise jaxb binding NS should be the default namespace
- root._namespace(WellKnownNamespace.JAXB,"jaxb");
- root.version("2.1");
- // TODO: don't we want to bake in versions?
-
- // generate listing per schema
- for (Map.Entry<String,Namespace> e : namespaces.entrySet()) {
- Bindings group = root.bindings();
-
- String prefix;
- String tns = e.getKey();
- if(!tns.equals("")) {
- group._namespace(tns,"tns");
- prefix = "tns:";
- } else {
- prefix = "";
- }
-
- group.scd("x-schema::"+(tns.equals("")?"":"tns"));
- group.schemaBindings().map(false);
-
- for (ClassInfo<T,C> ci : e.getValue().classes) {
- if(ci.getTypeName()==null) continue; // local type
-
- if(ci.getTypeName().getNamespaceURI().equals(tns)) {
- Bindings child = group.bindings();
- child.scd('~'+prefix+ci.getTypeName().getLocalPart());
- child.klass().ref(ci.getName());
- }
-
- if(ci.isElement() && ci.getElementName().getNamespaceURI().equals(tns)) {
- Bindings child = group.bindings();
- child.scd(prefix+ci.getElementName().getLocalPart());
- child.klass().ref(ci.getName());
- }
- }
-
- for (EnumLeafInfo<T,C> en : e.getValue().enums) {
- if(en.getTypeName()==null) continue; // local type
-
- Bindings child = group.bindings();
- child.scd('~'+prefix+en.getTypeName().getLocalPart());
- child.klass().ref(navigator.getClassName(en.getClazz()));
- }
-
- group.commit(true);
- }
-
- root.commit();
- }
-
- /**
- * Write out the schema documents.
- */
- public void write(SchemaOutputResolver resolver, ErrorListener errorListener) throws IOException {
- if(resolver==null)
- throw new IllegalArgumentException();
-
- if(logger.isLoggable(Level.FINE)) {
- // debug logging to see what's going on.
- logger.log(Level.FINE,"Writing XML Schema for "+toString(),new StackRecorder());
- }
-
- // make it fool-proof
- resolver = new FoolProofResolver(resolver);
- this.errorListener = errorListener;
-
- Map<String, String> schemaLocations = types.getSchemaLocations();
-
- Map<Namespace,Result> out = new HashMap<Namespace,Result>();
- Map<Namespace,String> systemIds = new HashMap<Namespace,String>();
-
- // we create a Namespace object for the XML Schema namespace
- // as a side-effect, but we don't want to generate it.
- namespaces.remove(WellKnownNamespace.XML_SCHEMA);
-
- // first create the outputs for all so that we can resolve references among
- // schema files when we write
- for( Namespace n : namespaces.values() ) {
- String schemaLocation = schemaLocations.get(n.uri);
- if(schemaLocation!=null) {
- systemIds.put(n,schemaLocation);
- } else {
- Result output = resolver.createOutput(n.uri,"schema"+(out.size()+1)+".xsd");
- if(output!=null) { // null result means no schema for that namespace
- out.put(n,output);
- systemIds.put(n,output.getSystemId());
- }
- }
- //Clear the namespace specific set with already written classes
- n.resetWritten();
- }
-
- // then write'em all
- for( Map.Entry<Namespace,Result> e : out.entrySet() ) {
- Result result = e.getValue();
- e.getKey().writeTo( result, systemIds );
- if(result instanceof StreamResult) {
- OutputStream outputStream = ((StreamResult)result).getOutputStream();
- if(outputStream != null) {
- outputStream.close(); // fix for bugid: 6291301
- } else {
- final Writer writer = ((StreamResult)result).getWriter();
- if(writer != null) writer.close();
- }
- }
- }
- }
-
-
-
- /**
- * Schema components are organized per namespace.
- */
- private class Namespace {
- final @NotNull String uri;
-
- /**
- * Other {@link Namespace}s that this namespace depends on.
- */
- private final Set<Namespace> depends = new LinkedHashSet<Namespace>();
-
- /**
- * If this schema refers to components from this schema by itself.
- */
- private boolean selfReference;
-
- /**
- * List of classes in this namespace.
- */
- private final Set<ClassInfo<T,C>> classes = new LinkedHashSet<ClassInfo<T,C>>();
-
- /**
- * Set of enums in this namespace
- */
- private final Set<EnumLeafInfo<T,C>> enums = new LinkedHashSet<EnumLeafInfo<T,C>>();
-
- /**
- * Set of arrays in this namespace
- */
- private final Set<ArrayInfo<T,C>> arrays = new LinkedHashSet<ArrayInfo<T,C>>();
-
- /**
- * Global attribute declarations keyed by their local names.
- */
- private final MultiMap<String,AttributePropertyInfo<T,C>> attributeDecls = new MultiMap<String,AttributePropertyInfo<T,C>>(null);
-
- /**
- * Global element declarations to be written, keyed by their local names.
- */
- private final MultiMap<String,ElementDeclaration> elementDecls =
- new MultiMap<String,ElementDeclaration>(new ElementWithType(true,anyType));
-
- private Form attributeFormDefault;
- private Form elementFormDefault;
-
- /**
- * Does schema in this namespace uses swaRef? If so, we need to generate import
- * statement.
- */
- private boolean useSwaRef;
-
- /**
- * Import for mime namespace needs to be generated.
- * See #856
- */
- private boolean useMimeNs;
-
- /**
- * Container for already processed classes
- */
- private final Set<ClassInfo> written = new HashSet<ClassInfo>();
-
- public Namespace(String uri) {
- this.uri = uri;
- assert !XmlSchemaGenerator.this.namespaces.containsKey(uri);
- XmlSchemaGenerator.this.namespaces.put(uri,this);
- }
-
- /**
- * Clear out the set of already processed classes for this namespace
- */
- void resetWritten() {
- written.clear();
- }
-
- /**
- * Process the given PropertyInfo looking for references to namespaces that
- * are foreign to the given namespace. Any foreign namespace references
- * found are added to the given namespaces dependency list and an &lt;import>
- * is generated for it.
- *
- * @param p the PropertyInfo
- */
- private void processForeignNamespaces(PropertyInfo<T, C> p, int processingDepth) {
- for (TypeInfo<T, C> t : p.ref()) {
- if ((t instanceof ClassInfo) && (processingDepth > 0)) {
- java.util.List<PropertyInfo> l = ((ClassInfo) t).getProperties();
- for (PropertyInfo subp : l) {
- processForeignNamespaces(subp, --processingDepth);
- }
- }
- if (t instanceof Element) {
- addDependencyTo(((Element) t).getElementName());
- }
- if (t instanceof NonElement) {
- addDependencyTo(((NonElement) t).getTypeName());
- }
- }
- }
-
- private void addDependencyTo(@Nullable QName qname) {
- // even though the Element interface says getElementName() returns non-null,
- // ClassInfo always implements Element (even if an instance of ClassInfo might not be an Element).
- // so this check is still necessary
- if (qname==null) {
- return;
- }
-
- String nsUri = qname.getNamespaceURI();
-
- if (nsUri.equals(XML_SCHEMA)) {
- // no need to explicitly refer to XSD namespace
- return;
- }
-
- if (nsUri.equals(uri)) {
- selfReference = true;
- return;
- }
-
- // found a type in a foreign namespace, so make sure we generate an import for it
- depends.add(getNamespace(nsUri));
- }
-
- /**
- * Writes the schema document to the specified result.
- *
- * @param systemIds
- * System IDs of the other schema documents. "" indicates 'implied'.
- */
- private void writeTo(Result result, Map<Namespace,String> systemIds) throws IOException {
- try {
- Schema schema = TXW.create(Schema.class,ResultFactory.createSerializer(result));
-
- // additional namespace declarations to be made.
- Map<String, String> xmlNs = types.getXmlNs(uri);
-
- for (Map.Entry<String, String> e : xmlNs.entrySet()) {
- schema._namespace(e.getValue(),e.getKey());
- }
-
- if(useSwaRef)
- schema._namespace(WellKnownNamespace.SWA_URI,"swaRef");
-
- if(useMimeNs)
- schema._namespace(WellKnownNamespace.XML_MIME_URI,"xmime");
-
- attributeFormDefault = Form.get(types.getAttributeFormDefault(uri));
- attributeFormDefault.declare("attributeFormDefault",schema);
-
- elementFormDefault = Form.get(types.getElementFormDefault(uri));
- // TODO: if elementFormDefault is UNSET, figure out the right default value to use
- elementFormDefault.declare("elementFormDefault",schema);
-
-
- // declare XML Schema namespace to be xs, but allow the user to override it.
- // if 'xs' is used for other things, we'll just let TXW assign a random prefix
- if(!xmlNs.containsValue(WellKnownNamespace.XML_SCHEMA)
- && !xmlNs.containsKey("xs"))
- schema._namespace(WellKnownNamespace.XML_SCHEMA,"xs");
- schema.version("1.0");
-
- if(uri.length()!=0)
- schema.targetNamespace(uri);
-
- // declare prefixes for them at this level, so that we can avoid redundant
- // namespace declarations
- for (Namespace ns : depends) {
- schema._namespace(ns.uri);
- }
-
- if(selfReference && uri.length()!=0) {
- // use common 'tns' prefix for the own namespace
- // if self-reference is needed
- schema._namespace(uri,"tns");
- }
-
- schema._pcdata(newline);
-
- // refer to other schemas
- for( Namespace n : depends ) {
- Import imp = schema._import();
- if(n.uri.length()!=0)
- imp.namespace(n.uri);
- String refSystemId = systemIds.get(n);
- if(refSystemId!=null && !refSystemId.equals("")) {
- // "" means implied. null if the SchemaOutputResolver said "don't generate!"
- imp.schemaLocation(relativize(refSystemId,result.getSystemId()));
- }
- schema._pcdata(newline);
- }
- if(useSwaRef) {
- schema._import().namespace(WellKnownNamespace.SWA_URI).schemaLocation("http://ws-i.org/profiles/basic/1.1/swaref.xsd");
- }
- if(useMimeNs) {
- schema._import().namespace(WellKnownNamespace.XML_MIME_URI).schemaLocation("http://www.w3.org/2005/05/xmlmime");
- }
-
- // then write each component
- for (Map.Entry<String,ElementDeclaration> e : elementDecls.entrySet()) {
- e.getValue().writeTo(e.getKey(),schema);
- schema._pcdata(newline);
- }
- for (ClassInfo<T, C> c : classes) {
- if (c.getTypeName()==null) {
- // don't generate anything if it's an anonymous type
- continue;
- }
- if(uri.equals(c.getTypeName().getNamespaceURI()))
- writeClass(c, schema);
- schema._pcdata(newline);
- }
- for (EnumLeafInfo<T, C> e : enums) {
- if (e.getTypeName()==null) {
- // don't generate anything if it's an anonymous type
- continue;
- }
- if(uri.equals(e.getTypeName().getNamespaceURI()))
- writeEnum(e,schema);
- schema._pcdata(newline);
- }
- for (ArrayInfo<T, C> a : arrays) {
- writeArray(a,schema);
- schema._pcdata(newline);
- }
- for (Map.Entry<String,AttributePropertyInfo<T,C>> e : attributeDecls.entrySet()) {
- TopLevelAttribute a = schema.attribute();
- a.name(e.getKey());
- if(e.getValue()==null)
- writeTypeRef(a,stringType,"type");
- else
- writeAttributeTypeRef(e.getValue(),a);
- schema._pcdata(newline);
- }
-
- // close the schema
- schema.commit();
- } catch( TxwException e ) {
- logger.log(Level.INFO,e.getMessage(),e);
- throw new IOException(e.getMessage());
- }
- }
-
- /**
- * Writes a type attribute (if the referenced type is a global type)
- * or writes out the definition of the anonymous type in place (if the referenced
- * type is not a global type.)
- *
- * Also provides processing for ID/IDREF, MTOM @xmime, and swa:ref
- *
- * ComplexTypeHost and SimpleTypeHost don't share an api for creating
- * and attribute in a type-safe way, so we will compromise for now and
- * use _attribute().
- */
- private void writeTypeRef(TypeHost th, NonElementRef<T, C> typeRef, String refAttName) {
- // ID / IDREF handling
- switch(typeRef.getSource().id()) {
- case ID:
- th._attribute(refAttName, new QName(WellKnownNamespace.XML_SCHEMA, "ID"));
- return;
- case IDREF:
- th._attribute(refAttName, new QName(WellKnownNamespace.XML_SCHEMA, "IDREF"));
- return;
- case NONE:
- // no ID/IDREF, so continue on and generate the type
- break;
- default:
- throw new IllegalStateException();
- }
-
- // MTOM handling
- MimeType mimeType = typeRef.getSource().getExpectedMimeType();
- if( mimeType != null ) {
- th._attribute(new QName(WellKnownNamespace.XML_MIME_URI, "expectedContentTypes", "xmime"), mimeType.toString());
- }
-
- // ref:swaRef handling
- if(generateSwaRefAdapter(typeRef)) {
- th._attribute(refAttName, new QName(WellKnownNamespace.SWA_URI, "swaRef", "ref"));
- return;
- }
-
- // type name override
- if(typeRef.getSource().getSchemaType()!=null) {
- th._attribute(refAttName,typeRef.getSource().getSchemaType());
- return;
- }
-
- // normal type generation
- writeTypeRef(th, typeRef.getTarget(), refAttName);
- }
-
- /**
- * Writes a type attribute (if the referenced type is a global type)
- * or writes out the definition of the anonymous type in place (if the referenced
- * type is not a global type.)
- *
- * @param th
- * the TXW interface to which the attribute will be written.
- * @param type
- * type to be referenced.
- * @param refAttName
- * The name of the attribute used when referencing a type by QName.
- */
- private void writeTypeRef(TypeHost th, NonElement<T,C> type, String refAttName) {
- Element e = null;
- if (type instanceof MaybeElement) {
- MaybeElement me = (MaybeElement)type;
- boolean isElement = me.isElement();
- if (isElement) e = me.asElement();
- }
- if (type instanceof Element) {
- e = (Element)type;
- }
- if (type.getTypeName()==null) {
- if ((e != null) && (e.getElementName() != null)) {
- th.block(); // so that the caller may write other attributes
- if(type instanceof ClassInfo) {
- writeClass( (ClassInfo<T,C>)type, th );
- } else {
- writeEnum( (EnumLeafInfo<T,C>)type, (SimpleTypeHost)th);
- }
- } else {
- // anonymous
- th.block(); // so that the caller may write other attributes
- if(type instanceof ClassInfo) {
- if(collisionChecker.push((ClassInfo<T,C>)type)) {
- errorListener.warning(new SAXParseException(
- Messages.ANONYMOUS_TYPE_CYCLE.format(collisionChecker.getCycleString()),
- null
- ));
- } else {
- writeClass( (ClassInfo<T,C>)type, th );
- }
- collisionChecker.pop();
- } else {
- writeEnum( (EnumLeafInfo<T,C>)type, (SimpleTypeHost)th);
- }
- }
- } else {
- th._attribute(refAttName,type.getTypeName());
- }
- }
-
- /**
- * writes the schema definition for the given array class
- */
- private void writeArray(ArrayInfo<T, C> a, Schema schema) {
- ComplexType ct = schema.complexType().name(a.getTypeName().getLocalPart());
- ct._final("#all");
- LocalElement le = ct.sequence().element().name("item");
- le.type(a.getItemType().getTypeName());
- le.minOccurs(0).maxOccurs("unbounded");
- le.nillable(true);
- ct.commit();
- }
-
- /**
- * writes the schema definition for the specified type-safe enum in the given TypeHost
- */
- private void writeEnum(EnumLeafInfo<T, C> e, SimpleTypeHost th) {
- SimpleType st = th.simpleType();
- writeName(e,st);
-
- SimpleRestrictionModel base = st.restriction();
- writeTypeRef(base, e.getBaseType(), "base");
-
- for (EnumConstant c : e.getConstants()) {
- base.enumeration().value(c.getLexicalValue());
- }
- st.commit();
- }
-
- /**
- * Writes the schema definition for the specified class to the schema writer.
- *
- * @param c the class info
- * @param parent the writer of the parent element into which the type will be defined
- */
- private void writeClass(ClassInfo<T,C> c, TypeHost parent) {
- if (written.contains(c)) { // to avoid cycles let's check if we haven't already processed the class
- return;
- }
- written.add(c);
- // special handling for value properties
- if (containsValueProp(c)) {
- if (c.getProperties().size() == 1) {
- // [RESULT 2 - simpleType if the value prop is the only prop]
- //
- // <simpleType name="foo">
- // <xs:restriction base="xs:int"/>
- // </>
- ValuePropertyInfo<T,C> vp = (ValuePropertyInfo<T,C>)c.getProperties().get(0);
- SimpleType st = ((SimpleTypeHost)parent).simpleType();
- writeName(c, st);
- if(vp.isCollection()) {
- writeTypeRef(st.list(),vp.getTarget(),"itemType");
- } else {
- writeTypeRef(st.restriction(),vp.getTarget(),"base");
- }
- return;
- } else {
- // [RESULT 1 - complexType with simpleContent]
- //
- // <complexType name="foo">
- // <simpleContent>
- // <extension base="xs:int"/>
- // <attribute name="b" type="xs:boolean"/>
- // </>
- // </>
- // </>
- // ...
- // <element name="f" type="foo"/>
- // ...
- ComplexType ct = ((ComplexTypeHost)parent).complexType();
- writeName(c,ct);
- if(c.isFinal())
- ct._final("extension restriction");
-
- SimpleExtension se = ct.simpleContent().extension();
- se.block(); // because we might have attribute before value
- for (PropertyInfo<T,C> p : c.getProperties()) {
- switch (p.kind()) {
- case ATTRIBUTE:
- handleAttributeProp((AttributePropertyInfo<T,C>)p,se);
- break;
- case VALUE:
- TODO.checkSpec("what if vp.isCollection() == true?");
- ValuePropertyInfo vp = (ValuePropertyInfo) p;
- se.base(vp.getTarget().getTypeName());
- break;
- case ELEMENT: // error
- case REFERENCE: // error
- default:
- assert false;
- throw new IllegalStateException();
- }
- }
- se.commit();
- }
- TODO.schemaGenerator("figure out what to do if bc != null");
- TODO.checkSpec("handle sec 8.9.5.2, bullet #4");
- // Java types containing value props can only contain properties of type
- // ValuePropertyinfo and AttributePropertyInfo which have just been handled,
- // so return.
- return;
- }
-
- // we didn't fall into the special case for value props, so we
- // need to initialize the ct.
- // generate the complexType
- ComplexType ct = ((ComplexTypeHost)parent).complexType();
- writeName(c,ct);
- if(c.isFinal())
- ct._final("extension restriction");
- if(c.isAbstract())
- ct._abstract(true);
-
- // these are where we write content model and attributes
- AttrDecls contentModel = ct;
- TypeDefParticle contentModelOwner = ct;
-
- // if there is a base class, we need to generate an extension in the schema
- final ClassInfo<T,C> bc = c.getBaseClass();
- if (bc != null) {
- if(bc.hasValueProperty()) {
- // extending complex type with simple content
- SimpleExtension se = ct.simpleContent().extension();
- contentModel = se;
- contentModelOwner = null;
- se.base(bc.getTypeName());
- } else {
- ComplexExtension ce = ct.complexContent().extension();
- contentModel = ce;
- contentModelOwner = ce;
-
- ce.base(bc.getTypeName());
- // TODO: what if the base type is anonymous?
- }
- }
-
- if(contentModelOwner!=null) {
- // build the tree that represents the explicit content model from iterate over the properties
- ArrayList<Tree> children = new ArrayList<Tree>();
- for (PropertyInfo<T,C> p : c.getProperties()) {
- // handling for <complexType @mixed='true' ...>
- if(p instanceof ReferencePropertyInfo && ((ReferencePropertyInfo)p).isMixed()) {
- ct.mixed(true);
- }
- Tree t = buildPropertyContentModel(p);
- if(t!=null)
- children.add(t);
- }
-
- Tree top = Tree.makeGroup( c.isOrdered() ? GroupKind.SEQUENCE : GroupKind.ALL, children);
-
- // write the content model
- top.write(contentModelOwner);
- }
-
- // then attributes
- for (PropertyInfo<T,C> p : c.getProperties()) {
- if (p instanceof AttributePropertyInfo) {
- handleAttributeProp((AttributePropertyInfo<T,C>)p, contentModel);
- }
- }
- if( c.hasAttributeWildcard()) {
- contentModel.anyAttribute().namespace("##other").processContents("skip");
- }
- ct.commit();
- }
-
- /**
- * Writes the name attribute if it's named.
- */
- private void writeName(NonElement<T,C> c, TypedXmlWriter xw) {
- QName tn = c.getTypeName();
- if(tn!=null)
- xw._attribute("name",tn.getLocalPart()); // named
- }
-
- private boolean containsValueProp(ClassInfo<T, C> c) {
- for (PropertyInfo p : c.getProperties()) {
- if (p instanceof ValuePropertyInfo) return true;
- }
- return false;
- }
-
- /**
- * Builds content model writer for the specified property.
- */
- private Tree buildPropertyContentModel(PropertyInfo<T,C> p) {
- switch(p.kind()) {
- case ELEMENT:
- return handleElementProp((ElementPropertyInfo<T,C>)p);
- case ATTRIBUTE:
- // attribuets are handled later
- return null;
- case REFERENCE:
- return handleReferenceProp((ReferencePropertyInfo<T,C>)p);
- case MAP:
- return handleMapProp((MapPropertyInfo<T,C>)p);
- case VALUE:
- // value props handled above in writeClass()
- assert false;
- throw new IllegalStateException();
- default:
- assert false;
- throw new IllegalStateException();
- }
- }
-
- /**
- * Generate the proper schema fragment for the given element property into the
- * specified schema compositor.
- *
- * The element property may or may not represent a collection and it may or may
- * not be wrapped.
- *
- * @param ep the element property
- */
- private Tree handleElementProp(final ElementPropertyInfo<T,C> ep) {
- if (ep.isValueList()) {
- return new Tree.Term() {
- protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated) {
- TypeRef<T,C> t = ep.getTypes().get(0);
- LocalElement e = parent.element();
- e.block(); // we will write occurs later
- QName tn = t.getTagName();
- e.name(tn.getLocalPart());
- List lst = e.simpleType().list();
- writeTypeRef(lst,t, "itemType");
- elementFormDefault.writeForm(e,tn);
- writeOccurs(e,isOptional||!ep.isRequired(),repeated);
- }
- };
- }
-
- ArrayList<Tree> children = new ArrayList<Tree>();
- for (final TypeRef<T,C> t : ep.getTypes()) {
- children.add(new Tree.Term() {
- protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated) {
- LocalElement e = parent.element();
-
- QName tn = t.getTagName();
-
- PropertyInfo propInfo = t.getSource();
- TypeInfo parentInfo = (propInfo == null) ? null : propInfo.parent();
-
- if (canBeDirectElementRef(t, tn, parentInfo)) {
- if ((!t.getTarget().isSimpleType()) && (t.getTarget() instanceof ClassInfo) && collisionChecker.findDuplicate((ClassInfo<T, C>) t.getTarget())) {
- e.ref(new QName(uri, tn.getLocalPart()));
- } else {
-
- QName elemName = null;
- if (t.getTarget() instanceof Element) {
- Element te = (Element) t.getTarget();
- elemName = te.getElementName();
- }
-
- Collection<TypeInfo> refs = propInfo.ref();
- TypeInfo ti;
- if ((refs != null) && (!refs.isEmpty()) && (elemName != null)
- && ((ti = refs.iterator().next()) == null || ti instanceof ClassInfoImpl)) {
- ClassInfoImpl cImpl = (ClassInfoImpl)ti;
- if ((cImpl != null) && (cImpl.getElementName() != null)) {
- e.ref(new QName(cImpl.getElementName().getNamespaceURI(), tn.getLocalPart()));
- } else {
- e.ref(new QName("", tn.getLocalPart()));
- }
- } else {
- e.ref(tn);
- }
- }
- } else {
- e.name(tn.getLocalPart());
- writeTypeRef(e,t, "type");
- elementFormDefault.writeForm(e,tn);
- }
-
- if (t.isNillable()) {
- e.nillable(true);
- }
- if(t.getDefaultValue()!=null)
- e._default(t.getDefaultValue());
- writeOccurs(e,isOptional,repeated);
- }
- });
- }
-
- final Tree choice = Tree.makeGroup(GroupKind.CHOICE, children)
- .makeOptional(!ep.isRequired())
- .makeRepeated(ep.isCollection()); // see Spec table 8-13
-
-
- final QName ename = ep.getXmlName();
- if (ename != null) { // wrapped collection
- return new Tree.Term() {
- protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated) {
- LocalElement e = parent.element();
- if(ename.getNamespaceURI().length()>0) {
- if (!ename.getNamespaceURI().equals(uri)) {
- // TODO: we need to generate the corresponding element declaration for this
- // table 8-25: Property/field element wrapper with ref attribute
- e.ref(new QName(ename.getNamespaceURI(), ename.getLocalPart()));
- return;
- }
- }
- e.name(ename.getLocalPart());
- elementFormDefault.writeForm(e,ename);
-
- if(ep.isCollectionNillable()) {
- e.nillable(true);
- }
- writeOccurs(e,!ep.isCollectionRequired(),repeated);
-
- ComplexType p = e.complexType();
- choice.write(p);
- }
- };
- } else {// non-wrapped
- return choice;
- }
- }
-
- /**
- * Checks if we can collapse
- * &lt;element name='foo' type='t' /> to &lt;element ref='foo' />.
- *
- * This is possible if we already have such declaration to begin with.
- */
- private boolean canBeDirectElementRef(TypeRef<T, C> t, QName tn, TypeInfo parentInfo) {
- Element te = null;
- ClassInfo ci = null;
- QName targetTagName = null;
-
- if(t.isNillable() || t.getDefaultValue()!=null) {
- // can't put those attributes on <element ref>
- return false;
- }
-
- if (t.getTarget() instanceof Element) {
- te = (Element) t.getTarget();
- targetTagName = te.getElementName();
- if (te instanceof ClassInfo) {
- ci = (ClassInfo)te;
- }
- }
-
- String nsUri = tn.getNamespaceURI();
- if ((!nsUri.equals(uri) && nsUri.length()>0) && (!((parentInfo instanceof ClassInfo) && (((ClassInfo)parentInfo).getTypeName() == null)))) {
- return true;
- }
-
- if ((ci != null) && ((targetTagName != null) && (te.getScope() == null) && (targetTagName.getNamespaceURI() == null))) {
- if (targetTagName.equals(tn)) {
- return true;
- }
- }
-
- // we have the precise element defined already
- if (te != null) { // it is instanceof Element
- return targetTagName!=null && targetTagName.equals(tn);
- }
-
- return false;
- }
-
-
- /**
- * Generate an attribute for the specified property on the specified complexType
- *
- * @param ap the attribute
- * @param attr the schema definition to which the attribute will be added
- */
- private void handleAttributeProp(AttributePropertyInfo<T,C> ap, AttrDecls attr) {
- // attr is either a top-level ComplexType or a ComplexExtension
- //
- // [RESULT]
- //
- // <complexType ...>
- // <...>...</>
- // <attribute name="foo" type="xs:int"/>
- // </>
- //
- // or
- //
- // <complexType ...>
- // <complexContent>
- // <extension ...>
- // <...>...</>
- // </>
- // </>
- // <attribute name="foo" type="xs:int"/>
- // </>
- //
- // or it could also be an in-lined type (attr ref)
- //
- LocalAttribute localAttribute = attr.attribute();
-
- final String attrURI = ap.getXmlName().getNamespaceURI();
- if (attrURI.equals("") /*|| attrURI.equals(uri) --- those are generated as global attributes anyway, so use them.*/) {
- localAttribute.name(ap.getXmlName().getLocalPart());
-
- writeAttributeTypeRef(ap, localAttribute);
-
- attributeFormDefault.writeForm(localAttribute,ap.getXmlName());
- } else { // generate an attr ref
- localAttribute.ref(ap.getXmlName());
- }
-
- if(ap.isRequired()) {
- // TODO: not type safe
- localAttribute.use("required");
- }
- }
-
- private void writeAttributeTypeRef(AttributePropertyInfo<T,C> ap, AttributeType a) {
- if( ap.isCollection() )
- writeTypeRef(a.simpleType().list(), ap, "itemType");
- else
- writeTypeRef(a, ap, "type");
- }
-
- /**
- * Generate the proper schema fragment for the given reference property into the
- * specified schema compositor.
- *
- * The reference property may or may not refer to a collection and it may or may
- * not be wrapped.
- */
- private Tree handleReferenceProp(final ReferencePropertyInfo<T, C> rp) {
- // fill in content model
- ArrayList<Tree> children = new ArrayList<Tree>();
-
- for (final Element<T,C> e : rp.getElements()) {
- children.add(new Tree.Term() {
- protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated) {
- LocalElement eref = parent.element();
-
- boolean local=false;
-
- QName en = e.getElementName();
- if(e.getScope()!=null) {
- // scoped. needs to be inlined
- boolean qualified = en.getNamespaceURI().equals(uri);
- boolean unqualified = en.getNamespaceURI().equals("");
- if(qualified || unqualified) {
- // can be inlined indeed
-
- // write form="..." if necessary
- if(unqualified) {
- if(elementFormDefault.isEffectivelyQualified)
- eref.form("unqualified");
- } else {
- if(!elementFormDefault.isEffectivelyQualified)
- eref.form("qualified");
- }
-
- local = true;
- eref.name(en.getLocalPart());
-
- // write out type reference
- if(e instanceof ClassInfo) {
- writeTypeRef(eref,(ClassInfo<T,C>)e,"type");
- } else {
- writeTypeRef(eref,((ElementInfo<T,C>)e).getContentType(),"type");
- }
- }
- }
- if(!local)
- eref.ref(en);
- writeOccurs(eref,isOptional,repeated);
- }
- });
- }
-
- final WildcardMode wc = rp.getWildcard();
- if( wc != null ) {
- children.add(new Tree.Term() {
- protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated) {
- Any any = parent.any();
- final String pcmode = getProcessContentsModeName(wc);
- if( pcmode != null ) any.processContents(pcmode);
- any.namespace("##other");
- writeOccurs(any,isOptional,repeated);
- }
- });
- }
-
-
- final Tree choice = Tree.makeGroup(GroupKind.CHOICE, children).makeRepeated(rp.isCollection()).makeOptional(!rp.isRequired());
-
- final QName ename = rp.getXmlName();
-
- if (ename != null) { // wrapped
- return new Tree.Term() {
- protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated) {
- LocalElement e = parent.element().name(ename.getLocalPart());
- elementFormDefault.writeForm(e,ename);
- if(rp.isCollectionNillable())
- e.nillable(true);
- writeOccurs(e,true,repeated);
-
- ComplexType p = e.complexType();
- choice.write(p);
- }
- };
- } else { // unwrapped
- return choice;
- }
- }
-
- /**
- * Generate the proper schema fragment for the given map property into the
- * specified schema compositor.
- *
- * @param mp the map property
- */
- private Tree handleMapProp(final MapPropertyInfo<T,C> mp) {
- return new Tree.Term() {
- protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated) {
- QName ename = mp.getXmlName();
-
- LocalElement e = parent.element();
- elementFormDefault.writeForm(e,ename);
- if(mp.isCollectionNillable())
- e.nillable(true);
-
- e = e.name(ename.getLocalPart());
- writeOccurs(e,isOptional,repeated);
- ComplexType p = e.complexType();
-
- // TODO: entry, key, and value are always unqualified. that needs to be fixed, too.
- // TODO: we need to generate the corresponding element declaration, if they are qualified
- e = p.sequence().element();
- e.name("entry").minOccurs(0).maxOccurs("unbounded");
-
- ExplicitGroup seq = e.complexType().sequence();
- writeKeyOrValue(seq, "key", mp.getKeyType());
- writeKeyOrValue(seq, "value", mp.getValueType());
- }
- };
- }
-
- private void writeKeyOrValue(ExplicitGroup seq, String tagName, NonElement<T, C> typeRef) {
- LocalElement key = seq.element().name(tagName);
- key.minOccurs(0);
- writeTypeRef(key, typeRef, "type");
- }
-
- public void addGlobalAttribute(AttributePropertyInfo<T,C> ap) {
- attributeDecls.put( ap.getXmlName().getLocalPart(), ap );
- addDependencyTo(ap.getTarget().getTypeName());
- }
-
- public void addGlobalElement(TypeRef<T,C> tref) {
- elementDecls.put( tref.getTagName().getLocalPart(), new ElementWithType(false,tref.getTarget()) );
- addDependencyTo(tref.getTarget().getTypeName());
- }
-
- @Override
- public String toString() {
- StringBuilder buf = new StringBuilder();
- buf.append("[classes=").append(classes);
- buf.append(",elementDecls=").append(elementDecls);
- buf.append(",enums=").append(enums);
- buf.append("]");
- return super.toString();
- }
-
- /**
- * Represents a global element declaration to be written.
- *
- * <p>
- * Because multiple properties can name the same global element even if
- * they have different Java type, the schema generator first needs to
- * walk through the model and decide what to generate for the given
- * element declaration.
- *
- * <p>
- * This class represents what will be written, and its {@link #equals(Object)}
- * method is implemented in such a way that two identical declarations
- * are considered as the same.
- */
- abstract class ElementDeclaration {
- /**
- * Returns true if two {@link ElementDeclaration}s are representing
- * the same schema fragment.
- */
- @Override
- public abstract boolean equals(Object o);
- @Override
- public abstract int hashCode();
-
- /**
- * Generates the declaration.
- */
- public abstract void writeTo(String localName, Schema schema);
- }
-
- /**
- * {@link ElementDeclaration} that refers to a {@link NonElement}.
- */
- class ElementWithType extends ElementDeclaration {
- private final boolean nillable;
- private final NonElement<T,C> type;
-
- public ElementWithType(boolean nillable,NonElement<T, C> type) {
- this.type = type;
- this.nillable = nillable;
- }
-
- public void writeTo(String localName, Schema schema) {
- TopLevelElement e = schema.element().name(localName);
- if(nillable)
- e.nillable(true);
- if (type != null) {
- writeTypeRef(e,type, "type");
- } else {
- e.complexType(); // refer to the nested empty complex type
- }
- e.commit();
- }
-
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- final ElementWithType that = (ElementWithType) o;
- return type.equals(that.type);
- }
-
- public int hashCode() {
- return type.hashCode();
- }
- }
- }
-
- /**
- * Examine the specified element ref and determine if a swaRef attribute needs to be generated
- * @param typeRef
- */
- private boolean generateSwaRefAdapter(NonElementRef<T,C> typeRef) {
- return generateSwaRefAdapter(typeRef.getSource());
- }
-
- /**
- * Examine the specified element ref and determine if a swaRef attribute needs to be generated
- */
- private boolean generateSwaRefAdapter(PropertyInfo<T,C> prop) {
- final Adapter<T,C> adapter = prop.getAdapter();
- if (adapter == null) return false;
- final Object o = navigator.asDecl(SwaRefAdapter.class);
- if (o == null) return false;
- return (o.equals(adapter.adapterType));
- }
-
- /**
- * Debug information of what's in this {@link XmlSchemaGenerator}.
- */
- @Override
- public String toString() {
- StringBuilder buf = new StringBuilder();
- for (Namespace ns : namespaces.values()) {
- if(buf.length()>0) buf.append(',');
- buf.append(ns.uri).append('=').append(ns);
- }
- return super.toString()+'['+buf+']';
- }
-
- /**
- * return the string representation of the processContents mode of the
- * give wildcard, or null if it is the schema default "strict"
- *
- */
- private static String getProcessContentsModeName(WildcardMode wc) {
- switch(wc) {
- case LAX:
- case SKIP:
- return wc.name().toLowerCase();
- case STRICT:
- return null;
- default:
- throw new IllegalStateException();
- }
- }
-
-
- /**
- * Relativizes a URI by using another URI (base URI.)
- *
- * <p>
- * For example, {@code relative("http://www.sun.com/abc/def","http://www.sun.com/pqr/stu") => "../abc/def"}
- *
- * <p>
- * This method only works on hierarchical URI's, not opaque URI's (refer to the
- * <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/URI.html">java.net.URI</a>
- * javadoc for complete definitions of these terms.
- *
- * <p>
- * This method will not normalize the relative URI.
- *
- * @return the relative URI or the original URI if a relative one could not be computed
- */
- protected static String relativize(String uri, String baseUri) {
- try {
- assert uri!=null;
-
- if(baseUri==null) return uri;
-
- URI theUri = new URI(escapeURI(uri));
- URI theBaseUri = new URI(escapeURI(baseUri));
-
- if (theUri.isOpaque() || theBaseUri.isOpaque())
- return uri;
-
- if (!equalsIgnoreCase(theUri.getScheme(), theBaseUri.getScheme()) ||
- !equal(theUri.getAuthority(), theBaseUri.getAuthority()))
- return uri;
-
- String uriPath = theUri.getPath();
- String basePath = theBaseUri.getPath();
-
- // normalize base path
- if (!basePath.endsWith("/")) {
- basePath = normalizeUriPath(basePath);
- }
-
- if( uriPath.equals(basePath))
- return ".";
-
- String relPath = calculateRelativePath(uriPath, basePath, fixNull(theUri.getScheme()).equals("file"));
-
- if (relPath == null)
- return uri; // recursion found no commonality in the two uris at all
- StringBuilder relUri = new StringBuilder();
- relUri.append(relPath);
- if (theUri.getQuery() != null)
- relUri.append('?').append(theUri.getQuery());
- if (theUri.getFragment() != null)
- relUri.append('#').append(theUri.getFragment());
-
- return relUri.toString();
- } catch (URISyntaxException e) {
- throw new InternalError("Error escaping one of these uris:\n\t"+uri+"\n\t"+baseUri);
- }
- }
-
- private static String fixNull(String s) {
- if(s==null) return "";
- else return s;
- }
-
- private static String calculateRelativePath(String uri, String base, boolean fileUrl) {
- // if this is a file URL (very likely), and if this is on a case-insensitive file system,
- // then treat it accordingly.
- boolean onWindows = File.pathSeparatorChar==';';
-
- if (base == null) {
- return null;
- }
- if ((fileUrl && onWindows && startsWithIgnoreCase(uri,base)) || uri.startsWith(base)) {
- return uri.substring(base.length());
- } else {
- return "../" + calculateRelativePath(uri, getParentUriPath(base), fileUrl);
- }
- }
-
- private static boolean startsWithIgnoreCase(String s, String t) {
- return s.toUpperCase().startsWith(t.toUpperCase());
- }
-
- /**
- * JAX-RPC wants the namespaces to be sorted in the reverse order
- * so that the empty namespace "" comes to the very end. Don't ask me why.
- */
- private static final Comparator<String> NAMESPACE_COMPARATOR = new Comparator<String>() {
- public int compare(String lhs, String rhs) {
- return -lhs.compareTo(rhs);
- }
- };
-
- private static final String newline = "\n";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/Bindings.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/Bindings.java
deleted file mode 100644
index 650775f5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/Bindings.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.episode;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-@XmlElement("bindings")
-public interface Bindings extends TypedXmlWriter {
- /**
- * Nested bindings.
- */
- @XmlElement
- Bindings bindings();
-
- /**
- * Nested class customization.
- */
- @XmlElement("class")
- Klass klass();
-
- /**
- * Nested typesafeEnumClass customization
- */
- Klass typesafeEnumClass();
-
- @XmlElement
- SchemaBindings schemaBindings();
-
- @XmlAttribute
- void scd(String scd);
-
- @XmlAttribute
- void version(String v);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/Klass.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/Klass.java
deleted file mode 100644
index e9f232a8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/Klass.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.episode;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface Klass extends TypedXmlWriter {
- /**
- * FQCN.
- */
- @XmlAttribute
- void ref(String className);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/Package.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/Package.java
deleted file mode 100644
index 174583bd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/Package.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.episode;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-
-public interface Package extends TypedXmlWriter{
-
- @XmlAttribute
- void name(String packageName);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/SchemaBindings.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/SchemaBindings.java
deleted file mode 100644
index b5ccec88..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/SchemaBindings.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.episode;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface SchemaBindings extends TypedXmlWriter {
- @XmlAttribute
- void map(boolean value);
-
- @XmlElement("package")
- Package _package();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/package-info.java
deleted file mode 100644
index 5b8694f6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/episode/package-info.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * TXW interfaces for writing episode file, which is what XJC needs to
- * handle separate compilation.
- */
-@XmlNamespace(WellKnownNamespace.JAXB)
-package com.sun.xml.internal.bind.v2.schemagen.episode;
-
-import com.sun.xml.internal.txw2.annotation.XmlNamespace;
-import com.sun.xml.internal.bind.v2.WellKnownNamespace;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/package-info.java
deleted file mode 100644
index a0ece9c8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/package-info.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * Schema generator.
- *
- * This package hosts the code that generates schemas from
- * {@link TypeInfoSet} (without the user interface.)
- */
-package com.sun.xml.internal.bind.v2.schemagen;
-
-import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Annotated.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Annotated.java
deleted file mode 100644
index c60dde2d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Annotated.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface Annotated
- extends TypedXmlWriter
-{
-
-
- @XmlElement
- public Annotation annotation();
-
- @XmlAttribute
- public Annotated id(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Annotation.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Annotation.java
deleted file mode 100644
index 795f1257..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Annotation.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("annotation")
-public interface Annotation
- extends TypedXmlWriter
-{
-
-
- @XmlElement
- public Appinfo appinfo();
-
- @XmlElement
- public Documentation documentation();
-
- @XmlAttribute
- public Annotation id(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Any.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Any.java
deleted file mode 100644
index 7df5329c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Any.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("any")
-public interface Any
- extends Occurs, Wildcard, TypedXmlWriter
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Appinfo.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Appinfo.java
deleted file mode 100644
index b31d3092..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Appinfo.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("appinfo")
-public interface Appinfo
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute
- public Appinfo source(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/AttrDecls.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/AttrDecls.java
deleted file mode 100644
index 53c7ec26..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/AttrDecls.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface AttrDecls
- extends TypedXmlWriter
-{
-
-
- @XmlElement
- public LocalAttribute attribute();
-
- @XmlElement
- public Wildcard anyAttribute();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/AttributeType.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/AttributeType.java
deleted file mode 100644
index 4e0e2f6c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/AttributeType.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface AttributeType
- extends SimpleTypeHost, TypedXmlWriter
-{
-
-
- @XmlAttribute
- public AttributeType type(QName value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexContent.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexContent.java
deleted file mode 100644
index 33eddd83..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexContent.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("complexContent")
-public interface ComplexContent
- extends Annotated, TypedXmlWriter
-{
-
-
- @XmlElement
- public ComplexExtension extension();
-
- @XmlElement
- public ComplexRestriction restriction();
-
- @XmlAttribute
- public ComplexContent mixed(boolean value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexExtension.java
deleted file mode 100644
index b141601d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexExtension.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("extension")
-public interface ComplexExtension
- extends AttrDecls, ExtensionType, TypeDefParticle, TypedXmlWriter
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexRestriction.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexRestriction.java
deleted file mode 100644
index 7919fc43..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexRestriction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("restriction")
-public interface ComplexRestriction
- extends Annotated, AttrDecls, TypeDefParticle, TypedXmlWriter
-{
-
-
- @XmlAttribute
- public ComplexRestriction base(QName value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexType.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexType.java
deleted file mode 100644
index cda5e014..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexType.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("complexType")
-public interface ComplexType
- extends Annotated, ComplexTypeModel, TypedXmlWriter
-{
-
-
- @XmlAttribute("final")
- public ComplexType _final(String[] value);
-
- @XmlAttribute("final")
- public ComplexType _final(String value);
-
- @XmlAttribute
- public ComplexType block(String[] value);
-
- @XmlAttribute
- public ComplexType block(String value);
-
- @XmlAttribute("abstract")
- public ComplexType _abstract(boolean value);
-
- @XmlAttribute
- public ComplexType name(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexTypeHost.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexTypeHost.java
deleted file mode 100644
index e0d02068..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexTypeHost.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface ComplexTypeHost
- extends TypeHost, TypedXmlWriter
-{
-
-
- @XmlElement
- public ComplexType complexType();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexTypeModel.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexTypeModel.java
deleted file mode 100644
index dc8493ca..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ComplexTypeModel.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface ComplexTypeModel
- extends AttrDecls, TypeDefParticle, TypedXmlWriter
-{
-
-
- @XmlElement
- public SimpleContent simpleContent();
-
- @XmlElement
- public ComplexContent complexContent();
-
- @XmlAttribute
- public ComplexTypeModel mixed(boolean value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ContentModelContainer.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ContentModelContainer.java
deleted file mode 100644
index ebbd3fc8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ContentModelContainer.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * Used to write a content model.
- *
- * This mixes the particle and model group as the child of complex type.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface ContentModelContainer extends TypedXmlWriter {
- @XmlElement
- LocalElement element();
-
- @XmlElement
- Any any();
-
- @XmlElement
- ExplicitGroup all();
-
- @XmlElement
- ExplicitGroup sequence();
-
- @XmlElement
- ExplicitGroup choice();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Documentation.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Documentation.java
deleted file mode 100644
index f8abb212..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Documentation.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("documentation")
-public interface Documentation
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute
- public Documentation source(String value);
-
- @XmlAttribute(ns = "http://www.w3.org/XML/1998/namespace")
- public Documentation lang(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Element.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Element.java
deleted file mode 100644
index 29ea473a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Element.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface Element
- extends Annotated, ComplexTypeHost, FixedOrDefault, SimpleTypeHost, TypedXmlWriter
-{
-
-
- @XmlAttribute
- public Element type(QName value);
-
- @XmlAttribute
- public Element block(String[] value);
-
- @XmlAttribute
- public Element block(String value);
-
- @XmlAttribute
- public Element nillable(boolean value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ExplicitGroup.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ExplicitGroup.java
deleted file mode 100644
index 60b324a9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ExplicitGroup.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface ExplicitGroup
- extends Annotated, NestedParticle, Occurs, TypedXmlWriter
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ExtensionType.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ExtensionType.java
deleted file mode 100644
index 145fcb6f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/ExtensionType.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface ExtensionType
- extends Annotated, TypedXmlWriter
-{
-
-
- @XmlAttribute
- public ExtensionType base(QName value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/FixedOrDefault.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/FixedOrDefault.java
deleted file mode 100644
index 5e47900a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/FixedOrDefault.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface FixedOrDefault
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute("default")
- public FixedOrDefault _default(String value);
-
- @XmlAttribute
- public FixedOrDefault fixed(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Import.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Import.java
deleted file mode 100644
index d842c031..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Import.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("import")
-public interface Import
- extends Annotated, TypedXmlWriter
-{
-
-
- @XmlAttribute
- public Import namespace(String value);
-
- @XmlAttribute
- public Import schemaLocation(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/List.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/List.java
deleted file mode 100644
index 8cf2dafb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/List.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("list")
-public interface List
- extends Annotated, SimpleTypeHost, TypedXmlWriter
-{
-
-
- @XmlAttribute
- public List itemType(QName value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/LocalAttribute.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/LocalAttribute.java
deleted file mode 100644
index 6aab764d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/LocalAttribute.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("attribute")
-public interface LocalAttribute
- extends Annotated, AttributeType, FixedOrDefault, TypedXmlWriter
-{
-
-
- @XmlAttribute
- public LocalAttribute form(String value);
-
- @XmlAttribute
- public LocalAttribute name(String value);
-
- @XmlAttribute
- public LocalAttribute ref(QName value);
-
- @XmlAttribute
- public LocalAttribute use(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/LocalElement.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/LocalElement.java
deleted file mode 100644
index 277b127f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/LocalElement.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("element")
-public interface LocalElement
- extends Element, Occurs, TypedXmlWriter
-{
-
-
- @XmlAttribute
- public LocalElement form(String value);
-
- @XmlAttribute
- public LocalElement name(String value);
-
- @XmlAttribute
- public LocalElement ref(QName value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/NestedParticle.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/NestedParticle.java
deleted file mode 100644
index 3a03e478..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/NestedParticle.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface NestedParticle
- extends TypedXmlWriter
-{
-
-
- @XmlElement
- public LocalElement element();
-
- @XmlElement
- public Any any();
-
- @XmlElement
- public ExplicitGroup sequence();
-
- @XmlElement
- public ExplicitGroup choice();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/NoFixedFacet.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/NoFixedFacet.java
deleted file mode 100644
index 0f357fa4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/NoFixedFacet.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface NoFixedFacet
- extends Annotated, TypedXmlWriter
-{
-
-
- @XmlAttribute
- public NoFixedFacet value(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Occurs.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Occurs.java
deleted file mode 100644
index a1a06dca..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Occurs.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface Occurs
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute
- public Occurs minOccurs(int value);
-
- @XmlAttribute
- public Occurs maxOccurs(String value);
-
- @XmlAttribute
- public Occurs maxOccurs(int value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Particle.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Particle.java
deleted file mode 100644
index 36d68ee2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Particle.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public interface Particle extends ContentModelContainer, Occurs {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Redefinable.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Redefinable.java
deleted file mode 100644
index 6f1efab7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Redefinable.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface Redefinable
- extends ComplexTypeHost, SimpleTypeHost, TypedXmlWriter
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Schema.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Schema.java
deleted file mode 100644
index d69edfff..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Schema.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("schema")
-public interface Schema
- extends SchemaTop, TypedXmlWriter
-{
-
-
- @XmlElement
- public Annotation annotation();
-
- @XmlElement("import")
- public Import _import();
-
- @XmlAttribute
- public Schema targetNamespace(String value);
-
- @XmlAttribute(ns = "http://www.w3.org/XML/1998/namespace")
- public Schema lang(String value);
-
- @XmlAttribute
- public Schema id(String value);
-
- @XmlAttribute
- public Schema elementFormDefault(String value);
-
- @XmlAttribute
- public Schema attributeFormDefault(String value);
-
- @XmlAttribute
- public Schema blockDefault(String[] value);
-
- @XmlAttribute
- public Schema blockDefault(String value);
-
- @XmlAttribute
- public Schema finalDefault(String[] value);
-
- @XmlAttribute
- public Schema finalDefault(String value);
-
- @XmlAttribute
- public Schema version(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SchemaTop.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SchemaTop.java
deleted file mode 100644
index 636aa269..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SchemaTop.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface SchemaTop
- extends Redefinable, TypedXmlWriter
-{
-
-
- @XmlElement
- public TopLevelAttribute attribute();
-
- @XmlElement
- public TopLevelElement element();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleContent.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleContent.java
deleted file mode 100644
index b8c4d680..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleContent.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("simpleContent")
-public interface SimpleContent
- extends Annotated, TypedXmlWriter
-{
-
-
- @XmlElement
- public SimpleExtension extension();
-
- @XmlElement
- public SimpleRestriction restriction();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleDerivation.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleDerivation.java
deleted file mode 100644
index 9f5eed6d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleDerivation.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface SimpleDerivation
- extends TypedXmlWriter
-{
-
-
- @XmlElement
- public SimpleRestriction restriction();
-
- @XmlElement
- public Union union();
-
- @XmlElement
- public List list();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleExtension.java
deleted file mode 100644
index 5ee557f6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleExtension.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("extension")
-public interface SimpleExtension
- extends AttrDecls, ExtensionType, TypedXmlWriter
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleRestriction.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleRestriction.java
deleted file mode 100644
index 84027ac2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleRestriction.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("restriction")
-public interface SimpleRestriction
- extends Annotated, AttrDecls, SimpleRestrictionModel, TypedXmlWriter
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleRestrictionModel.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleRestrictionModel.java
deleted file mode 100644
index 04c2d42c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleRestrictionModel.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface SimpleRestrictionModel
- extends SimpleTypeHost, TypedXmlWriter
-{
-
-
- @XmlAttribute
- public SimpleRestrictionModel base(QName value);
-
- @XmlElement
- public NoFixedFacet enumeration();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleType.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleType.java
deleted file mode 100644
index 2fed7d4e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleType.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("simpleType")
-public interface SimpleType
- extends Annotated, SimpleDerivation, TypedXmlWriter
-{
-
-
- @XmlAttribute("final")
- public SimpleType _final(String value);
-
- @XmlAttribute("final")
- public SimpleType _final(String[] value);
-
- @XmlAttribute
- public SimpleType name(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleTypeHost.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleTypeHost.java
deleted file mode 100644
index 1957ec4a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/SimpleTypeHost.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface SimpleTypeHost
- extends TypeHost, TypedXmlWriter
-{
-
-
- @XmlElement
- public SimpleType simpleType();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TopLevelAttribute.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TopLevelAttribute.java
deleted file mode 100644
index 324029f3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TopLevelAttribute.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("attribute")
-public interface TopLevelAttribute
- extends Annotated, AttributeType, FixedOrDefault, TypedXmlWriter
-{
-
-
- @XmlAttribute
- public TopLevelAttribute name(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TopLevelElement.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TopLevelElement.java
deleted file mode 100644
index ad737c62..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TopLevelElement.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("element")
-public interface TopLevelElement
- extends Element, TypedXmlWriter
-{
-
-
- @XmlAttribute("final")
- public TopLevelElement _final(String[] value);
-
- @XmlAttribute("final")
- public TopLevelElement _final(String value);
-
- @XmlAttribute("abstract")
- public TopLevelElement _abstract(boolean value);
-
- @XmlAttribute
- public TopLevelElement substitutionGroup(QName value);
-
- @XmlAttribute
- public TopLevelElement name(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TypeDefParticle.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TypeDefParticle.java
deleted file mode 100644
index 9b826fb0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TypeDefParticle.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface TypeDefParticle
- extends TypedXmlWriter
-{
-
-
- @XmlElement
- public ExplicitGroup all();
-
- @XmlElement
- public ExplicitGroup sequence();
-
- @XmlElement
- public ExplicitGroup choice();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TypeHost.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TypeHost.java
deleted file mode 100644
index a3443ac8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/TypeHost.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface TypeHost
- extends TypedXmlWriter
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Union.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Union.java
deleted file mode 100644
index 077895db..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Union.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-@XmlElement("union")
-public interface Union
- extends Annotated, SimpleTypeHost, TypedXmlWriter
-{
-
-
- @XmlAttribute
- public Union memberTypes(QName[] value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Wildcard.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Wildcard.java
deleted file mode 100644
index 37a49e07..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/Wildcard.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.schemagen.xmlschema;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-
-/**
- * <p><b>
- * Auto-generated, do not edit.
- * </b></p>
- */
-public interface Wildcard
- extends Annotated, TypedXmlWriter
-{
-
-
- @XmlAttribute
- public Wildcard processContents(String value);
-
- @XmlAttribute
- public Wildcard namespace(String[] value);
-
- @XmlAttribute
- public Wildcard namespace(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.java
deleted file mode 100644
index 090d9185..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package-info.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-@com.sun.xml.internal.txw2.annotation.XmlNamespace("http://www.w3.org/2001/XMLSchema")
-package com.sun.xml.internal.bind.v2.schemagen.xmlschema;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package.html b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package.html
deleted file mode 100644
index d937c7c9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/package.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-
-
-<body>
-XML Schema writer generated by TXW.
-</body>
-</html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/xmlschema-for-jaxb.rng b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/xmlschema-for-jaxb.rng
deleted file mode 100644
index 245778df..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/xmlschema/xmlschema-for-jaxb.rng
+++ /dev/null
@@ -1,1579 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<grammar xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
- ns="http://www.w3.org/2001/XMLSchema"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:doc="http://www.jenitennison.com/doc"
- xmlns:txw="http://java.sun.com/txw">
-
-<doc:p>
- RELAX NG schema for XML Schema by <doc:link
- href="mailto:mail@jenitennison.com">Jeni Tennison</doc:link>. Based on
- <doc:link href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">XML
- Schema Part I: Structures Recommendation</doc:link> and <doc:link
- href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">XML Schema Part
- II: Datatypes</doc:link>.
-</doc:p>
-<doc:changes date="2001-11-24">
- <doc:p>
- Amended to comply with 10 August 2001 Tutorial.
- </doc:p>
- <doc:change>Removed key attributes.</doc:change>
- <doc:change>Replaced not element with except elements.</doc:change>
- <doc:change>
- Replaced multiple consecutive optional attributes to use the
- zeroOrMore/choice pattern.
- </doc:change>
- <doc:change>
- Removed interleave elements inside list elements (which are no longer
- permitted).
- </doc:change>
-</doc:changes>
-
-<define name="openAttrs" txw:mode="inherit">
- <doc:p>
- This allows any number of attributes that are not in the XML Schema
- namespace or are in no namespace. This is somewhat more complicated than
- the XML Schema anyAttribute equivalent.
- </doc:p>
- <!-- KK don't care -->
- <empty/>
- <!--zeroOrMore>
- <attribute>
- <anyName>
- <except>
- <nsName />
- <nsName ns="" />
- <name>xml:lang</name>
- </except>
- </anyName>
- <text />
- </attribute>
- </zeroOrMore-->
-</define>
-
-<define name="annotated" txw:mode="inherit">
- <doc:p>
- This allows any number of attributes that are not in the XML Schema
- namespace or are in no namespace, an optional id attribute of type ID,
- and an optional annotation element. This is used as the basis for many
- element content models.
- </doc:p>
- <ref name="openAttrs" />
- <optional>
- <attribute name="id">
- <data type="ID" />
- </attribute>
- </optional>
- <optional>
- <ref name="annotation" />
- </optional>
-</define>
-
-<define name="schemaTop" txw:mode="inline">
- <doc:p>
- This gives the content model of the top level of the schema.
- </doc:p>
- <choice>
- <ref name="redefinable" />
- <ref name="topLevelElement" />
- <ref name="topLevelAttribute" />
- <!--ref name="notation" /-->
- </choice>
-</define>
-
-<define name="redefinable" txw:mode="inline">
- <doc:p>
- This gives the components that can be redefined within the redefine
- element. They also occur at the top level of the schema.
- </doc:p>
- <choice>
- <ref name="simpleTypeHost" />
- <ref name="complexTypeHost" />
- <!--ref name="namedGroup" />
- <ref name="namedAttributeGroup" /-->
- </choice>
-</define>
-
-<define name="formChoice">
- <doc:p>
- This gives the values for the various form attributes:
- elementFormDefault and attributeFormDefault on the schema element, and
- the form attributes on the element and attribute elements.
- </doc:p>
- <choice>
- <value>qualified</value>
- <value>unqualified</value>
- </choice>
-</define>
-
-<!-- KK: merge the two -->
-<define name="reducedDerivationControl">
- <doc:p>
- This gives the values that can be taken in the lists used to control
- derivation by extension or restriction (this is 'reduced' derivation
- because some derivation can involve substitution). This RELAX NG schema,
- like the XML Schema Recommendation here, allows the keywords 'extension' and
- 'restriction' to be repeated any number of times.
- </doc:p>
- <list>
- <oneOrMore>
- <choice>
- <value>extension</value>
- <value>restriction</value>
- </choice>
- </oneOrMore>
- </list>
-</define>
-
-<define name="derivationSet">
- <doc:p>
- This specifies the possible values for attributes that control derivation.
- </doc:p>
- <choice>
- <value>#all</value>
- <ref name="reducedDerivationControl" />
- </choice>
-</define>
-
-<start>
- <doc:p>
- This is the beginning point for the schema, and defines the schema
- element.
- </doc:p>
- <element name="schema"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-schema">
- <ref name="openAttrs" />
- <zeroOrMore>
- <choice>
- <attribute name="version">
- <data type="token" />
- </attribute>
- <attribute name="finalDefault">
- <ref name="derivationSet" />
- </attribute>
- <attribute name="blockDefault">
- <ref name="blockSet" />
- </attribute>
- <attribute name="attributeFormDefault">
- <ref name="formChoice" />
- </attribute>
- <attribute name="elementFormDefault">
- <ref name="formChoice" />
- </attribute>
- <attribute name="id">
- <data type="ID" />
- </attribute>
- <attribute name="xml:lang">
- <data type="language" />
- </attribute>
- <attribute name="targetNamespace">
- <data type="anyURI" />
- </attribute>
- </choice>
- </zeroOrMore>
- <zeroOrMore>
- <choice>
- <!--ref name="include" /-->
- <ref name="import" />
- <!--ref name="redefine" /-->
- <ref name="annotation" />
- </choice>
- </zeroOrMore>
- <zeroOrMore>
- <choice>
- <ref name="schemaTop" />
- <ref name="annotation" />
- </choice>
- </zeroOrMore>
- </element>
-</start>
-
-<define name="allNNI">
- <doc:p>
- This gives the value type for the maxOccurs attribute, which may be a
- non-negative number or the keyword 'unbounded'.
- </doc:p>
- <choice>
- <data type="nonNegativeInteger" />
- <value type="token">unbounded</value>
- </choice>
-</define>
-
-<define name="occurs" txw:mode="inherit">
- <doc:p>
- This specifies the occurs attributes, minOccurs and maxOccurs, as they
- are normally used.
- </doc:p>
- <zeroOrMore>
- <choice>
- <attribute name="minOccurs">
- <data type="nonNegativeInteger" />
- </attribute>
- <attribute name="maxOccurs">
- <ref name="allNNI" />
- </attribute>
- </choice>
- </zeroOrMore>
-</define>
-
-<define name="typeDefParticle" txw:mode="inline">
- <doc:p>
- This gives the possible content of complex types.
- </doc:p>
- <choice>
- <!--ref name="groupRef" /-->
- <ref name="all" />
- <ref name="choice" />
- <ref name="sequence" />
- </choice>
-</define>
-
-<define name="nestedParticle" txw:mode="inline">
- <doc:p>
- This gives the particles that can make up a model group.
- </doc:p>
- <choice>
- <ref name="localElement" />
- <!--ref name="groupRef" /-->
- <ref name="choice" />
- <ref name="sequence" />
- <ref name="any" />
- </choice>
-</define>
-
-<define name="fixedOrDefault" txw:mode="inline">
- <doc:p>
- This specifies the relationship between fixed and default attributes on
- element and attribute elements - if one is present, then the other cannot
- be. This is a constraint that cannot be specified using XML Schema.
- </doc:p>
- <choice>
- <empty />
- <attribute name="fixed" />
- <attribute name="default" />
- </choice>
-</define>
-
-<define name="attributeType" txw:mode="inherit">
- <doc:p>
- This specifies the relationship between the type attribute and the
- simpleType element child of attribute elements - if one is present, then
- the other cannot be, although it is possible for neither to be allowed.
- </doc:p>
- <choice>
- <empty />
- <attribute name="type">
- <data type="QName" />
- </attribute>
- <ref name="simpleTypeHost" />
- </choice>
-</define>
-
-<define name="localAttribute">
- <doc:p>
- This describes attribute elements when used in a local context. They
- have an optional use attribute, possibly a fixed or default attribute,
- and then can either have a ref attribute (referring to a top-level
- attribute) or a name attribute with an optional form attribute and
- specifying an attribute type.
- </doc:p>
- <element name="attribute"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-attribute">
- <ref name="annotated" />
- <optional>
- <attribute name="use">
- <choice>
- <value type="token">optional</value>
- <value type="token">prohibited</value>
- <value type="token">required</value>
- </choice>
- </attribute>
- </optional>
- <ref name="fixedOrDefault" />
- <choice>
- <attribute name="ref">
- <data type="QName" />
- </attribute>
- <group>
- <attribute name="name">
- <data type="NCName" />
- </attribute>
- <optional>
- <attribute name="form">
- <ref name="formChoice" />
- </attribute>
- </optional>
- <ref name="attributeType" />
- </group>
- </choice>
- </element>
-</define>
-
-<define name="topLevelAttribute">
- <doc:p>
- This describes attribute elements when used at the top level of the
- schema. They must have a name, may have a fixed or default attribute,
- and specify their type through a type attribute or child simpleType
- element. The name attribute of each attribute element that appears at
- the top level of the schema is unique.
- </doc:p>
- <element name="attribute"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-attribute">
- <ref name="annotated" />
- <attribute name="name">
- <data type="NCName" />
- </attribute>
- <ref name="fixedOrDefault" />
- <ref name="attributeType" />
- </element>
-</define>
-
-<define name="attrDecls" txw:mode="inherit">
- <doc:p>
- This gives the model group for specifying the attributes in a complex
- type, an extension or restriction.
- </doc:p>
- <zeroOrMore>
- <choice>
- <ref name="localAttribute" />
- <!--ref name="attributeGroupRef" /-->
- </choice>
- </zeroOrMore>
- <optional>
- <ref name="anyAttribute" />
- </optional>
-</define>
-
-<define name="anyAttribute">
- <doc:p>
- This specifies the anyAttribute wildcard.
- </doc:p>
- <element name="anyAttribute"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-anyAttribute">
- <ref name="wildcard" />
- </element>
-</define>
-
-<define name="complexTypeModel" txw:mode="inherit">
- <doc:p>
- This specifies the content of a complexType element. As children, it can
- have a simpleContent, a complexContent or a model group. Only if it has
- one of the latter two, may it have a mixed attribute. This latter
- constraint is something that cannot be specified in XML Schema.
- </doc:p>
- <choice>
- <ref name="simpleContent" />
- <group>
- <optional>
- <attribute name="mixed">
- <data type="boolean" />
- </attribute>
- </optional>
- <choice>
- <ref name="complexContent" />
- <group>
- <optional>
- <ref name="typeDefParticle" />
- </optional>
- <ref name="attrDecls" />
- </group>
- </choice>
- </group>
- </choice>
-</define>
-
-<define name="complexTypeHost" txw:mode="inherit">
- <ref name="typeHost" />
- <ref name="complexType" />
-</define>
-
-<define name="typeHost" txw:mode="inherit"><empty/><empty/></define>
-
-<define name="complexType" txw:mode="inherit">
- <element name="complexType"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-complexType">
- <doc:p>
- This specifies the basic content of a complexType element.
- </doc:p>
- <ref name="annotated" />
- <ref name="complexTypeModel" />
- <optional>
- <attribute name="name">
- <data type="NCName" />
- </attribute>
- </optional>
- <zeroOrMore>
- <choice>
- <attribute name="abstract">
- <data type="boolean" />
- </attribute>
- <attribute name="block">
- <ref name="derivationSet" />
- </attribute>
- <attribute name="final">
- <ref name="derivationSet" />
- </attribute>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="complexRestriction">
- <doc:p>
- This describes a restriction element within a complexContent element
- (i.e. one that restricts a complex type). It has a base attribute, may
- contain a model group and may contain attribute declarations of various
- sorts.
- </doc:p>
- <element name="restriction"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-complexContent::restriction">
- <ref name="annotated" />
- <attribute name="base">
- <data type="QName" />
- </attribute>
- <optional>
- <ref name="typeDefParticle" />
- </optional>
- <ref name="attrDecls" />
- </element>
-</define>
-
-<define name="extensionType">
- <doc:p>
- This specifies the basic model for an extension element: adding a
- required base attribute to the model used for most components.
- </doc:p>
- <ref name="annotated" />
- <attribute name="base">
- <data type="QName" />
- </attribute>
-</define>
-
-<define name="complexExtension">
- <doc:p>
- This describes an extension element within a complexContent element
- (i.e. one that restricts a complex type). It may contain a model group
- and may contain attribute declarations of various sorts.
- </doc:p>
- <element name="extension"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-complexContent::extension">
- <ref name="extensionType" />
- <optional>
- <ref name="typeDefParticle" />
- </optional>
- <ref name="attrDecls" />
- </element>
-</define>
-
-<define name="complexContent">
- <doc:p>
- This describes a complexContent element. It may have a mixed attribute,
- and either a restriction or extension element as content.
- </doc:p>
- <element name="complexContent"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-complexContent">
- <ref name="annotated" />
- <optional>
- <attribute name="mixed">
- <data type="boolean" />
- </attribute>
- </optional>
- <choice>
- <ref name="complexRestriction" />
- <ref name="complexExtension" />
- </choice>
- </element>
-</define>
-
-<define name="simpleRestriction">
- <doc:p>
- This describes a restriction element that appears within a simpleContent
- or simpleType element (i.e. one that restricts a simple type). Its
- content follows the simple restriction model that is detailed below, and
- may include attribute declarations.
- </doc:p>
- <element name="restriction"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-simpleContent::restriction">
- <ref name="annotated" />
- <ref name="simpleRestrictionModel" />
- <ref name="attrDecls" />
- </element>
-</define>
-
-<define name="simpleExtension">
- <doc:p>
- This describes an extension element that appears within a simpleContent
- element (i.e. one that extends a simple type). Like other extensions, it
- has a base type, but it can only be used to add attributes.
- </doc:p>
- <element name="extension"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-simpleContent::extension">
- <ref name="extensionType" />
- <ref name="attrDecls" />
- </element>
-</define>
-
-<define name="simpleContent">
- <doc:p>
- This describes a simpleContent element, whose content can either hold a
- restriction or extension element.
- </doc:p>
- <element name="simpleContent"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-simpleContent">
- <ref name="annotated" />
- <choice>
- <ref name="simpleRestriction" />
- <ref name="simpleExtension" />
- </choice>
- </element>
-</define>
-
-<define name="blockSet">
- <doc:p>
- This gives the possible values for block attributes on element elements,
- which includes substitution amongst the list of possible values. This
- RELAX NG schema, like the XML Schema Recommendation, allows each of the
- keywords 'extension', 'restriction' and 'substitution' to occur more than
- once within the list.
- </doc:p>
- <choice>
- <value type="token">#all</value>
- <list>
- <oneOrMore>
- <choice>
- <value>extension</value>
- <value>restriction</value>
- <value>substitution</value>
- </choice>
- </oneOrMore>
- </list>
- </choice>
-</define>
-
-<define name="element" txw:mode="inherit">
- <doc:p>
- This describes the basic content model of an element element. It is
- annotated, may have a fixed or default attribute, and may have nillable
- and/or block attributes. Its type may be specified through a type
- attribute, a local simple type or a local complex type - the choice
- between these methods is something that cannot be indicated with XML
- Schema. This content is optionally followed by some identify constraints.
- </doc:p>
- <ref name="annotated" />
- <ref name="fixedOrDefault" />
- <zeroOrMore>
- <choice>
- <attribute name="nillable">
- <data type="boolean" />
- </attribute>
- <attribute name="block">
- <ref name="blockSet" />
- </attribute>
- </choice>
- </zeroOrMore>
- <choice>
- <empty />
- <attribute name="type">
- <data type="QName" />
- </attribute>
- <ref name="simpleTypeHost" />
- <ref name="complexTypeHost" />
- </choice>
- <!--zeroOrMore>
- <ref name="identityConstraint" />
- </zeroOrMore-->
-</define>
-
-<define name="topLevelElement">
- <doc:p>
- This describes an element element that appears at the top level of the
- schema. On top of the basic content for an element element, it has to
- have a name, which is a unique identifier in the element symbol space. It
- may have substitutionGroup, abstract and/or final attributes.
- </doc:p>
- <element name="element"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-element">
- <ref name="element" />
- <attribute name="name">
- <data type="NCName" />
- </attribute>
- <zeroOrMore>
- <choice>
- <attribute name="substitutionGroup">
- <data type="QName" />
- </attribute>
- <attribute name="abstract">
- <data type="boolean" />
- </attribute>
- <attribute name="final">
- <ref name="derivationSet" />
- </attribute>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="localElement">
- <doc:p>
- This describes an element element that appears locally, within a
- complexType or group element. It may have minOccurs and/or maxOccurs
- attributes. If it has a ref attribute, then that&apos;s all it can
- have. Otherwise, it must have a name and specifies its type in the same
- way as the basic element content model described above. It may in this
- case also have a form element. These constraints on local elements
- cannot be described within XML Schema.
- </doc:p>
- <element name="element"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-element">
- <ref name="occurs" />
- <choice>
- <attribute name="ref">
- <data type="QName" />
- </attribute>
- <group>
- <ref name="element" />
- <attribute name="name">
- <data type="NCName" />
- </attribute>
- <optional>
- <attribute name="form">
- <ref name="formChoice" />
- </attribute>
- </optional>
- </group>
- </choice>
- </element>
-</define>
-
-<!--define name="namedGroup">
- <doc:p>
- This describes an group element that appears at the top level of the
- schema. It must have a name attribute, and must have one of an all,
- choice or sequence element child.
- </doc:p>
- <element name="group"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-group">
- <ref name="annotated" />
- <attribute name="name">
- <data type="NCName" />
- </attribute>
- <choice>
- <element name="all">
- <ref name="simpleExplicitGroup" /> <!- - RS - relaxed all content model - ->
- </element>
- <element name="choice">
- <ref name="simpleExplicitGroup" />
- </element>
- <element name="sequence">
- <ref name="simpleExplicitGroup" />
- </element>
- </choice>
- </element>
-</define-->
-
-<!--define name="groupRef">
- <doc:p>
- This describes group element that occurs locally, referring to a
- top-level named group. It may have occurrence attributes, and must have
- a ref attribute.
- </doc:p>
- <element name="group"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-group">
- <ref name="annotated" />
- <ref name="occurs" />
- <attribute name="ref">
- <data type="QName" />
- </attribute>
- </element>
-</define-->
-
-<define name="explicitGroup" txw:mode="inherit">
- <doc:p>
- This gives the content of a model group (not a group element) in the
- normal run of things. It has occurrence attributes and any number of
- particles within it.
- </doc:p>
- <ref name="annotated" />
- <ref name="occurs" />
- <zeroOrMore>
- <ref name="nestedParticle" />
- </zeroOrMore>
-</define>
-
-<define name="simpleExplicitGroup">
- <doc:p>
- This gives the content of a model group (not a group element) within a
- named group - it differs from the above in that it doesn&apos;t have any
- occurrence attributes.
- </doc:p>
- <ref name="annotated" />
- <zeroOrMore>
- <ref name="nestedParticle" />
- </zeroOrMore>
-</define>
-
-<define name="all">
- <doc:p>
- This describes an all element that appears outside a named group (i.e. as
- the content of a complexType element). It has the standard model for an
- all element, but adds minOccurs and maxOccurs attributes which can only
- take certain values.
- </doc:p>
- <element name="all"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-all">
- <ref name="explicitGroup" />
- </element>
-</define>
-
-<define name="choice">
- <doc:p>
- This describes a choice element that appears outside a named group.
- </doc:p>
- <element name="choice"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-choice">
- <ref name="explicitGroup" />
- </element>
-</define>
-
-<define name="sequence">
- <doc:p>
- This describes a sequence element that appears outside a named group.
- </doc:p>
- <element name="sequence"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-sequence">
- <ref name="explicitGroup" />
- </element>
-</define>
-
-<define name="wildcard" txw:mode="inherit">
- <doc:p>
- This describes a wildcard element (i.e. any or anyAttribute). The
- namespace attribute can take a list URIs interspersed with the keywords
- '##targetNamespace' and/or '##local'. This RELAX NG schema, like the XML
- Schema Recommendation, allows the keywords to be specified more than once
- each within the list, if they&apos;re given. This model also specifies the
- processContents attribute.
- </doc:p>
- <ref name="annotated" />
- <zeroOrMore>
- <choice>
- <attribute name="namespace">
- <choice>
- <value type="token">##any</value>
- <value type="token">##other</value>
- <list>
- <zeroOrMore>
- <choice>
- <data type="anyURI" />
- <value>##targetNamespace</value>
- <value>##local</value>
- </choice>
- </zeroOrMore>
- </list>
- </choice>
- </attribute>
- <attribute name="processContents">
- <choice>
- <value type="token">lax</value>
- <value type="token">skip</value>
- <value type="token">strict</value>
- </choice>
- </attribute>
- </choice>
- </zeroOrMore>
-</define>
-
-<define name="any">
- <doc:p>
- This describes an any element as a wildcard.
- </doc:p>
- <element name="any"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-any">
- <ref name="wildcard" />
- <ref name="occurs" />
- </element>
-</define>
-
-<!--define name="namedAttributeGroup">
- <doc:p>
- This describes an attributeGroup element as it appears at the top level
- of the schema. It must have a name attribute, and then contains
- attribute declarations.
- </doc:p>
- <element name="attributeGroup"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup">
- <ref name="annotated" />
- <attribute name="name">
- <data type="NCName" />
- </attribute>
- <ref name="attrDecls" />
- </element>
-</define-->
-
-<!--define name="attributeGroupRef">
- <doc:p>
- This describes an attributeGroup element as it appears within a complex
- type. It must have a ref attribute.
- </doc:p>
- <element name="attributeGroup"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup">
- <ref name="annotated" />
- <attribute name="ref">
- <data type="QName" />
- </attribute>
- </element>
-</define-->
-
-<!--define name="include">
- <doc:p>
- This describes an include element, which must have a schemaLocation
- attribute.
- </doc:p>
- <element name="include"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-include">
- <ref name="annotated" />
- <attribute name="schemaLocation">
- <data type="anyURI" />
- </attribute>
- </element>
-</define-->
-
-<!--define name="redefine">
- <doc:p>
- This describes a redefine element, which must have a schemaLocation
- attribute and can then contain any mix of annotations and redefinable
- components.
- </doc:p>
- <element name="redefine"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-redefine">
- <ref name="openAttrs" />
- <optional>
- <attribute name="id">
- <data type="ID" />
- </attribute>
- </optional>
- <attribute name="schemaLocation">
- <data type="anyURI" />
- </attribute>
- <zeroOrMore>
- <choice>
- <ref name="annotation" />
- <ref name="redefinable" />
- </choice>
- </zeroOrMore>
- </element>
-</define-->
-
-<define name="import">
- <doc:p>
- This describes an import element that&apos;s used when its parent schema
- element specifies a targetNamespace. In these cases, the namespace
- attribute on the import element is optional.
- </doc:p>
- <element name="import"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-import">
- <ref name="annotated" />
- <optional>
- <attribute name="schemaLocation">
- <data type="anyURI" />
- </attribute>
- </optional>
- <optional>
- <attribute name="namespace">
- <data type="anyURI" />
- </attribute>
- </optional>
- </element>
-</define>
-
-<!--define name="selector">
- <doc:p>
- This describes a selector element. The xpath attribute is a simplified
- XPath - the regular expression given here is the one from the XML Schema
- for XML Schema.
- </doc:p>
- <element name="selector"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-selector">
- <ref name="annotated" />
- <attribute name="xpath">
- <data type="token">
- <param name="pattern">(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*</param>
- </data>
- </attribute>
- </element>
-</define>
-
-<define name="field">
- <doc:p>
- This describes a field element. The xpath attribute is a simplified
- XPath - the regular expression given here is the one from the XML Schema
- for XML Schema.
- </doc:p>
- <element name="field"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-field">
- <ref name="annotated" />
- <attribute name="xpath">
- <data type="token">
- <param name="pattern">(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*</param>
- </data>
- </attribute>
- </element>
-</define>
-
-<define name="keybase" txw:mode="inherit">
- <doc:p>
- This gives the basic content for identity constraints - a name attribute
- that uniquely identifies the identity constraint, a selector element and
- one or more field elements.
- </doc:p>
- <ref name="annotated" />
- <attribute name="name">
- <data type="NCName" />
- </attribute>
- <ref name="selector" />
- <oneOrMore>
- <ref name="field" />
- </oneOrMore>
-</define>
-
-<define name="identityConstraint" txw:mode="inline">
- <doc:p>
- This gives a model group for the three identity constraint elements, used
- within the content of element elements.
- </doc:p>
- <choice>
- <ref name="unique" />
- <ref name="key" />
- <ref name="keyref" />
- </choice>
-</define>
-
-<define name="unique">
- <doc:p>
- This describes a unique element.
- </doc:p>
- <element name="unique"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-unique">
- <ref name="keybase" />
- </element>
-</define>
-
-<define name="key">
- <doc:p>
- This describes a key element.
- </doc:p>
- <element name="key"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-key">
- <ref name="keybase" />
- </element>
-</define>
-
-<define name="keyref">
- <doc:p>
- This describes a keyref element.
- </doc:p>
- <element name="keyref"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-keyref">
- <ref name="keybase" />
- <attribute name="refer">
- <data type="QName" />
- </attribute>
- </element>
-</define-->
-
-<!--define name="notation">
- <doc:p>
- This describes a notation element. The names of notation elements are
- unique in the notation symbol space. The public attribute is required,
- and the system attribute is optional.
- </doc:p>
- <element name="notation"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-notation">
- <ref name="annotated" />
- <attribute name="name">
- <data type="NCName" />
- </attribute>
- <attribute name="public">
- <data type="token" />
- </attribute>
- <optional>
- <attribute name="system">
- <data type="anyURI" />
- </attribute>
- </optional>
- </element>
-</define-->
-
-<define name="appinfoContent">
- <doc:p>
- This is designed to describe the content of the appinfo elements in the
- schema. At the moment this allows any mixed content without validation.
- Note that this is fairly complex compared to the XML Schema equivalent,
- which would be a single any element.
- </doc:p>
- <ref name="anyContent" />
-</define>
-
-<define name="anyContent">
- <empty/> <!-- KK don't care -->
- <!--mixed>
- <zeroOrMore>
- <element>
- <anyName />
- <zeroOrMore>
- <attribute>
- <anyName />
- </attribute>
- </zeroOrMore>
- <ref name="anyContent" />
- <empty />
- </element>
- </zeroOrMore>
- </mixed-->
-</define>
-
-<define name="appinfo">
- <doc:p>
- This describes an appinfo element. It has an optional source attribute
- and can currently contain anything at all.
- </doc:p>
- <element name="appinfo"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-appinfo">
- <optional>
- <attribute name="source">
- <data type="anyURI" />
- </attribute>
- </optional>
- <ref name="appinfoContent" />
- </element>
-</define>
-
-<define name="documentationContent">
- <doc:p>
- This is designed to describe the content of the documentation elements in
- the schema. At the moment this allows any mixed content without
- validation. Note that this is fairly complex compared to the XML Schema
- equivalent, which would be a single any element.
- </doc:p>
- <ref name="anyContent" />
-</define>
-
-<define name="documentation">
- <doc:p>
- This describes a documentation element. It has optional source
- and xml:lang attributes and can currently contain anything at all.
- </doc:p>
- <element name="documentation"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-documentation">
- <zeroOrMore>
- <choice>
- <attribute name="source">
- <data type="anyURI" />
- </attribute>
- <attribute name="xml:lang">
- <data type="language" />
- </attribute>
- </choice>
- </zeroOrMore>
- <ref name="documentationContent" />
- </element>
-</define>
-
-<define name="annotation">
- <doc:p>
- This describes an annotation element. It can have any attributes, may
- have an id attribute, and contains any number of documentation or appinfo
- elements.
- </doc:p>
- <element name="annotation"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-annotation">
- <ref name="openAttrs" />
- <optional>
- <attribute name="id">
- <data type="ID" />
- </attribute>
- </optional>
- <zeroOrMore>
- <choice>
- <ref name="documentation" />
- <ref name="appinfo" />
- </choice>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="simpleDerivation" txw:mode="inline">
- <doc:p>
- This gives the various types of derivation of simple types.
- </doc:p>
- <choice>
- <ref name="simpleRestriction" />
- <ref name="list" />
- <ref name="union" />
- </choice>
-</define>
-
-<define name="simpleDerivationSet">
- <doc:p>
- This specifies the values of the final attribute for simple types. This
- RELAX NG schema for XML Schema, like the XML Schema Recommendation, allows
- the keywords 'list', 'union' and 'restriction' to appear more than once
- within the list.
- </doc:p>
- <choice>
- <value type="token">#all</value>
- <list>
- <zeroOrMore>
- <choice>
- <value>list</value>
- <value>union</value>
- <value>restriction</value>
- </choice>
- </zeroOrMore>
- </list>
- </choice>
-</define>
-
-<define name="simpleTypeHost" txw:mode="inherit">
- <ref name="typeHost" />
- <ref name="simpleType" />
-</define>
-
-<define name="simpleType" txw:mode="inherit">
- <doc:p>
- This gives the basic content of a simple type.
- </doc:p>
- <element name="simpleType"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-simpleType">
- <ref name="annotated" />
- <ref name="simpleDerivation" />
- <optional>
- <attribute name="name">
- <data type="NCName" />
- </attribute>
- </optional>
- <optional>
- <attribute name="final">
- <ref name="simpleDerivationSet" />
- </attribute>
- </optional>
- </element>
-</define>
-
-<!--define name="rangeFacets" txw:mode="inherit">
- <doc:p>
- This describes the relationship between the various range facets. Only
- one of minExclusive and minInclusive can be present, and only one of
- maxExclusive and maxInclusive can be present. This is a constraint that
- can&apos;t easily be expressed using XML Schema. This RELAX NG schema
- for XML Schema is a little more restrictive than the XML Schema
- Recommendation in that it also forces there to be a maximum of one of
- each of these types of facets.
- </doc:p>
- <interleave>
- <optional>
- <choice>
- <ref name="minExclusive" />
- <ref name="minInclusive" />
- </choice>
- </optional>
- <optional>
- <choice>
- <ref name="maxExclusive" />
- <ref name="maxInclusive" />
- </choice>
- </optional>
- </interleave>
-</define>
-
-<define name="digitFacets" txw:mode="inherit">
- <doc:p>
- This specifies optional totalDigits and fractionDigits elements. This
- RELAX NG schema for XML Schema is a little more restrictive than the XML
- Schema Recommendation in that it also forces there to be a maximum of one
- of each of these types of facets.
- </doc:p>
- <optional>
- <ref name="totalDigits" />
- </optional>
- <optional>
- <ref name="fractionDigits" />
- </optional>
-</define>
-
-<define name="lengthFacets" txw:mode="inherit">
- <doc:p>
- This specifies optional length, minLength and maxLength elements. This
- RELAX NG schema for XML Schema is a little more restrictive than the XML
- Schema Recommendation in that it also forces there to be a maximum of one
- of each of these types of facets, and says that if a length element is
- given, then neither minLength nor maxLength should be present.
- </doc:p>
- <choice>
- <ref name="length" />
- <interleave>
- <optional>
- <ref name="minLength" />
- </optional>
- <optional>
- <ref name="maxLength" />
- </optional>
- </interleave>
- </choice>
-</define>
-
-<define name="commonFacets" txw:mode="inherit">
- <doc:p>
- This specifies zero or more enumeration or pattern elements and an
- optional whiteSpace element. This RELAX NG schema for XML Schema is a
- little more restrictive than the XML Schema Recommendation in that it
- also forces there to be a maximum of one whiteSpace element within the
- facets. Note that the whiteSpace facet is constrained to have a value of
- 'collapse'.
- </doc:p>
- <zeroOrMore>
- <ref name="enumeration" />
- </zeroOrMore>
- <optional>
- <ref name="whiteSpaceCollapse" />
- </optional>
- <zeroOrMore>
- <ref name="pattern" />
- </zeroOrMore>
-</define-->
-
-<define name="simpleRestrictionModel">
- <doc:p>
- This specifies the types of facets that are valid in restrictions on the
- built-in data types. This can only perform rudimentary checking, but
- should be enough in most circumstances. Note that for xs:anySimpleType
- and xs:string, the whiteSpace facet can take any value, for
- xs:normalizedString it can be 'replace' or 'collapse', and for all other
- built-in types it has to be 'collapse'.
- </doc:p>
- <choice>
- <attribute name="base">
- <data type="QName" />
- </attribute>
- <ref name="simpleTypeHost" />
- </choice>
- <interleave>
- <!--ref name="rangeFacets" />
- <ref name="digitFacets" />
- <ref name="lengthFacets" />
- <optional>
- <ref name="whiteSpace" />
- </optional-->
- <zeroOrMore>
- <ref name="enumeration" />
- </zeroOrMore>
- <!--zeroOrMore>
- <ref name="pattern" />
- </zeroOrMore-->
- </interleave>
-</define>
-
-<define name="list">
- <doc:p>
- This describes a list element. It can either specify a local simple type
- or have a itemType attribute. This constraint cannot be expressed in XML
- Schema.
- </doc:p>
- <element name="list"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-list">
- <ref name="annotated" />
- <choice>
- <ref name="simpleTypeHost" />
- <attribute name="itemType">
- <data type="QName" />
- </attribute>
- </choice>
- </element>
-</define>
-
-<define name="union">
- <doc:p>
- This describes a union element. If the memberTypes attribute is missing
- or empty, then it must contain one or more simpleType elements; if
- it&apos;s present, then it can contain simpleType elements or list simple
- types in the memberTypes attribute. This constraint cannot be expressed
- in XML Schema.
- </doc:p>
- <element name="union"
- doc:href="http://www.w3.org/TR/xmlschema-1/#element-union">
- <ref name="annotated" />
- <choice>
- <group>
- <attribute name="memberTypes">
- <list>
- <oneOrMore>
- <data type="QName" />
- </oneOrMore>
- </list>
- </attribute>
- <zeroOrMore>
- <ref name="simpleTypeHost" />
- </zeroOrMore>
- </group>
- <group>
- <optional>
- <attribute name="memberTypes">
- <empty />
- </attribute>
- </optional>
- <oneOrMore>
- <ref name="simpleTypeHost" />
- </oneOrMore>
- </group>
- </choice>
- </element>
-</define>
-
-<define name="facet" txw:mode="inherit">
- <doc:p>
- This is the basic content of a facet. It has an optional fixed attribute.
- </doc:p>
- <ref name="annotated" />
- <optional>
- <attribute name="fixed">
- <data type="boolean" />
- </attribute>
- </optional>
-</define>
-
-<define name="noFixedFacet" txw:mode="inherit">
- <doc:p>
- This is the content of a facet that cannot be fixed (enumeration or
- pattern). It has a value attribute that can take any kind of value.
- </doc:p>
- <ref name="annotated" />
- <attribute name="value" />
-</define>
-
-<!--define name="rangeFacet">
- <doc:p>
- This is the content of a range facet. The value must be one of the data
- types shown (as these are the only types of data that accept ranges). I
- haven&apos;t gone so far as to indicate the data type of the value
- attribute of a range facet according to the base type as this would be
- very complicated (although it would be possible in RELAX NG).
- </doc:p>
- <ref name="facet" />
- <attribute name="value">
- <choice>
- <data type="decimal" />
- <data type="float" />
- <data type="double" />
- <data type="duration" />
- <data type="dateTime" />
- <data type="time" />
- <data type="date" />
- <data type="gYearMonth" />
- <data type="gYear" />
- <data type="gMonthDay" />
- <data type="gMonth" />
- <data type="gDay" />
- </choice>
- </attribute>
-</define>
-
-<define name="minExclusive">
- <doc:p>
- This describes a minExclusive element.
- </doc:p>
- <element name="minExclusive"
- doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-minExclusive">
- <ref name="rangeFacet" />
- </element>
-</define>
-
-<define name="minInclusive">
- <doc:p>
- This describes a minInclusive element.
- </doc:p>
- <element name="minInclusive"
- doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-minInclusive">
- <ref name="rangeFacet" />
- </element>
-</define>
-
-<define name="maxExclusive">
- <doc:p>
- This describes a maxExclusive element.
- </doc:p>
- <element name="maxExclusive"
- doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-maxExclusive">
- <ref name="rangeFacet" />
- </element>
-</define>
-
-<define name="maxInclusive">
- <doc:p>
- This describes a maxInclusive element.
- </doc:p>
- <element name="maxInclusive"
- doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-maxInclusive">
- <ref name="rangeFacet" />
- </element>
-</define>
-
-<define name="numFacet">
- <doc:p>
- This is the content of a numerical facet.
- </doc:p>
- <ref name="facet" />
- <attribute name="value">
- <data type="nonNegativeInteger" />
- </attribute>
-</define>
-
-<define name="totalDigits">
- <doc:p>
- This describes a totalDigits element. The value attribute must take a
- positive integer.
- </doc:p>
- <element name="totalDigits"
- doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-totalDigits">
- <ref name="facet" />
- <attribute name="value">
- <data type="positiveInteger" />
- </attribute>
- </element>
-</define>
-
-<define name="fractionDigits">
- <doc:p>
- This describes a fractionDigits element.
- </doc:p>
- <element name="fractionDigits"
- doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-fractionDigits">
- <ref name="numFacet" />
- </element>
-</define>
-
-<define name="length">
- <doc:p>
- This describes a length element.
- </doc:p>
- <element name="length"
- doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-length">
- <ref name="numFacet" />
- </element>
-</define>
-
-<define name="minLength">
- <doc:p>
- This describes a minLength element.
- </doc:p>
- <element name="minLength"
- doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-minLength">
- <ref name="numFacet" />
- </element>
-</define>
-
-<define name="maxLength">
- <doc:p>
- This describes a maxLength element.
- </doc:p>
- <element name="maxLength"
- doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-maxLength">
- <ref name="numFacet" />
- </element>
-</define-->
-
-<define name="enumeration">
- <doc:p>
- This describes an enumeration element.
- </doc:p>
- <element name="enumeration"
- doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-enumeration">
- <ref name="noFixedFacet" />
- </element>
-</define>
-
-<!--define name="whiteSpace">
- <doc:p>
- This describes a whiteSpace element that can take any of the permitted
- values.
- </doc:p>
- <element name="whiteSpace"
- doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-whiteSpace">
- <ref name="facet" />
- <attribute name="value">
- <choice>
- <value type="token">preserve</value>
- <value type="token">replace</value>
- <value type="token">collapse</value>
- </choice>
- </attribute>
- </element>
-</define>
-
-<define name="whiteSpaceReplaceOrCollapse">
- <doc:p>
- This describes a whiteSpace element that can only take the values
- 'replace' or 'collapse'.
- </doc:p>
- <element name="whiteSpace"
- doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-whiteSpace">
- <ref name="facet" />
- <attribute name="value">
- <choice>
- <value type="token">replace</value>
- <value type="token">collapse</value>
- </choice>
- </attribute>
- </element>
-</define>
-
-<define name="whiteSpaceCollapse">
- <doc:p>
- This describes a whiteSpace element that can only take the value
- 'collapse'.
- </doc:p>
- <element name="whiteSpace"
- doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-whiteSpace">
- <ref name="facet" />
- <attribute name="value">
- <value type="token">collapse</value>
- </attribute>
- </element>
-</define>
-
-<define name="pattern">
- <doc:p>
- This describes a pattern element.
- </doc:p>
- <element name="pattern"
- doc:href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#element-pattern">
- <ref name="noFixedFacet" />
- </element>
-</define-->
-
-</grammar>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/ByteArrayOutputStreamEx.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/ByteArrayOutputStreamEx.java
deleted file mode 100644
index f9957341..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/ByteArrayOutputStreamEx.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.util;
-
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.io.IOException;
-
-import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Base64Data;
-
-/**
- * {@link ByteArrayOutputStream} with access to its raw buffer.
- */
-public final class ByteArrayOutputStreamEx extends ByteArrayOutputStream {
- public ByteArrayOutputStreamEx() {
- }
-
- public ByteArrayOutputStreamEx(int size) {
- super(size);
- }
-
- public void set(Base64Data dt,String mimeType) {
- dt.set(buf,count,mimeType);
- }
-
- public byte[] getBuffer() {
- return buf;
- }
-
- /**
- * Reads the given {@link InputStream} completely into the buffer.
- */
- public void readFrom(InputStream is) throws IOException {
- while(true) {
- if(count==buf.length) {
- // realllocate
- byte[] data = new byte[buf.length*2];
- System.arraycopy(buf,0,data,0,buf.length);
- buf = data;
- }
-
- int sz = is.read(buf,count,buf.length-count);
- if(sz<0) return;
- count += sz;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/CollisionCheckStack.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/CollisionCheckStack.java
deleted file mode 100644
index 43a49ab4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/CollisionCheckStack.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.util;
-
-import java.util.AbstractList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Stack;
-
-/**
- * {@link Stack}-like data structure that allows the following efficient operations:
- *
- * <ol>
- * <li>Push/pop operation.
- * <li>Duplicate check. When an object that's already in the stack is pushed,
- * this class will tell you so.
- * </ol>
- *
- * <p>
- * Object equality is their identity equality.
- *
- * <p>
- * This class implements {@link List} for accessing items in the stack,
- * but {@link List} methods that alter the stack is not supported.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class CollisionCheckStack<E> extends AbstractList<E> {
- private Object[] data;
- private int[] next;
- private int size = 0;
-
- private boolean latestPushResult = false;
-
- /**
- * True if the check shall be done by using the object identity.
- * False if the check shall be done with the equals method.
- */
- private boolean useIdentity = true;
-
- // for our purpose, there isn't much point in resizing this as we don't expect
- // the stack to grow that much.
- private final int[] initialHash;
-
- public CollisionCheckStack() {
- initialHash = new int[17];
- data = new Object[16];
- next = new int[16];
- }
-
- /**
- * Set to false to use {@link Object#equals(Object)} to detect cycles.
- * This method can be only used when the stack is empty.
- */
- public void setUseIdentity(boolean useIdentity) {
- this.useIdentity = useIdentity;
- }
-
- public boolean getUseIdentity() {
- return useIdentity;
- }
-
- public boolean getLatestPushResult() {
- return latestPushResult;
- }
-
- /**
- * Pushes a new object to the stack.
- *
- * @return
- * true if this object has already been pushed
- */
- public boolean push(E o) {
- if(data.length==size)
- expandCapacity();
-
- data[size] = o;
- int hash = hash(o);
- boolean r = findDuplicate(o, hash);
- next[size] = initialHash[hash];
- initialHash[hash] = size+1;
- size++;
- this.latestPushResult = r;
- return latestPushResult;
- }
-
- /**
- * Pushes a new object to the stack without making it participate
- * with the collision check.
- */
- public void pushNocheck(E o) {
- if(data.length==size)
- expandCapacity();
- data[size] = o;
- next[size] = -1;
- size++;
- }
-
- public boolean findDuplicate(E o) {
- int hash = hash(o);
- return findDuplicate(o, hash);
- }
-
- @Override
- public E get(int index) {
- return (E)data[index];
- }
-
- @Override
- public int size() {
- return size;
- }
-
- private int hash(Object o) {
- return ((useIdentity?System.identityHashCode(o):o.hashCode())&0x7FFFFFFF) % initialHash.length;
- }
-
- /**
- * Pops an object from the stack
- */
- public E pop() {
- size--;
- Object o = data[size];
- data[size] = null; // keeping references too long == memory leak
- int n = next[size];
- if(n<0) {
- // pushed by nocheck. no need to update hash
- } else {
- int hash = hash(o);
- assert initialHash[hash]==size+1;
- initialHash[hash] = n;
- }
- return (E)o;
- }
-
- /**
- * Returns the top of the stack.
- */
- public E peek() {
- return (E)data[size-1];
- }
-
- private boolean findDuplicate(E o, int hash) {
- int p = initialHash[hash];
- while(p!=0) {
- p--;
- Object existing = data[p];
- if (useIdentity) {
- if(existing==o) return true;
- } else {
- if (o.equals(existing)) return true;
- }
- p = next[p];
- }
- return false;
- }
-
- private void expandCapacity() {
- int oldSize = data.length;
- int newSize = oldSize * 2;
- Object[] d = new Object[newSize];
- int[] n = new int[newSize];
-
- System.arraycopy(data,0,d,0,oldSize);
- System.arraycopy(next,0,n,0,oldSize);
-
- data = d;
- next = n;
- }
-
- /**
- * Clears all the contents in the stack.
- */
- public void reset() {
- if(size>0) {
- size = 0;
- Arrays.fill(initialHash,0);
- }
- }
-
- /**
- * String that represents the cycle.
- */
- public String getCycleString() {
- StringBuilder sb = new StringBuilder();
- int i=size()-1;
- E obj = get(i);
- sb.append(obj);
- Object x;
- do {
- sb.append(" -> ");
- x = get(--i);
- sb.append(x);
- } while(obj!=x);
-
- return sb.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/DataSourceSource.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/DataSourceSource.java
deleted file mode 100644
index 449c8223..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/DataSourceSource.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-
-import javax.activation.DataHandler;
-import javax.activation.DataSource;
-import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-
-/**
- * {@link Source} implementation backed by {@link DataHandler}.
- *
- * <p>
- * This implementation allows the same {@link Source} to be used
- * mutliple times.
- *
- * <p>
- * {@link Source} isn't really pluggable. As a consequence,
- * this implementation is clunky --- weak against unexpected
- * usage of the class.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class DataSourceSource extends StreamSource {
- private final DataSource source;
-
- /**
- * If null, default to the encoding declaration
- */
- private final String charset;
-
- // remember the value we returned so that the 2nd invocation
- // will return the same object, which is what's expeted out of
- // StreamSource
- private Reader r;
- private InputStream is;
-
- public DataSourceSource(DataHandler dh) throws MimeTypeParseException {
- this(dh.getDataSource());
- }
-
- public DataSourceSource(DataSource source) throws MimeTypeParseException {
- this.source = source;
-
- String ct = source.getContentType();
- if(ct==null) {
- charset = null;
- } else {
- MimeType mimeType = new MimeType(ct);
- this.charset = mimeType.getParameter("charset");
- }
- }
-
- @Override
- public void setReader(Reader reader) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void setInputStream(InputStream inputStream) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Reader getReader() {
- try {
- if(charset==null) return null;
- if(r==null)
- r = new InputStreamReader(source.getInputStream(),charset);
- return r;
- } catch (IOException e) {
- // argh
- throw new RuntimeException(e);
- }
- }
-
- @Override
- public InputStream getInputStream() {
- try {
- if(charset!=null) return null;
- if(is==null)
- is = source.getInputStream();
- return is;
- } catch (IOException e) {
- // argh
- throw new RuntimeException(e);
- }
- }
-
- public DataSource getDataSource() {
- return source;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/EditDistance.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/EditDistance.java
deleted file mode 100644
index b2c82b5c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/EditDistance.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.util;
-
-import java.util.AbstractMap;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.WeakHashMap;
-
-/**
- * Computes the string edit distance.
- *
- * <p>
- * Refer to a computer science text book for the definition
- * of the "string edit distance".
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class EditDistance {
-
- /**
- * Weak results cache to avoid additional computations.
- * Because of high complexity caching is required.
- */
- private static final WeakHashMap<AbstractMap.SimpleEntry<String,String>, Integer> CACHE = new WeakHashMap<AbstractMap.SimpleEntry<String, String>, Integer>();
-
- /**
- * Computes the edit distance between two strings.
- *
- * <p>
- * The complexity is O(nm) where n=a.length() and m=b.length().
- */
- public static int editDistance( String a, String b ) {
- // let's check cache
- AbstractMap.SimpleEntry<String,String> entry = new AbstractMap.SimpleEntry<String, String>(a, b); // using this class to avoid creation of my own which will handle PAIR of values
- Integer result = null;
- if (CACHE.containsKey(entry))
- result = CACHE.get(entry); // looks like we have it
-
- if (result == null) {
- result = new EditDistance(a, b).calc();
- CACHE.put(entry, result); // cache the result
- }
- return result;
- }
-
- /**
- * Finds the string in the <code>group</code> closest to
- * <code>key</code> and returns it.
- *
- * @return null if group.length==0.
- */
- public static String findNearest( String key, String[] group ) {
- return findNearest(key, Arrays.asList(group));
- }
-
- /**
- * Finds the string in the <code>group</code> closest to
- * <code>key</code> and returns it.
- *
- * @return null if group.length==0.
- */
- public static String findNearest( String key, Collection<String> group ) {
- int c = Integer.MAX_VALUE;
- String r = null;
-
- for (String s : group) {
- int ed = editDistance(key,s);
- if( c>ed ) {
- c = ed;
- r = s;
- }
- }
- return r;
- }
-
- /** cost vector. */
- private int[] cost;
- /** back buffer. */
- private int[] back;
-
- /** Two strings to be compared. */
- private final String a,b;
-
- private EditDistance( String a, String b ) {
- this.a=a;
- this.b=b;
- cost = new int[a.length()+1];
- back = new int[a.length()+1]; // back buffer
-
- for( int i=0; i<=a.length(); i++ )
- cost[i] = i;
- }
-
- /**
- * Swaps two buffers.
- */
- private void flip() {
- int[] t = cost;
- cost = back;
- back = t;
- }
-
- private int min(int a,int b,int c) {
- return Math.min(a,Math.min(b,c));
- }
-
- private int calc() {
- for( int j=0; j<b.length(); j++ ) {
- flip();
- cost[0] = j+1;
- for( int i=0; i<a.length(); i++ ) {
- int match = (a.charAt(i)==b.charAt(j))?0:1;
- cost[i+1] = min( back[i]+match, cost[i]+1, back[i+1]+1 );
- }
- }
- return cost[a.length()];
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/FatalAdapter.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/FatalAdapter.java
deleted file mode 100644
index 5f68b11b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/FatalAdapter.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.util;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.SAXException;
-
-/**
- * Maps an error to a fatal error.
- *
- * @author Kohsuke Kawaguchi
- */
-public class FatalAdapter implements ErrorHandler {
- private final ErrorHandler core;
-
- public FatalAdapter(ErrorHandler handler) {
- this.core = handler;
- }
-
- public void warning (SAXParseException exception) throws SAXException {
- core.warning(exception);
- }
-
- public void error (SAXParseException exception) throws SAXException {
- core.fatalError(exception);
- }
-
- public void fatalError (SAXParseException exception) throws SAXException {
- core.fatalError(exception);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/FlattenIterator.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/FlattenIterator.java
deleted file mode 100644
index f6003e7e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/FlattenIterator.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.util;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.NoSuchElementException;
-
-/**
- * {@link Iterator} that walks over a map of maps.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.0
- */
-public final class FlattenIterator<T> implements Iterator<T> {
-
- private final Iterator<? extends Map<?,? extends T>> parent;
- private Iterator<? extends T> child = null;
- private T next;
-
- public FlattenIterator( Iterable<? extends Map<?,? extends T>> core ) {
- this.parent = core.iterator();
- }
-
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasNext() {
- getNext();
- return next!=null;
- }
-
- public T next() {
- T r = next;
- next = null;
- if(r==null)
- throw new NoSuchElementException();
- return r;
- }
-
- private void getNext() {
- if(next!=null) return;
-
- if(child!=null && child.hasNext()) {
- next = child.next();
- return;
- }
- // child is empty
- if(parent.hasNext()) {
- child = parent.next().values().iterator();
- getNext();
- }
- // else
- // no more object
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/QNameMap.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/QNameMap.java
deleted file mode 100644
index b484c25a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/QNameMap.java
+++ /dev/null
@@ -1,480 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.util;
-import java.util.AbstractSet;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.Map;
-import java.util.Collection;
-import java.util.HashSet;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.runtime.Name;
-
-/**
- * Map keyed by {@link QName}.
- *
- * This specialized map allows a look up operation without constructing
- * a new QName instance, for a performance reason. This {@link Map} assumes
- * that both namespace URI and local name are {@link String#intern() intern}ed.
- *
- * @since JAXB 2.0
- */
-public final class QNameMap<V> {
- /**
- * The default initial capacity - MUST be a power of two.
- */
- private static final int DEFAULT_INITIAL_CAPACITY = 16;
-
- /**
- * The maximum capacity, used if a higher value is implicitly specified
- * by either of the constructors with arguments.
- * MUST be a power of two <= 1<<30.
- */
- private static final int MAXIMUM_CAPACITY = 1 << 30;
-
- /**
- * The table, resized as necessary. Length MUST Always be a power of two.
- */
- transient Entry<V>[] table = new Entry[DEFAULT_INITIAL_CAPACITY];
-
- /**
- * The number of key-value mappings contained in this identity hash map.
- */
- transient int size;
-
- /**
- * The next size value at which to resize . Taking it as
- * MAXIMUM_CAPACITY
- * @serial
- */
- private int threshold;
-
- /**
- * The load factor used when none specified in constructor.
- **/
- private static final float DEFAULT_LOAD_FACTOR = 0.75f;
-
-
-
- /**
- * Gives an entrySet view of this map
- */
- private Set<Entry<V>> entrySet = null;
-
- public QNameMap() {
- threshold = (int)(DEFAULT_INITIAL_CAPACITY * DEFAULT_LOAD_FACTOR);
- table = new Entry[DEFAULT_INITIAL_CAPACITY];
-
- }
-
- /**
- * Associates the specified value with the specified keys in this map.
- * If the map previously contained a mapping for this key, the old
- * value is replaced.
- *
- * @param namespaceUri First key with which the specified value is to be associated.
- * @param localname Second key with which the specified value is to be associated.
- * @param value value to be associated with the specified key.
- *
- */
- public void put(String namespaceUri,String localname, V value ) {
- //keys cannot be null
- assert localname !=null;
- assert namespaceUri !=null;
- // keys must be interned
- assert localname == localname.intern();
- assert namespaceUri == namespaceUri.intern();
-
- int hash = hash(localname);
- int i = indexFor(hash, table.length);
-
- for (Entry<V> e = table[i]; e != null; e = e.next) {
- if (e.hash == hash && localname == e.localName && namespaceUri==e.nsUri) {
- e.value = value;
- return;
- }
- }
-
- addEntry(hash, namespaceUri,localname, value, i);
-
- }
-
- public void put(QName name, V value ) {
- put(name.getNamespaceURI(),name.getLocalPart(),value);
- }
-
- public void put(Name name, V value ) {
- put(name.nsUri,name.localName,value);
- }
-
- /**
- * Returns the value to which the specified keys are mapped in this QNameMap,
- * or <tt>null</tt> if the map contains no mapping for this key.
- *
- * @param nsUri the namespaceUri key whose associated value is to be returned.
- * @param localPart the localPart key whose associated value is to be returned.
- * @return the value to which this map maps the specified set of keya, or
- * <tt>null</tt> if the map contains no mapping for this set of keys.
- * @see #put(String,String, Object)
- */
- public V get( String nsUri, String localPart ) {
- Entry<V> e = getEntry(nsUri,localPart);
- if(e==null) return null;
- else return e.value;
- }
-
- public V get( QName name ) {
- return get(name.getNamespaceURI(),name.getLocalPart());
- }
-
- /**
- * Returns the number of keys-value mappings in this map.
- *
- * @return the number of keys-value mappings in this map.
- */
- public int size() {
- return size;
- }
-
- /**
- * Copies all of the mappings from the specified map to this map
- * These mappings will replace any mappings that
- * this map had for any of the keys currently in the specified map.
- *
- * @param map mappings to be stored in this map.
- *
- */
- public QNameMap<V> putAll(QNameMap<? extends V> map) {
- int numKeysToBeAdded = map.size();
- if (numKeysToBeAdded == 0)
- return this;
-
-
- if (numKeysToBeAdded > threshold) {
- int targetCapacity = numKeysToBeAdded;
- if (targetCapacity > MAXIMUM_CAPACITY)
- targetCapacity = MAXIMUM_CAPACITY;
- int newCapacity = table.length;
- while (newCapacity < targetCapacity)
- newCapacity <<= 1;
- if (newCapacity > table.length)
- resize(newCapacity);
- }
-
- for( Entry<? extends V> e : map.entrySet() )
- put(e.nsUri,e.localName,e.getValue());
- return this;
- }
-
-
- /**
- * Returns a hash value for the specified object.The hash value is computed
- * for the localName.
- */
- private static int hash(String x) {
- int h = x.hashCode();
-
- h += ~(h << 9);
- h ^= (h >>> 14);
- h += (h << 4);
- h ^= (h >>> 10);
- return h;
- }
-
- /**
- * Returns index for hash code h.
- */
- private static int indexFor(int h, int length) {
- return h & (length-1);
- }
-
- /**
- * Add a new entry with the specified keys, value and hash code to
- * the specified bucket. It is the responsibility of this
- * method to resize the table if appropriate.
- *
- */
- private void addEntry(int hash, String nsUri, String localName, V value, int bucketIndex) {
- Entry<V> e = table[bucketIndex];
- table[bucketIndex] = new Entry<V>(hash, nsUri, localName, value, e);
- if (size++ >= threshold)
- resize(2 * table.length);
- }
-
-
- /**
- * Rehashes the contents of this map into a new array with a
- * larger capacity. This method is called automatically when the
- * number of keys in this map reaches its threshold.
- */
- private void resize(int newCapacity) {
- Entry[] oldTable = table;
- int oldCapacity = oldTable.length;
- if (oldCapacity == MAXIMUM_CAPACITY) {
- threshold = Integer.MAX_VALUE;
- return;
- }
-
- Entry[] newTable = new Entry[newCapacity];
- transfer(newTable);
- table = newTable;
- threshold = newCapacity;
- }
-
- /**
- * Transfer all entries from current table to newTable.
- */
- private void transfer(Entry<V>[] newTable) {
- Entry<V>[] src = table;
- int newCapacity = newTable.length;
- for (int j = 0; j < src.length; j++) {
- Entry<V> e = src[j];
- if (e != null) {
- src[j] = null;
- do {
- Entry<V> next = e.next;
- int i = indexFor(e.hash, newCapacity);
- e.next = newTable[i];
- newTable[i] = e;
- e = next;
- } while (e != null);
- }
- }
- }
-
- /**
- * Returns one random item in the map.
- * If this map is empty, return null.
- *
- * <p>
- * This method is useful to obtain the value from a map that only contains one element.
- */
- public Entry<V> getOne() {
- for( Entry<V> e : table ) {
- if(e!=null)
- return e;
- }
- return null;
- }
-
- public Collection<QName> keySet() {
- Set<QName> r = new HashSet<QName>();
- for (Entry<V> e : entrySet()) {
- r.add(e.createQName());
- }
- return r;
- }
-
- private abstract class HashIterator<E> implements Iterator<E> {
- Entry<V> next; // next entry to return
- int index; // current slot
-
- HashIterator() {
- Entry<V>[] t = table;
- int i = t.length;
- Entry<V> n = null;
- if (size != 0) { // advance to first entry
- while (i > 0 && (n = t[--i]) == null) {}
- }
- next = n;
- index = i;
- }
-
- public boolean hasNext() {
- return next != null;
- }
-
- Entry<V> nextEntry() {
- Entry<V> e = next;
- if (e == null)
- throw new NoSuchElementException();
-
- Entry<V> n = e.next;
- Entry<V>[] t = table;
- int i = index;
- while (n == null && i > 0)
- n = t[--i];
- index = i;
- next = n;
- return e;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- public boolean containsKey(String nsUri,String localName) {
- return getEntry(nsUri,localName)!=null;
- }
-
-
- /**
- * Returns true if this map is empty.
- */
- public boolean isEmpty() {
- return size == 0;
- }
-
-
- public static final class Entry<V> {
- /** The namespace URI. */
- public final String nsUri;
-
- /** The localPart. */
- public final String localName;
-
- V value;
- final int hash;
- Entry<V> next;
-
- /**
- * Create new entry.
- */
- Entry(int h, String nsUri, String localName, V v, Entry<V> n) {
- value = v;
- next = n;
- this.nsUri = nsUri;
- this.localName = localName;
- hash = h;
- }
-
- /**
- * Creates a new QName object from {@link #nsUri} and {@link #localName}.
- */
- public QName createQName() {
- return new QName(nsUri,localName);
- }
-
- public V getValue() {
- return value;
- }
-
- public V setValue(V newValue) {
- V oldValue = value;
- value = newValue;
- return oldValue;
- }
-
- @Override
- public boolean equals(Object o) {
- if (!(o instanceof Entry))
- return false;
- Entry e = (Entry)o;
- String k1 = nsUri;
- String k2 = e.nsUri;
- String k3 = localName;
- String k4 = e.localName;
- if (k1 == k2 || (k1 != null && k1.equals(k2)) &&
- (k3 == k4 ||(k3 !=null && k3.equals(k4)))) {
- Object v1 = getValue();
- Object v2 = e.getValue();
- if (v1 == v2 || (v1 != null && v1.equals(v2)))
- return true;
- }
- return false;
- }
-
- @Override
- public int hashCode() {
- return ( localName.hashCode()) ^
- (value==null ? 0 : value.hashCode());
- }
-
- @Override
- public String toString() {
- return '"'+nsUri +"\",\"" +localName + "\"=" + getValue();
- }
- }
-
- public Set<Entry<V>> entrySet() {
- Set<Entry<V>> es = entrySet;
- return es != null ? es : (entrySet = new EntrySet());
- }
-
- private Iterator<Entry<V>> newEntryIterator() {
- return new EntryIterator();
- }
-
- private class EntryIterator extends HashIterator<Entry<V>> {
- public Entry<V> next() {
- return nextEntry();
- }
- }
- private class EntrySet extends AbstractSet<Entry<V>> {
- public Iterator<Entry<V>> iterator() {
- return newEntryIterator();
- }
- @Override
- public boolean contains(Object o) {
- if (!(o instanceof Entry))
- return false;
- Entry<V> e = (Entry<V>) o;
- Entry<V> candidate = getEntry(e.nsUri,e.localName);
- return candidate != null && candidate.equals(e);
- }
- @Override
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
- public int size() {
- return size;
- }
- }
-
- private Entry<V> getEntry(String nsUri,String localName) {
- // strings must be interned
- assert nsUri==nsUri.intern();
- assert localName==localName.intern();
-
- int hash = hash(localName);
- int i = indexFor(hash, table.length);
- Entry<V> e = table[i];
- while (e != null && !(localName == e.localName && nsUri == e.nsUri))
- e = e.next;
- return e;
- }
-
- @Override
- public String toString() {
- StringBuilder buf = new StringBuilder();
- buf.append('{');
-
- for( Entry<V> e : entrySet() ) {
- if(buf.length()>1)
- buf.append(',');
- buf.append('[');
- buf.append(e);
- buf.append(']');
- }
-
- buf.append('}');
- return buf.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/StackRecorder.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/StackRecorder.java
deleted file mode 100644
index e820d53d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/StackRecorder.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.util;
-
-/**
- * Created to record the caller stack trace in logging.
- *
- * @author Kohsuke Kawaguchi
- */
-public class StackRecorder extends Throwable {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/TypeCast.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/TypeCast.java
deleted file mode 100644
index c486e263..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/TypeCast.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.bind.v2.util;
-
-import java.util.Map;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public class TypeCast {
- /**
- * Makes sure that a map contains the right type, and returns it to the desirable type.
- */
- public static <K,V> Map<K,V> checkedCast( Map<?,?> m, Class<K> keyType, Class<V> valueType ) {
- if(m==null)
- return null;
- for (Map.Entry e : m.entrySet()) {
- if(!keyType.isInstance(e.getKey()))
- throw new ClassCastException(e.getKey().getClass().toString());
- if(!valueType.isInstance(e.getValue()))
- throw new ClassCastException(e.getValue().getClass().toString());
- }
- return (Map<K,V>)m;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java
deleted file mode 100644
index c2cbe154..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.bind.v2.util;
-
-import com.sun.xml.internal.bind.v2.Messages;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.xml.XMLConstants;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.validation.SchemaFactory;
-import javax.xml.xpath.XPathFactory;
-import javax.xml.xpath.XPathFactoryConfigurationException;
-
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-
-/**
- * Provides helper methods for creating properly configured XML parser
- * factory instances with namespace support turned on and configured for
- * security.
- * @author snajper
- */
-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());
-
- /**
- * If true XML security features when parsing XML documents will be disabled.
- * The default value is false.
- *
- * Boolean
- * @since 2.2.6
- */
- private static final String DISABLE_XML_SECURITY = "com.sun.xml.internal.bind.disableXmlSecurity";
-
- private static final boolean XML_SECURITY_DISABLED = AccessController.doPrivileged(
- new PrivilegedAction<Boolean>() {
- @Override
- public Boolean run() {
- return Boolean.getBoolean(DISABLE_XML_SECURITY);
- }
- }
- );
-
- private static boolean isXMLSecurityDisabled(boolean runtimeSetting) {
- return XML_SECURITY_DISABLED || runtimeSetting;
- }
-
- /**
- * Returns properly configured (e.g. security features) schema factory
- * - namespaceAware == true
- * - securityProcessing == is set based on security processing property, default is true
- */
- public static SchemaFactory createSchemaFactory(final String language, boolean disableSecureProcessing) throws IllegalStateException {
- try {
- SchemaFactory factory = SchemaFactory.newInstance(language);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "SchemaFactory instance: {0}", factory);
- }
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
- return factory;
- } catch (SAXNotRecognizedException ex) {
- LOGGER.log(Level.SEVERE, null, ex);
- throw new IllegalStateException(ex);
- } catch (SAXNotSupportedException ex) {
- LOGGER.log(Level.SEVERE, null, ex);
- throw new IllegalStateException(ex);
- } catch (AbstractMethodError er) {
- LOGGER.log(Level.SEVERE, null, er);
- throw new IllegalStateException(Messages.INVALID_JAXP_IMPLEMENTATION.format(), er);
- }
- }
-
- /**
- * Returns properly configured (e.g. security features) parser factory
- * - namespaceAware == true
- * - securityProcessing == is set based on security processing property, default is true
- */
- public static SAXParserFactory createParserFactory(boolean disableSecureProcessing) throws IllegalStateException {
- try {
- SAXParserFactory factory = SAXParserFactory.newInstance();
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "SAXParserFactory instance: {0}", factory);
- }
- factory.setNamespaceAware(true);
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
- return factory;
- } catch (ParserConfigurationException ex) {
- LOGGER.log(Level.SEVERE, null, ex);
- throw new IllegalStateException( ex);
- } catch (SAXNotRecognizedException ex) {
- LOGGER.log(Level.SEVERE, null, ex);
- throw new IllegalStateException( ex);
- } catch (SAXNotSupportedException ex) {
- LOGGER.log(Level.SEVERE, null, ex);
- throw new IllegalStateException( ex);
- } catch (AbstractMethodError er) {
- LOGGER.log(Level.SEVERE, null, er);
- throw new IllegalStateException(Messages.INVALID_JAXP_IMPLEMENTATION.format(), er);
- }
- }
-
- /**
- * Returns properly configured (e.g. security features) factory
- * - securityProcessing == is set based on security processing property, default is true
- */
- public static XPathFactory createXPathFactory(boolean disableSecureProcessing) throws IllegalStateException {
- try {
- XPathFactory factory = XPathFactory.newInstance();
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "XPathFactory instance: {0}", factory);
- }
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
- return factory;
- } catch (XPathFactoryConfigurationException ex) {
- LOGGER.log(Level.SEVERE, null, ex);
- throw new IllegalStateException( ex);
- } catch (AbstractMethodError er) {
- LOGGER.log(Level.SEVERE, null, er);
- throw new IllegalStateException(Messages.INVALID_JAXP_IMPLEMENTATION.format(), er);
- }
- }
-
- /**
- * Returns properly configured (e.g. security features) factory
- * - securityProcessing == is set based on security processing property, default is true
- */
- public static TransformerFactory createTransformerFactory(boolean disableSecureProcessing) throws IllegalStateException {
- try {
- TransformerFactory factory = TransformerFactory.newInstance();
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "TransformerFactory instance: {0}", factory);
- }
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
- return factory;
- } catch (TransformerConfigurationException ex) {
- LOGGER.log(Level.SEVERE, null, ex);
- throw new IllegalStateException( ex);
- } catch (AbstractMethodError er) {
- LOGGER.log(Level.SEVERE, null, er);
- throw new IllegalStateException(Messages.INVALID_JAXP_IMPLEMENTATION.format(), er);
- }
- }
-
- /**
- * Returns properly configured (e.g. security features) factory
- * - namespaceAware == true
- * - securityProcessing == is set based on security processing property, default is true
- */
- public static DocumentBuilderFactory createDocumentBuilderFactory(boolean disableSecureProcessing) throws IllegalStateException {
- try {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "DocumentBuilderFactory instance: {0}", factory);
- }
- factory.setNamespaceAware(true);
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
- return factory;
- } catch (ParserConfigurationException ex) {
- LOGGER.log(Level.SEVERE, null, ex);
- throw new IllegalStateException( ex);
- } catch (AbstractMethodError er) {
- LOGGER.log(Level.SEVERE, null, er);
- throw new IllegalStateException(Messages.INVALID_JAXP_IMPLEMENTATION.format(), er);
- }
- }
-
- public static SchemaFactory allowExternalAccess(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.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, 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
- 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;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDEventListener.java b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDEventListener.java
deleted file mode 100644
index a5f64014..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDEventListener.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dtdparser;
-
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import java.util.EventListener;
-
-/**
- * All DTD parsing events are signaled through this interface.
- */
-public interface DTDEventListener extends EventListener {
-
- public void setDocumentLocator(Locator loc);
-
- /**
- * Receive notification of a Processing Instruction.
- * Processing instructions contain information meaningful
- * to the application.
- *
- * @param target The target of the proceessing instruction
- * which should have meaning to the application.
- * @param data The instruction itself which should contain
- * valid XML characters.
- * @throws SAXException
- */
- public void processingInstruction(String target, String data)
- throws SAXException;
-
- /**
- * Receive notification of a Notation Declaration.
- * Notation declarations are used by elements and entities
- * for identifying embedded non-XML data.
- *
- * @param name The notation name, referred to by entities and
- * elements.
- * @param publicId The public identifier
- * @param systemId The system identifier
- */
- public void notationDecl(String name, String publicId, String systemId)
- throws SAXException;
-
- /**
- * Receive notification of an unparsed entity declaration.
- * Unparsed entities are non-XML data.
- *
- * @param name The name of the unparsed entity.
- * @param publicId The public identifier
- * @param systemId The system identifier
- * @param notationName The associated notation
- */
- public void unparsedEntityDecl(String name, String publicId,
- String systemId, String notationName)
- throws SAXException;
-
- /**
- * Receive notification of a internal general entity declaration event.
- *
- * @param name The internal general entity name.
- * @param value The value of the entity, which may include unexpanded
- * entity references. Character references will have been
- * expanded.
- * @throws SAXException
- * @see #externalGeneralEntityDecl(String, String, String)
- */
- public void internalGeneralEntityDecl(String name, String value)
- throws SAXException;
-
- /**
- * Receive notification of an external parsed general entity
- * declaration event.
- * <p/>
- * <p>If a system identifier is present, and it is a relative URL, the
- * parser will have resolved it fully before passing it through this
- * method to a listener.</p>
- *
- * @param name The entity name.
- * @param publicId The entity's public identifier, or null if
- * none was given.
- * @param systemId The entity's system identifier.
- * @throws SAXException
- * @see #unparsedEntityDecl(String, String, String, String)
- */
- public void externalGeneralEntityDecl(String name, String publicId,
- String systemId)
- throws SAXException;
-
- /**
- * Receive notification of a internal parameter entity declaration
- * event.
- *
- * @param name The internal parameter entity name.
- * @param value The value of the entity, which may include unexpanded
- * entity references. Character references will have been
- * expanded.
- * @throws SAXException
- * @see #externalParameterEntityDecl(String, String, String)
- */
- public void internalParameterEntityDecl(String name, String value)
- throws SAXException;
-
- /**
- * Receive notification of an external parameter entity declaration
- * event.
- * <p/>
- * <p>If a system identifier is present, and it is a relative URL, the
- * parser will have resolved it fully before passing it through this
- * method to a listener.</p>
- *
- * @param name The parameter entity name.
- * @param publicId The entity's public identifier, or null if
- * none was given.
- * @param systemId The entity's system identifier.
- * @throws SAXException
- * @see #unparsedEntityDecl(String, String, String, String)
- */
- public void externalParameterEntityDecl(String name, String publicId,
- String systemId)
- throws SAXException;
-
- /**
- * Receive notification of the beginning of the DTD.
- *
- * @param in Current input entity.
- * @see #endDTD()
- */
- public void startDTD(InputEntity in)
- throws SAXException;
-
- /**
- * Receive notification of the end of a DTD. The parser will invoke
- * this method only once.
- *
- * @throws SAXException
- * @see #startDTD(InputEntity)
- */
- public void endDTD()
- throws SAXException;
-
- /**
- * Receive notification that a comment has been read.
- * <p/>
- * <P> Note that processing instructions are the mechanism designed
- * to hold information for consumption by applications, not comments.
- * XML systems may rely on applications being able to access information
- * found in processing instructions; this is not true of comments, which
- * are typically discarded.
- *
- * @param text the text within the comment delimiters.
- * @throws SAXException
- */
- public void comment(String text)
- throws SAXException;
-
- /**
- * Receive notification of character data.
- * <p/>
- * <p>The Parser will call this method to report each chunk of
- * character data. SAX parsers may return all contiguous character
- * data in a single chunk, or they may split it into several
- * chunks; however, all of the characters in any single event
- * must come from the same external entity, so that the Locator
- * provides useful information.</p>
- * <p/>
- * <p>The application must not attempt to read from the array
- * outside of the specified range.</p>
- * <p/>
- * <p>Note that some parsers will report whitespace using the
- * ignorableWhitespace() method rather than this one (validating
- * parsers must do so).</p>
- *
- * @param ch The characters from the DTD.
- * @param start The start position in the array.
- * @param length The number of characters to read from the array.
- * @throws SAXException
- * @see #ignorableWhitespace(char[], int, int)
- */
- public void characters(char ch[], int start, int length)
- throws SAXException;
-
-
- /**
- * Receive notification of ignorable whitespace in element content.
- * <p/>
- * <p>Validating Parsers must use this method to report each chunk
- * of ignorable whitespace (see the W3C XML 1.0 recommendation,
- * section 2.10): non-validating parsers may also use this method
- * if they are capable of parsing and using content models.</p>
- * <p/>
- * <p>SAX parsers may return all contiguous whitespace in a single
- * chunk, or they may split it into several chunks; however, all of
- * the characters in any single event must come from the same
- * external entity, so that the Locator provides useful
- * information.</p>
- * <p/>
- * <p>The application must not attempt to read from the array
- * outside of the specified range.</p>
- *
- * @param ch The characters from the DTD.
- * @param start The start position in the array.
- * @param length The number of characters to read from the array.
- * @throws SAXException
- * @see #characters(char[], int, int)
- */
- public void ignorableWhitespace(char ch[], int start, int length)
- throws SAXException;
-
- /**
- * Receive notification that a CDATA section is beginning. Data in a
- * CDATA section is is reported through the appropriate event, either
- * <em>characters()</em> or <em>ignorableWhitespace</em>.
- *
- * @throws SAXException
- * @see #endCDATA()
- */
- public void startCDATA() throws SAXException;
-
-
- /**
- * Receive notification that the CDATA section finished.
- *
- * @throws SAXException
- * @see #startCDATA()
- */
- public void endCDATA() throws SAXException;
-
-
- public void fatalError(SAXParseException e)
- throws SAXException;
-
- public void error(SAXParseException e) throws SAXException;
-
- public void warning(SAXParseException err) throws SAXException;
-
- public final short CONTENT_MODEL_EMPTY = 0;
- public final short CONTENT_MODEL_ANY = 1;
- public final short CONTENT_MODEL_MIXED = 2;
- public final short CONTENT_MODEL_CHILDREN = 3;
-
- /**
- * receives notification that parsing of content model is beginning.
- *
- * @param elementName name of the element whose content model is going to be defined.
- * @param contentModelType {@link #CONTENT_MODEL_EMPTY}
- * this element has EMPTY content model. This notification
- * will be immediately followed by the corresponding endContentModel.
- * {@link #CONTENT_MODEL_ANY}
- * this element has ANY content model. This notification
- * will be immediately followed by the corresponding endContentModel.
- * {@link #CONTENT_MODEL_MIXED}
- * this element has mixed content model. #PCDATA will not be reported.
- * each child element will be reported by mixedElement method.
- * {@link #CONTENT_MODEL_CHILDREN}
- * this elemen has child content model. The actual content model will
- * be reported by childElement, startModelGroup, endModelGroup, and
- * connector methods. Possible call sequences are:
- * <p/>
- * START := MODEL_GROUP
- * MODEL_GROUP := startModelGroup TOKEN (connector TOKEN)* endModelGroup
- * TOKEN := childElement
- * | MODEL_GROUP
- */
- public void startContentModel(String elementName, short contentModelType) throws SAXException;
-
- /**
- * receives notification that parsing of content model is finished.
- */
- public void endContentModel(String elementName, short contentModelType) throws SAXException;
-
- public final short USE_NORMAL = 0;
- public final short USE_IMPLIED = 1;
- public final short USE_FIXED = 2;
- public final short USE_REQUIRED = 3;
-
- /**
- * For each entry in an ATTLIST declaration,
- * this event will be fired.
- * <p/>
- * <p/>
- * DTD allows the same attributes to be declared more than
- * once, and in that case the first one wins. I think
- * this method will be only fired for the first one,
- * but I need to check.
- */
- public void attributeDecl(String elementName, String attributeName, String attributeType,
- String[] enumeration, short attributeUse, String defaultValue) throws SAXException;
-
- public void childElement(String elementName, short occurence) throws SAXException;
-
- /**
- * receives notification of child element of mixed content model.
- * this method is called for each child element.
- *
- * @see #startContentModel(String, short)
- */
- public void mixedElement(String elementName) throws SAXException;
-
- public void startModelGroup() throws SAXException;
-
- public void endModelGroup(short occurence) throws SAXException;
-
- public final short CHOICE = 0;
- public final short SEQUENCE = 1;
-
- /**
- * Connectors in one model group is guaranteed to be the same.
- * <p/>
- * <p/>
- * IOW, you'll never see an event sequence like (a|b,c)
- *
- * @return {@link #CHOICE} or {@link #SEQUENCE}.
- */
- public void connector(short connectorType) throws SAXException;
-
- public final short OCCURENCE_ZERO_OR_MORE = 0;
- public final short OCCURENCE_ONE_OR_MORE = 1;
- public final short OCCURENCE_ZERO_OR_ONE = 2;
- public final short OCCURENCE_ONCE = 3;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDHandlerBase.java b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDHandlerBase.java
deleted file mode 100644
index 2e7801a1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDHandlerBase.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dtdparser;
-
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * do-nothing implementation of DTDEventHandler.
- */
-public class DTDHandlerBase implements DTDEventListener {
-
- public void processingInstruction(String target, String data)
- throws SAXException {
- }
-
- public void setDocumentLocator(Locator loc) {
- }
-
- public void fatalError(SAXParseException e) throws SAXException {
- throw e;
- }
-
- public void error(SAXParseException e) throws SAXException {
- throw e;
- }
-
- public void warning(SAXParseException err) throws SAXException {
- }
-
- public void notationDecl(String name, String publicId, String systemId) throws SAXException {
- }
-
- public void unparsedEntityDecl(String name, String publicId,
- String systemId, String notationName) throws SAXException {
- }
-
- public void endDTD() throws SAXException {
- }
-
- public void externalGeneralEntityDecl(String n, String p, String s) throws SAXException {
- }
-
- public void internalGeneralEntityDecl(String n, String v) throws SAXException {
- }
-
- public void externalParameterEntityDecl(String n, String p, String s) throws SAXException {
- }
-
- public void internalParameterEntityDecl(String n, String v) throws SAXException {
- }
-
- public void startDTD(InputEntity in) throws SAXException {
- }
-
- public void comment(String n) throws SAXException {
- }
-
- public void characters(char ch[], int start, int length) throws SAXException {
- }
-
- public void ignorableWhitespace(char ch[], int start, int length) throws SAXException {
- }
-
- public void startCDATA() throws SAXException {
- }
-
- public void endCDATA() throws SAXException {
- }
-
-
- public void startContentModel(String elementName, short contentModelType) throws SAXException {
- }
-
- public void endContentModel(String elementName, short contentModelType) throws SAXException {
- }
-
- public void attributeDecl(String elementName, String attributeName, String attributeType,
- String[] enumeration, short attributeUse, String defaultValue) throws SAXException {
- }
-
- public void childElement(String elementName, short occurence) throws SAXException {
- }
-
- public void mixedElement(String elementName) throws SAXException {
- }
-
- public void startModelGroup() throws SAXException {
- }
-
- public void endModelGroup(short occurence) throws SAXException {
- }
-
- public void connector(short connectorType) throws SAXException {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDParser.java b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDParser.java
deleted file mode 100644
index 68b7f6df..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/DTDParser.java
+++ /dev/null
@@ -1,2350 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dtdparser;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Locale;
-import java.util.Set;
-import java.util.Vector;
-
-/**
- * This implements parsing of XML 1.0 DTDs.
- * <p/>
- * This conforms to the portion of the XML 1.0 specification related
- * to the external DTD subset.
- * <p/>
- * For multi-language applications (such as web servers using XML
- * processing to create dynamic content), a method supports choosing
- * a locale for parser diagnostics which is both understood by the
- * message recipient and supported by the parser.
- * <p/>
- * This parser produces a stream of parse events. It supports some
- * features (exposing comments, CDATA sections, and entity references)
- * which are not required to be reported by conformant XML processors.
- *
- * @author David Brownell
- * @author Janet Koenig
- * @author Kohsuke KAWAGUCHI
- * @version $Id: DTDParser.java,v 1.2 2009/04/16 15:25:49 snajper Exp $
- */
-public class DTDParser {
- public final static String TYPE_CDATA = "CDATA";
- public final static String TYPE_ID = "ID";
- public final static String TYPE_IDREF = "IDREF";
- public final static String TYPE_IDREFS = "IDREFS";
- public final static String TYPE_ENTITY = "ENTITY";
- public final static String TYPE_ENTITIES = "ENTITIES";
- public final static String TYPE_NMTOKEN = "NMTOKEN";
- public final static String TYPE_NMTOKENS = "NMTOKENS";
- public final static String TYPE_NOTATION = "NOTATION";
- public final static String TYPE_ENUMERATION = "ENUMERATION";
-
-
- // stack of input entities being merged
- private InputEntity in;
-
- // temporaries reused during parsing
- private StringBuffer strTmp;
- private char nameTmp [];
- private NameCache nameCache;
- private char charTmp [] = new char[2];
-
- // temporary DTD parsing state
- private boolean doLexicalPE;
-
- // DTD state, used during parsing
-// private SimpleHashtable elements = new SimpleHashtable (47);
- protected final Set declaredElements = new java.util.HashSet();
- private SimpleHashtable params = new SimpleHashtable(7);
-
- // exposed to package-private subclass
- Hashtable notations = new Hashtable(7);
- SimpleHashtable entities = new SimpleHashtable(17);
-
- private SimpleHashtable ids = new SimpleHashtable();
-
- // listeners for DTD parsing events
- private DTDEventListener dtdHandler;
-
- private EntityResolver resolver;
- private Locale locale;
-
- // string constants -- use these copies so "==" works
- // package private
- static final String strANY = "ANY";
- static final String strEMPTY = "EMPTY";
-
- /**
- * Used by applications to request locale for diagnostics.
- *
- * @param l The locale to use, or null to use system defaults
- * (which may include only message IDs).
- */
- public void setLocale(Locale l) throws SAXException {
-
- if (l != null && !messages.isLocaleSupported(l.toString())) {
- throw new SAXException(messages.getMessage(locale,
- "P-078", new Object[]{l}));
- }
- locale = l;
- }
-
- /**
- * Returns the diagnostic locale.
- */
- public Locale getLocale() {
- return locale;
- }
-
- /**
- * Chooses a client locale to use for diagnostics, using the first
- * language specified in the list that is supported by this parser.
- * That locale is then set using <a href="#setLocale(java.util.Locale)">
- * setLocale()</a>. Such a list could be provided by a variety of user
- * preference mechanisms, including the HTTP <em>Accept-Language</em>
- * header field.
- *
- * @param languages Array of language specifiers, ordered with the most
- * preferable one at the front. For example, "en-ca" then "fr-ca",
- * followed by "zh_CN". Both RFC 1766 and Java styles are supported.
- * @return The chosen locale, or null.
- * @see MessageCatalog
- */
- public Locale chooseLocale(String languages [])
- throws SAXException {
-
- Locale l = messages.chooseLocale(languages);
-
- if (l != null) {
- setLocale(l);
- }
- return l;
- }
-
- /**
- * Lets applications control entity resolution.
- */
- public void setEntityResolver(EntityResolver r) {
-
- resolver = r;
- }
-
- /**
- * Returns the object used to resolve entities
- */
- public EntityResolver getEntityResolver() {
-
- return resolver;
- }
-
- /**
- * Used by applications to set handling of DTD parsing events.
- */
- public void setDtdHandler(DTDEventListener handler) {
- dtdHandler = handler;
- if (handler != null)
- handler.setDocumentLocator(new Locator() {
- public String getPublicId() {
- return DTDParser.this.getPublicId();
- }
-
- public String getSystemId() {
- return DTDParser.this.getSystemId();
- }
-
- public int getLineNumber() {
- return DTDParser.this.getLineNumber();
- }
-
- public int getColumnNumber() {
- return DTDParser.this.getColumnNumber();
- }
- });
- }
-
- /**
- * Returns the handler used to for DTD parsing events.
- */
- public DTDEventListener getDtdHandler() {
- return dtdHandler;
- }
-
- /**
- * Parse a DTD.
- */
- public void parse(InputSource in)
- throws IOException, SAXException {
- init();
- parseInternal(in);
- }
-
- /**
- * Parse a DTD.
- */
- public void parse(String uri)
- throws IOException, SAXException {
- InputSource in;
-
- init();
- // System.out.println ("parse (\"" + uri + "\")");
- in = resolver.resolveEntity(null, uri);
-
- // If custom resolver punts resolution to parser, handle it ...
- if (in == null) {
- in = Resolver.createInputSource(new java.net.URL(uri), false);
-
- // ... or if custom resolver doesn't correctly construct the
- // input entity, patch it up enough so relative URIs work, and
- // issue a warning to minimize later confusion.
- } else if (in.getSystemId() == null) {
- warning("P-065", null);
- in.setSystemId(uri);
- }
-
- parseInternal(in);
- }
-
- // makes sure the parser is reset to "before a document"
- private void init() {
- in = null;
-
- // alloc temporary data used in parsing
- strTmp = new StringBuffer();
- nameTmp = new char[20];
- nameCache = new NameCache();
-
- // reset doc info
-// isInAttribute = false;
-
- doLexicalPE = false;
-
- entities.clear();
- notations.clear();
- params.clear();
- // elements.clear ();
- declaredElements.clear();
-
- // initialize predefined references ... re-interpreted later
- builtin("amp", "&#38;");
- builtin("lt", "&#60;");
- builtin("gt", ">");
- builtin("quot", "\"");
- builtin("apos", "'");
-
- if (locale == null)
- locale = Locale.getDefault();
- if (resolver == null)
- resolver = new Resolver();
- if (dtdHandler == null)
- dtdHandler = new DTDHandlerBase();
- }
-
- private void builtin(String entityName, String entityValue) {
- InternalEntity entity;
- entity = new InternalEntity(entityName, entityValue.toCharArray());
- entities.put(entityName, entity);
- }
-
-
- ////////////////////////////////////////////////////////////////
- //
- // parsing is by recursive descent, code roughly
- // following the BNF rules except tweaked for simple
- // lookahead. rules are more or less in numeric order,
- // except where code sharing suggests other structures.
- //
- // a classic benefit of recursive descent parsers: it's
- // relatively easy to get diagnostics that make sense.
- //
- ////////////////////////////////////////////////////////////////
-
-
- private void parseInternal(InputSource input)
- throws IOException, SAXException {
-
- if (input == null)
- fatal("P-000");
-
- try {
- in = InputEntity.getInputEntity(dtdHandler, locale);
- in.init(input, null, null, false);
-
- dtdHandler.startDTD(in);
-
- // [30] extSubset ::= TextDecl? extSubsetDecl
- // [31] extSubsetDecl ::= ( markupdecl | conditionalSect
- // | PEReference | S )*
- // ... same as [79] extPE, which is where the code is
-
- ExternalEntity externalSubset = new ExternalEntity(in);
- externalParameterEntity(externalSubset);
-
- if (!in.isEOF()) {
- fatal("P-001", new Object[]
- {Integer.toHexString(((int) getc()))});
- }
- afterRoot();
- dtdHandler.endDTD();
-
- } catch (EndOfInputException e) {
- if (!in.isDocument()) {
- String name = in.getName();
- do { // force a relevant URI and line number
- in = in.pop();
- } while (in.isInternal());
- fatal("P-002", new Object[]{name});
- } else {
- fatal("P-003", null);
- }
- } catch (RuntimeException e) {
- // Don't discard location that triggered the exception
- // ## Should properly wrap exception
- System.err.print("Internal DTD parser error: "); // ##
- e.printStackTrace();
- throw new SAXParseException(e.getMessage() != null
- ? e.getMessage() : e.getClass().getName(),
- getPublicId(), getSystemId(),
- getLineNumber(), getColumnNumber());
-
- } finally {
- // recycle temporary data used during parsing
- strTmp = null;
- nameTmp = null;
- nameCache = null;
-
- // ditto input sources etc
- if (in != null) {
- in.close();
- in = null;
- }
-
- // get rid of all DTD info ... some of it would be
- // useful for editors etc, investigate later.
-
- params.clear();
- entities.clear();
- notations.clear();
- declaredElements.clear();
-// elements.clear();
- ids.clear();
- }
- }
-
- void afterRoot() throws SAXException {
- // Make sure all IDREFs match declared ID attributes. We scan
- // after the document element is parsed, since XML allows forward
- // references, and only now can we know if they're all resolved.
-
- for (Enumeration e = ids.keys();
- e.hasMoreElements();
- ) {
- String id = (String) e.nextElement();
- Boolean value = (Boolean) ids.get(id);
- if (Boolean.FALSE == value)
- error("V-024", new Object[]{id});
- }
- }
-
-
- // role is for diagnostics
- private void whitespace(String roleId)
- throws IOException, SAXException {
-
- // [3] S ::= (#x20 | #x9 | #xd | #xa)+
- if (!maybeWhitespace()) {
- fatal("P-004", new Object[]
- {messages.getMessage(locale, roleId)});
- }
- }
-
- // S?
- private boolean maybeWhitespace()
- throws IOException, SAXException {
-
- if (!doLexicalPE)
- return in.maybeWhitespace();
-
- // see getc() for the PE logic -- this lets us splice
- // expansions of PEs in "anywhere". getc() has smarts,
- // so for external PEs we don't bypass it.
-
- // XXX we can marginally speed PE handling, and certainly
- // be cleaner (hence potentially more correct), by using
- // the observations that expanded PEs only start and stop
- // where whitespace is allowed. getc wouldn't need any
- // "lexical" PE expansion logic, and no other method needs
- // to handle termination of PEs. (parsing of literals would
- // still need to pop entities, but not parsing of references
- // in content.)
-
- char c = getc();
- boolean saw = false;
-
- while (c == ' ' || c == '\t' || c == '\n' || c == '\r') {
- saw = true;
-
- // this gracefully ends things when we stop playing
- // with internal parameters. caller should have a
- // grammar rule allowing whitespace at end of entity.
- if (in.isEOF() && !in.isInternal())
- return saw;
- c = getc();
- }
- ungetc();
- return saw;
- }
-
- private String maybeGetName()
- throws IOException, SAXException {
-
- NameCacheEntry entry = maybeGetNameCacheEntry();
- return (entry == null) ? null : entry.name;
- }
-
- private NameCacheEntry maybeGetNameCacheEntry()
- throws IOException, SAXException {
-
- // [5] Name ::= (Letter|'_'|':') (Namechar)*
- char c = getc();
-
- if (!XmlChars.isLetter(c) && c != ':' && c != '_') {
- ungetc();
- return null;
- }
- return nameCharString(c);
- }
-
- // Used when parsing enumerations
- private String getNmtoken()
- throws IOException, SAXException {
-
- // [7] Nmtoken ::= (Namechar)+
- char c = getc();
- if (!XmlChars.isNameChar(c))
- fatal("P-006", new Object[]{new Character(c)});
- return nameCharString(c).name;
- }
-
- // n.b. this gets used when parsing attribute values (for
- // internal references) so we can't use strTmp; it's also
- // a hotspot for CPU and memory in the parser (called at least
- // once for each element) so this has been optimized a bit.
-
- private NameCacheEntry nameCharString(char c)
- throws IOException, SAXException {
-
- int i = 1;
-
- nameTmp[0] = c;
- for (; ;) {
- if ((c = in.getNameChar()) == 0)
- break;
- if (i >= nameTmp.length) {
- char tmp [] = new char[nameTmp.length + 10];
- System.arraycopy(nameTmp, 0, tmp, 0, nameTmp.length);
- nameTmp = tmp;
- }
- nameTmp[i++] = c;
- }
- return nameCache.lookupEntry(nameTmp, i);
- }
-
- //
- // much similarity between parsing entity values in DTD
- // and attribute values (in DTD or content) ... both follow
- // literal parsing rules, newline canonicalization, etc
- //
- // leaves value in 'strTmp' ... either a "replacement text" (4.5),
- // or else partially normalized attribute value (the first bit
- // of 3.3.3's spec, without the "if not CDATA" bits).
- //
- private void parseLiteral(boolean isEntityValue)
- throws IOException, SAXException {
-
- // [9] EntityValue ::=
- // '"' ([^"&%] | Reference | PEReference)* '"'
- // | "'" ([^'&%] | Reference | PEReference)* "'"
- // [10] AttValue ::=
- // '"' ([^"&] | Reference )* '"'
- // | "'" ([^'&] | Reference )* "'"
- char quote = getc();
- char c;
- InputEntity source = in;
-
- if (quote != '\'' && quote != '"') {
- fatal("P-007");
- }
-
- // don't report entity expansions within attributes,
- // they're reported "fully expanded" via SAX
-// isInAttribute = !isEntityValue;
-
- // get value into strTmp
- strTmp = new StringBuffer();
-
- // scan, allowing entity push/pop wherever ...
- // expanded entities can't terminate the literal!
- for (; ;) {
- if (in != source && in.isEOF()) {
- // we don't report end of parsed entities
- // within attributes (no SAX hooks)
- in = in.pop();
- continue;
- }
- if ((c = getc()) == quote && in == source) {
- break;
- }
-
- //
- // Basically the "reference in attribute value"
- // row of the chart in section 4.4 of the spec
- //
- if (c == '&') {
- String entityName = maybeGetName();
-
- if (entityName != null) {
- nextChar(';', "F-020", entityName);
-
- // 4.4 says: bypass these here ... we'll catch
- // forbidden refs to unparsed entities on use
- if (isEntityValue) {
- strTmp.append('&');
- strTmp.append(entityName);
- strTmp.append(';');
- continue;
- }
- expandEntityInLiteral(entityName, entities, isEntityValue);
-
-
- // character references are always included immediately
- } else if ((c = getc()) == '#') {
- int tmp = parseCharNumber();
-
- if (tmp > 0xffff) {
- tmp = surrogatesToCharTmp(tmp);
- strTmp.append(charTmp[0]);
- if (tmp == 2)
- strTmp.append(charTmp[1]);
- } else
- strTmp.append((char) tmp);
- } else
- fatal("P-009");
- continue;
-
- }
-
- // expand parameter entities only within entity value literals
- if (c == '%' && isEntityValue) {
- String entityName = maybeGetName();
-
- if (entityName != null) {
- nextChar(';', "F-021", entityName);
- expandEntityInLiteral(entityName, params, isEntityValue);
- continue;
- } else
- fatal("P-011");
- }
-
- // For attribute values ...
- if (!isEntityValue) {
- // 3.3.3 says whitespace normalizes to space...
- if (c == ' ' || c == '\t' || c == '\n' || c == '\r') {
- strTmp.append(' ');
- continue;
- }
-
- // "<" not legal in parsed literals ...
- if (c == '<')
- fatal("P-012");
- }
-
- strTmp.append(c);
- }
-// isInAttribute = false;
- }
-
- // does a SINGLE expansion of the entity (often reparsed later)
- private void expandEntityInLiteral(String name, SimpleHashtable table,
- boolean isEntityValue)
- throws IOException, SAXException {
-
- Object entity = table.get(name);
-
- if (entity instanceof InternalEntity) {
- InternalEntity value = (InternalEntity) entity;
- pushReader(value.buf, name, !value.isPE);
-
- } else if (entity instanceof ExternalEntity) {
- if (!isEntityValue) // must be a PE ...
- fatal("P-013", new Object[]{name});
- // XXX if this returns false ...
- pushReader((ExternalEntity) entity);
-
- } else if (entity == null) {
- //
- // Note: much confusion about whether spec requires such
- // errors to be fatal in many cases, but none about whether
- // it allows "normal" errors to be unrecoverable!
- //
- fatal((table == params) ? "V-022" : "P-014",
- new Object[]{name});
- }
- }
-
- // [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")
- // for PUBLIC and SYSTEM literals, also "<?xml ...type='literal'?>'
-
- // NOTE: XML spec should explicitly say that PE ref syntax is
- // ignored in PIs, comments, SystemLiterals, and Pubid Literal
- // values ... can't process the XML spec's own DTD without doing
- // that for comments.
-
- private String getQuotedString(String type, String extra)
- throws IOException, SAXException {
-
- // use in.getc to bypass PE processing
- char quote = in.getc();
-
- if (quote != '\'' && quote != '"')
- fatal("P-015", new Object[]{
- messages.getMessage(locale, type, new Object[]{extra})
- });
-
- char c;
-
- strTmp = new StringBuffer();
- while ((c = in.getc()) != quote)
- strTmp.append((char) c);
- return strTmp.toString();
- }
-
-
- private String parsePublicId() throws IOException, SAXException {
-
- // [12] PubidLiteral ::= ('"' PubidChar* '"') | ("'" PubidChar* "'")
- // [13] PubidChar ::= #x20|#xd|#xa|[a-zA-Z0-9]|[-'()+,./:=?;!*#@$_%]
- String retval = getQuotedString("F-033", null);
- for (int i = 0; i < retval.length(); i++) {
- char c = retval.charAt(i);
- if (" \r\n-'()+,./:=?;!*#@$_%0123456789".indexOf(c) == -1
- && !(c >= 'A' && c <= 'Z')
- && !(c >= 'a' && c <= 'z'))
- fatal("P-016", new Object[]{new Character(c)});
- }
- strTmp = new StringBuffer();
- strTmp.append(retval);
- return normalize(false);
- }
-
- // [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
- // handled by: InputEntity.parsedContent()
-
- private boolean maybeComment(boolean skipStart)
- throws IOException, SAXException {
-
- // [15] Comment ::= '<!--'
- // ( (Char - '-') | ('-' (Char - '-'))*
- // '-->'
- if (!in.peek(skipStart ? "!--" : "<!--", null))
- return false;
-
- boolean savedLexicalPE = doLexicalPE;
- boolean saveCommentText;
-
- doLexicalPE = false;
- saveCommentText = false;
- if (saveCommentText)
- strTmp = new StringBuffer();
-
- oneComment:
- for (; ;) {
- try {
- // bypass PE expansion, but permit PEs
- // to complete ... valid docs won't care.
- for (; ;) {
- int c = getc();
- if (c == '-') {
- c = getc();
- if (c != '-') {
- if (saveCommentText)
- strTmp.append('-');
- ungetc();
- continue;
- }
- nextChar('>', "F-022", null);
- break oneComment;
- }
- if (saveCommentText)
- strTmp.append((char) c);
- }
- } catch (EndOfInputException e) {
- //
- // This is fatal EXCEPT when we're processing a PE...
- // in which case a validating processor reports an error.
- // External PEs are easy to detect; internal ones we
- // infer by being an internal entity outside an element.
- //
- if (in.isInternal()) {
- error("V-021", null);
- }
- fatal("P-017");
- }
- }
- doLexicalPE = savedLexicalPE;
- if (saveCommentText)
- dtdHandler.comment(strTmp.toString());
- return true;
- }
-
- private boolean maybePI(boolean skipStart)
- throws IOException, SAXException {
-
- // [16] PI ::= '<?' PITarget
- // (S (Char* - (Char* '?>' Char*)))?
- // '?>'
- // [17] PITarget ::= Name - (('X'|'x')('M'|'m')('L'|'l')
- boolean savedLexicalPE = doLexicalPE;
-
- if (!in.peek(skipStart ? "?" : "<?", null))
- return false;
- doLexicalPE = false;
-
- String target = maybeGetName();
-
- if (target == null) {
- fatal("P-018");
- }
- if ("xml".equals(target)) {
- fatal("P-019");
- }
- if ("xml".equalsIgnoreCase(target)) {
- fatal("P-020", new Object[]{target});
- }
-
- if (maybeWhitespace()) {
- strTmp = new StringBuffer();
- try {
- for (; ;) {
- // use in.getc to bypass PE processing
- char c = in.getc();
- //Reached the end of PI.
- if (c == '?' && in.peekc('>'))
- break;
- strTmp.append(c);
- }
- } catch (EndOfInputException e) {
- fatal("P-021");
- }
- dtdHandler.processingInstruction(target, strTmp.toString());
- } else {
- if (!in.peek("?>", null)) {
- fatal("P-022");
- }
- dtdHandler.processingInstruction(target, "");
- }
-
- doLexicalPE = savedLexicalPE;
- return true;
- }
-
- // [18] CDSect ::= CDStart CData CDEnd
- // [19] CDStart ::= '<![CDATA['
- // [20] CData ::= (Char* - (Char* ']]>' Char*))
- // [21] CDEnd ::= ']]>'
- //
- // ... handled by InputEntity.unparsedContent()
-
- // collapsing several rules together ...
- // simpler than attribute literals -- no reference parsing!
- private String maybeReadAttribute(String name, boolean must)
- throws IOException, SAXException {
-
- // [24] VersionInfo ::= S 'version' Eq \'|\" versionNum \'|\"
- // [80] EncodingDecl ::= S 'encoding' Eq \'|\" EncName \'|\"
- // [32] SDDecl ::= S 'standalone' Eq \'|\" ... \'|\"
- if (!maybeWhitespace()) {
- if (!must) {
- return null;
- }
- fatal("P-024", new Object[]{name});
- // NOTREACHED
- }
-
- if (!peek(name)) {
- if (must) {
- fatal("P-024", new Object[]{name});
- } else {
- // To ensure that the whitespace is there so that when we
- // check for the next attribute we assure that the
- // whitespace still exists.
- ungetc();
- return null;
- }
- }
-
- // [25] Eq ::= S? '=' S?
- maybeWhitespace();
- nextChar('=', "F-023", null);
- maybeWhitespace();
-
- return getQuotedString("F-035", name);
- }
-
- private void readVersion(boolean must, String versionNum)
- throws IOException, SAXException {
-
- String value = maybeReadAttribute("version", must);
-
- // [26] versionNum ::= ([a-zA-Z0-9_.:]| '-')+
-
- if (must && value == null)
- fatal("P-025", new Object[]{versionNum});
- if (value != null) {
- int length = value.length();
- for (int i = 0; i < length; i++) {
- char c = value.charAt(i);
- if (!((c >= '0' && c <= '9')
- || c == '_' || c == '.'
- || (c >= 'a' && c <= 'z')
- || (c >= 'A' && c <= 'Z')
- || c == ':' || c == '-')
- )
- fatal("P-026", new Object[]{value});
- }
- }
- if (value != null && !value.equals(versionNum))
- error("P-027", new Object[]{versionNum, value});
- }
-
- // common code used by most markup declarations
- // ... S (Q)Name ...
- private String getMarkupDeclname(String roleId, boolean qname)
- throws IOException, SAXException {
-
- String name;
-
- whitespace(roleId);
- name = maybeGetName();
- if (name == null)
- fatal("P-005", new Object[]
- {messages.getMessage(locale, roleId)});
- return name;
- }
-
- private boolean maybeMarkupDecl()
- throws IOException, SAXException {
-
- // [29] markupdecl ::= elementdecl | Attlistdecl
- // | EntityDecl | NotationDecl | PI | Comment
- return maybeElementDecl()
- || maybeAttlistDecl()
- || maybeEntityDecl()
- || maybeNotationDecl()
- || maybePI(false)
- || maybeComment(false);
- }
-
- private static final String XmlLang = "xml:lang";
-
- private boolean isXmlLang(String value) {
-
- // [33] LanguageId ::= Langcode ('-' Subcode)*
- // [34] Langcode ::= ISO639Code | IanaCode | UserCode
- // [35] ISO639Code ::= [a-zA-Z] [a-zA-Z]
- // [36] IanaCode ::= [iI] '-' SubCode
- // [37] UserCode ::= [xX] '-' SubCode
- // [38] SubCode ::= [a-zA-Z]+
-
- // the ISO and IANA codes (and subcodes) are registered,
- // but that's neither a WF nor a validity constraint.
-
- int nextSuffix;
- char c;
-
- if (value.length() < 2)
- return false;
- c = value.charAt(1);
- if (c == '-') { // IANA, or user, code
- c = value.charAt(0);
- if (!(c == 'i' || c == 'I' || c == 'x' || c == 'X'))
- return false;
- nextSuffix = 1;
- } else if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
- // 2 letter ISO code, or error
- c = value.charAt(0);
- if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
- return false;
- nextSuffix = 2;
- } else
- return false;
-
- // here "suffix" ::= '-' [a-zA-Z]+ suffix*
- while (nextSuffix < value.length()) {
- c = value.charAt(nextSuffix);
- if (c != '-')
- break;
- while (++nextSuffix < value.length()) {
- c = value.charAt(nextSuffix);
- if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
- break;
- }
- }
- return value.length() == nextSuffix && c != '-';
- }
-
-
- //
- // CHAPTER 3: Logical Structures
- //
-
- /**
- * To validate, subclassers should at this time make sure that
- * values are of the declared types:<UL>
- * <LI> ID and IDREF(S) values are Names
- * <LI> NMTOKEN(S) are Nmtokens
- * <LI> ENUMERATION values match one of the tokens
- * <LI> NOTATION values match a notation name
- * <LI> ENTITIY(IES) values match an unparsed external entity
- * </UL>
- * <p/>
- * <P> Separately, make sure IDREF values match some ID
- * provided in the document (in the afterRoot method).
- */
-/* void validateAttributeSyntax (Attribute attr, String value)
- throws DTDParseException {
- // ID, IDREF(S) ... values are Names
- if (Attribute.ID == attr.type()) {
- if (!XmlNames.isName (value))
- error ("V-025", new Object [] { value });
-
- Boolean b = (Boolean) ids.getNonInterned (value);
- if (b == null || b.equals (Boolean.FALSE))
- ids.put (value.intern (), Boolean.TRUE);
- else
- error ("V-026", new Object [] { value });
-
- } else if (Attribute.IDREF == attr.type()) {
- if (!XmlNames.isName (value))
- error ("V-027", new Object [] { value });
-
- Boolean b = (Boolean) ids.getNonInterned (value);
- if (b == null)
- ids.put (value.intern (), Boolean.FALSE);
-
- } else if (Attribute.IDREFS == attr.type()) {
- StringTokenizer tokenizer = new StringTokenizer (value);
- Boolean b;
- boolean sawValue = false;
-
- while (tokenizer.hasMoreTokens ()) {
- value = tokenizer.nextToken ();
- if (!XmlNames.isName (value))
- error ("V-027", new Object [] { value });
- b = (Boolean) ids.getNonInterned (value);
- if (b == null)
- ids.put (value.intern (), Boolean.FALSE);
- sawValue = true;
- }
- if (!sawValue)
- error ("V-039", null);
-
-
- // NMTOKEN(S) ... values are Nmtoken(s)
- } else if (Attribute.NMTOKEN == attr.type()) {
- if (!XmlNames.isNmtoken (value))
- error ("V-028", new Object [] { value });
-
- } else if (Attribute.NMTOKENS == attr.type()) {
- StringTokenizer tokenizer = new StringTokenizer (value);
- boolean sawValue = false;
-
- while (tokenizer.hasMoreTokens ()) {
- value = tokenizer.nextToken ();
- if (!XmlNames.isNmtoken (value))
- error ("V-028", new Object [] { value });
- sawValue = true;
- }
- if (!sawValue)
- error ("V-032", null);
-
- // ENUMERATION ... values match one of the tokens
- } else if (Attribute.ENUMERATION == attr.type()) {
- for (int i = 0; i < attr.values().length; i++)
- if (value.equals (attr.values()[i]))
- return;
- error ("V-029", new Object [] { value });
-
- // NOTATION values match a notation name
- } else if (Attribute.NOTATION == attr.type()) {
- //
- // XXX XML 1.0 spec should probably list references to
- // externally defined notations in standalone docs as
- // validity errors. Ditto externally defined unparsed
- // entities; neither should show up in attributes, else
- // one needs to read the external declarations in order
- // to make sense of the document (exactly what tagging
- // a doc as "standalone" intends you won't need to do).
- //
- for (int i = 0; i < attr.values().length; i++)
- if (value.equals (attr.values()[i]))
- return;
- error ("V-030", new Object [] { value });
-
- // ENTITY(IES) values match an unparsed entity(ies)
- } else if (Attribute.ENTITY == attr.type()) {
- // see note above re standalone
- if (!isUnparsedEntity (value))
- error ("V-031", new Object [] { value });
-
- } else if (Attribute.ENTITIES == attr.type()) {
- StringTokenizer tokenizer = new StringTokenizer (value);
- boolean sawValue = false;
-
- while (tokenizer.hasMoreTokens ()) {
- value = tokenizer.nextToken ();
- // see note above re standalone
- if (!isUnparsedEntity (value))
- error ("V-031", new Object [] { value });
- sawValue = true;
- }
- if (!sawValue)
- error ("V-040", null);
-
- } else if (Attribute.CDATA != attr.type())
- throw new InternalError (attr.type());
- }
-*/
-/*
- private boolean isUnparsedEntity (String name)
- {
- Object e = entities.getNonInterned (name);
- if (e == null || !(e instanceof ExternalEntity))
- return false;
- return ((ExternalEntity)e).notation != null;
- }
-*/
- private boolean maybeElementDecl()
- throws IOException, SAXException {
-
- // [45] elementDecl ::= '<!ELEMENT' S Name S contentspec S? '>'
- // [46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children
- InputEntity start = peekDeclaration("!ELEMENT");
-
- if (start == null)
- return false;
-
- // n.b. for content models where inter-element whitespace is
- // ignorable, we mark that fact here.
- String name = getMarkupDeclname("F-015", true);
-// Element element = (Element) elements.get (name);
-// boolean declEffective = false;
-
-/*
- if (element != null) {
- if (element.contentModel() != null) {
- error ("V-012", new Object [] { name });
- } // else <!ATTLIST name ...> came first
- } else {
- element = new Element(name);
- elements.put (element.name(), element);
- declEffective = true;
- }
-*/
- if (declaredElements.contains(name))
- error("V-012", new Object[]{name});
- else {
- declaredElements.add(name);
-// declEffective = true;
- }
-
- short modelType;
- whitespace("F-000");
- if (peek(strEMPTY)) {
-/// // leave element.contentModel as null for this case.
- dtdHandler.startContentModel(name, modelType = DTDEventListener.CONTENT_MODEL_EMPTY);
- } else if (peek(strANY)) {
-/// element.setContentModel(new StringModel(StringModelType.ANY));
- dtdHandler.startContentModel(name, modelType = DTDEventListener.CONTENT_MODEL_ANY);
- } else {
- modelType = getMixedOrChildren(name);
- }
-
- dtdHandler.endContentModel(name, modelType);
-
- maybeWhitespace();
- char c = getc();
- if (c != '>')
- fatal("P-036", new Object[]{name, new Character(c)});
- if (start != in)
- error("V-013", null);
-
-/// dtdHandler.elementDecl(element);
-
- return true;
- }
-
- // We're leaving the content model as a regular expression;
- // it's an efficient natural way to express such things, and
- // libraries often interpret them. No whitespace in the
- // model we store, though!
-
- /**
- * returns content model type.
- */
- private short getMixedOrChildren(String elementName/*Element element*/)
- throws IOException, SAXException {
-
- InputEntity start;
-
- // [47] children ::= (choice|seq) ('?'|'*'|'+')?
- strTmp = new StringBuffer();
-
- nextChar('(', "F-028", elementName);
- start = in;
- maybeWhitespace();
- strTmp.append('(');
-
- short modelType;
- if (peek("#PCDATA")) {
- strTmp.append("#PCDATA");
- dtdHandler.startContentModel(elementName, modelType = DTDEventListener.CONTENT_MODEL_MIXED);
- getMixed(elementName, start);
- } else {
- dtdHandler.startContentModel(elementName, modelType = DTDEventListener.CONTENT_MODEL_CHILDREN);
- getcps(elementName, start);
- }
-
- return modelType;
- }
-
- // '(' S? already consumed
- // matching ')' must be in "start" entity if validating
- private void getcps(/*Element element,*/String elementName, InputEntity start)
- throws IOException, SAXException {
-
- // [48] cp ::= (Name|choice|seq) ('?'|'*'|'+')?
- // [49] choice ::= '(' S? cp (S? '|' S? cp)* S? ')'
- // [50] seq ::= '(' S? cp (S? ',' S? cp)* S? ')'
- boolean decided = false;
- char type = 0;
-// ContentModel retval, temp, current;
-
-// retval = temp = current = null;
-
- dtdHandler.startModelGroup();
-
- do {
- String tag;
-
- tag = maybeGetName();
- if (tag != null) {
- strTmp.append(tag);
-// temp = new ElementModel(tag);
-// getFrequency((RepeatableContent)temp);
-///->
- dtdHandler.childElement(tag, getFrequency());
-///<-
- } else if (peek("(")) {
- InputEntity next = in;
- strTmp.append('(');
- maybeWhitespace();
-// temp = getcps(element, next);
-// getFrequency(temp);
-///->
- getcps(elementName, next);
-/// getFrequency(); <- this looks like a bug
-///<-
- } else
- fatal((type == 0) ? "P-039" :
- ((type == ',') ? "P-037" : "P-038"),
- new Object[]{new Character(getc())});
-
- maybeWhitespace();
- if (decided) {
- char c = getc();
-
-// if (current != null) {
-// current.addChild(temp);
-// }
- if (c == type) {
- strTmp.append(type);
- maybeWhitespace();
- reportConnector(type);
- continue;
- } else if (c == '\u0029') { // rparen
- ungetc();
- continue;
- } else {
- fatal((type == 0) ? "P-041" : "P-040",
- new Object[]{
- new Character(c),
- new Character(type)
- });
- }
- } else {
- type = getc();
- switch (type) {
- case '|':
- case ',':
- reportConnector(type);
- break;
- default:
-// retval = temp;
- ungetc();
- continue;
- }
-// retval = (ContentModel)current;
- decided = true;
-// current.addChild(temp);
- strTmp.append(type);
- }
- maybeWhitespace();
- } while (!peek(")"));
-
- if (in != start)
- error("V-014", new Object[]{elementName});
- strTmp.append(')');
-
- dtdHandler.endModelGroup(getFrequency());
-// return retval;
- }
-
- private void reportConnector(char type) throws SAXException {
- switch (type) {
- case '|':
- dtdHandler.connector(DTDEventListener.CHOICE); ///<-
- return;
- case ',':
- dtdHandler.connector(DTDEventListener.SEQUENCE); ///<-
- return;
- default:
- throw new Error(); //assertion failed.
- }
- }
-
- private short getFrequency()
- throws IOException, SAXException {
-
- final char c = getc();
-
- if (c == '?') {
- strTmp.append(c);
- return DTDEventListener.OCCURENCE_ZERO_OR_ONE;
- // original.setRepeat(Repeat.ZERO_OR_ONE);
- } else if (c == '+') {
- strTmp.append(c);
- return DTDEventListener.OCCURENCE_ONE_OR_MORE;
- // original.setRepeat(Repeat.ONE_OR_MORE);
- } else if (c == '*') {
- strTmp.append(c);
- return DTDEventListener.OCCURENCE_ZERO_OR_MORE;
- // original.setRepeat(Repeat.ZERO_OR_MORE);
- } else {
- ungetc();
- return DTDEventListener.OCCURENCE_ONCE;
- }
- }
-
- // '(' S? '#PCDATA' already consumed
- // matching ')' must be in "start" entity if validating
- private void getMixed(String elementName, /*Element element,*/ InputEntity start)
- throws IOException, SAXException {
-
- // [51] Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*'
- // | '(' S? '#PCDATA' S? ')'
- maybeWhitespace();
- if (peek("\u0029*") || peek("\u0029")) {
- if (in != start)
- error("V-014", new Object[]{elementName});
- strTmp.append(')');
-// element.setContentModel(new StringModel(StringModelType.PCDATA));
- return;
- }
-
- ArrayList l = new ArrayList();
-// l.add(new StringModel(StringModelType.PCDATA));
-
-
- while (peek("|")) {
- String name;
-
- strTmp.append('|');
- maybeWhitespace();
-
- doLexicalPE = true;
- name = maybeGetName();
- if (name == null)
- fatal("P-042", new Object[]
- {elementName, Integer.toHexString(getc())});
- if (l.contains(name)) {
- error("V-015", new Object[]{name});
- } else {
- l.add(name);
- dtdHandler.mixedElement(name);
- }
- strTmp.append(name);
- maybeWhitespace();
- }
-
- if (!peek("\u0029*")) // right paren
- fatal("P-043", new Object[]
- {elementName, new Character(getc())});
- if (in != start)
- error("V-014", new Object[]{elementName});
- strTmp.append(')');
-// ChoiceModel cm = new ChoiceModel((Collection)l);
-// cm.setRepeat(Repeat.ZERO_OR_MORE);
-// element.setContentModel(cm);
- }
-
- private boolean maybeAttlistDecl()
- throws IOException, SAXException {
-
- // [52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>'
- InputEntity start = peekDeclaration("!ATTLIST");
-
- if (start == null)
- return false;
-
- String elementName = getMarkupDeclname("F-016", true);
-// Element element = (Element) elements.get (name);
-
-// if (element == null) {
-// // not yet declared -- no problem.
-// element = new Element(name);
-// elements.put(name, element);
-// }
-
- while (!peek(">")) {
-
- // [53] AttDef ::= S Name S AttType S DefaultDecl
- // [54] AttType ::= StringType | TokenizedType | EnumeratedType
-
- // look for global attribute definitions, don't expand for now...
- maybeWhitespace();
- char c = getc();
- if (c == '%') {
- String entityName = maybeGetName();
- if (entityName != null) {
- nextChar(';', "F-021", entityName);
- whitespace("F-021");
- continue;
- } else
- fatal("P-011");
- }
-
- ungetc();
- // look for attribute name otherwise
- String attName = maybeGetName();
- if (attName == null) {
- fatal("P-044", new Object[]{new Character(getc())});
- }
- whitespace("F-001");
-
-/// Attribute a = new Attribute (name);
-
- String typeName;
- Vector values = null; // notation/enumeration values
-
- // Note: use the type constants from Attribute
- // so that "==" may be used (faster)
-
- // [55] StringType ::= 'CDATA'
- if (peek(TYPE_CDATA))
-/// a.setType(Attribute.CDATA);
- typeName = TYPE_CDATA;
-
- // [56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS'
- // | 'ENTITY' | 'ENTITIES'
- // | 'NMTOKEN' | 'NMTOKENS'
- // n.b. if "IDREFS" is there, both "ID" and "IDREF"
- // match peekahead ... so this order matters!
- else if (peek(TYPE_IDREFS))
- typeName = TYPE_IDREFS;
- else if (peek(TYPE_IDREF))
- typeName = TYPE_IDREF;
- else if (peek(TYPE_ID)) {
- typeName = TYPE_ID;
-// TODO: should implement this error check?
-/// if (element.id() != null) {
-/// error ("V-016", new Object [] { element.id() });
-/// } else
-/// element.setId(name);
- } else if (peek(TYPE_ENTITY))
- typeName = TYPE_ENTITY;
- else if (peek(TYPE_ENTITIES))
- typeName = TYPE_ENTITIES;
- else if (peek(TYPE_NMTOKENS))
- typeName = TYPE_NMTOKENS;
- else if (peek(TYPE_NMTOKEN))
- typeName = TYPE_NMTOKEN;
-
- // [57] EnumeratedType ::= NotationType | Enumeration
- // [58] NotationType ::= 'NOTATION' S '(' S? Name
- // (S? '|' S? Name)* S? ')'
- else if (peek(TYPE_NOTATION)) {
- typeName = TYPE_NOTATION;
- whitespace("F-002");
- nextChar('(', "F-029", null);
- maybeWhitespace();
-
- values = new Vector();
- do {
- String name;
- if ((name = maybeGetName()) == null)
- fatal("P-068");
- // permit deferred declarations
- if (notations.get(name) == null)
- notations.put(name, name);
- values.addElement(name);
- maybeWhitespace();
- if (peek("|"))
- maybeWhitespace();
- } while (!peek(")"));
-/// a.setValues(new String [v.size ()]);
-/// for (int i = 0; i < v.size (); i++)
-/// a.setValue(i, (String)v.elementAt(i));
-
- // [59] Enumeration ::= '(' S? Nmtoken (S? '|' Nmtoken)* S? ')'
- } else if (peek("(")) {
-/// a.setType(Attribute.ENUMERATION);
- typeName = TYPE_ENUMERATION;
-
- maybeWhitespace();
-
-/// Vector v = new Vector ();
- values = new Vector();
- do {
- String name = getNmtoken();
-/// v.addElement (name);
- values.addElement(name);
- maybeWhitespace();
- if (peek("|"))
- maybeWhitespace();
- } while (!peek(")"));
-/// a.setValues(new String [v.size ()]);
-/// for (int i = 0; i < v.size (); i++)
-/// a.setValue(i, (String)v.elementAt(i));
- } else {
- fatal("P-045",
- new Object[]{attName, new Character(getc())});
- typeName = null;
- }
-
- short attributeUse;
- String defaultValue = null;
-
- // [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED'
- // | (('#FIXED' S)? AttValue)
- whitespace("F-003");
- if (peek("#REQUIRED"))
- attributeUse = DTDEventListener.USE_REQUIRED;
-/// a.setIsRequired(true);
- else if (peek("#FIXED")) {
-/// if (a.type() == Attribute.ID)
- if (typeName == TYPE_ID)
- error("V-017", new Object[]{attName});
-/// a.setIsFixed(true);
- attributeUse = DTDEventListener.USE_FIXED;
- whitespace("F-004");
- parseLiteral(false);
-/// if (a.type() != Attribute.CDATA)
-/// a.setDefaultValue(normalize(false));
-/// else
-/// a.setDefaultValue(strTmp.toString());
-
- if (typeName == TYPE_CDATA)
- defaultValue = normalize(false);
- else
- defaultValue = strTmp.toString();
-
-// TODO: implement this check
-/// if (a.type() != Attribute.CDATA)
-/// validateAttributeSyntax (a, a.defaultValue());
- } else if (!peek("#IMPLIED")) {
- attributeUse = DTDEventListener.USE_IMPLIED;
-
-/// if (a.type() == Attribute.ID)
- if (typeName == TYPE_ID)
- error("V-018", new Object[]{attName});
- parseLiteral(false);
-/// if (a.type() != Attribute.CDATA)
-/// a.setDefaultValue(normalize(false));
-/// else
-/// a.setDefaultValue(strTmp.toString());
- if (typeName == TYPE_CDATA)
- defaultValue = normalize(false);
- else
- defaultValue = strTmp.toString();
-
-// TODO: implement this check
-/// if (a.type() != Attribute.CDATA)
-/// validateAttributeSyntax (a, a.defaultValue());
- } else {
- // TODO: this looks like an fatal error.
- attributeUse = DTDEventListener.USE_NORMAL;
- }
-
- if (XmlLang.equals(attName)
- && defaultValue/* a.defaultValue()*/ != null
- && !isXmlLang(defaultValue/*a.defaultValue()*/))
- error("P-033", new Object[]{defaultValue /*a.defaultValue()*/});
-
-// TODO: isn't it an error to specify the same attribute twice?
-/// if (!element.attributes().contains(a)) {
-/// element.addAttribute(a);
-/// dtdHandler.attributeDecl(a);
-/// }
-
- String[] v = (values != null) ? (String[]) values.toArray(new String[0]) : null;
- dtdHandler.attributeDecl(elementName, attName, typeName, v, attributeUse, defaultValue);
- maybeWhitespace();
- }
- if (start != in)
- error("V-013", null);
- return true;
- }
-
- // used when parsing literal attribute values,
- // or public identifiers.
- //
- // input in strTmp
- private String normalize(boolean invalidIfNeeded) {
-
- // this can allocate an extra string...
-
- String s = strTmp.toString();
- String s2 = s.trim();
- boolean didStrip = false;
-
- if (s != s2) {
- s = s2;
- s2 = null;
- didStrip = true;
- }
- strTmp = new StringBuffer();
- for (int i = 0; i < s.length(); i++) {
- char c = s.charAt(i);
- if (!XmlChars.isSpace(c)) {
- strTmp.append(c);
- continue;
- }
- strTmp.append(' ');
- while (++i < s.length() && XmlChars.isSpace(s.charAt(i)))
- didStrip = true;
- i--;
- }
- if (didStrip)
- return strTmp.toString();
- else
- return s;
- }
-
- private boolean maybeConditionalSect()
- throws IOException, SAXException {
-
- // [61] conditionalSect ::= includeSect | ignoreSect
-
- if (!peek("<!["))
- return false;
-
- String keyword;
- InputEntity start = in;
-
- maybeWhitespace();
-
- if ((keyword = maybeGetName()) == null)
- fatal("P-046");
- maybeWhitespace();
- nextChar('[', "F-030", null);
-
- // [62] includeSect ::= '<![' S? 'INCLUDE' S? '['
- // extSubsetDecl ']]>'
- if ("INCLUDE".equals(keyword)) {
- for (; ;) {
- while (in.isEOF() && in != start)
- in = in.pop();
- if (in.isEOF()) {
- error("V-020", null);
- }
- if (peek("]]>"))
- break;
-
- doLexicalPE = false;
- if (maybeWhitespace())
- continue;
- if (maybePEReference())
- continue;
- doLexicalPE = true;
- if (maybeMarkupDecl() || maybeConditionalSect())
- continue;
-
- fatal("P-047");
- }
-
- // [63] ignoreSect ::= '<![' S? 'IGNORE' S? '['
- // ignoreSectcontents ']]>'
- // [64] ignoreSectcontents ::= Ignore ('<!['
- // ignoreSectcontents ']]>' Ignore)*
- // [65] Ignore ::= Char* - (Char* ('<![' | ']]>') Char*)
- } else if ("IGNORE".equals(keyword)) {
- int nestlevel = 1;
- // ignoreSectcontents
- doLexicalPE = false;
- while (nestlevel > 0) {
- char c = getc(); // will pop input entities
- if (c == '<') {
- if (peek("!["))
- nestlevel++;
- } else if (c == ']') {
- if (peek("]>"))
- nestlevel--;
- } else
- continue;
- }
- } else
- fatal("P-048", new Object[]{keyword});
- return true;
- }
-
-
- //
- // CHAPTER 4: Physical Structures
- //
-
- // parse decimal or hex numeric character reference
- private int parseCharNumber()
- throws IOException, SAXException {
-
- char c;
- int retval = 0;
-
- // n.b. we ignore overflow ...
- if (getc() != 'x') {
- ungetc();
- for (; ;) {
- c = getc();
- if (c >= '0' && c <= '9') {
- retval *= 10;
- retval += (c - '0');
- continue;
- }
- if (c == ';')
- return retval;
- fatal("P-049");
- }
- } else
- for (; ;) {
- c = getc();
- if (c >= '0' && c <= '9') {
- retval <<= 4;
- retval += (c - '0');
- continue;
- }
- if (c >= 'a' && c <= 'f') {
- retval <<= 4;
- retval += 10 + (c - 'a');
- continue;
- }
- if (c >= 'A' && c <= 'F') {
- retval <<= 4;
- retval += 10 + (c - 'A');
- continue;
- }
- if (c == ';')
- return retval;
- fatal("P-050");
- }
- }
-
- // parameter is a UCS-4 character ... i.e. not just 16 bit UNICODE,
- // though still subject to the 'Char' construct in XML
- private int surrogatesToCharTmp(int ucs4)
- throws SAXException {
-
- if (ucs4 <= 0xffff) {
- if (XmlChars.isChar(ucs4)) {
- charTmp[0] = (char) ucs4;
- return 1;
- }
- } else if (ucs4 <= 0x0010ffff) {
- // we represent these as UNICODE surrogate pairs
- ucs4 -= 0x10000;
- charTmp[0] = (char) (0xd800 | ((ucs4 >> 10) & 0x03ff));
- charTmp[1] = (char) (0xdc00 | (ucs4 & 0x03ff));
- return 2;
- }
- fatal("P-051", new Object[]{Integer.toHexString(ucs4)});
- // NOTREACHED
- return -1;
- }
-
- private boolean maybePEReference()
- throws IOException, SAXException {
-
- // This is the SYNTACTIC version of this construct.
- // When processing external entities, there is also
- // a LEXICAL version; see getc() and doLexicalPE.
-
- // [69] PEReference ::= '%' Name ';'
- if (!in.peekc('%'))
- return false;
-
- String name = maybeGetName();
- Object entity;
-
- if (name == null)
- fatal("P-011");
- nextChar(';', "F-021", name);
- entity = params.get(name);
-
- if (entity instanceof InternalEntity) {
- InternalEntity value = (InternalEntity) entity;
- pushReader(value.buf, name, false);
-
- } else if (entity instanceof ExternalEntity) {
- pushReader((ExternalEntity) entity);
- externalParameterEntity((ExternalEntity) entity);
-
- } else if (entity == null) {
- error("V-022", new Object[]{name});
- }
- return true;
- }
-
- private boolean maybeEntityDecl()
- throws IOException, SAXException {
-
- // [70] EntityDecl ::= GEDecl | PEDecl
- // [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>'
- // [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDEF S? '>'
- // [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)
- // [74] PEDef ::= EntityValue | ExternalID
- //
- InputEntity start = peekDeclaration("!ENTITY");
-
- if (start == null)
- return false;
-
- String entityName;
- SimpleHashtable defns;
- ExternalEntity externalId;
- boolean doStore;
-
- // PE expansion gets selectively turned off several places:
- // in ENTITY declarations (here), in comments, in PIs.
-
- // Here, we allow PE entities to be declared, and allows
- // literals to include PE refs without the added spaces
- // required with their expansion in markup decls.
-
- doLexicalPE = false;
- whitespace("F-005");
- if (in.peekc('%')) {
- whitespace("F-006");
- defns = params;
- } else
- defns = entities;
-
- ungetc(); // leave some whitespace
- doLexicalPE = true;
- entityName = getMarkupDeclname("F-017", false);
- whitespace("F-007");
- externalId = maybeExternalID();
-
- //
- // first definition sticks ... e.g. internal subset PEs are used
- // to override DTD defaults. It's also an "error" to incorrectly
- // redefine builtin internal entities, but since reporting such
- // errors is optional we only give warnings ("just in case") for
- // non-parameter entities.
- //
- doStore = (defns.get(entityName) == null);
- if (!doStore && defns == entities)
- warning("P-054", new Object[]{entityName});
-
- // internal entities
- if (externalId == null) {
- char value [];
- InternalEntity entity;
-
- doLexicalPE = false; // "ab%bar;cd" -maybe-> "abcd"
- parseLiteral(true);
- doLexicalPE = true;
- if (doStore) {
- value = new char[strTmp.length()];
- if (value.length != 0)
- strTmp.getChars(0, value.length, value, 0);
- entity = new InternalEntity(entityName, value);
- entity.isPE = (defns == params);
- entity.isFromInternalSubset = false;
- defns.put(entityName, entity);
- if (defns == entities)
- dtdHandler.internalGeneralEntityDecl(entityName,
- new String(value));
- }
-
- // external entities (including unparsed)
- } else {
- // [76] NDataDecl ::= S 'NDATA' S Name
- if (defns == entities && maybeWhitespace()
- && peek("NDATA")) {
- externalId.notation = getMarkupDeclname("F-018", false);
-
- // flag undeclared notation for checking after
- // the DTD is fully processed
- if (notations.get(externalId.notation) == null)
- notations.put(externalId.notation, Boolean.TRUE);
- }
- externalId.name = entityName;
- externalId.isPE = (defns == params);
- externalId.isFromInternalSubset = false;
- if (doStore) {
- defns.put(entityName, externalId);
- if (externalId.notation != null)
- dtdHandler.unparsedEntityDecl(entityName,
- externalId.publicId, externalId.systemId,
- externalId.notation);
- else if (defns == entities)
- dtdHandler.externalGeneralEntityDecl(entityName,
- externalId.publicId, externalId.systemId);
- }
- }
- maybeWhitespace();
- nextChar('>', "F-031", entityName);
- if (start != in)
- error("V-013", null);
- return true;
- }
-
- private ExternalEntity maybeExternalID()
- throws IOException, SAXException {
-
- // [75] ExternalID ::= 'SYSTEM' S SystemLiteral
- // | 'PUBLIC' S' PubidLiteral S Systemliteral
- String temp = null;
- ExternalEntity retval;
-
- if (peek("PUBLIC")) {
- whitespace("F-009");
- temp = parsePublicId();
- } else if (!peek("SYSTEM"))
- return null;
-
- retval = new ExternalEntity(in);
- retval.publicId = temp;
- whitespace("F-008");
- retval.systemId = parseSystemId();
- return retval;
- }
-
- private String parseSystemId()
- throws IOException, SAXException {
-
- String uri = getQuotedString("F-034", null);
- int temp = uri.indexOf(':');
-
- // resolve relative URIs ... must do it here since
- // it's relative to the source file holding the URI!
-
- // "new java.net.URL (URL, string)" conforms to RFC 1630,
- // but we can't use that except when the URI is a URL.
- // The entity resolver is allowed to handle URIs that are
- // not URLs, so we pass URIs through with scheme intact
- if (temp == -1 || uri.indexOf('/') < temp) {
- String baseURI;
-
- baseURI = in.getSystemId();
- if (baseURI == null)
- fatal("P-055", new Object[]{uri});
- if (uri.length() == 0)
- uri = ".";
- baseURI = baseURI.substring(0, baseURI.lastIndexOf('/') + 1);
- if (uri.charAt(0) != '/')
- uri = baseURI + uri;
- else {
- // XXX slashes at the beginning of a relative URI are
- // a special case we don't handle.
- throw new InternalError();
- }
-
- // letting other code map any "/xxx/../" or "/./" to "/",
- // since all URIs must handle it the same.
- }
- // check for fragment ID in URI
- if (uri.indexOf('#') != -1)
- error("P-056", new Object[]{uri});
- return uri;
- }
-
- private void maybeTextDecl()
- throws IOException, SAXException {
-
- // [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>'
- if (peek("<?xml")) {
- readVersion(false, "1.0");
- readEncoding(true);
- maybeWhitespace();
- if (!peek("?>"))
- fatal("P-057");
- }
- }
-
- private void externalParameterEntity(ExternalEntity next)
- throws IOException, SAXException {
-
- //
- // Reap the intended benefits of standalone declarations:
- // don't deal with external parameter entities, except to
- // validate the standalone declaration.
- //
-
- // n.b. "in external parameter entities" (and external
- // DTD subset, same grammar) parameter references can
- // occur "within" markup declarations ... expansions can
- // cross syntax rules. Flagged here; affects getc().
-
- // [79] ExtPE ::= TextDecl? extSubsetDecl
- // [31] extSubsetDecl ::= ( markupdecl | conditionalSect
- // | PEReference | S )*
- InputEntity pe;
-
- // XXX if this returns false ...
-
- pe = in;
- maybeTextDecl();
- while (!pe.isEOF()) {
- // pop internal PEs (and whitespace before/after)
- if (in.isEOF()) {
- in = in.pop();
- continue;
- }
- doLexicalPE = false;
- if (maybeWhitespace())
- continue;
- if (maybePEReference())
- continue;
- doLexicalPE = true;
- if (maybeMarkupDecl() || maybeConditionalSect())
- continue;
- break;
- }
- // if (in != pe) throw new InternalError("who popped my PE?");
- if (!pe.isEOF())
- fatal("P-059", new Object[]{in.getName()});
- }
-
- private void readEncoding(boolean must)
- throws IOException, SAXException {
-
- // [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
- String name = maybeReadAttribute("encoding", must);
-
- if (name == null)
- return;
- for (int i = 0; i < name.length(); i++) {
- char c = name.charAt(i);
- if ((c >= 'A' && c <= 'Z')
- || (c >= 'a' && c <= 'z'))
- continue;
- if (i != 0
- && ((c >= '0' && c <= '9')
- || c == '-'
- || c == '_'
- || c == '.'
- ))
- continue;
- fatal("P-060", new Object[]{new Character(c)});
- }
-
- //
- // This should be the encoding in use, and it's even an error for
- // it to be anything else (in certain cases that are impractical to
- // to test, and may even be insufficient). So, we do the best we
- // can, and warn if things look suspicious. Note that Java doesn't
- // uniformly expose the encodings, and that the names it uses
- // internally are nonstandard. Also, that the XML spec allows
- // such "errors" not to be reported at all.
- //
- String currentEncoding = in.getEncoding();
-
- if (currentEncoding != null
- && !name.equalsIgnoreCase(currentEncoding))
- warning("P-061", new Object[]{name, currentEncoding});
- }
-
- private boolean maybeNotationDecl()
- throws IOException, SAXException {
-
- // [82] NotationDecl ::= '<!NOTATION' S Name S
- // (ExternalID | PublicID) S? '>'
- // [83] PublicID ::= 'PUBLIC' S PubidLiteral
- InputEntity start = peekDeclaration("!NOTATION");
-
- if (start == null)
- return false;
-
- String name = getMarkupDeclname("F-019", false);
- ExternalEntity entity = new ExternalEntity(in);
-
- whitespace("F-011");
- if (peek("PUBLIC")) {
- whitespace("F-009");
- entity.publicId = parsePublicId();
- if (maybeWhitespace()) {
- if (!peek(">"))
- entity.systemId = parseSystemId();
- else
- ungetc();
- }
- } else if (peek("SYSTEM")) {
- whitespace("F-008");
- entity.systemId = parseSystemId();
- } else
- fatal("P-062");
- maybeWhitespace();
- nextChar('>', "F-032", name);
- if (start != in)
- error("V-013", null);
- if (entity.systemId != null && entity.systemId.indexOf('#') != -1)
- error("P-056", new Object[]{entity.systemId});
-
- Object value = notations.get(name);
- if (value != null && value instanceof ExternalEntity)
- warning("P-063", new Object[]{name});
-
- else {
- notations.put(name, entity);
- dtdHandler.notationDecl(name, entity.publicId,
- entity.systemId);
- }
- return true;
- }
-
-
- ////////////////////////////////////////////////////////////////
- //
- // UTILITIES
- //
- ////////////////////////////////////////////////////////////////
-
- private char getc() throws IOException, SAXException {
-
- if (!doLexicalPE) {
- char c = in.getc();
- return c;
- }
-
- //
- // External parameter entities get funky processing of '%param;'
- // references. It's not clearly defined in the XML spec; but it
- // boils down to having those refs be _lexical_ in most cases to
- // include partial syntax productions. It also needs selective
- // enabling; "<!ENTITY % foo ...>" must work, for example, and
- // if "bar" is an empty string PE, "ab%bar;cd" becomes "abcd"
- // if it's expanded in a literal, else "ab cd". PEs also do
- // not expand within comments or PIs, and external PEs are only
- // allowed to have markup decls (and so aren't handled lexically).
- //
- // This PE handling should be merged into maybeWhitespace, where
- // it can be dealt with more consistently.
- //
- // Also, there are some validity constraints in this area.
- //
- char c;
-
- while (in.isEOF()) {
- if (in.isInternal() || (doLexicalPE && !in.isDocument()))
- in = in.pop();
- else {
- fatal("P-064", new Object[]{in.getName()});
- }
- }
- if ((c = in.getc()) == '%' && doLexicalPE) {
- // PE ref ::= '%' name ';'
- String name = maybeGetName();
- Object entity;
-
- if (name == null)
- fatal("P-011");
- nextChar(';', "F-021", name);
- entity = params.get(name);
-
- // push a magic "entity" before and after the
- // real one, so ungetc() behaves uniformly
- pushReader(" ".toCharArray(), null, false);
- if (entity instanceof InternalEntity)
- pushReader(((InternalEntity) entity).buf, name, false);
- else if (entity instanceof ExternalEntity)
- // PEs can't be unparsed!
- // XXX if this returns false ...
- pushReader((ExternalEntity) entity);
- else if (entity == null)
- // see note in maybePEReference re making this be nonfatal.
- fatal("V-022");
- else
- throw new InternalError();
- pushReader(" ".toCharArray(), null, false);
- return in.getc();
- }
- return c;
- }
-
- private void ungetc() {
-
- in.ungetc();
- }
-
- private boolean peek(String s)
- throws IOException, SAXException {
-
- return in.peek(s, null);
- }
-
- // Return the entity starting the specified declaration
- // (for validating declaration nesting) else null.
-
- private InputEntity peekDeclaration(String s)
- throws IOException, SAXException {
-
- InputEntity start;
-
- if (!in.peekc('<'))
- return null;
- start = in;
- if (in.peek(s, null))
- return start;
- in.ungetc();
- return null;
- }
-
- private void nextChar(char c, String location, String near)
- throws IOException, SAXException {
-
- while (in.isEOF() && !in.isDocument())
- in = in.pop();
- if (!in.peekc(c))
- fatal("P-008", new Object[]
- {new Character(c),
- messages.getMessage(locale, location),
- (near == null ? "" : ('"' + near + '"'))});
- }
-
-
- private void pushReader(char buf [], String name, boolean isGeneral)
- throws SAXException {
-
- InputEntity r = InputEntity.getInputEntity(dtdHandler, locale);
- r.init(buf, name, in, !isGeneral);
- in = r;
- }
-
- private boolean pushReader(ExternalEntity next)
- throws IOException, SAXException {
-
- InputEntity r = InputEntity.getInputEntity(dtdHandler, locale);
- InputSource s;
- try {
- s = next.getInputSource(resolver);
- } catch (IOException e) {
- String msg =
- "unable to open the external entity from :" + next.systemId;
- if (next.publicId != null)
- msg += " (public id:" + next.publicId + ")";
-
- SAXParseException spe = new SAXParseException(msg,
- getPublicId(), getSystemId(), getLineNumber(), getColumnNumber(), e);
- dtdHandler.fatalError(spe);
- throw e;
- }
-
- r.init(s, next.name, in, next.isPE);
- in = r;
- return true;
- }
-
- public String getPublicId() {
-
- return (in == null) ? null : in.getPublicId();
- }
-
- public String getSystemId() {
-
- return (in == null) ? null : in.getSystemId();
- }
-
- public int getLineNumber() {
-
- return (in == null) ? -1 : in.getLineNumber();
- }
-
- public int getColumnNumber() {
-
- return (in == null) ? -1 : in.getColumnNumber();
- }
-
- // error handling convenience routines
-
- private void warning(String messageId, Object parameters [])
- throws SAXException {
-
- SAXParseException e = new SAXParseException(messages.getMessage(locale, messageId, parameters),
- getPublicId(), getSystemId(), getLineNumber(), getColumnNumber());
-
- dtdHandler.warning(e);
- }
-
- void error(String messageId, Object parameters [])
- throws SAXException {
-
- SAXParseException e = new SAXParseException(messages.getMessage(locale, messageId, parameters),
- getPublicId(), getSystemId(), getLineNumber(), getColumnNumber());
-
- dtdHandler.error(e);
- }
-
- private void fatal(String messageId) throws SAXException {
-
- fatal(messageId, null);
- }
-
- private void fatal(String messageId, Object parameters [])
- throws SAXException {
-
- SAXParseException e = new SAXParseException(messages.getMessage(locale, messageId, parameters),
- getPublicId(), getSystemId(), getLineNumber(), getColumnNumber());
-
- dtdHandler.fatalError(e);
-
- throw e;
- }
-
- //
- // Map char arrays to strings ... cuts down both on memory and
- // CPU usage for element/attribute/other names that are reused.
- //
- // Documents typically repeat names a lot, so we more or less
- // intern all the strings within the document; since some strings
- // are repeated in multiple documents (e.g. stylesheets) we go
- // a bit further, and intern globally.
- //
- static class NameCache {
- //
- // Unless we auto-grow this, the default size should be a
- // reasonable bit larger than needed for most XML files
- // we've yet seen (and be prime). If it's too small, the
- // penalty is just excess cache collisions.
- //
- NameCacheEntry hashtable [] = new NameCacheEntry[541];
-
- //
- // Usually we just want to get the 'symbol' for these chars
- //
- String lookup(char value [], int len) {
-
- return lookupEntry(value, len).name;
- }
-
- //
- // Sometimes we need to scan the chars in the resulting
- // string, so there's an accessor which exposes them.
- // (Mostly for element end tags.)
- //
- NameCacheEntry lookupEntry(char value [], int len) {
-
- int index = 0;
- NameCacheEntry entry;
-
- // hashing to get index
- for (int i = 0; i < len; i++)
- index = index * 31 + value[i];
- index &= 0x7fffffff;
- index %= hashtable.length;
-
- // return entry if one's there ...
- for (entry = hashtable[index];
- entry != null;
- entry = entry.next) {
- if (entry.matches(value, len))
- return entry;
- }
-
- // else create new one
- entry = new NameCacheEntry();
- entry.chars = new char[len];
- System.arraycopy(value, 0, entry.chars, 0, len);
- entry.name = new String(entry.chars);
- //
- // NOTE: JDK 1.1 has a fixed size string intern table,
- // with non-GC'd entries. It can panic here; that's a
- // JDK problem, use 1.2 or later with many identifiers.
- //
- entry.name = entry.name.intern(); // "global" intern
- entry.next = hashtable[index];
- hashtable[index] = entry;
- return entry;
- }
- }
-
- static class NameCacheEntry {
-
- String name;
- char chars [];
- NameCacheEntry next;
-
- boolean matches(char value [], int len) {
-
- if (chars.length != len)
- return false;
- for (int i = 0; i < len; i++)
- if (value[i] != chars[i])
- return false;
- return true;
- }
- }
-
- //
- // Message catalog for diagnostics.
- //
- static final Catalog messages = new Catalog();
-
- static final class Catalog extends MessageCatalog {
-
- Catalog() {
- super(DTDParser.class);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/EndOfInputException.java b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/EndOfInputException.java
deleted file mode 100644
index a7cc5224..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/EndOfInputException.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dtdparser;
-
-import java.io.IOException;
-
-class EndOfInputException extends IOException {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/EntityDecl.java b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/EntityDecl.java
deleted file mode 100644
index 9db54f68..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/EntityDecl.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dtdparser;
-
-/**
- * Base class for entity declarations as used by the parser.
- *
- * @author David Brownell
- * @author Janet Koenig
- * @version 1.3 00/02/24
- */
-class EntityDecl {
- String name; // <!ENTITY name ... >
-
- boolean isFromInternalSubset;
- boolean isPE;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/ExternalEntity.java b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/ExternalEntity.java
deleted file mode 100644
index aa396902..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/ExternalEntity.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dtdparser;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-import java.net.URL;
-
-final class ExternalEntity extends EntityDecl {
- String systemId; // resolved URI (not relative)
- String publicId; // "-//xyz//....//en"
- String notation;
-
- public ExternalEntity(InputEntity in) {
- }
-
- public InputSource getInputSource(EntityResolver r)
- throws IOException, SAXException {
-
- InputSource retval;
-
- retval = r.resolveEntity(publicId, systemId);
- // SAX sez if null is returned, use the URI directly
- if (retval == null)
- retval = Resolver.createInputSource(new URL(systemId), false);
- return retval;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/InputEntity.java b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/InputEntity.java
deleted file mode 100644
index 65a0b7bf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/InputEntity.java
+++ /dev/null
@@ -1,990 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dtdparser;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import java.io.CharConversionException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.UnsupportedEncodingException;
-import java.net.URL;
-import java.util.Locale;
-
-/**
- * This is how the parser talks to its input entities, of all kinds.
- * The entities are in a stack.
- * <p/>
- * <P> For internal entities, the character arrays are referenced here,
- * and read from as needed (they're read-only). External entities have
- * mutable buffers, that are read into as needed.
- * <p/>
- * <P> <em>Note:</em> This maps CRLF (and CR) to LF without regard for
- * whether it's in an external (parsed) entity or not. The XML 1.0 spec
- * is inconsistent in explaining EOL handling; this is the sensible way.
- *
- * @author David Brownell
- * @author Janet Koenig
- * @version 1.4 00/08/05
- */
-public class InputEntity {
- private int start, finish;
- private char buf [];
- private int lineNumber = 1;
- private boolean returnedFirstHalf = false;
- private boolean maybeInCRLF = false;
-
- // name of entity (never main document or unnamed DTD PE)
- private String name;
-
- private InputEntity next;
-
- // for system and public IDs in diagnostics
- private InputSource input;
-
- // this is a buffer; some buffers can be replenished.
- private Reader reader;
- private boolean isClosed;
-
- private DTDEventListener errHandler;
- private Locale locale;
-
- private StringBuffer rememberedText;
- private int startRemember;
-
- // record if this is a PE, so endParsedEntity won't be called
- private boolean isPE;
-
- // InputStreamReader throws an internal per-read exception, so
- // we minimize reads. We also add a byte to compensate for the
- // "ungetc" byte we keep, so that our downstream reads are as
- // nicely sized as we can make them.
- final private static int BUFSIZ = 8 * 1024 + 1;
-
- final private static char newline [] = {'\n'};
-
- public static InputEntity getInputEntity(DTDEventListener h, Locale l) {
- InputEntity retval = new InputEntity();
- retval.errHandler = h;
- retval.locale = l;
- return retval;
- }
-
- private InputEntity() {
- }
-
- //
- // predicate: return true iff this is an internal entity reader,
- // and so may safely be "popped" as needed. external entities have
- // syntax to uphold; internal parameter entities have at most validity
- // constraints to monitor. also, only external entities get decent
- // location diagnostics.
- //
- public boolean isInternal() {
- return reader == null;
- }
-
- //
- // predicate: return true iff this is the toplevel document
- //
- public boolean isDocument() {
- return next == null;
- }
-
- //
- // predicate: return true iff this is a PE expansion (so that
- // LexicalEventListner.endParsedEntity won't be called)
- //
- public boolean isParameterEntity() {
- return isPE;
- }
-
- //
- // return name of current entity
- //
- public String getName() {
- return name;
- }
-
- //
- // use this for an external parsed entity
- //
- public void init(InputSource in, String name, InputEntity stack,
- boolean isPE)
- throws IOException, SAXException {
-
- input = in;
- this.isPE = isPE;
- reader = in.getCharacterStream();
-
- if (reader == null) {
- InputStream bytes = in.getByteStream();
-
- if (bytes == null)
- reader = XmlReader.createReader(new URL(in.getSystemId())
- .openStream());
- else if (in.getEncoding() != null)
- reader = XmlReader.createReader(in.getByteStream(),
- in.getEncoding());
- else
- reader = XmlReader.createReader(in.getByteStream());
- }
- next = stack;
- buf = new char[BUFSIZ];
- this.name = name;
- checkRecursion(stack);
- }
-
- //
- // use this for an internal parsed entity; buffer is readonly
- //
- public void init(char b [], String name, InputEntity stack, boolean isPE)
- throws SAXException {
-
- next = stack;
- buf = b;
- finish = b.length;
- this.name = name;
- this.isPE = isPE;
- checkRecursion(stack);
- }
-
- private void checkRecursion(InputEntity stack)
- throws SAXException {
-
- if (stack == null)
- return;
- for (stack = stack.next; stack != null; stack = stack.next) {
- if (stack.name != null && stack.name.equals(name))
- fatal("P-069", new Object[]{name});
- }
- }
-
- public InputEntity pop() throws IOException {
-
- // caller has ensured there's nothing left to read
- close();
- return next;
- }
-
- /**
- * returns true iff there's no more data to consume ...
- */
- public boolean isEOF() throws IOException, SAXException {
-
- // called to ensure WF-ness of included entities and to pop
- // input entities appropriately ... EOF is not always legal.
- if (start >= finish) {
- fillbuf();
- return start >= finish;
- } else
- return false;
- }
-
- /**
- * Returns the name of the encoding in use, else null; the name
- * returned is in as standard a form as we can get.
- */
- public String getEncoding() {
-
- if (reader == null)
- return null;
- if (reader instanceof XmlReader)
- return ((XmlReader) reader).getEncoding();
-
- // XXX prefer a java2std() call to normalize names...
-
- if (reader instanceof InputStreamReader)
- return ((InputStreamReader) reader).getEncoding();
- return null;
- }
-
-
- /**
- * returns the next name char, or NUL ... faster than getc(),
- * and the common "name or nmtoken must be next" case won't
- * need ungetc().
- */
- public char getNameChar() throws IOException, SAXException {
-
- if (finish <= start)
- fillbuf();
- if (finish > start) {
- char c = buf[start++];
- if (XmlChars.isNameChar(c))
- return c;
- start--;
- }
- return 0;
- }
-
- /**
- * gets the next Java character -- might be part of an XML
- * text character represented by a surrogate pair, or be
- * the end of the entity.
- */
- public char getc() throws IOException, SAXException {
-
- if (finish <= start)
- fillbuf();
- if (finish > start) {
- char c = buf[start++];
-
- // [2] Char ::= #x0009 | #x000A | #x000D
- // | [#x0020-#xD7FF]
- // | [#xE000-#xFFFD]
- // plus surrogate _pairs_ representing [#x10000-#x10ffff]
- if (returnedFirstHalf) {
- if (c >= 0xdc00 && c <= 0xdfff) {
- returnedFirstHalf = false;
- return c;
- } else
- fatal("P-070", new Object[]{Integer.toHexString(c)});
- }
- if ((c >= 0x0020 && c <= 0xD7FF)
- || c == 0x0009
- // no surrogates!
- || (c >= 0xE000 && c <= 0xFFFD))
- return c;
-
- //
- // CRLF and CR are both line ends; map both to LF, and
- // keep line count correct.
- //
- else if (c == '\r' && !isInternal()) {
- maybeInCRLF = true;
- c = getc();
- if (c != '\n')
- ungetc();
- maybeInCRLF = false;
-
- lineNumber++;
- return '\n';
-
- } else if (c == '\n' || c == '\r') { // LF, or 2nd char in CRLF
- if (!isInternal() && !maybeInCRLF)
- lineNumber++;
- return c;
- }
-
- // surrogates...
- if (c >= 0xd800 && c < 0xdc00) {
- returnedFirstHalf = true;
- return c;
- }
-
- fatal("P-071", new Object[]{Integer.toHexString(c)});
- }
- throw new EndOfInputException();
- }
-
-
- /**
- * lookahead one character
- */
- public boolean peekc(char c) throws IOException, SAXException {
-
- if (finish <= start)
- fillbuf();
- if (finish > start) {
- if (buf[start] == c) {
- start++;
- return true;
- } else
- return false;
- }
- return false;
- }
-
-
- /**
- * two character pushback is guaranteed
- */
- public void ungetc() {
-
- if (start == 0)
- throw new InternalError("ungetc");
- start--;
-
- if (buf[start] == '\n' || buf[start] == '\r') {
- if (!isInternal())
- lineNumber--;
- } else if (returnedFirstHalf)
- returnedFirstHalf = false;
- }
-
-
- /**
- * optional grammatical whitespace (discarded)
- */
- public boolean maybeWhitespace()
- throws IOException, SAXException {
-
- char c;
- boolean isSpace = false;
- boolean sawCR = false;
-
- // [3] S ::= #20 | #09 | #0D | #0A
- for (; ;) {
- if (finish <= start)
- fillbuf();
- if (finish <= start)
- return isSpace;
-
- c = buf[start++];
- if (c == 0x20 || c == 0x09 || c == '\n' || c == '\r') {
- isSpace = true;
-
- //
- // CR, LF are line endings ... CLRF is one, not two!
- //
- if ((c == '\n' || c == '\r') && !isInternal()) {
- if (!(c == '\n' && sawCR)) {
- lineNumber++;
- sawCR = false;
- }
- if (c == '\r')
- sawCR = true;
- }
- } else {
- start--;
- return isSpace;
- }
- }
- }
-
-
- /**
- * normal content; whitespace in markup may be handled
- * specially if the parser uses the content model.
- * <p/>
- * <P> content terminates with markup delimiter characters,
- * namely ampersand (&amp;amp;) and left angle bracket (&amp;lt;).
- * <p/>
- * <P> the document handler's characters() method is called
- * on all the content found
- */
- public boolean parsedContent(DTDEventListener docHandler
- /*ElementValidator validator*/)
- throws IOException, SAXException {
-
- // [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
-
- int first; // first char to return
- int last; // last char to return
- boolean sawContent; // sent any chars?
- char c;
-
- // deliver right out of the buffer, until delimiter, EOF,
- // or error, refilling as we go
- for (first = last = start, sawContent = false; ; last++) {
-
- // buffer empty?
- if (last >= finish) {
- if (last > first) {
-// validator.text ();
- docHandler.characters(buf, first, last - first);
- sawContent = true;
- start = last;
- }
- if (isEOF()) // calls fillbuf
- return sawContent;
- first = start;
- last = first - 1; // incremented in loop
- continue;
- }
-
- c = buf[last];
-
- //
- // pass most chars through ASAP; this inlines the code of
- // [2] !XmlChars.isChar(c) leaving only characters needing
- // special treatment ... line ends, surrogates, and:
- // 0x0026 == '&'
- // 0x003C == '<'
- // 0x005D == ']'
- // Comparisons ordered for speed on 'typical' text
- //
- if ((c > 0x005D && c <= 0xD7FF) // a-z and more
- || (c < 0x0026 && c >= 0x0020) // space & punct
- || (c > 0x003C && c < 0x005D) // A-Z & punct
- || (c > 0x0026 && c < 0x003C) // 0-9 & punct
- || c == 0x0009
- || (c >= 0xE000 && c <= 0xFFFD)
- )
- continue;
-
- // terminate on markup delimiters
- if (c == '<' || c == '&')
- break;
-
- // count lines
- if (c == '\n') {
- if (!isInternal())
- lineNumber++;
- continue;
- }
-
- // External entities get CR, CRLF --> LF mapping
- // Internal ones got it already, and we can't repeat
- // else we break char ref handling!!
- if (c == '\r') {
- if (isInternal())
- continue;
-
- docHandler.characters(buf, first, last - first);
- docHandler.characters(newline, 0, 1);
- sawContent = true;
- lineNumber++;
- if (finish > (last + 1)) {
- if (buf[last + 1] == '\n')
- last++;
- } else { // CR at end of buffer
-// XXX case not yet handled: CRLF here will look like two lines
- }
- first = start = last + 1;
- continue;
- }
-
- // ']]>' is a WF error -- must fail if we see it
- if (c == ']') {
- switch (finish - last) {
- // for suspicious end-of-buffer cases, get more data
- // into the buffer to rule out this sequence.
- case 2:
- if (buf[last + 1] != ']')
- continue;
- // FALLTHROUGH
-
- case 1:
- if (reader == null || isClosed)
- continue;
- if (last == first)
- throw new InternalError("fillbuf");
- last--;
- if (last > first) {
-// validator.text ();
- docHandler.characters(buf, first, last - first);
- sawContent = true;
- start = last;
- }
- fillbuf();
- first = last = start;
- continue;
-
- // otherwise any "]]>" would be buffered, and we can
- // see right away if that's what we have
- default:
- if (buf[last + 1] == ']' && buf[last + 2] == '>')
- fatal("P-072", null);
- continue;
- }
- }
-
- // correctly paired surrogates are OK
- if (c >= 0xd800 && c <= 0xdfff) {
- if ((last + 1) >= finish) {
- if (last > first) {
-// validator.text ();
- docHandler.characters(buf, first, last - first);
- sawContent = true;
- start = last + 1;
- }
- if (isEOF()) { // calls fillbuf
- fatal("P-081",
- new Object[]{Integer.toHexString(c)});
- }
- first = start;
- last = first;
- continue;
- }
- if (checkSurrogatePair(last))
- last++;
- else {
- last--;
- // also terminate on surrogate pair oddities
- break;
- }
- continue;
- }
-
- fatal("P-071", new Object[]{Integer.toHexString(c)});
- }
- if (last == first)
- return sawContent;
-// validator.text ();
- docHandler.characters(buf, first, last - first);
- start = last;
- return true;
- }
-
-
- /**
- * CDATA -- character data, terminated by "]]>" and optionally
- * including unescaped markup delimiters (ampersand and left angle
- * bracket). This should otherwise be exactly like character data,
- * modulo differences in error report details.
- * <p/>
- * <P> The document handler's characters() or ignorableWhitespace()
- * methods are invoked on all the character data found
- *
- * @param docHandler gets callbacks for character data
- * @param ignorableWhitespace if true, whitespace characters will
- * be reported using docHandler.ignorableWhitespace(); implicitly,
- * non-whitespace characters will cause validation errors
- * @param whitespaceInvalidMessage if true, ignorable whitespace
- * causes a validity error report as well as a callback
- */
- public boolean unparsedContent(DTDEventListener docHandler,
- /*ElementValidator validator,*/
- boolean ignorableWhitespace,
- String whitespaceInvalidMessage)
- throws IOException, SAXException {
-
- // [18] CDSect ::= CDStart CData CDEnd
- // [19] CDStart ::= '<![CDATA['
- // [20] CData ::= (Char* - (Char* ']]>' Char*))
- // [21] CDEnd ::= ']]>'
-
- // caller peeked the leading '<' ...
- if (!peek("![CDATA[", null))
- return false;
- docHandler.startCDATA();
-
- // only a literal ']]>' stops this ...
- int last;
-
- for (; ;) { // until ']]>' seen
- boolean done = false;
- char c;
-
- // don't report ignorable whitespace as "text" for
- // validation purposes.
- boolean white = ignorableWhitespace;
-
- for (last = start; last < finish; last++) {
- c = buf[last];
-
- //
- // Reject illegal characters.
- //
- if (!XmlChars.isChar(c)) {
- white = false;
- if (c >= 0xd800 && c <= 0xdfff) {
- if (checkSurrogatePair(last)) {
- last++;
- continue;
- } else {
- last--;
- break;
- }
- }
- fatal("P-071", new Object[]
- {Integer.toHexString(buf[last])});
- }
- if (c == '\n') {
- if (!isInternal())
- lineNumber++;
- continue;
- }
- if (c == '\r') {
- // As above, we can't repeat CR/CRLF --> LF mapping
- if (isInternal())
- continue;
-
- if (white) {
- if (whitespaceInvalidMessage != null)
- errHandler.error(new SAXParseException(DTDParser.messages.getMessage(locale,
- whitespaceInvalidMessage), null));
- docHandler.ignorableWhitespace(buf, start,
- last - start);
- docHandler.ignorableWhitespace(newline, 0, 1);
- } else {
-// validator.text ();
- docHandler.characters(buf, start, last - start);
- docHandler.characters(newline, 0, 1);
- }
- lineNumber++;
- if (finish > (last + 1)) {
- if (buf[last + 1] == '\n')
- last++;
- } else { // CR at end of buffer
-// XXX case not yet handled ... as above
- }
- start = last + 1;
- continue;
- }
- if (c != ']') {
- if (c != ' ' && c != '\t')
- white = false;
- continue;
- }
- if ((last + 2) < finish) {
- if (buf[last + 1] == ']' && buf[last + 2] == '>') {
- done = true;
- break;
- }
- white = false;
- continue;
- } else {
- //last--;
- break;
- }
- }
- if (white) {
- if (whitespaceInvalidMessage != null)
- errHandler.error(new SAXParseException(DTDParser.messages.getMessage(locale,
- whitespaceInvalidMessage), null));
- docHandler.ignorableWhitespace(buf, start, last - start);
- } else {
-// validator.text ();
- docHandler.characters(buf, start, last - start);
- }
- if (done) {
- start = last + 3;
- break;
- }
- start = last;
- if (isEOF())
- fatal("P-073", null);
- }
- docHandler.endCDATA();
- return true;
- }
-
- // return false to backstep at end of buffer)
- private boolean checkSurrogatePair(int offset)
- throws SAXException {
-
- if ((offset + 1) >= finish)
- return false;
-
- char c1 = buf[offset++];
- char c2 = buf[offset];
-
- if ((c1 >= 0xd800 && c1 < 0xdc00) && (c2 >= 0xdc00 && c2 <= 0xdfff))
- return true;
- fatal("P-074", new Object[]{
- Integer.toHexString(c1 & 0x0ffff),
- Integer.toHexString(c2 & 0x0ffff)
- });
- return false;
- }
-
-
- /**
- * whitespace in markup (flagged to app, discardable)
- * <p/>
- * <P> the document handler's ignorableWhitespace() method
- * is called on all the whitespace found
- */
- public boolean ignorableWhitespace(DTDEventListener handler)
- throws IOException, SAXException {
-
- char c;
- boolean isSpace = false;
- int first;
-
- // [3] S ::= #20 | #09 | #0D | #0A
- for (first = start; ;) {
- if (finish <= start) {
- if (isSpace)
- handler.ignorableWhitespace(buf, first, start - first);
- fillbuf();
- first = start;
- }
- if (finish <= start)
- return isSpace;
-
- c = buf[start++];
- switch (c) {
- case '\n':
- if (!isInternal())
- lineNumber++;
-// XXX handles Macintosh line endings wrong
- // fallthrough
- case 0x09:
- case 0x20:
- isSpace = true;
- continue;
-
- case '\r':
- isSpace = true;
- if (!isInternal())
- lineNumber++;
- handler.ignorableWhitespace(buf, first,
- (start - 1) - first);
- handler.ignorableWhitespace(newline, 0, 1);
- if (start < finish && buf[start] == '\n')
- ++start;
- first = start;
- continue;
-
- default:
- ungetc();
- if (isSpace)
- handler.ignorableWhitespace(buf, first, start - first);
- return isSpace;
- }
- }
- }
-
- /**
- * returns false iff 'next' string isn't as provided,
- * else skips that text and returns true.
- * <p/>
- * <P> NOTE: two alternative string representations are
- * both passed in, since one is faster.
- */
- public boolean peek(String next, char chars [])
- throws IOException, SAXException {
-
- int len;
- int i;
-
- if (chars != null)
- len = chars.length;
- else
- len = next.length();
-
- // buffer should hold the whole thing ... give it a
- // chance for the end-of-buffer case and cope with EOF
- // by letting fillbuf compact and fill
- if (finish <= start || (finish - start) < len)
- fillbuf();
-
- // can't peek past EOF
- if (finish <= start)
- return false;
-
- // compare the string; consume iff it matches
- if (chars != null) {
- for (i = 0; i < len && (start + i) < finish; i++) {
- if (buf[start + i] != chars[i])
- return false;
- }
- } else {
- for (i = 0; i < len && (start + i) < finish; i++) {
- if (buf[start + i] != next.charAt(i))
- return false;
- }
- }
-
- // if the first fillbuf didn't get enough data, give
- // fillbuf another chance to read
- if (i < len) {
- if (reader == null || isClosed)
- return false;
-
- //
- // This diagnostic "knows" that the only way big strings would
- // fail to be peeked is where it's a symbol ... e.g. for an
- // </EndTag> construct. That knowledge could also be applied
- // to get rid of the symbol length constraint, since having
- // the wrong symbol is a fatal error anyway ...
- //
- if (len > buf.length)
- fatal("P-077", new Object[]{new Integer(buf.length)});
-
- fillbuf();
- return peek(next, chars);
- }
-
- start += len;
- return true;
- }
-
-
- //
- // Support for reporting the internal DTD subset, so <!DOCTYPE...>
- // declarations can be recreated. This is collected as a single
- // string; such subsets are normally small, and many applications
- // don't even care about this.
- //
- public void startRemembering() {
-
- if (startRemember != 0)
- throw new InternalError();
- startRemember = start;
- }
-
- public String rememberText() {
-
- String retval;
-
- // If the internal subset crossed a buffer boundary, we
- // created a temporary buffer.
- if (rememberedText != null) {
- rememberedText.append(buf, startRemember,
- start - startRemember);
- retval = rememberedText.toString();
- } else
- retval = new String(buf, startRemember,
- start - startRemember);
-
- startRemember = 0;
- rememberedText = null;
- return retval;
- }
-
- private InputEntity getTopEntity() {
-
- InputEntity current = this;
-
- // don't report locations within internal entities!
-
- while (current != null && current.input == null)
- current = current.next;
- return current == null ? this : current;
- }
-
- /**
- * Returns the public ID of this input source, if known
- */
- public String getPublicId() {
-
- InputEntity where = getTopEntity();
- if (where == this)
- return input.getPublicId();
- return where.getPublicId();
- }
-
- /**
- * Returns the system ID of this input source, if known
- */
- public String getSystemId() {
-
- InputEntity where = getTopEntity();
- if (where == this)
- return input.getSystemId();
- return where.getSystemId();
- }
-
- /**
- * Returns the current line number in this input source
- */
- public int getLineNumber() {
-
- InputEntity where = getTopEntity();
- if (where == this)
- return lineNumber;
- return where.getLineNumber();
- }
-
- /**
- * returns -1; maintaining column numbers hurts performance
- */
- public int getColumnNumber() {
-
- return -1; // not maintained (speed)
- }
-
-
- //
- // n.b. for non-EOF end-of-buffer cases, reader should return
- // at least a handful of bytes so various lookaheads behave.
- //
- // two character pushback exists except at first; characters
- // represented by surrogate pairs can't be pushed back (they'd
- // only be in character data anyway).
- //
- // DTD exception thrown on char conversion problems; line number
- // will be low, as a rule.
- //
- private void fillbuf() throws IOException, SAXException {
-
- // don't touched fixed buffers, that'll usually
- // change entity values (and isn't needed anyway)
- // likewise, ignore closed streams
- if (reader == null || isClosed)
- return;
-
- // if remembering DTD text, copy!
- if (startRemember != 0) {
- if (rememberedText == null)
- rememberedText = new StringBuffer(buf.length);
- rememberedText.append(buf, startRemember,
- start - startRemember);
- }
-
- boolean extra = (finish > 0) && (start > 0);
- int len;
-
- if (extra) // extra pushback
- start--;
- len = finish - start;
-
- System.arraycopy(buf, start, buf, 0, len);
- start = 0;
- finish = len;
-
- try {
- len = buf.length - len;
- len = reader.read(buf, finish, len);
- } catch (UnsupportedEncodingException e) {
- fatal("P-075", new Object[]{e.getMessage()});
- } catch (CharConversionException e) {
- fatal("P-076", new Object[]{e.getMessage()});
- }
- if (len >= 0)
- finish += len;
- else
- close();
- if (extra) // extra pushback
- start++;
-
- if (startRemember != 0)
- // assert extra == true
- startRemember = 1;
- }
-
- public void close() {
-
- try {
- if (reader != null && !isClosed)
- reader.close();
- isClosed = true;
- } catch (IOException e) {
- /* NOTHING */
- }
- }
-
-
- private void fatal(String messageId, Object params [])
- throws SAXException {
-
- SAXParseException x = new SAXParseException(DTDParser.messages.getMessage(locale, messageId, params), null);
-
- // not continuable ... e.g. WF errors
- close();
- errHandler.fatalError(x);
- throw x;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/InternalEntity.java b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/InternalEntity.java
deleted file mode 100644
index 00e125a1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/InternalEntity.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dtdparser;
-
-
-final class InternalEntity extends EntityDecl {
- InternalEntity(String name, char value []) {
- this.name = name;
- this.buf = value;
- }
-
- char buf [];
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/MessageCatalog.java b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/MessageCatalog.java
deleted file mode 100644
index 7ad1e121..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/MessageCatalog.java
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dtdparser;
-
-import java.io.InputStream;
-import java.text.FieldPosition;
-import java.text.MessageFormat;
-import java.util.Hashtable;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-
-/**
- * This class provides support for multi-language string lookup, as needed
- * to localize messages from applications supporting multiple languages
- * at the same time. One class of such applications is network services,
- * such as HTTP servers, which talk to clients who may not be from the
- * same locale as the server. This class supports a form of negotiation
- * for the language used in presenting a message from some package, where
- * both user (client) preferences and application (server) support are
- * accounted for when choosing locales and formatting messages.
- * <p/>
- * <P> Each package should have a singleton package-private message catalog
- * class. This ensures that the correct class loader will always be used to
- * access message resources, and minimizes use of memory: <PRE>
- * package <em>some.package</em>;
- * <p/>
- * // "foo" might be public
- * class foo {
- * ...
- * // package private
- * static final Catalog messages = new Catalog ();
- * static final class Catalog extends MessageCatalog {
- * Catalog () { super (Catalog.class); }
- * }
- * ...
- * }
- * </PRE>
- * <p/>
- * <P> Messages for a known client could be generated using code
- * something like this: <PRE>
- * String clientLanguages [];
- * Locale clientLocale;
- * String clientMessage;
- * <p/>
- * // client languages will probably be provided by client,
- * // e.g. by an HTTP/1.1 "Accept-Language" header.
- * clientLanguages = new String [] { "en-ca", "fr-ca", "ja", "zh" };
- * clientLocale = foo.messages.chooseLocale (clientLanguages);
- * clientMessage = foo.messages.getMessage (clientLocale,
- * "fileCount",
- * new Object [] { new Integer (numberOfFiles) }
- * );
- * </PRE>
- * <p/>
- * <P> At this time, this class does not include functionality permitting
- * messages to be passed around and localized after-the-fact. The consequence
- * of this is that the locale for messages must be passed down through layers
- * which have no normal reason to support such passdown, or else the system
- * default locale must be used instead of the one the client needs.
- * <p/>
- * <P> <hr> The following guidelines should be used when constructiong
- * multi-language applications: <OL>
- * <p/>
- * <LI> Always use <a href=#chooseLocale>chooseLocale</a> to select the
- * locale you pass to your <code>getMessage</code> call. This lets your
- * applications use IETF standard locale names, and avoids needless
- * use of system defaults.
- * <p/>
- * <LI> The localized messages for a given package should always go in
- * a separate <em>resources</em> sub-package. There are security
- * implications; see below.
- * <p/>
- * <LI> Make sure that a language name is included in each bundle name,
- * so that the developer's locale will not be inadvertently used. That
- * is, don't create defaults like <em>resources/Messages.properties</em>
- * or <em>resources/Messages.class</em>, since ResourceBundle will choose
- * such defaults rather than giving software a chance to choose a more
- * appropriate language for its messages. Your message bundles should
- * have names like <em>Messages_en.properties</em> (for the "en", or
- * English, language) or <em>Messages_ja.class</em> ("ja" indicates the
- * Japanese language).
- * <p/>
- * <LI> Only use property files for messages in languages which can
- * be limited to the ISO Latin/1 (8859-1) characters supported by the
- * property file format. (This is mostly Western European languages.)
- * Otherwise, subclass ResourceBundle to provide your messages; it is
- * simplest to subclass <code>java.util.ListResourceBundle</code>.
- * <p/>
- * <LI> Never use another package's message catalog or resource bundles.
- * It should not be possible for a change internal to one package (such
- * as eliminating or improving messages) to break another package.
- * <p/>
- * </OL>
- * <p/>
- * <P> The "resources" sub-package can be treated separately from the
- * package with which it is associated. That main package may be sealed
- * and possibly signed, preventing other software from adding classes to
- * the package which would be able to access methods and data which are
- * not designed to be publicly accessible. On the other hand, resources
- * such as localized messages are often provided after initial product
- * shipment, without a full release cycle for the product. Such files
- * (text and class files) need to be added to some package. Since they
- * should not be added to the main package, the "resources" subpackage is
- * used without risking the security or integrity of that main package
- * as distributed in its JAR file.
- *
- * @author David Brownell
- * @version 1.1, 00/08/05
- * @see java.util.Locale
- * @see java.util.ListResourceBundle
- * @see java.text.MessageFormat
- */
-// leave this as "abstract" -- each package needs its own subclass,
-// else it's not always going to be using the right class loader.
-abstract public class MessageCatalog {
- private String bundleName;
-
- /**
- * Create a message catalog for use by classes in the same package
- * as the specified class. This uses <em>Messages</em> resource
- * bundles in the <em>resources</em> sub-package of class passed as
- * a parameter.
- *
- * @param packageMember Class whose package has localized messages
- */
- protected MessageCatalog(Class packageMember) {
- this(packageMember, "Messages");
- }
-
- /**
- * Create a message catalog for use by classes in the same package
- * as the specified class. This uses the specified resource
- * bundle name in the <em>resources</em> sub-package of class passed
- * as a parameter; for example, <em>resources.Messages</em>.
- *
- * @param packageMember Class whose package has localized messages
- * @param bundle Name of a group of resource bundles
- */
- private MessageCatalog(Class packageMember, String bundle) {
- int index;
-
- bundleName = packageMember.getName();
- index = bundleName.lastIndexOf('.');
- if (index == -1) // "ClassName"
- bundleName = "";
- else // "some.package.ClassName"
- bundleName = bundleName.substring(0, index) + ".";
- bundleName = bundleName + "resources." + bundle;
- }
-
-
- /**
- * Get a message localized to the specified locale, using the message ID
- * and package name if no message is available. The locale is normally
- * that of the client of a service, chosen with knowledge that both the
- * client and this server support that locale. There are two error
- * cases: first, when the specified locale is unsupported or null, the
- * default locale is used if possible; second, when no bundle supports
- * that locale, the message ID and package name are used.
- *
- * @param locale The locale of the message to use. If this is null,
- * the default locale will be used.
- * @param messageId The ID of the message to use.
- * @return The message, localized as described above.
- */
- public String getMessage(Locale locale,
- String messageId) {
- ResourceBundle bundle;
-
- // cope with unsupported locale...
- if (locale == null)
- locale = Locale.getDefault();
-
- try {
- bundle = ResourceBundle.getBundle(bundleName, locale);
- } catch (MissingResourceException e) {
- bundle = ResourceBundle.getBundle(bundleName, Locale.ENGLISH);
- }
- return bundle.getString(messageId);
- }
-
-
- /**
- * Format a message localized to the specified locale, using the message
- * ID with its package name if none is available. The locale is normally
- * the client of a service, chosen with knowledge that both the client
- * server support that locale. There are two error cases: first, if the
- * specified locale is unsupported or null, the default locale is used if
- * possible; second, when no bundle supports that locale, the message ID
- * and package name are used.
- *
- * @param locale The locale of the message to use. If this is null,
- * the default locale will be used.
- * @param messageId The ID of the message format to use.
- * @param parameters Used when formatting the message. Objects in
- * this list are turned to strings if they are not Strings, Numbers,
- * or Dates (that is, if MessageFormat would treat them as errors).
- * @return The message, localized as described above.
- * @see java.text.MessageFormat
- */
- public String getMessage(Locale locale,
- String messageId,
- Object parameters []) {
- if (parameters == null)
- return getMessage(locale, messageId);
-
- // since most messages won't be tested (sigh), be friendly to
- // the inevitable developer errors of passing random data types
- // to the message formatting code.
- for (int i = 0; i < parameters.length; i++) {
- if (!(parameters[i] instanceof String)
- && !(parameters[i] instanceof Number)
- && !(parameters[i] instanceof java.util.Date)) {
- if (parameters[i] == null)
- parameters[i] = "(null)";
- else
- parameters[i] = parameters[i].toString();
- }
- }
-
- // similarly, cope with unsupported locale...
- if (locale == null)
- locale = Locale.getDefault();
-
- // get the appropriately localized MessageFormat object
- ResourceBundle bundle;
- MessageFormat format;
-
- try {
- bundle = ResourceBundle.getBundle(bundleName, locale);
- } catch (MissingResourceException e) {
- bundle = ResourceBundle.getBundle(bundleName, Locale.ENGLISH);
- /*String retval;
-
- retval = packagePrefix (messageId);
- for (int i = 0; i < parameters.length; i++) {
- retval += ' ';
- retval += parameters [i];
- }
- return retval;*/
- }
- format = new MessageFormat(bundle.getString(messageId));
- format.setLocale(locale);
-
- // return the formatted message
- StringBuffer result = new StringBuffer();
-
- result = format.format(parameters, result, new FieldPosition(0));
- return result.toString();
- }
-
-
- /**
- * Chooses a client locale to use, using the first language specified in
- * the list that is supported by this catalog. If none of the specified
- * languages is supported, a null value is returned. Such a list of
- * languages might be provided in an HTTP/1.1 "Accept-Language" header
- * field, or through some other content negotiation mechanism.
- * <p/>
- * <P> The language specifiers recognized are RFC 1766 style ("fr" for
- * all French, "fr-ca" for Canadian French), although only the strict
- * ISO subset (two letter language and country specifiers) is currently
- * supported. Java-style locale strings ("fr_CA") are also supported.
- *
- * @param languages Array of language specifiers, ordered with the most
- * preferable one at the front. For example, "en-ca" then "fr-ca",
- * followed by "zh_CN".
- * @return The most preferable supported locale, or null.
- * @see java.util.Locale
- */
- public Locale chooseLocale(String languages []) {
- if ((languages = canonicalize(languages)) != null) {
- for (int i = 0; i < languages.length; i++)
- if (isLocaleSupported(languages[i]))
- return getLocale(languages[i]);
- }
- return null;
- }
-
-
- //
- // Canonicalizes the RFC 1766 style language strings ("en-in") to
- // match standard Java usage ("en_IN"), removing strings that don't
- // use two character ISO language and country codes. Avoids all
- // memory allocations possible, so that if the strings passed in are
- // just lowercase ISO codes (a common case) the input is returned.
- //
- private String[] canonicalize(String languages []) {
- boolean didClone = false;
- int trimCount = 0;
-
- if (languages == null)
- return languages;
-
- for (int i = 0; i < languages.length; i++) {
- String lang = languages[i];
- int len = lang.length();
-
- // no RFC1766 extensions allowed; "zh" and "zh-tw" (etc) are OK
- // as are regular locale names with no variant ("de_CH").
- if (!(len == 2 || len == 5)) {
- if (!didClone) {
- languages = (String[]) languages.clone();
- didClone = true;
- }
- languages[i] = null;
- trimCount++;
- continue;
- }
-
- // language code ... if already lowercase, we change nothing
- if (len == 2) {
- lang = lang.toLowerCase();
- if (lang != languages[i]) {
- if (!didClone) {
- languages = (String[]) languages.clone();
- didClone = true;
- }
- languages[i] = lang;
- }
- continue;
- }
-
- // language_country ... fixup case, force "_"
- char buf [] = new char[5];
-
- buf[0] = Character.toLowerCase(lang.charAt(0));
- buf[1] = Character.toLowerCase(lang.charAt(1));
- buf[2] = '_';
- buf[3] = Character.toUpperCase(lang.charAt(3));
- buf[4] = Character.toUpperCase(lang.charAt(4));
- if (!didClone) {
- languages = (String[]) languages.clone();
- didClone = true;
- }
- languages[i] = new String(buf);
- }
-
- // purge any shadows of deleted RFC1766 extended language codes
- if (trimCount != 0) {
- String temp [] = new String[languages.length - trimCount];
- int i;
-
- for (i = 0, trimCount = 0; i < temp.length; i++) {
- while (languages[i + trimCount] == null)
- trimCount++;
- temp[i] = languages[i + trimCount];
- }
- languages = temp;
- }
- return languages;
- }
-
-
- //
- // Returns a locale object supporting the specified locale, using
- // a small cache to speed up some common languages and reduce the
- // needless allocation of memory.
- //
- private Locale getLocale(String localeName) {
- String language, country;
- int index;
-
- index = localeName.indexOf('_');
- if (index == -1) {
- //
- // Special case the builtin JDK languages
- //
- if (localeName.equals("de"))
- return Locale.GERMAN;
- if (localeName.equals("en"))
- return Locale.ENGLISH;
- if (localeName.equals("fr"))
- return Locale.FRENCH;
- if (localeName.equals("it"))
- return Locale.ITALIAN;
- if (localeName.equals("ja"))
- return Locale.JAPANESE;
- if (localeName.equals("ko"))
- return Locale.KOREAN;
- if (localeName.equals("zh"))
- return Locale.CHINESE;
-
- language = localeName;
- country = "";
- } else {
- if (localeName.equals("zh_CN"))
- return Locale.SIMPLIFIED_CHINESE;
- if (localeName.equals("zh_TW"))
- return Locale.TRADITIONAL_CHINESE;
-
- //
- // JDK also has constants for countries: en_GB, en_US, en_CA,
- // fr_FR, fr_CA, de_DE, ja_JP, ko_KR. We don't use those.
- //
- language = localeName.substring(0, index);
- country = localeName.substring(index + 1);
- }
-
- return new Locale(language, country);
- }
-
-
- //
- // cache for isLanguageSupported(), below ... key is a language
- // or locale name, value is a Boolean
- //
- private Hashtable cache = new Hashtable(5);
-
-
- /**
- * Returns true iff the specified locale has explicit language support.
- * For example, the traditional Chinese locale "zh_TW" has such support
- * if there are message bundles suffixed with either "zh_TW" or "zh".
- * <p/>
- * <P> This method is used to bypass part of the search path mechanism
- * of the <code>ResourceBundle</code> class, specifically the parts which
- * force use of default locales and bundles. Such bypassing is required
- * in order to enable use of a client's preferred languages. Following
- * the above example, if a client prefers "zh_TW" but can also accept
- * "ja", this method would be used to detect that there are no "zh_TW"
- * resource bundles and hence that "ja" messages should be used. This
- * bypasses the ResourceBundle mechanism which will return messages in
- * some other locale (picking some hard-to-anticipate default) instead
- * of reporting an error and letting the client choose another locale.
- *
- * @param localeName A standard Java locale name, using two character
- * language codes optionally suffixed by country codes.
- * @return True iff the language of that locale is supported.
- * @see java.util.Locale
- */
- public boolean isLocaleSupported(String localeName) {
- //
- // Use previous results if possible. We expect that the codebase
- // is immutable, so we never worry about changing the cache.
- //
- Boolean value = (Boolean) cache.get(localeName);
-
- if (value != null)
- return value.booleanValue();
-
- //
- // Try "language_country_variant", then "language_country",
- // then finally "language" ... assuming the longest locale name
- // is passed. If not, we'll try fewer options.
- //
- ClassLoader loader = null;
-
- for (; ;) {
- String name = bundleName + "_" + localeName;
-
- // look up classes ...
- try {
- Class.forName(name);
- cache.put(localeName, Boolean.TRUE);
- return true;
- } catch (Exception e) {
- }
-
- // ... then property files (only for ISO Latin/1 messages)
- InputStream in;
-
- if (loader == null)
- loader = getClass().getClassLoader();
-
- name = name.replace('.', '/');
- name = name + ".properties";
- if (loader == null)
- in = ClassLoader.getSystemResourceAsStream(name);
- else
- in = loader.getResourceAsStream(name);
- if (in != null) {
- cache.put(localeName, Boolean.TRUE);
- return true;
- }
-
- int index = localeName.indexOf('_');
-
- if (index > 0)
- localeName = localeName.substring(0, index);
- else
- break;
- }
-
- //
- // If we got this far, we failed. Remember for later.
- //
- cache.put(localeName, Boolean.FALSE);
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/Resolver.java b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/Resolver.java
deleted file mode 100644
index ed8cbfe0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/Resolver.java
+++ /dev/null
@@ -1,448 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dtdparser;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.Hashtable;
-
-/**
- * This entity resolver class provides a number of utilities which can help
- * managment of external parsed entities in XML. These are commonly used
- * to hold markup declarations that are to be used as part of a Document
- * Type Declaration (DTD), or to hold text marked up with XML.
- * <p/>
- * <P> Features include: <UL>
- * <p/>
- * <LI> Static factory methods are provided for constructing SAX InputSource
- * objects from Files, URLs, or MIME objects. This eliminates a class of
- * error-prone coding in applications.
- * <p/>
- * <LI> Character encodings for XML documents are correctly supported: <UL>
- * <p/>
- * <LI> The encodings defined in the RFCs for MIME content types
- * (2046 for general MIME, and 2376 for XML in particular), are
- * supported, handling <em>charset=...</em> attributes and accepting
- * content types which are known to be safe for use with XML;
- * <p/>
- * <LI> The character encoding autodetection algorithm identified
- * in the XML specification is used, and leverages all of
- * the JDK 1.1 (and later) character encoding support.
- * <p/>
- * <LI> The use of MIME typing may optionally be disabled, forcing the
- * use of autodetection, to support web servers which don't correctly
- * report MIME types for XML. For example, they may report text that
- * is encoded in EUC-JP as being US-ASCII text, leading to fatal
- * errors during parsing.
- * <p/>
- * <LI> The InputSource objects returned by this class always
- * have a <code>java.io.Reader</code> available as the "character
- * stream" property.
- * <p/>
- * </UL>
- * <p/>
- * <LI> Catalog entries can map public identifiers to Java resources or
- * to local URLs. These are used to reduce network dependencies and loads,
- * and will often be used for external DTD components. For example, packages
- * shipping DTD files as resources in JAR files can eliminate network traffic
- * when accessing them, and sites may provide local caches of common DTDs.
- * Note that no particular catalog syntax is supported by this class, only
- * the notion of a set of entries.
- * <p/>
- * </UL>
- * <p/>
- * <P> Subclasses can perform tasks such as supporting new URI schemes for
- * URIs which are not URLs, such as URNs (see RFC 2396) or for accessing
- * MIME entities which are part of a <em>multipart/related</em> group
- * (see RFC 2387). They may also be used to support particular catalog
- * syntaxes, such as the <a href="http://www.oasis-open.org/html/a401.htm">
- * SGML/Open Catalog (SOCAT)</a> which supports the SGML notion of "Formal
- * Public Identifiers (FPIs).
- *
- * @author David Brownell
- * @author Janet Koenig
- * @version 1.3 00/02/24
- */
-public class Resolver implements EntityResolver {
- private boolean ignoringMIME;
-
- // table mapping public IDs to (local) URIs
- private Hashtable id2uri;
-
- // tables mapping public IDs to resources and classloaders
- private Hashtable id2resource;
- private Hashtable id2loader;
-
- //
- // table of MIME content types (less attributes!) known
- // to be mostly "OK" to use with XML MIME entities. the
- // idea is to rule out obvious braindamage ("image/jpg")
- // not the subtle stuff ("text/html") that might actually
- // be (or become) safe.
- //
- private static final String types [] = {
- "application/xml",
- "text/xml",
- "text/plain",
- "text/html", // commonly mis-inferred
- "application/x-netcdf", // this is often illegal XML
- "content/unknown"
- };
-
- /**
- * Constructs a resolver.
- */
- public Resolver() {
- }
-
- /**
- * Returns an input source, using the MIME type information and URL
- * scheme to statically determine the correct character encoding if
- * possible and otherwise autodetecting it. MIME carefully specifies
- * the character encoding defaults, and how attributes of the content
- * type can change it. XML further specifies two mandatory encodings
- * (UTF-8 and UTF-16), and includes an XML declaration which can be
- * used to internally label most documents encoded using US-ASCII
- * supersets (such as Shift_JIS, EUC-JP, ISO-2022-*, ISO-8859-*, and
- * more).
- * <p/>
- * <P> This method can be used to access XML documents which do not
- * have URIs (such as servlet input streams, or most JavaMail message
- * entities) and to support access methods such as HTTP POST or PUT.
- * (URLs normally return content using the GET method.)
- * <p/>
- * <P> <em> The caller should set the system ID in order for relative URIs
- * found in this document to be interpreted correctly.</em> In some cases,
- * a custom resolver will need to be used; for example, documents
- * may be grouped in a single MIME "multipart/related" bundle, and
- * relative URLs would refer to other documents in that bundle.
- *
- * @param contentType The MIME content type for the source for which
- * an InputSource is desired, such as <em>text/xml;charset=utf-8</em>.
- * @param stream The input byte stream for the input source.
- * @param checkType If true, this verifies that the content type is known
- * to support XML documents, such as <em>application/xml</em>.
- * @param scheme Unless this is "file", unspecified MIME types
- * default to US-ASCII. Files are always autodetected since most
- * file systems discard character encoding information.
- */
- public static InputSource createInputSource(String contentType,
- InputStream stream,
- boolean checkType,
- String scheme) throws IOException {
- InputSource retval;
- String charset = null;
-
- if (contentType != null) {
- int index;
-
- contentType = contentType.toLowerCase();
- index = contentType.indexOf(';');
- if (index != -1) {
- String attributes;
-
- attributes = contentType.substring(index + 1);
- contentType = contentType.substring(0, index);
-
- // use "charset=..." if it's available
- index = attributes.indexOf("charset");
- if (index != -1) {
- attributes = attributes.substring(index + 7);
- // strip out subsequent attributes
- if ((index = attributes.indexOf(';')) != -1)
- attributes = attributes.substring(0, index);
- // find start of value
- if ((index = attributes.indexOf('=')) != -1) {
- attributes = attributes.substring(index + 1);
- // strip out rfc822 comments
- if ((index = attributes.indexOf('(')) != -1)
- attributes = attributes.substring(0, index);
- // double quotes are optional
- if ((index = attributes.indexOf('"')) != -1) {
- attributes = attributes.substring(index + 1);
- attributes = attributes.substring(0,
- attributes.indexOf('"'));
- }
- charset = attributes.trim();
- // XXX "\;", "\)" etc were mishandled above
- }
- }
- }
-
- //
- // Check MIME type.
- //
- if (checkType) {
- boolean isOK = false;
- for (int i = 0; i < types.length; i++)
- if (types[i].equals(contentType)) {
- isOK = true;
- break;
- }
- if (!isOK)
- throw new IOException("Not XML: " + contentType);
- }
-
- //
- // "text/*" MIME types have hard-wired character set
- // defaults, as specified in the RFCs. For XML, we
- // ignore the system "file.encoding" property since
- // autodetection is more correct.
- //
- if (charset == null) {
- contentType = contentType.trim();
- if (contentType.startsWith("text/")) {
- if (!"file".equalsIgnoreCase(scheme))
- charset = "US-ASCII";
- }
- // "application/*" has no default
- }
- }
-
- retval = new InputSource(XmlReader.createReader(stream, charset));
- retval.setByteStream(stream);
- retval.setEncoding(charset);
- return retval;
- }
-
-
- /**
- * Creates an input source from a given URI.
- *
- * @param uri the URI (system ID) for the entity
- * @param checkType if true, the MIME content type for the entity
- * is checked for document type and character set encoding.
- */
- static public InputSource createInputSource(URL uri, boolean checkType)
- throws IOException {
-
- URLConnection conn = uri.openConnection();
- InputSource retval;
-
- if (checkType) {
- String contentType = conn.getContentType();
- retval = createInputSource(contentType, conn.getInputStream(),
- false, uri.getProtocol());
- } else {
- retval = new InputSource(XmlReader.createReader(conn.getInputStream()));
- }
- retval.setSystemId(conn.getURL().toString());
- return retval;
- }
-
-
- /**
- * Creates an input source from a given file, autodetecting
- * the character encoding.
- */
- static public InputSource createInputSource(File file)
- throws IOException {
- InputSource retval;
- String path;
-
- retval = new InputSource(XmlReader.createReader(new FileInputStream(file)));
-
- // On JDK 1.2 and later, simplify this:
- // "path = file.toURL ().toString ()".
- path = file.getAbsolutePath();
- if (File.separatorChar != '/')
- path = path.replace(File.separatorChar, '/');
- if (!path.startsWith("/"))
- path = "/" + path;
- if (!path.endsWith("/") && file.isDirectory())
- path = path + "/";
-
- retval.setSystemId("file:" + path);
- return retval;
- }
-
-
- /**
- * <b>SAX:</b>
- * Resolve the given entity into an input source. If the name can't
- * be mapped to a preferred form of the entity, the URI is used. To
- * resolve the entity, first a local catalog mapping names to URIs is
- * consulted. If no mapping is found there, a catalog mapping names
- * to java resources is consulted. Finally, if neither mapping found
- * a copy of the entity, the specified URI is used.
- * <p/>
- * <P> When a URI is used, <a href="#createInputSource">
- * createInputSource</a> is used to correctly deduce the character
- * encoding used by this entity. No MIME type checking is done.
- *
- * @param name Used to find alternate copies of the entity, when
- * this value is non-null; this is the XML "public ID".
- * @param uri Used when no alternate copy of the entity is found;
- * this is the XML "system ID", normally a URI.
- */
- public InputSource resolveEntity(String name, String uri)
- throws IOException {
- InputSource retval;
- String mappedURI = name2uri(name);
- InputStream stream;
-
- // prefer explicit URI mappings, then bundled resources...
- if (mappedURI == null && (stream = mapResource(name)) != null) {
- uri = "java:resource:" + (String) id2resource.get(name);
- retval = new InputSource(XmlReader.createReader(stream));
-
- // ...and treat all URIs the same (as URLs for now).
- } else {
- URL url;
- URLConnection conn;
-
- if (mappedURI != null)
- uri = mappedURI;
- else if (uri == null)
- return null;
-
- url = new URL(uri);
- conn = url.openConnection();
- uri = conn.getURL().toString();
- // System.out.println ("++ URI: " + url);
- if (ignoringMIME)
- retval = new InputSource(XmlReader.createReader(conn.getInputStream()));
- else {
- String contentType = conn.getContentType();
- retval = createInputSource(contentType,
- conn.getInputStream(),
- false, url.getProtocol());
- }
- }
- retval.setSystemId(uri);
- retval.setPublicId(name);
- return retval;
- }
-
-
- /**
- * Returns true if this resolver is ignoring MIME types in the documents
- * it returns, to work around bugs in how servers have reported the
- * documents' MIME types.
- */
- public boolean isIgnoringMIME() {
- return ignoringMIME;
- }
-
- /**
- * Tells the resolver whether to ignore MIME types in the documents it
- * retrieves. Many web servers incorrectly assign text documents a
- * default character encoding, even when that is incorrect. For example,
- * all HTTP text documents default to use ISO-8859-1 (used for Western
- * European languages), and other MIME sources default text documents
- * to use US-ASCII (a seven bit encoding). For XML documents which
- * include text encoding declarations (as most should do), these server
- * bugs can be worked around by ignoring the MIME type entirely.
- */
- public void setIgnoringMIME(boolean value) {
- ignoringMIME = value;
- }
-
-
- // maps the public ID to an alternate URI, if one is registered
- private String name2uri(String publicId) {
- if (publicId == null || id2uri == null)
- return null;
- return (String) id2uri.get(publicId);
- }
-
-
- /**
- * Registers the given public ID as corresponding to a particular
- * URI, typically a local copy. This URI will be used in preference
- * to ones provided as system IDs in XML entity declarations. This
- * mechanism would most typically be used for Document Type Definitions
- * (DTDs), where the public IDs are formally managed and versioned.
- *
- * @param publicId The managed public ID being mapped
- * @param uri The URI of the preferred copy of that entity
- */
- public void registerCatalogEntry(String publicId,
- String uri) {
- if (id2uri == null)
- id2uri = new Hashtable(17);
- id2uri.put(publicId, uri);
- }
-
-
- // return the resource as a stream
- private InputStream mapResource(String publicId) {
- // System.out.println ("++ PUBLIC: " + publicId);
- if (publicId == null || id2resource == null)
- return null;
-
- String resourceName = (String) id2resource.get(publicId);
- ClassLoader loader = null;
-
- if (resourceName == null)
- return null;
- // System.out.println ("++ Resource: " + resourceName);
-
- if (id2loader != null)
- loader = (ClassLoader) id2loader.get(publicId);
- // System.out.println ("++ Loader: " + loader);
- if (loader == null)
- return ClassLoader.getSystemResourceAsStream(resourceName);
- return loader.getResourceAsStream(resourceName);
- }
-
- /**
- * Registers a given public ID as corresponding to a particular Java
- * resource in a given class loader, typically distributed with a
- * software package. This resource will be preferred over system IDs
- * included in XML documents. This mechanism should most typically be
- * used for Document Type Definitions (DTDs), where the public IDs are
- * formally managed and versioned.
- * <p/>
- * <P> If a mapping to a URI has been provided, that mapping takes
- * precedence over this one.
- *
- * @param publicId The managed public ID being mapped
- * @param resourceName The name of the Java resource
- * @param loader The class loader holding the resource, or null if
- * it is a system resource.
- */
- public void registerCatalogEntry(String publicId,
- String resourceName,
- ClassLoader loader) {
- if (id2resource == null)
- id2resource = new Hashtable(17);
- id2resource.put(publicId, resourceName);
-
- if (loader != null) {
- if (id2loader == null)
- id2loader = new Hashtable(17);
- id2loader.put(publicId, loader);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/SimpleHashtable.java b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/SimpleHashtable.java
deleted file mode 100644
index bbe4e5fc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/SimpleHashtable.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dtdparser;
-
-import java.util.Enumeration;
-
-
-// This could be replaced by Collections class unless we want
-// to be able to run on JDK 1.1
-
-
-/**
- * This class implements a special purpose hashtable. It works like a
- * normal <code>java.util.Hashtable</code> except that: <OL>
- * <p/>
- * <LI> Keys to "get" are strings which are known to be interned,
- * so that "==" is used instead of "String.equals". (Interning
- * could be document-relative instead of global.)
- * <p/>
- * <LI> It's not synchronized, since it's to be used only by
- * one thread at a time.
- * <p/>
- * <LI> The keys () enumerator allocates no memory, with live
- * updates to the data disallowed.
- * <p/>
- * <LI> It's got fewer bells and whistles: fixed threshold and
- * load factor, no JDK 1.2 collection support, only keys can be
- * enumerated, things can't be removed, simpler inheritance; more.
- * <p/>
- * </OL>
- * <p/>
- * <P> The overall result is that it's less expensive to use these in
- * performance-critical locations, in terms both of CPU and memory,
- * than <code>java.util.Hashtable</code> instances. In this package
- * it makes a significant difference when normalizing attributes,
- * which is done for each start-element construct.
- *
- * @version $Revision: 1.2 $
- */
-final class SimpleHashtable implements Enumeration {
- // entries ...
- private Entry table[];
-
- // currently enumerated key
- private Entry current = null;
- private int currentBucket = 0;
-
- private int count;
- private int threshold;
-
- private static final float loadFactor = 0.75f;
-
-
- /**
- * Constructs a new, empty hashtable with the specified initial
- * capacity.
- *
- * @param initialCapacity the initial capacity of the hashtable.
- */
- public SimpleHashtable(int initialCapacity) {
- if (initialCapacity < 0)
- throw new IllegalArgumentException("Illegal Capacity: " +
- initialCapacity);
- if (initialCapacity == 0)
- initialCapacity = 1;
- table = new Entry[initialCapacity];
- threshold = (int) (initialCapacity * loadFactor);
- }
-
- /**
- * Constructs a new, empty hashtable with a default capacity.
- */
- public SimpleHashtable() {
- this(11);
- }
-
- /**
- */
- public void clear() {
- count = 0;
- currentBucket = 0;
- current = null;
- for (int i = 0; i < table.length; i++)
- table[i] = null;
- }
-
- /**
- * Returns the number of keys in this hashtable.
- *
- * @return the number of keys in this hashtable.
- */
- public int size() {
- return count;
- }
-
- /**
- * Returns an enumeration of the keys in this hashtable.
- *
- * @return an enumeration of the keys in this hashtable.
- * @see Enumeration
- */
- public Enumeration keys() {
- currentBucket = 0;
- current = null;
- return this;
- }
-
- /**
- * Used to view this as an enumeration; returns true if there
- * are more keys to be enumerated.
- */
- public boolean hasMoreElements() {
- if (current != null)
- return true;
- while (currentBucket < table.length) {
- current = table[currentBucket++];
- if (current != null)
- return true;
- }
- return false;
- }
-
- /**
- * Used to view this as an enumeration; returns the next key
- * in the enumeration.
- */
- public Object nextElement() {
- Object retval;
-
- if (current == null)
- throw new IllegalStateException();
- retval = current.key;
- current = current.next;
- return retval;
- }
-
-
- /**
- * Returns the value to which the specified key is mapped in this hashtable.
- */
- public Object get(String key) {
- Entry tab[] = table;
- int hash = key.hashCode();
- int index = (hash & 0x7FFFFFFF) % tab.length;
- for (Entry e = tab[index]; e != null; e = e.next) {
- if ((e.hash == hash) && (e.key == key))
- return e.value;
- }
- return null;
- }
-
- /**
- * Returns the value to which the specified key is mapped in this
- * hashtable ... the key isn't necessarily interned, though.
- */
- public Object getNonInterned(String key) {
- Entry tab[] = table;
- int hash = key.hashCode();
- int index = (hash & 0x7FFFFFFF) % tab.length;
- for (Entry e = tab[index]; e != null; e = e.next) {
- if ((e.hash == hash) && e.key.equals(key))
- return e.value;
- }
- return null;
- }
-
- /**
- * Increases the capacity of and internally reorganizes this
- * hashtable, in order to accommodate and access its entries more
- * efficiently. This method is called automatically when the
- * number of keys in the hashtable exceeds this hashtable's capacity
- * and load factor.
- */
- private void rehash() {
- int oldCapacity = table.length;
- Entry oldMap[] = table;
-
- int newCapacity = oldCapacity * 2 + 1;
- Entry newMap[] = new Entry[newCapacity];
-
- threshold = (int) (newCapacity * loadFactor);
- table = newMap;
-
- /*
- System.out.println("rehash old=" + oldCapacity
- + ", new=" + newCapacity
- + ", thresh=" + threshold
- + ", count=" + count);
- */
-
- for (int i = oldCapacity; i-- > 0;) {
- for (Entry old = oldMap[i]; old != null;) {
- Entry e = old;
- old = old.next;
-
- int index = (e.hash & 0x7FFFFFFF) % newCapacity;
- e.next = newMap[index];
- newMap[index] = e;
- }
- }
- }
-
- /**
- * Maps the specified <code>key</code> to the specified
- * <code>value</code> in this hashtable. Neither the key nor the
- * value can be <code>null</code>.
- * <p/>
- * <P>The value can be retrieved by calling the <code>get</code> method
- * with a key that is equal to the original key.
- */
- public Object put(Object key, Object value) {
- // Make sure the value is not null
- if (value == null) {
- throw new NullPointerException();
- }
-
- // Makes sure the key is not already in the hashtable.
- Entry tab[] = table;
- int hash = key.hashCode();
- int index = (hash & 0x7FFFFFFF) % tab.length;
- for (Entry e = tab[index]; e != null; e = e.next) {
- // if ((e.hash == hash) && e.key.equals(key)) {
- if ((e.hash == hash) && (e.key == key)) {
- Object old = e.value;
- e.value = value;
- return old;
- }
- }
-
- if (count >= threshold) {
- // Rehash the table if the threshold is exceeded
- rehash();
-
- tab = table;
- index = (hash & 0x7FFFFFFF) % tab.length;
- }
-
- // Creates the new entry.
- Entry e = new Entry(hash, key, value, tab[index]);
- tab[index] = e;
- count++;
- return null;
- }
-
-
- /**
- * Hashtable collision list.
- */
- private static class Entry {
- int hash;
- Object key;
- Object value;
- Entry next;
-
- protected Entry(int hash, Object key, Object value, Entry next) {
- this.hash = hash;
- this.key = key;
- this.value = value;
- this.next = next;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlChars.java b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlChars.java
deleted file mode 100644
index 848ad1dd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlChars.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dtdparser;
-
-
-/**
- * Methods in this class are used to determine whether characters may
- * appear in certain roles in XML documents. Such methods are used
- * both to parse and to create such documents.
- *
- * @author David Brownell
- * @version 1.1, 00/08/05
- */
-public class XmlChars {
- // can't construct instances
- private XmlChars() {
- }
-
- /**
- * Returns true if the argument, a UCS-4 character code, is valid in
- * XML documents. Unicode characters fit into the low sixteen
- * bits of a UCS-4 character, and pairs of Unicode <em>surrogate
- * characters</em> can be combined to encode UCS-4 characters in
- * documents containing only Unicode. (The <code>char</code> datatype
- * in the Java Programming Language represents Unicode characters,
- * including unpaired surrogates.)
- * <p/>
- * <P> In XML, UCS-4 characters can also be encoded by the use of
- * <em>character references</em> such as <b>&amp;#x12345678;</b>, which
- * happens to refer to a character that is disallowed in XML documents.
- * UCS-4 characters allowed in XML documents can be expressed with
- * one or two Unicode characters.
- *
- * @param ucs4char The 32-bit UCS-4 character being tested.
- */
- static public boolean isChar(int ucs4char) {
- // [2] Char ::= #x0009 | #x000A | #x000D
- // | [#x0020-#xD7FF]
- // ... surrogates excluded!
- // | [#xE000-#xFFFD]
- // | [#x10000-#x10ffff]
- return ((ucs4char >= 0x0020 && ucs4char <= 0xD7FF)
- || ucs4char == 0x000A || ucs4char == 0x0009
- || ucs4char == 0x000D
- || (ucs4char >= 0xE000 && ucs4char <= 0xFFFD)
- || (ucs4char >= 0x10000 && ucs4char <= 0x10ffff));
- }
-
- /**
- * Returns true if the character is allowed to be a non-initial
- * character in names according to the XML recommendation.
- *
- * @see #isNCNameChar(char)
- * @see #isLetter(char)
- */
- public static boolean isNameChar(char c) {
- // [4] NameChar ::= Letter | Digit | '.' | '_' | ':'
- // | CombiningChar | Extender
-
- if (isLetter2(c))
- return true;
- else if (c == '>')
- return false;
- else if (c == '.' || c == '-' || c == '_' || c == ':'
- || isExtender(c))
- return true;
- else
- return false;
- }
-
- /**
- * Returns true if the character is allowed to be a non-initial
- * character in unscoped names according to the rules of the XML
- * Namespaces proposed recommendation. Except for precluding
- * the colon (used to separate names from their scopes) these
- * characters are just as allowed by the XML recommendation.
- *
- * @see #isNameChar(char)
- * @see #isLetter(char)
- */
- public static boolean isNCNameChar(char c) {
- // [NC 5] NCNameChar ::= Letter | Digit | '.' | '_'
- // | CombiningChar | Extender
- return c != ':' && isNameChar(c);
- }
-
- /**
- * Returns true if the character is allowed where XML supports
- * whitespace characters, false otherwise.
- */
- public static boolean isSpace(char c) {
- return c == ' ' || c == '\t' || c == '\n' || c == '\r';
- }
-
-
- /*
- * NOTE: java.lang.Character.getType() values are:
- *
- * UNASSIGNED = 0,
- *
- * UPPERCASE_LETTER = 1, // Lu
- * LOWERCASE_LETTER = 2, // Ll
- * TITLECASE_LETTER = 3, // Lt
- * MODIFIER_LETTER = 4, // Lm
- * OTHER_LETTER = 5, // Lo
- * NON_SPACING_MARK = 6, // Mn
- * ENCLOSING_MARK = 7, // Me
- * COMBINING_SPACING_MARK = 8, // Mc
- * DECIMAL_DIGIT_NUMBER = 9, // Nd
- * LETTER_NUMBER = 10, // Nl
- * OTHER_NUMBER = 11, // No
- * SPACE_SEPARATOR = 12, // Zs
- * LINE_SEPARATOR = 13, // Zl
- * PARAGRAPH_SEPARATOR = 14, // Zp
- * CONTROL = 15, // Cc
- * FORMAT = 16, // Cf
- * // 17 reserved for proposed Ci category
- * PRIVATE_USE = 18, // Co
- * SURROGATE = 19, // Cs
- * DASH_PUNCTUATION = 20, // Pd
- * START_PUNCTUATION = 21, // Ps
- * END_PUNCTUATION = 22, // Pe
- * CONNECTOR_PUNCTUATION = 23, // Pc
- * OTHER_PUNCTUATION = 24, // Po
- * MATH_SYMBOL = 25, // Sm
- * CURRENCY_SYMBOL = 26, // Sc
- * MODIFIER_SYMBOL = 27, // Sk
- * OTHER_SYMBOL = 28; // So
- */
-
- /**
- * Returns true if the character is an XML "letter". XML Names must
- * start with Letters or a few other characters, but other characters
- * in names must only satisfy the <em>isNameChar</em> predicate.
- *
- * @see #isNameChar(char)
- * @see #isNCNameChar(char)
- */
- public static boolean isLetter(char c) {
- // [84] Letter ::= BaseChar | Ideographic
- // [85] BaseChar ::= ... too much to repeat
- // [86] Ideographic ::= ... too much to repeat
-
- //
- // Optimize the typical case.
- //
- if (c >= 'a' && c <= 'z')
- return true;
- if (c == '/')
- return false;
- if (c >= 'A' && c <= 'Z')
- return true;
-
- //
- // Since the tables are too ridiculous to use in code,
- // we're using the footnotes here to drive this test.
- //
- switch (Character.getType(c)) {
- // app. B footnote says these are 'name start'
- // chars' ...
- case Character.LOWERCASE_LETTER: // Ll
- case Character.UPPERCASE_LETTER: // Lu
- case Character.OTHER_LETTER: // Lo
- case Character.TITLECASE_LETTER: // Lt
- case Character.LETTER_NUMBER: // Nl
-
- // OK, here we just have some exceptions to check...
- return !isCompatibilityChar(c)
- // per "5.14 of Unicode", rule out some combiners
- && !(c >= 0x20dd && c <= 0x20e0);
-
- default:
- // check for some exceptions: these are "alphabetic"
- return ((c >= 0x02bb && c <= 0x02c1)
- || c == 0x0559 || c == 0x06e5 || c == 0x06e6);
- }
- }
-
- //
- // XML 1.0 discourages "compatibility" characters in names; these
- // were defined to permit passing through some information stored in
- // older non-Unicode character sets. These always have alternative
- // representations in Unicode, e.g. using combining chars.
- //
- private static boolean isCompatibilityChar(char c) {
- // the numerous comparisions here seem unavoidable,
- // but the switch can reduce the number which must
- // actually be executed.
-
- switch ((c >> 8) & 0x0ff) {
- case 0x00:
- // ISO Latin/1 has a few compatibility characters
- return c == 0x00aa || c == 0x00b5 || c == 0x00ba;
-
- case 0x01:
- // as do Latin Extended A and (parts of) B
- return (c >= 0x0132 && c <= 0x0133)
- || (c >= 0x013f && c <= 0x0140)
- || c == 0x0149
- || c == 0x017f
- || (c >= 0x01c4 && c <= 0x01cc)
- || (c >= 0x01f1 && c <= 0x01f3);
-
- case 0x02:
- // some spacing modifiers
- return (c >= 0x02b0 && c <= 0x02b8)
- || (c >= 0x02e0 && c <= 0x02e4);
-
- case 0x03:
- return c == 0x037a; // Greek
-
- case 0x05:
- return c == 0x0587; // Armenian
-
- case 0x0e:
- return c >= 0x0edc && c <= 0x0edd; // Laotian
-
- case 0x11:
- // big chunks of Hangul Jamo are all "compatibility"
- return c == 0x1101
- || c == 0x1104
- || c == 0x1108
- || c == 0x110a
- || c == 0x110d
- || (c >= 0x1113 && c <= 0x113b)
- || c == 0x113d
- || c == 0x113f
- || (c >= 0x1141 && c <= 0x114b)
- || c == 0x114d
- || c == 0x114f
- || (c >= 0x1151 && c <= 0x1153)
- || (c >= 0x1156 && c <= 0x1158)
- || c == 0x1162
- || c == 0x1164
- || c == 0x1166
- || c == 0x1168
- || (c >= 0x116a && c <= 0x116c)
- || (c >= 0x116f && c <= 0x1171)
- || c == 0x1174
- || (c >= 0x1176 && c <= 0x119d)
- || (c >= 0x119f && c <= 0x11a2)
- || (c >= 0x11a9 && c <= 0x11aa)
- || (c >= 0x11ac && c <= 0x11ad)
- || (c >= 0x11b0 && c <= 0x11b6)
- || c == 0x11b9
- || c == 0x11bb
- || (c >= 0x11c3 && c <= 0x11ea)
- || (c >= 0x11ec && c <= 0x11ef)
- || (c >= 0x11f1 && c <= 0x11f8)
- ;
-
- case 0x20:
- return c == 0x207f; // superscript
-
- case 0x21:
- return
- // various letterlike symbols
- c == 0x2102
- || c == 0x2107
- || (c >= 0x210a && c <= 0x2113)
- || c == 0x2115
- || (c >= 0x2118 && c <= 0x211d)
- || c == 0x2124
- || c == 0x2128
- || (c >= 0x212c && c <= 0x212d)
- || (c >= 0x212f && c <= 0x2138)
-
- // most Roman numerals (less 1K, 5K, 10K)
- || (c >= 0x2160 && c <= 0x217f)
- ;
-
- case 0x30:
- // some Hiragana
- return c >= 0x309b && c <= 0x309c;
-
- case 0x31:
- // all Hangul Compatibility Jamo
- return c >= 0x3131 && c <= 0x318e;
-
- case 0xf9:
- case 0xfa:
- case 0xfb:
- case 0xfc:
- case 0xfd:
- case 0xfe:
- case 0xff:
- // the whole "compatibility" area is for that purpose!
- return true;
-
- default:
- // most of Unicode isn't flagged as being for compatibility
- return false;
- }
- }
-
- // guts of isNameChar/isNCNameChar
- private static boolean isLetter2(char c) {
- // [84] Letter ::= BaseChar | Ideographic
- // [85] BaseChar ::= ... too much to repeat
- // [86] Ideographic ::= ... too much to repeat
- // [87] CombiningChar ::= ... too much to repeat
-
- //
- // Optimize the typical case.
- //
- if (c >= 'a' && c <= 'z')
- return true;
- if (c == '>')
- return false;
- if (c >= 'A' && c <= 'Z')
- return true;
-
- //
- // Since the tables are too ridiculous to use in code,
- // we're using the footnotes here to drive this test.
- //
- switch (Character.getType(c)) {
- // app. B footnote says these are 'name start'
- // chars' ...
- case Character.LOWERCASE_LETTER: // Ll
- case Character.UPPERCASE_LETTER: // Lu
- case Character.OTHER_LETTER: // Lo
- case Character.TITLECASE_LETTER: // Lt
- case Character.LETTER_NUMBER: // Nl
- // ... and these are name characters 'other
- // than name start characters'
- case Character.COMBINING_SPACING_MARK: // Mc
- case Character.ENCLOSING_MARK: // Me
- case Character.NON_SPACING_MARK: // Mn
- case Character.MODIFIER_LETTER: // Lm
- case Character.DECIMAL_DIGIT_NUMBER: // Nd
-
- // OK, here we just have some exceptions to check...
- return !isCompatibilityChar(c)
- // per "5.14 of Unicode", rule out some combiners
- && !(c >= 0x20dd && c <= 0x20e0);
-
- default:
- // added a character ...
- return c == 0x0387;
- }
- }
-
- private static boolean isDigit(char c) {
- // [88] Digit ::= ...
-
- //
- // java.lang.Character.isDigit is correct from the XML point
- // of view except that it allows "fullwidth" digits.
- //
- return Character.isDigit(c)
- && !((c >= 0xff10) && (c <= 0xff19));
- }
-
- private static boolean isExtender(char c) {
- // [89] Extender ::= ...
- return c == 0x00b7 || c == 0x02d0 || c == 0x02d1 || c == 0x0387
- || c == 0x0640 || c == 0x0e46 || c == 0x0ec6
- || c == 0x3005 || (c >= 0x3031 && c <= 0x3035)
- || (c >= 0x309d && c <= 0x309e)
- || (c >= 0x30fc && c <= 0x30fe)
- ;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlNames.java b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlNames.java
deleted file mode 100644
index 5ba9f15b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlNames.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dtdparser;
-
-
-/**
- * This class contains static methods used to determine whether identifiers
- * may appear in certain roles in XML documents. Such methods are used
- * both to parse and to create such documents.
- *
- * @author David Brownell
- * @version 1.1, 00/08/05
- */
-public class XmlNames {
- private XmlNames() {
- }
-
-
- /**
- * Returns true if the value is a legal XML name.
- *
- * @param value the string being tested
- */
- public static boolean isName(String value) {
- if (value == null)
- return false;
-
- char c = value.charAt(0);
- if (!XmlChars.isLetter(c) && c != '_' && c != ':')
- return false;
- for (int i = 1; i < value.length(); i++)
- if (!XmlChars.isNameChar(value.charAt(i)))
- return false;
- return true;
- }
-
- /**
- * Returns true if the value is a legal "unqualified" XML name, as
- * defined in the XML Namespaces proposed recommendation.
- * These are normal XML names, except that they may not contain
- * a "colon" character.
- *
- * @param value the string being tested
- */
- public static boolean isUnqualifiedName(String value) {
- if (value == null || value.length() == 0)
- return false;
-
- char c = value.charAt(0);
- if (!XmlChars.isLetter(c) && c != '_')
- return false;
- for (int i = 1; i < value.length(); i++)
- if (!XmlChars.isNCNameChar(value.charAt(i)))
- return false;
- return true;
- }
-
- /**
- * Returns true if the value is a legal "qualified" XML name, as defined
- * in the XML Namespaces proposed recommendation. Qualified names are
- * composed of an optional prefix (an unqualified name), followed by a
- * colon, and a required "local part" (an unqualified name). Prefixes are
- * declared, and correspond to particular URIs which scope the "local
- * part" of the name. (This method cannot check whether the prefix of a
- * name has been declared.)
- *
- * @param value the string being tested
- */
- public static boolean isQualifiedName(String value) {
- if (value == null)
- return false;
-
- // [6] QName ::= (Prefix ':')? LocalPart
- // [7] Prefix ::= NCName
- // [8] LocalPart ::= NCName
-
- int first = value.indexOf(':');
-
- // no Prefix, only check LocalPart
- if (first <= 0)
- return isUnqualifiedName(value);
-
- // Prefix exists, check everything
-
- int last = value.lastIndexOf(':');
- if (last != first)
- return false;
-
- return isUnqualifiedName(value.substring(0, first))
- && isUnqualifiedName(value.substring(first + 1));
- }
-
- /**
- * This method returns true if the identifier is a "name token"
- * as defined in the XML specification. Like names, these
- * may only contain "name characters"; however, they do not need
- * to have letters as their initial characters. Attribute values
- * defined to be of type NMTOKEN(S) must satisfy this predicate.
- *
- * @param token the string being tested
- */
- public static boolean isNmtoken(String token) {
- int length = token.length();
-
- for (int i = 0; i < length; i++)
- if (!XmlChars.isNameChar(token.charAt(i)))
- return false;
- return true;
- }
-
-
- /**
- * This method returns true if the identifier is a "name token" as
- * defined by the XML Namespaces proposed recommendation.
- * These are like XML "name tokens" but they may not contain the
- * "colon" character.
- *
- * @param token the string being tested
- * @see #isNmtoken
- */
- public static boolean isNCNmtoken(String token) {
- return isNmtoken(token) && token.indexOf(':') < 0;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlReader.java b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlReader.java
deleted file mode 100644
index 37b6ecfe..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/XmlReader.java
+++ /dev/null
@@ -1,784 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dtdparser;
-
-import java.io.ByteArrayInputStream;
-import java.io.CharConversionException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PushbackInputStream;
-import java.io.Reader;
-import java.util.Hashtable;
-
-
-// NOTE: Add I18N support to this class when JDK gets the ability to
-// defer selection of locale for exception messages ... use the same
-// technique for both.
-
-
-/**
- * This handles several XML-related tasks that normal java.io Readers
- * don't support, inluding use of IETF standard encoding names and
- * automatic detection of most XML encodings. The former is needed
- * for interoperability; the latter is needed to conform with the XML
- * spec. This class also optimizes reading some common encodings by
- * providing low-overhead unsynchronized Reader support.
- * <p/>
- * <P> Note that the autodetection facility should be used only on
- * data streams which have an unknown character encoding. For example,
- * it should never be used on MIME text/xml entities.
- * <p/>
- * <P> Note that XML processors are only required to support UTF-8 and
- * UTF-16 character encodings. Autodetection permits the underlying Java
- * implementation to provide support for many other encodings, such as
- * US-ASCII, ISO-8859-5, Shift_JIS, EUC-JP, and ISO-2022-JP.
- *
- * @author David Brownell
- * @author Janet Koenig
- * @version 1.3 00/02/24
- */
-// package private
-final class XmlReader extends Reader {
- private static final int MAXPUSHBACK = 512;
-
- private Reader in;
- private String assignedEncoding;
- private boolean closed;
-
- //
- // This class always delegates I/O to a reader, which gets
- // its data from the very beginning of the XML text. It needs
- // to use a pushback stream since (a) autodetection can read
- // partial UTF-8 characters which need to be fully processed,
- // (b) the "Unicode" readers swallow characters that they think
- // are byte order marks, so tests fail if they don't see the
- // real byte order mark.
- //
- // It's got do this efficiently: character I/O is solidly on the
- // critical path. (So keep buffer length over 2 Kbytes to avoid
- // excess buffering. Many URL handlers stuff a BufferedInputStream
- // between here and the real data source, and larger buffers keep
- // that from slowing you down.)
- //
-
- /**
- * Constructs the reader from an input stream, autodetecting
- * the encoding to use according to the heuristic specified
- * in the XML 1.0 recommendation.
- *
- * @param in the input stream from which the reader is constructed
- * @throws IOException on error, such as unrecognized encoding
- */
- public static Reader createReader(InputStream in) throws IOException {
- return new XmlReader(in);
- }
-
- /**
- * Creates a reader supporting the given encoding, mapping
- * from standard encoding names to ones that understood by
- * Java where necessary.
- *
- * @param in the input stream from which the reader is constructed
- * @param encoding the IETF standard name of the encoding to use;
- * if null, autodetection is used.
- * @throws IOException on error, including unrecognized encoding
- */
- public static Reader createReader(InputStream in, String encoding)
- throws IOException {
- if (encoding == null)
- return new XmlReader(in);
- if ("UTF-8".equalsIgnoreCase(encoding)
- || "UTF8".equalsIgnoreCase(encoding))
- return new Utf8Reader(in);
- if ("US-ASCII".equalsIgnoreCase(encoding)
- || "ASCII".equalsIgnoreCase(encoding))
- return new AsciiReader(in);
- if ("ISO-8859-1".equalsIgnoreCase(encoding)
- // plus numerous aliases ...
- )
- return new Iso8859_1Reader(in);
-
- //
- // What we really want is an administerable resource mapping
- // encoding names/aliases to classnames. For example a property
- // file resource, "readers/mapping.props", holding and a set
- // of readers in that (sub)package... defaulting to this call
- // only if no better choice is available.
- //
- return new InputStreamReader(in, std2java(encoding));
- }
-
- //
- // JDK doesn't know all of the standard encoding names, and
- // in particular none of the EBCDIC ones IANA defines (and
- // which IBM encourages).
- //
- static private final Hashtable charsets = new Hashtable(31);
-
- static {
- charsets.put("UTF-16", "Unicode");
- charsets.put("ISO-10646-UCS-2", "Unicode");
-
- // NOTE: no support for ISO-10646-UCS-4 yet.
-
- charsets.put("EBCDIC-CP-US", "cp037");
- charsets.put("EBCDIC-CP-CA", "cp037");
- charsets.put("EBCDIC-CP-NL", "cp037");
- charsets.put("EBCDIC-CP-WT", "cp037");
-
- charsets.put("EBCDIC-CP-DK", "cp277");
- charsets.put("EBCDIC-CP-NO", "cp277");
- charsets.put("EBCDIC-CP-FI", "cp278");
- charsets.put("EBCDIC-CP-SE", "cp278");
-
- charsets.put("EBCDIC-CP-IT", "cp280");
- charsets.put("EBCDIC-CP-ES", "cp284");
- charsets.put("EBCDIC-CP-GB", "cp285");
- charsets.put("EBCDIC-CP-FR", "cp297");
-
- charsets.put("EBCDIC-CP-AR1", "cp420");
- charsets.put("EBCDIC-CP-HE", "cp424");
- charsets.put("EBCDIC-CP-BE", "cp500");
- charsets.put("EBCDIC-CP-CH", "cp500");
-
- charsets.put("EBCDIC-CP-ROECE", "cp870");
- charsets.put("EBCDIC-CP-YU", "cp870");
- charsets.put("EBCDIC-CP-IS", "cp871");
- charsets.put("EBCDIC-CP-AR2", "cp918");
-
- // IANA also defines two that JDK 1.2 doesn't handle:
- // EBCDIC-CP-GR --> CP423
- // EBCDIC-CP-TR --> CP905
- }
-
- // returns an encoding name supported by JDK >= 1.1.6
- // for some cases required by the XML spec
- private static String std2java(String encoding) {
- String temp = encoding.toUpperCase();
- temp = (String) charsets.get(temp);
- return temp != null ? temp : encoding;
- }
-
- /**
- * Returns the standard name of the encoding in use
- */
- public String getEncoding() {
- return assignedEncoding;
- }
-
- private XmlReader(InputStream stream) throws IOException {
- super(stream);
-
- PushbackInputStream pb;
- byte buf [];
- int len;
-
- if (stream instanceof PushbackInputStream)
- pb = (PushbackInputStream) stream;
- else
- pb = new PushbackInputStream(stream, MAXPUSHBACK);
-
- //
- // See if we can figure out the character encoding used
- // in this file by peeking at the first few bytes.
- //
- buf = new byte[4];
- len = pb.read(buf);
- if (len > 0)
- pb.unread(buf, 0, len);
-
- if (len == 4)
- switch (buf[0] & 0x0ff) {
- case 0:
- // 00 3c 00 3f == illegal UTF-16 big-endian
- if (buf[1] == 0x3c && buf[2] == 0x00 && buf[3] == 0x3f) {
- setEncoding(pb, "UnicodeBig");
- return;
- }
- // else it's probably UCS-4
- break;
-
- case '<': // 0x3c: the most common cases!
- switch (buf[1] & 0x0ff) {
- // First character is '<'; could be XML without
- // an XML directive such as "<hello>", "<!-- ...",
- // and so on.
- default:
- break;
-
- // 3c 00 3f 00 == illegal UTF-16 little endian
- case 0x00:
- if (buf[2] == 0x3f && buf[3] == 0x00) {
- setEncoding(pb, "UnicodeLittle");
- return;
- }
- // else probably UCS-4
- break;
-
- // 3c 3f 78 6d == ASCII and supersets '<?xm'
- case '?':
- if (buf[2] != 'x' || buf[3] != 'm')
- break;
- //
- // One of several encodings could be used:
- // Shift-JIS, ASCII, UTF-8, ISO-8859-*, etc
- //
- useEncodingDecl(pb, "UTF8");
- return;
- }
- break;
-
- // 4c 6f a7 94 ... some EBCDIC code page
- case 0x4c:
- if (buf[1] == 0x6f
- && (0x0ff & buf[2]) == 0x0a7
- && (0x0ff & buf[3]) == 0x094) {
- useEncodingDecl(pb, "CP037");
- return;
- }
- // whoops, treat as UTF-8
- break;
-
- // UTF-16 big-endian
- case 0xfe:
- if ((buf[1] & 0x0ff) != 0xff)
- break;
- setEncoding(pb, "UTF-16");
- return;
-
- // UTF-16 little-endian
- case 0xff:
- if ((buf[1] & 0x0ff) != 0xfe)
- break;
- setEncoding(pb, "UTF-16");
- return;
-
- // default ... no XML declaration
- default:
- break;
- }
-
- //
- // If all else fails, assume XML without a declaration, and
- // using UTF-8 encoding.
- //
- setEncoding(pb, "UTF-8");
- }
-
- /*
- * Read the encoding decl on the stream, knowing that it should
- * be readable using the specified encoding (basically, ASCII or
- * EBCDIC). The body of the document may use a wider range of
- * characters than the XML/Text decl itself, so we switch to use
- * the specified encoding as soon as we can. (ASCII is a subset
- * of UTF-8, ISO-8859-*, ISO-2022-JP, EUC-JP, and more; EBCDIC
- * has a variety of "code pages" that have these characters as
- * a common subset.)
- */
- private void useEncodingDecl(PushbackInputStream pb, String encoding)
- throws IOException {
- byte buffer [] = new byte[MAXPUSHBACK];
- int len;
- Reader r;
- int c;
-
- //
- // Buffer up a bunch of input, and set up to read it in
- // the specified encoding ... we can skip the first four
- // bytes since we know that "<?xm" was read to determine
- // what encoding to use!
- //
- len = pb.read(buffer, 0, buffer.length);
- pb.unread(buffer, 0, len);
- r = new InputStreamReader(new ByteArrayInputStream(buffer, 4, len),
- encoding);
-
- //
- // Next must be "l" (and whitespace) else we conclude
- // error and choose UTF-8.
- //
- if ((c = r.read()) != 'l') {
- setEncoding(pb, "UTF-8");
- return;
- }
-
- //
- // Then, we'll skip any
- // S version="..." [or single quotes]
- // bit and get any subsequent
- // S encoding="..." [or single quotes]
- //
- // We put an arbitrary size limit on how far we read; lots
- // of space will break this algorithm.
- //
- StringBuffer buf = new StringBuffer();
- StringBuffer keyBuf = null;
- String key = null;
- boolean sawEq = false;
- char quoteChar = 0;
- boolean sawQuestion = false;
-
- XmlDecl:
- for (int i = 0; i < MAXPUSHBACK - 5; ++i) {
- if ((c = r.read()) == -1)
- break;
-
- // ignore whitespace before/between "key = 'value'"
- if (c == ' ' || c == '\t' || c == '\n' || c == '\r')
- continue;
-
- // ... but require at least a little!
- if (i == 0)
- break;
-
- // terminate the loop ASAP
- if (c == '?')
- sawQuestion = true;
- else if (sawQuestion) {
- if (c == '>')
- break;
- sawQuestion = false;
- }
-
- // did we get the "key =" bit yet?
- if (key == null || !sawEq) {
- if (keyBuf == null) {
- if (Character.isWhitespace((char) c))
- continue;
- keyBuf = buf;
- buf.setLength(0);
- buf.append((char) c);
- sawEq = false;
- } else if (Character.isWhitespace((char) c)) {
- key = keyBuf.toString();
- } else if (c == '=') {
- if (key == null)
- key = keyBuf.toString();
- sawEq = true;
- keyBuf = null;
- quoteChar = 0;
- } else
- keyBuf.append((char) c);
- continue;
- }
-
- // space before quoted value
- if (Character.isWhitespace((char) c))
- continue;
- if (c == '"' || c == '\'') {
- if (quoteChar == 0) {
- quoteChar = (char) c;
- buf.setLength(0);
- continue;
- } else if (c == quoteChar) {
- if ("encoding".equals(key)) {
- assignedEncoding = buf.toString();
-
- // [81] Encname ::= [A-Za-z] ([A-Za-z0-9._]|'-')*
- for (i = 0; i < assignedEncoding.length(); i++) {
- c = assignedEncoding.charAt(i);
- if ((c >= 'A' && c <= 'Z')
- || (c >= 'a' && c <= 'z'))
- continue;
- if (i == 0)
- break XmlDecl;
- if (i > 0 && (c == '-'
- || (c >= '0' && c <= '9')
- || c == '.' || c == '_'))
- continue;
- // map illegal names to UTF-8 default
- break XmlDecl;
- }
-
- setEncoding(pb, assignedEncoding);
- return;
-
- } else {
- key = null;
- continue;
- }
- }
- }
- buf.append((char) c);
- }
-
- setEncoding(pb, "UTF-8");
- }
-
- private void setEncoding(InputStream stream, String encoding)
- throws IOException {
- assignedEncoding = encoding;
- in = createReader(stream, encoding);
- }
-
- /**
- * Reads the number of characters read into the buffer, or -1 on EOF.
- */
- public int read(char buf [], int off, int len) throws IOException {
- int val;
-
- if (closed)
- return -1; // throw new IOException ("closed");
- val = in.read(buf, off, len);
- if (val == -1)
- close();
- return val;
- }
-
- /**
- * Reads a single character.
- */
- public int read() throws IOException {
- int val;
-
- if (closed)
- throw new IOException("closed");
- val = in.read();
- if (val == -1)
- close();
- return val;
- }
-
- /**
- * Returns true iff the reader supports mark/reset.
- */
- public boolean markSupported() {
- return in == null ? false : in.markSupported();
- }
-
- /**
- * Sets a mark allowing a limited number of characters to
- * be "peeked", by reading and then resetting.
- *
- * @param value how many characters may be "peeked".
- */
- public void mark(int value) throws IOException {
- if (in != null) in.mark(value);
- }
-
- /**
- * Resets the current position to the last marked position.
- */
- public void reset() throws IOException {
- if (in != null) in.reset();
- }
-
- /**
- * Skips a specified number of characters.
- */
- public long skip(long value) throws IOException {
- return in == null ? 0 : in.skip(value);
- }
-
- /**
- * Returns true iff input characters are known to be ready.
- */
- public boolean ready() throws IOException {
- return in == null ? false : in.ready();
- }
-
- /**
- * Closes the reader.
- */
- public void close() throws IOException {
- if (closed)
- return;
- in.close();
- in = null;
- closed = true;
- }
-
- //
- // Delegating to a converter module will always be slower than
- // direct conversion. Use a similar approach for any other
- // readers that need to be particularly fast; only block I/O
- // speed matters to this package. For UTF-16, separate readers
- // for big and little endian streams make a difference, too;
- // fewer conditionals in the critical path!
- //
- static abstract class BaseReader extends Reader {
- protected InputStream instream;
- protected byte buffer [];
- protected int start, finish;
-
- BaseReader(InputStream stream) {
- super(stream);
-
- instream = stream;
- buffer = new byte[8192];
- }
-
- public boolean ready() throws IOException {
- return instream == null
- || (finish - start) > 0
- || instream.available() != 0;
- }
-
- // caller shouldn't read again
- public void close() throws IOException {
- if (instream != null) {
- instream.close();
- start = finish = 0;
- buffer = null;
- instream = null;
- }
- }
- }
-
- //
- // We want this reader, to make the default encoding be as fast
- // as we can make it. JDK's "UTF8" (not "UTF-8" till JDK 1.2)
- // InputStreamReader works, but 20+% slower speed isn't OK for
- // the default/primary encoding.
- //
- static final class Utf8Reader extends BaseReader {
- // 2nd half of UTF-8 surrogate pair
- private char nextChar;
-
- Utf8Reader(InputStream stream) {
- super(stream);
- }
-
- public int read(char buf [], int offset, int len) throws IOException {
- int i = 0, c = 0;
-
- if (len <= 0)
- return 0;
-
- // Consume remaining half of any surrogate pair immediately
- if (nextChar != 0) {
- buf[offset + i++] = nextChar;
- nextChar = 0;
- }
-
- while (i < len) {
- // stop or read data if needed
- if (finish <= start) {
- if (instream == null) {
- c = -1;
- break;
- }
- start = 0;
- finish = instream.read(buffer, 0, buffer.length);
- if (finish <= 0) {
- this.close();
- c = -1;
- break;
- }
- }
-
- //
- // RFC 2279 describes UTF-8; there are six encodings.
- // Each encoding takes a fixed number of characters
- // (1-6 bytes) and is flagged by a bit pattern in the
- // first byte. The five and six byte-per-character
- // encodings address characters which are disallowed
- // in XML documents, as do some four byte ones.
- //
-
- //
- // Single byte == ASCII. Common; optimize.
- //
- c = buffer[start] & 0x0ff;
- if ((c & 0x80) == 0x00) {
- // 0x0000 <= c <= 0x007f
- start++;
- buf[offset + i++] = (char) c;
- continue;
- }
-
- //
- // Multibyte chars -- check offsets optimistically,
- // ditto the "10xx xxxx" format for subsequent bytes
- //
- int off = start;
-
- try {
- // 2 bytes
- if ((buffer[off] & 0x0E0) == 0x0C0) {
- c = (buffer[off++] & 0x1f) << 6;
- c += buffer[off++] & 0x3f;
-
- // 0x0080 <= c <= 0x07ff
-
- // 3 bytes
- } else if ((buffer[off] & 0x0F0) == 0x0E0) {
- c = (buffer[off++] & 0x0f) << 12;
- c += (buffer[off++] & 0x3f) << 6;
- c += buffer[off++] & 0x3f;
-
- // 0x0800 <= c <= 0xffff
-
- // 4 bytes
- } else if ((buffer[off] & 0x0f8) == 0x0F0) {
- c = (buffer[off++] & 0x07) << 18;
- c += (buffer[off++] & 0x3f) << 12;
- c += (buffer[off++] & 0x3f) << 6;
- c += buffer[off++] & 0x3f;
-
- // 0x0001 0000 <= c <= 0x001f ffff
-
- // Unicode supports c <= 0x0010 ffff ...
- if (c > 0x0010ffff)
- throw new CharConversionException("UTF-8 encoding of character 0x00"
- + Integer.toHexString(c)
- + " can't be converted to Unicode.");
-
- // Convert UCS-4 char to surrogate pair (UTF-16)
- c -= 0x10000;
- nextChar = (char) (0xDC00 + (c & 0x03ff));
- c = 0xD800 + (c >> 10);
-
- // 5 and 6 byte versions are XML WF errors, but
- // typically come from mislabeled encodings
- } else
- throw new CharConversionException("Unconvertible UTF-8 character"
- + " beginning with 0x"
- + Integer.toHexString(buffer[start] & 0xff));
-
- } catch (ArrayIndexOutOfBoundsException e) {
- // off > length && length >= buffer.length
- c = 0;
- }
-
- //
- // if the buffer held only a partial character,
- // compact it and try to read the rest of the
- // character. worst case involves three
- // single-byte reads -- quite rare.
- //
- if (off > finish) {
- System.arraycopy(buffer, start,
- buffer, 0, finish - start);
- finish -= start;
- start = 0;
- off = instream.read(buffer, finish,
- buffer.length - finish);
- if (off < 0) {
- this.close();
- throw new CharConversionException("Partial UTF-8 char");
- }
- finish += off;
- continue;
- }
-
- //
- // check the format of the non-initial bytes
- //
- for (start++; start < off; start++) {
- if ((buffer[start] & 0xC0) != 0x80) {
- this.close();
- throw new CharConversionException("Malformed UTF-8 char -- "
- + "is an XML encoding declaration missing?");
- }
- }
-
- //
- // If this needed a surrogate pair, consume ASAP
- //
- buf[offset + i++] = (char) c;
- if (nextChar != 0 && i < len) {
- buf[offset + i++] = nextChar;
- nextChar = 0;
- }
- }
- if (i > 0)
- return i;
- return (c == -1) ? -1 : 0;
- }
- }
-
- //
- // We want ASCII and ISO-8859 Readers since they're the most common
- // encodings in the US and Europe, and we don't want performance
- // regressions for them. They're also easy to implement efficiently,
- // since they're bitmask subsets of UNICODE.
- //
- // XXX haven't benchmarked these readers vs what we get out of JDK.
- //
- static final class AsciiReader extends BaseReader {
- AsciiReader(InputStream in) {
- super(in);
- }
-
- public int read(char buf [], int offset, int len) throws IOException {
- int i, c;
-
- if (instream == null)
- return -1;
-
- for (i = 0; i < len; i++) {
- if (start >= finish) {
- start = 0;
- finish = instream.read(buffer, 0, buffer.length);
- if (finish <= 0) {
- if (finish <= 0)
- this.close();
- break;
- }
- }
- c = buffer[start++];
- if ((c & 0x80) != 0)
- throw new CharConversionException("Illegal ASCII character, 0x"
- + Integer.toHexString(c & 0xff));
- buf[offset + i] = (char) c;
- }
- if (i == 0 && finish <= 0)
- return -1;
- return i;
- }
- }
-
- static final class Iso8859_1Reader extends BaseReader {
- Iso8859_1Reader(InputStream in) {
- super(in);
- }
-
- public int read(char buf [], int offset, int len) throws IOException {
- int i;
-
- if (instream == null)
- return -1;
-
- for (i = 0; i < len; i++) {
- if (start >= finish) {
- start = 0;
- finish = instream.read(buffer, 0, buffer.length);
- if (finish <= 0) {
- if (finish <= 0)
- this.close();
- break;
- }
- }
- buf[offset + i] = (char) (0x0ff & buffer[start++]);
- }
- if (i == 0 && finish <= 0)
- return -1;
- return i;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/package.html b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/package.html
deleted file mode 100644
index 950d8da1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/package.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<HTML><BODY>
-<P> scan DTD stream and generates appropriate events.</P>
-</BODY></HTML>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/resources/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/resources/Messages.properties
deleted file mode 100644
index 11b7acc3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/dtdparser/resources/Messages.properties
+++ /dev/null
@@ -1,237 +0,0 @@
-#
-# Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# English diagnostic messages (and fragments) for Sun's XML parser.
-#
-# P-NNN ... parser messages
-# F-NNN ... message fragments (sometimes associated with more
-# than one message, but usually just with one)
-# V-NNN ... validation related messages
-#
-# Most messages can be produced in only one way.
-#
-
-
-#
-# Generic parsing messages, not specific to validation
-#
-P-000 = No parser input source!
-P-001 = Illegal character at end of document, &#x{0};
-P-002 = Expansion of entity "&{0};" is not well formed
-P-003 = Premature end of input
-P-004 = Missing whitespace {0}
-P-005 = Only whitespace allowed {0}
-
- #
- # unadorned "missing whitespace", with P-004 only
- #
- F-000 = after element name declaration
- F-001 = between attribute name and type
- F-002 = after NOTATION type name
- F-003 = between attribute type and default value
- F-004 = after #FIXED
- F-005 = after <!ENTITY declaration
- F-006 = after % in parameter entity declaration
- F-007 = after entity name
- F-008 = before SYSTEM literal URI
- F-009 = after PUBLIC keyword
- # F-010 ... identifier can be reused
- F-011 = after notation name
- # F-012 ... identifier can be reused
- # F-013 ... identifier can be reused
-
- #
- # in declaration, in "S Name", with P-004 and P-005
- #
- F-014 = before name in <!DOCTYPE declaration
- F-015 = before name in <!ELEMENT declaration
- F-016 = before name in <!ATTLIST declaration
- F-017 = before name in <!ENTITY declaration
- F-018 = before NDATA notation name in <!ENTITY declaration
- F-019 = before name in <!NOTATION declaration
-
-P-006 = Name tokens must not start with "{0}" characters
-P-007 = Value must be quoted
-P-008 = Next character must be "{0}" {1} {2}
-
- F-020 = terminating reference to entity
- F-021 = terminating reference to parameter entity
- F-022 = terminating comment
- F-023 = in XML Declaration
- F-024 = terminating internal DTD subset
- F-025 = terminating <!DOCTYPE ...> declaration
- F-026 = after attribute name
- F-027 = terminating element
- F-028 = starting content model for element
- F-029 = starting list of attribute NOTATIONS
- F-030 = beginning condition DTD subset
- F-031 = terminating <!ENTITY ...> declaration
- F-032 = terminating <!NOTATION ...> declaration
-
-P-009 = Illegal character or entity reference syntax
-
-P-010 = Only external parameter entities may use "%{0};" in entity values
-P-011 = Illegal parameter entity reference syntax
-P-012 = Use "&lt;" for "<" in attribute values
-P-013 = Illegal reference to external entity "&{0};" in attribute
-P-014 = Reference to undefined entity "&{0};"
-P-015 = Expecting quoted value for {0}
-
- F-033 = PUBLIC identifier
- F-034 = SYSTEM identifier
- F-035 = attribute value {0}
-
-P-016 = Illegal character in PUBLIC identifier: "{0}"
-P-017 = End of entity while processing comment
-P-018 = Processing instruction target is missing
-P-019 = XML declaration may only begin entities
-
-P-020 = Illegal processing instruction target: "{0}"
-P-021 = End of input inside processing instruction
-P-022 = Illegal processing instruction name, or missing whitespace
-P-023 = Illegal character "&#x{0};" ({1}) at end of XML Declaration
-P-024 = Expected "{0}=..."
-P-025 = XML version "{0}" should be declared
-P-026 = Illegal XML version string "{0}"
-P-027 = XML version "{0}" is recognized, but not "{1}"
-P-028 = Internal DTD subset must not have "<![..." constructs
-P-029 = Standalone declaration must be "yes" or "no", not "{0}"
-
-P-030 = Whitespace required before attributes
-P-031 = Attribute names must not start with "{0}" characters
-P-032 = Attribute "{0}" already appeared in this tag
-P-033 = Illegal xml:lang value "{0}"
-P-034 = Expected "</{0}>" to terminate element starting on line {1}
-P-035 = End of entity not allowed; an end tag is missing
-P-036 = ">" must terminate <!ELEMENT {0} ...> declaration, not "{1}"
-P-037 = Sequence content model must not contain "{0}"
-P-038 = Choice content model must not contain "{0}"
-P-039 = No content model may contain "{0}"
-
-P-040 = Need right parenthesis or "{1}" in content model, not "{0}"
-P-041 = Need right parenthesis, ",", or "|" in content model, not "{0}"
-P-042 = Illegal mixed content model for "{0}", next char = &#x{1};
-P-043 = Mixed content model for "{0}" must end with ")*", not "{1}"
-P-044 = Either an attribute declaration or ">" is expected, not "{0}"
-P-045 = Illegal type (starts with "{1}") for attribute "{0}"
-P-046 = Need keyword in conditional DTD section
-P-047 = Unterminated conditional DTD section
-P-048 = Only INCLUDE and IGNORE are allowed, not "{0}"
-P-049 = Illegal decimal character reference
-
-P-050 = Illegal hexadecimal character reference
-P-051 = Illegal XML character &#x{0};
-P-052 = Internal entity "&{0};" has characters after content
-P-053 = Unparsed entities such as "&{0};" must not be included
-P-054 = Using original entity definition for "&{0};"
-P-055 = Relative URI "{0}"; can not be resolved without a document URI
-P-056 = URI "{0}" has a fragment ID
-P-057 = Need "?>" to terminate XML declaration
-P-058 = External entity "&{0};" has characters after content
-P-059 = External parameter entity "%{0};" has characters after markup
-
-P-060 = Illegal character "{0}" in encoding name
-P-061 = Declared encoding "{0}" does not match actual one "{1}"; \
- this might not be an error
-P-062 = Notation must be PUBLIC or SYSTEM
-P-063 = Using first definition of notation "{0}"
-P-064 = Premature end of parameter entity "%{0};"
-P-065 = Entity Resolver did not provide SYSTEM id; may affect relative URIs
-# P-066 ... ID available
-P-067 = Document root element is missing
-P-068 = Notation name is required
-P-069 = Expansion of entity "{0}" is recursive
-
-P-070 = Malformed second part of surrogate pair: &#x{0};
-P-071 = Illegal XML character: &#x{0};
-P-072 = Character data cannot have "]]>"
-P-073 = EOF while parsing <![CDATA[ section
-P-074 = Illegal Unicode surrogate pair: &#x{0}; &#x{1};
-P-075 = Unsupported encoding: "{0}" (line number may be too low)
-P-076 = Character conversion error: "{0}" (line number may be too low)
-P-077 = Maximum symbol length ({0} characters) exceeded
-P-078 = No messages for locale "{0}" are available
-P-079 = The content beginning "<{1}" is not legal markup \
- Perhaps the "{1}" (&#{0};) character should be a letter
-
-P-080 = Parameter entity references must not appear within \
- markup declarations in the internal DTD subset
-P-081 = Incomplete Unicode surrogate pair: &#x{0}
-
-#
-# Validation messages, won't normally show up unless validation is
-# being performed. Note that V-022 relates to a spec bug: there
-# are both a WFC and VC on undefined PEs. If that's a WVC violation
-# there's no need for the VC, ever; and "standalone" would then affect
-# WF-ness. For the moment this assumes it's to be a VC not a WFC
-#
-V-000 = Validation is disabled
-V-001 = Valid documents must have a <!DOCTYPE declaration
-V-002 = This document is standalone, so it must not refer to "&{0};"
-V-003 = Undeclared notation "{0}" is used by an <!ENTITY...> declaration
-V-004 = Undeclared notation "{0}" is used by an <!ATTLIST...> declaration
-V-005 = Element type "{0}" is not declared
-V-006 = Root element type is "{0}", but was declared to be "{1}"
-V-007 = Attribute "{0}" is not declared for element "{1}"
-V-008 = Attribute "{0}" of element "{1}" must only have value "{2}"
-V-009 = Attribute value for "{0}" is #REQUIRED
-
-V-010 = This document is standalone, \
- so attribute "{0}" must not be defaulted
-V-011 = This document is standalone, \
- so element "{0}" must not have ignorable whitespace
-V-012 = Element "{0}" was already declared
-V-013 = Parameter entities must not contain partial declarations
-V-014 = Parameter entity nesting error in content model for "{0}"
-V-015 = Mixed content model repeats element "{0}"
-V-016 = This element already has an ID attribute, "{0}"
-V-017 = ID attribute "{0}" must not be #FIXED
-V-018 = ID attribute "{0}" must not be defaulted
-V-019 = This document is standalone; this attribute needs to be pre-normalized
-
-V-020 = Parameter entities must not contain partial conditional DTD sections
-V-021 = Parameter entities must not contain partial comments
-V-022 = Reference to undefined parameter entity "%{0};"
-V-023 = This document is standalone; this ignorable CDATA whitespace is forbidden
-V-024 = No element has an ID attribute with value "{0}"
-V-025 = ID values must be XML names; "{0}" is not a name
-V-026 = Another element already has an ID attribute with value "{0}"
-V-027 = IDREF/IDREFS values must be XML names; "{0}" is not a name
-V-028 = NMTOKEN/NMTOKENS values must be XML name tokens; "{0}" is not one
-V-029 = Value "{0}" is not one of the enumerated values for this attribute
-
-V-030 = Attribute value "{0}" does not name a notation
-V-031 = Attribute value "{0}" does not name an unparsed entity
-V-032 = NMTOKENS attributes must have at least one value
-V-033 = EMPTY content models must have no content
-V-034 = Element "{0}" does not allow "{1}" -- {2}
-V-035 = Element "{0}" allows no further input; "{1}" is not allowed
-V-036 = Element "{0}" does not allow "{1}" here
-V-037 = Element "{0}" does not allow text
-V-038 = Element "{0}" requires additional elements
-V-039 = IDREFS attributes must have at least one value
-
-V-040 = ENTITIES attributes must have at least one value
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/AbstractResourceBundle.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/AbstractResourceBundle.java
deleted file mode 100644
index da19da66..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/AbstractResourceBundle.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-/*
- *
- * This code is subject to the freebxml License, Version 1.1
- *
- * Copyright (c) 2001 - 2005 freebxml.org. All rights reserved.
- *
- * $Header: /zpool01/javanet/scm/svn/tmp/cvs2svn/fi/FastInfoset/src/com/sun/xml/internal/fastinfoset/AbstractResourceBundle.java,v 1.3.2.4 2009-05-13 08:53:01 oleksiys Exp $
- */
-package com.sun.xml.internal.fastinfoset;
-
-import java.text.MessageFormat;
-import java.util.Enumeration;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-
-/**
- * This class contains methods common to all *ResourceBundle classes
- *
- * @author FastInfoset team
- */
-public abstract class AbstractResourceBundle extends ResourceBundle {
-
- public static final String LOCALE = "com.sun.xml.internal.fastinfoset.locale";
-
- /**
- * Gets 'key' from ResourceBundle and format mesage using 'args'.
- *
- * @param key String key for message.
- * @param args Array of arguments for message.
- * @return String formatted message.
- */
- public String getString(String key, Object args[]) {
- String pattern = getBundle().getString(key);
- return MessageFormat.format(pattern, args);
- }
-
- /**
- * Parse a locale string, return corresponding Locale instance.
- *
- * @param localeString
- * Name for the locale of interest. If null, use VM default locale.
- * @return New Locale instance.
- */
- public static Locale parseLocale(String localeString) {
- Locale locale = null;
- if (localeString == null) {
- locale = Locale.getDefault();
- } else {
- try {
- String[] args = localeString.split("_");
- if (args.length == 1) {
- locale = new Locale(args[0]);
- } else if (args.length == 2) {
- locale = new Locale(args[0], args[1]);
- } else if (args.length == 3) {
- locale = new Locale(args[0], args[1], args[2]);
- }
- } catch (Throwable t) {
- locale = Locale.getDefault();
- }
- }
- return locale;
- }
-
- /**
- * Subclasses of this class must implement this method so that the
- * correct resource bundle is passed to methods in this class
- *
- * @return
- * A java.util.ResourceBundle from the subsclass. Methods in this class
- * will use this reference.
- */
- public abstract ResourceBundle getBundle();
-
-
- /**
- * Since we are changing the ResourceBundle extension point, must
- * implement handleGetObject() using delegate getBundle(). Uses
- * getObject() call to work around protected access to
- * ResourceBundle.handleGetObject(). Happily, this means parent tree
- * of delegate bundle is searched for a match.
- *
- * Implements java.util.ResourceBundle.handleGetObject; inherits that
- * javadoc information.
- *
- * @see java.util.ResourceBundle#handleGetObject(String)
- */
- protected Object handleGetObject(String key) {
- return getBundle().getObject(key);
- }
-
- /**
- * Since we are changing the ResourceBundle extension point, must
- * implement getKeys() using delegate getBundle().
- *
- * Implements java.util.ResourceBundle.getKeys; inherits that javadoc
- * information.
- *
- * @see java.util.ResourceBundle#getKeys()
- */
- public final Enumeration getKeys() {
- return getBundle().getKeys();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/CommonResourceBundle.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/CommonResourceBundle.java
deleted file mode 100644
index ad226f47..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/CommonResourceBundle.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset;
-
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-/** Resource bundle implementation for localized messages.
- */
-public class CommonResourceBundle extends AbstractResourceBundle {
-
- public static final String BASE_NAME = "com.sun.xml.internal.fastinfoset.resources.ResourceBundle";
- private static volatile CommonResourceBundle instance = null;
- private static Locale locale = null;
- private ResourceBundle bundle = null;
-
- protected CommonResourceBundle() {
- // Load the resource bundle of default locale
- bundle = ResourceBundle.getBundle(BASE_NAME);
- }
-
- protected CommonResourceBundle(Locale locale) {
- // Load the resource bundle of specified locale
- bundle = ResourceBundle.getBundle(BASE_NAME, locale);
- }
-
- public static CommonResourceBundle getInstance() {
- if (instance == null) {
- synchronized (CommonResourceBundle.class) {
- instance = new CommonResourceBundle();
- //**need to know where to get the locale
- //String localeString = CommonProperties.getInstance()
- // .getProperty("omar.common.locale");
- locale = parseLocale(/*localeString*/null);
- }
- }
-
- return instance;
- }
-
- public static CommonResourceBundle getInstance(Locale locale) {
- if (instance == null) {
- synchronized (CommonResourceBundle.class) {
- instance = new CommonResourceBundle(locale);
- }
- } else {
- synchronized (CommonResourceBundle.class) {
- if (CommonResourceBundle.locale != locale) {
- instance = new CommonResourceBundle(locale);
- }
- }
- }
- return instance;
- }
-
-
- public ResourceBundle getBundle() {
- return bundle;
- }
- public ResourceBundle getBundle(Locale locale) {
- return ResourceBundle.getBundle(BASE_NAME, locale);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/Decoder.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/Decoder.java
deleted file mode 100644
index 23f4dd1c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/Decoder.java
+++ /dev/null
@@ -1,2010 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset;
-
-import com.sun.xml.internal.fastinfoset.alphabet.BuiltInRestrictedAlphabets;
-import com.sun.xml.internal.fastinfoset.org.apache.xerces.util.XMLChar;
-import com.sun.xml.internal.fastinfoset.util.CharArray;
-import com.sun.xml.internal.fastinfoset.util.CharArrayArray;
-import com.sun.xml.internal.fastinfoset.util.CharArrayString;
-import com.sun.xml.internal.fastinfoset.util.ContiguousCharArrayArray;
-import com.sun.xml.internal.fastinfoset.util.DuplicateAttributeVerifier;
-import com.sun.xml.internal.fastinfoset.util.PrefixArray;
-import com.sun.xml.internal.fastinfoset.util.QualifiedNameArray;
-import com.sun.xml.internal.fastinfoset.util.StringArray;
-import com.sun.xml.internal.fastinfoset.vocab.ParserVocabulary;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetParser;
-
-/**
- * Abstract decoder for developing concrete encoders.
- *
- * Concrete implementations extending Decoder will utilize methods on Decoder
- * to decode XML infoset according to the Fast Infoset standard. It is the
- * responsibility of the concrete implementation to ensure that methods are
- * invoked in the correct order to correctly decode a valid fast infoset
- * document.
- *
- * <p>
- * This class extends org.sax.xml.DefaultHandler so that concrete SAX
- * implementations can be used with javax.xml.parsers.SAXParser and the parse
- * methods that take org.sax.xml.DefaultHandler as a parameter.
- *
- * <p>
- * Buffering of octets that are read from an {@link java.io.InputStream} is
- * supported in a similar manner to a {@link java.io.BufferedInputStream}.
- * Combining buffering with decoding enables better performance.
- *
- * <p>
- * More than one fast infoset document may be decoded from the
- * {@link java.io.InputStream}.
- */
-public abstract class Decoder implements FastInfosetParser {
-
- private static final char[] XML_NAMESPACE_NAME_CHARS =
- EncodingConstants.XML_NAMESPACE_NAME.toCharArray();
-
- private static final char[] XMLNS_NAMESPACE_PREFIX_CHARS =
- EncodingConstants.XMLNS_NAMESPACE_PREFIX.toCharArray();
-
- private static final char[] XMLNS_NAMESPACE_NAME_CHARS =
- EncodingConstants.XMLNS_NAMESPACE_NAME.toCharArray();
-
- /**
- * String interning system property.
- */
- public static final String STRING_INTERNING_SYSTEM_PROPERTY =
- "com.sun.xml.internal.fastinfoset.parser.string-interning";
-
- /**
- * Internal buffer size interning system property.
- */
- public static final String BUFFER_SIZE_SYSTEM_PROPERTY =
- "com.sun.xml.internal.fastinfoset.parser.buffer-size";
-
- private static boolean _stringInterningSystemDefault = false;
-
- private static int _bufferSizeSystemDefault = 1024;
-
- static {
- String p = System.getProperty(STRING_INTERNING_SYSTEM_PROPERTY,
- Boolean.toString(_stringInterningSystemDefault));
- _stringInterningSystemDefault = Boolean.valueOf(p).booleanValue();
-
- p = System.getProperty(BUFFER_SIZE_SYSTEM_PROPERTY,
- Integer.toString(_bufferSizeSystemDefault));
- try {
- int i = Integer.valueOf(p).intValue();
- if (i > 0) {
- _bufferSizeSystemDefault = i;
- }
- } catch (NumberFormatException e) {
- }
- }
-
- /**
- * True if string interning is performed by the decoder.
- */
- private boolean _stringInterning = _stringInterningSystemDefault;
-
- /**
- * The input stream from which the fast infoset document is being read.
- */
- private InputStream _s;
-
- /**
- * The map of URIs to referenced vocabularies.
- */
- private Map _externalVocabularies;
-
- /**
- * True if can parse fragments.
- */
- protected boolean _parseFragments;
-
- /**
- * True if needs to close underlying input stream.
- */
- protected boolean _needForceStreamClose;
-
- /**
- * True if the vocabulary is internally created by decoder.
- */
- private boolean _vIsInternal;
-
- /**
- * The list of Notation Information Items that are part of the
- * Document Information Item.
- */
- protected List _notations;
-
- /**
- * The list of Unparsed Entity Information Items that are part of the
- * Document Information Item.
- */
- protected List _unparsedEntities;
-
- /**
- * The map of URIs to registered encoding algorithms.
- */
- protected Map _registeredEncodingAlgorithms = new HashMap();
-
- /**
- * The vocabulary used for decoding.
- */
- protected ParserVocabulary _v;
-
- /**
- * The prefix table of the vocabulary.
- */
- protected PrefixArray _prefixTable;
-
- /**
- * The element name table of the vocabulary.
- */
- protected QualifiedNameArray _elementNameTable;
-
- /**
- * The attribute name table of the vocabulary.
- */
- protected QualifiedNameArray _attributeNameTable;
-
- /**
- * The character content chunk table of the vocabulary.
- */
- protected ContiguousCharArrayArray _characterContentChunkTable;
-
- /**
- * The attribute value table of the vocabulary.
- */
- protected StringArray _attributeValueTable;
-
- /**
- * The current octet that is being read
- */
- protected int _b;
-
- /**
- * True if an information item is terminated.
- */
- protected boolean _terminate;
-
- /**
- * True if two information item are terminated in direct sequence.
- */
- protected boolean _doubleTerminate;
-
- /**
- * True if an entry is required to be added to a table
- */
- protected boolean _addToTable;
-
- /**
- * The vocabulary table index to an indexed non identifying string.
- */
- protected int _integer;
-
- /**
- * The vocabulary table index of identifying string or the identifier of
- * an encoding algorithm or restricted alphabet.
- */
- protected int _identifier;
-
- /**
- * The size of the internal buffer.
- */
- protected int _bufferSize = _bufferSizeSystemDefault;
-
- /**
- * The internal buffer used for decoding.
- */
- protected byte[] _octetBuffer = new byte[_bufferSizeSystemDefault];
-
- /**
- * A mark into the internal buffer used for decoding encoded algorithm
- * or restricted alphabet data.
- */
- protected int _octetBufferStart;
-
- /**
- * The offset into the buffer to read the next byte.
- */
- protected int _octetBufferOffset;
-
- /**
- * The end of the buffer.
- */
- protected int _octetBufferEnd;
-
- /**
- * The length of some octets in the buffer that are to be read.
- */
- protected int _octetBufferLength;
-
- /**
- * The internal buffer of characters.
- */
- protected char[] _charBuffer = new char[512];
-
- /**
- * The length of characters in the buffer of characters.
- */
- protected int _charBufferLength;
-
- /**
- * Helper class that checks for duplicate attribute information items.
- */
- protected DuplicateAttributeVerifier _duplicateAttributeVerifier = new DuplicateAttributeVerifier();
-
- /**
- * Default constructor for the Decoder.
- */
- protected Decoder() {
- _v = new ParserVocabulary();
- _prefixTable = _v.prefix;
- _elementNameTable = _v.elementName;
- _attributeNameTable = _v.attributeName;
- _characterContentChunkTable = _v.characterContentChunk;
- _attributeValueTable = _v.attributeValue;
- _vIsInternal = true;
- }
-
-
- // FastInfosetParser interface
-
- /**
- * {@inheritDoc}
- */
- public void setStringInterning(boolean stringInterning) {
- _stringInterning = stringInterning;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean getStringInterning() {
- return _stringInterning;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setBufferSize(int bufferSize) {
- if (_bufferSize > _octetBuffer.length) {
- _bufferSize = bufferSize;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public int getBufferSize() {
- return _bufferSize;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setRegisteredEncodingAlgorithms(Map algorithms) {
- _registeredEncodingAlgorithms = algorithms;
- if (_registeredEncodingAlgorithms == null) {
- _registeredEncodingAlgorithms = new HashMap();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public Map getRegisteredEncodingAlgorithms() {
- return _registeredEncodingAlgorithms;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setExternalVocabularies(Map referencedVocabualries) {
- if (referencedVocabualries != null) {
- // Clone the input map
- _externalVocabularies = new HashMap();
- _externalVocabularies.putAll(referencedVocabualries);
- } else {
- _externalVocabularies = null;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public Map getExternalVocabularies() {
- return _externalVocabularies;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setParseFragments(boolean parseFragments) {
- _parseFragments = parseFragments;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean getParseFragments() {
- return _parseFragments;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setForceStreamClose(boolean needForceStreamClose) {
- _needForceStreamClose = needForceStreamClose;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean getForceStreamClose() {
- return _needForceStreamClose;
- }
-
-// End FastInfosetParser interface
-
- /**
- * Reset the decoder for reuse decoding another XML infoset.
- */
- public void reset() {
- _terminate = _doubleTerminate = false;
- }
-
- /**
- * Set the ParserVocabulary to be used for decoding.
- *
- * @param v the vocabulary to be used for decoding.
- */
- public void setVocabulary(ParserVocabulary v) {
- _v = v;
- _prefixTable = _v.prefix;
- _elementNameTable = _v.elementName;
- _attributeNameTable = _v.attributeName;
- _characterContentChunkTable = _v.characterContentChunk;
- _attributeValueTable = _v.attributeValue;
- _vIsInternal = false;
- }
-
- /**
- * Set the InputStream to decode the fast infoset document.
- *
- * @param s the InputStream where the fast infoset document is decoded from.
- */
- public void setInputStream(InputStream s) {
- _s = s;
- _octetBufferOffset = 0;
- _octetBufferEnd = 0;
- if (_vIsInternal == true) {
- _v.clear();
- }
- }
-
- protected final void decodeDII() throws FastInfosetException, IOException {
- final int b = read();
- if (b == EncodingConstants.DOCUMENT_INITIAL_VOCABULARY_FLAG) {
- decodeInitialVocabulary();
- } else if (b != 0) {
- throw new IOException(CommonResourceBundle.getInstance().
- getString("message.optinalValues"));
- }
- }
-
- protected final void decodeAdditionalData() throws FastInfosetException, IOException {
- final int noOfItems = decodeNumberOfItemsOfSequence();
-
- for (int i = 0; i < noOfItems; i++) {
- /*String URI = */decodeNonEmptyOctetStringOnSecondBitAsUtf8String();
-
- decodeNonEmptyOctetStringLengthOnSecondBit();
- ensureOctetBufferSize();
- _octetBufferStart = _octetBufferOffset;
- _octetBufferOffset += _octetBufferLength;
- }
- }
-
- protected final void decodeInitialVocabulary() throws FastInfosetException, IOException {
- // First 5 optionals of 13 bit optional field
- int b = read();
- // Next 8 optionals of 13 bit optional field
- int b2 = read();
-
- // Optimize for the most common case
- if (b == EncodingConstants.INITIAL_VOCABULARY_EXTERNAL_VOCABULARY_FLAG && b2 == 0) {
- decodeExternalVocabularyURI();
- return;
- }
-
- if ((b & EncodingConstants.INITIAL_VOCABULARY_EXTERNAL_VOCABULARY_FLAG) > 0) {
- decodeExternalVocabularyURI();
- }
-
- if ((b & EncodingConstants.INITIAL_VOCABULARY_RESTRICTED_ALPHABETS_FLAG) > 0) {
- decodeTableItems(_v.restrictedAlphabet);
- }
-
- if ((b & EncodingConstants.INITIAL_VOCABULARY_ENCODING_ALGORITHMS_FLAG) > 0) {
- decodeTableItems(_v.encodingAlgorithm);
- }
-
- if ((b & EncodingConstants.INITIAL_VOCABULARY_PREFIXES_FLAG) > 0) {
- decodeTableItems(_v.prefix);
- }
-
- if ((b & EncodingConstants.INITIAL_VOCABULARY_NAMESPACE_NAMES_FLAG) > 0) {
- decodeTableItems(_v.namespaceName);
- }
-
- if ((b2 & EncodingConstants.INITIAL_VOCABULARY_LOCAL_NAMES_FLAG) > 0) {
- decodeTableItems(_v.localName);
- }
-
- if ((b2 & EncodingConstants.INITIAL_VOCABULARY_OTHER_NCNAMES_FLAG) > 0) {
- decodeTableItems(_v.otherNCName);
- }
-
- if ((b2 & EncodingConstants.INITIAL_VOCABULARY_OTHER_URIS_FLAG) > 0) {
- decodeTableItems(_v.otherURI);
- }
-
- if ((b2 & EncodingConstants.INITIAL_VOCABULARY_ATTRIBUTE_VALUES_FLAG) > 0) {
- decodeTableItems(_v.attributeValue);
- }
-
- if ((b2 & EncodingConstants.INITIAL_VOCABULARY_CONTENT_CHARACTER_CHUNKS_FLAG) > 0) {
- decodeTableItems(_v.characterContentChunk);
- }
-
- if ((b2 & EncodingConstants.INITIAL_VOCABULARY_OTHER_STRINGS_FLAG) > 0) {
- decodeTableItems(_v.otherString);
- }
-
- if ((b2 & EncodingConstants.INITIAL_VOCABULARY_ELEMENT_NAME_SURROGATES_FLAG) > 0) {
- decodeTableItems(_v.elementName, false);
- }
-
- if ((b2 & EncodingConstants.INITIAL_VOCABULARY_ATTRIBUTE_NAME_SURROGATES_FLAG) > 0) {
- decodeTableItems(_v.attributeName, true);
- }
- }
-
- private void decodeExternalVocabularyURI() throws FastInfosetException, IOException {
- if (_externalVocabularies == null) {
- throw new IOException(CommonResourceBundle.
- getInstance().getString("message.noExternalVocabularies"));
- }
-
- String externalVocabularyURI =
- decodeNonEmptyOctetStringOnSecondBitAsUtf8String();
-
- Object o = _externalVocabularies.get(externalVocabularyURI);
- if (o instanceof ParserVocabulary) {
- _v.setReferencedVocabulary(externalVocabularyURI,
- (ParserVocabulary)o, false);
- } else if (o instanceof com.sun.xml.internal.org.jvnet.fastinfoset.ExternalVocabulary) {
- com.sun.xml.internal.org.jvnet.fastinfoset.ExternalVocabulary v =
- (com.sun.xml.internal.org.jvnet.fastinfoset.ExternalVocabulary)o;
- ParserVocabulary pv = new ParserVocabulary(v.vocabulary);
-
- _externalVocabularies.put(externalVocabularyURI, pv);
- _v.setReferencedVocabulary(externalVocabularyURI,
- pv, false);
- } else {
- throw new FastInfosetException(CommonResourceBundle.getInstance().
- getString("message.externalVocabularyNotRegistered",
- new Object[]{externalVocabularyURI}));
- }
- }
-
- private void decodeTableItems(StringArray array) throws FastInfosetException, IOException {
- final int noOfItems = decodeNumberOfItemsOfSequence();
-
- for (int i = 0; i < noOfItems; i++) {
- array.add(decodeNonEmptyOctetStringOnSecondBitAsUtf8String());
- }
- }
-
- private void decodeTableItems(PrefixArray array) throws FastInfosetException, IOException {
- final int noOfItems = decodeNumberOfItemsOfSequence();
-
- for (int i = 0; i < noOfItems; i++) {
- array.add(decodeNonEmptyOctetStringOnSecondBitAsUtf8String());
- }
- }
-
- private void decodeTableItems(ContiguousCharArrayArray array) throws FastInfosetException, IOException {
- final int noOfItems = decodeNumberOfItemsOfSequence();
-
- for (int i = 0; i < noOfItems; i++) {
- switch(decodeNonIdentifyingStringOnFirstBit()) {
- case NISTRING_STRING:
- array.add(_charBuffer, _charBufferLength);
- break;
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.illegalState"));
- }
- }
- }
-
- private void decodeTableItems(CharArrayArray array) throws FastInfosetException, IOException {
- final int noOfItems = decodeNumberOfItemsOfSequence();
-
- for (int i = 0; i < noOfItems; i++) {
- switch(decodeNonIdentifyingStringOnFirstBit()) {
- case NISTRING_STRING:
- array.add(new CharArray(_charBuffer, 0, _charBufferLength, true));
- break;
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.illegalState"));
- }
- }
- }
-
- private void decodeTableItems(QualifiedNameArray array, boolean isAttribute) throws FastInfosetException, IOException {
- final int noOfItems = decodeNumberOfItemsOfSequence();
-
- for (int i = 0; i < noOfItems; i++) {
- final int b = read();
-
- String prefix = "";
- int prefixIndex = -1;
- if ((b & EncodingConstants.NAME_SURROGATE_PREFIX_FLAG) > 0) {
- prefixIndex = decodeIntegerIndexOnSecondBit();
- prefix = _v.prefix.get(prefixIndex);
- }
-
- String namespaceName = "";
- int namespaceNameIndex = -1;
- if ((b & EncodingConstants.NAME_SURROGATE_NAME_FLAG) > 0) {
- namespaceNameIndex = decodeIntegerIndexOnSecondBit();
- namespaceName = _v.namespaceName.get(namespaceNameIndex);
- }
-
- if (namespaceName == "" && prefix != "") {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.missingNamespace"));
- }
-
- final int localNameIndex = decodeIntegerIndexOnSecondBit();
- final String localName = _v.localName.get(localNameIndex);
-
- QualifiedName qualifiedName = new QualifiedName(prefix, namespaceName, localName,
- prefixIndex, namespaceNameIndex, localNameIndex,
- _charBuffer);
- if (isAttribute) {
- qualifiedName.createAttributeValues(DuplicateAttributeVerifier.MAP_SIZE);
- }
- array.add(qualifiedName);
- }
- }
-
- private int decodeNumberOfItemsOfSequence() throws IOException {
- final int b = read();
- if (b < 128) {
- return b + 1;
- } else {
- return (((b & 0x0F) << 16) | (read() << 8) | read()) + 129;
- }
- }
-
- protected final void decodeNotations() throws FastInfosetException, IOException {
- if (_notations == null) {
- _notations = new ArrayList();
- } else {
- _notations.clear();
- }
-
- int b = read();
- while ((b & EncodingConstants.NOTATIONS_MASK) == EncodingConstants.NOTATIONS) {
- String name = decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherNCName);
-
- String system_identifier = ((_b & EncodingConstants.NOTATIONS_SYSTEM_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : "";
- String public_identifier = ((_b & EncodingConstants.NOTATIONS_PUBLIC_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : "";
-
- Notation notation = new Notation(name, system_identifier, public_identifier);
- _notations.add(notation);
-
- b = read();
- }
- if (b != EncodingConstants.TERMINATOR) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.IIsNotTerminatedCorrectly"));
- }
- }
-
- protected final void decodeUnparsedEntities() throws FastInfosetException, IOException {
- if (_unparsedEntities == null) {
- _unparsedEntities = new ArrayList();
- } else {
- _unparsedEntities.clear();
- }
-
- int b = read();
- while ((b & EncodingConstants.UNPARSED_ENTITIES_MASK) == EncodingConstants.UNPARSED_ENTITIES) {
- String name = decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherNCName);
- String system_identifier = decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI);
-
- String public_identifier = ((_b & EncodingConstants.UNPARSED_ENTITIES_PUBLIC_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : "";
-
- String notation_name = decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherNCName);
-
- UnparsedEntity unparsedEntity = new UnparsedEntity(name, system_identifier, public_identifier, notation_name);
- _unparsedEntities.add(unparsedEntity);
-
- b = read();
- }
- if (b != EncodingConstants.TERMINATOR) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.unparsedEntities"));
- }
- }
-
- protected final String decodeCharacterEncodingScheme() throws FastInfosetException, IOException {
- return decodeNonEmptyOctetStringOnSecondBitAsUtf8String();
- }
-
- protected final String decodeVersion() throws FastInfosetException, IOException {
- switch(decodeNonIdentifyingStringOnFirstBit()) {
- case NISTRING_STRING:
- final String data = new String(_charBuffer, 0, _charBufferLength);
- if (_addToTable) {
- _v.otherString.add(new CharArrayString(data));
- }
- return data;
- case NISTRING_ENCODING_ALGORITHM:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingNotSupported"));
- case NISTRING_INDEX:
- return _v.otherString.get(_integer).toString();
- case NISTRING_EMPTY_STRING:
- default:
- return "";
- }
- }
-
- protected final QualifiedName decodeEIIIndexMedium() throws FastInfosetException, IOException {
- final int i = (((_b & EncodingConstants.INTEGER_3RD_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_3RD_BIT_SMALL_LIMIT;
- return _v.elementName._array[i];
- }
-
- protected final QualifiedName decodeEIIIndexLarge() throws FastInfosetException, IOException {
- int i;
- if ((_b & EncodingConstants.INTEGER_3RD_BIT_LARGE_LARGE_FLAG) == 0x20) {
- // EII large index
- i = (((_b & EncodingConstants.INTEGER_3RD_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_3RD_BIT_MEDIUM_LIMIT;
- } else {
- // EII large large index
- i = (((read() & EncodingConstants.INTEGER_3RD_BIT_LARGE_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_3RD_BIT_LARGE_LIMIT;
- }
- return _v.elementName._array[i];
- }
-
- protected final QualifiedName decodeLiteralQualifiedName(int state, QualifiedName q)
- throws FastInfosetException, IOException {
- if (q == null) q = new QualifiedName();
- switch (state) {
- // no prefix, no namespace
- case 0:
- return q.set(
- "",
- "",
- decodeIdentifyingNonEmptyStringOnFirstBit(_v.localName),
- -1,
- -1,
- _identifier,
- null);
- // no prefix, namespace
- case 1:
- return q.set(
- "",
- decodeIdentifyingNonEmptyStringIndexOnFirstBitAsNamespaceName(false),
- decodeIdentifyingNonEmptyStringOnFirstBit(_v.localName),
- -1,
- _namespaceNameIndex,
- _identifier,
- null);
- // prefix, no namespace
- case 2:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.qNameMissingNamespaceName"));
- // prefix, namespace
- case 3:
- return q.set(
- decodeIdentifyingNonEmptyStringIndexOnFirstBitAsPrefix(true),
- decodeIdentifyingNonEmptyStringIndexOnFirstBitAsNamespaceName(true),
- decodeIdentifyingNonEmptyStringOnFirstBit(_v.localName),
- _prefixIndex,
- _namespaceNameIndex,
- _identifier,
- _charBuffer);
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingEII"));
- }
- }
-
- protected static final int NISTRING_STRING = 0;
- protected static final int NISTRING_INDEX = 1;
- protected static final int NISTRING_ENCODING_ALGORITHM = 2;
- protected static final int NISTRING_EMPTY_STRING = 3;
-
- /*
- * C.14
- * decodeNonIdentifyingStringOnFirstBit
- */
- protected final int decodeNonIdentifyingStringOnFirstBit() throws FastInfosetException, IOException {
- final int b = read();
- switch(DecoderStateTables.NISTRING(b)) {
- case DecoderStateTables.NISTRING_UTF8_SMALL_LENGTH:
- _addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- _octetBufferLength = (b & EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_MASK) + 1;
- decodeUtf8StringAsCharBuffer();
- return NISTRING_STRING;
- case DecoderStateTables.NISTRING_UTF8_MEDIUM_LENGTH:
- _addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_LIMIT;
- decodeUtf8StringAsCharBuffer();
- return NISTRING_STRING;
- case DecoderStateTables.NISTRING_UTF8_LARGE_LENGTH:
- {
- _addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- final int length = (read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read();
- _octetBufferLength = length + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_LIMIT;
- decodeUtf8StringAsCharBuffer();
- return NISTRING_STRING;
- }
- case DecoderStateTables.NISTRING_UTF16_SMALL_LENGTH:
- _addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- _octetBufferLength = (b & EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_MASK) + 1;
- decodeUtf16StringAsCharBuffer();
- return NISTRING_STRING;
- case DecoderStateTables.NISTRING_UTF16_MEDIUM_LENGTH:
- _addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_LIMIT;
- decodeUtf16StringAsCharBuffer();
- return NISTRING_STRING;
- case DecoderStateTables.NISTRING_UTF16_LARGE_LENGTH:
- {
- _addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- final int length = (read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read();
- _octetBufferLength = length + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_LIMIT;
- decodeUtf16StringAsCharBuffer();
- return NISTRING_STRING;
- }
- case DecoderStateTables.NISTRING_RA:
- {
- _addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- // Decode resitricted alphabet integer
- _identifier = (b & 0x0F) << 4;
- final int b2 = read();
- _identifier |= (b2 & 0xF0) >> 4;
-
- decodeOctetsOnFifthBitOfNonIdentifyingStringOnFirstBit(b2);
-
- decodeRestrictedAlphabetAsCharBuffer();
- return NISTRING_STRING;
- }
- case DecoderStateTables.NISTRING_EA:
- {
- _addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- // Decode encoding algorithm integer
- _identifier = (b & 0x0F) << 4;
- final int b2 = read();
- _identifier |= (b2 & 0xF0) >> 4;
-
- decodeOctetsOnFifthBitOfNonIdentifyingStringOnFirstBit(b2);
- return NISTRING_ENCODING_ALGORITHM;
- }
- case DecoderStateTables.NISTRING_INDEX_SMALL:
- _integer = b & EncodingConstants.INTEGER_2ND_BIT_SMALL_MASK;
- return NISTRING_INDEX;
- case DecoderStateTables.NISTRING_INDEX_MEDIUM:
- _integer = (((b & EncodingConstants.INTEGER_2ND_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
- return NISTRING_INDEX;
- case DecoderStateTables.NISTRING_INDEX_LARGE:
- _integer = (((b & EncodingConstants.INTEGER_2ND_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
- return NISTRING_INDEX;
- case DecoderStateTables.NISTRING_EMPTY:
- return NISTRING_EMPTY_STRING;
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingNonIdentifyingString"));
- }
- }
-
- protected final void decodeOctetsOnFifthBitOfNonIdentifyingStringOnFirstBit(int b) throws FastInfosetException, IOException {
- // Remove top 4 bits of restricted alphabet or encoding algorithm integer
- b &= 0x0F;
- // Reuse UTF8 length states
- switch(DecoderStateTables.NISTRING(b)) {
- case DecoderStateTables.NISTRING_UTF8_SMALL_LENGTH:
- _octetBufferLength = b + 1;
- break;
- case DecoderStateTables.NISTRING_UTF8_MEDIUM_LENGTH:
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_LIMIT;
- break;
- case DecoderStateTables.NISTRING_UTF8_LARGE_LENGTH:
- final int length = (read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read();
- _octetBufferLength = length + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_LIMIT;
- break;
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingOctets"));
- }
- ensureOctetBufferSize();
- _octetBufferStart = _octetBufferOffset;
- _octetBufferOffset += _octetBufferLength;
- }
-
- protected final void decodeOctetsOnSeventhBitOfNonIdentifyingStringOnThirdBit(int b) throws FastInfosetException, IOException {
- // Remove top 6 bits of restricted alphabet or encoding algorithm integer
- switch (b & 0x03) {
- // Small length
- case 0:
- _octetBufferLength = 1;
- break;
- // Small length
- case 1:
- _octetBufferLength = 2;
- break;
- // Medium length
- case 2:
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_LIMIT;
- break;
- // Large length
- case 3:
- _octetBufferLength = (read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read();
- _octetBufferLength += EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_LIMIT;
- break;
- }
-
- ensureOctetBufferSize();
- _octetBufferStart = _octetBufferOffset;
- _octetBufferOffset += _octetBufferLength;
- }
-
- /*
- * C.13
- */
- protected final String decodeIdentifyingNonEmptyStringOnFirstBit(StringArray table) throws FastInfosetException, IOException {
- final int b = read();
- switch(DecoderStateTables.ISTRING(b)) {
- case DecoderStateTables.ISTRING_SMALL_LENGTH:
- {
- _octetBufferLength = b + 1;
- final String s = (_stringInterning) ? decodeUtf8StringAsString().intern() : decodeUtf8StringAsString();
- _identifier = table.add(s) - 1;
- return s;
- }
- case DecoderStateTables.ISTRING_MEDIUM_LENGTH:
- {
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_SMALL_LIMIT;
- final String s = (_stringInterning) ? decodeUtf8StringAsString().intern() : decodeUtf8StringAsString();
- _identifier = table.add(s) - 1;
- return s;
- }
- case DecoderStateTables.ISTRING_LARGE_LENGTH:
- {
- final int length = (read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read();
- _octetBufferLength = length + EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_MEDIUM_LIMIT;
- final String s = (_stringInterning) ? decodeUtf8StringAsString().intern() : decodeUtf8StringAsString();
- _identifier = table.add(s) - 1;
- return s;
- }
- case DecoderStateTables.ISTRING_INDEX_SMALL:
- _identifier = b & EncodingConstants.INTEGER_2ND_BIT_SMALL_MASK;
- return table._array[_identifier];
- case DecoderStateTables.ISTRING_INDEX_MEDIUM:
- _identifier = (((b & EncodingConstants.INTEGER_2ND_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
- return table._array[_identifier];
- case DecoderStateTables.ISTRING_INDEX_LARGE:
- _identifier = (((b & EncodingConstants.INTEGER_2ND_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
- return table._array[_identifier];
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingIdentifyingString"));
- }
- }
-
- protected int _prefixIndex;
-
- /*
- * C.13
- */
- protected final String decodeIdentifyingNonEmptyStringOnFirstBitAsPrefix(boolean namespaceNamePresent) throws FastInfosetException, IOException {
- final int b = read();
- switch(DecoderStateTables.ISTRING_PREFIX_NAMESPACE(b)) {
- case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_LENGTH_3:
- {
- _octetBufferLength = EncodingConstants.XML_NAMESPACE_PREFIX_LENGTH;
- decodeUtf8StringAsCharBuffer();
-
- if (_charBuffer[0] == 'x' &&
- _charBuffer[1] == 'm' &&
- _charBuffer[2] == 'l') {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.prefixIllegal"));
- }
-
- final String s = (_stringInterning) ? new String(_charBuffer, 0, _charBufferLength).intern() :
- new String(_charBuffer, 0, _charBufferLength);
- _prefixIndex = _v.prefix.add(s);
- return s;
- }
- case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_LENGTH_5:
- {
- _octetBufferLength = EncodingConstants.XMLNS_NAMESPACE_PREFIX_LENGTH;
- decodeUtf8StringAsCharBuffer();
-
- if (_charBuffer[0] == 'x' &&
- _charBuffer[1] == 'm' &&
- _charBuffer[2] == 'l' &&
- _charBuffer[3] == 'n' &&
- _charBuffer[4] == 's') {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.xmlns"));
- }
-
- final String s = (_stringInterning) ? new String(_charBuffer, 0, _charBufferLength).intern() :
- new String(_charBuffer, 0, _charBufferLength);
- _prefixIndex = _v.prefix.add(s);
- return s;
- }
- case DecoderStateTables.ISTRING_SMALL_LENGTH:
- case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_LENGTH_29:
- case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_LENGTH_36:
- {
- _octetBufferLength = b + 1;
- final String s = (_stringInterning) ? decodeUtf8StringAsString().intern() : decodeUtf8StringAsString();
- _prefixIndex = _v.prefix.add(s);
- return s;
- }
- case DecoderStateTables.ISTRING_MEDIUM_LENGTH:
- {
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_SMALL_LIMIT;
- final String s = (_stringInterning) ? decodeUtf8StringAsString().intern() : decodeUtf8StringAsString();
- _prefixIndex = _v.prefix.add(s);
- return s;
- }
- case DecoderStateTables.ISTRING_LARGE_LENGTH:
- {
- final int length = (read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read();
- _octetBufferLength = length + EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_MEDIUM_LIMIT;
- final String s = (_stringInterning) ? decodeUtf8StringAsString().intern() : decodeUtf8StringAsString();
- _prefixIndex = _v.prefix.add(s);
- return s;
- }
- case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_INDEX_ZERO:
- if (namespaceNamePresent) {
- _prefixIndex = 0;
- // Peak at next byte and check the index of the XML namespace name
- if (DecoderStateTables.ISTRING_PREFIX_NAMESPACE(peek())
- != DecoderStateTables.ISTRING_PREFIX_NAMESPACE_INDEX_ZERO) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.wrongNamespaceName"));
- }
- return EncodingConstants.XML_NAMESPACE_PREFIX;
- } else {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.missingNamespaceName"));
- }
- case DecoderStateTables.ISTRING_INDEX_SMALL:
- _prefixIndex = b & EncodingConstants.INTEGER_2ND_BIT_SMALL_MASK;
- return _v.prefix._array[_prefixIndex - 1];
- case DecoderStateTables.ISTRING_INDEX_MEDIUM:
- _prefixIndex = (((b & EncodingConstants.INTEGER_2ND_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
- return _v.prefix._array[_prefixIndex - 1];
- case DecoderStateTables.ISTRING_INDEX_LARGE:
- _prefixIndex = (((b & EncodingConstants.INTEGER_2ND_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
- return _v.prefix._array[_prefixIndex - 1];
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingIdentifyingStringForPrefix"));
- }
- }
-
- /*
- * C.13
- */
- protected final String decodeIdentifyingNonEmptyStringIndexOnFirstBitAsPrefix(boolean namespaceNamePresent) throws FastInfosetException, IOException {
- final int b = read();
- switch(DecoderStateTables.ISTRING_PREFIX_NAMESPACE(b)) {
- case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_INDEX_ZERO:
- if (namespaceNamePresent) {
- _prefixIndex = 0;
- // Peak at next byte and check the index of the XML namespace name
- if (DecoderStateTables.ISTRING_PREFIX_NAMESPACE(peek())
- != DecoderStateTables.ISTRING_PREFIX_NAMESPACE_INDEX_ZERO) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.wrongNamespaceName"));
- }
- return EncodingConstants.XML_NAMESPACE_PREFIX;
- } else {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.missingNamespaceName"));
- }
- case DecoderStateTables.ISTRING_INDEX_SMALL:
- _prefixIndex = b & EncodingConstants.INTEGER_2ND_BIT_SMALL_MASK;
- return _v.prefix._array[_prefixIndex - 1];
- case DecoderStateTables.ISTRING_INDEX_MEDIUM:
- _prefixIndex = (((b & EncodingConstants.INTEGER_2ND_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
- return _v.prefix._array[_prefixIndex - 1];
- case DecoderStateTables.ISTRING_INDEX_LARGE:
- _prefixIndex = (((b & EncodingConstants.INTEGER_2ND_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
- return _v.prefix._array[_prefixIndex - 1];
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingIdentifyingStringForPrefix"));
- }
- }
-
- protected int _namespaceNameIndex;
-
- /*
- * C.13
- */
- protected final String decodeIdentifyingNonEmptyStringOnFirstBitAsNamespaceName(boolean prefixPresent) throws FastInfosetException, IOException {
- final int b = read();
- switch(DecoderStateTables.ISTRING_PREFIX_NAMESPACE(b)) {
- case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_LENGTH_3:
- case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_LENGTH_5:
- case DecoderStateTables.ISTRING_SMALL_LENGTH:
- {
- _octetBufferLength = b + 1;
- final String s = (_stringInterning) ? decodeUtf8StringAsString().intern() : decodeUtf8StringAsString();
- _namespaceNameIndex = _v.namespaceName.add(s);
- return s;
- }
- case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_LENGTH_29:
- {
- _octetBufferLength = EncodingConstants.XMLNS_NAMESPACE_NAME_LENGTH;
- decodeUtf8StringAsCharBuffer();
-
- if (compareCharsWithCharBufferFromEndToStart(XMLNS_NAMESPACE_NAME_CHARS)) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.xmlnsConnotBeBoundToPrefix"));
- }
-
- final String s = (_stringInterning) ? new String(_charBuffer, 0, _charBufferLength).intern() :
- new String(_charBuffer, 0, _charBufferLength);
- _namespaceNameIndex = _v.namespaceName.add(s);
- return s;
- }
- case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_LENGTH_36:
- {
- _octetBufferLength = EncodingConstants.XML_NAMESPACE_NAME_LENGTH;
- decodeUtf8StringAsCharBuffer();
-
- if (compareCharsWithCharBufferFromEndToStart(XML_NAMESPACE_NAME_CHARS)) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.illegalNamespaceName"));
- }
-
- final String s = (_stringInterning) ? new String(_charBuffer, 0, _charBufferLength).intern() :
- new String(_charBuffer, 0, _charBufferLength);
- _namespaceNameIndex = _v.namespaceName.add(s);
- return s;
- }
- case DecoderStateTables.ISTRING_MEDIUM_LENGTH:
- {
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_SMALL_LIMIT;
- final String s = (_stringInterning) ? decodeUtf8StringAsString().intern() : decodeUtf8StringAsString();
- _namespaceNameIndex = _v.namespaceName.add(s);
- return s;
- }
- case DecoderStateTables.ISTRING_LARGE_LENGTH:
- {
- final int length = (read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read();
- _octetBufferLength = length + EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_MEDIUM_LIMIT;
- final String s = (_stringInterning) ? decodeUtf8StringAsString().intern() : decodeUtf8StringAsString();
- _namespaceNameIndex = _v.namespaceName.add(s);
- return s;
- }
- case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_INDEX_ZERO:
- if (prefixPresent) {
- _namespaceNameIndex = 0;
- return EncodingConstants.XML_NAMESPACE_NAME;
- } else {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.namespaceWithoutPrefix"));
- }
- case DecoderStateTables.ISTRING_INDEX_SMALL:
- _namespaceNameIndex = b & EncodingConstants.INTEGER_2ND_BIT_SMALL_MASK;
- return _v.namespaceName._array[_namespaceNameIndex - 1];
- case DecoderStateTables.ISTRING_INDEX_MEDIUM:
- _namespaceNameIndex = (((b & EncodingConstants.INTEGER_2ND_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
- return _v.namespaceName._array[_namespaceNameIndex - 1];
- case DecoderStateTables.ISTRING_INDEX_LARGE:
- _namespaceNameIndex = (((b & EncodingConstants.INTEGER_2ND_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
- return _v.namespaceName._array[_namespaceNameIndex - 1];
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingForNamespaceName"));
- }
- }
-
- /*
- * C.13
- */
- protected final String decodeIdentifyingNonEmptyStringIndexOnFirstBitAsNamespaceName(boolean prefixPresent) throws FastInfosetException, IOException {
- final int b = read();
- switch(DecoderStateTables.ISTRING_PREFIX_NAMESPACE(b)) {
- case DecoderStateTables.ISTRING_PREFIX_NAMESPACE_INDEX_ZERO:
- if (prefixPresent) {
- _namespaceNameIndex = 0;
- return EncodingConstants.XML_NAMESPACE_NAME;
- } else {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.namespaceWithoutPrefix"));
- }
- case DecoderStateTables.ISTRING_INDEX_SMALL:
- _namespaceNameIndex = b & EncodingConstants.INTEGER_2ND_BIT_SMALL_MASK;
- return _v.namespaceName._array[_namespaceNameIndex - 1];
- case DecoderStateTables.ISTRING_INDEX_MEDIUM:
- _namespaceNameIndex = (((b & EncodingConstants.INTEGER_2ND_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
- return _v.namespaceName._array[_namespaceNameIndex - 1];
- case DecoderStateTables.ISTRING_INDEX_LARGE:
- _namespaceNameIndex = (((b & EncodingConstants.INTEGER_2ND_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
- return _v.namespaceName._array[_namespaceNameIndex - 1];
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingForNamespaceName"));
- }
- }
-
- private boolean compareCharsWithCharBufferFromEndToStart(char[] c) {
- int i = _charBufferLength ;
- while (--i >= 0) {
- if (c[i] != _charBuffer[i]) {
- return false;
- }
- }
- return true;
- }
-
- /*
- * C.22
- */
- protected final String decodeNonEmptyOctetStringOnSecondBitAsUtf8String() throws FastInfosetException, IOException {
- decodeNonEmptyOctetStringOnSecondBitAsUtf8CharArray();
- return new String(_charBuffer, 0, _charBufferLength);
- }
-
- /*
- * C.22
- */
- protected final void decodeNonEmptyOctetStringOnSecondBitAsUtf8CharArray() throws FastInfosetException, IOException {
- decodeNonEmptyOctetStringLengthOnSecondBit();
- decodeUtf8StringAsCharBuffer();
- }
-
- /*
- * C.22
- */
- protected final void decodeNonEmptyOctetStringLengthOnSecondBit() throws FastInfosetException, IOException {
- final int b = read();
- switch(DecoderStateTables.ISTRING(b)) {
- case DecoderStateTables.ISTRING_SMALL_LENGTH:
- _octetBufferLength = b + 1;
- break;
- case DecoderStateTables.ISTRING_MEDIUM_LENGTH:
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_SMALL_LIMIT;
- break;
- case DecoderStateTables.ISTRING_LARGE_LENGTH:
- {
- final int length = (read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read();
- _octetBufferLength = length + EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_MEDIUM_LIMIT;
- break;
- }
- case DecoderStateTables.ISTRING_INDEX_SMALL:
- case DecoderStateTables.ISTRING_INDEX_MEDIUM:
- case DecoderStateTables.ISTRING_INDEX_LARGE:
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingNonEmptyOctet"));
- }
- }
-
- /*
- * C.25
- */
- protected final int decodeIntegerIndexOnSecondBit() throws FastInfosetException, IOException {
- final int b = read() | 0x80;
- switch(DecoderStateTables.ISTRING(b)) {
- case DecoderStateTables.ISTRING_INDEX_SMALL:
- return b & EncodingConstants.INTEGER_2ND_BIT_SMALL_MASK;
- case DecoderStateTables.ISTRING_INDEX_MEDIUM:
- return (((b & EncodingConstants.INTEGER_2ND_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
- case DecoderStateTables.ISTRING_INDEX_LARGE:
- return (((b & EncodingConstants.INTEGER_2ND_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
- case DecoderStateTables.ISTRING_SMALL_LENGTH:
- case DecoderStateTables.ISTRING_MEDIUM_LENGTH:
- case DecoderStateTables.ISTRING_LARGE_LENGTH:
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingIndexOnSecondBit"));
- }
- }
-
- protected final void decodeHeader() throws FastInfosetException, IOException {
- if (!_isFastInfosetDocument()) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.notFIDocument"));
- }
- }
-
- protected final void decodeRestrictedAlphabetAsCharBuffer() throws FastInfosetException, IOException {
- if (_identifier <= EncodingConstants.RESTRICTED_ALPHABET_BUILTIN_END) {
- decodeFourBitAlphabetOctetsAsCharBuffer(BuiltInRestrictedAlphabets.table[_identifier]);
- // decodeAlphabetOctetsAsCharBuffer(BuiltInRestrictedAlphabets.table[_identifier]);
- } else if (_identifier >= EncodingConstants.RESTRICTED_ALPHABET_APPLICATION_START) {
- CharArray ca = _v.restrictedAlphabet.get(_identifier - EncodingConstants.RESTRICTED_ALPHABET_APPLICATION_START);
- if (ca == null) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.alphabetNotPresent", new Object[]{Integer.valueOf(_identifier)}));
- }
- decodeAlphabetOctetsAsCharBuffer(ca.ch);
- } else {
- // Reserved built-in algorithms for future use
- // TODO should use sax property to decide if event will be
- // reported, allows for support through handler if required.
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.alphabetIdentifiersReserved"));
- }
- }
-
- protected final String decodeRestrictedAlphabetAsString() throws FastInfosetException, IOException {
- decodeRestrictedAlphabetAsCharBuffer();
- return new String(_charBuffer, 0, _charBufferLength);
- }
-
- protected final String decodeRAOctetsAsString(char[] restrictedAlphabet) throws FastInfosetException, IOException {
- decodeAlphabetOctetsAsCharBuffer(restrictedAlphabet);
- return new String(_charBuffer, 0, _charBufferLength);
- }
-
- protected final void decodeFourBitAlphabetOctetsAsCharBuffer(char[] restrictedAlphabet) throws FastInfosetException, IOException {
- _charBufferLength = 0;
- final int characters = _octetBufferLength * 2;
- if (_charBuffer.length < characters) {
- _charBuffer = new char[characters];
- }
-
- int v = 0;
- for (int i = 0; i < _octetBufferLength - 1; i++) {
- v = _octetBuffer[_octetBufferStart++] & 0xFF;
- _charBuffer[_charBufferLength++] = restrictedAlphabet[v >> 4];
- _charBuffer[_charBufferLength++] = restrictedAlphabet[v & 0x0F];
- }
- v = _octetBuffer[_octetBufferStart++] & 0xFF;
- _charBuffer[_charBufferLength++] = restrictedAlphabet[v >> 4];
- v &= 0x0F;
- if (v != 0x0F) {
- _charBuffer[_charBufferLength++] = restrictedAlphabet[v & 0x0F];
- }
- }
-
- protected final void decodeAlphabetOctetsAsCharBuffer(char[] restrictedAlphabet) throws FastInfosetException, IOException {
- if (restrictedAlphabet.length < 2) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.alphabetMustContain2orMoreChars"));
- }
-
- int bitsPerCharacter = 1;
- while ((1 << bitsPerCharacter) <= restrictedAlphabet.length) {
- bitsPerCharacter++;
- }
- final int terminatingValue = (1 << bitsPerCharacter) - 1;
-
- int characters = (_octetBufferLength << 3) / bitsPerCharacter;
- if (characters == 0) {
- throw new IOException("");
- }
-
- _charBufferLength = 0;
- if (_charBuffer.length < characters) {
- _charBuffer = new char[characters];
- }
-
- resetBits();
- for (int i = 0; i < characters; i++) {
- int value = readBits(bitsPerCharacter);
- if (bitsPerCharacter < 8 && value == terminatingValue) {
- int octetPosition = (i * bitsPerCharacter) >>> 3;
- if (octetPosition != _octetBufferLength - 1) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.alphabetIncorrectlyTerminated"));
- }
- break;
- }
- _charBuffer[_charBufferLength++] = restrictedAlphabet[value];
- }
- }
-
- private int _bitsLeftInOctet;
-
- private void resetBits() {
- _bitsLeftInOctet = 0;
- }
-
- private int readBits(int bits) throws IOException {
- int value = 0;
- while (bits > 0) {
- if (_bitsLeftInOctet == 0) {
- _b = _octetBuffer[_octetBufferStart++] & 0xFF;
- _bitsLeftInOctet = 8;
- }
- int bit = ((_b & (1 << --_bitsLeftInOctet)) > 0) ? 1 : 0;
- value |= (bit << --bits);
- }
-
- return value;
- }
-
- protected final void decodeUtf8StringAsCharBuffer() throws IOException {
- ensureOctetBufferSize();
- decodeUtf8StringIntoCharBuffer();
- }
-
- protected final void decodeUtf8StringAsCharBuffer(char[] ch, int offset) throws IOException {
- ensureOctetBufferSize();
- decodeUtf8StringIntoCharBuffer(ch, offset);
- }
-
- protected final String decodeUtf8StringAsString() throws IOException {
- decodeUtf8StringAsCharBuffer();
- return new String(_charBuffer, 0, _charBufferLength);
- }
-
- protected final void decodeUtf16StringAsCharBuffer() throws IOException {
- ensureOctetBufferSize();
- decodeUtf16StringIntoCharBuffer();
- }
-
- protected final String decodeUtf16StringAsString() throws IOException {
- decodeUtf16StringAsCharBuffer();
- return new String(_charBuffer, 0, _charBufferLength);
- }
-
- private void ensureOctetBufferSize() throws IOException {
- if (_octetBufferEnd < (_octetBufferOffset + _octetBufferLength)) {
- final int octetsInBuffer = _octetBufferEnd - _octetBufferOffset;
-
- if (_octetBuffer.length < _octetBufferLength) {
- // Length to read is too large, resize the buffer
- byte[] newOctetBuffer = new byte[_octetBufferLength];
- // Move partially read octets to the start of the buffer
- System.arraycopy(_octetBuffer, _octetBufferOffset, newOctetBuffer, 0, octetsInBuffer);
- _octetBuffer = newOctetBuffer;
- } else {
- // Move partially read octets to the start of the buffer
- System.arraycopy(_octetBuffer, _octetBufferOffset, _octetBuffer, 0, octetsInBuffer);
- }
- _octetBufferOffset = 0;
-
- // Read as many octets as possible to fill the buffer
- final int octetsRead = _s.read(_octetBuffer, octetsInBuffer, _octetBuffer.length - octetsInBuffer);
- if (octetsRead < 0) {
- throw new EOFException("Unexpeceted EOF");
- }
- _octetBufferEnd = octetsInBuffer + octetsRead;
-
- // Check if the number of octets that have been read is not enough
- // This can happen when underlying non-blocking is used to read
- if (_octetBufferEnd < _octetBufferLength) {
- repeatedRead();
- }
- }
- }
-
- private void repeatedRead() throws IOException {
- // Check if the number of octets that have been read is not enough
- while (_octetBufferEnd < _octetBufferLength) {
- // Read as many octets as possible to fill the buffer
- final int octetsRead = _s.read(_octetBuffer, _octetBufferEnd, _octetBuffer.length - _octetBufferEnd);
- if (octetsRead < 0) {
- throw new EOFException("Unexpeceted EOF");
- }
- _octetBufferEnd += octetsRead;
- }
- }
-
- protected final void decodeUtf8StringIntoCharBuffer() throws IOException {
- if (_charBuffer.length < _octetBufferLength) {
- _charBuffer = new char[_octetBufferLength];
- }
-
- _charBufferLength = 0;
- final int end = _octetBufferLength + _octetBufferOffset;
- int b1;
- while (end != _octetBufferOffset) {
- b1 = _octetBuffer[_octetBufferOffset++] & 0xFF;
- if (DecoderStateTables.UTF8(b1) == DecoderStateTables.UTF8_ONE_BYTE) {
- _charBuffer[_charBufferLength++] = (char) b1;
- } else {
- decodeTwoToFourByteUtf8Character(b1, end);
- }
- }
- }
-
- protected final void decodeUtf8StringIntoCharBuffer(char[] ch, int offset) throws IOException {
- _charBufferLength = offset;
- final int end = _octetBufferLength + _octetBufferOffset;
- int b1;
- while (end != _octetBufferOffset) {
- b1 = _octetBuffer[_octetBufferOffset++] & 0xFF;
- if (DecoderStateTables.UTF8(b1) == DecoderStateTables.UTF8_ONE_BYTE) {
- ch[_charBufferLength++] = (char) b1;
- } else {
- decodeTwoToFourByteUtf8Character(ch, b1, end);
- }
- }
- _charBufferLength -= offset;
- }
-
- private void decodeTwoToFourByteUtf8Character(int b1, int end) throws IOException {
- switch(DecoderStateTables.UTF8(b1)) {
- case DecoderStateTables.UTF8_TWO_BYTES:
- {
- // Decode byte 2
- if (end == _octetBufferOffset) {
- decodeUtf8StringLengthTooSmall();
- }
- final int b2 = _octetBuffer[_octetBufferOffset++] & 0xFF;
- if ((b2 & 0xC0) != 0x80) {
- decodeUtf8StringIllegalState();
- }
-
- // Character guaranteed to be in [0x20, 0xD7FF] range
- // since a character encoded in two bytes will be in the
- // range [0x80, 0x1FFF]
- _charBuffer[_charBufferLength++] = (char) (
- ((b1 & 0x1F) << 6)
- | (b2 & 0x3F));
- break;
- }
- case DecoderStateTables.UTF8_THREE_BYTES:
- final char c = decodeUtf8ThreeByteChar(end, b1);
- if (XMLChar.isContent(c)) {
- _charBuffer[_charBufferLength++] = c;
- } else {
- decodeUtf8StringIllegalState();
- }
- break;
- case DecoderStateTables.UTF8_FOUR_BYTES:
- {
- final int supplemental = decodeUtf8FourByteChar(end, b1);
- if (XMLChar.isContent(supplemental)) {
- _charBuffer[_charBufferLength++] = _utf8_highSurrogate;
- _charBuffer[_charBufferLength++] = _utf8_lowSurrogate;
- } else {
- decodeUtf8StringIllegalState();
- }
- break;
- }
- default:
- decodeUtf8StringIllegalState();
- }
- }
-
- private void decodeTwoToFourByteUtf8Character(char ch[], int b1, int end) throws IOException {
- switch(DecoderStateTables.UTF8(b1)) {
- case DecoderStateTables.UTF8_TWO_BYTES:
- {
- // Decode byte 2
- if (end == _octetBufferOffset) {
- decodeUtf8StringLengthTooSmall();
- }
- final int b2 = _octetBuffer[_octetBufferOffset++] & 0xFF;
- if ((b2 & 0xC0) != 0x80) {
- decodeUtf8StringIllegalState();
- }
-
- // Character guaranteed to be in [0x20, 0xD7FF] range
- // since a character encoded in two bytes will be in the
- // range [0x80, 0x1FFF]
- ch[_charBufferLength++] = (char) (
- ((b1 & 0x1F) << 6)
- | (b2 & 0x3F));
- break;
- }
- case DecoderStateTables.UTF8_THREE_BYTES:
- final char c = decodeUtf8ThreeByteChar(end, b1);
- if (XMLChar.isContent(c)) {
- ch[_charBufferLength++] = c;
- } else {
- decodeUtf8StringIllegalState();
- }
- break;
- case DecoderStateTables.UTF8_FOUR_BYTES:
- {
- final int supplemental = decodeUtf8FourByteChar(end, b1);
- if (XMLChar.isContent(supplemental)) {
- ch[_charBufferLength++] = _utf8_highSurrogate;
- ch[_charBufferLength++] = _utf8_lowSurrogate;
- } else {
- decodeUtf8StringIllegalState();
- }
- break;
- }
- default:
- decodeUtf8StringIllegalState();
- }
- }
-
- protected final void decodeUtf8NCNameIntoCharBuffer() throws IOException {
- _charBufferLength = 0;
- if (_charBuffer.length < _octetBufferLength) {
- _charBuffer = new char[_octetBufferLength];
- }
-
- final int end = _octetBufferLength + _octetBufferOffset;
-
- int b1 = _octetBuffer[_octetBufferOffset++] & 0xFF;
- if (DecoderStateTables.UTF8_NCNAME(b1) == DecoderStateTables.UTF8_NCNAME_NCNAME) {
- _charBuffer[_charBufferLength++] = (char) b1;
- } else {
- decodeUtf8NCNameStartTwoToFourByteCharacters(b1, end);
- }
-
- while (end != _octetBufferOffset) {
- b1 = _octetBuffer[_octetBufferOffset++] & 0xFF;
- if (DecoderStateTables.UTF8_NCNAME(b1) < DecoderStateTables.UTF8_TWO_BYTES) {
- _charBuffer[_charBufferLength++] = (char) b1;
- } else {
- decodeUtf8NCNameTwoToFourByteCharacters(b1, end);
- }
- }
- }
-
- private void decodeUtf8NCNameStartTwoToFourByteCharacters(int b1, int end) throws IOException {
- switch(DecoderStateTables.UTF8_NCNAME(b1)) {
- case DecoderStateTables.UTF8_TWO_BYTES:
- {
- // Decode byte 2
- if (end == _octetBufferOffset) {
- decodeUtf8StringLengthTooSmall();
- }
- final int b2 = _octetBuffer[_octetBufferOffset++] & 0xFF;
- if ((b2 & 0xC0) != 0x80) {
- decodeUtf8StringIllegalState();
- }
-
- final char c = (char) (
- ((b1 & 0x1F) << 6)
- | (b2 & 0x3F));
- if (XMLChar.isNCNameStart(c)) {
- _charBuffer[_charBufferLength++] = c;
- } else {
- decodeUtf8NCNameIllegalState();
- }
- break;
- }
- case DecoderStateTables.UTF8_THREE_BYTES:
- final char c = decodeUtf8ThreeByteChar(end, b1);
- if (XMLChar.isNCNameStart(c)) {
- _charBuffer[_charBufferLength++] = c;
- } else {
- decodeUtf8NCNameIllegalState();
- }
- break;
- case DecoderStateTables.UTF8_FOUR_BYTES:
- {
- final int supplemental = decodeUtf8FourByteChar(end, b1);
- if (XMLChar.isNCNameStart(supplemental)) {
- _charBuffer[_charBufferLength++] = _utf8_highSurrogate;
- _charBuffer[_charBufferLength++] = _utf8_lowSurrogate;
- } else {
- decodeUtf8NCNameIllegalState();
- }
- break;
- }
- case DecoderStateTables.UTF8_NCNAME_NCNAME_CHAR:
- default:
- decodeUtf8NCNameIllegalState();
- }
-
- }
-
- private void decodeUtf8NCNameTwoToFourByteCharacters(int b1, int end) throws IOException {
- switch(DecoderStateTables.UTF8_NCNAME(b1)) {
- case DecoderStateTables.UTF8_TWO_BYTES:
- {
- // Decode byte 2
- if (end == _octetBufferOffset) {
- decodeUtf8StringLengthTooSmall();
- }
- final int b2 = _octetBuffer[_octetBufferOffset++] & 0xFF;
- if ((b2 & 0xC0) != 0x80) {
- decodeUtf8StringIllegalState();
- }
-
- final char c = (char) (
- ((b1 & 0x1F) << 6)
- | (b2 & 0x3F));
- if (XMLChar.isNCName(c)) {
- _charBuffer[_charBufferLength++] = c;
- } else {
- decodeUtf8NCNameIllegalState();
- }
- break;
- }
- case DecoderStateTables.UTF8_THREE_BYTES:
- final char c = decodeUtf8ThreeByteChar(end, b1);
- if (XMLChar.isNCName(c)) {
- _charBuffer[_charBufferLength++] = c;
- } else {
- decodeUtf8NCNameIllegalState();
- }
- break;
- case DecoderStateTables.UTF8_FOUR_BYTES:
- {
- final int supplemental = decodeUtf8FourByteChar(end, b1);
- if (XMLChar.isNCName(supplemental)) {
- _charBuffer[_charBufferLength++] = _utf8_highSurrogate;
- _charBuffer[_charBufferLength++] = _utf8_lowSurrogate;
- } else {
- decodeUtf8NCNameIllegalState();
- }
- break;
- }
- default:
- decodeUtf8NCNameIllegalState();
- }
- }
-
- private char decodeUtf8ThreeByteChar(int end, int b1) throws IOException {
- // Decode byte 2
- if (end == _octetBufferOffset) {
- decodeUtf8StringLengthTooSmall();
- }
- final int b2 = _octetBuffer[_octetBufferOffset++] & 0xFF;
- if ((b2 & 0xC0) != 0x80
- || (b1 == 0xED && b2 >= 0xA0)
- || ((b1 & 0x0F) == 0 && (b2 & 0x20) == 0)) {
- decodeUtf8StringIllegalState();
- }
-
- // Decode byte 3
- if (end == _octetBufferOffset) {
- decodeUtf8StringLengthTooSmall();
- }
- final int b3 = _octetBuffer[_octetBufferOffset++] & 0xFF;
- if ((b3 & 0xC0) != 0x80) {
- decodeUtf8StringIllegalState();
- }
-
- return (char) (
- (b1 & 0x0F) << 12
- | (b2 & 0x3F) << 6
- | (b3 & 0x3F));
- }
-
- private char _utf8_highSurrogate;
- private char _utf8_lowSurrogate;
-
- private int decodeUtf8FourByteChar(int end, int b1) throws IOException {
- // Decode byte 2
- if (end == _octetBufferOffset) {
- decodeUtf8StringLengthTooSmall();
- }
- final int b2 = _octetBuffer[_octetBufferOffset++] & 0xFF;
- if ((b2 & 0xC0) != 0x80
- || ((b2 & 0x30) == 0 && (b1 & 0x07) == 0)) {
- decodeUtf8StringIllegalState();
- }
-
- // Decode byte 3
- if (end == _octetBufferOffset) {
- decodeUtf8StringLengthTooSmall();
- }
- final int b3 = _octetBuffer[_octetBufferOffset++] & 0xFF;
- if ((b3 & 0xC0) != 0x80) {
- decodeUtf8StringIllegalState();
- }
-
- // Decode byte 4
- if (end == _octetBufferOffset) {
- decodeUtf8StringLengthTooSmall();
- }
- final int b4 = _octetBuffer[_octetBufferOffset++] & 0xFF;
- if ((b4 & 0xC0) != 0x80) {
- decodeUtf8StringIllegalState();
- }
-
- final int uuuuu = ((b1 << 2) & 0x001C) | ((b2 >> 4) & 0x0003);
- if (uuuuu > 0x10) {
- decodeUtf8StringIllegalState();
- }
- final int wwww = uuuuu - 1;
-
- _utf8_highSurrogate = (char) (0xD800 |
- ((wwww << 6) & 0x03C0) | ((b2 << 2) & 0x003C) |
- ((b3 >> 4) & 0x0003));
- _utf8_lowSurrogate = (char) (0xDC00 | ((b3 << 6) & 0x03C0) | (b4 & 0x003F));
-
- return XMLChar.supplemental(_utf8_highSurrogate, _utf8_lowSurrogate);
- }
-
- private void decodeUtf8StringLengthTooSmall() throws IOException {
- throw new IOException(CommonResourceBundle.getInstance().getString("message.deliminatorTooSmall"));
- }
-
- private void decodeUtf8StringIllegalState() throws IOException {
- throw new IOException(CommonResourceBundle.getInstance().getString("message.UTF8Encoded"));
- }
-
- private void decodeUtf8NCNameIllegalState() throws IOException {
- throw new IOException(CommonResourceBundle.getInstance().getString("message.UTF8EncodedNCName"));
- }
-
- private void decodeUtf16StringIntoCharBuffer() throws IOException {
- _charBufferLength = _octetBufferLength / 2;
- if (_charBuffer.length < _charBufferLength) {
- _charBuffer = new char[_charBufferLength];
- }
-
- for (int i = 0; i < _charBufferLength; i++) {
- final char c = (char)((read() << 8) | read());
- // TODO check c is a valid Char character
- _charBuffer[i] = c;
- }
-
- }
-
- protected String createQualifiedNameString(String second) {
- return createQualifiedNameString(XMLNS_NAMESPACE_PREFIX_CHARS, second);
- }
-
- protected String createQualifiedNameString(char[] first, String second) {
- final int l1 = first.length;
- final int l2 = second.length();
- final int total = l1 + l2 + 1;
- if (total < _charBuffer.length) {
- System.arraycopy(first, 0, _charBuffer, 0, l1);
- _charBuffer[l1] = ':';
- second.getChars(0, l2, _charBuffer, l1 + 1);
- return new String(_charBuffer, 0, total);
- } else {
- StringBuilder b = new StringBuilder(new String(first));
- b.append(':');
- b.append(second);
- return b.toString();
- }
- }
-
- protected final int read() throws IOException {
- if (_octetBufferOffset < _octetBufferEnd) {
- return _octetBuffer[_octetBufferOffset++] & 0xFF;
- } else {
- _octetBufferEnd = _s.read(_octetBuffer);
- if (_octetBufferEnd < 0) {
- throw new EOFException(CommonResourceBundle.getInstance().getString("message.EOF"));
- }
-
- _octetBufferOffset = 1;
- return _octetBuffer[0] & 0xFF;
- }
- }
-
- protected final void closeIfRequired() throws IOException {
- if (_s != null && _needForceStreamClose) {
- _s.close();
- }
- }
-
- protected final int peek() throws IOException {
- return peek(null);
- }
-
- protected final int peek(OctetBufferListener octetBufferListener) throws IOException {
- if (_octetBufferOffset < _octetBufferEnd) {
- return _octetBuffer[_octetBufferOffset] & 0xFF;
- } else {
- if (octetBufferListener != null) {
- octetBufferListener.onBeforeOctetBufferOverwrite();
- }
-
- _octetBufferEnd = _s.read(_octetBuffer);
- if (_octetBufferEnd < 0) {
- throw new EOFException(CommonResourceBundle.getInstance().getString("message.EOF"));
- }
-
- _octetBufferOffset = 0;
- return _octetBuffer[0] & 0xFF;
- }
- }
-
- protected final int peek2(OctetBufferListener octetBufferListener) throws IOException {
- if (_octetBufferOffset + 1 < _octetBufferEnd) {
- return _octetBuffer[_octetBufferOffset + 1] & 0xFF;
- } else {
- if (octetBufferListener != null) {
- octetBufferListener.onBeforeOctetBufferOverwrite();
- }
-
- int offset = 0;
- if (_octetBufferOffset < _octetBufferEnd) {
- _octetBuffer[0] = _octetBuffer[_octetBufferOffset];
- offset = 1;
- }
- _octetBufferEnd = _s.read(_octetBuffer, offset, _octetBuffer.length - offset);
-
- if (_octetBufferEnd < 0) {
- throw new EOFException(CommonResourceBundle.getInstance().getString("message.EOF"));
- }
-
- _octetBufferOffset = 0;
- return _octetBuffer[1] & 0xFF;
- }
- }
-
- protected class EncodingAlgorithmInputStream extends InputStream {
-
- public int read() throws IOException {
- if (_octetBufferStart < _octetBufferOffset) {
- return (_octetBuffer[_octetBufferStart++] & 0xFF);
- } else {
- return -1;
- }
- }
-
- @Override
- public int read(byte b[]) throws IOException {
- return read(b, 0, b.length);
- }
-
- @Override
- public int read(byte b[], int off, int len) throws IOException {
- if (b == null) {
- throw new NullPointerException();
- } else if ((off < 0) || (off > b.length) || (len < 0) ||
- ((off + len) > b.length) || ((off + len) < 0)) {
- throw new IndexOutOfBoundsException();
- } else if (len == 0) {
- return 0;
- }
-
- final int newOctetBufferStart = _octetBufferStart + len;
- if (newOctetBufferStart < _octetBufferOffset) {
- System.arraycopy(_octetBuffer, _octetBufferStart, b, off, len);
- _octetBufferStart = newOctetBufferStart;
- return len;
- } else if (_octetBufferStart < _octetBufferOffset) {
- final int bytesToRead = _octetBufferOffset - _octetBufferStart;
- System.arraycopy(_octetBuffer, _octetBufferStart, b, off, bytesToRead);
- _octetBufferStart += bytesToRead;
- return bytesToRead;
- } else {
- return -1;
- }
- }
- }
-
- protected final boolean _isFastInfosetDocument() throws IOException {
- // Fill up the octet buffer
- peek();
-
- _octetBufferLength = EncodingConstants.BINARY_HEADER.length;
- ensureOctetBufferSize();
- _octetBufferOffset += _octetBufferLength;
-
- // Check for binary header
- if (_octetBuffer[0] != EncodingConstants.BINARY_HEADER[0] ||
- _octetBuffer[1] != EncodingConstants.BINARY_HEADER[1] ||
- _octetBuffer[2] != EncodingConstants.BINARY_HEADER[2] ||
- _octetBuffer[3] != EncodingConstants.BINARY_HEADER[3]) {
-
- // Check for each form of XML declaration
- for (int i = 0; i < EncodingConstants.XML_DECLARATION_VALUES.length; i++) {
- _octetBufferLength = EncodingConstants.XML_DECLARATION_VALUES[i].length - _octetBufferOffset;
- ensureOctetBufferSize();
- _octetBufferOffset += _octetBufferLength;
-
- // Check XML declaration
- if (arrayEquals(_octetBuffer, 0,
- EncodingConstants.XML_DECLARATION_VALUES[i],
- EncodingConstants.XML_DECLARATION_VALUES[i].length)) {
- _octetBufferLength = EncodingConstants.BINARY_HEADER.length;
- ensureOctetBufferSize();
-
- // Check for binary header
- if (_octetBuffer[_octetBufferOffset++] != EncodingConstants.BINARY_HEADER[0] ||
- _octetBuffer[_octetBufferOffset++] != EncodingConstants.BINARY_HEADER[1] ||
- _octetBuffer[_octetBufferOffset++] != EncodingConstants.BINARY_HEADER[2] ||
- _octetBuffer[_octetBufferOffset++] != EncodingConstants.BINARY_HEADER[3]) {
- return false;
- } else {
- // Fast Infoset document with XML declaration and binary header
- return true;
- }
- }
- }
-
- return false;
- }
-
- // Fast Infoset document with binary header
- return true;
- }
-
- private boolean arrayEquals(byte[] b1, int offset, byte[] b2, int length) {
- for (int i = 0; i < length; i++) {
- if (b1[offset + i] != b2[i]) {
- return false;
- }
- }
-
- return true;
- }
-
- static public boolean isFastInfosetDocument(InputStream s) throws IOException {
- // TODO
- // Check for <?xml declaration with 'finf' encoding
- final int headerSize = 4;
-
- final byte[] header = new byte[headerSize];
- final int readBytesCount = s.read(header);
- if (readBytesCount < headerSize ||
- header[0] != EncodingConstants.BINARY_HEADER[0] ||
- header[1] != EncodingConstants.BINARY_HEADER[1] ||
- header[2] != EncodingConstants.BINARY_HEADER[2] ||
- header[3] != EncodingConstants.BINARY_HEADER[3]) {
- return false;
- }
-
- // TODO
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/DecoderStateTables.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/DecoderStateTables.java
deleted file mode 100644
index 95242239..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/DecoderStateTables.java
+++ /dev/null
@@ -1,824 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset;
-
-public class DecoderStateTables {
- private static int RANGE_INDEX_END = 0;
- private static int RANGE_INDEX_VALUE = 1;
-
- public final static int STATE_ILLEGAL = 255;
- public final static int STATE_UNSUPPORTED = 254;
-
- // EII child states
- public final static int EII_NO_AIIS_INDEX_SMALL = 0;
- public final static int EII_AIIS_INDEX_SMALL = 1;
- public final static int EII_INDEX_MEDIUM = 2;
- public final static int EII_INDEX_LARGE = 3;
- public final static int EII_NAMESPACES = 4;
- public final static int EII_LITERAL = 5;
- public final static int CII_UTF8_SMALL_LENGTH = 6;
- public final static int CII_UTF8_MEDIUM_LENGTH = 7;
- public final static int CII_UTF8_LARGE_LENGTH = 8;
- public final static int CII_UTF16_SMALL_LENGTH = 9;
- public final static int CII_UTF16_MEDIUM_LENGTH = 10;
- public final static int CII_UTF16_LARGE_LENGTH = 11;
- public final static int CII_RA = 12;
- public final static int CII_EA = 13;
- public final static int CII_INDEX_SMALL = 14;
- public final static int CII_INDEX_MEDIUM = 15;
- public final static int CII_INDEX_LARGE = 16;
- public final static int CII_INDEX_LARGE_LARGE = 17;
- public final static int COMMENT_II = 18;
- public final static int PROCESSING_INSTRUCTION_II = 19;
- public final static int DOCUMENT_TYPE_DECLARATION_II = 20;
- public final static int UNEXPANDED_ENTITY_REFERENCE_II = 21;
- public final static int TERMINATOR_SINGLE = 22;
- public final static int TERMINATOR_DOUBLE = 23;
-
- private static final int[] DII = new int[256];
-
- private static final int[][] DII_RANGES = {
- // EII
-
- // %00000000 to %00011111 EII no attributes small index
- { 0x1F, EII_NO_AIIS_INDEX_SMALL },
-
- // %00100000 to %00100111 EII medium index
- { 0x27, EII_INDEX_MEDIUM },
-
- // %00101000 to %00101111 EII large index
- // %00110000 EII very large index
- // %00101000 to %00110000
- { 0x30, EII_INDEX_LARGE },
-
- // %00110001 to %00110111 ILLEGAL
- { 0x37, STATE_ILLEGAL },
-
- // %00111000 EII namespaces
- { 0x38, EII_NAMESPACES },
-
- // %00111001 to %00111011 ILLEGAL
- { 0x3B, STATE_ILLEGAL },
-
- // %00111100 EII literal (no prefix, no namespace)
- { 0x3C, EII_LITERAL },
-
- // %00111101 EII literal (no prefix, namespace)
- { 0x3D, EII_LITERAL },
-
- // %00111110 ILLEGAL
- { 0x3E, STATE_ILLEGAL },
-
- // %00111111 EII literal (prefix, namespace)
- { 0x3F, EII_LITERAL },
-
- // %01000000 to %01011111 EII attributes small index
- { 0x5F, EII_AIIS_INDEX_SMALL },
-
- // %01100000 to %01100111 EII medium index
- { 0x67, EII_INDEX_MEDIUM },
-
- // %01101000 to %01101111 EII large index
- // %01110000 EII very large index
- // %01101000 to %01110000
- { 0x70, EII_INDEX_LARGE },
-
- // %01110001 to %01110111 ILLEGAL
- { 0x77, STATE_ILLEGAL },
-
- // %01111000 EII attributes namespaces
- { 0x78, EII_NAMESPACES },
-
- // %01111001 to %01111011 ILLEGAL
- { 0x7B, STATE_ILLEGAL },
-
- // %01111100 EII attributes literal (no prefix, no namespace)
- { 0x7C, EII_LITERAL },
-
- // %01111101 EII attributes literal (no prefix, namespace)
- { 0x7D, EII_LITERAL },
-
- // %01111110 ILLEGAL
- { 0x7E, STATE_ILLEGAL },
-
- // %01111111 EII attributes literal (prefix, namespace)
- { 0x7F, EII_LITERAL },
-
- // %10000000 to %11000011
- { 0xC3, STATE_ILLEGAL },
-
- // %11000100 to %11000111
- { 0xC7, DOCUMENT_TYPE_DECLARATION_II },
-
- // %11001000 to %1110000
- { 0xE0, STATE_ILLEGAL },
-
- // %11100001 processing instruction
- { 0xE1, PROCESSING_INSTRUCTION_II },
-
- // %11100010 comment
- { 0xE2, COMMENT_II},
-
- // %111000011 to %11101111
- { 0xEF, STATE_ILLEGAL },
-
- // Terminators
-
- // %11110000 single terminator
- { 0xF0, TERMINATOR_SINGLE },
-
- // %11110000 to %11111110 ILLEGAL
- { 0xFE, STATE_ILLEGAL },
-
- // %11111111 double terminator
- { 0xFF, TERMINATOR_DOUBLE }
- };
-
- private static final int[] EII = new int[256];
-
- private static final int[][] EII_RANGES = {
- // EII
-
- // %00000000 to %00011111 EII no attributes small index
- { 0x1F, EII_NO_AIIS_INDEX_SMALL },
-
- // %00100000 to %00100111 EII medium index
- { 0x27, EII_INDEX_MEDIUM },
-
- // %00101000 to %00101111 EII large index
- // %00110000 EII very large index
- // %00101000 to %00110000
- { 0x30, EII_INDEX_LARGE },
-
- // %00110001 to %00110111 ILLEGAL
- { 0x37, STATE_ILLEGAL },
-
- // %00111000 EII namespaces
- { 0x38, EII_NAMESPACES },
-
- // %00111001 to %00111011 ILLEGAL
- { 0x3B, STATE_ILLEGAL },
-
- // %00111100 EII literal (no prefix, no namespace)
- { 0x3C, EII_LITERAL },
-
- // %00111101 EII literal (no prefix, namespace)
- { 0x3D, EII_LITERAL },
-
- // %00111110 ILLEGAL
- { 0x3E, STATE_ILLEGAL },
-
- // %00111111 EII literal (prefix, namespace)
- { 0x3F, EII_LITERAL },
-
- // %01000000 to %01011111 EII attributes small index
- { 0x5F, EII_AIIS_INDEX_SMALL },
-
- // %01100000 to %01100111 EII medium index
- { 0x67, EII_INDEX_MEDIUM },
-
- // %01101000 to %01101111 EII large index
- // %01110000 EII very large index
- // %01101000 to %01110000
- { 0x70, EII_INDEX_LARGE },
-
- // %01110001 to %01110111 ILLEGAL
- { 0x77, STATE_ILLEGAL },
-
- // %01111000 EII attributes namespaces
- { 0x78, EII_NAMESPACES },
-
- // %01111001 to %01111011 ILLEGAL
- { 0x7B, STATE_ILLEGAL },
-
- // %01111100 EII attributes literal (no prefix, no namespace)
- { 0x7C, EII_LITERAL },
-
- // %01111101 EII attributes literal (no prefix, namespace)
- { 0x7D, EII_LITERAL },
-
- // %01111110 ILLEGAL
- { 0x7E, STATE_ILLEGAL },
-
- // %01111111 EII attributes literal (prefix, namespace)
- { 0x7F, EII_LITERAL },
-
- // CII
-
- // UTF-8 string
-
- // %10000000 to %10000001 CII UTF-8 no add to table small length
- { 0x81, CII_UTF8_SMALL_LENGTH },
-
- // %10000010 CII UTF-8 no add to table medium length
- { 0x82, CII_UTF8_MEDIUM_LENGTH },
-
- // %10000011 CII UTF-8 no add to table large length
- { 0x83, CII_UTF8_LARGE_LENGTH },
-
- // UTF-16 string
-
- // %10000100 to %10000101 CII UTF-16 no add to table small length
- { 0x85, CII_UTF16_SMALL_LENGTH },
-
- // %10000110 CII UTF-16 no add to table medium length
- { 0x86, CII_UTF16_MEDIUM_LENGTH },
-
- // %10000111 CII UTF-16 no add to table large length
- { 0x87, CII_UTF16_LARGE_LENGTH },
-
- // Resitricted alphabet
-
- // %10001000 to %10001011 CII RA no add to table
- { 0x8B, CII_RA },
-
- // Encoding algorithm
-
- // %10001100 to %10001111 CII EA no add to table
- { 0x8F, CII_EA },
-
- // UTF-8 string, add to table
-
- // %10010000 to %10010001 CII add to table small length
- { 0x91, CII_UTF8_SMALL_LENGTH },
-
- // %10010010 CII add to table medium length
- { 0x92, CII_UTF8_MEDIUM_LENGTH },
-
- // %10010011 CII add to table large length
- { 0x93, CII_UTF8_LARGE_LENGTH },
-
- // UTF-16 string, add to table
-
- // %10010100 to %10010101 CII UTF-16 add to table small length
- { 0x95, CII_UTF16_SMALL_LENGTH },
-
- // %10010110 CII UTF-16 add to table medium length
- { 0x96, CII_UTF16_MEDIUM_LENGTH },
-
- // %10010111 CII UTF-16 add to table large length
- { 0x97, CII_UTF16_LARGE_LENGTH },
-
- // Restricted alphabet, add to table
-
- // %10011000 to %10011011 CII RA add to table
- { 0x9B, CII_RA },
-
- // Encoding algorithm, add to table
-
- // %10011100 to %10011111 CII EA add to table
- { 0x9F, CII_EA },
-
- // Index
-
- // %10100000 to %10101111 CII small index
- { 0xAF, CII_INDEX_SMALL },
-
- // %10110000 to %10110011 CII medium index
- { 0xB3, CII_INDEX_MEDIUM },
-
- // %10110100 to %10110111 CII large index
- { 0xB7, CII_INDEX_LARGE },
-
- // %10111000 CII very large index
- { 0xB8, CII_INDEX_LARGE_LARGE },
-
- // %10111001 to %11000111 ILLEGAL
- { 0xC7, STATE_ILLEGAL },
-
- // %11001000 to %11001011
- { 0xCB, UNEXPANDED_ENTITY_REFERENCE_II },
-
- // %11001100 to %11100000 ILLEGAL
- { 0xE0, STATE_ILLEGAL },
-
- // %11100001 processing instruction
- { 0xE1, PROCESSING_INSTRUCTION_II },
-
- // %11100010 comment
- { 0xE2, COMMENT_II},
-
- // %111000011 to %11101111
- { 0xEF, STATE_ILLEGAL },
-
- // Terminators
-
- // %11110000 single terminator
- { 0xF0, TERMINATOR_SINGLE },
-
- // %11110000 to %11111110 ILLEGAL
- { 0xFE, STATE_ILLEGAL },
-
- // %11111111 double terminator
- { 0xFF, TERMINATOR_DOUBLE }
- };
-
-
- // AII states
- public final static int AII_INDEX_SMALL = 0;
- public final static int AII_INDEX_MEDIUM = 1;
- public final static int AII_INDEX_LARGE = 2;
- public final static int AII_LITERAL = 3;
- public final static int AII_TERMINATOR_SINGLE = 4;
- public final static int AII_TERMINATOR_DOUBLE = 5;
-
- private static final int[] AII = new int[256];
-
- private static final int[][] AII_RANGES = {
- // %00000000 to %00111111 AII small index
- { 0x3F, AII_INDEX_SMALL },
-
- // %01000000 to %01011111 AII medium index
- { 0x5F, AII_INDEX_MEDIUM },
-
- // %01100000 to %01101111 AII large index
- { 0x6F, AII_INDEX_LARGE },
-
- // %01110000 to %01110111 ILLEGAL
- { 0x77, STATE_ILLEGAL },
-
- // %01111000 AII literal (no prefix, no namespace)
- // %01111001 AII literal (no prefix, namespace)
- { 0x79, AII_LITERAL },
-
- // %01111010 ILLEGAL
- { 0x7A, STATE_ILLEGAL },
-
- // %01111011 AII literal (prefix, namespace)
- { 0x7B, AII_LITERAL },
-
- // %10000000 to %11101111 ILLEGAL
- { 0xEF, STATE_ILLEGAL },
-
- // Terminators
-
- // %11110000 single terminator
- { 0xF0, AII_TERMINATOR_SINGLE },
-
- // %11110000 to %11111110 ILLEGAL
- { 0xFE, STATE_ILLEGAL },
-
- // %11111111 double terminator
- { 0xFF, AII_TERMINATOR_DOUBLE }
- };
-
-
- // AII value states
- public final static int NISTRING_UTF8_SMALL_LENGTH = 0;
- public final static int NISTRING_UTF8_MEDIUM_LENGTH = 1;
- public final static int NISTRING_UTF8_LARGE_LENGTH = 2;
- public final static int NISTRING_UTF16_SMALL_LENGTH = 3;
- public final static int NISTRING_UTF16_MEDIUM_LENGTH = 4;
- public final static int NISTRING_UTF16_LARGE_LENGTH = 5;
- public final static int NISTRING_RA = 6;
- public final static int NISTRING_EA = 7;
- public final static int NISTRING_INDEX_SMALL = 8;
- public final static int NISTRING_INDEX_MEDIUM = 9;
- public final static int NISTRING_INDEX_LARGE = 10;
- public final static int NISTRING_EMPTY = 11;
-
- private static final int[] NISTRING = new int[256];
-
- private static final int[][] NISTRING_RANGES = {
- // UTF-8 string
-
- // %00000000 to %00000111 UTF-8 no add to table small length
- { 0x07, NISTRING_UTF8_SMALL_LENGTH },
-
- // %00001000 UTF-8 no add to table medium length
- { 0x08, NISTRING_UTF8_MEDIUM_LENGTH },
-
- // %00001001 to %00001011 ILLEGAL
- { 0x0B, STATE_ILLEGAL },
-
- // %00001100 UTF-8 no add to table large length
- { 0x0C, NISTRING_UTF8_LARGE_LENGTH },
-
- // %00001101 to %00001111 ILLEGAL
- { 0x0F, STATE_ILLEGAL },
-
- // UTF-16 string
-
- // %00010000 to %00010111 UTF-16 no add to table small length
- { 0x17, NISTRING_UTF16_SMALL_LENGTH },
-
- // %00001000 UTF-16 no add to table medium length
- { 0x18, NISTRING_UTF16_MEDIUM_LENGTH },
-
- // %00011001 to %00011011 ILLEGAL
- { 0x1B, STATE_ILLEGAL },
-
- // %00011100 UTF-16 no add to table large length
- { 0x1C, NISTRING_UTF16_LARGE_LENGTH },
-
- // %00011101 to %00011111 ILLEGAL
- { 0x1F, STATE_ILLEGAL },
-
- // Restricted alphabet
-
- // %00100000 to %00101111 RA no add to table small length
- { 0x2F, NISTRING_RA },
-
- // Encoding algorithm
-
- // %00110000 to %00111111 EA no add to table
- { 0x3F, NISTRING_EA },
-
- // UTF-8 string, add to table
-
- // %01000000 to %01000111 UTF-8 add to table small length
- { 0x47, NISTRING_UTF8_SMALL_LENGTH },
-
- // %01001000 UTF-8 add to table medium length
- { 0x48, NISTRING_UTF8_MEDIUM_LENGTH },
-
- // %01001001 to %01001011 ILLEGAL
- { 0x4B, STATE_ILLEGAL },
-
- // %01001100 UTF-8 add to table large length
- { 0x4C, NISTRING_UTF8_LARGE_LENGTH },
-
- // %01001101 to %01001111 ILLEGAL
- { 0x4F, STATE_ILLEGAL },
-
- // UTF-16 string, add to table
-
- // %01010000 to %01010111 UTF-16 add to table small length
- { 0x57, NISTRING_UTF16_SMALL_LENGTH },
-
- // %01001000 UTF-16 add to table medium length
- { 0x58, NISTRING_UTF16_MEDIUM_LENGTH },
-
- // %01011001 to %01011011 ILLEGAL
- { 0x5B, STATE_ILLEGAL },
-
- // %01011100 UTF-16 add to table large length
- { 0x5C, NISTRING_UTF16_LARGE_LENGTH },
-
- // %01011101 to %01011111 ILLEGAL
- { 0x5F, STATE_ILLEGAL },
-
- // Restricted alphabet, add to table
-
- // %01100000 to %01101111 RA no add to table small length
- { 0x6F, NISTRING_RA },
-
- // Encoding algorithm, add to table
-
- // %01110000 to %01111111 EA add to table
- { 0x7F, NISTRING_EA },
-
- // Index
-
- // %10000000 to %10111111 index small
- { 0xBF, NISTRING_INDEX_SMALL },
-
- // %11000000 to %11011111 index medium
- { 0xDF, NISTRING_INDEX_MEDIUM },
-
- // %11100000 to %11101111 index large
- { 0xEF, NISTRING_INDEX_LARGE },
-
- // %11110000 to %11111110 ILLEGAL
- { 0xFE, STATE_ILLEGAL },
-
- // %11111111 Empty value
- { 0xFF, NISTRING_EMPTY },
- };
-
-
- /* package */ final static int ISTRING_SMALL_LENGTH = 0;
- /* package */ final static int ISTRING_MEDIUM_LENGTH = 1;
- /* package */ final static int ISTRING_LARGE_LENGTH = 2;
- /* package */ final static int ISTRING_INDEX_SMALL = 3;
- /* package */ final static int ISTRING_INDEX_MEDIUM = 4;
- /* package */ final static int ISTRING_INDEX_LARGE = 5;
-
- private static final int[] ISTRING = new int[256];
-
- private static final int[][] ISTRING_RANGES = {
- // %00000000 to %00111111 small length
- { 0x3F, ISTRING_SMALL_LENGTH },
-
- // %01000000 medium length
- { 0x40, ISTRING_MEDIUM_LENGTH },
-
- // %01000001 to %01011111 ILLEGAL
- { 0x5F, STATE_ILLEGAL },
-
- // %01100000 large length
- { 0x60, ISTRING_LARGE_LENGTH },
-
- // %01100001 to %01111111 ILLEGAL
- { 0x7F, STATE_ILLEGAL },
-
- // %10000000 to %10111111 index small
- { 0xBF, ISTRING_INDEX_SMALL },
-
- // %11000000 to %11011111 index medium
- { 0xDF, ISTRING_INDEX_MEDIUM },
-
- // %11100000 to %11101111 index large
- { 0xEF, ISTRING_INDEX_LARGE },
-
- // %11110000 to %11111111 ILLEGAL
- { 0xFF, STATE_ILLEGAL },
- };
-
-
- /* package */ final static int ISTRING_PREFIX_NAMESPACE_LENGTH_3 = 6;
- /* package */ final static int ISTRING_PREFIX_NAMESPACE_LENGTH_5 = 7;
- /* package */ final static int ISTRING_PREFIX_NAMESPACE_LENGTH_29 = 8;
- /* package */ final static int ISTRING_PREFIX_NAMESPACE_LENGTH_36 = 9;
- /* package */ final static int ISTRING_PREFIX_NAMESPACE_INDEX_ZERO = 10;
-
- private static final int[] ISTRING_PREFIX_NAMESPACE = new int[256];
-
- private static final int[][] ISTRING_PREFIX_NAMESPACE_RANGES = {
- // %00000000 to %00000001 small length
- { 0x01, ISTRING_SMALL_LENGTH },
-
- // %00000010 small length
- { 0x02, ISTRING_PREFIX_NAMESPACE_LENGTH_3 },
-
- // %00000011 small length
- { 0x03, ISTRING_SMALL_LENGTH },
-
- // %00000100 small length
- { 0x04, ISTRING_PREFIX_NAMESPACE_LENGTH_5 },
-
- // %00011011 small length
- { 0x1B, ISTRING_SMALL_LENGTH },
-
- // %00011100 small length
- { 0x1C, ISTRING_PREFIX_NAMESPACE_LENGTH_29 },
-
- // %00100010 small length
- { 0x22, ISTRING_SMALL_LENGTH },
-
- // %00100011 small length
- { 0x23, ISTRING_PREFIX_NAMESPACE_LENGTH_36 },
-
- // %00000101 to %00111111 small length
- { 0x3F, ISTRING_SMALL_LENGTH },
-
-
-
-
- // %01000000 medium length
- { 0x40, ISTRING_MEDIUM_LENGTH },
-
- // %01000001 to %01011111 ILLEGAL
- { 0x5F, STATE_ILLEGAL },
-
- // %01100000 large length
- { 0x60, ISTRING_LARGE_LENGTH },
-
- // %01100001 to %01111111 ILLEGAL
- { 0x7F, STATE_ILLEGAL },
-
- // %10000000 index small, 0
- { 0x80, ISTRING_PREFIX_NAMESPACE_INDEX_ZERO },
-
- // %10000000 to %10111111 index small
- { 0xBF, ISTRING_INDEX_SMALL },
-
- // %11000000 to %11011111 index medium
- { 0xDF, ISTRING_INDEX_MEDIUM },
-
- // %11100000 to %11101111 index large
- { 0xEF, ISTRING_INDEX_LARGE },
-
- // %11110000 to %11111111 ILLEGAL
- { 0xFF, STATE_ILLEGAL },
- };
-
- // UTF-8 states
- /* package */ final static int UTF8_NCNAME_NCNAME = 0;
- /* package */ final static int UTF8_NCNAME_NCNAME_CHAR = 1;
- /* package */ final static int UTF8_TWO_BYTES = 2;
- /* package */ final static int UTF8_THREE_BYTES = 3;
- /* package */ final static int UTF8_FOUR_BYTES = 4;
-
- private static final int[] UTF8_NCNAME = new int[256];
-
- private static final int[][] UTF8_NCNAME_RANGES = {
-
- // Basic Latin
-
- // %00000000 to %00101100
- { 0x2C, STATE_ILLEGAL },
-
- // '-' '.'
- // %%00101101 to %00101110 [#x002D-#x002E]
- { 0x2E, UTF8_NCNAME_NCNAME_CHAR },
-
- // %00101111
- { 0x2F, STATE_ILLEGAL },
-
- // [0-9]
- // %0011000 to %00111001 [#x0030-#x0039]
- { 0x39, UTF8_NCNAME_NCNAME_CHAR },
-
- // %01000000
- { 0x40, STATE_ILLEGAL },
-
- // [A-Z]
- // %01000001 to %01011010 [#x0041-#x005A]
- { 0x5A, UTF8_NCNAME_NCNAME },
-
- // %01011110
- { 0x5E, STATE_ILLEGAL },
-
- // '_'
- // %01011111 [#x005F]
- { 0x5F, UTF8_NCNAME_NCNAME },
-
- // %01100000
- { 0x60, STATE_ILLEGAL },
-
- // [a-z]
- // %01100001 to %01111010 [#x0061-#x007A]
- { 0x7A, UTF8_NCNAME_NCNAME },
-
- // %01111011 to %01111111
- { 0x7F, STATE_ILLEGAL },
-
-
- // Two bytes
-
- // %10000000 to %11000001
- { 0xC1, STATE_ILLEGAL },
-
- // %11000010 to %11011111
- { 0xDF, UTF8_TWO_BYTES },
-
-
- // Three bytes
-
- // %11100000 to %11101111
- { 0xEF, UTF8_THREE_BYTES },
-
-
- // Four bytes
-
- // %11110000 to %11110111
- { 0xF7, UTF8_FOUR_BYTES },
-
-
- // %11111000 to %11111111
- { 0xFF, STATE_ILLEGAL }
- };
-
- /* package */ final static int UTF8_ONE_BYTE = 1;
-
- private static final int[] UTF8 = new int[256];
-
- private static final int[][] UTF8_RANGES = {
-
- // Basic Latin
-
- // %00000000 to %00001000
- { 0x08, STATE_ILLEGAL },
-
- // CHARACTER TABULATION, LINE FEED
- // %%00001001 to %00001010 [#x0009-#x000A]
- { 0x0A, UTF8_ONE_BYTE },
-
- // %00001011 to %00001100
- { 0x0C, STATE_ILLEGAL },
-
- // CARRIAGE RETURN
- // %00001101 [#x000D]
- { 0x0D, UTF8_ONE_BYTE },
-
- // %00001110 to %00011111
- { 0x1F, STATE_ILLEGAL },
-
- // %0010000 to %01111111
- { 0x7F, UTF8_ONE_BYTE },
-
-
- // Two bytes
-
- // %10000000 to %11000001
- { 0xC1, STATE_ILLEGAL },
-
- // %11000010 to %11011111
- { 0xDF, UTF8_TWO_BYTES },
-
-
- // Three bytes
-
- // %11100000 to %11101111
- { 0xEF, UTF8_THREE_BYTES },
-
-
- // Four bytes
-
- // %11110000 to %11110111
- { 0xF7, UTF8_FOUR_BYTES },
-
-
- // %11111000 to %11111111
- { 0xFF, STATE_ILLEGAL }
- };
-
- private static void constructTable(int[] table, int[][] ranges) {
- int start = 0x00;
- for (int range = 0; range < ranges.length; range++) {
- int end = ranges[range][RANGE_INDEX_END];
- int value = ranges[range][RANGE_INDEX_VALUE];
- for (int i = start; i<= end; i++) {
- table[i] = value;
- }
- start = end + 1;
- }
- }
-
- public static final int DII(final int index) {
- return DII[index];
- }
-
- public static final int EII(final int index) {
- return EII[index];
- }
-
- public static final int AII(final int index) {
- return AII[index];
- }
-
- public static final int NISTRING(final int index) {
- return NISTRING[index];
- }
-
- public static final int ISTRING(final int index) {
- return ISTRING[index];
- }
-
- public static final int ISTRING_PREFIX_NAMESPACE(final int index) {
- return ISTRING_PREFIX_NAMESPACE[index];
- }
-
- public static final int UTF8(final int index) {
- return UTF8[index];
- }
-
- public static final int UTF8_NCNAME(final int index) {
- return UTF8_NCNAME[index];
- }
-
- static {
- // DII
- constructTable(DII, DII_RANGES);
-
- // EII
- constructTable(EII, EII_RANGES);
-
- // AII
- constructTable(AII, AII_RANGES);
-
- // AII Value
- constructTable(NISTRING, NISTRING_RANGES);
-
- // Identifying string
- constructTable(ISTRING, ISTRING_RANGES);
-
- // Identifying string
- constructTable(ISTRING_PREFIX_NAMESPACE, ISTRING_PREFIX_NAMESPACE_RANGES);
-
- // UTF-8 NCNAME states
- constructTable(UTF8_NCNAME, UTF8_NCNAME_RANGES);
-
- // UTF-8 states
- constructTable(UTF8, UTF8_RANGES);
- }
-
- private DecoderStateTables() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/Encoder.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/Encoder.java
deleted file mode 100644
index ac549544..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/Encoder.java
+++ /dev/null
@@ -1,2594 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset;
-
-import com.sun.xml.internal.fastinfoset.algorithm.BuiltInEncodingAlgorithmFactory;
-import com.sun.xml.internal.fastinfoset.org.apache.xerces.util.XMLChar;
-import com.sun.xml.internal.fastinfoset.util.CharArrayIntMap;
-import com.sun.xml.internal.fastinfoset.util.KeyIntMap;
-import com.sun.xml.internal.fastinfoset.util.LocalNameQualifiedNamesMap;
-import com.sun.xml.internal.fastinfoset.util.StringIntMap;
-import com.sun.xml.internal.fastinfoset.vocab.SerializerVocabulary;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Map;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithm;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmIndexes;
-import com.sun.xml.internal.org.jvnet.fastinfoset.ExternalVocabulary;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSerializer;
-import com.sun.xml.internal.org.jvnet.fastinfoset.RestrictedAlphabet;
-import com.sun.xml.internal.org.jvnet.fastinfoset.VocabularyApplicationData;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Abstract encoder for developing concrete encoders.
- *
- * Concrete implementations extending Encoder will utilize methods on Encoder
- * to encode XML infoset according to the Fast Infoset standard. It is the
- * responsibility of the concrete implementation to ensure that methods are
- * invoked in the correct order to produce a valid fast infoset document.
- *
- * <p>
- * This class extends org.sax.xml.DefaultHandler so that concrete SAX
- * implementations can be used with javax.xml.parsers.SAXParser and the parse
- * methods that take org.sax.xml.DefaultHandler as a parameter.
- *
- * <p>
- * Buffering of octets that are written to an {@link java.io.OutputStream} is
- * supported in a similar manner to a {@link java.io.BufferedOutputStream}.
- * Combining buffering with encoding enables better performance.
- *
- * <p>
- * More than one fast infoset document may be encoded to the
- * {@link java.io.OutputStream}.
- *
- */
-public abstract class Encoder extends DefaultHandler implements FastInfosetSerializer {
-
- /**
- * Character encoding scheme system property for the encoding
- * of content and attribute values.
- */
- public static final String CHARACTER_ENCODING_SCHEME_SYSTEM_PROPERTY =
- "com.sun.xml.internal.fastinfoset.serializer.character-encoding-scheme";
-
- /**
- * Default character encoding scheme system property for the encoding
- * of content and attribute values.
- */
- protected static final String _characterEncodingSchemeSystemDefault = getDefaultEncodingScheme();
-
- private static String getDefaultEncodingScheme() {
- String p = System.getProperty(CHARACTER_ENCODING_SCHEME_SYSTEM_PROPERTY,
- UTF_8);
- if (p.equals(UTF_16BE)) {
- return UTF_16BE;
- } else {
- return UTF_8;
- }
- }
-
- private static int[] NUMERIC_CHARACTERS_TABLE;
-
- private static int[] DATE_TIME_CHARACTERS_TABLE;
-
- static {
- NUMERIC_CHARACTERS_TABLE = new int[maxCharacter(RestrictedAlphabet.NUMERIC_CHARACTERS) + 1];
- DATE_TIME_CHARACTERS_TABLE = new int[maxCharacter(RestrictedAlphabet.DATE_TIME_CHARACTERS) + 1];
-
- for (int i = 0; i < NUMERIC_CHARACTERS_TABLE.length ; i++) {
- NUMERIC_CHARACTERS_TABLE[i] = -1;
- }
- for (int i = 0; i < DATE_TIME_CHARACTERS_TABLE.length ; i++) {
- DATE_TIME_CHARACTERS_TABLE[i] = -1;
- }
-
- for (int i = 0; i < RestrictedAlphabet.NUMERIC_CHARACTERS.length() ; i++) {
- NUMERIC_CHARACTERS_TABLE[RestrictedAlphabet.NUMERIC_CHARACTERS.charAt(i)] = i;
- }
- for (int i = 0; i < RestrictedAlphabet.DATE_TIME_CHARACTERS.length() ; i++) {
- DATE_TIME_CHARACTERS_TABLE[RestrictedAlphabet.DATE_TIME_CHARACTERS.charAt(i)] = i;
- }
- }
-
- private static int maxCharacter(String alphabet) {
- int c = 0;
- for (int i = 0; i < alphabet.length() ; i++) {
- if (c < alphabet.charAt(i)) {
- c = alphabet.charAt(i);
- }
- }
-
- return c;
- }
-
- /**
- * True if DTD and internal subset shall be ignored.
- */
- private boolean _ignoreDTD;
-
- /**
- * True if comments shall be ignored.
- */
- private boolean _ignoreComments;
-
- /**
- * True if procesing instructions shall be ignored.
- */
- private boolean _ignoreProcessingInstructions;
-
- /**
- * True if white space characters for text content shall be ignored.
- */
- private boolean _ignoreWhiteSpaceTextContent;
-
- /**
- * True, if the local name string is used as the key to find the
- * associated set of qualified names.
- * <p>
- * False, if the <prefix>:<local name> string is used as the key
- * to find the associated set of qualified names.
- */
- private boolean _useLocalNameAsKeyForQualifiedNameLookup;
-
- /**
- * True if strings for text content and attribute values will be
- * UTF-8 encoded otherwise they will be UTF-16 encoded.
- */
- private boolean _encodingStringsAsUtf8 = true;
-
- /**
- * Encoding constant generated from the string encoding.
- */
- private int _nonIdentifyingStringOnThirdBitCES;
-
- /**
- * Encoding constant generated from the string encoding.
- */
- private int _nonIdentifyingStringOnFirstBitCES;
-
- /**
- * The map of URIs to algorithms.
- */
- private Map _registeredEncodingAlgorithms = new HashMap();
-
- /**
- * The vocabulary that is used by the encoder
- */
- protected SerializerVocabulary _v;
-
- /**
- * The vocabulary application data that is used by the encoder
- */
- protected VocabularyApplicationData _vData;
-
- /**
- * True if the vocubulary is internal to the encoder
- */
- private boolean _vIsInternal;
-
- /**
- * True if terminatation of an information item is required
- */
- protected boolean _terminate = false;
-
- /**
- * The current octet that is to be written.
- */
- protected int _b;
-
- /**
- * The {@link java.io.OutputStream} that the encoded XML infoset (the
- * fast infoset document) is written to.
- */
- protected OutputStream _s;
-
- /**
- * The internal buffer of characters used for the UTF-8 or UTF-16 encoding
- * of characters.
- */
- protected char[] _charBuffer = new char[512];
-
- /**
- * The internal buffer of bytes.
- */
- protected byte[] _octetBuffer = new byte[1024];
-
- /**
- * The current position in the internal buffer.
- */
- protected int _octetBufferIndex;
-
- /**
- * The current mark in the internal buffer.
- *
- * <p>
- * If the value of the mark is < 0 then the mark is not set.
- */
- protected int _markIndex = -1;
-
- /**
- * The minimum size of [normalized value] of Attribute Information
- * Items that will be indexed.
- */
- protected int minAttributeValueSize = FastInfosetSerializer.MIN_ATTRIBUTE_VALUE_SIZE;
-
- /**
- * The maximum size of [normalized value] of Attribute Information
- * Items that will be indexed.
- */
- protected int maxAttributeValueSize = FastInfosetSerializer.MAX_ATTRIBUTE_VALUE_SIZE;
-
- /**
- * The limit on the size of indexed Map for attribute values
- * Limit is measured in characters number
- */
- protected int attributeValueMapTotalCharactersConstraint = FastInfosetSerializer.ATTRIBUTE_VALUE_MAP_MEMORY_CONSTRAINT / 2;
-
- /**
- * The minimum size of character content chunks
- * of Character Information Items or Comment Information Items that
- * will be indexed.
- */
- protected int minCharacterContentChunkSize = FastInfosetSerializer.MIN_CHARACTER_CONTENT_CHUNK_SIZE;
-
- /**
- * The maximum size of character content chunks
- * of Character Information Items or Comment Information Items that
- * will be indexed.
- */
- protected int maxCharacterContentChunkSize = FastInfosetSerializer.MAX_CHARACTER_CONTENT_CHUNK_SIZE;
-
- /**
- * The limit on the size of indexed Map for character content chunks
- * Limit is measured in characters number
- */
- protected int characterContentChunkMapTotalCharactersConstraint = FastInfosetSerializer.CHARACTER_CONTENT_CHUNK_MAP_MEMORY_CONSTRAINT / 2;
-
- /**
- * Default constructor for the Encoder.
- */
- protected Encoder() {
- setCharacterEncodingScheme(_characterEncodingSchemeSystemDefault);
- }
-
- protected Encoder(boolean useLocalNameAsKeyForQualifiedNameLookup) {
- setCharacterEncodingScheme(_characterEncodingSchemeSystemDefault);
- _useLocalNameAsKeyForQualifiedNameLookup = useLocalNameAsKeyForQualifiedNameLookup;
- }
-
-
- // FastInfosetSerializer interface
-
- /**
- * {@inheritDoc}
- */
- public final void setIgnoreDTD(boolean ignoreDTD) {
- _ignoreDTD = ignoreDTD;
- }
-
- /**
- * {@inheritDoc}
- */
- public final boolean getIgnoreDTD() {
- return _ignoreDTD;
- }
-
- /**
- * {@inheritDoc}
- */
- public final void setIgnoreComments(boolean ignoreComments) {
- _ignoreComments = ignoreComments;
- }
-
- /**
- * {@inheritDoc}
- */
- public final boolean getIgnoreComments() {
- return _ignoreComments;
- }
-
- /**
- * {@inheritDoc}
- */
- public final void setIgnoreProcesingInstructions(boolean
- ignoreProcesingInstructions) {
- _ignoreProcessingInstructions = ignoreProcesingInstructions;
- }
-
- /**
- * {@inheritDoc}
- */
- public final boolean getIgnoreProcesingInstructions() {
- return _ignoreProcessingInstructions;
- }
-
- /**
- * {@inheritDoc}
- */
- public final void setIgnoreWhiteSpaceTextContent(boolean ignoreWhiteSpaceTextContent) {
- _ignoreWhiteSpaceTextContent = ignoreWhiteSpaceTextContent;
- }
-
- /**
- * {@inheritDoc}
- */
- public final boolean getIgnoreWhiteSpaceTextContent() {
- return _ignoreWhiteSpaceTextContent;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setCharacterEncodingScheme(String characterEncodingScheme) {
- if (characterEncodingScheme.equals(UTF_16BE)) {
- _encodingStringsAsUtf8 = false;
- _nonIdentifyingStringOnThirdBitCES = EncodingConstants.CHARACTER_CHUNK | EncodingConstants.CHARACTER_CHUNK_UTF_16_FLAG;
- _nonIdentifyingStringOnFirstBitCES = EncodingConstants.NISTRING_UTF_16_FLAG;
- } else {
- _encodingStringsAsUtf8 = true;
- _nonIdentifyingStringOnThirdBitCES = EncodingConstants.CHARACTER_CHUNK;
- _nonIdentifyingStringOnFirstBitCES = 0;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public String getCharacterEncodingScheme() {
- return (_encodingStringsAsUtf8) ? UTF_8 : UTF_16BE;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setRegisteredEncodingAlgorithms(Map algorithms) {
- _registeredEncodingAlgorithms = algorithms;
- if (_registeredEncodingAlgorithms == null) {
- _registeredEncodingAlgorithms = new HashMap();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public Map getRegisteredEncodingAlgorithms() {
- return _registeredEncodingAlgorithms;
- }
-
- /**
- * {@inheritDoc}
- */
- public int getMinCharacterContentChunkSize() {
- return minCharacterContentChunkSize;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setMinCharacterContentChunkSize(int size) {
- if (size < 0 ) {
- size = 0;
- }
-
- minCharacterContentChunkSize = size;
- }
-
- /**
- * {@inheritDoc}
- */
- public int getMaxCharacterContentChunkSize() {
- return maxCharacterContentChunkSize;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setMaxCharacterContentChunkSize(int size) {
- if (size < 0 ) {
- size = 0;
- }
-
- maxCharacterContentChunkSize = size;
- }
-
- /**
- * {@inheritDoc}
- */
- public int getCharacterContentChunkMapMemoryLimit() {
- return characterContentChunkMapTotalCharactersConstraint * 2;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setCharacterContentChunkMapMemoryLimit(int size) {
- if (size < 0 ) {
- size = 0;
- }
-
- characterContentChunkMapTotalCharactersConstraint = size / 2;
- }
-
- /**
- * Checks whether character content chunk (its length) matches length limit
- *
- * @param length the length of character content chunk is checking to be added to Map.
- * @return whether character content chunk length matches limit
- */
- public boolean isCharacterContentChunkLengthMatchesLimit(int length) {
- return length >= minCharacterContentChunkSize &&
- length < maxCharacterContentChunkSize;
- }
-
- /**
- * Checks whether character content table has enough memory to
- * store character content chunk with the given length
- *
- * @param length the length of character content chunk is checking to be added to Map.
- * @param map the custom CharArrayIntMap, which memory limits will be checked.
- * @return whether character content map has enough memory
- */
- public boolean canAddCharacterContentToTable(int length, CharArrayIntMap map) {
- return map.getTotalCharacterCount() + length <
- characterContentChunkMapTotalCharactersConstraint;
- }
-
- /**
- * {@inheritDoc}
- */
- public int getMinAttributeValueSize() {
- return minAttributeValueSize;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setMinAttributeValueSize(int size) {
- if (size < 0 ) {
- size = 0;
- }
-
- minAttributeValueSize = size;
- }
-
- /**
- * {@inheritDoc}
- */
- public int getMaxAttributeValueSize() {
- return maxAttributeValueSize;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setMaxAttributeValueSize(int size) {
- if (size < 0 ) {
- size = 0;
- }
-
- maxAttributeValueSize = size;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setAttributeValueMapMemoryLimit(int size) {
- if (size < 0 ) {
- size = 0;
- }
-
- attributeValueMapTotalCharactersConstraint = size / 2;
-
- }
-
- /**
- * {@inheritDoc}
- */
- public int getAttributeValueMapMemoryLimit() {
- return attributeValueMapTotalCharactersConstraint * 2;
- }
-
- /**
- * Checks whether attribute value (its length) matches length limit
- *
- * @param length the length of attribute
- * @return whether attribute value matches limit
- */
- public boolean isAttributeValueLengthMatchesLimit(int length) {
- return length >= minAttributeValueSize &&
- length < maxAttributeValueSize;
- }
-
- /**
- * Checks whether attribute table has enough memory to
- * store attribute value with the given length
- *
- * @param length the length of attribute value is checking to be added to Map.
- * @return whether attribute map has enough memory
- */
- public boolean canAddAttributeToTable(int length) {
- return _v.attributeValue.getTotalCharacterCount() + length <
- attributeValueMapTotalCharactersConstraint;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setExternalVocabulary(ExternalVocabulary v) {
- // Create internal serializer vocabulary
- _v = new SerializerVocabulary();
- // Set the external vocabulary
- SerializerVocabulary ev = new SerializerVocabulary(v.vocabulary,
- _useLocalNameAsKeyForQualifiedNameLookup);
- _v.setExternalVocabulary(v.URI,
- ev, false);
-
- _vIsInternal = true;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setVocabularyApplicationData(VocabularyApplicationData data) {
- _vData = data;
- }
-
- /**
- * {@inheritDoc}
- */
- public VocabularyApplicationData getVocabularyApplicationData() {
- return _vData;
- }
-
- // End of FastInfosetSerializer interface
-
- /**
- * Reset the encoder for reuse encoding another XML infoset.
- */
- public void reset() {
- _terminate = false;
- }
-
- /**
- * Set the OutputStream to encode the XML infoset to a
- * fast infoset document.
- *
- * @param s the OutputStream where the fast infoset document is written to.
- */
- public void setOutputStream(OutputStream s) {
- _octetBufferIndex = 0;
- _markIndex = -1;
- _s = s;
- }
-
- /**
- * Set the SerializerVocabulary to be used for encoding.
- *
- * @param vocabulary the vocabulary to be used for encoding.
- */
- public void setVocabulary(SerializerVocabulary vocabulary) {
- _v = vocabulary;
- _vIsInternal = false;
- }
-
- /**
- * Encode the header of a fast infoset document.
- *
- * @param encodeXmlDecl true if the XML declaration should be encoded.
- */
- protected final void encodeHeader(boolean encodeXmlDecl) throws IOException {
- if (encodeXmlDecl) {
- _s.write(EncodingConstants.XML_DECLARATION_VALUES[0]);
- }
- _s.write(EncodingConstants.BINARY_HEADER);
- }
-
- /**
- * Encode the initial vocabulary of a fast infoset document.
- *
- */
- protected final void encodeInitialVocabulary() throws IOException {
- if (_v == null) {
- _v = new SerializerVocabulary();
- _vIsInternal = true;
- } else if (_vIsInternal) {
- _v.clear();
- if (_vData != null)
- _vData.clear();
- }
-
- if (!_v.hasInitialVocabulary() && !_v.hasExternalVocabulary()) {
- write(0);
- } else if (_v.hasInitialVocabulary()) {
- _b = EncodingConstants.DOCUMENT_INITIAL_VOCABULARY_FLAG;
- write(_b);
-
- SerializerVocabulary initialVocabulary = _v.getReadOnlyVocabulary();
-
- // TODO check for contents of vocabulary to assign bits
- if (initialVocabulary.hasExternalVocabulary()) {
- _b = EncodingConstants.INITIAL_VOCABULARY_EXTERNAL_VOCABULARY_FLAG;
- write(_b);
- write(0);
- }
-
- if (initialVocabulary.hasExternalVocabulary()) {
- encodeNonEmptyOctetStringOnSecondBit(_v.getExternalVocabularyURI());
- }
-
- // TODO check for contents of vocabulary to encode values
- } else if (_v.hasExternalVocabulary()) {
- _b = EncodingConstants.DOCUMENT_INITIAL_VOCABULARY_FLAG;
- write(_b);
-
- _b = EncodingConstants.INITIAL_VOCABULARY_EXTERNAL_VOCABULARY_FLAG;
- write(_b);
- write(0);
-
- encodeNonEmptyOctetStringOnSecondBit(_v.getExternalVocabularyURI());
- }
- }
-
- /**
- * Encode the termination of the Document Information Item.
- *
- */
- protected final void encodeDocumentTermination() throws IOException {
- encodeElementTermination();
- encodeTermination();
- _flush();
- _s.flush();
- }
-
- /**
- * Encode the termination of an Element Information Item.
- *
- */
- protected final void encodeElementTermination() throws IOException {
- _terminate = true;
- switch (_b) {
- case EncodingConstants.TERMINATOR:
- _b = EncodingConstants.DOUBLE_TERMINATOR;
- break;
- case EncodingConstants.DOUBLE_TERMINATOR:
- write(EncodingConstants.DOUBLE_TERMINATOR);
- default:
- _b = EncodingConstants.TERMINATOR;
- }
- }
-
- /**
- * Encode a termination if required.
- *
- */
- protected final void encodeTermination() throws IOException {
- if (_terminate) {
- write(_b);
- _b = 0;
- _terminate = false;
- }
- }
-
- /**
- * Encode a Attribute Information Item that is a namespace declaration.
- *
- * @param prefix the prefix of the namespace declaration,
- * if "" then there is no prefix for the namespace declaration.
- * @param uri the URI of the namespace declaration,
- * if "" then there is no URI for the namespace declaration.
- */
- protected final void encodeNamespaceAttribute(String prefix, String uri) throws IOException {
- _b = EncodingConstants.NAMESPACE_ATTRIBUTE;
- if (prefix.length() > 0) {
- _b |= EncodingConstants.NAMESPACE_ATTRIBUTE_PREFIX_FLAG;
- }
- if (uri.length() > 0) {
- _b |= EncodingConstants.NAMESPACE_ATTRIBUTE_NAME_FLAG;
- }
-
- // NOTE a prefix with out a namespace name is an undeclaration
- // of the namespace bound to the prefix
- // TODO needs to investigate how the startPrefixMapping works in
- // relation to undeclaration
-
- write(_b);
-
- if (prefix.length() > 0) {
- encodeIdentifyingNonEmptyStringOnFirstBit(prefix, _v.prefix);
- }
- if (uri.length() > 0) {
- encodeIdentifyingNonEmptyStringOnFirstBit(uri, _v.namespaceName);
- }
- }
-
- /**
- * Encode a chunk of Character Information Items.
- *
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- * @throws ArrayIndexOutOfBoundsException.
- */
- protected final void encodeCharacters(char[] ch, int offset, int length) throws IOException {
- final boolean addToTable = isCharacterContentChunkLengthMatchesLimit(length);
- encodeNonIdentifyingStringOnThirdBit(ch, offset, length, _v.characterContentChunk, addToTable, true);
- }
-
- /**
- * Encode a chunk of Character Information Items.
- *
- * If the array of characters is to be indexed (as determined by
- * {@link Encoder#characterContentChunkSizeContraint}) then the array is not cloned
- * when adding the array to the vocabulary.
- *
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- * @throws ArrayIndexOutOfBoundsException.
- */
- protected final void encodeCharactersNoClone(char[] ch, int offset, int length) throws IOException {
- final boolean addToTable = isCharacterContentChunkLengthMatchesLimit(length);
- encodeNonIdentifyingStringOnThirdBit(ch, offset, length, _v.characterContentChunk, addToTable, false);
- }
-
- /**
- * Encode a chunk of Character Information Items using a numeric
- * alphabet that results in the encoding of a character in 4 bits
- * (or two characters per octet).
- *
- * @param id the restricted alphabet identifier.
- * @param table the table mapping characters to 4 bit values.
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- * @param addToTable if characters should be added to table.
- * @throws ArrayIndexOutOfBoundsException.
- */
- protected final void encodeNumericFourBitCharacters(char[] ch, int offset, int length,
- boolean addToTable) throws FastInfosetException, IOException {
- encodeFourBitCharacters(RestrictedAlphabet.NUMERIC_CHARACTERS_INDEX,
- NUMERIC_CHARACTERS_TABLE, ch, offset, length, addToTable);
- }
-
- /**
- * Encode a chunk of Character Information Items using a date-time
- * alphabet that results in the encoding of a character in 4 bits
- * (or two characters per octet).
- *
- * @param id the restricted alphabet identifier.
- * @param table the table mapping characters to 4 bit values.
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- * @param addToTable if characters should be added to table.
- * @throws ArrayIndexOutOfBoundsException.
- */
- protected final void encodeDateTimeFourBitCharacters(char[] ch, int offset, int length,
- boolean addToTable) throws FastInfosetException, IOException {
- encodeFourBitCharacters(RestrictedAlphabet.DATE_TIME_CHARACTERS_INDEX,
- DATE_TIME_CHARACTERS_TABLE, ch, offset, length, addToTable);
- }
-
- /**
- * Encode a chunk of Character Information Items using a restricted
- * alphabet that results in the encoding of a character in 4 bits
- * (or two characters per octet).
- *
- * @param id the restricted alphabet identifier.
- * @param table the table mapping characters to 4 bit values.
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- * @param addToTable if characters should be added to table.
- * @throws ArrayIndexOutOfBoundsException.
- */
- protected final void encodeFourBitCharacters(int id, int[] table, char[] ch, int offset, int length,
- boolean addToTable) throws FastInfosetException, IOException {
- if (addToTable) {
- // if char array could be added to table
- boolean canAddCharacterContentToTable =
- canAddCharacterContentToTable(length, _v.characterContentChunk);
-
- // obtain/get index
- int index = canAddCharacterContentToTable ?
- _v.characterContentChunk.obtainIndex(ch, offset, length, true) :
- _v.characterContentChunk.get(ch, offset, length);
-
- if (index != KeyIntMap.NOT_PRESENT) {
- // if char array is in table
- _b = EncodingConstants.CHARACTER_CHUNK | 0x20;
- encodeNonZeroIntegerOnFourthBit(index);
- return;
- } else if (canAddCharacterContentToTable) {
- // if char array is not in table, but could be added
- _b = EncodingConstants.CHARACTER_CHUNK | EncodingConstants.CHARACTER_CHUNK_RESTRICTED_ALPHABET_FLAG | EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG;
- } else {
- // if char array is not in table and could not be added
- _b = EncodingConstants.CHARACTER_CHUNK | EncodingConstants.CHARACTER_CHUNK_RESTRICTED_ALPHABET_FLAG;
- }
- } else {
- _b = EncodingConstants.CHARACTER_CHUNK | EncodingConstants.CHARACTER_CHUNK_RESTRICTED_ALPHABET_FLAG;
- }
-
- write (_b);
-
- // Encode bottom 6 bits of enoding algorithm id
- _b = id << 2;
-
- encodeNonEmptyFourBitCharacterStringOnSeventhBit(table, ch, offset, length);
- }
-
- /**
- * Encode a chunk of Character Information Items using a restricted
- * alphabet table.
- *
- * @param alphabet the alphabet defining the mapping between characters and
- * integer values.
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- * @param addToTable if characters should be added to table
- * @throws ArrayIndexOutOfBoundsException.
- * @throws FastInfosetException if the alphabet is not present in the
- * vocabulary.
- */
- protected final void encodeAlphabetCharacters(String alphabet, char[] ch, int offset, int length,
- boolean addToTable) throws FastInfosetException, IOException {
- if (addToTable) {
- // if char array could be added to table
- boolean canAddCharacterContentToTable =
- canAddCharacterContentToTable(length, _v.characterContentChunk);
-
- // obtain/get index
- int index = canAddCharacterContentToTable ?
- _v.characterContentChunk.obtainIndex(ch, offset, length, true) :
- _v.characterContentChunk.get(ch, offset, length);
-
- if (index != KeyIntMap.NOT_PRESENT) {
- // if char array is in table
- _b = EncodingConstants.CHARACTER_CHUNK | 0x20;
- encodeNonZeroIntegerOnFourthBit(index);
- return;
- } else if (canAddCharacterContentToTable) {
- // if char array is not in table, but could be added
- _b = EncodingConstants.CHARACTER_CHUNK | EncodingConstants.CHARACTER_CHUNK_RESTRICTED_ALPHABET_FLAG | EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG;
- } else {
- // if char array is not in table and could not be added
- _b = EncodingConstants.CHARACTER_CHUNK | EncodingConstants.CHARACTER_CHUNK_RESTRICTED_ALPHABET_FLAG;
- }
- } else {
- _b = EncodingConstants.CHARACTER_CHUNK | EncodingConstants.CHARACTER_CHUNK_RESTRICTED_ALPHABET_FLAG;
- }
-
- int id = _v.restrictedAlphabet.get(alphabet);
- if (id == KeyIntMap.NOT_PRESENT) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.restrictedAlphabetNotPresent"));
- }
- id += EncodingConstants.RESTRICTED_ALPHABET_APPLICATION_START;
-
- _b |= (id & 0xC0) >> 6;
- write(_b);
-
- // Encode bottom 6 bits of enoding algorithm id
- _b = (id & 0x3F) << 2;
-
- encodeNonEmptyNBitCharacterStringOnSeventhBit(alphabet, ch, offset, length);
- }
-
- /**
- * Encode a Processing Instruction Information Item.
- *
- * @param target the target of the processing instruction.
- * @param data the data of the processing instruction.
- */
- protected final void encodeProcessingInstruction(String target, String data) throws IOException {
- write(EncodingConstants.PROCESSING_INSTRUCTION);
-
- // Target
- encodeIdentifyingNonEmptyStringOnFirstBit(target, _v.otherNCName);
-
- // Data
- boolean addToTable = isCharacterContentChunkLengthMatchesLimit(data.length());
- encodeNonIdentifyingStringOnFirstBit(data, _v.otherString, addToTable);
- }
-
- /**
- * Encode a Document Type Declaration.
- *
- * @param systemId the system identifier of the external subset.
- * @param publicId the public identifier of the external subset.
- */
- protected final void encodeDocumentTypeDeclaration(String systemId, String publicId) throws IOException {
- _b = EncodingConstants.DOCUMENT_TYPE_DECLARATION;
- if (systemId != null && systemId.length() > 0) {
- _b |= EncodingConstants.DOCUMENT_TYPE_SYSTEM_IDENTIFIER_FLAG;
- }
- if (publicId != null && publicId.length() > 0) {
- _b |= EncodingConstants.DOCUMENT_TYPE_PUBLIC_IDENTIFIER_FLAG;
- }
- write(_b);
-
- if (systemId != null && systemId.length() > 0) {
- encodeIdentifyingNonEmptyStringOnFirstBit(systemId, _v.otherURI);
- }
- if (publicId != null && publicId.length() > 0) {
- encodeIdentifyingNonEmptyStringOnFirstBit(publicId, _v.otherURI);
- }
- }
-
- /**
- * Encode a Comment Information Item.
- *
- * @param ch the array of characters that is as comment.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- * @throws ArrayIndexOutOfBoundsException.
- */
- protected final void encodeComment(char[] ch, int offset, int length) throws IOException {
- write(EncodingConstants.COMMENT);
-
- boolean addToTable = isCharacterContentChunkLengthMatchesLimit(length);
- encodeNonIdentifyingStringOnFirstBit(ch, offset, length, _v.otherString, addToTable, true);
- }
-
- /**
- * Encode a Comment Information Item.
- *
- * If the array of characters that is a comment is to be indexed (as
- * determined by {@link Encoder#characterContentChunkSizeContraint}) then
- * the array is not cloned when adding the array to the vocabulary.
- *
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- * @throws ArrayIndexOutOfBoundsException.
- */
- protected final void encodeCommentNoClone(char[] ch, int offset, int length) throws IOException {
- write(EncodingConstants.COMMENT);
-
- boolean addToTable = isCharacterContentChunkLengthMatchesLimit(length);
- encodeNonIdentifyingStringOnFirstBit(ch, offset, length, _v.otherString, addToTable, false);
- }
-
- /**
- * Encode a qualified name of an Element Informaiton Item on the third bit
- * of an octet.
- * Implementation of clause C.18 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * <p>
- * The index of the qualified name will be encoded if the name is present
- * in the vocabulary otherwise the qualified name will be encoded literally
- * (see {@link #encodeLiteralElementQualifiedNameOnThirdBit}).
- *
- * @param namespaceURI the namespace URI of the qualified name.
- * @param prefix the prefix of the qualified name.
- * @param localName the local name of the qualified name.
- */
- protected final void encodeElementQualifiedNameOnThirdBit(String namespaceURI, String prefix, String localName) throws IOException {
- LocalNameQualifiedNamesMap.Entry entry = _v.elementName.obtainEntry(localName);
- if (entry._valueIndex > 0) {
- QualifiedName[] names = entry._value;
- for (int i = 0; i < entry._valueIndex; i++) {
- if ((prefix == names[i].prefix || prefix.equals(names[i].prefix))
- && (namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) {
- encodeNonZeroIntegerOnThirdBit(names[i].index);
- return;
- }
- }
- }
-
- encodeLiteralElementQualifiedNameOnThirdBit(namespaceURI, prefix,
- localName, entry);
- }
-
- /**
- * Encode a literal qualified name of an Element Informaiton Item on the
- * third bit of an octet.
- * Implementation of clause C.18 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param namespaceURI the namespace URI of the qualified name.
- * @param prefix the prefix of the qualified name.
- * @param localName the local name of the qualified name.
- */
- protected final void encodeLiteralElementQualifiedNameOnThirdBit(String namespaceURI, String prefix, String localName,
- LocalNameQualifiedNamesMap.Entry entry) throws IOException {
- QualifiedName name = new QualifiedName(prefix, namespaceURI, localName, "", _v.elementName.getNextIndex());
- entry.addQualifiedName(name);
-
- int namespaceURIIndex = KeyIntMap.NOT_PRESENT;
- int prefixIndex = KeyIntMap.NOT_PRESENT;
- if (namespaceURI.length() > 0) {
- namespaceURIIndex = _v.namespaceName.get(namespaceURI);
- if (namespaceURIIndex == KeyIntMap.NOT_PRESENT) {
- throw new IOException(CommonResourceBundle.getInstance().getString("message.namespaceURINotIndexed", new Object[]{namespaceURI}));
- }
-
- if (prefix.length() > 0) {
- prefixIndex = _v.prefix.get(prefix);
- if (prefixIndex == KeyIntMap.NOT_PRESENT) {
- throw new IOException(CommonResourceBundle.getInstance().getString("message.prefixNotIndexed", new Object[]{prefix}));
- }
- }
- }
-
- int localNameIndex = _v.localName.obtainIndex(localName);
-
- _b |= EncodingConstants.ELEMENT_LITERAL_QNAME_FLAG;
- if (namespaceURIIndex >= 0) {
- _b |= EncodingConstants.LITERAL_QNAME_NAMESPACE_NAME_FLAG;
- if (prefixIndex >= 0) {
- _b |= EncodingConstants.LITERAL_QNAME_PREFIX_FLAG;
- }
- }
- write(_b);
-
- if (namespaceURIIndex >= 0) {
- if (prefixIndex >= 0) {
- encodeNonZeroIntegerOnSecondBitFirstBitOne(prefixIndex);
- }
- encodeNonZeroIntegerOnSecondBitFirstBitOne(namespaceURIIndex);
- }
-
- if (localNameIndex >= 0) {
- encodeNonZeroIntegerOnSecondBitFirstBitOne(localNameIndex);
- } else {
- encodeNonEmptyOctetStringOnSecondBit(localName);
- }
- }
-
- /**
- * Encode a qualified name of an Attribute Informaiton Item on the third bit
- * of an octet.
- * Implementation of clause C.17 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * <p>
- * The index of the qualified name will be encoded if the name is present
- * in the vocabulary otherwise the qualified name will be encoded literally
- * (see {@link #encodeLiteralAttributeQualifiedNameOnSecondBit}).
- *
- * @param namespaceURI the namespace URI of the qualified name.
- * @param prefix the prefix of the qualified name.
- * @param localName the local name of the qualified name.
- */
- protected final void encodeAttributeQualifiedNameOnSecondBit(String namespaceURI, String prefix, String localName) throws IOException {
- LocalNameQualifiedNamesMap.Entry entry = _v.attributeName.obtainEntry(localName);
- if (entry._valueIndex > 0) {
- QualifiedName[] names = entry._value;
- for (int i = 0; i < entry._valueIndex; i++) {
- if ((prefix == names[i].prefix || prefix.equals(names[i].prefix))
- && (namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) {
- encodeNonZeroIntegerOnSecondBitFirstBitZero(names[i].index);
- return;
- }
- }
- }
-
- encodeLiteralAttributeQualifiedNameOnSecondBit(namespaceURI, prefix,
- localName, entry);
- }
-
- /**
- * Encode a literal qualified name of an Attribute Informaiton Item on the
- * third bit of an octet.
- * Implementation of clause C.17 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param namespaceURI the namespace URI of the qualified name.
- * @param prefix the prefix of the qualified name.
- * @param localName the local name of the qualified name.
- */
- protected final boolean encodeLiteralAttributeQualifiedNameOnSecondBit(String namespaceURI, String prefix, String localName,
- LocalNameQualifiedNamesMap.Entry entry) throws IOException {
- int namespaceURIIndex = KeyIntMap.NOT_PRESENT;
- int prefixIndex = KeyIntMap.NOT_PRESENT;
- if (namespaceURI.length() > 0) {
- namespaceURIIndex = _v.namespaceName.get(namespaceURI);
- if (namespaceURIIndex == KeyIntMap.NOT_PRESENT) {
- if (namespaceURI == EncodingConstants.XMLNS_NAMESPACE_NAME ||
- namespaceURI.equals(EncodingConstants.XMLNS_NAMESPACE_NAME)) {
- return false;
- } else {
- throw new IOException(CommonResourceBundle.getInstance().getString("message.namespaceURINotIndexed", new Object[]{namespaceURI}));
- }
- }
-
- if (prefix.length() > 0) {
- prefixIndex = _v.prefix.get(prefix);
- if (prefixIndex == KeyIntMap.NOT_PRESENT) {
- throw new IOException(CommonResourceBundle.getInstance().getString("message.prefixNotIndexed", new Object[]{prefix}));
- }
- }
- }
-
- int localNameIndex = _v.localName.obtainIndex(localName);
-
- QualifiedName name = new QualifiedName(prefix, namespaceURI, localName, "", _v.attributeName.getNextIndex());
- entry.addQualifiedName(name);
-
- _b = EncodingConstants.ATTRIBUTE_LITERAL_QNAME_FLAG;
- if (namespaceURI.length() > 0) {
- _b |= EncodingConstants.LITERAL_QNAME_NAMESPACE_NAME_FLAG;
- if (prefix.length() > 0) {
- _b |= EncodingConstants.LITERAL_QNAME_PREFIX_FLAG;
- }
- }
-
- write(_b);
-
- if (namespaceURIIndex >= 0) {
- if (prefixIndex >= 0) {
- encodeNonZeroIntegerOnSecondBitFirstBitOne(prefixIndex);
- }
- encodeNonZeroIntegerOnSecondBitFirstBitOne(namespaceURIIndex);
- } else if (namespaceURI != "") {
- // XML prefix and namespace name
- encodeNonEmptyOctetStringOnSecondBit("xml");
- encodeNonEmptyOctetStringOnSecondBit("http://www.w3.org/XML/1998/namespace");
- }
-
- if (localNameIndex >= 0) {
- encodeNonZeroIntegerOnSecondBitFirstBitOne(localNameIndex);
- } else {
- encodeNonEmptyOctetStringOnSecondBit(localName);
- }
-
- return true;
- }
-
- /**
- * Encode a non identifying string on the first bit of an octet.
- * Implementation of clause C.14 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param s the string to encode
- * @param map the vocabulary table of strings to indexes.
- * @param addToTable true if the string could be added to the vocabulary
- * table (if table has enough memory)
- * @param mustBeAddedToTable true if the string must be added to the vocabulary
- * table (if not already present in the table).
- */
- protected final void encodeNonIdentifyingStringOnFirstBit(String s, StringIntMap map,
- boolean addToTable, boolean mustBeAddedToTable) throws IOException {
- if (s == null || s.length() == 0) {
- // C.26 an index (first bit '1') with seven '1' bits for an empty string
- write(0xFF);
- } else {
- if (addToTable || mustBeAddedToTable) {
- // if attribute value could be added to table
- boolean canAddAttributeToTable = mustBeAddedToTable ||
- canAddAttributeToTable(s.length());
-
- // obtain/get index
- int index = canAddAttributeToTable ?
- map.obtainIndex(s) :
- map.get(s);
-
- if (index != KeyIntMap.NOT_PRESENT) {
- // if attribute value is in table
- encodeNonZeroIntegerOnSecondBitFirstBitOne(index);
- } else if (canAddAttributeToTable) {
- // if attribute value is not in table, but could be added
- _b = EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG |
- _nonIdentifyingStringOnFirstBitCES;
- encodeNonEmptyCharacterStringOnFifthBit(s);
- } else {
- // if attribute value is not in table and could not be added
- _b = _nonIdentifyingStringOnFirstBitCES;
- encodeNonEmptyCharacterStringOnFifthBit(s);
- }
- } else {
- _b = _nonIdentifyingStringOnFirstBitCES;
- encodeNonEmptyCharacterStringOnFifthBit(s);
- }
- }
- }
-
- /**
- * Encode a non identifying string on the first bit of an octet.
- * Implementation of clause C.14 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param s the string to encode
- * @param map the vocabulary table of character arrays to indexes.
- * @param addToTable true if the string should be added to the vocabulary
- * table (if not already present in the table).
- */
- protected final void encodeNonIdentifyingStringOnFirstBit(String s, CharArrayIntMap map, boolean addToTable) throws IOException {
- if (s == null || s.length() == 0) {
- // C.26 an index (first bit '1') with seven '1' bits for an empty string
- write(0xFF);
- } else {
- if (addToTable) {
- final char[] ch = s.toCharArray();
- final int length = s.length();
-
- // if char array could be added to table
- boolean canAddCharacterContentToTable =
- canAddCharacterContentToTable(length, map);
-
- // obtain/get index
- int index = canAddCharacterContentToTable ?
- map.obtainIndex(ch, 0, length, false) :
- map.get(ch, 0, length);
-
- if (index != KeyIntMap.NOT_PRESENT) {
- // if char array is in table
- encodeNonZeroIntegerOnSecondBitFirstBitOne(index);
- } else if (canAddCharacterContentToTable) {
- // if char array is not in table, but could be added
- _b = EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG |
- _nonIdentifyingStringOnFirstBitCES;
- encodeNonEmptyCharacterStringOnFifthBit(ch, 0, length);
- } else {
- // if char array is not in table and could not be added
- _b = _nonIdentifyingStringOnFirstBitCES;
- encodeNonEmptyCharacterStringOnFifthBit(s);
- }
- } else {
- _b = _nonIdentifyingStringOnFirstBitCES;
- encodeNonEmptyCharacterStringOnFifthBit(s);
- }
- }
- }
-
- /**
- * Encode a non identifying string on the first bit of an octet.
- * Implementation of clause C.14 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- * @param map the vocabulary table of character arrays to indexes.
- * @param addToTable true if the string should be added to the vocabulary
- * table (if not already present in the table).
- * @param clone true if the array of characters should be cloned if added
- * to the vocabulary table.
- */
- protected final void encodeNonIdentifyingStringOnFirstBit(char[] ch, int offset, int length, CharArrayIntMap map,
- boolean addToTable, boolean clone) throws IOException {
- if (length == 0) {
- // C.26 an index (first bit '1') with seven '1' bits for an empty string
- write(0xFF);
- } else {
- if (addToTable) {
- // if char array could be added to table
- boolean canAddCharacterContentToTable =
- canAddCharacterContentToTable(length, map);
-
- // obtain/get index
- int index = canAddCharacterContentToTable ?
- map.obtainIndex(ch, offset, length, clone) :
- map.get(ch, offset, length);
-
- if (index != KeyIntMap.NOT_PRESENT) {
- // if char array is in table
- encodeNonZeroIntegerOnSecondBitFirstBitOne(index);
- } else if (canAddCharacterContentToTable) {
- // if char array is not in table, but could be added
- _b = EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG |
- _nonIdentifyingStringOnFirstBitCES;
- encodeNonEmptyCharacterStringOnFifthBit(ch, offset, length);
- } else {
- // if char array is not in table and could not be added
- _b = _nonIdentifyingStringOnFirstBitCES;
- encodeNonEmptyCharacterStringOnFifthBit(ch, offset, length);
- }
- } else {
- _b = _nonIdentifyingStringOnFirstBitCES;
- encodeNonEmptyCharacterStringOnFifthBit(ch, offset, length);
- }
- }
- }
-
- protected final void encodeNumericNonIdentifyingStringOnFirstBit(
- String s, boolean addToTable, boolean mustBeAddedToTable)
- throws IOException, FastInfosetException {
- encodeNonIdentifyingStringOnFirstBit(
- RestrictedAlphabet.NUMERIC_CHARACTERS_INDEX,
- NUMERIC_CHARACTERS_TABLE, s, addToTable,
- mustBeAddedToTable);
- }
-
- protected final void encodeDateTimeNonIdentifyingStringOnFirstBit(
- String s, boolean addToTable, boolean mustBeAddedToTable)
- throws IOException, FastInfosetException {
- encodeNonIdentifyingStringOnFirstBit(
- RestrictedAlphabet.DATE_TIME_CHARACTERS_INDEX,
- DATE_TIME_CHARACTERS_TABLE, s, addToTable,
- mustBeAddedToTable);
- }
-
- protected final void encodeNonIdentifyingStringOnFirstBit(int id, int[] table,
- String s, boolean addToTable, boolean mustBeAddedToTable)
- throws IOException, FastInfosetException {
- if (s == null || s.length() == 0) {
- // C.26 an index (first bit '1') with seven '1' bits for an empty string
- write(0xFF);
- return;
- }
-
- if (addToTable || mustBeAddedToTable) {
- // if attribute value could be added to table
- boolean canAddAttributeToTable = mustBeAddedToTable ||
- canAddAttributeToTable(s.length());
-
- // obtain/get index
- int index = canAddAttributeToTable ?
- _v.attributeValue.obtainIndex(s) :
- _v.attributeValue.get(s);
-
- if (index != KeyIntMap.NOT_PRESENT) {
- // if attribute value is in table
- encodeNonZeroIntegerOnSecondBitFirstBitOne(index);
- return;
- } else if (canAddAttributeToTable) {
- // if attribute value is not in table, but could be added
- _b = EncodingConstants.NISTRING_RESTRICTED_ALPHABET_FLAG |
- EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG;
- } else {
- // if attribute value is not in table and could not be added
- _b = EncodingConstants.NISTRING_RESTRICTED_ALPHABET_FLAG;
- }
- } else {
- _b = EncodingConstants.NISTRING_RESTRICTED_ALPHABET_FLAG;
- }
-
- // Encode identification and top four bits of alphabet id
- write (_b | ((id & 0xF0) >> 4));
- // Encode bottom 4 bits of alphabet id
- _b = (id & 0x0F) << 4;
-
- final int length = s.length();
- final int octetPairLength = length / 2;
- final int octetSingleLength = length % 2;
- encodeNonZeroOctetStringLengthOnFifthBit(octetPairLength + octetSingleLength);
- encodeNonEmptyFourBitCharacterString(table, s.toCharArray(), 0, octetPairLength, octetSingleLength);
- }
-
- /**
- * Encode a non identifying string on the first bit of an octet as binary
- * data using an encoding algorithm.
- * Implementation of clause C.14 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param URI the encoding algorithm URI. If the URI == null then the
- * encoding algorithm identifier takes precendence.
- * @param id the encoding algorithm identifier.
- * @param data the data to be encoded using an encoding algorithm.
- * @throws EncodingAlgorithmException if the encoding algorithm URI is not
- * present in the vocabulary, or the encoding algorithm identifier
- * is not with the required range.
- */
- protected final void encodeNonIdentifyingStringOnFirstBit(String URI, int id, Object data) throws FastInfosetException, IOException {
- if (URI != null) {
- id = _v.encodingAlgorithm.get(URI);
- if (id == KeyIntMap.NOT_PRESENT) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.EncodingAlgorithmURI", new Object[]{URI}));
- }
- id += EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START;
-
- EncodingAlgorithm ea = (EncodingAlgorithm)_registeredEncodingAlgorithms.get(URI);
- if (ea != null) {
- encodeAIIObjectAlgorithmData(id, data, ea);
- } else {
- if (data instanceof byte[]) {
- byte[] d = (byte[])data;
- encodeAIIOctetAlgorithmData(id, d, 0, d.length);
- } else {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.nullEncodingAlgorithmURI"));
- }
- }
- } else if (id <= EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END) {
- int length = 0;
- switch(id) {
- case EncodingAlgorithmIndexes.HEXADECIMAL:
- case EncodingAlgorithmIndexes.BASE64:
- length = ((byte[])data).length;
- break;
- case EncodingAlgorithmIndexes.SHORT:
- length = ((short[])data).length;
- break;
- case EncodingAlgorithmIndexes.INT:
- length = ((int[])data).length;
- break;
- case EncodingAlgorithmIndexes.LONG:
- case EncodingAlgorithmIndexes.UUID:
- length = ((long[])data).length;
- break;
- case EncodingAlgorithmIndexes.BOOLEAN:
- length = ((boolean[])data).length;
- break;
- case EncodingAlgorithmIndexes.FLOAT:
- length = ((float[])data).length;
- break;
- case EncodingAlgorithmIndexes.DOUBLE:
- length = ((double[])data).length;
- break;
- case EncodingAlgorithmIndexes.CDATA:
- throw new UnsupportedOperationException(CommonResourceBundle.getInstance().getString("message.CDATA"));
- default:
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.UnsupportedBuiltInAlgorithm", new Object[]{Integer.valueOf(id)}));
- }
- encodeAIIBuiltInAlgorithmData(id, data, 0, length);
- } else if (id >= EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START) {
- if (data instanceof byte[]) {
- byte[] d = (byte[])data;
- encodeAIIOctetAlgorithmData(id, d, 0, d.length);
- } else {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.nullEncodingAlgorithmURI"));
- }
- } else {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.identifiers10to31Reserved"));
- }
- }
-
- /**
- * Encode the [normalized value] of an Attribute Information Item using
- * using an encoding algorithm.
- * Implementation of clause C.14 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param id the encoding algorithm identifier.
- * @param d the data, as an array of bytes, to be encoded.
- * @param offset the offset into the array of bytes.
- * @param length the length of bytes.
- */
- protected final void encodeAIIOctetAlgorithmData(int id, byte[] d, int offset, int length) throws IOException {
- // Encode identification and top four bits of encoding algorithm id
- write (EncodingConstants.NISTRING_ENCODING_ALGORITHM_FLAG |
- ((id & 0xF0) >> 4));
-
- // Encode bottom 4 bits of enoding algorithm id
- _b = (id & 0x0F) << 4;
-
- // Encode the length
- encodeNonZeroOctetStringLengthOnFifthBit(length);
-
- write(d, offset, length);
- }
-
- /**
- * Encode the [normalized value] of an Attribute Information Item using
- * using an encoding algorithm.
- * Implementation of clause C.14 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param id the encoding algorithm identifier.
- * @param data the data to be encoded using an encoding algorithm.
- * @param ea the encoding algorithm to use to encode the data into an
- * array of bytes.
- */
- protected final void encodeAIIObjectAlgorithmData(int id, Object data, EncodingAlgorithm ea) throws FastInfosetException, IOException {
- // Encode identification and top four bits of encoding algorithm id
- write (EncodingConstants.NISTRING_ENCODING_ALGORITHM_FLAG |
- ((id & 0xF0) >> 4));
-
- // Encode bottom 4 bits of enoding algorithm id
- _b = (id & 0x0F) << 4;
-
- _encodingBufferOutputStream.reset();
- ea.encodeToOutputStream(data, _encodingBufferOutputStream);
- encodeNonZeroOctetStringLengthOnFifthBit(_encodingBufferIndex);
- write(_encodingBuffer, _encodingBufferIndex);
- }
-
- /**
- * Encode the [normalized value] of an Attribute Information Item using
- * using a built in encoding algorithm.
- * Implementation of clause C.14 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param id the built in encoding algorithm identifier.
- * @param data the data to be encoded using an encoding algorithm. The data
- * represents an array of items specified by the encoding algorithm
- * identifier
- * @param offset the offset into the array of bytes.
- * @param length the length of bytes.
- */
- protected final void encodeAIIBuiltInAlgorithmData(int id, Object data, int offset, int length) throws IOException {
- // Encode identification and top four bits of encoding algorithm id
- write (EncodingConstants.NISTRING_ENCODING_ALGORITHM_FLAG |
- ((id & 0xF0) >> 4));
-
- // Encode bottom 4 bits of enoding algorithm id
- _b = (id & 0x0F) << 4;
-
- final int octetLength = BuiltInEncodingAlgorithmFactory.getAlgorithm(id).
- getOctetLengthFromPrimitiveLength(length);
-
- encodeNonZeroOctetStringLengthOnFifthBit(octetLength);
-
- ensureSize(octetLength);
- BuiltInEncodingAlgorithmFactory.getAlgorithm(id).
- encodeToBytes(data, offset, length, _octetBuffer, _octetBufferIndex);
- _octetBufferIndex += octetLength;
- }
-
- /**
- * Encode a non identifying string on the third bit of an octet.
- * Implementation of clause C.15 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- * @param map the vocabulary table of character arrays to indexes.
- * @param addToTable true if the array of characters should be added to the vocabulary
- * table (if not already present in the table).
- * @param clone true if the array of characters should be cloned if added
- * to the vocabulary table.
- */
- protected final void encodeNonIdentifyingStringOnThirdBit(char[] ch, int offset, int length,
- CharArrayIntMap map, boolean addToTable, boolean clone) throws IOException {
- // length cannot be zero since sequence of CIIs has to be > 0
-
- if (addToTable) {
- // if char array could be added to table
- boolean canAddCharacterContentToTable =
- canAddCharacterContentToTable(length, map);
-
- // obtain/get index
- int index = canAddCharacterContentToTable ?
- map.obtainIndex(ch, offset, length, clone) :
- map.get(ch, offset, length);
-
- if (index != KeyIntMap.NOT_PRESENT) {
- // if char array is in table
- _b = EncodingConstants.CHARACTER_CHUNK | 0x20;
- encodeNonZeroIntegerOnFourthBit(index);
- } else if (canAddCharacterContentToTable) {
- // if char array is not in table, but could be added
- _b = EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG |
- _nonIdentifyingStringOnThirdBitCES;
- encodeNonEmptyCharacterStringOnSeventhBit(ch, offset, length);
- } else {
- // if char array is not in table and could not be added
- _b = _nonIdentifyingStringOnThirdBitCES;
- encodeNonEmptyCharacterStringOnSeventhBit(ch, offset, length);
- }
- } else {
- // char array will not be added to map
- _b = _nonIdentifyingStringOnThirdBitCES;
- encodeNonEmptyCharacterStringOnSeventhBit(ch, offset, length);
- }
- }
-
- /**
- * Encode a non identifying string on the third bit of an octet as binary
- * data using an encoding algorithm.
- * Implementation of clause C.15 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param URI the encoding algorithm URI. If the URI == null then the
- * encoding algorithm identifier takes precendence.
- * @param id the encoding algorithm identifier.
- * @param data the data to be encoded using an encoding algorithm.
- * @throws EncodingAlgorithmException if the encoding algorithm URI is not
- * present in the vocabulary, or the encoding algorithm identifier
- * is not with the required range.
- */
- protected final void encodeNonIdentifyingStringOnThirdBit(String URI, int id, Object data) throws FastInfosetException, IOException {
- if (URI != null) {
- id = _v.encodingAlgorithm.get(URI);
- if (id == KeyIntMap.NOT_PRESENT) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.EncodingAlgorithmURI", new Object[]{URI}));
- }
- id += EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START;
-
- EncodingAlgorithm ea = (EncodingAlgorithm)_registeredEncodingAlgorithms.get(URI);
- if (ea != null) {
- encodeCIIObjectAlgorithmData(id, data, ea);
- } else {
- if (data instanceof byte[]) {
- byte[] d = (byte[])data;
- encodeCIIOctetAlgorithmData(id, d, 0, d.length);
- } else {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.nullEncodingAlgorithmURI"));
- }
- }
- } else if (id <= EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END) {
- int length = 0;
- switch(id) {
- case EncodingAlgorithmIndexes.HEXADECIMAL:
- case EncodingAlgorithmIndexes.BASE64:
- length = ((byte[])data).length;
- break;
- case EncodingAlgorithmIndexes.SHORT:
- length = ((short[])data).length;
- break;
- case EncodingAlgorithmIndexes.INT:
- length = ((int[])data).length;
- break;
- case EncodingAlgorithmIndexes.LONG:
- case EncodingAlgorithmIndexes.UUID:
- length = ((long[])data).length;
- break;
- case EncodingAlgorithmIndexes.BOOLEAN:
- length = ((boolean[])data).length;
- break;
- case EncodingAlgorithmIndexes.FLOAT:
- length = ((float[])data).length;
- break;
- case EncodingAlgorithmIndexes.DOUBLE:
- length = ((double[])data).length;
- break;
- case EncodingAlgorithmIndexes.CDATA:
- throw new UnsupportedOperationException(CommonResourceBundle.getInstance().getString("message.CDATA"));
- default:
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.UnsupportedBuiltInAlgorithm", new Object[]{Integer.valueOf(id)}));
- }
- encodeCIIBuiltInAlgorithmData(id, data, 0, length);
- } else if (id >= EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START) {
- if (data instanceof byte[]) {
- byte[] d = (byte[])data;
- encodeCIIOctetAlgorithmData(id, d, 0, d.length);
- } else {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.nullEncodingAlgorithmURI"));
- }
- } else {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.identifiers10to31Reserved"));
- }
- }
-
- /**
- * Encode a non identifying string on the third bit of an octet as binary
- * data using an encoding algorithm.
- * Implementation of clause C.15 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param URI the encoding algorithm URI. If the URI == null then the
- * encoding algorithm identifier takes precendence.
- * @param id the encoding algorithm identifier.
- * @param d the data, as an array of bytes, to be encoded.
- * @param offset the offset into the array of bytes.
- * @param length the length of bytes.
- * @throws EncodingAlgorithmException if the encoding algorithm URI is not
- * present in the vocabulary.
- */
- protected final void encodeNonIdentifyingStringOnThirdBit(String URI, int id, byte[] d, int offset, int length) throws FastInfosetException, IOException {
- if (URI != null) {
- id = _v.encodingAlgorithm.get(URI);
- if (id == KeyIntMap.NOT_PRESENT) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.EncodingAlgorithmURI", new Object[]{URI}));
- }
- id += EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START;
- }
-
- encodeCIIOctetAlgorithmData(id, d, offset, length);
- }
-
- /**
- * Encode a chunk of Character Information Items using
- * using an encoding algorithm.
- * Implementation of clause C.15 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param id the encoding algorithm identifier.
- * @param d the data, as an array of bytes, to be encoded.
- * @param offset the offset into the array of bytes.
- * @param length the length of bytes.
- */
- protected final void encodeCIIOctetAlgorithmData(int id, byte[] d, int offset, int length) throws IOException {
- // Encode identification and top two bits of encoding algorithm id
- write (EncodingConstants.CHARACTER_CHUNK | EncodingConstants.CHARACTER_CHUNK_ENCODING_ALGORITHM_FLAG |
- ((id & 0xC0) >> 6));
-
- // Encode bottom 6 bits of enoding algorithm id
- _b = (id & 0x3F) << 2;
-
- // Encode the length
- encodeNonZeroOctetStringLengthOnSenventhBit(length);
-
- write(d, offset, length);
- }
-
- /**
- * Encode a chunk of Character Information Items using
- * using an encoding algorithm.
- * Implementation of clause C.15 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param id the encoding algorithm identifier.
- * @param data the data to be encoded using an encoding algorithm.
- * @param ea the encoding algorithm to use to encode the data into an
- * array of bytes.
- */
- protected final void encodeCIIObjectAlgorithmData(int id, Object data, EncodingAlgorithm ea) throws FastInfosetException, IOException {
- // Encode identification and top two bits of encoding algorithm id
- write (EncodingConstants.CHARACTER_CHUNK | EncodingConstants.CHARACTER_CHUNK_ENCODING_ALGORITHM_FLAG |
- ((id & 0xC0) >> 6));
-
- // Encode bottom 6 bits of enoding algorithm id
- _b = (id & 0x3F) << 2;
-
- _encodingBufferOutputStream.reset();
- ea.encodeToOutputStream(data, _encodingBufferOutputStream);
- encodeNonZeroOctetStringLengthOnSenventhBit(_encodingBufferIndex);
- write(_encodingBuffer, _encodingBufferIndex);
- }
-
- /**
- * Encode a chunk of Character Information Items using
- * using an encoding algorithm.
- * Implementation of clause C.15 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param id the built in encoding algorithm identifier.
- * @param data the data to be encoded using an encoding algorithm. The data
- * represents an array of items specified by the encoding algorithm
- * identifier
- * @param offset the offset into the array of bytes.
- * @param length the length of bytes.
- */
- protected final void encodeCIIBuiltInAlgorithmData(int id, Object data, int offset, int length) throws FastInfosetException, IOException {
- // Encode identification and top two bits of encoding algorithm id
- write (EncodingConstants.CHARACTER_CHUNK | EncodingConstants.CHARACTER_CHUNK_ENCODING_ALGORITHM_FLAG |
- ((id & 0xC0) >> 6));
-
- // Encode bottom 6 bits of enoding algorithm id
- _b = (id & 0x3F) << 2;
-
- final int octetLength = BuiltInEncodingAlgorithmFactory.getAlgorithm(id).
- getOctetLengthFromPrimitiveLength(length);
-
- encodeNonZeroOctetStringLengthOnSenventhBit(octetLength);
-
- ensureSize(octetLength);
- BuiltInEncodingAlgorithmFactory.getAlgorithm(id).
- encodeToBytes(data, offset, length, _octetBuffer, _octetBufferIndex);
- _octetBufferIndex += octetLength;
- }
-
- /**
- * Encode a chunk of Character Information Items using
- * using the CDATA built in encoding algorithm.
- * Implementation of clause C.15 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- */
- protected final void encodeCIIBuiltInAlgorithmDataAsCDATA(char[] ch, int offset, int length) throws FastInfosetException, IOException {
- // Encode identification and top two bits of encoding algorithm id
- write (EncodingConstants.CHARACTER_CHUNK | EncodingConstants.CHARACTER_CHUNK_ENCODING_ALGORITHM_FLAG);
-
- // Encode bottom 6 bits of enoding algorithm id
- _b = EncodingAlgorithmIndexes.CDATA << 2;
-
-
- length = encodeUTF8String(ch, offset, length);
- encodeNonZeroOctetStringLengthOnSenventhBit(length);
- write(_encodingBuffer, length);
- }
-
- /**
- * Encode a non empty identifying string on the first bit of an octet.
- * Implementation of clause C.13 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param s the identifying string.
- * @param map the vocabulary table to use to determin the index of the
- * identifying string
- */
- protected final void encodeIdentifyingNonEmptyStringOnFirstBit(String s, StringIntMap map) throws IOException {
- int index = map.obtainIndex(s);
- if (index == KeyIntMap.NOT_PRESENT) {
- // _b = 0;
- encodeNonEmptyOctetStringOnSecondBit(s);
- } else {
- // _b = 0x80;
- encodeNonZeroIntegerOnSecondBitFirstBitOne(index);
- }
- }
-
- /**
- * Encode a non empty string on the second bit of an octet using the UTF-8
- * encoding.
- * Implementation of clause C.22 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param s the string.
- */
- protected final void encodeNonEmptyOctetStringOnSecondBit(String s) throws IOException {
- final int length = encodeUTF8String(s);
- encodeNonZeroOctetStringLengthOnSecondBit(length);
- write(_encodingBuffer, length);
- }
-
- /**
- * Encode the length of a UTF-8 encoded string on the second bit of an octet.
- * Implementation of clause C.22 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param length the length to encode.
- */
- protected final void encodeNonZeroOctetStringLengthOnSecondBit(int length) throws IOException {
- if (length < EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_SMALL_LIMIT) {
- // [1, 64]
- write(length - 1);
- } else if (length < EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_MEDIUM_LIMIT) {
- // [65, 320]
- write(EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_MEDIUM_FLAG); // 010 00000
- write(length - EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_SMALL_LIMIT);
- } else {
- // [321, 4294967296]
- write(EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_LARGE_FLAG); // 0110 0000
- length -= EncodingConstants.OCTET_STRING_LENGTH_2ND_BIT_MEDIUM_LIMIT;
- write(length >>> 24);
- write((length >> 16) & 0xFF);
- write((length >> 8) & 0xFF);
- write(length & 0xFF);
- }
- }
-
- /**
- * Encode a non empty string on the fifth bit of an octet using the UTF-8
- * or UTF-16 encoding.
- * Implementation of clause C.23 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param s the string.
- */
- protected final void encodeNonEmptyCharacterStringOnFifthBit(String s) throws IOException {
- final int length = (_encodingStringsAsUtf8) ? encodeUTF8String(s) : encodeUtf16String(s);
- encodeNonZeroOctetStringLengthOnFifthBit(length);
- write(_encodingBuffer, length);
- }
-
- /**
- * Encode a non empty string on the fifth bit of an octet using the UTF-8
- * or UTF-16 encoding.
- * Implementation of clause C.23 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- */
- protected final void encodeNonEmptyCharacterStringOnFifthBit(char[] ch, int offset, int length) throws IOException {
- length = (_encodingStringsAsUtf8) ? encodeUTF8String(ch, offset, length) : encodeUtf16String(ch, offset, length);
- encodeNonZeroOctetStringLengthOnFifthBit(length);
- write(_encodingBuffer, length);
- }
-
- /**
- * Encode the length of a UTF-8 or UTF-16 encoded string on the fifth bit
- * of an octet.
- * Implementation of clause C.23 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param length the length to encode.
- */
- protected final void encodeNonZeroOctetStringLengthOnFifthBit(int length) throws IOException {
- if (length < EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_LIMIT) {
- // [1, 8]
- write(_b | (length - 1));
- } else if (length < EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_LIMIT) {
- // [9, 264]
- write(_b | EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_FLAG); // 000010 00
- write(length - EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_LIMIT);
- } else {
- // [265, 4294967296]
- write(_b | EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_LARGE_FLAG); // 000011 00
- length -= EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_LIMIT;
- write(length >>> 24);
- write((length >> 16) & 0xFF);
- write((length >> 8) & 0xFF);
- write(length & 0xFF);
- }
- }
-
- /**
- * Encode a non empty string on the seventh bit of an octet using the UTF-8
- * or UTF-16 encoding.
- * Implementation of clause C.24 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- */
- protected final void encodeNonEmptyCharacterStringOnSeventhBit(char[] ch, int offset, int length) throws IOException {
- length = (_encodingStringsAsUtf8) ? encodeUTF8String(ch, offset, length) : encodeUtf16String(ch, offset, length);
- encodeNonZeroOctetStringLengthOnSenventhBit(length);
- write(_encodingBuffer, length);
- }
-
- /**
- * Encode a non empty string on the seventh bit of an octet using a restricted
- * alphabet that results in the encoding of a character in 4 bits
- * (or two characters per octet).
- * Implementation of clause C.24 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param table the table mapping characters to 4 bit values.
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- */
- protected final void encodeNonEmptyFourBitCharacterStringOnSeventhBit(int[] table, char[] ch, int offset, int length) throws FastInfosetException, IOException {
- final int octetPairLength = length / 2;
- final int octetSingleLength = length % 2;
-
- // Encode the length
- encodeNonZeroOctetStringLengthOnSenventhBit(octetPairLength + octetSingleLength);
- encodeNonEmptyFourBitCharacterString(table, ch, offset, octetPairLength, octetSingleLength);
- }
-
- protected final void encodeNonEmptyFourBitCharacterString(int[] table, char[] ch, int offset,
- int octetPairLength, int octetSingleLength) throws FastInfosetException, IOException {
- ensureSize(octetPairLength + octetSingleLength);
- // Encode all pairs
- int v = 0;
- for (int i = 0; i < octetPairLength; i++) {
- v = (table[ch[offset++]] << 4) | table[ch[offset++]];
- if (v < 0) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.characterOutofAlphabetRange"));
- }
- _octetBuffer[_octetBufferIndex++] = (byte)v;
- }
- // Encode single character at end with termination bits
- if (octetSingleLength == 1) {
- v = (table[ch[offset]] << 4) | 0x0F;
- if (v < 0) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.characterOutofAlphabetRange"));
- }
- _octetBuffer[_octetBufferIndex++] = (byte)v;
- }
- }
-
- /**
- * Encode a non empty string on the seventh bit of an octet using a restricted
- * alphabet table.
- * Implementation of clause C.24 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param alphabet the alphabet defining the mapping between characters and
- * integer values.
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- */
- protected final void encodeNonEmptyNBitCharacterStringOnSeventhBit(String alphabet, char[] ch, int offset, int length) throws FastInfosetException, IOException {
- int bitsPerCharacter = 1;
- while ((1 << bitsPerCharacter) <= alphabet.length()) {
- bitsPerCharacter++;
- }
-
- final int bits = length * bitsPerCharacter;
- final int octets = bits / 8;
- final int bitsOfLastOctet = bits % 8;
- final int totalOctets = octets + ((bitsOfLastOctet > 0) ? 1 : 0);
-
- // Encode the length
- encodeNonZeroOctetStringLengthOnSenventhBit(totalOctets);
-
- resetBits();
- ensureSize(totalOctets);
- int v = 0;
- for (int i = 0; i < length; i++) {
- final char c = ch[offset + i];
- // This is grotesquely slow, need to use hash table of character to int value
- for (v = 0; v < alphabet.length(); v++) {
- if (c == alphabet.charAt(v)) {
- break;
- }
- }
- if (v == alphabet.length()) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.characterOutofAlphabetRange"));
- }
- writeBits(bitsPerCharacter, v);
- }
-
- if (bitsOfLastOctet > 0) {
- _b |= (1 << (8 - bitsOfLastOctet)) - 1;
- write(_b);
- }
- }
-
- private int _bitsLeftInOctet;
-
- private final void resetBits() {
- _bitsLeftInOctet = 8;
- _b = 0;
- }
-
- private final void writeBits(int bits, int v) throws IOException {
- while (bits > 0) {
- final int bit = (v & (1 << --bits)) > 0 ? 1 : 0;
- _b |= bit << (--_bitsLeftInOctet);
- if (_bitsLeftInOctet == 0) {
- write(_b);
- _bitsLeftInOctet = 8;
- _b = 0;
- }
- }
- }
-
- /**
- * Encode the length of a encoded string on the seventh bit
- * of an octet.
- * Implementation of clause C.24 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param length the length to encode.
- */
- protected final void encodeNonZeroOctetStringLengthOnSenventhBit(int length) throws IOException {
- if (length < EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_LIMIT) {
- // [1, 2]
- write(_b | (length - 1));
- } else if (length < EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_LIMIT) {
- // [3, 258]
- write(_b | EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_FLAG); // 00000010
- write(length - EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_LIMIT);
- } else {
- // [259, 4294967296]
- write(_b | EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_LARGE_FLAG); // 00000011
- length -= EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_LIMIT;
- write(length >>> 24);
- write((length >> 16) & 0xFF);
- write((length >> 8) & 0xFF);
- write(length & 0xFF);
- }
- }
-
- /**
- * Encode a non zero integer on the second bit of an octet, setting
- * the first bit to 1.
- * Implementation of clause C.24 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * <p>
- * The first bit of the first octet is set, as specified in clause C.13 of
- * ITU-T Rec. X.891 | ISO/IEC 24824-1
- *
- * @param i The integer to encode, which is a member of the interval
- * [0, 1048575]. In the specification the interval is [1, 1048576]
- *
- */
- protected final void encodeNonZeroIntegerOnSecondBitFirstBitOne(int i) throws IOException {
- if (i < EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT) {
- // [1, 64] ( [0, 63] ) 6 bits
- write(0x80 | i);
- } else if (i < EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT) {
- // [65, 8256] ( [64, 8255] ) 13 bits
- i -= EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
- _b = (0x80 | EncodingConstants.INTEGER_2ND_BIT_MEDIUM_FLAG) | (i >> 8); // 010 00000
- // _b = 0xC0 | (i >> 8); // 010 00000
- write(_b);
- write(i & 0xFF);
- } else if (i < EncodingConstants.INTEGER_2ND_BIT_LARGE_LIMIT) {
- // [8257, 1048576] ( [8256, 1048575] ) 20 bits
- i -= EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
- _b = (0x80 | EncodingConstants.INTEGER_2ND_BIT_LARGE_FLAG) | (i >> 16); // 0110 0000
- // _b = 0xE0 | (i >> 16); // 0110 0000
- write(_b);
- write((i >> 8) & 0xFF);
- write(i & 0xFF);
- } else {
- throw new IOException(
- CommonResourceBundle.getInstance().getString("message.integerMaxSize",
- new Object[]{Integer.valueOf(EncodingConstants.INTEGER_2ND_BIT_LARGE_LIMIT)}));
- }
- }
-
- /**
- * Encode a non zero integer on the second bit of an octet, setting
- * the first bit to 0.
- * Implementation of clause C.25 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * <p>
- * The first bit of the first octet is set, as specified in clause C.13 of
- * ITU-T Rec. X.891 | ISO/IEC 24824-1
- *
- * @param i The integer to encode, which is a member of the interval
- * [0, 1048575]. In the specification the interval is [1, 1048576]
- *
- */
- protected final void encodeNonZeroIntegerOnSecondBitFirstBitZero(int i) throws IOException {
- if (i < EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT) {
- // [1, 64] ( [0, 63] ) 6 bits
- write(i);
- } else if (i < EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT) {
- // [65, 8256] ( [64, 8255] ) 13 bits
- i -= EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
- _b = EncodingConstants.INTEGER_2ND_BIT_MEDIUM_FLAG | (i >> 8); // 010 00000
- write(_b);
- write(i & 0xFF);
- } else {
- // [8257, 1048576] ( [8256, 1048575] ) 20 bits
- i -= EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
- _b = EncodingConstants.INTEGER_2ND_BIT_LARGE_FLAG | (i >> 16); // 0110 0000
- write(_b);
- write((i >> 8) & 0xFF);
- write(i & 0xFF);
- }
- }
-
- /**
- * Encode a non zero integer on the third bit of an octet.
- * Implementation of clause C.27 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param i The integer to encode, which is a member of the interval
- * [0, 1048575]. In the specification the interval is [1, 1048576]
- *
- */
- protected final void encodeNonZeroIntegerOnThirdBit(int i) throws IOException {
- if (i < EncodingConstants.INTEGER_3RD_BIT_SMALL_LIMIT) {
- // [1, 32] ( [0, 31] ) 5 bits
- write(_b | i);
- } else if (i < EncodingConstants.INTEGER_3RD_BIT_MEDIUM_LIMIT) {
- // [33, 2080] ( [32, 2079] ) 11 bits
- i -= EncodingConstants.INTEGER_3RD_BIT_SMALL_LIMIT;
- _b |= EncodingConstants.INTEGER_3RD_BIT_MEDIUM_FLAG | (i >> 8); // 00100 000
- write(_b);
- write(i & 0xFF);
- } else if (i < EncodingConstants.INTEGER_3RD_BIT_LARGE_LIMIT) {
- // [2081, 526368] ( [2080, 526367] ) 19 bits
- i -= EncodingConstants.INTEGER_3RD_BIT_MEDIUM_LIMIT;
- _b |= EncodingConstants.INTEGER_3RD_BIT_LARGE_FLAG | (i >> 16); // 00101 000
- write(_b);
- write((i >> 8) & 0xFF);
- write(i & 0xFF);
- } else {
- // [526369, 1048576] ( [526368, 1048575] ) 20 bits
- i -= EncodingConstants.INTEGER_3RD_BIT_LARGE_LIMIT;
- _b |= EncodingConstants.INTEGER_3RD_BIT_LARGE_LARGE_FLAG; // 00110 000
- write(_b);
- write(i >> 16);
- write((i >> 8) & 0xFF);
- write(i & 0xFF);
- }
- }
-
- /**
- * Encode a non zero integer on the fourth bit of an octet.
- * Implementation of clause C.28 of ITU-T Rec. X.891 | ISO/IEC 24824-1.
- *
- * @param i The integer to encode, which is a member of the interval
- * [0, 1048575]. In the specification the interval is [1, 1048576]
- *
- */
- protected final void encodeNonZeroIntegerOnFourthBit(int i) throws IOException {
- if (i < EncodingConstants.INTEGER_4TH_BIT_SMALL_LIMIT) {
- // [1, 16] ( [0, 15] ) 4 bits
- write(_b | i);
- } else if (i < EncodingConstants.INTEGER_4TH_BIT_MEDIUM_LIMIT) {
- // [17, 1040] ( [16, 1039] ) 10 bits
- i -= EncodingConstants.INTEGER_4TH_BIT_SMALL_LIMIT;
- _b |= EncodingConstants.INTEGER_4TH_BIT_MEDIUM_FLAG | (i >> 8); // 000 100 00
- write(_b);
- write(i & 0xFF);
- } else if (i < EncodingConstants.INTEGER_4TH_BIT_LARGE_LIMIT) {
- // [1041, 263184] ( [1040, 263183] ) 18 bits
- i -= EncodingConstants.INTEGER_4TH_BIT_MEDIUM_LIMIT;
- _b |= EncodingConstants.INTEGER_4TH_BIT_LARGE_FLAG | (i >> 16); // 000 101 00
- write(_b);
- write((i >> 8) & 0xFF);
- write(i & 0xFF);
- } else {
- // [263185, 1048576] ( [263184, 1048575] ) 20 bits
- i -= EncodingConstants.INTEGER_4TH_BIT_LARGE_LIMIT;
- _b |= EncodingConstants.INTEGER_4TH_BIT_LARGE_LARGE_FLAG; // 000 110 00
- write(_b);
- write(i >> 16);
- write((i >> 8) & 0xFF);
- write(i & 0xFF);
- }
- }
-
- /**
- * Encode a non empty string using the UTF-8 encoding.
- *
- * @param b the current octet that is being written.
- * @param s the string to be UTF-8 encoded.
- * @param constants the array of constants to use when encoding to determin
- * how the length of the UTF-8 encoded string is encoded.
- */
- protected final void encodeNonEmptyUTF8StringAsOctetString(int b, String s, int[] constants) throws IOException {
- final char[] ch = s.toCharArray();
- encodeNonEmptyUTF8StringAsOctetString(b, ch, 0, ch.length, constants);
- }
-
- /**
- * Encode a non empty string using the UTF-8 encoding.
- *
- * @param b the current octet that is being written.
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- * how the length of the UTF-8 encoded string is encoded.
- * @param constants the array of constants to use when encoding to determin
- * how the length of the UTF-8 encoded string is encoded.
- */
- protected final void encodeNonEmptyUTF8StringAsOctetString(int b, char ch[], int offset, int length, int[] constants) throws IOException {
- length = encodeUTF8String(ch, offset, length);
- encodeNonZeroOctetStringLength(b, length, constants);
- write(_encodingBuffer, length);
- }
-
- /**
- * Encode the length of non empty UTF-8 encoded string.
- *
- * @param b the current octet that is being written.
- * @param length the length of the UTF-8 encoded string.
- * how the length of the UTF-8 encoded string is encoded.
- * @param constants the array of constants to use when encoding to determin
- * how the length of the UTF-8 encoded string is encoded.
- */
- protected final void encodeNonZeroOctetStringLength(int b, int length, int[] constants) throws IOException {
- if (length < constants[EncodingConstants.OCTET_STRING_LENGTH_SMALL_LIMIT]) {
- write(b | (length - 1));
- } else if (length < constants[EncodingConstants.OCTET_STRING_LENGTH_MEDIUM_LIMIT]) {
- write(b | constants[EncodingConstants.OCTET_STRING_LENGTH_MEDIUM_FLAG]);
- write(length - constants[EncodingConstants.OCTET_STRING_LENGTH_SMALL_LIMIT]);
- } else {
- write(b | constants[EncodingConstants.OCTET_STRING_LENGTH_LARGE_FLAG]);
- length -= constants[EncodingConstants.OCTET_STRING_LENGTH_MEDIUM_LIMIT];
- write(length >>> 24);
- write((length >> 16) & 0xFF);
- write((length >> 8) & 0xFF);
- write(length & 0xFF);
- }
- }
-
- /**
- * Encode a non zero integer.
- *
- * @param b the current octet that is being written.
- * @param i the non zero integer.
- * @param constants the array of constants to use when encoding to determin
- * how the non zero integer is encoded.
- */
- protected final void encodeNonZeroInteger(int b, int i, int[] constants) throws IOException {
- if (i < constants[EncodingConstants.INTEGER_SMALL_LIMIT]) {
- write(b | i);
- } else if (i < constants[EncodingConstants.INTEGER_MEDIUM_LIMIT]) {
- i -= constants[EncodingConstants.INTEGER_SMALL_LIMIT];
- write(b | constants[EncodingConstants.INTEGER_MEDIUM_FLAG] | (i >> 8));
- write(i & 0xFF);
- } else if (i < constants[EncodingConstants.INTEGER_LARGE_LIMIT]) {
- i -= constants[EncodingConstants.INTEGER_MEDIUM_LIMIT];
- write(b | constants[EncodingConstants.INTEGER_LARGE_FLAG] | (i >> 16));
- write((i >> 8) & 0xFF);
- write(i & 0xFF);
- } else if (i < EncodingConstants.INTEGER_MAXIMUM_SIZE) {
- i -= constants[EncodingConstants.INTEGER_LARGE_LIMIT];
- write(b | constants[EncodingConstants.INTEGER_LARGE_LARGE_FLAG]);
- write(i >> 16);
- write((i >> 8) & 0xFF);
- write(i & 0xFF);
- } else {
- throw new IOException(CommonResourceBundle.getInstance().getString("message.integerMaxSize", new Object[]{Integer.valueOf(EncodingConstants.INTEGER_MAXIMUM_SIZE)}));
- }
- }
-
- /**
- * Mark the current position in the buffered stream.
- */
- protected final void mark() {
- _markIndex = _octetBufferIndex;
- }
-
- /**
- * Reset the marked position in the buffered stream.
- */
- protected final void resetMark() {
- _markIndex = -1;
- }
-
- /**
- * @return true if the mark has been set, otherwise false if the mark
- * has not been set.
- */
- protected final boolean hasMark() {
- return _markIndex != -1;
- }
-
- /**
- * Write a byte to the buffered stream.
- */
- protected final void write(int i) throws IOException {
- if (_octetBufferIndex < _octetBuffer.length) {
- _octetBuffer[_octetBufferIndex++] = (byte)i;
- } else {
- if (_markIndex == -1) {
- _s.write(_octetBuffer);
- _octetBufferIndex = 1;
- _octetBuffer[0] = (byte)i;
- } else {
- resize(_octetBuffer.length * 3 / 2);
- _octetBuffer[_octetBufferIndex++] = (byte)i;
- }
- }
- }
-
- /**
- * Write an array of bytes to the buffered stream.
- *
- * @param b the array of bytes.
- * @param length the length of bytes.
- */
- protected final void write(byte[] b, int length) throws IOException {
- write(b, 0, length);
- }
-
- /**
- * Write an array of bytes to the buffered stream.
- *
- * @param b the array of bytes.
- * @param offset the offset into the array of bytes.
- * @param length the length of bytes.
- */
- protected final void write(byte[] b, int offset, int length) throws IOException {
- if ((_octetBufferIndex + length) < _octetBuffer.length) {
- System.arraycopy(b, offset, _octetBuffer, _octetBufferIndex, length);
- _octetBufferIndex += length;
- } else {
- if (_markIndex == -1) {
- _s.write(_octetBuffer, 0, _octetBufferIndex);
- _s.write(b, offset, length);
- _octetBufferIndex = 0;
- } else {
- resize((_octetBuffer.length + length) * 3 / 2 + 1);
- System.arraycopy(b, offset, _octetBuffer, _octetBufferIndex, length);
- _octetBufferIndex += length;
- }
- }
- }
-
- private void ensureSize(int length) {
- if ((_octetBufferIndex + length) > _octetBuffer.length) {
- resize((_octetBufferIndex + length) * 3 / 2 + 1);
- }
- }
-
- private void resize(int length) {
- byte[] b = new byte[length];
- System.arraycopy(_octetBuffer, 0, b, 0, _octetBufferIndex);
- _octetBuffer = b;
- }
-
- private void _flush() throws IOException {
- if (_octetBufferIndex > 0) {
- _s.write(_octetBuffer, 0, _octetBufferIndex);
- _octetBufferIndex = 0;
- }
- }
-
-
- private EncodingBufferOutputStream _encodingBufferOutputStream = new EncodingBufferOutputStream();
-
- private byte[] _encodingBuffer = new byte[512];
-
- private int _encodingBufferIndex;
-
- private class EncodingBufferOutputStream extends OutputStream {
-
- public void write(int b) throws IOException {
- if (_encodingBufferIndex < _encodingBuffer.length) {
- _encodingBuffer[_encodingBufferIndex++] = (byte)b;
- } else {
- byte newbuf[] = new byte[Math.max(_encodingBuffer.length << 1, _encodingBufferIndex)];
- System.arraycopy(_encodingBuffer, 0, newbuf, 0, _encodingBufferIndex);
- _encodingBuffer = newbuf;
-
- _encodingBuffer[_encodingBufferIndex++] = (byte)b;
- }
- }
-
- public void write(byte b[], int off, int len) throws IOException {
- if ((off < 0) || (off > b.length) || (len < 0) ||
- ((off + len) > b.length) || ((off + len) < 0)) {
- throw new IndexOutOfBoundsException();
- } else if (len == 0) {
- return;
- }
- final int newoffset = _encodingBufferIndex + len;
- if (newoffset > _encodingBuffer.length) {
- byte newbuf[] = new byte[Math.max(_encodingBuffer.length << 1, newoffset)];
- System.arraycopy(_encodingBuffer, 0, newbuf, 0, _encodingBufferIndex);
- _encodingBuffer = newbuf;
- }
- System.arraycopy(b, off, _encodingBuffer, _encodingBufferIndex, len);
- _encodingBufferIndex = newoffset;
- }
-
- public int getLength() {
- return _encodingBufferIndex;
- }
-
- public void reset() {
- _encodingBufferIndex = 0;
- }
- }
-
- /**
- * Encode a string using the UTF-8 encoding.
- *
- * @param s the string to encode.
- */
- protected final int encodeUTF8String(String s) throws IOException {
- final int length = s.length();
- if (length < _charBuffer.length) {
- s.getChars(0, length, _charBuffer, 0);
- return encodeUTF8String(_charBuffer, 0, length);
- } else {
- char[] ch = s.toCharArray();
- return encodeUTF8String(ch, 0, length);
- }
- }
-
- private void ensureEncodingBufferSizeForUtf8String(int length) {
- final int newLength = 4 * length;
- if (_encodingBuffer.length < newLength) {
- _encodingBuffer = new byte[newLength];
- }
- }
-
- /**
- * Encode a string using the UTF-8 encoding.
- *
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- */
- protected final int encodeUTF8String(char[] ch, int offset, int length) throws IOException {
- int bpos = 0;
-
- // Make sure buffer is large enough
- ensureEncodingBufferSizeForUtf8String(length);
-
- final int end = offset + length;
- int c;
- while (end != offset) {
- c = ch[offset++];
- if (c < 0x80) {
- // 1 byte, 7 bits
- _encodingBuffer[bpos++] = (byte) c;
- } else if (c < 0x800) {
- // 2 bytes, 11 bits
- _encodingBuffer[bpos++] =
- (byte) (0xC0 | (c >> 6)); // first 5
- _encodingBuffer[bpos++] =
- (byte) (0x80 | (c & 0x3F)); // second 6
- } else if (c <= '\uFFFF') {
- if (!XMLChar.isHighSurrogate(c) && !XMLChar.isLowSurrogate(c)) {
- // 3 bytes, 16 bits
- _encodingBuffer[bpos++] =
- (byte) (0xE0 | (c >> 12)); // first 4
- _encodingBuffer[bpos++] =
- (byte) (0x80 | ((c >> 6) & 0x3F)); // second 6
- _encodingBuffer[bpos++] =
- (byte) (0x80 | (c & 0x3F)); // third 6
- } else {
- // 4 bytes, high and low surrogate
- encodeCharacterAsUtf8FourByte(c, ch, offset, end, bpos);
- bpos += 4;
- offset++;
- }
- }
- }
-
- return bpos;
- }
-
- private void encodeCharacterAsUtf8FourByte(int c, char[] ch, int chpos, int chend, int bpos) throws IOException {
- if (chpos == chend) {
- throw new IOException("");
- }
-
- final char d = ch[chpos];
- if (!XMLChar.isLowSurrogate(d)) {
- throw new IOException("");
- }
-
- final int uc = (((c & 0x3ff) << 10) | (d & 0x3ff)) + 0x10000;
- if (uc < 0 || uc >= 0x200000) {
- throw new IOException("");
- }
-
- _encodingBuffer[bpos++] = (byte)(0xF0 | ((uc >> 18)));
- _encodingBuffer[bpos++] = (byte)(0x80 | ((uc >> 12) & 0x3F));
- _encodingBuffer[bpos++] = (byte)(0x80 | ((uc >> 6) & 0x3F));
- _encodingBuffer[bpos++] = (byte)(0x80 | (uc & 0x3F));
- }
-
- /**
- * Encode a string using the UTF-16 encoding.
- *
- * @param s the string to encode.
- */
- protected final int encodeUtf16String(String s) throws IOException {
- final int length = s.length();
- if (length < _charBuffer.length) {
- s.getChars(0, length, _charBuffer, 0);
- return encodeUtf16String(_charBuffer, 0, length);
- } else {
- char[] ch = s.toCharArray();
- return encodeUtf16String(ch, 0, length);
- }
- }
-
- private void ensureEncodingBufferSizeForUtf16String(int length) {
- final int newLength = 2 * length;
- if (_encodingBuffer.length < newLength) {
- _encodingBuffer = new byte[newLength];
- }
- }
-
- /**
- * Encode a string using the UTF-16 encoding.
- *
- * @param ch the array of characters.
- * @param offset the offset into the array of characters.
- * @param length the length of characters.
- */
- protected final int encodeUtf16String(char[] ch, int offset, int length) throws IOException {
- int byteLength = 0;
-
- // Make sure buffer is large enough
- ensureEncodingBufferSizeForUtf16String(length);
-
- final int n = offset + length;
- for (int i = offset; i < n; i++) {
- final int c = (int) ch[i];
- _encodingBuffer[byteLength++] = (byte)(c >> 8);
- _encodingBuffer[byteLength++] = (byte)(c & 0xFF);
- }
-
- return byteLength;
- }
-
- /**
- * Obtain the prefix from a qualified name.
- *
- * @param qName the qualified name
- * @return the prefix, or "" if there is no prefix.
- */
- public static String getPrefixFromQualifiedName(String qName) {
- int i = qName.indexOf(':');
- String prefix = "";
- if (i != -1) {
- prefix = qName.substring(0, i);
- }
- return prefix;
- }
-
- /**
- * Check if character array contains characters that are all white space.
- *
- * @param ch the character array
- * @param start the starting character index into the array to check from
- * @param length the number of characters to check
- * @return true if all characters are white space, false otherwise
- */
- public static boolean isWhiteSpace(final char[] ch, int start, final int length) {
- if (!XMLChar.isSpace(ch[start])) return false;
-
- final int end = start + length;
- while(++start < end && XMLChar.isSpace(ch[start]));
-
- return start == end;
- }
-
- /**
- * Check if a String contains characters that are all white space.
- *
- * @param s the string
- * @return true if all characters are white space, false otherwise
- */
- public static boolean isWhiteSpace(String s) {
- if (!XMLChar.isSpace(s.charAt(0))) return false;
-
- final int end = s.length();
- int start = 1;
- while(start < end && XMLChar.isSpace(s.charAt(start++)));
- return start == end;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/EncodingConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/EncodingConstants.java
deleted file mode 100644
index 551d8db1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/EncodingConstants.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset;
-
-import java.io.UnsupportedEncodingException;
-
-public final class EncodingConstants {
- static {
- initiateXMLDeclarationValues();
- }
-
- public static final String XML_NAMESPACE_PREFIX = "xml";
- public static final int XML_NAMESPACE_PREFIX_LENGTH = XML_NAMESPACE_PREFIX.length();
- public static final String XML_NAMESPACE_NAME = "http://www.w3.org/XML/1998/namespace";
- public static final int XML_NAMESPACE_NAME_LENGTH = XML_NAMESPACE_NAME.length();
-
- public static final String XMLNS_NAMESPACE_PREFIX = "xmlns";
- public static final int XMLNS_NAMESPACE_PREFIX_LENGTH = XMLNS_NAMESPACE_PREFIX.length();
- public static final String XMLNS_NAMESPACE_NAME = "http://www.w3.org/2000/xmlns/";
- public static final int XMLNS_NAMESPACE_NAME_LENGTH = XMLNS_NAMESPACE_NAME.length();
-
- public static final QualifiedName DEFAULT_NAMESPACE_DECLARATION = new QualifiedName(
- "",
- EncodingConstants.XMLNS_NAMESPACE_NAME,
- EncodingConstants.XMLNS_NAMESPACE_PREFIX,
- EncodingConstants.XMLNS_NAMESPACE_PREFIX);
-
- public static final int DOCUMENT_ADDITIONAL_DATA_FLAG = 0x40; // 01000000
- public static final int DOCUMENT_INITIAL_VOCABULARY_FLAG = 0x20; // 00100000
- public static final int DOCUMENT_NOTATIONS_FLAG = 0x10; // 00010000
- public static final int DOCUMENT_UNPARSED_ENTITIES_FLAG = 0x08; // 00001000
- public static final int DOCUMENT_CHARACTER_ENCODING_SCHEME = 0x04; // 00000100
- public static final int DOCUMENT_STANDALONE_FLAG = 0x02; // 00000010
- public static final int DOCUMENT_VERSION_FLAG = 0x01; // 00000001
-
- public static final int INITIAL_VOCABULARY_EXTERNAL_VOCABULARY_FLAG = 0x10; // 00010000
- public static final int INITIAL_VOCABULARY_RESTRICTED_ALPHABETS_FLAG = 0x08; // 00001000
- public static final int INITIAL_VOCABULARY_ENCODING_ALGORITHMS_FLAG = 0x04; // 00000100
- public static final int INITIAL_VOCABULARY_PREFIXES_FLAG = 0x02; // 00000010
- public static final int INITIAL_VOCABULARY_NAMESPACE_NAMES_FLAG = 0x01; // 00000001
- public static final int INITIAL_VOCABULARY_LOCAL_NAMES_FLAG = 0x80; // 1000000
- public static final int INITIAL_VOCABULARY_OTHER_NCNAMES_FLAG = 0x40; // 01000000
- public static final int INITIAL_VOCABULARY_OTHER_URIS_FLAG = 0x20; // 00100000
- public static final int INITIAL_VOCABULARY_ATTRIBUTE_VALUES_FLAG = 0x10; // 00010000
- public static final int INITIAL_VOCABULARY_CONTENT_CHARACTER_CHUNKS_FLAG = 0x08; // 00001000
- public static final int INITIAL_VOCABULARY_OTHER_STRINGS_FLAG = 0x04; // 00000100
- public static final int INITIAL_VOCABULARY_ELEMENT_NAME_SURROGATES_FLAG = 0x02; // 0000010
- public static final int INITIAL_VOCABULARY_ATTRIBUTE_NAME_SURROGATES_FLAG = 0x01; // 00000001
-
- public static final int NAME_SURROGATE_PREFIX_FLAG = 0x02;
- public static final int NAME_SURROGATE_NAME_FLAG = 0x01;
-
- public static final int NOTATIONS = 0xC0; // 110000
- public static final int NOTATIONS_MASK = 0xFC; // 6 bits
- public static final int NOTATIONS_SYSTEM_IDENTIFIER_FLAG = 0x02;
- public static final int NOTATIONS_PUBLIC_IDENTIFIER_FLAG = 0x01;
-
- public static final int UNPARSED_ENTITIES = 0xD0; // 1101000
- public static final int UNPARSED_ENTITIES_MASK = 0xFE; // 7 bits
- public static final int UNPARSED_ENTITIES_PUBLIC_IDENTIFIER_FLAG = 0x01;
-
- public static final int PROCESSING_INSTRUCTION = 0xE1; // 11100001
- public static final int PROCESSING_INSTRUCTION_MASK = 0xFF; // 8 bits
-
- public static final int COMMENT = 0xE2; // 11100010
- public static final int COMMENT_MASK = 0xFF; // 8 bits
-
- public static final int DOCUMENT_TYPE_DECLARATION = 0xC4; // 110001
- public static final int DOCUMENT_TYPE_DECLARATION_MASK = 0xFC; // 6 bits
- public static final int DOCUMENT_TYPE_SYSTEM_IDENTIFIER_FLAG = 0x02;
- public static final int DOCUMENT_TYPE_PUBLIC_IDENTIFIER_FLAG = 0x01;
-
- public static final int ELEMENT = 0x00; // 0
- public static final int ELEMENT_ATTRIBUTE_FLAG = 0x40; // 01000000
- public static final int ELEMENT_NAMESPACES_FLAG = 0x38; // 00111000
- public static final int ELEMENT_LITERAL_QNAME_FLAG = 0x3C; // 00111100
-
- public static final int NAMESPACE_ATTRIBUTE = 0xCC; // 110011 00
- public static final int NAMESPACE_ATTRIBUTE_MASK = 0xFC; // 6 bits
- public static final int NAMESPACE_ATTRIBUTE_PREFIX_NAME_MASK = 0x03; // 2 bits
- public static final int NAMESPACE_ATTRIBUTE_PREFIX_FLAG = 0x02;
- public static final int NAMESPACE_ATTRIBUTE_NAME_FLAG = 0x01;
-
- public static final int ATTRIBUTE_LITERAL_QNAME_FLAG = 0x78; // 01111000
-
- public static final int LITERAL_QNAME_PREFIX_NAMESPACE_NAME_MASK = 0x03;
- public static final int LITERAL_QNAME_PREFIX_FLAG = 0x02;
- public static final int LITERAL_QNAME_NAMESPACE_NAME_FLAG = 0x01;
-
- public static final int CHARACTER_CHUNK = 0x80; // 10
- public static final int CHARACTER_CHUNK_ADD_TO_TABLE_FLAG = 0x10; // 00010000
- public static final int CHARACTER_CHUNK_UTF_8_FLAG = 0x00; // 00000000
- public static final int CHARACTER_CHUNK_UTF_16_FLAG = 0x04; // 00000100
- public static final int CHARACTER_CHUNK_RESTRICTED_ALPHABET_FLAG = 0x08; // 00001000
- public static final int CHARACTER_CHUNK_ENCODING_ALGORITHM_FLAG = 0x0C; // 00001100
-
- public static final int UNEXPANDED_ENTITY_REFERENCE = 0xC8; // 110010
- public static final int UNEXPANDED_ENTITY_REFERENCE_MASK = 0xFC; // 6 bits
- public static final int UNEXPANDED_ENTITY_SYSTEM_IDENTIFIER_FLAG = 0x02;
- public static final int UNEXPANDED_ENTITY_PUBLIC_IDENTIFIER_FLAG = 0x01;
-
- public static final int NISTRING_ADD_TO_TABLE_FLAG = 0x40; // 01000000
- public static final int NISTRING_UTF_8_FLAG = 0x00; // 00000000
- public static final int NISTRING_UTF_16_FLAG = 0x10; // 00010000
- public static final int NISTRING_RESTRICTED_ALPHABET_FLAG = 0x20; // 00100000
- public static final int NISTRING_ENCODING_ALGORITHM_FLAG = 0x30; // 00110000
-
- public static final int TERMINATOR = 0xF0;
- public static final int DOUBLE_TERMINATOR = 0xFF;
-
-
- public static final int ENCODING_ALGORITHM_BUILTIN_END = 9;
- public static final int ENCODING_ALGORITHM_APPLICATION_START = 32;
- public static final int ENCODING_ALGORITHM_APPLICATION_MAX = 255;
-
- public static final int RESTRICTED_ALPHABET_BUILTIN_END = 1;
- public static final int RESTRICTED_ALPHABET_APPLICATION_START = 32;
- public static final int RESTRICTED_ALPHABET_APPLICATION_MAX = 255;
-
- // Octet string length contants
-
- public static final int OCTET_STRING_LENGTH_SMALL_LIMIT = 0;
- public static final int OCTET_STRING_LENGTH_MEDIUM_LIMIT = 1;
- public static final int OCTET_STRING_LENGTH_MEDIUM_FLAG = 2;
- public static final int OCTET_STRING_LENGTH_LARGE_FLAG = 3;
-
- public static final long OCTET_STRING_MAXIMUM_LENGTH = 4294967296L;
-
- /*
- * C.22
- */
- public static final int OCTET_STRING_LENGTH_2ND_BIT_SMALL_LIMIT = 65;
- public static final int OCTET_STRING_LENGTH_2ND_BIT_MEDIUM_LIMIT = 321;
- public static final int OCTET_STRING_LENGTH_2ND_BIT_MEDIUM_FLAG = 0x40;
- public static final int OCTET_STRING_LENGTH_2ND_BIT_LARGE_FLAG = 0x60;
- public static final int OCTET_STRING_LENGTH_2ND_BIT_SMALL_MASK = 0x1F;
-
- /* package */ static final int[] OCTET_STRING_LENGTH_2ND_BIT_VALUES = {
- OCTET_STRING_LENGTH_2ND_BIT_SMALL_LIMIT,
- OCTET_STRING_LENGTH_2ND_BIT_MEDIUM_LIMIT,
- OCTET_STRING_LENGTH_2ND_BIT_MEDIUM_FLAG,
- OCTET_STRING_LENGTH_2ND_BIT_LARGE_FLAG
- };
-
- /*
- * C.23
- */
- public static final int OCTET_STRING_LENGTH_5TH_BIT_SMALL_LIMIT = 9;
- public static final int OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_LIMIT = 265;
- public static final int OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_FLAG = 0x08;
- public static final int OCTET_STRING_LENGTH_5TH_BIT_LARGE_FLAG = 0x0C;
- public static final int OCTET_STRING_LENGTH_5TH_BIT_SMALL_MASK = 0x07;
-
- /* package */ static final int[] OCTET_STRING_LENGTH_5TH_BIT_VALUES = {
- OCTET_STRING_LENGTH_5TH_BIT_SMALL_LIMIT,
- OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_LIMIT,
- OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_FLAG,
- OCTET_STRING_LENGTH_5TH_BIT_LARGE_FLAG
- };
-
- /*
- * C.24
- */
- public static final int OCTET_STRING_LENGTH_7TH_BIT_SMALL_LIMIT = 3;
- public static final int OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_LIMIT = 259;
- public static final int OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_FLAG = 0x02;
- public static final int OCTET_STRING_LENGTH_7TH_BIT_LARGE_FLAG = 0x03;
- public static final int OCTET_STRING_LENGTH_7TH_BIT_SMALL_MASK = 0x01;
-
- /* package */ static final int[] OCTET_STRING_LENGTH_7TH_BIT_VALUES = {
- OCTET_STRING_LENGTH_7TH_BIT_SMALL_LIMIT,
- OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_LIMIT,
- OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_FLAG,
- OCTET_STRING_LENGTH_7TH_BIT_LARGE_FLAG
- };
-
-
- // Integer
-
- public static final int INTEGER_SMALL_LIMIT = 0;
- public static final int INTEGER_MEDIUM_LIMIT = 1;
- public static final int INTEGER_LARGE_LIMIT = 2;
- public static final int INTEGER_MEDIUM_FLAG = 3;
- public static final int INTEGER_LARGE_FLAG = 4;
- public static final int INTEGER_LARGE_LARGE_FLAG = 5;
-
- public static final int INTEGER_MAXIMUM_SIZE = 1048576;
-
- /*
- * C.25
- */
- public static final int INTEGER_2ND_BIT_SMALL_LIMIT = 64;
- public static final int INTEGER_2ND_BIT_MEDIUM_LIMIT = 8256;
- public static final int INTEGER_2ND_BIT_LARGE_LIMIT = INTEGER_MAXIMUM_SIZE;
- public static final int INTEGER_2ND_BIT_MEDIUM_FLAG = 0x40;
- public static final int INTEGER_2ND_BIT_LARGE_FLAG = 0x60;
- public static final int INTEGER_2ND_BIT_SMALL_MASK = 0x3F;
- public static final int INTEGER_2ND_BIT_MEDIUM_MASK = 0x1F;
- public static final int INTEGER_2ND_BIT_LARGE_MASK = 0x0F;
-
- /* package */ static final int[] INTEGER_2ND_BIT_VALUES = {
- INTEGER_2ND_BIT_SMALL_LIMIT,
- INTEGER_2ND_BIT_MEDIUM_LIMIT,
- INTEGER_2ND_BIT_LARGE_LIMIT,
- INTEGER_2ND_BIT_MEDIUM_FLAG,
- INTEGER_2ND_BIT_LARGE_FLAG,
- -1
- };
-
- /*
- * C.27
- */
- public static final int INTEGER_3RD_BIT_SMALL_LIMIT = 32;
- public static final int INTEGER_3RD_BIT_MEDIUM_LIMIT = 2080;
- public static final int INTEGER_3RD_BIT_LARGE_LIMIT = 526368;
- public static final int INTEGER_3RD_BIT_MEDIUM_FLAG = 0x20;
- public static final int INTEGER_3RD_BIT_LARGE_FLAG = 0x28;
- public static final int INTEGER_3RD_BIT_LARGE_LARGE_FLAG = 0x30;
- public static final int INTEGER_3RD_BIT_SMALL_MASK = 0x1F;
- public static final int INTEGER_3RD_BIT_MEDIUM_MASK = 0x07;
- public static final int INTEGER_3RD_BIT_LARGE_MASK = 0x07;
- public static final int INTEGER_3RD_BIT_LARGE_LARGE_MASK = 0x0F;
-
- /* package */ static final int[] INTEGER_3RD_BIT_VALUES = {
- INTEGER_3RD_BIT_SMALL_LIMIT,
- INTEGER_3RD_BIT_MEDIUM_LIMIT,
- INTEGER_3RD_BIT_LARGE_LIMIT,
- INTEGER_3RD_BIT_MEDIUM_FLAG,
- INTEGER_3RD_BIT_LARGE_FLAG,
- INTEGER_3RD_BIT_LARGE_LARGE_FLAG
- };
-
- /*
- * C.28
- */
- public static final int INTEGER_4TH_BIT_SMALL_LIMIT = 16;
- public static final int INTEGER_4TH_BIT_MEDIUM_LIMIT = 1040;
- public static final int INTEGER_4TH_BIT_LARGE_LIMIT = 263184;
- public static final int INTEGER_4TH_BIT_MEDIUM_FLAG = 0x10;
- public static final int INTEGER_4TH_BIT_LARGE_FLAG = 0x14;
- public static final int INTEGER_4TH_BIT_LARGE_LARGE_FLAG = 0x18;
- public static final int INTEGER_4TH_BIT_SMALL_MASK = 0x0F;
- public static final int INTEGER_4TH_BIT_MEDIUM_MASK = 0x03;
- public static final int INTEGER_4TH_BIT_LARGE_MASK = 0x03;
-
- /* package */ static final int[] INTEGER_4TH_BIT_VALUES = {
- INTEGER_4TH_BIT_SMALL_LIMIT,
- INTEGER_4TH_BIT_MEDIUM_LIMIT,
- INTEGER_4TH_BIT_LARGE_LIMIT,
- INTEGER_4TH_BIT_MEDIUM_FLAG,
- INTEGER_4TH_BIT_LARGE_FLAG,
- INTEGER_4TH_BIT_LARGE_LARGE_FLAG
- };
-
- /* package */ static final byte[] BINARY_HEADER = {(byte)0xE0, 0, 0, 1};
-
- /* package */ static byte[][] XML_DECLARATION_VALUES;
-
- private static void initiateXMLDeclarationValues() {
-
- XML_DECLARATION_VALUES = new byte[9][];
-
- try {
- XML_DECLARATION_VALUES[0] = "<?xml encoding='finf'?>".getBytes("UTF-8");
- XML_DECLARATION_VALUES[1] = "<?xml version='1.0' encoding='finf'?>".getBytes("UTF-8");
- XML_DECLARATION_VALUES[2] = "<?xml version='1.1' encoding='finf'?>".getBytes("UTF-8");
- XML_DECLARATION_VALUES[3] = "<?xml encoding='finf' standalone='no'?>".getBytes("UTF-8");
- XML_DECLARATION_VALUES[4] = "<?xml encoding='finf' standalone='yes'?>".getBytes("UTF-8");
- XML_DECLARATION_VALUES[5] = "<?xml version='1.0' encoding='finf' standalone='no'?>".getBytes("UTF-8");
- XML_DECLARATION_VALUES[6] = "<?xml version='1.1' encoding='finf' standalone='no'?>".getBytes("UTF-8");
- XML_DECLARATION_VALUES[7] = "<?xml version='1.0' encoding='finf' standalone='yes'?>".getBytes("UTF-8");
- XML_DECLARATION_VALUES[8] = "<?xml version='1.1' encoding='finf' standalone='yes'?>".getBytes("UTF-8");
- } catch (UnsupportedEncodingException e) {
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/Notation.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/Notation.java
deleted file mode 100644
index cb68d98e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/Notation.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset;
-
-public class Notation {
- public final String name;
- public final String systemIdentifier;
- public final String publicIdentifier;
-
- /** Creates a new instance of Notation */
- public Notation(String _name, String _systemIdentifier, String _publicIdentifier) {
- name = _name;
- systemIdentifier = _systemIdentifier;
- publicIdentifier = _publicIdentifier;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/OctetBufferListener.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/OctetBufferListener.java
deleted file mode 100644
index ff2e7d4a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/OctetBufferListener.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset;
-
-/**
- * @author Paul Sandoz
- * @author Alexey Stashok
- */
-public interface OctetBufferListener {
- /**
- * Callback method that will be called before the
- * (@link Decoder) octet buffer content is going to be changed.
- * So it will be possible to preserve a read data by
- * cloning, or perform other actions.
- */
- public void onBeforeOctetBufferOverwrite();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/QualifiedName.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/QualifiedName.java
deleted file mode 100644
index 3fc7ff90..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/QualifiedName.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset;
-
-import javax.xml.namespace.QName;
-
-public class QualifiedName {
- public String prefix;
- public String namespaceName;
- public String localName;
- public String qName;
- public int index;
- public int prefixIndex;
- public int namespaceNameIndex;
- public int localNameIndex;
- public int attributeId;
- public int attributeHash;
- private QName qNameObject;
-
- public QualifiedName() { }
-
- public QualifiedName(String prefix, String namespaceName, String localName, String qName) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = localName;
- this.qName = qName;
- this.index = -1;
- this.prefixIndex = 0;
- this.namespaceNameIndex = 0;
- this.localNameIndex = -1;
- }
-
- public void set(String prefix, String namespaceName, String localName, String qName) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = localName;
- this.qName = qName;
- this.index = -1;
- this.prefixIndex = 0;
- this.namespaceNameIndex = 0;
- this.localNameIndex = -1;
- this.qNameObject = null;
- }
-
- public QualifiedName(String prefix, String namespaceName, String localName, String qName, int index) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = localName;
- this.qName = qName;
- this.index = index;
- this.prefixIndex = 0;
- this.namespaceNameIndex = 0;
- this.localNameIndex = -1;
- }
-
- public final QualifiedName set(String prefix, String namespaceName, String localName, String qName, int index) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = localName;
- this.qName = qName;
- this.index = index;
- this.prefixIndex = 0;
- this.namespaceNameIndex = 0;
- this.localNameIndex = -1;
- this.qNameObject = null;
- return this;
- }
-
- public QualifiedName(String prefix, String namespaceName, String localName, String qName, int index,
- int prefixIndex, int namespaceNameIndex, int localNameIndex) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = localName;
- this.qName = qName;
- this.index = index;
- this.prefixIndex = prefixIndex + 1;
- this.namespaceNameIndex = namespaceNameIndex + 1;
- this.localNameIndex = localNameIndex;
- }
-
- public final QualifiedName set(String prefix, String namespaceName, String localName, String qName, int index,
- int prefixIndex, int namespaceNameIndex, int localNameIndex) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = localName;
- this.qName = qName;
- this.index = index;
- this.prefixIndex = prefixIndex + 1;
- this.namespaceNameIndex = namespaceNameIndex + 1;
- this.localNameIndex = localNameIndex;
- this.qNameObject = null;
- return this;
- }
-
- public QualifiedName(String prefix, String namespaceName, String localName) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = localName;
- this.qName = createQNameString(prefix, localName);
- this.index = -1;
- this.prefixIndex = 0;
- this.namespaceNameIndex = 0;
- this.localNameIndex = -1;
- }
-
- public final QualifiedName set(String prefix, String namespaceName, String localName) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = localName;
- this.qName = createQNameString(prefix, localName);
- this.index = -1;
- this.prefixIndex = 0;
- this.namespaceNameIndex = 0;
- this.localNameIndex = -1;
- this.qNameObject = null;
- return this;
- }
-
- public QualifiedName(String prefix, String namespaceName, String localName,
- int prefixIndex, int namespaceNameIndex, int localNameIndex,
- char[] charBuffer) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = localName;
-
- if (charBuffer != null) {
- final int l1 = prefix.length();
- final int l2 = localName.length();
- final int total = l1 + l2 + 1;
- if (total < charBuffer.length) {
- prefix.getChars(0, l1, charBuffer, 0);
- charBuffer[l1] = ':';
- localName.getChars(0, l2, charBuffer, l1 + 1);
- this.qName = new String(charBuffer, 0, total);
- } else {
- this.qName = createQNameString(prefix, localName);
- }
- } else {
- this.qName = this.localName;
- }
-
- this.prefixIndex = prefixIndex + 1;
- this.namespaceNameIndex = namespaceNameIndex + 1;
- this.localNameIndex = localNameIndex;
- this.index = -1;
- }
-
- public final QualifiedName set(String prefix, String namespaceName, String localName,
- int prefixIndex, int namespaceNameIndex, int localNameIndex,
- char[] charBuffer) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = localName;
-
- if (charBuffer != null) {
- final int l1 = prefix.length();
- final int l2 = localName.length();
- final int total = l1 + l2 + 1;
- if (total < charBuffer.length) {
- prefix.getChars(0, l1, charBuffer, 0);
- charBuffer[l1] = ':';
- localName.getChars(0, l2, charBuffer, l1 + 1);
- this.qName = new String(charBuffer, 0, total);
- } else {
- this.qName = createQNameString(prefix, localName);
- }
- } else {
- this.qName = this.localName;
- }
-
- this.prefixIndex = prefixIndex + 1;
- this.namespaceNameIndex = namespaceNameIndex + 1;
- this.localNameIndex = localNameIndex;
- this.index = -1;
- this.qNameObject = null;
- return this;
- }
-
- public QualifiedName(String prefix, String namespaceName, String localName, int index) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = localName;
- this.qName = createQNameString(prefix, localName);
- this.index = index;
- this.prefixIndex = 0;
- this.namespaceNameIndex = 0;
- this.localNameIndex = -1;
- }
-
- public final QualifiedName set(String prefix, String namespaceName, String localName, int index) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = localName;
- this.qName = createQNameString(prefix, localName);
- this.index = index;
- this.prefixIndex = 0;
- this.namespaceNameIndex = 0;
- this.localNameIndex = -1;
- this.qNameObject = null;
- return this;
- }
-
- public QualifiedName(String prefix, String namespaceName, String localName, int index,
- int prefixIndex, int namespaceNameIndex, int localNameIndex) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = localName;
- this.qName = createQNameString(prefix, localName);
- this.index = index;
- this.prefixIndex = prefixIndex + 1;
- this.namespaceNameIndex = namespaceNameIndex + 1;
- this.localNameIndex = localNameIndex;
- }
-
- public final QualifiedName set(String prefix, String namespaceName, String localName, int index,
- int prefixIndex, int namespaceNameIndex, int localNameIndex) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = localName;
- this.qName = createQNameString(prefix, localName);
- this.index = index;
- this.prefixIndex = prefixIndex + 1;
- this.namespaceNameIndex = namespaceNameIndex + 1;
- this.localNameIndex = localNameIndex;
- this.qNameObject = null;
- return this;
- }
-
- // Qualified Name as a Namespace Name
- public QualifiedName(String prefix, String namespaceName) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = "";
- this.qName = "";
- this.index = -1;
- this.prefixIndex = 0;
- this.namespaceNameIndex = 0;
- this.localNameIndex = -1;
- }
-
- public final QualifiedName set(String prefix, String namespaceName) {
- this.prefix = prefix;
- this.namespaceName = namespaceName;
- this.localName = "";
- this.qName = "";
- this.index = -1;
- this.prefixIndex = 0;
- this.namespaceNameIndex = 0;
- this.localNameIndex = -1;
- this.qNameObject = null;
- return this;
- }
-
- public final QName getQName() {
- if (qNameObject == null) {
- qNameObject = new QName(namespaceName, localName, prefix);
- }
-
- return qNameObject;
- }
-
- public final String getQNameString() {
- if (this.qName != "") {
- return this.qName;
- }
-
- return this.qName = createQNameString(prefix, localName);
- }
-
- public final void createAttributeValues(int size) {
- attributeId = localNameIndex | (namespaceNameIndex << 20);
- attributeHash = localNameIndex % size;
- }
-
- private final String createQNameString(String p, String l) {
- if (p != null && p.length() > 0) {
- final StringBuffer b = new StringBuffer(p);
- b.append(':');
- b.append(l);
- return b.toString();
- } else {
- return l;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/UnparsedEntity.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/UnparsedEntity.java
deleted file mode 100644
index 55d007bf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/UnparsedEntity.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset;
-
-public class UnparsedEntity extends Notation {
- public final String notationName;
-
- /** Creates a new instance of UnparsedEntityDeclaration */
- public UnparsedEntity(String _name, String _systemIdentifier, String _publicIdentifier, String _notationName) {
- super(_name, _systemIdentifier, _publicIdentifier);
- notationName = _notationName;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BASE64EncodingAlgorithm.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BASE64EncodingAlgorithm.java
deleted file mode 100644
index e6ac90c5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BASE64EncodingAlgorithm.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.algorithm;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class BASE64EncodingAlgorithm extends BuiltInEncodingAlgorithm {
-
- /* package */ static final char encodeBase64[] = {
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
- 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
- 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
- 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'
- };
-
- /* package */ static final int decodeBase64[] = {
- /*'+'*/ 62,
- -1, -1, -1,
- /*'/'*/ 63,
- /*'0'*/ 52,
- /*'1'*/ 53,
- /*'2'*/ 54,
- /*'3'*/ 55,
- /*'4'*/ 56,
- /*'5'*/ 57,
- /*'6'*/ 58,
- /*'7'*/ 59,
- /*'8'*/ 60,
- /*'9'*/ 61,
- -1, -1, -1, -1, -1, -1, -1,
- /*'A'*/ 0,
- /*'B'*/ 1,
- /*'C'*/ 2,
- /*'D'*/ 3,
- /*'E'*/ 4,
- /*'F'*/ 5,
- /*'G'*/ 6,
- /*'H'*/ 7,
- /*'I'*/ 8,
- /*'J'*/ 9,
- /*'K'*/ 10,
- /*'L'*/ 11,
- /*'M'*/ 12,
- /*'N'*/ 13,
- /*'O'*/ 14,
- /*'P'*/ 15,
- /*'Q'*/ 16,
- /*'R'*/ 17,
- /*'S'*/ 18,
- /*'T'*/ 19,
- /*'U'*/ 20,
- /*'V'*/ 21,
- /*'W'*/ 22,
- /*'X'*/ 23,
- /*'Y'*/ 24,
- /*'Z'*/ 25,
- -1, -1, -1, -1, -1, -1,
- /*'a'*/ 26,
- /*'b'*/ 27,
- /*'c'*/ 28,
- /*'d'*/ 29,
- /*'e'*/ 30,
- /*'f'*/ 31,
- /*'g'*/ 32,
- /*'h'*/ 33,
- /*'i'*/ 34,
- /*'j'*/ 35,
- /*'k'*/ 36,
- /*'l'*/ 37,
- /*'m'*/ 38,
- /*'n'*/ 39,
- /*'o'*/ 40,
- /*'p'*/ 41,
- /*'q'*/ 42,
- /*'r'*/ 43,
- /*'s'*/ 44,
- /*'t'*/ 45,
- /*'u'*/ 46,
- /*'v'*/ 47,
- /*'w'*/ 48,
- /*'x'*/ 49,
- /*'y'*/ 50,
- /*'z'*/ 51
- };
-
- public final Object decodeFromBytes(byte[] b, int start, int length) throws EncodingAlgorithmException {
- final byte[] data = new byte[length];
- System.arraycopy(b, start, data, 0, length);
- return data;
- }
-
- public final Object decodeFromInputStream(InputStream s) throws IOException {
- throw new UnsupportedOperationException(CommonResourceBundle.getInstance().getString("message.notImplemented"));
- }
-
-
- public void encodeToOutputStream(Object data, OutputStream s) throws IOException {
- if (!(data instanceof byte[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotByteArray"));
- }
-
- s.write((byte[])data);
- }
-
- public final Object convertFromCharacters(char[] ch, int start, int length) {
- if (length == 0) {
- return new byte[0];
- }
-
- StringBuilder encodedValue = removeWhitespace(ch, start, length);
- int encodedLength = encodedValue.length();
- if (encodedLength == 0) {
- return new byte[0];
- }
-
- int blockCount = encodedLength / 4;
- int partialBlockLength = 3;
-
- if (encodedValue.charAt(encodedLength - 1) == '=') {
- --partialBlockLength;
- if (encodedValue.charAt(encodedLength - 2) == '=') {
- --partialBlockLength;
- }
- }
-
- int valueLength = (blockCount - 1) * 3 + partialBlockLength;
- byte[] value = new byte[valueLength];
-
- int idx = 0;
- int encodedIdx = 0;
- for (int i = 0; i < blockCount; ++i) {
- int x1 = decodeBase64[encodedValue.charAt(encodedIdx++) - '+'];
- int x2 = decodeBase64[encodedValue.charAt(encodedIdx++) - '+'];
- int x3 = decodeBase64[encodedValue.charAt(encodedIdx++) - '+'];
- int x4 = decodeBase64[encodedValue.charAt(encodedIdx++) - '+'];
-
- value[idx++] = (byte) ((x1 << 2) | (x2 >> 4));
- if (idx < valueLength) {
- value[idx++] = (byte) (((x2 & 0x0f) << 4) | (x3 >> 2));
- }
- if (idx < valueLength) {
- value[idx++] = (byte) (((x3 & 0x03) << 6) | x4);
- }
- }
-
- return value;
- }
-
- public final void convertToCharacters(Object data, StringBuffer s) {
- if (data == null) {
- return;
- }
- final byte[] value = (byte[]) data;
-
- convertToCharacters(value, 0, value.length, s);
- }
-
- public final int getPrimtiveLengthFromOctetLength(int octetLength) throws EncodingAlgorithmException {
- return octetLength;
- }
-
- public int getOctetLengthFromPrimitiveLength(int primitiveLength) {
- return primitiveLength;
- }
-
- public final void encodeToBytes(Object array, int astart, int alength, byte[] b, int start) {
- System.arraycopy((byte[])array, astart, b, start, alength);
- }
-
- public final void convertToCharacters(byte[] data, int offset, int length, StringBuffer s) {
- if (data == null) {
- return;
- }
- final byte[] value = data;
- if (length == 0) {
- return;
- }
-
- final int partialBlockLength = length % 3;
- final int blockCount = (partialBlockLength != 0) ?
- length / 3 + 1 :
- length / 3;
-
- final int encodedLength = blockCount * 4;
- final int originalBufferSize = s.length();
- s.ensureCapacity(encodedLength + originalBufferSize);
-
- int idx = offset;
- int lastIdx = offset + length;
- for (int i = 0; i < blockCount; ++i) {
- int b1 = value[idx++] & 0xFF;
- int b2 = (idx < lastIdx) ? value[idx++] & 0xFF : 0;
- int b3 = (idx < lastIdx) ? value[idx++] & 0xFF : 0;
-
- s.append(encodeBase64[b1 >> 2]);
-
- s.append(encodeBase64[((b1 & 0x03) << 4) | (b2 >> 4)]);
-
- s.append(encodeBase64[((b2 & 0x0f) << 2) | (b3 >> 6)]);
-
- s.append(encodeBase64[b3 & 0x3f]);
- }
-
- switch (partialBlockLength) {
- case 1 :
- s.setCharAt(originalBufferSize + encodedLength - 1, '=');
- s.setCharAt(originalBufferSize + encodedLength - 2, '=');
- break;
- case 2 :
- s.setCharAt(originalBufferSize + encodedLength - 1, '=');
- break;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BooleanEncodingAlgorithm.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BooleanEncodingAlgorithm.java
deleted file mode 100644
index f50bd8d5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BooleanEncodingAlgorithm.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.algorithm;
-
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.CharBuffer;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-
-/**
- *
- * An encoder for handling boolean values. Suppports the builtin BOOLEAN encoder.
- *
- * @author Alan Hudson
- * @author Paul Sandoz
- *
- */
-public class BooleanEncodingAlgorithm extends BuiltInEncodingAlgorithm {
-
- /** Table for setting a particular bit of a byte */
- private static final int[] BIT_TABLE = {
- 1 << 7,
- 1 << 6,
- 1 << 5,
- 1 << 4,
- 1 << 3,
- 1 << 2,
- 1 << 1,
- 1 << 0};
-
- public int getPrimtiveLengthFromOctetLength(int octetLength) throws EncodingAlgorithmException {
- // Cannot determine the number of boolean values from just the octet length
- throw new UnsupportedOperationException();
- }
-
- public int getOctetLengthFromPrimitiveLength(int primitiveLength) {
- if (primitiveLength < 5) {
- return 1;
- } else {
- final int div = primitiveLength / 8;
- return (div == 0) ? 2 : 1 + div;
- }
- }
-
- public final Object decodeFromBytes(byte[] b, int start, int length) throws EncodingAlgorithmException {
- final int blength = getPrimtiveLengthFromOctetLength(length, b[start]);
- boolean[] data = new boolean[blength];
-
- decodeFromBytesToBooleanArray(data, 0, blength, b, start, length);
- return data;
- }
-
- public final Object decodeFromInputStream(InputStream s) throws IOException {
- final List booleanList = new ArrayList();
-
- int value = s.read();
- if (value == -1) {
- throw new EOFException();
- }
- final int unusedBits = (value >> 4) & 0xFF;
-
- int bitPosition = 4;
- int bitPositionEnd = 8;
- int valueNext = 0;
- do {
- valueNext = s.read();
- if (valueNext == -1) {
- bitPositionEnd -= unusedBits;
- }
-
- while(bitPosition < bitPositionEnd) {
- booleanList.add(
- Boolean.valueOf((value & BIT_TABLE[bitPosition++]) > 0));
- }
-
- value = valueNext;
- } while (value != -1);
-
- return generateArrayFromList(booleanList);
- }
-
- public void encodeToOutputStream(Object data, OutputStream s) throws IOException {
- if (!(data instanceof boolean[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotBoolean"));
- }
-
- boolean array[] = (boolean[])data;
- final int alength = array.length;
-
- final int mod = (alength + 4) % 8;
- final int unusedBits = (mod == 0) ? 0 : 8 - mod;
-
- int bitPosition = 4;
- int value = unusedBits << 4;
- int astart = 0;
- while (astart < alength) {
- if (array[astart++]) {
- value |= BIT_TABLE[bitPosition];
- }
-
- if (++bitPosition == 8) {
- s.write(value);
- bitPosition = value = 0;
- }
- }
-
- if (bitPosition != 8) {
- s.write(value);
- }
- }
-
- public final Object convertFromCharacters(char[] ch, int start, int length) {
- if (length == 0) {
- return new boolean[0];
- }
-
- final CharBuffer cb = CharBuffer.wrap(ch, start, length);
- final List booleanList = new ArrayList();
-
- matchWhiteSpaceDelimnatedWords(cb,
- new WordListener() {
- public void word(int start, int end) {
- if (cb.charAt(start) == 't') {
- booleanList.add(Boolean.TRUE);
- } else {
- booleanList.add(Boolean.FALSE);
- }
- }
- }
- );
-
- return generateArrayFromList(booleanList);
- }
-
- public final void convertToCharacters(Object data, StringBuffer s) {
- if (data == null) {
- return;
- }
-
- final boolean[] value = (boolean[]) data;
- if (value.length == 0) {
- return;
- }
-
- // Insure conservately as all false
- s.ensureCapacity(value.length * 5);
-
- final int end = value.length - 1;
- for (int i = 0; i <= end; i++) {
- if (value[i]) {
- s.append("true");
- } else {
- s.append("false");
- }
- if (i != end) {
- s.append(' ');
- }
- }
- }
-
- public int getPrimtiveLengthFromOctetLength(int octetLength, int firstOctet) throws EncodingAlgorithmException {
- final int unusedBits = (firstOctet >> 4) & 0xFF;
- if (octetLength == 1) {
- if (unusedBits > 3) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.unusedBits4"));
- }
- return 4 - unusedBits;
- } else {
- if (unusedBits > 7) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.unusedBits8"));
- }
- return octetLength * 8 - 4 - unusedBits;
- }
- }
-
- public final void decodeFromBytesToBooleanArray(boolean[] bdata, int bstart, int blength, byte[] b, int start, int length) {
- int value = b[start++] & 0xFF;
- int bitPosition = 4;
- final int bend = bstart + blength;
- while (bstart < bend) {
- if (bitPosition == 8) {
- value = b[start++] & 0xFF;
- bitPosition = 0;
- }
-
- bdata[bstart++] = (value & BIT_TABLE[bitPosition++]) > 0;
- }
- }
-
- public void encodeToBytes(Object array, int astart, int alength, byte[] b, int start) {
- if (!(array instanceof boolean[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotBoolean"));
- }
-
- encodeToBytesFromBooleanArray((boolean[])array, astart, alength, b, start);
- }
-
- public void encodeToBytesFromBooleanArray(boolean[] array, int astart, int alength, byte[] b, int start) {
- final int mod = (alength + 4) % 8;
- final int unusedBits = (mod == 0) ? 0 : 8 - mod;
-
- int bitPosition = 4;
- int value = unusedBits << 4;
- final int aend = astart + alength;
- while (astart < aend) {
- if (array[astart++]) {
- value |= BIT_TABLE[bitPosition];
- }
-
- if (++bitPosition == 8) {
- b[start++] = (byte)value;
- bitPosition = value = 0;
- }
- }
-
- if (bitPosition > 0) {
- b[start] = (byte)value;
- }
- }
-
-
- /**
- *
- * Generate a boolean array from a list of Booleans.
- *
- * @param array The array
- *
- */
- private boolean[] generateArrayFromList(List array) {
- boolean[] bdata = new boolean[array.size()];
- for (int i = 0; i < bdata.length; i++) {
- bdata[i] = ((Boolean)array.get(i)).booleanValue();
- }
-
- return bdata;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BuiltInEncodingAlgorithm.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BuiltInEncodingAlgorithm.java
deleted file mode 100644
index 0ac52a7a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BuiltInEncodingAlgorithm.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.algorithm;
-
-import java.nio.CharBuffer;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithm;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-
-public abstract class BuiltInEncodingAlgorithm implements EncodingAlgorithm {
- protected final static Pattern SPACE_PATTERN = Pattern.compile("\\s");
-
- public abstract int getPrimtiveLengthFromOctetLength(int octetLength) throws EncodingAlgorithmException;
-
- public abstract int getOctetLengthFromPrimitiveLength(int primitiveLength);
-
- public abstract void encodeToBytes(Object array, int astart, int alength, byte[] b, int start);
-
- public interface WordListener {
- public void word(int start, int end);
- }
-
- public void matchWhiteSpaceDelimnatedWords(CharBuffer cb, WordListener wl) {
- Matcher m = SPACE_PATTERN.matcher(cb);
- int i = 0;
- int s = 0;
- while(m.find()) {
- s = m.start();
- if (s != i) {
- wl.word(i, s);
- }
- i = m.end();
- }
- if (i != cb.length())
- wl.word(i, cb.length());
- }
-
- public StringBuilder removeWhitespace(char[] ch, int start, int length) {
- StringBuilder buf = new StringBuilder();
- int firstNonWS = 0;
- int idx = 0;
- for (; idx < length; ++idx) {
- if (Character.isWhitespace(ch[idx + start])) {
- if (firstNonWS < idx) {
- buf.append(ch, firstNonWS + start, idx - firstNonWS);
- }
- firstNonWS = idx + 1;
- }
- }
- if (firstNonWS < idx) {
- buf.append(ch, firstNonWS + start, idx - firstNonWS);
- }
- return buf;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BuiltInEncodingAlgorithmFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BuiltInEncodingAlgorithmFactory.java
deleted file mode 100644
index 15c0becc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BuiltInEncodingAlgorithmFactory.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.algorithm;
-
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmIndexes;
-
-public final class BuiltInEncodingAlgorithmFactory {
-
- private final static BuiltInEncodingAlgorithm[] table =
- new BuiltInEncodingAlgorithm[EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END + 1];
-
- public final static HexadecimalEncodingAlgorithm hexadecimalEncodingAlgorithm = new HexadecimalEncodingAlgorithm();
-
- public final static BASE64EncodingAlgorithm base64EncodingAlgorithm = new BASE64EncodingAlgorithm();
-
- public final static BooleanEncodingAlgorithm booleanEncodingAlgorithm = new BooleanEncodingAlgorithm();
-
- public final static ShortEncodingAlgorithm shortEncodingAlgorithm = new ShortEncodingAlgorithm();
-
- public final static IntEncodingAlgorithm intEncodingAlgorithm = new IntEncodingAlgorithm();
-
- public final static LongEncodingAlgorithm longEncodingAlgorithm = new LongEncodingAlgorithm();
-
- public final static FloatEncodingAlgorithm floatEncodingAlgorithm = new FloatEncodingAlgorithm();
-
- public final static DoubleEncodingAlgorithm doubleEncodingAlgorithm = new DoubleEncodingAlgorithm();
-
- public final static UUIDEncodingAlgorithm uuidEncodingAlgorithm = new UUIDEncodingAlgorithm();
-
- static {
- table[EncodingAlgorithmIndexes.HEXADECIMAL] = hexadecimalEncodingAlgorithm;
- table[EncodingAlgorithmIndexes.BASE64] = base64EncodingAlgorithm;
- table[EncodingAlgorithmIndexes.SHORT] = shortEncodingAlgorithm;
- table[EncodingAlgorithmIndexes.INT] = intEncodingAlgorithm;
- table[EncodingAlgorithmIndexes.LONG] = longEncodingAlgorithm;
- table[EncodingAlgorithmIndexes.BOOLEAN] = booleanEncodingAlgorithm;
- table[EncodingAlgorithmIndexes.FLOAT] = floatEncodingAlgorithm;
- table[EncodingAlgorithmIndexes.DOUBLE] = doubleEncodingAlgorithm;
- table[EncodingAlgorithmIndexes.UUID] = uuidEncodingAlgorithm;
- }
-
- public static BuiltInEncodingAlgorithm getAlgorithm(int index) {
- return table[index];
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BuiltInEncodingAlgorithmState.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BuiltInEncodingAlgorithmState.java
deleted file mode 100644
index 58f3282d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/BuiltInEncodingAlgorithmState.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.algorithm;
-
-public class BuiltInEncodingAlgorithmState {
-
- public static final int INITIAL_LENGTH = 8;
-
- public boolean[] booleanArray = new boolean[INITIAL_LENGTH];
-
- public short[] shortArray = new short[INITIAL_LENGTH];
-
- public int[] intArray = new int[INITIAL_LENGTH];
-
- public long[] longArray = new long[INITIAL_LENGTH];
-
- public float[] floatArray = new float[INITIAL_LENGTH];
-
- public double[] doubleArray = new double[INITIAL_LENGTH];
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/DoubleEncodingAlgorithm.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/DoubleEncodingAlgorithm.java
deleted file mode 100644
index 71b173d4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/DoubleEncodingAlgorithm.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.algorithm;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.CharBuffer;
-import java.util.ArrayList;
-import java.util.List;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-
-
-public class DoubleEncodingAlgorithm extends IEEE754FloatingPointEncodingAlgorithm {
-
- public final int getPrimtiveLengthFromOctetLength(int octetLength) throws EncodingAlgorithmException {
- if (octetLength % DOUBLE_SIZE != 0) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().
- getString("message.lengthIsNotMultipleOfDouble", new Object[]{Integer.valueOf(DOUBLE_SIZE)}));
- }
-
- return octetLength / DOUBLE_SIZE;
- }
-
- public int getOctetLengthFromPrimitiveLength(int primitiveLength) {
- return primitiveLength * DOUBLE_SIZE;
- }
-
- public final Object decodeFromBytes(byte[] b, int start, int length) throws EncodingAlgorithmException {
- double[] data = new double[getPrimtiveLengthFromOctetLength(length)];
- decodeFromBytesToDoubleArray(data, 0, b, start, length);
-
- return data;
- }
-
- public final Object decodeFromInputStream(InputStream s) throws IOException {
- return decodeFromInputStreamToDoubleArray(s);
- }
-
-
- public void encodeToOutputStream(Object data, OutputStream s) throws IOException {
- if (!(data instanceof double[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotDouble"));
- }
-
- final double[] fdata = (double[])data;
-
- encodeToOutputStreamFromDoubleArray(fdata, s);
- }
-
- public final Object convertFromCharacters(char[] ch, int start, int length) {
- final CharBuffer cb = CharBuffer.wrap(ch, start, length);
- final List doubleList = new ArrayList();
-
- matchWhiteSpaceDelimnatedWords(cb,
- new WordListener() {
- public void word(int start, int end) {
- String fStringValue = cb.subSequence(start, end).toString();
- doubleList.add(Double.valueOf(fStringValue));
- }
- }
- );
-
- return generateArrayFromList(doubleList);
- }
-
- public final void convertToCharacters(Object data, StringBuffer s) {
- if (!(data instanceof double[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotDouble"));
- }
-
- final double[] fdata = (double[])data;
-
- convertToCharactersFromDoubleArray(fdata, s);
- }
-
-
- public final void decodeFromBytesToDoubleArray(double[] data, int fstart, byte[] b, int start, int length) {
- final int size = length / DOUBLE_SIZE;
- for (int i = 0; i < size; i++) {
- final long bits =
- ((long)(b[start++] & 0xFF) << 56) |
- ((long)(b[start++] & 0xFF) << 48) |
- ((long)(b[start++] & 0xFF) << 40) |
- ((long)(b[start++] & 0xFF) << 32) |
- ((long)(b[start++] & 0xFF) << 24) |
- ((long)(b[start++] & 0xFF) << 16) |
- ((long)(b[start++] & 0xFF) << 8) |
- (long)(b[start++] & 0xFF);
- data[fstart++] = Double.longBitsToDouble(bits);
- }
- }
-
- public final double[] decodeFromInputStreamToDoubleArray(InputStream s) throws IOException {
- final List doubleList = new ArrayList();
- final byte[] b = new byte[DOUBLE_SIZE];
-
- while (true) {
- int n = s.read(b);
- if (n != DOUBLE_SIZE) {
- if (n == -1) {
- break;
- }
-
- while(n != DOUBLE_SIZE) {
- final int m = s.read(b, n, DOUBLE_SIZE - n);
- if (m == -1) {
- throw new EOFException();
- }
- n += m;
- }
- }
-
- final long bits =
- ((long)(b[0] & 0xFF) << 56) |
- ((long)(b[1] & 0xFF) << 48) |
- ((long)(b[2] & 0xFF) << 40) |
- ((long)(b[3] & 0xFF) << 32) |
- ((b[4] & 0xFF) << 24) |
- ((b[5] & 0xFF) << 16) |
- ((b[6] & 0xFF) << 8) |
- (b[7] & 0xFF);
-
- doubleList.add(Double.valueOf(Double.longBitsToDouble(bits)));
- }
-
- return generateArrayFromList(doubleList);
- }
-
-
- public final void encodeToOutputStreamFromDoubleArray(double[] fdata, OutputStream s) throws IOException {
- for (int i = 0; i < fdata.length; i++) {
- final long bits = Double.doubleToLongBits(fdata[i]);
- s.write((int)((bits >>> 56) & 0xFF));
- s.write((int)((bits >>> 48) & 0xFF));
- s.write((int)((bits >>> 40) & 0xFF));
- s.write((int)((bits >>> 32) & 0xFF));
- s.write((int)((bits >>> 24) & 0xFF));
- s.write((int)((bits >>> 16) & 0xFF));
- s.write((int)((bits >>> 8) & 0xFF));
- s.write((int)(bits & 0xFF));
- }
- }
-
- public final void encodeToBytes(Object array, int astart, int alength, byte[] b, int start) {
- encodeToBytesFromDoubleArray((double[])array, astart, alength, b, start);
- }
-
- public final void encodeToBytesFromDoubleArray(double[] fdata, int fstart, int flength, byte[] b, int start) {
- final int fend = fstart + flength;
- for (int i = fstart; i < fend; i++) {
- final long bits = Double.doubleToLongBits(fdata[i]);
- b[start++] = (byte)((bits >>> 56) & 0xFF);
- b[start++] = (byte)((bits >>> 48) & 0xFF);
- b[start++] = (byte)((bits >>> 40) & 0xFF);
- b[start++] = (byte)((bits >>> 32) & 0xFF);
- b[start++] = (byte)((bits >>> 24) & 0xFF);
- b[start++] = (byte)((bits >>> 16) & 0xFF);
- b[start++] = (byte)((bits >>> 8) & 0xFF);
- b[start++] = (byte)(bits & 0xFF);
- }
- }
-
-
- public final void convertToCharactersFromDoubleArray(double[] fdata, StringBuffer s) {
- final int end = fdata.length - 1;
- for (int i = 0; i <= end; i++) {
- s.append(Double.toString(fdata[i]));
- if (i != end) {
- s.append(' ');
- }
- }
- }
-
-
- public final double[] generateArrayFromList(List array) {
- double[] fdata = new double[array.size()];
- for (int i = 0; i < fdata.length; i++) {
- fdata[i] = ((Double)array.get(i)).doubleValue();
- }
-
- return fdata;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/FloatEncodingAlgorithm.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/FloatEncodingAlgorithm.java
deleted file mode 100644
index 5399cd8e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/FloatEncodingAlgorithm.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.algorithm;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.CharBuffer;
-import java.util.ArrayList;
-import java.util.List;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-
-
-public class FloatEncodingAlgorithm extends IEEE754FloatingPointEncodingAlgorithm {
-
- public final int getPrimtiveLengthFromOctetLength(int octetLength) throws EncodingAlgorithmException {
- if (octetLength % FLOAT_SIZE != 0) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().
- getString("message.lengthNotMultipleOfFloat", new Object[]{Integer.valueOf(FLOAT_SIZE)}));
- }
-
- return octetLength / FLOAT_SIZE;
- }
-
- public int getOctetLengthFromPrimitiveLength(int primitiveLength) {
- return primitiveLength * FLOAT_SIZE;
- }
-
- public final Object decodeFromBytes(byte[] b, int start, int length) throws EncodingAlgorithmException {
- float[] data = new float[getPrimtiveLengthFromOctetLength(length)];
- decodeFromBytesToFloatArray(data, 0, b, start, length);
-
- return data;
- }
-
- public final Object decodeFromInputStream(InputStream s) throws IOException {
- return decodeFromInputStreamToFloatArray(s);
- }
-
-
- public void encodeToOutputStream(Object data, OutputStream s) throws IOException {
- if (!(data instanceof float[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotFloat"));
- }
-
- final float[] fdata = (float[])data;
-
- encodeToOutputStreamFromFloatArray(fdata, s);
- }
-
- public final Object convertFromCharacters(char[] ch, int start, int length) {
- final CharBuffer cb = CharBuffer.wrap(ch, start, length);
- final List floatList = new ArrayList();
-
- matchWhiteSpaceDelimnatedWords(cb,
- new WordListener() {
- public void word(int start, int end) {
- String fStringValue = cb.subSequence(start, end).toString();
- floatList.add(Float.valueOf(fStringValue));
- }
- }
- );
-
- return generateArrayFromList(floatList);
- }
-
- public final void convertToCharacters(Object data, StringBuffer s) {
- if (!(data instanceof float[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotFloat"));
- }
-
- final float[] fdata = (float[])data;
-
- convertToCharactersFromFloatArray(fdata, s);
- }
-
-
- public final void decodeFromBytesToFloatArray(float[] data, int fstart, byte[] b, int start, int length) {
- final int size = length / FLOAT_SIZE;
- for (int i = 0; i < size; i++) {
- final int bits = ((b[start++] & 0xFF) << 24) |
- ((b[start++] & 0xFF) << 16) |
- ((b[start++] & 0xFF) << 8) |
- (b[start++] & 0xFF);
- data[fstart++] = Float.intBitsToFloat(bits);
- }
- }
-
- public final float[] decodeFromInputStreamToFloatArray(InputStream s) throws IOException {
- final List floatList = new ArrayList();
- final byte[] b = new byte[FLOAT_SIZE];
-
- while (true) {
- int n = s.read(b);
- if (n != 4) {
- if (n == -1) {
- break;
- }
-
- while(n != 4) {
- final int m = s.read(b, n, FLOAT_SIZE - n);
- if (m == -1) {
- throw new EOFException();
- }
- n += m;
- }
- }
-
- final int bits = ((b[0] & 0xFF) << 24) |
- ((b[1] & 0xFF) << 16) |
- ((b[2] & 0xFF) << 8) |
- (b[3] & 0xFF);
- floatList.add(Float.valueOf(Float.intBitsToFloat(bits)));
- }
-
- return generateArrayFromList(floatList);
- }
-
-
- public final void encodeToOutputStreamFromFloatArray(float[] fdata, OutputStream s) throws IOException {
- for (int i = 0; i < fdata.length; i++) {
- final int bits = Float.floatToIntBits(fdata[i]);
- s.write((bits >>> 24) & 0xFF);
- s.write((bits >>> 16) & 0xFF);
- s.write((bits >>> 8) & 0xFF);
- s.write(bits & 0xFF);
- }
- }
-
- public final void encodeToBytes(Object array, int astart, int alength, byte[] b, int start) {
- encodeToBytesFromFloatArray((float[])array, astart, alength, b, start);
- }
-
- public final void encodeToBytesFromFloatArray(float[] fdata, int fstart, int flength, byte[] b, int start) {
- final int fend = fstart + flength;
- for (int i = fstart; i < fend; i++) {
- final int bits = Float.floatToIntBits(fdata[i]);
- b[start++] = (byte)((bits >>> 24) & 0xFF);
- b[start++] = (byte)((bits >>> 16) & 0xFF);
- b[start++] = (byte)((bits >>> 8) & 0xFF);
- b[start++] = (byte)(bits & 0xFF);
- }
- }
-
-
- public final void convertToCharactersFromFloatArray(float[] fdata, StringBuffer s) {
- final int end = fdata.length - 1;
- for (int i = 0; i <= end; i++) {
- s.append(Float.toString(fdata[i]));
- if (i != end) {
- s.append(' ');
- }
- }
- }
-
-
- public final float[] generateArrayFromList(List array) {
- float[] fdata = new float[array.size()];
- for (int i = 0; i < fdata.length; i++) {
- fdata[i] = ((Float)array.get(i)).floatValue();
- }
-
- return fdata;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/HexadecimalEncodingAlgorithm.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/HexadecimalEncodingAlgorithm.java
deleted file mode 100644
index 1f3b7448..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/HexadecimalEncodingAlgorithm.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.algorithm;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class HexadecimalEncodingAlgorithm extends BuiltInEncodingAlgorithm {
- private static final char NIBBLE_TO_HEXADECIMAL_TABLE[] =
- { '0','1','2','3','4','5','6','7',
- '8','9','A','B','C','D','E','F' };
-
- private static final int HEXADECIMAL_TO_NIBBLE_TABLE[] = {
- /*'0'*/ 0,
- /*'1'*/ 1,
- /*'2'*/ 2,
- /*'3'*/ 3,
- /*'4'*/ 4,
- /*'5'*/ 5,
- /*'6'*/ 6,
- /*'7'*/ 7,
- /*'8'*/ 8,
- /*'9'*/ 9, -1, -1, -1, -1, -1, -1, -1,
- /*'A'*/ 10,
- /*'B'*/ 11,
- /*'C'*/ 12,
- /*'D'*/ 13,
- /*'E'*/ 14,
- /*'F'*/ 15,
- /*'G'-'Z'*/-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
- /*'[' - '`'*/ -1, -1, -1, -1, -1, -1,
- /*'a'*/ 10,
- /*'b'*/ 11,
- /*'c'*/ 12,
- /*'d'*/ 13,
- /*'e'*/ 14,
- /*'f'*/ 15 };
-
- public final Object decodeFromBytes(byte[] b, int start, int length) throws EncodingAlgorithmException {
- final byte[] data = new byte[length];
- System.arraycopy(b, start, data, 0, length);
- return data;
- }
-
- public final Object decodeFromInputStream(InputStream s) throws IOException {
- throw new UnsupportedOperationException(CommonResourceBundle.getInstance().getString("message.notImplemented"));
- }
-
-
- public void encodeToOutputStream(Object data, OutputStream s) throws IOException {
- if (!(data instanceof byte[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotByteArray"));
- }
-
- s.write((byte[])data);
- }
-
- public final Object convertFromCharacters(char[] ch, int start, int length) {
- if (length == 0) {
- return new byte[0];
- }
-
- StringBuilder encodedValue = removeWhitespace(ch, start, length);
- int encodedLength = encodedValue.length();
- if (encodedLength == 0) {
- return new byte[0];
- }
-
- int valueLength = encodedValue.length() / 2;
- byte[] value = new byte[valueLength];
-
- int encodedIdx = 0;
- for (int i = 0; i < valueLength; ++i) {
- int nibble1 = HEXADECIMAL_TO_NIBBLE_TABLE[encodedValue.charAt(encodedIdx++) - '0'];
- int nibble2 = HEXADECIMAL_TO_NIBBLE_TABLE[encodedValue.charAt(encodedIdx++) - '0'];
- value[i] = (byte) ((nibble1 << 4) | nibble2);
- }
-
- return value;
- }
-
- public final void convertToCharacters(Object data, StringBuffer s) {
- if (data == null) {
- return;
- }
- final byte[] value = (byte[]) data;
- if (value.length == 0) {
- return;
- }
-
- s.ensureCapacity(value.length * 2);
- for (int i = 0; i < value.length; ++i) {
- s.append(NIBBLE_TO_HEXADECIMAL_TABLE[(value[i] >>> 4) & 0xf]);
- s.append(NIBBLE_TO_HEXADECIMAL_TABLE[value[i] & 0xf]);
- }
- }
-
-
-
- public final int getPrimtiveLengthFromOctetLength(int octetLength) throws EncodingAlgorithmException {
- return octetLength * 2;
- }
-
- public int getOctetLengthFromPrimitiveLength(int primitiveLength) {
- return primitiveLength / 2;
- }
-
- public final void encodeToBytes(Object array, int astart, int alength, byte[] b, int start) {
- System.arraycopy((byte[])array, astart, b, start, alength);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/IEEE754FloatingPointEncodingAlgorithm.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/IEEE754FloatingPointEncodingAlgorithm.java
deleted file mode 100644
index 7d592a94..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/IEEE754FloatingPointEncodingAlgorithm.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.algorithm;
-
-public abstract class IEEE754FloatingPointEncodingAlgorithm extends BuiltInEncodingAlgorithm {
- public final static int FLOAT_SIZE = 4;
- public final static int DOUBLE_SIZE = 8;
-
- public final static int FLOAT_MAX_CHARACTER_SIZE = 14;
- public final static int DOUBLE_MAX_CHARACTER_SIZE = 24;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/IntEncodingAlgorithm.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/IntEncodingAlgorithm.java
deleted file mode 100644
index 849bde7e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/IntEncodingAlgorithm.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.algorithm;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.CharBuffer;
-import java.util.ArrayList;
-import java.util.List;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-
-
-public class IntEncodingAlgorithm extends IntegerEncodingAlgorithm {
-
- public final int getPrimtiveLengthFromOctetLength(int octetLength) throws EncodingAlgorithmException {
- if (octetLength % INT_SIZE != 0) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().
- getString("message.lengthNotMultipleOfInt", new Object[]{Integer.valueOf(INT_SIZE)}));
- }
-
- return octetLength / INT_SIZE;
- }
-
- public int getOctetLengthFromPrimitiveLength(int primitiveLength) {
- return primitiveLength * INT_SIZE;
- }
-
- public final Object decodeFromBytes(byte[] b, int start, int length) throws EncodingAlgorithmException {
- int[] data = new int[getPrimtiveLengthFromOctetLength(length)];
- decodeFromBytesToIntArray(data, 0, b, start, length);
-
- return data;
- }
-
- public final Object decodeFromInputStream(InputStream s) throws IOException {
- return decodeFromInputStreamToIntArray(s);
- }
-
-
- public void encodeToOutputStream(Object data, OutputStream s) throws IOException {
- if (!(data instanceof int[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotIntArray"));
- }
-
- final int[] idata = (int[])data;
-
- encodeToOutputStreamFromIntArray(idata, s);
- }
-
-
- public final Object convertFromCharacters(char[] ch, int start, int length) {
- final CharBuffer cb = CharBuffer.wrap(ch, start, length);
- final List integerList = new ArrayList();
-
- matchWhiteSpaceDelimnatedWords(cb,
- new WordListener() {
- public void word(int start, int end) {
- String iStringValue = cb.subSequence(start, end).toString();
- integerList.add(Integer.valueOf(iStringValue));
- }
- }
- );
-
- return generateArrayFromList(integerList);
- }
-
- public final void convertToCharacters(Object data, StringBuffer s) {
- if (!(data instanceof int[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotIntArray"));
- }
-
- final int[] idata = (int[])data;
-
- convertToCharactersFromIntArray(idata, s);
- }
-
-
- public final void decodeFromBytesToIntArray(int[] idata, int istart, byte[] b, int start, int length) {
- final int size = length / INT_SIZE;
- for (int i = 0; i < size; i++) {
- idata[istart++] = ((b[start++] & 0xFF) << 24) |
- ((b[start++] & 0xFF) << 16) |
- ((b[start++] & 0xFF) << 8) |
- (b[start++] & 0xFF);
- }
- }
-
- public final int[] decodeFromInputStreamToIntArray(InputStream s) throws IOException {
- final List integerList = new ArrayList();
- final byte[] b = new byte[INT_SIZE];
-
- while (true) {
- int n = s.read(b);
- if (n != 4) {
- if (n == -1) {
- break;
- }
-
- while(n != 4) {
- final int m = s.read(b, n, INT_SIZE - n);
- if (m == -1) {
- throw new EOFException();
- }
- n += m;
- }
- }
-
- final int i = ((b[0] & 0xFF) << 24) |
- ((b[1] & 0xFF) << 16) |
- ((b[2] & 0xFF) << 8) |
- (b[3] & 0xFF);
- integerList.add(Integer.valueOf(i));
- }
-
- return generateArrayFromList(integerList);
- }
-
-
- public final void encodeToOutputStreamFromIntArray(int[] idata, OutputStream s) throws IOException {
- for (int i = 0; i < idata.length; i++) {
- final int bits = idata[i];
- s.write((bits >>> 24) & 0xFF);
- s.write((bits >>> 16) & 0xFF);
- s.write((bits >>> 8) & 0xFF);
- s.write(bits & 0xFF);
- }
- }
-
- public final void encodeToBytes(Object array, int astart, int alength, byte[] b, int start) {
- encodeToBytesFromIntArray((int[])array, astart, alength, b, start);
- }
-
- public final void encodeToBytesFromIntArray(int[] idata, int istart, int ilength, byte[] b, int start) {
- final int iend = istart + ilength;
- for (int i = istart; i < iend; i++) {
- final int bits = idata[i];
- b[start++] = (byte)((bits >>> 24) & 0xFF);
- b[start++] = (byte)((bits >>> 16) & 0xFF);
- b[start++] = (byte)((bits >>> 8) & 0xFF);
- b[start++] = (byte)(bits & 0xFF);
- }
- }
-
-
- public final void convertToCharactersFromIntArray(int[] idata, StringBuffer s) {
- final int end = idata.length - 1;
- for (int i = 0; i <= end; i++) {
- s.append(Integer.toString(idata[i]));
- if (i != end) {
- s.append(' ');
- }
- }
- }
-
-
- public final int[] generateArrayFromList(List array) {
- int[] idata = new int[array.size()];
- for (int i = 0; i < idata.length; i++) {
- idata[i] = ((Integer)array.get(i)).intValue();
- }
-
- return idata;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/IntegerEncodingAlgorithm.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/IntegerEncodingAlgorithm.java
deleted file mode 100644
index 57021cca..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/IntegerEncodingAlgorithm.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.algorithm;
-
-public abstract class IntegerEncodingAlgorithm extends BuiltInEncodingAlgorithm {
- public final static int SHORT_SIZE = 2;
- public final static int INT_SIZE = 4;
- public final static int LONG_SIZE = 8;
-
- public final static int SHORT_MAX_CHARACTER_SIZE = 6;
- public final static int INT_MAX_CHARACTER_SIZE = 11;
- public final static int LONG_MAX_CHARACTER_SIZE = 20;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/LongEncodingAlgorithm.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/LongEncodingAlgorithm.java
deleted file mode 100644
index 012539fb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/LongEncodingAlgorithm.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.algorithm;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.CharBuffer;
-import java.util.ArrayList;
-import java.util.List;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-
-public class LongEncodingAlgorithm extends IntegerEncodingAlgorithm {
-
- public int getPrimtiveLengthFromOctetLength(int octetLength) throws EncodingAlgorithmException {
- if (octetLength % LONG_SIZE != 0) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().
- getString("message.lengthNotMultipleOfLong", new Object[]{Integer.valueOf(LONG_SIZE)}));
- }
-
- return octetLength / LONG_SIZE;
- }
-
- public int getOctetLengthFromPrimitiveLength(int primitiveLength) {
- return primitiveLength * LONG_SIZE;
- }
-
- public final Object decodeFromBytes(byte[] b, int start, int length) throws EncodingAlgorithmException {
- long[] data = new long[getPrimtiveLengthFromOctetLength(length)];
- decodeFromBytesToLongArray(data, 0, b, start, length);
-
- return data;
- }
-
- public final Object decodeFromInputStream(InputStream s) throws IOException {
- return decodeFromInputStreamToIntArray(s);
- }
-
-
- public void encodeToOutputStream(Object data, OutputStream s) throws IOException {
- if (!(data instanceof long[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotLongArray"));
- }
-
- final long[] ldata = (long[])data;
-
- encodeToOutputStreamFromLongArray(ldata, s);
- }
-
-
- public Object convertFromCharacters(char[] ch, int start, int length) {
- final CharBuffer cb = CharBuffer.wrap(ch, start, length);
- final List longList = new ArrayList();
-
- matchWhiteSpaceDelimnatedWords(cb,
- new WordListener() {
- public void word(int start, int end) {
- String lStringValue = cb.subSequence(start, end).toString();
- longList.add(Long.valueOf(lStringValue));
- }
- }
- );
-
- return generateArrayFromList(longList);
- }
-
- public void convertToCharacters(Object data, StringBuffer s) {
- if (!(data instanceof long[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotLongArray"));
- }
-
- final long[] ldata = (long[])data;
-
- convertToCharactersFromLongArray(ldata, s);
- }
-
-
- public final void decodeFromBytesToLongArray(long[] ldata, int istart, byte[] b, int start, int length) {
- final int size = length / LONG_SIZE;
- for (int i = 0; i < size; i++) {
- ldata[istart++] =
- ((long)(b[start++] & 0xFF) << 56) |
- ((long)(b[start++] & 0xFF) << 48) |
- ((long)(b[start++] & 0xFF) << 40) |
- ((long)(b[start++] & 0xFF) << 32) |
- ((long)(b[start++] & 0xFF) << 24) |
- ((long)(b[start++] & 0xFF) << 16) |
- ((long)(b[start++] & 0xFF) << 8) |
- (long)(b[start++] & 0xFF);
- }
- }
-
- public final long[] decodeFromInputStreamToIntArray(InputStream s) throws IOException {
- final List longList = new ArrayList();
- final byte[] b = new byte[LONG_SIZE];
-
- while (true) {
- int n = s.read(b);
- if (n != LONG_SIZE) {
- if (n == -1) {
- break;
- }
-
- while(n != LONG_SIZE) {
- final int m = s.read(b, n, LONG_SIZE - n);
- if (m == -1) {
- throw new EOFException();
- }
- n += m;
- }
- }
-
- final long l =
- (((long) b[0] << 56) +
- ((long) (b[1] & 0xFF) << 48) +
- ((long) (b[2] & 0xFF) << 40) +
- ((long) (b[3] & 0xFF) << 32) +
- ((long) (b[4] & 0xFF) << 24) +
- ((b[5] & 0xFF) << 16) +
- ((b[6] & 0xFF) << 8) +
- ((b[7] & 0xFF) << 0));
-
- longList.add(Long.valueOf(l));
- }
-
- return generateArrayFromList(longList);
- }
-
-
- public final void encodeToOutputStreamFromLongArray(long[] ldata, OutputStream s) throws IOException {
- for (int i = 0; i < ldata.length; i++) {
- final long bits = ldata[i];
- s.write((int)((bits >>> 56) & 0xFF));
- s.write((int)((bits >>> 48) & 0xFF));
- s.write((int)((bits >>> 40) & 0xFF));
- s.write((int)((bits >>> 32) & 0xFF));
- s.write((int)((bits >>> 24) & 0xFF));
- s.write((int)((bits >>> 16) & 0xFF));
- s.write((int)((bits >>> 8) & 0xFF));
- s.write((int)(bits & 0xFF));
- }
- }
-
- public final void encodeToBytes(Object array, int astart, int alength, byte[] b, int start) {
- encodeToBytesFromLongArray((long[])array, astart, alength, b, start);
- }
-
- public final void encodeToBytesFromLongArray(long[] ldata, int lstart, int llength, byte[] b, int start) {
- final int lend = lstart + llength;
- for (int i = lstart; i < lend; i++) {
- final long bits = ldata[i];
- b[start++] = (byte)((bits >>> 56) & 0xFF);
- b[start++] = (byte)((bits >>> 48) & 0xFF);
- b[start++] = (byte)((bits >>> 40) & 0xFF);
- b[start++] = (byte)((bits >>> 32) & 0xFF);
- b[start++] = (byte)((bits >>> 24) & 0xFF);
- b[start++] = (byte)((bits >>> 16) & 0xFF);
- b[start++] = (byte)((bits >>> 8) & 0xFF);
- b[start++] = (byte)(bits & 0xFF);
- }
- }
-
-
- public final void convertToCharactersFromLongArray(long[] ldata, StringBuffer s) {
- final int end = ldata.length - 1;
- for (int i = 0; i <= end; i++) {
- s.append(Long.toString(ldata[i]));
- if (i != end) {
- s.append(' ');
- }
- }
- }
-
-
- public final long[] generateArrayFromList(List array) {
- long[] ldata = new long[array.size()];
- for (int i = 0; i < ldata.length; i++) {
- ldata[i] = ((Long)array.get(i)).longValue();
- }
-
- return ldata;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/ShortEncodingAlgorithm.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/ShortEncodingAlgorithm.java
deleted file mode 100644
index ef5bc02f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/ShortEncodingAlgorithm.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.algorithm;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.CharBuffer;
-import java.util.ArrayList;
-import java.util.List;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-
-/**
- * An encoder for handling Short values. Suppports the builtin SHORT encoder.
- *
- * @author Alan Hudson
- * @author Paul Sandoz
- */
-public class ShortEncodingAlgorithm extends IntegerEncodingAlgorithm {
-
- public final int getPrimtiveLengthFromOctetLength(int octetLength) throws EncodingAlgorithmException {
- if (octetLength % SHORT_SIZE != 0) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().
- getString("message.lengthNotMultipleOfShort", new Object[]{Integer.valueOf(SHORT_SIZE)}));
- }
-
- return octetLength / SHORT_SIZE;
- }
-
- public int getOctetLengthFromPrimitiveLength(int primitiveLength) {
- return primitiveLength * SHORT_SIZE;
- }
-
- public final Object decodeFromBytes(byte[] b, int start, int length) throws EncodingAlgorithmException {
- short[] data = new short[getPrimtiveLengthFromOctetLength(length)];
- decodeFromBytesToShortArray(data, 0, b, start, length);
-
- return data;
- }
-
- public final Object decodeFromInputStream(InputStream s) throws IOException {
- return decodeFromInputStreamToShortArray(s);
- }
-
-
- public void encodeToOutputStream(Object data, OutputStream s) throws IOException {
- if (!(data instanceof short[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotShortArray"));
- }
-
- final short[] idata = (short[])data;
-
- encodeToOutputStreamFromShortArray(idata, s);
- }
-
-
- public final Object convertFromCharacters(char[] ch, int start, int length) {
- final CharBuffer cb = CharBuffer.wrap(ch, start, length);
- final List shortList = new ArrayList();
-
- matchWhiteSpaceDelimnatedWords(cb,
- new WordListener() {
- public void word(int start, int end) {
- String iStringValue = cb.subSequence(start, end).toString();
- shortList.add(Short.valueOf(iStringValue));
- }
- }
- );
-
- return generateArrayFromList(shortList);
- }
-
- public final void convertToCharacters(Object data, StringBuffer s) {
- if (!(data instanceof short[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotShortArray"));
- }
-
- final short[] idata = (short[])data;
-
- convertToCharactersFromShortArray(idata, s);
- }
-
-
- public final void decodeFromBytesToShortArray(short[] sdata, int istart, byte[] b, int start, int length) {
- final int size = length / SHORT_SIZE;
- for (int i = 0; i < size; i++) {
- sdata[istart++] = (short) (((b[start++] & 0xFF) << 8) |
- (b[start++] & 0xFF));
- }
- }
-
- public final short[] decodeFromInputStreamToShortArray(InputStream s) throws IOException {
- final List shortList = new ArrayList();
- final byte[] b = new byte[SHORT_SIZE];
-
- while (true) {
- int n = s.read(b);
- if (n != 2) {
- if (n == -1) {
- break;
- }
-
- while(n != 2) {
- final int m = s.read(b, n, SHORT_SIZE - n);
- if (m == -1) {
- throw new EOFException();
- }
- n += m;
- }
- }
-
- final int i = ((b[0] & 0xFF) << 8) |
- (b[1] & 0xFF);
- shortList.add(Short.valueOf((short)i));
- }
-
- return generateArrayFromList(shortList);
- }
-
-
- public final void encodeToOutputStreamFromShortArray(short[] idata, OutputStream s) throws IOException {
- for (int i = 0; i < idata.length; i++) {
- final int bits = idata[i];
- s.write((bits >>> 8) & 0xFF);
- s.write(bits & 0xFF);
- }
- }
-
- public final void encodeToBytes(Object array, int astart, int alength, byte[] b, int start) {
- encodeToBytesFromShortArray((short[])array, astart, alength, b, start);
- }
-
- public final void encodeToBytesFromShortArray(short[] sdata, int istart, int ilength, byte[] b, int start) {
- final int iend = istart + ilength;
- for (int i = istart; i < iend; i++) {
- final short bits = sdata[i];
- b[start++] = (byte)((bits >>> 8) & 0xFF);
- b[start++] = (byte)(bits & 0xFF);
- }
- }
-
-
- public final void convertToCharactersFromShortArray(short[] sdata, StringBuffer s) {
- final int end = sdata.length - 1;
- for (int i = 0; i <= end; i++) {
- s.append(Short.toString(sdata[i]));
- if (i != end) {
- s.append(' ');
- }
- }
- }
-
-
- public final short[] generateArrayFromList(List array) {
- short[] sdata = new short[array.size()];
- for (int i = 0; i < sdata.length; i++) {
- sdata[i] = ((Short)array.get(i)).shortValue();
- }
-
- return sdata;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/UUIDEncodingAlgorithm.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/UUIDEncodingAlgorithm.java
deleted file mode 100644
index 7d6183b9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/algorithm/UUIDEncodingAlgorithm.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.algorithm;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.nio.CharBuffer;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class UUIDEncodingAlgorithm extends LongEncodingAlgorithm {
-
- public final int getPrimtiveLengthFromOctetLength(int octetLength) throws EncodingAlgorithmException {
- if (octetLength % (LONG_SIZE * 2) != 0) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().
- getString("message.lengthNotMultipleOfUUID",new Object[]{Integer.valueOf(LONG_SIZE * 2)}));
- }
-
- return octetLength / LONG_SIZE;
- }
-
- public final Object convertFromCharacters(char[] ch, int start, int length) {
- final CharBuffer cb = CharBuffer.wrap(ch, start, length);
- final List longList = new ArrayList();
-
- matchWhiteSpaceDelimnatedWords(cb,
- new WordListener() {
- public void word(int start, int end) {
- String uuidValue = cb.subSequence(start, end).toString();
- fromUUIDString(uuidValue);
- longList.add(Long.valueOf(_msb));
- longList.add(Long.valueOf(_lsb));
- }
- }
- );
-
- return generateArrayFromList(longList);
- }
-
- public final void convertToCharacters(Object data, StringBuffer s) {
- if (!(data instanceof long[])) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.dataNotLongArray"));
- }
-
- final long[] ldata = (long[])data;
-
- final int end = ldata.length - 2;
- for (int i = 0; i <= end; i += 2) {
- s.append(toUUIDString(ldata[i], ldata[i + 1]));
- if (i != end) {
- s.append(' ');
- }
- }
- }
-
-
- private long _msb;
- private long _lsb;
-
- final void fromUUIDString(String name) {
- String[] components = name.split("-");
- if (components.length != 5)
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().
- getString("message.invalidUUID", new Object[]{name}));
-
- for (int i=0; i<5; i++)
- components[i] = "0x"+components[i];
-
- _msb = Long.parseLong(components[0], 16);
- _msb <<= 16;
- _msb |= Long.parseLong(components[1], 16);
- _msb <<= 16;
- _msb |= Long.parseLong(components[2], 16);
-
- _lsb = Long.parseLong(components[3], 16);
- _lsb <<= 48;
- _lsb |= Long.parseLong(components[4], 16);
- }
-
- final String toUUIDString(long msb, long lsb) {
- return (digits(msb >> 32, 8) + "-" +
- digits(msb >> 16, 4) + "-" +
- digits(msb, 4) + "-" +
- digits(lsb >> 48, 4) + "-" +
- digits(lsb, 12));
- }
-
- final String digits(long val, int digits) {
- long hi = 1L << (digits * 4);
- return Long.toHexString(hi | (val & (hi - 1))).substring(1);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/alphabet/BuiltInRestrictedAlphabets.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/alphabet/BuiltInRestrictedAlphabets.java
deleted file mode 100644
index 3b1cbd19..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/alphabet/BuiltInRestrictedAlphabets.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.alphabet;
-
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.org.jvnet.fastinfoset.RestrictedAlphabet;
-
-public final class BuiltInRestrictedAlphabets {
- public final static char[][] table =
- new char[EncodingConstants.RESTRICTED_ALPHABET_BUILTIN_END + 1][];
-
- static {
- table[RestrictedAlphabet.NUMERIC_CHARACTERS_INDEX] = RestrictedAlphabet.NUMERIC_CHARACTERS.toCharArray();
- table[RestrictedAlphabet.DATE_TIME_CHARACTERS_INDEX] = RestrictedAlphabet.DATE_TIME_CHARACTERS.toCharArray();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/dom/DOMDocumentParser.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/dom/DOMDocumentParser.java
deleted file mode 100644
index 0eb199f9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/dom/DOMDocumentParser.java
+++ /dev/null
@@ -1,1057 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.dom;
-
-import com.sun.xml.internal.fastinfoset.Decoder;
-import com.sun.xml.internal.fastinfoset.DecoderStateTables;
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import com.sun.xml.internal.fastinfoset.algorithm.BuiltInEncodingAlgorithmFactory;
-import com.sun.xml.internal.fastinfoset.util.CharArray;
-import com.sun.xml.internal.fastinfoset.util.CharArrayString;
-import java.io.IOException;
-import java.io.InputStream;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithm;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmIndexes;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetException;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-import com.sun.xml.internal.fastinfoset.util.DuplicateAttributeVerifier;
-import org.w3c.dom.Text;
-
-/**
- * The Fast Infoset DOM parser.
- * <p>
- * Instantiate this parser to parse a fast infoset document in accordance
- * with the DOM API.
- *
- */
-public class DOMDocumentParser extends Decoder {
- protected Document _document;
-
- protected Node _currentNode;
-
- protected Element _currentElement;
-
- protected Attr[] _namespaceAttributes = new Attr[16];
-
- protected int _namespaceAttributesIndex;
-
- protected int[] _namespacePrefixes = new int[16];
-
- protected int _namespacePrefixesIndex;
-
- /**
- * Parse a fast infoset document into a {@link Document} instance.
- * <p>
- * {@link Node}s will be created and appended to the {@link Document}
- * instance.
- *
- * @param d the {@link Document} instance.
- * @param s the input stream containing the fast infoset document.
- */
- public void parse(Document d, InputStream s) throws FastInfosetException, IOException {
- _currentNode = _document = d;
- _namespaceAttributesIndex = 0;
-
- parse(s);
- }
-
- protected final void parse(InputStream s) throws FastInfosetException, IOException {
- setInputStream(s);
- parse();
- }
-
- protected void resetOnError() {
- _namespacePrefixesIndex = 0;
-
- if (_v == null) {
- _prefixTable.clearCompletely();
- }
- _duplicateAttributeVerifier.clear();
- }
-
- protected final void parse() throws FastInfosetException, IOException {
- try {
- reset();
- decodeHeader();
- processDII();
- } catch (RuntimeException e) {
- resetOnError();
- // Wrap runtime exception
- throw new FastInfosetException(e);
- } catch (FastInfosetException e) {
- resetOnError();
- throw e;
- } catch (IOException e) {
- resetOnError();
- throw e;
- }
- }
-
- protected final void processDII() throws FastInfosetException, IOException {
- _b = read();
- if (_b > 0) {
- processDIIOptionalProperties();
- }
-
- // Decode one Document Type II, Comment IIs, PI IIs and one EII
- boolean firstElementHasOccured = false;
- boolean documentTypeDeclarationOccured = false;
- while(!_terminate || !firstElementHasOccured) {
- _b = read();
- switch(DecoderStateTables.DII(_b)) {
- case DecoderStateTables.EII_NO_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[_b], false);
- firstElementHasOccured = true;
- break;
- case DecoderStateTables.EII_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[_b & EncodingConstants.INTEGER_3RD_BIT_SMALL_MASK], true);
- firstElementHasOccured = true;
- break;
- case DecoderStateTables.EII_INDEX_MEDIUM:
- processEII(decodeEIIIndexMedium(), (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- firstElementHasOccured = true;
- break;
- case DecoderStateTables.EII_INDEX_LARGE:
- processEII(decodeEIIIndexLarge(), (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- firstElementHasOccured = true;
- break;
- case DecoderStateTables.EII_LITERAL:
- {
- final QualifiedName qn = processLiteralQualifiedName(
- _b & EncodingConstants.LITERAL_QNAME_PREFIX_NAMESPACE_NAME_MASK,
- _elementNameTable.getNext());
- _elementNameTable.add(qn);
- processEII(qn, (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- firstElementHasOccured = true;
- break;
- }
- case DecoderStateTables.EII_NAMESPACES:
- processEIIWithNamespaces();
- firstElementHasOccured = true;
- break;
- case DecoderStateTables.DOCUMENT_TYPE_DECLARATION_II:
- {
- if (documentTypeDeclarationOccured) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.secondOccurenceOfDTDII"));
- }
- documentTypeDeclarationOccured = true;
-
- String system_identifier = ((_b & EncodingConstants.DOCUMENT_TYPE_SYSTEM_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : null;
- String public_identifier = ((_b & EncodingConstants.DOCUMENT_TYPE_PUBLIC_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : null;
-
- _b = read();
- while (_b == EncodingConstants.PROCESSING_INSTRUCTION) {
- switch(decodeNonIdentifyingStringOnFirstBit()) {
- case NISTRING_STRING:
- if (_addToTable) {
- _v.otherString.add(new CharArray(_charBuffer, 0, _charBufferLength, true));
- }
- break;
- case NISTRING_ENCODING_ALGORITHM:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.processingIIWithEncodingAlgorithm"));
- case NISTRING_INDEX:
- break;
- case NISTRING_EMPTY_STRING:
- break;
- }
- _b = read();
- }
- if ((_b & EncodingConstants.TERMINATOR) != EncodingConstants.TERMINATOR) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.processingInstructionIIsNotTerminatedCorrectly"));
- }
- if (_b == EncodingConstants.DOUBLE_TERMINATOR) {
- _terminate = true;
- }
-
- _notations.clear();
- _unparsedEntities.clear();
- /*
- * TODO
- * Report All events associated with DTD, PIs, notations etc
- */
- break;
- }
- case DecoderStateTables.COMMENT_II:
- processCommentII();
- break;
- case DecoderStateTables.PROCESSING_INSTRUCTION_II:
- processProcessingII();
- break;
- case DecoderStateTables.TERMINATOR_DOUBLE:
- _doubleTerminate = true;
- case DecoderStateTables.TERMINATOR_SINGLE:
- _terminate = true;
- break;
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.IllegalStateDecodingDII"));
- }
- }
-
- // Decode any remaining Comment IIs, PI IIs
- while(!_terminate) {
- _b = read();
- switch(DecoderStateTables.DII(_b)) {
- case DecoderStateTables.COMMENT_II:
- processCommentII();
- break;
- case DecoderStateTables.PROCESSING_INSTRUCTION_II:
- processProcessingII();
- break;
- case DecoderStateTables.TERMINATOR_DOUBLE:
- _doubleTerminate = true;
- case DecoderStateTables.TERMINATOR_SINGLE:
- _terminate = true;
- break;
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.IllegalStateDecodingDII"));
- }
- }
-
- }
-
- protected final void processDIIOptionalProperties() throws FastInfosetException, IOException {
- // Optimize for the most common case
- if (_b == EncodingConstants.DOCUMENT_INITIAL_VOCABULARY_FLAG) {
- decodeInitialVocabulary();
- return;
- }
-
- if ((_b & EncodingConstants.DOCUMENT_ADDITIONAL_DATA_FLAG) > 0) {
- decodeAdditionalData();
- /*
- * TODO
- * how to report the additional data?
- */
- }
-
- if ((_b & EncodingConstants.DOCUMENT_INITIAL_VOCABULARY_FLAG) > 0) {
- decodeInitialVocabulary();
- }
-
- if ((_b & EncodingConstants.DOCUMENT_NOTATIONS_FLAG) > 0) {
- decodeNotations();
- // TODO Report notations
- }
-
- if ((_b & EncodingConstants.DOCUMENT_UNPARSED_ENTITIES_FLAG) > 0) {
- decodeUnparsedEntities();
- // TODO Report unparsed entities
- }
-
- if ((_b & EncodingConstants.DOCUMENT_CHARACTER_ENCODING_SCHEME) > 0) {
- /*String version = */decodeCharacterEncodingScheme();
- /*
- * TODO
- * how to report the character encoding scheme?
- */
- }
-
- if ((_b & EncodingConstants.DOCUMENT_STANDALONE_FLAG) > 0) {
- /*boolean standalone = (*/read()/* > 0) ? true : false*/ ;
- /*
- * TODO
- * how to report the standalone flag?
- */
- }
-
- if ((_b & EncodingConstants.DOCUMENT_VERSION_FLAG) > 0) {
- decodeVersion();
- /*
- * TODO
- * how to report the document version?
- */
- }
- }
-
- protected final void processEII(QualifiedName name, boolean hasAttributes) throws FastInfosetException, IOException {
- if (_prefixTable._currentInScope[name.prefixIndex] != name.namespaceNameIndex) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.qnameOfEIINotInScope"));
- }
-
- final Node parentCurrentNode = _currentNode;
-
- _currentNode = _currentElement = createElement(name.namespaceName, name.qName, name.localName);
-
- if (_namespaceAttributesIndex > 0) {
- for (int i = 0; i < _namespaceAttributesIndex; i++) {
- _currentElement.setAttributeNode(_namespaceAttributes[i]);
- _namespaceAttributes[i] = null;
- }
- _namespaceAttributesIndex = 0;
- }
-
- if (hasAttributes) {
- processAIIs();
- }
-
- parentCurrentNode.appendChild(_currentElement);
-
- while(!_terminate) {
- _b = read();
- switch(DecoderStateTables.EII(_b)) {
- case DecoderStateTables.EII_NO_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[_b], false);
- break;
- case DecoderStateTables.EII_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[_b & EncodingConstants.INTEGER_3RD_BIT_SMALL_MASK], true);
- break;
- case DecoderStateTables.EII_INDEX_MEDIUM:
- processEII(decodeEIIIndexMedium(), (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- break;
- case DecoderStateTables.EII_INDEX_LARGE:
- processEII(decodeEIIIndexLarge(), (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- break;
- case DecoderStateTables.EII_LITERAL:
- {
- final QualifiedName qn = processLiteralQualifiedName(
- _b & EncodingConstants.LITERAL_QNAME_PREFIX_NAMESPACE_NAME_MASK,
- _elementNameTable.getNext());
- _elementNameTable.add(qn);
- processEII(qn, (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- break;
- }
- case DecoderStateTables.EII_NAMESPACES:
- processEIIWithNamespaces();
- break;
- case DecoderStateTables.CII_UTF8_SMALL_LENGTH:
- {
- _octetBufferLength = (_b & EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_MASK)
- + 1;
- appendOrCreateTextData(processUtf8CharacterString());
- break;
- }
- case DecoderStateTables.CII_UTF8_MEDIUM_LENGTH:
- {
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_LIMIT;
- appendOrCreateTextData(processUtf8CharacterString());
- break;
- }
- case DecoderStateTables.CII_UTF8_LARGE_LENGTH:
- {
- _octetBufferLength = (read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read();
- _octetBufferLength += EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_LIMIT;
- appendOrCreateTextData(processUtf8CharacterString());
- break;
- }
- case DecoderStateTables.CII_UTF16_SMALL_LENGTH:
- {
- _octetBufferLength = (_b & EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_MASK)
- + 1;
- String v = decodeUtf16StringAsString();
- if ((_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0) {
- _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- }
-
- appendOrCreateTextData(v);
- break;
- }
- case DecoderStateTables.CII_UTF16_MEDIUM_LENGTH:
- {
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_LIMIT;
- String v = decodeUtf16StringAsString();
- if ((_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0) {
- _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- }
-
- appendOrCreateTextData(v);
- break;
- }
- case DecoderStateTables.CII_UTF16_LARGE_LENGTH:
- {
- _octetBufferLength = (read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read();
- _octetBufferLength += EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_LIMIT;
- String v = decodeUtf16StringAsString();
- if ((_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0) {
- _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- }
-
- appendOrCreateTextData(v);
- break;
- }
- case DecoderStateTables.CII_RA:
- {
- final boolean addToTable = (_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0;
-
- // Decode resitricted alphabet integer
- _identifier = (_b & 0x02) << 6;
- _b = read();
- _identifier |= (_b & 0xFC) >> 2;
-
- decodeOctetsOnSeventhBitOfNonIdentifyingStringOnThirdBit(_b);
-
- String v = decodeRestrictedAlphabetAsString();
- if (addToTable) {
- _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- }
-
- appendOrCreateTextData(v);
- break;
- }
- case DecoderStateTables.CII_EA:
- {
- final boolean addToTable = (_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0;
- // Decode encoding algorithm integer
- _identifier = (_b & 0x02) << 6;
- _b = read();
- _identifier |= (_b & 0xFC) >> 2;
-
- decodeOctetsOnSeventhBitOfNonIdentifyingStringOnThirdBit(_b);
- final String s = convertEncodingAlgorithmDataToCharacters(false);
- if (addToTable) {
- _characterContentChunkTable.add(s.toCharArray(), s.length());
- }
- appendOrCreateTextData(s);
- break;
- }
- case DecoderStateTables.CII_INDEX_SMALL:
- {
- final String s = _characterContentChunkTable.getString(_b & EncodingConstants.INTEGER_4TH_BIT_SMALL_MASK);
-
- appendOrCreateTextData(s);
- break;
- }
- case DecoderStateTables.CII_INDEX_MEDIUM:
- {
- final int index = (((_b & EncodingConstants.INTEGER_4TH_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_4TH_BIT_SMALL_LIMIT;
- final String s = _characterContentChunkTable.getString(index);
-
- appendOrCreateTextData(s);
- break;
- }
- case DecoderStateTables.CII_INDEX_LARGE:
- {
- int index = ((_b & EncodingConstants.INTEGER_4TH_BIT_LARGE_MASK) << 16) |
- (read() << 8) |
- read();
- index += EncodingConstants.INTEGER_4TH_BIT_MEDIUM_LIMIT;
- final String s = _characterContentChunkTable.getString(index);
-
- appendOrCreateTextData(s);
- break;
- }
- case DecoderStateTables.CII_INDEX_LARGE_LARGE:
- {
- int index = (read() << 16) |
- (read() << 8) |
- read();
- index += EncodingConstants.INTEGER_4TH_BIT_LARGE_LIMIT;
- final String s = _characterContentChunkTable.getString(index);
-
- appendOrCreateTextData(s);
- break;
- }
- case DecoderStateTables.COMMENT_II:
- processCommentII();
- break;
- case DecoderStateTables.PROCESSING_INSTRUCTION_II:
- processProcessingII();
- break;
- case DecoderStateTables.UNEXPANDED_ENTITY_REFERENCE_II:
- {
- String entity_reference_name = decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherNCName);
-
- String system_identifier = ((_b & EncodingConstants.UNEXPANDED_ENTITY_SYSTEM_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : null;
- String public_identifier = ((_b & EncodingConstants.UNEXPANDED_ENTITY_PUBLIC_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : null;
-
- // TODO create Node
- break;
- }
- case DecoderStateTables.TERMINATOR_DOUBLE:
- _doubleTerminate = true;
- case DecoderStateTables.TERMINATOR_SINGLE:
- _terminate = true;
- break;
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.IllegalStateDecodingEII"));
- }
- }
-
- _terminate = _doubleTerminate;
- _doubleTerminate = false;
-
- _currentNode = parentCurrentNode;
- }
-
- private void appendOrCreateTextData(String textData) {
- Node lastChild = _currentNode.getLastChild();
- if (lastChild instanceof Text) {
- ((Text) lastChild).appendData(textData);
- } else {
- _currentNode.appendChild(
- _document.createTextNode(textData));
- }
- }
-
- private final String processUtf8CharacterString() throws FastInfosetException, IOException {
- if ((_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0) {
- _characterContentChunkTable.ensureSize(_octetBufferLength);
- final int charactersOffset = _characterContentChunkTable._arrayIndex;
- decodeUtf8StringAsCharBuffer(_characterContentChunkTable._array, charactersOffset);
- _characterContentChunkTable.add(_charBufferLength);
- return _characterContentChunkTable.getString(_characterContentChunkTable._cachedIndex);
- } else {
- decodeUtf8StringAsCharBuffer();
- return new String(_charBuffer, 0, _charBufferLength);
- }
- }
-
- protected final void processEIIWithNamespaces() throws FastInfosetException, IOException {
- final boolean hasAttributes = (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0;
-
- if (++_prefixTable._declarationId == Integer.MAX_VALUE) {
- _prefixTable.clearDeclarationIds();
- }
-
- String prefix;
- Attr a = null;
- final int start = _namespacePrefixesIndex;
- int b = read();
- while ((b & EncodingConstants.NAMESPACE_ATTRIBUTE_MASK) == EncodingConstants.NAMESPACE_ATTRIBUTE) {
- if (_namespaceAttributesIndex == _namespaceAttributes.length) {
- final Attr[] newNamespaceAttributes = new Attr[_namespaceAttributesIndex * 3 / 2 + 1];
- System.arraycopy(_namespaceAttributes, 0, newNamespaceAttributes, 0, _namespaceAttributesIndex);
- _namespaceAttributes = newNamespaceAttributes;
- }
-
- if (_namespacePrefixesIndex == _namespacePrefixes.length) {
- final int[] namespaceAIIs = new int[_namespacePrefixesIndex * 3 / 2 + 1];
- System.arraycopy(_namespacePrefixes, 0, namespaceAIIs, 0, _namespacePrefixesIndex);
- _namespacePrefixes = namespaceAIIs;
- }
-
-
- switch (b & EncodingConstants.NAMESPACE_ATTRIBUTE_PREFIX_NAME_MASK) {
- // no prefix, no namespace
- // Undeclaration of default namespace
- case 0:
- a = createAttribute(
- EncodingConstants.XMLNS_NAMESPACE_NAME,
- EncodingConstants.XMLNS_NAMESPACE_PREFIX,
- EncodingConstants.XMLNS_NAMESPACE_PREFIX);
- a.setValue("");
-
- _prefixIndex = _namespaceNameIndex = _namespacePrefixes[_namespacePrefixesIndex++] = -1;
- break;
- // no prefix, namespace
- // Declaration of default namespace
- case 1:
- a = createAttribute(
- EncodingConstants.XMLNS_NAMESPACE_NAME,
- EncodingConstants.XMLNS_NAMESPACE_PREFIX,
- EncodingConstants.XMLNS_NAMESPACE_PREFIX);
- a.setValue(decodeIdentifyingNonEmptyStringOnFirstBitAsNamespaceName(false));
-
- _prefixIndex = _namespacePrefixes[_namespacePrefixesIndex++] = -1;
- break;
- // prefix, no namespace
- // Undeclaration of namespace
- case 2:
- prefix = decodeIdentifyingNonEmptyStringOnFirstBitAsPrefix(false);
- a = createAttribute(
- EncodingConstants.XMLNS_NAMESPACE_NAME,
- createQualifiedNameString(prefix),
- prefix);
- a.setValue("");
-
- _namespaceNameIndex = -1;
- _namespacePrefixes[_namespacePrefixesIndex++] = _prefixIndex;
- break;
- // prefix, namespace
- // Declaration of prefixed namespace
- case 3:
- prefix = decodeIdentifyingNonEmptyStringOnFirstBitAsPrefix(true);
- a = createAttribute(
- EncodingConstants.XMLNS_NAMESPACE_NAME,
- createQualifiedNameString(prefix),
- prefix);
- a.setValue(decodeIdentifyingNonEmptyStringOnFirstBitAsNamespaceName(true));
-
- _namespacePrefixes[_namespacePrefixesIndex++] = _prefixIndex;
- break;
- }
-
- _prefixTable.pushScope(_prefixIndex, _namespaceNameIndex);
-
- _namespaceAttributes[_namespaceAttributesIndex++] = a;
-
- b = read();
- }
- if (b != EncodingConstants.TERMINATOR) {
- throw new IOException(CommonResourceBundle.getInstance().getString("message.EIInamespaceNameNotTerminatedCorrectly"));
- }
- final int end = _namespacePrefixesIndex;
-
- _b = read();
- switch(DecoderStateTables.EII(_b)) {
- case DecoderStateTables.EII_NO_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[_b], hasAttributes);
- break;
- case DecoderStateTables.EII_INDEX_MEDIUM:
- processEII(decodeEIIIndexMedium(), hasAttributes);
- break;
- case DecoderStateTables.EII_INDEX_LARGE:
- processEII(decodeEIIIndexLarge(), hasAttributes);
- break;
- case DecoderStateTables.EII_LITERAL:
- {
- final QualifiedName qn = processLiteralQualifiedName(
- _b & EncodingConstants.LITERAL_QNAME_PREFIX_NAMESPACE_NAME_MASK,
- _elementNameTable.getNext());
- _elementNameTable.add(qn);
- processEII(qn, hasAttributes);
- break;
- }
- default:
- throw new IOException(CommonResourceBundle.getInstance().getString("message.IllegalStateDecodingEIIAfterAIIs"));
- }
-
- for (int i = start; i < end; i++) {
- _prefixTable.popScope(_namespacePrefixes[i]);
- }
- _namespacePrefixesIndex = start;
-
- }
-
- protected final QualifiedName processLiteralQualifiedName(int state, QualifiedName q)
- throws FastInfosetException, IOException {
- if (q == null) q = new QualifiedName();
-
- switch (state) {
- // no prefix, no namespace
- case 0:
- return q.set(
- null,
- null,
- decodeIdentifyingNonEmptyStringOnFirstBit(_v.localName),
- -1,
- -1,
- _identifier,
- null);
- // no prefix, namespace
- case 1:
- return q.set(
- null,
- decodeIdentifyingNonEmptyStringIndexOnFirstBitAsNamespaceName(false),
- decodeIdentifyingNonEmptyStringOnFirstBit(_v.localName),
- -1,
- _namespaceNameIndex,
- _identifier,
- null);
- // prefix, no namespace
- case 2:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.qNameMissingNamespaceName"));
- // prefix, namespace
- case 3:
- return q.set(
- decodeIdentifyingNonEmptyStringIndexOnFirstBitAsPrefix(true),
- decodeIdentifyingNonEmptyStringIndexOnFirstBitAsNamespaceName(true),
- decodeIdentifyingNonEmptyStringOnFirstBit(_v.localName),
- _prefixIndex,
- _namespaceNameIndex,
- _identifier,
- _charBuffer);
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingEII"));
- }
- }
-
- protected final QualifiedName processLiteralQualifiedName(int state)
- throws FastInfosetException, IOException {
- switch (state) {
- // no prefix, no namespace
- case 0:
- return new QualifiedName(
- null,
- null,
- decodeIdentifyingNonEmptyStringOnFirstBit(_v.localName),
- -1,
- -1,
- _identifier,
- null);
- // no prefix, namespace
- case 1:
- return new QualifiedName(
- null,
- decodeIdentifyingNonEmptyStringIndexOnFirstBitAsNamespaceName(false),
- decodeIdentifyingNonEmptyStringOnFirstBit(_v.localName),
- -1,
- _namespaceNameIndex,
- _identifier,
- null);
- // prefix, no namespace
- case 2:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.qNameMissingNamespaceName"));
- // prefix, namespace
- case 3:
- return new QualifiedName(
- decodeIdentifyingNonEmptyStringIndexOnFirstBitAsPrefix(true),
- decodeIdentifyingNonEmptyStringIndexOnFirstBitAsNamespaceName(true),
- decodeIdentifyingNonEmptyStringOnFirstBit(_v.localName),
- _prefixIndex,
- _namespaceNameIndex,
- _identifier,
- _charBuffer);
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingEII"));
- }
- }
-
- protected final void processAIIs() throws FastInfosetException, IOException {
- QualifiedName name;
- int b;
- String value;
-
- if (++_duplicateAttributeVerifier._currentIteration == Integer.MAX_VALUE) {
- _duplicateAttributeVerifier.clear();
- }
-
- do {
- // AII qualified name
- b = read();
- switch (DecoderStateTables.AII(b)) {
- case DecoderStateTables.AII_INDEX_SMALL:
- name = _attributeNameTable._array[b];
- break;
- case DecoderStateTables.AII_INDEX_MEDIUM:
- {
- final int i = (((b & EncodingConstants.INTEGER_2ND_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
- name = _attributeNameTable._array[i];
- break;
- }
- case DecoderStateTables.AII_INDEX_LARGE:
- {
- final int i = (((b & EncodingConstants.INTEGER_2ND_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
- name = _attributeNameTable._array[i];
- break;
- }
- case DecoderStateTables.AII_LITERAL:
- name = processLiteralQualifiedName(
- b & EncodingConstants.LITERAL_QNAME_PREFIX_NAMESPACE_NAME_MASK,
- _attributeNameTable.getNext());
- name.createAttributeValues(DuplicateAttributeVerifier.MAP_SIZE);
- _attributeNameTable.add(name);
- break;
- case DecoderStateTables.AII_TERMINATOR_DOUBLE:
- _doubleTerminate = true;
- case DecoderStateTables.AII_TERMINATOR_SINGLE:
- _terminate = true;
- // AIIs have finished break out of loop
- continue;
- default:
- throw new IOException(CommonResourceBundle.getInstance().getString("message.decodingAIIs"));
- }
-
- if (name.prefixIndex > 0 && _prefixTable._currentInScope[name.prefixIndex] != name.namespaceNameIndex) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.AIIqNameNotInScope"));
- }
-
- _duplicateAttributeVerifier.checkForDuplicateAttribute(name.attributeHash, name.attributeId);
-
- Attr a = createAttribute(
- name.namespaceName,
- name.qName,
- name.localName);
-
- // [normalized value] of AII
-
- b = read();
- switch(DecoderStateTables.NISTRING(b)) {
- case DecoderStateTables.NISTRING_UTF8_SMALL_LENGTH:
- {
- final boolean addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- _octetBufferLength = (b & EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_MASK) + 1;
- value = decodeUtf8StringAsString();
- if (addToTable) {
- _attributeValueTable.add(value);
- }
-
- a.setValue(value);
- _currentElement.setAttributeNode(a);
- break;
- }
- case DecoderStateTables.NISTRING_UTF8_MEDIUM_LENGTH:
- {
- final boolean addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_LIMIT;
- value = decodeUtf8StringAsString();
- if (addToTable) {
- _attributeValueTable.add(value);
- }
-
- a.setValue(value);
- _currentElement.setAttributeNode(a);
- break;
- }
- case DecoderStateTables.NISTRING_UTF8_LARGE_LENGTH:
- {
- final boolean addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- final int length = (read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read();
- _octetBufferLength = length + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_LIMIT;
- value = decodeUtf8StringAsString();
- if (addToTable) {
- _attributeValueTable.add(value);
- }
-
- a.setValue(value);
- _currentElement.setAttributeNode(a);
- break;
- }
- case DecoderStateTables.NISTRING_UTF16_SMALL_LENGTH:
- {
- final boolean addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- _octetBufferLength = (b & EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_MASK) + 1;
- value = decodeUtf16StringAsString();
- if (addToTable) {
- _attributeValueTable.add(value);
- }
-
- a.setValue(value);
- _currentElement.setAttributeNode(a);
- break;
- }
- case DecoderStateTables.NISTRING_UTF16_MEDIUM_LENGTH:
- {
- final boolean addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_LIMIT;
- value = decodeUtf16StringAsString();
- if (addToTable) {
- _attributeValueTable.add(value);
- }
-
- a.setValue(value);
- _currentElement.setAttributeNode(a);
- break;
- }
- case DecoderStateTables.NISTRING_UTF16_LARGE_LENGTH:
- {
- final boolean addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- final int length = (read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read();
- _octetBufferLength = length + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_LIMIT;
- value = decodeUtf16StringAsString();
- if (addToTable) {
- _attributeValueTable.add(value);
- }
-
- a.setValue(value);
- _currentElement.setAttributeNode(a);
- break;
- }
- case DecoderStateTables.NISTRING_RA:
- {
- final boolean addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- // Decode resitricted alphabet integer
- _identifier = (b & 0x0F) << 4;
- b = read();
- _identifier |= (b & 0xF0) >> 4;
-
- decodeOctetsOnFifthBitOfNonIdentifyingStringOnFirstBit(b);
-
- value = decodeRestrictedAlphabetAsString();
- if (addToTable) {
- _attributeValueTable.add(value);
- }
-
- a.setValue(value);
- _currentElement.setAttributeNode(a);
- break;
- }
- case DecoderStateTables.NISTRING_EA:
- {
- final boolean addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- _identifier = (b & 0x0F) << 4;
- b = read();
- _identifier |= (b & 0xF0) >> 4;
-
- decodeOctetsOnFifthBitOfNonIdentifyingStringOnFirstBit(b);
- value = convertEncodingAlgorithmDataToCharacters(true);
- if (addToTable) {
- _attributeValueTable.add(value);
- }
- a.setValue(value);
- _currentElement.setAttributeNode(a);
- break;
- }
- case DecoderStateTables.NISTRING_INDEX_SMALL:
- value = _attributeValueTable._array[b & EncodingConstants.INTEGER_2ND_BIT_SMALL_MASK];
-
- a.setValue(value);
- _currentElement.setAttributeNode(a);
- break;
- case DecoderStateTables.NISTRING_INDEX_MEDIUM:
- {
- final int index = (((b & EncodingConstants.INTEGER_2ND_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
- value = _attributeValueTable._array[index];
-
- a.setValue(value);
- _currentElement.setAttributeNode(a);
- break;
- }
- case DecoderStateTables.NISTRING_INDEX_LARGE:
- {
- final int index = (((b & EncodingConstants.INTEGER_2ND_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
- value = _attributeValueTable._array[index];
-
- a.setValue(value);
- _currentElement.setAttributeNode(a);
- break;
- }
- case DecoderStateTables.NISTRING_EMPTY:
- a.setValue("");
- _currentElement.setAttributeNode(a);
- break;
- default:
- throw new IOException(CommonResourceBundle.getInstance().getString("message.decodingAIIValue"));
- }
-
- } while (!_terminate);
-
- // Reset duplication attribute verfifier
- _duplicateAttributeVerifier._poolCurrent = _duplicateAttributeVerifier._poolHead;
-
- _terminate = _doubleTerminate;
- _doubleTerminate = false;
- }
-
- protected final void processCommentII() throws FastInfosetException, IOException {
- switch(decodeNonIdentifyingStringOnFirstBit()) {
- case NISTRING_STRING:
- {
- final String s = new String(_charBuffer, 0, _charBufferLength);
- if (_addToTable) {
- _v.otherString.add(new CharArrayString(s, false));
- }
-
- _currentNode.appendChild(_document.createComment(s));
- break;
- }
- case NISTRING_ENCODING_ALGORITHM:
- throw new IOException(CommonResourceBundle.getInstance().getString("message.commentIIAlgorithmNotSupported"));
- case NISTRING_INDEX:
- {
- final String s = _v.otherString.get(_integer).toString();
-
- _currentNode.appendChild(_document.createComment(s));
- break;
- }
- case NISTRING_EMPTY_STRING:
- _currentNode.appendChild(_document.createComment(""));
- break;
- }
- }
-
- protected final void processProcessingII() throws FastInfosetException, IOException {
- final String target = decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherNCName);
-
- switch(decodeNonIdentifyingStringOnFirstBit()) {
- case NISTRING_STRING:
- {
- final String data = new String(_charBuffer, 0, _charBufferLength);
- if (_addToTable) {
- _v.otherString.add(new CharArrayString(data, false));
- }
-
- _currentNode.appendChild(_document.createProcessingInstruction(target, data));
- break;
- }
- case NISTRING_ENCODING_ALGORITHM:
- throw new IOException(CommonResourceBundle.getInstance().getString("message.processingIIWithEncodingAlgorithm"));
- case NISTRING_INDEX:
- {
- final String data = _v.otherString.get(_integer).toString();
-
- _currentNode.appendChild(_document.createProcessingInstruction(target, data));
- break;
- }
- case NISTRING_EMPTY_STRING:
- _currentNode.appendChild(_document.createProcessingInstruction(target, ""));
- break;
- }
- }
-
- protected Element createElement(String namespaceName, String qName, String localName) {
- return _document.createElementNS(namespaceName, qName);
- }
-
- protected Attr createAttribute(String namespaceName, String qName, String localName) {
- return _document.createAttributeNS(namespaceName, qName);
- }
-
- protected String convertEncodingAlgorithmDataToCharacters(boolean isAttributeValue) throws FastInfosetException, IOException {
- StringBuffer buffer = new StringBuffer();
- if (_identifier < EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END) {
- Object array = BuiltInEncodingAlgorithmFactory.getAlgorithm(_identifier).
- decodeFromBytes(_octetBuffer, _octetBufferStart, _octetBufferLength);
- BuiltInEncodingAlgorithmFactory.getAlgorithm(_identifier).convertToCharacters(array, buffer);
- } else if (_identifier == EncodingAlgorithmIndexes.CDATA) {
- if (!isAttributeValue) {
- // Set back buffer position to start of encoded string
- _octetBufferOffset -= _octetBufferLength;
- return decodeUtf8StringAsString();
- }
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.CDATAAlgorithmNotSupported"));
- } else if (_identifier >= EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START) {
- final String URI = _v.encodingAlgorithm.get(_identifier - EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START);
- final EncodingAlgorithm ea = (EncodingAlgorithm)_registeredEncodingAlgorithms.get(URI);
- if (ea != null) {
- final Object data = ea.decodeFromBytes(_octetBuffer, _octetBufferStart, _octetBufferLength);
- ea.convertToCharacters(data, buffer);
- } else {
- throw new EncodingAlgorithmException(
- CommonResourceBundle.getInstance().getString("message.algorithmDataCannotBeReported"));
- }
- }
- return buffer.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/dom/DOMDocumentSerializer.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/dom/DOMDocumentSerializer.java
deleted file mode 100644
index 87b1f0d8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/dom/DOMDocumentSerializer.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.dom;
-
-import com.sun.xml.internal.fastinfoset.Encoder;
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import com.sun.xml.internal.fastinfoset.util.NamespaceContextImplementation;
-import com.sun.xml.internal.fastinfoset.util.LocalNameQualifiedNamesMap;
-import java.io.IOException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetException;
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * The Fast Infoset DOM serializer.
- * <p>
- * Instantiate this serializer to serialize a fast infoset document in accordance
- * with the DOM API.
- *
- */
-public class DOMDocumentSerializer extends Encoder {
-
- /**
- * Serialize a {@link Node}.
- *
- * @param n the node to serialize.
- */
- public final void serialize(Node n) throws IOException {
- switch (n.getNodeType()) {
- case Node.DOCUMENT_NODE:
- serialize((Document)n);
- break;
- case Node.ELEMENT_NODE:
- serializeElementAsDocument(n);
- break;
- case Node.COMMENT_NODE:
- serializeComment(n);
- break;
- case Node.PROCESSING_INSTRUCTION_NODE:
- serializeProcessingInstruction(n);
- break;
- }
- }
-
- /**
- * Serialize a {@link Document}.
- *
- * @param d the document to serialize.
- */
- public final void serialize(Document d) throws IOException {
- reset();
- encodeHeader(false);
- encodeInitialVocabulary();
-
- final NodeList nl = d.getChildNodes();
- for (int i = 0; i < nl.getLength(); i++) {
- final Node n = nl.item(i);
- switch (n.getNodeType()) {
- case Node.ELEMENT_NODE:
- serializeElement(n);
- break;
- case Node.COMMENT_NODE:
- serializeComment(n);
- break;
- case Node.PROCESSING_INSTRUCTION_NODE:
- serializeProcessingInstruction(n);
- break;
- }
- }
- encodeDocumentTermination();
- }
-
- protected final void serializeElementAsDocument(Node e) throws IOException {
- reset();
- encodeHeader(false);
- encodeInitialVocabulary();
-
- serializeElement(e);
-
- encodeDocumentTermination();
- }
-
-// protected Node[] _namespaceAttributes = new Node[4];
-
- // map which will hold all current scope prefixes and associated attributes
- // Collection of populated namespace available for current scope
- protected NamespaceContextImplementation _namespaceScopeContext = new NamespaceContextImplementation();
- protected Node[] _attributes = new Node[32];
-
- protected final void serializeElement(Node e) throws IOException {
- encodeTermination();
-
- int attributesSize = 0;
-
- _namespaceScopeContext.pushContext();
-
- if (e.hasAttributes()) {
- /*
- * Split the attribute nodes into namespace attributes
- * or normal attributes.
- */
- final NamedNodeMap nnm = e.getAttributes();
- for (int i = 0; i < nnm.getLength(); i++) {
- final Node a = nnm.item(i);
- final String namespaceURI = a.getNamespaceURI();
- if (namespaceURI != null && namespaceURI.equals("http://www.w3.org/2000/xmlns/")) {
- String attrPrefix = a.getLocalName();
- String attrNamespace = a.getNodeValue();
- if (attrPrefix == "xmlns" || attrPrefix.equals("xmlns")) {
- attrPrefix = "";
- }
- _namespaceScopeContext.declarePrefix(attrPrefix, attrNamespace);
- } else {
- if (attributesSize == _attributes.length) {
- final Node[] attributes = new Node[attributesSize * 3 / 2 + 1];
- System.arraycopy(_attributes, 0, attributes, 0, attributesSize);
- _attributes = attributes;
- }
- _attributes[attributesSize++] = a;
-
- String attrNamespaceURI = a.getNamespaceURI();
- String attrPrefix = a.getPrefix();
- if (attrPrefix != null && !_namespaceScopeContext.getNamespaceURI(attrPrefix).equals(attrNamespaceURI)) {
- _namespaceScopeContext.declarePrefix(attrPrefix, attrNamespaceURI);
- }
- }
- }
- }
-
- String elementNamespaceURI = e.getNamespaceURI();
- String elementPrefix = e.getPrefix();
- if (elementPrefix == null) elementPrefix = "";
- if (elementNamespaceURI != null &&
- !_namespaceScopeContext.getNamespaceURI(elementPrefix).equals(elementNamespaceURI)) {
- _namespaceScopeContext.declarePrefix(elementPrefix, elementNamespaceURI);
- }
-
- if (!_namespaceScopeContext.isCurrentContextEmpty()) {
- if (attributesSize > 0) {
- write(EncodingConstants.ELEMENT | EncodingConstants.ELEMENT_NAMESPACES_FLAG |
- EncodingConstants.ELEMENT_ATTRIBUTE_FLAG);
- } else {
- write(EncodingConstants.ELEMENT | EncodingConstants.ELEMENT_NAMESPACES_FLAG);
- }
-
- for (int i = _namespaceScopeContext.getCurrentContextStartIndex();
- i < _namespaceScopeContext.getCurrentContextEndIndex(); i++) {
-
- String prefix = _namespaceScopeContext.getPrefix(i);
- String uri = _namespaceScopeContext.getNamespaceURI(i);
- encodeNamespaceAttribute(prefix, uri);
- }
- write(EncodingConstants.TERMINATOR);
- _b = 0;
- } else {
- _b = (attributesSize > 0) ? EncodingConstants.ELEMENT | EncodingConstants.ELEMENT_ATTRIBUTE_FLAG :
- EncodingConstants.ELEMENT;
- }
-
- String namespaceURI = elementNamespaceURI;
-// namespaceURI = (namespaceURI == null) ? _namespaceScopeContext.getNamespaceURI("") : namespaceURI;
- namespaceURI = (namespaceURI == null) ? "" : namespaceURI;
- encodeElement(namespaceURI, e.getNodeName(), e.getLocalName());
-
- if (attributesSize > 0) {
- // Serialize the attributes
- for (int i = 0; i < attributesSize; i++) {
- final Node a = _attributes[i];
- _attributes[i] = null;
- namespaceURI = a.getNamespaceURI();
- namespaceURI = (namespaceURI == null) ? "" : namespaceURI;
- encodeAttribute(namespaceURI, a.getNodeName(), a.getLocalName());
-
- final String value = a.getNodeValue();
- final boolean addToTable = isAttributeValueLengthMatchesLimit(value.length());
- encodeNonIdentifyingStringOnFirstBit(value, _v.attributeValue, addToTable, false);
- }
-
- _b = EncodingConstants.TERMINATOR;
- _terminate = true;
- }
-
- if (e.hasChildNodes()) {
- // Serialize the children
- final NodeList nl = e.getChildNodes();
- for (int i = 0; i < nl.getLength(); i++) {
- final Node n = nl.item(i);
- switch (n.getNodeType()) {
- case Node.ELEMENT_NODE:
- serializeElement(n);
- break;
- case Node.TEXT_NODE:
- serializeText(n);
- break;
- case Node.CDATA_SECTION_NODE:
- serializeCDATA(n);
- break;
- case Node.COMMENT_NODE:
- serializeComment(n);
- break;
- case Node.PROCESSING_INSTRUCTION_NODE:
- serializeProcessingInstruction(n);
- break;
- }
- }
- }
- encodeElementTermination();
- _namespaceScopeContext.popContext();
- }
-
-
- protected final void serializeText(Node t) throws IOException {
- final String text = t.getNodeValue();
-
- final int length = (text != null) ? text.length() : 0;
- if (length == 0) {
- return;
- } else if (length < _charBuffer.length) {
- text.getChars(0, length, _charBuffer, 0);
- if (getIgnoreWhiteSpaceTextContent() &&
- isWhiteSpace(_charBuffer, 0, length)) return;
-
- encodeTermination();
- encodeCharacters(_charBuffer, 0, length);
- } else {
- final char ch[] = text.toCharArray();
- if (getIgnoreWhiteSpaceTextContent() &&
- isWhiteSpace(ch, 0, length)) return;
-
- encodeTermination();
- encodeCharactersNoClone(ch, 0, length);
- }
- }
-
- protected final void serializeCDATA(Node t) throws IOException {
- final String text = t.getNodeValue();
-
- final int length = (text != null) ? text.length() : 0;
- if (length == 0) {
- return;
- } else {
- final char ch[] = text.toCharArray();
- if (getIgnoreWhiteSpaceTextContent() &&
- isWhiteSpace(ch, 0, length)) return;
-
- encodeTermination();
- try {
- encodeCIIBuiltInAlgorithmDataAsCDATA(ch, 0, length);
- } catch (FastInfosetException e) {
- throw new IOException("");
- }
- }
- }
-
- protected final void serializeComment(Node c) throws IOException {
- if (getIgnoreComments()) return;
-
- encodeTermination();
-
- final String comment = c.getNodeValue();
-
- final int length = (comment != null) ? comment.length() : 0;
- if (length == 0) {
- encodeComment(_charBuffer, 0, 0);
- } else if (length < _charBuffer.length) {
- comment.getChars(0, length, _charBuffer, 0);
- encodeComment(_charBuffer, 0, length);
- } else {
- final char ch[] = comment.toCharArray();
- encodeCommentNoClone(ch, 0, length);
- }
- }
-
- protected final void serializeProcessingInstruction(Node pi) throws IOException {
- if (getIgnoreProcesingInstructions()) return;
-
- encodeTermination();
-
- final String target = pi.getNodeName();
- final String data = pi.getNodeValue();
- encodeProcessingInstruction(target, data);
- }
-
- protected final void encodeElement(String namespaceURI, String qName, String localName) throws IOException {
- LocalNameQualifiedNamesMap.Entry entry = _v.elementName.obtainEntry(qName);
- if (entry._valueIndex > 0) {
- final QualifiedName[] names = entry._value;
- for (int i = 0; i < entry._valueIndex; i++) {
- if ((namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) {
- encodeNonZeroIntegerOnThirdBit(names[i].index);
- return;
- }
- }
- }
-
- // Was DOM node created using an NS-aware call?
- if (localName != null) {
- encodeLiteralElementQualifiedNameOnThirdBit(namespaceURI, getPrefixFromQualifiedName(qName),
- localName, entry);
- } else {
- encodeLiteralElementQualifiedNameOnThirdBit(namespaceURI, "", qName, entry);
- }
- }
-
- protected final void encodeAttribute(String namespaceURI, String qName, String localName) throws IOException {
- LocalNameQualifiedNamesMap.Entry entry = _v.attributeName.obtainEntry(qName);
- if (entry._valueIndex > 0) {
- final QualifiedName[] names = entry._value;
- for (int i = 0; i < entry._valueIndex; i++) {
- if ((namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) {
- encodeNonZeroIntegerOnSecondBitFirstBitZero(names[i].index);
- return;
- }
- }
- }
-
- // Was DOM node created using an NS-aware call?
- if (localName != null) {
- encodeLiteralAttributeQualifiedNameOnSecondBit(namespaceURI, getPrefixFromQualifiedName(qName),
- localName, entry);
- } else {
- encodeLiteralAttributeQualifiedNameOnSecondBit(namespaceURI, "", qName, entry);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/org/apache/xerces/util/XMLChar.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/org/apache/xerces/util/XMLChar.java
deleted file mode 100644
index 9a2a33d0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/org/apache/xerces/util/XMLChar.java
+++ /dev/null
@@ -1,1094 +0,0 @@
-/*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
- /*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2004 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package com.sun.xml.internal.fastinfoset.org.apache.xerces.util;
-
-import java.util.Arrays;
-
-/**
- * This class defines the basic XML character properties. The data
- * in this class can be used to verify that a character is a valid
- * XML character or if the character is a space, name start, or name
- * character.
- * <p>
- * A series of convenience methods are supplied to ease the burden
- * of the developer. Because inlining the checks can improve per
- * character performance, the tables of character properties are
- * public. Using the character as an index into the <code>CHARS</code>
- * array and applying the appropriate mask flag (e.g.
- * <code>MASK_VALID</code>), yields the same results as calling the
- * convenience methods. There is one exception: check the comments
- * for the <code>isValid</code> method for details.
- *
- * @author Glenn Marcy, IBM
- * @author Andy Clark, IBM
- * @author Eric Ye, IBM
- * @author Arnaud Le Hors, IBM
- * @author Michael Glavassevich, IBM
- * @author Rahul Srivastava, Sun Microsystems Inc.
- *
- * @version $Id: XMLChar.java,v 1.2 2006-03-16 16:22:16 sandoz Exp $
- */
-public class XMLChar {
-
- //
- // Constants
- //
-
- /** Character flags. */
- private static final byte[] CHARS = new byte[1 << 16];
-
- /** Valid character mask. */
- public static final int MASK_VALID = 0x01;
-
- /** Space character mask. */
- public static final int MASK_SPACE = 0x02;
-
- /** Name start character mask. */
- public static final int MASK_NAME_START = 0x04;
-
- /** Name character mask. */
- public static final int MASK_NAME = 0x08;
-
- /** Pubid character mask. */
- public static final int MASK_PUBID = 0x10;
-
- /**
- * Content character mask. Special characters are those that can
- * be considered the start of markup, such as '&lt;' and '&amp;'.
- * The various newline characters are considered special as well.
- * All other valid XML characters can be considered content.
- * <p>
- * This is an optimization for the inner loop of character scanning.
- */
- public static final int MASK_CONTENT = 0x20;
-
- /** NCName start character mask. */
- public static final int MASK_NCNAME_START = 0x40;
-
- /** NCName character mask. */
- public static final int MASK_NCNAME = 0x80;
-
- //
- // Static initialization
- //
-
- static {
-
- // Initializing the Character Flag Array
- // Code generated by: XMLCharGenerator.
-
- CHARS[9] = 35;
- CHARS[10] = 19;
- CHARS[13] = 19;
- CHARS[32] = 51;
- CHARS[33] = 49;
- CHARS[34] = 33;
- Arrays.fill(CHARS, 35, 38, (byte) 49 ); // Fill 3 of value (byte) 49
- CHARS[38] = 1;
- Arrays.fill(CHARS, 39, 45, (byte) 49 ); // Fill 6 of value (byte) 49
- Arrays.fill(CHARS, 45, 47, (byte) -71 ); // Fill 2 of value (byte) -71
- CHARS[47] = 49;
- Arrays.fill(CHARS, 48, 58, (byte) -71 ); // Fill 10 of value (byte) -71
- CHARS[58] = 61;
- CHARS[59] = 49;
- CHARS[60] = 1;
- CHARS[61] = 49;
- CHARS[62] = 33;
- Arrays.fill(CHARS, 63, 65, (byte) 49 ); // Fill 2 of value (byte) 49
- Arrays.fill(CHARS, 65, 91, (byte) -3 ); // Fill 26 of value (byte) -3
- Arrays.fill(CHARS, 91, 93, (byte) 33 ); // Fill 2 of value (byte) 33
- CHARS[93] = 1;
- CHARS[94] = 33;
- CHARS[95] = -3;
- CHARS[96] = 33;
- Arrays.fill(CHARS, 97, 123, (byte) -3 ); // Fill 26 of value (byte) -3
- Arrays.fill(CHARS, 123, 183, (byte) 33 ); // Fill 60 of value (byte) 33
- CHARS[183] = -87;
- Arrays.fill(CHARS, 184, 192, (byte) 33 ); // Fill 8 of value (byte) 33
- Arrays.fill(CHARS, 192, 215, (byte) -19 ); // Fill 23 of value (byte) -19
- CHARS[215] = 33;
- Arrays.fill(CHARS, 216, 247, (byte) -19 ); // Fill 31 of value (byte) -19
- CHARS[247] = 33;
- Arrays.fill(CHARS, 248, 306, (byte) -19 ); // Fill 58 of value (byte) -19
- Arrays.fill(CHARS, 306, 308, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 308, 319, (byte) -19 ); // Fill 11 of value (byte) -19
- Arrays.fill(CHARS, 319, 321, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 321, 329, (byte) -19 ); // Fill 8 of value (byte) -19
- CHARS[329] = 33;
- Arrays.fill(CHARS, 330, 383, (byte) -19 ); // Fill 53 of value (byte) -19
- CHARS[383] = 33;
- Arrays.fill(CHARS, 384, 452, (byte) -19 ); // Fill 68 of value (byte) -19
- Arrays.fill(CHARS, 452, 461, (byte) 33 ); // Fill 9 of value (byte) 33
- Arrays.fill(CHARS, 461, 497, (byte) -19 ); // Fill 36 of value (byte) -19
- Arrays.fill(CHARS, 497, 500, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 500, 502, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 502, 506, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 506, 536, (byte) -19 ); // Fill 30 of value (byte) -19
- Arrays.fill(CHARS, 536, 592, (byte) 33 ); // Fill 56 of value (byte) 33
- Arrays.fill(CHARS, 592, 681, (byte) -19 ); // Fill 89 of value (byte) -19
- Arrays.fill(CHARS, 681, 699, (byte) 33 ); // Fill 18 of value (byte) 33
- Arrays.fill(CHARS, 699, 706, (byte) -19 ); // Fill 7 of value (byte) -19
- Arrays.fill(CHARS, 706, 720, (byte) 33 ); // Fill 14 of value (byte) 33
- Arrays.fill(CHARS, 720, 722, (byte) -87 ); // Fill 2 of value (byte) -87
- Arrays.fill(CHARS, 722, 768, (byte) 33 ); // Fill 46 of value (byte) 33
- Arrays.fill(CHARS, 768, 838, (byte) -87 ); // Fill 70 of value (byte) -87
- Arrays.fill(CHARS, 838, 864, (byte) 33 ); // Fill 26 of value (byte) 33
- Arrays.fill(CHARS, 864, 866, (byte) -87 ); // Fill 2 of value (byte) -87
- Arrays.fill(CHARS, 866, 902, (byte) 33 ); // Fill 36 of value (byte) 33
- CHARS[902] = -19;
- CHARS[903] = -87;
- Arrays.fill(CHARS, 904, 907, (byte) -19 ); // Fill 3 of value (byte) -19
- CHARS[907] = 33;
- CHARS[908] = -19;
- CHARS[909] = 33;
- Arrays.fill(CHARS, 910, 930, (byte) -19 ); // Fill 20 of value (byte) -19
- CHARS[930] = 33;
- Arrays.fill(CHARS, 931, 975, (byte) -19 ); // Fill 44 of value (byte) -19
- CHARS[975] = 33;
- Arrays.fill(CHARS, 976, 983, (byte) -19 ); // Fill 7 of value (byte) -19
- Arrays.fill(CHARS, 983, 986, (byte) 33 ); // Fill 3 of value (byte) 33
- CHARS[986] = -19;
- CHARS[987] = 33;
- CHARS[988] = -19;
- CHARS[989] = 33;
- CHARS[990] = -19;
- CHARS[991] = 33;
- CHARS[992] = -19;
- CHARS[993] = 33;
- Arrays.fill(CHARS, 994, 1012, (byte) -19 ); // Fill 18 of value (byte) -19
- Arrays.fill(CHARS, 1012, 1025, (byte) 33 ); // Fill 13 of value (byte) 33
- Arrays.fill(CHARS, 1025, 1037, (byte) -19 ); // Fill 12 of value (byte) -19
- CHARS[1037] = 33;
- Arrays.fill(CHARS, 1038, 1104, (byte) -19 ); // Fill 66 of value (byte) -19
- CHARS[1104] = 33;
- Arrays.fill(CHARS, 1105, 1117, (byte) -19 ); // Fill 12 of value (byte) -19
- CHARS[1117] = 33;
- Arrays.fill(CHARS, 1118, 1154, (byte) -19 ); // Fill 36 of value (byte) -19
- CHARS[1154] = 33;
- Arrays.fill(CHARS, 1155, 1159, (byte) -87 ); // Fill 4 of value (byte) -87
- Arrays.fill(CHARS, 1159, 1168, (byte) 33 ); // Fill 9 of value (byte) 33
- Arrays.fill(CHARS, 1168, 1221, (byte) -19 ); // Fill 53 of value (byte) -19
- Arrays.fill(CHARS, 1221, 1223, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 1223, 1225, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 1225, 1227, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 1227, 1229, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 1229, 1232, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 1232, 1260, (byte) -19 ); // Fill 28 of value (byte) -19
- Arrays.fill(CHARS, 1260, 1262, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 1262, 1270, (byte) -19 ); // Fill 8 of value (byte) -19
- Arrays.fill(CHARS, 1270, 1272, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 1272, 1274, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 1274, 1329, (byte) 33 ); // Fill 55 of value (byte) 33
- Arrays.fill(CHARS, 1329, 1367, (byte) -19 ); // Fill 38 of value (byte) -19
- Arrays.fill(CHARS, 1367, 1369, (byte) 33 ); // Fill 2 of value (byte) 33
- CHARS[1369] = -19;
- Arrays.fill(CHARS, 1370, 1377, (byte) 33 ); // Fill 7 of value (byte) 33
- Arrays.fill(CHARS, 1377, 1415, (byte) -19 ); // Fill 38 of value (byte) -19
- Arrays.fill(CHARS, 1415, 1425, (byte) 33 ); // Fill 10 of value (byte) 33
- Arrays.fill(CHARS, 1425, 1442, (byte) -87 ); // Fill 17 of value (byte) -87
- CHARS[1442] = 33;
- Arrays.fill(CHARS, 1443, 1466, (byte) -87 ); // Fill 23 of value (byte) -87
- CHARS[1466] = 33;
- Arrays.fill(CHARS, 1467, 1470, (byte) -87 ); // Fill 3 of value (byte) -87
- CHARS[1470] = 33;
- CHARS[1471] = -87;
- CHARS[1472] = 33;
- Arrays.fill(CHARS, 1473, 1475, (byte) -87 ); // Fill 2 of value (byte) -87
- CHARS[1475] = 33;
- CHARS[1476] = -87;
- Arrays.fill(CHARS, 1477, 1488, (byte) 33 ); // Fill 11 of value (byte) 33
- Arrays.fill(CHARS, 1488, 1515, (byte) -19 ); // Fill 27 of value (byte) -19
- Arrays.fill(CHARS, 1515, 1520, (byte) 33 ); // Fill 5 of value (byte) 33
- Arrays.fill(CHARS, 1520, 1523, (byte) -19 ); // Fill 3 of value (byte) -19
- Arrays.fill(CHARS, 1523, 1569, (byte) 33 ); // Fill 46 of value (byte) 33
- Arrays.fill(CHARS, 1569, 1595, (byte) -19 ); // Fill 26 of value (byte) -19
- Arrays.fill(CHARS, 1595, 1600, (byte) 33 ); // Fill 5 of value (byte) 33
- CHARS[1600] = -87;
- Arrays.fill(CHARS, 1601, 1611, (byte) -19 ); // Fill 10 of value (byte) -19
- Arrays.fill(CHARS, 1611, 1619, (byte) -87 ); // Fill 8 of value (byte) -87
- Arrays.fill(CHARS, 1619, 1632, (byte) 33 ); // Fill 13 of value (byte) 33
- Arrays.fill(CHARS, 1632, 1642, (byte) -87 ); // Fill 10 of value (byte) -87
- Arrays.fill(CHARS, 1642, 1648, (byte) 33 ); // Fill 6 of value (byte) 33
- CHARS[1648] = -87;
- Arrays.fill(CHARS, 1649, 1720, (byte) -19 ); // Fill 71 of value (byte) -19
- Arrays.fill(CHARS, 1720, 1722, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 1722, 1727, (byte) -19 ); // Fill 5 of value (byte) -19
- CHARS[1727] = 33;
- Arrays.fill(CHARS, 1728, 1743, (byte) -19 ); // Fill 15 of value (byte) -19
- CHARS[1743] = 33;
- Arrays.fill(CHARS, 1744, 1748, (byte) -19 ); // Fill 4 of value (byte) -19
- CHARS[1748] = 33;
- CHARS[1749] = -19;
- Arrays.fill(CHARS, 1750, 1765, (byte) -87 ); // Fill 15 of value (byte) -87
- Arrays.fill(CHARS, 1765, 1767, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 1767, 1769, (byte) -87 ); // Fill 2 of value (byte) -87
- CHARS[1769] = 33;
- Arrays.fill(CHARS, 1770, 1774, (byte) -87 ); // Fill 4 of value (byte) -87
- Arrays.fill(CHARS, 1774, 1776, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 1776, 1786, (byte) -87 ); // Fill 10 of value (byte) -87
- Arrays.fill(CHARS, 1786, 2305, (byte) 33 ); // Fill 519 of value (byte) 33
- Arrays.fill(CHARS, 2305, 2308, (byte) -87 ); // Fill 3 of value (byte) -87
- CHARS[2308] = 33;
- Arrays.fill(CHARS, 2309, 2362, (byte) -19 ); // Fill 53 of value (byte) -19
- Arrays.fill(CHARS, 2362, 2364, (byte) 33 ); // Fill 2 of value (byte) 33
- CHARS[2364] = -87;
- CHARS[2365] = -19;
- Arrays.fill(CHARS, 2366, 2382, (byte) -87 ); // Fill 16 of value (byte) -87
- Arrays.fill(CHARS, 2382, 2385, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 2385, 2389, (byte) -87 ); // Fill 4 of value (byte) -87
- Arrays.fill(CHARS, 2389, 2392, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 2392, 2402, (byte) -19 ); // Fill 10 of value (byte) -19
- Arrays.fill(CHARS, 2402, 2404, (byte) -87 ); // Fill 2 of value (byte) -87
- Arrays.fill(CHARS, 2404, 2406, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 2406, 2416, (byte) -87 ); // Fill 10 of value (byte) -87
- Arrays.fill(CHARS, 2416, 2433, (byte) 33 ); // Fill 17 of value (byte) 33
- Arrays.fill(CHARS, 2433, 2436, (byte) -87 ); // Fill 3 of value (byte) -87
- CHARS[2436] = 33;
- Arrays.fill(CHARS, 2437, 2445, (byte) -19 ); // Fill 8 of value (byte) -19
- Arrays.fill(CHARS, 2445, 2447, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 2447, 2449, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 2449, 2451, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 2451, 2473, (byte) -19 ); // Fill 22 of value (byte) -19
- CHARS[2473] = 33;
- Arrays.fill(CHARS, 2474, 2481, (byte) -19 ); // Fill 7 of value (byte) -19
- CHARS[2481] = 33;
- CHARS[2482] = -19;
- Arrays.fill(CHARS, 2483, 2486, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 2486, 2490, (byte) -19 ); // Fill 4 of value (byte) -19
- Arrays.fill(CHARS, 2490, 2492, (byte) 33 ); // Fill 2 of value (byte) 33
- CHARS[2492] = -87;
- CHARS[2493] = 33;
- Arrays.fill(CHARS, 2494, 2501, (byte) -87 ); // Fill 7 of value (byte) -87
- Arrays.fill(CHARS, 2501, 2503, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 2503, 2505, (byte) -87 ); // Fill 2 of value (byte) -87
- Arrays.fill(CHARS, 2505, 2507, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 2507, 2510, (byte) -87 ); // Fill 3 of value (byte) -87
- Arrays.fill(CHARS, 2510, 2519, (byte) 33 ); // Fill 9 of value (byte) 33
- CHARS[2519] = -87;
- Arrays.fill(CHARS, 2520, 2524, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 2524, 2526, (byte) -19 ); // Fill 2 of value (byte) -19
- CHARS[2526] = 33;
- Arrays.fill(CHARS, 2527, 2530, (byte) -19 ); // Fill 3 of value (byte) -19
- Arrays.fill(CHARS, 2530, 2532, (byte) -87 ); // Fill 2 of value (byte) -87
- Arrays.fill(CHARS, 2532, 2534, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 2534, 2544, (byte) -87 ); // Fill 10 of value (byte) -87
- Arrays.fill(CHARS, 2544, 2546, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 2546, 2562, (byte) 33 ); // Fill 16 of value (byte) 33
- CHARS[2562] = -87;
- Arrays.fill(CHARS, 2563, 2565, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 2565, 2571, (byte) -19 ); // Fill 6 of value (byte) -19
- Arrays.fill(CHARS, 2571, 2575, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 2575, 2577, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 2577, 2579, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 2579, 2601, (byte) -19 ); // Fill 22 of value (byte) -19
- CHARS[2601] = 33;
- Arrays.fill(CHARS, 2602, 2609, (byte) -19 ); // Fill 7 of value (byte) -19
- CHARS[2609] = 33;
- Arrays.fill(CHARS, 2610, 2612, (byte) -19 ); // Fill 2 of value (byte) -19
- CHARS[2612] = 33;
- Arrays.fill(CHARS, 2613, 2615, (byte) -19 ); // Fill 2 of value (byte) -19
- CHARS[2615] = 33;
- Arrays.fill(CHARS, 2616, 2618, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 2618, 2620, (byte) 33 ); // Fill 2 of value (byte) 33
- CHARS[2620] = -87;
- CHARS[2621] = 33;
- Arrays.fill(CHARS, 2622, 2627, (byte) -87 ); // Fill 5 of value (byte) -87
- Arrays.fill(CHARS, 2627, 2631, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 2631, 2633, (byte) -87 ); // Fill 2 of value (byte) -87
- Arrays.fill(CHARS, 2633, 2635, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 2635, 2638, (byte) -87 ); // Fill 3 of value (byte) -87
- Arrays.fill(CHARS, 2638, 2649, (byte) 33 ); // Fill 11 of value (byte) 33
- Arrays.fill(CHARS, 2649, 2653, (byte) -19 ); // Fill 4 of value (byte) -19
- CHARS[2653] = 33;
- CHARS[2654] = -19;
- Arrays.fill(CHARS, 2655, 2662, (byte) 33 ); // Fill 7 of value (byte) 33
- Arrays.fill(CHARS, 2662, 2674, (byte) -87 ); // Fill 12 of value (byte) -87
- Arrays.fill(CHARS, 2674, 2677, (byte) -19 ); // Fill 3 of value (byte) -19
- Arrays.fill(CHARS, 2677, 2689, (byte) 33 ); // Fill 12 of value (byte) 33
- Arrays.fill(CHARS, 2689, 2692, (byte) -87 ); // Fill 3 of value (byte) -87
- CHARS[2692] = 33;
- Arrays.fill(CHARS, 2693, 2700, (byte) -19 ); // Fill 7 of value (byte) -19
- CHARS[2700] = 33;
- CHARS[2701] = -19;
- CHARS[2702] = 33;
- Arrays.fill(CHARS, 2703, 2706, (byte) -19 ); // Fill 3 of value (byte) -19
- CHARS[2706] = 33;
- Arrays.fill(CHARS, 2707, 2729, (byte) -19 ); // Fill 22 of value (byte) -19
- CHARS[2729] = 33;
- Arrays.fill(CHARS, 2730, 2737, (byte) -19 ); // Fill 7 of value (byte) -19
- CHARS[2737] = 33;
- Arrays.fill(CHARS, 2738, 2740, (byte) -19 ); // Fill 2 of value (byte) -19
- CHARS[2740] = 33;
- Arrays.fill(CHARS, 2741, 2746, (byte) -19 ); // Fill 5 of value (byte) -19
- Arrays.fill(CHARS, 2746, 2748, (byte) 33 ); // Fill 2 of value (byte) 33
- CHARS[2748] = -87;
- CHARS[2749] = -19;
- Arrays.fill(CHARS, 2750, 2758, (byte) -87 ); // Fill 8 of value (byte) -87
- CHARS[2758] = 33;
- Arrays.fill(CHARS, 2759, 2762, (byte) -87 ); // Fill 3 of value (byte) -87
- CHARS[2762] = 33;
- Arrays.fill(CHARS, 2763, 2766, (byte) -87 ); // Fill 3 of value (byte) -87
- Arrays.fill(CHARS, 2766, 2784, (byte) 33 ); // Fill 18 of value (byte) 33
- CHARS[2784] = -19;
- Arrays.fill(CHARS, 2785, 2790, (byte) 33 ); // Fill 5 of value (byte) 33
- Arrays.fill(CHARS, 2790, 2800, (byte) -87 ); // Fill 10 of value (byte) -87
- Arrays.fill(CHARS, 2800, 2817, (byte) 33 ); // Fill 17 of value (byte) 33
- Arrays.fill(CHARS, 2817, 2820, (byte) -87 ); // Fill 3 of value (byte) -87
- CHARS[2820] = 33;
- Arrays.fill(CHARS, 2821, 2829, (byte) -19 ); // Fill 8 of value (byte) -19
- Arrays.fill(CHARS, 2829, 2831, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 2831, 2833, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 2833, 2835, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 2835, 2857, (byte) -19 ); // Fill 22 of value (byte) -19
- CHARS[2857] = 33;
- Arrays.fill(CHARS, 2858, 2865, (byte) -19 ); // Fill 7 of value (byte) -19
- CHARS[2865] = 33;
- Arrays.fill(CHARS, 2866, 2868, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 2868, 2870, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 2870, 2874, (byte) -19 ); // Fill 4 of value (byte) -19
- Arrays.fill(CHARS, 2874, 2876, (byte) 33 ); // Fill 2 of value (byte) 33
- CHARS[2876] = -87;
- CHARS[2877] = -19;
- Arrays.fill(CHARS, 2878, 2884, (byte) -87 ); // Fill 6 of value (byte) -87
- Arrays.fill(CHARS, 2884, 2887, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 2887, 2889, (byte) -87 ); // Fill 2 of value (byte) -87
- Arrays.fill(CHARS, 2889, 2891, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 2891, 2894, (byte) -87 ); // Fill 3 of value (byte) -87
- Arrays.fill(CHARS, 2894, 2902, (byte) 33 ); // Fill 8 of value (byte) 33
- Arrays.fill(CHARS, 2902, 2904, (byte) -87 ); // Fill 2 of value (byte) -87
- Arrays.fill(CHARS, 2904, 2908, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 2908, 2910, (byte) -19 ); // Fill 2 of value (byte) -19
- CHARS[2910] = 33;
- Arrays.fill(CHARS, 2911, 2914, (byte) -19 ); // Fill 3 of value (byte) -19
- Arrays.fill(CHARS, 2914, 2918, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 2918, 2928, (byte) -87 ); // Fill 10 of value (byte) -87
- Arrays.fill(CHARS, 2928, 2946, (byte) 33 ); // Fill 18 of value (byte) 33
- Arrays.fill(CHARS, 2946, 2948, (byte) -87 ); // Fill 2 of value (byte) -87
- CHARS[2948] = 33;
- Arrays.fill(CHARS, 2949, 2955, (byte) -19 ); // Fill 6 of value (byte) -19
- Arrays.fill(CHARS, 2955, 2958, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 2958, 2961, (byte) -19 ); // Fill 3 of value (byte) -19
- CHARS[2961] = 33;
- Arrays.fill(CHARS, 2962, 2966, (byte) -19 ); // Fill 4 of value (byte) -19
- Arrays.fill(CHARS, 2966, 2969, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 2969, 2971, (byte) -19 ); // Fill 2 of value (byte) -19
- CHARS[2971] = 33;
- CHARS[2972] = -19;
- CHARS[2973] = 33;
- Arrays.fill(CHARS, 2974, 2976, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 2976, 2979, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 2979, 2981, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 2981, 2984, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 2984, 2987, (byte) -19 ); // Fill 3 of value (byte) -19
- Arrays.fill(CHARS, 2987, 2990, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 2990, 2998, (byte) -19 ); // Fill 8 of value (byte) -19
- CHARS[2998] = 33;
- Arrays.fill(CHARS, 2999, 3002, (byte) -19 ); // Fill 3 of value (byte) -19
- Arrays.fill(CHARS, 3002, 3006, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 3006, 3011, (byte) -87 ); // Fill 5 of value (byte) -87
- Arrays.fill(CHARS, 3011, 3014, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 3014, 3017, (byte) -87 ); // Fill 3 of value (byte) -87
- CHARS[3017] = 33;
- Arrays.fill(CHARS, 3018, 3022, (byte) -87 ); // Fill 4 of value (byte) -87
- Arrays.fill(CHARS, 3022, 3031, (byte) 33 ); // Fill 9 of value (byte) 33
- CHARS[3031] = -87;
- Arrays.fill(CHARS, 3032, 3047, (byte) 33 ); // Fill 15 of value (byte) 33
- Arrays.fill(CHARS, 3047, 3056, (byte) -87 ); // Fill 9 of value (byte) -87
- Arrays.fill(CHARS, 3056, 3073, (byte) 33 ); // Fill 17 of value (byte) 33
- Arrays.fill(CHARS, 3073, 3076, (byte) -87 ); // Fill 3 of value (byte) -87
- CHARS[3076] = 33;
- Arrays.fill(CHARS, 3077, 3085, (byte) -19 ); // Fill 8 of value (byte) -19
- CHARS[3085] = 33;
- Arrays.fill(CHARS, 3086, 3089, (byte) -19 ); // Fill 3 of value (byte) -19
- CHARS[3089] = 33;
- Arrays.fill(CHARS, 3090, 3113, (byte) -19 ); // Fill 23 of value (byte) -19
- CHARS[3113] = 33;
- Arrays.fill(CHARS, 3114, 3124, (byte) -19 ); // Fill 10 of value (byte) -19
- CHARS[3124] = 33;
- Arrays.fill(CHARS, 3125, 3130, (byte) -19 ); // Fill 5 of value (byte) -19
- Arrays.fill(CHARS, 3130, 3134, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 3134, 3141, (byte) -87 ); // Fill 7 of value (byte) -87
- CHARS[3141] = 33;
- Arrays.fill(CHARS, 3142, 3145, (byte) -87 ); // Fill 3 of value (byte) -87
- CHARS[3145] = 33;
- Arrays.fill(CHARS, 3146, 3150, (byte) -87 ); // Fill 4 of value (byte) -87
- Arrays.fill(CHARS, 3150, 3157, (byte) 33 ); // Fill 7 of value (byte) 33
- Arrays.fill(CHARS, 3157, 3159, (byte) -87 ); // Fill 2 of value (byte) -87
- Arrays.fill(CHARS, 3159, 3168, (byte) 33 ); // Fill 9 of value (byte) 33
- Arrays.fill(CHARS, 3168, 3170, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 3170, 3174, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 3174, 3184, (byte) -87 ); // Fill 10 of value (byte) -87
- Arrays.fill(CHARS, 3184, 3202, (byte) 33 ); // Fill 18 of value (byte) 33
- Arrays.fill(CHARS, 3202, 3204, (byte) -87 ); // Fill 2 of value (byte) -87
- CHARS[3204] = 33;
- Arrays.fill(CHARS, 3205, 3213, (byte) -19 ); // Fill 8 of value (byte) -19
- CHARS[3213] = 33;
- Arrays.fill(CHARS, 3214, 3217, (byte) -19 ); // Fill 3 of value (byte) -19
- CHARS[3217] = 33;
- Arrays.fill(CHARS, 3218, 3241, (byte) -19 ); // Fill 23 of value (byte) -19
- CHARS[3241] = 33;
- Arrays.fill(CHARS, 3242, 3252, (byte) -19 ); // Fill 10 of value (byte) -19
- CHARS[3252] = 33;
- Arrays.fill(CHARS, 3253, 3258, (byte) -19 ); // Fill 5 of value (byte) -19
- Arrays.fill(CHARS, 3258, 3262, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 3262, 3269, (byte) -87 ); // Fill 7 of value (byte) -87
- CHARS[3269] = 33;
- Arrays.fill(CHARS, 3270, 3273, (byte) -87 ); // Fill 3 of value (byte) -87
- CHARS[3273] = 33;
- Arrays.fill(CHARS, 3274, 3278, (byte) -87 ); // Fill 4 of value (byte) -87
- Arrays.fill(CHARS, 3278, 3285, (byte) 33 ); // Fill 7 of value (byte) 33
- Arrays.fill(CHARS, 3285, 3287, (byte) -87 ); // Fill 2 of value (byte) -87
- Arrays.fill(CHARS, 3287, 3294, (byte) 33 ); // Fill 7 of value (byte) 33
- CHARS[3294] = -19;
- CHARS[3295] = 33;
- Arrays.fill(CHARS, 3296, 3298, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 3298, 3302, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 3302, 3312, (byte) -87 ); // Fill 10 of value (byte) -87
- Arrays.fill(CHARS, 3312, 3330, (byte) 33 ); // Fill 18 of value (byte) 33
- Arrays.fill(CHARS, 3330, 3332, (byte) -87 ); // Fill 2 of value (byte) -87
- CHARS[3332] = 33;
- Arrays.fill(CHARS, 3333, 3341, (byte) -19 ); // Fill 8 of value (byte) -19
- CHARS[3341] = 33;
- Arrays.fill(CHARS, 3342, 3345, (byte) -19 ); // Fill 3 of value (byte) -19
- CHARS[3345] = 33;
- Arrays.fill(CHARS, 3346, 3369, (byte) -19 ); // Fill 23 of value (byte) -19
- CHARS[3369] = 33;
- Arrays.fill(CHARS, 3370, 3386, (byte) -19 ); // Fill 16 of value (byte) -19
- Arrays.fill(CHARS, 3386, 3390, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 3390, 3396, (byte) -87 ); // Fill 6 of value (byte) -87
- Arrays.fill(CHARS, 3396, 3398, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 3398, 3401, (byte) -87 ); // Fill 3 of value (byte) -87
- CHARS[3401] = 33;
- Arrays.fill(CHARS, 3402, 3406, (byte) -87 ); // Fill 4 of value (byte) -87
- Arrays.fill(CHARS, 3406, 3415, (byte) 33 ); // Fill 9 of value (byte) 33
- CHARS[3415] = -87;
- Arrays.fill(CHARS, 3416, 3424, (byte) 33 ); // Fill 8 of value (byte) 33
- Arrays.fill(CHARS, 3424, 3426, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 3426, 3430, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 3430, 3440, (byte) -87 ); // Fill 10 of value (byte) -87
- Arrays.fill(CHARS, 3440, 3585, (byte) 33 ); // Fill 145 of value (byte) 33
- Arrays.fill(CHARS, 3585, 3631, (byte) -19 ); // Fill 46 of value (byte) -19
- CHARS[3631] = 33;
- CHARS[3632] = -19;
- CHARS[3633] = -87;
- Arrays.fill(CHARS, 3634, 3636, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 3636, 3643, (byte) -87 ); // Fill 7 of value (byte) -87
- Arrays.fill(CHARS, 3643, 3648, (byte) 33 ); // Fill 5 of value (byte) 33
- Arrays.fill(CHARS, 3648, 3654, (byte) -19 ); // Fill 6 of value (byte) -19
- Arrays.fill(CHARS, 3654, 3663, (byte) -87 ); // Fill 9 of value (byte) -87
- CHARS[3663] = 33;
- Arrays.fill(CHARS, 3664, 3674, (byte) -87 ); // Fill 10 of value (byte) -87
- Arrays.fill(CHARS, 3674, 3713, (byte) 33 ); // Fill 39 of value (byte) 33
- Arrays.fill(CHARS, 3713, 3715, (byte) -19 ); // Fill 2 of value (byte) -19
- CHARS[3715] = 33;
- CHARS[3716] = -19;
- Arrays.fill(CHARS, 3717, 3719, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 3719, 3721, (byte) -19 ); // Fill 2 of value (byte) -19
- CHARS[3721] = 33;
- CHARS[3722] = -19;
- Arrays.fill(CHARS, 3723, 3725, (byte) 33 ); // Fill 2 of value (byte) 33
- CHARS[3725] = -19;
- Arrays.fill(CHARS, 3726, 3732, (byte) 33 ); // Fill 6 of value (byte) 33
- Arrays.fill(CHARS, 3732, 3736, (byte) -19 ); // Fill 4 of value (byte) -19
- CHARS[3736] = 33;
- Arrays.fill(CHARS, 3737, 3744, (byte) -19 ); // Fill 7 of value (byte) -19
- CHARS[3744] = 33;
- Arrays.fill(CHARS, 3745, 3748, (byte) -19 ); // Fill 3 of value (byte) -19
- CHARS[3748] = 33;
- CHARS[3749] = -19;
- CHARS[3750] = 33;
- CHARS[3751] = -19;
- Arrays.fill(CHARS, 3752, 3754, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 3754, 3756, (byte) -19 ); // Fill 2 of value (byte) -19
- CHARS[3756] = 33;
- Arrays.fill(CHARS, 3757, 3759, (byte) -19 ); // Fill 2 of value (byte) -19
- CHARS[3759] = 33;
- CHARS[3760] = -19;
- CHARS[3761] = -87;
- Arrays.fill(CHARS, 3762, 3764, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 3764, 3770, (byte) -87 ); // Fill 6 of value (byte) -87
- CHARS[3770] = 33;
- Arrays.fill(CHARS, 3771, 3773, (byte) -87 ); // Fill 2 of value (byte) -87
- CHARS[3773] = -19;
- Arrays.fill(CHARS, 3774, 3776, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 3776, 3781, (byte) -19 ); // Fill 5 of value (byte) -19
- CHARS[3781] = 33;
- CHARS[3782] = -87;
- CHARS[3783] = 33;
- Arrays.fill(CHARS, 3784, 3790, (byte) -87 ); // Fill 6 of value (byte) -87
- Arrays.fill(CHARS, 3790, 3792, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 3792, 3802, (byte) -87 ); // Fill 10 of value (byte) -87
- Arrays.fill(CHARS, 3802, 3864, (byte) 33 ); // Fill 62 of value (byte) 33
- Arrays.fill(CHARS, 3864, 3866, (byte) -87 ); // Fill 2 of value (byte) -87
- Arrays.fill(CHARS, 3866, 3872, (byte) 33 ); // Fill 6 of value (byte) 33
- Arrays.fill(CHARS, 3872, 3882, (byte) -87 ); // Fill 10 of value (byte) -87
- Arrays.fill(CHARS, 3882, 3893, (byte) 33 ); // Fill 11 of value (byte) 33
- CHARS[3893] = -87;
- CHARS[3894] = 33;
- CHARS[3895] = -87;
- CHARS[3896] = 33;
- CHARS[3897] = -87;
- Arrays.fill(CHARS, 3898, 3902, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 3902, 3904, (byte) -87 ); // Fill 2 of value (byte) -87
- Arrays.fill(CHARS, 3904, 3912, (byte) -19 ); // Fill 8 of value (byte) -19
- CHARS[3912] = 33;
- Arrays.fill(CHARS, 3913, 3946, (byte) -19 ); // Fill 33 of value (byte) -19
- Arrays.fill(CHARS, 3946, 3953, (byte) 33 ); // Fill 7 of value (byte) 33
- Arrays.fill(CHARS, 3953, 3973, (byte) -87 ); // Fill 20 of value (byte) -87
- CHARS[3973] = 33;
- Arrays.fill(CHARS, 3974, 3980, (byte) -87 ); // Fill 6 of value (byte) -87
- Arrays.fill(CHARS, 3980, 3984, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 3984, 3990, (byte) -87 ); // Fill 6 of value (byte) -87
- CHARS[3990] = 33;
- CHARS[3991] = -87;
- CHARS[3992] = 33;
- Arrays.fill(CHARS, 3993, 4014, (byte) -87 ); // Fill 21 of value (byte) -87
- Arrays.fill(CHARS, 4014, 4017, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 4017, 4024, (byte) -87 ); // Fill 7 of value (byte) -87
- CHARS[4024] = 33;
- CHARS[4025] = -87;
- Arrays.fill(CHARS, 4026, 4256, (byte) 33 ); // Fill 230 of value (byte) 33
- Arrays.fill(CHARS, 4256, 4294, (byte) -19 ); // Fill 38 of value (byte) -19
- Arrays.fill(CHARS, 4294, 4304, (byte) 33 ); // Fill 10 of value (byte) 33
- Arrays.fill(CHARS, 4304, 4343, (byte) -19 ); // Fill 39 of value (byte) -19
- Arrays.fill(CHARS, 4343, 4352, (byte) 33 ); // Fill 9 of value (byte) 33
- CHARS[4352] = -19;
- CHARS[4353] = 33;
- Arrays.fill(CHARS, 4354, 4356, (byte) -19 ); // Fill 2 of value (byte) -19
- CHARS[4356] = 33;
- Arrays.fill(CHARS, 4357, 4360, (byte) -19 ); // Fill 3 of value (byte) -19
- CHARS[4360] = 33;
- CHARS[4361] = -19;
- CHARS[4362] = 33;
- Arrays.fill(CHARS, 4363, 4365, (byte) -19 ); // Fill 2 of value (byte) -19
- CHARS[4365] = 33;
- Arrays.fill(CHARS, 4366, 4371, (byte) -19 ); // Fill 5 of value (byte) -19
- Arrays.fill(CHARS, 4371, 4412, (byte) 33 ); // Fill 41 of value (byte) 33
- CHARS[4412] = -19;
- CHARS[4413] = 33;
- CHARS[4414] = -19;
- CHARS[4415] = 33;
- CHARS[4416] = -19;
- Arrays.fill(CHARS, 4417, 4428, (byte) 33 ); // Fill 11 of value (byte) 33
- CHARS[4428] = -19;
- CHARS[4429] = 33;
- CHARS[4430] = -19;
- CHARS[4431] = 33;
- CHARS[4432] = -19;
- Arrays.fill(CHARS, 4433, 4436, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 4436, 4438, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 4438, 4441, (byte) 33 ); // Fill 3 of value (byte) 33
- CHARS[4441] = -19;
- Arrays.fill(CHARS, 4442, 4447, (byte) 33 ); // Fill 5 of value (byte) 33
- Arrays.fill(CHARS, 4447, 4450, (byte) -19 ); // Fill 3 of value (byte) -19
- CHARS[4450] = 33;
- CHARS[4451] = -19;
- CHARS[4452] = 33;
- CHARS[4453] = -19;
- CHARS[4454] = 33;
- CHARS[4455] = -19;
- CHARS[4456] = 33;
- CHARS[4457] = -19;
- Arrays.fill(CHARS, 4458, 4461, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 4461, 4463, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 4463, 4466, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 4466, 4468, (byte) -19 ); // Fill 2 of value (byte) -19
- CHARS[4468] = 33;
- CHARS[4469] = -19;
- Arrays.fill(CHARS, 4470, 4510, (byte) 33 ); // Fill 40 of value (byte) 33
- CHARS[4510] = -19;
- Arrays.fill(CHARS, 4511, 4520, (byte) 33 ); // Fill 9 of value (byte) 33
- CHARS[4520] = -19;
- Arrays.fill(CHARS, 4521, 4523, (byte) 33 ); // Fill 2 of value (byte) 33
- CHARS[4523] = -19;
- Arrays.fill(CHARS, 4524, 4526, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 4526, 4528, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 4528, 4535, (byte) 33 ); // Fill 7 of value (byte) 33
- Arrays.fill(CHARS, 4535, 4537, (byte) -19 ); // Fill 2 of value (byte) -19
- CHARS[4537] = 33;
- CHARS[4538] = -19;
- CHARS[4539] = 33;
- Arrays.fill(CHARS, 4540, 4547, (byte) -19 ); // Fill 7 of value (byte) -19
- Arrays.fill(CHARS, 4547, 4587, (byte) 33 ); // Fill 40 of value (byte) 33
- CHARS[4587] = -19;
- Arrays.fill(CHARS, 4588, 4592, (byte) 33 ); // Fill 4 of value (byte) 33
- CHARS[4592] = -19;
- Arrays.fill(CHARS, 4593, 4601, (byte) 33 ); // Fill 8 of value (byte) 33
- CHARS[4601] = -19;
- Arrays.fill(CHARS, 4602, 7680, (byte) 33 ); // Fill 3078 of value (byte) 33
- Arrays.fill(CHARS, 7680, 7836, (byte) -19 ); // Fill 156 of value (byte) -19
- Arrays.fill(CHARS, 7836, 7840, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 7840, 7930, (byte) -19 ); // Fill 90 of value (byte) -19
- Arrays.fill(CHARS, 7930, 7936, (byte) 33 ); // Fill 6 of value (byte) 33
- Arrays.fill(CHARS, 7936, 7958, (byte) -19 ); // Fill 22 of value (byte) -19
- Arrays.fill(CHARS, 7958, 7960, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 7960, 7966, (byte) -19 ); // Fill 6 of value (byte) -19
- Arrays.fill(CHARS, 7966, 7968, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 7968, 8006, (byte) -19 ); // Fill 38 of value (byte) -19
- Arrays.fill(CHARS, 8006, 8008, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 8008, 8014, (byte) -19 ); // Fill 6 of value (byte) -19
- Arrays.fill(CHARS, 8014, 8016, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 8016, 8024, (byte) -19 ); // Fill 8 of value (byte) -19
- CHARS[8024] = 33;
- CHARS[8025] = -19;
- CHARS[8026] = 33;
- CHARS[8027] = -19;
- CHARS[8028] = 33;
- CHARS[8029] = -19;
- CHARS[8030] = 33;
- Arrays.fill(CHARS, 8031, 8062, (byte) -19 ); // Fill 31 of value (byte) -19
- Arrays.fill(CHARS, 8062, 8064, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 8064, 8117, (byte) -19 ); // Fill 53 of value (byte) -19
- CHARS[8117] = 33;
- Arrays.fill(CHARS, 8118, 8125, (byte) -19 ); // Fill 7 of value (byte) -19
- CHARS[8125] = 33;
- CHARS[8126] = -19;
- Arrays.fill(CHARS, 8127, 8130, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 8130, 8133, (byte) -19 ); // Fill 3 of value (byte) -19
- CHARS[8133] = 33;
- Arrays.fill(CHARS, 8134, 8141, (byte) -19 ); // Fill 7 of value (byte) -19
- Arrays.fill(CHARS, 8141, 8144, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 8144, 8148, (byte) -19 ); // Fill 4 of value (byte) -19
- Arrays.fill(CHARS, 8148, 8150, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 8150, 8156, (byte) -19 ); // Fill 6 of value (byte) -19
- Arrays.fill(CHARS, 8156, 8160, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 8160, 8173, (byte) -19 ); // Fill 13 of value (byte) -19
- Arrays.fill(CHARS, 8173, 8178, (byte) 33 ); // Fill 5 of value (byte) 33
- Arrays.fill(CHARS, 8178, 8181, (byte) -19 ); // Fill 3 of value (byte) -19
- CHARS[8181] = 33;
- Arrays.fill(CHARS, 8182, 8189, (byte) -19 ); // Fill 7 of value (byte) -19
- Arrays.fill(CHARS, 8189, 8400, (byte) 33 ); // Fill 211 of value (byte) 33
- Arrays.fill(CHARS, 8400, 8413, (byte) -87 ); // Fill 13 of value (byte) -87
- Arrays.fill(CHARS, 8413, 8417, (byte) 33 ); // Fill 4 of value (byte) 33
- CHARS[8417] = -87;
- Arrays.fill(CHARS, 8418, 8486, (byte) 33 ); // Fill 68 of value (byte) 33
- CHARS[8486] = -19;
- Arrays.fill(CHARS, 8487, 8490, (byte) 33 ); // Fill 3 of value (byte) 33
- Arrays.fill(CHARS, 8490, 8492, (byte) -19 ); // Fill 2 of value (byte) -19
- Arrays.fill(CHARS, 8492, 8494, (byte) 33 ); // Fill 2 of value (byte) 33
- CHARS[8494] = -19;
- Arrays.fill(CHARS, 8495, 8576, (byte) 33 ); // Fill 81 of value (byte) 33
- Arrays.fill(CHARS, 8576, 8579, (byte) -19 ); // Fill 3 of value (byte) -19
- Arrays.fill(CHARS, 8579, 12293, (byte) 33 ); // Fill 3714 of value (byte) 33
- CHARS[12293] = -87;
- CHARS[12294] = 33;
- CHARS[12295] = -19;
- Arrays.fill(CHARS, 12296, 12321, (byte) 33 ); // Fill 25 of value (byte) 33
- Arrays.fill(CHARS, 12321, 12330, (byte) -19 ); // Fill 9 of value (byte) -19
- Arrays.fill(CHARS, 12330, 12336, (byte) -87 ); // Fill 6 of value (byte) -87
- CHARS[12336] = 33;
- Arrays.fill(CHARS, 12337, 12342, (byte) -87 ); // Fill 5 of value (byte) -87
- Arrays.fill(CHARS, 12342, 12353, (byte) 33 ); // Fill 11 of value (byte) 33
- Arrays.fill(CHARS, 12353, 12437, (byte) -19 ); // Fill 84 of value (byte) -19
- Arrays.fill(CHARS, 12437, 12441, (byte) 33 ); // Fill 4 of value (byte) 33
- Arrays.fill(CHARS, 12441, 12443, (byte) -87 ); // Fill 2 of value (byte) -87
- Arrays.fill(CHARS, 12443, 12445, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 12445, 12447, (byte) -87 ); // Fill 2 of value (byte) -87
- Arrays.fill(CHARS, 12447, 12449, (byte) 33 ); // Fill 2 of value (byte) 33
- Arrays.fill(CHARS, 12449, 12539, (byte) -19 ); // Fill 90 of value (byte) -19
- CHARS[12539] = 33;
- Arrays.fill(CHARS, 12540, 12543, (byte) -87 ); // Fill 3 of value (byte) -87
- Arrays.fill(CHARS, 12543, 12549, (byte) 33 ); // Fill 6 of value (byte) 33
- Arrays.fill(CHARS, 12549, 12589, (byte) -19 ); // Fill 40 of value (byte) -19
- Arrays.fill(CHARS, 12589, 19968, (byte) 33 ); // Fill 7379 of value (byte) 33
- Arrays.fill(CHARS, 19968, 40870, (byte) -19 ); // Fill 20902 of value (byte) -19
- Arrays.fill(CHARS, 40870, 44032, (byte) 33 ); // Fill 3162 of value (byte) 33
- Arrays.fill(CHARS, 44032, 55204, (byte) -19 ); // Fill 11172 of value (byte) -19
- Arrays.fill(CHARS, 55204, 55296, (byte) 33 ); // Fill 92 of value (byte) 33
- Arrays.fill(CHARS, 57344, 65534, (byte) 33 ); // Fill 8190 of value (byte) 33
-
- } // <clinit>()
-
- //
- // Public static methods
- //
-
- /**
- * Returns true if the specified character is a supplemental character.
- *
- * @param c The character to check.
- */
- public static boolean isSupplemental(int c) {
- return (c >= 0x10000 && c <= 0x10FFFF);
- }
-
- /**
- * Returns true the supplemental character corresponding to the given
- * surrogates.
- *
- * @param h The high surrogate.
- * @param l The low surrogate.
- */
- public static int supplemental(char h, char l) {
- return (h - 0xD800) * 0x400 + (l - 0xDC00) + 0x10000;
- }
-
- /**
- * Returns the high surrogate of a supplemental character
- *
- * @param c The supplemental character to "split".
- */
- public static char highSurrogate(int c) {
- return (char) (((c - 0x00010000) >> 10) + 0xD800);
- }
-
- /**
- * Returns the low surrogate of a supplemental character
- *
- * @param c The supplemental character to "split".
- */
- public static char lowSurrogate(int c) {
- return (char) (((c - 0x00010000) & 0x3FF) + 0xDC00);
- }
-
- /**
- * Returns whether the given character is a high surrogate
- *
- * @param c The character to check.
- */
- public static boolean isHighSurrogate(int c) {
- return (0xD800 <= c && c <= 0xDBFF);
- }
-
- /**
- * Returns whether the given character is a low surrogate
- *
- * @param c The character to check.
- */
- public static boolean isLowSurrogate(int c) {
- return (0xDC00 <= c && c <= 0xDFFF);
- }
-
-
- /**
- * Returns true if the specified character is valid. This method
- * also checks the surrogate character range from 0x10000 to 0x10FFFF.
- * <p>
- * If the program chooses to apply the mask directly to the
- * <code>CHARS</code> array, then they are responsible for checking
- * the surrogate character range.
- *
- * @param c The character to check.
- */
- public static boolean isValid(int c) {
- return (c < 0x10000 && (CHARS[c] & MASK_VALID) != 0) ||
- (0x10000 <= c && c <= 0x10FFFF);
- } // isValid(int):boolean
-
- /**
- * Returns true if the specified character is invalid.
- *
- * @param c The character to check.
- */
- public static boolean isInvalid(int c) {
- return !isValid(c);
- } // isInvalid(int):boolean
-
- /**
- * Returns true if the specified character can be considered content.
- *
- * @param c The character to check.
- */
- public static boolean isContent(int c) {
- return (c < 0x10000 && (CHARS[c] & MASK_CONTENT) != 0) ||
- (0x10000 <= c && c <= 0x10FFFF);
- } // isContent(int):boolean
-
- /**
- * Returns true if the specified character can be considered markup.
- * Markup characters include '&lt;', '&amp;', and '%'.
- *
- * @param c The character to check.
- */
- public static boolean isMarkup(int c) {
- return c == '<' || c == '&' || c == '%';
- } // isMarkup(int):boolean
-
- /**
- * Returns true if the specified character is a space character
- * as defined by production [3] in the XML 1.0 specification.
- *
- * @param c The character to check.
- */
- public static boolean isSpace(int c) {
- return c <= 0x20 && (CHARS[c] & MASK_SPACE) != 0;
- } // isSpace(int):boolean
-
- /**
- * Returns true if the specified character is a valid name start
- * character as defined by production [5] in the XML 1.0
- * specification.
- *
- * @param c The character to check.
- */
- public static boolean isNameStart(int c) {
- return c < 0x10000 && (CHARS[c] & MASK_NAME_START) != 0;
- } // isNameStart(int):boolean
-
- /**
- * Returns true if the specified character is a valid name
- * character as defined by production [4] in the XML 1.0
- * specification.
- *
- * @param c The character to check.
- */
- public static boolean isName(int c) {
- return c < 0x10000 && (CHARS[c] & MASK_NAME) != 0;
- } // isName(int):boolean
-
- /**
- * Returns true if the specified character is a valid NCName start
- * character as defined by production [4] in Namespaces in XML
- * recommendation.
- *
- * @param c The character to check.
- */
- public static boolean isNCNameStart(int c) {
- return c < 0x10000 && (CHARS[c] & MASK_NCNAME_START) != 0;
- } // isNCNameStart(int):boolean
-
- /**
- * Returns true if the specified character is a valid NCName
- * character as defined by production [5] in Namespaces in XML
- * recommendation.
- *
- * @param c The character to check.
- */
- public static boolean isNCName(int c) {
- return c < 0x10000 && (CHARS[c] & MASK_NCNAME) != 0;
- } // isNCName(int):boolean
-
- /**
- * Returns true if the specified character is a valid Pubid
- * character as defined by production [13] in the XML 1.0
- * specification.
- *
- * @param c The character to check.
- */
- public static boolean isPubid(int c) {
- return c < 0x10000 && (CHARS[c] & MASK_PUBID) != 0;
- } // isPubid(int):boolean
-
- /*
- * [5] Name ::= (Letter | '_' | ':') (NameChar)*
- */
- /**
- * Check to see if a string is a valid Name according to [5]
- * in the XML 1.0 Recommendation
- *
- * @param name string to check
- * @return true if name is a valid Name
- */
- public static boolean isValidName(String name) {
- if (name.length() == 0)
- return false;
- char ch = name.charAt(0);
- if( isNameStart(ch) == false)
- return false;
- for (int i = 1; i < name.length(); i++ ) {
- ch = name.charAt(i);
- if( isName( ch ) == false ){
- return false;
- }
- }
- return true;
- } // isValidName(String):boolean
-
-
- /*
- * from the namespace rec
- * [4] NCName ::= (Letter | '_') (NCNameChar)*
- */
- /**
- * Check to see if a string is a valid NCName according to [4]
- * from the XML Namespaces 1.0 Recommendation
- *
- * @param ncName string to check
- * @return true if name is a valid NCName
- */
- public static boolean isValidNCName(String ncName) {
- if (ncName.length() == 0)
- return false;
- char ch = ncName.charAt(0);
- if( isNCNameStart(ch) == false)
- return false;
- for (int i = 1; i < ncName.length(); i++ ) {
- ch = ncName.charAt(i);
- if( isNCName( ch ) == false ){
- return false;
- }
- }
- return true;
- } // isValidNCName(String):boolean
-
- /*
- * [7] Nmtoken ::= (NameChar)+
- */
- /**
- * Check to see if a string is a valid Nmtoken according to [7]
- * in the XML 1.0 Recommendation
- *
- * @param nmtoken string to check
- * @return true if nmtoken is a valid Nmtoken
- */
- public static boolean isValidNmtoken(String nmtoken) {
- if (nmtoken.length() == 0)
- return false;
- for (int i = 0; i < nmtoken.length(); i++ ) {
- char ch = nmtoken.charAt(i);
- if( ! isName( ch ) ){
- return false;
- }
- }
- return true;
- } // isValidName(String):boolean
-
-
-
-
-
- // encodings
-
- /**
- * Returns true if the encoding name is a valid IANA encoding.
- * This method does not verify that there is a decoder available
- * for this encoding, only that the characters are valid for an
- * IANA encoding name.
- *
- * @param ianaEncoding The IANA encoding name.
- */
- public static boolean isValidIANAEncoding(String ianaEncoding) {
- if (ianaEncoding != null) {
- int length = ianaEncoding.length();
- if (length > 0) {
- char c = ianaEncoding.charAt(0);
- if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) {
- for (int i = 1; i < length; i++) {
- c = ianaEncoding.charAt(i);
- if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') &&
- (c < '0' || c > '9') && c != '.' && c != '_' &&
- c != '-') {
- return false;
- }
- }
- return true;
- }
- }
- }
- return false;
- } // isValidIANAEncoding(String):boolean
-
- /**
- * Returns true if the encoding name is a valid Java encoding.
- * This method does not verify that there is a decoder available
- * for this encoding, only that the characters are valid for an
- * Java encoding name.
- *
- * @param javaEncoding The Java encoding name.
- */
- public static boolean isValidJavaEncoding(String javaEncoding) {
- if (javaEncoding != null) {
- int length = javaEncoding.length();
- if (length > 0) {
- for (int i = 1; i < length; i++) {
- char c = javaEncoding.charAt(i);
- if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') &&
- (c < '0' || c > '9') && c != '.' && c != '_' &&
- c != '-') {
- return false;
- }
- }
- return true;
- }
- }
- return false;
- } // isValidIANAEncoding(String):boolean
-
-
-} // class XMLChar
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/resources/ResourceBundle.properties b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/resources/ResourceBundle.properties
deleted file mode 100644
index bccada9e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/resources/ResourceBundle.properties
+++ /dev/null
@@ -1,207 +0,0 @@
-#
-# Copyright (c) 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-# THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
-#
-
-# Sample ResourceBundle properties file
-message.optinalValues = Optional values (other than initial vocabulary) of DII not supported
-message.noExternalVocabularies=No external vocabularies registered
-message.externalVocabularyNotRegistered=External vocabulary referenced by "{0}" is not registered"
-
-message.illegalState=Illegal state for decoding of EncodedCharacterString
-message.missingNamespace=Name surrogate prefix is present when namespace name is absent
-message.IIsNotTerminatedCorrectly=Notation IIs not terminated correctly
-message.unparsedEntities=Unparsed entities not terminated correctly
-message.decodingNotSupported=Document version with encoding algorithm decoding not supported
-message.qNameMissingNamespaceName=Literal qualified name with prefix but no namespace name
-message.decodingEII=Illegal state when decoding literal qualified name of EII
-
-message.decodingNonIdentifyingString=Illegal state whendecoding non identifying string
-message.decodingOctets=Illegal state when decoding octets
-message.decodingIdentifyingString=Illegal state when decoding identifying string on first bit
-message.prefixIllegal=The literal identifying string for the \"xml\" prefix is illegal
-message.xmlns=The prefix \"xmlns\" cannot be bound to any namespace explicitly
-message.wrongNamespaceName=\"xml\" prefix with a namespace name other than XML namespace name
-message.missingNamespaceName=\"xml\" prefix without an XML namespace name
-message.decodingIdentifyingStringForPrefix=Illegal state when decoding identifying string for prefix on first bit
-message.xmlnsConnotBeBoundToPrefix=The namespace \"http://www.w3.org/2000/xmlns/\" cannot be bound to any prfix explicitly
-message.illegalNamespaceName=The literal identifying string for the \"http://www.w3.org/XML/1998/namespace\" namespace name is illegal
-message.namespaceWithoutPrefix=The XML namespace is not allowed without the XML prefix
-message.decodingForNamespaceName=Illegal state when decoding identifying string for namespace name on first bit
-message.decodingNonEmptyOctet=Illegal state when decoding non empty octet string on second bit
-message.decodingIndexOnSecondBit=Illegal state when decoding index on second bit
-message.notFIDocument=Input stream is not a fast infoset document
-message.alphabetNotPresent=Restricted alphabet not present for identifier {0}
-message.alphabetIdentifiersReserved=Restricted alphabet identifiers 2 up to and including 31 are reserved for future use
-message.alphabetMustContain2orMoreChars=Restricted Alphabet must contain 2 or more characters
-message.alphabetIncorrectlyTerminated=Restricted alphabet incorrectly terminated
-message.fullBytesNotRead=Full bytes not read
-message.deliminatorTooSmall=Length deliminator too small
-message.UTF8Encoded=Illegal state for UTF-8 encoded string
-message.UTF8EncodedNCName=Illegal state for UTF-8 encoded NCName
-message.EOF=Unexpeceted EOF
-
-#encoder
-message.restrictedAlphabetNotPresent=Restricted alphabet not present in restricted alphabet table
-message.namespaceURINotIndexed=namespace URI of local name not indexed\: {0}
-message.prefixNotIndexed=prefix of local name not indexed\: {0}
-message.EncodingAlgorithmURI=Encoding algorithm URI '{0}' not a member of the encoding algorithm table
-message.nullEncodingAlgorithmURI=Null encoding algorithm URI present with data that is not byte[]
-message.CDATA=CDATA
-message.UnsupportedBuiltInAlgorithm=Unsupported built-in encoding algorithm\: {0}
-
-message.identifiers10to31Reserved=Encoding algorithm identifiers 10 up to and including 31 are reserved for future use
-message.characterOutofAlphabetRange=Character(s) not in restricted alphabet range
-message.integerMaxSize=Integer > {0}
-
-
-#com.sun.xml.internal.fastinfoset.algorithm
-message.notImplemented=Not implemented
-message.dataNotByteArray='data' not an instance of byte[]
-message.dataNotBoolean='data' not an instance of boolean[]
-message.unusedBits4=The number of unused bits is too large (should be < 4)
-message.unusedBits8=The number of unused bits is too large (should be < 8)
-message.lengthIsNotMultipleOfDouble='length' is not a multiple of {0} bytes correspond to the size of the IEEE 754 floating-point \"single format\"
-message.dataNotDouble='data' not an instance of double[]
-message.lengthNotMultipleOfFloat='length' is not a multiple of {0} bytes correspond to the size of the IEEE 754 floating-point \"single format\"
-message.dataNotFloat='data' not an instance of float[]
-message.lengthNotMultipleOfInt='length' is not a multiple of {0} bytes correspond to the size of the 'int' primitive type
-message.dataNotIntArray='data' not an instance of int[]
-message.lengthNotMultipleOfLong='length' is not a multiple of {0} bytes correspond to the size of the 'long' primitive type
-message.dataNotLongArray='data' not an instance of long[]
-message.lengthNotMultipleOfShort='length' is not a multiple of {0} bytes correspond to the size of the 'short' primitive type
-message.dataNotShortArray='data' not an instance of short[]
-message.lengthNotMultipleOfUUID='length' is not a multiple of {0} bytes correspond to the size of the 'UUID' primitive type
-message.invalidUUID=Invalid UUID string\: {0}
-
-#com.sun.xml.internal.fastinfoset.dom
-
-
-
-message.algorithmDataCannotBeReported=Document contains application-defined encoding algorithm data that cannot be reported
-
-message.CDATAAlgorithmNotSupported=CDATA encoding algorithm not supported for attribute values
-
-message.commentIIAlgorithmNotSupported=Comment II with encoding algorithm decoding not supported
-
-message.decodingAIIValue=Illegal state when decoding AII value
-
-message.AIIqNameNotInScope=Qualified name of AII not in scope
-
-message.decodingAIIs=Illegal state when decoding AIIs
-
-message.IllegalStateDecodingEIIAfterAIIs=Illegal state when decoding EII after the namespace AIIs
-
-message.EIInamespaceNameNotTerminatedCorrectly=Namespace names of EII not terminated correctly
-
-message.IllegalStateDecodingEII=Illegal state when decoding a child of an EII
-
-message.addToTableNotSupported=Add to table not supported for Encoding algorithms
-
-message.qnameOfEIINotInScope=Qualified name of EII not in scope
-
-message.IllegalStateDecodingDII=Illegal state when decoding a child of a DII
-
-message.processingInstructionIIsNotTerminatedCorrectly=Processing instruction IIs of Document Type Declaraion II not terminated correctly
-
-message.processingIIWithEncodingAlgorithm=Processing II with encoding algorithm decoding not supported
-
-message.secondOccurenceOfDTDII=A second occurence of a Document Type Declaration II is present
-
-#com.sun.xml.internal.fastinfoset.sax
-message.URINotPresent=URI not present for encoding algorithm identifier {0}
-message.algorithmNotRegistered=Encoding algorithm not registered for URI {0}
-message.featureNotSupported=Feature not supported\: {0}
-message.propertyNotRecognized=Property not recognized\:
-message.inputSource=InputSource must include a byte stream or a system ID
-message.qNameOfEIINotInScope=Qualified name of EII not in scope
-message.unsupportedAlgorithm=Unsupported built-in encoding algorithm\: {0}
-message.processingInstructionTargetIsEmpty=processingInstruction\: Target is empty
-
-#com.sun.xml.internal.fastinfoset.stax
-message.StAX2SAXReader=StAX2SAXReader does not support event {0}
-
-message.noMoreEvents=No more events to report (EOF).
-message.eventTypeNotMatch=Event type {0} specified did not match with current parser event
-message.namespaceURINotMatch=Namespace URI {0} specified did not match with current namespace URI
-message.localNameNotMatch=LocalName {0} specified did not match with current local name
-message.mustBeOnSTARTELEMENT=parser must be on START_ELEMENT to read next text
-message.unexpectedEOF=unexpected end of document when reading element text content
-
-message.getElementTextExpectTextOnly=getElementText() function expects text only element but START_ELEMENT was encountered.
-message.unexpectedEventType=Unexpected event type {0}
-message.expectedStartOrEnd=expected start or end tag
-message.nullPrefix=Prefix cannot be null.
-message.invalidCallingGetAttributeValue=Method getAttributeValue() called in invalid state
-
-message.invalidCallingGetNamespaceCount=Method getNamespaceCount() called in invalid state
-message.invalidCallingGetNamespacePrefix=Method getNamespacePrefix() called in invalid state
-message.InvalidStateForText=Invalid state for text
-message.invalidCallingGetName=Method getName() called in invalid state
-message.invalidCallingGetLocalName=Method getLocalName() called in invalid state
-message.invalidCallingGetNamespaceURI=Method getNamespaceURI() called in invalid state
-message.invalidCallingGetPrefix=Method getPrefix() called in invalid state
-message.invalidCallingGetPITarget=Method getPITarget() called in invalid state
-message.invalidCallingGetPIData=Method getPIData() called in invalid state
-
-
-message.mustBeOnSTART_ELEMENT=parser must be on START_ELEMENT to read next text.
-message.END_ELEMENTnotFound=Can not find END_ELEMENT.
-message.startOrEndNotFound=Can not find start or end element.
-message.noMoreItems=no more items to return
-message.nullPropertyName=Property name can not be null.
-
-message.validationNotSupported=This implementation does not support validation
-message.externalEntities=This implementation does not resolve external entities
-message.propertyNotSupported=Property {0} is not supported
-message.noElement=No element.
-message.nullXMLEventAllocator=XMLEvent Allocator may not be null
-
-message.nullEventReader=Event reader can not be null
-message.eventTypeNotSupported=Event type\: {0} not supported.
-message.URIUnbound=URI ''{0}'' is unbound for this attribute
-message.attributeWritingNotAllowed=Current state does not allow attribute writing
-
-#com.sun.xml.internal.fastinfoset.stax.event
-message.charactersCast=cannnot cast {0} to Characters
-message.endElementCase=cannnot cast {0} to EndElement
-message.startElementCase=cannnot cast {0} to StartElement
-message.nullReader=Reader cannot be null
-
-#com.sun.xml.internal.fastinfoset.tools
-message.AttributeValueHolderExpected=Object o is not an AttributeValueHolder
-message.optinalFileNotSpecified=An optional input file and optional output file must be specified
-
-#com.sun.xml.internal.fastinfoset.util
-
-message.illegalClass=Illegal class\: {0}
-message.arrayMaxCapacity=Array has reached maximum capacity
-message.maxNumberOfCharacters=Maximum number of characters is reached
-message.duplicateAttribute=Duplicate attribute present
-message.emptyIterator=The Iterator is empty.
-message.illegalInitialCapacity=Illegal initial capacity\: {0}
-message.illegalLoadFactor=Illegal load factor\: {0}
-message.duplicateNamespaceAttribute=Duplicate namespace attribute entry
-message.readonlyList=The list is read-only. Content can not be changed.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/AttributesHolder.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/AttributesHolder.java
deleted file mode 100644
index afca1160..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/AttributesHolder.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.sax;
-
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import com.sun.xml.internal.fastinfoset.algorithm.BuiltInEncodingAlgorithmFactory;
-import java.io.IOException;
-import java.util.Map;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithm;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmIndexes;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetException;
-
-import com.sun.xml.internal.org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class AttributesHolder implements EncodingAlgorithmAttributes {
- private static final int DEFAULT_CAPACITY = 8;
-
- private Map _registeredEncodingAlgorithms;
-
- private int _attributeCount;
-
- private QualifiedName[] _names;
- private String[] _values;
-
- private String[] _algorithmURIs;
- private int[] _algorithmIds;
- private Object[] _algorithmData;
-
- public AttributesHolder() {
- _names = new QualifiedName[DEFAULT_CAPACITY];
- _values = new String[DEFAULT_CAPACITY];
-
- _algorithmURIs = new String[DEFAULT_CAPACITY];
- _algorithmIds = new int[DEFAULT_CAPACITY];
- _algorithmData = new Object[DEFAULT_CAPACITY];
- }
-
- public AttributesHolder(Map registeredEncodingAlgorithms) {
- this();
- _registeredEncodingAlgorithms = registeredEncodingAlgorithms;
- }
-
- // org.xml.sax.Attributes
-
- public final int getLength() {
- return _attributeCount;
- }
-
- public final String getLocalName(int index) {
- return _names[index].localName;
- }
-
- public final String getQName(int index) {
- return _names[index].getQNameString();
- }
-
- public final String getType(int index) {
- return "CDATA";
- }
-
- public final String getURI(int index) {
- return _names[index].namespaceName;
- }
-
- public final String getValue(int index) {
- final String value = _values[index];
- if (value != null) {
- return value;
- }
-
- if (_algorithmData[index] == null ||
- (_algorithmIds[index] >= EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START &&
- _registeredEncodingAlgorithms == null)) {
- return null;
- }
-
- try {
- return _values[index] = convertEncodingAlgorithmDataToString(
- _algorithmIds[index],
- _algorithmURIs[index],
- _algorithmData[index]).toString();
- } catch (IOException e) {
- return null;
- } catch (FastInfosetException e) {
- return null;
- }
- }
-
- public final int getIndex(String qName) {
- int i = qName.indexOf(':');
- String prefix = "";
- String localName = qName;
- if (i >= 0) {
- prefix = qName.substring(0, i);
- localName = qName.substring(i + 1);
- }
-
- for (i = 0; i < _attributeCount; i++) {
- QualifiedName name = _names[i];
- if (localName.equals(name.localName) &&
- prefix.equals(name.prefix)) {
- return i;
- }
- }
- return -1;
- }
-
- public final String getType(String qName) {
- int index = getIndex(qName);
- if (index >= 0) {
- return "CDATA";
- } else {
- return null;
- }
- }
-
- public final String getValue(String qName) {
- int index = getIndex(qName);
- if (index >= 0) {
- return _values[index];
- } else {
- return null;
- }
- }
-
- public final int getIndex(String uri, String localName) {
- for (int i = 0; i < _attributeCount; i++) {
- QualifiedName name = _names[i];
- if (localName.equals(name.localName) &&
- uri.equals(name.namespaceName)) {
- return i;
- }
- }
- return -1;
- }
-
- public final String getType(String uri, String localName) {
- int index = getIndex(uri, localName);
- if (index >= 0) {
- return "CDATA";
- } else {
- return null;
- }
- }
-
- public final String getValue(String uri, String localName) {
- int index = getIndex(uri, localName);
- if (index >= 0) {
- return _values[index];
- } else {
- return null;
- }
- }
-
- public final void clear() {
- for (int i = 0; i < _attributeCount; i++) {
- _values[i] = null;
- _algorithmData[i] = null;
- }
- _attributeCount = 0;
- }
-
- // EncodingAlgorithmAttributes
-
- public final String getAlgorithmURI(int index) {
- return _algorithmURIs[index];
- }
-
- public final int getAlgorithmIndex(int index) {
- return _algorithmIds[index];
- }
-
- public final Object getAlgorithmData(int index) {
- return _algorithmData[index];
- }
-
- public String getAlpababet(int index) {
- return null;
- }
-
- public boolean getToIndex(int index) {
- return false;
- }
-
- // -----
-
- public final void addAttribute(QualifiedName name, String value) {
- if (_attributeCount == _names.length) {
- resize();
- }
- _names[_attributeCount] = name;
- _values[_attributeCount++] = value;
- }
-
- public final void addAttributeWithAlgorithmData(QualifiedName name, String URI, int id, Object data) {
- if (_attributeCount == _names.length) {
- resize();
- }
- _names[_attributeCount] = name;
- _values[_attributeCount] = null;
-
- _algorithmURIs[_attributeCount] = URI;
- _algorithmIds[_attributeCount] = id;
- _algorithmData[_attributeCount++] = data;
- }
-
- public final QualifiedName getQualifiedName(int index) {
- return _names[index];
- }
-
- public final String getPrefix(int index) {
- return _names[index].prefix;
- }
-
- private final void resize() {
- final int newLength = _attributeCount * 3 / 2 + 1;
-
- QualifiedName[] names = new QualifiedName[newLength];
- String[] values = new String[newLength];
-
- String[] algorithmURIs = new String[newLength];
- int[] algorithmIds = new int[newLength];
- Object[] algorithmData = new Object[newLength];
-
- System.arraycopy(_names, 0, names, 0, _attributeCount);
- System.arraycopy(_values, 0, values, 0, _attributeCount);
-
- System.arraycopy(_algorithmURIs, 0, algorithmURIs, 0, _attributeCount);
- System.arraycopy(_algorithmIds, 0, algorithmIds, 0, _attributeCount);
- System.arraycopy(_algorithmData, 0, algorithmData, 0, _attributeCount);
-
- _names = names;
- _values = values;
-
- _algorithmURIs = algorithmURIs;
- _algorithmIds = algorithmIds;
- _algorithmData = algorithmData;
- }
-
- private final StringBuffer convertEncodingAlgorithmDataToString(int identifier, String URI, Object data) throws FastInfosetException, IOException {
- EncodingAlgorithm ea = null;
- if (identifier < EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END) {
- ea = BuiltInEncodingAlgorithmFactory.getAlgorithm(identifier);
- } else if (identifier == EncodingAlgorithmIndexes.CDATA) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.CDATAAlgorithmNotSupported"));
- } else if (identifier >= EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START) {
- if (URI == null) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.URINotPresent") + identifier);
- }
-
- ea = (EncodingAlgorithm)_registeredEncodingAlgorithms.get(URI);
- if (ea == null) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.algorithmNotRegistered") + URI);
- }
- } else {
- // Reserved built-in algorithms for future use
- // TODO should use sax property to decide if event will be
- // reported, allows for support through handler if required.
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.identifiers10to31Reserved"));
- }
-
- final StringBuffer sb = new StringBuffer();
- ea.convertToCharacters(data, sb);
- return sb;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/Features.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/Features.java
deleted file mode 100644
index 6bfd2ed2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/Features.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.sax;
-
-public class Features {
- public static final String NAMESPACES_FEATURE =
- "http://xml.org/sax/features/namespaces";
- public static final String NAMESPACE_PREFIXES_FEATURE =
- "http://xml.org/sax/features/namespace-prefixes";
- public static final String STRING_INTERNING_FEATURE =
- "http://xml.org/sax/features/string-interning";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/Properties.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/Properties.java
deleted file mode 100644
index 9b01a364..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/Properties.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.sax;
-
-public class Properties {
- public static final String LEXICAL_HANDLER_PROPERTY =
- "http://xml.org/sax/properties/lexical-handler";
- public static final String DTD_DECLARATION_HANDLER_PROPERTY =
- "http://xml.org/sax/properties/declaration-handler";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SAXDocumentParser.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SAXDocumentParser.java
deleted file mode 100644
index 2d44b5f3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SAXDocumentParser.java
+++ /dev/null
@@ -1,1791 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.sax;
-
-import com.sun.xml.internal.fastinfoset.Decoder;
-import com.sun.xml.internal.fastinfoset.DecoderStateTables;
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import com.sun.xml.internal.fastinfoset.algorithm.BuiltInEncodingAlgorithmFactory;
-import com.sun.xml.internal.fastinfoset.algorithm.BuiltInEncodingAlgorithmState;
-import com.sun.xml.internal.org.jvnet.fastinfoset.sax.EncodingAlgorithmContentHandler;
-import com.sun.xml.internal.org.jvnet.fastinfoset.sax.FastInfosetReader;
-import com.sun.xml.internal.org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler;
-import com.sun.xml.internal.fastinfoset.util.CharArray;
-import com.sun.xml.internal.fastinfoset.util.CharArrayString;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Map;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithm;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmIndexes;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetException;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.DefaultHandler;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.xml.sax.ext.DeclHandler;
-
-/**
- * The Fast Infoset SAX parser.
- * <p>
- * Instantiate this parser to parse a fast infoset document in accordance
- * with the SAX API.
- *
- * <p>
- * More than one fast infoset document may be decoded from the
- * {@link java.io.InputStream}.
- */
-public class SAXDocumentParser extends Decoder implements FastInfosetReader {
- private static final Logger logger = Logger.getLogger(SAXDocumentParser.class.getName());
-
- /*
- * Empty lexical handler used by default to report
- * lexical-based events
- */
- private static final class LexicalHandlerImpl implements LexicalHandler {
- public void comment(char[] ch, int start, int end) { }
-
- public void startDTD(String name, String publicId, String systemId) { }
- public void endDTD() { }
-
- public void startEntity(String name) { }
- public void endEntity(String name) { }
-
- public void startCDATA() { }
- public void endCDATA() { }
- };
-
- /*
- * Empty DTD declaration handler used by default to report
- * DTD declaration-based events
- */
- private static final class DeclHandlerImpl implements DeclHandler {
- public void elementDecl(String name, String model) throws SAXException {
- }
-
- public void attributeDecl(String eName, String aName,
- String type, String mode, String value) throws SAXException {
- }
-
- public void internalEntityDecl(String name,
- String value) throws SAXException {
- }
-
- public void externalEntityDecl(String name,
- String publicId, String systemId) throws SAXException {
- }
- }
-
- /**
- * SAX Namespace attributes features
- */
- protected boolean _namespacePrefixesFeature = false;
-
- /**
- * Reference to entity resolver.
- */
- protected EntityResolver _entityResolver;
-
- /**
- * Reference to dtd handler.
- */
- protected DTDHandler _dtdHandler;
-
- /**
- * Reference to content handler.
- */
- protected ContentHandler _contentHandler;
-
- /**
- * Reference to error handler.
- */
- protected ErrorHandler _errorHandler;
-
- /**
- * Reference to lexical handler.
- */
- protected LexicalHandler _lexicalHandler;
-
- /**
- * Reference to DTD declaration handler.
- */
- protected DeclHandler _declHandler;
-
- protected EncodingAlgorithmContentHandler _algorithmHandler;
-
- protected PrimitiveTypeContentHandler _primitiveHandler;
-
- protected BuiltInEncodingAlgorithmState builtInAlgorithmState =
- new BuiltInEncodingAlgorithmState();
-
- protected AttributesHolder _attributes;
-
- protected int[] _namespacePrefixes = new int[16];
-
- protected int _namespacePrefixesIndex;
-
- protected boolean _clearAttributes = false;
-
- /** Creates a new instance of DocumetParser2 */
- public SAXDocumentParser() {
- DefaultHandler handler = new DefaultHandler();
- _attributes = new AttributesHolder(_registeredEncodingAlgorithms);
-
- _entityResolver = handler;
- _dtdHandler = handler;
- _contentHandler = handler;
- _errorHandler = handler;
- _lexicalHandler = new LexicalHandlerImpl();
- _declHandler = new DeclHandlerImpl();
- }
-
- protected void resetOnError() {
- _clearAttributes = false;
- _attributes.clear();
- _namespacePrefixesIndex = 0;
-
- if (_v != null) {
- _v.prefix.clearCompletely();
- }
- _duplicateAttributeVerifier.clear();
- }
-
- // XMLReader interface
-
- public boolean getFeature(String name)
- throws SAXNotRecognizedException, SAXNotSupportedException {
- if (name.equals(Features.NAMESPACES_FEATURE)) {
- return true;
- } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
- return _namespacePrefixesFeature;
- } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
- name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
- return getStringInterning();
- } else {
- throw new SAXNotRecognizedException(
- CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
- }
- }
-
- public void setFeature(String name, boolean value)
- throws SAXNotRecognizedException, SAXNotSupportedException {
- if (name.equals(Features.NAMESPACES_FEATURE)) {
- if (value == false) {
- throw new SAXNotSupportedException(name + ":" + value);
- }
- } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
- _namespacePrefixesFeature = value;
- } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
- name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
- setStringInterning(value);
- } else {
- throw new SAXNotRecognizedException(
- CommonResourceBundle.getInstance().getString("message.featureNotSupported") + name);
- }
- }
-
- public Object getProperty(String name)
- throws SAXNotRecognizedException, SAXNotSupportedException {
- if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
- return getLexicalHandler();
- } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
- return getDeclHandler();
- } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
- return getExternalVocabularies();
- } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
- return getRegisteredEncodingAlgorithms();
- } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
- return getEncodingAlgorithmContentHandler();
- } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
- return getPrimitiveTypeContentHandler();
- } else {
- throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
- getString("message.propertyNotRecognized", new Object[]{name}));
- }
- }
-
- public void setProperty(String name, Object value)
- throws SAXNotRecognizedException, SAXNotSupportedException {
- if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
- if (value instanceof LexicalHandler) {
- setLexicalHandler((LexicalHandler)value);
- } else {
- throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
- }
- } else if (name.equals(Properties.DTD_DECLARATION_HANDLER_PROPERTY)) {
- if (value instanceof DeclHandler) {
- setDeclHandler((DeclHandler)value);
- } else {
- throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
- }
- } else if (name.equals(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY)) {
- if (value instanceof Map) {
- setExternalVocabularies((Map)value);
- } else {
- throw new SAXNotSupportedException(FastInfosetReader.EXTERNAL_VOCABULARIES_PROPERTY);
- }
- } else if (name.equals(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY)) {
- if (value instanceof Map) {
- setRegisteredEncodingAlgorithms((Map)value);
- } else {
- throw new SAXNotSupportedException(FastInfosetReader.REGISTERED_ENCODING_ALGORITHMS_PROPERTY);
- }
- } else if (name.equals(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY)) {
- if (value instanceof EncodingAlgorithmContentHandler) {
- setEncodingAlgorithmContentHandler((EncodingAlgorithmContentHandler)value);
- } else {
- throw new SAXNotSupportedException(FastInfosetReader.ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY);
- }
- } else if (name.equals(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY)) {
- if (value instanceof PrimitiveTypeContentHandler) {
- setPrimitiveTypeContentHandler((PrimitiveTypeContentHandler)value);
- } else {
- throw new SAXNotSupportedException(FastInfosetReader.PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY);
- }
- } else if (name.equals(FastInfosetReader.BUFFER_SIZE_PROPERTY)) {
- if (value instanceof Integer) {
- setBufferSize(((Integer)value).intValue());
- } else {
- throw new SAXNotSupportedException(FastInfosetReader.BUFFER_SIZE_PROPERTY);
- }
- } else {
- throw new SAXNotRecognizedException(CommonResourceBundle.getInstance().
- getString("message.propertyNotRecognized", new Object[]{name}));
- }
- }
-
- public void setEntityResolver(EntityResolver resolver) {
- _entityResolver = resolver;
- }
-
- public EntityResolver getEntityResolver() {
- return _entityResolver;
- }
-
- public void setDTDHandler(DTDHandler handler) {
- _dtdHandler = handler;
- }
-
- public DTDHandler getDTDHandler() {
- return _dtdHandler;
- }
- public void setContentHandler(ContentHandler handler) {
- _contentHandler = handler;
- }
-
- public ContentHandler getContentHandler() {
- return _contentHandler;
- }
-
- public void setErrorHandler(ErrorHandler handler) {
- _errorHandler = handler;
- }
-
- public ErrorHandler getErrorHandler() {
- return _errorHandler;
- }
-
- public void parse(InputSource input) throws IOException, SAXException {
- try {
- InputStream s = input.getByteStream();
- if (s == null) {
- String systemId = input.getSystemId();
- if (systemId == null) {
- throw new SAXException(CommonResourceBundle.getInstance().getString("message.inputSource"));
- }
- parse(systemId);
- } else {
- parse(s);
- }
- } catch (FastInfosetException e) {
- logger.log(Level.FINE, "parsing error", e);
- throw new SAXException(e);
- }
- }
-
- public void parse(String systemId) throws IOException, SAXException {
- try {
- systemId = SystemIdResolver.getAbsoluteURI(systemId);
- parse(new URL(systemId).openStream());
- } catch (FastInfosetException e) {
- logger.log(Level.FINE, "parsing error", e);
- throw new SAXException(e);
- }
- }
-
-
-
-
- // FastInfosetReader
-
- public final void parse(InputStream s) throws IOException, FastInfosetException, SAXException {
- setInputStream(s);
- parse();
- }
-
- public void setLexicalHandler(LexicalHandler handler) {
- _lexicalHandler = handler;
- }
-
- public LexicalHandler getLexicalHandler() {
- return _lexicalHandler;
- }
-
- public void setDeclHandler(DeclHandler handler) {
- _declHandler = handler;
- }
-
- public DeclHandler getDeclHandler() {
- return _declHandler;
- }
-
- public void setEncodingAlgorithmContentHandler(EncodingAlgorithmContentHandler handler) {
- _algorithmHandler = handler;
- }
-
- public EncodingAlgorithmContentHandler getEncodingAlgorithmContentHandler() {
- return _algorithmHandler;
- }
-
- public void setPrimitiveTypeContentHandler(PrimitiveTypeContentHandler handler) {
- _primitiveHandler = handler;
- }
-
- public PrimitiveTypeContentHandler getPrimitiveTypeContentHandler() {
- return _primitiveHandler;
- }
-
-
-
-
- public final void parse() throws FastInfosetException, IOException {
- if (_octetBuffer.length < _bufferSize) {
- _octetBuffer = new byte[_bufferSize];
- }
-
- try {
- reset();
- decodeHeader();
- if (_parseFragments)
- processDIIFragment();
- else
- processDII();
- } catch (RuntimeException e) {
- try {
- _errorHandler.fatalError(new SAXParseException(e.getClass().getName(), null, e));
- } catch (Exception ee) {
- }
- resetOnError();
- // Wrap runtime exception
- throw new FastInfosetException(e);
- } catch (FastInfosetException e) {
- try {
- _errorHandler.fatalError(new SAXParseException(e.getClass().getName(), null, e));
- } catch (Exception ee) {
- }
- resetOnError();
- throw e;
- } catch (IOException e) {
- try {
- _errorHandler.fatalError(new SAXParseException(e.getClass().getName(), null, e));
- } catch (Exception ee) {
- }
- resetOnError();
- throw e;
- }
- }
-
- protected final void processDII() throws FastInfosetException, IOException {
- try {
- _contentHandler.startDocument();
- } catch (SAXException e) {
- throw new FastInfosetException("processDII", e);
- }
-
- _b = read();
- if (_b > 0) {
- processDIIOptionalProperties();
- }
-
- // Decode one Document Type II, Comment IIs, PI IIs and one EII
- boolean firstElementHasOccured = false;
- boolean documentTypeDeclarationOccured = false;
- while(!_terminate || !firstElementHasOccured) {
- _b = read();
- switch(DecoderStateTables.DII(_b)) {
- case DecoderStateTables.EII_NO_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[_b], false);
- firstElementHasOccured = true;
- break;
- case DecoderStateTables.EII_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[_b & EncodingConstants.INTEGER_3RD_BIT_SMALL_MASK], true);
- firstElementHasOccured = true;
- break;
- case DecoderStateTables.EII_INDEX_MEDIUM:
- processEII(decodeEIIIndexMedium(), (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- firstElementHasOccured = true;
- break;
- case DecoderStateTables.EII_INDEX_LARGE:
- processEII(decodeEIIIndexLarge(), (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- firstElementHasOccured = true;
- break;
- case DecoderStateTables.EII_LITERAL:
- {
- final QualifiedName qn = decodeLiteralQualifiedName(
- _b & EncodingConstants.LITERAL_QNAME_PREFIX_NAMESPACE_NAME_MASK,
- _elementNameTable.getNext());
- _elementNameTable.add(qn);
- processEII(qn, (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- firstElementHasOccured = true;
- break;
- }
- case DecoderStateTables.EII_NAMESPACES:
- processEIIWithNamespaces();
- firstElementHasOccured = true;
- break;
- case DecoderStateTables.DOCUMENT_TYPE_DECLARATION_II:
- {
- if (documentTypeDeclarationOccured) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.secondOccurenceOfDTDII"));
- }
- documentTypeDeclarationOccured = true;
-
- String system_identifier = ((_b & EncodingConstants.DOCUMENT_TYPE_SYSTEM_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : "";
- String public_identifier = ((_b & EncodingConstants.DOCUMENT_TYPE_PUBLIC_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : "";
-
- _b = read();
- while (_b == EncodingConstants.PROCESSING_INSTRUCTION) {
- switch(decodeNonIdentifyingStringOnFirstBit()) {
- case NISTRING_STRING:
- if (_addToTable) {
- _v.otherString.add(new CharArray(_charBuffer, 0, _charBufferLength, true));
- }
- break;
- case NISTRING_ENCODING_ALGORITHM:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.processingIIWithEncodingAlgorithm"));
- case NISTRING_INDEX:
- break;
- case NISTRING_EMPTY_STRING:
- break;
- }
- _b = read();
- }
- if ((_b & EncodingConstants.TERMINATOR) != EncodingConstants.TERMINATOR) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.processingInstructionIIsNotTerminatedCorrectly"));
- }
- if (_b == EncodingConstants.DOUBLE_TERMINATOR) {
- _terminate = true;
- }
-
- if (_notations != null) _notations.clear();
- if (_unparsedEntities != null) _unparsedEntities.clear();
- /*
- * TODO
- * Report All events associated with DTD, PIs, notations etc
- */
- break;
- }
- case DecoderStateTables.COMMENT_II:
- processCommentII();
- break;
- case DecoderStateTables.PROCESSING_INSTRUCTION_II:
- processProcessingII();
- break;
- case DecoderStateTables.TERMINATOR_DOUBLE:
- _doubleTerminate = true;
- case DecoderStateTables.TERMINATOR_SINGLE:
- _terminate = true;
- break;
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.IllegalStateDecodingDII"));
- }
- }
-
- // Decode any remaining Comment IIs, PI IIs
- while(!_terminate) {
- _b = read();
- switch(DecoderStateTables.DII(_b)) {
- case DecoderStateTables.COMMENT_II:
- processCommentII();
- break;
- case DecoderStateTables.PROCESSING_INSTRUCTION_II:
- processProcessingII();
- break;
- case DecoderStateTables.TERMINATOR_DOUBLE:
- _doubleTerminate = true;
- case DecoderStateTables.TERMINATOR_SINGLE:
- _terminate = true;
- break;
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.IllegalStateDecodingDII"));
- }
- }
-
- try {
- _contentHandler.endDocument();
- } catch (SAXException e) {
- throw new FastInfosetException("processDII", e);
- }
- }
-
- protected final void processDIIFragment() throws FastInfosetException, IOException {
- try {
- _contentHandler.startDocument();
- } catch (SAXException e) {
- throw new FastInfosetException("processDII", e);
- }
-
- _b = read();
- if (_b > 0) {
- processDIIOptionalProperties();
- }
-
- while(!_terminate) {
- _b = read();
- switch(DecoderStateTables.EII(_b)) {
- case DecoderStateTables.EII_NO_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[_b], false);
- break;
- case DecoderStateTables.EII_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[_b & EncodingConstants.INTEGER_3RD_BIT_SMALL_MASK], true);
- break;
- case DecoderStateTables.EII_INDEX_MEDIUM:
- processEII(decodeEIIIndexMedium(), (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- break;
- case DecoderStateTables.EII_INDEX_LARGE:
- processEII(decodeEIIIndexLarge(), (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- break;
- case DecoderStateTables.EII_LITERAL:
- {
- final QualifiedName qn = decodeLiteralQualifiedName(
- _b & EncodingConstants.LITERAL_QNAME_PREFIX_NAMESPACE_NAME_MASK,
- _elementNameTable.getNext());
- _elementNameTable.add(qn);
- processEII(qn, (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- break;
- }
- case DecoderStateTables.EII_NAMESPACES:
- processEIIWithNamespaces();
- break;
- case DecoderStateTables.CII_UTF8_SMALL_LENGTH:
- _octetBufferLength = (_b & EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_MASK)
- + 1;
- processUtf8CharacterString();
- break;
- case DecoderStateTables.CII_UTF8_MEDIUM_LENGTH:
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_LIMIT;
- processUtf8CharacterString();
- break;
- case DecoderStateTables.CII_UTF8_LARGE_LENGTH:
- _octetBufferLength = ((read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_LIMIT;
- processUtf8CharacterString();
- break;
- case DecoderStateTables.CII_UTF16_SMALL_LENGTH:
- _octetBufferLength = (_b & EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_MASK)
- + 1;
- decodeUtf16StringAsCharBuffer();
- if ((_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0) {
- _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- }
-
- try {
- _contentHandler.characters(_charBuffer, 0, _charBufferLength);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- case DecoderStateTables.CII_UTF16_MEDIUM_LENGTH:
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_LIMIT;
- decodeUtf16StringAsCharBuffer();
- if ((_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0) {
- _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- }
-
- try {
- _contentHandler.characters(_charBuffer, 0, _charBufferLength);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- case DecoderStateTables.CII_UTF16_LARGE_LENGTH:
- _octetBufferLength = ((read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_LIMIT;
- decodeUtf16StringAsCharBuffer();
- if ((_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0) {
- _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- }
-
- try {
- _contentHandler.characters(_charBuffer, 0, _charBufferLength);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- case DecoderStateTables.CII_RA:
- {
- final boolean addToTable = (_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0;
-
- // Decode resitricted alphabet integer
- _identifier = (_b & 0x02) << 6;
- _b = read();
- _identifier |= (_b & 0xFC) >> 2;
-
- decodeOctetsOnSeventhBitOfNonIdentifyingStringOnThirdBit(_b);
-
- decodeRestrictedAlphabetAsCharBuffer();
-
- if (addToTable) {
- _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- }
-
- try {
- _contentHandler.characters(_charBuffer, 0, _charBufferLength);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- }
- case DecoderStateTables.CII_EA:
- {
- final boolean addToTable = (_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0;
-
- // Decode encoding algorithm integer
- _identifier = (_b & 0x02) << 6;
- _b = read();
- _identifier |= (_b & 0xFC) >> 2;
-
- decodeOctetsOnSeventhBitOfNonIdentifyingStringOnThirdBit(_b);
-
- processCIIEncodingAlgorithm(addToTable);
- break;
- }
- case DecoderStateTables.CII_INDEX_SMALL:
- {
- final int index = _b & EncodingConstants.INTEGER_4TH_BIT_SMALL_MASK;
- try {
- _contentHandler.characters(_characterContentChunkTable._array,
- _characterContentChunkTable._offset[index],
- _characterContentChunkTable._length[index]);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- }
- case DecoderStateTables.CII_INDEX_MEDIUM:
- {
- final int index = (((_b & EncodingConstants.INTEGER_4TH_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_4TH_BIT_SMALL_LIMIT;
- try {
- _contentHandler.characters(_characterContentChunkTable._array,
- _characterContentChunkTable._offset[index],
- _characterContentChunkTable._length[index]);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- }
- case DecoderStateTables.CII_INDEX_LARGE:
- {
- final int index = (((_b & EncodingConstants.INTEGER_4TH_BIT_LARGE_MASK) << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.INTEGER_4TH_BIT_MEDIUM_LIMIT;
-
- try {
- _contentHandler.characters(_characterContentChunkTable._array,
- _characterContentChunkTable._offset[index],
- _characterContentChunkTable._length[index]);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- }
- case DecoderStateTables.CII_INDEX_LARGE_LARGE:
- {
- final int index = ((read() << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.INTEGER_4TH_BIT_LARGE_LIMIT;
-
- try {
- _contentHandler.characters(_characterContentChunkTable._array,
- _characterContentChunkTable._offset[index],
- _characterContentChunkTable._length[index]);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- }
- case DecoderStateTables.COMMENT_II:
- processCommentII();
- break;
- case DecoderStateTables.PROCESSING_INSTRUCTION_II:
- processProcessingII();
- break;
- case DecoderStateTables.UNEXPANDED_ENTITY_REFERENCE_II:
- {
- String entity_reference_name = decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherNCName);
-
- String system_identifier = ((_b & EncodingConstants.UNEXPANDED_ENTITY_SYSTEM_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : "";
- String public_identifier = ((_b & EncodingConstants.UNEXPANDED_ENTITY_PUBLIC_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : "";
-
- try {
- /*
- * TODO
- * Need to verify if the skippedEntity method:
- * http://java.sun.com/j2se/1.4.2/docs/api/org/xml/sax/ContentHandler.html#skippedEntity(java.lang.String)
- * is the correct method to call. It appears so but a more extensive
- * check is necessary.
- */
- _contentHandler.skippedEntity(entity_reference_name);
- } catch (SAXException e) {
- throw new FastInfosetException("processUnexpandedEntityReferenceII", e);
- }
- break;
- }
- case DecoderStateTables.TERMINATOR_DOUBLE:
- _doubleTerminate = true;
- case DecoderStateTables.TERMINATOR_SINGLE:
- _terminate = true;
- break;
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.IllegalStateDecodingEII"));
- }
- }
-
- try {
- _contentHandler.endDocument();
- } catch (SAXException e) {
- throw new FastInfosetException("processDII", e);
- }
- }
-
- protected final void processDIIOptionalProperties() throws FastInfosetException, IOException {
- // Optimize for the most common case
- if (_b == EncodingConstants.DOCUMENT_INITIAL_VOCABULARY_FLAG) {
- decodeInitialVocabulary();
- return;
- }
-
- if ((_b & EncodingConstants.DOCUMENT_ADDITIONAL_DATA_FLAG) > 0) {
- decodeAdditionalData();
- /*
- * TODO
- * how to report the additional data?
- */
- }
-
- if ((_b & EncodingConstants.DOCUMENT_INITIAL_VOCABULARY_FLAG) > 0) {
- decodeInitialVocabulary();
- }
-
- if ((_b & EncodingConstants.DOCUMENT_NOTATIONS_FLAG) > 0) {
- decodeNotations();
- /*
- try {
- _dtdHandler.notationDecl(name, public_identifier, system_identifier);
- } catch (SAXException e) {
- throw new IOException("NotationsDeclarationII");
- }
- */
- }
-
- if ((_b & EncodingConstants.DOCUMENT_UNPARSED_ENTITIES_FLAG) > 0) {
- decodeUnparsedEntities();
- /*
- try {
- _dtdHandler.unparsedEntityDecl(name, public_identifier, system_identifier, notation_name);
- } catch (SAXException e) {
- throw new IOException("UnparsedEntitiesII");
- }
- */
- }
-
- if ((_b & EncodingConstants.DOCUMENT_CHARACTER_ENCODING_SCHEME) > 0) {
- /*String characterEncodingScheme = */decodeCharacterEncodingScheme();
- /*
- * TODO
- * how to report the character encoding scheme?
- */
- }
-
- if ((_b & EncodingConstants.DOCUMENT_STANDALONE_FLAG) > 0) {
- /*boolean standalone = (*/read()/* > 0) ? true : false*/ ;
- /*
- * TODO
- * how to report the standalone flag?
- */
- }
-
- if ((_b & EncodingConstants.DOCUMENT_VERSION_FLAG) > 0) {
- decodeVersion();
- /*
- * TODO
- * how to report the standalone flag?
- */
- }
- }
-
- protected final void processEII(QualifiedName name, boolean hasAttributes) throws FastInfosetException, IOException {
- if (_prefixTable._currentInScope[name.prefixIndex] != name.namespaceNameIndex) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.qNameOfEIINotInScope"));
- }
-
- if (hasAttributes) {
- processAIIs();
- }
-
- try {
- _contentHandler.startElement(name.namespaceName, name.localName, name.qName, _attributes);
- } catch (SAXException e) {
- logger.log(Level.FINE, "processEII error", e);
- throw new FastInfosetException("processEII", e);
- }
-
- if (_clearAttributes) {
- _attributes.clear();
- _clearAttributes = false;
- }
-
- while(!_terminate) {
- _b = read();
- switch(DecoderStateTables.EII(_b)) {
- case DecoderStateTables.EII_NO_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[_b], false);
- break;
- case DecoderStateTables.EII_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[_b & EncodingConstants.INTEGER_3RD_BIT_SMALL_MASK], true);
- break;
- case DecoderStateTables.EII_INDEX_MEDIUM:
- processEII(decodeEIIIndexMedium(), (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- break;
- case DecoderStateTables.EII_INDEX_LARGE:
- processEII(decodeEIIIndexLarge(), (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- break;
- case DecoderStateTables.EII_LITERAL:
- {
- final QualifiedName qn = decodeLiteralQualifiedName(
- _b & EncodingConstants.LITERAL_QNAME_PREFIX_NAMESPACE_NAME_MASK,
- _elementNameTable.getNext());
- _elementNameTable.add(qn);
- processEII(qn, (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- break;
- }
- case DecoderStateTables.EII_NAMESPACES:
- processEIIWithNamespaces();
- break;
- case DecoderStateTables.CII_UTF8_SMALL_LENGTH:
- _octetBufferLength = (_b & EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_MASK)
- + 1;
- processUtf8CharacterString();
- break;
- case DecoderStateTables.CII_UTF8_MEDIUM_LENGTH:
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_LIMIT;
- processUtf8CharacterString();
- break;
- case DecoderStateTables.CII_UTF8_LARGE_LENGTH:
- _octetBufferLength = ((read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_LIMIT;
- processUtf8CharacterString();
- break;
- case DecoderStateTables.CII_UTF16_SMALL_LENGTH:
- _octetBufferLength = (_b & EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_MASK)
- + 1;
- decodeUtf16StringAsCharBuffer();
- if ((_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0) {
- _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- }
-
- try {
- _contentHandler.characters(_charBuffer, 0, _charBufferLength);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- case DecoderStateTables.CII_UTF16_MEDIUM_LENGTH:
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_LIMIT;
- decodeUtf16StringAsCharBuffer();
- if ((_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0) {
- _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- }
-
- try {
- _contentHandler.characters(_charBuffer, 0, _charBufferLength);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- case DecoderStateTables.CII_UTF16_LARGE_LENGTH:
- _octetBufferLength = ((read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_LIMIT;
- decodeUtf16StringAsCharBuffer();
- if ((_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0) {
- _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- }
-
- try {
- _contentHandler.characters(_charBuffer, 0, _charBufferLength);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- case DecoderStateTables.CII_RA:
- {
- final boolean addToTable = (_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0;
-
- // Decode resitricted alphabet integer
- _identifier = (_b & 0x02) << 6;
- _b = read();
- _identifier |= (_b & 0xFC) >> 2;
-
- decodeOctetsOnSeventhBitOfNonIdentifyingStringOnThirdBit(_b);
-
- decodeRestrictedAlphabetAsCharBuffer();
-
- if (addToTable) {
- _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- }
-
- try {
- _contentHandler.characters(_charBuffer, 0, _charBufferLength);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- }
- case DecoderStateTables.CII_EA:
- {
- final boolean addToTable = (_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0;
- // Decode encoding algorithm integer
- _identifier = (_b & 0x02) << 6;
- _b = read();
- _identifier |= (_b & 0xFC) >> 2;
-
- decodeOctetsOnSeventhBitOfNonIdentifyingStringOnThirdBit(_b);
-
- processCIIEncodingAlgorithm(addToTable);
- break;
- }
- case DecoderStateTables.CII_INDEX_SMALL:
- {
- final int index = _b & EncodingConstants.INTEGER_4TH_BIT_SMALL_MASK;
- try {
- _contentHandler.characters(_characterContentChunkTable._array,
- _characterContentChunkTable._offset[index],
- _characterContentChunkTable._length[index]);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- }
- case DecoderStateTables.CII_INDEX_MEDIUM:
- {
- final int index = (((_b & EncodingConstants.INTEGER_4TH_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_4TH_BIT_SMALL_LIMIT;
- try {
- _contentHandler.characters(_characterContentChunkTable._array,
- _characterContentChunkTable._offset[index],
- _characterContentChunkTable._length[index]);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- }
- case DecoderStateTables.CII_INDEX_LARGE:
- {
- final int index = (((_b & EncodingConstants.INTEGER_4TH_BIT_LARGE_MASK) << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.INTEGER_4TH_BIT_MEDIUM_LIMIT;
-
- try {
- _contentHandler.characters(_characterContentChunkTable._array,
- _characterContentChunkTable._offset[index],
- _characterContentChunkTable._length[index]);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- }
- case DecoderStateTables.CII_INDEX_LARGE_LARGE:
- {
- final int index = ((read() << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.INTEGER_4TH_BIT_LARGE_LIMIT;
-
- try {
- _contentHandler.characters(_characterContentChunkTable._array,
- _characterContentChunkTable._offset[index],
- _characterContentChunkTable._length[index]);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- break;
- }
- case DecoderStateTables.COMMENT_II:
- processCommentII();
- break;
- case DecoderStateTables.PROCESSING_INSTRUCTION_II:
- processProcessingII();
- break;
- case DecoderStateTables.UNEXPANDED_ENTITY_REFERENCE_II:
- {
- String entity_reference_name = decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherNCName);
-
- String system_identifier = ((_b & EncodingConstants.UNEXPANDED_ENTITY_SYSTEM_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : "";
- String public_identifier = ((_b & EncodingConstants.UNEXPANDED_ENTITY_PUBLIC_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : "";
-
- try {
- /*
- * TODO
- * Need to verify if the skippedEntity method:
- * http://java.sun.com/j2se/1.4.2/docs/api/org/xml/sax/ContentHandler.html#skippedEntity(java.lang.String)
- * is the correct method to call. It appears so but a more extensive
- * check is necessary.
- */
- _contentHandler.skippedEntity(entity_reference_name);
- } catch (SAXException e) {
- throw new FastInfosetException("processUnexpandedEntityReferenceII", e);
- }
- break;
- }
- case DecoderStateTables.TERMINATOR_DOUBLE:
- _doubleTerminate = true;
- case DecoderStateTables.TERMINATOR_SINGLE:
- _terminate = true;
- break;
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.IllegalStateDecodingEII"));
- }
- }
-
- _terminate = _doubleTerminate;
- _doubleTerminate = false;
-
- try {
- _contentHandler.endElement(name.namespaceName, name.localName, name.qName);
- } catch (SAXException e) {
- throw new FastInfosetException("processEII", e);
- }
- }
-
- private final void processUtf8CharacterString() throws FastInfosetException, IOException {
- if ((_b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0) {
- _characterContentChunkTable.ensureSize(_octetBufferLength);
- final int charactersOffset = _characterContentChunkTable._arrayIndex;
- decodeUtf8StringAsCharBuffer(_characterContentChunkTable._array, charactersOffset);
- _characterContentChunkTable.add(_charBufferLength);
- try {
- _contentHandler.characters(_characterContentChunkTable._array, charactersOffset, _charBufferLength);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- } else {
- decodeUtf8StringAsCharBuffer();
- try {
- _contentHandler.characters(_charBuffer, 0, _charBufferLength);
- } catch (SAXException e) {
- throw new FastInfosetException("processCII", e);
- }
- }
- }
-
- protected final void processEIIWithNamespaces() throws FastInfosetException, IOException {
- final boolean hasAttributes = (_b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0;
-
- _clearAttributes = (_namespacePrefixesFeature) ? true : false;
-
- if (++_prefixTable._declarationId == Integer.MAX_VALUE) {
- _prefixTable.clearDeclarationIds();
- }
-
- String prefix = "", namespaceName = "";
- final int start = _namespacePrefixesIndex;
- int b = read();
- while ((b & EncodingConstants.NAMESPACE_ATTRIBUTE_MASK) == EncodingConstants.NAMESPACE_ATTRIBUTE) {
- if (_namespacePrefixesIndex == _namespacePrefixes.length) {
- final int[] namespaceAIIs = new int[_namespacePrefixesIndex * 3 / 2 + 1];
- System.arraycopy(_namespacePrefixes, 0, namespaceAIIs, 0, _namespacePrefixesIndex);
- _namespacePrefixes = namespaceAIIs;
- }
-
- switch (b & EncodingConstants.NAMESPACE_ATTRIBUTE_PREFIX_NAME_MASK) {
- // no prefix, no namespace
- // Undeclaration of default namespace
- case 0:
- prefix = namespaceName = "";
- _namespaceNameIndex = _prefixIndex = _namespacePrefixes[_namespacePrefixesIndex++] = -1;
- break;
- // no prefix, namespace
- // Declaration of default namespace
- case 1:
- prefix = "";
- namespaceName = decodeIdentifyingNonEmptyStringOnFirstBitAsNamespaceName(false);
-
- _prefixIndex = _namespacePrefixes[_namespacePrefixesIndex++] = -1;
- break;
- // prefix, no namespace
- // Undeclaration of namespace
- case 2:
- prefix = decodeIdentifyingNonEmptyStringOnFirstBitAsPrefix(false);
- namespaceName = "";
-
- _namespaceNameIndex = -1;
- _namespacePrefixes[_namespacePrefixesIndex++] = _prefixIndex;
- break;
- // prefix, namespace
- // Declaration of prefixed namespace
- case 3:
- prefix = decodeIdentifyingNonEmptyStringOnFirstBitAsPrefix(true);
- namespaceName = decodeIdentifyingNonEmptyStringOnFirstBitAsNamespaceName(true);
-
- _namespacePrefixes[_namespacePrefixesIndex++] = _prefixIndex;
- break;
- }
-
- _prefixTable.pushScope(_prefixIndex, _namespaceNameIndex);
-
- if (_namespacePrefixesFeature) {
- // Add the namespace delcaration as an attribute
- if (prefix != "") {
- _attributes.addAttribute(new QualifiedName(
- EncodingConstants.XMLNS_NAMESPACE_PREFIX,
- EncodingConstants.XMLNS_NAMESPACE_NAME,
- prefix),
- namespaceName);
- } else {
- _attributes.addAttribute(EncodingConstants.DEFAULT_NAMESPACE_DECLARATION,
- namespaceName);
- }
- }
-
- try {
- _contentHandler.startPrefixMapping(prefix, namespaceName);
- } catch (SAXException e) {
- throw new IOException("processStartNamespaceAII");
- }
-
- b = read();
- }
- if (b != EncodingConstants.TERMINATOR) {
- throw new IOException(CommonResourceBundle.getInstance().getString("message.EIInamespaceNameNotTerminatedCorrectly"));
- }
- final int end = _namespacePrefixesIndex;
-
- _b = read();
- switch(DecoderStateTables.EII(_b)) {
- case DecoderStateTables.EII_NO_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[_b], hasAttributes);
- break;
- case DecoderStateTables.EII_INDEX_MEDIUM:
- processEII(decodeEIIIndexMedium(), hasAttributes);
- break;
- case DecoderStateTables.EII_INDEX_LARGE:
- processEII(decodeEIIIndexLarge(), hasAttributes);
- break;
- case DecoderStateTables.EII_LITERAL:
- {
- final QualifiedName qn = decodeLiteralQualifiedName(
- _b & EncodingConstants.LITERAL_QNAME_PREFIX_NAMESPACE_NAME_MASK,
- _elementNameTable.getNext());
- _elementNameTable.add(qn);
- processEII(qn, hasAttributes);
- break;
- }
- default:
- throw new IOException(CommonResourceBundle.getInstance().getString("message.IllegalStateDecodingEIIAfterAIIs"));
- }
-
- try {
- for (int i = end - 1; i >= start; i--) {
- final int prefixIndex = _namespacePrefixes[i];
- _prefixTable.popScope(prefixIndex);
- prefix = (prefixIndex > 0) ? _prefixTable.get(prefixIndex - 1) :
- (prefixIndex == -1) ? "" : EncodingConstants.XML_NAMESPACE_PREFIX;
- _contentHandler.endPrefixMapping(prefix);
- }
- _namespacePrefixesIndex = start;
- } catch (SAXException e) {
- throw new IOException("processStartNamespaceAII");
- }
- }
-
- protected final void processAIIs() throws FastInfosetException, IOException {
- QualifiedName name;
- int b;
- String value;
-
- _clearAttributes = true;
-
- if (++_duplicateAttributeVerifier._currentIteration == Integer.MAX_VALUE) {
- _duplicateAttributeVerifier.clear();
- }
-
- do {
- // AII qualified name
- b = read();
- switch (DecoderStateTables.AII(b)) {
- case DecoderStateTables.AII_INDEX_SMALL:
- name = _attributeNameTable._array[b];
- break;
- case DecoderStateTables.AII_INDEX_MEDIUM:
- {
- final int i = (((b & EncodingConstants.INTEGER_2ND_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
- name = _attributeNameTable._array[i];
- break;
- }
- case DecoderStateTables.AII_INDEX_LARGE:
- {
- final int i = (((b & EncodingConstants.INTEGER_2ND_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
- name = _attributeNameTable._array[i];
- break;
- }
- case DecoderStateTables.AII_LITERAL:
- name = decodeLiteralQualifiedName(
- b & EncodingConstants.LITERAL_QNAME_PREFIX_NAMESPACE_NAME_MASK,
- _attributeNameTable.getNext());
- name.createAttributeValues(_duplicateAttributeVerifier.MAP_SIZE);
- _attributeNameTable.add(name);
- break;
- case DecoderStateTables.AII_TERMINATOR_DOUBLE:
- _doubleTerminate = true;
- case DecoderStateTables.AII_TERMINATOR_SINGLE:
- _terminate = true;
- // AIIs have finished break out of loop
- continue;
- default:
- throw new IOException(CommonResourceBundle.getInstance().getString("message.decodingAIIs"));
- }
-
- if (name.prefixIndex > 0 && _prefixTable._currentInScope[name.prefixIndex] != name.namespaceNameIndex) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.AIIqNameNotInScope"));
- }
-
- _duplicateAttributeVerifier.checkForDuplicateAttribute(name.attributeHash, name.attributeId);
-
- // [normalized value] of AII
-
- b = read();
- switch(DecoderStateTables.NISTRING(b)) {
- case DecoderStateTables.NISTRING_UTF8_SMALL_LENGTH:
- _octetBufferLength = (b & EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_MASK) + 1;
- value = decodeUtf8StringAsString();
- if ((b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0) {
- _attributeValueTable.add(value);
- }
-
- _attributes.addAttribute(name, value);
- break;
- case DecoderStateTables.NISTRING_UTF8_MEDIUM_LENGTH:
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_LIMIT;
- value = decodeUtf8StringAsString();
- if ((b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0) {
- _attributeValueTable.add(value);
- }
-
- _attributes.addAttribute(name, value);
- break;
- case DecoderStateTables.NISTRING_UTF8_LARGE_LENGTH:
- _octetBufferLength = ((read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_LIMIT;
- value = decodeUtf8StringAsString();
- if ((b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0) {
- _attributeValueTable.add(value);
- }
-
- _attributes.addAttribute(name, value);
- break;
- case DecoderStateTables.NISTRING_UTF16_SMALL_LENGTH:
- _octetBufferLength = (b & EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_MASK) + 1;
- value = decodeUtf16StringAsString();
- if ((b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0) {
- _attributeValueTable.add(value);
- }
-
- _attributes.addAttribute(name, value);
- break;
- case DecoderStateTables.NISTRING_UTF16_MEDIUM_LENGTH:
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_LIMIT;
- value = decodeUtf16StringAsString();
- if ((b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0) {
- _attributeValueTable.add(value);
- }
-
- _attributes.addAttribute(name, value);
- break;
- case DecoderStateTables.NISTRING_UTF16_LARGE_LENGTH:
- _octetBufferLength = ((read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_LIMIT;
- value = decodeUtf16StringAsString();
- if ((b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0) {
- _attributeValueTable.add(value);
- }
-
- _attributes.addAttribute(name, value);
- break;
- case DecoderStateTables.NISTRING_RA:
- {
- final boolean addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- // Decode resitricted alphabet integer
- _identifier = (b & 0x0F) << 4;
- b = read();
- _identifier |= (b & 0xF0) >> 4;
-
- decodeOctetsOnFifthBitOfNonIdentifyingStringOnFirstBit(b);
-
- value = decodeRestrictedAlphabetAsString();
- if (addToTable) {
- _attributeValueTable.add(value);
- }
-
- _attributes.addAttribute(name, value);
- break;
- }
- case DecoderStateTables.NISTRING_EA:
- {
- final boolean addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
-
- _identifier = (b & 0x0F) << 4;
- b = read();
- _identifier |= (b & 0xF0) >> 4;
-
- decodeOctetsOnFifthBitOfNonIdentifyingStringOnFirstBit(b);
-
- processAIIEncodingAlgorithm(name, addToTable);
- break;
- }
- case DecoderStateTables.NISTRING_INDEX_SMALL:
- _attributes.addAttribute(name,
- _attributeValueTable._array[b & EncodingConstants.INTEGER_2ND_BIT_SMALL_MASK]);
- break;
- case DecoderStateTables.NISTRING_INDEX_MEDIUM:
- {
- final int index = (((b & EncodingConstants.INTEGER_2ND_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
-
- _attributes.addAttribute(name,
- _attributeValueTable._array[index]);
- break;
- }
- case DecoderStateTables.NISTRING_INDEX_LARGE:
- {
- final int index = (((b & EncodingConstants.INTEGER_2ND_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
-
- _attributes.addAttribute(name,
- _attributeValueTable._array[index]);
- break;
- }
- case DecoderStateTables.NISTRING_EMPTY:
- _attributes.addAttribute(name, "");
- break;
- default:
- throw new IOException(CommonResourceBundle.getInstance().getString("message.decodingAIIValue"));
- }
-
- } while (!_terminate);
-
- // Reset duplication attribute verfifier
- _duplicateAttributeVerifier._poolCurrent = _duplicateAttributeVerifier._poolHead;
-
- _terminate = _doubleTerminate;
- _doubleTerminate = false;
- }
-
- protected final void processCommentII() throws FastInfosetException, IOException {
- switch(decodeNonIdentifyingStringOnFirstBit()) {
- case NISTRING_STRING:
- if (_addToTable) {
- _v.otherString.add(new CharArray(_charBuffer, 0, _charBufferLength, true));
- }
-
- try {
- _lexicalHandler.comment(_charBuffer, 0, _charBufferLength);
- } catch (SAXException e) {
- throw new FastInfosetException("processCommentII", e);
- }
- break;
- case NISTRING_ENCODING_ALGORITHM:
- throw new IOException(CommonResourceBundle.getInstance().getString("message.commentIIAlgorithmNotSupported"));
- case NISTRING_INDEX:
- final CharArray ca = _v.otherString.get(_integer);
-
- try {
- _lexicalHandler.comment(ca.ch, ca.start, ca.length);
- } catch (SAXException e) {
- throw new FastInfosetException("processCommentII", e);
- }
- break;
- case NISTRING_EMPTY_STRING:
- try {
- _lexicalHandler.comment(_charBuffer, 0, 0);
- } catch (SAXException e) {
- throw new FastInfosetException("processCommentII", e);
- }
- break;
- }
- }
-
- protected final void processProcessingII() throws FastInfosetException, IOException {
- final String target = decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherNCName);
-
- switch(decodeNonIdentifyingStringOnFirstBit()) {
- case NISTRING_STRING:
- final String data = new String(_charBuffer, 0, _charBufferLength);
- if (_addToTable) {
- _v.otherString.add(new CharArrayString(data));
- }
- try {
- _contentHandler.processingInstruction(target, data);
- } catch (SAXException e) {
- throw new FastInfosetException("processProcessingII", e);
- }
- break;
- case NISTRING_ENCODING_ALGORITHM:
- throw new IOException(CommonResourceBundle.getInstance().getString("message.processingIIWithEncodingAlgorithm"));
- case NISTRING_INDEX:
- try {
- _contentHandler.processingInstruction(target, _v.otherString.get(_integer).toString());
- } catch (SAXException e) {
- throw new FastInfosetException("processProcessingII", e);
- }
- break;
- case NISTRING_EMPTY_STRING:
- try {
- _contentHandler.processingInstruction(target, "");
- } catch (SAXException e) {
- throw new FastInfosetException("processProcessingII", e);
- }
- break;
- }
- }
-
- protected final void processCIIEncodingAlgorithm(boolean addToTable) throws FastInfosetException, IOException {
- if (_identifier < EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END) {
- if (_primitiveHandler != null) {
- processCIIBuiltInEncodingAlgorithmAsPrimitive();
- } else if (_algorithmHandler != null) {
- Object array = processBuiltInEncodingAlgorithmAsObject();
-
- try {
- _algorithmHandler.object(null, _identifier, array);
- } catch (SAXException e) {
- throw new FastInfosetException(e);
- }
- } else {
- StringBuffer buffer = new StringBuffer();
- processBuiltInEncodingAlgorithmAsCharacters(buffer);
-
- try {
- _contentHandler.characters(buffer.toString().toCharArray(), 0, buffer.length());
- } catch (SAXException e) {
- throw new FastInfosetException(e);
- }
- }
-
- if (addToTable) {
- StringBuffer buffer = new StringBuffer();
- processBuiltInEncodingAlgorithmAsCharacters(buffer);
- _characterContentChunkTable.add(buffer.toString().toCharArray(), buffer.length());
- }
- } else if (_identifier == EncodingAlgorithmIndexes.CDATA) {
- // Set back buffer position to start of encoded string
- _octetBufferOffset -= _octetBufferLength;
- decodeUtf8StringIntoCharBuffer();
-
- try {
- _lexicalHandler.startCDATA();
- _contentHandler.characters(_charBuffer, 0, _charBufferLength);
- _lexicalHandler.endCDATA();
- } catch (SAXException e) {
- throw new FastInfosetException(e);
- }
-
- if (addToTable) {
- _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- }
- } else if (_identifier >= EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START && _algorithmHandler != null) {
- final String URI = _v.encodingAlgorithm.get(_identifier - EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START);
- if (URI == null) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().
- getString("message.URINotPresent", new Object[]{Integer.valueOf(_identifier)}));
- }
-
- final EncodingAlgorithm ea = (EncodingAlgorithm)_registeredEncodingAlgorithms.get(URI);
- if (ea != null) {
- final Object data = ea.decodeFromBytes(_octetBuffer, _octetBufferStart, _octetBufferLength);
- try {
- _algorithmHandler.object(URI, _identifier, data);
- } catch (SAXException e) {
- throw new FastInfosetException(e);
- }
- } else {
- try {
- _algorithmHandler.octets(URI, _identifier, _octetBuffer, _octetBufferStart, _octetBufferLength);
- } catch (SAXException e) {
- throw new FastInfosetException(e);
- }
- }
- if (addToTable) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.addToTableNotSupported"));
- }
- } else if (_identifier >= EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START) {
- // TODO should have property to ignore
- throw new EncodingAlgorithmException(
- CommonResourceBundle.getInstance().getString("message.algorithmDataCannotBeReported"));
- } else {
- // Reserved built-in algorithms for future use
- // TODO should use sax property to decide if event will be
- // reported, allows for support through handler if required.
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.identifiers10to31Reserved"));
- }
- }
-
- protected final void processCIIBuiltInEncodingAlgorithmAsPrimitive() throws FastInfosetException, IOException {
- try {
- int length;
- switch(_identifier) {
- case EncodingAlgorithmIndexes.HEXADECIMAL:
- case EncodingAlgorithmIndexes.BASE64:
- _primitiveHandler.bytes(_octetBuffer, _octetBufferStart, _octetBufferLength);
- break;
- case EncodingAlgorithmIndexes.SHORT:
- length = BuiltInEncodingAlgorithmFactory.shortEncodingAlgorithm.
- getPrimtiveLengthFromOctetLength(_octetBufferLength);
- if (length > builtInAlgorithmState.shortArray.length) {
- final short[] array = new short[length * 3 / 2 + 1];
- System.arraycopy(builtInAlgorithmState.shortArray, 0,
- array, 0, builtInAlgorithmState.shortArray.length);
- builtInAlgorithmState.shortArray = array;
- }
-
- BuiltInEncodingAlgorithmFactory.shortEncodingAlgorithm.
- decodeFromBytesToShortArray(builtInAlgorithmState.shortArray, 0,
- _octetBuffer, _octetBufferStart, _octetBufferLength);
- _primitiveHandler.shorts(builtInAlgorithmState.shortArray, 0, length);
- break;
- case EncodingAlgorithmIndexes.INT:
- length = BuiltInEncodingAlgorithmFactory.intEncodingAlgorithm.
- getPrimtiveLengthFromOctetLength(_octetBufferLength);
- if (length > builtInAlgorithmState.intArray.length) {
- final int[] array = new int[length * 3 / 2 + 1];
- System.arraycopy(builtInAlgorithmState.intArray, 0,
- array, 0, builtInAlgorithmState.intArray.length);
- builtInAlgorithmState.intArray = array;
- }
-
- BuiltInEncodingAlgorithmFactory.intEncodingAlgorithm.
- decodeFromBytesToIntArray(builtInAlgorithmState.intArray, 0,
- _octetBuffer, _octetBufferStart, _octetBufferLength);
- _primitiveHandler.ints(builtInAlgorithmState.intArray, 0, length);
- break;
- case EncodingAlgorithmIndexes.LONG:
- length = BuiltInEncodingAlgorithmFactory.longEncodingAlgorithm.
- getPrimtiveLengthFromOctetLength(_octetBufferLength);
- if (length > builtInAlgorithmState.longArray.length) {
- final long[] array = new long[length * 3 / 2 + 1];
- System.arraycopy(builtInAlgorithmState.longArray, 0,
- array, 0, builtInAlgorithmState.longArray.length);
- builtInAlgorithmState.longArray = array;
- }
-
- BuiltInEncodingAlgorithmFactory.longEncodingAlgorithm.
- decodeFromBytesToLongArray(builtInAlgorithmState.longArray, 0,
- _octetBuffer, _octetBufferStart, _octetBufferLength);
- _primitiveHandler.longs(builtInAlgorithmState.longArray, 0, length);
- break;
- case EncodingAlgorithmIndexes.BOOLEAN:
- length = BuiltInEncodingAlgorithmFactory.booleanEncodingAlgorithm.
- getPrimtiveLengthFromOctetLength(_octetBufferLength, _octetBuffer[_octetBufferStart] & 0xFF);
- if (length > builtInAlgorithmState.booleanArray.length) {
- final boolean[] array = new boolean[length * 3 / 2 + 1];
- System.arraycopy(builtInAlgorithmState.booleanArray, 0,
- array, 0, builtInAlgorithmState.booleanArray.length);
- builtInAlgorithmState.booleanArray = array;
- }
-
- BuiltInEncodingAlgorithmFactory.booleanEncodingAlgorithm.
- decodeFromBytesToBooleanArray(
- builtInAlgorithmState.booleanArray, 0, length,
- _octetBuffer, _octetBufferStart, _octetBufferLength);
- _primitiveHandler.booleans(builtInAlgorithmState.booleanArray, 0, length);
- break;
- case EncodingAlgorithmIndexes.FLOAT:
- length = BuiltInEncodingAlgorithmFactory.floatEncodingAlgorithm.
- getPrimtiveLengthFromOctetLength(_octetBufferLength);
- if (length > builtInAlgorithmState.floatArray.length) {
- final float[] array = new float[length * 3 / 2 + 1];
- System.arraycopy(builtInAlgorithmState.floatArray, 0,
- array, 0, builtInAlgorithmState.floatArray.length);
- builtInAlgorithmState.floatArray = array;
- }
-
- BuiltInEncodingAlgorithmFactory.floatEncodingAlgorithm.
- decodeFromBytesToFloatArray(builtInAlgorithmState.floatArray, 0,
- _octetBuffer, _octetBufferStart, _octetBufferLength);
- _primitiveHandler.floats(builtInAlgorithmState.floatArray, 0, length);
- break;
- case EncodingAlgorithmIndexes.DOUBLE:
- length = BuiltInEncodingAlgorithmFactory.doubleEncodingAlgorithm.
- getPrimtiveLengthFromOctetLength(_octetBufferLength);
- if (length > builtInAlgorithmState.doubleArray.length) {
- final double[] array = new double[length * 3 / 2 + 1];
- System.arraycopy(builtInAlgorithmState.doubleArray, 0,
- array, 0, builtInAlgorithmState.doubleArray.length);
- builtInAlgorithmState.doubleArray = array;
- }
-
- BuiltInEncodingAlgorithmFactory.doubleEncodingAlgorithm.
- decodeFromBytesToDoubleArray(builtInAlgorithmState.doubleArray, 0,
- _octetBuffer, _octetBufferStart, _octetBufferLength);
- _primitiveHandler.doubles(builtInAlgorithmState.doubleArray, 0, length);
- break;
- case EncodingAlgorithmIndexes.UUID:
- length = BuiltInEncodingAlgorithmFactory.uuidEncodingAlgorithm.
- getPrimtiveLengthFromOctetLength(_octetBufferLength);
- if (length > builtInAlgorithmState.longArray.length) {
- final long[] array = new long[length * 3 / 2 + 1];
- System.arraycopy(builtInAlgorithmState.longArray, 0,
- array, 0, builtInAlgorithmState.longArray.length);
- builtInAlgorithmState.longArray = array;
- }
-
- BuiltInEncodingAlgorithmFactory.uuidEncodingAlgorithm.
- decodeFromBytesToLongArray(builtInAlgorithmState.longArray, 0,
- _octetBuffer, _octetBufferStart, _octetBufferLength);
- _primitiveHandler.uuids(builtInAlgorithmState.longArray, 0, length);
- break;
- case EncodingAlgorithmIndexes.CDATA:
- throw new UnsupportedOperationException("CDATA");
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().
- getString("message.unsupportedAlgorithm", new Object[]{Integer.valueOf(_identifier)}));
- }
- } catch (SAXException e) {
- throw new FastInfosetException(e);
- }
- }
-
-
- protected final void processAIIEncodingAlgorithm(QualifiedName name, boolean addToTable) throws FastInfosetException, IOException {
- if (_identifier < EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END) {
- if (_primitiveHandler != null || _algorithmHandler != null) {
- Object data = processBuiltInEncodingAlgorithmAsObject();
- _attributes.addAttributeWithAlgorithmData(name, null, _identifier, data);
- } else {
- StringBuffer buffer = new StringBuffer();
- processBuiltInEncodingAlgorithmAsCharacters(buffer);
- _attributes.addAttribute(name, buffer.toString());
- }
- } else if (_identifier >= EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START && _algorithmHandler != null) {
- final String URI = _v.encodingAlgorithm.get(_identifier - EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START);
- if (URI == null) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().
- getString("message.URINotPresent", new Object[]{Integer.valueOf(_identifier)}));
- }
-
- final EncodingAlgorithm ea = (EncodingAlgorithm)_registeredEncodingAlgorithms.get(URI);
- if (ea != null) {
- final Object data = ea.decodeFromBytes(_octetBuffer, _octetBufferStart, _octetBufferLength);
- _attributes.addAttributeWithAlgorithmData(name, URI, _identifier, data);
- } else {
- final byte[] data = new byte[_octetBufferLength];
- System.arraycopy(_octetBuffer, _octetBufferStart, data, 0, _octetBufferLength);
- _attributes.addAttributeWithAlgorithmData(name, URI, _identifier, data);
- }
- } else if (_identifier >= EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START) {
- // TODO should have property to ignore
- throw new EncodingAlgorithmException(
- CommonResourceBundle.getInstance().getString("message.algorithmDataCannotBeReported"));
- } else if (_identifier == EncodingAlgorithmIndexes.CDATA) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.CDATAAlgorithmNotSupported"));
- } else {
- // Reserved built-in algorithms for future use
- // TODO should use sax property to decide if event will be
- // reported, allows for support through handler if required.
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.identifiers10to31Reserved"));
- }
-
- if (addToTable) {
- _attributeValueTable.add(_attributes.getValue(_attributes.getIndex(name.qName)));
- }
- }
-
- protected final void processBuiltInEncodingAlgorithmAsCharacters(StringBuffer buffer) throws FastInfosetException, IOException {
- // TODO not very efficient, need to reuse buffers
- Object array = BuiltInEncodingAlgorithmFactory.getAlgorithm(_identifier).
- decodeFromBytes(_octetBuffer, _octetBufferStart, _octetBufferLength);
-
- BuiltInEncodingAlgorithmFactory.getAlgorithm(_identifier).convertToCharacters(array, buffer);
- }
-
- protected final Object processBuiltInEncodingAlgorithmAsObject() throws FastInfosetException, IOException {
- return BuiltInEncodingAlgorithmFactory.getAlgorithm(_identifier).
- decodeFromBytes(_octetBuffer, _octetBufferStart, _octetBufferLength);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SAXDocumentSerializer.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SAXDocumentSerializer.java
deleted file mode 100644
index 9daee5f2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SAXDocumentSerializer.java
+++ /dev/null
@@ -1,597 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.sax;
-
-import com.sun.xml.internal.fastinfoset.Encoder;
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import com.sun.xml.internal.org.jvnet.fastinfoset.sax.FastInfosetWriter;
-import com.sun.xml.internal.fastinfoset.util.LocalNameQualifiedNamesMap;
-import java.io.IOException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmIndexes;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.RestrictedAlphabet;
-import com.sun.xml.internal.org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-/**
- * The Fast Infoset SAX serializer.
- * <p>
- * Instantiate this serializer to serialize a fast infoset document in accordance
- * with the SAX API.
- * <p>
- * This utilizes the SAX API in a reverse manner to that of parsing. It is the
- * responsibility of the client to call the appropriate event methods on the
- * SAX handlers, and to ensure that such a sequence of methods calls results
- * in the production well-formed fast infoset documents. The
- * SAXDocumentSerializer performs no well-formed checks.
- *
- * <p>
- * More than one fast infoset document may be encoded to the
- * {@link java.io.OutputStream}.
- */
-public class SAXDocumentSerializer extends Encoder implements FastInfosetWriter {
- protected boolean _elementHasNamespaces = false;
-
- protected boolean _charactersAsCDATA = false;
-
- protected SAXDocumentSerializer(boolean v) {
- super(v);
- }
-
- public SAXDocumentSerializer() {
- }
-
-
- public void reset() {
- super.reset();
-
- _elementHasNamespaces = false;
- _charactersAsCDATA = false;
- }
-
- // ContentHandler
-
- public final void startDocument() throws SAXException {
- try {
- reset();
- encodeHeader(false);
- encodeInitialVocabulary();
- } catch (IOException e) {
- throw new SAXException("startDocument", e);
- }
- }
-
- public final void endDocument() throws SAXException {
- try {
- encodeDocumentTermination();
- } catch (IOException e) {
- throw new SAXException("endDocument", e);
- }
- }
-
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
- try {
- if (_elementHasNamespaces == false) {
- encodeTermination();
-
- // Mark the current buffer position to flag attributes if necessary
- mark();
- _elementHasNamespaces = true;
-
- // Write out Element byte with namespaces
- write(EncodingConstants.ELEMENT | EncodingConstants.ELEMENT_NAMESPACES_FLAG);
- }
-
- encodeNamespaceAttribute(prefix, uri);
- } catch (IOException e) {
- throw new SAXException("startElement", e);
- }
- }
-
- public final void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
- // TODO consider using buffer for encoding of attributes, then pre-counting is not necessary
- final int attributeCount = (atts != null && atts.getLength() > 0)
- ? countAttributes(atts) : 0;
- try {
- if (_elementHasNamespaces) {
- _elementHasNamespaces = false;
-
- if (attributeCount > 0) {
- // Flag the marked byte with attributes
- _octetBuffer[_markIndex] |= EncodingConstants.ELEMENT_ATTRIBUTE_FLAG;
- }
- resetMark();
-
- write(EncodingConstants.TERMINATOR);
-
- _b = 0;
- } else {
- encodeTermination();
-
- _b = EncodingConstants.ELEMENT;
- if (attributeCount > 0) {
- _b |= EncodingConstants.ELEMENT_ATTRIBUTE_FLAG;
- }
- }
-
- encodeElement(namespaceURI, qName, localName);
-
- if (attributeCount > 0) {
- encodeAttributes(atts);
- }
- } catch (IOException e) {
- throw new SAXException("startElement", e);
- } catch (FastInfosetException e) {
- throw new SAXException("startElement", e);
- }
- }
-
- public final void endElement(String namespaceURI, String localName, String qName) throws SAXException {
- try {
- encodeElementTermination();
- } catch (IOException e) {
- throw new SAXException("endElement", e);
- }
- }
-
- public final void characters(char[] ch, int start, int length) throws SAXException {
- if (length <= 0) {
- return;
- }
-
- if (getIgnoreWhiteSpaceTextContent() &&
- isWhiteSpace(ch, start, length)) return;
-
- try {
- encodeTermination();
-
- if (!_charactersAsCDATA) {
- encodeCharacters(ch, start, length);
- } else {
- encodeCIIBuiltInAlgorithmDataAsCDATA(ch, start, length);
- }
- } catch (IOException e) {
- throw new SAXException(e);
- } catch (FastInfosetException e) {
- throw new SAXException(e);
- }
- }
-
- public final void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
- if (getIgnoreWhiteSpaceTextContent()) return;
-
- characters(ch, start, length);
- }
-
- public final void processingInstruction(String target, String data) throws SAXException {
- try {
- if (getIgnoreProcesingInstructions()) return;
-
- if (target.length() == 0) {
- throw new SAXException(CommonResourceBundle.getInstance().
- getString("message.processingInstructionTargetIsEmpty"));
- }
- encodeTermination();
-
- encodeProcessingInstruction(target, data);
- } catch (IOException e) {
- throw new SAXException("processingInstruction", e);
- }
- }
-
- public final void setDocumentLocator(org.xml.sax.Locator locator) {
- }
-
- public final void skippedEntity(String name) throws SAXException {
- }
-
-
-
- // LexicalHandler
-
- public final void comment(char[] ch, int start, int length) throws SAXException {
- try {
- if (getIgnoreComments()) return;
-
- encodeTermination();
-
- encodeComment(ch, start, length);
- } catch (IOException e) {
- throw new SAXException("startElement", e);
- }
- }
-
- public final void startCDATA() throws SAXException {
- _charactersAsCDATA = true;
- }
-
- public final void endCDATA() throws SAXException {
- _charactersAsCDATA = false;
- }
-
- public final void startDTD(String name, String publicId, String systemId) throws SAXException {
- if (getIgnoreDTD()) return;
-
- try {
- encodeTermination();
-
- encodeDocumentTypeDeclaration(publicId, systemId);
- encodeElementTermination();
- } catch (IOException e) {
- throw new SAXException("startDTD", e);
- }
- }
-
- public final void endDTD() throws SAXException {
- }
-
- public final void startEntity(String name) throws SAXException {
- }
-
- public final void endEntity(String name) throws SAXException {
- }
-
-
- // EncodingAlgorithmContentHandler
-
- public final void octets(String URI, int id, byte[] b, int start, int length) throws SAXException {
- if (length <= 0) {
- return;
- }
-
- try {
- encodeTermination();
-
- encodeNonIdentifyingStringOnThirdBit(URI, id, b, start, length);
- } catch (IOException e) {
- throw new SAXException(e);
- } catch (FastInfosetException e) {
- throw new SAXException(e);
- }
- }
-
- public final void object(String URI, int id, Object data) throws SAXException {
- try {
- encodeTermination();
-
- encodeNonIdentifyingStringOnThirdBit(URI, id, data);
- } catch (IOException e) {
- throw new SAXException(e);
- } catch (FastInfosetException e) {
- throw new SAXException(e);
- }
- }
-
-
- // PrimitiveTypeContentHandler
-
- public final void bytes(byte[] b, int start, int length) throws SAXException {
- if (length <= 0) {
- return;
- }
-
- try {
- encodeTermination();
-
- encodeCIIOctetAlgorithmData(EncodingAlgorithmIndexes.BASE64, b, start, length);
- } catch (IOException e) {
- throw new SAXException(e);
- }
- }
-
- public final void shorts(short[] s, int start, int length) throws SAXException {
- if (length <= 0) {
- return;
- }
-
- try {
- encodeTermination();
-
- encodeCIIBuiltInAlgorithmData(EncodingAlgorithmIndexes.SHORT, s, start, length);
- } catch (IOException e) {
- throw new SAXException(e);
- } catch (FastInfosetException e) {
- throw new SAXException(e);
- }
- }
-
- public final void ints(int[] i, int start, int length) throws SAXException {
- if (length <= 0) {
- return;
- }
-
- try {
- encodeTermination();
-
- encodeCIIBuiltInAlgorithmData(EncodingAlgorithmIndexes.INT, i, start, length);
- } catch (IOException e) {
- throw new SAXException(e);
- } catch (FastInfosetException e) {
- throw new SAXException(e);
- }
- }
-
- public final void longs(long[] l, int start, int length) throws SAXException {
- if (length <= 0) {
- return;
- }
-
- try {
- encodeTermination();
-
- encodeCIIBuiltInAlgorithmData(EncodingAlgorithmIndexes.LONG, l, start, length);
- } catch (IOException e) {
- throw new SAXException(e);
- } catch (FastInfosetException e) {
- throw new SAXException(e);
- }
- }
-
- public final void booleans(boolean[] b, int start, int length) throws SAXException {
- if (length <= 0) {
- return;
- }
-
- try {
- encodeTermination();
-
- encodeCIIBuiltInAlgorithmData(EncodingAlgorithmIndexes.BOOLEAN, b, start, length);
- } catch (IOException e) {
- throw new SAXException(e);
- } catch (FastInfosetException e) {
- throw new SAXException(e);
- }
- }
-
- public final void floats(float[] f, int start, int length) throws SAXException {
- if (length <= 0) {
- return;
- }
-
- try {
- encodeTermination();
-
- encodeCIIBuiltInAlgorithmData(EncodingAlgorithmIndexes.FLOAT, f, start, length);
- } catch (IOException e) {
- throw new SAXException(e);
- } catch (FastInfosetException e) {
- throw new SAXException(e);
- }
- }
-
- public final void doubles(double[] d, int start, int length) throws SAXException {
- if (length <= 0) {
- return;
- }
-
- try {
- encodeTermination();
-
- encodeCIIBuiltInAlgorithmData(EncodingAlgorithmIndexes.DOUBLE, d, start, length);
- } catch (IOException e) {
- throw new SAXException(e);
- } catch (FastInfosetException e) {
- throw new SAXException(e);
- }
- }
-
- public void uuids(long[] msblsb, int start, int length) throws SAXException {
- if (length <= 0) {
- return;
- }
-
- try {
- encodeTermination();
-
- encodeCIIBuiltInAlgorithmData(EncodingAlgorithmIndexes.UUID, msblsb, start, length);
- } catch (IOException e) {
- throw new SAXException(e);
- } catch (FastInfosetException e) {
- throw new SAXException(e);
- }
- }
-
-
- // RestrictedAlphabetContentHandler
-
- public void numericCharacters(char ch[], int start, int length) throws SAXException {
- if (length <= 0) {
- return;
- }
-
- try {
- encodeTermination();
-
- final boolean addToTable = isCharacterContentChunkLengthMatchesLimit(length);
- encodeNumericFourBitCharacters(ch, start, length, addToTable);
- } catch (IOException e) {
- throw new SAXException(e);
- } catch (FastInfosetException e) {
- throw new SAXException(e);
- }
- }
-
- public void dateTimeCharacters(char ch[], int start, int length) throws SAXException {
- if (length <= 0) {
- return;
- }
-
- try {
- encodeTermination();
-
- final boolean addToTable = isCharacterContentChunkLengthMatchesLimit(length);
- encodeDateTimeFourBitCharacters(ch, start, length, addToTable);
- } catch (IOException e) {
- throw new SAXException(e);
- } catch (FastInfosetException e) {
- throw new SAXException(e);
- }
- }
-
- public void alphabetCharacters(String alphabet, char ch[], int start, int length) throws SAXException {
- if (length <= 0) {
- return;
- }
-
- try {
- encodeTermination();
-
- final boolean addToTable = isCharacterContentChunkLengthMatchesLimit(length);
- encodeAlphabetCharacters(alphabet, ch, start, length, addToTable);
- } catch (IOException e) {
- throw new SAXException(e);
- } catch (FastInfosetException e) {
- throw new SAXException(e);
- }
- }
-
- // ExtendedContentHandler
-
- public void characters(char[] ch, int start, int length, boolean index) throws SAXException {
- if (length <= 0) {
- return;
- }
-
- if (getIgnoreWhiteSpaceTextContent() &&
- isWhiteSpace(ch, start, length)) return;
-
- try {
- encodeTermination();
-
- if (!_charactersAsCDATA) {
- encodeNonIdentifyingStringOnThirdBit(ch, start, length, _v.characterContentChunk, index, true);
- } else {
- encodeCIIBuiltInAlgorithmDataAsCDATA(ch, start, length);
- }
- } catch (IOException e) {
- throw new SAXException(e);
- } catch (FastInfosetException e) {
- throw new SAXException(e);
- }
- }
-
-
-
- protected final int countAttributes(Attributes atts) {
- // Count attributes ignoring any in the XMLNS namespace
- // Note, such attributes may be produced when transforming from a DOM node
- int count = 0;
- for (int i = 0; i < atts.getLength(); i++) {
- final String uri = atts.getURI(i);
- if (uri == "http://www.w3.org/2000/xmlns/" || uri.equals("http://www.w3.org/2000/xmlns/")) {
- continue;
- }
- count++;
- }
- return count;
- }
-
- protected void encodeAttributes(Attributes atts) throws IOException, FastInfosetException {
- boolean addToTable;
- boolean mustBeAddedToTable;
- String value;
- if (atts instanceof EncodingAlgorithmAttributes) {
- final EncodingAlgorithmAttributes eAtts = (EncodingAlgorithmAttributes)atts;
- Object data;
- String alphabet;
- for (int i = 0; i < eAtts.getLength(); i++) {
- if (encodeAttribute(atts.getURI(i), atts.getQName(i), atts.getLocalName(i))) {
- data = eAtts.getAlgorithmData(i);
- // If data is null then there is no algorithm data
- if (data == null) {
- value = eAtts.getValue(i);
- addToTable = isAttributeValueLengthMatchesLimit(value.length());
- mustBeAddedToTable = eAtts.getToIndex(i);
-
- alphabet = eAtts.getAlpababet(i);
- if (alphabet == null) {
- encodeNonIdentifyingStringOnFirstBit(value, _v.attributeValue, addToTable, mustBeAddedToTable);
- } else if (alphabet == RestrictedAlphabet.DATE_TIME_CHARACTERS) {
- encodeDateTimeNonIdentifyingStringOnFirstBit(
- value, addToTable, mustBeAddedToTable);
- } else if (alphabet == RestrictedAlphabet.NUMERIC_CHARACTERS) {
- encodeNumericNonIdentifyingStringOnFirstBit(
- value, addToTable, mustBeAddedToTable);
- } else {
- encodeNonIdentifyingStringOnFirstBit(value, _v.attributeValue, addToTable, mustBeAddedToTable);
- }
- } else {
- encodeNonIdentifyingStringOnFirstBit(eAtts.getAlgorithmURI(i),
- eAtts.getAlgorithmIndex(i), data);
- }
- }
- }
- } else {
- for (int i = 0; i < atts.getLength(); i++) {
- if (encodeAttribute(atts.getURI(i), atts.getQName(i), atts.getLocalName(i))) {
- value = atts.getValue(i);
- addToTable = isAttributeValueLengthMatchesLimit(value.length());
- encodeNonIdentifyingStringOnFirstBit(value, _v.attributeValue, addToTable, false);
- }
- }
- }
- _b = EncodingConstants.TERMINATOR;
- _terminate = true;
- }
-
- protected void encodeElement(String namespaceURI, String qName, String localName) throws IOException {
- LocalNameQualifiedNamesMap.Entry entry = _v.elementName.obtainEntry(qName);
- if (entry._valueIndex > 0) {
- QualifiedName[] names = entry._value;
- for (int i = 0; i < entry._valueIndex; i++) {
- final QualifiedName n = names[i];
- if ((namespaceURI == n.namespaceName || namespaceURI.equals(n.namespaceName))) {
- encodeNonZeroIntegerOnThirdBit(names[i].index);
- return;
- }
- }
- }
-
- encodeLiteralElementQualifiedNameOnThirdBit(namespaceURI, getPrefixFromQualifiedName(qName),
- localName, entry);
- }
-
- protected boolean encodeAttribute(String namespaceURI, String qName, String localName) throws IOException {
- LocalNameQualifiedNamesMap.Entry entry = _v.attributeName.obtainEntry(qName);
- if (entry._valueIndex > 0) {
- QualifiedName[] names = entry._value;
- for (int i = 0; i < entry._valueIndex; i++) {
- if ((namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) {
- encodeNonZeroIntegerOnSecondBitFirstBitZero(names[i].index);
- return true;
- }
- }
- }
-
- return encodeLiteralAttributeQualifiedNameOnSecondBit(namespaceURI, getPrefixFromQualifiedName(qName),
- localName, entry);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SAXDocumentSerializerWithPrefixMapping.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SAXDocumentSerializerWithPrefixMapping.java
deleted file mode 100644
index 133e4c63..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SAXDocumentSerializerWithPrefixMapping.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.sax;
-
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import com.sun.xml.internal.fastinfoset.util.KeyIntMap;
-import com.sun.xml.internal.fastinfoset.util.LocalNameQualifiedNamesMap;
-import com.sun.xml.internal.fastinfoset.util.StringIntMap;
-import java.io.IOException;
-import java.util.HashMap;
-import org.xml.sax.SAXException;
-import java.util.Map;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.RestrictedAlphabet;
-import com.sun.xml.internal.org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes;
-import org.xml.sax.Attributes;
-
-/**
- * The Fast Infoset SAX serializer that maps prefixes to user specified prefixes
- * that are specified in a namespace URI to prefix map.
- * <p>
- * This serializer will not preserve the original prefixes and this serializer
- * should not be used when prefixes need to be preserved, such as the case
- * when there are qualified names in content.
- * <p>
- * A namespace URI to prefix map is utilized such that the prefixes
- * in the map are utilized rather than the prefixes specified in
- * the qualified name for elements and attributes.
- * <p>
- * Any namespace declarations with a namespace URI that is not present in
- * the map are added.
- * <p>
- */
-public class SAXDocumentSerializerWithPrefixMapping extends SAXDocumentSerializer {
- protected Map _namespaceToPrefixMapping;
- protected Map _prefixToPrefixMapping;
- protected String _lastCheckedNamespace;
- protected String _lastCheckedPrefix;
-
- protected StringIntMap _declaredNamespaces;
-
- public SAXDocumentSerializerWithPrefixMapping(Map namespaceToPrefixMapping) {
- // Use the local name to look up elements/attributes
- super(true);
- _namespaceToPrefixMapping = new HashMap(namespaceToPrefixMapping);
- _prefixToPrefixMapping = new HashMap();
-
- // Empty prefix
- _namespaceToPrefixMapping.put("", "");
- // 'xml' prefix
- _namespaceToPrefixMapping.put(EncodingConstants.XML_NAMESPACE_NAME, EncodingConstants.XML_NAMESPACE_PREFIX);
-
- _declaredNamespaces = new StringIntMap(4);
- }
-
- public final void startPrefixMapping(String prefix, String uri) throws SAXException {
- try {
- if (_elementHasNamespaces == false) {
- encodeTermination();
-
- // Mark the current buffer position to flag attributes if necessary
- mark();
- _elementHasNamespaces = true;
-
- // Write out Element byte with namespaces
- write(EncodingConstants.ELEMENT | EncodingConstants.ELEMENT_NAMESPACES_FLAG);
-
- _declaredNamespaces.clear();
- _declaredNamespaces.obtainIndex(uri);
- } else {
- if (_declaredNamespaces.obtainIndex(uri) != KeyIntMap.NOT_PRESENT) {
- final String p = getPrefix(uri);
- if (p != null) {
- _prefixToPrefixMapping.put(prefix, p);
- }
- return;
- }
- }
-
- final String p = getPrefix(uri);
- if (p != null) {
- encodeNamespaceAttribute(p, uri);
- _prefixToPrefixMapping.put(prefix, p);
- } else {
- putPrefix(uri, prefix);
- encodeNamespaceAttribute(prefix, uri);
- }
-
- } catch (IOException e) {
- throw new SAXException("startElement", e);
- }
- }
-
- protected final void encodeElement(String namespaceURI, String qName, String localName) throws IOException {
- LocalNameQualifiedNamesMap.Entry entry = _v.elementName.obtainEntry(localName);
- if (entry._valueIndex > 0) {
- if (encodeElementMapEntry(entry, namespaceURI)) return;
- // Check the entry is a member of the read only map
- if (_v.elementName.isQNameFromReadOnlyMap(entry._value[0])) {
- entry = _v.elementName.obtainDynamicEntry(localName);
- if (entry._valueIndex > 0) {
- if (encodeElementMapEntry(entry, namespaceURI)) return;
- }
- }
- }
-
- encodeLiteralElementQualifiedNameOnThirdBit(namespaceURI, getPrefix(namespaceURI),
- localName, entry);
- }
-
- protected boolean encodeElementMapEntry(LocalNameQualifiedNamesMap.Entry entry, String namespaceURI) throws IOException {
- QualifiedName[] names = entry._value;
- for (int i = 0; i < entry._valueIndex; i++) {
- if ((namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) {
- encodeNonZeroIntegerOnThirdBit(names[i].index);
- return true;
- }
- }
- return false;
- }
-
-
- protected final void encodeAttributes(Attributes atts) throws IOException, FastInfosetException {
- boolean addToTable;
- boolean mustToBeAddedToTable;
- String value;
- if (atts instanceof EncodingAlgorithmAttributes) {
- final EncodingAlgorithmAttributes eAtts = (EncodingAlgorithmAttributes)atts;
- Object data;
- String alphabet;
- for (int i = 0; i < eAtts.getLength(); i++) {
- final String uri = atts.getURI(i);
- if (encodeAttribute(uri, atts.getQName(i), atts.getLocalName(i))) {
- data = eAtts.getAlgorithmData(i);
- // If data is null then there is no algorithm data
- if (data == null) {
- value = eAtts.getValue(i);
- addToTable = isAttributeValueLengthMatchesLimit(value.length());
- mustToBeAddedToTable = eAtts.getToIndex(i);
- alphabet = eAtts.getAlpababet(i);
- if (alphabet == null) {
- if (uri == "http://www.w3.org/2001/XMLSchema-instance" ||
- uri.equals("http://www.w3.org/2001/XMLSchema-instance")) {
- value = convertQName(value);
- }
- encodeNonIdentifyingStringOnFirstBit(value, _v.attributeValue, addToTable, mustToBeAddedToTable);
- } else if (alphabet == RestrictedAlphabet.DATE_TIME_CHARACTERS) {
- encodeDateTimeNonIdentifyingStringOnFirstBit(
- value, addToTable, mustToBeAddedToTable);
- } else if (alphabet == RestrictedAlphabet.NUMERIC_CHARACTERS) {
- encodeNumericNonIdentifyingStringOnFirstBit(
- value, addToTable, mustToBeAddedToTable);
- } else {
- encodeNonIdentifyingStringOnFirstBit(value, _v.attributeValue, addToTable, mustToBeAddedToTable);
- }
- } else {
- encodeNonIdentifyingStringOnFirstBit(eAtts.getAlgorithmURI(i),
- eAtts.getAlgorithmIndex(i), data);
- }
- }
- }
- } else {
- for (int i = 0; i < atts.getLength(); i++) {
- final String uri = atts.getURI(i);
- if (encodeAttribute(atts.getURI(i), atts.getQName(i), atts.getLocalName(i))) {
- value = atts.getValue(i);
- addToTable = isAttributeValueLengthMatchesLimit(value.length());
-
- if (uri == "http://www.w3.org/2001/XMLSchema-instance" ||
- uri.equals("http://www.w3.org/2001/XMLSchema-instance")) {
- value = convertQName(value);
- }
- encodeNonIdentifyingStringOnFirstBit(value, _v.attributeValue, addToTable, false);
- }
- }
- }
- _b = EncodingConstants.TERMINATOR;
- _terminate = true;
- }
-
- private String convertQName(String qName) {
- int i = qName.indexOf(':');
- String prefix = "";
- String localName = qName;
- if (i != -1) {
- prefix = qName.substring(0, i);
- localName = qName.substring(i + 1);
- }
-
- String p = (String)_prefixToPrefixMapping.get(prefix);
- if (p != null) {
- if (p.length() == 0)
- return localName;
- else
- return p + ":" + localName;
- } else {
- return qName;
- }
- }
-
- protected final boolean encodeAttribute(String namespaceURI, String qName, String localName) throws IOException {
- LocalNameQualifiedNamesMap.Entry entry = _v.attributeName.obtainEntry(localName);
- if (entry._valueIndex > 0) {
- if (encodeAttributeMapEntry(entry, namespaceURI)) return true;
- // Check the entry is a member of the read only map
- if (_v.attributeName.isQNameFromReadOnlyMap(entry._value[0])) {
- entry = _v.attributeName.obtainDynamicEntry(localName);
- if (entry._valueIndex > 0) {
- if (encodeAttributeMapEntry(entry, namespaceURI)) return true;
- }
- }
- }
-
- return encodeLiteralAttributeQualifiedNameOnSecondBit(namespaceURI, getPrefix(namespaceURI),
- localName, entry);
- }
-
- protected boolean encodeAttributeMapEntry(LocalNameQualifiedNamesMap.Entry entry, String namespaceURI) throws IOException {
- QualifiedName[] names = entry._value;
- for (int i = 0; i < entry._valueIndex; i++) {
- if ((namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) {
- encodeNonZeroIntegerOnSecondBitFirstBitZero(names[i].index);
- return true;
- }
- }
- return false;
- }
-
- protected final String getPrefix(String namespaceURI) {
- if (_lastCheckedNamespace == namespaceURI) return _lastCheckedPrefix;
-
- _lastCheckedNamespace = namespaceURI;
- return _lastCheckedPrefix = (String)_namespaceToPrefixMapping.get(namespaceURI);
- }
-
- protected final void putPrefix(String namespaceURI, String prefix) {
- _namespaceToPrefixMapping.put(namespaceURI, prefix);
-
- _lastCheckedNamespace = namespaceURI;
- _lastCheckedPrefix = prefix;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SystemIdResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SystemIdResolver.java
deleted file mode 100644
index ffb9c128..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/sax/SystemIdResolver.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.sax;
-
-import java.io.*;
-
-public class SystemIdResolver {
-
- public SystemIdResolver() {
- }
-
- public static String getAbsoluteURIFromRelative(String localPath) {
- if (localPath == null || localPath.length() == 0) {
- return "";
- }
-
- String absolutePath = localPath;
- if (!isAbsolutePath(localPath)) {
- try {
- absolutePath = getAbsolutePathFromRelativePath(localPath);
- }
- catch (SecurityException se) {
- return "file:" + localPath;
- }
- }
-
- String urlString;
- if (null != absolutePath) {
- urlString = absolutePath.startsWith(File.separator) ?
- ("file://" + absolutePath) :
- ("file:///" + absolutePath);
- }
- else {
- urlString = "file:" + localPath;
- }
-
- return replaceChars(urlString);
- }
-
- private static String getAbsolutePathFromRelativePath(String relativePath) {
- return new File(relativePath).getAbsolutePath();
- }
-
- public static boolean isAbsoluteURI(String systemId) {
- if (systemId == null) {
- return false;
- }
-
- if (isWindowsAbsolutePath(systemId)) {
- return false;
- }
-
- final int fragmentIndex = systemId.indexOf('#');
- final int queryIndex = systemId.indexOf('?');
- final int slashIndex = systemId.indexOf('/');
- final int colonIndex = systemId.indexOf(':');
-
- int index = systemId.length() -1;
- if (fragmentIndex > 0) {
- index = fragmentIndex;
- }
- if (queryIndex > 0 && queryIndex < index) {
- index = queryIndex;
- }
- if (slashIndex > 0 && slashIndex <index) {
- index = slashIndex;
- }
- return (colonIndex > 0) && (colonIndex < index);
- }
-
- public static boolean isAbsolutePath(String systemId) {
- if(systemId == null)
- return false;
- final File file = new File(systemId);
- return file.isAbsolute();
-
- }
-
- private static boolean isWindowsAbsolutePath(String systemId) {
- if(!isAbsolutePath(systemId))
- return false;
- if (systemId.length() > 2
- && systemId.charAt(1) == ':'
- && Character.isLetter(systemId.charAt(0))
- && (systemId.charAt(2) == '\\' || systemId.charAt(2) == '/'))
- return true;
- else
- return false;
- }
-
- private static String replaceChars(String str) {
- StringBuffer buf = new StringBuffer(str);
- int length = buf.length();
- for (int i = 0; i < length; i++) {
- char currentChar = buf.charAt(i);
- // Replace space with "%20"
- if (currentChar == ' ') {
- buf.setCharAt(i, '%');
- buf.insert(i+1, "20");
- length = length + 2;
- i = i + 2;
- }
- // Replace backslash with forward slash
- else if (currentChar == '\\') {
- buf.setCharAt(i, '/');
- }
- }
-
- return buf.toString();
- }
-
- public static String getAbsoluteURI(String systemId) {
- String absoluteURI = systemId;
- if (isAbsoluteURI(systemId)) {
- if (systemId.startsWith("file:")) {
- String str = systemId.substring(5);
-
- if (str != null && str.startsWith("/")) {
- if (str.startsWith("///") || !str.startsWith("//")) {
- int secondColonIndex = systemId.indexOf(':', 5);
- if (secondColonIndex > 0) {
- String localPath = systemId.substring(secondColonIndex-1);
- try {
- if (!isAbsolutePath(localPath))
- absoluteURI = systemId.substring(0, secondColonIndex-1) +
- getAbsolutePathFromRelativePath(localPath);
- }
- catch (SecurityException se) {
- return systemId;
- }
- }
- }
- }
- else {
- return getAbsoluteURIFromRelative(systemId.substring(5));
- }
-
- return replaceChars(absoluteURI);
- }
- else {
- return systemId;
- }
- }
- else {
- return getAbsoluteURIFromRelative(systemId);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/EventLocation.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/EventLocation.java
deleted file mode 100644
index 434e9464..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/EventLocation.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax;
-
-import javax.xml.stream.Location;
-
-
-public class EventLocation implements Location{
- String _systemId = null;
- String _publicId = null;
- int _column = -1;
- int _line = -1;
- int _charOffset = -1;
-
- EventLocation() {
- }
-
- //explicitly create a nil location
- public static Location getNilLocation() {
- return new EventLocation();
- }
- /**
- * Return the line number where the current event ends,
- * returns -1 if none is available.
- * @return the current line number
- */
- public int getLineNumber(){
- return _line;
- }
- /**
- * Return the column number where the current event ends,
- * returns -1 if none is available.
- * @return the current column number
- */
- public int getColumnNumber() {
- return _column;
- }
-
- /**
- * Return the byte or character offset into the input source this location
- * is pointing to. If the input source is a file or a byte stream then
- * this is the byte offset into that stream, but if the input source is
- * a character media then the offset is the character offset.
- * Returns -1 if there is no offset available.
- * @return the current offset
- */
- public int getCharacterOffset(){
- return _charOffset;
- }
-
- /**
- * Returns the public ID of the XML
- * @return the public ID, or null if not available
- */
- public String getPublicId(){
- return _publicId;
- }
-
- /**
- * Returns the system ID of the XML
- * @return the system ID, or null if not available
- */
- public String getSystemId(){
- return _systemId;
- }
-
- public void setLineNumber(int line) {
- _line = line;
- }
- public void setColumnNumber(int col) {
- _column = col;
- }
- public void setCharacterOffset(int offset) {
- _charOffset = offset;
- }
- public void setPublicId(String id) {
- _publicId = id;
- }
- public void setSystemId(String id) {
- _systemId = id;
- }
-
- public String toString(){
- StringBuffer sbuffer = new StringBuffer() ;
- sbuffer.append("Line number = " + _line);
- sbuffer.append("\n") ;
- sbuffer.append("Column number = " + _column);
- sbuffer.append("\n") ;
- sbuffer.append("System Id = " + _systemId);
- sbuffer.append("\n") ;
- sbuffer.append("Public Id = " + _publicId);
- sbuffer.append("\n") ;
- sbuffer.append("CharacterOffset = " + _charOffset);
- sbuffer.append("\n") ;
- return sbuffer.toString();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/StAXDocumentParser.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/StAXDocumentParser.java
deleted file mode 100644
index 0475d914..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/StAXDocumentParser.java
+++ /dev/null
@@ -1,1878 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax;
-
-import com.sun.xml.internal.fastinfoset.Decoder;
-import com.sun.xml.internal.fastinfoset.DecoderStateTables;
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.fastinfoset.OctetBufferListener;
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import com.sun.xml.internal.fastinfoset.algorithm.BuiltInEncodingAlgorithmFactory;
-import com.sun.xml.internal.fastinfoset.sax.AttributesHolder;
-import com.sun.xml.internal.fastinfoset.util.CharArray;
-import com.sun.xml.internal.fastinfoset.util.CharArrayString;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithm;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmIndexes;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetException;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-import com.sun.xml.internal.fastinfoset.org.apache.xerces.util.XMLChar;
-import com.sun.xml.internal.fastinfoset.util.DuplicateAttributeVerifier;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import com.sun.xml.internal.org.jvnet.fastinfoset.stax.FastInfosetStreamReader;
-
-/**
- * The Fast Infoset StAX parser.
- * <p>
- * Instantiate this parser to parse a fast infoset document in accordance
- * with the StAX API.
- *
- * <p>
- * More than one fast infoset document may be decoded from the
- * {@link java.io.InputStream}.
- */
-public class StAXDocumentParser extends Decoder
- implements XMLStreamReader, FastInfosetStreamReader, OctetBufferListener {
- private static final Logger logger = Logger.getLogger(StAXDocumentParser.class.getName());
-
- protected static final int INTERNAL_STATE_START_DOCUMENT = 0;
- protected static final int INTERNAL_STATE_START_ELEMENT_TERMINATE = 1;
- protected static final int INTERNAL_STATE_SINGLE_TERMINATE_ELEMENT_WITH_NAMESPACES = 2;
- protected static final int INTERNAL_STATE_DOUBLE_TERMINATE_ELEMENT = 3;
- protected static final int INTERNAL_STATE_END_DOCUMENT = 4;
- protected static final int INTERNAL_STATE_VOID = -1;
-
- protected int _internalState;
-
- /**
- * Current event
- */
- protected int _eventType;
-
- /**
- * Stack of qualified names and namespaces
- */
- protected QualifiedName[] _qNameStack = new QualifiedName[32];
- protected int[] _namespaceAIIsStartStack = new int[32];
- protected int[] _namespaceAIIsEndStack = new int[32];
- protected int _stackCount = -1;
-
- protected String[] _namespaceAIIsPrefix = new String[32];
- protected String[] _namespaceAIIsNamespaceName = new String[32];
- protected int[] _namespaceAIIsPrefixIndex = new int[32];
- protected int _namespaceAIIsIndex;
-
- /**
- * Namespaces associated with START_ELEMENT or END_ELEMENT
- */
- protected int _currentNamespaceAIIsStart;
- protected int _currentNamespaceAIIsEnd;
-
- /**
- * Qualified name associated with START_ELEMENT or END_ELEMENT.
- */
- protected QualifiedName _qualifiedName;
-
- /**
- * List of attributes
- */
- protected AttributesHolder _attributes = new AttributesHolder();
-
- protected boolean _clearAttributes = false;
-
- /**
- * Characters associated with event.
- */
- protected char[] _characters;
- protected int _charactersOffset;
-
- protected String _algorithmURI;
- protected int _algorithmId;
- protected boolean _isAlgorithmDataCloned;
- protected byte[] _algorithmData;
- protected int _algorithmDataOffset;
- protected int _algorithmDataLength;
-
- /**
- * State for processing instruction
- */
- protected String _piTarget;
- protected String _piData;
-
- protected NamespaceContextImpl _nsContext = new NamespaceContextImpl();
-
- protected String _characterEncodingScheme;
-
- protected StAXManager _manager;
-
- public StAXDocumentParser() {
- reset();
- _manager = new StAXManager(StAXManager.CONTEXT_READER);
- }
-
- public StAXDocumentParser(InputStream s) {
- this();
- setInputStream(s);
- _manager = new StAXManager(StAXManager.CONTEXT_READER);
- }
-
- public StAXDocumentParser(InputStream s, StAXManager manager) {
- this(s);
- _manager = manager;
- }
-
- @Override
- public void setInputStream(InputStream s) {
- super.setInputStream(s);
- reset();
- }
-
- @Override
- public void reset() {
- super.reset();
- if (_internalState != INTERNAL_STATE_START_DOCUMENT &&
- _internalState != INTERNAL_STATE_END_DOCUMENT) {
-
- for (int i = _namespaceAIIsIndex - 1; i >= 0; i--) {
- _prefixTable.popScopeWithPrefixEntry(_namespaceAIIsPrefixIndex[i]);
- }
-
- _stackCount = -1;
-
- _namespaceAIIsIndex = 0;
- _characters = null;
- _algorithmData = null;
- }
-
- _characterEncodingScheme = "UTF-8";
- _eventType = START_DOCUMENT;
- _internalState = INTERNAL_STATE_START_DOCUMENT;
- }
-
- protected void resetOnError() {
- super.reset();
-
- if (_v != null) {
- _prefixTable.clearCompletely();
- }
- _duplicateAttributeVerifier.clear();
-
- _stackCount = -1;
-
- _namespaceAIIsIndex = 0;
- _characters = null;
- _algorithmData = null;
-
- _eventType = START_DOCUMENT;
- _internalState = INTERNAL_STATE_START_DOCUMENT;
- }
-
- // -- XMLStreamReader Interface -------------------------------------------
-
- public Object getProperty(java.lang.String name)
- throws java.lang.IllegalArgumentException {
- if (_manager != null) {
- return _manager.getProperty(name);
- }
- return null;
- }
-
- public int next() throws XMLStreamException {
- try {
- if (_internalState != INTERNAL_STATE_VOID) {
- switch (_internalState) {
- case INTERNAL_STATE_START_DOCUMENT:
- decodeHeader();
- processDII();
-
- _internalState = INTERNAL_STATE_VOID;
- break;
- case INTERNAL_STATE_START_ELEMENT_TERMINATE:
- if (_currentNamespaceAIIsEnd > 0) {
- for (int i = _currentNamespaceAIIsEnd - 1; i >= _currentNamespaceAIIsStart; i--) {
- _prefixTable.popScopeWithPrefixEntry(_namespaceAIIsPrefixIndex[i]);
- }
- _namespaceAIIsIndex = _currentNamespaceAIIsStart;
- }
-
- // Pop information off the stack
- popStack();
-
- _internalState = INTERNAL_STATE_VOID;
- return _eventType = END_ELEMENT;
- case INTERNAL_STATE_SINGLE_TERMINATE_ELEMENT_WITH_NAMESPACES:
- // Undeclare namespaces
- for (int i = _currentNamespaceAIIsEnd - 1; i >= _currentNamespaceAIIsStart; i--) {
- _prefixTable.popScopeWithPrefixEntry(_namespaceAIIsPrefixIndex[i]);
- }
- _namespaceAIIsIndex = _currentNamespaceAIIsStart;
- _internalState = INTERNAL_STATE_VOID;
- break;
- case INTERNAL_STATE_DOUBLE_TERMINATE_ELEMENT:
- // Undeclare namespaces
- if (_currentNamespaceAIIsEnd > 0) {
- for (int i = _currentNamespaceAIIsEnd - 1; i >= _currentNamespaceAIIsStart; i--) {
- _prefixTable.popScopeWithPrefixEntry(_namespaceAIIsPrefixIndex[i]);
- }
- _namespaceAIIsIndex = _currentNamespaceAIIsStart;
- }
-
- if (_stackCount == -1) {
- _internalState = INTERNAL_STATE_END_DOCUMENT;
- return _eventType = END_DOCUMENT;
- }
-
- // Pop information off the stack
- popStack();
-
- _internalState = (_currentNamespaceAIIsEnd > 0) ?
- INTERNAL_STATE_SINGLE_TERMINATE_ELEMENT_WITH_NAMESPACES :
- INTERNAL_STATE_VOID;
- return _eventType = END_ELEMENT;
- case INTERNAL_STATE_END_DOCUMENT:
- throw new NoSuchElementException(CommonResourceBundle.getInstance().getString("message.noMoreEvents"));
- }
- }
-
- // Reset internal state
- _characters = null;
- _algorithmData = null;
- _currentNamespaceAIIsEnd = 0;
-
- // Process information item
- final int b = read();
- switch(DecoderStateTables.EII(b)) {
- case DecoderStateTables.EII_NO_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[b], false);
- return _eventType;
- case DecoderStateTables.EII_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[b & EncodingConstants.INTEGER_3RD_BIT_SMALL_MASK], true);
- return _eventType;
- case DecoderStateTables.EII_INDEX_MEDIUM:
- processEII(processEIIIndexMedium(b), (b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- return _eventType;
- case DecoderStateTables.EII_INDEX_LARGE:
- processEII(processEIIIndexLarge(b), (b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- return _eventType;
- case DecoderStateTables.EII_LITERAL:
- {
- final QualifiedName qn = processLiteralQualifiedName(
- b & EncodingConstants.LITERAL_QNAME_PREFIX_NAMESPACE_NAME_MASK,
- _elementNameTable.getNext());
- _elementNameTable.add(qn);
- processEII(qn, (b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- return _eventType;
- }
- case DecoderStateTables.EII_NAMESPACES:
- processEIIWithNamespaces((b & EncodingConstants.ELEMENT_ATTRIBUTE_FLAG) > 0);
- return _eventType;
- case DecoderStateTables.CII_UTF8_SMALL_LENGTH:
- _octetBufferLength = (b & EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_MASK)
- + 1;
- processUtf8CharacterString(b);
- return _eventType = CHARACTERS;
- case DecoderStateTables.CII_UTF8_MEDIUM_LENGTH:
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_LIMIT;
- processUtf8CharacterString(b);
- return _eventType = CHARACTERS;
- case DecoderStateTables.CII_UTF8_LARGE_LENGTH:
- _octetBufferLength = ((read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_LIMIT;
- processUtf8CharacterString(b);
- return _eventType = CHARACTERS;
- case DecoderStateTables.CII_UTF16_SMALL_LENGTH:
- _octetBufferLength = (b & EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_MASK)
- + 1;
- processUtf16CharacterString(b);
- return _eventType = CHARACTERS;
- case DecoderStateTables.CII_UTF16_MEDIUM_LENGTH:
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_SMALL_LIMIT;
- processUtf16CharacterString(b);
- return _eventType = CHARACTERS;
- case DecoderStateTables.CII_UTF16_LARGE_LENGTH:
- _octetBufferLength = ((read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.OCTET_STRING_LENGTH_7TH_BIT_MEDIUM_LIMIT;
- processUtf16CharacterString(b);
- return _eventType = CHARACTERS;
- case DecoderStateTables.CII_RA:
- {
- final boolean addToTable = (b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0;
-
- _identifier = (b & 0x02) << 6;
- final int b2 = read();
- _identifier |= (b2 & 0xFC) >> 2;
-
- decodeOctetsOnSeventhBitOfNonIdentifyingStringOnThirdBit(b2);
-
- decodeRestrictedAlphabetAsCharBuffer();
-
- if (addToTable) {
- _charactersOffset = _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- _characters = _characterContentChunkTable._array;
- } else {
- _characters = _charBuffer;
- _charactersOffset = 0;
- }
- return _eventType = CHARACTERS;
- }
- case DecoderStateTables.CII_EA:
- {
- final boolean addToTable = (b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0;
- // Decode encoding algorithm integer
- _algorithmId = (b & 0x02) << 6;
- final int b2 = read();
- _algorithmId |= (b2 & 0xFC) >> 2;
-
- decodeOctetsOnSeventhBitOfNonIdentifyingStringOnThirdBit(b2);
- processCIIEncodingAlgorithm(addToTable);
-
- if (_algorithmId == EncodingAlgorithmIndexes.CDATA) {
- return _eventType = CDATA;
- }
-
- return _eventType = CHARACTERS;
- }
- case DecoderStateTables.CII_INDEX_SMALL:
- {
- final int index = b & EncodingConstants.INTEGER_4TH_BIT_SMALL_MASK;
- _characterContentChunkTable._cachedIndex = index;
-
- _characters = _characterContentChunkTable._array;
- _charactersOffset = _characterContentChunkTable._offset[index];
- _charBufferLength = _characterContentChunkTable._length[index];
- return _eventType = CHARACTERS;
- }
- case DecoderStateTables.CII_INDEX_MEDIUM:
- {
- final int index = (((b & EncodingConstants.INTEGER_4TH_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_4TH_BIT_SMALL_LIMIT;
- _characterContentChunkTable._cachedIndex = index;
-
- _characters = _characterContentChunkTable._array;
- _charactersOffset = _characterContentChunkTable._offset[index];
- _charBufferLength = _characterContentChunkTable._length[index];
- return _eventType = CHARACTERS;
- }
- case DecoderStateTables.CII_INDEX_LARGE:
- {
- final int index = (((b & EncodingConstants.INTEGER_4TH_BIT_LARGE_MASK) << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.INTEGER_4TH_BIT_MEDIUM_LIMIT;
- _characterContentChunkTable._cachedIndex = index;
-
- _characters = _characterContentChunkTable._array;
- _charactersOffset = _characterContentChunkTable._offset[index];
- _charBufferLength = _characterContentChunkTable._length[index];
- return _eventType = CHARACTERS;
- }
- case DecoderStateTables.CII_INDEX_LARGE_LARGE:
- {
- final int index = ((read() << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.INTEGER_4TH_BIT_LARGE_LIMIT;
- _characterContentChunkTable._cachedIndex = index;
-
- _characters = _characterContentChunkTable._array;
- _charactersOffset = _characterContentChunkTable._offset[index];
- _charBufferLength = _characterContentChunkTable._length[index];
- return _eventType = CHARACTERS;
- }
- case DecoderStateTables.COMMENT_II:
- processCommentII();
- return _eventType;
- case DecoderStateTables.PROCESSING_INSTRUCTION_II:
- processProcessingII();
- return _eventType;
- case DecoderStateTables.UNEXPANDED_ENTITY_REFERENCE_II:
- {
- processUnexpandedEntityReference(b);
- // Skip the reference
- return next();
- }
- case DecoderStateTables.TERMINATOR_DOUBLE:
- if (_stackCount != -1) {
- // Pop information off the stack
- popStack();
-
- _internalState = INTERNAL_STATE_DOUBLE_TERMINATE_ELEMENT;
- return _eventType = END_ELEMENT;
- }
-
- _internalState = INTERNAL_STATE_END_DOCUMENT;
- return _eventType = END_DOCUMENT;
- case DecoderStateTables.TERMINATOR_SINGLE:
- if (_stackCount != -1) {
- // Pop information off the stack
- popStack();
-
- if (_currentNamespaceAIIsEnd > 0) {
- _internalState = INTERNAL_STATE_SINGLE_TERMINATE_ELEMENT_WITH_NAMESPACES;
- }
- return _eventType = END_ELEMENT;
- }
-
- _internalState = INTERNAL_STATE_END_DOCUMENT;
- return _eventType = END_DOCUMENT;
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.IllegalStateDecodingEII"));
- }
- } catch (IOException e) {
- resetOnError();
- logger.log(Level.FINE, "next() exception", e);
- throw new XMLStreamException(e);
- } catch (FastInfosetException e) {
- resetOnError();
- logger.log(Level.FINE, "next() exception", e);
- throw new XMLStreamException(e);
- } catch (RuntimeException e) {
- resetOnError();
- logger.log(Level.FINE, "next() exception", e);
- throw e;
- }
- }
-
- private final void processUtf8CharacterString(final int b) throws IOException {
- if ((b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0) {
- _characterContentChunkTable.ensureSize(_octetBufferLength);
- _characters = _characterContentChunkTable._array;
- _charactersOffset = _characterContentChunkTable._arrayIndex;
- decodeUtf8StringAsCharBuffer(_characterContentChunkTable._array, _charactersOffset);
- _characterContentChunkTable.add(_charBufferLength);
- } else {
- decodeUtf8StringAsCharBuffer();
- _characters = _charBuffer;
- _charactersOffset = 0;
- }
- }
-
- private final void processUtf16CharacterString(final int b) throws IOException {
- decodeUtf16StringAsCharBuffer();
- if ((b & EncodingConstants.CHARACTER_CHUNK_ADD_TO_TABLE_FLAG) > 0) {
- _charactersOffset = _characterContentChunkTable.add(_charBuffer, _charBufferLength);
- _characters = _characterContentChunkTable._array;
- } else {
- _characters = _charBuffer;
- _charactersOffset = 0;
- }
- }
-
- private void popStack() {
- // Pop information off the stack
- _qualifiedName = _qNameStack[_stackCount];
- _currentNamespaceAIIsStart = _namespaceAIIsStartStack[_stackCount];
- _currentNamespaceAIIsEnd = _namespaceAIIsEndStack[_stackCount];
- _qNameStack[_stackCount--] = null;
- }
-
- /** Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event.
- * If the namespaceURI is null it is not checked for equality, if the localName is null it is not checked for equality.
- * @param type the event type
- * @param namespaceURI the uri of the event, may be null
- * @param localName the localName of the event, may be null
- * @throws XMLStreamException if the required values are not matched.
- */
- public final void require(int type, String namespaceURI, String localName)
- throws XMLStreamException {
- if( type != _eventType)
- throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.eventTypeNotMatch", new Object[]{getEventTypeString(type)}));
- if( namespaceURI != null && !namespaceURI.equals(getNamespaceURI()) )
- throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.namespaceURINotMatch", new Object[]{namespaceURI}));
- if(localName != null && !localName.equals(getLocalName()))
- throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.localNameNotMatch", new Object[]{localName}));
- }
-
- /** Reads the content of a text-only element. Precondition:
- * the current event is START_ELEMENT. Postcondition:
- * The current event is the corresponding END_ELEMENT.
- * @throws XMLStreamException if the current event is not a START_ELEMENT or if
- * a non text element is encountered
- */
- public final String getElementText() throws XMLStreamException {
-
- if(getEventType() != START_ELEMENT) {
- throw new XMLStreamException(
- CommonResourceBundle.getInstance().getString("message.mustBeOnSTARTELEMENT"), getLocation());
- }
- //current is StartElement, move to the next
- next();
- return getElementText(true);
- }
- /**
- * @param startElementRead flag if start element has already been read
- */
- public final String getElementText(boolean startElementRead) throws XMLStreamException {
- if (!startElementRead) {
- throw new XMLStreamException(
- CommonResourceBundle.getInstance().getString("message.mustBeOnSTARTELEMENT"), getLocation());
- }
- int eventType = getEventType();
- StringBuilder content = new StringBuilder();
- while(eventType != END_ELEMENT ) {
- if(eventType == CHARACTERS
- || eventType == CDATA
- || eventType == SPACE
- || eventType == ENTITY_REFERENCE) {
- content.append(getText());
- } else if(eventType == PROCESSING_INSTRUCTION
- || eventType == COMMENT) {
- // skipping
- } else if(eventType == END_DOCUMENT) {
- throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.unexpectedEOF"));
- } else if(eventType == START_ELEMENT) {
- throw new XMLStreamException(
- CommonResourceBundle.getInstance().getString("message.getElementTextExpectTextOnly"), getLocation());
- } else {
- throw new XMLStreamException(
- CommonResourceBundle.getInstance().getString("message.unexpectedEventType")+ getEventTypeString(eventType), getLocation());
- }
- eventType = next();
- }
- return content.toString();
- }
-
- /** Skips any white space (isWhiteSpace() returns true), COMMENT,
- * or PROCESSING_INSTRUCTION,
- * until a START_ELEMENT or END_ELEMENT is reached.
- * If other than white space characters, COMMENT, PROCESSING_INSTRUCTION, START_ELEMENT, END_ELEMENT
- * are encountered, an exception is thrown. This method should
- * be used when processing element-only content seperated by white space.
- * This method should
- * be used when processing element-only content because
- * the parser is not able to recognize ignorable whitespace if
- * then DTD is missing or not interpreted.
- * @return the event type of the element read
- * @throws XMLStreamException if the current event is not white space
- */
- public final int nextTag() throws XMLStreamException {
- next();
- return nextTag(true);
- }
- /** if the current tag has already read, such as in the case EventReader's
- * peek() has been called, the current cursor should not move before the loop
- */
- public final int nextTag(boolean currentTagRead) throws XMLStreamException {
- int eventType = getEventType();
- if (!currentTagRead) {
- eventType = next();
- }
- while((eventType == CHARACTERS && isWhiteSpace()) // skip whitespace
- || (eventType == CDATA && isWhiteSpace())
- || eventType == SPACE
- || eventType == PROCESSING_INSTRUCTION
- || eventType == COMMENT) {
- eventType = next();
- }
- if (eventType != START_ELEMENT && eventType != END_ELEMENT) {
- throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.expectedStartOrEnd"), getLocation());
- }
- return eventType;
- }
-
- public final boolean hasNext() throws XMLStreamException {
- return (_eventType != END_DOCUMENT);
- }
-
- public void close() throws XMLStreamException {
- try {
- super.closeIfRequired();
- } catch (IOException ex) {
- }
- }
-
- public final String getNamespaceURI(String prefix) {
- String namespace = getNamespaceDecl(prefix);
- if (namespace == null) {
- if (prefix == null) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.nullPrefix"));
- }
- return null; // unbound
- }
- return namespace;
- }
-
- public final boolean isStartElement() {
- return (_eventType == START_ELEMENT);
- }
-
- public final boolean isEndElement() {
- return (_eventType == END_ELEMENT);
- }
-
- public final boolean isCharacters() {
- return (_eventType == CHARACTERS);
- }
-
- /**
- * Returns true if the cursor points to a character data event that consists of all whitespace
- * Application calling this method needs to cache the value and avoid calling this method again
- * for the same event.
- * @return true if the cursor points to all whitespace, false otherwise
- */
- public final boolean isWhiteSpace() {
- if(isCharacters() || (_eventType == CDATA)){
- char [] ch = this.getTextCharacters();
- int start = this.getTextStart();
- int length = this.getTextLength();
- for (int i = start; i < start + length; i++){
- if(!XMLChar.isSpace(ch[i])){
- return false;
- }
- }
- return true;
- }
- return false;
- }
-
- public final String getAttributeValue(String namespaceURI, String localName) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetAttributeValue"));
- }
-
- if (localName == null)
- throw new IllegalArgumentException();
-
- // Search for the attributes in _attributes
- if (namespaceURI != null) {
- for (int i = 0; i < _attributes.getLength(); i++) {
- if (_attributes.getLocalName(i).equals(localName) &&
- _attributes.getURI(i).equals(namespaceURI)) {
- return _attributes.getValue(i);
- }
- }
- } else {
- for (int i = 0; i < _attributes.getLength(); i++) {
- if (_attributes.getLocalName(i).equals(localName)) {
- return _attributes.getValue(i);
- }
- }
- }
-
- return null;
- }
-
- public final int getAttributeCount() {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetAttributeValue"));
- }
-
- return _attributes.getLength();
- }
-
- public final javax.xml.namespace.QName getAttributeName(int index) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetAttributeValue"));
- }
- return _attributes.getQualifiedName(index).getQName();
- }
-
- public final String getAttributeNamespace(int index) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetAttributeValue"));
- }
-
- return _attributes.getURI(index);
- }
-
- public final String getAttributeLocalName(int index) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetAttributeValue"));
- }
- return _attributes.getLocalName(index);
- }
-
- public final String getAttributePrefix(int index) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetAttributeValue"));
- }
- return _attributes.getPrefix(index);
- }
-
- public final String getAttributeType(int index) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetAttributeValue"));
- }
- return _attributes.getType(index);
- }
-
- public final String getAttributeValue(int index) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetAttributeValue"));
- }
- return _attributes.getValue(index);
- }
-
- public final boolean isAttributeSpecified(int index) {
- return false; // non-validating parser
- }
-
- public final int getNamespaceCount() {
- if (_eventType == START_ELEMENT || _eventType == END_ELEMENT) {
- return (_currentNamespaceAIIsEnd > 0) ? (_currentNamespaceAIIsEnd - _currentNamespaceAIIsStart) : 0;
- } else {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetNamespaceCount"));
- }
- }
-
- public final String getNamespacePrefix(int index) {
- if (_eventType == START_ELEMENT || _eventType == END_ELEMENT) {
- return _namespaceAIIsPrefix[_currentNamespaceAIIsStart + index];
- } else {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetNamespacePrefix"));
- }
- }
-
- public final String getNamespaceURI(int index) {
- if (_eventType == START_ELEMENT || _eventType == END_ELEMENT) {
- return _namespaceAIIsNamespaceName[_currentNamespaceAIIsStart + index];
- } else {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetNamespacePrefix"));
- }
- }
-
- public final NamespaceContext getNamespaceContext() {
- return _nsContext;
- }
-
- public final int getEventType() {
- return _eventType;
- }
-
- public final String getText() {
- if (_characters == null) {
- checkTextState();
- }
-
- if (_characters == _characterContentChunkTable._array) {
- return _characterContentChunkTable.getString(_characterContentChunkTable._cachedIndex);
- } else {
- return new String(_characters, _charactersOffset, _charBufferLength);
- }
- }
-
- public final char[] getTextCharacters() {
- if (_characters == null) {
- checkTextState();
- }
-
- return _characters;
- }
-
- public final int getTextStart() {
- if (_characters == null) {
- checkTextState();
- }
-
- return _charactersOffset;
- }
-
- public final int getTextLength() {
- if (_characters == null) {
- checkTextState();
- }
-
- return _charBufferLength;
- }
-
- public final int getTextCharacters(int sourceStart, char[] target,
- int targetStart, int length) throws XMLStreamException {
- if (_characters == null) {
- checkTextState();
- }
-
- try {
- int bytesToCopy = Math.min(_charBufferLength, length);
- System.arraycopy(_characters, _charactersOffset + sourceStart,
- target, targetStart, bytesToCopy);
- return bytesToCopy;
- } catch (IndexOutOfBoundsException e) {
- throw new XMLStreamException(e);
- }
- }
-
- protected final void checkTextState() {
- if (_algorithmData == null) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.InvalidStateForText"));
- }
-
- try {
- convertEncodingAlgorithmDataToCharacters();
- } catch (Exception e) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.InvalidStateForText"));
- }
- }
-
- public final String getEncoding() {
- return _characterEncodingScheme;
- }
-
- public final boolean hasText() {
- return (_characters != null);
- }
-
- public final Location getLocation() {
- //location should be created in next()
- //returns a nil location for now
- return EventLocation.getNilLocation();
- }
-
- public final QName getName() {
- if (_eventType == START_ELEMENT || _eventType == END_ELEMENT) {
- return _qualifiedName.getQName();
- } else {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetName"));
- }
- }
-
- public final String getLocalName() {
- if (_eventType == START_ELEMENT || _eventType == END_ELEMENT) {
- return _qualifiedName.localName;
- } else {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetLocalName"));
- }
- }
-
- public final boolean hasName() {
- return (_eventType == START_ELEMENT || _eventType == END_ELEMENT);
- }
-
- public final String getNamespaceURI() {
- if (_eventType == START_ELEMENT || _eventType == END_ELEMENT) {
- return _qualifiedName.namespaceName;
- } else {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetNamespaceURI"));
- }
- }
-
- public final String getPrefix() {
- if (_eventType == START_ELEMENT || _eventType == END_ELEMENT) {
- return _qualifiedName.prefix;
- } else {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetPrefix"));
- }
- }
-
- public final String getVersion() {
- return null;
- }
-
- public final boolean isStandalone() {
- return false;
- }
-
- public final boolean standaloneSet() {
- return false;
- }
-
- public final String getCharacterEncodingScheme() {
- return null;
- }
-
- public final String getPITarget() {
- if (_eventType != PROCESSING_INSTRUCTION) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetPITarget"));
- }
-
- return _piTarget;
- }
-
- public final String getPIData() {
- if (_eventType != PROCESSING_INSTRUCTION) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetPIData"));
- }
-
- return _piData;
- }
-
-
-
-
- public final String getNameString() {
- if (_eventType == START_ELEMENT || _eventType == END_ELEMENT) {
- return _qualifiedName.getQNameString();
- } else {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetName"));
- }
- }
-
- public final String getAttributeNameString(int index) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.invalidCallingGetAttributeValue"));
- }
- return _attributes.getQualifiedName(index).getQNameString();
- }
-
-
- public final String getTextAlgorithmURI() {
- return _algorithmURI;
- }
-
- public final int getTextAlgorithmIndex() {
- return _algorithmId;
- }
-
- public final boolean hasTextAlgorithmBytes() {
- return _algorithmData != null;
- }
-
-
- /**
- * Returns the byte[], which represents text algorithms.
- * @deprecated was deprecated due to security reasons. Now the method return cloned byte[].
- *
- * @return
- */
- public final byte[] getTextAlgorithmBytes() {
- // Do not return the actual _algorithmData due to security reasons
-// return _algorithmData;
- if (_algorithmData == null) {
- return null;
- }
-
- final byte[] algorithmData = new byte[_algorithmData.length];
- System.arraycopy(_algorithmData, 0, algorithmData, 0, _algorithmData.length);
- return algorithmData;
- }
-
- public final byte[] getTextAlgorithmBytesClone() {
- if (_algorithmData == null) {
- return null;
- }
-
- byte[] algorithmData = new byte[_algorithmDataLength];
- System.arraycopy(_algorithmData, _algorithmDataOffset, algorithmData, 0, _algorithmDataLength);
- return algorithmData;
- }
-
- public final int getTextAlgorithmStart() {
- return _algorithmDataOffset;
- }
-
- public final int getTextAlgorithmLength() {
- return _algorithmDataLength;
- }
-
- public final int getTextAlgorithmBytes(int sourceStart, byte[] target,
- int targetStart, int length) throws XMLStreamException {
- try {
- System.arraycopy(_algorithmData, sourceStart, target,
- targetStart, length);
- return length;
- } catch (IndexOutOfBoundsException e) {
- throw new XMLStreamException(e);
- }
- }
-
- // FastInfosetStreamReader impl
-
- public final int peekNext() throws XMLStreamException {
- try {
- switch(DecoderStateTables.EII(peek(this))) {
- case DecoderStateTables.EII_NO_AIIS_INDEX_SMALL:
- case DecoderStateTables.EII_AIIS_INDEX_SMALL:
- case DecoderStateTables.EII_INDEX_MEDIUM:
- case DecoderStateTables.EII_INDEX_LARGE:
- case DecoderStateTables.EII_LITERAL:
- case DecoderStateTables.EII_NAMESPACES:
- return START_ELEMENT;
- case DecoderStateTables.CII_UTF8_SMALL_LENGTH:
- case DecoderStateTables.CII_UTF8_MEDIUM_LENGTH:
- case DecoderStateTables.CII_UTF8_LARGE_LENGTH:
- case DecoderStateTables.CII_UTF16_SMALL_LENGTH:
- case DecoderStateTables.CII_UTF16_MEDIUM_LENGTH:
- case DecoderStateTables.CII_UTF16_LARGE_LENGTH:
- case DecoderStateTables.CII_RA:
- case DecoderStateTables.CII_EA:
- case DecoderStateTables.CII_INDEX_SMALL:
- case DecoderStateTables.CII_INDEX_MEDIUM:
- case DecoderStateTables.CII_INDEX_LARGE:
- case DecoderStateTables.CII_INDEX_LARGE_LARGE:
- return CHARACTERS;
- case DecoderStateTables.COMMENT_II:
- return COMMENT;
- case DecoderStateTables.PROCESSING_INSTRUCTION_II:
- return PROCESSING_INSTRUCTION;
- case DecoderStateTables.UNEXPANDED_ENTITY_REFERENCE_II:
- return ENTITY_REFERENCE;
- case DecoderStateTables.TERMINATOR_DOUBLE:
- case DecoderStateTables.TERMINATOR_SINGLE:
- return (_stackCount != -1) ? END_ELEMENT : END_DOCUMENT;
- default:
- throw new FastInfosetException(
- CommonResourceBundle.getInstance().getString("message.IllegalStateDecodingEII"));
- }
- } catch (IOException e) {
- throw new XMLStreamException(e);
- } catch (FastInfosetException e) {
- throw new XMLStreamException(e);
- }
- }
-
- public void onBeforeOctetBufferOverwrite() {
- if (_algorithmData != null) {
- _algorithmData = getTextAlgorithmBytesClone();
- _algorithmDataOffset = 0;
- _isAlgorithmDataCloned = true;
- }
- }
-
- // Faster access methods without checks
-
- public final int accessNamespaceCount() {
- return (_currentNamespaceAIIsEnd > 0) ? (_currentNamespaceAIIsEnd - _currentNamespaceAIIsStart) : 0;
- }
-
- public final String accessLocalName() {
- return _qualifiedName.localName;
- }
-
- public final String accessNamespaceURI() {
- return _qualifiedName.namespaceName;
- }
-
- public final String accessPrefix() {
- return _qualifiedName.prefix;
- }
-
- public final char[] accessTextCharacters() {
- if (_characters == null) return null;
-
- // we return a cloned version of _characters
- final char[] clonedCharacters = new char[_characters.length];
- System.arraycopy(_characters, 0, clonedCharacters, 0, _characters.length);
- return clonedCharacters;
- }
-
- public final int accessTextStart() {
- return _charactersOffset;
- }
-
- public final int accessTextLength() {
- return _charBufferLength;
- }
-
- //
-
- protected final void processDII() throws FastInfosetException, IOException {
- final int b = read();
- if (b > 0) {
- processDIIOptionalProperties(b);
- }
- }
-
- protected final void processDIIOptionalProperties(int b) throws FastInfosetException, IOException {
- // Optimize for the most common case
- if (b == EncodingConstants.DOCUMENT_INITIAL_VOCABULARY_FLAG) {
- decodeInitialVocabulary();
- return;
- }
-
- if ((b & EncodingConstants.DOCUMENT_ADDITIONAL_DATA_FLAG) > 0) {
- decodeAdditionalData();
- /*
- * TODO
- * how to report the additional data?
- */
- }
-
- if ((b & EncodingConstants.DOCUMENT_INITIAL_VOCABULARY_FLAG) > 0) {
- decodeInitialVocabulary();
- }
-
- if ((b & EncodingConstants.DOCUMENT_NOTATIONS_FLAG) > 0) {
- decodeNotations();
- /*
- try {
- _dtdHandler.notationDecl(name, public_identifier, system_identifier);
- } catch (SAXException e) {
- throw new IOException("NotationsDeclarationII");
- }
- */
- }
-
- if ((b & EncodingConstants.DOCUMENT_UNPARSED_ENTITIES_FLAG) > 0) {
- decodeUnparsedEntities();
- /*
- try {
- _dtdHandler.unparsedEntityDecl(name, public_identifier, system_identifier, notation_name);
- } catch (SAXException e) {
- throw new IOException("UnparsedEntitiesII");
- }
- */
- }
-
- if ((b & EncodingConstants.DOCUMENT_CHARACTER_ENCODING_SCHEME) > 0) {
- _characterEncodingScheme = decodeCharacterEncodingScheme();
- }
-
- if ((b & EncodingConstants.DOCUMENT_STANDALONE_FLAG) > 0) {
- boolean standalone = (read() > 0) ? true : false ;
- /*
- * TODO
- * how to report the standalone flag?
- */
- }
-
- if ((b & EncodingConstants.DOCUMENT_VERSION_FLAG) > 0) {
- decodeVersion();
- /*
- * TODO
- * how to report the standalone flag?
- */
- }
- }
-
-
- protected final void resizeNamespaceAIIs() {
- final String[] namespaceAIIsPrefix = new String[_namespaceAIIsIndex * 2];
- System.arraycopy(_namespaceAIIsPrefix, 0, namespaceAIIsPrefix, 0, _namespaceAIIsIndex);
- _namespaceAIIsPrefix = namespaceAIIsPrefix;
-
- final String[] namespaceAIIsNamespaceName = new String[_namespaceAIIsIndex * 2];
- System.arraycopy(_namespaceAIIsNamespaceName, 0, namespaceAIIsNamespaceName, 0, _namespaceAIIsIndex);
- _namespaceAIIsNamespaceName = namespaceAIIsNamespaceName;
-
- final int[] namespaceAIIsPrefixIndex = new int[_namespaceAIIsIndex * 2];
- System.arraycopy(_namespaceAIIsPrefixIndex, 0, namespaceAIIsPrefixIndex, 0, _namespaceAIIsIndex);
- _namespaceAIIsPrefixIndex = namespaceAIIsPrefixIndex;
- }
-
- protected final void processEIIWithNamespaces(boolean hasAttributes) throws FastInfosetException, IOException {
- if (++_prefixTable._declarationId == Integer.MAX_VALUE) {
- _prefixTable.clearDeclarationIds();
- }
-
- _currentNamespaceAIIsStart = _namespaceAIIsIndex;
- String prefix = "", namespaceName = "";
- int b = read();
- while ((b & EncodingConstants.NAMESPACE_ATTRIBUTE_MASK) == EncodingConstants.NAMESPACE_ATTRIBUTE) {
- if (_namespaceAIIsIndex == _namespaceAIIsPrefix.length) {
- resizeNamespaceAIIs();
- }
-
- switch (b & EncodingConstants.NAMESPACE_ATTRIBUTE_PREFIX_NAME_MASK) {
- // no prefix, no namespace
- // Undeclaration of default namespace
- case 0:
- prefix = namespaceName =
- _namespaceAIIsPrefix[_namespaceAIIsIndex] =
- _namespaceAIIsNamespaceName[_namespaceAIIsIndex] = "";
-
- _namespaceNameIndex = _prefixIndex = _namespaceAIIsPrefixIndex[_namespaceAIIsIndex++] = -1;
- break;
- // no prefix, namespace
- // Declaration of default namespace
- case 1:
- prefix = _namespaceAIIsPrefix[_namespaceAIIsIndex] = "";
- namespaceName = _namespaceAIIsNamespaceName[_namespaceAIIsIndex] =
- decodeIdentifyingNonEmptyStringOnFirstBitAsNamespaceName(false);
-
- _prefixIndex = _namespaceAIIsPrefixIndex[_namespaceAIIsIndex++] = -1;
- break;
- // prefix, no namespace
- // Undeclaration of namespace
- case 2:
- prefix = _namespaceAIIsPrefix[_namespaceAIIsIndex] =
- decodeIdentifyingNonEmptyStringOnFirstBitAsPrefix(false);
- namespaceName = _namespaceAIIsNamespaceName[_namespaceAIIsIndex] = "";
-
- _namespaceNameIndex = -1;
- _namespaceAIIsPrefixIndex[_namespaceAIIsIndex++] = _prefixIndex;
- break;
- // prefix, namespace
- // Declaration of prefixed namespace
- case 3:
- prefix = _namespaceAIIsPrefix[_namespaceAIIsIndex] =
- decodeIdentifyingNonEmptyStringOnFirstBitAsPrefix(true);
- namespaceName = _namespaceAIIsNamespaceName[_namespaceAIIsIndex] =
- decodeIdentifyingNonEmptyStringOnFirstBitAsNamespaceName(true);
-
- _namespaceAIIsPrefixIndex[_namespaceAIIsIndex++] = _prefixIndex;
- break;
- }
-
- // Push namespace declarations onto the stack
- _prefixTable.pushScopeWithPrefixEntry(prefix, namespaceName, _prefixIndex, _namespaceNameIndex);
-
- b = read();
- }
- if (b != EncodingConstants.TERMINATOR) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.EIInamespaceNameNotTerminatedCorrectly"));
- }
- _currentNamespaceAIIsEnd = _namespaceAIIsIndex;
-
- b = read();
- switch(DecoderStateTables.EII(b)) {
- case DecoderStateTables.EII_NO_AIIS_INDEX_SMALL:
- processEII(_elementNameTable._array[b], hasAttributes);
- break;
- case DecoderStateTables.EII_INDEX_MEDIUM:
- processEII(processEIIIndexMedium(b), hasAttributes);
- break;
- case DecoderStateTables.EII_INDEX_LARGE:
- processEII(processEIIIndexLarge(b), hasAttributes);
- break;
- case DecoderStateTables.EII_LITERAL:
- {
- final QualifiedName qn = processLiteralQualifiedName(
- b & EncodingConstants.LITERAL_QNAME_PREFIX_NAMESPACE_NAME_MASK,
- _elementNameTable.getNext());
- _elementNameTable.add(qn);
- processEII(qn, hasAttributes);
- break;
- }
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.IllegalStateDecodingEIIAfterAIIs"));
- }
- }
-
- protected final void processEII(QualifiedName name, boolean hasAttributes) throws FastInfosetException, IOException {
- if (_prefixTable._currentInScope[name.prefixIndex] != name.namespaceNameIndex) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.qnameOfEIINotInScope"));
- }
-
- _eventType = START_ELEMENT;
- _qualifiedName = name;
-
- if (_clearAttributes) {
- _attributes.clear();
- _clearAttributes = false;
- }
-
- if (hasAttributes) {
- processAIIs();
- }
-
- // Push element holder onto the stack
- _stackCount++;
- if (_stackCount == _qNameStack.length) {
- QualifiedName[] qNameStack = new QualifiedName[_qNameStack.length * 2];
- System.arraycopy(_qNameStack, 0, qNameStack, 0, _qNameStack.length);
- _qNameStack = qNameStack;
-
- int[] namespaceAIIsStartStack = new int[_namespaceAIIsStartStack.length * 2];
- System.arraycopy(_namespaceAIIsStartStack, 0, namespaceAIIsStartStack, 0, _namespaceAIIsStartStack.length);
- _namespaceAIIsStartStack = namespaceAIIsStartStack;
-
- int[] namespaceAIIsEndStack = new int[_namespaceAIIsEndStack.length * 2];
- System.arraycopy(_namespaceAIIsEndStack, 0, namespaceAIIsEndStack, 0, _namespaceAIIsEndStack.length);
- _namespaceAIIsEndStack = namespaceAIIsEndStack;
- }
- _qNameStack[_stackCount] = _qualifiedName;
- _namespaceAIIsStartStack[_stackCount] = _currentNamespaceAIIsStart;
- _namespaceAIIsEndStack[_stackCount] = _currentNamespaceAIIsEnd;
- }
-
- protected final void processAIIs() throws FastInfosetException, IOException {
- QualifiedName name;
- int b;
- String value;
-
- if (++_duplicateAttributeVerifier._currentIteration == Integer.MAX_VALUE) {
- _duplicateAttributeVerifier.clear();
- }
-
- _clearAttributes = true;
- boolean terminate = false;
- do {
- // AII qualified name
- b = read();
- switch (DecoderStateTables.AII(b)) {
- case DecoderStateTables.AII_INDEX_SMALL:
- name = _attributeNameTable._array[b];
- break;
- case DecoderStateTables.AII_INDEX_MEDIUM:
- {
- final int i = (((b & EncodingConstants.INTEGER_2ND_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
- name = _attributeNameTable._array[i];
- break;
- }
- case DecoderStateTables.AII_INDEX_LARGE:
- {
- final int i = (((b & EncodingConstants.INTEGER_2ND_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
- name = _attributeNameTable._array[i];
- break;
- }
- case DecoderStateTables.AII_LITERAL:
- name = processLiteralQualifiedName(
- b & EncodingConstants.LITERAL_QNAME_PREFIX_NAMESPACE_NAME_MASK,
- _attributeNameTable.getNext());
- name.createAttributeValues(DuplicateAttributeVerifier.MAP_SIZE);
- _attributeNameTable.add(name);
- break;
- case DecoderStateTables.AII_TERMINATOR_DOUBLE:
- _internalState = INTERNAL_STATE_START_ELEMENT_TERMINATE;
- case DecoderStateTables.AII_TERMINATOR_SINGLE:
- terminate = true;
- // AIIs have finished break out of loop
- continue;
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingAIIs"));
- }
-
- // [normalized value] of AII
-
- if (name.prefixIndex > 0 && _prefixTable._currentInScope[name.prefixIndex] != name.namespaceNameIndex) {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.AIIqNameNotInScope"));
- }
-
- _duplicateAttributeVerifier.checkForDuplicateAttribute(name.attributeHash, name.attributeId);
-
- b = read();
- switch(DecoderStateTables.NISTRING(b)) {
- case DecoderStateTables.NISTRING_UTF8_SMALL_LENGTH:
- _octetBufferLength = (b & EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_MASK) + 1;
- value = decodeUtf8StringAsString();
- if ((b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0) {
- _attributeValueTable.add(value);
- }
-
- _attributes.addAttribute(name, value);
- break;
- case DecoderStateTables.NISTRING_UTF8_MEDIUM_LENGTH:
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_LIMIT;
- value = decodeUtf8StringAsString();
- if ((b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0) {
- _attributeValueTable.add(value);
- }
-
- _attributes.addAttribute(name, value);
- break;
- case DecoderStateTables.NISTRING_UTF8_LARGE_LENGTH:
- _octetBufferLength = ((read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_LIMIT;
- value = decodeUtf8StringAsString();
- if ((b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0) {
- _attributeValueTable.add(value);
- }
-
- _attributes.addAttribute(name, value);
- break;
- case DecoderStateTables.NISTRING_UTF16_SMALL_LENGTH:
- _octetBufferLength = (b & EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_MASK) + 1;
- value = decodeUtf16StringAsString();
- if ((b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0) {
- _attributeValueTable.add(value);
- }
-
- _attributes.addAttribute(name, value);
- break;
- case DecoderStateTables.NISTRING_UTF16_MEDIUM_LENGTH:
- _octetBufferLength = read() + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_SMALL_LIMIT;
- value = decodeUtf16StringAsString();
- if ((b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0) {
- _attributeValueTable.add(value);
- }
-
- _attributes.addAttribute(name, value);
- break;
- case DecoderStateTables.NISTRING_UTF16_LARGE_LENGTH:
- _octetBufferLength = ((read() << 24) |
- (read() << 16) |
- (read() << 8) |
- read())
- + EncodingConstants.OCTET_STRING_LENGTH_5TH_BIT_MEDIUM_LIMIT;
- value = decodeUtf16StringAsString();
- if ((b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0) {
- _attributeValueTable.add(value);
- }
-
- _attributes.addAttribute(name, value);
- break;
- case DecoderStateTables.NISTRING_RA:
- {
- final boolean addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- // Decode resitricted alphabet integer
- _identifier = (b & 0x0F) << 4;
- b = read();
- _identifier |= (b & 0xF0) >> 4;
-
- decodeOctetsOnFifthBitOfNonIdentifyingStringOnFirstBit(b);
-
- value = decodeRestrictedAlphabetAsString();
- if (addToTable) {
- _attributeValueTable.add(value);
- }
-
- _attributes.addAttribute(name, value);
- break;
- }
- case DecoderStateTables.NISTRING_EA:
- {
- final boolean addToTable = (b & EncodingConstants.NISTRING_ADD_TO_TABLE_FLAG) > 0;
- // Decode encoding algorithm integer
- _identifier = (b & 0x0F) << 4;
- b = read();
- _identifier |= (b & 0xF0) >> 4;
-
- decodeOctetsOnFifthBitOfNonIdentifyingStringOnFirstBit(b);
- processAIIEncodingAlgorithm(name, addToTable);
- break;
- }
- case DecoderStateTables.NISTRING_INDEX_SMALL:
- _attributes.addAttribute(name,
- _attributeValueTable._array[b & EncodingConstants.INTEGER_2ND_BIT_SMALL_MASK]);
- break;
- case DecoderStateTables.NISTRING_INDEX_MEDIUM:
- {
- final int index = (((b & EncodingConstants.INTEGER_2ND_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_SMALL_LIMIT;
-
- _attributes.addAttribute(name,
- _attributeValueTable._array[index]);
- break;
- }
- case DecoderStateTables.NISTRING_INDEX_LARGE:
- {
- final int index = (((b & EncodingConstants.INTEGER_2ND_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_2ND_BIT_MEDIUM_LIMIT;
-
- _attributes.addAttribute(name,
- _attributeValueTable._array[index]);
- break;
- }
- case DecoderStateTables.NISTRING_EMPTY:
- _attributes.addAttribute(name, "");
- break;
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingAIIValue"));
- }
-
- } while (!terminate);
-
- // Reset duplication attribute verfifier
- _duplicateAttributeVerifier._poolCurrent = _duplicateAttributeVerifier._poolHead;
- }
-
- protected final QualifiedName processEIIIndexMedium(int b) throws FastInfosetException, IOException {
- final int i = (((b & EncodingConstants.INTEGER_3RD_BIT_MEDIUM_MASK) << 8) | read())
- + EncodingConstants.INTEGER_3RD_BIT_SMALL_LIMIT;
- return _elementNameTable._array[i];
- }
-
- protected final QualifiedName processEIIIndexLarge(int b) throws FastInfosetException, IOException {
- int i;
- if ((b & EncodingConstants.INTEGER_3RD_BIT_LARGE_LARGE_FLAG) == 0x20) {
- // EII large index
- i = (((b & EncodingConstants.INTEGER_3RD_BIT_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_3RD_BIT_MEDIUM_LIMIT;
- } else {
- // EII large large index
- i = (((read() & EncodingConstants.INTEGER_3RD_BIT_LARGE_LARGE_MASK) << 16) | (read() << 8) | read())
- + EncodingConstants.INTEGER_3RD_BIT_LARGE_LIMIT;
- }
- return _elementNameTable._array[i];
- }
-
- protected final QualifiedName processLiteralQualifiedName(int state, QualifiedName q)
- throws FastInfosetException, IOException {
- if (q == null) q = new QualifiedName();
-
- switch (state) {
- // no prefix, no namespace
- case 0:
- return q.set(
- "",
- "",
- decodeIdentifyingNonEmptyStringOnFirstBit(_v.localName),
- "",
- 0,
- -1,
- -1,
- _identifier);
- // no prefix, namespace
- case 1:
- return q.set(
- "",
- decodeIdentifyingNonEmptyStringIndexOnFirstBitAsNamespaceName(false),
- decodeIdentifyingNonEmptyStringOnFirstBit(_v.localName),
- "",
- 0,
- -1,
- _namespaceNameIndex,
- _identifier);
- // prefix, no namespace
- case 2:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.qNameMissingNamespaceName"));
- // prefix, namespace
- case 3:
- return q.set(
- decodeIdentifyingNonEmptyStringIndexOnFirstBitAsPrefix(true),
- decodeIdentifyingNonEmptyStringIndexOnFirstBitAsNamespaceName(true),
- decodeIdentifyingNonEmptyStringOnFirstBit(_v.localName),
- "",
- 0,
- _prefixIndex,
- _namespaceNameIndex,
- _identifier);
- default:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.decodingEII"));
- }
- }
-
- protected final void processCommentII() throws FastInfosetException, IOException {
- _eventType = COMMENT;
-
- switch(decodeNonIdentifyingStringOnFirstBit()) {
- case NISTRING_STRING:
- if (_addToTable) {
- _v.otherString.add(new CharArray(_charBuffer, 0, _charBufferLength, true));
- }
-
- _characters = _charBuffer;
- _charactersOffset = 0;
- break;
- case NISTRING_ENCODING_ALGORITHM:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.commentIIAlgorithmNotSupported"));
- case NISTRING_INDEX:
- final CharArray ca = _v.otherString.get(_integer);
-
- _characters = ca.ch;
- _charactersOffset = ca.start;
- _charBufferLength = ca.length;
- break;
- case NISTRING_EMPTY_STRING:
- _characters = _charBuffer;
- _charactersOffset = 0;
- _charBufferLength = 0;
- break;
- }
- }
-
- protected final void processProcessingII() throws FastInfosetException, IOException {
- _eventType = PROCESSING_INSTRUCTION;
-
- _piTarget = decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherNCName);
-
- switch(decodeNonIdentifyingStringOnFirstBit()) {
- case NISTRING_STRING:
- _piData = new String(_charBuffer, 0, _charBufferLength);
- if (_addToTable) {
- _v.otherString.add(new CharArrayString(_piData));
- }
- break;
- case NISTRING_ENCODING_ALGORITHM:
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.processingIIWithEncodingAlgorithm"));
- case NISTRING_INDEX:
- _piData = _v.otherString.get(_integer).toString();
- break;
- case NISTRING_EMPTY_STRING:
- _piData = "";
- break;
- }
- }
-
- protected final void processUnexpandedEntityReference(final int b) throws FastInfosetException, IOException {
- _eventType = ENTITY_REFERENCE;
-
- /*
- * TODO
- * How does StAX report such events?
- */
- String entity_reference_name = decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherNCName);
-
- String system_identifier = ((b & EncodingConstants.UNEXPANDED_ENTITY_SYSTEM_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : "";
- String public_identifier = ((b & EncodingConstants.UNEXPANDED_ENTITY_PUBLIC_IDENTIFIER_FLAG) > 0)
- ? decodeIdentifyingNonEmptyStringOnFirstBit(_v.otherURI) : "";
-
- if (logger.isLoggable(Level.FINEST)) {
- logger.log(Level.FINEST, "processUnexpandedEntityReference: entity_reference_name={0} system_identifier={1}public_identifier={2}",
- new Object[]{entity_reference_name, system_identifier, public_identifier});
- }
- }
-
- protected final void processCIIEncodingAlgorithm(boolean addToTable) throws FastInfosetException, IOException {
- _algorithmData = _octetBuffer;
- _algorithmDataOffset = _octetBufferStart;
- _algorithmDataLength = _octetBufferLength;
- _isAlgorithmDataCloned = false;
-
- if (_algorithmId >= EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START) {
- _algorithmURI = _v.encodingAlgorithm.get(_algorithmId - EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START);
- if (_algorithmURI == null) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.URINotPresent", new Object[]{Integer.valueOf(_identifier)}));
- }
- } else if (_algorithmId > EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END) {
- // Reserved built-in algorithms for future use
- // TODO should use sax property to decide if event will be
- // reported, allows for support through handler if required.
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.identifiers10to31Reserved"));
- }
-
- if (addToTable) {
- convertEncodingAlgorithmDataToCharacters();
- _characterContentChunkTable.add(_characters, _characters.length);
- }
- }
-
- protected final void processAIIEncodingAlgorithm(QualifiedName name, boolean addToTable) throws FastInfosetException, IOException {
- EncodingAlgorithm ea = null;
- String URI = null;
- if (_identifier >= EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START) {
- URI = _v.encodingAlgorithm.get(_identifier - EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START);
- if (URI == null) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.URINotPresent", new Object[]{Integer.valueOf(_identifier)}));
- } else if (_registeredEncodingAlgorithms != null) {
- ea = (EncodingAlgorithm)_registeredEncodingAlgorithms.get(URI);
- }
- } else if (_identifier >= EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END) {
- if (_identifier == EncodingAlgorithmIndexes.CDATA) {
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.CDATAAlgorithmNotSupported"));
- }
-
- // Reserved built-in algorithms for future use
- // TODO should use sax property to decide if event will be
- // reported, allows for support through handler if required.
- throw new EncodingAlgorithmException(CommonResourceBundle.getInstance().getString("message.identifiers10to31Reserved"));
- } else {
- ea = BuiltInEncodingAlgorithmFactory.getAlgorithm(_identifier);
- }
-
- Object algorithmData;
-
- if (ea != null) {
- algorithmData = ea.decodeFromBytes(_octetBuffer, _octetBufferStart,
- _octetBufferLength);
- } else {
- final byte[] data = new byte[_octetBufferLength];
- System.arraycopy(_octetBuffer, _octetBufferStart, data, 0,
- _octetBufferLength);
- algorithmData = data;
- }
-
- _attributes.addAttributeWithAlgorithmData(name, URI, _identifier,
- algorithmData);
- if (addToTable) {
- _attributeValueTable.add(_attributes.getValue(_attributes.getIndex(name.qName)));
- }
- }
-
- protected final void convertEncodingAlgorithmDataToCharacters() throws FastInfosetException, IOException {
- StringBuffer buffer = new StringBuffer();
- if (_algorithmId == EncodingAlgorithmIndexes.BASE64) {
- convertBase64AlorithmDataToCharacters(buffer);
- } else if (_algorithmId < EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END) {
- Object array = BuiltInEncodingAlgorithmFactory.getAlgorithm(_algorithmId).
- decodeFromBytes(_algorithmData, _algorithmDataOffset, _algorithmDataLength);
- BuiltInEncodingAlgorithmFactory.getAlgorithm(_algorithmId).convertToCharacters(array, buffer);
- } else if (_algorithmId == EncodingAlgorithmIndexes.CDATA) {
- _octetBufferOffset -= _octetBufferLength;
- decodeUtf8StringIntoCharBuffer();
-
- _characters = _charBuffer;
- _charactersOffset = 0;
- return;
- } else if (_algorithmId >= EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START) {
- final EncodingAlgorithm ea = (EncodingAlgorithm)_registeredEncodingAlgorithms.get(_algorithmURI);
- if (ea != null) {
- final Object data = ea.decodeFromBytes(_octetBuffer, _octetBufferStart, _octetBufferLength);
- ea.convertToCharacters(data, buffer);
- } else {
- throw new EncodingAlgorithmException(
- CommonResourceBundle.getInstance().getString("message.algorithmDataCannotBeReported"));
- }
- }
-
- _characters = new char[buffer.length()];
- buffer.getChars(0, buffer.length(), _characters, 0);
- _charactersOffset = 0;
- _charBufferLength = _characters.length;
- }
-
- /* If base64 data comes is chunks, bytes, which were cut to align 3,
- * from prev. base64 chunk are stored in this buffer */
- private byte[] base64TaleBytes = new byte[3];
- private int base64TaleLength;
- /*
- * Method converts _algorithmData to base64 encoded String
- * Counts with base64 data coming in chunks, aligning input chunks by 3,
- * avoiding double cloning, happening after possible peek, peek2 cloning by Base64 algorithm
- */
- protected void convertBase64AlorithmDataToCharacters(StringBuffer buffer) throws EncodingAlgorithmException, IOException {
- // How much new came data was serialized with prev. tale
- int afterTaleOffset = 0;
-
- if (base64TaleLength > 0) {
- // Serialize tale left from prev. chunk
- int bytesToCopy = Math.min(3 - base64TaleLength, _algorithmDataLength);
- System.arraycopy(_algorithmData, _algorithmDataOffset, base64TaleBytes, base64TaleLength, bytesToCopy);
- if (base64TaleLength + bytesToCopy == 3) {
- base64DecodeWithCloning(buffer, base64TaleBytes, 0, 3);
- } else if (!isBase64Follows()) {
- // End of text was read to temp array
- base64DecodeWithCloning(buffer, base64TaleBytes, 0, base64TaleLength + bytesToCopy);
- return;
- } else {
- // If the end of chunk fit to tmp array, but next chunk is expected
- base64TaleLength += bytesToCopy;
- return;
- }
-
- afterTaleOffset = bytesToCopy;
- base64TaleLength = 0;
- }
-
- int taleBytesRemaining = isBase64Follows() ? (_algorithmDataLength - afterTaleOffset) % 3 : 0;
-
- if (_isAlgorithmDataCloned) {
- base64DecodeWithoutCloning(buffer, _algorithmData, _algorithmDataOffset + afterTaleOffset,
- _algorithmDataLength - afterTaleOffset - taleBytesRemaining);
- } else {
- base64DecodeWithCloning(buffer, _algorithmData, _algorithmDataOffset + afterTaleOffset,
- _algorithmDataLength - afterTaleOffset - taleBytesRemaining);
- }
-
- if (taleBytesRemaining > 0) {
- System.arraycopy(_algorithmData, _algorithmDataOffset + _algorithmDataLength - taleBytesRemaining,
- base64TaleBytes, 0, taleBytesRemaining);
- base64TaleLength = taleBytesRemaining;
- }
- }
-
- /*
- * Encodes incoming data to Base64 string.
- * Method performs additional input data cloning
- */
- private void base64DecodeWithCloning(StringBuffer dstBuffer, byte[] data, int offset, int length) throws EncodingAlgorithmException {
- Object array = BuiltInEncodingAlgorithmFactory.base64EncodingAlgorithm.
- decodeFromBytes(data, offset, length);
- BuiltInEncodingAlgorithmFactory.base64EncodingAlgorithm.convertToCharacters(array, dstBuffer);
- }
-
- /*
- * Encodes incoming data to Base64 string.
- * Avoids input data cloning
- */
- private void base64DecodeWithoutCloning(StringBuffer dstBuffer, byte[] data, int offset, int length) throws EncodingAlgorithmException {
- BuiltInEncodingAlgorithmFactory.base64EncodingAlgorithm.convertToCharacters(data, offset, length, dstBuffer);
- }
-
-
- /*
- * Looks ahead in InputStream, whether next data is Base64 chunk
- */
- public boolean isBase64Follows() throws IOException {
- // Process information item
- int b = peek(this);
- switch (DecoderStateTables.EII(b)) {
- case DecoderStateTables.CII_EA:
- int algorithmId = (b & 0x02) << 6;
- int b2 = peek2(this);
- algorithmId |= (b2 & 0xFC) >> 2;
-
- return algorithmId == EncodingAlgorithmIndexes.BASE64;
- default:
- return false;
- }
- }
-
- protected class NamespaceContextImpl implements NamespaceContext {
- public final String getNamespaceURI(String prefix) {
- return _prefixTable.getNamespaceFromPrefix(prefix);
- }
-
- public final String getPrefix(String namespaceURI) {
- return _prefixTable.getPrefixFromNamespace(namespaceURI);
- }
-
- public final Iterator getPrefixes(String namespaceURI) {
- return _prefixTable.getPrefixesFromNamespace(namespaceURI);
- }
- }
-
- public final String getNamespaceDecl(String prefix) {
- return _prefixTable.getNamespaceFromPrefix(prefix);
- }
-
- public final String getURI(String prefix) {
- return getNamespaceDecl(prefix);
- }
-
- public final Iterator getPrefixes() {
- return _prefixTable.getPrefixes();
- }
-
- public final AttributesHolder getAttributesHolder() {
- return _attributes;
- }
-
- public final void setManager(StAXManager manager) {
- _manager = manager;
- }
-
- final static String getEventTypeString(int eventType) {
- switch (eventType){
- case START_ELEMENT:
- return "START_ELEMENT";
- case END_ELEMENT:
- return "END_ELEMENT";
- case PROCESSING_INSTRUCTION:
- return "PROCESSING_INSTRUCTION";
- case CHARACTERS:
- return "CHARACTERS";
- case COMMENT:
- return "COMMENT";
- case START_DOCUMENT:
- return "START_DOCUMENT";
- case END_DOCUMENT:
- return "END_DOCUMENT";
- case ENTITY_REFERENCE:
- return "ENTITY_REFERENCE";
- case ATTRIBUTE:
- return "ATTRIBUTE";
- case DTD:
- return "DTD";
- case CDATA:
- return "CDATA";
- }
- return "UNKNOWN_EVENT_TYPE";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/StAXDocumentSerializer.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/StAXDocumentSerializer.java
deleted file mode 100644
index bc03d4d6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/StAXDocumentSerializer.java
+++ /dev/null
@@ -1,856 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax;
-
-import com.sun.xml.internal.fastinfoset.Encoder;
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.fastinfoset.util.NamespaceContextImplementation;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.EmptyStackException;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmIndexes;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import com.sun.xml.internal.fastinfoset.util.LocalNameQualifiedNamesMap;
-import com.sun.xml.internal.org.jvnet.fastinfoset.stax.LowLevelFastInfosetStreamWriter;
-
-/**
- * The Fast Infoset StAX serializer.
- * <p>
- * Instantiate this serializer to serialize a fast infoset document in accordance
- * with the StAX API.
- *
- * <p>
- * More than one fast infoset document may be encoded to the
- * {@link java.io.OutputStream}.
- */
-public class StAXDocumentSerializer extends Encoder
- implements XMLStreamWriter, LowLevelFastInfosetStreamWriter {
- protected StAXManager _manager;
-
- protected String _encoding;
- /**
- * Local name of current element.
- */
- protected String _currentLocalName;
-
- /**
- * Namespace of current element.
- */
- protected String _currentUri;
-
- /**
- * Prefix of current element.
- */
- protected String _currentPrefix;
-
- /**
- * This flag indicates when there is a pending start element event.
- */
- protected boolean _inStartElement = false;
-
- /**
- * This flag indicates if the current element is empty.
- */
- protected boolean _isEmptyElement = false;
-
- /**
- * List of attributes qnames and values defined in the current element.
- */
- protected String[] _attributesArray = new String[4 * 16];
- protected int _attributesArrayIndex = 0;
-
- protected boolean[] _nsSupportContextStack = new boolean[32];
- protected int _stackCount = -1;
-
- /**
- * Mapping between uris and prefixes.
- */
- protected NamespaceContextImplementation _nsContext =
- new NamespaceContextImplementation();
-
- /**
- * List of namespaces defined in the current element.
- */
- protected String[] _namespacesArray = new String[2 * 8];
- protected int _namespacesArrayIndex = 0;
-
- public StAXDocumentSerializer() {
- super(true);
- _manager = new StAXManager(StAXManager.CONTEXT_WRITER);
- }
-
- public StAXDocumentSerializer(OutputStream outputStream) {
- super(true);
- setOutputStream(outputStream);
- _manager = new StAXManager(StAXManager.CONTEXT_WRITER);
- }
-
- public StAXDocumentSerializer(OutputStream outputStream, StAXManager manager) {
- super(true);
- setOutputStream(outputStream);
- _manager = manager;
- }
-
- public void reset() {
- super.reset();
-
- _attributesArrayIndex = 0;
- _namespacesArrayIndex = 0;
-
- _nsContext.reset();
- _stackCount = -1;
-
- _currentUri = _currentPrefix = null;
- _currentLocalName = null;
-
- _inStartElement = _isEmptyElement = false;
- }
-
- // -- XMLStreamWriter Interface -------------------------------------------
-
- public void writeStartDocument() throws XMLStreamException {
- writeStartDocument("finf", "1.0");
- }
-
- public void writeStartDocument(String version) throws XMLStreamException {
- writeStartDocument("finf", version);
- }
-
- public void writeStartDocument(String encoding, String version)
- throws XMLStreamException
- {
- reset();
-
- try {
- encodeHeader(false);
- encodeInitialVocabulary();
- } catch (IOException e) {
- throw new XMLStreamException(e);
- }
- }
-
- public void writeEndDocument() throws XMLStreamException {
- try {
-
- // terminate all elements not terminated
- // by writeEndElement
- for(;_stackCount >= 0; _stackCount--) {
- writeEndElement();
- }
-
- encodeDocumentTermination();
- }
- catch (IOException e) {
- throw new XMLStreamException(e);
- }
- }
-
- public void close() throws XMLStreamException {
- reset();
- }
-
- public void flush() throws XMLStreamException {
- try {
- _s.flush();
- }
- catch (IOException e) {
- throw new XMLStreamException(e);
- }
- }
-
- public void writeStartElement(String localName)
- throws XMLStreamException
- {
- // TODO is it necessary for FI to obtain the default namespace in scope?
- writeStartElement("", localName, "");
- }
-
- public void writeStartElement(String namespaceURI, String localName)
- throws XMLStreamException
- {
- writeStartElement("", localName, namespaceURI);
- }
-
- public void writeStartElement(String prefix, String localName,
- String namespaceURI) throws XMLStreamException
- {
- encodeTerminationAndCurrentElement(false);
-
- _inStartElement = true;
- _isEmptyElement = false;
-
- _currentLocalName = localName;
- _currentPrefix = prefix;
- _currentUri = namespaceURI;
-
- _stackCount++;
- if (_stackCount == _nsSupportContextStack.length) {
- boolean[] nsSupportContextStack = new boolean[_stackCount * 2];
- System.arraycopy(_nsSupportContextStack, 0, nsSupportContextStack, 0, _nsSupportContextStack.length);
- _nsSupportContextStack = nsSupportContextStack;
- }
-
- _nsSupportContextStack[_stackCount] = false;
- }
-
- public void writeEmptyElement(String localName)
- throws XMLStreamException
- {
- writeEmptyElement("", localName, "");
- }
-
- public void writeEmptyElement(String namespaceURI, String localName)
- throws XMLStreamException
- {
- writeEmptyElement("", localName, namespaceURI);
- }
-
- public void writeEmptyElement(String prefix, String localName,
- String namespaceURI) throws XMLStreamException
- {
- encodeTerminationAndCurrentElement(false);
-
- _isEmptyElement = _inStartElement = true;
-
- _currentLocalName = localName;
- _currentPrefix = prefix;
- _currentUri = namespaceURI;
-
- _stackCount++;
- if (_stackCount == _nsSupportContextStack.length) {
- boolean[] nsSupportContextStack = new boolean[_stackCount * 2];
- System.arraycopy(_nsSupportContextStack, 0, nsSupportContextStack, 0, _nsSupportContextStack.length);
- _nsSupportContextStack = nsSupportContextStack;
- }
-
- _nsSupportContextStack[_stackCount] = false;
- }
-
- public void writeEndElement() throws XMLStreamException {
- if (_inStartElement) {
- encodeTerminationAndCurrentElement(false);
- }
-
- try {
- encodeElementTermination();
- if (_nsSupportContextStack[_stackCount--] == true) {
- _nsContext.popContext();
- }
- }
- catch (IOException e) {
- throw new XMLStreamException(e);
- }
- catch (EmptyStackException e) {
- throw new XMLStreamException(e);
- }
- }
-
-
- public void writeAttribute(String localName, String value)
- throws XMLStreamException
- {
- writeAttribute("", "", localName, value);
- }
-
- public void writeAttribute(String namespaceURI, String localName,
- String value) throws XMLStreamException
- {
- String prefix = "";
-
- // Find prefix for attribute, ignoring default namespace
- if (namespaceURI.length() > 0) {
- prefix = _nsContext.getNonDefaultPrefix(namespaceURI);
-
- // Undeclared prefix or ignorable default ns?
- if (prefix == null || prefix.length() == 0) {
- // Workaround for BUG in SAX NamespaceSupport helper
- // which incorrectly defines namespace declaration URI
- if (namespaceURI == EncodingConstants.XMLNS_NAMESPACE_NAME ||
- namespaceURI.equals(EncodingConstants.XMLNS_NAMESPACE_NAME)) {
- // TODO
- // Need to check carefully the rule for the writing of
- // namespaces in StAX. Is it safe to ignore such
- // attributes, as declarations will be made using the
- // writeNamespace method
- return;
- }
- throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.URIUnbound", new Object[]{namespaceURI}));
- }
- }
- writeAttribute(prefix, namespaceURI, localName, value);
- }
-
- public void writeAttribute(String prefix, String namespaceURI,
- String localName, String value) throws XMLStreamException
- {
- if (!_inStartElement) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.attributeWritingNotAllowed"));
- }
-
- // TODO
- // Need to check carefully the rule for the writing of
- // namespaces in StAX. Is it safe to ignore such
- // attributes, as declarations will be made using the
- // writeNamespace method
- if (namespaceURI == EncodingConstants.XMLNS_NAMESPACE_NAME ||
- namespaceURI.equals(EncodingConstants.XMLNS_NAMESPACE_NAME)) {
- return;
- }
-
- if (_attributesArrayIndex == _attributesArray.length) {
- final String[] attributesArray = new String[_attributesArrayIndex * 2];
- System.arraycopy(_attributesArray, 0, attributesArray, 0, _attributesArrayIndex);
- _attributesArray = attributesArray;
- }
-
- _attributesArray[_attributesArrayIndex++] = namespaceURI;
- _attributesArray[_attributesArrayIndex++] = prefix;
- _attributesArray[_attributesArrayIndex++] = localName;
- _attributesArray[_attributesArrayIndex++] = value;
- }
-
- public void writeNamespace(String prefix, String namespaceURI)
- throws XMLStreamException
- {
- if (prefix == null || prefix.length() == 0 || prefix.equals(EncodingConstants.XMLNS_NAMESPACE_PREFIX)) {
- writeDefaultNamespace(namespaceURI);
- }
- else {
- if (!_inStartElement) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.attributeWritingNotAllowed"));
- }
-
- if (_namespacesArrayIndex == _namespacesArray.length) {
- final String[] namespacesArray = new String[_namespacesArrayIndex * 2];
- System.arraycopy(_namespacesArray, 0, namespacesArray, 0, _namespacesArrayIndex);
- _namespacesArray = namespacesArray;
- }
-
- _namespacesArray[_namespacesArrayIndex++] = prefix;
- _namespacesArray[_namespacesArrayIndex++] = namespaceURI;
- setPrefix(prefix, namespaceURI);
- }
- }
-
- public void writeDefaultNamespace(String namespaceURI)
- throws XMLStreamException
- {
- if (!_inStartElement) {
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.attributeWritingNotAllowed"));
- }
-
- if (_namespacesArrayIndex == _namespacesArray.length) {
- final String[] namespacesArray = new String[_namespacesArrayIndex * 2];
- System.arraycopy(_namespacesArray, 0, namespacesArray, 0, _namespacesArrayIndex);
- _namespacesArray = namespacesArray;
- }
-
- _namespacesArray[_namespacesArrayIndex++] = "";
- _namespacesArray[_namespacesArrayIndex++] = namespaceURI;
- setPrefix("", namespaceURI);
- }
-
- public void writeComment(String data) throws XMLStreamException {
- try {
- if (getIgnoreComments()) return;
-
- encodeTerminationAndCurrentElement(true);
-
- // TODO: avoid array copy here
- encodeComment(data.toCharArray(), 0, data.length());
- }
- catch (IOException e) {
- throw new XMLStreamException(e);
- }
- }
-
- public void writeProcessingInstruction(String target)
- throws XMLStreamException
- {
- writeProcessingInstruction(target, "");
- }
-
- public void writeProcessingInstruction(String target, String data)
- throws XMLStreamException
- {
- try {
- if (getIgnoreProcesingInstructions()) return;
-
- encodeTerminationAndCurrentElement(true);
-
- encodeProcessingInstruction(target, data);
- }
- catch (IOException e) {
- throw new XMLStreamException(e);
- }
- }
-
- public void writeCData(String text) throws XMLStreamException {
- try {
- final int length = text.length();
- if (length == 0) {
- return;
- } else if (length < _charBuffer.length) {
- if (getIgnoreWhiteSpaceTextContent() &&
- isWhiteSpace(text)) return;
-
- // Warning: this method must be called before any state
- // is modified, such as the _charBuffer contents,
- // so the characters of text cannot be copied to _charBuffer
- // before this call
- encodeTerminationAndCurrentElement(true);
-
- text.getChars(0, length, _charBuffer, 0);
- encodeCIIBuiltInAlgorithmDataAsCDATA(_charBuffer, 0, length);
- } else {
- final char ch[] = text.toCharArray();
- if (getIgnoreWhiteSpaceTextContent() &&
- isWhiteSpace(ch, 0, length)) return;
-
- encodeTerminationAndCurrentElement(true);
-
- encodeCIIBuiltInAlgorithmDataAsCDATA(ch, 0, length);
- }
- } catch (Exception e) {
- throw new XMLStreamException(e);
- }
- }
-
- public void writeDTD(String dtd) throws XMLStreamException {
- throw new UnsupportedOperationException(CommonResourceBundle.getInstance().getString("message.notImplemented"));
- }
-
- public void writeEntityRef(String name) throws XMLStreamException {
- throw new UnsupportedOperationException(CommonResourceBundle.getInstance().getString("message.notImplemented"));
- }
-
- public void writeCharacters(String text) throws XMLStreamException {
- try {
- final int length = text.length();
- if (length == 0) {
- return;
- } else if (length < _charBuffer.length) {
- if (getIgnoreWhiteSpaceTextContent() &&
- isWhiteSpace(text)) return;
-
- // Warning: this method must be called before any state
- // is modified, such as the _charBuffer contents,
- // so the characters of text cannot be copied to _charBuffer
- // before this call
- encodeTerminationAndCurrentElement(true);
-
- text.getChars(0, length, _charBuffer, 0);
- encodeCharacters(_charBuffer, 0, length);
- } else {
- final char ch[] = text.toCharArray();
- if (getIgnoreWhiteSpaceTextContent() &&
- isWhiteSpace(ch, 0, length)) return;
-
- encodeTerminationAndCurrentElement(true);
-
- encodeCharactersNoClone(ch, 0, length);
- }
- }
- catch (IOException e) {
- throw new XMLStreamException(e);
- }
- }
-
- public void writeCharacters(char[] text, int start, int len)
- throws XMLStreamException
- {
- try {
- if (len <= 0) {
- return;
- }
-
- if (getIgnoreWhiteSpaceTextContent() &&
- isWhiteSpace(text, start, len)) return;
-
- encodeTerminationAndCurrentElement(true);
-
- encodeCharacters(text, start, len);
- }
- catch (IOException e) {
- throw new XMLStreamException(e);
- }
- }
-
- public String getPrefix(String uri) throws XMLStreamException {
- return _nsContext.getPrefix(uri);
- }
-
- public void setPrefix(String prefix, String uri)
- throws XMLStreamException
- {
- if (_stackCount > -1 && _nsSupportContextStack[_stackCount] == false) {
- _nsSupportContextStack[_stackCount] = true;
- _nsContext.pushContext();
- }
-
- _nsContext.declarePrefix(prefix, uri);
- }
-
- public void setDefaultNamespace(String uri) throws XMLStreamException {
- setPrefix("", uri);
- }
-
- /**
- * Sets the current namespace context for prefix and uri bindings.
- * This context becomes the root namespace context for writing and
- * will replace the current root namespace context. Subsequent calls
- * to setPrefix and setDefaultNamespace will bind namespaces using
- * the context passed to the method as the root context for resolving
- * namespaces. This method may only be called once at the start of
- * the document. It does not cause the namespaces to be declared.
- * If a namespace URI to prefix mapping is found in the namespace
- * context it is treated as declared and the prefix may be used
- * by the StreamWriter.
- * @param context the namespace context to use for this writer, may not be null
- * @throws XMLStreamException
- */
- public void setNamespaceContext(NamespaceContext context)
- throws XMLStreamException
- {
- throw new UnsupportedOperationException("setNamespaceContext");
- }
-
- public NamespaceContext getNamespaceContext() {
- return _nsContext;
- }
-
- public Object getProperty(java.lang.String name)
- throws IllegalArgumentException
- {
- if (_manager != null) {
- return _manager.getProperty(name);
- }
- return null;
- }
-
- public void setManager(StAXManager manager) {
- _manager = manager;
- }
-
- public void setEncoding(String encoding) {
- _encoding = encoding;
- }
-
-
- public void writeOctets(byte[] b, int start, int len)
- throws XMLStreamException
- {
- try {
- if (len == 0) {
- return;
- }
-
- encodeTerminationAndCurrentElement(true);
-
- encodeCIIOctetAlgorithmData(EncodingAlgorithmIndexes.BASE64, b, start, len);
- }
- catch (IOException e) {
- throw new XMLStreamException(e);
- }
- }
-
- protected void encodeTerminationAndCurrentElement(boolean terminateAfter) throws XMLStreamException {
- try {
- encodeTermination();
-
- if (_inStartElement) {
-
- _b = EncodingConstants.ELEMENT;
- if (_attributesArrayIndex > 0) {
- _b |= EncodingConstants.ELEMENT_ATTRIBUTE_FLAG;
- }
-
- // Encode namespace decls associated with this element
- if (_namespacesArrayIndex > 0) {
- write(_b | EncodingConstants.ELEMENT_NAMESPACES_FLAG);
- for (int i = 0; i < _namespacesArrayIndex;) {
- encodeNamespaceAttribute(_namespacesArray[i++], _namespacesArray[i++]);
- }
- _namespacesArrayIndex = 0;
-
- write(EncodingConstants.TERMINATOR);
-
- _b = 0;
- }
-
- // If element's prefix is empty - apply default scope namespace
- if (_currentPrefix.length() == 0) {
- if (_currentUri.length() == 0) {
- _currentUri = _nsContext.getNamespaceURI("");
- } else {
- String tmpPrefix = getPrefix(_currentUri);
- if (tmpPrefix != null) {
- _currentPrefix = tmpPrefix;
- }
- }
- }
-
- encodeElementQualifiedNameOnThirdBit(_currentUri, _currentPrefix, _currentLocalName);
-
- for (int i = 0; i < _attributesArrayIndex;) {
- encodeAttributeQualifiedNameOnSecondBit(
- _attributesArray[i++], _attributesArray[i++], _attributesArray[i++]);
-
- final String value = _attributesArray[i];
- _attributesArray[i++] = null;
- final boolean addToTable = isAttributeValueLengthMatchesLimit(value.length());
- encodeNonIdentifyingStringOnFirstBit(value, _v.attributeValue, addToTable, false);
-
- _b = EncodingConstants.TERMINATOR;
- _terminate = true;
- }
- _attributesArrayIndex = 0;
- _inStartElement = false;
-
- if (_isEmptyElement) {
- encodeElementTermination();
- if (_nsSupportContextStack[_stackCount--] == true) {
- _nsContext.popContext();
- }
-
- _isEmptyElement = false;
- }
-
- if (terminateAfter) {
- encodeTermination();
- }
- }
- } catch (IOException e) {
- throw new XMLStreamException(e);
- }
- }
-
-
- // LowLevelFastInfosetSerializer
-
- public final void initiateLowLevelWriting() throws XMLStreamException {
- encodeTerminationAndCurrentElement(false);
- }
-
- public final int getNextElementIndex() {
- return _v.elementName.getNextIndex();
- }
-
- public final int getNextAttributeIndex() {
- return _v.attributeName.getNextIndex();
- }
-
- public final int getLocalNameIndex() {
- return _v.localName.getIndex();
- }
-
- public final int getNextLocalNameIndex() {
- return _v.localName.getNextIndex();
- }
-
- public final void writeLowLevelTerminationAndMark() throws IOException {
- encodeTermination();
- mark();
- }
-
- public final void writeLowLevelStartElementIndexed(int type, int index) throws IOException {
- _b = type;
- encodeNonZeroIntegerOnThirdBit(index);
- }
-
- public final boolean writeLowLevelStartElement(int type, String prefix, String localName,
- String namespaceURI) throws IOException {
- final boolean isIndexed = encodeElement(type, namespaceURI, prefix, localName);
-
- if (!isIndexed)
- encodeLiteral(type | EncodingConstants.ELEMENT_LITERAL_QNAME_FLAG,
- namespaceURI, prefix, localName);
-
- return isIndexed;
- }
-
- public final void writeLowLevelStartNamespaces() throws IOException {
- write(EncodingConstants.ELEMENT | EncodingConstants.ELEMENT_NAMESPACES_FLAG);
- }
-
- public final void writeLowLevelNamespace(String prefix, String namespaceName)
- throws IOException {
- encodeNamespaceAttribute(prefix, namespaceName);
- }
-
- public final void writeLowLevelEndNamespaces() throws IOException {
- write(EncodingConstants.TERMINATOR);
- }
-
- public final void writeLowLevelStartAttributes() throws IOException {
- if (hasMark()) {
- _octetBuffer[_markIndex] |= EncodingConstants.ELEMENT_ATTRIBUTE_FLAG;
- resetMark();
- }
- }
-
- public final void writeLowLevelAttributeIndexed(int index) throws IOException {
- encodeNonZeroIntegerOnSecondBitFirstBitZero(index);
- }
-
- public final boolean writeLowLevelAttribute(String prefix, String namespaceURI, String localName) throws IOException {
- final boolean isIndexed = encodeAttribute(namespaceURI, prefix, localName);
-
- if (!isIndexed)
- encodeLiteral(EncodingConstants.ATTRIBUTE_LITERAL_QNAME_FLAG,
- namespaceURI, prefix, localName);
-
- return isIndexed;
- }
-
- public final void writeLowLevelAttributeValue(String value) throws IOException
- {
- final boolean addToTable = isAttributeValueLengthMatchesLimit(value.length());
- encodeNonIdentifyingStringOnFirstBit(value, _v.attributeValue, addToTable, false);
- }
-
- public final void writeLowLevelStartNameLiteral(int type, String prefix, byte[] utf8LocalName,
- String namespaceURI) throws IOException {
- encodeLiteralHeader(type, namespaceURI, prefix);
- encodeNonZeroOctetStringLengthOnSecondBit(utf8LocalName.length);
- write(utf8LocalName, 0, utf8LocalName.length);
- }
-
- public final void writeLowLevelStartNameLiteral(int type, String prefix, int localNameIndex,
- String namespaceURI) throws IOException {
- encodeLiteralHeader(type, namespaceURI, prefix);
- encodeNonZeroIntegerOnSecondBitFirstBitOne(localNameIndex);
- }
-
- public final void writeLowLevelEndStartElement() throws IOException {
- if (hasMark()) {
- resetMark();
- } else {
- // Terminate the attributes
- _b = EncodingConstants.TERMINATOR;
- _terminate = true;
- }
- }
-
- public final void writeLowLevelEndElement() throws IOException {
- encodeElementTermination();
- }
-
- public final void writeLowLevelText(char[] text, int length) throws IOException {
- if (length == 0)
- return;
-
- encodeTermination();
-
- encodeCharacters(text, 0, length);
- }
-
- public final void writeLowLevelText(String text) throws IOException {
- final int length = text.length();
- if (length == 0)
- return;
-
- encodeTermination();
-
- if (length < _charBuffer.length) {
- text.getChars(0, length, _charBuffer, 0);
- encodeCharacters(_charBuffer, 0, length);
- } else {
- final char ch[] = text.toCharArray();
- encodeCharactersNoClone(ch, 0, length);
- }
- }
-
- public final void writeLowLevelOctets(byte[] octets, int length) throws IOException {
- if (length == 0)
- return;
-
- encodeTermination();
-
- encodeCIIOctetAlgorithmData(EncodingAlgorithmIndexes.BASE64, octets, 0, length);
- }
-
- private boolean encodeElement(int type, String namespaceURI, String prefix, String localName) throws IOException {
- final LocalNameQualifiedNamesMap.Entry entry = _v.elementName.obtainEntry(localName);
- for (int i = 0; i < entry._valueIndex; i++) {
- final QualifiedName name = entry._value[i];
- if ((prefix == name.prefix || prefix.equals(name.prefix))
- && (namespaceURI == name.namespaceName || namespaceURI.equals(name.namespaceName))) {
- _b = type;
- encodeNonZeroIntegerOnThirdBit(name.index);
- return true;
- }
- }
-
- entry.addQualifiedName(new QualifiedName(prefix, namespaceURI, localName, "", _v.elementName.getNextIndex()));
- return false;
- }
-
- private boolean encodeAttribute(String namespaceURI, String prefix, String localName) throws IOException {
- final LocalNameQualifiedNamesMap.Entry entry = _v.attributeName.obtainEntry(localName);
- for (int i = 0; i < entry._valueIndex; i++) {
- final QualifiedName name = entry._value[i];
- if ((prefix == name.prefix || prefix.equals(name.prefix))
- && (namespaceURI == name.namespaceName || namespaceURI.equals(name.namespaceName))) {
- encodeNonZeroIntegerOnSecondBitFirstBitZero(name.index);
- return true;
- }
- }
-
- entry.addQualifiedName(new QualifiedName(prefix, namespaceURI, localName, "", _v.attributeName.getNextIndex()));
- return false;
- }
-
- private void encodeLiteralHeader(int type, String namespaceURI, String prefix) throws IOException {
- if (namespaceURI != "") {
- type |= EncodingConstants.LITERAL_QNAME_NAMESPACE_NAME_FLAG;
- if (prefix != "")
- type |= EncodingConstants.LITERAL_QNAME_PREFIX_FLAG;
-
- write(type);
- if (prefix != "")
- encodeNonZeroIntegerOnSecondBitFirstBitOne(_v.prefix.get(prefix));
- encodeNonZeroIntegerOnSecondBitFirstBitOne(_v.namespaceName.get(namespaceURI));
- } else
- write(type);
- }
-
- private void encodeLiteral(int type, String namespaceURI, String prefix, String localName) throws IOException {
- encodeLiteralHeader(type, namespaceURI, prefix);
-
- final int localNameIndex = _v.localName.obtainIndex(localName);
- if (localNameIndex == -1) {
- encodeNonEmptyOctetStringOnSecondBit(localName);
- } else
- encodeNonZeroIntegerOnSecondBitFirstBitOne(localNameIndex);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/StAXManager.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/StAXManager.java
deleted file mode 100644
index 270dd0c9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/StAXManager.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax;
-
-import java.util.HashMap;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class StAXManager {
- protected static final String STAX_NOTATIONS = "javax.xml.stream.notations";
- protected static final String STAX_ENTITIES = "javax.xml.stream.entities";
-
- HashMap features = new HashMap();
-
- public static final int CONTEXT_READER = 1;
- public static final int CONTEXT_WRITER = 2;
-
-
- /** Creates a new instance of StAXManager */
- public StAXManager() {
- }
-
- public StAXManager(int context) {
- switch(context){
- case CONTEXT_READER:{
- initConfigurableReaderProperties();
- break;
- }
- case CONTEXT_WRITER:{
- initWriterProps();
- break;
- }
- }
- }
-
- public StAXManager(StAXManager manager){
-
- HashMap properties = manager.getProperties();
- features.putAll(properties);
- }
-
- private HashMap getProperties(){
- return features ;
- }
-
- private void initConfigurableReaderProperties(){
- //spec v1.0 default values
- features.put(XMLInputFactory.IS_NAMESPACE_AWARE, Boolean.TRUE);
- features.put(XMLInputFactory.IS_VALIDATING, Boolean.FALSE);
- features.put(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, Boolean.TRUE);
- features.put(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.TRUE);
- features.put(XMLInputFactory.IS_COALESCING, Boolean.FALSE);
- features.put(XMLInputFactory.SUPPORT_DTD, Boolean.FALSE);
- features.put(XMLInputFactory.REPORTER, null);
- features.put(XMLInputFactory.RESOLVER, null);
- features.put(XMLInputFactory.ALLOCATOR, null);
- features.put(STAX_NOTATIONS,null );
- }
-
- private void initWriterProps(){
- features.put(XMLOutputFactory.IS_REPAIRING_NAMESPACES , Boolean.FALSE);
- }
-
- /**
- * public void reset(){
- * features.clear() ;
- * }
- */
- public boolean containsProperty(String property){
- return features.containsKey(property) ;
- }
-
- public Object getProperty(String name){
- checkProperty(name);
- return features.get(name);
- }
-
- public void setProperty(String name, Object value){
- checkProperty(name);
- if (name.equals(XMLInputFactory.IS_VALIDATING) &&
- Boolean.TRUE.equals(value)){
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.validationNotSupported") +
- CommonResourceBundle.getInstance().getString("support_validation"));
- } else if (name.equals(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES) &&
- Boolean.TRUE.equals(value)) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.externalEntities") +
- CommonResourceBundle.getInstance().getString("resolve_external_entities_"));
- }
- features.put(name,value);
-
- }
-
- public void checkProperty(String name) {
- if (!features.containsKey(name))
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.propertyNotSupported", new Object[]{name}));
- }
-
- public String toString(){
- return features.toString();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/AttributeBase.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/AttributeBase.java
deleted file mode 100644
index 78076484..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/AttributeBase.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.events.Attribute;
-
-
-
-public class AttributeBase extends EventBase implements Attribute
-
-{
- //an Attribute consists of a qualified name and value
- private QName _QName;
- private String _value;
-
- private String _attributeType = null;
- //A flag indicating whether this attribute was actually specified in the start-tag
- //of its element or was defaulted from the schema.
- private boolean _specified = false;
-
- public AttributeBase(){
- super(ATTRIBUTE);
- }
-
- public AttributeBase(String name, String value) {
- super(ATTRIBUTE);
- _QName = new QName(name);
- _value = value;
- }
-
- public AttributeBase(QName qname, String value) {
- _QName = qname;
- _value = value;
- }
-
- public AttributeBase(String prefix, String localName, String value) {
- this(prefix, null,localName, value, null);
- }
-
- public AttributeBase(String prefix, String namespaceURI, String localName,
- String value, String attributeType) {
- if (prefix == null) prefix = "";
- _QName = new QName(namespaceURI, localName,prefix);
- _value = value;
- _attributeType = (attributeType == null) ? "CDATA":attributeType;
- }
-
-
- public void setName(QName name){
- _QName = name ;
- }
-
- /**
- * Returns the QName for this attribute
- */
- public QName getName() {
- return _QName;
- }
-
- public void setValue(String value){
- _value = value;
- }
-
- public String getLocalName() {
- return _QName.getLocalPart();
- }
- /**
- * Gets the normalized value of this attribute
- */
- public String getValue() {
- return _value;
- }
-
- public void setAttributeType(String attributeType){
- _attributeType = attributeType ;
- }
-
- /**
- * Gets the type of this attribute, default is
- * the String "CDATA"
- * @return the type as a String, default is "CDATA"
- */
- public String getDTDType() {
- return _attributeType;
- }
-
-
- /**
- * A flag indicating whether this attribute was actually
- * specified in the start-tag of its element, or was defaulted from the schema.
- * @return returns true if this was specified in the start element
- */
- public boolean isSpecified() {
- return _specified ;
- }
-
- public void setSpecified(boolean isSpecified){
- _specified = isSpecified ;
- }
-
-
- public String toString() {
- String prefix = _QName.getPrefix();
- if (!Util.isEmptyString(prefix))
- return prefix + ":" + _QName.getLocalPart() + "='" + _value + "'";
-
- return _QName.getLocalPart() + "='" + _value + "'";
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/CharactersEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/CharactersEvent.java
deleted file mode 100644
index dae3a1f9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/CharactersEvent.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events ;
-
-import com.sun.xml.internal.fastinfoset.org.apache.xerces.util.XMLChar;
-import javax.xml.stream.events.Characters;
-
-
-public class CharactersEvent extends EventBase implements Characters {
- private String _text;
- private boolean isCData=false;
- private boolean isSpace=false;
- private boolean isIgnorable=false;
- private boolean needtoCheck = true;
-
- public CharactersEvent() {
- super(CHARACTERS);
- }
- /**
- *
- * @param data Character Data.
- */
- public CharactersEvent(String data) {
- super(CHARACTERS);
- _text = data;
- }
-
- /**
- *
- * @param data Character Data.
- * @param isCData true if is CData
- */
- public CharactersEvent(String data, boolean isCData) {
- super(CHARACTERS);
- _text = data;
- this.isCData = isCData;
- }
-
- /**
- * Get the character data of this event
- */
- public String getData() {
- return _text;
- }
-
- public void setData(String data){
- _text = data;
- }
-
- /**
- *
- * @return boolean returns true if the data is CData
- */
- public boolean isCData() {
- return isCData;
- }
-
- /**
- *
- * @return String return the String representation of this event.
- */
- public String toString() {
- if(isCData)
- return "<![CDATA[" + _text + "]]>";
- else
- return _text;
- }
-
- /**
- * Return true if this is ignorableWhiteSpace. If
- * this event is ignorableWhiteSpace its event type will
- * be SPACE.
- * @return boolean true if this is ignorableWhiteSpace.
- */
- public boolean isIgnorableWhiteSpace() {
- return isIgnorable;
- }
-
- /**
- * Returns true if this set of Characters are all whitespace. Whitspace inside a document
- * is reported as CHARACTERS. This method allows checking of CHARACTERS events to see
- * if they are composed of only whitespace characters
- * @return boolean true if this set of Characters are all whitespace
- */
- public boolean isWhiteSpace() {
- //no synchronization checks made.
- if(needtoCheck){
- checkWhiteSpace();
- needtoCheck = false;
- }
- return isSpace;
- }
-
- public void setSpace(boolean isSpace) {
- this.isSpace = isSpace;
- needtoCheck = false;
- }
- public void setIgnorable(boolean isIgnorable){
- this.isIgnorable = isIgnorable;
- setEventType(SPACE);
- }
- private void checkWhiteSpace(){
- //refer to xerces XMLChar
- if(!Util.isEmptyString(_text)){
- isSpace = true;
- for(int i=0;i<_text.length();i++){
- if(!XMLChar.isSpace(_text.charAt(i))){
- isSpace = false;
- break;
- }
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/CommentEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/CommentEvent.java
deleted file mode 100644
index bdc3c85c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/CommentEvent.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events ;
-
-
-import javax.xml.stream.events.Comment;
-
-public class CommentEvent extends EventBase implements Comment {
-
- /* String data for this event */
- private String _text;
-
- public CommentEvent() {
- super(COMMENT);
- }
-
- public CommentEvent(String text) {
- this();
- _text = text;
- }
-
-
- /**
- * @return String String representation of this event
- */
- public String toString() {
- return "<!--" + _text + "-->";
- }
-
- /**
- * Return the string data of the comment, returns empty string if it
- * does not exist
- */
- public String getText() {
- return _text ;
- }
-
- public void setText(String text) {
- _text = text;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/DTDEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/DTDEvent.java
deleted file mode 100644
index a0afe699..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/DTDEvent.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events;
-
-import java.util.List;
-
-import javax.xml.stream.events.DTD;
-import javax.xml.stream.events.EntityDeclaration;
-import javax.xml.stream.events.NotationDeclaration;
-
-/**
- * DTDEvent. Notations and Entities are not used
- */
-public class DTDEvent extends EventBase implements DTD{
-
- private String _dtd;
- private List _notations;
- private List _entities;
-
- /** Creates a new instance of DTDEvent */
- public DTDEvent() {
- setEventType(DTD);
- }
-
- public DTDEvent(String dtd){
- setEventType(DTD);
- _dtd = dtd;
- }
-
- /**
- * Returns the entire Document Type Declaration as a string, including
- * the internal DTD subset.
- * This may be null if there is not an internal subset.
- * If it is not null it must return the entire
- * Document Type Declaration which matches the doctypedecl
- * production in the XML 1.0 specification
- */
- public String getDocumentTypeDeclaration() {
- return _dtd;
- }
- public void setDTD(String dtd){
- _dtd = dtd;
- }
-
- /**
- * Return a List containing the general entities,
- * both external and internal, declared in the DTD.
- * This list must contain EntityDeclaration events.
- * @see EntityDeclaration
- * @return an unordered list of EntityDeclaration events
- */
- public List getEntities() {
- return _entities;
- }
-
- /**
- * Return a List containing the notations declared in the DTD.
- * This list must contain NotationDeclaration events.
- * @see NotationDeclaration
- * @return an unordered list of NotationDeclaration events
- */
- public List getNotations() {
- return _notations;
- }
-
- /**
- *Returns an implementation defined representation of the DTD.
- * This method may return null if no representation is available.
- *
- */
- public Object getProcessedDTD() {
- return null;
- }
-
- public void setEntities(List entites){
- _entities = entites;
- }
-
- public void setNotations(List notations){
- _notations = notations;
- }
-
- public String toString(){
- return _dtd ;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EmptyIterator.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EmptyIterator.java
deleted file mode 100644
index fa496eff..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EmptyIterator.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events;
-import java.util.Iterator;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-import java.util.NoSuchElementException;
-
-
-public class EmptyIterator implements Iterator {
- public static final EmptyIterator instance = new EmptyIterator();
- /** Creates a new instance of EmptyIterator */
- private EmptyIterator() {
- }
- public static EmptyIterator getInstance() {
- return instance;
- }
- public boolean hasNext() {
- return false;
- }
- public Object next() throws NoSuchElementException {
- throw new NoSuchElementException();
- }
- public void remove() {
- throw new UnsupportedOperationException(CommonResourceBundle.getInstance().getString("message.emptyIterator"));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EndDocumentEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EndDocumentEvent.java
deleted file mode 100644
index 7801437a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EndDocumentEvent.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events ;
-
-import javax.xml.stream.events.EndDocument;
-
-
-public class EndDocumentEvent extends EventBase implements EndDocument {
-
- public EndDocumentEvent() {
- super(END_DOCUMENT);
- }
-
- public String toString() {
- return "<? EndDocument ?>";
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EndElementEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EndElementEvent.java
deleted file mode 100644
index 9cd2c31b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EndElementEvent.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events ;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.events.EndElement;
-import javax.xml.stream.events.Namespace;
-
-import com.sun.xml.internal.fastinfoset.stax.events.EmptyIterator;
-
-
-public class EndElementEvent extends EventBase implements EndElement {
-
- List _namespaces = null;
- QName _qname ;
-
- public void reset() {
- if (_namespaces != null) _namespaces.clear();
- }
-
- public EndElementEvent() {
- setEventType(END_ELEMENT);
- }
-
- public EndElementEvent(String prefix, String namespaceURI, String localpart) {
- _qname = getQName(namespaceURI,localpart,prefix);
- setEventType(END_ELEMENT);
- }
-
- public EndElementEvent(QName qname) {
- _qname = qname;
- setEventType(END_ELEMENT);
- }
-
- /**
- * Get the name of this event
- * @return the qualified name of this event
- */
- public QName getName() {
- return _qname;
- }
-
- public void setName(QName qname) {
- _qname = qname;
- }
-
-
- /** Returns an Iterator of namespaces that have gone out
- * of scope. Returns an empty iterator if no namespaces have gone
- * out of scope.
- * @return an Iterator over Namespace interfaces, or an
- * empty iterator
- */
- public Iterator getNamespaces() {
- if(_namespaces != null)
- return _namespaces.iterator();
- return EmptyIterator.getInstance();
- }
-
- public void addNamespace(Namespace namespace){
- if (_namespaces == null) {
- _namespaces = new ArrayList();
- }
- _namespaces.add(namespace);
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("</").append(nameAsString());
- Iterator namespaces = getNamespaces();
- while(namespaces.hasNext()) {
- sb.append(" ").append(namespaces.next().toString());
- }
- sb.append(">");
- return sb.toString();
- }
-
-
- private String nameAsString() {
- if("".equals(_qname.getNamespaceURI()))
- return _qname.getLocalPart();
- if(_qname.getPrefix() != null)
- return "['" + _qname.getNamespaceURI() + "']:" + _qname.getPrefix() + ":" + _qname.getLocalPart();
- else
- return "['" + _qname.getNamespaceURI() + "']:" + _qname.getLocalPart();
- }
- private QName getQName(String uri, String localPart, String prefix){
- QName qn = null;
- if(prefix != null && uri != null)
- qn = new QName(uri, localPart, prefix);
- else if(prefix == null && uri != null)
- qn = new QName(uri, localPart);
- else if(prefix == null && uri == null)
- qn = new QName(localPart);
- return qn;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EntityDeclarationImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EntityDeclarationImpl.java
deleted file mode 100644
index cb5f0521..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EntityDeclarationImpl.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events;
-
-import javax.xml.stream.events.EntityDeclaration;
-
-
-public class EntityDeclarationImpl extends EventBase implements EntityDeclaration {
- private String _publicId;
- private String _systemId;
- private String _baseURI;
- private String _entityName;
- private String _replacement;
- private String _notationName;
-
- /** Creates a new instance of EntityDeclarationImpl */
- public EntityDeclarationImpl() {
- init();
- }
-
- public EntityDeclarationImpl(String entityName , String replacement){
- init();
- _entityName = entityName;
- _replacement = replacement;
- }
-
- /**
- * The entity's public identifier, or null if none was given
- * @return the public ID for this declaration or null
- */
- public String getPublicId(){
- return _publicId;
- }
-
- /**
- * The entity's system identifier.
- * @return the system ID for this declaration or null
- */
- public String getSystemId(){
- return _systemId;
- }
-
- /**
- * The entity's name
- * @return the name, may not be null
- */
- public String getName(){
- return _entityName;
- }
-
- /**
- * The name of the associated notation.
- * @return the notation name
- */
- public String getNotationName() {
- return _notationName;
- }
-
- /**
- * The replacement text of the entity.
- * This method will only return non-null
- * if this is an internal entity.
- * @return null or the replacment text
- */
- public String getReplacementText() {
- return _replacement;
- }
-
- /**
- * Get the base URI for this reference
- * or null if this information is not available
- * @return the base URI or null
- */
- public String getBaseURI() {
- return _baseURI;
- }
-
- public void setPublicId(String publicId) {
- _publicId = publicId;
- }
-
- public void setSystemId(String systemId) {
- _systemId = systemId;
- }
-
- public void setBaseURI(String baseURI) {
- _baseURI = baseURI;
- }
-
- public void setName(String entityName){
- _entityName = entityName;
- }
-
- public void setReplacementText(String replacement){
- _replacement = replacement;
- }
-
- public void setNotationName(String notationName){
- _notationName = notationName;
- }
-
- protected void init(){
- setEventType(ENTITY_DECLARATION);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EntityReferenceEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EntityReferenceEvent.java
deleted file mode 100644
index 744ed56e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EntityReferenceEvent.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events ;
-
-import javax.xml.stream.events.EntityDeclaration;
-import javax.xml.stream.events.EntityReference;
-
-
-public class EntityReferenceEvent extends EventBase implements EntityReference {
- private EntityDeclaration _entityDeclaration ;
- private String _entityName;
-
- public EntityReferenceEvent() {
- init();
- }
-
- public EntityReferenceEvent(String entityName , EntityDeclaration entityDeclaration) {
- init();
- _entityName = entityName;
- _entityDeclaration = entityDeclaration;
- }
-
- /**
- * The name of the entity
- * @return the entity's name, may not be null
- */
- public String getName() {
- return _entityName;
- }
-
- /**
- * Return the declaration of this entity.
- */
- public EntityDeclaration getDeclaration(){
- return _entityDeclaration ;
- }
-
- public void setName(String name){
- _entityName = name;
- }
-
- public void setDeclaration(EntityDeclaration declaration) {
- _entityDeclaration = declaration ;
- }
-
- public String toString() {
- String text = _entityDeclaration.getReplacementText();
- if(text == null)
- text = "";
- return "&" + getName() + ";='" + text + "'";
- }
-
- protected void init() {
- setEventType(ENTITY_REFERENCE);
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EventBase.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EventBase.java
deleted file mode 100644
index 8daeb23a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/EventBase.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events ;
-
-import javax.xml.stream.Location;
-import javax.xml.stream.events.XMLEvent;
-import javax.xml.stream.events.Characters;
-import javax.xml.stream.events.EndElement;
-import javax.xml.stream.events.StartElement;
-import javax.xml.namespace.QName;
-import java.io.Writer;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-
-public abstract class EventBase implements XMLEvent {
-
- /* Event type this event corresponds to */
- protected int _eventType;
- protected Location _location = null;
-
- public EventBase() {
-
- }
-
- public EventBase(int eventType) {
- _eventType = eventType;
- }
-
- /**
- * Returns an integer code for this event.
- */
- public int getEventType() {
- return _eventType;
- }
-
- protected void setEventType(int eventType){
- _eventType = eventType;
- }
-
-
- public boolean isStartElement() {
- return _eventType == START_ELEMENT;
- }
-
- public boolean isEndElement() {
- return _eventType == END_ELEMENT;
- }
-
- public boolean isEntityReference() {
- return _eventType == ENTITY_REFERENCE;
- }
-
- public boolean isProcessingInstruction() {
- return _eventType == PROCESSING_INSTRUCTION;
- }
-
- public boolean isStartDocument() {
- return _eventType == START_DOCUMENT;
- }
-
- public boolean isEndDocument() {
- return _eventType == END_DOCUMENT;
- }
-
- /**
- * Return the location of this event. The Location
- * returned from this method is non-volatile and
- * will retain its information.
- * @see javax.xml.stream.Location
- */
- public Location getLocation(){
- return _location;
- }
-
- public void setLocation(Location loc){
- _location = loc;
- }
- public String getSystemId() {
- if(_location == null )
- return "";
- else
- return _location.getSystemId();
- }
-
- /** Returns this event as Characters, may result in
- * a class cast exception if this event is not Characters.
- */
- public Characters asCharacters() {
- if (isCharacters()) {
- return (Characters)this;
- } else
- throw new ClassCastException(CommonResourceBundle.getInstance().getString("message.charactersCast", new Object[]{getEventTypeString()}));
- }
-
- /** Returns this event as an end element event, may result in
- * a class cast exception if this event is not a end element.
- */
- public EndElement asEndElement() {
- if (isEndElement()) {
- return (EndElement)this;
- } else
- throw new ClassCastException(CommonResourceBundle.getInstance().getString("message.endElementCase", new Object[]{getEventTypeString()}));
- }
-
- /**
- * Returns this event as a start element event, may result in
- * a class cast exception if this event is not a start element.
- */
- public StartElement asStartElement() {
- if (isStartElement()) {
- return (StartElement)this;
- } else
- throw new ClassCastException(CommonResourceBundle.getInstance().getString("message.startElementCase", new Object[]{getEventTypeString()}));
- }
-
- /**
- * This method is provided for implementations to provide
- * optional type information about the associated event.
- * It is optional and will return null if no information
- * is available.
- */
- public QName getSchemaType() {
- return null;
- }
-
- /** A utility function to check if this event is an Attribute.
- * @see javax.xml.stream.events.Attribute
- */
- public boolean isAttribute() {
- return _eventType == ATTRIBUTE;
- }
-
- /** A utility function to check if this event is Characters.
- * @see javax.xml.stream.events.Characters
- */
- public boolean isCharacters() {
- return _eventType == CHARACTERS;
- }
-
- /** A utility function to check if this event is a Namespace.
- * @see javax.xml.stream.events.Namespace
- */
- public boolean isNamespace() {
- return _eventType == NAMESPACE;
- }
-
-
- /**
- * This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.
- * No indentation or whitespace should be outputted.
- *
- * Any user defined event type SHALL have this method
- * called when being written to on an output stream.
- * Built in Event types MUST implement this method,
- * but implementations MAY choose not call these methods
- * for optimizations reasons when writing out built in
- * Events to an output stream.
- * The output generated MUST be equivalent in terms of the
- * infoset expressed.
- *
- * @param writer The writer that will output the data
- * @throws XMLStreamException if there is a fatal error writing the event
- */
- public void writeAsEncodedUnicode(Writer writer) throws javax.xml.stream.XMLStreamException {
- }
-
- private String getEventTypeString() {
- switch (_eventType){
- case START_ELEMENT:
- return "StartElementEvent";
- case END_ELEMENT:
- return "EndElementEvent";
- case PROCESSING_INSTRUCTION:
- return "ProcessingInstructionEvent";
- case CHARACTERS:
- return "CharacterEvent";
- case COMMENT:
- return "CommentEvent";
- case START_DOCUMENT:
- return "StartDocumentEvent";
- case END_DOCUMENT:
- return "EndDocumentEvent";
- case ENTITY_REFERENCE:
- return "EntityReferenceEvent";
- case ATTRIBUTE:
- return "AttributeBase";
- case DTD:
- return "DTDEvent";
- case CDATA:
- return "CDATA";
- }
- return "UNKNOWN_EVENT_TYPE";
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/NamespaceBase.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/NamespaceBase.java
deleted file mode 100644
index b08428a4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/NamespaceBase.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.events.Namespace;
-
-
-public class NamespaceBase extends AttributeBase implements Namespace{
- //J2SE1.5.0 javax.xml.XMLConstants
- static final String DEFAULT_NS_PREFIX = "";
- static final String XML_NS_URI = "http://www.w3.org/XML/1998/namespace";
- static final String XML_NS_PREFIX = "xml";
- static final String XMLNS_ATTRIBUTE_NS_URI = "http://www.w3.org/2000/xmlns/";
- static final String XMLNS_ATTRIBUTE = "xmlns";
- static final String W3C_XML_SCHEMA_NS_URI = "http://www.w3.org/2001/XMLSchema";
- static final String W3C_XML_SCHEMA_INSTANCE_NS_URI = "http://www.w3.org/2001/XMLSchema-instance";
-
- //is this namespace default declaration?
- private boolean defaultDeclaration = false;
-
- /** a namespace attribute has a form: xmlns:NCName="URI reference" */
- public NamespaceBase(String namespaceURI) {
- super(XMLNS_ATTRIBUTE, "", namespaceURI);
- setEventType(NAMESPACE);
- }
-
- /**
- * Create a new Namespace
- * @param prefix prefix of a namespace is the local name for an attribute
- * @param namespaceURI the uri reference of a namespace is the value for an attribute
- */
- public NamespaceBase(String prefix, String namespaceURI){
- super(XMLNS_ATTRIBUTE, prefix, namespaceURI);
- setEventType(NAMESPACE);
- if (Util.isEmptyString(prefix)) {
- defaultDeclaration=true;
- }
- }
-
- void setPrefix(String prefix){
- if(prefix == null)
- setName(new QName(XMLNS_ATTRIBUTE_NS_URI,DEFAULT_NS_PREFIX,XMLNS_ATTRIBUTE));
- else// new QName(uri, localpart, prefix)
- setName(new QName(XMLNS_ATTRIBUTE_NS_URI,prefix,XMLNS_ATTRIBUTE));
- }
-
- public String getPrefix() {
- if (defaultDeclaration) return "";
- return super.getLocalName();
- }
-
-
- /**
- * set Namespace URI reference (xmlns:prefix = "uri")
- * @param uri the uri reference of a namespace is the value for an attribute
- */
- void setNamespaceURI(String uri) {
- setValue(uri);
- }
- public String getNamespaceURI() {
- return getValue();
- }
-
-
- public boolean isNamespace(){
- return true;
- }
-
- public boolean isDefaultNamespaceDeclaration() {
- return defaultDeclaration;
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/ProcessingInstructionEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/ProcessingInstructionEvent.java
deleted file mode 100644
index e9530419..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/ProcessingInstructionEvent.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events ;
-
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.events.ProcessingInstruction;
-
-
-public class ProcessingInstructionEvent extends EventBase implements ProcessingInstruction {
-
- private String targetName;
- private String _data;
-
- public ProcessingInstructionEvent() {
- init();
- }
-
- public ProcessingInstructionEvent(String targetName, String data) {
- this.targetName = targetName;
- _data = data;
- init();
- }
-
- protected void init() {
- setEventType(XMLStreamConstants.PROCESSING_INSTRUCTION);
- }
-
- public String getTarget() {
- return targetName;
- }
-
- public void setTarget(String targetName) {
- this.targetName = targetName;
- }
-
- public void setData(String data) {
- _data = data;
- }
-
- public String getData() {
- return _data;
- }
-
- public String toString() {
- if(_data != null && targetName != null)
- return "<?" + targetName + " " + _data + "?>";
- if(targetName != null)
- return "<?" + targetName + "?>";
- if(_data != null)
- return "<?" + _data + "?>";
- else
- return "<??>";
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/ReadIterator.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/ReadIterator.java
deleted file mode 100644
index b943b012..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/ReadIterator.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events;
-
-import java.util.Iterator;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class ReadIterator implements Iterator {
-
- Iterator iterator = EmptyIterator.getInstance();
-
- public ReadIterator(){
- }
-
- public ReadIterator(Iterator iterator){
- if (iterator != null) {
- this.iterator = iterator;
- }
- }
-
- public boolean hasNext() {
- return iterator.hasNext();
- }
-
- public Object next() {
- return iterator.next();
- }
-
- public void remove() {
- throw new UnsupportedOperationException(CommonResourceBundle.getInstance().getString("message.readonlyList"));
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXEventAllocatorBase.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXEventAllocatorBase.java
deleted file mode 100644
index 66be3f7b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXEventAllocatorBase.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events;
-
-import javax.xml.stream.XMLEventFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.events.Namespace;
-import javax.xml.stream.events.XMLEvent;
-import javax.xml.stream.util.XMLEventAllocator;
-import javax.xml.stream.util.XMLEventConsumer;
-
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-/**
- * allows a user to register a way to allocate events given an XMLStreamReader.
- * The XMLEventAllocator can be set on an XMLInputFactory
- * using the property "javax.xml.stream.allocator"
- *
- * This base class uses EventFactory to create events as recommended in the JavaDoc of XMLEventAllocator.
- * However, creating new object per each event reduces performance. The implementation of
- * EventReader therefore will set the Allocator to StAXEventAllocator which implements the
- * Allocate methods without creating new objects.
- *
- * The spec for the first Allocate method states that it must NOT modify the state of the Reader
- * while the second MAY. For consistency, both Allocate methods in this implementation will
- * NOT modify the state.
- *
- */
-public class StAXEventAllocatorBase implements XMLEventAllocator {
- XMLEventFactory factory;
-
- /** Creates a new instance of XMLEventAllocator */
- public StAXEventAllocatorBase() {
- if (System.getProperty("javax.xml.stream.XMLEventFactory")==null) {
- System.setProperty("javax.xml.stream.XMLEventFactory",
- "com.sun.xml.internal.fastinfoset.stax.factory.StAXEventFactory");
- }
- factory = XMLEventFactory.newInstance();
- }
-
- // ---------------------methods defined by XMLEventAllocator-----------------//
-
- /**
- * This method creates an instance of the XMLEventAllocator. This
- * allows the XMLInputFactory to allocate a new instance per reader.
- */
- public XMLEventAllocator newInstance() {
- return new StAXEventAllocatorBase();
- }
-
- /**
- * This method allocates an event given the current state of the XMLStreamReader.
- * If this XMLEventAllocator does not have a one-to-one mapping between reader state
- * and events this method will return null.
- * @param streamReader The XMLStreamReader to allocate from
- * @return the event corresponding to the current reader state
- */
- public XMLEvent allocate(XMLStreamReader streamReader) throws XMLStreamException {
- if(streamReader == null )
- throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.nullReader"));
- return getXMLEvent(streamReader);
- }
-
- /**
- * This method allocates an event or set of events given the current state of
- * the XMLStreamReader and adds the event or set of events to the consumer that
- * was passed in.
- * @param streamReader The XMLStreamReader to allocate from
- * @param consumer The XMLEventConsumer to add to.
- */
- public void allocate(XMLStreamReader streamReader, XMLEventConsumer consumer) throws XMLStreamException {
- consumer.add(getXMLEvent(streamReader));
-
- }
- // ---------------------end of methods defined by XMLEventAllocator-----------------//
-
-
- XMLEvent getXMLEvent(XMLStreamReader reader){
- XMLEvent event = null;
- //returns the current event
- int eventType = reader.getEventType();
- //this needs to be set before creating events
- factory.setLocation(reader.getLocation());
- switch(eventType){
-
- case XMLEvent.START_ELEMENT:
- {
- StartElementEvent startElement = (StartElementEvent)factory.createStartElement(reader.getPrefix(),
- reader.getNamespaceURI(), reader.getLocalName());
-
- addAttributes(startElement,reader);
- addNamespaces(startElement, reader);
- //need to fix it along with the Reader
- //setNamespaceContext(startElement,reader);
- event = startElement;
- break;
- }
- case XMLEvent.END_ELEMENT:
- {
- EndElementEvent endElement = (EndElementEvent)factory.createEndElement(
- reader.getPrefix(), reader.getNamespaceURI(), reader.getLocalName());
- addNamespaces(endElement,reader);
- event = endElement ;
- break;
- }
- case XMLEvent.PROCESSING_INSTRUCTION:
- {
- event = factory.createProcessingInstruction(reader.getPITarget(),reader.getPIData());
- break;
- }
- case XMLEvent.CHARACTERS:
- {
- if (reader.isWhiteSpace())
- event = factory.createSpace(reader.getText());
- else
- event = factory.createCharacters(reader.getText());
-
- break;
- }
- case XMLEvent.COMMENT:
- {
- event = factory.createComment(reader.getText());
- break;
- }
- case XMLEvent.START_DOCUMENT:
- {
- StartDocumentEvent docEvent = (StartDocumentEvent)factory.createStartDocument(
- reader.getVersion(), reader.getEncoding(), reader.isStandalone());
- if(reader.getCharacterEncodingScheme() != null){
- docEvent.setDeclaredEncoding(true);
- }else{
- docEvent.setDeclaredEncoding(false);
- }
- event = docEvent ;
- break;
- }
- case XMLEvent.END_DOCUMENT:{
- EndDocumentEvent endDocumentEvent = new EndDocumentEvent() ;
- event = endDocumentEvent ;
- break;
- }
- case XMLEvent.ENTITY_REFERENCE:{
- event = factory.createEntityReference(reader.getLocalName(),
- new EntityDeclarationImpl(reader.getLocalName(),reader.getText()));
- break;
-
- }
- case XMLEvent.ATTRIBUTE:{
- event = null ;
- break;
- }
- case XMLEvent.DTD:{
- event = factory.createDTD(reader.getText());
- break;
- }
- case XMLEvent.CDATA:{
- event = factory.createCData(reader.getText());
- break;
- }
- case XMLEvent.SPACE:{
- event = factory.createSpace(reader.getText());
- break;
- }
- }
- return event ;
- }
-
- //use event.addAttribute instead of addAttributes to avoid creating another list
- protected void addAttributes(StartElementEvent event,XMLStreamReader streamReader){
- AttributeBase attr = null;
- for(int i=0; i<streamReader.getAttributeCount() ;i++){
- attr = (AttributeBase)factory.createAttribute(streamReader.getAttributeName(i),
- streamReader.getAttributeValue(i));
- attr.setAttributeType(streamReader.getAttributeType(i));
- attr.setSpecified(streamReader.isAttributeSpecified(i));
- event.addAttribute(attr);
- }
- }
-
- //add namespaces to StartElement/EndElement
- protected void addNamespaces(StartElementEvent event,XMLStreamReader streamReader){
- Namespace namespace = null;
- for(int i=0; i<streamReader.getNamespaceCount(); i++){
- namespace = factory.createNamespace(streamReader.getNamespacePrefix(i),
- streamReader.getNamespaceURI(i));
- event.addNamespace(namespace);
- }
- }
- protected void addNamespaces(EndElementEvent event,XMLStreamReader streamReader){
- Namespace namespace = null;
- for(int i=0; i<streamReader.getNamespaceCount(); i++){
- namespace = factory.createNamespace(streamReader.getNamespacePrefix(i),
- streamReader.getNamespaceURI(i));
- event.addNamespace(namespace);
- }
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXEventReader.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXEventReader.java
deleted file mode 100644
index 8645b1d6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXEventReader.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events;
-
-import com.sun.xml.internal.fastinfoset.stax.*;
-import java.util.NoSuchElementException;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.events.XMLEvent;
-import javax.xml.stream.util.XMLEventAllocator;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-
-
-public class StAXEventReader implements javax.xml.stream.XMLEventReader{
- protected XMLStreamReader _streamReader ;
- protected XMLEventAllocator _eventAllocator;
- private XMLEvent _currentEvent; //the current event
- private XMLEvent[] events = new XMLEvent[3];
- private int size = 3;
- private int currentIndex = 0;
- private boolean hasEvent = false; //true when current event exists, false initially & at end
-
- //only constructor will do because we delegate everything to underlying XMLStreamReader
- public StAXEventReader(XMLStreamReader reader) throws XMLStreamException {
- _streamReader = reader ;
- _eventAllocator = (XMLEventAllocator)reader.getProperty(XMLInputFactory.ALLOCATOR);
- if(_eventAllocator == null){
- _eventAllocator = new StAXEventAllocatorBase();
- }
- //initialize
- if (_streamReader.hasNext())
- {
- _streamReader.next();
- _currentEvent =_eventAllocator.allocate(_streamReader);
- events[0] = _currentEvent;
- hasEvent = true;
- } else {
- throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.noElement"));
- }
- }
-
- public boolean hasNext() {
- return hasEvent;
- }
-
- public XMLEvent nextEvent() throws XMLStreamException {
- XMLEvent event = null;
- XMLEvent nextEvent = null;
- if (hasEvent)
- {
- event = events[currentIndex];
- events[currentIndex] = null;
- if (_streamReader.hasNext())
- {
- //advance and read the next
- _streamReader.next();
- nextEvent = _eventAllocator.allocate(_streamReader);
- if (++currentIndex==size)
- currentIndex = 0;
- events[currentIndex] = nextEvent;
- hasEvent = true;
- } else {
- _currentEvent = null;
- hasEvent = false;
- }
- return event;
- }
- else{
- throw new NoSuchElementException();
- }
- }
-
- public void remove(){
- //stream reader is read-only.
- throw new java.lang.UnsupportedOperationException();
- }
-
-
- public void close() throws XMLStreamException {
- _streamReader.close();
- }
-
- /** Reads the content of a text-only element. Precondition:
- * the current event is START_ELEMENT. Postcondition:
- * The current event is the corresponding END_ELEMENT.
- * @throws XMLStreamException if the current event is not a START_ELEMENT
- * or if a non text element is encountered
- */
- public String getElementText() throws XMLStreamException {
- if(!hasEvent) {
- throw new NoSuchElementException();
- }
-
- if(!_currentEvent.isStartElement()) {
- StAXDocumentParser parser = (StAXDocumentParser)_streamReader;
- return parser.getElementText(true);
- } else {
- return _streamReader.getElementText();
- }
- }
-
- /** Get the value of a feature/property from the underlying implementation
- * @param name The name of the property
- * @return The value of the property
- * @throws IllegalArgumentException if the property is not supported
- */
- public Object getProperty(java.lang.String name) throws java.lang.IllegalArgumentException {
- return _streamReader.getProperty(name) ;
- }
-
- /** Skips any insignificant space events until a START_ELEMENT or
- * END_ELEMENT is reached. If anything other than space characters are
- * encountered, an exception is thrown. This method should
- * be used when processing element-only content because
- * the parser is not able to recognize ignorable whitespace if
- * the DTD is missing or not interpreted.
- * @throws XMLStreamException if anything other than space characters are encountered
- */
- public XMLEvent nextTag() throws XMLStreamException {
- if(!hasEvent) {
- throw new NoSuchElementException();
- }
- StAXDocumentParser parser = (StAXDocumentParser)_streamReader;
- parser.nextTag(true);
- return _eventAllocator.allocate(_streamReader);
- }
-
- //XMLEventReader extends Iterator;
- public Object next() {
- try{
- return nextEvent();
- }catch(XMLStreamException streamException){
- return null;
- }
- }
-
- public XMLEvent peek() throws XMLStreamException{
- if (!hasEvent)
- throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.noElement"));
- _currentEvent = events[currentIndex];
- return _currentEvent;
- }
-
- public void setAllocator(XMLEventAllocator allocator) {
- if (allocator == null)
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.nullXMLEventAllocator"));
-
- _eventAllocator = allocator;
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXEventWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXEventWriter.java
deleted file mode 100644
index fda74e36..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXEventWriter.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events;
-
-import java.util.Iterator;
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLEventWriter;
-import javax.xml.stream.XMLEventReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.events.*;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class StAXEventWriter implements XMLEventWriter {
-
- private XMLStreamWriter _streamWriter ;
- /**
- *
- * @param streamWriter
- */
- public StAXEventWriter(XMLStreamWriter streamWriter){
- _streamWriter = streamWriter;
- }
-
- /**
- * Writes any cached events to the underlying output mechanism
- * @throws XMLStreamException
- */
- public void flush() throws XMLStreamException {
- _streamWriter.flush();
- }
- /**
- * Frees any resources associated with this stream
- * @throws XMLStreamException
- */
- public void close() throws javax.xml.stream.XMLStreamException {
- _streamWriter.close();
- }
-
- /**
- *
- * @param eventReader
- * @throws XMLStreamException
- */
- public void add(XMLEventReader eventReader) throws XMLStreamException {
- if(eventReader == null) throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.nullEventReader"));
- while(eventReader.hasNext()){
- add(eventReader.nextEvent());
- }
- }
-
- /**
- * Add an event to the output stream
- * Adding a START_ELEMENT will open a new namespace scope that
- * will be closed when the corresponding END_ELEMENT is written.
- *
- * @param event
- * @throws XMLStreamException
- */
- public void add(XMLEvent event) throws XMLStreamException {
- int type = event.getEventType();
- switch(type){
- case XMLEvent.DTD:{
- DTD dtd = (DTD)event ;
- _streamWriter.writeDTD(dtd.getDocumentTypeDeclaration());
- break;
- }
- case XMLEvent.START_DOCUMENT :{
- StartDocument startDocument = (StartDocument)event ;
- _streamWriter.writeStartDocument(startDocument.getCharacterEncodingScheme(), startDocument.getVersion());
- break;
- }
- case XMLEvent.START_ELEMENT :{
- StartElement startElement = event.asStartElement() ;
- QName qname = startElement.getName();
- _streamWriter.writeStartElement(qname.getPrefix(), qname.getLocalPart(), qname.getNamespaceURI());
-
- Iterator iterator = startElement.getNamespaces();
- while(iterator.hasNext()){
- Namespace namespace = (Namespace)iterator.next();
- _streamWriter.writeNamespace(namespace.getPrefix(), namespace.getNamespaceURI());
- }
-
- Iterator attributes = startElement.getAttributes();
- while(attributes.hasNext()){
- Attribute attribute = (Attribute)attributes.next();
- QName name = attribute.getName();
- _streamWriter.writeAttribute(name.getPrefix(), name.getNamespaceURI(),
- name.getLocalPart(),attribute.getValue());
- }
- break;
- }
- case XMLEvent.NAMESPACE:{
- Namespace namespace = (Namespace)event;
- _streamWriter.writeNamespace(namespace.getPrefix(), namespace.getNamespaceURI());
- break ;
- }
- case XMLEvent.COMMENT: {
- Comment comment = (Comment)event ;
- _streamWriter.writeComment(comment.getText());
- break;
- }
- case XMLEvent.PROCESSING_INSTRUCTION:{
- ProcessingInstruction processingInstruction = (ProcessingInstruction)event ;
- _streamWriter.writeProcessingInstruction(processingInstruction.getTarget(), processingInstruction.getData());
- break;
- }
- case XMLEvent.CHARACTERS:{
- Characters characters = event.asCharacters();
- //check if the CHARACTERS are CDATA
- if(characters.isCData()){
- _streamWriter.writeCData(characters.getData());
- }
- else{
- _streamWriter.writeCharacters(characters.getData());
- }
- break;
- }
- case XMLEvent.ENTITY_REFERENCE:{
- EntityReference entityReference = (EntityReference)event ;
- _streamWriter.writeEntityRef(entityReference.getName());
- break;
- }
- case XMLEvent.ATTRIBUTE:{
- Attribute attribute = (Attribute)event;
- QName qname = attribute.getName();
- _streamWriter.writeAttribute(qname.getPrefix(), qname.getNamespaceURI(), qname.getLocalPart(),attribute.getValue());
- break;
- }
- case XMLEvent.CDATA:{
- //there is no separate CDATA datatype but CDATA event can be reported
- //by using vendor specific CDATA property.
- Characters characters = (Characters)event;
- if(characters.isCData()){
- _streamWriter.writeCData(characters.getData());
- }
- break;
- }
-
- case XMLEvent.END_ELEMENT:{
- _streamWriter.writeEndElement();
- break;
- }
- case XMLEvent.END_DOCUMENT:{
- _streamWriter.writeEndDocument();
- break;
- }
- default:
- throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.eventTypeNotSupported", new Object[]{Util.getEventTypeString(type)}));
- //throw new XMLStreamException("Unknown Event type = " + type);
- };
-
- }
-
- /**
- * Gets the prefix the uri is bound to
- * @param uri the uri to look up
- * @throws XMLStreamException
- */
- public String getPrefix(String uri) throws XMLStreamException {
- return _streamWriter.getPrefix(uri);
- }
-
-
- /**
- * Returns the current namespace context.
- * @return the current namespace context
- */
- public NamespaceContext getNamespaceContext() {
- return _streamWriter.getNamespaceContext();
- }
-
-
- /**
- * Binds a URI to the default namespace
- * This URI is bound
- * in the scope of the current START_ELEMENT / END_ELEMENT pair.
- * If this method is called before a START_ELEMENT has been written
- * the uri is bound in the root scope.
- * @param uri the uri to bind to the default namespace
- * @throws XMLStreamException
- */
- public void setDefaultNamespace(String uri) throws XMLStreamException {
- _streamWriter.setDefaultNamespace(uri);
- }
-
- /**
- * Sets the current namespace context for prefix and uri bindings.
- * This context becomes the root namespace context for writing and
- * will replace the current root namespace context. Subsequent calls
- * to setPrefix and setDefaultNamespace will bind namespaces using
- * the context passed to the method as the root context for resolving
- * namespaces.
- * @param namespaceContext the namespace context to use for this writer
- * @throws XMLStreamException
- */
- public void setNamespaceContext(NamespaceContext namespaceContext) throws XMLStreamException {
- _streamWriter.setNamespaceContext(namespaceContext);
- }
- /**
- * Sets the prefix the uri is bound to. This prefix is bound
- * in the scope of the current START_ELEMENT / END_ELEMENT pair.
- * If this method is called before a START_ELEMENT has been written
- * the prefix is bound in the root scope.
- * @param prefix the prefix to bind to the uri
- * @param uri the uri to bind to the prefix
- * @throws XMLStreamException
- */
- public void setPrefix(String prefix, String uri) throws XMLStreamException {
- _streamWriter.setPrefix(prefix, uri);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXFilteredEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXFilteredEvent.java
deleted file mode 100644
index 8b90c339..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StAXFilteredEvent.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events;
-
-import javax.xml.stream.events.XMLEvent;
-import javax.xml.stream.EventFilter;
-import javax.xml.stream.events.Characters;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLEventReader;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class StAXFilteredEvent implements XMLEventReader {
- private XMLEventReader eventReader;
- private EventFilter _filter;
-
- /** Creates a new instance of StAXFilteredEvent */
- public StAXFilteredEvent() {
- }
-
- public StAXFilteredEvent(XMLEventReader reader, EventFilter filter) throws XMLStreamException
- {
- eventReader = reader;
- _filter = filter;
- }
-
- public void setEventReader(XMLEventReader reader) {
- eventReader = reader;
- }
-
- public void setFilter(EventFilter filter) {
- _filter = filter;
- }
-
- public Object next() {
- try {
- return nextEvent();
- } catch (XMLStreamException e) {
- return null;
- }
- }
-
- public XMLEvent nextEvent() throws XMLStreamException
- {
- if (hasNext())
- return eventReader.nextEvent();
- return null;
- }
-
- public String getElementText() throws XMLStreamException
- {
- StringBuffer buffer = new StringBuffer();
- XMLEvent e = nextEvent();
- if (!e.isStartElement())
- throw new XMLStreamException(
- CommonResourceBundle.getInstance().getString("message.mustBeOnSTART_ELEMENT"));
-
- while(hasNext()) {
- e = nextEvent();
- if(e.isStartElement())
- throw new XMLStreamException(
- CommonResourceBundle.getInstance().getString("message.getElementTextExpectTextOnly"));
- if(e.isCharacters())
- buffer.append(((Characters) e).getData());
- if(e.isEndElement())
- return buffer.toString();
- }
- throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.END_ELEMENTnotFound"));
- }
-
- public XMLEvent nextTag() throws XMLStreamException {
- while(hasNext()) {
- XMLEvent e = nextEvent();
- if (e.isStartElement() || e.isEndElement())
- return e;
- }
- throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.startOrEndNotFound"));
- }
-
-
- public boolean hasNext()
- {
- try {
- while(eventReader.hasNext()) {
- if (_filter.accept(eventReader.peek())) return true;
- eventReader.nextEvent();
- }
- return false;
- } catch (XMLStreamException e) {
- return false;
- }
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public XMLEvent peek() throws XMLStreamException
- {
- if (hasNext())
- return eventReader.peek();
- return null;
- }
-
- public void close() throws XMLStreamException
- {
- eventReader.close();
- }
-
- public Object getProperty(String name) {
- return eventReader.getProperty(name);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StartDocumentEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StartDocumentEvent.java
deleted file mode 100644
index 151f7c8f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StartDocumentEvent.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events ;
-
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.events.StartDocument;
-
-
-public class StartDocumentEvent extends EventBase implements StartDocument {
-
- protected String _systemId;
- protected String _encoding = XMLConstants.ENCODING; //default
- protected boolean _standalone = true;
- protected String _version = XMLConstants.XMLVERSION;
- private boolean _encodingSet = false;
- private boolean _standaloneSet = false;
-
- public void reset() {
- _encoding = XMLConstants.ENCODING;
- _standalone = true;
- _version = XMLConstants.XMLVERSION;
- _encodingSet = false;
- _standaloneSet=false;
- }
- public StartDocumentEvent() {
- this(null ,null);
- }
-
- public StartDocumentEvent(String encoding){
- this(encoding, null);
- }
-
- public StartDocumentEvent(String encoding, String version){
- if (encoding != null) {
- _encoding = encoding;
- _encodingSet = true;
- }
- if (version != null)
- _version = version;
- setEventType(XMLStreamConstants.START_DOCUMENT);
- }
-
-
- // ------------------- methods defined in StartDocument -------------------------
- /**
- * Returns the system ID of the XML data
- * @return the system ID, defaults to ""
- */
- public String getSystemId() {
- return super.getSystemId();
- }
-
- /**
- * Returns the encoding style of the XML data
- * @return the character encoding, defaults to "UTF-8"
- */
- public String getCharacterEncodingScheme() {
- return _encoding;
- }
- /**
- * Returns true if CharacterEncodingScheme was set in
- * the encoding declaration of the document
- */
- public boolean encodingSet() {
- return _encodingSet;
- }
-
-
- /**
- * Returns if this XML is standalone
- * @return the standalone state of XML, defaults to "no"
- */
- public boolean isStandalone() {
- return _standalone;
- }
- /**
- * Returns true if the standalone attribute was set in
- * the encoding declaration of the document.
- */
- public boolean standaloneSet() {
- return _standaloneSet;
- }
-
- /**
- * Returns the version of XML of this XML stream
- * @return the version of XML, defaults to "1.0"
- */
- public String getVersion() {
- return _version;
- }
- // ------------------- end of methods defined in StartDocument -------------------------
-
- public void setStandalone(boolean standalone) {
- _standaloneSet = true;
- _standalone = standalone;
- }
-
- public void setStandalone(String s) {
- _standaloneSet = true;
- if(s == null) {
- _standalone = true;
- return;
- }
- if(s.equals("yes"))
- _standalone = true;
- else
- _standalone = false;
- }
-
-
- public void setEncoding(String encoding) {
- _encoding = encoding;
- _encodingSet = true;
- }
-
- void setDeclaredEncoding(boolean value){
- _encodingSet = value;
- }
-
- public void setVersion(String s) {
- _version = s;
- }
-
- void clear() {
- _encoding = "UTF-8";
- _standalone = true;
- _version = "1.0";
- _encodingSet = false;
- _standaloneSet = false;
- }
-
- public String toString() {
- String s = "<?xml version=\"" + _version + "\"";
- s = s + " encoding='" + _encoding + "'";
- if(_standaloneSet) {
- if(_standalone)
- s = s + " standalone='yes'?>";
- else
- s = s + " standalone='no'?>";
- } else {
- s = s + "?>";
- }
- return s;
- }
-
- public boolean isStartDocument() {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StartElementEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StartElementEvent.java
deleted file mode 100644
index 6235b7fe..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/StartElementEvent.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events ;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.events.Attribute;
-import javax.xml.stream.events.Namespace;
-import javax.xml.stream.events.StartElement;
-
-
-public class StartElementEvent extends EventBase implements StartElement {
-
- private Map _attributes;
- private List _namespaces;
- private NamespaceContext _context = null;
- private QName _qname;
-
- public void reset() {
- if (_attributes != null) _attributes.clear();
- if (_namespaces != null) _namespaces.clear();
- if (_context != null) _context = null;
- }
-
- public StartElementEvent() {
- init();
- }
-
- public StartElementEvent(String prefix, String uri, String localpart) {
- init();
- if (uri == null) uri = "";
- if (prefix == null) prefix ="";
- _qname = new QName(uri, localpart, prefix);
- setEventType(START_ELEMENT);
- }
-
- public StartElementEvent(QName qname) {
- init();
- _qname = qname;
- }
-
- public StartElementEvent(StartElement startelement) {
- this(startelement.getName());
- addAttributes(startelement.getAttributes());
- addNamespaces(startelement.getNamespaces());
- }
-
- protected void init() {
- setEventType(XMLStreamConstants.START_ELEMENT);
- _attributes = new HashMap();
- _namespaces = new ArrayList();
- }
-
- // ---------------------methods defined by StartElement-----------------//
- /**
- * Get the name of this event
- * @return the qualified name of this event
- */
- public QName getName() {
- return _qname;
- }
- /**
- * Returns an Iterator of non-namespace declared attributes
- * returns an empty iterator if there are no attributes. The
- * iterator must contain only implementations of the javax.xml.stream.Attribute
- * interface. Attributes are fundamentally unordered and may not be reported
- * in any order.
- *
- * @return a readonly Iterator over Attribute interfaces, or an
- * empty iterator
- */
- public Iterator getAttributes() {
- if(_attributes != null){
- Collection coll = _attributes.values();
- return new ReadIterator(coll.iterator());
- }
- return EmptyIterator.getInstance();
- }
-
- /**
- * Returns an Iterator of namespaces declared on this element.
- * This Iterator does not contain previously declared namespaces
- * unless they appear on the current START_ELEMENT.
- * Therefore this list may contain redeclared namespaces and duplicate namespace
- * declarations. Use the getNamespaceContext() method to get the
- * current context of namespace declarations.
- *
- * <p>The iterator must contain only implementations of the
- * javax.xml.stream.Namespace interface.
- *
- * <p>A Namespace is an Attribute. One
- * can iterate over a list of namespaces as a list of attributes.
- * However this method returns only the list of namespaces
- * declared on this START_ELEMENT and does not
- * include the attributes declared on this START_ELEMENT.
- *
- * @return a readonly Iterator over Namespace interfaces, or an
- * empty iterator if there are no namespaces.
- *
- */
- public Iterator getNamespaces() {
- if(_namespaces != null){
- return new ReadIterator(_namespaces.iterator());
- }
- return EmptyIterator.getInstance();
- }
-
- /**
- * Returns the attribute referred to by this name
- * @param qname the qname of the desired name
- * @return the attribute corresponding to the name value or null
- */
- public Attribute getAttributeByName(QName qname) {
- if(qname == null)
- return null;
- return (Attribute)_attributes.get(qname);
- }
-
- /** Gets a read-only namespace context. If no context is
- * available this method will return an empty namespace context.
- * The NamespaceContext contains information about all namespaces
- * in scope for this StartElement.
- *
- * @return the current namespace context
- */
- public NamespaceContext getNamespaceContext() {
- return _context;
- }
-// ---------------------end of methods defined by StartElement-----------------//
-
- public void setName(QName qname) {
- this._qname = qname;
- }
-
-
- public String getNamespace(){
- return _qname.getNamespaceURI();
- }
-
- /**
- * Gets the value that the prefix is bound to in the
- * context of this element. Returns null if
- * the prefix is not bound in this context
- * @param prefix the prefix to lookup
- * @return the uri bound to the prefix or null
- */
- public String getNamespaceURI(String prefix) {
- //first check if the URI was supplied when creating this startElement event
- if( getNamespace() != null ) return getNamespace();
- //else check the namespace context
- if(_context != null)
- return _context.getNamespaceURI(prefix);
- return null;
- }
-
- public String toString() {
- final StringBuilder sb = new StringBuilder(64);
-
- sb.append('<').append(nameAsString());
-
- if(_attributes != null){
- Iterator it = this.getAttributes();
- Attribute attr = null;
- while(it.hasNext()){
- attr = (Attribute)it.next();
- sb.append(' ').append(attr.toString());
- }
- }
-
- if(_namespaces != null){
- Iterator it = _namespaces.iterator();
- Namespace attr = null;
- while(it.hasNext()){
- attr = (Namespace)it.next();
- sb.append(' ').append(attr.toString());
- }
- }
- sb.append('>');
- return sb.toString();
- }
-
- /** Return this event as String
- * @return String Event returned as string.
- */
- public String nameAsString() {
- if("".equals(_qname.getNamespaceURI()))
- return _qname.getLocalPart();
- if(_qname.getPrefix() != null)
- return "['" + _qname.getNamespaceURI() + "']:" + _qname.getPrefix() + ":" + _qname.getLocalPart();
- else
- return "['" + _qname.getNamespaceURI() + "']:" + _qname.getLocalPart();
- }
-
-
- public void setNamespaceContext(NamespaceContext context) {
- _context = context;
- }
-
- public void addAttribute(Attribute attr){
- _attributes.put(attr.getName(),attr);
- }
-
- public void addAttributes(Iterator attrs){
- if(attrs != null) {
- while(attrs.hasNext()){
- Attribute attr = (Attribute)attrs.next();
- _attributes.put(attr.getName(),attr);
- }
- }
- }
-
- public void addNamespace(Namespace namespace){
- if(namespace != null) {
- _namespaces.add(namespace);
- }
- }
-
- public void addNamespaces(Iterator namespaces){
- if(namespaces != null) {
- while(namespaces.hasNext()){
- Namespace namespace = (Namespace)namespaces.next();
- _namespaces.add(namespace);
- }
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/Util.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/Util.java
deleted file mode 100644
index 3172bfef..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/Util.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events;
-
-import javax.xml.stream.XMLStreamConstants;
-
-/** A Utility class for the StAX Events implementation.
- */
-public class Util {
-
- /**
- * A string is empty if it's null or contains nothing
- *
- * @param s The string to check.
- */
- public static boolean isEmptyString(String s) {
- if (s != null && !s.equals(""))
- return false;
- else
- return true;
- }
-
- public final static String getEventTypeString(int eventType) {
- switch (eventType){
- case XMLStreamConstants.START_ELEMENT:
- return "START_ELEMENT";
- case XMLStreamConstants.END_ELEMENT:
- return "END_ELEMENT";
- case XMLStreamConstants.PROCESSING_INSTRUCTION:
- return "PROCESSING_INSTRUCTION";
- case XMLStreamConstants.CHARACTERS:
- return "CHARACTERS";
- case XMLStreamConstants.COMMENT:
- return "COMMENT";
- case XMLStreamConstants.START_DOCUMENT:
- return "START_DOCUMENT";
- case XMLStreamConstants.END_DOCUMENT:
- return "END_DOCUMENT";
- case XMLStreamConstants.ENTITY_REFERENCE:
- return "ENTITY_REFERENCE";
- case XMLStreamConstants.ATTRIBUTE:
- return "ATTRIBUTE";
- case XMLStreamConstants.DTD:
- return "DTD";
- case XMLStreamConstants.CDATA:
- return "CDATA";
- }
- return "UNKNOWN_EVENT_TYPE";
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/XMLConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/XMLConstants.java
deleted file mode 100644
index 1795a896..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/events/XMLConstants.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.events;
-
-
-public class XMLConstants {
-
- public static final String ENCODING = "UTF-8";
- public static final String XMLVERSION = "1.0";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/factory/StAXEventFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/factory/StAXEventFactory.java
deleted file mode 100644
index 1151c36c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/factory/StAXEventFactory.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.factory;
-
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLEventFactory;
-import javax.xml.stream.events.*;
-import java.util.Iterator;
-import com.sun.xml.internal.fastinfoset.stax.events.*;
-
-
-public class StAXEventFactory extends XMLEventFactory {
- Location location = null;
-
- /** Creates a new instance of StAXEventFactory */
- public StAXEventFactory() {
- }
- /**
- * This method allows setting of the Location on each event that
- * is created by this factory. The values are copied by value into
- * the events created by this factory. To reset the location
- * information set the location to null.
- * @param location the location to set on each event created
- */
- public void setLocation(Location location) {
- this.location = location;
- }
-
- /**
- * Create a new Attribute
- * @param prefix the prefix of this attribute, may not be null
- * @param namespaceURI the attribute value is set to this value, may not be null
- * @param localName the local name of the XML name of the attribute, localName cannot be null
- * @param value the attribute value to set, may not be null
- * @return the Attribute with specified values
- */
- public Attribute createAttribute(String prefix, String namespaceURI, String localName, String value) {
- AttributeBase attr = new AttributeBase(prefix, namespaceURI, localName, value, null);
- if(location != null)attr.setLocation(location);
- return attr;
- }
-
- /**
- * Create a new Attribute
- * @param localName the local name of the XML name of the attribute, localName cannot be null
- * @param value the attribute value to set, may not be null
- * @return the Attribute with specified values
- */
- public Attribute createAttribute(String localName, String value) {
- AttributeBase attr = new AttributeBase(localName, value);
- if(location != null)attr.setLocation(location);
- return attr;
- }
-
- public Attribute createAttribute(QName name, String value) {
- AttributeBase attr = new AttributeBase(name, value);
- if(location != null)attr.setLocation(location);
- return attr;
- }
-
- /**
- * Create a new default Namespace
- * @param namespaceURI the default namespace uri
- * @return the Namespace with the specified value
- */
- public Namespace createNamespace(String namespaceURI) {
- NamespaceBase event = new NamespaceBase(namespaceURI);
- if(location != null)event.setLocation(location);
- return event;
- }
-
- /**
- * Create a new Namespace
- * @param prefix the prefix of this namespace, may not be null
- * @param namespaceURI the attribute value is set to this value, may not be null
- * @return the Namespace with the specified values
- */
- public Namespace createNamespace(String prefix, String namespaceURI) {
- NamespaceBase event = new NamespaceBase(prefix, namespaceURI);
- if(location != null)event.setLocation(location);
- return event;
- }
-
- /**
- * Create a new StartElement.
- * @param name the qualified name of the attribute, may not be null
- * @param attributes an optional unordered set of objects that
- * implement Attribute to add to the new StartElement, may be null
- * @param namespaces an optional unordered set of objects that
- * implement Namespace to add to the new StartElement, may be null
- * @return an instance of the requested StartElement
- */
- public StartElement createStartElement(QName name, Iterator attributes, Iterator namespaces) {
- return createStartElement(name.getPrefix(), name.getNamespaceURI(), name.getLocalPart(), attributes, namespaces);
- }
-
- public StartElement createStartElement(String prefix, String namespaceUri, String localName) {
- StartElementEvent event = new StartElementEvent(prefix, namespaceUri, localName);
- if(location != null)event.setLocation(location);
- return event;
- }
-
- public StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces) {
- return createStartElement(prefix, namespaceUri, localName, attributes, namespaces, null);
- }
-
- public StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces, NamespaceContext context) {
- StartElementEvent elem = new StartElementEvent(prefix, namespaceUri, localName);
- elem.addAttributes(attributes);
- elem.addNamespaces(namespaces);
- elem.setNamespaceContext(context);
- if(location != null)elem.setLocation(location);
- return elem;
- }
-
- /**
- * Create a new EndElement
- * @param name the qualified name of the EndElement
- * @param namespaces an optional unordered set of objects that
- * implement Namespace that have gone out of scope, may be null
- * @return an instance of the requested EndElement
- */
- public EndElement createEndElement(QName name, Iterator namespaces) {
- return createEndElement(name.getPrefix(), name.getNamespaceURI(), name.getLocalPart(), namespaces);
- }
-
- /**
- * Create a new EndElement
- * @param namespaceUri the uri of the QName of the new StartElement
- * @param localName the local name of the QName of the new StartElement
- * @param prefix the prefix of the QName of the new StartElement
- * @return an instance of the requested EndElement
- */
- public EndElement createEndElement(String prefix, String namespaceUri, String localName) {
- EndElementEvent event = new EndElementEvent(prefix, namespaceUri, localName);
- if(location != null)event.setLocation(location);
- return event;
- }
-
- /**
- * Create a new EndElement
- * @param namespaceUri the uri of the QName of the new StartElement
- * @param localName the local name of the QName of the new StartElement
- * @param prefix the prefix of the QName of the new StartElement
- * @param namespaces an unordered set of objects that implement
- * Namespace that have gone out of scope, may be null
- * @return an instance of the requested EndElement
- */
- public EndElement createEndElement(String prefix, String namespaceUri, String localName, Iterator namespaces) {
-
- EndElementEvent event = new EndElementEvent(prefix, namespaceUri, localName);
- if(namespaces!=null){
- while(namespaces.hasNext())
- event.addNamespace((Namespace)namespaces.next());
- }
- if(location != null)event.setLocation(location);
- return event;
- }
-
- /**
- * Create a Characters event, this method does not check if the content
- * is all whitespace. To create a space event use #createSpace(String)
- * @param content the string to create
- * @return a Characters event
- */
- public Characters createCharacters(String content) {
- CharactersEvent charEvent = new CharactersEvent(content);
- if(location != null)charEvent.setLocation(location);
- return charEvent;
- }
-
- /**
- * Create a Characters event with the CData flag set to true
- * @param content the string to create
- * @return a Characters event
- */
- public Characters createCData(String content) {
- CharactersEvent charEvent = new CharactersEvent(content, true);
- if(location != null)charEvent.setLocation(location);
- return charEvent;
- }
-
- /**
- * Create a Characters event with the isSpace flag set to true
- * @param content the content of the space to create
- * @return a Characters event
- */
- public Characters createSpace(String content) {
- CharactersEvent event = new CharactersEvent(content);
- event.setSpace(true);
- if(location != null)event.setLocation(location);
- return event;
- }
- /**
- * Create an ignorable space
- * @param content the space to create
- * @return a Characters event
- */
- public Characters createIgnorableSpace(String content) {
- CharactersEvent event = new CharactersEvent(content, false);
- event.setSpace(true);
- event.setIgnorable(true);
- if(location != null)event.setLocation(location);
- return event;
- }
- /**
- * Creates a new instance of a StartDocument event
- * @return a StartDocument event
- */
- public StartDocument createStartDocument() {
- StartDocumentEvent event = new StartDocumentEvent();
- if(location != null)event.setLocation(location);
- return event;
- }
-
- /**
- * Creates a new instance of a StartDocument event
- *
- * @param encoding the encoding style
- * @return a StartDocument event
- */
- public StartDocument createStartDocument(String encoding) {
- StartDocumentEvent event = new StartDocumentEvent(encoding);
- if(location != null)event.setLocation(location);
- return event;
- }
-
- /**
- * Creates a new instance of a StartDocument event
- *
- * @param encoding the encoding style
- * @param version the XML version
- * @return a StartDocument event
- */
- public StartDocument createStartDocument(String encoding, String version) {
- StartDocumentEvent event = new StartDocumentEvent(encoding, version);
- if(location != null)event.setLocation(location);
- return event;
- }
-
- /**
- * Creates a new instance of a StartDocument event
- *
- * @param encoding the encoding style
- * @param version the XML version
- * @param standalone the status of standalone may be set to "true" or "false"
- * @return a StartDocument event
- */
- public StartDocument createStartDocument(String encoding, String version, boolean standalone) {
- StartDocumentEvent event = new StartDocumentEvent(encoding, version);
- event.setStandalone(standalone);
- if(location != null)event.setLocation(location);
- return event;
- }
-
- public EndDocument createEndDocument() {
- EndDocumentEvent event =new EndDocumentEvent();
- if(location != null)event.setLocation(location);
- return event;
- }
-
- /** Creates a new instance of a EntityReference event
- *
- * @param name The name of the reference
- * @param entityDeclaration the declaration for the event
- * @return an EntityReference event
- */
- public EntityReference createEntityReference(String name, EntityDeclaration entityDeclaration) {
- EntityReferenceEvent event = new EntityReferenceEvent(name, entityDeclaration);
- if(location != null)event.setLocation(location);
- return event;
- }
-
- /**
- * Create a comment
- * @param text The text of the comment
- * a Comment event
- */
- public Comment createComment(String text) {
- CommentEvent charEvent = new CommentEvent(text);
- if(location != null)charEvent.setLocation(location);
- return charEvent;
- }
-
- /**
- * Create a document type definition event
- * This string contains the entire document type declaration that matches
- * the doctypedecl in the XML 1.0 specification
- * @param dtd the text of the document type definition
- * @return a DTD event
- */
- public DTD createDTD(String dtd) {
- DTDEvent dtdEvent = new DTDEvent(dtd);
- if(location != null)dtdEvent.setLocation(location);
- return dtdEvent;
- }
-
-
- /**
- * Create a processing instruction
- * @param target The target of the processing instruction
- * @param data The text of the processing instruction
- * @return a ProcessingInstruction event
- */
- public ProcessingInstruction createProcessingInstruction(String target, String data) {
- ProcessingInstructionEvent event = new ProcessingInstructionEvent(target, data);
- if(location != null)event.setLocation(location);
- return event;
- }
-
-
-
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/factory/StAXInputFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/factory/StAXInputFactory.java
deleted file mode 100644
index 380aa851..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/factory/StAXInputFactory.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.factory;
-
-import com.sun.xml.internal.fastinfoset.stax.*;
-import com.sun.xml.internal.fastinfoset.stax.events.StAXEventReader;
-import com.sun.xml.internal.fastinfoset.stax.events.StAXFilteredEvent;
-import com.sun.xml.internal.fastinfoset.stax.util.StAXFilteredParser;
-import com.sun.xml.internal.fastinfoset.tools.XML_SAX_FI;
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-
-import javax.xml.stream.*;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.util.XMLEventAllocator ;
-import javax.xml.transform.Source;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class StAXInputFactory extends XMLInputFactory {
- //List of supported properties and default values.
- private StAXManager _manager = new StAXManager(StAXManager.CONTEXT_READER) ;
-
- public StAXInputFactory() {
- }
-
- public static XMLInputFactory newInstance() {
- return XMLInputFactory.newInstance();
- }
-
- /**
- * Create a new XMLStreamReader from a reader
- * @param xmlfile the XML data to read from
- * @throws XMLStreamException
- */
- public XMLStreamReader createXMLStreamReader(Reader xmlfile) throws XMLStreamException {
- return getXMLStreamReader(xmlfile);
- }
-
- public XMLStreamReader createXMLStreamReader(InputStream s) throws XMLStreamException {
- return new StAXDocumentParser(s, _manager);
- }
-
- public XMLStreamReader createXMLStreamReader(String systemId, Reader xmlfile) throws XMLStreamException {
- return getXMLStreamReader(xmlfile);
- }
-
- public XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException {
- return null;
- }
-
- public XMLStreamReader createXMLStreamReader(String systemId, InputStream inputstream) throws XMLStreamException {
- return createXMLStreamReader(inputstream);
- }
-
-
- public XMLStreamReader createXMLStreamReader(InputStream inputstream, String encoding) throws XMLStreamException {
- return createXMLStreamReader(inputstream);
- }
-
-
- XMLStreamReader getXMLStreamReader(String systemId, InputStream inputstream, String encoding)
- throws XMLStreamException{
- return createXMLStreamReader(inputstream);
-
- }
-
- /**
- * @param inputstream
- * @throws XMLStreamException
- * @return
- */
- XMLStreamReader getXMLStreamReader(Reader xmlfile)
- throws XMLStreamException{
-
- ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
- BufferedOutputStream bufferedStream = new BufferedOutputStream(byteStream);
- StAXDocumentParser sr = null;
- try {
- XML_SAX_FI convertor = new XML_SAX_FI();
- convertor.convert(xmlfile, bufferedStream);
-
- ByteArrayInputStream byteInputStream = new ByteArrayInputStream(byteStream.toByteArray());
- InputStream document = new BufferedInputStream(byteInputStream);
- sr = new StAXDocumentParser();
- sr.setInputStream(document);
- sr.setManager(_manager);
- return sr;
- //return new StAXDocumentParser(document, _manager);
- } catch (Exception e) {
- return null;
- }
-
- }
-
-
- /**
- * @param inputstream
- * @throws XMLStreamException
- * @return XMLEventReader
- */
- public XMLEventReader createXMLEventReader(InputStream inputstream) throws XMLStreamException {
- return new StAXEventReader(createXMLStreamReader(inputstream));
- }
-
- public XMLEventReader createXMLEventReader(Reader reader) throws XMLStreamException {
- return new StAXEventReader(createXMLStreamReader(reader));
- }
-
- public XMLEventReader createXMLEventReader(Source source) throws XMLStreamException {
- return new StAXEventReader(createXMLStreamReader(source));
- }
-
- public XMLEventReader createXMLEventReader(String systemId, InputStream inputstream) throws XMLStreamException {
- return new StAXEventReader(createXMLStreamReader(systemId, inputstream));
- }
-
- public XMLEventReader createXMLEventReader(java.io.InputStream stream, String encoding) throws XMLStreamException {
- return new StAXEventReader(createXMLStreamReader(stream, encoding));
- }
-
- public XMLEventReader createXMLEventReader(String systemId, Reader reader) throws XMLStreamException {
- return new StAXEventReader(createXMLStreamReader(systemId, reader));
- }
-
- /** Create a new XMLEventReader from an XMLStreamReader. After being used
- * to construct the XMLEventReader instance returned from this method
- * the XMLStreamReader must not be used.
- * @param streamReader the XMLStreamReader to read from (may not be modified)
- * @return a new XMLEventReader
- * @throws XMLStreamException
- */
- public XMLEventReader createXMLEventReader(XMLStreamReader streamReader) throws XMLStreamException {
- return new StAXEventReader(streamReader);
- }
-
- public XMLEventAllocator getEventAllocator() {
- return (XMLEventAllocator)getProperty(XMLInputFactory.ALLOCATOR);
- }
-
- public XMLReporter getXMLReporter() {
- return (XMLReporter)_manager.getProperty(XMLInputFactory.REPORTER);
- }
-
- public XMLResolver getXMLResolver() {
- Object object = _manager.getProperty(XMLInputFactory.RESOLVER);
- return (XMLResolver)object;
- //return (XMLResolver)_manager.getProperty(XMLInputFactory.RESOLVER);
- }
-
- public void setXMLReporter(XMLReporter xmlreporter) {
- _manager.setProperty(XMLInputFactory.REPORTER, xmlreporter);
- }
-
- public void setXMLResolver(XMLResolver xmlresolver) {
- _manager.setProperty(XMLInputFactory.RESOLVER, xmlresolver);
- }
-
- /** Create a filtered event reader that wraps the filter around the event reader
- * @param reader the event reader to wrap
- * @param filter the filter to apply to the event reader
- * @throws XMLStreamException
- */
- public XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) throws XMLStreamException {
- return new StAXFilteredEvent(reader, filter);
- }
-
- /** Create a filtered reader that wraps the filter around the reader
- * @param reader the reader to filter
- * @param filter the filter to apply to the reader
- * @throws XMLStreamException
- */
- public XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) throws XMLStreamException {
-
- if( reader != null && filter != null )
- return new StAXFilteredParser(reader,filter);
-
- return null;
- }
-
-
-
- /** Get the value of a feature/property from the underlying implementation
- * @param name The name of the property (may not be null)
- * @return The value of the property
- * @throws IllegalArgumentException if the property is not supported
- */
- public Object getProperty(String name) throws IllegalArgumentException {
- if(name == null){
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.nullPropertyName"));
- }
- if(_manager.containsProperty(name))
- return _manager.getProperty(name);
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.propertyNotSupported", new Object[]{name}));
- }
-
- /** Query the set of Properties that this factory supports.
- *
- * @param name The name of the property (may not be null)
- * @return true if the property is supported and false otherwise
- */
- public boolean isPropertySupported(String name) {
- if(name == null)
- return false ;
- else
- return _manager.containsProperty(name);
- }
-
- /** Set a user defined event allocator for events
- * @param allocator the user defined allocator
- */
- public void setEventAllocator(XMLEventAllocator allocator) {
- _manager.setProperty(XMLInputFactory.ALLOCATOR, allocator);
- }
-
- /** Allows the user to set specific feature/property on the underlying implementation. The underlying implementation
- * is not required to support every setting of every property in the specification and may use IllegalArgumentException
- * to signal that an unsupported property may not be set with the specified value.
- * @param name The name of the property (may not be null)
- * @param value The value of the property
- * @throws IllegalArgumentException if the property is not supported
- */
- public void setProperty(String name, Object value) throws IllegalArgumentException {
- _manager.setProperty(name,value);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/factory/StAXOutputFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/factory/StAXOutputFactory.java
deleted file mode 100644
index 5c1ff64d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/factory/StAXOutputFactory.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.factory;
-
-import com.sun.xml.internal.fastinfoset.stax.*;
-import com.sun.xml.internal.fastinfoset.stax.events.StAXEventWriter;
-import javax.xml.transform.Result;
-import javax.xml.stream.XMLOutputFactory ;
-import javax.xml.stream.XMLEventWriter;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.transform.stream.StreamResult;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Writer;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class StAXOutputFactory extends XMLOutputFactory {
-
- //List of supported properties and default values.
- private StAXManager _manager = null ;
-
- /** Creates a new instance of StAXOutputFactory */
- public StAXOutputFactory() {
- _manager = new StAXManager(StAXManager.CONTEXT_WRITER);
- }
-
- public XMLEventWriter createXMLEventWriter(Result result) throws XMLStreamException {
- return new StAXEventWriter(createXMLStreamWriter(result));
- }
-
- public XMLEventWriter createXMLEventWriter(Writer writer) throws XMLStreamException {
- return new StAXEventWriter(createXMLStreamWriter(writer));
- }
-
- public XMLEventWriter createXMLEventWriter(OutputStream outputStream) throws XMLStreamException {
- return new StAXEventWriter(createXMLStreamWriter(outputStream));
- }
-
- public XMLEventWriter createXMLEventWriter(OutputStream outputStream, String encoding) throws XMLStreamException {
- return new StAXEventWriter(createXMLStreamWriter(outputStream, encoding));
- }
-
- public XMLStreamWriter createXMLStreamWriter(Result result) throws XMLStreamException {
- if (result instanceof StreamResult) {
- StreamResult streamResult = (StreamResult) result;
- if (streamResult.getWriter() != null) {
- return createXMLStreamWriter(streamResult.getWriter());
- } else if (streamResult.getOutputStream() != null) {
- return createXMLStreamWriter(streamResult.getOutputStream());
- } else if (streamResult.getSystemId() != null) {
- FileWriter writer = null;
- boolean isError = true;
-
- try {
- writer = new FileWriter(new File(streamResult.getSystemId()));
- final XMLStreamWriter streamWriter = createXMLStreamWriter(writer);
- isError = false;
-
- return streamWriter;
- } catch (IOException ie) {
- throw new XMLStreamException(ie);
- } finally {
- if (isError && writer != null) {
- try {
- writer.close();
- } catch (IOException ignored) {
- }
- }
- }
- }
- } else {
- FileWriter writer = null;
- boolean isError = true;
-
- try {
- //xxx: should we be using FileOutputStream - nb.
- writer = new FileWriter(new File(result.getSystemId()));
- final XMLStreamWriter streamWriter = createXMLStreamWriter(writer);
- isError = false;
-
- return streamWriter;
- } catch (IOException ie) {
- throw new XMLStreamException(ie);
- } finally {
- if (isError && writer != null) {
- try {
- writer.close();
- } catch (IOException ignored) {
- }
- }
- }
- }
- throw new java.lang.UnsupportedOperationException();
- }
-
- /** this is assumed that user wants to write the file in xml format
- *
- */
- public XMLStreamWriter createXMLStreamWriter(Writer writer) throws XMLStreamException {
- throw new java.lang.UnsupportedOperationException();
- }
-
- public XMLStreamWriter createXMLStreamWriter(OutputStream outputStream) throws XMLStreamException {
- return new StAXDocumentSerializer(outputStream, new StAXManager(_manager));
- }
-
- public XMLStreamWriter createXMLStreamWriter(OutputStream outputStream, String encoding) throws XMLStreamException {
- StAXDocumentSerializer serializer = new StAXDocumentSerializer(outputStream, new StAXManager(_manager));
- serializer.setEncoding(encoding);
- return serializer;
- }
-
- public Object getProperty(String name) throws java.lang.IllegalArgumentException {
- if(name == null){
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.propertyNotSupported", new Object[]{null}));
- }
- if(_manager.containsProperty(name))
- return _manager.getProperty(name);
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.propertyNotSupported", new Object[]{name}));
- }
-
- public boolean isPropertySupported(String name) {
- if(name == null)
- return false ;
- else
- return _manager.containsProperty(name);
- }
-
- public void setProperty(String name, Object value) throws java.lang.IllegalArgumentException {
- _manager.setProperty(name,value);
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/util/StAXFilteredParser.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/util/StAXFilteredParser.java
deleted file mode 100644
index c0900f49..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/util/StAXFilteredParser.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.util;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.StreamFilter;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-
-public class StAXFilteredParser extends StAXParserWrapper {
- private StreamFilter _filter;
-
- /** Creates a new instance of StAXFilteredParser */
- public StAXFilteredParser() {
- }
- public StAXFilteredParser(XMLStreamReader reader, StreamFilter filter) {
- super(reader);
- _filter = filter;
- }
-
- public void setFilter(StreamFilter filter) {
- _filter = filter;
- }
-
- public int next() throws XMLStreamException
- {
- if (hasNext())
- return super.next();
- throw new IllegalStateException(CommonResourceBundle.getInstance().getString("message.noMoreItems"));
- }
-
- public boolean hasNext() throws XMLStreamException
- {
- while (super.hasNext()) {
- if (_filter.accept(getReader())) return true;
- super.next();
- }
- return false;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/util/StAXParserWrapper.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/util/StAXParserWrapper.java
deleted file mode 100644
index 8b911f2e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/stax/util/StAXParserWrapper.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.stax.util;
-
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLStreamException;
-
-
-public class StAXParserWrapper implements XMLStreamReader{
- private XMLStreamReader _reader;
-
- /** Creates a new instance of StAXParserWrapper */
- public StAXParserWrapper() {
- }
-
- public StAXParserWrapper(XMLStreamReader reader) {
- _reader = reader;
- }
- public void setReader(XMLStreamReader reader) {
- _reader = reader;
- }
- public XMLStreamReader getReader() {
- return _reader;
- }
-
- public int next() throws XMLStreamException
- {
- return _reader.next();
- }
-
- public int nextTag() throws XMLStreamException
- {
- return _reader.nextTag();
- }
-
- public String getElementText() throws XMLStreamException
- {
- return _reader.getElementText();
- }
-
- public void require(int type, String namespaceURI, String localName) throws XMLStreamException
- {
- _reader.require(type,namespaceURI,localName);
- }
-
- public boolean hasNext() throws XMLStreamException
- {
- return _reader.hasNext();
- }
-
- public void close() throws XMLStreamException
- {
- _reader.close();
- }
-
- public String getNamespaceURI(String prefix)
- {
- return _reader.getNamespaceURI(prefix);
- }
-
- public NamespaceContext getNamespaceContext() {
- return _reader.getNamespaceContext();
- }
-
- public boolean isStartElement() {
- return _reader.isStartElement();
- }
-
- public boolean isEndElement() {
- return _reader.isEndElement();
- }
-
- public boolean isCharacters() {
- return _reader.isCharacters();
- }
-
- public boolean isWhiteSpace() {
- return _reader.isWhiteSpace();
- }
-
- public QName getAttributeName(int index) {
- return _reader.getAttributeName(index);
- }
-
- public int getTextCharacters(int sourceStart, char[] target, int targetStart,
- int length) throws XMLStreamException
- {
- return _reader.getTextCharacters(sourceStart, target, targetStart, length);
- }
-
- public String getAttributeValue(String namespaceUri,
- String localName)
- {
- return _reader.getAttributeValue(namespaceUri,localName);
- }
- public int getAttributeCount() {
- return _reader.getAttributeCount();
- }
- public String getAttributePrefix(int index) {
- return _reader.getAttributePrefix(index);
- }
- public String getAttributeNamespace(int index) {
- return _reader.getAttributeNamespace(index);
- }
- public String getAttributeLocalName(int index) {
- return _reader.getAttributeLocalName(index);
- }
- public String getAttributeType(int index) {
- return _reader.getAttributeType(index);
- }
- public String getAttributeValue(int index) {
- return _reader.getAttributeValue(index);
- }
- public boolean isAttributeSpecified(int index) {
- return _reader.isAttributeSpecified(index);
- }
-
- public int getNamespaceCount() {
- return _reader.getNamespaceCount();
- }
- public String getNamespacePrefix(int index) {
- return _reader.getNamespacePrefix(index);
- }
- public String getNamespaceURI(int index) {
- return _reader.getNamespaceURI(index);
- }
-
- public int getEventType() {
- return _reader.getEventType();
- }
-
- public String getText() {
- return _reader.getText();
- }
-
- public char[] getTextCharacters() {
- return _reader.getTextCharacters();
- }
-
- public int getTextStart() {
- return _reader.getTextStart();
- }
-
- public int getTextLength() {
- return _reader.getTextLength();
- }
-
- public String getEncoding() {
- return _reader.getEncoding();
- }
-
- public boolean hasText() {
- return _reader.hasText();
- }
-
- public Location getLocation() {
- return _reader.getLocation();
- }
-
- public QName getName() {
- return _reader.getName();
- }
-
- public String getLocalName() {
- return _reader.getLocalName();
- }
-
- public boolean hasName() {
- return _reader.hasName();
- }
-
- public String getNamespaceURI() {
- return _reader.getNamespaceURI();
- }
-
- public String getPrefix() {
- return _reader.getPrefix();
- }
-
- public String getVersion() {
- return _reader.getVersion();
- }
-
- public boolean isStandalone() {
- return _reader.isStandalone();
- }
-
- public boolean standaloneSet() {
- return _reader.standaloneSet();
- }
-
- public String getCharacterEncodingScheme() {
- return _reader.getCharacterEncodingScheme();
- }
-
- public String getPITarget() {
- return _reader.getPITarget();
- }
-
- public String getPIData() {
- return _reader.getPIData();
- }
-
- public Object getProperty(String name) {
- return _reader.getProperty(name);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_DOM_Or_XML_DOM_SAX_SAXEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_DOM_Or_XML_DOM_SAX_SAXEvent.java
deleted file mode 100644
index ebea3c4a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_DOM_Or_XML_DOM_SAX_SAXEvent.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import com.sun.xml.internal.fastinfoset.Decoder;
-import com.sun.xml.internal.fastinfoset.dom.DOMDocumentParser;
-import java.io.BufferedInputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.sax.SAXResult;
-import org.w3c.dom.Document;
-
-public class FI_DOM_Or_XML_DOM_SAX_SAXEvent extends TransformInputOutput {
-
- public void parse(InputStream document, OutputStream events, String workingDirectory) throws Exception {
- if (!document.markSupported()) {
- document = new BufferedInputStream(document);
- }
-
- document.mark(4);
- boolean isFastInfosetDocument = Decoder.isFastInfosetDocument(document);
- document.reset();
-
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
- DocumentBuilder db = dbf.newDocumentBuilder();
-
- Document d;
- if (isFastInfosetDocument) {
- d = db.newDocument();
- DOMDocumentParser ddp = new DOMDocumentParser();
- ddp.parse(d, document);
- } else {
- if (workingDirectory != null) {
- db.setEntityResolver(createRelativePathResolver(workingDirectory));
- }
- d = db.parse(document);
- }
-
- SAXEventSerializer ses = new SAXEventSerializer(events);
-
- TransformerFactory tf = TransformerFactory.newInstance();
- Transformer t = tf.newTransformer();
- t.transform(new DOMSource(d), new SAXResult(ses));
- }
-
- public void parse(InputStream document, OutputStream events) throws Exception {
- parse(document, events, null);
- }
-
- public static void main(String[] args) throws Exception {
- FI_DOM_Or_XML_DOM_SAX_SAXEvent p = new FI_DOM_Or_XML_DOM_SAX_SAXEvent();
- p.parse(args);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_SAX_Or_XML_SAX_DOM_SAX_SAXEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_SAX_Or_XML_SAX_DOM_SAX_SAXEvent.java
deleted file mode 100644
index 627403e4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_SAX_Or_XML_SAX_DOM_SAX_SAXEvent.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import com.sun.xml.internal.fastinfoset.Decoder;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.sax.SAXSource;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSource;
-import java.io.BufferedInputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.sax.SAXResult;
-import javax.xml.transform.stream.StreamSource;
-import org.xml.sax.InputSource;
-import org.xml.sax.XMLReader;
-
-public class FI_SAX_Or_XML_SAX_DOM_SAX_SAXEvent extends TransformInputOutput {
-
- public FI_SAX_Or_XML_SAX_DOM_SAX_SAXEvent() {
- }
-
- public void parse(InputStream document, OutputStream events, String workingDirectory) throws Exception {
- if (!document.markSupported()) {
- document = new BufferedInputStream(document);
- }
-
- document.mark(4);
- boolean isFastInfosetDocument = Decoder.isFastInfosetDocument(document);
- document.reset();
-
- TransformerFactory tf = TransformerFactory.newInstance();
- Transformer t = tf.newTransformer();
- DOMResult dr = new DOMResult();
-
- if (isFastInfosetDocument) {
- t.transform(new FastInfosetSource(document), dr);
- } else if (workingDirectory != null) {
- SAXParser parser = getParser();
- XMLReader reader = parser.getXMLReader();
- reader.setEntityResolver(createRelativePathResolver(workingDirectory));
- SAXSource source = new SAXSource(reader, new InputSource(document));
-
- t.transform(source, dr);
- } else {
- t.transform(new StreamSource(document), dr);
- }
-
- SAXEventSerializer ses = new SAXEventSerializer(events);
- t.transform(new DOMSource(dr.getNode()), new SAXResult(ses));
- }
-
- public void parse(InputStream document, OutputStream events) throws Exception {
- parse(document, events, null);
- }
-
- private SAXParser getParser() {
- SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
- saxParserFactory.setNamespaceAware(true);
- try {
- return saxParserFactory.newSAXParser();
- } catch (Exception e) {
- return null;
- }
- }
-
- public static void main(String[] args) throws Exception {
- FI_SAX_Or_XML_SAX_DOM_SAX_SAXEvent p = new FI_SAX_Or_XML_SAX_DOM_SAX_SAXEvent();
- p.parse(args);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_SAX_Or_XML_SAX_SAXEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_SAX_Or_XML_SAX_SAXEvent.java
deleted file mode 100644
index 249e6f03..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_SAX_Or_XML_SAX_SAXEvent.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import com.sun.xml.internal.fastinfoset.Decoder;
-import com.sun.xml.internal.fastinfoset.sax.SAXDocumentParser;
-import com.sun.xml.internal.fastinfoset.sax.Properties;
-import java.io.BufferedInputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.InputSource;
-import org.xml.sax.XMLReader;
-
-public class FI_SAX_Or_XML_SAX_SAXEvent extends TransformInputOutput {
-
- public FI_SAX_Or_XML_SAX_SAXEvent() {
- }
-
- public void parse(InputStream document, OutputStream events, String workingDirectory) throws Exception {
- if (!document.markSupported()) {
- document = new BufferedInputStream(document);
- }
-
- document.mark(4);
- boolean isFastInfosetDocument = Decoder.isFastInfosetDocument(document);
- document.reset();
-
- if (isFastInfosetDocument) {
- SAXDocumentParser parser = new SAXDocumentParser();
- SAXEventSerializer ses = new SAXEventSerializer(events);
- parser.setContentHandler(ses);
- parser.setProperty(Properties.LEXICAL_HANDLER_PROPERTY, ses);
- parser.parse(document);
- } else {
- SAXParserFactory parserFactory = SAXParserFactory.newInstance();
- parserFactory.setNamespaceAware(true);
- SAXParser parser = parserFactory.newSAXParser();
- SAXEventSerializer ses = new SAXEventSerializer(events);
-
- XMLReader reader = parser.getXMLReader();
- reader.setProperty("http://xml.org/sax/properties/lexical-handler", ses);
- reader.setContentHandler(ses);
- if (workingDirectory != null) {
- reader.setEntityResolver(createRelativePathResolver(workingDirectory));
- }
- reader.parse(new InputSource(document));
- }
- }
-
- public void parse(InputStream document, OutputStream events) throws Exception {
- parse(document, events, null);
- }
-
- public static void main(String[] args) throws Exception {
- FI_SAX_Or_XML_SAX_SAXEvent p = new FI_SAX_Or_XML_SAX_SAXEvent();
- p.parse(args);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_SAX_XML.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_SAX_XML.java
deleted file mode 100644
index 7ffc2605..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_SAX_XML.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSource;
-import java.io.InputStream;
-import java.io.OutputStream;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamResult;
-
-public class FI_SAX_XML extends TransformInputOutput {
-
- public FI_SAX_XML() {
- }
-
- public void parse(InputStream finf, OutputStream xml) throws Exception {
- Transformer tx = TransformerFactory.newInstance().newTransformer();
- tx.transform(new FastInfosetSource(finf), new StreamResult(xml));
- }
-
- public static void main(String[] args) throws Exception {
- FI_SAX_XML p = new FI_SAX_XML();
- p.parse(args);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_StAX_SAX_Or_XML_SAX_SAXEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_StAX_SAX_Or_XML_SAX_SAXEvent.java
deleted file mode 100644
index b38e9865..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/FI_StAX_SAX_Or_XML_SAX_SAXEvent.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import com.sun.xml.internal.fastinfoset.Decoder;
-import com.sun.xml.internal.fastinfoset.sax.Properties;
-import com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser;
-import java.io.BufferedInputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import com.sun.xml.internal.fastinfoset.tools.StAX2SAXReader;
-
-public class FI_StAX_SAX_Or_XML_SAX_SAXEvent extends TransformInputOutput {
-
- public FI_StAX_SAX_Or_XML_SAX_SAXEvent() {
- }
-
- public void parse(InputStream document, OutputStream events) throws Exception {
- if (!document.markSupported()) {
- document = new BufferedInputStream(document);
- }
-
- document.mark(4);
- boolean isFastInfosetDocument = Decoder.isFastInfosetDocument(document);
- document.reset();
-
- if (isFastInfosetDocument) {
- StAXDocumentParser parser = new StAXDocumentParser();
- parser.setInputStream(document);
- SAXEventSerializer ses = new SAXEventSerializer(events);
- StAX2SAXReader reader = new StAX2SAXReader(parser, ses);
- reader.setLexicalHandler(ses);
- reader.adapt();
- } else {
- SAXParserFactory parserFactory = SAXParserFactory.newInstance();
- parserFactory.setNamespaceAware(true);
- SAXParser parser = parserFactory.newSAXParser();
- SAXEventSerializer ses = new SAXEventSerializer(events);
- parser.setProperty(Properties.LEXICAL_HANDLER_PROPERTY, ses);
- parser.parse(document, ses);
- }
- }
-
- public static void main(String[] args) throws Exception {
- FI_StAX_SAX_Or_XML_SAX_SAXEvent p = new FI_StAX_SAX_Or_XML_SAX_SAXEvent();
- p.parse(args);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/PrintTable.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/PrintTable.java
deleted file mode 100644
index 8b08b5c1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/PrintTable.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import java.io.File;
-
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import com.sun.xml.internal.fastinfoset.util.CharArrayArray;
-import com.sun.xml.internal.fastinfoset.util.ContiguousCharArrayArray;
-import com.sun.xml.internal.fastinfoset.util.PrefixArray;
-import com.sun.xml.internal.fastinfoset.util.QualifiedNameArray;
-import com.sun.xml.internal.fastinfoset.util.StringArray;
-import com.sun.xml.internal.fastinfoset.vocab.ParserVocabulary;
-
-
-public class PrintTable {
-
- /** Creates a new instance of PrintTable */
- public PrintTable() {
- }
-
- public static void printVocabulary(ParserVocabulary vocabulary) {
- printArray("Attribute Name Table", vocabulary.attributeName);
- printArray("Attribute Value Table", vocabulary.attributeValue);
- printArray("Character Content Chunk Table", vocabulary.characterContentChunk);
- printArray("Element Name Table", vocabulary.elementName);
- printArray("Local Name Table", vocabulary.localName);
- printArray("Namespace Name Table", vocabulary.namespaceName);
- printArray("Other NCName Table", vocabulary.otherNCName);
- printArray("Other String Table", vocabulary.otherString);
- printArray("Other URI Table", vocabulary.otherURI);
- printArray("Prefix Table", vocabulary.prefix);
- }
-
- public static void printArray(String title, StringArray a) {
- System.out.println(title);
-
- for (int i = 0; i < a.getSize(); i++) {
- System.out.println("" + (i + 1) + ": " + a.getArray()[i]);
- }
- }
-
- public static void printArray(String title, PrefixArray a) {
- System.out.println(title);
-
- for (int i = 0; i < a.getSize(); i++) {
- System.out.println("" + (i + 1) + ": " + a.getArray()[i]);
- }
- }
-
- public static void printArray(String title, CharArrayArray a) {
- System.out.println(title);
-
- for (int i = 0; i < a.getSize(); i++) {
- System.out.println("" + (i + 1) + ": " + a.getArray()[i]);
- }
- }
-
- public static void printArray(String title, ContiguousCharArrayArray a) {
- System.out.println(title);
-
- for (int i = 0; i < a.getSize(); i++) {
- System.out.println("" + (i + 1) + ": " + a.getString(i));
- }
- }
-
- public static void printArray(String title, QualifiedNameArray a) {
- System.out.println(title);
-
- for (int i = 0; i < a.getSize(); i++) {
- QualifiedName name = a.getArray()[i];
- System.out.println("" + (name.index + 1) + ": " +
- "{" + name.namespaceName + "}" +
- name.prefix + ":" + name.localName);
- }
- }
-
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- try {
- SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
- saxParserFactory.setNamespaceAware(true);
-
- SAXParser saxParser = saxParserFactory.newSAXParser();
-
- ParserVocabulary referencedVocabulary = new ParserVocabulary();
-
- VocabularyGenerator vocabularyGenerator = new VocabularyGenerator(referencedVocabulary);
- File f = new File(args[0]);
- saxParser.parse(f, vocabularyGenerator);
-
- printVocabulary(referencedVocabulary);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/SAX2StAXWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/SAX2StAXWriter.java
deleted file mode 100644
index b8636295..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/SAX2StAXWriter.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import java.util.ArrayList;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.DefaultHandler;
-
-public class SAX2StAXWriter extends DefaultHandler implements LexicalHandler {
- private static final Logger logger = Logger.getLogger(SAX2StAXWriter.class.getName());
-
- /**
- * XML stream writer where events are pushed.
- */
- XMLStreamWriter _writer;
-
- /**
- * List of namespace decl for upcoming element.
- */
- ArrayList _namespaces = new ArrayList();
-
- public SAX2StAXWriter(XMLStreamWriter writer) {
- _writer = writer;
- }
-
- public XMLStreamWriter getWriter() {
- return _writer;
- }
-
- public void startDocument() throws SAXException {
- try {
- _writer.writeStartDocument();
- }
- catch (XMLStreamException e) {
- throw new SAXException(e);
- }
- }
-
- public void endDocument() throws SAXException {
- try {
- _writer.writeEndDocument();
- _writer.flush();
- }
- catch (XMLStreamException e) {
- throw new SAXException(e);
- }
- }
-
- public void characters(char[] ch, int start, int length)
- throws SAXException
- {
- try {
- _writer.writeCharacters(ch, start, length);
- }
- catch (XMLStreamException e) {
- throw new SAXException(e);
- }
- }
-
- public void startElement(String namespaceURI, String localName,
- String qName, Attributes atts) throws SAXException
- {
- try {
- int k = qName.indexOf(':');
- String prefix = (k > 0) ? qName.substring(0, k) : "";
- _writer.writeStartElement(prefix, localName, namespaceURI);
-
- int length = _namespaces.size();
- for (int i = 0; i < length; i++) {
- QualifiedName nsh = (QualifiedName) _namespaces.get(i);
- _writer.writeNamespace(nsh.prefix, nsh.namespaceName);
- }
- _namespaces.clear();
-
- length = atts.getLength();
- for (int i = 0; i < length; i++) {
- _writer.writeAttribute(atts.getURI(i),
- atts.getLocalName(i),
- atts.getValue(i));
- }
- }
- catch (XMLStreamException e) {
- throw new SAXException(e);
- }
- }
-
- public void endElement(String namespaceURI, String localName,
- String qName) throws SAXException
- {
- try {
- _writer.writeEndElement();
- }
- catch (XMLStreamException e) {
- logger.log(Level.FINE, "Exception on endElement", e);
- throw new SAXException(e);
- }
- }
-
- public void startPrefixMapping(String prefix, String uri)
- throws SAXException
- {
- // Commented as in StAX NS are declared for current element?
- // now _writer.setPrefix() is invoked in _writer.writeNamespace()
-// try {
-// _writer.setPrefix(prefix, uri);
- _namespaces.add(new QualifiedName(prefix, uri));
-// }
-// catch (XMLStreamException e) {
-// throw new SAXException(e);
-// }
- }
-
- public void endPrefixMapping(String prefix) throws SAXException {
- }
-
- public void ignorableWhitespace(char[] ch, int start, int length)
- throws SAXException
- {
- characters(ch, start, length);
- }
-
- public void processingInstruction(String target, String data)
- throws SAXException
- {
- try {
- _writer.writeProcessingInstruction(target, data);
- }
- catch (XMLStreamException e) {
- throw new SAXException(e);
- }
- }
-
- public void setDocumentLocator(Locator locator) {
- }
-
- public void skippedEntity(String name) throws SAXException {
- }
-
- public void comment(char[] ch, int start, int length)
- throws SAXException
- {
- try {
- _writer.writeComment(new String(ch, start, length));
- }
- catch (XMLStreamException e) {
- throw new SAXException(e);
- }
- }
-
- public void endCDATA() throws SAXException {
- }
-
- public void endDTD() throws SAXException {
- }
-
- public void endEntity(String name) throws SAXException {
- }
-
- public void startCDATA() throws SAXException {
- }
-
- public void startDTD(String name, String publicId, String systemId) throws SAXException {
- }
-
- public void startEntity(String name) throws SAXException {
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/SAXEventSerializer.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/SAXEventSerializer.java
deleted file mode 100644
index 0429140a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/SAXEventSerializer.java
+++ /dev/null
@@ -1,423 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Stack;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.DefaultHandler;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class SAXEventSerializer extends DefaultHandler
- implements LexicalHandler {
-
- private Writer _writer;
- private boolean _charactersAreCDATA;
- private StringBuffer _characters;
-
- private Stack _namespaceStack = new Stack();
- protected List _namespaceAttributes;
-
- public SAXEventSerializer(OutputStream s) throws IOException {
- _writer = new OutputStreamWriter(s);
- _charactersAreCDATA = false;
- }
-
- // -- ContentHandler interface ---------------------------------------
-
- public void startDocument() throws SAXException {
- try {
- _writer.write("<sax xmlns=\"http://www.sun.com/xml/sax-events\">\n");
- _writer.write("<startDocument/>\n");
- _writer.flush();
- }
- catch (IOException e) {
- throw new SAXException(e);
- }
- }
-
- public void endDocument() throws SAXException {
- try {
- _writer.write("<endDocument/>\n");
- _writer.write("</sax>");
- _writer.flush();
- _writer.close();
- }
- catch (IOException e) {
- throw new SAXException(e);
- }
- }
-
-
- public void startPrefixMapping(String prefix, String uri)
- throws SAXException
- {
- if (_namespaceAttributes == null) {
- _namespaceAttributes = new ArrayList();
- }
-
- String qName = (prefix.length() == 0) ? "xmlns" : "xmlns" + prefix;
- AttributeValueHolder attribute = new AttributeValueHolder(
- qName,
- prefix,
- uri,
- null,
- null);
- _namespaceAttributes.add(attribute);
- }
-
- public void endPrefixMapping(String prefix)
- throws SAXException
- {
- /*
- try {
- outputCharacters();
-
- _writer.write("<endPrefixMapping prefix=\"" +
- prefix + "\"/>\n");
- _writer.flush();
- }
- catch (IOException e) {
- throw new SAXException(e);
- }
- */
- }
-
- public void startElement(String uri, String localName,
- String qName, Attributes attributes)
- throws SAXException
- {
- try {
- outputCharacters();
-
- if (_namespaceAttributes != null) {
-
- AttributeValueHolder[] attrsHolder = new AttributeValueHolder[0];
- attrsHolder = (AttributeValueHolder[])_namespaceAttributes.toArray(attrsHolder);
-
- // Sort attributes
- quicksort(attrsHolder, 0, attrsHolder.length - 1);
-
- for (int i = 0; i < attrsHolder.length; i++) {
- _writer.write("<startPrefixMapping prefix=\"" +
- attrsHolder[i].localName + "\" uri=\"" + attrsHolder[i].uri + "\"/>\n");
- _writer.flush();
- }
-
- _namespaceStack.push(attrsHolder);
- _namespaceAttributes = null;
- } else {
- _namespaceStack.push(null);
- }
-
- AttributeValueHolder[] attrsHolder =
- new AttributeValueHolder[attributes.getLength()];
- for (int i = 0; i < attributes.getLength(); i++) {
- attrsHolder[i] = new AttributeValueHolder(
- attributes.getQName(i),
- attributes.getLocalName(i),
- attributes.getURI(i),
- attributes.getType(i),
- attributes.getValue(i));
- }
-
- // Sort attributes
- quicksort(attrsHolder, 0, attrsHolder.length - 1);
-
- int attributeCount = 0;
- for (int i = 0; i < attrsHolder.length; i++) {
- if (attrsHolder[i].uri.equals("http://www.w3.org/2000/xmlns/")) {
- // Ignore XMLNS attributes
- continue;
- }
- attributeCount++;
- }
-
- if (attributeCount == 0) {
- _writer.write("<startElement uri=\"" + uri
- + "\" localName=\"" + localName + "\" qName=\""
- + qName + "\"/>\n");
- return;
- }
-
- _writer.write("<startElement uri=\"" + uri
- + "\" localName=\"" + localName + "\" qName=\""
- + qName + "\">\n");
-
- // Serialize attributes as children
- for (int i = 0; i < attrsHolder.length; i++) {
- if (attrsHolder[i].uri.equals("http://www.w3.org/2000/xmlns/")) {
- // Ignore XMLNS attributes
- continue;
- }
- _writer.write(
- " <attribute qName=\"" + attrsHolder[i].qName +
- "\" localName=\"" + attrsHolder[i].localName +
- "\" uri=\"" + attrsHolder[i].uri +
- // "\" type=\"" + attrsHolder[i].type +
- "\" value=\"" + attrsHolder[i].value +
- "\"/>\n");
- }
-
- _writer.write("</startElement>\n");
- _writer.flush();
- }
- catch (IOException e) {
- throw new SAXException(e);
- }
- }
-
- public void endElement(String uri, String localName, String qName)
- throws SAXException
- {
- try {
- outputCharacters();
-
- _writer.write("<endElement uri=\"" + uri
- + "\" localName=\"" + localName + "\" qName=\""
- + qName + "\"/>\n");
- _writer.flush();
-
- // Write out the end prefix here rather than waiting
- // for the explicit events
- AttributeValueHolder[] attrsHolder = (AttributeValueHolder[])_namespaceStack.pop();
- if (attrsHolder != null) {
- for (int i = 0; i < attrsHolder.length; i++) {
- _writer.write("<endPrefixMapping prefix=\"" +
- attrsHolder[i].localName + "\"/>\n");
- _writer.flush();
- }
- }
-
- }
- catch (IOException e) {
- throw new SAXException(e);
- }
- }
-
- public void characters(char[] ch, int start, int length)
- throws SAXException
- {
- if (length == 0) {
- return;
- }
-
- if (_characters == null) {
- _characters = new StringBuffer();
- }
-
- // Coalesce multiple character events
- _characters.append(ch, start, length);
-
- /*
- try {
- _writer.write("<characters>" +
- (_charactersAreCDATA ? "<![CDATA[" : "") +
- new String(ch, start, length) +
- (_charactersAreCDATA ? "]]>" : "") +
- "</characters>\n");
- _writer.flush();
- }
- catch (IOException e) {
- throw new SAXException(e);
- }
- */
- }
-
- private void outputCharacters() throws SAXException {
- if (_characters == null) {
- return;
- }
-
- try {
- _writer.write("<characters>" +
- (_charactersAreCDATA ? "<![CDATA[" : "") +
- _characters +
- (_charactersAreCDATA ? "]]>" : "") +
- "</characters>\n");
- _writer.flush();
-
- _characters = null;
- } catch (IOException e) {
- throw new SAXException(e);
- }
- }
-
- public void ignorableWhitespace(char[] ch, int start, int length)
- throws SAXException
- {
- // Report ignorable ws as characters (assumes validation off)
- characters(ch, start, length);
- }
-
- public void processingInstruction(String target, String data)
- throws SAXException
- {
- try {
- outputCharacters();
-
- _writer.write("<processingInstruction target=\"" + target
- + "\" data=\"" + data + "\"/>\n");
- _writer.flush();
- }
- catch (IOException e) {
- throw new SAXException(e);
- }
- }
-
- // -- LexicalHandler interface ---------------------------------------
-
- public void startDTD(String name, String publicId, String systemId)
- throws SAXException {
- // Not implemented
- }
-
- public void endDTD()
- throws SAXException {
- // Not implemented
- }
-
- public void startEntity(String name)
- throws SAXException {
- // Not implemented
- }
-
- public void endEntity(String name)
- throws SAXException {
- // Not implemented
- }
-
- public void startCDATA()
- throws SAXException {
- _charactersAreCDATA = true;
- }
-
- public void endCDATA()
- throws SAXException {
- _charactersAreCDATA = false;
- }
-
- public void comment(char[] ch, int start, int length)
- throws SAXException
- {
- try {
- outputCharacters();
-
- _writer.write("<comment>" +
- new String(ch, start, length) +
- "</comment>\n");
- _writer.flush();
- }
- catch (IOException e) {
- throw new SAXException(e);
- }
- }
-
- // -- Utility methods ------------------------------------------------
-
- private void quicksort(AttributeValueHolder[] attrs, int p, int r) {
- while (p < r) {
- final int q = partition(attrs, p, r);
- quicksort(attrs, p, q);
- p = q + 1;
- }
- }
-
- private int partition(AttributeValueHolder[] attrs, int p, int r) {
- AttributeValueHolder x = attrs[(p + r) >>> 1];
- int i = p - 1;
- int j = r + 1;
- while (true) {
- while (x.compareTo(attrs[--j]) < 0);
- while (x.compareTo(attrs[++i]) > 0);
- if (i < j) {
- final AttributeValueHolder t = attrs[i];
- attrs[i] = attrs[j];
- attrs[j] = t;
- }
- else {
- return j;
- }
- }
- }
-
- public static class AttributeValueHolder implements Comparable {
- public final String qName;
- public final String localName;
- public final String uri;
- public final String type;
- public final String value;
-
- public AttributeValueHolder(String qName,
- String localName,
- String uri,
- String type,
- String value)
- {
- this.qName = qName;
- this.localName = localName;
- this.uri = uri;
- this.type = type;
- this.value = value;
- }
-
- public int compareTo(Object o) {
- try {
- return qName.compareTo(((AttributeValueHolder) o).qName);
- } catch (Exception e) {
- throw new RuntimeException(CommonResourceBundle.getInstance().getString("message.AttributeValueHolderExpected"));
- }
- }
-
- @Override
- public boolean equals(Object o) {
- try {
- return (o instanceof AttributeValueHolder) &&
- qName.equals(((AttributeValueHolder) o).qName);
- } catch (Exception e) {
- throw new RuntimeException(CommonResourceBundle.getInstance().getString("message.AttributeValueHolderExpected"));
- }
- }
-
- @Override
- public int hashCode() {
- int hash = 7;
- hash = 97 * hash + (this.qName != null ? this.qName.hashCode() : 0);
- return hash;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/StAX2SAXReader.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/StAX2SAXReader.java
deleted file mode 100644
index d5060d6e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/StAX2SAXReader.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.AttributesImpl;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class StAX2SAXReader {
-
- /**
- * Content handler where events are pushed.
- */
- ContentHandler _handler;
-
- /**
- * Lexical handler to report lexical events.
- */
- LexicalHandler _lexicalHandler;
-
- /**
- * XML stream reader where events are pulled.
- */
- XMLStreamReader _reader;
-
- public StAX2SAXReader(XMLStreamReader reader, ContentHandler handler) {
- _handler = handler;
- _reader = reader;
- }
-
- public StAX2SAXReader(XMLStreamReader reader) {
- _reader = reader;
- }
-
- public void setContentHandler(ContentHandler handler) {
- _handler = handler;
- }
-
- public void setLexicalHandler(LexicalHandler lexicalHandler) {
- _lexicalHandler = lexicalHandler;
- }
-
- public void adapt() throws XMLStreamException, SAXException {
- QName qname;
- String prefix, localPart;
- AttributesImpl attrs = new AttributesImpl();
- char[] buffer;
- int nsc;
- int nat;
-
- _handler.startDocument();
-
- try {
-
- while (_reader.hasNext()) {
- int event = _reader.next();
-
-
- switch(event) {
- case XMLStreamConstants.START_ELEMENT: {
- // Report namespace events first
- nsc = _reader.getNamespaceCount();
- for (int i = 0; i < nsc; i++) {
- _handler.startPrefixMapping(_reader.getNamespacePrefix(i),
- _reader.getNamespaceURI(i));
- }
-
- // Collect list of attributes
- attrs.clear();
- nat = _reader.getAttributeCount();
- for (int i = 0; i < nat; i++) {
- QName q = _reader.getAttributeName(i);
- String qName = _reader.getAttributePrefix(i);
- if (qName == null || qName == "") {
- qName = q.getLocalPart();
- } else {
- qName = qName + ":" + q.getLocalPart();
- }
- attrs.addAttribute(_reader.getAttributeNamespace(i),
- q.getLocalPart(),
- qName,
- _reader.getAttributeType(i),
- _reader.getAttributeValue(i));
- }
-
- // Report start element
- qname = _reader.getName();
- prefix = qname.getPrefix();
- localPart = qname.getLocalPart();
-
- _handler.startElement(_reader.getNamespaceURI(),
- localPart,
- (prefix.length() > 0) ?
- (prefix + ":" + localPart) : localPart,
- attrs);
- break;
- }
- case XMLStreamConstants.END_ELEMENT: {
- // Report end element
- qname = _reader.getName();
- prefix = qname.getPrefix();
- localPart = qname.getLocalPart();
-
- _handler.endElement(_reader.getNamespaceURI(),
- localPart,
- (prefix.length() > 0) ?
- (prefix + ":" + localPart) : localPart);
-
- // Report end namespace events
- nsc = _reader.getNamespaceCount();
- for (int i = 0; i < nsc; i++) {
- _handler.endPrefixMapping(_reader.getNamespacePrefix(i));
- }
- break;
- }
- case XMLStreamConstants.CHARACTERS:
- _handler.characters(_reader.getTextCharacters(), _reader.getTextStart(), _reader.getTextLength());
- break;
- case XMLStreamConstants.COMMENT:
- _lexicalHandler.comment(_reader.getTextCharacters(), _reader.getTextStart(), _reader.getTextLength());
- break;
- case XMLStreamConstants.PROCESSING_INSTRUCTION:
- _handler.processingInstruction(_reader.getPITarget(), _reader.getPIData());
- break;
- case XMLStreamConstants.END_DOCUMENT:
- break;
- default:
- throw new RuntimeException(CommonResourceBundle.getInstance().getString("message.StAX2SAXReader", new Object[]{Integer.valueOf(event)}));
- } // switch
- }
- }
- catch (XMLStreamException e) {
- _handler.endDocument(); // flush whatever we have
- throw e;
- }
-
- _handler.endDocument();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/TransformInputOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/TransformInputOutput.java
deleted file mode 100644
index a8c1f306..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/TransformInputOutput.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-public abstract class TransformInputOutput {
-
- /** Creates a new instance of TransformInputOutput */
- public TransformInputOutput() {
- }
-
- public void parse(String[] args) throws Exception {
- InputStream in = null;
- OutputStream out = null;
- if (args.length == 0) {
- in = new BufferedInputStream(System.in);
- out = new BufferedOutputStream(System.out);
- } else if (args.length == 1) {
- in = new BufferedInputStream(new FileInputStream(args[0]));
- out = new BufferedOutputStream(System.out);
- } else if (args.length == 2) {
- in = new BufferedInputStream(new FileInputStream(args[0]));
- out = new BufferedOutputStream(new FileOutputStream(args[1]));
- } else {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.optinalFileNotSpecified"));
- }
-
- parse(in, out);
- }
-
- abstract public void parse(InputStream in, OutputStream out) throws Exception;
-
- // parse alternative with current working directory parameter
- // is used to process xml documents, which have external imported entities
- public void parse(InputStream in, OutputStream out, String workingDirectory) throws Exception {
- throw new UnsupportedOperationException();
- }
-
- private static URI currentJavaWorkingDirectory;
- static {
- currentJavaWorkingDirectory = new File(System.getProperty("user.dir")).toURI();
- }
-
- protected static EntityResolver createRelativePathResolver(final String workingDirectory) {
- return new EntityResolver() {
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
- if (systemId != null && systemId.startsWith("file:/")) {
- URI workingDirectoryURI = new File(workingDirectory).toURI();
- URI workingFile;
- try {
- // Construction new File(new URI(String)).toURI() is used to be sure URI has correct representation without redundant '/'
- workingFile = convertToNewWorkingDirectory(currentJavaWorkingDirectory, workingDirectoryURI, new File(new URI(systemId)).toURI());
- return new InputSource(workingFile.toString());
- } catch (URISyntaxException ex) {
- //Should not get here
- }
- }
- return null;
- }
- };
- }
-
- private static URI convertToNewWorkingDirectory(URI oldwd, URI newwd, URI file) throws IOException, URISyntaxException {
- String oldwdStr = oldwd.toString();
- String newwdStr = newwd.toString();
- String fileStr = file.toString();
-
- String cmpStr = null;
- // In simpliest case <user.dir>/file.xml - do it faster
- if (fileStr.startsWith(oldwdStr) && (cmpStr = fileStr.substring(oldwdStr.length())).indexOf('/') == -1) {
- return new URI(newwdStr + '/' + cmpStr);
- }
-
- String[] oldwdSplit = oldwdStr.split("/");
- String[] newwdSplit = newwdStr.split("/");
- String[] fileSplit = fileStr.split("/");
-
- int diff;
- for (diff = 0; diff < oldwdSplit.length && diff < fileSplit.length; diff++) {
- if (!oldwdSplit[diff].equals(fileSplit[diff])) {
- break;
- }
- }
-
- int diffNew;
- for(diffNew=0; diffNew<newwdSplit.length && diffNew<fileSplit.length; diffNew++) {
- if (!newwdSplit[diffNew].equals(fileSplit[diffNew])) {
- break;
- }
- }
-
- //Workaround for case, when extrnal imported entity has imports other entity
- //in that case systemId has correct path, not based on user.dir
- if (diffNew > diff) {
- return file;
- }
-
- int elemsToSub = oldwdSplit.length - diff;
- StringBuffer resultStr = new StringBuffer(100);
- for(int i=0; i<newwdSplit.length - elemsToSub; i++) {
- resultStr.append(newwdSplit[i]);
- resultStr.append('/');
- }
-
- for(int i=diff; i<fileSplit.length; i++) {
- resultStr.append(fileSplit[i]);
- if (i < fileSplit.length - 1) resultStr.append('/');
- }
-
- return new URI(resultStr.toString());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/VocabularyGenerator.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/VocabularyGenerator.java
deleted file mode 100644
index 3b5280b0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/VocabularyGenerator.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import com.sun.xml.internal.fastinfoset.util.CharArray;
-import com.sun.xml.internal.fastinfoset.util.DuplicateAttributeVerifier;
-import com.sun.xml.internal.fastinfoset.util.KeyIntMap;
-import com.sun.xml.internal.fastinfoset.util.LocalNameQualifiedNamesMap;
-import com.sun.xml.internal.fastinfoset.util.PrefixArray;
-import com.sun.xml.internal.fastinfoset.util.QualifiedNameArray;
-import com.sun.xml.internal.fastinfoset.util.StringArray;
-import com.sun.xml.internal.fastinfoset.util.StringIntMap;
-import com.sun.xml.internal.fastinfoset.vocab.ParserVocabulary;
-import com.sun.xml.internal.fastinfoset.vocab.SerializerVocabulary;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.DefaultHandler;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-import java.util.Set;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSerializer;
-
-public class VocabularyGenerator extends DefaultHandler implements LexicalHandler {
-
- protected SerializerVocabulary _serializerVocabulary;
- protected ParserVocabulary _parserVocabulary;
- protected com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary _v;
-
- protected int attributeValueSizeConstraint = FastInfosetSerializer.MAX_ATTRIBUTE_VALUE_SIZE;
-
- protected int characterContentChunkSizeContraint = FastInfosetSerializer.MAX_CHARACTER_CONTENT_CHUNK_SIZE;
-
- /** Creates a new instance of VocabularyGenerator */
- public VocabularyGenerator() {
- _serializerVocabulary = new SerializerVocabulary();
- _parserVocabulary = new ParserVocabulary();
-
- _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
- }
-
- public VocabularyGenerator(SerializerVocabulary serializerVocabulary) {
- _serializerVocabulary = serializerVocabulary;
- _parserVocabulary = new ParserVocabulary();
-
- _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
- }
-
- public VocabularyGenerator(ParserVocabulary parserVocabulary) {
- _serializerVocabulary = new SerializerVocabulary();
- _parserVocabulary = parserVocabulary;
-
- _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
- }
-
- /** Creates a new instance of VocabularyGenerator */
- public VocabularyGenerator(SerializerVocabulary serializerVocabulary, ParserVocabulary parserVocabulary) {
- _serializerVocabulary = serializerVocabulary;
- _parserVocabulary = parserVocabulary;
-
- _v = new com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary();
- }
-
- public com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary getVocabulary() {
- return _v;
- }
-
- public void setCharacterContentChunkSizeLimit(int size) {
- if (size < 0 ) {
- size = 0;
- }
-
- characterContentChunkSizeContraint = size;
- }
-
- public int getCharacterContentChunkSizeLimit() {
- return characterContentChunkSizeContraint;
- }
-
- public void setAttributeValueSizeLimit(int size) {
- if (size < 0 ) {
- size = 0;
- }
-
- attributeValueSizeConstraint = size;
- }
-
- public int getAttributeValueSizeLimit() {
- return attributeValueSizeConstraint;
- }
-
- // ContentHandler
-
- public void startDocument() throws SAXException {
- }
-
- public void endDocument() throws SAXException {
- }
-
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
- addToTable(prefix, _v.prefixes, _serializerVocabulary.prefix, _parserVocabulary.prefix);
- addToTable(uri, _v.namespaceNames, _serializerVocabulary.namespaceName, _parserVocabulary.namespaceName);
- }
-
- public void endPrefixMapping(String prefix) throws SAXException {
- }
-
- public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
- addToNameTable(namespaceURI, qName, localName,
- _v.elements, _serializerVocabulary.elementName, _parserVocabulary.elementName, false);
-
- for (int a = 0; a < atts.getLength(); a++) {
- addToNameTable(atts.getURI(a), atts.getQName(a), atts.getLocalName(a),
- _v.attributes, _serializerVocabulary.attributeName, _parserVocabulary.attributeName, true);
-
- String value = atts.getValue(a);
- if (value.length() < attributeValueSizeConstraint) {
- addToTable(value, _v.attributeValues, _serializerVocabulary.attributeValue, _parserVocabulary.attributeValue);
- }
- }
- }
-
- public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
- }
-
- public void characters(char[] ch, int start, int length) throws SAXException {
- if (length < characterContentChunkSizeContraint) {
- addToCharArrayTable(new CharArray(ch, start, length, true));
- }
- }
-
- public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
- }
-
- public void processingInstruction(String target, String data) throws SAXException {
- }
-
- public void setDocumentLocator(org.xml.sax.Locator locator) {
- }
-
- public void skippedEntity(String name) throws SAXException {
- }
-
-
-
- // LexicalHandler
-
- public void comment(char[] ch, int start, int length) throws SAXException {
- }
-
- public void startCDATA() throws SAXException {
- }
-
- public void endCDATA() throws SAXException {
- }
-
- public void startDTD(String name, String publicId, String systemId) throws SAXException {
- }
-
- public void endDTD() throws SAXException {
- }
-
- public void startEntity(String name) throws SAXException {
- }
-
- public void endEntity(String name) throws SAXException {
- }
-
-
- public void addToTable(String s, Set v, StringIntMap m, StringArray a) {
- if (s.length() == 0) {
- return;
- }
-
- if (m.obtainIndex(s) == KeyIntMap.NOT_PRESENT) {
- a.add(s);
- }
-
- v.add(s);
- }
-
- public void addToTable(String s, Set v, StringIntMap m, PrefixArray a) {
- if (s.length() == 0) {
- return;
- }
-
- if (m.obtainIndex(s) == KeyIntMap.NOT_PRESENT) {
- a.add(s);
- }
-
- v.add(s);
- }
-
- public void addToCharArrayTable(CharArray c) {
- if (_serializerVocabulary.characterContentChunk.obtainIndex(c.ch, c.start, c.length, false) == KeyIntMap.NOT_PRESENT) {
- _parserVocabulary.characterContentChunk.add(c.ch, c.length);
- }
-
- _v.characterContentChunks.add(c.toString());
- }
-
- public void addToNameTable(String namespaceURI, String qName, String localName,
- Set v, LocalNameQualifiedNamesMap m, QualifiedNameArray a,
- boolean isAttribute) throws SAXException {
- LocalNameQualifiedNamesMap.Entry entry = m.obtainEntry(qName);
- if (entry._valueIndex > 0) {
- QualifiedName[] names = entry._value;
- for (int i = 0; i < entry._valueIndex; i++) {
- if ((namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) {
- return;
- }
- }
- }
-
- String prefix = getPrefixFromQualifiedName(qName);
-
- int namespaceURIIndex = -1;
- int prefixIndex = -1;
- int localNameIndex = -1;
- if (namespaceURI.length() > 0) {
- namespaceURIIndex = _serializerVocabulary.namespaceName.get(namespaceURI);
- if (namespaceURIIndex == KeyIntMap.NOT_PRESENT) {
- throw new SAXException(CommonResourceBundle.getInstance().
- getString("message.namespaceURINotIndexed", new Object[]{Integer.valueOf(namespaceURIIndex)}));
- }
-
- if (prefix.length() > 0) {
- prefixIndex = _serializerVocabulary.prefix.get(prefix);
- if (prefixIndex == KeyIntMap.NOT_PRESENT) {
- throw new SAXException(CommonResourceBundle.getInstance().
- getString("message.prefixNotIndexed", new Object[]{Integer.valueOf(prefixIndex)}));
- }
- }
- }
-
- localNameIndex = _serializerVocabulary.localName.obtainIndex(localName);
- if (localNameIndex == KeyIntMap.NOT_PRESENT) {
- _parserVocabulary.localName.add(localName);
- localNameIndex = _parserVocabulary.localName.getSize() - 1;
- }
- QualifiedName name = new QualifiedName(prefix, namespaceURI, localName, m.getNextIndex(),
- prefixIndex, namespaceURIIndex, localNameIndex);
- if (isAttribute) {
- name.createAttributeValues(DuplicateAttributeVerifier.MAP_SIZE);
- }
- entry.addQualifiedName(name);
- a.add(name);
-
- v.add(name.getQName());
- }
-
- public static String getPrefixFromQualifiedName(String qName) {
- int i = qName.indexOf(':');
- String prefix = "";
- if (i != -1) {
- prefix = qName.substring(0, i);
- }
- return prefix;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_DOM_FI.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_DOM_FI.java
deleted file mode 100644
index 90c8f74e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_DOM_FI.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import com.sun.xml.internal.fastinfoset.dom.DOMDocumentSerializer;
-import java.io.InputStream;
-import java.io.OutputStream;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import org.w3c.dom.Document;
-
-public class XML_DOM_FI extends TransformInputOutput {
-
- public XML_DOM_FI() {
- }
-
- public void parse(InputStream document, OutputStream finf, String workingDirectory) throws Exception {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
- DocumentBuilder db = dbf.newDocumentBuilder();
- if (workingDirectory != null) {
- db.setEntityResolver(createRelativePathResolver(workingDirectory));
- }
- Document d = db.parse(document);
-
- DOMDocumentSerializer s = new DOMDocumentSerializer();
- s.setOutputStream(finf);
- s.serialize(d);
- }
-
- public void parse(InputStream document, OutputStream finf) throws Exception {
- parse(document, finf, null);
- }
-
- public static void main(String[] args) throws Exception {
- XML_DOM_FI p = new XML_DOM_FI();
- p.parse(args);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_DOM_SAX_FI.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_DOM_SAX_FI.java
deleted file mode 100644
index fbb70111..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_DOM_SAX_FI.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetResult;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-
-import org.w3c.dom.Document;
-
-public class XML_DOM_SAX_FI extends TransformInputOutput {
-
- public XML_DOM_SAX_FI() {
- }
-
- public void parse(InputStream document, OutputStream finf, String workingDirectory) throws Exception {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
- DocumentBuilder db = dbf.newDocumentBuilder();
- if (workingDirectory != null) {
- db.setEntityResolver(createRelativePathResolver(workingDirectory));
- }
- Document d = db.parse(document);
-
- TransformerFactory tf = TransformerFactory.newInstance();
- Transformer t = tf.newTransformer();
- t.transform(new DOMSource(d), new FastInfosetResult(finf));
- }
-
- public void parse(InputStream document, OutputStream finf) throws Exception {
- parse(document, finf, null);
- }
-
- public static void main(String[] args) throws Exception {
- XML_DOM_SAX_FI p = new XML_DOM_SAX_FI();
- p.parse(args);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_SAX_FI.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_SAX_FI.java
deleted file mode 100644
index 8c636819..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_SAX_FI.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import com.sun.xml.internal.fastinfoset.sax.SAXDocumentSerializer;
-import java.io.InputStream;
-import java.io.OutputStream;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import java.io.Reader;
-import org.xml.sax.InputSource;
-import org.xml.sax.XMLReader;
-
-public class XML_SAX_FI extends TransformInputOutput {
-
- public XML_SAX_FI() {
- }
-
- public void parse(InputStream xml, OutputStream finf, String workingDirectory) throws Exception {
- SAXParser saxParser = getParser();
- SAXDocumentSerializer documentSerializer = getSerializer(finf);
-
- XMLReader reader = saxParser.getXMLReader();
- reader.setProperty("http://xml.org/sax/properties/lexical-handler", documentSerializer);
- reader.setContentHandler(documentSerializer);
-
- if (workingDirectory != null) {
- reader.setEntityResolver(createRelativePathResolver(workingDirectory));
- }
- reader.parse(new InputSource(xml));
- }
-
- public void parse(InputStream xml, OutputStream finf) throws Exception {
- parse(xml, finf, null);
- }
-
- public void convert(Reader reader, OutputStream finf) throws Exception {
- InputSource is = new InputSource(reader);
-
- SAXParser saxParser = getParser();
- SAXDocumentSerializer documentSerializer = getSerializer(finf);
-
- saxParser.setProperty("http://xml.org/sax/properties/lexical-handler", documentSerializer);
- saxParser.parse(is, documentSerializer);
- }
-
- private SAXParser getParser() {
- SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
- saxParserFactory.setNamespaceAware(true);
- try {
- return saxParserFactory.newSAXParser();
- } catch (Exception e) {
- return null;
- }
- }
-
- private SAXDocumentSerializer getSerializer(OutputStream finf) {
- SAXDocumentSerializer documentSerializer = new SAXDocumentSerializer();
- documentSerializer.setOutputStream(finf);
- return documentSerializer;
- }
-
- public static void main(String[] args) throws Exception {
- XML_SAX_FI s = new XML_SAX_FI();
- s.parse(args);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_SAX_StAX_FI.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_SAX_StAX_FI.java
deleted file mode 100644
index 841ddea3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/tools/XML_SAX_StAX_FI.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.tools;
-
-import com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer;
-import java.io.InputStream;
-import java.io.OutputStream;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.InputSource;
-import org.xml.sax.XMLReader;
-
-public class XML_SAX_StAX_FI extends TransformInputOutput {
-
- public XML_SAX_StAX_FI() {
- }
-
- public void parse(InputStream xml, OutputStream finf, String workingDirectory) throws Exception {
- StAXDocumentSerializer documentSerializer = new StAXDocumentSerializer();
- documentSerializer.setOutputStream(finf);
-
- SAX2StAXWriter saxTostax = new SAX2StAXWriter(documentSerializer);
-
- SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
- saxParserFactory.setNamespaceAware(true);
- SAXParser saxParser = saxParserFactory.newSAXParser();
-
- XMLReader reader = saxParser.getXMLReader();
- reader.setProperty("http://xml.org/sax/properties/lexical-handler", saxTostax);
- reader.setContentHandler(saxTostax);
-
- if (workingDirectory != null) {
- reader.setEntityResolver(createRelativePathResolver(workingDirectory));
- }
- reader.parse(new InputSource(xml));
-
- xml.close();
- finf.close();
- }
-
- public void parse(InputStream xml, OutputStream finf) throws Exception {
- parse(xml, finf, null);
- }
-
- public static void main(String[] args) throws Exception {
- XML_SAX_StAX_FI s = new XML_SAX_StAX_FI();
- s.parse(args);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArray.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArray.java
deleted file mode 100644
index 0ea7b6e1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArray.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-
-public class CharArray implements CharSequence {
- public char[] ch;
- public int start;
- public int length;
-
- protected int _hash;
-
- protected CharArray() {
- }
-
- public CharArray(char[] _ch, int _start, int _length, boolean copy) {
- set(_ch, _start, _length, copy);
- }
-
- public final void set(char[] _ch, int _start, int _length, boolean copy) {
- if (copy) {
- ch = new char[_length];
- start = 0;
- length = _length;
- System.arraycopy(_ch, _start, ch, 0, _length);
- } else {
- ch = _ch;
- start = _start;
- length = _length;
- }
- _hash = 0;
- }
-
- public final void cloneArray() {
- char[] _ch = new char[length];
- System.arraycopy(ch, start, _ch, 0, length);
- ch = _ch;
- start = 0;
- }
-
- public String toString() {
- return new String(ch, start, length);
- }
-
- public int hashCode() {
- if (_hash == 0) {
- // Same hash code algorithm as used for String
- // s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]
- for (int i = start; i < start + length; i++) {
- _hash = 31*_hash + ch[i];
- }
- }
- return _hash;
- }
-
- public static final int hashCode(char[] ch, int start, int length) {
- // Same hash code algorithm as used for String
- // s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]
- int hash = 0;
- for (int i = start; i < start + length; i++) {
- hash = 31*hash + ch[i];
- }
-
- return hash;
- }
-
- public final boolean equalsCharArray(CharArray cha) {
- if (this == cha) {
- return true;
- }
-
- if (length == cha.length) {
- int n = length;
- int i = start;
- int j = cha.start;
- while (n-- != 0) {
- if (ch[i++] != cha.ch[j++])
- return false;
- }
- return true;
- }
-
- return false;
- }
-
- public final boolean equalsCharArray(char[] ch, int start, int length) {
- if (this.length == length) {
- int n = this.length;
- int i = this.start;
- int j = start;
- while (n-- != 0) {
- if (this.ch[i++] != ch[j++])
- return false;
- }
- return true;
- }
-
- return false;
- }
-
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj instanceof CharArray) {
- CharArray cha = (CharArray)obj;
- if (length == cha.length) {
- int n = length;
- int i = start;
- int j = cha.start;
- while (n-- != 0) {
- if (ch[i++] != cha.ch[j++])
- return false;
- }
- return true;
- }
- }
- return false;
- }
-
- // CharSequence interface
-
- public final int length() {
- return length;
- }
-
- public final char charAt(int index) {
- return ch[start + index];
- }
-
- public final CharSequence subSequence(int start, int end) {
- return new CharArray(ch, this.start + start, end - start, false);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArrayArray.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArrayArray.java
deleted file mode 100644
index 0ff6c756..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArrayArray.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class CharArrayArray extends ValueArray {
-
- private CharArray[] _array;
-
- private CharArrayArray _readOnlyArray;
-
- public CharArrayArray(int initialCapacity, int maximumCapacity) {
- _array = new CharArray[initialCapacity];
- _maximumCapacity = maximumCapacity;
- }
-
- public CharArrayArray() {
- this(DEFAULT_CAPACITY, MAXIMUM_CAPACITY);
- }
-
- public final void clear() {
- for (int i = 0; i < _size; i++) {
- _array[i] = null;
- }
- _size = 0;
- }
-
- /**
- * Returns cloned version of internal CharArray[].
- * @return cloned version of internal CharArray[].
- */
- public final CharArray[] getArray() {
- if (_array == null) return null;
-
- final CharArray[] clonedArray = new CharArray[_array.length];
- System.arraycopy(_array, 0, clonedArray, 0, _array.length);
- return clonedArray;
- }
-
- public final void setReadOnlyArray(ValueArray readOnlyArray, boolean clear) {
- if (!(readOnlyArray instanceof CharArrayArray)) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.illegalClass", new Object[]{readOnlyArray}));
- }
-
- setReadOnlyArray((CharArrayArray)readOnlyArray, clear);
- }
-
- public final void setReadOnlyArray(CharArrayArray readOnlyArray, boolean clear) {
- if (readOnlyArray != null) {
- _readOnlyArray = readOnlyArray;
- _readOnlyArraySize = readOnlyArray.getSize();
-
- if (clear) {
- clear();
- }
- }
- }
-
- public final CharArray get(int i) {
- if (_readOnlyArray == null) {
- return _array[i];
- } else {
- if (i < _readOnlyArraySize) {
- return _readOnlyArray.get(i);
- } else {
- return _array[i - _readOnlyArraySize];
- }
- }
- }
-
- public final void add(CharArray s) {
- if (_size == _array.length) {
- resize();
- }
-
- _array[_size++] = s;
- }
-
- protected final void resize() {
- if (_size == _maximumCapacity) {
- throw new ValueArrayResourceException(CommonResourceBundle.getInstance().getString("message.arrayMaxCapacity"));
- }
-
- int newSize = _size * 3 / 2 + 1;
- if (newSize > _maximumCapacity) {
- newSize = _maximumCapacity;
- }
-
- final CharArray[] newArray = new CharArray[newSize];
- System.arraycopy(_array, 0, newArray, 0, _size);
- _array = newArray;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArrayIntMap.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArrayIntMap.java
deleted file mode 100644
index 8500348c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArrayIntMap.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class CharArrayIntMap extends KeyIntMap {
-
- private CharArrayIntMap _readOnlyMap;
-
- // Total character count of Map
- protected int _totalCharacterCount;
-
- static class Entry extends BaseEntry {
- final char[] _ch;
- final int _start;
- final int _length;
- Entry _next;
-
- public Entry(char[] ch, int start, int length, int hash, int value, Entry next) {
- super(hash, value);
- _ch = ch;
- _start = start;
- _length = length;
- _next = next;
- }
-
- public final boolean equalsCharArray(char[] ch, int start, int length) {
- if (_length == length) {
- int n = _length;
- int i = _start;
- int j = start;
- while (n-- != 0) {
- if (_ch[i++] != ch[j++])
- return false;
- }
- return true;
- }
-
- return false;
- }
-
- }
-
- private Entry[] _table;
-
- public CharArrayIntMap(int initialCapacity, float loadFactor) {
- super(initialCapacity, loadFactor);
-
- _table = new Entry[_capacity];
- }
-
- public CharArrayIntMap(int initialCapacity) {
- this(initialCapacity, DEFAULT_LOAD_FACTOR);
- }
-
- public CharArrayIntMap() {
- this(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR);
- }
-
- public final void clear() {
- for (int i = 0; i < _table.length; i++) {
- _table[i] = null;
- }
- _size = 0;
- _totalCharacterCount = 0;
- }
-
- public final void setReadOnlyMap(KeyIntMap readOnlyMap, boolean clear) {
- if (!(readOnlyMap instanceof CharArrayIntMap)) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().
- getString("message.illegalClass", new Object[]{readOnlyMap}));
- }
-
- setReadOnlyMap((CharArrayIntMap)readOnlyMap, clear);
- }
-
- public final void setReadOnlyMap(CharArrayIntMap readOnlyMap, boolean clear) {
- _readOnlyMap = readOnlyMap;
- if (_readOnlyMap != null) {
- _readOnlyMapSize = _readOnlyMap.size();
-
- if (clear) {
- clear();
- }
- } else {
- _readOnlyMapSize = 0;
- }
- }
-
- /**
- * Method returns an index of the passed character buffer in
- * <code>CharArrayIntMap</code>.
- *
- * @return index of character buffer in <code>CharArrayIntMap</code>,
- * otherwise NOT_PRESENT.
- */
- public final int get(char[] ch, int start, int length) {
- final int hash = hashHash(CharArray.hashCode(ch, start, length));
- return get(ch, start, length, hash);
- }
-
- /**
- * Method returns an index of the passed character buffer in
- * <code>CharArrayIntMap</code>. If character buffer is not in
- * <code>CharArrayIntMap</code> - it will be added.
- *
- * @return index of character buffer in <code>CharArrayIntMap</code>, or
- * NOT_PRESENT if character buffer was just added.
- */
- public final int obtainIndex(char[] ch, int start, int length, boolean clone) {
- final int hash = hashHash(CharArray.hashCode(ch, start, length));
-
- if (_readOnlyMap != null) {
- final int index = _readOnlyMap.get(ch, start, length, hash);
- if (index != -1) {
- return index;
- }
- }
-
- final int tableIndex = indexFor(hash, _table.length);
- for (Entry e = _table[tableIndex]; e != null; e = e._next) {
- if (e._hash == hash && e.equalsCharArray(ch, start, length)) {
- return e._value;
- }
- }
-
- if (clone) {
- char[] chClone = new char[length];
- System.arraycopy(ch, start, chClone, 0, length);
-
- ch = chClone;
- start = 0;
- }
-
- addEntry(ch, start, length, hash, _size + _readOnlyMapSize, tableIndex);
- return NOT_PRESENT;
- }
-
- public final int getTotalCharacterCount() {
- return _totalCharacterCount;
- }
-
- private final int get(char[] ch, int start, int length, int hash) {
- if (_readOnlyMap != null) {
- final int i = _readOnlyMap.get(ch, start, length, hash);
- if (i != -1) {
- return i;
- }
- }
-
- final int tableIndex = indexFor(hash, _table.length);
- for (Entry e = _table[tableIndex]; e != null; e = e._next) {
- if (e._hash == hash && e.equalsCharArray(ch, start, length)) {
- return e._value;
- }
- }
-
- return NOT_PRESENT;
- }
-
- private final void addEntry(char[] ch, int start, int length, int hash, int value, int bucketIndex) {
- Entry e = _table[bucketIndex];
- _table[bucketIndex] = new Entry(ch, start, length, hash, value, e);
- _totalCharacterCount += length;
- if (_size++ >= _threshold) {
- resize(2 * _table.length);
- }
- }
-
- private final void resize(int newCapacity) {
- _capacity = newCapacity;
- Entry[] oldTable = _table;
- int oldCapacity = oldTable.length;
- if (oldCapacity == MAXIMUM_CAPACITY) {
- _threshold = Integer.MAX_VALUE;
- return;
- }
-
- Entry[] newTable = new Entry[_capacity];
- transfer(newTable);
- _table = newTable;
- _threshold = (int)(_capacity * _loadFactor);
- }
-
- private final void transfer(Entry[] newTable) {
- Entry[] src = _table;
- int newCapacity = newTable.length;
- for (int j = 0; j < src.length; j++) {
- Entry e = src[j];
- if (e != null) {
- src[j] = null;
- do {
- Entry next = e._next;
- int i = indexFor(e._hash, newCapacity);
- e._next = newTable[i];
- newTable[i] = e;
- e = next;
- } while (e != null);
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArrayString.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArrayString.java
deleted file mode 100644
index 0377f83c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/CharArrayString.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-
-public class CharArrayString extends CharArray {
- protected String _s;
-
- public CharArrayString(String s) {
- this(s, true);
- }
-
- public CharArrayString(String s, boolean createArray) {
- _s = s;
- if (createArray) {
- ch = _s.toCharArray();
- start = 0;
- length = ch.length;
- }
- }
-
- public String toString() {
- return _s;
- }
-
- public int hashCode() {
- return _s.hashCode();
- }
-
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj instanceof CharArrayString) {
- CharArrayString chas = (CharArrayString)obj;
- return _s.equals(chas._s);
- } else if (obj instanceof CharArray) {
- CharArray cha = (CharArray)obj;
- if (length == cha.length) {
- int n = length;
- int i = start;
- int j = cha.start;
- while (n-- != 0) {
- if (ch[i++] != cha.ch[j++])
- return false;
- }
- return true;
- }
- }
- return false;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/ContiguousCharArrayArray.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/ContiguousCharArrayArray.java
deleted file mode 100644
index eca6c14c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/ContiguousCharArrayArray.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class ContiguousCharArrayArray extends ValueArray {
- public static final int INITIAL_CHARACTER_SIZE = 512;
- public static final int MAXIMUM_CHARACTER_SIZE = Integer.MAX_VALUE;
-
- protected int _maximumCharacterSize;
-
- public int[] _offset;
- public int[] _length;
-
- public char[] _array;
- public int _arrayIndex;
- public int _readOnlyArrayIndex;
-
- private String[] _cachedStrings;
-
- public int _cachedIndex;
-
- private ContiguousCharArrayArray _readOnlyArray;
-
- public ContiguousCharArrayArray(int initialCapacity, int maximumCapacity,
- int initialCharacterSize, int maximumCharacterSize) {
- _offset = new int[initialCapacity];
- _length = new int[initialCapacity];
- _array = new char[initialCharacterSize];
- _maximumCapacity = maximumCapacity;
- _maximumCharacterSize = maximumCharacterSize;
- }
-
- public ContiguousCharArrayArray() {
- this(DEFAULT_CAPACITY, MAXIMUM_CAPACITY,
- INITIAL_CHARACTER_SIZE, MAXIMUM_CHARACTER_SIZE);
- }
-
- public final void clear() {
- _arrayIndex = _readOnlyArrayIndex;
- _size = _readOnlyArraySize;
-
- if (_cachedStrings != null) {
- for (int i = _readOnlyArraySize; i < _cachedStrings.length; i++) {
- _cachedStrings[i] = null;
- }
- }
- }
-
- public final int getArrayIndex() {
- return _arrayIndex;
- }
-
- public final void setReadOnlyArray(ValueArray readOnlyArray, boolean clear) {
- if (!(readOnlyArray instanceof ContiguousCharArrayArray)) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.illegalClass", new Object[]{readOnlyArray}));
- }
-
- setReadOnlyArray((ContiguousCharArrayArray)readOnlyArray, clear);
- }
-
- public final void setReadOnlyArray(ContiguousCharArrayArray readOnlyArray, boolean clear) {
- if (readOnlyArray != null) {
- _readOnlyArray = readOnlyArray;
- _readOnlyArraySize = readOnlyArray.getSize();
- _readOnlyArrayIndex = readOnlyArray.getArrayIndex();
-
- if (clear) {
- clear();
- }
-
- _array = getCompleteCharArray();
- _offset = getCompleteOffsetArray();
- _length = getCompleteLengthArray();
- _size = _readOnlyArraySize;
- _arrayIndex = _readOnlyArrayIndex;
- }
- }
-
- public final char[] getCompleteCharArray() {
- if (_readOnlyArray == null) {
- if (_array == null) return null;
-
- // Return cloned version of internal _array
- final char[] clonedArray = new char[_array.length];
- System.arraycopy(_array, 0, clonedArray, 0, _array.length);
- return clonedArray;
-// return _array;
- } else {
- final char[] ra = _readOnlyArray.getCompleteCharArray();
- final char[] a = new char[_readOnlyArrayIndex + _array.length];
- System.arraycopy(ra, 0, a, 0, _readOnlyArrayIndex);
- return a;
- }
- }
-
- public final int[] getCompleteOffsetArray() {
- if (_readOnlyArray == null) {
- if (_offset == null) return null;
-
- // Return cloned version of internal _offset
- final int[] clonedArray = new int[_offset.length];
- System.arraycopy(_offset, 0, clonedArray, 0, _offset.length);
- return clonedArray;
-// return _offset;
- } else {
- final int[] ra = _readOnlyArray.getCompleteOffsetArray();
- final int[] a = new int[_readOnlyArraySize + _offset.length];
- System.arraycopy(ra, 0, a, 0, _readOnlyArraySize);
- return a;
- }
- }
-
- public final int[] getCompleteLengthArray() {
- if (_readOnlyArray == null) {
- if (_length == null) return null;
-
- // Return cloned version of internal _length
- final int[] clonedArray = new int[_length.length];
- System.arraycopy(_length, 0, clonedArray, 0, _length.length);
- return clonedArray;
-// return _length;
- } else {
- final int[] ra = _readOnlyArray.getCompleteLengthArray();
- final int[] a = new int[_readOnlyArraySize + _length.length];
- System.arraycopy(ra, 0, a, 0, _readOnlyArraySize);
- return a;
- }
- }
-
- public final String getString(int i) {
- if (_cachedStrings != null && i < _cachedStrings.length) {
- final String s = _cachedStrings[i];
- return (s != null) ? s : (_cachedStrings[i] = new String(_array, _offset[i], _length[i]));
- }
-
- final String[] newCachedStrings = new String[_offset.length];
- if (_cachedStrings != null && i >= _cachedStrings.length) {
- System.arraycopy(_cachedStrings, 0, newCachedStrings, 0, _cachedStrings.length);
- }
- _cachedStrings = newCachedStrings;
-
- return _cachedStrings[i] = new String(_array, _offset[i], _length[i]);
- }
-
- public final void ensureSize(int l) {
- if (_arrayIndex + l >= _array.length) {
- resizeArray(_arrayIndex + l);
- }
- }
-
- public final void add(int l) {
- if (_size == _offset.length) {
- resize();
- }
-
- _cachedIndex = _size;
- _offset[_size] = _arrayIndex;
- _length[_size++] = l;
-
- _arrayIndex += l;
- }
-
- public final int add(char[] c, int l) {
- if (_size == _offset.length) {
- resize();
- }
-
- final int oldArrayIndex = _arrayIndex;
- final int arrayIndex = oldArrayIndex + l;
-
- _cachedIndex = _size;
- _offset[_size] = oldArrayIndex;
- _length[_size++] = l;
-
- if (arrayIndex >= _array.length) {
- resizeArray(arrayIndex);
- }
-
- System.arraycopy(c, 0, _array, oldArrayIndex, l);
-
- _arrayIndex = arrayIndex;
- return oldArrayIndex;
- }
-
- protected final void resize() {
- if (_size == _maximumCapacity) {
- throw new ValueArrayResourceException(CommonResourceBundle.getInstance().getString("message.arrayMaxCapacity"));
- }
-
- int newSize = _size * 3 / 2 + 1;
- if (newSize > _maximumCapacity) {
- newSize = _maximumCapacity;
- }
-
- final int[] offset = new int[newSize];
- System.arraycopy(_offset, 0, offset, 0, _size);
- _offset = offset;
-
- final int[] length = new int[newSize];
- System.arraycopy(_length, 0, length, 0, _size);
- _length = length;
- }
-
- protected final void resizeArray(int requestedSize) {
- if (_arrayIndex == _maximumCharacterSize) {
- throw new ValueArrayResourceException(CommonResourceBundle.getInstance().getString("message.maxNumberOfCharacters"));
- }
-
- int newSize = requestedSize * 3 / 2 + 1;
- if (newSize > _maximumCharacterSize) {
- newSize = _maximumCharacterSize;
- }
-
- final char[] array = new char[newSize];
- System.arraycopy(_array, 0, array, 0, _arrayIndex);
- _array = array;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/DuplicateAttributeVerifier.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/DuplicateAttributeVerifier.java
deleted file mode 100644
index 2c3d734a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/DuplicateAttributeVerifier.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetException;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-
-public class DuplicateAttributeVerifier {
- public static final int MAP_SIZE = 256;
-
- public int _currentIteration;
-
- public static class Entry {
- private int iteration;
- private int value;
-
- private Entry hashNext;
-
- private Entry poolNext;
- }
-
- private Entry[] _map;
-
- public final Entry _poolHead;
- public Entry _poolCurrent;
- private Entry _poolTail;
-
-
- public DuplicateAttributeVerifier() {
- _poolTail = _poolHead = new Entry();
- }
-
- public final void clear() {
- _currentIteration = 0;
-
- Entry e = _poolHead;
- while (e != null) {
- e.iteration = 0;
- e = e.poolNext;
- }
-
- reset();
- }
-
- public final void reset() {
- _poolCurrent = _poolHead;
- if (_map == null) {
- _map = new Entry[MAP_SIZE];
- }
- }
-
- private final void increasePool(int capacity) {
- if (_map == null) {
- _map = new Entry[MAP_SIZE];
- _poolCurrent = _poolHead;
- } else {
- final Entry tail = _poolTail;
- for (int i = 0; i < capacity; i++) {
- final Entry e = new Entry();
- _poolTail.poolNext = e;
- _poolTail = e;
- }
-
- _poolCurrent = tail.poolNext;
- }
- }
-
- public final void checkForDuplicateAttribute(int hash, int value) throws FastInfosetException {
- if (_poolCurrent == null) {
- increasePool(16);
- }
-
- // Get next free entry
- final Entry newEntry = _poolCurrent;
- _poolCurrent = _poolCurrent.poolNext;
-
- final Entry head = _map[hash];
- if (head == null || head.iteration < _currentIteration) {
- newEntry.hashNext = null;
- _map[hash] = newEntry;
- newEntry.iteration = _currentIteration;
- newEntry.value = value;
- } else {
- Entry e = head;
- do {
- if (e.value == value) {
- reset();
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.duplicateAttribute"));
- }
- } while ((e = e.hashNext) != null);
-
- newEntry.hashNext = head;
- _map[hash] = newEntry;
- newEntry.iteration = _currentIteration;
- newEntry.value = value;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/FixedEntryStringIntMap.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/FixedEntryStringIntMap.java
deleted file mode 100644
index 1495093a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/FixedEntryStringIntMap.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class FixedEntryStringIntMap extends StringIntMap {
-
- private Entry _fixedEntry;
-
- public FixedEntryStringIntMap(String fixedEntry, int initialCapacity, float loadFactor) {
- super(initialCapacity, loadFactor);
-
- // Add the fixed entry
- final int hash = hashHash(fixedEntry.hashCode());
- final int tableIndex = indexFor(hash, _table.length);
- _table[tableIndex] = _fixedEntry = new Entry(fixedEntry, hash, _index++, null);
- if (_size++ >= _threshold) {
- resize(2 * _table.length);
- }
- }
-
- public FixedEntryStringIntMap(String fixedEntry, int initialCapacity) {
- this(fixedEntry, initialCapacity, DEFAULT_LOAD_FACTOR);
- }
-
- public FixedEntryStringIntMap(String fixedEntry) {
- this(fixedEntry, DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR);
- }
-
- public final void clear() {
- for (int i = 0; i < _table.length; i++) {
- _table[i] = null;
- }
- _lastEntry = NULL_ENTRY;
-
- if (_fixedEntry != null) {
- final int tableIndex = indexFor(_fixedEntry._hash, _table.length);
- _table[tableIndex] = _fixedEntry;
- _fixedEntry._next = null;
- _size = 1;
- _index = _readOnlyMapSize + 1;
- } else {
- _size = 0;
- _index = _readOnlyMapSize;
- }
- }
-
- public final void setReadOnlyMap(KeyIntMap readOnlyMap, boolean clear) {
- if (!(readOnlyMap instanceof FixedEntryStringIntMap)) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().
- getString("message.illegalClass", new Object[]{readOnlyMap}));
- }
-
- setReadOnlyMap((FixedEntryStringIntMap)readOnlyMap, clear);
- }
-
- public final void setReadOnlyMap(FixedEntryStringIntMap readOnlyMap, boolean clear) {
- _readOnlyMap = readOnlyMap;
- if (_readOnlyMap != null) {
- readOnlyMap.removeFixedEntry();
- _readOnlyMapSize = readOnlyMap.size();
- _index = _readOnlyMapSize + _size;
- if (clear) {
- clear();
- }
- } else {
- _readOnlyMapSize = 0;
- }
- }
-
- private final void removeFixedEntry() {
- if (_fixedEntry != null) {
- final int tableIndex = indexFor(_fixedEntry._hash, _table.length);
- final Entry firstEntry = _table[tableIndex];
- if (firstEntry == _fixedEntry) {
- _table[tableIndex] = _fixedEntry._next;
- } else {
- Entry previousEntry = firstEntry;
- while (previousEntry._next != _fixedEntry) {
- previousEntry = previousEntry._next;
- }
- previousEntry._next = _fixedEntry._next;
- }
-
- _fixedEntry = null;
- _size--;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/KeyIntMap.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/KeyIntMap.java
deleted file mode 100644
index fc3ddcd3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/KeyIntMap.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public abstract class KeyIntMap {
- public static final int NOT_PRESENT = -1;
-
- /**
- * The default initial capacity - MUST be a power of two.
- */
- static final int DEFAULT_INITIAL_CAPACITY = 16;
-
- /**
- * The maximum capacity, used if a higher value is implicitly specified
- * by either of the constructors with arguments.
- * MUST be a power of two <= 1<<30.
- */
- static final int MAXIMUM_CAPACITY = 1 << 20;
-
- /**
- * The load factor used when none specified in constructor.
- **/
- static final float DEFAULT_LOAD_FACTOR = 0.75f;
-
- int _readOnlyMapSize;
-
- /**
- * The number of key-value mappings contained in this identity hash map.
- */
- int _size;
-
- int _capacity;
-
- /**
- * The next size value at which to resize (capacity * load factor).
- */
- int _threshold;
-
- /**
- * The load factor for the hash table.
- */
- final float _loadFactor;
-
- static class BaseEntry {
- final int _hash;
- final int _value;
-
- public BaseEntry(int hash, int value) {
- _hash = hash;
- _value = value;
- }
- }
-
- public KeyIntMap(int initialCapacity, float loadFactor) {
- if (initialCapacity < 0)
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().
- getString("message.illegalInitialCapacity", new Object[]{Integer.valueOf(initialCapacity)}));
- if (initialCapacity > MAXIMUM_CAPACITY)
- initialCapacity = MAXIMUM_CAPACITY;
- if (loadFactor <= 0 || Float.isNaN(loadFactor))
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().
- getString("message.illegalLoadFactor", new Object[]{Float.valueOf(loadFactor)}));
-
- // Find a power of 2 >= initialCapacity
- if (initialCapacity != DEFAULT_INITIAL_CAPACITY) {
- _capacity = 1;
- while (_capacity < initialCapacity)
- _capacity <<= 1;
-
- _loadFactor = loadFactor;
- _threshold = (int)(_capacity * _loadFactor);
- } else {
- _capacity = DEFAULT_INITIAL_CAPACITY;
- _loadFactor = DEFAULT_LOAD_FACTOR;
- _threshold = (int)(DEFAULT_INITIAL_CAPACITY * DEFAULT_LOAD_FACTOR);
- }
- }
-
- public KeyIntMap(int initialCapacity) {
- this(initialCapacity, DEFAULT_LOAD_FACTOR);
- }
-
- public KeyIntMap() {
- _capacity = DEFAULT_INITIAL_CAPACITY;
- _loadFactor = DEFAULT_LOAD_FACTOR;
- _threshold = (int)(DEFAULT_INITIAL_CAPACITY * DEFAULT_LOAD_FACTOR);
- }
-
- public final int size() {
- return _size + _readOnlyMapSize;
- }
-
- public abstract void clear();
-
- public abstract void setReadOnlyMap(KeyIntMap readOnlyMap, boolean clear);
-
-
- public static final int hashHash(int h) {
- h += ~(h << 9);
- h ^= (h >>> 14);
- h += (h << 4);
- h ^= (h >>> 10);
- return h;
- }
-
- public static final int indexFor(int h, int length) {
- return h & (length-1);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/LocalNameQualifiedNamesMap.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/LocalNameQualifiedNamesMap.java
deleted file mode 100644
index efe84d56..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/LocalNameQualifiedNamesMap.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class LocalNameQualifiedNamesMap extends KeyIntMap {
-
- private LocalNameQualifiedNamesMap _readOnlyMap;
-
- private int _index;
-
- public static class Entry {
- final String _key;
- final int _hash;
- public QualifiedName[] _value;
- public int _valueIndex;
- Entry _next;
-
- public Entry(String key, int hash, Entry next) {
- _key = key;
- _hash = hash;
- _next = next;
- _value = new QualifiedName[1];
- }
-
- public void addQualifiedName(QualifiedName name) {
- if (_valueIndex < _value.length) {
- _value[_valueIndex++] = name;
- } else if (_valueIndex == _value.length) {
- QualifiedName[] newValue = new QualifiedName[_valueIndex * 3 / 2 + 1];
- System.arraycopy(_value, 0, newValue, 0, _valueIndex);
- _value = newValue;
- _value[_valueIndex++] = name;
- }
- }
- }
-
- private Entry[] _table;
-
- public LocalNameQualifiedNamesMap(int initialCapacity, float loadFactor) {
- super(initialCapacity, loadFactor);
-
- _table = new Entry[_capacity];
- }
-
- public LocalNameQualifiedNamesMap(int initialCapacity) {
- this(initialCapacity, DEFAULT_LOAD_FACTOR);
- }
-
- public LocalNameQualifiedNamesMap() {
- this(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR);
- }
-
- public final void clear() {
- for (int i = 0; i < _table.length; i++) {
- _table[i] = null;
- }
- _size = 0;
-
- if (_readOnlyMap != null) {
- _index = _readOnlyMap.getIndex();
- } else {
- _index = 0;
- }
- }
-
- public final void setReadOnlyMap(KeyIntMap readOnlyMap, boolean clear) {
- if (!(readOnlyMap instanceof LocalNameQualifiedNamesMap)) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().
- getString("message.illegalClass", new Object[]{readOnlyMap}));
- }
-
- setReadOnlyMap((LocalNameQualifiedNamesMap)readOnlyMap, clear);
- }
-
- public final void setReadOnlyMap(LocalNameQualifiedNamesMap readOnlyMap, boolean clear) {
- _readOnlyMap = readOnlyMap;
- if (_readOnlyMap != null) {
- _readOnlyMapSize = _readOnlyMap.size();
- _index = _readOnlyMap.getIndex();
- if (clear) {
- clear();
- }
- } else {
- _readOnlyMapSize = 0;
- _index = 0;
- }
- }
-
- public final boolean isQNameFromReadOnlyMap(QualifiedName name) {
- return (_readOnlyMap != null && name.index <= _readOnlyMap.getIndex());
- }
-
- public final int getNextIndex() {
- return _index++;
- }
-
- public final int getIndex() {
- return _index;
- }
-
- public final Entry obtainEntry(String key) {
- final int hash = hashHash(key.hashCode());
-
- if (_readOnlyMap != null) {
- final Entry entry = _readOnlyMap.getEntry(key, hash);
- if (entry != null) {
- return entry;
- }
- }
-
- final int tableIndex = indexFor(hash, _table.length);
- for (Entry e = _table[tableIndex]; e != null; e = e._next) {
- if (e._hash == hash && eq(key, e._key)) {
- return e;
- }
- }
-
- return addEntry(key, hash, tableIndex);
- }
-
- public final Entry obtainDynamicEntry(String key) {
- final int hash = hashHash(key.hashCode());
-
- final int tableIndex = indexFor(hash, _table.length);
- for (Entry e = _table[tableIndex]; e != null; e = e._next) {
- if (e._hash == hash && eq(key, e._key)) {
- return e;
- }
- }
-
- return addEntry(key, hash, tableIndex);
- }
-
- private final Entry getEntry(String key, int hash) {
- if (_readOnlyMap != null) {
- final Entry entry = _readOnlyMap.getEntry(key, hash);
- if (entry != null) {
- return entry;
- }
- }
-
- final int tableIndex = indexFor(hash, _table.length);
- for (Entry e = _table[tableIndex]; e != null; e = e._next) {
- if (e._hash == hash && eq(key, e._key)) {
- return e;
- }
- }
-
- return null;
- }
-
-
- private final Entry addEntry(String key, int hash, int bucketIndex) {
- Entry e = _table[bucketIndex];
- _table[bucketIndex] = new Entry(key, hash, e);
- e = _table[bucketIndex];
- if (_size++ >= _threshold) {
- resize(2 * _table.length);
- }
-
- return e;
- }
-
- private final void resize(int newCapacity) {
- _capacity = newCapacity;
- Entry[] oldTable = _table;
- int oldCapacity = oldTable.length;
- if (oldCapacity == MAXIMUM_CAPACITY) {
- _threshold = Integer.MAX_VALUE;
- return;
- }
-
- Entry[] newTable = new Entry[_capacity];
- transfer(newTable);
- _table = newTable;
- _threshold = (int)(_capacity * _loadFactor);
- }
-
- private final void transfer(Entry[] newTable) {
- Entry[] src = _table;
- int newCapacity = newTable.length;
- for (int j = 0; j < src.length; j++) {
- Entry e = src[j];
- if (e != null) {
- src[j] = null;
- do {
- Entry next = e._next;
- int i = indexFor(e._hash, newCapacity);
- e._next = newTable[i];
- newTable[i] = e;
- e = next;
- } while (e != null);
- }
- }
- }
-
- private final boolean eq(String x, String y) {
- return x == y || x.equals(y);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/NamespaceContextImplementation.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/NamespaceContextImplementation.java
deleted file mode 100644
index 33363af8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/NamespaceContextImplementation.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import javax.xml.namespace.NamespaceContext;
-
-/**
- *
- * @author Paul.Sandoz@Sun.Com
- */
-final public class NamespaceContextImplementation implements NamespaceContext {
- private static int DEFAULT_SIZE = 8;
-
- private String[] prefixes = new String[DEFAULT_SIZE];
- private String[] namespaceURIs = new String[DEFAULT_SIZE];
- private int namespacePosition;
-
- private int[] contexts = new int[DEFAULT_SIZE];
- private int contextPosition;
-
- private int currentContext;
-
- public NamespaceContextImplementation() {
- prefixes[0] = "xml";
- namespaceURIs[0] = "http://www.w3.org/XML/1998/namespace";
- prefixes[1] = "xmlns";
- namespaceURIs[1] = "http://www.w3.org/2000/xmlns/";
-
- currentContext = namespacePosition = 2;
- }
-
-
- public String getNamespaceURI(String prefix) {
- if (prefix == null) throw new IllegalArgumentException();
-
-// prefix = prefix.intern();
-
- for (int i = namespacePosition - 1; i >= 0; i--) {
- final String declaredPrefix = prefixes[i];
- if (declaredPrefix.equals(prefix)) {
- return namespaceURIs[i];
- }
- }
-
- return "";
- }
-
- public String getPrefix(String namespaceURI) {
- if (namespaceURI == null) throw new IllegalArgumentException();
-
- // namespaceURI = namespaceURI.intern();
-
- for (int i = namespacePosition - 1; i >= 0; i--) {
- final String declaredNamespaceURI = namespaceURIs[i];
- if (declaredNamespaceURI.equals(namespaceURI)) {
- final String declaredPrefix = prefixes[i];
-
- // Check if prefix is out of scope
- boolean isOutOfScope = false;
- for (int j = i + 1; j < namespacePosition; j++)
- if (declaredPrefix.equals(prefixes[j])) {
- isOutOfScope = true;
- break;
- }
-
- if (!isOutOfScope) {
- return declaredPrefix;
- }
- }
- }
-
- return null;
- }
-
- public String getNonDefaultPrefix(String namespaceURI) {
- if (namespaceURI == null) throw new IllegalArgumentException();
-
- // namespaceURI = namespaceURI.intern();
-
- for (int i = namespacePosition - 1; i >= 0; i--) {
- final String declaredNamespaceURI = namespaceURIs[i];
- if (declaredNamespaceURI.equals(namespaceURI) &&
- prefixes[i].length() > 0){
- final String declaredPrefix = prefixes[i];
-
- // Check if prefix is out of scope
- for (++i; i < namespacePosition; i++)
- if (declaredPrefix.equals(prefixes[i]))
- return null;
-
- return declaredPrefix;
- }
- }
-
- return null;
- }
-
- public Iterator getPrefixes(String namespaceURI) {
- if (namespaceURI == null) throw new IllegalArgumentException();
-
- // namespaceURI = namespaceURI.intern();
-
- List l = new ArrayList();
-
- NAMESPACE_LOOP: for (int i = namespacePosition - 1; i >= 0; i--) {
- final String declaredNamespaceURI = namespaceURIs[i];
- if (declaredNamespaceURI.equals(namespaceURI)) {
- final String declaredPrefix = prefixes[i];
-
- // Check if prefix is out of scope
- for (int j = i + 1; j < namespacePosition; j++)
- if (declaredPrefix.equals(prefixes[j]))
- continue NAMESPACE_LOOP;
-
- l.add(declaredPrefix);
- }
- }
-
- return l.iterator();
- }
-
-
- public String getPrefix(int index) {
- return prefixes[index];
- }
-
- public String getNamespaceURI(int index) {
- return namespaceURIs[index];
- }
-
- public int getCurrentContextStartIndex() {
- return currentContext;
- }
-
- public int getCurrentContextEndIndex() {
- return namespacePosition;
- }
-
- public boolean isCurrentContextEmpty() {
- return currentContext == namespacePosition;
- }
-
- public void declarePrefix(String prefix, String namespaceURI) {
- prefix = prefix.intern();
- namespaceURI = namespaceURI.intern();
-
- // Ignore the "xml" or "xmlns" declarations
- if (prefix == "xml" || prefix == "xmlns")
- return;
-
- // Replace any previous declaration
- for (int i = currentContext; i < namespacePosition; i++) {
- final String declaredPrefix = prefixes[i];
- if (declaredPrefix == prefix) {
- prefixes[i] = prefix;
- namespaceURIs[i] = namespaceURI;
- return;
- }
- }
-
- if (namespacePosition == namespaceURIs.length)
- resizeNamespaces();
-
- // Add new declaration
- prefixes[namespacePosition] = prefix;
- namespaceURIs[namespacePosition++] = namespaceURI;
- }
-
- private void resizeNamespaces() {
- final int newLength = namespaceURIs.length * 3 / 2 + 1;
-
- String[] newPrefixes = new String[newLength];
- System.arraycopy(prefixes, 0, newPrefixes, 0, prefixes.length);
- prefixes = newPrefixes;
-
- String[] newNamespaceURIs = new String[newLength];
- System.arraycopy(namespaceURIs, 0, newNamespaceURIs, 0, namespaceURIs.length);
- namespaceURIs = newNamespaceURIs;
- }
-
- public void pushContext() {
- if (contextPosition == contexts.length)
- resizeContexts();
-
- contexts[contextPosition++] = currentContext = namespacePosition;
- }
-
- private void resizeContexts() {
- int[] newContexts = new int[contexts.length * 3 / 2 + 1];
- System.arraycopy(contexts, 0, newContexts, 0, contexts.length);
- contexts = newContexts;
- }
-
- public void popContext() {
- if (contextPosition > 0) {
- namespacePosition = currentContext = contexts[--contextPosition];
- }
- }
-
- public void reset() {
- currentContext = namespacePosition = 2;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/PrefixArray.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/PrefixArray.java
deleted file mode 100644
index 84ccd542..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/PrefixArray.java
+++ /dev/null
@@ -1,518 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetException;
-
-public class PrefixArray extends ValueArray {
- public static final int PREFIX_MAP_SIZE = 64;
-
- private int _initialCapacity;
-
- public String[] _array;
-
- private PrefixArray _readOnlyArray;
-
- private static class PrefixEntry {
- private PrefixEntry next;
- private int prefixId;
- }
-
- private PrefixEntry[] _prefixMap = new PrefixEntry[PREFIX_MAP_SIZE];
-
- private PrefixEntry _prefixPool;
-
- private static class NamespaceEntry {
- private NamespaceEntry next;
- private int declarationId;
- private int namespaceIndex;
-
- private String prefix;
- private String namespaceName;
- private int prefixEntryIndex;
- }
-
- private NamespaceEntry _namespacePool;
-
- private NamespaceEntry[] _inScopeNamespaces;
-
- public int[] _currentInScope;
-
- public int _declarationId;
-
- public PrefixArray(int initialCapacity, int maximumCapacity) {
- _initialCapacity = initialCapacity;
- _maximumCapacity = maximumCapacity;
-
- _array = new String[initialCapacity];
- // Sizes of _inScopeNamespaces and _currentInScope need to be two
- // greater than _array because 0 represents the empty string and
- // 1 represents the xml prefix
- _inScopeNamespaces = new NamespaceEntry[initialCapacity + 2];
- _currentInScope = new int[initialCapacity + 2];
-
- increaseNamespacePool(initialCapacity);
- increasePrefixPool(initialCapacity);
-
- initializeEntries();
- }
-
- public PrefixArray() {
- this(DEFAULT_CAPACITY, MAXIMUM_CAPACITY);
- }
-
- private final void initializeEntries() {
- _inScopeNamespaces[0] = _namespacePool;
- _namespacePool = _namespacePool.next;
- _inScopeNamespaces[0].next = null;
- _inScopeNamespaces[0].prefix = "";
- _inScopeNamespaces[0].namespaceName = "";
- _inScopeNamespaces[0].namespaceIndex = _currentInScope[0] = 0;
-
- int index = KeyIntMap.indexFor(KeyIntMap.hashHash(_inScopeNamespaces[0].prefix.hashCode()), _prefixMap.length);
- _prefixMap[index] = _prefixPool;
- _prefixPool = _prefixPool.next;
- _prefixMap[index].next = null;
- _prefixMap[index].prefixId = 0;
-
-
- _inScopeNamespaces[1] = _namespacePool;
- _namespacePool = _namespacePool.next;
- _inScopeNamespaces[1].next = null;
- _inScopeNamespaces[1].prefix = EncodingConstants.XML_NAMESPACE_PREFIX;
- _inScopeNamespaces[1].namespaceName = EncodingConstants.XML_NAMESPACE_NAME;
- _inScopeNamespaces[1].namespaceIndex = _currentInScope[1] = 1;
-
- index = KeyIntMap.indexFor(KeyIntMap.hashHash(_inScopeNamespaces[1].prefix.hashCode()), _prefixMap.length);
- if (_prefixMap[index] == null) {
- _prefixMap[index] = _prefixPool;
- _prefixPool = _prefixPool.next;
- _prefixMap[index].next = null;
- } else {
- final PrefixEntry e = _prefixMap[index];
- _prefixMap[index] = _prefixPool;
- _prefixPool = _prefixPool.next;
- _prefixMap[index].next = e;
- }
- _prefixMap[index].prefixId = 1;
- }
-
- private final void increaseNamespacePool(int capacity) {
- if (_namespacePool == null) {
- _namespacePool = new NamespaceEntry();
- }
-
- for (int i = 0; i < capacity; i++) {
- NamespaceEntry ne = new NamespaceEntry();
- ne.next = _namespacePool;
- _namespacePool = ne;
- }
- }
-
- private final void increasePrefixPool(int capacity) {
- if (_prefixPool == null) {
- _prefixPool = new PrefixEntry();
- }
-
- for (int i = 0; i < capacity; i++) {
- PrefixEntry pe = new PrefixEntry();
- pe.next = _prefixPool;
- _prefixPool = pe;
- }
- }
-
- public int countNamespacePool() {
- int i = 0;
- NamespaceEntry e = _namespacePool;
- while (e != null) {
- i++;
- e = e.next;
- }
- return i;
- }
-
- public int countPrefixPool() {
- int i = 0;
- PrefixEntry e = _prefixPool;
- while (e != null) {
- i++;
- e = e.next;
- }
- return i;
- }
-
- public final void clear() {
- for (int i = _readOnlyArraySize; i < _size; i++) {
- _array[i] = null;
- }
- _size = _readOnlyArraySize;
- }
-
- public final void clearCompletely() {
- _prefixPool = null;
- _namespacePool = null;
-
- for (int i = 0; i < _size + 2; i++) {
- _currentInScope[i] = 0;
- _inScopeNamespaces[i] = null;
- }
-
- for (int i = 0; i < _prefixMap.length; i++) {
- _prefixMap[i] = null;
- }
-
- increaseNamespacePool(_initialCapacity);
- increasePrefixPool(_initialCapacity);
-
- initializeEntries();
-
- _declarationId = 0;
-
- clear();
- }
-
- /**
- * Returns cloned version of internal String[].
- * @return cloned version of internal String[].
- */
- public final String[] getArray() {
- if (_array == null) return null;
-
- final String[] clonedArray = new String[_array.length];
- System.arraycopy(_array, 0, clonedArray, 0, _array.length);
- return clonedArray;
- }
-
- public final void setReadOnlyArray(ValueArray readOnlyArray, boolean clear) {
- if (!(readOnlyArray instanceof PrefixArray)) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().
- getString("message.illegalClass", new Object[]{readOnlyArray}));
- }
-
- setReadOnlyArray((PrefixArray)readOnlyArray, clear);
- }
-
- public final void setReadOnlyArray(PrefixArray readOnlyArray, boolean clear) {
- if (readOnlyArray != null) {
- _readOnlyArray = readOnlyArray;
- _readOnlyArraySize = readOnlyArray.getSize();
-
- clearCompletely();
-
- // Resize according to size of read only arrays
- _inScopeNamespaces = new NamespaceEntry[_readOnlyArraySize + _inScopeNamespaces.length];
- _currentInScope = new int[_readOnlyArraySize + _currentInScope.length];
- // Intialize first two entries
- initializeEntries();
-
- if (clear) {
- clear();
- }
-
- _array = getCompleteArray();
- _size = _readOnlyArraySize;
- }
- }
-
- public final String[] getCompleteArray() {
- if (_readOnlyArray == null) {
- // Return cloned version of internal _array
- return getArray();
-// return _array;
- } else {
- final String[] ra = _readOnlyArray.getCompleteArray();
- final String[] a = new String[_readOnlyArraySize + _array.length];
- System.arraycopy(ra, 0, a, 0, _readOnlyArraySize);
- return a;
- }
- }
-
- public final String get(int i) {
- return _array[i];
- }
-
- public final int add(String s) {
- if (_size == _array.length) {
- resize();
- }
-
- _array[_size++] = s;
- return _size;
- }
-
- protected final void resize() {
- if (_size == _maximumCapacity) {
- throw new ValueArrayResourceException(CommonResourceBundle.getInstance().getString("message.arrayMaxCapacity"));
- }
-
- int newSize = _size * 3 / 2 + 1;
- if (newSize > _maximumCapacity) {
- newSize = _maximumCapacity;
- }
-
- final String[] newArray = new String[newSize];
- System.arraycopy(_array, 0, newArray, 0, _size);
- _array = newArray;
-
- newSize += 2;
- final NamespaceEntry[] newInScopeNamespaces = new NamespaceEntry[newSize];
- System.arraycopy(_inScopeNamespaces, 0, newInScopeNamespaces, 0, _inScopeNamespaces.length);
- _inScopeNamespaces = newInScopeNamespaces;
-
- final int[] newCurrentInScope = new int[newSize];
- System.arraycopy(_currentInScope, 0, newCurrentInScope, 0, _currentInScope.length);
- _currentInScope = newCurrentInScope;
- }
-
- public final void clearDeclarationIds() {
- for (int i = 0; i < _size; i++) {
- final NamespaceEntry e = _inScopeNamespaces[i];
- if (e != null) {
- e.declarationId = 0;
- }
- }
-
- _declarationId = 1;
- }
-
- public final void pushScope(int prefixIndex, int namespaceIndex) throws FastInfosetException {
- if (_namespacePool == null) {
- increaseNamespacePool(16);
- }
-
- final NamespaceEntry e = _namespacePool;
- _namespacePool = e.next;
-
- final NamespaceEntry current = _inScopeNamespaces[++prefixIndex];
- if (current == null) {
- e.declarationId = _declarationId;
- e.namespaceIndex = _currentInScope[prefixIndex] = ++namespaceIndex;
- e.next = null;
-
- _inScopeNamespaces[prefixIndex] = e;
- } else if (current.declarationId < _declarationId) {
- e.declarationId = _declarationId;
- e.namespaceIndex = _currentInScope[prefixIndex] = ++namespaceIndex;
- e.next = current;
-
- current.declarationId = 0;
- _inScopeNamespaces[prefixIndex] = e;
- } else {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.duplicateNamespaceAttribute"));
- }
- }
-
- public final void pushScopeWithPrefixEntry(String prefix, String namespaceName,
- int prefixIndex, int namespaceIndex) throws FastInfosetException {
- if (_namespacePool == null) {
- increaseNamespacePool(16);
- }
- if (_prefixPool == null) {
- increasePrefixPool(16);
- }
-
- final NamespaceEntry e = _namespacePool;
- _namespacePool = e.next;
-
- final NamespaceEntry current = _inScopeNamespaces[++prefixIndex];
- if (current == null) {
- e.declarationId = _declarationId;
- e.namespaceIndex = _currentInScope[prefixIndex] = ++namespaceIndex;
- e.next = null;
-
- _inScopeNamespaces[prefixIndex] = e;
- } else if (current.declarationId < _declarationId) {
- e.declarationId = _declarationId;
- e.namespaceIndex = _currentInScope[prefixIndex] = ++namespaceIndex;
- e.next = current;
-
- current.declarationId = 0;
- _inScopeNamespaces[prefixIndex] = e;
- } else {
- throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.duplicateNamespaceAttribute"));
- }
-
- final PrefixEntry p = _prefixPool;
- _prefixPool = _prefixPool.next;
- p.prefixId = prefixIndex;
-
- e.prefix = prefix;
- e.namespaceName = namespaceName;
- e.prefixEntryIndex = KeyIntMap.indexFor(KeyIntMap.hashHash(prefix.hashCode()), _prefixMap.length);
-
- final PrefixEntry pCurrent = _prefixMap[e.prefixEntryIndex];
- p.next = pCurrent;
- _prefixMap[e.prefixEntryIndex] = p;
- }
-
- public final void popScope(int prefixIndex) {
- final NamespaceEntry e = _inScopeNamespaces[++prefixIndex];
- _inScopeNamespaces[prefixIndex] = e.next;
- _currentInScope[prefixIndex] = (e.next != null) ? e.next.namespaceIndex : 0;
-
- e.next = _namespacePool;
- _namespacePool = e;
- }
-
- public final void popScopeWithPrefixEntry(int prefixIndex) {
- final NamespaceEntry e = _inScopeNamespaces[++prefixIndex];
-
- _inScopeNamespaces[prefixIndex] = e.next;
- _currentInScope[prefixIndex] = (e.next != null) ? e.next.namespaceIndex : 0;
-
- e.prefix = e.namespaceName = null;
- e.next = _namespacePool;
- _namespacePool = e;
-
- PrefixEntry current = _prefixMap[e.prefixEntryIndex];
- if (current.prefixId == prefixIndex) {
- _prefixMap[e.prefixEntryIndex] = current.next;
- current.next = _prefixPool;
- _prefixPool = current;
- } else {
- PrefixEntry prev = current;
- current = current.next;
- while (current != null) {
- if (current.prefixId == prefixIndex) {
- prev.next = current.next;
- current.next = _prefixPool;
- _prefixPool = current;
- break;
- }
- prev = current;
- current = current.next;
- }
- }
- }
-
- public final String getNamespaceFromPrefix(String prefix) {
- final int index = KeyIntMap.indexFor(KeyIntMap.hashHash(prefix.hashCode()), _prefixMap.length);
- PrefixEntry pe = _prefixMap[index];
- while (pe != null) {
- final NamespaceEntry ne = _inScopeNamespaces[pe.prefixId];
- if (prefix == ne.prefix || prefix.equals(ne.prefix)) {
- return ne.namespaceName;
- }
- pe = pe.next;
- }
-
- return null;
- }
-
- public final String getPrefixFromNamespace(String namespaceName) {
- int position = 0;
- while (++position < _size + 2) {
- final NamespaceEntry ne = _inScopeNamespaces[position];
- if (ne != null && namespaceName.equals(ne.namespaceName)) {
- return ne.prefix;
- }
- }
-
- return null;
- }
-
- public final Iterator getPrefixes() {
- return new Iterator() {
- int _position = 1;
- NamespaceEntry _ne = _inScopeNamespaces[_position];
-
- public boolean hasNext() {
- return _ne != null;
- }
-
- public Object next() {
- if (_position == _size + 2) {
- throw new NoSuchElementException();
- }
-
- final String prefix = _ne.prefix;
- moveToNext();
- return prefix;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- private final void moveToNext() {
- while (++_position < _size + 2) {
- _ne = _inScopeNamespaces[_position];
- if (_ne != null) {
- return;
- }
- }
- _ne = null;
- }
-
- };
- }
-
- public final Iterator getPrefixesFromNamespace(final String namespaceName) {
- return new Iterator() {
- String _namespaceName = namespaceName;
- int _position = 0;
- NamespaceEntry _ne;
-
- {
- moveToNext();
- }
-
- public boolean hasNext() {
- return _ne != null;
- }
-
- public Object next() {
- if (_position == _size + 2) {
- throw new NoSuchElementException();
- }
-
- final String prefix = _ne.prefix;
- moveToNext();
- return prefix;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- private final void moveToNext() {
- while (++_position < _size + 2) {
- _ne = _inScopeNamespaces[_position];
- if (_ne != null && _namespaceName.equals(_ne.namespaceName)) {
- return;
- }
- }
- _ne = null;
- }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/QualifiedNameArray.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/QualifiedNameArray.java
deleted file mode 100644
index 3835358b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/QualifiedNameArray.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class QualifiedNameArray extends ValueArray {
-
- public QualifiedName[] _array;
-
- private QualifiedNameArray _readOnlyArray;
-
- public QualifiedNameArray(int initialCapacity, int maximumCapacity) {
- _array = new QualifiedName[initialCapacity];
- _maximumCapacity = maximumCapacity;
- }
-
- public QualifiedNameArray() {
- this(DEFAULT_CAPACITY, MAXIMUM_CAPACITY);
- }
-
- public final void clear() {
- _size = _readOnlyArraySize;
- }
-
- /**
- * Returns cloned version of internal QualifiedName[].
- * @return cloned version of internal QualifiedName[].
- */
- public final QualifiedName[] getArray() {
- if (_array == null) return null;
-
- final QualifiedName[] clonedArray = new QualifiedName[_array.length];
- System.arraycopy(_array, 0, clonedArray, 0, _array.length);
- return clonedArray;
- }
-
- public final void setReadOnlyArray(ValueArray readOnlyArray, boolean clear) {
- if (!(readOnlyArray instanceof QualifiedNameArray)) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().
- getString("message.illegalClass", new Object[]{readOnlyArray}));
- }
-
- setReadOnlyArray((QualifiedNameArray)readOnlyArray, clear);
- }
-
- public final void setReadOnlyArray(QualifiedNameArray readOnlyArray, boolean clear) {
- if (readOnlyArray != null) {
- _readOnlyArray = readOnlyArray;
- _readOnlyArraySize = readOnlyArray.getSize();
-
- if (clear) {
- clear();
- }
-
- _array = getCompleteArray();
- _size = _readOnlyArraySize;
- }
- }
-
- public final QualifiedName[] getCompleteArray() {
- if (_readOnlyArray == null) {
- // Return cloned version of internal _array
- return getArray();
-// return _array;
- } else {
- final QualifiedName[] ra = _readOnlyArray.getCompleteArray();
- final QualifiedName[] a = new QualifiedName[_readOnlyArraySize + _array.length];
- System.arraycopy(ra, 0, a, 0, _readOnlyArraySize);
- return a;
- }
- }
-
- public final QualifiedName getNext() {
- return (_size == _array.length) ? null : _array[_size];
- }
-
- public final void add(QualifiedName s) {
- if (_size == _array.length) {
- resize();
- }
-
- _array[_size++] = s;
- }
-
- protected final void resize() {
- if (_size == _maximumCapacity) {
- throw new ValueArrayResourceException(CommonResourceBundle.getInstance().getString("message.arrayMaxCapacity"));
- }
-
- int newSize = _size * 3 / 2 + 1;
- if (newSize > _maximumCapacity) {
- newSize = _maximumCapacity;
- }
-
- final QualifiedName[] newArray = new QualifiedName[newSize];
- System.arraycopy(_array, 0, newArray, 0, _size);
- _array = newArray;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/StringArray.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/StringArray.java
deleted file mode 100644
index f8a62f09..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/StringArray.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class StringArray extends ValueArray {
-
- public String[] _array;
-
- private StringArray _readOnlyArray;
-
- private boolean _clear;
-
- public StringArray(int initialCapacity, int maximumCapacity, boolean clear) {
- _array = new String[initialCapacity];
- _maximumCapacity = maximumCapacity;
- _clear = clear;
- }
-
- public StringArray() {
- this(DEFAULT_CAPACITY, MAXIMUM_CAPACITY, false);
- }
-
- public final void clear() {
- if (_clear) for (int i = _readOnlyArraySize; i < _size; i++) {
- _array[i] = null;
- }
- _size = _readOnlyArraySize;
- }
-
- /**
- * Returns cloned version of internal String[].
- * @return cloned version of internal String[].
- */
- public final String[] getArray() {
- if (_array == null) return null;
-
- final String[] clonedArray = new String[_array.length];
- System.arraycopy(_array, 0, clonedArray, 0, _array.length);
- return clonedArray;
- }
-
- public final void setReadOnlyArray(ValueArray readOnlyArray, boolean clear) {
- if (!(readOnlyArray instanceof StringArray)) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().
- getString("message.illegalClass", new Object[]{readOnlyArray}));
- }
-
- setReadOnlyArray((StringArray)readOnlyArray, clear);
- }
-
- public final void setReadOnlyArray(StringArray readOnlyArray, boolean clear) {
- if (readOnlyArray != null) {
- _readOnlyArray = readOnlyArray;
- _readOnlyArraySize = readOnlyArray.getSize();
-
- if (clear) {
- clear();
- }
-
- _array = getCompleteArray();
- _size = _readOnlyArraySize;
- }
- }
-
- public final String[] getCompleteArray() {
- if (_readOnlyArray == null) {
- // Return cloned version of internal _array
- return getArray();
-// return _array;
- } else {
- final String[] ra = _readOnlyArray.getCompleteArray();
- final String[] a = new String[_readOnlyArraySize + _array.length];
- System.arraycopy(ra, 0, a, 0, _readOnlyArraySize);
- return a;
- }
- }
-
- public final String get(int i) {
- return _array[i];
- }
-
- public final int add(String s) {
- if (_size == _array.length) {
- resize();
- }
-
- _array[_size++] = s;
- return _size;
- }
-
- protected final void resize() {
- if (_size == _maximumCapacity) {
- throw new ValueArrayResourceException(CommonResourceBundle.getInstance().getString("message.arrayMaxCapacity"));
- }
-
- int newSize = _size * 3 / 2 + 1;
- if (newSize > _maximumCapacity) {
- newSize = _maximumCapacity;
- }
-
- final String[] newArray = new String[newSize];
- System.arraycopy(_array, 0, newArray, 0, _size);
- _array = newArray;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/StringIntMap.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/StringIntMap.java
deleted file mode 100644
index 8c6fb559..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/StringIntMap.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-
-public class StringIntMap extends KeyIntMap {
- protected static final Entry NULL_ENTRY = new Entry(null, 0, -1, null);
-
- protected StringIntMap _readOnlyMap;
-
- protected static class Entry extends BaseEntry {
- final String _key;
- Entry _next;
-
- public Entry(String key, int hash, int value, Entry next) {
- super(hash, value);
- _key = key;
- _next = next;
- }
- }
-
- protected Entry _lastEntry = NULL_ENTRY;
-
- protected Entry[] _table;
-
- protected int _index;
-
- // Total character count of Map
- protected int _totalCharacterCount;
-
- public StringIntMap(int initialCapacity, float loadFactor) {
- super(initialCapacity, loadFactor);
-
- _table = new Entry[_capacity];
- }
-
- public StringIntMap(int initialCapacity) {
- this(initialCapacity, DEFAULT_LOAD_FACTOR);
- }
-
- public StringIntMap() {
- this(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR);
- }
-
- public void clear() {
- for (int i = 0; i < _table.length; i++) {
- _table[i] = null;
- }
- _lastEntry = NULL_ENTRY;
- _size = 0;
- _index = _readOnlyMapSize;
- _totalCharacterCount = 0;
- }
-
- public void setReadOnlyMap(KeyIntMap readOnlyMap, boolean clear) {
- if (!(readOnlyMap instanceof StringIntMap)) {
- throw new IllegalArgumentException(CommonResourceBundle.getInstance().
- getString("message.illegalClass", new Object[]{readOnlyMap}));
- }
-
- setReadOnlyMap((StringIntMap)readOnlyMap, clear);
- }
-
- public final void setReadOnlyMap(StringIntMap readOnlyMap, boolean clear) {
- _readOnlyMap = readOnlyMap;
- if (_readOnlyMap != null) {
- _readOnlyMapSize = _readOnlyMap.size();
- _index = _size + _readOnlyMapSize;
-
- if (clear) {
- clear();
- }
- } else {
- _readOnlyMapSize = 0;
- _index = _size;
- }
- }
-
- public final int getNextIndex() {
- return _index++;
- }
-
- public final int getIndex() {
- return _index;
- }
-
- public final int obtainIndex(String key) {
- final int hash = hashHash(key.hashCode());
-
- if (_readOnlyMap != null) {
- final int index = _readOnlyMap.get(key, hash);
- if (index != -1) {
- return index;
- }
- }
-
- final int tableIndex = indexFor(hash, _table.length);
- for (Entry e = _table[tableIndex]; e != null; e = e._next) {
- if (e._hash == hash && eq(key, e._key)) {
- return e._value;
- }
- }
-
- addEntry(key, hash, tableIndex);
- return NOT_PRESENT;
- }
-
- public final void add(String key) {
- final int hash = hashHash(key.hashCode());
- final int tableIndex = indexFor(hash, _table.length);
- addEntry(key, hash, tableIndex);
- }
-
- public final int get(String key) {
- if (key == _lastEntry._key)
- return _lastEntry._value;
-
- return get(key, hashHash(key.hashCode()));
- }
-
- public final int getTotalCharacterCount() {
- return _totalCharacterCount;
- }
-
- private final int get(String key, int hash) {
- if (_readOnlyMap != null) {
- final int i = _readOnlyMap.get(key, hash);
- if (i != -1) {
- return i;
- }
- }
-
- final int tableIndex = indexFor(hash, _table.length);
- for (Entry e = _table[tableIndex]; e != null; e = e._next) {
- if (e._hash == hash && eq(key, e._key)) {
- _lastEntry = e;
- return e._value;
- }
- }
-
- return NOT_PRESENT;
- }
-
-
- private final void addEntry(String key, int hash, int bucketIndex) {
- Entry e = _table[bucketIndex];
- _table[bucketIndex] = new Entry(key, hash, _index++, e);
- _totalCharacterCount += key.length();
- if (_size++ >= _threshold) {
- resize(2 * _table.length);
- }
- }
-
- protected final void resize(int newCapacity) {
- _capacity = newCapacity;
- Entry[] oldTable = _table;
- int oldCapacity = oldTable.length;
- if (oldCapacity == MAXIMUM_CAPACITY) {
- _threshold = Integer.MAX_VALUE;
- return;
- }
-
- Entry[] newTable = new Entry[_capacity];
- transfer(newTable);
- _table = newTable;
- _threshold = (int)(_capacity * _loadFactor);
- }
-
- private final void transfer(Entry[] newTable) {
- Entry[] src = _table;
- int newCapacity = newTable.length;
- for (int j = 0; j < src.length; j++) {
- Entry e = src[j];
- if (e != null) {
- src[j] = null;
- do {
- Entry next = e._next;
- int i = indexFor(e._hash, newCapacity);
- e._next = newTable[i];
- newTable[i] = e;
- e = next;
- } while (e != null);
- }
- }
- }
-
- private final boolean eq(String x, String y) {
- return x == y || x.equals(y);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/ValueArray.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/ValueArray.java
deleted file mode 100644
index 956c664f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/ValueArray.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-
-public abstract class ValueArray {
- public static final int DEFAULT_CAPACITY = 10;
- public static final int MAXIMUM_CAPACITY = Integer.MAX_VALUE;
-
- protected int _size;
-
- protected int _readOnlyArraySize;
-
- protected int _maximumCapacity;
-
- public int getSize() {
- return _size;
- }
-
- public int getMaximumCapacity() {
- return _maximumCapacity;
- }
-
- public void setMaximumCapacity(int maximumCapacity) {
- _maximumCapacity = maximumCapacity;
- }
-
- public abstract void setReadOnlyArray(ValueArray array, boolean clear);
-
- public abstract void clear();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/ValueArrayResourceException.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/ValueArrayResourceException.java
deleted file mode 100644
index 340eb154..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/util/ValueArrayResourceException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.util;
-
-public class ValueArrayResourceException extends RuntimeException {
-
- public ValueArrayResourceException() {
- }
-
- public ValueArrayResourceException(String message) {
- super(message);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/vocab/ParserVocabulary.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/vocab/ParserVocabulary.java
deleted file mode 100644
index 7ea297d3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/vocab/ParserVocabulary.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.vocab;
-
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import com.sun.xml.internal.fastinfoset.util.CharArray;
-import com.sun.xml.internal.fastinfoset.util.CharArrayArray;
-import com.sun.xml.internal.fastinfoset.util.ContiguousCharArrayArray;
-import com.sun.xml.internal.fastinfoset.util.DuplicateAttributeVerifier;
-import com.sun.xml.internal.fastinfoset.util.FixedEntryStringIntMap;
-import com.sun.xml.internal.fastinfoset.util.KeyIntMap;
-import com.sun.xml.internal.fastinfoset.util.PrefixArray;
-import com.sun.xml.internal.fastinfoset.util.QualifiedNameArray;
-import com.sun.xml.internal.fastinfoset.util.StringArray;
-import com.sun.xml.internal.fastinfoset.util.StringIntMap;
-import com.sun.xml.internal.fastinfoset.util.ValueArray;
-import java.util.Iterator;
-import javax.xml.namespace.QName;
-
-public class ParserVocabulary extends Vocabulary {
- public static final String IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS_PEOPERTY =
- "com.sun.xml.internal.fastinfoset.vocab.ParserVocabulary.IdentifyingStringTable.maximumItems";
- public static final String NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS_PEOPERTY =
- "com.sun.xml.internal.fastinfoset.vocab.ParserVocabulary.NonIdentifyingStringTable.maximumItems";
- public static final String NON_IDENTIFYING_STRING_TABLE_MAXIMUM_CHARACTERS_PEOPERTY =
- "com.sun.xml.internal.fastinfoset.vocab.ParserVocabulary.NonIdentifyingStringTable.maximumCharacters";
-
- protected static final int IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS =
- getIntegerValueFromProperty(IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS_PEOPERTY);
- protected static final int NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS =
- getIntegerValueFromProperty(NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS_PEOPERTY);
- protected static final int NON_IDENTIFYING_STRING_TABLE_MAXIMUM_CHARACTERS =
- getIntegerValueFromProperty(NON_IDENTIFYING_STRING_TABLE_MAXIMUM_CHARACTERS_PEOPERTY);
-
- private static int getIntegerValueFromProperty(String property) {
- String value = System.getProperty(property);
- if (value == null) {
- return Integer.MAX_VALUE;
- }
-
- try {
- return Math.max(Integer.parseInt(value), ValueArray.DEFAULT_CAPACITY);
- } catch (NumberFormatException e) {
- return Integer.MAX_VALUE;
- }
- }
-
- public final CharArrayArray restrictedAlphabet = new CharArrayArray(ValueArray.DEFAULT_CAPACITY, 256);
- public final StringArray encodingAlgorithm = new StringArray(ValueArray.DEFAULT_CAPACITY, 256, true);
-
- public final StringArray namespaceName;
- public final PrefixArray prefix;
- public final StringArray localName;
- public final StringArray otherNCName ;
- public final StringArray otherURI;
- public final StringArray attributeValue;
- public final CharArrayArray otherString;
-
- public final ContiguousCharArrayArray characterContentChunk;
-
- public final QualifiedNameArray elementName;
- public final QualifiedNameArray attributeName;
-
- public final ValueArray[] tables = new ValueArray[12];
-
- protected SerializerVocabulary _readOnlyVocabulary;
-
- /** Creates a new instance of ParserVocabulary */
- public ParserVocabulary() {
- namespaceName = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, false);
- prefix = new PrefixArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS);
- localName = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, false);
- otherNCName = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, false);
- otherURI = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, true);
- attributeValue = new StringArray(ValueArray.DEFAULT_CAPACITY, NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, true);
- otherString = new CharArrayArray(ValueArray.DEFAULT_CAPACITY, NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS);
-
- characterContentChunk = new ContiguousCharArrayArray(ValueArray.DEFAULT_CAPACITY,
- NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS,
- ContiguousCharArrayArray.INITIAL_CHARACTER_SIZE,
- NON_IDENTIFYING_STRING_TABLE_MAXIMUM_CHARACTERS);
-
- elementName = new QualifiedNameArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS);
- attributeName = new QualifiedNameArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS);
-
- tables[RESTRICTED_ALPHABET] = restrictedAlphabet;
- tables[ENCODING_ALGORITHM] = encodingAlgorithm;
- tables[PREFIX] = prefix;
- tables[NAMESPACE_NAME] = namespaceName;
- tables[LOCAL_NAME] = localName;
- tables[OTHER_NCNAME] = otherNCName;
- tables[OTHER_URI] = otherURI;
- tables[ATTRIBUTE_VALUE] = attributeValue;
- tables[OTHER_STRING] = otherString;
- tables[CHARACTER_CONTENT_CHUNK] = characterContentChunk;
- tables[ELEMENT_NAME] = elementName;
- tables[ATTRIBUTE_NAME] = attributeName;
- }
-
-
- public ParserVocabulary(com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary v) {
- this();
-
- convertVocabulary(v);
- }
-
- void setReadOnlyVocabulary(ParserVocabulary readOnlyVocabulary, boolean clear) {
- for (int i = 0; i < tables.length; i++) {
- tables[i].setReadOnlyArray(readOnlyVocabulary.tables[i], clear);
- }
- }
-
- public void setInitialVocabulary(ParserVocabulary initialVocabulary, boolean clear) {
- setExternalVocabularyURI(null);
- setInitialReadOnlyVocabulary(true);
- setReadOnlyVocabulary(initialVocabulary, clear);
- }
-
- public void setReferencedVocabulary(String referencedVocabularyURI, ParserVocabulary referencedVocabulary, boolean clear) {
- if (!referencedVocabularyURI.equals(getExternalVocabularyURI())) {
- setInitialReadOnlyVocabulary(false);
- setExternalVocabularyURI(referencedVocabularyURI);
- setReadOnlyVocabulary(referencedVocabulary, clear);
- }
- }
-
- public void clear() {
- for (int i = 0; i < tables.length; i++) {
- tables[i].clear();
- }
- }
-
- private void convertVocabulary(com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary v) {
- final StringIntMap prefixMap = new FixedEntryStringIntMap(
- EncodingConstants.XML_NAMESPACE_PREFIX, 8);
- final StringIntMap namespaceNameMap = new FixedEntryStringIntMap(
- EncodingConstants.XML_NAMESPACE_NAME, 8);
- final StringIntMap localNameMap = new StringIntMap();
-
- addToTable(v.restrictedAlphabets.iterator(), restrictedAlphabet);
- addToTable(v.encodingAlgorithms.iterator(), encodingAlgorithm);
- addToTable(v.prefixes.iterator(), prefix, prefixMap);
- addToTable(v.namespaceNames.iterator(), namespaceName, namespaceNameMap);
- addToTable(v.localNames.iterator(), localName, localNameMap);
- addToTable(v.otherNCNames.iterator(), otherNCName);
- addToTable(v.otherURIs.iterator(), otherURI);
- addToTable(v.attributeValues.iterator(), attributeValue);
- addToTable(v.otherStrings.iterator(), otherString);
- addToTable(v.characterContentChunks.iterator(), characterContentChunk);
- addToTable(v.elements.iterator(), elementName, false,
- prefixMap, namespaceNameMap, localNameMap);
- addToTable(v.attributes.iterator(), attributeName, true,
- prefixMap, namespaceNameMap, localNameMap);
- }
-
- private void addToTable(Iterator i, StringArray a) {
- while (i.hasNext()) {
- addToTable((String)i.next(), a, null);
- }
- }
-
- private void addToTable(Iterator i, StringArray a, StringIntMap m) {
- while (i.hasNext()) {
- addToTable((String)i.next(), a, m);
- }
- }
-
- private void addToTable(String s, StringArray a, StringIntMap m) {
- if (s.length() == 0) {
- return;
- }
-
- if (m != null) m.obtainIndex(s);
- a.add(s);
- }
-
- private void addToTable(Iterator i, PrefixArray a, StringIntMap m) {
- while (i.hasNext()) {
- addToTable((String)i.next(), a, m);
- }
- }
-
- private void addToTable(String s, PrefixArray a, StringIntMap m) {
- if (s.length() == 0) {
- return;
- }
-
- if (m != null) m.obtainIndex(s);
- a.add(s);
- }
-
- private void addToTable(Iterator i, ContiguousCharArrayArray a) {
- while (i.hasNext()) {
- addToTable((String)i.next(), a);
- }
- }
-
- private void addToTable(String s, ContiguousCharArrayArray a) {
- if (s.length() == 0) {
- return;
- }
-
- char[] c = s.toCharArray();
- a.add(c, c.length);
- }
-
- private void addToTable(Iterator i, CharArrayArray a) {
- while (i.hasNext()) {
- addToTable((String)i.next(), a);
- }
- }
-
- private void addToTable(String s, CharArrayArray a) {
- if (s.length() == 0) {
- return;
- }
-
- char[] c = s.toCharArray();
- a.add(new CharArray(c, 0, c.length, false));
- }
-
- private void addToTable(Iterator i, QualifiedNameArray a,
- boolean isAttribute,
- StringIntMap prefixMap, StringIntMap namespaceNameMap,
- StringIntMap localNameMap) {
- while (i.hasNext()) {
- addToNameTable((QName)i.next(), a, isAttribute,
- prefixMap, namespaceNameMap, localNameMap);
- }
- }
-
- private void addToNameTable(QName n, QualifiedNameArray a,
- boolean isAttribute,
- StringIntMap prefixMap, StringIntMap namespaceNameMap,
- StringIntMap localNameMap) {
- int namespaceURIIndex = -1;
- int prefixIndex = -1;
- if (n.getNamespaceURI().length() > 0) {
- namespaceURIIndex = namespaceNameMap.obtainIndex(n.getNamespaceURI());
- if (namespaceURIIndex == KeyIntMap.NOT_PRESENT) {
- namespaceURIIndex = namespaceName.getSize();
- namespaceName.add(n.getNamespaceURI());
- }
-
- if (n.getPrefix().length() > 0) {
- prefixIndex = prefixMap.obtainIndex(n.getPrefix());
- if (prefixIndex == KeyIntMap.NOT_PRESENT) {
- prefixIndex = prefix.getSize();
- prefix.add(n.getPrefix());
- }
- }
- }
-
- int localNameIndex = localNameMap.obtainIndex(n.getLocalPart());
- if (localNameIndex == KeyIntMap.NOT_PRESENT) {
- localNameIndex = localName.getSize();
- localName.add(n.getLocalPart());
- }
-
- QualifiedName name = new QualifiedName(n.getPrefix(), n.getNamespaceURI(), n.getLocalPart(),
- a.getSize(),
- prefixIndex, namespaceURIIndex, localNameIndex);
- if (isAttribute) {
- name.createAttributeValues(DuplicateAttributeVerifier.MAP_SIZE);
- }
- a.add(name);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/vocab/SerializerVocabulary.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/vocab/SerializerVocabulary.java
deleted file mode 100644
index b10c9f14..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/vocab/SerializerVocabulary.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.vocab;
-
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.fastinfoset.QualifiedName;
-import com.sun.xml.internal.fastinfoset.util.CharArrayIntMap;
-import com.sun.xml.internal.fastinfoset.util.FixedEntryStringIntMap;
-import com.sun.xml.internal.fastinfoset.util.KeyIntMap;
-import com.sun.xml.internal.fastinfoset.util.LocalNameQualifiedNamesMap;
-import com.sun.xml.internal.fastinfoset.util.StringIntMap;
-import java.util.Iterator;
-import javax.xml.namespace.QName;
-
-public class SerializerVocabulary extends Vocabulary {
- public final StringIntMap restrictedAlphabet;
- public final StringIntMap encodingAlgorithm;
-
- public final StringIntMap namespaceName;
- public final StringIntMap prefix;
- public final StringIntMap localName;
- public final StringIntMap otherNCName;
- public final StringIntMap otherURI;
- public final StringIntMap attributeValue;
- public final CharArrayIntMap otherString;
-
- public final CharArrayIntMap characterContentChunk;
-
- public final LocalNameQualifiedNamesMap elementName;
- public final LocalNameQualifiedNamesMap attributeName;
-
- public final KeyIntMap[] tables = new KeyIntMap[12];
-
- protected boolean _useLocalNameAsKey;
-
- protected SerializerVocabulary _readOnlyVocabulary;
-
- public SerializerVocabulary() {
- tables[RESTRICTED_ALPHABET] = restrictedAlphabet = new StringIntMap(4);
- tables[ENCODING_ALGORITHM] = encodingAlgorithm = new StringIntMap(4);
- tables[PREFIX] = prefix = new FixedEntryStringIntMap(EncodingConstants.XML_NAMESPACE_PREFIX, 8);
- tables[NAMESPACE_NAME] = namespaceName = new FixedEntryStringIntMap(EncodingConstants.XML_NAMESPACE_NAME, 8);
- tables[LOCAL_NAME] = localName = new StringIntMap();
- tables[OTHER_NCNAME] = otherNCName = new StringIntMap(4);
- tables[OTHER_URI] = otherURI = new StringIntMap(4);
- tables[ATTRIBUTE_VALUE] = attributeValue = new StringIntMap();
- tables[OTHER_STRING] = otherString = new CharArrayIntMap(4);
- tables[CHARACTER_CONTENT_CHUNK] = characterContentChunk = new CharArrayIntMap();
- tables[ELEMENT_NAME] = elementName = new LocalNameQualifiedNamesMap();
- tables[ATTRIBUTE_NAME] = attributeName = new LocalNameQualifiedNamesMap();
- }
-
- public SerializerVocabulary(com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary v,
- boolean useLocalNameAsKey) {
- this();
-
- _useLocalNameAsKey = useLocalNameAsKey;
- convertVocabulary(v);
- }
-
- public SerializerVocabulary getReadOnlyVocabulary() {
- return _readOnlyVocabulary;
- }
-
- protected void setReadOnlyVocabulary(SerializerVocabulary readOnlyVocabulary,
- boolean clear) {
- for (int i = 0; i < tables.length; i++) {
- tables[i].setReadOnlyMap(readOnlyVocabulary.tables[i], clear);
- }
- }
-
- public void setInitialVocabulary(SerializerVocabulary initialVocabulary,
- boolean clear) {
- setExternalVocabularyURI(null);
- setInitialReadOnlyVocabulary(true);
- setReadOnlyVocabulary(initialVocabulary, clear);
- }
-
- public void setExternalVocabulary(String externalVocabularyURI,
- SerializerVocabulary externalVocabulary, boolean clear) {
- setInitialReadOnlyVocabulary(false);
- setExternalVocabularyURI(externalVocabularyURI);
- setReadOnlyVocabulary(externalVocabulary, clear);
- }
-
- public void clear() {
- for (int i = 0; i < tables.length; i++) {
- tables[i].clear();
- }
- }
-
- private void convertVocabulary(com.sun.xml.internal.org.jvnet.fastinfoset.Vocabulary v) {
- addToTable(v.restrictedAlphabets.iterator(), restrictedAlphabet);
- addToTable(v.encodingAlgorithms.iterator(), encodingAlgorithm);
- addToTable(v.prefixes.iterator(), prefix);
- addToTable(v.namespaceNames.iterator(), namespaceName);
- addToTable(v.localNames.iterator(), localName);
- addToTable(v.otherNCNames.iterator(), otherNCName);
- addToTable(v.otherURIs.iterator(), otherURI);
- addToTable(v.attributeValues.iterator(), attributeValue);
- addToTable(v.otherStrings.iterator(), otherString);
- addToTable(v.characterContentChunks.iterator(), characterContentChunk);
- addToTable(v.elements.iterator(), elementName);
- addToTable(v.attributes.iterator(), attributeName);
- }
-
- private void addToTable(Iterator i, StringIntMap m) {
- while (i.hasNext()) {
- addToTable((String)i.next(), m);
- }
- }
-
- private void addToTable(String s, StringIntMap m) {
- if (s.length() == 0) {
- return;
- }
-
- m.obtainIndex(s);
- }
-
- private void addToTable(Iterator i, CharArrayIntMap m) {
- while (i.hasNext()) {
- addToTable((String)i.next(), m);
- }
- }
-
- private void addToTable(String s, CharArrayIntMap m) {
- if (s.length() == 0) {
- return;
- }
-
- char[] c = s.toCharArray();
- m.obtainIndex(c, 0, c.length, false);
- }
-
- private void addToTable(Iterator i, LocalNameQualifiedNamesMap m) {
- while (i.hasNext()) {
- addToNameTable((QName)i.next(), m);
- }
- }
-
- private void addToNameTable(QName n, LocalNameQualifiedNamesMap m) {
- int namespaceURIIndex = -1;
- int prefixIndex = -1;
- if (n.getNamespaceURI().length() > 0) {
- namespaceURIIndex = namespaceName.obtainIndex(n.getNamespaceURI());
- if (namespaceURIIndex == KeyIntMap.NOT_PRESENT) {
- namespaceURIIndex = namespaceName.get(n.getNamespaceURI());
- }
-
- if (n.getPrefix().length() > 0) {
- prefixIndex = prefix.obtainIndex(n.getPrefix());
- if (prefixIndex == KeyIntMap.NOT_PRESENT) {
- prefixIndex = prefix.get(n.getPrefix());
- }
- }
- }
-
- int localNameIndex = localName.obtainIndex(n.getLocalPart());
- if (localNameIndex == KeyIntMap.NOT_PRESENT) {
- localNameIndex = localName.get(n.getLocalPart());
- }
-
- QualifiedName name = new QualifiedName(n.getPrefix(), n.getNamespaceURI(), n.getLocalPart(),
- m.getNextIndex(),
- prefixIndex, namespaceURIIndex, localNameIndex);
-
- LocalNameQualifiedNamesMap.Entry entry = null;
- if (_useLocalNameAsKey) {
- entry = m.obtainEntry(n.getLocalPart());
- } else {
- String qName = (prefixIndex == -1)
- ? n.getLocalPart()
- : n.getPrefix() + ":" + n.getLocalPart();
- entry = m.obtainEntry(qName);
- }
-
- entry.addQualifiedName(name);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/vocab/Vocabulary.java b/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/vocab/Vocabulary.java
deleted file mode 100644
index 87ea1f1c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/fastinfoset/vocab/Vocabulary.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.fastinfoset.vocab;
-
-
-public abstract class Vocabulary {
- public static final int RESTRICTED_ALPHABET = 0;
- public static final int ENCODING_ALGORITHM = 1;
- public static final int PREFIX = 2;
- public static final int NAMESPACE_NAME = 3;
- public static final int LOCAL_NAME = 4;
- public static final int OTHER_NCNAME = 5;
- public static final int OTHER_URI = 6;
- public static final int ATTRIBUTE_VALUE = 7;
- public static final int OTHER_STRING = 8;
- public static final int CHARACTER_CONTENT_CHUNK = 9;
- public static final int ELEMENT_NAME = 10;
- public static final int ATTRIBUTE_NAME = 11;
-
- protected boolean _hasInitialReadOnlyVocabulary;
-
- protected String _referencedVocabularyURI;
-
- public boolean hasInitialVocabulary() {
- return _hasInitialReadOnlyVocabulary;
- }
-
- protected void setInitialReadOnlyVocabulary(boolean hasInitialReadOnlyVocabulary) {
- _hasInitialReadOnlyVocabulary = hasInitialReadOnlyVocabulary;
- }
-
- public boolean hasExternalVocabulary() {
- return _referencedVocabularyURI != null;
- }
-
- public String getExternalVocabularyURI() {
- return _referencedVocabularyURI;
- }
-
- protected void setExternalVocabularyURI(String referencedVocabularyURI) {
- _referencedVocabularyURI = referencedVocabularyURI;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java
deleted file mode 100644
index b8c9773a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj;
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-
-import javax.xml.soap.SOAPException;
-
-/**
- * An exception that signals that a SOAP exception has occurred. A
- * <code>SOAPExceptionImpl</code> object may contain a <code>String</code>
- * that gives the reason for the exception, an embedded
- * <code>Throwable</code> object, or both. This class provides methods
- * for retrieving reason messages and for retrieving the embedded
- * <code>Throwable</code> object.
- *
- * <P> Typical reasons for throwing a <code>SOAPExceptionImpl</code>
- * object are problems such as difficulty setting a header, not being
- * able to send a message, and not being able to get a connection with
- * the provider. Reasons for embedding a <code>Throwable</code>
- * object include problems such as input/output errors or a parsing
- * problem, such as an error in parsing a header.
- */
-public class SOAPExceptionImpl extends SOAPException {
- private Throwable cause;
-
- /**
- * Constructs a <code>SOAPExceptionImpl</code> object with no
- * reason or embedded <code>Throwable</code> object.
- */
- public SOAPExceptionImpl() {
- super();
- this.cause = null;
- }
-
- /**
- * Constructs a <code>SOAPExceptionImpl</code> object with the given
- * <code>String</code> as the reason for the exception being thrown.
- *
- * @param reason a description of what caused the exception
- */
- public SOAPExceptionImpl(String reason) {
- super(reason);
- this.cause = null;
- }
-
- /**
- * Constructs a <code>SOAPExceptionImpl</code> object with the given
- * <code>String</code> as the reason for the exception being thrown
- * and the given <code>Throwable</code> object as an embedded
- * exception.
- *
- * @param reason a description of what caused the exception
- * @param cause a <code>Throwable</code> object that is to
- * be embedded in this <code>SOAPExceptionImpl</code> object
- */
- public SOAPExceptionImpl(String reason, Throwable cause) {
- super (reason);
- initCause(cause);
- }
-
- /**
- * Constructs a <code>SOAPExceptionImpl</code> object initialized
- * with the given <code>Throwable</code> object.
- */
- public SOAPExceptionImpl(Throwable cause) {
- super (cause.toString());
- initCause(cause);
- }
-
- /**
- * Returns the detail message for this <code>SOAPExceptionImpl</code>
- * object.
- * <P>
- * If there is an embedded <code>Throwable</code> object, and if the
- * <code>SOAPExceptionImpl</code> object has no detail message of its
- * own, this method will return the detail message from the embedded
- * <code>Throwable</code> object.
- *
- * @return the error or warning message for this
- * <code>SOAPExceptionImpl</code> or, if it has none, the
- * message of the embedded <code>Throwable</code> object,
- * if there is one
- */
- public String getMessage() {
- String message = super.getMessage ();
- if (message == null && cause != null) {
- return cause.getMessage();
- } else {
- return message;
- }
- }
-
- /**
- * Returns the <code>Throwable</code> object embedded in this
- * <code>SOAPExceptionImpl</code> if there is one. Otherwise, this method
- * returns <code>null</code>.
- *
- * @return the embedded <code>Throwable</code> object or <code>null</code>
- * if there is none
- */
-
- public Throwable getCause() {
- return cause;
- }
-
- /**
- * Initializes the <code>cause</code> field of this <code>SOAPExceptionImpl</code>
- * object with the given <code>Throwable</code> object.
- * <P>
- * This method can be called at most once. It is generally called from
- * within the constructor or immediately after the constructor has
- * returned a new <code>SOAPExceptionImpl</code> object.
- * If this <code>SOAPExceptionImpl</code> object was created with the
- * constructor {@link #SOAPExceptionImpl(Throwable)} or
- * {@link #SOAPExceptionImpl(String,Throwable)}, meaning that its
- * <code>cause</code> field already has a value, this method cannot be
- * called even once.
- *
- * @param cause the <code>Throwable</code> object that caused this
- * <code>SOAPExceptionImpl</code> object to be thrown. The value of this
- * parameter is saved for later retrieval by the
- * {@link #getCause()} method. A <tt>null</tt> value is
- * permitted and indicates that the cause is nonexistent or
- * unknown.
- * @return a reference to this <code>SOAPExceptionImpl</code> instance
- * @throws IllegalArgumentException if <code>cause</code> is this
- * <code>Throwable</code> object. (A <code>Throwable</code> object
- * cannot be its own cause.)
- * @throws IllegalStateException if this <code>SOAPExceptionImpl</code> object
- * was created with {@link #SOAPExceptionImpl(Throwable)} or
- * {@link #SOAPExceptionImpl(String,Throwable)}, or this
- * method has already been called on this <code>SOAPExceptionImpl</code>
- * object
- */
- public synchronized Throwable initCause(Throwable cause)
- {
- if(this.cause != null) {
- throw new IllegalStateException("Can't override cause");
- }
- if(cause == this) {
- throw new IllegalArgumentException("Self-causation not permitted");
- }
- this.cause = cause;
-
- return this;
- }
-
- public void printStackTrace() {
- super.printStackTrace();
- if (cause != null) {
- System.err.println("\nCAUSE:\n");
- cause.printStackTrace();
- }
- }
-
- public void printStackTrace(PrintStream s) {
- super.printStackTrace(s);
- if (cause != null) {
- s.println("\nCAUSE:\n");
- cause.printStackTrace(s);
- }
- }
-
- public void printStackTrace(PrintWriter s) {
- super.printStackTrace(s);
- if (cause != null) {
- s.println("\nCAUSE:\n");
- cause.printStackTrace(s);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java
deleted file mode 100644
index 2608d712..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java
+++ /dev/null
@@ -1,656 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.client.p2p;
-
-import java.io.*;
-import java.lang.reflect.Method;
-import java.net.*;
-import java.security.*;
-import java.util.Iterator;
-import java.util.StringTokenizer;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.util.*;
-
-/**
- * This represents a "connection" to the simple HTTP-based provider.
- *
- * @author Anil Vijendran (akv@eng.sun.com)
- * @author Rajiv Mordani (rajiv.mordani@sun.com)
- * @author Manveen Kaur (manveen.kaur@sun.com)
- *
- */
-class HttpSOAPConnection extends SOAPConnection {
-
- public static final String vmVendor = SAAJUtil.getSystemProperty("java.vendor.url");
- private static final String sunVmVendor = "http://java.sun.com/";
- private static final String ibmVmVendor = "http://www.ibm.com/";
- private static final boolean isSunVM = sunVmVendor.equals(vmVendor) ? true: false;
- private static final boolean isIBMVM = ibmVmVendor.equals(vmVendor) ? true : false;
- private static final String JAXM_URLENDPOINT="javax.xml.messaging.URLEndpoint";
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.HTTP_CONN_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.client.p2p.LocalStrings");
-
-
- MessageFactory messageFactory = null;
-
- boolean closed = false;
-
- public HttpSOAPConnection() throws SOAPException {
-
- try {
- messageFactory = MessageFactory.newInstance(SOAPConstants.DYNAMIC_SOAP_PROTOCOL);
- } catch (NoSuchMethodError ex) {
- //fallback to default SOAP 1.1 in this case for backward compatibility
- messageFactory = MessageFactory.newInstance();
- } catch (Exception ex) {
- log.log(Level.SEVERE, "SAAJ0001.p2p.cannot.create.msg.factory", ex);
- throw new SOAPExceptionImpl("Unable to create message factory", ex);
- }
- }
-
- public void close() throws SOAPException {
- if (closed) {
- log.severe("SAAJ0002.p2p.close.already.closed.conn");
- throw new SOAPExceptionImpl("Connection already closed");
- }
-
- messageFactory = null;
- closed = true;
- }
-
- public SOAPMessage call(SOAPMessage message, Object endPoint)
- throws SOAPException {
- if (closed) {
- log.severe("SAAJ0003.p2p.call.already.closed.conn");
- throw new SOAPExceptionImpl("Connection is closed");
- }
-
- Class urlEndpointClass = null;
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- try {
- if (loader != null) {
- urlEndpointClass = loader.loadClass(JAXM_URLENDPOINT);
- } else {
- urlEndpointClass = Class.forName(JAXM_URLENDPOINT);
- }
- } catch (ClassNotFoundException ex) {
- //Do nothing. URLEndpoint is available only when JAXM is there.
- if (log.isLoggable(Level.FINEST))
- log.finest("SAAJ0090.p2p.endpoint.available.only.for.JAXM");
- }
-
- if (urlEndpointClass != null) {
- if (urlEndpointClass.isInstance(endPoint)) {
- String url = null;
-
- try {
- Method m = urlEndpointClass.getMethod("getURL", (Class[])null);
- url = (String) m.invoke(endPoint, (Object[])null);
- } catch (Exception ex) {
- // TBD -- exception chaining
- log.log(Level.SEVERE,"SAAJ0004.p2p.internal.err",ex);
- throw new SOAPExceptionImpl(
- "Internal error: " + ex.getMessage());
- }
- try {
- endPoint = new URL(url);
- } catch (MalformedURLException mex) {
- log.log(Level.SEVERE,"SAAJ0005.p2p.", mex);
- throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
- }
- }
- }
-
- if (endPoint instanceof java.lang.String) {
- try {
- endPoint = new URL((String) endPoint);
- } catch (MalformedURLException mex) {
- log.log(Level.SEVERE, "SAAJ0006.p2p.bad.URL", mex);
- throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
- }
- }
-
- if (endPoint instanceof URL)
- try {
- SOAPMessage response = post(message, (URL)endPoint);
- return response;
- } catch (Exception ex) {
- // TBD -- chaining?
- throw new SOAPExceptionImpl(ex);
- } else {
- log.severe("SAAJ0007.p2p.bad.endPoint.type");
- throw new SOAPExceptionImpl("Bad endPoint type " + endPoint);
- }
- }
-
- SOAPMessage post(SOAPMessage message, URL endPoint) throws SOAPException, IOException {
- boolean isFailure = false;
-
- URL url = null;
- HttpURLConnection httpConnection = null;
-
- int responseCode = 0;
- try {
- if (endPoint.getProtocol().equals("https"))
- //if(!setHttps)
- initHttps();
- // Process the URL
- URI uri = new URI(endPoint.toString());
- String userInfo = uri.getRawUserInfo();
-
- url = endPoint;
-
- if (dL > 0)
- d("uri: " + userInfo + " " + url + " " + uri);
-
- // TBD
- // Will deal with https later.
- if (!url.getProtocol().equalsIgnoreCase("http")
- && !url.getProtocol().equalsIgnoreCase("https")) {
- log.severe("SAAJ0052.p2p.protocol.mustbe.http.or.https");
- throw new IllegalArgumentException(
- "Protocol "
- + url.getProtocol()
- + " not supported in URL "
- + url);
- }
- httpConnection = (HttpURLConnection) createConnection(url);
-
- httpConnection.setRequestMethod("POST");
-
- httpConnection.setDoOutput(true);
- httpConnection.setDoInput(true);
- httpConnection.setUseCaches(false);
- httpConnection.setInstanceFollowRedirects(true);
-
- if (message.saveRequired())
- message.saveChanges();
-
- MimeHeaders headers = message.getMimeHeaders();
-
- Iterator it = headers.getAllHeaders();
- boolean hasAuth = false; // true if we find explicit Auth header
- while (it.hasNext()) {
- MimeHeader header = (MimeHeader) it.next();
-
- String[] values = headers.getHeader(header.getName());
- if (values.length == 1)
- httpConnection.setRequestProperty(
- header.getName(),
- header.getValue());
- else {
- StringBuffer concat = new StringBuffer();
- int i = 0;
- while (i < values.length) {
- if (i != 0)
- concat.append(',');
- concat.append(values[i]);
- i++;
- }
-
- httpConnection.setRequestProperty(
- header.getName(),
- concat.toString());
- }
-
- if ("Authorization".equals(header.getName())) {
- hasAuth = true;
- if (log.isLoggable(Level.FINE))
- log.fine("SAAJ0091.p2p.https.auth.in.POST.true");
- }
- }
-
- if (!hasAuth && userInfo != null) {
- initAuthUserInfo(httpConnection, userInfo);
- }
-
- OutputStream out = httpConnection.getOutputStream();
- try {
- message.writeTo(out);
- out.flush();
- } finally {
- out.close();
- }
-
- httpConnection.connect();
-
- try {
-
- responseCode = httpConnection.getResponseCode();
-
- // let HTTP_INTERNAL_ERROR (500) through because it is used for SOAP faults
- if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
- isFailure = true;
- }
- //else if (responseCode != HttpURLConnection.HTTP_OK)
- //else if (!(responseCode >= HttpURLConnection.HTTP_OK && responseCode < 207))
- else if ((responseCode / 100) != 2) {
- log.log(Level.SEVERE,
- "SAAJ0008.p2p.bad.response",
- new String[] {httpConnection.getResponseMessage()});
- throw new SOAPExceptionImpl(
- "Bad response: ("
- + responseCode
- + httpConnection.getResponseMessage());
-
- }
- } catch (IOException e) {
- // on JDK1.3.1_01, we end up here, but then getResponseCode() succeeds!
- responseCode = httpConnection.getResponseCode();
- if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
- isFailure = true;
- } else {
- throw e;
- }
-
- }
-
- } catch (SOAPException ex) {
- throw ex;
- } catch (Exception ex) {
- log.severe("SAAJ0009.p2p.msg.send.failed");
- throw new SOAPExceptionImpl("Message send failed", ex);
- }
-
- SOAPMessage response = null;
- InputStream httpIn = null;
- if (responseCode == HttpURLConnection.HTTP_OK || isFailure) {
- try {
- MimeHeaders headers = new MimeHeaders();
-
- String key, value;
-
- // Header field 0 is the status line so we skip it.
-
- int i = 1;
-
- while (true) {
- key = httpConnection.getHeaderFieldKey(i);
- value = httpConnection.getHeaderField(i);
-
- if (key == null && value == null)
- break;
-
- if (key != null) {
- StringTokenizer values =
- new StringTokenizer(value, ",");
- while (values.hasMoreTokens())
- headers.addHeader(key, values.nextToken().trim());
- }
- i++;
- }
-
- httpIn =
- (isFailure
- ? httpConnection.getErrorStream()
- : httpConnection.getInputStream());
-
- byte[] bytes = readFully(httpIn);
-
- int length =
- httpConnection.getContentLength() == -1
- ? bytes.length
- : httpConnection.getContentLength();
-
- // If no reply message is returned,
- // content-Length header field value is expected to be zero.
- if (length == 0) {
- response = null;
- log.warning("SAAJ0014.p2p.content.zero");
- } else {
- ByteInputStream in = new ByteInputStream(bytes, length);
- response = messageFactory.createMessage(headers, in);
- }
-
- } catch (SOAPException ex) {
- throw ex;
- } catch (Exception ex) {
- log.log(Level.SEVERE,"SAAJ0010.p2p.cannot.read.resp", ex);
- throw new SOAPExceptionImpl(
- "Unable to read response: " + ex.getMessage());
- } finally {
- if (httpIn != null)
- httpIn.close();
- httpConnection.disconnect();
- }
- }
- return response;
- }
-
- // Object identifies where the request should be sent.
- // It is required to support objects of type String and java.net.URL.
-
- public SOAPMessage get(Object endPoint) throws SOAPException {
- if (closed) {
- log.severe("SAAJ0011.p2p.get.already.closed.conn");
- throw new SOAPExceptionImpl("Connection is closed");
- }
- Class urlEndpointClass = null;
-
- try {
- urlEndpointClass = Class.forName("javax.xml.messaging.URLEndpoint");
- } catch (Exception ex) {
- //Do nothing. URLEndpoint is available only when JAXM is there.
- }
-
- if (urlEndpointClass != null) {
- if (urlEndpointClass.isInstance(endPoint)) {
- String url = null;
-
- try {
- Method m = urlEndpointClass.getMethod("getURL", (Class[])null);
- url = (String) m.invoke(endPoint, (Object[])null);
- } catch (Exception ex) {
- log.severe("SAAJ0004.p2p.internal.err");
- throw new SOAPExceptionImpl(
- "Internal error: " + ex.getMessage());
- }
- try {
- endPoint = new URL(url);
- } catch (MalformedURLException mex) {
- log.severe("SAAJ0005.p2p.");
- throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
- }
- }
- }
-
- if (endPoint instanceof java.lang.String) {
- try {
- endPoint = new URL((String) endPoint);
- } catch (MalformedURLException mex) {
- log.severe("SAAJ0006.p2p.bad.URL");
- throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
- }
- }
-
- if (endPoint instanceof URL)
- try {
- SOAPMessage response = doGet((URL)endPoint);
- return response;
- } catch (Exception ex) {
- throw new SOAPExceptionImpl(ex);
- } else
- throw new SOAPExceptionImpl("Bad endPoint type " + endPoint);
- }
-
- SOAPMessage doGet(URL endPoint) throws SOAPException, IOException {
- boolean isFailure = false;
-
- URL url = null;
- HttpURLConnection httpConnection = null;
-
- int responseCode = 0;
- try {
- /// Is https GET allowed??
- if (endPoint.getProtocol().equals("https"))
- initHttps();
- // Process the URL
- URI uri = new URI(endPoint.toString());
- String userInfo = uri.getRawUserInfo();
-
- url = endPoint;
-
- if (dL > 0)
- d("uri: " + userInfo + " " + url + " " + uri);
-
- // TBD
- // Will deal with https later.
- if (!url.getProtocol().equalsIgnoreCase("http")
- && !url.getProtocol().equalsIgnoreCase("https")) {
- log.severe("SAAJ0052.p2p.protocol.mustbe.http.or.https");
- throw new IllegalArgumentException(
- "Protocol "
- + url.getProtocol()
- + " not supported in URL "
- + url);
- }
- httpConnection = (HttpURLConnection) createConnection(url);
-
- httpConnection.setRequestMethod("GET");
-
- httpConnection.setDoOutput(true);
- httpConnection.setDoInput(true);
- httpConnection.setUseCaches(false);
- httpConnection.setFollowRedirects(true);
-
- httpConnection.connect();
-
- try {
-
- responseCode = httpConnection.getResponseCode();
-
- // let HTTP_INTERNAL_ERROR (500) through because it is used for SOAP faults
- if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
- isFailure = true;
- } else if ((responseCode / 100) != 2) {
- log.log(Level.SEVERE,
- "SAAJ0008.p2p.bad.response",
- new String[] { httpConnection.getResponseMessage()});
- throw new SOAPExceptionImpl(
- "Bad response: ("
- + responseCode
- + httpConnection.getResponseMessage());
-
- }
- } catch (IOException e) {
- // on JDK1.3.1_01, we end up here, but then getResponseCode() succeeds!
- responseCode = httpConnection.getResponseCode();
- if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
- isFailure = true;
- } else {
- throw e;
- }
-
- }
-
- } catch (SOAPException ex) {
- throw ex;
- } catch (Exception ex) {
- log.severe("SAAJ0012.p2p.get.failed");
- throw new SOAPExceptionImpl("Get failed", ex);
- }
-
- SOAPMessage response = null;
- InputStream httpIn = null;
- if (responseCode == HttpURLConnection.HTTP_OK || isFailure) {
- try {
- MimeHeaders headers = new MimeHeaders();
-
- String key, value;
-
- // Header field 0 is the status line so we skip it.
-
- int i = 1;
-
- while (true) {
- key = httpConnection.getHeaderFieldKey(i);
- value = httpConnection.getHeaderField(i);
-
- if (key == null && value == null)
- break;
-
- if (key != null) {
- StringTokenizer values =
- new StringTokenizer(value, ",");
- while (values.hasMoreTokens())
- headers.addHeader(key, values.nextToken().trim());
- }
- i++;
- }
-
- httpIn =
- (isFailure
- ? httpConnection.getErrorStream()
- : httpConnection.getInputStream());
- // If no reply message is returned,
- // content-Length header field value is expected to be zero.
- // java SE 6 documentation says :
- // available() : an estimate of the number of bytes that can be read
- //(or skipped over) from this input stream without blocking
- //or 0 when it reaches the end of the input stream.
- if ((httpIn == null )
- || (httpConnection.getContentLength() == 0)
- || (httpIn.available() == 0)) {
- response = null;
- log.warning("SAAJ0014.p2p.content.zero");
- } else {
- response = messageFactory.createMessage(headers, httpIn);
- }
-
- } catch (SOAPException ex) {
- throw ex;
- } catch (Exception ex) {
- log.log(Level.SEVERE,
- "SAAJ0010.p2p.cannot.read.resp",
- ex);
- throw new SOAPExceptionImpl(
- "Unable to read response: " + ex.getMessage());
- } finally {
- if (httpIn != null)
- httpIn.close();
- httpConnection.disconnect();
- }
- }
- return response;
- }
-
- private byte[] readFully(InputStream istream) throws IOException {
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- byte[] buf = new byte[1024];
- int num = 0;
-
- while ((num = istream.read(buf)) != -1) {
- bout.write(buf, 0, num);
- }
-
- byte[] ret = bout.toByteArray();
-
- return ret;
- }
-
- //private static String SSL_PKG = "com.sun.net.ssl.internal.www.protocol";
- //private static String SSL_PROVIDER =
- // "com.sun.net.ssl.internal.ssl.Provider";
- private static final String SSL_PKG;
- private static final String SSL_PROVIDER;
-
- static {
- if (isIBMVM) {
- SSL_PKG ="com.ibm.net.ssl.internal.www.protocol";
- SSL_PROVIDER ="com.ibm.net.ssl.internal.ssl.Provider";
- } else {
- //if not IBM VM default to Sun.
- SSL_PKG = "com.sun.net.ssl.internal.www.protocol";
- SSL_PROVIDER ="com.sun.net.ssl.internal.ssl.Provider";
- }
- }
-
- private void initHttps() {
- //if(!setHttps) {
- String pkgs = SAAJUtil.getSystemProperty("java.protocol.handler.pkgs");
- if (log.isLoggable(Level.FINE))
- log.log(Level.FINE, "SAAJ0053.p2p.providers", new String[] { pkgs });
-
- if (pkgs == null || pkgs.indexOf(SSL_PKG) < 0) {
- if (pkgs == null)
- pkgs = SSL_PKG;
- else
- pkgs = pkgs + "|" + SSL_PKG;
- System.setProperty("java.protocol.handler.pkgs", pkgs);
- if (log.isLoggable(Level.FINE))
- log.log(Level.FINE, "SAAJ0054.p2p.set.providers",
- new String[] { pkgs });
- try {
- Class c = Class.forName(SSL_PROVIDER);
- Provider p = (Provider) c.newInstance();
- Security.addProvider(p);
- if (log.isLoggable(Level.FINE))
- log.log(Level.FINE, "SAAJ0055.p2p.added.ssl.provider",
- new String[] { SSL_PROVIDER });
- //System.out.println("Added SSL_PROVIDER " + SSL_PROVIDER);
- //setHttps = true;
- } catch (Exception ex) {
- }
- }
- //}
- }
-
- private void initAuthUserInfo(HttpURLConnection conn, String userInfo) {
- String user;
- String password;
- if (userInfo != null) { // get the user and password
- //System.out.println("UserInfo= " + userInfo );
- int delimiter = userInfo.indexOf(':');
- if (delimiter == -1) {
- user = ParseUtil.decode(userInfo);
- password = null;
- } else {
- user = ParseUtil.decode(userInfo.substring(0, delimiter++));
- password = ParseUtil.decode(userInfo.substring(delimiter));
- }
-
- String plain = user + ":";
- byte[] nameBytes = plain.getBytes();
- byte[] passwdBytes = password.getBytes();
-
- // concatenate user name and password bytes and encode them
- byte[] concat = new byte[nameBytes.length + passwdBytes.length];
-
- System.arraycopy(nameBytes, 0, concat, 0, nameBytes.length);
- System.arraycopy(
- passwdBytes,
- 0,
- concat,
- nameBytes.length,
- passwdBytes.length);
- String auth = "Basic " + new String(Base64.encode(concat));
- conn.setRequestProperty("Authorization", auth);
- if (dL > 0)
- d("Adding auth " + auth);
- }
- }
-
- private static final int dL = 0;
- private void d(String s) {
- log.log(Level.SEVERE,
- "SAAJ0013.p2p.HttpSOAPConnection",
- new String[] { s });
- System.err.println("HttpSOAPConnection: " + s);
- }
-
- private java.net.HttpURLConnection createConnection(URL endpoint)
- throws IOException {
- return (HttpURLConnection) endpoint.openConnection();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java
deleted file mode 100644
index 6587501c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.client.p2p;
-
-import javax.xml.soap.*;
-
-/**
- * Implementation of the SOAPConnectionFactory
- *
- * @author Anil Vijendran (anil@sun.com)
- */
-public class HttpSOAPConnectionFactory extends SOAPConnectionFactory {
-
- public SOAPConnection createConnection()
- throws SOAPException
- {
- return new HttpSOAPConnection();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties
deleted file mode 100644
index 04359622..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Unable to create Message Factory
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Connection already closed (from close method)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Connection already closed (from call)
-SAAJ0004.p2p.internal.err=SAAJ0004: Internal error
-SAAJ0005.p2p.=SAAJ0005: Bad URL (endPoint instance of javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: Bad URL (endPoint instance of String)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Bad endPoint type (endPoint instance of URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: Bad Response; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: Message send failed
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Unable to read response
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Connection already closed (from get)
-SAAJ0012.p2p.get.failed=SAAJ0012: Get failed
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: Invalid reply message. Content length of reply was zero.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: Proxy host: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: Proxy Port: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protocol not supported in URL, must be http or https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: Providers {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: Setting Providers {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: Added SSL_PROVIDER {0}
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint is available only when JAXM is there
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: HTTPS Authorization in POST set to true
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties
deleted file mode 100644
index 6a0db438..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Nachrichten-Factory kann nicht erstellt werden
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Verbindung ist bereits beendet (mit close-Methode)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Verbindung ist bereits beendet (mit call)
-SAAJ0004.p2p.internal.err=SAAJ0004: Interner Fehler
-SAAJ0005.p2p.=SAAJ0005: Ung\u00FCltige URL (endPoint-Instanz von javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: Ung\u00FCltige URL (endPoint-Instanz von Zeichenfolge)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Ung\u00FCltiger endPoint-Typ (endPoint-Instanz von URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: Ung\u00FCltige Antwort; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: Nachricht konnte nicht gesendet werden
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Antwort konnte nicht gelesen werden
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Verbindung ist bereits beendet (mit get)
-SAAJ0012.p2p.get.failed=SAAJ0012: Get-Vorgang nicht erfolgreich
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: Ung\u00FCltige Antwortnachricht. Contentl\u00E4nge von Antwort war null.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: Proxyhost: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: Proxyport: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protokoll in URL nicht unterst\u00FCtzt, muss http oder https sein
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: Provider {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: Provider {0} werden festgelegt
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} hinzugef\u00FCgt
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint ist nur verf\u00FCgbar, wenn JAXM vorhanden ist
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: HTTPS-Autorisierung in POST auf "True" festgelegt
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties
deleted file mode 100644
index d5ab4911..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: no se ha podido crear la f\u00E1brica de mensajes
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: la conexi\u00F3n ya est\u00E1 cerrada (desde el m\u00E9todo de cierre)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: la conexi\u00F3n ya est\u00E1 cerrada (desde la llamada)
-SAAJ0004.p2p.internal.err=SAAJ0004: error interno
-SAAJ0005.p2p.=SAAJ0005: URL err\u00F3nea (instancia endPoint de javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL err\u00F3nea (instancia endPoint de String)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: tipo endPoint err\u00F3neo (instancia endPoint de URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: respuesta err\u00F3nea; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: fallo de env\u00EDo de mensaje
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: no se ha podido leer la respuesta
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: la conexi\u00F3n ya est\u00E1 cerrada (desde la obtenci\u00F3n)
-SAAJ0012.p2p.get.failed=SAAJ0012: fallo de obtenci\u00F3n
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: mensaje de respuesta no v\u00E1lido. La longitud del contenido de respuesta es cero.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: Host de proxy: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: Puerto de proxy: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: el protocolo no est\u00E1 soportado en la URL. Debe ser http o https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: proveedores {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: definici\u00F3n de Proveedores {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: se ha agregado SSL_PROVIDER {0}
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint s\u00F3lo est\u00E1 disponible cuando JAXM est\u00E1 all\u00ED
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: la autorizaci\u00F3n de HTTPS en POST se ha definido en true
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties
deleted file mode 100644
index a5c4fb80..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001 : impossible de cr\u00E9er une fabrique de messages
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de la m\u00E9thode de fermeture)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de l'appel)
-SAAJ0004.p2p.internal.err=SAAJ0004 : erreur interne
-SAAJ0005.p2p.=SAAJ0005 : URL incorrecte (instance d'adresse de javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006 : URL incorrecte (instance d'adresse de la cha\u00EEne)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007 : type d'adresse incorrect (instance d'adresse de l'URL)
-SAAJ0008.p2p.bad.response=SAAJ0008 : r\u00E9ponse incorrecte ; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009 : \u00E9chec de l'envoi du message
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010 : impossible de lire la r\u00E9ponse
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de la m\u00E9thode get)
-SAAJ0012.p2p.get.failed=SAAJ0012 : \u00E9chec de la m\u00E9thode get
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013 : HttpSOAPConnection : {0}
-SAAJ0014.p2p.content.zero=SAAJ0014 : message de r\u00E9ponse non valide. La longueur du contenu de la r\u00E9ponse \u00E9tait de z\u00E9ro.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050 : h\u00F4te proxy : {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051 : port proxy : {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052 : protocole non pris en charge dans l'URL, il doit s'agir de http ou https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053 : fournisseurs {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054 : d\u00E9finition des fournisseurs {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055 : SSL_PROVIDER {0} ajout\u00E9
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090 : URLEndpoint est disponible uniquement lorsque JAXM est pr\u00E9sent
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091 : autorisation HTTPS dans POST d\u00E9finie sur True
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties
deleted file mode 100644
index a0139b1f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Impossibile creare il message factory
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Connessione gi\u00E0 chiusa (dal metodo close)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Connessione gi\u00E0 chiusa (dal metodo call)
-SAAJ0004.p2p.internal.err=SAAJ0004: Errore interno
-SAAJ0005.p2p.=SAAJ0005: URL non valido (istanza endPoint di javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL non valido (istanza endPoint di String)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Tipo endPoint non valido (istanza endPoint dell'URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: Risposta non valida; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: Invio del messaggio non riuscito
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Impossibile leggere la risposta
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Connessione gi\u00E0 chiusa (dal metodo get)
-SAAJ0012.p2p.get.failed=SAAJ0012: Metodo get non riuscito
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: Messaggio di risposta non valido. La lunghezza del contenuto della risposta era pari a zero.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: Host proxy: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: Porta proxy: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protocollo non supportato nell'URL, deve essere http o https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: Provider {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: Impostazione dei provider {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} aggiunto
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: L'endpoint dell'URL \u00E8 disponibile solo quando \u00E8 presente JAXM
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: Autorizzazione HTTPS in POST impostata su true
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties
deleted file mode 100644
index 6a9a5bc5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D5\u30A1\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: (close\u30E1\u30BD\u30C3\u30C9\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: (call\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0004.p2p.internal.err=SAAJ0004: \u5185\u90E8\u30A8\u30E9\u30FC
-SAAJ0005.p2p.=SAAJ0005: \u7121\u52B9\u306AURL (javax.xml.messaging.URLEndpoint\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: \u7121\u52B9\u306AURL (\u6587\u5B57\u5217\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \u7121\u52B9\u306AendPoint\u30BF\u30A4\u30D7(URL\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9)
-SAAJ0008.p2p.bad.response=SAAJ0008: \u4E0D\u6B63\u306A\u30EC\u30B9\u30DD\u30F3\u30B9; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u30E1\u30C3\u30BB\u30FC\u30B8\u9001\u4FE1\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: (get\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0012.p2p.get.failed=SAAJ0012: \u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: \u5FDC\u7B54\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u7121\u52B9\u3067\u3059\u3002\u5FDC\u7B54\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u9577\u304C\u30BC\u30ED\u3067\u3057\u305F\u3002
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: \u30D7\u30ED\u30AD\u30B7\u30FB\u30DB\u30B9\u30C8: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: \u30D7\u30ED\u30AD\u30B7\u30FB\u30DD\u30FC\u30C8: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30D7\u30ED\u30C8\u30B3\u30EB\u3067\u3059\u3002http\u307E\u305F\u306Fhttps\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: \u30D7\u30ED\u30D0\u30A4\u30C0{0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: \u30D7\u30ED\u30D0\u30A4\u30C0{0}\u3092\u8A2D\u5B9A\u3057\u3066\u3044\u307E\u3059
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0}\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint\u3092\u4F7F\u7528\u3067\u304D\u308B\u306E\u306FJAXM\u304C\u5B58\u5728\u3059\u308B\u5834\u5408\u306E\u307F\u3067\u3059
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST\u306EHTTPS\u8A8D\u8A3C\u304Ctrue\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties
deleted file mode 100644
index b0de116b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \uBA54\uC2DC\uC9C0 \uD329\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: close \uBA54\uC18C\uB4DC\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \uD638\uCD9C\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0004.p2p.internal.err=SAAJ0004: \uB0B4\uBD80 \uC624\uB958
-SAAJ0005.p2p.=SAAJ0005: URL(javax.xml.messaging.URLEndpoint\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL(\uBB38\uC790\uC5F4\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \uB05D\uC810 \uC720\uD615(URL\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0008.p2p.bad.response=SAAJ0008: \uC798\uBABB\uB41C \uC751\uB2F5: {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: \uBA54\uC2DC\uC9C0 \uC804\uC1A1\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \uC751\uB2F5\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \uAC00\uC838\uC624\uAE30\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0012.p2p.get.failed=SAAJ0012: \uAC00\uC838\uC624\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: \uD68C\uC2E0 \uBA54\uC2DC\uC9C0\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uD68C\uC2E0\uC758 \uCF58\uD150\uCE20 \uAE38\uC774\uAC00 0\uC785\uB2C8\uB2E4.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: \uD504\uB85D\uC2DC \uD638\uC2A4\uD2B8: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: \uD504\uB85D\uC2DC \uD3EC\uD2B8: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL\uC5D0\uC11C \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uD504\uB85C\uD1A0\uCF5C\uC785\uB2C8\uB2E4. http \uB610\uB294 https\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: {0} \uC81C\uACF5\uC790
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: {0} \uC81C\uACF5\uC790\uB97C \uC124\uC815\uD558\uB294 \uC911
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0}\uC744(\uB97C) \uCD94\uAC00\uD588\uC2B5\uB2C8\uB2E4.
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: JAXM\uC774 \uC788\uB294 \uACBD\uC6B0\uC5D0\uB9CC URLEndpoint\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST\uC758 HTTPS \uAD8C\uD55C \uBD80\uC5EC\uAC00 true\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties
deleted file mode 100644
index df1a00c0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: n\u00E3o \u00E9 poss\u00EDvel criar a factory da mensagem
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: a conex\u00E3o j\u00E1 foi fechada (do m\u00E9todo de fechamento)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: conex\u00E3o j\u00E1 fechada (da chamada)
-SAAJ0004.p2p.internal.err=SAAJ0004: erro interno
-SAAJ0005.p2p.=SAAJ0005: URL incorreto (a inst\u00E2ncia do endPoint de javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL incorreto (inst\u00E2ncia de endPoint da String)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: tipo de endPoint incorreto (inst\u00E2ncia de endPoint do URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: Resposta Incorreta; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: falha no envio da mensagem
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: n\u00E3o \u00E9 poss\u00EDvel ler a resposta
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: conex\u00E3o j\u00E1 fechada (de get)
-SAAJ0012.p2p.get.failed=SAAJ0012: falha de get
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: mensagem de resposta inv\u00E1lida. O tamanho do conte\u00FAdo da resposta era zero.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: host proxy: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: porta proxy: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: protocolo n\u00E3o suportado no URL, deve ser http ou https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: provedores {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: definindo provedores {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} adicionado
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint est\u00E1 dispon\u00EDvel s\u00F3 quando JAXM est\u00E1 presente
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: autoriza\u00E7\u00E3o de HTTPS no POST definida como verdadeira
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties
deleted file mode 100644
index 44e5de59..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u65E0\u6CD5\u521B\u5EFA\u6D88\u606F\u5DE5\u5382
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE close \u65B9\u6CD5)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE\u8C03\u7528)
-SAAJ0004.p2p.internal.err=SAAJ0004: \u5185\u90E8\u9519\u8BEF
-SAAJ0005.p2p.=SAAJ0005: URL \u9519\u8BEF (javax.xml.messaging.URLEndpoint \u7684 endPoint \u5B9E\u4F8B)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL \u9519\u8BEF (\u5B57\u7B26\u4E32\u7684 endPoint \u5B9E\u4F8B)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: endPoint \u7C7B\u578B\u9519\u8BEF (URL \u7684 endPoint \u5B9E\u4F8B)
-SAAJ0008.p2p.bad.response=SAAJ0008: \u54CD\u5E94\u9519\u8BEF; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u672A\u80FD\u53D1\u9001\u6D88\u606F
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u65E0\u6CD5\u8BFB\u53D6\u54CD\u5E94
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE get \u65B9\u6CD5)
-SAAJ0012.p2p.get.failed=SAAJ0012: Get \u5931\u8D25
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: \u56DE\u590D\u6D88\u606F\u65E0\u6548\u3002\u56DE\u590D\u7684\u5185\u5BB9\u957F\u5EA6\u4E3A\u96F6\u3002
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: \u4EE3\u7406\u4E3B\u673A: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: \u4EE3\u7406\u7AEF\u53E3: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL \u4E2D\u4E0D\u652F\u6301\u534F\u8BAE, \u5FC5\u987B\u662F http \u6216 https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: \u63D0\u4F9B\u65B9{0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: \u8BBE\u7F6E\u63D0\u4F9B\u65B9{0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: \u5DF2\u6DFB\u52A0 SSL_PROVIDER {0}
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: \u53EA\u6709\u5728\u4F7F\u7528 JAXM \u65F6, URLEndpoint \u624D\u53EF\u7528
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST \u4E2D\u7684 HTTPS \u6388\u6743\u8BBE\u7F6E\u4E3A\u201C\u771F\u201D
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties
deleted file mode 100644
index 694e9f04..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u7121\u6CD5\u5EFA\u7ACB\u8A0A\u606F\u8655\u7406\u7AD9
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u95DC\u9589\u65B9\u6CD5)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u547C\u53EB)
-SAAJ0004.p2p.internal.err=SAAJ0004: \u5167\u90E8\u932F\u8AA4
-SAAJ0005.p2p.=SAAJ0005: \u932F\u8AA4\u7684 URL (javax.xml.messaging.URLEndpoint \u7684 endPoint \u57F7\u884C\u8655\u7406)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: \u932F\u8AA4\u7684 URL (\u5B57\u4E32\u7684 endPoint \u57F7\u884C\u8655\u7406)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \u932F\u8AA4\u7684 endPoint \u985E\u578B (URL \u7684 endPoint \u57F7\u884C\u8655\u7406)
-SAAJ0008.p2p.bad.response=SAAJ0008: \u932F\u8AA4\u7684\u56DE\u61C9; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u8A0A\u606F\u50B3\u9001\u5931\u6557
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u7121\u6CD5\u8B80\u53D6\u56DE\u61C9
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u53D6\u5F97)
-SAAJ0012.p2p.get.failed=SAAJ0012: \u53D6\u5F97\u5931\u6557
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: \u7121\u6548\u7684\u56DE\u8986\u8A0A\u606F. \u56DE\u8986\u7684\u5167\u5BB9\u9577\u5EA6\u70BA\u96F6.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: \u4EE3\u7406\u4E3B\u6A5F: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: \u4EE3\u7406\u4E3B\u6A5F\u9023\u63A5\u57E0: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: \u4E0D\u652F\u63F4 URL \u4E2D\u7684\u5354\u5B9A, \u5FC5\u9808\u662F http \u6216 https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: \u63D0\u4F9B\u8005 {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: \u8A2D\u5B9A\u63D0\u4F9B\u8005 {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: \u5DF2\u65B0\u589E SSL_PROVIDER {0}
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: \u53EA\u6709\u5728\u6709 JAXM \u6642\u624D\u80FD\u4F7F\u7528 URLEndpoint
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST \u4E2D\u7684 HTTPS \u6388\u6B0A\u8A2D\u70BA true
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java
deleted file mode 100644
index 71d76ebd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)Header.java 1.3 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime;
-
-
-/**
- * The Header class stores a name/value pair to represent headers.
- *
- * @author John Mani
- */
-
-public interface Header {
-
- /**
- * Returns the name of this header.
- *
- * @return name of the header
- */
- String getName();
-
- /**
- * Returns the value of this header.
- *
- * @return value of the header
- */
- String getValue();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java
deleted file mode 100644
index 2e363429..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MessagingException.java 1.10 02/06/13
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime;
-
-
-/**
- * The base class for all exceptions thrown by the Messaging classes
- *
- * @author John Mani
- * @author Bill Shannon
- */
-
-public class MessagingException extends Exception {
-
- /**
- * The next exception in the chain.
- *
- * @serial
- */
- private Exception next;
-
- /**
- * Constructs a MessagingException with no detail message.
- */
- public MessagingException() {
- super();
- }
-
- /**
- * Constructs a MessagingException with the specified detail message.
- * @param s the detail message
- */
- public MessagingException(String s) {
- super(s);
- }
-
- /**
- * Constructs a MessagingException with the specified
- * Exception and detail message. The specified exception is chained
- * to this exception.
- * @param s the detail message
- * @param e the embedded exception
- * @see #getNextException
- * @see #setNextException
- */
- public MessagingException(String s, Exception e) {
- super(s);
- next = e;
- }
-
- /**
- * Get the next exception chained to this one. If the
- * next exception is a MessagingException, the chain
- * may extend further.
- *
- * @return next Exception, null if none.
- */
- public Exception getNextException() {
- return next;
- }
-
- /**
- * Add an exception to the end of the chain. If the end
- * is <strong>not</strong> a MessagingException, this
- * exception cannot be added to the end.
- *
- * @param ex the new end of the Exception chain
- * @return <code>true</code> if the this Exception
- * was added, <code>false</code> otherwise.
- */
- public synchronized boolean setNextException(Exception ex) {
- Exception theEnd = this;
- while (theEnd instanceof MessagingException &&
- ((MessagingException)theEnd).next != null) {
- theEnd = ((MessagingException)theEnd).next;
- }
- // If the end is a MessagingException, we can add this
- // exception to the chain.
- if (theEnd instanceof MessagingException) {
- ((MessagingException)theEnd).next = ex;
- return true;
- } else
- return false;
- }
-
- /**
- * Produce the message, include the message from the nested
- * exception if there is one.
- */
- public String getMessage() {
- if (next == null)
- return super.getMessage();
- Exception n = next;
- String s = super.getMessage();
- StringBuffer sb = new StringBuffer(s == null ? "" : s);
- while (n != null) {
- sb.append(";\n nested exception is:\n\t");
- if (n instanceof MessagingException) {
- MessagingException mex = (MessagingException)n;
- sb.append(n.getClass().toString());
- String msg = mex.getSuperMessage();
- if (msg != null) {
- sb.append(": ");
- sb.append(msg);
- }
- n = mex.next;
- } else {
- sb.append(n.toString());
- n = null;
- }
- }
- return sb.toString();
- }
-
- private String getSuperMessage() {
- return super.getMessage();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java
deleted file mode 100644
index c830ed99..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MultipartDataSource.java 1.6 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeBodyPart;
-
-import javax.activation.DataSource;
-
-/**
- * MultipartDataSource is a <code>DataSource</code> that contains body
- * parts. This allows "mail aware" <code>DataContentHandlers</code> to
- * be implemented more efficiently by being aware of such
- * <code>DataSources</code> and using the appropriate methods to access
- * <code>BodyParts</code>. <p>
- *
- * Note that the data of a MultipartDataSource is also available as
- * an input stream. <p>
- *
- * This interface will typically be implemented by providers that
- * preparse multipart bodies, for example an IMAP provider.
- *
- * @version 1.6, 02/03/27
- * @author John Mani
- * @see javax.activation.DataSource
- */
-
-public interface MultipartDataSource extends DataSource {
-
- /**
- * Return the number of enclosed MimeBodyPart objects.
- *
- * @return number of parts
- */
- public int getCount();
-
- /**
- * Get the specified MimeBodyPart. Parts are numbered starting at 0.
- *
- * @param index the index of the desired MimeBodyPart
- * @return the MimeBodyPart
- * @exception IndexOutOfBoundsException if the given index
- * is out of range.
- * @exception MessagingException
- */
- public MimeBodyPart getBodyPart(int index) throws MessagingException;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java
deleted file mode 100644
index 208583bb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java
+++ /dev/null
@@ -1,762 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MimeMultipart.java 1.31 03/01/29
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.io.*;
-import java.util.BitSet;
-
-import javax.activation.DataSource;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.*;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*;
-
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
-import com.sun.xml.internal.messaging.saaj.util.FinalArrayList;
-
-/**
- * The MimeMultipart class is an implementation of the abstract Multipart
- * class that uses MIME conventions for the multipart data. <p>
- *
- * A MimeMultipart is obtained from a MimePart whose primary type
- * is "multipart" (by invoking the part's <code>getContent()</code> method)
- * or it can be created by a client as part of creating a new MimeMessage. <p>
- *
- * The default multipart subtype is "mixed". The other multipart
- * subtypes, such as "alternative", "related", and so on, can be
- * implemented as subclasses of MimeMultipart with additional methods
- * to implement the additional semantics of that type of multipart
- * content. The intent is that service providers, mail JavaBean writers
- * and mail clients will write many such subclasses and their Command
- * Beans, and will install them into the JavaBeans Activation
- * Framework, so that any JavaMail implementation and its clients can
- * transparently find and use these classes. Thus, a MIME multipart
- * handler is treated just like any other type handler, thereby
- * decoupling the process of providing multipart handlers from the
- * JavaMail API. Lacking these additional MimeMultipart subclasses,
- * all subtypes of MIME multipart data appear as MimeMultipart objects. <p>
- *
- * An application can directly construct a MIME multipart object of any
- * subtype by using the <code>MimeMultipart(String subtype)</code>
- * constructor. For example, to create a "multipart/alternative" object,
- * use <code>new MimeMultipart("alternative")</code>.
- *
- */
-
-//TODO: cleanup the SharedInputStream handling
-public class BMMimeMultipart extends MimeMultipart {
-
- /*
- * When true it indicates parsing hasnt been done at all
- */
- private boolean begining = true;
-
- int[] bcs = new int[256];
- int[] gss = null;
- private static final int BUFFER_SIZE = 4096;
- private byte[] buffer = new byte[BUFFER_SIZE];
- private byte[] prevBuffer = new byte[BUFFER_SIZE];
- private BitSet lastPartFound = new BitSet(1);
-
- // cached inputstream which is possibly partially consumed
- private InputStream in = null;
- private String boundary = null;
- // current stream position, set to -1 on EOF
- int b = 0;
-
- // property to indicate if lazyAttachments is ON
- private boolean lazyAttachments = false;
-
- /**
- * Default constructor. An empty MimeMultipart object
- * is created. Its content type is set to "multipart/mixed".
- * A unique boundary string is generated and this string is
- * setup as the "boundary" parameter for the
- * <code>contentType</code> field. <p>
- *
- * MimeBodyParts may be added later.
- */
- public BMMimeMultipart() {
- super();
- //this("mixed");
- }
-
- /**
- * Construct a MimeMultipart object of the given subtype.
- * A unique boundary string is generated and this string is
- * setup as the "boundary" parameter for the
- * <code>contentType</code> field. <p>
- *
- * MimeBodyParts may be added later.
- */
- public BMMimeMultipart(String subtype) {
- super(subtype);
- /*
- * Compute a boundary string.
- String boundary = UniqueValue.getUniqueBoundaryValue();
- ContentType cType = new ContentType("multipart", subtype, null);
- contentType.setParameter("boundary", boundary);
- */
- }
-
- /**
- * Constructs a MimeMultipart object and its bodyparts from the
- * given DataSource. <p>
- *
- * This constructor handles as a special case the situation where the
- * given DataSource is a MultipartDataSource object. In this case, this
- * method just invokes the superclass (i.e., Multipart) constructor
- * that takes a MultipartDataSource object. <p>
- *
- * Otherwise, the DataSource is assumed to provide a MIME multipart
- * byte stream. The <code>parsed</code> flag is set to false. When
- * the data for the body parts are needed, the parser extracts the
- * "boundary" parameter from the content type of this DataSource,
- * skips the 'preamble' and reads bytes till the terminating
- * boundary and creates MimeBodyParts for each part of the stream.
- *
- * @param ds DataSource, can be a MultipartDataSource
- */
- public BMMimeMultipart(DataSource ds, ContentType ct)
- throws MessagingException {
- super(ds,ct);
- boundary = ct.getParameter("boundary");
- /*
- if (ds instanceof MultipartDataSource) {
- // ask super to do this for us.
- setMultipartDataSource((MultipartDataSource)ds);
- return;
- }
-
- // 'ds' was not a MultipartDataSource, we have
- // to parse this ourself.
- parsed = false;
- this.ds = ds;
- if (ct==null)
- contentType = new ContentType(ds.getContentType());
- else
- contentType = ct;
- */
-
- }
-
- public InputStream initStream() throws MessagingException {
-
- if (in == null) {
- try {
- in = ds.getInputStream();
- if (!(in instanceof ByteArrayInputStream) &&
- !(in instanceof BufferedInputStream) &&
- !(in instanceof SharedInputStream))
- in = new BufferedInputStream(in);
- } catch (Exception ex) {
- throw new MessagingException("No inputstream from datasource");
- }
-
- if (!in.markSupported()) {
- throw new MessagingException(
- "InputStream does not support Marking");
- }
- }
- return in;
- }
-
- /**
- * Parse the InputStream from our DataSource, constructing the
- * appropriate MimeBodyParts. The <code>parsed</code> flag is
- * set to true, and if true on entry nothing is done. This
- * method is called by all other methods that need data for
- * the body parts, to make sure the data has been parsed.
- *
- * @since JavaMail 1.2
- */
- protected void parse() throws MessagingException {
- if (parsed)
- return;
-
- initStream();
-
- SharedInputStream sin = null;
- if (in instanceof SharedInputStream) {
- sin = (SharedInputStream)in;
- }
-
- String bnd = "--" + boundary;
- byte[] bndbytes = ASCIIUtility.getBytes(bnd);
- try {
- parse(in, bndbytes, sin);
- } catch (IOException ioex) {
- throw new MessagingException("IO Error", ioex);
- } catch (Exception ex) {
- throw new MessagingException("Error", ex);
- }
-
- parsed = true;
- }
-
- public boolean lastBodyPartFound() {
- return lastPartFound.get(0);
- }
-
- public MimeBodyPart getNextPart(
- InputStream stream, byte[] pattern, SharedInputStream sin)
- throws Exception {
-
- if (!stream.markSupported()) {
- throw new Exception("InputStream does not support Marking");
- }
-
- if (begining) {
- compile(pattern);
- if (!skipPreamble(stream, pattern, sin)) {
- throw new Exception(
- "Missing Start Boundary, or boundary does not start on a new line");
- }
- begining = false;
- }
-
- if (lastBodyPartFound()) {
- throw new Exception("No parts found in Multipart InputStream");
- }
-
- if (sin != null) {
- long start = sin.getPosition();
- b = readHeaders(stream);
- if (b == -1) {
- throw new Exception(
- "End of Stream encountered while reading part headers");
- }
- long[] v = new long[1];
- v[0] = -1; // just to ensure the code later sets it correctly
- b = readBody(stream, pattern, v, null, sin);
- // looks like this check has to be disabled
- // it is allowed to have Mime Package without closing boundary
- if (!ignoreMissingEndBoundary) {
- if ((b == -1) && !lastBodyPartFound()) {
- throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
- }
- }
- long end = v[0];
- MimeBodyPart mbp = createMimeBodyPart(sin.newStream(start, end));
- addBodyPart(mbp);
- return mbp;
-
- } else {
- InternetHeaders headers = createInternetHeaders(stream);
- ByteOutputStream baos = new ByteOutputStream();
- b = readBody(stream, pattern, null,baos, null);
- // looks like this check has to be disabled
- // in the old impl it is allowed to have Mime Package
- // without closing boundary
- if (!ignoreMissingEndBoundary) {
- if ((b == -1) && !lastBodyPartFound()) {
- throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
- }
- }
- MimeBodyPart mbp = createMimeBodyPart(
- headers, baos.getBytes(), baos.getCount());
- addBodyPart(mbp);
- return mbp;
- }
-
- }
-
- public boolean parse(
- InputStream stream, byte[] pattern, SharedInputStream sin)
- throws Exception {
-
- while (!lastPartFound.get(0) && (b != -1)) {
- getNextPart(stream, pattern, sin);
- }
- return true;
- }
-
- private int readHeaders(InputStream is) throws Exception {
- // if the headers are to end properly then there has to be CRLF
- // actually we just need to mark the start and end positions
- int b = is.read();
- while(b != -1) {
- // when it is a shared input stream no need to copy
- if (b == '\r') {
- b = is.read();
- if (b == '\n') {
- b = is.read();
- if (b == '\r') {
- b = is.read();
- if (b == '\n') {
- return b;
- } else {
- continue;
- }
- } else {
- continue;
- }
- } else {
- continue;
- }
- }
- b = is.read();
- }
- if (b == -1) {
- throw new Exception(
- "End of inputstream while reading Mime-Part Headers");
- }
- return b;
- }
-
- private int readBody(
- InputStream is, byte[] pattern, long[] posVector,
- ByteOutputStream baos, SharedInputStream sin)
- throws Exception {
- if (!find(is, pattern, posVector, baos, sin)) {
- throw new Exception(
- "Missing boundary delimitier while reading Body Part");
- }
- return b;
- }
-
- private boolean skipPreamble(
- InputStream is, byte[] pattern, SharedInputStream sin)
- throws Exception {
- if (!find(is, pattern, sin)) {
- return false;
- }
- if (lastPartFound.get(0)) {
- throw new Exception(
- "Found closing boundary delimiter while trying to skip preamble");
- }
- return true;
- }
-
-
- public int readNext(InputStream is, byte[] buff, int patternLength,
- BitSet eof, long[] posVector, SharedInputStream sin)
- throws Exception {
-
- int bufferLength = is.read(buffer, 0, patternLength);
- if (bufferLength == -1) {
- eof.flip(0);
- } else if (bufferLength < patternLength) {
- //repeatedly read patternLength - bufferLength
- int temp = 0;
- long pos = 0;
- int i = bufferLength;
- for (; i < patternLength; i++) {
- if (sin != null) {
- pos = sin.getPosition();
- }
- temp = is.read();
- if (temp == -1) {
- eof.flip(0);
- if (sin != null) {
- posVector[0] = pos;
- }
- break;
- }
- buffer[i] = (byte)temp;
- }
- bufferLength=i;
- }
- return bufferLength;
- }
-
- public boolean find(InputStream is, byte[] pattern, SharedInputStream sin)
- throws Exception {
- int i;
- int l = pattern.length;
- int lx = l -1;
- int bufferLength = 0;
- BitSet eof = new BitSet(1);
- long[] posVector = new long[1];
-
- while (true) {
- is.mark(l);
- bufferLength = readNext(is, buffer, l, eof, posVector, sin);
- if (eof.get(0)) {
- // End of stream
- return false;
- }
-
- /*
- if (bufferLength < l) {
- //is.reset();
- return false;
- }*/
-
- for(i = lx; i >= 0; i--) {
- if (buffer[i] != pattern[i]) {
- break;
- }
- }
-
- if (i < 0) {
- // found the boundary, skip *LWSP-char and CRLF
- if (!skipLWSPAndCRLF(is)) {
- throw new Exception("Boundary does not terminate with CRLF");
- }
- return true;
- }
-
- int s = Math.max(i + 1 - bcs[buffer[i] & 0x7f], gss[i]);
- is.reset();
- is.skip(s);
- }
- }
-
- public boolean find(
- InputStream is, byte[] pattern, long[] posVector,
- ByteOutputStream out, SharedInputStream sin) throws Exception {
- int i;
- int l = pattern.length;
- int lx = l -1;
- int bufferLength = 0;
- int s = 0;
- long endPos = -1;
- byte[] tmp = null;
-
- boolean first = true;
- BitSet eof = new BitSet(1);
-
- while (true) {
- is.mark(l);
- if (!first) {
- tmp = prevBuffer;
- prevBuffer = buffer;
- buffer = tmp;
- }
- if (sin != null) {
- endPos = sin.getPosition();
- }
-
- bufferLength = readNext(is, buffer, l, eof, posVector, sin);
-
- if (bufferLength == -1) {
- // End of stream
- // looks like it is allowed to not have a closing boundary
- //return false;
- //if (sin != null) {
- // posVector[0] = endPos;
- //}
- b = -1;
- if ((s == l) && (sin == null)) {
- out.write(prevBuffer, 0, s);
- }
- return true;
- }
-
- if (bufferLength < l) {
- if (sin != null) {
- //endPos = sin.getPosition();
- //posVector[0] = endPos;
- } else {
- // looks like it is allowed to not have a closing boundary
- // in the old implementation
- out.write(buffer, 0, bufferLength);
- }
- // looks like it is allowed to not have a closing boundary
- // in the old implementation
- //return false;
- b = -1;
- return true;
- }
-
- for(i = lx; i >= 0; i--) {
- if (buffer[i] != pattern[i]) {
- break;
- }
- }
-
- if (i < 0) {
- if (s > 0) {
- //looks like the earlier impl allowed just an LF
- // so if s == 1 : it must be an LF
- // if s == 2 : it must be a CR LF
- if (s <= 2) {
- //it could be "some-char\n" so write some-char
- if (s == 2) {
- if (prevBuffer[1] == '\n') {
- if (prevBuffer[0] != '\r' && prevBuffer[0] != '\n') {
- out.write(prevBuffer,0,1);
- }
- if (sin != null) {
- posVector[0] = endPos;
- }
-
- } else {
- throw new Exception(
- "Boundary characters encountered in part Body " +
- "without a preceeding CRLF");
- }
-
- } else if (s==1) {
- if (prevBuffer[0] != '\n') {
- throw new Exception(
- "Boundary characters encountered in part Body " +
- "without a preceeding CRLF");
- }else {
- if (sin != null) {
- posVector[0] = endPos;
- }
- }
- }
-
- } else if (s > 2) {
- if ((prevBuffer[s-2] == '\r') && (prevBuffer[s-1] == '\n')) {
- if (sin != null) {
- posVector[0] = endPos - 2;
- } else {
- out.write(prevBuffer, 0, s - 2);
- }
- } else if (prevBuffer[s-1] == '\n') {
- //old impl allowed just a \n
- if (sin != null) {
- posVector[0] = endPos - 1;
- } else {
- out.write(prevBuffer, 0, s - 1);
- }
- } else {
- throw new Exception(
- "Boundary characters encountered in part Body " +
- "without a preceeding CRLF");
- }
- }
- }
- // found the boundary, skip *LWSP-char and CRLF
- if (!skipLWSPAndCRLF(is)) {
- //throw new Exception(
- // "Boundary does not terminate with CRLF");
- }
- return true;
- }
-
- if ((s > 0) && (sin == null)) {
- if (prevBuffer[s-1] == (byte)13) {
- // if buffer[0] == (byte)10
- if (buffer[0] == (byte)10) {
- int j=lx-1;
- for(j = lx-1; j > 0; j--) {
- if (buffer[j+1] != pattern[j]) {
- break;
- }
- }
- if (j == 0) {
- // matched the pattern excluding the last char of the pattern
- // so dont write the CR into stream
- out.write(prevBuffer,0,s-1);
- } else {
- out.write(prevBuffer,0,s);
- }
- } else {
- out.write(prevBuffer, 0, s);
- }
- } else {
- out.write(prevBuffer, 0, s);
- }
- }
-
- s = Math.max(i + 1 - bcs[buffer[i] & 0x7f], gss[i]);
- is.reset();
- is.skip(s);
- if (first) {
- first = false;
- }
- }
- }
-
- private boolean skipLWSPAndCRLF(InputStream is) throws Exception {
-
- b = is.read();
- //looks like old impl allowed just a \n as well
- if (b == '\n') {
- return true;
- }
-
- if (b == '\r') {
- b = is.read();
- //skip any multiple '\r' "\r\n" --> "\r\r\n" on Win2k
- if (b == '\r') {
- b = is.read();
- }
- if (b == '\n') {
- return true;
- } else {
- throw new Exception(
- "transport padding after a Mime Boundary should end in a CRLF, found CR only");
- }
- }
-
- if (b == '-') {
- b = is.read();
- if (b != '-') {
- throw new Exception(
- "Unexpected singular '-' character after Mime Boundary");
- } else {
- //System.out.println("Last Part Found");
- lastPartFound.flip(0);
- // read the next char
- b = is.read();
- }
- }
-
- while ((b != -1) && ((b == ' ') || (b == '\t'))) {
- b = is.read();
- if (b == '\n') {
- return true;
- }
- if (b == '\r') {
- b = is.read();
- //skip any multiple '\r': "\r\n" --> "\r\r\n" on Win2k
- if (b == '\r') {
- b = is.read();
- }
- if (b == '\n') {
- return true;
- }
- }
- }
-
- if (b == -1) {
- // the last boundary need not have CRLF
- if (!lastPartFound.get(0)) {
- throw new Exception(
- "End of Multipart Stream before encountering closing boundary delimiter");
- }
- return true;
- }
- return false;
- }
-
- private void compile(byte[] pattern) {
- int l = pattern.length;
-
- int i;
- int j;
-
- // Copied from J2SE 1.4 regex code
- // java.util.regex.Pattern.java
-
- // Initialise Bad Character Shift table
- for (i = 0; i < l; i++) {
- bcs[pattern[i]] = i + 1;
- }
-
- // Initialise Good Suffix Shift table
- gss = new int[l];
- NEXT: for (i = l; i > 0; i--) {
- // j is the beginning index of suffix being considered
- for (j = l - 1; j >= i; j--) {
- // Testing for good suffix
- if (pattern[j] == pattern[j - i]) {
- // pattern[j..len] is a good suffix
- gss[j - 1] = i;
- } else {
- // No match. The array has already been
- // filled up with correct values before.
- continue NEXT;
- }
- }
- while (j > 0) {
- gss[--j] = i;
- }
- }
- gss[l - 1] = 1;
- }
-
-
- /**
- * Iterates through all the parts and outputs each Mime part
- * separated by a boundary.
- */
- byte[] buf = new byte[1024];
-
- public void writeTo(OutputStream os)
- throws IOException, MessagingException {
-
- // inputStream was not null
- if (in != null) {
- contentType.setParameter("boundary", this.boundary);
- }
-
- String bnd = "--" + contentType.getParameter("boundary");
- for (int i = 0; i < parts.size(); i++) {
- OutputUtil.writeln(bnd, os); // put out boundary
- ((MimeBodyPart)parts.get(i)).writeTo(os);
- OutputUtil.writeln(os); // put out empty line
- }
-
- if (in != null) {
- OutputUtil.writeln(bnd, os); // put out boundary
- if ((os instanceof ByteOutputStream) && lazyAttachments) {
- ((ByteOutputStream)os).write(in);
- } else {
- ByteOutputStream baos = new ByteOutputStream(in.available());
- baos.write(in);
- baos.writeTo(os);
- // reset the inputstream so that we can support a
- //getAttachment later
- in = baos.newInputStream();
- }
-
- // this will endup writing the end boundary
- } else {
- // put out last boundary
- OutputUtil.writeAsAscii(bnd, os);
- OutputUtil.writeAsAscii("--", os);
- }
- }
-
- public void setInputStream(InputStream is) {
- this.in = is;
- }
-
- public InputStream getInputStream() {
- return this.in;
- }
-
- public void setBoundary(String bnd) {
- this.boundary = bnd;
- if (this.contentType != null) {
- this.contentType.setParameter("boundary", bnd);
- }
- }
- public String getBoundary() {
- return this.boundary;
- }
-
- public boolean isEndOfStream() {
- return (b == -1);
- }
-
- public void setLazyAttachments(boolean flag) {
- lazyAttachments = flag;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java
deleted file mode 100644
index b9f04994..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)ContentDisposition.java 1.6 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-
-/**
- * This class represents a MIME ContentDisposition value. It provides
- * methods to parse a ContentDisposition string into individual components
- * and to generate a MIME style ContentDisposition string.
- *
- * @version 1.6, 02/03/27
- * @author John Mani
- */
-
-public class ContentDisposition {
-
- private String disposition; // disposition
- private ParameterList list; // parameter list
-
- /**
- * No-arg Constructor.
- */
- public ContentDisposition() { }
-
- /**
- * Constructor.
- *
- * @param disposition disposition
- * @param list ParameterList
- * @since JavaMail 1.2
- */
- public ContentDisposition(String disposition, ParameterList list) {
- this.disposition = disposition;
- this.list = list;
- }
-
- /**
- * Constructor that takes a ContentDisposition string. The String
- * is parsed into its constituents: dispostion and parameters.
- * A ParseException is thrown if the parse fails.
- *
- * @param s the ContentDisposition string.
- * @exception ParseException if the parse fails.
- * @since JavaMail 1.2
- */
- public ContentDisposition(String s) throws ParseException {
- HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
- HeaderTokenizer.Token tk;
-
- // First "disposition" ..
- tk = h.next();
- if (tk.getType() != HeaderTokenizer.Token.ATOM)
- throw new ParseException();
- disposition = tk.getValue();
-
- // Then parameters ..
- String rem = h.getRemainder();
- if (rem != null)
- list = new ParameterList(rem);
- }
-
- /**
- * Return the disposition value.
- * @return the disposition
- * @since JavaMail 1.2
- */
- public String getDisposition() {
- return disposition;
- }
-
- /**
- * Return the specified parameter value. Returns <code>null</code>
- * if this parameter is absent.
- * @return parameter value
- * @since JavaMail 1.2
- */
- public String getParameter(String name) {
- if (list == null)
- return null;
-
- return list.get(name);
- }
-
- /**
- * Return a ParameterList object that holds all the available
- * parameters. Returns null if no parameters are available.
- *
- * @return ParameterList
- * @since JavaMail 1.2
- */
- public ParameterList getParameterList() {
- return list;
- }
-
- /**
- * Set the primary type. Overrides existing primary type.
- * @param primaryType primary type
- * @since JavaMail 1.2
- */
- public void setDisposition(String disposition) {
- this.disposition = disposition;
- }
-
- /**
- * Set the specified parameter. If this parameter already exists,
- * it is replaced by this new value.
- *
- * @param name parameter name
- * @param value parameter value
- * @since JavaMail 1.2
- */
- public void setParameter(String name, String value) {
- if (list == null)
- list = new ParameterList();
-
- list.set(name, value);
- }
-
- /**
- * Set a new ParameterList.
- * @param list ParameterList
- * @since JavaMail 1.2
- */
- public void setParameterList(ParameterList list) {
- this.list = list;
- }
-
- /**
- * Retrieve a RFC2045 style string representation of
- * this ContentDisposition. Returns <code>null</code> if
- * the conversion failed.
- *
- * @return RFC2045 style string
- * @since JavaMail 1.2
- */
- public String toString() {
- if (disposition == null)
- return null;
-
- if (list == null)
- return disposition;
-
- StringBuffer sb = new StringBuffer(disposition);
-
- // append the parameter list
- // use the length of the string buffer + the length of
- // the header name formatted as follows "Content-Disposition: "
- sb.append(list.toString(sb.length() + 21));
- return sb.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java
deleted file mode 100644
index b543475c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)ContentType.java 1.7 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-
-/**
- * This class represents a MIME ContentType value. It provides
- * methods to parse a ContentType string into individual components
- * and to generate a MIME style ContentType string.
- *
- * @version 1.7, 02/03/27
- * @author John Mani
- */
-public final class ContentType {
-
- private String primaryType; // primary type
- private String subType; // subtype
- private ParameterList list; // parameter list
-
- /**
- * No-arg Constructor.
- */
- public ContentType() { }
-
- /**
- * Constructor.
- *
- * @param primaryType primary type
- * @param subType subType
- * @param list ParameterList
- */
- public ContentType(String primaryType, String subType,
- ParameterList list) {
- this.primaryType = primaryType;
- this.subType = subType;
- if (list == null)
- list = new ParameterList();
- this.list = list;
- }
-
- /**
- * Constructor that takes a Content-Type string. The String
- * is parsed into its constituents: primaryType, subType
- * and parameters. A ParseException is thrown if the parse fails.
- *
- * @param s the Content-Type string.
- * @exception ParseException if the parse fails.
- */
- public ContentType(String s) throws ParseException {
- HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
- HeaderTokenizer.Token tk;
-
- // First "type" ..
- tk = h.next();
- if (tk.getType() != HeaderTokenizer.Token.ATOM)
- throw new ParseException();
- primaryType = tk.getValue();
-
- // The '/' separator ..
- tk = h.next();
- if ((char)tk.getType() != '/')
- throw new ParseException();
-
- // Then "subType" ..
- tk = h.next();
- if (tk.getType() != HeaderTokenizer.Token.ATOM)
- throw new ParseException();
- subType = tk.getValue();
-
- // Finally parameters ..
- String rem = h.getRemainder();
- if (rem != null)
- list = new ParameterList(rem);
- }
-
- public ContentType copy() {
- return new ContentType(primaryType,subType,list.copy());
- }
-
- /**
- * Return the primary type.
- * @return the primary type
- */
- public String getPrimaryType() {
- return primaryType;
- }
-
- /**
- * Return the subType.
- * @return the subType
- */
- public String getSubType() {
- return subType;
- }
-
- /**
- * Return the MIME type string, without the parameters.
- * The returned value is basically the concatenation of
- * the primaryType, the '/' character and the secondaryType.
- *
- * @return the type
- */
- public String getBaseType() {
- return primaryType + '/' + subType;
- }
-
- /**
- * Return the specified parameter value. Returns <code>null</code>
- * if this parameter is absent.
- * @return parameter value
- */
- public String getParameter(String name) {
- if (list == null)
- return null;
-
- return list.get(name);
- }
-
- /**
- * Return a ParameterList object that holds all the available
- * parameters. Returns null if no parameters are available.
- *
- * @return ParameterList
- */
- public ParameterList getParameterList() {
- return list;
- }
-
- /**
- * Set the primary type. Overrides existing primary type.
- * @param primaryType primary type
- */
- public void setPrimaryType(String primaryType) {
- this.primaryType = primaryType;
- }
-
- /**
- * Set the subType. Overrides existing subType
- * @param subType subType
- */
- public void setSubType(String subType) {
- this.subType = subType;
- }
-
- /**
- * Set the specified parameter. If this parameter already exists,
- * it is replaced by this new value.
- *
- * @param name parameter name
- * @param value parameter value
- */
- public void setParameter(String name, String value) {
- if (list == null)
- list = new ParameterList();
-
- list.set(name, value);
- }
-
- /**
- * Set a new ParameterList.
- * @param list ParameterList
- */
- public void setParameterList(ParameterList list) {
- this.list = list;
- }
-
- /**
- * Retrieve a RFC2045 style string representation of
- * this Content-Type. Returns <code>null</code> if
- * the conversion failed.
- *
- * @return RFC2045 style string
- */
- public String toString() {
- if (primaryType == null || subType == null) // need both
- return null;
-
- StringBuffer sb = new StringBuffer();
- sb.append(primaryType).append('/').append(subType);
- if (list != null)
- // Http Binding section of the "SOAP with attachments" specification says,
- // "SOAP message senders should send Content-Type headers on a single long line."
- // (http://www.w3.org/TR/SOAP-attachments#HTTPBinding)
- sb.append(list.toString());
-
- return sb.toString();
- }
-
- /**
- * Match with the specified ContentType object. This method
- * compares <strong>only the <code>primaryType</code> and
- * <code>subType</code> </strong>. The parameters of both operands
- * are ignored. <p>
- *
- * For example, this method will return <code>true</code> when
- * comparing the ContentTypes for <strong>"text/plain"</strong>
- * and <strong>"text/plain; charset=foobar"</strong>.
- *
- * If the <code>subType</code> of either operand is the special
- * character '*', then the subtype is ignored during the match.
- * For example, this method will return <code>true</code> when
- * comparing the ContentTypes for <strong>"text/plain"</strong>
- * and <strong>"text/*" </strong>
- *
- * @param cType to compare this against
- */
- public boolean match(ContentType cType) {
- // Match primaryType
- if (!primaryType.equalsIgnoreCase(cType.getPrimaryType()))
- return false;
-
- String sType = cType.getSubType();
-
- // If either one of the subTypes is wildcarded, return true
- if ((subType.charAt(0) == '*') || (sType.charAt(0) == '*'))
- return true;
-
- // Match subType
- if (!subType.equalsIgnoreCase(sType))
- return false;
-
- return true;
- }
-
- /**
- * Match with the specified content-type string. This method
- * compares <strong>only the <code>primaryType</code> and
- * <code>subType</code> </strong>.
- * The parameters of both operands are ignored. <p>
- *
- * For example, this method will return <code>true</code> when
- * comparing the ContentType for <strong>"text/plain"</strong>
- * with <strong>"text/plain; charset=foobar"</strong>.
- *
- * If the <code>subType</code> of either operand is the special
- * character '*', then the subtype is ignored during the match.
- * For example, this method will return <code>true</code> when
- * comparing the ContentType for <strong>"text/plain"</strong>
- * with <strong>"text/*" </strong>
- */
- public boolean match(String s) {
- try {
- return match(new ContentType(s));
- } catch (ParseException pex) {
- return false;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java
deleted file mode 100644
index af0510dc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)HeaderTokenizer.java 1.9 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-
-/**
- * This class tokenizes RFC822 and MIME headers into the basic
- * symbols specified by RFC822 and MIME. <p>
- *
- * This class handles folded headers (ie headers with embedded
- * CRLF SPACE sequences). The folds are removed in the returned
- * tokens.
- *
- * @version 1.9, 02/03/27
- * @author John Mani
- */
-
-public class HeaderTokenizer {
-
- /**
- * The Token class represents tokens returned by the
- * HeaderTokenizer.
- */
- public static class Token {
-
- private int type;
- private String value;
-
- /**
- * Token type indicating an ATOM.
- */
- public static final int ATOM = -1;
-
- /**
- * Token type indicating a quoted string. The value
- * field contains the string without the quotes.
- */
- public static final int QUOTEDSTRING = -2;
-
- /**
- * Token type indicating a comment. The value field
- * contains the comment string without the comment
- * start and end symbols.
- */
- public static final int COMMENT = -3;
-
- /**
- * Token type indicating end of input.
- */
- public static final int EOF = -4;
-
- /**
- * Constructor.
- * @param type Token type
- * @param value Token value
- */
- public Token(int type, String value) {
- this.type = type;
- this.value = value;
- }
-
- /**
- * Return the type of the token. If the token represents a
- * delimiter or a control character, the type is that character
- * itself, converted to an integer. Otherwise, it's value is
- * one of the following:
- * <ul>
- * <li><code>ATOM</code> A sequence of ASCII characters
- * delimited by either SPACE, CTL, "(", <"> or the
- * specified SPECIALS
- * <li><code>QUOTEDSTRING</code> A sequence of ASCII characters
- * within quotes
- * <li><code>COMMENT</code> A sequence of ASCII characters
- * within "(" and ")".
- * <li><code>EOF</code> End of header
- * </ul>
- */
- public int getType() {
- return type;
- }
-
- /**
- * Returns the value of the token just read. When the current
- * token is a quoted string, this field contains the body of the
- * string, without the quotes. When the current token is a comment,
- * this field contains the body of the comment.
- *
- * @return token value
- */
- public String getValue() {
- return value;
- }
- }
-
- private String string; // the string to be tokenized
- private boolean skipComments; // should comments be skipped ?
- private String delimiters; // delimiter string
- private int currentPos; // current parse position
- private int maxPos; // string length
- private int nextPos; // track start of next Token for next()
- private int peekPos; // track start of next Token for peek()
-
- /**
- * RFC822 specials
- */
- public final static String RFC822 = "()<>@,;:\\\"\t .[]";
-
- /**
- * MIME specials
- */
- public final static String MIME = "()<>@,;:\\\"\t []/?=";
-
- // The EOF Token
- private final static Token EOFToken = new Token(Token.EOF, null);
-
- /**
- * Constructor that takes a rfc822 style header.
- *
- * @param header The rfc822 header to be tokenized
- * @param delimiters Set of delimiter characters
- * to be used to delimit ATOMS. These
- * are usually <code>RFC822</code> or
- * <code>MIME</code>
- * @param skipComments If true, comments are skipped and
- * not returned as tokens
- */
- public HeaderTokenizer(String header, String delimiters,
- boolean skipComments) {
- string = (header == null) ? "" : header; // paranoia ?!
- this.skipComments = skipComments;
- this.delimiters = delimiters;
- currentPos = nextPos = peekPos = 0;
- maxPos = string.length();
- }
-
- /**
- * Constructor. Comments are ignored and not returned as tokens
- *
- * @param header The header that is tokenized
- * @param delimiters The delimiters to be used
- */
- public HeaderTokenizer(String header, String delimiters) {
- this(header, delimiters, true);
- }
-
- /**
- * Constructor. The RFC822 defined delimiters - RFC822 - are
- * used to delimit ATOMS. Also comments are skipped and not
- * returned as tokens
- */
- public HeaderTokenizer(String header) {
- this(header, RFC822);
- }
-
- /**
- * Parses the next token from this String. <p>
- *
- * Clients sit in a loop calling next() to parse successive
- * tokens until an EOF Token is returned.
- *
- * @return the next Token
- * @exception ParseException if the parse fails
- */
- public Token next() throws ParseException {
- Token tk;
-
- currentPos = nextPos; // setup currentPos
- tk = getNext();
- nextPos = peekPos = currentPos; // update currentPos and peekPos
- return tk;
- }
-
- /**
- * Peek at the next token, without actually removing the token
- * from the parse stream. Invoking this method multiple times
- * will return successive tokens, until <code>next()</code> is
- * called. <p>
- *
- * @return the next Token
- * @exception ParseException if the parse fails
- */
- public Token peek() throws ParseException {
- Token tk;
-
- currentPos = peekPos; // setup currentPos
- tk = getNext();
- peekPos = currentPos; // update peekPos
- return tk;
- }
-
- /**
- * Return the rest of the Header.
- *
- * @return String rest of header. null is returned if we are
- * already at end of header
- */
- public String getRemainder() {
- return string.substring(nextPos);
- }
-
- /*
- * Return the next token starting from 'currentPos'. After the
- * parse, 'currentPos' is updated to point to the start of the
- * next token.
- */
- private Token getNext() throws ParseException {
- // If we're already at end of string, return EOF
- if (currentPos >= maxPos)
- return EOFToken;
-
- // Skip white-space, position currentPos beyond the space
- if (skipWhiteSpace() == Token.EOF)
- return EOFToken;
-
- char c;
- int start;
- boolean filter = false;
-
- c = string.charAt(currentPos);
-
- // Check or Skip comments and position currentPos
- // beyond the comment
- while (c == '(') {
- // Parsing comment ..
- int nesting;
- for (start = ++currentPos, nesting = 1;
- nesting > 0 && currentPos < maxPos;
- currentPos++) {
- c = string.charAt(currentPos);
- if (c == '\\') { // Escape sequence
- currentPos++; // skip the escaped character
- filter = true;
- } else if (c == '\r')
- filter = true;
- else if (c == '(')
- nesting++;
- else if (c == ')')
- nesting--;
- }
- if (nesting != 0)
- throw new ParseException("Unbalanced comments");
-
- if (!skipComments) {
- // Return the comment, if we are asked to.
- // Note that the comment start & end markers are ignored.
- String s;
- if (filter) // need to go thru the token again.
- s = filterToken(string, start, currentPos-1);
- else
- s = string.substring(start,currentPos-1);
-
- return new Token(Token.COMMENT, s);
- }
-
- // Skip any whitespace after the comment.
- if (skipWhiteSpace() == Token.EOF)
- return EOFToken;
- c = string.charAt(currentPos);
- }
-
- // Check for quoted-string and position currentPos
- // beyond the terminating quote
- if (c == '"') {
- for (start = ++currentPos; currentPos < maxPos; currentPos++) {
- c = string.charAt(currentPos);
- if (c == '\\') { // Escape sequence
- currentPos++;
- filter = true;
- } else if (c == '\r')
- filter = true;
- else if (c == '"') {
- currentPos++;
- String s;
-
- if (filter)
- s = filterToken(string, start, currentPos-1);
- else
- s = string.substring(start,currentPos-1);
-
- return new Token(Token.QUOTEDSTRING, s);
- }
- }
- throw new ParseException("Unbalanced quoted string");
- }
-
- // Check for SPECIAL or CTL
- if (c < 040 || c >= 0177 || delimiters.indexOf(c) >= 0) {
- currentPos++; // re-position currentPos
- char ch[] = new char[1];
- ch[0] = c;
- return new Token((int)c, new String(ch));
- }
-
- // Check for ATOM
- for (start = currentPos; currentPos < maxPos; currentPos++) {
- c = string.charAt(currentPos);
- // ATOM is delimited by either SPACE, CTL, "(", <">
- // or the specified SPECIALS
- if (c < 040 || c >= 0177 || c == '(' || c == ' ' ||
- c == '"' || delimiters.indexOf(c) >= 0)
- break;
- }
- return new Token(Token.ATOM, string.substring(start, currentPos));
- }
-
- // Skip SPACE, HT, CR and NL
- private int skipWhiteSpace() {
- char c;
- for (; currentPos < maxPos; currentPos++)
- if (((c = string.charAt(currentPos)) != ' ') &&
- (c != '\t') && (c != '\r') && (c != '\n'))
- return currentPos;
- return Token.EOF;
- }
-
- /* Process escape sequences and embedded LWSPs from a comment or
- * quoted string.
- */
- private static String filterToken(String s, int start, int end) {
- StringBuffer sb = new StringBuffer();
- char c;
- boolean gotEscape = false;
- boolean gotCR = false;
-
- for (int i = start; i < end; i++) {
- c = s.charAt(i);
- if (c == '\n' && gotCR) {
- // This LF is part of an unescaped
- // CRLF sequence (i.e, LWSP). Skip it.
- gotCR = false;
- continue;
- }
-
- gotCR = false;
- if (!gotEscape) {
- // Previous character was NOT '\'
- if (c == '\\') // skip this character
- gotEscape = true;
- else if (c == '\r') // skip this character
- gotCR = true;
- else // append this character
- sb.append(c);
- } else {
- // Previous character was '\'. So no need to
- // bother with any special processing, just
- // append this character
- sb.append(c);
- gotEscape = false;
- }
- }
- return sb.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java
deleted file mode 100644
index 8ce91689..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)InternetHeaders.java 1.16 02/08/08
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.Header;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.LineInputStream;
-import com.sun.xml.internal.messaging.saaj.util.FinalArrayList;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.AbstractList;
-import java.util.List;
-import java.util.NoSuchElementException;
-
-/**
- * InternetHeaders is a utility class that manages RFC822 style
- * headers. Given an RFC822 format message stream, it reads lines
- * until the blank line that indicates end of header. The input stream
- * is positioned at the start of the body. The lines are stored
- * within the object and can be extracted as either Strings or
- * {@link Header} objects. <p>
- * <p/>
- * This class is mostly intended for service providers. MimeMessage
- * and MimeBody use this class for holding their headers. <p>
- * <p/>
- * <hr> <strong>A note on RFC822 and MIME headers</strong><p>
- * <p/>
- * RFC822 and MIME header fields <strong>must</strong> contain only
- * US-ASCII characters. If a header contains non US-ASCII characters,
- * it must be encoded as per the rules in RFC 2047. The MimeUtility
- * class provided in this package can be used to to achieve this.
- * Callers of the <code>setHeader</code>, <code>addHeader</code>, and
- * <code>addHeaderLine</code> methods are responsible for enforcing
- * the MIME requirements for the specified headers. In addition, these
- * header fields must be folded (wrapped) before being sent if they
- * exceed the line length limitation for the transport (1000 bytes for
- * SMTP). Received headers may have been folded. The application is
- * responsible for folding and unfolding headers as appropriate. <p>
- *
- * @author John Mani
- * @author Bill Shannon
- * @see MimeUtility
- */
-public final class InternetHeaders {
-
- private final FinalArrayList headers = new FinalArrayList();
-
- /**
- * Lazily cerated view of header lines (Strings).
- */
- private List headerValueView;
-
- /**
- * Create an empty InternetHeaders object.
- */
- public InternetHeaders() {
- }
-
- /**
- * Read and parse the given RFC822 message stream till the
- * blank line separating the header from the body. The input
- * stream is left positioned at the start of the body. The
- * header lines are stored internally. <p>
- * <p/>
- * For efficiency, wrap a BufferedInputStream around the actual
- * input stream and pass it as the parameter.
- *
- * @param is RFC822 input stream
- */
- public InternetHeaders(InputStream is) throws MessagingException {
- load(is);
- }
-
- /**
- * Read and parse the given RFC822 message stream till the
- * blank line separating the header from the body. Store the
- * header lines inside this InternetHeaders object. <p>
- * <p/>
- * Note that the header lines are added into this InternetHeaders
- * object, so any existing headers in this object will not be
- * affected.
- *
- * @param is RFC822 input stream
- */
- public void load(InputStream is) throws MessagingException {
- // Read header lines until a blank line. It is valid
- // to have BodyParts with no header lines.
- String line;
- LineInputStream lis = new LineInputStream(is);
- String prevline = null; // the previous header line, as a string
- // a buffer to accumulate the header in, when we know it's needed
- StringBuffer lineBuffer = new StringBuffer();
-
- try {
- //while ((line = lis.readLine()) != null) {
- do {
- line = lis.readLine();
- if (line != null &&
- (line.startsWith(" ") || line.startsWith("\t"))) {
- // continuation of header
- if (prevline != null) {
- lineBuffer.append(prevline);
- prevline = null;
- }
- lineBuffer.append("\r\n");
- lineBuffer.append(line);
- } else {
- // new header
- if (prevline != null)
- addHeaderLine(prevline);
- else if (lineBuffer.length() > 0) {
- // store previous header first
- addHeaderLine(lineBuffer.toString());
- lineBuffer.setLength(0);
- }
- prevline = line;
- }
- } while (line != null && line.length() > 0);
- } catch (IOException ioex) {
- throw new MessagingException("Error in input stream", ioex);
- }
- }
-
- /**
- * Return all the values for the specified header. The
- * values are String objects. Returns <code>null</code>
- * if no headers with the specified name exist.
- *
- * @param name header name
- * @return array of header values, or null if none
- */
- public String[] getHeader(String name) {
- // XXX - should we just step through in index order?
- FinalArrayList v = new FinalArrayList(); // accumulate return values
-
- int len = headers.size();
- for( int i=0; i<len; i++ ) {
- hdr h = (hdr) headers.get(i);
- if (name.equalsIgnoreCase(h.name)) {
- v.add(h.getValue());
- }
- }
- if (v.size() == 0)
- return (null);
- // convert Vector to an array for return
- return (String[]) v.toArray(new String[v.size()]);
- }
-
- /**
- * Get all the headers for this header name, returned as a single
- * String, with headers separated by the delimiter. If the
- * delimiter is <code>null</code>, only the first header is
- * returned. Returns <code>null</code>
- * if no headers with the specified name exist.
- *
- * @param delimiter delimiter
- * @return the value fields for all headers with
- * this name, or null if none
- * @param name header name
- */
- public String getHeader(String name, String delimiter) {
- String[] s = getHeader(name);
-
- if (s == null)
- return null;
-
- if ((s.length == 1) || delimiter == null)
- return s[0];
-
- StringBuffer r = new StringBuffer(s[0]);
- for (int i = 1; i < s.length; i++) {
- r.append(delimiter);
- r.append(s[i]);
- }
- return r.toString();
- }
-
- /**
- * Change the first header line that matches name
- * to have value, adding a new header if no existing header
- * matches. Remove all matching headers but the first. <p>
- * <p/>
- * Note that RFC822 headers can only contain US-ASCII characters
- *
- * @param name header name
- * @param value header value
- */
- public void setHeader(String name, String value) {
- boolean found = false;
-
- for (int i = 0; i < headers.size(); i++) {
- hdr h = (hdr) headers.get(i);
- if (name.equalsIgnoreCase(h.name)) {
- if (!found) {
- int j;
- if (h.line != null && (j = h.line.indexOf(':')) >= 0) {
- h.line = h.line.substring(0, j + 1) + " " + value;
- } else {
- h.line = name + ": " + value;
- }
- found = true;
- } else {
- headers.remove(i);
- i--; // have to look at i again
- }
- }
- }
-
- if (!found) {
- addHeader(name, value);
- }
- }
-
- /**
- * Add a header with the specified name and value to the header list. <p>
- * <p/>
- * Note that RFC822 headers can only contain US-ASCII characters.
- *
- * @param name header name
- * @param value header value
- */
- public void addHeader(String name, String value) {
- int pos = headers.size();
- for (int i = headers.size() - 1; i >= 0; i--) {
- hdr h = (hdr) headers.get(i);
- if (name.equalsIgnoreCase(h.name)) {
- headers.add(i + 1, new hdr(name, value));
- return;
- }
- // marker for default place to add new headers
- if (h.name.equals(":"))
- pos = i;
- }
- headers.add(pos, new hdr(name, value));
- }
-
- /**
- * Remove all header entries that match the given name
- *
- * @param name header name
- */
- public void removeHeader(String name) {
- for (int i = 0; i < headers.size(); i++) {
- hdr h = (hdr) headers.get(i);
- if (name.equalsIgnoreCase(h.name)) {
- headers.remove(i);
- i--; // have to look at i again
- }
- }
- }
-
- /**
- * Return all the headers as an Enumeration of
- * {@link Header} objects.
- *
- * @return Header objects
- */
- public FinalArrayList getAllHeaders() {
- return headers; // conceptually it should be read-only, but for performance reason I'm not wrapping it here
- }
-
- /**
- * Add an RFC822 header line to the header store.
- * If the line starts with a space or tab (a continuation line),
- * add it to the last header line in the list. <p>
- * <p/>
- * Note that RFC822 headers can only contain US-ASCII characters
- *
- * @param line raw RFC822 header line
- */
- public void addHeaderLine(String line) {
- try {
- char c = line.charAt(0);
- if (c == ' ' || c == '\t') {
- hdr h = (hdr) headers.get(headers.size() - 1);
- h.line += "\r\n" + line;
- } else
- headers.add(new hdr(line));
- } catch (StringIndexOutOfBoundsException e) {
- // line is empty, ignore it
- return;
- } catch (NoSuchElementException e) {
- // XXX - vector is empty?
- }
- }
-
- /**
- * Return all the header lines as a collection
- */
- public List getAllHeaderLines() {
- if(headerValueView==null)
- headerValueView = new AbstractList() {
- public Object get(int index) {
- return ((hdr)headers.get(index)).line;
- }
-
- public int size() {
- return headers.size();
- }
- };
- return headerValueView;
- }
-}
-
-/*
- * A private utility class to represent an individual header.
- */
-
-class hdr implements Header {
- // XXX - should these be private?
- String name; // the canonicalized (trimmed) name of this header
- // XXX - should name be stored in lower case?
- String line; // the entire RFC822 header "line"
-
- /*
- * Constructor that takes a line and splits out
- * the header name.
- */
- hdr(String l) {
- int i = l.indexOf(':');
- if (i < 0) {
- // should never happen
- name = l.trim();
- } else {
- name = l.substring(0, i).trim();
- }
- line = l;
- }
-
- /*
- * Constructor that takes a header name and value.
- */
- hdr(String n, String v) {
- name = n;
- line = n + ": " + v;
- }
-
- /*
- * Return the "name" part of the header line.
- */
- public String getName() {
- return name;
- }
-
- /*
- * Return the "value" part of the header line.
- */
- public String getValue() {
- int i = line.indexOf(':');
- if (i < 0)
- return line;
-
- int j;
- if (name.equalsIgnoreCase("Content-Description")) {
- // Content-Description should retain the folded whitespace after header unfolding -
- // rf. RFC2822 section 2.2.3, rf. RFC2822 section 3.2.3
- for (j = i + 1; j < line.length(); j++) {
- char c = line.charAt(j);
- if (!(/*c == ' ' ||*/c == '\t' || c == '\r' || c == '\n'))
- break;
- }
- } else {
- // skip whitespace after ':'
- for (j = i + 1; j < line.length(); j++) {
- char c = line.charAt(j);
- if (!(c == ' ' || c == '\t' || c == '\r' || c == '\n'))
- break;
- }
- }
- return line.substring(j);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java
deleted file mode 100644
index fd93661d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java
+++ /dev/null
@@ -1,1157 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MimeBodyPart.java 1.52 03/02/12
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.OutputUtil;
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
-import com.sun.xml.internal.messaging.saaj.util.FinalArrayList;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.activation.DataHandler;
-import java.io.BufferedInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.List;
-import javax.activation.DataSource;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart;
-
-/**
- * This class represents a MIME body part.
- * MimeBodyParts are contained in <code>MimeMultipart</code>
- * objects. <p>
- *
- * MimeBodyPart uses the <code>InternetHeaders</code> class to parse
- * and store the headers of that body part. <p>
- *
- * <hr><strong>A note on RFC 822 and MIME headers</strong><p>
- *
- * RFC 822 header fields <strong>must</strong> contain only
- * US-ASCII characters. MIME allows non ASCII characters to be present
- * in certain portions of certain headers, by encoding those characters.
- * RFC 2047 specifies the rules for doing this. The MimeUtility
- * class provided in this package can be used to to achieve this.
- * Callers of the <code>setHeader</code>, <code>addHeader</code>, and
- * <code>addHeaderLine</code> methods are responsible for enforcing
- * the MIME requirements for the specified headers. In addition, these
- * header fields must be folded (wrapped) before being sent if they
- * exceed the line length limitation for the transport (1000 bytes for
- * SMTP). Received headers may have been folded. The application is
- * responsible for folding and unfolding headers as appropriate. <p>
- *
- * @author John Mani
- * @author Bill Shannon
- * @see MimeUtility
- */
-
-public final class MimeBodyPart {
-
- /**
- * This part should be presented as an attachment.
- * @see #getDisposition
- * @see #setDisposition
- */
- public static final String ATTACHMENT = "attachment";
-
- /**
- * This part should be presented inline.
- * @see #getDisposition
- * @see #setDisposition
- */
- public static final String INLINE = "inline";
-
-
- // Paranoia:
- // allow this last minute change to be disabled if it causes problems
- private static boolean setDefaultTextCharset = true;
-
- static {
- try {
- String s = System.getProperty("mail.mime.setdefaulttextcharset");
- // default to true
- setDefaultTextCharset = s == null || !s.equalsIgnoreCase("false");
- } catch (SecurityException sex) {
- // ignore it
- }
- }
-
- /*
- Data is represented in one of three forms.
- Either we have a DataHandler, or byte[] as the raw content image, or the contentStream.
- It's OK to have more than one of them, provided that they are identical.
- */
-
- /**
- * The DataHandler object representing this MimeBodyPart's content.
- */
- private DataHandler dh;
-
- /**
- * Byte array that holds the bytes of the content of this MimeBodyPart.
- * Used in a pair with {@link #contentLength} to denote a regision of a buffer
- * as a valid data.
- */
- private byte[] content;
- private int contentLength;
- private int start = 0;
-
- /**
- * If the data for this body part was supplied by an
- * InputStream that implements the SharedInputStream interface,
- * <code>contentStream</code> is another such stream representing
- * the content of this body part. In this case, <code>content</code>
- * will be null.
- *
- * @since JavaMail 1.2
- */
- private InputStream contentStream;
-
-
-
- /**
- * The InternetHeaders object that stores all the headers
- * of this body part.
- */
- private final InternetHeaders headers;
-
- /**
- * The <code>MimeMultipart</code> object containing this <code>MimeBodyPart</code>,
- * if known.
- * @since JavaMail 1.1
- */
- private MimeMultipart parent;
-
- private MIMEPart mimePart;
-
- /**
- * An empty MimeBodyPart object is created.
- * This body part maybe filled in by a client constructing a multipart
- * message.
- */
- public MimeBodyPart() {
- headers = new InternetHeaders();
- }
-
- /**
- * Constructs a MimeBodyPart by reading and parsing the data from
- * the specified input stream. The parser consumes data till the end
- * of the given input stream. The input stream must start at the
- * beginning of a valid MIME body part and must terminate at the end
- * of that body part. <p>
- *
- * Note that the "boundary" string that delimits body parts must
- * <strong>not</strong> be included in the input stream. The intention
- * is that the MimeMultipart parser will extract each body part's bytes
- * from a multipart stream and feed them into this constructor, without
- * the delimiter strings.
- *
- * @param is the body part Input Stream
- */
- public MimeBodyPart(InputStream is) throws MessagingException {
- if (!(is instanceof ByteArrayInputStream) &&
- !(is instanceof BufferedInputStream) &&
- !(is instanceof SharedInputStream))
- is = new BufferedInputStream(is);
-
- headers = new InternetHeaders(is);
-
- if (is instanceof SharedInputStream) {
- SharedInputStream sis = (SharedInputStream) is;
- contentStream = sis.newStream(sis.getPosition(), -1);
- } else {
- try {
- ByteOutputStream bos = new ByteOutputStream();
- bos.write(is);
- content = bos.getBytes();
- contentLength = bos.getCount();
- } catch (IOException ioex) {
- throw new MessagingException("Error reading input stream", ioex);
- }
- }
-
- }
-
- /**
- * Constructs a MimeBodyPart using the given header and
- * content bytes. <p>
- *
- * Used by providers.
- *
- * @param headers The header of this part
- * @param content bytes representing the body of this part.
- */
- public MimeBodyPart(InternetHeaders headers, byte[] content, int len) {
- this.headers = headers;
- this.content = content;
- this.contentLength = len;
- }
-
- public MimeBodyPart(
- InternetHeaders headers, byte[] content, int start, int len) {
- this.headers = headers;
- this.content = content;
- this.start = start;
- this.contentLength = len;
- }
-
- public MimeBodyPart(MIMEPart part) {
- mimePart = part;
- headers = new InternetHeaders();
- List<? extends com.sun.xml.internal.org.jvnet.mimepull.Header> hdrs = mimePart.getAllHeaders();
- for (com.sun.xml.internal.org.jvnet.mimepull.Header hd : hdrs) {
- headers.addHeader(hd.getName(), hd.getValue());
- }
- }
- /**
- * Return the containing <code>MimeMultipart</code> object,
- * or <code>null</code> if not known.
- */
- public MimeMultipart getParent() {
- return parent;
- }
-
- /**
- * Set the parent of this <code>MimeBodyPart</code> to be the specified
- * <code>MimeMultipart</code>. Normally called by <code>MimeMultipart</code>'s
- * <code>addBodyPart</code> method. <code>parent</code> may be
- * <code>null</code> if the <code>MimeBodyPart</code> is being removed
- * from its containing <code>MimeMultipart</code>.
- * @since JavaMail 1.1
- */
- public void setParent(MimeMultipart parent) {
- this.parent = parent;
- }
-
- /**
- * Return the size of the content of this body part in bytes.
- * Return -1 if the size cannot be determined. <p>
- *
- * Note that this number may not be an exact measure of the
- * content size and may or may not account for any transfer
- * encoding of the content. <p>
- *
- * This implementation returns the size of the <code>content</code>
- * array (if not null), or, if <code>contentStream</code> is not
- * null, and the <code>available</code> method returns a positive
- * number, it returns that number as the size. Otherwise, it returns
- * -1.
- *
- * @return size in bytes, or -1 if not known
- */
- public int getSize() {
-
- if (mimePart != null) {
- try {
- return mimePart.read().available();
- } catch (IOException ex) {
- return -1;
- }
- }
- if (content != null)
- return contentLength;
- if (contentStream != null) {
- try {
- int size = contentStream.available();
- // only believe the size if it's greate than zero, since zero
- // is the default returned by the InputStream class itself
- if (size > 0)
- return size;
- } catch (IOException ex) {
- // ignore it
- }
- }
- return -1;
- }
-
- /**
- * Return the number of lines for the content of this MimeBodyPart.
- * Return -1 if this number cannot be determined. <p>
- *
- * Note that this number may not be an exact measure of the
- * content length and may or may not account for any transfer
- * encoding of the content. <p>
- *
- * This implementation returns -1.
- *
- * @return number of lines, or -1 if not known
- */
- public int getLineCount() {
- return -1;
- }
-
- /**
- * Returns the value of the RFC 822 "Content-Type" header field.
- * This represents the content type of the content of this
- * body part. This value must not be null. If this field is
- * unavailable, "text/plain" should be returned. <p>
- *
- * This implementation uses <code>getHeader(name)</code>
- * to obtain the requisite header field.
- *
- * @return Content-Type of this body part
- */
- public String getContentType() {
- if (mimePart != null) {
- return mimePart.getContentType();
- }
- String s = getHeader("Content-Type", null);
- if (s == null)
- s = "text/plain";
-
- return s;
- }
-
- /**
- * Is this MimeBodyPart of the specified MIME type? This method
- * compares <strong>only the <code>primaryType</code> and
- * <code>subType</code></strong>.
- * The parameters of the content types are ignored. <p>
- *
- * For example, this method will return <code>true</code> when
- * comparing a MimeBodyPart of content type <strong>"text/plain"</strong>
- * with <strong>"text/plain; charset=foobar"</strong>. <p>
- *
- * If the <code>subType</code> of <code>mimeType</code> is the
- * special character '*', then the subtype is ignored during the
- * comparison.
- */
- public boolean isMimeType(String mimeType) {
- boolean result;
- // XXX - lots of room for optimization here!
- try {
- ContentType ct = new ContentType(getContentType());
- result = ct.match(mimeType);
- } catch (ParseException ex) {
- result = getContentType().equalsIgnoreCase(mimeType);
- }
- return result;
- }
-
- /**
- * Returns the value of the "Content-Disposition" header field.
- * This represents the disposition of this part. The disposition
- * describes how the part should be presented to the user. <p>
- *
- * If the Content-Disposition field is unavailable,
- * null is returned. <p>
- *
- * This implementation uses <code>getHeader(name)</code>
- * to obtain the requisite header field.
- *
- * @see #headers
- */
- public String getDisposition() throws MessagingException {
- String s = getHeader("Content-Disposition", null);
-
- if (s == null)
- return null;
-
- ContentDisposition cd = new ContentDisposition(s);
- return cd.getDisposition();
- }
-
- /**
- * Set the "Content-Disposition" header field of this body part.
- * If the disposition is null, any existing "Content-Disposition"
- * header field is removed.
- *
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- */
- public void setDisposition(String disposition) throws MessagingException {
- if (disposition == null)
- removeHeader("Content-Disposition");
- else {
- String s = getHeader("Content-Disposition", null);
- if (s != null) {
- /* A Content-Disposition header already exists ..
- *
- * Override disposition, but attempt to retain
- * existing disposition parameters
- */
- ContentDisposition cd = new ContentDisposition(s);
- cd.setDisposition(disposition);
- disposition = cd.toString();
- }
- setHeader("Content-Disposition", disposition);
- }
- }
-
- /**
- * Returns the content transfer encoding from the
- * "Content-Transfer-Encoding" header
- * field. Returns <code>null</code> if the header is unavailable
- * or its value is absent. <p>
- *
- * This implementation uses <code>getHeader(name)</code>
- * to obtain the requisite header field.
- *
- * @see #headers
- */
- public String getEncoding() throws MessagingException {
- String s = getHeader("Content-Transfer-Encoding", null);
-
- if (s == null)
- return null;
-
- s = s.trim(); // get rid of trailing spaces
- // quick check for known values to avoid unnecessary use
- // of tokenizer.
- if (s.equalsIgnoreCase("7bit") || s.equalsIgnoreCase("8bit") ||
- s.equalsIgnoreCase("quoted-printable") ||
- s.equalsIgnoreCase("base64"))
- return s;
-
- // Tokenize the header to obtain the encoding (skip comments)
- HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
-
- HeaderTokenizer.Token tk;
- int tkType;
-
- for (;;) {
- tk = h.next(); // get a token
- tkType = tk.getType();
- if (tkType == HeaderTokenizer.Token.EOF)
- break; // done
- else if (tkType == HeaderTokenizer.Token.ATOM)
- return tk.getValue();
- else // invalid token, skip it.
- continue;
- }
- return s;
- }
-
- /**
- * Returns the value of the "Content-ID" header field. Returns
- * <code>null</code> if the field is unavailable or its value is
- * absent. <p>
- *
- * This implementation uses <code>getHeader(name)</code>
- * to obtain the requisite header field.
- */
- public String getContentID() {
- return getHeader("Content-ID", null);
- }
-
- /**
- * Set the "Content-ID" header field of this body part.
- * If the <code>cid</code> parameter is null, any existing
- * "Content-ID" is removed.
- *
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- * @since JavaMail 1.3
- */
- public void setContentID(String cid) {
- if (cid == null)
- removeHeader("Content-ID");
- else
- setHeader("Content-ID", cid);
- }
-
- /**
- * Return the value of the "Content-MD5" header field. Returns
- * <code>null</code> if this field is unavailable or its value
- * is absent. <p>
- *
- * This implementation uses <code>getHeader(name)</code>
- * to obtain the requisite header field.
- */
- public String getContentMD5() {
- return getHeader("Content-MD5", null);
- }
-
- /**
- * Set the "Content-MD5" header field of this body part.
- *
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- */
- public void setContentMD5(String md5) {
- setHeader("Content-MD5", md5);
- }
-
- /**
- * Get the languages specified in the Content-Language header
- * of this MimeBodyPart. The Content-Language header is defined by
- * RFC 1766. Returns <code>null</code> if this header is not
- * available or its value is absent. <p>
- *
- * This implementation uses <code>getHeader(name)</code>
- * to obtain the requisite header field.
- */
- public String[] getContentLanguage() throws MessagingException {
- String s = getHeader("Content-Language", null);
-
- if (s == null)
- return null;
-
- // Tokenize the header to obtain the Language-tags (skip comments)
- HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
- FinalArrayList v = new FinalArrayList();
-
- HeaderTokenizer.Token tk;
- int tkType;
-
- while (true) {
- tk = h.next(); // get a language-tag
- tkType = tk.getType();
- if (tkType == HeaderTokenizer.Token.EOF)
- break; // done
- else if (tkType == HeaderTokenizer.Token.ATOM) v.add(tk.getValue());
- else // invalid token, skip it.
- continue;
- }
-
- if (v.size() == 0)
- return null;
-
- return (String[])v.toArray(new String[v.size()]);
- }
-
- /**
- * Set the Content-Language header of this MimeBodyPart. The
- * Content-Language header is defined by RFC 1766.
- *
- * @param languages array of language tags
- */
- public void setContentLanguage(String[] languages) {
- StringBuffer sb = new StringBuffer(languages[0]);
- for (int i = 1; i < languages.length; i++)
- sb.append(',').append(languages[i]);
- setHeader("Content-Language", sb.toString());
- }
-
- /**
- * Returns the "Content-Description" header field of this body part.
- * This typically associates some descriptive information with
- * this part. Returns null if this field is unavailable or its
- * value is absent. <p>
- *
- * If the Content-Description field is encoded as per RFC 2047,
- * it is decoded and converted into Unicode. If the decoding or
- * conversion fails, the raw data is returned as is. <p>
- *
- * This implementation uses <code>getHeader(name)</code>
- * to obtain the requisite header field.
- *
- * @return content description
- */
- public String getDescription() {
- String rawvalue = getHeader("Content-Description", null);
-
- if (rawvalue == null)
- return null;
-
- try {
- return MimeUtility.decodeText(MimeUtility.unfold(rawvalue));
- } catch (UnsupportedEncodingException ex) {
- return rawvalue;
- }
- }
-
- /**
- * Set the "Content-Description" header field for this body part.
- * If the description parameter is <code>null</code>, then any
- * existing "Content-Description" fields are removed. <p>
- *
- * If the description contains non US-ASCII characters, it will
- * be encoded using the platform's default charset. If the
- * description contains only US-ASCII characters, no encoding
- * is done and it is used as is. <p>
- *
- * Note that if the charset encoding process fails, a
- * MessagingException is thrown, and an UnsupportedEncodingException
- * is included in the chain of nested exceptions within the
- * MessagingException.
- *
- * @param description content description
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- * @exception MessagingException An
- * UnsupportedEncodingException may be included
- * in the exception chain if the charset
- * conversion fails.
- */
- public void setDescription(String description) throws MessagingException {
- setDescription(description, null);
- }
-
- /**
- * Set the "Content-Description" header field for this body part.
- * If the description parameter is <code>null</code>, then any
- * existing "Content-Description" fields are removed. <p>
- *
- * If the description contains non US-ASCII characters, it will
- * be encoded using the specified charset. If the description
- * contains only US-ASCII characters, no encoding is done and
- * it is used as is. <p>
- *
- * Note that if the charset encoding process fails, a
- * MessagingException is thrown, and an UnsupportedEncodingException
- * is included in the chain of nested exceptions within the
- * MessagingException.
- *
- * @param description Description
- * @param charset Charset for encoding
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- * @exception MessagingException An
- * UnsupportedEncodingException may be included
- * in the exception chain if the charset
- * conversion fails.
- */
- public void setDescription(String description, String charset)
- throws MessagingException {
- if (description == null) {
- removeHeader("Content-Description");
- return;
- }
-
- try {
- setHeader("Content-Description", MimeUtility.fold(21,
- MimeUtility.encodeText(description, charset, null)));
- } catch (UnsupportedEncodingException uex) {
- throw new MessagingException("Encoding error", uex);
- }
- }
-
- /**
- * Get the filename associated with this body part. <p>
- *
- * Returns the value of the "filename" parameter from the
- * "Content-Disposition" header field of this body part. If its
- * not available, returns the value of the "name" parameter from
- * the "Content-Type" header field of this body part.
- * Returns <code>null</code> if both are absent.
- *
- * @return filename
- */
- public String getFileName() throws MessagingException {
- String filename = null;
- String s = getHeader("Content-Disposition", null);
-
- if (s != null) {
- // Parse the header ..
- ContentDisposition cd = new ContentDisposition(s);
- filename = cd.getParameter("filename");
- }
- if (filename == null) {
- // Still no filename ? Try the "name" ContentType parameter
- s = getHeader("Content-Type", null);
- if (s != null) {
- try {
- ContentType ct = new ContentType(s);
- filename = ct.getParameter("name");
- } catch (ParseException pex) { } // ignore it
- }
- }
- return filename;
- }
-
- /**
- * Set the filename associated with this body part, if possible. <p>
- *
- * Sets the "filename" parameter of the "Content-Disposition"
- * header field of this body part.
- *
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- */
- public void setFileName(String filename) throws MessagingException {
- // Set the Content-Disposition "filename" parameter
- String s = getHeader("Content-Disposition", null);
- ContentDisposition cd =
- new ContentDisposition(s == null ? ATTACHMENT : s);
- cd.setParameter("filename", filename);
- setHeader("Content-Disposition", cd.toString());
-
- /* Also attempt to set the Content-Type "name" parameter,
- * to satisfy ancient MUAs.
- * XXX: This is not RFC compliant, and hence should really
- * be conditional based on some property. Fix this once we
- * figure out how to get at Properties from here !
- */
- s = getHeader("Content-Type", null);
- if (s != null) {
- try {
- ContentType cType = new ContentType(s);
- cType.setParameter("name", filename);
- setHeader("Content-Type", cType.toString());
- } catch (ParseException pex) { } // ignore it
- }
- }
-
- /**
- * Return a decoded input stream for this body part's "content". <p>
- *
- * This implementation obtains the input stream from the DataHandler.
- * That is, it invokes getDataHandler().getInputStream();
- *
- * @return an InputStream
- * @exception IOException this is typically thrown by the
- * DataHandler. Refer to the documentation for
- * javax.activation.DataHandler for more details.
- *
- * @see #getContentStream
- * @see DataHandler#getInputStream
- */
- public InputStream getInputStream()
- throws IOException {
- return getDataHandler().getInputStream();
- }
-
- /**
- * Produce the raw bytes of the content. This method is used
- * when creating a DataHandler object for the content. Subclasses
- * that can provide a separate input stream for just the MimeBodyPart
- * content might want to override this method. <p>
- *
- * @see #content
- */
- /*package*/ InputStream getContentStream() throws MessagingException {
- if (mimePart != null) {
- return mimePart.read();
- }
- if (contentStream != null)
- return ((SharedInputStream)contentStream).newStream(0, -1);
- if (content != null)
- return new ByteArrayInputStream(content,start,contentLength);
-
- throw new MessagingException("No content");
- }
-
- /**
- * Return an InputStream to the raw data with any Content-Transfer-Encoding
- * intact. This method is useful if the "Content-Transfer-Encoding"
- * header is incorrect or corrupt, which would prevent the
- * <code>getInputStream</code> method or <code>getContent</code> method
- * from returning the correct data. In such a case the application may
- * use this method and attempt to decode the raw data itself. <p>
- *
- * This implementation simply calls the <code>getContentStream</code>
- * method.
- *
- * @see #getInputStream
- * @see #getContentStream
- * @since JavaMail 1.2
- */
- public InputStream getRawInputStream() throws MessagingException {
- return getContentStream();
- }
-
- /**
- * Return a DataHandler for this body part's content. <p>
- *
- * The implementation provided here works just like the
- * the implementation in MimeMessage.
- */
- public DataHandler getDataHandler() {
- if (mimePart != null) {
- //return an inputstream
- return new DataHandler(new DataSource() {
-
- public InputStream getInputStream() throws IOException {
- return mimePart.read();
- }
-
- public OutputStream getOutputStream() throws IOException {
- throw new UnsupportedOperationException("getOutputStream cannot be supported : You have enabled LazyAttachments Option");
- }
-
- public String getContentType() {
- return mimePart.getContentType();
- }
-
- public String getName() {
- return "MIMEPart Wrapped DataSource";
- }
- });
- }
- if (dh == null)
- dh = new DataHandler(new MimePartDataSource(this));
- return dh;
- }
-
- /**
- * Return the content as a java object. The type of the object
- * returned is of course dependent on the content itself. For
- * example, the native format of a text/plain content is usually
- * a String object. The native format for a "multipart"
- * content is always a MimeMultipart subclass. For content types that are
- * unknown to the DataHandler system, an input stream is returned
- * as the content. <p>
- *
- * This implementation obtains the content from the DataHandler.
- * That is, it invokes getDataHandler().getContent();
- *
- * @return Object
- * @exception IOException this is typically thrown by the
- * DataHandler. Refer to the documentation for
- * javax.activation.DataHandler for more details.
- */
- public Object getContent() throws IOException {
- return getDataHandler().getContent();
- }
-
- /**
- * This method provides the mechanism to set this body part's content.
- * The given DataHandler object should wrap the actual content.
- *
- * @param dh The DataHandler for the content
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- */
- public void setDataHandler(DataHandler dh) {
- if (mimePart != null) {
- mimePart = null;
- }
- this.dh = dh;
- this.content = null;
- this.contentStream = null;
- removeHeader("Content-Type");
- removeHeader("Content-Transfer-Encoding");
- }
-
- /**
- * A convenience method for setting this body part's content. <p>
- *
- * The content is wrapped in a DataHandler object. Note that a
- * DataContentHandler class for the specified type should be
- * available to the JavaMail implementation for this to work right.
- * That is, to do <code>setContent(foobar, "application/x-foobar")</code>,
- * a DataContentHandler for "application/x-foobar" should be installed.
- * Refer to the Java Activation Framework for more information.
- *
- * @param o the content object
- * @param type Mime type of the object
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- */
- public void setContent(Object o, String type) {
- if (mimePart != null) {
- mimePart = null;
- }
- if (o instanceof MimeMultipart) {
- setContent((MimeMultipart)o);
- } else {
- setDataHandler(new DataHandler(o, type));
- }
- }
-
- /**
- * Convenience method that sets the given String as this
- * part's content, with a MIME type of "text/plain". If the
- * string contains non US-ASCII characters, it will be encoded
- * using the platform's default charset. The charset is also
- * used to set the "charset" parameter. <p>
- *
- * Note that there may be a performance penalty if
- * <code>text</code> is large, since this method may have
- * to scan all the characters to determine what charset to
- * use. <p>
- * If the charset is already known, use the
- * setText() version that takes the charset parameter.
- *
- * @see #setText(String text, String charset)
- */
- public void setText(String text) {
- setText(text, null);
- }
-
- /**
- * Convenience method that sets the given String as this part's
- * content, with a MIME type of "text/plain" and the specified
- * charset. The given Unicode string will be charset-encoded
- * using the specified charset. The charset is also used to set
- * the "charset" parameter.
- */
- public void setText(String text, String charset) {
- if (charset == null) {
- if (MimeUtility.checkAscii(text) != MimeUtility.ALL_ASCII)
- charset = MimeUtility.getDefaultMIMECharset();
- else
- charset = "us-ascii";
- }
- setContent(text, "text/plain; charset=" +
- MimeUtility.quote(charset, HeaderTokenizer.MIME));
- }
-
- /**
- * This method sets the body part's content to a MimeMultipart object.
- *
- * @param mp The multipart object that is the Message's content
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- */
- public void setContent(MimeMultipart mp) {
- if (mimePart != null) {
- mimePart = null;
- }
- setDataHandler(new DataHandler(mp, mp.getContentType().toString()));
- mp.setParent(this);
- }
-
- /**
- * Output the body part as an RFC 822 format stream.
- *
- * @exception MessagingException
- * @exception IOException if an error occurs writing to the
- * stream or if an error is generated
- * by the javax.activation layer.
- * @see DataHandler#writeTo
- */
- public void writeTo(OutputStream os)
- throws IOException, MessagingException {
-
- // First, write out the header
- List hdrLines = headers.getAllHeaderLines();
- int sz = hdrLines.size();
- for( int i=0; i<sz; i++ )
- OutputUtil.writeln((String)hdrLines.get(i),os);
-
- // The CRLF separator between header and content
- OutputUtil.writeln(os);
-
- // Finally, the content.
- // XXX: May need to account for ESMTP ?
- if (contentStream != null) {
- ((SharedInputStream)contentStream).writeTo(0,-1,os);
- } else
- if (content != null) {
- os.write(content,start,contentLength);
- } else
- if (dh!=null) {
- // this is the slowest route, so try it as the last resort
- OutputStream wos = MimeUtility.encode(os, getEncoding());
- getDataHandler().writeTo(wos);
- if(os!=wos)
- wos.flush(); // Needed to complete encoding
- } else if (mimePart != null) {
- OutputStream wos = MimeUtility.encode(os, getEncoding());
- getDataHandler().writeTo(wos);
- if(os!=wos)
- wos.flush(); // Needed to complete encoding
- }else {
- throw new MessagingException("no content");
- }
- }
-
- /**
- * Get all the headers for this header_name. Note that certain
- * headers may be encoded as per RFC 2047 if they contain
- * non US-ASCII characters and these should be decoded.
- *
- * @param name name of header
- * @return array of headers
- * @see MimeUtility
- */
- public String[] getHeader(String name) {
- return headers.getHeader(name);
- }
-
- /**
- * Get all the headers for this header name, returned as a single
- * String, with headers separated by the delimiter. If the
- * delimiter is <code>null</code>, only the first header is
- * returned.
- *
- * @param name the name of this header
- * @param delimiter delimiter between fields in returned string
- * @return the value fields for all headers with
- * this name
- */
- public String getHeader(String name, String delimiter) {
- return headers.getHeader(name, delimiter);
- }
-
- /**
- * Set the value for this header_name. Replaces all existing
- * header values with this new value. Note that RFC 822 headers
- * must contain only US-ASCII characters, so a header that
- * contains non US-ASCII characters must be encoded as per the
- * rules of RFC 2047.
- *
- * @param name header name
- * @param value header value
- * @see MimeUtility
- */
- public void setHeader(String name, String value) {
- headers.setHeader(name, value);
- }
-
- /**
- * Add this value to the existing values for this header_name.
- * Note that RFC 822 headers must contain only US-ASCII
- * characters, so a header that contains non US-ASCII characters
- * must be encoded as per the rules of RFC 2047.
- *
- * @param name header name
- * @param value header value
- * @see MimeUtility
- */
- public void addHeader(String name, String value) {
- headers.addHeader(name, value);
- }
-
- /**
- * Remove all headers with this name.
- */
- public void removeHeader(String name) {
- headers.removeHeader(name);
- }
-
- /**
- * Return all the headers from this Message as an Enumeration of
- * Header objects.
- */
- public FinalArrayList getAllHeaders() {
- return headers.getAllHeaders();
- }
-
-
- /**
- * Add a header line to this body part
- */
- public void addHeaderLine(String line) {
- headers.addHeaderLine(line);
- }
-
- /**
- * Examine the content of this body part and update the appropriate
- * MIME headers. Typical headers that get set here are
- * <code>Content-Type</code> and <code>Content-Transfer-Encoding</code>.
- * Headers might need to be updated in two cases:
- *
- * <br>
- * - A message being crafted by a mail application will certainly
- * need to activate this method at some point to fill up its internal
- * headers.
- *
- * <br>
- * - A message read in from a Store will have obtained
- * all its headers from the store, and so doesn't need this.
- * However, if this message is editable and if any edits have
- * been made to either the content or message structure, we might
- * need to resync our headers.
- *
- * <br>
- * In both cases this method is typically called by the
- * <code>Message.saveChanges</code> method.
- */
- protected void updateHeaders() throws MessagingException {
- DataHandler dh = getDataHandler();
- if (dh == null) // Huh ?
- return;
-
- try {
- String type = dh.getContentType();
- boolean composite = false;
- boolean needCTHeader = getHeader("Content-Type") == null;
-
- ContentType cType = new ContentType(type);
- if (cType.match("multipart/*")) {
- // If multipart, recurse
- composite = true;
- Object o = dh.getContent();
- ((MimeMultipart) o).updateHeaders();
- } else if (cType.match("message/rfc822")) {
- composite = true;
- }
-
- // Content-Transfer-Encoding, but only if we don't
- // already have one
- if (!composite) { // not allowed on composite parts
- if (getHeader("Content-Transfer-Encoding") == null)
- setEncoding(MimeUtility.getEncoding(dh));
-
- if (needCTHeader && setDefaultTextCharset &&
- cType.match("text/*") &&
- cType.getParameter("charset") == null) {
- /*
- * Set a default charset for text parts.
- * We really should examine the data to determine
- * whether or not it's all ASCII, but that's too
- * expensive so we make an assumption: If we
- * chose 7bit encoding for this data, it's probably
- * ASCII. (MimeUtility.getEncoding will choose
- * 7bit only in this case, but someone might've
- * set the Content-Transfer-Encoding header manually.)
- */
- String charset;
- String enc = getEncoding();
- if (enc != null && enc.equalsIgnoreCase("7bit"))
- charset = "us-ascii";
- else
- charset = MimeUtility.getDefaultMIMECharset();
- cType.setParameter("charset", charset);
- type = cType.toString();
- }
- }
-
- // Now, let's update our own headers ...
-
- // Content-type, but only if we don't already have one
- if (needCTHeader) {
- /*
- * Pull out "filename" from Content-Disposition, and
- * use that to set the "name" parameter. This is to
- * satisfy older MUAs (DtMail, Roam and probably
- * a bunch of others).
- */
- String s = getHeader("Content-Disposition", null);
- if (s != null) {
- // Parse the header ..
- ContentDisposition cd = new ContentDisposition(s);
- String filename = cd.getParameter("filename");
- if (filename != null) {
- cType.setParameter("name", filename);
- type = cType.toString();
- }
- }
-
- setHeader("Content-Type", type);
- }
- } catch (IOException ex) {
- throw new MessagingException("IOException updating headers", ex);
- }
- }
-
- private void setEncoding(String encoding) {
- setHeader("Content-Transfer-Encoding", encoding);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java
deleted file mode 100644
index c53de35e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java
+++ /dev/null
@@ -1,653 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MimeMultipart.java 1.31 03/01/29
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.io.*;
-
-import javax.activation.DataSource;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.*;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*;
-import com.sun.xml.internal.messaging.saaj.util.FinalArrayList;
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
-import com.sun.xml.internal.messaging.saaj.util.SAAJUtil;
-
-/**
- * The MimeMultipart class is an implementation
- * that uses MIME conventions for the multipart data. <p>
- *
- * A MimeMultipart is obtained from a MimeBodyPart whose primary type
- * is "multipart" (by invoking the part's <code>getContent()</code> method)
- * or it can be created by a client as part of creating a new MimeMessage. <p>
- *
- * The default multipart subtype is "mixed". The other multipart
- * subtypes, such as "alternative", "related", and so on, can be
- * implemented as subclasses of MimeMultipart with additional methods
- * to implement the additional semantics of that type of multipart
- * content. The intent is that service providers, mail JavaBean writers
- * and mail clients will write many such subclasses and their Command
- * Beans, and will install them into the JavaBeans Activation
- * Framework, so that any JavaMail implementation and its clients can
- * transparently find and use these classes. Thus, a MIME multipart
- * handler is treated just like any other type handler, thereby
- * decoupling the process of providing multipart handlers from the
- * JavaMail API. Lacking these additional MimeMultipart subclasses,
- * all subtypes of MIME multipart data appear as MimeMultipart objects. <p>
- *
- * An application can directly construct a MIME multipart object of any
- * subtype by using the <code>MimeMultipart(String subtype)</code>
- * constructor. For example, to create a "multipart/alternative" object,
- * use <code>new MimeMultipart("alternative")</code>.
- *
- * @version 1.31, 03/01/29
- * @author John Mani
- * @author Bill Shannon
- * @author Max Spivak
- */
-
-//BM MimeMultipart can extend this
-public class MimeMultipart {
-
- /**
- * The DataSource supplying our InputStream.
- */
- protected DataSource ds = null;
-
- /**
- * Have we parsed the data from our InputStream yet?
- * Defaults to true; set to false when our constructor is
- * given a DataSource with an InputStream that we need to
- * parse.
- */
- protected boolean parsed = true;
-
- /**
- * Vector of MimeBodyPart objects.
- */
- protected FinalArrayList parts = new FinalArrayList(); // Holds BodyParts
-
- /**
- * This field specifies the content-type of this multipart
- * object. It defaults to "multipart/mixed".
- */
- protected ContentType contentType;
-
- /**
- * The <code>MimeBodyPart</code> containing this <code>MimeMultipart</code>,
- * if known.
- * @since JavaMail 1.1
- */
- protected MimeBodyPart parent;
-
- protected static final boolean ignoreMissingEndBoundary;
- static {
- ignoreMissingEndBoundary = SAAJUtil.getSystemBoolean("saaj.mime.multipart.ignoremissingendboundary");
- }
-
- /**
- * Default constructor. An empty MimeMultipart object
- * is created. Its content type is set to "multipart/mixed".
- * A unique boundary string is generated and this string is
- * setup as the "boundary" parameter for the
- * <code>contentType</code> field. <p>
- *
- * MimeBodyParts may be added later.
- */
- public MimeMultipart() {
- this("mixed");
- }
-
- /**
- * Construct a MimeMultipart object of the given subtype.
- * A unique boundary string is generated and this string is
- * setup as the "boundary" parameter for the
- * <code>contentType</code> field. <p>
- *
- * MimeBodyParts may be added later.
- */
- public MimeMultipart(String subtype) {
- //super();
- /*
- * Compute a boundary string.
- */
- String boundary = UniqueValue.getUniqueBoundaryValue();
- contentType = new ContentType("multipart", subtype, null);
- contentType.setParameter("boundary", boundary);
- }
-
- /**
- * Constructs a MimeMultipart object and its bodyparts from the
- * given DataSource. <p>
- *
- * This constructor handles as a special case the situation where the
- * given DataSource is a MultipartDataSource object.
- *
- * Otherwise, the DataSource is assumed to provide a MIME multipart
- * byte stream. The <code>parsed</code> flag is set to false. When
- * the data for the body parts are needed, the parser extracts the
- * "boundary" parameter from the content type of this DataSource,
- * skips the 'preamble' and reads bytes till the terminating
- * boundary and creates MimeBodyParts for each part of the stream.
- *
- * @param ds DataSource, can be a MultipartDataSource
- * @param ct
- * This must be the same information as {@link DataSource#getContentType()}.
- * All the callers of this method seem to have this object handy, so
- * for performance reason this method accepts it. Can be null.
- */
- public MimeMultipart(DataSource ds, ContentType ct) throws MessagingException {
- // 'ds' was not a MultipartDataSource, we have
- // to parse this ourself.
- parsed = false;
- this.ds = ds;
- if (ct==null)
- contentType = new ContentType(ds.getContentType());
- else
- contentType = ct;
- }
-
- /**
- * Set the subtype. This method should be invoked only on a new
- * MimeMultipart object created by the client. The default subtype
- * of such a multipart object is "mixed". <p>
- *
- * @param subtype Subtype
- */
- public void setSubType(String subtype) {
- contentType.setSubType(subtype);
- }
-
- /**
- * Return the number of enclosed MimeBodyPart objects.
- *
- * @return number of parts
- */
- public int getCount() throws MessagingException {
- parse();
- if (parts == null)
- return 0;
-
- return parts.size();
- }
-
- /**
- * Get the specified MimeBodyPart. BodyParts are numbered starting at 0.
- *
- * @param index the index of the desired MimeBodyPart
- * @return the MimeBodyPart
- * @exception MessagingException if no such MimeBodyPart exists
- */
- public MimeBodyPart getBodyPart(int index)
- throws MessagingException {
- parse();
- if (parts == null)
- throw new IndexOutOfBoundsException("No such BodyPart");
-
- return (MimeBodyPart)parts.get(index);
- }
-
- /**
- * Get the MimeBodyPart referred to by the given ContentID (CID).
- * Returns null if the part is not found.
- *
- * @param CID the ContentID of the desired part
- * @return the MimeBodyPart
- */
- public MimeBodyPart getBodyPart(String CID)
- throws MessagingException {
- parse();
-
- int count = getCount();
- for (int i = 0; i < count; i++) {
- MimeBodyPart part = getBodyPart(i);
- String s = part.getContentID();
- // Old versions of AXIS2 put angle brackets around the content
- // id but not the start param
- String sNoAngle = (s!= null) ? s.replaceFirst("^<", "").replaceFirst(">$", "")
- :null;
- if (s != null && (s.equals(CID) || CID.equals(sNoAngle)))
- return part;
- }
- return null;
- }
-
- /**
- * Update headers. The default implementation here just
- * calls the <code>updateHeaders</code> method on each of its
- * children BodyParts. <p>
- *
- * Note that the boundary parameter is already set up when
- * a new and empty MimeMultipart object is created. <p>
- *
- * This method is called when the <code>saveChanges</code>
- * method is invoked on the Message object containing this
- * MimeMultipart. This is typically done as part of the Message
- * send process, however note that a client is free to call
- * it any number of times. So if the header updating process is
- * expensive for a specific MimeMultipart subclass, then it
- * might itself want to track whether its internal state actually
- * did change, and do the header updating only if necessary.
- */
- protected void updateHeaders() throws MessagingException {
- for (int i = 0; i < parts.size(); i++)
- ((MimeBodyPart)parts.get(i)).updateHeaders();
- }
-
- /**
- * Iterates through all the parts and outputs each Mime part
- * separated by a boundary.
- */
- public void writeTo(OutputStream os)
- throws IOException, MessagingException {
- parse();
-
- String boundary = "--" + contentType.getParameter("boundary");
-
- for (int i = 0; i < parts.size(); i++) {
- OutputUtil.writeln(boundary, os); // put out boundary
- getBodyPart(i).writeTo(os);
- OutputUtil.writeln(os); // put out empty line
- }
-
- // put out last boundary
- OutputUtil.writeAsAscii(boundary, os);
- OutputUtil.writeAsAscii("--", os);
- os.flush();
- }
-
- /**
- * Parse the InputStream from our DataSource, constructing the
- * appropriate MimeBodyParts. The <code>parsed</code> flag is
- * set to true, and if true on entry nothing is done. This
- * method is called by all other methods that need data for
- * the body parts, to make sure the data has been parsed.
- *
- * @since JavaMail 1.2
- */
- protected void parse() throws MessagingException {
- if (parsed)
- return;
-
- InputStream in;
- SharedInputStream sin = null;
- long start = 0, end = 0;
- boolean foundClosingBoundary = false;
-
- try {
- in = ds.getInputStream();
- if (!(in instanceof ByteArrayInputStream) &&
- !(in instanceof BufferedInputStream) &&
- !(in instanceof SharedInputStream))
- in = new BufferedInputStream(in);
- } catch (Exception ex) {
- throw new MessagingException("No inputstream from datasource");
- }
- if (in instanceof SharedInputStream)
- sin = (SharedInputStream)in;
-
- String boundary = "--" + contentType.getParameter("boundary");
- byte[] bndbytes = ASCIIUtility.getBytes(boundary);
- int bl = bndbytes.length;
-
- try {
- // Skip the preamble
- LineInputStream lin = new LineInputStream(in);
- String line;
- while ((line = lin.readLine()) != null) {
- /*
- * Strip trailing whitespace. Can't use trim method
- * because it's too aggressive. Some bogus MIME
- * messages will include control characters in the
- * boundary string.
- */
- int i;
- for (i = line.length() - 1; i >= 0; i--) {
- char c = line.charAt(i);
- if (!(c == ' ' || c == '\t'))
- break;
- }
- line = line.substring(0, i + 1);
- if (line.equals(boundary))
- break;
- }
- if (line == null)
- throw new MessagingException("Missing start boundary");
-
- /*
- * Read and process body parts until we see the
- * terminating boundary line (or EOF).
- */
- boolean done = false;
- getparts:
- while (!done) {
- InternetHeaders headers = null;
- if (sin != null) {
- start = sin.getPosition();
- // skip headers
- while ((line = lin.readLine()) != null && line.length() > 0)
- ;
- if (line == null) {
- if (!ignoreMissingEndBoundary) {
- throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
- }
- // assume there's just a missing end boundary
- break getparts;
- }
- } else {
- // collect the headers for this body part
- headers = createInternetHeaders(in);
- }
-
- if (!in.markSupported())
- throw new MessagingException("Stream doesn't support mark");
-
- ByteOutputStream buf = null;
- // if we don't have a shared input stream, we copy the data
- if (sin == null)
- buf = new ByteOutputStream();
- int b;
- boolean bol = true; // beginning of line flag
- // the two possible end of line characters
- int eol1 = -1, eol2 = -1;
-
- /*
- * Read and save the content bytes in buf.
- */
- for (;;) {
- if (bol) {
- /*
- * At the beginning of a line, check whether the
- * next line is a boundary.
- */
- int i;
- in.mark(bl + 4 + 1000); // bnd + "--\r\n" + lots of LWSP
- // read bytes, matching against the boundary
- for (i = 0; i < bl; i++)
- if (in.read() != bndbytes[i])
- break;
- if (i == bl) {
- // matched the boundary, check for last boundary
- int b2 = in.read();
- if (b2 == '-') {
- if (in.read() == '-') {
- done = true;
- foundClosingBoundary = true;
- break; // ignore trailing text
- }
- }
- // skip linear whitespace
- while (b2 == ' ' || b2 == '\t')
- b2 = in.read();
- // check for end of line
- if (b2 == '\n')
- break; // got it! break out of the loop
- if (b2 == '\r') {
- in.mark(1);
- if (in.read() != '\n')
- in.reset();
- break; // got it! break out of the loop
- }
- }
- // failed to match, reset and proceed normally
- in.reset();
-
- // if this is not the first line, write out the
- // end of line characters from the previous line
- if (buf != null && eol1 != -1) {
- buf.write(eol1);
- if (eol2 != -1)
- buf.write(eol2);
- eol1 = eol2 = -1;
- }
- }
-
- // read the next byte
- if ((b = in.read()) < 0) {
- done = true;
- break;
- }
-
- /*
- * If we're at the end of the line, save the eol characters
- * to be written out before the beginning of the next line.
- */
- if (b == '\r' || b == '\n') {
- bol = true;
- if (sin != null)
- end = sin.getPosition() - 1;
- eol1 = b;
- if (b == '\r') {
- in.mark(1);
- if ((b = in.read()) == '\n')
- eol2 = b;
- else
- in.reset();
- }
- } else {
- bol = false;
- if (buf != null)
- buf.write(b);
- }
- }
-
- /*
- * Create a MimeBody element to represent this body part.
- */
- MimeBodyPart part;
- if (sin != null)
- part = createMimeBodyPart(sin.newStream(start, end));
- else
- part = createMimeBodyPart(headers, buf.getBytes(), buf.getCount());
- addBodyPart(part);
- }
- } catch (IOException ioex) {
- throw new MessagingException("IO Error", ioex);
- }
-
- if (!ignoreMissingEndBoundary && !foundClosingBoundary && sin== null) {
- throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
- }
- parsed = true;
- }
-
- /**
- * Create and return an InternetHeaders object that loads the
- * headers from the given InputStream. Subclasses can override
- * this method to return a subclass of InternetHeaders, if
- * necessary. This implementation simply constructs and returns
- * an InternetHeaders object.
- *
- * @param is the InputStream to read the headers from
- * @exception MessagingException
- * @since JavaMail 1.2
- */
- protected InternetHeaders createInternetHeaders(InputStream is)
- throws MessagingException {
- return new InternetHeaders(is);
- }
-
- /**
- * Create and return a MimeBodyPart object to represent a
- * body part parsed from the InputStream. Subclasses can override
- * this method to return a subclass of MimeBodyPart, if
- * necessary. This implementation simply constructs and returns
- * a MimeBodyPart object.
- *
- * @param headers the headers for the body part
- * @param content the content of the body part
- * @since JavaMail 1.2
- */
- protected MimeBodyPart createMimeBodyPart(InternetHeaders headers, byte[] content, int len) {
- return new MimeBodyPart(headers, content,len);
- }
-
- /**
- * Create and return a MimeBodyPart object to represent a
- * body part parsed from the InputStream. Subclasses can override
- * this method to return a subclass of MimeBodyPart, if
- * necessary. This implementation simply constructs and returns
- * a MimeBodyPart object.
- *
- * @param is InputStream containing the body part
- * @exception MessagingException
- * @since JavaMail 1.2
- */
- protected MimeBodyPart createMimeBodyPart(InputStream is) throws MessagingException {
- return new MimeBodyPart(is);
- }
-
- /**
- * Setup this MimeMultipart object from the given MultipartDataSource. <p>
- *
- * The method adds the MultipartDataSource's MimeBodyPart
- * objects into this MimeMultipart. This MimeMultipart's contentType is
- * set to that of the MultipartDataSource. <p>
- *
- * This method is typically used in those cases where one
- * has a multipart data source that has already been pre-parsed into
- * the individual body parts (for example, an IMAP datasource), but
- * needs to create an appropriate MimeMultipart subclass that represents
- * a specific multipart subtype.
- *
- * @param mp MimeMultipart datasource
- */
-
- protected void setMultipartDataSource(MultipartDataSource mp)
- throws MessagingException {
- contentType = new ContentType(mp.getContentType());
-
- int count = mp.getCount();
- for (int i = 0; i < count; i++)
- addBodyPart(mp.getBodyPart(i));
- }
-
- /**
- * Return the content-type of this MimeMultipart. <p>
- *
- * This implementation just returns the value of the
- * <code>contentType</code> field.
- *
- * @return content-type
- * @see #contentType
- */
- public ContentType getContentType() {
- return contentType;
- }
-
- /**
- * Remove the specified part from the multipart message.
- * Shifts all the parts after the removed part down one.
- *
- * @param part The part to remove
- * @return true if part removed, false otherwise
- * @exception MessagingException if no such MimeBodyPart exists
- */
- public boolean removeBodyPart(MimeBodyPart part) throws MessagingException {
- if (parts == null)
- throw new MessagingException("No such body part");
-
- boolean ret = parts.remove(part);
- part.setParent(null);
- return ret;
- }
-
- /**
- * Remove the part at specified location (starting from 0).
- * Shifts all the parts after the removed part down one.
- *
- * @param index Index of the part to remove
- * @exception IndexOutOfBoundsException if the given index
- * is out of range.
- */
- public void removeBodyPart(int index) {
- if (parts == null)
- throw new IndexOutOfBoundsException("No such BodyPart");
-
- MimeBodyPart part = (MimeBodyPart)parts.get(index);
- parts.remove(index);
- part.setParent(null);
- }
-
- /**
- * Adds a MimeBodyPart to the multipart. The MimeBodyPart is appended to
- * the list of existing Parts.
- *
- * @param part The MimeBodyPart to be appended
- */
- public synchronized void addBodyPart(MimeBodyPart part) {
- if (parts == null)
- parts = new FinalArrayList();
-
- parts.add(part);
- part.setParent(this);
- }
-
- /**
- * Adds a MimeBodyPart at position <code>index</code>.
- * If <code>index</code> is not the last one in the list,
- * the subsequent parts are shifted up. If <code>index</code>
- * is larger than the number of parts present, the
- * MimeBodyPart is appended to the end.
- *
- * @param part The MimeBodyPart to be inserted
- * @param index Location where to insert the part
- */
- public synchronized void addBodyPart(MimeBodyPart part, int index) {
- if (parts == null)
- parts = new FinalArrayList();
-
- parts.add(index,part);
- part.setParent(this);
- }
-
- /**
- * Return the <code>MimeBodyPart</code> that contains this <code>MimeMultipart</code>
- * object, or <code>null</code> if not known.
- * @since JavaMail 1.1
- */
- MimeBodyPart getParent() {
- return parent;
- }
-
- /**
- * Set the parent of this <code>MimeMultipart</code> to be the specified
- * <code>MimeBodyPart</code>. Normally called by the <code>Message</code>
- * or <code>MimeBodyPart</code> <code>setContent(MimeMultipart)</code> method.
- * <code>parent</code> may be <code>null</code> if the
- * <code>MimeMultipart</code> is being removed from its containing
- * <code>MimeBodyPart</code>.
- * @since JavaMail 1.1
- */
- void setParent(MimeBodyPart parent) {
- this.parent = parent;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java
deleted file mode 100644
index 4fa67f7e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MimePartDataSource.java 1.9 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.io.*;
-import java.net.UnknownServiceException;
-
-import javax.activation.DataSource;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-
-/**
- * A utility class that implements a DataSource out of
- * a MimeBodyPart. This class is primarily meant for service providers.
- *
- * @author John Mani
- */
-
-public final class MimePartDataSource implements DataSource {
- private final MimeBodyPart part;
-
- /**
- * Constructor, that constructs a DataSource from a MimeBodyPart.
- */
- public MimePartDataSource(MimeBodyPart part) {
- this.part = part;
- }
-
- /**
- * Returns an input stream from this MimeBodyPart. <p>
- *
- * This method applies the appropriate transfer-decoding, based
- * on the Content-Transfer-Encoding attribute of this MimeBodyPart.
- * Thus the returned input stream is a decoded stream of bytes.<p>
- *
- * This implementation obtains the raw content from the MimeBodyPart
- * using the <code>getContentStream()</code> method and decodes
- * it using the <code>MimeUtility.decode()</code> method.
- *
- * @return decoded input stream
- */
- public InputStream getInputStream() throws IOException {
-
- try {
- InputStream is = part.getContentStream();
-
- String encoding = part.getEncoding();
- if (encoding != null)
- return MimeUtility.decode(is, encoding);
- else
- return is;
- } catch (MessagingException mex) {
- throw new IOException(mex.getMessage());
- }
- }
-
- /**
- * DataSource method to return an output stream. <p>
- *
- * This implementation throws the UnknownServiceException.
- */
- public OutputStream getOutputStream() throws IOException {
- throw new UnknownServiceException();
- }
-
- /**
- * Returns the content-type of this DataSource. <p>
- *
- * This implementation just invokes the <code>getContentType</code>
- * method on the MimeBodyPart.
- */
- public String getContentType() {
- return part.getContentType();
- }
-
- /**
- * DataSource method to return a name. <p>
- *
- * This implementation just returns an empty string.
- */
- public String getName() {
- try {
- return part.getFileName();
- } catch (MessagingException mex) {
- return "";
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java
deleted file mode 100644
index 90b2e244..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-import com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-import javax.activation.DataSource;
-import javax.xml.soap.AttachmentPart;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEConfig;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEMessage;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart;
-
-/**
- *
- * @author Kumar
- */
-public class MimePullMultipart extends MimeMultipart {
-
- private InputStream in = null;
- private String boundary = null;
- private MIMEMessage mm = null;
- private DataSource dataSource = null;
- private ContentType contType = null;
- private String startParam = null;
- private MIMEPart soapPart = null;
-
- public MimePullMultipart(DataSource ds, ContentType ct)
- throws MessagingException {
- parsed = false;
- if (ct==null)
- contType = new ContentType(ds.getContentType());
- else
- contType = ct;
-
- dataSource = ds;
- boundary = contType.getParameter("boundary");
- }
-
- public MIMEPart readAndReturnSOAPPart() throws MessagingException {
- if (soapPart != null) {
- throw new MessagingException("Inputstream from datasource was already consumed");
- }
- readSOAPPart();
- return soapPart;
-
- }
-
- protected void readSOAPPart() throws MessagingException {
- try {
- if (soapPart != null) {
- return;
- }
- in = dataSource.getInputStream();
- MIMEConfig config = new MIMEConfig(); //use defaults
- mm = new MIMEMessage(in, boundary, config);
- String st = contType.getParameter("start");
- if(startParam == null) {
- soapPart = mm.getPart(0);
- } else {
- // Strip <...> from root part's Content-I
- if (st != null && st.length() > 2 && st.charAt(0) == '<' && st.charAt(st.length()-1) == '>') {
- st = st.substring(1, st.length()-1);
- }
- startParam = st;
- soapPart = mm.getPart(startParam);
-
- }
- } catch (IOException ex) {
- throw new MessagingException("No inputstream from datasource", ex);
- }
- }
-
- public void parseAll() throws MessagingException {
- if (parsed) {
- return;
- }
- if (soapPart == null) {
- readSOAPPart();
- }
-
- List<MIMEPart> prts = mm.getAttachments();
- for(MIMEPart part : prts) {
- if (part != soapPart) {
- AttachmentPart attach = new AttachmentPartImpl(part);
- this.addBodyPart(new MimeBodyPart(part));
- }
- }
- parsed = true;
- }
-
- protected void parse() throws MessagingException {
- parseAll();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java
deleted file mode 100644
index 9c98c841..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeUtility.java
+++ /dev/null
@@ -1,1507 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MimeUtility.java 1.45 03/03/10
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.io.*;
-import java.util.*;
-
-import javax.activation.DataHandler;
-import javax.activation.DataSource;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*;
-import com.sun.xml.internal.messaging.saaj.util.SAAJUtil;
-
-/**
- * This is a utility class that provides various MIME related
- * functionality. <p>
- *
- * There are a set of methods to encode and decode MIME headers as
- * per RFC 2047. A brief description on handling such headers is
- * given below: <p>
- *
- * RFC 822 mail headers <strong>must</strong> contain only US-ASCII
- * characters. Headers that contain non US-ASCII characters must be
- * encoded so that they contain only US-ASCII characters. Basically,
- * this process involves using either BASE64 or QP to encode certain
- * characters. RFC 2047 describes this in detail. <p>
- *
- * In Java, Strings contain (16 bit) Unicode characters. ASCII is a
- * subset of Unicode (and occupies the range 0 - 127). A String
- * that contains only ASCII characters is already mail-safe. If the
- * String contains non US-ASCII characters, it must be encoded. An
- * additional complexity in this step is that since Unicode is not
- * yet a widely used charset, one might want to first charset-encode
- * the String into another charset and then do the transfer-encoding.
- * <p>
- * Note that to get the actual bytes of a mail-safe String (say,
- * for sending over SMTP), one must do
- * <p><blockquote><pre>
- *
- * byte[] bytes = string.getBytes("iso-8859-1");
- *
- * </pre></blockquote><p>
- *
- * The <code>setHeader</code> and <code>addHeader</code> methods
- * on MimeMessage and MimeBodyPart assume that the given header values
- * are Unicode strings that contain only US-ASCII characters. Hence
- * the callers of those methods must insure that the values they pass
- * do not contain non US-ASCII characters. The methods in this class
- * help do this. <p>
- *
- * The <code>getHeader</code> family of methods on MimeMessage and
- * MimeBodyPart return the raw header value. These might be encoded
- * as per RFC 2047, and if so, must be decoded into Unicode Strings.
- * The methods in this class help to do this. <p>
- *
- * Several System properties control strict conformance to the MIME
- * spec. Note that these are not session properties but must be set
- * globally as System properties. <p>
- *
- * The <code>mail.mime.decodetext.strict</code> property controls
- * decoding of MIME encoded words. The MIME spec requires that encoded
- * words start at the beginning of a whitespace separated word. Some
- * mailers incorrectly include encoded words in the middle of a word.
- * If the <code>mail.mime.decodetext.strict</code> System property is
- * set to <code>"false"</code>, an attempt will be made to decode these
- * illegal encoded words. The default is true. <p>
- *
- * The <code>mail.mime.encodeeol.strict</code> property controls the
- * choice of Content-Transfer-Encoding for MIME parts that are not of
- * type "text". Often such parts will contain textual data for which
- * an encoding that allows normal end of line conventions is appropriate.
- * In rare cases, such a part will appear to contain entirely textual
- * data, but will require an encoding that preserves CR and LF characters
- * without change. If the <code>mail.mime.decodetext.strict</code>
- * System property is set to <code>"true"</code>, such an encoding will
- * be used when necessary. The default is false. <p>
- *
- * In addition, the <code>mail.mime.charset</code> System property can
- * be used to specify the default MIME charset to use for encoded words
- * and text parts that don't otherwise specify a charset. Normally, the
- * default MIME charset is derived from the default Java charset, as
- * specified in the <code>file.encoding</code> System property. Most
- * applications will have no need to explicitly set the default MIME
- * charset. In cases where the default MIME charset to be used for
- * mail messages is different than the charset used for files stored on
- * the system, this property should be set.
- *
- * @version 1.45, 03/03/10
- * @author John Mani
- * @author Bill Shannon
- */
-
-public class MimeUtility {
-
- // This class cannot be instantiated
- private MimeUtility() { }
-
- public static final int ALL = -1;
-
- private static final int BUFFER_SIZE = 1024;
- private static boolean decodeStrict = true;
- private static boolean encodeEolStrict = false;
- private static boolean foldEncodedWords = false;
- private static boolean foldText = true;
-
- static {
- try {
- String s = SAAJUtil.getSystemProperty("mail.mime.decodetext.strict");
- // default to true
- decodeStrict = s == null || !s.equalsIgnoreCase("false");
- s = SAAJUtil.getSystemProperty("mail.mime.encodeeol.strict");
- // default to false
- encodeEolStrict = s != null && s.equalsIgnoreCase("true");
- s = SAAJUtil.getSystemProperty("mail.mime.foldencodedwords");
- // default to false
- foldEncodedWords = s != null && s.equalsIgnoreCase("true");
- s = SAAJUtil.getSystemProperty("mail.mime.foldtext");
- // default to true
- foldText = s == null || !s.equalsIgnoreCase("false");
- } catch (SecurityException sex) {
- // ignore it
- }
- }
-
-
- /**
- * Get the content-transfer-encoding that should be applied
- * to the input stream of this datasource, to make it mailsafe. <p>
- *
- * The algorithm used here is: <br>
- * <ul>
- * <li>
- * If the primary type of this datasource is "text" and if all
- * the bytes in its input stream are US-ASCII, then the encoding
- * is "7bit". If more than half of the bytes are non-US-ASCII, then
- * the encoding is "base64". If less than half of the bytes are
- * non-US-ASCII, then the encoding is "quoted-printable".
- * <li>
- * If the primary type of this datasource is not "text", then if
- * all the bytes of its input stream are US-ASCII, the encoding
- * is "7bit". If there is even one non-US-ASCII character, the
- * encoding is "base64".
- * </ul>
- *
- * @param ds DataSource
- * @return the encoding. This is either "7bit",
- * "quoted-printable" or "base64"
- */
- public static String getEncoding(DataSource ds) {
- ContentType cType = null;
- InputStream is = null;
- String encoding = null;
-
- try {
- cType = new ContentType(ds.getContentType());
- is = ds.getInputStream();
- } catch (Exception ex) {
- return "base64"; // what else ?!
- }
-
- boolean isText = cType.match("text/*");
- // if not text, stop processing when we see non-ASCII
- int i = checkAscii(is, ALL, !isText);
- switch (i) {
- case ALL_ASCII:
- encoding = "7bit"; // all ascii
- break;
- case MOSTLY_ASCII:
- encoding = "quoted-printable"; // mostly ascii
- break;
- default:
- encoding = "base64"; // mostly binary
- break;
- }
-
- // Close the input stream
- try {
- is.close();
- } catch (IOException ioex) { }
-
- return encoding;
- }
-
- /**
- * Same as <code>getEncoding(DataSource)</code> except that instead
- * of reading the data from an <code>InputStream</code> it uses the
- * <code>writeTo</code> method to examine the data. This is more
- * efficient in the common case of a <code>DataHandler</code>
- * created with an object and a MIME type (for example, a
- * "text/plain" String) because all the I/O is done in this
- * thread. In the case requiring an <code>InputStream</code> the
- * <code>DataHandler</code> uses a thread, a pair of pipe streams,
- * and the <code>writeTo</code> method to produce the data. <p>
- *
- * @since JavaMail 1.2
- */
- public static String getEncoding(DataHandler dh) {
- ContentType cType = null;
- String encoding = null;
-
- /*
- * Try to pick the most efficient means of determining the
- * encoding. If this DataHandler was created using a DataSource,
- * the getEncoding(DataSource) method is typically faster. If
- * the DataHandler was created with an object, this method is
- * much faster. To distinguish the two cases, we use a heuristic.
- * A DataHandler created with an object will always have a null name.
- * A DataHandler created with a DataSource will usually have a
- * non-null name.
- *
- * XXX - This is actually quite a disgusting hack, but it makes
- * a common case run over twice as fast.
- */
- if (dh.getName() != null)
- return getEncoding(dh.getDataSource());
-
- try {
- cType = new ContentType(dh.getContentType());
- } catch (Exception ex) {
- return "base64"; // what else ?!
- }
-
- if (cType.match("text/*")) {
- // Check all of the available bytes
- AsciiOutputStream aos = new AsciiOutputStream(false, false);
- try {
- dh.writeTo(aos);
- } catch (IOException ex) { } // ignore it
- switch (aos.getAscii()) {
- case ALL_ASCII:
- encoding = "7bit"; // all ascii
- break;
- case MOSTLY_ASCII:
- encoding = "quoted-printable"; // mostly ascii
- break;
- default:
- encoding = "base64"; // mostly binary
- break;
- }
- } else { // not "text"
- // Check all of available bytes, break out if we find
- // at least one non-US-ASCII character
- AsciiOutputStream aos =
- new AsciiOutputStream(true, encodeEolStrict);
- try {
- dh.writeTo(aos);
- } catch (IOException ex) { } // ignore it
- if (aos.getAscii() == ALL_ASCII) // all ascii
- encoding = "7bit";
- else // found atleast one non-ascii character, use b64
- encoding = "base64";
- }
-
- return encoding;
- }
-
- /**
- * Decode the given input stream. The Input stream returned is
- * the decoded input stream. All the encodings defined in RFC 2045
- * are supported here. They include "base64", "quoted-printable",
- * "7bit", "8bit", and "binary". In addition, "uuencode" is also
- * supported.
- *
- * @param is input stream
- * @param encoding the encoding of the stream.
- * @return decoded input stream.
- */
- public static InputStream decode(InputStream is, String encoding)
- throws MessagingException {
- if (encoding.equalsIgnoreCase("base64"))
- return new BASE64DecoderStream(is);
- else if (encoding.equalsIgnoreCase("quoted-printable"))
- return new QPDecoderStream(is);
- else if (encoding.equalsIgnoreCase("uuencode") ||
- encoding.equalsIgnoreCase("x-uuencode") ||
- encoding.equalsIgnoreCase("x-uue"))
- return new UUDecoderStream(is);
- else if (encoding.equalsIgnoreCase("binary") ||
- encoding.equalsIgnoreCase("7bit") ||
- encoding.equalsIgnoreCase("8bit"))
- return is;
- else
- throw new MessagingException("Unknown encoding: " + encoding);
- }
-
- /**
- * Wrap an encoder around the given output stream.
- * All the encodings defined in RFC 2045 are supported here.
- * They include "base64", "quoted-printable", "7bit", "8bit" and
- * "binary". In addition, "uuencode" is also supported.
- *
- * @param os output stream
- * @param encoding the encoding of the stream.
- * @return output stream that applies the
- * specified encoding.
- */
- public static OutputStream encode(OutputStream os, String encoding)
- throws MessagingException {
- if (encoding == null)
- return os;
- else if (encoding.equalsIgnoreCase("base64"))
- return new BASE64EncoderStream(os);
- else if (encoding.equalsIgnoreCase("quoted-printable"))
- return new QPEncoderStream(os);
- else if (encoding.equalsIgnoreCase("uuencode") ||
- encoding.equalsIgnoreCase("x-uuencode") ||
- encoding.equalsIgnoreCase("x-uue"))
- return new UUEncoderStream(os);
- else if (encoding.equalsIgnoreCase("binary") ||
- encoding.equalsIgnoreCase("7bit") ||
- encoding.equalsIgnoreCase("8bit"))
- return os;
- else
- throw new MessagingException("Unknown encoding: " +encoding);
- }
-
- /**
- * Wrap an encoder around the given output stream.
- * All the encodings defined in RFC 2045 are supported here.
- * They include "base64", "quoted-printable", "7bit", "8bit" and
- * "binary". In addition, "uuencode" is also supported.
- * The <code>filename</code> parameter is used with the "uuencode"
- * encoding and is included in the encoded output.
- *
- * @param os output stream
- * @param encoding the encoding of the stream.
- * @param filename name for the file being encoded (only used
- * with uuencode)
- * @return output stream that applies the
- * specified encoding.
- * @since JavaMail 1.2
- */
- public static OutputStream encode(OutputStream os, String encoding,
- String filename)
- throws MessagingException {
- if (encoding == null)
- return os;
- else if (encoding.equalsIgnoreCase("base64"))
- return new BASE64EncoderStream(os);
- else if (encoding.equalsIgnoreCase("quoted-printable"))
- return new QPEncoderStream(os);
- else if (encoding.equalsIgnoreCase("uuencode") ||
- encoding.equalsIgnoreCase("x-uuencode") ||
- encoding.equalsIgnoreCase("x-uue"))
- return new UUEncoderStream(os, filename);
- else if (encoding.equalsIgnoreCase("binary") ||
- encoding.equalsIgnoreCase("7bit") ||
- encoding.equalsIgnoreCase("8bit"))
- return os;
- else
- throw new MessagingException("Unknown encoding: " +encoding);
- }
-
- /**
- * Encode a RFC 822 "text" token into mail-safe form as per
- * RFC 2047. <p>
- *
- * The given Unicode string is examined for non US-ASCII
- * characters. If the string contains only US-ASCII characters,
- * it is returned as-is. If the string contains non US-ASCII
- * characters, it is first character-encoded using the platform's
- * default charset, then transfer-encoded using either the B or
- * Q encoding. The resulting bytes are then returned as a Unicode
- * string containing only ASCII characters. <p>
- *
- * Note that this method should be used to encode only
- * "unstructured" RFC 822 headers. <p>
- *
- * Example of usage:
- * <p><blockquote><pre>
- *
- * MimeBodyPart part = ...
- * String rawvalue = "FooBar Mailer, Japanese version 1.1"
- * try {
- * // If we know for sure that rawvalue contains only US-ASCII
- * // characters, we can skip the encoding part
- * part.setHeader("X-mailer", MimeUtility.encodeText(rawvalue));
- * } catch (UnsupportedEncodingException e) {
- * // encoding failure
- * } catch (MessagingException me) {
- * // setHeader() failure
- * }
- *
- * </pre></blockquote><p>
- *
- * @param text unicode string
- * @return Unicode string containing only US-ASCII characters
- * @exception UnsupportedEncodingException if the encoding fails
- */
- public static String encodeText(String text)
- throws UnsupportedEncodingException {
- return encodeText(text, null, null);
- }
-
- /**
- * Encode a RFC 822 "text" token into mail-safe form as per
- * RFC 2047. <p>
- *
- * The given Unicode string is examined for non US-ASCII
- * characters. If the string contains only US-ASCII characters,
- * it is returned as-is. If the string contains non US-ASCII
- * characters, it is first character-encoded using the specified
- * charset, then transfer-encoded using either the B or Q encoding.
- * The resulting bytes are then returned as a Unicode string
- * containing only ASCII characters. <p>
- *
- * Note that this method should be used to encode only
- * "unstructured" RFC 822 headers.
- *
- * @param text the header value
- * @param charset the charset. If this parameter is null, the
- * platform's default chatset is used.
- * @param encoding the encoding to be used. Currently supported
- * values are "B" and "Q". If this parameter is null, then
- * the "Q" encoding is used if most of characters to be
- * encoded are in the ASCII charset, otherwise "B" encoding
- * is used.
- * @return Unicode string containing only US-ASCII characters
- */
- public static String encodeText(String text, String charset,
- String encoding)
- throws UnsupportedEncodingException {
- return encodeWord(text, charset, encoding, false);
- }
-
- /**
- * Decode "unstructured" headers, that is, headers that are defined
- * as '*text' as per RFC 822. <p>
- *
- * The string is decoded using the algorithm specified in
- * RFC 2047, Section 6.1.1. If the charset-conversion fails
- * for any sequence, an UnsupportedEncodingException is thrown.
- * If the String is not an RFC 2047 style encoded header, it is
- * returned as-is <p>
- *
- * Example of usage:
- * <p><blockquote><pre>
- *
- * MimeBodyPart part = ...
- * String rawvalue = null;
- * String value = null;
- * try {
- * if ((rawvalue = part.getHeader("X-mailer")[0]) != null)
- * value = MimeUtility.decodeText(rawvalue);
- * } catch (UnsupportedEncodingException e) {
- * // Don't care
- * value = rawvalue;
- * } catch (MessagingException me) { }
- *
- * return value;
- *
- * </pre></blockquote><p>
- *
- * @param etext the possibly encoded value
- * @exception UnsupportedEncodingException if the charset
- * conversion failed.
- */
- public static String decodeText(String etext)
- throws UnsupportedEncodingException {
- /*
- * We look for sequences separated by "linear-white-space".
- * (as per RFC 2047, Section 6.1.1)
- * RFC 822 defines "linear-white-space" as SPACE | HT | CR | NL.
- */
- String lwsp = " \t\n\r";
- StringTokenizer st;
-
- /*
- * First, lets do a quick run thru the string and check
- * whether the sequence "=?" exists at all. If none exists,
- * we know there are no encoded-words in here and we can just
- * return the string as-is, without suffering thru the later
- * decoding logic.
- * This handles the most common case of unencoded headers
- * efficiently.
- */
- if (etext.indexOf("=?") == -1)
- return etext;
-
- // Encoded words found. Start decoding ...
-
- st = new StringTokenizer(etext, lwsp, true);
- StringBuffer sb = new StringBuffer(); // decode buffer
- StringBuffer wsb = new StringBuffer(); // white space buffer
- boolean prevWasEncoded = false;
-
- while (st.hasMoreTokens()) {
- char c;
- String s = st.nextToken();
- // If whitespace, append it to the whitespace buffer
- if (((c = s.charAt(0)) == ' ') || (c == '\t') ||
- (c == '\r') || (c == '\n'))
- wsb.append(c);
- else {
- // Check if token is an 'encoded-word' ..
- String word;
- try {
- word = decodeWord(s);
- // Yes, this IS an 'encoded-word'.
- if (!prevWasEncoded && wsb.length() > 0) {
- // if the previous word was also encoded, we
- // should ignore the collected whitespace. Else
- // we include the whitespace as well.
- sb.append(wsb);
- }
- prevWasEncoded = true;
- } catch (ParseException pex) {
- // This is NOT an 'encoded-word'.
- word = s;
- // possibly decode inner encoded words
- if (!decodeStrict)
- word = decodeInnerWords(word);
- // include colleced whitespace ..
- if (wsb.length() > 0)
- sb.append(wsb);
- prevWasEncoded = false;
- }
- sb.append(word); // append the actual word
- wsb.setLength(0); // reset wsb for reuse
- }
- }
- return sb.toString();
- }
-
- /**
- * Encode a RFC 822 "word" token into mail-safe form as per
- * RFC 2047. <p>
- *
- * The given Unicode string is examined for non US-ASCII
- * characters. If the string contains only US-ASCII characters,
- * it is returned as-is. If the string contains non US-ASCII
- * characters, it is first character-encoded using the platform's
- * default charset, then transfer-encoded using either the B or
- * Q encoding. The resulting bytes are then returned as a Unicode
- * string containing only ASCII characters. <p>
- *
- * This method is meant to be used when creating RFC 822 "phrases".
- * The InternetAddress class, for example, uses this to encode
- * it's 'phrase' component.
- *
- * @param text unicode string
- * @return Array of Unicode strings containing only US-ASCII
- * characters.
- * @exception UnsupportedEncodingException if the encoding fails
- */
- public static String encodeWord(String word)
- throws UnsupportedEncodingException {
- return encodeWord(word, null, null);
- }
-
- /**
- * Encode a RFC 822 "word" token into mail-safe form as per
- * RFC 2047. <p>
- *
- * The given Unicode string is examined for non US-ASCII
- * characters. If the string contains only US-ASCII characters,
- * it is returned as-is. If the string contains non US-ASCII
- * characters, it is first character-encoded using the specified
- * charset, then transfer-encoded using either the B or Q encoding.
- * The resulting bytes are then returned as a Unicode string
- * containing only ASCII characters. <p>
- *
- * @param text unicode string
- * @param charset the MIME charset
- * @param encoding the encoding to be used. Currently supported
- * values are "B" and "Q". If this parameter is null, then
- * the "Q" encoding is used if most of characters to be
- * encoded are in the ASCII charset, otherwise "B" encoding
- * is used.
- * @return Unicode string containing only US-ASCII characters
- * @exception UnsupportedEncodingException if the encoding fails
- */
- public static String encodeWord(String word, String charset,
- String encoding)
- throws UnsupportedEncodingException {
- return encodeWord(word, charset, encoding, true);
- }
-
- /*
- * Encode the given string. The parameter 'encodingWord' should
- * be true if a RFC 822 "word" token is being encoded and false if a
- * RFC 822 "text" token is being encoded. This is because the
- * "Q" encoding defined in RFC 2047 has more restrictions when
- * encoding "word" tokens. (Sigh)
- */
- private static String encodeWord(String string, String charset,
- String encoding, boolean encodingWord)
- throws UnsupportedEncodingException {
-
- // If 'string' contains only US-ASCII characters, just
- // return it.
- int ascii = checkAscii(string);
- if (ascii == ALL_ASCII)
- return string;
-
- // Else, apply the specified charset conversion.
- String jcharset;
- if (charset == null) { // use default charset
- jcharset = getDefaultJavaCharset(); // the java charset
- charset = getDefaultMIMECharset(); // the MIME equivalent
- } else // MIME charset -> java charset
- jcharset = javaCharset(charset);
-
- // If no transfer-encoding is specified, figure one out.
- if (encoding == null) {
- if (ascii != MOSTLY_NONASCII)
- encoding = "Q";
- else
- encoding = "B";
- }
-
- boolean b64;
- if (encoding.equalsIgnoreCase("B"))
- b64 = true;
- else if (encoding.equalsIgnoreCase("Q"))
- b64 = false;
- else
- throw new UnsupportedEncodingException(
- "Unknown transfer encoding: " + encoding);
-
- StringBuffer outb = new StringBuffer(); // the output buffer
- doEncode(string, b64, jcharset,
- // As per RFC 2047, size of an encoded string should not
- // exceed 75 bytes.
- // 7 = size of "=?", '?', 'B'/'Q', '?', "?="
- 75 - 7 - charset.length(), // the available space
- "=?" + charset + "?" + encoding + "?", // prefix
- true, encodingWord, outb);
-
- return outb.toString();
- }
-
- private static void doEncode(String string, boolean b64,
- String jcharset, int avail, String prefix,
- boolean first, boolean encodingWord, StringBuffer buf)
- throws UnsupportedEncodingException {
-
- // First find out what the length of the encoded version of
- // 'string' would be.
- byte[] bytes = string.getBytes(jcharset);
- int len;
- if (b64) // "B" encoding
- len = BEncoderStream.encodedLength(bytes);
- else // "Q"
- len = QEncoderStream.encodedLength(bytes, encodingWord);
-
- int size;
- if ((len > avail) && ((size = string.length()) > 1)) {
- // If the length is greater than 'avail', split 'string'
- // into two and recurse.
- doEncode(string.substring(0, size/2), b64, jcharset,
- avail, prefix, first, encodingWord, buf);
- doEncode(string.substring(size/2, size), b64, jcharset,
- avail, prefix, false, encodingWord, buf);
- } else {
- // length <= than 'avail'. Encode the given string
- ByteArrayOutputStream os = new ByteArrayOutputStream(BUFFER_SIZE);
- OutputStream eos; // the encoder
- if (b64) // "B" encoding
- eos = new BEncoderStream(os);
- else // "Q" encoding
- eos = new QEncoderStream(os, encodingWord);
-
- try { // do the encoding
- eos.write(bytes);
- eos.close();
- } catch (IOException ioex) { }
-
- byte[] encodedBytes = os.toByteArray(); // the encoded stuff
- // Now write out the encoded (all ASCII) bytes into our
- // StringBuffer
- if (!first) // not the first line of this sequence
- if (foldEncodedWords)
- buf.append("\r\n "); // start a continuation line
- else
- buf.append(" "); // line will be folded later
-
- buf.append(prefix);
- for (int i = 0; i < encodedBytes.length; i++)
- buf.append((char)encodedBytes[i]);
- buf.append("?="); // terminate the current sequence
- }
- }
-
- /**
- * The string is parsed using the rules in RFC 2047 for parsing
- * an "encoded-word". If the parse fails, a ParseException is
- * thrown. Otherwise, it is transfer-decoded, and then
- * charset-converted into Unicode. If the charset-conversion
- * fails, an UnsupportedEncodingException is thrown.<p>
- *
- * @param eword the possibly encoded value
- * @exception ParseException if the string is not an
- * encoded-word as per RFC 2047.
- * @exception UnsupportedEncodingException if the charset
- * conversion failed.
- */
- public static String decodeWord(String eword)
- throws ParseException, UnsupportedEncodingException {
-
- if (!eword.startsWith("=?")) // not an encoded word
- throw new ParseException();
-
- // get charset
- int start = 2; int pos;
- if ((pos = eword.indexOf('?', start)) == -1)
- throw new ParseException();
- String charset = javaCharset(eword.substring(start, pos));
-
- // get encoding
- start = pos+1;
- if ((pos = eword.indexOf('?', start)) == -1)
- throw new ParseException();
- String encoding = eword.substring(start, pos);
-
- // get encoded-sequence
- start = pos+1;
- if ((pos = eword.indexOf("?=", start)) == -1)
- throw new ParseException();
- String word = eword.substring(start, pos);
-
- try {
- // Extract the bytes from word
- ByteArrayInputStream bis =
- new ByteArrayInputStream(ASCIIUtility.getBytes(word));
-
- // Get the appropriate decoder
- InputStream is;
- if (encoding.equalsIgnoreCase("B"))
- is = new BASE64DecoderStream(bis);
- else if (encoding.equalsIgnoreCase("Q"))
- is = new QDecoderStream(bis);
- else
- throw new UnsupportedEncodingException(
- "unknown encoding: " + encoding);
-
- // For b64 & q, size of decoded word <= size of word. So
- // the decoded bytes must fit into the 'bytes' array. This
- // is certainly more efficient than writing bytes into a
- // ByteArrayOutputStream and then pulling out the byte[]
- // from it.
- int count = bis.available();
- byte[] bytes = new byte[count];
- // count is set to the actual number of decoded bytes
- count = is.read(bytes, 0, count);
-
- // Finally, convert the decoded bytes into a String using
- // the specified charset
- String s = new String(bytes, 0, count, charset);
- if (pos + 2 < eword.length()) {
- // there's still more text in the string
- String rest = eword.substring(pos + 2);
- if (!decodeStrict)
- rest = decodeInnerWords(rest);
- s += rest;
- }
- return s;
- } catch (UnsupportedEncodingException uex) {
- // explicitly catch and rethrow this exception, otherwise
- // the below IOException catch will swallow this up!
- throw uex;
- } catch (IOException ioex) {
- // Shouldn't happen.
- throw new ParseException();
- } catch (IllegalArgumentException iex) {
- /* An unknown charset of the form ISO-XXX-XXX, will cause
- * the JDK to throw an IllegalArgumentException ... Since the
- * JDK will attempt to create a classname using this string,
- * but valid classnames must not contain the character '-',
- * and this results in an IllegalArgumentException, rather than
- * the expected UnsupportedEncodingException. Yikes
- */
- throw new UnsupportedEncodingException();
- }
- }
-
- /**
- * Look for encoded words within a word. The MIME spec doesn't
- * allow this, but many broken mailers, especially Japanese mailers,
- * produce such incorrect encodings.
- */
- private static String decodeInnerWords(String word)
- throws UnsupportedEncodingException {
- int start = 0, i;
- StringBuffer buf = new StringBuffer();
- while ((i = word.indexOf("=?", start)) >= 0) {
- buf.append(word.substring(start, i));
- int end = word.indexOf("?=", i);
- if (end < 0)
- break;
- String s = word.substring(i, end + 2);
- try {
- s = decodeWord(s);
- } catch (ParseException pex) {
- // ignore it, just use the original string
- }
- buf.append(s);
- start = end + 2;
- }
- if (start == 0)
- return word;
- if (start < word.length())
- buf.append(word.substring(start));
- return buf.toString();
- }
-
- /**
- * A utility method to quote a word, if the word contains any
- * characters from the specified 'specials' list.<p>
- *
- * The <code>HeaderTokenizer</code> class defines two special
- * sets of delimiters - MIME and RFC 822. <p>
- *
- * This method is typically used during the generation of
- * RFC 822 and MIME header fields.
- *
- * @param word word to be quoted
- * @param specials the set of special characters
- * @return the possibly quoted word
- * @see javax.mail.internet.HeaderTokenizer#MIME
- * @see javax.mail.internet.HeaderTokenizer#RFC822
- */
- public static String quote(String word, String specials) {
- int len = word.length();
-
- /*
- * Look for any "bad" characters, Escape and
- * quote the entire string if necessary.
- */
- boolean needQuoting = false;
- for (int i = 0; i < len; i++) {
- char c = word.charAt(i);
- if (c == '"' || c == '\\' || c == '\r' || c == '\n') {
- // need to escape them and then quote the whole string
- StringBuffer sb = new StringBuffer(len + 3);
- sb.append('"');
- sb.append(word.substring(0, i));
- int lastc = 0;
- for (int j = i; j < len; j++) {
- char cc = word.charAt(j);
- if ((cc == '"') || (cc == '\\') ||
- (cc == '\r') || (cc == '\n'))
- if (cc == '\n' && lastc == '\r')
- ; // do nothing, CR was already escaped
- else
- sb.append('\\'); // Escape the character
- sb.append(cc);
- lastc = cc;
- }
- sb.append('"');
- return sb.toString();
- } else if (c < 040 || c >= 0177 || specials.indexOf(c) >= 0)
- // These characters cause the string to be quoted
- needQuoting = true;
- }
-
- if (needQuoting) {
- StringBuffer sb = new StringBuffer(len + 2);
- sb.append('"').append(word).append('"');
- return sb.toString();
- } else
- return word;
- }
-
- /**
- * Fold a string at linear whitespace so that each line is no longer
- * than 76 characters, if possible. If there are more than 76
- * non-whitespace characters consecutively, the string is folded at
- * the first whitespace after that sequence. The parameter
- * <code>used</code> indicates how many characters have been used in
- * the current line; it is usually the length of the header name. <p>
- *
- * Note that line breaks in the string aren't escaped; they probably
- * should be.
- *
- * @param used characters used in line so far
- * @param s the string to fold
- * @return the folded string
- */
- /*public*/ static String fold(int used, String s) {
- if (!foldText)
- return s;
-
- int end;
- char c;
- // Strip trailing spaces
- for (end = s.length() - 1; end >= 0; end--) {
- c = s.charAt(end);
- if (c != ' ' && c != '\t')
- break;
- }
- if (end != s.length() - 1)
- s = s.substring(0, end + 1);
-
- // if the string fits now, just return it
- if (used + s.length() <= 76)
- return s;
-
- // have to actually fold the string
- StringBuffer sb = new StringBuffer(s.length() + 4);
- char lastc = 0;
- while (used + s.length() > 76) {
- int lastspace = -1;
- for (int i = 0; i < s.length(); i++) {
- if (lastspace != -1 && used + i > 76)
- break;
- c = s.charAt(i);
- if (c == ' ' || c == '\t')
- if (!(lastc == ' ' || lastc == '\t'))
- lastspace = i;
- lastc = c;
- }
- if (lastspace == -1) {
- // no space, use the whole thing
- sb.append(s);
- s = "";
- used = 0;
- break;
- }
- sb.append(s.substring(0, lastspace));
- sb.append("\r\n");
- lastc = s.charAt(lastspace);
- sb.append(lastc);
- s = s.substring(lastspace + 1);
- used = 1;
- }
- sb.append(s);
- return sb.toString();
- }
-
- /**
- * Unfold a folded header. Any line breaks that aren't escaped and
- * are followed by whitespace are removed.
- *
- * @param s the string to unfold
- * @return the unfolded string
- */
- /*public*/ static String unfold(String s) {
- if (!foldText)
- return s;
-
- StringBuffer sb = null;
- int i;
- while ((i = indexOfAny(s, "\r\n")) >= 0) {
- int start = i;
- int l = s.length();
- i++; // skip CR or NL
- if (i < l && s.charAt(i - 1) == '\r' && s.charAt(i) == '\n')
- i++; // skip LF
- if (start == 0 || s.charAt(start - 1) != '\\') {
- char c;
- // if next line starts with whitespace, skip all of it
- // XXX - always has to be true?
- if (i < l && ((c = s.charAt(i)) == ' ' || c == '\t')) {
- i++; // skip whitespace
- while (i < l && ((c = s.charAt(i)) == ' ' || c == '\t'))
- i++;
- if (sb == null)
- sb = new StringBuffer(s.length());
- if (start != 0) {
- sb.append(s.substring(0, start));
- sb.append(' ');
- }
- s = s.substring(i);
- continue;
- }
- // it's not a continuation line, just leave it in
- if (sb == null)
- sb = new StringBuffer(s.length());
- sb.append(s.substring(0, i));
- s = s.substring(i);
- } else {
- // there's a backslash at "start - 1"
- // strip it out, but leave in the line break
- if (sb == null)
- sb = new StringBuffer(s.length());
- sb.append(s.substring(0, start - 1));
- sb.append(s.substring(start, i));
- s = s.substring(i);
- }
- }
- if (sb != null) {
- sb.append(s);
- return sb.toString();
- } else
- return s;
- }
-
- /**
- * Return the first index of any of the characters in "any" in "s",
- * or -1 if none are found.
- *
- * This should be a method on String.
- */
- private static int indexOfAny(String s, String any) {
- return indexOfAny(s, any, 0);
- }
-
- private static int indexOfAny(String s, String any, int start) {
- try {
- int len = s.length();
- for (int i = start; i < len; i++) {
- if (any.indexOf(s.charAt(i)) >= 0)
- return i;
- }
- return -1;
- } catch (StringIndexOutOfBoundsException e) {
- return -1;
- }
- }
-
- /**
- * Convert a MIME charset name into a valid Java charset name. <p>
- *
- * @param charset the MIME charset name
- * @return the Java charset equivalent. If a suitable mapping is
- * not available, the passed in charset is itself returned.
- */
- public static String javaCharset(String charset) {
- if (mime2java == null || charset == null)
- // no mapping table, or charset parameter is null
- return charset;
-
- String alias = (String)mime2java.get(charset.toLowerCase());
- return alias == null ? charset : alias;
- }
-
- /**
- * Convert a java charset into its MIME charset name. <p>
- *
- * Note that a future version of JDK (post 1.2) might provide
- * this functionality, in which case, we may deprecate this
- * method then.
- *
- * @param charset the JDK charset
- * @return the MIME/IANA equivalent. If a mapping
- * is not possible, the passed in charset itself
- * is returned.
- * @since JavaMail 1.1
- */
- public static String mimeCharset(String charset) {
- if (java2mime == null || charset == null)
- // no mapping table or charset param is null
- return charset;
-
- String alias = (String)java2mime.get(charset.toLowerCase());
- return alias == null ? charset : alias;
- }
-
- private static String defaultJavaCharset;
- private static String defaultMIMECharset;
-
- /**
- * Get the default charset corresponding to the system's current
- * default locale. If the System property <code>mail.mime.charset</code>
- * is set, a system charset corresponding to this MIME charset will be
- * returned. <p>
- *
- * @return the default charset of the system's default locale,
- * as a Java charset. (NOT a MIME charset)
- * @since JavaMail 1.1
- */
- public static String getDefaultJavaCharset() {
- if (defaultJavaCharset == null) {
- /*
- * If mail.mime.charset is set, it controls the default
- * Java charset as well.
- */
- String mimecs = null;
-
- mimecs = SAAJUtil.getSystemProperty("mail.mime.charset");
-
- if (mimecs != null && mimecs.length() > 0) {
- defaultJavaCharset = javaCharset(mimecs);
- return defaultJavaCharset;
- }
-
- try {
- defaultJavaCharset = System.getProperty("file.encoding",
- "8859_1");
- } catch (SecurityException sex) {
-
- class NullInputStream extends InputStream {
- public int read() {
- return 0;
- }
- }
- InputStreamReader reader =
- new InputStreamReader(new NullInputStream());
- defaultJavaCharset = reader.getEncoding();
- if (defaultJavaCharset == null)
- defaultJavaCharset = "8859_1";
- }
- }
-
- return defaultJavaCharset;
- }
-
- /*
- * Get the default MIME charset for this locale.
- */
- static String getDefaultMIMECharset() {
- if (defaultMIMECharset == null) {
- defaultMIMECharset = SAAJUtil.getSystemProperty("mail.mime.charset");
- }
- if (defaultMIMECharset == null)
- defaultMIMECharset = mimeCharset(getDefaultJavaCharset());
- return defaultMIMECharset;
- }
-
- // Tables to map MIME charset names to Java names and vice versa.
- // XXX - Should eventually use J2SE 1.4 java.nio.charset.Charset
- private static Hashtable mime2java;
- private static Hashtable java2mime;
-
- static {
- java2mime = new Hashtable(40);
- mime2java = new Hashtable(10);
-
- try {
- // Use this class's classloader to load the mapping file
- // XXX - we should use SecuritySupport, but it's in another package
- InputStream is =
- com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeUtility.class.getResourceAsStream(
- "/META-INF/javamail.charset.map");
-
- if (is != null) {
- is = new LineInputStream(is);
-
- // Load the JDK-to-MIME charset mapping table
- loadMappings((LineInputStream)is, java2mime);
-
- // Load the MIME-to-JDK charset mapping table
- loadMappings((LineInputStream)is, mime2java);
- }
- } catch (Exception ex) { }
-
- // If we didn't load the tables, e.g., because we didn't have
- // permission, load them manually. The entries here should be
- // the same as the default javamail.charset.map.
- if (java2mime.isEmpty()) {
- java2mime.put("8859_1", "ISO-8859-1");
- java2mime.put("iso8859_1", "ISO-8859-1");
- java2mime.put("ISO8859-1", "ISO-8859-1");
-
- java2mime.put("8859_2", "ISO-8859-2");
- java2mime.put("iso8859_2", "ISO-8859-2");
- java2mime.put("ISO8859-2", "ISO-8859-2");
-
- java2mime.put("8859_3", "ISO-8859-3");
- java2mime.put("iso8859_3", "ISO-8859-3");
- java2mime.put("ISO8859-3", "ISO-8859-3");
-
- java2mime.put("8859_4", "ISO-8859-4");
- java2mime.put("iso8859_4", "ISO-8859-4");
- java2mime.put("ISO8859-4", "ISO-8859-4");
-
- java2mime.put("8859_5", "ISO-8859-5");
- java2mime.put("iso8859_5", "ISO-8859-5");
- java2mime.put("ISO8859-5", "ISO-8859-5");
-
- java2mime.put("8859_6", "ISO-8859-6");
- java2mime.put("iso8859_6", "ISO-8859-6");
- java2mime.put("ISO8859-6", "ISO-8859-6");
-
- java2mime.put("8859_7", "ISO-8859-7");
- java2mime.put("iso8859_7", "ISO-8859-7");
- java2mime.put("ISO8859-7", "ISO-8859-7");
-
- java2mime.put("8859_8", "ISO-8859-8");
- java2mime.put("iso8859_8", "ISO-8859-8");
- java2mime.put("ISO8859-8", "ISO-8859-8");
-
- java2mime.put("8859_9", "ISO-8859-9");
- java2mime.put("iso8859_9", "ISO-8859-9");
- java2mime.put("ISO8859-9", "ISO-8859-9");
-
- java2mime.put("SJIS", "Shift_JIS");
- java2mime.put("MS932", "Shift_JIS");
- java2mime.put("JIS", "ISO-2022-JP");
- java2mime.put("ISO2022JP", "ISO-2022-JP");
- java2mime.put("EUC_JP", "euc-jp");
- java2mime.put("KOI8_R", "koi8-r");
- java2mime.put("EUC_CN", "euc-cn");
- java2mime.put("EUC_TW", "euc-tw");
- java2mime.put("EUC_KR", "euc-kr");
- }
- if (mime2java.isEmpty()) {
- mime2java.put("iso-2022-cn", "ISO2022CN");
- mime2java.put("iso-2022-kr", "ISO2022KR");
- mime2java.put("utf-8", "UTF8");
- mime2java.put("utf8", "UTF8");
- mime2java.put("ja_jp.iso2022-7", "ISO2022JP");
- mime2java.put("ja_jp.eucjp", "EUCJIS");
- mime2java.put("euc-kr", "KSC5601");
- mime2java.put("euckr", "KSC5601");
- mime2java.put("us-ascii", "ISO-8859-1");
- mime2java.put("x-us-ascii", "ISO-8859-1");
- }
- }
-
- private static void loadMappings(LineInputStream is, Hashtable table) {
- String currLine;
-
- while (true) {
- try {
- currLine = is.readLine();
- } catch (IOException ioex) {
- break; // error in reading, stop
- }
-
- if (currLine == null) // end of file, stop
- break;
- if (currLine.startsWith("--") && currLine.endsWith("--"))
- // end of this table
- break;
-
- // ignore empty lines and comments
- if (currLine.trim().length() == 0 || currLine.startsWith("#"))
- continue;
-
- // A valid entry is of the form <key><separator><value>
- // where, <separator> := SPACE | HT. Parse this
- StringTokenizer tk = new StringTokenizer(currLine, " \t");
- try {
- String key = tk.nextToken();
- String value = tk.nextToken();
- table.put(key.toLowerCase(), value);
- } catch (NoSuchElementException nex) { }
- }
- }
-
- static final int ALL_ASCII = 1;
- static final int MOSTLY_ASCII = 2;
- static final int MOSTLY_NONASCII = 3;
-
- /**
- * Check if the given string contains non US-ASCII characters.
- * @param s string
- * @return ALL_ASCII if all characters in the string
- * belong to the US-ASCII charset. MOSTLY_ASCII
- * if more than half of the available characters
- * are US-ASCII characters. Else MOSTLY_NONASCII.
- */
- static int checkAscii(String s) {
- int ascii = 0, non_ascii = 0;
- int l = s.length();
-
- for (int i = 0; i < l; i++) {
- if (nonascii((int)s.charAt(i))) // non-ascii
- non_ascii++;
- else
- ascii++;
- }
-
- if (non_ascii == 0)
- return ALL_ASCII;
- if (ascii > non_ascii)
- return MOSTLY_ASCII;
-
- return MOSTLY_NONASCII;
- }
-
- /**
- * Check if the given byte array contains non US-ASCII characters.
- * @param b byte array
- * @return ALL_ASCII if all characters in the string
- * belong to the US-ASCII charset. MOSTLY_ASCII
- * if more than half of the available characters
- * are US-ASCII characters. Else MOSTLY_NONASCII.
- *
- * XXX - this method is no longer used
- */
- static int checkAscii(byte[] b) {
- int ascii = 0, non_ascii = 0;
-
- for (int i=0; i < b.length; i++) {
- // The '&' operator automatically causes b[i] to be promoted
- // to an int, and we mask out the higher bytes in the int
- // so that the resulting value is not a negative integer.
- if (nonascii(b[i] & 0xff)) // non-ascii
- non_ascii++;
- else
- ascii++;
- }
-
- if (non_ascii == 0)
- return ALL_ASCII;
- if (ascii > non_ascii)
- return MOSTLY_ASCII;
-
- return MOSTLY_NONASCII;
- }
-
- /**
- * Check if the given input stream contains non US-ASCII characters.
- * Upto <code>max</code> bytes are checked. If <code>max</code> is
- * set to <code>ALL</code>, then all the bytes available in this
- * input stream are checked. If <code>breakOnNonAscii</code> is true
- * the check terminates when the first non-US-ASCII character is
- * found and MOSTLY_NONASCII is returned. Else, the check continues
- * till <code>max</code> bytes or till the end of stream.
- *
- * @param is the input stream
- * @param max maximum bytes to check for. The special value
- * ALL indicates that all the bytes in this input
- * stream must be checked.
- * @param breakOnNonAscii if <code>true</code>, then terminate the
- * the check when the first non-US-ASCII character
- * is found.
- * @return ALL_ASCII if all characters in the string
- * belong to the US-ASCII charset. MOSTLY_ASCII
- * if more than half of the available characters
- * are US-ASCII characters. Else MOSTLY_NONASCII.
- */
- static int checkAscii(InputStream is, int max, boolean breakOnNonAscii) {
- int ascii = 0, non_ascii = 0;
- int len;
- int block = 4096;
- int linelen = 0;
- boolean longLine = false, badEOL = false;
- boolean checkEOL = encodeEolStrict && breakOnNonAscii;
- byte buf[] = null;
- if (max != 0) {
- block = (max == ALL) ? 4096 : Math.min(max, 4096);
- buf = new byte[block];
- }
- while (max != 0) {
- try {
- if ((len = is.read(buf, 0, block)) == -1)
- break;
- int lastb = 0;
- for (int i = 0; i < len; i++) {
- // The '&' operator automatically causes b[i] to
- // be promoted to an int, and we mask out the higher
- // bytes in the int so that the resulting value is
- // not a negative integer.
- int b = buf[i] & 0xff;
- if (checkEOL &&
- ((lastb == '\r' && b != '\n') ||
- (lastb != '\r' && b == '\n')))
- badEOL = true;
- if (b == '\r' || b == '\n')
- linelen = 0;
- else {
- linelen++;
- if (linelen > 998) // 1000 - CRLF
- longLine = true;
- }
- if (nonascii(b)) { // non-ascii
- if (breakOnNonAscii) // we are done
- return MOSTLY_NONASCII;
- else
- non_ascii++;
- } else
- ascii++;
- lastb = b;
- }
- } catch (IOException ioex) {
- break;
- }
- if (max != ALL)
- max -= len;
- }
-
- if (max == 0 && breakOnNonAscii)
- // We have been told to break on the first non-ascii character.
- // We haven't got any non-ascii character yet, but then we
- // have not checked all of the available bytes either. So we
- // cannot say for sure that this input stream is ALL_ASCII,
- // and hence we must play safe and return MOSTLY_NONASCII
-
- return MOSTLY_NONASCII;
-
- if (non_ascii == 0) { // no non-us-ascii characters so far
- // If we're looking at non-text data, and we saw CR without LF
- // or vice versa, consider this mostly non-ASCII so that it
- // will be base64 encoded (since the quoted-printable encoder
- // doesn't encode this case properly).
- if (badEOL)
- return MOSTLY_NONASCII;
- // if we've seen a long line, we degrade to mostly ascii
- else if (longLine)
- return MOSTLY_ASCII;
- else
- return ALL_ASCII;
- }
- if (ascii > non_ascii) // mostly ascii
- return MOSTLY_ASCII;
- return MOSTLY_NONASCII;
- }
-
- static final boolean nonascii(int b) {
- return b >= 0177 || (b < 040 && b != '\r' && b != '\n' && b != '\t');
- }
-}
-
-/**
- * An OutputStream that determines whether the data written to
- * it is all ASCII, mostly ASCII, or mostly non-ASCII.
- */
-class AsciiOutputStream extends OutputStream {
- private boolean breakOnNonAscii;
- private int ascii = 0, non_ascii = 0;
- private int linelen = 0;
- private boolean longLine = false;
- private boolean badEOL = false;
- private boolean checkEOL = false;
- private int lastb = 0;
- private int ret = 0;
-
- public AsciiOutputStream(boolean breakOnNonAscii, boolean encodeEolStrict) {
- this.breakOnNonAscii = breakOnNonAscii;
- checkEOL = encodeEolStrict && breakOnNonAscii;
- }
-
- public void write(int b) throws IOException {
- check(b);
- }
-
- public void write(byte b[]) throws IOException {
- write(b, 0, b.length);
- }
-
- public void write(byte b[], int off, int len) throws IOException {
- len += off;
- for (int i = off; i < len ; i++)
- check(b[i]);
- }
-
- private final void check(int b) throws IOException {
- b &= 0xff;
- if (checkEOL &&
- ((lastb == '\r' && b != '\n') || (lastb != '\r' && b == '\n')))
- badEOL = true;
- if (b == '\r' || b == '\n')
- linelen = 0;
- else {
- linelen++;
- if (linelen > 998) // 1000 - CRLF
- longLine = true;
- }
- if (MimeUtility.nonascii(b)) { // non-ascii
- non_ascii++;
- if (breakOnNonAscii) { // we are done
- ret = MimeUtility.MOSTLY_NONASCII;
- throw new EOFException();
- }
- } else
- ascii++;
- lastb = b;
- }
-
- /**
- * Return ASCII-ness of data stream.
- */
- public int getAscii() {
- if (ret != 0)
- return ret;
- // If we're looking at non-text data, and we saw CR without LF
- // or vice versa, consider this mostly non-ASCII so that it
- // will be base64 encoded (since the quoted-printable encoder
- // doesn't encode this case properly).
- if (badEOL)
- return MimeUtility.MOSTLY_NONASCII;
- else if (non_ascii == 0) { // no non-us-ascii characters so far
- // if we've seen a long line, we degrade to mostly ascii
- if (longLine)
- return MimeUtility.MOSTLY_ASCII;
- else
- return MimeUtility.ALL_ASCII;
- }
- if (ascii > non_ascii) // mostly ascii
- return MimeUtility.MOSTLY_ASCII;
- return MimeUtility.MOSTLY_NONASCII;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java
deleted file mode 100644
index c18d3860..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)ParameterList.java 1.10 03/02/12
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * This class holds MIME parameters (attribute-value pairs).
- *
- * @version 1.10, 03/02/12
- * @author John Mani
- */
-
-public final class ParameterList {
-
- private final HashMap list;
-
- /**
- * No-arg Constructor.
- */
- public ParameterList() {
- this.list = new HashMap();
- }
-
- private ParameterList(HashMap m) {
- this.list = m;
- }
-
- /**
- * Constructor that takes a parameter-list string. The String
- * is parsed and the parameters are collected and stored internally.
- * A ParseException is thrown if the parse fails.
- * Note that an empty parameter-list string is valid and will be
- * parsed into an empty ParameterList.
- *
- * @param s the parameter-list string.
- * @exception ParseException if the parse fails.
- */
- public ParameterList(String s) throws ParseException {
- HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
- HeaderTokenizer.Token tk;
- int type;
- String name;
-
- list = new HashMap();
- while (true) {
- tk = h.next();
- type = tk.getType();
-
- if (type == HeaderTokenizer.Token.EOF) // done
- return;
-
- if ((char)type == ';') {
- // expect parameter name
- tk = h.next();
- // tolerate trailing semicolon, even though it violates the spec
- if (tk.getType() == HeaderTokenizer.Token.EOF)
- return;
- // parameter name must be a MIME Atom
- if (tk.getType() != HeaderTokenizer.Token.ATOM)
- throw new ParseException();
- name = tk.getValue().toLowerCase();
-
- // expect '='
- tk = h.next();
- if ((char)tk.getType() != '=')
- throw new ParseException();
-
- // expect parameter value
- tk = h.next();
- type = tk.getType();
- // parameter value must be a MIME Atom or Quoted String
- if (type != HeaderTokenizer.Token.ATOM &&
- type != HeaderTokenizer.Token.QUOTEDSTRING)
- throw new ParseException();
-
- list.put(name, tk.getValue());
- } else
- throw new ParseException();
- }
- }
-
- /**
- * Return the number of parameters in this list.
- *
- * @return number of parameters.
- */
- public int size() {
- return list.size();
- }
-
- /**
- * Returns the value of the specified parameter. Note that
- * parameter names are case-insensitive.
- *
- * @param name parameter name.
- * @return Value of the parameter. Returns
- * <code>null</code> if the parameter is not
- * present.
- */
- public String get(String name) {
- return (String)list.get(name.trim().toLowerCase());
- }
-
- /**
- * Set a parameter. If this parameter already exists, it is
- * replaced by this new value.
- *
- * @param name name of the parameter.
- * @param value value of the parameter.
- */
- public void set(String name, String value) {
- list.put(name.trim().toLowerCase(), value);
- }
-
- /**
- * Removes the specified parameter from this ParameterList.
- * This method does nothing if the parameter is not present.
- *
- * @param name name of the parameter.
- */
- public void remove(String name) {
- list.remove(name.trim().toLowerCase());
- }
-
- /**
- * Return an enumeration of the names of all parameters in this
- * list.
- *
- * @return Enumeration of all parameter names in this list.
- */
- public Iterator getNames() {
- return list.keySet().iterator();
- }
-
-
- /**
- * Convert this ParameterList into a MIME String. If this is
- * an empty list, an empty string is returned.
- *
- * @return String
- */
- public String toString() {
- return toString(0);
- }
-
- /**
- * Convert this ParameterList into a MIME String. If this is
- * an empty list, an empty string is returned.
- *
- * The 'used' parameter specifies the number of character positions
- * already taken up in the field into which the resulting parameter
- * list is to be inserted. It's used to determine where to fold the
- * resulting parameter list.
- *
- * @param used number of character positions already used, in
- * the field into which the parameter list is to
- * be inserted.
- * @return String
- */
- public String toString(int used) {
- StringBuffer sb = new StringBuffer();
- Iterator itr = list.entrySet().iterator();
-
- while (itr.hasNext()) {
- Map.Entry e = (Map.Entry)itr.next();
- String name = (String)e.getKey();
- String value = quote((String)e.getValue());
- sb.append("; ");
- used += 2;
- int len = name.length() + value.length() + 1;
- if (used + len > 76) { // overflows ...
- sb.append("\r\n\t"); // .. start new continuation line
- used = 8; // account for the starting <tab> char
- }
- sb.append(name).append('=');
- used += name.length() + 1;
- if (used + value.length() > 76) { // still overflows ...
- // have to fold value
- String s = MimeUtility.fold(used, value);
- sb.append(s);
- int lastlf = s.lastIndexOf('\n');
- if (lastlf >= 0) // always true
- used += s.length() - lastlf - 1;
- else
- used += s.length();
- } else {
- sb.append(value);
- used += value.length();
- }
- }
-
- return sb.toString();
- }
-
- // Quote a parameter value token if required.
- private String quote(String value) {
- if ("".equals(value))
- return "\"\"";
- return MimeUtility.quote(value, HeaderTokenizer.MIME);
- }
-
- public ParameterList copy() {
- return new ParameterList((HashMap)list.clone());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParseException.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParseException.java
deleted file mode 100644
index 4e75d25b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParseException.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)ParseException.java 1.3 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-
-/**
- * The exception thrown due to an error in parsing RFC822
- * or MIME headers
- *
- * @author John Mani
- */
-
-public class ParseException extends MessagingException {
-
- /**
- * Constructs a ParseException with no detail message.
- */
- public ParseException() {
- super();
- }
-
- /**
- * Constructs a ParseException with the specified detail message.
- * @param s the detail message
- */
- public ParseException(String s) {
- super(s);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java
deleted file mode 100644
index 4af231c5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/SharedInputStream.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)SharedInputStream.java 1.2 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-// SAAJ doesn't utilize this, but I think it should.
-/**
- * An InputStream that is backed by data that can be shared by multiple
- * readers may implement this interface. This allows users of such an
- * InputStream to determine the current positionin the InputStream, and
- * to create new InputStreams representing a subset of the data in the
- * original InputStream. The new InputStream will access the same
- * underlying data as the original, without copying the data.
- *
- * @version 1.2, 02/03/27
- * @author Bill Shannon
- * @since JavaMail 1.2
- */
-
-public interface SharedInputStream {
- /**
- * Return the current position in the InputStream, as an
- * offset from the beginning of the InputStream.
- *
- * @return the current position
- */
- public long getPosition();
-
- /**
- * Return a new InputStream representing a subset of the data
- * from this InputStream, starting at <code>start</code> (inclusive)
- * up to <code>end</code> (exclusive). <code>start</code> must be
- * non-negative. If <code>end</code> is -1, the new stream ends
- * at the same place as this stream. The returned InputStream
- * will also implement the SharedInputStream interface.
- *
- * @param start the starting position
- * @param end the ending position + 1
- * @return the new stream
- */
- public InputStream newStream(long start, long end);
-
- /**
- * Writes the specified region to another {@link OutputStream}.
- */
- public void writeTo(long start,long end, OutputStream out);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java
deleted file mode 100644
index 451a086e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)UniqueValue.java 1.6 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-
-/**
- * This is a utility class that generates unique values. The generated
- * String contains only US-ASCII characters and hence is safe for use
- * in RFC822 headers. <p>
- *
- * This is a package private class.
- *
- * @author John Mani
- * @author Max Spivak
- * @author Bill Shannon
- */
-
-class UniqueValue {
- /**
- * A global part number. Access is not synchronized because the
- * value is only one part of the unique value and so doesn't need
- * to be accurate.
- */
- private static int part = 0;
-
- /**
- * Get a unique value for use in a multipart boundary string.
- *
- * This implementation generates it by concatenating a global
- * part number, a newly created object's <code>hashCode()</code>,
- * and the current time (in milliseconds).
- */
- public static String getUniqueBoundaryValue() {
- StringBuffer s = new StringBuffer();
-
- // Unique string is ----=_Part_<part>_<hashcode>.<currentTime>
- s.append("----=_Part_").append(part++).append("_").
- append(s.hashCode()).append('.').
- append(System.currentTimeMillis());
- return s.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java
deleted file mode 100644
index e2d21a9b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/ASCIIUtility.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)ASCIIUtility.java 1.9 02/03/27
- */
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
-
-import java.io.*;
-
-public class ASCIIUtility {
-
- // Private constructor so that this class is not instantiated
- private ASCIIUtility() { }
-
-
- /**
- * Convert the bytes within the specified range of the given byte
- * array into a signed integer in the given radix . The range extends
- * from <code>start</code> till, but not including <code>end</code>. <p>
- *
- * Based on java.lang.Integer.parseInt()
- */
- public static int parseInt(byte[] b, int start, int end, int radix)
- throws NumberFormatException {
- if (b == null)
- throw new NumberFormatException("null");
-
- int result = 0;
- boolean negative = false;
- int i = start;
- int limit;
- int multmin;
- int digit;
-
- if (end > start) {
- if (b[i] == '-') {
- negative = true;
- limit = Integer.MIN_VALUE;
- i++;
- } else {
- limit = -Integer.MAX_VALUE;
- }
- multmin = limit / radix;
- if (i < end) {
- digit = Character.digit((char)b[i++], radix);
- if (digit < 0) {
- throw new NumberFormatException(
- "illegal number: " + toString(b, start, end)
- );
- } else {
- result = -digit;
- }
- }
- while (i < end) {
- // Accumulating negatively avoids surprises near MAX_VALUE
- digit = Character.digit((char)b[i++], radix);
- if (digit < 0) {
- throw new NumberFormatException("illegal number");
- }
- if (result < multmin) {
- throw new NumberFormatException("illegal number");
- }
- result *= radix;
- if (result < limit + digit) {
- throw new NumberFormatException("illegal number");
- }
- result -= digit;
- }
- } else {
- throw new NumberFormatException("illegal number");
- }
- if (negative) {
- if (i > start + 1) {
- return result;
- } else { /* Only got "-" */
- throw new NumberFormatException("illegal number");
- }
- } else {
- return -result;
- }
- }
-
- /**
- * Convert the bytes within the specified range of the given byte
- * array into a String. The range extends from <code>start</code>
- * till, but not including <code>end</code>. <p>
- */
- public static String toString(byte[] b, int start, int end) {
- int size = end - start;
- char[] theChars = new char[size];
-
- for (int i = 0, j = start; i < size; )
- theChars[i++] = (char)(b[j++]&0xff);
-
- return new String(theChars);
- }
-
- public static byte[] getBytes(String s) {
- char [] chars= s.toCharArray();
- int size = chars.length;
- byte[] bytes = new byte[size];
-
- for (int i = 0; i < size;)
- bytes[i] = (byte) chars[i++];
- return bytes;
- }
-
- /**
- *
- * @deprecated
- * this is an expensive operation that require an additional
- * buffer reallocation just to get the array of an exact size.
- * Unless you absolutely need the exact size array, don't use this.
- * Use {@link ByteOutputStream} and {@link ByteOutputStream#write(InputStream)}.
- */
- public static byte[] getBytes(InputStream is) throws IOException {
- ByteOutputStream bos = new ByteOutputStream();
- try {
- bos.write(is);
- } finally {
- is.close();
- }
- return bos.toByteArray();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java
deleted file mode 100644
index 1aae5810..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)BASE64DecoderStream.java 1.8 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.*;
-
-/**
- * This class implements a BASE64 Decoder. It is implemented as
- * a FilterInputStream, so one can just wrap this class around
- * any input stream and read bytes from this filter. The decoding
- * is done as the bytes are read out.
- *
- * @author John Mani
- * @author Bill Shannon
- */
-
-public class BASE64DecoderStream extends FilterInputStream {
- private byte[] buffer; // cache of decoded bytes
- private int bufsize = 0; // size of the cache
- private int index = 0; // index into the cache
-
- /**
- * Create a BASE64 decoder that decodes the specified input stream
- * @param in the input stream
- */
- public BASE64DecoderStream(InputStream in) {
- super(in);
- buffer = new byte[3];
- }
-
- /**
- * Read the next decoded byte from this input stream. The byte
- * is returned as an <code>int</code> in the range <code>0</code>
- * to <code>255</code>. If no byte is available because the end of
- * the stream has been reached, the value <code>-1</code> is returned.
- * This method blocks until input data is available, the end of the
- * stream is detected, or an exception is thrown.
- *
- * @return next byte of data, or <code>-1</code> if the end of the
- * stream is reached.
- * @exception IOException if an I/O error occurs.
- * @see java.io.FilterInputStream#in
- */
- public int read() throws IOException {
- if (index >= bufsize) {
- decode(); // Fills up buffer
- if (bufsize == 0) // buffer is empty
- return -1;
- index = 0; // reset index into buffer
- }
- return buffer[index++] & 0xff; // Zero off the MSB
- }
-
- /**
- * Reads up to <code>len</code> decoded bytes of data from this input stream
- * into an array of bytes. This method blocks until some input is
- * available.
- * <p>
- *
- * @param buf the buffer into which the data is read.
- * @param off the start offset of the data.
- * @param len the maximum number of bytes read.
- * @return the total number of bytes read into the buffer, or
- * <code>-1</code> if there is no more data because the end of
- * the stream has been reached.
- * @exception IOException if an I/O error occurs.
- */
- public int read(byte[] buf, int off, int len) throws IOException {
- int i, c;
- for (i = 0; i < len; i++) {
- if ((c = read()) == -1) {
- if (i == 0) // At end of stream, so we should
- i = -1; // return -1 , NOT 0.
- break;
- }
- buf[off+i] = (byte)c;
- }
-
- return i;
- }
-
- /**
- * Tests if this input stream supports marks. Currently this class
- * does not support marks
- */
- public boolean markSupported() {
- return false; // Maybe later ..
- }
-
- /**
- * Returns the number of bytes that can be read from this input
- * stream without blocking. However, this figure is only
- * a close approximation in case the original encoded stream
- * contains embedded CRLFs; since the CRLFs are discarded, not decoded
- */
- public int available() throws IOException {
- // This is only an estimate, since in.available()
- // might include CRLFs too ..
- return ((in.available() * 3)/4 + (bufsize-index));
- }
-
- /**
- * This character array provides the character to value map
- * based on RFC1521.
- */
- private final static char pem_array[] = {
- 'A','B','C','D','E','F','G','H', // 0
- 'I','J','K','L','M','N','O','P', // 1
- 'Q','R','S','T','U','V','W','X', // 2
- 'Y','Z','a','b','c','d','e','f', // 3
- 'g','h','i','j','k','l','m','n', // 4
- 'o','p','q','r','s','t','u','v', // 5
- 'w','x','y','z','0','1','2','3', // 6
- '4','5','6','7','8','9','+','/' // 7
- };
-
- private final static byte pem_convert_array[] = new byte[256];
-
- static {
- for (int i = 0; i < 255; i++)
- pem_convert_array[i] = -1;
- for(int i = 0; i < pem_array.length; i++)
- pem_convert_array[pem_array[i]] = (byte) i;
- }
-
- /* The decoder algorithm */
- private byte[] decode_buffer = new byte[4];
- private void decode() throws IOException {
- bufsize = 0;
- /*
- * We need 4 valid base64 characters before we start decoding.
- * We skip anything that's not a valid base64 character (usually
- * just CRLF).
- */
- int got = 0;
- while (got < 4) {
- int i = in.read();
- if (i == -1) {
- if (got == 0)
- return; // EOF before any data is ok
- throw new IOException("Error in encoded stream, got " + got);
- }
- if (i >= 0 && i < 256 && i == '=' || pem_convert_array[i] != -1)
- decode_buffer[got++] = (byte)i;
- }
-
- byte a, b;
- a = pem_convert_array[decode_buffer[0] & 0xff];
- b = pem_convert_array[decode_buffer[1] & 0xff];
- // The first decoded byte
- buffer[bufsize++] = (byte)(((a << 2) & 0xfc) | ((b >>> 4) & 3));
-
- if (decode_buffer[2] == '=') // End of this BASE64 encoding
- return;
- a = b;
- b = pem_convert_array[decode_buffer[2] & 0xff];
- // The second decoded byte
- buffer[bufsize++] = (byte)(((a << 4) & 0xf0) | ((b >>> 2) & 0xf));
-
- if (decode_buffer[3] == '=') // End of this BASE64 encoding
- return;
- a = b;
- b = pem_convert_array[decode_buffer[3] & 0xff];
- // The third decoded byte
- buffer[bufsize++] = (byte)(((a << 6) & 0xc0) | (b & 0x3f));
- }
-
- /**
- * Base64 decode a byte array. No line breaks are allowed.
- * This method is suitable for short strings, such as those
- * in the IMAP AUTHENTICATE protocol, but not to decode the
- * entire content of a MIME part.
- *
- * NOTE: inbuf may only contain valid base64 characters.
- * Whitespace is not ignored.
- */
- public static byte[] decode(byte[] inbuf) {
- int size = (inbuf.length / 4) * 3;
- if (size == 0)
- return inbuf;
-
- if (inbuf[inbuf.length - 1] == '=') {
- size--;
- if (inbuf[inbuf.length - 2] == '=')
- size--;
- }
- byte[] outbuf = new byte[size];
-
- int inpos = 0, outpos = 0;
- size = inbuf.length;
- while (size > 0) {
- byte a, b;
- a = pem_convert_array[inbuf[inpos++] & 0xff];
- b = pem_convert_array[inbuf[inpos++] & 0xff];
- // The first decoded byte
- outbuf[outpos++] = (byte)(((a << 2) & 0xfc) | ((b >>> 4) & 3));
-
- if (inbuf[inpos] == '=') // End of this BASE64 encoding
- return outbuf;
- a = b;
- b = pem_convert_array[inbuf[inpos++] & 0xff];
- // The second decoded byte
- outbuf[outpos++] = (byte)(((a << 4) & 0xf0) | ((b >>> 2) & 0xf));
-
- if (inbuf[inpos] == '=') // End of this BASE64 encoding
- return outbuf;
- a = b;
- b = pem_convert_array[inbuf[inpos++] & 0xff];
- // The third decoded byte
- outbuf[outpos++] = (byte)(((a << 6) & 0xc0) | (b & 0x3f));
- size -= 4;
- }
- return outbuf;
- }
-
- /*** begin TEST program ***
- public static void main(String argv[]) throws Exception {
- FileInputStream infile = new FileInputStream(argv[0]);
- BASE64DecoderStream decoder = new BASE64DecoderStream(infile);
- int c;
-
- while ((c = decoder.read()) != -1)
- System.out.print((char)c);
- System.out.flush();
- }
- *** end TEST program ***/
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java
deleted file mode 100644
index 26bb2edf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)BASE64EncoderStream.java 1.6 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.*;
-
-/**
- * This class implements a BASE64 Encoder. It is implemented as
- * a FilterOutputStream, so one can just wrap this class around
- * any output stream and write bytes into this filter. The Encoding
- * is done as the bytes are written out.
- *
- * @author John Mani
- * @author Bill Shannon
- */
-
-public class BASE64EncoderStream extends FilterOutputStream {
- private byte[] buffer; // cache of bytes that are yet to be encoded
- private int bufsize = 0; // size of the cache
- private int count = 0; // number of bytes that have been output
- private int bytesPerLine; // number of bytes per line
-
- /**
- * Create a BASE64 encoder that encodes the specified input stream
- * @param out the output stream
- * @param bytesPerLine number of bytes per line. The encoder inserts
- * a CRLF sequence after the specified number of bytes
- */
- public BASE64EncoderStream(OutputStream out, int bytesPerLine) {
- super(out);
- buffer = new byte[3];
- this.bytesPerLine = bytesPerLine;
- }
-
- /**
- * Create a BASE64 encoder that encodes the specified input stream.
- * Inserts the CRLF sequence after outputting 76 bytes.
- * @param out the output stream
- */
- public BASE64EncoderStream(OutputStream out) {
- this(out, 76);
- }
-
- /**
- * Encodes <code>len</code> bytes from the specified
- * <code>byte</code> array starting at offset <code>off</code> to
- * this output stream.
- *
- * @param b the data.
- * @param off the start offset in the data.
- * @param len the number of bytes to write.
- * @exception IOException if an I/O error occurs.
- */
- public void write(byte[] b, int off, int len) throws IOException {
- for (int i = 0; i < len; i++)
- write(b[off + i]);
- }
-
- /**
- * Encodes <code>b.length</code> bytes to this output stream.
- * @param b the data to be written.
- * @exception IOException if an I/O error occurs.
- */
- public void write(byte[] b) throws IOException {
- write(b, 0, b.length);
- }
-
- /**
- * Encodes the specified <code>byte</code> to this output stream.
- * @param c the <code>byte</code>.
- * @exception IOException if an I/O error occurs.
- */
- public void write(int c) throws IOException {
- buffer[bufsize++] = (byte)c;
- if (bufsize == 3) { // Encoding unit = 3 bytes
- encode();
- bufsize = 0;
- }
- }
-
- /**
- * Flushes this output stream and forces any buffered output bytes
- * to be encoded out to the stream.
- * @exception IOException if an I/O error occurs.
- */
- public void flush() throws IOException {
- if (bufsize > 0) { // If there's unencoded characters in the buffer ..
- encode(); // .. encode them
- bufsize = 0;
- }
- out.flush();
- }
-
- /**
- * Forces any buffered output bytes to be encoded out to the stream
- * and closes this output stream
- */
- public void close() throws IOException {
- flush();
- out.close();
- }
-
- /** This array maps the characters to their 6 bit values */
- private final static char pem_array[] = {
- 'A','B','C','D','E','F','G','H', // 0
- 'I','J','K','L','M','N','O','P', // 1
- 'Q','R','S','T','U','V','W','X', // 2
- 'Y','Z','a','b','c','d','e','f', // 3
- 'g','h','i','j','k','l','m','n', // 4
- 'o','p','q','r','s','t','u','v', // 5
- 'w','x','y','z','0','1','2','3', // 6
- '4','5','6','7','8','9','+','/' // 7
- };
-
- private void encode() throws IOException {
- // If writing out this encoded unit will cause overflow,
- // start a new line.
- if (count + 4 > bytesPerLine) {
- out.write('\r');
- out.write('\n');
- count = 0;
- }
-
- byte a, b, c;
- if (bufsize == 1) {
- a = buffer[0];
- b = 0;
- c = 0;
- out.write(pem_array[(a >>> 2) & 0x3F]);
- out.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
- out.write('='); // pad character
- out.write('='); // pad character
- } else if (bufsize == 2) {
- a = buffer[0];
- b = buffer[1];
- c = 0;
- out.write(pem_array[(a >>> 2) & 0x3F]);
- out.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
- out.write(pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]);
- out.write('='); // pad character
- } else {
- a = buffer[0];
- b = buffer[1];
- c = buffer[2];
- out.write(pem_array[(a >>> 2) & 0x3F]);
- out.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
- out.write(pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]);
- out.write(pem_array[c & 0x3F]);
- }
-
- // increment count
- count += 4;
- }
-
- /**
- * Base64 encode a byte array. No line breaks are inserted.
- * This method is suitable for short strings, such as those
- * in the IMAP AUTHENTICATE protocol, but not to encode the
- * entire content of a MIME part.
- */
- public static byte[] encode(byte[] inbuf) {
- if (inbuf.length == 0)
- return inbuf;
- byte[] outbuf = new byte[((inbuf.length + 2) / 3) * 4];
- int inpos = 0, outpos = 0;
- int size = inbuf.length;
- while (size > 0) {
- byte a, b, c;
- if (size == 1) {
- a = inbuf[inpos++];
- b = 0;
- c = 0;
- outbuf[outpos++] = (byte)pem_array[(a >>> 2) & 0x3F];
- outbuf[outpos++] =
- (byte)pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)];
- outbuf[outpos++] = (byte)'='; // pad character
- outbuf[outpos++] = (byte)'='; // pad character
- } else if (size == 2) {
- a = inbuf[inpos++];
- b = inbuf[inpos++];
- c = 0;
- outbuf[outpos++] = (byte)pem_array[(a >>> 2) & 0x3F];
- outbuf[outpos++] =
- (byte)pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)];
- outbuf[outpos++] =
- (byte)pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)];
- outbuf[outpos++] = (byte)'='; // pad character
- } else {
- a = inbuf[inpos++];
- b = inbuf[inpos++];
- c = inbuf[inpos++];
- outbuf[outpos++] = (byte)pem_array[(a >>> 2) & 0x3F];
- outbuf[outpos++] =
- (byte)pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)];
- outbuf[outpos++] =
- (byte)pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)];
- outbuf[outpos++] = (byte)pem_array[c & 0x3F];
- }
- size -= 3;
- }
- return outbuf;
- }
-
- /*** begin TEST program
- public static void main(String argv[]) throws Exception {
- FileInputStream infile = new FileInputStream(argv[0]);
- BASE64EncoderStream encoder = new BASE64EncoderStream(System.out);
- int c;
-
- while ((c = infile.read()) != -1)
- encoder.write(c);
- encoder.close();
- }
- *** end TEST program **/
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java
deleted file mode 100644
index 58cb7bc1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)BEncoderStream.java 1.3 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.OutputStream;
-
-/**
- * This class implements a 'B' Encoder as defined by RFC2047 for
- * encoding MIME headers. It subclasses the BASE64EncoderStream
- * class.
- *
- * @author John Mani
- */
-
-public class BEncoderStream extends BASE64EncoderStream {
-
- /**
- * Create a 'B' encoder that encodes the specified input stream.
- * @param out the output stream
- */
- public BEncoderStream(OutputStream out) {
- super(out, Integer.MAX_VALUE); // MAX_VALUE is 2^31, should
- // suffice (!) to indicate that
- // CRLFs should not be inserted
- }
-
- /**
- * Returns the length of the encoded version of this byte array.
- */
- public static int encodedLength(byte[] b) {
- return ((b.length + 2)/3) * 4;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java
deleted file mode 100644
index 6c4556e9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)LineInputStream.java 1.7 03/01/07
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.*;
-
-/**
- * This class is to support reading CRLF terminated lines that
- * contain only US-ASCII characters from an input stream. Provides
- * functionality that is similar to the deprecated
- * <code>DataInputStream.readLine()</code>. Expected use is to read
- * lines as String objects from a RFC822 stream.
- *
- * It is implemented as a FilterInputStream, so one can just wrap
- * this class around any input stream and read bytes from this filter.
- *
- * @author John Mani
- */
-
-public final class LineInputStream extends FilterInputStream {
-
- private char[] lineBuffer = null; // reusable byte buffer
-
- public LineInputStream(InputStream in) {
- super(in);
- }
-
- /**
- * Read a line containing only ASCII characters from the input
- * stream. A line is terminated by a CR or NL or CR-NL sequence.
- * A common error is a CR-CR-NL sequence, which will also terminate
- * a line.
- * The line terminator is not returned as part of the returned
- * String. Returns null if no data is available. <p>
- *
- * This class is similar to the deprecated
- * <code>DataInputStream.readLine()</code>
- */
- public String readLine() throws IOException {
- InputStream in = this.in;
- char[] buf = lineBuffer;
-
- if (buf == null)
- buf = lineBuffer = new char[128];
-
- int c1;
- int room = buf.length;
- int offset = 0;
-
- while ((c1 = in.read()) != -1) {
- if (c1 == '\n') // Got NL, outa here.
- break;
- else if (c1 == '\r') {
- // Got CR, is the next char NL ?
- int c2 = in.read();
- if (c2 == '\r') // discard extraneous CR
- c2 = in.read();
- if (c2 != '\n') {
- // If not NL, push it back
- if (!(in instanceof PushbackInputStream))
- in = this.in = new PushbackInputStream(in);
- ((PushbackInputStream)in).unread(c2);
- }
- break; // outa here.
- }
-
- // Not CR, NL or CR-NL ...
- // .. Insert the byte into our byte buffer
- if (--room < 0) { // No room, need to grow.
- buf = new char[offset + 128];
- room = buf.length - offset - 1;
- System.arraycopy(lineBuffer, 0, buf, 0, offset);
- lineBuffer = buf;
- }
- buf[offset++] = (char)c1;
- }
-
- if ((c1 == -1) && (offset == 0))
- return null;
-
- return String.copyValueOf(buf, 0, offset);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java
deleted file mode 100644
index 83a69fbd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)OutputUtil.java 1.6 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
-
-import java.io.OutputStream;
-import java.io.IOException;
-
-/**
- * This class is to support writing out Strings as a sequence of bytes
- * terminated by a CRLF sequence. The String must contain only US-ASCII
- * characters.<p>
- *
- * The expected use is to write out RFC822 style headers to an output
- * stream. <p>
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class OutputUtil {
- private static byte[] newline = {'\r','\n'};
-
- public static void writeln(String s,OutputStream out) throws IOException {
- writeAsAscii(s,out);
- writeln(out);
- }
-
- /**
- * Writes a string as ASCII string.
- */
- public static void writeAsAscii(String s,OutputStream out) throws IOException {
- int len = s.length();
- for( int i=0; i<len; i++ )
- out.write((byte)s.charAt(i));
- }
-
- public static void writeln(OutputStream out) throws IOException {
- out.write(newline);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QDecoderStream.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QDecoderStream.java
deleted file mode 100644
index bac3b677..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QDecoderStream.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)QDecoderStream.java 1.5 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * This class implements a Q Decoder as defined in RFC 2047
- * for decoding MIME headers. It subclasses the QPDecoderStream class.
- *
- * @author John Mani
- */
-
-public class QDecoderStream extends QPDecoderStream {
-
- /**
- * Create a Q-decoder that decodes the specified input stream.
- * @param in the input stream
- */
- public QDecoderStream(InputStream in) {
- super(in);
- }
-
- /**
- * Read the next decoded byte from this input stream. The byte
- * is returned as an <code>int</code> in the range <code>0</code>
- * to <code>255</code>. If no byte is available because the end of
- * the stream has been reached, the value <code>-1</code> is returned.
- * This method blocks until input data is available, the end of the
- * stream is detected, or an exception is thrown.
- *
- * @return the next byte of data, or <code>-1</code> if the end of the
- * stream is reached.
- * @exception IOException if an I/O error occurs.
- */
- public int read() throws IOException {
- int c = in.read();
-
- if (c == '_') // Return '_' as ' '
- return ' ';
- else if (c == '=') {
- // QP Encoded atom. Get the next two bytes ..
- ba[0] = (byte)in.read();
- ba[1] = (byte)in.read();
- // .. and decode them
- try {
- return ASCIIUtility.parseInt(ba, 0, 2, 16);
- } catch (NumberFormatException nex) {
- throw new IOException("Error in QP stream " + nex.getMessage());
- }
- } else
- return c;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java
deleted file mode 100644
index addba218..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)QEncoderStream.java 1.4 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * This class implements a Q Encoder as defined by RFC 2047 for
- * encoding MIME headers. It subclasses the QPEncoderStream class.
- *
- * @author John Mani
- */
-
-public class QEncoderStream extends QPEncoderStream {
-
- private String specials;
- private static String WORD_SPECIALS = "=_?\"#$%&'(),.:;<>@[\\]^`{|}~";
- private static String TEXT_SPECIALS = "=_?";
-
- /**
- * Create a Q encoder that encodes the specified input stream
- * @param out the output stream
- * @param encodingWord true if we are Q-encoding a word within a
- * phrase.
- */
- public QEncoderStream(OutputStream out, boolean encodingWord) {
- super(out, Integer.MAX_VALUE); // MAX_VALUE is 2^31, should
- // suffice (!) to indicate that
- // CRLFs should not be inserted
- // when encoding rfc822 headers
-
- // a RFC822 "word" token has more restrictions than a
- // RFC822 "text" token.
- specials = encodingWord ? WORD_SPECIALS : TEXT_SPECIALS;
- }
-
- /**
- * Encodes the specified <code>byte</code> to this output stream.
- * @param c the <code>byte</code>.
- * @exception IOException if an I/O error occurs.
- */
- public void write(int c) throws IOException {
- c = c & 0xff; // Turn off the MSB.
- if (c == ' ')
- output('_', false);
- else if (c < 040 || c >= 0177 || specials.indexOf(c) >= 0)
- // Encoding required.
- output(c, true);
- else // No encoding required
- output(c, false);
- }
-
- /**
- * Returns the length of the encoded version of this byte array.
- */
- public static int encodedLength(byte[] b, boolean encodingWord) {
- int len = 0;
- String specials = encodingWord ? WORD_SPECIALS: TEXT_SPECIALS;
- for (int i = 0; i < b.length; i++) {
- int c = b[i] & 0xff; // Mask off MSB
- if (c < 040 || c >= 0177 || specials.indexOf(c) >= 0)
- // needs encoding
- len += 3; // Q-encoding is 1 -> 3 conversion
- else
- len++;
- }
- return len;
- }
-
- /**** begin TEST program ***
- public static void main(String argv[]) throws Exception {
- FileInputStream infile = new FileInputStream(argv[0]);
- QEncoderStream encoder = new QEncoderStream(System.out);
- int c;
-
- while ((c = infile.read()) != -1)
- encoder.write(c);
- encoder.close();
- }
- *** end TEST program ***/
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java
deleted file mode 100644
index b0e88d94..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)QPDecoderStream.java 1.9 02/04/02
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.*;
-
-/**
- * This class implements a QP Decoder. It is implemented as
- * a FilterInputStream, so one can just wrap this class around
- * any input stream and read bytes from this filter. The decoding
- * is done as the bytes are read out.
- *
- * @author John Mani
- */
-
-public class QPDecoderStream extends FilterInputStream {
- protected byte[] ba = new byte[2];
- protected int spaces = 0;
-
- /**
- * Create a Quoted Printable decoder that decodes the specified
- * input stream.
- * @param in the input stream
- */
- public QPDecoderStream(InputStream in) {
- super(new PushbackInputStream(in, 2)); // pushback of size=2
- }
-
- /**
- * Read the next decoded byte from this input stream. The byte
- * is returned as an <code>int</code> in the range <code>0</code>
- * to <code>255</code>. If no byte is available because the end of
- * the stream has been reached, the value <code>-1</code> is returned.
- * This method blocks until input data is available, the end of the
- * stream is detected, or an exception is thrown.
- *
- * @return the next byte of data, or <code>-1</code> if the end of the
- * stream is reached.
- * @exception IOException if an I/O error occurs.
- */
- public int read() throws IOException {
- if (spaces > 0) {
- // We have cached space characters, return one
- spaces--;
- return ' ';
- }
-
- int c = in.read();
-
- if (c == ' ') {
- // Got space, keep reading till we get a non-space char
- while ((c = in.read()) == ' ')
- spaces++;
-
- if (c == '\r' || c == '\n' || c == -1)
- // If the non-space char is CR/LF/EOF, the spaces we got
- // so far is junk introduced during transport. Junk 'em.
- spaces = 0;
- else {
- // The non-space char is NOT CR/LF, the spaces are valid.
- ((PushbackInputStream)in).unread(c);
- c = ' ';
- }
- return c; // return either <SPACE> or <CR/LF>
- }
- else if (c == '=') {
- // QP Encoded atom. Decode the next two bytes
- int a = in.read();
-
- if (a == '\n') {
- /* Hmm ... not really confirming QP encoding, but lets
- * allow this as a LF terminated encoded line .. and
- * consider this a soft linebreak and recurse to fetch
- * the next char.
- */
- return read();
- } else if (a == '\r') {
- // Expecting LF. This forms a soft linebreak to be ignored.
- int b = in.read();
- if (b != '\n')
- /* Not really confirming QP encoding, but
- * lets allow this as well.
- */
- ((PushbackInputStream)in).unread(b);
- return read();
- } else if (a == -1) {
- // Not valid QP encoding, but we be nice and tolerant here !
- return -1;
- } else {
- ba[0] = (byte)a;
- ba[1] = (byte)in.read();
- try {
- return ASCIIUtility.parseInt(ba, 0, 2, 16);
- } catch (NumberFormatException nex) {
- /*
- System.err.println(
- "Illegal characters in QP encoded stream: " +
- ASCIIUtility.toString(ba, 0, 2)
- );
- */
-
- ((PushbackInputStream)in).unread(ba);
- return c;
- }
- }
- }
- return c;
- }
-
- /**
- * Reads up to <code>len</code> decoded bytes of data from this input stream
- * into an array of bytes. This method blocks until some input is
- * available.
- * <p>
- *
- * @param buf the buffer into which the data is read.
- * @param off the start offset of the data.
- * @param len the maximum number of bytes read.
- * @return the total number of bytes read into the buffer, or
- * <code>-1</code> if there is no more data because the end of
- * the stream has been reached.
- * @exception IOException if an I/O error occurs.
- */
- public int read(byte[] buf, int off, int len) throws IOException {
- int i, c;
- for (i = 0; i < len; i++) {
- if ((c = read()) == -1) {
- if (i == 0) // At end of stream, so we should
- i = -1; // return -1 , NOT 0.
- break;
- }
- buf[off+i] = (byte)c;
- }
- return i;
- }
-
- /**
- * Tests if this input stream supports marks. Currently this class
- * does not support marks
- */
- public boolean markSupported() {
- return false;
- }
-
- /**
- * Returns the number of bytes that can be read from this input
- * stream without blocking. The QP algorithm does not permit
- * a priori knowledge of the number of bytes after decoding, so
- * this method just invokes the <code>available</code> method
- * of the original input stream.
- */
- public int available() throws IOException {
- // This is bogus ! We don't really know how much
- // bytes are available *after* decoding
- return in.available();
- }
-
- /**** begin TEST program
- public static void main(String argv[]) throws Exception {
- FileInputStream infile = new FileInputStream(argv[0]);
- QPDecoderStream decoder = new QPDecoderStream(infile);
- int c;
-
- while ((c = decoder.read()) != -1)
- System.out.print((char)c);
- System.out.println();
- }
- *** end TEST program ****/
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java
deleted file mode 100644
index 22ec8953..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)QPEncoderStream.java 1.6 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.*;
-
-/**
- * This class implements a Quoted Printable Encoder. It is implemented as
- * a FilterOutputStream, so one can just wrap this class around
- * any output stream and write bytes into this filter. The Encoding
- * is done as the bytes are written out.
- *
- * @author John Mani
- */
-
-public class QPEncoderStream extends FilterOutputStream {
- private int count = 0; // number of bytes that have been output
- private int bytesPerLine; // number of bytes per line
- private boolean gotSpace = false;
- private boolean gotCR = false;
-
- /**
- * Create a QP encoder that encodes the specified input stream
- * @param out the output stream
- * @param bytesPerLine the number of bytes per line. The encoder
- * inserts a CRLF sequence after this many number
- * of bytes.
- */
- public QPEncoderStream(OutputStream out, int bytesPerLine) {
- super(out);
- // Subtract 1 to account for the '=' in the soft-return
- // at the end of a line
- this.bytesPerLine = bytesPerLine - 1;
- }
-
- /**
- * Create a QP encoder that encodes the specified input stream.
- * Inserts the CRLF sequence after outputting 76 bytes.
- * @param out the output stream
- */
- public QPEncoderStream(OutputStream out) {
- this(out, 76);
- }
-
- /**
- * Encodes <code>len</code> bytes from the specified
- * <code>byte</code> array starting at offset <code>off</code> to
- * this output stream.
- *
- * @param b the data.
- * @param off the start offset in the data.
- * @param len the number of bytes to write.
- * @exception IOException if an I/O error occurs.
- */
- public void write(byte[] b, int off, int len) throws IOException {
- for (int i = 0; i < len; i++)
- write(b[off + i]);
- }
-
- /**
- * Encodes <code>b.length</code> bytes to this output stream.
- * @param b the data to be written.
- * @exception IOException if an I/O error occurs.
- */
- public void write(byte[] b) throws IOException {
- write(b, 0, b.length);
- }
-
- /**
- * Encodes the specified <code>byte</code> to this output stream.
- * @param c the <code>byte</code>.
- * @exception IOException if an I/O error occurs.
- */
- public void write(int c) throws IOException {
- c = c & 0xff; // Turn off the MSB.
- if (gotSpace) { // previous character was <SPACE>
- if (c == '\r' || c == '\n')
- // if CR/LF, we need to encode the <SPACE> char
- output(' ', true);
- else // no encoding required, just output the char
- output(' ', false);
- gotSpace = false;
- }
-
- if (c == '\r') {
- gotCR = true;
- outputCRLF();
- } else {
- if (c == '\n') {
- if (gotCR)
- // This is a CRLF sequence, we already output the
- // corresponding CRLF when we got the CR, so ignore this
- ;
- else
- outputCRLF();
- } else if (c == ' ') {
- gotSpace = true;
- } else if (c < 040 || c >= 0177 || c == '=')
- // Encoding required.
- output(c, true);
- else // No encoding required
- output(c, false);
- // whatever it was, it wasn't a CR
- gotCR = false;
- }
- }
-
- /**
- * Flushes this output stream and forces any buffered output bytes
- * to be encoded out to the stream.
- * @exception IOException if an I/O error occurs.
- */
- public void flush() throws IOException {
- out.flush();
- }
-
- /**
- * Forces any buffered output bytes to be encoded out to the stream
- * and closes this output stream
- */
- public void close() throws IOException {
- out.close();
- }
-
- private void outputCRLF() throws IOException {
- out.write('\r');
- out.write('\n');
- count = 0;
- }
-
- // The encoding table
- private final static char hex[] = {
- '0','1', '2', '3', '4', '5', '6', '7',
- '8','9', 'A', 'B', 'C', 'D', 'E', 'F'
- };
-
- protected void output(int c, boolean encode) throws IOException {
- if (encode) {
- if ((count += 3) > bytesPerLine) {
- out.write('=');
- out.write('\r');
- out.write('\n');
- count = 3; // set the next line's length
- }
- out.write('=');
- out.write(hex[c >> 4]);
- out.write(hex[c & 0xf]);
- } else {
- if (++count > bytesPerLine) {
- out.write('=');
- out.write('\r');
- out.write('\n');
- count = 1; // set the next line's length
- }
- out.write(c);
- }
- }
-
- /**** begin TEST program ***
- public static void main(String argv[]) throws Exception {
- FileInputStream infile = new FileInputStream(argv[0]);
- QPEncoderStream encoder = new QPEncoderStream(System.out);
- int c;
-
- while ((c = infile.read()) != -1)
- encoder.write(c);
- encoder.close();
- }
- *** end TEST program ***/
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.java
deleted file mode 100644
index 50a40dc3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUDecoderStream.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)UUDecoderStream.java 1.8 02/07/08
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.*;
-
-/**
- * This class implements a UUDecoder. It is implemented as
- * a FilterInputStream, so one can just wrap this class around
- * any input stream and read bytes from this filter. The decoding
- * is done as the bytes are read out.
- *
- * @author John Mani
- * @author Bill Shannon
- */
-
-public class UUDecoderStream extends FilterInputStream {
- private String name;
- private int mode;
-
- private byte[] buffer; // cache of decoded bytes
- private int bufsize = 0; // size of the cache
- private int index = 0; // index into the cache
- private boolean gotPrefix = false;
- private boolean gotEnd = false;
- private LineInputStream lin;
-
- /**
- * Create a UUdecoder that decodes the specified input stream
- * @param in the input stream
- */
- public UUDecoderStream(InputStream in) {
- super(in);
- lin = new LineInputStream(in);
- buffer = new byte[45]; // max decoded chars in a line = 45
- }
-
- /**
- * Read the next decoded byte from this input stream. The byte
- * is returned as an <code>int</code> in the range <code>0</code>
- * to <code>255</code>. If no byte is available because the end of
- * the stream has been reached, the value <code>-1</code> is returned.
- * This method blocks until input data is available, the end of the
- * stream is detected, or an exception is thrown.
- *
- * @return next byte of data, or <code>-1</code> if the end of
- * stream is reached.
- * @exception IOException if an I/O error occurs.
- * @see java.io.FilterInputStream#in
- */
-
- public int read() throws IOException {
- if (index >= bufsize) {
- readPrefix();
- if (!decode())
- return -1;
- index = 0; // reset index into buffer
- }
- return buffer[index++] & 0xff; // return lower byte
- }
-
- public int read(byte[] buf, int off, int len) throws IOException {
- int i, c;
- for (i = 0; i < len; i++) {
- if ((c = read()) == -1) {
- if (i == 0) // At end of stream, so we should
- i = -1; // return -1, NOT 0.
- break;
- }
- buf[off+i] = (byte)c;
- }
- return i;
- }
-
- public boolean markSupported() {
- return false;
- }
-
- public int available() throws IOException {
- // This is only an estimate, since in.available()
- // might include CRLFs too ..
- return ((in.available() * 3)/4 + (bufsize-index));
- }
-
- /**
- * Get the "name" field from the prefix. This is meant to
- * be the pathname of the decoded file
- *
- * @return name of decoded file
- * @exception IOException if an I/O error occurs.
- */
- public String getName() throws IOException {
- readPrefix();
- return name;
- }
-
- /**
- * Get the "mode" field from the prefix. This is the permission
- * mode of the source file.
- *
- * @return permission mode of source file
- * @exception IOException if an I/O error occurs.
- */
- public int getMode() throws IOException {
- readPrefix();
- return mode;
- }
-
- /**
- * UUencoded streams start off with the line:
- * "begin <mode> <filename>"
- * Search for this prefix and gobble it up.
- */
- private void readPrefix() throws IOException {
- if (gotPrefix) // got the prefix
- return;
-
- String s;
- for (;;) {
- // read till we get the prefix: "begin MODE FILENAME"
- s = lin.readLine(); // NOTE: readLine consumes CRLF pairs too
- if (s == null)
- throw new IOException("UUDecoder error: No Begin");
- if (s.regionMatches(true, 0, "begin", 0, 5)) {
- try {
- mode = Integer.parseInt(s.substring(6,9));
- } catch (NumberFormatException ex) {
- throw new IOException("UUDecoder error: " + ex.toString());
- }
- name = s.substring(10);
- gotPrefix = true;
- return;
- }
- }
- }
-
- private boolean decode() throws IOException {
-
- if (gotEnd)
- return false;
- bufsize = 0;
- String line;
- do {
- line = lin.readLine();
-
- /*
- * Improperly encoded data sometimes omits the zero length
- * line that starts with a space character, we detect the
- * following "end" line here.
- */
- if (line == null)
- throw new IOException("Missing End");
- if (line.regionMatches(true, 0, "end", 0, 3)) {
- gotEnd = true;
- return false;
- }
- } while (line.length() == 0);
- int count = line.charAt(0);
- if (count < ' ')
- throw new IOException("Buffer format error");
-
- /*
- * The first character in a line is the number of original (not
- * the encoded atoms) characters in the line. Note that all the
- * code below has to handle the <SPACE> character that indicates
- * end of encoded stream.
- */
- count = (count - ' ') & 0x3f;
-
- if (count == 0) {
- line = lin.readLine();
- if (line == null || !line.regionMatches(true, 0, "end", 0, 3))
- throw new IOException("Missing End");
- gotEnd = true;
- return false;
- }
-
- int need = ((count * 8)+5)/6;
-//System.out.println("count " + count + ", need " + need + ", len " + line.length());
- if (line.length() < need + 1)
- throw new IOException("Short buffer error");
-
- int i = 1;
- byte a, b;
- /*
- * A correct uuencoder always encodes 3 characters at a time, even
- * if there aren't 3 characters left. But since some people out
- * there have broken uuencoders we handle the case where they
- * don't include these "unnecessary" characters.
- */
- while (bufsize < count) {
- // continue decoding until we get 'count' decoded chars
- a = (byte)((line.charAt(i++) - ' ') & 0x3f);
- b = (byte)((line.charAt(i++) - ' ') & 0x3f);
- buffer[bufsize++] = (byte)(((a << 2) & 0xfc) | ((b >>> 4) & 3));
-
- if (bufsize < count) {
- a = b;
- b = (byte)((line.charAt(i++) - ' ') & 0x3f);
- buffer[bufsize++] =
- (byte)(((a << 4) & 0xf0) | ((b >>> 2) & 0xf));
- }
-
- if (bufsize < count) {
- a = b;
- b = (byte)((line.charAt(i++) - ' ') & 0x3f);
- buffer[bufsize++] = (byte)(((a << 6) & 0xc0) | (b & 0x3f));
- }
- }
- return true;
- }
-
- /*** begin TEST program *****
- public static void main(String argv[]) throws Exception {
- FileInputStream infile = new FileInputStream(argv[0]);
- UUDecoderStream decoder = new UUDecoderStream(infile);
- int c;
-
- try {
- while ((c = decoder.read()) != -1)
- System.out.write(c);
- System.out.flush();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- **** end TEST program ****/
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java
deleted file mode 100644
index d95f66e7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/UUEncoderStream.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)UUEncoderStream.java 1.3 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.*;
-
-/**
- * This class implements a UUEncoder. It is implemented as
- * a FilterOutputStream, so one can just wrap this class around
- * any output stream and write bytes into this filter. The Encoding
- * is done as the bytes are written out.
- *
- * @author John Mani
- */
-
-public class UUEncoderStream extends FilterOutputStream {
- private byte[] buffer; // cache of bytes that are yet to be encoded
- private int bufsize = 0; // size of the cache
- private boolean wrotePrefix = false;
-
- protected String name; // name of file
- protected int mode; // permissions mode
-
- /**
- * Create a UUencoder that encodes the specified input stream
- * @param out the output stream
- */
- public UUEncoderStream(OutputStream out) {
- this(out, "encoder.buf", 644);
- }
-
- /**
- * Create a UUencoder that encodes the specified input stream
- * @param out the output stream
- * @param name Specifies a name for the encoded buffer
- */
- public UUEncoderStream(OutputStream out, String name) {
- this(out, name, 644);
- }
-
- /**
- * Create a UUencoder that encodes the specified input stream
- * @param out the output stream
- * @param name Specifies a name for the encoded buffer
- * @param mode Specifies permission mode for the encoded buffer
- */
- public UUEncoderStream(OutputStream out, String name, int mode) {
- super(out);
- this.name = name;
- this.mode = mode;
- buffer = new byte[45];
- }
-
- /**
- * Set up the buffer name and permission mode.
- * This method has any effect only if it is invoked before
- * you start writing into the output stream
- */
- public void setNameMode(String name, int mode) {
- this.name = name;
- this.mode = mode;
- }
-
- public void write(byte[] b, int off, int len) throws IOException {
- for (int i = 0; i < len; i++)
- write(b[off + i]);
- }
-
- public void write(byte[] data) throws IOException {
- write(data, 0, data.length);
- }
-
- public void write(int c) throws IOException {
- /* buffer up characters till we get a line's worth, then encode
- * and write them out. Max number of characters allowed per
- * line is 45.
- */
- buffer[bufsize++] = (byte)c;
- if (bufsize == 45) {
- writePrefix();
- encode();
- bufsize = 0;
- }
- }
-
- public void flush() throws IOException {
- if (bufsize > 0) { // If there's unencoded characters in the buffer
- writePrefix();
- encode(); // .. encode them
- }
- writeSuffix();
- out.flush();
- }
-
- public void close() throws IOException {
- flush();
- out.close();
- }
-
- /**
- * Write out the prefix: "begin <mode> <name>"
- */
- private void writePrefix() throws IOException {
- if (!wrotePrefix) {
- PrintStream ps = new PrintStream(out);
- ps.println("begin " + mode + " " + name);
- ps.flush();
- wrotePrefix = true;
- }
- }
-
- /**
- * Write a single line containing space and the suffix line
- * containing the single word "end" (terminated by a newline)
- */
- private void writeSuffix() throws IOException {
- PrintStream ps = new PrintStream(out);
- ps.println(" \nend");
- ps.flush();
- }
-
- /**
- * Encode a line.
- * Start off with the character count, followed by the encoded atoms
- * and terminate with LF. (or is it CRLF or the local line-terminator ?)
- * Take three bytes and encodes them into 4 characters
- * If bufsize if not a multiple of 3, the remaining bytes are filled
- * with '1'. This insures that the last line won't end in spaces
- * and potentiallly be truncated.
- */
- private void encode() throws IOException {
- byte a, b, c;
- int c1, c2, c3, c4;
- int i = 0;
-
- // Start off with the count of characters in the line
- out.write((bufsize & 0x3f) + ' ');
-
- while (i < bufsize) {
- a = buffer[i++];
- if (i < bufsize) {
- b = buffer[i++];
- if (i < bufsize)
- c = buffer[i++];
- else // default c to 1
- c = 1;
- }
- else { // default b & c to 1
- b = 1;
- c = 1;
- }
-
- c1 = (a >>> 2) & 0x3f;
- c2 = ((a << 4) & 0x30) | ((b >>> 4) & 0xf);
- c3 = ((b << 2) & 0x3c) | ((c >>> 6) & 0x3);
- c4 = c & 0x3f;
- out.write(c1 + ' ');
- out.write(c2 + ' ');
- out.write(c3 + ' ');
- out.write(c4 + ' ');
- }
- // Terminate with LF. (should it be CRLF or local line-terminator ?)
- out.write('\n');
- }
-
- /**** begin TEST program *****
- public static void main(String argv[]) throws Exception {
- FileInputStream infile = new FileInputStream(argv[0]);
- UUEncoderStream encoder = new UUEncoderStream(System.out);
- int c;
-
- while ((c = infile.read()) != -1)
- encoder.write(c);
- encoder.close();
- }
- **** end TEST program *****/
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java
deleted file mode 100644
index 5ea9c02b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/AttachmentPartImpl.java
+++ /dev/null
@@ -1,607 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.ASCIIUtility;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.Header;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimePartDataSource;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.InternetHeaders;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeBodyPart;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeUtility;
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.OutputStream;
-import java.util.Iterator;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.activation.*;
-import javax.xml.soap.*;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart;
-
-/**
- * Implementation of attachments.
- *
- * @author Anil Vijendran (akv@eng.sun.com)
- */
-public class AttachmentPartImpl extends AttachmentPart {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
-
- private final MimeHeaders headers;
- private MimeBodyPart rawContent = null;
- private DataHandler dataHandler = null;
-
- //alternate impl that uses a MIMEPart
- private MIMEPart mimePart = null;
-
- public AttachmentPartImpl() {
- headers = new MimeHeaders();
-
- // initialization from here should cover most of cases;
- // if not, it would be necessary to call
- // AttachmentPartImpl.initializeJavaActivationHandlers()
- // explicitly by programmer
- initializeJavaActivationHandlers();
- }
-
- public AttachmentPartImpl(MIMEPart part) {
- headers = new MimeHeaders();
- mimePart = part;
- List<? extends com.sun.xml.internal.org.jvnet.mimepull.Header> hdrs = part.getAllHeaders();
- for (com.sun.xml.internal.org.jvnet.mimepull.Header hd : hdrs) {
- headers.addHeader(hd.getName(), hd.getValue());
- }
- }
-
- public int getSize() throws SOAPException {
- byte[] bytes;
- if (mimePart != null) {
- try {
- return mimePart.read().available();
- } catch (IOException e) {
- return -1;
- }
- }
- if ((rawContent == null) && (dataHandler == null))
- return 0;
-
- if (rawContent != null) {
- try {
- return rawContent.getSize();
- } catch (Exception ex) {
- log.log(
- Level.SEVERE,
- "SAAJ0573.soap.attachment.getrawbytes.ioexception",
- new String[] { ex.getLocalizedMessage()});
- throw new SOAPExceptionImpl("Raw InputStream Error: " + ex);
- }
- } else {
- ByteOutputStream bout = new ByteOutputStream();
- try {
- dataHandler.writeTo(bout);
- } catch (IOException ex) {
- log.log(
- Level.SEVERE,
- "SAAJ0501.soap.data.handler.err",
- new String[] { ex.getLocalizedMessage()});
- throw new SOAPExceptionImpl("Data handler error: " + ex);
- }
- return bout.size();
- }
- }
-
- public void clearContent() {
- if (mimePart != null) {
- mimePart.close();
- mimePart = null;
- }
- dataHandler = null;
- rawContent = null;
- }
-
- public Object getContent() throws SOAPException {
- try {
- if (mimePart != null) {
- //return an inputstream
- return mimePart.read();
- }
- if (dataHandler != null) {
- return getDataHandler().getContent();
- } else if (rawContent != null) {
- return rawContent.getContent();
- } else {
- log.severe("SAAJ0572.soap.no.content.for.attachment");
- throw new SOAPExceptionImpl("No data handler/content associated with this attachment");
- }
- } catch (Exception ex) {
- log.log(Level.SEVERE, "SAAJ0575.soap.attachment.getcontent.exception", ex);
- throw new SOAPExceptionImpl(ex.getLocalizedMessage());
- }
- }
-
- public void setContent(Object object, String contentType)
- throws IllegalArgumentException {
- if (mimePart != null) {
- mimePart.close();
- mimePart = null;
- }
- DataHandler dh = new DataHandler(object, contentType);
-
- setDataHandler(dh);
- }
-
-
- public DataHandler getDataHandler() throws SOAPException {
- if (mimePart != null) {
- //return an inputstream
- return new DataHandler(new DataSource() {
-
- public InputStream getInputStream() throws IOException {
- return mimePart.read();
- }
-
- public OutputStream getOutputStream() throws IOException {
- throw new UnsupportedOperationException("getOutputStream cannot be supported : You have enabled LazyAttachments Option");
- }
-
- public String getContentType() {
- return mimePart.getContentType();
- }
-
- public String getName() {
- return "MIMEPart Wrapper DataSource";
- }
- });
- }
- if (dataHandler == null) {
- if (rawContent != null) {
- return new DataHandler(new MimePartDataSource(rawContent));
- }
- log.severe("SAAJ0502.soap.no.handler.for.attachment");
- throw new SOAPExceptionImpl("No data handler associated with this attachment");
- }
- return dataHandler;
- }
-
- public void setDataHandler(DataHandler dataHandler)
- throws IllegalArgumentException {
- if (mimePart != null) {
- mimePart.close();
- mimePart = null;
- }
- if (dataHandler == null) {
- log.severe("SAAJ0503.soap.no.null.to.dataHandler");
- throw new IllegalArgumentException("Null dataHandler argument to setDataHandler");
- }
- this.dataHandler = dataHandler;
- rawContent = null;
-
- if (log.isLoggable(Level.FINE))
- log.log(Level.FINE, "SAAJ0580.soap.set.Content-Type",
- new String[] { dataHandler.getContentType() });
- setMimeHeader("Content-Type", dataHandler.getContentType());
- }
-
- public void removeAllMimeHeaders() {
- headers.removeAllHeaders();
- }
-
- public void removeMimeHeader(String header) {
- headers.removeHeader(header);
- }
-
- public String[] getMimeHeader(String name) {
- return headers.getHeader(name);
- }
-
- public void setMimeHeader(String name, String value) {
- headers.setHeader(name, value);
- }
-
- public void addMimeHeader(String name, String value) {
- headers.addHeader(name, value);
- }
-
- public Iterator getAllMimeHeaders() {
- return headers.getAllHeaders();
- }
-
- public Iterator getMatchingMimeHeaders(String[] names) {
- return headers.getMatchingHeaders(names);
- }
-
- public Iterator getNonMatchingMimeHeaders(String[] names) {
- return headers.getNonMatchingHeaders(names);
- }
-
- boolean hasAllHeaders(MimeHeaders hdrs) {
- if (hdrs != null) {
- Iterator i = hdrs.getAllHeaders();
- while (i.hasNext()) {
- MimeHeader hdr = (MimeHeader) i.next();
- String[] values = headers.getHeader(hdr.getName());
- boolean found = false;
-
- if (values != null) {
- for (int j = 0; j < values.length; j++)
- if (hdr.getValue().equalsIgnoreCase(values[j])) {
- found = true;
- break;
- }
- }
-
- if (!found) {
- return false;
- }
- }
- }
- return true;
- }
-
- MimeBodyPart getMimePart() throws SOAPException {
- try {
- if (this.mimePart != null) {
- return new MimeBodyPart(mimePart);
- }
- if (rawContent != null) {
- copyMimeHeaders(headers, rawContent);
- return rawContent;
- }
-
- MimeBodyPart envelope = new MimeBodyPart();
-
- envelope.setDataHandler(dataHandler);
- copyMimeHeaders(headers, envelope);
-
- return envelope;
- } catch (Exception ex) {
- log.severe("SAAJ0504.soap.cannot.externalize.attachment");
- throw new SOAPExceptionImpl("Unable to externalize attachment", ex);
- }
- }
-
- public static void copyMimeHeaders(MimeHeaders headers, MimeBodyPart mbp)
- throws SOAPException {
-
- Iterator i = headers.getAllHeaders();
-
- while (i.hasNext())
- try {
- MimeHeader mh = (MimeHeader) i.next();
-
- mbp.setHeader(mh.getName(), mh.getValue());
- } catch (Exception ex) {
- log.severe("SAAJ0505.soap.cannot.copy.mime.hdr");
- throw new SOAPExceptionImpl("Unable to copy MIME header", ex);
- }
- }
-
- public static void copyMimeHeaders(MimeBodyPart mbp, AttachmentPartImpl ap)
- throws SOAPException {
- try {
- List hdr = mbp.getAllHeaders();
- int sz = hdr.size();
- for( int i=0; i<sz; i++ ) {
- Header h = (Header)hdr.get(i);
- if(h.getName().equalsIgnoreCase("Content-Type"))
- continue; // skip
- ap.addMimeHeader(h.getName(), h.getValue());
- }
- } catch (Exception ex) {
- log.severe("SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment");
- throw new SOAPExceptionImpl(
- "Unable to copy MIME headers into attachment",
- ex);
- }
- }
-
- public void setBase64Content(InputStream content, String contentType)
- throws SOAPException {
-
- if (mimePart != null) {
- mimePart.close();
- mimePart = null;
- }
- dataHandler = null;
- InputStream decoded = null;
- try {
- decoded = MimeUtility.decode(content, "base64");
- InternetHeaders hdrs = new InternetHeaders();
- hdrs.setHeader("Content-Type", contentType);
- //TODO: reading the entire attachment here is ineffcient. Somehow the MimeBodyPart
- // Ctor with inputStream causes problems based on the InputStream
- // has markSupported()==true
- ByteOutputStream bos = new ByteOutputStream();
- bos.write(decoded);
- rawContent = new MimeBodyPart(hdrs, bos.getBytes(), bos.getCount());
- setMimeHeader("Content-Type", contentType);
- } catch (Exception e) {
- log.log(Level.SEVERE, "SAAJ0578.soap.attachment.setbase64content.exception", e);
- throw new SOAPExceptionImpl(e.getLocalizedMessage());
- } finally {
- try {
- decoded.close();
- } catch (IOException ex) {
- throw new SOAPException(ex);
- }
- }
- }
-
- public InputStream getBase64Content() throws SOAPException {
- InputStream stream;
- if (mimePart != null) {
- stream = mimePart.read();
- } else if (rawContent != null) {
- try {
- stream = rawContent.getInputStream();
- } catch (Exception e) {
- log.log(Level.SEVERE,"SAAJ0579.soap.attachment.getbase64content.exception", e);
- throw new SOAPExceptionImpl(e.getLocalizedMessage());
- }
- } else if (dataHandler != null) {
- try {
- stream = dataHandler.getInputStream();
- } catch (IOException e) {
- log.severe("SAAJ0574.soap.attachment.datahandler.ioexception");
- throw new SOAPExceptionImpl("DataHandler error" + e);
- }
- } else {
- log.severe("SAAJ0572.soap.no.content.for.attachment");
- throw new SOAPExceptionImpl("No data handler/content associated with this attachment");
- }
-
- //TODO: Write a BASE64EncoderInputStream instead,
- // this code below is inefficient
- // where we are trying to read the whole attachment first
- int len;
- int size = 1024;
- byte [] buf;
- if (stream != null) {
- try {
- ByteArrayOutputStream bos = new ByteArrayOutputStream(size);
- //TODO: try and optimize this on the same lines as
- // ByteOutputStream : to eliminate the temp buffer here
- OutputStream ret = MimeUtility.encode(bos, "base64");
- buf = new byte[size];
- while ((len = stream.read(buf, 0, size)) != -1) {
- ret.write(buf, 0, len);
- }
- ret.flush();
- buf = bos.toByteArray();
- return new ByteArrayInputStream(buf);
- } catch (Exception e) {
- // throw new SOAPException
- log.log(Level.SEVERE,"SAAJ0579.soap.attachment.getbase64content.exception", e);
- throw new SOAPExceptionImpl(e.getLocalizedMessage());
- } finally {
- try {
- stream.close();
- } catch (IOException ex) {
- //close the stream
- }
- }
- } else {
- //throw new SOAPException
- log.log(Level.SEVERE,"SAAJ0572.soap.no.content.for.attachment");
- throw new SOAPExceptionImpl("No data handler/content associated with this attachment");
- }
- }
-
- public void setRawContent(InputStream content, String contentType)
- throws SOAPException {
- if (mimePart != null) {
- mimePart.close();
- mimePart = null;
- }
- dataHandler = null;
- try {
- InternetHeaders hdrs = new InternetHeaders();
- hdrs.setHeader("Content-Type", contentType);
- //TODO: reading the entire attachment here is ineffcient. Somehow the MimeBodyPart
- // Ctor with inputStream causes problems based on whether the InputStream has
- // markSupported()==true or false
- ByteOutputStream bos = new ByteOutputStream();
- bos.write(content);
- rawContent = new MimeBodyPart(hdrs, bos.getBytes(), bos.getCount());
- setMimeHeader("Content-Type", contentType);
- } catch (Exception e) {
- log.log(Level.SEVERE, "SAAJ0576.soap.attachment.setrawcontent.exception", e);
- throw new SOAPExceptionImpl(e.getLocalizedMessage());
- } finally {
- try {
- content.close();
- } catch (IOException ex) {
- throw new SOAPException(ex);
- }
- }
- }
-
- /*
- public void setRawContentBytes(byte[] content, String contentType)
- throws SOAPException {
- if (content == null) {
- throw new SOAPExceptionImpl("Null content passed to setRawContentBytes");
- }
- dataHandler = null;
- try {
- InternetHeaders hdrs = new InternetHeaders();
- hdrs.setHeader("Content-Type", contentType);
- rawContent = new MimeBodyPart(hdrs, content, content.length);
- setMimeHeader("Content-Type", contentType);
- } catch (Exception e) {
- log.log(Level.SEVERE, "SAAJ0576.soap.attachment.setrawcontent.exception", e);
- throw new SOAPExceptionImpl(e.getLocalizedMessage());
- }
- } */
-
- public void setRawContentBytes(
- byte[] content, int off, int len, String contentType)
- throws SOAPException {
- if (mimePart != null) {
- mimePart.close();
- mimePart = null;
- }
- if (content == null) {
- throw new SOAPExceptionImpl("Null content passed to setRawContentBytes");
- }
- dataHandler = null;
- try {
- InternetHeaders hdrs = new InternetHeaders();
- hdrs.setHeader("Content-Type", contentType);
- rawContent = new MimeBodyPart(hdrs, content, off, len);
- setMimeHeader("Content-Type", contentType);
- } catch (Exception e) {
- log.log(Level.SEVERE,
- "SAAJ0576.soap.attachment.setrawcontent.exception", e);
- throw new SOAPExceptionImpl(e.getLocalizedMessage());
- }
- }
-
- public InputStream getRawContent() throws SOAPException {
- if (mimePart != null) {
- return mimePart.read();
- }
- if (rawContent != null) {
- try {
- return rawContent.getInputStream();
- } catch (Exception e) {
- log.log(Level.SEVERE,"SAAJ0577.soap.attachment.getrawcontent.exception", e);
- throw new SOAPExceptionImpl(e.getLocalizedMessage());
- }
- } else if (dataHandler != null) {
- try {
- return dataHandler.getInputStream();
- } catch (IOException e) {
- log.severe("SAAJ0574.soap.attachment.datahandler.ioexception");
- throw new SOAPExceptionImpl("DataHandler error" + e);
- }
- } else {
- log.severe("SAAJ0572.soap.no.content.for.attachment");
- throw new SOAPExceptionImpl("No data handler/content associated with this attachment");
- }
- }
-
- public byte[] getRawContentBytes() throws SOAPException {
- InputStream ret;
- if (mimePart != null) {
- try {
- ret = mimePart.read();
- return ASCIIUtility.getBytes(ret);
- } catch (IOException ex) {
- log.log(Level.SEVERE,"SAAJ0577.soap.attachment.getrawcontent.exception", ex);
- throw new SOAPExceptionImpl(ex);
- }
- }
- if (rawContent != null) {
- try {
- ret = rawContent.getInputStream();
- return ASCIIUtility.getBytes(ret);
- } catch (Exception e) {
- log.log(Level.SEVERE,"SAAJ0577.soap.attachment.getrawcontent.exception", e);
- throw new SOAPExceptionImpl(e);
- }
- } else if (dataHandler != null) {
- try {
- ret = dataHandler.getInputStream();
- return ASCIIUtility.getBytes(ret);
- } catch (IOException e) {
- log.severe("SAAJ0574.soap.attachment.datahandler.ioexception");
- throw new SOAPExceptionImpl("DataHandler error" + e);
- }
- } else {
- log.severe("SAAJ0572.soap.no.content.for.attachment");
- throw new SOAPExceptionImpl("No data handler/content associated with this attachment");
- }
- }
-
- // attachments are equal if they are the same reference
- public boolean equals(Object o) {
- return (this == o);
- }
-
- // In JDK 8 we get a warning if we implement equals() but not hashCode().
- // There is no intuitive value for this, the default one in Object is fine.
- public int hashCode() {
- return super.hashCode();
- }
-
- public MimeHeaders getMimeHeaders() {
- return headers;
- }
-
- public static void initializeJavaActivationHandlers() {
- // DataHandler.writeTo() may search for DCH. So adding some default ones.
- try {
- CommandMap map = CommandMap.getDefaultCommandMap();
- if (map instanceof MailcapCommandMap) {
- MailcapCommandMap mailMap = (MailcapCommandMap) map;
-
- // registering our DCH since javamail's DCH doesn't handle
- if (!cmdMapInitialized(mailMap)) {
- mailMap.addMailcap("text/xml;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler");
- mailMap.addMailcap("application/xml;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler");
- mailMap.addMailcap("application/fastinfoset;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.FastInfosetDataContentHandler");
- // this handler seems to be not used according VCS history ...
- // mailMap.addMailcap("multipart/*;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.MultipartDataContentHandler");
- mailMap.addMailcap("image/*;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.ImageDataContentHandler");
- mailMap.addMailcap("text/plain;;x-java-content-handler=com.sun.xml.internal.messaging.saaj.soap.StringDataContentHandler");
- }
- }
- } catch (Throwable t) {
- // ignore the exception.
- }
- }
-
- private static boolean cmdMapInitialized(MailcapCommandMap mailMap) {
-
- // checking fastinfoset handler, since this one is specific to SAAJ
- CommandInfo[] commands = mailMap.getAllCommands("application/fastinfoset");
- if (commands == null || commands.length == 0) {
- return false;
- }
-
- String saajClassName = "com.sun.xml.internal.ws.binding.FastInfosetDataContentHandler";
- for (CommandInfo command : commands) {
- String commandClass = command.getCommandClass();
- if (saajClassName.equals(commandClass)) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java
deleted file mode 100644
index 366035ea..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-import java.util.WeakHashMap;
-
-/**
- * Simple utility ensuring that the value is cached only in case it is non-internal implementation
- */
-abstract class ContextClassloaderLocal<V> {
-
- private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
-
- private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<ClassLoader, V>();
-
- public V get() throws Error {
- ClassLoader tccl = getContextClassLoader();
- V instance = CACHE.get(tccl);
- if (instance == null) {
- instance = createNewInstance();
- CACHE.put(tccl, instance);
- }
- return instance;
- }
-
- public void set(V instance) {
- CACHE.put(getContextClassLoader(), instance);
- }
-
- protected abstract V initialValue() throws Exception;
-
- private V createNewInstance() {
- try {
- return initialValue();
- } catch (Exception e) {
- throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e);
- }
- }
-
- private static String format(String property, Object... args) {
- String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property);
- return MessageFormat.format(text, args);
- }
-
- private static ClassLoader getContextClassLoader() {
- return (ClassLoader)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- ClassLoader cl = null;
- try {
- cl = Thread.currentThread().getContextClassLoader();
- } catch (SecurityException ex) {
- }
- return cl;
- }
- });
- }
-}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.properties
deleted file mode 100644
index a15e12e0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ContextClassloaderLocal.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-# Error messages for StaticCache utility class
-FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java
deleted file mode 100644
index 1bec67e6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/Envelope.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import javax.xml.soap.SOAPEnvelope;
-import javax.xml.transform.Source;
-
-/**
- * Different implementations for SOAP Envelope must all implement this
- * interface.
- *
- * @author Anil Vijendran (akv@eng.sun.com)
- */
-public interface Envelope extends SOAPEnvelope {
- /**
- * Get the content as a JAXP Source.
- */
- Source getContent();
-
- /**
- * Output the content.
- */
- void output(OutputStream out) throws IOException;
-
- /**
- * Output the content.
- */
- void output(OutputStream out, boolean isFastInfoset) throws IOException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java
deleted file mode 100644
index a60fdc79..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/EnvelopeFactory.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.util.JAXMStreamSource;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-import com.sun.xml.internal.messaging.saaj.util.ParserPool;
-import com.sun.xml.internal.messaging.saaj.util.RejectDoctypeSaxFilter;
-import com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTransformer;
-import org.xml.sax.InputSource;
-import org.xml.sax.XMLReader;
-
-import javax.xml.parsers.SAXParser;
-import javax.xml.soap.SOAPException;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.stream.StreamSource;
-import java.util.logging.Logger;
-
-/**
- * EnvelopeFactory creates SOAP Envelope objects using different
- * underlying implementations.
- */
-public class EnvelopeFactory {
-
- protected static final Logger
- log = Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
-
- private static ContextClassloaderLocal<ParserPool> parserPool =
- new ContextClassloaderLocal<ParserPool>() {
- @Override
- protected ParserPool initialValue() throws Exception {
- return new ParserPool(5);
- }
- };
-
- public static Envelope createEnvelope(Source src, SOAPPartImpl soapPart)
- throws SOAPException {
- // Insert SAX filter to disallow Document Type Declarations since
- // they are not legal in SOAP
- SAXParser saxParser = null;
- if (src instanceof StreamSource) {
- if (src instanceof JAXMStreamSource) {
- try {
- if (!SOAPPartImpl.lazyContentLength) {
- ((JAXMStreamSource) src).reset();
- }
- } catch (java.io.IOException ioe) {
- log.severe("SAAJ0515.source.reset.exception");
- throw new SOAPExceptionImpl(ioe);
- }
- }
- try {
- saxParser = parserPool.get().get();
- } catch (Exception e) {
- log.severe("SAAJ0601.util.newSAXParser.exception");
- throw new SOAPExceptionImpl(
- "Couldn't get a SAX parser while constructing a envelope",
- e);
- }
- InputSource is = SAXSource.sourceToInputSource(src);
- if (is.getEncoding() == null && soapPart.getSourceCharsetEncoding() != null) {
- is.setEncoding(soapPart.getSourceCharsetEncoding());
- }
- XMLReader rejectFilter;
- try {
- rejectFilter = new RejectDoctypeSaxFilter(saxParser);
- } catch (Exception ex) {
- log.severe("SAAJ0510.soap.cannot.create.envelope");
- throw new SOAPExceptionImpl(
- "Unable to create envelope from given source: ",
- ex);
- }
- src = new SAXSource(rejectFilter, is);
- }
-
- try {
- Transformer transformer =
- EfficientStreamingTransformer.newTransformer();
- DOMResult result = new DOMResult(soapPart);
- transformer.transform(src, result);
-
- Envelope env = (Envelope) soapPart.getEnvelope();
- return env;
- } catch (Exception ex) {
- if (ex instanceof SOAPVersionMismatchException) {
- throw (SOAPVersionMismatchException) ex;
- }
- log.severe("SAAJ0511.soap.cannot.create.envelope");
- throw new SOAPExceptionImpl(
- "Unable to create envelope from given source: ",
- ex);
- } finally {
- if (saxParser != null) {
- parserPool.get().returnParser(saxParser);
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java
deleted file mode 100644
index 618a3832..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/FastInfosetDataContentHandler.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.awt.datatransfer.DataFlavor;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.InputStream;
-
-import javax.activation.*;
-import javax.xml.transform.Source;
-
-import com.sun.xml.internal.messaging.saaj.util.FastInfosetReflection;
-
-/**
- * JAF data handler for Fast Infoset content
- *
- * @author Santiago Pericas-Geertsen
- */
-public class FastInfosetDataContentHandler implements DataContentHandler {
- public static final String STR_SRC = "com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSource";
-
- public FastInfosetDataContentHandler() {
- }
-
- /**
- * return the DataFlavors for this <code>DataContentHandler</code>
- * @return The DataFlavors.
- */
- public DataFlavor[] getTransferDataFlavors() { // throws Exception;
- DataFlavor flavors[] = new DataFlavor[1];
- flavors[0] = new ActivationDataFlavor(
- FastInfosetReflection.getFastInfosetSource_class(),
- "application/fastinfoset", "Fast Infoset");
- return flavors;
- }
-
- /**
- * return the Transfer Data of type DataFlavor from InputStream
- * @param df The DataFlavor.
- * @param ins The InputStream corresponding to the data.
- * @return The constructed Object.
- */
- public Object getTransferData(DataFlavor flavor, DataSource dataSource)
- throws IOException
- {
- if (flavor.getMimeType().startsWith("application/fastinfoset")) {
- try {
- if (flavor.getRepresentationClass().getName().equals(STR_SRC)) {
- return FastInfosetReflection.FastInfosetSource_new(
- dataSource.getInputStream());
- }
- }
- catch (Exception e) {
- throw new IOException(e.getMessage());
- }
- }
- return null;
- }
-
- public Object getContent(DataSource dataSource) throws IOException {
- try {
- return FastInfosetReflection.FastInfosetSource_new(
- dataSource.getInputStream());
- }
- catch (Exception e) {
- throw new IOException(e.getMessage());
- }
- }
-
- /**
- * construct an object from a byte stream
- * (similar semantically to previous method, we are deciding
- * which one to support)
- */
- public void writeTo(Object obj, String mimeType, OutputStream os)
- throws IOException
- {
- if (!mimeType.equals("application/fastinfoset")) {
- throw new IOException("Invalid content type \"" + mimeType
- + "\" for FastInfosetDCH");
- }
-
- try {
- InputStream is = FastInfosetReflection.FastInfosetSource_getInputStream(
- (Source) obj);
-
- int n; byte[] buffer = new byte[4096];
- while ((n = is.read(buffer)) != -1) {
- os.write(buffer, 0, n);
- }
- }
- catch (Exception ex) {
- throw new IOException(
- "Error copying FI source to output stream " + ex.getMessage());
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java
deleted file mode 100644
index c50bb6ca..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.awt.datatransfer.DataFlavor;
-import java.io.*;
-import java.awt.*;
-
-import javax.activation.*;
-
-/**
- * DataContentHandler for image/gif.
- *
- * @author Ana Lindstrom-Tamer
- */
-public class GifDataContentHandler extends Component implements DataContentHandler {
- private static ActivationDataFlavor myDF =
- new ActivationDataFlavor(
- java.awt.Image.class,
- "image/gif",
- "GIF Image");
-
- protected ActivationDataFlavor getDF() {
- return myDF;
- }
-
- /**
- * Return the DataFlavors for this <code>DataContentHandler</code>.
- *
- * @return The DataFlavors
- */
- public DataFlavor[] getTransferDataFlavors() { // throws Exception;
- return new DataFlavor[] { getDF()};
- }
-
- /**
- * Return the Transfer Data of type DataFlavor from InputStream.
- *
- * @param df The DataFlavor
- * @param ins The InputStream corresponding to the data
- * @return String object
- */
- public Object getTransferData(DataFlavor df, DataSource ds)
- throws IOException {
- // use myDF.equals to be sure to get ActivationDataFlavor.equals,
- // which properly ignores Content-Type parameters in comparison
- if (getDF().equals(df))
- return getContent(ds);
- else
- return null;
- }
-
- public Object getContent(DataSource ds) throws IOException {
- InputStream is = ds.getInputStream();
- int pos = 0;
- int count;
- byte buf[] = new byte[1024];
-
- while ((count = is.read(buf, pos, buf.length - pos)) != -1) {
- pos += count;
- if (pos >= buf.length) {
- int size = buf.length;
- if (size < 256*1024)
- size += size;
- else
- size += 256*1024;
- byte tbuf[] = new byte[size];
- System.arraycopy(buf, 0, tbuf, 0, pos);
- buf = tbuf;
- }
- }
- Toolkit tk = Toolkit.getDefaultToolkit();
- return tk.createImage(buf, 0, pos);
- }
-
- /**
- * Write the object to the output stream, using the specified MIME type.
- */
- public void writeTo(Object obj, String type, OutputStream os)
- throws IOException {
- if (obj != null && !(obj instanceof Image))
- throw new IOException("\"" + getDF().getMimeType() +
- "\" DataContentHandler requires Image object, " +
- "was given object of type " + obj.getClass().toString());
-
- throw new IOException(getDF().getMimeType() + " encoding not supported");
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java
deleted file mode 100644
index 7feeafa6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.awt.*;
-import java.awt.datatransfer.DataFlavor;
-import java.awt.image.BufferedImage;
-import java.io.*;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.activation.*;
-import javax.imageio.ImageIO;
-import javax.imageio.ImageWriter;
-import javax.imageio.stream.ImageOutputStream;
-
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class ImageDataContentHandler extends Component
- implements DataContentHandler {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
-
- private DataFlavor[] flavor;
-
- public ImageDataContentHandler() {
- String[] mimeTypes = ImageIO.getReaderMIMETypes();
- flavor = new DataFlavor[mimeTypes.length];
- for(int i=0; i < mimeTypes.length; i++) {
- flavor[i] = new ActivationDataFlavor(
- java.awt.Image.class, mimeTypes[i], "Image");
- }
- }
-
- /**
- * Returns an array of DataFlavor objects indicating the flavors the
- * data can be provided in. The array should be ordered according to
- * preference for providing the data (from most richly descriptive to
- * least descriptive).
- *
- * @return The DataFlavors.
- */
- public DataFlavor[] getTransferDataFlavors() {
- return (DataFlavor[]) Arrays.copyOf(flavor, flavor.length);
- }
-
- /**
- * Returns an object which represents the data to be transferred.
- * The class of the object returned is defined by the representation class
- * of the flavor.
- *
- * @param df The DataFlavor representing the requested type.
- * @param ds The DataSource representing the data to be converted.
- * @return The constructed Object.
- */
- public Object getTransferData(DataFlavor df, DataSource ds)
- throws IOException {
- for (int i=0; i < flavor.length; i++) {
- if (flavor[i].equals(df)) {
- return getContent(ds);
- }
- }
- return null;
- }
-
- /**
- * Return an object representing the data in its most preferred form.
- * Generally this will be the form described by the first DataFlavor
- * returned by the <code>getTransferDataFlavors</code> method.
- *
- * @param ds The DataSource representing the data to be converted.
- * @return The constructed Object.
- */
- public Object getContent(DataSource ds) throws IOException {
- return ImageIO.read(new BufferedInputStream(ds.getInputStream()));
- }
-
- /**
- * Convert the object to a byte stream of the specified MIME type
- * and write it to the output stream.
- *
- * @param obj The object to be converted.
- * @param mimeType The requested MIME type of the resulting byte stream.
- * @param os The output stream into which to write the converted
- * byte stream.
- */
-
- public void writeTo(Object obj, String type, OutputStream os)
- throws IOException {
-
- try {
- BufferedImage bufImage = null;
- if (obj instanceof BufferedImage) {
- bufImage = (BufferedImage)obj;
- } else if (obj instanceof Image) {
- bufImage = render((Image)obj);
- } else {
- log.log(Level.SEVERE,
- "SAAJ0520.soap.invalid.obj.type",
- new String[] { obj.getClass().toString() });
- throw new IOException(
- "ImageDataContentHandler requires Image object, "
- + "was given object of type "
- + obj.getClass().toString());
- }
- ImageWriter writer = null;
- Iterator i = ImageIO.getImageWritersByMIMEType(type);
- if (i.hasNext()) {
- writer = (ImageWriter)i.next();
- }
- if (writer != null) {
- ImageOutputStream stream = null;
- stream = ImageIO.createImageOutputStream(os);
- writer.setOutput(stream);
- writer.write(bufImage);
- writer.dispose();
- stream.close();
- } else {
- log.log(Level.SEVERE, "SAAJ0526.soap.unsupported.mime.type",
- new String[] { type });
- throw new IOException("Unsupported mime type:"+ type);
- }
- } catch (Exception e) {
- log.severe("SAAJ0525.soap.cannot.encode.img");
- throw new IOException("Unable to encode the image to a stream "
- + e.getMessage());
- }
- }
-
-
- private BufferedImage render(Image img) throws InterruptedException {
-
- MediaTracker tracker = new MediaTracker(this);
- tracker.addImage(img, 0);
- tracker.waitForAll();
- BufferedImage bufImage = new BufferedImage(img.getWidth(null),
- img.getHeight(null), BufferedImage.TYPE_INT_RGB);
- Graphics g = bufImage.createGraphics();
- g.drawImage(img, 0, 0, null);
- g.dispose();
- return bufImage;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java
deleted file mode 100644
index 217e0a7d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.awt.*;
-import java.awt.datatransfer.DataFlavor;
-import java.awt.image.BufferedImage;
-import java.io.*;
-
-import javax.activation.*;
-
-//import com.sun.image.codec.jpeg.*;
-import javax.imageio.ImageIO;
-
-/**
- * JAF data handler for Jpeg content
- *
- * @author Ana Lindstrom-Tamer
- */
-
-public class JpegDataContentHandler
- extends Component
- implements DataContentHandler {
- public static final String STR_SRC = "java.awt.Image";
-
- /**
- * return the DataFlavors for this <code>DataContentHandler</code>
- * @return The DataFlavors.
- */
- public DataFlavor[] getTransferDataFlavors() { // throws Exception;
- DataFlavor flavors[] = new DataFlavor[1];
-
- try {
- flavors[0] =
- new ActivationDataFlavor(
- Class.forName(STR_SRC),
- "image/jpeg",
- "JPEG");
- } catch (Exception e) {
- System.out.println(e);
- }
-
- return flavors;
- }
-
- /**
- * return the Transfer Data of type DataFlavor from InputStream
- * @param df The DataFlavor.
- * @param ins The InputStream corresponding to the data.
- * @return The constructed Object.
- */
- public Object getTransferData(DataFlavor df, DataSource ds) {
-
- // this is sort of hacky, but will work for the
- // sake of testing...
- if (df.getMimeType().startsWith("image/jpeg")) {
- if (df.getRepresentationClass().getName().equals(STR_SRC)) {
- InputStream inputStream = null;
- BufferedImage jpegLoadImage = null;
-
- try {
- inputStream = ds.getInputStream();
- jpegLoadImage = ImageIO.read(inputStream);
-
- } catch (Exception e) {
- System.out.println(e);
- }
-
- return jpegLoadImage;
- }
- }
- return null;
- }
-
- /**
- *
- */
- public Object getContent(DataSource ds) { // throws Exception;
- InputStream inputStream = null;
- BufferedImage jpegLoadImage = null;
-
- try {
- inputStream = ds.getInputStream();
- jpegLoadImage = ImageIO.read(inputStream);
-
- } catch (Exception e) {
- }
-
- return (Image) jpegLoadImage;
- }
-
- /**
- * construct an object from a byte stream
- * (similar semantically to previous method, we are deciding
- * which one to support)
- */
- public void writeTo(Object obj, String mimeType, OutputStream os)
- throws IOException {
- if (!mimeType.equals("image/jpeg"))
- throw new IOException(
- "Invalid content type \""
- + mimeType
- + "\" for ImageContentHandler");
-
- if (obj == null) {
- throw new IOException("Null object for ImageContentHandler");
- }
-
- try {
- BufferedImage bufImage = null;
- if (obj instanceof BufferedImage) {
- bufImage = (BufferedImage) obj;
-
- } else {
- Image img = (Image) obj;
- MediaTracker tracker = new MediaTracker(this);
- tracker.addImage(img, 0);
- tracker.waitForAll();
- if (tracker.isErrorAny()) {
- throw new IOException("Error while loading image");
- }
- bufImage =
- new BufferedImage(
- img.getWidth(null),
- img.getHeight(null),
- BufferedImage.TYPE_INT_RGB);
-
- Graphics g = bufImage.createGraphics();
- g.drawImage(img, 0, 0, null);
- }
- ImageIO.write(bufImage, "jpeg", os);
-
- } catch (Exception ex) {
- throw new IOException(
- "Unable to run the JPEG Encoder on a stream "
- + ex.getMessage());
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings.properties
deleted file mode 100644
index 93e50060..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: Data handler error: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: No data handler associated with this attachment
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: Null dataHandler argument to setDataHandler
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: Unable to externalize attachment
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: Unable to copy MIME header
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: Unable to copy MIME headers into attachment
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: Unable to register handlers in JAF command map
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: Unable to create envelope from given source
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: Unable to create envelope from given source
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: Unable to create envelope: incorrect factory used during tree construction
-SAAJ0513.soap.unknown.ns=SAAJ0513: Unable to create envelope from given source because the namespace was not recognized
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: Unable to create envelope from given source because the root element is not named Envelope
-SAAJ0515.source.reset.exception=SAAJ0515: Unable to reset the soap-part content source
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler requires Image object, but was given object of type {0}
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type set to {0}
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: Invalid content-type {0} for ImageContentHandler
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: Null object for ImageContentHandler
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: Unable to run the JPEG Encoder on a stream
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: Unable to encode image to a stream
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: Unsupported mime type {0}
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Unrecognized Content-Type
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: Unable to parse content type
-SAAJ0532.soap.no.Content-Type=SAAJ0532: Absent Content-Type
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: Cannot create message: incorrect content-type for SOAP version. Got {0}, but expected {1}
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Unrecognized Content-Type
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: Unable to internalize message
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type needs to be Multipart/Related and with type=text/xml or application/soap+xml
-SAAJ0537.soap.invalid.content-type=SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: Unable to convert SOAP message into a Multipart object
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: Unable to get header stream in saveChanges
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: Error during saving a multipart message
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: Could not complete operation. Fragment not bound to SOAP part
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: Processing Instructions are not allowed in SOAP documents
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: Entity References are not allowed in SOAP documents
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: Source does not have a valid Reader or InputStream
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: Error setting the source for SOAPPart
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Internal error: stream not of the right type
-SAAJ0547.soap.cannot.externalize=SAAJ0547: Error while trying to externalize
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: Unable to externalize header
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: Bad Content-Type for SOAP Part {0}
-SAAJ0550.soap.null.headers=SAAJ0550: Cannot create message: Headers can't be null
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: Unsupported encoding {0}
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: XML declaration parsing failed
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode on SOAPPart not supported
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument on SOAPPart not supported
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig on SOAPPart not supported
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode on SOAPPart not supported
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI on SOAPPart not supported
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI on SOAPPart not supported
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking on SOAPPart not supported
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding on SOAPPart not supported
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding on SOAPPart not supported
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone on SOAPPart not supported
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone on SOAPPart not supported
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion on SOAPPart not supported
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion on SOAPPart not supported
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking on SOAPPart not supported
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: Null {0} argument to {1}
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: Protocol {0} does not support {1}
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: Unknown Protocol {0} specified for creating {1}
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: The parent element of a soap part is not defined
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: Setting value of a soap part is not defined
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: No data handler/content associated with this attachment
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: IOException while reading the raw attachment content
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: IOException while trying to obtain the inputstream from datahandler for this attachment
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: Exception while trying to retrieve content for this attachment
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: Exception while trying to set the Raw content for this attachment
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: Exception while trying to get the Raw content for this attachment
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: Exception while trying to set the Decoded content for this attachment
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: Exception while trying to get the Encoded content for this attachment
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: Unable to locate attachment with cid {0}
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: Exception {0} when trying to set Property {1} on SOAP Message
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type set to {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties
deleted file mode 100644
index 8e339c77..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: Daten-Handler-Fehler: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: Es ist kein Daten-Handler mit diesem Anhang verkn\u00FCpft
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: Null-dataHandler-Argument f\u00FCr setDataHandler
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: Anhang kann nicht externalisiert werden
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: MIME-Header kann nicht kopiert werden
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: MIME-Header k\u00F6nnen nicht in Anhang kopiert werden
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: Handler k\u00F6nnen in JAF-Befehlszuordnung nicht registriert werden
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: Envelope kann nicht aus angegebener Quelle erstellt werden
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: Envelope kann nicht aus angegebener Quelle erstellt werden
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: Envelope kann nicht erstellt werden: falsche Factory bei der Erstellung der Baumstruktur verwendet
-SAAJ0513.soap.unknown.ns=SAAJ0513: Envelope kann nicht aus der angegebenen Quelle erstellt werden, weil der Namespace nicht erkannt wurde
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: Envelope kann nicht aus der angegebenen Quelle erstellt werden, weil das Root-Element nicht den Namen "Envelope" hat
-SAAJ0515.source.reset.exception=SAAJ0515: soap-part-Contentquelle kann nicht zur\u00FCckgesetzt werden
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler erfordert Imageobjekt, Objekt vom Typ {0} wurde jedoch angegeben
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type auf {0} festgelegt
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: Ung\u00FCltiger Content-Type {0} f\u00FCr ImageContentHandler
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: Null-Objekt f\u00FCr ImageContentHandler
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: JPEG-Encoder kann nicht in einem Stream ausgef\u00FChrt werden
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: Image kann nicht in einem Stream codiert werden
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: Nicht unterst\u00FCtzter MIME-Typ {0}
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Nicht erkannter Content-Type
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: Content-Type kann nicht geparst werden
-SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type fehlt
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: Nachricht kann nicht erstellt werden: Falscher Content-Type f\u00FCr SOAP-Version. {0} erhalten, jedoch {1} erwartet
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Nicht erkannter Content-Type
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: Nachricht kann nicht \"internalisiert\" werden.
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type muss Multipart/Related mit type=text/xml oder application/soap+xml sein
-SAAJ0537.soap.invalid.content-type=SAAJ0537: Ung\u00FCltiger Content-Type. K\u00F6nnte eine Fehlermeldung anstelle einer SOAP-Nachricht sein
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: SOAP-Nachricht kann nicht in ein Multipart-Objekt konvertiert werden
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: Header Stream in saveChanges kann nicht abgerufen werden
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: Fehler beim Speichern einer Multipart-Nachricht
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: Vorgang konnte nicht abgeschlossen werden. Fragment nicht an SOAP Part gebunden
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: Verarbeitungsanweisungen sind in SOAP-Dokumenten nicht zul\u00E4ssig
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: Entity-Referenzen sind in SOAP-Dokumenten nicht zul\u00E4ssig
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: Quelle hat keinen g\u00FCltigen Reader oder InputStream
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: Fehler beim Festlegen der Quelle f\u00FCr SOAPPart
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Interner Fehler: Stream hat nicht den richtigen Typ
-SAAJ0547.soap.cannot.externalize=SAAJ0547: Fehler bei Externalisierungsversuch
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0504: Header kann nicht externalisiert werden
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: Ung\u00FCltiger Content-Type f\u00FCr SOAPPart {0}
-SAAJ0550.soap.null.headers=SAAJ0550: Nachricht kann nicht erstellt werden: Header d\u00FCrfen nicht null sein
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: Nicht unterst\u00FCtzte Codierung {0}
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: Parsing von XML-Deklaration nicht erfolgreich
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode in SOAPPart nicht unterst\u00FCtzt
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument in SOAPPart nicht unterst\u00FCtzt
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig in SOAPPart nicht unterst\u00FCtzt
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode in SOAPPart nicht unterst\u00FCtzt
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI in SOAPPart nicht unterst\u00FCtzt
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI in SOAPPart nicht unterst\u00FCtzt
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking in SOAPPart nicht unterst\u00FCtzt
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding in SOAPPart nicht unterst\u00FCtzt
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding in SOAPPart nicht unterst\u00FCtzt
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone in SOAPPart nicht unterst\u00FCtzt
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone in SOAPPart nicht unterst\u00FCtzt
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion in SOAPPart nicht unterst\u00FCtzt
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion in SOAPPart nicht unterst\u00FCtzt
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking in SOAPPart nicht unterst\u00FCtzt
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: Null-{0}-Argument f\u00FCr {1}
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: Protokoll {0} unterst\u00FCtzt {1} nicht
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: Unbekanntes Protokoll {0} f\u00FCr Erstellung von {1} angegeben
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: Das \u00FCbergeordnete Element eines SOAPPart-Teils ist nicht definiert
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: Die Festlegung des Wertes eines SOAPPart-Teils ist nicht definiert
-SAAJ0572.soap.no.content.for.attachment=SAAJ0502: Es ist kein Daten-Handler/Content mit diesem Anhang verkn\u00FCpft
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: IOException beim Lesen des Raw-Anhangscontents
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: IOException beim Versuch, den Input Stream aus Daten-Handler f\u00FCr diesen Anhang abzurufen
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: Ausnahme beim Versuch, den Content f\u00FCr diesen Anhang abzurufen
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: Ausnahme beim Versuch, den Raw-Content f\u00FCr diesen Anhang festzulegen
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: Ausnahme beim Versuch, den Raw-Content f\u00FCr diesen Anhang abzurufen
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: Ausnahme beim Versuch, den decodierten Content f\u00FCr diesen Anhang festzulegen
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: Ausnahme beim Versuch, den decodierten Content f\u00FCr diesen Anhang abzurufen
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: Anhang mit CID {0} kann nicht gefunden werden
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: Ausnahme {0} beim Versuch, Eigenschaft {1} in SOAP-Nachricht festzulegen
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type auf {0} festgelegt
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties
deleted file mode 100644
index f75ec17b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: Error de manejador de datos: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: no hay ning\u00FAn manejador de datos asociado a este anexo
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: argumento dataHandler nulo para setDataHandler
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: no se ha podido externalizar el anexo
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: no se ha podido copiar la cabecera MIME
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: no se han podido copiar las cabeceras MIME en el anexo
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: no se han podido registrar los manejadores en la asignaci\u00F3n de comandos JAF
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: no se ha podido crear el elemento Envelope desde el origen especificado
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: no se ha podido crear el elemento Envelope desde el origen especificado
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: No se ha podido crear el elemento Envelope: se ha utilizado una f\u00E1brica incorrecta durante la construcci\u00F3n del \u00E1rbol
-SAAJ0513.soap.unknown.ns=SAAJ0513: no se ha podido crear el elemento Envelope desde el origen especificado, porque no se ha reconocido el espacio de nombres
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: no se ha podido crear el elemento Envelope desde el origen especificado, porque el elemento ra\u00EDz no se denomina Envelope
-SAAJ0515.source.reset.exception=SAAJ0515: no se ha podido restablecer el origen del contenido de la parte soap
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler necesita un objeto de imagen, pero se ha proporcionado un objeto de tipo {0}
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type est\u00E1 definido en {0}
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: Content-Type {0} no v\u00E1lido para ImageContentHandler
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: objeto nulo para ImageContentHandler
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: no se ha podido ejecutar el codificador JPEG en un flujo
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: no se ha podido codificar la imagen en un flujo
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: tipo MIME no soportado {0}
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Content-Type no reconocido
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: no se ha podido analizar el tipo de contenido
-SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type ausente
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: No se puede crear el mensaje: content-type incorrecto para la versi\u00F3n de SOAP. Se ha obtenido {0}, pero se esperaba {1}
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Content-Type no reconocido
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: no se ha podido internalizar el mensaje
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type tiene que ser Multipart/Related y con type=text/xml o application/soap+xml
-SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type no v\u00E1lido. Podr\u00EDa ser un mensaje de error en lugar de un mensaje SOAP
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: no se ha podido convertir un mensaje SOAP en un objeto de varias partes
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: no se ha podido obtener el flujo de cabeceras en saveChanges
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: error al guardar un mensaje de varias partes
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: no se ha podido completar la operaci\u00F3n. El fragmento no est\u00E1 enlazado a la parte SOAP
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: no se permiten instrucciones de procesamiento en los documentos SOAP
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: no se permiten referencias a entidades en los documentos SOAP
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: el origen no tiene un Reader o InputStream v\u00E1lido
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: error al definir el origen para SOAPPart
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Error interno: el flujo no es del tipo correcto
-SAAJ0547.soap.cannot.externalize=SAAJ0547: Error al intentar externalizar
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: no se ha podido externalizar la cabecera
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: Content-Type err\u00F3neo para la parte SOAP {0}
-SAAJ0550.soap.null.headers=SAAJ0550: no se puede crear el mensaje. Las cabeceras no pueden ser nulas
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: codificaci\u00F3n no soportada {0}
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: fallo en el an\u00E1lisis de la declaraci\u00F3n XML
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode en SOAPPart no est\u00E1 soportado
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument en SOAPPart no est\u00E1 soportado
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig en SOAPPart no est\u00E1 soportado
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode en SOAPPart no est\u00E1 soportado
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI en SOAPPart no est\u00E1 soportado
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI en SOAPPart no est\u00E1 soportado
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking en SOAPPart no est\u00E1 soportado
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding en SOAPPart no est\u00E1 soportado
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding en SOAPPart no est\u00E1 soportado
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone en SOAPPart no est\u00E1 soportado
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone en SOAPPart no est\u00E1 soportado
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion en SOAPPart no est\u00E1 soportado
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion en SOAPPart no est\u00E1 soportado
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking en SOAPPart no est\u00E1 soportado
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: argumento {0} nulo para {1}
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: el protocolo {0} no soporta {1}
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: se ha especificado un protocolo {0} desconocido para crear {1}
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: no se ha definido el elemento principal de una parte soap
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: no se ha definido el valor de definici\u00F3n de una parte soap
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: no hay ning\u00FAn manejador/contenido asociado a este anexo
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: excepci\u00F3n de E/S al leer el contenido del anexo raw
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: excepci\u00F3n de E/S al intentar obtener el flujo de entrada desde el manejador de datos de este anexo
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: excepci\u00F3n al intentar recuperar el contenido de este anexo
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: excepci\u00F3n al intentar definir el contenido raw de este anexo
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: excepci\u00F3n al intentar obtener el contenido raw de este anexo
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: excepci\u00F3n al intentar definir el contenido descodificado de este anexo
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: excepci\u00F3n al intentar obtener el contenido codificado de este anexo
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: no se ha encontrado el anexo con el CID {0}
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: excepci\u00F3n {0} al intentar definir la propiedad {1} en el mensaje SOAP
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type definido en {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties
deleted file mode 100644
index baba575b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501 : erreur de gestionnaire de donn\u00E9es : {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502 : aucun gestionnaire de donn\u00E9es associ\u00E9 \u00E0 cette pi\u00E8ce jointe
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503 : argument dataHandler NULL pour setDataHandler
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504 : impossible d'externaliser la pi\u00E8ce jointe
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505 : impossible de copier l'en-t\u00EAte MIME
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506 : impossible de copier les en-t\u00EAtes MIME dans la pi\u00E8ce jointe
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050 : impossible d'inscrire les gestionnaires dans la mappe de commande JAF
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510 : impossible de cr\u00E9er une enveloppe \u00E0 partir de la source donn\u00E9e
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511 : impossible de cr\u00E9er une enveloppe \u00E0 partir de la source donn\u00E9e
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512 : impossible de cr\u00E9er une enveloppe : fabrique incorrecte utilis\u00E9e lors de la construction de l'arborescence
-SAAJ0513.soap.unknown.ns=SAAJ0513 : impossible de cr\u00E9er une enveloppe \u00E0 partir de la source donn\u00E9e car l'espace de noms n'a pas \u00E9t\u00E9 reconnu
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514 : impossible de cr\u00E9er une enveloppe \u00E0 partir de la source donn\u00E9e car l'\u00E9l\u00E9ment racine n'est pas nomm\u00E9 Envelope
-SAAJ0515.source.reset.exception=SAAJ0515 : impossible de red\u00E9finir la source de contenu soap-part
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520 : DataContentHandler exige un objet de type Image, mais a re\u00E7u un objet de type {0}
-SAAJ0521.soap.set.Content-Type=SAAJ0521 : Content-Type d\u00E9fini sur {0}
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522 : content-type {0} non valide pour ImageContentHandler
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523 : objet NULL pour ImageContentHandler
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524 : impossible d'ex\u00E9cuter l'encodeur JPEG sur un flux
-SAAJ0525.soap.cannot.encode.img=SAAJ0525 : impossible d'encoder l'image en un flux
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526 : type MIME {0} non pris en charge
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530 : Content-Type non reconnu
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531 : impossible d'analyser le type de contenu
-SAAJ0532.soap.no.Content-Type=SAAJ0532 : Content-Type absent
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533 : impossible de cr\u00E9er un message : content-type incorrect pour la version SOAP. {0} obtenu, mais {1} attendu
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534 : Content-Type non reconnu
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535 : impossible d'internaliser le message
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536 : Content-Type doit \u00EAtre Multipart/Related et avec le type = text/xml ou application/soap+xml
-SAAJ0537.soap.invalid.content-type=SAAJ0537 : Content-Type non valide. Cela peut \u00EAtre un message d'erreur au lieu d'un message SOAP
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538 : impossible de convertir un message SOAP en objet Multipart
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539 : impossible d'obtenir un flux de donn\u00E9es d'en-t\u00EAte dans saveChanges
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540 : erreur lors de l'enregistrement d'un message Multipart
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541 : impossible de terminer l'op\u00E9ration. Fragment non li\u00E9 \u00E0 la partie SOAP
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542 : les instructions de traitement ne sont pas autoris\u00E9es dans les documents SOAP
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543 : les r\u00E9f\u00E9rences d'entit\u00E9 ne sont pas autoris\u00E9es dans les documents SOAP
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544 : la source n'a pas de processus de lecture ou d'InputStream valide
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545 : erreur lors de la d\u00E9finition de la source pour SOAPPart
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546 : erreur interne : le type du flux n'est pas correct
-SAAJ0547.soap.cannot.externalize=SAAJ0547 : erreur lors de la tentative d'externalisation
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548 : impossible d'externaliser l'en-t\u00EAte
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549 : Content-Type incorrect pour la partie SOAP {0}
-SAAJ0550.soap.null.headers=SAAJ0550 : impossible de cr\u00E9er le message : les en-t\u00EAtes ne peuvent pas \u00EAtre NULL
-SAAJ0551.soap.unsupported.encoding=SAAJ0551 : encodage {0} non pris en charge
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552 : \u00E9chec de l'analyse de la d\u00E9claration XML
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553 : renameNode sur SOAPPart non pris en charge
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554 : normalizeDocument sur SOAPPart non pris en charge
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555 : getDomConfig sur SOAPPart non pris en charge
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556 : adoptNode sur SOAPPart non pris en charge
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557 : setDocumentURI sur SOAPPart non pris en charge
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558 : getDocumentURI sur SOAPPart non pris en charge
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559 : setStrictErrorChecking sur SOAPPart non pris en charge
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560 : getInputEncoding sur SOAPPart non pris en charge
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561 : getXmlEncoding sur SOAPPart non pris en charge
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562 : getXmlStandalone sur SOAPPart non pris en charge
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563 : setXmlStandalone sur SOAPPart non pris en charge
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564 : getXmlVersion sur SOAPPart non pris en charge
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565 : setXmlVersion sur SOAPPart non pris en charge
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566 : getStrictErrorChecking sur SOAPPart non pris en charge
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567 : argument {0} NULL pour {1}
-SAAJ0568.soap.unsupported.protocol=SAAJ0568 : le protocole {0} ne prend pas en charge {1}
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569 : protocole {0} inconnu indiqu\u00E9 pour la cr\u00E9ation de {1}
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570 : l'\u00E9l\u00E9ment parent d'une partie SOAP n'est pas d\u00E9fini
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571 : la valeur de param\u00E8tre d'une partie SOAP n'est pas d\u00E9finie
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572 : aucun contenu/gestionnaire de donn\u00E9es associ\u00E9 \u00E0 cette pi\u00E8ce jointe
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573 : exception d'E/S lors de la lecture du contenu de la pi\u00E8ce jointe raw
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574 : exception d'E/S lors de la tentative d'obtention du flux d'entr\u00E9e \u00E0 partir du gestionnaire de donn\u00E9es pour cette pi\u00E8ce jointe
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575 : exception lors de la tentative d'extraction du contenu pour cette pi\u00E8ce jointe
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576 : exception lors de la tentative de d\u00E9finition du contenu Raw pour cette pi\u00E8ce jointe
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577 : exception lors de la tentative d'obtention du contenu Raw pour cette pi\u00E8ce jointe
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578 : exception lors de la tentative de d\u00E9finition du contenu Decoded pour cette pi\u00E8ce jointe
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579 : exception lors de la tentative d'obtention du contenu Encoded pour cette pi\u00E8ce jointe
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590 : impossible de localiser la pi\u00E8ce jointe avec le CID {0}
-SAAJ0591.soap.exception.in.set.property=SAAJ0591 : exception {0} lors de la tentative de d\u00E9finition de la propri\u00E9t\u00E9 {1} sur le message SOAP
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580 : Content-Type d\u00E9fini sur {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties
deleted file mode 100644
index 4ee689e6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: Errore dell''handler dei dati: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: Nessun handler dei dati associato a questo allegato
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: Argomento dataHandler nullo per setDataHandler
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: Impossibile esternalizzare l'allegato
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: Impossibile copiare l'intestazione MIME
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: Impossibile copiare le intestazioni MIME nell'allegato
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: Impossibile registrare gli handler nella mappa dei comandi JAF
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: Impossibile creare l'envelope dall'origine specificata
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: Impossibile creare l'envelope dall'origine specificata
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: Impossibile creare l'envelope: factory errato usato durante la costruzione della struttura
-SAAJ0513.soap.unknown.ns=SAAJ0513: Impossibile creare l'envelope dall'origine specificata poich\u00E9 lo spazio di nomi non \u00E8 stato riconosciuto
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: Impossibile creare l'envelope dall'origine specificata poich\u00E9 l'elemento radice non \u00E8 denominato Envelope
-SAAJ0515.source.reset.exception=SAAJ0515: Impossibile reimpostare l'origine del contenuto soap-part
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler richiede un oggetto di immagine, ma l''oggetto specificato \u00E8 di tipo {0}
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type impostato per {0}
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: Content-Type non valido {0} per ImageContentHandler
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: Oggetto nullo per ImageContentHandler
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: Impossibile eseguire il codificatore JPEG su un flusso
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: Impossibile codificare l'immagine in un flusso
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: Tipo MIME {0} non supportato
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Content-Type non riconosciuto
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: Impossibile analizzare il tipo di contenuto
-SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type assente
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: Impossibile creare il messaggio: Content-Type errato per la versione SOAP. Ricevuto {0}, ma previsto {1}
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Content-Type non riconosciuto
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: Impossibile rendere interno il messaggio
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type deve essere Multipart/Related e con type=text/xml
-SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type non valido. Potrebbe essere un messaggio di errore anzich\u00E9 un messaggio SOAP
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: Impossibile convertire il messaggio SOAP in un oggetto Multipart
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: Impossibile recuperare il flusso di intestazioni in saveChanges
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: Errore durante il salvataggio di un messaggio multiparte
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: Impossibile completare l'operazione. Frammento non associato alla SOAP Part
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: Le istruzioni di elaborazione non sono consentite nei documenti SOAP
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: I riferimenti alle entit\u00E0 non sono consentiti nei documenti SOAP
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: L'origine non ha un lettore o un flusso di input valido
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: Errore di impostazione dell''origine per SOAPPart
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Errore interno: flusso di tipo errato
-SAAJ0547.soap.cannot.externalize=SAAJ0547: Errore durante il tentativo di esternalizzazione
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: Impossibile esternalizzare l'intestazione
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: Content-Type non valido per SOAP Part {0}
-SAAJ0550.soap.null.headers=SAAJ0550: Impossibile creare il messaggio: le intestazioni non possono essere nulle
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: Codifica {0} non supportata
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: Analisi della dichiarazione XML non riuscita
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode su SOAPPart non supportato
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument su SOAPPart non supportato
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig su SOAPPart non supportato
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode su SOAPPart non supportato
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI su SOAPPart non supportato
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI su SOAPPart non supportato
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking su SOAPPart non supportato
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding su SOAPPart non supportato
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding su SOAPPart non supportato
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone su SOAPPart non supportato
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone su SOAPPart non supportato
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion su SOAPPart non supportato
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion su SOAPPart non supportato
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking su SOAPPart non supportato
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: Argomento {0} nullo a {1}
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: Il protocollo {0} non supporta {1}
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: Protocollo sconosciuto {0} specificato per la creazione di {1}
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: L'elemento padre di una SOAP Part non \u00E8 definito
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: Il valore di impostazione di una SOAP Part non \u00E8 definito
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: Nessun handler dei dati/contenuto associato a questo allegato
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: IOException durante la lettura del contenuto dell'allegato di tipo RAW
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: IOException durante il tentativo di ottenere il flusso di input dall'handler dei dati per questo allegato
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: Eccezione durante il tentativo di recuperare il contenuto per questo allegato
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: Eccezione durante il tentativo di impostare il contenuto di tipo RAW per questo allegato
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: Eccezione durante il tentativo di recuperare il contenuto di tipo RAW per questo allegato
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: Eccezione durante il tentativo di impostare il contenuto decodificato per questo allegato
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: Eccezione durante il tentativo di recuperare il contenuto codificato per questo allegato
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: Impossibile trovare l''allegato con cid {0}
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: Eccezione {0} durante il tentativo di impostare Property {1} su SOAP Message
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type impostato per {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties
deleted file mode 100644
index 18cb2776..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: \u30C7\u30FC\u30BF\u30FB\u30CF\u30F3\u30C9\u30E9\u30FB\u30A8\u30E9\u30FC: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: \u3053\u306E\u6DFB\u4ED8\u306B\u30C7\u30FC\u30BF\u30FB\u30CF\u30F3\u30C9\u30E9\u304C\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: setDataHandler\u306B\u5BFE\u3059\u308BdataHandler\u5F15\u6570\u304Cnull\u3067\u3059
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: \u6DFB\u4ED8\u3092\u5916\u90E8\u5316\u3067\u304D\u307E\u305B\u3093
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: MIME\u30D8\u30C3\u30C0\u30FC\u3092\u30B3\u30D4\u30FC\u3067\u304D\u307E\u305B\u3093
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: MIME\u30D8\u30C3\u30C0\u30FC\u3092\u6DFB\u4ED8\u306B\u30B3\u30D4\u30FC\u3067\u304D\u307E\u305B\u3093
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: JAF\u30B3\u30DE\u30F3\u30C9\u30FB\u30DE\u30C3\u30D7\u306B\u30CF\u30F3\u30C9\u30E9\u3092\u767B\u9332\u3067\u304D\u307E\u305B\u3093
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: \u7279\u5B9A\u306E\u30BD\u30FC\u30B9\u304B\u3089\u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: \u7279\u5B9A\u306E\u30BD\u30FC\u30B9\u304B\u3089\u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: \u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093: \u30C4\u30EA\u30FC\u306E\u69CB\u7BC9\u4E2D\u306B\u7121\u52B9\u306A\u30D5\u30A1\u30AF\u30C8\u30EA\u304C\u4F7F\u7528\u3055\u308C\u307E\u3057\u305F
-SAAJ0513.soap.unknown.ns=SAAJ0513: \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u8A8D\u8B58\u3055\u308C\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u7279\u5B9A\u306E\u30BD\u30FC\u30B9\u304B\u3089\u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: \u30EB\u30FC\u30C8\u8981\u7D20\u306E\u540D\u524D\u304CEnvelope\u3067\u306F\u306A\u3044\u305F\u3081\u3001\u7279\u5B9A\u306E\u30BD\u30FC\u30B9\u304B\u3089\u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-SAAJ0515.source.reset.exception=SAAJ0515: soap-part\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30BD\u30FC\u30B9\u3092\u30EA\u30BB\u30C3\u30C8\u3067\u304D\u307E\u305B\u3093
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler\u306B\u306FImage\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u5FC5\u8981\u3067\u3059\u304C\u3001\u30BF\u30A4\u30D7{0}\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type\u304C{0}\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: ImageContentHandler\u306Econtent-type {0}\u304C\u7121\u52B9\u3067\u3059
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: ImageContentHandler\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304Cnull\u3067\u3059
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: \u30B9\u30C8\u30EA\u30FC\u30E0\u3067JPEG\u30A8\u30F3\u30B3\u30FC\u30C0\u3092\u5B9F\u884C\u3067\u304D\u307E\u305B\u3093
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: \u30A4\u30E1\u30FC\u30B8\u3092\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u30A8\u30F3\u30B3\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: MIME\u30BF\u30A4\u30D7{0}\u304C\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Content-Type\u304C\u8A8D\u8B58\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: \u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30BF\u30A4\u30D7\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093
-SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type\u304C\u3042\u308A\u307E\u305B\u3093
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093: SOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u306Econtent-type\u304C\u7121\u52B9\u3067\u3059\u3002{0}\u304C\u53D6\u5F97\u3055\u308C\u307E\u3057\u305F\u304C\u3001{1}\u304C\u4E88\u671F\u3055\u308C\u307E\u3059
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Content-Type\u304C\u8A8D\u8B58\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u5185\u90E8\u5316\u3067\u304D\u307E\u305B\u3093
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type\u306FMultipart/Related\u3067\u3042\u308A\u3001type=text/xml\u307E\u305F\u306Fapplication/soap+xml\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type\u304C\u7121\u52B9\u3067\u3059\u3002SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u304B\u308F\u308A\u306B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306A\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u3092Multipart\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306B\u5909\u63DB\u3067\u304D\u307E\u305B\u3093
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: saveChanges\u3067\u30D8\u30C3\u30C0\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: multipart\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u4FDD\u5B58\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: \u64CD\u4F5C\u3092\u5B8C\u4E86\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u304CSOAP\u30D1\u30FC\u30C8\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: SOAP\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u51E6\u7406\u547D\u4EE4\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: SOAP\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: \u30BD\u30FC\u30B9\u306B\u6709\u52B9\u306AReader\u307E\u305F\u306FInputStream\u304C\u3042\u308A\u307E\u305B\u3093
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: SOAPPart\u306E\u30BD\u30FC\u30B9\u3092\u8A2D\u5B9A\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: \u5185\u90E8\u30A8\u30E9\u30FC: \u30B9\u30C8\u30EA\u30FC\u30E0\u306E\u30BF\u30A4\u30D7\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093
-SAAJ0547.soap.cannot.externalize=SAAJ0547: \u5916\u90E8\u5316\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: \u30D8\u30C3\u30C0\u30FC\u3092\u5916\u90E8\u5316\u3067\u304D\u307E\u305B\u3093
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: SOAP\u30D1\u30FC\u30C8{0}\u306EContent-Type\u304C\u7121\u52B9\u3067\u3059
-SAAJ0550.soap.null.headers=SAAJ0550: \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093: \u30D8\u30C3\u30C0\u30FC\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0{0}\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: XML\u5BA3\u8A00\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: SOAPPart\u306ErenameNode\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: SOAPPart\u306EnormalizeDocument\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: SOAPPart\u306EgetDomConfig\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: SOAPPart\u306EadoptNode\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: SOAPPart\u306EsetDocumentURI\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: SOAPPart\u306EgetDocumentURI\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: SOAPPart\u306EsetStrictErrorChecking\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: SOAPPart\u306EgetInputEncoding\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: SOAPPart\u306EgetXmlEncoding\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: SOAPPart\u306EgetXmlStandalone\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: SOAPPart\u306EsetXmlStandalone\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: SOAPPart\u306EgetXmlVersion\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: SOAPPart\u306EsetXmlVersion\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: SOAPPart\u306EgetStrictErrorChecking\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: {1}\u306B\u5BFE\u3059\u308B{0}\u5F15\u6570\u304Cnull\u3067\u3059
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: \u30D7\u30ED\u30C8\u30B3\u30EB{0}\u306F{1}\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u307E\u305B\u3093
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: {1}\u306E\u4F5C\u6210\u306B\u5BFE\u3057\u3066\u4E0D\u660E\u306A\u30D7\u30ED\u30C8\u30B3\u30EB{0}\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: SOAP\u30D1\u30FC\u30C8\u306E\u89AA\u8981\u7D20\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: SOAP\u30D1\u30FC\u30C8\u306E\u8A2D\u5B9A\u5024\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: \u3053\u306E\u6DFB\u4ED8\u306B\u30C7\u30FC\u30BF\u30FB\u30CF\u30F3\u30C9\u30E9/\u30B3\u30F3\u30C6\u30F3\u30C4\u304C\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: raw\u6DFB\u4ED8\u30B3\u30F3\u30C6\u30F3\u30C4\u306E\u8AAD\u53D6\u308A\u4E2D\u306BIOException\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: \u3053\u306E\u6DFB\u4ED8\u306Edatahandler\u304B\u3089inputstream\u3092\u53D6\u5F97\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306BIOException\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: \u3053\u306E\u6DFB\u4ED8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u53D6\u5F97\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: \u3053\u306E\u6DFB\u4ED8\u306ERaw\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u8A2D\u5B9A\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: \u3053\u306E\u6DFB\u4ED8\u306ERaw\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u53D6\u5F97\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: \u3053\u306E\u6DFB\u4ED8\u306E\u30C7\u30B3\u30FC\u30C9\u3055\u308C\u305F\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u8A2D\u5B9A\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: \u3053\u306E\u6DFB\u4ED8\u306E\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u305F\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u53D6\u5F97\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: cid {0}\u306E\u6DFB\u4ED8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u3067\u30D7\u30ED\u30D1\u30C6\u30A3{1}\u3092\u8A2D\u5B9A\u3057\u3088\u3046\u3068\u3057\u305F\u3068\u304D\u306B\u4F8B\u5916{0}\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type\u304C{0}\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties
deleted file mode 100644
index 384849a5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: \uB370\uC774\uD130 \uCC98\uB9AC\uAE30 \uC624\uB958: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uACFC \uC5F0\uAD00\uB41C \uB370\uC774\uD130 \uCC98\uB9AC\uAE30\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: setDataHandler\uC5D0 \uB300\uD55C dataHandler \uC778\uC218\uAC00 \uB110\uC785\uB2C8\uB2E4.
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC678\uBD80\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: MIME \uD5E4\uB354\uB97C \uBCF5\uC0AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: MIME \uD5E4\uB354\uB97C \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uBCF5\uC0AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: JAF \uBA85\uB839 \uB9F5\uC5D0\uC11C \uCC98\uB9AC\uAE30\uB97C \uB4F1\uB85D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: \uC81C\uACF5\uB41C \uC18C\uC2A4\uC5D0\uC11C Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: \uC81C\uACF5\uB41C \uC18C\uC2A4\uC5D0\uC11C Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: \uD2B8\uB9AC \uC0DD\uC131 \uC911 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 \uD329\uD1A0\uB9AC\uAC00 \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0513.soap.unknown.ns=SAAJ0513: \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uC778\uC2DD\uD560 \uC218 \uC5C6\uC5B4 \uC81C\uACF5\uB41C \uC18C\uC2A4\uC5D0\uC11C Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: \uB8E8\uD2B8 \uC694\uC18C\uAC00 Envelope\uB85C \uBA85\uBA85\uB418\uC9C0 \uC54A\uC544 \uC81C\uACF5\uB41C \uC18C\uC2A4\uC5D0\uC11C Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0515.source.reset.exception=SAAJ0515: soap-part \uCF58\uD150\uCE20 \uC18C\uC2A4\uB97C \uC7AC\uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler\uC5D0\uB294 \uC774\uBBF8\uC9C0 \uAC1D\uCCB4\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC {0} \uC720\uD615\uC758 \uAC1D\uCCB4\uAC00 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type\uC774 {0}(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: ImageContentHandler\uC5D0 \uB300\uD55C content-type {0}\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: ImageContentHandler\uC5D0 \uB300\uD55C \uAC1D\uCCB4\uAC00 \uB110\uC785\uB2C8\uB2E4.
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: \uC2A4\uD2B8\uB9BC\uC5D0\uC11C JPEG \uC778\uCF54\uB354\uB97C \uC2E4\uD589\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: \uC2A4\uD2B8\uB9BC\uC5D0 \uC774\uBBF8\uC9C0\uB97C \uC778\uCF54\uB529\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: {0}\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 mime \uC720\uD615\uC785\uB2C8\uB2E4.
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 Content-Type
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: \uCF58\uD150\uCE20 \uC720\uD615\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: \uBA54\uC2DC\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: SOAP \uBC84\uC804\uC5D0 \uB300\uD55C content-type\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. {0}\uC744(\uB97C) \uAC00\uC838\uC654\uC9C0\uB9CC {1}\uC774(\uAC00) \uD544\uC694\uD569\uB2C8\uB2E4.
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 Content-Type
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: \uBA54\uC2DC\uC9C0\uB97C \uB0B4\uBD80\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type\uC740 Multipart/Related\uC5EC\uC57C \uD558\uBA70 \uC720\uD615\uC774 text/xml \uB610\uB294 application/soap+xml\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. SOAP \uBA54\uC2DC\uC9C0\uAC00 \uC544\uB2CC \uC624\uB958 \uBA54\uC2DC\uC9C0\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: SOAP \uBA54\uC2DC\uC9C0\uB97C Multipart \uAC1D\uCCB4\uB85C \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: saveChanges\uC5D0\uC11C \uD5E4\uB354 \uC2A4\uD2B8\uB9BC\uC744 \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: Multipart \uBA54\uC2DC\uC9C0\uB97C \uC800\uC7A5\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: \uC791\uC5C5\uC744 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E8\uD3B8\uC774 SOAP \uBD80\uBD84\uC5D0 \uBC14\uC778\uB4DC\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: \uC9C0\uCE68 \uCC98\uB9AC\uB294 SOAP \uBB38\uC11C\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uB294 SOAP \uBB38\uC11C\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: \uC18C\uC2A4\uC5D0 \uC801\uD569\uD55C \uC77D\uAE30 \uC7A5\uCE58 \uB610\uB294 InputStream\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: SOAPPart\uC5D0 \uB300\uD55C \uC18C\uC2A4\uB97C \uC124\uC815\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: \uB0B4\uBD80 \uC624\uB958: \uC2A4\uD2B8\uB9BC\uC758 \uC720\uD615\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0547.soap.cannot.externalize=SAAJ0547: \uC678\uBD80\uD654\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: \uD5E4\uB354\uB97C \uC678\uBD80\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: SOAP \uBD80\uBD84 {0}\uC5D0 \uB300\uD55C Content-Type\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0550.soap.null.headers=SAAJ0550: \uBA54\uC2DC\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: \uD5E4\uB354\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: {0}\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC778\uCF54\uB529\uC785\uB2C8\uB2E4.
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: XML \uC120\uC5B8\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: SOAPPart\uC758 renameNode\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: SOAPPart\uC758 normalizeDocument\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: SOAPPart\uC758 getDomConfig\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: SOAPPart\uC758 adoptNode\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: SOAPPart\uC758 setDocumentURI\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: SOAPPart\uC758 getDocumentURI\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: SOAPPart\uC758 setStrictErrorChecking\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: SOAPPart\uC758 getInputEncoding\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: SOAPPart\uC758 getXmlEncoding\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: SOAPPart\uC758 getXmlStandalone\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: SOAPPart\uC758 setXmlStandalone\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: SOAPPart\uC758 getXmlVersion\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: SOAPPart\uC758 setXmlVersion\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: SOAPPart\uC758 getStrictErrorChecking\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: {1}\uC5D0 \uB300\uD55C {0} \uC778\uC218\uAC00 \uB110\uC785\uB2C8\uB2E4.
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: {0} \uD504\uB85C\uD1A0\uCF5C\uC740 {1}\uC744(\uB97C) \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: {1} \uC0DD\uC131\uC744 \uC704\uD574 \uC54C \uC218 \uC5C6\uB294 \uD504\uB85C\uD1A0\uCF5C {0}\uC774(\uAC00) \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: SOAP \uBD80\uBD84\uC758 \uC0C1\uC704 \uC694\uC18C\uAC00 \uC815\uC758\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: SOAP \uBD80\uBD84\uC758 \uC124\uC815 \uAC12\uC774 \uC815\uC758\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uACFC \uC5F0\uAD00\uB41C \uB370\uC774\uD130 \uCC98\uB9AC\uAE30/\uCF58\uD150\uCE20\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: \uC6D0\uC2DC \uCCA8\uBD80 \uD30C\uC77C \uCF58\uD150\uCE20\uB97C \uC77D\uB294 \uC911 IOException\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD574 \uB370\uC774\uD130 \uCC98\uB9AC\uAE30\uC5D0\uC11C \uC785\uB825 \uC2A4\uD2B8\uB9BC\uC744 \uAC00\uC838\uC624\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 IOException\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uCF58\uD150\uCE20\uB97C \uAC80\uC0C9\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uC6D0\uC2DC \uCF58\uD150\uCE20\uB97C \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uC6D0\uC2DC \uCF58\uD150\uCE20\uB97C \uAC00\uC838\uC624\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uB514\uCF54\uB529\uB41C \uCF58\uD150\uCE20\uB97C \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uC778\uCF54\uB529\uB41C \uCF58\uD150\uCE20\uB97C \uAC00\uC838\uC624\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: CID\uAC00 {0}\uC778 \uCCA8\uBD80 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: SOAP \uBA54\uC2DC\uC9C0\uC5D0\uC11C {1} \uC18D\uC131\uC744 \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 {0} \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type\uC774 {0}(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties
deleted file mode 100644
index 092c19c9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: erro do handler de dados: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: n\u00E3o h\u00E1 handler de dados associado a este anexo
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: argumento dataHandler nulo para setDataHandler
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: n\u00E3o \u00E9 poss\u00EDvel externalizar o anexo
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: n\u00E3o \u00E9 poss\u00EDvel copiar o cabe\u00E7alho MIME
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: n\u00E3o \u00E9 poss\u00EDvel copiar cabe\u00E7alhos MIME no anexo
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: n\u00E3o \u00E9 poss\u00EDvel registrar os handlers no mapa de comando JAF
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: n\u00E3o \u00E9 poss\u00EDvel criar o envelope da origem fornecida
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: n\u00E3o \u00E9 poss\u00EDvel criar o envelope da origem fornecida
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: n\u00E3o \u00E9 poss\u00EDvel criar o envelope: factory incorreta usada durante a constru\u00E7\u00E3o da \u00E1rvore
-SAAJ0513.soap.unknown.ns=SAAJ0513: n\u00E3o \u00E9 poss\u00EDvel criar o envelope da origem fornecida porque o namespace n\u00E3o era reconhecido
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: n\u00E3o \u00E9 poss\u00EDvel criar o envelope da origem fornecida porque o elemento-raiz n\u00E3o \u00E9 um Envelope nomeado
-SAAJ0515.source.reset.exception=SAAJ0515: n\u00E3o \u00E9 poss\u00EDvel redefinir a origem de conte\u00FAdo da parte de soap
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler requer objeto da Imagem, mas foi fornecido o objeto do tipo {0}
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Tipo de Conte\u00FAdo definido como {0}
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: tipo de conte\u00FAdo {0} inv\u00E1lido para ImageContentHandler
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: objeto nulo para ImageContentHandler
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: n\u00E3o \u00E9 poss\u00EDvel executar o Codificador JPEG em um fluxo
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: n\u00E3o \u00E9 poss\u00EDvel codificar a imagem em um fluxo
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: tipo de mime {0} n\u00E3o suportado
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: tipo de Conte\u00FAdo N\u00E3o Reconhecido
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: n\u00E3o \u00E9 poss\u00EDvel fazer parse do tipo de conte\u00FAdo
-SAAJ0532.soap.no.Content-Type=SAAJ0532: tipo de Conte\u00FAdo Inexistente
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: n\u00E3o \u00E9 poss\u00EDvel criar a mensagem: tipo de conte\u00FAdo incorreto para a vers\u00E3o SOAP. Obteve {0}, mas esperava {1}
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: tipo de Conte\u00FAdo N\u00E3o Reconhecido
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: n\u00E3o \u00E9 poss\u00EDvel internalizar a mensagem
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: o Tipo de Conte\u00FAdo precisa ser de V\u00E1rias Partes/Relacionado com tipo=texto/xml ou aplica\u00E7\u00E3o/soap+xml
-SAAJ0537.soap.invalid.content-type=SAAJ0537: tipo de Conte\u00FAdo Inv\u00E1lido. Pode ser uma mensagem de erro, em vez de uma mensagem SOAP
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: n\u00E3o \u00E9 poss\u00EDvel converter a mensagem SOAP em um objeto de V\u00E1rias partes
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: n\u00E3o \u00E9 poss\u00EDvel obter fluxo do cabe\u00E7alho em saveChanges
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: erro ao salvar uma mensagem de v\u00E1rias partes
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: n\u00E3o foi poss\u00EDvel concluir a opera\u00E7\u00E3o. Fragmento n\u00E3o vinculado \u00E0 parte de SOAP
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: as instru\u00E7\u00F5es de processamento n\u00E3o s\u00E3o permitidas nos documentos de SOAP
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: refer\u00EAncias da entidade n\u00E3o s\u00E3o permitidas nos documentos SOAP
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: a origem n\u00E3o tem um Reader ou InputStream v\u00E1lido
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: erro ao definir a origem de SOAPPart
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Erro interno: o fluxo n\u00E3o \u00E9 do tipo correto
-SAAJ0547.soap.cannot.externalize=SAAJ0547: erro ao tentar externalizar
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: n\u00E3o \u00E9 poss\u00EDvel externalizar o cabe\u00E7alho
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: tipo de Conte\u00FAdo Inv\u00E1lido para a Parte {0} de SOAP
-SAAJ0550.soap.null.headers=SAAJ0550: n\u00E3o \u00E9 poss\u00EDvel criar a mensagem: os cabe\u00E7alhos n\u00E3o podem ser nulos
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: codifica\u00E7\u00E3o n\u00E3o suportada {0}
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: falha ao fazer parse da declara\u00E7\u00E3o XML
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode em SOAPPart n\u00E3o suportado
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument em SOAPPart n\u00E3o suportado
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig em SOAPPart n\u00E3o suportado
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode em SOAPPart n\u00E3o suportado
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI em SOAPPart n\u00E3o suportado
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI em SOAPPart n\u00E3o suportado
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking em SOAPPart n\u00E3o suportado
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding em SOAPPart n\u00E3o suportado
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding em SOAPPart n\u00E3o suportado
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone em SOAPPart n\u00E3o suportado
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone em SOAPPart n\u00E3o suportado
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion em SOAPPart n\u00E3o suportado
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion em SOAPPart n\u00E3o suportado
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking em SOAPPart n\u00E3o suportado
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: argumento {0} nulo para {1}
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: o protocolo {0} n\u00E3o suporta {1}
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: protocolo {0} Desconhecido especificado para criar {1}
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: o elemento pai da parte de soap n\u00E3o foi definido
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: o valor de defini\u00E7\u00E3o de uma parte de soap n\u00E3o foi definido
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: n\u00E3o h\u00E1 handler/conte\u00FAdo de dados associado a este anexo
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: IOException ao ler o conte\u00FAdo do anexo bruto
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: IOException ao tentar obter o inputstream de datahandler deste anexo
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: exce\u00E7\u00E3o ao tentar recuperar o conte\u00FAdo deste anexo
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: exce\u00E7\u00E3o ao tentar definir o conte\u00FAdo Bruto deste anexo
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: exce\u00E7\u00E3o ao tentar definir o conte\u00FAdo Bruto deste anexo
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: exce\u00E7\u00E3o ao tentar definir o conte\u00FAdo Decodificado deste anexo
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: exce\u00E7\u00E3o ao tentar obter o conte\u00FAdo Codificado deste anexo
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: n\u00E3o \u00E9 poss\u00EDvel localizar o anexo como o cid {0}
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: exce\u00E7\u00E3o {0} ao tentar definir a Propriedade {1} na Mensagem SOAP
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Tipo de Conte\u00FAdo definido como {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties
deleted file mode 100644
index 7dbd1a6a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: \u6570\u636E\u5904\u7406\u7A0B\u5E8F\u9519\u8BEF: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: \u6CA1\u6709\u4E0E\u6B64\u9644\u4EF6\u5173\u8054\u7684\u6570\u636E\u5904\u7406\u7A0B\u5E8F
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: setDataHandler \u7684 dataHandler \u53C2\u6570\u4E3A\u7A7A\u503C
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: \u65E0\u6CD5\u4F7F\u9644\u4EF6\u5916\u90E8\u5316
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: \u65E0\u6CD5\u590D\u5236 MIME \u6807\u5934
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: \u65E0\u6CD5\u5C06 MIME \u6807\u5934\u590D\u5236\u5230\u9644\u4EF6\u4E2D
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: \u65E0\u6CD5\u6CE8\u518C JAF \u547D\u4EE4\u6620\u5C04\u4E2D\u7684\u5904\u7406\u7A0B\u5E8F
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: \u65E0\u6CD5\u4ECE\u7ED9\u5B9A\u6E90\u521B\u5EFA\u4FE1\u5C01
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: \u65E0\u6CD5\u4ECE\u7ED9\u5B9A\u6E90\u521B\u5EFA\u4FE1\u5C01
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: \u65E0\u6CD5\u521B\u5EFA\u4FE1\u5C01: \u5728\u6811\u6784\u9020\u671F\u95F4\u4F7F\u7528\u7684\u5DE5\u5382\u4E0D\u6B63\u786E
-SAAJ0513.soap.unknown.ns=SAAJ0513: \u65E0\u6CD5\u4ECE\u7ED9\u5B9A\u6E90\u521B\u5EFA\u4FE1\u5C01, \u56E0\u4E3A\u65E0\u6CD5\u8BC6\u522B\u540D\u79F0\u7A7A\u95F4
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: \u65E0\u6CD5\u4ECE\u7ED9\u5B9A\u6E90\u521B\u5EFA\u4FE1\u5C01, \u56E0\u4E3A\u6839\u5143\u7D20\u4E0D\u662F\u547D\u540D\u7684\u4FE1\u5C01
-SAAJ0515.source.reset.exception=SAAJ0515: \u65E0\u6CD5\u91CD\u7F6E soap-part \u5185\u5BB9\u6E90
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler \u9700\u8981 Image \u5BF9\u8C61, \u4F46\u5374\u5F97\u5230\u7C7B\u578B\u4E3A{0}\u7684\u5BF9\u8C61
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type \u8BBE\u7F6E\u4E3A{0}
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: ImageContentHandler \u7684 content-type {0}\u65E0\u6548
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: ImageContentHandler \u7684\u5BF9\u8C61\u4E3A\u7A7A\u503C
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: \u65E0\u6CD5\u5728\u6D41\u4E0A\u8FD0\u884C JPEG \u7F16\u7801\u5668
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: \u65E0\u6CD5\u5C06\u56FE\u50CF\u7F16\u7801\u4E3A\u6D41
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: \u4E0D\u652F\u6301\u7684 mime \u7C7B\u578B{0}
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: \u65E0\u6CD5\u8BC6\u522B\u7684 Content-Type
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: \u65E0\u6CD5\u89E3\u6790\u5185\u5BB9\u7C7B\u578B
-SAAJ0532.soap.no.Content-Type=SAAJ0532: \u7F3A\u5C11 Content-Type
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: \u65E0\u6CD5\u521B\u5EFA\u6D88\u606F: SOAP \u7248\u672C\u7684 content-type \u4E0D\u6B63\u786E\u3002\u5F97\u5230\u7684\u662F{0}, \u4F46\u5E94\u4E3A{1}
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: \u65E0\u6CD5\u8BC6\u522B\u7684 Content-Type
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: \u65E0\u6CD5\u4F7F\u6D88\u606F\u5185\u90E8\u5316
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type \u5FC5\u987B\u662F\u201C\u591A\u90E8\u5206/\u76F8\u5173\u201D\u5E76\u4E14\u5E26\u6709 type=text/xml \u6216 application/soap+xml
-SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type \u65E0\u6548\u3002\u53EF\u4EE5\u662F\u9519\u8BEF\u6D88\u606F, \u4F46\u4E0D\u80FD\u662F SOAP \u6D88\u606F
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: \u65E0\u6CD5\u5C06 SOAP \u6D88\u606F\u8F6C\u6362\u4E3A\u591A\u90E8\u5206\u5BF9\u8C61
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: \u65E0\u6CD5\u5728 saveChanges \u4E2D\u83B7\u53D6\u6807\u5934\u6D41
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: \u4FDD\u5B58\u591A\u90E8\u5206\u6D88\u606F\u671F\u95F4\u51FA\u9519
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: \u65E0\u6CD5\u5B8C\u6210\u64CD\u4F5C\u3002\u7247\u6BB5\u672A\u7ED1\u5B9A\u5230 SOAP \u90E8\u5206
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: SOAP \u6587\u6863\u4E2D\u4E0D\u5141\u8BB8\u5904\u7406\u6307\u4EE4
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: SOAP \u6587\u6863\u4E2D\u4E0D\u5141\u8BB8\u5B9E\u4F53\u5F15\u7528
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: \u6E90\u6CA1\u6709\u6709\u6548\u7684\u8BFB\u8FDB\u7A0B\u6216 InputStream
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: \u4E3A SOAPPart \u8BBE\u7F6E\u6E90\u65F6\u51FA\u9519
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: \u5185\u90E8\u9519\u8BEF: \u6D41\u7684\u7C7B\u578B\u4E0D\u6B63\u786E
-SAAJ0547.soap.cannot.externalize=SAAJ0547: \u5C1D\u8BD5\u5916\u90E8\u5316\u65F6\u51FA\u9519
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: \u65E0\u6CD5\u4F7F\u6807\u5934\u5916\u90E8\u5316
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: SOAP \u90E8\u5206{0}\u7684 Content-Type \u9519\u8BEF
-SAAJ0550.soap.null.headers=SAAJ0550: \u65E0\u6CD5\u521B\u5EFA\u6D88\u606F: \u6807\u5934\u4E0D\u80FD\u4E3A\u7A7A\u503C
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: \u4E0D\u652F\u6301\u7684\u7F16\u7801{0}
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: \u672A\u80FD\u89E3\u6790 XML \u58F0\u660E
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 renameNode
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 normalizeDocument
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getDomConfig
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 adoptNode
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 setDocumentURI
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getDocumentURI
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 setStrictErrorChecking
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getInputEncoding
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getXmlEncoding
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getXmlStandalone
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 setXmlStandalone
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getXmlVersion
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 setXmlVersion
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getStrictErrorChecking
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: {1}\u7684{0}\u53C2\u6570\u4E3A\u7A7A\u503C
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: \u534F\u8BAE{0}\u4E0D\u652F\u6301{1}
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: \u6307\u5B9A\u7528\u4E8E\u521B\u5EFA{1}\u7684\u534F\u8BAE{0}\u672A\u77E5
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: \u672A\u5B9A\u4E49 soap \u90E8\u5206\u7684\u7236\u5143\u7D20
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: \u672A\u5B9A\u4E49 soap \u90E8\u5206\u7684\u8BBE\u7F6E\u503C
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: \u6CA1\u6709\u4E0E\u6B64\u9644\u4EF6\u5173\u8054\u7684\u6570\u636E\u5904\u7406\u7A0B\u5E8F/\u5185\u5BB9
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: \u8BFB\u53D6\u539F\u59CB\u9644\u4EF6\u5185\u5BB9\u65F6\u51FA\u73B0 IOException
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: \u5C1D\u8BD5\u4ECE\u6B64\u9644\u4EF6\u7684\u6570\u636E\u5904\u7406\u7A0B\u5E8F\u83B7\u53D6\u8F93\u5165\u6D41\u65F6\u51FA\u73B0 IOException
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: \u5C1D\u8BD5\u68C0\u7D22\u6B64\u9644\u4EF6\u7684\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: \u5C1D\u8BD5\u8BBE\u7F6E\u6B64\u9644\u4EF6\u7684\u539F\u59CB\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: \u5C1D\u8BD5\u83B7\u53D6\u6B64\u9644\u4EF6\u7684\u539F\u59CB\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: \u5C1D\u8BD5\u8BBE\u7F6E\u6B64\u9644\u4EF6\u7684\u89E3\u7801\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: \u5C1D\u8BD5\u83B7\u53D6\u6B64\u9644\u4EF6\u7684\u7F16\u7801\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: \u65E0\u6CD5\u627E\u5230\u5177\u6709 cid {0} \u7684\u9644\u4EF6
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: \u5C1D\u8BD5\u8BBE\u7F6E SOAP \u6D88\u606F\u7684\u5C5E\u6027{1}\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF{0}
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type \u8BBE\u7F6E\u4E3A{0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties
deleted file mode 100644
index c5694446..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: \u8CC7\u6599\u8655\u7406\u7A0B\u5F0F\u932F\u8AA4: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: \u6C92\u6709\u8207\u6B64\u9644\u4EF6\u76F8\u95DC\u806F\u7684\u8CC7\u6599\u8655\u7406\u7A0B\u5F0F
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: setDataHandler \u7684 dataHandler \u5F15\u6578\u70BA\u7A7A\u503C
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: \u7121\u6CD5\u5C07\u9644\u4EF6\u5916\u90E8\u5316
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: \u7121\u6CD5\u8907\u88FD MIME \u6A19\u982D
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: \u7121\u6CD5\u5C07 MIME \u6A19\u982D\u8907\u88FD\u5230\u9644\u4EF6\u4E2D
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: \u7121\u6CD5\u5728 JAF \u547D\u4EE4\u5C0D\u61C9\u4E2D\u8A3B\u518A\u8655\u7406\u7A0B\u5F0F
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: \u7121\u6CD5\u5F9E\u6307\u5B9A\u7684\u4F86\u6E90\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: \u7121\u6CD5\u5F9E\u6307\u5B9A\u7684\u4F86\u6E90\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: \u7121\u6CD5\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F: \u5EFA\u69CB\u6A39\u72C0\u7D50\u69CB\u6642\u4F7F\u7528\u4E86\u4E0D\u6B63\u78BA\u7684\u8655\u7406\u7AD9
-SAAJ0513.soap.unknown.ns=SAAJ0513: \u7121\u6CD5\u5F9E\u6307\u5B9A\u7684\u4F86\u6E90\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F, \u56E0\u70BA\u7121\u6CD5\u8FA8\u8B58\u8A72\u547D\u540D\u7A7A\u9593
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: \u7121\u6CD5\u5F9E\u6307\u5B9A\u7684\u4F86\u6E90\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F, \u56E0\u70BA\u6839\u5143\u7D20\u4E0D\u662F\u6307\u5B9A\u7684 Envelope
-SAAJ0515.source.reset.exception=SAAJ0515: \u7121\u6CD5\u91CD\u8A2D soap-part \u5167\u5BB9\u4F86\u6E90
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler \u9700\u8981 Image \u7269\u4EF6, \u4F46\u662F\u63D0\u4F9B\u7684\u662F {0} \u985E\u578B\u7684\u7269\u4EF6
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type \u8A2D\u70BA {0}
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: ImageContentHandler \u7684 content-type {0} \u7121\u6548
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: ImageContentHandler \u7684\u7269\u4EF6\u70BA\u7A7A\u503C
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: \u7121\u6CD5\u5728\u4E32\u6D41\u4E0A\u57F7\u884C JPEG \u7DE8\u78BC\u5668
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: \u7121\u6CD5\u5C07\u5F71\u50CF\u7DE8\u78BC\u70BA\u4E32\u6D41
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: \u4E0D\u652F\u63F4\u7684 MIME \u985E\u578B {0}
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: \u7121\u6CD5\u8FA8\u8B58\u7684 Content-Type
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: \u7121\u6CD5\u5256\u6790\u5167\u5BB9\u985E\u578B
-SAAJ0532.soap.no.Content-Type=SAAJ0532: \u7F3A\u5C11 Content-Type
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: \u7121\u6CD5\u5EFA\u7ACB\u8A0A\u606F: SOAP \u7248\u672C\u7684 content-type \u4E0D\u6B63\u78BA. \u5F97\u5230 {0}, \u4F46\u61C9\u8A72\u662F {1}
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: \u7121\u6CD5\u8FA8\u8B58\u7684 Content-Type
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: \u7121\u6CD5\u5C07\u8A0A\u606F\u5167\u90E8\u5316
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type \u5FC5\u9808\u662F Multipart/Related, \u4E14\u542B type=text/xml \u6216 application/soap+xml
-SAAJ0537.soap.invalid.content-type=SAAJ0537: \u7121\u6548\u7684 Content-Type. \u53EF\u80FD\u662F\u53D6\u4EE3 SOAP \u8A0A\u606F\u7684\u932F\u8AA4\u8A0A\u606F
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: \u7121\u6CD5\u5C07 SOAP \u8A0A\u606F\u8F49\u63DB\u70BA Multipart \u7269\u4EF6
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: \u7121\u6CD5\u81EA saveChanges \u53D6\u5F97\u6A19\u982D\u4E32\u6D41
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: \u5132\u5B58\u591A\u91CD\u90E8\u5206\u8A0A\u606F\u6642\u767C\u751F\u932F\u8AA4
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: \u7121\u6CD5\u5B8C\u6210\u4F5C\u696D. \u7247\u6BB5\u672A\u9023\u7D50\u81F3 SOAP \u90E8\u5206
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: SOAP \u6587\u4EF6\u4E2D\u4E0D\u5141\u8A31\u300C\u8655\u7406\u6307\u793A\u300D
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: SOPA \u6587\u4EF6\u4E2D\u4E0D\u5141\u8A31\u300C\u500B\u9AD4\u53C3\u7167\u300D
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: \u4F86\u6E90\u6C92\u6709\u6709\u6548\u7684 Reader \u6216 InputStream
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: \u8A2D\u5B9A SOAPPart \u7684\u4F86\u6E90\u6642\u767C\u751F\u932F\u8AA4
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: \u5167\u90E8\u932F\u8AA4: \u4E32\u6D41\u4E0D\u662F\u6B63\u78BA\u7684\u985E\u578B
-SAAJ0547.soap.cannot.externalize=SAAJ0547: \u5617\u8A66\u5916\u90E8\u5316\u6642\u767C\u751F\u932F\u8AA4
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: \u7121\u6CD5\u5C07\u6A19\u982D\u5916\u90E8\u5316
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: SOAP \u90E8\u5206 {0} \u7684 Content-Type \u932F\u8AA4
-SAAJ0550.soap.null.headers=SAAJ0550: \u7121\u6CD5\u5EFA\u7ACB\u8A0A\u606F: \u6A19\u982D\u4E0D\u5F97\u662F\u7A7A\u503C
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: \u4E0D\u652F\u63F4\u7684\u7DE8\u78BC {0}
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: XML \u5BA3\u544A\u5256\u6790\u5931\u6557
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 renameNode
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 normalizeDocument
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getDomConfig
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 adoptNode
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 setDocumentURI
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getDocumentURI
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 setStrictErrorChecking
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getInputEncoding
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getXmlEncoding
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getXmlStandalone
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 setXmlStandalone
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getXmlVersion
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 setXmlVersion
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getStrictErrorChecking
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: {1} \u7684 {0} \u5F15\u6578\u662F\u7A7A\u503C
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: \u5354\u5B9A {0} \u4E0D\u652F\u63F4 {1}
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: \u5EFA\u7ACB {1} \u6642\u6307\u5B9A\u4E86\u4E0D\u660E\u7684\u5354\u5B9A {0}
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: \u672A\u5B9A\u7FA9 SOAP \u90E8\u5206\u7684\u7236\u9805\u5143\u7D20
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: \u672A\u5B9A\u7FA9 SOAP \u90E8\u5206\u7684\u8A2D\u5B9A\u503C
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: \u6C92\u6709\u8207\u6B64\u9644\u4EF6\u76F8\u95DC\u806F\u7684\u8CC7\u6599\u8655\u7406\u7A0B\u5F0F/\u5167\u5BB9
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: \u8B80\u53D6\u539F\u59CB\u9644\u4EF6\u5167\u5BB9\u6642\u767C\u751F IOException
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: \u5617\u8A66\u5F9E\u6B64\u9644\u4EF6\u7684 datahandler \u53D6\u5F97 inputstream \u6642\u767C\u751F IOException
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: \u5617\u8A66\u64F7\u53D6\u6B64\u9644\u4EF6\u7684\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: \u5617\u8A66\u8A2D\u5B9A\u6B64\u9644\u4EF6\u7684\u539F\u59CB\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: \u5617\u8A66\u53D6\u5F97\u6B64\u9644\u4EF6\u7684\u539F\u59CB\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: \u5617\u8A66\u8A2D\u5B9A\u6B64\u9644\u4EF6\u7684\u89E3\u78BC\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: \u5617\u8A66\u53D6\u5F97\u6B64\u9644\u4EF6\u7684\u89E3\u78BC\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: \u627E\u4E0D\u5230 cid \u70BA {0} \u7684\u9644\u4EF6
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: \u5617\u8A66\u5728 SOAP \u8A0A\u606F\u4E0A\u8A2D\u5B9A\u7279\u6027 {1} \u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1 {0}
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type \u8A2D\u70BA {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java
deleted file mode 100644
index e346f09c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.io.*;
-import java.util.logging.Logger;
-
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ParseException;
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl;
-import com.sun.xml.internal.messaging.saaj.soap.ver1_2.Message1_2Impl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-import com.sun.xml.internal.messaging.saaj.util.TeeInputStream;
-
-/**
- * A factory for creating SOAP messages.
- *
- * Converted to a placeholder for common functionality between SOAP
- * implementations.
- *
- * @author Phil Goodwin (phil.goodwin@sun.com)
- */
-public class MessageFactoryImpl extends MessageFactory {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
-
- protected OutputStream listener;
-
- protected boolean lazyAttachments = false;
-
- public OutputStream listen(OutputStream newListener) {
- OutputStream oldListener = listener;
- listener = newListener;
- return oldListener;
- }
-
- public SOAPMessage createMessage() throws SOAPException {
- throw new UnsupportedOperationException();
- }
-
- public SOAPMessage createMessage(boolean isFastInfoset,
- boolean acceptFastInfoset) throws SOAPException
- {
- throw new UnsupportedOperationException();
- }
-
- public SOAPMessage createMessage(MimeHeaders headers, InputStream in)
- throws SOAPException, IOException {
- String contentTypeString = MessageImpl.getContentType(headers);
-
- if (listener != null) {
- in = new TeeInputStream(in, listener);
- }
-
- try {
- ContentType contentType = new ContentType(contentTypeString);
- int stat = MessageImpl.identifyContentType(contentType);
-
- if (MessageImpl.isSoap1_1Content(stat)) {
- return new Message1_1Impl(headers,contentType,stat,in);
- } else if (MessageImpl.isSoap1_2Content(stat)) {
- return new Message1_2Impl(headers,contentType,stat,in);
- } else {
- log.severe("SAAJ0530.soap.unknown.Content-Type");
- throw new SOAPExceptionImpl("Unrecognized Content-Type");
- }
- } catch (ParseException e) {
- log.severe("SAAJ0531.soap.cannot.parse.Content-Type");
- throw new SOAPExceptionImpl(
- "Unable to parse content type: " + e.getMessage());
- }
- }
-
- protected static final String getContentType(MimeHeaders headers) {
- String[] values = headers.getHeader("Content-Type");
- if (values == null)
- return null;
- else
- return values[0];
- }
-
- public void setLazyAttachmentOptimization(boolean flag) {
- lazyAttachments = flag;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java
deleted file mode 100644
index e8e25a28..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java
+++ /dev/null
@@ -1,1436 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.io.*;
-import java.util.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.activation.DataHandler;
-import javax.activation.DataSource;
-import javax.xml.soap.*;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.Header;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.*;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl;
-import com.sun.xml.internal.messaging.saaj.util.*;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart;
-
-/**
- * The message implementation for SOAP messages with
- * attachments. Messages for specific profiles will likely extend this
- * MessageImpl class and add more value for that particular profile.
- *
- * @author Anil Vijendran (akv@eng.sun.com)
- * @author Rajiv Mordani (rajiv.mordani@sun.com)
- * @author Manveen Kaur (manveen.kaur@sun.com)
- */
-
-public abstract class MessageImpl
- extends SOAPMessage
- implements SOAPConstants {
-
-
- public static final String CONTENT_ID = "Content-ID";
- public static final String CONTENT_LOCATION = "Content-Location";
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
-
- protected static final int PLAIN_XML_FLAG = 1; // 00001
- protected static final int MIME_MULTIPART_FLAG = 2; // 00010
- protected static final int SOAP1_1_FLAG = 4; // 00100
- protected static final int SOAP1_2_FLAG = 8; // 01000
- //protected static final int MIME_MULTIPART_XOP_FLAG = 14; // 01110
- protected static final int MIME_MULTIPART_XOP_SOAP1_1_FLAG = 6; // 00110
- protected static final int MIME_MULTIPART_XOP_SOAP1_2_FLAG = 10; // 01010
- protected static final int XOP_FLAG = 13; // 01101
- protected static final int FI_ENCODED_FLAG = 16; // 10000
-
- protected MimeHeaders headers;
- protected ContentType contentType;
- protected SOAPPartImpl soapPartImpl;
- protected FinalArrayList attachments;
- protected boolean saved = false;
- protected byte[] messageBytes;
- protected int messageByteCount;
- protected HashMap properties = new HashMap();
-
- // used for lazy attachment initialization
- protected MimeMultipart multiPart = null;
- protected boolean attachmentsInitialized = false;
-
- /**
- * True if this part is encoded using Fast Infoset.
- * MIME -> application/fastinfoset
- */
- protected boolean isFastInfoset = false;
-
- /**
- * True if the Accept header of this message includes
- * application/fastinfoset
- */
- protected boolean acceptFastInfoset = false;
-
- protected MimeMultipart mmp = null;
-
- // if attachments are present, don't read the entire message in byte stream in saveTo()
- private boolean optimizeAttachmentProcessing = true;
-
- private InputStream inputStreamAfterSaveChanges = null;
-
- // switch back to old MimeMultipart incase of problem
- private static boolean switchOffBM = false;
- private static boolean switchOffLazyAttachment = false;
- private static boolean useMimePull = false;
-
- static {
- String s = SAAJUtil.getSystemProperty("saaj.mime.optimization");
- if ((s != null) && s.equals("false")) {
- switchOffBM = true;
- }
- s = SAAJUtil.getSystemProperty("saaj.lazy.mime.optimization");
- if ((s != null) && s.equals("false")) {
- switchOffLazyAttachment = true;
- }
- useMimePull = SAAJUtil.getSystemBoolean("saaj.use.mimepull");
-
- }
-
- //property to indicate optimized serialization for lazy attachments
- private boolean lazyAttachments = false;
-
- // most of the times, Content-Types are already all lower cased.
- // String.toLowerCase() works faster in this case, so even if you
- // are only doing one comparison, it pays off to use String.toLowerCase()
- // than String.equalsIgnoreCase(). When you do more than one comparison,
- // the benefits of String.toLowerCase() dominates.
- //
- //
- // for FI,
- // use application/fastinfoset for SOAP 1.1
- // use application/soap+fastinfoset for SOAP 1.2
- // to speed up comparisons, test methods always use lower cases.
-
- /**
- * @param primary
- * must be all lower case
- * @param sub
- * must be all lower case
- */
- private static boolean isSoap1_1Type(String primary, String sub) {
- return primary.equalsIgnoreCase("text") && sub.equalsIgnoreCase("xml")
- || primary.equalsIgnoreCase("text") && sub.equalsIgnoreCase("xml-soap")
- || primary.equals("application")
- && sub.equals("fastinfoset");
- }
-
- /**
- * @param type
- * must be all lower case
- */
- private static boolean isEqualToSoap1_1Type(String type) {
- return type.startsWith("text/xml") ||
- type.startsWith("application/fastinfoset");
- }
-
- /**
- * @param primary
- * must be all lower case
- * @param sub
- * must be all lower case
- */
- private static boolean isSoap1_2Type(String primary, String sub) {
- return primary.equals("application")
- && (sub.equals("soap+xml")
- || sub.equals("soap+fastinfoset"));
- }
-
- /**
- * @param type
- * must be all lower case
- */
- private static boolean isEqualToSoap1_2Type(String type) {
- return type.startsWith("application/soap+xml") ||
- type.startsWith("application/soap+fastinfoset");
- }
-
- /**
- * Construct a new message. This will be invoked before message
- * sends.
- */
- protected MessageImpl() {
- this(false, false);
- attachmentsInitialized = true;
- }
-
- /**
- * Construct a new message. This will be invoked before message
- * sends.
- */
- protected MessageImpl(boolean isFastInfoset, boolean acceptFastInfoset) {
- this.isFastInfoset = isFastInfoset;
- this.acceptFastInfoset = acceptFastInfoset;
-
- headers = new MimeHeaders();
- headers.setHeader("Accept", getExpectedAcceptHeader());
- contentType = new ContentType();
- }
-
- /**
- * Shallow copy.
- */
- protected MessageImpl(SOAPMessage msg) {
- if (!(msg instanceof MessageImpl)) {
- // don't know how to handle this.
- }
- MessageImpl src = (MessageImpl) msg;
- this.headers = src.headers;
- this.soapPartImpl = src.soapPartImpl;
- this.attachments = src.attachments;
- this.saved = src.saved;
- this.messageBytes = src.messageBytes;
- this.messageByteCount = src.messageByteCount;
- this.properties = src.properties;
- this.contentType = src.contentType;
- }
-
- /**
- * @param stat
- * the mask value obtained from {@link #identifyContentType(ContentType)}
- */
- protected static boolean isSoap1_1Content(int stat) {
- return (stat & SOAP1_1_FLAG) != 0;
- }
-
- /**
- * @param stat
- * the mask value obtained from {@link #identifyContentType(ContentType)}
- */
- protected static boolean isSoap1_2Content(int stat) {
- return (stat & SOAP1_2_FLAG) != 0;
- }
-
- private static boolean isMimeMultipartXOPSoap1_2Package(ContentType contentType) {
- String type = contentType.getParameter("type");
- if (type == null) {
- return false;
- }
- type = type.toLowerCase();
- if (!type.startsWith("application/xop+xml")) {
- return false;
- }
- String startinfo = contentType.getParameter("start-info");
- if (startinfo == null) {
- return false;
- }
- startinfo = startinfo.toLowerCase();
- return isEqualToSoap1_2Type(startinfo);
- }
-
-
- //private static boolean isMimeMultipartXOPPackage(ContentType contentType) {
- private static boolean isMimeMultipartXOPSoap1_1Package(ContentType contentType) {
- String type = contentType.getParameter("type");
- if(type==null)
- return false;
-
- type = type.toLowerCase();
- if(!type.startsWith("application/xop+xml"))
- return false;
-
- String startinfo = contentType.getParameter("start-info");
- if(startinfo == null)
- return false;
- startinfo = startinfo.toLowerCase();
- return isEqualToSoap1_1Type(startinfo);
- }
-
- private static boolean isSOAPBodyXOPPackage(ContentType contentType){
- String primary = contentType.getPrimaryType();
- String sub = contentType.getSubType();
-
- if (primary.equalsIgnoreCase("application")) {
- if (sub.equalsIgnoreCase("xop+xml")) {
- String type = getTypeParameter(contentType);
- return isEqualToSoap1_2Type(type) || isEqualToSoap1_1Type(type);
- }
- }
- return false;
- }
-
- /**
- * Construct a message from an input stream. When messages are
- * received, there's two parts -- the transport headers and the
- * message content in a transport specific stream.
- */
- protected MessageImpl(MimeHeaders headers, final InputStream in)
- throws SOAPExceptionImpl {
- contentType = parseContentType(headers);
- init(headers,identifyContentType(contentType),contentType,in);
- }
-
- private static ContentType parseContentType(MimeHeaders headers) throws SOAPExceptionImpl {
- final String ct;
- if (headers != null)
- ct = getContentType(headers);
- else {
- log.severe("SAAJ0550.soap.null.headers");
- throw new SOAPExceptionImpl("Cannot create message: " +
- "Headers can't be null");
- }
-
- if (ct == null) {
- log.severe("SAAJ0532.soap.no.Content-Type");
- throw new SOAPExceptionImpl("Absent Content-Type");
- }
- try {
- return new ContentType(ct);
- } catch (Throwable ex) {
- log.severe("SAAJ0535.soap.cannot.internalize.message");
- throw new SOAPExceptionImpl("Unable to internalize message", ex);
- }
- }
-
- /**
- * Construct a message from an input stream. When messages are
- * received, there's two parts -- the transport headers and the
- * message content in a transport specific stream.
- *
- * @param contentType
- * The parsed content type header from the headers variable.
- * This is redundant parameter, but it avoids reparsing this header again.
- * @param stat
- * The result of {@link #identifyContentType(ContentType)} over
- * the contentType parameter. This redundant parameter, but it avoids
- * recomputing this information again.
- */
- protected MessageImpl(MimeHeaders headers, final ContentType contentType, int stat, final InputStream in) throws SOAPExceptionImpl {
- init(headers, stat, contentType, in);
-
- }
-
- private void init(MimeHeaders headers, int stat, final ContentType contentType, final InputStream in) throws SOAPExceptionImpl {
- this.headers = headers;
-
- try {
-
- // Set isFastInfoset/acceptFastInfoset flag based on MIME type
- if ((stat & FI_ENCODED_FLAG) > 0) {
- isFastInfoset = acceptFastInfoset = true;
- }
-
- // If necessary, inspect Accept header to set acceptFastInfoset
- if (!isFastInfoset) {
- String[] values = headers.getHeader("Accept");
- if (values != null) {
- for (int i = 0; i < values.length; i++) {
- StringTokenizer st = new StringTokenizer(values[i], ",");
- while (st.hasMoreTokens()) {
- final String token = st.nextToken().trim();
- if (token.equalsIgnoreCase("application/fastinfoset") ||
- token.equalsIgnoreCase("application/soap+fastinfoset")) {
- acceptFastInfoset = true;
- break;
- }
- }
- }
- }
- }
-
- if (!isCorrectSoapVersion(stat)) {
- log.log(
- Level.SEVERE,
- "SAAJ0533.soap.incorrect.Content-Type",
- new String[] {
- contentType.toString(),
- getExpectedContentType()});
- throw new SOAPVersionMismatchException(
- "Cannot create message: incorrect content-type for SOAP version. Got: "
- + contentType
- + " Expected: "
- + getExpectedContentType());
- }
-
- if ((stat & PLAIN_XML_FLAG) != 0) {
- if (isFastInfoset) {
- getSOAPPart().setContent(
- FastInfosetReflection.FastInfosetSource_new(in));
- } else {
- initCharsetProperty(contentType);
- getSOAPPart().setContent(new StreamSource(in));
- }
- }
- else if ((stat & MIME_MULTIPART_FLAG) != 0) {
- DataSource ds = new DataSource() {
- public InputStream getInputStream() {
- return in;
- }
-
- public OutputStream getOutputStream() {
- return null;
- }
-
- public String getContentType() {
- return contentType.toString();
- }
-
- public String getName() {
- return "";
- }
- };
-
- multiPart = null;
- if (useMimePull) {
- multiPart = new MimePullMultipart(ds,contentType);
- } else if (switchOffBM) {
- multiPart = new MimeMultipart(ds,contentType);
- } else {
- multiPart = new BMMimeMultipart(ds,contentType);
- }
-
- String startParam = contentType.getParameter("start");
- MimeBodyPart soapMessagePart = null;
- InputStream soapPartInputStream = null;
- String contentID = null;
- String contentIDNoAngle = null;
- if (switchOffBM || switchOffLazyAttachment) {
- if(startParam == null) {
- soapMessagePart = multiPart.getBodyPart(0);
- for (int i = 1; i < multiPart.getCount(); i++) {
- initializeAttachment(multiPart, i);
- }
- } else {
- soapMessagePart = multiPart.getBodyPart(startParam);
- for (int i = 0; i < multiPart.getCount(); i++) {
- contentID = multiPart.getBodyPart(i).getContentID();
- // Old versions of AXIS2 put angle brackets around the content
- // id but not the start param
- contentIDNoAngle = (contentID != null) ?
- contentID.replaceFirst("^<", "").replaceFirst(">$", "") : null;
- if(!startParam.equals(contentID) && !startParam.equals(contentIDNoAngle))
- initializeAttachment(multiPart, i);
- }
- }
- } else {
- if (useMimePull) {
- MimePullMultipart mpMultipart = (MimePullMultipart)multiPart;
- MIMEPart sp = mpMultipart.readAndReturnSOAPPart();
- soapMessagePart = new MimeBodyPart(sp);
- soapPartInputStream = sp.readOnce();
- } else {
- BMMimeMultipart bmMultipart =
- (BMMimeMultipart) multiPart;
- InputStream stream = bmMultipart.initStream();
-
- SharedInputStream sin = null;
- if (stream instanceof SharedInputStream) {
- sin = (SharedInputStream) stream;
- }
-
- String boundary = "--" +
- contentType.getParameter("boundary");
- byte[] bndbytes = ASCIIUtility.getBytes(boundary);
- if (startParam == null) {
- soapMessagePart =
- bmMultipart.getNextPart(stream, bndbytes, sin);
- bmMultipart.removeBodyPart(soapMessagePart);
- } else {
- MimeBodyPart bp = null;
- try {
- while (!startParam.equals(contentID) && !startParam.equals(contentIDNoAngle)) {
- bp = bmMultipart.getNextPart(
- stream, bndbytes, sin);
- contentID = bp.getContentID();
- // Old versions of AXIS2 put angle brackets around the content
- // id but not the start param
- contentIDNoAngle = (contentID != null) ?
- contentID.replaceFirst("^<", "").replaceFirst(">$", "") : null;
- }
- soapMessagePart = bp;
- bmMultipart.removeBodyPart(bp);
- } catch (Exception e) {
- throw new SOAPExceptionImpl(e);
- }
- }
- }
- }
-
- if (soapPartInputStream == null && soapMessagePart != null) {
- soapPartInputStream = soapMessagePart.getInputStream();
- }
-
- ContentType soapPartCType = new ContentType(
- soapMessagePart.getContentType());
- initCharsetProperty(soapPartCType);
- String baseType = soapPartCType.getBaseType().toLowerCase();
- if(!(isEqualToSoap1_1Type(baseType)
- || isEqualToSoap1_2Type(baseType)
- || isSOAPBodyXOPPackage(soapPartCType))) {
- log.log(Level.SEVERE,
- "SAAJ0549.soap.part.invalid.Content-Type",
- new Object[] {baseType});
- throw new SOAPExceptionImpl(
- "Bad Content-Type for SOAP Part : " +
- baseType);
- }
-
- SOAPPart soapPart = getSOAPPart();
- setMimeHeaders(soapPart, soapMessagePart);
- soapPart.setContent(isFastInfoset ?
- (Source) FastInfosetReflection.FastInfosetSource_new(
- soapPartInputStream) :
- (Source) new StreamSource(soapPartInputStream));
- } else {
- log.severe("SAAJ0534.soap.unknown.Content-Type");
- throw new SOAPExceptionImpl("Unrecognized Content-Type");
- }
- } catch (Throwable ex) {
- log.severe("SAAJ0535.soap.cannot.internalize.message");
- throw new SOAPExceptionImpl("Unable to internalize message", ex);
- }
- needsSave();
- }
-
- public boolean isFastInfoset() {
- return isFastInfoset;
- }
-
- public boolean acceptFastInfoset() {
- return acceptFastInfoset;
- }
-
- public void setIsFastInfoset(boolean value) {
- if (value != isFastInfoset) {
- isFastInfoset = value;
- if (isFastInfoset) {
- acceptFastInfoset = true;
- }
- saved = false; // ensure transcoding if necessary
- }
- }
-
- public Object getProperty(String property) {
- return (String) properties.get(property);
- }
-
- public void setProperty(String property, Object value) {
- verify(property, value);
- properties.put(property, value);
- }
-
- private void verify(String property, Object value) {
- if (property.equalsIgnoreCase(SOAPMessage.WRITE_XML_DECLARATION)) {
- if (!("true".equals(value) || "false".equals(value)))
- throw new RuntimeException(
- property + " must have value false or true");
-
- try {
- EnvelopeImpl env = (EnvelopeImpl) getSOAPPart().getEnvelope();
- if ("true".equalsIgnoreCase((String)value)) {
- env.setOmitXmlDecl("no");
- } else if ("false".equalsIgnoreCase((String)value)) {
- env.setOmitXmlDecl("yes");
- }
- } catch (Exception e) {
- log.log(Level.SEVERE, "SAAJ0591.soap.exception.in.set.property",
- new Object[] {e.getMessage(), "javax.xml.soap.write-xml-declaration"});
- throw new RuntimeException(e);
- }
- return;
- }
-
- if (property.equalsIgnoreCase(SOAPMessage.CHARACTER_SET_ENCODING)) {
- try {
- ((EnvelopeImpl) getSOAPPart().getEnvelope()).setCharsetEncoding((String)value);
- } catch (Exception e) {
- log.log(Level.SEVERE, "SAAJ0591.soap.exception.in.set.property",
- new Object[] {e.getMessage(), "javax.xml.soap.character-set-encoding"});
- throw new RuntimeException(e);
- }
- }
- }
-
- protected abstract boolean isCorrectSoapVersion(int contentTypeId);
-
- protected abstract String getExpectedContentType();
- protected abstract String getExpectedAcceptHeader();
-
- /**
- * Sniffs the Content-Type header so that we can determine how to process.
- *
- * <p>
- * In the absence of type attribute we assume it to be text/xml.
- * That would mean we're easy on accepting the message and
- * generate the correct thing (as the SWA spec also specifies
- * that the type parameter should always be text/xml)
- *
- * @return
- * combination of flags, such as PLAIN_XML_CODE and MIME_MULTIPART_CODE.
- */
- // SOAP1.2 allow SOAP1.2 content type
- static int identifyContentType(ContentType ct)
- throws SOAPExceptionImpl {
- // TBD
- // Is there anything else we need to verify here?
-
- String primary = ct.getPrimaryType().toLowerCase();
- String sub = ct.getSubType().toLowerCase();
-
- if (primary.equals("multipart")) {
- if (sub.equals("related")) {
- String type = getTypeParameter(ct);
- if (isEqualToSoap1_1Type(type)) {
- return (type.equals("application/fastinfoset") ?
- FI_ENCODED_FLAG : 0) | MIME_MULTIPART_FLAG | SOAP1_1_FLAG;
- }
- else if (isEqualToSoap1_2Type(type)) {
- return (type.equals("application/soap+fastinfoset") ?
- FI_ENCODED_FLAG : 0) | MIME_MULTIPART_FLAG | SOAP1_2_FLAG;
- /*} else if (isMimeMultipartXOPPackage(ct)) {
- return MIME_MULTIPART_XOP_FLAG;*/
- } else if (isMimeMultipartXOPSoap1_1Package(ct)) {
- return MIME_MULTIPART_XOP_SOAP1_1_FLAG;
- } else if (isMimeMultipartXOPSoap1_2Package(ct)) {
- return MIME_MULTIPART_XOP_SOAP1_2_FLAG;
- } else {
- log.severe("SAAJ0536.soap.content-type.mustbe.multipart");
- throw new SOAPExceptionImpl(
- "Content-Type needs to be Multipart/Related "
- + "and with \"type=text/xml\" "
- + "or \"type=application/soap+xml\"");
- }
- } else {
- log.severe("SAAJ0537.soap.invalid.content-type");
- throw new SOAPExceptionImpl(
- "Invalid Content-Type: " + primary + '/' + sub);
- }
- }
- else if (isSoap1_1Type(primary, sub)) {
- return (primary.equalsIgnoreCase("application")
- && sub.equalsIgnoreCase("fastinfoset") ?
- FI_ENCODED_FLAG : 0)
- | PLAIN_XML_FLAG | SOAP1_1_FLAG;
- }
- else if (isSoap1_2Type(primary, sub)) {
- return (primary.equalsIgnoreCase("application")
- && sub.equalsIgnoreCase("soap+fastinfoset") ?
- FI_ENCODED_FLAG : 0)
- | PLAIN_XML_FLAG | SOAP1_2_FLAG;
- } else if(isSOAPBodyXOPPackage(ct)){
- return XOP_FLAG;
- } else {
- log.severe("SAAJ0537.soap.invalid.content-type");
- throw new SOAPExceptionImpl(
- "Invalid Content-Type:"
- + primary
- + '/'
- + sub
- + ". Is this an error message instead of a SOAP response?");
- }
- }
-
- /**
- * Obtains the type parameter of the Content-Type header. Defaults to "text/xml".
- */
- private static String getTypeParameter(ContentType contentType) {
- String p = contentType.getParameter("type");
- if(p!=null)
- return p.toLowerCase();
- else
- return "text/xml";
- }
-
- public MimeHeaders getMimeHeaders() {
- return this.headers;
- }
-
- final static String getContentType(MimeHeaders headers) {
- String[] values = headers.getHeader("Content-Type");
- if (values == null)
- return null;
- else
- return values[0];
- }
-
- /*
- * Get the complete ContentType value along with optional parameters.
- */
- public String getContentType() {
- return getContentType(this.headers);
- }
-
- public void setContentType(String type) {
- headers.setHeader("Content-Type", type);
- needsSave();
- }
-
- private ContentType contentType() {
- ContentType ct = null;
- try {
- String currentContent = getContentType();
- if (currentContent == null) {
- return this.contentType;
- }
- ct = new ContentType(currentContent);
- } catch (Exception e) {
- // what to do here?
- }
- return ct;
- }
-
- /*
- * Return the MIME type string, without the parameters.
- */
- public String getBaseType() {
- return contentType().getBaseType();
- }
-
- public void setBaseType(String type) {
- ContentType ct = contentType();
- ct.setParameter("type", type);
- headers.setHeader("Content-Type", ct.toString());
- needsSave();
- }
-
- public String getAction() {
- return contentType().getParameter("action");
- }
-
- public void setAction(String action) {
- ContentType ct = contentType();
- ct.setParameter("action", action);
- headers.setHeader("Content-Type", ct.toString());
- needsSave();
- }
-
- public String getCharset() {
- return contentType().getParameter("charset");
- }
-
- public void setCharset(String charset) {
- ContentType ct = contentType();
- ct.setParameter("charset", charset);
- headers.setHeader("Content-Type", ct.toString());
- needsSave();
- }
-
- /**
- * All write methods (i.e setters) should call this method in
- * order to make sure that a save is necessary since the state
- * has been modified.
- */
- private final void needsSave() {
- saved = false;
- }
-
- public boolean saveRequired() {
- return saved != true;
- }
-
- public String getContentDescription() {
- String[] values = headers.getHeader("Content-Description");
- if (values != null && values.length > 0)
- return values[0];
- return null;
- }
-
- public void setContentDescription(String description) {
- headers.setHeader("Content-Description", description);
- needsSave();
- }
-
- public abstract SOAPPart getSOAPPart();
-
- public void removeAllAttachments() {
- try {
- initializeAllAttachments();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
- if (attachments != null) {
- attachments.clear();
- needsSave();
- }
- }
-
- public int countAttachments() {
- try {
- initializeAllAttachments();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- if (attachments != null)
- return attachments.size();
- return 0;
- }
-
- public void addAttachmentPart(AttachmentPart attachment) {
- try {
- initializeAllAttachments();
- this.optimizeAttachmentProcessing = true;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- if (attachments == null)
- attachments = new FinalArrayList();
-
- attachments.add(attachment);
-
- needsSave();
- }
-
- static private final Iterator nullIter = Collections.EMPTY_LIST.iterator();
-
- public Iterator getAttachments() {
- try {
- initializeAllAttachments();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- if (attachments == null)
- return nullIter;
- return attachments.iterator();
- }
-
- private void setFinalContentType(String charset) {
- ContentType ct = contentType();
- if (ct == null) {
- ct = new ContentType();
- }
- String[] split = getExpectedContentType().split("/");
- ct.setPrimaryType(split[0]);
- ct.setSubType(split[1]);
- ct.setParameter("charset", charset);
- headers.setHeader("Content-Type", ct.toString());
- }
-
- private class MimeMatchingIterator implements Iterator {
- public MimeMatchingIterator(MimeHeaders headers) {
- this.headers = headers;
- this.iter = attachments.iterator();
- }
-
- private Iterator iter;
- private MimeHeaders headers;
- private Object nextAttachment;
-
- public boolean hasNext() {
- if (nextAttachment == null)
- nextAttachment = nextMatch();
- return nextAttachment != null;
- }
-
- public Object next() {
- if (nextAttachment != null) {
- Object ret = nextAttachment;
- nextAttachment = null;
- return ret;
- }
-
- if (hasNext())
- return nextAttachment;
-
- return null;
- }
-
- Object nextMatch() {
- while (iter.hasNext()) {
- AttachmentPartImpl ap = (AttachmentPartImpl) iter.next();
- if (ap.hasAllHeaders(headers))
- return ap;
- }
- return null;
- }
-
- public void remove() {
- iter.remove();
- }
- }
-
- public Iterator getAttachments(MimeHeaders headers) {
- try {
- initializeAllAttachments();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- if (attachments == null)
- return nullIter;
-
- return new MimeMatchingIterator(headers);
- }
-
- public void removeAttachments(MimeHeaders headers) {
- try {
- initializeAllAttachments();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- if (attachments == null)
- return ;
-
- Iterator it = new MimeMatchingIterator(headers);
- while (it.hasNext()) {
- int index = attachments.indexOf(it.next());
- attachments.set(index, null);
- }
- FinalArrayList f = new FinalArrayList();
- for (int i = 0; i < attachments.size(); i++) {
- if (attachments.get(i) != null) {
- f.add(attachments.get(i));
- }
- }
- attachments = f;
- // needsSave();
- }
-
- public AttachmentPart createAttachmentPart() {
- return new AttachmentPartImpl();
- }
-
- public AttachmentPart getAttachment(SOAPElement element)
- throws SOAPException {
- try {
- initializeAllAttachments();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- String uri;
- String hrefAttr = element.getAttribute("href");
- if ("".equals(hrefAttr)) {
- Node node = getValueNodeStrict(element);
- String swaRef = null;
- if (node != null) {
- swaRef = node.getValue();
- }
- if (swaRef == null || "".equals(swaRef)) {
- return null;
- } else {
- uri = swaRef;
- }
- } else {
- uri = hrefAttr;
- }
- return getAttachmentPart(uri);
- }
-
- private Node getValueNodeStrict(SOAPElement element) {
- Node node = (Node)element.getFirstChild();
- if (node != null) {
- if (node.getNextSibling() == null
- && node.getNodeType() == org.w3c.dom.Node.TEXT_NODE) {
- return node;
- } else {
- return null;
- }
- }
- return null;
- }
-
-
- private AttachmentPart getAttachmentPart(String uri) throws SOAPException {
- AttachmentPart _part;
- try {
- if (uri.startsWith("cid:")) {
- // rfc2392
- uri = '<'+uri.substring("cid:".length())+'>';
-
- MimeHeaders headersToMatch = new MimeHeaders();
- headersToMatch.addHeader(CONTENT_ID, uri);
-
- Iterator i = this.getAttachments(headersToMatch);
- _part = (i == null) ? null : (AttachmentPart)i.next();
- } else {
- // try content-location
- MimeHeaders headersToMatch = new MimeHeaders();
- headersToMatch.addHeader(CONTENT_LOCATION, uri);
-
- Iterator i = this.getAttachments(headersToMatch);
- _part = (i == null) ? null : (AttachmentPart)i.next();
- }
-
- // try auto-generated JAXRPC CID
- if (_part == null) {
- Iterator j = this.getAttachments();
-
- while (j.hasNext()) {
- AttachmentPart p = (AttachmentPart)j.next();
- String cl = p.getContentId();
- if (cl != null) {
- // obtain the partname
- int eqIndex = cl.indexOf("=");
- if (eqIndex > -1) {
- cl = cl.substring(1, eqIndex);
- if (cl.equalsIgnoreCase(uri)) {
- _part = p;
- break;
- }
- }
- }
- }
- }
-
- } catch (Exception se) {
- log.log(Level.SEVERE, "SAAJ0590.soap.unable.to.locate.attachment", new Object[] {uri});
- throw new SOAPExceptionImpl(se);
- }
- return _part;
- }
-
- private final InputStream getHeaderBytes()
- throws IOException {
- SOAPPartImpl sp = (SOAPPartImpl) getSOAPPart();
- return sp.getContentAsStream();
- }
-
- private String convertToSingleLine(String contentType) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < contentType.length(); i ++) {
- char c = contentType.charAt(i);
- if (c != '\r' && c != '\n' && c != '\t')
- buffer.append(c);
- }
- return buffer.toString();
- }
-
- private MimeMultipart getMimeMessage() throws SOAPException {
- try {
- SOAPPartImpl soapPart = (SOAPPartImpl) getSOAPPart();
- MimeBodyPart mimeSoapPart = soapPart.getMimePart();
-
- /*
- * Get content type from this message instead of soapPart
- * to ensure agreement if soapPart is transcoded (XML <-> FI)
- */
- ContentType soapPartCtype = new ContentType(getExpectedContentType());
-
- if (!isFastInfoset) {
- soapPartCtype.setParameter("charset", initCharset());
- }
- mimeSoapPart.setHeader("Content-Type", soapPartCtype.toString());
-
- MimeMultipart headerAndBody = null;
-
- if (!switchOffBM && !switchOffLazyAttachment &&
- (multiPart != null) && !attachmentsInitialized) {
- headerAndBody = new BMMimeMultipart();
- headerAndBody.addBodyPart(mimeSoapPart);
- if (attachments != null) {
- for (Iterator eachAttachment = attachments.iterator();
- eachAttachment.hasNext();) {
- headerAndBody.addBodyPart(
- ((AttachmentPartImpl) eachAttachment.next())
- .getMimePart());
- }
- }
- InputStream in = ((BMMimeMultipart)multiPart).getInputStream();
- if (!((BMMimeMultipart)multiPart).lastBodyPartFound() &&
- !((BMMimeMultipart)multiPart).isEndOfStream()) {
- ((BMMimeMultipart)headerAndBody).setInputStream(in);
- ((BMMimeMultipart)headerAndBody).setBoundary(
- ((BMMimeMultipart)multiPart).getBoundary());
- ((BMMimeMultipart)headerAndBody).
- setLazyAttachments(lazyAttachments);
- }
-
- } else {
- headerAndBody = new MimeMultipart();
- headerAndBody.addBodyPart(mimeSoapPart);
-
- for (Iterator eachAttachement = getAttachments();
- eachAttachement.hasNext();
- ) {
- headerAndBody.addBodyPart(
- ((AttachmentPartImpl) eachAttachement.next())
- .getMimePart());
- }
- }
-
- ContentType contentType = headerAndBody.getContentType();
-
- ParameterList l = contentType.getParameterList();
-
- // set content type depending on SOAP version
- l.set("type", getExpectedContentType());
- l.set("boundary", contentType.getParameter("boundary"));
- ContentType nct = new ContentType("multipart", "related", l);
-
- headers.setHeader(
- "Content-Type",
- convertToSingleLine(nct.toString()));
- // TBD
- // Set content length MIME header here.
-
- return headerAndBody;
- } catch (SOAPException ex) {
- throw ex;
- } catch (Throwable ex) {
- log.severe("SAAJ0538.soap.cannot.convert.msg.to.multipart.obj");
- throw new SOAPExceptionImpl(
- "Unable to convert SOAP message into "
- + "a MimeMultipart object",
- ex);
- }
- }
-
- private String initCharset() {
-
- String charset = null;
-
- String[] cts = getMimeHeaders().getHeader("Content-Type");
- if ((cts != null) && (cts[0] != null)) {
- charset = getCharsetString(cts[0]);
- }
-
- if (charset == null) {
- charset = (String) getProperty(CHARACTER_SET_ENCODING);
- }
-
- if (charset != null) {
- return charset;
- }
-
- return "utf-8";
- }
-
- private String getCharsetString(String s) {
- try {
- int index = s.indexOf(";");
- if(index < 0)
- return null;
- ParameterList pl = new ParameterList(s.substring(index));
- return pl.get("charset");
- } catch(Exception e) {
- return null;
- }
- }
-
- public void saveChanges() throws SOAPException {
-
- // suck in all the data from the attachments and have it
- // ready for writing/sending etc.
-
- String charset = initCharset();
-
- /*if (countAttachments() == 0) {*/
- int attachmentCount = (attachments == null) ? 0 : attachments.size();
- if (attachmentCount == 0) {
- if (!switchOffBM && !switchOffLazyAttachment &&
- !attachmentsInitialized && (multiPart != null)) {
- // so there might be attachments
- attachmentCount = 1;
- }
- }
-
- try {
- if ((attachmentCount == 0) && !hasXOPContent()) {
- InputStream in;
- try{
- /*
- * Not sure why this is called getHeaderBytes(), but it actually
- * returns the whole message as a byte stream. This stream could
- * be either XML of Fast depending on the mode.
- */
- in = getHeaderBytes();
- // no attachments, hence this property can be false
- this.optimizeAttachmentProcessing = false;
- if (SOAPPartImpl.lazyContentLength) {
- inputStreamAfterSaveChanges = in;
- }
- } catch (IOException ex) {
- log.severe("SAAJ0539.soap.cannot.get.header.stream");
- throw new SOAPExceptionImpl(
- "Unable to get header stream in saveChanges: ",
- ex);
- }
-
- if (in instanceof ByteInputStream) {
- ByteInputStream bIn = (ByteInputStream)in;
- messageBytes = bIn.getBytes();
- messageByteCount = bIn.getCount();
- }
-
- setFinalContentType(charset);
- /*
- headers.setHeader(
- "Content-Type",
- getExpectedContentType() +
- (isFastInfoset ? "" : "; charset=" + charset));*/
- if (messageByteCount > 0) {
- headers.setHeader(
- "Content-Length",
- Integer.toString(messageByteCount));
- }
- } else {
- if(hasXOPContent())
- mmp = getXOPMessage();
- else
- mmp = getMimeMessage();
- }
- } catch (Throwable ex) {
- log.severe("SAAJ0540.soap.err.saving.multipart.msg");
- throw new SOAPExceptionImpl(
- "Error during saving a multipart message",
- ex);
- }
-
- // FIX ME -- SOAP Action replaced by Content-Type optional parameter action
- /*
- if(isCorrectSoapVersion(SOAP1_1_FLAG)) {
-
- String[] soapAction = headers.getHeader("SOAPAction");
-
- if (soapAction == null || soapAction.length == 0)
- headers.setHeader("SOAPAction", "\"\"");
-
- }
- */
-
- saved = true;
- }
-
- private MimeMultipart getXOPMessage() throws SOAPException {
- try {
- MimeMultipart headerAndBody = new MimeMultipart();
- SOAPPartImpl soapPart = (SOAPPartImpl)getSOAPPart();
- MimeBodyPart mimeSoapPart = soapPart.getMimePart();
- ContentType soapPartCtype =
- new ContentType("application/xop+xml");
- soapPartCtype.setParameter("type", getExpectedContentType());
- String charset = initCharset();
- soapPartCtype.setParameter("charset", charset);
- mimeSoapPart.setHeader("Content-Type", soapPartCtype.toString());
- headerAndBody.addBodyPart(mimeSoapPart);
-
- for (Iterator eachAttachement = getAttachments();
- eachAttachement.hasNext();
- ) {
- headerAndBody.addBodyPart(
- ((AttachmentPartImpl) eachAttachement.next())
- .getMimePart());
- }
-
- ContentType contentType = headerAndBody.getContentType();
-
- ParameterList l = contentType.getParameterList();
-
- //lets not write start-info for now till we get servlet fix done
- l.set("start-info", getExpectedContentType());//+";charset="+initCharset());
-
- // set content type depending on SOAP version
- l.set("type", "application/xop+xml");
-
- if (isCorrectSoapVersion(SOAP1_2_FLAG)) {
- String action = getAction();
- if(action != null)
- l.set("action", action);
- }
-
- l.set("boundary", contentType.getParameter("boundary"));
- ContentType nct = new ContentType("Multipart", "Related", l);
- headers.setHeader(
- "Content-Type",
- convertToSingleLine(nct.toString()));
- // TBD
- // Set content length MIME header here.
-
- return headerAndBody;
- } catch (SOAPException ex) {
- throw ex;
- } catch (Throwable ex) {
- log.severe("SAAJ0538.soap.cannot.convert.msg.to.multipart.obj");
- throw new SOAPExceptionImpl(
- "Unable to convert SOAP message into "
- + "a MimeMultipart object",
- ex);
- }
-
- }
-
- private boolean hasXOPContent() throws ParseException {
- String type = getContentType();
- if(type == null)
- return false;
- ContentType ct = new ContentType(type);
- //return isMimeMultipartXOPPackage(ct) || isSOAPBodyXOPPackage(ct);
- return isMimeMultipartXOPSoap1_1Package(ct) ||
- isMimeMultipartXOPSoap1_2Package(ct) || isSOAPBodyXOPPackage(ct);
-
- }
-
- public void writeTo(OutputStream out) throws SOAPException, IOException {
- if (saveRequired()){
- this.optimizeAttachmentProcessing = true;
- saveChanges();
- }
-
- if(!optimizeAttachmentProcessing){
- if (SOAPPartImpl.lazyContentLength && messageByteCount <= 0) {
- byte[] buf = new byte[1024];
-
- int length = 0;
- while( (length = inputStreamAfterSaveChanges.read(buf)) != -1) {
- out.write(buf,0, length);
- messageByteCount += length;
- }
- if (messageByteCount > 0) {
- headers.setHeader(
- "Content-Length",
- Integer.toString(messageByteCount));
- }
- } else {
- out.write(messageBytes, 0, messageByteCount);
- }
- }
- else{
- try{
- if(hasXOPContent()){
- mmp.writeTo(out);
- }else{
- mmp.writeTo(out);
- if (!switchOffBM && !switchOffLazyAttachment &&
- (multiPart != null) && !attachmentsInitialized) {
- ((BMMimeMultipart)multiPart).setInputStream(
- ((BMMimeMultipart)mmp).getInputStream());
- }
- }
- } catch(Exception ex){
- log.severe("SAAJ0540.soap.err.saving.multipart.msg");
- throw new SOAPExceptionImpl(
- "Error during saving a multipart message",
- ex);
- }
- }
-
- if(isCorrectSoapVersion(SOAP1_1_FLAG)) {
-
- String[] soapAction = headers.getHeader("SOAPAction");
-
- if (soapAction == null || soapAction.length == 0)
- headers.setHeader("SOAPAction", "\"\"");
-
- }
-
- messageBytes = null;
- needsSave();
- }
-
- public SOAPBody getSOAPBody() throws SOAPException {
- SOAPBody body = getSOAPPart().getEnvelope().getBody();
- /*if (body == null) {
- throw new SOAPException("No SOAP Body was found in the SOAP Message");
- }*/
- return body;
- }
-
- public SOAPHeader getSOAPHeader() throws SOAPException {
- SOAPHeader hdr = getSOAPPart().getEnvelope().getHeader();
- /*if (hdr == null) {
- throw new SOAPException("No SOAP Header was found in the SOAP Message");
- }*/
- return hdr;
- }
-
- private void initializeAllAttachments ()
- throws MessagingException, SOAPException {
- if (switchOffBM || switchOffLazyAttachment) {
- return;
- }
-
- if (attachmentsInitialized || (multiPart == null)) {
- return;
- }
-
- if (attachments == null)
- attachments = new FinalArrayList();
-
- int count = multiPart.getCount();
- for (int i=0; i < count; i++ ) {
- initializeAttachment(multiPart.getBodyPart(i));
- }
- attachmentsInitialized = true;
- //multiPart = null;
- needsSave();
- }
-
- private void initializeAttachment(MimeBodyPart mbp) throws SOAPException {
- AttachmentPartImpl attachmentPart = new AttachmentPartImpl();
- DataHandler attachmentHandler = mbp.getDataHandler();
- attachmentPart.setDataHandler(attachmentHandler);
-
- AttachmentPartImpl.copyMimeHeaders(mbp, attachmentPart);
- attachments.add(attachmentPart);
- }
-
- private void initializeAttachment(MimeMultipart multiPart, int i)
- throws Exception {
- MimeBodyPart currentBodyPart = multiPart.getBodyPart(i);
- AttachmentPartImpl attachmentPart = new AttachmentPartImpl();
-
- DataHandler attachmentHandler = currentBodyPart.getDataHandler();
- attachmentPart.setDataHandler(attachmentHandler);
-
- AttachmentPartImpl.copyMimeHeaders(currentBodyPart, attachmentPart);
- addAttachmentPart(attachmentPart);
- }
-
- private void setMimeHeaders(SOAPPart soapPart,
- MimeBodyPart soapMessagePart) throws Exception {
-
- // first remove the existing content-type
- soapPart.removeAllMimeHeaders();
- // add everything present in soapMessagePart
- List headers = soapMessagePart.getAllHeaders();
- int sz = headers.size();
- for( int i=0; i<sz; i++ ) {
- Header h = (Header) headers.get(i);
- soapPart.addMimeHeader(h.getName(), h.getValue());
- }
- }
-
- private void initCharsetProperty(ContentType contentType) {
- String charset = contentType.getParameter("charset");
- if (charset != null) {
- ((SOAPPartImpl) getSOAPPart()).setSourceCharsetEncoding(charset);
- if(!charset.equalsIgnoreCase("utf-8"))
- setProperty(CHARACTER_SET_ENCODING, charset);
- }
- }
-
- public void setLazyAttachments(boolean flag) {
- lazyAttachments = flag;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java
deleted file mode 100644
index 81fb6601..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/MultipartDataContentHandler.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.io.*;
-import java.awt.datatransfer.DataFlavor;
-import javax.activation.*;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeMultipart;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType;
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
-
-public class MultipartDataContentHandler implements DataContentHandler {
- private ActivationDataFlavor myDF = new ActivationDataFlavor(
- com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeMultipart.class,
- "multipart/mixed",
- "Multipart");
-
- /**
- * Return the DataFlavors for this <code>DataContentHandler</code>.
- *
- * @return The DataFlavors
- */
- public DataFlavor[] getTransferDataFlavors() { // throws Exception;
- return new DataFlavor[] { myDF };
- }
-
- /**
- * Return the Transfer Data of type DataFlavor from InputStream.
- *
- * @param df The DataFlavor
- * @param ins The InputStream corresponding to the data
- * @return String object
- */
- public Object getTransferData(DataFlavor df, DataSource ds) {
- // use myDF.equals to be sure to get ActivationDataFlavor.equals,
- // which properly ignores Content-Type parameters in comparison
- if (myDF.equals(df))
- return getContent(ds);
- else
- return null;
- }
-
- /**
- * Return the content.
- */
- public Object getContent(DataSource ds) {
- try {
- return new MimeMultipart(
- ds, new ContentType(ds.getContentType()));
- } catch (Exception e) {
- return null;
- }
- }
-
- /**
- * Write the object to the output stream, using the specific MIME type.
- */
- public void writeTo(Object obj, String mimeType, OutputStream os)
- throws IOException {
- if (obj instanceof MimeMultipart) {
- try {
- //TODO: temporarily allow only ByteOutputStream
- // Need to add writeTo(OutputStream) on MimeMultipart
- ByteOutputStream baos = null;
- if (os instanceof ByteOutputStream) {
- baos = (ByteOutputStream)os;
- } else {
- throw new IOException("Input Stream expected to be a com.sun.xml.internal.messaging.saaj.util.ByteOutputStream, but found " +
- os.getClass().getName());
- }
- ((MimeMultipart)obj).writeTo(baos);
- } catch (Exception e) {
- throw new IOException(e.toString());
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java
deleted file mode 100644
index 6a8c75e3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SAAJMetaFactoryImpl.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import javax.xml.soap.SAAJMetaFactory;
-import javax.xml.soap.SOAPConstants;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPFactory;
-import javax.xml.soap.SOAPException;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class SAAJMetaFactoryImpl extends SAAJMetaFactory {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
-
- protected MessageFactory newMessageFactory(String protocol)
- throws SOAPException {
- if (SOAPConstants.SOAP_1_1_PROTOCOL.equals(protocol)) {
- return new com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl();
- } else if (SOAPConstants.SOAP_1_2_PROTOCOL.equals(protocol)) {
- return new com.sun.xml.internal.messaging.saaj.soap.ver1_2.SOAPMessageFactory1_2Impl();
- } else if (SOAPConstants.DYNAMIC_SOAP_PROTOCOL.equals(protocol)) {
- return new com.sun.xml.internal.messaging.saaj.soap.dynamic.SOAPMessageFactoryDynamicImpl();
- } else {
- log.log(
- Level.SEVERE,
- "SAAJ0569.soap.unknown.protocol",
- new Object[] {protocol, "MessageFactory"});
- throw new SOAPException("Unknown Protocol: " + protocol +
- " specified for creating MessageFactory");
- }
- }
-
- protected SOAPFactory newSOAPFactory(String protocol)
- throws SOAPException {
- if (SOAPConstants.SOAP_1_1_PROTOCOL.equals(protocol)) {
- return new com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl();
- } else if (SOAPConstants.SOAP_1_2_PROTOCOL.equals(protocol)) {
- return new com.sun.xml.internal.messaging.saaj.soap.ver1_2.SOAPFactory1_2Impl();
- } else if (SOAPConstants.DYNAMIC_SOAP_PROTOCOL.equals(protocol)) {
- return new com.sun.xml.internal.messaging.saaj.soap.dynamic.SOAPFactoryDynamicImpl();
- } else {
- log.log(
- Level.SEVERE,
- "SAAJ0569.soap.unknown.protocol",
- new Object[] {protocol, "SOAPFactory"});
- throw new SOAPException("Unknown Protocol: " + protocol +
- " specified for creating SOAPFactory");
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocument.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocument.java
deleted file mode 100644
index f353cc63..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocument.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap;
-
-public interface SOAPDocument {
- SOAPPartImpl getSOAPPart();
- SOAPDocumentImpl getDocument();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java
deleted file mode 100644
index 863cfe63..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentFragment.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl;
-import com.sun.org.apache.xerces.internal.dom.DocumentFragmentImpl;
-
-public class SOAPDocumentFragment extends DocumentFragmentImpl {
-
- public SOAPDocumentFragment(CoreDocumentImpl ownerDoc) {
- super(ownerDoc);
- }
-
- public SOAPDocumentFragment() {
- super();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java
deleted file mode 100644
index 262e3cc2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPDocumentImpl.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.util.logging.Logger;
-
-import com.sun.org.apache.xerces.internal.dom.DocumentImpl;
-import org.w3c.dom.*;
-
-import com.sun.xml.internal.messaging.saaj.soap.impl.*;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class SOAPDocumentImpl extends DocumentImpl implements SOAPDocument {
-
- private static final String XMLNS = "xmlns".intern();
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
-
- SOAPPartImpl enclosingSOAPPart;
-
- public SOAPDocumentImpl(SOAPPartImpl enclosingDocument) {
- this.enclosingSOAPPart = enclosingDocument;
- }
-
- // public SOAPDocumentImpl(boolean grammarAccess) {
- // super(grammarAccess);
- // }
- //
- // public SOAPDocumentImpl(DocumentType doctype) {
- // super(doctype);
- // }
- //
- // public SOAPDocumentImpl(DocumentType doctype, boolean grammarAccess) {
- // super(doctype, grammarAccess);
- // }
-
- public SOAPPartImpl getSOAPPart() {
- if (enclosingSOAPPart == null) {
- log.severe("SAAJ0541.soap.fragment.not.bound.to.part");
- throw new RuntimeException("Could not complete operation. Fragment not bound to SOAP part.");
- }
- return enclosingSOAPPart;
- }
-
- public SOAPDocumentImpl getDocument() {
- return this;
- }
-
- public DocumentType getDoctype() {
- // SOAP means no DTD, No DTD means no doctype (SOAP 1.2 only?)
- return null;
- }
-
- public DOMImplementation getImplementation() {
- return super.getImplementation();
- }
-
- public Element getDocumentElement() {
- // This had better be an Envelope!
- getSOAPPart().doGetDocumentElement();
- return doGetDocumentElement();
- }
-
- protected Element doGetDocumentElement() {
- return super.getDocumentElement();
- }
-
- public Element createElement(String tagName) throws DOMException {
- return ElementFactory.createElement(
- this,
- NameImpl.getLocalNameFromTagName(tagName),
- NameImpl.getPrefixFromTagName(tagName),
- null);
- }
-
- public DocumentFragment createDocumentFragment() {
- return new SOAPDocumentFragment(this);
- }
-
- public org.w3c.dom.Text createTextNode(String data) {
- return new TextImpl(this, data);
- }
-
- public Comment createComment(String data) {
- return new CommentImpl(this, data);
- }
-
- public CDATASection createCDATASection(String data) throws DOMException {
- return new CDATAImpl(this, data);
- }
-
- public ProcessingInstruction createProcessingInstruction(
- String target,
- String data)
- throws DOMException {
- log.severe("SAAJ0542.soap.proc.instructions.not.allowed.in.docs");
- throw new UnsupportedOperationException("Processing Instructions are not allowed in SOAP documents");
- }
-
- public Attr createAttribute(String name) throws DOMException {
- boolean isQualifiedName = (name.indexOf(":") > 0);
- if (isQualifiedName) {
- String nsUri = null;
- String prefix = name.substring(0, name.indexOf(":"));
- //cannot do anything to resolve the URI if prefix is not
- //XMLNS.
- if (XMLNS.equals(prefix)) {
- nsUri = ElementImpl.XMLNS_URI;
- return createAttributeNS(nsUri, name);
- }
- }
-
- return super.createAttribute(name);
- }
-
- public EntityReference createEntityReference(String name)
- throws DOMException {
- log.severe("SAAJ0543.soap.entity.refs.not.allowed.in.docs");
- throw new UnsupportedOperationException("Entity References are not allowed in SOAP documents");
- }
-
- public NodeList getElementsByTagName(String tagname) {
- return super.getElementsByTagName(tagname);
- }
-
- public org.w3c.dom.Node importNode(Node importedNode, boolean deep)
- throws DOMException {
- return super.importNode(importedNode, deep);
- }
-
- public Element createElementNS(String namespaceURI, String qualifiedName)
- throws DOMException {
- return ElementFactory.createElement(
- this,
- NameImpl.getLocalNameFromTagName(qualifiedName),
- NameImpl.getPrefixFromTagName(qualifiedName),
- namespaceURI);
- }
-
- public Attr createAttributeNS(String namespaceURI, String qualifiedName)
- throws DOMException {
- return super.createAttributeNS(namespaceURI, qualifiedName);
- }
-
- public NodeList getElementsByTagNameNS(
- String namespaceURI,
- String localName) {
- return super.getElementsByTagNameNS(namespaceURI, localName);
- }
-
- public Element getElementById(String elementId) {
- return super.getElementById(elementId);
- }
-
- public Node cloneNode(boolean deep) {
- SOAPPartImpl newSoapPart = getSOAPPart().doCloneNode();
- super.cloneNode(newSoapPart.getDocument(), deep);
- return newSoapPart;
- }
-
- public void cloneNode(SOAPDocumentImpl newdoc, boolean deep) {
- super.cloneNode(newdoc, deep);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java
deleted file mode 100644
index 1001c247..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPFactoryImpl.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.soap.impl.ElementFactory;
-import com.sun.xml.internal.messaging.saaj.soap.impl.ElementImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-import com.sun.xml.internal.messaging.saaj.util.*;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Document;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Attr;
-
-public abstract class SOAPFactoryImpl extends SOAPFactory {
-
- protected static final Logger
- log = Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
-
- protected abstract SOAPDocumentImpl createDocument();
-
- public SOAPElement createElement(String tagName) throws SOAPException {
- if (tagName == null) {
- log.log(
- Level.SEVERE,"SAAJ0567.soap.null.input",
- new Object[] {"tagName","SOAPFactory.createElement"});
- throw new SOAPException("Null tagName argument passed to createElement");
- }
- return ElementFactory.createElement(createDocument(),
- NameImpl.createFromTagName(tagName));
- }
-
- public SOAPElement createElement(Name name) throws SOAPException {
- // @since SAAJ 1.3
- // If the Name was null it would cause a NullPointerException in earlier release
- if (name == null) {
- log.log(Level.SEVERE,"SAAJ0567.soap.null.input",
- new Object[] {"name","SOAPFactory.createElement"});
- throw new SOAPException("Null name argument passed to createElement");
- }
- return ElementFactory.createElement(createDocument(), name);
- }
-
- public SOAPElement createElement(QName qname) throws SOAPException {
- if (qname == null) {
- log.log(Level.SEVERE,"SAAJ0567.soap.null.input",
- new Object[] {"qname","SOAPFactory.createElement"});
- throw new SOAPException("Null qname argument passed to createElement");
- }
- return ElementFactory.createElement(createDocument(),qname);
- }
-
- public SOAPElement createElement(
- String localName,
- String prefix,
- String uri) throws SOAPException {
-
- // @since SAAJ 1.3
- // if prefix !=null but localName== null then in earlier releases it would create
- // a Qualified Name <prefix>:null which is not meaningful
- if (localName == null) {
- log.log(Level.SEVERE,"SAAJ0567.soap.null.input",
- new Object[] {"localName","SOAPFactory.createElement"});
- throw new SOAPException("Null localName argument passed to createElement");
- }
- return ElementFactory.createElement(createDocument(), localName, prefix, uri);
- }
-
- public Name createName(String localName, String prefix, String uri)
- throws SOAPException {
- // @since SAAJ 1.3
- // if localName==null, earlier impl would create Name with localName=""
- // which is absurd.
- if (localName == null) {
- log.log(
- Level.SEVERE,"SAAJ0567.soap.null.input",
- new Object[] {"localName","SOAPFactory.createName"});
- throw new SOAPException("Null localName argument passed to createName");
- }
- return NameImpl.create(localName, prefix, uri);
- }
-
- public Name createName(String localName) throws SOAPException {
- // @since SAAJ 1.3
- // if localName==null, earlier impl would create Name with localName=null
- // which is absurd.
- if (localName == null) {
- log.log(
- Level.SEVERE,"SAAJ0567.soap.null.input",
- new Object[] {"localName","SOAPFactory.createName"});
- throw new SOAPException("Null localName argument passed to createName");
- }
- return NameImpl.createFromUnqualifiedName(localName);
- }
-
- // Note: the child elements might still be org.w3c.dom.Element's, but the
- // getChildElements will do the conversion to SOAPElement when called.
- public SOAPElement createElement(Element domElement) throws SOAPException {
- if (domElement == null) {
- return null;
- }
- return convertToSoapElement(domElement);
- }
-
- private SOAPElement convertToSoapElement(Element element) throws SOAPException {
-
- if (element instanceof SOAPElement) {
- return (SOAPElement) element;
- }
-
- SOAPElement copy = createElement(
- element.getLocalName(),
- element.getPrefix(),
- element.getNamespaceURI());
-
- Document ownerDoc = copy.getOwnerDocument();
-
- NamedNodeMap attrMap = element.getAttributes();
- for (int i=0; i < attrMap.getLength(); i++) {
- Attr nextAttr = (Attr)attrMap.item(i);
- Attr importedAttr = (Attr)ownerDoc.importNode(nextAttr, true);
- copy.setAttributeNodeNS(importedAttr);
- }
-
-
- NodeList nl = element.getChildNodes();
- for (int i=0; i < nl.getLength(); i++) {
- org.w3c.dom.Node next = nl.item(i);
- org.w3c.dom.Node imported = ownerDoc.importNode(next, true);
- copy.appendChild(imported);
- }
-
- return copy;
- }
-
- public Detail createDetail() throws SOAPException {
- throw new UnsupportedOperationException();
- }
-
- public SOAPFault createFault(String reasonText, QName faultCode) throws SOAPException {
- throw new UnsupportedOperationException();
- }
-
- public SOAPFault createFault() throws SOAPException {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPIOException.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPIOException.java
deleted file mode 100644
index 291de6c7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPIOException.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * Created on Nov 19, 2002
- *
- * To change this generated comment edit the template variable "filecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of file comments go to
- * Window>Preferences>Java>Code Generation.
- */
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.io.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-
-public class SOAPIOException extends IOException {
- SOAPExceptionImpl soapException;
-
- public SOAPIOException() {
- super();
- soapException = new SOAPExceptionImpl();
- soapException.fillInStackTrace();
- }
-
- public SOAPIOException(String s) {
- super();
- soapException = new SOAPExceptionImpl(s);
- soapException.fillInStackTrace();
- }
-
- public SOAPIOException(String reason, Throwable cause) {
- super();
- soapException = new SOAPExceptionImpl(reason, cause);
- soapException.fillInStackTrace();
- }
-
- public SOAPIOException(Throwable cause) {
- super(cause.toString());
- soapException = new SOAPExceptionImpl(cause);
- soapException.fillInStackTrace();
- }
-
- public Throwable fillInStackTrace() {
- if (soapException != null) {
- soapException.fillInStackTrace();
- }
- return this;
- }
-
- public String getLocalizedMessage() {
- return soapException.getLocalizedMessage();
- }
-
- public String getMessage() {
- return soapException.getMessage();
- }
-
- public void printStackTrace() {
- soapException.printStackTrace();
- }
-
- public void printStackTrace(PrintStream s) {
- soapException.printStackTrace(s);
- }
-
- public void printStackTrace(PrintWriter s) {
- soapException.printStackTrace(s);
- }
-
- public String toString() {
- return soapException.toString();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java
deleted file mode 100644
index 57180567..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPPartImpl.java
+++ /dev/null
@@ -1,814 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.io.*;
-import java.util.Iterator;
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import javax.activation.DataHandler;
-import javax.activation.DataSource;
-import javax.xml.soap.*;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-
-import org.w3c.dom.*;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeBodyPart;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.ElementImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-import com.sun.xml.internal.messaging.saaj.util.*;
-
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.sax.SAXSource;
-
-/**
- * SOAPPartImpl is the first attachment. This contains the XML/SOAP document.
- *
- * @author Anil Vijendran (anil@sun.com)
- */
-public abstract class SOAPPartImpl extends SOAPPart implements SOAPDocument {
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
-
- protected MimeHeaders headers;
- protected Envelope envelope;
- protected Source source;
- protected SOAPDocumentImpl document;
-
- //flag to indicate if a setContent happened.
- private boolean sourceWasSet = false;
-
- // Records whether the input source had an xml decl or not.
- protected boolean omitXmlDecl = true;
-
- // Records the charset encoding of the input stream source if provided.
- protected String sourceCharsetEncoding = null;
-
- /**
- * Reference to containing message (may be null)
- */
- protected MessageImpl message;
-
- static final boolean lazyContentLength;
- static {
- lazyContentLength = SAAJUtil.getSystemBoolean("saaj.lazy.contentlength");
- }
-
- protected SOAPPartImpl() {
- this(null);
- }
-
- protected SOAPPartImpl(MessageImpl message) {
- document = new SOAPDocumentImpl(this);
- headers = new MimeHeaders();
- this.message = message;
- headers.setHeader("Content-Type", getContentType());
- }
-
- protected abstract String getContentType();
- protected abstract Envelope createEnvelopeFromSource()
- throws SOAPException;
- protected abstract Envelope createEmptyEnvelope(String prefix)
- throws SOAPException;
- protected abstract SOAPPartImpl duplicateType();
-
- protected String getContentTypeString() {
- return getContentType();
- }
-
- public boolean isFastInfoset() {
- return (message != null) ? message.isFastInfoset() : false;
- }
-
- public SOAPEnvelope getEnvelope() throws SOAPException {
-
- // If there is no SOAP envelope already created, then create
- // one from a source if one exists. If there is a newer source
- // then use that source.
-
- if (sourceWasSet)
- sourceWasSet = false;
-
- lookForEnvelope();
- if (envelope != null) {
- if (source != null) { // there's a newer source, use it
- document.removeChild(envelope);
- envelope = createEnvelopeFromSource();
- }
- } else if (source != null) {
- envelope = createEnvelopeFromSource();
- } else {
- envelope = createEmptyEnvelope(null);
- document.insertBefore(envelope, null);
- }
- return envelope;
- }
-
- protected void lookForEnvelope() throws SOAPException {
- Element envelopeChildElement = document.doGetDocumentElement();
- if (envelopeChildElement == null || envelopeChildElement instanceof Envelope) {
- envelope = (EnvelopeImpl) envelopeChildElement;
- } else if (!(envelopeChildElement instanceof ElementImpl)) {
- log.severe("SAAJ0512.soap.incorrect.factory.used");
- throw new SOAPExceptionImpl("Unable to create envelope: incorrect factory used during tree construction");
- } else {
- ElementImpl soapElement = (ElementImpl) envelopeChildElement;
- if (soapElement.getLocalName().equalsIgnoreCase("Envelope")) {
- String prefix = soapElement.getPrefix();
- String uri = (prefix == null) ? soapElement.getNamespaceURI() : soapElement.getNamespaceURI(prefix);
- if(!uri.equals(NameImpl.SOAP11_NAMESPACE) && !uri.equals(NameImpl.SOAP12_NAMESPACE)) {
- log.severe("SAAJ0513.soap.unknown.ns");
- throw new SOAPVersionMismatchException("Unable to create envelope from given source because the namespace was not recognized");
- }
- } else {
- log.severe("SAAJ0514.soap.root.elem.not.named.envelope");
- throw new SOAPExceptionImpl(
- "Unable to create envelope from given source because the root element is not named \"Envelope\"");
- }
- }
- }
-
- public void removeAllMimeHeaders() {
- headers.removeAllHeaders();
- }
-
- public void removeMimeHeader(String header) {
- headers.removeHeader(header);
- }
-
- public String[] getMimeHeader(String name) {
- return headers.getHeader(name);
- }
-
- public void setMimeHeader(String name, String value) {
- headers.setHeader(name, value);
- }
-
- public void addMimeHeader(String name, String value) {
- headers.addHeader(name, value);
- }
-
- public Iterator getAllMimeHeaders() {
- return headers.getAllHeaders();
- }
-
- public Iterator getMatchingMimeHeaders(String[] names) {
- return headers.getMatchingHeaders(names);
- }
-
- public Iterator getNonMatchingMimeHeaders(String[] names) {
- return headers.getNonMatchingHeaders(names);
- }
-
- public Source getContent() throws SOAPException {
- if (source != null) {
- InputStream bis = null;
- if (source instanceof JAXMStreamSource) {
- StreamSource streamSource = (StreamSource)source;
- bis = streamSource.getInputStream();
- } else if (FastInfosetReflection.isFastInfosetSource(source)) {
- // FastInfosetSource inherits from SAXSource
- SAXSource saxSource = (SAXSource)source;
- bis = saxSource.getInputSource().getByteStream();
- }
-
- if (bis != null) {
- try {
- bis.reset();
- } catch (IOException e) {
- /* This exception will never be thrown.
- *
- * The setContent method will modify the source
- * if StreamSource to JAXMStreamSource, that uses
- * a ByteInputStream, and for a FastInfosetSource will
- * replace the InputStream with a ByteInputStream.
- */
- }
- }
- return source;
- }
-
- return ((Envelope) getEnvelope()).getContent();
- }
-
- public void setContent(Source source) throws SOAPException {
- try {
- if (source instanceof StreamSource) {
- InputStream is = ((StreamSource) source).getInputStream();
- Reader rdr = ((StreamSource) source).getReader();
-
- if (is != null) {
- this.source = new JAXMStreamSource(is);
- } else if (rdr != null) {
- this.source = new JAXMStreamSource(rdr);
- } else {
- log.severe("SAAJ0544.soap.no.valid.reader.for.src");
- throw new SOAPExceptionImpl("Source does not have a valid Reader or InputStream");
- }
- }
- else if (FastInfosetReflection.isFastInfosetSource(source)) {
- // InputStream is = source.getInputStream()
- InputStream is = FastInfosetReflection.FastInfosetSource_getInputStream(source);
-
- /*
- * Underlying stream must be ByteInputStream for getContentAsStream(). We pay the
- * cost of copying the underlying bytes here to avoid multiple copies every time
- * getBytes() is called on a ByteInputStream.
- */
- if (!(is instanceof ByteInputStream)) {
- ByteOutputStream bout = new ByteOutputStream();
- bout.write(is);
-
- // source.setInputStream(new ByteInputStream(...))
- FastInfosetReflection.FastInfosetSource_setInputStream(
- source, bout.newInputStream());
- }
- this.source = source;
- }
- else {
- this.source = source;
- }
- sourceWasSet = true;
- }
- catch (Exception ex) {
- ex.printStackTrace();
-
- log.severe("SAAJ0545.soap.cannot.set.src.for.part");
- throw new SOAPExceptionImpl(
- "Error setting the source for SOAPPart: " + ex.getMessage());
- }
- }
-
- public InputStream getContentAsStream() throws IOException {
- if (source != null) {
- InputStream is = null;
-
- // Allow message to be transcode if so requested
- if (source instanceof StreamSource && !isFastInfoset()) {
- is = ((StreamSource) source).getInputStream();
- }
- else if (FastInfosetReflection.isFastInfosetSource(source) &&
- isFastInfoset())
- {
- try {
- // InputStream is = source.getInputStream()
- is = FastInfosetReflection.FastInfosetSource_getInputStream(source);
- }
- catch (Exception e) {
- throw new IOException(e.toString());
- }
- }
-
- if (is != null) {
- if (lazyContentLength) {
- return is;
- }
- if (!(is instanceof ByteInputStream)) {
- log.severe("SAAJ0546.soap.stream.incorrect.type");
- throw new IOException("Internal error: stream not of the right type");
- }
- return (ByteInputStream) is;
- }
- // need to do something here for reader...
- // for now we'll see if we can fallback...
- }
-
- ByteOutputStream b = new ByteOutputStream();
-
- Envelope env = null;
-
- try {
- env = (Envelope) getEnvelope();
- env.output(b, isFastInfoset());
- }
- catch (SOAPException soapException) {
- log.severe("SAAJ0547.soap.cannot.externalize");
- throw new SOAPIOException(
- "SOAP exception while trying to externalize: ",
- soapException);
- }
-
- return b.newInputStream();
- }
-
- MimeBodyPart getMimePart() throws SOAPException {
- try {
- MimeBodyPart headerEnvelope = new MimeBodyPart();
-
- headerEnvelope.setDataHandler(getDataHandler());
- AttachmentPartImpl.copyMimeHeaders(headers, headerEnvelope);
-
- return headerEnvelope;
- } catch (SOAPException ex) {
- throw ex;
- } catch (Exception ex) {
- log.severe("SAAJ0548.soap.cannot.externalize.hdr");
- throw new SOAPExceptionImpl("Unable to externalize header", ex);
- }
- }
-
- MimeHeaders getMimeHeaders() {
- return headers;
- }
-
- DataHandler getDataHandler() {
- DataSource ds = new DataSource() {
- public OutputStream getOutputStream() throws IOException {
- throw new IOException("Illegal Operation");
- }
-
- public String getContentType() {
- return getContentTypeString();
- }
-
- public String getName() {
- return getContentId();
- }
-
- public InputStream getInputStream() throws IOException {
- return getContentAsStream();
- }
- };
- return new DataHandler(ds);
- }
-
- public SOAPDocumentImpl getDocument() {
- handleNewSource();
- return document;
- }
-
- public SOAPPartImpl getSOAPPart() {
- return this;
- }
-
- public DocumentType getDoctype() {
- return document.getDoctype();
- }
-
- // Forward all of these calls to the document to ensure that they work the
- // same way whether they are called from here or directly from the document.
- // If the document needs any help from this SOAPPart then
- // Make it use a call-back as in doGetDocumentElement() below
- public DOMImplementation getImplementation() {
- return document.getImplementation();
- }
-
- public Element getDocumentElement() {
- // If there is no SOAP envelope already created, then create
- // one from a source if one exists. If there is a newer source
- // then use that source.
- try {
- getEnvelope();
- } catch (SOAPException e) {
- }
- return document.getDocumentElement();
- }
-
- protected void doGetDocumentElement() {
- handleNewSource();
- try {
- lookForEnvelope();
- } catch (SOAPException e) {
- }
- }
-
- public Element createElement(String tagName) throws DOMException {
- return document.createElement(tagName);
- }
-
- public DocumentFragment createDocumentFragment() {
- return document.createDocumentFragment();
- }
-
- public org.w3c.dom.Text createTextNode(String data) {
- return document.createTextNode(data);
- }
-
- public Comment createComment(String data) {
- return document.createComment(data);
- }
-
- public CDATASection createCDATASection(String data) throws DOMException {
- return document.createCDATASection(data);
- }
-
- public ProcessingInstruction createProcessingInstruction(
- String target,
- String data)
- throws DOMException {
- return document.createProcessingInstruction(target, data);
- }
-
- public Attr createAttribute(String name) throws DOMException {
- return document.createAttribute(name);
- }
-
- public EntityReference createEntityReference(String name)
- throws DOMException {
- return document.createEntityReference(name);
- }
-
- public NodeList getElementsByTagName(String tagname) {
- handleNewSource();
- return document.getElementsByTagName(tagname);
- }
-
- public org.w3c.dom.Node importNode(
- org.w3c.dom.Node importedNode,
- boolean deep)
- throws DOMException {
- handleNewSource();
- return document.importNode(importedNode, deep);
- }
-
- public Element createElementNS(String namespaceURI, String qualifiedName)
- throws DOMException {
- return document.createElementNS(namespaceURI, qualifiedName);
- }
-
- public Attr createAttributeNS(String namespaceURI, String qualifiedName)
- throws DOMException {
- return document.createAttributeNS(namespaceURI, qualifiedName);
- }
-
- public NodeList getElementsByTagNameNS(
- String namespaceURI,
- String localName) {
- handleNewSource();
- return document.getElementsByTagNameNS(namespaceURI, localName);
- }
-
- public Element getElementById(String elementId) {
- handleNewSource();
- return document.getElementById(elementId);
- }
- public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild)
- throws DOMException {
- handleNewSource();
- return document.appendChild(newChild);
- }
-
- public org.w3c.dom.Node cloneNode(boolean deep) {
- handleNewSource();
- return document.cloneNode(deep);
- }
-
- protected SOAPPartImpl doCloneNode() {
- handleNewSource();
- SOAPPartImpl newSoapPart = duplicateType();
-
- newSoapPart.headers = MimeHeadersUtil.copy(this.headers);
- newSoapPart.source = this.source;
- return newSoapPart;
- }
-
- public NamedNodeMap getAttributes() {
- return document.getAttributes();
- }
-
- public NodeList getChildNodes() {
- handleNewSource();
- return document.getChildNodes();
- }
-
- public org.w3c.dom.Node getFirstChild() {
- handleNewSource();
- return document.getFirstChild();
- }
-
- public org.w3c.dom.Node getLastChild() {
- handleNewSource();
- return document.getLastChild();
- }
-
- public String getLocalName() {
- return document.getLocalName();
- }
-
- public String getNamespaceURI() {
- return document.getNamespaceURI();
- }
-
- public org.w3c.dom.Node getNextSibling() {
- handleNewSource();
- return document.getNextSibling();
- }
-
- public String getNodeName() {
- return document.getNodeName();
- }
-
- public short getNodeType() {
- return document.getNodeType();
- }
-
- public String getNodeValue() throws DOMException {
- return document.getNodeValue();
- }
-
- public Document getOwnerDocument() {
- return document.getOwnerDocument();
- }
-
- public org.w3c.dom.Node getParentNode() {
- return document.getParentNode();
- }
-
- public String getPrefix() {
- return document.getPrefix();
- }
-
- public org.w3c.dom.Node getPreviousSibling() {
- return document.getPreviousSibling();
- }
-
- public boolean hasAttributes() {
- return document.hasAttributes();
- }
-
- public boolean hasChildNodes() {
- handleNewSource();
- return document.hasChildNodes();
- }
-
- public org.w3c.dom.Node insertBefore(
- org.w3c.dom.Node arg0,
- org.w3c.dom.Node arg1)
- throws DOMException {
- handleNewSource();
- return document.insertBefore(arg0, arg1);
- }
-
- public boolean isSupported(String arg0, String arg1) {
- return document.isSupported(arg0, arg1);
- }
-
- public void normalize() {
- handleNewSource();
- document.normalize();
- }
-
- public org.w3c.dom.Node removeChild(org.w3c.dom.Node arg0)
- throws DOMException {
- handleNewSource();
- return document.removeChild(arg0);
- }
-
- public org.w3c.dom.Node replaceChild(
- org.w3c.dom.Node arg0,
- org.w3c.dom.Node arg1)
- throws DOMException {
- handleNewSource();
- return document.replaceChild(arg0, arg1);
- }
-
- public void setNodeValue(String arg0) throws DOMException {
- document.setNodeValue(arg0);
- }
-
- public void setPrefix(String arg0) throws DOMException {
- document.setPrefix(arg0);
- }
-
- private void handleNewSource() {
- if (sourceWasSet) {
- // There is a newer source use that source.
- try {
- getEnvelope();
- } catch (SOAPException e) {
- }
- }
- }
-
- protected XMLDeclarationParser lookForXmlDecl() throws SOAPException {
- if ((source != null) && (source instanceof StreamSource)) {
-
- Reader reader = null;
-
- InputStream inputStream = ((StreamSource) source).getInputStream();
- if (inputStream != null) {
- if (getSourceCharsetEncoding() == null) {
- reader = new InputStreamReader(inputStream);
- } else {
- try {
- reader =
- new InputStreamReader(
- inputStream, getSourceCharsetEncoding());
- } catch (UnsupportedEncodingException uee) {
- log.log(
- Level.SEVERE,
- "SAAJ0551.soap.unsupported.encoding",
- new Object[] {getSourceCharsetEncoding()});
- throw new SOAPExceptionImpl(
- "Unsupported encoding " + getSourceCharsetEncoding(),
- uee);
- }
- }
- } else {
- reader = ((StreamSource) source).getReader();
- }
- if (reader != null) {
- PushbackReader pushbackReader =
- new PushbackReader(reader, 4096); //some size to unread <?xml ....?>
- XMLDeclarationParser ev =
- new XMLDeclarationParser(pushbackReader);
- try {
- ev.parse();
- } catch (Exception e) {
- log.log(
- Level.SEVERE,
- "SAAJ0552.soap.xml.decl.parsing.failed");
- throw new SOAPExceptionImpl(
- "XML declaration parsing failed", e);
- }
- String xmlDecl = ev.getXmlDeclaration();
- if ((xmlDecl != null) && (xmlDecl.length() > 0)) {
- this.omitXmlDecl = false;
- }
- if (lazyContentLength) {
- source = new StreamSource(pushbackReader);
- }
- return ev;
- }
- } else if ((source != null) && (source instanceof DOMSource)) {
- //TODO: A Domsource maynot contain XMLDecl ?.
- }
- return null;
- }
-
- public void setSourceCharsetEncoding(String charset) {
- this.sourceCharsetEncoding = charset;
- }
-
- public org.w3c.dom.Node renameNode(org.w3c.dom.Node n, String namespaceURI, String qualifiedName)
- throws DOMException {
- handleNewSource();
- return document.renameNode(n, namespaceURI, qualifiedName);
- }
-
- public void normalizeDocument() {
- document.normalizeDocument();
- }
-
- public DOMConfiguration getDomConfig() {
- return document.getDomConfig();
- }
-
- public org.w3c.dom.Node adoptNode(org.w3c.dom.Node source) throws DOMException {
- handleNewSource();
- return document.adoptNode(source);
- }
-
- public void setDocumentURI(String documentURI) {
- document.setDocumentURI(documentURI);
- }
-
- public String getDocumentURI() {
- return document.getDocumentURI();
- }
-
- public void setStrictErrorChecking(boolean strictErrorChecking) {
- document.setStrictErrorChecking(strictErrorChecking);
- }
-
- public String getInputEncoding() {
- return document.getInputEncoding();
- }
-
- public String getXmlEncoding() {
- return document.getXmlEncoding();
- }
-
- public boolean getXmlStandalone() {
- return document.getXmlStandalone();
- }
-
- public void setXmlStandalone(boolean xmlStandalone) throws DOMException {
- document.setXmlStandalone(xmlStandalone);
- }
-
- public String getXmlVersion() {
- return document.getXmlVersion();
- }
-
- public void setXmlVersion(String xmlVersion) throws DOMException {
- document.setXmlVersion(xmlVersion);
- }
-
- public boolean getStrictErrorChecking() {
- return document.getStrictErrorChecking();
- }
-
- // DOM L3 methods from org.w3c.dom.Node
- public String getBaseURI() {
- return document.getBaseURI();
- }
-
- public short compareDocumentPosition(org.w3c.dom.Node other)
- throws DOMException {
- return document.compareDocumentPosition(other);
- }
-
- public String getTextContent()
- throws DOMException {
- return document.getTextContent();
- }
-
- public void setTextContent(String textContent) throws DOMException {
- document.setTextContent(textContent);
- }
-
- public boolean isSameNode(org.w3c.dom.Node other) {
- return document.isSameNode(other);
- }
-
- public String lookupPrefix(String namespaceURI) {
- return document.lookupPrefix(namespaceURI);
- }
-
- public boolean isDefaultNamespace(String namespaceURI) {
- return document.isDefaultNamespace(namespaceURI);
- }
-
- public String lookupNamespaceURI(String prefix) {
- return document.lookupNamespaceURI(prefix);
- }
-
- public boolean isEqualNode(org.w3c.dom.Node arg) {
- return document.isEqualNode(arg);
- }
-
- public Object getFeature(String feature,
- String version) {
- return document.getFeature(feature,version);
- }
-
- public Object setUserData(String key,
- Object data,
- UserDataHandler handler) {
- return document.setUserData(key, data, handler);
- }
-
- public Object getUserData(String key) {
- return document.getUserData(key);
- }
-
- public void recycleNode() {
- // Nothing seems to be required to be done here
- }
-
- public String getValue() {
- return null;
- }
-
- public void setValue(String value) {
- log.severe("SAAJ0571.soappart.setValue.not.defined");
- throw new IllegalStateException("Setting value of a soap part is not defined");
- }
-
- public void setParentElement(SOAPElement parent) throws SOAPException {
- log.severe("SAAJ0570.soappart.parent.element.not.defined");
- throw new SOAPExceptionImpl("The parent element of a soap part is not defined");
- }
-
- public SOAPElement getParentElement() {
- return null;
- }
-
- public void detachNode() {
- // Nothing seems to be required to be done here
- }
-
- public String getSourceCharsetEncoding() {
- return sourceCharsetEncoding;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java
deleted file mode 100644
index 720bd050..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/SOAPVersionMismatchException.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-
-public class SOAPVersionMismatchException extends SOAPExceptionImpl {
- /**
- * Constructs a <code>SOAPExceptionImpl</code> object with no
- * reason or embedded <code>Throwable</code> object.
- */
- public SOAPVersionMismatchException() {
- super();
- }
-
- /**
- * Constructs a <code>SOAPExceptionImpl</code> object with the given
- * <code>String</code> as the reason for the exception being thrown.
- *
- * @param reason a description of what caused the exception
- */
- public SOAPVersionMismatchException(String reason) {
- super(reason);
- }
-
- /**
- * Constructs a <code>SOAPExceptionImpl</code> object with the given
- * <code>String</code> as the reason for the exception being thrown
- * and the given <code>Throwable</code> object as an embedded
- * exception.
- *
- * @param reason a description of what caused the exception
- * @param cause a <code>Throwable</code> object that is to
- * be embedded in this <code>SOAPExceptionImpl</code> object
- */
- public SOAPVersionMismatchException(String reason, Throwable cause) {
- super(reason, cause);
- }
-
- /**
- * Constructs a <code>SOAPExceptionImpl</code> object initialized
- * with the given <code>Throwable</code> object.
- */
- public SOAPVersionMismatchException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java
deleted file mode 100644
index 4c79b5f1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.awt.datatransfer.DataFlavor;
-import java.io.*;
-
-import javax.activation.*;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeUtility;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.ASCIIUtility;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType;
-
-/**
- * JAF data content handler for text/plain --> String
- *
- */
-public class StringDataContentHandler implements DataContentHandler {
- private static ActivationDataFlavor myDF = new ActivationDataFlavor(
- java.lang.String.class,
- "text/plain",
- "Text String");
-
- protected ActivationDataFlavor getDF() {
- return myDF;
- }
-
- /**
- * Return the DataFlavors for this <code>DataContentHandler</code>.
- *
- * @return The DataFlavors
- */
- public DataFlavor[] getTransferDataFlavors() {
- return new DataFlavor[] { getDF() };
- }
-
- /**
- * Return the Transfer Data of type DataFlavor from InputStream.
- *
- * @param df The DataFlavor
- * @param ds The DataSource corresponding to the data
- * @return String object
- */
- public Object getTransferData(DataFlavor df, DataSource ds)
- throws IOException {
- // use myDF.equals to be sure to get ActivationDataFlavor.equals,
- // which properly ignores Content-Type parameters in comparison
- if (getDF().equals(df))
- return getContent(ds);
- else
- return null;
- }
-
- public Object getContent(DataSource ds) throws IOException {
- String enc = null;
- InputStreamReader is = null;
-
- try {
- enc = getCharset(ds.getContentType());
- is = new InputStreamReader(ds.getInputStream(), enc);
- } catch (IllegalArgumentException iex) {
- /*
- * An unknown charset of the form ISO-XXX-XXX will cause
- * the JDK to throw an IllegalArgumentException. The
- * JDK will attempt to create a classname using this string,
- * but valid classnames must not contain the character '-',
- * and this results in an IllegalArgumentException, rather than
- * the expected UnsupportedEncodingException. Yikes.
- */
- throw new UnsupportedEncodingException(enc);
- }
-
- try {
- int pos = 0;
- int count;
- char buf[] = new char[1024];
-
- while ((count = is.read(buf, pos, buf.length - pos)) != -1) {
- pos += count;
- if (pos >= buf.length) {
- int size = buf.length;
- if (size < 256*1024)
- size += size;
- else
- size += 256*1024;
- char tbuf[] = new char[size];
- System.arraycopy(buf, 0, tbuf, 0, pos);
- buf = tbuf;
- }
- }
- return new String(buf, 0, pos);
- } finally {
- try {
- is.close();
- } catch (IOException ex) { }
- }
- }
-
- /**
- * Write the object to the output stream, using the specified MIME type.
- */
- public void writeTo(Object obj, String type, OutputStream os)
- throws IOException {
- if (!(obj instanceof String))
- throw new IOException("\"" + getDF().getMimeType() +
- "\" DataContentHandler requires String object, " +
- "was given object of type " + obj.getClass().toString());
-
- String enc = null;
- OutputStreamWriter osw = null;
-
- try {
- enc = getCharset(type);
- osw = new OutputStreamWriter(os, enc);
- } catch (IllegalArgumentException iex) {
- /*
- * An unknown charset of the form ISO-XXX-XXX will cause
- * the JDK to throw an IllegalArgumentException. The
- * JDK will attempt to create a classname using this string,
- * but valid classnames must not contain the character '-',
- * and this results in an IllegalArgumentException, rather than
- * the expected UnsupportedEncodingException. Yikes.
- */
- throw new UnsupportedEncodingException(enc);
- }
-
- String s = (String)obj;
- osw.write(s, 0, s.length());
- osw.flush();
- }
-
- private String getCharset(String type) {
- try {
- ContentType ct = new ContentType(type);
- String charset = ct.getParameter("charset");
- if (charset == null)
- // If the charset parameter is absent, use US-ASCII.
- charset = "us-ascii";
- return MimeUtility.javaCharset(charset);
- } catch (Exception ex) {
- return null;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java
deleted file mode 100644
index e24665a0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.awt.datatransfer.DataFlavor;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import javax.activation.*;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTransformer;
-
-/**
- * JAF data handler for XML content
- *
- * @author Anil Vijendran
- */
-public class XmlDataContentHandler implements DataContentHandler {
- public static final String STR_SRC = "javax.xml.transform.stream.StreamSource";
- private static Class streamSourceClass = null;
-
- public XmlDataContentHandler() throws ClassNotFoundException {
- if (streamSourceClass == null) {
- streamSourceClass = Class.forName(STR_SRC);
- }
- }
-
- /**
- * return the DataFlavors for this <code>DataContentHandler</code>
- * @return The DataFlavors.
- */
- public DataFlavor[] getTransferDataFlavors() { // throws Exception;
- DataFlavor flavors[] = new DataFlavor[2];
-
- flavors[0] =
- new ActivationDataFlavor(streamSourceClass, "text/xml", "XML");
- flavors[1] =
- new ActivationDataFlavor(streamSourceClass, "application/xml", "XML");
-
- return flavors;
- }
-
- /**
- * return the Transfer Data of type DataFlavor from InputStream
- * @param df The DataFlavor.
- * @param ins The InputStream corresponding to the data.
- * @return The constructed Object.
- */
- public Object getTransferData(DataFlavor flavor, DataSource dataSource)
- throws IOException {
- if (flavor.getMimeType().startsWith("text/xml") ||
- flavor.getMimeType().startsWith("application/xml")) {
- if (flavor.getRepresentationClass().getName().equals(STR_SRC)) {
- return new StreamSource(dataSource.getInputStream());
- }
- }
- return null;
- }
-
- /**
- *
- */
- public Object getContent(DataSource dataSource) throws IOException {
- return new StreamSource(dataSource.getInputStream());
- }
-
- /**
- * construct an object from a byte stream
- * (similar semantically to previous method, we are deciding
- * which one to support)
- */
- public void writeTo(Object obj, String mimeType, OutputStream os)
- throws IOException {
- if (!mimeType.startsWith("text/xml") && !mimeType.startsWith("application/xml"))
- throw new IOException(
- "Invalid content type \"" + mimeType + "\" for XmlDCH");
-
-
- try {
- Transformer transformer = EfficientStreamingTransformer.newTransformer();
- StreamResult result = new StreamResult(os);
- if (obj instanceof DataSource) {
- // Streaming transform applies only to javax.xml.transform.StreamSource
- transformer.transform((Source) getContent((DataSource)obj), result);
- } else {
- Source src=null;
- if (obj instanceof String) {
- src= new StreamSource(new java.io.StringReader((String) obj));
- } else {
- src=(Source) obj;
- }
- transformer.transform(src, result);
- }
- } catch (Exception ex) {
- throw new IOException(
- "Unable to run the JAXP transformer on a stream "
- + ex.getMessage());
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java
deleted file mode 100644
index 0f404be6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.dynamic;
-
-import javax.xml.soap.Detail;
-import javax.xml.soap.SOAPException;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPFactoryImpl;
-
-public class SOAPFactoryDynamicImpl extends SOAPFactoryImpl {
- protected SOAPDocumentImpl createDocument() {
- return null;
- }
-
- public Detail createDetail() throws SOAPException {
- throw new UnsupportedOperationException(
- "createDetail() not supported for Dynamic Protocol");
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java
deleted file mode 100644
index bdf0aea4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.dynamic;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.MessageFactoryImpl;
-
-public class SOAPMessageFactoryDynamicImpl extends MessageFactoryImpl {
- public SOAPMessage createMessage() throws SOAPException {
- throw new UnsupportedOperationException(
- "createMessage() not supported for Dynamic Protocol");
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java
deleted file mode 100644
index afc7d6e0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-
-/**
- * All elements of the SOAP-ENV:BODY.
- *
- * @author Anil Vijendran (akv@eng.sun.com)
- */
-public abstract class BodyElementImpl
- extends ElementImpl
- implements SOAPBodyElement {
-
- public BodyElementImpl(SOAPDocumentImpl ownerDoc, Name qname) {
- super(ownerDoc, qname);
- }
-
- public BodyElementImpl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
-
- public void setParentElement(SOAPElement element) throws SOAPException {
- if (! (element instanceof SOAPBody)) {
- log.severe("SAAJ0101.impl.parent.of.body.elem.mustbe.body");
- throw new SOAPException("Parent of a SOAPBodyElement has to be a SOAPBody");
- }
- super.setParentElement(element);
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java
deleted file mode 100644
index 38101fa6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.w3c.dom.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-/**
- * The implementation of SOAP-ENV:BODY or the SOAPBody abstraction.
- *
- * @author Anil Vijendran (anil@sun.com)
- */
-public abstract class BodyImpl extends ElementImpl implements SOAPBody {
- private SOAPFault fault;
-
- protected BodyImpl(SOAPDocumentImpl ownerDoc, NameImpl bodyName) {
- super(ownerDoc, bodyName);
- }
-
- protected abstract NameImpl getFaultName(String name);
- protected abstract boolean isFault(SOAPElement child);
- protected abstract SOAPBodyElement createBodyElement(Name name);
- protected abstract SOAPBodyElement createBodyElement(QName name);
- protected abstract SOAPFault createFaultElement();
- protected abstract QName getDefaultFaultCode();
-
- public SOAPFault addFault() throws SOAPException {
- if (hasFault()) {
- log.severe("SAAJ0110.impl.fault.already.exists");
- throw new SOAPExceptionImpl("Error: Fault already exists");
- }
-
- fault = createFaultElement();
-
- addNode(fault);
-
- fault.setFaultCode(getDefaultFaultCode());
- fault.setFaultString("Fault string, and possibly fault code, not set");
-
- return fault;
- }
-
- public SOAPFault addFault(
- Name faultCode,
- String faultString,
- Locale locale)
- throws SOAPException {
-
- SOAPFault fault = addFault();
- fault.setFaultCode(faultCode);
- fault.setFaultString(faultString, locale);
- return fault;
- }
-
- public SOAPFault addFault(
- QName faultCode,
- String faultString,
- Locale locale)
- throws SOAPException {
-
- SOAPFault fault = addFault();
- fault.setFaultCode(faultCode);
- fault.setFaultString(faultString, locale);
- return fault;
- }
-
- public SOAPFault addFault(Name faultCode, String faultString)
- throws SOAPException {
-
- SOAPFault fault = addFault();
- fault.setFaultCode(faultCode);
- fault.setFaultString(faultString);
- return fault;
- }
-
- public SOAPFault addFault(QName faultCode, String faultString)
- throws SOAPException {
-
- SOAPFault fault = addFault();
- fault.setFaultCode(faultCode);
- fault.setFaultString(faultString);
- return fault;
- }
-
- void initializeFault() {
- FaultImpl flt = (FaultImpl) findFault();
- fault = flt;
- }
-
- protected SOAPElement findFault() {
- Iterator eachChild = getChildElementNodes();
- while (eachChild.hasNext()) {
- SOAPElement child = (SOAPElement) eachChild.next();
- if (isFault(child)) {
- return child;
- }
- }
-
- return null;
- }
-
- public boolean hasFault() {
- initializeFault();
- return fault != null;
- }
-
- public SOAPFault getFault() {
- if (hasFault())
- return fault;
- return null;
- }
-
- public SOAPBodyElement addBodyElement(Name name) throws SOAPException {
- SOAPBodyElement newBodyElement =
- (SOAPBodyElement) ElementFactory.createNamedElement(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name.getLocalName(),
- name.getPrefix(),
- name.getURI());
- if (newBodyElement == null) {
- newBodyElement = createBodyElement(name);
- }
- addNode(newBodyElement);
- return newBodyElement;
- }
-
- public SOAPBodyElement addBodyElement(QName qname) throws SOAPException {
- SOAPBodyElement newBodyElement =
- (SOAPBodyElement) ElementFactory.createNamedElement(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- qname.getLocalPart(),
- qname.getPrefix(),
- qname.getNamespaceURI());
- if (newBodyElement == null) {
- newBodyElement = createBodyElement(qname);
- }
- addNode(newBodyElement);
- return newBodyElement;
- }
-
- public void setParentElement(SOAPElement element) throws SOAPException {
-
- if (!(element instanceof SOAPEnvelope)) {
- log.severe("SAAJ0111.impl.body.parent.must.be.envelope");
- throw new SOAPException("Parent of SOAPBody has to be a SOAPEnvelope");
- }
- super.setParentElement(element);
- }
-
- protected SOAPElement addElement(Name name) throws SOAPException {
- return addBodyElement(name);
- }
-
- protected SOAPElement addElement(QName name) throws SOAPException {
- return addBodyElement(name);
- }
-
- // public Node insertBefore(Node newElement, Node ref) throws DOMException {
- // if (!(newElement instanceof SOAPBodyElement) && (newElement instanceof SOAPElement)) {
- // newElement = new ElementWrapper((ElementImpl) newElement);
- // }
- // return super.insertBefore(newElement, ref);
- // }
- //
- // public Node replaceChild(Node newElement, Node ref) throws DOMException {
- // if (!(newElement instanceof SOAPBodyElement) && (newElement instanceof SOAPElement)) {
- // newElement = new ElementWrapper((ElementImpl) newElement);
- // }
- // return super.replaceChild(newElement, ref);
- // }
-
- public SOAPBodyElement addDocument(Document document)
- throws SOAPException {
- /*
-
- Element rootNode =
- document.getDocumentElement();
- // Causes all deferred nodes to be inflated
- rootNode.normalize();
- adoptElement(rootNode);
- SOAPBodyElement bodyElement = (SOAPBodyElement) convertToSoapElement(rootNode);
- addNode(bodyElement);
- return bodyElement;
- */
- ///*
- SOAPBodyElement newBodyElement = null;
- DocumentFragment docFrag = document.createDocumentFragment();
- Element rootElement = document.getDocumentElement();
- if(rootElement != null) {
- docFrag.appendChild(rootElement);
-
- Document ownerDoc = getOwnerDocument();
- // This copies the whole tree which could be very big so it's slow.
- // However, it does have the advantage of actually working.
- org.w3c.dom.Node replacingNode = ownerDoc.importNode(docFrag, true);
- // Adding replacingNode at the last of the children list of body
- addNode(replacingNode);
- Iterator i =
- getChildElements(NameImpl.copyElementName(rootElement));
- // Return the child element with the required name which is at the
- // end of the list
- while(i.hasNext())
- newBodyElement = (SOAPBodyElement) i.next();
- }
- return newBodyElement;
- //*/
- }
-
- protected SOAPElement convertToSoapElement(Element element) {
- if ((element instanceof SOAPBodyElement) &&
- //this check is required because ElementImpl currently
- // implements SOAPBodyElement
- !(element.getClass().equals(ElementImpl.class))) {
- return (SOAPElement) element;
- } else {
- return replaceElementWithSOAPElement(
- element,
- (ElementImpl) createBodyElement(NameImpl
- .copyElementName(element)));
- }
- }
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- log.log(Level.SEVERE,
- "SAAJ0146.impl.invalid.name.change.requested",
- new Object[] {elementQName.getLocalPart(),
- newName.getLocalPart()});
- throw new SOAPException("Cannot change name for "
- + elementQName.getLocalPart() + " to "
- + newName.getLocalPart());
- }
-
- public Document extractContentAsDocument() throws SOAPException {
-
- Iterator eachChild = getChildElements();
- javax.xml.soap.Node firstBodyElement = null;
-
- while (eachChild.hasNext() &&
- !(firstBodyElement instanceof SOAPElement))
- firstBodyElement = (javax.xml.soap.Node) eachChild.next();
-
- boolean exactlyOneChildElement = true;
- if (firstBodyElement == null)
- exactlyOneChildElement = false;
- else {
- for (org.w3c.dom.Node node = firstBodyElement.getNextSibling();
- node != null;
- node = node.getNextSibling()) {
-
- if (node instanceof Element) {
- exactlyOneChildElement = false;
- break;
- }
- }
- }
-
- if(!exactlyOneChildElement) {
- log.log(Level.SEVERE,
- "SAAJ0250.impl.body.should.have.exactly.one.child");
- throw new SOAPException("Cannot extract Document from body");
- }
-
- Document document = null;
- try {
- DocumentBuilderFactory factory =
- new com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl();
- factory.setNamespaceAware(true);
- DocumentBuilder builder = factory.newDocumentBuilder();
- document = builder.newDocument();
-
- Element rootElement = (Element) document.importNode(
- firstBodyElement,
- true);
-
- document.appendChild(rootElement);
-
- } catch(Exception e) {
- log.log(Level.SEVERE,
- "SAAJ0251.impl.cannot.extract.document.from.body");
- throw new SOAPExceptionImpl(
- "Unable to extract Document from body", e);
- }
-
- firstBodyElement.detachNode();
-
- return document;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java
deleted file mode 100644
index 904abe8c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.logging.Logger;
-
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class CDATAImpl
- extends com.sun.org.apache.xerces.internal.dom.CDATASectionImpl
- implements javax.xml.soap.Text {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings");
-
- static final String cdataUC = "<![CDATA[";
- static final String cdataLC = "<![cdata[";
-
- public CDATAImpl(SOAPDocumentImpl ownerDoc, String text) {
- super(ownerDoc, text);
- }
-
- public String getValue() {
- String nodeValue = getNodeValue();
- return (nodeValue.equals("") ? null : nodeValue);
- }
-
- public void setValue(String text) {
- setNodeValue(text);
- }
-
- public void setParentElement(SOAPElement parent) throws SOAPException {
- if (parent == null) {
- log.severe("SAAJ0145.impl.no.null.to.parent.elem");
- throw new SOAPException("Cannot pass NULL to setParentElement");
- }
- ((ElementImpl) parent).addNode(this);
- }
-
- public SOAPElement getParentElement() {
- return (SOAPElement) getParentNode();
- }
-
-
- public void detachNode() {
- org.w3c.dom.Node parent = getParentNode();
- if (parent != null) {
- parent.removeChild(this);
- }
- }
-
- public void recycleNode() {
- detachNode();
- // TBD
- // - add this to the factory so subsequent
- // creations can reuse this object.
- }
-
- public boolean isComment() {
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/CommentImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/CommentImpl.java
deleted file mode 100644
index a31ae255..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/CommentImpl.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.ResourceBundle;
-import java.util.logging.Logger;
-
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Text;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class CommentImpl
- extends com.sun.org.apache.xerces.internal.dom.CommentImpl
- implements javax.xml.soap.Text, org.w3c.dom.Comment {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings");
- protected static ResourceBundle rb =
- log.getResourceBundle();
-
- public CommentImpl(SOAPDocumentImpl ownerDoc, String text) {
- super(ownerDoc, text);
- }
-
- public String getValue() {
- String nodeValue = getNodeValue();
- return (nodeValue.equals("") ? null : nodeValue);
- }
-
- public void setValue(String text) {
- setNodeValue(text);
- }
-
-
- public void setParentElement(SOAPElement element) throws SOAPException {
- if (element == null) {
- log.severe("SAAJ0112.impl.no.null.to.parent.elem");
- throw new SOAPException("Cannot pass NULL to setParentElement");
- }
- ((ElementImpl) element).addNode(this);
- }
-
- public SOAPElement getParentElement() {
- return (SOAPElement) getParentNode();
- }
-
- public void detachNode() {
- org.w3c.dom.Node parent = getParentNode();
- if (parent != null) {
- parent.removeChild(this);
- }
- }
-
- public void recycleNode() {
- detachNode();
- // TBD
- // - add this to the factory so subsequent
- // creations can reuse this object.
- }
-
- public boolean isComment() {
- return true;
- }
-
- public Text splitText(int offset) throws DOMException {
- log.severe("SAAJ0113.impl.cannot.split.text.from.comment");
- throw new UnsupportedOperationException("Cannot split text from a Comment Node.");
- }
-
- public Text replaceWholeText(String content) throws DOMException {
- log.severe("SAAJ0114.impl.cannot.replace.wholetext.from.comment");
- throw new UnsupportedOperationException("Cannot replace Whole Text from a Comment Node.");
- }
-
- public String getWholeText() {
- //TODO: maybe we have to implement this in future.
- throw new UnsupportedOperationException("Not Supported");
- }
-
- public boolean isElementContentWhitespace() {
- //TODO: maybe we have to implement this in future.
- throw new UnsupportedOperationException("Not Supported");
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailEntryImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailEntryImpl.java
deleted file mode 100644
index 9c4a4171..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailEntryImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.DetailEntry;
-import javax.xml.soap.Name;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-
-public abstract class DetailEntryImpl
- extends ElementImpl
- implements DetailEntry {
- public DetailEntryImpl(SOAPDocumentImpl ownerDoc, Name qname) {
- super(ownerDoc, qname);
- }
- public DetailEntryImpl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailImpl.java
deleted file mode 100644
index bd6727f0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/DetailImpl.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import org.w3c.dom.Element;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public abstract class DetailImpl extends FaultElementImpl implements Detail {
- public DetailImpl(SOAPDocumentImpl ownerDoc, NameImpl detailName) {
- super(ownerDoc, detailName);
- }
-
- protected abstract DetailEntry createDetailEntry(Name name);
- protected abstract DetailEntry createDetailEntry(QName name);
-
- public DetailEntry addDetailEntry(Name name) throws SOAPException {
- DetailEntry entry = createDetailEntry(name);
- addNode(entry);
- return entry;
- }
-
- public DetailEntry addDetailEntry(QName qname) throws SOAPException {
- DetailEntry entry = createDetailEntry(qname);
- addNode(entry);
- return entry;
- }
-
- protected SOAPElement addElement(Name name) throws SOAPException {
- return addDetailEntry(name);
- }
-
- protected SOAPElement addElement(QName name) throws SOAPException {
- return addDetailEntry(name);
- }
-
- protected SOAPElement convertToSoapElement(Element element) {
- if (element instanceof DetailEntry) {
- return (SOAPElement) element;
- } else {
- DetailEntry detailEntry =
- createDetailEntry(NameImpl.copyElementName(element));
- return replaceElementWithSOAPElement(
- element,
- (ElementImpl) detailEntry);
- }
- }
-
- public Iterator getDetailEntries() {
- return new Iterator() {
- Iterator eachNode = getChildElementNodes();
- SOAPElement next = null;
- SOAPElement last = null;
-
- public boolean hasNext() {
- if (next == null) {
- while (eachNode.hasNext()) {
- next = (SOAPElement) eachNode.next();
- if (next instanceof DetailEntry) {
- break;
- }
- next = null;
- }
- }
- return next != null;
- }
-
- public Object next() {
- if (!hasNext()) {
- throw new NoSuchElementException();
- }
- last = next;
- next = null;
- return last;
- }
-
- public void remove() {
- if (last == null) {
- throw new IllegalStateException();
- }
- SOAPElement target = last;
- removeChild(target);
- last = null;
- }
- };
- }
-
- protected boolean isStandardFaultElement() {
- return true;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementFactory.java
deleted file mode 100644
index 7f1b2a00..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementFactory.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-import com.sun.xml.internal.messaging.saaj.soap.ver1_1.*;
-import com.sun.xml.internal.messaging.saaj.soap.ver1_2.*;
-
-
-public class ElementFactory {
- public static SOAPElement createElement(
- SOAPDocumentImpl ownerDocument,
- Name name) {
- return createElement(
- ownerDocument,
- name.getLocalName(),
- name.getPrefix(),
- name.getURI());
- }
- public static SOAPElement createElement(
- SOAPDocumentImpl ownerDocument,
- QName name) {
- return createElement(
- ownerDocument,
- name.getLocalPart(),
- name.getPrefix(),
- name.getNamespaceURI());
- }
-
- public static SOAPElement createElement(
- SOAPDocumentImpl ownerDocument,
- String localName,
- String prefix,
- String namespaceUri) {
-
-
- if (ownerDocument == null) {
- if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) {
- ownerDocument = new SOAPPart1_1Impl().getDocument();
- } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) {
- ownerDocument = new SOAPPart1_2Impl().getDocument();
- } else {
- ownerDocument = new SOAPDocumentImpl(null);
- }
- }
-
- SOAPElement newElement =
- createNamedElement(ownerDocument, localName, prefix, namespaceUri);
-
- return newElement != null
- ? newElement
- : new ElementImpl(
- ownerDocument,
- namespaceUri,
- NameImpl.createQName(prefix, localName));
- }
-
- public static SOAPElement createNamedElement(
- SOAPDocumentImpl ownerDocument,
- String localName,
- String prefix,
- String namespaceUri) {
-
- if (prefix == null) {
- prefix = NameImpl.SOAP_ENVELOPE_PREFIX;
- }
-
- if (localName.equalsIgnoreCase("Envelope")) {
- if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) {
- return new Envelope1_1Impl(ownerDocument, prefix);
- } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) {
- return new Envelope1_2Impl(ownerDocument, prefix);
- }
- }
- if (localName.equalsIgnoreCase("Body")) {
- if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) {
- return new Body1_1Impl(ownerDocument, prefix);
- } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) {
- return new Body1_2Impl(ownerDocument, prefix);
- }
- }
- if (localName.equalsIgnoreCase("Header")) {
- if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) {
- return new Header1_1Impl(ownerDocument, prefix);
- } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) {
- return new Header1_2Impl(ownerDocument, prefix);
- }
- }
- if (localName.equalsIgnoreCase("Fault")) {
- SOAPFault fault = null;
- if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) {
- fault = new Fault1_1Impl(ownerDocument, prefix);
- } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) {
- fault = new Fault1_2Impl(ownerDocument, prefix);
- }
-
- if (fault != null) {
-// try {
-// fault.addNamespaceDeclaration(
-// NameImpl.SOAP_ENVELOPE_PREFIX,
-// SOAPConstants.URI_NS_SOAP_ENVELOPE);
-// fault.setFaultCode(
-// NameImpl.create(
-// "Server",
-// NameImpl.SOAP_ENVELOPE_PREFIX,
-// SOAPConstants.URI_NS_SOAP_ENVELOPE));
-// fault.setFaultString(
-// "Fault string, and possibly fault code, not set");
-// } catch (SOAPException e) {
-// }
- return fault;
- }
-
- }
- if (localName.equalsIgnoreCase("Detail")) {
- if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) {
- return new Detail1_1Impl(ownerDocument, prefix);
- } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) {
- return new Detail1_2Impl(ownerDocument, prefix);
- }
- }
- if (localName.equalsIgnoreCase("faultcode")
- || localName.equalsIgnoreCase("faultstring")
- || localName.equalsIgnoreCase("faultactor")) {
- // SOAP 1.2 does not have fault(code/string/actor)
- // So there is no else case required
- if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) {
- return new FaultElement1_1Impl(ownerDocument,
- localName,
- prefix);
- }
- }
-
- return null;
- }
-
- protected static void invalidCreate(String msg) {
- throw new TreeException(msg);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java
deleted file mode 100644
index 6b833370..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/ElementImpl.java
+++ /dev/null
@@ -1,1248 +0,0 @@
-/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import org.w3c.dom.*;
-import org.w3c.dom.Node;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-import com.sun.xml.internal.messaging.saaj.util.*;
-
-public class ElementImpl
- extends com.sun.org.apache.xerces.internal.dom.ElementNSImpl
- implements SOAPElement, SOAPBodyElement {
-
- public static final String DSIG_NS = "http://www.w3.org/2000/09/xmldsig#".intern();
- public static final String XENC_NS = "http://www.w3.org/2001/04/xmlenc#".intern();
- public static final String WSU_NS = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd".intern();
-
- private AttributeManager encodingStyleAttribute = new AttributeManager();
-
- protected QName elementQName;
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings");
-
- /**
- * XML Information Set REC
- * all namespace attributes (including those named xmlns,
- * whose [prefix] property has no value) have a namespace URI of http://www.w3.org/2000/xmlns/
- */
- public final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/".intern();
-
- /**
- * The XML Namespace ("http://www.w3.org/XML/1998/namespace"). This is
- * the Namespace URI that is automatically mapped to the "xml" prefix.
- */
- public final static String XML_URI = "http://www.w3.org/XML/1998/namespace".intern();
-
- public ElementImpl(SOAPDocumentImpl ownerDoc, Name name) {
- super(
- ownerDoc,
- name.getURI(),
- name.getQualifiedName(),
- name.getLocalName());
- elementQName = NameImpl.convertToQName(name);
- }
-
- public ElementImpl(SOAPDocumentImpl ownerDoc, QName name) {
- super(
- ownerDoc,
- name.getNamespaceURI(),
- getQualifiedName(name),
- name.getLocalPart());
- elementQName = name;
- }
-
- public ElementImpl(
- SOAPDocumentImpl ownerDoc,
- String uri,
- String qualifiedName) {
-
- super(ownerDoc, uri, qualifiedName);
- elementQName =
- new QName(uri, getLocalPart(qualifiedName), getPrefix(qualifiedName));
- }
-
- public void ensureNamespaceIsDeclared(String prefix, String uri) {
- String alreadyDeclaredUri = getNamespaceURI(prefix);
- if (alreadyDeclaredUri == null || !alreadyDeclaredUri.equals(uri)) {
- try {
- addNamespaceDeclaration(prefix, uri);
- } catch (SOAPException e) { /*ignore*/
- }
- }
- }
-
- public Document getOwnerDocument() {
- Document doc = super.getOwnerDocument();
- if (doc instanceof SOAPDocument)
- return ((SOAPDocument) doc).getDocument();
- else
- return doc;
- }
-
- public SOAPElement addChildElement(Name name) throws SOAPException {
- return addElement(name);
- }
-
- public SOAPElement addChildElement(QName qname) throws SOAPException {
- return addElement(qname);
- }
-
- public SOAPElement addChildElement(String localName) throws SOAPException {
- String nsUri = getNamespaceURI("");
- Name name = (nsUri == null || nsUri.isEmpty())
- ? NameImpl.createFromUnqualifiedName(localName)
- : NameImpl.createFromQualifiedName(localName, nsUri);
- return addChildElement(name);
- }
-
- public SOAPElement addChildElement(String localName, String prefix)
- throws SOAPException {
- String uri = getNamespaceURI(prefix);
- if (uri == null) {
- log.log(
- Level.SEVERE,
- "SAAJ0101.impl.parent.of.body.elem.mustbe.body",
- new String[] { prefix });
- throw new SOAPExceptionImpl(
- "Unable to locate namespace for prefix " + prefix);
- }
- return addChildElement(localName, prefix, uri);
- }
-
- public String getNamespaceURI(String prefix) {
-
- if ("xmlns".equals(prefix)) {
- return XMLNS_URI;
- }
-
- if("xml".equals(prefix)) {
- return XML_URI;
- }
-
- if ("".equals(prefix)) {
-
- org.w3c.dom.Node currentAncestor = this;
- while (currentAncestor != null &&
- !(currentAncestor instanceof Document)) {
-
- if (currentAncestor instanceof ElementImpl) {
- QName name = ((ElementImpl) currentAncestor).getElementQName();
- /*
- if (prefix.equals(name.getPrefix())) {
- String uri = name.getNamespaceURI();
- if ("".equals(uri)) {
- return null;
- }
- else {
- return uri;
- }
- }*/
- if (((Element) currentAncestor).hasAttributeNS(
- XMLNS_URI, "xmlns")) {
-
- String uri =
- ((Element) currentAncestor).getAttributeNS(
- XMLNS_URI, "xmlns");
- if ("".equals(uri))
- return null;
- else {
- return uri;
- }
- }
- }
- currentAncestor = currentAncestor.getParentNode();
- }
-
- } else if (prefix != null) {
- // Find if there's an ancester whose name contains this prefix
- org.w3c.dom.Node currentAncestor = this;
-
-// String uri = currentAncestor.lookupNamespaceURI(prefix);
-// return uri;
- while (currentAncestor != null &&
- !(currentAncestor instanceof Document)) {
-
- /* if (prefix.equals(currentAncestor.getPrefix())) {
- String uri = currentAncestor.getNamespaceURI();
- // this is because the javadoc says getNamespaceURI() is not a computed value
- // and URI for a non-empty prefix cannot be null
- if (uri != null)
- return uri;
- }*/
- //String uri = currentAncestor.lookupNamespaceURI(prefix);
- //if (uri != null) {
- // return uri;
- //}
-
- if (((Element) currentAncestor).hasAttributeNS(
- XMLNS_URI, prefix)) {
- return ((Element) currentAncestor).getAttributeNS(
- XMLNS_URI, prefix);
- }
-
- currentAncestor = currentAncestor.getParentNode();
- }
- }
-
- return null;
- }
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- ElementImpl copy =
- new ElementImpl((SOAPDocumentImpl) getOwnerDocument(), newName);
- return replaceElementWithSOAPElement(this,copy);
- }
-
- public QName createQName(String localName, String prefix)
- throws SOAPException {
- String uri = getNamespaceURI(prefix);
- if (uri == null) {
- log.log(Level.SEVERE, "SAAJ0102.impl.cannot.locate.ns",
- new Object[] {prefix});
- throw new SOAPException("Unable to locate namespace for prefix "
- + prefix);
- }
- return new QName(uri, localName, prefix);
- }
-
- public String getNamespacePrefix(String uri) {
-
- NamespaceContextIterator eachNamespace = getNamespaceContextNodes();
- while (eachNamespace.hasNext()) {
- org.w3c.dom.Attr namespaceDecl = eachNamespace.nextNamespaceAttr();
- if (namespaceDecl.getNodeValue().equals(uri)) {
- String candidatePrefix = namespaceDecl.getLocalName();
- if ("xmlns".equals(candidatePrefix))
- return "";
- else
- return candidatePrefix;
- }
- }
-
- // Find if any of the ancestors' name has this uri
- org.w3c.dom.Node currentAncestor = this;
- while (currentAncestor != null &&
- !(currentAncestor instanceof Document)) {
-
- if (uri.equals(currentAncestor.getNamespaceURI()))
- return currentAncestor.getPrefix();
- currentAncestor = currentAncestor.getParentNode();
- }
-
- return null;
- }
-
- protected org.w3c.dom.Attr getNamespaceAttr(String prefix) {
- NamespaceContextIterator eachNamespace = getNamespaceContextNodes();
- if (!"".equals(prefix))
- prefix = ":"+prefix;
- while (eachNamespace.hasNext()) {
- org.w3c.dom.Attr namespaceDecl = eachNamespace.nextNamespaceAttr();
- if (!"".equals(prefix)) {
- if (namespaceDecl.getNodeName().endsWith(prefix))
- return namespaceDecl;
- } else {
- if (namespaceDecl.getNodeName().equals("xmlns"))
- return namespaceDecl;
- }
- }
- return null;
- }
-
- public NamespaceContextIterator getNamespaceContextNodes() {
- return getNamespaceContextNodes(true);
- }
-
- public NamespaceContextIterator getNamespaceContextNodes(boolean traverseStack) {
- return new NamespaceContextIterator(this, traverseStack);
- }
-
- public SOAPElement addChildElement(
- String localName,
- String prefix,
- String uri)
- throws SOAPException {
-
- SOAPElement newElement = createElement(NameImpl.create(localName, prefix, uri));
- addNode(newElement);
- return convertToSoapElement(newElement);
- }
-
- public SOAPElement addChildElement(SOAPElement element)
- throws SOAPException {
-
- // check if Element falls in SOAP 1.1 or 1.2 namespace.
- String elementURI = element.getElementName().getURI();
- String localName = element.getLocalName();
-
- if ((SOAPConstants.URI_NS_SOAP_ENVELOPE).equals(elementURI)
- || (SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE).equals(elementURI)) {
-
-
- if ("Envelope".equalsIgnoreCase(localName) ||
- "Header".equalsIgnoreCase(localName) || "Body".equalsIgnoreCase(localName)) {
- log.severe("SAAJ0103.impl.cannot.add.fragements");
- throw new SOAPExceptionImpl(
- "Cannot add fragments which contain elements "
- + "which are in the SOAP namespace");
- }
-
- if ("Fault".equalsIgnoreCase(localName) && !"Body".equalsIgnoreCase(this.getLocalName())) {
- log.severe("SAAJ0154.impl.adding.fault.to.nonbody");
- throw new SOAPExceptionImpl("Cannot add a SOAPFault as a child of " + this.getLocalName());
- }
-
- if ("Detail".equalsIgnoreCase(localName) && !"Fault".equalsIgnoreCase(this.getLocalName())) {
- log.severe("SAAJ0155.impl.adding.detail.nonfault");
- throw new SOAPExceptionImpl("Cannot add a Detail as a child of " + this.getLocalName());
- }
-
- if ("Fault".equalsIgnoreCase(localName)) {
- // if body is not empty throw an exception
- if (!elementURI.equals(this.getElementName().getURI())) {
- log.severe("SAAJ0158.impl.version.mismatch.fault");
- throw new SOAPExceptionImpl("SOAP Version mismatch encountered when trying to add SOAPFault to SOAPBody");
- }
- Iterator it = this.getChildElements();
- if (it.hasNext()) {
- log.severe("SAAJ0156.impl.adding.fault.error");
- throw new SOAPExceptionImpl("Cannot add SOAPFault as a child of a non-Empty SOAPBody");
- }
- }
- }
-
- // preserve the encodingStyle attr as it may get lost in the import
- String encodingStyle = element.getEncodingStyle();
-
- ElementImpl importedElement = (ElementImpl) importElement(element);
- addNode(importedElement);
-
- if (encodingStyle != null)
- importedElement.setEncodingStyle(encodingStyle);
-
- return convertToSoapElement(importedElement);
- }
-
- protected Element importElement(Element element) {
- Document document = getOwnerDocument();
- Document oldDocument = element.getOwnerDocument();
- if (!oldDocument.equals(document)) {
- return (Element) document.importNode(element, true);
- } else {
- return element;
- }
- }
-
- protected SOAPElement addElement(Name name) throws SOAPException {
- SOAPElement newElement = createElement(name);
- addNode(newElement);
- return newElement;
- }
-
- protected SOAPElement addElement(QName name) throws SOAPException {
- SOAPElement newElement = createElement(name);
- addNode(newElement);
- return newElement;
- }
-
- protected SOAPElement createElement(Name name) {
-
- if (isNamespaceQualified(name)) {
- return (SOAPElement)
- getOwnerDocument().createElementNS(
- name.getURI(),
- name.getQualifiedName());
- } else {
- return (SOAPElement)
- getOwnerDocument().createElement(name.getQualifiedName());
- }
- }
-
- protected SOAPElement createElement(QName name) {
-
- if (isNamespaceQualified(name)) {
- return (SOAPElement)
- getOwnerDocument().createElementNS(
- name.getNamespaceURI(),
- getQualifiedName(name));
- } else {
- return (SOAPElement)
- getOwnerDocument().createElement(getQualifiedName(name));
- }
- }
-
- protected void addNode(org.w3c.dom.Node newElement) throws SOAPException {
- insertBefore(newElement, null);
-
- if (getOwnerDocument() instanceof DocumentFragment)
- return;
-
- if (newElement instanceof ElementImpl) {
- ElementImpl element = (ElementImpl) newElement;
- QName elementName = element.getElementQName();
- if (!"".equals(elementName.getNamespaceURI())) {
- element.ensureNamespaceIsDeclared(
- elementName.getPrefix(), elementName.getNamespaceURI());
- }
- }
-
- }
-
- protected SOAPElement findChild(NameImpl name) {
- Iterator eachChild = getChildElementNodes();
- while (eachChild.hasNext()) {
- SOAPElement child = (SOAPElement) eachChild.next();
- if (child.getElementName().equals(name)) {
- return child;
- }
- }
-
- return null;
- }
-
- public SOAPElement addTextNode(String text) throws SOAPException {
- if (text.startsWith(CDATAImpl.cdataUC)
- || text.startsWith(CDATAImpl.cdataLC))
- return addCDATA(
- text.substring(CDATAImpl.cdataUC.length(), text.length() - 3));
- return addText(text);
- }
-
- protected SOAPElement addCDATA(String text) throws SOAPException {
- org.w3c.dom.Text cdata =
- (org.w3c.dom.Text) getOwnerDocument().createCDATASection(text);
- addNode(cdata);
- return this;
- }
-
- protected SOAPElement addText(String text) throws SOAPException {
- org.w3c.dom.Text textNode =
- (org.w3c.dom.Text) getOwnerDocument().createTextNode(text);
- addNode(textNode);
- return this;
- }
-
- public SOAPElement addAttribute(Name name, String value)
- throws SOAPException {
- addAttributeBare(name, value);
- if (!"".equals(name.getURI())) {
- ensureNamespaceIsDeclared(name.getPrefix(), name.getURI());
- }
- return this;
- }
-
- public SOAPElement addAttribute(QName qname, String value)
- throws SOAPException {
- addAttributeBare(qname, value);
- if (!"".equals(qname.getNamespaceURI())) {
- ensureNamespaceIsDeclared(qname.getPrefix(), qname.getNamespaceURI());
- }
- return this;
- }
-
- private void addAttributeBare(Name name, String value) {
- addAttributeBare(
- name.getURI(),
- name.getPrefix(),
- name.getQualifiedName(),
- value);
- }
- private void addAttributeBare(QName name, String value) {
- addAttributeBare(
- name.getNamespaceURI(),
- name.getPrefix(),
- getQualifiedName(name),
- value);
- }
-
- private void addAttributeBare(
- String uri,
- String prefix,
- String qualifiedName,
- String value) {
-
- uri = uri.length() == 0 ? null : uri;
- if (qualifiedName.equals("xmlns")) {
- uri = XMLNS_URI;
- }
-
- if (uri == null) {
- setAttribute(qualifiedName, value);
- } else {
- setAttributeNS(uri, qualifiedName, value);
- }
- }
-
- public SOAPElement addNamespaceDeclaration(String prefix, String uri)
- throws SOAPException {
- if (prefix.length() > 0) {
- setAttributeNS(XMLNS_URI, "xmlns:" + prefix, uri);
- } else {
- setAttributeNS(XMLNS_URI, "xmlns", uri);
- }
- //Fix for CR:6474641
- //tryToFindEncodingStyleAttributeName();
- return this;
- }
-
- public String getAttributeValue(Name name) {
- return getAttributeValueFrom(this, name);
- }
-
- public String getAttributeValue(QName qname) {
- return getAttributeValueFrom(
- this,
- qname.getNamespaceURI(),
- qname.getLocalPart(),
- qname.getPrefix(),
- getQualifiedName(qname));
- }
-
- public Iterator getAllAttributes() {
- Iterator i = getAllAttributesFrom(this);
- ArrayList list = new ArrayList();
- while (i.hasNext()) {
- Name name = (Name) i.next();
- if (!"xmlns".equalsIgnoreCase(name.getPrefix()))
- list.add(name);
- }
- return list.iterator();
- }
-
- public Iterator getAllAttributesAsQNames() {
- Iterator i = getAllAttributesFrom(this);
- ArrayList list = new ArrayList();
- while (i.hasNext()) {
- Name name = (Name) i.next();
- if (!"xmlns".equalsIgnoreCase(name.getPrefix())) {
- list.add(NameImpl.convertToQName(name));
- }
- }
- return list.iterator();
- }
-
-
- public Iterator getNamespacePrefixes() {
- return doGetNamespacePrefixes(false);
- }
-
- public Iterator getVisibleNamespacePrefixes() {
- return doGetNamespacePrefixes(true);
- }
-
- protected Iterator doGetNamespacePrefixes(final boolean deep) {
- return new Iterator() {
- String next = null;
- String last = null;
- NamespaceContextIterator eachNamespace =
- getNamespaceContextNodes(deep);
-
- void findNext() {
- while (next == null && eachNamespace.hasNext()) {
- String attributeKey =
- eachNamespace.nextNamespaceAttr().getNodeName();
- if (attributeKey.startsWith("xmlns:")) {
- next = attributeKey.substring("xmlns:".length());
- }
- }
- }
-
- public boolean hasNext() {
- findNext();
- return next != null;
- }
-
- public Object next() {
- findNext();
- if (next == null) {
- throw new NoSuchElementException();
- }
-
- last = next;
- next = null;
- return last;
- }
-
- public void remove() {
- if (last == null) {
- throw new IllegalStateException();
- }
- eachNamespace.remove();
- next = null;
- last = null;
- }
- };
- }
-
- public Name getElementName() {
- return NameImpl.convertToName(elementQName);
- }
-
- public QName getElementQName() {
- return elementQName;
- }
-
- public boolean removeAttribute(Name name) {
- return removeAttribute(name.getURI(), name.getLocalName());
- }
-
- public boolean removeAttribute(QName name) {
- return removeAttribute(name.getNamespaceURI(), name.getLocalPart());
- }
-
- private boolean removeAttribute(String uri, String localName) {
- String nonzeroLengthUri =
- (uri == null || uri.length() == 0) ? null : uri;
- org.w3c.dom.Attr attribute =
- getAttributeNodeNS(nonzeroLengthUri, localName);
- if (attribute == null) {
- return false;
- }
- removeAttributeNode(attribute);
- return true;
- }
-
- public boolean removeNamespaceDeclaration(String prefix) {
- org.w3c.dom.Attr declaration = getNamespaceAttr(prefix);
- if (declaration == null) {
- return false;
- }
- try {
- removeAttributeNode(declaration);
- } catch (DOMException de) {
- // ignore
- }
- return true;
- }
-
- public Iterator getChildElements() {
- return getChildElementsFrom(this);
- }
-
- protected SOAPElement convertToSoapElement(Element element) {
- if (element instanceof SOAPElement) {
- return (SOAPElement) element;
- } else {
- return replaceElementWithSOAPElement(
- element,
- (ElementImpl) createElement(NameImpl.copyElementName(element)));
- }
- }
-
- protected static SOAPElement replaceElementWithSOAPElement(
- Element element,
- ElementImpl copy) {
-
- Iterator eachAttribute = getAllAttributesFrom(element);
- while (eachAttribute.hasNext()) {
- Name name = (Name) eachAttribute.next();
- copy.addAttributeBare(name, getAttributeValueFrom(element, name));
- }
-
- Iterator eachChild = getChildElementsFrom(element);
- while (eachChild.hasNext()) {
- Node nextChild = (Node) eachChild.next();
- copy.insertBefore(nextChild, null);
- }
-
- Node parent = element.getParentNode();
- if (parent != null) {
- parent.replaceChild(copy, element);
- } // XXX else throw an exception?
-
- return copy;
- }
-
- protected Iterator getChildElementNodes() {
- return new Iterator() {
- Iterator eachNode = getChildElements();
- Node next = null;
- Node last = null;
-
- public boolean hasNext() {
- if (next == null) {
- while (eachNode.hasNext()) {
- Node node = (Node) eachNode.next();
- if (node instanceof SOAPElement) {
- next = node;
- break;
- }
- }
- }
- return next != null;
- }
-
- public Object next() {
- if (hasNext()) {
- last = next;
- next = null;
- return last;
- }
- throw new NoSuchElementException();
- }
-
- public void remove() {
- if (last == null) {
- throw new IllegalStateException();
- }
- Node target = last;
- last = null;
- removeChild(target);
- }
- };
- }
-
- public Iterator getChildElements(final Name name) {
- return getChildElements(name.getURI(), name.getLocalName());
- }
-
- public Iterator getChildElements(final QName qname) {
- return getChildElements(qname.getNamespaceURI(), qname.getLocalPart());
- }
-
- private Iterator getChildElements(final String nameUri, final String nameLocal) {
- return new Iterator() {
- Iterator eachElement = getChildElementNodes();
- Node next = null;
- Node last = null;
-
- public boolean hasNext() {
- if (next == null) {
- while (eachElement.hasNext()) {
- Node element = (Node) eachElement.next();
- String elementUri = element.getNamespaceURI();
- elementUri = elementUri == null ? "" : elementUri;
- String elementName = element.getLocalName();
- if (elementUri.equals(nameUri)
- && elementName.equals(nameLocal)) {
- next = element;
- break;
- }
- }
- }
- return next != null;
- }
-
- public Object next() {
- if (!hasNext()) {
- throw new NoSuchElementException();
- }
- last = next;
- next = null;
- return last;
- }
-
- public void remove() {
- if (last == null) {
- throw new IllegalStateException();
- }
- Node target = last;
- last = null;
- removeChild(target);
- }
- };
- }
-
- public void removeContents() {
- Node currentChild = getFirstChild();
-
- while (currentChild != null) {
- Node temp = currentChild.getNextSibling();
- if (currentChild instanceof javax.xml.soap.Node) {
- ((javax.xml.soap.Node) currentChild).detachNode();
- } else {
- Node parent = currentChild.getParentNode();
- if (parent != null) {
- parent.removeChild(currentChild);
- }
-
- }
- currentChild = temp;
- }
- }
-
- public void setEncodingStyle(String encodingStyle) throws SOAPException {
- if (!"".equals(encodingStyle)) {
- try {
- new URI(encodingStyle);
- } catch (URISyntaxException m) {
- log.log(
- Level.SEVERE,
- "SAAJ0105.impl.encoding.style.mustbe.valid.URI",
- new String[] { encodingStyle });
- throw new IllegalArgumentException(
- "Encoding style (" + encodingStyle + ") should be a valid URI");
- }
- }
- encodingStyleAttribute.setValue(encodingStyle);
- tryToFindEncodingStyleAttributeName();
- }
-
- public String getEncodingStyle() {
- String encodingStyle = encodingStyleAttribute.getValue();
- if (encodingStyle != null)
- return encodingStyle;
- String soapNamespace = getSOAPNamespace();
- if (soapNamespace != null) {
- Attr attr = getAttributeNodeNS(soapNamespace, "encodingStyle");
- if (attr != null) {
- encodingStyle = attr.getValue();
- try {
- setEncodingStyle(encodingStyle);
- } catch (SOAPException se) {
- // has to be ignored
- }
- return encodingStyle;
- }
- }
- return null;
- }
-
- // Node methods
- public String getValue() {
- javax.xml.soap.Node valueNode = getValueNode();
- return valueNode == null ? null : valueNode.getValue();
- }
-
- public void setValue(String value) {
- Node valueNode = getValueNodeStrict();
- if (valueNode != null) {
- valueNode.setNodeValue(value);
- } else {
- try {
- addTextNode(value);
- } catch (SOAPException e) {
- throw new RuntimeException(e.getMessage());
- }
- }
- }
-
- protected Node getValueNodeStrict() {
- Node node = getFirstChild();
- if (node != null) {
- if (node.getNextSibling() == null
- && node.getNodeType() == org.w3c.dom.Node.TEXT_NODE) {
- return node;
- } else {
- log.severe("SAAJ0107.impl.elem.child.not.single.text");
- throw new IllegalStateException();
- }
- }
-
- return null;
- }
-
- protected javax.xml.soap.Node getValueNode() {
- Iterator i = getChildElements();
- while (i.hasNext()) {
- javax.xml.soap.Node n = (javax.xml.soap.Node) i.next();
- if (n.getNodeType() == org.w3c.dom.Node.TEXT_NODE ||
- n.getNodeType() == org.w3c.dom.Node.CDATA_SECTION_NODE) {
- // TODO: Hack to fix text node split into multiple lines.
- normalize();
- // Should remove the normalization step when this gets fixed in
- // DOM/Xerces.
- return (javax.xml.soap.Node) n;
- }
- }
- return null;
- }
-
- public void setParentElement(SOAPElement element) throws SOAPException {
- if (element == null) {
- log.severe("SAAJ0106.impl.no.null.to.parent.elem");
- throw new SOAPException("Cannot pass NULL to setParentElement");
- }
- element.addChildElement(this);
- findEncodingStyleAttributeName();
- }
-
- protected void findEncodingStyleAttributeName() throws SOAPException {
- String soapNamespace = getSOAPNamespace();
- if (soapNamespace != null) {
- String soapNamespacePrefix = getNamespacePrefix(soapNamespace);
- if (soapNamespacePrefix != null) {
- setEncodingStyleNamespace(soapNamespace, soapNamespacePrefix);
- }
- }
- }
-
- protected void setEncodingStyleNamespace(
- String soapNamespace,
- String soapNamespacePrefix)
- throws SOAPException {
- Name encodingStyleAttributeName =
- NameImpl.create(
- "encodingStyle",
- soapNamespacePrefix,
- soapNamespace);
- encodingStyleAttribute.setName(encodingStyleAttributeName);
- }
-
- public SOAPElement getParentElement() {
- Node parentNode = getParentNode();
- if (parentNode instanceof SOAPDocument) {
- return null;
- }
- return (SOAPElement) parentNode;
- }
-
- protected String getSOAPNamespace() {
- String soapNamespace = null;
-
- SOAPElement antecedent = this;
- while (antecedent != null) {
- Name antecedentName = antecedent.getElementName();
- String antecedentNamespace = antecedentName.getURI();
-
- if (NameImpl.SOAP11_NAMESPACE.equals(antecedentNamespace)
- || NameImpl.SOAP12_NAMESPACE.equals(antecedentNamespace)) {
-
- soapNamespace = antecedentNamespace;
- break;
- }
-
- antecedent = antecedent.getParentElement();
- }
-
- return soapNamespace;
- }
-
- public void detachNode() {
- Node parent = getParentNode();
- if (parent != null) {
- parent.removeChild(this);
- }
- encodingStyleAttribute.clearNameAndValue();
- // Fix for CR: 6474641
- //tryToFindEncodingStyleAttributeName();
- }
-
- public void tryToFindEncodingStyleAttributeName() {
- try {
- findEncodingStyleAttributeName();
- } catch (SOAPException e) { /*okay to fail*/
- }
- }
-
- public void recycleNode() {
- detachNode();
- // TBD
- // - add this to the factory so subsequent
- // creations can reuse this object.
- }
-
- class AttributeManager {
- Name attributeName = null;
- String attributeValue = null;
-
- public void setName(Name newName) throws SOAPException {
- clearAttribute();
- attributeName = newName;
- reconcileAttribute();
- }
- public void clearName() {
- clearAttribute();
- attributeName = null;
- }
- public void setValue(String value) throws SOAPException {
- attributeValue = value;
- reconcileAttribute();
- }
- public Name getName() {
- return attributeName;
- }
- public String getValue() {
- return attributeValue;
- }
-
- /** Note: to be used only in detachNode method */
- public void clearNameAndValue() {
- attributeName = null;
- attributeValue = null;
- }
-
- private void reconcileAttribute() throws SOAPException {
- if (attributeName != null) {
- removeAttribute(attributeName);
- if (attributeValue != null) {
- addAttribute(attributeName, attributeValue);
- }
- }
- }
- private void clearAttribute() {
- if (attributeName != null) {
- removeAttribute(attributeName);
- }
- }
- }
-
- protected static org.w3c.dom.Attr getNamespaceAttrFrom(
- Element element,
- String prefix) {
- NamespaceContextIterator eachNamespace =
- new NamespaceContextIterator(element);
- while (eachNamespace.hasNext()) {
- org.w3c.dom.Attr namespaceDecl = eachNamespace.nextNamespaceAttr();
- String declaredPrefix =
- NameImpl.getLocalNameFromTagName(namespaceDecl.getNodeName());
- if (declaredPrefix.equals(prefix)) {
- return namespaceDecl;
- }
- }
- return null;
- }
-
- protected static Iterator getAllAttributesFrom(final Element element) {
- final NamedNodeMap attributes = element.getAttributes();
-
- return new Iterator() {
- int attributesLength = attributes.getLength();
- int attributeIndex = 0;
- String currentName;
-
- public boolean hasNext() {
- return attributeIndex < attributesLength;
- }
-
- public Object next() {
- if (!hasNext()) {
- throw new NoSuchElementException();
- }
- Node current = attributes.item(attributeIndex++);
- currentName = current.getNodeName();
-
- String prefix = NameImpl.getPrefixFromTagName(currentName);
- if (prefix.length() == 0) {
- return NameImpl.createFromUnqualifiedName(currentName);
- } else {
- Name attributeName =
- NameImpl.createFromQualifiedName(
- currentName,
- current.getNamespaceURI());
- return attributeName;
- }
- }
-
- public void remove() {
- if (currentName == null) {
- throw new IllegalStateException();
- }
- attributes.removeNamedItem(currentName);
- }
- };
- }
-
- protected static String getAttributeValueFrom(Element element, Name name) {
- return getAttributeValueFrom(
- element,
- name.getURI(),
- name.getLocalName(),
- name.getPrefix(),
- name.getQualifiedName());
- }
-
- private static String getAttributeValueFrom(
- Element element,
- String uri,
- String localName,
- String prefix,
- String qualifiedName) {
-
- String nonzeroLengthUri =
- (uri == null || uri.length() == 0) ? null : uri;
-
- boolean mustUseGetAttributeNodeNS = (nonzeroLengthUri != null);
-
- if (mustUseGetAttributeNodeNS) {
-
- if (!element.hasAttributeNS(uri, localName)) {
- return null;
- }
-
- String attrValue =
- element.getAttributeNS(nonzeroLengthUri, localName);
-
- return attrValue;
- }
-
- Attr attribute = null;
- attribute = element.getAttributeNode(qualifiedName);
-
- return attribute == null ? null : attribute.getValue();
- }
-
- protected static Iterator getChildElementsFrom(final Element element) {
- return new Iterator() {
- Node next = element.getFirstChild();
- Node nextNext = null;
- Node last = null;
-
- public boolean hasNext() {
- if (next != null) {
- return true;
- }
- if (next == null && nextNext != null) {
- next = nextNext;
- }
-
- return next != null;
- }
-
- public Object next() {
- if (hasNext()) {
- last = next;
- next = null;
-
- if ((element instanceof ElementImpl)
- && (last instanceof Element)) {
- last =
- ((ElementImpl) element).convertToSoapElement(
- (Element) last);
- }
-
- nextNext = last.getNextSibling();
- return last;
- }
- throw new NoSuchElementException();
- }
-
- public void remove() {
- if (last == null) {
- throw new IllegalStateException();
- }
- Node target = last;
- last = null;
- element.removeChild(target);
- }
- };
- }
-
- public static String getQualifiedName(QName name) {
- String prefix = name.getPrefix();
- String localName = name.getLocalPart();
- String qualifiedName = null;
-
- if (prefix != null && prefix.length() > 0) {
- qualifiedName = prefix + ":" + localName;
- } else {
- qualifiedName = localName;
- }
- return qualifiedName;
- }
-
- public static String getLocalPart(String qualifiedName) {
- if (qualifiedName == null) {
- // Log
- throw new IllegalArgumentException("Cannot get local name for a \"null\" qualified name");
- }
-
- int index = qualifiedName.indexOf(':');
- if (index < 0)
- return qualifiedName;
- else
- return qualifiedName.substring(index + 1);
- }
-
- public static String getPrefix(String qualifiedName) {
- if (qualifiedName == null) {
- // Log
- throw new IllegalArgumentException("Cannot get prefix for a \"null\" qualified name");
- }
-
- int index = qualifiedName.indexOf(':');
- if (index < 0)
- return "";
- else
- return qualifiedName.substring(0, index);
- }
-
- protected boolean isNamespaceQualified(Name name) {
- return !"".equals(name.getURI());
- }
-
- protected boolean isNamespaceQualified(QName name) {
- return !"".equals(name.getNamespaceURI());
- }
-
- //TODO: This is a temporary SAAJ workaround for optimizing XWS
- // should be removed once the corresponding JAXP bug is fixed
- // It appears the bug will be fixed in JAXP 1.4 (not by Appserver 9 timeframe)
- public void setAttributeNS(
- String namespaceURI,String qualifiedName, String value) {
- int index = qualifiedName.indexOf(':');
- String localName;
- if (index < 0)
- localName = qualifiedName;
- else
- localName = qualifiedName.substring(index + 1);
-
- // Workaround for bug 6467808 - This needs to be fixed in JAXP
-
- // Rolling back this fix, this is a wrong fix, infact its causing other regressions in JAXWS tck and
- // other tests, because of this change the namespace declarations on soapenv:Fault element are never
- // picked up. The fix for bug 6467808 should be in JAXP.
-// if(elementQName.getLocalPart().equals("Fault") &&
-// (SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE.equals(value) ||
-// SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE.equals(value)))
-// return;
-
- super.setAttributeNS(namespaceURI,qualifiedName,value);
- //String tmpLocalName = this.getLocalName();
- String tmpURI = this.getNamespaceURI();
- boolean isIDNS = false;
- if( tmpURI != null && (tmpURI.equals(DSIG_NS) || tmpURI.equals(XENC_NS))){
- isIDNS = true;
- }
- //No need to check for Signature/encryption element
- //just check for namespace.
- if(localName.equals("Id")){
- if(namespaceURI == null || namespaceURI.equals("")){
- setIdAttribute(localName,true);
- }else if(isIDNS || WSU_NS.equals(namespaceURI)){
- setIdAttributeNS(namespaceURI,localName,true);
- }
- }
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java
deleted file mode 100644
index 5e327c08..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-
-import java.util.Iterator;
-import java.util.logging.Level;
-import org.w3c.dom.Document;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-import javax.xml.transform.*;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.sax.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.Envelope;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-import com.sun.xml.internal.messaging.saaj.util.FastInfosetReflection;
-import com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTransformer;
-
-/**
- * Our implementation of the SOAP envelope.
- *
- * @author Anil Vijendran (anil@sun.com)
- */
-public abstract class EnvelopeImpl extends ElementImpl implements Envelope {
- protected HeaderImpl header;
- protected BodyImpl body;
- String omitXmlDecl = "yes";
- String charset = "utf-8";
- String xmlDecl = null;
-
- protected EnvelopeImpl(SOAPDocumentImpl ownerDoc, Name name) {
- super(ownerDoc, name);
- }
-
- protected EnvelopeImpl(SOAPDocumentImpl ownerDoc, QName name) {
- super(ownerDoc, name);
- }
-
- protected EnvelopeImpl(
- SOAPDocumentImpl ownerDoc,
- NameImpl name,
- boolean createHeader,
- boolean createBody)
- throws SOAPException {
- this(ownerDoc, name);
-
- ensureNamespaceIsDeclared(
- getElementQName().getPrefix(), getElementQName().getNamespaceURI());
-
- // XXX
- if (createHeader)
- addHeader();
-
- if (createBody)
- addBody();
- }
-
- protected abstract NameImpl getHeaderName(String prefix);
- protected abstract NameImpl getBodyName(String prefix);
-
- public SOAPHeader addHeader() throws SOAPException {
- return addHeader(null);
- }
-
- public SOAPHeader addHeader(String prefix) throws SOAPException {
-
- if (prefix == null || prefix.equals("")) {
- prefix = getPrefix();
- }
-
- NameImpl headerName = getHeaderName(prefix);
- NameImpl bodyName = getBodyName(prefix);
-
- HeaderImpl header = null;
- SOAPElement firstChild = null;
-
- Iterator eachChild = getChildElementNodes();
- if (eachChild.hasNext()) {
- firstChild = (SOAPElement) eachChild.next();
- if (firstChild.getElementName().equals(headerName)) {
- log.severe("SAAJ0120.impl.header.already.exists");
- throw new SOAPExceptionImpl("Can't add a header when one is already present.");
- } else if (!firstChild.getElementName().equals(bodyName)) {
- log.severe("SAAJ0121.impl.invalid.first.child.of.envelope");
- throw new SOAPExceptionImpl("First child of Envelope must be either a Header or Body");
- }
- }
-
- header = (HeaderImpl) createElement(headerName);
- insertBefore(header, firstChild);
- header.ensureNamespaceIsDeclared(headerName.getPrefix(), headerName.getURI());
-
- return header;
- }
-
- protected void lookForHeader() throws SOAPException {
- NameImpl headerName = getHeaderName(null);
-
- HeaderImpl hdr = (HeaderImpl) findChild(headerName);
- header = hdr;
- }
-
- public SOAPHeader getHeader() throws SOAPException {
- lookForHeader();
- return header;
- }
-
- protected void lookForBody() throws SOAPException {
- NameImpl bodyName = getBodyName(null);
-
- BodyImpl bodyChildElement = (BodyImpl) findChild(bodyName);
- body = bodyChildElement;
- }
-
- public SOAPBody addBody() throws SOAPException {
- return addBody(null);
- }
-
- public SOAPBody addBody(String prefix) throws SOAPException {
- lookForBody();
-
- if (prefix == null || prefix.equals("")) {
- prefix = getPrefix();
- }
-
- if (body == null) {
- NameImpl bodyName = getBodyName(prefix);
- body = (BodyImpl) createElement(bodyName);
- insertBefore(body, null);
- body.ensureNamespaceIsDeclared(bodyName.getPrefix(), bodyName.getURI());
- } else {
- log.severe("SAAJ0122.impl.body.already.exists");
- throw new SOAPExceptionImpl("Can't add a body when one is already present.");
- }
-
- return body;
- }
-
- protected SOAPElement addElement(Name name) throws SOAPException {
- if (getBodyName(null).equals(name)) {
- return addBody(name.getPrefix());
- }
- if (getHeaderName(null).equals(name)) {
- return addHeader(name.getPrefix());
- }
-
- return super.addElement(name);
- }
-
- protected SOAPElement addElement(QName name) throws SOAPException {
- if (getBodyName(null).equals(NameImpl.convertToName(name))) {
- return addBody(name.getPrefix());
- }
- if (getHeaderName(null).equals(NameImpl.convertToName(name))) {
- return addHeader(name.getPrefix());
- }
-
- return super.addElement(name);
- }
-
- public SOAPBody getBody() throws SOAPException {
- lookForBody();
- return body;
- }
-
- public Source getContent() {
- return new DOMSource(getOwnerDocument());
- }
-
- public Name createName(String localName, String prefix, String uri)
- throws SOAPException {
-
- // validating parameters before passing them on
- // to make sure that the namespace specification rules are followed
-
- // reserved xmlns prefix cannot be used.
- if ("xmlns".equals(prefix)) {
- log.severe("SAAJ0123.impl.no.reserved.xmlns");
- throw new SOAPExceptionImpl("Cannot declare reserved xmlns prefix");
- }
- // Qualified name cannot be xmlns.
- if ((prefix == null) && ("xmlns".equals(localName))) {
- log.severe("SAAJ0124.impl.qualified.name.cannot.be.xmlns");
- throw new SOAPExceptionImpl("Qualified name cannot be xmlns");
- }
-
- return NameImpl.create(localName, prefix, uri);
- }
-
- public Name createName(String localName, String prefix)
- throws SOAPException {
- String namespace = getNamespaceURI(prefix);
- if (namespace == null) {
- log.log(
- Level.SEVERE,
- "SAAJ0126.impl.cannot.locate.ns",
- new String[] { prefix });
- throw new SOAPExceptionImpl(
- "Unable to locate namespace for prefix " + prefix);
- }
- return NameImpl.create(localName, prefix, namespace);
- }
-
- public Name createName(String localName) throws SOAPException {
- return NameImpl.createFromUnqualifiedName(localName);
- }
-
- public void setOmitXmlDecl(String value) {
- this.omitXmlDecl = value;
- }
-
- public void setXmlDecl(String value) {
- this.xmlDecl = value;
- }
-
- private String getOmitXmlDecl() {
- return this.omitXmlDecl;
- }
-
- public void setCharsetEncoding(String value) {
- charset = value;
- }
-
- public void output(OutputStream out) throws IOException {
- try {
- Transformer transformer =
- EfficientStreamingTransformer.newTransformer();
-
- transformer.setOutputProperty(
- OutputKeys.OMIT_XML_DECLARATION, "yes");
- /*omitXmlDecl);*/
- // no equivalent for "setExpandEmptyElements"
- transformer.setOutputProperty(
- OutputKeys.ENCODING,
- charset);
-
- if (omitXmlDecl.equals("no") && xmlDecl == null) {
- xmlDecl = "<?xml version=\"" + getOwnerDocument().getXmlVersion() + "\" encoding=\"" +
- charset + "\" ?>";
- }
-
- StreamResult result = new StreamResult(out);
- if (xmlDecl != null) {
- OutputStreamWriter writer = new OutputStreamWriter(out, charset);
- writer.write(xmlDecl);
- writer.flush();
- result = new StreamResult(writer);
- }
-
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "SAAJ0190.impl.set.xml.declaration",
- new String[] { omitXmlDecl });
- log.log(Level.FINE, "SAAJ0191.impl.set.encoding",
- new String[] { charset });
- }
-
- //StreamResult result = new StreamResult(out);
- transformer.transform(getContent(), result);
- } catch (Exception ex) {
- throw new IOException(ex.getMessage());
- }
- }
-
- /**
- * Serialize to FI if boolean parameter set.
- */
- public void output(OutputStream out, boolean isFastInfoset)
- throws IOException
- {
- if (!isFastInfoset) {
- output(out);
- }
- else {
- try {
- // Run transform and generate FI output from content
- Source source = getContent();
- Transformer transformer = EfficientStreamingTransformer.newTransformer();
- transformer.transform(getContent(),
- FastInfosetReflection.FastInfosetResult_new(out));
- }
- catch (Exception ex) {
- throw new IOException(ex.getMessage());
- }
- }
- }
-
- // public void prettyPrint(OutputStream out) throws IOException {
- // if (getDocument() == null)
- // initDocument();
- //
- // OutputFormat format = OutputFormat.createPrettyPrint();
- //
- // format.setIndentSize(2);
- // format.setNewlines(true);
- // format.setTrimText(true);
- // format.setPadText(true);
- // format.setExpandEmptyElements(false);
- //
- // XMLWriter writer = new XMLWriter(out, format);
- // writer.write(getDocument());
- // }
- //
- // public void prettyPrint(Writer out) throws IOException {
- // if (getDocument() == null)
- // initDocument();
- //
- // OutputFormat format = OutputFormat.createPrettyPrint();
- //
- // format.setIndentSize(2);
- // format.setNewlines(true);
- // format.setTrimText(true);
- // format.setPadText(true);
- // format.setExpandEmptyElements(false);
- //
- // XMLWriter writer = new XMLWriter(out, format);
- // writer.write(getDocument());
- // }
-
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- log.log(Level.SEVERE,
- "SAAJ0146.impl.invalid.name.change.requested",
- new Object[] {elementQName.getLocalPart(),
- newName.getLocalPart()});
- throw new SOAPException("Cannot change name for "
- + elementQName.getLocalPart() + " to "
- + newName.getLocalPart());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java
deleted file mode 100644
index 4e08cbbe..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPFaultElement;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public abstract class FaultElementImpl
- extends ElementImpl
- implements SOAPFaultElement {
-
- protected FaultElementImpl(SOAPDocumentImpl ownerDoc, NameImpl qname) {
- super(ownerDoc, qname);
- }
-
- protected FaultElementImpl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
-
- protected abstract boolean isStandardFaultElement();
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- log.log(Level.SEVERE,
- "SAAJ0146.impl.invalid.name.change.requested",
- new Object[] {elementQName.getLocalPart(),
- newName.getLocalPart()});
- throw new SOAPException("Cannot change name for "
- + elementQName.getLocalPart() + " to "
- + newName.getLocalPart());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java
deleted file mode 100644
index a2d6fc9a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.Locale;
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import org.w3c.dom.Element;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public abstract class FaultImpl extends ElementImpl implements SOAPFault {
-
- /* This can also represent a fault reason element */
- protected SOAPFaultElement faultStringElement;
-
- /* This can also represent a fault role element */
- protected SOAPFaultElement faultActorElement;
-
- protected SOAPFaultElement faultCodeElement;
-
- protected Detail detail;
-
- protected FaultImpl(SOAPDocumentImpl ownerDoc, NameImpl name) {
- super(ownerDoc, name);
- }
-
-
- protected abstract NameImpl getDetailName();
- protected abstract NameImpl getFaultCodeName();
- protected abstract NameImpl getFaultStringName();
- protected abstract NameImpl getFaultActorName();
- protected abstract DetailImpl createDetail();
- protected abstract FaultElementImpl createSOAPFaultElement(String localName);
- protected abstract FaultElementImpl createSOAPFaultElement(QName qname);
- protected abstract FaultElementImpl createSOAPFaultElement(Name qname);
- protected abstract void checkIfStandardFaultCode(String faultCode, String uri) throws SOAPException;
- protected abstract void finallySetFaultCode(String faultcode) throws SOAPException;
- protected abstract boolean isStandardFaultElement(String localName);
- protected abstract QName getDefaultFaultCode();
-
-
- protected void findFaultCodeElement() {
- this.faultCodeElement =
- (SOAPFaultElement) findChild(getFaultCodeName());
- }
-
- protected void findFaultActorElement() {
- this.faultActorElement =
- (SOAPFaultElement) findChild(getFaultActorName());
- }
-
- protected void findFaultStringElement() {
- this.faultStringElement =
- (SOAPFaultElement) findChild(getFaultStringName());
- }
-
- public void setFaultCode(String faultCode) throws SOAPException {
- setFaultCode(
- NameImpl.getLocalNameFromTagName(faultCode),
- NameImpl.getPrefixFromTagName(faultCode),
- null);
- }
-
- public void setFaultCode(String faultCode, String prefix, String uri)
- throws SOAPException {
-
- if (prefix == null || "".equals(prefix)) {
- if (uri != null && !"".equals(uri)) {
- prefix = getNamespacePrefix(uri);
- if (prefix == null || "".equals(prefix)) {
- prefix = "ns0";
- }
- }
- }
- if (this.faultCodeElement == null)
- findFaultCodeElement();
-
- if (this.faultCodeElement == null)
- this.faultCodeElement = addFaultCodeElement();
- else
- this.faultCodeElement.removeContents();
-
- if (uri == null || "".equals(uri)) {
- uri = this.faultCodeElement.getNamespaceURI(prefix);
- }
- if (uri == null || "".equals(uri)) {
- if (prefix != null && !"".equals(prefix)) {
- //cannot allow an empty URI for a non-Empty prefix
- log.log(Level.SEVERE, "SAAJ0140.impl.no.ns.URI", new Object[]{prefix + ":" + faultCode});
- throw new SOAPExceptionImpl("Empty/Null NamespaceURI specified for faultCode \"" + prefix + ":" + faultCode + "\"");
- } else {
- uri = "";
- }
- }
- checkIfStandardFaultCode(faultCode, uri);
- ((FaultElementImpl) this.faultCodeElement).ensureNamespaceIsDeclared(prefix, uri);
-
- if (prefix == null || "".equals(prefix)) {
- finallySetFaultCode(faultCode);
- } else {
- finallySetFaultCode(prefix + ":" + faultCode);
- }
- }
-
- public void setFaultCode(Name faultCodeQName) throws SOAPException {
- setFaultCode(
- faultCodeQName.getLocalName(),
- faultCodeQName.getPrefix(),
- faultCodeQName.getURI());
- }
-
- public void setFaultCode(QName faultCodeQName) throws SOAPException {
- setFaultCode(
- faultCodeQName.getLocalPart(),
- faultCodeQName.getPrefix(),
- faultCodeQName.getNamespaceURI());
- }
-
- protected static QName convertCodeToQName(
- String code,
- SOAPElement codeContainingElement) {
-
- int prefixIndex = code.indexOf(':');
- if (prefixIndex == -1) {
- return new QName(code);
- }
-
- String prefix = code.substring(0, prefixIndex);
- String nsName =((ElementImpl) codeContainingElement).lookupNamespaceURI(prefix);
- //((ElementImpl) codeContainingElement).getNamespaceURI(prefix);
- return new QName(nsName, getLocalPart(code), prefix);
- }
-
- protected void initializeDetail() {
- NameImpl detailName = getDetailName();
- detail = (Detail) findChild(detailName);
- }
-
- public Detail getDetail() {
- if (detail == null)
- initializeDetail();
- if ((detail != null) && (detail.getParentNode() == null)) {
- // a detach node was called on it
- detail = null;
- }
- return detail;
- }
-
- public Detail addDetail() throws SOAPException {
- if (detail == null)
- initializeDetail();
- if (detail == null) {
- detail = createDetail();
- addNode(detail);
- return detail;
- } else {
- // Log
- throw new SOAPExceptionImpl("Error: Detail already exists");
- }
- }
-
- public boolean hasDetail() {
- return (getDetail() != null);
- }
-
- public abstract void setFaultActor(String faultActor) throws SOAPException;
-
- public String getFaultActor() {
- if (this.faultActorElement == null)
- findFaultActorElement();
- if (this.faultActorElement != null) {
- return this.faultActorElement.getValue();
- }
- return null;
- }
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
-
- log.log(
- Level.SEVERE,
- "SAAJ0146.impl.invalid.name.change.requested",
- new Object[] {elementQName.getLocalPart(), newName.getLocalPart()});
- throw new SOAPException(
- "Cannot change name for " + elementQName.getLocalPart() + " to " + newName.getLocalPart());
- }
-
- protected SOAPElement convertToSoapElement(Element element) {
- if (element instanceof SOAPFaultElement) {
- return (SOAPElement) element;
- } else if (element instanceof SOAPElement) {
- SOAPElement soapElement = (SOAPElement) element;
- if (getDetailName().equals(soapElement.getElementName())) {
- return replaceElementWithSOAPElement(element, createDetail());
- } else {
- String localName =
- soapElement.getElementName().getLocalName();
- if (isStandardFaultElement(localName))
- return replaceElementWithSOAPElement(
- element,
- createSOAPFaultElement(soapElement.getElementQName()));
- return soapElement;
- }
- } else {
- Name elementName = NameImpl.copyElementName(element);
- ElementImpl newElement;
- if (getDetailName().equals(elementName)) {
- newElement = (ElementImpl) createDetail();
- } else {
- String localName = elementName.getLocalName();
- if (isStandardFaultElement(localName))
- newElement =
- (ElementImpl) createSOAPFaultElement(elementName);
- else
- newElement = (ElementImpl) createElement(elementName);
- }
- return replaceElementWithSOAPElement(element, newElement);
- }
- }
-
- protected SOAPFaultElement addFaultCodeElement() throws SOAPException {
- if (this.faultCodeElement == null)
- findFaultCodeElement();
- if (this.faultCodeElement == null) {
- this.faultCodeElement =
- addSOAPFaultElement(getFaultCodeName().getLocalName());
- return this.faultCodeElement;
- } else {
- throw new SOAPExceptionImpl("Error: Faultcode already exists");
- }
- }
-
- private SOAPFaultElement addFaultStringElement() throws SOAPException {
- if (this.faultStringElement == null)
- findFaultStringElement();
- if (this.faultStringElement == null) {
- this.faultStringElement =
- addSOAPFaultElement(getFaultStringName().getLocalName());
- return this.faultStringElement;
- } else {
- // Log
- throw new SOAPExceptionImpl("Error: Faultstring already exists");
- }
- }
-
- private SOAPFaultElement addFaultActorElement() throws SOAPException {
- if (this.faultActorElement == null)
- findFaultActorElement();
- if (this.faultActorElement == null) {
- this.faultActorElement =
- addSOAPFaultElement(getFaultActorName().getLocalName());
- return this.faultActorElement;
- } else {
- // Log
- throw new SOAPExceptionImpl("Error: Faultactor already exists");
- }
- }
-
- protected SOAPElement addElement(Name name) throws SOAPException {
- if (getDetailName().equals(name)) {
- return addDetail();
- } else if(getFaultCodeName().equals(name)) {
- return addFaultCodeElement();
- } else if(getFaultStringName().equals(name)) {
- return addFaultStringElement();
- } else if(getFaultActorName().equals(name)) {
- return addFaultActorElement();
- }
- return super.addElement(name);
- }
-
- protected SOAPElement addElement(QName name) throws SOAPException {
- return addElement(NameImpl.convertToName(name));
- }
-
- protected FaultElementImpl addSOAPFaultElement(String localName)
- throws SOAPException {
-
- FaultElementImpl faultElem = createSOAPFaultElement(localName);
- addNode(faultElem);
- return faultElem;
- }
-
- /**
- * Convert an xml:lang attribute value into a Locale object
- */
- protected static Locale xmlLangToLocale(String xmlLang) {
- if (xmlLang == null) {
- return null;
- }
-
- // Spec uses hyphen as separator
- int index = xmlLang.indexOf("-");
-
- // Accept underscore as separator as well
- if (index == -1) {
- index = xmlLang.indexOf("_");
- }
-
- if (index == -1) {
- // No separator so assume only a language component
- return new Locale(xmlLang, "");
- }
-
- String language = xmlLang.substring(0, index);
- String country = xmlLang.substring(index + 1);
- return new Locale(language, country);
- }
-
- protected static String localeToXmlLang(Locale locale) {
- String xmlLang = locale.getLanguage();
- String country = locale.getCountry();
- if (!"".equals(country)) {
- xmlLang += "-" + country;
- }
- return xmlLang;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java
deleted file mode 100644
index 2bf349f9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public abstract class HeaderElementImpl
- extends ElementImpl
- implements SOAPHeaderElement {
-
- protected static Name RELAY_ATTRIBUTE_LOCAL_NAME =
- NameImpl.createFromTagName("relay");
- protected static Name MUST_UNDERSTAND_ATTRIBUTE_LOCAL_NAME =
- NameImpl.createFromTagName("mustUnderstand");
-
- public HeaderElementImpl(SOAPDocumentImpl ownerDoc, Name qname) {
- super(ownerDoc, qname);
- }
- public HeaderElementImpl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
-
- protected abstract NameImpl getActorAttributeName();
- protected abstract NameImpl getRoleAttributeName();
- protected abstract NameImpl getMustunderstandAttributeName();
- protected abstract boolean getMustunderstandAttributeValue(String str);
- protected abstract String getMustunderstandLiteralValue(boolean mu);
- protected abstract NameImpl getRelayAttributeName();
- protected abstract boolean getRelayAttributeValue(String str);
- protected abstract String getRelayLiteralValue(boolean mu);
- protected abstract String getActorOrRole();
-
-
- public void setParentElement(SOAPElement element) throws SOAPException {
- if (!(element instanceof SOAPHeader)) {
- log.severe("SAAJ0130.impl.header.elem.parent.mustbe.header");
- throw new SOAPException("Parent of a SOAPHeaderElement has to be a SOAPHeader");
- }
-
- super.setParentElement(element);
- }
-
- public void setActor(String actorUri) {
- try {
- removeAttribute(getActorAttributeName());
- addAttribute((Name) getActorAttributeName(), actorUri);
- } catch (SOAPException ex) {
- }
- }
-
- //SOAP 1.2 supports Role
- public void setRole(String roleUri) throws SOAPException {
- // runtime exception thrown if called for SOAP 1.1
- removeAttribute(getRoleAttributeName());
- addAttribute((Name) getRoleAttributeName(), roleUri);
- }
-
-
- Name actorAttNameWithoutNS = NameImpl.createFromTagName("actor");
-
- public String getActor() {
- String actor = getAttributeValue(getActorAttributeName());
- return actor;
- }
-
- Name roleAttNameWithoutNS = NameImpl.createFromTagName("role");
-
- public String getRole() {
- // runtime exception thrown for 1.1
- String role = getAttributeValue(getRoleAttributeName());
- return role;
- }
-
- public void setMustUnderstand(boolean mustUnderstand) {
- try {
- removeAttribute(getMustunderstandAttributeName());
- addAttribute(
- (Name) getMustunderstandAttributeName(),
- getMustunderstandLiteralValue(mustUnderstand));
- } catch (SOAPException ex) {
- }
- }
-
- public boolean getMustUnderstand() {
- String mu = getAttributeValue(getMustunderstandAttributeName());
-
- if (mu != null)
- return getMustunderstandAttributeValue(mu);
-
- return false;
- }
-
- public void setRelay(boolean relay) throws SOAPException {
- // runtime exception thrown for 1.1
- removeAttribute(getRelayAttributeName());
- addAttribute(
- (Name) getRelayAttributeName(),
- getRelayLiteralValue(relay));
- }
-
- public boolean getRelay() {
- String mu = getAttributeValue(getRelayAttributeName());
- if (mu != null)
- return getRelayAttributeValue(mu);
-
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java
deleted file mode 100644
index d78776f8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.*;
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import org.w3c.dom.Element;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public abstract class HeaderImpl extends ElementImpl implements SOAPHeader {
- protected static final boolean MUST_UNDERSTAND_ONLY = false;
-
- protected HeaderImpl(SOAPDocumentImpl ownerDoc, NameImpl name) {
- super(ownerDoc, name);
- }
-
- protected abstract SOAPHeaderElement createHeaderElement(Name name)
- throws SOAPException;
- protected abstract SOAPHeaderElement createHeaderElement(QName name)
- throws SOAPException;
- protected abstract NameImpl getNotUnderstoodName();
- protected abstract NameImpl getUpgradeName();
- protected abstract NameImpl getSupportedEnvelopeName();
-
- public SOAPHeaderElement addHeaderElement(Name name) throws SOAPException {
- SOAPElement newHeaderElement =
- ElementFactory.createNamedElement(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name.getLocalName(),
- name.getPrefix(),
- name.getURI());
- if (newHeaderElement == null
- || !(newHeaderElement instanceof SOAPHeaderElement)) {
- newHeaderElement = createHeaderElement(name);
- }
-
- // header elements must be namespace qualified
- // check that URI is not empty, ensuring that the element is NS qualified.
- String uri = newHeaderElement.getElementQName().getNamespaceURI();
- if ((uri == null) || ("").equals(uri)) {
- log.severe("SAAJ0131.impl.header.elems.ns.qualified");
- throw new SOAPExceptionImpl("HeaderElements must be namespace qualified");
- }
- addNode(newHeaderElement);
- return (SOAPHeaderElement) newHeaderElement;
- }
-
- public SOAPHeaderElement addHeaderElement(QName name) throws SOAPException {
- SOAPElement newHeaderElement =
- ElementFactory.createNamedElement(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name.getLocalPart(),
- name.getPrefix(),
- name.getNamespaceURI());
- if (newHeaderElement == null
- || !(newHeaderElement instanceof SOAPHeaderElement)) {
- newHeaderElement = createHeaderElement(name);
- }
-
- // header elements must be namespace qualified
- // check that URI is not empty, ensuring that the element is NS qualified.
- String uri = newHeaderElement.getElementQName().getNamespaceURI();
- if ((uri == null) || ("").equals(uri)) {
- log.severe("SAAJ0131.impl.header.elems.ns.qualified");
- throw new SOAPExceptionImpl("HeaderElements must be namespace qualified");
- }
- addNode(newHeaderElement);
- return (SOAPHeaderElement) newHeaderElement;
- }
-
- protected SOAPElement addElement(Name name) throws SOAPException {
- return addHeaderElement(name);
- }
-
- protected SOAPElement addElement(QName name) throws SOAPException {
- return addHeaderElement(name);
- }
-
- public Iterator examineHeaderElements(String actor) {
- return getHeaderElementsForActor(actor, false, false);
- }
-
- public Iterator extractHeaderElements(String actor) {
- return getHeaderElementsForActor(actor, true, false);
- }
-
- protected Iterator getHeaderElementsForActor(
- String actor,
- boolean detach,
- boolean mustUnderstand) {
- if (actor == null || actor.equals("")) {
- log.severe("SAAJ0132.impl.invalid.value.for.actor.or.role");
- throw new IllegalArgumentException("Invalid value for actor or role");
- }
- return getHeaderElements(actor, detach, mustUnderstand);
- }
-
- protected Iterator getHeaderElements(
- String actor,
- boolean detach,
- boolean mustUnderstand) {
- List elementList = new ArrayList();
-
- Iterator eachChild = getChildElements();
-
- Object currentChild = iterate(eachChild);
- while (currentChild != null) {
- if (!(currentChild instanceof SOAPHeaderElement)) {
- currentChild = iterate(eachChild);
- } else {
- HeaderElementImpl currentElement =
- (HeaderElementImpl) currentChild;
- currentChild = iterate(eachChild);
-
- boolean isMustUnderstandMatching =
- (!mustUnderstand || currentElement.getMustUnderstand());
- boolean doAdd = false;
- if (actor == null && isMustUnderstandMatching) {
- doAdd = true;
- } else {
- String currentActor = currentElement.getActorOrRole();
- if (currentActor == null) {
- currentActor = "";
- }
-
- if (currentActor.equalsIgnoreCase(actor)
- && isMustUnderstandMatching) {
- doAdd = true;
- }
- }
-
- if (doAdd) {
- elementList.add(currentElement);
- if (detach) {
- currentElement.detachNode();
- }
- }
- }
- }
-
- return elementList.listIterator();
- }
-
- private Object iterate(Iterator each) {
- return each.hasNext() ? each.next() : null;
- }
-
- public void setParentElement(SOAPElement element) throws SOAPException {
- if (!(element instanceof SOAPEnvelope)) {
- log.severe("SAAJ0133.impl.header.parent.mustbe.envelope");
- throw new SOAPException("Parent of SOAPHeader has to be a SOAPEnvelope");
- }
- super.setParentElement(element);
- }
-
- // overriding ElementImpl's method to ensure that HeaderElements are
- // namespace qualified. Holds for both SOAP versions.
- // TODO - This check needs to be made for other addChildElement() methods
- // as well.
- public SOAPElement addChildElement(String localName) throws SOAPException {
-
- SOAPElement element = super.addChildElement(localName);
- // check that URI is not empty, ensuring that the element is NS qualified.
- String uri = element.getElementName().getURI();
- if ((uri == null) || ("").equals(uri)) {
- log.severe("SAAJ0134.impl.header.elems.ns.qualified");
- throw new SOAPExceptionImpl("HeaderElements must be namespace qualified");
- }
- return element;
- }
-
- public Iterator examineAllHeaderElements() {
- return getHeaderElements(null, false, MUST_UNDERSTAND_ONLY);
- }
-
- public Iterator examineMustUnderstandHeaderElements(String actor) {
- return getHeaderElements(actor, false, true);
-
- }
-
- public Iterator extractAllHeaderElements() {
- return getHeaderElements(null, true, false);
- }
-
- public SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSoapUris)
- throws SOAPException {
- if (supportedSoapUris == null) {
- log.severe("SAAJ0411.ver1_2.no.null.supportedURIs");
- throw new SOAPException("Argument cannot be null; iterator of supportedURIs cannot be null");
- }
- if (!supportedSoapUris.hasNext()) {
- log.severe("SAAJ0412.ver1_2.no.empty.list.of.supportedURIs");
- throw new SOAPException("List of supported URIs cannot be empty");
- }
- Name upgradeName = getUpgradeName();
- SOAPHeaderElement upgradeHeaderElement =
- (SOAPHeaderElement) addChildElement(upgradeName);
- Name supportedEnvelopeName = getSupportedEnvelopeName();
- int i = 0;
- while (supportedSoapUris.hasNext()) {
- SOAPElement subElement =
- upgradeHeaderElement.addChildElement(supportedEnvelopeName);
- String ns = "ns" + Integer.toString(i);
- subElement.addAttribute(
- NameImpl.createFromUnqualifiedName("qname"),
- ns + ":Envelope");
- subElement.addNamespaceDeclaration(
- ns,
- (String) supportedSoapUris.next());
- i ++;
- }
- return upgradeHeaderElement;
- }
-
- public SOAPHeaderElement addUpgradeHeaderElement(String supportedSoapUri)
- throws SOAPException {
- return addUpgradeHeaderElement(new String[] {supportedSoapUri});
- }
-
- public SOAPHeaderElement addUpgradeHeaderElement(String[] supportedSoapUris)
- throws SOAPException {
-
- if (supportedSoapUris == null) {
- log.severe("SAAJ0411.ver1_2.no.null.supportedURIs");
- throw new SOAPException("Argument cannot be null; array of supportedURIs cannot be null");
- }
- if (supportedSoapUris.length == 0) {
- log.severe("SAAJ0412.ver1_2.no.empty.list.of.supportedURIs");
- throw new SOAPException("List of supported URIs cannot be empty");
- }
- Name upgradeName = getUpgradeName();
- SOAPHeaderElement upgradeHeaderElement =
- (SOAPHeaderElement) addChildElement(upgradeName);
- Name supportedEnvelopeName = getSupportedEnvelopeName();
- for (int i = 0; i < supportedSoapUris.length; i ++) {
- SOAPElement subElement =
- upgradeHeaderElement.addChildElement(supportedEnvelopeName);
- String ns = "ns" + Integer.toString(i);
- subElement.addAttribute(
- NameImpl.createFromUnqualifiedName("qname"),
- ns + ":Envelope");
- subElement.addNamespaceDeclaration(ns, supportedSoapUris[i]);
- }
- return upgradeHeaderElement;
- }
-
- protected SOAPElement convertToSoapElement(Element element) {
- if (element instanceof SOAPHeaderElement) {
- return (SOAPElement) element;
- } else {
- SOAPHeaderElement headerElement;
- try {
- headerElement =
- createHeaderElement(NameImpl.copyElementName(element));
- } catch (SOAPException e) {
- throw new ClassCastException("Could not convert Element to SOAPHeaderElement: " + e.getMessage());
- }
- return replaceElementWithSOAPElement(
- element,
- (ElementImpl) headerElement);
- }
- }
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- log.log(Level.SEVERE,
- "SAAJ0146.impl.invalid.name.change.requested",
- new Object[] {elementQName.getLocalPart(),
- newName.getLocalPart()});
- throw new SOAPException("Cannot change name for "
- + elementQName.getLocalPart() + " to "
- + newName.getLocalPart());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties
deleted file mode 100644
index c2e68c96..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: Parent of a SOAPBodyElement has to be a SOAPBody
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: Unable to locate namespace for prefix {0}
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: Cannot add fragments which contain elements which are in the SOAP namespace
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: Encoding style {0} should be a valid URI
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: Cannot pass NULL to setParentElement
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: Cannot setValue on an Element that does not have an only child of type Text
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: Error: Fault already exists
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: Parent of SOAPBody has to be a SOAPEnvelope
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: Cannot pass NULL to setParentElement
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: Cannot split text from a Comment Node
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: Cannot replace whole text from a Comment Node
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: Can't add a header when one is already present
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: First child of Envelope must be either a Header or Body
-SAAJ0122.impl.body.already.exists=SAAJ0122: Can't add a body when one is already present
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: Cannot declare reserved xmlns prefix
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: Qualified name cannot be xmlns
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: Unable to locate namespace for prefix {0}
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: Cannot pass NULL to setParentElement
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: Parent of a SOAPHeaderElement has to be a SOAPHeader
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements must be namespace qualified
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: Invalid value for actor or role
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: Parent of SOAPHeader has to be a SOAPEnvelope
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements must be namespace qualified
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: Empty/Null NamespaceURI specified for faultCode {0}
-SAAJ0141.impl.detail.exists=SAAJ0141: Detail already exists
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: Fault/Reason/Text not supported by this SOAP version, try SOAP 1.2 or later
-SAAJ0143.impl.node.not.supported=SAAJ0143: Fault/Node not supported by this SOAP version, try SOAP 1.2 or later
-SAAJ0144.impl.role.not.supported=SAAJ0144: Fault/Role not supported by this SOAP version, try SOAP 1.2 or later
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: Cannot pass NULL to setParentElement
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: Cannot change name of element {0} to {1}
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: Cannot change the URI for prefix {0} from {1} to {2} in setElementQName
-SAAJ0148.impl.invalid.prefix.for.uri=Non-empty namespace URI: {0} for an empty prefix in SetElementQName
-SAAJ0149.impl.null.prefix=SAAJ0149: prefix cannot be "null" when creating a QName
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: Cannot extract Document from body
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: Unable to extract Document from body
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: Added attribute {0}
-SAAJ0151.impl.no.children=SAAJ0151: Cannot find node containing value: there are no children
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: Cannot find node containing value: first child is not a Text node
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: Cannot find node containing value: There is more than one child node
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: A SOAPFault element can only be added as a child of SOAPBody
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: A Detail element can only be added as a child of a SOAPFault
-SAAJ0156.impl.adding.fault.error=SAAJ0156: Cannot add SOAPFault, a SOAPFault should be the only child of a SOAPBody
-SAAJ0157.impl.detail.exists.error=SAAJ0157: Cannot add Detail, Detail already exists
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: SOAP Version mismatch encountered when trying to add SOAPFault to SOAPBody
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: SOAP Version mismatch encountered when trying to add Detail to SOAPFault
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: Omit XML declaration set to {0}
-SAAJ0191.impl.set.encoding=SAAJ0191: Encoding is set to {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties
deleted file mode 100644
index 87a81c4e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: \u00DCbergeordnetes Element von SOAPBodyElement muss ein SOAPBody sein
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: Namespace f\u00FCr Pr\u00E4fix {0} kann nicht gefunden werden
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: Es k\u00F6nnen keine Fragmente hinzugef\u00FCgt werden, die Elemente enthalten, die im SOAP-Namespace enthalten sind
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: Codierungsstil {0} muss ein g\u00FCltiger URI sein
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: NULL kann nicht an setParentElement \u00FCbergeben werden
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: setValue ist bei einem Element nicht m\u00F6glich, das nicht ein einziges untergeordnetes Element vom Typ Text hat
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: Fehler: Fault ist bereits vorhanden
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: \u00DCbergeordnetes Element von SOAPBody muss SOAPEnvelope sein
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: NULL kann nicht an setParentElement \u00FCbergeben werden
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: Text aus einem Kommentarknoten kann nicht geteilt werden
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: Gesamter Text aus einem Kommentarknoten kann nicht ersetzt werden
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: Es kann kein Header hinzugef\u00FCgt werden, wenn bereits ein Header vorhanden ist
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Erstes untergeordnetes Element von Envelope muss "Header" oder "Body" sein
-SAAJ0122.impl.body.already.exists=SAAJ0122: Es kann kein Nachrichtentext hinzugef\u00FCgt werden, wenn bereits ein Nachrichtentext vorhanden ist
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: Reserviertes xmlns-Pr\u00E4fix kann nicht deklariert werden
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: Vollst\u00E4ndiger Name darf nicht xmlns sein
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: Namespace f\u00FCr Pr\u00E4fix {0} kann nicht gefunden werden
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: NULL kann nicht an setParentElement \u00FCbergeben werden
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: \u00DCbergeordnetes Element von SOAPHeaderElement muss ein SOAPHeader sein
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements muss mit Namespace angegeben werden
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: Ung\u00FCltiger Wert f\u00FCr Actor oder Rolle
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: \u00DCbergeordnetes Element von SOAPHeader muss SOAPEnvelope sein
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements muss mit Namespace angegeben werden
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: Leerer/Null-NamespaceURI f\u00FCr faultCode {0} angegeben
-SAAJ0141.impl.detail.exists=SAAJ0141: Detail ist bereits vorhanden
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: Fault/Ursache/Text wird von dieser SOAP-Version nicht unterst\u00FCtzt, versuchen Sie SOAP 1.2 oder h\u00F6her
-SAAJ0143.impl.node.not.supported=SAAJ0143: Fault/Knoten wird von dieser SOAP-Version nicht unterst\u00FCtzt, versuchen Sie SOAP 1.2 oder h\u00F6her
-SAAJ0144.impl.role.not.supported=SAAJ0144: Fault/Rolle wird von dieser SOAP-Version nicht unterst\u00FCtzt, versuchen Sie SOAP 1.2 oder h\u00F6her
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: NULL kann nicht an setParentElement \u00FCbergeben werden
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: Name des Elements {0} kann nicht in {1} ge\u00E4ndert werden
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: Der URI f\u00FCr Pr\u00E4fix {0} kann nicht von {1} in {2} in setElementQName ge\u00E4ndert werden
-SAAJ0148.impl.invalid.prefix.for.uri=Nicht-leerer Namespace-URI: {0} f\u00FCr ein leeres Pr\u00E4fix in SetElementQName
-SAAJ0149.impl.null.prefix=SAAJ0149: Pr\u00E4fix darf bei der Erstellung eines QName nicht "null" sein
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: Dokument kann nicht aus Nachrichtentext extrahiert werden
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: Dokument kann nicht aus Nachrichtentext extrahiert werden
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: Attribut {0} hinzugef\u00FCgt
-SAAJ0151.impl.no.children=SAAJ0151: Knoten, der Wert enth\u00E4lt, kann nicht gefunden werden: es sind keine untergeordneten Elemente vorhanden
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: Knoten, der Wert enth\u00E4lt, kann nicht gefunden werden: erstes untergeordnetes Element ist kein Textknoten
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: Knoten, der Wert enth\u00E4lt, kann nicht gefunden werden: Es ist mehr als ein untergeordneter Knoten vorhanden
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: Ein SOAPFault-Element kann nur als untergeordnetes Element von SOAPBody hinzugef\u00FCgt werden
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Ein "Detail"-Element kann nur als untergeordnetes Element von SOAPFault hinzugef\u00FCgt werden
-SAAJ0156.impl.adding.fault.error=SAAJ0156: SOAPFault kann nicht hinzugef\u00FCgt werden, SOAPFault muss das einzige untergeordnete Element von SOAPBody sein
-SAAJ0157.impl.detail.exists.error=SAAJ0157: Detail kann nicht hinzugef\u00FCgt werden, Detail ist bereits vorhanden
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: Nicht \u00FCbereinstimmende SOAP-Version beim Versuch aufgetreten, SOAPFault zu SOAPBody hinzuzuf\u00FCgen
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: Nicht \u00FCbereinstimmende SOAP-Version beim Versuch aufgetreten, Detail zu SOAPBody hinzuzuf\u00FCgen
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: Deklaration "Omit XML" auf {0} gesetzt
-SAAJ0191.impl.set.encoding=SAAJ0191: Codierung ist auf {0} gesetzt
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties
deleted file mode 100644
index ed0432c0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: el principal de un SOAPBodyElement tiene que ser un SOAPBody
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: no se ha encontrado el espacio de nombres para el prefijo {0}
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: no se pueden agregar fragmentos que contengan elementos que se encuentren en el espacio de nombres de SOAP
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: el estilo de codificaci\u00F3n {0} debe ser un URI v\u00E1lido
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: no se puede transferir NULL a setParentElement
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: no se puede definir un valor en un elemento que no tenga un \u00FAnico secundario de tipo Text
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: Error: ya existe el fallo
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: el principal de SOAPBody tiene que ser SOAPEnvelope
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: no se puede transferir NULL a setParentElement
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: no se puede dividir el texto de un nodo de comentarios
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: no se puede sustituir el texto completo de un nodo de comentarios
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: no se puede agregar una cabecera si ya hay una
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: el primer secundario de Envelope debe ser Header o Body
-SAAJ0122.impl.body.already.exists=SAAJ0120: no se puede agregar un cuerpo si ya hay uno
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: no se puede declarar el prefijo xmlns reservado
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: el nombre cualificado no puede ser xmlns
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: no se ha encontrado el espacio de nombres para el prefijo {0}
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: no se puede transferir NULL a setParentElement
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: el principal de SOAPHeaderElement tiene que ser SOAPHeader
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements debe estar cualificado por espacio de nombres
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: valor no v\u00E1lido para actor o rol
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: el principal de SOAPHeader tiene que ser SOAPEnvelope
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements debe estar cualificado por espacio de nombres
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: se ha especificado un URI de espacio de nombres vac\u00EDo o nulo para el c\u00F3digo de fallo {0}
-SAAJ0141.impl.detail.exists=SAAJ0141: ya existe el detalle
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: el fallo/motivo/texto no est\u00E1 soportado en esta versi\u00F3n de SOAP. Pruebe SOAP 1.2 o posterior
-SAAJ0143.impl.node.not.supported=SAAJ0143: El fallo/nodo no est\u00E1 soportado en esta versi\u00F3n de SOAP. Pruebe SOAP 1.2 o posterior
-SAAJ0144.impl.role.not.supported=SAAJ0143: el fallo/rol no est\u00E1 soportado en esta versi\u00F3n de SOAP. Pruebe SOAP 1.2 o posterior
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: no se puede transferir NULL a setParentElement
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: no se puede cambiar el nombre del elemento {0} por {1}
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: no se puede cambiar el URI del prefijo {0} de {1} a {2} en setElementQName
-SAAJ0148.impl.invalid.prefix.for.uri=URI de espacio de nombres no vac\u00EDo: {0} para un prefijo vac\u00EDo en SetElementQName
-SAAJ0149.impl.null.prefix=SAAJ0149: el prefijo no puede ser "null" al crear un QName
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: no se puede extraer el documento del cuerpo
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: no se ha podido extraer el documento del cuerpo
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: se ha agregado el atributo {0}
-SAAJ0151.impl.no.children=SAAJ0151: no se ha encontrado el nodo que contiene el valor: no hay secundarios
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: no se ha encontrado el nodo que contiene el valor: el primer secundario no es un nodo de texto
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: no se ha encontrado el nodo que contiene el valor: hay m\u00E1s de un nodo secundario
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: un elemento SOAPFault s\u00F3lo se puede agregar como secundario de SOAPBody
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: un elemento Detail s\u00F3lo se puede agregar como secundario de SOAPFault
-SAAJ0156.impl.adding.fault.error=SAAJ0156: no se puede agregar SOAPFault; SOAPFault debe ser el \u00FAnico secundario de SOAPBody
-SAAJ0157.impl.detail.exists.error=SAAJ0157: no se puede agregar el detalle. El detalle ya existe
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: se ha encontrado un error de coincidencia de la versi\u00F3n de SOAP al intentar agregar SOAPFault a SOAPBody
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: se ha encontrado un error de coincidencia de la versi\u00F3n de SOAP al intentar agregar Detail a SOAPFault
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: omita la declaraci\u00F3n XML definida en {0}
-SAAJ0191.impl.set.encoding=SAAJ0191: la codificaci\u00F3n se ha definido en {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties
deleted file mode 100644
index 32569fd0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101 : le parent d'un \u00E9l\u00E9ment SOAPBodyElement doit \u00EAtre un \u00E9l\u00E9ment SOAPBody
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102 : impossible de localiser l''espace de noms pour le pr\u00E9fixe {0}
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103 : impossible d'ajouter les fragments qui contiennent les \u00E9l\u00E9ments figurant dans l'espace de noms SOAP
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105 : le style d''encodage {0} doit \u00EAtre un URI valide
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106 : impossible de transmettre la valeur NULL \u00E0 setParentElement
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107 : impossible de d\u00E9finir la valeur sur un \u00E9l\u00E9ment qui ne comporte aucun enfant unique de type Text
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110 : erreur : l'erreur existe d\u00E9j\u00E0
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111 : le parent de SOAPBody doit \u00EAtre un \u00E9l\u00E9ment SOAPEnvelope
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112 : impossible de transmettre la valeur NULL \u00E0 setParentElement
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113 : impossible de s\u00E9parer le texte d'un noeud de commentaire
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114 : impossible de remplacer l'ensemble du texte \u00E0 partir d'un noeud de commentaire
-
-SAAJ0120.impl.header.already.exists=SAAJ0120 : impossible d'ajouter un en-t\u00EAte lorsqu'il en existe d\u00E9j\u00E0 un
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121 : le premier enfant de Envelope doit \u00EAtre un \u00E9l\u00E9ment Header ou Body
-SAAJ0122.impl.body.already.exists=SAAJ0122 : impossible d'ajouter un corps lorsqu'il en existe d\u00E9j\u00E0 un
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123 : impossible de d\u00E9clarer le pr\u00E9fixe xmlns r\u00E9serv\u00E9
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124 : le nom qualifi\u00E9 ne peut pas \u00EAtre xmlns
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126 : impossible de localiser l''espace de noms pour le pr\u00E9fixe {0}
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127 : impossible de transmettre la valeur NULL \u00E0 setParentElement
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130 : le parent d'un \u00E9l\u00E9ment SOAPHeaderElement doit \u00EAtre un \u00E9l\u00E9ment SOAPHeader
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131 : les \u00E9l\u00E9ments Header doivent \u00EAtre des espaces de noms qualifi\u00E9s
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132 : valeur non valide pour l'acteur ou le r\u00F4le
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133 : le parent de SOAPHeader doit \u00EAtre un \u00E9l\u00E9ment SOAPEnvelope
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134 : les \u00E9l\u00E9ments Header doivent \u00EAtre des espaces de noms qualifi\u00E9s
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140 : NamespaceURI vide/NULL indiqu\u00E9 pour faultCode {0}
-SAAJ0141.impl.detail.exists=SAAJ0141 : l'\u00E9l\u00E9ment Detail existe d\u00E9j\u00E0
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142 : \u00E9l\u00E9ments Fault/Reason/Text non pris en charge par cette version SOAP, essayez SOAP 1.2 ou sup\u00E9rieur
-SAAJ0143.impl.node.not.supported=SAAJ0142 : \u00E9l\u00E9ments Fault/Node non pris en charge par cette version SOAP, essayez SOAP 1.2 ou sup\u00E9rieur
-SAAJ0144.impl.role.not.supported=SAAJ0142 : \u00E9l\u00E9ments Fault/Role non pris en charge par cette version SOAP, essayez SOAP 1.2 ou sup\u00E9rieur
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145 : impossible de transmettre la valeur NULL \u00E0 setParentElement
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146 : impossible de modifier le nom de l''\u00E9l\u00E9ment {0} en {1}
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147 : impossible de modifier l''URI pour le pr\u00E9fixe {0} de {1} en {2} dans setElementQName
-SAAJ0148.impl.invalid.prefix.for.uri=URI d''espace de noms non vide : {0} pour un pr\u00E9fixe vide dans SetElementQName
-SAAJ0149.impl.null.prefix=SAAJ0149 : le pr\u00E9fixe ne peut pas \u00EAtre "NULL" lors de la cr\u00E9ation d'un QName
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250 : impossible d'extraire le document du corps
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251 : impossible d'extraire le document du corps
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150 : attribut {0} ajout\u00E9
-SAAJ0151.impl.no.children=SAAJ0151 : noeud contenant la valeur introuvable : il n'existe aucun enfant
-SAAJ0152.impl.first.child.not.text.node=SAAJ0151 : noeud contenant la valeur introuvable : le premier enfant n'est pas un noeud Text
-SAAJ0153.impl.multiple.children.same.value=SAAJ0151 : noeud contenant la valeur introuvable : il existe plusieurs noeuds enfant
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154 : un \u00E9l\u00E9ment SOAPFault peut \u00EAtre ajout\u00E9 uniquement en tant qu'enfant de SOAPBody
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155 : un \u00E9l\u00E9ment Detail peut \u00EAtre ajout\u00E9 uniquement en tant qu'enfant d'un \u00E9l\u00E9ment SOAPFault
-SAAJ0156.impl.adding.fault.error=SAAJ0156 : impossible d'ajouter SOAPFault ; un \u00E9l\u00E9ment SOAPFault doit \u00EAtre le seul enfant d'un \u00E9l\u00E9ment SOAPBody
-SAAJ0157.impl.detail.exists.error=SAAJ0157 : impossible d'ajouter l'\u00E9l\u00E9ment Detail, il existe d\u00E9j\u00E0
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158 : non-concordance de versions SOAP d\u00E9tect\u00E9e lors de la tentative d'ajout de SOAPFault \u00E0 SOAPBody
-SAAJ0159.impl.version.mismatch.detail=SAAJ0158 : non-concordance de versions SOAP d\u00E9tect\u00E9e lors de la tentative d'ajout de Detail \u00E0 SOAPFault
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190 : omettre la d\u00E9claration XML d\u00E9finie sur {0}
-SAAJ0191.impl.set.encoding=SAAJ0191 : l''encodage est d\u00E9fini sur {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties
deleted file mode 100644
index 0b0f6135..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: L'elemento padre di un SOAPBodyElement deve essere un SOAPBody
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: Impossibile trovare lo spazio di nomi per il prefisso {0}
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: Impossibile aggiungere frammenti che contengono elementi presenti nello spazio di nomi SOAP
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: Lo stile di codifica {0} deve essere un URI valido
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: Impossibile passare NULL a setParentElement
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: Impossibile usare setValue su un elemento che non ha solo un elemento figlio di tipo Text
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: Errore: Fault esiste gi\u00E0
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: L'elemento padre di SOAPBody deve essere un SOAPEnvelope
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: Impossibile passare NULL a setParentElement
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: Impossibile dividere il testo di un Comment Node
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: Impossibile sostituire tutto il testo di un Comment Node
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: Impossibile aggiungere un'intestazione quando ne \u00E8 gi\u00E0 presente una
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Il primo elemento figlio di Envelope deve essere Header o Body
-SAAJ0122.impl.body.already.exists=SAAJ0122: Impossibile aggiungere un corpo quando ne \u00E8 gi\u00E0 presente uno
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: Impossibile dichiarare riservato il prefisso xmlns
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: Il nome qualificato non pu\u00F2 essere xmlns
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: Impossibile trovare lo spazio di nomi per il prefisso {0}
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: Impossibile passare NULL a setParentElement
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: L'elemento padre di un SOAPHeaderElement deve essere un SSOAPHeader
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements deve essere qualificato per lo spazio di nomi
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: Valore non valido per l'attore o il ruolo
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: L'elemento padre di SOAPHeader deve essere un SOAPEnvelope
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements deve essere qualificato per lo spazio di nomi
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: URI dello spazio di nomi vuoto/nullo specificato per faultCode {0}
-SAAJ0141.impl.detail.exists=SAAJ0141: Detail esiste gi\u00E0
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: Fault/Reason/Text non supportato da questa versione SOAP. Tentare la versione SOAP 1.2 o successiva
-SAAJ0143.impl.node.not.supported=SAAJ0143: Fault/Node non supportato da questa versione SOAP. Tentare la versione SOAP 1.2 o successiva
-SAAJ0144.impl.role.not.supported=SAAJ0144: Fault/Role non supportato da questa versione SOAP. Tentare la versione SOAP 1.2 o successiva
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: Impossibile passare NULL a setParentElement
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: Impossibile modificare il nome dell''elemento {0} in {1}
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: Impossibile modificare l''URI per il prefisso {0} da {1} a {2} in setElementQName
-SAAJ0148.impl.invalid.prefix.for.uri=URI dello spazio di nomi non vuoto: {0} per un prefisso vuoto in SetElementQName
-SAAJ0149.impl.null.prefix=SAAJ0149: Il prefisso non pu\u00F2 essere "null" durante la creazione di un QName
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: Impossibile estrarre Document dal corpo
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: Impossibile estrarre Document dal corpo
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: Attributo {0} aggiunto
-SAAJ0151.impl.no.children=SAAJ0151: Impossibile trovare il nodo contenente il valore: non sono presenti elementi figlio
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: Impossibile trovare il nodo contenente il valore: il primo elemento figlio non \u00E8 un nodo testo
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: Impossibile trovare il nodo contenente il valore: sono presenti pi\u00F9 nodi figlio
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: Un elemento SOAPFault pu\u00F2 essere aggiunto solo come elemento figlio di SOAPBody
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Un elemento Detail pu\u00F2 essere aggiunto solo come elemento figlio di un SOAPFault
-SAAJ0156.impl.adding.fault.error=SAAJ0156: Impossibile aggiungere SOAPFault. SOAPFault deve essere l'unico elemento figlio di SOAPBody
-SAAJ0157.impl.detail.exists.error=SAAJ0157: Impossibile aggiungere Detail. Detail esiste gi\u00E0.
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: Mancata corrispondenza della versione SOAP rilevata durante il tentativo di aggiungere SOAPFault a SOAPBody
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: Mancata corrispondenza della versione SOAP rilevata durante il tentativo di aggiungere il dettaglio a SOAPFault
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: Omettere la dichiarazione XML impostata su {0}
-SAAJ0191.impl.set.encoding=SAAJ0191: La codifica \u00E8 impostata su {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties
deleted file mode 100644
index ee57f24b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: SOAPBodyElement\u306E\u89AA\u306FSOAPBody\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: \u63A5\u982D\u8F9E{0}\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: SOAP\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306B\u5B58\u5728\u3059\u308B\u8981\u7D20\u3092\u542B\u3080\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u30FB\u30B9\u30BF\u30A4\u30EB{0}\u306F\u6709\u52B9\u306AURI\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: NULL\u3092setParentElement\u306B\u6E21\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: \u30BF\u30A4\u30D7\u304C\u30C6\u30AD\u30B9\u30C8\u306E\u552F\u4E00\u306E\u5B50\u304C\u306A\u3044\u8981\u7D20\u306B\u5024\u3092\u8A2D\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: \u30A8\u30E9\u30FC: \u30D5\u30A9\u30EB\u30C8\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: SOAPBody\u306E\u89AA\u306FSOAPEnvelope\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: NULL\u3092setParentElement\u306B\u6E21\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: \u30B3\u30E1\u30F3\u30C8\u30FB\u30CE\u30FC\u30C9\u304B\u3089\u30C6\u30AD\u30B9\u30C8\u3092\u5206\u5272\u3067\u304D\u307E\u305B\u3093
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: \u30B3\u30E1\u30F3\u30C8\u30FB\u30CE\u30FC\u30C9\u304B\u3089\u30C6\u30AD\u30B9\u30C8\u5168\u4F53\u3092\u7F6E\u63DB\u3067\u304D\u307E\u305B\u3093
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: \u30D8\u30C3\u30C0\u30FC\u304C\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Envelope\u306E\u6700\u521D\u306E\u5B50\u306FHeader\u307E\u305F\u306FBody\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0122.impl.body.already.exists=SAAJ0122: \u672C\u6587\u304C\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: \u4E88\u7D04\u6E08\u306Exmlns\u63A5\u982D\u8F9E\u3092\u5BA3\u8A00\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: \u4FEE\u98FE\u540D\u3092xmlns\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: \u63A5\u982D\u8F9E{0}\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: NULL\u3092setParentElement\u306B\u6E21\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: SOAPHeaderElement\u306E\u89AA\u306FSOAPHeader\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements\u306F\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3067\u4FEE\u98FE\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: \u30A2\u30AF\u30BF\u30FC\u307E\u305F\u306F\u30ED\u30FC\u30EB\u306E\u5024\u304C\u7121\u52B9\u3067\u3059
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: SOAPHeader\u306E\u89AA\u306FSOAPEnvelope\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements\u306F\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3067\u4FEE\u98FE\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: faultCode {0}\u306B\u6307\u5B9A\u3055\u308C\u305FNamespaceURI\u304C\u7A7A/Null\u3067\u3059
-SAAJ0141.impl.detail.exists=SAAJ0141: Detail\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: \u3053\u306ESOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u306F\u30D5\u30A9\u30EB\u30C8/\u7406\u7531/\u30C6\u30AD\u30B9\u30C8\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002SOAP 1.2\u4EE5\u4E0A\u3092\u8A66\u3057\u3066\u304F\u3060\u3055\u3044
-SAAJ0143.impl.node.not.supported=SAAJ0143: \u3053\u306ESOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u306F\u30D5\u30A9\u30EB\u30C8/\u30CE\u30FC\u30C9\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002SOAP 1.2\u4EE5\u4E0A\u3092\u8A66\u3057\u3066\u304F\u3060\u3055\u3044
-SAAJ0144.impl.role.not.supported=SAAJ0144: \u3053\u306ESOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u306F\u30D5\u30A9\u30EB\u30C8/\u30ED\u30FC\u30EB\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002SOAP 1.2\u4EE5\u4E0A\u3092\u8A66\u3057\u3066\u304F\u3060\u3055\u3044
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: NULL\u3092setParentElement\u306B\u6E21\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: \u8981\u7D20{0}\u306E\u540D\u524D\u3092{1}\u306B\u5909\u66F4\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: setElementQName\u306E\u63A5\u982D\u8F9E{0}\u306EURI\u3092{1}\u304B\u3089{2}\u306B\u5909\u66F4\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0148.impl.invalid.prefix.for.uri=SetElementQName\u306E\u7A7A\u306E\u63A5\u982D\u8F9E\u306B\u7A7A\u767D\u4EE5\u5916\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9URI: {0}\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0149.impl.null.prefix=SAAJ0149: QName\u3092\u4F5C\u6210\u3059\u308B\u5834\u5408\u3001\u63A5\u982D\u8F9E\u3092\u300Cnull\u300D\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: \u672C\u6587\u304B\u3089\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u62BD\u51FA\u3067\u304D\u307E\u305B\u3093
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: \u672C\u6587\u304B\u3089\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u62BD\u51FA\u3067\u304D\u307E\u305B\u3093
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: \u5C5E\u6027{0}\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F
-SAAJ0151.impl.no.children=SAAJ0151: \u5024\u3092\u542B\u3080\u30CE\u30FC\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: \u5B50\u304C\u3042\u308A\u307E\u305B\u3093
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: \u5024\u3092\u542B\u3080\u30CE\u30FC\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: \u6700\u521D\u306E\u5B50\u304C\u30C6\u30AD\u30B9\u30C8\u30FB\u30CE\u30FC\u30C9\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: \u5024\u3092\u542B\u3080\u30CE\u30FC\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: \u8907\u6570\u306E\u5B50\u30CE\u30FC\u30C9\u304C\u3042\u308A\u307E\u3059
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: SOAPFault\u8981\u7D20\u306FSOAPBody\u306E\u5B50\u3068\u3057\u3066\u306E\u307F\u8FFD\u52A0\u3067\u304D\u307E\u3059
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Detail\u8981\u7D20\u306FSOAPFault\u306E\u5B50\u3068\u3057\u3066\u306E\u307F\u8FFD\u52A0\u3067\u304D\u307E\u3059
-SAAJ0156.impl.adding.fault.error=SAAJ0156: SOAPFault\u3092\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002SOAPFault\u306FSOAPBody\u306E\u552F\u4E00\u306E\u5B50\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0157.impl.detail.exists.error=SAAJ0157: Detail\u3092\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002Detail\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: SOAPFault\u3092SOAPBody\u306B\u8FFD\u52A0\u3057\u3088\u3046\u3068\u3057\u305F\u3068\u304D\u306BSOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u4E0D\u4E00\u81F4\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: Detail\u3092SOAPFault\u306B\u8FFD\u52A0\u3057\u3088\u3046\u3068\u3057\u305F\u3068\u304D\u306BSOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u4E0D\u4E00\u81F4\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: Omit XML\u5BA3\u8A00\u304C{0}\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0191.impl.set.encoding=SAAJ0191: \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u304C{0}\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties
deleted file mode 100644
index a43b4b59..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: SOAPBodyElement\uC758 \uC0C1\uC704\uB294 SOAPBody\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: {0} \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: SOAP \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uC788\uB294 \uC694\uC18C\uAC00 \uD3EC\uD568\uB41C \uB2E8\uD3B8\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: \uC778\uCF54\uB529 \uC2A4\uD0C0\uC77C {0}\uC740(\uB294) \uC801\uD569\uD55C URI\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: setParentElement\uC5D0 NULL\uC744 \uC804\uB2EC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: Text \uC720\uD615\uC758 \uC720\uC77C\uD55C \uD558\uC704\uAC00 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC740 \uC694\uC18C\uC5D0 \uB300\uD574 \uAC12\uC744 \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: \uC624\uB958: Fault\uAC00 \uC874\uC7AC\uD569\uB2C8\uB2E4.
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: SOAPBody\uC758 \uC0C1\uC704\uB294 SOAPEnvelope\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: setParentElement\uC5D0 NULL\uC744 \uC804\uB2EC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: \uC8FC\uC11D \uB178\uB4DC\uC5D0\uC11C \uD14D\uC2A4\uD2B8\uB97C \uBD84\uD560\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: \uC8FC\uC11D \uB178\uB4DC\uC758 \uC804\uCCB4 \uD14D\uC2A4\uD2B8\uB97C \uBC14\uAFC0 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: Header\uAC00 \uC874\uC7AC\uD558\uB294 \uACBD\uC6B0 Header\uB97C \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Envelope\uC758 \uCCAB\uBC88\uC9F8 \uD558\uC704\uB294 Header \uB610\uB294 Body\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0122.impl.body.already.exists=SAAJ0122: Body\uAC00 \uC874\uC7AC\uD558\uB294 \uACBD\uC6B0 Body\uB97C \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: \uC608\uC57D\uB41C xmlns \uC811\uB450\uC5B4\uB97C \uC120\uC5B8\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: \uC815\uADDC\uD654\uB41C \uC774\uB984\uC740 xmlns\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: {0} \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: setParentElement\uC5D0 NULL\uC744 \uC804\uB2EC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: SOAPHeaderElement\uC758 \uC0C1\uC704\uB294 SOAPHeader\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements\uB294 \uC815\uADDC\uD654\uB41C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: \uC791\uC5C5\uC790 \uB610\uB294 \uB864\uC5D0 \uB300\uD55C \uAC12\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: SOAPHeader\uC758 \uC0C1\uC704\uB294 SOAPEnvelope\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements\uB294 \uC815\uADDC\uD654\uB41C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: faultCode {0}\uC5D0 \uB300\uD574 \uBE48/\uB110 NamespaceURI\uAC00 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0141.impl.detail.exists=SAAJ0141: Detail\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4.
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: \uC774 SOAP \uBC84\uC804\uC5D0\uC11C\uB294 Fault/Reason/Text\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. SOAP 1.2 \uB610\uB294 \uC774\uD6C4 \uBC84\uC804\uC744 \uC0AC\uC6A9\uD574 \uBCF4\uC2ED\uC2DC\uC624.
-SAAJ0143.impl.node.not.supported=SAAJ0143: \uC774 SOAP \uBC84\uC804\uC5D0\uC11C\uB294 Fault/Node\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. SOAP 1.2 \uB610\uB294 \uC774\uD6C4 \uBC84\uC804\uC744 \uC0AC\uC6A9\uD574 \uBCF4\uC2ED\uC2DC\uC624.
-SAAJ0144.impl.role.not.supported=SAAJ0144: \uC774 SOAP \uBC84\uC804\uC5D0\uC11C\uB294 Fault/Role\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. SOAP 1.2 \uB610\uB294 \uC774\uD6C4 \uBC84\uC804\uC744 \uC0AC\uC6A9\uD574 \uBCF4\uC2ED\uC2DC\uC624.
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: setParentElement\uC5D0 NULL\uC744 \uC804\uB2EC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: {0} \uC694\uC18C\uC758 \uC774\uB984\uC744 {1}(\uC73C)\uB85C \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: setElementQName\uC5D0\uC11C {0} \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C URI\uB97C {1}\uC5D0\uC11C {2}(\uC73C)\uB85C \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0148.impl.invalid.prefix.for.uri=SetElementQName\uC5D0 \uBE48 \uC811\uB450\uC5B4\uC5D0 \uB300\uD574 \uBE44\uC5B4 \uC788\uC9C0 \uC54A\uC740 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 URI {0}\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.
-SAAJ0149.impl.null.prefix=SAAJ0149: QName\uC744 \uC0DD\uC131\uD558\uB294 \uACBD\uC6B0 \uC811\uB450\uC5B4\uB294 "null"\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: \uBCF8\uBB38\uC5D0\uC11C \uBB38\uC11C\uB97C \uCD94\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: \uBCF8\uBB38\uC5D0\uC11C \uBB38\uC11C\uB97C \uCD94\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: {0} \uC18D\uC131\uC744 \uCD94\uAC00\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0151.impl.no.children=SAAJ0151: \uAC12\uC774 \uD3EC\uD568\uB41C \uB178\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: \uD558\uC704 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: \uAC12\uC774 \uD3EC\uD568\uB41C \uB178\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: \uCCAB\uBC88\uC9F8 \uD558\uC704\uAC00 \uD14D\uC2A4\uD2B8 \uB178\uB4DC\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: \uAC12\uC774 \uD3EC\uD568\uB41C \uB178\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: \uD558\uC704 \uB178\uB4DC\uAC00 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4.
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: SOAPFault \uC694\uC18C\uB294 SOAPBody\uC758 \uD558\uC704\uB85C\uB9CC \uCD94\uAC00\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Detail \uC694\uC18C\uB294 SOAPFault\uC758 \uD558\uC704\uB85C\uB9CC \uCD94\uAC00\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-SAAJ0156.impl.adding.fault.error=SAAJ0156: SOAPFault\uB97C \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. SOAPFault\uB294 SOAPBody\uC758 \uC720\uC77C\uD55C \uD558\uC704\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0157.impl.detail.exists.error=SAAJ0157: Detail\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. Detail\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4.
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: SOAPBody\uC5D0 SOAPFault\uB97C \uCD94\uAC00\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 SOAP \uBC84\uC804 \uBD88\uC77C\uCE58\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: SOAPFault\uC5D0 Detail\uC744 \uCD94\uAC00\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 SOAP \uBC84\uC804 \uBD88\uC77C\uCE58\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: XML \uC120\uC5B8 \uC0DD\uB7B5\uC774 {0}(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0191.impl.set.encoding=SAAJ0191: \uC778\uCF54\uB529\uC774 {0}(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties
deleted file mode 100644
index ee38e972..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: o pai de um SOAPBodyElement deve ser um SOAPBody
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: n\u00E3o \u00E9 poss\u00EDvel localizar o namespace do prefixo {0}
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: n\u00E3o \u00E9 poss\u00EDvel adicionar fragmentos que cont\u00EAm elementos que est\u00E3o no namespace de SOAP
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: estilo {0} de codifica\u00E7\u00E3o deve ser um URI v\u00E1lido
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: n\u00E3o \u00E9 poss\u00EDvel informar NULL como setParentElement
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: n\u00E3o \u00E9 poss\u00EDvel setValue em um Elemento que n\u00E3o tem um s\u00F3 filho do tipo Texto
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: erro: j\u00E1 existe falha
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: o pai de SOAPBody deve ser um SOAPEnvelope
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: n\u00E3o \u00E9 poss\u00EDvel informar NULL como setParentElement
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: n\u00E3o \u00E9 poss\u00EDvel dividir o texto de um N\u00F3 do Coment\u00E1rio
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: n\u00E3o \u00E9 poss\u00EDvel substituir todo o texto de um N\u00F3 de Coment\u00E1rio
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: n\u00E3o \u00E9 poss\u00EDvel adicionar um cabe\u00E7alho quando h\u00E1 houver um
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: o primeiro filho do Envelope deve ser um Cabe\u00E7alho ou um Corpo
-SAAJ0122.impl.body.already.exists=SAAJ0122: n\u00E3o \u00E9 poss\u00EDvel adicionar um corpo quando j\u00E1 houver um
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: n\u00E3o \u00E9 poss\u00EDvel declarar o prefixo xmlns reservado
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: o nome qualificado n\u00E3o pode ser xmlns
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: n\u00E3o \u00E9 poss\u00EDvel localizar namespace para o prefixo {0}
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: n\u00E3o \u00E9 poss\u00EDvel informar NULL como setParentElement
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: o pai de um SOAPHeaderElement deve ser um SOAPHeader
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements deve ser um namespace qualificado
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: valor inv\u00E1lido para ator ou atribui\u00E7\u00E3o
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: o pai de um SOAPHeader deve ser um SOAPEnvelope
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements deve ser um namespace qualificado
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: NamespaceURI Vazio/Nulo especificado para faultCode {0}
-SAAJ0141.impl.detail.exists=SAAJ0141: o detalhe j\u00E1 existe
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: falha/motivo/texto n\u00E3o suportado por esta vers\u00E3o de SOAP, tente SOAP 1.2 ou posterior
-SAAJ0143.impl.node.not.supported=SAAJ0143: falha/n\u00F3 n\u00E3o suportados por esta vers\u00E3o de SOAP, tente SOAP 1.2 ou posterior
-SAAJ0144.impl.role.not.supported=SAAJ0144: falha/atribui\u00E7\u00E3o n\u00E3o suportada por esta vers\u00E3o de SOAP, tente SOAP 1.2 ou posterior
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: n\u00E3o \u00E9 poss\u00EDvel informar NULL como setParentElement
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: n\u00E3o \u00E9 poss\u00EDvel alterar o nome do elemento {0} para {1}
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: n\u00E3o \u00E9 poss\u00EDvel alterar o URI do prefixo {0} de {1} para {2} no setElementQName
-SAAJ0148.impl.invalid.prefix.for.uri=URI de namespace n\u00E3o vazio: {0} para um prefixo vazio no SetElementQName
-SAAJ0149.impl.null.prefix=SAAJ0149: o prefixo n\u00E3o pode ser "nulo" ao criar um QName
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: n\u00E3o \u00E9 poss\u00EDvel extrair o Documento do corpo
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: n\u00E3o \u00E9 poss\u00EDvel extrair o documento do corpo
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: atributo {0} adicionado
-SAAJ0151.impl.no.children=SAAJ0151: n\u00E3o \u00E9 poss\u00EDvel localizar o n\u00F3 que cont\u00E9m o valor: n\u00E3o h\u00E1 filhos
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: n\u00E3o \u00E9 poss\u00EDvel localizar o n\u00F3 que cont\u00E9m o valor: o primeiro filho n\u00E3o \u00E9 um n\u00F3 de Texto
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: n\u00E3o \u00E9 poss\u00EDvel localizar o n\u00F3 que cont\u00E9m o valor: h\u00E1 mais de um n\u00F3 filho
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: um elemento de SOAPFault s\u00F3 pode ser adicionado como filho de SOAPBody
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: um elemento de Detalhe s\u00F3 pode ser adicionado como um filho de um SOAPFault
-SAAJ0156.impl.adding.fault.error=SAAJ0156: n\u00E3o \u00E9 poss\u00EDvel adicionar SOAPFault, um SOAPFault deve ser filho s\u00F3 de um SOAPBody
-SAAJ0157.impl.detail.exists.error=SAAJ0157: n\u00E3o \u00E9 poss\u00EDvel adicionar Detalhe, o Detalhe j\u00E1 existe
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: incompatibilidade da vers\u00E3o SOAP encontrada ao tentar adicionar SOAPFault ao SOAPBody
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: incompatibilidade da vers\u00E3o SOAP encontrada ao tentar adicionar Detalhes \u00E0 SOAPFault
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: omitir conjunto de declara\u00E7\u00F5es de XML para {0}
-SAAJ0191.impl.set.encoding=SAAJ0191: codifica\u00E7\u00E3o definida como {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties
deleted file mode 100644
index 74bf2182..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: SOAPBodyElement \u7684\u7236\u7EA7\u5FC5\u987B\u662F SOAPBody
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: \u627E\u4E0D\u5230\u524D\u7F00{0}\u7684\u540D\u79F0\u7A7A\u95F4
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: \u65E0\u6CD5\u6DFB\u52A0\u5305\u542B\u4F4D\u4E8E SOAP \u540D\u79F0\u7A7A\u95F4\u4E2D\u7684\u5143\u7D20\u7684\u7247\u6BB5
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: \u7F16\u7801\u6837\u5F0F{0}\u5E94\u8BE5\u662F\u6709\u6548\u7684 URI
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: \u4E0D\u80FD\u5C06\u7A7A\u503C\u4F20\u9012\u7ED9 setParentElement
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: \u5BF9\u4E8E\u5E76\u975E\u53EA\u5177\u6709\u6587\u672C\u7C7B\u578B\u5B50\u7EA7\u7684\u5143\u7D20, \u4E0D\u80FD\u6267\u884C setValue
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: \u9519\u8BEF: \u6545\u969C\u5DF2\u5B58\u5728
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: SOAPBody \u7684\u7236\u7EA7\u5FC5\u987B\u662F SOAPEnvelope
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: \u4E0D\u80FD\u5C06\u7A7A\u503C\u4F20\u9012\u7ED9 setParentElement
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: \u65E0\u6CD5\u62C6\u5206\u6765\u81EA\u6CE8\u91CA\u8282\u70B9\u7684\u6587\u672C
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: \u65E0\u6CD5\u66FF\u6362\u6765\u81EA\u6CE8\u91CA\u8282\u70B9\u7684\u5168\u90E8\u6587\u672C
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: \u5F53\u6807\u5934\u5DF2\u5B58\u5728\u65F6, \u65E0\u6CD5\u6DFB\u52A0\u6807\u5934
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: \u4FE1\u5C01\u7684\u7B2C\u4E00\u4E2A\u5B50\u7EA7\u5FC5\u987B\u662F\u6807\u5934\u6216\u6B63\u6587
-SAAJ0122.impl.body.already.exists=SAAJ0122: \u5F53\u6B63\u6587\u5DF2\u5B58\u5728\u65F6, \u65E0\u6CD5\u6DFB\u52A0\u6B63\u6587
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: \u65E0\u6CD5\u58F0\u660E\u4FDD\u7559\u7684 xmlns \u524D\u7F00
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: \u9650\u5B9A\u540D\u4E0D\u80FD\u662F xmlns
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: \u627E\u4E0D\u5230\u524D\u7F00{0}\u7684\u540D\u79F0\u7A7A\u95F4
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: \u4E0D\u80FD\u5C06\u7A7A\u503C\u4F20\u9012\u7ED9 setParentElement
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: SOAPHeaderElement \u7684\u7236\u7EA7\u5FC5\u987B\u662F SOAPHeader
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements \u5FC5\u987B\u9650\u5B9A\u540D\u79F0\u7A7A\u95F4
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: \u64CD\u4F5C\u8005\u6216\u89D2\u8272\u7684\u503C\u65E0\u6548
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: SOAPHeader \u7684\u7236\u7EA7\u5FC5\u987B\u662F SOAPEnvelope
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements \u5FC5\u987B\u9650\u5B9A\u540D\u79F0\u7A7A\u95F4
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: \u4E3A faultCode {0} \u6307\u5B9A\u7684 NamespaceURI \u5FC5\u987B\u4E3A\u7A7A/\u7A7A\u503C
-SAAJ0141.impl.detail.exists=SAAJ0141: \u8BE6\u7EC6\u4FE1\u606F\u5DF2\u5B58\u5728
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u6301\u6545\u969C/\u539F\u56E0/\u6587\u672C, \u8BF7\u5C1D\u8BD5 SOAP 1.2 \u6216\u66F4\u9AD8\u7248\u672C
-SAAJ0143.impl.node.not.supported=SAAJ0143: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u6301\u6545\u969C/\u8282\u70B9, \u8BF7\u5C1D\u8BD5 SOAP 1.2 \u6216\u66F4\u9AD8\u7248\u672C
-SAAJ0144.impl.role.not.supported=SAAJ0144: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u6301\u6545\u969C/\u89D2\u8272, \u8BF7\u5C1D\u8BD5 SOAP 1.2 \u6216\u66F4\u9AD8\u7248\u672C
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: \u4E0D\u80FD\u5C06\u7A7A\u503C\u4F20\u9012\u7ED9 setParentElement
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: \u65E0\u6CD5\u5C06\u5143\u7D20{0}\u7684\u540D\u79F0\u66F4\u6539\u4E3A{1}
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: \u65E0\u6CD5\u5C06 setElementQName \u4E2D\u524D\u7F00{0}\u7684 URI \u4ECE {1} \u66F4\u6539\u4E3A {2}
-SAAJ0148.impl.invalid.prefix.for.uri=\u975E\u7A7A\u540D\u79F0\u7A7A\u95F4 URI: {0} \u7528\u4E8E SetElementQName \u4E2D\u7684\u7A7A\u524D\u7F00
-SAAJ0149.impl.null.prefix=SAAJ0149: \u521B\u5EFA QName \u65F6, \u524D\u7F00\u4E0D\u80FD\u4E3A "\u7A7A\u503C"
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: \u65E0\u6CD5\u4ECE\u6B63\u6587\u4E2D\u63D0\u53D6\u6587\u6863
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: \u65E0\u6CD5\u4ECE\u6B63\u6587\u4E2D\u63D0\u53D6\u6587\u6863
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: \u5DF2\u6DFB\u52A0\u5C5E\u6027{0}
-SAAJ0151.impl.no.children=SAAJ0151: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u8282\u70B9: \u6CA1\u6709\u4EFB\u4F55\u5B50\u7EA7
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u8282\u70B9: \u7B2C\u4E00\u4E2A\u5B50\u7EA7\u4E0D\u662F\u6587\u672C\u8282\u70B9
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u8282\u70B9: \u5B58\u5728\u591A\u4E2A\u5B50\u8282\u70B9
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: SOAPFault \u5143\u7D20\u53EA\u80FD\u4F5C\u4E3A SOAPBody \u7684\u5B50\u7EA7\u6DFB\u52A0
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: \u8BE6\u7EC6\u4FE1\u606F\u5143\u7D20\u53EA\u80FD\u4F5C\u4E3A SOAPFault \u7684\u5B50\u7EA7\u6DFB\u52A0
-SAAJ0156.impl.adding.fault.error=SAAJ0156: \u65E0\u6CD5\u6DFB\u52A0 SOAPFault, SOAPFault \u53EA\u5E94\u8BE5\u662F SOAPBody \u7684\u5B50\u7EA7
-SAAJ0157.impl.detail.exists.error=SAAJ0157: \u65E0\u6CD5\u6DFB\u52A0\u8BE6\u7EC6\u4FE1\u606F, \u8BE6\u7EC6\u4FE1\u606F\u5DF2\u5B58\u5728
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: \u5C1D\u8BD5\u5C06 SOAPFault \u6DFB\u52A0\u5230 SOAPBody \u65F6\u9047\u5230 SOAP \u7248\u672C\u4E0D\u5339\u914D\u60C5\u51B5
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: \u5C1D\u8BD5\u5C06\u8BE6\u7EC6\u4FE1\u606F\u6DFB\u52A0\u5230 SOAPFault \u65F6\u9047\u5230 SOAP \u7248\u672C\u4E0D\u5339\u914D\u60C5\u51B5
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: \u9057\u6F0F XML \u58F0\u660E\u8BBE\u7F6E\u4E3A{0}
-SAAJ0191.impl.set.encoding=SAAJ0191: \u7F16\u7801\u8BBE\u7F6E\u4E3A{0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties
deleted file mode 100644
index 24e07373..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: SOAPBodyElement \u7684\u7236\u9805\u5FC5\u9808\u662F SOAPBody
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: \u627E\u4E0D\u5230\u524D\u7F6E\u78BC {0} \u7684\u547D\u540D\u7A7A\u9593
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: \u7121\u6CD5\u65B0\u589E\u5305\u542B SOAP \u547D\u540D\u7A7A\u9593\u4E2D\u4E4B\u5143\u7D20\u7684\u7247\u6BB5
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: \u7DE8\u78BC\u6A23\u5F0F {0} \u61C9\u662F\u6709\u6548\u7684 URI
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: \u4E0D\u80FD\u50B3\u9001 NULL \u81F3 setParentElement
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: \u7121\u6CD5\u5728\u4E0D\u542B\u552F\u4E00 Text \u985E\u578B\u5B50\u9805\u7684\u300C\u5143\u7D20\u300D\u4E0A\u4F7F\u7528 setValue
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: \u932F\u8AA4: Fault \u5DF2\u7D93\u5B58\u5728
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: SOAPBody \u7684\u7236\u9805\u5FC5\u9808\u662F SOAPEnvelope
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: \u4E0D\u80FD\u50B3\u9001 NULL \u81F3 setParentElement
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: \u4E0D\u80FD\u5F9E\u300CComment \u7BC0\u9EDE\u300D\u5206\u5272\u6587\u5B57
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: \u4E0D\u80FD\u5F9E\u300CComment \u7BC0\u9EDE\u300D\u53D6\u4EE3\u6574\u500B\u6587\u5B57
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: \u6A19\u982D\u5DF2\u7D93\u5B58\u5728\u6642\u4E0D\u80FD\u65B0\u589E\u6A19\u982D
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Envelope\u7684\u7B2C\u4E00\u500B\u5B50\u9805\u5FC5\u9808\u662F Header \u6216 Body
-SAAJ0122.impl.body.already.exists=SAAJ0122: \u4E3B\u9AD4\u5DF2\u7D93\u5B58\u5728\u6642\u4E0D\u80FD\u65B0\u589E\u4E3B\u9AD4
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: \u4E0D\u80FD\u5BA3\u544A\u4FDD\u7559\u7684 xmlns \u524D\u7F6E\u78BC
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: \u5B8C\u6574\u540D\u7A31\u4E0D\u80FD\u662F xmlns
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: \u627E\u4E0D\u5230\u524D\u7F6E\u78BC {0} \u7684\u547D\u540D\u7A7A\u9593
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: \u4E0D\u80FD\u50B3\u9001 NULL \u81F3 setParentElement
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: SOAPHeaderElement \u7684\u7236\u9805\u5FC5\u9808\u662F SOAPHeader
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements \u5FC5\u9808\u662F\u9650\u5B9A\u7684\u547D\u540D\u7A7A\u9593
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: actor \u6216 role \u7684\u503C\u7121\u6548
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: SOAPHeader \u7684\u7236\u9805\u5FC5\u9808\u662F SOAPEnvelope
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements \u5FC5\u9808\u662F\u9650\u5B9A\u7684\u547D\u540D\u7A7A\u9593
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: \u70BA faultCode {0} \u6307\u5B9A\u7684\u662F\u7A7A\u7684/\u7A7A\u503C NamespaceURI
-SAAJ0141.impl.detail.exists=SAAJ0141: Detail \u5DF2\u7D93\u5B58\u5728
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u63F4 Fault/Reason/Text, \u8ACB\u5617\u8A66 SOAP 1.2 \u6216\u66F4\u65B0\u7248\u672C
-SAAJ0143.impl.node.not.supported=SAAJ0143: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u63F4 Fault/Node, \u8ACB\u5617\u8A66 SOAP 1.2 \u6216\u66F4\u65B0\u7248\u672C
-SAAJ0144.impl.role.not.supported=SAAJ0144: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u63F4 Fault/Role, \u8ACB\u5617\u8A66 SOAP 1.2 \u6216\u66F4\u65B0\u7248\u672C
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: \u4E0D\u80FD\u50B3\u9001 NULL \u81F3 setParentElement
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: \u4E0D\u80FD\u5C07\u5143\u7D20 {0} \u7684\u540D\u7A31\u8B8A\u66F4\u70BA {1}
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: \u4E0D\u80FD\u5C07 setElementQName \u4E2D\u524D\u7F6E\u78BC {0} \u7684 URI \u5F9E {1} \u8B8A\u66F4\u70BA {2}
-SAAJ0148.impl.invalid.prefix.for.uri=SetElementQName \u4E2D\u7684\u7A7A\u524D\u7F6E\u78BC\u6709\u975E\u7A7A\u767D\u7684\u547D\u540D\u7A7A\u9593 URI: {0}
-SAAJ0149.impl.null.prefix=SAAJ0149: \u5EFA\u7ACB QName \u6642, \u524D\u7F6E\u78BC\u4E0D\u80FD\u662F "null"
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: \u4E0D\u80FD\u5F9E\u4E3B\u9AD4\u64F7\u53D6 Document
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: \u7121\u6CD5\u5F9E\u4E3B\u9AD4\u64F7\u53D6 Document
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: \u5DF2\u65B0\u589E\u5C6C\u6027 {0}
-SAAJ0151.impl.no.children=SAAJ0151: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u7BC0\u9EDE: \u6C92\u6709\u5B50\u9805
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u7BC0\u9EDE: \u7B2C\u4E00\u500B\u5B50\u9805\u4E0D\u662F Text \u7BC0\u9EDE
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u7BC0\u9EDE: \u6709\u4E00\u500B\u4EE5\u4E0A\u7684\u5B50\u7BC0\u9EDE
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: SOAPFault \u5143\u7D20\u53EA\u80FD\u65B0\u589E\u6210\u70BA SOAPBody \u7684\u5B50\u9805
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Detail \u5143\u7D20\u53EA\u80FD\u65B0\u589E\u6210\u70BA SOAPFault \u7684\u5B50\u9805
-SAAJ0156.impl.adding.fault.error=SAAJ0156: \u7121\u6CD5\u65B0\u589E SOAPFault, SOAPFault \u61C9\u70BA SOAPBody \u7684\u552F\u4E00\u5B50\u9805
-SAAJ0157.impl.detail.exists.error=SAAJ0157: \u7121\u6CD5\u65B0\u589E Detail, Detail \u5DF2\u7D93\u5B58\u5728
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: \u5617\u8A66\u65B0\u589E SOAPFault \u81F3 SOAPBody \u6642, \u767C\u751F SOAP \u7248\u672C\u4E0D\u7B26
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: \u5617\u8A66\u65B0\u589E Detail \u81F3 SOAPFault \u6642, \u767C\u751F SOAP \u7248\u672C\u4E0D\u7B26
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: \u7701\u7565\u8A2D\u70BA {0} \u7684 XML \u5BA3\u544A
-SAAJ0191.impl.set.encoding=SAAJ0191: \u7DE8\u78BC\u5DF2\u8A2D\u70BA {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java
deleted file mode 100644
index 4d5ced04..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/TextImpl.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.logging.Logger;
-
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class TextImpl
- extends com.sun.org.apache.xerces.internal.dom.TextImpl
- implements javax.xml.soap.Text, org.w3c.dom.Text {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings");
-
- public TextImpl(SOAPDocumentImpl ownerDoc, String text) {
- super(ownerDoc, text);
- }
-
- public String getValue() {
- String nodeValue = getNodeValue();
- return (nodeValue.equals("") ? null : nodeValue);
- }
-
- public void setValue(String text) {
- setNodeValue(text);
- }
-
- public void setParentElement(SOAPElement parent) throws SOAPException {
- if (parent == null) {
- log.severe("SAAJ0126.impl.cannot.locate.ns");
- throw new SOAPException("Cannot pass NULL to setParentElement");
- }
- ((ElementImpl) parent).addNode(this);
- }
-
- public SOAPElement getParentElement() {
- return (SOAPElement) getParentNode();
- }
-
-
- public void detachNode() {
- org.w3c.dom.Node parent = getParentNode();
- if (parent != null) {
- parent.removeChild(this);
- }
- }
-
- public void recycleNode() {
- detachNode();
- // TBD
- // - add this to the factory so subsequent
- // creations can reuse this object.
- }
-
- public boolean isComment() {
- String txt = getNodeValue();
- if (txt == null) {
- return false;
- }
- return txt.startsWith("<!--") && txt.endsWith("-->");
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/TreeException.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/TreeException.java
deleted file mode 100644
index 0018bebc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/TreeException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-public class TreeException extends RuntimeException {
- public TreeException(String reason) {
- super(reason);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings.properties
deleted file mode 100644
index b21fa36d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: Cannot create a name from a null tag
-SAAJ0202.name.invalid.arg.format=SAAJ0202: Argument "{0}" must be of the form: prefix:localName
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties
deleted file mode 100644
index dbb57b8d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: Name kann nicht aus einem Null-Tag erstellt werden
-SAAJ0202.name.invalid.arg.format=SAAJ0202: Argument "{0}" muss folgende Form aufweisen: prefix:localName
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties
deleted file mode 100644
index c95967c0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: no se puede crear un nombre desde una etiqueta nula
-SAAJ0202.name.invalid.arg.format=SAAJ0202: El argumento "{0}" debe tener el formato: prefix:localName
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties
deleted file mode 100644
index 6213f58e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201 : impossible de cr\u00E9er un nom \u00E0 partir d'une balise NULL
-SAAJ0202.name.invalid.arg.format=SAAJ0202 : l''argument "{0}" doit avoir le format suivant : prefix:localName
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties
deleted file mode 100644
index 725f9e01..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: Impossibile creare un nome da una tag nulla
-SAAJ0202.name.invalid.arg.format=SAAJ0202: L''argomento "{0}" deve avere il formato: prefix:localName
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties
deleted file mode 100644
index b05766fc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: null\u306E\u30BF\u30B0\u304B\u3089\u540D\u524D\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-SAAJ0202.name.invalid.arg.format=SAAJ0202: \u5F15\u6570"{0}"\u306Fprefix:localName\u306E\u5F62\u5F0F\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties
deleted file mode 100644
index 59a20c24..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: \uB110 \uD0DC\uADF8\uC5D0\uC11C \uC774\uB984\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0202.name.invalid.arg.format=SAAJ0202: "{0}" \uC778\uC218\uB294 prefix:localName \uD615\uC2DD\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties
deleted file mode 100644
index 1eae437c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: n\u00E3o \u00E9 poss\u00EDvel criar um nome a partir de uma tag nula
-SAAJ0202.name.invalid.arg.format=SAAJ0202: o argumento "{0}" deve estar no formato: prefix.localName
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties
deleted file mode 100644
index cc63f6d2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: \u65E0\u6CD5\u4ECE\u7A7A\u503C\u6807\u8BB0\u521B\u5EFA\u540D\u79F0
-SAAJ0202.name.invalid.arg.format=SAAJ0202: \u53C2\u6570 "{0}" \u5FC5\u987B\u91C7\u7528\u4EE5\u4E0B\u5F62\u5F0F: prefix:localName
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties
deleted file mode 100644
index 4401ce12..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: \u7121\u6CD5\u5F9E\u7A7A\u503C\u6A19\u8A18\u5EFA\u7ACB\u540D\u7A31
-SAAJ0202.name.invalid.arg.format=SAAJ0202: \u5F15\u6578 "{0}" \u7684\u683C\u5F0F\u5FC5\u9808\u662F: prefix:localName
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java
deleted file mode 100644
index 1db47ea2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java
+++ /dev/null
@@ -1,561 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.name;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPConstants;
-
-//import com.sun.org.apache.xerces.internal.xni.NamespaceContext;
-import org.w3c.dom.Element;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class NameImpl implements Name {
- public static final String XML_NAMESPACE_PREFIX = "xml";
- public static final String XML_SCHEMA_NAMESPACE_PREFIX = "xs";
- public static final String SOAP_ENVELOPE_PREFIX = "SOAP-ENV";
-
- public static final String XML_NAMESPACE =
- "http://www.w3.org/XML/1998/namespace";
- public static final String SOAP11_NAMESPACE =
- SOAPConstants.URI_NS_SOAP_ENVELOPE;
- public static final String SOAP12_NAMESPACE =
- SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE;
- public static final String XML_SCHEMA_NAMESPACE =
- "http://www.w3.org/2001/XMLSchema";
-
- protected String uri = "";
- protected String localName = "";
- protected String prefix = "";
- private String qualifiedName = null;
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.NAMING_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.name.LocalStrings");
-
- /**
- * XML Information Set REC
- * all namespace attributes (including those named xmlns,
- * whose [prefix] property has no value) have a namespace URI of http://www.w3.org/2000/xmlns/
- */
- public final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/".intern();
-
- protected NameImpl(String name) {
- this.localName = name == null ? "" : name;
- }
-
- protected NameImpl(String name, String prefix, String uri) {
- this.uri = uri == null ? "" : uri;
- this.localName = name == null ? "" : name;
- this.prefix = prefix == null ? "" : prefix;
-
- if (this.prefix.equals("xmlns") && this.uri.equals("")) {
- this.uri = XMLNS_URI;
- }
- if (this.uri.equals(XMLNS_URI) && this.prefix.equals("")) {
- this.prefix = "xmlns";
- }
- }
-
- public static Name convertToName(QName qname) {
- return new NameImpl(qname.getLocalPart(),
- qname.getPrefix(),
- qname.getNamespaceURI());
- }
-
- public static QName convertToQName(Name name) {
- return new QName(name.getURI(),
- name.getLocalName(),
- name.getPrefix());
- }
-
- public static NameImpl createFromUnqualifiedName(String name) {
- return new NameImpl(name);
- }
-
- public static Name createFromTagName(String tagName) {
- return createFromTagAndUri(tagName, "");
- }
-
- public static Name createFromQualifiedName(
- String qualifiedName,
- String uri) {
- return createFromTagAndUri(qualifiedName, uri);
- }
-
- protected static Name createFromTagAndUri(String tagName, String uri) {
- if (tagName == null) {
- log.severe("SAAJ0201.name.not.created.from.null.tag");
- throw new IllegalArgumentException("Cannot create a name from a null tag.");
- }
- int index = tagName.indexOf(':');
- if (index < 0) {
- return new NameImpl(tagName, "", uri);
- } else {
- return new NameImpl(
- tagName.substring(index + 1),
- tagName.substring(0, index),
- uri);
- }
- }
-
- protected static int getPrefixSeparatorIndex(String qualifiedName) {
- int index = qualifiedName.indexOf(':');
- if (index < 0) {
- log.log(
- Level.SEVERE,
- "SAAJ0202.name.invalid.arg.format",
- new String[] { qualifiedName });
- throw new IllegalArgumentException(
- "Argument \""
- + qualifiedName
- + "\" must be of the form: \"prefix:localName\"");
- }
- return index;
- }
-
- public static String getPrefixFromQualifiedName(String qualifiedName) {
- return qualifiedName.substring(
- 0,
- getPrefixSeparatorIndex(qualifiedName));
- }
-
- public static String getLocalNameFromQualifiedName(String qualifiedName) {
- return qualifiedName.substring(
- getPrefixSeparatorIndex(qualifiedName) + 1);
- }
-
- public static String getPrefixFromTagName(String tagName) {
- if (isQualified(tagName)) {
- return getPrefixFromQualifiedName(tagName);
- }
- return "";
- }
-
- public static String getLocalNameFromTagName(String tagName) {
- if (isQualified(tagName)) {
- return getLocalNameFromQualifiedName(tagName);
- }
- return tagName;
- }
-
- public static boolean isQualified(String tagName) {
- return tagName.indexOf(':') >= 0;
- }
-
- public static NameImpl create(String name, String prefix, String uri) {
- if (prefix == null)
- prefix = "";
- if (uri == null)
- uri = "";
- if (name == null)
- name = "";
-
- if (!uri.equals("") && !name.equals("")) {
- if (uri.equals(NameImpl.SOAP11_NAMESPACE)) {
- if (name.equalsIgnoreCase("Envelope"))
- return createEnvelope1_1Name(prefix);
- else if (name.equalsIgnoreCase("Header"))
- return createHeader1_1Name(prefix);
- else if (name.equalsIgnoreCase("Body"))
- return createBody1_1Name(prefix);
- else if (name.equalsIgnoreCase("Fault"))
- return createFault1_1Name(prefix);
- else
- return new SOAP1_1Name(name, prefix);
- } else if (uri.equals(SOAP12_NAMESPACE)) {
- if (name.equalsIgnoreCase("Envelope"))
- return createEnvelope1_2Name(prefix);
- else if (name.equalsIgnoreCase("Header"))
- return createHeader1_2Name(prefix);
- else if (name.equalsIgnoreCase("Body"))
- return createBody1_2Name(prefix);
- else if (
- name.equals("Fault")
- || name.equals("Reason")
- || name.equals("Detail"))
- return createFault1_2Name(name, prefix);
- else if (name.equals("Code") || name.equals("Subcode"))
- return createCodeSubcode1_2Name(prefix, name);
- else
- return new SOAP1_2Name(name, prefix);
- }
-
- }
- return new NameImpl(name, prefix, uri);
- }
-
- public static String createQName(String prefix, String localName) {
- if (prefix == null || prefix.equals("")) {
- return localName;
- }
- return prefix + ":" + localName;
- }
-
- public boolean equals(Object obj) {
- if (!(obj instanceof Name)) {
- return false;
- }
-
- Name otherName = (Name) obj;
-
- if (!uri.equals(otherName.getURI())) {
- return false;
- }
-
- if (!localName.equals(otherName.getLocalName())) {
- return false;
- }
-
- return true;
- }
-
- public int hashCode() {
- return localName.hashCode();
- }
-
- /**
- * Get the local name part of this XML Name.
- *
- * @return a string for the local name.
- */
- public String getLocalName() {
- return localName;
- }
-
- /* getQualifiedName is inherited from QName */
-
- /**
- * Returns the prefix associated with the namespace of the name.
- *
- * @return the prefix as a string.
- */
- public String getPrefix() {
- return prefix;
- }
-
- /**
- * Returns the URI associated of the namespace.
- *
- * @return the uri as a string.
- */
- public String getURI() {
- return uri;
- }
-
- /**
- * Returns a String version of the name suitable for use in an XML document.
- */
- public String getQualifiedName() {
- if (qualifiedName == null) {
- if (prefix != null && prefix.length() > 0) {
- qualifiedName = prefix + ":" + localName;
- } else {
- qualifiedName = localName;
- }
- }
- return qualifiedName;
- }
-
- /**
- * Create a name object for a SOAP1.1 Envelope.
- */
- public static NameImpl createEnvelope1_1Name(String prefix) {
- return new Envelope1_1Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2 Envelope.
- */
- public static NameImpl createEnvelope1_2Name(String prefix) {
- return new Envelope1_2Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.1 Header.
- */
- public static NameImpl createHeader1_1Name(String prefix) {
- return new Header1_1Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2 Header.
- */
- public static NameImpl createHeader1_2Name(String prefix) {
- return new Header1_2Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.1 Body.
- */
- public static NameImpl createBody1_1Name(String prefix) {
- return new Body1_1Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2 Body.
- */
- public static NameImpl createBody1_2Name(String prefix) {
- return new Body1_2Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.1 Fault.
- */
- public static NameImpl createFault1_1Name(String prefix) {
- return new Fault1_1Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2 NotUnderstood element.
- */
- public static NameImpl createNotUnderstood1_2Name(String prefix) {
- return new NotUnderstood1_2Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2 Upgrade element.
- */
- public static NameImpl createUpgrade1_2Name(String prefix) {
- return new Upgrade1_2Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2 SupportedEnvelope Upgrade element.
- */
- public static NameImpl createSupportedEnvelope1_2Name(String prefix) {
- return new SupportedEnvelope1_2Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2
- * Fault, Reason or Detail.
- *
- * @param localName Local Name of element
- */
- public static NameImpl createFault1_2Name(
- String localName,
- String prefix) {
- return new Fault1_2Name(localName, prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2 Fault/Code or Subcode.
- *
- * @param localName Either "Code" or "Subcode"
- */
- public static NameImpl createCodeSubcode1_2Name(
- String prefix,
- String localName) {
- return new CodeSubcode1_2Name(localName, prefix);
- }
-
- /**
- * Create a name object for a SOAP1.1 Fault Detail.
- */
- public static NameImpl createDetail1_1Name() {
- return new Detail1_1Name();
- }
-
- public static NameImpl createDetail1_1Name(String prefix) {
- return new Detail1_1Name(prefix);
- }
-
- public static NameImpl createFaultElement1_1Name(String localName) {
- return new FaultElement1_1Name(localName);
- }
-
- public static NameImpl createFaultElement1_1Name(String localName,
- String prefix) {
- return new FaultElement1_1Name(localName, prefix);
- }
-
- public static NameImpl createSOAP11Name(String string) {
- return new SOAP1_1Name(string, null);
- }
- public static NameImpl createSOAP12Name(String string) {
- return new SOAP1_2Name(string, null);
- }
-
- public static NameImpl createSOAP12Name(String localName, String prefix) {
- return new SOAP1_2Name(localName, prefix);
- }
-
- public static NameImpl createXmlName(String localName) {
- return new NameImpl(localName, XML_NAMESPACE_PREFIX, XML_NAMESPACE);
- }
-
- public static Name copyElementName(Element element) {
- String localName = element.getLocalName();
- String prefix = element.getPrefix();
- String uri = element.getNamespaceURI();
- return create(localName, prefix, uri);
- }
-
-
-static class SOAP1_1Name extends NameImpl {
- SOAP1_1Name(String name, String prefix) {
- super(
- name,
- (prefix == null || prefix.equals(""))
- ? NameImpl.SOAP_ENVELOPE_PREFIX
- : prefix,
- NameImpl.SOAP11_NAMESPACE);
- }
-}
-
-static class Envelope1_1Name extends SOAP1_1Name {
- Envelope1_1Name(String prefix) {
- super("Envelope", prefix);
- }
-}
-
-static class Header1_1Name extends SOAP1_1Name {
- Header1_1Name(String prefix) {
- super("Header", prefix);
- }
-}
-
-static class Body1_1Name extends SOAP1_1Name {
- Body1_1Name(String prefix) {
- super("Body", prefix);
- }
-}
-
-static class Fault1_1Name extends NameImpl {
- Fault1_1Name(String prefix) {
- super(
- "Fault",
- (prefix == null || prefix.equals(""))
- ? SOAP_ENVELOPE_PREFIX
- : prefix,
- SOAP11_NAMESPACE);
- }
-}
-
-static class Detail1_1Name extends NameImpl {
- Detail1_1Name() {
- super("detail");
- }
-
- Detail1_1Name(String prefix) {
- super("detail", prefix, "");
- }
-}
-
-static class FaultElement1_1Name extends NameImpl {
- FaultElement1_1Name(String localName) {
- super(localName);
- }
-
- FaultElement1_1Name(String localName, String prefix) {
- super(localName, prefix, "");
- }
-}
-
-static class SOAP1_2Name extends NameImpl {
- SOAP1_2Name(String name, String prefix) {
- super(
- name,
- (prefix == null || prefix.equals(""))
- ? SOAPConstants.SOAP_ENV_PREFIX
- : prefix,
- SOAP12_NAMESPACE);
- }
-}
-
-static class Envelope1_2Name extends SOAP1_2Name {
- Envelope1_2Name(String prefix) {
- super("Envelope", prefix);
- }
-}
-
-static class Header1_2Name extends SOAP1_2Name {
- Header1_2Name(String prefix) {
- super("Header", prefix);
- }
-}
-
-static class Body1_2Name extends SOAP1_2Name {
- Body1_2Name(String prefix) {
- super("Body", prefix);
- }
-}
-
-static class Fault1_2Name extends NameImpl {
- Fault1_2Name(String name, String prefix) {
- super(
- (name == null || name.equals("")) ? "Fault" : name,
- (prefix == null || prefix.equals(""))
- ? SOAPConstants.SOAP_ENV_PREFIX
- : prefix,
- SOAP12_NAMESPACE);
- }
-}
-
-static class NotUnderstood1_2Name extends NameImpl {
- NotUnderstood1_2Name(String prefix) {
- super(
- "NotUnderstood",
- (prefix == null || prefix.equals(""))
- ? SOAPConstants.SOAP_ENV_PREFIX
- : prefix,
- SOAP12_NAMESPACE);
- }
-}
-
-static class Upgrade1_2Name extends NameImpl {
- Upgrade1_2Name(String prefix) {
- super(
- "Upgrade",
- (prefix == null || prefix.equals(""))
- ? SOAPConstants.SOAP_ENV_PREFIX
- : prefix,
- SOAP12_NAMESPACE);
- }
-}
-
-static class SupportedEnvelope1_2Name extends NameImpl {
- SupportedEnvelope1_2Name(String prefix) {
- super(
- "SupportedEnvelope",
- (prefix == null || prefix.equals(""))
- ? SOAPConstants.SOAP_ENV_PREFIX
- : prefix,
- SOAP12_NAMESPACE);
- }
-}
-
-static class CodeSubcode1_2Name extends SOAP1_2Name {
- CodeSubcode1_2Name(String prefix, String localName) {
- super(prefix, localName);
- }
-}
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java
deleted file mode 100644
index c2fef66f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import java.util.Locale;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.BodyImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public class Body1_1Impl extends BodyImpl {
- public Body1_1Impl(SOAPDocumentImpl ownerDocument, String prefix) {
- super(ownerDocument, NameImpl.createBody1_1Name(prefix));
- }
-
- public SOAPFault addSOAP12Fault(QName faultCode, String faultReason, Locale locale) {
- // log message here
- throw new UnsupportedOperationException("Not supported in SOAP 1.1");
- }
-
- protected NameImpl getFaultName(String name) {
- // Ignore name
- return NameImpl.createFault1_1Name(null);
- }
-
- protected SOAPBodyElement createBodyElement(Name name) {
- return new BodyElement1_1Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name);
- }
-
- protected SOAPBodyElement createBodyElement(QName name) {
- return new BodyElement1_1Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name);
- }
-
- protected QName getDefaultFaultCode() {
- return new QName(SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE, "Server");
- }
-
- protected boolean isFault(SOAPElement child) {
- // SOAP 1.1 faults always use the default name
- return child.getElementName().equals(getFaultName(null));
- }
-
- protected SOAPFault createFaultElement() {
- return new Fault1_1Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(), getPrefix());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java
deleted file mode 100644
index 6bf9ead8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.BodyElementImpl;
-
-public class BodyElement1_1Impl extends BodyElementImpl {
-
- public BodyElement1_1Impl(SOAPDocumentImpl ownerDoc, Name qname) {
- super(ownerDoc, qname);
- }
- public BodyElement1_1Impl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- BodyElementImpl copy =
- new BodyElement1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
- return replaceElementWithSOAPElement(this,copy);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java
deleted file mode 100644
index 8f9b4f9d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.DetailEntry;
-import javax.xml.soap.Name;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.DetailImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public class Detail1_1Impl extends DetailImpl {
-
- public Detail1_1Impl(SOAPDocumentImpl ownerDoc, String prefix) {
- super(ownerDoc, NameImpl.createDetail1_1Name(prefix));
- }
- public Detail1_1Impl(SOAPDocumentImpl ownerDoc) {
- super(ownerDoc, NameImpl.createDetail1_1Name());
- }
- protected DetailEntry createDetailEntry(Name name) {
- return new DetailEntry1_1Impl(
- (SOAPDocumentImpl) getOwnerDocument(),
- name);
- }
- protected DetailEntry createDetailEntry(QName name) {
- return new DetailEntry1_1Impl(
- (SOAPDocumentImpl) getOwnerDocument(),
- name);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java
deleted file mode 100644
index 53824589..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.DetailEntryImpl;
-
-public class DetailEntry1_1Impl extends DetailEntryImpl {
-
- public DetailEntry1_1Impl(SOAPDocumentImpl ownerDoc, Name qname) {
- super(ownerDoc, qname);
- }
- public DetailEntry1_1Impl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- DetailEntryImpl copy =
- new DetailEntry1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
- return replaceElementWithSOAPElement(this,copy);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java
deleted file mode 100644
index 0719c682..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import javax.xml.soap.SOAPException;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public class Envelope1_1Impl extends EnvelopeImpl {
-
- public Envelope1_1Impl(SOAPDocumentImpl ownerDoc, String prefix){
- super(ownerDoc, NameImpl.createEnvelope1_1Name(prefix));
- }
- Envelope1_1Impl(
- SOAPDocumentImpl ownerDoc,
- String prefix,
- boolean createHeader,
- boolean createBody)
- throws SOAPException {
- super(
- ownerDoc,
- NameImpl.createEnvelope1_1Name(prefix),
- createHeader,
- createBody);
- }
- protected NameImpl getBodyName(String prefix) {
- return NameImpl.createBody1_1Name(prefix);
- }
-
- protected NameImpl getHeaderName(String prefix) {
- return NameImpl.createHeader1_1Name(prefix);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java
deleted file mode 100644
index 3e67d2fa..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPFaultElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPConstants;
-import javax.xml.soap.Name;
-import javax.xml.soap.Name;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.*;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-
-
-public class Fault1_1Impl extends FaultImpl {
-
- protected static final Logger log =
- Logger.getLogger(
- LogDomainConstants.SOAP_VER1_1_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
-
- public Fault1_1Impl(SOAPDocumentImpl ownerDocument, String prefix) {
- super(ownerDocument, NameImpl.createFault1_1Name(prefix));
- }
-
- protected NameImpl getDetailName() {
- return NameImpl.createDetail1_1Name();
- }
-
- protected NameImpl getFaultCodeName() {
- return NameImpl.createFromUnqualifiedName("faultcode");
- }
-
- protected NameImpl getFaultStringName() {
- return NameImpl.createFromUnqualifiedName("faultstring");
- }
-
- protected NameImpl getFaultActorName() {
- return NameImpl.createFromUnqualifiedName("faultactor");
- }
-
- protected DetailImpl createDetail() {
- return new Detail1_1Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument());
- }
-
- protected FaultElementImpl createSOAPFaultElement(String localName) {
- return new FaultElement1_1Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- localName);
- }
-
- protected void checkIfStandardFaultCode(String faultCode, String uri)
- throws SOAPException {
- // SOAP 1.1 doesn't seem to mandate using faultcode from a particular
- // set of values.
- // Also need to be backward compatible.
- }
-
- protected void finallySetFaultCode(String faultcode) throws SOAPException {
- this.faultCodeElement.addTextNode(faultcode);
- }
-
- public String getFaultCode() {
- if (this.faultCodeElement == null)
- findFaultCodeElement();
- return this.faultCodeElement.getValue();
- }
-
- public Name getFaultCodeAsName() {
-
- String faultcodeString = getFaultCode();
- if (faultcodeString == null) {
- return null;
- }
- int prefixIndex = faultcodeString.indexOf(':');
- if (prefixIndex == -1) {
- // Not a valid SOAP message, but we return the unqualified name
- // anyway since some apps do not strictly conform to SOAP
- // specs. A message that does not contain a <faultcode>
- // element itself is also not valid in which case we return
- // null instead of throwing an exception so this is consistent.
- return NameImpl.createFromUnqualifiedName(faultcodeString);
- }
-
- // Get the prefix and map it to a namespace name (AKA namespace URI)
- String prefix = faultcodeString.substring(0, prefixIndex);
- if (this.faultCodeElement == null)
- findFaultCodeElement();
- String nsName = this.faultCodeElement.getNamespaceURI(prefix);
- return NameImpl.createFromQualifiedName(faultcodeString, nsName);
- }
-
- public QName getFaultCodeAsQName() {
- String faultcodeString = getFaultCode();
- if (faultcodeString == null) {
- return null;
- }
- if (this.faultCodeElement == null)
- findFaultCodeElement();
- return convertCodeToQName(faultcodeString, this.faultCodeElement);
- }
-
- public void setFaultString(String faultString) throws SOAPException {
-
- if (this.faultStringElement == null)
- findFaultStringElement();
-
- if (this.faultStringElement == null)
- this.faultStringElement = addSOAPFaultElement("faultstring");
- else {
- this.faultStringElement.removeContents();
- //this.faultStringElement.removeAttributeNS("http://www.w3.org/XML/1998/namespace", "lang");
- this.faultStringElement.removeAttribute("xml:lang");
- }
-
- this.faultStringElement.addTextNode(faultString);
- }
-
- public String getFaultString() {
- if (this.faultStringElement == null)
- findFaultStringElement();
- return this.faultStringElement.getValue();
-
- }
-
- public Locale getFaultStringLocale() {
- if (this.faultStringElement == null)
- findFaultStringElement();
- if (this.faultStringElement != null) {
- String xmlLangAttr =
- this.faultStringElement.getAttributeValue(
- NameImpl.createFromUnqualifiedName("xml:lang"));
- if (xmlLangAttr != null)
- return xmlLangToLocale(xmlLangAttr);
- }
- return null;
- }
-
- public void setFaultString(String faultString, Locale locale)
- throws SOAPException {
- setFaultString(faultString);
- this.faultStringElement.addAttribute(
- NameImpl.createFromTagName("xml:lang"),
- localeToXmlLang(locale));
- }
-
- protected boolean isStandardFaultElement(String localName) {
- if (localName.equalsIgnoreCase("detail") ||
- localName.equalsIgnoreCase("faultcode") ||
- localName.equalsIgnoreCase("faultstring") ||
- localName.equalsIgnoreCase("faultactor")) {
- return true;
- }
- return false;
- }
-
- public void appendFaultSubcode(QName subcode) {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- "appendFaultSubcode");
- throw new UnsupportedOperationException("Not supported in SOAP 1.1");
- }
-
- public void removeAllFaultSubcodes() {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- "removeAllFaultSubcodes");
- throw new UnsupportedOperationException("Not supported in SOAP 1.1");
- }
-
- public Iterator getFaultSubcodes() {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- "getFaultSubcodes");
- throw new UnsupportedOperationException("Not supported in SOAP 1.1");
- }
-
- public String getFaultReasonText(Locale locale) {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- "getFaultReasonText");
- throw new UnsupportedOperationException("Not supported in SOAP 1.1");
- }
-
- public Iterator getFaultReasonTexts() {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- "getFaultReasonTexts");
- throw new UnsupportedOperationException("Not supported in SOAP 1.1");
- }
-
- public Iterator getFaultReasonLocales() {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- "getFaultReasonLocales");
- throw new UnsupportedOperationException("Not supported in SOAP 1.1");
- }
-
- public void addFaultReasonText(String text, java.util.Locale locale)
- throws SOAPException {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- "addFaultReasonText");
- throw new UnsupportedOperationException("Not supported in SOAP 1.1");
- }
-
- public String getFaultRole() {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- "getFaultRole");
- throw new UnsupportedOperationException("Not supported in SOAP 1.1");
- }
-
- public void setFaultRole(String uri) {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- "setFaultRole");
- throw new UnsupportedOperationException("Not supported in SOAP 1.1");
- }
-
- public String getFaultNode() {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- "getFaultNode");
- throw new UnsupportedOperationException("Not supported in SOAP 1.1");
- }
-
- public void setFaultNode(String uri) {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- "setFaultNode");
- throw new UnsupportedOperationException("Not supported in SOAP 1.1");
- }
-
- protected QName getDefaultFaultCode() {
- return new QName(SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE, "Server");
- }
-
- public SOAPElement addChildElement(SOAPElement element)
- throws SOAPException {
- String localName = element.getLocalName();
- if ("Detail".equalsIgnoreCase(localName)) {
- if (hasDetail()) {
- log.severe("SAAJ0305.ver1_2.detail.exists.error");
- throw new SOAPExceptionImpl("Cannot add Detail, Detail already exists");
- }
- }
- return super.addChildElement(element);
- }
-
- protected FaultElementImpl createSOAPFaultElement(QName qname) {
- return new FaultElement1_1Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- qname);
- }
-
- protected FaultElementImpl createSOAPFaultElement(Name qname) {
- return new FaultElement1_1Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- (NameImpl)qname);
- }
-
- public void setFaultCode(String faultCode, String prefix, String uri)
- throws SOAPException {
- if (prefix == null || "".equals(prefix)) {
- if (uri != null && !"".equals(uri)) {
- prefix = getNamespacePrefix(uri);
- if (prefix == null || "".equals(prefix)) {
- prefix = "ns0";
- }
- }
- }
-
- if (this.faultCodeElement == null)
- findFaultCodeElement();
-
- if (this.faultCodeElement == null)
- this.faultCodeElement = addFaultCodeElement();
- else
- this.faultCodeElement.removeContents();
-
- if (uri == null || "".equals(uri)) {
- if (prefix != null && !"".equals("prefix")) {
- uri = this.faultCodeElement.getNamespaceURI(prefix);
- }
- }
-
- if (uri == null || "".equals(uri)) {
- if (prefix != null && !"".equals(prefix)) {
- //cannot allow an empty URI for a non-Empty prefix
- log.log(Level.SEVERE, "SAAJ0307.impl.no.ns.URI", new Object[]{prefix + ":" + faultCode});
- throw new SOAPExceptionImpl("Empty/Null NamespaceURI specified for faultCode \"" + prefix + ":" + faultCode + "\"");
- } else {
- uri = "";
- }
- }
-
- checkIfStandardFaultCode(faultCode, uri);
- ((FaultElementImpl) this.faultCodeElement).ensureNamespaceIsDeclared(prefix, uri);
-
- if (prefix == null || "".equals(prefix)) {
- finallySetFaultCode(faultCode);
- } else {
- finallySetFaultCode(prefix + ":" + faultCode);
- }
- }
-
- private boolean standardFaultCode(String faultCode) {
- if (faultCode.equals("VersionMismatch") || faultCode.equals("MustUnderstand")
- || faultCode.equals("Client") || faultCode.equals("Server")) {
- return true;
- }
- if (faultCode.startsWith("VersionMismatch.") || faultCode.startsWith("MustUnderstand.")
- || faultCode.startsWith("Client.") || faultCode.startsWith("Server.")) {
- return true;
- }
- return false;
- }
-
- public void setFaultActor(String faultActor) throws SOAPException {
- if (this.faultActorElement == null)
- findFaultActorElement();
- if (this.faultActorElement != null)
- this.faultActorElement.detachNode();
- if (faultActor == null)
- return;
- this.faultActorElement =
- createSOAPFaultElement(getFaultActorName());
- this.faultActorElement.addTextNode(faultActor);
- if (hasDetail()) {
- insertBefore(this.faultActorElement, this.detail);
- return;
- }
- addNode(this.faultActorElement);
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/FaultElement1_1Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/FaultElement1_1Impl.java
deleted file mode 100644
index b78cb47b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/FaultElement1_1Impl.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.FaultElementImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public class FaultElement1_1Impl extends FaultElementImpl {
-
- public FaultElement1_1Impl(SOAPDocumentImpl ownerDoc, NameImpl qname) {
- super(ownerDoc, qname);
- }
-
- public FaultElement1_1Impl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
-
- public FaultElement1_1Impl(SOAPDocumentImpl ownerDoc,
- String localName) {
- super(ownerDoc, NameImpl.createFaultElement1_1Name(localName));
- }
-
- public FaultElement1_1Impl(SOAPDocumentImpl ownerDoc,
- String localName,
- String prefix) {
- super(ownerDoc,
- NameImpl.createFaultElement1_1Name(localName, prefix));
- }
-
- protected boolean isStandardFaultElement() {
- String localName = elementQName.getLocalPart();
- if (localName.equalsIgnoreCase("faultcode") ||
- localName.equalsIgnoreCase("faultstring") ||
- localName.equalsIgnoreCase("faultactor")) {
- return true;
- }
- return false;
- }
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- if (!isStandardFaultElement()) {
- FaultElement1_1Impl copy =
- new FaultElement1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
- return replaceElementWithSOAPElement(this,copy);
- } else {
- return super.setElementQName(newName);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java
deleted file mode 100644
index 22a3804c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Header1_1Impl.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import java.util.List;
-import java.util.Iterator;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class Header1_1Impl extends HeaderImpl {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
-
- public Header1_1Impl(SOAPDocumentImpl ownerDocument, String prefix) {
- super(ownerDocument, NameImpl.createHeader1_1Name(prefix));
- }
-
- protected NameImpl getNotUnderstoodName() {
- log.log(
- Level.SEVERE,
- "SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1",
- new String[] { "getNotUnderstoodName" });
- throw new UnsupportedOperationException("Not supported by SOAP 1.1");
- }
-
- protected NameImpl getUpgradeName() {
- return NameImpl.create(
- "Upgrade",
- getPrefix(),
- SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE);
- }
-
- protected NameImpl getSupportedEnvelopeName() {
- return NameImpl.create(
- "SupportedEnvelope",
- getPrefix(),
- SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE);
- }
-
- public SOAPHeaderElement addNotUnderstoodHeaderElement(QName name)
- throws SOAPException {
- log.log(
- Level.SEVERE,
- "SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1",
- new String[] { "addNotUnderstoodHeaderElement" });
- throw new UnsupportedOperationException("Not supported by SOAP 1.1");
- }
-
- protected SOAPHeaderElement createHeaderElement(Name name) {
- return new HeaderElement1_1Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name);
- }
- protected SOAPHeaderElement createHeaderElement(QName name) {
- return new HeaderElement1_1Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java
deleted file mode 100644
index 084e9c89..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/HeaderElement1_1Impl.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPElement;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderElementImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class HeaderElement1_1Impl extends HeaderElementImpl {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
-
- public HeaderElement1_1Impl(SOAPDocumentImpl ownerDoc, Name qname) {
- super(ownerDoc, qname);
- }
- public HeaderElement1_1Impl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- HeaderElementImpl copy =
- new HeaderElement1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
- return replaceElementWithSOAPElement(this,copy);
- }
-
- protected NameImpl getActorAttributeName() {
- return NameImpl.create("actor", null, NameImpl.SOAP11_NAMESPACE);
- }
-
- // role not supported by SOAP 1.1
- protected NameImpl getRoleAttributeName() {
- log.log(
- Level.SEVERE,
- "SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1",
- new String[] { "Role" });
- throw new UnsupportedOperationException("Role not supported by SOAP 1.1");
- }
-
- protected NameImpl getMustunderstandAttributeName() {
- return NameImpl.create("mustUnderstand", null, NameImpl.SOAP11_NAMESPACE);
- }
-
- // mustUnderstand attribute has literal value "1" or "0"
- protected String getMustunderstandLiteralValue(boolean mustUnderstand) {
- return (mustUnderstand == true ? "1" : "0");
- }
-
- protected boolean getMustunderstandAttributeValue(String mu) {
- if ("1".equals(mu) || "true".equalsIgnoreCase(mu))
- return true;
- return false;
- }
-
- // relay not supported by SOAP 1.1
- protected NameImpl getRelayAttributeName() {
- log.log(
- Level.SEVERE,
- "SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1",
- new String[] { "Relay" });
- throw new UnsupportedOperationException("Relay not supported by SOAP 1.1");
- }
-
- protected String getRelayLiteralValue(boolean relayAttr) {
- log.log(
- Level.SEVERE,
- "SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1",
- new String[] { "Relay" });
- throw new UnsupportedOperationException("Relay not supported by SOAP 1.1");
- }
-
- protected boolean getRelayAttributeValue(String mu) {
- log.log(
- Level.SEVERE,
- "SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1",
- new String[] { "Relay" });
- throw new UnsupportedOperationException("Relay not supported by SOAP 1.1");
- }
-
- protected String getActorOrRole() {
- return getActor();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings.properties
deleted file mode 100644
index 2283b9e5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_1 pkg
-
-# Error messages
-SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1=SAAJ0301: Operation {0} not supported by SOAP 1.1
-SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1=SAAJ0302: Attribute {0} not supported by SOAP 1.1
-SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1=SAAJ0303: Operation {0} not supported by SOAP 1.1
-SAAJ0304.ver1_1.msg.invalid.SOAP1.1=SAAJ0304: InputStream does not represent a valid SOAP 1.1 Message
-SAAJ0305.ver1_2.detail.exists.error=SAAJ0305: Cannot add Detail, Detail already exists
-SAAJ0306.ver1_1.faultcode.incorrect.namespace=SAAJ0306: Namespace Warning, Standard Faultcode {0}, should ideally be in SOAP 1.1 Namespace
-SAAJ0307.impl.no.ns.URI=SAAJ0307: Empty/Null NamespaceURI specified for faultCode {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_de.properties
deleted file mode 100644
index d3c84e47..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_de.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_1 pkg
-
-# Error messages
-SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1=SAAJ0301: Vorgang {0} von SOAP 1.1 nicht unterst\u00FCtzt
-SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1=SAAJ0302: Attribut {0} von SOAP 1.1 nicht unterst\u00FCtzt
-SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1=SAAJ0303: Vorgang {0} von SOAP 1.1 nicht unterst\u00FCtzt
-SAAJ0304.ver1_1.msg.invalid.SOAP1.1=SAAJ0304: InputStream stellt keine g\u00FCltige SOAP 1.1-Nachricht dar
-SAAJ0305.ver1_2.detail.exists.error=SAAJ0305: Detail kann nicht hinzugef\u00FCgt werden, Detail ist bereits vorhanden
-SAAJ0306.ver1_1.faultcode.incorrect.namespace=SAAJ0306: Namespace-Warnung, Standard-Faultcode {0}, sollte im Idealfall in SOAP 1.1 Namespace enthalten sein
-SAAJ0307.impl.no.ns.URI=SAAJ0307: Leerer/Null-NamespaceURI f\u00FCr faultCode {0} angegeben
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_es.properties
deleted file mode 100644
index c5a9fc48..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_es.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_1 pkg
-
-# Error messages
-SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1=SAAJ0301: la operaci\u00F3n {0} no est\u00E1 soportada en SOAP 1.1
-SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1=SAAJ0302: el atributo {0} no est\u00E1 soportado en SOAP 1.1
-SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1=SAAJ0303: la operaci\u00F3n {0} no est\u00E1 soportada en SOAP 1.1
-SAAJ0304.ver1_1.msg.invalid.SOAP1.1=SAAJ0304: InputStream no representa un mensaje de SOAP 1.1 v\u00E1lido
-SAAJ0305.ver1_2.detail.exists.error=SAAJ0305: no se puede agregar el detalle. El detalle ya existe
-SAAJ0306.ver1_1.faultcode.incorrect.namespace=SAAJ0306: advertencia de espacio de nombres; lo recomendable es que el c\u00F3digo de fallo est\u00E1ndar {0} est\u00E9 en un espacio de nombres de SOAP 1.1
-SAAJ0307.impl.no.ns.URI=SAAJ0307: se ha especificado un URI de espacio de nombres vac\u00EDo o nulo para el c\u00F3digo de fallo {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_fr.properties
deleted file mode 100644
index 297afe0c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_fr.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_1 pkg
-
-# Error messages
-SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1=SAAJ0301 : op\u00E9ration {0} non prise en charge par SOAP 1.1
-SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1=SAAJ0302 : attribut {0} non pris en charge par SOAP 1.1
-SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1=SAAJ0303 : op\u00E9ration {0} non prise en charge par SOAP 1.1
-SAAJ0304.ver1_1.msg.invalid.SOAP1.1=SAAJ0304 : InputStream ne repr\u00E9sente pas un message SOAP 1.1 valide
-SAAJ0305.ver1_2.detail.exists.error=SAAJ0157 : impossible d'ajouter l'\u00E9l\u00E9ment Detail, il existe d\u00E9j\u00E0
-SAAJ0306.ver1_1.faultcode.incorrect.namespace=SAAJ0306 : avertissement d''espace de noms, Faultcode standard {0}, doit id\u00E9alement \u00EAtre dans l''espace de noms SOAP 1.1
-SAAJ0307.impl.no.ns.URI=SAAJ0307 : NamespaceURI vide/NULL indiqu\u00E9 pour faultCode {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_it.properties
deleted file mode 100644
index 3549d130..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_it.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_1 pkg
-
-# Error messages
-SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1=SAAJ0301: Operazione {0} non supportata da SOAP 1.1
-SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1=SAAJ0302: Attributo {0} non supportato da SOAP 1.1
-SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1=SAAJ0303: Operazione {0} non supportata da SOAP 1.1
-SAAJ0304.ver1_1.msg.invalid.SOAP1.1=SAAJ0304: InputStream non rappresenta un messaggio SOAP 1.1 valido
-SAAJ0305.ver1_2.detail.exists.error=SAAJ0305: Impossibile aggiungere Detail. Detail esiste gi\u00E0.
-SAAJ0306.ver1_1.faultcode.incorrect.namespace=SAAJ0306: L''avvertenza dello spazio di nomi, codice di errore standard {0}, dovrebbe trovarsi nello spazio di nomi SOAP 1.1
-SAAJ0307.impl.no.ns.URI=SAAJ0307: NamespaceURI nomi vuoto/nullo specificato per faultCode {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ja.properties
deleted file mode 100644
index 5f7d3bd3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ja.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_1 pkg
-
-# Error messages
-SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1=SAAJ0301: \u64CD\u4F5C{0}\u306FSOAP 1.1\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1=SAAJ0302: \u5C5E\u6027{0}\u306FSOAP 1.1\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1=SAAJ0303: \u64CD\u4F5C{0}\u306FSOAP 1.1\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0304.ver1_1.msg.invalid.SOAP1.1=SAAJ0304: InputStream\u306F\u6709\u52B9\u306ASOAP 1.1\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u3057\u3066\u3044\u307E\u305B\u3093
-SAAJ0305.ver1_2.detail.exists.error=SAAJ0305: Detail\u3092\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002Detail\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
-SAAJ0306.ver1_1.faultcode.incorrect.namespace=SAAJ0306: \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u8B66\u544A\u3001\u6A19\u6E96\u306EFaultcode {0}\u3001SOAP 1.1\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306B\u5B58\u5728\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0307.impl.no.ns.URI=SAAJ0307: faultCode {0}\u306B\u6307\u5B9A\u3055\u308C\u305FNamespaceURI\u304C\u7A7A/Null\u3067\u3059
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ko.properties
deleted file mode 100644
index 28cdc195..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ko.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_1 pkg
-
-# Error messages
-SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1=SAAJ0301: SOAP 1.1\uC5D0\uC11C\uB294 {0} \uC791\uC5C5\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1=SAAJ0302: SOAP 1.1\uC5D0\uC11C\uB294 {0} \uC18D\uC131\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1=SAAJ0303: SOAP 1.1\uC5D0\uC11C\uB294 {0} \uC791\uC5C5\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0304.ver1_1.msg.invalid.SOAP1.1=SAAJ0304: InputStream\uC774 \uC801\uD569\uD55C SOAP 1.1 \uBA54\uC2DC\uC9C0\uB97C \uB098\uD0C0\uB0B4\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0305.ver1_2.detail.exists.error=SAAJ0305: Detail\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. Detail\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4.
-SAAJ0306.ver1_1.faultcode.incorrect.namespace=SAAJ0306: \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uACBD\uACE0\uC785\uB2C8\uB2E4. \uD45C\uC900 Faultcode {0}\uC740(\uB294) SOAP 1.1 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0307.impl.no.ns.URI=SAAJ0307: faultCode {0}\uC5D0 \uB300\uD574 \uBE48/\uB110 NamespaceURI\uAC00 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_pt_BR.properties
deleted file mode 100644
index 3ef8cf0b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_pt_BR.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_1 pkg
-
-# Error messages
-SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1=SAAJ0301: opera\u00E7\u00E3o {0} n\u00E3o suportada por SOAP 1.1
-SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1=SAAJ0302: o atributo {0} n\u00E3o \u00E9 suportado por SOAP 1.1
-SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1=SAAJ0303: opera\u00E7\u00E3o {0} n\u00E3o suportada por SOAP 1.1
-SAAJ0304.ver1_1.msg.invalid.SOAP1.1=SAAJ0304: o InputStream n\u00E3o representa uma Mensagem SOAP 1.2 v\u00E1lida
-SAAJ0305.ver1_2.detail.exists.error=SAAJ0305: n\u00E3o \u00E9 poss\u00EDvel adicionar Detalhe, o Detalhe j\u00E1 existe
-SAAJ0306.ver1_1.faultcode.incorrect.namespace=SAAJ0306: Advert\u00EAncia de Namespace, C\u00F3digo de falha Padr\u00E3o {0}, devem estar no Namespace SOAP 1.1
-SAAJ0307.impl.no.ns.URI=SAAJ0307: NamespaceURI Vazio/Nulo especificado para faultCode {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_CN.properties
deleted file mode 100644
index 6047c9d8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_CN.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_1 pkg
-
-# Error messages
-SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1=SAAJ0301: SOAP 1.1 \u4E0D\u652F\u6301\u64CD\u4F5C{0}
-SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1=SAAJ0302: SOAP 1.1 \u4E0D\u652F\u6301\u5C5E\u6027{0}
-SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1=SAAJ0303: SOAP 1.1 \u4E0D\u652F\u6301\u64CD\u4F5C{0}
-SAAJ0304.ver1_1.msg.invalid.SOAP1.1=SAAJ0304: InputStream \u4E0D\u8868\u793A\u6709\u6548\u7684 SOAP 1.1 \u6D88\u606F
-SAAJ0305.ver1_2.detail.exists.error=SAAJ0305: \u65E0\u6CD5\u6DFB\u52A0\u8BE6\u7EC6\u4FE1\u606F, \u8BE6\u7EC6\u4FE1\u606F\u5DF2\u5B58\u5728
-SAAJ0306.ver1_1.faultcode.incorrect.namespace=SAAJ0306: \u540D\u79F0\u7A7A\u95F4\u8B66\u544A, \u6807\u51C6\u6545\u969C\u4EE3\u7801 {0} \u6700\u9002\u5408\u5728 SOAP 1.1 \u540D\u79F0\u7A7A\u95F4\u4E2D\u4F7F\u7528
-SAAJ0307.impl.no.ns.URI=SAAJ0307: \u4E3A faultCode {0} \u6307\u5B9A\u7684 NamespaceURI \u5FC5\u987B\u4E3A\u7A7A/\u7A7A\u503C
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_TW.properties
deleted file mode 100644
index c20344d0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_TW.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_1 pkg
-
-# Error messages
-SAAJ0301.ver1_1.hdr.op.unsupported.in.SOAP1.1=SAAJ0301: SOAP 1.1 \u4E0D\u652F\u63F4\u4F5C\u696D {0}
-SAAJ0302.ver1_1.hdr.attr.unsupported.in.SOAP1.1=SAAJ0302: SOAP 1.1 \u4E0D\u652F\u63F4\u5C6C\u6027 {0}
-SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1=SAAJ0303: SOAP 1.1 \u4E0D\u652F\u63F4\u4F5C\u696D {0}
-SAAJ0304.ver1_1.msg.invalid.SOAP1.1=SAAJ0304: InputStream \u4E0D\u4EE3\u8868\u6709\u6548\u7684 SOAP 1.1 \u8A0A\u606F
-SAAJ0305.ver1_2.detail.exists.error=SAAJ0305: \u7121\u6CD5\u65B0\u589E Detail, Detail \u5DF2\u7D93\u5B58\u5728
-SAAJ0306.ver1_1.faultcode.incorrect.namespace=SAAJ0306: \u547D\u540D\u7A7A\u9593\u8B66\u544A, \u6A19\u6E96 Faultcode {0}, \u61C9\u8A72\u4F4D\u65BC SOAP 1.1 \u547D\u540D\u7A7A\u9593\u4E2D
-SAAJ0307.impl.no.ns.URI=SAAJ0307: \u70BA faultCode {0} \u6307\u5B9A\u7684\u662F\u7A7A\u7684/\u7A7A\u503C NamespaceURI
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java
deleted file mode 100644
index 75d9dfb9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Message1_1Impl.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType;
-import com.sun.xml.internal.messaging.saaj.soap.MessageImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class Message1_1Impl extends MessageImpl implements SOAPConstants {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
-
- public Message1_1Impl() {
- super();
- }
-
- public Message1_1Impl(boolean isFastInfoset, boolean acceptFastInfoset) {
- super(isFastInfoset, acceptFastInfoset);
- }
-
- public Message1_1Impl(SOAPMessage msg) {
- super(msg);
- }
-
- // unused. can we delete this? - Kohsuke
- public Message1_1Impl(MimeHeaders headers, InputStream in)
- throws IOException, SOAPExceptionImpl {
- super(headers, in);
- }
-
- public Message1_1Impl(MimeHeaders headers, ContentType ct, int stat, InputStream in)
- throws SOAPExceptionImpl {
- super(headers,ct,stat,in);
- }
-
- public SOAPPart getSOAPPart() {
- if (soapPartImpl == null) {
- soapPartImpl = new SOAPPart1_1Impl(this);
- }
- return soapPartImpl;
- }
-
- protected boolean isCorrectSoapVersion(int contentTypeId) {
- return (contentTypeId & SOAP1_1_FLAG) != 0;
- }
-
- public String getAction() {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- new String[] { "Action" });
- throw new UnsupportedOperationException("Operation not supported by SOAP 1.1");
- }
-
- public void setAction(String type) {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- new String[] { "Action" });
- throw new UnsupportedOperationException("Operation not supported by SOAP 1.1");
- }
-
- public String getCharset() {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- new String[] { "Charset" });
- throw new UnsupportedOperationException("Operation not supported by SOAP 1.1");
- }
-
- public void setCharset(String charset) {
- log.log(
- Level.SEVERE,
- "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
- new String[] { "Charset" });
- throw new UnsupportedOperationException("Operation not supported by SOAP 1.1");
- }
-
- protected String getExpectedContentType() {
- return isFastInfoset ? "application/fastinfoset" : "text/xml";
- }
-
- protected String getExpectedAcceptHeader() {
- String accept = "text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2";
- return acceptFastInfoset ? ("application/fastinfoset, " + accept) : accept;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPFactory1_1Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPFactory1_1Impl.java
deleted file mode 100644
index fb971f1e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPFactory1_1Impl.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import javax.xml.soap.Detail;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFault;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPFactoryImpl;
-
-public class SOAPFactory1_1Impl extends SOAPFactoryImpl {
- protected SOAPDocumentImpl createDocument() {
- return (new SOAPPart1_1Impl()).getDocument();
- }
-
- public Detail createDetail() throws SOAPException {
- return new Detail1_1Impl(createDocument());
- }
-
- public SOAPFault createFault(String reasonText, QName faultCode)
- throws SOAPException {
- if (faultCode == null) {
- throw new IllegalArgumentException("faultCode argument for createFault was passed NULL");
- }
- if (reasonText == null) {
- throw new IllegalArgumentException("reasonText argument for createFault was passed NULL");
- }
- Fault1_1Impl fault = new Fault1_1Impl(createDocument(), null);
- fault.setFaultCode(faultCode);
- fault.setFaultString(reasonText);
- return fault;
- }
-
- public SOAPFault createFault() throws SOAPException {
- Fault1_1Impl fault = new Fault1_1Impl(createDocument(), null);
- fault.setFaultCode(fault.getDefaultFaultCode());
- fault.setFaultString("Fault string, and possibly fault code, not set");
- return fault;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPMessageFactory1_1Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPMessageFactory1_1Impl.java
deleted file mode 100644
index 63813423..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPMessageFactory1_1Impl.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.MessageFactoryImpl;
-import com.sun.xml.internal.messaging.saaj.soap.MessageImpl;
-
-public class SOAPMessageFactory1_1Impl extends MessageFactoryImpl {
-
- public SOAPMessage createMessage() throws SOAPException {
- return new Message1_1Impl();
- }
-
- public SOAPMessage createMessage(boolean isFastInfoset,
- boolean acceptFastInfoset) throws SOAPException
- {
- return new Message1_1Impl(isFastInfoset, acceptFastInfoset);
- }
-
- public SOAPMessage createMessage(MimeHeaders headers, InputStream in) throws IOException, SOAPExceptionImpl {
-
- if (headers == null) {
- headers = new MimeHeaders();
- }
-
- if (getContentType(headers) == null) {
- headers.setHeader("Content-Type", SOAPConstants.SOAP_1_1_CONTENT_TYPE);
- }
-
- MessageImpl msg = new Message1_1Impl(headers, in);
- msg.setLazyAttachments(lazyAttachments);
- return msg;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java
deleted file mode 100644
index 56c4a8ab..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/SOAPPart1_1Impl.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.soap.SOAPConstants;
-import javax.xml.soap.SOAPException;
-import javax.xml.transform.Source;
-
-import com.sun.xml.internal.messaging.saaj.soap.*;
-import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-import com.sun.xml.internal.messaging.saaj.util.XMLDeclarationParser;
-
-public class SOAPPart1_1Impl extends SOAPPartImpl implements SOAPConstants {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_VER1_1_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
-
- public SOAPPart1_1Impl() {
- super();
- }
-
- public SOAPPart1_1Impl(MessageImpl message) {
- super(message);
- }
-
- protected String getContentType() {
- return isFastInfoset() ? "application/fastinfoset" : "text/xml";
- }
-
- protected Envelope createEnvelopeFromSource() throws SOAPException {
- // Record the presence of xml declaration before the envelope gets
- // created.
- XMLDeclarationParser parser = lookForXmlDecl();
- Source tmp = source;
- source = null;
- EnvelopeImpl envelope =
- (EnvelopeImpl) EnvelopeFactory.createEnvelope(tmp, this);
-
- if (!envelope.getNamespaceURI().equals(SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE)) {
- log.severe("SAAJ0304.ver1_1.msg.invalid.SOAP1.1");
- throw new SOAPException("InputStream does not represent a valid SOAP 1.1 Message");
- }
-
- if (parser != null && !omitXmlDecl) {
- envelope.setOmitXmlDecl("no");
- envelope.setXmlDecl(parser.getXmlDeclaration());
- envelope.setCharsetEncoding(parser.getEncoding());
- }
- return envelope;
- }
-
- protected Envelope createEmptyEnvelope(String prefix)
- throws SOAPException {
- return new Envelope1_1Impl(getDocument(), prefix, true, true);
- }
-
- protected SOAPPartImpl duplicateType() {
- return new SOAPPart1_1Impl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java
deleted file mode 100644
index 78ea0936..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Body1_2Impl.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
-
-import java.util.logging.Logger;
-import java.util.Locale;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import org.w3c.dom.Node;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.BodyImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public class Body1_2Impl extends BodyImpl {
-
- protected static final Logger log =
- Logger.getLogger(Body1_2Impl.class.getName(),
- "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
-
- public Body1_2Impl(SOAPDocumentImpl ownerDocument, String prefix) {
- super(ownerDocument, NameImpl.createBody1_2Name(prefix));
- }
-
- protected NameImpl getFaultName(String name) {
- return NameImpl.createFault1_2Name(name, null);
- }
-
- protected SOAPBodyElement createBodyElement(Name name) {
- return new BodyElement1_2Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name);
- }
- protected SOAPBodyElement createBodyElement(QName name) {
- return new BodyElement1_2Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name);
- }
-
- protected QName getDefaultFaultCode() {
- return SOAPConstants.SOAP_RECEIVER_FAULT;
- }
-
- public SOAPFault addFault() throws SOAPException {
- if (hasAnyChildElement()) {
- log.severe("SAAJ0402.ver1_2.only.fault.allowed.in.body");
- throw new SOAPExceptionImpl(
- "No other element except Fault allowed in SOAPBody");
- }
- return super.addFault();
- }
-
- /*
- * Override setEncodingStyle of ElementImpl to restrict adding encodingStyle
- * attribute to SOAP Body (SOAP 1.2 spec, part 1, section 5.1.1)
- */
- public void setEncodingStyle(String encodingStyle) throws SOAPException {
- log.severe("SAAJ0401.ver1_2.no.encodingstyle.in.body");
- throw new SOAPExceptionImpl("encodingStyle attribute cannot appear on Body");
- }
-
- /*
- * Override addAttribute of ElementImpl to restrict adding encodingStyle
- * attribute to SOAP Body (SOAP 1.2 spec, part 1, section 5.1.1)
- */
- public SOAPElement addAttribute(Name name, String value)
- throws SOAPException {
- if (name.getLocalName().equals("encodingStyle")
- && name.getURI().equals(NameImpl.SOAP12_NAMESPACE)) {
-
- setEncodingStyle(value);
- }
- return super.addAttribute(name, value);
- }
-
- public SOAPElement addAttribute(QName name, String value)
- throws SOAPException {
- if (name.getLocalPart().equals("encodingStyle")
- && name.getNamespaceURI().equals(NameImpl.SOAP12_NAMESPACE)) {
-
- setEncodingStyle(value);
- }
- return super.addAttribute(name, value);
- }
-
- protected boolean isFault(SOAPElement child) {
- return (child.getElementName().getURI().equals(
- SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE) &&
- child.getElementName().getLocalName().equals(
- "Fault"));
- }
-
- protected SOAPFault createFaultElement() {
- return new Fault1_2Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(), getPrefix());
- }
-
- /*
- * section 5.4 of SOAP1.2 candidate recommendation says that a
- * SOAP message MUST contain a single Fault element as the only
- * child element of the SOAP Body.
- */
- public SOAPBodyElement addBodyElement(Name name) throws SOAPException {
- if (hasFault()) {
- log.severe("SAAJ0402.ver1_2.only.fault.allowed.in.body");
- throw new SOAPExceptionImpl(
- "No other element except Fault allowed in SOAPBody");
- }
- return super.addBodyElement(name);
- }
-
- public SOAPBodyElement addBodyElement(QName name) throws SOAPException {
- if (hasFault()) {
- log.severe("SAAJ0402.ver1_2.only.fault.allowed.in.body");
- throw new SOAPExceptionImpl(
- "No other element except Fault allowed in SOAPBody");
- }
- return super.addBodyElement(name);
- }
-
- protected SOAPElement addElement(Name name) throws SOAPException {
- if (hasFault()) {
- log.severe("SAAJ0402.ver1_2.only.fault.allowed.in.body");
- throw new SOAPExceptionImpl(
- "No other element except Fault allowed in SOAPBody");
- }
- return super.addElement(name);
- }
-
- protected SOAPElement addElement(QName name) throws SOAPException {
- if (hasFault()) {
- log.severe("SAAJ0402.ver1_2.only.fault.allowed.in.body");
- throw new SOAPExceptionImpl(
- "No other element except Fault allowed in SOAPBody");
- }
- return super.addElement(name);
- }
-
- public SOAPElement addChildElement(Name name) throws SOAPException {
- if (hasFault()) {
- log.severe("SAAJ0402.ver1_2.only.fault.allowed.in.body");
- throw new SOAPExceptionImpl(
- "No other element except Fault allowed in SOAPBody");
- }
- return super.addChildElement(name);
- }
-
- public SOAPElement addChildElement(QName name) throws SOAPException {
- if (hasFault()) {
- log.severe("SAAJ0402.ver1_2.only.fault.allowed.in.body");
- throw new SOAPExceptionImpl(
- "No other element except Fault allowed in SOAPBody");
- }
- return super.addChildElement(name);
- }
-
- private boolean hasAnyChildElement() {
- Node currentNode = getFirstChild();
- while (currentNode != null) {
- if (currentNode.getNodeType() == Node.ELEMENT_NODE)
- return true;
- currentNode = currentNode.getNextSibling();
- }
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/BodyElement1_2Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/BodyElement1_2Impl.java
deleted file mode 100644
index 0dd44608..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/BodyElement1_2Impl.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPElement;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.BodyElementImpl;
-
-public class BodyElement1_2Impl extends BodyElementImpl {
-
- public BodyElement1_2Impl(SOAPDocumentImpl ownerDoc, Name qname) {
- super(ownerDoc, qname);
- }
-
- public BodyElement1_2Impl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- BodyElementImpl copy =
- new BodyElement1_2Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
- return replaceElementWithSOAPElement(this,copy);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java
deleted file mode 100644
index 33ab8795..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Detail1_2Impl.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
-
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.DetailImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public class Detail1_2Impl extends DetailImpl {
-
- protected static final Logger log =
- Logger.getLogger(Detail1_2Impl.class.getName(),
- "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
-
- public Detail1_2Impl(SOAPDocumentImpl ownerDocument, String prefix) {
- super(ownerDocument, NameImpl.createSOAP12Name("Detail", prefix));
- }
-
- public Detail1_2Impl(SOAPDocumentImpl ownerDocument) {
- super(ownerDocument, NameImpl.createSOAP12Name("Detail"));
- }
-
- protected DetailEntry createDetailEntry(Name name) {
- return new DetailEntry1_2Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name);
- }
-
- protected DetailEntry createDetailEntry(QName name) {
- return new DetailEntry1_2Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name);
- }
-
- /*
- * Override setEncodingStyle of ElementImpl to restrict adding encodingStyle
- * attribute to SOAP Detail (SOAP 1.2 spec, part 1, section 5.1.1)
- */
- public void setEncodingStyle(String encodingStyle) throws SOAPException {
- log.severe("SAAJ0403.ver1_2.no.encodingStyle.in.detail");
- throw new SOAPExceptionImpl("EncodingStyle attribute cannot appear in Detail");
- }
-
- public SOAPElement addAttribute(Name name, String value)
- throws SOAPException {
- if (name.getLocalName().equals("encodingStyle")
- && name.getURI().equals(NameImpl.SOAP12_NAMESPACE)) {
- setEncodingStyle(value);
- }
- return super.addAttribute(name, value);
- }
-
- public SOAPElement addAttribute(QName name, String value)
- throws SOAPException {
- if (name.getLocalPart().equals("encodingStyle")
- && name.getNamespaceURI().equals(NameImpl.SOAP12_NAMESPACE)) {
- setEncodingStyle(value);
- }
- return super.addAttribute(name, value);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/DetailEntry1_2Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/DetailEntry1_2Impl.java
deleted file mode 100644
index 1088d355..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/DetailEntry1_2Impl.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPElement;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.DetailEntryImpl;
-
-public class DetailEntry1_2Impl extends DetailEntryImpl {
-
- public DetailEntry1_2Impl(SOAPDocumentImpl ownerDoc, Name qname) {
- super(ownerDoc, qname);
- }
-
- public DetailEntry1_2Impl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- DetailEntryImpl copy =
- new DetailEntry1_2Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
- return replaceElementWithSOAPElement(this,copy);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java
deleted file mode 100644
index 6506b8e8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Envelope1_2Impl.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
-
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public class Envelope1_2Impl extends EnvelopeImpl {
-
- protected static final Logger log =
- Logger.getLogger(Envelope1_2Impl.class.getName(),
- "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
-
- public Envelope1_2Impl(SOAPDocumentImpl ownerDoc, String prefix) {
- super(ownerDoc, NameImpl.createEnvelope1_2Name(prefix));
- }
-
- public Envelope1_2Impl(
- SOAPDocumentImpl ownerDoc,
- String prefix,
- boolean createHeader,
- boolean createBody)
- throws SOAPException {
- super(
- ownerDoc,
- NameImpl.createEnvelope1_2Name(prefix),
- createHeader,
- createBody);
- }
-
- protected NameImpl getBodyName(String prefix) {
- return NameImpl.createBody1_2Name(prefix);
- }
-
- protected NameImpl getHeaderName(String prefix) {
- return NameImpl.createHeader1_2Name(prefix);
- }
-
- /*
- * Override setEncodingStyle of ElementImpl to restrict adding encodingStyle
- * attribute to SOAP Envelope (SOAP 1.2 spec, part 1, section 5.1.1)
- */
- public void setEncodingStyle(String encodingStyle) throws SOAPException {
- log.severe("SAAJ0404.ver1_2.no.encodingStyle.in.envelope");
- throw new SOAPExceptionImpl("encodingStyle attribute cannot appear on Envelope");
- }
-
- /*
- * Override addAttribute of ElementImpl to restrict adding encodingStyle
- * attribute to SOAP Envelope (SOAP 1.2 spec, part 1, section 5.1.1)
- */
- public SOAPElement addAttribute(Name name, String value)
- throws SOAPException {
- if (name.getLocalName().equals("encodingStyle")
- && name.getURI().equals(SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE)) {
- setEncodingStyle(value);
- }
- return super.addAttribute(name, value);
- }
-
- public SOAPElement addAttribute(QName name, String value)
- throws SOAPException {
- if (name.getLocalPart().equals("encodingStyle")
- && name.getNamespaceURI().equals(SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE)) {
- setEncodingStyle(value);
- }
- return super.addAttribute(name, value);
- }
-
-
- /*
- * Override addChildElement method to ensure that no element
- * is added after body in SOAP 1.2.
- */
- public SOAPElement addChildElement(Name name) throws SOAPException {
- // check if body already exists
- if (getBody() != null) {
- log.severe("SAAJ0405.ver1_2.body.must.last.in.envelope");
- throw new SOAPExceptionImpl(
- "Body must be the last element in" + " SOAP Envelope");
- }
- return super.addChildElement(name);
- }
-
- public SOAPElement addChildElement(QName name) throws SOAPException {
- // check if body already exists
- if (getBody() != null) {
- log.severe("SAAJ0405.ver1_2.body.must.last.in.envelope");
- throw new SOAPExceptionImpl(
- "Body must be the last element in" + " SOAP Envelope");
- }
- return super.addChildElement(name);
- }
-
-
- /*
- * Ideally we should be overriding other addChildElement() methods as well
- * but we are not adding them here since internally all those call the
- * method addChildElement(Name name).
- * In future, if this behaviour changes, then we would need to override
- * all the rest of them as well.
- *
- */
-
- public SOAPElement addTextNode(String text) throws SOAPException {
- log.log(
- Level.SEVERE,
- "SAAJ0416.ver1_2.adding.text.not.legal",
- getElementQName());
- throw new SOAPExceptionImpl("Adding text to SOAP 1.2 Envelope is not legal");
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java
deleted file mode 100644
index a2f9d799..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Fault1_2Impl.java
+++ /dev/null
@@ -1,562 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
-
-import java.util.*;
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.*;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-
-public class Fault1_2Impl extends FaultImpl {
-
- protected static final Logger log =
- Logger.getLogger(
- LogDomainConstants.SOAP_VER1_2_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
-
- private static final QName textName =
- new QName(SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE, "Text");
- private final QName valueName =
- new QName(SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE, "Value", getPrefix());
- private final QName subcodeName =
- new QName(SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE, "Subcode", getPrefix());
-
- private SOAPElement innermostSubCodeElement = null;
-
- public Fault1_2Impl(SOAPDocumentImpl ownerDoc, String name, String prefix) {
- super(ownerDoc, NameImpl.createFault1_2Name(name, prefix));
- }
-
- public Fault1_2Impl(SOAPDocumentImpl ownerDocument, String prefix) {
- super(ownerDocument, NameImpl.createFault1_2Name(null, prefix));
- }
-
- protected NameImpl getDetailName() {
- return NameImpl.createSOAP12Name("Detail", getPrefix());
- }
-
- protected NameImpl getFaultCodeName() {
- return NameImpl.createSOAP12Name("Code", getPrefix());
- }
-
- protected NameImpl getFaultStringName() {
- return getFaultReasonName();
- }
-
- protected NameImpl getFaultActorName() {
- return getFaultRoleName();
- }
-
- private NameImpl getFaultRoleName() {
- return NameImpl.createSOAP12Name("Role", getPrefix());
- }
-
- private NameImpl getFaultReasonName() {
- return NameImpl.createSOAP12Name("Reason", getPrefix());
- }
-
- private NameImpl getFaultReasonTextName() {
- return NameImpl.createSOAP12Name("Text", getPrefix());
- }
-
- private NameImpl getFaultNodeName() {
- return NameImpl.createSOAP12Name("Node", getPrefix());
- }
-
- private static NameImpl getXmlLangName() {
- return NameImpl.createXmlName("lang");
- }
-
- protected DetailImpl createDetail() {
- return new Detail1_2Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument());
- }
-
- protected FaultElementImpl createSOAPFaultElement(String localName) {
- return new FaultElement1_2Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- localName);
- }
-
- protected void checkIfStandardFaultCode(String faultCode, String uri)
- throws SOAPException {
- QName qname = new QName(uri, faultCode);
- if (SOAPConstants.SOAP_DATAENCODINGUNKNOWN_FAULT.equals(qname) ||
- SOAPConstants.SOAP_MUSTUNDERSTAND_FAULT.equals(qname) ||
- SOAPConstants.SOAP_RECEIVER_FAULT.equals(qname) ||
- SOAPConstants.SOAP_SENDER_FAULT.equals(qname) ||
- SOAPConstants.SOAP_VERSIONMISMATCH_FAULT.equals(qname))
- return;
- log.log(
- Level.SEVERE,
- "SAAJ0435.ver1_2.code.not.standard",
- qname);
- throw new SOAPExceptionImpl(qname + " is not a standard Code value");
- }
-
- protected void finallySetFaultCode(String faultcode) throws SOAPException {
- SOAPElement value = this.faultCodeElement.addChildElement(valueName);
- value.addTextNode(faultcode);
- }
-
- private void findReasonElement() {
- findFaultStringElement();
- }
-
- public Iterator getFaultReasonTexts() throws SOAPException {
- // Fault Reason has similar semantics as faultstring
- if (this.faultStringElement == null)
- findReasonElement();
- Iterator eachTextElement =
- this.faultStringElement.getChildElements(textName);
- List texts = new ArrayList();
- while (eachTextElement.hasNext()) {
- SOAPElement textElement = (SOAPElement) eachTextElement.next();
- Locale thisLocale = getLocale(textElement);
- if (thisLocale == null) {
- log.severe("SAAJ0431.ver1_2.xml.lang.missing");
- throw new SOAPExceptionImpl("\"xml:lang\" attribute is not present on the Text element");
- }
- texts.add(textElement.getValue());
- }
- if (texts.isEmpty()) {
- log.severe("SAAJ0434.ver1_2.text.element.not.present");
- throw new SOAPExceptionImpl("env:Text must be present inside env:Reason");
- }
- return texts.iterator();
- }
-
- public void addFaultReasonText(String text, java.util.Locale locale)
- throws SOAPException {
-
- if (locale == null) {
- log.severe("SAAJ0430.ver1_2.locale.required");
- throw new SOAPException("locale is required and must not be null");
- }
-
- // Fault Reason has similar semantics as faultstring
- if (this.faultStringElement == null)
- findReasonElement();
- SOAPElement reasonText;
-
- if (this.faultStringElement == null) {
- this.faultStringElement = addSOAPFaultElement("Reason");
- reasonText =
- this.faultStringElement.addChildElement(
- getFaultReasonTextName());
- } else {
- removeDefaultFaultString();
- reasonText = getFaultReasonTextElement(locale);
- if (reasonText != null) {
- reasonText.removeContents();
- } else {
- reasonText =
- this.faultStringElement.addChildElement(
- getFaultReasonTextName());
- }
- }
-
- String xmlLang = localeToXmlLang(locale);
- reasonText.addAttribute(getXmlLangName(), xmlLang);
- reasonText.addTextNode(text);
- }
-
- private void removeDefaultFaultString() throws SOAPException {
- SOAPElement reasonText = getFaultReasonTextElement(Locale.getDefault());
- if (reasonText != null) {
- String defaultFaultString =
- "Fault string, and possibly fault code, not set";
- if (defaultFaultString.equals(reasonText.getValue())) {
- reasonText.detachNode();
- }
- }
- }
-
- public String getFaultReasonText(Locale locale) throws SOAPException {
-
- if (locale == null)
- return null;
-
- // Fault Reason has similar semantics as faultstring
- if (this.faultStringElement == null)
- findReasonElement();
-
- if (this.faultStringElement != null) {
- SOAPElement textElement = getFaultReasonTextElement(locale);
- if (textElement != null) {
- textElement.normalize();
- return textElement.getFirstChild().getNodeValue();
- }
- }
-
- return null;
- }
-
- public Iterator getFaultReasonLocales() throws SOAPException {
- // Fault Reason has similar semantics as faultstring
- if (this.faultStringElement == null)
- findReasonElement();
- Iterator eachTextElement =
- this.faultStringElement.getChildElements(textName);
- List localeSet = new ArrayList();
- while (eachTextElement.hasNext()) {
- SOAPElement textElement = (SOAPElement) eachTextElement.next();
- Locale thisLocale = getLocale(textElement);
- if (thisLocale == null) {
- log.severe("SAAJ0431.ver1_2.xml.lang.missing");
- throw new SOAPExceptionImpl("\"xml:lang\" attribute is not present on the Text element");
- }
- localeSet.add(thisLocale);
- }
- if (localeSet.isEmpty()) {
- log.severe("SAAJ0434.ver1_2.text.element.not.present");
- throw new SOAPExceptionImpl("env:Text elements with mandatory xml:lang attributes must be present inside env:Reason");
- }
- return localeSet.iterator();
- }
-
- public Locale getFaultStringLocale() {
- Locale locale = null;
- try {
- locale = (Locale) getFaultReasonLocales().next();
- } catch (SOAPException e) {}
- return locale;
- }
-
- /*
- * This method assumes that locale and faultStringElement are non-null
- */
- private SOAPElement getFaultReasonTextElement(Locale locale)
- throws SOAPException {
-
- // Fault Reason has similar semantics as faultstring
- Iterator eachTextElement =
- this.faultStringElement.getChildElements(textName);
- while (eachTextElement.hasNext()) {
- SOAPElement textElement = (SOAPElement) eachTextElement.next();
- Locale thisLocale = getLocale(textElement);
- if (thisLocale == null) {
- log.severe("SAAJ0431.ver1_2.xml.lang.missing");
- throw new SOAPExceptionImpl("\"xml:lang\" attribute is not present on the Text element");
- }
- if (thisLocale.equals(locale)) {
- return textElement;
- }
- }
- return null;
- }
-
- public String getFaultNode() {
- SOAPElement faultNode = findChild(getFaultNodeName());
- if (faultNode == null) {
- return null;
- }
- return faultNode.getValue();
- }
-
- public void setFaultNode(String uri) throws SOAPException {
- SOAPElement faultNode = findChild(getFaultNodeName());
- if (faultNode != null) {
- faultNode.detachNode();
- }
- faultNode = createSOAPFaultElement(getFaultNodeName());
- faultNode = faultNode.addTextNode(uri);
- if (getFaultRole() != null) {
- insertBefore(faultNode, this.faultActorElement);
- return;
- }
- if (hasDetail()) {
- insertBefore(faultNode, this.detail);
- return;
- }
- addNode(faultNode);
- }
-
- public String getFaultRole() {
- return getFaultActor();
- }
-
- public void setFaultRole(String uri) throws SOAPException {
- if (this.faultActorElement == null)
- findFaultActorElement();
- if (this.faultActorElement != null)
- this.faultActorElement.detachNode();
- this.faultActorElement =
- createSOAPFaultElement(getFaultActorName());
- this.faultActorElement.addTextNode(uri);
- if (hasDetail()) {
- insertBefore(this.faultActorElement, this.detail);
- return;
- }
- addNode(this.faultActorElement);
- }
-
- public String getFaultCode() {
- if (this.faultCodeElement == null)
- findFaultCodeElement();
- Iterator codeValues =
- this.faultCodeElement.getChildElements(valueName);
- return ((SOAPElement) codeValues.next()).getValue();
- }
-
- public QName getFaultCodeAsQName() {
- String faultcode = getFaultCode();
- if (faultcode == null) {
- return null;
- }
- if (this.faultCodeElement == null)
- findFaultCodeElement();
- Iterator valueElements =
- this.faultCodeElement.getChildElements(valueName);
- return convertCodeToQName(
- faultcode,
- (SOAPElement) valueElements.next());
- }
-
- public Name getFaultCodeAsName() {
- String faultcode = getFaultCode();
- if (faultcode == null) {
- return null;
- }
- if (this.faultCodeElement == null)
- findFaultCodeElement();
- Iterator valueElements =
- this.faultCodeElement.getChildElements(valueName);
- return NameImpl.convertToName(
- convertCodeToQName(
- faultcode,
- (SOAPElement) valueElements.next()));
- }
-
- public String getFaultString() {
- String reason = null;
- try {
- //reason = getFaultReasonText(Locale.getDefault());
- //if (reason == null)
- reason = (String) getFaultReasonTexts().next();
- } catch (SOAPException e) {}
- return reason;
- }
-
- public void setFaultString(String faultString) throws SOAPException {
- addFaultReasonText(faultString, Locale.getDefault());
- }
-
- public void setFaultString(
- String faultString,
- Locale locale)
- throws SOAPException {
- addFaultReasonText(faultString, locale);
- }
-
- public void appendFaultSubcode(QName subcode) throws SOAPException {
- if (subcode == null) {
- return;
- }
- if (subcode.getNamespaceURI() == null ||
- "".equals(subcode.getNamespaceURI())) {
-
- log.severe("SAAJ0432.ver1_2.subcode.not.ns.qualified");
- throw new SOAPExceptionImpl("A Subcode must be namespace-qualified");
- }
- if (innermostSubCodeElement == null) {
- if (faultCodeElement == null)
- findFaultCodeElement();
- innermostSubCodeElement = faultCodeElement;
- }
- String prefix = null;
- if (subcode.getPrefix() == null || "".equals(subcode.getPrefix())) {
- prefix =
- ((ElementImpl) innermostSubCodeElement).getNamespacePrefix(
- subcode.getNamespaceURI());
- } else
- prefix = subcode.getPrefix();
- if (prefix == null || "".equals(prefix)) {
- prefix = "ns1";
- }
- innermostSubCodeElement =
- innermostSubCodeElement.addChildElement(subcodeName);
- SOAPElement subcodeValueElement =
- innermostSubCodeElement.addChildElement(valueName);
- ((ElementImpl) subcodeValueElement).ensureNamespaceIsDeclared(
- prefix,
- subcode.getNamespaceURI());
- subcodeValueElement.addTextNode(prefix + ":" + subcode.getLocalPart());
- }
-
- public void removeAllFaultSubcodes() {
- if (this.faultCodeElement == null)
- findFaultCodeElement();
- Iterator subcodeElements =
- this.faultCodeElement.getChildElements(subcodeName);
- if (subcodeElements.hasNext()) {
- SOAPElement subcode = (SOAPElement) subcodeElements.next();
- subcode.detachNode();
- }
- }
-
- public Iterator getFaultSubcodes() {
- if (this.faultCodeElement == null)
- findFaultCodeElement();
- final List subcodeList = new ArrayList();
- SOAPElement currentCodeElement = this.faultCodeElement;
- Iterator subcodeElements =
- currentCodeElement.getChildElements(subcodeName);
- while (subcodeElements.hasNext()) {
- currentCodeElement = (ElementImpl) subcodeElements.next();
- Iterator valueElements =
- currentCodeElement.getChildElements(valueName);
- SOAPElement valueElement = (SOAPElement) valueElements.next();
- String code = valueElement.getValue();
- subcodeList.add(convertCodeToQName(code, valueElement));
- subcodeElements = currentCodeElement.getChildElements(subcodeName);
- }
- //return subcodeList.iterator();
- return new Iterator() {
- Iterator subCodeIter = subcodeList.iterator();
-
- public boolean hasNext() {
- return subCodeIter.hasNext();
- }
-
- public Object next() {
- return subCodeIter.next();
- }
-
- public void remove() {
- throw new UnsupportedOperationException(
- "Method remove() not supported on SubCodes Iterator");
- }
- };
- }
-
- private static Locale getLocale(SOAPElement reasonText) {
- return xmlLangToLocale(reasonText.getAttributeValue(getXmlLangName()));
- }
-
- /*
- * Override setEncodingStyle of ElementImpl to restrict adding encodingStyle
- * attribute to SOAP Fault (SOAP 1.2 spec, part 1, section 5.1.1)
- */
- public void setEncodingStyle(String encodingStyle) throws SOAPException {
- log.severe("SAAJ0407.ver1_2.no.encodingStyle.in.fault");
- throw new SOAPExceptionImpl("encodingStyle attribute cannot appear on Fault");
- }
-
- public SOAPElement addAttribute(Name name, String value)
- throws SOAPException {
- if (name.getLocalName().equals("encodingStyle")
- && name.getURI().equals(NameImpl.SOAP12_NAMESPACE)) {
- setEncodingStyle(value);
- }
- return super.addAttribute(name, value);
- }
-
- public SOAPElement addAttribute(QName name, String value)
- throws SOAPException {
- if (name.getLocalPart().equals("encodingStyle")
- && name.getNamespaceURI().equals(NameImpl.SOAP12_NAMESPACE)) {
- setEncodingStyle(value);
- }
- return super.addAttribute(name, value);
- }
-
- public SOAPElement addTextNode(String text) throws SOAPException {
- log.log(
- Level.SEVERE,
- "SAAJ0416.ver1_2.adding.text.not.legal",
- getElementQName());
- throw new SOAPExceptionImpl("Adding text to SOAP 1.2 Fault is not legal");
- }
-
- public SOAPElement addChildElement(SOAPElement element)
- throws SOAPException {
- String localName = element.getLocalName();
- if ("Detail".equalsIgnoreCase(localName)) {
- if (hasDetail()) {
- log.severe("SAAJ0436.ver1_2.detail.exists.error");
- throw new SOAPExceptionImpl("Cannot add Detail, Detail already exists");
- }
- String uri = element.getElementQName().getNamespaceURI();
- if (!uri.equals(SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE)) {
- log.severe("SAAJ0437.ver1_2.version.mismatch.error");
- throw new SOAPExceptionImpl("Cannot add Detail, Incorrect SOAP version specified for Detail element");
- }
- }
- if (element instanceof Detail1_2Impl) {
- ElementImpl importedElement = (ElementImpl) importElement(element);
- addNode(importedElement);
- return convertToSoapElement(importedElement);
- } else
- return super.addChildElement(element);
- }
-
- protected boolean isStandardFaultElement(String localName) {
- if (localName.equalsIgnoreCase("code") ||
- localName.equalsIgnoreCase("reason") ||
- localName.equalsIgnoreCase("node") ||
- localName.equalsIgnoreCase("role") ||
- localName.equalsIgnoreCase("detail")) {
- return true;
- }
- return false;
- }
-
- protected QName getDefaultFaultCode() {
- return SOAPConstants.SOAP_SENDER_FAULT;
- }
-
- protected FaultElementImpl createSOAPFaultElement(QName qname) {
- return new FaultElement1_2Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- qname);
- }
-
- protected FaultElementImpl createSOAPFaultElement(Name qname) {
- return new FaultElement1_2Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- (NameImpl)qname);
- }
-
- public void setFaultActor(String faultActor) throws SOAPException {
- this.setFaultRole(faultActor);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/FaultElement1_2Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/FaultElement1_2Impl.java
deleted file mode 100644
index 6d428791..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/FaultElement1_2Impl.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.Name;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.FaultElementImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-
-public class FaultElement1_2Impl extends FaultElementImpl {
-
- public FaultElement1_2Impl(SOAPDocumentImpl ownerDoc, NameImpl qname) {
- super(ownerDoc, qname);
- }
-
- public FaultElement1_2Impl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
-
- public FaultElement1_2Impl(SOAPDocumentImpl ownerDoc, String localName) {
- super(ownerDoc, NameImpl.createSOAP12Name(localName));
- }
-
- protected boolean isStandardFaultElement() {
- String localName = elementQName.getLocalPart();
- if (localName.equalsIgnoreCase("code") ||
- localName.equalsIgnoreCase("reason") ||
- localName.equalsIgnoreCase("node") ||
- localName.equalsIgnoreCase("role")) {
- return true;
- }
- return false;
- }
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- if (!isStandardFaultElement()) {
- FaultElement1_2Impl copy =
- new FaultElement1_2Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
- return replaceElementWithSOAPElement(this,copy);
- } else {
- return super.setElementQName(newName);
- }
- }
-
- public void setEncodingStyle(String encodingStyle) throws SOAPException {
- log.severe("SAAJ0408.ver1_2.no.encodingStyle.in.fault.child");
- throw new SOAPExceptionImpl("encodingStyle attribute cannot appear on a Fault child element");
- }
-
- public SOAPElement addAttribute(Name name, String value)
- throws SOAPException {
- if (name.getLocalName().equals("encodingStyle")
- && name.getURI().equals(NameImpl.SOAP12_NAMESPACE)) {
- setEncodingStyle(value);
- }
- return super.addAttribute(name, value);
- }
-
- public SOAPElement addAttribute(QName name, String value)
- throws SOAPException {
- if (name.getLocalPart().equals("encodingStyle")
- && name.getNamespaceURI().equals(NameImpl.SOAP12_NAMESPACE)) {
- setEncodingStyle(value);
- }
- return super.addAttribute(name, value);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java
deleted file mode 100644
index 2d38f82d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Header1_2Impl.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
-
-import java.util.List;
-import java.util.Iterator;
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderElementImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-
-public class Header1_2Impl extends HeaderImpl {
-
- protected static final Logger log =
- Logger.getLogger(
- LogDomainConstants.SOAP_VER1_2_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
-
- public Header1_2Impl(SOAPDocumentImpl ownerDocument, String prefix) {
- super(ownerDocument, NameImpl.createHeader1_2Name(prefix));
- }
-
- protected NameImpl getNotUnderstoodName() {
- return NameImpl.createNotUnderstood1_2Name(null);
- }
-
- protected NameImpl getUpgradeName() {
- return NameImpl.createUpgrade1_2Name(null);
- }
-
- protected NameImpl getSupportedEnvelopeName() {
- return NameImpl.createSupportedEnvelope1_2Name(null);
- }
-
- public SOAPHeaderElement addNotUnderstoodHeaderElement(final QName sourceName)
- throws SOAPException {
-
- if (sourceName == null) {
- log.severe("SAAJ0410.ver1_2.no.null.to.addNotUnderstoodHeader");
- throw new SOAPException("Cannot pass NULL to addNotUnderstoodHeaderElement");
- }
- if ("".equals(sourceName.getNamespaceURI())) {
- log.severe("SAAJ0417.ver1_2.qname.not.ns.qualified");
- throw new SOAPException("The qname passed to addNotUnderstoodHeaderElement must be namespace-qualified");
- }
- String prefix = sourceName.getPrefix();
- if ("".equals(prefix)) {
- prefix = "ns1";
- }
- Name notunderstoodName = getNotUnderstoodName();
- SOAPHeaderElement notunderstoodHeaderElement =
- (SOAPHeaderElement) addChildElement(notunderstoodName);
- notunderstoodHeaderElement.addAttribute(
- NameImpl.createFromUnqualifiedName("qname"),
- getQualifiedName(
- new QName(
- sourceName.getNamespaceURI(),
- sourceName.getLocalPart(),
- prefix)));
- notunderstoodHeaderElement.addNamespaceDeclaration(
- prefix,
- sourceName.getNamespaceURI());
- return notunderstoodHeaderElement;
- }
-
- public SOAPElement addTextNode(String text) throws SOAPException {
- log.log(
- Level.SEVERE,
- "SAAJ0416.ver1_2.adding.text.not.legal",
- getElementQName());
- throw new SOAPExceptionImpl("Adding text to SOAP 1.2 Header is not legal");
- }
-
- protected SOAPHeaderElement createHeaderElement(Name name)
- throws SOAPException {
- String uri = name.getURI();
- if (uri == null || uri.equals("")) {
- log.severe("SAAJ0413.ver1_2.header.elems.must.be.ns.qualified");
- throw new SOAPExceptionImpl("SOAP 1.2 header elements must be namespace qualified");
- }
- return new HeaderElement1_2Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name);
- }
-
- protected SOAPHeaderElement createHeaderElement(QName name)
- throws SOAPException {
- String uri = name.getNamespaceURI();
- if (uri == null || uri.equals("")) {
- log.severe("SAAJ0413.ver1_2.header.elems.must.be.ns.qualified");
- throw new SOAPExceptionImpl("SOAP 1.2 header elements must be namespace qualified");
- }
- return new HeaderElement1_2Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name);
- }
-
- public void setEncodingStyle(String encodingStyle) throws SOAPException {
- log.severe("SAAJ0409.ver1_2.no.encodingstyle.in.header");
- throw new SOAPExceptionImpl("encodingStyle attribute cannot appear on Header");
- }
-
- public SOAPElement addAttribute(Name name, String value)
- throws SOAPException {
- if (name.getLocalName().equals("encodingStyle")
- && name.getURI().equals(NameImpl.SOAP12_NAMESPACE)) {
-
- setEncodingStyle(value);
- }
- return super.addAttribute(name, value);
- }
-
- public SOAPElement addAttribute(QName name, String value)
- throws SOAPException {
- if (name.getLocalPart().equals("encodingStyle")
- && name.getNamespaceURI().equals(NameImpl.SOAP12_NAMESPACE)) {
-
- setEncodingStyle(value);
- }
- return super.addAttribute(name, value);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java
deleted file mode 100644
index f7f7bc9a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/HeaderElement1_2Impl.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
-
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.HeaderElementImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public class HeaderElement1_2Impl extends HeaderElementImpl {
-
- private static final Logger log =
- Logger.getLogger(HeaderElement1_2Impl.class.getName(),
- "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
-
- public HeaderElement1_2Impl(SOAPDocumentImpl ownerDoc, Name qname) {
- super(ownerDoc, qname);
- }
- public HeaderElement1_2Impl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- HeaderElementImpl copy =
- new HeaderElement1_2Impl((SOAPDocumentImpl)getOwnerDocument(), newName);
- return replaceElementWithSOAPElement(this,copy);
- }
-
- protected NameImpl getRoleAttributeName() {
- return NameImpl.create("role", null, NameImpl.SOAP12_NAMESPACE);
- }
-
- // Actor equivalent to Role in SOAP 1.2
- protected NameImpl getActorAttributeName() {
- return getRoleAttributeName();
- }
-
- protected NameImpl getMustunderstandAttributeName() {
- return NameImpl.create("mustUnderstand", null, NameImpl.SOAP12_NAMESPACE);
- }
-
- // mustUnderstand attribute has literal value "true" or "false"
- protected String getMustunderstandLiteralValue(boolean mustUnderstand) {
- return (mustUnderstand == true ? "true" : "false");
- }
-
- protected boolean getMustunderstandAttributeValue(String mu) {
- if (mu.equals("true") || mu.equals("1"))
- return true;
- return false;
- }
-
- protected NameImpl getRelayAttributeName() {
- return NameImpl.create("relay", null, NameImpl.SOAP12_NAMESPACE);
- }
-
- //relay attribute has literal value "true" or "false"
- protected String getRelayLiteralValue(boolean relay) {
- return (relay == true ? "true" : "false");
- }
-
- protected boolean getRelayAttributeValue(String relay) {
- if (relay.equals("true") || relay.equals("1"))
- return true;
- return false;
- }
-
- protected String getActorOrRole() {
- return getRole();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings.properties
deleted file mode 100644
index 9d8a00c2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings.properties
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_2 pkg
-
-SAAJ0401.ver1_2.no.encodingstyle.in.body=SAAJ0401: encodingStyle attribute cannot appear on Body
-SAAJ0402.ver1_2.only.fault.allowed.in.body=SAAJ0402: No other element except Fault allowed in SOAPBody
-SAAJ0403.ver1_2.no.encodingStyle.in.detail=SAAJ0403: encodingStyle attribute cannot appear on Detail
-SAAJ0404.ver1_2.no.encodingStyle.in.envelope=SAAJ0404: encodingStyle attribute cannot appear on Envelope
-SAAJ0405.ver1_2.body.must.last.in.envelope=SAAJ0405: Body must be last element in SOAPEnvelope
-SAAJ0406.ver1_2.only.header.body.allowed.in.envelope=SAAJ0406: Envelope cannot contain anything other than Header and Body
-SAAJ0407.ver1_2.no.encodingStyle.in.fault=SAAJ0407: encodingStyle attribute cannot appear on Fault
-SAAJ0408.ver1_2.no.encodingStyle.in.fault.child=SAAJ0408: encodingStyle attribute cannot appear on a Fault child element
-SAAJ0409.ver1_2.no.encodingstyle.in.header=SAAJ0401: encodingStyle attribute cannot appear on Header
-SAAJ0410.ver1_2.no.null.to.addNotUnderstoodHeader=SAAJ0410: Cannot pass NULL to addNotUnderstoodHeaderElement
-SAAJ0411.ver1_2.no.null.supportedURIs=SAAJ0411: Argument cannot be null; supportedURIs cannot be null
-SAAJ0412.ver1_2.no.empty.list.of.supportedURIs=SAAJ0412: List of supported URIs cannot be empty
-SAAJ0413.ver1_2.header.elems.must.be.ns.qualified=SAAJ0413: SOAP 1.2 header elements must be namespace qualified
-#SAAJ0414.ver1_2.actor.unsupported.in.soap1.2=SAAJ0414: Actor not supported by SOAP 1.2
-SAAJ0415.ver1_2.msg.invalid.soap1.2=SAAJ0415: InputStream does not represent a valid SOAP 1.2 Message
-# {0} - element qname
-SAAJ0416.ver1_2.adding.text.not.legal=SAAJ0416: Adding text to {0} is not legal
-SAAJ0417.ver1_2.qname.not.ns.qualified=SAAJ0417: The QName passed to addNotUnderstoodHeaderElement must be namespace-qualified
-
-#SOAPFault related errors
-SAAJ0430.ver1_2.locale.required=SAAJ0430: locale is required and must not be null
-SAAJ0431.ver1_2.xml.lang.missing=SAAJ0431: "xml:lang" attribute is not present on the Text element
-SAAJ0432.ver1_2.subcode.not.ns.qualified=SAAJ0432: A Subcode must be namespace-qualified
-#SAAJ0433.ver1_2.could.not.locate.prefix.for.uri=SAAJ0433: Unable to locate prefix for namespace value {0}
-SAAJ0434.ver1_2.text.element.not.present=SAAJ0434: env:Text must be present inside env:Reason
-SAAJ0435.ver1_2.code.not.standard=SAAJ0435: {0} is not a standard Code value
-SAAJ0436.ver1_2.detail.exists.error=SAAJ0436: Cannot add Detail, Detail already exists
-SAAJ0437.ver1_2.version.mismatch.error=SAAJ0437: Incorrect SOAP version for Detail element, expected SOAP 1.2
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_de.properties
deleted file mode 100644
index 6e4b8e7e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_de.properties
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_2 pkg
-
-SAAJ0401.ver1_2.no.encodingstyle.in.body=SAAJ0401: encodingStyle-Attribut darf nicht in Nachrichtentext enthalten sein
-SAAJ0402.ver1_2.only.fault.allowed.in.body=SAAJ0402: Kein anderes Element au\u00DFer Fault in SOAPBody zul\u00E4ssig
-SAAJ0403.ver1_2.no.encodingStyle.in.detail=SAAJ0403: encodingStyle-Attribut darf nicht in Detail enthalten sein
-SAAJ0404.ver1_2.no.encodingStyle.in.envelope=SAAJ0404: encodingStyle-Attribut darf nicht in Envelope enthalten sein
-SAAJ0405.ver1_2.body.must.last.in.envelope=SAAJ0405: "Body" muss letztes Element in SOAPEnvelope sein
-SAAJ0406.ver1_2.only.header.body.allowed.in.envelope=SAAJ0406: Envelope darf nur "Header" und "Body" enthalten
-SAAJ0407.ver1_2.no.encodingStyle.in.fault=SAAJ0407: encodingStyle-Attribut darf nicht in Fault enthalten sein
-SAAJ0408.ver1_2.no.encodingStyle.in.fault.child=SAAJ0408: encodingStyle-Attribut darf nicht in einem untergeordneten "Fault"-Element enthalten sein
-SAAJ0409.ver1_2.no.encodingstyle.in.header=SAAJ0401: encodingStyle-Attribut darf nicht in "Header" enthalten sein
-SAAJ0410.ver1_2.no.null.to.addNotUnderstoodHeader=SAAJ0410: NULL kann nicht an addNotUnderstoodHeaderElement \u00FCbergeben werden
-SAAJ0411.ver1_2.no.null.supportedURIs=SAAJ0411: Argument darf nicht null sein; supportedURIs d\u00FCrfen nicht null sein
-SAAJ0412.ver1_2.no.empty.list.of.supportedURIs=SAAJ0412: Liste der unterst\u00FCtzten URIs darf nicht leer sein
-SAAJ0413.ver1_2.header.elems.must.be.ns.qualified=SAAJ0413: SOAP 1.2 Header-Elemente m\u00FCssen namespace-f\u00E4hig sein
-#SAAJ0414.ver1_2.actor.unsupported.in.soap1.2=SAAJ0414: Actor not supported by SOAP 1.2
-SAAJ0415.ver1_2.msg.invalid.soap1.2=SAAJ0415: InputStream stellt keine g\u00FCltige SOAP 1.2-Nachricht dar
-# {0} - element qname
-SAAJ0416.ver1_2.adding.text.not.legal=SAAJ0416: Hinzuf\u00FCgen von Text zu {0} ist nicht zul\u00E4ssig
-SAAJ0417.ver1_2.qname.not.ns.qualified=SAAJ0417: Der QName, der an addNotUnderstoodHeaderElement \u00FCbergeben wird, muss namespace-f\u00E4hig sein
-
-#SOAPFault related errors
-SAAJ0430.ver1_2.locale.required=SAAJ0430: Gebietsschema ist erforderlich und darf nicht null sein
-SAAJ0431.ver1_2.xml.lang.missing=SAAJ0431: "xml:lang"-Attribut ist in "Text"-Element nicht vorhanden
-SAAJ0432.ver1_2.subcode.not.ns.qualified=SAAJ0432: Ein Subcode muss namespace-f\u00E4hig sein
-#SAAJ0433.ver1_2.could.not.locate.prefix.for.uri=SAAJ0433: Unable to locate prefix for namespace value {0}
-SAAJ0434.ver1_2.text.element.not.present=SAAJ0434: env:Text muss innerhalb von env:Reason vorhanden sein
-SAAJ0435.ver1_2.code.not.standard=SAAJ0435: {0} ist kein Standardcodewert
-SAAJ0436.ver1_2.detail.exists.error=SAAJ0436: Detail kann nicht hinzugef\u00FCgt werden, Detail ist bereits vorhanden
-SAAJ0437.ver1_2.version.mismatch.error=SAAJ0437: Falsche SOAP-Version f\u00FCr Detail-Element, SOAP 1.2 erwartet
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_es.properties
deleted file mode 100644
index 3e3b3bd1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_es.properties
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_2 pkg
-
-SAAJ0401.ver1_2.no.encodingstyle.in.body=SAAJ0401: el atributo encodingStyle no puede aparecer en el cuerpo
-SAAJ0402.ver1_2.only.fault.allowed.in.body=SAAJ0402: no se permite ning\u00FAn otro elemento, aparte de Fault, en SOAPBody
-SAAJ0403.ver1_2.no.encodingStyle.in.detail=SAAJ0403: el atributo encodingStyle no puede aparecer en Detail
-SAAJ0404.ver1_2.no.encodingStyle.in.envelope=SAAJ0404: el atributo encodingStyle no puede aparecer en Envelope
-SAAJ0405.ver1_2.body.must.last.in.envelope=SAAJ0405: el cuerpo debe ser el \u00FAltimo elemento en SOAPEnvelope
-SAAJ0406.ver1_2.only.header.body.allowed.in.envelope=SAAJ0406: el elemento Envelope no puede contener nada que no sea Header y Body
-SAAJ0407.ver1_2.no.encodingStyle.in.fault=SAAJ0407: el atributo encodingStyle no puede aparecer en Fault
-SAAJ0408.ver1_2.no.encodingStyle.in.fault.child=SAAJ0408: el atributo encodingStyle no puede aparecer en un elemento secundario Fault
-SAAJ0409.ver1_2.no.encodingstyle.in.header=SAAJ0401: el atributo encodingStyle no puede aparecer en Header
-SAAJ0410.ver1_2.no.null.to.addNotUnderstoodHeader=SAAJ0410: no se puede transferir NULL a addNotUnderstoodHeaderElement
-SAAJ0411.ver1_2.no.null.supportedURIs=SAAJ0411: el argumento no puede ser nulo y las URI soportadas no pueden ser nulas
-SAAJ0412.ver1_2.no.empty.list.of.supportedURIs=SAAJ0412: la lista de URI soportadas no puede estar vac\u00EDa
-SAAJ0413.ver1_2.header.elems.must.be.ns.qualified=SAAJ0413: los elementos de la cabecera de SOAP 1.2 deben estar cualificados por espacio de nombres
-#SAAJ0414.ver1_2.actor.unsupported.in.soap1.2=SAAJ0414: Actor not supported by SOAP 1.2
-SAAJ0415.ver1_2.msg.invalid.soap1.2=SAAJ0415: InputStream no representa un mensaje de SOAP 1.2 v\u00E1lido
-# {0} - element qname
-SAAJ0416.ver1_2.adding.text.not.legal=SAAJ0416: no es v\u00E1lido agregar texto a {0}
-SAAJ0417.ver1_2.qname.not.ns.qualified=SAAJ0417: el QName que se ha transferido a addNotUnderstoodHeaderElement debe estar cualificado por espacio de nombres
-
-#SOAPFault related errors
-SAAJ0430.ver1_2.locale.required=SAAJ0430: la configuraci\u00F3n regional es necesaria y no debe ser nula
-SAAJ0431.ver1_2.xml.lang.missing=SAAJ0431: el atributo "xml:lang" no se encuentra en el elemento de texto
-SAAJ0432.ver1_2.subcode.not.ns.qualified=SAAJ0432: el subc\u00F3digo debe estar cualificado por espacio de nombres
-#SAAJ0433.ver1_2.could.not.locate.prefix.for.uri=SAAJ0433: Unable to locate prefix for namespace value {0}
-SAAJ0434.ver1_2.text.element.not.present=SAAJ0434: env:text debe encontrarse dentro de env:Reason
-SAAJ0435.ver1_2.code.not.standard=SAAJ0435: {0} no es un valor de c\u00F3digo est\u00E1ndar
-SAAJ0436.ver1_2.detail.exists.error=SAAJ0436: no se puede agregar el detalle. El detalle ya existe
-SAAJ0437.ver1_2.version.mismatch.error=SAAJ0437: versi\u00F3n de SOAP incorrecta para el elemento Detail; se esperaba SOAP 1.2
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_fr.properties
deleted file mode 100644
index 09bdd3c0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_fr.properties
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_2 pkg
-
-SAAJ0401.ver1_2.no.encodingstyle.in.body=SAAJ0401 : l'attribut encodingStyle ne peut pas appara\u00EEtre sur l'\u00E9l\u00E9ment Body
-SAAJ0402.ver1_2.only.fault.allowed.in.body=SAAJ0402 : aucun autre \u00E9l\u00E9ment que Fault n'est autoris\u00E9 dans SOAPBody
-SAAJ0403.ver1_2.no.encodingStyle.in.detail=SAAJ0403 : l'attribut encodingStyle ne peut pas appara\u00EEtre sur l'\u00E9l\u00E9ment Detail
-SAAJ0404.ver1_2.no.encodingStyle.in.envelope=SAAJ0404 : l'attribut encodingStyle ne peut pas appara\u00EEtre sur l'\u00E9l\u00E9ment Envelope
-SAAJ0405.ver1_2.body.must.last.in.envelope=SAAJ0405 : Body doit \u00EAtre le dernier \u00E9l\u00E9ment de SOAPEnvelope
-SAAJ0406.ver1_2.only.header.body.allowed.in.envelope=SAAJ0406 : Envelope peut contenir uniquement les \u00E9l\u00E9ments Header et Body
-SAAJ0407.ver1_2.no.encodingStyle.in.fault=SAAJ0407 : l'attribut encodingStyle ne peut pas appara\u00EEtre sur l'\u00E9l\u00E9ment Fault
-SAAJ0408.ver1_2.no.encodingStyle.in.fault.child=SAAJ0408 : l'attribut encodingStyle ne peut pas appara\u00EEtre sur un \u00E9l\u00E9ment enfant Fault
-SAAJ0409.ver1_2.no.encodingstyle.in.header=SAAJ0401 : l'attribut encodingStyle ne peut pas appara\u00EEtre sur l'\u00E9l\u00E9ment Header
-SAAJ0410.ver1_2.no.null.to.addNotUnderstoodHeader=SAAJ0410 : impossible de transmettre la valeur NULL \u00E0 addNotUnderstoodHeaderElement
-SAAJ0411.ver1_2.no.null.supportedURIs=SAAJ0411 : l'argument ne peut pas \u00EAtre NULL, supportedURIs ne peut pas \u00EAtre NULL
-SAAJ0412.ver1_2.no.empty.list.of.supportedURIs=SAAJ0412 : la liste des URI pris en charge ne peut pas \u00EAtre vide
-SAAJ0413.ver1_2.header.elems.must.be.ns.qualified=SAAJ0413 : les \u00E9l\u00E9ments d'en-t\u00EAte SOAP 1.2 ne doivent pas \u00EAtre un espace de noms qualifi\u00E9
-#SAAJ0414.ver1_2.actor.unsupported.in.soap1.2=SAAJ0414: Actor not supported by SOAP 1.2
-SAAJ0415.ver1_2.msg.invalid.soap1.2=SAAJ0415 : InputStream ne repr\u00E9sente pas un message SOAP 1.2 valide
-# {0} - element qname
-SAAJ0416.ver1_2.adding.text.not.legal=SAAJ0416 : l''ajout de texte \u00E0 {0} est interdit
-SAAJ0417.ver1_2.qname.not.ns.qualified=SAAJ0417 : le QName transmis \u00E0 addNotUnderstoodHeaderElement doit \u00EAtre un espace de noms qualifi\u00E9
-
-#SOAPFault related errors
-SAAJ0430.ver1_2.locale.required=SAAJ0430 : l'environnement local est requis et ne doit pas \u00EAtre NULL
-SAAJ0431.ver1_2.xml.lang.missing=SAAJ0431 : l'attribut "xml:lang" ne figure pas sur l'\u00E9l\u00E9ment Text
-SAAJ0432.ver1_2.subcode.not.ns.qualified=SAAJ0432 : un sous-code doit \u00EAtre un espace de noms qualifi\u00E9
-#SAAJ0433.ver1_2.could.not.locate.prefix.for.uri=SAAJ0433: Unable to locate prefix for namespace value {0}
-SAAJ0434.ver1_2.text.element.not.present=SAAJ0434 : env:Text doit \u00EAtre pr\u00E9sent dans env:Reason
-SAAJ0435.ver1_2.code.not.standard=SAAJ0435 : {0} n''est pas une valeur Code standard
-SAAJ0436.ver1_2.detail.exists.error=SAAJ0436 : impossible d'ajouter l'\u00E9l\u00E9ment Detail, il existe d\u00E9j\u00E0
-SAAJ0437.ver1_2.version.mismatch.error=SAAJ0437 : version SOAP incorrecte pour l'\u00E9l\u00E9ment Detail, SOAP 1.2 attendu
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_it.properties
deleted file mode 100644
index 5a763baf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_it.properties
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_2 pkg
-
-SAAJ0401.ver1_2.no.encodingstyle.in.body=SAAJ0401: l'attributo encodingStyle non pu\u00F2 essere presente in Body
-SAAJ0402.ver1_2.only.fault.allowed.in.body=SAAJ0402: In SOAPBody non sono consentiti elementi diversi da Fault
-SAAJ0403.ver1_2.no.encodingStyle.in.detail=SAAJ0403: l'attributo encodingStyle non pu\u00F2 essere presente in Detail
-SAAJ0404.ver1_2.no.encodingStyle.in.envelope=SAAJ0404: l'attributo encodingStyle non pu\u00F2 essere presente in Envelope
-SAAJ0405.ver1_2.body.must.last.in.envelope=SAAJ0405: Body deve essere l'ultimo elemento in SOAPEnvelope
-SAAJ0406.ver1_2.only.header.body.allowed.in.envelope=SAAJ0406: Envelope non pu\u00F2 contenere elementi diversi da Header e Body
-SAAJ0407.ver1_2.no.encodingStyle.in.fault=SAAJ0407: l'attributo encodingStyle non pu\u00F2 essere presente in Fault
-SAAJ0408.ver1_2.no.encodingStyle.in.fault.child=SAAJ0408: l'attributo encodingStyle non pu\u00F2 essere presente in un elemento figlio di Fault
-SAAJ0409.ver1_2.no.encodingstyle.in.header=SAAJ0401: l'attributo encodingStyle non pu\u00F2 essere presente in Header
-SAAJ0410.ver1_2.no.null.to.addNotUnderstoodHeader=SAAJ0410: Impossibile passare NULL a addNotUnderstoodHeaderElement
-SAAJ0411.ver1_2.no.null.supportedURIs=SAAJ0411: L'argomento non pu\u00F2 essere nullo. Gli URI supportati non possono essere nulli
-SAAJ0412.ver1_2.no.empty.list.of.supportedURIs=SAAJ0412: La lista di URI supportati non pu\u00F2 essere vuota
-SAAJ0413.ver1_2.header.elems.must.be.ns.qualified=SAAJ0413: Gli elementi dell'intestazione SOAP 1.2 devono essere qualificati per lo spazio di nomi
-#SAAJ0414.ver1_2.actor.unsupported.in.soap1.2=SAAJ0414: Actor not supported by SOAP 1.2
-SAAJ0415.ver1_2.msg.invalid.soap1.2=SAAJ0415: InputStream non rappresenta un messaggio SOAP 1.2 valido
-# {0} - element qname
-SAAJ0416.ver1_2.adding.text.not.legal=SAAJ0416: L''aggiunta di testo a {0} non \u00E8 valida
-SAAJ0417.ver1_2.qname.not.ns.qualified=SAAJ0417: Il QName passato a addNotUnderstoodHeaderElement deve essere qualificato per lo spazio di nomi
-
-#SOAPFault related errors
-SAAJ0430.ver1_2.locale.required=SAAJ0430: Le impostazioni nazionali sono obbligatorie e non devono essere nulle
-SAAJ0431.ver1_2.xml.lang.missing=SAAJ0431: L'attributo "xml:lang" non \u00E8 presente nell'elemento Text
-SAAJ0432.ver1_2.subcode.not.ns.qualified=SAAJ0432: Un codice secondario deve essere qualificato per lo spazio di nomi
-#SAAJ0433.ver1_2.could.not.locate.prefix.for.uri=SAAJ0433: Unable to locate prefix for namespace value {0}
-SAAJ0434.ver1_2.text.element.not.present=SAAJ0434: env:Text deve essere presente in env:Reason
-SAAJ0435.ver1_2.code.not.standard=SAAJ0435: {0} non \u00E8 un valore di codice standard
-SAAJ0436.ver1_2.detail.exists.error=SAAJ0436: Impossibile aggiungere Detail. Detail esiste gi\u00E0.
-SAAJ0437.ver1_2.version.mismatch.error=SAAJ0437: Versione SOAP errata per l'elemento Detail. Prevista SOAP 1.2
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ja.properties
deleted file mode 100644
index a1e691f6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ja.properties
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_2 pkg
-
-SAAJ0401.ver1_2.no.encodingstyle.in.body=SAAJ0401: encodingStyle\u5C5E\u6027\u3092Body\u306B\u8868\u793A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0402.ver1_2.only.fault.allowed.in.body=SAAJ0402: Fault\u4EE5\u5916\u306E\u4ED6\u306E\u8981\u7D20\u306FSOAPBody\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
-SAAJ0403.ver1_2.no.encodingStyle.in.detail=SAAJ0403: encodingStyle\u5C5E\u6027\u3092Detail\u306B\u8868\u793A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0404.ver1_2.no.encodingStyle.in.envelope=SAAJ0404: encodingStyle\u5C5E\u6027\u3092Envelope\u306B\u8868\u793A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0405.ver1_2.body.must.last.in.envelope=SAAJ0405: Body\u306FSOAPEnvelope\u306E\u6700\u5F8C\u306E\u8981\u7D20\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0406.ver1_2.only.header.body.allowed.in.envelope=SAAJ0406: Envelope\u306BHeader\u304A\u3088\u3073Body\u4EE5\u5916\u306E\u3082\u306E\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0407.ver1_2.no.encodingStyle.in.fault=SAAJ0407: encodingStyle\u5C5E\u6027\u3092Fault\u306B\u8868\u793A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0408.ver1_2.no.encodingStyle.in.fault.child=SAAJ0408: encodingStyle\u5C5E\u6027\u3092Fault\u5B50\u8981\u7D20\u306B\u8868\u793A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0409.ver1_2.no.encodingstyle.in.header=SAAJ0401: encodingStyle\u5C5E\u6027\u3092Header\u306B\u8868\u793A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0410.ver1_2.no.null.to.addNotUnderstoodHeader=SAAJ0410: NULL\u3092addNotUnderstoodHeaderElement\u306B\u6E21\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0411.ver1_2.no.null.supportedURIs=SAAJ0411: \u5F15\u6570\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093\u3002supportedURIs\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093
-SAAJ0412.ver1_2.no.empty.list.of.supportedURIs=SAAJ0412: \u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308BURI\u306E\u30EA\u30B9\u30C8\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093
-SAAJ0413.ver1_2.header.elems.must.be.ns.qualified=SAAJ0413: SOAP 1.2\u306E\u30D8\u30C3\u30C0\u30FC\u8981\u7D20\u306F\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3067\u4FEE\u98FE\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-#SAAJ0414.ver1_2.actor.unsupported.in.soap1.2=SAAJ0414: Actor not supported by SOAP 1.2
-SAAJ0415.ver1_2.msg.invalid.soap1.2=SAAJ0415: InputStream\u306F\u6709\u52B9\u306ASOAP 1.2\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u3057\u3066\u3044\u307E\u305B\u3093
-# {0} - element qname
-SAAJ0416.ver1_2.adding.text.not.legal=SAAJ0416: {0}\u3078\u306E\u30C6\u30AD\u30B9\u30C8\u306E\u8FFD\u52A0\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-SAAJ0417.ver1_2.qname.not.ns.qualified=SAAJ0417: addNotUnderstoodHeaderElement\u306B\u6E21\u3055\u308C\u308BQName\u306F\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3067\u4FEE\u98FE\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-#SOAPFault related errors
-SAAJ0430.ver1_2.locale.required=SAAJ0430: \u30ED\u30B1\u30FC\u30EB\u306F\u5FC5\u9808\u3067\u3042\u308A\u3001null\u306B\u3067\u304D\u307E\u305B\u3093
-SAAJ0431.ver1_2.xml.lang.missing=SAAJ0431: "xml:lang"\u5C5E\u6027\u304CText\u8981\u7D20\u306B\u5B58\u5728\u3057\u307E\u305B\u3093
-SAAJ0432.ver1_2.subcode.not.ns.qualified=SAAJ0432: Subcode\u306F\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3067\u4FEE\u98FE\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-#SAAJ0433.ver1_2.could.not.locate.prefix.for.uri=SAAJ0433: Unable to locate prefix for namespace value {0}
-SAAJ0434.ver1_2.text.element.not.present=SAAJ0434: env:Text\u306Fenv:Reason\u5185\u306B\u5B58\u5728\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0435.ver1_2.code.not.standard=SAAJ0435: {0}\u306F\u6A19\u6E96\u306E\u30B3\u30FC\u30C9\u5024\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-SAAJ0436.ver1_2.detail.exists.error=SAAJ0436: Detail\u3092\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002Detail\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
-SAAJ0437.ver1_2.version.mismatch.error=SAAJ0437: Detail\u8981\u7D20\u306ESOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u7121\u52B9\u3067\u3059\u3002SOAP 1.2\u304C\u4E88\u671F\u3055\u308C\u307E\u3059
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ko.properties
deleted file mode 100644
index 64eba463..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ko.properties
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_2 pkg
-
-SAAJ0401.ver1_2.no.encodingstyle.in.body=SAAJ0401: encodingStyle \uC18D\uC131\uC740 Body\uC5D0 \uB098\uD0C0\uB0A0 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0402.ver1_2.only.fault.allowed.in.body=SAAJ0402: SOAPBody\uC5D0\uC11C\uB294 Fault\uB97C \uC81C\uC678\uD55C \uB2E4\uB978 \uC694\uC18C\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0403.ver1_2.no.encodingStyle.in.detail=SAAJ0403: encodingStyle \uC18D\uC131\uC740 Detail\uC5D0 \uB098\uD0C0\uB0A0 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0404.ver1_2.no.encodingStyle.in.envelope=SAAJ0404: encodingStyle \uC18D\uC131\uC740 Envelope\uC5D0 \uB098\uD0C0\uB0A0 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0405.ver1_2.body.must.last.in.envelope=SAAJ0405: Body\uB294 SOAPEnvelope\uC758 \uB9C8\uC9C0\uB9C9 \uC694\uC18C\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0406.ver1_2.only.header.body.allowed.in.envelope=SAAJ0406: Envelope\uC5D0\uB294 Header\uC640 Body \uC774\uC678\uC758 \uB2E4\uB978 \uC694\uC18C\uAC00 \uD3EC\uD568\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0407.ver1_2.no.encodingStyle.in.fault=SAAJ0407: encodingStyle \uC18D\uC131\uC740 Fault\uC5D0 \uB098\uD0C0\uB0A0 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0408.ver1_2.no.encodingStyle.in.fault.child=SAAJ0408: encodingStyle \uC18D\uC131\uC740 Fault \uD558\uC704 \uC694\uC18C\uC5D0 \uB098\uD0C0\uB0A0 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0409.ver1_2.no.encodingstyle.in.header=SAAJ0401: encodingStyle \uC18D\uC131\uC740 Header\uC5D0 \uB098\uD0C0\uB0A0 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0410.ver1_2.no.null.to.addNotUnderstoodHeader=SAAJ0410: addNotUnderstoodHeaderElement\uC5D0 NULL\uC744 \uC804\uB2EC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0411.ver1_2.no.null.supportedURIs=SAAJ0411: \uC778\uC218\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. supportedURIs\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0412.ver1_2.no.empty.list.of.supportedURIs=SAAJ0412: \uC9C0\uC6D0\uB418\uB294 URI \uBAA9\uB85D\uC740 \uBE44\uC6CC \uB458 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0413.ver1_2.header.elems.must.be.ns.qualified=SAAJ0413: SOAP 1.2 Header \uC694\uC18C\uB294 \uC815\uADDC\uD654\uB41C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-#SAAJ0414.ver1_2.actor.unsupported.in.soap1.2=SAAJ0414: Actor not supported by SOAP 1.2
-SAAJ0415.ver1_2.msg.invalid.soap1.2=SAAJ0415: InputStream\uC774 \uC801\uD569\uD55C SOAP 1.2 \uBA54\uC2DC\uC9C0\uB97C \uB098\uD0C0\uB0B4\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-# {0} - element qname
-SAAJ0416.ver1_2.adding.text.not.legal=SAAJ0416: {0}\uC5D0 \uD14D\uC2A4\uD2B8\uB97C \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0417.ver1_2.qname.not.ns.qualified=SAAJ0417: addNotUnderstoodHeaderElement\uC5D0 \uC804\uB2EC\uB41C QName\uC740 \uC815\uADDC\uD654\uB41C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-
-#SOAPFault related errors
-SAAJ0430.ver1_2.locale.required=SAAJ0430: \uB85C\uCF00\uC77C\uC774 \uD544\uC694\uD558\uBA70 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0431.ver1_2.xml.lang.missing=SAAJ0431: "xml:lang" \uC18D\uC131\uC774 Text \uC694\uC18C\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0432.ver1_2.subcode.not.ns.qualified=SAAJ0432: \uD558\uC704 \uCF54\uB4DC\uB294 \uC815\uADDC\uD654\uB41C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-#SAAJ0433.ver1_2.could.not.locate.prefix.for.uri=SAAJ0433: Unable to locate prefix for namespace value {0}
-SAAJ0434.ver1_2.text.element.not.present=SAAJ0434: env:Text\uB294 env:Reason\uC5D0 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0435.ver1_2.code.not.standard=SAAJ0435: {0}\uC740(\uB294) \uD45C\uC900 \uCF54\uB4DC \uAC12\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-SAAJ0436.ver1_2.detail.exists.error=SAAJ0436: Detail\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. Detail\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4.
-SAAJ0437.ver1_2.version.mismatch.error=SAAJ0437: Detail \uC694\uC18C\uC5D0 \uB300\uD55C SOAP \uBC84\uC804\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. SOAP 1.2\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_pt_BR.properties
deleted file mode 100644
index 67cc66ff..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_pt_BR.properties
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_2 pkg
-
-SAAJ0401.ver1_2.no.encodingstyle.in.body=SAAJ0401: o atributo encodingStyle n\u00E3o pode aparecer no Corpo
-SAAJ0402.ver1_2.only.fault.allowed.in.body=SAAJ0402: nenhum outro elemento, exceto Falha permitido no SOAPBody
-SAAJ0403.ver1_2.no.encodingStyle.in.detail=SAAJ0403: o atributo encodingStyle n\u00E3o pode aparecer no Detalhe
-SAAJ0404.ver1_2.no.encodingStyle.in.envelope=SAAJ0404: o atributo encodingStyle n\u00E3o pode aparecer no Envelope
-SAAJ0405.ver1_2.body.must.last.in.envelope=SAAJ0405: o Corpo deve ser o \u00FAltimo elemento no SOAPEnvelope
-SAAJ0406.ver1_2.only.header.body.allowed.in.envelope=SAAJ0406: o envelope n\u00E3o pode conter nada diferente de Cabe\u00E7alho e Corpo
-SAAJ0407.ver1_2.no.encodingStyle.in.fault=SAAJ0407: o atributo encodingStyle n\u00E3o pode aparecer na Falha
-SAAJ0408.ver1_2.no.encodingStyle.in.fault.child=SAAJ0408: o atributo encodingStyle n\u00E3o pode aparecer em um elemento-filho Falha
-SAAJ0409.ver1_2.no.encodingstyle.in.header=SAAJ0401: o atributo encodingStyle n\u00E3o pode aparecer no Cabe\u00E7alho
-SAAJ0410.ver1_2.no.null.to.addNotUnderstoodHeader=SAAJ0410: n\u00E3o \u00E9 poss\u00EDvel informar NULL para addNotUnderstoodHeaderElement
-SAAJ0411.ver1_2.no.null.supportedURIs=SAAJ0411: o argumento n\u00E3o pode ser nulo; supportedURIs n\u00E3o pode ser nulo
-SAAJ0412.ver1_2.no.empty.list.of.supportedURIs=SAAJ0412: lista de URIs suportados n\u00E3o pode ficar vazia
-SAAJ0413.ver1_2.header.elems.must.be.ns.qualified=SAAJ0413: os elementos do cabe\u00E7alho SOAP 1.2 devem ser namespace qualificado
-#SAAJ0414.ver1_2.actor.unsupported.in.soap1.2=SAAJ0414: Actor not supported by SOAP 1.2
-SAAJ0415.ver1_2.msg.invalid.soap1.2=SAAJ0415: o InputStream n\u00E3o representa uma Mensagem SOAP 1.2 v\u00E1lida
-# {0} - element qname
-SAAJ0416.ver1_2.adding.text.not.legal=SAAJ0416: adicionar texto a {0} n\u00E3o \u00E9 v\u00E1lido
-SAAJ0417.ver1_2.qname.not.ns.qualified=SAAJ0417: o QName informado ao addNotUnderstoodHeaderElement deve ser qualificado por namespace
-
-#SOAPFault related errors
-SAAJ0430.ver1_2.locale.required=SAAJ0430: a localidade \u00E9 obrigat\u00F3rio e n\u00E3o deve ser nula
-SAAJ0431.ver1_2.xml.lang.missing=SAAJ0431: o atributo "xml:lang" n\u00E3o est\u00E1 presente no elemento Texto
-SAAJ0432.ver1_2.subcode.not.ns.qualified=SAAJ0432: um subc\u00F3digo deve ser qualificado por namespace
-#SAAJ0433.ver1_2.could.not.locate.prefix.for.uri=SAAJ0433: Unable to locate prefix for namespace value {0}
-SAAJ0434.ver1_2.text.element.not.present=SAAJ0434: env:Text deve estar presente em env:Reason
-SAAJ0435.ver1_2.code.not.standard=SAAJ0435: {0} n\u00E3o \u00E9 um valor de C\u00F3digo padr\u00E3o
-SAAJ0436.ver1_2.detail.exists.error=SAAJ0436: n\u00E3o \u00E9 poss\u00EDvel adicionar Detalhe, o Detalhe j\u00E1 existe
-SAAJ0437.ver1_2.version.mismatch.error=SAAJ0437: vers\u00E3o de SOAP incorreta para o elemento Detalhe, esperava SOAP 1.2
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_CN.properties
deleted file mode 100644
index 21087d0e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_CN.properties
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_2 pkg
-
-SAAJ0401.ver1_2.no.encodingstyle.in.body=SAAJ0401: \u6B63\u6587\u4E0D\u80FD\u6709 encodingStyle \u5C5E\u6027
-SAAJ0402.ver1_2.only.fault.allowed.in.body=SAAJ0402: SOAPBody \u4E2D\u4E0D\u5141\u8BB8\u9664\u6545\u969C\u4E4B\u5916\u7684\u4EFB\u4F55\u5176\u4ED6\u5143\u7D20
-SAAJ0403.ver1_2.no.encodingStyle.in.detail=SAAJ0403: \u8BE6\u7EC6\u4FE1\u606F\u4E0D\u80FD\u6709 encodingStyle \u5C5E\u6027
-SAAJ0404.ver1_2.no.encodingStyle.in.envelope=SAAJ0404: \u4FE1\u5C01\u4E0D\u80FD\u6709 encodingStyle \u5C5E\u6027
-SAAJ0405.ver1_2.body.must.last.in.envelope=SAAJ0405: \u6B63\u6587\u5FC5\u987B\u662F SOAPEnvelope \u4E2D\u7684\u6700\u540E\u4E00\u4E2A\u5143\u7D20
-SAAJ0406.ver1_2.only.header.body.allowed.in.envelope=SAAJ0406: \u4FE1\u5C01\u4E0D\u80FD\u5305\u542B\u9664\u6807\u5934\u548C\u6B63\u6587\u5916\u7684\u5176\u4ED6\u5185\u5BB9
-SAAJ0407.ver1_2.no.encodingStyle.in.fault=SAAJ0407: \u6545\u969C\u4E0D\u80FD\u6709 encodingStyle \u5C5E\u6027
-SAAJ0408.ver1_2.no.encodingStyle.in.fault.child=SAAJ0408: \u6545\u969C\u5B50\u5143\u7D20\u4E0D\u80FD\u6709 encodingStyle \u5C5E\u6027
-SAAJ0409.ver1_2.no.encodingstyle.in.header=SAAJ0401: \u6807\u5934\u4E0D\u80FD\u6709 encodingStyle \u5C5E\u6027
-SAAJ0410.ver1_2.no.null.to.addNotUnderstoodHeader=SAAJ0410: \u4E0D\u80FD\u5C06\u7A7A\u503C\u4F20\u9012\u7ED9 addNotUnderstoodHeaderElement
-SAAJ0411.ver1_2.no.null.supportedURIs=SAAJ0411: \u53C2\u6570\u4E0D\u80FD\u4E3A\u7A7A\u503C; supportedURIs \u4E0D\u80FD\u4E3A\u7A7A\u503C
-SAAJ0412.ver1_2.no.empty.list.of.supportedURIs=SAAJ0412: \u652F\u6301\u7684 URI \u7684\u5217\u8868\u4E0D\u80FD\u4E3A\u7A7A
-SAAJ0413.ver1_2.header.elems.must.be.ns.qualified=SAAJ0413: SOAP 1.2 \u6807\u5934\u5143\u7D20\u5FC5\u987B\u9650\u5B9A\u540D\u79F0\u7A7A\u95F4
-#SAAJ0414.ver1_2.actor.unsupported.in.soap1.2=SAAJ0414: Actor not supported by SOAP 1.2
-SAAJ0415.ver1_2.msg.invalid.soap1.2=SAAJ0415: InputStream \u4E0D\u8868\u793A\u6709\u6548\u7684 SOAP 1.2 \u6D88\u606F
-# {0} - element qname
-SAAJ0416.ver1_2.adding.text.not.legal=SAAJ0416: \u5C06\u6587\u672C\u6DFB\u52A0\u5230{0}\u7684\u64CD\u4F5C\u662F\u975E\u6CD5\u7684
-SAAJ0417.ver1_2.qname.not.ns.qualified=SAAJ0417: \u4F20\u9012\u5230 addNotUnderstoodHeaderElement \u7684 QName \u5FC5\u987B\u9650\u5B9A\u540D\u79F0\u7A7A\u95F4
-
-#SOAPFault related errors
-SAAJ0430.ver1_2.locale.required=SAAJ0430: \u533A\u57DF\u8BBE\u7F6E\u662F\u5FC5\u9700\u7684, \u4E0D\u80FD\u4E3A\u7A7A\u503C
-SAAJ0431.ver1_2.xml.lang.missing=SAAJ0431: \u6587\u672C\u5143\u7D20\u4E0D\u5B58\u5728 "xml:lang" \u5C5E\u6027
-SAAJ0432.ver1_2.subcode.not.ns.qualified=SAAJ0432: \u5B50\u4EE3\u7801\u5FC5\u987B\u9650\u5B9A\u540D\u79F0\u7A7A\u95F4
-#SAAJ0433.ver1_2.could.not.locate.prefix.for.uri=SAAJ0433: Unable to locate prefix for namespace value {0}
-SAAJ0434.ver1_2.text.element.not.present=SAAJ0434: env:Reason \u5185\u90E8\u5FC5\u987B\u5B58\u5728 env:Text
-SAAJ0435.ver1_2.code.not.standard=SAAJ0435: {0}\u4E0D\u662F\u6807\u51C6\u4EE3\u7801\u503C
-SAAJ0436.ver1_2.detail.exists.error=SAAJ0436: \u65E0\u6CD5\u6DFB\u52A0\u8BE6\u7EC6\u4FE1\u606F, \u8BE6\u7EC6\u4FE1\u606F\u5DF2\u5B58\u5728
-SAAJ0437.ver1_2.version.mismatch.error=SAAJ0437: \u8BE6\u7EC6\u4FE1\u606F\u5143\u7D20\u7684 SOAP \u7248\u672C\u4E0D\u6B63\u786E, \u5E94\u4E3A SOAP 1.2
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_TW.properties
deleted file mode 100644
index 4fc5420c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_TW.properties
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for ver1_2 pkg
-
-SAAJ0401.ver1_2.no.encodingstyle.in.body=SAAJ0401: encodingStyle \u5C6C\u6027\u4E0D\u80FD\u51FA\u73FE\u5728 Body \u4E2D
-SAAJ0402.ver1_2.only.fault.allowed.in.body=SAAJ0402: SOAPBody \u4E2D\u9664\u4E86 Fault \u4EE5\u5916\u4E0D\u5141\u8A31\u5176\u4ED6\u5143\u7D20
-SAAJ0403.ver1_2.no.encodingStyle.in.detail=SAAJ0403: encodingStyle \u5C6C\u6027\u4E0D\u80FD\u51FA\u73FE\u5728 Detail \u4E2D
-SAAJ0404.ver1_2.no.encodingStyle.in.envelope=SAAJ0404: encodingStyle \u5C6C\u6027\u4E0D\u80FD\u51FA\u73FE\u5728 Envelope \u4E2D
-SAAJ0405.ver1_2.body.must.last.in.envelope=SAAJ0405: Body \u5FC5\u9808\u662F SOAPEnvelope \u4E2D\u7684\u6700\u5F8C\u4E00\u500B\u5143\u7D20
-SAAJ0406.ver1_2.only.header.body.allowed.in.envelope=SAAJ0406: Envelope \u4E0D\u80FD\u5305\u542B Header \u548C Body \u4EE5\u5916\u7684\u4EFB\u4F55\u5167\u5BB9
-SAAJ0407.ver1_2.no.encodingStyle.in.fault=SAAJ0407: encodingStyle \u5C6C\u6027\u4E0D\u80FD\u51FA\u73FE\u5728 Fault \u4E2D
-SAAJ0408.ver1_2.no.encodingStyle.in.fault.child=SAAJ0408: encodingStyle \u5C6C\u6027\u4E0D\u80FD\u51FA\u73FE\u5728 Fault \u5B50\u5143\u7D20\u4E2D
-SAAJ0409.ver1_2.no.encodingstyle.in.header=SAAJ0401: encodingStyle \u5C6C\u6027\u4E0D\u80FD\u51FA\u73FE\u5728 Header \u4E2D
-SAAJ0410.ver1_2.no.null.to.addNotUnderstoodHeader=SAAJ0410: \u4E0D\u80FD\u50B3\u9001 NULL \u81F3 addNotUnderstoodHeaderElement
-SAAJ0411.ver1_2.no.null.supportedURIs=SAAJ0411: \u5F15\u6578\u4E0D\u80FD\u662F\u7A7A\u503C; supportedURIs \u4E0D\u80FD\u662F\u7A7A\u503C
-SAAJ0412.ver1_2.no.empty.list.of.supportedURIs=SAAJ0412: \u652F\u63F4\u7684 URI \u6E05\u55AE\u4E0D\u80FD\u7A7A\u767D
-SAAJ0413.ver1_2.header.elems.must.be.ns.qualified=SAAJ0413: SOAP 1.2 \u6A19\u982D\u5143\u7D20\u5FC5\u9808\u662F\u9650\u5B9A\u7684\u547D\u540D\u7A7A\u9593
-#SAAJ0414.ver1_2.actor.unsupported.in.soap1.2=SAAJ0414: Actor not supported by SOAP 1.2
-SAAJ0415.ver1_2.msg.invalid.soap1.2=SAAJ0415: InputStream \u4E0D\u4EE3\u8868\u6709\u6548\u7684 SOAP 1.2 \u8A0A\u606F
-# {0} - element qname
-SAAJ0416.ver1_2.adding.text.not.legal=SAAJ0416: \u65B0\u589E\u6587\u5B57\u81F3 {0} \u7121\u6548
-SAAJ0417.ver1_2.qname.not.ns.qualified=SAAJ0417: \u50B3\u9001\u81F3 addNotUnderstoodHeaderElement \u7684 QName \u5FC5\u9808\u662F\u9650\u5B9A\u7684\u547D\u540D\u7A7A\u9593
-
-#SOAPFault related errors
-SAAJ0430.ver1_2.locale.required=SAAJ0430: \u5FC5\u9808\u6709\u5730\u5340\u8A2D\u5B9A\u4E14\u4E0D\u5F97\u70BA\u7A7A\u503C
-SAAJ0431.ver1_2.xml.lang.missing=SAAJ0431: Text \u5143\u7D20\u4E0A\u6C92\u6709 "xml:lang" \u5C6C\u6027
-SAAJ0432.ver1_2.subcode.not.ns.qualified=SAAJ0432: Subcode \u5FC5\u9808\u662F\u9650\u5B9A\u7684\u547D\u540D\u7A7A\u9593
-#SAAJ0433.ver1_2.could.not.locate.prefix.for.uri=SAAJ0433: Unable to locate prefix for namespace value {0}
-SAAJ0434.ver1_2.text.element.not.present=SAAJ0434: env:Text \u5FC5\u9808\u4F4D\u65BC env:Reason \u5167
-SAAJ0435.ver1_2.code.not.standard=SAAJ0435: {0} \u4E0D\u662F\u6A19\u6E96 Code \u503C
-SAAJ0436.ver1_2.detail.exists.error=SAAJ0436: \u7121\u6CD5\u65B0\u589E Detail, Detail \u5DF2\u7D93\u5B58\u5728
-SAAJ0437.ver1_2.version.mismatch.error=SAAJ0437: Detail \u5143\u7D20\u7684 SOAP \u7248\u672C\u4E0D\u6B63\u78BA, \u61C9\u8A72\u662F SOAP 1.2
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Message1_2Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Message1_2Impl.java
deleted file mode 100644
index b5249c59..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/Message1_2Impl.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType;
-import com.sun.xml.internal.messaging.saaj.soap.MessageImpl;
-
-public class Message1_2Impl extends MessageImpl implements SOAPConstants{
-
- public Message1_2Impl() {
- super();
- }
-
- public Message1_2Impl(SOAPMessage msg) {
- super(msg);
- }
-
- public Message1_2Impl(boolean isFastInfoset, boolean acceptFastInfoset) {
- super(isFastInfoset, acceptFastInfoset);
- }
-
- // unused. can we delete this? - Kohsuke
- public Message1_2Impl(MimeHeaders headers, InputStream in)
- throws IOException, SOAPExceptionImpl {
- super(headers, in);
- }
-
- public Message1_2Impl(MimeHeaders headers, ContentType ct, int stat, InputStream in)
- throws SOAPExceptionImpl {
- super(headers,ct,stat,in);
- }
-
- public SOAPPart getSOAPPart() {
- if (soapPartImpl == null)
- soapPartImpl = new SOAPPart1_2Impl(this);
-
- return soapPartImpl;
- }
-
- protected boolean isCorrectSoapVersion(int contentTypeId) {
- return (contentTypeId & SOAP1_2_FLAG) != 0;
- }
-
- protected String getExpectedContentType() {
- return isFastInfoset ? "application/soap+fastinfoset" : "application/soap+xml";
- }
-
- protected String getExpectedAcceptHeader() {
- String accept = "application/soap+xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2";
- return acceptFastInfoset ? ("application/soap+fastinfoset, " + accept) : accept;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPFactory1_2Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPFactory1_2Impl.java
deleted file mode 100644
index 7ce74b32..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPFactory1_2Impl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
-
-import javax.xml.soap.Detail;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFault;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPFactoryImpl;
-
-public class SOAPFactory1_2Impl extends SOAPFactoryImpl {
- protected SOAPDocumentImpl createDocument() {
- return (new SOAPPart1_2Impl()).getDocument();
- }
-
- public Detail createDetail() throws SOAPException {
- return new Detail1_2Impl(createDocument());
- }
-
- public SOAPFault createFault(String reasonText, QName faultCode)
- throws SOAPException {
- if (faultCode == null) {
- throw new IllegalArgumentException("faultCode argument for createFault was passed NULL");
- }
- if (reasonText == null) {
- throw new IllegalArgumentException("reasonText argument for createFault was passed NULL");
- }
- Fault1_2Impl fault = new Fault1_2Impl(createDocument(), null);
- fault.setFaultCode(faultCode);
- fault.setFaultString(reasonText);
- return fault;
- }
-
- public SOAPFault createFault() throws SOAPException {
- Fault1_2Impl fault = new Fault1_2Impl(createDocument(), null);
- fault.setFaultCode(fault.getDefaultFaultCode());
- fault.setFaultString("Fault string, and possibly fault code, not set");
- return fault;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java
deleted file mode 100644
index 5616bdb4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPMessageFactory1_2Impl.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author JAX-RPC RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.MessageFactoryImpl;
-import com.sun.xml.internal.messaging.saaj.soap.MessageImpl;
-
-public class SOAPMessageFactory1_2Impl extends MessageFactoryImpl {
-
- public SOAPMessage createMessage() throws SOAPException {
- return new Message1_2Impl();
- }
-
- public SOAPMessage createMessage(boolean isFastInfoset,
- boolean acceptFastInfoset) throws SOAPException
- {
- return new Message1_2Impl(isFastInfoset, acceptFastInfoset);
- }
-
- public SOAPMessage createMessage(MimeHeaders headers, InputStream in) throws IOException, SOAPExceptionImpl {
-
- if (headers == null) {
- headers = new MimeHeaders();
- }
-
- if (getContentType(headers) == null) {
- headers.setHeader("Content-Type", SOAPConstants.SOAP_1_2_CONTENT_TYPE);
- }
-
- MessageImpl msg = new Message1_2Impl(headers, in);
- msg.setLazyAttachments(lazyAttachments);
- return msg;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java
deleted file mode 100644
index 152daa6b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/SOAPPart1_2Impl.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_2;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.soap.SOAPConstants;
-import javax.xml.soap.SOAPException;
-import javax.xml.transform.Source;
-
-import com.sun.xml.internal.messaging.saaj.soap.*;
-import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl;
-import com.sun.xml.internal.messaging.saaj.util.XMLDeclarationParser;
-
-public class SOAPPart1_2Impl extends SOAPPartImpl implements SOAPConstants{
-
- protected static final Logger log =
- Logger.getLogger(SOAPPart1_2Impl.class.getName(),
- "com.sun.xml.internal.messaging.saaj.soap.ver1_2.LocalStrings");
-
- public SOAPPart1_2Impl() {
- super();
- }
-
- public SOAPPart1_2Impl(MessageImpl message) {
- super(message);
- }
-
- protected String getContentType() {
- return "application/soap+xml";
- }
-
- protected Envelope createEmptyEnvelope(String prefix) throws SOAPException {
- return new Envelope1_2Impl(getDocument(), prefix, true, true);
- }
-
- protected Envelope createEnvelopeFromSource() throws SOAPException {
- XMLDeclarationParser parser = lookForXmlDecl();
- Source tmp = source;
- source = null;
- EnvelopeImpl envelope = (EnvelopeImpl)EnvelopeFactory.createEnvelope(tmp, this);
- if (!envelope.getNamespaceURI().equals(SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE)) {
- log.severe("SAAJ0415.ver1_2.msg.invalid.soap1.2");
- throw new SOAPException("InputStream does not represent a valid SOAP 1.2 Message");
- }
-
- if (parser != null) { //can be null if source was a DomSource and not StreamSource
- if (!omitXmlDecl) {
- envelope.setOmitXmlDecl("no");
- envelope.setXmlDecl(parser.getXmlDeclaration());
- envelope.setCharsetEncoding(parser.getEncoding());
- }
- }
- return envelope;
-
- }
-
- protected SOAPPartImpl duplicateType() {
- return new SOAPPart1_2Impl();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/Base64.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/Base64.java
deleted file mode 100644
index 357dfd91..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/Base64.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-
-// Cut & paste from tomcat
-
-/**
- * This class provides encode/decode for RFC 2045 Base64 as
- * defined by RFC 2045, N. Freed and N. Borenstein.
- * RFC 2045: Multipurpose Internet Mail Extensions (MIME)
- * Part One: Format of Internet Message Bodies. Reference
- * 1996 Available at: http://www.ietf.org/rfc/rfc2045.txt
- * This class is used by XML Schema binary format validation
- *
- * @author Jeffrey Rodriguez
- * @version
- */
-public final class Base64 {
-
-
- static private final int BASELENGTH = 255;
- static private final int LOOKUPLENGTH = 63;
- static private final int TWENTYFOURBITGROUP = 24;
- static private final int EIGHTBIT = 8;
- static private final int SIXTEENBIT = 16;
- static private final int SIXBIT = 6;
- static private final int FOURBYTE = 4;
-
-
- static private final byte PAD = ( byte ) '=';
- static private byte [] base64Alphabet = new byte[BASELENGTH];
- static private byte [] lookUpBase64Alphabet = new byte[LOOKUPLENGTH];
-
- static {
-
- for (int i = 0; i<BASELENGTH; i++ ) {
- base64Alphabet[i] = -1;
- }
- for ( int i = 'Z'; i >= 'A'; i-- ) {
- base64Alphabet[i] = (byte) (i-'A');
- }
- for ( int i = 'z'; i>= 'a'; i--) {
- base64Alphabet[i] = (byte) ( i-'a' + 26);
- }
-
- for ( int i = '9'; i >= '0'; i--) {
- base64Alphabet[i] = (byte) (i-'0' + 52);
- }
-
- base64Alphabet['+'] = 62;
- base64Alphabet['/'] = 63;
-
- for (int i = 0; i<=25; i++ )
- lookUpBase64Alphabet[i] = (byte) ('A'+i );
-
- for (int i = 26, j = 0; i<=51; i++, j++ )
- lookUpBase64Alphabet[i] = (byte) ('a'+ j );
-
- for (int i = 52, j = 0; i<=61; i++, j++ )
- lookUpBase64Alphabet[i] = (byte) ('0' + j );
-
- }
-
-
- static boolean isBase64( byte octect ) {
- //shall we ignore white space? JEFF??
- return(octect == PAD || base64Alphabet[octect] != -1 );
- }
-
-
- static boolean isArrayByteBase64( byte[] arrayOctect ) {
- int length = arrayOctect.length;
- if ( length == 0 )
- return false;
- for ( int i=0; i < length; i++ ) {
- if ( Base64.isBase64( arrayOctect[i] ) == false)
- return false;
- }
- return true;
- }
-
- /**
- * Encodes hex octects into Base64
- *
- * @param binaryData Array containing binaryData
- * @return Encoded Base64 array
- */
- public static byte[] encode( byte[] binaryData ) {
- int lengthDataBits = binaryData.length*EIGHTBIT;
- int fewerThan24bits = lengthDataBits%TWENTYFOURBITGROUP;
- int numberTriplets = lengthDataBits/TWENTYFOURBITGROUP;
- byte encodedData[] = null;
-
-
- if ( fewerThan24bits != 0 ) //data not divisible by 24 bit
- encodedData = new byte[ (numberTriplets + 1 )*4 ];
- else // 16 or 8 bit
- encodedData = new byte[ numberTriplets*4 ];
-
- byte k=0, l=0, b1=0,b2=0,b3=0;
-
- int encodedIndex = 0;
- int dataIndex = 0;
- int i = 0;
- for ( i = 0; i<numberTriplets; i++ ) {
-
- dataIndex = i*3;
- b1 = binaryData[dataIndex];
- b2 = binaryData[dataIndex + 1];
- b3 = binaryData[dataIndex + 2];
-
- l = (byte)(b2 & 0x0f);
- k = (byte)(b1 & 0x03);
-
- encodedIndex = i*4;
- encodedData[encodedIndex] = lookUpBase64Alphabet[ b1 >>2 ];
- encodedData[encodedIndex+1] = lookUpBase64Alphabet[(b2 >>4 ) |
-( k<<4 )];
- encodedData[encodedIndex+2] = lookUpBase64Alphabet[ (l <<2 ) |
-( b3>>6)];
- encodedData[encodedIndex+3] = lookUpBase64Alphabet[ b3 & 0x3f ];
- }
-
- // form integral number of 6-bit groups
- dataIndex = i*3;
- encodedIndex = i*4;
- if (fewerThan24bits == EIGHTBIT ) {
- b1 = binaryData[dataIndex];
- k = (byte) ( b1 &0x03 );
- encodedData[encodedIndex] = lookUpBase64Alphabet[ b1 >>2 ];
- encodedData[encodedIndex + 1] = lookUpBase64Alphabet[ k<<4 ];
- encodedData[encodedIndex + 2] = PAD;
- encodedData[encodedIndex + 3] = PAD;
- } else if ( fewerThan24bits == SIXTEENBIT ) {
-
- b1 = binaryData[dataIndex];
- b2 = binaryData[dataIndex +1 ];
- l = ( byte ) ( b2 &0x0f );
- k = ( byte ) ( b1 &0x03 );
- encodedData[encodedIndex] = lookUpBase64Alphabet[ b1 >>2 ];
- encodedData[encodedIndex + 1] = lookUpBase64Alphabet[ (b2 >>4 )
-| ( k<<4 )];
- encodedData[encodedIndex + 2] = lookUpBase64Alphabet[ l<<2 ];
- encodedData[encodedIndex + 3] = PAD;
- }
- return encodedData;
- }
-
-
- /**
- * Decodes Base64 data into octects
- *
- * @param binaryData Byte array containing Base64 data
- * @return Array containind decoded data.
- */
- public byte[] decode( byte[] base64Data ) {
- int numberQuadruple = base64Data.length/FOURBYTE;
- byte decodedData[] = null;
- byte b1=0,b2=0,b3=0, b4=0, marker0=0, marker1=0;
-
- // Throw away anything not in base64Data
- // Adjust size
-
- int encodedIndex = 0;
- int dataIndex = 0;
- decodedData = new byte[ numberQuadruple*3 + 1 ];
-
- for (int i = 0; i<numberQuadruple; i++ ) {
- dataIndex = i*4;
- marker0 = base64Data[dataIndex +2];
- marker1 = base64Data[dataIndex +3];
-
- b1 = base64Alphabet[base64Data[dataIndex]];
- b2 = base64Alphabet[base64Data[dataIndex +1]];
-
- if ( marker0 != PAD && marker1 != PAD ) { //No PAD e.g 3cQl
- b3 = base64Alphabet[ marker0 ];
- b4 = base64Alphabet[ marker1 ];
-
- decodedData[encodedIndex] = (byte)( b1 <<2 | b2>>4 ) ;
- decodedData[encodedIndex+1] = (byte)(((b2 & 0xf)<<4 ) |(
-(b3>>2) & 0xf) );
- decodedData[encodedIndex+2] = (byte)( b3<<6 | b4 );
- } else if ( marker0 == PAD ) { //Two PAD e.g. 3c[Pad][Pad]
- decodedData[encodedIndex] = (byte)( b1 <<2 | b2>>4 ) ;
- decodedData[encodedIndex+1] = (byte)((b2 & 0xf)<<4 );
- decodedData[encodedIndex+2] = (byte) 0;
- } else if ( marker1 == PAD ) { //One PAD e.g. 3cQ[Pad]
- b3 = base64Alphabet[ marker0 ];
-
- decodedData[encodedIndex] = (byte)( b1 <<2 | b2>>4 );
- decodedData[encodedIndex+1] = (byte)(((b2 & 0xf)<<4 ) |(
-(b3>>2) & 0xf) );
- decodedData[encodedIndex+2] = (byte)( b3<<6);
- }
- encodedIndex += 3;
- }
- return decodedData;
-
- }
-
- static final int base64[]= {
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 64, 64, 63,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64,
- 64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64,
- 64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
- };
-
- public static String base64Decode( String orig ) {
- char chars[]=orig.toCharArray();
- StringBuffer sb=new StringBuffer();
- int i=0;
-
- int shift = 0; // # of excess bits stored in accum
- int acc = 0;
-
- for (i=0; i<chars.length; i++) {
- int v = base64[ chars[i] & 0xFF ];
-
- if ( v >= 64 ) {
- if( chars[i] != '=' )
- System.out.println("Wrong char in base64: " + chars[i]);
- } else {
- acc= ( acc << 6 ) | v;
- shift += 6;
- if ( shift >= 8 ) {
- shift -= 8;
- sb.append( (char) ((acc >> shift) & 0xff));
- }
- }
- }
- return sb.toString();
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ByteInputStream.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ByteInputStream.java
deleted file mode 100644
index deac4b08..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ByteInputStream.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-
-// This class just gives access to the underlying buffer without copying.
-
-public class ByteInputStream extends ByteArrayInputStream {
- private static final byte[] EMPTY_ARRAY = new byte[0];
-
- public ByteInputStream() {
- this(EMPTY_ARRAY, 0);
- }
-
- public ByteInputStream(byte buf[], int length) {
- super(buf, 0, length);
- }
-
- public ByteInputStream(byte buf[], int offset, int length) {
- super(buf, offset, length);
- }
-
- public byte[] getBytes() {
- return buf;
- }
-
- public int getCount() {
- return count;
- }
-
- public void close() throws IOException {
- reset();
- }
-
- public void setBuf(byte[] buf) {
- this.buf = buf;
- this.pos = 0;
- this.count = buf.length;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java
deleted file mode 100644
index aa8372a2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ByteOutputStream.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.io.BufferedOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.InputStream;
-import java.io.ByteArrayInputStream;
-
-/**
- * Customized {@link BufferedOutputStream}.
- *
- * <p>
- * Compared to {@link BufferedOutputStream},
- * this class:
- *
- * <ol>
- * <li>doesn't do synchronization
- * <li>allows access to the raw buffer
- * <li>almost no parameter check
- */
-public final class ByteOutputStream extends OutputStream {
- /**
- * The buffer where data is stored.
- */
- protected byte[] buf;
-
- /**
- * The number of valid bytes in the buffer.
- */
- protected int count = 0;
-
- public ByteOutputStream() {
- this(1024);
- }
-
- public ByteOutputStream(int size) {
- buf = new byte[size];
- }
-
- /**
- * Copies all the bytes from this input into this buffer.
- */
- public void write(InputStream in) throws IOException {
- if (in instanceof ByteArrayInputStream) {
- int size = in.available();
- ensureCapacity(size);
- count += in.read(buf,count,size);
- return;
- }
- while(true) {
- int cap = buf.length-count;
- int sz = in.read(buf,count,cap);
- if(sz<0) return; // hit EOS
-
- count += sz;
- if(cap==sz)
- // the buffer filled up. double the buffer
- ensureCapacity(count);
- }
- }
-
- public void write(int b) {
- ensureCapacity(1);
- buf[count] = (byte) b;
- count++;
- }
-
- /**
- * Ensure that the buffer has at least this much space.
- */
- private void ensureCapacity(int space) {
- int newcount = space + count;
- if (newcount > buf.length) {
- byte[] newbuf = new byte[Math.max(buf.length << 1, newcount)];
- System.arraycopy(buf, 0, newbuf, 0, count);
- buf = newbuf;
- }
- }
-
- public void write(byte[] b, int off, int len) {
- ensureCapacity(len);
- System.arraycopy(b, off, buf, count, len);
- count += len;
- }
-
- public void write(byte[] b) {
- write(b, 0, b.length);
- }
-
- /**
- * Writes a string as ASCII string.
- */
- public void writeAsAscii(String s) {
- int len = s.length();
-
- ensureCapacity(len);
-
- int ptr = count;
- for( int i=0; i<len; i++ )
- buf[ptr++] = (byte)s.charAt(i);
- count = ptr;
- }
-
- public void writeTo(OutputStream out) throws IOException {
- out.write(buf, 0, count);
- }
-
- public void reset() {
- count = 0;
- }
-
- /**
- * Evil buffer reallocation method.
- * Don't use it unless you absolutely have to.
- *
- * @deprecated
- * because this is evil!
- */
- public byte toByteArray()[] {
- byte[] newbuf = new byte[count];
- System.arraycopy(buf, 0, newbuf, 0, count);
- return newbuf;
- }
-
- public int size() {
- return count;
- }
-
- public ByteInputStream newInputStream() {
- return new ByteInputStream(buf,count);
- }
-
- /**
- * Converts the buffer's contents into a string, translating bytes into
- * characters according to the platform's default character encoding.
- *
- * @return String translated from the buffer's contents.
- * @since JDK1.1
- */
- public String toString() {
- return new String(buf, 0, count);
- }
-
- public void close() {
- }
-
- public byte[] getBytes() {
- return buf;
- }
-
-
- public int getCount() {
- return count;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/CharReader.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/CharReader.java
deleted file mode 100644
index 5f7b8e18..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/CharReader.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.io.CharArrayReader;
-
-// This class just gives access to the underlying buffer without copying.
-
-public class CharReader extends CharArrayReader {
- public CharReader(char buf[], int length) {
- super(buf, 0, length);
- }
-
- public CharReader(char buf[], int offset, int length) {
- super(buf, offset, length);
- }
-
- public char[] getChars() {
- return buf;
- }
-
- public int getCount() {
- return count;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/CharWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/CharWriter.java
deleted file mode 100644
index 4332a1af..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/CharWriter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.io.CharArrayWriter;
-
-// This class just gives access to the underlying buffer without copying.
-
-public class CharWriter extends CharArrayWriter {
- public CharWriter () {
- super();
- }
-
- public CharWriter(int size) {
- super(size);
- }
-
- public char[] getChars() {
- return buf;
- }
-
- public int getCount() {
- return count;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/FastInfosetReflection.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/FastInfosetReflection.java
deleted file mode 100644
index 218dcaf7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/FastInfosetReflection.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.lang.reflect.*;
-import javax.xml.transform.Source;
-import javax.xml.transform.Result;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-/**
- *
- * @author Santiago.PericasGeertsen@sun.com
- * @author Paul.Sandoz@sun.com
- */
-public class FastInfosetReflection {
-
- /**
- * FI DOMDocumentParser constructor using reflection.
- */
- static Constructor fiDOMDocumentParser_new;
-
- /**
- * FI <code>DOMDocumentParser.parse()</code> method via reflection.
- */
- static Method fiDOMDocumentParser_parse;
-
- /**
- * FI DOMDocumentSerializer constructor using reflection.
- */
- static Constructor fiDOMDocumentSerializer_new;
-
- /**
- * FI <code>FastInfosetSource.serialize(Document)</code> method via reflection.
- */
- static Method fiDOMDocumentSerializer_serialize;
-
- /**
- * FI <code>FastInfosetSource.setOutputStream(OutputStream)</code> method via reflection.
- */
- static Method fiDOMDocumentSerializer_setOutputStream;
-
- /**
- * FI FastInfosetSource constructor using reflection.
- */
- static Class fiFastInfosetSource_class;
-
- /**
- * FI FastInfosetSource constructor using reflection.
- */
- static Constructor fiFastInfosetSource_new;
-
- /**
- * FI <code>FastInfosetSource.getInputStream()</code> method via reflection.
- */
- static Method fiFastInfosetSource_getInputStream;
-
- /**
- * FI <code>FastInfosetSource.setInputSTream()</code> method via reflection.
- */
- static Method fiFastInfosetSource_setInputStream;
-
- /**
- * FI FastInfosetResult constructor using reflection.
- */
- static Constructor fiFastInfosetResult_new;
-
- /**
- * FI <code>FastInfosetResult.getOutputSTream()</code> method via reflection.
- */
- static Method fiFastInfosetResult_getOutputStream;
-
- static {
- try {
- Class clazz = Class.forName("com.sun.xml.internal.fastinfoset.dom.DOMDocumentParser");
- fiDOMDocumentParser_new = clazz.getConstructor((Class[]) null);
- fiDOMDocumentParser_parse = clazz.getMethod("parse",
- new Class[] { org.w3c.dom.Document.class, java.io.InputStream.class });
-
- clazz = Class.forName("com.sun.xml.internal.fastinfoset.dom.DOMDocumentSerializer");
- fiDOMDocumentSerializer_new = clazz.getConstructor((Class[])null);
- fiDOMDocumentSerializer_serialize = clazz.getMethod("serialize",
- new Class[] { org.w3c.dom.Node.class });
- fiDOMDocumentSerializer_setOutputStream = clazz.getMethod("setOutputStream",
- new Class[] { java.io.OutputStream.class });
-
- fiFastInfosetSource_class = clazz = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSource");
- fiFastInfosetSource_new = clazz.getConstructor(
- new Class[] { java.io.InputStream.class });
- fiFastInfosetSource_getInputStream = clazz.getMethod("getInputStream", (Class[]) null);
- fiFastInfosetSource_setInputStream = clazz.getMethod("setInputStream",
- new Class[] { java.io.InputStream.class });
-
- clazz = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetResult");
- fiFastInfosetResult_new = clazz.getConstructor(
- new Class[] { java.io.OutputStream.class });
- fiFastInfosetResult_getOutputStream = clazz.getMethod("getOutputStream", (Class[]) null);
- }
- catch (Exception e) {
- // falls through
- }
- }
-
- // -- DOMDocumentParser ----------------------------------------------
-
- public static Object DOMDocumentParser_new() throws Exception {
- if (fiDOMDocumentParser_new == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- return fiDOMDocumentParser_new.newInstance((Object[])null);
- }
-
- public static void DOMDocumentParser_parse(Object parser,
- Document d, InputStream s) throws Exception
- {
- if (fiDOMDocumentParser_parse == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- fiDOMDocumentParser_parse.invoke(parser, new Object[] { d, s });
- }
-
- // -- DOMDocumentSerializer-------------------------------------------
-
- public static Object DOMDocumentSerializer_new() throws Exception {
- if (fiDOMDocumentSerializer_new == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- return fiDOMDocumentSerializer_new.newInstance((Object[])null);
- }
-
- public static void DOMDocumentSerializer_serialize(Object serializer, Node node)
- throws Exception
- {
- if (fiDOMDocumentSerializer_serialize == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- fiDOMDocumentSerializer_serialize.invoke(serializer, new Object[] { node });
- }
-
- public static void DOMDocumentSerializer_setOutputStream(Object serializer,
- OutputStream os) throws Exception
- {
- if (fiDOMDocumentSerializer_setOutputStream == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- fiDOMDocumentSerializer_setOutputStream.invoke(serializer, new Object[] { os });
- }
-
- // -- FastInfosetSource ----------------------------------------------
-
- public static boolean isFastInfosetSource(Source source) {
- return source.getClass().getName().equals(
- "com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSource");
- }
-
- public static Class getFastInfosetSource_class() {
- if (fiFastInfosetSource_class == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
-
- return fiFastInfosetSource_class;
- }
- public static Source FastInfosetSource_new(InputStream is)
- throws Exception
- {
- if (fiFastInfosetSource_new == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- return (Source) fiFastInfosetSource_new.newInstance(new Object[] { is });
- }
-
- public static InputStream FastInfosetSource_getInputStream(Source source)
- throws Exception
- {
- if (fiFastInfosetSource_getInputStream == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- return (InputStream) fiFastInfosetSource_getInputStream.invoke(source, (Object[])null);
- }
-
- public static void FastInfosetSource_setInputStream(Source source,
- InputStream is) throws Exception
- {
- if (fiFastInfosetSource_setInputStream == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- fiFastInfosetSource_setInputStream.invoke(source, new Object[] { is });
- }
-
- // -- FastInfosetResult ----------------------------------------------
-
- public static boolean isFastInfosetResult(Result result) {
- return result.getClass().getName().equals(
- "com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetResult");
- }
-
- public static Result FastInfosetResult_new(OutputStream os)
- throws Exception
- {
- if (fiFastInfosetResult_new == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- return (Result) fiFastInfosetResult_new.newInstance(new Object[] { os });
- }
-
- public static OutputStream FastInfosetResult_getOutputStream(Result result)
- throws Exception
- {
- if (fiFastInfosetResult_getOutputStream == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- return (OutputStream) fiFastInfosetResult_getOutputStream.invoke(result, (Object[])null);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java
deleted file mode 100644
index eb371c2c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-/**
- * {@link ArrayList} with a final marker to help JIT.
- * @author Kohsuke Kawaguchi
- */
-public final class FinalArrayList extends ArrayList {
- public FinalArrayList(int initialCapacity) {
- super(initialCapacity);
- }
-
- public FinalArrayList() {
- }
-
- public FinalArrayList(Collection collection) {
- super(collection);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java
deleted file mode 100644
index be201d31..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.io.*;
-
-import javax.xml.transform.stream.StreamSource;
-
-
-/**
- *
- * @author Anil Vijendran
- */
-public class JAXMStreamSource extends StreamSource {
- InputStream in;
- Reader reader;
- private static final boolean lazyContentLength;
- static {
- lazyContentLength = SAAJUtil.getSystemBoolean("saaj.lazy.contentlength");
- }
- public JAXMStreamSource(InputStream is) throws IOException {
- if (lazyContentLength) {
- in = is;
- } else if (is instanceof ByteInputStream) {
- this.in = (ByteInputStream) is;
- } else {
- ByteOutputStream bout = new ByteOutputStream();
- bout.write(is);
- this.in = bout.newInputStream();
- }
- }
-
- public JAXMStreamSource(Reader rdr) throws IOException {
-
- if (lazyContentLength) {
- this.reader = rdr;
- return;
- }
- CharWriter cout = new CharWriter();
- char[] temp = new char[1024];
- int len;
-
- while (-1 != (len = rdr.read(temp)))
- cout.write(temp, 0, len);
-
- this.reader = new CharReader(cout.getChars(), cout.getCount());
- }
-
- public InputStream getInputStream() {
- return in;
- }
-
- public Reader getReader() {
- return reader;
- }
-
- public void reset() throws IOException {
- if (in != null)
- in.reset();
- if (reader != null)
- reader.reset();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java
deleted file mode 100644
index 5620013b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java
+++ /dev/null
@@ -1,1380 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-// Imported from: org.apache.xerces.util
-// Needed to work around differences in JDK1.2 and 1.3 and deal with userInfo
-
-import java.io.IOException;
-import java.io.Serializable;
-
-
-/**********************************************************************
-* A class to represent a Uniform Resource Identifier (URI). This class
-* is designed to handle the parsing of URIs and provide access to
-* the various components (scheme, host, port, userinfo, path, query
-* string and fragment) that may constitute a URI.
-* <p>
-* Parsing of a URI specification is done according to the URI
-* syntax described in RFC 2396
-* <http://www.ietf.org/rfc/rfc2396.txt?number=2396>. Every URI consists
-* of a scheme, followed by a colon (':'), followed by a scheme-specific
-* part. For URIs that follow the "generic URI" syntax, the scheme-
-* specific part begins with two slashes ("//") and may be followed
-* by an authority segment (comprised of user information, host, and
-* port), path segment, query segment and fragment. Note that RFC 2396
-* no longer specifies the use of the parameters segment and excludes
-* the "user:password" syntax as part of the authority segment. If
-* "user:password" appears in a URI, the entire user/password string
-* is stored as userinfo.
-* <p>
-* For URIs that do not follow the "generic URI" syntax (e.g. mailto),
-* the entire scheme-specific part is treated as the "path" portion
-* of the URI.
-* <p>
-* Note that, unlike the java.net.URL class, this class does not provide
-* any built-in network access functionality nor does it provide any
-* scheme-specific functionality (for example, it does not know a
-* default port for a specific scheme). Rather, it only knows the
-* grammar and basic set of operations that can be applied to a URI.
-*
-* @version
-*
-**********************************************************************/
- public class JaxmURI implements Serializable {
-
- /*******************************************************************
- * MalformedURIExceptions are thrown in the process of building a URI
- * or setting fields on a URI when an operation would result in an
- * invalid URI specification.
- *
- ********************************************************************/
- public static class MalformedURIException extends IOException {
-
- /******************************************************************
- * Constructs a <code>MalformedURIException</code> with no specified
- * detail message.
- ******************************************************************/
- public MalformedURIException() {
- super();
- }
-
- /*****************************************************************
- * Constructs a <code>MalformedURIException</code> with the
- * specified detail message.
- *
- * @param p_msg the detail message.
- ******************************************************************/
- public MalformedURIException(String p_msg) {
- super(p_msg);
- }
- }
-
- /** reserved characters */
- private static final String RESERVED_CHARACTERS = ";/?:@&=+$,";
-
- /** URI punctuation mark characters - these, combined with
- alphanumerics, constitute the "unreserved" characters */
- private static final String MARK_CHARACTERS = "-_.!~*'() ";
-
- /** scheme can be composed of alphanumerics and these characters */
- private static final String SCHEME_CHARACTERS = "+-.";
-
- /** userinfo can be composed of unreserved, escaped and these
- characters */
- private static final String USERINFO_CHARACTERS = ";:&=+$,";
-
- /** Stores the scheme (usually the protocol) for this URI. */
- private String m_scheme = null;
-
- /** If specified, stores the userinfo for this URI; otherwise null */
- private String m_userinfo = null;
-
- /** If specified, stores the host for this URI; otherwise null */
- private String m_host = null;
-
- /** If specified, stores the port for this URI; otherwise -1 */
- private int m_port = -1;
-
- /** If specified, stores the path for this URI; otherwise null */
- private String m_path = null;
-
- /** If specified, stores the query string for this URI; otherwise
- null. */
- private String m_queryString = null;
-
- /** If specified, stores the fragment for this URI; otherwise null */
- private String m_fragment = null;
-
- private static boolean DEBUG = false;
-
- /**
- * Construct a new and uninitialized URI.
- */
- public JaxmURI() {
- }
-
- /**
- * Construct a new URI from another URI. All fields for this URI are
- * set equal to the fields of the URI passed in.
- *
- * @param p_other the URI to copy (cannot be null)
- */
- public JaxmURI(JaxmURI p_other) {
- initialize(p_other);
- }
-
- /**
- * Construct a new URI from a URI specification string. If the
- * specification follows the "generic URI" syntax, (two slashes
- * following the first colon), the specification will be parsed
- * accordingly - setting the scheme, userinfo, host,port, path, query
- * string and fragment fields as necessary. If the specification does
- * not follow the "generic URI" syntax, the specification is parsed
- * into a scheme and scheme-specific part (stored as the path) only.
- *
- * @param p_uriSpec the URI specification string (cannot be null or
- * empty)
- *
- * @exception MalformedURIException if p_uriSpec violates any syntax
- * rules
- */
- public JaxmURI(String p_uriSpec) throws MalformedURIException {
- this((JaxmURI)null, p_uriSpec);
- }
-
- /**
- * Construct a new URI from a base URI and a URI specification string.
- * The URI specification string may be a relative URI.
- *
- * @param p_base the base URI (cannot be null if p_uriSpec is null or
- * empty)
- * @param p_uriSpec the URI specification string (cannot be null or
- * empty if p_base is null)
- *
- * @exception MalformedURIException if p_uriSpec violates any syntax
- * rules
- */
- public JaxmURI(JaxmURI p_base, String p_uriSpec) throws MalformedURIException {
- initialize(p_base, p_uriSpec);
- }
-
- /**
- * Construct a new URI that does not follow the generic URI syntax.
- * Only the scheme and scheme-specific part (stored as the path) are
- * initialized.
- *
- * @param p_scheme the URI scheme (cannot be null or empty)
- * @param p_schemeSpecificPart the scheme-specific part (cannot be
- * null or empty)
- *
- * @exception MalformedURIException if p_scheme violates any
- * syntax rules
- */
- public JaxmURI(String p_scheme, String p_schemeSpecificPart)
- throws MalformedURIException {
- if (p_scheme == null || p_scheme.trim().length() == 0) {
- throw new MalformedURIException(
- "Cannot construct URI with null/empty scheme!");
- }
- if (p_schemeSpecificPart == null ||
- p_schemeSpecificPart.trim().length() == 0) {
- throw new MalformedURIException(
- "Cannot construct URI with null/empty scheme-specific part!");
- }
- setScheme(p_scheme);
- setPath(p_schemeSpecificPart);
- }
-
- /**
- * Construct a new URI that follows the generic URI syntax from its
- * component parts. Each component is validated for syntax and some
- * basic semantic checks are performed as well. See the individual
- * setter methods for specifics.
- *
- * @param p_scheme the URI scheme (cannot be null or empty)
- * @param p_host the hostname or IPv4 address for the URI
- * @param p_path the URI path - if the path contains '?' or '#',
- * then the query string and/or fragment will be
- * set from the path; however, if the query and
- * fragment are specified both in the path and as
- * separate parameters, an exception is thrown
- * @param p_queryString the URI query string (cannot be specified
- * if path is null)
- * @param p_fragment the URI fragment (cannot be specified if path
- * is null)
- *
- * @exception MalformedURIException if any of the parameters violates
- * syntax rules or semantic rules
- */
- public JaxmURI(String p_scheme, String p_host, String p_path,
- String p_queryString, String p_fragment)
- throws MalformedURIException {
- this(p_scheme, null, p_host, -1, p_path, p_queryString, p_fragment);
- }
-
- /**
- * Construct a new URI that follows the generic URI syntax from its
- * component parts. Each component is validated for syntax and some
- * basic semantic checks are performed as well. See the individual
- * setter methods for specifics.
- *
- * @param p_scheme the URI scheme (cannot be null or empty)
- * @param p_userinfo the URI userinfo (cannot be specified if host
- * is null)
- * @param p_host the hostname or IPv4 address for the URI
- * @param p_port the URI port (may be -1 for "unspecified"; cannot
- * be specified if host is null)
- * @param p_path the URI path - if the path contains '?' or '#',
- * then the query string and/or fragment will be
- * set from the path; however, if the query and
- * fragment are specified both in the path and as
- * separate parameters, an exception is thrown
- * @param p_queryString the URI query string (cannot be specified
- * if path is null)
- * @param p_fragment the URI fragment (cannot be specified if path
- * is null)
- *
- * @exception MalformedURIException if any of the parameters violates
- * syntax rules or semantic rules
- */
- public JaxmURI(String p_scheme, String p_userinfo,
- String p_host, int p_port, String p_path,
- String p_queryString, String p_fragment)
- throws MalformedURIException {
- if (p_scheme == null || p_scheme.trim().length() == 0) {
- throw new MalformedURIException("Scheme is required!");
- }
-
- if (p_host == null) {
- if (p_userinfo != null) {
- throw new MalformedURIException(
- "Userinfo may not be specified if host is not specified!");
- }
- if (p_port != -1) {
- throw new MalformedURIException(
- "Port may not be specified if host is not specified!");
- }
- }
-
- if (p_path != null) {
- if (p_path.indexOf('?') != -1 && p_queryString != null) {
- throw new MalformedURIException(
- "Query string cannot be specified in path and query string!");
- }
-
- if (p_path.indexOf('#') != -1 && p_fragment != null) {
- throw new MalformedURIException(
- "Fragment cannot be specified in both the path and fragment!");
- }
- }
-
- setScheme(p_scheme);
- setHost(p_host);
- setPort(p_port);
- setUserinfo(p_userinfo);
- setPath(p_path);
- setQueryString(p_queryString);
- setFragment(p_fragment);
- }
-
- /**
- * Initialize all fields of this URI from another URI.
- *
- * @param p_other the URI to copy (cannot be null)
- */
- private void initialize(JaxmURI p_other) {
- m_scheme = p_other.getScheme();
- m_userinfo = p_other.getUserinfo();
- m_host = p_other.getHost();
- m_port = p_other.getPort();
- m_path = p_other.getPath();
- m_queryString = p_other.getQueryString();
- m_fragment = p_other.getFragment();
- }
-
- /**
- * Initializes this URI from a base URI and a URI specification string.
- * See RFC 2396 Section 4 and Appendix B for specifications on parsing
- * the URI and Section 5 for specifications on resolving relative URIs
- * and relative paths.
- *
- * @param p_base the base URI (may be null if p_uriSpec is an absolute
- * URI)
- * @param p_uriSpec the URI spec string which may be an absolute or
- * relative URI (can only be null/empty if p_base
- * is not null)
- *
- * @exception MalformedURIException if p_base is null and p_uriSpec
- * is not an absolute URI or if
- * p_uriSpec violates syntax rules
- */
- private void initialize(JaxmURI p_base, String p_uriSpec)
- throws MalformedURIException {
- if (p_base == null &&
- (p_uriSpec == null || p_uriSpec.trim().length() == 0)) {
- throw new MalformedURIException(
- "Cannot initialize URI with empty parameters.");
- }
-
- // just make a copy of the base if spec is empty
- if (p_uriSpec == null || p_uriSpec.trim().length() == 0) {
- initialize(p_base);
- return;
- }
-
- String uriSpec = p_uriSpec.trim();
- int uriSpecLen = uriSpec.length();
- int index = 0;
-
- // Check for scheme, which must be before `/'. Also handle names with
- // DOS drive letters ('D:'), so 1-character schemes are not allowed.
- int colonIdx = uriSpec.indexOf(':');
- int slashIdx = uriSpec.indexOf('/');
- if ((colonIdx < 2) || (colonIdx > slashIdx && slashIdx != -1)) {
- int fragmentIdx = uriSpec.indexOf('#');
- // A standalone base is a valid URI according to spec
- if (p_base == null && fragmentIdx != 0 ) {
- throw new MalformedURIException("No scheme found in URI.");
- }
- }
- else {
- initializeScheme(uriSpec);
- index = m_scheme.length()+1;
- }
-
- // two slashes means generic URI syntax, so we get the authority
- if (((index+1) < uriSpecLen) &&
- (uriSpec.substring(index).startsWith("//"))) {
- index += 2;
- int startPos = index;
-
- // get authority - everything up to path, query or fragment
- char testChar = '\0';
- while (index < uriSpecLen) {
- testChar = uriSpec.charAt(index);
- if (testChar == '/' || testChar == '?' || testChar == '#') {
- break;
- }
- index++;
- }
-
- // if we found authority, parse it out, otherwise we set the
- // host to empty string
- if (index > startPos) {
- initializeAuthority(uriSpec.substring(startPos, index));
- }
- else {
- m_host = "";
- }
- }
-
- initializePath(uriSpec.substring(index));
-
- // Resolve relative URI to base URI - see RFC 2396 Section 5.2
- // In some cases, it might make more sense to throw an exception
- // (when scheme is specified is the string spec and the base URI
- // is also specified, for example), but we're just following the
- // RFC specifications
- if (p_base != null) {
-
- // check to see if this is the current doc - RFC 2396 5.2 #2
- // note that this is slightly different from the RFC spec in that
- // we don't include the check for query string being null
- // - this handles cases where the urispec is just a query
- // string or a fragment (e.g. "?y" or "#s") -
- // see <http://www.ics.uci.edu/~fielding/url/test1.html> which
- // identified this as a bug in the RFC
- if (m_path.length() == 0 && m_scheme == null &&
- m_host == null) {
- m_scheme = p_base.getScheme();
- m_userinfo = p_base.getUserinfo();
- m_host = p_base.getHost();
- m_port = p_base.getPort();
- m_path = p_base.getPath();
-
- if (m_queryString == null) {
- m_queryString = p_base.getQueryString();
- }
- return;
- }
-
- // check for scheme - RFC 2396 5.2 #3
- // if we found a scheme, it means absolute URI, so we're done
- if (m_scheme == null) {
- m_scheme = p_base.getScheme();
- }
- else {
- return;
- }
-
- // check for authority - RFC 2396 5.2 #4
- // if we found a host, then we've got a network path, so we're done
- if (m_host == null) {
- m_userinfo = p_base.getUserinfo();
- m_host = p_base.getHost();
- m_port = p_base.getPort();
- }
- else {
- return;
- }
-
- // check for absolute path - RFC 2396 5.2 #5
- if (m_path.length() > 0 &&
- m_path.startsWith("/")) {
- return;
- }
-
- // if we get to this point, we need to resolve relative path
- // RFC 2396 5.2 #6
- String path = "";
- String basePath = p_base.getPath();
-
- // 6a - get all but the last segment of the base URI path
- if (basePath != null) {
- int lastSlash = basePath.lastIndexOf('/');
- if (lastSlash != -1) {
- path = basePath.substring(0, lastSlash+1);
- }
- }
-
- // 6b - append the relative URI path
- path = path.concat(m_path);
-
- // 6c - remove all "./" where "." is a complete path segment
- index = -1;
- while ((index = path.indexOf("/./")) != -1) {
- path = path.substring(0, index+1).concat(path.substring(index+3));
- }
-
- // 6d - remove "." if path ends with "." as a complete path segment
- if (path.endsWith("/.")) {
- path = path.substring(0, path.length()-1);
- }
-
- // 6e - remove all "<segment>/../" where "<segment>" is a complete
- // path segment not equal to ".."
- index = 1;
- int segIndex = -1;
- String tempString = null;
-
- while ((index = path.indexOf("/../", index)) > 0) {
- tempString = path.substring(0, path.indexOf("/../"));
- segIndex = tempString.lastIndexOf('/');
- if (segIndex != -1) {
- if (!tempString.substring(segIndex++).equals("..")) {
- path = path.substring(0, segIndex).concat(path.substring(index+4));
- }
- else
- index += 4;
- }
- else
- index += 4;
- }
-
- // 6f - remove ending "<segment>/.." where "<segment>" is a
- // complete path segment
- if (path.endsWith("/..")) {
- tempString = path.substring(0, path.length()-3);
- segIndex = tempString.lastIndexOf('/');
- if (segIndex != -1) {
- path = path.substring(0, segIndex+1);
- }
- }
- m_path = path;
- }
- }
-
- /**
- * Initialize the scheme for this URI from a URI string spec.
- *
- * @param p_uriSpec the URI specification (cannot be null)
- *
- * @exception MalformedURIException if URI does not have a conformant
- * scheme
- */
- private void initializeScheme(String p_uriSpec)
- throws MalformedURIException {
- int uriSpecLen = p_uriSpec.length();
- int index = 0;
- String scheme = null;
- char testChar = '\0';
-
- while (index < uriSpecLen) {
- testChar = p_uriSpec.charAt(index);
- if (testChar == ':' || testChar == '/' ||
- testChar == '?' || testChar == '#') {
- break;
- }
- index++;
- }
- scheme = p_uriSpec.substring(0, index);
-
- if (scheme.length() == 0) {
- throw new MalformedURIException("No scheme found in URI.");
- }
- else {
- setScheme(scheme);
- }
- }
-
- /**
- * Initialize the authority (userinfo, host and port) for this
- * URI from a URI string spec.
- *
- * @param p_uriSpec the URI specification (cannot be null)
- *
- * @exception MalformedURIException if p_uriSpec violates syntax rules
- */
- private void initializeAuthority(String p_uriSpec)
- throws MalformedURIException {
- int index = 0;
- int start = 0;
- int end = p_uriSpec.length();
- char testChar = '\0';
- String userinfo = null;
-
- // userinfo is everything up @
- if (p_uriSpec.indexOf('@', start) != -1) {
- while (index < end) {
- testChar = p_uriSpec.charAt(index);
- if (testChar == '@') {
- break;
- }
- index++;
- }
- userinfo = p_uriSpec.substring(start, index);
- index++;
- }
-
- // host is everything up to ':'
- String host = null;
- start = index;
- while (index < end) {
- testChar = p_uriSpec.charAt(index);
- if (testChar == ':') {
- break;
- }
- index++;
- }
- host = p_uriSpec.substring(start, index);
- int port = -1;
- if (host.length() > 0) {
- // port
- if (testChar == ':') {
- index++;
- start = index;
- while (index < end) {
- index++;
- }
- String portStr = p_uriSpec.substring(start, index);
- if (portStr.length() > 0) {
- for (int i = 0; i < portStr.length(); i++) {
- if (!isDigit(portStr.charAt(i))) {
- throw new MalformedURIException(
- portStr +
- " is invalid. Port should only contain digits!");
- }
- }
- try {
- port = Integer.parseInt(portStr);
- }
- catch (NumberFormatException nfe) {
- // can't happen
- }
- }
- }
- }
- setHost(host);
- setPort(port);
- setUserinfo(userinfo);
- }
-
- /**
- * Initialize the path for this URI from a URI string spec.
- *
- * @param p_uriSpec the URI specification (cannot be null)
- *
- * @exception MalformedURIException if p_uriSpec violates syntax rules
- */
- private void initializePath(String p_uriSpec)
- throws MalformedURIException {
- if (p_uriSpec == null) {
- throw new MalformedURIException(
- "Cannot initialize path from null string!");
- }
-
- int index = 0;
- int start = 0;
- int end = p_uriSpec.length();
- char testChar = '\0';
-
- // path - everything up to query string or fragment
- while (index < end) {
- testChar = p_uriSpec.charAt(index);
- if (testChar == '?' || testChar == '#') {
- break;
- }
- // check for valid escape sequence
- if (testChar == '%') {
- if (index+2 >= end ||
- !isHex(p_uriSpec.charAt(index+1)) ||
- !isHex(p_uriSpec.charAt(index+2))) {
- throw new MalformedURIException(
- "Path contains invalid escape sequence!");
- }
- }
- else if (!isReservedCharacter(testChar) &&
- !isUnreservedCharacter(testChar)) {
- throw new MalformedURIException(
- "Path contains invalid character: " + testChar);
- }
- index++;
- }
- m_path = p_uriSpec.substring(start, index);
-
- // query - starts with ? and up to fragment or end
- if (testChar == '?') {
- index++;
- start = index;
- while (index < end) {
- testChar = p_uriSpec.charAt(index);
- if (testChar == '#') {
- break;
- }
- if (testChar == '%') {
- if (index+2 >= end ||
- !isHex(p_uriSpec.charAt(index+1)) ||
- !isHex(p_uriSpec.charAt(index+2))) {
- throw new MalformedURIException(
- "Query string contains invalid escape sequence!");
- }
- }
- else if (!isReservedCharacter(testChar) &&
- !isUnreservedCharacter(testChar)) {
- throw new MalformedURIException(
- "Query string contains invalid character:" + testChar);
- }
- index++;
- }
- m_queryString = p_uriSpec.substring(start, index);
- }
-
- // fragment - starts with #
- if (testChar == '#') {
- index++;
- start = index;
- while (index < end) {
- testChar = p_uriSpec.charAt(index);
-
- if (testChar == '%') {
- if (index+2 >= end ||
- !isHex(p_uriSpec.charAt(index+1)) ||
- !isHex(p_uriSpec.charAt(index+2))) {
- throw new MalformedURIException(
- "Fragment contains invalid escape sequence!");
- }
- }
- else if (!isReservedCharacter(testChar) &&
- !isUnreservedCharacter(testChar)) {
- throw new MalformedURIException(
- "Fragment contains invalid character:"+testChar);
- }
- index++;
- }
- m_fragment = p_uriSpec.substring(start, index);
- }
- }
-
- /**
- * Get the scheme for this URI.
- *
- * @return the scheme for this URI
- */
- public String getScheme() {
- return m_scheme;
- }
-
- /**
- * Get the scheme-specific part for this URI (everything following the
- * scheme and the first colon). See RFC 2396 Section 5.2 for spec.
- *
- * @return the scheme-specific part for this URI
- */
- public String getSchemeSpecificPart() {
- StringBuffer schemespec = new StringBuffer();
-
- if (m_userinfo != null || m_host != null || m_port != -1) {
- schemespec.append("//");
- }
-
- if (m_userinfo != null) {
- schemespec.append(m_userinfo);
- schemespec.append('@');
- }
-
- if (m_host != null) {
- schemespec.append(m_host);
- }
-
- if (m_port != -1) {
- schemespec.append(':');
- schemespec.append(m_port);
- }
-
- if (m_path != null) {
- schemespec.append((m_path));
- }
-
- if (m_queryString != null) {
- schemespec.append('?');
- schemespec.append(m_queryString);
- }
-
- if (m_fragment != null) {
- schemespec.append('#');
- schemespec.append(m_fragment);
- }
-
- return schemespec.toString();
- }
-
- /**
- * Get the userinfo for this URI.
- *
- * @return the userinfo for this URI (null if not specified).
- */
- public String getUserinfo() {
- return m_userinfo;
- }
-
- /**
- * Get the host for this URI.
- *
- * @return the host for this URI (null if not specified).
- */
- public String getHost() {
- return m_host;
- }
-
- /**
- * Get the port for this URI.
- *
- * @return the port for this URI (-1 if not specified).
- */
- public int getPort() {
- return m_port;
- }
-
- /**
- * Get the path for this URI (optionally with the query string and
- * fragment).
- *
- * @param p_includeQueryString if true (and query string is not null),
- * then a "?" followed by the query string
- * will be appended
- * @param p_includeFragment if true (and fragment is not null),
- * then a "#" followed by the fragment
- * will be appended
- *
- * @return the path for this URI possibly including the query string
- * and fragment
- */
- public String getPath(boolean p_includeQueryString,
- boolean p_includeFragment) {
- StringBuffer pathString = new StringBuffer(m_path);
-
- if (p_includeQueryString && m_queryString != null) {
- pathString.append('?');
- pathString.append(m_queryString);
- }
-
- if (p_includeFragment && m_fragment != null) {
- pathString.append('#');
- pathString.append(m_fragment);
- }
- return pathString.toString();
- }
-
- /**
- * Get the path for this URI. Note that the value returned is the path
- * only and does not include the query string or fragment.
- *
- * @return the path for this URI.
- */
- public String getPath() {
- return m_path;
- }
-
- /**
- * Get the query string for this URI.
- *
- * @return the query string for this URI. Null is returned if there
- * was no "?" in the URI spec, empty string if there was a
- * "?" but no query string following it.
- */
- public String getQueryString() {
- return m_queryString;
- }
-
- /**
- * Get the fragment for this URI.
- *
- * @return the fragment for this URI. Null is returned if there
- * was no "#" in the URI spec, empty string if there was a
- * "#" but no fragment following it.
- */
- public String getFragment() {
- return m_fragment;
- }
-
- /**
- * Set the scheme for this URI. The scheme is converted to lowercase
- * before it is set.
- *
- * @param p_scheme the scheme for this URI (cannot be null)
- *
- * @exception MalformedURIException if p_scheme is not a conformant
- * scheme name
- */
- public void setScheme(String p_scheme) throws MalformedURIException {
- if (p_scheme == null) {
- throw new MalformedURIException(
- "Cannot set scheme from null string!");
- }
- if (!isConformantSchemeName(p_scheme)) {
- throw new MalformedURIException("The scheme is not conformant.");
- }
-
- m_scheme = p_scheme.toLowerCase();
- }
-
- /**
- * Set the userinfo for this URI. If a non-null value is passed in and
- * the host value is null, then an exception is thrown.
- *
- * @param p_userinfo the userinfo for this URI
- *
- * @exception MalformedURIException if p_userinfo contains invalid
- * characters
- */
- public void setUserinfo(String p_userinfo) throws MalformedURIException {
- if (p_userinfo == null) {
- m_userinfo = null;
- }
- else {
- if (m_host == null) {
- throw new MalformedURIException(
- "Userinfo cannot be set when host is null!");
- }
-
- // userinfo can contain alphanumerics, mark characters, escaped
- // and ';',':','&','=','+','$',','
- int index = 0;
- int end = p_userinfo.length();
- char testChar = '\0';
- while (index < end) {
- testChar = p_userinfo.charAt(index);
- if (testChar == '%') {
- if (index+2 >= end ||
- !isHex(p_userinfo.charAt(index+1)) ||
- !isHex(p_userinfo.charAt(index+2))) {
- throw new MalformedURIException(
- "Userinfo contains invalid escape sequence!");
- }
- }
- else if (!isUnreservedCharacter(testChar) &&
- USERINFO_CHARACTERS.indexOf(testChar) == -1) {
- throw new MalformedURIException(
- "Userinfo contains invalid character:"+testChar);
- }
- index++;
- }
- }
- m_userinfo = p_userinfo;
- }
-
- /**
- * Set the host for this URI. If null is passed in, the userinfo
- * field is also set to null and the port is set to -1.
- *
- * @param p_host the host for this URI
- *
- * @exception MalformedURIException if p_host is not a valid IP
- * address or DNS hostname.
- */
- public void setHost(String p_host) throws MalformedURIException {
- if (p_host == null || p_host.trim().length() == 0) {
- m_host = p_host;
- m_userinfo = null;
- m_port = -1;
- }
- else if (!isWellFormedAddress(p_host)) {
- throw new MalformedURIException("Host is not a well formed address!");
- }
- m_host = p_host;
- }
-
- /**
- * Set the port for this URI. -1 is used to indicate that the port is
- * not specified, otherwise valid port numbers are between 0 and 65535.
- * If a valid port number is passed in and the host field is null,
- * an exception is thrown.
- *
- * @param p_port the port number for this URI
- *
- * @exception MalformedURIException if p_port is not -1 and not a
- * valid port number
- */
- public void setPort(int p_port) throws MalformedURIException {
- if (p_port >= 0 && p_port <= 65535) {
- if (m_host == null) {
- throw new MalformedURIException(
- "Port cannot be set when host is null!");
- }
- }
- else if (p_port != -1) {
- throw new MalformedURIException("Invalid port number!");
- }
- m_port = p_port;
- }
-
- /**
- * Set the path for this URI. If the supplied path is null, then the
- * query string and fragment are set to null as well. If the supplied
- * path includes a query string and/or fragment, these fields will be
- * parsed and set as well. Note that, for URIs following the "generic
- * URI" syntax, the path specified should start with a slash.
- * For URIs that do not follow the generic URI syntax, this method
- * sets the scheme-specific part.
- *
- * @param p_path the path for this URI (may be null)
- *
- * @exception MalformedURIException if p_path contains invalid
- * characters
- */
- public void setPath(String p_path) throws MalformedURIException {
- if (p_path == null) {
- m_path = null;
- m_queryString = null;
- m_fragment = null;
- }
- else {
- initializePath(p_path);
- }
- }
-
- /**
- * Append to the end of the path of this URI. If the current path does
- * not end in a slash and the path to be appended does not begin with
- * a slash, a slash will be appended to the current path before the
- * new segment is added. Also, if the current path ends in a slash
- * and the new segment begins with a slash, the extra slash will be
- * removed before the new segment is appended.
- *
- * @param p_addToPath the new segment to be added to the current path
- *
- * @exception MalformedURIException if p_addToPath contains syntax
- * errors
- */
- public void appendPath(String p_addToPath)
- throws MalformedURIException {
- if (p_addToPath == null || p_addToPath.trim().length() == 0) {
- return;
- }
-
- if (!isURIString(p_addToPath)) {
- throw new MalformedURIException(
- "Path contains invalid character!");
- }
-
- if (m_path == null || m_path.trim().length() == 0) {
- if (p_addToPath.startsWith("/")) {
- m_path = p_addToPath;
- }
- else {
- m_path = "/" + p_addToPath;
- }
- }
- else if (m_path.endsWith("/")) {
- if (p_addToPath.startsWith("/")) {
- m_path = m_path.concat(p_addToPath.substring(1));
- }
- else {
- m_path = m_path.concat(p_addToPath);
- }
- }
- else {
- if (p_addToPath.startsWith("/")) {
- m_path = m_path.concat(p_addToPath);
- }
- else {
- m_path = m_path.concat("/" + p_addToPath);
- }
- }
- }
-
- /**
- * Set the query string for this URI. A non-null value is valid only
- * if this is an URI conforming to the generic URI syntax and
- * the path value is not null.
- *
- * @param p_queryString the query string for this URI
- *
- * @exception MalformedURIException if p_queryString is not null and this
- * URI does not conform to the generic
- * URI syntax or if the path is null
- */
- public void setQueryString(String p_queryString) throws MalformedURIException {
- if (p_queryString == null) {
- m_queryString = null;
- }
- else if (!isGenericURI()) {
- throw new MalformedURIException(
- "Query string can only be set for a generic URI!");
- }
- else if (getPath() == null) {
- throw new MalformedURIException(
- "Query string cannot be set when path is null!");
- }
- else if (!isURIString(p_queryString)) {
- throw new MalformedURIException(
- "Query string contains invalid character!");
- }
- else {
- m_queryString = p_queryString;
- }
- }
-
- /**
- * Set the fragment for this URI. A non-null value is valid only
- * if this is a URI conforming to the generic URI syntax and
- * the path value is not null.
- *
- * @param p_fragment the fragment for this URI
- *
- * @exception MalformedURIException if p_fragment is not null and this
- * URI does not conform to the generic
- * URI syntax or if the path is null
- */
- public void setFragment(String p_fragment) throws MalformedURIException {
- if (p_fragment == null) {
- m_fragment = null;
- }
- else if (!isGenericURI()) {
- throw new MalformedURIException(
- "Fragment can only be set for a generic URI!");
- }
- else if (getPath() == null) {
- throw new MalformedURIException(
- "Fragment cannot be set when path is null!");
- }
- else if (!isURIString(p_fragment)) {
- throw new MalformedURIException(
- "Fragment contains invalid character!");
- }
- else {
- m_fragment = p_fragment;
- }
- }
-
- /**
- * Determines if the passed-in Object is equivalent to this URI.
- *
- * @param p_test the Object to test for equality.
- *
- * @return true if p_test is a URI with all values equal to this
- * URI, false otherwise
- */
- public boolean equals(Object p_test) {
- if (p_test instanceof JaxmURI) {
- JaxmURI testURI = (JaxmURI) p_test;
- if (((m_scheme == null && testURI.m_scheme == null) ||
- (m_scheme != null && testURI.m_scheme != null &&
- m_scheme.equals(testURI.m_scheme))) &&
- ((m_userinfo == null && testURI.m_userinfo == null) ||
- (m_userinfo != null && testURI.m_userinfo != null &&
- m_userinfo.equals(testURI.m_userinfo))) &&
- ((m_host == null && testURI.m_host == null) ||
- (m_host != null && testURI.m_host != null &&
- m_host.equals(testURI.m_host))) &&
- m_port == testURI.m_port &&
- ((m_path == null && testURI.m_path == null) ||
- (m_path != null && testURI.m_path != null &&
- m_path.equals(testURI.m_path))) &&
- ((m_queryString == null && testURI.m_queryString == null) ||
- (m_queryString != null && testURI.m_queryString != null &&
- m_queryString.equals(testURI.m_queryString))) &&
- ((m_fragment == null && testURI.m_fragment == null) ||
- (m_fragment != null && testURI.m_fragment != null &&
- m_fragment.equals(testURI.m_fragment)))) {
- return true;
- }
- }
- return false;
- }
-
- public int hashCode() {
- // No members safe to use, just default to a constant.
- return 153214;
- }
-
- /**
- * Get the URI as a string specification. See RFC 2396 Section 5.2.
- *
- * @return the URI string specification
- */
- public String toString() {
- StringBuffer uriSpecString = new StringBuffer();
-
- if (m_scheme != null) {
- uriSpecString.append(m_scheme);
- uriSpecString.append(':');
- }
- uriSpecString.append(getSchemeSpecificPart());
- return uriSpecString.toString();
- }
-
- /**
- * Get the indicator as to whether this URI uses the "generic URI"
- * syntax.
- *
- * @return true if this URI uses the "generic URI" syntax, false
- * otherwise
- */
- public boolean isGenericURI() {
- // presence of the host (whether valid or empty) means
- // double-slashes which means generic uri
- return (m_host != null);
- }
-
- /**
- * Determine whether a scheme conforms to the rules for a scheme name.
- * A scheme is conformant if it starts with an alphanumeric, and
- * contains only alphanumerics, '+','-' and '.'.
- *
- * @return true if the scheme is conformant, false otherwise
- */
- public static boolean isConformantSchemeName(String p_scheme) {
- if (p_scheme == null || p_scheme.trim().length() == 0) {
- return false;
- }
-
- if (!isAlpha(p_scheme.charAt(0))) {
- return false;
- }
-
- char testChar;
- for (int i = 1; i < p_scheme.length(); i++) {
- testChar = p_scheme.charAt(i);
- if (!isAlphanum(testChar) &&
- SCHEME_CHARACTERS.indexOf(testChar) == -1) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Determine whether a string is syntactically capable of representing
- * a valid IPv4 address or the domain name of a network host. A valid
- * IPv4 address consists of four decimal digit groups separated by a
- * '.'. A hostname consists of domain labels (each of which must
- * begin and end with an alphanumeric but may contain '-') separated
- & by a '.'. See RFC 2396 Section 3.2.2.
- *
- * @return true if the string is a syntactically valid IPv4 address
- * or hostname
- */
- public static boolean isWellFormedAddress(String p_address) {
- if (p_address == null) {
- return false;
- }
-
- String address = p_address.trim();
- int addrLength = address.length();
- if (addrLength == 0 || addrLength > 255) {
- return false;
- }
-
- if (address.startsWith(".") || address.startsWith("-")) {
- return false;
- }
-
- // rightmost domain label starting with digit indicates IP address
- // since top level domain label can only start with an alpha
- // see RFC 2396 Section 3.2.2
- int index = address.lastIndexOf('.');
- if (address.endsWith(".")) {
- index = address.substring(0, index).lastIndexOf('.');
- }
-
- if (index+1 < addrLength && isDigit(p_address.charAt(index+1))) {
- char testChar;
- int numDots = 0;
-
- // make sure that 1) we see only digits and dot separators, 2) that
- // any dot separator is preceded and followed by a digit and
- // 3) that we find 3 dots
- for (int i = 0; i < addrLength; i++) {
- testChar = address.charAt(i);
- if (testChar == '.') {
- if (!isDigit(address.charAt(i-1)) ||
- (i+1 < addrLength && !isDigit(address.charAt(i+1)))) {
- return false;
- }
- numDots++;
- }
- else if (!isDigit(testChar)) {
- return false;
- }
- }
- if (numDots != 3) {
- return false;
- }
- }
- else {
- // domain labels can contain alphanumerics and '-"
- // but must start and end with an alphanumeric
- char testChar;
-
- for (int i = 0; i < addrLength; i++) {
- testChar = address.charAt(i);
- if (testChar == '.') {
- if (!isAlphanum(address.charAt(i-1))) {
- return false;
- }
- if (i+1 < addrLength && !isAlphanum(address.charAt(i+1))) {
- return false;
- }
- }
- else if (!isAlphanum(testChar) && testChar != '-') {
- return false;
- }
- }
- }
- return true;
- }
-
-
- /**
- * Determine whether a char is a digit.
- *
- * @return true if the char is betweeen '0' and '9', false otherwise
- */
- private static boolean isDigit(char p_char) {
- return p_char >= '0' && p_char <= '9';
- }
-
- /**
- * Determine whether a character is a hexadecimal character.
- *
- * @return true if the char is betweeen '0' and '9', 'a' and 'f'
- * or 'A' and 'F', false otherwise
- */
- private static boolean isHex(char p_char) {
- return (isDigit(p_char) ||
- (p_char >= 'a' && p_char <= 'f') ||
- (p_char >= 'A' && p_char <= 'F'));
- }
-
- /**
- * Determine whether a char is an alphabetic character: a-z or A-Z
- *
- * @return true if the char is alphabetic, false otherwise
- */
- private static boolean isAlpha(char p_char) {
- return ((p_char >= 'a' && p_char <= 'z') ||
- (p_char >= 'A' && p_char <= 'Z' ));
- }
-
- /**
- * Determine whether a char is an alphanumeric: 0-9, a-z or A-Z
- *
- * @return true if the char is alphanumeric, false otherwise
- */
- private static boolean isAlphanum(char p_char) {
- return (isAlpha(p_char) || isDigit(p_char));
- }
-
- /**
- * Determine whether a character is a reserved character:
- * ';', '/', '?', ':', '@', '&', '=', '+', '$' or ','
- *
- * @return true if the string contains any reserved characters
- */
- private static boolean isReservedCharacter(char p_char) {
- return RESERVED_CHARACTERS.indexOf(p_char) != -1;
- }
-
- /**
- * Determine whether a char is an unreserved character.
- *
- * @return true if the char is unreserved, false otherwise
- */
- private static boolean isUnreservedCharacter(char p_char) {
- return (isAlphanum(p_char) ||
- MARK_CHARACTERS.indexOf(p_char) != -1);
- }
-
- /**
- * Determine whether a given string contains only URI characters (also
- * called "uric" in RFC 2396). uric consist of all reserved
- * characters, unreserved characters and escaped characters.
- *
- * @return true if the string is comprised of uric, false otherwise
- */
- private static boolean isURIString(String p_uric) {
- if (p_uric == null) {
- return false;
- }
- int end = p_uric.length();
- char testChar = '\0';
- for (int i = 0; i < end; i++) {
- testChar = p_uric.charAt(i);
- if (testChar == '%') {
- if (i+2 >= end ||
- !isHex(p_uric.charAt(i+1)) ||
- !isHex(p_uric.charAt(i+2))) {
- return false;
- }
- else {
- i += 2;
- continue;
- }
- }
- if (isReservedCharacter(testChar) ||
- isUnreservedCharacter(testChar)) {
- continue;
- }
- else {
- return false;
- }
- }
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings.properties
deleted file mode 100644
index b90489f2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for util pkg
-# Error messages
-SAAJ0601.util.newSAXParser.exception=SAAJ0601: Can't create RejectDoctypSaxFilter because SAXParserFactory.newSAXParser threw an exception. See stack trace for details
-SAAJ0602.util.getXMLReader.exception=SAAJ0602: Can't create RejectDoctypSaxFilter because SAXParser.getXMLReader threw an exception. See stack trace for details
-SAAJ0603.util.setProperty.exception=SAAJ0603: Can't create RejectDoctypSaxFilter because XMLReader.setProperty threw an exception. See stack trace for details
-
-# Info messages
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_de.properties
deleted file mode 100644
index f1b76ca6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_de.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for util pkg
-# Error messages
-SAAJ0601.util.newSAXParser.exception=SAAJ0601: RejectDoctypSaxFilter kann nicht erstellt werden, weil SAXParserFactory.newSAXParser eine Ausnahme ausgel\u00F6st hat. Weitere Einzelheiten finden Sie im Stack Trace
-SAAJ0602.util.getXMLReader.exception=SAAJ0602: RejectDoctypSaxFilter kann nicht erstellt werden, weil SAXParser.getXMLReader eine Ausnahme ausgel\u00F6st hat. Weitere Einzelheiten finden Sie im Stack Trace
-SAAJ0603.util.setProperty.exception=SAAJ0603: RejectDoctypSaxFilter kann nicht erstellt werden, weil XMLReader.setProperty eine Ausnahme ausgel\u00F6st hat. Weitere Einzelheiten finden Sie im Stack Trace
-
-# Info messages
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_es.properties
deleted file mode 100644
index dcd27aea..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_es.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for util pkg
-# Error messages
-SAAJ0601.util.newSAXParser.exception=SAAJ0601: no se puede crear RejectDoctypSaxFilter, porque SAXParserFactory.newSAXParser ha devuelto una excepci\u00F3n. Consulte el rastreo de pila para obtener m\u00E1s informaci\u00F3n
-SAAJ0602.util.getXMLReader.exception=SAAJ0602: no se puede crear RejectDoctypSaxFilter, porque SAXParser.getXMLReader ha devuelto una excepci\u00F3n. Consulte el rastreo de pila para obtener m\u00E1s informaci\u00F3n
-SAAJ0603.util.setProperty.exception=SAAJ0603: no se puede crear RejectDoctypSaxFilter porque XMLReader.setProperty ha devuelto una excepci\u00F3n. Consulte el rastreo de pila para obtener m\u00E1s informaci\u00F3n
-
-# Info messages
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_fr.properties
deleted file mode 100644
index 8291742c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_fr.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for util pkg
-# Error messages
-SAAJ0601.util.newSAXParser.exception=SAAJ0601 : impossible de cr\u00E9er RejectDoctypSaxFilter car SAXParserFactory.newSAXParser a g\u00E9n\u00E9r\u00E9 une exception. Pour plus de d\u00E9tails, consultez la trace de pile
-SAAJ0602.util.getXMLReader.exception=SAAJ0602 : impossible de cr\u00E9er RejectDoctypSaxFilter car SAXParser.getXMLReader a g\u00E9n\u00E9r\u00E9 une exception. Pour plus de d\u00E9tails, consultez la trace de pile
-SAAJ0603.util.setProperty.exception=SAAJ0603 : impossible de cr\u00E9er RejectDoctypSaxFilter car XMLReader.setProperty a g\u00E9n\u00E9r\u00E9 une exception. Pour plus de d\u00E9tails, consultez la trace de pile
-
-# Info messages
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_it.properties
deleted file mode 100644
index 6da55d9e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_it.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for util pkg
-# Error messages
-SAAJ0601.util.newSAXParser.exception=SAAJ0601: Impossibile creare RejectDoctypSaxFilter poich\u00E9 SAXParserFactory.newSAXParser ha restituito un'eccezione. Vedere lo stack trace per i dettagli.
-SAAJ0602.util.getXMLReader.exception=SAAJ0602: Impossibile creare RejectDoctypSaxFilter poich\u00E9 SAXParser.getXMLReader ha restituito un'eccezione. Vedere lo stack trace per i dettagli.
-SAAJ0603.util.setProperty.exception=SAAJ0603: Impossibile creare RejectDoctypSaxFilter poich\u00E9 XMLReader.setProperty ha restituito un'eccezione. Vedere lo stack trace per i dettagli.
-
-# Info messages
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ja.properties
deleted file mode 100644
index 1a959d78..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ja.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for util pkg
-# Error messages
-SAAJ0601.util.newSAXParser.exception=SAAJ0601: SAXParserFactory.newSAXParser\u304C\u4F8B\u5916\u3092\u30B9\u30ED\u30FC\u3057\u305F\u305F\u3081\u3001RejectDoctypSaxFilter\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u8A73\u7D30\u306F\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044
-SAAJ0602.util.getXMLReader.exception=SAAJ0602: SAXParser.getXMLReader\u304C\u4F8B\u5916\u3092\u30B9\u30ED\u30FC\u3057\u305F\u305F\u3081\u3001RejectDoctypSaxFilter\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u8A73\u7D30\u306F\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044
-SAAJ0603.util.setProperty.exception=SAAJ0603: XMLReader.setProperty\u304C\u4F8B\u5916\u3092\u30B9\u30ED\u30FC\u3057\u305F\u305F\u3081\u3001RejectDoctypSaxFilter\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u8A73\u7D30\u306F\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044
-
-# Info messages
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ko.properties
deleted file mode 100644
index 5340baa3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ko.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for util pkg
-# Error messages
-SAAJ0601.util.newSAXParser.exception=SAAJ0601: SAXParserFactory.newSAXParser\uB85C \uC778\uD574 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD558\uC5EC RejectDoctypSaxFilter\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uC2A4\uD0DD \uCD94\uC801\uC744 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.
-SAAJ0602.util.getXMLReader.exception=SAAJ0602: SAXParser.getXMLReader\uB85C \uC778\uD574 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD558\uC5EC RejectDoctypSaxFilter\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uC2A4\uD0DD \uCD94\uC801\uC744 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.
-SAAJ0603.util.setProperty.exception=SAAJ0603: XMLReader.setProperty\uB85C \uC778\uD574 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD558\uC5EC RejectDoctypSaxFilter\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uC2A4\uD0DD \uCD94\uC801\uC744 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.
-
-# Info messages
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_pt_BR.properties
deleted file mode 100644
index d833d3a6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_pt_BR.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for util pkg
-# Error messages
-SAAJ0601.util.newSAXParser.exception=SAAJ0601: n\u00E3o \u00E9 poss\u00EDvel criar RejectDoctypSaxFilter porque SAXParserFactory.newSAXParser gerou uma exce\u00E7\u00E3o. Consulte o rastreamento de pilha para obter detalhes
-SAAJ0602.util.getXMLReader.exception=SAAJ0602: n\u00E3o \u00E9 poss\u00EDvel criar RejectDoctypSaxFilter porque SAXParser.getXMLReader gerou uma exce\u00E7\u00E3o. Consulte a pilha de rastreamento para obter detalhes
-SAAJ0603.util.setProperty.exception=SAAJ0603: n\u00E3o \u00E9 poss\u00EDvel criar RejectDoctypSaxFilter porque XMLReader.setProperty gerou uma exce\u00E7\u00E3o. Consulte a pilha de rastreamento para obter detalhes
-
-# Info messages
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_CN.properties
deleted file mode 100644
index 411e38d2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_CN.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for util pkg
-# Error messages
-SAAJ0601.util.newSAXParser.exception=SAAJ0601: \u65E0\u6CD5\u521B\u5EFA RejectDoctypSaxFilter, \u56E0\u4E3A SAXParserFactory.newSAXParser \u629B\u51FA\u4E86\u5F02\u5E38\u9519\u8BEF\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u5806\u6808\u8DDF\u8E2A
-SAAJ0602.util.getXMLReader.exception=SAAJ0602: \u65E0\u6CD5\u521B\u5EFA RejectDoctypSaxFilter, \u56E0\u4E3A SAXParser.getXMLReader \u629B\u51FA\u4E86\u5F02\u5E38\u9519\u8BEF\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u5806\u6808\u8DDF\u8E2A
-SAAJ0603.util.setProperty.exception=SAAJ0603: \u65E0\u6CD5\u521B\u5EFA RejectDoctypSaxFilter, \u56E0\u4E3A XMLReader.setProperty \u629B\u51FA\u4E86\u5F02\u5E38\u9519\u8BEF\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u5806\u6808\u8DDF\u8E2A
-
-# Info messages
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_TW.properties
deleted file mode 100644
index 930907e7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_TW.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for util pkg
-# Error messages
-SAAJ0601.util.newSAXParser.exception=SAAJ0601: \u7121\u6CD5\u5EFA\u7ACB RejectDoctypSaxFilter, \u56E0\u70BA SAXParserFactory.newSAXParser \u767C\u751F\u7570\u5E38\u72C0\u6CC1. \u8ACB\u53C3\u95B1\u5806\u758A\u8FFD\u8E64\u4EE5\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A
-SAAJ0602.util.getXMLReader.exception=SAAJ0602: \u7121\u6CD5\u5EFA\u7ACB RejectDoctypSaxFilter, \u56E0\u70BA SAXParser.getXMLReader \u767C\u751F\u7570\u5E38\u72C0\u6CC1. \u8ACB\u53C3\u95B1\u5806\u758A\u8FFD\u8E64\u4EE5\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A
-SAAJ0603.util.setProperty.exception=SAAJ0603: \u7121\u6CD5\u5EFA\u7ACB RejectDoctypSaxFilter, \u56E0\u70BA XMLReader.setProperty \u767C\u751F\u7570\u5E38\u72C0\u6CC1. \u8ACB\u53C3\u95B1\u5806\u758A\u8FFD\u8E64\u4EE5\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A
-
-# Info messages
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LogDomainConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LogDomainConstants.java
deleted file mode 100644
index c075e56e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LogDomainConstants.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-/**
- * @author Manveen Kaur (manveen.kaur@eng.sun.com)
- */
-
-/**
- * This interface defines a number of constants pertaining to Logging domains.
- */
-
-public interface LogDomainConstants {
-
- public static String MODULE_TOPLEVEL_DOMAIN =
- "com.sun.xml.internal.messaging.saaj";
-
- // First Level Domain
- public static String CLIENT_DOMAIN =
- MODULE_TOPLEVEL_DOMAIN + ".client";
-
- public static String SOAP_DOMAIN =
- MODULE_TOPLEVEL_DOMAIN + ".soap";
-
- public static String UTIL_DOMAIN =
- MODULE_TOPLEVEL_DOMAIN + ".util";
-
- // Second Level Domain
- public static String HTTP_CONN_DOMAIN =
- CLIENT_DOMAIN + ".p2p";
-
- public static String NAMING_DOMAIN =
- SOAP_DOMAIN + ".name";
-
- public static String SOAP_IMPL_DOMAIN =
- SOAP_DOMAIN + ".impl";
-
- public static String SOAP_VER1_1_DOMAIN =
- SOAP_DOMAIN + ".ver1_1";
-
- public static String SOAP_VER1_2_DOMAIN =
- SOAP_DOMAIN + ".ver1_2";
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/MimeHeadersUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/MimeHeadersUtil.java
deleted file mode 100644
index 091a25ab..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/MimeHeadersUtil.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.util.Iterator;
-
-import javax.xml.soap.MimeHeader;
-import javax.xml.soap.MimeHeaders;
-
-public class MimeHeadersUtil {
- public static MimeHeaders copy(MimeHeaders headers) {
- MimeHeaders newHeaders = new MimeHeaders();
- Iterator eachHeader = headers.getAllHeaders();
- while (eachHeader.hasNext()) {
- MimeHeader currentHeader = (MimeHeader) eachHeader.next();
-
- newHeaders.addHeader(
- currentHeader.getName(),
- currentHeader.getValue());
- }
- return newHeaders;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/NamespaceContextIterator.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/NamespaceContextIterator.java
deleted file mode 100644
index cece401e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/NamespaceContextIterator.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-import org.w3c.dom.*;
-
-public class NamespaceContextIterator implements Iterator {
- Node context;
- NamedNodeMap attributes = null;
- int attributesLength;
- int attributeIndex;
- Attr next = null;
- Attr last = null;
- boolean traverseStack = true;
-
- public NamespaceContextIterator(Node context) {
- this.context = context;
- findContextAttributes();
- }
-
- public NamespaceContextIterator(Node context, boolean traverseStack) {
- this(context);
- this.traverseStack = traverseStack;
- }
-
- protected void findContextAttributes() {
- while (context != null) {
- int type = context.getNodeType();
- if (type == Node.ELEMENT_NODE) {
- attributes = context.getAttributes();
- attributesLength = attributes.getLength();
- attributeIndex = 0;
- return;
- } else {
- context = null;
- }
- }
- }
-
- protected void findNext() {
- while (next == null && context != null) {
- for (; attributeIndex < attributesLength; ++attributeIndex) {
- Node currentAttribute = attributes.item(attributeIndex);
- String attributeName = currentAttribute.getNodeName();
- if (attributeName.startsWith("xmlns")
- && (attributeName.length() == 5
- || attributeName.charAt(5) == ':')) {
- next = (Attr) currentAttribute;
- ++attributeIndex;
- return;
- }
- }
- if (traverseStack) {
- context = context.getParentNode();
- findContextAttributes();
- } else {
- context = null;
- }
- }
- }
-
- public boolean hasNext() {
- findNext();
- return next != null;
- }
-
- public Object next() {
- return getNext();
- }
-
- public Attr nextNamespaceAttr() {
- return getNext();
- }
-
- protected Attr getNext() {
- findNext();
- if (next == null) {
- throw new NoSuchElementException();
- }
- last = next;
- next = null;
- return last;
- }
-
- public void remove() {
- if (last == null) {
- throw new IllegalStateException();
- }
- ((Element) context).removeAttributeNode(last);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java
deleted file mode 100644
index 7242c29c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ParseUtil.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-
-// Cut&paste from sun.net.www.ParseUtil: decode, unescape
-
-public class ParseUtil {
- /**
- * Un-escape and return the character at position i in string s.
- */
- private static char unescape(String s, int i) {
- return (char) Integer.parseInt(s.substring(i+1,i+3),16);
- }
-
- /**
- * Returns a new String constructed from the specified String by replacing
- * the URL escape sequences and UTF8 encoding with the characters they
- * represent.
- */
- public static String decode(String s) {
- StringBuffer sb = new StringBuffer();
-
- int i=0;
- while (i<s.length()) {
- char c = s.charAt(i);
- char c2, c3;
-
- if (c != '%') {
- i++;
- } else {
- try {
- c = unescape(s, i);
- i += 3;
-
- if ((c & 0x80) != 0) {
- switch (c >> 4) {
- case 0xC: case 0xD:
- c2 = unescape(s, i);
- i += 3;
- c = (char)(((c & 0x1f) << 6) | (c2 & 0x3f));
- break;
-
- case 0xE:
- c2 = unescape(s, i);
- i += 3;
- c3 = unescape(s, i);
- i += 3;
- c = (char)(((c & 0x0f) << 12) |
- ((c2 & 0x3f) << 6) |
- (c3 & 0x3f));
- break;
-
- default:
- throw new IllegalArgumentException();
- }
- }
- } catch (NumberFormatException e) {
- throw new IllegalArgumentException();
- }
- }
-
- sb.append(c);
- }
-
- return sb.toString();
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java
deleted file mode 100644
index edbb17ff..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/ParserPool.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-
-import org.xml.sax.SAXException;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-
-
-/**
- * Pool of SAXParser objects
- */
-public class ParserPool {
- private final BlockingQueue queue;
- private SAXParserFactory factory;
- private int capacity;
-
- public ParserPool(int capacity) {
- this.capacity = capacity;
- queue = new ArrayBlockingQueue(capacity);
- //factory = SAXParserFactory.newInstance();
- factory = new com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl();
- factory.setNamespaceAware(true);
- for (int i=0; i < capacity; i++) {
- try {
- queue.put(factory.newSAXParser());
- } catch (InterruptedException ex) {
- Thread.currentThread().interrupt();
- throw new RuntimeException(ex);
- } catch (ParserConfigurationException ex) {
- throw new RuntimeException(ex);
- } catch (SAXException ex) {
- throw new RuntimeException(ex);
- }
- }
- }
-
- public SAXParser get() throws ParserConfigurationException,
- SAXException {
-
- try {
- return (SAXParser) queue.take();
- } catch (InterruptedException ex) {
- throw new SAXException(ex);
- }
-
- }
-
- public void put(SAXParser parser) {
- queue.offer(parser);
- }
-
- public void returnParser(SAXParser saxParser) {
- saxParser.reset();
- resetSaxParser(saxParser);
- put(saxParser);
- }
-
-
- /**
- * SAAJ Issue 46 :https://saaj.dev.java.net/issues/show_bug.cgi?id=46
- * Xerces does not provide a way to reset the SymbolTable
- * So we are trying to reset it using the proprietary code below.
- * Temporary Until the bug : https://jaxp.dev.java.net/issues/show_bug.cgi?id=59
- * is fixed.
- * @param parser the parser from the pool whose Symbol Table needs to be reset.
- */
- private void resetSaxParser(SAXParser parser) {
- try {
- //Object obj = parser.getProperty("http://apache.org/xml/properties/internal/symbol-table");
- com.sun.org.apache.xerces.internal.util.SymbolTable table = new com.sun.org.apache.xerces.internal.util.SymbolTable();
- parser.setProperty("http://apache.org/xml/properties/internal/symbol-table", table);
- //obj = parser.getProperty("http://apache.org/xml/properties/internal/symbol-table");
- } catch (SAXNotRecognizedException ex) {
- //nothing to do
- } catch (SAXNotSupportedException ex) {
- //nothing to do
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java
deleted file mode 100644
index 28753e87..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/RejectDoctypeSaxFilter.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.util.logging.Logger;
-
-import javax.xml.parsers.SAXParser;
-import javax.xml.soap.SOAPException;
-
-import org.xml.sax.*;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * Users of this class see a SAX2 XMLReader (via XMLFilterImpl). This
- * class creates a parent XMLReader via JAXP and installs itself as a SAX2
- * extension LexicalHandler which rejects document type declarations
- * because they are not legal in SOAP. If the user of this class sets a
- * LexicalHandler, then it forwards events to that handler.
- *
- *
- * @author Edwin Goei
- */
-
-public class RejectDoctypeSaxFilter extends XMLFilterImpl implements XMLReader, LexicalHandler{
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.UTIL_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.util.LocalStrings");
-
- /** Standard SAX 2.0 ext property */
- static final String LEXICAL_HANDLER_PROP =
- "http://xml.org/sax/properties/lexical-handler";
-
- static final String WSU_NS = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd".intern();
- static final String SIGNATURE_LNAME = "Signature".intern();
- static final String ENCRYPTED_DATA_LNAME = "EncryptedData".intern();
- static final String DSIG_NS = "http://www.w3.org/2000/09/xmldsig#".intern();
- static final String XENC_NS = "http://www.w3.org/2001/04/xmlenc#".intern();
- static final String ID_NAME = "ID".intern();
-
- /** LexicalHandler to forward events to, if any */
- private LexicalHandler lexicalHandler;
-
- public RejectDoctypeSaxFilter(SAXParser saxParser) throws SOAPException {
- XMLReader xmlReader;
- try {
- xmlReader = saxParser.getXMLReader();
- } catch (Exception e) {
- log.severe("SAAJ0602.util.getXMLReader.exception");
- throw new SOAPExceptionImpl(
- "Couldn't get an XMLReader while constructing a RejectDoctypeSaxFilter",
- e);
- }
-
- // Set ourselves up to be the SAX LexicalHandler
- try {
- xmlReader.setProperty(LEXICAL_HANDLER_PROP, this);
- } catch (Exception e) {
- log.severe("SAAJ0603.util.setProperty.exception");
- throw new SOAPExceptionImpl(
- "Couldn't set the lexical handler property while constructing a RejectDoctypeSaxFilter",
- e);
- }
-
- // Set the parent XMLReader of this SAX filter
- setParent(xmlReader);
- }
-
- /*
- * Override setProperty() to capture any LexicalHandler that is set for
- * forwarding of events.
- */
- public void setProperty(String name, Object value)
- throws SAXNotRecognizedException, SAXNotSupportedException {
- if (LEXICAL_HANDLER_PROP.equals(name)) {
- lexicalHandler = (LexicalHandler) value;
- } else {
- super.setProperty(name, value);
- }
- }
-
- //
- // Beginning of SAX LexicalHandler callbacks...
- //
-
- public void startDTD(String name, String publicId, String systemId)
- throws SAXException {
- throw new SAXException("Document Type Declaration is not allowed");
- }
-
- public void endDTD() throws SAXException {
- }
-
- public void startEntity(String name) throws SAXException {
- if (lexicalHandler != null) {
- lexicalHandler.startEntity(name);
- }
- }
-
- public void endEntity(String name) throws SAXException {
- if (lexicalHandler != null) {
- lexicalHandler.endEntity(name);
- }
- }
-
- public void startCDATA() throws SAXException {
- if (lexicalHandler != null) {
- lexicalHandler.startCDATA();
- }
- }
-
- public void endCDATA() throws SAXException {
- if (lexicalHandler != null) {
- lexicalHandler.endCDATA();
- }
- }
-
- public void comment(char[] ch, int start, int length) throws SAXException {
- if (lexicalHandler != null) {
- lexicalHandler.comment(ch, start, length);
- }
- }
-
- //
- // End of SAX LexicalHandler callbacks
- //
-
- public void startElement(String namespaceURI, String localName,
- String qName, Attributes atts) throws SAXException{
- if(atts != null ){
- boolean eos = false;
- if(namespaceURI == DSIG_NS || XENC_NS == namespaceURI){
- eos = true;
- }
- int length = atts.getLength();
- AttributesImpl attrImpl = new AttributesImpl();
- for(int i=0; i< length;i++){
- String name = atts.getLocalName(i);
- if(name!=null && (name.equals("Id"))){
- if(eos || atts.getURI(i) == WSU_NS ){
- attrImpl.addAttribute(atts.getURI(i), atts.getLocalName(i),
- atts.getQName(i), ID_NAME, atts.getValue(i));
- }else{
- attrImpl.addAttribute(atts.getURI(i), atts.getLocalName(i), atts.getQName(i), atts.getType(i), atts.getValue(i));
- }
- }else{
- attrImpl.addAttribute(atts.getURI(i), atts.getLocalName(i),
- atts.getQName(i), atts.getType(i), atts.getValue(i));
- }
- }
- super.startElement(namespaceURI,localName, qName,attrImpl);
- }else{
- super.startElement(namespaceURI,localName, qName, null);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java
deleted file mode 100644
index a75fce49..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/SAAJUtil.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.security.AccessControlException;
-
-/**
- *
- * @author vbkumarjayanti
- */
-public final class SAAJUtil {
-
- public static boolean getSystemBoolean(String arg) {
- try {
- return Boolean.getBoolean(arg);
- } catch (AccessControlException ex) {
- return false;
- }
- }
-
- public static String getSystemProperty(String arg) {
- try {
- return System.getProperty(arg);
- } catch (SecurityException ex) {
- return null;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/TeeInputStream.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/TeeInputStream.java
deleted file mode 100644
index e0b951ca..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/TeeInputStream.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Created on Feb 28, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code Template
- */
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.io.*;
-
-/**
- * @author pgoodwin
- */
-public class TeeInputStream extends InputStream {
- protected InputStream source;
- protected OutputStream copySink;
-
- public TeeInputStream(InputStream source, OutputStream sink) {
- super();
- this.copySink = sink;
- this.source = source;
- }
-
- public int read() throws IOException {
- int result = source.read();
- copySink.write(result);
- return result;
- }
-
- public int available() throws IOException {
- return source.available();
- }
-
- public void close() throws IOException {
- source.close();
- }
-
- public synchronized void mark(int readlimit) {
- source.mark(readlimit);
- }
-
- public boolean markSupported() {
- return source.markSupported();
- }
-
- public int read(byte[] b, int off, int len) throws IOException {
- int result = source.read(b, off, len);
- copySink.write(b, off, len);
- return result;
- }
-
- public int read(byte[] b) throws IOException {
- int result = source.read(b);
- copySink.write(b);
- return result;
- }
-
- public synchronized void reset() throws IOException {
- source.reset();
- }
-
- public long skip(long n) throws IOException {
- return source.skip(n);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/XMLDeclarationParser.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/XMLDeclarationParser.java
deleted file mode 100644
index ed7d5893..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/XMLDeclarationParser.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.io.*;
-
-import javax.xml.transform.TransformerException;
-
-/*
- * Class that parses the very first construct in the document i.e.
- * <?xml ... ?>
- *
- * @author Panos Kougiouris (panos@acm.org)
- * @version
- */
-
-public class XMLDeclarationParser {
- private String m_encoding;
- private PushbackReader m_pushbackReader;
- private boolean m_hasHeader; // preserve the case where no XML Header exists
- private String xmlDecl = null;
- static String gt16 = null;
- static String utf16Decl = null;
- static {
- try {
- gt16 = new String(">".getBytes("utf-16"));
- utf16Decl = new String("<?xml".getBytes("utf-16"));
- } catch (Exception e) {}
- }
-
- //---------------------------------------------------------------------
-
- public XMLDeclarationParser(PushbackReader pr)
- {
- m_pushbackReader = pr;
- m_encoding = "utf-8";
- m_hasHeader = false;
- }
-
- //---------------------------------------------------------------------
- public String getEncoding()
- {
- return m_encoding;
- }
-
- public String getXmlDeclaration() {
- return xmlDecl;
- }
-
- //---------------------------------------------------------------------
-
- public void parse() throws TransformerException, IOException
- {
- int c = 0;
- int index = 0;
- char[] aChar = new char[65535];
- StringBuffer xmlDeclStr = new StringBuffer();
- while ((c = m_pushbackReader.read()) != -1) {
- aChar[index] = (char)c;
- xmlDeclStr.append((char)c);
- index++;
- if (c == '>') {
- break;
- }
- }
- int len = index;
-
- String decl = xmlDeclStr.toString();
- boolean utf16 = false;
- boolean utf8 = false;
-
- int xmlIndex = decl.indexOf(utf16Decl);
- if (xmlIndex > -1) {
- utf16 = true;
- } else {
- xmlIndex = decl.indexOf("<?xml");
- if (xmlIndex > -1) {
- utf8 = true;
- }
- }
-
- // no XML decl
- if (!utf16 && !utf8) {
- m_pushbackReader.unread(aChar, 0, len);
- return;
- }
- m_hasHeader = true;
-
- if (utf16) {
- xmlDecl = new String(decl.getBytes(), "utf-16");
- xmlDecl = xmlDecl.substring(xmlDecl.indexOf("<"));
- } else {
- xmlDecl = decl;
- }
- // do we want to check that there are no other characters preceeding <?xml
- if (xmlIndex != 0) {
- throw new IOException("Unexpected characters before XML declaration");
- }
-
- int versionIndex = xmlDecl.indexOf("version");
- if (versionIndex == -1) {
- throw new IOException("Mandatory 'version' attribute Missing in XML declaration");
- }
-
- // now set
- int encodingIndex = xmlDecl.indexOf("encoding");
- if (encodingIndex == -1) {
- return;
- }
-
- if (versionIndex > encodingIndex) {
- throw new IOException("The 'version' attribute should preceed the 'encoding' attribute in an XML Declaration");
- }
-
- int stdAloneIndex = xmlDecl.indexOf("standalone");
- if ((stdAloneIndex > -1) && ((stdAloneIndex < versionIndex) || (stdAloneIndex < encodingIndex))) {
- throw new IOException("The 'standalone' attribute should be the last attribute in an XML Declaration");
- }
-
- int eqIndex = xmlDecl.indexOf("=", encodingIndex);
- if (eqIndex == -1) {
- throw new IOException("Missing '=' character after 'encoding' in XML declaration");
- }
-
- m_encoding = parseEncoding(xmlDecl, eqIndex);
- if(m_encoding.startsWith("\"")){
- m_encoding = m_encoding.substring(m_encoding.indexOf("\"")+1, m_encoding.lastIndexOf("\""));
- } else if(m_encoding.startsWith("\'")){
- m_encoding = m_encoding.substring(m_encoding.indexOf("\'")+1, m_encoding.lastIndexOf("\'"));
- }
- }
-
- //--------------------------------------------------------------------
-
- public void writeTo(Writer wr) throws IOException {
- if (!m_hasHeader) return;
- wr.write(xmlDecl.toString());
- }
-
- private String parseEncoding(String xmlDeclFinal, int eqIndex) throws IOException {
- java.util.StringTokenizer strTok = new java.util.StringTokenizer(
- xmlDeclFinal.substring(eqIndex + 1));
- if (strTok.hasMoreTokens()) {
- String encodingTok = strTok.nextToken();
- int indexofQ = encodingTok.indexOf("?");
- if (indexofQ > -1) {
- return encodingTok.substring(0,indexofQ);
- } else {
- return encodingTok;
- }
- } else {
- throw new IOException("Error parsing 'encoding' attribute in XML declaration");
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java b/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java
deleted file mode 100644
index ebfd26c0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/transform/EfficientStreamingTransformer.java
+++ /dev/null
@@ -1,423 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * EfficientStreamingTransformer.java
- *
- * Created on July 29, 2002, 3:49 PM
- */
-
-package com.sun.xml.internal.messaging.saaj.util.transform;
-
-import java.io.*;
-
-import java.net.URISyntaxException;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import org.w3c.dom.Document;
-
-import com.sun.xml.internal.messaging.saaj.util.XMLDeclarationParser;
-import com.sun.xml.internal.messaging.saaj.util.FastInfosetReflection;
-import java.net.URI;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-
-/**
- * This class is a proxy for a Transformer object with optimizations
- * for certain cases. If source and result are of type stream, then
- * bytes are simply copied whenever possible (note that this assumes
- * that the input is well formed). In addition, it provides support for
- * FI using native DOM parsers and serializers.
- *
- * @author Panos Kougiouris panos@acm.org
- * @author Santiago.PericasGeertsen@sun.com
- *
- */
-public class EfficientStreamingTransformer
- extends javax.xml.transform.Transformer {
-
- //static final String version;
- //static final String vendor;
- // removing static : security issue : CR 6813167Z
- private final TransformerFactory transformerFactory = TransformerFactory.newInstance();
-
- /**
- removing support for Java 1.4 and 1.3 : CR6658158
- static {
- version = System.getProperty("java.vm.version");
- vendor = System.getProperty("java.vm.vendor");
- if (vendor.startsWith("Sun") &&
- (version.startsWith("1.4") || version.startsWith("1.3"))) {
- transformerFactory =
- new com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl();
- }
- }*/
-
- /**
- * TransformerFactory instance.
- */
-
- /**
- * Underlying XSLT transformer.
- */
- private Transformer m_realTransformer = null;
-
- /**
- * Undelying FI DOM parser.
- */
- private Object m_fiDOMDocumentParser = null;
-
- /**
- * Underlying FI DOM serializer.
- */
- private Object m_fiDOMDocumentSerializer = null;
-
- private EfficientStreamingTransformer() {
- }
-
- private void materialize() throws TransformerException {
- if (m_realTransformer == null) {
- m_realTransformer = transformerFactory.newTransformer();
- }
- }
-
- public void clearParameters() {
- if (m_realTransformer != null)
- m_realTransformer.clearParameters();
- }
-
- public javax.xml.transform.ErrorListener getErrorListener() {
- try {
- materialize();
- return m_realTransformer.getErrorListener();
- } catch (TransformerException e) {
- // will be caught later
- }
- return null;
- }
-
- public java.util.Properties getOutputProperties() {
- try {
- materialize();
- return m_realTransformer.getOutputProperties();
- } catch (TransformerException e) {
- // will be caught later
- }
- return null;
- }
-
- public String getOutputProperty(String str)
- throws java.lang.IllegalArgumentException {
- try {
- materialize();
- return m_realTransformer.getOutputProperty(str);
- } catch (TransformerException e) {
- // will be caught later
- }
- return null;
- }
-
- public Object getParameter(String str) {
- try {
- materialize();
- return m_realTransformer.getParameter(str);
- } catch (TransformerException e) {
- // will be caught later
- }
- return null;
- }
-
- public javax.xml.transform.URIResolver getURIResolver() {
- try {
- materialize();
- return m_realTransformer.getURIResolver();
- } catch (TransformerException e) {
- // will be caught later
- }
- return null;
- }
-
- public void setErrorListener(
- javax.xml.transform.ErrorListener errorListener)
- throws java.lang.IllegalArgumentException {
- try {
- materialize();
- m_realTransformer.setErrorListener(errorListener);
- } catch (TransformerException e) {
- // will be caught later
- }
- }
-
- public void setOutputProperties(java.util.Properties properties)
- throws java.lang.IllegalArgumentException {
- try {
- materialize();
- m_realTransformer.setOutputProperties(properties);
- } catch (TransformerException e) {
- // will be caught later
- }
- }
-
- public void setOutputProperty(String str, String str1)
- throws java.lang.IllegalArgumentException {
- try {
- materialize();
- m_realTransformer.setOutputProperty(str, str1);
- } catch (TransformerException e) {
- // will be caught later
- }
- }
-
- public void setParameter(String str, Object obj) {
- try {
- materialize();
- m_realTransformer.setParameter(str, obj);
- } catch (TransformerException e) {
- // will be caught later
- }
- }
-
- public void setURIResolver(javax.xml.transform.URIResolver uRIResolver) {
- try {
- materialize();
- m_realTransformer.setURIResolver(uRIResolver);
- } catch (TransformerException e) {
- // will be caught later
- }
- }
-
- private InputStream getInputStreamFromSource(StreamSource s)
- throws TransformerException {
-
- InputStream stream = s.getInputStream();
- if (stream != null)
- return stream;
-
- if (s.getReader() != null)
- return null;
-
- String systemId = s.getSystemId();
- if (systemId != null) {
- try {
- String fileURL = systemId;
-
- if (systemId.startsWith("file:///"))
- {
- /*
- systemId is:
- file:///<drive>:/some/path/file.xml
- or
- file:///some/path/file.xml
- */
-
- String absolutePath = systemId.substring(7);
- /*
- /<drive>:/some/path/file.xml
- or
- /some/path/file.xml
- */
-
- boolean hasDriveDesignator = absolutePath.indexOf(":") > 0;
- if (hasDriveDesignator) {
- String driveDesignatedPath = absolutePath.substring(1);
- /*
- <drive>:/some/path/file.xml */
- fileURL = driveDesignatedPath;
- }
- else {
- /*
- /some/path/file.xml */
- fileURL = absolutePath;
- }
- }
- //return new FileInputStream(fileURL);
- try {
- return new FileInputStream(new File(new URI(fileURL)));
- } catch (URISyntaxException ex) {
- throw new TransformerException(ex);
- }
- } catch (IOException e) {
- throw new TransformerException(e.toString());
- }
- }
-
- throw new TransformerException("Unexpected StreamSource object");
- }
-
- //------------------------------------------------------------------------
-
- public void transform(
- javax.xml.transform.Source source,
- javax.xml.transform.Result result)
- throws javax.xml.transform.TransformerException
- {
- // StreamSource -> StreamResult
- if ((source instanceof StreamSource)
- && (result instanceof StreamResult)) {
- try {
- StreamSource streamSource = (StreamSource) source;
- InputStream is = getInputStreamFromSource(streamSource);
-
- OutputStream os = ((StreamResult) result).getOutputStream();
- if (os == null)
- // TODO: We might want to fix this if it were to be used beyond
- // XmlDataContentHandler that we know uses only OutputStream
- throw new TransformerException("Unexpected StreamResult object contains null OutputStream");
-
- if (is != null) {
- if (is.markSupported())
- is.mark(Integer.MAX_VALUE);
- int num;
- byte[] b = new byte[8192];
- while ((num = is.read(b)) != -1) {
- os.write(b, 0, num);
- }
- if (is.markSupported())
- is.reset();
- return;
- }
-
- Reader reader = streamSource.getReader();
- if (reader != null) {
-
- if (reader.markSupported())
- reader.mark(Integer.MAX_VALUE);
-
- PushbackReader pushbackReader = new PushbackReader(reader, 4096);
- //some size to unread <?xml ....?>
- XMLDeclarationParser ev =
- new XMLDeclarationParser(pushbackReader);
- try {
- ev.parse();
- } catch (Exception ex) {
- throw new TransformerException(
- "Unable to run the JAXP transformer on a stream "
- + ex.getMessage());
- }
- Writer writer =
- new OutputStreamWriter(os /*, ev.getEncoding()*/);
- ev.writeTo(writer); // doesn't write any, if no header
-
- int num;
- char[] ac = new char[8192];
- while ((num = pushbackReader.read(ac)) != -1) {
- writer.write(ac, 0, num);
- }
- writer.flush();
-
- if (reader.markSupported())
- reader.reset();
- return;
- }
- } catch (IOException e) {
- e.printStackTrace();
- throw new TransformerException(e.toString());
- }
-
- throw new TransformerException("Unexpected StreamSource object");
- }
- // FastInfosetSource -> DOMResult
- else if (FastInfosetReflection.isFastInfosetSource(source)
- && (result instanceof DOMResult))
- {
- try {
- // Use reflection to avoid a static dep with FI
- if (m_fiDOMDocumentParser == null) {
- m_fiDOMDocumentParser = FastInfosetReflection.DOMDocumentParser_new();
- }
-
- // m_fiDOMDocumentParser.parse(document, source.getInputStream())
- FastInfosetReflection.DOMDocumentParser_parse(
- m_fiDOMDocumentParser,
- (Document) ((DOMResult) result).getNode(),
- FastInfosetReflection.FastInfosetSource_getInputStream(source));
-
- // We're done!
- return;
- }
- catch (Exception e) {
- throw new TransformerException(e);
- }
- }
- // DOMSource -> FastInfosetResult
- else if ((source instanceof DOMSource)
- && FastInfosetReflection.isFastInfosetResult(result))
- {
- try {
- // Use reflection to avoid a static dep with FI
- if (m_fiDOMDocumentSerializer == null) {
- m_fiDOMDocumentSerializer = FastInfosetReflection.DOMDocumentSerializer_new();
- }
-
- // m_fiDOMDocumentSerializer.setOutputStream(result.getOutputStream())
- FastInfosetReflection.DOMDocumentSerializer_setOutputStream(
- m_fiDOMDocumentSerializer,
- FastInfosetReflection.FastInfosetResult_getOutputStream(result));
-
- // m_fiDOMDocumentSerializer.serialize(node)
- FastInfosetReflection.DOMDocumentSerializer_serialize(
- m_fiDOMDocumentSerializer,
- ((DOMSource) source).getNode());
-
- // We're done!
- return;
- }
- catch (Exception e) {
- throw new TransformerException(e);
- }
- }
-
- // All other cases -- use transformer object
-
- materialize();
- m_realTransformer.transform(source, result);
- }
-
- /**
- * Threadlocal to hold a Transformer instance for this thread.
- * CR : 6813167
- */
- //private static ThreadLocal effTransformer = new ThreadLocal();
-
- /**
- * Return Transformer instance for this thread, allocating a new one if
- * necessary. Note that this method does not clear global parameters,
- * properties or any other data set on a previously used transformer.
- */
- public static Transformer newTransformer() {
- //CR : 6813167
- /*Transformer tt = (Transformer) effTransformer.get();
- if (tt == null) {
- effTransformer.set(tt = new EfficientStreamingTransformer());
- }
- return tt;*/
- return new EfficientStreamingTransformer();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/EncodingAlgorithm.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/EncodingAlgorithm.java
deleted file mode 100644
index 68ca77ae..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/EncodingAlgorithm.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public interface EncodingAlgorithm {
-
- public Object decodeFromBytes(byte[] b, int start, int length) throws EncodingAlgorithmException;
-
- public Object decodeFromInputStream(InputStream s) throws EncodingAlgorithmException, IOException;
-
-
- public void encodeToOutputStream(Object data, OutputStream s) throws EncodingAlgorithmException, IOException;
-
-
- public Object convertFromCharacters(char[] ch, int start, int length) throws EncodingAlgorithmException;
-
- public void convertToCharacters(Object data, StringBuffer s) throws EncodingAlgorithmException;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/EncodingAlgorithmException.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/EncodingAlgorithmException.java
deleted file mode 100644
index 3454dc06..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/EncodingAlgorithmException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset;
-
-public class EncodingAlgorithmException extends FastInfosetException {
-
- public EncodingAlgorithmException(String message) {
- super(message);
- }
-
- public EncodingAlgorithmException(String message, Exception e) {
- super(message, e);
- }
-
- public EncodingAlgorithmException(Exception e) {
- super(e);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/EncodingAlgorithmIndexes.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/EncodingAlgorithmIndexes.java
deleted file mode 100644
index 6b26f0e2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/EncodingAlgorithmIndexes.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset;
-
-/**
- * The indexes of built-in encoding algorithms.
- *
- * <p>The indexes of the built-in encoding algorithms are specified
- * in ITU-T Rec. X.891 | ISO/IEC 24824-1 (Fast Infoset), clause
- * 10. The indexes start from 0 instead of 1 as specified.<p>
- *
- * @see com.sun.xml.internal.org.jvnet.fastinfoset.sax.EncodingAlgorithmContentHandler
- * @see com.sun.xml.internal.org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes
- */
-public final class EncodingAlgorithmIndexes {
- public static final int HEXADECIMAL = 0;
- public static final int BASE64 = 1;
- public static final int SHORT = 2;
- public static final int INT = 3;
- public static final int LONG = 4;
- public static final int BOOLEAN = 5;
- public static final int FLOAT = 6;
- public static final int DOUBLE = 7;
- public static final int UUID = 8;
- public static final int CDATA = 9;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/ExternalVocabulary.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/ExternalVocabulary.java
deleted file mode 100644
index ea612b59..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/ExternalVocabulary.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset;
-
-/**
- * An external vocabulary.
- * <p>
- * An external vocabulary has a URI that refers to a vocabulary.
- *
- * @author Paul.Sandoz@Sun.Com
- */
-public class ExternalVocabulary {
-
- /**
- * A URI that refers to the external vocabulary.
- */
- public final String URI;
-
- /**
- * The vocabulary that is refered to by the URI.
- */
- public final Vocabulary vocabulary;
-
- public ExternalVocabulary(String URI, Vocabulary vocabulary) {
- if (URI == null || vocabulary == null) {
- throw new IllegalArgumentException();
- }
-
- this.URI = URI;
- this.vocabulary = vocabulary;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetException.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetException.java
deleted file mode 100644
index 0b3e2b70..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset;
-
-public class FastInfosetException extends Exception {
-
- public FastInfosetException(String message) {
- super(message);
- }
-
- public FastInfosetException(String message, Exception e) {
- super(message, e);
- }
-
- public FastInfosetException(Exception e) {
- super(e);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetParser.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetParser.java
deleted file mode 100644
index f2dbc7c1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetParser.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset;
-
-import java.util.Map;
-
-/**
- * A general interface for parsers of fast infoset documents.
- *
- * <p>
- * This interface contains common methods that are not specific to any
- * API associated with the parsing of fast infoset documents.
- *
- * @author Paul.Sandoz@Sun.Com
- */
-public interface FastInfosetParser {
- /**
- * The property name to be used for getting and setting the string
- * interning property of a parser.
- *
- */
- public static final String STRING_INTERNING_PROPERTY =
- "http://jvnet.org/fastinfoset/parser/properties/string-interning";
-
- /**
- * The property name to be used for getting and setting the buffer size
- * of a parser.
- */
- public static final String BUFFER_SIZE_PROPERTY =
- "http://jvnet.org/fastinfoset/parser/properties/buffer-size";
-
- /**
- * The property name to be used for getting and setting the
- * Map containing encoding algorithms.
- *
- */
- public static final String REGISTERED_ENCODING_ALGORITHMS_PROPERTY =
- "http://jvnet.org/fastinfoset/parser/properties/registered-encoding-algorithms";
-
- /**
- * The property name to be used for getting and setting the
- * Map containing external vocabularies.
- *
- */
- public static final String EXTERNAL_VOCABULARIES_PROPERTY =
- "http://jvnet.org/fastinfoset/parser/properties/external-vocabularies";
-
- /**
- * The property name to be used for getting and setting the
- * flag, which will indicate whether underlying Parser's
- * input stream should be really closed
- */
- public static final String FORCE_STREAM_CLOSE_PROPERTY =
- "http://jvnet.org/fastinfoset/parser/properties/force-stream-close";
-
- /**
- * Set the string interning property.
- *
- * <p>If the string interning property is set to true then
- * <code>String</code> objects instantiated for [namespace name], [prefix]
- * and [local name] infoset properties will be interned using the method
- * {@link String#intern()}.
- *
- * @param stringInterning The string interning property.
- */
- public void setStringInterning(boolean stringInterning);
-
- /**
- * Return the string interning property.
- *
- * @return The string interning property.
- */
- public boolean getStringInterning();
-
- /**
- * Set the buffer size.
- *
- * <p>The size of the buffer for parsing is set using this
- * method. Requests for sizes smaller then the current size will be ignored.
- * Otherwise the buffer will be resized when the next parse is performed.<p>
- *
- * @param bufferSize The requested buffer size.
- */
- public void setBufferSize(int bufferSize);
-
-
- /**
- * Get the buffer size.
- *
- * @return The buffer size.
- */
- public int getBufferSize();
-
-
- /**
- * Sets the set of registered encoding algorithms.
- *
- * @param algorithms The set of registered algorithms.
- */
- public void setRegisteredEncodingAlgorithms(Map algorithms);
-
- /**
- * Gets the set of registered encoding algorithms.
- *
- * @return The set of registered algorithms.
- */
- public Map getRegisteredEncodingAlgorithms();
-
- /**
- * Set the map of referenced external vocabularies.
- * <p>
- * The map (but not the keys and values) be cloned.
- *
- * @param referencedVocabualries the map of URI to vocabulary.
- */
- public void setExternalVocabularies(Map referencedVocabualries);
-
- /**
- * Get the map of referenced external vocabularies.
- *
- * @return the map of URI to vocabulary.
- * @deprecated
- * The map returned will not be the same instance and contain
- * the same entries as the map set by {@link #setExternalVocabularies}
- * method.
- */
- public Map getExternalVocabularies();
-
- /**
- * Set the parse fragments property.
- *
- * <p>If the parse fragments property is set to true then
- * fragments of an XML infoset may be parsed.
- *
- * @param parseFragments The parse fragments property.
- */
- public void setParseFragments(boolean parseFragments);
-
- /**
- * Return the parse fragments property.
- *
- * @return The parse fragments property.
- */
- public boolean getParseFragments();
-
- /**
- * Set the force stream close property.
- *
- * <p>If the force stream property is set to true then
- * Parser's underlying InputStream will be closed.
- *
- * @param needForceStreamClose The force stream close property.
- */
- public void setForceStreamClose(boolean needForceStreamClose);
-
- /**
- * Return the force stream close property.
- *
- * @return The force stream close property.
- */
- public boolean getForceStreamClose();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetResult.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetResult.java
deleted file mode 100644
index 8757e498..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetResult.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset;
-
-import java.io.OutputStream;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ext.LexicalHandler;
-import javax.xml.transform.sax.SAXResult;
-import com.sun.xml.internal.fastinfoset.sax.SAXDocumentSerializer;
-
-/**
- * A JAXP Result implementation that supports the serialization to fast
- * infoset documents for use by applications that expect a Result.
- *
- * <P>The derivation of FIResult from SAXResult is an implementation
- * detail.<P>
- *
- * <P>This implementation is designed for interoperation with JAXP and is not
- * not designed with performance in mind. It is recommended that for performant
- * interoperation alternative serializer specific solutions be used.<P>
- *
- * <P>General applications shall not call the following methods:
- * <UL>
- * <LI>setHandler</LI>
- * <LI>setLexicalHandler</LI>
- * <LI>setSystemId</LI>
- * </UL>
- * </P>
- */
-public class FastInfosetResult extends SAXResult {
-
- OutputStream _outputStream;
-
- public FastInfosetResult(OutputStream outputStream) {
- _outputStream = outputStream;
- }
-
- public ContentHandler getHandler() {
- ContentHandler handler = super.getHandler();
- if (handler == null) {
- handler = new SAXDocumentSerializer();
- setHandler(handler);
- }
- ((SAXDocumentSerializer) handler).setOutputStream(_outputStream);
- return handler;
- }
-
- public LexicalHandler getLexicalHandler() {
- return (LexicalHandler) getHandler();
- }
-
- public OutputStream getOutputStream() {
- return _outputStream;
- }
-
- public void setOutputStream(OutputStream outputStream) {
- _outputStream = outputStream;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetSerializer.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetSerializer.java
deleted file mode 100644
index 43d18600..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetSerializer.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset;
-
-import java.io.OutputStream;
-import java.util.Map;
-
-/**
- * A general interface for serializers of fast infoset documents.
- *
- * <p>
- * This interface contains common methods that are not specific to any
- * API associated with the serialization of XML Infoset to fast infoset
- * documents.
- *
- * @author Paul.Sandoz@Sun.Com
- */
-public interface FastInfosetSerializer {
- /**
- * The feature to ignore the document type declaration and the
- * internal subset.
- * <p>
- * The default value is false. If true a serializer shall ignore document
- * type declaration and the internal subset.
- */
- public static final String IGNORE_DTD_FEATURE =
- "http://jvnet.org/fastinfoset/serializer/feature/ignore/DTD";
-
- /**
- * The feature to ignore comments.
- * <p>
- * The default value is false. If true a serializer shall ignore comments
- * and shall not serialize them.
- */
- public static final String IGNORE_COMMENTS_FEATURE =
- "http://jvnet.org/fastinfoset/serializer/feature/ignore/comments";
-
- /**
- * The feature to ignore processing instructions.
- * <p>
- * The default value is false. If true a serializer shall ignore processing
- * instructions and shall not serialize them.
- */
- public static final String IGNORE_PROCESSING_INSTRUCTIONS_FEATURE =
- "http://jvnet.org/fastinfoset/serializer/feature/ignore/processingInstructions";
-
- /**
- * The feature to ignore text content that consists completely of white
- * space characters.
- * <p>
- * The default value is false. If true a serializer shall ignore text
- * content that consists completely of white space characters.
- */
- public static final String IGNORE_WHITE_SPACE_TEXT_CONTENT_FEATURE =
- "http://jvnet.org/fastinfoset/serializer/feature/ignore/whiteSpaceTextContent";
-
- /**
- * The property name to be used for getting and setting the buffer size
- * of a parser.
- */
- public static final String BUFFER_SIZE_PROPERTY =
- "http://jvnet.org/fastinfoset/parser/properties/buffer-size";
-
- /**
- * The property name to be used for getting and setting the
- * Map containing encoding algorithms.
- *
- */
- public static final String REGISTERED_ENCODING_ALGORITHMS_PROPERTY =
- "http://jvnet.org/fastinfoset/parser/properties/registered-encoding-algorithms";
-
- /**
- * The property name to be used for getting and setting the
- * Map containing external vocabularies.
- *
- */
- public static final String EXTERNAL_VOCABULARIES_PROPERTY =
- "http://jvnet.org/fastinfoset/parser/properties/external-vocabularies";
-
- /**
- * The default minimum size of the character content chunks,
- * that will be indexed.
- */
- public final static int MIN_CHARACTER_CONTENT_CHUNK_SIZE = 0;
-
- /**
- * The default maximum size of the character content chunks,
- * that will be indexed.
- */
- public final static int MAX_CHARACTER_CONTENT_CHUNK_SIZE = 32;
-
- /**
- * The default value for limit on the size of indexed Map for attribute values
- * Limit is measured in bytes not in number of entries
- */
- public static final int CHARACTER_CONTENT_CHUNK_MAP_MEMORY_CONSTRAINT = Integer.MAX_VALUE;
-
- /**
- * The default minimum size of the attribute values, that will be indexed.
- */
- public final static int MIN_ATTRIBUTE_VALUE_SIZE = 0;
-
- /**
- * The default maximum size of the attribute values, that will be indexed.
- */
- public final static int MAX_ATTRIBUTE_VALUE_SIZE = 32;
-
- /**
- * The default value for limit on the size of indexed Map for attribute values
- * Limit is measured in bytes not in number of entries
- */
- public static final int ATTRIBUTE_VALUE_MAP_MEMORY_CONSTRAINT = Integer.MAX_VALUE;
-
- /**
- * The character encoding scheme string for UTF-8.
- */
- public static final String UTF_8 = "UTF-8";
-
- /**
- * The character encoding scheme string for UTF-16BE.
- */
- public static final String UTF_16BE = "UTF-16BE";
-
- /**
- * Set the {@link #IGNORE_DTD_FEATURE}.
- * @param ignoreDTD true if the feature shall be ignored.
- */
- public void setIgnoreDTD(boolean ignoreDTD);
-
- /**
- * Get the {@link #IGNORE_DTD_FEATURE}.
- * @return true if the feature is ignored, false otherwise.
- */
- public boolean getIgnoreDTD();
-
- /**
- * Set the {@link #IGNORE_COMMENTS_FEATURE}.
- * @param ignoreComments true if the feature shall be ignored.
- */
- public void setIgnoreComments(boolean ignoreComments);
-
- /**
- * Get the {@link #IGNORE_COMMENTS_FEATURE}.
- * @return true if the feature is ignored, false otherwise.
- */
- public boolean getIgnoreComments();
-
- /**
- * Set the {@link #IGNORE_PROCESSING_INSTRUCTIONS_FEATURE}.
- * @param ignoreProcesingInstructions true if the feature shall be ignored.
- */
- public void setIgnoreProcesingInstructions(boolean ignoreProcesingInstructions);
-
- /**
- * Get the {@link #IGNORE_PROCESSING_INSTRUCTIONS_FEATURE}.
- * @return true if the feature is ignored, false otherwise.
- */
- public boolean getIgnoreProcesingInstructions();
-
- /**
- * Set the {@link #IGNORE_WHITE_SPACE_TEXT_CONTENT_FEATURE}.
- * @param ignoreWhiteSpaceTextContent true if the feature shall be ignored.
- */
- public void setIgnoreWhiteSpaceTextContent(boolean ignoreWhiteSpaceTextContent);
-
- /**
- * Get the {@link #IGNORE_WHITE_SPACE_TEXT_CONTENT_FEATURE}.
- * @return true if the feature is ignored, false otherwise.
- */
- public boolean getIgnoreWhiteSpaceTextContent();
-
- /**
- * Sets the character encoding scheme.
- *
- * The character encoding can be either UTF-8 or UTF-16BE for the
- * the encoding of chunks of CIIs, the [normalized value]
- * property of attribute information items, comment information
- * items and processing instruction information items.
- *
- * @param characterEncodingScheme The set of registered algorithms.
- */
- public void setCharacterEncodingScheme(String characterEncodingScheme);
-
- /**
- * Gets the character encoding scheme.
- *
- * @return The character encoding scheme.
- */
- public String getCharacterEncodingScheme();
-
- /**
- * Sets the set of registered encoding algorithms.
- *
- * @param algorithms The set of registered algorithms.
- */
- public void setRegisteredEncodingAlgorithms(Map algorithms);
-
- /**
- * Gets the set of registered encoding algorithms.
- *
- * @return The set of registered algorithms.
- */
- public Map getRegisteredEncodingAlgorithms();
-
- /**
- * Gets the minimum size of character content chunks
- * that will be indexed.
- *
- * @return The minimum character content chunk size.
- */
- public int getMinCharacterContentChunkSize();
-
- /**
- * Sets the minimum size of character content chunks
- * that will be indexed.
- *
- * @param size the minimum character content chunk size.
- */
- public void setMinCharacterContentChunkSize(int size);
-
- /**
- * Gets the maximum size of character content chunks
- * that might be indexed.
- *
- * @return The maximum character content chunk size.
- */
- public int getMaxCharacterContentChunkSize();
-
- /**
- * Sets the maximum size of character content chunks
- * that might be indexed.
- *
- * @param size the maximum character content chunk size.
- */
- public void setMaxCharacterContentChunkSize(int size);
-
- /**
- * Gets the limit on the memory size, allocated for indexed character
- * content chunks.
- *
- * @return the limit on the memory size, allocated for indexed character
- * content chunks.
- */
- public int getCharacterContentChunkMapMemoryLimit();
-
- /**
- * Sets the limit on the memory size, allocated for indexed character
- * content chunks.
- *
- * @param size the limit on the memory size, allocated for indexed character
- * content chunks.
- */
- public void setCharacterContentChunkMapMemoryLimit(int size);
-
- /**
- * Gets the minimum size of attribute values
- * that will be indexed.
- *
- * @return The minimum attribute values size.
- */
- public int getMinAttributeValueSize();
-
- /**
- * Sets the minimum size of attribute values
- * that will be indexed.
- *
- * @param size the minimum attribute values size.
- */
- public void setMinAttributeValueSize(int size);
-
- /**
- * Gets the maximum size of attribute values
- * that will be indexed.
- *
- * @return The maximum attribute values size.
- */
- public int getMaxAttributeValueSize();
-
- /**
- * Sets the maximum size of attribute values
- * that will be indexed.
- *
- * @param size the maximum attribute values size.
- */
- public void setMaxAttributeValueSize(int size);
-
- /**
- * Gets the limit on the memory size of Map of attribute values
- * that will be indexed.
- *
- * @return The attribute value size limit.
- */
- public int getAttributeValueMapMemoryLimit();
-
- /**
- * Sets the limit on the memory size of Map of attribute values
- * that will be indexed.
- *
- * @param size The attribute value size limit. Any value less
- * that a length of size limit will be indexed.
- */
- public void setAttributeValueMapMemoryLimit(int size);
-
- /**
- * Set the external vocabulary that shall be used when serializing.
- *
- * @param v the vocabulary.
- */
- public void setExternalVocabulary(ExternalVocabulary v);
-
- /**
- * Set the application data to be associated with the serializer vocabulary.
- *
- * @param data the application data.
- */
- public void setVocabularyApplicationData(VocabularyApplicationData data);
-
- /**
- * Get the application data associated with the serializer vocabulary.
- *
- * @return the application data.
- */
- public VocabularyApplicationData getVocabularyApplicationData();
-
- /**
- * Reset the serializer for reuse serializing another XML infoset.
- */
- public void reset();
-
- /**
- * Set the OutputStream to serialize the XML infoset to a
- * fast infoset document.
- *
- * @param s the OutputStream where the fast infoset document is written to.
- */
- public void setOutputStream(OutputStream s);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetSource.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetSource.java
deleted file mode 100644
index 966c6303..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/FastInfosetSource.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset;
-
-import java.io.InputStream;
-
-import javax.xml.transform.sax.SAXSource;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.XMLReader;
-
-import com.sun.xml.internal.fastinfoset.sax.SAXDocumentParser;
-
-/**
- * A JAXP Source implementation that supports the parsing fast
- * infoset document for use by applications that expect a Source.
- *
- * <P>The derivation of FISource from SAXSource is an implementation
- * detail.<P>
- *
- * <P>This implementation is designed for interoperation with JAXP and is not
- * not designed with performance in mind. It is recommended that for performant
- * interoperation alternative parser specific solutions be used.<P>
- *
- * <P>Applications shall obey the following restrictions:
- * <UL>
- * <LI>The setXMLReader and setInputSource shall not be called.</LI>
- * <LI>The XMLReader object obtained by the getXMLReader method shall
- * be used only for parsing the InputSource object returned by
- * the getInputSource method.</LI>
- * <LI>The InputSource object obtained by the getInputSource method shall
- * be used only for being parsed by the XMLReader object returned by
- * the getXMLReader method.</LI>
- * </UL>
- * </P>
- */
-public class FastInfosetSource extends SAXSource {
-
- public FastInfosetSource(InputStream inputStream) {
- super(new InputSource(inputStream));
- }
-
- public XMLReader getXMLReader() {
- XMLReader reader = super.getXMLReader();
- if (reader == null) {
- reader = new SAXDocumentParser();
- setXMLReader(reader);
- }
- ((SAXDocumentParser) reader).setInputStream(getInputStream());
- return reader;
- }
-
- public InputStream getInputStream() {
- return getInputSource().getByteStream();
- }
-
- public void setInputStream(InputStream inputStream) {
- setInputSource(new InputSource(inputStream));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/RestrictedAlphabet.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/RestrictedAlphabet.java
deleted file mode 100644
index 5df17eba..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/RestrictedAlphabet.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset;
-
-public final class RestrictedAlphabet {
-
- public static final String NUMERIC_CHARACTERS = "0123456789-+.E ";
-
- public static final int NUMERIC_CHARACTERS_INDEX = 0;
-
- public static final String DATE_TIME_CHARACTERS = "0123456789-:TZ ";
-
- public static final int DATE_TIME_CHARACTERS_INDEX = 1;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/Vocabulary.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/Vocabulary.java
deleted file mode 100644
index f15f3a2c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/Vocabulary.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset;
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-/**
- * A canonical representation of a vocabulary.
- * <p>
- * Each vocabulary table is represented as a Set. A vocabulary table entry is
- * represented as an item in the Set.
- * <p>
- * The 1st item contained in a Set is assigned the smallest index value,
- * n say (where n >= 0). The 2nd item is assigned an index value of n + 1. The kth
- * item is assigned an index value of n + (k - 1).
- * <p>
- * A Fast Infoset parser/serializer implementation will tranform the canonical
- * representation of a Vocabulary instance into a more optimal form suitable
- * for the efficient usage according to the API implemented by the parsers and
- * serialziers.
- */
-public class Vocabulary {
- /**
- * The restricted alphabet table, containing String objects.
- */
- public final Set restrictedAlphabets = new LinkedHashSet();
-
- /**
- * The encoding algorithm table, containing String objects.
- */
- public final Set encodingAlgorithms = new LinkedHashSet();
-
- /**
- * The prefix table, containing String objects.
- */
- public final Set prefixes = new LinkedHashSet();
-
- /**
- * The namespace name table, containing String objects.
- */
- public final Set namespaceNames = new LinkedHashSet();
-
- /**
- * The local name table, containing String objects.
- */
- public final Set localNames = new LinkedHashSet();
-
- /**
- * The "other NCName" table, containing String objects.
- */
- public final Set otherNCNames = new LinkedHashSet();
-
- /**
- * The "other URI" table, containing String objects.
- */
- public final Set otherURIs = new LinkedHashSet();
-
- /**
- * The "attribute value" table, containing String objects.
- */
- public final Set attributeValues = new LinkedHashSet();
-
- /**
- * The "other string" table, containing String objects.
- */
- public final Set otherStrings = new LinkedHashSet();
-
- /**
- * The "character content chunk" table, containing String objects.
- */
- public final Set characterContentChunks = new LinkedHashSet();
-
- /**
- * The element table, containing QName objects.
- */
- public final Set elements = new LinkedHashSet();
-
- /**
- * The attribute table, containing QName objects.
- */
- public final Set attributes = new LinkedHashSet();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/VocabularyApplicationData.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/VocabularyApplicationData.java
deleted file mode 100644
index 7e483037..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/VocabularyApplicationData.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset;
-
-/**
- * Application data that can be associated with a vocabulary.
- * <p>
- * The application will implement this inteface and provide
- * application specific functionality related to a vocabulary.
- *
- * @author Paul.Sandoz@Sun.Com
- */
-public interface VocabularyApplicationData {
- /**
- * Clear the vocabulary application data.
- * <p>
- * This method will be invoked when a parser or serializer clears
- * the vocabulary.
- */
- public void clear();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/EncodingAlgorithmAttributes.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/EncodingAlgorithmAttributes.java
deleted file mode 100644
index a3df8c24..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/EncodingAlgorithmAttributes.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset.sax;
-
-import org.xml.sax.Attributes;
-
-
-/**
- * Interface for a list of XML attributes that may contain encoding algorithm
- * data.
- * <p>
- * Implementations shall ensure that the {@link Attributes#getValue(int)} method
- * correctly returns a String object even if the attribute is represented
- * as algorithm data.
- * <p>
- * If an attribute has algorithm data then the {@link #getAlgorithmData} method
- * shall return a non <code>null</code> value.
- *
- * @see com.sun.xml.internal.org.jvnet.fastinfoset.sax.FastInfosetReader
- * @see org.xml.sax.XMLReader
- */
-public interface EncodingAlgorithmAttributes extends Attributes {
-
- /**
- * Return the URI of the encoding algorithm.
- *
- * <p>If the algorithm data corresponds to a built-in encoding algorithm
- * then the null is returned.</p>
- *
- * <p>If the algorithm data corresponds to an application-defined encoding
- * algorithm then the URI of the algorithm is returned.</p>
- *
- * <p>If {@link #getAlgorithmData(int)} returns null then the result of
- * this method is undefined.<p>
- *
- * @param index The attribute index (zero-based).
- * @return The URI. If the index is out of range then null is returned.
- */
- public String getAlgorithmURI(int index);
-
- /**
- * Return the index of the encoding algorithm.
- *
- * <p>If {@link #getAlgorithmData(int)} returns null then the result of
- * this method is undefined.<p>
- *
- * @param index The attribute index (zero-based).
- * @return The algorithm index. If index is out of range then -1 is returned.
- * @see com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmIndexes
- */
- public int getAlgorithmIndex(int index);
-
- /**
- * Return the data of the encoding algorithm.
- *
- * <p>If the algorithm data corresponds to a built-in encoding algorithm
- * then an Object corresponding to the Java primitive type is returned.</p>
- *
- * <p>If the algorithm data corresponds to an application-defined encoding
- * algorithm then an Object that is an instance of <code>byte[]</code>
- * is returned if there is no EncodingAlgorithm registered for the
- * application-defined encoding algorithm URI. Otherwise, an Object produced
- * from the registeredEncodingAlgorithm is returned.</p>
- *
- * <p>If there no encoding algorithm data associated an attribute then
- * <code>null</code> is returned.<p>
- *
- * @param index The attribute index (zero-based).
- * @return The data. If the index is out of range then null is returned.
- */
- public Object getAlgorithmData(int index);
-
- /**
- * Return the alphabet associated with the attribute value.
- *
- * @param index The attribute index (zero-based).
- * @return The alphabet.
- * If the index is out of range then null is returned.
- * If there is is no alphabet then null is returned.
- */
- public String getAlpababet(int index);
-
- /**
- * Return the whether the attribute value should be indexed or not.
- *
- * @param index The attribute index (zero-based).
- * @return True if attribute value should be indexed, otherwise false.
- */
- public boolean getToIndex(int index);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/EncodingAlgorithmContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/EncodingAlgorithmContentHandler.java
deleted file mode 100644
index 3bfbd511..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/EncodingAlgorithmContentHandler.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset.sax;
-
-import org.xml.sax.SAXException;
-
-/**
- * SAX2 extention handler to receive notification of encoding algorithm data.
- *
- * <p>This is an optional extension handler for SAX2. XML readers are not
- * required to recognize this handler, and it is not part of core-only
- * SAX2 distributions.</p>
- *
- * <p>This interface may be used with with a Fast Infoset
- * SAX parser to receive notification of encoding algorithm data specified
- * in ITU-T Rec. X.891 | ISO/IEC 24824-1 (Fast Infoset) clause 10 and for
- * application defined encoding algorithms specified as part of the
- * initial vocabulary of a fast infoset document.<p>
- *
- * <p>To set the EncodingAlgorithmContentHandler for an XML reader, use the
- * {@link org.xml.sax.XMLReader#setProperty setProperty} method
- * with the property name
- * <code>URI TO BE DEFINED</code>
- * and an object implementing this interface (or null) as the value.
- * If the reader does not report primitive data types, it will throw a
- * {@link org.xml.sax.SAXNotRecognizedException SAXNotRecognizedException}</p>
- *
- * <p>To set the EncodingAlgorithmContentHandler for an Fast Infoset reader, use
- * {@link com.sun.xml.internal.org.jvnet.fastinfoset.sax.FastInfosetReader#setEncodingAlgorithmContentHandler
- * setEncodingAlgorithmContentHandler} method.<p>
- *
- * @see com.sun.xml.internal.org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler
- * @see com.sun.xml.internal.org.jvnet.fastinfoset.sax.FastInfosetReader
- * @see org.xml.sax.XMLReader
- */
-public interface EncodingAlgorithmContentHandler {
- /**
- * Receive notification of encoding algorithm data as an array
- * of byte.
- *
- * <p>The application must not attempt to read from the array
- * outside of the specified range.</p>
- *
- * <p>Such notifications will occur for a Fast Infoset SAX parser
- * when processing encoding algorithm data.<p>
- *
- * <p>The Parser will call the method of this interface to report each
- * encoding algorithm data. Parsers MUST return all contiguous
- * characters in a single chunk</p>
- *
- * <p>Parsers may return all contiguous bytes in a single chunk, or
- * they may split it into several chunks providing that the length of
- * each chunk is of the required length to successfully apply the
- * encoding algorithm to the chunk.</p>
- *
- * @param URI the URI of the encoding algorithm
- * @param algorithm the encoding algorithm index
- * @param b the array of byte
- * @param start the start position in the array
- * @param length the number of byte to read from the array
- * @throws org.xml.sax.SAXException any SAX exception, possibly
- * wrapping another exception
- * @see com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmIndexes
- */
- public void octets(String URI, int algorithm, byte[] b, int start, int length) throws SAXException;
-
- /**
- * Receive notification of encoding algorithm data as an object.
- *
- * <p>Such notifications will occur for a Fast Infoset SAX parser
- * when processing encoding algorithm data that is converted from an
- * array of byte to an object more suitable for processing.<p>
- *
- * @param URI the URI of the encoding algorithm
- * @param algorithm the encoding algorithm index
- * @param o the encoding algorithm object
- * @throws org.xml.sax.SAXException any SAX exception, possibly
- * wrapping another exception
- * @see com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmIndexes
- */
- public void object(String URI, int algorithm, Object o) throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/ExtendedContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/ExtendedContentHandler.java
deleted file mode 100644
index 09cbe5e4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/ExtendedContentHandler.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset.sax;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-public interface ExtendedContentHandler extends ContentHandler {
-
- /**
- * Receive notification of character data.
- *
- * @param ch the characters from the XML document
- * @param start the start position in the array
- * @param length the number of characters to read from the array
- * @param index true if the characters are indexed, otherwise false.
- * @throws org.xml.sax.SAXException any SAX exception, possibly
- * wrapping another exception
- * @see ContentHandler#characters
- */
- public void characters(char[] ch, int start, int length, boolean index) throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/FastInfosetReader.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/FastInfosetReader.java
deleted file mode 100644
index c32f656e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/FastInfosetReader.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset.sax;
-
-import java.io.IOException;
-import java.io.InputStream;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetParser;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.ext.DeclHandler;
-import org.xml.sax.ext.LexicalHandler;
-
-/**
- * Interface for reading an Fast Infoset document using callbacks.
- *
- * <p>FastInfosetReader is the interface that a Fast Infoset parser's
- * SAX2 driver must implement. This interface allows an application to
- * to register Fast Infoset specific event handlers for encoding algorithms.</p>
- *
- * <p>The reception of encoding algorithm events is determined by
- * the registration of:
- * <ul>
- * <li>A {@link PrimitiveTypeContentHandler}, for the recieving of events,
- * associated with built-in encoding algorithms, for decoded data that
- * can be reported as Java primitive types.</li>
- * <li>A {@link EncodingAlgorithmContentHandler}, for the recieving of events,
- * associated with built-in and application-defined encoding algorithms, for
- * decoded data that can be reported as an array of octets or as a Java
- * Object.</li>
- * <li>{@link com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithm} implementations, for
- * the receiving of events, associated with application defined algorithms.
- * for decoded data that shall be reported as a Java Object by way of the
- * registered EncodingAlgorithmContentHandler.</li>
- * </ul>
- * </p>
- *
- * <p>The reporting of element content events for built-in algorithms
- * is determimed by the following:
- * <ul>
- * <li>If a PrimitiveContentHandler is registered then decoded data is reported
- * as Java primitive types using the corresponding methods on the PrimitiveContentHandler
- * interface.</li>
- * <li>If a PrimitiveContentHandler is not registered and a
- * EncodingAlgorithmContentHandler is registered then decoded data is reported
- * as Java Objects using {@link EncodingAlgorithmContentHandler#object(String, int, Object)}.
- * An Object shall correspond to the Java primitive type that
- * would otherwise be reported using the PrimitiveContentHandler.</li>
- * <li>If neither is registered then then decoded data is reported as characters.</li>
- * </ul>
- * </p>
- *
- * <p>The reporting of element content events for application-defined algorithms
- * is determimed by the following:
- * <ul>
- * <li>If an EncodingAlgorithmContentHandler is registered and there is no
- * EncodingAlgorithm registered for an application-defined encoding algorithm
- * then decoded data for such an algoroithm is reported as an array of octets
- * using {@link EncodingAlgorithmContentHandler#octets(String, int, byte[], int, int)};
- * otherwise</li>
- * <li>If there is an EncodingAlgorithm registered for the application-defined
- * encoding algorithm then the decoded data is reported as a Java Object,
- * returned by decoding according to the EncodingAlgorithm, using
- * {@link EncodingAlgorithmContentHandler#object(String, int, Object)}.</li>
- * </ul>
- * </p>
- *
- * <p>The reporting of attribute values for encoding algorithms is achieved using
- * {@link EncodingAlgorithmAttributes} that extends {@link org.xml.sax.Attributes}.
- * The registered ContentHandler may cast the attr paramter of the
- * {@link org.xml.sax.ContentHandler#startElement(String, String, String, org.xml.sax.Attributes)}
- * to the EncodingAlgorithmAttributes interface to access to encoding algorithm information.
- * </p>
- *
- * <p>The reporting of attribute values for built-in algorithms
- * is determimed by the following:
- * <ul>
- * <li>If a PrimitiveContentHandler or EncodingAlgorithmContentHandler is
- * registered then decoded data is reported as Java Objects corresponding
- * to the Java primitive types. The Java Objects may be obtained using
- * {@link EncodingAlgorithmAttributes#getAlgorithmData(int)}.
- * <li>If neither is registered then then decoded data is reported as characters.</li>
- * </ul>
- * </p>
- *
- * <p>The reporting of attribute values for application-defined algorithms
- * is determimed by the following:
- * <ul>
- * <li>If an EncodingAlgorithmContentHandler is registered and there is no
- * EncodingAlgorithm registered for an application-defined encoding algorithm
- * then decoded data for such an algoroithm is reported as Java Object,
- * that is an instance of <code>byte[]</code>,
- * using {@link EncodingAlgorithmAttributes#getAlgorithmData(int)};
- * otherwise</li>
- * <li>If there is an EncodingAlgorithm registered for the application-defined
- * encoding algorithm then the decoded data is reported as a Java Object,
- * returned by decoding according to the EncodingAlgorithm, using
- * {@link EncodingAlgorithmAttributes#getAlgorithmData(int)}.</li>
- * </ul>
- * </p>
- *
- * @see com.sun.xml.internal.org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler
- * @see com.sun.xml.internal.org.jvnet.fastinfoset.sax.EncodingAlgorithmContentHandler
- * @see org.xml.sax.XMLReader
- * @see org.xml.sax.ContentHandler
- */
-public interface FastInfosetReader extends XMLReader, FastInfosetParser {
- /**
- * The property name to be used for getting and setting the
- * EncodingAlgorithmContentHandler.
- *
- */
- public static final String ENCODING_ALGORITHM_CONTENT_HANDLER_PROPERTY =
- "http://jvnet.org/fastinfoset/sax/properties/encoding-algorithm-content-handler";
-
- /**
- * The property name to be used for getting and setting the
- * PrimtiveTypeContentHandler.
- *
- */
- public static final String PRIMITIVE_TYPE_CONTENT_HANDLER_PROPERTY =
- "http://jvnet.org/fastinfoset/sax/properties/primitive-type-content-handler";
-
- /**
- * Parse a fast infoset document from an InputStream.
- *
- * <p>The application can use this method to instruct the Fast Infoset
- * reader to begin parsing a fast infoset document from a byte stream.</p>
- *
- * <p>Applications may not invoke this method while a parse is in progress
- * (they should create a new XMLReader instead for each nested XML document).
- * Once a parse is complete, an application may reuse the same
- * FastInfosetReader object, possibly with a different byte stream.</p>
- *
- * <p>During the parse, the FastInfosetReader will provide information about
- * the fast infoset document through the registered event handlers.<p>
- *
- * <p> This method is synchronous: it will not return until parsing has ended.
- * If a client application wants to terminate parsing early, it should throw
- * an exception.<p>
- *
- * @param s The byte stream to parse from.
- */
- public void parse(InputStream s) throws IOException, FastInfosetException, SAXException;
-
- /**
- * Allow an application to register a lexical handler.
- *
- * <p>Applications may register a new or different handler in the
- * middle of a parse, and the SAX parser must begin using the new
- * handler immediately.</p>
- *
- * @param handler The lexical handler.
- * @see #getLexicalHandler
- */
- public void setLexicalHandler(LexicalHandler handler);
-
- /**
- * Return the current lexical handler.
- *
- * @return The current lexical handler, or null if none
- * has been registered.
- * @see #setLexicalHandler
- */
- public LexicalHandler getLexicalHandler();
-
- /**
- * Allow an application to register a DTD declaration handler.
- *
- * <p>Applications may register a new or different handler in the
- * middle of a parse, and the SAX parser must begin using the new
- * handler immediately.</p>
- *
- * @param handler The DTD declaration handler.
- * @see #getLexicalHandler
- */
- public void setDeclHandler(DeclHandler handler);
-
- /**
- * Return the current DTD declaration handler.
- *
- * @return The current DTD declaration handler, or null if none
- * has been registered.
- * @see #setLexicalHandler
- */
- public DeclHandler getDeclHandler();
-
- /**
- * Allow an application to register an encoding algorithm handler.
- *
- * <p>Applications may register a new or different handler in the
- * middle of a parse, and the SAX parser must begin using the new
- * handler immediately.</p>
- *
- * @param handler The encoding algorithm handler.
- * @see #getEncodingAlgorithmContentHandler
- */
- public void setEncodingAlgorithmContentHandler(EncodingAlgorithmContentHandler handler);
-
- /**
- * Return the current encoding algorithm handler.
- *
- * @return The current encoding algorithm handler, or null if none
- * has been registered.
- * @see #setEncodingAlgorithmContentHandler
- */
- public EncodingAlgorithmContentHandler getEncodingAlgorithmContentHandler();
-
- /**
- * Allow an application to register a primitive type handler.
- *
- * <p>Applications may register a new or different handler in the
- * middle of a parse, and the SAX parser must begin using the new
- * handler immediately.</p>
- *
- * @param handler The primitive type handler.
- * @see #getPrimitiveTypeContentHandler
- */
- public void setPrimitiveTypeContentHandler(PrimitiveTypeContentHandler handler);
-
-
- /**
- * Return the current primitive type handler.
- *
- * @return The current primitive type handler, or null if none
- * has been registered.
- * @see #setPrimitiveTypeContentHandler
- */
- public PrimitiveTypeContentHandler getPrimitiveTypeContentHandler();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/FastInfosetWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/FastInfosetWriter.java
deleted file mode 100644
index 5ca726ec..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/FastInfosetWriter.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset.sax;
-
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSerializer;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ext.LexicalHandler;
-
-public interface FastInfosetWriter extends ContentHandler, LexicalHandler,
- EncodingAlgorithmContentHandler, PrimitiveTypeContentHandler,
- RestrictedAlphabetContentHandler, ExtendedContentHandler,
- FastInfosetSerializer {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/PrimitiveTypeContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/PrimitiveTypeContentHandler.java
deleted file mode 100644
index 2e8d4446..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/PrimitiveTypeContentHandler.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset.sax;
-
-import org.xml.sax.SAXException;
-
-/**
- * SAX2 extention handler to receive notification of character data as
- * primtive types.
- *
- * <p>This is an optional extension handler for SAX2. XML readers are not
- * required to recognize this handler, and it is not part of core-only
- * SAX2 distributions.</p>
- *
- * <p>This interface may be used with with a Fast Infoset
- * SAX parser to receive notification of data encoded using the
- * following built-in encoding algorithms specified in ITU-T Rec. X.891 | ISO/IEC 24824-1
- * (Fast Infoset), clause 10: "boolean", "base64", "short", "int", "long",
- * "float", "double" and "uuid" encoding algorithms.<p>
- *
- * <p>To set the PrimitiveTypeContentHandler for an XML reader, use the
- * {@link org.xml.sax.XMLReader#setProperty setProperty} method
- * with the property name
- * <code>URI TO BE DEFINED</code>
- * and an object implementing this interface (or null) as the value.
- * If the reader does not report primitive data types, it will throw a
- * {@link org.xml.sax.SAXNotRecognizedException SAXNotRecognizedException}</p>
- *
- * <p>To set the PrimitiveTypeContentHandler for an Fast Infoset reader, use
- * {@link com.sun.xml.internal.org.jvnet.fastinfoset.sax.FastInfosetReader#setPrimitiveTypeContentHandler
- * setPrimitiveTypeContentHandler} method.<p>
-
- * <p>The Parser will call methods of this interface to report each
- * chunk of character data that has been converted to an array of primitive
- * types, for example an array of integer or an array of float. Parsers may
- * return all contiguous primtive types in a single chunk, or they may split
- * it into several chunks</p>
- *
- * <p>The application must not attempt to read from the array
- * outside of the specified range.</p>
- *
- * @see com.sun.xml.internal.org.jvnet.fastinfoset.sax.EncodingAlgorithmContentHandler
- * @see com.sun.xml.internal.org.jvnet.fastinfoset.sax.FastInfosetReader
- * @see org.xml.sax.XMLReader
- */
-public interface PrimitiveTypeContentHandler {
- /**
- * Receive notification of character data as an array of boolean.
- *
- * <p>The application must not attempt to read from the array
- * outside of the specified range.</p>
- *
- * <p>Such notifications will occur for a Fast Infoset SAX parser
- * when processing data encoded using the "boolean" encoding
- * algorithm, see subclause 10.7<p>.
- *
- * @param b the array of boolean
- * @param start the start position in the array
- * @param length the number of boolean to read from the array
- * @throws org.xml.sax.SAXException any SAX exception, possibly
- * wrapping another exception
- */
- public void booleans(boolean [] b, int start, int length) throws SAXException;
-
- /**
- * Receive notification of character data as an array of byte.
- *
- * <p>The application must not attempt to read from the array
- * outside of the specified range.</p>
- *
- * <p>Such notifications will occur for a Fast Infoset SAX parser
- * when processing data encoded using the "base64" encoding
- * algorithm, see subclause 10.3, or the "hexadecimal" encoding
- * algorithm, see subclause 10.2.
- *
- * <p>Such a notification may occur for binary data that would
- * normally require base 64 encoding and reported as character data
- * using the {@link org.xml.sax.ContentHandler#characters characters}
- * method <p>.
- *
- * @param b the array of byte
- * @param start the start position in the array
- * @param length the number of byte to read from the array
- * @throws org.xml.sax.SAXException any SAX exception, possibly
- * wrapping another exception
- */
- public void bytes(byte[] b, int start, int length) throws SAXException;
-
- /**
- * Receive notification of character data as an array of short.
- *
- * <p>The application must not attempt to read from the array
- * outside of the specified range.</p>
- *
- * <p>Such notifications will occur for a Fast Infoset SAX parser
- * when processing data encoded using the "short" encoding
- * algorithm, see subclause 10.4<p>.
- *
- * @param s the array of short
- * @param start the start position in the array
- * @param length the number of short to read from the array
- * @throws org.xml.sax.SAXException any SAX exception, possibly
- * wrapping another exception
- */
- public void shorts(short[] s, int start, int length) throws SAXException;
-
- /**
- * Receive notification of character data as an array of int.
- *
- * <p>The application must not attempt to read from the array
- * outside of the specified range.</p>
- *
- * <p>Such notifications will occur for a Fast Infoset SAX parser
- * when processing data encoded using the "int" encoding
- * algorithm, see subclause 10.5<p>.
- *
- * @param i the array of int
- * @param start the start position in the array
- * @param length the number of int to read from the array
- * @throws org.xml.sax.SAXException any SAX exception, possibly
- * wrapping another exception
- */
- public void ints(int [] i, int start, int length) throws SAXException;
-
- /**
- * Receive notification of character data as an array of long.
- *
- * <p>The application must not attempt to read from the array
- * outside of the specified range.</p>
- *
- * <p>Such notifications will occur for a Fast Infoset SAX parser
- * when processing data encoded using the "long" encoding
- * algorithm, see subclause 10.6<p>.
- *
- * @param l the array of long
- * @param start the start position in the array
- * @param length the number of long to read from the array
- * @throws org.xml.sax.SAXException any SAX exception, possibly
- * wrapping another exception
- */
- public void longs(long [] l, int start, int length) throws SAXException;
-
- /**
- * Receive notification of character data as an array of float.
- *
- * <p>The application must not attempt to read from the array
- * outside of the specified range.</p>
- *
- * <p>Such notifications will occur for a Fast Infoset SAX parser
- * when processing data encoded using the "float" encoding
- * algorithm, see subclause 10.8<p>.
- *
- * @param f the array of float
- * @param start the start position in the array
- * @param length the number of float to read from the array
- * @throws org.xml.sax.SAXException any SAX exception, possibly
- * wrapping another exception
- */
- public void floats(float [] f, int start, int length) throws SAXException;
-
- /**
- * Receive notification of character data as an array of double.
- *
- * <p>The application must not attempt to read from the array
- * outside of the specified range.</p>
- *
- * <p>Such notifications will occur for a Fast Infoset SAX parser
- * when processing data encoded using the "double" encoding
- * algorithm, see subclause 10.9<p>.
- *
- * @param d the array of double
- * @param start the start position in the array
- * @param length the number of double to read from the array
- * @throws org.xml.sax.SAXException any SAX exception, possibly
- * wrapping another exception
- */
- public void doubles(double [] d, int start, int length) throws SAXException;
-
- /**
- * Receive notification of character data as an two array of UUID.
- *
- * <p>The application must not attempt to read from the array
- * outside of the specified range.</p>
- *
- * <p>Such notifications will occur for a Fast Infoset SAX parser
- * when processing data encoded using the "uuid" encoding
- * algorithm, see subclause 10.10<p>.
- *
- * @param msblsb the array of long containing pairs of most signficant
- * bits and least significant bits of the UUIDs
- * @param start the start position in the array
- * @param length the number of long to read from the array. This will
- * be twice the number of UUIDs, which are pairs of two long values
- * @throws org.xml.sax.SAXException any SAX exception, possibly
- * wrapping another exception
- */
- public void uuids(long[] msblsb, int start, int length) throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/RestrictedAlphabetContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/RestrictedAlphabetContentHandler.java
deleted file mode 100644
index 0d6e9039..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/RestrictedAlphabetContentHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset.sax;
-
-import org.xml.sax.SAXException;
-
-public interface RestrictedAlphabetContentHandler {
-
- public void numericCharacters(char ch[], int start, int length) throws SAXException;
-
- public void dateTimeCharacters(char ch[], int start, int length) throws SAXException;
-
- public void alphabetCharacters(String alphabet, char ch[], int start, int length) throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/helpers/EncodingAlgorithmAttributesImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/helpers/EncodingAlgorithmAttributesImpl.java
deleted file mode 100644
index bc37054e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/helpers/EncodingAlgorithmAttributesImpl.java
+++ /dev/null
@@ -1,604 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset.sax.helpers;
-
-import com.sun.xml.internal.fastinfoset.CommonResourceBundle;
-import com.sun.xml.internal.fastinfoset.EncodingConstants;
-import com.sun.xml.internal.fastinfoset.algorithm.BuiltInEncodingAlgorithmFactory;
-import java.io.IOException;
-import java.util.Map;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithm;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.EncodingAlgorithmIndexes;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetException;
-import com.sun.xml.internal.org.jvnet.fastinfoset.sax.EncodingAlgorithmAttributes;
-import org.xml.sax.Attributes;
-
-/**
- * Default implementation of the {@link EncodingAlgorithmAttributes} interface.
- *
- * <p>This class provides a default implementation of the SAX2
- * {@link EncodingAlgorithmAttributes} interface, with the
- * addition of manipulators so that the list can be modified or
- * reused.</p>
- *
- * <p>There are two typical uses of this class:</p>
- *
- * <ol>
- * <li>to take a persistent snapshot of an EncodingAlgorithmAttributes object
- * in a {@link org.xml.sax.ContentHandler#startElement startElement} event; or</li>
- * <li>to construct or modify an EncodingAlgorithmAttributes object in a SAX2
- * driver or filter.</li>
- * </ol>
- */
-public class EncodingAlgorithmAttributesImpl implements EncodingAlgorithmAttributes {
- private static final int DEFAULT_CAPACITY = 8;
-
- private static final int URI_OFFSET = 0;
- private static final int LOCALNAME_OFFSET = 1;
- private static final int QNAME_OFFSET = 2;
- private static final int TYPE_OFFSET = 3;
- private static final int VALUE_OFFSET = 4;
- private static final int ALGORITHMURI_OFFSET = 5;
-
- private static final int SIZE = 6;
-
- private Map _registeredEncodingAlgorithms;
-
- private int _length;
-
- private String[] _data;
-
- private int[] _algorithmIds;
-
- private Object[] _algorithmData;
-
- private String[] _alphabets;
-
- private boolean[] _toIndex;
-
- /**
- * Construct a new, empty EncodingAlgorithmAttributesImpl object.
- */
- public EncodingAlgorithmAttributesImpl() {
- this(null, null);
- }
-
- /**
- * Copy an existing Attributes object.
- *
- * <p>This constructor is especially useful inside a
- * {@link org.xml.sax.ContentHandler#startElement startElement} event.</p>
- *
- * @param attributes The existing Attributes object.
- */
- public EncodingAlgorithmAttributesImpl(Attributes attributes) {
- this(null, attributes);
- }
-
- /**
- * Use registered encoding algorithms and copy an existing Attributes object.
- *
- * <p>This constructor is especially useful inside a
- * {@link org.xml.sax.ContentHandler#startElement startElement} event.</p>
- *
- * @param registeredEncodingAlgorithms
- * The registeredEncodingAlgorithms encoding algorithms.
- * @param attributes The existing Attributes object.
- */
- public EncodingAlgorithmAttributesImpl(Map registeredEncodingAlgorithms,
- Attributes attributes) {
- _data = new String[DEFAULT_CAPACITY * SIZE];
- _algorithmIds = new int[DEFAULT_CAPACITY];
- _algorithmData = new Object[DEFAULT_CAPACITY];
- _alphabets = new String[DEFAULT_CAPACITY];
- _toIndex = new boolean[DEFAULT_CAPACITY];
-
- _registeredEncodingAlgorithms = registeredEncodingAlgorithms;
-
- if (attributes != null) {
- if (attributes instanceof EncodingAlgorithmAttributes) {
- setAttributes((EncodingAlgorithmAttributes)attributes);
- } else {
- setAttributes(attributes);
- }
- }
- }
-
- /**
- * Clear the attribute list for reuse.
- *
- */
- public final void clear() {
- for (int i = 0; i < _length; i++) {
- _data[i * SIZE + VALUE_OFFSET] = null;
- _algorithmData[i] = null;
- }
- _length = 0;
- }
-
- /**
- * Add an attribute to the end of the list.
- *
- * <p>For the sake of speed, this method does no checking
- * to see if the attribute is already in the list: that is
- * the responsibility of the application.</p>
- *
- * @param URI The Namespace URI, or the empty string if
- * none is available or Namespace processing is not
- * being performed.
- * @param localName The local name, or the empty string if
- * Namespace processing is not being performed.
- * @param qName The qualified (prefixed) name, or the empty string
- * if qualified names are not available.
- * @param type The attribute type as a string.
- * @param value The attribute value.
- */
- public void addAttribute(String URI, String localName, String qName,
- String type, String value) {
- if (_length >= _algorithmData.length) {
- resize();
- }
-
- int i = _length * SIZE;
- _data[i++] = replaceNull(URI);
- _data[i++] = replaceNull(localName);
- _data[i++] = replaceNull(qName);
- _data[i++] = replaceNull(type);
- _data[i++] = replaceNull(value);
- _toIndex[_length] = false;
- _alphabets[_length] = null;
-
- _length++;
- }
-
- /**
- * Add an attribute to the end of the list.
- *
- * <p>For the sake of speed, this method does no checking
- * to see if the attribute is already in the list: that is
- * the responsibility of the application.</p>
- *
- * @param URI The Namespace URI, or the empty string if
- * none is available or Namespace processing is not
- * being performed.
- * @param localName The local name, or the empty string if
- * Namespace processing is not being performed.
- * @param qName The qualified (prefixed) name, or the empty string
- * if qualified names are not available.
- * @param type The attribute type as a string.
- * @param value The attribute value.
- * @param index True if attribute should be indexed.
- * @param alphabet The alphabet associated with the attribute value,
- * may be null if there is no associated alphabet.
- */
- public void addAttribute(String URI, String localName, String qName,
- String type, String value, boolean index, String alphabet) {
- if (_length >= _algorithmData.length) {
- resize();
- }
-
- int i = _length * SIZE;
- _data[i++] = replaceNull(URI);
- _data[i++] = replaceNull(localName);
- _data[i++] = replaceNull(qName);
- _data[i++] = replaceNull(type);
- _data[i++] = replaceNull(value);
- _toIndex[_length] = index;
- _alphabets[_length] = alphabet;
-
- _length++;
- }
-
- /**
- * Add an attribute with built in algorithm data to the end of the list.
- *
- * <p>For the sake of speed, this method does no checking
- * to see if the attribute is already in the list: that is
- * the responsibility of the application.</p>
- *
- * @param URI The Namespace URI, or the empty string if
- * none is available or Namespace processing is not
- * being performed.
- * @param localName The local name, or the empty string if
- * Namespace processing is not being performed.
- * @param qName The qualified (prefixed) name, or the empty string
- * if qualified names are not available.
- * @param builtInAlgorithmID The built in algorithm ID.
- * @param algorithmData The built in algorithm data.
- */
- public void addAttributeWithBuiltInAlgorithmData(String URI, String localName, String qName,
- int builtInAlgorithmID, Object algorithmData) {
- if (_length >= _algorithmData.length) {
- resize();
- }
-
- int i = _length * SIZE;
- _data[i++] = replaceNull(URI);
- _data[i++] = replaceNull(localName);
- _data[i++] = replaceNull(qName);
- _data[i++] = "CDATA";
- _data[i++] = "";
- _data[i++] = null;
- _algorithmIds[_length] = builtInAlgorithmID;
- _algorithmData[_length] = algorithmData;
- _toIndex[_length] = false;
- _alphabets[_length] = null;
-
- _length++;
- }
-
- /**
- * Add an attribute with algorithm data to the end of the list.
- *
- * <p>For the sake of speed, this method does no checking
- * to see if the attribute is already in the list: that is
- * the responsibility of the application.</p>
- *
- * @param URI The Namespace URI, or the empty string if
- * none is available or Namespace processing is not
- * being performed.
- * @param localName The local name, or the empty string if
- * Namespace processing is not being performed.
- * @param qName The qualified (prefixed) name, or the empty string
- * if qualified names are not available.
- * @param algorithmURI The algorithm URI, or null if a built in algorithm
- * @param algorithmID The algorithm ID.
- * @param algorithmData The algorithm data.
- */
- public void addAttributeWithAlgorithmData(String URI, String localName, String qName,
- String algorithmURI, int algorithmID, Object algorithmData) {
- if (_length >= _algorithmData.length) {
- resize();
- }
-
- int i = _length * SIZE;
- _data[i++] = replaceNull(URI);
- _data[i++] = replaceNull(localName);
- _data[i++] = replaceNull(qName);
- _data[i++] = "CDATA";
- _data[i++] = "";
- _data[i++] = algorithmURI;
- _algorithmIds[_length] = algorithmID;
- _algorithmData[_length] = algorithmData;
- _toIndex[_length] = false;
- _alphabets[_length] = null;
-
- _length++;
- }
-
- /**
- * Replace an attribute value with algorithm data.
- *
- * <p>For the sake of speed, this method does no checking
- * to see if the attribute is already in the list: that is
- * the responsibility of the application.</p>
- *
- * @param index The index of the attribute whose value is to be replaced
- * @param algorithmURI The algorithm URI, or null if a built in algorithm
- * @param algorithmID The algorithm ID.
- * @param algorithmData The algorithm data.
- */
- public void replaceWithAttributeAlgorithmData(int index,
- String algorithmURI, int algorithmID, Object algorithmData) {
- if (index < 0 || index >= _length) return;
-
- int i = index * SIZE;
- _data[i + VALUE_OFFSET] = null;
- _data[i + ALGORITHMURI_OFFSET] = algorithmURI;
- _algorithmIds[index] = algorithmID;
- _algorithmData[index] = algorithmData;
- _toIndex[index] = false;
- _alphabets[index] = null;
- }
-
- /**
- * Copy an entire Attributes object.
- *
- * @param atts The attributes to copy.
- */
- public void setAttributes(Attributes atts) {
- _length = atts.getLength();
- if (_length > 0) {
-
- if (_length >= _algorithmData.length) {
- resizeNoCopy();
- }
-
- int index = 0;
- for (int i = 0; i < _length; i++) {
- _data[index++] = atts.getURI(i);
- _data[index++] = atts.getLocalName(i);
- _data[index++] = atts.getQName(i);
- _data[index++] = atts.getType(i);
- _data[index++] = atts.getValue(i);
- index++;
- _toIndex[i] = false;
- _alphabets[i] = null;
- }
- }
- }
-
- /**
- * Copy an entire EncodingAlgorithmAttributes object.
- *
- * @param atts The attributes to copy.
- */
- public void setAttributes(EncodingAlgorithmAttributes atts) {
- _length = atts.getLength();
- if (_length > 0) {
-
- if (_length >= _algorithmData.length) {
- resizeNoCopy();
- }
-
- int index = 0;
- for (int i = 0; i < _length; i++) {
- _data[index++] = atts.getURI(i);
- _data[index++] = atts.getLocalName(i);
- _data[index++] = atts.getQName(i);
- _data[index++] = atts.getType(i);
- _data[index++] = atts.getValue(i);
- _data[index++] = atts.getAlgorithmURI(i);
- _algorithmIds[i] = atts.getAlgorithmIndex(i);
- _algorithmData[i] = atts.getAlgorithmData(i);
- _toIndex[i] = false;
- _alphabets[i] = null;
- }
- }
- }
-
- // org.xml.sax.Attributes
-
- public final int getLength() {
- return _length;
- }
-
- public final String getLocalName(int index) {
- if (index >= 0 && index < _length) {
- return _data[index * SIZE + LOCALNAME_OFFSET];
- } else {
- return null;
- }
- }
-
- public final String getQName(int index) {
- if (index >= 0 && index < _length) {
- return _data[index * SIZE + QNAME_OFFSET];
- } else {
- return null;
- }
- }
-
- public final String getType(int index) {
- if (index >= 0 && index < _length) {
- return _data[index * SIZE + TYPE_OFFSET];
- } else {
- return null;
- }
- }
-
- public final String getURI(int index) {
- if (index >= 0 && index < _length) {
- return _data[index * SIZE + URI_OFFSET];
- } else {
- return null;
- }
- }
-
- public final String getValue(int index) {
- if (index >= 0 && index < _length) {
- final String value = _data[index * SIZE + VALUE_OFFSET];
- if (value != null) return value;
- } else {
- return null;
- }
-
- if (_algorithmData[index] == null || _registeredEncodingAlgorithms == null) {
- return null;
- }
-
- try {
- return _data[index * SIZE + VALUE_OFFSET] = convertEncodingAlgorithmDataToString(
- _algorithmIds[index],
- _data[index * SIZE + ALGORITHMURI_OFFSET],
- _algorithmData[index]).toString();
- } catch (IOException e) {
- return null;
- } catch (FastInfosetException e) {
- return null;
- }
- }
-
- public final int getIndex(String qName) {
- for (int index = 0; index < _length; index++) {
- if (qName.equals(_data[index * SIZE + QNAME_OFFSET])) {
- return index;
- }
- }
- return -1;
- }
-
- public final String getType(String qName) {
- int index = getIndex(qName);
- if (index >= 0) {
- return _data[index * SIZE + TYPE_OFFSET];
- } else {
- return null;
- }
- }
-
- public final String getValue(String qName) {
- int index = getIndex(qName);
- if (index >= 0) {
- return getValue(index);
- } else {
- return null;
- }
- }
-
- public final int getIndex(String uri, String localName) {
- for (int index = 0; index < _length; index++) {
- if (localName.equals(_data[index * SIZE + LOCALNAME_OFFSET]) &&
- uri.equals(_data[index * SIZE + URI_OFFSET])) {
- return index;
- }
- }
- return -1;
- }
-
- public final String getType(String uri, String localName) {
- int index = getIndex(uri, localName);
- if (index >= 0) {
- return _data[index * SIZE + TYPE_OFFSET];
- } else {
- return null;
- }
- }
-
- public final String getValue(String uri, String localName) {
- int index = getIndex(uri, localName);
- if (index >= 0) {
- return getValue(index);
- } else {
- return null;
- }
- }
-
- // EncodingAlgorithmAttributes
-
- public final String getAlgorithmURI(int index) {
- if (index >= 0 && index < _length) {
- return _data[index * SIZE + ALGORITHMURI_OFFSET];
- } else {
- return null;
- }
- }
-
- public final int getAlgorithmIndex(int index) {
- if (index >= 0 && index < _length) {
- return _algorithmIds[index];
- } else {
- return -1;
- }
- }
-
- public final Object getAlgorithmData(int index) {
- if (index >= 0 && index < _length) {
- return _algorithmData[index];
- } else {
- return null;
- }
- }
-
- // ExtendedAttributes
-
- public final String getAlpababet(int index) {
- if (index >= 0 && index < _length) {
- return _alphabets[index];
- } else {
- return null;
- }
- }
-
- public final boolean getToIndex(int index) {
- if (index >= 0 && index < _length) {
- return _toIndex[index];
- } else {
- return false;
- }
- }
-
- // -----
-
- private final String replaceNull(String s) {
- return (s != null) ? s : "";
- }
-
- private final void resizeNoCopy() {
- final int newLength = _length * 3 / 2 + 1;
-
- _data = new String[newLength * SIZE];
- _algorithmIds = new int[newLength];
- _algorithmData = new Object[newLength];
- }
-
- private final void resize() {
- final int newLength = _length * 3 / 2 + 1;
-
- String[] data = new String[newLength * SIZE];
- int[] algorithmIds = new int[newLength];
- Object[] algorithmData = new Object[newLength];
- String[] alphabets = new String[newLength];
- boolean[] toIndex = new boolean[newLength];
-
- System.arraycopy(_data, 0, data, 0, _length * SIZE);
- System.arraycopy(_algorithmIds, 0, algorithmIds, 0, _length);
- System.arraycopy(_algorithmData, 0, algorithmData, 0, _length);
- System.arraycopy(_alphabets, 0, alphabets, 0, _length);
- System.arraycopy(_toIndex, 0, toIndex, 0, _length);
-
- _data = data;
- _algorithmIds = algorithmIds;
- _algorithmData = algorithmData;
- _alphabets = alphabets;
- _toIndex = toIndex;
- }
-
- private final StringBuffer convertEncodingAlgorithmDataToString(
- int identifier, String URI, Object data) throws FastInfosetException, IOException {
- EncodingAlgorithm ea = null;
- if (identifier < EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END) {
- ea = BuiltInEncodingAlgorithmFactory.getAlgorithm(identifier);
- } else if (identifier == EncodingAlgorithmIndexes.CDATA) {
- throw new EncodingAlgorithmException(
- CommonResourceBundle.getInstance().getString("message.CDATAAlgorithmNotSupported"));
- } else if (identifier >= EncodingConstants.ENCODING_ALGORITHM_APPLICATION_START) {
- if (URI == null) {
- throw new EncodingAlgorithmException(
- CommonResourceBundle.getInstance().getString("message.URINotPresent") + identifier);
- }
-
- ea = (EncodingAlgorithm)_registeredEncodingAlgorithms.get(URI);
- if (ea == null) {
- throw new EncodingAlgorithmException(
- CommonResourceBundle.getInstance().getString("message.algorithmNotRegistered") + URI);
- }
- } else {
- // Reserved built-in algorithms for future use
- // TODO should use sax property to decide if event will be
- // reported, allows for support through handler if required.
- throw new EncodingAlgorithmException(
- CommonResourceBundle.getInstance().getString("message.identifiers10to31Reserved"));
- }
-
- final StringBuffer sb = new StringBuffer();
- ea.convertToCharacters(data, sb);
- return sb;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/helpers/FastInfosetDefaultHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/helpers/FastInfosetDefaultHandler.java
deleted file mode 100644
index 6c5dd3cd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/sax/helpers/FastInfosetDefaultHandler.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset.sax.helpers;
-
-import com.sun.xml.internal.org.jvnet.fastinfoset.sax.*;
-import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Default base class for SAX event handlers of a {@link FastInfosetReader}.
- * <p>
- * This class is available as a convenience for applications: it provides
- * default implementations for all of the callbacks of the following:
- * <UL>
- * <LI>{@link DefaultHandler}</LI>
- * <LI>{@link LexicalHandler}</LI>
- * <LI>{@link EncodingAlgorithmContentHandler}</LI>
- * <LI>{@link PrimitiveTypeContentHandler}</LI>
- * </UL>
- * Application writers can extend this class when they need to implement only
- * part of an interface; parser writers can instantiate this class to provide
- * default handlers when the application has not supplied its own.
- */
-public class FastInfosetDefaultHandler extends DefaultHandler implements
- LexicalHandler, EncodingAlgorithmContentHandler, PrimitiveTypeContentHandler {
-
- // LexicalHandler
-
- public void comment(char[] ch, int start, int length) throws SAXException {
- }
-
- public void startCDATA() throws SAXException {
- }
-
- public void endCDATA() throws SAXException {
- }
-
- public void startDTD(String name, String publicId, String systemId) throws SAXException {
- }
-
- public void endDTD() throws SAXException {
- }
-
- public void startEntity(String name) throws SAXException {
- }
-
- public void endEntity(String name) throws SAXException {
- }
-
-
- // EncodingAlgorithmContentHandler
-
- public void octets(String URI, int algorithm, byte[] b, int start, int length) throws SAXException {
- }
-
- public void object(String URI, int algorithm, Object o) throws SAXException {
- }
-
-
- // PrimitiveTypeContentHandler
-
- public void booleans(boolean[] b, int start, int length) throws SAXException {
- }
-
- public void bytes(byte[] b, int start, int length) throws SAXException {
- }
-
- public void shorts(short[] s, int start, int length) throws SAXException {
- }
-
- public void ints(int[] i, int start, int length) throws SAXException {
- }
-
- public void longs(long[] l, int start, int length) throws SAXException {
- }
-
- public void floats(float[] f, int start, int length) throws SAXException {
- }
-
- public void doubles(double[] d, int start, int length) throws SAXException {
- }
-
- public void uuids(long[] msblsb, int start, int length) throws SAXException {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/stax/FastInfosetStreamReader.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/stax/FastInfosetStreamReader.java
deleted file mode 100644
index cbe7afc5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/stax/FastInfosetStreamReader.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset.stax;
-
-import javax.xml.stream.XMLStreamException;
-
-/**
- * Fast Infoset Stream Reader.
- * <p>
- * This interface provides additional optimized methods to that of
- * {@link javax.xml.stream.XMLStreamReader}.
- */
-public interface FastInfosetStreamReader {
- /**
- * Peek at the next event.
- *
- * @return the event, which will be the same as that returned from
- * {@link #next}.
- */
- public int peekNext() throws XMLStreamException;
-
- // Faster access methods without checks
-
- public int accessNamespaceCount();
-
- public String accessLocalName();
-
- public String accessNamespaceURI();
-
- public String accessPrefix();
-
- /**
- * Returns a cloned char[] representation of the internal char[] buffer.
- * So be careful, when using this method due to possible performance and
- * memory inefficiency.
- *
- * @return a cloned char[] representation of the internal char[] buffer.
- */
- public char[] accessTextCharacters();
-
- public int accessTextStart();
-
- public int accessTextLength();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/stax/LowLevelFastInfosetStreamWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/stax/LowLevelFastInfosetStreamWriter.java
deleted file mode 100644
index db4a2012..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/fastinfoset/stax/LowLevelFastInfosetStreamWriter.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- * THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
- */
-
-package com.sun.xml.internal.org.jvnet.fastinfoset.stax;
-
-import java.io.IOException;
-import javax.xml.stream.XMLStreamException;
-
-/**
- * Low level Fast Infoset stream writer.
- * <p>
- * This interface provides additional stream-based serialization methods for the
- * case where an application is in specific control of the serialization
- * process and has the knowledge to call the LowLevel methods in the required
- * order.
- * <p>
- * For example, the application may be able to perform efficient information
- * to indexing mapping and to provide certain information in UTF-8 encoded form.
- * <p>
- * These methods may be used in conjuction with {@link javax.xml.stream.XMLStreamWriter}
- * as long as an element fragment written using the efficient streaming methods
- * are self-contained and no sub-fragment is written using methods from
- * {@link javax.xml.stream.XMLStreamWriter}.
- * <p>
- * The required call sequence is as follows:
- * <pre>
- * CALLSEQUENCE := {@link #startDocument startDocument}
- * initiateLowLevelWriting ELEMENT
- * {@link #endDocument endDocument}
- * | initiateLowLevelWriting ELEMENT // for fragment
- *
- * ELEMENT := writeLowLevelTerminationAndMark
- * NAMESPACES?
- * ELEMENT_NAME
- * ATTRIBUTES?
- * writeLowLevelEndStartElement
- * CONTENTS
- * writeLowLevelEndElement
- *
- * NAMESPACES := writeLowLevelStartNamespaces
- * writeLowLevelNamespace*
- * writeLowLevelEndNamespaces
- *
- * ELEMENT_NAME := writeLowLevelStartElementIndexed
- * | writeLowLevelStartNameLiteral
- * | writeLowLevelStartElement
- *
- * ATTRUBUTES := writeLowLevelStartAttributes
- * (ATTRIBUTE_NAME writeLowLevelAttributeValue)*
- *
- * ATTRIBUTE_NAME := writeLowLevelAttributeIndexed
- * | writeLowLevelStartNameLiteral
- * | writeLowLevelAttribute
- *
- *
- * CONTENTS := (ELEMENT | writeLowLevelText writeLowLevelOctets)*
- * </pre>
- * <p>
- * Some methods defer to the application for the mapping of information
- * to indexes.
- */
-public interface LowLevelFastInfosetStreamWriter {
- /**
- * Initiate low level writing of an element fragment.
- * <p>
- * This method must be invoked before other low level method.
- */
- public void initiateLowLevelWriting()
- throws XMLStreamException;
-
- /**
- * Get the next index to apply to an Element Information Item.
- * <p>
- * This will increment the next obtained index such that:
- * <pre>
- * i = w.getNextElementIndex();
- * j = w.getNextElementIndex();
- * i == j + 1;
- * </pre>
- * @return the index.
- */
- public int getNextElementIndex();
-
- /**
- * Get the next index to apply to an Attribute Information Item.
- * This will increment the next obtained index such that:
- * <pre>
- * i = w.getNextAttributeIndex();
- * j = w.getNextAttributeIndex();
- * i == j + 1;
- * </pre>
- * @return the index.
- */
- public int getNextAttributeIndex();
-
- /**
- * Get the current index that was applied to an [local name] of an
- * Element or Attribute Information Item.
- * </pre>
- * @return the index.
- */
- public int getLocalNameIndex();
-
- /**
- * Get the next index to apply to an [local name] of an Element or Attribute
- * Information Item.
- * This will increment the next obtained index such that:
- * <pre>
- * i = w.getNextLocalNameIndex();
- * j = w.getNextLocalNameIndex();
- * i == j + 1;
- * </pre>
- * @return the index.
- */
- public int getNextLocalNameIndex();
-
- public void writeLowLevelTerminationAndMark()
- throws IOException;
-
- public void writeLowLevelStartElementIndexed(int type, int index)
- throws IOException;
-
- /**
- * Write the start of an element.
- *
- * @return true if element is indexed, otherwise false.
- */
- public boolean writeLowLevelStartElement(int type,
- String prefix, String localName, String namespaceURI)
- throws IOException;
-
- public void writeLowLevelStartNamespaces()
- throws IOException;
-
- public void writeLowLevelNamespace(String prefix, String namespaceName)
- throws IOException;
-
- public void writeLowLevelEndNamespaces()
- throws IOException;
-
- public void writeLowLevelStartAttributes()
- throws IOException;
-
- public void writeLowLevelAttributeIndexed(int index)
- throws IOException;
-
- /**
- * Write an attribute.
- *
- * @return true if attribute is indexed, otherwise false.
- */
- public boolean writeLowLevelAttribute(
- String prefix, String namespaceURI, String localName)
- throws IOException;
-
- public void writeLowLevelAttributeValue(String value)
- throws IOException;
-
- public void writeLowLevelStartNameLiteral(int type,
- String prefix, byte[] utf8LocalName, String namespaceURI)
- throws IOException;
-
- public void writeLowLevelStartNameLiteral(int type,
- String prefix, int localNameIndex, String namespaceURI)
- throws IOException;
-
- public void writeLowLevelEndStartElement()
- throws IOException;
-
- public void writeLowLevelEndElement()
- throws IOException;
-
- public void writeLowLevelText(char[] text, int length)
- throws IOException;
-
- public void writeLowLevelText(String text)
- throws IOException;
-
- public void writeLowLevelOctets(byte[] octets, int length)
- throws IOException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/ASCIIUtility.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/ASCIIUtility.java
deleted file mode 100644
index ae1e0c8b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/ASCIIUtility.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* FROM mail.jar */
-package com.sun.xml.internal.org.jvnet.mimepull;
-
-final class ASCIIUtility {
-
- // Private constructor so that this class is not instantiated
- private ASCIIUtility() { }
-
- /**
- * Convert the bytes within the specified range of the given byte
- * array into a signed integer in the given radix . The range extends
- * from <code>start</code> till, but not including <code>end</code>. <p>
- *
- * Based on java.lang.Integer.parseInt()
- */
- public static int parseInt(byte[] b, int start, int end, int radix)
- throws NumberFormatException {
- if (b == null) {
- throw new NumberFormatException("null");
- }
-
- int result = 0;
- boolean negative = false;
- int i = start;
- int limit;
- int multmin;
- int digit;
-
- if (end > start) {
- if (b[i] == '-') {
- negative = true;
- limit = Integer.MIN_VALUE;
- i++;
- } else {
- limit = -Integer.MAX_VALUE;
- }
- multmin = limit / radix;
- if (i < end) {
- digit = Character.digit((char)b[i++], radix);
- if (digit < 0) {
- throw new NumberFormatException(
- "illegal number: " + toString(b, start, end)
- );
- } else {
- result = -digit;
- }
- }
- while (i < end) {
- // Accumulating negatively avoids surprises near MAX_VALUE
- digit = Character.digit((char)b[i++], radix);
- if (digit < 0) {
- throw new NumberFormatException("illegal number");
- }
- if (result < multmin) {
- throw new NumberFormatException("illegal number");
- }
- result *= radix;
- if (result < limit + digit) {
- throw new NumberFormatException("illegal number");
- }
- result -= digit;
- }
- } else {
- throw new NumberFormatException("illegal number");
- }
- if (negative) {
- if (i > start + 1) {
- return result;
- } else { /* Only got "-" */
- throw new NumberFormatException("illegal number");
- }
- } else {
- return -result;
- }
- }
-
- /**
- * Convert the bytes within the specified range of the given byte
- * array into a String. The range extends from <code>start</code>
- * till, but not including <code>end</code>. <p>
- */
- public static String toString(byte[] b, int start, int end) {
- int size = end - start;
- char[] theChars = new char[size];
-
- for (int i = 0, j = start; i < size; ) {
- theChars[i++] = (char)(b[j++]&0xff);
- }
-
- return new String(theChars);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/BASE64DecoderStream.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/BASE64DecoderStream.java
deleted file mode 100644
index 9f6db9e2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/BASE64DecoderStream.java
+++ /dev/null
@@ -1,485 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* FROM mail.jar */
-package com.sun.xml.internal.org.jvnet.mimepull;
-
-import java.io.*;
-
-/**
- * This class implements a BASE64 Decoder. It is implemented as
- * a FilterInputStream, so one can just wrap this class around
- * any input stream and read bytes from this filter. The decoding
- * is done as the bytes are read out.
- *
- * @author John Mani
- * @author Bill Shannon
- */
-
-final class BASE64DecoderStream extends FilterInputStream {
- // buffer of decoded bytes for single byte reads
- private byte[] buffer = new byte[3];
- private int bufsize = 0; // size of the cache
- private int index = 0; // index into the cache
-
- // buffer for almost 8K of typical 76 chars + CRLF lines,
- // used by getByte method. this buffer contains encoded bytes.
- private byte[] input_buffer = new byte[78*105];
- private int input_pos = 0;
- private int input_len = 0;;
-
- private boolean ignoreErrors = false;
-
- /**
- * Create a BASE64 decoder that decodes the specified input stream.
- * The System property <code>mail.mime.base64.ignoreerrors</code>
- * controls whether errors in the encoded data cause an exception
- * or are ignored. The default is false (errors cause exception).
- *
- * @param in the input stream
- */
- public BASE64DecoderStream(InputStream in) {
- super(in);
- // default to false
- ignoreErrors = PropUtil.getBooleanSystemProperty(
- "mail.mime.base64.ignoreerrors", false);
- }
-
- /**
- * Create a BASE64 decoder that decodes the specified input stream.
- *
- * @param in the input stream
- * @param ignoreErrors ignore errors in encoded data?
- */
- public BASE64DecoderStream(InputStream in, boolean ignoreErrors) {
- super(in);
- this.ignoreErrors = ignoreErrors;
- }
-
- /**
- * Read the next decoded byte from this input stream. The byte
- * is returned as an <code>int</code> in the range <code>0</code>
- * to <code>255</code>. If no byte is available because the end of
- * the stream has been reached, the value <code>-1</code> is returned.
- * This method blocks until input data is available, the end of the
- * stream is detected, or an exception is thrown.
- *
- * @return next byte of data, or <code>-1</code> if the end of the
- * stream is reached.
- * @exception IOException if an I/O error occurs.
- * @see java.io.FilterInputStream#in
- */
- @Override
- public int read() throws IOException {
- if (index >= bufsize) {
- bufsize = decode(buffer, 0, buffer.length);
- if (bufsize <= 0) {
- return -1;
- }
- index = 0; // reset index into buffer
- }
- return buffer[index++] & 0xff; // Zero off the MSB
- }
-
- /**
- * Reads up to <code>len</code> decoded bytes of data from this input stream
- * into an array of bytes. This method blocks until some input is
- * available.
- * <p>
- *
- * @param buf the buffer into which the data is read.
- * @param off the start offset of the data.
- * @param len the maximum number of bytes read.
- * @return the total number of bytes read into the buffer, or
- * <code>-1</code> if there is no more data because the end of
- * the stream has been reached.
- * @exception IOException if an I/O error occurs.
- */
- @Override
- public int read(byte[] buf, int off, int len) throws IOException {
- // empty out single byte read buffer
- int off0 = off;
- while (index < bufsize && len > 0) {
- buf[off++] = buffer[index++];
- len--;
- }
- if (index >= bufsize) {
- bufsize = index = 0;
- }
-
- int bsize = (len / 3) * 3; // round down to multiple of 3 bytes
- if (bsize > 0) {
- int size = decode(buf, off, bsize);
- off += size;
- len -= size;
-
- if (size != bsize) { // hit EOF?
- if (off == off0) {
- return -1;
- } else {
- return off - off0;
- }
- }
- }
-
- // finish up with a partial read if necessary
- for (; len > 0; len--) {
- int c = read();
- if (c == -1) {
- break;
- }
- buf[off++] = (byte)c;
- }
-
- if (off == off0) {
- return -1;
- } else {
- return off - off0;
- }
- }
-
- /**
- * Skips over and discards n bytes of data from this stream.
- */
- @Override
- public long skip(long n) throws IOException {
- long skipped = 0;
- while (n-- > 0 && read() >= 0) {
- skipped++;
- }
- return skipped;
- }
-
- /**
- * Tests if this input stream supports marks. Currently this class
- * does not support marks
- */
- @Override
- public boolean markSupported() {
- return false; // Maybe later ..
- }
-
- /**
- * Returns the number of bytes that can be read from this input
- * stream without blocking. However, this figure is only
- * a close approximation in case the original encoded stream
- * contains embedded CRLFs; since the CRLFs are discarded, not decoded
- */
- @Override
- public int available() throws IOException {
- // This is only an estimate, since in.available()
- // might include CRLFs too ..
- return ((in.available() * 3)/4 + (bufsize-index));
- }
-
- /**
- * This character array provides the character to value map
- * based on RFC1521.
- */
- private final static char pem_array[] = {
- 'A','B','C','D','E','F','G','H', // 0
- 'I','J','K','L','M','N','O','P', // 1
- 'Q','R','S','T','U','V','W','X', // 2
- 'Y','Z','a','b','c','d','e','f', // 3
- 'g','h','i','j','k','l','m','n', // 4
- 'o','p','q','r','s','t','u','v', // 5
- 'w','x','y','z','0','1','2','3', // 6
- '4','5','6','7','8','9','+','/' // 7
- };
-
- private final static byte pem_convert_array[] = new byte[256];
-
- static {
- for (int i = 0; i < 255; i++) {
- pem_convert_array[i] = -1;
- }
- for (int i = 0; i < pem_array.length; i++) {
- pem_convert_array[pem_array[i]] = (byte)i;
- }
- }
-
- /**
- * The decoder algorithm. Most of the complexity here is dealing
- * with error cases. Returns the number of bytes decoded, which
- * may be zero. Decoding is done by filling an int with 4 6-bit
- * values by shifting them in from the bottom and then extracting
- * 3 8-bit bytes from the int by shifting them out from the bottom.
- *
- * @param outbuf the buffer into which to put the decoded bytes
- * @param pos position in the buffer to start filling
- * @param len the number of bytes to fill
- * @return the number of bytes filled, always a multiple
- * of three, and may be zero
- * @exception IOException if the data is incorrectly formatted
- */
- private int decode(byte[] outbuf, int pos, int len) throws IOException {
- int pos0 = pos;
- while (len >= 3) {
- /*
- * We need 4 valid base64 characters before we start decoding.
- * We skip anything that's not a valid base64 character (usually
- * just CRLF).
- */
- int got = 0;
- int val = 0;
- while (got < 4) {
- int i = getByte();
- if (i == -1 || i == -2) {
- boolean atEOF;
- if (i == -1) {
- if (got == 0) {
- return pos - pos0;
- }
- if (!ignoreErrors) {
- throw new DecodingException(
- "BASE64Decoder: Error in encoded stream: " +
- "needed 4 valid base64 characters " +
- "but only got " + got + " before EOF" +
- recentChars());
- }
- atEOF = true; // don't read any more
- } else { // i == -2
- // found a padding character, we're at EOF
- // XXX - should do something to make EOF "sticky"
- if (got < 2 && !ignoreErrors) {
- throw new DecodingException(
- "BASE64Decoder: Error in encoded stream: " +
- "needed at least 2 valid base64 characters," +
- " but only got " + got +
- " before padding character (=)" +
- recentChars());
- }
-
- // didn't get any characters before padding character?
- if (got == 0) {
- return pos - pos0;
- }
- atEOF = false; // need to keep reading
- }
-
- // pad partial result with zeroes
-
- // how many bytes will we produce on output?
- // (got always < 4, so size always < 3)
- int size = got - 1;
- if (size == 0) {
- size = 1;
- }
-
- // handle the one padding character we've seen
- got++;
- val <<= 6;
-
- while (got < 4) {
- if (!atEOF) {
- // consume the rest of the padding characters,
- // filling with zeroes
- i = getByte();
- if (i == -1) {
- if (!ignoreErrors) {
- throw new DecodingException(
- "BASE64Decoder: Error in encoded " +
- "stream: hit EOF while looking for " +
- "padding characters (=)" +
- recentChars());
- }
- } else if (i != -2) {
- if (!ignoreErrors) {
- throw new DecodingException(
- "BASE64Decoder: Error in encoded " +
- "stream: found valid base64 " +
- "character after a padding character " +
- "(=)" + recentChars());
- }
- }
- }
- val <<= 6;
- got++;
- }
-
- // now pull out however many valid bytes we got
- val >>= 8; // always skip first one
- if (size == 2) {
- outbuf[pos + 1] = (byte)(val & 0xff);
- }
- val >>= 8;
- outbuf[pos] = (byte)(val & 0xff);
- // len -= size; // not needed, return below
- pos += size;
- return pos - pos0;
- } else {
- // got a valid byte
- val <<= 6;
- got++;
- val |= i;
- }
- }
-
- // read 4 valid characters, now extract 3 bytes
- outbuf[pos + 2] = (byte)(val & 0xff);
- val >>= 8;
- outbuf[pos + 1] = (byte)(val & 0xff);
- val >>= 8;
- outbuf[pos] = (byte)(val & 0xff);
- len -= 3;
- pos += 3;
- }
- return pos - pos0;
- }
-
- /**
- * Read the next valid byte from the input stream.
- * Buffer lots of data from underlying stream in input_buffer,
- * for efficiency.
- *
- * @return the next byte, -1 on EOF, or -2 if next byte is '='
- * (padding at end of encoded data)
- */
- private int getByte() throws IOException {
- int c;
- do {
- if (input_pos >= input_len) {
- try {
- input_len = in.read(input_buffer);
- } catch (EOFException ex) {
- return -1;
- }
- if (input_len <= 0) {
- return -1;
- }
- input_pos = 0;
- }
- // get the next byte in the buffer
- c = input_buffer[input_pos++] & 0xff;
- // is it a padding byte?
- if (c == '=') {
- return -2;
- }
- // no, convert it
- c = pem_convert_array[c];
- // loop until we get a legitimate byte
- } while (c == -1);
- return c;
- }
-
- /**
- * Return the most recent characters, for use in an error message.
- */
- private String recentChars() {
- // reach into the input buffer and extract up to 10
- // recent characters, to help in debugging.
- StringBuilder errstr = new StringBuilder();
- int nc = input_pos > 10 ? 10 : input_pos;
- if (nc > 0) {
- errstr.append(", the ").append(nc).append(" most recent characters were: \"");
- for (int k = input_pos - nc; k < input_pos; k++) {
- char c = (char)(input_buffer[k] & 0xff);
- switch (c) {
- case '\r': errstr.append("\\r"); break;
- case '\n': errstr.append("\\n"); break;
- case '\t': errstr.append("\\t"); break;
- default:
- if (c >= ' ' && c < 0177) {
- errstr.append(c);
- } else {
- errstr.append("\\").append((int)c);
- }
- }
- }
- errstr.append("\"");
- }
- return errstr.toString();
- }
-
- /**
- * Base64 decode a byte array. No line breaks are allowed.
- * This method is suitable for short strings, such as those
- * in the IMAP AUTHENTICATE protocol, but not to decode the
- * entire content of a MIME part.
- *
- * NOTE: inbuf may only contain valid base64 characters.
- * Whitespace is not ignored.
- */
- public static byte[] decode(byte[] inbuf) {
- int size = (inbuf.length / 4) * 3;
- if (size == 0) {
- return inbuf;
- }
-
- if (inbuf[inbuf.length - 1] == '=') {
- size--;
- if (inbuf[inbuf.length - 2] == '=') {
- size--;
- }
- }
- byte[] outbuf = new byte[size];
-
- int inpos = 0, outpos = 0;
- size = inbuf.length;
- while (size > 0) {
- int val;
- int osize = 3;
- val = pem_convert_array[inbuf[inpos++] & 0xff];
- val <<= 6;
- val |= pem_convert_array[inbuf[inpos++] & 0xff];
- val <<= 6;
- if (inbuf[inpos] != '=') {
- val |= pem_convert_array[inbuf[inpos++] & 0xff];
- } else {
- osize--;
- }
- val <<= 6;
- if (inbuf[inpos] != '=') {
- val |= pem_convert_array[inbuf[inpos++] & 0xff];
- } else {
- osize--;
- }
- if (osize > 2) {
- outbuf[outpos + 2] = (byte)(val & 0xff);
- }
- val >>= 8;
- if (osize > 1) {
- outbuf[outpos + 1] = (byte)(val & 0xff);
- }
- val >>= 8;
- outbuf[outpos] = (byte)(val & 0xff);
- outpos += osize;
- size -= 4;
- }
- return outbuf;
- }
-
- /*** begin TEST program ***
- public static void main(String argv[]) throws Exception {
- FileInputStream infile = new FileInputStream(argv[0]);
- BASE64DecoderStream decoder = new BASE64DecoderStream(infile);
- int c;
-
- while ((c = decoder.read()) != -1)
- System.out.print((char)c);
- System.out.flush();
- }
- *** end TEST program ***/
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Chunk.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Chunk.java
deleted file mode 100644
index 068787d4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Chunk.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.nio.ByteBuffer;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class Chunk {
- volatile Chunk next;
- volatile Data data;
-
- public Chunk(Data data) {
- this.data = data;
- }
-
- /**
- * Creates a new chunk and adds to linked list.
- *
- * @param dataHead of the linked list
- * @param buf MIME part partial data
- * @return created chunk
- */
- public Chunk createNext(DataHead dataHead, ByteBuffer buf) {
- return next = new Chunk(data.createNext(dataHead, buf));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/ChunkInputStream.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/ChunkInputStream.java
deleted file mode 100644
index 23651aa0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/ChunkInputStream.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * Constructs a InputStream from a linked list of {@link Chunk}s.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-final class ChunkInputStream extends InputStream {
- Chunk current;
- int offset;
- int len;
- final MIMEMessage msg;
- final MIMEPart part;
- byte[] buf;
-
- public ChunkInputStream(MIMEMessage msg, MIMEPart part, Chunk startPos) {
- this.current = startPos;
- len = current.data.size();
- buf = current.data.read();
- this.msg = msg;
- this.part = part;
- }
-
- @Override
- public int read(byte b[], int off, int sz) throws IOException {
- if (!fetch()) {
- return -1;
- }
-
- sz = Math.min(sz, len-offset);
- System.arraycopy(buf,offset,b,off,sz);
- return sz;
- }
-
- public int read() throws IOException {
- if (!fetch()) {
- return -1;
- }
- return (buf[offset++] & 0xff);
- }
-
- /**
- * Gets to the next chunk if we are done with the current one.
- * @return
- */
- private boolean fetch() {
- if (current == null) {
- throw new IllegalStateException("Stream already closed");
- }
- while(offset==len) {
- while(!part.parsed && current.next == null) {
- msg.makeProgress();
- }
- current = current.next;
-
- if (current == null) {
- return false;
- }
- this.offset = 0;
- this.buf = current.data.read();
- this.len = current.data.size();
- }
- return true;
- }
-
- @Override
- public void close() throws IOException {
- super.close();
- current = null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/CleanUpExecutorFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/CleanUpExecutorFactory.java
deleted file mode 100644
index 4235c691..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/CleanUpExecutorFactory.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.util.concurrent.Executor;
-
-public abstract class CleanUpExecutorFactory {
- private static final String DEFAULT_PROPERTY_NAME = CleanUpExecutorFactory.class
- .getName();
-
- protected CleanUpExecutorFactory() {
- }
-
- public static CleanUpExecutorFactory newInstance() {
- try {
- return (CleanUpExecutorFactory) FactoryFinder.find(DEFAULT_PROPERTY_NAME);
- } catch (Exception e) {
- return null;
- }
- }
-
- public abstract Executor getExecutor();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Data.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Data.java
deleted file mode 100644
index 137a70f7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Data.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.nio.ByteBuffer;
-
-/**
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-interface Data {
-
- /**
- * size of the chunk given by the parser
- *
- * @return size of the chunk
- */
- int size();
-
- /**
- * TODO: should the return type be ByteBuffer ??
- * Return part's partial data. The data is read only.
- *
- * @return a byte array which contains {#size()} bytes. The returned
- * array may be larger than {#size()} bytes and contains data
- * from offset 0.
- */
- byte[] read();
-
- /**
- * Write this partial data to a file
- *
- * @param file to which the data needs to be written
- * @return file pointer before the write operation(at which the data is
- * written from)
- */
- long writeTo(DataFile file);
-
- /**
- * Factory method to create a Data. The implementation could
- * be file based one or memory based one.
- *
- * @param dataHead start of the linked list of data objects
- * @param buf contains partial content for a part
- * @return Data
- */
- Data createNext(DataHead dataHead, ByteBuffer buf);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataFile.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataFile.java
deleted file mode 100644
index 49f2c0fd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataFile.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.io.*;
-
-/**
- * Use {@link RandomAccessFile} for concurrent access of read
- * and write partial part's content.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-final class DataFile {
- private WeakDataFile weak;
- private long writePointer;
-
- DataFile(File file) {
- writePointer=0;
- weak = new WeakDataFile(this, file);
- }
-
- /**
- *
- */
- void close() {
- weak.close();
- }
-
- /**
- * Read data from the given file pointer position.
- *
- * @param pointer read position
- * @param buf that needs to be filled
- * @param offset the start offset of the data.
- * @param length of data that needs to be read
- */
- synchronized void read(long pointer, byte[] buf, int offset, int length ) {
- weak.read(pointer, buf, offset, length);
- }
-
- void renameTo(File f) {
- weak.renameTo(f);
- }
-
- /**
- * Write data to the file
- *
- * @param data that needs to written to a file
- * @param offset start offset in the data
- * @param length no bytes to write
- * @return file pointer before the write operation(or at which the
- * data is written)
- */
- synchronized long writeTo(byte[] data, int offset, int length) {
- long temp = writePointer;
- writePointer = weak.writeTo(writePointer, data, offset, length);
- return temp;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataHead.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataHead.java
deleted file mode 100644
index 000e32a4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataHead.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.org.jvnet.mimepull;
-
-import java.io.*;
-import java.nio.ByteBuffer;
-
-/**
- * Represents an attachment part in a MIME message. MIME message parsing is done
- * lazily using a pull parser, so the part may not have all the data. {@link #read}
- * and {@link #readOnce} may trigger the actual parsing the message. In fact,
- * parsing of an attachment part may be triggered by calling {@link #read} methods
- * on some other attachment parts. All this happens behind the scenes so the
- * application developer need not worry about these details.
- *
- * @author Jitendra Kotamraju
- */
-final class DataHead {
-
- /**
- * Linked list to keep the part's content
- */
- volatile Chunk head, tail;
-
- /**
- * If the part is stored in a file, non-null.
- */
- DataFile dataFile;
-
- private final MIMEPart part;
-
- boolean readOnce;
- volatile long inMemory;
-
- /**
- * Used only for debugging. This records where readOnce() is called.
- */
- private Throwable consumedAt;
-
- DataHead(MIMEPart part) {
- this.part = part;
- }
-
- void addBody(ByteBuffer buf) {
- synchronized(this) {
- inMemory += buf.limit();
- }
- if (tail != null) {
- tail = tail.createNext(this, buf);
- } else {
- head = tail = new Chunk(new MemoryData(buf, part.msg.config));
- }
- }
-
- void doneParsing() {
- }
-
- void moveTo(File f) {
- if (dataFile != null) {
- dataFile.renameTo(f);
- } else {
- try {
- OutputStream os = new FileOutputStream(f);
- try {
- InputStream in = readOnce();
- byte[] buf = new byte[8192];
- int len;
- while((len=in.read(buf)) != -1) {
- os.write(buf, 0, len);
- }
- } finally {
- if (os != null) {
- os.close();
- }
- }
- } catch(IOException ioe) {
- throw new MIMEParsingException(ioe);
- }
- }
- }
-
- void close() {
- head = tail = null;
- if (dataFile != null) {
- dataFile.close();
- }
- }
-
-
- /**
- * Can get the attachment part's content multiple times. That means
- * the full content needs to be there in memory or on the file system.
- * Calling this method would trigger parsing for the part's data. So
- * do not call this unless it is required(otherwise, just wrap MIMEPart
- * into a object that returns InputStream for e.g DataHandler)
- *
- * @return data for the part's content
- */
- public InputStream read() {
- if (readOnce) {
- throw new IllegalStateException("readOnce() is called before, read() cannot be called later.");
- }
-
- // Trigger parsing for the part
- while(tail == null) {
- if (!part.msg.makeProgress()) {
- throw new IllegalStateException("No such MIME Part: "+part);
- }
- }
-
- if (head == null) {
- throw new IllegalStateException("Already read. Probably readOnce() is called before.");
- }
- return new ReadMultiStream();
- }
-
- /**
- * Used for an assertion. Returns true when readOnce() is not already called.
- * or otherwise throw an exception.
- *
- * <p>
- * Calling this method also marks the stream as 'consumed'
- *
- * @return true if readOnce() is not called before
- */
- @SuppressWarnings("ThrowableInitCause")
- private boolean unconsumed() {
- if (consumedAt != null) {
- AssertionError error = new AssertionError("readOnce() is already called before. See the nested exception from where it's called.");
- error.initCause(consumedAt);
- throw error;
- }
- consumedAt = new Exception().fillInStackTrace();
- return true;
- }
-
- /**
- * Can get the attachment part's content only once. The content
- * will be lost after the method. Content data is not be stored
- * on the file system or is not kept in the memory for the
- * following case:
- * - Attachement parts contents are accessed sequentially
- *
- * In general, take advantage of this when the data is used only
- * once.
- *
- * @return data for the part's content
- */
- public InputStream readOnce() {
- assert unconsumed();
- if (readOnce) {
- throw new IllegalStateException("readOnce() is called before. It can only be called once.");
- }
- readOnce = true;
- // Trigger parsing for the part
- while(tail == null) {
- if (!part.msg.makeProgress() && tail == null) {
- throw new IllegalStateException("No such Part: "+part);
- }
- }
- InputStream in = new ReadOnceStream();
- head = null;
- return in;
- }
-
- class ReadMultiStream extends InputStream {
- Chunk current;
- int offset;
- int len;
- byte[] buf;
- boolean closed;
-
- public ReadMultiStream() {
- this.current = head;
- len = current.data.size();
- buf = current.data.read();
- }
-
- @Override
- public int read(byte b[], int off, int sz) throws IOException {
- if (!fetch()) {
- return -1;
- }
-
- sz = Math.min(sz, len-offset);
- System.arraycopy(buf,offset,b,off,sz);
- offset += sz;
- return sz;
- }
-
- @Override
- public int read() throws IOException {
- if (!fetch()) {
- return -1;
- }
- return (buf[offset++] & 0xff);
- }
-
- void adjustInMemoryUsage() {
- // Nothing to do in this case.
- }
-
- /**
- * Gets to the next chunk if we are done with the current one.
- * @return true if any data available
- * @throws IOException when i/o error
- */
- private boolean fetch() throws IOException {
- if (closed) {
- throw new IOException("Stream already closed");
- }
- if (current == null) {
- return false;
- }
-
- while(offset==len) {
- while(!part.parsed && current.next == null) {
- part.msg.makeProgress();
- }
- current = current.next;
-
- if (current == null) {
- return false;
- }
- adjustInMemoryUsage();
- this.offset = 0;
- this.buf = current.data.read();
- this.len = current.data.size();
- }
- return true;
- }
-
- @Override
- public void close() throws IOException {
- super.close();
- current = null;
- closed = true;
- }
- }
-
- final class ReadOnceStream extends ReadMultiStream {
-
- @Override
- void adjustInMemoryUsage() {
- synchronized(DataHead.this) {
- inMemory -= current.data.size(); // adjust current memory usage
- }
- }
-
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DecodingException.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DecodingException.java
deleted file mode 100644
index 6b8feff4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DecodingException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* FROM mail.jar */
-package com.sun.xml.internal.org.jvnet.mimepull;
-
-import java.io.IOException;
-
-/**
- * A special IOException that indicates a failure to decode data due
- * to an error in the formatting of the data. This allows applications
- * to distinguish decoding errors from other I/O errors.
- *
- * @author Bill Shannon
- */
-
-public final class DecodingException extends IOException {
-
- /**
- * Constructor
- */
- public DecodingException(String s) {
- super(s);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FactoryFinder.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FactoryFinder.java
deleted file mode 100644
index c9be050d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FactoryFinder.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-class FactoryFinder {
-
- private static ClassLoader cl = FactoryFinder.class.getClassLoader();
-
- static Object find(String factoryId) throws ClassNotFoundException,
- InstantiationException, IllegalAccessException {
- String systemProp = System.getProperty(factoryId);
- if (systemProp != null) {
- return newInstance(systemProp);
- }
-
- String providerName = findJarServiceProviderName(factoryId);
- if (providerName != null && providerName.trim().length() > 0) {
- return newInstance(providerName);
- }
-
- return null;
- }
-
- static Object newInstance(String className) throws ClassNotFoundException,
- InstantiationException, IllegalAccessException {
- Class providerClass = cl.loadClass(className);
- Object instance = providerClass.newInstance();
- return instance;
- }
-
- private static String findJarServiceProviderName(String factoryId) {
- String serviceId = "META-INF/services/" + factoryId;
- InputStream is;
- is = cl.getResourceAsStream(serviceId);
-
- if (is == null) {
- return null;
- }
-
- String factoryClassName;
- BufferedReader rd = null;
- try {
- try {
- rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));
- } catch (java.io.UnsupportedEncodingException e) {
- rd = new BufferedReader(new InputStreamReader(is));
- }
- try {
- factoryClassName = rd.readLine();
- } catch (IOException x) {
- return null;
- }
- } finally {
- if (rd != null) {
- try {
- rd.close();
- } catch (IOException ex) {
- Logger.getLogger(FactoryFinder.class.getName()).log(Level.INFO, null, ex);
- }
- }
- }
-
- return factoryClassName;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FileData.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FileData.java
deleted file mode 100644
index 3e121eb1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FileData.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.nio.ByteBuffer;
-
-/**
- * Keeps the Part's partial content data in a file.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-final class FileData implements Data {
- private final DataFile file;
- private final long pointer; // read position
- private final int length;
-
- FileData(DataFile file, ByteBuffer buf) {
- this(file, file.writeTo(buf.array(), 0, buf.limit()), buf.limit());
- }
-
- FileData(DataFile file, long pointer, int length) {
- this.file = file;
- this.pointer = pointer;
- this.length = length;
- }
-
- @Override
- public byte[] read() {
- byte[] buf = new byte[length];
- file.read(pointer, buf, 0, length);
- return buf;
- }
-
- /*
- * This shouldn't be called
- */
- @Override
- public long writeTo(DataFile file) {
- throw new IllegalStateException();
- }
-
- @Override
- public int size() {
- return length;
- }
-
- /*
- * Always create FileData
- */
- @Override
- public Data createNext(DataHead dataHead, ByteBuffer buf) {
- return new FileData(file, buf);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FinalArrayList.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FinalArrayList.java
deleted file mode 100644
index 60123bdf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FinalArrayList.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-/**
- * {@link java.util.ArrayList} with the final keyword.
- *
- * <p>
- * This gives HotSpot a better hint that all methods can be inlined.
- *
- * @author Kohsuke Kawaguchi
- */
-final class FinalArrayList<T> extends ArrayList<T> {
- public FinalArrayList(int initialCapacity) {
- super(initialCapacity);
- }
-
- public FinalArrayList() {
- }
-
- public FinalArrayList(Collection<? extends T> ts) {
- super(ts);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Header.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Header.java
deleted file mode 100644
index 606c32de..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Header.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-/**
- * The Header class stores a name/value pair to represent headers.
- *
- * @author John Mani
- */
-
-public interface Header {
-
- /**
- * Returns the name of this header.
- *
- * @return name of the header
- */
- String getName();
-
- /**
- * Returns the value of this header.
- *
- * @return value of the header
- */
- String getValue();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/InternetHeaders.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/InternetHeaders.java
deleted file mode 100644
index ca8bb98c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/InternetHeaders.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.io.IOException;
-import java.util.NoSuchElementException;
-import java.util.List;
-
-/**
- * InternetHeaders is a utility class that manages RFC822 style
- * headers. Given an RFC822 format message stream, it reads lines
- * until the blank line that indicates end of header. The input stream
- * is positioned at the start of the body. The lines are stored
- * within the object and can be extracted as either Strings or
- * {@link Header} objects. <p>
- * <p/>
- * This class is mostly intended for service providers. MimeMessage
- * and MimeBody use this class for holding their headers. <p>
- * <p/>
- * <hr> <strong>A note on RFC822 and MIME headers</strong><p>
- * <p/>
- * RFC822 and MIME header fields <strong>must</strong> contain only
- * US-ASCII characters. If a header contains non US-ASCII characters,
- * it must be encoded as per the rules in RFC 2047. The MimeUtility
- * class provided in this package can be used to to achieve this.
- * Callers of the <code>setHeader</code>, <code>addHeader</code>, and
- * <code>addHeaderLine</code> methods are responsible for enforcing
- * the MIME requirements for the specified headers. In addition, these
- * header fields must be folded (wrapped) before being sent if they
- * exceed the line length limitation for the transport (1000 bytes for
- * SMTP). Received headers may have been folded. The application is
- * responsible for folding and unfolding headers as appropriate. <p>
- *
- * @author John Mani
- * @author Bill Shannon
- */
-final class InternetHeaders {
-
- private final FinalArrayList<Hdr> headers = new FinalArrayList<Hdr>();
-
- /**
- * Read and parse the given RFC822 message stream till the
- * blank line separating the header from the body. Store the
- * header lines inside this InternetHeaders object. <p>
- * <p/>
- * Note that the header lines are added into this InternetHeaders
- * object, so any existing headers in this object will not be
- * affected.
- *
- * @param lis RFC822 input stream
- */
- InternetHeaders(MIMEParser.LineInputStream lis) {
- // Read header lines until a blank line. It is valid
- // to have BodyParts with no header lines.
- String line;
- String prevline = null; // the previous header line, as a string
- // a buffer to accumulate the header in, when we know it's needed
- StringBuilder lineBuffer = new StringBuilder();
-
- try {
- //while ((line = lis.readLine()) != null) {
- do {
- line = lis.readLine();
- if (line != null &&
- (line.startsWith(" ") || line.startsWith("\t"))) {
- // continuation of header
- if (prevline != null) {
- lineBuffer.append(prevline);
- prevline = null;
- }
- lineBuffer.append("\r\n");
- lineBuffer.append(line);
- } else {
- // new header
- if (prevline != null) {
- addHeaderLine(prevline);
- } else if (lineBuffer.length() > 0) {
- // store previous header first
- addHeaderLine(lineBuffer.toString());
- lineBuffer.setLength(0);
- }
- prevline = line;
- }
- } while (line != null && line.length() > 0);
- } catch (IOException ioex) {
- throw new MIMEParsingException("Error in input stream", ioex);
- }
- }
-
- /**
- * Return all the values for the specified header. The
- * values are String objects. Returns <code>null</code>
- * if no headers with the specified name exist.
- *
- * @param name header name
- * @return array of header values, or null if none
- */
- List<String> getHeader(String name) {
- // XXX - should we just step through in index order?
- FinalArrayList<String> v = new FinalArrayList<String>(); // accumulate return values
-
- int len = headers.size();
- for( int i=0; i<len; i++ ) {
- Hdr h = (Hdr) headers.get(i);
- if (name.equalsIgnoreCase(h.name)) {
- v.add(h.getValue());
- }
- }
- return (v.size() == 0) ? null : v;
- }
-
- /**
- * Return all the headers as an Enumeration of
- * {@link Header} objects.
- *
- * @return Header objects
- */
- FinalArrayList<? extends Header> getAllHeaders() {
- return headers; // conceptually it should be read-only, but for performance reason I'm not wrapping it here
- }
-
- /**
- * Add an RFC822 header line to the header store.
- * If the line starts with a space or tab (a continuation line),
- * add it to the last header line in the list. <p>
- * <p/>
- * Note that RFC822 headers can only contain US-ASCII characters
- *
- * @param line raw RFC822 header line
- */
- void addHeaderLine(String line) {
- try {
- char c = line.charAt(0);
- if (c == ' ' || c == '\t') {
- Hdr h = (Hdr) headers.get(headers.size() - 1);
- h.line += "\r\n" + line;
- } else {
- headers.add(new Hdr(line));
- }
- } catch (StringIndexOutOfBoundsException e) {
- // line is empty, ignore it
- } catch (NoSuchElementException e) {
- // XXX - vector is empty?
- }
- }
-
-}
-
-/*
- * A private utility class to represent an individual header.
- */
-
-class Hdr implements Header {
-
- String name; // the canonicalized (trimmed) name of this header
- // XXX - should name be stored in lower case?
- String line; // the entire RFC822 header "line"
-
- /*
- * Constructor that takes a line and splits out
- * the header name.
- */
- Hdr(String l) {
- int i = l.indexOf(':');
- if (i < 0) {
- // should never happen
- name = l.trim();
- } else {
- name = l.substring(0, i).trim();
- }
- line = l;
- }
-
- /*
- * Constructor that takes a header name and value.
- */
- Hdr(String n, String v) {
- name = n;
- line = n + ": " + v;
- }
-
- /*
- * Return the "name" part of the header line.
- */
- @Override
- public String getName() {
- return name;
- }
-
- /*
- * Return the "value" part of the header line.
- */
- @Override
- public String getValue() {
- int i = line.indexOf(':');
- if (i < 0) {
- return line;
- }
-
- int j;
- if (name.equalsIgnoreCase("Content-Description")) {
- // Content-Description should retain the folded whitespace after header unfolding -
- // rf. RFC2822 section 2.2.3, rf. RFC2822 section 3.2.3
- for (j = i + 1; j < line.length(); j++) {
- char c = line.charAt(j);
- if (!(/*c == ' ' ||*/c == '\t' || c == '\r' || c == '\n')) {
- break;
- }
- }
- } else {
- // skip whitespace after ':'
- for (j = i + 1; j < line.length(); j++) {
- char c = line.charAt(j);
- if (!(c == ' ' || c == '\t' || c == '\r' || c == '\n')) {
- break;
- }
- }
- }
- return line.substring(j);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/LineInputStream.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/LineInputStream.java
deleted file mode 100644
index 50e92a35..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/LineInputStream.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* FROM mail.jar */
-package com.sun.xml.internal.org.jvnet.mimepull;
-
-import java.io.*;
-
-/**
- * This class is to support reading CRLF terminated lines that
- * contain only US-ASCII characters from an input stream. Provides
- * functionality that is similar to the deprecated
- * <code>DataInputStream.readLine()</code>. Expected use is to read
- * lines as String objects from a RFC822 stream.
- *
- * It is implemented as a FilterInputStream, so one can just wrap
- * this class around any input stream and read bytes from this filter.
- *
- * @author John Mani
- */
-
-final class LineInputStream extends FilterInputStream {
-
- private char[] lineBuffer = null; // reusable byte buffer
- private static int MAX_INCR = 1024*1024; // 1MB
-
- public LineInputStream(InputStream in) {
- super(in);
- }
-
- /**
- * Read a line containing only ASCII characters from the input
- * stream. A line is terminated by a CR or NL or CR-NL sequence.
- * A common error is a CR-CR-NL sequence, which will also terminate
- * a line.
- * The line terminator is not returned as part of the returned
- * String. Returns null if no data is available. <p>
- *
- * This class is similar to the deprecated
- * <code>DataInputStream.readLine()</code>
- */
- public String readLine() throws IOException {
- //InputStream in = this.in;
- char[] buf = lineBuffer;
-
- if (buf == null) {
- buf = lineBuffer = new char[128];
- }
-
- int c1;
- int room = buf.length;
- int offset = 0;
-
- while ((c1 = in.read()) != -1) {
- if (c1 == '\n') {
- break;
- } else if (c1 == '\r') {
- // Got CR, is the next char NL ?
- boolean twoCRs = false;
- if (in.markSupported()) {
- in.mark(2);
- }
- int c2 = in.read();
- if (c2 == '\r') { // discard extraneous CR
- twoCRs = true;
- c2 = in.read();
- }
- if (c2 != '\n') {
- /*
- * If the stream supports it (which we hope will always
- * be the case), reset to after the first CR. Otherwise,
- * we wrap a PushbackInputStream around the stream so we
- * can unread the characters we don't need. The only
- * problem with that is that the caller might stop
- * reading from this LineInputStream, throw it away,
- * and then start reading from the underlying stream.
- * If that happens, the pushed back characters will be
- * lost forever.
- */
- if (in.markSupported()) {
- in.reset();
- } else {
- if (!(in instanceof PushbackInputStream)) {
- in /*= this.in*/ = new PushbackInputStream(in, 2);
- }
- if (c2 != -1) {
- ((PushbackInputStream)in).unread(c2);
- }
- if (twoCRs) {
- ((PushbackInputStream)in).unread('\r');
- }
- }
- }
- break; // outa here.
- }
-
- // Not CR, NL or CR-NL ...
- // .. Insert the byte into our byte buffer
- if (--room < 0) { // No room, need to grow.
- if (buf.length < MAX_INCR) {
- buf = new char[buf.length * 2];
- } else {
- buf = new char[buf.length + MAX_INCR];
- }
- room = buf.length - offset - 1;
- System.arraycopy(lineBuffer, 0, buf, 0, offset);
- lineBuffer = buf;
- }
- buf[offset++] = (char)c1;
- }
-
- if ((c1 == -1) && (offset == 0)) {
- return null;
- }
-
- return String.copyValueOf(buf, 0, offset);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java
deleted file mode 100644
index 0b6ace26..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.io.File;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Configuration for MIME message parsing and storing.
- *
- * @author Jitendra Kotamraju
- */
-public class MIMEConfig {
-
- private static final int DEFAULT_CHUNK_SIZE = 8192;
- private static final long DEFAULT_MEMORY_THRESHOLD = 1048576L;
- private static final String DEFAULT_FILE_PREFIX = "MIME";
-
- private static final Logger LOGGER = Logger.getLogger(MIMEConfig.class.getName());
-
- // Parses the entire message eagerly
- boolean parseEagerly;
-
- // Approximate Chunk size
- int chunkSize;
-
- // Maximum in-memory data per attachment
- long memoryThreshold;
-
- // temp Dir to store large files
- File tempDir;
- String prefix;
- String suffix;
-
- private MIMEConfig(boolean parseEagerly, int chunkSize,
- long inMemoryThreshold, String dir, String prefix, String suffix) {
- this.parseEagerly = parseEagerly;
- this.chunkSize = chunkSize;
- this.memoryThreshold = inMemoryThreshold;
- this.prefix = prefix;
- this.suffix = suffix;
- setDir(dir);
- }
-
- public MIMEConfig() {
- this(false, DEFAULT_CHUNK_SIZE, DEFAULT_MEMORY_THRESHOLD, null,
- DEFAULT_FILE_PREFIX, null);
- }
-
- boolean isParseEagerly() {
- return parseEagerly;
- }
-
- public void setParseEagerly(boolean parseEagerly) {
- this.parseEagerly = parseEagerly;
- }
-
- int getChunkSize() {
- return chunkSize;
- }
-
- void setChunkSize(int chunkSize) {
- this.chunkSize = chunkSize;
- }
-
- long getMemoryThreshold() {
- return memoryThreshold;
- }
-
- /**
- * If the attachment is greater than the threshold, it is
- * written to the disk.
- *
- * @param memoryThreshold no of bytes per attachment
- * if -1, then the whole attachment is kept in memory
- */
- public void setMemoryThreshold(long memoryThreshold) {
- this.memoryThreshold = memoryThreshold;
- }
-
- boolean isOnlyMemory() {
- return memoryThreshold == -1L;
- }
-
- File getTempDir() {
- return tempDir;
- }
-
- String getTempFilePrefix() {
- return prefix;
- }
-
- String getTempFileSuffix() {
- return suffix;
- }
-
- /**
- * @param dir
- */
- public final void setDir(String dir) {
- if (tempDir == null && dir != null && !dir.equals("")) {
- tempDir = new File(dir);
- }
- }
-
- /**
- * Validates if it can create temporary files. Otherwise, it stores
- * attachment contents in memory.
- */
- public void validate() {
- if (!isOnlyMemory()) {
- try {
- File tempFile = (tempDir == null)
- ? File.createTempFile(prefix, suffix)
- : File.createTempFile(prefix, suffix, tempDir);
- boolean deleted = tempFile.delete();
- if (!deleted) {
- if (LOGGER.isLoggable(Level.INFO)) {
- LOGGER.log(Level.INFO, "File {0} was not deleted", tempFile.getAbsolutePath());
- }
- }
- } catch(Exception ioe) {
- memoryThreshold = -1L; // whole attachment will be in-memory
- }
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEEvent.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEEvent.java
deleted file mode 100644
index af0e06bd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEEvent.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.nio.ByteBuffer;
-
-/**
- * @author Jitendra Kotamraju
- */
-abstract class MIMEEvent {
-
- enum EVENT_TYPE {START_MESSAGE, START_PART, HEADERS, CONTENT, END_PART, END_MESSAGE}
-
- /**
- * Returns a event for parser's current cursor location in the MIME message.
- *
- * <p>
- * {@link EVENT_TYPE#START_MESSAGE} and {@link EVENT_TYPE#START_MESSAGE} events
- * are generated only once.
- *
- * <p>
- * {@link EVENT_TYPE#START_PART}, {@link EVENT_TYPE#END_PART}, {@link EVENT_TYPE#HEADERS}
- * events are generated only once for each attachment part.
- *
- * <p>
- * {@link EVENT_TYPE#CONTENT} event may be generated more than once for an attachment
- * part.
- *
- * @return event type
- */
- abstract EVENT_TYPE getEventType();
-
- static final StartMessage START_MESSAGE = new StartMessage();
- static final StartPart START_PART = new StartPart();
- static final EndPart END_PART = new EndPart();
- static final EndMessage END_MESSAGE = new EndMessage();
-
- static final class StartMessage extends MIMEEvent {
- EVENT_TYPE getEventType() {
- return EVENT_TYPE.START_MESSAGE;
- }
- }
-
- static final class StartPart extends MIMEEvent {
- EVENT_TYPE getEventType() {
- return EVENT_TYPE.START_PART;
- }
- }
-
- static final class EndPart extends MIMEEvent {
- EVENT_TYPE getEventType () {
- return EVENT_TYPE.END_PART;
- }
- }
-
- static final class Headers extends MIMEEvent {
- InternetHeaders ih;
-
- Headers(InternetHeaders ih) {
- this.ih = ih;
- }
-
- EVENT_TYPE getEventType() {
- return EVENT_TYPE.HEADERS;
- }
-
- InternetHeaders getHeaders() {
- return ih;
- }
- }
-
- static final class Content extends MIMEEvent {
- private final ByteBuffer buf;
-
- Content(ByteBuffer buf) {
- this.buf = buf;
- }
-
- EVENT_TYPE getEventType() {
- return EVENT_TYPE.CONTENT;
- }
-
- ByteBuffer getData() {
- return buf;
- }
- }
-
- static final class EndMessage extends MIMEEvent {
- EVENT_TYPE getEventType() {
- return EVENT_TYPE.END_MESSAGE;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEMessage.java
deleted file mode 100644
index 96e0583d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEMessage.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.nio.ByteBuffer;
-import java.util.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Represents MIME message. MIME message parsing is done lazily using a
- * pull parser.
- *
- * @author Jitendra Kotamraju
- */
-public class MIMEMessage {
- private static final Logger LOGGER = Logger.getLogger(MIMEMessage.class.getName());
-
- MIMEConfig config;
-
- private final InputStream in;
- private final List<MIMEPart> partsList;
- private final Map<String, MIMEPart> partsMap;
- private final Iterator<MIMEEvent> it;
- private boolean parsed; // true when entire message is parsed
- private MIMEPart currentPart;
- private int currentIndex;
-
- /**
- * @see MIMEMessage(InputStream, String, MIMEConfig)
- */
- public MIMEMessage(InputStream in, String boundary) {
- this(in, boundary, new MIMEConfig());
- }
-
- /**
- * Creates a MIME message from the content's stream. The content stream
- * is closed when EOF is reached.
- *
- * @param in MIME message stream
- * @param boundary the separator for parts(pass it without --)
- * @param config various configuration parameters
- */
- public MIMEMessage(InputStream in, String boundary, MIMEConfig config) {
- this.in = in;
- this.config = config;
- MIMEParser parser = new MIMEParser(in, boundary, config);
- it = parser.iterator();
-
- partsList = new ArrayList<MIMEPart>();
- partsMap = new HashMap<String, MIMEPart>();
- if (config.isParseEagerly()) {
- parseAll();
- }
- }
-
- /**
- * Gets all the attachments by parsing the entire MIME message. Avoid
- * this if possible since it is an expensive operation.
- *
- * @return list of attachments.
- */
- public List<MIMEPart> getAttachments() {
- if (!parsed) {
- parseAll();
- }
- return partsList;
- }
-
- /**
- * Creates nth attachment lazily. It doesn't validate
- * if the message has so many attachments. To
- * do the validation, the message needs to be parsed.
- * The parsing of the message is done lazily and is done
- * while reading the bytes of the part.
- *
- * @param index sequential order of the part. starts with zero.
- * @return attachemnt part
- */
- public MIMEPart getPart(int index) {
- LOGGER.log(Level.FINE, "index={0}", index);
- MIMEPart part = (index < partsList.size()) ? partsList.get(index) : null;
- if (parsed && part == null) {
- throw new MIMEParsingException("There is no "+index+" attachment part ");
- }
- if (part == null) {
- // Parsing will done lazily and will be driven by reading the part
- part = new MIMEPart(this);
- partsList.add(index, part);
- }
- LOGGER.log(Level.FINE, "Got attachment at index={0} attachment={1}", new Object[]{index, part});
- return part;
- }
-
- /**
- * Creates a lazy attachment for a given Content-ID. It doesn't validate
- * if the message contains an attachment with the given Content-ID. To
- * do the validation, the message needs to be parsed. The parsing of the
- * message is done lazily and is done while reading the bytes of the part.
- *
- * @param contentId Content-ID of the part, expects Content-ID without <, >
- * @return attachemnt part
- */
- public MIMEPart getPart(String contentId) {
- LOGGER.log(Level.FINE, "Content-ID={0}", contentId);
- MIMEPart part = getDecodedCidPart(contentId);
- if (parsed && part == null) {
- throw new MIMEParsingException("There is no attachment part with Content-ID = "+contentId);
- }
- if (part == null) {
- // Parsing is done lazily and is driven by reading the part
- part = new MIMEPart(this, contentId);
- partsMap.put(contentId, part);
- }
- LOGGER.log(Level.FINE, "Got attachment for Content-ID={0} attachment={1}", new Object[]{contentId, part});
- return part;
- }
-
- // this is required for Indigo interop, it writes content-id without escaping
- private MIMEPart getDecodedCidPart(String cid) {
- MIMEPart part = partsMap.get(cid);
- if (part == null) {
- if (cid.indexOf('%') != -1) {
- try {
- String tempCid = URLDecoder.decode(cid, "utf-8");
- part = partsMap.get(tempCid);
- } catch(UnsupportedEncodingException ue) {
- // Ignore it
- }
- }
- }
- return part;
- }
-
-
- /**
- * Parses the whole MIME message eagerly
- */
- public final void parseAll() {
- while(makeProgress()) {
- // Nothing to do
- }
- }
-
-
- /**
- * Parses the MIME message in a pull fashion.
- *
- * @return
- * false if the parsing is completed.
- */
- public synchronized boolean makeProgress() {
- if (!it.hasNext()) {
- return false;
- }
-
- MIMEEvent event = it.next();
-
- switch(event.getEventType()) {
- case START_MESSAGE :
- LOGGER.log(Level.FINE, "MIMEEvent={0}", MIMEEvent.EVENT_TYPE.START_MESSAGE);
- break;
-
- case START_PART :
- LOGGER.log(Level.FINE, "MIMEEvent={0}", MIMEEvent.EVENT_TYPE.START_PART);
- break;
-
- case HEADERS :
- LOGGER.log(Level.FINE, "MIMEEvent={0}", MIMEEvent.EVENT_TYPE.HEADERS);
- MIMEEvent.Headers headers = (MIMEEvent.Headers)event;
- InternetHeaders ih = headers.getHeaders();
- List<String> cids = ih.getHeader("content-id");
- String cid = (cids != null) ? cids.get(0) : currentIndex+"";
- if (cid.length() > 2 && cid.charAt(0)=='<') {
- cid = cid.substring(1,cid.length()-1);
- }
- MIMEPart listPart = (currentIndex < partsList.size()) ? partsList.get(currentIndex) : null;
- MIMEPart mapPart = getDecodedCidPart(cid);
- if (listPart == null && mapPart == null) {
- currentPart = getPart(cid);
- partsList.add(currentIndex, currentPart);
- } else if (listPart == null) {
- currentPart = mapPart;
- partsList.add(currentIndex, mapPart);
- } else if (mapPart == null) {
- currentPart = listPart;
- currentPart.setContentId(cid);
- partsMap.put(cid, currentPart);
- } else if (listPart != mapPart) {
- throw new MIMEParsingException("Created two different attachments using Content-ID and index");
- }
- currentPart.setHeaders(ih);
- break;
-
- case CONTENT :
- LOGGER.log(Level.FINER, "MIMEEvent={0}", MIMEEvent.EVENT_TYPE.CONTENT);
- MIMEEvent.Content content = (MIMEEvent.Content)event;
- ByteBuffer buf = content.getData();
- currentPart.addBody(buf);
- break;
-
- case END_PART :
- LOGGER.log(Level.FINE, "MIMEEvent={0}", MIMEEvent.EVENT_TYPE.END_PART);
- currentPart.doneParsing();
- ++currentIndex;
- break;
-
- case END_MESSAGE :
- LOGGER.log(Level.FINE, "MIMEEvent={0}", MIMEEvent.EVENT_TYPE.END_MESSAGE);
- parsed = true;
- try {
- in.close();
- } catch(IOException ioe) {
- throw new MIMEParsingException(ioe);
- }
- break;
-
- default :
- throw new MIMEParsingException("Unknown Parser state = "+event.getEventType());
- }
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParser.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParser.java
deleted file mode 100644
index 6e4c7e6a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParser.java
+++ /dev/null
@@ -1,502 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.util.*;
-import java.util.logging.Logger;
-import java.nio.ByteBuffer;
-import java.util.logging.Level;
-
-/**
- * Pull parser for the MIME messages. Applications can use pull API to continue
- * the parsing MIME messages lazily.
- *
- * <pre>
- * for e.g.:
- * <p>
- *
- * MIMEParser parser = ...
- * Iterator<MIMEEvent> it = parser.iterator();
- * while(it.hasNext()) {
- * MIMEEvent event = it.next();
- * ...
- * }
- * </pre>
- *
- * @author Jitendra Kotamraju
- */
-class MIMEParser implements Iterable<MIMEEvent> {
-
- private static final Logger LOGGER = Logger.getLogger(MIMEParser.class.getName());
-
- private static final String HEADER_ENCODING = "ISO8859-1";
-
- // Actually, the grammar doesn't support whitespace characters
- // after boundary. But the mail implementation checks for it.
- // We will only check for these many whitespace characters after boundary
- private static final int NO_LWSP = 1000;
- private enum STATE {START_MESSAGE, SKIP_PREAMBLE, START_PART, HEADERS, BODY, END_PART, END_MESSAGE}
- private STATE state = STATE.START_MESSAGE;
-
- private final InputStream in;
- private final byte[] bndbytes;
- private final int bl;
- private final MIMEConfig config;
- private final int[] bcs = new int[128]; // BnM algo: Bad Character Shift table
- private final int[] gss; // BnM algo : Good Suffix Shift table
-
- /**
- * Have we parsed the data from our InputStream yet?
- */
- private boolean parsed;
-
- /*
- * Read and process body partsList until we see the
- * terminating boundary line (or EOF).
- */
- private boolean done = false;
-
- private boolean eof;
- private final int capacity;
- private byte[] buf;
- private int len;
- private boolean bol; // beginning of the line
-
- /*
- * Parses the MIME content. At the EOF, it also closes input stream
- */
- MIMEParser(InputStream in, String boundary, MIMEConfig config) {
- this.in = in;
- this.bndbytes = getBytes("--"+boundary);
- bl = bndbytes.length;
- this.config = config;
- gss = new int[bl];
- compileBoundaryPattern();
-
- // \r\n + boundary + "--\r\n" + lots of LWSP
- capacity = config.chunkSize+2+bl+4+NO_LWSP;
- createBuf(capacity);
- }
-
- /**
- * Returns iterator for the parsing events. Use the iterator to advance
- * the parsing.
- *
- * @return iterator for parsing events
- */
- @Override
- public Iterator<MIMEEvent> iterator() {
- return new MIMEEventIterator();
- }
-
- class MIMEEventIterator implements Iterator<MIMEEvent> {
-
- @Override
- public boolean hasNext() {
- return !parsed;
- }
-
- @Override
- public MIMEEvent next() {
- switch(state) {
- case START_MESSAGE :
- if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.START_MESSAGE);}
- state = STATE.SKIP_PREAMBLE;
- return MIMEEvent.START_MESSAGE;
-
- case SKIP_PREAMBLE :
- if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.SKIP_PREAMBLE);}
- skipPreamble();
- // fall through
- case START_PART :
- if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.START_PART);}
- state = STATE.HEADERS;
- return MIMEEvent.START_PART;
-
- case HEADERS :
- if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.HEADERS);}
- InternetHeaders ih = readHeaders();
- state = STATE.BODY;
- bol = true;
- return new MIMEEvent.Headers(ih);
-
- case BODY :
- if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.BODY);}
- ByteBuffer buf = readBody();
- bol = false;
- return new MIMEEvent.Content(buf);
-
- case END_PART :
- if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.END_PART);}
- if (done) {
- state = STATE.END_MESSAGE;
- } else {
- state = STATE.START_PART;
- }
- return MIMEEvent.END_PART;
-
- case END_MESSAGE :
- if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.END_MESSAGE);}
- parsed = true;
- return MIMEEvent.END_MESSAGE;
-
- default :
- throw new MIMEParsingException("Unknown Parser state = "+state);
- }
- }
-
- @Override
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- /**
- * Collects the headers for the current part by parsing mesage stream.
- *
- * @return headers for the current part
- */
- private InternetHeaders readHeaders() {
- if (!eof) {
- fillBuf();
- }
- return new InternetHeaders(new LineInputStream());
- }
-
- /**
- * Reads and saves the part of the current attachment part's content.
- * At the end of this method, buf should have the remaining data
- * at index 0.
- *
- * @return a chunk of the part's content
- *
- */
- private ByteBuffer readBody() {
- if (!eof) {
- fillBuf();
- }
- int start = match(buf, 0, len); // matches boundary
- if (start == -1) {
- // No boundary is found
- assert eof || len >= config.chunkSize;
- int chunkSize = eof ? len : config.chunkSize;
- if (eof) {
- done = true;
- throw new MIMEParsingException("Reached EOF, but there is no closing MIME boundary.");
- }
- return adjustBuf(chunkSize, len-chunkSize);
- }
- // Found boundary.
- // Is it at the start of a line ?
- int chunkLen = start;
- if (bol && start == 0) {
- // nothing to do
- } else if (start > 0 && (buf[start-1] == '\n' || buf[start-1] =='\r')) {
- --chunkLen;
- if (buf[start-1] == '\n' && start >1 && buf[start-2] == '\r') {
- --chunkLen;
- }
- } else {
- return adjustBuf(start+1, len-start-1); // boundary is not at beginning of a line
- }
-
- if (start+bl+1 < len && buf[start+bl] == '-' && buf[start+bl+1] == '-') {
- state = STATE.END_PART;
- done = true;
- return adjustBuf(chunkLen, 0);
- }
-
- // Consider all the whitespace in boundary+whitespace+"\r\n"
- int lwsp = 0;
- for(int i=start+bl; i < len && (buf[i] == ' ' || buf[i] == '\t'); i++) {
- ++lwsp;
- }
-
- // Check for \n or \r\n in boundary+whitespace+"\n" or boundary+whitespace+"\r\n"
- if (start+bl+lwsp < len && buf[start+bl+lwsp] == '\n') {
- state = STATE.END_PART;
- return adjustBuf(chunkLen, len-start-bl-lwsp-1);
- } else if (start+bl+lwsp+1 < len && buf[start+bl+lwsp] == '\r' && buf[start+bl+lwsp+1] == '\n') {
- state = STATE.END_PART;
- return adjustBuf(chunkLen, len-start-bl-lwsp-2);
- } else if (start+bl+lwsp+1 < len) {
- return adjustBuf(chunkLen+1, len-chunkLen-1); // boundary string in a part data
- } else if (eof) {
- done = true;
- throw new MIMEParsingException("Reached EOF, but there is no closing MIME boundary.");
- }
-
- // Some more data needed to determine if it is indeed a proper boundary
- return adjustBuf(chunkLen, len-chunkLen);
- }
-
- /**
- * Returns a chunk from the original buffer. A new buffer is
- * created with the remaining bytes.
- *
- * @param chunkSize create a chunk with these many bytes
- * @param remaining bytes from the end of the buffer that need to be copied to
- * the beginning of the new buffer
- * @return chunk
- */
- private ByteBuffer adjustBuf(int chunkSize, int remaining) {
- assert buf != null;
- assert chunkSize >= 0;
- assert remaining >= 0;
-
- byte[] temp = buf;
- // create a new buf and adjust it without this chunk
- createBuf(remaining);
- System.arraycopy(temp, len-remaining, buf, 0, remaining);
- len = remaining;
-
- return ByteBuffer.wrap(temp, 0, chunkSize);
- }
-
- private void createBuf(int min) {
- buf = new byte[min < capacity ? capacity : min];
- }
-
- /**
- * Skips the preamble to find the first attachment part
- */
- private void skipPreamble() {
-
- while(true) {
- if (!eof) {
- fillBuf();
- }
- int start = match(buf, 0, len); // matches boundary
- if (start == -1) {
- // No boundary is found
- if (eof) {
- throw new MIMEParsingException("Missing start boundary");
- } else {
- adjustBuf(len-bl+1, bl-1);
- continue;
- }
- }
-
- if (start > config.chunkSize) {
- adjustBuf(start, len-start);
- continue;
- }
- // Consider all the whitespace boundary+whitespace+"\r\n"
- int lwsp = 0;
- for(int i=start+bl; i < len && (buf[i] == ' ' || buf[i] == '\t'); i++) {
- ++lwsp;
- }
- // Check for \n or \r\n
- if (start+bl+lwsp < len && (buf[start+bl+lwsp] == '\n' || buf[start+bl+lwsp] == '\r') ) {
- if (buf[start+bl+lwsp] == '\n') {
- adjustBuf(start+bl+lwsp+1, len-start-bl-lwsp-1);
- break;
- } else if (start+bl+lwsp+1 < len && buf[start+bl+lwsp+1] == '\n') {
- adjustBuf(start+bl+lwsp+2, len-start-bl-lwsp-2);
- break;
- }
- }
- adjustBuf(start+1, len-start-1);
- }
- if (LOGGER.isLoggable(Level.FINE)) {LOGGER.log(Level.FINE, "Skipped the preamble. buffer len={0}", len);}
- }
-
- private static byte[] getBytes(String s) {
- char [] chars= s.toCharArray();
- int size = chars.length;
- byte[] bytes = new byte[size];
-
- for (int i = 0; i < size;) {
- bytes[i] = (byte) chars[i++];
- }
- return bytes;
- }
-
- /**
- * Boyer-Moore search method. Copied from java.util.regex.Pattern.java
- *
- * Pre calculates arrays needed to generate the bad character
- * shift and the good suffix shift. Only the last seven bits
- * are used to see if chars match; This keeps the tables small
- * and covers the heavily used ASCII range, but occasionally
- * results in an aliased match for the bad character shift.
- */
- private void compileBoundaryPattern() {
- int i, j;
-
- // Precalculate part of the bad character shift
- // It is a table for where in the pattern each
- // lower 7-bit value occurs
- for (i = 0; i < bndbytes.length; i++) {
- bcs[bndbytes[i]&0x7F] = i + 1;
- }
-
- // Precalculate the good suffix shift
- // i is the shift amount being considered
-NEXT: for (i = bndbytes.length; i > 0; i--) {
- // j is the beginning index of suffix being considered
- for (j = bndbytes.length - 1; j >= i; j--) {
- // Testing for good suffix
- if (bndbytes[j] == bndbytes[j-i]) {
- // src[j..len] is a good suffix
- gss[j-1] = i;
- } else {
- // No match. The array has already been
- // filled up with correct values before.
- continue NEXT;
- }
- }
- // This fills up the remaining of optoSft
- // any suffix can not have larger shift amount
- // then its sub-suffix. Why???
- while (j > 0) {
- gss[--j] = i;
- }
- }
- // Set the guard value because of unicode compression
- gss[bndbytes.length -1] = 1;
- }
-
- /**
- * Finds the boundary in the given buffer using Boyer-Moore algo.
- * Copied from java.util.regex.Pattern.java
- *
- * @param mybuf boundary to be searched in this mybuf
- * @param off start index in mybuf
- * @param len number of bytes in mybuf
- *
- * @return -1 if there is no match or index where the match starts
- */
- private int match(byte[] mybuf, int off, int len) {
- int last = len - bndbytes.length;
-
- // Loop over all possible match positions in text
-NEXT: while (off <= last) {
- // Loop over pattern from right to left
- for (int j = bndbytes.length - 1; j >= 0; j--) {
- byte ch = mybuf[off+j];
- if (ch != bndbytes[j]) {
- // Shift search to the right by the maximum of the
- // bad character shift and the good suffix shift
- off += Math.max(j + 1 - bcs[ch&0x7F], gss[j]);
- continue NEXT;
- }
- }
- // Entire pattern matched starting at off
- return off;
- }
- return -1;
- }
-
- /**
- * Fills the remaining buf to the full capacity
- */
- private void fillBuf() {
- if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "Before fillBuf() buffer len={0}", len);}
- assert !eof;
- while(len < buf.length) {
- int read;
- try {
- read = in.read(buf, len, buf.length-len);
- } catch(IOException ioe) {
- throw new MIMEParsingException(ioe);
- }
- if (read == -1) {
- eof = true;
- try {
- if (LOGGER.isLoggable(Level.FINE)) {LOGGER.fine("Closing the input stream.");}
- in.close();
- } catch(IOException ioe) {
- throw new MIMEParsingException(ioe);
- }
- break;
- } else {
- len += read;
- }
- }
- if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "After fillBuf() buffer len={0}", len);}
- }
-
- private void doubleBuf() {
- byte[] temp = new byte[2*len];
- System.arraycopy(buf, 0, temp, 0, len);
- buf = temp;
- if (!eof) {
- fillBuf();
- }
- }
-
- class LineInputStream {
- private int offset;
-
- /*
- * Read a line containing only ASCII characters from the input
- * stream. A line is terminated by a CR or NL or CR-NL sequence.
- * A common error is a CR-CR-NL sequence, which will also terminate
- * a line.
- * The line terminator is not returned as part of the returned
- * String. Returns null if no data is available. <p>
- *
- * This class is similar to the deprecated
- * <code>DataInputStream.readLine()</code>
- */
- public String readLine() throws IOException {
-
- int hdrLen = 0;
- int lwsp = 0;
- while(offset+hdrLen < len) {
- if (buf[offset+hdrLen] == '\n') {
- lwsp = 1;
- break;
- }
- if (offset+hdrLen+1 == len) {
- doubleBuf();
- }
- if (offset+hdrLen+1 >= len) { // No more data in the stream
- assert eof;
- return null;
- }
- if (buf[offset+hdrLen] == '\r' && buf[offset+hdrLen+1] == '\n') {
- lwsp = 2;
- break;
- }
- ++hdrLen;
- }
- if (hdrLen == 0) {
- adjustBuf(offset+lwsp, len-offset-lwsp);
- return null;
- }
-
- String hdr = new String(buf, offset, hdrLen, HEADER_ENCODING);
- offset += hdrLen+lwsp;
- return hdr;
- }
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParsingException.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParsingException.java
deleted file mode 100644
index defd9fe2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParsingException.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-/**
- * @author Jitendra Kotamraju
- */
-
-/**
- * The <code>MIMEParsingException</code> class is the base
- * exception class for all MIME message parsing exceptions.
- *
- */
-
-public class MIMEParsingException extends java.lang.RuntimeException {
-
- /**
- * Constructs a new exception with <code>null</code> as its
- * detail message. The cause is not initialized.
- */
- public MIMEParsingException() {
- super();
- }
-
- /**
- * Constructs a new exception with the specified detail
- * message. The cause is not initialized.
- *
- * @param message The detail message which is later
- * retrieved using the getMessage method
- */
- public MIMEParsingException(String message) {
- super(message);
- }
-
- /**
- * Constructs a new exception with the specified detail
- * message and cause.
- *
- * @param message The detail message which is later retrieved
- * using the getMessage method
- * @param cause The cause which is saved for the later
- * retrieval throw by the getCause method
- */
- public MIMEParsingException(String message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * Constructs a new WebServiceException with the specified cause
- * and a detail message of <tt>(cause==null ? null :
- * cause.toString())</tt> (which typically contains the
- * class and detail message of <tt>cause</tt>).
- *
- * @param cause The cause which is saved for the later
- * retrieval throw by the getCause method.
- * (A <tt>null</tt> value is permitted, and
- * indicates that the cause is nonexistent or
- * unknown.)
- */
- public MIMEParsingException(Throwable cause) {
- super(cause);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEPart.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEPart.java
deleted file mode 100644
index e5e4aedc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEPart.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.io.File;
-import java.io.InputStream;
-import java.nio.ByteBuffer;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Represents an attachment part in a MIME message. MIME message parsing is done
- * lazily using a pull parser, so the part may not have all the data. {@link #read}
- * and {@link #readOnce} may trigger the actual parsing the message. In fact,
- * parsing of an attachment part may be triggered by calling {@link #read} methods
- * on some other attachment parts. All this happens behind the scenes so the
- * application developer need not worry about these details.
- *
- * @author Jitendra Kotamraju, Martin Grebac
- */
-public class MIMEPart {
-
- private static final Logger LOGGER = Logger.getLogger(MIMEPart.class.getName());
-
- private volatile InternetHeaders headers;
- private volatile String contentId;
- private String contentType;
- private String contentTransferEncoding;
-
- volatile boolean parsed; // part is parsed or not
- final MIMEMessage msg;
- private final DataHead dataHead;
-
- MIMEPart(MIMEMessage msg) {
- this.msg = msg;
- this.dataHead = new DataHead(this);
- }
-
- MIMEPart(MIMEMessage msg, String contentId) {
- this(msg);
- this.contentId = contentId;
- }
-
- /**
- * Can get the attachment part's content multiple times. That means
- * the full content needs to be there in memory or on the file system.
- * Calling this method would trigger parsing for the part's data. So
- * do not call this unless it is required(otherwise, just wrap MIMEPart
- * into a object that returns InputStream for e.g DataHandler)
- *
- * @return data for the part's content
- */
- public InputStream read() {
- InputStream is = null;
- try {
- is = MimeUtility.decode(dataHead.read(), contentTransferEncoding);
- } catch (DecodingException ex) { //ignore
- if (LOGGER.isLoggable(Level.WARNING)) {
- LOGGER.log(Level.WARNING, null, ex);
- }
- }
- return is;
- }
-
- /**
- * Cleans up any resources that are held by this part (for e.g. deletes
- * the temp file that is used to serve this part's content). After
- * calling this, one shouldn't call {@link #read()} or {@link #readOnce()}
- */
- public void close() {
- dataHead.close();
- }
-
- /**
- * Can get the attachment part's content only once. The content
- * will be lost after the method. Content data is not be stored
- * on the file system or is not kept in the memory for the
- * following case:
- * - Attachement parts contents are accessed sequentially
- *
- * In general, take advantage of this when the data is used only
- * once.
- *
- * @return data for the part's content
- */
- public InputStream readOnce() {
- InputStream is = null;
- try {
- is = MimeUtility.decode(dataHead.readOnce(), contentTransferEncoding);
- } catch (DecodingException ex) { //ignore
- if (LOGGER.isLoggable(Level.WARNING)) {
- LOGGER.log(Level.WARNING, null, ex);
- }
- }
- return is;
- }
-
- public void moveTo(File f) {
- dataHead.moveTo(f);
- }
-
- /**
- * Returns Content-ID MIME header for this attachment part
- *
- * @return Content-ID of the part
- */
- public String getContentId() {
- if (contentId == null) {
- getHeaders();
- }
- return contentId;
- }
-
- /**
- * Returns Content-Transfer-Encoding MIME header for this attachment part
- *
- * @return Content-Transfer-Encoding of the part
- */
- public String getContentTransferEncoding() {
- if (contentTransferEncoding == null) {
- getHeaders();
- }
- return contentTransferEncoding;
- }
-
- /**
- * Returns Content-Type MIME header for this attachment part
- *
- * @return Content-Type of the part
- */
- public String getContentType() {
- if (contentType == null) {
- getHeaders();
- }
- return contentType;
- }
-
- private void getHeaders() {
- // Trigger parsing for the part headers
- while(headers == null) {
- if (!msg.makeProgress()) {
- if (headers == null) {
- throw new IllegalStateException("Internal Error. Didn't get Headers even after complete parsing.");
- }
- }
- }
- }
-
- /**
- * Return all the values for the specified header.
- * Returns <code>null</code> if no headers with the
- * specified name exist.
- *
- * @param name header name
- * @return list of header values, or null if none
- */
- public List<String> getHeader(String name) {
- getHeaders();
- assert headers != null;
- return headers.getHeader(name);
- }
-
- /**
- * Return all the headers
- *
- * @return list of Header objects
- */
- public List<? extends Header> getAllHeaders() {
- getHeaders();
- assert headers != null;
- return headers.getAllHeaders();
- }
-
- /**
- * Callback to set headers
- *
- * @param headers MIME headers for the part
- */
- void setHeaders(InternetHeaders headers) {
- this.headers = headers;
- List<String> ct = getHeader("Content-Type");
- this.contentType = (ct == null) ? "application/octet-stream" : ct.get(0);
- List<String> cte = getHeader("Content-Transfer-Encoding");
- this.contentTransferEncoding = (cte == null) ? "binary" : cte.get(0);
- }
-
- /**
- * Callback to notify that there is a partial content for the part
- *
- * @param buf content data for the part
- */
- void addBody(ByteBuffer buf) {
- dataHead.addBody(buf);
- }
-
- /**
- * Callback to indicate that parsing is done for this part
- * (no more update events for this part)
- */
- void doneParsing() {
- parsed = true;
- dataHead.doneParsing();
- }
-
- /**
- * Callback to set Content-ID for this part
- * @param cid Content-ID of the part
- */
- void setContentId(String cid) {
- this.contentId = cid;
- }
-
- /**
- * Callback to set Content-Transfer-Encoding for this part
- * @param cte Content-Transfer-Encoding of the part
- */
- void setContentTransferEncoding(String cte) {
- this.contentTransferEncoding = cte;
- }
-
- @Override
- public String toString() {
- return "Part="+contentId+":"+contentTransferEncoding;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java
deleted file mode 100644
index 912b9ca8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.org.jvnet.mimepull;
-
-import java.nio.ByteBuffer;
-import java.io.File;
-import java.io.IOException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Keeps the Part's partial content data in memory.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-final class MemoryData implements Data {
- private static final Logger LOGGER = Logger.getLogger(MemoryData.class.getName());
-
- private final byte[] data;
- private final int len;
- private final MIMEConfig config;
-
- MemoryData(ByteBuffer buf, MIMEConfig config) {
- data = buf.array();
- len = buf.limit();
- this.config = config;
- }
-
- // size of the chunk given by the parser
- @Override
- public int size() {
- return len;
- }
-
- @Override
- public byte[] read() {
- return data;
- }
-
- @Override
- public long writeTo(DataFile file) {
- return file.writeTo(data, 0, len);
- }
-
- /**
- *
- * @param dataHead
- * @param buf
- * @return
- */
- @Override
- public Data createNext(DataHead dataHead, ByteBuffer buf) {
- if (!config.isOnlyMemory() && dataHead.inMemory >= config.memoryThreshold) {
- try {
- String prefix = config.getTempFilePrefix();
- String suffix = config.getTempFileSuffix();
- File tempFile = TempFiles.createTempFile(prefix, suffix, config.getTempDir());
- // delete the temp file when VM exits as a last resort for file clean up
- tempFile.deleteOnExit();
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Created temp file = {0}", tempFile);
- }
- // delete the temp file when VM exits as a last resort for file clean up
- tempFile.deleteOnExit();
- if (LOGGER.isLoggable(Level.FINE)) {LOGGER.log(Level.FINE, "Created temp file = {0}", tempFile);}
- dataHead.dataFile = new DataFile(tempFile);
- } catch (IOException ioe) {
- throw new MIMEParsingException(ioe);
- }
-
- if (dataHead.head != null) {
- for (Chunk c = dataHead.head; c != null; c = c.next) {
- long pointer = c.data.writeTo(dataHead.dataFile);
- c.data = new FileData(dataHead.dataFile, pointer, len);
- }
- }
- return new FileData(dataHead.dataFile, buf);
- } else {
- return new MemoryData(buf, config);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MimeUtility.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MimeUtility.java
deleted file mode 100644
index 8aa7e024..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MimeUtility.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.io.*;
-
-
-/**
- * This is a utility class that provides various MIME related
- * functionality. <p>
- *
- * There are a set of methods to encode and decode MIME headers as
- * per RFC 2047. Note that, in general, these methods are
- * <strong>not</strong> needed when using methods such as
- * <code>setSubject</code> and <code>setRecipients</code>; JavaMail
- * will automatically encode and decode data when using these "higher
- * level" methods. The methods below are only needed when maniuplating
- * raw MIME headers using <code>setHeader</code> and <code>getHeader</code>
- * methods. A brief description on handling such headers is given below: <p>
- *
- * RFC 822 mail headers <strong>must</strong> contain only US-ASCII
- * characters. Headers that contain non US-ASCII characters must be
- * encoded so that they contain only US-ASCII characters. Basically,
- * this process involves using either BASE64 or QP to encode certain
- * characters. RFC 2047 describes this in detail. <p>
- *
- * In Java, Strings contain (16 bit) Unicode characters. ASCII is a
- * subset of Unicode (and occupies the range 0 - 127). A String
- * that contains only ASCII characters is already mail-safe. If the
- * String contains non US-ASCII characters, it must be encoded. An
- * additional complexity in this step is that since Unicode is not
- * yet a widely used charset, one might want to first charset-encode
- * the String into another charset and then do the transfer-encoding.
- * <p>
- * Note that to get the actual bytes of a mail-safe String (say,
- * for sending over SMTP), one must do
- * <p><blockquote><pre>
- *
- * byte[] bytes = string.getBytes("iso-8859-1");
- *
- * </pre></blockquote><p>
- *
- * The <code>setHeader</code> and <code>addHeader</code> methods
- * on MimeMessage and MimeBodyPart assume that the given header values
- * are Unicode strings that contain only US-ASCII characters. Hence
- * the callers of those methods must insure that the values they pass
- * do not contain non US-ASCII characters. The methods in this class
- * help do this. <p>
- *
- * The <code>getHeader</code> family of methods on MimeMessage and
- * MimeBodyPart return the raw header value. These might be encoded
- * as per RFC 2047, and if so, must be decoded into Unicode Strings.
- * The methods in this class help to do this. <p>
- *
- * Several System properties control strict conformance to the MIME
- * spec. Note that these are not session properties but must be set
- * globally as System properties. <p>
- *
- * The <code>mail.mime.decodetext.strict</code> property controls
- * decoding of MIME encoded words. The MIME spec requires that encoded
- * words start at the beginning of a whitespace separated word. Some
- * mailers incorrectly include encoded words in the middle of a word.
- * If the <code>mail.mime.decodetext.strict</code> System property is
- * set to <code>"false"</code>, an attempt will be made to decode these
- * illegal encoded words. The default is true. <p>
- *
- * The <code>mail.mime.encodeeol.strict</code> property controls the
- * choice of Content-Transfer-Encoding for MIME parts that are not of
- * type "text". Often such parts will contain textual data for which
- * an encoding that allows normal end of line conventions is appropriate.
- * In rare cases, such a part will appear to contain entirely textual
- * data, but will require an encoding that preserves CR and LF characters
- * without change. If the <code>mail.mime.encodeeol.strict</code>
- * System property is set to <code>"true"</code>, such an encoding will
- * be used when necessary. The default is false. <p>
- *
- * In addition, the <code>mail.mime.charset</code> System property can
- * be used to specify the default MIME charset to use for encoded words
- * and text parts that don't otherwise specify a charset. Normally, the
- * default MIME charset is derived from the default Java charset, as
- * specified in the <code>file.encoding</code> System property. Most
- * applications will have no need to explicitly set the default MIME
- * charset. In cases where the default MIME charset to be used for
- * mail messages is different than the charset used for files stored on
- * the system, this property should be set. <p>
- *
- * The current implementation also supports the following System property.
- * <p>
- * The <code>mail.mime.ignoreunknownencoding</code> property controls
- * whether unknown values in the <code>Content-Transfer-Encoding</code>
- * header, as passed to the <code>decode</code> method, cause an exception.
- * If set to <code>"true"</code>, unknown values are ignored and 8bit
- * encoding is assumed. Otherwise, unknown values cause a MessagingException
- * to be thrown.
- *
- * @author John Mani
- * @author Bill Shannon
- */
-
-/* FROM mail.jar */
-final class MimeUtility {
-
- // This class cannot be instantiated
- private MimeUtility() { }
-
- private static final boolean ignoreUnknownEncoding =
- PropUtil.getBooleanSystemProperty(
- "mail.mime.ignoreunknownencoding", false);
-
- /**
- * Decode the given input stream. The Input stream returned is
- * the decoded input stream. All the encodings defined in RFC 2045
- * are supported here. They include "base64", "quoted-printable",
- * "7bit", "8bit", and "binary". In addition, "uuencode" is also
- * supported. <p>
- *
- * In the current implementation, if the
- * <code>mail.mime.ignoreunknownencoding</code> system property is set to
- * <code>"true"</code>, unknown encoding values are ignored and the
- * original InputStream is returned.
- *
- * @param is input stream
- * @param encoding the encoding of the stream.
- * @return decoded input stream.
- * @exception MessagingException if the encoding is unknown
- */
- public static InputStream decode(InputStream is, String encoding)
- throws DecodingException {
- if (encoding.equalsIgnoreCase("base64"))
- return new BASE64DecoderStream(is);
- else if (encoding.equalsIgnoreCase("quoted-printable"))
- return new QPDecoderStream(is);
- else if (encoding.equalsIgnoreCase("uuencode") ||
- encoding.equalsIgnoreCase("x-uuencode") ||
- encoding.equalsIgnoreCase("x-uue"))
- return new UUDecoderStream(is);
- else if (encoding.equalsIgnoreCase("binary") ||
- encoding.equalsIgnoreCase("7bit") ||
- encoding.equalsIgnoreCase("8bit"))
- return is;
- else {
- if (!ignoreUnknownEncoding) {
- throw new DecodingException("Unknown encoding: " + encoding);
- }
- return is;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/PropUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/PropUtil.java
deleted file mode 100644
index 08cb161d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/PropUtil.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* FROM mail.jar */
-package com.sun.xml.internal.org.jvnet.mimepull;
-
-import java.util.*;
-
-/**
- * Utilities to make it easier to get property values.
- * Properties can be strings or type-specific value objects.
- *
- * @author Bill Shannon
- */
-final class PropUtil {
-
- // No one should instantiate this class.
- private PropUtil() {
- }
-
- /**
- * Get a boolean valued System property.
- */
- public static boolean getBooleanSystemProperty(String name, boolean def) {
- try {
- return getBoolean(getProp(System.getProperties(), name), def);
- } catch (SecurityException sex) {
- // fall through...
- }
-
- /*
- * If we can't get the entire System Properties object because
- * of a SecurityException, just ask for the specific property.
- */
- try {
- String value = System.getProperty(name);
- if (value == null) {
- return def;
- }
- if (def) {
- return !value.equalsIgnoreCase("false");
- } else {
- return value.equalsIgnoreCase("true");
- }
- } catch (SecurityException sex) {
- return def;
- }
- }
-
- /**
- * Get the value of the specified property.
- * If the "get" method returns null, use the getProperty method,
- * which might cascade to a default Properties object.
- */
- private static Object getProp(Properties props, String name) {
- Object val = props.get(name);
- if (val != null) {
- return val;
- } else {
- return props.getProperty(name);
- }
- }
-
- /**
- * Interpret the value object as a boolean,
- * returning def if unable.
- */
- private static boolean getBoolean(Object value, boolean def) {
- if (value == null) {
- return def;
- }
- if (value instanceof String) {
- /*
- * If the default is true, only "false" turns it off.
- * If the default is false, only "true" turns it on.
- */
- if (def) {
- return !((String)value).equalsIgnoreCase("false");
- } else {
- return ((String)value).equalsIgnoreCase("true");
- }
- }
- if (value instanceof Boolean) {
- return ((Boolean)value).booleanValue();
- }
- return def;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/QPDecoderStream.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/QPDecoderStream.java
deleted file mode 100644
index 76eea475..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/QPDecoderStream.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* FROM mail.jar */
-package com.sun.xml.internal.org.jvnet.mimepull;
-
-import java.io.*;
-
-/**
- * This class implements a QP Decoder. It is implemented as
- * a FilterInputStream, so one can just wrap this class around
- * any input stream and read bytes from this filter. The decoding
- * is done as the bytes are read out.
- *
- * @author John Mani
- */
-
-final class QPDecoderStream extends FilterInputStream {
- private byte[] ba = new byte[2];
- private int spaces = 0;
-
- /**
- * Create a Quoted Printable decoder that decodes the specified
- * input stream.
- * @param in the input stream
- */
- public QPDecoderStream(InputStream in) {
- super(new PushbackInputStream(in, 2)); // pushback of size=2
- }
-
- /**
- * Read the next decoded byte from this input stream. The byte
- * is returned as an <code>int</code> in the range <code>0</code>
- * to <code>255</code>. If no byte is available because the end of
- * the stream has been reached, the value <code>-1</code> is returned.
- * This method blocks until input data is available, the end of the
- * stream is detected, or an exception is thrown.
- *
- * @return the next byte of data, or <code>-1</code> if the end of the
- * stream is reached.
- * @exception IOException if an I/O error occurs.
- */
- @Override
- public int read() throws IOException {
- if (spaces > 0) {
- // We have cached space characters, return one
- spaces--;
- return ' ';
- }
-
- int c = in.read();
-
- if (c == ' ') {
- // Got space, keep reading till we get a non-space char
- while ((c = in.read()) == ' ') {
- spaces++;
- }
-
- if (c == '\r' || c == '\n' || c == -1) {
- spaces = 0;
- } else {
- // The non-space char is NOT CR/LF, the spaces are valid.
- ((PushbackInputStream)in).unread(c);
- c = ' ';
- }
- return c; // return either <SPACE> or <CR/LF>
- }
- else if (c == '=') {
- // QP Encoded atom. Decode the next two bytes
- int a = in.read();
-
- if (a == '\n') {
- /* Hmm ... not really confirming QP encoding, but lets
- * allow this as a LF terminated encoded line .. and
- * consider this a soft linebreak and recurse to fetch
- * the next char.
- */
- return read();
- } else if (a == '\r') {
- // Expecting LF. This forms a soft linebreak to be ignored.
- int b = in.read();
- if (b != '\n') {
- ((PushbackInputStream)in).unread(b);
- }
- return read();
- } else if (a == -1) {
- // Not valid QP encoding, but we be nice and tolerant here !
- return -1;
- } else {
- ba[0] = (byte)a;
- ba[1] = (byte)in.read();
- try {
- return ASCIIUtility.parseInt(ba, 0, 2, 16);
- } catch (NumberFormatException nex) {
- /*
- System.err.println(
- "Illegal characters in QP encoded stream: " +
- ASCIIUtility.toString(ba, 0, 2)
- );
- */
-
- ((PushbackInputStream)in).unread(ba);
- return c;
- }
- }
- }
- return c;
- }
-
- /**
- * Reads up to <code>len</code> decoded bytes of data from this input stream
- * into an array of bytes. This method blocks until some input is
- * available.
- * <p>
- *
- * @param buf the buffer into which the data is read.
- * @param off the start offset of the data.
- * @param len the maximum number of bytes read.
- * @return the total number of bytes read into the buffer, or
- * <code>-1</code> if there is no more data because the end of
- * the stream has been reached.
- * @exception IOException if an I/O error occurs.
- */
- @Override
- public int read(byte[] buf, int off, int len) throws IOException {
- int i, c;
- for (i = 0; i < len; i++) {
- if ((c = read()) == -1) {
- if (i == 0) {
- i = -1; // return -1 , NOT 0.
- }
- break;
- }
- buf[off+i] = (byte)c;
- }
- return i;
- }
-
- /**
- * Skips over and discards n bytes of data from this stream.
- */
- @Override
- public long skip(long n) throws IOException {
- long skipped = 0;
- while (n-- > 0 && read() >= 0) {
- skipped++;
- }
- return skipped;
- }
-
- /**
- * Tests if this input stream supports marks. Currently this class
- * does not support marks
- */
- @Override
- public boolean markSupported() {
- return false;
- }
-
- /**
- * Returns the number of bytes that can be read from this input
- * stream without blocking. The QP algorithm does not permit
- * a priori knowledge of the number of bytes after decoding, so
- * this method just invokes the <code>available</code> method
- * of the original input stream.
- */
- @Override
- public int available() throws IOException {
- // This is bogus ! We don't really know how much
- // bytes are available *after* decoding
- return in.available();
- }
-
- /**** begin TEST program
- public static void main(String argv[]) throws Exception {
- FileInputStream infile = new FileInputStream(argv[0]);
- QPDecoderStream decoder = new QPDecoderStream(infile);
- int c;
-
- while ((c = decoder.read()) != -1)
- System.out.print((char)c);
- System.out.println();
- }
- *** end TEST program ****/
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/TempFiles.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/TempFiles.java
deleted file mode 100644
index 797b9b7c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/TempFiles.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * 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.org.jvnet.mimepull;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Array;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Helper utility to support jdk <= jdk1.6. After jdk1.6 EOL reflection can be removed and API can be used directly.
- */
-class TempFiles {
-
- private static final Logger LOGGER = Logger.getLogger(TempFiles.class.getName());
-
- private static final Class<?> CLASS_FILES;
- private static final Class<?> CLASS_PATH;
- private static final Class<?> CLASS_FILE_ATTRIBUTE;
- private static final Class<?> CLASS_FILE_ATTRIBUTES;
- private static final Method METHOD_FILE_TO_PATH;
- private static final Method METHOD_FILES_CREATE_TEMP_FILE;
- private static final Method METHOD_FILES_CREATE_TEMP_FILE_WITHPATH;
-
- private static final Method METHOD_PATH_TO_FILE;
-
- private static boolean useJdk6API;
-
- static {
- useJdk6API = isJdk6();
-
- CLASS_FILES = safeGetClass("java.nio.file.Files");
- CLASS_PATH = safeGetClass("java.nio.file.Path");
- CLASS_FILE_ATTRIBUTE = safeGetClass("java.nio.file.attribute.FileAttribute");
- CLASS_FILE_ATTRIBUTES = safeGetClass("[Ljava.nio.file.attribute.FileAttribute;");
- METHOD_FILE_TO_PATH = safeGetMethod(File.class, "toPath");
- METHOD_FILES_CREATE_TEMP_FILE = safeGetMethod(CLASS_FILES, "createTempFile", String.class, String.class, CLASS_FILE_ATTRIBUTES);
- METHOD_FILES_CREATE_TEMP_FILE_WITHPATH = safeGetMethod(CLASS_FILES, "createTempFile", CLASS_PATH, String.class, String.class, CLASS_FILE_ATTRIBUTES);
- METHOD_PATH_TO_FILE = safeGetMethod(CLASS_PATH, "toFile");
- }
-
- private static boolean isJdk6() {
- String javaVersion = System.getProperty("java.version");
- LOGGER.log(Level.FINEST, "Detected java version = {0}", javaVersion);
- return javaVersion.startsWith("1.6.");
- }
-
- private static Class<?> safeGetClass(String className) {
- // it is jdk 6 or something failed already before
- if (useJdk6API) return null;
- try {
- return Class.forName(className);
- } catch (ClassNotFoundException e) {
- LOGGER.log(Level.SEVERE, "Exception cought", e);
- LOGGER.log(Level.WARNING, "Class {0} not found. Temp files will be created using old java.io API.", className);
- useJdk6API = true;
- return null;
- }
- }
-
- private static Method safeGetMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes) {
- // it is jdk 6 or something failed already before
- if (useJdk6API) return null;
- try {
- return clazz.getMethod(methodName, parameterTypes);
- } catch (NoSuchMethodException e) {
- LOGGER.log(Level.SEVERE, "Exception cought", e);
- LOGGER.log(Level.WARNING, "Method {0} not found. Temp files will be created using old java.io API.", methodName);
- useJdk6API = true;
- return null;
- }
- }
-
-
- static Object toPath(File f) throws InvocationTargetException, IllegalAccessException {
- return METHOD_FILE_TO_PATH.invoke(f);
- }
-
- static File toFile(Object path) throws InvocationTargetException, IllegalAccessException {
- return (File) METHOD_PATH_TO_FILE.invoke(path);
- }
-
- static File createTempFile(String prefix, String suffix, File dir) throws IOException {
-
- if (useJdk6API) {
- LOGGER.log(Level.FINEST, "Jdk6 detected, temp file (prefix:{0}, suffix:{1}) being created using old java.io API.", new Object[]{prefix, suffix});
- return File.createTempFile(prefix, suffix, dir);
-
- } else {
-
- try {
- if (dir != null) {
- Object path = toPath(dir);
- LOGGER.log(Level.FINEST, "Temp file (path: {0}, prefix:{1}, suffix:{2}) being created using NIO API.", new Object[]{dir.getAbsolutePath(), prefix, suffix});
- return toFile(METHOD_FILES_CREATE_TEMP_FILE_WITHPATH.invoke(null, path, prefix, suffix, Array.newInstance(CLASS_FILE_ATTRIBUTE, 0)));
- } else {
- LOGGER.log(Level.FINEST, "Temp file (prefix:{0}, suffix:{1}) being created using NIO API.", new Object[]{prefix, suffix});
- return toFile(METHOD_FILES_CREATE_TEMP_FILE.invoke(null, prefix, suffix, Array.newInstance(CLASS_FILE_ATTRIBUTE, 0)));
- }
-
- } catch (IllegalAccessException e) {
- LOGGER.log(Level.SEVERE, "Exception caught", e);
- LOGGER.log(Level.WARNING, "Error invoking java.nio API, temp file (path: {0}, prefix:{1}, suffix:{2}) being created using old java.io API.",
- new Object[]{dir != null ? dir.getAbsolutePath() : null, prefix, suffix});
- return File.createTempFile(prefix, suffix, dir);
-
- } catch (InvocationTargetException e) {
- LOGGER.log(Level.SEVERE, "Exception caught", e);
- LOGGER.log(Level.WARNING, "Error invoking java.nio API, temp file (path: {0}, prefix:{1}, suffix:{2}) being created using old java.io API.",
- new Object[]{dir != null ? dir.getAbsolutePath() : null, prefix, suffix});
- return File.createTempFile(prefix, suffix, dir);
- }
- }
-
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/UUDecoderStream.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/UUDecoderStream.java
deleted file mode 100644
index 77cc3fa7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/UUDecoderStream.java
+++ /dev/null
@@ -1,357 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* FROM mail.jar */
-package com.sun.xml.internal.org.jvnet.mimepull;
-
-import java.io.*;
-
-/**
- * This class implements a UUDecoder. It is implemented as
- * a FilterInputStream, so one can just wrap this class around
- * any input stream and read bytes from this filter. The decoding
- * is done as the bytes are read out.
- *
- * @author John Mani
- * @author Bill Shannon
- */
-
-final class UUDecoderStream extends FilterInputStream {
- private String name;
- private int mode;
-
- private byte[] buffer = new byte[45]; // max decoded chars in a line = 45
- private int bufsize = 0; // size of the cache
- private int index = 0; // index into the cache
- private boolean gotPrefix = false;
- private boolean gotEnd = false;
- private LineInputStream lin;
- private boolean ignoreErrors;
- private boolean ignoreMissingBeginEnd;
- private String readAhead;
-
- /**
- * Create a UUdecoder that decodes the specified input stream.
- * The System property <code>mail.mime.uudecode.ignoreerrors</code>
- * controls whether errors in the encoded data cause an exception
- * or are ignored. The default is false (errors cause exception).
- * The System property <code>mail.mime.uudecode.ignoremissingbeginend</code>
- * controls whether a missing begin or end line cause an exception
- * or are ignored. The default is false (errors cause exception).
- * @param in the input stream
- */
- public UUDecoderStream(InputStream in) {
- super(in);
- lin = new LineInputStream(in);
- // default to false
- ignoreErrors = PropUtil.getBooleanSystemProperty(
- "mail.mime.uudecode.ignoreerrors", false);
- // default to false
- ignoreMissingBeginEnd = PropUtil.getBooleanSystemProperty(
- "mail.mime.uudecode.ignoremissingbeginend", false);
- }
-
- /**
- * Create a UUdecoder that decodes the specified input stream.
- * @param in the input stream
- * @param ignoreErrors ignore errors?
- * @param ignoreMissingBeginEnd ignore missing begin or end?
- */
- public UUDecoderStream(InputStream in, boolean ignoreErrors,
- boolean ignoreMissingBeginEnd) {
- super(in);
- lin = new LineInputStream(in);
- this.ignoreErrors = ignoreErrors;
- this.ignoreMissingBeginEnd = ignoreMissingBeginEnd;
- }
-
- /**
- * Read the next decoded byte from this input stream. The byte
- * is returned as an <code>int</code> in the range <code>0</code>
- * to <code>255</code>. If no byte is available because the end of
- * the stream has been reached, the value <code>-1</code> is returned.
- * This method blocks until input data is available, the end of the
- * stream is detected, or an exception is thrown.
- *
- * @return next byte of data, or <code>-1</code> if the end of
- * stream is reached.
- * @exception IOException if an I/O error occurs.
- * @see java.io.FilterInputStream#in
- */
- @Override
- public int read() throws IOException {
- if (index >= bufsize) {
- readPrefix();
- if (!decode()) {
- return -1;
- }
- index = 0; // reset index into buffer
- }
- return buffer[index++] & 0xff; // return lower byte
- }
-
- @Override
- public int read(byte[] buf, int off, int len) throws IOException {
- int i, c;
- for (i = 0; i < len; i++) {
- if ((c = read()) == -1) {
- if (i == 0) {// At end of stream, so we should
- i = -1; // return -1, NOT 0.
- }
- break;
- }
- buf[off+i] = (byte)c;
- }
- return i;
- }
-
- @Override
- public boolean markSupported() {
- return false;
- }
-
- @Override
- public int available() throws IOException {
- // This is only an estimate, since in.available()
- // might include CRLFs too ..
- return ((in.available() * 3)/4 + (bufsize-index));
- }
-
- /**
- * Get the "name" field from the prefix. This is meant to
- * be the pathname of the decoded file
- *
- * @return name of decoded file
- * @exception IOException if an I/O error occurs.
- */
- public String getName() throws IOException {
- readPrefix();
- return name;
- }
-
- /**
- * Get the "mode" field from the prefix. This is the permission
- * mode of the source file.
- *
- * @return permission mode of source file
- * @exception IOException if an I/O error occurs.
- */
- public int getMode() throws IOException {
- readPrefix();
- return mode;
- }
-
- /**
- * UUencoded streams start off with the line:
- * "begin <mode> <filename>"
- * Search for this prefix and gobble it up.
- */
- private void readPrefix() throws IOException {
- if (gotPrefix) {
- return;
- }
-
- mode = 0666; // defaults, overridden below
- name = "encoder.buf"; // same default used by encoder
- String line;
- for (;;) {
- // read till we get the prefix: "begin MODE FILENAME"
- line = lin.readLine(); // NOTE: readLine consumes CRLF pairs too
- if (line == null) {
- if (!ignoreMissingBeginEnd) {
- throw new DecodingException("UUDecoder: Missing begin");
- }
- // at EOF, fake it
- gotPrefix = true;
- gotEnd = true;
- break;
- }
- if (line.regionMatches(false, 0, "begin", 0, 5)) {
- try {
- mode = Integer.parseInt(line.substring(6,9));
- } catch (NumberFormatException ex) {
- if (!ignoreErrors) {
- throw new DecodingException(
- "UUDecoder: Error in mode: " + ex.toString());
- }
- }
- if (line.length() > 10) {
- name = line.substring(10);
- } else {
- if (!ignoreErrors) {
- throw new DecodingException(
- "UUDecoder: Missing name: " + line);
- }
- }
- gotPrefix = true;
- break;
- } else if (ignoreMissingBeginEnd && line.length() != 0) {
- int count = line.charAt(0);
- count = (count - ' ') & 0x3f;
- int need = ((count * 8)+5)/6;
- if (need == 0 || line.length() >= need + 1) {
- /*
- * Looks like a legitimate encoded line.
- * Pretend we saw the "begin" line and
- * save this line for later processing in
- * decode().
- */
- readAhead = line;
- gotPrefix = true; // fake it
- break;
- }
- }
- }
- }
-
- private boolean decode() throws IOException {
-
- if (gotEnd) {
- return false;
- }
- bufsize = 0;
- int count = 0;
- String line;
- for (;;) {
- /*
- * If we ignored a missing "begin", the first line
- * will be saved in readAhead.
- */
- if (readAhead != null) {
- line = readAhead;
- readAhead = null;
- } else {
- line = lin.readLine();
- }
-
- /*
- * Improperly encoded data sometimes omits the zero length
- * line that starts with a space character, we detect the
- * following "end" line here.
- */
- if (line == null) {
- if (!ignoreMissingBeginEnd) {
- throw new DecodingException(
- "UUDecoder: Missing end at EOF");
- }
- gotEnd = true;
- return false;
- }
- if (line.equals("end")) {
- gotEnd = true;
- return false;
- }
- if (line.length() == 0) {
- continue;
- }
- count = line.charAt(0);
- if (count < ' ') {
- if (!ignoreErrors) {
- throw new DecodingException(
- "UUDecoder: Buffer format error");
- }
- continue;
- }
-
- /*
- * The first character in a line is the number of original (not
- * the encoded atoms) characters in the line. Note that all the
- * code below has to handle the <SPACE> character that indicates
- * end of encoded stream.
- */
- count = (count - ' ') & 0x3f;
-
- if (count == 0) {
- line = lin.readLine();
- if (line == null || !line.equals("end")) {
- if (!ignoreMissingBeginEnd) {
- throw new DecodingException(
- "UUDecoder: Missing End after count 0 line");
- }
- }
- gotEnd = true;
- return false;
- }
-
- int need = ((count * 8)+5)/6;
-//System.out.println("count " + count + ", need " + need + ", len " + line.length());
- if (line.length() < need + 1) {
- if (!ignoreErrors) {
- throw new DecodingException(
- "UUDecoder: Short buffer error");
- }
- continue;
- }
-
- // got a line we're committed to, break out and decode it
- break;
- }
-
- int i = 1;
- byte a, b;
- /*
- * A correct uuencoder always encodes 3 characters at a time, even
- * if there aren't 3 characters left. But since some people out
- * there have broken uuencoders we handle the case where they
- * don't include these "unnecessary" characters.
- */
- while (bufsize < count) {
- // continue decoding until we get 'count' decoded chars
- a = (byte)((line.charAt(i++) - ' ') & 0x3f);
- b = (byte)((line.charAt(i++) - ' ') & 0x3f);
- buffer[bufsize++] = (byte)(((a << 2) & 0xfc) | ((b >>> 4) & 3));
-
- if (bufsize < count) {
- a = b;
- b = (byte)((line.charAt(i++) - ' ') & 0x3f);
- buffer[bufsize++] =
- (byte)(((a << 4) & 0xf0) | ((b >>> 2) & 0xf));
- }
-
- if (bufsize < count) {
- a = b;
- b = (byte)((line.charAt(i++) - ' ') & 0x3f);
- buffer[bufsize++] = (byte)(((a << 6) & 0xc0) | (b & 0x3f));
- }
- }
- return true;
- }
-
- /*** begin TEST program *****
- public static void main(String argv[]) throws Exception {
- FileInputStream infile = new FileInputStream(argv[0]);
- UUDecoderStream decoder = new UUDecoderStream(infile);
- int c;
-
- try {
- while ((c = decoder.read()) != -1)
- System.out.write(c);
- System.out.flush();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- **** end TEST program ****/
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/WeakDataFile.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/WeakDataFile.java
deleted file mode 100644
index a1851da5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/WeakDataFile.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.mimepull;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.lang.ref.ReferenceQueue;
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Executor;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Removing files based on this
- * <a href="http://java.sun.com/developer/technicalArticles/javase/finalization/">article</a>
- *
- * @author Jitendra Kotamraju
- */
-final class WeakDataFile extends WeakReference<DataFile> {
-
- private static final Logger LOGGER = Logger.getLogger(WeakDataFile.class.getName());
- //private static final int MAX_ITERATIONS = 2;
- private static ReferenceQueue<DataFile> refQueue = new ReferenceQueue<DataFile>();
- private static List<WeakDataFile> refList = new ArrayList<WeakDataFile>();
- private final File file;
- private final RandomAccessFile raf;
- private static boolean hasCleanUpExecutor = false;
- static {
- CleanUpExecutorFactory executorFactory = CleanUpExecutorFactory.newInstance();
- if (executorFactory!=null) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Initializing clean up executor for MIMEPULL: {0}", executorFactory.getClass().getName());
- }
- Executor executor = executorFactory.getExecutor();
- executor.execute(new Runnable() {
- @Override
- public void run() {
- WeakDataFile weak;
- while (true) {
- try {
- weak = (WeakDataFile) refQueue.remove();
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Cleaning file = {0} from reference queue.", weak.file);
- }
- weak.close();
- } catch (InterruptedException e) {
- }
- }
- }
- });
- hasCleanUpExecutor = true;
- }
- }
-
- WeakDataFile(DataFile df, File file) {
- super(df, refQueue);
- refList.add(this);
- this.file = file;
- try {
- raf = new RandomAccessFile(file, "rw");
- } catch(IOException ioe) {
- throw new MIMEParsingException(ioe);
- }
- if (!hasCleanUpExecutor) {
- drainRefQueueBounded();
- }
- }
-
- synchronized void read(long pointer, byte[] buf, int offset, int length ) {
- try {
- raf.seek(pointer);
- raf.readFully(buf, offset, length);
- } catch(IOException ioe) {
- throw new MIMEParsingException(ioe);
- }
- }
-
- synchronized long writeTo(long pointer, byte[] data, int offset, int length) {
- try {
- raf.seek(pointer);
- raf.write(data, offset, length);
- return raf.getFilePointer(); // Update pointer for next write
- } catch(IOException ioe) {
- throw new MIMEParsingException(ioe);
- }
- }
-
- void close() {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Deleting file = {0}", file.getName());
- }
- refList.remove(this);
- try {
- raf.close();
- boolean deleted = file.delete();
- if (!deleted) {
- if (LOGGER.isLoggable(Level.INFO)) {
- LOGGER.log(Level.INFO, "File {0} was not deleted", file.getAbsolutePath());
- }
- }
- } catch(IOException ioe) {
- throw new MIMEParsingException(ioe);
- }
- }
-
- void renameTo(File f) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Moving file={0} to={1}", new Object[]{file, f});
- }
- refList.remove(this);
- try {
- raf.close();
- boolean renamed = file.renameTo(f);
- if (!renamed) {
- if (LOGGER.isLoggable(Level.INFO)) {
- LOGGER.log(Level.INFO, "File {0} was not moved to {1}", new Object[] {file.getAbsolutePath(), f.getAbsolutePath()});
- }
- }
- } catch(IOException ioe) {
- throw new MIMEParsingException(ioe);
- }
-
- }
-
- static void drainRefQueueBounded() {
- WeakDataFile weak;
- while (( weak = (WeakDataFile) refQueue.poll()) != null ) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Cleaning file = {0} from reference queue.", weak.file);
- }
- weak.close();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Data.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Data.java
deleted file mode 100644
index c7498408..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Data.java
+++ /dev/null
@@ -1,534 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.staxex;
-
-import javax.activation.DataHandler;
-import javax.activation.DataSource;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-// for testing method
-//import com.sun.xml.internal.stream.writers.XMLStreamWriterImpl;
-//import java.io.FileNotFoundException;
-//import java.io.FileWriter;
-//import javax.activation.FileDataSource;
-
-/**
- * Binary data represented as base64-encoded string
- * in XML.
- *
- * <p>
- * Used in conjunction with {@link XMLStreamReaderEx}
- * and {@link XMLStreamWriterEx}.
- *
- * @author Kohsuke Kawaguchi, Martin Grebac
- */
-public class Base64Data implements CharSequence, Cloneable {
-
- // either dataHandler or (data,dataLen,mimeType?) must be present
- // (note that having both is allowed)
-
- private DataHandler dataHandler;
- private byte[] data;
-
- /**
- * Length of the valid data in {@link #data}.
- */
- private int dataLen;
- /**
- * True if {@link #data} can be cloned by reference
- * if Base64Data instance is cloned.
- */
- private boolean dataCloneByRef;
- /**
- * Optional MIME type of {@link #data}.
- *
- * Unused when {@link #dataHandler} is set.
- * Use {@link DataHandler#getContentType()} in that case.
- */
- private String mimeType;
-
- /**
- * Default constructor
- */
- public Base64Data() {
- }
-
- private static final Logger logger = Logger.getLogger(Base64Data.class.getName());
-
- /**
- * Clone constructor
- * @param that needs to be cloned
- */
- public Base64Data(Base64Data that) {
- that.get();
- if (that.dataCloneByRef) {
- this.data = that.data;
- } else {
- this.data = new byte[that.dataLen];
- System.arraycopy(that.data, 0, this.data, 0, that.dataLen);
- }
-
- this.dataCloneByRef = true;
- this.dataLen = that.dataLen;
- this.dataHandler = null;
- this.mimeType = that.mimeType;
- }
-
- /**
- * Fills in the data object by a portion of the byte[].
- *
- * @param data actual data
- * @param len
- * data[0] to data[len-1] are treated as the data.
- * @param mimeType MIME type
- * @param cloneByRef
- * true if data[] can be cloned by reference
- */
- public void set(byte[] data, int len, String mimeType, boolean cloneByRef) {
- this.data = data;
- this.dataLen = len;
- this.dataCloneByRef = cloneByRef;
- this.dataHandler = null;
- this.mimeType = mimeType;
- }
-
- /**
- * Fills in the data object by a portion of the byte[].
- *
- * @param data actual data bytes
- * @param len
- * data[0] to data[len-1] are treated as the data.
- * @param mimeType MIME type
- */
- public void set(byte[] data, int len, String mimeType) {
- set(data,len,mimeType,false);
- }
-
- /**
- * Fills in the data object by the byte[] of the exact length.
- *
- * @param data
- * this buffer may be owned directly by the unmarshaleld JAXB object.
- * @param mimeType MIME type
- */
- public void set(byte[] data,String mimeType) {
- set(data,data.length,mimeType,false);
- }
-
- /**
- * Fills in the data object by a {@link DataHandler}.
- *
- * @param data DataHandler for the data
- */
- public void set(DataHandler data) {
- assert data!=null;
- this.dataHandler = data;
- this.data = null;
- }
-
- /**
- * Gets the raw data. If the returned DataHandler is {@link StreamingDataHandler},
- * callees may need to downcast to take advantage of its capabilities.
- *
- * @see StreamingDataHandler
- * @return DataHandler for the data
- */
- public DataHandler getDataHandler() {
- if(dataHandler==null){
- dataHandler = new Base64StreamingDataHandler(new Base64DataSource());
- } else if (!(dataHandler instanceof StreamingDataHandler)) {
- dataHandler = new FilterDataHandler(dataHandler);
- }
- return dataHandler;
- }
-
- private final class Base64DataSource implements DataSource {
- public String getContentType() {
- return getMimeType();
- }
-
- public InputStream getInputStream() {
- return new ByteArrayInputStream(data,0,dataLen);
- }
-
- public String getName() {
- return null;
- }
-
- public OutputStream getOutputStream() {
- throw new UnsupportedOperationException();
- }
-
- }
-
- private final class Base64StreamingDataHandler extends StreamingDataHandler {
-
- Base64StreamingDataHandler(DataSource source) {
- super(source);
- }
-
- public InputStream readOnce() throws IOException {
- return getDataSource().getInputStream();
- }
-
- public void moveTo(File dst) throws IOException {
- FileOutputStream fout = new FileOutputStream(dst);
- try {
- fout.write(data, 0, dataLen);
- } finally {
- fout.close();
- }
- }
-
- public void close() throws IOException {
- // nothing to do
- }
- }
-
- private static final class FilterDataHandler extends StreamingDataHandler {
-
- FilterDataHandler(DataHandler dh) {
- super(dh.getDataSource());
- }
-
- public InputStream readOnce() throws IOException {
- return getDataSource().getInputStream();
- }
-
- public void moveTo(File dst) throws IOException {
- byte[] buf = new byte[8192];
- InputStream in = null;
- OutputStream out = null;
- try {
- in = getDataSource().getInputStream();
- out = new FileOutputStream(dst);
- while (true) {
- int amountRead = in.read(buf);
- if (amountRead == -1) {
- break;
- }
- out.write(buf, 0, amountRead);
- }
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch(IOException ioe) {
- // nothing to do
- }
- }
- if (out != null) {
- try {
- out.close();
- } catch(IOException ioe) {
- // nothing to do
- }
- }
- }
- }
-
- public void close() throws IOException {
- // nothing to do
- }
- }
-
- /**
- * Gets the byte[] of the exact length.
- *
- * @return byte[] for data
- */
- public byte[] getExact() {
- get();
- if(dataLen!=data.length) {
- byte[] buf = new byte[dataLen];
- System.arraycopy(data,0,buf,0,dataLen);
- data = buf;
- }
- return data;
- }
-
- /**
- * Gets the data as an {@link InputStream}.
- *
- * @return data as InputStream
- * @throws IOException if i/o error occurs
- */
- public InputStream getInputStream() throws IOException {
- if(dataHandler!=null) {
- return dataHandler.getInputStream();
- } else {
- return new ByteArrayInputStream(data,0,dataLen);
- }
- }
-
- /**
- * Returns false if this object only has {@link DataHandler} and therefore
- * {@link #get()} operation is likely going to be expensive.
- *
- * @return false if it has only DataHandler
- */
- public boolean hasData() {
- return data!=null;
- }
-
- /**
- * Gets the raw data. The size of the byte array maybe larger than the actual length.
- *
- * @return data as byte[], the array may be larger
- */
- public byte[] get() {
- if(data==null) {
- try {
- ByteArrayOutputStreamEx baos = new ByteArrayOutputStreamEx(1024);
- InputStream is = dataHandler.getDataSource().getInputStream();
- baos.readFrom(is);
- is.close();
- data = baos.getBuffer();
- dataLen = baos.size();
- dataCloneByRef = true;
- } catch (IOException e) {
- // TODO: report the error to the unmarshaller
- dataLen = 0; // recover by assuming length-0 data
- }
- }
- return data;
- }
-
- /**
- * Gets the length of the binary data counted in bytes.
- *
- * Note that if this object encapsulates {@link DataHandler},
- * this method would have to read the whole thing into {@code byte[]}
- * just to count the length, because {@link DataHandler}
- * doesn't easily expose the length.
- *
- * @return no of bytes
- */
- public int getDataLen() {
- get();
- return dataLen;
- }
-
- public String getMimeType() {
- if (mimeType==null) {
- return "application/octet-stream";
- }
- return mimeType;
- }
-
- /**
- * Gets the number of characters needed to represent
- * this binary data in the base64 encoding.
- */
- public int length() {
- // for each 3 bytes you use 4 chars
- // if the remainder is 1 or 2 there will be 4 more
- get(); // fill in the buffer if necessary
- return ((dataLen+2)/3)*4;
- }
-
- /**
- * Encode this binary data in the base64 encoding
- * and returns the character at the specified position.
- */
- public char charAt(int index) {
- // we assume that the length() method is called before this method
- // (otherwise how would the caller know that the index is valid?)
- // so we assume that the byte[] is already populated
-
- int offset = index%4;
- int base = (index/4)*3;
-
- byte b1,b2;
-
- switch(offset) {
- case 0:
- return Base64Encoder.encode(data[base]>>2);
- case 1:
- if (base+1<dataLen) {
- b1 = data[base+1];
- } else {
- b1 = 0;
- }
- return Base64Encoder.encode(
- ((data[base]&0x3)<<4) |
- ((b1>>4)&0xF));
- case 2:
- if (base+1<dataLen) {
- b1 = data[base+1];
- if (base+2<dataLen) {
- b2 = data[base+2];
- } else {
- b2 = 0;
- }
-
- return Base64Encoder.encode(
- ((b1&0xF)<<2)|
- ((b2>>6)&0x3));
- } else {
- return '=';
- }
- case 3:
- if(base+2<dataLen) {
- return Base64Encoder.encode(data[base+2]&0x3F);
- } else {
- return '=';
- }
- }
-
- throw new IllegalStateException();
- }
-
- /**
- * Internally this is only used to split a text to a list,
- * which doesn't happen that much for base64.
- * So this method should be smaller than faster.
- */
- 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++ ) {
- buf.append(charAt(i));
- }
- return buf;
- }
-
- /**
- * Returns the base64 encoded string of this data.
- */
- @Override
- public String toString() {
- get(); // fill in the buffer
- return Base64Encoder.print(data, 0, dataLen);
- }
-
- public void writeTo(char[] buf, int start) {
- get();
- Base64Encoder.print(data, 0, dataLen, buf, start);
- }
-
- private static final int CHUNK_SIZE;
- static {
- int bufSize = 1024;
- try {
- String bufSizeStr = getProperty("com.sun.xml.internal.org.jvnet.staxex.Base64DataStreamWriteBufferSize");
- if (bufSizeStr != null) {
- bufSize = Integer.parseInt(bufSizeStr);
- }
- } catch (Exception e) {
- logger.log(Level.INFO, "Error reading com.sun.xml.internal.org.jvnet.staxex.Base64DataStreamWriteBufferSize property", e);
- }
- CHUNK_SIZE = bufSize;
- }
-
- public void writeTo(XMLStreamWriter output) throws IOException, XMLStreamException {
- if (data==null) {
- try {
- InputStream is = dataHandler.getDataSource().getInputStream();
- ByteArrayOutputStream outStream = new ByteArrayOutputStream(); // dev-null stream
- Base64EncoderStream encWriter = new Base64EncoderStream(output, outStream);
- int b;
- byte[] buffer = new byte[CHUNK_SIZE];
- while ((b = is.read(buffer)) != -1) {
- encWriter.write(buffer, 0, b);
- }
- outStream.close();
- encWriter.close();
- } catch (IOException e) {
- dataLen = 0; // recover by assuming length-0 data
- throw e;
- }
- } else {
- // the data is already in memory and not streamed
- String s = Base64Encoder.print(data, 0, dataLen);
- output.writeCharacters(s);
- }
- }
-
- @Override
- public Base64Data clone() {
- 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) {
- if (System.getSecurityManager() == null) {
- return System.getProperty(propName);
- } else {
- return (String) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return System.getProperty(propName);
- }
- });
- }
- }
-
-// public static void main(String[] args) throws FileNotFoundException, IOException, XMLStreamException {
-// Base64Data data = new Base64Data();
-//
-// File f = new File("/Users/snajper/work/builds/weblogic/wls1211_dev.zip");
-// FileDataSource fds = new FileDataSource(f);
-// DataHandler dh = new DataHandler(fds);
-// data.set(dh);
-//
-// FileWriter fw = new FileWriter(new File("/Users/snajper/Desktop/b.txt"));
-// XMLStreamWriterImpl wi = new XMLStreamWriterImpl(fw, null);
-//
-// data.writeTo(wi);
-// wi.flush();fw.flush();
-// //System.out.println("SW: " + sw.toString());
-//
-// }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Encoder.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Encoder.java
deleted file mode 100644
index 442d9ffa..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Encoder.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.staxex;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-class Base64Encoder {
- private static final char[] encodeMap = initEncodeMap();
-
- private static char[] initEncodeMap() {
- char[] map = new char[64];
- int i;
- for( i= 0; i<26; i++ ) map[i] = (char)('A'+i);
- for( i=26; i<52; i++ ) map[i] = (char)('a'+(i-26));
- for( i=52; i<62; i++ ) map[i] = (char)('0'+(i-52));
- map[62] = '+';
- map[63] = '/';
-
- return map;
- }
-
- public static char encode( int i ) {
- return encodeMap[i&0x3F];
- }
-
- public static byte encodeByte( int i ) {
- return (byte)encodeMap[i&0x3F];
- }
-
- public static String print(byte[] input, int offset, int len) {
- char[] buf = new char[((len+2)/3)*4];
- int ptr = print(input,offset,len,buf,0);
- assert ptr==buf.length;
- return new String(buf);
- }
-
- /**
- * Encodes a byte array into a char array by doing base64 encoding.
- *
- * The caller must supply a big enough buffer.
- *
- * @return
- * the value of {@code ptr+((len+2)/3)*4}, which is the new offset
- * in the output buffer where the further bytes should be placed.
- */
- public static int print(byte[] input, int offset, int len, char[] buf, int ptr) {
- for( int i=offset; i<len; i+=3 ) {
- switch( len-i ) {
- case 1:
- buf[ptr++] = encode(input[i]>>2);
- buf[ptr++] = encode(((input[i])&0x3)<<4);
- buf[ptr++] = '=';
- buf[ptr++] = '=';
- break;
- case 2:
- buf[ptr++] = encode(input[i]>>2);
- buf[ptr++] = encode(
- ((input[i]&0x3)<<4) |
- ((input[i+1]>>4)&0xF));
- buf[ptr++] = encode((input[i+1]&0xF)<<2);
- buf[ptr++] = '=';
- break;
- default:
- buf[ptr++] = encode(input[i]>>2);
- buf[ptr++] = encode(
- ((input[i]&0x3)<<4) |
- ((input[i+1]>>4)&0xF));
- buf[ptr++] = encode(
- ((input[i+1]&0xF)<<2)|
- ((input[i+2]>>6)&0x3));
- buf[ptr++] = encode(input[i+2]&0x3F);
- break;
- }
- }
- return ptr;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64EncoderStream.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64EncoderStream.java
deleted file mode 100644
index 29da2649..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64EncoderStream.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.staxex;
-
-import java.io.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-// for testing method
-//import com.sun.xml.internal.stream.writers.XMLStreamWriterImpl;
-
-/**
- * This class implements a BASE64 Encoder. It is implemented as
- * a FilterOutputStream, so one can just wrap this class around
- * any output stream and write bytes into this filter. The Encoding
- * is done as the bytes are written out.
- *
- * @author John Mani
- * @author Bill Shannon
- * @author Martin Grebac
- */
-
-public class Base64EncoderStream extends FilterOutputStream {
- private byte[] buffer; // cache of bytes that are yet to be encoded
- private int bufsize = 0; // size of the cache
-
- private XMLStreamWriter outWriter;
-
- public Base64EncoderStream(OutputStream out) {
- super(out);
- buffer = new byte[3];
- }
-
- /**
- * Create a BASE64 encoder that encodes the specified input stream
- */
- public Base64EncoderStream(XMLStreamWriter outWriter, OutputStream out) {
- super(out);
- buffer = new byte[3];
- this.outWriter = outWriter;
- }
-
- /**
- * Encodes <code>len</code> bytes from the specified
- * <code>byte</code> array starting at offset <code>off</code> to
- * this output stream.
- *
- * @param b the data.
- * @param off the start offset in the data.
- * @param len the number of bytes to write.
- * @exception IOException if an I/O error occurs.
- */
- @Override
- public void write(byte[] b, int off, int len) throws IOException {
- for (int i = 0; i < len; i++)
- write(b[off + i]);
- }
-
- /**
- * Encodes <code>b.length</code> bytes to this output stream.
- * @param b the data to be written.
- * @exception IOException if an I/O error occurs.
- */
- @Override
- public void write(byte[] b) throws IOException {
- write(b, 0, b.length);
- }
-
- /**
- * Encodes the specified <code>byte</code> to this output stream.
- * @param c the <code>byte</code>.
- * @exception IOException if an I/O error occurs.
- */
- @Override
- public void write(int c) throws IOException {
- buffer[bufsize++] = (byte)c;
- if (bufsize == 3) { // Encoding unit = 3 bytes
- encode();
- bufsize = 0;
- }
- }
-
- /**
- * Flushes this output stream and forces any buffered output bytes
- * to be encoded out to the stream.
- * @exception IOException if an I/O error occurs.
- */
- @Override
- public void flush() throws IOException {
- if (bufsize > 0) { // If there's unencoded characters in the buffer ..
- encode(); // .. encode them
- bufsize = 0;
- }
- out.flush();
- try {
- outWriter.flush();
- } catch (XMLStreamException ex) {
- Logger.getLogger(Base64EncoderStream.class.getName()).log(Level.SEVERE, null, ex);
- throw new IOException(ex);
- }
- }
-
- /**
- * Forces any buffered output bytes to be encoded out to the stream
- * and closes this output stream
- */
- @Override
- public void close() throws IOException {
- flush();
- out.close();
- }
-
- /** This array maps the characters to their 6 bit values */
- private final static char pem_array[] = {
- 'A','B','C','D','E','F','G','H', // 0
- 'I','J','K','L','M','N','O','P', // 1
- 'Q','R','S','T','U','V','W','X', // 2
- 'Y','Z','a','b','c','d','e','f', // 3
- 'g','h','i','j','k','l','m','n', // 4
- 'o','p','q','r','s','t','u','v', // 5
- 'w','x','y','z','0','1','2','3', // 6
- '4','5','6','7','8','9','+','/' // 7
- };
-
- private void encode() throws IOException {
- byte a, b, c;
- char[] buf = new char[4];
- if (bufsize == 1) {
- a = buffer[0];
- b = 0;
- c = 0;
- buf[0] = pem_array[(a >>> 2) & 0x3F];
- buf[1] = pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)];
- buf[2] = '='; // pad character
- buf[3] = '='; // pad character
- } else if (bufsize == 2) {
- a = buffer[0];
- b = buffer[1];
- c = 0;
- buf[0] = pem_array[(a >>> 2) & 0x3F];
- buf[1] = pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)];
- buf[2] = pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)];
- buf[3] = '='; // pad character
- } else {
- a = buffer[0];
- b = buffer[1];
- c = buffer[2];
- buf[0] = pem_array[(a >>> 2) & 0x3F];
- buf[1] = pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)];
- buf[2] = pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)];
- buf[3] = pem_array[c & 0x3F];
- }
- try {
- outWriter.writeCharacters(buf, 0, 4);
- } catch (XMLStreamException ex) {
- Logger.getLogger(Base64EncoderStream.class.getName()).log(Level.SEVERE, null, ex);
- throw new IOException(ex);
- }
- }
-
-// public static void main(String argv[]) throws Exception {
-// FileInputStream infile = new FileInputStream(new File(argv[0]));
-// StringWriter sw = new StringWriter();
-// XMLStreamWriterImpl wi = new XMLStreamWriterImpl(sw, null);
-// ByteArrayOutputStream baos = new ByteArrayOutputStream();
-// Base64EncoderStream encoder = new Base64EncoderStream(wi, baos);
-// int c;
-//
-// while ((c = infile.read()) != -1)
-// encoder.write(c);
-// encoder.close();
-//
-// System.out.println("SW: " + sw.toString());
-// System.out.println("BAOS: " + baos.toString());
-//
-// }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/ByteArrayOutputStreamEx.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/ByteArrayOutputStreamEx.java
deleted file mode 100644
index ed060632..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/ByteArrayOutputStreamEx.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.staxex;
-
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * {@link ByteArrayOutputStream} with access to its raw buffer.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ByteArrayOutputStreamEx extends ByteArrayOutputStream {
- public ByteArrayOutputStreamEx() {
- }
-
- public ByteArrayOutputStreamEx(int size) {
- super(size);
- }
-
- public void set(Base64Data dt,String mimeType) {
- dt.set(buf,count,mimeType);
- }
-
- public byte[] getBuffer() {
- return buf;
- }
-
- /**
- * Reads the given {@link InputStream} completely into the buffer.
- */
- public void readFrom(InputStream is) throws IOException {
- while(true) {
- if(count==buf.length) {
- // realllocate
- byte[] data = new byte[buf.length*2];
- System.arraycopy(buf,0,data,0,buf.length);
- buf = data;
- }
-
- int sz = is.read(buf,count,buf.length-count);
- if(sz<0) return;
- count += sz;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/NamespaceContextEx.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/NamespaceContextEx.java
deleted file mode 100644
index aafeb5c0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/NamespaceContextEx.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.staxex;
-
-import javax.xml.namespace.NamespaceContext;
-import java.util.Iterator;
-
-/**
- * Extended {@link NamespaceContext}.
- *
- * @author Kohsuke Kawaguchi
- * @author Paul Sandoz
- */
-public interface NamespaceContextEx extends NamespaceContext, Iterable<NamespaceContextEx.Binding> {
-
- /**
- * Iterates all the in-scope namespace bindings.
- *
- * <p>
- * This method enumerates all the active in-scope namespace bindings.
- * This does not include implicit bindings, such as
- * <tt>"xml"->"http://www.w3.org/XML/1998/namespace"</tt>
- * or <tt>""->""</tt> (the implicit default namespace URI.)
- *
- * <p>
- * The returned iterator may not include the same prefix more than once.
- * For example, the returned iterator may only contain <tt>f=ns2</tt>
- * if the document is as follows and this method is used at the bar element.
- *
- * <pre><xmp>
- * <foo xmlns:f='ns1'>
- * <bar xmlns:f='ns2'>
- * ...
- * </xmp></pre>
- *
- * <p>
- * The iteration may be done in no particular order.
- *
- * @return
- * may return an empty iterator, but never null.
- */
- Iterator<Binding> iterator();
-
- /**
- * Prefix to namespace URI binding.
- */
- interface Binding {
- /**
- * Gets the prefix.
- *
- * <p>
- * The default namespace URI is represented by using an
- * empty string "", not null.
- *
- * @return
- * never null. String like "foo", "ns12", or "".
- */
- String getPrefix();
-
- /**
- * Gets the namespace URI.
- *
- * <p>
- * The empty namespace URI is represented by using
- * an empty string "", not null.
- *
- * @return
- * never null. String like "http://www.w3.org/XML/1998/namespace",
- * "urn:oasis:names:specification:docbook:dtd:xml:4.1.2", or "".
- */
- String getNamespaceURI();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/StreamingDataHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/StreamingDataHandler.java
deleted file mode 100644
index b8fb6df4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/StreamingDataHandler.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.staxex;
-
-import javax.activation.DataHandler;
-import javax.activation.DataSource;
-import java.io.BufferedInputStream;
-import java.io.Closeable;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-/**
- * {@link DataHandler} extended to offer better buffer management
- * in a streaming environment.
- *
- * <p>
- * {@link DataHandler} is used commonly as a data format across
- * multiple systems (such as JAXB/WS.) Unfortunately, {@link DataHandler}
- * has the semantics of "read as many times as you want", so this makes
- * it difficult for involving parties to handle a BLOB in a streaming fashion.
- *
- * <p>
- * {@link StreamingDataHandler} solves this problem by offering methods
- * that enable faster bulk "consume once" read operation.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class StreamingDataHandler extends DataHandler implements Closeable {
-
- public StreamingDataHandler(Object o, String s) {
- super(o, s);
- }
-
- public StreamingDataHandler(URL url) {
- super(url);
- }
-
- public StreamingDataHandler(DataSource dataSource) {
- super(dataSource);
- }
-
- /**
- * Works like {@link #getInputStream()} except that this method
- * can be invoked only once.
- *
- * <p>
- * This is used as a signal from the caller that there will
- * be no further {@link #getInputStream()} invocation nor
- * {@link #readOnce()} invocation on this object (which would
- * result in {@link IOException}.)
- *
- * <p>
- * When {@link DataHandler} is backed by a streaming BLOB
- * (such as an attachment in a web service read from the network),
- * this allows the callee to avoid unnecessary buffering.
- *
- * <p>
- * Note that it is legal to call {@link #getInputStream()}
- * multiple times and then call {@link #readOnce()} afterward.
- * Streams created such a way can be read in any order &mdash;
- * there's no requirement that streams created earlier must be read
- * first.
- *
- * @return
- * always non-null. Represents the content of this BLOB.
- * The returned stream is generally not buffered, so for
- * better performance read in a big batch or wrap this into
- * {@link BufferedInputStream}.
- * @throws IOException
- * if any i/o error
- */
- public abstract InputStream readOnce() throws IOException;
-
- /**
- * Obtains the BLOB into a specified file.
- *
- * <p>
- * Semantically, this method is roughly equivalent to the following
- * code, except that the actual implementation is likely to be a lot faster.
- *
- * <pre>
- * InputStream i = getInputStream();
- * OutputStream o = new FileOutputStream(dst);
- * int ch;
- * while((ch=i.read())!=-1) o.write(ch);
- * i.close();
- * o.close();
- * </pre>
- *
- * <p>
- * The main motivation behind this method is that often
- * {@link DataHandler} that reads data from a streaming source
- * will use a temporary file as a data store to hold data
- * (think of commons-fileupload.) In such case this method
- * can be as fast as calling {@link File#renameTo(File)}.
- *
- * <p>
- * This method shouldn't be called when there are any
- * open streams.
- *
- * <p>
- * After this method is invoked, {@link #readOnce()} and
- * {@link #getInputStream()} will simply open the destination
- * file you've specified as an argument. So if you further
- * move the file or delete this file, those methods will
- * behave in undefined fashion. For a simliar reason,
- * calling this method multiple times will cause
- * undefined behavior.
- */
- public abstract void moveTo(File dst) throws IOException;
-
- /**
- * Releases any resources associated with this DataHandler.
- * (such as an attachment in a web service read from a temp
- * file will be deleted.) After calling this method, it is
- * illegal to call any other methods.
- */
- public abstract void close() throws IOException;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamReaderEx.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamReaderEx.java
deleted file mode 100644
index 9cc79def..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamReaderEx.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.staxex;
-
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamException;
-
-/**
- * {@link XMLStreamReader} extended for reading binary data.
- *
- * <p>
- * Some producer of infoset (in particular, such as FastInfoset,
- * XOP decoder), uses a native format that enables efficient
- * treatment of binary data. For ordinary infoset consumer
- * (that just uses {@link XMLStreamReader}, those binary data
- * will just look like base64-encoded string, but this interface
- * allows consumers of such infoset to access this raw binary data.
- * Such infoset producer may choose to implement this additoinal
- * interface, to expose this functionality.
- *
- * <p>
- * Consumers that are capable of using this interface can query
- * {@link XMLStreamReader} if it supports this by simply downcasting
- * it to this interface like this:
- *
- * <pre>
- * XMLStreamReader reader = ...;
- * if( reader instanceof XMLStreamReaderEx ) {
- * // this reader supports binary data exchange
- * ...
- * } else {
- * // noop
- * ...
- * }
- * </pre>
- *
- * <p>
- * Also note that it is also allowed for the infoset producer
- * to implement this interface in such a way that {@link #getPCDATA()}
- * always delegate to {@link #getText()}, although it's not desirable.
- *
- * <p>
- * This interface is a private contract between such producers
- * and consumers to allow them to exchange binary data without
- * converting it to base64.
- *
- * @see XMLStreamWriterEx
- * @author Kohsuke Kawaguchi
- * @author Paul Sandoz
- */
-public interface XMLStreamReaderEx extends XMLStreamReader {
- ///**
- // * Works like {@link XMLStreamReader#getText()}
- // * but returns text as {@link DataSource}.
- // *
- // * <p>
- // * This method can be invoked whenever {@link XMLStreamReader#getText()}
- // * can be invoked. Invoking this method means the caller is assuming
- // * that the text is (conceptually) base64-encoded binary data.
- // *
- // * <p>
- // * This abstraction is necessary to treat XOP as infoset encoding.
- // * That is, you can either access the XOP-attached binary through
- // * {@link XMLStreamReader#getText()} (in which case you'll see the
- // * base64 encoded string), or you can access it as a binary data
- // * directly by using this method.
- // *
- // * <p>
- // * Note that even if you are reading from non XOP-aware {@link XMLStreamReader},
- // * this method must be still supported; if the reader is pointing
- // * to a text, this method is responsible for decoding base64 and
- // * producing a {@link DataHandler} with "application/octet-stream"
- // * as the content type.
- // *
- // * @return
- // * always non-null valid object.
- // * Invocations of this method may return the same object as long
- // * as the {@link XMLStreamReader#next()} method is not used,
- // * but otherwise {@link DataSource} object returned from this method
- // * is considered to be owned by the client, and therefore it shouldn't
- // * be reused by the implementation of this method.
- // *
- // * <p>
- // * The returned {@link DataSource} is read-only, and the caller
- // * must not invoke {@link DataSource#getOutputStream()}.
- // *
- // * @throws IllegalStateException
- // * if the parser is not pointing at characters infoset item.
- // * @throws XMLStreamException
- // * if the parser points to text but text is not base64-encoded text,
- // * or if some other parsing error occurs (such as if the &lt;xop:Include>
- // * points to a non-existing attachment.)
- // *
- // * <p>
- // * It is also OK for this method to return successfully, only to fail
- // * during an {@link InputStream} is read from {@link DataSource}.
- // */
- //DataSource getTextAsDataHandler() throws XMLStreamException;
-
- ///**
- // * Works like {@link XMLStreamReader#getText()}
- // * but returns text as {@link byte[]}.
- // *
- // * <p>
- // * The contract of this method is mostly the same as
- // * {@link #getTextAsDataHandler()}, except that this
- // * method returns the binary datas as an exact-size byte[].
- // *
- // * <p>
- // * This method is also not capable of reporting the content type
- // * of this binary data, even if it is available to the parser.
- // *
- // * @see #getTextAsDataHandler()
- // */
- //byte[] getTextAsByteArray() throws XMLStreamException;
-
- /**
- * Works like {@link #getText()}
- * but hides the actual data representation.
- *
- * @return
- * The {@link CharSequence} that represents the
- * character infoset items at the current position.
- *
- * <p>
- * The {@link CharSequence} is normally a {@link String},
- * but can be any other {@link CharSequence} implementation.
- * For binary data, however, use of {@link Base64Data} is
- * recommended (so that the consumer interested in seeing it
- * as binary data may take advantage of mor efficient
- * data representation.)
- *
- * <p>
- * The object returned from this method belongs to the parser,
- * and its content is guaranteed to be the same only until
- * the {@link #next()} method is invoked.
- *
- * @throws IllegalStateException
- * if the parser is not pointing at characters infoset item.
- *
- * TODO:
- * fix the dependency to JAXB internal class.
- */
- CharSequence getPCDATA() throws XMLStreamException;
-
- /**
- * {@inheritDoc}
- */
- NamespaceContextEx getNamespaceContext();
-
- /**
- * Works like {@link #getElementText()} but trims the leading
- * and trailing whitespace.
- *
- * <p>
- * The parser can often do this more efficiently than
- * {@code getElementText().trim()}.
- *
- * @see #getElementText()
- */
- String getElementTextTrim() throws XMLStreamException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamWriterEx.java b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamWriterEx.java
deleted file mode 100644
index 40d9d19b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamWriterEx.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.org.jvnet.staxex;
-
-import javax.activation.DataHandler;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import java.io.OutputStream;
-
-/**
- * {@link XMLStreamWriter} extended to support XOP.
- *
- * <p>
- * Some infoset serializer (such as XOP encoder, FastInfoset) uses a format
- * that can represent binary data more efficiently than base64 encoding.
- * Such infoset serializer may choose to implement this interface, to allow
- * the caller to pass in binary data more efficiently without first converting
- * it to binary data.
- *
- * <p>
- * Callers capable of using this interface can see if the serializer supports
- * it by simply downcasting {@link XMLStreamWriter} to {@link XMLStreamWriterEx}.
- *
- * <h2>TODO</h2>
- * <ol>
- * <li>
- * Add methods to write other primitive types, such as hex and integers
- * (and arrays of).
- * A textual implementation would write characters in accordance
- * to the canonical lexical definitions specified in W3C XML Schema: datatypes.
- * A MTOM implementation would write characters except for the case where octets
- * that would otherwise be base64 encoded when using the textual implementation.
- * A Fast Infoset implementation would encoded binary data the primitive types in
- * binary form.
- * <li>
- * Consider renaming writeBinary to writeBytesAsBase64 to be consistent with
- * infoset abstraction.
- * <li>
- * Add the ability to writeStart and writeEnd on attributes so that the same
- * methods for writing primitive types (and characters, which will require new methods)
- * can be used for writing attribute values as well as element content.
- * </ol>
- *
- * @see XMLStreamReaderEx
- * @author Kohsuke Kawaguchi
- * @author Paul Sandoz
- */
-public interface XMLStreamWriterEx extends XMLStreamWriter {
-
- /**
- * Write the binary data.
- *
- * <p>
- * Conceptually (infoset-wise), this produces the base64-encoded binary data on the
- * output. But this allows implementations like FastInfoset or XOP to do the smart
- * thing.
- *
- * <p>
- * The use of this method has some restriction to support XOP. Namely, this method
- * must be invoked as a sole content of an element.
- *
- * <p>
- * (data,start,len) triplet identifies the binary data to be written.
- * After the method invocation, the callee owns the buffer.
- *
- * @param contentType
- * this mandatory parameter identifies the MIME type of the binary data.
- * If the MIME type isn't known by the caller, "application/octet-stream" can
- * be always used to indicate "I don't know." Never null.
- */
- void writeBinary(byte[] data, int start, int len, String contentType) throws XMLStreamException;
-
- /**
- * Writes the binary data.
- *
- * <p>
- * This method works like the {@link #writeBinary(byte[], int, int, String)} method,
- * except that it takes the binary data in the form of {@link DataHandler}, which
- * contains a MIME type ({@link DataHandler#getContentType()} as well as the payload
- * {@link DataHandler#getInputStream()}.
- *
- * @param data
- * always non-null. After this method call, the callee owns the data handler.
- */
- void writeBinary(DataHandler data) throws XMLStreamException;
-
- /**
- * Writes the binary data.
- *
- * <p>
- * This version of the writeBinary method allows the caller to produce
- * the binary data by writing it to {@link OutputStream}.
- *
- * <p>
- * It is the caller's responsibility to write and close
- * a stream before it invokes any other methods on {@link XMLStreamWriter}.
- *
- * TODO: experimental. appreciate feedback
- * @param contentType
- * See the content-type parameter of
- * {@link #writeBinary(byte[], int, int, String)}. Must not be null.
- *
- * @return
- * always return a non-null {@link OutputStream}.
- */
- OutputStream writeBinary(String contentType) throws XMLStreamException;
-
- /**
- * Writes like {@link #writeCharacters(String)} but hides
- * actual data format.
- *
- * @param data
- * The {@link CharSequence} that represents the
- * character infoset items to be written.
- *
- * <p>
- * The {@link CharSequence} is normally a {@link String},
- * but can be any other {@link CharSequence} implementation.
- * For binary data, however, use of {@link Base64Data} is
- * recommended (so that the consumer interested in seeing it
- * as binary data may take advantage of mor efficient
- * data representation.)
- *
- */
- void writePCDATA(CharSequence data) throws XMLStreamException;
-
- /**
- * {@inheritDoc}
- */
- NamespaceContextEx getNamespaceContext();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Annotations.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Annotations.java
deleted file mode 100644
index 7ac7a9af..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Annotations.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.builder;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-
-
-/**
- * Includes attributes and child elements before any RELAX NG element.
- */
-public interface Annotations<
- E extends ParsedElementAnnotation,
- L extends Location,
- CL extends CommentList<L>> {
-
- /**
- * Called for an attribute annotation.
- */
- void addAttribute(String ns, String localName, String prefix, String value, L loc) throws BuildException;
-
- /**
- * Called for a child element annotation.
- */
- void addElement(E ea) throws BuildException;
-
- /**
- * Adds comments following the last initial child element annotation.
- */
- void addComment(CL comments) throws BuildException;
-
- void addLeadingComment(CL comments) throws BuildException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/BuildException.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/BuildException.java
deleted file mode 100644
index d818d346..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/BuildException.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.builder;
-
-/**
- * Signals an error while building schemas.
- *
- * <p>
- * Only {@link SchemaBuilder} can throw this exception to
- * abort the parsing in the middle.
- */
-public class BuildException extends RuntimeException {
- private final Throwable cause;
- public BuildException(Throwable cause) {
- if (cause == null)
- throw new NullPointerException("null cause");
- this.cause = cause;
- }
-
- public Throwable getCause() {
- return cause;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/CommentList.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/CommentList.java
deleted file mode 100644
index 0207a1a4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/CommentList.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.builder;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-
-
-public interface CommentList<L extends Location> {
- void addComment(String value, L loc) throws BuildException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/DataPatternBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/DataPatternBuilder.java
deleted file mode 100644
index 573d4609..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/DataPatternBuilder.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.builder;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.parse.*;
-
-
-public interface DataPatternBuilder<
- P extends ParsedPattern,
- E extends ParsedElementAnnotation,
- L extends Location,
- A extends Annotations<E,L,CL>,
- CL extends CommentList<L>> {
-
- void addParam(String name, String value, Context context, String ns, L loc, A anno) throws BuildException;
- void annotation(E ea);
- P makePattern(L loc, A anno) throws BuildException;
- P makePattern(P except, L loc, A anno) throws BuildException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Div.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Div.java
deleted file mode 100644
index 6c26ea28..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Div.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.builder;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-
-
-public interface Div<
- P extends ParsedPattern,
- E extends ParsedElementAnnotation,
- L extends Location,
- A extends Annotations<E,L,CL>,
- CL extends CommentList<L>> extends GrammarSection<P,E,L,A,CL> {
- void endDiv(L loc, A anno) throws BuildException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/ElementAnnotationBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/ElementAnnotationBuilder.java
deleted file mode 100644
index ed6b5181..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/ElementAnnotationBuilder.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.builder;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-
-/**
- * Used to build foreign element annotations.
- */
-public interface ElementAnnotationBuilder<
- P extends ParsedPattern,
- E extends ParsedElementAnnotation,
- L extends Location,
- A extends Annotations<E,L,CL>,
- CL extends CommentList<L>> extends Annotations<E,L,CL> {
-
- /**
- * Called when a child text is found.
- */
- void addText(String value, L loc, CL comments) throws BuildException;
-
- /**
- * Called at the end to build an application data structure.
- */
- E makeElementAnnotation() throws BuildException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Grammar.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Grammar.java
deleted file mode 100644
index 28fc8b82..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Grammar.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.builder;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-
-/**
- * {@link Scope} for &lt;grammar> element that serves as a container
- * of &lt;define>s.
- */
-public interface Grammar<
- P extends ParsedPattern,
- E extends ParsedElementAnnotation,
- L extends Location,
- A extends Annotations<E,L,CL>,
- CL extends CommentList<L>> extends GrammarSection<P,E,L,A,CL>, Scope<P,E,L,A,CL> {
- P endGrammar(L loc, A anno) throws BuildException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/GrammarSection.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/GrammarSection.java
deleted file mode 100644
index 9b6bd77e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/GrammarSection.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.builder;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-
-/**
- * The container that can have &lt;define> elements.
- * <p>
- * {@link Div}, {@link Grammar}, {@link Include}, or {@link IncludedGrammar}.
- */
-public interface GrammarSection<
- P extends ParsedPattern,
- E extends ParsedElementAnnotation,
- L extends Location,
- A extends Annotations<E,L,CL>,
- CL extends CommentList<L>> {
-
- static final class Combine {
- private final String name;
- private Combine(String name) {
- this.name = name;
- }
- final public String toString() {
- return name;
- }
- }
-
- static final Combine COMBINE_CHOICE = new Combine("choice");
- static final Combine COMBINE_INTERLEAVE = new Combine("interleave");
-
- // using \u0000 guarantees that the name will be never used as
- // a user-defined pattern name.
- static final String START = "\u0000#start\u0000";
-
- /**
- * Called when a pattern is defined.
- *
- * @param name
- * Name of the pattern. For the definition by a &lt;start/> element,
- * this parameter is the same as {@link #START}.
- * to test if it's a named pattern definition or the start pattern definition.
- * @param combine
- * null or {@link #COMBINE_CHOICE} or {@link #COMBINE_INTERLEAVE} depending
- * on the value of the combine attribute.
- * @param pattern
- * The pattern to be defined.
- */
- void define( String name, Combine combine, P pattern, L loc, A anno) throws BuildException;
-
- /**
- * Called when an annotation is found.
- */
- void topLevelAnnotation(E ea) throws BuildException;
-
- /**
- * Called when a comment is found.
- */
- void topLevelComment(CL comments) throws BuildException;
-
- /**
- * Called when &lt;div> is found.
- *
- * @return
- * the returned {@link Div} object will receive callbacks for structures
- * inside the &lt;div> element.
- */
- Div<P,E,L,A,CL> makeDiv();
-
- /**
- * Returns null if already in an include.
- */
- Include<P,E,L,A,CL> makeInclude();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Include.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Include.java
deleted file mode 100644
index bca8b9b3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Include.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.builder;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-
-public interface Include<
- P extends ParsedPattern,
- E extends ParsedElementAnnotation,
- L extends Location,
- A extends Annotations<E,L,CL>,
- CL extends CommentList<L>> extends GrammarSection<P,E,L,A,CL> {
- /**
- * @param current
- * The current document we are parsing.
- * This is the document that contains an include.
- */
- void endInclude(Parseable current, String uri, String ns,
- L loc, A anno) throws BuildException, IllegalSchemaException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/IncludedGrammar.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/IncludedGrammar.java
deleted file mode 100644
index 17d15046..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/IncludedGrammar.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.builder;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.parse.Parseable;
-
-/**
- * {@link Scope} for &lt;grammar> element of the &lt;include>d grammar.
- * <p>
- * This object builds &lt;define>s in the included grammar that
- * override the definitions in the original grammar.
- */
-public interface IncludedGrammar<
- P extends ParsedPattern,
- E extends ParsedElementAnnotation,
- L extends Location,
- A extends Annotations<E,L,CL>,
- CL extends CommentList<L>> extends GrammarSection<P,E,L,A,CL>, Scope<P,E,L,A,CL> {
-
- /**
- *
- * @return
- * technically, an included gramamr does not produce a pattern,
- * but this allows {@link Parseable#parseInclude(String, SchemaBuilder, IncludedGrammar, String)}
- * to return the result from {@link IncludedGrammar} nicely.
- *
- * <p>
- * The value returned from this method will be returned from the abovementioned method.
- */
- P endIncludedGrammar(L loc, A anno) throws BuildException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/NameClassBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/NameClassBuilder.java
deleted file mode 100644
index 64a9bf56..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/NameClassBuilder.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.builder;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedNameClass;
-
-import java.util.List;
-
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public interface NameClassBuilder<
- N extends ParsedNameClass,
- E extends ParsedElementAnnotation,
- L extends Location,
- A extends Annotations<E,L,CL>,
- CL extends CommentList<L> > {
-
- N annotate(N nc, A anno) throws BuildException;
- N annotateAfter(N nc, E e) throws BuildException;
- N commentAfter(N nc, CL comments) throws BuildException;
- N makeChoice(List<N> nameClasses, L loc, A anno);
-
-// should be handled by parser - KK
-// static final String INHERIT_NS = new String("#inherit");
-
-// similarly, xmlns:* attribute should be rejected by the parser -KK
-
- N makeName(String ns, String localName, String prefix, L loc, A anno);
- N makeNsName(String ns, L loc, A anno);
- /**
- * Caller must enforce constraints on except.
- */
- N makeNsName(String ns, N except, L loc, A anno);
- N makeAnyName(L loc, A anno);
- /**
- * Caller must enforce constraints on except.
- */
- N makeAnyName(N except, L loc, A anno);
-
- N makeErrorNameClass();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/SchemaBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/SchemaBuilder.java
deleted file mode 100644
index a9820f83..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/SchemaBuilder.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.builder;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedNameClass;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.parse.*;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-
-import java.util.List;
-
-// TODO: define combine error check should be done by the parser.
-public interface SchemaBuilder<
- N extends ParsedNameClass,
- P extends ParsedPattern,
- E extends ParsedElementAnnotation,
- L extends Location,
- A extends Annotations<E,L,CL>,
- CL extends CommentList<L>> {
-
- /**
- * Returns the {@link NameClassBuilder}, which is used to build name
- * classes for this {@link SchemaBuilder}. The
- * {@link com.sun.xml.internal.rngom.nc.NameClass}es that are built will then be
- * fed into this {@link SchemaBuilder}to further build RELAX NG patterns.
- *
- * @return always return a non-null valid object. This method can (and
- * probably should) always return the same object.
- */
- NameClassBuilder<N,E,L,A,CL> getNameClassBuilder() throws BuildException;
-
- P makeChoice(List<P> patterns, L loc, A anno) throws BuildException;
-
- P makeInterleave(List<P> patterns, L loc, A anno) throws BuildException;
-
- P makeGroup(List<P> patterns, L loc, A anno) throws BuildException;
-
- P makeOneOrMore(P p, L loc, A anno) throws BuildException;
-
- P makeZeroOrMore(P p, L loc, A anno) throws BuildException;
-
- P makeOptional(P p, L loc, A anno) throws BuildException;
-
- P makeList(P p, L loc, A anno) throws BuildException;
-
- P makeMixed(P p, L loc, A anno) throws BuildException;
-
- P makeEmpty(L loc, A anno);
-
- P makeNotAllowed(L loc, A anno);
-
- P makeText(L loc, A anno);
-
- P makeAttribute(N nc, P p, L loc, A anno) throws BuildException;
-
- P makeElement(N nc, P p, L loc, A anno) throws BuildException;
-
- DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, L loc) throws BuildException;
-
- P makeValue(String datatypeLibrary, String type, String value,
- Context c, String ns, L loc, A anno) throws BuildException;
-
- /**
- *
- * @param parent
- * The parent scope. null if there's no parent scope.
- * For example, if the complete document looks like the following:
- * <pre><xmp>
- * <grammar>
- * <start><element name="root"><empty/></element></start>
- * </grammar>
- * </xmp></pre>
- * Then when the outer-most {@link Grammar} is created, it will
- * receive the <tt>null</tt> parent.
- */
- Grammar<P,E,L,A,CL> makeGrammar(Scope<P,E,L,A,CL> parent);
-
- /**
- * Called when annotation is found right inside a pattern
- *
- * such as,
- *
- * <pre><xmp>
- * <element name="foo"> <!-- this becomes 'P' -->
- * <foreign:annotation /> <!-- this becomes 'A' -->
- * ...
- * </element>
- * </xmp></pre>
- */
- P annotate(P p, A anno) throws BuildException;
-
- /**
- * Called when element annotation is found after a pattern.
- *
- * such as,
- *
- * <pre><xmp>
- * <element name="foo">
- * <empty /> <!-- this becomes 'P' -->
- * <foreign:annotation /> <!-- this becomes 'E' -->
- * </element>
- * </xmp></pre>
- */
- P annotateAfter(P p, E e) throws BuildException;
-
- P commentAfter(P p, CL comments) throws BuildException;
-
- /**
- *
- * @param current
- * Current grammar that we are parsing. This is what contains
- * externalRef.
- * @param scope
- * The parent scope. null if there's no parent scope.
- * See {@link #makeGrammar(Scope)} for more details about
- * when this parameter can be null.
- */
- P makeExternalRef(Parseable current, String uri, String ns, Scope<P,E,L,A,CL> scope,
- L loc, A anno) throws BuildException, IllegalSchemaException;
-
- L makeLocation(String systemId, int lineNumber, int columnNumber);
-
- /**
- * Creates {@link Annotations} object to parse annotations on patterns.
- *
- * @return
- * must be non-null.
- */
- A makeAnnotations(CL comments, Context context);
-
- ElementAnnotationBuilder<P,E,L,A,CL> makeElementAnnotationBuilder(String ns,
- String localName, String prefix, L loc, CL comments,
- Context context);
-
- CL makeCommentList();
-
- P makeErrorPattern();
-
- /**
- * If this {@link SchemaBuilder}is interested in actually parsing
- * comments, this method returns true.
- * <p>
- * Returning false allows the schema parser to speed up the processing by
- * skiping comment-related handlings.
- */
- boolean usesComments();
-
- /**
- * Called after all the parsing is done.
- *
- * <p>
- * This hook typically allows as {@link SchemaBuilder} to expand
- * notAllowed (if it's following the simplification as in the spec.)
- */
- P expandPattern( P p ) throws BuildException, IllegalSchemaException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Scope.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Scope.java
deleted file mode 100644
index 1fad5201..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/builder/Scope.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.builder;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-
-public interface Scope<
- P extends ParsedPattern,
- E extends ParsedElementAnnotation,
- L extends Location,
- A extends Annotations<E,L,CL>,
- CL extends CommentList<L> > extends GrammarSection<P,E,L,A,CL> {
- P makeParentRef(String name, L loc, A anno) throws BuildException;
- P makeRef(String name, L loc, A anno) throws BuildException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/Location.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/Location.java
deleted file mode 100644
index 2cd8bd9e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/Location.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.om;
-
-public interface Location { }
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/ParsedElementAnnotation.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/ParsedElementAnnotation.java
deleted file mode 100644
index 08ae3b64..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/ParsedElementAnnotation.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.om;
-
-public interface ParsedElementAnnotation { }
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/ParsedNameClass.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/ParsedNameClass.java
deleted file mode 100644
index e6baa986..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/ParsedNameClass.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.om;
-
-public interface ParsedNameClass { }
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/ParsedPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/ParsedPattern.java
deleted file mode 100644
index 8fca2ab7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/om/ParsedPattern.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.om;
-
-public interface ParsedPattern { }
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/util/CheckingSchemaBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/util/CheckingSchemaBuilder.java
deleted file mode 100644
index 82177d43..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/util/CheckingSchemaBuilder.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.util;
-
-import com.sun.xml.internal.rngom.ast.builder.BuildException;
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.binary.SchemaBuilderImpl;
-import com.sun.xml.internal.rngom.binary.SchemaPatternBuilder;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.host.ParsedPatternHost;
-import com.sun.xml.internal.rngom.parse.host.SchemaBuilderHost;
-import org.relaxng.datatype.DatatypeLibraryFactory;
-import org.xml.sax.ErrorHandler;
-
-/**
- * Wraps a {@link SchemaBuilder} and does all the semantic checks
- * required by the RELAX NG spec.
- *
- * <h2>Usage</h2>
- * <p>
- * Whereas you normally write it as follows:
- * <pre>
- * YourParsedPattern r = (YourParsedPattern)parseable.parse(sb);
- * </pre>
- * write this as follows:
- * <pre>
- * YourParsedPattern r = (YourParsedPattern)parseable.parse(new CheckingSchemaBuilder(sb,eh));
- * </pre>
- *
- * <p>
- * The checking is done by using the <tt>rngom.binary</tt> package, so if you are using
- * that package for parsing schemas, then there's no need to use this.
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class CheckingSchemaBuilder extends SchemaBuilderHost {
- /**
- *
- * @param sb
- * Your {@link SchemaBuilder} that parses RELAX NG schemas.
- * @param eh
- * All the errors found will be sent to this handler.
- */
- public CheckingSchemaBuilder( SchemaBuilder sb, ErrorHandler eh ) {
- super(new SchemaBuilderImpl(eh),sb);
- }
- public CheckingSchemaBuilder( SchemaBuilder sb, ErrorHandler eh, DatatypeLibraryFactory dlf ) {
- super(new SchemaBuilderImpl(eh,dlf,new SchemaPatternBuilder()),sb);
- }
-
- public ParsedPattern expandPattern(ParsedPattern p)
- throws BuildException, IllegalSchemaException {
-
- // just return the result from the user-given SchemaBuilder
- ParsedPatternHost r = (ParsedPatternHost)super.expandPattern(p);
- return r.rhs;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/util/LocatorImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/util/LocatorImpl.java
deleted file mode 100644
index d7c40089..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/util/LocatorImpl.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.ast.util;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-import org.xml.sax.Locator;
-
-/**
- * {@link Locator} implementation with {@link Location} marker.
- */
-public class LocatorImpl implements Locator, Location {
- private final String systemId;
- private final int lineNumber;
- private final int columnNumber;
-
- public LocatorImpl(String systemId, int lineNumber, int columnNumber) {
- this.systemId = systemId;
- this.lineNumber = lineNumber;
- this.columnNumber = columnNumber;
- }
-
- public String getPublicId() {
- return null;
- }
-
- public String getSystemId() {
- return systemId;
- }
-
- public int getLineNumber() {
- return lineNumber;
- }
-
- public int getColumnNumber() {
- return columnNumber;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/util/package.html b/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/util/package.html
deleted file mode 100644
index 29f1807b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/ast/util/package.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-<!--
- Copyright (C) 2004-2011
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
--->
-<html>
-<body>
-<p>Typical implementations of the ast.builder/ast.om packages.</p>
-<p>Those classes are solely intended to make the AST implementation easier.</p>
-</body>
-</html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/AfterPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/AfterPattern.java
deleted file mode 100644
index 0e4d1556..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/AfterPattern.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-
-
-public class AfterPattern extends BinaryPattern {
- AfterPattern(Pattern p1, Pattern p2) {
- super(false,
- combineHashCode(AFTER_HASH_CODE, p1.hashCode(), p2.hashCode()),
- p1,
- p2);
- }
-
- boolean isNotAllowed() {
- return p1.isNotAllowed();
- }
-
- public Object apply(PatternFunction f) {
- return f.caseAfter(this);
- }
- public void accept(PatternVisitor visitor) {
- visitor.visitAfter(p1,p2);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/Alphabet.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/Alphabet.java
deleted file mode 100644
index cbccbbae..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/Alphabet.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.nc.ChoiceNameClass;
-import com.sun.xml.internal.rngom.nc.NameClass;
-
-class Alphabet {
- private NameClass nameClass;
-
- boolean isEmpty() {
- return nameClass == null;
- }
-
- void addElement(NameClass nc) {
- if (nameClass == null)
- nameClass = nc;
- else if (nc != null)
- nameClass = new ChoiceNameClass(nameClass, nc);
- }
-
- void addAlphabet(Alphabet a) {
- addElement(a.nameClass);
- }
-
- void checkOverlap(Alphabet a) throws RestrictionViolationException {
- if (nameClass != null
- && a.nameClass != null
- && nameClass.hasOverlapWith(a.nameClass))
- throw new RestrictionViolationException("interleave_element_overlap");
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/AttributePattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/AttributePattern.java
deleted file mode 100644
index 128b667f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/AttributePattern.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import com.sun.xml.internal.rngom.nc.NameClass;
-import com.sun.xml.internal.rngom.nc.SimpleNameClass;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-public final class AttributePattern extends Pattern {
- private NameClass nameClass;
- private Pattern p;
- private Locator loc;
-
- AttributePattern(NameClass nameClass, Pattern value, Locator loc) {
- super(false,
- EMPTY_CONTENT_TYPE,
- combineHashCode(ATTRIBUTE_HASH_CODE,
- nameClass.hashCode(),
- value.hashCode()));
- this.nameClass = nameClass;
- this.p = value;
- this.loc = loc;
- }
-
- Pattern expand(SchemaPatternBuilder b) {
- Pattern ep = p.expand(b);
- if (ep != p)
- return b.makeAttribute(nameClass, ep, loc);
- else
- return this;
- }
-
- void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
- throws RestrictionViolationException {
- switch (context) {
- case START_CONTEXT:
- throw new RestrictionViolationException("start_contains_attribute");
- case ELEMENT_CONTEXT:
- if (nameClass.isOpen())
- throw new RestrictionViolationException("open_name_class_not_repeated");
- break;
- case ELEMENT_REPEAT_GROUP_CONTEXT:
- throw new RestrictionViolationException("one_or_more_contains_group_contains_attribute");
- case ELEMENT_REPEAT_INTERLEAVE_CONTEXT:
- throw new RestrictionViolationException("one_or_more_contains_interleave_contains_attribute");
- case LIST_CONTEXT:
- throw new RestrictionViolationException("list_contains_attribute");
- case ATTRIBUTE_CONTEXT:
- throw new RestrictionViolationException("attribute_contains_attribute");
- case DATA_EXCEPT_CONTEXT:
- throw new RestrictionViolationException("data_except_contains_attribute");
- }
- if (!dad.addAttribute(nameClass)) {
- if (nameClass instanceof SimpleNameClass)
- throw new RestrictionViolationException("duplicate_attribute_detail", ((SimpleNameClass)nameClass).name);
- else
- throw new RestrictionViolationException("duplicate_attribute");
- }
- try {
- p.checkRestrictions(ATTRIBUTE_CONTEXT, null, null);
- }
- catch (RestrictionViolationException e) {
- e.maybeSetLocator(loc);
- throw e;
- }
- }
-
- boolean samePattern(Pattern other) {
- if (!(other instanceof AttributePattern))
- return false;
- AttributePattern ap = (AttributePattern)other;
- return nameClass.equals(ap.nameClass)&& p == ap.p;
- }
-
- void checkRecursion(int depth) throws SAXException {
- p.checkRecursion(depth);
- }
-
- public void accept(PatternVisitor visitor) {
- visitor.visitAttribute(nameClass, p);
- }
-
- public Object apply(PatternFunction f) {
- return f.caseAttribute(this);
- }
-
- public Pattern getContent() {
- return p;
- }
-
- public NameClass getNameClass() {
- return nameClass;
- }
-
- public Locator getLocator() {
- return loc;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/BinaryPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/BinaryPattern.java
deleted file mode 100644
index 6b9b7841..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/BinaryPattern.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import org.xml.sax.SAXException;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.ArrayList;
-
-public abstract class BinaryPattern extends Pattern {
- protected final Pattern p1;
- protected final Pattern p2;
-
- BinaryPattern(boolean nullable, int hc, Pattern p1, Pattern p2) {
- super(nullable, Math.max(p1.getContentType(), p2.getContentType()), hc);
- this.p1 = p1;
- this.p2 = p2;
- }
-
- void checkRecursion(int depth) throws SAXException {
- p1.checkRecursion(depth);
- p2.checkRecursion(depth);
- }
-
- void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
- throws RestrictionViolationException {
- p1.checkRestrictions(context, dad, alpha);
- p2.checkRestrictions(context, dad, alpha);
- }
-
- boolean samePattern(Pattern other) {
- if (getClass() != other.getClass())
- return false;
- BinaryPattern b = (BinaryPattern)other;
- return p1 == b.p1 && p2 == b.p2;
- }
-
- public final Pattern getOperand1() {
- return p1;
- }
-
- public final Pattern getOperand2() {
- return p2;
- }
-
- /**
- * Adds all the children of this pattern to the given collection.
- *
- * <p>
- * For example, if this pattern is (A|B|C), it adds A, B, and C
- * to the collection, even though internally it's represented
- * as (A|(B|C)).
- */
- public final void fillChildren( Collection col ) {
- fillChildren(getClass(),p1,col);
- fillChildren(getClass(),p2,col);
- }
-
- /**
- * Same as {@link #fillChildren(Collection)} but returns an array.
- */
- public final Pattern[] getChildren() {
- List lst = new ArrayList();
- fillChildren(lst);
- return (Pattern[]) lst.toArray(new Pattern[lst.size()]);
- }
-
- private void fillChildren( Class c, Pattern p, Collection col ) {
- if(p.getClass()==c) {
- BinaryPattern bp = (BinaryPattern)p;
- bp.fillChildren(c,bp.p1,col);
- bp.fillChildren(c,bp.p2,col);
- } else {
- col.add(p);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ChoicePattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ChoicePattern.java
deleted file mode 100644
index 68982a92..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ChoicePattern.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-
-public class ChoicePattern extends BinaryPattern {
- ChoicePattern(Pattern p1, Pattern p2) {
- super(p1.isNullable() || p2.isNullable(),
- combineHashCode(CHOICE_HASH_CODE, p1.hashCode(), p2.hashCode()),
- p1,
- p2);
- }
- Pattern expand(SchemaPatternBuilder b) {
- Pattern ep1 = p1.expand(b);
- Pattern ep2 = p2.expand(b);
- if (ep1 != p1 || ep2 != p2)
- return b.makeChoice(ep1, ep2);
- else
- return this;
- }
-
- boolean containsChoice(Pattern p) {
- return p1.containsChoice(p) || p2.containsChoice(p);
- }
-
- public void accept(PatternVisitor visitor) {
- visitor.visitChoice(p1, p2);
- }
-
- public Object apply(PatternFunction f) {
- return f.caseChoice(this);
- }
-
- void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
- throws RestrictionViolationException {
- if (dad != null)
- dad.startChoice();
- p1.checkRestrictions(context, dad, alpha);
- if (dad != null)
- dad.alternative();
- p2.checkRestrictions(context, dad, alpha);
- if (dad != null)
- dad.endChoice();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/DataExceptPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/DataExceptPattern.java
deleted file mode 100644
index 6a418b47..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/DataExceptPattern.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import org.relaxng.datatype.Datatype;
-import org.xml.sax.Locator;
-
-public class DataExceptPattern extends DataPattern {
- private Pattern except;
- private Locator loc;
-
- DataExceptPattern(Datatype dt, Pattern except, Locator loc) {
- super(dt);
- this.except = except;
- this.loc = loc;
- }
-
- boolean samePattern(Pattern other) {
- if (!super.samePattern(other))
- return false;
- return except.samePattern(((DataExceptPattern)other).except);
- }
-
- @Override
- public void accept(PatternVisitor visitor) {
- visitor.visitDataExcept(getDatatype(), except);
- }
-
- @Override
- public Object apply(PatternFunction f) {
- return f.caseDataExcept(this);
- }
-
- @Override
- void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
- throws RestrictionViolationException {
- super.checkRestrictions(context, dad, alpha);
- try {
- except.checkRestrictions(DATA_EXCEPT_CONTEXT, null, null);
- }
- catch (RestrictionViolationException e) {
- e.maybeSetLocator(loc);
- throw e;
- }
- }
-
- Pattern getExcept() {
- return except;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/DataPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/DataPattern.java
deleted file mode 100644
index 981ab4fd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/DataPattern.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import org.relaxng.datatype.Datatype;
-
-public class DataPattern extends StringPattern {
- private Datatype dt;
-
- DataPattern(Datatype dt) {
- super(combineHashCode(DATA_HASH_CODE, dt.hashCode()));
- this.dt = dt;
- }
-
- boolean samePattern(Pattern other) {
- if (other.getClass() != this.getClass())
- return false;
- return dt.equals(((DataPattern)other).dt);
- }
-
- public void accept(PatternVisitor visitor) {
- visitor.visitData(dt);
- }
-
- public Object apply(PatternFunction f) {
- return f.caseData(this);
- }
-
- Datatype getDatatype() {
- return dt;
- }
-
- boolean allowsAnyString() {
- return false;
-// return dt instanceof Datatype2 && ((Datatype2)dt).alwaysValid();
- }
-
- @Override
- void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
- throws RestrictionViolationException {
- switch (context) {
- case START_CONTEXT:
- throw new RestrictionViolationException("start_contains_data");
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/DuplicateAttributeDetector.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/DuplicateAttributeDetector.java
deleted file mode 100644
index 46c17a30..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/DuplicateAttributeDetector.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.sun.xml.internal.rngom.nc.NameClass;
-
-class DuplicateAttributeDetector {
- private List nameClasses = new ArrayList();
- private Alternative alternatives = null;
-
- private static class Alternative {
- private int startIndex;
- private int endIndex;
- private Alternative parent;
-
- private Alternative(int startIndex, Alternative parent) {
- this.startIndex = startIndex;
- this.endIndex = startIndex;
- this.parent = parent;
- }
- }
-
- boolean addAttribute(NameClass nc) {
- int lim = nameClasses.size();
- for (Alternative a = alternatives; a != null; a = a.parent) {
- for (int i = a.endIndex; i < lim; i++)
- if (nc.hasOverlapWith((NameClass) nameClasses.get(i)))
- return false;
- lim = a.startIndex;
- }
- for (int i = 0; i < lim; i++)
- if (nc.hasOverlapWith((NameClass) nameClasses.get(i)))
- return false;
- nameClasses.add(nc);
- return true;
- }
-
- void startChoice() {
- alternatives = new Alternative(nameClasses.size(), alternatives);
- }
-
- void alternative() {
- alternatives.endIndex = nameClasses.size();
- }
-
- void endChoice() {
- alternatives = alternatives.parent;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ElementPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ElementPattern.java
deleted file mode 100644
index 54a85354..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ElementPattern.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import com.sun.xml.internal.rngom.nc.NameClass;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-public final class ElementPattern extends Pattern {
- private Pattern p;
- private NameClass origNameClass;
- private NameClass nameClass;
- private boolean expanded = false;
- private boolean checkedRestrictions = false;
- private Locator loc;
-
- ElementPattern(NameClass nameClass, Pattern p, Locator loc) {
- super(false,
- ELEMENT_CONTENT_TYPE,
- combineHashCode(ELEMENT_HASH_CODE,
- nameClass.hashCode(),
- p.hashCode()));
- this.nameClass = nameClass;
- this.origNameClass = nameClass;
- this.p = p;
- this.loc = loc;
- }
-
- @Override
- void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
- throws RestrictionViolationException {
- if (alpha != null)
- alpha.addElement(origNameClass);
- if (checkedRestrictions)
- return;
- switch (context) {
- case DATA_EXCEPT_CONTEXT:
- throw new RestrictionViolationException("data_except_contains_element");
- case LIST_CONTEXT:
- throw new RestrictionViolationException("list_contains_element");
- case ATTRIBUTE_CONTEXT:
- throw new RestrictionViolationException("attribute_contains_element");
- }
- checkedRestrictions = true;
- try {
- p.checkRestrictions(ELEMENT_CONTEXT, new DuplicateAttributeDetector(), null);
- }
- catch (RestrictionViolationException e) {
- checkedRestrictions = false;
- e.maybeSetLocator(loc);
- throw e;
- }
- }
-
- @Override
- Pattern expand(SchemaPatternBuilder b) {
- if (!expanded) {
- expanded = true;
- p = p.expand(b);
- if (p.isNotAllowed())
- nameClass = NameClass.NULL;
- }
- return this;
- }
-
- boolean samePattern(Pattern other) {
- if (!(other instanceof ElementPattern))
- return false;
- ElementPattern ep = (ElementPattern)other;
- return nameClass.equals(ep.nameClass) && p == ep.p;
- }
-
- @Override
- void checkRecursion(int depth) throws SAXException {
- p.checkRecursion(depth + 1);
- }
-
- public void accept(PatternVisitor visitor) {
- visitor.visitElement(nameClass, p);
- }
-
- public Object apply(PatternFunction f) {
- return f.caseElement(this);
- }
-
- void setContent(Pattern p) {
- this.p = p;
- }
-
- public Pattern getContent() {
- return p;
- }
-
- public NameClass getNameClass() {
- return nameClass;
- }
-
- public Locator getLocator() {
- return loc;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/EmptyPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/EmptyPattern.java
deleted file mode 100644
index b159c168..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/EmptyPattern.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-
-public class EmptyPattern extends Pattern {
- EmptyPattern() {
- super(true, EMPTY_CONTENT_TYPE, EMPTY_HASH_CODE);
- }
- boolean samePattern(Pattern other) {
- return other instanceof EmptyPattern;
- }
- public void accept(PatternVisitor visitor) {
- visitor.visitEmpty();
- }
- public Object apply(PatternFunction f) {
- return f.caseEmpty(this);
- }
- @Override
- void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
- throws RestrictionViolationException {
- switch (context) {
- case DATA_EXCEPT_CONTEXT:
- throw new RestrictionViolationException("data_except_contains_empty");
- case START_CONTEXT:
- throw new RestrictionViolationException("start_contains_empty");
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ErrorPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ErrorPattern.java
deleted file mode 100644
index cbf9c55b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ErrorPattern.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-
-public class ErrorPattern extends Pattern {
- ErrorPattern() {
- super(false, EMPTY_CONTENT_TYPE, ERROR_HASH_CODE);
- }
- boolean samePattern(Pattern other) {
- return other instanceof ErrorPattern;
- }
- public void accept(PatternVisitor visitor) {
- visitor.visitError();
- }
- public Object apply(PatternFunction f) {
- return f.caseError(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/GroupPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/GroupPattern.java
deleted file mode 100644
index 545c32be..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/GroupPattern.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.*;
-
-public class GroupPattern extends BinaryPattern {
- GroupPattern(Pattern p1, Pattern p2) {
- super(p1.isNullable() && p2.isNullable(),
- combineHashCode(GROUP_HASH_CODE, p1.hashCode(), p2.hashCode()),
- p1,
- p2);
- }
-
- @Override
- Pattern expand(SchemaPatternBuilder b) {
- Pattern ep1 = p1.expand(b);
- Pattern ep2 = p2.expand(b);
- if (ep1 != p1 || ep2 != p2)
- return b.makeGroup(ep1, ep2);
- else
- return this;
- }
-
- @Override
- void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha) throws RestrictionViolationException {
- switch (context) {
- case START_CONTEXT:
- throw new RestrictionViolationException("start_contains_group");
- case DATA_EXCEPT_CONTEXT:
- throw new RestrictionViolationException("data_except_contains_group");
- }
- super.checkRestrictions(context == ELEMENT_REPEAT_CONTEXT
- ? ELEMENT_REPEAT_GROUP_CONTEXT
- : context,
- dad,
- alpha);
- if (context != LIST_CONTEXT
- && !contentTypeGroupable(p1.getContentType(), p2.getContentType()))
- throw new RestrictionViolationException("group_string");
- }
-
- public void accept(PatternVisitor visitor) {
- visitor.visitGroup(p1, p2);
- }
- public Object apply(PatternFunction f) {
- return f.caseGroup(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/InterleavePattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/InterleavePattern.java
deleted file mode 100644
index 3d40b41f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/InterleavePattern.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-
-public class InterleavePattern extends BinaryPattern {
- InterleavePattern(Pattern p1, Pattern p2) {
- super(p1.isNullable() && p2.isNullable(),
- combineHashCode(INTERLEAVE_HASH_CODE, p1.hashCode(), p2.hashCode()),
- p1,
- p2);
- }
- @Override
- Pattern expand(SchemaPatternBuilder b) {
- Pattern ep1 = p1.expand(b);
- Pattern ep2 = p2.expand(b);
- if (ep1 != p1 || ep2 != p2)
- return b.makeInterleave(ep1, ep2);
- else
- return this;
- }
- @Override
- void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
- throws RestrictionViolationException {
- switch (context) {
- case START_CONTEXT:
- throw new RestrictionViolationException("start_contains_interleave");
- case DATA_EXCEPT_CONTEXT:
- throw new RestrictionViolationException("data_except_contains_interleave");
- case LIST_CONTEXT:
- throw new RestrictionViolationException("list_contains_interleave");
- }
- if (context == ELEMENT_REPEAT_CONTEXT)
- context = ELEMENT_REPEAT_INTERLEAVE_CONTEXT;
- Alphabet a1;
- if (alpha != null && alpha.isEmpty())
- a1 = alpha;
- else
- a1 = new Alphabet();
- p1.checkRestrictions(context, dad, a1);
- if (a1.isEmpty())
- p2.checkRestrictions(context, dad, a1);
- else {
- Alphabet a2 = new Alphabet();
- p2.checkRestrictions(context, dad, a2);
- a1.checkOverlap(a2);
- if (alpha != null) {
- if (alpha != a1)
- alpha.addAlphabet(a1);
- alpha.addAlphabet(a2);
- }
- }
- if (context != LIST_CONTEXT
- && !contentTypeGroupable(p1.getContentType(), p2.getContentType()))
- throw new RestrictionViolationException("interleave_string");
- if (p1.getContentType() == MIXED_CONTENT_TYPE
- && p2.getContentType() == MIXED_CONTENT_TYPE)
- throw new RestrictionViolationException("interleave_text_overlap");
- }
-
- public void accept(PatternVisitor visitor) {
- visitor.visitInterleave(p1, p2);
- }
- public Object apply(PatternFunction f) {
- return f.caseInterleave(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ListPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ListPattern.java
deleted file mode 100644
index 21619ba4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ListPattern.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-public class ListPattern extends Pattern {
- Pattern p;
- Locator locator;
-
- ListPattern(Pattern p, Locator locator) {
- super(false,
- DATA_CONTENT_TYPE,
- combineHashCode(LIST_HASH_CODE, p.hashCode()));
- this.p = p;
- this.locator = locator;
- }
-
- @Override
- Pattern expand(SchemaPatternBuilder b) {
- Pattern ep = p.expand(b);
- if (ep != p)
- return b.makeList(ep, locator);
- else
- return this;
- }
-
- @Override
- void checkRecursion(int depth) throws SAXException {
- p.checkRecursion(depth);
- }
-
- boolean samePattern(Pattern other) {
- return (other instanceof ListPattern
- && p == ((ListPattern)other).p);
- }
-
- public void accept(PatternVisitor visitor) {
- visitor.visitList(p);
- }
-
- public Object apply(PatternFunction f) {
- return f.caseList(this);
- }
-
- @Override
- void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
- throws RestrictionViolationException {
- switch (context) {
- case DATA_EXCEPT_CONTEXT:
- throw new RestrictionViolationException("data_except_contains_list");
- case START_CONTEXT:
- throw new RestrictionViolationException("start_contains_list");
- case LIST_CONTEXT:
- throw new RestrictionViolationException("list_contains_list");
- }
- try {
- p.checkRestrictions(LIST_CONTEXT, dad, null);
- }
- catch (RestrictionViolationException e) {
- e.maybeSetLocator(locator);
- throw e;
- }
- }
-
- Pattern getOperand() {
- return p;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/Messages.properties
deleted file mode 100644
index c3ae8d4c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/Messages.properties
+++ /dev/null
@@ -1,148 +0,0 @@
-#
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Copyright (C) 2004-2011
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-#
-# Properties file specifying messages
-illegal_href_attribute=illegal \"href\" attribute
-ns_attribute_ignored=\"ns\" attribute ignored
-reference_to_undefined=reference to undefined pattern \"{0}\"
-missing_start_element=missing \"start\" element
-recursive_reference=bad recursive reference to pattern \"{0}\"
-recursive_include=recursive inclusion of URL \"{0}\"
-duplicate_define=multiple definitions of \"{0}\" without \"combine\" attribute
-duplicate_start=multiple definitions of start without \"combine\" attribute
-conflict_combine_define=conflicting values of \"combine\" attribute for definition of \"{0}\"
-conflict_combine_start=conflicting values of \"combine\" attribute for definition of start
-missing_start_replacement=\"start\" in \"include\" does not override anything
-missing_define_replacement=definition of \"{0}\" in \"include\" does not override anything
-interleave_string=interleave of \"string\" or \"data\" element
-group_string=group of \"string\" or \"data\" element
-one_or_more_string=repeat of \"string\" or \"data\" element
-unrecognized_datatype=datatype \"{1}\" from library \"{0}\" not recognized
-unsupported_datatype_detail=datatype \"{1}\" from library \"{0}\" not supported: {2}
-unrecognized_datatype_library=datatype library \"{0}\" not recognized
-unrecognized_builtin_datatype=no such builtin datatype \"{0}\": must be \"string\" or \"token\"
-invalid_value=\"{0}\" is not a valid value of the datatype
-parent_ref_outside_grammar=reference to non-existent parent grammar
-ref_outside_grammar=reference to non-existent grammar
-expected_one_name_class=found \"{0}\" element but expected no further content
-builtin_param=builtin datatypes do not have any parameters
-invalid_param_display=invalid parameter:\n{0}
-invalid_param_detail_display=invalid parameter: {0}:\n{1}
-display_param={0}>>>>{1}
-invalid_param_detail=invalid parameter: {0}
-invalid_param=invalid parameter
-invalid_params_detail=invalid parameters: {0}
-invalid_params=invalid parameters
-datatype_requires_parameter=datatype cannot be used without parameters
-datatype_requires_parameter_detail=datatype cannot be used without parameters: {0}
-
-attribute_contains_attribute=\"attribute\" contains \"attribute\"
-attribute_contains_element=\"attribute\" contains \"element\"
-data_except_contains_attribute=\"except\" in \"data\" contains \"attribute\"
-data_except_contains_element=\"except\" in \"data\" contains \"element\"
-data_except_contains_empty=\"except\" in \"data\" contains \"empty\"
-data_except_contains_group=\"except\" in \"data\" contains \"group\"
-data_except_contains_interleave=\"except\" in \"data\" contains \"interleave\"
-data_except_contains_list=\"except\" in \"data\" contains \"list\"
-data_except_contains_one_or_more=\"except\" in \"data\" contains \"oneOrMore\"
-data_except_contains_text=\"except\" in \"data\" contains \"text\"
-list_contains_attribute=\"list\" contains \"attribute\"
-list_contains_element=\"list\" contains \"element\"
-list_contains_list=\"list\" contains \"list\"
-list_contains_text=\"list\" contains \"text\"
-one_or_more_contains_group_contains_attribute=\"oneOrMore\" contains \"group\" contains \"attribute\"
-one_or_more_contains_interleave_contains_attribute=\"oneOrMore\" contains \"interleave\" contains \"attribute\"
-start_contains_attribute=\"start\" contains \"attribute\"
-start_contains_data=\"start\" contains \"data\"
-start_contains_empty=\"start\" contains \"empty\"
-start_contains_group=\"start\" contains \"group\"
-start_contains_interleave=\"start\" contains \"interleave\"
-start_contains_list=\"start\" contains \"list\"
-start_contains_one_or_more=\"start\" contains \"oneOrMore\"
-start_contains_text=\"start\" contains \"text\"
-start_contains_value=\"start\" contains \"value\"
-duplicate_attribute=duplicate attribute
-duplicate_attribute_detail=duplicate attribute {0}
-interleave_element_overlap=overlapping element names in operands of \"interleave\"
-list_contains_interleave=\"list\" contains \"interleave\"
-interleave_text_overlap=both operands of \"interleave\" contain \"text\"
-open_name_class_not_repeated=attribute using \"nsName\" or \"anyName\" must be in \"oneOrMore\"
-xmlns_uri_attribute=attribute must not have namespace URI \"http://www.w3.org/2000/xmlns\"
-xmlns_attribute=attribute must not be named \"xmlns\"
-
-# Validation errors
-unknown_element=unknown element {0}
-required_elements_missing=required elements missing
-out_of_context_element=element {0} not allowed in this context
-impossible_attribute_ignored=attribute {0} not allowed at this point; ignored
-bad_attribute_value=bad value for attribute {0}
-required_attributes_missing=required attributes missing
-unfinished_element=unfinished element
-text_not_allowed=text not allowed here
-document_incomplete=document incompletely matched
-string_not_allowed=bad character content for element
-only_text_not_allowed=element cannot have content that consists only of text
-schema_allows_nothing=schema does not allow anything: it is equivalent to <notAllowed/>
-
-# ID correctness errors
-id_element_name_class=an \"element\" pattern containing an \"attribute\" pattern with a non-null ID-type must have a name class that contains only \"choice\" and \"name\" elements
-id_attribute_name_class=an \"attribute\" pattern with a non-null ID-type must have a name class that is a single name
-id_parent=a \"data\" or \"value\" pattern with non-null ID-type must occur as the child of an \"attribute\" pattern
-id_type_conflict=conflicting ID-types for attribute {1} of element {0}
-
-# ID soundness errors
-id_no_tokens=value of attribute of type ID contained no tokens
-id_multiple_tokens=value of attribute of type ID contained multiple tokens
-idref_no_tokens=value of attribute of type IDREF contained no tokens
-idref_multiple_tokens=value of attribute of type IDREF contained multiple tokens
-idrefs_no_tokens=value of attribute of type IDREFS contained no tokens
-missing_id=IDREF \"{0}\" without matching ID
-duplicate_id=ID \"{0}\" has already been defined
-first_id=first occurrence of ID \"{0}\"
-
-# Fragments
-name_absent_namespace=\"{0}\"
-name_with_namespace=\"{1}\" from namespace \"{0}\"
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/NotAllowedPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/NotAllowedPattern.java
deleted file mode 100644
index ea7346d3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/NotAllowedPattern.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-
-public class NotAllowedPattern extends Pattern {
- NotAllowedPattern() {
- super(false, EMPTY_CONTENT_TYPE, NOT_ALLOWED_HASH_CODE);
- }
- @Override
- boolean isNotAllowed() {
- return true;
- }
- boolean samePattern(Pattern other) {
- // needs to work for UnexpandedNotAllowedPattern
- return other.getClass() == this.getClass();
- }
- public void accept(PatternVisitor visitor) {
- visitor.visitNotAllowed();
- }
- public Object apply(PatternFunction f) {
- return f.caseNotAllowed(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/OneOrMorePattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/OneOrMorePattern.java
deleted file mode 100644
index e70745f1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/OneOrMorePattern.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import org.xml.sax.SAXException;
-
-public class OneOrMorePattern extends Pattern {
- Pattern p;
-
- OneOrMorePattern(Pattern p) {
- super(p.isNullable(),
- p.getContentType(),
- combineHashCode(ONE_OR_MORE_HASH_CODE, p.hashCode()));
- this.p = p;
- }
-
- @Override
- Pattern expand(SchemaPatternBuilder b) {
- Pattern ep = p.expand(b);
- if (ep != p)
- return b.makeOneOrMore(ep);
- else
- return this;
- }
-
- @Override
- void checkRecursion(int depth) throws SAXException {
- p.checkRecursion(depth);
- }
-
- @Override
- void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
- throws RestrictionViolationException {
- switch (context) {
- case START_CONTEXT:
- throw new RestrictionViolationException("start_contains_one_or_more");
- case DATA_EXCEPT_CONTEXT:
- throw new RestrictionViolationException("data_except_contains_one_or_more");
- }
-
- p.checkRestrictions(context == ELEMENT_CONTEXT
- ? ELEMENT_REPEAT_CONTEXT
- : context,
- dad,
- alpha);
- if (context != LIST_CONTEXT
- && !contentTypeGroupable(p.getContentType(), p.getContentType()))
- throw new RestrictionViolationException("one_or_more_string");
- }
-
- boolean samePattern(Pattern other) {
- return (other instanceof OneOrMorePattern
- && p == ((OneOrMorePattern)other).p);
- }
-
- public void accept(PatternVisitor visitor) {
- visitor.visitOneOrMore(p);
- }
-
- public Object apply(PatternFunction f) {
- return f.caseOneOrMore(this);
- }
-
- Pattern getOperand() {
- return p;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/Pattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/Pattern.java
deleted file mode 100644
index 10b46d22..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/Pattern.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import org.xml.sax.SAXException;
-
-public abstract class Pattern implements ParsedPattern {
- private boolean nullable;
- private int hc;
- private int contentType;
-
- static final int TEXT_HASH_CODE = 1;
- static final int ERROR_HASH_CODE = 3;
- static final int EMPTY_HASH_CODE = 5;
- static final int NOT_ALLOWED_HASH_CODE = 7;
- static final int CHOICE_HASH_CODE = 11;
- static final int GROUP_HASH_CODE = 13;
- static final int INTERLEAVE_HASH_CODE = 17;
- static final int ONE_OR_MORE_HASH_CODE = 19;
- static final int ELEMENT_HASH_CODE = 23;
- static final int VALUE_HASH_CODE = 27;
- static final int ATTRIBUTE_HASH_CODE = 29;
- static final int DATA_HASH_CODE = 31;
- static final int LIST_HASH_CODE = 37;
- static final int AFTER_HASH_CODE = 41;
-
- static int combineHashCode(int hc1, int hc2, int hc3) {
- return hc1 * hc2 * hc3;
- }
-
- static int combineHashCode(int hc1, int hc2) {
- return hc1 * hc2;
- }
-
- static final int EMPTY_CONTENT_TYPE = 0;
- static final int ELEMENT_CONTENT_TYPE = 1;
- static final int MIXED_CONTENT_TYPE = 2;
- static final int DATA_CONTENT_TYPE = 3;
-
- Pattern(boolean nullable, int contentType, int hc) {
- this.nullable = nullable;
- this.contentType = contentType;
- this.hc = hc;
- }
-
- Pattern() {
- this.nullable = false;
- this.hc = hashCode();
- this.contentType = EMPTY_CONTENT_TYPE;
- }
-
- void checkRecursion(int depth) throws SAXException { }
-
- Pattern expand(SchemaPatternBuilder b) {
- return this;
- }
-
- /**
- * Returns true if the pattern is nullable.
- *
- * <p>
- * A pattern is nullable when it can match the empty sequence.
- */
- public final boolean isNullable() {
- return nullable;
- }
-
- boolean isNotAllowed() {
- return false;
- }
-
- static final int START_CONTEXT = 0;
- static final int ELEMENT_CONTEXT = 1;
- static final int ELEMENT_REPEAT_CONTEXT = 2;
- static final int ELEMENT_REPEAT_GROUP_CONTEXT = 3;
- static final int ELEMENT_REPEAT_INTERLEAVE_CONTEXT = 4;
- static final int ATTRIBUTE_CONTEXT = 5;
- static final int LIST_CONTEXT = 6;
- static final int DATA_EXCEPT_CONTEXT = 7;
-
- void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
- throws RestrictionViolationException {
- }
-
- // Know that other is not null
- abstract boolean samePattern(Pattern other);
-
- final int patternHashCode() {
- return hc;
- }
-
- final int getContentType() {
- return contentType;
- }
-
- boolean containsChoice(Pattern p) {
- return this == p;
- }
-
- public abstract void accept(PatternVisitor visitor);
- public abstract Object apply(PatternFunction f);
-
-// DPattern applyForPattern(PatternFunction f) {
-// return (DPattern)apply(f);
-// }
-
- static boolean contentTypeGroupable(int ct1, int ct2) {
- if (ct1 == EMPTY_CONTENT_TYPE || ct2 == EMPTY_CONTENT_TYPE)
- return true;
- if (ct1 == DATA_CONTENT_TYPE || ct2 == DATA_CONTENT_TYPE)
- return false;
- return true;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/PatternBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/PatternBuilder.java
deleted file mode 100644
index fa1ea348..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/PatternBuilder.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-public class PatternBuilder {
- private final EmptyPattern empty;
- protected final NotAllowedPattern notAllowed;
- protected final PatternInterner interner;
-
- public PatternBuilder() {
- empty = new EmptyPattern();
- notAllowed = new NotAllowedPattern();
- interner = new PatternInterner();
- }
-
- public PatternBuilder(PatternBuilder parent) {
- empty = parent.empty;
- notAllowed = parent.notAllowed;
- interner = new PatternInterner(parent.interner);
- }
-
- Pattern makeEmpty() {
- return empty;
- }
-
- Pattern makeNotAllowed() {
- return notAllowed;
- }
-
- Pattern makeGroup(Pattern p1, Pattern p2) {
- if (p1 == empty)
- return p2;
- if (p2 == empty)
- return p1;
- if (p1 == notAllowed || p2 == notAllowed)
- return notAllowed;
- if (false && p1 instanceof GroupPattern) {
- GroupPattern sp = (GroupPattern)p1;
- return makeGroup(sp.p1, makeGroup(sp.p2, p2));
- }
- Pattern p = new GroupPattern(p1, p2);
- return interner.intern(p);
- }
-
- Pattern makeInterleave(Pattern p1, Pattern p2) {
- if (p1 == empty)
- return p2;
- if (p2 == empty)
- return p1;
- if (p1 == notAllowed || p2 == notAllowed)
- return notAllowed;
- if (false && p1 instanceof InterleavePattern) {
- InterleavePattern ip = (InterleavePattern)p1;
- return makeInterleave(ip.p1, makeInterleave(ip.p2, p2));
- }
- if (false) {
- if (p2 instanceof InterleavePattern) {
- InterleavePattern ip = (InterleavePattern)p2;
- if (p1.hashCode() > ip.p1.hashCode())
- return makeInterleave(ip.p1, makeInterleave(p1, ip.p2));
- }
- else if (p1.hashCode() > p2.hashCode())
- return makeInterleave(p2, p1);
- }
- Pattern p = new InterleavePattern(p1, p2);
- return interner.intern(p);
- }
-
- Pattern makeChoice(Pattern p1, Pattern p2) {
- if (p1 == empty && p2.isNullable())
- return p2;
- if (p2 == empty && p1.isNullable())
- return p1;
- Pattern p = new ChoicePattern(p1, p2);
- return interner.intern(p);
- }
-
- Pattern makeOneOrMore(Pattern p) {
- if (p == empty
- || p == notAllowed
- || p instanceof OneOrMorePattern)
- return p;
- Pattern p1 = new OneOrMorePattern(p);
- return interner.intern(p1);
- }
-
- Pattern makeOptional(Pattern p) {
- return makeChoice(p, empty);
- }
-
- Pattern makeZeroOrMore(Pattern p) {
- return makeOptional(makeOneOrMore(p));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/PatternInterner.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/PatternInterner.java
deleted file mode 100644
index 3de6ebca..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/PatternInterner.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-final class PatternInterner {
- private static final int INIT_SIZE = 256;
- private static final float LOAD_FACTOR = 0.3f;
- private Pattern[] table;
- private int used;
- private int usedLimit;
-
- PatternInterner() {
- table = null;
- used = 0;
- usedLimit = 0;
- }
-
- PatternInterner(PatternInterner parent) {
- table = parent.table;
- if (table != null)
- table = (Pattern[]) table.clone();
- used = parent.used;
- usedLimit = parent.usedLimit;
- }
-
- @SuppressWarnings("empty-statement")
- Pattern intern(Pattern p) {
- int h;
-
- if (table == null) {
- table = new Pattern[INIT_SIZE];
- usedLimit = (int) (INIT_SIZE * LOAD_FACTOR);
- h = firstIndex(p);
- } else {
- for (h = firstIndex(p); table[h] != null; h = nextIndex(h)) {
- if (p.samePattern(table[h]))
- return table[h];
- }
- }
- if (used >= usedLimit) {
- // rehash
- Pattern[] oldTable = table;
- table = new Pattern[table.length << 1];
- for (int i = oldTable.length; i > 0;) {
- --i;
- if (oldTable[i] != null) {
- int j;
- for (j = firstIndex(oldTable[i]);
- table[j] != null;
- j = nextIndex(j));
- table[j] = oldTable[i];
- }
- }
- for (h = firstIndex(p); table[h] != null; h = nextIndex(h));
- usedLimit = (int) (table.length * LOAD_FACTOR);
- }
- used++;
- table[h] = p;
- return p;
- }
-
- private int firstIndex(Pattern p) {
- return p.patternHashCode() & (table.length - 1);
- }
-
- private int nextIndex(int i) {
- return i == 0 ? table.length - 1 : i - 1;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/RefPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/RefPattern.java
deleted file mode 100644
index 789f9ddf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/RefPattern.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-public class RefPattern extends Pattern {
- private Pattern p;
- private Locator refLoc;
- private String name;
- private int checkRecursionDepth = -1;
- private boolean combineImplicit = false;
- private byte combineType = COMBINE_NONE;
- private byte replacementStatus = REPLACEMENT_KEEP;
- private boolean expanded = false;
-
- static final byte REPLACEMENT_KEEP = 0;
- static final byte REPLACEMENT_REQUIRE = 1;
- static final byte REPLACEMENT_IGNORE = 2;
-
- static final byte COMBINE_NONE = 0;
- static final byte COMBINE_CHOICE = 1;
- static final byte COMBINE_INTERLEAVE = 2;
-
- RefPattern(String name) {
- this.name = name;
- }
-
- Pattern getPattern() {
- return p;
- }
-
- void setPattern(Pattern p) {
- this.p = p;
- }
-
- Locator getRefLocator() {
- return refLoc;
- }
-
- void setRefLocator(Locator loc) {
- this.refLoc = loc;
- }
-
- @Override
- void checkRecursion(int depth) throws SAXException {
- if (checkRecursionDepth == -1) {
- checkRecursionDepth = depth;
- p.checkRecursion(depth);
- checkRecursionDepth = -2;
- }
- else if (depth == checkRecursionDepth)
- // XXX try to recover from this?
- throw new SAXParseException(SchemaBuilderImpl.localizer.message("recursive_reference", name),
- refLoc);
- }
-
- @Override
- Pattern expand(SchemaPatternBuilder b) {
- if (!expanded) {
- p = p.expand(b);
- expanded = true;
- }
- return p;
- }
-
- boolean samePattern(Pattern other) {
- return false;
- }
-
- public void accept(PatternVisitor visitor) {
- p.accept(visitor);
- }
-
- public Object apply(PatternFunction f) {
- return f.caseRef(this);
- }
-
- byte getReplacementStatus() {
- return replacementStatus;
- }
-
- void setReplacementStatus(byte replacementStatus) {
- this.replacementStatus = replacementStatus;
- }
-
- boolean isCombineImplicit() {
- return combineImplicit;
- }
-
- void setCombineImplicit() {
- combineImplicit = true;
- }
-
- byte getCombineType() {
- return combineType;
- }
-
- void setCombineType(byte combineType) {
- this.combineType = combineType;
- }
-
- String getName() {
- return name;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/RestrictionViolationException.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/RestrictionViolationException.java
deleted file mode 100644
index 716045f8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/RestrictionViolationException.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import javax.xml.namespace.QName;
-
-import org.xml.sax.Locator;
-
-final class RestrictionViolationException extends Exception {
- private String messageId;
- private Locator loc;
- private QName name;
-
- RestrictionViolationException(String messageId) {
- this.messageId = messageId;
- }
-
- RestrictionViolationException(String messageId, QName name) {
- this.messageId = messageId;
- this.name = name;
- }
-
- String getMessageId() {
- return messageId;
- }
-
- Locator getLocator() {
- return loc;
- }
-
- void maybeSetLocator(Locator loc) {
- if (this.loc == null)
- this.loc = loc;
- }
-
- QName getName() {
- return name;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java
deleted file mode 100644
index cdf149e7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java
+++ /dev/null
@@ -1,792 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * 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
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-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;
-import com.sun.xml.internal.rngom.ast.builder.DataPatternBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Div;
-import com.sun.xml.internal.rngom.ast.builder.ElementAnnotationBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Grammar;
-import com.sun.xml.internal.rngom.ast.builder.GrammarSection;
-import com.sun.xml.internal.rngom.ast.builder.Include;
-import com.sun.xml.internal.rngom.ast.builder.IncludedGrammar;
-import com.sun.xml.internal.rngom.ast.builder.NameClassBuilder;
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Scope;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedNameClass;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.ast.util.LocatorImpl;
-import com.sun.xml.internal.rngom.dt.builtin.BuiltinDatatypeLibraryFactory;
-import com.sun.xml.internal.rngom.dt.CascadingDatatypeLibraryFactory;
-import com.sun.xml.internal.rngom.nc.NameClass;
-import com.sun.xml.internal.rngom.nc.NameClassBuilderImpl;
-import com.sun.xml.internal.rngom.parse.Context;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import com.sun.xml.internal.rngom.util.Localizer;
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
-import org.relaxng.datatype.ValidationContext;
-import org.relaxng.datatype.helpers.DatatypeLibraryLoader;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-public class SchemaBuilderImpl implements SchemaBuilder, ElementAnnotationBuilder, CommentList {
-
- private final SchemaBuilderImpl parent;
- private boolean hadError = false;
- private final SchemaPatternBuilder pb;
- private final DatatypeLibraryFactory datatypeLibraryFactory;
- private final String inheritNs;
- private final ErrorHandler eh;
- private final OpenIncludes openIncludes;
- private final NameClassBuilder ncb = new NameClassBuilderImpl();
- static final Localizer localizer = new Localizer(SchemaBuilderImpl.class);
-
- static class OpenIncludes {
-
- final String uri;
- final OpenIncludes parent;
-
- OpenIncludes(String uri, OpenIncludes parent) {
- this.uri = uri;
- this.parent = parent;
- }
- }
-
- public ParsedPattern expandPattern(ParsedPattern _pattern)
- throws BuildException, IllegalSchemaException {
- Pattern pattern = (Pattern) _pattern;
- if (!hadError) {
- try {
- pattern.checkRecursion(0);
- pattern = pattern.expand(pb);
- pattern.checkRestrictions(Pattern.START_CONTEXT, null, null);
- if (!hadError) {
- return pattern;
- }
- } catch (SAXParseException e) {
- error(e);
- } catch (SAXException e) {
- throw new BuildException(e);
- } catch (RestrictionViolationException e) {
- if (e.getName() != null) {
- error(e.getMessageId(), e.getName().toString(), e
- .getLocator());
- } else {
- error(e.getMessageId(), e.getLocator());
- }
- }
- }
- throw new IllegalSchemaException();
- }
-
- /**
- *
- * @param eh Error handler to receive errors while building the schema.
- */
- public SchemaBuilderImpl(ErrorHandler eh) {
- this(eh,
- new CascadingDatatypeLibraryFactory(new DatatypeLibraryLoader(),
- new BuiltinDatatypeLibraryFactory(new DatatypeLibraryLoader())),
- new SchemaPatternBuilder());
- }
-
- /**
- *
- * @param eh Error handler to receive errors while building the schema.
- * @param datatypeLibraryFactory This is consulted to locate datatype
- * libraries.
- * @param pb Used to build patterns.
- */
- public SchemaBuilderImpl(ErrorHandler eh,
- DatatypeLibraryFactory datatypeLibraryFactory,
- SchemaPatternBuilder pb) {
- this.parent = null;
- this.eh = eh;
- this.datatypeLibraryFactory = datatypeLibraryFactory;
- this.pb = pb;
- this.inheritNs = "";
- this.openIncludes = null;
- }
-
- private SchemaBuilderImpl(String inheritNs,
- String uri,
- SchemaBuilderImpl parent) {
- this.parent = parent;
- this.eh = parent.eh;
- this.datatypeLibraryFactory = parent.datatypeLibraryFactory;
- this.pb = parent.pb;
- this.inheritNs = inheritNs;
- this.openIncludes = new OpenIncludes(uri, parent.openIncludes);
- }
-
- public NameClassBuilder getNameClassBuilder() {
- return ncb;
- }
-
- public ParsedPattern makeChoice(List patterns, Location loc, Annotations anno)
- throws BuildException {
- if (patterns.isEmpty()) {
- throw new IllegalArgumentException();
- }
- Pattern result = (Pattern) patterns.get(0);
- for (int i = 1; i < patterns.size(); i++) {
- result = pb.makeChoice(result, (Pattern) patterns.get(i));
- }
- return result;
- }
-
- public ParsedPattern makeInterleave(List patterns, Location loc, Annotations anno)
- throws BuildException {
- if (patterns.isEmpty()) {
- throw new IllegalArgumentException();
- }
- Pattern result = (Pattern) patterns.get(0);
- for (int i = 1; i < patterns.size(); i++) {
- result = pb.makeInterleave(result, (Pattern) patterns.get(i));
- }
- return result;
- }
-
- public ParsedPattern makeGroup(List patterns, Location loc, Annotations anno)
- throws BuildException {
- if (patterns.isEmpty()) {
- throw new IllegalArgumentException();
- }
- Pattern result = (Pattern) patterns.get(0);
- for (int i = 1; i < patterns.size(); i++) {
- result = pb.makeGroup(result, (Pattern) patterns.get(i));
- }
- return result;
- }
-
- public ParsedPattern makeOneOrMore(ParsedPattern p, Location loc, Annotations anno)
- throws BuildException {
- return pb.makeOneOrMore((Pattern) p);
- }
-
- public ParsedPattern makeZeroOrMore(ParsedPattern p, Location loc, Annotations anno)
- throws BuildException {
- return pb.makeZeroOrMore((Pattern) p);
- }
-
- public ParsedPattern makeOptional(ParsedPattern p, Location loc, Annotations anno)
- throws BuildException {
- return pb.makeOptional((Pattern) p);
- }
-
- public ParsedPattern makeList(ParsedPattern p, Location loc, Annotations anno)
- throws BuildException {
- return pb.makeList((Pattern) p, (Locator) loc);
- }
-
- public ParsedPattern makeMixed(ParsedPattern p, Location loc, Annotations anno)
- throws BuildException {
- return pb.makeMixed((Pattern) p);
- }
-
- public ParsedPattern makeEmpty(Location loc, Annotations anno) {
- return pb.makeEmpty();
- }
-
- public ParsedPattern makeNotAllowed(Location loc, Annotations anno) {
- return pb.makeUnexpandedNotAllowed();
- }
-
- public ParsedPattern makeText(Location loc, Annotations anno) {
- return pb.makeText();
- }
-
- public ParsedPattern makeErrorPattern() {
- return pb.makeError();
- }
-
-// public ParsedNameClass makeErrorNameClass() {
-// return new ErrorNameClass();
-// }
- public ParsedPattern makeAttribute(ParsedNameClass nc, ParsedPattern p, Location loc, Annotations anno)
- throws BuildException {
- return pb.makeAttribute((NameClass) nc, (Pattern) p, (Locator) loc);
- }
-
- public ParsedPattern makeElement(ParsedNameClass nc, ParsedPattern p, Location loc, Annotations anno)
- throws BuildException {
- return pb.makeElement((NameClass) nc, (Pattern) p, (Locator) loc);
- }
-
- private class DummyDataPatternBuilder implements DataPatternBuilder {
-
- public void addParam(String name, String value, Context context, String ns, Location loc, Annotations anno)
- throws BuildException {
- }
-
- public ParsedPattern makePattern(Location loc, Annotations anno)
- throws BuildException {
- return pb.makeError();
- }
-
- public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno)
- throws BuildException {
- return pb.makeError();
- }
-
- public void annotation(ParsedElementAnnotation ea) {
- }
- }
-
- private static class ValidationContextImpl implements ValidationContext {
-
- private ValidationContext vc;
- private String ns;
-
- ValidationContextImpl(ValidationContext vc, String ns) {
- this.vc = vc;
- this.ns = ns.length() == 0 ? null : ns;
- }
-
- public String resolveNamespacePrefix(String prefix) {
- return prefix.length() == 0 ? ns : vc.resolveNamespacePrefix(prefix);
- }
-
- public String getBaseUri() {
- return vc.getBaseUri();
- }
-
- public boolean isUnparsedEntity(String entityName) {
- return vc.isUnparsedEntity(entityName);
- }
-
- public boolean isNotation(String notationName) {
- return vc.isNotation(notationName);
- }
- }
-
- private class DataPatternBuilderImpl implements DataPatternBuilder {
-
- private DatatypeBuilder dtb;
-
- DataPatternBuilderImpl(DatatypeBuilder dtb) {
- this.dtb = dtb;
- }
-
- public void addParam(String name, String value, Context context, String ns, Location loc, Annotations anno)
- throws BuildException {
- try {
- dtb.addParameter(name, value, new ValidationContextImpl(context, ns));
- } catch (DatatypeException e) {
- String detail = e.getMessage();
- int pos = e.getIndex();
- String displayedParam;
- if (pos == DatatypeException.UNKNOWN) {
- displayedParam = null;
- } else {
- displayedParam = displayParam(value, pos);
- }
- if (displayedParam != null) {
- if (detail != null) {
- error("invalid_param_detail_display", detail, displayedParam, (Locator) loc);
- } else {
- error("invalid_param_display", displayedParam, (Locator) loc);
- }
- } else if (detail != null) {
- error("invalid_param_detail", detail, (Locator) loc);
- } else {
- error("invalid_param", (Locator) loc);
- }
- }
- }
-
- String displayParam(String value, int pos) {
- if (pos < 0) {
- pos = 0;
- } else if (pos > value.length()) {
- pos = value.length();
- }
- return localizer.message("display_param", value.substring(0, pos), value.substring(pos));
- }
-
- public ParsedPattern makePattern(Location loc, Annotations anno)
- throws BuildException {
- try {
- return pb.makeData(dtb.createDatatype());
- } catch (DatatypeException e) {
- String detail = e.getMessage();
- if (detail != null) {
- error("invalid_params_detail", detail, (Locator) loc);
- } else {
- error("invalid_params", (Locator) loc);
- }
- return pb.makeError();
- }
- }
-
- public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno)
- throws BuildException {
- try {
- return pb.makeDataExcept(dtb.createDatatype(), (Pattern) except, (Locator) loc);
- } catch (DatatypeException e) {
- String detail = e.getMessage();
- if (detail != null) {
- error("invalid_params_detail", detail, (Locator) loc);
- } else {
- error("invalid_params", (Locator) loc);
- }
- return pb.makeError();
- }
- }
-
- public void annotation(ParsedElementAnnotation ea) {
- }
- }
-
- public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
- throws BuildException {
- DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
- if (dl == null) {
- error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
- } else {
- try {
- return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
- } catch (DatatypeException e) {
- String detail = e.getMessage();
- if (detail != null) {
- error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
- } else {
- error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
- }
- }
- }
- return new DummyDataPatternBuilder();
- }
-
- public ParsedPattern makeValue(String datatypeLibrary, String type, String value, Context context, String ns,
- Location loc, Annotations anno) throws BuildException {
- DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
- if (dl == null) {
- error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
- } else {
- try {
- DatatypeBuilder dtb = dl.createDatatypeBuilder(type);
- try {
- Datatype dt = dtb.createDatatype();
- Object obj = dt.createValue(value, new ValidationContextImpl(context, ns));
- if (obj != null) {
- return pb.makeValue(dt, obj);
- }
- error("invalid_value", value, (Locator) loc);
- } catch (DatatypeException e) {
- String detail = e.getMessage();
- if (detail != null) {
- error("datatype_requires_param_detail", detail, (Locator) loc);
- } else {
- error("datatype_requires_param", (Locator) loc);
- }
- }
- } catch (DatatypeException e) {
- error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
- }
- }
- return pb.makeError();
- }
-
- static class GrammarImpl implements Grammar, Div, IncludedGrammar {
-
- private final SchemaBuilderImpl sb;
- private final Hashtable defines;
- private final RefPattern startRef;
- private final Scope parent;
-
- private GrammarImpl(SchemaBuilderImpl sb, Scope parent) {
- this.sb = sb;
- this.parent = parent;
- this.defines = new Hashtable();
- this.startRef = new RefPattern(null);
- }
-
- protected GrammarImpl(SchemaBuilderImpl sb, GrammarImpl g) {
- this.sb = sb;
- parent = g.parent;
- startRef = g.startRef;
- defines = g.defines;
- }
-
- public ParsedPattern endGrammar(Location loc, Annotations anno) throws BuildException {
- for (Enumeration e = defines.keys();
- e.hasMoreElements();) {
- String name = (String) e.nextElement();
- RefPattern rp = (RefPattern) defines.get(name);
- if (rp.getPattern() == null) {
- sb.error("reference_to_undefined", name, rp.getRefLocator());
- rp.setPattern(sb.pb.makeError());
- }
- }
- Pattern start = startRef.getPattern();
- if (start == null) {
- sb.error("missing_start_element", (Locator) loc);
- start = sb.pb.makeError();
- }
- return start;
- }
-
- public void endDiv(Location loc, Annotations anno) throws BuildException {
- // nothing to do
- }
-
- public ParsedPattern endIncludedGrammar(Location loc, Annotations anno) throws BuildException {
- return null;
- }
-
- public void define(String name, GrammarSection.Combine combine, ParsedPattern pattern, Location loc, Annotations anno)
- throws BuildException {
- define(lookup(name), combine, pattern, loc);
- }
-
- private void define(RefPattern rp, GrammarSection.Combine combine, ParsedPattern pattern, Location loc)
- throws BuildException {
- switch (rp.getReplacementStatus()) {
- case RefPattern.REPLACEMENT_KEEP:
- if (combine == null) {
- if (rp.isCombineImplicit()) {
- if (rp.getName() == null) {
- sb.error("duplicate_start", (Locator) loc);
- } else {
- sb.error("duplicate_define", rp.getName(), (Locator) loc);
- }
- } else {
- rp.setCombineImplicit();
- }
- } else {
- byte combineType = (combine == COMBINE_CHOICE ? RefPattern.COMBINE_CHOICE : RefPattern.COMBINE_INTERLEAVE);
- if (rp.getCombineType() != RefPattern.COMBINE_NONE
- && rp.getCombineType() != combineType) {
- if (rp.getName() == null) {
- sb.error("conflict_combine_start", (Locator) loc);
- } else {
- sb.error("conflict_combine_define", rp.getName(), (Locator) loc);
- }
- }
- rp.setCombineType(combineType);
- }
- Pattern p = (Pattern) pattern;
- if (rp.getPattern() == null) {
- rp.setPattern(p);
- } else if (rp.getCombineType() == RefPattern.COMBINE_INTERLEAVE) {
- rp.setPattern(sb.pb.makeInterleave(rp.getPattern(), p));
- } else {
- rp.setPattern(sb.pb.makeChoice(rp.getPattern(), p));
- }
- break;
- case RefPattern.REPLACEMENT_REQUIRE:
- rp.setReplacementStatus(RefPattern.REPLACEMENT_IGNORE);
- break;
- case RefPattern.REPLACEMENT_IGNORE:
- break;
- }
- }
-
- public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException {
- }
-
- public void topLevelComment(CommentList comments) throws BuildException {
- }
-
- private RefPattern lookup(String name) {
- if (name == START) {
- return startRef;
- }
- return lookup1(name);
- }
-
- private RefPattern lookup1(String name) {
- RefPattern p = (RefPattern) defines.get(name);
- if (p == null) {
- p = new RefPattern(name);
- defines.put(name, p);
- }
- return p;
- }
-
- public ParsedPattern makeRef(String name, Location loc, Annotations anno) throws BuildException {
- RefPattern p = lookup1(name);
- if (p.getRefLocator() == null && loc != null) {
- p.setRefLocator((Locator) loc);
- }
- return p;
- }
-
- public ParsedPattern makeParentRef(String name, Location loc, Annotations anno) throws BuildException {
- // TODO: do this check by the caller
- if (parent == null) {
- sb.error("parent_ref_outside_grammar", (Locator) loc);
- return sb.makeErrorPattern();
- }
- return parent.makeRef(name, loc, anno);
- }
-
- public Div makeDiv() {
- return this;
- }
-
- public Include makeInclude() {
- return new IncludeImpl(sb, this);
- }
- }
-
- static class Override {
-
- Override(RefPattern prp, Override next) {
- this.prp = prp;
- this.next = next;
- }
- RefPattern prp;
- Override next;
- byte replacementStatus;
- }
-
- private static class IncludeImpl implements Include, Div {
-
- private SchemaBuilderImpl sb;
- private Override overrides;
- private GrammarImpl grammar;
-
- private IncludeImpl(SchemaBuilderImpl sb, GrammarImpl grammar) {
- this.sb = sb;
- this.grammar = grammar;
- }
-
- public void define(String name, GrammarSection.Combine combine, ParsedPattern pattern, Location loc, Annotations anno)
- throws BuildException {
- RefPattern rp = grammar.lookup(name);
- overrides = new Override(rp, overrides);
- grammar.define(rp, combine, pattern, loc);
- }
-
- public void endDiv(Location loc, Annotations anno) throws BuildException {
- // nothing to do
- }
-
- public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException {
- // nothing to do
- }
-
- public void topLevelComment(CommentList comments) throws BuildException {
- }
-
- public Div makeDiv() {
- return this;
- }
-
- public void endInclude(Parseable current, String uri, String ns,
- Location loc, Annotations anno) throws BuildException {
- for (OpenIncludes inc = sb.openIncludes;
- inc != null;
- inc = inc.parent) {
- if (inc.uri.equals(uri)) {
- sb.error("recursive_include", uri, (Locator) loc);
- return;
- }
- }
-
- for (Override o = overrides; o != null; o = o.next) {
- o.replacementStatus = o.prp.getReplacementStatus();
- o.prp.setReplacementStatus(RefPattern.REPLACEMENT_REQUIRE);
- }
- try {
- SchemaBuilderImpl isb = new SchemaBuilderImpl(ns, uri, sb);
- current.parseInclude(uri, isb, new GrammarImpl(isb, grammar), ns);
- for (Override o = overrides; o != null; o = o.next) {
- if (o.prp.getReplacementStatus() == RefPattern.REPLACEMENT_REQUIRE) {
- if (o.prp.getName() == null) {
- sb.error("missing_start_replacement", (Locator) loc);
- } else {
- sb.error("missing_define_replacement", o.prp.getName(), (Locator) loc);
- }
- }
- }
- } catch (IllegalSchemaException e) {
- sb.noteError();
- } finally {
- for (Override o = overrides; o != null; o = o.next) {
- o.prp.setReplacementStatus(o.replacementStatus);
- }
- }
- }
-
- public Include makeInclude() {
- return null;
- }
- }
-
- public Grammar makeGrammar(Scope parent) {
- return new GrammarImpl(this, parent);
- }
-
- public ParsedPattern annotate(ParsedPattern p, Annotations anno) throws BuildException {
- return p;
- }
-
- public ParsedPattern annotateAfter(ParsedPattern p, ParsedElementAnnotation e) throws BuildException {
- return p;
- }
-
- public ParsedPattern commentAfter(ParsedPattern p, CommentList comments) throws BuildException {
- return p;
- }
-
- public ParsedPattern makeExternalRef(Parseable current, String uri, String ns, Scope scope,
- Location loc, Annotations anno)
- throws BuildException {
- for (OpenIncludes inc = openIncludes;
- inc != null;
- inc = inc.parent) {
- if (inc.uri.equals(uri)) {
- error("recursive_include", uri, (Locator) loc);
- return pb.makeError();
- }
- }
- try {
- return current.parseExternal(uri, new SchemaBuilderImpl(ns, uri, this), scope, ns);
- } catch (IllegalSchemaException e) {
- noteError();
- return pb.makeError();
- }
- }
-
- public Location makeLocation(String systemId, int lineNumber, int columnNumber) {
- return new LocatorImpl(systemId, lineNumber, columnNumber);
- }
-
- public Annotations makeAnnotations(CommentList comments, Context context) {
- return this;
- }
-
- public ElementAnnotationBuilder makeElementAnnotationBuilder(String ns, String localName, String prefix,
- Location loc, CommentList comments, Context context) {
- return this;
- }
-
- public CommentList makeCommentList() {
- return this;
- }
-
- public void addComment(String value, Location loc) throws BuildException {
- }
-
- public void addAttribute(String ns, String localName, String prefix, String value, Location loc) {
- // nothing needed
- }
-
- public void addElement(ParsedElementAnnotation ea) {
- // nothing needed
- }
-
- public void addComment(CommentList comments) throws BuildException {
- // nothing needed
- }
-
- public void addLeadingComment(CommentList comments) throws BuildException {
- // nothing needed
- }
-
- public ParsedElementAnnotation makeElementAnnotation() {
- return null;
- }
-
- public void addText(String value, Location loc, CommentList comments) throws BuildException {
- }
-
- public boolean usesComments() {
- return false;
- }
-
- private void error(SAXParseException message) throws BuildException {
- noteError();
- try {
- if (eh != null) {
- eh.error(message);
- }
- } catch (SAXException e) {
- throw new BuildException(e);
- }
- }
-
- private void error(String key, Locator loc) throws BuildException {
- error(new SAXParseException(localizer.message(key), loc));
- }
-
- private void error(String key, String arg, Locator loc) throws BuildException {
- error(new SAXParseException(localizer.message(key, arg), loc));
- }
-
- private void error(String key, String arg1, String arg2, Locator loc) throws BuildException {
- error(new SAXParseException(localizer.message(key, arg1, arg2), loc));
- }
-
- private void error(String key, String arg1, String arg2, String arg3, Locator loc) throws BuildException {
- error(new SAXParseException(localizer.message(key, new Object[]{arg1, arg2, arg3}), loc));
- }
-
- private void noteError() {
- if (!hadError && parent != null) {
- parent.noteError();
- }
- hadError = true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/SchemaPatternBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/SchemaPatternBuilder.java
deleted file mode 100644
index 6016295c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/SchemaPatternBuilder.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.nc.NameClass;
-import org.relaxng.datatype.Datatype;
-import org.xml.sax.Locator;
-
-public class SchemaPatternBuilder extends PatternBuilder {
- private boolean idTypes;
- private final Pattern unexpandedNotAllowed =
- new NotAllowedPattern() {
- @Override
- boolean isNotAllowed() {
- return false;
- }
- @Override
- Pattern expand(SchemaPatternBuilder b) {
- return b.makeNotAllowed();
- }
- };
-
- private final TextPattern text = new TextPattern();
- private final PatternInterner schemaInterner = new PatternInterner();
-
- public SchemaPatternBuilder() { }
-
- public boolean hasIdTypes() {
- return idTypes;
- }
-
- Pattern makeElement(NameClass nameClass, Pattern content, Locator loc) {
- Pattern p = new ElementPattern(nameClass, content, loc);
- return schemaInterner.intern(p);
- }
-
- Pattern makeAttribute(NameClass nameClass, Pattern value, Locator loc) {
- if (value == notAllowed)
- return value;
- Pattern p = new AttributePattern(nameClass, value, loc);
- return schemaInterner.intern(p);
- }
-
- Pattern makeData(Datatype dt) {
- noteDatatype(dt);
- Pattern p = new DataPattern(dt);
- return schemaInterner.intern(p);
- }
-
- Pattern makeDataExcept(Datatype dt, Pattern except, Locator loc) {
- noteDatatype(dt);
- Pattern p = new DataExceptPattern(dt, except, loc);
- return schemaInterner.intern(p);
- }
-
- Pattern makeValue(Datatype dt, Object obj) {
- noteDatatype(dt);
- Pattern p = new ValuePattern(dt, obj);
- return schemaInterner.intern(p);
- }
-
- Pattern makeText() {
- return text;
- }
-
- @Override
- Pattern makeOneOrMore(Pattern p) {
- if (p == text)
- return p;
- return super.makeOneOrMore(p);
- }
-
- Pattern makeUnexpandedNotAllowed() {
- return unexpandedNotAllowed;
- }
-
- Pattern makeError() {
- Pattern p = new ErrorPattern();
- return schemaInterner.intern(p);
- }
-
- @Override
- Pattern makeChoice(Pattern p1, Pattern p2) {
- if (p1 == notAllowed || p1 == p2)
- return p2;
- if (p2 == notAllowed)
- return p1;
- return super.makeChoice(p1, p2);
- }
-
- Pattern makeList(Pattern p, Locator loc) {
- if (p == notAllowed)
- return p;
- Pattern p1 = new ListPattern(p, loc);
- return schemaInterner.intern(p1);
- }
-
- Pattern makeMixed(Pattern p) {
- return makeInterleave(text, p);
- }
-
- private void noteDatatype(Datatype dt) {
- if (dt.getIdType() != Datatype.ID_TYPE_NULL)
- idTypes = true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/StringPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/StringPattern.java
deleted file mode 100644
index 0012c03d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/StringPattern.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-abstract class StringPattern extends Pattern {
- StringPattern(int hc) {
- super(false, DATA_CONTENT_TYPE, hc);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/TextPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/TextPattern.java
deleted file mode 100644
index 0fea9860..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/TextPattern.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-
-public class TextPattern extends Pattern {
- TextPattern() {
- super(true, MIXED_CONTENT_TYPE, TEXT_HASH_CODE);
- }
-
- boolean samePattern(Pattern other) {
- return other instanceof TextPattern;
- }
-
- public void accept(PatternVisitor visitor) {
- visitor.visitText();
- }
-
- public Object apply(PatternFunction f) {
- return f.caseText(this);
- }
-
- @Override
- void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
- throws RestrictionViolationException {
- switch (context) {
- case DATA_EXCEPT_CONTEXT:
- throw new RestrictionViolationException("data_except_contains_text");
- case START_CONTEXT:
- throw new RestrictionViolationException("start_contains_text");
- case LIST_CONTEXT:
- throw new RestrictionViolationException("list_contains_text");
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ValuePattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ValuePattern.java
deleted file mode 100644
index 135a9776..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/ValuePattern.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary;
-
-import com.sun.xml.internal.rngom.binary.visitor.PatternFunction;
-import com.sun.xml.internal.rngom.binary.visitor.PatternVisitor;
-import org.relaxng.datatype.Datatype;
-
-public class ValuePattern extends StringPattern {
- Object obj;
- Datatype dt;
-
- ValuePattern(Datatype dt, Object obj) {
- super(combineHashCode(VALUE_HASH_CODE, obj.hashCode()));
- this.dt = dt;
- this.obj = obj;
- }
-
- boolean samePattern(Pattern other) {
- if (getClass() != other.getClass())
- return false;
- if (!(other instanceof ValuePattern))
- return false;
- return (dt.equals(((ValuePattern)other).dt)
- && dt.sameValue(obj, ((ValuePattern)other).obj));
- }
-
- public void accept(PatternVisitor visitor) {
- visitor.visitValue(dt, obj);
- }
-
- public Object apply(PatternFunction f) {
- return f.caseValue(this);
- }
-
- @Override
- void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
- throws RestrictionViolationException {
- switch (context) {
- case START_CONTEXT:
- throw new RestrictionViolationException("start_contains_value");
- }
- }
-
- Datatype getDatatype() {
- return dt;
- }
-
- Object getValue() {
- return obj;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/package.html b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/package.html
deleted file mode 100644
index 6579af64..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/package.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-<!--
- Copyright (C) 2004-2011
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
--->
-<html>
- <body>
- Minimal binarized pattern object model (one example of <tt>ast.om</tt> implementation).
- </body>
-</html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/ChildElementFinder.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/ChildElementFinder.java
deleted file mode 100644
index 33077358..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/ChildElementFinder.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary.visitor;
-
-import com.sun.xml.internal.rngom.binary.Pattern;
-import com.sun.xml.internal.rngom.nc.NameClass;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Visits a pattern and creates a list of possible child elements.
- *
- * <p>
- * One can use a similar technique to introspect a pattern.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class ChildElementFinder extends PatternWalker {
-
- private final Set children = new HashSet();
-
- /**
- * Represents a child element.
- */
- public static class Element {
- public final NameClass nc;
- public final Pattern content;
-
- public Element(NameClass nc, Pattern content) {
- this.nc = nc;
- this.content = content;
- }
-
- public boolean equals(Object o) {
- if (this == o) return true;
- if (!(o instanceof Element)) return false;
-
- final Element element = (Element) o;
-
- if (content != null ? !content.equals(element.content) : element.content != null) return false;
- if (nc != null ? !nc.equals(element.nc) : element.nc != null) return false;
-
- return true;
- }
-
- public int hashCode() {
- int result;
- result = (nc != null ? nc.hashCode() : 0);
- result = 29 * result + (content != null ? content.hashCode() : 0);
- return result;
- }
- }
-
- /**
- * Returns a set of {@link Element}.
- */
- public Set getChildren() {
- return children;
- }
-
- public void visitElement(NameClass nc, Pattern content) {
- children.add(new Element(nc,content));
- }
-
- public void visitAttribute(NameClass ns, Pattern value) {
- // there will be no element inside attribute,
- // so don't go in there.
- }
-
- public void visitList(Pattern p) {
- // there will be no element inside a list,
- // so don't go in there.
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/PatternFunction.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/PatternFunction.java
deleted file mode 100644
index e69aa869..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/PatternFunction.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary.visitor;
-
-import com.sun.xml.internal.rngom.binary.AfterPattern;
-import com.sun.xml.internal.rngom.binary.AttributePattern;
-import com.sun.xml.internal.rngom.binary.ChoicePattern;
-import com.sun.xml.internal.rngom.binary.DataExceptPattern;
-import com.sun.xml.internal.rngom.binary.DataPattern;
-import com.sun.xml.internal.rngom.binary.ElementPattern;
-import com.sun.xml.internal.rngom.binary.EmptyPattern;
-import com.sun.xml.internal.rngom.binary.ErrorPattern;
-import com.sun.xml.internal.rngom.binary.GroupPattern;
-import com.sun.xml.internal.rngom.binary.InterleavePattern;
-import com.sun.xml.internal.rngom.binary.ListPattern;
-import com.sun.xml.internal.rngom.binary.NotAllowedPattern;
-import com.sun.xml.internal.rngom.binary.OneOrMorePattern;
-import com.sun.xml.internal.rngom.binary.RefPattern;
-import com.sun.xml.internal.rngom.binary.TextPattern;
-import com.sun.xml.internal.rngom.binary.ValuePattern;
-
-public interface PatternFunction {
- Object caseEmpty(EmptyPattern p);
- Object caseNotAllowed(NotAllowedPattern p);
- Object caseError(ErrorPattern p);
- Object caseGroup(GroupPattern p);
- Object caseInterleave(InterleavePattern p);
- Object caseChoice(ChoicePattern p);
- Object caseOneOrMore(OneOrMorePattern p);
- Object caseElement(ElementPattern p);
- Object caseAttribute(AttributePattern p);
- Object caseData(DataPattern p);
- Object caseDataExcept(DataExceptPattern p);
- Object caseValue(ValuePattern p);
- Object caseText(TextPattern p);
- Object caseList(ListPattern p);
- Object caseRef(RefPattern p);
- Object caseAfter(AfterPattern p);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/PatternVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/PatternVisitor.java
deleted file mode 100644
index 480625dd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/PatternVisitor.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary.visitor;
-
-import com.sun.xml.internal.rngom.binary.Pattern;
-import com.sun.xml.internal.rngom.nc.NameClass;
-import org.relaxng.datatype.Datatype;
-
-public interface PatternVisitor {
- void visitEmpty();
- void visitNotAllowed();
- void visitError();
- void visitAfter(Pattern p1, Pattern p2);
- void visitGroup(Pattern p1, Pattern p2);
- void visitInterleave(Pattern p1, Pattern p2);
- void visitChoice(Pattern p1, Pattern p2);
- void visitOneOrMore(Pattern p);
- void visitElement(NameClass nc, Pattern content);
- void visitAttribute(NameClass ns, Pattern value);
- void visitData(Datatype dt);
- void visitDataExcept(Datatype dt, Pattern except);
- void visitValue(Datatype dt, Object obj);
- void visitText();
- void visitList(Pattern p);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/PatternWalker.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/PatternWalker.java
deleted file mode 100644
index ea9309b3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/visitor/PatternWalker.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.binary.visitor;
-
-import com.sun.xml.internal.rngom.binary.Pattern;
-import com.sun.xml.internal.rngom.nc.NameClass;
-import org.relaxng.datatype.Datatype;
-
-/**
- * Walks the pattern tree.
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class PatternWalker implements PatternVisitor {
- public void visitEmpty() {
- }
-
- public void visitNotAllowed() {
- }
-
- public void visitError() {
- }
-
- public void visitGroup(Pattern p1, Pattern p2) {
- visitBinary(p1, p2);
- }
-
- protected void visitBinary(Pattern p1, Pattern p2) {
- p1.accept(this);
- p2.accept(this);
- }
-
- public void visitInterleave(Pattern p1, Pattern p2) {
- visitBinary(p1, p2);
- }
-
- public void visitChoice(Pattern p1, Pattern p2) {
- visitBinary(p1, p2);
- }
-
- public void visitOneOrMore(Pattern p) {
- p.accept(this);
- }
-
- public void visitElement(NameClass nc, Pattern content) {
- content.accept(this);
- }
-
- public void visitAttribute(NameClass ns, Pattern value) {
- value.accept(this);
- }
-
- public void visitData(Datatype dt) {
- }
-
- public void visitDataExcept(Datatype dt, Pattern except) {
- }
-
- public void visitValue(Datatype dt, Object obj) {
- }
-
- public void visitText() {
- }
-
- public void visitList(Pattern p) {
- p.accept(this);
- }
-
- public void visitAfter(Pattern p1, Pattern p2) {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/Annotation.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/Annotation.java
deleted file mode 100644
index 81109f2a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/Annotation.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-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.util.LocatorImpl;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-class Annotation implements Annotations<ElementWrapper,LocatorImpl,CommentListImpl> {
-
- private final DAnnotation a = new DAnnotation();
-
- public void addAttribute(String ns, String localName, String prefix, String value, LocatorImpl loc) throws BuildException {
- a.attributes.put(new QName(ns,localName,prefix),
- new DAnnotation.Attribute(ns,localName,prefix,value,loc));
- }
-
- public void addElement(ElementWrapper ea) throws BuildException {
- a.contents.add(ea.element);
- }
-
- public void addComment(CommentListImpl comments) throws BuildException {
- }
-
- public void addLeadingComment(CommentListImpl comments) throws BuildException {
- }
-
- DAnnotation getResult() {
- return a;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/CommentListImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/CommentListImpl.java
deleted file mode 100644
index 648e0dbc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/CommentListImpl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import com.sun.xml.internal.rngom.ast.builder.CommentList;
-import com.sun.xml.internal.rngom.ast.builder.BuildException;
-import com.sun.xml.internal.rngom.ast.util.LocatorImpl;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-final class CommentListImpl implements CommentList<LocatorImpl> {
- public void addComment(String value, LocatorImpl loc) throws BuildException {
- // TODO
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DAnnotation.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DAnnotation.java
deleted file mode 100644
index 2f9a6e1c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DAnnotation.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import org.xml.sax.Locator;
-import org.w3c.dom.Element;
-
-import javax.xml.namespace.QName;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Collections;
-
-/**
- * Annotation.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DAnnotation {
-
- /**
- * Instance reserved to be empty.
- */
- static final DAnnotation EMPTY = new DAnnotation();
-
- /**
- * Keyed by QName.
- */
- final Map<QName,Attribute> attributes = new HashMap<QName,Attribute>();
-
- /**
- * List of nested elements.
- */
- final List<Element> contents = new ArrayList<Element>();
-
- /**
- * Attribute.
- */
- public static class Attribute {
- private final String ns;
- private final String localName;
- private final String prefix;
-
- private String value;
- private Locator loc;
-
- public Attribute(String ns, String localName, String prefix) {
- this.ns = ns;
- this.localName = localName;
- this.prefix = prefix;
- }
-
- public Attribute(String ns, String localName, String prefix, String value, Locator loc) {
- this.ns = ns;
- this.localName = localName;
- this.prefix = prefix;
- this.value = value;
- this.loc = loc;
- }
-
- /**
- * Gets the namespace URI of this attribute.
- *
- * @return
- * can be empty (to represent the default namespace), but never null.
- */
- public String getNs() {
- return ns;
- }
-
- /**
- * Gets the local name of this attribute.
- *
- * @return
- * always non-null.
- */
- public String getLocalName() {
- return localName;
- }
-
- /**
- * Gets the prefix of thie attribute.
- *
- * @return
- * null if this attribute didn't have a prefix.
- */
- public String getPrefix() {
- return prefix;
- }
-
- /**
- * Gets the attribute value.
- *
- * @return
- * never null.
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Gets the location in the source schema file where this annotation was present.
- *
- * @return
- * never null.
- */
- public Locator getLoc() {
- return loc;
- }
- }
-
- /**
- * Gets the attribute of a given name.
- *
- * @param nsUri
- * can be empty but must not be null.
- * @return
- * null if no such attribute is found.
- */
- public Attribute getAttribute( String nsUri, String localName ) {
- return getAttribute(new QName(nsUri,localName));
- }
-
- public Attribute getAttribute( QName n ) {
- return attributes.get(n);
- }
-
- /**
- * Gets the read-only view of all the attributes.
- *
- * @return
- * can be empty but never null.
- * the returned map is read-only.
- */
- public Map<QName,Attribute> getAttributes() {
- return Collections.unmodifiableMap(attributes);
- }
-
- /**
- * Gets the read-only view of all the child elements of this annotation.
- *
- * @return
- * can be empty but never null.
- * the returned list is read-only.
- */
- public List<Element> getChildren() {
- return Collections.unmodifiableList(contents);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DAttributePattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DAttributePattern.java
deleted file mode 100644
index 6b3e3c8b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DAttributePattern.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import com.sun.xml.internal.rngom.nc.NameClass;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DAttributePattern extends DXmlTokenPattern {
- public DAttributePattern(NameClass name) {
- super(name);
- }
- public Object accept( DPatternVisitor visitor ) {
- return visitor.onAttribute(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DChoicePattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DChoicePattern.java
deleted file mode 100644
index 1bd97cde..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DChoicePattern.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * &lt;choice> pattern.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DChoicePattern extends DContainerPattern {
- public boolean isNullable() {
- for( DPattern p=firstChild(); p!=null; p=p.next )
- if(p.isNullable())
- return true;
- return false;
- }
- public <V> V accept( DPatternVisitor<V> visitor ) {
- return visitor.onChoice(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DContainerPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DContainerPattern.java
deleted file mode 100644
index 127b514e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DContainerPattern.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import java.util.Iterator;
-
-
-/**
- * A pattern that can contain other patterns.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public abstract class DContainerPattern extends DPattern implements Iterable<DPattern> {
- private DPattern head;
- private DPattern tail;
-
- public DPattern firstChild() {
- return head;
- }
-
- public DPattern lastChild() {
- return tail;
- }
-
- public int countChildren() {
- int i=0;
- for( DPattern p=firstChild(); p!=null; p=p.next)
- i++;
- return i;
- }
-
- public Iterator<DPattern> iterator() {
- return new Iterator<DPattern>() {
- DPattern next = head;
- public boolean hasNext() {
- return next!=null;
- }
-
- public DPattern next() {
- DPattern r = next;
- next = next.next;
- return r;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
-
- void add( DPattern child ) {
- if(tail==null) {
- child.prev = child.next = null;
- head = tail = child;
- } else {
- child.prev = tail;
- tail.next = child;
- child.next = null;
- tail = child;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DDataPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DDataPattern.java
deleted file mode 100644
index fa81b976..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DDataPattern.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * 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
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.parse.Context;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DDataPattern extends DPattern {
- DPattern except;
-
- String datatypeLibrary;
- String type;
-
- final List<Param> params = new ArrayList<Param>();
-
- /**
- * Parameter to a data pattern.
- */
- public final class Param {
- String name;
- String value;
- Context context;
- String ns;
- Location loc;
- Annotation anno;
-
- public Param(String name, String value, Context context, String ns, Location loc, Annotation anno) {
- this.name = name;
- this.value = value;
- this.context = context;
- this.ns = ns;
- this.loc = loc;
- this.anno = anno;
- }
-
- public String getName() {
- return name;
- }
-
- public String getValue() {
- return value;
- }
-
- public Context getContext() {
- return context;
- }
-
- public String getNs() {
- return ns;
- }
-
- public Location getLoc() {
- return loc;
- }
-
- public Annotation getAnno() {
- return anno;
- }
- }
-
- /**
- * Gets the datatype library URI.
- *
- * @return
- * Can be empty (which represents the built-in datatypes), but never null.
- */
- public String getDatatypeLibrary() {
- return datatypeLibrary;
- }
-
- /**
- * Gets the datatype name, such as "int" or "token".
- *
- * @return
- * never null.
- */
- public String getType() {
- return type;
- }
-
- /**
- * Gets the parameters of this &lt;data pattern.
- *
- * @return
- * can be empty but never null.
- */
- public List<Param> getParams() {
- return params;
- }
-
- /**
- * Gets the pattern that reprsents the &lt;except> child of this data pattern.
- *
- * @return null if not exist.
- */
- public DPattern getExcept() {
- return except;
- }
-
- public boolean isNullable() {
- return false;
- }
-
- public Object accept( DPatternVisitor visitor ) {
- return visitor.onData(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DDefine.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DDefine.java
deleted file mode 100644
index e093d64a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DDefine.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DDefine {
- private final String name;
-
- private DPattern pattern;
- private Boolean nullable;
- DAnnotation annotation;
-
- public DDefine(String name) {
- this.name = name;
- }
-
- public DPattern getPattern() {
- return pattern;
- }
-
- public DAnnotation getAnnotation() {
- if(annotation==null)
- return DAnnotation.EMPTY;
- return annotation;
- }
-
- public void setPattern(DPattern pattern) {
- this.pattern = pattern;
- this.nullable = null;
- }
-
- /**
- * Gets the name of the pattern block.
- */
- public String getName() {
- return name;
- }
-
- public boolean isNullable() {
- if(nullable==null)
- nullable = pattern.isNullable()?Boolean.TRUE:Boolean.FALSE;
- return nullable.booleanValue();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DElementPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DElementPattern.java
deleted file mode 100644
index a03c925b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DElementPattern.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import com.sun.xml.internal.rngom.nc.NameClass;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DElementPattern extends DXmlTokenPattern {
- public DElementPattern(NameClass name) {
- super(name);
- }
-
- public Object accept( DPatternVisitor visitor ) {
- return visitor.onElement(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DEmptyPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DEmptyPattern.java
deleted file mode 100644
index 71a9c43e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DEmptyPattern.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DEmptyPattern extends DPattern {
- public boolean isNullable() {
- return true;
- }
- public Object accept( DPatternVisitor visitor ) {
- return visitor.onEmpty(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DGrammarPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DGrammarPattern.java
deleted file mode 100644
index e55dc4be..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DGrammarPattern.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * &lt;grammar> pattern, which is a collection of named patterns.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DGrammarPattern extends DPattern implements Iterable<DDefine> {
- private final Map<String,DDefine> patterns = new HashMap<String,DDefine>();
-
- DPattern start;
-
- /**
- * Gets the start pattern.
- */
- public DPattern getStart() {
- return start;
- }
-
- /**
- * Gets the named pattern by its name.
- *
- * @return
- * null if not found.
- */
- public DDefine get( String name ) {
- return patterns.get(name);
- }
-
- DDefine getOrAdd( String name ) {
- if(patterns.containsKey(name)) {
- return get(name);
- } else {
- DDefine d = new DDefine(name);
- patterns.put(name,d);
- return d;
- }
- }
-
- /**
- * Iterates all the {@link DDefine}s in this grammar.
- */
- public Iterator<DDefine> iterator() {
- return patterns.values().iterator();
- }
-
- public boolean isNullable() {
- return start.isNullable();
- }
-
- public <V> V accept( DPatternVisitor<V> visitor ) {
- return visitor.onGrammar(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DGroupPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DGroupPattern.java
deleted file mode 100644
index 0bee74dd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DGroupPattern.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DGroupPattern extends DContainerPattern {
- public boolean isNullable() {
- for( DPattern p=firstChild(); p!=null; p=p.next )
- if(!p.isNullable())
- return false;
- return true;
- }
- public <V> V accept( DPatternVisitor<V> visitor ) {
- return visitor.onGroup(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DInterleavePattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DInterleavePattern.java
deleted file mode 100644
index 2c94426c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DInterleavePattern.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DInterleavePattern extends DContainerPattern {
- public boolean isNullable() {
- for( DPattern p=firstChild(); p!=null; p=p.next )
- if(!p.isNullable())
- return false;
- return true;
- }
- public Object accept( DPatternVisitor visitor ) {
- return visitor.onInterleave(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DListPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DListPattern.java
deleted file mode 100644
index 2920c121..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DListPattern.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DListPattern extends DUnaryPattern {
- public boolean isNullable() {
- return getChild().isNullable();
- }
- public Object accept( DPatternVisitor visitor ) {
- return visitor.onList(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DMixedPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DMixedPattern.java
deleted file mode 100644
index dd8162e7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DMixedPattern.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DMixedPattern extends DUnaryPattern {
- public boolean isNullable() {
- return getChild().isNullable();
- }
- public Object accept( DPatternVisitor visitor ) {
- return visitor.onMixed(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DNotAllowedPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DNotAllowedPattern.java
deleted file mode 100644
index b6596735..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DNotAllowedPattern.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DNotAllowedPattern extends DPattern {
- public boolean isNullable() {
- return false;
- }
- public Object accept( DPatternVisitor visitor ) {
- return visitor.onNotAllowed(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DOMPrinter.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DOMPrinter.java
deleted file mode 100644
index f4a8f51a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DOMPrinter.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.Comment;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentFragment;
-import org.w3c.dom.Element;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.ProcessingInstruction;
-import org.w3c.dom.Text;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * Printer of DOM to XML using StAX {@link XMLStreamWriter}.
- *
- * @author <A href="mailto:demakov@ispras.ru">Alexey Demakov</A>
- */
-class DOMPrinter {
- protected XMLStreamWriter out;
-
- public DOMPrinter(XMLStreamWriter out) {
- this.out = out;
- }
-
- public void print(Node node) throws XMLStreamException {
- switch (node.getNodeType()) {
- case Node.DOCUMENT_NODE:
- visitDocument((Document) node);
- break;
- case Node.DOCUMENT_FRAGMENT_NODE:
- visitDocumentFragment((DocumentFragment) node);
- break;
- case Node.ELEMENT_NODE:
- visitElement((Element) node);
- break;
- case Node.TEXT_NODE:
- visitText((Text) node);
- break;
- case Node.CDATA_SECTION_NODE:
- visitCDATASection((CDATASection) node);
- break;
- case Node.PROCESSING_INSTRUCTION_NODE:
- visitProcessingInstruction((ProcessingInstruction) node);
- break;
- case Node.ENTITY_REFERENCE_NODE:
- visitReference((EntityReference) node);
- break;
- case Node.COMMENT_NODE:
- visitComment((Comment) node);
- break;
- case Node.DOCUMENT_TYPE_NODE:
- break;
- case Node.ATTRIBUTE_NODE:
- case Node.ENTITY_NODE:
- default:
- throw new XMLStreamException("Unexpected DOM Node Type "
- + node.getNodeType()
- );
- }
- }
-
- protected void visitChildren(Node node)
- throws XMLStreamException {
- NodeList nodeList = node.getChildNodes();
- if (nodeList != null) {
- for (int i = 0; i < nodeList.getLength(); i++) {
- print(nodeList.item(i));
- }
- }
- }
-
- protected void visitDocument(Document document)
- throws XMLStreamException {
- out.writeStartDocument();
- print(document.getDocumentElement());
- out.writeEndDocument();
- }
-
- protected void visitDocumentFragment(DocumentFragment documentFragment)
- throws XMLStreamException {
- visitChildren(documentFragment);
- }
-
- protected void visitElement(Element node)
- throws XMLStreamException {
- out.writeStartElement(node.getPrefix()
- , node.getLocalName()
- , node.getNamespaceURI()
- );
- NamedNodeMap attrs = node.getAttributes();
- for (int i = 0; i < attrs.getLength(); i++) {
- visitAttr((Attr) attrs.item(i));
- }
- visitChildren(node);
- out.writeEndElement();
- }
-
- protected void visitAttr(Attr node)
- throws XMLStreamException {
- String name = node.getLocalName();
- if (name.equals("xmlns")) {
- out.writeDefaultNamespace(node.getNamespaceURI());
- } else {
- String prefix = node.getPrefix();
- if (prefix != null && prefix.equals("xmlns")) {
- out.writeNamespace(prefix, node.getNamespaceURI());
- } else if (prefix != null) {
- out.writeAttribute(prefix
- , node.getNamespaceURI()
- , name
- , node.getNodeValue()
- );
- } else {
- out.writeAttribute(node.getNamespaceURI()
- , name
- , node.getNodeValue());
- }
- }
- }
-
- protected void visitComment(Comment comment) throws XMLStreamException {
- out.writeComment(comment.getData());
- }
-
- protected void visitText(Text node) throws XMLStreamException {
- out.writeCharacters(node.getNodeValue());
- }
-
- protected void visitCDATASection(CDATASection cdata) throws XMLStreamException {
- out.writeCData(cdata.getNodeValue());
- }
-
- protected void visitProcessingInstruction(ProcessingInstruction processingInstruction)
- throws XMLStreamException {
- out.writeProcessingInstruction(processingInstruction.getNodeName()
- , processingInstruction.getData()
- );
- }
-
- protected void visitReference(EntityReference entityReference)
- throws XMLStreamException {
- visitChildren(entityReference);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DOneOrMorePattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DOneOrMorePattern.java
deleted file mode 100644
index 7a6edbd7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DOneOrMorePattern.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DOneOrMorePattern extends DUnaryPattern {
- public boolean isNullable() {
- return getChild().isNullable();
- }
- public Object accept( DPatternVisitor visitor ) {
- return visitor.onOneOrMore(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DOptionalPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DOptionalPattern.java
deleted file mode 100644
index ad2d6ee0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DOptionalPattern.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DOptionalPattern extends DUnaryPattern {
- public boolean isNullable() {
- return true;
- }
- public Object accept( DPatternVisitor visitor ) {
- return visitor.onOptional(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPattern.java
deleted file mode 100644
index e38bebaf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPattern.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * 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
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import org.xml.sax.Locator;
-
-/**
- * Base class of all the patterns.
- *
- * @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.
- */
- DPattern next;
- DPattern prev;
-
- /**
- * Returns where the pattern is defined in the source code.
- */
- public Locator getLocation() {
- return location;
- }
-
- /**
- * Returns the annotation associated with it.
- *
- * @return may be empty, but never be null.
- */
- public DAnnotation getAnnotation() {
- if (annotation == null) {
- return DAnnotation.EMPTY;
- }
- return annotation;
- }
-
- /**
- * Returns true if this pattern is nullable.
- *
- * A nullable pattern is a pattern that can match the empty sequence.
- */
- public abstract boolean isNullable();
-
- public abstract <V> V accept(DPatternVisitor<V> visitor);
-
- /**
- * Creates a {@link Parseable} object that reparses this pattern.
- */
- public Parseable createParseable() {
- return new PatternParseable(this);
- }
-
- /**
- * Returns true if this is {@link DElementPattern}.
- */
- public final boolean isElement() {
- return this instanceof DElementPattern;
- }
-
- /**
- * Returns true if this is {@link DAttributePattern}.
- */
- public final boolean isAttribute() {
- return this instanceof DAttributePattern;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPatternVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPatternVisitor.java
deleted file mode 100644
index b62383a4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPatternVisitor.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public interface DPatternVisitor<V> {
- V onAttribute( DAttributePattern p );
- V onChoice( DChoicePattern p );
- V onData( DDataPattern p );
- V onElement( DElementPattern p );
- V onEmpty( DEmptyPattern p );
- V onGrammar( DGrammarPattern p );
- V onGroup( DGroupPattern p );
- V onInterleave( DInterleavePattern p );
- V onList( DListPattern p );
- V onMixed( DMixedPattern p );
- V onNotAllowed( DNotAllowedPattern p );
- V onOneOrMore( DOneOrMorePattern p );
- V onOptional( DOptionalPattern p );
- V onRef( DRefPattern p );
- V onText( DTextPattern p );
- V onValue( DValuePattern p );
- V onZeroOrMore( DZeroOrMorePattern p );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPatternWalker.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPatternWalker.java
deleted file mode 100644
index 9c85ddba..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPatternWalker.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DPatternWalker implements DPatternVisitor<Void> {
- public Void onAttribute(DAttributePattern p) {
- return onXmlToken(p);
- }
-
- protected Void onXmlToken(DXmlTokenPattern p) {
- return onUnary(p);
- }
-
- public Void onChoice(DChoicePattern p) {
- return onContainer(p);
- }
-
- protected Void onContainer(DContainerPattern p) {
- for( DPattern c=p.firstChild(); c!=null; c=c.next )
- c.accept(this);
- return null;
- }
-
- public Void onData(DDataPattern p) {
- return null;
- }
-
- public Void onElement(DElementPattern p) {
- return onXmlToken(p);
- }
-
- public Void onEmpty(DEmptyPattern p) {
- return null;
- }
-
- public Void onGrammar(DGrammarPattern p) {
- return p.getStart().accept(this);
- }
-
- public Void onGroup(DGroupPattern p) {
- return onContainer(p);
- }
-
- public Void onInterleave(DInterleavePattern p) {
- return onContainer(p);
- }
-
- public Void onList(DListPattern p) {
- return onUnary(p);
- }
-
- public Void onMixed(DMixedPattern p) {
- return onUnary(p);
- }
-
- public Void onNotAllowed(DNotAllowedPattern p) {
- return null;
- }
-
- public Void onOneOrMore(DOneOrMorePattern p) {
- return onUnary(p);
- }
-
- public Void onOptional(DOptionalPattern p) {
- return onUnary(p);
- }
-
- public Void onRef(DRefPattern p) {
- return p.getTarget().getPattern().accept(this);
- }
-
- public Void onText(DTextPattern p) {
- return null;
- }
-
- public Void onValue(DValuePattern p) {
- return null;
- }
-
- public Void onZeroOrMore(DZeroOrMorePattern p) {
- return onUnary(p);
- }
-
- protected Void onUnary(DUnaryPattern p) {
- return p.getChild().accept(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DRefPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DRefPattern.java
deleted file mode 100644
index 3c27b757..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DRefPattern.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DRefPattern extends DPattern {
- private final DDefine target;
-
- public DRefPattern(DDefine target) {
- this.target = target;
- }
-
- public boolean isNullable() {
- return target.isNullable();
- }
-
- /**
- * Gets the {@link DDefine} that this block refers to.
- */
- public DDefine getTarget() {
- return target;
- }
-
- /**
- * Gets the name of the target.
- */
- public String getName() {
- return target.getName();
- }
-
- public Object accept( DPatternVisitor visitor ) {
- return visitor.onRef(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DSchemaBuilderImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DSchemaBuilderImpl.java
deleted file mode 100644
index e1a63d2f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DSchemaBuilderImpl.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import com.sun.xml.internal.rngom.ast.builder.BuildException;
-import com.sun.xml.internal.rngom.ast.builder.DataPatternBuilder;
-import com.sun.xml.internal.rngom.ast.builder.ElementAnnotationBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Grammar;
-import com.sun.xml.internal.rngom.ast.builder.NameClassBuilder;
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Scope;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.ast.util.LocatorImpl;
-import com.sun.xml.internal.rngom.nc.NameClass;
-import com.sun.xml.internal.rngom.nc.NameClassBuilderImpl;
-import com.sun.xml.internal.rngom.parse.Context;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import org.w3c.dom.Document;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import java.util.List;
-
-/**
- * Parses as {@link Parseable} into a {@link DPattern}.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DSchemaBuilderImpl implements SchemaBuilder
- <NameClass,DPattern,ElementWrapper,LocatorImpl,Annotation,CommentListImpl> {
-
- private final NameClassBuilder ncb = new NameClassBuilderImpl();
-
- /**
- * Used to parse annotations.
- */
- private final Document dom;
-
- public DSchemaBuilderImpl() {
- try {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
- this.dom = dbf.newDocumentBuilder().newDocument();
- } catch (ParserConfigurationException e) {
- // impossible
- throw new InternalError(e.getMessage());
- }
- }
-
- public NameClassBuilder getNameClassBuilder() throws BuildException {
- return ncb;
- }
-
- static DPattern wrap( DPattern p, LocatorImpl loc, Annotation anno ) {
- p.location = loc;
- if(anno!=null)
- p.annotation = anno.getResult();
- return p;
- }
-
- static DContainerPattern addAll( DContainerPattern parent, List<DPattern> children) {
- for (DPattern c : children)
- parent.add(c);
- return parent;
- }
-
- static DUnaryPattern addBody( DUnaryPattern parent, ParsedPattern _body, LocatorImpl loc ) {
- parent.setChild( (DPattern)_body );
- return parent;
- }
-
- public DPattern makeChoice(List<DPattern> patterns, LocatorImpl loc, Annotation anno) throws BuildException {
- return wrap(addAll(new DChoicePattern(),patterns),loc,anno);
- }
-
- public DPattern makeInterleave(List<DPattern> patterns, LocatorImpl loc, Annotation anno) throws BuildException {
- return wrap(addAll(new DInterleavePattern(),patterns),loc,anno);
- }
-
- public DPattern makeGroup(List<DPattern> patterns, LocatorImpl loc, Annotation anno) throws BuildException {
- return wrap(addAll(new DGroupPattern(),patterns),loc,anno);
- }
-
- public DPattern makeOneOrMore(DPattern p, LocatorImpl loc, Annotation anno) throws BuildException {
- return wrap(addBody(new DOneOrMorePattern(),p,loc),loc,anno);
- }
-
- public DPattern makeZeroOrMore(DPattern p, LocatorImpl loc, Annotation anno) throws BuildException {
- return wrap(addBody(new DZeroOrMorePattern(),p,loc),loc,anno);
- }
-
- public DPattern makeOptional(DPattern p, LocatorImpl loc, Annotation anno) throws BuildException {
- return wrap(addBody(new DOptionalPattern(),p,loc),loc,anno);
- }
-
- public DPattern makeList(DPattern p, LocatorImpl loc, Annotation anno) throws BuildException {
- return wrap(addBody(new DListPattern(),p,loc),loc,anno);
- }
-
- public DPattern makeMixed(DPattern p, LocatorImpl loc, Annotation anno) throws BuildException {
- return wrap(addBody(new DMixedPattern(),p,loc),loc,anno);
- }
-
- public DPattern makeEmpty(LocatorImpl loc, Annotation anno) {
- return wrap(new DEmptyPattern(),loc,anno);
- }
-
- public DPattern makeNotAllowed(LocatorImpl loc, Annotation anno) {
- return wrap(new DNotAllowedPattern(),loc,anno);
- }
-
- public DPattern makeText(LocatorImpl loc, Annotation anno) {
- return wrap(new DTextPattern(),loc,anno);
- }
-
- public DPattern makeAttribute(NameClass nc, DPattern p, LocatorImpl loc, Annotation anno) throws BuildException {
- return wrap(addBody(new DAttributePattern(nc),p,loc),loc,anno);
- }
-
- public DPattern makeElement(NameClass nc, DPattern p, LocatorImpl loc, Annotation anno) throws BuildException {
- return wrap(addBody(new DElementPattern(nc),p,loc),loc,anno);
- }
-
- public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, LocatorImpl loc) throws BuildException {
- return new DataPatternBuilderImpl(datatypeLibrary,type,loc);
- }
-
- public DPattern makeValue(String datatypeLibrary, String type, String value, Context c, String ns, LocatorImpl loc, Annotation anno) throws BuildException {
- return wrap(new DValuePattern(datatypeLibrary,type,value,c.copy(),ns),loc,anno);
- }
-
- public Grammar makeGrammar(Scope parent) {
- return new GrammarBuilderImpl(new DGrammarPattern(),parent,this);
- }
-
- public DPattern annotate(DPattern p, Annotation anno) throws BuildException {
- // TODO: not sure when this is used
- return p;
- }
-
- public DPattern annotateAfter(DPattern p, ElementWrapper e) throws BuildException {
- // TODO
- return p;
- }
-
- public DPattern commentAfter(DPattern p, CommentListImpl comments) throws BuildException {
- // TODO
- return p;
- }
-
- public DPattern makeExternalRef(Parseable current, String uri, String ns,
- Scope<DPattern, ElementWrapper, LocatorImpl, Annotation, CommentListImpl> scope, LocatorImpl loc, Annotation anno) throws BuildException, IllegalSchemaException {
- // TODO
- return null;
- }
-
- public LocatorImpl makeLocation(String systemId, int lineNumber, int columnNumber) {
- return new LocatorImpl(systemId,lineNumber,columnNumber);
- }
-
- public Annotation makeAnnotations(CommentListImpl comments, Context context) {
- return new Annotation();
- }
-
- public ElementAnnotationBuilder makeElementAnnotationBuilder(String ns, String localName, String prefix, LocatorImpl loc, CommentListImpl comments, Context context) {
- String qname;
- if(prefix==null)
- qname = localName;
- else
- qname = prefix+':'+localName;
- return new ElementAnnotationBuilderImpl(dom.createElementNS(ns,qname));
- }
-
- public CommentListImpl makeCommentList() {
- return null;
- }
-
- public DPattern makeErrorPattern() {
- return new DNotAllowedPattern();
- }
-
- public boolean usesComments() {
- return false;
- }
-
- public DPattern expandPattern(DPattern p) throws BuildException, IllegalSchemaException {
- return p;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DTextPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DTextPattern.java
deleted file mode 100644
index 91717cb3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DTextPattern.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DTextPattern extends DPattern {
- public boolean isNullable() {
- return true;
- }
- public Object accept( DPatternVisitor visitor ) {
- return visitor.onText(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DUnaryPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DUnaryPattern.java
deleted file mode 100644
index 37baa5d7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DUnaryPattern.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public abstract class DUnaryPattern extends DPattern {
- private DPattern child;
-
- public DPattern getChild() {
- return child;
- }
-
- public void setChild(DPattern child) {
- this.child = child;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DValuePattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DValuePattern.java
deleted file mode 100644
index 9fc3ea14..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DValuePattern.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import com.sun.xml.internal.rngom.parse.Context;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DValuePattern extends DPattern {
- private String datatypeLibrary;
- private String type;
- private String value;
- private Context context;
- private String ns;
-
- public DValuePattern(String datatypeLibrary, String type, String value, Context context, String ns) {
- this.datatypeLibrary = datatypeLibrary;
- this.type = type;
- this.value = value;
- this.context = context;
- this.ns = ns;
- }
-
- public String getDatatypeLibrary() {
- return datatypeLibrary;
- }
-
- public String getType() {
- return type;
- }
-
- public String getValue() {
- return value;
- }
-
- public Context getContext() {
- return context;
- }
-
- public String getNs() {
- return ns;
- }
-
- public boolean isNullable() {
- return false;
- }
-
- public Object accept( DPatternVisitor visitor ) {
- return visitor.onValue(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXMLPrinter.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXMLPrinter.java
deleted file mode 100644
index c224f6c8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXMLPrinter.java
+++ /dev/null
@@ -1,600 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.OutputStream;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-import com.sun.xml.internal.rngom.ast.builder.BuildException;
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.util.CheckingSchemaBuilder;
-import com.sun.xml.internal.rngom.nc.NameClass;
-import com.sun.xml.internal.rngom.nc.NameClassVisitor;
-import com.sun.xml.internal.rngom.nc.SimpleNameClass;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import com.sun.xml.internal.rngom.parse.compact.CompactParseable;
-import com.sun.xml.internal.rngom.parse.xml.SAXParseable;
-import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Printer of RELAX NG digested model to XML using StAX {@link XMLStreamWriter}.
- *
- * @author <A href="mailto:demakov@ispras.ru">Alexey Demakov</A>
- */
-public class DXMLPrinter {
- protected XMLStreamWriter out;
- protected String indentStep = "\t";
- protected String newLine = System.getProperty("line.separator");
- protected int indent;
- protected boolean afterEnd = false;
- protected DXMLPrinterVisitor visitor;
- protected NameClassXMLPrinterVisitor ncVisitor;
- protected DOMPrinter domPrinter;
-
- /**
- * @param out Output stream.
- */
- public DXMLPrinter(XMLStreamWriter out) {
- this.out = out;
- this.visitor = new DXMLPrinterVisitor();
- this.ncVisitor = new NameClassXMLPrinterVisitor();
- this.domPrinter = new DOMPrinter(out);
- }
-
- /**
- * Prints grammar enclosed by start/end document.
- *
- * @param grammar
- * @throws XMLStreamException
- */
- public void printDocument(DGrammarPattern grammar) throws XMLStreamException {
- try {
- visitor.startDocument();
- visitor.on(grammar);
- visitor.endDocument();
- } catch (XMLWriterException e) {
- if (e.getCause() instanceof XMLStreamException) {
- throw (XMLStreamException) e.getCause();
- } else {
- throw new XMLStreamException(e);
- }
- }
- }
-
- /**
- * Prints XML fragment for the given pattern.
- *
- * @throws XMLStreamException
- */
- public void print(DPattern pattern) throws XMLStreamException {
- try {
- pattern.accept(visitor);
- } catch (XMLWriterException e) {
- if (e.getCause() instanceof XMLStreamException) {
- throw (XMLStreamException) e.getCause();
- } else {
- throw new XMLStreamException(e);
- }
- }
- }
-
- /**
- * Prints XML fragment for the given name class.
- *
- * @throws XMLStreamException
- */
- public void print(NameClass nc) throws XMLStreamException {
- try {
- nc.accept(ncVisitor);
- } catch (XMLWriterException e) {
- if (e.getCause() instanceof XMLStreamException) {
- throw (XMLStreamException) e.getCause();
- } else {
- throw new XMLStreamException(e);
- }
- }
- }
-
- public void print(Node node) throws XMLStreamException {
- domPrinter.print(node);
- }
-
- protected class XMLWriterException extends RuntimeException {
- protected XMLWriterException(Throwable cause) {
- super(cause);
- }
- }
-
- protected class XMLWriter {
- protected void newLine() {
- try {
- out.writeCharacters(newLine);
- } catch (XMLStreamException e) {
- throw new XMLWriterException(e);
- }
- }
-
- protected void indent() {
- try {
- for (int i = 0; i < indent; i++) {
- out.writeCharacters(indentStep);
- }
- } catch (XMLStreamException e) {
- throw new XMLWriterException(e);
- }
- }
-
- public void startDocument() {
- try {
- out.writeStartDocument();
- } catch (XMLStreamException e) {
- throw new XMLWriterException(e);
- }
- }
-
- public void endDocument() {
- try {
- out.writeEndDocument();
- } catch (XMLStreamException e) {
- throw new XMLWriterException(e);
- }
- }
-
- public final void start(String element) {
- try {
- newLine();
- indent();
- out.writeStartElement(element);
- indent++;
- afterEnd = false;
- } catch (XMLStreamException e) {
- throw new XMLWriterException(e);
- }
- }
-
- public void end() {
- try {
- indent--;
- if (afterEnd) {
- newLine();
- indent();
- }
- out.writeEndElement();
- afterEnd = true;
- } catch (XMLStreamException e) {
- throw new XMLWriterException(e);
- }
- }
-
- public void attr(String prefix, String ns, String name, String value) {
- try {
- out.writeAttribute(prefix, ns, name, value);
- } catch (XMLStreamException e) {
- throw new XMLWriterException(e);
- }
- }
-
- public void attr(String name, String value) {
- try {
- out.writeAttribute(name, value);
- } catch (XMLStreamException e) {
- throw new XMLWriterException(e);
- }
- }
-
- public void ns(String prefix, String uri) {
- try {
- out.writeNamespace(prefix, uri);
- } catch (XMLStreamException e) {
- throw new XMLWriterException(e);
- }
- }
-
- public void body(String text) {
- try {
- out.writeCharacters(text);
- afterEnd = false;
- } catch (XMLStreamException e) {
- throw new XMLWriterException(e);
- }
- }
- }
-
- protected class DXMLPrinterVisitor extends XMLWriter implements DPatternVisitor<Void> {
- protected void on(DPattern p) {
- p.accept(this);
- }
-
- protected void unwrapGroup(DPattern p) {
- if (p instanceof DGroupPattern && p.getAnnotation() == DAnnotation.EMPTY) {
- for (DPattern d : (DGroupPattern) p) {
- on(d);
- }
- } else {
- on(p);
- }
- }
-
- protected void unwrapChoice(DPattern p) {
- if (p instanceof DChoicePattern && p.getAnnotation() == DAnnotation.EMPTY) {
- for (DPattern d : (DChoicePattern) p) {
- on(d);
- }
- } else {
- on(p);
- }
- }
-
- protected void on(NameClass nc) {
- if (nc instanceof SimpleNameClass) {
- QName qname = ((SimpleNameClass) nc).name;
- String name = qname.getLocalPart();
- if (!qname.getPrefix().equals("")) name = qname.getPrefix() + ":";
- attr("name", name);
- } else {
- nc.accept(ncVisitor);
- }
- }
-
- protected void on(DAnnotation ann) {
- if (ann == DAnnotation.EMPTY) return;
- for (DAnnotation.Attribute attr : ann.getAttributes().values()) {
- attr(attr.getPrefix(), attr.getNs(), attr.getLocalName(), attr.getValue());
- }
- for (Element elem : ann.getChildren()) {
- try {
- newLine();
- indent();
- print(elem);
- }
- catch (XMLStreamException e) {
- throw new XMLWriterException(e);
- }
- }
- }
-
- public Void onAttribute(DAttributePattern p) {
- start("attribute");
- on(p.getName());
- on(p.getAnnotation());
- DPattern child = p.getChild();
- // do not print default value
- if (!(child instanceof DTextPattern)) {
- on(p.getChild());
- }
- end();
- return null;
- }
-
- public Void onChoice(DChoicePattern p) {
- start("choice");
- on(p.getAnnotation());
- for (DPattern d : p) {
- on(d);
- }
- end();
- return null;
- }
-
- public Void onData(DDataPattern p) {
- List<DDataPattern.Param> params = p.getParams();
- DPattern except = p.getExcept();
- start("data");
- attr("datatypeLibrary", p.getDatatypeLibrary());
- attr("type", p.getType());
- on(p.getAnnotation());
- for (DDataPattern.Param param : params) {
- start("param");
- attr("ns", param.getNs());
- attr("name", param.getName());
- body(param.getValue());
- end();
- }
- if (except != null) {
- start("except");
- unwrapChoice(except);
- end();
- }
- end();
- return null;
- }
-
- public Void onElement(DElementPattern p) {
- start("element");
- on(p.getName());
- on(p.getAnnotation());
- unwrapGroup(p.getChild());
- end();
- return null;
- }
-
- public Void onEmpty(DEmptyPattern p) {
- start("empty");
- on(p.getAnnotation());
- end();
- return null;
- }
-
- public Void onGrammar(DGrammarPattern p) {
- start("grammar");
- ns(null, WellKnownNamespaces.RELAX_NG);
- on(p.getAnnotation());
- start("start");
- on(p.getStart());
- end();
- for (DDefine d : p) {
- start("define");
- attr("name", d.getName());
- on(d.getAnnotation());
- unwrapGroup(d.getPattern());
- end();
- }
- end();
- return null;
- }
-
- public Void onGroup(DGroupPattern p) {
- start("group");
- on(p.getAnnotation());
- for (DPattern d : p) {
- on(d);
- }
- end();
- return null;
- }
-
- public Void onInterleave(DInterleavePattern p) {
- start("interleave");
- on(p.getAnnotation());
- for (DPattern d : p) {
- on(d);
- }
- end();
- return null;
- }
-
- public Void onList(DListPattern p) {
- start("list");
- on(p.getAnnotation());
- unwrapGroup(p.getChild());
- end();
- return null;
- }
-
- public Void onMixed(DMixedPattern p) {
- start("mixed");
- on(p.getAnnotation());
- unwrapGroup(p.getChild());
- end();
- return null;
- }
-
- public Void onNotAllowed(DNotAllowedPattern p) {
- start("notAllowed");
- on(p.getAnnotation());
- end();
- return null;
- }
-
- public Void onOneOrMore(DOneOrMorePattern p) {
- start("oneOrMore");
- on(p.getAnnotation());
- unwrapGroup(p.getChild());
- end();
- return null;
- }
-
- public Void onOptional(DOptionalPattern p) {
- start("optional");
- on(p.getAnnotation());
- unwrapGroup(p.getChild());
- end();
- return null;
- }
-
- public Void onRef(DRefPattern p) {
- start("ref");
- attr("name", p.getName());
- on(p.getAnnotation());
- end();
- return null;
- }
-
- public Void onText(DTextPattern p) {
- start("text");
- on(p.getAnnotation());
- end();
- return null;
- }
-
- public Void onValue(DValuePattern p) {
- start("value");
- if (!p.getNs().equals("")) attr("ns", p.getNs());
- attr("datatypeLibrary", p.getDatatypeLibrary());
- attr("type", p.getType());
- on(p.getAnnotation());
- body(p.getValue());
- end();
- return null;
- }
-
- public Void onZeroOrMore(DZeroOrMorePattern p) {
- start("zeroOrMore");
- on(p.getAnnotation());
- unwrapGroup(p.getChild());
- end();
- return null;
- }
- }
-
- protected class NameClassXMLPrinterVisitor extends XMLWriter implements NameClassVisitor<Void> {
- public Void visitChoice(NameClass nc1, NameClass nc2) {
- // TODO: flatten nested choices
- start("choice");
- nc1.accept(this);
- nc2.accept(this);
- end();
- return null;
- }
-
- public Void visitNsName(String ns) {
- start("nsName");
- attr("ns", ns);
- end();
- return null;
- }
-
- public Void visitNsNameExcept(String ns, NameClass nc) {
- start("nsName");
- attr("ns", ns);
- start("except");
- nc.accept(this);
- end();
- end();
- return null;
- }
-
- public Void visitAnyName() {
- start("anyName");
- end();
- return null;
- }
-
- public Void visitAnyNameExcept(NameClass nc) {
- start("anyName");
- start("except");
- nc.accept(this);
- end();
- end();
- return null;
- }
-
- public Void visitName(QName name) {
- start("name");
- if (!name.getPrefix().equals("")) {
- body(name.getPrefix() + ":");
- }
- body(name.getLocalPart());
- end();
- return null;
- }
-
- public Void visitNull() {
- throw new UnsupportedOperationException("visitNull");
- }
- }
-
- public static void main(String[] args) throws Exception {
- Parseable p;
-
- ErrorHandler eh = new DefaultHandler() {
- @Override
- public void error(SAXParseException e) throws SAXException {
- throw e;
- }
- };
-
- // the error handler passed to Parseable will receive parsing errors.
- String path = new File(args[0]).toURL().toString();
- if (args[0].endsWith(".rng")) {
- p = new SAXParseable(new InputSource(path), eh);
- } else {
- p = new CompactParseable(new InputSource(path), eh);
- }
-
- // the error handler passed to CheckingSchemaBuilder will receive additional
- // errors found during the RELAX NG restrictions check.
- // typically you'd want to pass in the same error handler,
- // as there's really no distinction between those two kinds of errors.
- SchemaBuilder sb = new CheckingSchemaBuilder(new DSchemaBuilderImpl(), eh);
- try {
- // run the parser
- DGrammarPattern grammar = (DGrammarPattern) p.parse(sb);
- OutputStream out = new FileOutputStream(args[1]);
- XMLOutputFactory factory = XMLOutputFactory.newInstance();
- factory.setProperty("javax.xml.stream.isRepairingNamespaces", Boolean.TRUE);
- XMLStreamWriter output = factory.createXMLStreamWriter(out);
- DXMLPrinter printer = new DXMLPrinter(output);
- printer.printDocument(grammar);
- output.close();
- out.close();
- } catch (BuildException e) {
- if (e.getCause() instanceof SAXParseException) {
- SAXParseException se = (SAXParseException) e.getCause();
- System.out.println("("
- + se.getLineNumber()
- + ","
- + se.getColumnNumber()
- + "): "
- + se.getMessage());
- return;
- } else
- // I found that Crimson doesn't show the proper stack trace
- // when a RuntimeException happens inside a SchemaBuilder.
- // the following code shows the actual exception that happened.
- if (e.getCause() instanceof SAXException) {
- SAXException se = (SAXException) e.getCause();
- if (se.getException() != null)
- se.getException().printStackTrace();
- }
- throw e;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXmlTokenPattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXmlTokenPattern.java
deleted file mode 100644
index 8ee67914..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXmlTokenPattern.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import com.sun.xml.internal.rngom.nc.NameClass;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public abstract class DXmlTokenPattern extends DUnaryPattern {
- private final NameClass name;
-
- public DXmlTokenPattern(NameClass name) {
- this.name = name;
- }
-
- /**
- * Gets the name class of this element/attribute.
- */
- public NameClass getName() {
- return name;
- }
-
- public final boolean isNullable() {
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DZeroOrMorePattern.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DZeroOrMorePattern.java
deleted file mode 100644
index edea9098..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DZeroOrMorePattern.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DZeroOrMorePattern extends DUnaryPattern {
- public boolean isNullable() {
- return true;
- }
- public Object accept( DPatternVisitor visitor ) {
- return visitor.onZeroOrMore(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DataPatternBuilderImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DataPatternBuilderImpl.java
deleted file mode 100644
index 7d3fbfd4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DataPatternBuilderImpl.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * 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
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-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.DataPatternBuilder;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.parse.Context;
-import org.xml.sax.Locator;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-final class DataPatternBuilderImpl implements DataPatternBuilder {
-
- private final DDataPattern p;
-
- public DataPatternBuilderImpl(String datatypeLibrary, String type, Location loc) {
- p = new DDataPattern();
- p.location = (Locator)loc;
- p.datatypeLibrary = datatypeLibrary;
- p.type = type;
- }
-
- public void addParam(String name, String value, Context context, String ns, Location loc, Annotations anno) throws BuildException {
- p.params.add(p.new Param(name,value,context.copy(),ns,loc,(Annotation)anno));
- }
-
- public void annotation(ParsedElementAnnotation ea) {
- // TODO
- }
-
- public ParsedPattern makePattern(Location loc, Annotations anno) throws BuildException {
- return makePattern(null,loc,anno);
- }
-
- public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno) throws BuildException {
- p.except = (DPattern)except;
- if (anno!=null) {
- p.annotation = ((Annotation)anno).getResult();
- }
- return p;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/ElementAnnotationBuilderImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/ElementAnnotationBuilderImpl.java
deleted file mode 100644
index d16519ac..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/ElementAnnotationBuilderImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import com.sun.xml.internal.rngom.ast.builder.BuildException;
-import com.sun.xml.internal.rngom.ast.builder.CommentList;
-import com.sun.xml.internal.rngom.ast.builder.ElementAnnotationBuilder;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import org.w3c.dom.Element;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-class ElementAnnotationBuilderImpl implements ElementAnnotationBuilder {
-
- private final Element e;
-
- public ElementAnnotationBuilderImpl(Element e) {
- this.e = e;
- }
-
-
- public void addText(String value, Location loc, CommentList comments) throws BuildException {
- e.appendChild(e.getOwnerDocument().createTextNode(value));
- }
-
- public ParsedElementAnnotation makeElementAnnotation() throws BuildException {
- return new ElementWrapper(e);
- }
-
- public void addAttribute(String ns, String localName, String prefix, String value, Location loc) throws BuildException {
- e.setAttributeNS(ns,localName,value);
- }
-
- public void addElement(ParsedElementAnnotation ea) throws BuildException {
- e.appendChild(((ElementWrapper)ea).element);
- }
-
- public void addComment(CommentList comments) throws BuildException {
- }
-
- public void addLeadingComment(CommentList comments) throws BuildException {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/ElementWrapper.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/ElementWrapper.java
deleted file mode 100644
index 6161d4b2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/ElementWrapper.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import org.w3c.dom.Element;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class ElementWrapper implements ParsedElementAnnotation {
- final Element element;
-
- public ElementWrapper(Element e) {
- this.element = e;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/GrammarBuilderImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/GrammarBuilderImpl.java
deleted file mode 100644
index 87e93a5c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/GrammarBuilderImpl.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * 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
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-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;
-import com.sun.xml.internal.rngom.ast.builder.Div;
-import com.sun.xml.internal.rngom.ast.builder.Grammar;
-import com.sun.xml.internal.rngom.ast.builder.Include;
-import com.sun.xml.internal.rngom.ast.builder.Scope;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.ast.util.LocatorImpl;
-import org.w3c.dom.Element;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-class GrammarBuilderImpl implements Grammar, Div {
-
- protected final DGrammarPattern grammar;
-
- protected final Scope parent;
-
- protected final DSchemaBuilderImpl sb;
-
- /**
- * Additional top-level element annotations.
- * Can be null.
- */
- private List<Element> additionalElementAnnotations;
-
- public GrammarBuilderImpl(DGrammarPattern p, Scope parent, DSchemaBuilderImpl sb) {
- this.grammar = p;
- this.parent = parent;
- this.sb = sb;
- }
-
- public ParsedPattern endGrammar(Location loc, Annotations anno) throws BuildException {
- // 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;
- }
-
- public void endDiv(Location loc, Annotations anno) throws BuildException {
- }
-
- public void define(String name, Combine combine, ParsedPattern pattern, Location loc, Annotations anno) throws BuildException {
- if(name==START) {
- grammar.start = (DPattern)pattern;
- } else {
- // TODO: handle combine
- DDefine d = grammar.getOrAdd(name);
- d.setPattern( (DPattern) pattern );
- if (anno!=null) {
- d.annotation = ((Annotation)anno).getResult();
- }
- }
- }
-
- public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException {
- // 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 {
- }
-
- public Div makeDiv() {
- return this;
- }
-
- public Include makeInclude() {
- return new IncludeImpl(grammar,parent,sb);
- }
-
- public ParsedPattern makeParentRef(String name, Location loc, Annotations anno) throws BuildException {
- return parent.makeRef(name,loc,anno);
- }
-
- public ParsedPattern makeRef(String name, Location loc, Annotations anno) throws BuildException {
- return DSchemaBuilderImpl.wrap( new DRefPattern(grammar.getOrAdd(name)), (LocatorImpl)loc, (Annotation)anno );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/IncludeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/IncludeImpl.java
deleted file mode 100644
index 38ed5ffd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/IncludeImpl.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-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.Include;
-import com.sun.xml.internal.rngom.ast.builder.IncludedGrammar;
-import com.sun.xml.internal.rngom.ast.builder.Scope;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-final class IncludeImpl extends GrammarBuilderImpl implements Include {
-
- private Set overridenPatterns = new HashSet();
- private boolean startOverriden = false;
-
- public IncludeImpl(DGrammarPattern p, Scope parent, DSchemaBuilderImpl sb) {
- super(p, parent, sb);
- }
-
- @Override
- public void define(String name, Combine combine, ParsedPattern pattern, Location loc, Annotations anno) throws BuildException {
- super.define(name, combine, pattern, loc, anno);
- if(name==START)
- startOverriden = true;
- else
- overridenPatterns.add(name);
- }
-
- public void endInclude(Parseable current, String uri, String ns, Location loc, Annotations anno) throws BuildException, IllegalSchemaException {
- current.parseInclude(uri,sb,new IncludedGrammarImpl(grammar,parent,sb),ns);
- }
-
- private class IncludedGrammarImpl extends GrammarBuilderImpl implements IncludedGrammar {
- public IncludedGrammarImpl(DGrammarPattern p, Scope parent, DSchemaBuilderImpl sb) {
- super(p, parent, sb);
- }
-
- @Override
- public void define(String name, Combine combine, ParsedPattern pattern, Location loc, Annotations anno) throws BuildException {
- // check for overridden pattern
- if(name==START) {
- if(startOverriden)
- return;
- } else {
- if(overridenPatterns.contains(name))
- return;
- }
- // otherwise define
- super.define(name, combine, pattern, loc, anno);
- }
-
- public ParsedPattern endIncludedGrammar(Location loc, Annotations anno) throws BuildException {
- return null;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/Main.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/Main.java
deleted file mode 100644
index defb3720..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/Main.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-import com.sun.xml.internal.rngom.ast.builder.BuildException;
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.util.CheckingSchemaBuilder;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import com.sun.xml.internal.rngom.parse.compact.CompactParseable;
-import com.sun.xml.internal.rngom.parse.xml.SAXParseable;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class Main {
- public static void main(String[] args) throws Exception {
- Parseable p;
-
- ErrorHandler eh = new DefaultHandler() {
- @Override
- public void error(SAXParseException e) throws SAXException {
- throw e;
- }
- };
-
- // the error handler passed to Parseable will receive parsing errors.
- if(args[0].endsWith(".rng"))
- p = new SAXParseable(new InputSource(args[0]),eh);
- else
- p = new CompactParseable(new InputSource(args[0]),eh);
-
- // the error handler passed to CheckingSchemaBuilder will receive additional
- // errors found during the RELAX NG restrictions check.
- // typically you'd want to pass in the same error handler,
- // as there's really no distinction between those two kinds of errors.
- SchemaBuilder sb = new CheckingSchemaBuilder(new DSchemaBuilderImpl(),eh);
- try {
- // run the parser
- p.parse(sb);
- } catch( BuildException e ) {
- // I found that Crimson doesn't show the proper stack trace
- // when a RuntimeException happens inside a SchemaBuilder.
- // the following code shows the actual exception that happened.
- if( e.getCause() instanceof SAXException ) {
- SAXException se = (SAXException) e.getCause();
- if(se.getException()!=null)
- se.getException().printStackTrace();
- }
- throw e;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/PatternParseable.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/PatternParseable.java
deleted file mode 100644
index d6c9b7e2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/PatternParseable.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.digested;
-
-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.IncludedGrammar;
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Scope;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedNameClass;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.nc.NameClass;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import org.xml.sax.Locator;
-
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-final class PatternParseable implements Parseable {
- private final DPattern pattern;
-
- public PatternParseable(DPattern p) {
- this.pattern = p;
- }
-
- public ParsedPattern parse(SchemaBuilder sb) throws BuildException {
- return (ParsedPattern)pattern.accept(new Parser(sb));
- }
-
- public ParsedPattern parseInclude(String uri, SchemaBuilder f, IncludedGrammar g, String inheritedNs) throws BuildException {
- throw new UnsupportedOperationException();
- }
-
- public ParsedPattern parseExternal(String uri, SchemaBuilder f, Scope s, String inheritedNs) throws BuildException {
- throw new UnsupportedOperationException();
- }
-
-
- private static class Parser implements DPatternVisitor<ParsedPattern> {
- private final SchemaBuilder sb;
-
- public Parser(SchemaBuilder sb) {
- this.sb = sb;
- }
-
- private Annotations parseAnnotation(DPattern p) {
- // TODO
- return null;
- }
-
- private Location parseLocation(DPattern p) {
- Locator l = p.getLocation();
- return sb.makeLocation(l.getSystemId(),l.getLineNumber(),l.getColumnNumber());
- }
-
- private ParsedNameClass parseNameClass(NameClass name) {
- // TODO: reparse the name class
- return name;
- }
-
-
-
- public ParsedPattern onAttribute(DAttributePattern p) {
- return sb.makeAttribute(
- parseNameClass(p.getName()),
- (ParsedPattern)p.getChild().accept(this),
- parseLocation(p),
- parseAnnotation(p) );
- }
-
- public ParsedPattern onChoice(DChoicePattern p) {
- List<ParsedPattern> kids = new ArrayList<ParsedPattern>();
- for( DPattern c=p.firstChild(); c!=null; c=c.next )
- kids.add( (ParsedPattern)c.accept(this) );
- return sb.makeChoice(kids,parseLocation(p),null);
- }
-
- public ParsedPattern onData(DDataPattern p) {
- // TODO
- return null;
- }
-
- public ParsedPattern onElement(DElementPattern p) {
- return sb.makeElement(
- parseNameClass(p.getName()),
- (ParsedPattern)p.getChild().accept(this),
- parseLocation(p),
- parseAnnotation(p) );
- }
-
- public ParsedPattern onEmpty(DEmptyPattern p) {
- return sb.makeEmpty(
- parseLocation(p),
- parseAnnotation(p) );
- }
-
- public ParsedPattern onGrammar(DGrammarPattern p) {
- // TODO
- return null;
- }
-
- public ParsedPattern onGroup(DGroupPattern p) {
- List<ParsedPattern> kids = new ArrayList<ParsedPattern>();
- for( DPattern c=p.firstChild(); c!=null; c=c.next )
- kids.add( (ParsedPattern)c.accept(this) );
- return sb.makeGroup(kids,parseLocation(p),null);
- }
-
- public ParsedPattern onInterleave(DInterleavePattern p) {
- List<ParsedPattern> kids = new ArrayList<ParsedPattern>();
- for( DPattern c=p.firstChild(); c!=null; c=c.next )
- kids.add( (ParsedPattern)c.accept(this) );
- return sb.makeInterleave(kids,parseLocation(p),null);
- }
-
- public ParsedPattern onList(DListPattern p) {
- return sb.makeList(
- (ParsedPattern)p.getChild().accept(this),
- parseLocation(p),
- parseAnnotation(p) );
- }
-
- public ParsedPattern onMixed(DMixedPattern p) {
- return sb.makeMixed(
- (ParsedPattern)p.getChild().accept(this),
- parseLocation(p),
- parseAnnotation(p) );
- }
-
- public ParsedPattern onNotAllowed(DNotAllowedPattern p) {
- return sb.makeNotAllowed(
- parseLocation(p),
- parseAnnotation(p) );
- }
-
- public ParsedPattern onOneOrMore(DOneOrMorePattern p) {
- return sb.makeOneOrMore(
- (ParsedPattern)p.getChild().accept(this),
- parseLocation(p),
- parseAnnotation(p) );
- }
-
- public ParsedPattern onOptional(DOptionalPattern p) {
- return sb.makeOptional(
- (ParsedPattern)p.getChild().accept(this),
- parseLocation(p),
- parseAnnotation(p) );
- }
-
- public ParsedPattern onRef(DRefPattern p) {
- // TODO
- return null;
- }
-
- public ParsedPattern onText(DTextPattern p) {
- return sb.makeText(
- parseLocation(p),
- parseAnnotation(p) );
- }
-
- public ParsedPattern onValue(DValuePattern p) {
- return sb.makeValue(
- p.getDatatypeLibrary(),
- p.getType(),
- p.getValue(),
- p.getContext(),
- p.getNs(),
- parseLocation(p),
- parseAnnotation(p) );
- }
-
- public ParsedPattern onZeroOrMore(DZeroOrMorePattern p) {
- return sb.makeZeroOrMore(
- (ParsedPattern)p.getChild().accept(this),
- parseLocation(p),
- parseAnnotation(p) );
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/package.html b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/package.html
deleted file mode 100644
index 96a1f9ec..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/package.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-<!--
- Copyright (C) 2004-2011
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
--->
-<html><body>
-Another RELAX NG AST implementation that optimizes away
-inclusions and some other syntax sugars, while still retaining
-all the annotations, location information, and etc.
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/CachedDatatypeLibraryFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/CachedDatatypeLibraryFactory.java
deleted file mode 100644
index 734aac2e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/CachedDatatypeLibraryFactory.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.dt;
-
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class CachedDatatypeLibraryFactory implements DatatypeLibraryFactory {
-
- private String lastUri;
- private DatatypeLibrary lastLib;
-
- private final DatatypeLibraryFactory core;
-
- public CachedDatatypeLibraryFactory( DatatypeLibraryFactory core ) {
- this.core = core;
- }
-
- public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
- if( lastUri==namespaceURI )
- return lastLib;
-
- lastUri = namespaceURI;
- lastLib = core.createDatatypeLibrary(namespaceURI);
- return lastLib;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/CascadingDatatypeLibraryFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/CascadingDatatypeLibraryFactory.java
deleted file mode 100644
index 5c5a7982..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/CascadingDatatypeLibraryFactory.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.dt;
-
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
-
-/**
- *
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class CascadingDatatypeLibraryFactory implements DatatypeLibraryFactory {
- private final DatatypeLibraryFactory factory1;
- private final DatatypeLibraryFactory factory2;
-
- public CascadingDatatypeLibraryFactory( DatatypeLibraryFactory factory1, DatatypeLibraryFactory factory2) {
- this.factory1 = factory1;
- this.factory2 = factory2;
- }
-
- public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
- DatatypeLibrary lib = factory1.createDatatypeLibrary(namespaceURI);
- if(lib==null)
- lib = factory2.createDatatypeLibrary(namespaceURI);
- return lib;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/DoNothingDatatypeLibraryFactoryImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/DoNothingDatatypeLibraryFactoryImpl.java
deleted file mode 100644
index e57c14b6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/DoNothingDatatypeLibraryFactoryImpl.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.dt;
-
-import org.relaxng.datatype.DatatypeLibraryFactory;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.ValidationContext;
-import org.relaxng.datatype.DatatypeStreamingValidator;
-import org.relaxng.datatype.helpers.StreamingValidatorImpl;
-
-/**
- * {@link DatatypeLibraryFactory} implementation
- * that returns a dummy {@link Datatype}.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public final class DoNothingDatatypeLibraryFactoryImpl implements DatatypeLibraryFactory {
- public DatatypeLibrary createDatatypeLibrary(String s) {
- return new DatatypeLibrary() {
-
- public Datatype createDatatype(String s) throws DatatypeException {
- return createDatatypeBuilder(s).createDatatype();
- }
-
- public DatatypeBuilder createDatatypeBuilder(String s) throws DatatypeException {
- return new DatatypeBuilder() {
- public void addParameter(String s, String s1, ValidationContext validationContext) throws DatatypeException {
- }
-
- public Datatype createDatatype() throws DatatypeException {
- return new Datatype() {
-
- public boolean isValid(String s, ValidationContext validationContext) {
- return false;
- }
-
- public void checkValid(String s, ValidationContext validationContext) throws DatatypeException {
- }
-
- public DatatypeStreamingValidator createStreamingValidator(ValidationContext validationContext) {
- return new StreamingValidatorImpl(this,validationContext);
- }
-
- public Object createValue(String s, ValidationContext validationContext) {
- return null;
- }
-
- public boolean sameValue(Object o, Object o1) {
- return false;
- }
-
- public int valueHashCode(Object o) {
- return 0;
- }
-
- public int getIdType() {
- return ID_TYPE_NULL;
- }
-
- public boolean isContextDependent() {
- return false;
- }
- };
- }
- };
- }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeBuilder.java
deleted file mode 100644
index bf9081cf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeBuilder.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.dt.builtin;
-
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.ValidationContext;
-
-import com.sun.xml.internal.rngom.util.Localizer;
-
-class BuiltinDatatypeBuilder implements DatatypeBuilder {
- private final Datatype dt;
-
- private static final Localizer localizer = new Localizer(BuiltinDatatypeBuilder.class);
-
- BuiltinDatatypeBuilder(Datatype dt) {
- this.dt = dt;
- }
-
- public void addParameter(String name,
- String value,
- ValidationContext context) throws DatatypeException {
- throw new DatatypeException(localizer.message("builtin_param"));
- }
-
- public Datatype createDatatype() {
- return dt;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibrary.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibrary.java
deleted file mode 100644
index 9b1d3a12..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibrary.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.dt.builtin;
-
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
-
-import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
-
-public class BuiltinDatatypeLibrary implements DatatypeLibrary {
- private final DatatypeLibraryFactory factory;
- private DatatypeLibrary xsdDatatypeLibrary = null;
-
- BuiltinDatatypeLibrary(DatatypeLibraryFactory factory) {
- this.factory = factory;
- }
-
- public DatatypeBuilder createDatatypeBuilder(String type)
- throws DatatypeException {
- xsdDatatypeLibrary =
- factory.createDatatypeLibrary(
- WellKnownNamespaces.XML_SCHEMA_DATATYPES);
- if (xsdDatatypeLibrary == null)
- throw new DatatypeException();
-
- if (type.equals("string") || type.equals("token")) {
- return new BuiltinDatatypeBuilder(
- xsdDatatypeLibrary.createDatatype(type));
- }
- throw new DatatypeException();
- }
- public Datatype createDatatype(String type) throws DatatypeException {
- return createDatatypeBuilder(type).createDatatype();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibraryFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibraryFactory.java
deleted file mode 100644
index 2cfd8f3f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/BuiltinDatatypeLibraryFactory.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.dt.builtin;
-
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
-
-import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
-
-/**
- * {@link DatatypeLibraryFactory} for
- * RELAX NG Built-in datatype library and compatibility datatype library.
- */
-public class BuiltinDatatypeLibraryFactory implements DatatypeLibraryFactory {
- private final DatatypeLibrary builtinDatatypeLibrary;
- private final DatatypeLibrary compatibilityDatatypeLibrary;
- /**
- * Target of delegation.
- */
- private final DatatypeLibraryFactory core;
-
- public BuiltinDatatypeLibraryFactory( DatatypeLibraryFactory coreFactory ) {
- builtinDatatypeLibrary = new BuiltinDatatypeLibrary(coreFactory);
- compatibilityDatatypeLibrary = new CompatibilityDatatypeLibrary(coreFactory);
- this.core = coreFactory;
- }
-
- public DatatypeLibrary createDatatypeLibrary(String uri) {
- if (uri.equals(""))
- return builtinDatatypeLibrary;
- if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
- return compatibilityDatatypeLibrary;
- return core.createDatatypeLibrary(uri);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/CompatibilityDatatypeLibrary.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/CompatibilityDatatypeLibrary.java
deleted file mode 100644
index f96f7f92..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/CompatibilityDatatypeLibrary.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.dt.builtin;
-
-import org.relaxng.datatype.Datatype;
-import org.relaxng.datatype.DatatypeBuilder;
-import org.relaxng.datatype.DatatypeException;
-import org.relaxng.datatype.DatatypeLibrary;
-import org.relaxng.datatype.DatatypeLibraryFactory;
-import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
-
-class CompatibilityDatatypeLibrary implements DatatypeLibrary {
- private final DatatypeLibraryFactory factory;
- private DatatypeLibrary xsdDatatypeLibrary = null;
-
- CompatibilityDatatypeLibrary(DatatypeLibraryFactory factory) {
- this.factory = factory;
- }
-
- public DatatypeBuilder createDatatypeBuilder(String type)
- throws DatatypeException {
- if (type.equals("ID")
- || type.equals("IDREF")
- || type.equals("IDREFS")) {
- if (xsdDatatypeLibrary == null) {
- xsdDatatypeLibrary =
- factory.createDatatypeLibrary(
- WellKnownNamespaces.XML_SCHEMA_DATATYPES);
- if (xsdDatatypeLibrary == null)
- throw new DatatypeException();
- }
- return xsdDatatypeLibrary.createDatatypeBuilder(type);
- }
- throw new DatatypeException();
- }
-
- public Datatype createDatatype(String type) throws DatatypeException {
- return createDatatypeBuilder(type).createDatatype();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/Messages.properties
deleted file mode 100644
index 56761a5d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/Messages.properties
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Copyright (C) 2004-2011
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-#
-
-# Properties file specifying messages
-builtin_param=builtin datatypes do not have any parameters
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/package.html b/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/package.html
deleted file mode 100644
index 34f22b5f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/dt/builtin/package.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-<!--
- Copyright (C) 2004-2011
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
--->
-<html><body>RELAX NG built-in datatype implementation.</body></html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/AnyNameClass.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/AnyNameClass.java
deleted file mode 100644
index a4c7b6a3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/AnyNameClass.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.nc;
-
-import javax.xml.namespace.QName;
-
-final class AnyNameClass extends NameClass {
-
- protected AnyNameClass() {} // no instanciation
-
- public boolean contains(QName name) {
- return true;
- }
-
- public int containsSpecificity(QName name) {
- return SPECIFICITY_ANY_NAME;
- }
-
- @Override
- public boolean equals(Object obj) {
- return obj==this;
- }
-
- @Override
- public int hashCode() {
- return AnyNameClass.class.hashCode();
- }
-
- public <V> V accept(NameClassVisitor<V> visitor) {
- return visitor.visitAnyName();
- }
-
- public boolean isOpen() {
- return true;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/AnyNameExceptNameClass.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/AnyNameExceptNameClass.java
deleted file mode 100644
index 3c6137af..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/AnyNameExceptNameClass.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.nc;
-
-import javax.xml.namespace.QName;
-
-public class AnyNameExceptNameClass extends NameClass {
-
- private final NameClass nameClass;
-
- public AnyNameExceptNameClass(NameClass nameClass) {
- this.nameClass = nameClass;
- }
-
- public boolean contains(QName name) {
- return !nameClass.contains(name);
- }
-
- public int containsSpecificity(QName name) {
- return contains(name) ? SPECIFICITY_ANY_NAME : SPECIFICITY_NONE;
- }
-
- public boolean equals(Object obj) {
- if (obj == null || !(obj instanceof AnyNameExceptNameClass))
- return false;
- return nameClass.equals(((AnyNameExceptNameClass) obj).nameClass);
- }
-
- public int hashCode() {
- return ~nameClass.hashCode();
- }
-
- public <V> V accept(NameClassVisitor<V> visitor) {
- return visitor.visitAnyNameExcept(nameClass);
- }
-
- public boolean isOpen() {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/ChoiceNameClass.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/ChoiceNameClass.java
deleted file mode 100644
index 25d3e089..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/ChoiceNameClass.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.nc;
-
-import javax.xml.namespace.QName;
-
-public class ChoiceNameClass extends NameClass {
-
- private final NameClass nameClass1;
- private final NameClass nameClass2;
-
- public ChoiceNameClass(NameClass nameClass1, NameClass nameClass2) {
- this.nameClass1 = nameClass1;
- this.nameClass2 = nameClass2;
- }
-
- public boolean contains(QName name) {
- return (nameClass1.contains(name) || nameClass2.contains(name));
- }
-
- public int containsSpecificity(QName name) {
- return Math.max(
- nameClass1.containsSpecificity(name),
- nameClass2.containsSpecificity(name));
- }
-
- @Override
- public int hashCode() {
- return nameClass1.hashCode() ^ nameClass2.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == null || !(obj instanceof ChoiceNameClass))
- return false;
- ChoiceNameClass other = (ChoiceNameClass) obj;
- return (
- nameClass1.equals(other.nameClass1)
- && nameClass2.equals(other.nameClass2));
- }
-
- public <V> V accept(NameClassVisitor<V> visitor) {
- return visitor.visitChoice(nameClass1, nameClass2);
- }
-
- public boolean isOpen() {
- return nameClass1.isOpen() || nameClass2.isOpen();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClass.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClass.java
deleted file mode 100644
index dd09c514..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClass.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.nc;
-
-import com.sun.xml.internal.rngom.ast.om.ParsedNameClass;
-
-import javax.xml.namespace.QName;
-import java.io.Serializable;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Name class is a set of {@link QName}s.
- */
-public abstract class NameClass implements ParsedNameClass, Serializable {
- static final int SPECIFICITY_NONE = -1;
- static final int SPECIFICITY_ANY_NAME = 0;
- static final int SPECIFICITY_NS_NAME = 1;
- static final int SPECIFICITY_NAME = 2;
-
- /**
- * Returns true if the given {@link QName} is a valid name
- * for this QName.
- */
- public abstract boolean contains(QName name);
-
- public abstract int containsSpecificity(QName name);
-
- /**
- * Visitor pattern support.
- */
- public abstract <V> V accept(NameClassVisitor<V> visitor);
-
- /**
- * Returns true if the name class accepts infinite number of
- * {@link QName}s.
- *
- * <p>
- * Intuitively, this method returns true if the name class is
- * some sort of wildcard.
- */
- public abstract boolean isOpen();
-
- /**
- * If the name class is closed (IOW !{@link #isOpen()}),
- * return the set of names in this name class. Otherwise the behavior
- * is undefined.
- */
- public Set<QName> listNames() {
- final Set<QName> names = new HashSet<QName>();
- accept(new NameClassWalker() {
- @Override
- public Void visitName(QName name) {
- names.add(name);
- return null;
- }
- });
- return names;
- }
-
- /**
- * Returns true if the intersection between this name class
- * and the specified name class is non-empty.
- */
- public final boolean hasOverlapWith( NameClass nc2 ) {
- return OverlapDetector.overlap(this,nc2);
- }
-
-
- /** Sigleton instance that represents "anyName". */
- public static final NameClass ANY = new AnyNameClass();
-
- /**
- * Sigleton instance that accepts no name.
- *
- * <p>
- * This instance is useful when doing boolean arithmetic over
- * name classes (such as computing an inverse of a given name class, etc),
- * even though it can never appear in a RELAX NG surface syntax.
- *
- * <p>
- * Internally, this instance is also used for:
- * <ol>
- * <li>Used to recover from errors during parsing.
- * <li>Mark element patterns with &lt;notAllowed/> content model.
- * </ol>
- */
- public static final NameClass NULL = new NullNameClass();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassBuilderImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassBuilderImpl.java
deleted file mode 100644
index f3cd769e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassBuilderImpl.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * 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
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.nc;
-
-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;
-import com.sun.xml.internal.rngom.ast.builder.NameClassBuilder;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-
-import java.util.List;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class NameClassBuilderImpl<
- E extends ParsedElementAnnotation,
- L extends Location,
- 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;
- }
-
- @Override
- public NameClass makeName(String ns, String localName, String prefix, L loc, A anno) {
- 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);
- }
-
- public NameClass makeNsName(String ns, NameClass except, L loc, A anno) {
- return new NsNameExceptNameClass(ns, except);
- }
-
- public NameClass makeAnyName(L loc, A anno) {
- return NameClass.ANY;
- }
-
- public NameClass makeAnyName(NameClass except, L loc, A anno) {
- return new AnyNameExceptNameClass(except);
- }
-
- public NameClass makeErrorNameClass() {
- return NameClass.NULL;
- }
-
- public NameClass annotate(NameClass nc, A anno) throws BuildException {
- return nc;
- }
-
- public NameClass annotateAfter(NameClass nc, E e) throws BuildException {
- return nc;
- }
-
- public NameClass commentAfter(NameClass nc, CL comments) throws BuildException {
- return nc;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassVisitor.java
deleted file mode 100644
index 9f64edcb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassVisitor.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.nc;
-
-import javax.xml.namespace.QName;
-
-/**
- * Visitor pattern over {@link NameClass} and its subclasses.
- */
-public interface NameClassVisitor<V> {
- /**
- * Called for {@link ChoiceNameClass}
- */
- V visitChoice(NameClass nc1, NameClass nc2);
- /**
- * Called for {@link NsNameClass}
- */
- V visitNsName(String ns);
- /**
- * Called for {@link NsNameExceptNameClass}
- */
- V visitNsNameExcept(String ns, NameClass nc);
- /**
- * Called for {@link NameClass#ANY}
- */
- V visitAnyName();
- /**
- * Called for {@link AnyNameExceptNameClass}
- */
- V visitAnyNameExcept(NameClass nc);
- /**
- * Called for {@link SimpleNameClass}
- */
- V visitName(QName name);
- /**
- * Called for {@link NameClass#NULL}.
- */
- V visitNull();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassWalker.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassWalker.java
deleted file mode 100644
index 2374554e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassWalker.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.nc;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public class NameClassWalker implements NameClassVisitor<Void> {
-
- public Void visitChoice(NameClass nc1, NameClass nc2) {
- nc1.accept(this);
- return nc2.accept(this);
- }
-
- public Void visitNsName(String ns) {
- return null;
- }
-
- public Void visitNsNameExcept(String ns, NameClass nc) {
- return nc.accept(this);
- }
-
- public Void visitAnyName() {
- return null;
- }
-
- public Void visitAnyNameExcept(NameClass nc) {
- return nc.accept(this);
- }
-
- public Void visitName(QName name) {
- return null;
- }
-
- public Void visitNull() {
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NsNameClass.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NsNameClass.java
deleted file mode 100644
index c11c8025..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NsNameClass.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.nc;
-
-import javax.xml.namespace.QName;
-
-public final class NsNameClass extends NameClass {
-
- private final String namespaceUri;
-
- public NsNameClass(String namespaceUri) {
- this.namespaceUri = namespaceUri;
- }
-
- public boolean contains(QName name) {
- return this.namespaceUri.equals(name.getNamespaceURI());
- }
-
- public int containsSpecificity(QName name) {
- return contains(name) ? SPECIFICITY_NS_NAME : SPECIFICITY_NONE;
- }
-
- @Override
- public int hashCode() {
- return namespaceUri.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == null || !(obj instanceof NsNameClass))
- return false;
- return namespaceUri.equals(((NsNameClass)obj).namespaceUri);
- }
-
- public <V> V accept(NameClassVisitor<V> visitor) {
- return visitor.visitNsName(namespaceUri);
- }
-
- public boolean isOpen() {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NsNameExceptNameClass.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NsNameExceptNameClass.java
deleted file mode 100644
index 04f12c5b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NsNameExceptNameClass.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.nc;
-
-import javax.xml.namespace.QName;
-
-public class NsNameExceptNameClass extends NameClass {
-
- private final NameClass nameClass;
- private final String namespaceURI;
-
- public NsNameExceptNameClass(String namespaceURI, NameClass nameClass) {
- this.namespaceURI = namespaceURI;
- this.nameClass = nameClass;
- }
-
- public boolean contains(QName name) {
- return (this.namespaceURI.equals(name.getNamespaceURI())
- && !nameClass.contains(name));
- }
-
- public int containsSpecificity(QName name) {
- return contains(name) ? SPECIFICITY_NS_NAME : SPECIFICITY_NONE;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == null || !(obj instanceof NsNameExceptNameClass))
- return false;
- NsNameExceptNameClass other = (NsNameExceptNameClass)obj;
- return (namespaceURI.equals(other.namespaceURI)
- && nameClass.equals(other.nameClass));
- }
-
- @Override
- public int hashCode() {
- return namespaceURI.hashCode() ^ nameClass.hashCode();
- }
-
- public <V> V accept(NameClassVisitor<V> visitor) {
- return visitor.visitNsNameExcept(namespaceURI, nameClass);
- }
-
- public boolean isOpen() {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NullNameClass.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NullNameClass.java
deleted file mode 100644
index 9e59c38a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NullNameClass.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.nc;
-
-import javax.xml.namespace.QName;
-
-final class NullNameClass extends NameClass {
- protected NullNameClass() {
- }
-
- public boolean contains(QName name) {
- return false;
- }
-
- public int containsSpecificity(QName name) {
- return SPECIFICITY_NONE;
- }
-
- @Override
- public int hashCode() {
- return NullNameClass.class.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- return this==obj;
- }
-
- public <V> V accept(NameClassVisitor<V> visitor) {
- return visitor.visitNull();
- }
-
- public boolean isOpen() {
- return false;
- }
-
- private Object readResolve() {
- return NameClass.NULL;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/OverlapDetector.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/OverlapDetector.java
deleted file mode 100644
index 79e28489..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/OverlapDetector.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.nc;
-
-import javax.xml.namespace.QName;
-
-class OverlapDetector implements NameClassVisitor<Void> {
- private NameClass nc1;
- private NameClass nc2;
- private boolean overlaps = false;
-
- static final String IMPOSSIBLE = "\u0000";
-
- private OverlapDetector(NameClass nc1, NameClass nc2) {
- this.nc1 = nc1;
- this.nc2 = nc2;
- nc1.accept(this);
- nc2.accept(this);
- }
-
- private void probe(QName name) {
- if (nc1.contains(name) && nc2.contains(name))
- overlaps = true;
- }
-
- public Void visitChoice(NameClass nc1, NameClass nc2) {
- nc1.accept(this);
- nc2.accept(this);
- return null;
- }
-
- public Void visitNsName(String ns) {
- probe(new QName(ns, IMPOSSIBLE));
- return null;
- }
-
- public Void visitNsNameExcept(String ns, NameClass ex) {
- probe(new QName(ns, IMPOSSIBLE));
- ex.accept(this);
- return null;
- }
-
- public Void visitAnyName() {
- probe(new QName(IMPOSSIBLE, IMPOSSIBLE));
- return null;
- }
-
- public Void visitAnyNameExcept(NameClass ex) {
- probe(new QName(IMPOSSIBLE, IMPOSSIBLE));
- ex.accept(this);
- return null;
- }
-
- public Void visitName(QName name) {
- probe(name);
- return null;
- }
-
- public Void visitNull() {
- return null;
- }
-
- static boolean overlap(NameClass nc1, NameClass nc2) {
- if (nc2 instanceof SimpleNameClass) {
- SimpleNameClass snc = (SimpleNameClass) nc2;
- return nc1.contains(snc.name);
- }
- if (nc1 instanceof SimpleNameClass) {
- SimpleNameClass snc = (SimpleNameClass) nc1;
- return nc2.contains(snc.name);
- }
- return new OverlapDetector(nc1, nc2).overlaps;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/SimpleNameClass.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/SimpleNameClass.java
deleted file mode 100644
index 62b3783f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/SimpleNameClass.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * 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
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.nc;
-
-import javax.xml.namespace.QName;
-
-public class SimpleNameClass extends NameClass {
-
- public final QName name;
-
- public SimpleNameClass(QName name) {
- this.name = name;
- }
-
- 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;
- }
-
- @Override
- public int hashCode() {
- return name.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- 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;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/package.html b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/package.html
deleted file mode 100644
index b09c501c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/package.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-<!--
- Copyright (C) 2004-2011
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
--->
-<html>
- <body>
- Default Name Class Object Model (one example of <tt>ast.om</tt> implementation).
- </body>
-</html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/Context.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/Context.java
deleted file mode 100644
index 41097112..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/Context.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse;
-
-import java.util.Enumeration;
-import org.relaxng.datatype.ValidationContext;
-
-/**
- * Provides contextual information.
- *
- * This is typically useful for parsing QNames.
- */
-public interface Context extends ValidationContext {
- /**
- * Enumerates the prefixes bound to namespaces.
- */
- Enumeration prefixes();
-
- /**
- * Returns the immutable snapshot of this {@link Context}.
- */
- Context copy();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/IllegalSchemaException.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/IllegalSchemaException.java
deleted file mode 100644
index e262677c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/IllegalSchemaException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse;
-
-/**
- * Signals a violation of the RELAX NG spec.
- */
-public class IllegalSchemaException extends Exception { }
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/Messages.properties
deleted file mode 100644
index 51c45352..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/Messages.properties
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Copyright (C) 2004-2011
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-#
-
-# common messages between XML and compact syntax parser
-parent_ref_outside_grammar=parentRef is used outside a grammar
-ref_outside_grammar=ref is used outside a grammar
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/Parseable.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/Parseable.java
deleted file mode 100644
index 1e84c156..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/Parseable.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse;
-
-import com.sun.xml.internal.rngom.ast.builder.*;
-import com.sun.xml.internal.rngom.ast.om.*;
-
-/**
- * An input that can be turned into a RELAX NG pattern.
- *
- * <p>
- * This is either a RELAX NG schema in the XML format, or a RELAX NG
- * schema in the compact syntax.
- */
-public interface Parseable {
- /**
- * Parses this {@link Parseable} object into a RELAX NG pattern.
- *
- * @param sb
- * The builder of the schema object model. This object
- * dictates how the actual pattern is constructed.
- *
- * @return
- * a parsed object. Always returns a non-null valid object.
- */
- <P extends ParsedPattern> P parse(SchemaBuilder<?,P,?,?,?,?> sb) throws BuildException, IllegalSchemaException;
-
- /**
- * Called from {@link Include} in response to
- * {@link Include#endInclude(Parseable, String, String, Location, Annotations)}
- * to parse the included grammar.
- *
- * @param g
- * receives the events from the included grammar.
- */
- <P extends ParsedPattern> P parseInclude(String uri, SchemaBuilder<?,P,?,?,?,?> f, IncludedGrammar<P,?,?,?,?> g, String inheritedNs)
- throws BuildException, IllegalSchemaException;
-
- /**
- * Called from {@link SchemaBuilder} in response to
- * {@link SchemaBuilder#makeExternalRef(Parseable, String, String, Scope, Location, Annotations)}
- * to parse the referenced grammar.
- *
- * @param f
- * receives the events from the referenced grammar.
- */
- <P extends ParsedPattern> P parseExternal(String uri, SchemaBuilder<?,P,?,?,?,?> f, Scope s, String inheritedNs)
- throws BuildException, IllegalSchemaException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactParseable.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactParseable.java
deleted file mode 100644
index 7a2ba027..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactParseable.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.compact;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PushbackInputStream;
-import java.io.Reader;
-import java.net.URL;
-
-import com.sun.xml.internal.rngom.ast.builder.BuildException;
-import com.sun.xml.internal.rngom.ast.builder.IncludedGrammar;
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Scope;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import com.sun.xml.internal.rngom.xml.util.EncodingMap;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-
-/**
- * RELAX NG schema in the compact syntax.
- */
-public class CompactParseable implements Parseable {
- private final InputSource in;
- private final ErrorHandler eh;
-
- public CompactParseable(InputSource in, ErrorHandler eh) {
- this.in = in;
- this.eh = eh;
- }
-
- public ParsedPattern parse(SchemaBuilder sb) throws BuildException, IllegalSchemaException {
- ParsedPattern p = new CompactSyntax(this, makeReader(in), in.getSystemId(), sb, eh, "").parse(null);
- return sb.expandPattern(p);
- }
-
- public ParsedPattern parseInclude(String uri, SchemaBuilder sb, IncludedGrammar g, String inheritedNs)
- throws BuildException, IllegalSchemaException {
- InputSource tem = new InputSource(uri);
- tem.setEncoding(in.getEncoding());
- return new CompactSyntax(this, makeReader(tem), uri, sb, eh, inheritedNs).parseInclude(g);
- }
-
- public ParsedPattern parseExternal(String uri, SchemaBuilder sb, Scope scope, String inheritedNs)
- throws BuildException, IllegalSchemaException {
- InputSource tem = new InputSource(uri);
- tem.setEncoding(in.getEncoding());
- return new CompactSyntax(this, makeReader(tem), uri, sb, eh, inheritedNs).parse(scope);
- }
-
- private static final String UTF8 = EncodingMap.getJavaName("UTF-8");
- private static final String UTF16 = EncodingMap.getJavaName("UTF-16");
-
- private static Reader makeReader(InputSource is) throws BuildException {
- try {
- Reader r = is.getCharacterStream();
- if (r == null) {
- InputStream in = is.getByteStream();
- if (in == null) {
- String systemId = is.getSystemId();
- in = new URL(systemId).openStream();
- }
- String encoding = is.getEncoding();
- if (encoding == null) {
- PushbackInputStream pb = new PushbackInputStream(in, 2);
- encoding = detectEncoding(pb);
- in = pb;
- }
- r = new InputStreamReader(in, encoding);
- }
- return r;
- }
- catch (IOException e) {
- throw new BuildException(e);
- }
- }
-
- static private String detectEncoding(PushbackInputStream in) throws IOException {
- String encoding = UTF8;
- int b1 = in.read();
- if (b1 != -1) {
- int b2 = in.read();
- if (b2 != -1) {
- in.unread(b2);
- if ((b1 == 0xFF && b2 == 0xFE) || (b1 == 0xFE && b2 == 0xFF))
- encoding = UTF16;
- }
- in.unread(b1);
- }
- return encoding;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntax.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntax.java
deleted file mode 100644
index dac708e3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntax.java
+++ /dev/null
@@ -1,3388 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-/* Generated By:JavaCC: Do not edit this line. CompactSyntax.java */
-package com.sun.xml.internal.rngom.parse.compact;
-
-import java.io.Reader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Hashtable;
-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;
-import com.sun.xml.internal.rngom.ast.builder.DataPatternBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Div;
-import com.sun.xml.internal.rngom.ast.builder.ElementAnnotationBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Grammar;
-import com.sun.xml.internal.rngom.ast.builder.GrammarSection;
-import com.sun.xml.internal.rngom.ast.builder.Include;
-import com.sun.xml.internal.rngom.ast.builder.IncludedGrammar;
-import com.sun.xml.internal.rngom.ast.builder.NameClassBuilder;
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Scope;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedNameClass;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.parse.Context;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.LocatorImpl;
-
-import com.sun.xml.internal.rngom.util.Localizer;
-import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
-
-
-public class CompactSyntax implements Context, CompactSyntaxConstants {
- private static final int IN_ELEMENT = 0;
- private static final int IN_ATTRIBUTE = 1;
- private static final int IN_ANY_NAME = 2;
- private static final int IN_NS_NAME = 4;
-
- private String defaultNamespace;
- private String compatibilityPrefix = null;
- private SchemaBuilder sb;
- private NameClassBuilder ncb;
- private String sourceUri;
- /**
- * This is what we are parsing right now.
- */
- private CompactParseable parseable;
- private ErrorHandler eh;
- private final Hashtable namespaceTable = new Hashtable();
- private final Hashtable datatypesTable = new Hashtable();
- private boolean hadError = false;
- private static final Localizer localizer = new Localizer(new Localizer(Parseable.class),CompactSyntax.class);
- private final Hashtable attributeNameTable = new Hashtable();
- private boolean annotationsIncludeElements = false;
-
- /**
- * String that represents the inherited namespace.
- *
- * <p>
- * HACK: we always allocate a new String instance so that
- * we can distinguish inherited value from the explicitly
- * given value.
- */
- private /*final*/ String inheritedNs; // essentially final but JavaCC don't let us declare it as so.
-
- final class LocatedString {
- private final String str;
- private final Token tok;
-
- LocatedString(String str, Token tok) {
- this.str = str;
- this.tok = tok;
- }
-
- String getString() {
- return str;
- }
-
- Location getLocation() {
- return makeLocation(tok);
- }
-
- Token getToken() {
- return tok;
- }
-
- }
-
- public CompactSyntax(CompactParseable parseable, Reader r, String sourceUri, SchemaBuilder sb, ErrorHandler eh, String inheritedNs) {
- this(r);
- this.sourceUri = sourceUri;
- this.parseable = parseable;
- this.sb = sb;
- this.ncb = sb.getNameClassBuilder();
- this.eh = eh;
- // this causes the root pattern to have non-null annotations
- // which is useful because it gives a context to trang
- this.topLevelComments = sb.makeCommentList();
- this.inheritedNs = defaultNamespace = new String(inheritedNs);
- }
-
- ParsedPattern parse(Scope scope) throws IllegalSchemaException {
- try {
- ParsedPattern p = Input(scope);
- if (!hadError)
- return p;
- }
- catch (ParseException e) {
- error("syntax_error", e.getMessage(), e.currentToken.next);
- }
- catch (EscapeSyntaxException e) {
- reportEscapeSyntaxException(e);
- }
- throw new IllegalSchemaException();
- }
-
- ParsedPattern parseInclude(IncludedGrammar g) throws IllegalSchemaException {
- try {
- ParsedPattern p = IncludedGrammar(g);
- if (!hadError)
- return p;
- }
- catch (ParseException e) {
- error("syntax_error", e.getMessage(), e.currentToken.next);
- }
- catch (EscapeSyntaxException e) {
- reportEscapeSyntaxException(e);
- }
- throw new IllegalSchemaException();
- }
-
- private void checkNsName(int context, LocatedString ns) {
- if ((context & IN_NS_NAME) != 0)
- error("ns_name_except_contains_ns_name", ns.getToken());
- }
-
- private void checkAnyName(int context, Token t) {
- if ((context & IN_NS_NAME) != 0)
- error("ns_name_except_contains_any_name", t);
- if ((context & IN_ANY_NAME) != 0)
- error("any_name_except_contains_any_name", t);
- }
-
- private void error(String key, Token tok) {
- doError(localizer.message(key), tok);
- }
-
- private void error(String key, String arg, Token tok) {
- doError(localizer.message(key, arg), tok);
- }
-
- private void error(String key, String arg1, String arg2, Token tok) {
- doError(localizer.message(key, arg1, arg2), tok);
- }
-
- private void doError(String message, Token tok) {
- hadError = true;
- if (eh != null) {
- LocatorImpl loc = new LocatorImpl();
- loc.setLineNumber(tok.beginLine);
- loc.setColumnNumber(tok.beginColumn);
- loc.setSystemId(sourceUri);
- try {
- eh.error(new SAXParseException(message, loc));
- }
- catch (SAXException se) {
- throw new BuildException(se);
- }
- }
- }
-
- private void reportEscapeSyntaxException(EscapeSyntaxException e) {
- if (eh != null) {
- LocatorImpl loc = new LocatorImpl();
- loc.setLineNumber(e.getLineNumber());
- loc.setColumnNumber(e.getColumnNumber());
- loc.setSystemId(sourceUri);
- try {
- eh.error(new SAXParseException(localizer.message(e.getKey()), loc));
- }
- catch (SAXException se) {
- throw new BuildException(se);
- }
- }
- }
-
- private static String unquote(String s) {
- if (s.length() >= 6 && s.charAt(0) == s.charAt(1)) {
- s = s.replace('\u0000', '\u005cn');
- return s.substring(3, s.length() - 3);
- }
- else
- return s.substring(1, s.length() - 1);
- }
-
- Location makeLocation(Token t) {
- return sb.makeLocation(sourceUri, t.beginLine, t.beginColumn);
- }
-
- private static ParsedPattern[] addPattern(ParsedPattern[] patterns, int i, ParsedPattern p) {
- if (i >= patterns.length) {
- ParsedPattern[] oldPatterns = patterns;
- patterns = new ParsedPattern[oldPatterns.length*2];
- System.arraycopy(oldPatterns, 0, patterns, 0, oldPatterns.length);
- }
- patterns[i] = p;
- return patterns;
- }
-
- String getCompatibilityPrefix() {
- if (compatibilityPrefix == null) {
- compatibilityPrefix = "a";
- while (namespaceTable.get(compatibilityPrefix) != null)
- compatibilityPrefix = compatibilityPrefix + "a";
- }
- return compatibilityPrefix;
- }
-
- public String resolveNamespacePrefix(String prefix) {
- String result = (String)namespaceTable.get(prefix);
- if (result.length() == 0)
- return null;
- return result;
- }
-
- public Enumeration prefixes() {
- return namespaceTable.keys();
- }
-
- public String getBaseUri() {
- return sourceUri;
- }
-
- public boolean isUnparsedEntity(String entityName) {
- return false;
- }
-
- public boolean isNotation(String notationName) {
- return false;
- }
-
- public Context copy() {
- return this;
- }
-
- private Context getContext() {
- return this;
- }
-
- private CommentList getComments() {
- return getComments(getTopLevelComments());
- }
-
- private CommentList topLevelComments;
-
- private CommentList getTopLevelComments() {
- CommentList tem = topLevelComments;
- topLevelComments = null;
- return tem;
- }
-
- private void noteTopLevelComments() {
- topLevelComments = getComments(topLevelComments);
- }
-
- private void topLevelComments(GrammarSection section) {
- section.topLevelComment(getComments(null));
- }
-
- private Token lastCommentSourceToken = null;
-
- private CommentList getComments(CommentList comments) {
- Token nextToken = getToken(1);
- if (lastCommentSourceToken != nextToken) {
- if (lastCommentSourceToken == null)
- lastCommentSourceToken = token;
- do {
- lastCommentSourceToken = lastCommentSourceToken.next;
- Token t = lastCommentSourceToken.specialToken;
- if (t != null) {
- while (t.specialToken != null)
- t = t.specialToken;
- if (comments == null)
- comments = sb.makeCommentList();
- for (; t != null; t = t.next) {
- String s = mungeComment(t.image);
- Location loc = makeLocation(t);
- if (t.next != null
- && t.next.kind == CompactSyntaxConstants.SINGLE_LINE_COMMENT_CONTINUE) {
- StringBuffer buf = new StringBuffer(s);
- do {
- t = t.next;
- buf.append('\u005cn');
- buf.append(mungeComment(t.image));
- } while (t.next != null
- && t.next.kind == CompactSyntaxConstants.SINGLE_LINE_COMMENT_CONTINUE);
- s = buf.toString();
- }
- comments.addComment(s, loc);
- }
- }
- } while (lastCommentSourceToken != nextToken);
- }
- return comments;
- }
-
- private ParsedPattern afterComments(ParsedPattern p) {
- CommentList comments = getComments(null);
- if (comments == null)
- return p;
- return sb.commentAfter(p, comments);
- }
-
- private ParsedNameClass afterComments(ParsedNameClass nc) {
- CommentList comments = getComments(null);
- if (comments == null)
- return nc;
- return ncb.commentAfter(nc, comments);
- }
-
- private static String mungeComment(String image) {
- int i = image.indexOf('#') + 1;
- while (i < image.length() && image.charAt(i) == '#')
- i++;
- if (i < image.length() && image.charAt(i) == ' ')
- i++;
- return image.substring(i);
- }
-
- private Annotations getCommentsAsAnnotations() {
- CommentList comments = getComments();
- if (comments == null)
- return null;
- return sb.makeAnnotations(comments, getContext());
- }
-
- private Annotations addCommentsToChildAnnotations(Annotations a) {
- CommentList comments = getComments();
- if (comments == null)
- return a;
- if (a == null)
- a = sb.makeAnnotations(null, getContext());
- a.addComment(comments);
- return a;
- }
-
- private Annotations addCommentsToLeadingAnnotations(Annotations a) {
- CommentList comments = getComments();
- if (comments == null)
- return a;
- if (a == null)
- return sb.makeAnnotations(comments, getContext());
- a.addLeadingComment(comments);
- return a;
- }
-
- private Annotations getTopLevelCommentsAsAnnotations() {
- CommentList comments = getTopLevelComments();
- if (comments == null)
- return null;
- return sb.makeAnnotations(comments, getContext());
- }
-
- private void clearAttributeList() {
- attributeNameTable.clear();
- }
-
- private void addAttribute(Annotations a, String ns, String localName, String prefix, String value, Token tok) {
- String key = ns + "#" + localName;
- if (attributeNameTable.get(key) != null)
- error("duplicate_attribute", ns, localName, tok);
- else {
- attributeNameTable.put(key, key);
- a.addAttribute(ns, localName, prefix, value, makeLocation(tok));
- }
- }
-
- private void checkExcept(Token[] except) {
- if (except[0] != null)
- error("except_missing_parentheses", except[0]);
- }
-
- private String lookupPrefix(String prefix, Token t) {
- String ns = (String)namespaceTable.get(prefix);
- if (ns == null) {
- error("undeclared_prefix", prefix, t);
- return "#error";
- }
- return ns;
- }
- private String lookupDatatype(String prefix, Token t) {
- String ns = (String)datatypesTable.get(prefix);
- if (ns == null) {
- error("undeclared_prefix", prefix, t);
- return ""; // XXX
- }
- return ns;
- }
- private String resolve(String str) {
- try {
- return new URL(new URL(sourceUri), str).toString();
- }
- catch (MalformedURLException e) { }
- return str;
- }
-
- final public ParsedPattern Input(Scope scope) throws ParseException {
- ParsedPattern p;
- Preamble();
- if (jj_2_1(2147483647)) {
- p = TopLevelGrammar(scope);
- } else {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 1:
- case 10:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 28:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case DOCUMENTATION:
- case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- case PREFIXED_NAME:
- case LITERAL:
- p = Expr(true, scope, null, null);
- p = afterComments(p);
- jj_consume_token(0);
- break;
- default:
- jj_la1[0] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- {if (true) return p;}
- throw new Error("Missing return statement in function");
- }
-
- final public void TopLevelLookahead() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PREFIXED_NAME:
- jj_consume_token(PREFIXED_NAME);
- jj_consume_token(1);
- break;
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- Identifier();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 1:
- jj_consume_token(1);
- break;
- case 2:
- jj_consume_token(2);
- break;
- case 3:
- jj_consume_token(3);
- break;
- case 4:
- jj_consume_token(4);
- break;
- default:
- jj_la1[1] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- break;
- case 5:
- case 6:
- case 7:
- LookaheadGrammarKeyword();
- break;
- case 1:
- LookaheadBody();
- LookaheadAfterAnnotations();
- break;
- case DOCUMENTATION:
- case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
- LookaheadDocumentation();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 1:
- LookaheadBody();
- break;
- default:
- jj_la1[2] = jj_gen;
- ;
- }
- LookaheadAfterAnnotations();
- break;
- default:
- jj_la1[3] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
-
- final public void LookaheadAfterAnnotations() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- Identifier();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 2:
- jj_consume_token(2);
- break;
- case 3:
- jj_consume_token(3);
- break;
- case 4:
- jj_consume_token(4);
- break;
- default:
- jj_la1[4] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- break;
- case 5:
- case 6:
- case 7:
- LookaheadGrammarKeyword();
- break;
- default:
- jj_la1[5] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
-
- final public void LookaheadGrammarKeyword() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 5:
- jj_consume_token(5);
- break;
- case 6:
- jj_consume_token(6);
- break;
- case 7:
- jj_consume_token(7);
- break;
- default:
- jj_la1[6] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
-
- final public void LookaheadDocumentation() throws ParseException {
- label_1:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOCUMENTATION:
- jj_consume_token(DOCUMENTATION);
- break;
- case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
- jj_consume_token(DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT);
- break;
- default:
- jj_la1[7] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- label_2:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOCUMENTATION_CONTINUE:
- ;
- break;
- default:
- jj_la1[8] = jj_gen;
- break label_2;
- }
- jj_consume_token(DOCUMENTATION_CONTINUE);
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOCUMENTATION:
- case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
- ;
- break;
- default:
- jj_la1[9] = jj_gen;
- break label_1;
- }
- }
- }
-
- final public void LookaheadBody() throws ParseException {
- jj_consume_token(1);
- label_3:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 1:
- case 2:
- case 5:
- case 6:
- case 7:
- case 8:
- case 10:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- case PREFIXED_NAME:
- case LITERAL:
- ;
- break;
- default:
- jj_la1[10] = jj_gen;
- break label_3;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PREFIXED_NAME:
- jj_consume_token(PREFIXED_NAME);
- break;
- case 5:
- case 6:
- case 7:
- case 10:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- UnprefixedName();
- break;
- case 2:
- jj_consume_token(2);
- break;
- case LITERAL:
- jj_consume_token(LITERAL);
- break;
- case 8:
- jj_consume_token(8);
- break;
- case 1:
- LookaheadBody();
- break;
- default:
- jj_la1[11] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- jj_consume_token(9);
- }
-
- final public ParsedPattern IncludedGrammar(IncludedGrammar g) throws ParseException {
- Annotations a;
- ParsedPattern p;
- Preamble();
- if (jj_2_2(2147483647)) {
- a = GrammarBody(g, g, getTopLevelCommentsAsAnnotations());
- } else {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 1:
- case 10:
- case DOCUMENTATION:
- case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
- a = Annotations();
- jj_consume_token(10);
- jj_consume_token(11);
- a = GrammarBody(g, g, a);
- topLevelComments(g);
- jj_consume_token(12);
- break;
- default:
- jj_la1[12] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- p = afterComments(g.endIncludedGrammar(sb.makeLocation(sourceUri, 1, 1), a));
- jj_consume_token(0);
- {if (true) return p;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern TopLevelGrammar(Scope scope) throws ParseException {
- Annotations a = getTopLevelCommentsAsAnnotations();
- Grammar g;
- ParsedPattern p;
- g = sb.makeGrammar(scope);
- a = GrammarBody(g, g, a);
- p = afterComments(g.endGrammar(sb.makeLocation(sourceUri, 1, 1), a));
- jj_consume_token(0);
- {if (true) return p;}
- throw new Error("Missing return statement in function");
- }
-
- final public void Preamble() throws ParseException {
- label_4:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 13:
- case 14:
- case 16:
- ;
- break;
- default:
- jj_la1[13] = jj_gen;
- break label_4;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 13:
- case 14:
- NamespaceDecl();
- break;
- case 16:
- DatatypesDecl();
- break;
- default:
- jj_la1[14] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- namespaceTable.put("xml", WellKnownNamespaces.XML);
- if (datatypesTable.get("xsd") == null)
- datatypesTable.put("xsd", WellKnownNamespaces.XML_SCHEMA_DATATYPES);
- }
-
- final public void NamespaceDecl() throws ParseException {
- LocatedString prefix = null;
- boolean isDefault = false;
- String namespaceName;
- noteTopLevelComments();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 13:
- jj_consume_token(13);
- prefix = UnprefixedName();
- break;
- case 14:
- jj_consume_token(14);
- isDefault = true;
- jj_consume_token(13);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 5:
- case 6:
- case 7:
- case 10:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- prefix = UnprefixedName();
- break;
- default:
- jj_la1[15] = jj_gen;
- ;
- }
- break;
- default:
- jj_la1[16] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- jj_consume_token(2);
- namespaceName = NamespaceName();
- if (isDefault)
- defaultNamespace = namespaceName;
- if (prefix != null) {
- if (prefix.getString().equals("xmlns"))
- error("xmlns_prefix", prefix.getToken());
- else if (prefix.getString().equals("xml")) {
- if (!namespaceName.equals(WellKnownNamespaces.XML))
- error("xml_prefix_bad_uri", prefix.getToken());
- }
- else if (namespaceName.equals(WellKnownNamespaces.XML))
- error("xml_uri_bad_prefix", prefix.getToken());
- else {
- if (namespaceName.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_ANNOTATIONS))
- compatibilityPrefix = prefix.getString();
- namespaceTable.put(prefix.getString(), namespaceName);
- }
- }
- }
-
- final public String NamespaceName() throws ParseException {
- String r;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LITERAL:
- r = Literal();
- break;
- case 15:
- jj_consume_token(15);
- r = this.inheritedNs;
- break;
- default:
- jj_la1[17] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return r;}
- throw new Error("Missing return statement in function");
- }
-
- final public void DatatypesDecl() throws ParseException {
- LocatedString prefix;
- String uri;
- noteTopLevelComments();
- jj_consume_token(16);
- prefix = UnprefixedName();
- jj_consume_token(2);
- uri = Literal();
- datatypesTable.put(prefix.getString(), uri);
- }
-
- final public ParsedPattern AnnotatedPrimaryExpr(boolean topLevel, Scope scope, Token[] except) throws ParseException {
- Annotations a;
- ParsedPattern p;
- ParsedElementAnnotation e;
- Token t;
- a = Annotations();
- p = PrimaryExpr(topLevel, scope, a, except);
- label_5:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case FANNOTATE:
- ;
- break;
- default:
- jj_la1[18] = jj_gen;
- break label_5;
- }
- t = jj_consume_token(FANNOTATE);
- e = AnnotationElement(false);
- if (topLevel)
- error("top_level_follow_annotation", t);
- else
- p = sb.annotateAfter(p, e);
- }
- {if (true) return p;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern PrimaryExpr(boolean topLevel, Scope scope, Annotations a, Token[] except) throws ParseException {
- ParsedPattern p;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 26:
- p = ElementExpr(scope, a);
- break;
- case 27:
- p = AttributeExpr(scope, a);
- break;
- case 10:
- p = GrammarExpr(scope, a);
- break;
- case 33:
- p = ExternalRefExpr(scope, a);
- break;
- case 31:
- p = ListExpr(scope, a);
- break;
- case 32:
- p = MixedExpr(scope, a);
- break;
- case 28:
- p = ParenExpr(topLevel, scope, a);
- break;
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- p = IdentifierExpr(scope, a);
- break;
- case 34:
- p = ParentExpr(scope, a);
- break;
- case 35:
- case 36:
- case PREFIXED_NAME:
- p = DataExpr(topLevel, scope, a, except);
- break;
- case LITERAL:
- p = ValueExpr(topLevel, a);
- break;
- case 18:
- p = TextExpr(a);
- break;
- case 17:
- p = EmptyExpr(a);
- break;
- case 19:
- p = NotAllowedExpr(a);
- break;
- default:
- jj_la1[19] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return p;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern EmptyExpr(Annotations a) throws ParseException {
- Token t;
- t = jj_consume_token(17);
- {if (true) return sb.makeEmpty(makeLocation(t), a);}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern TextExpr(Annotations a) throws ParseException {
- Token t;
- t = jj_consume_token(18);
- {if (true) return sb.makeText(makeLocation(t), a);}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern NotAllowedExpr(Annotations a) throws ParseException {
- Token t;
- t = jj_consume_token(19);
- {if (true) return sb.makeNotAllowed(makeLocation(t), a);}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern Expr(boolean topLevel, Scope scope, Token t, Annotations a) throws ParseException {
- List patterns = new ArrayList();
- ParsedPattern p;
- boolean[] hadOccur = new boolean[1];
- Token[] except = new Token[1];
- p = UnaryExpr(topLevel, scope, hadOccur, except);
- patterns.add(p);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 20:
- case 21:
- case 22:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 20:
- checkExcept(except);
- label_6:
- while (true) {
- t = jj_consume_token(20);
- p = UnaryExpr(topLevel, scope, null, except);
- patterns.add(p); checkExcept(except);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 20:
- ;
- break;
- default:
- jj_la1[20] = jj_gen;
- break label_6;
- }
- }
- p = sb.makeChoice(patterns, makeLocation(t), a);
- break;
- case 21:
- label_7:
- while (true) {
- t = jj_consume_token(21);
- p = UnaryExpr(topLevel, scope, null, except);
- patterns.add(p); checkExcept(except);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 21:
- ;
- break;
- default:
- jj_la1[21] = jj_gen;
- break label_7;
- }
- }
- p = sb.makeInterleave(patterns, makeLocation(t), a);
- break;
- case 22:
- label_8:
- while (true) {
- t = jj_consume_token(22);
- p = UnaryExpr(topLevel, scope, null, except);
- patterns.add(p); checkExcept(except);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 22:
- ;
- break;
- default:
- jj_la1[22] = jj_gen;
- break label_8;
- }
- }
- p = sb.makeGroup(patterns, makeLocation(t), a);
- break;
- default:
- jj_la1[23] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- break;
- default:
- jj_la1[24] = jj_gen;
- ;
- }
- if (patterns.size() == 1 && a != null) {
- if (hadOccur[0])
- p = sb.annotate(p, a);
- else
- p = sb.makeGroup(patterns, makeLocation(t), a);
- }
- {if (true) return p;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern UnaryExpr(boolean topLevel, Scope scope, boolean[] hadOccur, Token[] except) throws ParseException {
- ParsedPattern p;
- Token t;
- ParsedElementAnnotation e;
- p = AnnotatedPrimaryExpr(topLevel, scope, except);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 23:
- case 24:
- case 25:
- if (hadOccur != null) hadOccur[0] = true;
- p = afterComments(p);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 23:
- t = jj_consume_token(23);
- checkExcept(except); p = sb.makeOneOrMore(p, makeLocation(t), null);
- break;
- case 24:
- t = jj_consume_token(24);
- checkExcept(except); p = sb.makeOptional(p, makeLocation(t), null);
- break;
- case 25:
- t = jj_consume_token(25);
- checkExcept(except); p = sb.makeZeroOrMore(p, makeLocation(t), null);
- break;
- default:
- jj_la1[25] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- label_9:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case FANNOTATE:
- ;
- break;
- default:
- jj_la1[26] = jj_gen;
- break label_9;
- }
- t = jj_consume_token(FANNOTATE);
- e = AnnotationElement(false);
- if (topLevel)
- error("top_level_follow_annotation", t);
- else
- p = sb.annotateAfter(p, e);
- }
- break;
- default:
- jj_la1[27] = jj_gen;
- ;
- }
- {if (true) return p;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern ElementExpr(Scope scope, Annotations a) throws ParseException {
- Token t;
- ParsedNameClass nc;
- ParsedPattern p;
- t = jj_consume_token(26);
- nc = NameClass(IN_ELEMENT, null);
- jj_consume_token(11);
- p = Expr(false, scope, null, null);
- p = afterComments(p);
- jj_consume_token(12);
- {if (true) return sb.makeElement(nc, p, makeLocation(t), a);}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern AttributeExpr(Scope scope, Annotations a) throws ParseException {
- Token t;
- ParsedNameClass nc;
- ParsedPattern p;
- t = jj_consume_token(27);
- nc = NameClass(IN_ATTRIBUTE, null);
- jj_consume_token(11);
- p = Expr(false, scope, null, null);
- p = afterComments(p);
- jj_consume_token(12);
- {if (true) return sb.makeAttribute(nc, p, makeLocation(t), a);}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedNameClass NameClass(int context, Annotations[] pa) throws ParseException {
- Annotations a;
- ParsedNameClass nc;
- a = Annotations();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 5:
- case 6:
- case 7:
- case 10:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 28:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- case PREFIXED_NAME:
- nc = PrimaryNameClass(context, a);
- nc = AnnotateAfter(nc);
- nc = NameClassAlternatives(context, nc, pa);
- break;
- case 25:
- nc = AnyNameExceptClass(context, a, pa);
- break;
- case PREFIX_STAR:
- nc = NsNameExceptClass(context, a, pa);
- break;
- default:
- jj_la1[28] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return nc;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedNameClass AnnotateAfter(ParsedNameClass nc) throws ParseException {
- ParsedElementAnnotation e;
- label_10:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case FANNOTATE:
- ;
- break;
- default:
- jj_la1[29] = jj_gen;
- break label_10;
- }
- jj_consume_token(FANNOTATE);
- e = AnnotationElement(false);
- nc = ncb.annotateAfter(nc, e);
- }
- {if (true) return nc;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedNameClass NameClassAlternatives(int context, ParsedNameClass nc, Annotations[] pa) throws ParseException {
- Token t;
- ParsedNameClass[] nameClasses;
- int nNameClasses;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 20:
- nameClasses = new ParsedNameClass[2];
- nameClasses[0] = nc;
- nNameClasses = 1;
- label_11:
- while (true) {
- t = jj_consume_token(20);
- nc = BasicNameClass(context);
- nc = AnnotateAfter(nc);
- if (nNameClasses >= nameClasses.length) {
- ParsedNameClass[] oldNameClasses = nameClasses;
- nameClasses = new ParsedNameClass[oldNameClasses.length*2];
- System.arraycopy(oldNameClasses, 0, nameClasses, 0, oldNameClasses.length);
- }
- nameClasses[nNameClasses++] = nc;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 20:
- ;
- break;
- default:
- jj_la1[30] = jj_gen;
- break label_11;
- }
- }
- Annotations a;
- if (pa == null)
- a = null;
- else {
- a = pa[0];
- pa[0] = null;
- }
- nc = ncb.makeChoice(Arrays.asList(nameClasses).subList(0,nNameClasses), makeLocation(t), a);
- break;
- default:
- jj_la1[31] = jj_gen;
- ;
- }
- {if (true) return nc;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedNameClass BasicNameClass(int context) throws ParseException {
- Annotations a;
- ParsedNameClass nc;
- a = Annotations();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 5:
- case 6:
- case 7:
- case 10:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 28:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- case PREFIXED_NAME:
- nc = PrimaryNameClass(context, a);
- break;
- case 25:
- case PREFIX_STAR:
- nc = OpenNameClass(context, a);
- break;
- default:
- jj_la1[32] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return nc;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedNameClass PrimaryNameClass(int context, Annotations a) throws ParseException {
- ParsedNameClass nc;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 5:
- case 6:
- case 7:
- case 10:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- nc = UnprefixedNameClass(context, a);
- break;
- case PREFIXED_NAME:
- nc = PrefixedNameClass(a);
- break;
- case 28:
- nc = ParenNameClass(context, a);
- break;
- default:
- jj_la1[33] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return nc;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedNameClass OpenNameClass(int context, Annotations a) throws ParseException {
- Token t;
- LocatedString ns;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PREFIX_STAR:
- ns = NsName();
- checkNsName(context, ns); {if (true) return ncb.makeNsName(ns.getString(), ns.getLocation(), a);}
- break;
- case 25:
- t = jj_consume_token(25);
- checkAnyName(context, t); {if (true) return ncb.makeAnyName(makeLocation(t), a);}
- break;
- default:
- jj_la1[34] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedNameClass UnprefixedNameClass(int context, Annotations a) throws ParseException {
- LocatedString name;
- name = UnprefixedName();
- String ns;
- if ((context & (IN_ATTRIBUTE|IN_ELEMENT)) == IN_ATTRIBUTE)
- ns = "";
- else
- ns = defaultNamespace;
- {if (true) return ncb.makeName(ns, name.getString(), null, name.getLocation(), a);}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedNameClass PrefixedNameClass(Annotations a) throws ParseException {
- Token t;
- t = jj_consume_token(PREFIXED_NAME);
- String qn = t.image;
- int colon = qn.indexOf(':');
- String prefix = qn.substring(0, colon);
- {if (true) return ncb.makeName(lookupPrefix(prefix, t), qn.substring(colon + 1), prefix, makeLocation(t), a);}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedNameClass NsNameExceptClass(int context, Annotations a, Annotations[] pa) throws ParseException {
- LocatedString ns;
- ParsedNameClass nc;
- ns = NsName();
- checkNsName(context, ns);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 30:
- nc = ExceptNameClass(context | IN_NS_NAME);
- nc = ncb.makeNsName(ns.getString(), nc, ns.getLocation(), a);
- nc = AnnotateAfter(nc);
- break;
- default:
- jj_la1[35] = jj_gen;
- nc = ncb.makeNsName(ns.getString(), ns.getLocation(), a);
- nc = AnnotateAfter(nc);
- nc = NameClassAlternatives(context, nc, pa);
- }
- {if (true) return nc;}
- throw new Error("Missing return statement in function");
- }
-
- final public LocatedString NsName() throws ParseException {
- Token t;
- t = jj_consume_token(PREFIX_STAR);
- String qn = t.image;
- String prefix = qn.substring(0, qn.length() - 2);
- {if (true) return new LocatedString(lookupPrefix(prefix, t), t);}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedNameClass AnyNameExceptClass(int context, Annotations a, Annotations[] pa) throws ParseException {
- Token t;
- ParsedNameClass nc;
- t = jj_consume_token(25);
- checkAnyName(context, t);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 30:
- nc = ExceptNameClass(context | IN_ANY_NAME);
- nc = ncb.makeAnyName(nc, makeLocation(t), a);
- nc = AnnotateAfter(nc);
- break;
- default:
- jj_la1[36] = jj_gen;
- nc = ncb.makeAnyName(makeLocation(t), a);
- nc = AnnotateAfter(nc);
- nc = NameClassAlternatives(context, nc, pa);
- }
- {if (true) return nc;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedNameClass ParenNameClass(int context, Annotations a) throws ParseException {
- Token t;
- ParsedNameClass nc;
- Annotations[] pa = new Annotations[]{ a };
- t = jj_consume_token(28);
- nc = NameClass(context, pa);
- nc = afterComments(nc);
- jj_consume_token(29);
- if (pa[0] != null)
- nc = ncb.makeChoice(Collections.singletonList(nc), makeLocation(t), pa[0]);
- {if (true) return nc;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedNameClass ExceptNameClass(int context) throws ParseException {
- ParsedNameClass nc;
- jj_consume_token(30);
- nc = BasicNameClass(context);
- {if (true) return nc;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern ListExpr(Scope scope, Annotations a) throws ParseException {
- Token t;
- ParsedPattern p;
- t = jj_consume_token(31);
- jj_consume_token(11);
- p = Expr(false, scope, null, null);
- p = afterComments(p);
- jj_consume_token(12);
- {if (true) return sb.makeList(p, makeLocation(t), a);}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern MixedExpr(Scope scope, Annotations a) throws ParseException {
- Token t;
- ParsedPattern p;
- t = jj_consume_token(32);
- jj_consume_token(11);
- p = Expr(false, scope, null, null);
- p = afterComments(p);
- jj_consume_token(12);
- {if (true) return sb.makeMixed(p, makeLocation(t), a);}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern GrammarExpr(Scope scope, Annotations a) throws ParseException {
- Token t;
- Grammar g;
- t = jj_consume_token(10);
- g = sb.makeGrammar(scope);
- jj_consume_token(11);
- a = GrammarBody(g, g, a);
- topLevelComments(g);
- jj_consume_token(12);
- {if (true) return g.endGrammar(makeLocation(t), a);}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern ParenExpr(boolean topLevel, Scope scope, Annotations a) throws ParseException {
- Token t;
- ParsedPattern p;
- t = jj_consume_token(28);
- p = Expr(topLevel, scope, t, a);
- p = afterComments(p);
- jj_consume_token(29);
- {if (true) return p;}
- throw new Error("Missing return statement in function");
- }
-
- final public Annotations GrammarBody(GrammarSection section, Scope scope, Annotations a) throws ParseException {
- ParsedElementAnnotation e;
- label_12:
- while (true) {
- if (jj_2_3(2)) {
- ;
- } else {
- break label_12;
- }
- e = AnnotationElementNotKeyword();
- if (a == null) a = sb.makeAnnotations(null, getContext()); a.addElement(e);
- }
- label_13:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 1:
- case 5:
- case 6:
- case 7:
- case DOCUMENTATION:
- case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- ;
- break;
- default:
- jj_la1[37] = jj_gen;
- break label_13;
- }
- GrammarComponent(section, scope);
- }
- {if (true) return a;}
- throw new Error("Missing return statement in function");
- }
-
- final public void GrammarComponent(GrammarSection section, Scope scope) throws ParseException {
- ParsedElementAnnotation e;
- Annotations a;
- a = Annotations();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 5:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- Definition(section, scope, a);
- break;
- case 7:
- Include(section, scope, a);
- break;
- case 6:
- Div(section, scope, a);
- break;
- default:
- jj_la1[38] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- label_14:
- while (true) {
- if (jj_2_4(2)) {
- ;
- } else {
- break label_14;
- }
- e = AnnotationElementNotKeyword();
- section.topLevelAnnotation(e);
- }
- }
-
- final public void Definition(GrammarSection section, Scope scope, Annotations a) throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- Define(section, scope, a);
- break;
- case 5:
- Start(section, scope, a);
- break;
- default:
- jj_la1[39] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
-
- final public void Start(GrammarSection section, Scope scope, Annotations a) throws ParseException {
- Token t;
- GrammarSection.Combine combine;
- ParsedPattern p;
- t = jj_consume_token(5);
- combine = AssignOp();
- p = Expr(false, scope, null, null);
- section.define(GrammarSection.START, combine, p, makeLocation(t), a);
- }
-
- final public void Define(GrammarSection section, Scope scope, Annotations a) throws ParseException {
- LocatedString name;
- GrammarSection.Combine combine;
- ParsedPattern p;
- name = Identifier();
- combine = AssignOp();
- p = Expr(false, scope, null, null);
- section.define(name.getString(), combine, p, name.getLocation(), a);
- }
-
- final public GrammarSection.Combine AssignOp() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 2:
- jj_consume_token(2);
- {if (true) return null;}
- break;
- case 4:
- jj_consume_token(4);
- {if (true) return GrammarSection.COMBINE_CHOICE;}
- break;
- case 3:
- jj_consume_token(3);
- {if (true) return GrammarSection.COMBINE_INTERLEAVE;}
- break;
- default:
- jj_la1[40] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
- final public void Include(GrammarSection section, Scope scope, Annotations a) throws ParseException {
- Token t;
- String href;
- String ns;
- Include include = section.makeInclude();
- t = jj_consume_token(7);
- href = Literal();
- ns = Inherit();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 11:
- jj_consume_token(11);
- a = IncludeBody(include, scope, a);
- topLevelComments(include);
- jj_consume_token(12);
- break;
- default:
- jj_la1[41] = jj_gen;
- ;
- }
- try {
- include.endInclude(parseable, resolve(href), ns, makeLocation(t), a);
- }
- catch (IllegalSchemaException e) { }
- }
-
- final public Annotations IncludeBody(GrammarSection section, Scope scope, Annotations a) throws ParseException {
- ParsedElementAnnotation e;
- label_15:
- while (true) {
- if (jj_2_5(2)) {
- ;
- } else {
- break label_15;
- }
- e = AnnotationElementNotKeyword();
- if (a == null) a = sb.makeAnnotations(null, getContext()); a.addElement(e);
- }
- label_16:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 1:
- case 5:
- case 6:
- case DOCUMENTATION:
- case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- ;
- break;
- default:
- jj_la1[42] = jj_gen;
- break label_16;
- }
- IncludeComponent(section, scope);
- }
- {if (true) return a;}
- throw new Error("Missing return statement in function");
- }
-
- final public void IncludeComponent(GrammarSection section, Scope scope) throws ParseException {
- ParsedElementAnnotation e;
- Annotations a;
- a = Annotations();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 5:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- Definition(section, scope, a);
- break;
- case 6:
- IncludeDiv(section, scope, a);
- break;
- default:
- jj_la1[43] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- label_17:
- while (true) {
- if (jj_2_6(2)) {
- ;
- } else {
- break label_17;
- }
- e = AnnotationElementNotKeyword();
- section.topLevelAnnotation(e);
- }
- }
-
- final public void Div(GrammarSection section, Scope scope, Annotations a) throws ParseException {
- Token t;
- Div div = section.makeDiv();
- t = jj_consume_token(6);
- jj_consume_token(11);
- a = GrammarBody(div, scope, a);
- topLevelComments(div);
- jj_consume_token(12);
- div.endDiv(makeLocation(t), a);
- }
-
- final public void IncludeDiv(GrammarSection section, Scope scope, Annotations a) throws ParseException {
- Token t;
- Div div = section.makeDiv();
- t = jj_consume_token(6);
- jj_consume_token(11);
- a = IncludeBody(div, scope, a);
- topLevelComments(div);
- jj_consume_token(12);
- div.endDiv(makeLocation(t), a);
- }
-
- final public ParsedPattern ExternalRefExpr(Scope scope, Annotations a) throws ParseException {
- Token t;
- String href;
- String ns;
- t = jj_consume_token(33);
- href = Literal();
- ns = Inherit();
- try {
- {if (true) return sb.makeExternalRef(parseable, resolve(href), ns, scope, makeLocation(t), a);}
- }
- catch (IllegalSchemaException e) {
- {if (true) return sb.makeErrorPattern();}
- }
- throw new Error("Missing return statement in function");
- }
-
- final public String Inherit() throws ParseException {
- String ns = null;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 15:
- jj_consume_token(15);
- jj_consume_token(2);
- ns = Prefix();
- break;
- default:
- jj_la1[44] = jj_gen;
- ;
- }
- if (ns == null)
- ns = defaultNamespace;
- {if (true) return ns;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern ParentExpr(Scope scope, Annotations a) throws ParseException {
- LocatedString name;
- jj_consume_token(34);
- a = addCommentsToChildAnnotations(a);
- name = Identifier();
- if(scope==null) {
- error("parent_ref_outside_grammar",name.getToken());
- {if (true) return sb.makeErrorPattern();}
- } else {
- {if (true) return scope.makeParentRef(name.getString(), name.getLocation(), a);}
- }
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern IdentifierExpr(Scope scope, Annotations a) throws ParseException {
- LocatedString name;
- name = Identifier();
- if(scope==null) {
- error("ref_outside_grammar",name.getToken());
- {if (true) return sb.makeErrorPattern();}
- } else {
- {if (true) return scope.makeRef(name.getString(), name.getLocation(), a);}
- }
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern ValueExpr(boolean topLevel, Annotations a) throws ParseException {
- LocatedString s;
- s = LocatedLiteral();
- if (topLevel && annotationsIncludeElements) {
- error("top_level_follow_annotation", s.getToken());
- a = null;
- }
- {if (true) return sb.makeValue("", "token", s.getString(), getContext(), defaultNamespace, s.getLocation(), a);}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedPattern DataExpr(boolean topLevel, Scope scope, Annotations a, Token[] except) throws ParseException {
- Token datatypeToken;
- Location loc;
- String datatype;
- String datatypeUri = null;
- String s = null;
- ParsedPattern e = null;
- DataPatternBuilder dpb;
- datatypeToken = DatatypeName();
- datatype = datatypeToken.image;
- loc = makeLocation(datatypeToken);
- int colon = datatype.indexOf(':');
- if (colon < 0)
- datatypeUri = "";
- else {
- String prefix = datatype.substring(0, colon);
- datatypeUri = lookupDatatype(prefix, datatypeToken);
- datatype = datatype.substring(colon + 1);
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LITERAL:
- s = Literal();
- if (topLevel && annotationsIncludeElements) {
- error("top_level_follow_annotation", datatypeToken);
- a = null;
- }
- {if (true) return sb.makeValue(datatypeUri, datatype, s, getContext(), defaultNamespace, loc, a);}
- break;
- default:
- jj_la1[48] = jj_gen;
- dpb = sb.makeDataPatternBuilder(datatypeUri, datatype, loc);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 11:
- Params(dpb);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 30:
- e = Except(scope, except);
- break;
- default:
- jj_la1[45] = jj_gen;
- ;
- }
- break;
- default:
- jj_la1[47] = jj_gen;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 30:
- e = Except(scope, except);
- break;
- default:
- jj_la1[46] = jj_gen;
- ;
- }
- }
- {if (true) return e == null ? dpb.makePattern(loc, a) : dpb.makePattern(e, loc, a);}
- }
- throw new Error("Missing return statement in function");
- }
-
- final public Token DatatypeName() throws ParseException {
- Token t;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 35:
- t = jj_consume_token(35);
- break;
- case 36:
- t = jj_consume_token(36);
- break;
- case PREFIXED_NAME:
- t = jj_consume_token(PREFIXED_NAME);
- break;
- default:
- jj_la1[49] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return t;}
- throw new Error("Missing return statement in function");
- }
-
- final public LocatedString Identifier() throws ParseException {
- LocatedString s;
- Token t;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- t = jj_consume_token(IDENTIFIER);
- s = new LocatedString(t.image, t);
- break;
- case ESCAPED_IDENTIFIER:
- t = jj_consume_token(ESCAPED_IDENTIFIER);
- s = new LocatedString(t.image.substring(1), t);
- break;
- default:
- jj_la1[50] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return s;}
- throw new Error("Missing return statement in function");
- }
-
- final public String Prefix() throws ParseException {
- Token t;
- String prefix;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- t = jj_consume_token(IDENTIFIER);
- prefix = t.image;
- break;
- case ESCAPED_IDENTIFIER:
- t = jj_consume_token(ESCAPED_IDENTIFIER);
- prefix = t.image.substring(1);
- break;
- case 5:
- case 6:
- case 7:
- case 10:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- t = Keyword();
- prefix = t.image;
- break;
- default:
- jj_la1[51] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return lookupPrefix(prefix, t);}
- throw new Error("Missing return statement in function");
- }
-
- final public LocatedString UnprefixedName() throws ParseException {
- LocatedString s;
- Token t;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- s = Identifier();
- break;
- case 5:
- case 6:
- case 7:
- case 10:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- t = Keyword();
- s = new LocatedString(t.image, t);
- break;
- default:
- jj_la1[52] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return s;}
- throw new Error("Missing return statement in function");
- }
-
- final public void Params(DataPatternBuilder dpb) throws ParseException {
- jj_consume_token(11);
- label_18:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 1:
- case 5:
- case 6:
- case 7:
- case 10:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case DOCUMENTATION:
- case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- ;
- break;
- default:
- jj_la1[53] = jj_gen;
- break label_18;
- }
- Param(dpb);
- }
- jj_consume_token(12);
- }
-
- final public void Param(DataPatternBuilder dpb) throws ParseException {
- LocatedString name;
- Annotations a;
- String value;
- a = Annotations();
- name = UnprefixedName();
- jj_consume_token(2);
- a = addCommentsToLeadingAnnotations(a);
- value = Literal();
- dpb.addParam(name.getString(), value, getContext(), defaultNamespace, name.getLocation(), a);
- }
-
- final public ParsedPattern Except(Scope scope, Token[] except) throws ParseException {
- Annotations a;
- ParsedPattern p;
- Token t;
- Token[] innerExcept = new Token[1];
- t = jj_consume_token(30);
- a = Annotations();
- p = PrimaryExpr(false, scope, a, innerExcept);
- checkExcept(innerExcept);
- except[0] = t;
- {if (true) return p;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedElementAnnotation Documentation() throws ParseException {
- CommentList comments = getComments();
- ElementAnnotationBuilder eab;
- Token t;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOCUMENTATION:
- t = jj_consume_token(DOCUMENTATION);
- break;
- case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
- t = jj_consume_token(DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT);
- break;
- default:
- jj_la1[54] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- eab = sb.makeElementAnnotationBuilder(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_ANNOTATIONS,
- "documentation",
- getCompatibilityPrefix(),
- makeLocation(t),
- comments,
- getContext());
- eab.addText(mungeComment(t.image), makeLocation(t), null);
- label_19:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOCUMENTATION_CONTINUE:
- ;
- break;
- default:
- jj_la1[55] = jj_gen;
- break label_19;
- }
- t = jj_consume_token(DOCUMENTATION_CONTINUE);
- eab.addText("\u005cn" + mungeComment(t.image), makeLocation(t), null);
- }
- {if (true) return eab.makeElementAnnotation();}
- throw new Error("Missing return statement in function");
- }
-
- final public Annotations Annotations() throws ParseException {
- CommentList comments = getComments();
- Annotations a = null;
- ParsedElementAnnotation e;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOCUMENTATION:
- case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
- a = sb.makeAnnotations(comments, getContext());
- label_20:
- while (true) {
- e = Documentation();
- a.addElement(e);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOCUMENTATION:
- case DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT:
- ;
- break;
- default:
- jj_la1[56] = jj_gen;
- break label_20;
- }
- }
- comments = getComments();
- if (comments != null)
- a.addLeadingComment(comments);
- break;
- default:
- jj_la1[57] = jj_gen;
- ;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 1:
- jj_consume_token(1);
- if (a == null) a = sb.makeAnnotations(comments, getContext()); clearAttributeList(); annotationsIncludeElements = false;
- label_21:
- while (true) {
- if (jj_2_7(2)) {
- ;
- } else {
- break label_21;
- }
- PrefixedAnnotationAttribute(a, false);
- }
- label_22:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 5:
- case 6:
- case 7:
- case 10:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- case PREFIXED_NAME:
- ;
- break;
- default:
- jj_la1[58] = jj_gen;
- break label_22;
- }
- e = AnnotationElement(false);
- a.addElement(e); annotationsIncludeElements = true;
- }
- a.addComment(getComments());
- jj_consume_token(9);
- break;
- default:
- jj_la1[59] = jj_gen;
- ;
- }
- if (a == null && comments != null)
- a = sb.makeAnnotations(comments, getContext());
- {if (true) return a;}
- throw new Error("Missing return statement in function");
- }
-
- final public void AnnotationAttribute(Annotations a) throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PREFIXED_NAME:
- PrefixedAnnotationAttribute(a, true);
- break;
- case 5:
- case 6:
- case 7:
- case 10:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- UnprefixedAnnotationAttribute(a);
- break;
- default:
- jj_la1[60] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
-
- final public void PrefixedAnnotationAttribute(Annotations a, boolean nested) throws ParseException {
- Token t;
- String value;
- t = jj_consume_token(PREFIXED_NAME);
- jj_consume_token(2);
- value = Literal();
- String qn = t.image;
- int colon = qn.indexOf(':');
- String prefix = qn.substring(0, colon);
- String ns = lookupPrefix(prefix, t);
- if (ns == this.inheritedNs)
- error("inherited_annotation_namespace", t);
- else if (ns.length() == 0 && !nested)
- error("unqualified_annotation_attribute", t);
- else if (ns.equals(WellKnownNamespaces.RELAX_NG) && !nested)
- error("relax_ng_namespace", t);
- /*else if (ns.length() == 0
- && qn.length() - colon - 1 == 5
- && qn.regionMatches(colon + 1, "xmlns", 0, 5))
- error("xmlns_annotation_attribute", t);*/
- else if (ns.equals(WellKnownNamespaces.XMLNS))
- error("xmlns_annotation_attribute_uri", t);
- else {
- if (ns.length() == 0)
- prefix = null;
- addAttribute(a, ns, qn.substring(colon + 1), prefix, value, t);
- }
- }
-
- final public void UnprefixedAnnotationAttribute(Annotations a) throws ParseException {
- LocatedString name;
- String value;
- name = UnprefixedName();
- jj_consume_token(2);
- value = Literal();
- if (name.getString().equals("xmlns"))
- error("xmlns_annotation_attribute", name.getToken());
- else
- addAttribute(a, "", name.getString(), null, value, name.getToken());
- }
-
- final public ParsedElementAnnotation AnnotationElement(boolean nested) throws ParseException {
- ParsedElementAnnotation a;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PREFIXED_NAME:
- a = PrefixedAnnotationElement(nested);
- break;
- case 5:
- case 6:
- case 7:
- case 10:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- a = UnprefixedAnnotationElement();
- break;
- default:
- jj_la1[61] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return a;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedElementAnnotation AnnotationElementNotKeyword() throws ParseException {
- ParsedElementAnnotation a;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PREFIXED_NAME:
- a = PrefixedAnnotationElement(false);
- break;
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- a = IdentifierAnnotationElement();
- break;
- default:
- jj_la1[62] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return a;}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedElementAnnotation PrefixedAnnotationElement(boolean nested) throws ParseException {
- CommentList comments = getComments();
- Token t;
- ElementAnnotationBuilder eab;
- t = jj_consume_token(PREFIXED_NAME);
- String qn = t.image;
- int colon = qn.indexOf(':');
- String prefix = qn.substring(0, colon);
- String ns = lookupPrefix(prefix, t);
- if (ns == this.inheritedNs) {
- error("inherited_annotation_namespace", t);
- ns = "";
- }
- else if (!nested && ns.equals(WellKnownNamespaces.RELAX_NG)) {
- error("relax_ng_namespace", t);
- ns = "";
- }
- else {
- if (ns.length() == 0)
- prefix = null;
- }
- eab = sb.makeElementAnnotationBuilder(ns, qn.substring(colon + 1), prefix,
- makeLocation(t), comments, getContext());
- AnnotationElementContent(eab);
- {if (true) return eab.makeElementAnnotation();}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedElementAnnotation UnprefixedAnnotationElement() throws ParseException {
- CommentList comments = getComments();
- LocatedString name;
- ElementAnnotationBuilder eab;
- name = UnprefixedName();
- eab = sb.makeElementAnnotationBuilder("", name.getString(), null,
- name.getLocation(), comments, getContext());
- AnnotationElementContent(eab);
- {if (true) return eab.makeElementAnnotation();}
- throw new Error("Missing return statement in function");
- }
-
- final public ParsedElementAnnotation IdentifierAnnotationElement() throws ParseException {
- CommentList comments = getComments();
- LocatedString name;
- ElementAnnotationBuilder eab;
- name = Identifier();
- eab = sb.makeElementAnnotationBuilder("", name.getString(), null,
- name.getLocation(), comments, getContext());
- AnnotationElementContent(eab);
- {if (true) return eab.makeElementAnnotation();}
- throw new Error("Missing return statement in function");
- }
-
- final public void AnnotationElementContent(ElementAnnotationBuilder eab) throws ParseException {
- ParsedElementAnnotation e;
- jj_consume_token(1);
- clearAttributeList();
- label_23:
- while (true) {
- if (jj_2_8(2)) {
- ;
- } else {
- break label_23;
- }
- AnnotationAttribute(eab);
- }
- label_24:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 5:
- case 6:
- case 7:
- case 10:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- case PREFIXED_NAME:
- case LITERAL:
- ;
- break;
- default:
- jj_la1[63] = jj_gen;
- break label_24;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LITERAL:
- AnnotationElementLiteral(eab);
- label_25:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 8:
- ;
- break;
- default:
- jj_la1[64] = jj_gen;
- break label_25;
- }
- jj_consume_token(8);
- AnnotationElementLiteral(eab);
- }
- break;
- case 5:
- case 6:
- case 7:
- case 10:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 26:
- case 27:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case IDENTIFIER:
- case ESCAPED_IDENTIFIER:
- case PREFIXED_NAME:
- e = AnnotationElement(true);
- eab.addElement(e);
- break;
- default:
- jj_la1[65] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- eab.addComment(getComments());
- jj_consume_token(9);
- }
-
- final public void AnnotationElementLiteral(ElementAnnotationBuilder eab) throws ParseException {
- Token t;
- CommentList comments = getComments();
- t = jj_consume_token(LITERAL);
- eab.addText(unquote(t.image), makeLocation(t), comments);
- }
-
- final public String Literal() throws ParseException {
- Token t;
- String s;
- StringBuffer buf;
- t = jj_consume_token(LITERAL);
- s = unquote(t.image);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 8:
- buf = new StringBuffer(s);
- label_26:
- while (true) {
- jj_consume_token(8);
- t = jj_consume_token(LITERAL);
- buf.append(unquote(t.image));
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 8:
- ;
- break;
- default:
- jj_la1[66] = jj_gen;
- break label_26;
- }
- }
- s = buf.toString();
- break;
- default:
- jj_la1[67] = jj_gen;
- ;
- }
- {if (true) return s;}
- throw new Error("Missing return statement in function");
- }
-
- final public LocatedString LocatedLiteral() throws ParseException {
- Token t;
- Token t2;
- String s;
- StringBuffer buf;
- t = jj_consume_token(LITERAL);
- s = unquote(t.image);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 8:
- buf = new StringBuffer(s);
- label_27:
- while (true) {
- jj_consume_token(8);
- t2 = jj_consume_token(LITERAL);
- buf.append(unquote(t2.image));
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 8:
- ;
- break;
- default:
- jj_la1[68] = jj_gen;
- break label_27;
- }
- }
- s = buf.toString();
- break;
- default:
- jj_la1[69] = jj_gen;
- ;
- }
- {if (true) return new LocatedString(s, t);}
- throw new Error("Missing return statement in function");
- }
-
- final public Token Keyword() throws ParseException {
- Token t;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 26:
- t = jj_consume_token(26);
- break;
- case 27:
- t = jj_consume_token(27);
- break;
- case 13:
- t = jj_consume_token(13);
- break;
- case 31:
- t = jj_consume_token(31);
- break;
- case 32:
- t = jj_consume_token(32);
- break;
- case 10:
- t = jj_consume_token(10);
- break;
- case 17:
- t = jj_consume_token(17);
- break;
- case 18:
- t = jj_consume_token(18);
- break;
- case 34:
- t = jj_consume_token(34);
- break;
- case 33:
- t = jj_consume_token(33);
- break;
- case 19:
- t = jj_consume_token(19);
- break;
- case 5:
- t = jj_consume_token(5);
- break;
- case 7:
- t = jj_consume_token(7);
- break;
- case 14:
- t = jj_consume_token(14);
- break;
- case 15:
- t = jj_consume_token(15);
- break;
- case 35:
- t = jj_consume_token(35);
- break;
- case 36:
- t = jj_consume_token(36);
- break;
- case 16:
- t = jj_consume_token(16);
- break;
- case 6:
- t = jj_consume_token(6);
- break;
- default:
- jj_la1[70] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return t;}
- throw new Error("Missing return statement in function");
- }
-
- private boolean jj_2_1(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_1(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(0, xla); }
- }
-
- private boolean jj_2_2(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_2(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(1, xla); }
- }
-
- private boolean jj_2_3(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_3(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(2, xla); }
- }
-
- private boolean jj_2_4(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_4(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(3, xla); }
- }
-
- private boolean jj_2_5(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_5(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(4, xla); }
- }
-
- private boolean jj_2_6(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_6(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(5, xla); }
- }
-
- private boolean jj_2_7(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_7(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(6, xla); }
- }
-
- private boolean jj_2_8(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_8(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(7, xla); }
- }
-
- private boolean jj_3R_43() {
- if (jj_scan_token(1)) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_52()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(9)) return true;
- return false;
- }
-
- private boolean jj_3R_51() {
- if (jj_scan_token(ESCAPED_IDENTIFIER)) return true;
- return false;
- }
-
- private boolean jj_3R_50() {
- if (jj_scan_token(IDENTIFIER)) return true;
- return false;
- }
-
- private boolean jj_3R_41() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_50()) {
- jj_scanpos = xsp;
- if (jj_3R_51()) return true;
- }
- return false;
- }
-
- private boolean jj_3R_47() {
- if (jj_scan_token(PREFIXED_NAME)) return true;
- if (jj_3R_56()) return true;
- return false;
- }
-
- private boolean jj_3R_55() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(40)) {
- jj_scanpos = xsp;
- if (jj_scan_token(43)) return true;
- }
- while (true) {
- xsp = jj_scanpos;
- if (jj_scan_token(41)) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- private boolean jj_3R_45() {
- Token xsp;
- if (jj_3R_55()) return true;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_55()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- private boolean jj_3R_38() {
- if (jj_3R_48()) return true;
- return false;
- }
-
- private boolean jj_3R_42() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(5)) {
- jj_scanpos = xsp;
- if (jj_scan_token(6)) {
- jj_scanpos = xsp;
- if (jj_scan_token(7)) return true;
- }
- }
- return false;
- }
-
- private boolean jj_3R_37() {
- if (jj_3R_47()) return true;
- return false;
- }
-
- private boolean jj_3R_54() {
- if (jj_3R_42()) return true;
- return false;
- }
-
- private boolean jj_3R_29() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_37()) {
- jj_scanpos = xsp;
- if (jj_3R_38()) return true;
- }
- return false;
- }
-
- private boolean jj_3R_44() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_53()) {
- jj_scanpos = xsp;
- if (jj_3R_54()) return true;
- }
- return false;
- }
-
- private boolean jj_3R_53() {
- if (jj_3R_41()) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(2)) {
- jj_scanpos = xsp;
- if (jj_scan_token(3)) {
- jj_scanpos = xsp;
- if (jj_scan_token(4)) return true;
- }
- }
- return false;
- }
-
- private boolean jj_3R_36() {
- if (jj_3R_45()) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_46()) jj_scanpos = xsp;
- if (jj_3R_44()) return true;
- return false;
- }
-
- private boolean jj_3R_35() {
- if (jj_3R_43()) return true;
- if (jj_3R_44()) return true;
- return false;
- }
-
- private boolean jj_3R_34() {
- if (jj_3R_42()) return true;
- return false;
- }
-
- private boolean jj_3R_33() {
- if (jj_3R_41()) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(1)) {
- jj_scanpos = xsp;
- if (jj_scan_token(2)) {
- jj_scanpos = xsp;
- if (jj_scan_token(3)) {
- jj_scanpos = xsp;
- if (jj_scan_token(4)) return true;
- }
- }
- }
- return false;
- }
-
- private boolean jj_3_1() {
- if (jj_3R_28()) return true;
- return false;
- }
-
- private boolean jj_3R_32() {
- if (jj_scan_token(PREFIXED_NAME)) return true;
- if (jj_scan_token(1)) return true;
- return false;
- }
-
- private boolean jj_3R_28() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_32()) {
- jj_scanpos = xsp;
- if (jj_3R_33()) {
- jj_scanpos = xsp;
- if (jj_3R_34()) {
- jj_scanpos = xsp;
- if (jj_3R_35()) {
- jj_scanpos = xsp;
- if (jj_3R_36()) return true;
- }
- }
- }
- }
- return false;
- }
-
- private boolean jj_3R_59() {
- if (jj_3R_43()) return true;
- return false;
- }
-
- private boolean jj_3_8() {
- if (jj_3R_31()) return true;
- return false;
- }
-
- private boolean jj_3R_56() {
- if (jj_scan_token(1)) return true;
- return false;
- }
-
- private boolean jj_3R_49() {
- if (jj_3R_57()) return true;
- if (jj_scan_token(2)) return true;
- return false;
- }
-
- private boolean jj_3R_40() {
- if (jj_3R_49()) return true;
- return false;
- }
-
- private boolean jj_3_4() {
- if (jj_3R_29()) return true;
- return false;
- }
-
- private boolean jj_3R_48() {
- if (jj_3R_41()) return true;
- if (jj_3R_56()) return true;
- return false;
- }
-
- private boolean jj_3_3() {
- if (jj_3R_29()) return true;
- return false;
- }
-
- private boolean jj_3_6() {
- if (jj_3R_29()) return true;
- return false;
- }
-
- private boolean jj_3R_62() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(26)) {
- jj_scanpos = xsp;
- if (jj_scan_token(27)) {
- jj_scanpos = xsp;
- if (jj_scan_token(13)) {
- jj_scanpos = xsp;
- if (jj_scan_token(31)) {
- jj_scanpos = xsp;
- if (jj_scan_token(32)) {
- jj_scanpos = xsp;
- if (jj_scan_token(10)) {
- jj_scanpos = xsp;
- if (jj_scan_token(17)) {
- jj_scanpos = xsp;
- if (jj_scan_token(18)) {
- jj_scanpos = xsp;
- if (jj_scan_token(34)) {
- jj_scanpos = xsp;
- if (jj_scan_token(33)) {
- jj_scanpos = xsp;
- if (jj_scan_token(19)) {
- jj_scanpos = xsp;
- if (jj_scan_token(5)) {
- jj_scanpos = xsp;
- if (jj_scan_token(7)) {
- jj_scanpos = xsp;
- if (jj_scan_token(14)) {
- jj_scanpos = xsp;
- if (jj_scan_token(15)) {
- jj_scanpos = xsp;
- if (jj_scan_token(35)) {
- jj_scanpos = xsp;
- if (jj_scan_token(36)) {
- jj_scanpos = xsp;
- if (jj_scan_token(16)) {
- jj_scanpos = xsp;
- if (jj_scan_token(6)) return true;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- return false;
- }
-
- private boolean jj_3R_61() {
- if (jj_3R_62()) return true;
- return false;
- }
-
- private boolean jj_3_2() {
- if (jj_3R_28()) return true;
- return false;
- }
-
- private boolean jj_3R_30() {
- if (jj_scan_token(PREFIXED_NAME)) return true;
- if (jj_scan_token(2)) return true;
- return false;
- }
-
- private boolean jj_3R_60() {
- if (jj_3R_41()) return true;
- return false;
- }
-
- private boolean jj_3R_58() {
- if (jj_3R_57()) return true;
- return false;
- }
-
- private boolean jj_3R_57() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_60()) {
- jj_scanpos = xsp;
- if (jj_3R_61()) return true;
- }
- return false;
- }
-
- private boolean jj_3_5() {
- if (jj_3R_29()) return true;
- return false;
- }
-
- private boolean jj_3R_31() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_39()) {
- jj_scanpos = xsp;
- if (jj_3R_40()) return true;
- }
- return false;
- }
-
- private boolean jj_3R_39() {
- if (jj_3R_30()) return true;
- return false;
- }
-
- private boolean jj_3_7() {
- if (jj_3R_30()) return true;
- return false;
- }
-
- private boolean jj_3R_46() {
- if (jj_3R_43()) return true;
- return false;
- }
-
- private boolean jj_3R_52() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(57)) {
- jj_scanpos = xsp;
- if (jj_3R_58()) {
- jj_scanpos = xsp;
- if (jj_scan_token(2)) {
- jj_scanpos = xsp;
- if (jj_scan_token(58)) {
- jj_scanpos = xsp;
- if (jj_scan_token(8)) {
- jj_scanpos = xsp;
- if (jj_3R_59()) return true;
- }
- }
- }
- }
- }
- return false;
- }
-
- /** Generated Token Manager. */
- public CompactSyntaxTokenManager token_source;
- JavaCharStream jj_input_stream;
- /** Current token. */
- public Token token;
- /** Next token. */
- public Token jj_nt;
- private int jj_ntk;
- private Token jj_scanpos, jj_lastpos;
- private int jj_la;
- private int jj_gen;
- final private int[] jj_la1 = new int[71];
- static private int[] jj_la1_0;
- static private int[] jj_la1_1;
- static {
- jj_la1_init_0();
- jj_la1_init_1();
- }
- private static void jj_la1_init_0() {
- jj_la1_0 = new int[] {0x9c0e0402,0x1e,0x2,0xe2,0x1c,0xe0,0xe0,0x0,0x0,0x0,0x8c0fe5e6,0x8c0fe5e6,0x402,0x16000,0x16000,0x8c0fe4e0,0x6000,0x8000,0x0,0x9c0e0400,0x100000,0x200000,0x400000,0x700000,0x700000,0x3800000,0x0,0x3800000,0x9e0fe4e0,0x0,0x100000,0x100000,0x9e0fe4e0,0x9c0fe4e0,0x2000000,0x40000000,0x40000000,0xe2,0xe0,0x20,0x1c,0x800,0x62,0x60,0x8000,0x40000000,0x40000000,0x800,0x0,0x0,0x0,0x8c0fe4e0,0x8c0fe4e0,0x8c0fe4e2,0x0,0x0,0x0,0x0,0x8c0fe4e0,0x2,0x8c0fe4e0,0x8c0fe4e0,0x0,0x8c0fe4e0,0x100,0x8c0fe4e0,0x100,0x100,0x100,0x100,0x8c0fe4e0,};
- }
- private static void jj_la1_init_1() {
- jj_la1_1 = new int[] {0x6c0091f,0x0,0x0,0x2c00900,0x0,0xc00000,0x0,0x900,0x200,0x900,0x6c0001f,0x6c0001f,0x900,0x0,0x0,0xc0001f,0x0,0x4000000,0x8000000,0x6c0001f,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x3c0001f,0x8000000,0x0,0x0,0x3c0001f,0x2c0001f,0x1000000,0x0,0x0,0xc00900,0xc00000,0xc00000,0x0,0x0,0xc00900,0xc00000,0x0,0x0,0x0,0x0,0x4000000,0x2000018,0xc00000,0xc0001f,0xc0001f,0xc0091f,0x900,0x200,0x900,0x900,0x2c0001f,0x0,0x2c0001f,0x2c0001f,0x2c00000,0x6c0001f,0x0,0x6c0001f,0x0,0x0,0x0,0x0,0x1f,};
- }
- final private JJCalls[] jj_2_rtns = new JJCalls[8];
- private boolean jj_rescan = false;
- private int jj_gc = 0;
-
- /** Constructor with InputStream. */
- public CompactSyntax(java.io.InputStream stream) {
- this(stream, null);
- }
- /** Constructor with InputStream and supplied encoding */
- public CompactSyntax(java.io.InputStream stream, String encoding) {
- try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
- token_source = new CompactSyntaxTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 71; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.InputStream stream) {
- ReInit(stream, null);
- }
- /** Reinitialise. */
- public void ReInit(java.io.InputStream stream, String encoding) {
- try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 71; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- /** Constructor. */
- public CompactSyntax(java.io.Reader stream) {
- jj_input_stream = new JavaCharStream(stream, 1, 1);
- token_source = new CompactSyntaxTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 71; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.Reader stream) {
- jj_input_stream.ReInit(stream, 1, 1);
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 71; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- /** Constructor with generated Token Manager. */
- public CompactSyntax(CompactSyntaxTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 71; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- /** Reinitialise. */
- public void ReInit(CompactSyntaxTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 71; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- private Token jj_consume_token(int kind) throws ParseException {
- Token oldToken;
- if ((oldToken = token).next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- if (token.kind == kind) {
- jj_gen++;
- if (++jj_gc > 100) {
- jj_gc = 0;
- for (int i = 0; i < jj_2_rtns.length; i++) {
- JJCalls c = jj_2_rtns[i];
- while (c != null) {
- if (c.gen < jj_gen) c.first = null;
- c = c.next;
- }
- }
- }
- return token;
- }
- token = oldToken;
- jj_kind = kind;
- throw generateParseException();
- }
-
- static private final class LookaheadSuccess extends java.lang.Error { }
- final private LookaheadSuccess jj_ls = new LookaheadSuccess();
- private boolean jj_scan_token(int kind) {
- if (jj_scanpos == jj_lastpos) {
- jj_la--;
- if (jj_scanpos.next == null) {
- jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
- } else {
- jj_lastpos = jj_scanpos = jj_scanpos.next;
- }
- } else {
- jj_scanpos = jj_scanpos.next;
- }
- if (jj_rescan) {
- int i = 0; Token tok = token;
- while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
- if (tok != null) jj_add_error_token(kind, i);
- }
- if (jj_scanpos.kind != kind) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
- return false;
- }
-
-
-/** Get the next Token. */
- final public Token getNextToken() {
- if (token.next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- jj_gen++;
- return token;
- }
-
-/** Get the specific Token. */
- final public Token getToken(int index) {
- Token t = token;
- for (int i = 0; i < index; i++) {
- if (t.next != null) t = t.next;
- else t = t.next = token_source.getNextToken();
- }
- return t;
- }
-
- private int jj_ntk() {
- if ((jj_nt=token.next) == null)
- return (jj_ntk = (token.next=token_source.getNextToken()).kind);
- else
- return (jj_ntk = jj_nt.kind);
- }
-
- private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
- private int[] jj_expentry;
- private int jj_kind = -1;
- private int[] jj_lasttokens = new int[100];
- private int jj_endpos;
-
- private void jj_add_error_token(int kind, int pos) {
- if (pos >= 100) return;
- if (pos == jj_endpos + 1) {
- jj_lasttokens[jj_endpos++] = kind;
- } else if (jj_endpos != 0) {
- jj_expentry = new int[jj_endpos];
- for (int i = 0; i < jj_endpos; i++) {
- jj_expentry[i] = jj_lasttokens[i];
- }
- jj_entries_loop: for (java.util.Iterator<?> it = jj_expentries.iterator(); it.hasNext();) {
- int[] oldentry = (int[])(it.next());
- if (oldentry.length == jj_expentry.length) {
- for (int i = 0; i < jj_expentry.length; i++) {
- if (oldentry[i] != jj_expentry[i]) {
- continue jj_entries_loop;
- }
- }
- jj_expentries.add(jj_expentry);
- break jj_entries_loop;
- }
- }
- if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
- }
- }
-
- /** Generate ParseException. */
- public ParseException generateParseException() {
- jj_expentries.clear();
- boolean[] la1tokens = new boolean[61];
- if (jj_kind >= 0) {
- la1tokens[jj_kind] = true;
- jj_kind = -1;
- }
- for (int i = 0; i < 71; i++) {
- if (jj_la1[i] == jj_gen) {
- for (int j = 0; j < 32; j++) {
- if ((jj_la1_0[i] & (1<<j)) != 0) {
- la1tokens[j] = true;
- }
- if ((jj_la1_1[i] & (1<<j)) != 0) {
- la1tokens[32+j] = true;
- }
- }
- }
- }
- for (int i = 0; i < 61; i++) {
- if (la1tokens[i]) {
- jj_expentry = new int[1];
- jj_expentry[0] = i;
- jj_expentries.add(jj_expentry);
- }
- }
- jj_endpos = 0;
- jj_rescan_token();
- jj_add_error_token(0, 0);
- int[][] exptokseq = new int[jj_expentries.size()][];
- for (int i = 0; i < jj_expentries.size(); i++) {
- exptokseq[i] = jj_expentries.get(i);
- }
- return new ParseException(token, exptokseq, tokenImage);
- }
-
- /** Enable tracing. */
- final public void enable_tracing() {
- }
-
- /** Disable tracing. */
- final public void disable_tracing() {
- }
-
- private void jj_rescan_token() {
- jj_rescan = true;
- for (int i = 0; i < 8; i++) {
- try {
- JJCalls p = jj_2_rtns[i];
- do {
- if (p.gen > jj_gen) {
- jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
- switch (i) {
- case 0: jj_3_1(); break;
- case 1: jj_3_2(); break;
- case 2: jj_3_3(); break;
- case 3: jj_3_4(); break;
- case 4: jj_3_5(); break;
- case 5: jj_3_6(); break;
- case 6: jj_3_7(); break;
- case 7: jj_3_8(); break;
- }
- }
- p = p.next;
- } while (p != null);
- } catch(LookaheadSuccess ls) { }
- }
- jj_rescan = false;
- }
-
- private void jj_save(int index, int xla) {
- JJCalls p = jj_2_rtns[index];
- while (p.gen > jj_gen) {
- if (p.next == null) { p = p.next = new JJCalls(); break; }
- p = p.next;
- }
- p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
- }
-
- static final class JJCalls {
- int gen;
- Token first;
- int arg;
- JJCalls next;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntax.jj b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntax.jj
deleted file mode 100644
index c0b8d256..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntax.jj
+++ /dev/null
@@ -1,1963 +0,0 @@
-options {
- STATIC = false;
- UNICODE_INPUT = true;
- JAVA_UNICODE_ESCAPE = true;
-}
-
-PARSER_BEGIN(CompactSyntax)
-
-package com.sun.xml.internal.rngom.parse.compact;
-
-import java.io.Reader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Hashtable;
-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;
-import com.sun.xml.internal.rngom.ast.builder.DataPatternBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Div;
-import com.sun.xml.internal.rngom.ast.builder.ElementAnnotationBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Grammar;
-import com.sun.xml.internal.rngom.ast.builder.GrammarSection;
-import com.sun.xml.internal.rngom.ast.builder.Include;
-import com.sun.xml.internal.rngom.ast.builder.IncludedGrammar;
-import com.sun.xml.internal.rngom.ast.builder.NameClassBuilder;
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Scope;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedNameClass;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.parse.Context;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.LocatorImpl;
-
-import com.sun.xml.internal.rngom.util.Localizer;
-import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
-
-
-public class CompactSyntax implements Context {
- private static final int IN_ELEMENT = 0;
- private static final int IN_ATTRIBUTE = 1;
- private static final int IN_ANY_NAME = 2;
- private static final int IN_NS_NAME = 4;
-
- private String defaultNamespace;
- private String compatibilityPrefix = null;
- private SchemaBuilder sb;
- private NameClassBuilder ncb;
- private String sourceUri;
- /**
- * This is what we are parsing right now.
- */
- private CompactParseable parseable;
- private ErrorHandler eh;
- private final Hashtable namespaceTable = new Hashtable();
- private final Hashtable datatypesTable = new Hashtable();
- private boolean hadError = false;
- private static final Localizer localizer = new Localizer(new Localizer(Parseable.class),CompactSyntax.class);
- private final Hashtable attributeNameTable = new Hashtable();
- private boolean annotationsIncludeElements = false;
-
- /**
- * String that represents the inherited namespace.
- *
- * <p>
- * HACK: we always allocate a new String instance so that
- * we can distinguish inherited value from the explicitly
- * given value.
- */
- private /*final*/ String inheritedNs; // essentially final but JavaCC don't let us declare it as so.
-
- final class LocatedString {
- private final String str;
- private final Token tok;
-
- LocatedString(String str, Token tok) {
- this.str = str;
- this.tok = tok;
- }
-
- String getString() {
- return str;
- }
-
- Location getLocation() {
- return makeLocation(tok);
- }
-
- Token getToken() {
- return tok;
- }
-
- }
-
- public CompactSyntax(CompactParseable parseable, Reader r, String sourceUri, SchemaBuilder sb, ErrorHandler eh, String inheritedNs) {
- this(r);
- this.sourceUri = sourceUri;
- this.parseable = parseable;
- this.sb = sb;
- this.ncb = sb.getNameClassBuilder();
- this.eh = eh;
- // this causes the root pattern to have non-null annotations
- // which is useful because it gives a context to trang
- this.topLevelComments = sb.makeCommentList();
- this.inheritedNs = defaultNamespace = new String(inheritedNs);
- }
-
- ParsedPattern parse(Scope scope) throws IllegalSchemaException {
- try {
- ParsedPattern p = Input(scope);
- if (!hadError)
- return p;
- }
- catch (ParseException e) {
- error("syntax_error", e.getMessage(), e.currentToken.next);
- }
- catch (EscapeSyntaxException e) {
- reportEscapeSyntaxException(e);
- }
- throw new IllegalSchemaException();
- }
-
- ParsedPattern parseInclude(IncludedGrammar g) throws IllegalSchemaException {
- try {
- ParsedPattern p = IncludedGrammar(g);
- if (!hadError)
- return p;
- }
- catch (ParseException e) {
- error("syntax_error", e.getMessage(), e.currentToken.next);
- }
- catch (EscapeSyntaxException e) {
- reportEscapeSyntaxException(e);
- }
- throw new IllegalSchemaException();
- }
-
- private void checkNsName(int context, LocatedString ns) {
- if ((context & IN_NS_NAME) != 0)
- error("ns_name_except_contains_ns_name", ns.getToken());
- }
-
- private void checkAnyName(int context, Token t) {
- if ((context & IN_NS_NAME) != 0)
- error("ns_name_except_contains_any_name", t);
- if ((context & IN_ANY_NAME) != 0)
- error("any_name_except_contains_any_name", t);
- }
-
- private void error(String key, Token tok) {
- doError(localizer.message(key), tok);
- }
-
- private void error(String key, String arg, Token tok) {
- doError(localizer.message(key, arg), tok);
- }
-
- private void error(String key, String arg1, String arg2, Token tok) {
- doError(localizer.message(key, arg1, arg2), tok);
- }
-
- private void doError(String message, Token tok) {
- hadError = true;
- if (eh != null) {
- LocatorImpl loc = new LocatorImpl();
- loc.setLineNumber(tok.beginLine);
- loc.setColumnNumber(tok.beginColumn);
- loc.setSystemId(sourceUri);
- try {
- eh.error(new SAXParseException(message, loc));
- }
- catch (SAXException se) {
- throw new BuildException(se);
- }
- }
- }
-
- private void reportEscapeSyntaxException(EscapeSyntaxException e) {
- if (eh != null) {
- LocatorImpl loc = new LocatorImpl();
- loc.setLineNumber(e.getLineNumber());
- loc.setColumnNumber(e.getColumnNumber());
- loc.setSystemId(sourceUri);
- try {
- eh.error(new SAXParseException(localizer.message(e.getKey()), loc));
- }
- catch (SAXException se) {
- throw new BuildException(se);
- }
- }
- }
-
- private static String unquote(String s) {
- if (s.length() >= 6 && s.charAt(0) == s.charAt(1)) {
- s = s.replace('\u0000', '\n');
- return s.substring(3, s.length() - 3);
- }
- else
- return s.substring(1, s.length() - 1);
- }
-
- Location makeLocation(Token t) {
- return sb.makeLocation(sourceUri, t.beginLine, t.beginColumn);
- }
-
- private static ParsedPattern[] addPattern(ParsedPattern[] patterns, int i, ParsedPattern p) {
- if (i >= patterns.length) {
- ParsedPattern[] oldPatterns = patterns;
- patterns = new ParsedPattern[oldPatterns.length*2];
- System.arraycopy(oldPatterns, 0, patterns, 0, oldPatterns.length);
- }
- patterns[i] = p;
- return patterns;
- }
-
- String getCompatibilityPrefix() {
- if (compatibilityPrefix == null) {
- compatibilityPrefix = "a";
- while (namespaceTable.get(compatibilityPrefix) != null)
- compatibilityPrefix = compatibilityPrefix + "a";
- }
- return compatibilityPrefix;
- }
-
- public String resolveNamespacePrefix(String prefix) {
- String result = (String)namespaceTable.get(prefix);
- if (result.length() == 0)
- return null;
- return result;
- }
-
- public Enumeration prefixes() {
- return namespaceTable.keys();
- }
-
- public String getBaseUri() {
- return sourceUri;
- }
-
- public boolean isUnparsedEntity(String entityName) {
- return false;
- }
-
- public boolean isNotation(String notationName) {
- return false;
- }
-
- public Context copy() {
- return this;
- }
-
- private Context getContext() {
- return this;
- }
-
- private CommentList getComments() {
- return getComments(getTopLevelComments());
- }
-
- private CommentList topLevelComments;
-
- private CommentList getTopLevelComments() {
- CommentList tem = topLevelComments;
- topLevelComments = null;
- return tem;
- }
-
- private void noteTopLevelComments() {
- topLevelComments = getComments(topLevelComments);
- }
-
- private void topLevelComments(GrammarSection section) {
- section.topLevelComment(getComments(null));
- }
-
- private Token lastCommentSourceToken = null;
-
- private CommentList getComments(CommentList comments) {
- Token nextToken = getToken(1);
- if (lastCommentSourceToken != nextToken) {
- if (lastCommentSourceToken == null)
- lastCommentSourceToken = token;
- do {
- lastCommentSourceToken = lastCommentSourceToken.next;
- Token t = lastCommentSourceToken.specialToken;
- if (t != null) {
- while (t.specialToken != null)
- t = t.specialToken;
- if (comments == null)
- comments = sb.makeCommentList();
- for (; t != null; t = t.next) {
- String s = mungeComment(t.image);
- Location loc = makeLocation(t);
- if (t.next != null
- && t.next.kind == CompactSyntaxConstants.SINGLE_LINE_COMMENT_CONTINUE) {
- StringBuffer buf = new StringBuffer(s);
- do {
- t = t.next;
- buf.append('\n');
- buf.append(mungeComment(t.image));
- } while (t.next != null
- && t.next.kind == CompactSyntaxConstants.SINGLE_LINE_COMMENT_CONTINUE);
- s = buf.toString();
- }
- comments.addComment(s, loc);
- }
- }
- } while (lastCommentSourceToken != nextToken);
- }
- return comments;
- }
-
- private ParsedPattern afterComments(ParsedPattern p) {
- CommentList comments = getComments(null);
- if (comments == null)
- return p;
- return sb.commentAfter(p, comments);
- }
-
- private ParsedNameClass afterComments(ParsedNameClass nc) {
- CommentList comments = getComments(null);
- if (comments == null)
- return nc;
- return ncb.commentAfter(nc, comments);
- }
-
- private static String mungeComment(String image) {
- int i = image.indexOf('#') + 1;
- while (i < image.length() && image.charAt(i) == '#')
- i++;
- if (i < image.length() && image.charAt(i) == ' ')
- i++;
- return image.substring(i);
- }
-
- private Annotations getCommentsAsAnnotations() {
- CommentList comments = getComments();
- if (comments == null)
- return null;
- return sb.makeAnnotations(comments, getContext());
- }
-
- private Annotations addCommentsToChildAnnotations(Annotations a) {
- CommentList comments = getComments();
- if (comments == null)
- return a;
- if (a == null)
- a = sb.makeAnnotations(null, getContext());
- a.addComment(comments);
- return a;
- }
-
- private Annotations addCommentsToLeadingAnnotations(Annotations a) {
- CommentList comments = getComments();
- if (comments == null)
- return a;
- if (a == null)
- return sb.makeAnnotations(comments, getContext());
- a.addLeadingComment(comments);
- return a;
- }
-
- private Annotations getTopLevelCommentsAsAnnotations() {
- CommentList comments = getTopLevelComments();
- if (comments == null)
- return null;
- return sb.makeAnnotations(comments, getContext());
- }
-
- private void clearAttributeList() {
- attributeNameTable.clear();
- }
-
- private void addAttribute(Annotations a, String ns, String localName, String prefix, String value, Token tok) {
- String key = ns + "#" + localName;
- if (attributeNameTable.get(key) != null)
- error("duplicate_attribute", ns, localName, tok);
- else {
- attributeNameTable.put(key, key);
- a.addAttribute(ns, localName, prefix, value, makeLocation(tok));
- }
- }
-
- private void checkExcept(Token[] except) {
- if (except[0] != null)
- error("except_missing_parentheses", except[0]);
- }
-
- private String lookupPrefix(String prefix, Token t) {
- String ns = (String)namespaceTable.get(prefix);
- if (ns == null) {
- error("undeclared_prefix", prefix, t);
- return "#error";
- }
- return ns;
- }
- private String lookupDatatype(String prefix, Token t) {
- String ns = (String)datatypesTable.get(prefix);
- if (ns == null) {
- error("undeclared_prefix", prefix, t);
- return ""; // XXX
- }
- return ns;
- }
- private String resolve(String str) {
- try {
- return new URL(new URL(sourceUri), str).toString();
- }
- catch (MalformedURLException e) { }
- return str;
- }
-}
-
-PARSER_END(CompactSyntax)
-
-ParsedPattern Input(Scope scope) :
-{
- ParsedPattern p;
-}
-{
- Preamble()
- (LOOKAHEAD(TopLevelLookahead()) p = TopLevelGrammar(scope)
- | p = Expr(true, scope, null, null) { p = afterComments(p); } <EOF>)
- { return p; }
-}
-
-void TopLevelLookahead() :
-{}
-{
- <PREFIXED_NAME> "["
- | Identifier() ("[" | "=" | "&=" | "|=")
- | LookaheadGrammarKeyword()
- | LookaheadBody() LookaheadAfterAnnotations()
- | LookaheadDocumentation() (LookaheadBody())? LookaheadAfterAnnotations()
-}
-
-void LookaheadAfterAnnotations() :
-{}
-{
- Identifier() ("=" | "&=" | "|=")
- | LookaheadGrammarKeyword()
-}
-
-void LookaheadGrammarKeyword() :
-{}
-{
- "start" | "div" | "include"
-}
-
-void LookaheadDocumentation() :
-{}
-{
- ((<DOCUMENTATION> | <DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT>) (<DOCUMENTATION_CONTINUE>)*)+
-}
-
-void LookaheadBody() :
-{}
-{
- "["
- (<PREFIXED_NAME> | UnprefixedName() | "=" | <LITERAL> | "~" | LookaheadBody() )*
- "]"
-}
-
-ParsedPattern IncludedGrammar(IncludedGrammar g) :
-{
- Annotations a;
- ParsedPattern p;
-}
-{
- Preamble()
- (LOOKAHEAD(TopLevelLookahead()) a = GrammarBody(g, g, getTopLevelCommentsAsAnnotations())
- | a = Annotations() "grammar" "{" a = GrammarBody(g, g, a) { topLevelComments(g); } "}")
- { p = afterComments(g.endIncludedGrammar(sb.makeLocation(sourceUri, 1, 1), a)); }
- <EOF>
- { return p; }
-}
-
-ParsedPattern TopLevelGrammar(Scope scope) :
-{
- Annotations a = getTopLevelCommentsAsAnnotations();
- Grammar g;
- ParsedPattern p;
-}
-{
- { g = sb.makeGrammar(scope); }
- a = GrammarBody(g, g, a)
- { p = afterComments(g.endGrammar(sb.makeLocation(sourceUri, 1, 1), a)); }
- <EOF>
- { return p; }
-}
-
-void Preamble() :
-{}
-{
- (NamespaceDecl() | DatatypesDecl())*
- {
- namespaceTable.put("xml", WellKnownNamespaces.XML);
- if (datatypesTable.get("xsd") == null)
- datatypesTable.put("xsd", WellKnownNamespaces.XML_SCHEMA_DATATYPES);
- }
-}
-
-void NamespaceDecl() :
-{
- LocatedString prefix = null;
- boolean isDefault = false;
- String namespaceName;
-}
-{
- { noteTopLevelComments(); }
- (("namespace" prefix = UnprefixedName())
- | ("default" { isDefault = true; }
- "namespace" (prefix = UnprefixedName())?))
- "="
- namespaceName = NamespaceName()
- {
- if (isDefault)
- defaultNamespace = namespaceName;
- if (prefix != null) {
- if (prefix.getString().equals("xmlns"))
- error("xmlns_prefix", prefix.getToken());
- else if (prefix.getString().equals("xml")) {
- if (!namespaceName.equals(WellKnownNamespaces.XML))
- error("xml_prefix_bad_uri", prefix.getToken());
- }
- else if (namespaceName.equals(WellKnownNamespaces.XML))
- error("xml_uri_bad_prefix", prefix.getToken());
- else {
- if (namespaceName.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_ANNOTATIONS))
- compatibilityPrefix = prefix.getString();
- namespaceTable.put(prefix.getString(), namespaceName);
- }
- }
- }
-}
-
-String NamespaceName() :
-{
- String r;
-}
-{
- (r = Literal() | "inherit" { r = this.inheritedNs; })
- { return r; }
-}
-
-void DatatypesDecl() :
-{
- LocatedString prefix;
- String uri;
-}
-{
- { noteTopLevelComments(); }
- "datatypes" prefix = UnprefixedName() "=" uri = Literal()
- {
- datatypesTable.put(prefix.getString(), uri);
- }
-}
-
-ParsedPattern AnnotatedPrimaryExpr(boolean topLevel, Scope scope, Token[] except) :
-{
- Annotations a;
- ParsedPattern p;
- ParsedElementAnnotation e;
- Token t;
-}
-{
- a = Annotations()
- p = PrimaryExpr(topLevel, scope, a, except)
- ( t = <FANNOTATE> e = AnnotationElement(false) {
- if (topLevel)
- error("top_level_follow_annotation", t);
- else
- p = sb.annotateAfter(p, e);
- })*
- { return p; }
-}
-
-
-ParsedPattern PrimaryExpr(boolean topLevel, Scope scope, Annotations a, Token[] except) :
-{
- ParsedPattern p;
-}
-{
- (p = ElementExpr(scope, a)
- | p = AttributeExpr(scope, a)
- | p = GrammarExpr(scope, a)
- | p = ExternalRefExpr(scope, a)
- | p = ListExpr(scope, a)
- | p = MixedExpr(scope, a)
- | p = ParenExpr(topLevel, scope, a)
- | p = IdentifierExpr(scope, a)
- | p = ParentExpr(scope, a)
- | p = DataExpr(topLevel, scope, a, except)
- | p = ValueExpr(topLevel, a)
- | p = TextExpr(a)
- | p = EmptyExpr(a)
- | p = NotAllowedExpr(a))
- { return p; }
-}
-
-ParsedPattern EmptyExpr(Annotations a) :
-{
- Token t;
-}
-{
- t = "empty"
- { return sb.makeEmpty(makeLocation(t), a); }
-}
-
-ParsedPattern TextExpr(Annotations a) :
-{
- Token t;
-}
-{
- t = "text"
- { return sb.makeText(makeLocation(t), a); }
-}
-
-ParsedPattern NotAllowedExpr(Annotations a) :
-{
- Token t;
-}
-{
- t = "notAllowed"
- { return sb.makeNotAllowed(makeLocation(t), a); }
-}
-
-ParsedPattern Expr(boolean topLevel, Scope scope, Token t, Annotations a) :
-{
- List patterns = new ArrayList();
- ParsedPattern p;
- boolean[] hadOccur = new boolean[1];
- Token[] except = new Token[1];
-}
-{
- p = UnaryExpr(topLevel, scope, hadOccur, except)
- { patterns.add(p); }
- (
- { checkExcept(except); }
- (t = "|" p = UnaryExpr(topLevel, scope, null, except)
- { patterns.add(p); checkExcept(except); } )+
- { p = sb.makeChoice(patterns, makeLocation(t), a); }
- | (t = "&" p = UnaryExpr(topLevel, scope, null, except)
- { patterns.add(p); checkExcept(except); } )+
- { p = sb.makeInterleave(patterns, makeLocation(t), a); }
- | (t = "," p = UnaryExpr(topLevel, scope, null, except)
- { patterns.add(p); checkExcept(except); } )+
- { p = sb.makeGroup(patterns, makeLocation(t), a); }
- )?
- {
- if (patterns.size() == 1 && a != null) {
- if (hadOccur[0])
- p = sb.annotate(p, a);
- else
- p = sb.makeGroup(patterns, makeLocation(t), a);
- }
- return p;
- }
-}
-
-ParsedPattern UnaryExpr(boolean topLevel, Scope scope, boolean[] hadOccur, Token[] except) :
-{
- ParsedPattern p;
- Token t;
- ParsedElementAnnotation e;
-}
-{
- p = AnnotatedPrimaryExpr(topLevel, scope, except)
- (
- {
- if (hadOccur != null) hadOccur[0] = true;
- p = afterComments(p);
- }
- (t = "+" { checkExcept(except); p = sb.makeOneOrMore(p, makeLocation(t), null); }
- | t = "?" { checkExcept(except); p = sb.makeOptional(p, makeLocation(t), null); }
- | t = "*" { checkExcept(except); p = sb.makeZeroOrMore(p, makeLocation(t), null); })
- ( t = <FANNOTATE> e = AnnotationElement(false) {
- if (topLevel)
- error("top_level_follow_annotation", t);
- else
- p = sb.annotateAfter(p, e);
- } )*
- )?
- { return p; }
-}
-
-ParsedPattern ElementExpr(Scope scope, Annotations a) :
-{
- Token t;
- ParsedNameClass nc;
- ParsedPattern p;
-}
-{
- t = "element"
- nc = NameClass(IN_ELEMENT, null)
- "{"
- p = Expr(false, scope, null, null)
- { p = afterComments(p); }
- "}"
- { return sb.makeElement(nc, p, makeLocation(t), a); }
-}
-
-ParsedPattern AttributeExpr(Scope scope, Annotations a) :
-{
- Token t;
- ParsedNameClass nc;
- ParsedPattern p;
-}
-{
- t = "attribute"
- nc = NameClass(IN_ATTRIBUTE, null)
- "{"
- p = Expr(false, scope, null, null)
- { p = afterComments(p); }
- "}"
- { return sb.makeAttribute(nc, p, makeLocation(t), a); }
-}
-
-ParsedNameClass NameClass(int context, Annotations[] pa) :
-{
- Annotations a;
- ParsedNameClass nc;
-}
-{
- a = Annotations()
- (nc = PrimaryNameClass(context, a) nc = AnnotateAfter(nc) nc = NameClassAlternatives(context, nc, pa)
- | nc = AnyNameExceptClass(context, a, pa)
- | nc = NsNameExceptClass(context, a, pa))
- { return nc; }
-}
-
-ParsedNameClass AnnotateAfter(ParsedNameClass nc) :
-{
- ParsedElementAnnotation e;
-}
-{
- ( <FANNOTATE> e = AnnotationElement(false) { nc = ncb.annotateAfter(nc, e); })*
- { return nc; }
-}
-
-ParsedNameClass NameClassAlternatives(int context, ParsedNameClass nc, Annotations[] pa) :
-{
- Token t;
- ParsedNameClass[] nameClasses;
- int nNameClasses;
-}
-{
- (
- {
- nameClasses = new ParsedNameClass[2];
- nameClasses[0] = nc;
- nNameClasses = 1;
- }
- (t = "|" nc = BasicNameClass(context) nc = AnnotateAfter(nc)
- {
- if (nNameClasses >= nameClasses.length) {
- ParsedNameClass[] oldNameClasses = nameClasses;
- nameClasses = new ParsedNameClass[oldNameClasses.length*2];
- System.arraycopy(oldNameClasses, 0, nameClasses, 0, oldNameClasses.length);
- }
- nameClasses[nNameClasses++] = nc;
- })+
- {
- Annotations a;
- if (pa == null)
- a = null;
- else {
- a = pa[0];
- pa[0] = null;
- }
- nc = ncb.makeChoice(Arrays.asList(nameClasses).subList(0,nNameClasses), makeLocation(t), a);
- }
- )?
- { return nc; }
-}
-
-ParsedNameClass BasicNameClass(int context) :
-{
- Annotations a;
- ParsedNameClass nc;
-}
-{
- a = Annotations()
- (nc = PrimaryNameClass(context, a)
- | nc = OpenNameClass(context, a))
- { return nc; }
-}
-
-ParsedNameClass PrimaryNameClass(int context, Annotations a) :
-{
- ParsedNameClass nc;
-}
-{
- (nc = UnprefixedNameClass(context, a)
- | nc = PrefixedNameClass(a)
- | nc = ParenNameClass(context, a))
- { return nc; }
-}
-
-ParsedNameClass OpenNameClass(int context, Annotations a) :
-{
- Token t;
- LocatedString ns;
-}
-{
- ns = NsName() { checkNsName(context, ns); return ncb.makeNsName(ns.getString(), ns.getLocation(), a); }
- | t = "*" { checkAnyName(context, t); return ncb.makeAnyName(makeLocation(t), a); }
-}
-
-
-ParsedNameClass UnprefixedNameClass(int context, Annotations a) :
-{
- LocatedString name;
-}
-{
- name = UnprefixedName()
- {
- String ns;
- if ((context & (IN_ATTRIBUTE|IN_ELEMENT)) == IN_ATTRIBUTE)
- ns = "";
- else
- ns = defaultNamespace;
- return ncb.makeName(ns, name.getString(), null, name.getLocation(), a);
- }
-}
-
-ParsedNameClass PrefixedNameClass(Annotations a) :
-{
- Token t;
-}
-{
- t = <PREFIXED_NAME>
- {
- String qn = t.image;
- int colon = qn.indexOf(':');
- String prefix = qn.substring(0, colon);
- return ncb.makeName(lookupPrefix(prefix, t), qn.substring(colon + 1), prefix, makeLocation(t), a);
- }
-}
-
-ParsedNameClass NsNameExceptClass(int context, Annotations a, Annotations[] pa) :
-{
- LocatedString ns;
- ParsedNameClass nc;
-}
-{
- ns = NsName()
- { checkNsName(context, ns); }
- (nc = ExceptNameClass(context | IN_NS_NAME)
- { nc = ncb.makeNsName(ns.getString(), nc, ns.getLocation(), a); }
- nc = AnnotateAfter(nc)
- | { nc = ncb.makeNsName(ns.getString(), ns.getLocation(), a); }
- nc = AnnotateAfter(nc)
- nc = NameClassAlternatives(context, nc, pa))
- { return nc; }
-}
-
-LocatedString NsName() :
-{
- Token t;
-}
-{
- t = <PREFIX_STAR>
- {
- String qn = t.image;
- String prefix = qn.substring(0, qn.length() - 2);
- return new LocatedString(lookupPrefix(prefix, t), t);
- }
-}
-
-ParsedNameClass AnyNameExceptClass(int context, Annotations a, Annotations[] pa) :
-{
- Token t;
- ParsedNameClass nc;
-}
-{
- t = "*"
- { checkAnyName(context, t); }
- (nc = ExceptNameClass(context | IN_ANY_NAME)
- { nc = ncb.makeAnyName(nc, makeLocation(t), a); }
- nc = AnnotateAfter(nc)
- | { nc = ncb.makeAnyName(makeLocation(t), a); }
- nc = AnnotateAfter(nc)
- nc = NameClassAlternatives(context, nc, pa))
- { return nc; }
-}
-
-ParsedNameClass ParenNameClass(int context, Annotations a) :
-{
- Token t;
- ParsedNameClass nc;
- Annotations[] pa = new Annotations[]{ a };
-}
-{
- t = "(" nc = NameClass(context, pa) { nc = afterComments(nc); } ")"
- {
- if (pa[0] != null)
- nc = ncb.makeChoice(Collections.singletonList(nc), makeLocation(t), pa[0]);
- return nc;
- }
-}
-
-ParsedNameClass ExceptNameClass(int context) :
-{
- ParsedNameClass nc;
-}
-{
- "-" nc = BasicNameClass(context)
- { return nc; }
-}
-
-ParsedPattern ListExpr(Scope scope, Annotations a) :
-{
- Token t;
- ParsedPattern p;
-}
-{
- t = "list"
- "{"
- p = Expr(false, scope, null, null)
- { p = afterComments(p); }
- "}"
- { return sb.makeList(p, makeLocation(t), a); }
-}
-
-ParsedPattern MixedExpr(Scope scope, Annotations a) :
-{
- Token t;
- ParsedPattern p;
-}
-{
- t = "mixed"
- "{"
- p = Expr(false, scope, null, null)
- { p = afterComments(p); }
- "}"
- { return sb.makeMixed(p, makeLocation(t), a); }
-}
-
-ParsedPattern GrammarExpr(Scope scope, Annotations a) :
-{
- Token t;
- Grammar g;
-}
-{
- t = "grammar" { g = sb.makeGrammar(scope); }
- "{" a = GrammarBody(g, g, a) { topLevelComments(g); } "}"
- { return g.endGrammar(makeLocation(t), a); }
-}
-
-ParsedPattern ParenExpr(boolean topLevel, Scope scope, Annotations a) :
-{
- Token t;
- ParsedPattern p;
-}
-{
- t = "(" p = Expr(topLevel, scope, t, a) { p = afterComments(p); } ")"
- { return p; }
-}
-
-Annotations GrammarBody(GrammarSection section, Scope scope, Annotations a) :
-{
- ParsedElementAnnotation e;
-}
-{
- (LOOKAHEAD(2) e = AnnotationElementNotKeyword()
- { if (a == null) a = sb.makeAnnotations(null, getContext()); a.addElement(e); })*
- (GrammarComponent(section, scope))*
- { return a; }
-}
-
-void GrammarComponent(GrammarSection section, Scope scope) :
-{
- ParsedElementAnnotation e;
- Annotations a;
-}
-{
- (a = Annotations()
- (Definition(section, scope, a)
- | Include(section, scope, a)
- | Div(section, scope, a)))
- (LOOKAHEAD(2) e = AnnotationElementNotKeyword() { section.topLevelAnnotation(e); })*
-}
-
-void Definition(GrammarSection section, Scope scope, Annotations a) :
-{}
-{
- (Define(section, scope, a) | Start(section, scope, a))
-}
-
-void Start(GrammarSection section, Scope scope, Annotations a) :
-{
- Token t;
- GrammarSection.Combine combine;
- ParsedPattern p;
-}
-{
- t = "start" combine = AssignOp() p = Expr(false, scope, null, null)
- { section.define(GrammarSection.START, combine, p, makeLocation(t), a); }
-}
-
-void Define(GrammarSection section, Scope scope, Annotations a) :
-{
- LocatedString name;
- GrammarSection.Combine combine;
- ParsedPattern p;
-}
-{
- name = Identifier() combine = AssignOp() p = Expr(false, scope, null, null)
- { section.define(name.getString(), combine, p, name.getLocation(), a); }
-}
-
-GrammarSection.Combine AssignOp() :
-{}
-{
- "=" { return null; }
- | "|=" { return GrammarSection.COMBINE_CHOICE; }
- | "&=" { return GrammarSection.COMBINE_INTERLEAVE; }
-}
-
-void Include(GrammarSection section, Scope scope, Annotations a) :
-{
- Token t;
- String href;
- String ns;
- Include include = section.makeInclude();
-}
-{
- t = "include" href = Literal()
- ns = Inherit()
- ("{" a = IncludeBody(include, scope, a) { topLevelComments(include); } "}")?
- {
- try {
- include.endInclude(parseable, resolve(href), ns, makeLocation(t), a);
- }
- catch (IllegalSchemaException e) { }
- }
-}
-
-Annotations IncludeBody(GrammarSection section, Scope scope, Annotations a) :
-{
- ParsedElementAnnotation e;
-}
-{
- (LOOKAHEAD(2) e = AnnotationElementNotKeyword()
- { if (a == null) a = sb.makeAnnotations(null, getContext()); a.addElement(e); })*
- (IncludeComponent(section, scope))*
- { return a; }
-}
-
-
-void IncludeComponent(GrammarSection section, Scope scope) :
-{
- ParsedElementAnnotation e;
- Annotations a;
-}
-{
- (a = Annotations() (Definition(section, scope, a)
- | IncludeDiv(section, scope, a)))
- (LOOKAHEAD(2) e = AnnotationElementNotKeyword() { section.topLevelAnnotation(e); })*
-}
-
-void Div(GrammarSection section, Scope scope, Annotations a) :
-{
- Token t;
- Div div = section.makeDiv();
-}
-{
- t = "div" "{" a = GrammarBody(div, scope, a) { topLevelComments(div); } "}"
- { div.endDiv(makeLocation(t), a); }
-}
-
-void IncludeDiv(GrammarSection section, Scope scope, Annotations a) :
-{
- Token t;
- Div div = section.makeDiv();
-}
-{
- t = "div" "{" a = IncludeBody(div, scope, a) { topLevelComments(div); } "}"
- { div.endDiv(makeLocation(t), a); }
-}
-
-ParsedPattern ExternalRefExpr(Scope scope, Annotations a) :
-{
- Token t;
- String href;
- String ns;
-}
-{
- t = "external" href = Literal()
- ns = Inherit()
- {
- try {
- return sb.makeExternalRef(parseable, resolve(href), ns, scope, makeLocation(t), a);
- }
- catch (IllegalSchemaException e) {
- return sb.makeErrorPattern();
- }
- }
-}
-
-String Inherit() :
-{
- String ns = null;
-}
-{
- ("inherit" "=" ns = Prefix())?
- {
- if (ns == null)
- ns = defaultNamespace;
- return ns;
- }
-}
-
-ParsedPattern ParentExpr(Scope scope, Annotations a) :
-{
- LocatedString name;
-}
-{
- "parent" { a = addCommentsToChildAnnotations(a); } name = Identifier()
- {
- if(scope==null) {
- error("parent_ref_outside_grammar",name.getToken());
- return sb.makeErrorPattern();
- } else {
- return scope.makeParentRef(name.getString(), name.getLocation(), a);
- }
- }
-}
-
-ParsedPattern IdentifierExpr(Scope scope, Annotations a) :
-{
- LocatedString name;
-}
-{
- name = Identifier()
- {
- if(scope==null) {
- error("ref_outside_grammar",name.getToken());
- return sb.makeErrorPattern();
- } else {
- return scope.makeRef(name.getString(), name.getLocation(), a);
- }
- }
-}
-
-ParsedPattern ValueExpr(boolean topLevel, Annotations a) :
-{
- LocatedString s;
-}
-{
- s = LocatedLiteral()
- {
- if (topLevel && annotationsIncludeElements) {
- error("top_level_follow_annotation", s.getToken());
- a = null;
- }
- return sb.makeValue("", "token", s.getString(), getContext(), defaultNamespace, s.getLocation(), a);
- }
-}
-
-ParsedPattern DataExpr(boolean topLevel, Scope scope, Annotations a, Token[] except) :
-{
- Token datatypeToken;
- Location loc;
- String datatype;
- String datatypeUri = null;
- String s = null;
- ParsedPattern e = null;
- DataPatternBuilder dpb;
-}
-{
- datatypeToken = DatatypeName()
- {
- datatype = datatypeToken.image;
- loc = makeLocation(datatypeToken);
- int colon = datatype.indexOf(':');
- if (colon < 0)
- datatypeUri = "";
- else {
- String prefix = datatype.substring(0, colon);
- datatypeUri = lookupDatatype(prefix, datatypeToken);
- datatype = datatype.substring(colon + 1);
- }
- }
- ((s = Literal()
- {
- if (topLevel && annotationsIncludeElements) {
- error("top_level_follow_annotation", datatypeToken);
- a = null;
- }
- return sb.makeValue(datatypeUri, datatype, s, getContext(), defaultNamespace, loc, a);
- }
- )
- | ( { dpb = sb.makeDataPatternBuilder(datatypeUri, datatype, loc); }
- ( (Params(dpb) (e = Except(scope, except))?)
- | (e = Except(scope, except))?)
- { return e == null ? dpb.makePattern(loc, a) : dpb.makePattern(e, loc, a); }))
-}
-
-Token DatatypeName() :
-{
- Token t;
-}
-{
- (t = "string" | t = "token" | t = <PREFIXED_NAME>)
- { return t; }
-}
-
-LocatedString Identifier() :
-{
- LocatedString s;
- Token t;
-}
-{
- (t = <IDENTIFIER> { s = new LocatedString(t.image, t); }
- | t = <ESCAPED_IDENTIFIER> { s = new LocatedString(t.image.substring(1), t); })
- { return s; }
-}
-
-String Prefix() :
-{
- Token t;
- String prefix;
-}
-{
- (t = <IDENTIFIER> { prefix = t.image; }
- | t = <ESCAPED_IDENTIFIER> { prefix = t.image.substring(1); }
- | t = Keyword() { prefix = t.image; })
- { return lookupPrefix(prefix, t); }
-}
-
-LocatedString UnprefixedName() :
-{
- LocatedString s;
- Token t;
-}
-{
- (s = Identifier()
- | t = Keyword() { s = new LocatedString(t.image, t); })
- { return s; }
-}
-
-void Params(DataPatternBuilder dpb) :
-{}
-{
- "{" (Param(dpb))* "}"
-}
-
-void Param(DataPatternBuilder dpb) :
-{
- LocatedString name;
- Annotations a;
- String value;
-}
-{
- a = Annotations() name = UnprefixedName() "=" { a = addCommentsToLeadingAnnotations(a); } value = Literal()
- { dpb.addParam(name.getString(), value, getContext(), defaultNamespace, name.getLocation(), a); }
-}
-
-ParsedPattern Except(Scope scope, Token[] except) :
-{
- Annotations a;
- ParsedPattern p;
- Token t;
- Token[] innerExcept = new Token[1];
-}
-{
- t = "-" a = Annotations() p = PrimaryExpr(false, scope, a, innerExcept)
- {
- checkExcept(innerExcept);
- except[0] = t;
- return p;
- }
-}
-
-ParsedElementAnnotation Documentation() :
-{
- CommentList comments = getComments();
- ElementAnnotationBuilder eab;
- Token t;
-}
-{
- (t = <DOCUMENTATION> | t = <DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT>)
- {
- eab = sb.makeElementAnnotationBuilder(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_ANNOTATIONS,
- "documentation",
- getCompatibilityPrefix(),
- makeLocation(t),
- comments,
- getContext());
- eab.addText(mungeComment(t.image), makeLocation(t), null);
- }
- (t = <DOCUMENTATION_CONTINUE> { eab.addText("\n" + mungeComment(t.image), makeLocation(t), null); })*
- { return eab.makeElementAnnotation(); }
-}
-
-Annotations Annotations() :
-{
- CommentList comments = getComments();
- Annotations a = null;
- ParsedElementAnnotation e;
-}
-{
- ( { a = sb.makeAnnotations(comments, getContext()); }
- (e = Documentation() { a.addElement(e); })+
- {
- comments = getComments();
- if (comments != null)
- a.addLeadingComment(comments);
- }
- )?
- ("[" { if (a == null) a = sb.makeAnnotations(comments, getContext()); clearAttributeList(); annotationsIncludeElements = false; }
- (LOOKAHEAD(2) PrefixedAnnotationAttribute(a, false) )*
- ( e = AnnotationElement(false) { a.addElement(e); annotationsIncludeElements = true; } )*
- { a.addComment(getComments()); }
- "]")?
- {
- if (a == null && comments != null)
- a = sb.makeAnnotations(comments, getContext());
- return a;
- }
-}
-
-void AnnotationAttribute(Annotations a) :
-{}
-{
- PrefixedAnnotationAttribute(a, true) | UnprefixedAnnotationAttribute(a)
-}
-
-void PrefixedAnnotationAttribute(Annotations a, boolean nested) :
-{
- Token t;
- String value;
-}
-{
- t = <PREFIXED_NAME> "=" value = Literal()
- {
- String qn = t.image;
- int colon = qn.indexOf(':');
- String prefix = qn.substring(0, colon);
- String ns = lookupPrefix(prefix, t);
- if (ns == this.inheritedNs)
- error("inherited_annotation_namespace", t);
- else if (ns.length() == 0 && !nested)
- error("unqualified_annotation_attribute", t);
- else if (ns.equals(WellKnownNamespaces.RELAX_NG) && !nested)
- error("relax_ng_namespace", t);
- /*else if (ns.length() == 0
- && qn.length() - colon - 1 == 5
- && qn.regionMatches(colon + 1, "xmlns", 0, 5))
- error("xmlns_annotation_attribute", t);*/
- else if (ns.equals(WellKnownNamespaces.XMLNS))
- error("xmlns_annotation_attribute_uri", t);
- else {
- if (ns.length() == 0)
- prefix = null;
- addAttribute(a, ns, qn.substring(colon + 1), prefix, value, t);
- }
- }
-}
-
-void UnprefixedAnnotationAttribute(Annotations a) :
-{
- LocatedString name;
- String value;
-}
-{
- name = UnprefixedName() "=" value = Literal()
- {
- if (name.getString().equals("xmlns"))
- error("xmlns_annotation_attribute", name.getToken());
- else
- addAttribute(a, "", name.getString(), null, value, name.getToken());
- }
-}
-
-ParsedElementAnnotation AnnotationElement(boolean nested) :
-{
- ParsedElementAnnotation a;
-}
-{
- (a = PrefixedAnnotationElement(nested)
- | a = UnprefixedAnnotationElement())
- { return a; }
-}
-
-ParsedElementAnnotation AnnotationElementNotKeyword() :
-{
- ParsedElementAnnotation a;
-}
-{
- (a = PrefixedAnnotationElement(false)
- | a = IdentifierAnnotationElement())
- { return a; }
-}
-
-ParsedElementAnnotation PrefixedAnnotationElement(boolean nested) :
-{
- CommentList comments = getComments();
- Token t;
- ElementAnnotationBuilder eab;
-}
-{
- t = <PREFIXED_NAME>
- {
- String qn = t.image;
- int colon = qn.indexOf(':');
- String prefix = qn.substring(0, colon);
- String ns = lookupPrefix(prefix, t);
- if (ns == this.inheritedNs) {
- error("inherited_annotation_namespace", t);
- ns = "";
- }
- else if (!nested && ns.equals(WellKnownNamespaces.RELAX_NG)) {
- error("relax_ng_namespace", t);
- ns = "";
- }
- else {
- if (ns.length() == 0)
- prefix = null;
- }
- eab = sb.makeElementAnnotationBuilder(ns, qn.substring(colon + 1), prefix,
- makeLocation(t), comments, getContext());
- }
- AnnotationElementContent(eab)
- { return eab.makeElementAnnotation(); }
-}
-
-ParsedElementAnnotation UnprefixedAnnotationElement() :
-{
- CommentList comments = getComments();
- LocatedString name;
- ElementAnnotationBuilder eab;
-}
-{
- name = UnprefixedName()
- {
- eab = sb.makeElementAnnotationBuilder("", name.getString(), null,
- name.getLocation(), comments, getContext());
- }
- AnnotationElementContent(eab)
- { return eab.makeElementAnnotation(); }
-}
-
-ParsedElementAnnotation IdentifierAnnotationElement() :
-{
- CommentList comments = getComments();
- LocatedString name;
- ElementAnnotationBuilder eab;
-}
-{
- name = Identifier()
- {
- eab = sb.makeElementAnnotationBuilder("", name.getString(), null,
- name.getLocation(), comments, getContext());
- }
- AnnotationElementContent(eab)
- { return eab.makeElementAnnotation(); }
-}
-
-void AnnotationElementContent(ElementAnnotationBuilder eab) :
-{
- ParsedElementAnnotation e;
-}
-{
- "[" { clearAttributeList(); }
- (LOOKAHEAD(2) AnnotationAttribute(eab))*
- ((AnnotationElementLiteral(eab)
- ("~" AnnotationElementLiteral(eab))*)
- | e = AnnotationElement(true) { eab.addElement(e); })*
- { eab.addComment(getComments()); }
- "]"
-}
-
-void AnnotationElementLiteral(ElementAnnotationBuilder eab) :
-{
- Token t;
- CommentList comments = getComments();
-}
-{
- t = <LITERAL> { eab.addText(unquote(t.image), makeLocation(t), comments); }
-}
-
-String Literal() :
-{
- Token t;
- String s;
- StringBuffer buf;
-}
-{
- t = <LITERAL>
- {
- s = unquote(t.image);
- }
- (
- { buf = new StringBuffer(s); }
- ("~" t = <LITERAL> { buf.append(unquote(t.image)); })+
- { s = buf.toString(); }
- )?
- { return s; }
-}
-
-LocatedString LocatedLiteral() :
-{
- Token t;
- Token t2;
- String s;
- StringBuffer buf;
-}
-{
- t = <LITERAL>
- {
- s = unquote(t.image);
- }
- (
- { buf = new StringBuffer(s); }
- ("~" t2 = <LITERAL> { buf.append(unquote(t2.image)); })+
- { s = buf.toString(); }
- )?
- { return new LocatedString(s, t); }
-}
-
-Token Keyword() :
-{
- Token t;
-}
-{
- (t = "element"
- | t = "attribute"
- | t = "namespace"
- | t = "list"
- | t = "mixed"
- | t = "grammar"
- | t = "empty"
- | t = "text"
- | t = "parent"
- | t = "external"
- | t = "notAllowed"
- | t = "start"
- | t = "include"
- | t = "default"
- | t = "inherit"
- | t = "string"
- | t = "token"
- | t = "datatypes"
- | t = "div")
- { return t; }
-}
-
-<*>
-SKIP: {
- < #NEWLINE : [ "\u0000", "\n" ] >
- | < #NOT_NEWLINE : ~[ "\u0000", "\n" ] >
- | < WS: ([ "\u0000", " ", "\n", "\t" ])+ > : DEFAULT
-}
-
-TOKEN :
-{
- < DOCUMENTATION: "##" (<NOT_NEWLINE>)* > : AFTER_DOCUMENTATION
-}
-
-<AFTER_DOCUMENTATION>
-TOKEN :
-{
- < DOCUMENTATION_CONTINUE: <NEWLINE> ([" ", "\t"])* <DOCUMENTATION> >
-}
-
-SPECIAL_TOKEN:
-{
- < SINGLE_LINE_COMMENT: "#" (<NOT_NEWLINE>)* > : AFTER_SINGLE_LINE_COMMENT
-}
-
-<AFTER_SINGLE_LINE_COMMENT>
-TOKEN :
-{
- < DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT: <NEWLINE> ([" ", "\t"])* <DOCUMENTATION> > : AFTER_DOCUMENTATION
-}
-
-<AFTER_SINGLE_LINE_COMMENT>
-SPECIAL_TOKEN :
-{
- < SINGLE_LINE_COMMENT_CONTINUE: <NEWLINE> ([" ", "\t"])* <SINGLE_LINE_COMMENT> >
-}
-
-TOKEN :
-{
- < #BASE_CHAR : [
- "\u0041" - "\u005a",
- "\u0061" - "\u007a",
- "\u00c0" - "\u00d6",
- "\u00d8" - "\u00f6",
- "\u00f8" - "\u00ff",
- "\u0100" - "\u0131",
- "\u0134" - "\u013e",
- "\u0141" - "\u0148",
- "\u014a" - "\u017e",
- "\u0180" - "\u01c3",
- "\u01cd" - "\u01f0",
- "\u01f4" - "\u01f5",
- "\u01fa" - "\u0217",
- "\u0250" - "\u02a8",
- "\u02bb" - "\u02c1",
- "\u0386",
- "\u0388" - "\u038a",
- "\u038c",
- "\u038e" - "\u03a1",
- "\u03a3" - "\u03ce",
- "\u03d0" - "\u03d6",
- "\u03da",
- "\u03dc",
- "\u03de",
- "\u03e0",
- "\u03e2" - "\u03f3",
- "\u0401" - "\u040c",
- "\u040e" - "\u044f",
- "\u0451" - "\u045c",
- "\u045e" - "\u0481",
- "\u0490" - "\u04c4",
- "\u04c7" - "\u04c8",
- "\u04cb" - "\u04cc",
- "\u04d0" - "\u04eb",
- "\u04ee" - "\u04f5",
- "\u04f8" - "\u04f9",
- "\u0531" - "\u0556",
- "\u0559",
- "\u0561" - "\u0586",
- "\u05d0" - "\u05ea",
- "\u05f0" - "\u05f2",
- "\u0621" - "\u063a",
- "\u0641" - "\u064a",
- "\u0671" - "\u06b7",
- "\u06ba" - "\u06be",
- "\u06c0" - "\u06ce",
- "\u06d0" - "\u06d3",
- "\u06d5",
- "\u06e5" - "\u06e6",
- "\u0905" - "\u0939",
- "\u093d",
- "\u0958" - "\u0961",
- "\u0985" - "\u098c",
- "\u098f" - "\u0990",
- "\u0993" - "\u09a8",
- "\u09aa" - "\u09b0",
- "\u09b2",
- "\u09b6" - "\u09b9",
- "\u09dc" - "\u09dd",
- "\u09df" - "\u09e1",
- "\u09f0" - "\u09f1",
- "\u0a05" - "\u0a0a",
- "\u0a0f" - "\u0a10",
- "\u0a13" - "\u0a28",
- "\u0a2a" - "\u0a30",
- "\u0a32" - "\u0a33",
- "\u0a35" - "\u0a36",
- "\u0a38" - "\u0a39",
- "\u0a59" - "\u0a5c",
- "\u0a5e",
- "\u0a72" - "\u0a74",
- "\u0a85" - "\u0a8b",
- "\u0a8d",
- "\u0a8f" - "\u0a91",
- "\u0a93" - "\u0aa8",
- "\u0aaa" - "\u0ab0",
- "\u0ab2" - "\u0ab3",
- "\u0ab5" - "\u0ab9",
- "\u0abd",
- "\u0ae0",
- "\u0b05" - "\u0b0c",
- "\u0b0f" - "\u0b10",
- "\u0b13" - "\u0b28",
- "\u0b2a" - "\u0b30",
- "\u0b32" - "\u0b33",
- "\u0b36" - "\u0b39",
- "\u0b3d",
- "\u0b5c" - "\u0b5d",
- "\u0b5f" - "\u0b61",
- "\u0b85" - "\u0b8a",
- "\u0b8e" - "\u0b90",
- "\u0b92" - "\u0b95",
- "\u0b99" - "\u0b9a",
- "\u0b9c",
- "\u0b9e" - "\u0b9f",
- "\u0ba3" - "\u0ba4",
- "\u0ba8" - "\u0baa",
- "\u0bae" - "\u0bb5",
- "\u0bb7" - "\u0bb9",
- "\u0c05" - "\u0c0c",
- "\u0c0e" - "\u0c10",
- "\u0c12" - "\u0c28",
- "\u0c2a" - "\u0c33",
- "\u0c35" - "\u0c39",
- "\u0c60" - "\u0c61",
- "\u0c85" - "\u0c8c",
- "\u0c8e" - "\u0c90",
- "\u0c92" - "\u0ca8",
- "\u0caa" - "\u0cb3",
- "\u0cb5" - "\u0cb9",
- "\u0cde",
- "\u0ce0" - "\u0ce1",
- "\u0d05" - "\u0d0c",
- "\u0d0e" - "\u0d10",
- "\u0d12" - "\u0d28",
- "\u0d2a" - "\u0d39",
- "\u0d60" - "\u0d61",
- "\u0e01" - "\u0e2e",
- "\u0e30",
- "\u0e32" - "\u0e33",
- "\u0e40" - "\u0e45",
- "\u0e81" - "\u0e82",
- "\u0e84",
- "\u0e87" - "\u0e88",
- "\u0e8a",
- "\u0e8d",
- "\u0e94" - "\u0e97",
- "\u0e99" - "\u0e9f",
- "\u0ea1" - "\u0ea3",
- "\u0ea5",
- "\u0ea7",
- "\u0eaa" - "\u0eab",
- "\u0ead" - "\u0eae",
- "\u0eb0",
- "\u0eb2" - "\u0eb3",
- "\u0ebd",
- "\u0ec0" - "\u0ec4",
- "\u0f40" - "\u0f47",
- "\u0f49" - "\u0f69",
- "\u10a0" - "\u10c5",
- "\u10d0" - "\u10f6",
- "\u1100",
- "\u1102" - "\u1103",
- "\u1105" - "\u1107",
- "\u1109",
- "\u110b" - "\u110c",
- "\u110e" - "\u1112",
- "\u113c",
- "\u113e",
- "\u1140",
- "\u114c",
- "\u114e",
- "\u1150",
- "\u1154" - "\u1155",
- "\u1159",
- "\u115f" - "\u1161",
- "\u1163",
- "\u1165",
- "\u1167",
- "\u1169",
- "\u116d" - "\u116e",
- "\u1172" - "\u1173",
- "\u1175",
- "\u119e",
- "\u11a8",
- "\u11ab",
- "\u11ae" - "\u11af",
- "\u11b7" - "\u11b8",
- "\u11ba",
- "\u11bc" - "\u11c2",
- "\u11eb",
- "\u11f0",
- "\u11f9",
- "\u1e00" - "\u1e9b",
- "\u1ea0" - "\u1ef9",
- "\u1f00" - "\u1f15",
- "\u1f18" - "\u1f1d",
- "\u1f20" - "\u1f45",
- "\u1f48" - "\u1f4d",
- "\u1f50" - "\u1f57",
- "\u1f59",
- "\u1f5b",
- "\u1f5d",
- "\u1f5f" - "\u1f7d",
- "\u1f80" - "\u1fb4",
- "\u1fb6" - "\u1fbc",
- "\u1fbe",
- "\u1fc2" - "\u1fc4",
- "\u1fc6" - "\u1fcc",
- "\u1fd0" - "\u1fd3",
- "\u1fd6" - "\u1fdb",
- "\u1fe0" - "\u1fec",
- "\u1ff2" - "\u1ff4",
- "\u1ff6" - "\u1ffc",
- "\u2126",
- "\u212a" - "\u212b",
- "\u212e",
- "\u2180" - "\u2182",
- "\u3041" - "\u3094",
- "\u30a1" - "\u30fa",
- "\u3105" - "\u312c",
- "\uac00" - "\ud7a3"
- ] >
- | < #IDEOGRAPHIC : [
- "\u4e00" - "\u9fa5",
- "\u3007",
- "\u3021" - "\u3029"
- ] >
- | < #LETTER : (<BASE_CHAR> | <IDEOGRAPHIC>) >
- | < #COMBINING_CHAR : [
- "\u0300" - "\u0345",
- "\u0360" - "\u0361",
- "\u0483" - "\u0486",
- "\u0591" - "\u05a1",
- "\u05a3" - "\u05b9",
- "\u05bb" - "\u05bd",
- "\u05bf",
- "\u05c1" - "\u05c2",
- "\u05c4",
- "\u064b" - "\u0652",
- "\u0670",
- "\u06d6" - "\u06dc",
- "\u06dd" - "\u06df",
- "\u06e0" - "\u06e4",
- "\u06e7" - "\u06e8",
- "\u06ea" - "\u06ed",
- "\u0901" - "\u0903",
- "\u093c",
- "\u093e" - "\u094c",
- "\u094d",
- "\u0951" - "\u0954",
- "\u0962" - "\u0963",
- "\u0981" - "\u0983",
- "\u09bc",
- "\u09be",
- "\u09bf",
- "\u09c0" - "\u09c4",
- "\u09c7" - "\u09c8",
- "\u09cb" - "\u09cd",
- "\u09d7",
- "\u09e2" - "\u09e3",
- "\u0a02",
- "\u0a3c",
- "\u0a3e",
- "\u0a3f",
- "\u0a40" - "\u0a42",
- "\u0a47" - "\u0a48",
- "\u0a4b" - "\u0a4d",
- "\u0a70" - "\u0a71",
- "\u0a81" - "\u0a83",
- "\u0abc",
- "\u0abe" - "\u0ac5",
- "\u0ac7" - "\u0ac9",
- "\u0acb" - "\u0acd",
- "\u0b01" - "\u0b03",
- "\u0b3c",
- "\u0b3e" - "\u0b43",
- "\u0b47" - "\u0b48",
- "\u0b4b" - "\u0b4d",
- "\u0b56" - "\u0b57",
- "\u0b82" - "\u0b83",
- "\u0bbe" - "\u0bc2",
- "\u0bc6" - "\u0bc8",
- "\u0bca" - "\u0bcd",
- "\u0bd7",
- "\u0c01" - "\u0c03",
- "\u0c3e" - "\u0c44",
- "\u0c46" - "\u0c48",
- "\u0c4a" - "\u0c4d",
- "\u0c55" - "\u0c56",
- "\u0c82" - "\u0c83",
- "\u0cbe" - "\u0cc4",
- "\u0cc6" - "\u0cc8",
- "\u0cca" - "\u0ccd",
- "\u0cd5" - "\u0cd6",
- "\u0d02" - "\u0d03",
- "\u0d3e" - "\u0d43",
- "\u0d46" - "\u0d48",
- "\u0d4a" - "\u0d4d",
- "\u0d57",
- "\u0e31",
- "\u0e34" - "\u0e3a",
- "\u0e47" - "\u0e4e",
- "\u0eb1",
- "\u0eb4" - "\u0eb9",
- "\u0ebb" - "\u0ebc",
- "\u0ec8" - "\u0ecd",
- "\u0f18" - "\u0f19",
- "\u0f35",
- "\u0f37",
- "\u0f39",
- "\u0f3e",
- "\u0f3f",
- "\u0f71" - "\u0f84",
- "\u0f86" - "\u0f8b",
- "\u0f90" - "\u0f95",
- "\u0f97",
- "\u0f99" - "\u0fad",
- "\u0fb1" - "\u0fb7",
- "\u0fb9",
- "\u20d0" - "\u20dc",
- "\u20e1",
- "\u302a" - "\u302f",
- "\u3099",
- "\u309a"
- ] >
- | < #DIGIT : [
- "\u0030" - "\u0039",
- "\u0660" - "\u0669",
- "\u06f0" - "\u06f9",
- "\u0966" - "\u096f",
- "\u09e6" - "\u09ef",
- "\u0a66" - "\u0a6f",
- "\u0ae6" - "\u0aef",
- "\u0b66" - "\u0b6f",
- "\u0be7" - "\u0bef",
- "\u0c66" - "\u0c6f",
- "\u0ce6" - "\u0cef",
- "\u0d66" - "\u0d6f",
- "\u0e50" - "\u0e59",
- "\u0ed0" - "\u0ed9",
- "\u0f20" - "\u0f29"
- ] >
- | < #EXTENDER : [
- "\u00b7",
- "\u02d0",
- "\u02d1",
- "\u0387",
- "\u0640",
- "\u0e46",
- "\u0ec6",
- "\u3005",
- "\u3031" - "\u3035",
- "\u309d" - "\u309e",
- "\u30fc" - "\u30fe"
- ] >
- | < #NMSTART : (<LETTER> | "_") >
- | < #NMCHAR : (<LETTER> | <COMBINING_CHAR> | <EXTENDER> | <DIGIT> | "." | "-" | "_") >
- | < #NCNAME: <NMSTART> (<NMCHAR>)* >
-}
-
-TOKEN :
-{
- < IDENTIFIER: <NCNAME> >
- | < ESCAPED_IDENTIFIER: "\\" <NCNAME> >
- | < PREFIX_STAR: <NCNAME> ":*" >
- | < PREFIXED_NAME: <NCNAME> ":" <NCNAME> >
- | < LITERAL : ("\"" (~["\u0000", "\""])* "\"")
- | ("'" (~["\u0000", "'"])* "'")
- | ("\"\"\"" (~["\""]
- | ("\"" ~["\""])
- | ("\"\"" ~["\""]))* "\"\"\"")
- | ("'''" (~["'"]
- | ("'" ~["'"])
- | ("''" ~["'"]))* "'''") >
- | < FANNOTATE : ">>" >
-}
-
-/* This avoids lexical errors from JavaCC. */
-<*>
-TOKEN :
-{
- < ILLEGAL_CHAR : [ "\u0000" - "\u0008", "\u000b" - "\uffff" ] >
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntaxConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntaxConstants.java
deleted file mode 100644
index a252432f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntaxConstants.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-/* Generated By:JavaCC: Do not edit this line. CompactSyntaxConstants.java */
-package com.sun.xml.internal.rngom.parse.compact;
-
-
-/**
- * Token literal values and constants.
- * Generated by org.javacc.parser.OtherFilesGen#start()
- */
-public interface CompactSyntaxConstants {
-
- /** End of File. */
- int EOF = 0;
- /** RegularExpression Id. */
- int NEWLINE = 37;
- /** RegularExpression Id. */
- int NOT_NEWLINE = 38;
- /** RegularExpression Id. */
- int WS = 39;
- /** RegularExpression Id. */
- int DOCUMENTATION = 40;
- /** RegularExpression Id. */
- int DOCUMENTATION_CONTINUE = 41;
- /** RegularExpression Id. */
- int SINGLE_LINE_COMMENT = 42;
- /** RegularExpression Id. */
- int DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT = 43;
- /** RegularExpression Id. */
- int SINGLE_LINE_COMMENT_CONTINUE = 44;
- /** RegularExpression Id. */
- int BASE_CHAR = 45;
- /** RegularExpression Id. */
- int IDEOGRAPHIC = 46;
- /** RegularExpression Id. */
- int LETTER = 47;
- /** RegularExpression Id. */
- int COMBINING_CHAR = 48;
- /** RegularExpression Id. */
- int DIGIT = 49;
- /** RegularExpression Id. */
- int EXTENDER = 50;
- /** RegularExpression Id. */
- int NMSTART = 51;
- /** RegularExpression Id. */
- int NMCHAR = 52;
- /** RegularExpression Id. */
- int NCNAME = 53;
- /** RegularExpression Id. */
- int IDENTIFIER = 54;
- /** RegularExpression Id. */
- int ESCAPED_IDENTIFIER = 55;
- /** RegularExpression Id. */
- int PREFIX_STAR = 56;
- /** RegularExpression Id. */
- int PREFIXED_NAME = 57;
- /** RegularExpression Id. */
- int LITERAL = 58;
- /** RegularExpression Id. */
- int FANNOTATE = 59;
- /** RegularExpression Id. */
- int ILLEGAL_CHAR = 60;
-
- /** Lexical state. */
- int DEFAULT = 0;
- /** Lexical state. */
- int AFTER_SINGLE_LINE_COMMENT = 1;
- /** Lexical state. */
- int AFTER_DOCUMENTATION = 2;
-
- /** Literal token values. */
- String[] tokenImage = {
- "<EOF>",
- "\"[\"",
- "\"=\"",
- "\"&=\"",
- "\"|=\"",
- "\"start\"",
- "\"div\"",
- "\"include\"",
- "\"~\"",
- "\"]\"",
- "\"grammar\"",
- "\"{\"",
- "\"}\"",
- "\"namespace\"",
- "\"default\"",
- "\"inherit\"",
- "\"datatypes\"",
- "\"empty\"",
- "\"text\"",
- "\"notAllowed\"",
- "\"|\"",
- "\"&\"",
- "\",\"",
- "\"+\"",
- "\"?\"",
- "\"*\"",
- "\"element\"",
- "\"attribute\"",
- "\"(\"",
- "\")\"",
- "\"-\"",
- "\"list\"",
- "\"mixed\"",
- "\"external\"",
- "\"parent\"",
- "\"string\"",
- "\"token\"",
- "<NEWLINE>",
- "<NOT_NEWLINE>",
- "<WS>",
- "<DOCUMENTATION>",
- "<DOCUMENTATION_CONTINUE>",
- "<SINGLE_LINE_COMMENT>",
- "<DOCUMENTATION_AFTER_SINGLE_LINE_COMMENT>",
- "<SINGLE_LINE_COMMENT_CONTINUE>",
- "<BASE_CHAR>",
- "<IDEOGRAPHIC>",
- "<LETTER>",
- "<COMBINING_CHAR>",
- "<DIGIT>",
- "<EXTENDER>",
- "<NMSTART>",
- "<NMCHAR>",
- "<NCNAME>",
- "<IDENTIFIER>",
- "<ESCAPED_IDENTIFIER>",
- "<PREFIX_STAR>",
- "<PREFIXED_NAME>",
- "<LITERAL>",
- "\">>\"",
- "<ILLEGAL_CHAR>",
- };
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntaxTokenManager.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntaxTokenManager.java
deleted file mode 100644
index 94b0c52f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/CompactSyntaxTokenManager.java
+++ /dev/null
@@ -1,1879 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-/* Generated By:JavaCC: Do not edit this line. CompactSyntaxTokenManager.java */
-package com.sun.xml.internal.rngom.parse.compact;
-import java.io.Reader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Hashtable;
-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;
-import com.sun.xml.internal.rngom.ast.builder.DataPatternBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Div;
-import com.sun.xml.internal.rngom.ast.builder.ElementAnnotationBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Grammar;
-import com.sun.xml.internal.rngom.ast.builder.GrammarSection;
-import com.sun.xml.internal.rngom.ast.builder.Include;
-import com.sun.xml.internal.rngom.ast.builder.IncludedGrammar;
-import com.sun.xml.internal.rngom.ast.builder.NameClassBuilder;
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Scope;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedNameClass;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.parse.Context;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.LocatorImpl;
-import com.sun.xml.internal.rngom.util.Localizer;
-import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
-
-/** Token Manager. */
-public class CompactSyntaxTokenManager implements CompactSyntaxConstants
-{
-
- /** Debug output. */
- public java.io.PrintStream debugStream = System.out;
- /** Set debug output. */
- public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private final int jjStopStringLiteralDfa_0(int pos, long active0)
-{
- switch (pos)
- {
- case 0:
- if ((active0 & 0x1f8c0fe4e0L) != 0L)
- {
- jjmatchedKind = 54;
- return 43;
- }
- if ((active0 & 0x800000000000000L) != 0L)
- {
- jjmatchedKind = 60;
- return -1;
- }
- return -1;
- case 1:
- if ((active0 & 0x1f8c0fe4e0L) != 0L)
- {
- jjmatchedKind = 54;
- jjmatchedPos = 1;
- return 43;
- }
- if ((active0 & 0x800000000000000L) != 0L)
- {
- if (jjmatchedPos == 0)
- {
- jjmatchedKind = 60;
- jjmatchedPos = 0;
- }
- return -1;
- }
- return -1;
- case 2:
- if ((active0 & 0x1f8c0fe4a0L) != 0L)
- {
- jjmatchedKind = 54;
- jjmatchedPos = 2;
- return 43;
- }
- if ((active0 & 0x40L) != 0L)
- return 43;
- return -1;
- case 3:
- if ((active0 & 0x1f0c0be4a0L) != 0L)
- {
- jjmatchedKind = 54;
- jjmatchedPos = 3;
- return 43;
- }
- if ((active0 & 0x80040000L) != 0L)
- return 43;
- return -1;
- case 4:
- if ((active0 & 0xe0c09e480L) != 0L)
- {
- jjmatchedKind = 54;
- jjmatchedPos = 4;
- return 43;
- }
- if ((active0 & 0x1100020020L) != 0L)
- return 43;
- return -1;
- case 5:
- if ((active0 & 0x20c09e480L) != 0L)
- {
- jjmatchedKind = 54;
- jjmatchedPos = 5;
- return 43;
- }
- if ((active0 & 0xc00000000L) != 0L)
- return 43;
- return -1;
- case 6:
- if ((active0 & 0x208092000L) != 0L)
- {
- jjmatchedKind = 54;
- jjmatchedPos = 6;
- return 43;
- }
- if ((active0 & 0x400c480L) != 0L)
- return 43;
- return -1;
- case 7:
- if ((active0 & 0x8092000L) != 0L)
- {
- jjmatchedKind = 54;
- jjmatchedPos = 7;
- return 43;
- }
- if ((active0 & 0x200000000L) != 0L)
- return 43;
- return -1;
- case 8:
- if ((active0 & 0x80000L) != 0L)
- {
- jjmatchedKind = 54;
- jjmatchedPos = 8;
- return 43;
- }
- if ((active0 & 0x8012000L) != 0L)
- return 43;
- return -1;
- default :
- return -1;
- }
-}
-private final int jjStartNfa_0(int pos, long active0)
-{
- return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
-}
-private int jjStopAtPos(int pos, int kind)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- return pos + 1;
-}
-private int jjMoveStringLiteralDfa0_0()
-{
- switch(curChar)
- {
- case 38:
- jjmatchedKind = 21;
- return jjMoveStringLiteralDfa1_0(0x8L);
- case 40:
- return jjStopAtPos(0, 28);
- case 41:
- return jjStopAtPos(0, 29);
- case 42:
- return jjStopAtPos(0, 25);
- case 43:
- return jjStopAtPos(0, 23);
- case 44:
- return jjStopAtPos(0, 22);
- case 45:
- return jjStopAtPos(0, 30);
- case 61:
- return jjStopAtPos(0, 2);
- case 62:
- return jjMoveStringLiteralDfa1_0(0x800000000000000L);
- case 63:
- return jjStopAtPos(0, 24);
- case 91:
- return jjStopAtPos(0, 1);
- case 93:
- return jjStopAtPos(0, 9);
- case 97:
- return jjMoveStringLiteralDfa1_0(0x8000000L);
- case 100:
- return jjMoveStringLiteralDfa1_0(0x14040L);
- case 101:
- return jjMoveStringLiteralDfa1_0(0x204020000L);
- case 103:
- return jjMoveStringLiteralDfa1_0(0x400L);
- case 105:
- return jjMoveStringLiteralDfa1_0(0x8080L);
- case 108:
- return jjMoveStringLiteralDfa1_0(0x80000000L);
- case 109:
- return jjMoveStringLiteralDfa1_0(0x100000000L);
- case 110:
- return jjMoveStringLiteralDfa1_0(0x82000L);
- case 112:
- return jjMoveStringLiteralDfa1_0(0x400000000L);
- case 115:
- return jjMoveStringLiteralDfa1_0(0x800000020L);
- case 116:
- return jjMoveStringLiteralDfa1_0(0x1000040000L);
- case 123:
- return jjStopAtPos(0, 11);
- case 124:
- jjmatchedKind = 20;
- return jjMoveStringLiteralDfa1_0(0x10L);
- case 125:
- return jjStopAtPos(0, 12);
- case 126:
- return jjStopAtPos(0, 8);
- default :
- return jjMoveNfa_0(3, 0);
- }
-}
-private int jjMoveStringLiteralDfa1_0(long active0)
-{
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(0, active0);
- return 1;
- }
- switch(curChar)
- {
- case 61:
- if ((active0 & 0x8L) != 0L)
- return jjStopAtPos(1, 3);
- else if ((active0 & 0x10L) != 0L)
- return jjStopAtPos(1, 4);
- break;
- case 62:
- if ((active0 & 0x800000000000000L) != 0L)
- return jjStopAtPos(1, 59);
- break;
- case 97:
- return jjMoveStringLiteralDfa2_0(active0, 0x400012000L);
- case 101:
- return jjMoveStringLiteralDfa2_0(active0, 0x44000L);
- case 105:
- return jjMoveStringLiteralDfa2_0(active0, 0x180000040L);
- case 108:
- return jjMoveStringLiteralDfa2_0(active0, 0x4000000L);
- case 109:
- return jjMoveStringLiteralDfa2_0(active0, 0x20000L);
- case 110:
- return jjMoveStringLiteralDfa2_0(active0, 0x8080L);
- case 111:
- return jjMoveStringLiteralDfa2_0(active0, 0x1000080000L);
- case 114:
- return jjMoveStringLiteralDfa2_0(active0, 0x400L);
- case 116:
- return jjMoveStringLiteralDfa2_0(active0, 0x808000020L);
- case 120:
- return jjMoveStringLiteralDfa2_0(active0, 0x200000000L);
- default :
- break;
- }
- return jjStartNfa_0(0, active0);
-}
-private int jjMoveStringLiteralDfa2_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(0, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(1, active0);
- return 2;
- }
- switch(curChar)
- {
- case 97:
- return jjMoveStringLiteralDfa3_0(active0, 0x420L);
- case 99:
- return jjMoveStringLiteralDfa3_0(active0, 0x80L);
- case 101:
- return jjMoveStringLiteralDfa3_0(active0, 0x4000000L);
- case 102:
- return jjMoveStringLiteralDfa3_0(active0, 0x4000L);
- case 104:
- return jjMoveStringLiteralDfa3_0(active0, 0x8000L);
- case 107:
- return jjMoveStringLiteralDfa3_0(active0, 0x1000000000L);
- case 109:
- return jjMoveStringLiteralDfa3_0(active0, 0x2000L);
- case 112:
- return jjMoveStringLiteralDfa3_0(active0, 0x20000L);
- case 114:
- return jjMoveStringLiteralDfa3_0(active0, 0xc00000000L);
- case 115:
- return jjMoveStringLiteralDfa3_0(active0, 0x80000000L);
- case 116:
- return jjMoveStringLiteralDfa3_0(active0, 0x208090000L);
- case 118:
- if ((active0 & 0x40L) != 0L)
- return jjStartNfaWithStates_0(2, 6, 43);
- break;
- case 120:
- return jjMoveStringLiteralDfa3_0(active0, 0x100040000L);
- default :
- break;
- }
- return jjStartNfa_0(1, active0);
-}
-private int jjMoveStringLiteralDfa3_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(1, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(2, active0);
- return 3;
- }
- switch(curChar)
- {
- case 65:
- return jjMoveStringLiteralDfa4_0(active0, 0x80000L);
- case 97:
- return jjMoveStringLiteralDfa4_0(active0, 0x14000L);
- case 101:
- return jjMoveStringLiteralDfa4_0(active0, 0x170000a000L);
- case 105:
- return jjMoveStringLiteralDfa4_0(active0, 0x800000000L);
- case 108:
- return jjMoveStringLiteralDfa4_0(active0, 0x80L);
- case 109:
- return jjMoveStringLiteralDfa4_0(active0, 0x4000400L);
- case 114:
- return jjMoveStringLiteralDfa4_0(active0, 0x8000020L);
- case 116:
- if ((active0 & 0x40000L) != 0L)
- return jjStartNfaWithStates_0(3, 18, 43);
- else if ((active0 & 0x80000000L) != 0L)
- return jjStartNfaWithStates_0(3, 31, 43);
- return jjMoveStringLiteralDfa4_0(active0, 0x20000L);
- default :
- break;
- }
- return jjStartNfa_0(2, active0);
-}
-private int jjMoveStringLiteralDfa4_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(2, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(3, active0);
- return 4;
- }
- switch(curChar)
- {
- case 100:
- if ((active0 & 0x100000000L) != 0L)
- return jjStartNfaWithStates_0(4, 32, 43);
- break;
- case 101:
- return jjMoveStringLiteralDfa5_0(active0, 0x4000000L);
- case 105:
- return jjMoveStringLiteralDfa5_0(active0, 0x8000000L);
- case 108:
- return jjMoveStringLiteralDfa5_0(active0, 0x80000L);
- case 109:
- return jjMoveStringLiteralDfa5_0(active0, 0x400L);
- case 110:
- if ((active0 & 0x1000000000L) != 0L)
- return jjStartNfaWithStates_0(4, 36, 43);
- return jjMoveStringLiteralDfa5_0(active0, 0xc00000000L);
- case 114:
- return jjMoveStringLiteralDfa5_0(active0, 0x200008000L);
- case 115:
- return jjMoveStringLiteralDfa5_0(active0, 0x2000L);
- case 116:
- if ((active0 & 0x20L) != 0L)
- return jjStartNfaWithStates_0(4, 5, 43);
- return jjMoveStringLiteralDfa5_0(active0, 0x10000L);
- case 117:
- return jjMoveStringLiteralDfa5_0(active0, 0x4080L);
- case 121:
- if ((active0 & 0x20000L) != 0L)
- return jjStartNfaWithStates_0(4, 17, 43);
- break;
- default :
- break;
- }
- return jjStartNfa_0(3, active0);
-}
-private int jjMoveStringLiteralDfa5_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(3, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(4, active0);
- return 5;
- }
- switch(curChar)
- {
- case 97:
- return jjMoveStringLiteralDfa6_0(active0, 0x400L);
- case 98:
- return jjMoveStringLiteralDfa6_0(active0, 0x8000000L);
- case 100:
- return jjMoveStringLiteralDfa6_0(active0, 0x80L);
- case 103:
- if ((active0 & 0x800000000L) != 0L)
- return jjStartNfaWithStates_0(5, 35, 43);
- break;
- case 105:
- return jjMoveStringLiteralDfa6_0(active0, 0x8000L);
- case 108:
- return jjMoveStringLiteralDfa6_0(active0, 0x84000L);
- case 110:
- return jjMoveStringLiteralDfa6_0(active0, 0x204000000L);
- case 112:
- return jjMoveStringLiteralDfa6_0(active0, 0x2000L);
- case 116:
- if ((active0 & 0x400000000L) != 0L)
- return jjStartNfaWithStates_0(5, 34, 43);
- break;
- case 121:
- return jjMoveStringLiteralDfa6_0(active0, 0x10000L);
- default :
- break;
- }
- return jjStartNfa_0(4, active0);
-}
-private int jjMoveStringLiteralDfa6_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(4, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(5, active0);
- return 6;
- }
- switch(curChar)
- {
- case 97:
- return jjMoveStringLiteralDfa7_0(active0, 0x200002000L);
- case 101:
- if ((active0 & 0x80L) != 0L)
- return jjStartNfaWithStates_0(6, 7, 43);
- break;
- case 111:
- return jjMoveStringLiteralDfa7_0(active0, 0x80000L);
- case 112:
- return jjMoveStringLiteralDfa7_0(active0, 0x10000L);
- case 114:
- if ((active0 & 0x400L) != 0L)
- return jjStartNfaWithStates_0(6, 10, 43);
- break;
- case 116:
- if ((active0 & 0x4000L) != 0L)
- return jjStartNfaWithStates_0(6, 14, 43);
- else if ((active0 & 0x8000L) != 0L)
- return jjStartNfaWithStates_0(6, 15, 43);
- else if ((active0 & 0x4000000L) != 0L)
- return jjStartNfaWithStates_0(6, 26, 43);
- break;
- case 117:
- return jjMoveStringLiteralDfa7_0(active0, 0x8000000L);
- default :
- break;
- }
- return jjStartNfa_0(5, active0);
-}
-private int jjMoveStringLiteralDfa7_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(5, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(6, active0);
- return 7;
- }
- switch(curChar)
- {
- case 99:
- return jjMoveStringLiteralDfa8_0(active0, 0x2000L);
- case 101:
- return jjMoveStringLiteralDfa8_0(active0, 0x10000L);
- case 108:
- if ((active0 & 0x200000000L) != 0L)
- return jjStartNfaWithStates_0(7, 33, 43);
- break;
- case 116:
- return jjMoveStringLiteralDfa8_0(active0, 0x8000000L);
- case 119:
- return jjMoveStringLiteralDfa8_0(active0, 0x80000L);
- default :
- break;
- }
- return jjStartNfa_0(6, active0);
-}
-private int jjMoveStringLiteralDfa8_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(6, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(7, active0);
- return 8;
- }
- switch(curChar)
- {
- case 101:
- if ((active0 & 0x2000L) != 0L)
- return jjStartNfaWithStates_0(8, 13, 43);
- else if ((active0 & 0x8000000L) != 0L)
- return jjStartNfaWithStates_0(8, 27, 43);
- return jjMoveStringLiteralDfa9_0(active0, 0x80000L);
- case 115:
- if ((active0 & 0x10000L) != 0L)
- return jjStartNfaWithStates_0(8, 16, 43);
- break;
- default :
- break;
- }
- return jjStartNfa_0(7, active0);
-}
-private int jjMoveStringLiteralDfa9_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(7, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(8, active0);
- return 9;
- }
- switch(curChar)
- {
- case 100:
- if ((active0 & 0x80000L) != 0L)
- return jjStartNfaWithStates_0(9, 19, 43);
- break;
- default :
- break;
- }
- return jjStartNfa_0(8, active0);
-}
-private int jjStartNfaWithStates_0(int pos, int kind, int state)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return pos + 1; }
- return jjMoveNfa_0(state, pos + 1);
-}
-static final long[] jjbitVec0 = {
- 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-static final long[] jjbitVec2 = {
- 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-static final long[] jjbitVec3 = {
- 0x0L, 0xffffffffffffc000L, 0xfffff0007fffffffL, 0x7fffffL
-};
-static final long[] jjbitVec4 = {
- 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL
-};
-static final long[] jjbitVec5 = {
- 0x7ff3ffffffffffffL, 0x7ffffffffffffdfeL, 0xffffffffffffffffL, 0xfc31ffffffffe00fL
-};
-static final long[] jjbitVec6 = {
- 0xffffffL, 0xffffffffffff0000L, 0xf80001ffffffffffL, 0x3L
-};
-static final long[] jjbitVec7 = {
- 0x0L, 0x0L, 0xfffffffbffffd740L, 0xffffd547f7fffL
-};
-static final long[] jjbitVec8 = {
- 0xffffffffffffdffeL, 0xffffffffdffeffffL, 0xffffffffffff0003L, 0x33fcfffffff199fL
-};
-static final long[] jjbitVec9 = {
- 0xfffe000000000000L, 0xfffffffe027fffffL, 0x7fL, 0x707ffffff0000L
-};
-static final long[] jjbitVec10 = {
- 0x7fffffe00000000L, 0xfffe0000000007feL, 0x7cffffffffffffffL, 0x60002f7fffL
-};
-static final long[] jjbitVec11 = {
- 0x23ffffffffffffe0L, 0x3ff000000L, 0x3c5fdfffff99fe0L, 0x30003b0000000L
-};
-static final long[] jjbitVec12 = {
- 0x36dfdfffff987e0L, 0x1c00005e000000L, 0x23edfdfffffbafe0L, 0x100000000L
-};
-static final long[] jjbitVec13 = {
- 0x23cdfdfffff99fe0L, 0x3b0000000L, 0x3bfc718d63dc7e0L, 0x0L
-};
-static final long[] jjbitVec14 = {
- 0x3effdfffffddfe0L, 0x300000000L, 0x3effdfffffddfe0L, 0x340000000L
-};
-static final long[] jjbitVec15 = {
- 0x3fffdfffffddfe0L, 0x300000000L, 0x0L, 0x0L
-};
-static final long[] jjbitVec16 = {
- 0xd7ffffffffffeL, 0x3fL, 0x200d6caefef02596L, 0x1fL
-};
-static final long[] jjbitVec17 = {
- 0x0L, 0x3fffffffeffL, 0x0L, 0x0L
-};
-static final long[] jjbitVec18 = {
- 0x0L, 0x0L, 0xffffffff00000000L, 0x7fffffffff003fL
-};
-static final long[] jjbitVec19 = {
- 0x500000000007daedL, 0x2c62ab82315001L, 0xf580c90040000000L, 0x201080000000007L
-};
-static final long[] jjbitVec20 = {
- 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffff0fffffffL, 0x3ffffffffffffffL
-};
-static final long[] jjbitVec21 = {
- 0xffffffff3f3fffffL, 0x3fffffffaaff3f3fL, 0x5fdfffffffffffffL, 0x1fdc1fff0fcf1fdcL
-};
-static final long[] jjbitVec22 = {
- 0x4c4000000000L, 0x0L, 0x7L, 0x0L
-};
-static final long[] jjbitVec23 = {
- 0x3fe00000080L, 0xfffffffffffffffeL, 0xfffffffe001fffffL, 0x7ffffffffffffffL
-};
-static final long[] jjbitVec24 = {
- 0x1fffffffffe0L, 0x0L, 0x0L, 0x0L
-};
-static final long[] jjbitVec25 = {
- 0xffffffffffffffffL, 0xffffffffffffffffL, 0x3fffffffffL, 0x0L
-};
-static final long[] jjbitVec26 = {
- 0xffffffffffffffffL, 0xffffffffffffffffL, 0xfffffffffL, 0x0L
-};
-static final long[] jjbitVec27 = {
- 0x0L, 0x0L, 0x80000000000000L, 0xff7fffffff7fffffL
-};
-static final long[] jjbitVec28 = {
- 0xffffffL, 0xffffffffffff0000L, 0xf80001ffffffffffL, 0x30003L
-};
-static final long[] jjbitVec29 = {
- 0xffffffffffffffffL, 0x30000003fL, 0xfffffffbffffd7c0L, 0xffffd547f7fffL
-};
-static final long[] jjbitVec30 = {
- 0xffffffffffffdffeL, 0xffffffffdffeffffL, 0xffffffffffff007bL, 0x33fcfffffff199fL
-};
-static final long[] jjbitVec31 = {
- 0xfffe000000000000L, 0xfffffffe027fffffL, 0xbbfffffbfffe007fL, 0x707ffffff0016L
-};
-static final long[] jjbitVec32 = {
- 0x7fffffe00000000L, 0xffff03ff0007ffffL, 0x7cffffffffffffffL, 0x3ff3dffffef7fffL
-};
-static final long[] jjbitVec33 = {
- 0xf3ffffffffffffeeL, 0xffcfff1e3fffL, 0xd3c5fdfffff99feeL, 0x3ffcfb080399fL
-};
-static final long[] jjbitVec34 = {
- 0xd36dfdfffff987e4L, 0x1fffc05e003987L, 0xf3edfdfffffbafeeL, 0xffc100003bbfL
-};
-static final long[] jjbitVec35 = {
- 0xf3cdfdfffff99feeL, 0xffc3b0c0398fL, 0xc3bfc718d63dc7ecL, 0xff8000803dc7L
-};
-static final long[] jjbitVec36 = {
- 0xc3effdfffffddfeeL, 0xffc300603ddfL, 0xc3effdfffffddfecL, 0xffc340603ddfL
-};
-static final long[] jjbitVec37 = {
- 0xc3fffdfffffddfecL, 0xffc300803dcfL, 0x0L, 0x0L
-};
-static final long[] jjbitVec38 = {
- 0x7ff7ffffffffffeL, 0x3ff7fffL, 0x3bff6caefef02596L, 0x3ff3f5fL
-};
-static final long[] jjbitVec39 = {
- 0xc2a003ff03000000L, 0xfffe03fffffffeffL, 0x2fe3ffffebf0fdfL, 0x0L
-};
-static final long[] jjbitVec40 = {
- 0x0L, 0x0L, 0x0L, 0x21fff0000L
-};
-static final long[] jjbitVec41 = {
- 0x3efffe000000a0L, 0xfffffffffffffffeL, 0xfffffffe661fffffL, 0x77ffffffffffffffL
-};
-private int jjMoveNfa_0(int startState, int curPos)
-{
- int startsAt = 0;
- jjnewStateCnt = 43;
- int i = 1;
- jjstateSet[0] = startState;
- int kind = 0x7fffffff;
- for (;;)
- {
- if (++jjround == 0x7fffffff)
- ReInitRounds();
- if (curChar < 64)
- {
- long l = 1L << curChar;
- do
- {
- switch(jjstateSet[--i])
- {
- case 3:
- if ((0xfffffffffffff9ffL & l) != 0L)
- {
- if (kind > 60)
- kind = 60;
- }
- if ((0x100000601L & l) != 0L)
- {
- if (kind > 39)
- kind = 39;
- jjCheckNAdd(0);
- }
- else if (curChar == 39)
- jjstateSet[jjnewStateCnt++] = 31;
- else if (curChar == 34)
- jjstateSet[jjnewStateCnt++] = 22;
- else if (curChar == 35)
- {
- if (kind > 42)
- kind = 42;
- jjCheckNAdd(5);
- }
- if (curChar == 39)
- jjCheckNAddTwoStates(13, 14);
- else if (curChar == 34)
- jjCheckNAddTwoStates(10, 11);
- else if (curChar == 35)
- jjstateSet[jjnewStateCnt++] = 1;
- break;
- case 43:
- if ((0x3ff600000000000L & l) != 0L)
- jjCheckNAddTwoStates(39, 40);
- else if (curChar == 58)
- jjstateSet[jjnewStateCnt++] = 41;
- if ((0x3ff600000000000L & l) != 0L)
- jjCheckNAddTwoStates(36, 38);
- else if (curChar == 58)
- jjstateSet[jjnewStateCnt++] = 37;
- if ((0x3ff600000000000L & l) != 0L)
- {
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
- }
- break;
- case 0:
- if ((0x100000601L & l) == 0L)
- break;
- if (kind > 39)
- kind = 39;
- jjCheckNAdd(0);
- break;
- case 1:
- if (curChar != 35)
- break;
- if (kind > 40)
- kind = 40;
- jjCheckNAdd(2);
- break;
- case 2:
- if ((0xfffffffffffffbfeL & l) == 0L)
- break;
- if (kind > 40)
- kind = 40;
- jjCheckNAdd(2);
- break;
- case 4:
- if (curChar != 35)
- break;
- if (kind > 42)
- kind = 42;
- jjCheckNAdd(5);
- break;
- case 5:
- if ((0xfffffffffffffbfeL & l) == 0L)
- break;
- if (kind > 42)
- kind = 42;
- jjCheckNAdd(5);
- break;
- case 8:
- if ((0x3ff600000000000L & l) == 0L)
- break;
- if (kind > 55)
- kind = 55;
- jjstateSet[jjnewStateCnt++] = 8;
- break;
- case 9:
- if (curChar == 34)
- jjCheckNAddTwoStates(10, 11);
- break;
- case 10:
- if ((0xfffffffbfffffffeL & l) != 0L)
- jjCheckNAddTwoStates(10, 11);
- break;
- case 11:
- case 20:
- if (curChar == 34 && kind > 58)
- kind = 58;
- break;
- case 12:
- if (curChar == 39)
- jjCheckNAddTwoStates(13, 14);
- break;
- case 13:
- if ((0xffffff7ffffffffeL & l) != 0L)
- jjCheckNAddTwoStates(13, 14);
- break;
- case 14:
- case 29:
- if (curChar == 39 && kind > 58)
- kind = 58;
- break;
- case 15:
- if (curChar == 34)
- jjCheckNAddStates(0, 2);
- break;
- case 16:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddStates(0, 2);
- break;
- case 17:
- case 19:
- if (curChar == 34)
- jjCheckNAdd(16);
- break;
- case 18:
- if (curChar == 34)
- jjAddStates(3, 4);
- break;
- case 21:
- if (curChar == 34)
- jjstateSet[jjnewStateCnt++] = 20;
- break;
- case 22:
- if (curChar == 34)
- jjstateSet[jjnewStateCnt++] = 15;
- break;
- case 23:
- if (curChar == 34)
- jjstateSet[jjnewStateCnt++] = 22;
- break;
- case 24:
- if (curChar == 39)
- jjCheckNAddStates(5, 7);
- break;
- case 25:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddStates(5, 7);
- break;
- case 26:
- case 28:
- if (curChar == 39)
- jjCheckNAdd(25);
- break;
- case 27:
- if (curChar == 39)
- jjAddStates(8, 9);
- break;
- case 30:
- if (curChar == 39)
- jjstateSet[jjnewStateCnt++] = 29;
- break;
- case 31:
- if (curChar == 39)
- jjstateSet[jjnewStateCnt++] = 24;
- break;
- case 32:
- if (curChar == 39)
- jjstateSet[jjnewStateCnt++] = 31;
- break;
- case 33:
- if ((0xfffffffffffff9ffL & l) != 0L && kind > 60)
- kind = 60;
- break;
- case 35:
- if ((0x3ff600000000000L & l) == 0L)
- break;
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
- break;
- case 36:
- if ((0x3ff600000000000L & l) != 0L)
- jjCheckNAddTwoStates(36, 38);
- break;
- case 37:
- if (curChar == 42 && kind > 56)
- kind = 56;
- break;
- case 38:
- if (curChar == 58)
- jjstateSet[jjnewStateCnt++] = 37;
- break;
- case 39:
- if ((0x3ff600000000000L & l) != 0L)
- jjCheckNAddTwoStates(39, 40);
- break;
- case 40:
- if (curChar == 58)
- jjstateSet[jjnewStateCnt++] = 41;
- break;
- case 42:
- if ((0x3ff600000000000L & l) == 0L)
- break;
- if (kind > 57)
- kind = 57;
- jjstateSet[jjnewStateCnt++] = 42;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else if (curChar < 128)
- {
- long l = 1L << (curChar & 077);
- do
- {
- switch(jjstateSet[--i])
- {
- case 3:
- if (kind > 60)
- kind = 60;
- if ((0x7fffffe87fffffeL & l) != 0L)
- {
- if (kind > 54)
- kind = 54;
- jjCheckNAddStates(10, 14);
- }
- else if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 7;
- break;
- case 43:
- if ((0x7fffffe87fffffeL & l) != 0L)
- jjCheckNAddTwoStates(39, 40);
- if ((0x7fffffe87fffffeL & l) != 0L)
- jjCheckNAddTwoStates(36, 38);
- if ((0x7fffffe87fffffeL & l) != 0L)
- {
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
- }
- break;
- case 2:
- if (kind > 40)
- kind = 40;
- jjstateSet[jjnewStateCnt++] = 2;
- break;
- case 5:
- if (kind > 42)
- kind = 42;
- jjstateSet[jjnewStateCnt++] = 5;
- break;
- case 6:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 7;
- break;
- case 7:
- case 8:
- if ((0x7fffffe87fffffeL & l) == 0L)
- break;
- if (kind > 55)
- kind = 55;
- jjCheckNAdd(8);
- break;
- case 10:
- jjAddStates(15, 16);
- break;
- case 13:
- jjAddStates(17, 18);
- break;
- case 16:
- jjAddStates(0, 2);
- break;
- case 25:
- jjAddStates(5, 7);
- break;
- case 33:
- if (kind > 60)
- kind = 60;
- break;
- case 34:
- if ((0x7fffffe87fffffeL & l) == 0L)
- break;
- if (kind > 54)
- kind = 54;
- jjCheckNAddStates(10, 14);
- break;
- case 35:
- if ((0x7fffffe87fffffeL & l) == 0L)
- break;
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
- break;
- case 36:
- if ((0x7fffffe87fffffeL & l) != 0L)
- jjCheckNAddTwoStates(36, 38);
- break;
- case 39:
- if ((0x7fffffe87fffffeL & l) != 0L)
- jjCheckNAddTwoStates(39, 40);
- break;
- case 41:
- case 42:
- if ((0x7fffffe87fffffeL & l) == 0L)
- break;
- if (kind > 57)
- kind = 57;
- jjCheckNAdd(42);
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else
- {
- int hiByte = (int)(curChar >> 8);
- int i1 = hiByte >> 6;
- long l1 = 1L << (hiByte & 077);
- int i2 = (curChar & 0xff) >> 6;
- long l2 = 1L << (curChar & 077);
- do
- {
- switch(jjstateSet[--i])
- {
- case 3:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- {
- if (kind > 60)
- kind = 60;
- }
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- {
- if (kind > 54)
- kind = 54;
- jjCheckNAddStates(10, 14);
- }
- break;
- case 43:
- if (jjCanMove_2(hiByte, i1, i2, l1, l2))
- {
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
- }
- if (jjCanMove_2(hiByte, i1, i2, l1, l2))
- jjCheckNAddTwoStates(36, 38);
- if (jjCanMove_2(hiByte, i1, i2, l1, l2))
- jjCheckNAddTwoStates(39, 40);
- break;
- case 2:
- if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 40)
- kind = 40;
- jjstateSet[jjnewStateCnt++] = 2;
- break;
- case 5:
- if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 42)
- kind = 42;
- jjstateSet[jjnewStateCnt++] = 5;
- break;
- case 7:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 55)
- kind = 55;
- jjCheckNAdd(8);
- break;
- case 8:
- if (!jjCanMove_2(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 55)
- kind = 55;
- jjCheckNAdd(8);
- break;
- case 10:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(15, 16);
- break;
- case 13:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(17, 18);
- break;
- case 16:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(0, 2);
- break;
- case 25:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(5, 7);
- break;
- case 33:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 60)
- kind = 60;
- break;
- case 34:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 54)
- kind = 54;
- jjCheckNAddStates(10, 14);
- break;
- case 35:
- if (!jjCanMove_2(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
- break;
- case 36:
- if (jjCanMove_2(hiByte, i1, i2, l1, l2))
- jjCheckNAddTwoStates(36, 38);
- break;
- case 39:
- if (jjCanMove_2(hiByte, i1, i2, l1, l2))
- jjCheckNAddTwoStates(39, 40);
- break;
- case 41:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 57)
- kind = 57;
- jjCheckNAdd(42);
- break;
- case 42:
- if (!jjCanMove_2(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 57)
- kind = 57;
- jjCheckNAdd(42);
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- if (kind != 0x7fffffff)
- {
- jjmatchedKind = kind;
- jjmatchedPos = curPos;
- kind = 0x7fffffff;
- }
- ++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 43 - (jjnewStateCnt = startsAt)))
- return curPos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return curPos; }
- }
-}
-private int jjMoveStringLiteralDfa0_1()
-{
- return jjMoveNfa_1(1, 0);
-}
-private int jjMoveNfa_1(int startState, int curPos)
-{
- int startsAt = 0;
- jjnewStateCnt = 10;
- int i = 1;
- jjstateSet[0] = startState;
- int kind = 0x7fffffff;
- for (;;)
- {
- if (++jjround == 0x7fffffff)
- ReInitRounds();
- if (curChar < 64)
- {
- long l = 1L << curChar;
- do
- {
- switch(jjstateSet[--i])
- {
- case 1:
- if ((0xfffffffffffff9ffL & l) != 0L)
- {
- if (kind > 60)
- kind = 60;
- }
- if ((0x100000601L & l) != 0L)
- {
- if (kind > 39)
- kind = 39;
- jjCheckNAdd(0);
- }
- if ((0x401L & l) != 0L)
- jjCheckNAddStates(19, 22);
- break;
- case 0:
- if ((0x100000601L & l) == 0L)
- break;
- if (kind > 39)
- kind = 39;
- jjCheckNAdd(0);
- break;
- case 2:
- if ((0x401L & l) != 0L)
- jjCheckNAddStates(19, 22);
- break;
- case 3:
- if ((0x100000200L & l) != 0L)
- jjCheckNAddTwoStates(3, 6);
- break;
- case 4:
- if (curChar != 35)
- break;
- if (kind > 43)
- kind = 43;
- jjCheckNAdd(5);
- break;
- case 5:
- if ((0xfffffffffffffbfeL & l) == 0L)
- break;
- if (kind > 43)
- kind = 43;
- jjCheckNAdd(5);
- break;
- case 6:
- if (curChar == 35)
- jjstateSet[jjnewStateCnt++] = 4;
- break;
- case 7:
- if ((0x100000200L & l) != 0L)
- jjCheckNAddTwoStates(7, 8);
- break;
- case 8:
- if (curChar != 35)
- break;
- if (kind > 44)
- kind = 44;
- jjCheckNAdd(9);
- break;
- case 9:
- if ((0xfffffffffffffbfeL & l) == 0L)
- break;
- if (kind > 44)
- kind = 44;
- jjCheckNAdd(9);
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else if (curChar < 128)
- {
- long l = 1L << (curChar & 077);
- do
- {
- switch(jjstateSet[--i])
- {
- case 1:
- if (kind > 60)
- kind = 60;
- break;
- case 5:
- if (kind > 43)
- kind = 43;
- jjstateSet[jjnewStateCnt++] = 5;
- break;
- case 9:
- if (kind > 44)
- kind = 44;
- jjstateSet[jjnewStateCnt++] = 9;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else
- {
- int hiByte = (int)(curChar >> 8);
- int i1 = hiByte >> 6;
- long l1 = 1L << (hiByte & 077);
- int i2 = (curChar & 0xff) >> 6;
- long l2 = 1L << (curChar & 077);
- do
- {
- switch(jjstateSet[--i])
- {
- case 1:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 60)
- kind = 60;
- break;
- case 5:
- if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 43)
- kind = 43;
- jjstateSet[jjnewStateCnt++] = 5;
- break;
- case 9:
- if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 44)
- kind = 44;
- jjstateSet[jjnewStateCnt++] = 9;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- if (kind != 0x7fffffff)
- {
- jjmatchedKind = kind;
- jjmatchedPos = curPos;
- kind = 0x7fffffff;
- }
- ++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 10 - (jjnewStateCnt = startsAt)))
- return curPos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return curPos; }
- }
-}
-private int jjMoveStringLiteralDfa0_2()
-{
- return jjMoveNfa_2(1, 0);
-}
-private int jjMoveNfa_2(int startState, int curPos)
-{
- int startsAt = 0;
- jjnewStateCnt = 7;
- int i = 1;
- jjstateSet[0] = startState;
- int kind = 0x7fffffff;
- for (;;)
- {
- if (++jjround == 0x7fffffff)
- ReInitRounds();
- if (curChar < 64)
- {
- long l = 1L << curChar;
- do
- {
- switch(jjstateSet[--i])
- {
- case 1:
- if ((0xfffffffffffff9ffL & l) != 0L)
- {
- if (kind > 60)
- kind = 60;
- }
- if ((0x100000601L & l) != 0L)
- {
- if (kind > 39)
- kind = 39;
- jjCheckNAdd(0);
- }
- if ((0x401L & l) != 0L)
- jjCheckNAddTwoStates(2, 5);
- break;
- case 0:
- if ((0x100000601L & l) == 0L)
- break;
- if (kind > 39)
- kind = 39;
- jjCheckNAdd(0);
- break;
- case 2:
- if ((0x100000200L & l) != 0L)
- jjCheckNAddTwoStates(2, 5);
- break;
- case 3:
- if (curChar != 35)
- break;
- if (kind > 41)
- kind = 41;
- jjCheckNAdd(4);
- break;
- case 4:
- if ((0xfffffffffffffbfeL & l) == 0L)
- break;
- if (kind > 41)
- kind = 41;
- jjCheckNAdd(4);
- break;
- case 5:
- if (curChar == 35)
- jjstateSet[jjnewStateCnt++] = 3;
- break;
- case 6:
- if ((0xfffffffffffff9ffL & l) != 0L && kind > 60)
- kind = 60;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else if (curChar < 128)
- {
- long l = 1L << (curChar & 077);
- do
- {
- switch(jjstateSet[--i])
- {
- case 1:
- if (kind > 60)
- kind = 60;
- break;
- case 4:
- if (kind > 41)
- kind = 41;
- jjstateSet[jjnewStateCnt++] = 4;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else
- {
- int hiByte = (int)(curChar >> 8);
- int i1 = hiByte >> 6;
- long l1 = 1L << (hiByte & 077);
- int i2 = (curChar & 0xff) >> 6;
- long l2 = 1L << (curChar & 077);
- do
- {
- switch(jjstateSet[--i])
- {
- case 1:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 60)
- kind = 60;
- break;
- case 4:
- if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 41)
- kind = 41;
- jjstateSet[jjnewStateCnt++] = 4;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- if (kind != 0x7fffffff)
- {
- jjmatchedKind = kind;
- jjmatchedPos = curPos;
- kind = 0x7fffffff;
- }
- ++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 7 - (jjnewStateCnt = startsAt)))
- return curPos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return curPos; }
- }
-}
-static final int[] jjnextStates = {
- 16, 17, 18, 19, 21, 25, 26, 27, 28, 30, 35, 36, 38, 39, 40, 10,
- 11, 13, 14, 3, 6, 7, 8,
-};
-private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
-{
- switch(hiByte)
- {
- case 0:
- return ((jjbitVec2[i2] & l2) != 0L);
- default :
- if ((jjbitVec0[i1] & l1) != 0L)
- return true;
- return false;
- }
-}
-private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
-{
- switch(hiByte)
- {
- case 0:
- return ((jjbitVec4[i2] & l2) != 0L);
- case 1:
- return ((jjbitVec5[i2] & l2) != 0L);
- case 2:
- return ((jjbitVec6[i2] & l2) != 0L);
- case 3:
- return ((jjbitVec7[i2] & l2) != 0L);
- case 4:
- return ((jjbitVec8[i2] & l2) != 0L);
- case 5:
- return ((jjbitVec9[i2] & l2) != 0L);
- case 6:
- return ((jjbitVec10[i2] & l2) != 0L);
- case 9:
- return ((jjbitVec11[i2] & l2) != 0L);
- case 10:
- return ((jjbitVec12[i2] & l2) != 0L);
- case 11:
- return ((jjbitVec13[i2] & l2) != 0L);
- case 12:
- return ((jjbitVec14[i2] & l2) != 0L);
- case 13:
- return ((jjbitVec15[i2] & l2) != 0L);
- case 14:
- return ((jjbitVec16[i2] & l2) != 0L);
- case 15:
- return ((jjbitVec17[i2] & l2) != 0L);
- case 16:
- return ((jjbitVec18[i2] & l2) != 0L);
- case 17:
- return ((jjbitVec19[i2] & l2) != 0L);
- case 30:
- return ((jjbitVec20[i2] & l2) != 0L);
- case 31:
- return ((jjbitVec21[i2] & l2) != 0L);
- case 33:
- return ((jjbitVec22[i2] & l2) != 0L);
- case 48:
- return ((jjbitVec23[i2] & l2) != 0L);
- case 49:
- return ((jjbitVec24[i2] & l2) != 0L);
- case 159:
- return ((jjbitVec25[i2] & l2) != 0L);
- case 215:
- return ((jjbitVec26[i2] & l2) != 0L);
- default :
- if ((jjbitVec3[i1] & l1) != 0L)
- return true;
- return false;
- }
-}
-private static final boolean jjCanMove_2(int hiByte, int i1, int i2, long l1, long l2)
-{
- switch(hiByte)
- {
- case 0:
- return ((jjbitVec27[i2] & l2) != 0L);
- case 1:
- return ((jjbitVec5[i2] & l2) != 0L);
- case 2:
- return ((jjbitVec28[i2] & l2) != 0L);
- case 3:
- return ((jjbitVec29[i2] & l2) != 0L);
- case 4:
- return ((jjbitVec30[i2] & l2) != 0L);
- case 5:
- return ((jjbitVec31[i2] & l2) != 0L);
- case 6:
- return ((jjbitVec32[i2] & l2) != 0L);
- case 9:
- return ((jjbitVec33[i2] & l2) != 0L);
- case 10:
- return ((jjbitVec34[i2] & l2) != 0L);
- case 11:
- return ((jjbitVec35[i2] & l2) != 0L);
- case 12:
- return ((jjbitVec36[i2] & l2) != 0L);
- case 13:
- return ((jjbitVec37[i2] & l2) != 0L);
- case 14:
- return ((jjbitVec38[i2] & l2) != 0L);
- case 15:
- return ((jjbitVec39[i2] & l2) != 0L);
- case 16:
- return ((jjbitVec18[i2] & l2) != 0L);
- case 17:
- return ((jjbitVec19[i2] & l2) != 0L);
- case 30:
- return ((jjbitVec20[i2] & l2) != 0L);
- case 31:
- return ((jjbitVec21[i2] & l2) != 0L);
- case 32:
- return ((jjbitVec40[i2] & l2) != 0L);
- case 33:
- return ((jjbitVec22[i2] & l2) != 0L);
- case 48:
- return ((jjbitVec41[i2] & l2) != 0L);
- case 49:
- return ((jjbitVec24[i2] & l2) != 0L);
- case 159:
- return ((jjbitVec25[i2] & l2) != 0L);
- case 215:
- return ((jjbitVec26[i2] & l2) != 0L);
- default :
- if ((jjbitVec3[i1] & l1) != 0L)
- return true;
- return false;
- }
-}
-
-/** Token literal values. */
-public static final String[] jjstrLiteralImages = {
-"", "\133", "\75", "\46\75", "\174\75", "\163\164\141\162\164",
-"\144\151\166", "\151\156\143\154\165\144\145", "\176", "\135",
-"\147\162\141\155\155\141\162", "\173", "\175", "\156\141\155\145\163\160\141\143\145",
-"\144\145\146\141\165\154\164", "\151\156\150\145\162\151\164", "\144\141\164\141\164\171\160\145\163",
-"\145\155\160\164\171", "\164\145\170\164", "\156\157\164\101\154\154\157\167\145\144", "\174", "\46",
-"\54", "\53", "\77", "\52", "\145\154\145\155\145\156\164",
-"\141\164\164\162\151\142\165\164\145", "\50", "\51", "\55", "\154\151\163\164", "\155\151\170\145\144",
-"\145\170\164\145\162\156\141\154", "\160\141\162\145\156\164", "\163\164\162\151\156\147",
-"\164\157\153\145\156", null, null, null, null, null, null, null, null, null, null, null, null, null,
-null, null, null, null, null, null, null, null, null, "\76\76", null, };
-
-/** Lexer state names. */
-public static final String[] lexStateNames = {
- "DEFAULT",
- "AFTER_SINGLE_LINE_COMMENT",
- "AFTER_DOCUMENTATION",
-};
-
-/** Lex State array. */
-public static final int[] jjnewLexState = {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 2, -1, 1, 2, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-};
-static final long[] jjtoToken = {
- 0x1fc00b1fffffffffL,
-};
-static final long[] jjtoSkip = {
- 0x148000000000L,
-};
-static final long[] jjtoSpecial = {
- 0x140000000000L,
-};
-protected JavaCharStream input_stream;
-private final int[] jjrounds = new int[43];
-private final int[] jjstateSet = new int[86];
-private final StringBuilder jjimage = new StringBuilder();
-private StringBuilder image = jjimage;
-private int jjimageLen;
-private int lengthOfMatch;
-protected char curChar;
-/** Constructor. */
-public CompactSyntaxTokenManager(JavaCharStream stream){
- if (JavaCharStream.staticFlag)
- throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
- input_stream = stream;
-}
-
-/** Constructor. */
-public CompactSyntaxTokenManager(JavaCharStream stream, int lexState){
- this(stream);
- SwitchTo(lexState);
-}
-
-/** Reinitialise parser. */
-public void ReInit(JavaCharStream stream)
-{
- jjmatchedPos = jjnewStateCnt = 0;
- curLexState = defaultLexState;
- input_stream = stream;
- ReInitRounds();
-}
-private void ReInitRounds()
-{
- int i;
- jjround = 0x80000001;
- for (i = 43; i-- > 0;)
- jjrounds[i] = 0x80000000;
-}
-
-/** Reinitialise parser. */
-public void ReInit(JavaCharStream stream, int lexState)
-{
- ReInit(stream);
- SwitchTo(lexState);
-}
-
-/** Switch to specified lex state. */
-public void SwitchTo(int lexState)
-{
- if (lexState >= 3 || lexState < 0)
- throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
- else
- curLexState = lexState;
-}
-
-protected Token jjFillToken()
-{
- final Token t;
- final String curTokenImage;
- final int beginLine;
- final int endLine;
- final int beginColumn;
- final int endColumn;
- String im = jjstrLiteralImages[jjmatchedKind];
- curTokenImage = (im == null) ? input_stream.GetImage() : im;
- beginLine = input_stream.getBeginLine();
- beginColumn = input_stream.getBeginColumn();
- endLine = input_stream.getEndLine();
- endColumn = input_stream.getEndColumn();
- t = Token.newToken(jjmatchedKind, curTokenImage);
-
- t.beginLine = beginLine;
- t.endLine = endLine;
- t.beginColumn = beginColumn;
- t.endColumn = endColumn;
-
- return t;
-}
-
-int curLexState = 0;
-int defaultLexState = 0;
-int jjnewStateCnt;
-int jjround;
-int jjmatchedPos;
-int jjmatchedKind;
-
-/** Get the next Token. */
-public Token getNextToken()
-{
- Token specialToken = null;
- Token matchedToken;
- int curPos = 0;
-
- EOFLoop :
- for (;;)
- {
- try
- {
- curChar = input_stream.BeginToken();
- }
- catch(java.io.IOException e)
- {
- jjmatchedKind = 0;
- matchedToken = jjFillToken();
- matchedToken.specialToken = specialToken;
- return matchedToken;
- }
- image = jjimage;
- image.setLength(0);
- jjimageLen = 0;
-
- switch(curLexState)
- {
- case 0:
- jjmatchedKind = 0x7fffffff;
- jjmatchedPos = 0;
- curPos = jjMoveStringLiteralDfa0_0();
- break;
- case 1:
- jjmatchedKind = 0x7fffffff;
- jjmatchedPos = 0;
- curPos = jjMoveStringLiteralDfa0_1();
- break;
- case 2:
- jjmatchedKind = 0x7fffffff;
- jjmatchedPos = 0;
- curPos = jjMoveStringLiteralDfa0_2();
- break;
- }
- if (jjmatchedKind != 0x7fffffff)
- {
- if (jjmatchedPos + 1 < curPos)
- input_stream.backup(curPos - jjmatchedPos - 1);
- if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
- {
- matchedToken = jjFillToken();
- matchedToken.specialToken = specialToken;
- if (jjnewLexState[jjmatchedKind] != -1)
- curLexState = jjnewLexState[jjmatchedKind];
- return matchedToken;
- }
- else
- {
- if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
- {
- matchedToken = jjFillToken();
- if (specialToken == null)
- specialToken = matchedToken;
- else
- {
- matchedToken.specialToken = specialToken;
- specialToken = (specialToken.next = matchedToken);
- }
- SkipLexicalActions(matchedToken);
- }
- else
- SkipLexicalActions(null);
- if (jjnewLexState[jjmatchedKind] != -1)
- curLexState = jjnewLexState[jjmatchedKind];
- continue EOFLoop;
- }
- }
- int error_line = input_stream.getEndLine();
- int error_column = input_stream.getEndColumn();
- String error_after = null;
- boolean EOFSeen = false;
- try { input_stream.readChar(); input_stream.backup(1); }
- catch (java.io.IOException e1) {
- EOFSeen = true;
- error_after = curPos <= 1 ? "" : input_stream.GetImage();
- if (curChar == '\n' || curChar == '\r') {
- error_line++;
- error_column = 0;
- }
- else
- error_column++;
- }
- if (!EOFSeen) {
- input_stream.backup(1);
- error_after = curPos <= 1 ? "" : input_stream.GetImage();
- }
- throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
- }
-}
-
-void SkipLexicalActions(Token matchedToken)
-{
- switch(jjmatchedKind)
- {
- default :
- break;
- }
-}
-private void jjCheckNAdd(int state)
-{
- if (jjrounds[state] != jjround)
- {
- jjstateSet[jjnewStateCnt++] = state;
- jjrounds[state] = jjround;
- }
-}
-private void jjAddStates(int start, int end)
-{
- do {
- jjstateSet[jjnewStateCnt++] = jjnextStates[start];
- } while (start++ != end);
-}
-private void jjCheckNAddTwoStates(int state1, int state2)
-{
- jjCheckNAdd(state1);
- jjCheckNAdd(state2);
-}
-
-private void jjCheckNAddStates(int start, int end)
-{
- do {
- jjCheckNAdd(jjnextStates[start]);
- } while (start++ != end);
-}
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/EOFException.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/EOFException.java
deleted file mode 100644
index b8ff5b81..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/EOFException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.compact;
-
-import java.io.IOException;
-
-public class EOFException extends IOException {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/EscapeSyntaxException.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/EscapeSyntaxException.java
deleted file mode 100644
index 9e8a1bb4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/EscapeSyntaxException.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.compact;
-
-class EscapeSyntaxException extends RuntimeException {
- private final String key;
- private final int lineNumber;
- private final int columnNumber;
-
- EscapeSyntaxException(String key, int lineNumber, int columnNumber) {
- this.key = key;
- this.lineNumber = lineNumber;
- this.columnNumber = columnNumber;
- }
-
- String getKey() {
- return key;
- }
-
- int getLineNumber() {
- return lineNumber;
- }
-
- int getColumnNumber() {
- return columnNumber;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/JavaCharStream.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/JavaCharStream.java
deleted file mode 100644
index 7cc47020..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/JavaCharStream.java
+++ /dev/null
@@ -1,662 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 5.0 */
-/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-package com.sun.xml.internal.rngom.parse.compact;
-
-/**
- * An implementation of interface CharStream, where the stream is assumed to
- * contain only ASCII characters (with java-like unicode escape processing).
- */
-
-public
-class JavaCharStream
-{
- /** Whether parser is static. */
- public static final boolean staticFlag = false;
-
- static final int hexval(char c) throws java.io.IOException {
- switch(c)
- {
- case '0' :
- return 0;
- case '1' :
- return 1;
- case '2' :
- return 2;
- case '3' :
- return 3;
- case '4' :
- return 4;
- case '5' :
- return 5;
- case '6' :
- return 6;
- case '7' :
- return 7;
- case '8' :
- return 8;
- case '9' :
- return 9;
-
- case 'a' :
- case 'A' :
- return 10;
- case 'b' :
- case 'B' :
- return 11;
- case 'c' :
- case 'C' :
- return 12;
- case 'd' :
- case 'D' :
- return 13;
- case 'e' :
- case 'E' :
- return 14;
- case 'f' :
- case 'F' :
- return 15;
- }
-
- throw new java.io.IOException(); // Should never come here
- }
-
-/** Position in buffer. */
- public int bufpos = -1;
- int bufsize;
- int available;
- int tokenBegin;
- protected int bufline[];
- protected int bufcolumn[];
-
- protected int column = 0;
- protected int line = 1;
-
- protected boolean prevCharIsCR = false;
- protected boolean prevCharIsLF = false;
-
- protected java.io.Reader inputStream;
-
- protected char[] nextCharBuf;
- protected char[] buffer;
- protected int maxNextCharInd = 0;
- protected int nextCharInd = -1;
- protected int inBuf = 0;
- protected int tabSize = 8;
-
- protected void setTabSize(int i) { tabSize = i; }
- protected int getTabSize(int i) { return tabSize; }
-
- protected void ExpandBuff(boolean wrapAround)
- {
- char[] newbuffer = new char[bufsize + 2048];
- int newbufline[] = new int[bufsize + 2048];
- int newbufcolumn[] = new int[bufsize + 2048];
-
- try
- {
- if (wrapAround)
- {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos);
- buffer = newbuffer;
-
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
- bufline = newbufline;
-
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
- System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
- bufcolumn = newbufcolumn;
-
- bufpos += (bufsize - tokenBegin);
- }
- else
- {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- buffer = newbuffer;
-
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- bufline = newbufline;
-
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
- bufcolumn = newbufcolumn;
-
- bufpos -= tokenBegin;
- }
- }
- catch (Throwable t)
- {
- throw new Error(t.getMessage());
- }
-
- available = (bufsize += 2048);
- tokenBegin = 0;
- }
-
- protected void FillBuff() throws java.io.IOException
- {
- int i;
- if (maxNextCharInd == 4096)
- maxNextCharInd = nextCharInd = 0;
-
- try {
- if ((i = inputStream.read(nextCharBuf, maxNextCharInd,
- 4096 - maxNextCharInd)) == -1)
- {
- inputStream.close();
- throw new java.io.IOException();
- }
- else
- maxNextCharInd += i;
- return;
- }
- catch(java.io.IOException e) {
- if (bufpos != 0)
- {
- --bufpos;
- backup(0);
- }
- else
- {
- bufline[bufpos] = line;
- bufcolumn[bufpos] = column;
- }
- throw e;
- }
- }
-
- protected char ReadByte() throws java.io.IOException
- {
- if (++nextCharInd >= maxNextCharInd)
- FillBuff();
-
- return nextCharBuf[nextCharInd];
- }
-
-/** @return starting character for token. */
- public char BeginToken() throws java.io.IOException
- {
- if (inBuf > 0)
- {
- --inBuf;
-
- if (++bufpos == bufsize)
- bufpos = 0;
-
- tokenBegin = bufpos;
- return buffer[bufpos];
- }
-
- tokenBegin = 0;
- bufpos = -1;
-
- return readChar();
- }
-
- protected void AdjustBuffSize()
- {
- if (available == bufsize)
- {
- if (tokenBegin > 2048)
- {
- bufpos = 0;
- available = tokenBegin;
- }
- else
- ExpandBuff(false);
- }
- else if (available > tokenBegin)
- available = bufsize;
- else if ((tokenBegin - available) < 2048)
- ExpandBuff(true);
- else
- available = tokenBegin;
- }
-
- protected void UpdateLineColumn(char c)
- {
- column++;
-
- if (prevCharIsLF)
- {
- prevCharIsLF = false;
- line += (column = 1);
- }
- else if (prevCharIsCR)
- {
- prevCharIsCR = false;
- if (c == '\n')
- {
- prevCharIsLF = true;
- }
- else
- line += (column = 1);
- }
-
- switch (c)
- {
- case '\r' :
- prevCharIsCR = true;
- break;
- case '\n' :
- prevCharIsLF = true;
- break;
- case '\t' :
- column--;
- column += (tabSize - (column % tabSize));
- break;
- default :
- break;
- }
-
- bufline[bufpos] = line;
- bufcolumn[bufpos] = column;
- }
-
-/** Read a character. */
- public char readChar() throws java.io.IOException
- {
- if (inBuf > 0)
- {
- --inBuf;
-
- if (++bufpos == bufsize)
- bufpos = 0;
-
- return buffer[bufpos];
- }
-
- char c;
-
- if (++bufpos == available)
- AdjustBuffSize();
-
- if ((buffer[bufpos] = c = ReadByte()) == '\\')
- {
- UpdateLineColumn(c);
-
- int backSlashCnt = 1;
-
- for (;;) // Read all the backslashes
- {
- if (++bufpos == available)
- AdjustBuffSize();
-
- try
- {
- if ((buffer[bufpos] = c = ReadByte()) != '\\')
- {
- UpdateLineColumn(c);
- // found a non-backslash char.
- if ((c == 'u') && ((backSlashCnt & 1) == 1))
- {
- if (--bufpos < 0)
- bufpos = bufsize - 1;
-
- break;
- }
-
- backup(backSlashCnt);
- return '\\';
- }
- }
- catch(java.io.IOException e)
- {
- // We are returning one backslash so we should only backup (count-1)
- if (backSlashCnt > 1)
- backup(backSlashCnt-1);
-
- return '\\';
- }
-
- UpdateLineColumn(c);
- backSlashCnt++;
- }
-
- // Here, we have seen an odd number of backslash's followed by a 'u'
- try
- {
- while ((c = ReadByte()) == 'u')
- ++column;
-
- buffer[bufpos] = c = (char)(hexval(c) << 12 |
- hexval(ReadByte()) << 8 |
- hexval(ReadByte()) << 4 |
- hexval(ReadByte()));
-
- column += 4;
- }
- catch(java.io.IOException e)
- {
- throw new Error("Invalid escape character at line " + line +
- " column " + column + ".");
- }
-
- if (backSlashCnt == 1)
- return c;
- else
- {
- backup(backSlashCnt - 1);
- return '\\';
- }
- }
- else
- {
- UpdateLineColumn(c);
- return c;
- }
- }
-
- @Deprecated
- /**
- * @deprecated
- * @see #getEndColumn
- */
- public int getColumn() {
- return bufcolumn[bufpos];
- }
-
- @Deprecated
- /**
- * @deprecated
- * @see #getEndLine
- */
- public int getLine() {
- return bufline[bufpos];
- }
-
-/** Get end column. */
- public int getEndColumn() {
- return bufcolumn[bufpos];
- }
-
-/** Get end line. */
- public int getEndLine() {
- return bufline[bufpos];
- }
-
-/** @return column of token start */
- public int getBeginColumn() {
- return bufcolumn[tokenBegin];
- }
-
-/** @return line number of token start */
- public int getBeginLine() {
- return bufline[tokenBegin];
- }
-
-/** Retreat. */
- public void backup(int amount) {
-
- inBuf += amount;
- if ((bufpos -= amount) < 0)
- bufpos += bufsize;
- }
-
-/** Constructor. */
- public JavaCharStream(java.io.Reader dstream,
- int startline, int startcolumn, int buffersize)
- {
- inputStream = dstream;
- line = startline;
- column = startcolumn - 1;
-
- available = bufsize = buffersize;
- buffer = new char[buffersize];
- bufline = new int[buffersize];
- bufcolumn = new int[buffersize];
- nextCharBuf = new char[4096];
- }
-
-/** Constructor. */
- public JavaCharStream(java.io.Reader dstream,
- int startline, int startcolumn)
- {
- this(dstream, startline, startcolumn, 4096);
- }
-
-/** Constructor. */
- public JavaCharStream(java.io.Reader dstream)
- {
- this(dstream, 1, 1, 4096);
- }
-/** Reinitialise. */
- public void ReInit(java.io.Reader dstream,
- int startline, int startcolumn, int buffersize)
- {
- inputStream = dstream;
- line = startline;
- column = startcolumn - 1;
-
- if (buffer == null || buffersize != buffer.length)
- {
- available = bufsize = buffersize;
- buffer = new char[buffersize];
- bufline = new int[buffersize];
- bufcolumn = new int[buffersize];
- nextCharBuf = new char[4096];
- }
- prevCharIsLF = prevCharIsCR = false;
- tokenBegin = inBuf = maxNextCharInd = 0;
- nextCharInd = bufpos = -1;
- }
-
-/** Reinitialise. */
- public void ReInit(java.io.Reader dstream,
- int startline, int startcolumn)
- {
- ReInit(dstream, startline, startcolumn, 4096);
- }
-
-/** Reinitialise. */
- public void ReInit(java.io.Reader dstream)
- {
- ReInit(dstream, 1, 1, 4096);
- }
-/** Constructor. */
- public JavaCharStream(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
- {
- this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
- }
-
-/** Constructor. */
- public JavaCharStream(java.io.InputStream dstream, int startline,
- int startcolumn, int buffersize)
- {
- this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
- }
-
-/** Constructor. */
- public JavaCharStream(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn) throws java.io.UnsupportedEncodingException
- {
- this(dstream, encoding, startline, startcolumn, 4096);
- }
-
-/** Constructor. */
- public JavaCharStream(java.io.InputStream dstream, int startline,
- int startcolumn)
- {
- this(dstream, startline, startcolumn, 4096);
- }
-
-/** Constructor. */
- public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
- {
- this(dstream, encoding, 1, 1, 4096);
- }
-
-/** Constructor. */
- public JavaCharStream(java.io.InputStream dstream)
- {
- this(dstream, 1, 1, 4096);
- }
-
-/** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
- {
- ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
- }
-
-/** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, int startline,
- int startcolumn, int buffersize)
- {
- ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
- }
-/** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn) throws java.io.UnsupportedEncodingException
- {
- ReInit(dstream, encoding, startline, startcolumn, 4096);
- }
-/** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, int startline,
- int startcolumn)
- {
- ReInit(dstream, startline, startcolumn, 4096);
- }
-/** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
- {
- ReInit(dstream, encoding, 1, 1, 4096);
- }
-
-/** Reinitialise. */
- public void ReInit(java.io.InputStream dstream)
- {
- ReInit(dstream, 1, 1, 4096);
- }
-
- /** @return token image as String */
- public String GetImage()
- {
- if (bufpos >= tokenBegin)
- return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
- else
- return new String(buffer, tokenBegin, bufsize - tokenBegin) +
- new String(buffer, 0, bufpos + 1);
- }
-
- /** @return suffix */
- public char[] GetSuffix(int len)
- {
- char[] ret = new char[len];
-
- if ((bufpos + 1) >= len)
- System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
- else
- {
- System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
- len - bufpos - 1);
- System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
- }
-
- return ret;
- }
-
- /** Set buffers back to null when finished. */
- public void Done()
- {
- nextCharBuf = null;
- buffer = null;
- bufline = null;
- bufcolumn = null;
- }
-
- /**
- * Method to adjust line and column numbers for the start of a token.
- */
- public void adjustBeginLineColumn(int newLine, int newCol)
- {
- int start = tokenBegin;
- int len;
-
- if (bufpos >= tokenBegin)
- {
- len = bufpos - tokenBegin + inBuf + 1;
- }
- else
- {
- len = bufsize - tokenBegin + bufpos + 1 + inBuf;
- }
-
- int i = 0, j = 0, k = 0;
- int nextColDiff = 0, columnDiff = 0;
-
- while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
- {
- bufline[j] = newLine;
- nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
- bufcolumn[j] = newCol + columnDiff;
- columnDiff = nextColDiff;
- i++;
- }
-
- if (i < len)
- {
- bufline[j] = newLine++;
- bufcolumn[j] = newCol + columnDiff;
-
- while (i++ < len)
- {
- if (bufline[j = start % bufsize] != bufline[++start % bufsize])
- bufline[j] = newLine++;
- else
- bufline[j] = newLine;
- }
- }
-
- line = bufline[j];
- column = bufcolumn[j];
- }
-
-}
-/* JavaCC - OriginalChecksum=d4510307ecc248a96e4d3455ebf92ff3 (do not edit this line) */
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/Messages.properties
deleted file mode 100644
index 1d1d3e90..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/Messages.properties
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Copyright (C) 2004-2011
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-#
-
-syntax_error=syntax error: {0}
-undeclared_prefix=undeclared prefix \"{0}\"
-xmlns_prefix=prefix must not be \"xmlns\"
-unqualified_annotation_attribute=annotation attribute must have a namespace URI
-inherited_annotation_namespace=namespace URI for annotation cannot be inherited
-xmlns_annotation_attribute=annotation attribute cannot be named \"xmlns\"
-duplicate_attribute=multiple attributes with local name \"{0}\" and namespace URI \"{1}\"
-except_missing_parentheses=parentheses required around \"-\" expression
-xmlns_annotation_attribute_uri=annotation attribute cannot have namespace URI \"http://www.w3.org/2000/xmlns\"
-xml_prefix_bad_uri=prefix \"xml\" can only be bound to namespace URI \"http://www.w3.org/XML/1998/namespace\"
-xml_uri_bad_prefix=only prefix \"xml\" can be bound to namespace URI \"http://www.w3.org/XML/1998/namespace\"
-illegal_hex_digit=expected hex digit
-char_code_too_big=character code must be less than 0x110000
-illegal_char_code=code of character that is not allowed
-illegal_char_code_ref=reference to character whose code is not allowed
-incomplete_escape=incomplete escape sequence
-any_name_except_contains_any_name=\"except\" in \"anyName\" contains \"anyName\"
-ns_name_except_contains_any_name=\"except\" in \"nsName\" contains \"anyName\"
-ns_name_except_contains_ns_name=\"except\" in \"nsName\" contains \"nsName\"
-illegal_surrogate_pair=illegal surrogate pair
-relax_ng_namespace=annotations cannot have namespace URI \"http://relaxng.org/ns/structure/1.0\"
-top_level_follow_annotation=top-level pattern cannot have following annotations
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/ParseException.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/ParseException.java
deleted file mode 100644
index 3aeeb74f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/ParseException.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */
-/* JavaCCOptions:KEEP_LINE_COL=null */
-package com.sun.xml.internal.rngom.parse.compact;
-
-/**
- * This exception is thrown when parse errors are encountered.
- * You can explicitly create objects of this exception type by
- * calling the method generateParseException in the generated
- * parser.
- *
- * You can modify this class to customize your error reporting
- * mechanisms so long as you retain the public fields.
- */
-public class ParseException extends Exception {
-
- /**
- * The version identifier for this Serializable class.
- * Increment only if the <i>serialized</i> form of the
- * class changes.
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * This constructor is used by the method "generateParseException"
- * in the generated parser. Calling this constructor generates
- * a new object of this type with the fields "currentToken",
- * "expectedTokenSequences", and "tokenImage" set.
- */
- public ParseException(Token currentTokenVal,
- int[][] expectedTokenSequencesVal,
- String[] tokenImageVal
- )
- {
- super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal));
- currentToken = currentTokenVal;
- expectedTokenSequences = expectedTokenSequencesVal;
- tokenImage = tokenImageVal;
- }
-
- /**
- * The following constructors are for use by you for whatever
- * purpose you can think of. Constructing the exception in this
- * manner makes the exception behave in the normal way - i.e., as
- * documented in the class "Throwable". The fields "errorToken",
- * "expectedTokenSequences", and "tokenImage" do not contain
- * relevant information. The JavaCC generated code does not use
- * these constructors.
- */
-
- public ParseException() {
- super();
- }
-
- /** Constructor with message. */
- public ParseException(String message) {
- super(message);
- }
-
-
- /**
- * This is the last token that has been consumed successfully. If
- * this object has been created due to a parse error, the token
- * followng this token will (therefore) be the first error token.
- */
- public Token currentToken;
-
- /**
- * Each entry in this array is an array of integers. Each array
- * of integers represents a sequence of tokens (by their ordinal
- * values) that is expected at this point of the parse.
- */
- public int[][] expectedTokenSequences;
-
- /**
- * This is a reference to the "tokenImage" array of the generated
- * parser within which the parse error occurred. This array is
- * defined in the generated ...Constants interface.
- */
- public String[] tokenImage;
-
- /**
- * It uses "currentToken" and "expectedTokenSequences" to generate a parse
- * error message and returns it. If this object has been created
- * due to a parse error, and you do not catch it (it gets thrown
- * from the parser) the correct error message
- * gets displayed.
- */
- private static String initialise(Token currentToken,
- int[][] expectedTokenSequences,
- String[] tokenImage) {
- String eol = System.getProperty("line.separator", "\n");
- StringBuffer expected = new StringBuffer();
- int maxSize = 0;
- for (int i = 0; i < expectedTokenSequences.length; i++) {
- if (maxSize < expectedTokenSequences[i].length) {
- maxSize = expectedTokenSequences[i].length;
- }
- for (int j = 0; j < expectedTokenSequences[i].length; j++) {
- expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' ');
- }
- if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
- expected.append("...");
- }
- expected.append(eol).append(" ");
- }
- String retval = "Encountered \"";
- Token tok = currentToken.next;
- for (int i = 0; i < maxSize; i++) {
- if (i != 0) retval += " ";
- if (tok.kind == 0) {
- retval += tokenImage[0];
- break;
- }
- retval += " " + tokenImage[tok.kind];
- retval += " \"";
- retval += add_escapes(tok.image);
- retval += " \"";
- tok = tok.next;
- }
- retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
- retval += "." + eol;
- if (expectedTokenSequences.length == 1) {
- retval += "Was expecting:" + eol + " ";
- } else {
- retval += "Was expecting one of:" + eol + " ";
- }
- retval += expected.toString();
- return retval;
- }
-
- /**
- * The end of line string for this machine.
- */
- protected String eol = System.getProperty("line.separator", "\n");
-
- /**
- * Used to convert raw characters to their escaped version
- * when these raw version cannot be used as part of an ASCII
- * string literal.
- */
- static String add_escapes(String str) {
- StringBuffer retval = new StringBuffer();
- char ch;
- for (int i = 0; i < str.length(); i++) {
- switch (str.charAt(i))
- {
- case 0 :
- continue;
- case '\b':
- retval.append("\\b");
- continue;
- case '\t':
- retval.append("\\t");
- continue;
- case '\n':
- retval.append("\\n");
- continue;
- case '\f':
- retval.append("\\f");
- continue;
- case '\r':
- retval.append("\\r");
- continue;
- case '\"':
- retval.append("\\\"");
- continue;
- case '\'':
- retval.append("\\\'");
- continue;
- case '\\':
- retval.append("\\\\");
- continue;
- default:
- if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
- String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
- } else {
- retval.append(ch);
- }
- continue;
- }
- }
- return retval.toString();
- }
-
-}
-/* JavaCC - OriginalChecksum=bd9c46050b4c34811443efbf89741eef (do not edit this line) */
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/Token.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/Token.java
deleted file mode 100644
index 2f23d08b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/Token.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */
-/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-package com.sun.xml.internal.rngom.parse.compact;
-
-/**
- * Describes the input token stream.
- */
-
-public class Token implements java.io.Serializable {
-
- /**
- * The version identifier for this Serializable class.
- * Increment only if the <i>serialized</i> form of the
- * class changes.
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * An integer that describes the kind of this token. This numbering
- * system is determined by JavaCCParser, and a table of these numbers is
- * stored in the file ...Constants.java.
- */
- public int kind;
-
- /** The line number of the first character of this Token. */
- public int beginLine;
- /** The column number of the first character of this Token. */
- public int beginColumn;
- /** The line number of the last character of this Token. */
- public int endLine;
- /** The column number of the last character of this Token. */
- public int endColumn;
-
- /**
- * The string image of the token.
- */
- public String image;
-
- /**
- * A reference to the next regular (non-special) token from the input
- * stream. If this is the last token from the input stream, or if the
- * token manager has not read tokens beyond this one, this field is
- * set to null. This is true only if this token is also a regular
- * token. Otherwise, see below for a description of the contents of
- * this field.
- */
- public Token next;
-
- /**
- * This field is used to access special tokens that occur prior to this
- * token, but after the immediately preceding regular (non-special) token.
- * If there are no such special tokens, this field is set to null.
- * When there are more than one such special token, this field refers
- * to the last of these special tokens, which in turn refers to the next
- * previous special token through its specialToken field, and so on
- * until the first special token (whose specialToken field is null).
- * The next fields of special tokens refer to other special tokens that
- * immediately follow it (without an intervening regular token). If there
- * is no such token, this field is null.
- */
- public Token specialToken;
-
- /**
- * An optional attribute value of the Token.
- * Tokens which are not used as syntactic sugar will often contain
- * meaningful values that will be used later on by the compiler or
- * interpreter. This attribute value is often different from the image.
- * Any subclass of Token that actually wants to return a non-null value can
- * override this method as appropriate.
- */
- public Object getValue() {
- return null;
- }
-
- /**
- * No-argument constructor
- */
- public Token() {}
-
- /**
- * Constructs a new token for the specified Image.
- */
- public Token(int kind)
- {
- this(kind, null);
- }
-
- /**
- * Constructs a new token for the specified Image and Kind.
- */
- public Token(int kind, String image)
- {
- this.kind = kind;
- this.image = image;
- }
-
- /**
- * Returns the image.
- */
- public String toString()
- {
- return image;
- }
-
- /**
- * Returns a new Token object, by default. However, if you want, you
- * can create and return subclass objects based on the value of ofKind.
- * Simply add the cases to the switch for all those special cases.
- * For example, if you have a subclass of Token called IDToken that
- * you want to create if ofKind is ID, simply add something like :
- *
- * case MyParserConstants.ID : return new IDToken(ofKind, image);
- *
- * to the following switch statement. Then you can cast matchedToken
- * variable to the appropriate type and use sit in your lexical actions.
- */
- public static Token newToken(int ofKind, String image)
- {
- switch(ofKind)
- {
- default : return new Token(ofKind, image);
- }
- }
-
- public static Token newToken(int ofKind)
- {
- return newToken(ofKind, null);
- }
-
-}
-/* JavaCC - OriginalChecksum=07395369f4a62ea6ce44cc3487e30e69 (do not edit this line) */
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/TokenMgrError.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/TokenMgrError.java
deleted file mode 100644
index 15c220bc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/TokenMgrError.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */
-/* JavaCCOptions: */
-package com.sun.xml.internal.rngom.parse.compact;
-
-/** Token Manager Error. */
-public class TokenMgrError extends Error
-{
-
- /**
- * The version identifier for this Serializable class.
- * Increment only if the <i>serialized</i> form of the
- * class changes.
- */
- private static final long serialVersionUID = 1L;
-
- /*
- * Ordinals for various reasons why an Error of this type can be thrown.
- */
-
- /**
- * Lexical error occurred.
- */
- static final int LEXICAL_ERROR = 0;
-
- /**
- * An attempt was made to create a second instance of a static token manager.
- */
- static final int STATIC_LEXER_ERROR = 1;
-
- /**
- * Tried to change to an invalid lexical state.
- */
- static final int INVALID_LEXICAL_STATE = 2;
-
- /**
- * Detected (and bailed out of) an infinite loop in the token manager.
- */
- static final int LOOP_DETECTED = 3;
-
- /**
- * Indicates the reason why the exception is thrown. It will have
- * one of the above 4 values.
- */
- int errorCode;
-
- /**
- * Replaces unprintable characters by their escaped (or unicode escaped)
- * equivalents in the given string
- */
- protected static final String addEscapes(String str) {
- StringBuffer retval = new StringBuffer();
- char ch;
- for (int i = 0; i < str.length(); i++) {
- switch (str.charAt(i))
- {
- case 0 :
- continue;
- case '\b':
- retval.append("\\b");
- continue;
- case '\t':
- retval.append("\\t");
- continue;
- case '\n':
- retval.append("\\n");
- continue;
- case '\f':
- retval.append("\\f");
- continue;
- case '\r':
- retval.append("\\r");
- continue;
- case '\"':
- retval.append("\\\"");
- continue;
- case '\'':
- retval.append("\\\'");
- continue;
- case '\\':
- retval.append("\\\\");
- continue;
- default:
- if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
- String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
- } else {
- retval.append(ch);
- }
- continue;
- }
- }
- return retval.toString();
- }
-
- /**
- * Returns a detailed message for the Error when it is thrown by the
- * token manager to indicate a lexical error.
- * Parameters :
- * EOFSeen : indicates if EOF caused the lexical error
- * curLexState : lexical state in which this error occurred
- * errorLine : line number when the error occurred
- * errorColumn : column number when the error occurred
- * errorAfter : prefix that was seen before this error occurred
- * curchar : the offending character
- * Note: You can customize the lexical error message by modifying this method.
- */
- protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
- return("Lexical error at line " +
- errorLine + ", column " +
- errorColumn + ". Encountered: " +
- (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
- "after : \"" + addEscapes(errorAfter) + "\"");
- }
-
- /**
- * You can also modify the body of this method to customize your error messages.
- * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
- * of end-users concern, so you can return something like :
- *
- * "Internal Error : Please file a bug report .... "
- *
- * from this method for such cases in the release version of your parser.
- */
- public String getMessage() {
- return super.getMessage();
- }
-
- /*
- * Constructors of various flavors follow.
- */
-
- /** No arg constructor. */
- public TokenMgrError() {
- }
-
- /** Constructor with message and reason. */
- public TokenMgrError(String message, int reason) {
- super(message);
- errorCode = reason;
- }
-
- /** Full Constructor. */
- public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
- this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
- }
-}
-/* JavaCC - OriginalChecksum=1d6588bf7a27100c05b06541f6175759 (do not edit this line) */
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/UCode_UCodeESC_CharStream.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/UCode_UCodeESC_CharStream.java
deleted file mode 100644
index 475258c6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/UCode_UCodeESC_CharStream.java
+++ /dev/null
@@ -1,594 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * 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
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-/* Generated By:JavaCC: Do not edit this line. UCode_UCodeESC_CharStream.java Version 0.7pre6 */
-/* The previous line keeps JavaCC quiet. In fact, the JavaCC generated file
- has been edited to fix some bugs. */
-package com.sun.xml.internal.rngom.parse.compact;
-
-import com.sun.xml.internal.rngom.util.Utf16;
-import com.sun.xml.internal.rngom.ast.builder.BuildException;
-
-import java.io.IOException;
-
-/**
- * An implementation of interface CharStream, where the stream is assumed to
- * contain 16-bit unicode characters.
- */
-public final class UCode_UCodeESC_CharStream {
-
- public static final boolean staticFlag = false;
-
- static final int hexval(char c) {
- switch (c) {
- case '0':
- return 0;
- case '1':
- return 1;
- case '2':
- return 2;
- case '3':
- return 3;
- case '4':
- return 4;
- case '5':
- return 5;
- case '6':
- return 6;
- case '7':
- return 7;
- case '8':
- return 8;
- case '9':
- return 9;
-
- case 'a':
- case 'A':
- return 10;
- case 'b':
- case 'B':
- return 11;
- case 'c':
- case 'C':
- return 12;
- case 'd':
- case 'D':
- return 13;
- case 'e':
- case 'E':
- return 14;
- case 'f':
- case 'F':
- return 15;
- }
- return -1;
- }
- public int bufpos = -1;
- int bufsize;
- int available;
- int tokenBegin;
- private int bufline[];
- private int bufcolumn[];
- private int column = 0;
- private int line = 1;
- private java.io.Reader inputStream;
- private boolean closed = false;
- private boolean prevCharIsLF = false;
- private char[] nextCharBuf;
- private char[] buffer;
- private int maxNextCharInd = 0;
- private int nextCharInd = -1;
- private int inBuf = 0;
-
- private final void ExpandBuff(boolean wrapAround) {
- char[] newbuffer = new char[bufsize + 2048];
- int newbufline[] = new int[bufsize + 2048];
- int newbufcolumn[] = new int[bufsize + 2048];
-
- if (wrapAround) {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- System.arraycopy(buffer, 0, newbuffer,
- bufsize - tokenBegin, bufpos);
- buffer = newbuffer;
-
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
- bufline = newbufline;
-
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
- System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
- bufcolumn = newbufcolumn;
-
- bufpos += (bufsize - tokenBegin);
- } else {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- buffer = newbuffer;
-
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- bufline = newbufline;
-
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
- bufcolumn = newbufcolumn;
-
- bufpos -= tokenBegin;
- }
-
- available = (bufsize += 2048);
- tokenBegin = 0;
- }
-
- private final void FillBuff() throws EOFException {
- int i;
- if (maxNextCharInd == 4096) {
- maxNextCharInd = nextCharInd = 0;
- }
-
- if (closed) {
- throw new EOFException();
- }
- try {
- if ((i = inputStream.read(nextCharBuf, maxNextCharInd, 4096 - maxNextCharInd)) == -1) {
- closed = true;
- inputStream.close();
- throw new EOFException();
- } else {
- maxNextCharInd += i;
- }
- } catch (IOException e) {
- throw new BuildException(e);
- }
- }
-
- private final char ReadChar() throws EOFException {
- if (++nextCharInd >= maxNextCharInd) {
- FillBuff();
- }
-
- return nextCharBuf[nextCharInd];
- }
-
- private final char PeekChar() throws EOFException {
- char c = ReadChar();
- --nextCharInd;
- return c;
- }
-
- public final char BeginToken() throws EOFException {
- if (inBuf > 0) {
- --inBuf;
- return buffer[tokenBegin = (bufpos == bufsize - 1) ? (bufpos = 0)
- : ++bufpos];
- }
-
- tokenBegin = 0;
- bufpos = -1;
-
- return readChar();
- }
-
- private final void AdjustBuffSize() {
- if (available == bufsize) {
- if (tokenBegin > 2048) {
- bufpos = 0;
- available = tokenBegin;
- } else {
- ExpandBuff(false);
- }
- } else if (available > tokenBegin) {
- available = bufsize;
- } else if ((tokenBegin - available) < 2048) {
- ExpandBuff(true);
- } else {
- available = tokenBegin;
- }
- }
-
- private final void UpdateLineColumn(char c) {
- column++;
-
- if (prevCharIsLF) {
- prevCharIsLF = false;
- line += (column = 1);
- }
-
- switch (c) {
- case NEWLINE_MARKER:
- prevCharIsLF = true;
- break;
- case '\t':
- column--;
- column += (8 - (column & 07));
- break;
- default:
- break;
- }
-
- bufline[bufpos] = line;
- bufcolumn[bufpos] = column;
- }
- private static final char NEWLINE_MARKER = '\u0000';
-
- public final char readChar() throws EOFException {
- if (inBuf > 0) {
- --inBuf;
- return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos];
- }
-
- char c;
- try {
- c = ReadChar();
- switch (c) {
- case '\r':
- c = NEWLINE_MARKER;
- try {
- if (PeekChar() == '\n') {
- ReadChar();
- }
- } catch (EOFException e) {
- }
- break;
- case '\n':
- c = NEWLINE_MARKER;
- break;
- case '\t':
- break;
- default:
- if (c >= 0x20) {
- if (Utf16.isSurrogate(c)) {
- if (Utf16.isSurrogate2(c)) {
- throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 1);
- }
- if (++bufpos == available) {
- AdjustBuffSize();
- }
- buffer[bufpos] = c;
- // UpdateLineColumn(c);
- try {
- c = ReadChar();
- } catch (EOFException e) {
- throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 1);
- }
- if (!Utf16.isSurrogate2(c)) {
- throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 2);
- }
- }
- break;
- }
- // fall through
- case '\uFFFE':
- case '\uFFFF':
- throw new EscapeSyntaxException("illegal_char_code", line, column + 1);
- }
- } catch (EOFException e) {
- if (bufpos == -1) {
- if (++bufpos == available) {
- AdjustBuffSize();
- }
- bufline[bufpos] = line;
- bufcolumn[bufpos] = column;
- }
- throw e;
- }
- if (++bufpos == available) {
- AdjustBuffSize();
- }
- buffer[bufpos] = c;
- UpdateLineColumn(c);
- try {
- if (c != '\\' || PeekChar() != 'x') {
- return c;
- }
- } catch (EOFException e) {
- return c;
- }
-
- int xCnt = 1;
- for (;;) {
- ReadChar();
- if (++bufpos == available) {
- AdjustBuffSize();
- }
- buffer[bufpos] = 'x';
- UpdateLineColumn('x');
- try {
- c = PeekChar();
- } catch (EOFException e) {
- backup(xCnt);
- return '\\';
- }
- if (c == '{') {
- ReadChar();
- column++;
- // backup past the 'x's
- bufpos -= xCnt;
- if (bufpos < 0) {
- bufpos += bufsize;
- }
- break;
- }
- if (c != 'x') {
- backup(xCnt);
- return '\\';
- }
- xCnt++;
- }
- try {
- int scalarValue = hexval(ReadChar());
- column++;
- if (scalarValue < 0) {
- throw new EscapeSyntaxException("illegal_hex_digit", line, column);
- }
- while ((c = ReadChar()) != '}') {
- column++;
- int n = hexval(c);
- if (n < 0) {
- throw new EscapeSyntaxException("illegal_hex_digit", line, column);
- }
- scalarValue <<= 4;
- scalarValue |= n;
- if (scalarValue >= 0x110000) {
- throw new EscapeSyntaxException("char_code_too_big", line, column);
- }
- }
- column++; // for the '}'
- if (scalarValue <= 0xFFFF) {
- c = (char) scalarValue;
- switch (c) {
- case '\n':
- case '\r':
- case '\t':
- break;
- default:
- if (c >= 0x20 && !Utf16.isSurrogate(c)) {
- break;
- }
- // fall through
- case '\uFFFE':
- case '\uFFFF':
- throw new EscapeSyntaxException("illegal_char_code_ref", line, column);
- }
- buffer[bufpos] = c;
- return c;
- }
- c = Utf16.surrogate1(scalarValue);
- buffer[bufpos] = c;
- int bufpos1 = bufpos;
- if (++bufpos == bufsize) {
- bufpos = 0;
- }
- buffer[bufpos] = Utf16.surrogate2(scalarValue);
- bufline[bufpos] = bufline[bufpos1];
- bufcolumn[bufpos] = bufcolumn[bufpos1];
- backup(1);
- return c;
- } catch (EOFException e) {
- throw new EscapeSyntaxException("incomplete_escape", line, column);
- }
- }
-
- /**
- * @deprecated @see #getEndColumn
- */
- public final int getColumn() {
- return bufcolumn[bufpos];
- }
-
- /**
- * @deprecated @see #getEndLine
- */
- public final int getLine() {
- return bufline[bufpos];
- }
-
- public final int getEndColumn() {
- return bufcolumn[bufpos];
- }
-
- public final int getEndLine() {
- return bufline[bufpos];
- }
-
- public final int getBeginColumn() {
- return bufcolumn[tokenBegin];
- }
-
- public final int getBeginLine() {
- return bufline[tokenBegin];
- }
-
- public final void backup(int amount) {
-
- inBuf += amount;
- if ((bufpos -= amount) < 0) {
- bufpos += bufsize;
- }
- }
-
- public UCode_UCodeESC_CharStream(java.io.Reader dstream,
- int startline, int startcolumn, int buffersize) {
- inputStream = dstream;
- line = startline;
- column = startcolumn - 1;
-
- available = bufsize = buffersize;
- buffer = new char[buffersize];
- bufline = new int[buffersize];
- bufcolumn = new int[buffersize];
- nextCharBuf = new char[4096];
- skipBOM();
- }
-
- public UCode_UCodeESC_CharStream(java.io.Reader dstream,
- int startline, int startcolumn) {
- this(dstream, startline, startcolumn, 4096);
- }
-
- public void ReInit(java.io.Reader dstream,
- int startline, int startcolumn, int buffersize) {
- inputStream = dstream;
- closed = false;
- line = startline;
- column = startcolumn - 1;
-
- if (buffer == null || buffersize != buffer.length) {
- available = bufsize = buffersize;
- buffer = new char[buffersize];
- bufline = new int[buffersize];
- bufcolumn = new int[buffersize];
- nextCharBuf = new char[4096];
- }
- prevCharIsLF = false;
- tokenBegin = inBuf = maxNextCharInd = 0;
- nextCharInd = bufpos = -1;
- skipBOM();
- }
-
- public void ReInit(java.io.Reader dstream,
- int startline, int startcolumn) {
- ReInit(dstream, startline, startcolumn, 4096);
- }
-
- public UCode_UCodeESC_CharStream(java.io.InputStream dstream, int startline,
- int startcolumn, int buffersize) {
- this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
- }
-
- public UCode_UCodeESC_CharStream(java.io.InputStream dstream, int startline,
- int startcolumn) {
- this(dstream, startline, startcolumn, 4096);
- }
-
- public void ReInit(java.io.InputStream dstream, int startline,
- int startcolumn, int buffersize) {
- ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
- }
-
- public void ReInit(java.io.InputStream dstream, int startline,
- int startcolumn) {
- ReInit(dstream, startline, startcolumn, 4096);
- }
- static private final char BOM = '\ufeff';
-
- private void skipBOM() {
- try {
- if (PeekChar() == BOM) {
- ReadChar();
- }
- } catch (EOFException e) {
- }
- }
-
- public final String GetImage() {
- if (bufpos >= tokenBegin) {
- return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
- } else {
- return new String(buffer, tokenBegin, bufsize - tokenBegin)
- + new String(buffer, 0, bufpos + 1);
- }
- }
-
- public final char[] GetSuffix(int len) {
- char[] ret = new char[len];
-
- if ((bufpos + 1) >= len) {
- System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
- } else {
- System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
- len - bufpos - 1);
- System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
- }
-
- return ret;
- }
-
- public void Done() {
- nextCharBuf = null;
- buffer = null;
- bufline = null;
- bufcolumn = null;
- }
-
- /**
- * Method to adjust line and column numbers for the start of a token.<BR>
- */
- public void adjustBeginLineColumn(int newLine, int newCol) {
- int start = tokenBegin;
- int len;
-
- if (bufpos >= tokenBegin) {
- len = bufpos - tokenBegin + inBuf + 1;
- } else {
- len = bufsize - tokenBegin + bufpos + 1 + inBuf;
- }
-
- int i = 0, j = 0, k = 0;
- int nextColDiff, columnDiff = 0;
-
- while (i < len
- && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) {
- bufline[j] = newLine;
- nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
- bufcolumn[j] = newCol + columnDiff;
- columnDiff = nextColDiff;
- i++;
- }
-
- if (i < len) {
- bufline[j] = newLine++;
- bufcolumn[j] = newCol + columnDiff;
-
- while (i++ < len) {
- if (bufline[j = start % bufsize] != bufline[++start % bufsize]) {
- bufline[j] = newLine++;
- } else {
- bufline[j] = newLine;
- }
- }
- }
-
- line = bufline[j];
- column = bufcolumn[j];
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/AnnotationsHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/AnnotationsHost.java
deleted file mode 100644
index d8a8481b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/AnnotationsHost.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-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;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-class AnnotationsHost extends Base implements Annotations {
- final Annotations lhs;
- final Annotations rhs;
-
- AnnotationsHost( Annotations lhs, Annotations rhs ) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- public void addAttribute(String ns, String localName, String prefix,
- String value, Location _loc) throws BuildException {
- LocationHost loc = cast(_loc);
- lhs.addAttribute(ns, localName, prefix, value, loc.lhs);
- rhs.addAttribute(ns, localName, prefix, value, loc.rhs);
- }
-
- public void addComment(CommentList _comments) throws BuildException {
- CommentListHost comments = (CommentListHost) _comments;
- lhs.addComment(comments==null?null:comments.lhs);
- rhs.addComment(comments==null?null:comments.rhs);
- }
-
- public void addElement(ParsedElementAnnotation _ea) throws BuildException {
- ParsedElementAnnotationHost ea = (ParsedElementAnnotationHost) _ea;
- lhs.addElement(ea.lhs);
- rhs.addElement(ea.rhs);
- }
-
- public void addLeadingComment(CommentList _comments) throws BuildException {
- CommentListHost comments = (CommentListHost) _comments;
- lhs.addLeadingComment(comments.lhs);
- rhs.addLeadingComment(comments.rhs);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/Base.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/Base.java
deleted file mode 100644
index e3f45aac..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/Base.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-import com.sun.xml.internal.rngom.ast.builder.Annotations;
-import com.sun.xml.internal.rngom.ast.om.Location;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class Base {
- protected AnnotationsHost cast( Annotations ann ) {
- if(ann==null)
- return nullAnnotations;
- else
- return (AnnotationsHost)ann;
- }
-
- protected LocationHost cast( Location loc ) {
- if(loc==null)
- return nullLocation;
- else
- return (LocationHost)loc;
- }
-
- private static final AnnotationsHost nullAnnotations = new AnnotationsHost(null,null);
- private static final LocationHost nullLocation = new LocationHost(null,null);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/CommentListHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/CommentListHost.java
deleted file mode 100644
index 808fb51e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/CommentListHost.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-import com.sun.xml.internal.rngom.ast.builder.BuildException;
-import com.sun.xml.internal.rngom.ast.builder.CommentList;
-import com.sun.xml.internal.rngom.ast.om.Location;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-class CommentListHost extends Base implements CommentList {
-
- final CommentList lhs;
- final CommentList rhs;
-
- CommentListHost(CommentList lhs, CommentList rhs) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- public void addComment(String value, Location _loc) throws BuildException {
- LocationHost loc = cast(_loc);
- if(lhs!=null)
- lhs.addComment(value,loc.lhs);
- if(rhs!=null)
- rhs.addComment(value,loc.rhs);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/DataPatternBuilderHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/DataPatternBuilderHost.java
deleted file mode 100644
index 39b53da6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/DataPatternBuilderHost.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-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.DataPatternBuilder;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.parse.Context;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-final class DataPatternBuilderHost extends Base implements DataPatternBuilder {
- final DataPatternBuilder lhs;
- final DataPatternBuilder rhs;
-
- DataPatternBuilderHost( DataPatternBuilder lhs, DataPatternBuilder rhs ) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- public void addParam(String name, String value, Context context, String ns, Location _loc, Annotations _anno) throws BuildException {
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- lhs.addParam( name, value, context, ns, loc.lhs, anno.lhs );
- rhs.addParam( name, value, context, ns, loc.rhs, anno.rhs );
- }
-
- public void annotation(ParsedElementAnnotation _ea) {
- ParsedElementAnnotationHost ea = (ParsedElementAnnotationHost) _ea;
-
- lhs.annotation(ea.lhs);
- rhs.annotation(ea.rhs);
- }
-
- public ParsedPattern makePattern(Location _loc, Annotations _anno) throws BuildException {
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makePattern( loc.lhs, anno.lhs ),
- rhs.makePattern( loc.rhs, anno.rhs ));
- }
-
- public ParsedPattern makePattern(ParsedPattern _except, Location _loc, Annotations _anno) throws BuildException {
- ParsedPatternHost except = (ParsedPatternHost) _except;
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makePattern(except.lhs, loc.lhs, anno.lhs),
- rhs.makePattern(except.rhs, loc.rhs, anno.rhs));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/DivHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/DivHost.java
deleted file mode 100644
index fac42c94..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/DivHost.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-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.Div;
-import com.sun.xml.internal.rngom.ast.om.Location;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class DivHost extends GrammarSectionHost implements Div {
- private final Div lhs;
- private final Div rhs;
-
- DivHost(Div lhs, Div rhs) {
- super(lhs, rhs);
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- public void endDiv(Location _loc, Annotations _anno) throws BuildException {
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- lhs.endDiv( loc.lhs, anno.lhs );
- rhs.endDiv( loc.rhs, anno.rhs );
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ElementAnnotationBuilderHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ElementAnnotationBuilderHost.java
deleted file mode 100644
index 8b0bbed2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ElementAnnotationBuilderHost.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-import com.sun.xml.internal.rngom.ast.builder.BuildException;
-import com.sun.xml.internal.rngom.ast.builder.CommentList;
-import com.sun.xml.internal.rngom.ast.builder.ElementAnnotationBuilder;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-final class ElementAnnotationBuilderHost extends AnnotationsHost implements ElementAnnotationBuilder {
- final ElementAnnotationBuilder lhs;
- final ElementAnnotationBuilder rhs;
-
- ElementAnnotationBuilderHost( ElementAnnotationBuilder lhs, ElementAnnotationBuilder rhs ) {
- super(lhs,rhs);
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- public void addText(String value, Location _loc, CommentList _comments) throws BuildException {
- LocationHost loc = cast(_loc);
- CommentListHost comments = (CommentListHost) _comments;
-
- lhs.addText( value, loc.lhs, comments==null?null:comments.lhs );
- rhs.addText( value, loc.rhs, comments==null?null:comments.rhs );
- }
-
- public ParsedElementAnnotation makeElementAnnotation() throws BuildException {
- return new ParsedElementAnnotationHost(
- lhs.makeElementAnnotation(),
- rhs.makeElementAnnotation() );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/GrammarHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/GrammarHost.java
deleted file mode 100644
index 2b2c8f24..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/GrammarHost.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-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.Grammar;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-
-/**
- * Wraps {@link Grammar} and provides error checking.
- *
- * <p>
- * The following errors are checked by this host:
- *
- * <ol>
- * <li>referenced to undefined patterns.
- * </ol>
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class GrammarHost extends ScopeHost implements Grammar {
- final Grammar lhs;
- final Grammar rhs;
-
- public GrammarHost(Grammar lhs,Grammar rhs) {
- super(lhs,rhs);
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- public ParsedPattern endGrammar(Location _loc, Annotations _anno) throws BuildException {
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.endGrammar(loc.lhs, anno.lhs),
- rhs.endGrammar(loc.rhs, anno.rhs));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/GrammarSectionHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/GrammarSectionHost.java
deleted file mode 100644
index 33559d27..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/GrammarSectionHost.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-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;
-import com.sun.xml.internal.rngom.ast.builder.Div;
-import com.sun.xml.internal.rngom.ast.builder.GrammarSection;
-import com.sun.xml.internal.rngom.ast.builder.Include;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class GrammarSectionHost extends Base implements GrammarSection {
- private final GrammarSection lhs;
- private final GrammarSection rhs;
-
- GrammarSectionHost( GrammarSection lhs, GrammarSection rhs ) {
- this.lhs = lhs;
- this.rhs = rhs;
- if(lhs==null || rhs==null)
- throw new IllegalArgumentException();
- }
-
- public void define(String name, Combine combine, ParsedPattern _pattern,
- Location _loc, Annotations _anno) throws BuildException {
- ParsedPatternHost pattern = (ParsedPatternHost) _pattern;
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- lhs.define(name, combine, pattern.lhs, loc.lhs, anno.lhs);
- rhs.define(name, combine, pattern.rhs, loc.rhs, anno.rhs);
- }
-
- public Div makeDiv() {
- return new DivHost( lhs.makeDiv(), rhs.makeDiv() );
- }
-
- public Include makeInclude() {
- Include l = lhs.makeInclude();
- if(l==null) return null;
- return new IncludeHost( l, rhs.makeInclude() );
- }
-
- public void topLevelAnnotation(ParsedElementAnnotation _ea) throws BuildException {
- ParsedElementAnnotationHost ea = (ParsedElementAnnotationHost) _ea;
- lhs.topLevelAnnotation(ea==null?null:ea.lhs);
- rhs.topLevelAnnotation(ea==null?null:ea.rhs);
- }
-
- public void topLevelComment(CommentList _comments) throws BuildException {
- CommentListHost comments = (CommentListHost) _comments;
-
- lhs.topLevelComment(comments==null?null:comments.lhs);
- rhs.topLevelComment(comments==null?null:comments.rhs);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/IncludeHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/IncludeHost.java
deleted file mode 100644
index b00bceac..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/IncludeHost.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-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.Include;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class IncludeHost extends GrammarSectionHost implements Include {
-
- private final Include lhs;
- private final Include rhs;
-
- IncludeHost(Include lhs, Include rhs) {
- super(lhs, rhs);
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- public void endInclude(Parseable current, String uri, String ns, Location _loc, Annotations _anno) throws BuildException, IllegalSchemaException {
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- lhs.endInclude( current, uri, ns, loc.lhs, anno.lhs );
- rhs.endInclude( current, uri, ns, loc.rhs, anno.rhs );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/LocationHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/LocationHost.java
deleted file mode 100644
index f1afa359..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/LocationHost.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-import com.sun.xml.internal.rngom.ast.om.Location;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-final class LocationHost implements Location {
- final Location lhs;
- final Location rhs;
-
- LocationHost( Location lhs, Location rhs ) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/NameClassBuilderHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/NameClassBuilderHost.java
deleted file mode 100644
index 625819b6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/NameClassBuilderHost.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-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;
-import com.sun.xml.internal.rngom.ast.builder.NameClassBuilder;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedNameClass;
-
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-final class NameClassBuilderHost extends Base implements NameClassBuilder {
- final NameClassBuilder lhs;
- final NameClassBuilder rhs;
-
- NameClassBuilderHost( NameClassBuilder lhs, NameClassBuilder rhs ) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- public ParsedNameClass annotate(ParsedNameClass _nc, Annotations _anno) throws BuildException {
- ParsedNameClassHost nc = (ParsedNameClassHost) _nc;
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedNameClassHost(
- lhs.annotate(nc.lhs, anno.lhs),
- rhs.annotate(nc.rhs, anno.rhs) );
- }
-
- public ParsedNameClass annotateAfter(ParsedNameClass _nc, ParsedElementAnnotation _e) throws BuildException {
- ParsedNameClassHost nc = (ParsedNameClassHost) _nc;
- ParsedElementAnnotationHost e = (ParsedElementAnnotationHost) _e;
-
- return new ParsedNameClassHost(
- lhs.annotateAfter(nc.lhs, e.lhs),
- rhs.annotateAfter(nc.rhs, e.rhs));
- }
-
- public ParsedNameClass commentAfter(ParsedNameClass _nc, CommentList _comments) throws BuildException {
- ParsedNameClassHost nc = (ParsedNameClassHost) _nc;
- CommentListHost comments = (CommentListHost) _comments;
-
- return new ParsedNameClassHost(
- lhs.commentAfter(nc.lhs, comments==null?null:comments.lhs),
- rhs.commentAfter(nc.rhs, comments==null?null:comments.rhs));
- }
-
- public ParsedNameClass makeChoice(List _nameClasses, Location _loc, Annotations _anno) {
- List<ParsedNameClass> lnc = new ArrayList<ParsedNameClass>();
- List<ParsedNameClass> rnc = new ArrayList<ParsedNameClass>();
- for( int i=0; i<_nameClasses.size(); i++ ) {
- lnc.add(((ParsedNameClassHost)_nameClasses.get(i)).lhs);
- rnc.add(((ParsedNameClassHost)_nameClasses.get(i)).rhs);
- }
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedNameClassHost(
- lhs.makeChoice( lnc, loc.lhs, anno.lhs ),
- rhs.makeChoice( rnc, loc.rhs, anno.rhs ) );
- }
-
- public ParsedNameClass makeName(String ns, String localName, String prefix, Location _loc, Annotations _anno) {
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedNameClassHost(
- lhs.makeName( ns, localName, prefix, loc.lhs, anno.lhs ),
- rhs.makeName( ns, localName, prefix, loc.rhs, anno.rhs ) );
- }
-
- public ParsedNameClass makeNsName(String ns, Location _loc, Annotations _anno) {
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedNameClassHost(
- lhs.makeNsName( ns, loc.lhs, anno.lhs ),
- rhs.makeNsName( ns, loc.rhs, anno.rhs ) );
- }
-
- public ParsedNameClass makeNsName(String ns, ParsedNameClass _except, Location _loc, Annotations _anno) {
- ParsedNameClassHost except = (ParsedNameClassHost) _except;
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedNameClassHost(
- lhs.makeNsName( ns, except.lhs, loc.lhs, anno.lhs ),
- rhs.makeNsName( ns, except.rhs, loc.rhs, anno.rhs ) );
- }
-
- public ParsedNameClass makeAnyName(Location _loc, Annotations _anno) {
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedNameClassHost(
- lhs.makeAnyName( loc.lhs, anno.lhs ),
- rhs.makeAnyName( loc.rhs, anno.rhs ) );
- }
-
- public ParsedNameClass makeAnyName(ParsedNameClass _except, Location _loc, Annotations _anno) {
- ParsedNameClassHost except = (ParsedNameClassHost) _except;
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedNameClassHost(
- lhs.makeAnyName( except.lhs, loc.lhs, anno.lhs ),
- rhs.makeAnyName( except.rhs, loc.rhs, anno.rhs ) );
- }
-
- public ParsedNameClass makeErrorNameClass() {
- return new ParsedNameClassHost( lhs.makeErrorNameClass(), rhs.makeErrorNameClass() );
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ParsedElementAnnotationHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ParsedElementAnnotationHost.java
deleted file mode 100644
index 6ed82c08..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ParsedElementAnnotationHost.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-final class ParsedElementAnnotationHost implements ParsedElementAnnotation {
- final ParsedElementAnnotation lhs;
- final ParsedElementAnnotation rhs;
-
- ParsedElementAnnotationHost( ParsedElementAnnotation lhs, ParsedElementAnnotation rhs ) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ParsedNameClassHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ParsedNameClassHost.java
deleted file mode 100644
index 2c7a4783..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ParsedNameClassHost.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-import com.sun.xml.internal.rngom.ast.om.ParsedNameClass;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-final class ParsedNameClassHost implements ParsedNameClass {
- final ParsedNameClass lhs;
- final ParsedNameClass rhs;
-
- ParsedNameClassHost( ParsedNameClass lhs, ParsedNameClass rhs ) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ParsedPatternHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ParsedPatternHost.java
deleted file mode 100644
index 45b450b1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ParsedPatternHost.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class ParsedPatternHost implements ParsedPattern {
- public final ParsedPattern lhs;
- public final ParsedPattern rhs;
-
- ParsedPatternHost( ParsedPattern lhs, ParsedPattern rhs ) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/SchemaBuilderHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/SchemaBuilderHost.java
deleted file mode 100644
index cc25c3c8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/SchemaBuilderHost.java
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-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;
-import com.sun.xml.internal.rngom.ast.builder.DataPatternBuilder;
-import com.sun.xml.internal.rngom.ast.builder.ElementAnnotationBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Grammar;
-import com.sun.xml.internal.rngom.ast.builder.NameClassBuilder;
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Scope;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedNameClass;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.parse.Context;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class SchemaBuilderHost extends Base implements SchemaBuilder {
- final SchemaBuilder lhs;
- final SchemaBuilder rhs;
-
- public SchemaBuilderHost( SchemaBuilder lhs, SchemaBuilder rhs ) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- public ParsedPattern annotate(ParsedPattern _p, Annotations _anno)
- throws BuildException {
-
- ParsedPatternHost p = (ParsedPatternHost) _p;
- AnnotationsHost a = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.annotate(p.lhs, a.lhs),
- rhs.annotate(p.lhs, a.lhs) );
- }
-
- public ParsedPattern annotateAfter(ParsedPattern _p,
- ParsedElementAnnotation _e) throws BuildException {
-
- ParsedPatternHost p = (ParsedPatternHost) _p;
- ParsedElementAnnotationHost e = (ParsedElementAnnotationHost) _e;
- return new ParsedPatternHost(
- lhs.annotateAfter(p.lhs, e.lhs),
- rhs.annotateAfter(p.rhs, e.rhs));
- }
-
- public ParsedPattern commentAfter(ParsedPattern _p, CommentList _comments)
- throws BuildException {
-
- ParsedPatternHost p = (ParsedPatternHost) _p;
- CommentListHost comments = (CommentListHost) _comments;
-
- return new ParsedPatternHost(
- lhs.commentAfter(p.lhs, comments==null?null:comments.lhs),
- rhs.commentAfter(p.rhs, comments==null?null:comments.rhs));
- }
-
- public ParsedPattern expandPattern(ParsedPattern _p) throws BuildException, IllegalSchemaException {
- ParsedPatternHost p = (ParsedPatternHost) _p;
- return new ParsedPatternHost(
- lhs.expandPattern(p.lhs),
- rhs.expandPattern(p.rhs));
- }
-
- public NameClassBuilder getNameClassBuilder() throws BuildException {
- return new NameClassBuilderHost( lhs.getNameClassBuilder(), rhs.getNameClassBuilder() );
- }
-
- public Annotations makeAnnotations(CommentList _comments, Context context) {
- CommentListHost comments = (CommentListHost) _comments;
- Annotations l = lhs.makeAnnotations((comments!=null)?comments.lhs:null, context);
- Annotations r = rhs.makeAnnotations((comments!=null)?comments.rhs:null, context);
- if(l==null || r==null)
- throw new IllegalArgumentException("annotations cannot be null");
- return new AnnotationsHost(l,r);
- }
-
- public ParsedPattern makeAttribute(ParsedNameClass _nc, ParsedPattern _p,
- Location _loc, Annotations _anno) throws BuildException {
-
- ParsedNameClassHost nc = (ParsedNameClassHost) _nc;
- ParsedPatternHost p = (ParsedPatternHost) _p;
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeAttribute(nc.lhs, p.lhs, loc.lhs, anno.lhs),
- rhs.makeAttribute(nc.rhs, p.rhs, loc.rhs, anno.rhs));
- }
-
- public ParsedPattern makeChoice(List patterns,
- Location _loc, Annotations _anno) throws BuildException {
-
- List<ParsedPattern> lp = new ArrayList<ParsedPattern>();
- List<ParsedPattern> rp = new ArrayList<ParsedPattern>();
- for( int i=0; i<patterns.size(); i++ ) {
- lp.add( ((ParsedPatternHost)patterns.get(i)).lhs);
- rp.add( ((ParsedPatternHost)patterns.get(i)).rhs);
- }
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeChoice(lp, loc.lhs, anno.lhs),
- rhs.makeChoice(rp, loc.rhs, anno.rhs));
- }
-
- public CommentList makeCommentList() {
- return new CommentListHost(
- lhs.makeCommentList(),
- rhs.makeCommentList() );
- }
-
- public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary,
- String type, Location _loc) throws BuildException {
- LocationHost loc = cast(_loc);
-
- return new DataPatternBuilderHost(
- lhs.makeDataPatternBuilder(datatypeLibrary, type, loc.lhs),
- rhs.makeDataPatternBuilder(datatypeLibrary, type, loc.rhs) );
- }
-
- public ParsedPattern makeElement(ParsedNameClass _nc, ParsedPattern _p,
- Location _loc, Annotations _anno) throws BuildException {
-
- ParsedNameClassHost nc = (ParsedNameClassHost) _nc;
- ParsedPatternHost p = (ParsedPatternHost) _p;
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeElement(nc.lhs, p.lhs, loc.lhs, anno.lhs),
- rhs.makeElement(nc.rhs, p.rhs, loc.rhs, anno.rhs));
- }
-
- public ElementAnnotationBuilder makeElementAnnotationBuilder(String ns,
- String localName, String prefix, Location _loc, CommentList _comments,
- Context context) {
- LocationHost loc = cast(_loc);
- CommentListHost comments = (CommentListHost) _comments;
-
- return new ElementAnnotationBuilderHost(
- lhs.makeElementAnnotationBuilder(ns, localName, prefix, loc.lhs, comments==null?null:comments.lhs, context),
- rhs.makeElementAnnotationBuilder(ns, localName, prefix, loc.rhs, comments==null?null:comments.rhs, context) );
- }
-
- public ParsedPattern makeEmpty(Location _loc, Annotations _anno) {
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeEmpty(loc.lhs, anno.lhs),
- rhs.makeEmpty(loc.rhs, anno.rhs));
- }
-
- public ParsedPattern makeErrorPattern() {
- return new ParsedPatternHost(
- lhs.makeErrorPattern(),
- rhs.makeErrorPattern() );
- }
-
- public ParsedPattern makeExternalRef(Parseable current, String uri,
- String ns, Scope _scope, Location _loc, Annotations _anno)
- throws BuildException, IllegalSchemaException {
-
- ScopeHost scope = (ScopeHost) _scope;
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeExternalRef(current, uri, ns, scope.lhs, loc.lhs, anno.lhs),
- rhs.makeExternalRef(current, uri, ns, scope.rhs, loc.rhs, anno.rhs) );
- }
-
- public Grammar makeGrammar(Scope _parent) {
- ScopeHost parent = (ScopeHost) _parent;
-
- return new GrammarHost(
- lhs.makeGrammar((parent!=null)?parent.lhs:null),
- rhs.makeGrammar((parent!=null)?parent.rhs:null) );
- }
-
- public ParsedPattern makeGroup(List patterns,
- Location _loc, Annotations _anno) throws BuildException {
-
- List<ParsedPattern> lp = new ArrayList<ParsedPattern>();
- List<ParsedPattern> rp = new ArrayList<ParsedPattern>();
- for( int i=0; i<patterns.size(); i++ ) {
- lp.add( ((ParsedPatternHost)patterns.get(i)).lhs);
- rp.add( ((ParsedPatternHost)patterns.get(i)).rhs);
- }
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeGroup(lp, loc.lhs, anno.lhs),
- rhs.makeGroup(rp, loc.rhs, anno.rhs));
- }
-
- public ParsedPattern makeInterleave(List patterns,
- Location _loc, Annotations _anno) throws BuildException {
-
- List<ParsedPattern> lp = new ArrayList<ParsedPattern>();
- List<ParsedPattern> rp = new ArrayList<ParsedPattern>();
- for( int i=0; i<patterns.size(); i++ ) {
- lp.add( ((ParsedPatternHost)patterns.get(i)).lhs);
- rp.add( ((ParsedPatternHost)patterns.get(i)).rhs);
- }
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeInterleave(lp, loc.lhs, anno.lhs),
- rhs.makeInterleave(rp, loc.rhs, anno.rhs));
- }
-
- public ParsedPattern makeList(ParsedPattern _p, Location _loc,
- Annotations _anno) throws BuildException {
-
- ParsedPatternHost p = (ParsedPatternHost) _p;
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeList(p.lhs, loc.lhs, anno.lhs),
- rhs.makeList(p.rhs, loc.rhs, anno.rhs));
- }
-
- public Location makeLocation(String systemId, int lineNumber,
- int columnNumber) {
- return new LocationHost(
- lhs.makeLocation(systemId, lineNumber, columnNumber),
- rhs.makeLocation(systemId, lineNumber, columnNumber));
- }
-
- public ParsedPattern makeMixed(ParsedPattern _p, Location _loc,
- Annotations _anno) throws BuildException {
-
- ParsedPatternHost p = (ParsedPatternHost) _p;
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeMixed(p.lhs, loc.lhs, anno.lhs),
- rhs.makeMixed(p.rhs, loc.rhs, anno.rhs));
- }
-
- public ParsedPattern makeNotAllowed(Location _loc, Annotations _anno) {
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeNotAllowed(loc.lhs, anno.lhs),
- rhs.makeNotAllowed(loc.rhs, anno.rhs));
- }
-
- public ParsedPattern makeOneOrMore(ParsedPattern _p, Location _loc,
- Annotations _anno) throws BuildException {
-
- ParsedPatternHost p = (ParsedPatternHost) _p;
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeOneOrMore(p.lhs, loc.lhs, anno.lhs),
- rhs.makeOneOrMore(p.rhs, loc.rhs, anno.rhs));
- }
-
- public ParsedPattern makeZeroOrMore(ParsedPattern _p, Location _loc,
- Annotations _anno) throws BuildException {
-
- ParsedPatternHost p = (ParsedPatternHost) _p;
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeZeroOrMore(p.lhs, loc.lhs, anno.lhs),
- rhs.makeZeroOrMore(p.rhs, loc.rhs, anno.rhs));
- }
-
- public ParsedPattern makeOptional(ParsedPattern _p, Location _loc,
- Annotations _anno) throws BuildException {
-
- ParsedPatternHost p = (ParsedPatternHost) _p;
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeOptional(p.lhs, loc.lhs, anno.lhs),
- rhs.makeOptional(p.rhs, loc.rhs, anno.rhs));
- }
-
- public ParsedPattern makeText(Location _loc, Annotations _anno) {
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeText(loc.lhs, anno.lhs),
- rhs.makeText(loc.rhs, anno.rhs));
- }
-
- public ParsedPattern makeValue(String datatypeLibrary, String type,
- String value, Context c, String ns, Location _loc, Annotations _anno)
- throws BuildException {
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeValue(datatypeLibrary,type,value,c,ns,loc.lhs,anno.lhs),
- rhs.makeValue(datatypeLibrary,type,value,c,ns,loc.rhs,anno.rhs));
- }
-
- public boolean usesComments() {
- return lhs.usesComments() || rhs.usesComments();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ScopeHost.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ScopeHost.java
deleted file mode 100644
index 51b89a14..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/ScopeHost.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.host;
-
-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.Scope;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class ScopeHost extends GrammarSectionHost implements Scope {
- protected final Scope lhs;
- protected final Scope rhs;
-
- protected ScopeHost( Scope lhs, Scope rhs ) {
- super(lhs,rhs);
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- public ParsedPattern makeParentRef(String name, Location _loc, Annotations _anno) throws BuildException {
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeParentRef(name, loc.lhs, anno.lhs),
- rhs.makeParentRef(name, loc.rhs, anno.rhs));
- }
-
- public ParsedPattern makeRef(String name, Location _loc, Annotations _anno) throws BuildException {
- LocationHost loc = cast(_loc);
- AnnotationsHost anno = cast(_anno);
-
- return new ParsedPatternHost(
- lhs.makeRef(name, loc.lhs, anno.lhs),
- rhs.makeRef(name, loc.rhs, anno.rhs));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/package.html b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/package.html
deleted file mode 100644
index a17462df..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/host/package.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-<!--
- Copyright (C) 2004-2011
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
--->
-<html><body>Implementation of the <tt>asm.builder</tt> package that uses two
-other builds simultaneously.</body></html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/DtdContext.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/DtdContext.java
deleted file mode 100644
index 0c7ee166..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/DtdContext.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.xml;
-
-import org.xml.sax.DTDHandler;
-import org.xml.sax.SAXException;
-import org.relaxng.datatype.ValidationContext;
-
-import java.util.Hashtable;
-
-public abstract class DtdContext implements DTDHandler, ValidationContext {
- private final Hashtable notationTable;
- private final Hashtable unparsedEntityTable;
-
- public DtdContext() {
- notationTable = new Hashtable();
- unparsedEntityTable = new Hashtable();
- }
-
- public DtdContext(DtdContext dc) {
- notationTable = dc.notationTable;
- unparsedEntityTable = dc.unparsedEntityTable;
- }
-
- public void notationDecl(String name, String publicId, String systemId)
- throws SAXException {
- notationTable.put(name, name);
- }
-
- public void unparsedEntityDecl(
- String name,
- String publicId,
- String systemId,
- String notationName)
- throws SAXException {
- unparsedEntityTable.put(name, name);
- }
-
- public boolean isNotation(String notationName) {
- return notationTable.get(notationName) != null;
- }
-
- public boolean isUnparsedEntity(String entityName) {
- return unparsedEntityTable.get(entityName) != null;
- }
-
- public void clearDtdContext() {
- notationTable.clear();
- unparsedEntityTable.clear();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/Messages.properties
deleted file mode 100644
index 7da1f8ba..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/Messages.properties
+++ /dev/null
@@ -1,85 +0,0 @@
-#
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Copyright (C) 2004-2011
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-#
-
-no_comment_support=SAX parser \"{0}\" cannot report comments
-any_name_except_contains_any_name=\"except\" in \"anyName\" contains \"anyName\"
-attribute_multi_pattern=\"attribute\" pattern must contain at most one pattern
-combine_attribute_bad_value=bad value \"{0}\" for \"combine\" attribute; value must be \"choice\" or \"interleave\"
-expected_define=found \"{0}\" element but expected \"define\" or \"start\" or \"include\" or \"div\" element
-expected_empty=found \"{0}\" element but expected empty content
-expected_except=found \"{0}\" element but expected \"except\"
-expected_grammar=found \"{0}\" element but expected \"grammar\" element
-expected_name=found \"{0}\" element but expected a name
-expected_name_class=found \"{0}\" element but expected a name-class
-expected_param_except=only \"param\" and \"except\" child elements are allowed
-expected_pattern=found \"{0}\" element but expected a pattern
-fragment_identifier_datatype_library=URI in value of \"datatypeLibrary\" attribute must not have a fragment identifier
-href_fragment_id=fragment identifier ignored in value of \"href\" attribute
-illegal_attribute_ignored=illegal attribute \"{0}\" ignored
-illegal_characters_ignored=illegal characters ignored
-illegal_name_attribute=illegal \"name\" attribute
-invalid_ncname=\"{0}\" is not a valid local name
-invalid_uri=\"{0}\" is not a valid URI reference according to RFC 2396
-missing_children=missing children
-missing_href_attribute=missing \"href\" attribute
-missing_name_attribute=missing \"name\" attribute
-missing_name_class=expected child element specifying name class
-missing_type_attribute=missing \"type\" attribute
-multiple_except=at most one \"except\" child element is allowed
-name_contains_foreign_element=\"name\" element cannot contain foreign elements
-ns_name_except_contains_any_name=\"except\" in \"nsName\" contains \"anyName\"
-ns_name_except_contains_ns_name=\"except\" in \"nsName\" contains \"nsName\"
-param_after_except=\"param\" is not allowed after \"except\"
-param_contains_foreign_element=\"param\" element cannot contain foreign elements
-qualified_attribute=attribute name \"{0}\" incorrectly qualified with RELAX NG namespace URI
-relative_datatype_library=URI in value of \"datatypeLibrary\" attribute must not be relative
-root_bad_namespace_uri=namespace URI of document element must be \"{0}\"
-start_multi_pattern=\"start\" pattern must contain at most one pattern
-too_many_children=too many child elements: only one child element is allowed
-undefined_prefix=undefined prefix \"{0}\"
-value_contains_foreign_element=\"value\" element cannot contain foreign elements
-wrong_uri_version=namespace URI has wrong version: expected \"{0}\" but got \"{1}\"
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/SAXParseable.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/SAXParseable.java
deleted file mode 100644
index 6afa6073..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/SAXParseable.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.xml;
-
-import java.io.IOException;
-
-import com.sun.xml.internal.rngom.ast.builder.BuildException;
-import com.sun.xml.internal.rngom.ast.builder.IncludedGrammar;
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Scope;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import com.sun.xml.internal.rngom.xml.sax.JAXPXMLReaderCreator;
-import com.sun.xml.internal.rngom.xml.sax.XMLReaderCreator;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-/**
- * RELAX NG schema in the XML syntax.
- *
- */
-public class SAXParseable implements Parseable {
- private final InputSource in;
-
- final XMLReaderCreator xrc;
- final ErrorHandler eh;
-
- public SAXParseable(InputSource in, ErrorHandler eh, XMLReaderCreator xrc) {
- this.xrc = xrc;
- this.eh = eh;
- this.in = in;
- }
-
- public SAXParseable(InputSource in, ErrorHandler eh) {
- this(in,eh,new JAXPXMLReaderCreator());
- }
-
- public ParsedPattern parse(SchemaBuilder schemaBuilder) throws BuildException, IllegalSchemaException {
- try {
- XMLReader xr = xrc.createXMLReader();
- SchemaParser sp = new SchemaParser(this, xr, eh, schemaBuilder, null, null,"");
- xr.parse(in);
- ParsedPattern p = sp.getParsedPattern();
- return schemaBuilder.expandPattern(p);
- }
- catch (SAXException e) {
- throw toBuildException(e);
- }
- catch (IOException e) {
- throw new BuildException(e);
- }
- }
-
- public ParsedPattern parseInclude(String uri, SchemaBuilder schemaBuilder, IncludedGrammar g, String inheritedNs)
- throws BuildException, IllegalSchemaException {
- try {
- XMLReader xr = xrc.createXMLReader();
- SchemaParser sp = new SchemaParser(this, xr, eh, schemaBuilder, g, g, inheritedNs);
- xr.parse(makeInputSource(xr, uri));
- return sp.getParsedPattern();
- }
- catch (SAXException e) {
- throw SAXParseable.toBuildException(e);
- }
- catch (IOException e) {
- throw new BuildException(e);
- }
- }
-
- public ParsedPattern parseExternal(String uri, SchemaBuilder schemaBuilder, Scope s, String inheritedNs)
- throws BuildException, IllegalSchemaException {
- try {
- XMLReader xr = xrc.createXMLReader();
- SchemaParser sp = new SchemaParser(this, xr, eh, schemaBuilder, null, s, inheritedNs);
- xr.parse(makeInputSource(xr, uri));
- return sp.getParsedPattern();
- }
- catch (SAXException e) {
- throw SAXParseable.toBuildException(e);
- }
- catch (IOException e) {
- throw new BuildException(e);
- }
- }
-
- private static InputSource makeInputSource(XMLReader xr, String systemId) throws IOException, SAXException {
- EntityResolver er = xr.getEntityResolver();
- if (er != null) {
- InputSource inputSource = er.resolveEntity(null, systemId);
- if (inputSource != null)
- return inputSource;
- }
- return new InputSource(systemId);
- }
-
- static BuildException toBuildException(SAXException e) {
- Exception inner = e.getException();
- if (inner instanceof BuildException)
- throw (BuildException)inner;
- throw new BuildException(e);
- }
- }
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/SchemaParser.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/SchemaParser.java
deleted file mode 100644
index c6b326a8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/SchemaParser.java
+++ /dev/null
@@ -1,1873 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * 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
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.parse.xml;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Stack;
-import java.util.Vector;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import com.sun.xml.internal.rngom.ast.builder.Annotations;
-import com.sun.xml.internal.rngom.ast.builder.CommentList;
-import com.sun.xml.internal.rngom.ast.builder.DataPatternBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Div;
-import com.sun.xml.internal.rngom.ast.builder.ElementAnnotationBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Grammar;
-import com.sun.xml.internal.rngom.ast.builder.GrammarSection;
-import com.sun.xml.internal.rngom.ast.builder.Include;
-import com.sun.xml.internal.rngom.ast.builder.IncludedGrammar;
-import com.sun.xml.internal.rngom.ast.builder.NameClassBuilder;
-import com.sun.xml.internal.rngom.ast.builder.SchemaBuilder;
-import com.sun.xml.internal.rngom.ast.builder.Scope;
-import com.sun.xml.internal.rngom.ast.om.Location;
-import com.sun.xml.internal.rngom.ast.om.ParsedElementAnnotation;
-import com.sun.xml.internal.rngom.ast.om.ParsedNameClass;
-import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
-import com.sun.xml.internal.rngom.parse.Context;
-import com.sun.xml.internal.rngom.parse.IllegalSchemaException;
-import com.sun.xml.internal.rngom.parse.Parseable;
-import com.sun.xml.internal.rngom.util.Localizer;
-import com.sun.xml.internal.rngom.util.Uri;
-import com.sun.xml.internal.rngom.xml.sax.AbstractLexicalHandler;
-import com.sun.xml.internal.rngom.xml.sax.XmlBaseHandler;
-import com.sun.xml.internal.rngom.xml.util.Naming;
-import com.sun.xml.internal.rngom.xml.util.WellKnownNamespaces;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.DefaultHandler;
-
-class SchemaParser {
-
- private static final String relaxngURIPrefix =
- WellKnownNamespaces.RELAX_NG.substring(0, WellKnownNamespaces.RELAX_NG.lastIndexOf('/') + 1);
- static final String relaxng10URI = WellKnownNamespaces.RELAX_NG;
- private static final Localizer localizer = new Localizer(new Localizer(Parseable.class), SchemaParser.class);
- private String relaxngURI;
- private final XMLReader xr;
- private final ErrorHandler eh;
- private final SchemaBuilder schemaBuilder;
- /**
- * The value of the {@link SchemaBuilder#getNameClassBuilder()} for the
- * {@link #schemaBuilder} object.
- */
- private final NameClassBuilder nameClassBuilder;
- private ParsedPattern startPattern;
- private Locator locator;
- private final XmlBaseHandler xmlBaseHandler = new XmlBaseHandler();
- private final ContextImpl context = new ContextImpl();
- private boolean hadError = false;
- private Hashtable patternTable;
- private Hashtable nameClassTable;
-
- static class PrefixMapping {
-
- final String prefix;
- final String uri;
- final PrefixMapping next;
-
- PrefixMapping(String prefix, String uri, PrefixMapping next) {
- this.prefix = prefix;
- this.uri = uri;
- this.next = next;
- }
- }
-
- static abstract class AbstractContext extends DtdContext implements Context {
-
- PrefixMapping prefixMapping;
-
- AbstractContext() {
- prefixMapping = new PrefixMapping("xml", WellKnownNamespaces.XML, null);
- }
-
- AbstractContext(AbstractContext context) {
- super(context);
- prefixMapping = context.prefixMapping;
- }
-
- public String resolveNamespacePrefix(String prefix) {
- for (PrefixMapping p = prefixMapping; p != null; p = p.next) {
- if (p.prefix.equals(prefix)) {
- return p.uri;
- }
- }
- return null;
- }
-
- public Enumeration prefixes() {
- Vector v = new Vector();
- for (PrefixMapping p = prefixMapping; p != null; p = p.next) {
- if (!v.contains(p.prefix)) {
- v.addElement(p.prefix);
- }
- }
- return v.elements();
- }
-
- public Context copy() {
- return new SavedContext(this);
- }
- }
-
- static class SavedContext extends AbstractContext {
-
- private final String baseUri;
-
- SavedContext(AbstractContext context) {
- super(context);
- this.baseUri = context.getBaseUri();
- }
-
- public String getBaseUri() {
- return baseUri;
- }
- }
-
- class ContextImpl extends AbstractContext {
-
- public String getBaseUri() {
- return xmlBaseHandler.getBaseUri();
- }
- }
-
- static interface CommentHandler {
-
- void comment(String value);
- }
-
- abstract class Handler implements ContentHandler, CommentHandler {
-
- CommentList comments;
-
- CommentList getComments() {
- CommentList tem = comments;
- comments = null;
- return tem;
- }
-
- public void comment(String value) {
- if (comments == null) {
- comments = schemaBuilder.makeCommentList();
- }
- comments.addComment(value, makeLocation());
- }
-
- public void processingInstruction(String target, String date) {
- }
-
- public void skippedEntity(String name) {
- }
-
- public void ignorableWhitespace(char[] ch, int start, int len) {
- }
-
- public void startDocument() {
- }
-
- public void endDocument() {
- }
-
- public void startPrefixMapping(String prefix, String uri) {
- context.prefixMapping = new PrefixMapping(prefix, uri, context.prefixMapping);
- }
-
- public void endPrefixMapping(String prefix) {
- context.prefixMapping = context.prefixMapping.next;
- }
-
- public void setDocumentLocator(Locator loc) {
- locator = loc;
- xmlBaseHandler.setLocator(loc);
- }
- }
-
- abstract class State extends Handler {
-
- State parent;
- String nsInherit;
- String ns;
- String datatypeLibrary;
- /**
- * The current scope, or null if there's none.
- */
- Scope scope;
- Location startLocation;
- Annotations annotations;
-
- void set() {
- xr.setContentHandler(this);
- }
-
- abstract State create();
-
- abstract State createChildState(String localName) throws SAXException;
-
- void setParent(State parent) {
- this.parent = parent;
- this.nsInherit = parent.getNs();
- this.datatypeLibrary = parent.datatypeLibrary;
- this.scope = parent.scope;
- this.startLocation = makeLocation();
- if (parent.comments != null) {
- annotations = schemaBuilder.makeAnnotations(parent.comments, getContext());
- parent.comments = null;
- } else if (parent instanceof RootState) {
- annotations = schemaBuilder.makeAnnotations(null, getContext());
- }
- }
-
- String getNs() {
- return ns == null ? nsInherit : ns;
- }
-
- boolean isRelaxNGElement(String uri) throws SAXException {
- return uri.equals(relaxngURI);
- }
-
- public void startElement(String namespaceURI,
- String localName,
- String qName,
- Attributes atts) throws SAXException {
- xmlBaseHandler.startElement();
- if (isRelaxNGElement(namespaceURI)) {
- State state = createChildState(localName);
- if (state == null) {
- xr.setContentHandler(new Skipper(this));
- return;
- }
- state.setParent(this);
- state.set();
- state.attributes(atts);
- } else {
- checkForeignElement();
- ForeignElementHandler feh = new ForeignElementHandler(this, getComments());
- feh.startElement(namespaceURI, localName, qName, atts);
- xr.setContentHandler(feh);
- }
- }
-
- public void endElement(String namespaceURI,
- String localName,
- String qName) throws SAXException {
- xmlBaseHandler.endElement();
- parent.set();
- end();
- }
-
- void setName(String name) throws SAXException {
- error("illegal_name_attribute");
- }
-
- void setOtherAttribute(String name, String value) throws SAXException {
- error("illegal_attribute_ignored", name);
- }
-
- void endAttributes() throws SAXException {
- }
-
- void checkForeignElement() throws SAXException {
- }
-
- void attributes(Attributes atts) throws SAXException {
- int len = atts.getLength();
- for (int i = 0; i < len; i++) {
- String uri = atts.getURI(i);
- if (uri.length() == 0) {
- String name = atts.getLocalName(i);
- if (name.equals("name")) {
- setName(atts.getValue(i).trim());
- } else if (name.equals("ns")) {
- ns = atts.getValue(i);
- } else if (name.equals("datatypeLibrary")) {
- datatypeLibrary = atts.getValue(i);
- checkUri(datatypeLibrary);
- if (!datatypeLibrary.equals("")
- && !Uri.isAbsolute(datatypeLibrary)) {
- error("relative_datatype_library");
- }
- if (Uri.hasFragmentId(datatypeLibrary)) {
- error("fragment_identifier_datatype_library");
- }
- datatypeLibrary = Uri.escapeDisallowedChars(datatypeLibrary);
- } else {
- setOtherAttribute(name, atts.getValue(i));
- }
- } else if (uri.equals(relaxngURI)) {
- error("qualified_attribute", atts.getLocalName(i));
- } else if (uri.equals(WellKnownNamespaces.XML)
- && atts.getLocalName(i).equals("base")) {
- xmlBaseHandler.xmlBaseAttribute(atts.getValue(i));
- } else {
- if (annotations == null) {
- annotations = schemaBuilder.makeAnnotations(null, getContext());
- }
- annotations.addAttribute(uri, atts.getLocalName(i), findPrefix(atts.getQName(i), uri),
- atts.getValue(i), startLocation);
- }
- }
- endAttributes();
- }
-
- abstract void end() throws SAXException;
-
- void endChild(ParsedPattern pattern) {
- // XXX cannot happen; throw exception
- }
-
- void endChild(ParsedNameClass nc) {
- // XXX cannot happen; throw exception
- }
-
- @Override
- public void startDocument() {
- }
-
- @Override
- public void endDocument() {
- if (comments != null && startPattern != null) {
- startPattern = schemaBuilder.commentAfter(startPattern, comments);
- comments = null;
- }
- }
-
- public void characters(char[] ch, int start, int len) throws SAXException {
- for (int i = 0; i < len; i++) {
- switch (ch[start + i]) {
- case ' ':
- case '\r':
- case '\n':
- case '\t':
- break;
- default:
- error("illegal_characters_ignored");
- break;
- }
- }
- }
-
- boolean isPatternNamespaceURI(String s) {
- return s.equals(relaxngURI);
- }
-
- void endForeignChild(ParsedElementAnnotation ea) {
- if (annotations == null) {
- annotations = schemaBuilder.makeAnnotations(null, getContext());
- }
- annotations.addElement(ea);
- }
-
- void mergeLeadingComments() {
- if (comments != null) {
- if (annotations == null) {
- annotations = schemaBuilder.makeAnnotations(comments, getContext());
- } else {
- annotations.addLeadingComment(comments);
- }
- comments = null;
- }
- }
- }
-
- class ForeignElementHandler extends Handler {
-
- final State nextState;
- ElementAnnotationBuilder builder;
- final Stack builderStack = new Stack();
- StringBuffer textBuf;
- Location textLoc;
-
- ForeignElementHandler(State nextState, CommentList comments) {
- this.nextState = nextState;
- this.comments = comments;
- }
-
- public void startElement(String namespaceURI, String localName,
- String qName, Attributes atts) {
- flushText();
- if (builder != null) {
- builderStack.push(builder);
- }
- Location loc = makeLocation();
- builder = schemaBuilder.makeElementAnnotationBuilder(namespaceURI,
- localName,
- findPrefix(qName, namespaceURI),
- loc,
- getComments(),
- getContext());
- int len = atts.getLength();
- for (int i = 0; i < len; i++) {
- String uri = atts.getURI(i);
- builder.addAttribute(uri, atts.getLocalName(i), findPrefix(atts.getQName(i), uri),
- atts.getValue(i), loc);
- }
- }
-
- public void endElement(String namespaceURI, String localName,
- String qName) {
- flushText();
- if (comments != null) {
- builder.addComment(getComments());
- }
- ParsedElementAnnotation ea = builder.makeElementAnnotation();
- if (builderStack.empty()) {
- nextState.endForeignChild(ea);
- nextState.set();
- } else {
- builder = (ElementAnnotationBuilder) builderStack.pop();
- builder.addElement(ea);
- }
- }
-
- public void characters(char ch[], int start, int length) {
- if (textBuf == null) {
- textBuf = new StringBuffer();
- }
- textBuf.append(ch, start, length);
- if (textLoc == null) {
- textLoc = makeLocation();
- }
- }
-
- @Override
- public void comment(String value) {
- flushText();
- super.comment(value);
- }
-
- void flushText() {
- if (textBuf != null && textBuf.length() != 0) {
- builder.addText(textBuf.toString(), textLoc, getComments());
- textBuf.setLength(0);
- }
- textLoc = null;
- }
- }
-
- static class Skipper extends DefaultHandler implements CommentHandler {
-
- int level = 1;
- final State nextState;
-
- Skipper(State nextState) {
- this.nextState = nextState;
- }
-
- @Override
- public void startElement(String namespaceURI,
- String localName,
- String qName,
- Attributes atts) throws SAXException {
- ++level;
- }
-
- @Override
- public void endElement(String namespaceURI,
- String localName,
- String qName) throws SAXException {
- if (--level == 0) {
- nextState.set();
- }
- }
-
- public void comment(String value) {
- }
- }
-
- abstract class EmptyContentState extends State {
-
- State createChildState(String localName) throws SAXException {
- error("expected_empty", localName);
- return null;
- }
-
- abstract ParsedPattern makePattern() throws SAXException;
-
- void end() throws SAXException {
- if (comments != null) {
- if (annotations == null) {
- annotations = schemaBuilder.makeAnnotations(null, getContext());
- }
- annotations.addComment(comments);
- comments = null;
- }
- parent.endChild(makePattern());
- }
- }
- static private final int INIT_CHILD_ALLOC = 5;
-
- abstract class PatternContainerState extends State {
-
- List<ParsedPattern> childPatterns;
-
- State createChildState(String localName) throws SAXException {
- State state = (State) patternTable.get(localName);
- if (state == null) {
- error("expected_pattern", localName);
- return null;
- }
- return state.create();
- }
-
- ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
- if (patterns.size() == 1 && anno == null) {
- return patterns.get(0);
- }
- return schemaBuilder.makeGroup(patterns, loc, anno);
- }
-
- @Override
- void endChild(ParsedPattern pattern) {
- if (childPatterns == null) {
- childPatterns = new ArrayList<ParsedPattern>(INIT_CHILD_ALLOC);
- }
- childPatterns.add(pattern);
- }
-
- @Override
- void endForeignChild(ParsedElementAnnotation ea) {
- // Harshit : Annotation handling should always be taken care of, irrespective of childPatterns being null or not.
- super.endForeignChild(ea);
- if (childPatterns != null) {
- int idx = childPatterns.size() - 1;
- childPatterns.set(idx, schemaBuilder.annotateAfter(childPatterns.get(idx), ea));
- }
- }
-
- void end() throws SAXException {
- if (childPatterns == null) {
- error("missing_children");
- endChild(schemaBuilder.makeErrorPattern());
- }
- if (comments != null) {
- int idx = childPatterns.size() - 1;
- childPatterns.set(idx, schemaBuilder.commentAfter(childPatterns.get(idx), comments));
- comments = null;
- }
- sendPatternToParent(buildPattern(childPatterns, startLocation, annotations));
- }
-
- void sendPatternToParent(ParsedPattern p) {
- parent.endChild(p);
- }
- }
-
- class GroupState extends PatternContainerState {
-
- State create() {
- return new GroupState();
- }
- }
-
- class ZeroOrMoreState extends PatternContainerState {
-
- State create() {
- return new ZeroOrMoreState();
- }
-
- @Override
- ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
- return schemaBuilder.makeZeroOrMore(super.buildPattern(patterns, loc, null), loc, anno);
- }
- }
-
- class OneOrMoreState extends PatternContainerState {
-
- State create() {
- return new OneOrMoreState();
- }
-
- @Override
- ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
- return schemaBuilder.makeOneOrMore(super.buildPattern(patterns, loc, null), loc, anno);
- }
- }
-
- class OptionalState extends PatternContainerState {
-
- State create() {
- return new OptionalState();
- }
-
- @Override
- ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
- return schemaBuilder.makeOptional(super.buildPattern(patterns, loc, null), loc, anno);
- }
- }
-
- class ListState extends PatternContainerState {
-
- State create() {
- return new ListState();
- }
-
- @Override
- ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
- return schemaBuilder.makeList(super.buildPattern(patterns, loc, null), loc, anno);
- }
- }
-
- class ChoiceState extends PatternContainerState {
-
- State create() {
- return new ChoiceState();
- }
-
- @Override
- ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
- return schemaBuilder.makeChoice(patterns, loc, anno);
- }
- }
-
- class InterleaveState extends PatternContainerState {
-
- State create() {
- return new InterleaveState();
- }
-
- @Override
- ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) {
- return schemaBuilder.makeInterleave(patterns, loc, anno);
- }
- }
-
- class MixedState extends PatternContainerState {
-
- State create() {
- return new MixedState();
- }
-
- @Override
- ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
- return schemaBuilder.makeMixed(super.buildPattern(patterns, loc, null), loc, anno);
- }
- }
-
- static interface NameClassRef {
-
- void setNameClass(ParsedNameClass nc);
- }
-
- class ElementState extends PatternContainerState implements NameClassRef {
-
- ParsedNameClass nameClass;
- boolean nameClassWasAttribute;
- String name;
-
- @Override
- void setName(String name) {
- this.name = name;
- }
-
- public void setNameClass(ParsedNameClass nc) {
- nameClass = nc;
- }
-
- @Override
- void endAttributes() throws SAXException {
- if (name != null) {
- nameClass = expandName(name, getNs(), null);
- nameClassWasAttribute = true;
- } else {
- new NameClassChildState(this, this).set();
- }
- }
-
- State create() {
- return new ElementState();
- }
-
- @Override
- ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
- return schemaBuilder.makeElement(nameClass, super.buildPattern(patterns, loc, null), loc, anno);
- }
-
- @Override
- void endForeignChild(ParsedElementAnnotation ea) {
- if (nameClassWasAttribute || childPatterns != null || nameClass == null) {
- super.endForeignChild(ea);
- } else {
- nameClass = nameClassBuilder.annotateAfter(nameClass, ea);
- }
- }
- }
-
- class RootState extends PatternContainerState {
-
- IncludedGrammar grammar;
-
- RootState() {
- }
-
- RootState(IncludedGrammar grammar, Scope scope, String ns) {
- this.grammar = grammar;
- this.scope = scope;
- this.nsInherit = ns;
- this.datatypeLibrary = "";
- }
-
- State create() {
- return new RootState();
- }
-
- @Override
- State createChildState(String localName) throws SAXException {
- if (grammar == null) {
- return super.createChildState(localName);
- }
- if (localName.equals("grammar")) {
- return new MergeGrammarState(grammar);
- }
- error("expected_grammar", localName);
- return null;
- }
-
- @Override
- void checkForeignElement() throws SAXException {
- error("root_bad_namespace_uri", WellKnownNamespaces.RELAX_NG);
- }
-
- @Override
- void endChild(ParsedPattern pattern) {
- startPattern = pattern;
- }
-
- @Override
- boolean isRelaxNGElement(String uri) throws SAXException {
- if (!uri.startsWith(relaxngURIPrefix)) {
- return false;
- }
- if (!uri.equals(WellKnownNamespaces.RELAX_NG)) {
- warning("wrong_uri_version",
- WellKnownNamespaces.RELAX_NG.substring(relaxngURIPrefix.length()),
- uri.substring(relaxngURIPrefix.length()));
- }
- relaxngURI = uri;
- return true;
- }
- }
-
- class NotAllowedState extends EmptyContentState {
-
- State create() {
- return new NotAllowedState();
- }
-
- ParsedPattern makePattern() {
- return schemaBuilder.makeNotAllowed(startLocation, annotations);
- }
- }
-
- class EmptyState extends EmptyContentState {
-
- State create() {
- return new EmptyState();
- }
-
- ParsedPattern makePattern() {
- return schemaBuilder.makeEmpty(startLocation, annotations);
- }
- }
-
- class TextState extends EmptyContentState {
-
- State create() {
- return new TextState();
- }
-
- ParsedPattern makePattern() {
- return schemaBuilder.makeText(startLocation, annotations);
- }
- }
-
- class ValueState extends EmptyContentState {
-
- final StringBuffer buf = new StringBuffer();
- String type;
-
- State create() {
- return new ValueState();
- }
-
- @Override
- void setOtherAttribute(String name, String value) throws SAXException {
- if (name.equals("type")) {
- type = checkNCName(value.trim());
- } else {
- super.setOtherAttribute(name, value);
- }
- }
-
- @Override
- public void characters(char[] ch, int start, int len) {
- buf.append(ch, start, len);
- }
-
- @Override
- void checkForeignElement() throws SAXException {
- error("value_contains_foreign_element");
- }
-
- ParsedPattern makePattern() throws SAXException {
- if (type == null) {
- return makePattern("", "token");
- } else {
- return makePattern(datatypeLibrary, type);
- }
- }
-
- @Override
- void end() throws SAXException {
- mergeLeadingComments();
- super.end();
- }
-
- ParsedPattern makePattern(String datatypeLibrary, String type) {
- return schemaBuilder.makeValue(datatypeLibrary,
- type,
- buf.toString(),
- getContext(),
- getNs(),
- startLocation,
- annotations);
- }
- }
-
- class DataState extends State {
-
- String type;
- ParsedPattern except = null;
- DataPatternBuilder dpb = null;
-
- State create() {
- return new DataState();
- }
-
- State createChildState(String localName) throws SAXException {
- if (localName.equals("param")) {
- if (except != null) {
- error("param_after_except");
- }
- return new ParamState(dpb);
- }
- if (localName.equals("except")) {
- if (except != null) {
- error("multiple_except");
- }
- return new ChoiceState();
- }
- error("expected_param_except", localName);
- return null;
- }
-
- @Override
- void setOtherAttribute(String name, String value) throws SAXException {
- if (name.equals("type")) {
- type = checkNCName(value.trim());
- } else {
- super.setOtherAttribute(name, value);
- }
- }
-
- @Override
- void endAttributes() throws SAXException {
- if (type == null) {
- error("missing_type_attribute");
- } else {
- dpb = schemaBuilder.makeDataPatternBuilder(datatypeLibrary, type, startLocation);
- }
- }
-
- void end() throws SAXException {
- ParsedPattern p;
- if (dpb != null) {
- if (except != null) {
- p = dpb.makePattern(except, startLocation, annotations);
- } else {
- p = dpb.makePattern(startLocation, annotations);
- }
- } else {
- p = schemaBuilder.makeErrorPattern();
- }
- // XXX need to capture comments
- parent.endChild(p);
- }
-
- @Override
- void endChild(ParsedPattern pattern) {
- except = pattern;
- }
- }
-
- class ParamState extends State {
-
- private final StringBuffer buf = new StringBuffer();
- private final DataPatternBuilder dpb;
- private String name;
-
- ParamState(DataPatternBuilder dpb) {
- this.dpb = dpb;
- }
-
- State create() {
- return new ParamState(null);
- }
-
- @Override
- void setName(String name) throws SAXException {
- this.name = checkNCName(name);
- }
-
- @Override
- void endAttributes() throws SAXException {
- if (name == null) {
- error("missing_name_attribute");
- }
- }
-
- State createChildState(String localName) throws SAXException {
- error("expected_empty", localName);
- return null;
- }
-
- @Override
- public void characters(char[] ch, int start, int len) {
- buf.append(ch, start, len);
- }
-
- @Override
- void checkForeignElement() throws SAXException {
- error("param_contains_foreign_element");
- }
-
- void end() throws SAXException {
- if (name == null) {
- return;
- }
- if (dpb == null) {
- return;
- }
- mergeLeadingComments();
- dpb.addParam(name, buf.toString(), getContext(), getNs(), startLocation, annotations);
- }
- }
-
- class AttributeState extends PatternContainerState implements NameClassRef {
-
- ParsedNameClass nameClass;
- boolean nameClassWasAttribute;
- String name;
-
- State create() {
- return new AttributeState();
- }
-
- @Override
- void setName(String name) {
- this.name = name;
- }
-
- public void setNameClass(ParsedNameClass nc) {
- nameClass = nc;
- }
-
- @Override
- void endAttributes() throws SAXException {
- if (name != null) {
- String nsUse;
- if (ns != null) {
- nsUse = ns;
- } else {
- nsUse = "";
- }
- nameClass = expandName(name, nsUse, null);
- nameClassWasAttribute = true;
- } else {
- new NameClassChildState(this, this).set();
- }
- }
-
- @Override
- void endForeignChild(ParsedElementAnnotation ea) {
- if (nameClassWasAttribute || childPatterns != null || nameClass == null) {
- super.endForeignChild(ea);
- } else {
- nameClass = nameClassBuilder.annotateAfter(nameClass, ea);
- }
- }
-
- @Override
- void end() throws SAXException {
- if (childPatterns == null) {
- endChild(schemaBuilder.makeText(startLocation, null));
- }
- super.end();
- }
-
- @Override
- ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
- return schemaBuilder.makeAttribute(nameClass, super.buildPattern(patterns, loc, null), loc, anno);
- }
-
- @Override
- State createChildState(String localName) throws SAXException {
- State tem = super.createChildState(localName);
- if (tem != null && childPatterns != null) {
- error("attribute_multi_pattern");
- }
- return tem;
- }
- }
-
- abstract class SinglePatternContainerState extends PatternContainerState {
-
- @Override
- State createChildState(String localName) throws SAXException {
- if (childPatterns == null) {
- return super.createChildState(localName);
- }
- error("too_many_children");
- return null;
- }
- }
-
- class GrammarSectionState extends State {
-
- GrammarSection section;
-
- GrammarSectionState() {
- }
-
- GrammarSectionState(GrammarSection section) {
- this.section = section;
- }
-
- State create() {
- return new GrammarSectionState(null);
- }
-
- State createChildState(String localName) throws SAXException {
- if (localName.equals("define")) {
- return new DefineState(section);
- }
- if (localName.equals("start")) {
- return new StartState(section);
- }
- if (localName.equals("include")) {
- Include include = section.makeInclude();
- if (include != null) {
- return new IncludeState(include);
- }
- }
- if (localName.equals("div")) {
- return new DivState(section.makeDiv());
- }
- error("expected_define", localName);
- // XXX better errors
- return null;
- }
-
- void end() throws SAXException {
- if (comments != null) {
- section.topLevelComment(comments);
- comments = null;
- }
- }
-
- @Override
- void endForeignChild(ParsedElementAnnotation ea) {
- section.topLevelAnnotation(ea);
- }
- }
-
- class DivState extends GrammarSectionState {
-
- final Div div;
-
- DivState(Div div) {
- super(div);
- this.div = div;
- }
-
- @Override
- void end() throws SAXException {
- super.end();
- div.endDiv(startLocation, annotations);
- }
- }
-
- class IncludeState extends GrammarSectionState {
-
- String href;
- final Include include;
-
- IncludeState(Include include) {
- super(include);
- this.include = include;
- }
-
- @Override
- void setOtherAttribute(String name, String value) throws SAXException {
- if (name.equals("href")) {
- href = value;
- checkUri(href);
- } else {
- super.setOtherAttribute(name, value);
- }
- }
-
- @Override
- void endAttributes() throws SAXException {
- if (href == null) {
- error("missing_href_attribute");
- } else {
- href = resolve(href);
- }
- }
-
- @Override
- void end() throws SAXException {
- super.end();
- if (href != null) {
- try {
- include.endInclude(parseable, href, getNs(), startLocation, annotations);
- } catch (IllegalSchemaException e) {
- }
- }
- }
- }
-
- class MergeGrammarState extends GrammarSectionState {
-
- final IncludedGrammar grammar;
-
- MergeGrammarState(IncludedGrammar grammar) {
- super(grammar);
- this.grammar = grammar;
- }
-
- @Override
- void end() throws SAXException {
- super.end();
- parent.endChild(grammar.endIncludedGrammar(startLocation, annotations));
- }
- }
-
- class GrammarState extends GrammarSectionState {
-
- Grammar grammar;
-
- @Override
- void setParent(State parent) {
- super.setParent(parent);
- grammar = schemaBuilder.makeGrammar(scope);
- section = grammar;
- scope = grammar;
- }
-
- @Override
- State create() {
- return new GrammarState();
- }
-
- @Override
- void end() throws SAXException {
- super.end();
- parent.endChild(grammar.endGrammar(startLocation, annotations));
- }
- }
-
- class RefState extends EmptyContentState {
-
- String name;
-
- State create() {
- return new RefState();
- }
-
- @Override
- void endAttributes() throws SAXException {
- if (name == null) {
- error("missing_name_attribute");
- }
- }
-
- @Override
- void setName(String name) throws SAXException {
- this.name = checkNCName(name);
- }
-
- ParsedPattern makePattern() throws SAXException {
- if (name == null) {
- return schemaBuilder.makeErrorPattern();
- }
- if (scope == null) {
- error("ref_outside_grammar", name);
- return schemaBuilder.makeErrorPattern();
- } else {
- return scope.makeRef(name, startLocation, annotations);
- }
- }
- }
-
- class ParentRefState extends RefState {
-
- @Override
- State create() {
- return new ParentRefState();
- }
-
- @Override
- ParsedPattern makePattern() throws SAXException {
- if (name == null) {
- return schemaBuilder.makeErrorPattern();
- }
- if (scope == null) {
- error("parent_ref_outside_grammar", name);
- return schemaBuilder.makeErrorPattern();
- } else {
- return scope.makeParentRef(name, startLocation, annotations);
- }
- }
- }
-
- class ExternalRefState extends EmptyContentState {
-
- String href;
-
- State create() {
- return new ExternalRefState();
- }
-
- @Override
- void setOtherAttribute(String name, String value) throws SAXException {
- if (name.equals("href")) {
- href = value;
- checkUri(href);
- } else {
- super.setOtherAttribute(name, value);
- }
- }
-
- @Override
- void endAttributes() throws SAXException {
- if (href == null) {
- error("missing_href_attribute");
- } else {
- href = resolve(href);
- }
- }
-
- ParsedPattern makePattern() {
- if (href != null) {
- try {
- return schemaBuilder.makeExternalRef(parseable,
- href,
- getNs(),
- scope,
- startLocation,
- annotations);
- } catch (IllegalSchemaException e) {
- }
- }
- return schemaBuilder.makeErrorPattern();
- }
- }
-
- abstract class DefinitionState extends PatternContainerState {
-
- GrammarSection.Combine combine = null;
- final GrammarSection section;
-
- DefinitionState(GrammarSection section) {
- this.section = section;
- }
-
- @Override
- void setOtherAttribute(String name, String value) throws SAXException {
- if (name.equals("combine")) {
- value = value.trim();
- if (value.equals("choice")) {
- combine = GrammarSection.COMBINE_CHOICE;
- } else if (value.equals("interleave")) {
- combine = GrammarSection.COMBINE_INTERLEAVE;
- } else {
- error("combine_attribute_bad_value", value);
- }
- } else {
- super.setOtherAttribute(name, value);
- }
- }
-
- @Override
- ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException {
- return super.buildPattern(patterns, loc, null);
- }
- }
-
- class DefineState extends DefinitionState {
-
- String name;
-
- DefineState(GrammarSection section) {
- super(section);
- }
-
- State create() {
- return new DefineState(null);
- }
-
- @Override
- void setName(String name) throws SAXException {
- this.name = checkNCName(name);
- }
-
- @Override
- void endAttributes() throws SAXException {
- if (name == null) {
- error("missing_name_attribute");
- }
- }
-
- @Override
- void sendPatternToParent(ParsedPattern p) {
- if (name != null) {
- section.define(name, combine, p, startLocation, annotations);
- }
- }
- }
-
- class StartState extends DefinitionState {
-
- StartState(GrammarSection section) {
- super(section);
- }
-
- State create() {
- return new StartState(null);
- }
-
- @Override
- void sendPatternToParent(ParsedPattern p) {
- section.define(GrammarSection.START, combine, p, startLocation, annotations);
- }
-
- @Override
- State createChildState(String localName) throws SAXException {
- State tem = super.createChildState(localName);
- if (tem != null && childPatterns != null) {
- error("start_multi_pattern");
- }
- return tem;
- }
- }
-
- abstract class NameClassContainerState extends State {
-
- State createChildState(String localName) throws SAXException {
- State state = (State) nameClassTable.get(localName);
- if (state == null) {
- error("expected_name_class", localName);
- return null;
- }
- return state.create();
- }
- }
-
- class NameClassChildState extends NameClassContainerState {
-
- final State prevState;
- final NameClassRef nameClassRef;
-
- State create() {
- return null;
- }
-
- NameClassChildState(State prevState, NameClassRef nameClassRef) {
- this.prevState = prevState;
- this.nameClassRef = nameClassRef;
- setParent(prevState.parent);
- this.ns = prevState.ns;
- }
-
- @Override
- void endChild(ParsedNameClass nameClass) {
- nameClassRef.setNameClass(nameClass);
- prevState.set();
- }
-
- @Override
- void endForeignChild(ParsedElementAnnotation ea) {
- prevState.endForeignChild(ea);
- }
-
- void end() throws SAXException {
- nameClassRef.setNameClass(nameClassBuilder.makeErrorNameClass());
- error("missing_name_class");
- prevState.set();
- prevState.end();
- }
- }
-
- abstract class NameClassBaseState extends State {
-
- abstract ParsedNameClass makeNameClass() throws SAXException;
-
- void end() throws SAXException {
- parent.endChild(makeNameClass());
- }
- }
-
- class NameState extends NameClassBaseState {
-
- final StringBuffer buf = new StringBuffer();
-
- State createChildState(String localName) throws SAXException {
- error("expected_name", localName);
- return null;
- }
-
- State create() {
- return new NameState();
- }
-
- @Override
- public void characters(char[] ch, int start, int len) {
- buf.append(ch, start, len);
- }
-
- @Override
- void checkForeignElement() throws SAXException {
- error("name_contains_foreign_element");
- }
-
- ParsedNameClass makeNameClass() throws SAXException {
- mergeLeadingComments();
- return expandName(buf.toString().trim(), getNs(), annotations);
- }
- }
- private static final int PATTERN_CONTEXT = 0;
- private static final int ANY_NAME_CONTEXT = 1;
- private static final int NS_NAME_CONTEXT = 2;
- private SAXParseable parseable;
-
- class AnyNameState extends NameClassBaseState {
-
- ParsedNameClass except = null;
-
- State create() {
- return new AnyNameState();
- }
-
- State createChildState(String localName) throws SAXException {
- if (localName.equals("except")) {
- if (except != null) {
- error("multiple_except");
- }
- return new NameClassChoiceState(getContext());
- }
- error("expected_except", localName);
- return null;
- }
-
- int getContext() {
- return ANY_NAME_CONTEXT;
- }
-
- ParsedNameClass makeNameClass() {
- if (except == null) {
- return makeNameClassNoExcept();
- } else {
- return makeNameClassExcept(except);
- }
- }
-
- ParsedNameClass makeNameClassNoExcept() {
- return nameClassBuilder.makeAnyName(startLocation, annotations);
- }
-
- ParsedNameClass makeNameClassExcept(ParsedNameClass except) {
- return nameClassBuilder.makeAnyName(except, startLocation, annotations);
- }
-
- @Override
- void endChild(ParsedNameClass nameClass) {
- except = nameClass;
- }
- }
-
- class NsNameState extends AnyNameState {
-
- @Override
- State create() {
- return new NsNameState();
- }
-
- @Override
- ParsedNameClass makeNameClassNoExcept() {
- return nameClassBuilder.makeNsName(getNs(), null, null);
- }
-
- @Override
- ParsedNameClass makeNameClassExcept(ParsedNameClass except) {
- return nameClassBuilder.makeNsName(getNs(), except, null, null);
- }
-
- @Override
- int getContext() {
- return NS_NAME_CONTEXT;
- }
- }
-
- class NameClassChoiceState extends NameClassContainerState {
-
- private ParsedNameClass[] nameClasses;
- private int nNameClasses;
- private int context;
-
- NameClassChoiceState() {
- this.context = PATTERN_CONTEXT;
- }
-
- NameClassChoiceState(int context) {
- this.context = context;
- }
-
- @Override
- void setParent(State parent) {
- super.setParent(parent);
- if (parent instanceof NameClassChoiceState) {
- this.context = ((NameClassChoiceState) parent).context;
- }
- }
-
- State create() {
- return new NameClassChoiceState();
- }
-
- @Override
- State createChildState(String localName) throws SAXException {
- if (localName.equals("anyName")) {
- if (context >= ANY_NAME_CONTEXT) {
- error(context == ANY_NAME_CONTEXT
- ? "any_name_except_contains_any_name"
- : "ns_name_except_contains_any_name");
- return null;
- }
- } else if (localName.equals("nsName")) {
- if (context == NS_NAME_CONTEXT) {
- error("ns_name_except_contains_ns_name");
- return null;
- }
- }
- return super.createChildState(localName);
- }
-
- @Override
- void endChild(ParsedNameClass nc) {
- if (nameClasses == null) {
- nameClasses = new ParsedNameClass[INIT_CHILD_ALLOC];
- } else if (nNameClasses >= nameClasses.length) {
- ParsedNameClass[] newNameClasses = new ParsedNameClass[nameClasses.length * 2];
- System.arraycopy(nameClasses, 0, newNameClasses, 0, nameClasses.length);
- nameClasses = newNameClasses;
- }
- nameClasses[nNameClasses++] = nc;
- }
-
- @Override
- void endForeignChild(ParsedElementAnnotation ea) {
- if (nNameClasses == 0) {
- super.endForeignChild(ea);
- } else {
- nameClasses[nNameClasses - 1] = nameClassBuilder.annotateAfter(nameClasses[nNameClasses - 1], ea);
- }
- }
-
- void end() throws SAXException {
- if (nNameClasses == 0) {
- error("missing_name_class");
- parent.endChild(nameClassBuilder.makeErrorNameClass());
- return;
- }
- if (comments != null) {
- nameClasses[nNameClasses - 1] = nameClassBuilder.commentAfter(nameClasses[nNameClasses - 1], comments);
- comments = null;
- }
- parent.endChild(nameClassBuilder.makeChoice(Arrays.asList(nameClasses).subList(0, nNameClasses), startLocation, annotations));
- }
- }
-
- private void initPatternTable() {
- patternTable = new Hashtable();
- patternTable.put("zeroOrMore", new ZeroOrMoreState());
- patternTable.put("oneOrMore", new OneOrMoreState());
- patternTable.put("optional", new OptionalState());
- patternTable.put("list", new ListState());
- patternTable.put("choice", new ChoiceState());
- patternTable.put("interleave", new InterleaveState());
- patternTable.put("group", new GroupState());
- patternTable.put("mixed", new MixedState());
- patternTable.put("element", new ElementState());
- patternTable.put("attribute", new AttributeState());
- patternTable.put("empty", new EmptyState());
- patternTable.put("text", new TextState());
- patternTable.put("value", new ValueState());
- patternTable.put("data", new DataState());
- patternTable.put("notAllowed", new NotAllowedState());
- patternTable.put("grammar", new GrammarState());
- patternTable.put("ref", new RefState());
- patternTable.put("parentRef", new ParentRefState());
- patternTable.put("externalRef", new ExternalRefState());
- }
-
- private void initNameClassTable() {
- nameClassTable = new Hashtable();
- nameClassTable.put("name", new NameState());
- nameClassTable.put("anyName", new AnyNameState());
- nameClassTable.put("nsName", new NsNameState());
- nameClassTable.put("choice", new NameClassChoiceState());
- }
-
- public ParsedPattern getParsedPattern() throws IllegalSchemaException {
- if (hadError) {
- throw new IllegalSchemaException();
- }
- return startPattern;
- }
-
- private void error(String key) throws SAXException {
- error(key, locator);
- }
-
- private void error(String key, String arg) throws SAXException {
- error(key, arg, locator);
- }
-
- void error(String key, String arg1, String arg2) throws SAXException {
- error(key, arg1, arg2, locator);
- }
-
- private void error(String key, Locator loc) throws SAXException {
- error(new SAXParseException(localizer.message(key), loc));
- }
-
- private void error(String key, String arg, Locator loc) throws SAXException {
- error(new SAXParseException(localizer.message(key, arg), loc));
- }
-
- private void error(String key, String arg1, String arg2, Locator loc)
- throws SAXException {
- error(new SAXParseException(localizer.message(key, arg1, arg2), loc));
- }
-
- private void error(SAXParseException e) throws SAXException {
- hadError = true;
- if (eh != null) {
- eh.error(e);
- }
- }
-
- void warning(String key) throws SAXException {
- warning(key, locator);
- }
-
- private void warning(String key, String arg) throws SAXException {
- warning(key, arg, locator);
- }
-
- private void warning(String key, String arg1, String arg2) throws SAXException {
- warning(key, arg1, arg2, locator);
- }
-
- private void warning(String key, Locator loc) throws SAXException {
- warning(new SAXParseException(localizer.message(key), loc));
- }
-
- private void warning(String key, String arg, Locator loc) throws SAXException {
- warning(new SAXParseException(localizer.message(key, arg), loc));
- }
-
- private void warning(String key, String arg1, String arg2, Locator loc)
- throws SAXException {
- warning(new SAXParseException(localizer.message(key, arg1, arg2), loc));
- }
-
- private void warning(SAXParseException e) throws SAXException {
- if (eh != null) {
- eh.warning(e);
- }
- }
-
- SchemaParser(SAXParseable parseable,
- XMLReader xr,
- ErrorHandler eh,
- SchemaBuilder schemaBuilder,
- IncludedGrammar grammar,
- Scope scope,
- String inheritedNs) throws SAXException {
- this.parseable = parseable;
- this.xr = xr;
- this.eh = eh;
- this.schemaBuilder = schemaBuilder;
- this.nameClassBuilder = schemaBuilder.getNameClassBuilder();
- if (eh != null) {
- xr.setErrorHandler(eh);
- }
- xr.setDTDHandler(context);
- if (schemaBuilder.usesComments()) {
- try {
- xr.setProperty("http://xml.org/sax/properties/lexical-handler", new LexicalHandlerImpl());
- } catch (SAXNotRecognizedException e) {
- warning("no_comment_support", xr.getClass().getName());
- } catch (SAXNotSupportedException e) {
- warning("no_comment_support", xr.getClass().getName());
- }
- }
- initPatternTable();
- initNameClassTable();
- new RootState(grammar, scope, inheritedNs).set();
- }
-
- private Context getContext() {
- return context;
- }
-
- class LexicalHandlerImpl extends AbstractLexicalHandler {
-
- private boolean inDtd = false;
-
- @Override
- public void startDTD(String s, String s1, String s2) throws SAXException {
- inDtd = true;
- }
-
- @Override
- public void endDTD() throws SAXException {
- inDtd = false;
- }
-
- @Override
- public void comment(char[] chars, int start, int length) throws SAXException {
- if (!inDtd) {
- ((CommentHandler) xr.getContentHandler()).comment(new String(chars, start, length));
- }
- }
- }
-
- private ParsedNameClass expandName(String name, String ns, Annotations anno) throws SAXException {
- int ic = name.indexOf(':');
- if (ic == -1) {
- return nameClassBuilder.makeName(ns, checkNCName(name), null, null, anno);
- }
- String prefix = checkNCName(name.substring(0, ic));
- String localName = checkNCName(name.substring(ic + 1));
- for (PrefixMapping tem = context.prefixMapping; tem != null; tem = tem.next) {
- if (tem.prefix.equals(prefix)) {
- return nameClassBuilder.makeName(tem.uri, localName, prefix, null, anno);
- }
- }
- error("undefined_prefix", prefix);
- return nameClassBuilder.makeName("", localName, null, null, anno);
- }
-
- private String findPrefix(String qName, String uri) {
- String prefix = null;
- if (qName == null || qName.equals("")) {
- for (PrefixMapping p = context.prefixMapping; p != null; p = p.next) {
- if (p.uri.equals(uri)) {
- prefix = p.prefix;
- break;
- }
- }
- } else {
- int off = qName.indexOf(':');
- if (off > 0) {
- prefix = qName.substring(0, off);
- }
- }
- return prefix;
- }
-
- private String checkNCName(String str) throws SAXException {
- if (!Naming.isNcname(str)) {
- error("invalid_ncname", str);
- }
- return str;
- }
-
- private String resolve(String systemId) throws SAXException {
- if (Uri.hasFragmentId(systemId)) {
- error("href_fragment_id");
- }
- systemId = Uri.escapeDisallowedChars(systemId);
- return Uri.resolve(xmlBaseHandler.getBaseUri(), systemId);
- }
-
- private Location makeLocation() {
- if (locator == null) {
- return null;
- }
- return schemaBuilder.makeLocation(locator.getSystemId(),
- locator.getLineNumber(),
- locator.getColumnNumber());
- }
-
- private void checkUri(String s) throws SAXException {
- if (!Uri.isValid(s)) {
- error("invalid_uri", s);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/util/Localizer.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/util/Localizer.java
deleted file mode 100644
index 3e2cb6c6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/util/Localizer.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.util;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Localizes messages.
- */
-public class Localizer {
- private final Class cls;
- private ResourceBundle bundle;
- /**
- * If non-null, any resources that weren't found in this localizer
- * will be delegated to the parent.
- */
- private final Localizer parent;
-
- public Localizer(Class cls) {
- this(null,cls);
- }
-
- public Localizer(Localizer parent, Class cls) {
- this.parent = parent;
- this.cls = cls;
- }
-
- private String getString(String key) {
- try {
- return getBundle().getString(key);
- } catch( MissingResourceException e ) {
- // delegation
- if(parent!=null)
- return parent.getString(key);
- else
- throw e;
- }
- }
-
- public String message(String key) {
- return MessageFormat.format(getString(key), new Object[]{});
- }
-
- public String message(String key, Object arg) {
- return MessageFormat.format(getString(key),
- new Object[]{arg});
- }
-
- public String message(String key, Object arg1, Object arg2) {
- return MessageFormat.format(getString(key), new Object[]{
- arg1, arg2});
- }
-
- public String message(String key, Object[] args) {
- return MessageFormat.format(getString(key), args);
- }
-
- private ResourceBundle getBundle() {
- if (bundle == null) {
- String s = cls.getName();
- int i = s.lastIndexOf('.');
- if (i > 0)
- s = s.substring(0, i + 1);
- else
- s = "";
- bundle = ResourceBundle.getBundle(s + "Messages");
- }
- return bundle;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/util/Uri.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/util/Uri.java
deleted file mode 100644
index 18885df1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/util/Uri.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.util;
-
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.io.UnsupportedEncodingException;
-
-public class Uri {
- private static String utf8 = "UTF-8";
-
- public static boolean isValid(String s) {
- return isValidPercent(s) && isValidFragment(s) && isValidScheme(s);
- }
-
- private static final String HEX_DIGITS = "0123456789abcdef";
-
- public static String escapeDisallowedChars(String s) {
- StringBuffer buf = null;
- int len = s.length();
- int done = 0;
- for (;;) {
- int i = done;
- for (;;) {
- if (i == len) {
- if (done == 0)
- return s;
- break;
- }
- if (isExcluded(s.charAt(i)))
- break;
- i++;
- }
- if (buf == null)
- buf = new StringBuffer();
- if (i > done) {
- buf.append(s.substring(done, i));
- done = i;
- }
- if (i == len)
- break;
- for (i++; i < len && isExcluded(s.charAt(i)); i++)
- ;
- String tem = s.substring(done, i);
- byte[] bytes;
- try {
- bytes = tem.getBytes(utf8);
- }
- catch (UnsupportedEncodingException e) {
- utf8 = "UTF8";
- try {
- bytes = tem.getBytes(utf8);
- }
- catch (UnsupportedEncodingException e2) {
- // Give up
- return s;
- }
- }
- for (int j = 0; j < bytes.length; j++) {
- buf.append('%');
- buf.append(HEX_DIGITS.charAt((bytes[j] & 0xFF) >> 4));
- buf.append(HEX_DIGITS.charAt(bytes[j] & 0xF));
- }
- done = i;
- }
- return buf.toString();
- }
-
- private static final String excluded = "<>\"{}|\\^`";
-
- private static boolean isExcluded(char c) {
- return c <= 0x20 || c >= 0x7F || excluded.indexOf(c) >= 0;
- }
-
- private static boolean isAlpha(char c) {
- return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z');
- }
-
- private static boolean isHexDigit(char c) {
- return ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F') || isDigit(c);
- }
-
- private static boolean isDigit(char c) {
- return '0' <= c && c <= '9';
- }
-
- private static boolean isSchemeChar(char c) {
- return isAlpha(c) || isDigit(c) || c == '+' || c == '-' || c =='.';
- }
-
- private static boolean isValidPercent(String s) {
- int len = s.length();
- for (int i = 0; i < len; i++)
- if (s.charAt(i) == '%') {
- if (i + 2 >= len)
- return false;
- else if (!isHexDigit(s.charAt(i + 1))
- || !isHexDigit(s.charAt(i + 2)))
- return false;
- }
- return true;
- }
-
- private static boolean isValidFragment(String s) {
- int i = s.indexOf('#');
- return i < 0 || s.indexOf('#', i + 1) < 0;
- }
-
- private static boolean isValidScheme(String s) {
- if (!isAbsolute(s))
- return true;
- int i = s.indexOf(':');
- if (i == 0
- || i + 1 == s.length()
- || !isAlpha(s.charAt(0)))
- return false;
- while (--i > 0)
- if (!isSchemeChar(s.charAt(i)))
- return false;
- return true;
- }
-
- public static String resolve(String baseUri, String uriReference) {
- if (!isAbsolute(uriReference) && baseUri != null && isAbsolute(baseUri)) {
- try {
- return new URL(new URL(baseUri), uriReference).toString();
- }
- catch (MalformedURLException e) { }
- }
- return uriReference;
- }
-
- public static boolean hasFragmentId(String uri) {
- return uri.indexOf('#') >= 0;
- }
-
- public static boolean isAbsolute(String uri) {
- int i = uri.indexOf(':');
- if (i < 0)
- return false;
- while (--i >= 0) {
- switch (uri.charAt(i)) {
- case '#':
- case '/':
- case '?':
- return false;
- }
- }
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/util/Utf16.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/util/Utf16.java
deleted file mode 100644
index 6cb267a7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/util/Utf16.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.util;
-
-public abstract class Utf16 {
- // 110110XX XXXXXX 110111XX XXXXXX
- static public boolean isSurrogate(char c) {
- return (c & 0xF800) == 0xD800;
- }
- static public boolean isSurrogate1(char c) {
- return (c & 0xFC00) == 0xD800;
- }
- static public boolean isSurrogate2(char c) {
- return (c & 0xFC00) == 0xDC00;
- }
- static public int scalarValue(char c1, char c2) {
- return (((c1 & 0x3FF) << 10) | (c2 & 0x3FF)) + 0x10000;
- }
- static public char surrogate1(int c) {
- return (char)(((c - 0x10000) >> 10) | 0xD800);
- }
- static public char surrogate2(int c) {
- return (char)(((c - 0x10000) & 0x3FF) | 0xDC00);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/AbstractLexicalHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/AbstractLexicalHandler.java
deleted file mode 100644
index a8725f0d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/AbstractLexicalHandler.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.xml.sax;
-
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.SAXException;
-
-public class AbstractLexicalHandler implements LexicalHandler {
- public void startDTD(String s, String s1, String s2) throws SAXException {
- }
-
- public void endDTD() throws SAXException {
- }
-
- public void startEntity(String s) throws SAXException {
- }
-
- public void endEntity(String s) throws SAXException {
- }
-
- public void startCDATA() throws SAXException {
- }
-
- public void endCDATA() throws SAXException {
- }
-
- public void comment(char[] chars, int start, int length) throws SAXException {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/JAXPXMLReaderCreator.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/JAXPXMLReaderCreator.java
deleted file mode 100644
index 455143d1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/JAXPXMLReaderCreator.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * 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
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-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;
-
-/**
- * {@link XMLReaderCreator} that uses JAXP to create
- * {@link XMLReader}s.
- *
- * @author
- * Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class JAXPXMLReaderCreator implements XMLReaderCreator {
-
- private final SAXParserFactory spf;
-
- public JAXPXMLReaderCreator( SAXParserFactory spf ) {
- this.spf = spf;
- }
-
- /**
- * Creates a {@link JAXPXMLReaderCreator} by using
- * {@link SAXParserFactory#newInstance()}.
- */
- public JAXPXMLReaderCreator() {
- spf = SAXParserFactory.newInstance();
- 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);
- }
- }
-
- /**
- * @see com.sun.xml.internal.rngom.xml.sax.XMLReaderCreator#createXMLReader()
- */
- public XMLReader createXMLReader() throws SAXException {
- try {
- return spf.newSAXParser().getXMLReader();
- } catch (ParserConfigurationException e) {
- throw new SAXException(e);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/XMLReaderCreator.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/XMLReaderCreator.java
deleted file mode 100644
index 929526f5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/XMLReaderCreator.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.xml.sax;
-
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-/**
- * A factory for <code>XMLReader</code>s. Thread-safety is determined by each particular
- * implementation of this interface.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- */
-public interface XMLReaderCreator {
- /**
- * Creates a new <code>XMLReader</code>.
- *
- * @return a new <code>XMLReader</code>; never <code>null</code>
- * @throws org.xml.sax.SAXException If an <code>XMLReader</code> cannot be created for any reason
- */
- XMLReader createXMLReader() throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/XmlBaseHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/XmlBaseHandler.java
deleted file mode 100644
index ce96d540..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/XmlBaseHandler.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.xml.sax;
-
-import com.sun.xml.internal.rngom.util.Uri;
-import org.xml.sax.Locator;
-
-public class XmlBaseHandler {
- private int depth = 0;
- private Locator loc;
- private Entry stack = null;
-
- private static class Entry {
- private Entry parent;
- private String attValue;
- private String systemId;
- private int depth;
- }
-
- public void setLocator(Locator loc) {
- this.loc = loc;
- }
-
- public void startElement() {
- ++depth;
- }
-
- public void endElement() {
- if (stack != null && stack.depth == depth)
- stack = stack.parent;
- --depth;
- }
-
- public void xmlBaseAttribute(String value) {
- Entry entry = new Entry();
- entry.parent = stack;
- stack = entry;
- entry.attValue = Uri.escapeDisallowedChars(value);
- entry.systemId = getSystemId();
- entry.depth = depth;
- }
-
- private String getSystemId() {
- return loc == null ? null : loc.getSystemId();
- }
-
- public String getBaseUri() {
- return getBaseUri1(getSystemId(), stack);
- }
-
- private static String getBaseUri1(String baseUri, Entry stack) {
- if (stack == null
- || (baseUri != null && !baseUri.equals(stack.systemId)))
- return baseUri;
- baseUri = stack.attValue;
- if (Uri.isAbsolute(baseUri))
- return baseUri;
- return Uri.resolve(getBaseUri1(stack.systemId, stack.parent), baseUri);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/util/EncodingMap.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/util/EncodingMap.java
deleted file mode 100644
index cf503acb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/util/EncodingMap.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.xml.util;
-
-import java.io.UnsupportedEncodingException;
-
-public abstract class EncodingMap {
- private static final String[] aliases = {
- "UTF-8", "UTF8",
- "UTF-16", "Unicode",
- "UTF-16BE", "UnicodeBigUnmarked",
- "UTF-16LE", "UnicodeLittleUnmarked",
- "US-ASCII", "ASCII",
- "TIS-620", "TIS620"
- };
-
- static public String getJavaName(String enc) {
- try {
- "x".getBytes(enc);
- }
- catch (UnsupportedEncodingException e) {
- for (int i = 0; i < aliases.length; i += 2) {
- if (enc.equalsIgnoreCase(aliases[i])) {
- try {
- "x".getBytes(aliases[i + 1]);
- return aliases[i + 1];
- }
- catch (UnsupportedEncodingException e2) {}
- }
- }
- }
- return enc;
- }
-
- static public void main(String[] args) {
- System.err.println(getJavaName(args[0]));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/util/Naming.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/util/Naming.java
deleted file mode 100644
index fb5880e8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/util/Naming.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.xml.util;
-
-public class Naming {
-
- private Naming() { }
-
- private static final int CT_NAME = 1;
- private static final int CT_NMSTRT = 2;
-
- private static final String nameStartSingles =
- "\u003a\u005f\u0386\u038c\u03da\u03dc\u03de\u03e0\u0559\u06d5\u093d\u09b2" +
- "\u0a5e\u0a8d\u0abd\u0ae0\u0b3d\u0b9c\u0cde\u0e30\u0e84\u0e8a\u0e8d\u0ea5" +
- "\u0ea7\u0eb0\u0ebd\u1100\u1109\u113c\u113e\u1140\u114c\u114e\u1150\u1159" +
- "\u1163\u1165\u1167\u1169\u1175\u119e\u11a8\u11ab\u11ba\u11eb\u11f0\u11f9" +
- "\u1f59\u1f5b\u1f5d\u1fbe\u2126\u212e\u3007";
- private static final String nameStartRanges =
- "\u0041\u005a\u0061\u007a\u00c0\u00d6\u00d8\u00f6\u00f8\u00ff\u0100\u0131" +
- "\u0134\u013e\u0141\u0148\u014a\u017e\u0180\u01c3\u01cd\u01f0\u01f4\u01f5" +
- "\u01fa\u0217\u0250\u02a8\u02bb\u02c1\u0388\u038a\u038e\u03a1\u03a3\u03ce" +
- "\u03d0\u03d6\u03e2\u03f3\u0401\u040c\u040e\u044f\u0451\u045c\u045e\u0481" +
- "\u0490\u04c4\u04c7\u04c8\u04cb\u04cc\u04d0\u04eb\u04ee\u04f5\u04f8\u04f9" +
- "\u0531\u0556\u0561\u0586\u05d0\u05ea\u05f0\u05f2\u0621\u063a\u0641\u064a" +
- "\u0671\u06b7\u06ba\u06be\u06c0\u06ce\u06d0\u06d3\u06e5\u06e6\u0905\u0939" +
- "\u0958\u0961\u0985\u098c\u098f\u0990\u0993\u09a8\u09aa\u09b0\u09b6\u09b9" +
- "\u09dc\u09dd\u09df\u09e1\u09f0\u09f1\u0a05\u0a0a\u0a0f\u0a10\u0a13\u0a28" +
- "\u0a2a\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59\u0a5c\u0a72\u0a74" +
- "\u0a85\u0a8b\u0a8f\u0a91\u0a93\u0aa8\u0aaa\u0ab0\u0ab2\u0ab3\u0ab5\u0ab9" +
- "\u0b05\u0b0c\u0b0f\u0b10\u0b13\u0b28\u0b2a\u0b30\u0b32\u0b33\u0b36\u0b39" +
- "\u0b5c\u0b5d\u0b5f\u0b61\u0b85\u0b8a\u0b8e\u0b90\u0b92\u0b95\u0b99\u0b9a" +
- "\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8\u0baa\u0bae\u0bb5\u0bb7\u0bb9\u0c05\u0c0c" +
- "\u0c0e\u0c10\u0c12\u0c28\u0c2a\u0c33\u0c35\u0c39\u0c60\u0c61\u0c85\u0c8c" +
- "\u0c8e\u0c90\u0c92\u0ca8\u0caa\u0cb3\u0cb5\u0cb9\u0ce0\u0ce1\u0d05\u0d0c" +
- "\u0d0e\u0d10\u0d12\u0d28\u0d2a\u0d39\u0d60\u0d61\u0e01\u0e2e\u0e32\u0e33" +
- "\u0e40\u0e45\u0e81\u0e82\u0e87\u0e88\u0e94\u0e97\u0e99\u0e9f\u0ea1\u0ea3" +
- "\u0eaa\u0eab\u0ead\u0eae\u0eb2\u0eb3\u0ec0\u0ec4\u0f40\u0f47\u0f49\u0f69" +
- "\u10a0\u10c5\u10d0\u10f6\u1102\u1103\u1105\u1107\u110b\u110c\u110e\u1112" +
- "\u1154\u1155\u115f\u1161\u116d\u116e\u1172\u1173\u11ae\u11af\u11b7\u11b8" +
- "\u11bc\u11c2\u1e00\u1e9b\u1ea0\u1ef9\u1f00\u1f15\u1f18\u1f1d\u1f20\u1f45" +
- "\u1f48\u1f4d\u1f50\u1f57\u1f5f\u1f7d\u1f80\u1fb4\u1fb6\u1fbc\u1fc2\u1fc4" +
- "\u1fc6\u1fcc\u1fd0\u1fd3\u1fd6\u1fdb\u1fe0\u1fec\u1ff2\u1ff4\u1ff6\u1ffc" +
- "\u212a\u212b\u2180\u2182\u3041\u3094\u30a1\u30fa\u3105\u312c\uac00\ud7a3" +
- "\u4e00\u9fa5\u3021\u3029";
- private static final String nameSingles =
- "\u002d\u002e\u05bf\u05c4\u0670\u093c\u094d\u09bc\u09be\u09bf\u09d7\u0a02" +
- "\u0a3c\u0a3e\u0a3f\u0abc\u0b3c\u0bd7\u0d57\u0e31\u0eb1\u0f35\u0f37\u0f39" +
- "\u0f3e\u0f3f\u0f97\u0fb9\u20e1\u3099\u309a\u00b7\u02d0\u02d1\u0387\u0640" +
- "\u0e46\u0ec6\u3005";
- private static final String nameRanges =
- "\u0300\u0345\u0360\u0361\u0483\u0486\u0591\u05a1\u05a3\u05b9\u05bb\u05bd" +
- "\u05c1\u05c2\u064b\u0652\u06d6\u06dc\u06dd\u06df\u06e0\u06e4\u06e7\u06e8" +
- "\u06ea\u06ed\u0901\u0903\u093e\u094c\u0951\u0954\u0962\u0963\u0981\u0983" +
- "\u09c0\u09c4\u09c7\u09c8\u09cb\u09cd\u09e2\u09e3\u0a40\u0a42\u0a47\u0a48" +
- "\u0a4b\u0a4d\u0a70\u0a71\u0a81\u0a83\u0abe\u0ac5\u0ac7\u0ac9\u0acb\u0acd" +
- "\u0b01\u0b03\u0b3e\u0b43\u0b47\u0b48\u0b4b\u0b4d\u0b56\u0b57\u0b82\u0b83" +
- "\u0bbe\u0bc2\u0bc6\u0bc8\u0bca\u0bcd\u0c01\u0c03\u0c3e\u0c44\u0c46\u0c48" +
- "\u0c4a\u0c4d\u0c55\u0c56\u0c82\u0c83\u0cbe\u0cc4\u0cc6\u0cc8\u0cca\u0ccd" +
- "\u0cd5\u0cd6\u0d02\u0d03\u0d3e\u0d43\u0d46\u0d48\u0d4a\u0d4d\u0e34\u0e3a" +
- "\u0e47\u0e4e\u0eb4\u0eb9\u0ebb\u0ebc\u0ec8\u0ecd\u0f18\u0f19\u0f71\u0f84" +
- "\u0f86\u0f8b\u0f90\u0f95\u0f99\u0fad\u0fb1\u0fb7\u20d0\u20dc\u302a\u302f" +
- "\u0030\u0039\u0660\u0669\u06f0\u06f9\u0966\u096f\u09e6\u09ef\u0a66\u0a6f" +
- "\u0ae6\u0aef\u0b66\u0b6f\u0be7\u0bef\u0c66\u0c6f\u0ce6\u0cef\u0d66\u0d6f" +
- "\u0e50\u0e59\u0ed0\u0ed9\u0f20\u0f29\u3031\u3035\u309d\u309e\u30fc\u30fe";
-
- private final static byte[][] charTypeTable;
-
- static {
- charTypeTable = new byte[256][];
- for (int i = 0; i < nameSingles.length(); i++)
- setCharType(nameSingles.charAt(i), CT_NAME);
- for (int i = 0; i < nameRanges.length(); i += 2)
- setCharType(nameRanges.charAt(i), nameRanges.charAt(i + 1), CT_NAME);
- for (int i = 0; i < nameStartSingles.length(); i++)
- setCharType(nameStartSingles.charAt(i), CT_NMSTRT);
- for (int i = 0; i < nameStartRanges.length(); i += 2)
- setCharType(nameStartRanges.charAt(i), nameStartRanges.charAt(i + 1),
- CT_NMSTRT);
- byte[] other = new byte[256];
- for (int i = 0; i < 256; i++)
- if (charTypeTable[i] == null)
- charTypeTable[i] = other;
- }
-
- private static void setCharType(char c, int type) {
- int hi = c >> 8;
- if (charTypeTable[hi] == null)
- charTypeTable[hi] = new byte[256];
- charTypeTable[hi][c & 0xFF] = (byte)type;
- }
-
- private static void setCharType(char min, char max, int type) {
- byte[] shared = null;
- do {
- if ((min & 0xFF) == 0) {
- for (; min + 0xFF <= max; min += 0x100) {
- if (shared == null) {
- shared = new byte[256];
- for (int i = 0; i < 256; i++)
- shared[i] = (byte)type;
- }
- charTypeTable[min >> 8] = shared;
- if (min + 0xFF == max)
- return;
- }
- }
- setCharType(min, type);
- } while (min++ != max);
- }
-
- private static boolean isNameStartChar(char c) {
- return charTypeTable[c >> 8][c & 0xff] == CT_NMSTRT;
- }
-
- private static boolean isNameStartCharNs(char c) {
- return isNameStartChar(c) && c != ':';
- }
-
- private static boolean isNameChar(char c) {
- return charTypeTable[c >> 8][c & 0xff] != 0;
- }
-
- private static boolean isNameCharNs(char c) {
- return isNameChar(c) && c != ':';
- }
-
- public static boolean isName(String s) {
- int len = s.length();
- if (len == 0)
- return false;
- if (!isNameStartChar(s.charAt(0)))
- return false;
- for (int i = 1; i < len; i++)
- if (!isNameChar(s.charAt(i)))
- return false;
- return true;
- }
-
- public static boolean isNmtoken(String s) {
- int len = s.length();
- if (len == 0)
- return false;
- for (int i = 0; i < len; i++)
- if (!isNameChar(s.charAt(i)))
- return false;
- return true;
- }
-
- public static boolean isNcname(String s) {
- int len = s.length();
- if (len == 0)
- return false;
- if (!isNameStartCharNs(s.charAt(0)))
- return false;
- for (int i = 1; i < len; i++)
- if (!isNameCharNs(s.charAt(i)))
- return false;
- return true;
- }
-
- public static boolean isQname(String s) {
- int len = s.length();
- if (len == 0)
- return false;
- if (!isNameStartCharNs(s.charAt(0)))
- return false;
- for (int i = 1; i < len; i++) {
- char c = s.charAt(i);
- if (!isNameChar(c)) {
- if (c == ':' && ++i < len && isNameStartCharNs(s.charAt(i))) {
- for (++i; i < len; i++)
- if (!isNameCharNs(s.charAt(i)))
- return false;
- return true;
- }
- return false;
- }
- }
- return true;
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/util/WellKnownNamespaces.java b/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/util/WellKnownNamespaces.java
deleted file mode 100644
index 19401ec6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/util/WellKnownNamespaces.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * Copyright (C) 2004-2011
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package com.sun.xml.internal.rngom.xml.util;
-
-public class WellKnownNamespaces {
- static public final String XML = "http://www.w3.org/XML/1998/namespace";
- static public final String XMLNS = "http://www.w3.org/2000/xmlns";
- static public final String XML_SCHEMA_DATATYPES = "http://www.w3.org/2001/XMLSchema-datatypes";
- static public final String XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
- static public final String RELAX_NG_COMPATIBILITY_DATATYPES = "http://relaxng.org/ns/compatibility/datatypes/1.0";
- static public final String RELAX_NG = "http://relaxng.org/ns/structure/1.0";
- static public final String RELAX_NG_0_9 = "http://relaxng.org/ns/structure/0.9";
- static public final String RELAX_NG_COMPATIBILITY_ANNOTATIONS = "http://relaxng.org/ns/compatibility/annotations/1.0";
-
- private WellKnownNamespaces() {
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractCreator.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractCreator.java
deleted file mode 100644
index 1923c606..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractCreator.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer;
-
-/**
- * Base class for classes that creates {@link MutableXMLStreamBuffer}
- * and from infoset in API-specific form.
- */
-public class AbstractCreator extends AbstractCreatorProcessor {
-
- protected MutableXMLStreamBuffer _buffer;
-
- public void setXMLStreamBuffer(MutableXMLStreamBuffer buffer) {
- if (buffer == null) {
- throw new NullPointerException("buffer cannot be null");
- }
- setBuffer(buffer);
- }
-
- public MutableXMLStreamBuffer getXMLStreamBuffer() {
- return _buffer;
- }
-
-
- protected final void createBuffer() {
- setBuffer(new MutableXMLStreamBuffer());
- }
-
- /**
- * Should be called whenever a new tree is stored on the buffer.
- */
- protected final void increaseTreeCount() {
- _buffer.treeCount++;
- }
-
- protected final void setBuffer(MutableXMLStreamBuffer buffer) {
- _buffer = buffer;
-
- _currentStructureFragment = _buffer.getStructure();
- _structure = _currentStructureFragment.getArray();
- _structurePtr = 0;
-
- _currentStructureStringFragment = _buffer.getStructureStrings();
- _structureStrings = _currentStructureStringFragment.getArray();
- _structureStringsPtr = 0;
-
- _currentContentCharactersBufferFragment = _buffer.getContentCharactersBuffer();
- _contentCharactersBuffer = _currentContentCharactersBufferFragment.getArray();
- _contentCharactersBufferPtr = 0;
-
- _currentContentObjectFragment = _buffer.getContentObjects();
- _contentObjects = _currentContentObjectFragment.getArray();
- _contentObjectsPtr = 0;
- }
-
- protected final void setHasInternedStrings(boolean hasInternedStrings) {
- _buffer.setHasInternedStrings(hasInternedStrings);
- }
-
- protected final void storeStructure(int b) {
- _structure[_structurePtr++] = (byte)b;
- if (_structurePtr == _structure.length) {
- resizeStructure();
- }
- }
-
- protected final void resizeStructure() {
- _structurePtr = 0;
- if (_currentStructureFragment.getNext() != null) {
- _currentStructureFragment = _currentStructureFragment.getNext();
- _structure = _currentStructureFragment.getArray();
- } else {
- _structure = new byte[_structure.length];
- _currentStructureFragment = new FragmentedArray(_structure, _currentStructureFragment);
- }
- }
-
- protected final void storeStructureString(String s) {
- _structureStrings[_structureStringsPtr++] = s;
- if (_structureStringsPtr == _structureStrings.length) {
- resizeStructureStrings();
- }
- }
-
- protected final void resizeStructureStrings() {
- _structureStringsPtr = 0;
- if (_currentStructureStringFragment.getNext() != null) {
- _currentStructureStringFragment = _currentStructureStringFragment.getNext();
- _structureStrings = _currentStructureStringFragment.getArray();
- } else {
- _structureStrings = new String[_structureStrings.length];
- _currentStructureStringFragment = new FragmentedArray(_structureStrings, _currentStructureStringFragment);
- }
- }
-
- protected final void storeContentString(String s) {
- storeContentObject(s);
- }
-
- protected final void storeContentCharacters(int type, char[] ch, int start, int length) {
- if (_contentCharactersBufferPtr + length >= _contentCharactersBuffer.length) {
- if (length >= 512) {
- storeStructure(type | CONTENT_TYPE_CHAR_ARRAY_COPY);
- storeContentCharactersCopy(ch, start, length);
- return;
- }
- resizeContentCharacters();
- }
-
- if (length < CHAR_ARRAY_LENGTH_SMALL_SIZE) {
- storeStructure(type);
- storeStructure(length);
- System.arraycopy(ch, start, _contentCharactersBuffer, _contentCharactersBufferPtr, length);
- _contentCharactersBufferPtr += length;
- } else if (length < CHAR_ARRAY_LENGTH_MEDIUM_SIZE) {
- storeStructure(type | CHAR_ARRAY_LENGTH_MEDIUM);
- storeStructure(length >> 8);
- storeStructure(length & 255);
- System.arraycopy(ch, start, _contentCharactersBuffer, _contentCharactersBufferPtr, length);
- _contentCharactersBufferPtr += length;
- } else {
- storeStructure(type | CONTENT_TYPE_CHAR_ARRAY_COPY);
- storeContentCharactersCopy(ch, start, length);
- }
- }
-
- protected final void resizeContentCharacters() {
- _contentCharactersBufferPtr = 0;
- if (_currentContentCharactersBufferFragment.getNext() != null) {
- _currentContentCharactersBufferFragment = _currentContentCharactersBufferFragment.getNext();
- _contentCharactersBuffer = _currentContentCharactersBufferFragment.getArray();
- } else {
- _contentCharactersBuffer = new char[_contentCharactersBuffer.length];
- _currentContentCharactersBufferFragment = new FragmentedArray(_contentCharactersBuffer,
- _currentContentCharactersBufferFragment);
- }
- }
-
- protected final void storeContentCharactersCopy(char[] ch, int start, int length) {
- char[] copyOfCh = new char[length];
- System.arraycopy(ch, start, copyOfCh, 0, length);
- storeContentObject(copyOfCh);
- }
-
- protected final Object peekAtContentObject() {
- return _contentObjects[_contentObjectsPtr];
- }
-
- protected final void storeContentObject(Object s) {
- _contentObjects[_contentObjectsPtr++] = s;
- if (_contentObjectsPtr == _contentObjects.length) {
- resizeContentObjects();
- }
- }
-
- protected final void resizeContentObjects() {
- _contentObjectsPtr = 0;
- if (_currentContentObjectFragment.getNext() != null) {
- _currentContentObjectFragment = _currentContentObjectFragment.getNext();
- _contentObjects = _currentContentObjectFragment.getArray();
- } else {
- _contentObjects = new Object[_contentObjects.length];
- _currentContentObjectFragment = new FragmentedArray(_contentObjects, _currentContentObjectFragment);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractCreatorProcessor.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractCreatorProcessor.java
deleted file mode 100644
index 8cfe231f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractCreatorProcessor.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer;
-
-@SuppressWarnings("PointlessBitwiseExpression")
-public abstract class AbstractCreatorProcessor {
- /**
- * Flag on a T_DOCUMENT to indicate if a fragment
- */
- protected static final int FLAG_DOCUMENT_FRAGMENT = 1 << 0;
-
- /*
- * Flags on T_ELEMENT, T_ATTRIBUTE, T_NAMESPACE_ATTRIBUTE
- * to indicate namespace information is represent
- */
- protected static final int FLAG_PREFIX = 1 << 0;
- protected static final int FLAG_URI = 1 << 1;
- protected static final int FLAG_QUALIFIED_NAME = 1 << 2;
-
- /*
- * Types of content for T_TEXT and T_COMMENT
- * <p>
- * Highest 2 bits of lower nibble are used.
- */
- protected static final int CONTENT_TYPE_CHAR_ARRAY = 0 << 2;
- protected static final int CONTENT_TYPE_CHAR_ARRAY_COPY = 1 << 2;
- protected static final int CONTENT_TYPE_STRING = 2 << 2;
- protected static final int CONTENT_TYPE_OBJECT = 3 << 2;
-
- /*
- * Size of the length of character content for CONTENT_TYPE_CHAR_ARRAY
- * <p>
- * Last bit of lower nibble is used.
- */
- protected static final int CHAR_ARRAY_LENGTH_SMALL = 0;
- protected static final int CHAR_ARRAY_LENGTH_MEDIUM = 1;
- protected static final int CHAR_ARRAY_LENGTH_SMALL_SIZE = 1 << 8;
- protected static final int CHAR_ARRAY_LENGTH_MEDIUM_SIZE = 1 << 16;
-
- /*
- * Types of value for T_ATTRIBUTE
- * <p>
- * Highest bit of lower nibble is used.
- */
- protected static final int VALUE_TYPE_STRING = 0;
- protected static final int VALUE_TYPE_OBJECT = 1 << 3;
-
- /*
- * Mask for types.
- * <p>
- * Highest nibble is used.
- */
- protected static final int TYPE_MASK = 0xF0;
- protected static final int T_DOCUMENT = 0x10;
- protected static final int T_ELEMENT = 0x20;
- protected static final int T_ATTRIBUTE = 0x30;
- protected static final int T_NAMESPACE_ATTRIBUTE = 0x40;
- protected static final int T_TEXT = 0x50;
- protected static final int T_COMMENT = 0x60;
- protected static final int T_PROCESSING_INSTRUCTION = 0x70;
- protected static final int T_UNEXPANDED_ENTITY_REFERENCE = 0x80;
- protected static final int T_END = 0x90;
-
- /*
- * Composed types.
- * <p>
- * One octet is used.
- */
- protected static final int T_DOCUMENT_FRAGMENT = T_DOCUMENT | FLAG_DOCUMENT_FRAGMENT;
-
- protected static final int T_ELEMENT_U_LN_QN = T_ELEMENT | FLAG_URI | FLAG_QUALIFIED_NAME;
- protected static final int T_ELEMENT_P_U_LN = T_ELEMENT | FLAG_PREFIX | FLAG_URI;
- protected static final int T_ELEMENT_U_LN = T_ELEMENT | FLAG_URI;
- protected static final int T_ELEMENT_LN = T_ELEMENT;
-
- protected static final int T_NAMESPACE_ATTRIBUTE_P = T_NAMESPACE_ATTRIBUTE | FLAG_PREFIX;
- protected static final int T_NAMESPACE_ATTRIBUTE_P_U = T_NAMESPACE_ATTRIBUTE | FLAG_PREFIX | FLAG_URI;
- protected static final int T_NAMESPACE_ATTRIBUTE_U = T_NAMESPACE_ATTRIBUTE | FLAG_URI;
-
- protected static final int T_ATTRIBUTE_U_LN_QN = T_ATTRIBUTE | FLAG_URI | FLAG_QUALIFIED_NAME;
- protected static final int T_ATTRIBUTE_P_U_LN = T_ATTRIBUTE | FLAG_PREFIX | FLAG_URI;
- protected static final int T_ATTRIBUTE_U_LN = T_ATTRIBUTE | FLAG_URI;
- protected static final int T_ATTRIBUTE_LN = T_ATTRIBUTE;
- protected static final int T_ATTRIBUTE_U_LN_QN_OBJECT = T_ATTRIBUTE_U_LN_QN | VALUE_TYPE_OBJECT;
- protected static final int T_ATTRIBUTE_P_U_LN_OBJECT = T_ATTRIBUTE_P_U_LN | VALUE_TYPE_OBJECT;
- protected static final int T_ATTRIBUTE_U_LN_OBJECT = T_ATTRIBUTE_U_LN | VALUE_TYPE_OBJECT;
- protected static final int T_ATTRIBUTE_LN_OBJECT = T_ATTRIBUTE_LN | VALUE_TYPE_OBJECT;
-
- protected static final int T_TEXT_AS_CHAR_ARRAY = T_TEXT;
- protected static final int T_TEXT_AS_CHAR_ARRAY_SMALL = T_TEXT | CHAR_ARRAY_LENGTH_SMALL;
- protected static final int T_TEXT_AS_CHAR_ARRAY_MEDIUM = T_TEXT | CHAR_ARRAY_LENGTH_MEDIUM;
- protected static final int T_TEXT_AS_CHAR_ARRAY_COPY = T_TEXT | CONTENT_TYPE_CHAR_ARRAY_COPY;
- protected static final int T_TEXT_AS_STRING = T_TEXT | CONTENT_TYPE_STRING;
- protected static final int T_TEXT_AS_OBJECT = T_TEXT | CONTENT_TYPE_OBJECT;
-
- protected static final int T_COMMENT_AS_CHAR_ARRAY = T_COMMENT;
- protected static final int T_COMMENT_AS_CHAR_ARRAY_SMALL = T_COMMENT | CHAR_ARRAY_LENGTH_SMALL;
- protected static final int T_COMMENT_AS_CHAR_ARRAY_MEDIUM = T_COMMENT | CHAR_ARRAY_LENGTH_MEDIUM;
- protected static final int T_COMMENT_AS_CHAR_ARRAY_COPY = T_COMMENT | CONTENT_TYPE_CHAR_ARRAY_COPY;
- protected static final int T_COMMENT_AS_STRING = T_COMMENT | CONTENT_TYPE_STRING;
-
- protected static final int T_END_OF_BUFFER = -1;
-
- protected FragmentedArray<byte[]> _currentStructureFragment;
- protected byte[] _structure;
- protected int _structurePtr;
-
- protected FragmentedArray<String[]> _currentStructureStringFragment;
- protected String[] _structureStrings;
- protected int _structureStringsPtr;
-
- protected FragmentedArray<char[]> _currentContentCharactersBufferFragment;
- protected char[] _contentCharactersBuffer;
- protected int _contentCharactersBufferPtr;
-
- protected FragmentedArray<Object[]> _currentContentObjectFragment;
- protected Object[] _contentObjects;
- protected int _contentObjectsPtr;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractProcessor.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractProcessor.java
deleted file mode 100644
index 80253244..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractProcessor.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer;
-
-/**
- * Base class for classes that processes {@link XMLStreamBuffer}
- * and produces infoset in API-specific form.
- */
-public abstract class AbstractProcessor extends AbstractCreatorProcessor {
- protected static final int STATE_ILLEGAL = 0;
-
- protected static final int STATE_DOCUMENT = 1;
- protected static final int STATE_DOCUMENT_FRAGMENT = 2;
- protected static final int STATE_ELEMENT_U_LN_QN = 3;
- protected static final int STATE_ELEMENT_P_U_LN = 4;
- protected static final int STATE_ELEMENT_U_LN = 5;
- protected static final int STATE_ELEMENT_LN = 6;
- protected static final int STATE_TEXT_AS_CHAR_ARRAY_SMALL = 7;
- protected static final int STATE_TEXT_AS_CHAR_ARRAY_MEDIUM = 8;
- protected static final int STATE_TEXT_AS_CHAR_ARRAY_COPY = 9;
- protected static final int STATE_TEXT_AS_STRING = 10;
- protected static final int STATE_TEXT_AS_OBJECT = 11;
- protected static final int STATE_COMMENT_AS_CHAR_ARRAY_SMALL = 12;
- protected static final int STATE_COMMENT_AS_CHAR_ARRAY_MEDIUM = 13;
- protected static final int STATE_COMMENT_AS_CHAR_ARRAY_COPY = 14;
- protected static final int STATE_COMMENT_AS_STRING = 15;
- protected static final int STATE_PROCESSING_INSTRUCTION = 16;
- protected static final int STATE_END = 17;
- private static final int[] _eiiStateTable = new int[256];
-
- protected static final int STATE_NAMESPACE_ATTRIBUTE = 1;
- protected static final int STATE_NAMESPACE_ATTRIBUTE_P = 2;
- protected static final int STATE_NAMESPACE_ATTRIBUTE_P_U = 3;
- protected static final int STATE_NAMESPACE_ATTRIBUTE_U = 4;
- private static final int[] _niiStateTable = new int[256];
-
- protected static final int STATE_ATTRIBUTE_U_LN_QN = 1;
- protected static final int STATE_ATTRIBUTE_P_U_LN = 2;
- protected static final int STATE_ATTRIBUTE_U_LN = 3;
- protected static final int STATE_ATTRIBUTE_LN = 4;
- protected static final int STATE_ATTRIBUTE_U_LN_QN_OBJECT = 5;
- protected static final int STATE_ATTRIBUTE_P_U_LN_OBJECT = 6;
- protected static final int STATE_ATTRIBUTE_U_LN_OBJECT = 7;
- protected static final int STATE_ATTRIBUTE_LN_OBJECT = 8;
- private static final int[] _aiiStateTable = new int[256];
-
- static {
- /*
- * Create a state table from information items and options.
- * The swtich statement using such states will often generate a more
- * efficient byte code representation that can be hotspotted using
- * jump tables.
- */
- _eiiStateTable[T_DOCUMENT] = STATE_DOCUMENT;
- _eiiStateTable[T_DOCUMENT_FRAGMENT] = STATE_DOCUMENT_FRAGMENT;
- _eiiStateTable[T_ELEMENT_U_LN_QN] = STATE_ELEMENT_U_LN_QN;
- _eiiStateTable[T_ELEMENT_P_U_LN] = STATE_ELEMENT_P_U_LN;
- _eiiStateTable[T_ELEMENT_U_LN] = STATE_ELEMENT_U_LN;
- _eiiStateTable[T_ELEMENT_LN] = STATE_ELEMENT_LN;
- _eiiStateTable[T_TEXT_AS_CHAR_ARRAY_SMALL] = STATE_TEXT_AS_CHAR_ARRAY_SMALL;
- _eiiStateTable[T_TEXT_AS_CHAR_ARRAY_MEDIUM] = STATE_TEXT_AS_CHAR_ARRAY_MEDIUM;
- _eiiStateTable[T_TEXT_AS_CHAR_ARRAY_COPY] = STATE_TEXT_AS_CHAR_ARRAY_COPY;
- _eiiStateTable[T_TEXT_AS_STRING] = STATE_TEXT_AS_STRING;
- _eiiStateTable[T_TEXT_AS_OBJECT] = STATE_TEXT_AS_OBJECT;
- _eiiStateTable[T_COMMENT_AS_CHAR_ARRAY_SMALL] = STATE_COMMENT_AS_CHAR_ARRAY_SMALL;
- _eiiStateTable[T_COMMENT_AS_CHAR_ARRAY_MEDIUM] = STATE_COMMENT_AS_CHAR_ARRAY_MEDIUM;
- _eiiStateTable[T_COMMENT_AS_CHAR_ARRAY_COPY] = STATE_COMMENT_AS_CHAR_ARRAY_COPY;
- _eiiStateTable[T_COMMENT_AS_STRING] = STATE_COMMENT_AS_STRING;
- _eiiStateTable[T_PROCESSING_INSTRUCTION] = STATE_PROCESSING_INSTRUCTION;
- _eiiStateTable[T_END] = STATE_END;
-
- _niiStateTable[T_NAMESPACE_ATTRIBUTE] = STATE_NAMESPACE_ATTRIBUTE;
- _niiStateTable[T_NAMESPACE_ATTRIBUTE_P] = STATE_NAMESPACE_ATTRIBUTE_P;
- _niiStateTable[T_NAMESPACE_ATTRIBUTE_P_U] = STATE_NAMESPACE_ATTRIBUTE_P_U;
- _niiStateTable[T_NAMESPACE_ATTRIBUTE_U] = STATE_NAMESPACE_ATTRIBUTE_U;
-
- _aiiStateTable[T_ATTRIBUTE_U_LN_QN] = STATE_ATTRIBUTE_U_LN_QN;
- _aiiStateTable[T_ATTRIBUTE_P_U_LN] = STATE_ATTRIBUTE_P_U_LN;
- _aiiStateTable[T_ATTRIBUTE_U_LN] = STATE_ATTRIBUTE_U_LN;
- _aiiStateTable[T_ATTRIBUTE_LN] = STATE_ATTRIBUTE_LN;
- _aiiStateTable[T_ATTRIBUTE_U_LN_QN_OBJECT] = STATE_ATTRIBUTE_U_LN_QN_OBJECT;
- _aiiStateTable[T_ATTRIBUTE_P_U_LN_OBJECT] = STATE_ATTRIBUTE_P_U_LN_OBJECT;
- _aiiStateTable[T_ATTRIBUTE_U_LN_OBJECT] = STATE_ATTRIBUTE_U_LN_OBJECT;
- _aiiStateTable[T_ATTRIBUTE_LN_OBJECT] = STATE_ATTRIBUTE_LN_OBJECT;
- }
-
- protected XMLStreamBuffer _buffer;
-
- /**
- * True if this processor should create a fragment of XML, without the start/end document markers.
- */
- protected boolean _fragmentMode;
-
- protected boolean _stringInterningFeature = false;
-
- /**
- * Number of remaining XML element trees that should be visible
- * through this {@link AbstractProcessor}.
- */
- protected int _treeCount;
-
- /**
- * @deprecated
- * Use {@link #setBuffer(XMLStreamBuffer, boolean)}
- */
- protected final void setBuffer(XMLStreamBuffer buffer) {
- setBuffer(buffer,buffer.isFragment());
- }
- protected final void setBuffer(XMLStreamBuffer buffer, boolean fragmentMode) {
- _buffer = buffer;
- _fragmentMode = fragmentMode;
-
- _currentStructureFragment = _buffer.getStructure();
- _structure = _currentStructureFragment.getArray();
- _structurePtr = _buffer.getStructurePtr();
-
- _currentStructureStringFragment = _buffer.getStructureStrings();
- _structureStrings = _currentStructureStringFragment.getArray();
- _structureStringsPtr = _buffer.getStructureStringsPtr();
-
- _currentContentCharactersBufferFragment = _buffer.getContentCharactersBuffer();
- _contentCharactersBuffer = _currentContentCharactersBufferFragment.getArray();
- _contentCharactersBufferPtr = _buffer.getContentCharactersBufferPtr();
-
- _currentContentObjectFragment = _buffer.getContentObjects();
- _contentObjects = _currentContentObjectFragment.getArray();
- _contentObjectsPtr = _buffer.getContentObjectsPtr();
-
- _stringInterningFeature = _buffer.hasInternedStrings();
- _treeCount = _buffer.treeCount;
- }
-
- protected final int peekStructure() {
- if (_structurePtr < _structure.length) {
- return _structure[_structurePtr] & 255;
- }
-
- return readFromNextStructure(0);
- }
-
- protected final int readStructure() {
- if (_structurePtr < _structure.length) {
- return _structure[_structurePtr++] & 255;
- }
-
- return readFromNextStructure(1);
- }
-
- protected final int readEiiState() {
- return _eiiStateTable[readStructure()];
- }
-
- protected static int getEIIState(int item) {
- return _eiiStateTable[item];
- }
-
- protected static int getNIIState(int item) {
- return _niiStateTable[item];
- }
-
- protected static int getAIIState(int item) {
- return _aiiStateTable[item];
- }
-
- protected final int readStructure16() {
- return (readStructure() << 8) | readStructure();
- }
-
- private int readFromNextStructure(int v) {
- _structurePtr = v;
- _currentStructureFragment = _currentStructureFragment.getNext();
- _structure = _currentStructureFragment.getArray();
- return _structure[0] & 255;
- }
-
- protected final String readStructureString() {
- if (_structureStringsPtr < _structureStrings.length) {
- return _structureStrings[_structureStringsPtr++];
- }
-
- _structureStringsPtr = 1;
- _currentStructureStringFragment = _currentStructureStringFragment.getNext();
- _structureStrings = _currentStructureStringFragment.getArray();
- return _structureStrings[0];
- }
-
- protected final String readContentString() {
- return (String)readContentObject();
- }
-
- protected final char[] readContentCharactersCopy() {
- return (char[])readContentObject();
- }
-
- protected final int readContentCharactersBuffer(int length) {
- if (_contentCharactersBufferPtr + length < _contentCharactersBuffer.length) {
- final int start = _contentCharactersBufferPtr;
- _contentCharactersBufferPtr += length;
- return start;
- }
-
- _contentCharactersBufferPtr = length;
- _currentContentCharactersBufferFragment = _currentContentCharactersBufferFragment.getNext();
- _contentCharactersBuffer = _currentContentCharactersBufferFragment.getArray();
- return 0;
- }
-
- protected final Object readContentObject() {
- if (_contentObjectsPtr < _contentObjects.length) {
- return _contentObjects[_contentObjectsPtr++];
- }
-
- _contentObjectsPtr = 1;
- _currentContentObjectFragment = _currentContentObjectFragment.getNext();
- _contentObjects = _currentContentObjectFragment.getArray();
- return _contentObjects[0];
- }
-
- protected final StringBuilder _qNameBuffer = new StringBuilder();
-
- protected final String getQName(String prefix, String localName) {
- _qNameBuffer.append(prefix).append(':').append(localName);
- final String qName = _qNameBuffer.toString();
- _qNameBuffer.setLength(0);
- return (_stringInterningFeature) ? qName.intern() : qName;
- }
-
- protected final String getPrefixFromQName(String qName) {
- int pIndex = qName.indexOf(':');
- if (_stringInterningFeature) {
- return (pIndex != -1) ? qName.substring(0,pIndex).intern() : "";
- } else {
- return (pIndex != -1) ? qName.substring(0,pIndex) : "";
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AttributesHolder.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AttributesHolder.java
deleted file mode 100644
index 288fed3d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AttributesHolder.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer;
-
-import org.xml.sax.Attributes;
-
-/**
- * Class for holding attributes.
- *
- * Since it implements {@link Attributes}, this class follows the SAX convention
- * of using "" instead of null.
- */
-@SuppressWarnings({"PointlessArithmeticExpression"})
-public final class AttributesHolder implements Attributes {
- private static final int DEFAULT_CAPACITY = 8;
- private static final int ITEM_SIZE = 1 << 3;
-
- private static final int PREFIX = 0;
- private static final int URI = 1;
- private static final int LOCAL_NAME = 2;
- private static final int QNAME = 3;
- private static final int TYPE = 4;
- private static final int VALUE = 5;
-
- private int _attributeCount;
-
- private String[] _strings;
-
- public AttributesHolder() {
- _strings = new String[DEFAULT_CAPACITY * ITEM_SIZE];
- }
-
- public final int getLength() {
- return _attributeCount;
- }
-
- public final String getPrefix(int index) {
- return (index >= 0 && index < _attributeCount) ?
- _strings[(index << 3) + PREFIX] : null;
- }
-
- public final String getLocalName(int index) {
- return (index >= 0 && index < _attributeCount) ?
- _strings[(index << 3) + LOCAL_NAME] : null;
- }
-
- public final String getQName(int index) {
- return (index >= 0 && index < _attributeCount) ?
- _strings[(index << 3) + QNAME] : null;
- }
-
- public final String getType(int index) {
- return (index >= 0 && index < _attributeCount) ?
- _strings[(index << 3) + TYPE] : null;
- }
-
- public final String getURI(int index) {
- return (index >= 0 && index < _attributeCount) ?
- _strings[(index << 3) + URI] : null;
- }
-
- public final String getValue(int index) {
- return (index >= 0 && index < _attributeCount) ?
- _strings[(index << 3) + VALUE] : null;
- }
-
- public final int getIndex(String qName) {
- for (int i = 0; i < _attributeCount; i++) {
- if (qName.equals(_strings[(i << 3) + QNAME])) {
- return i;
- }
- }
- return -1;
- }
-
- public final String getType(String qName) {
- final int i = (getIndex(qName) << 3) + TYPE;
- return (i >= 0) ? _strings[i] : null;
- }
-
- public final String getValue(String qName) {
- final int i = (getIndex(qName) << 3) + VALUE;
- return (i >= 0) ? _strings[i] : null;
- }
-
- public final int getIndex(String uri, String localName) {
- for (int i = 0; i < _attributeCount; i++) {
- if (localName.equals(_strings[(i << 3) + LOCAL_NAME]) &&
- uri.equals(_strings[(i << 3) + URI])) {
- return i;
- }
- }
- return -1;
- }
-
- public final String getType(String uri, String localName) {
- final int i = (getIndex(uri, localName) << 3) + TYPE;
- return (i >= 0) ? _strings[i] : null;
- }
-
- public final String getValue(String uri, String localName) {
- final int i = (getIndex(uri, localName) << 3) + VALUE;
- return (i >= 0) ? _strings[i] : null;
- }
-
- public final void clear() {
- if (_attributeCount > 0) {
- for (int i = 0; i < _attributeCount; i++) {
- _strings[(i << 3) + VALUE] = null;
- }
- _attributeCount = 0;
- }
- }
-
-
- /**
- * Add an attribute using a qualified name that contains the
- * prefix and local name.
- *
- * @param uri
- * This can be empty but not null, just like everywhere else in SAX.
- */
- public final void addAttributeWithQName(String uri, String localName, String qName, String type, String value) {
- final int i = _attributeCount << 3;
- if (i == _strings.length) {
- resize(i);
- }
-
- _strings[i + PREFIX] = null;
- _strings[i + URI] = uri;
- _strings[i + LOCAL_NAME] = localName;
- _strings[i + QNAME] = qName;
- _strings[i + TYPE] = type;
- _strings[i + VALUE] = value;
-
- _attributeCount++;
- }
-
- /**
- * Add an attribute using a prefix.
- *
- * @param prefix
- * This can be empty but not null, just like everywhere else in SAX.
- * @param uri
- * This can be empty but not null, just like everywhere else in SAX.
- */
- public final void addAttributeWithPrefix(String prefix, String uri, String localName, String type, String value) {
- final int i = _attributeCount << 3;
- if (i == _strings.length) {
- resize(i);
- }
-
- _strings[i + PREFIX] = prefix;
- _strings[i + URI] = uri;
- _strings[i + LOCAL_NAME] = localName;
- _strings[i + QNAME] = null;
- _strings[i + TYPE] = type;
- _strings[i + VALUE] = value;
-
- _attributeCount++;
- }
-
- private void resize(int length) {
- final int newLength = length * 2;
- final String[] strings = new String[newLength];
- System.arraycopy(_strings, 0, strings, 0, length);
- _strings = strings;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.java
deleted file mode 100644
index 60c05162..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.stream.buffer;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-import java.util.WeakHashMap;
-
-/**
- * Simple utility ensuring that the value is cached only in case it is non-internal implementation
- */
-abstract class ContextClassloaderLocal<V> {
-
- private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
-
- private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<ClassLoader, V>();
-
- public V get() throws Error {
- ClassLoader tccl = getContextClassLoader();
- V instance = CACHE.get(tccl);
- if (instance == null) {
- instance = createNewInstance();
- CACHE.put(tccl, instance);
- }
- return instance;
- }
-
- public void set(V instance) {
- CACHE.put(getContextClassLoader(), instance);
- }
-
- protected abstract V initialValue() throws Exception;
-
- private V createNewInstance() {
- try {
- return initialValue();
- } catch (Exception e) {
- throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e);
- }
- }
-
- private static String format(String property, Object... args) {
- String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property);
- return MessageFormat.format(text, args);
- }
-
- private static ClassLoader getContextClassLoader() {
- return (ClassLoader)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- ClassLoader cl = null;
- try {
- cl = Thread.currentThread().getContextClassLoader();
- } catch (SecurityException ex) {
- }
- return cl;
- }
- });
- }
-}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.properties b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.properties
deleted file mode 100644
index 1a8fc17a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/ContextClassloaderLocal.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-# Error messages for ContextClassloaderLocal utility class
-FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/FragmentedArray.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/FragmentedArray.java
deleted file mode 100644
index 62ee0926..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/FragmentedArray.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer;
-
-final class FragmentedArray<T> {
- private T _item;
- private FragmentedArray<T> _next;
- private FragmentedArray<T> _previous;
-
- FragmentedArray(T item) {
- this(item, null);
- }
-
- FragmentedArray(T item, FragmentedArray<T> previous) {
- setArray(item);
- if (previous != null) {
- previous._next = this;
- _previous = previous;
- }
- }
-
- T getArray() {
- return _item;
- }
-
- void setArray(T item) {
- assert(item.getClass().isArray());
-
- _item = item;
- }
-
- FragmentedArray<T> getNext() {
- return _next;
- }
-
- void setNext(FragmentedArray<T> next) {
- _next = next;
- if (next != null) {
- next._previous = this;
- }
- }
-
- FragmentedArray<T> getPrevious() {
- return _previous;
- }
-
- void setPrevious(FragmentedArray<T> previous) {
- _previous = previous;
- if (previous != null) {
- previous._next = this;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/MutableXMLStreamBuffer.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/MutableXMLStreamBuffer.java
deleted file mode 100644
index 24a2a991..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/MutableXMLStreamBuffer.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer;
-
-import com.sun.xml.internal.stream.buffer.sax.Properties;
-import com.sun.xml.internal.stream.buffer.sax.SAXBufferCreator;
-import com.sun.xml.internal.stream.buffer.stax.StreamReaderBufferCreator;
-import com.sun.xml.internal.stream.buffer.stax.StreamWriterBufferCreator;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- *
- * A mutable stream-based buffer of an XML infoset.
- *
- * <p>
- * A MutableXMLStreamBuffer is created using specific SAX and StAX-based
- * creators. Utility methods on MutableXMLStreamBuffer are provided for
- * such functionality that utilize SAX and StAX-based creators.
- *
- * <p>
- * Once instantiated the same instance of a MutableXMLStreamBuffer may be reused for
- * creation to reduce the amount of Objects instantiated and garbage
- * collected that are required for internally representing an XML infoset.
- *
- * <p>
- * A MutableXMLStreamBuffer is not designed to be created and processed
- * concurrently. If done so unspecified behaviour may occur.
- */
-public class MutableXMLStreamBuffer extends XMLStreamBuffer {
- /**
- * The default array size for the arrays used in internal representation
- * of the XML infoset.
- */
- public static final int DEFAULT_ARRAY_SIZE = 512;
-
- /**
- * Create a new MutableXMLStreamBuffer using the
- * {@link MutableXMLStreamBuffer#DEFAULT_ARRAY_SIZE}.
- */
- public MutableXMLStreamBuffer() {
- this(DEFAULT_ARRAY_SIZE);
- }
-
- /**
- * Set the system identifier for this buffer.
- * @param systemId The system identifier.
- */
- public void setSystemId(String systemId) {
- this.systemId = systemId;
- }
-
- /**
- * Create a new MutableXMLStreamBuffer.
- *
- * @param size
- * The size of the arrays used in the internal representation
- * of the XML infoset.
- * @throws NegativeArraySizeException
- * If the <code>size</code> argument is less than <code>0</code>.
- */
- public MutableXMLStreamBuffer(int size) {
- _structure = new FragmentedArray<byte[]>(new byte[size]);
- _structureStrings = new FragmentedArray<String[]>(new String[size]);
- _contentCharactersBuffer = new FragmentedArray<char[]>(new char[4096]);
- _contentObjects = new FragmentedArray<Object[]>(new Object[size]);
-
- // Set the first element of structure array to indicate an empty buffer
- // that has not been created
- _structure.getArray()[0] = (byte) AbstractCreatorProcessor.T_END;
- }
-
- /**
- * Create contents of a buffer from a XMLStreamReader.
- *
- * <p>
- * The MutableXMLStreamBuffer is reset (see {@link #reset}) before creation.
- *
- * <p>
- * The MutableXMLStreamBuffer is created by consuming the events on the XMLStreamReader using
- * an instance of {@link StreamReaderBufferCreator}.
- *
- * @param reader
- * A XMLStreamReader to read from to create.
- */
- public void createFromXMLStreamReader(XMLStreamReader reader) throws XMLStreamException {
- reset();
- StreamReaderBufferCreator c = new StreamReaderBufferCreator(this);
- c.create(reader);
- }
-
- /**
- * Create contents of a buffer from a XMLStreamWriter.
- *
- * <p>
- * The MutableXMLStreamBuffer is reset (see {@link #reset}) before creation.
- *
- * <p>
- * The MutableXMLStreamBuffer is created by consuming events on a XMLStreamWriter using
- * an instance of {@link StreamWriterBufferCreator}.
- */
- public XMLStreamWriter createFromXMLStreamWriter() {
- reset();
- return new StreamWriterBufferCreator(this);
- }
-
- /**
- * Create contents of a buffer from a {@link SAXBufferCreator}.
- *
- * <p>
- * The MutableXMLStreamBuffer is reset (see {@link #reset}) before creation.
- *
- * <p>
- * The MutableXMLStreamBuffer is created by consuming events from a {@link ContentHandler} using
- * an instance of {@link SAXBufferCreator}.
- *
- * @return The {@link SAXBufferCreator} to create from.
- */
- public SAXBufferCreator createFromSAXBufferCreator() {
- reset();
- SAXBufferCreator c = new SAXBufferCreator();
- c.setBuffer(this);
- return c;
- }
-
- /**
- * Create contents of a buffer from a {@link XMLReader} and {@link InputStream}.
- *
- * <p>
- * The MutableXMLStreamBuffer is reset (see {@link #reset}) before creation.
- *
- * <p>
- * The MutableXMLStreamBuffer is created by using an instance of {@link SAXBufferCreator}
- * and registering associated handlers on the {@link XMLReader}.
- *
- * @param reader
- * The {@link XMLReader} to use for parsing.
- * @param in
- * The {@link InputStream} to be parsed.
- */
- public void createFromXMLReader(XMLReader reader, InputStream in) throws SAXException, IOException {
- createFromXMLReader(reader, in, null);
- }
-
- /**
- * Create contents of a buffer from a {@link XMLReader} and {@link InputStream}.
- *
- * <p>
- * The MutableXMLStreamBuffer is reset (see {@link #reset}) before creation.
- *
- * <p>
- * The MutableXMLStreamBuffer is created by using an instance of {@link SAXBufferCreator}
- * and registering associated handlers on the {@link XMLReader}.
- *
- * @param reader
- * The {@link XMLReader} to use for parsing.
- * @param in
- * The {@link InputStream} to be parsed.
- * @param systemId
- * The system ID of the input stream.
- */
- public void createFromXMLReader(XMLReader reader, InputStream in, String systemId) throws SAXException, IOException {
- reset();
- SAXBufferCreator c = new SAXBufferCreator(this);
-
- reader.setContentHandler(c);
- reader.setDTDHandler(c);
- reader.setProperty(Properties.LEXICAL_HANDLER_PROPERTY, c);
-
- c.create(reader, in, systemId);
- }
-
- /**
- * Reset the MutableXMLStreamBuffer.
- *
- * <p>
- * This method will reset the MutableXMLStreamBuffer to a state of being "uncreated"
- * similar to the state of a newly instantiated MutableXMLStreamBuffer.
- *
- * <p>
- * As many Objects as possible will be retained for reuse in future creation.
- */
- public void reset() {
- // Reset the ptrs in arrays to 0
- _structurePtr =
- _structureStringsPtr =
- _contentCharactersBufferPtr =
- _contentObjectsPtr = 0;
-
- // Set the first element of structure array to indicate an empty buffer
- // that has not been created
- _structure.getArray()[0] = (byte)AbstractCreatorProcessor.T_END;
-
- // Clean up content objects
- _contentObjects.setNext(null);
- final Object[] o = _contentObjects.getArray();
- for (int i = 0; i < o.length; i++) {
- if (o[i] != null) {
- o[i] = null;
- } else {
- break;
- }
- }
-
- treeCount = 0;
-
- /*
- * TODO consider truncating the size of _structureStrings and
- * _contentCharactersBuffer to limit the memory used by the buffer
- */
- }
-
-
- protected void setHasInternedStrings(boolean hasInternedStrings) {
- _hasInternedStrings = hasInternedStrings;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBuffer.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBuffer.java
deleted file mode 100644
index 85166778..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBuffer.java
+++ /dev/null
@@ -1,479 +0,0 @@
-/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.stream.buffer;
-
-import com.sun.xml.internal.stream.buffer.sax.SAXBufferProcessor;
-import com.sun.xml.internal.stream.buffer.stax.StreamReaderBufferProcessor;
-import com.sun.xml.internal.stream.buffer.stax.StreamWriterBufferProcessor;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.Map;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.dom.DOMResult;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.ext.LexicalHandler;
-import org.w3c.dom.Node;
-
-/**
- * An immutable stream-based buffer of an XML infoset.
- *
- * <p>
- * A XMLStreamBuffer is an abstract class. It is immutable with
- * respect to the methods on the class, which are non-modifying in terms
- * of state.
- *
- * <p>
- * A XMLStreamBuffer can be processed using specific SAX and StAX-based
- * processors. Utility methods on XMLStreamBuffer are provided for
- * such functionality that utilize SAX and StAX-based processors.
- * The same instance of a XMLStreamBuffer may be processed
- * multiple times and concurrently by more than one processor.
- *
- * <p>
- * There are two concrete implementations of XMLStreamBuffer.
- * The first, {@link MutableXMLStreamBuffer}, can be instantiated for the creation
- * of a buffer using SAX and StAX-based creators, and from which may be
- * processed as an XMLStreamBuffer. The second,
- * {@link XMLStreamBufferMark}, can be instantiated to mark into an existing
- * buffer that is being created or processed. This allows a subtree of
- * {@link XMLStreamBuffer} to be treated as its own {@link XMLStreamBuffer}.
- *
- * <p>
- * A XMLStreamBuffer can represent a complete XML infoset or a subtree
- * of an XML infoset. It is also capable of representing a "forest",
- * where the buffer represents multiple adjacent XML elements, although
- * in this mode there are restrictions about how you can consume such
- * forest, because not all XML APIs handle forests very well.
- */
-public abstract class XMLStreamBuffer {
-
- /**
- * In scope namespaces on a fragment
- */
- protected Map<String,String> _inscopeNamespaces = Collections.emptyMap();
-
- /**
- * True if the buffer was created from a parser that interns Strings
- * as specified by the SAX interning features
- */
- protected boolean _hasInternedStrings;
-
- /**
- * Fragmented array to hold structural information
- */
- protected FragmentedArray<byte[]> _structure;
- protected int _structurePtr;
-
- /**
- * Fragmented array to hold structural information as strings
- */
- protected FragmentedArray<String[]> _structureStrings;
- protected int _structureStringsPtr;
-
- /**
- * Fragmented array to hold content information in a shared char[]
- */
- protected FragmentedArray<char[]> _contentCharactersBuffer;
- protected int _contentCharactersBufferPtr;
-
- /**
- * Fragmented array to hold content information as objects
- */
- protected FragmentedArray<Object[]> _contentObjects;
- protected int _contentObjectsPtr;
-
- /**
- * Number of trees in this stream buffer.
- *
- * <p>
- * 1 if there's only one, which is the normal case. When the buffer
- * holds a forest, this value is greater than 1. If the buffer is empty, then 0.
- *
- * <p>
- * Notice that we cannot infer this value by looking at the {@link FragmentedArray}s,
- * because this {@link XMLStreamBuffer} maybe a view of a portion of another bigger
- * {@link XMLStreamBuffer}.
- */
- protected int treeCount;
-
- /**
- * The system identifier associated with the buffer
- */
- protected String systemId;
-
- /**
- * Is the buffer created by creator.
- *
- * @return
- * <code>true</code> if the buffer has been created.
- */
- public final boolean isCreated() {
- return _structure.getArray()[0] != AbstractCreatorProcessor.T_END;
- }
-
- /**
- * Is the buffer a representation of a fragment of an XML infoset.
- *
- * @return
- * <code>true</code> if the buffer is a representation of a fragment
- * of an XML infoset.
- */
- public final boolean isFragment() {
- return (isCreated() && (_structure.getArray()[_structurePtr] & AbstractCreatorProcessor.TYPE_MASK)
- != AbstractCreatorProcessor.T_DOCUMENT);
- }
-
- /**
- * Is the buffer a representation of a fragment of an XML infoset
- * that is an element (and its contents).
- *
- * @return
- * <code>true</code> if the buffer a representation
- * of a fragment of an XML infoset that is an element (and its contents).
- */
- public final boolean isElementFragment() {
- return (isCreated() && (_structure.getArray()[_structurePtr] & AbstractCreatorProcessor.TYPE_MASK)
- == AbstractCreatorProcessor.T_ELEMENT);
- }
-
- /**
- * Returns ture if this buffer represents a forest, which is
- * are more than one adjacent XML elements.
- */
- public final boolean isForest() {
- return isCreated() && treeCount>1;
- }
-
- /**
- * Get the system identifier associated with the buffer.
- * @return The system identifier.
- */
- public final String getSystemId() {
- return systemId;
- }
-
- /**
- * Get the in-scope namespaces.
- *
- * <p>
- *
- * The in-scope namespaces will be empty if the buffer is not a
- * fragment ({@link #isFragment} returns <code>false</code>).
- *
- * The in-scope namespace will correspond to the in-scope namespaces of the
- * fragment if the buffer is a fragment ({@link #isFragment}
- * returns <code>false</code>). The in-scope namespaces will include any
- * namespace delcarations on an element if the fragment correspond to that
- * of an element ({@link #isElementFragment} returns <code>false</code>).
- *
- * @return
- * The in-scope namespaces of the XMLStreamBuffer.
- * Prefix to namespace URI.
- */
- public final Map<String,String> getInscopeNamespaces() {
- return _inscopeNamespaces;
- }
-
- /**
- * Has the buffer been created using Strings that have been interned
- * for certain properties of information items. The Strings that are interned
- * are those that correspond to Strings that are specified by the SAX API
- * "string-interning" property
- * (see <a href="http://java.sun.com/j2se/1.5.0/docs/api/org/xml/sax/package-summary.html#package_description">here</a>).
- *
- * <p>
- * An buffer may have been created, for example, from an XML document parsed
- * using the Xerces SAX parser. The Xerces SAX parser will have interned certain Strings
- * according to the SAX string interning property.
- * This method enables processors to avoid the duplication of
- * String interning if such a feature is required by a procesing application and the
- * buffer being processed was created using Strings that have been interned.
- *
- * @return
- * <code>true</code> if the buffer has been created using Strings that
- * have been interned.
- */
- public final boolean hasInternedStrings() {
- return _hasInternedStrings;
- }
-
- /**
- * Read the contents of the buffer as a {@link XMLStreamReader}.
- *
- * @return
- * A an instance of a {@link StreamReaderBufferProcessor}. Always non-null.
- */
- public final StreamReaderBufferProcessor readAsXMLStreamReader() throws XMLStreamException {
- return new StreamReaderBufferProcessor(this);
- }
-
- /**
- * Write the contents of the buffer to an XMLStreamWriter.
- *
- * <p>
- * The XMLStreamBuffer will be written out to the XMLStreamWriter using
- * an instance of {@link StreamWriterBufferProcessor}.
- *
- * @param writer
- * A XMLStreamWriter to write to.
- * @param writeAsFragment
- * If true, {@link XMLStreamWriter} will not receive {@link XMLStreamWriter#writeStartDocument()}
- * nor {@link XMLStreamWriter#writeEndDocument()}. This is desirable behavior when
- * you are writing the contents of a buffer into a bigger document.
- */
- public final void writeToXMLStreamWriter(XMLStreamWriter writer, boolean writeAsFragment) throws XMLStreamException {
- StreamWriterBufferProcessor p = new StreamWriterBufferProcessor(this,writeAsFragment);
- p.process(writer);
- }
-
- /**
- * @deprecated
- * Use {@link #writeToXMLStreamWriter(XMLStreamWriter, boolean)}
- */
- public final void writeToXMLStreamWriter(XMLStreamWriter writer) throws XMLStreamException {
- writeToXMLStreamWriter(writer, this.isFragment());
- }
-
- /**
- * Reads the contents of the buffer from a {@link XMLReader}.
- *
- * @return
- * A an instance of a {@link SAXBufferProcessor}.
- * @deprecated
- * Use {@link #readAsXMLReader(boolean)}
- */
- public final SAXBufferProcessor readAsXMLReader() {
- return new SAXBufferProcessor(this,isFragment());
- }
-
- /**
- * Reads the contents of the buffer from a {@link XMLReader}.
- *
- * @param produceFragmentEvent
- * True to generate fragment SAX events without start/endDocument.
- * False to generate a full document SAX events.
- * @return
- * A an instance of a {@link SAXBufferProcessor}.
- */
- public final SAXBufferProcessor readAsXMLReader(boolean produceFragmentEvent) {
- return new SAXBufferProcessor(this,produceFragmentEvent);
- }
-
- /**
- * Write the contents of the buffer to a {@link ContentHandler}.
- *
- * <p>
- * If the <code>handler</code> is also an instance of other SAX-based
- * handlers, such as {@link LexicalHandler}, than corresponding SAX events
- * will be reported to those handlers.
- *
- * @param handler
- * The ContentHandler to receive SAX events.
- * @param produceFragmentEvent
- * True to generate fragment SAX events without start/endDocument.
- * False to generate a full document SAX events.
- *
- * @throws SAXException
- * if a parsing fails, or if {@link ContentHandler} throws a {@link SAXException}.
- */
- public final void writeTo(ContentHandler handler, boolean produceFragmentEvent) throws SAXException {
- SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
- p.setContentHandler(handler);
- if (p instanceof LexicalHandler) {
- p.setLexicalHandler((LexicalHandler)handler);
- }
- if (p instanceof DTDHandler) {
- p.setDTDHandler((DTDHandler)handler);
- }
- if (p instanceof ErrorHandler) {
- p.setErrorHandler((ErrorHandler)handler);
- }
- p.process();
- }
-
- /**
- * @deprecated
- * Use {@link #writeTo(ContentHandler,boolean)}
- */
- public final void writeTo(ContentHandler handler) throws SAXException {
- writeTo(handler,isFragment());
- }
-
- /**
- * Write the contents of the buffer to a {@link ContentHandler} with errors
- * report to a {@link ErrorHandler}.
- *
- * <p>
- * If the <code>handler</code> is also an instance of other SAX-based
- * handlers, such as {@link LexicalHandler}, than corresponding SAX events
- * will be reported to those handlers.
- *
- * @param handler
- * The ContentHandler to receive SAX events.
- * @param errorHandler
- * The ErrorHandler to receive error events.
- *
- * @throws SAXException
- * if a parsing fails and {@link ErrorHandler} throws a {@link SAXException},
- * or if {@link ContentHandler} throws a {@link SAXException}.
- */
- public final void writeTo(ContentHandler handler, ErrorHandler errorHandler, boolean produceFragmentEvent) throws SAXException {
- SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
- p.setContentHandler(handler);
- if (p instanceof LexicalHandler) {
- p.setLexicalHandler((LexicalHandler)handler);
- }
- if (p instanceof DTDHandler) {
- p.setDTDHandler((DTDHandler)handler);
- }
-
- p.setErrorHandler(errorHandler);
-
- p.process();
- }
-
- public final void writeTo(ContentHandler handler, ErrorHandler errorHandler) throws SAXException {
- writeTo(handler, errorHandler, isFragment());
- }
-
- private static final ContextClassloaderLocal<TransformerFactory> trnsformerFactory = new ContextClassloaderLocal<TransformerFactory>() {
- @Override
- protected TransformerFactory initialValue() throws Exception {
- return TransformerFactory.newInstance();
- }
- };
-
- /**
- * Writes out the contents of this buffer as DOM node and append that to the given node.
- *
- * Faster implementation would be desirable.
- *
- * @return
- * The newly added child node.
- */
- public final Node writeTo(Node n) throws XMLStreamBufferException {
- try {
- Transformer t = trnsformerFactory.get().newTransformer();
- t.transform(new XMLStreamBufferSource(this), new DOMResult(n));
- return n.getLastChild();
- } catch (TransformerException e) {
- throw new XMLStreamBufferException(e);
- }
- }
-
- /**
- * Create a new buffer from a XMLStreamReader.
- *
- * @param reader
- * A XMLStreamReader to read from to create.
- * @return XMLStreamBuffer the created buffer
- * @see MutableXMLStreamBuffer#createFromXMLStreamReader(XMLStreamReader)
- */
- public static XMLStreamBuffer createNewBufferFromXMLStreamReader(XMLStreamReader reader)
- throws XMLStreamException {
- MutableXMLStreamBuffer b = new MutableXMLStreamBuffer();
- b.createFromXMLStreamReader(reader);
- return b;
- }
-
- /**
- * Create a new buffer from a {@link XMLReader} and {@link InputStream}.
- *
- * @param reader
- * The {@link XMLReader} to use for parsing.
- * @param in
- * The {@link InputStream} to be parsed.
- * @return XMLStreamBuffer the created buffer
- * @see MutableXMLStreamBuffer#createFromXMLReader(XMLReader, InputStream)
- */
- public static XMLStreamBuffer createNewBufferFromXMLReader(XMLReader reader, InputStream in) throws SAXException, IOException {
- MutableXMLStreamBuffer b = new MutableXMLStreamBuffer();
- b.createFromXMLReader(reader, in);
- return b;
- }
-
- /**
- * Create a new buffer from a {@link XMLReader} and {@link InputStream}.
- *
- * @param reader
- * The {@link XMLReader} to use for parsing.
- * @param in
- * The {@link InputStream} to be parsed.
- * @param systemId
- * The system ID of the input stream.
- * @return XMLStreamBuffer the created buffer
- * @see MutableXMLStreamBuffer#createFromXMLReader(XMLReader, InputStream, String)
- */
- public static XMLStreamBuffer createNewBufferFromXMLReader(XMLReader reader, InputStream in,
- String systemId) throws SAXException, IOException {
- MutableXMLStreamBuffer b = new MutableXMLStreamBuffer();
- b.createFromXMLReader(reader, in, systemId);
- return b;
- }
-
- protected final FragmentedArray<byte[]> getStructure() {
- return _structure;
- }
-
- protected final int getStructurePtr() {
- return _structurePtr;
- }
-
- protected final FragmentedArray<String[]> getStructureStrings() {
- return _structureStrings;
- }
-
- protected final int getStructureStringsPtr() {
- return _structureStringsPtr;
- }
-
- protected final FragmentedArray<char[]> getContentCharactersBuffer() {
- return _contentCharactersBuffer;
- }
-
- protected final int getContentCharactersBufferPtr() {
- return _contentCharactersBufferPtr;
- }
-
- protected final FragmentedArray<Object[]> getContentObjects() {
- return _contentObjects;
- }
-
- protected final int getContentObjectsPtr() {
- return _contentObjectsPtr;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferException.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferException.java
deleted file mode 100644
index d877ba3d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferException.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer;
-
-public class XMLStreamBufferException extends Exception {
-
- public XMLStreamBufferException(String message) {
- super(message);
- }
-
- public XMLStreamBufferException(String message, Exception e) {
- super(message, e);
- }
-
- public XMLStreamBufferException(Exception e) {
- super(e);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferMark.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferMark.java
deleted file mode 100644
index 497458ce..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferMark.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer;
-
-import java.util.Map;
-
-/**
- * A mark into a buffer.
- *
- * <p>
- * A mark can be processed in the same manner as a XMLStreamBuffer.
- *
- * <p>
- * A mark will share a sub set of information of the buffer that is
- * marked. If the buffer is directly or indirectly associated with a
- * (mutable) {@link XMLStreamBuffer} which is reset and/or re-created
- * then this will invalidate the mark and processing behvaiour of the mark
- * is undefined. It is the responsibility of the application to manage the
- * relationship between the marked XMLStreamBuffer and one or more marks.
- */
-public class XMLStreamBufferMark extends XMLStreamBuffer {
-
- /**
- * Create a mark from the buffer that is being created.
- *
- * <p>
- * A mark will be created from the current position of creation of the
- * {@link XMLStreamBuffer} that is being created by a {@link AbstractCreator}.
- *
- * @param inscopeNamespaces
- * The in-scope namespaces on the fragment of XML infoset that is
- * to be marked.
- *
- * @param src
- * The {@link AbstractCreator} or {@link AbstractProcessor} from which the current
- * position of creation of the XMLStreamBuffer will be taken as the mark.
- */
- public XMLStreamBufferMark(Map<String,String> inscopeNamespaces, AbstractCreatorProcessor src) {
- if(inscopeNamespaces != null) {
- _inscopeNamespaces = inscopeNamespaces;
- }
-
- _structure = src._currentStructureFragment;
- _structurePtr = src._structurePtr;
-
- _structureStrings = src._currentStructureStringFragment;
- _structureStringsPtr = src._structureStringsPtr;
-
- _contentCharactersBuffer = src._currentContentCharactersBufferFragment;
- _contentCharactersBufferPtr = src._contentCharactersBufferPtr;
-
- _contentObjects = src._currentContentObjectFragment;
- _contentObjectsPtr = src._contentObjectsPtr;
- treeCount = 1; // TODO: define a way to create a mark over a forest
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferResult.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferResult.java
deleted file mode 100644
index 96870b26..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferResult.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer;
-
-import com.sun.xml.internal.stream.buffer.sax.SAXBufferCreator;
-import javax.xml.transform.sax.SAXResult;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ext.LexicalHandler;
-
-/**
- * A JAXP Result implementation that supports the serialization to an
- * {@link MutableXMLStreamBuffer} for use by applications that expect a Result.
- *
- * <p>
- * Reuse of a XMLStreamBufferResult more than once will require that the
- * MutableXMLStreamBuffer is reset by called
- * {@link #.getXMLStreamBuffer()}.reset(), or by calling
- * {@link #.setXMLStreamBuffer()} with a new instance of
- * {@link MutableXMLStreamBuffer}.
- *
- * <p>
- * The derivation of XMLStreamBufferResult from SAXResult is an implementation
- * detail.
- *
- * <p>General applications shall not call the following methods:
- * <ul>
- * <li>setHandler</li>
- * <li>setLexicalHandler</li>
- * <li>setSystemId</li>
- * </ul>
- */
-public class XMLStreamBufferResult extends SAXResult {
- protected MutableXMLStreamBuffer _buffer;
- protected SAXBufferCreator _bufferCreator;
-
- /**
- * The default XMLStreamBufferResult constructor.
- *
- * <p>
- * A {@link MutableXMLStreamBuffer} is instantiated and used.
- */
- public XMLStreamBufferResult() {
- setXMLStreamBuffer(new MutableXMLStreamBuffer());
- }
-
- /**
- * XMLStreamBufferResult constructor.
- *
- * @param buffer the {@link MutableXMLStreamBuffer} to use.
- */
- public XMLStreamBufferResult(MutableXMLStreamBuffer buffer) {
- setXMLStreamBuffer(buffer);
- }
-
- /**
- * Get the {@link MutableXMLStreamBuffer} that is used.
- *
- * @return the {@link MutableXMLStreamBuffer}.
- */
- public MutableXMLStreamBuffer getXMLStreamBuffer() {
- return _buffer;
- }
-
- /**
- * Set the {@link MutableXMLStreamBuffer} to use.
- *
- * @param buffer the {@link MutableXMLStreamBuffer}.
- */
- public void setXMLStreamBuffer(MutableXMLStreamBuffer buffer) {
- if (buffer == null) {
- throw new NullPointerException("buffer cannot be null");
- }
- _buffer = buffer;
- setSystemId(_buffer.getSystemId());
-
- if (_bufferCreator != null) {
- _bufferCreator.setXMLStreamBuffer(_buffer);
- }
- }
-
- public ContentHandler getHandler() {
- if (_bufferCreator == null) {
- _bufferCreator = new SAXBufferCreator(_buffer);
- setHandler(_bufferCreator);
- } else if (super.getHandler() == null) {
- setHandler(_bufferCreator);
- }
-
- return _bufferCreator;
- }
-
- public LexicalHandler getLexicalHandler() {
- return (LexicalHandler) getHandler();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferSource.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferSource.java
deleted file mode 100644
index 4429b2f9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/XMLStreamBufferSource.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer;
-
-import com.sun.xml.internal.stream.buffer.sax.SAXBufferProcessor;
-import java.io.ByteArrayInputStream;
-import javax.xml.transform.sax.SAXSource;
-import org.xml.sax.InputSource;
-import org.xml.sax.XMLReader;
-
-/**
- * A JAXP Source implementation that supports the parsing
- * of {@link XMLStreamBuffer} for use by applications that expect a Source.
- *
- * <p>
- * The derivation of XMLStreamBufferSource from SAXSource is an implementation
- * detail.
- *
- * <p>Applications shall obey the following restrictions:
- * <ul>
- * <li>The setXMLReader and setInputSource shall not be called.</li>
- * <li>The XMLReader object obtained by the getXMLReader method shall
- * be used only for parsing the InputSource object returned by
- * the getInputSource method.</li>
- * <li>The InputSource object obtained by the getInputSource method shall
- * be used only for being parsed by the XMLReader object returned by
- * the getXMLReader method.</li>
- * </ul>
- */
-public class XMLStreamBufferSource extends SAXSource {
- protected XMLStreamBuffer _buffer;
- protected SAXBufferProcessor _bufferProcessor;
-
- /**
- * XMLStreamBufferSource constructor.
- *
- * @param buffer the {@link XMLStreamBuffer} to use.
- */
- public XMLStreamBufferSource(XMLStreamBuffer buffer) {
- super(new InputSource(
- new ByteArrayInputStream(new byte[0])));
- setXMLStreamBuffer(buffer);
- }
-
- /**
- * Get the {@link XMLStreamBuffer} that is used.
- *
- * @return the {@link XMLStreamBuffer}.
- */
- public XMLStreamBuffer getXMLStreamBuffer() {
- return _buffer;
- }
-
- /**
- * Set the {@link XMLStreamBuffer} to use.
- *
- * @param buffer the {@link XMLStreamBuffer}.
- */
- public void setXMLStreamBuffer(XMLStreamBuffer buffer) {
- if (buffer == null) {
- throw new NullPointerException("buffer cannot be null");
- }
- _buffer = buffer;
-
- if (_bufferProcessor != null) {
- _bufferProcessor.setBuffer(_buffer,false);
- }
- }
-
- public XMLReader getXMLReader() {
- if (_bufferProcessor == null) {
- _bufferProcessor = new SAXBufferProcessor(_buffer,false);
- setXMLReader(_bufferProcessor);
- } else if (super.getXMLReader() == null) {
- setXMLReader(_bufferProcessor);
- }
-
- return _bufferProcessor;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/DefaultWithLexicalHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/DefaultWithLexicalHandler.java
deleted file mode 100644
index 66c81a8c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/DefaultWithLexicalHandler.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer.sax;
-
-import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.DefaultHandler;
-
-public class DefaultWithLexicalHandler extends DefaultHandler implements LexicalHandler {
-
- public void comment(char[] ch, int start, int length) throws SAXException { }
-
- public void startDTD(String name, String publicId, String systemId) throws SAXException { }
-
- public void endDTD() throws SAXException { }
-
- public void startEntity(String name) throws SAXException { }
-
- public void endEntity(String name) throws SAXException { }
-
- public void startCDATA() throws SAXException { }
-
- public void endCDATA() throws SAXException { }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/Features.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/Features.java
deleted file mode 100644
index 3fec5ebd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/Features.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer.sax;
-
-public class Features {
- public static final String NAMESPACES_FEATURE =
- "http://xml.org/sax/features/namespaces";
- public static final String NAMESPACE_PREFIXES_FEATURE =
- "http://xml.org/sax/features/namespace-prefixes";
- public static final String EXTERNAL_GENERAL_ENTITIES =
- "http://xml.org/sax/features/external-general-entities";
- public static final String EXTERNAL_PARAMETER_ENTITIES =
- "http://xml.org/sax/features/external-parameter-entities";
- public static final String STRING_INTERNING_FEATURE =
- "http://xml.org/sax/features/string-interning";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/Properties.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/Properties.java
deleted file mode 100644
index 43c5b117..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/Properties.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer.sax;
-
-public class Properties {
- public static final String LEXICAL_HANDLER_PROPERTY =
- "http://xml.org/sax/properties/lexical-handler";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/SAXBufferCreator.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/SAXBufferCreator.java
deleted file mode 100644
index 626b6f1f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/SAXBufferCreator.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer.sax;
-
-import com.sun.xml.internal.stream.buffer.AbstractCreator;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
-import java.io.IOException;
-import java.io.InputStream;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.ext.LexicalHandler;
-
-/**
- * Writes into {@link MutableXMLStreamBuffer} from SAX.
- *
- * TODO
- * Implement the marking the stream on the element when an ID
- * attribute on the element is defined
- */
-public class SAXBufferCreator extends AbstractCreator
- implements EntityResolver, DTDHandler, ContentHandler, ErrorHandler, LexicalHandler {
- protected String[] _namespaceAttributes;
-
- protected int _namespaceAttributesPtr;
-
- private int depth = 0;
-
- public SAXBufferCreator() {
- _namespaceAttributes = new String[16 * 2];
- }
-
- public SAXBufferCreator(MutableXMLStreamBuffer buffer) {
- this();
- setBuffer(buffer);
- }
-
- public MutableXMLStreamBuffer create(XMLReader reader, InputStream in) throws IOException, SAXException {
- return create(reader, in, null);
- }
-
- public MutableXMLStreamBuffer create(XMLReader reader, InputStream in, String systemId) throws IOException, SAXException {
- if (_buffer == null) {
- createBuffer();
- }
- _buffer.setSystemId(systemId);
- reader.setContentHandler(this);
- reader.setProperty(Properties.LEXICAL_HANDLER_PROPERTY, this);
-
- try {
- setHasInternedStrings(reader.getFeature(Features.STRING_INTERNING_FEATURE));
- } catch (SAXException e) {
- }
-
-
- if (systemId != null) {
- InputSource s = new InputSource(systemId);
- s.setByteStream(in);
- reader.parse(s);
- } else {
- reader.parse(new InputSource(in));
- }
-
- return getXMLStreamBuffer();
- }
-
- public void reset() {
- _buffer = null;
- _namespaceAttributesPtr = 0;
- depth=0;
- }
-
- public void startDocument() throws SAXException {
- storeStructure(T_DOCUMENT);
- }
-
- public void endDocument() throws SAXException {
- storeStructure(T_END);
- }
-
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
- cacheNamespaceAttribute(prefix, uri);
- }
-
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- storeQualifiedName(T_ELEMENT_LN,
- uri, localName, qName);
-
- // Has namespaces attributes
- if (_namespaceAttributesPtr > 0) {
- storeNamespaceAttributes();
- }
-
- // Has attributes
- if (attributes.getLength() > 0) {
- storeAttributes(attributes);
- }
- depth++;
- }
-
- public void endElement(String uri, String localName, String qName) throws SAXException {
- storeStructure(T_END);
- if(--depth==0)
- increaseTreeCount(); // one tree processed
- }
-
- public void characters(char ch[], int start, int length) throws SAXException {
- storeContentCharacters(T_TEXT_AS_CHAR_ARRAY, ch, start, length);
- }
-
- public void ignorableWhitespace(char ch[], int start, int length) throws SAXException {
- characters(ch, start, length);
- }
-
- public void processingInstruction(String target, String data) throws SAXException {
- storeStructure(T_PROCESSING_INSTRUCTION);
- storeStructureString(target);
- storeStructureString(data);
- }
-
- public void comment(char[] ch, int start, int length) throws SAXException {
- storeContentCharacters(T_COMMENT_AS_CHAR_ARRAY, ch, start, length);
- }
-
- //
-
- private void cacheNamespaceAttribute(String prefix, String uri) {
- _namespaceAttributes[_namespaceAttributesPtr++] = prefix;
- _namespaceAttributes[_namespaceAttributesPtr++] = uri;
-
- if (_namespaceAttributesPtr == _namespaceAttributes.length) {
- final String[] namespaceAttributes = new String[_namespaceAttributesPtr * 2];
- System.arraycopy(_namespaceAttributes, 0, namespaceAttributes, 0, _namespaceAttributesPtr);
- _namespaceAttributes = namespaceAttributes;
- }
- }
-
- private void storeNamespaceAttributes() {
- for (int i = 0; i < _namespaceAttributesPtr; i += 2) {
- int item = T_NAMESPACE_ATTRIBUTE;
- if (_namespaceAttributes[i].length() > 0) {
- item |= FLAG_PREFIX;
- storeStructureString(_namespaceAttributes[i]);
- }
- if (_namespaceAttributes[i + 1].length() > 0) {
- item |= FLAG_URI;
- storeStructureString(_namespaceAttributes[i + 1]);
- }
- storeStructure(item);
- }
- _namespaceAttributesPtr = 0;
- }
-
- private void storeAttributes(Attributes attributes) {
- for (int i = 0; i < attributes.getLength(); i++) {
- // Skip NS attributes. Some versions of JDK seem to send wrong local name
- // Also it is not stored correctly by the following.
- if (attributes.getQName(i).startsWith("xmlns"))
- continue;
- storeQualifiedName(T_ATTRIBUTE_LN,
- attributes.getURI(i),
- attributes.getLocalName(i),
- attributes.getQName(i));
-
- storeStructureString(attributes.getType(i));
- storeContentString(attributes.getValue(i));
- }
- }
-
- private void storeQualifiedName(int item, String uri, String localName, String qName) {
- if (uri.length() > 0) {
- item |= FLAG_URI;
- storeStructureString(uri);
- }
-
- storeStructureString(localName);
-
- if (qName.indexOf(':') >= 0) {
- item |= FLAG_QUALIFIED_NAME;
- storeStructureString(qName);
- }
-
- storeStructure(item);
- }
-
-
- // Empty methods for SAX handlers
-
- // Entity resolver handler
-
- public InputSource resolveEntity (String publicId, String systemId)
- throws IOException, SAXException
- {
- return null;
- }
-
- // DTD handler
-
- public void notationDecl (String name, String publicId, String systemId)
- throws SAXException
- { }
-
- public void unparsedEntityDecl (String name, String publicId,
- String systemId, String notationName)
- throws SAXException
- { }
-
- // Content handler
-
- public void setDocumentLocator (Locator locator) { }
-
- public void endPrefixMapping (String prefix) throws SAXException { }
-
- public void skippedEntity (String name) throws SAXException { }
-
- // Lexical handler
-
- public void startDTD(String name, String publicId, String systemId) throws SAXException { }
-
- public void endDTD() throws SAXException { }
-
- public void startEntity(String name) throws SAXException { }
-
- public void endEntity(String name) throws SAXException { }
-
- public void startCDATA() throws SAXException { }
-
- public void endCDATA() throws SAXException { }
-
- // Error handler
-
- public void warning(SAXParseException e) throws SAXException { }
-
- public void error(SAXParseException e) throws SAXException { }
-
- public void fatalError(SAXParseException e) throws SAXException
- {
- throw e;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/SAXBufferProcessor.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/SAXBufferProcessor.java
deleted file mode 100644
index 7f7f5724..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/SAXBufferProcessor.java
+++ /dev/null
@@ -1,727 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer.sax;
-
-import com.sun.xml.internal.stream.buffer.AbstractProcessor;
-import com.sun.xml.internal.stream.buffer.AttributesHolder;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.LocatorImpl;
-
-import javax.xml.XMLConstants;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * A processor of a {@link XMLStreamBuffer} that that reads the XML infoset as
- * {@link XMLReader}.
- */
-public class SAXBufferProcessor extends AbstractProcessor implements XMLReader {
- /**
- * Reference to entity resolver.
- */
- protected EntityResolver _entityResolver = DEFAULT_LEXICAL_HANDLER;
-
- /**
- * Reference to dtd handler.
- */
- protected DTDHandler _dtdHandler = DEFAULT_LEXICAL_HANDLER;
-
- /**
- * Reference to content handler.
- */
- protected ContentHandler _contentHandler = DEFAULT_LEXICAL_HANDLER;
-
- /**
- * Reference to error handler.
- */
- protected ErrorHandler _errorHandler = DEFAULT_LEXICAL_HANDLER;
-
- /**
- * Reference to lexical handler.
- */
- protected LexicalHandler _lexicalHandler = DEFAULT_LEXICAL_HANDLER;
-
- /**
- * SAX Namespace attributes features
- */
- protected boolean _namespacePrefixesFeature = false;
-
- protected AttributesHolder _attributes = new AttributesHolder();
-
- protected String[] _namespacePrefixes = new String[16];
- protected int _namespacePrefixesIndex;
-
- protected int[] _namespaceAttributesStartingStack = new int[16];
- protected int[] _namespaceAttributesStack = new int[16];
- protected int _namespaceAttributesStackIndex;
-
- public SAXBufferProcessor() {
- }
-
- /**
- * @deprecated
- * Use {@link #SAXBufferProcessor(XMLStreamBuffer, boolean)}
- */
- public SAXBufferProcessor(XMLStreamBuffer buffer) {
- setXMLStreamBuffer(buffer);
- }
-
- /**
- * @param produceFragmentEvent
- * True to generate fragment SAX events without start/endDocument.
- * False to generate a full document SAX events.
- */
- public SAXBufferProcessor(XMLStreamBuffer buffer, boolean produceFragmentEvent) {
- setXMLStreamBuffer(buffer,produceFragmentEvent);
- }
-
- public boolean getFeature(String name)
- throws SAXNotRecognizedException, SAXNotSupportedException {
- if (name.equals(Features.NAMESPACES_FEATURE)) {
- return true;
- } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
- return _namespacePrefixesFeature;
- } else if (name.equals(Features.EXTERNAL_GENERAL_ENTITIES)) {
- return true;
- } else if (name.equals(Features.EXTERNAL_PARAMETER_ENTITIES)) {
- return true;
- } else if (name.equals(Features.STRING_INTERNING_FEATURE)) {
- return _stringInterningFeature;
- } else {
- throw new SAXNotRecognizedException(
- "Feature not supported: " + name);
- }
- }
-
- public void setFeature(String name, boolean value)
- throws SAXNotRecognizedException, SAXNotSupportedException {
- if (name.equals(Features.NAMESPACES_FEATURE)) {
- if (!value) {
- throw new SAXNotSupportedException(name + ":" + value);
- }
- } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
- _namespacePrefixesFeature = value;
- } else if (name.equals(Features.EXTERNAL_GENERAL_ENTITIES)) {
- // ignore
- } else if (name.equals(Features.EXTERNAL_PARAMETER_ENTITIES)) {
- // ignore
- } else if (name.equals(Features.STRING_INTERNING_FEATURE)) {
- if (value != _stringInterningFeature) {
- throw new SAXNotSupportedException(name + ":" + value);
- }
- } else {
- throw new SAXNotRecognizedException(
- "Feature not supported: " + name);
- }
- }
-
- public Object getProperty(String name)
- throws SAXNotRecognizedException, SAXNotSupportedException {
- if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
- return getLexicalHandler();
- } else {
- throw new SAXNotRecognizedException("Property not recognized: " + name);
- }
- }
-
- public void setProperty(String name, Object value)
- throws SAXNotRecognizedException, SAXNotSupportedException {
- if (name.equals(Properties.LEXICAL_HANDLER_PROPERTY)) {
- if (value instanceof LexicalHandler) {
- setLexicalHandler((LexicalHandler)value);
- } else {
- throw new SAXNotSupportedException(Properties.LEXICAL_HANDLER_PROPERTY);
- }
- } else {
- throw new SAXNotRecognizedException("Property not recognized: " + name);
- }
- }
-
- public void setEntityResolver(EntityResolver resolver) {
- _entityResolver = resolver;
- }
-
- public EntityResolver getEntityResolver() {
- return _entityResolver;
- }
-
- public void setDTDHandler(DTDHandler handler) {
- _dtdHandler = handler;
- }
-
- public DTDHandler getDTDHandler() {
- return _dtdHandler;
- }
-
- public void setContentHandler(ContentHandler handler) {
- _contentHandler = handler;
- }
-
- public ContentHandler getContentHandler() {
- return _contentHandler;
- }
-
- public void setErrorHandler(ErrorHandler handler) {
- _errorHandler = handler;
- }
-
- public ErrorHandler getErrorHandler() {
- return _errorHandler;
- }
-
- public void setLexicalHandler(LexicalHandler handler) {
- _lexicalHandler = handler;
- }
-
- public LexicalHandler getLexicalHandler() {
- return _lexicalHandler;
- }
-
- public void parse(InputSource input) throws IOException, SAXException {
- // InputSource is ignored
- process();
- }
-
- public void parse(String systemId) throws IOException, SAXException {
- // systemId is ignored
- process();
- }
-
- /**
- * Short-hand for {@link #setXMLStreamBuffer(XMLStreamBuffer)} then {@link #process()}.
- *
- * @deprecated
- * Use {@link #process(XMLStreamBuffer, boolean)}
- */
- public final void process(XMLStreamBuffer buffer) throws SAXException {
- setXMLStreamBuffer(buffer);
- process();
- }
-
- /**
- * Short-hand for {@link #setXMLStreamBuffer(XMLStreamBuffer,boolean)} then {@link #process()}.
- *
- * @param produceFragmentEvent
- * True to generate fragment SAX events without start/endDocument.
- * False to generate a full document SAX events.
- */
- public final void process(XMLStreamBuffer buffer, boolean produceFragmentEvent) throws SAXException {
- setXMLStreamBuffer(buffer);
- process();
- }
-
- /**
- * Resets the parser to read from the beginning of the given {@link XMLStreamBuffer}.
- *
- * @deprecated
- * Use {@link #setXMLStreamBuffer(XMLStreamBuffer, boolean)}.
- */
- public void setXMLStreamBuffer(XMLStreamBuffer buffer) {
- setBuffer(buffer);
- }
-
- /**
- * Resets the parser to read from the beginning of the given {@link XMLStreamBuffer}.
- *
- * @param produceFragmentEvent
- * True to generate fragment SAX events without start/endDocument.
- * False to generate a full document SAX events.
- */
- public void setXMLStreamBuffer(XMLStreamBuffer buffer, boolean produceFragmentEvent) {
- if(!produceFragmentEvent && _treeCount>1)
- throw new IllegalStateException("Can't write a forest to a full XML infoset");
- setBuffer(buffer,produceFragmentEvent);
- }
-
- /**
- * Parse the sub-tree (or a whole document) that {@link XMLStreamBuffer}
- * points to, and sends events to handlers.
- *
- * <p>
- * TODO:
- * We probably need two modes for a sub-tree event generation. One for
- * firing a sub-tree as if it's a whole document (in which case start/endDocument
- * and appropriate additional namespace bindings are necessary), and the other
- * mode for firing a subtree as a subtree, like it does today.
- * A stream buffer SAX feature could be used to specify this.
- *
- * @throws SAXException
- * Follow the same semantics as {@link XMLReader#parse(InputSource)}.
- */
- public final void process() throws SAXException {
- if(!_fragmentMode) {
- LocatorImpl nullLocator = new LocatorImpl();
- nullLocator.setSystemId(_buffer.getSystemId());
- nullLocator.setLineNumber(-1);
- nullLocator.setColumnNumber(-1);
- _contentHandler.setDocumentLocator(nullLocator);
-
- _contentHandler.startDocument();
- // TODO: if we are writing a fragment stream buffer as a full XML document,
- // we need to declare in-scope namespaces as if they are on the root element.
- }
-
- while (_treeCount>0) {
- final int item = readEiiState();
- switch(item) {
- case STATE_DOCUMENT:
- processDocument();
- _treeCount--;
- break;
- case STATE_END:
- // Empty buffer
- return;
- case STATE_ELEMENT_U_LN_QN:
- processElement(readStructureString(), readStructureString(), readStructureString(), isInscope());
- _treeCount--;
- break;
- case STATE_ELEMENT_P_U_LN:
- {
- final String prefix = readStructureString();
- final String uri = readStructureString();
- final String localName = readStructureString();
- processElement(uri, localName, getQName(prefix, localName),isInscope());
- _treeCount--;
- break;
- }
- case STATE_ELEMENT_U_LN: {
- final String uri = readStructureString();
- final String localName = readStructureString();
- processElement(uri, localName, localName,isInscope());
- _treeCount--;
- break;
- }
- case STATE_ELEMENT_LN:
- {
- final String localName = readStructureString();
- processElement("", localName, localName,isInscope());
- _treeCount--;
- break;
- }
- case STATE_COMMENT_AS_CHAR_ARRAY_SMALL:
- processCommentAsCharArraySmall();
- break;
- case STATE_COMMENT_AS_CHAR_ARRAY_MEDIUM:
- processCommentAsCharArrayMedium();
- break;
- case STATE_COMMENT_AS_CHAR_ARRAY_COPY:
- processCommentAsCharArrayCopy();
- break;
- case STATE_COMMENT_AS_STRING:
- processComment(readContentString());
- break;
- case STATE_PROCESSING_INSTRUCTION:
- processProcessingInstruction(readStructureString(), readStructureString());
- break;
- default:
- throw reportFatalError("Illegal state for DIIs: "+item);
- }
- }
-
- if(!_fragmentMode)
- _contentHandler.endDocument();
- }
-
- private void processCommentAsCharArraySmall() throws SAXException {
- final int length = readStructure();
- final int start = readContentCharactersBuffer(length);
- processComment(_contentCharactersBuffer, start, length);
- }
-
- /**
- * Report a fatal error and abort.
- *
- * This is necessary to follow the SAX semantics of error handling.
- */
- private SAXParseException reportFatalError(String msg) throws SAXException {
- SAXParseException spe = new SAXParseException(msg, null);
- if(_errorHandler!=null)
- _errorHandler.fatalError(spe);
- return spe;
- }
-
- private boolean isInscope() {
- return _buffer.getInscopeNamespaces().size() > 0;
- }
-
- private void processDocument() throws SAXException {
- while(true) {
- int item = readEiiState();
- switch(item) {
- case STATE_ELEMENT_U_LN_QN:
- processElement(readStructureString(), readStructureString(), readStructureString(),isInscope());
- break;
- case STATE_ELEMENT_P_U_LN:
- {
- final String prefix = readStructureString();
- final String uri = readStructureString();
- final String localName = readStructureString();
- processElement(uri, localName, getQName(prefix, localName),isInscope());
- break;
- }
- case STATE_ELEMENT_U_LN: {
- final String uri = readStructureString();
- final String localName = readStructureString();
- processElement(uri, localName, localName,isInscope());
- break;
- }
- case STATE_ELEMENT_LN:
- {
- final String localName = readStructureString();
- processElement("", localName, localName,isInscope());
- break;
- }
- case STATE_COMMENT_AS_CHAR_ARRAY_SMALL:
- processCommentAsCharArraySmall();
- break;
- case STATE_COMMENT_AS_CHAR_ARRAY_MEDIUM:
- processCommentAsCharArrayMedium();
- break;
- case STATE_COMMENT_AS_CHAR_ARRAY_COPY:
- processCommentAsCharArrayCopy();
- break;
- case STATE_COMMENT_AS_STRING:
- processComment(readContentString());
- break;
- case STATE_PROCESSING_INSTRUCTION:
- processProcessingInstruction(readStructureString(), readStructureString());
- break;
- case STATE_END:
- return;
- default:
- throw reportFatalError("Illegal state for child of DII: "+item);
- }
- }
- }
-
- protected void processElement(String uri, String localName, String qName, boolean inscope) throws SAXException {
- boolean hasAttributes = false;
- boolean hasNamespaceAttributes = false;
- int item = peekStructure();
- Set<String> prefixSet = inscope ? new HashSet<String>() : Collections.<String>emptySet();
- if ((item & TYPE_MASK) == T_NAMESPACE_ATTRIBUTE) {
- cacheNamespacePrefixStartingIndex();
- hasNamespaceAttributes = true;
- item = processNamespaceAttributes(item, inscope, prefixSet);
- }
- if (inscope) {
- readInscopeNamespaces(prefixSet);
- }
-
- if ((item & TYPE_MASK) == T_ATTRIBUTE) {
- hasAttributes = true;
- processAttributes(item);
- }
-
- _contentHandler.startElement(uri, localName, qName, _attributes);
-
- if (hasAttributes) {
- _attributes.clear();
- }
-
- do {
- item = readEiiState();
- switch(item) {
- case STATE_ELEMENT_U_LN_QN:
- processElement(readStructureString(), readStructureString(), readStructureString(), false);
- break;
- case STATE_ELEMENT_P_U_LN:
- {
- final String p = readStructureString();
- final String u = readStructureString();
- final String ln = readStructureString();
- processElement(u, ln, getQName(p, ln),false);
- break;
- }
- case STATE_ELEMENT_U_LN: {
- final String u = readStructureString();
- final String ln = readStructureString();
- processElement(u, ln, ln,false);
- break;
- }
- case STATE_ELEMENT_LN: {
- final String ln = readStructureString();
- processElement("", ln, ln,false);
- break;
- }
- case STATE_TEXT_AS_CHAR_ARRAY_SMALL:
- {
- final int length = readStructure();
- int start = readContentCharactersBuffer(length);
- _contentHandler.characters(_contentCharactersBuffer, start, length);
- break;
- }
- case STATE_TEXT_AS_CHAR_ARRAY_MEDIUM:
- {
- final int length = readStructure16();
- int start = readContentCharactersBuffer(length);
- _contentHandler.characters(_contentCharactersBuffer, start, length);
- break;
- }
- case STATE_TEXT_AS_CHAR_ARRAY_COPY:
- {
- final char[] ch = readContentCharactersCopy();
-
- _contentHandler.characters(ch, 0, ch.length);
- break;
- }
- case STATE_TEXT_AS_STRING:
- {
- final String s = readContentString();
- _contentHandler.characters(s.toCharArray(), 0, s.length());
- break;
- }
- case STATE_TEXT_AS_OBJECT:
- {
- final CharSequence c = (CharSequence)readContentObject();
- final String s = c.toString();
- _contentHandler.characters(s.toCharArray(), 0, s.length());
- break;
- }
- case STATE_COMMENT_AS_CHAR_ARRAY_SMALL:
- processCommentAsCharArraySmall();
- break;
- case STATE_COMMENT_AS_CHAR_ARRAY_MEDIUM:
- processCommentAsCharArrayMedium();
- break;
- case STATE_COMMENT_AS_CHAR_ARRAY_COPY:
- processCommentAsCharArrayCopy();
- break;
- case T_COMMENT_AS_STRING:
- processComment(readContentString());
- break;
- case STATE_PROCESSING_INSTRUCTION:
- processProcessingInstruction(readStructureString(), readStructureString());
- break;
- case STATE_END:
- break;
- default:
- throw reportFatalError("Illegal state for child of EII: "+item);
- }
- } while(item != STATE_END);
-
- _contentHandler.endElement(uri, localName, qName);
-
- if (hasNamespaceAttributes) {
- processEndPrefixMapping();
- }
- }
-
- private void readInscopeNamespaces(Set<String> prefixSet) throws SAXException {
- for (Map.Entry<String, String> e : _buffer.getInscopeNamespaces().entrySet()) {
- String key = fixNull(e.getKey());
- // If the prefix is already written, do not write the prefix
- if (!prefixSet.contains(key)) {
- processNamespaceAttribute(key,e.getValue());
- }
- }
-
- }
-
- private static String fixNull(String s) {
- if (s == null) return "";
- else return s;
- }
- private void processCommentAsCharArrayCopy() throws SAXException {
- final char[] ch = readContentCharactersCopy();
- processComment(ch, 0, ch.length);
- }
-
- private void processCommentAsCharArrayMedium() throws SAXException {
- final int length = readStructure16();
- final int start = readContentCharactersBuffer(length);
- processComment(_contentCharactersBuffer, start, length);
- }
-
- private void processEndPrefixMapping() throws SAXException {
- final int end = _namespaceAttributesStack[--_namespaceAttributesStackIndex];
-// final int start = (_namespaceAttributesStackIndex > 0) ? _namespaceAttributesStack[_namespaceAttributesStackIndex] : 0;
- final int start = (_namespaceAttributesStackIndex >= 0) ? _namespaceAttributesStartingStack[_namespaceAttributesStackIndex] : 0;
-
- for (int i = end - 1; i >= start; i--) {
- _contentHandler.endPrefixMapping(_namespacePrefixes[i]);
- }
- _namespacePrefixesIndex = start;
- }
-
- private int processNamespaceAttributes(int item,boolean collectPrefixes, Set<String> prefixSet) throws SAXException {
- do {
- String prefix;
- switch(getNIIState(item)) {
- case STATE_NAMESPACE_ATTRIBUTE:
- // Undeclaration of default namespace
- processNamespaceAttribute("", "");
- if(collectPrefixes) {
- prefixSet.add("");
- }
- break;
- case STATE_NAMESPACE_ATTRIBUTE_P:
- // Undeclaration of namespace
- prefix = readStructureString();
- processNamespaceAttribute(prefix, "");
- if(collectPrefixes) {
- prefixSet.add(prefix);
- }
- break;
- case STATE_NAMESPACE_ATTRIBUTE_P_U:
- // Declaration with prefix
- prefix = readStructureString();
- processNamespaceAttribute(prefix, readStructureString());
- if(collectPrefixes) {
- prefixSet.add(prefix);
- }
- break;
- case STATE_NAMESPACE_ATTRIBUTE_U:
- // Default declaration
- processNamespaceAttribute("", readStructureString());
- if(collectPrefixes) {
- prefixSet.add("");
- }
- break;
- default:
- throw reportFatalError("Illegal state: "+item);
- }
- readStructure();
-
- item = peekStructure();
- } while((item & TYPE_MASK) == T_NAMESPACE_ATTRIBUTE);
-
-
- cacheNamespacePrefixIndex();
-
- return item;
- }
-
- private void processAttributes(int item) throws SAXException {
- do {
- switch(getAIIState(item)) {
- case STATE_ATTRIBUTE_U_LN_QN:
- _attributes.addAttributeWithQName(readStructureString(), readStructureString(), readStructureString(), readStructureString(), readContentString());
- break;
- case STATE_ATTRIBUTE_P_U_LN:
- {
- final String p = readStructureString();
- final String u = readStructureString();
- final String ln = readStructureString();
- _attributes.addAttributeWithQName(u, ln, getQName(p, ln), readStructureString(), readContentString());
- break;
- }
- case STATE_ATTRIBUTE_U_LN: {
- final String u = readStructureString();
- final String ln = readStructureString();
- _attributes.addAttributeWithQName(u, ln, ln, readStructureString(), readContentString());
- break;
- }
- case STATE_ATTRIBUTE_LN: {
- final String ln = readStructureString();
- _attributes.addAttributeWithQName("", ln, ln, readStructureString(), readContentString());
- break;
- }
- default:
- throw reportFatalError("Illegal state: "+item);
- }
- readStructure();
-
- item = peekStructure();
- } while((item & TYPE_MASK) == T_ATTRIBUTE);
- }
-
- private void processNamespaceAttribute(String prefix, String uri) throws SAXException {
- _contentHandler.startPrefixMapping(prefix, uri);
-
- if (_namespacePrefixesFeature) {
- // Add the namespace delcaration as an attribute
- if (prefix != "") {
- _attributes.addAttributeWithQName(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, prefix,
- getQName(XMLConstants.XMLNS_ATTRIBUTE, prefix),
- "CDATA", uri);
- } else {
- _attributes.addAttributeWithQName(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, XMLConstants.XMLNS_ATTRIBUTE,
- XMLConstants.XMLNS_ATTRIBUTE,
- "CDATA", uri);
- }
- }
-
- cacheNamespacePrefix(prefix);
- }
-
- private void cacheNamespacePrefix(String prefix) {
- if (_namespacePrefixesIndex == _namespacePrefixes.length) {
- final String[] namespaceAttributes = new String[_namespacePrefixesIndex * 3 / 2 + 1];
- System.arraycopy(_namespacePrefixes, 0, namespaceAttributes, 0, _namespacePrefixesIndex);
- _namespacePrefixes = namespaceAttributes;
- }
-
- _namespacePrefixes[_namespacePrefixesIndex++] = prefix;
- }
-
- private void cacheNamespacePrefixIndex() {
- if (_namespaceAttributesStackIndex == _namespaceAttributesStack.length) {
- final int[] namespaceAttributesStack = new int[_namespaceAttributesStackIndex * 3 /2 + 1];
- System.arraycopy(_namespaceAttributesStack, 0, namespaceAttributesStack, 0, _namespaceAttributesStackIndex);
- _namespaceAttributesStack = namespaceAttributesStack;
- }
-
- _namespaceAttributesStack[_namespaceAttributesStackIndex++] = _namespacePrefixesIndex;
- }
-
- private void cacheNamespacePrefixStartingIndex() {
- if (_namespaceAttributesStackIndex == _namespaceAttributesStartingStack.length) {
- final int[] namespaceAttributesStart = new int[_namespaceAttributesStackIndex * 3 /2 + 1];
- System.arraycopy(_namespaceAttributesStartingStack, 0, namespaceAttributesStart, 0, _namespaceAttributesStackIndex);
- _namespaceAttributesStartingStack = namespaceAttributesStart;
- }
- _namespaceAttributesStartingStack[_namespaceAttributesStackIndex] = _namespacePrefixesIndex;
- }
-
- private void processComment(String s) throws SAXException {
- processComment(s.toCharArray(), 0, s.length());
- }
-
- private void processComment(char[] ch, int start, int length) throws SAXException {
- _lexicalHandler.comment(ch, start, length);
- }
-
- private void processProcessingInstruction(String target, String data) throws SAXException {
- _contentHandler.processingInstruction(target, data);
- }
-
- private static final DefaultWithLexicalHandler DEFAULT_LEXICAL_HANDLER = new DefaultWithLexicalHandler();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/NamespaceContexHelper.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/NamespaceContexHelper.java
deleted file mode 100644
index 2fa55ae6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/NamespaceContexHelper.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer.stax;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx;
-
-/**
- * A helper class for managing the declaration of namespaces.
- * <p>
- * A namespace is declared on a namespace context.
- * Namespace contexts are pushed on and popped off the namespace context stack.
- * <p>
- * A declared namespace will be in scope iff the context that it was declared on
- * has not been popped off the stack.
- * <p>
- * When instantiated the namespace stack consists of the root namespace context,
- * which contains, by default, the "xml" and "xmlns" declarations.
- * Namespaces may be declarations may be declared on the root context.
- * The root context cannot be popped but can be reset to contain just the
- * "xml" and "xmlns" declarations.
- * <p>
- * Implementation note: determining the prefix from a namespace URI
- * (or vice versa) is efficient when there are few namespace
- * declarations i.e. what is considered to be the case for namespace
- * declarations in 'average' XML documents. The look up of a namespace URI
- * given a prefix is performed in O(n) time. The look up of a prefix given
- * a namespace URI is performed in O(2n) time.
- * <p>
- * The implementation does not scale when there are many namespace
- * declarations. TODO: Use a hash map when there are many namespace
- * declarations.
- *
- * @author Paul.Sandoz@Sun.Com
- */
-final public class NamespaceContexHelper implements NamespaceContextEx {
- private static int DEFAULT_SIZE = 8;
-
- // The prefixes of the namespace declarations
- private String[] prefixes = new String[DEFAULT_SIZE];
- // The URIs of the namespace declarations
- private String[] namespaceURIs = new String[DEFAULT_SIZE];
- // Current position to store the next namespace declaration
- private int namespacePosition;
-
- // The namespace contexts
- private int[] contexts = new int[DEFAULT_SIZE];
- // Current position to store the next namespace context
- private int contextPosition;
-
- /**
- * Create a new NamespaceContexHelper.
- *
- */
- public NamespaceContexHelper() {
- // The default namespace declarations that are always in scope
- prefixes[0] = "xml";
- namespaceURIs[0] = "http://www.w3.org/XML/1998/namespace";
- prefixes[1] = "xmlns";
- namespaceURIs[1] = "http://www.w3.org/2000/xmlns/";
-
- namespacePosition = 2;
- }
-
-
- // NamespaceContext interface
-
- public String getNamespaceURI(String prefix) {
- if (prefix == null) throw new IllegalArgumentException();
-
- prefix = prefix.intern();
-
- for (int i = namespacePosition - 1; i >= 0; i--) {
- final String declaredPrefix = prefixes[i];
- if (declaredPrefix == prefix) {
- return namespaceURIs[i];
- }
- }
-
- return "";
- }
-
- public String getPrefix(String namespaceURI) {
- if (namespaceURI == null) throw new IllegalArgumentException();
-
- for (int i = namespacePosition - 1; i >= 0; i--) {
- final String declaredNamespaceURI = namespaceURIs[i];
- if (declaredNamespaceURI == namespaceURI || declaredNamespaceURI.equals(namespaceURI)) {
- final String declaredPrefix = prefixes[i];
-
- // Check if prefix is out of scope
- for (++i; i < namespacePosition; i++)
- if (declaredPrefix == prefixes[i])
- return null;
-
- return declaredPrefix;
- }
- }
-
- return null;
- }
-
- public Iterator getPrefixes(String namespaceURI) {
- if (namespaceURI == null) throw new IllegalArgumentException();
-
- List<String> l = new ArrayList<String>();
-
- NAMESPACE_LOOP: for (int i = namespacePosition - 1; i >= 0; i--) {
- final String declaredNamespaceURI = namespaceURIs[i];
- if (declaredNamespaceURI == namespaceURI || declaredNamespaceURI.equals(namespaceURI)) {
- final String declaredPrefix = prefixes[i];
-
- // Check if prefix is out of scope
- for (int j = i + 1; j < namespacePosition; j++)
- if (declaredPrefix == prefixes[j])
- continue NAMESPACE_LOOP;
-
- l.add(declaredPrefix);
- }
- }
-
- return l.iterator();
- }
-
- // NamespaceContextEx interface
-
- public Iterator<NamespaceContextEx.Binding> iterator() {
- if (namespacePosition == 2)
- return Collections.EMPTY_LIST.iterator();
-
- final List<NamespaceContextEx.Binding> namespaces =
- new ArrayList<NamespaceContextEx.Binding>(namespacePosition);
-
- NAMESPACE_LOOP: for (int i = namespacePosition - 1; i >= 2; i--) {
- final String declaredPrefix = prefixes[i];
-
- // Check if prefix is out of scope
- for (int j = i + 1; j < namespacePosition; j++) {
- if (declaredPrefix == prefixes[j])
- continue NAMESPACE_LOOP;
-
- namespaces.add(new NamespaceBindingImpl(i));
- }
- }
-
- return namespaces.iterator();
- }
-
- final private class NamespaceBindingImpl implements NamespaceContextEx.Binding {
- int index;
-
- NamespaceBindingImpl(int index) {
- this.index = index;
- }
-
- public String getPrefix() {
- return prefixes[index];
- }
-
- public String getNamespaceURI() {
- return namespaceURIs[index];
- }
- }
-
- /**
- * Declare a default namespace.
- * <p>
- * @param namespaceURI the namespace URI to declare, may be null.
- */
- public void declareDefaultNamespace(String namespaceURI) {
- declareNamespace("", namespaceURI);
- }
-
- /**
- * Declare a namespace.
- * <p>
- * The namespace will be declared on the current namespace context.
- * <p>
- * The namespace can be removed by popping the current namespace
- * context, or, if the declaration occured in the root context, by
- * reseting the namespace context.
- * <p>
- * A default namespace can be declared by passing <code>""</code> as
- * the value of the prefix parameter.
- * A namespace may be undeclared by passing <code>null</code> as the
- * value of the namespaceURI parameter.
- * <p>
- * @param prefix the namespace prefix to declare, may not be null.
- * @param namespaceURI the namespace URI to declare, may be null.
- * @throws IllegalArgumentException, if the prefix is null.
- */
- public void declareNamespace(String prefix, String namespaceURI) {
- if (prefix == null) throw new IllegalArgumentException();
-
- prefix = prefix.intern();
- // Ignore the "xml" or "xmlns" declarations
- if (prefix == "xml" || prefix == "xmlns")
- return;
-
- // Check for undeclaration
- if (namespaceURI != null)
- namespaceURI = namespaceURI.intern();
-
- if (namespacePosition == namespaceURIs.length)
- resizeNamespaces();
-
- // Add new declaration
- prefixes[namespacePosition] = prefix;
- namespaceURIs[namespacePosition++] = namespaceURI;
- }
-
- private void resizeNamespaces() {
- final int newLength = namespaceURIs.length * 3 / 2 + 1;
-
- String[] newPrefixes = new String[newLength];
- System.arraycopy(prefixes, 0, newPrefixes, 0, prefixes.length);
- prefixes = newPrefixes;
-
- String[] newNamespaceURIs = new String[newLength];
- System.arraycopy(namespaceURIs, 0, newNamespaceURIs, 0, namespaceURIs.length);
- namespaceURIs = newNamespaceURIs;
- }
-
- /**
- * Push a namespace context on the stack.
- */
- public void pushContext() {
- if (contextPosition == contexts.length)
- resizeContexts();
-
- contexts[contextPosition++] = namespacePosition;
- }
-
- private void resizeContexts() {
- int[] newContexts = new int[contexts.length * 3 / 2 + 1];
- System.arraycopy(contexts, 0, newContexts, 0, contexts.length);
- contexts = newContexts;
- }
-
- /**
- * Pop the namespace context off the stack.
- * <p>
- * Namespaces declared within the context (to be popped)
- * will be removed and no longer be in scope.
- */
- public void popContext() {
- if (contextPosition > 0) {
- namespacePosition = contexts[--contextPosition];
- }
- }
-
- /**
- * Reset namespace contexts.
- * <p>
- * Pop all namespace contexts and reset the root context.
- */
- public void resetContexts() {
- namespacePosition = 2;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamBufferCreator.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamBufferCreator.java
deleted file mode 100644
index e1111d55..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamBufferCreator.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer.stax;
-
-import com.sun.xml.internal.stream.buffer.AbstractCreator;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * {@link AbstractCreator} with additional convenience code.
- *
- * @author Paul Sandoz
- * @author Venu
- * @author Kohsuke Kawaguchi
- */
-abstract class StreamBufferCreator extends AbstractCreator {
-
- private boolean checkAttributeValue = false;
-
- protected List<String> attributeValuePrefixes = new ArrayList<String>();
-
- protected void storeQualifiedName(int item, String prefix, String uri, String localName) {
- if (uri != null && uri.length() > 0) {
- if (prefix != null && prefix.length() > 0) {
- item |= FLAG_PREFIX;
- storeStructureString(prefix);
- }
-
- item |= FLAG_URI;
- storeStructureString(uri);
- }
-
- storeStructureString(localName);
-
- storeStructure(item);
- }
-
- protected final void storeNamespaceAttribute(String prefix, String uri) {
- int item = T_NAMESPACE_ATTRIBUTE;
-
- if (prefix != null && prefix.length() > 0) {
- item |= FLAG_PREFIX;
- storeStructureString(prefix);
- }
-
- if (uri != null && uri.length() > 0) {
- item |= FLAG_URI;
- storeStructureString(uri);
- }
-
- storeStructure(item);
- }
-
- protected final void storeAttribute(String prefix, String uri, String localName, String type, String value) {
- storeQualifiedName(T_ATTRIBUTE_LN, prefix, uri, localName);
-
- storeStructureString(type);
- storeContentString(value);
- if(checkAttributeValue && value.indexOf("://") == -1){ // the condition after && avoids looking inside URIs
- int firstIndex = value.indexOf(":");
- int lastIndex = value.lastIndexOf(":"); // Check last index of : as some SAML namespace have multiple ":"s
- if(firstIndex != -1 && lastIndex == firstIndex){
- String valuePrefix = value.substring(0, firstIndex);
- if(!attributeValuePrefixes.contains(valuePrefix)){
- attributeValuePrefixes.add(valuePrefix);
- }
- }
- }
- }
-
- public final List getAttributeValuePrefixes(){
- return attributeValuePrefixes;
- }
-
- protected final void storeProcessingInstruction(String target, String data) {
- storeStructure(T_PROCESSING_INSTRUCTION);
- storeStructureString(target);
- storeStructureString(data);
- }
-
- public final boolean isCheckAttributeValue(){
- return checkAttributeValue;
- }
-
- public final void setCheckAttributeValue(boolean value){
- this.checkAttributeValue = value;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferCreator.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferCreator.java
deleted file mode 100644
index 8769f051..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferCreator.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/*
- * Copyright (c) 2005, 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.stream.buffer.stax;
-
-import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
-import com.sun.xml.internal.org.jvnet.staxex.Base64Data;
-import com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Create a buffer using an {@link XMLStreamReader}.
- * <p>
- * TODO: Implement the marking the stream on the element when an ID
- * attribute on the element is defined
- */
-public class StreamReaderBufferCreator extends StreamBufferCreator {
- private int _eventType;
- private boolean _storeInScopeNamespacesOnElementFragment;
- private Map<String, Integer> _inScopePrefixes;
-
- /**
- * Create a stream reader buffer creator.
- * <p>
- * A stream buffer will be created for storing the infoset
- * from a stream reader.
- */
- public StreamReaderBufferCreator() {
- }
-
- /**
- * Create a stream reader buffer creator using a mutable stream buffer.
- * <p>
- * @param buffer the mutable stream buffer.
- */
- public StreamReaderBufferCreator(MutableXMLStreamBuffer buffer) {
- setBuffer(buffer);
- }
-
- /**
- * Create the buffer from a stream reader.
- * <p>
- * The stream reader must be positioned at the start of the document
- * or the start of an element.
- * <p>
- * If the stream is positioned at the start of the document then the
- * whole document is stored and after storing the stream will be positioned
- * at the end of the document.
- * <p>
- * If the stream is positioned at the start of an element then the
- * element and all its children will be stored and after storing the stream
- * will be positioned at the next event after the end of the element.
- * <p>
- * @return the mutable stream buffer.
- * @throws XMLStreamException if the stream reader is not positioned at
- * the start of the document or at an element.
- */
- public MutableXMLStreamBuffer create(XMLStreamReader reader) throws XMLStreamException {
- if (_buffer == null) {
- createBuffer();
- }
- store(reader);
-
- return getXMLStreamBuffer();
- }
-
- /**
- * Creates the buffer from a stream reader that is an element fragment.
- * <p>
- * The stream reader will be moved to the position of the next start of
- * an element if the stream reader is not already positioned at the start
- * of an element.
- * <p>
- * The element and all its children will be stored and after storing the stream
- * will be positioned at the next event after the end of the element.
- * <p>
- * @param storeInScopeNamespaces true if in-scope namespaces of the element
- * fragment should be stored.
- * @return the mutable stream buffer.
- * @throws XMLStreamException if the stream reader cannot be positioned at
- * the start of an element.
- */
- public MutableXMLStreamBuffer createElementFragment(XMLStreamReader reader,
- boolean storeInScopeNamespaces) throws XMLStreamException {
- if (_buffer == null) {
- createBuffer();
- }
-
- if (!reader.hasNext()) {
- return _buffer;
- }
-
- _storeInScopeNamespacesOnElementFragment = storeInScopeNamespaces;
-
- _eventType = reader.getEventType();
- if (_eventType != XMLStreamReader.START_ELEMENT) {
- do {
- _eventType = reader.next();
- } while(_eventType != XMLStreamReader.START_ELEMENT && _eventType != XMLStreamReader.END_DOCUMENT);
- }
-
- if (storeInScopeNamespaces) {
- _inScopePrefixes = new HashMap<String,Integer>();
- }
-
- storeElementAndChildren(reader);
-
- return getXMLStreamBuffer();
- }
-
- private void store(XMLStreamReader reader) throws XMLStreamException {
- if (!reader.hasNext()) {
- return;
- }
-
- _eventType = reader.getEventType();
- switch (_eventType) {
- case XMLStreamReader.START_DOCUMENT:
- storeDocumentAndChildren(reader);
- break;
- case XMLStreamReader.START_ELEMENT:
- storeElementAndChildren(reader);
- break;
- default:
- throw new XMLStreamException("XMLStreamReader not positioned at a document or element");
- }
-
- increaseTreeCount();
- }
-
- private void storeDocumentAndChildren(XMLStreamReader reader) throws XMLStreamException {
- storeStructure(T_DOCUMENT);
-
- _eventType = reader.next();
- while (_eventType != XMLStreamReader.END_DOCUMENT) {
- switch (_eventType) {
- case XMLStreamReader.START_ELEMENT:
- storeElementAndChildren(reader);
- continue;
- case XMLStreamReader.COMMENT:
- storeComment(reader);
- break;
- case XMLStreamReader.PROCESSING_INSTRUCTION:
- storeProcessingInstruction(reader);
- break;
- }
- _eventType = reader.next();
- }
-
- storeStructure(T_END);
- }
-
- private void storeElementAndChildren(XMLStreamReader reader) throws XMLStreamException {
- if (reader instanceof XMLStreamReaderEx) {
- storeElementAndChildrenEx((XMLStreamReaderEx)reader);
- } else {
- storeElementAndChildrenNoEx(reader);
- }
- }
-
- private void storeElementAndChildrenEx(XMLStreamReaderEx reader) throws XMLStreamException {
- int depth = 1;
- if (_storeInScopeNamespacesOnElementFragment) {
- storeElementWithInScopeNamespaces(reader);
- } else {
- storeElement(reader);
- }
-
- while(depth > 0) {
- _eventType = reader.next();
- switch (_eventType) {
- case XMLStreamReader.START_ELEMENT:
- depth++;
- storeElement(reader);
- break;
- case XMLStreamReader.END_ELEMENT:
- depth--;
- storeStructure(T_END);
- break;
- case XMLStreamReader.NAMESPACE:
- storeNamespaceAttributes(reader);
- break;
- case XMLStreamReader.ATTRIBUTE:
- storeAttributes(reader);
- break;
- case XMLStreamReader.SPACE:
- case XMLStreamReader.CHARACTERS:
- case XMLStreamReader.CDATA: {
- CharSequence c = reader.getPCDATA();
- if (c instanceof Base64Data) {
- storeStructure(T_TEXT_AS_OBJECT);
- //Instead of clone the Base64Data, the original Base64Data instance is used here to preserve the DataHandler
- storeContentObject(c);
- } else {
- storeContentCharacters(T_TEXT_AS_CHAR_ARRAY,
- reader.getTextCharacters(), reader.getTextStart(),
- reader.getTextLength());
- }
- break;
- }
- case XMLStreamReader.COMMENT:
- storeComment(reader);
- break;
- case XMLStreamReader.PROCESSING_INSTRUCTION:
- storeProcessingInstruction(reader);
- break;
- }
- }
-
- /*
- * Move to next item after the end of the element
- * that has been stored
- */
- _eventType = reader.next();
- }
-
- private void storeElementAndChildrenNoEx(XMLStreamReader reader) throws XMLStreamException {
- int depth = 1;
- if (_storeInScopeNamespacesOnElementFragment) {
- storeElementWithInScopeNamespaces(reader);
- } else {
- storeElement(reader);
- }
-
- while(depth > 0) {
- _eventType = reader.next();
- switch (_eventType) {
- case XMLStreamReader.START_ELEMENT:
- depth++;
- storeElement(reader);
- break;
- case XMLStreamReader.END_ELEMENT:
- depth--;
- storeStructure(T_END);
- break;
- case XMLStreamReader.NAMESPACE:
- storeNamespaceAttributes(reader);
- break;
- case XMLStreamReader.ATTRIBUTE:
- storeAttributes(reader);
- break;
- case XMLStreamReader.SPACE:
- case XMLStreamReader.CHARACTERS:
- case XMLStreamReader.CDATA: {
- storeContentCharacters(T_TEXT_AS_CHAR_ARRAY,
- reader.getTextCharacters(), reader.getTextStart(),
- reader.getTextLength());
- break;
- }
- case XMLStreamReader.COMMENT:
- storeComment(reader);
- break;
- case XMLStreamReader.PROCESSING_INSTRUCTION:
- storeProcessingInstruction(reader);
- break;
- }
- }
-
- /*
- * Move to next item after the end of the element
- * that has been stored
- */
- _eventType = reader.next();
- }
-
- private void storeElementWithInScopeNamespaces(XMLStreamReader reader) {
- storeQualifiedName(T_ELEMENT_LN,
- reader.getPrefix(), reader.getNamespaceURI(), reader.getLocalName());
-
- if (reader.getNamespaceCount() > 0) {
- storeNamespaceAttributes(reader);
- }
-
- if (reader.getAttributeCount() > 0) {
- storeAttributes(reader);
- }
- }
-
- private void storeElement(XMLStreamReader reader) {
- storeQualifiedName(T_ELEMENT_LN,
- reader.getPrefix(), reader.getNamespaceURI(), reader.getLocalName());
-
- if (reader.getNamespaceCount() > 0) {
- storeNamespaceAttributes(reader);
- }
-
- if (reader.getAttributeCount() > 0) {
- storeAttributes(reader);
- }
- }
-
- /**
- * A low level method a create a structure element explicitly. This is useful when xsb is
- * created from a fragment's XMLStreamReader and inscope namespaces can be passed using
- * this method. Note that there is no way to enumerate namespaces from XMLStreamReader.
- *
- * For e.g: Say the SOAP message is as follows
- *
- * <S:Envelope xmlns:n1=".."><S:Body><ns2:A> ...
- *
- * when xsb is to be created using a reader that is at <ns2:A> tag, the inscope
- * namespace like 'n1' can be passed using this method.
- *
- * WARNING: Instead of using this, try other methods(if you don't know what you are
- * doing).
- *
- * @param ns an array of the even length of the form { prefix0, uri0, prefix1, uri1, ... }.
- */
- public void storeElement(String nsURI, String localName, String prefix, String[] ns) {
- storeQualifiedName(T_ELEMENT_LN, prefix, nsURI, localName);
- storeNamespaceAttributes(ns);
- }
-
- /**
- * A low level method a create a structure element explicitly. This is
- * required to support {@link #storeElement} method.
- *
- * WARNING: Instead of using this, try other methods(if you don't know what
- * you are doing).
- */
- public void storeEndElement() {
- storeStructure(T_END);
- }
-
- private void storeNamespaceAttributes(XMLStreamReader reader) {
- int count = reader.getNamespaceCount();
- for (int i = 0; i < count; i++) {
- storeNamespaceAttribute(reader.getNamespacePrefix(i), reader.getNamespaceURI(i));
- }
- }
-
- /**
- * @param ns an array of the even length of the form { prefix0, uri0, prefix1, uri1, ... }.
- */
- private void storeNamespaceAttributes(String[] ns) {
- for (int i = 0; i < ns.length; i=i+2) {
- storeNamespaceAttribute(ns[i], ns[i+1]);
- }
- }
-
- private void storeAttributes(XMLStreamReader reader) {
- int count = reader.getAttributeCount();
- for (int i = 0; i < count; i++) {
- storeAttribute(reader.getAttributePrefix(i), reader.getAttributeNamespace(i), reader.getAttributeLocalName(i),
- reader.getAttributeType(i), reader.getAttributeValue(i));
- }
- }
-
- private void storeComment(XMLStreamReader reader) {
- storeContentCharacters(T_COMMENT_AS_CHAR_ARRAY,
- reader.getTextCharacters(), reader.getTextStart(), reader.getTextLength());
- }
-
- private void storeProcessingInstruction(XMLStreamReader reader) {
- storeProcessingInstruction(reader.getPITarget(), reader.getPIData());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferProcessor.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferProcessor.java
deleted file mode 100644
index 4071bd2a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferProcessor.java
+++ /dev/null
@@ -1,1126 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer.stax;
-
-import com.sun.xml.internal.stream.buffer.AbstractProcessor;
-import com.sun.xml.internal.stream.buffer.AttributesHolder;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferMark;
-import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx;
-import com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx;
-
-import javax.xml.XMLConstants;
-import javax.xml.namespace.QName;
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import java.util.*;
-
-/**
- * A processor of a {@link XMLStreamBuffer} that reads the XML infoset as
- * {@link XMLStreamReader}.
- *
- * <p>
- * Because of {@link XMLStreamReader} design, this processor always produce
- * a full document infoset, even if the buffer just contains a fragment.
- *
- * <p>
- * When {@link XMLStreamBuffer} contains a multiple tree (AKA "forest"),
- * {@link XMLStreamReader} will behave as if there are multiple root elements
- * (so you'll see {@link #START_ELEMENT} event where you'd normally expect
- * {@link #END_DOCUMENT}.)
- *
- * @author Paul.Sandoz@Sun.Com
- * @author K.Venugopal@sun.com
- */
-public class StreamReaderBufferProcessor extends AbstractProcessor implements XMLStreamReaderEx {
- private static final int CACHE_SIZE = 16;
-
- // Stack to hold element and namespace declaration information
- protected ElementStackEntry[] _stack = new ElementStackEntry[CACHE_SIZE];
- /** The top-most active entry of the {@link #_stack}. */
- protected ElementStackEntry _stackTop;
- /** The element depth that we are in. Used to determine when we are done with a tree. */
- protected int _depth;
-
- // Arrays to hold all namespace declarations
- /**
- * Namespace prefixes. Can be empty but not null.
- */
- protected String[] _namespaceAIIsPrefix = new String[CACHE_SIZE];
- protected String[] _namespaceAIIsNamespaceName = new String[CACHE_SIZE];
- protected int _namespaceAIIsEnd;
-
- // Internal namespace context implementation
- protected InternalNamespaceContext _nsCtx = new InternalNamespaceContext();
-
- // The current event type
- protected int _eventType;
-
- /**
- * Holder of the attributes.
- *
- * Be careful that this follows the SAX convention of using "" instead of null.
- */
- protected AttributesHolder _attributeCache;
-
- // Characters as a CharSequence
- protected CharSequence _charSequence;
-
- // Characters as a char array with offset and length
- protected char[] _characters;
- protected int _textOffset;
- protected int _textLen;
-
- protected String _piTarget;
- protected String _piData;
-
- //
- // Represents the parser state wrt the end of parsing.
- //
- /**
- * The parser is in the middle of parsing a document,
- * with no end in sight.
- */
- private static final int PARSING = 1;
- /**
- * The parser has already reported the {@link #END_ELEMENT},
- * and we are parsing a fragment. We'll report {@link #END_DOCUMENT}
- * next and be done.
- */
- private static final int PENDING_END_DOCUMENT = 2;
- /**
- * The parser has reported the {@link #END_DOCUMENT} event,
- * so we are really done parsing.
- */
- private static final int COMPLETED = 3;
-
- /**
- * True if processing is complete.
- */
- private int _completionState;
-
- public StreamReaderBufferProcessor() {
- for (int i=0; i < _stack.length; i++){
- _stack[i] = new ElementStackEntry();
- }
-
- _attributeCache = new AttributesHolder();
- }
-
- public StreamReaderBufferProcessor(XMLStreamBuffer buffer) throws XMLStreamException {
- this();
- setXMLStreamBuffer(buffer);
- }
-
- public void setXMLStreamBuffer(XMLStreamBuffer buffer) throws XMLStreamException {
- setBuffer(buffer,buffer.isFragment());
-
- _completionState = PARSING;
- _namespaceAIIsEnd = 0;
- _characters = null;
- _charSequence = null;
- _eventType = START_DOCUMENT;
- }
-
- /**
- * Does {@link #nextTag()} and if the parser moved to a new start tag,
- * returns a {@link XMLStreamBufferMark} that captures the infoset starting
- * from the newly discovered element.
- *
- * <p>
- * (Ideally we should have a method that works against the current position,
- * but the way the data structure is read makes this somewhat difficult.)
- *
- * This creates a new {@link XMLStreamBufferMark} that shares the underlying
- * data storage, thus it's fairly efficient.
- */
- public XMLStreamBuffer nextTagAndMark() throws XMLStreamException {
- while (true) {
- int s = peekStructure();
- if((s &TYPE_MASK)==T_ELEMENT) {
- // next is start element.
- Map<String,String> inscope = new HashMap<String, String>(_namespaceAIIsEnd);
-
- for (int i=0 ; i<_namespaceAIIsEnd; i++)
- inscope.put(_namespaceAIIsPrefix[i],_namespaceAIIsNamespaceName[i]);
-
- XMLStreamBufferMark mark = new XMLStreamBufferMark(inscope, this);
- next();
- return mark;
- } else if((s &TYPE_MASK)==T_DOCUMENT) {
- //move the pointer to next structure.
- readStructure();
- //mark the next start element
- XMLStreamBufferMark mark = new XMLStreamBufferMark(new HashMap<String, String>(_namespaceAIIsEnd), this);
- next();
- return mark;
- }
-
- if(next()==END_ELEMENT)
- return null;
- }
- }
-
- public Object getProperty(String name) {
- return null;
- }
-
- public int next() throws XMLStreamException {
- switch(_completionState) {
- case COMPLETED:
- throw new XMLStreamException("Invalid State");
- case PENDING_END_DOCUMENT:
- _namespaceAIIsEnd = 0;
- _completionState = COMPLETED;
- return _eventType = END_DOCUMENT;
- }
-
- // Pop the stack of elements
- // This is a post-processing operation
- // The stack of the element should be poppoed after
- // the END_ELEMENT event is returned so that the correct element name
- // and namespace scope is returned
- switch(_eventType) {
- case END_ELEMENT:
- if (_depth > 1) {
- _depth--;
- // _depth index is always set to the next free stack entry
- // to push
- popElementStack(_depth);
- } else if (_depth == 1) {
- _depth--;
- }
- }
-
- _characters = null;
- _charSequence = null;
- while(true) {// loop only if we read STATE_DOCUMENT
- int eiiState = readEiiState();
- switch(eiiState) {
- case STATE_DOCUMENT:
- // we'll always produce a full document, and we've already report START_DOCUMENT event.
- // so simply skil this
- continue;
- case STATE_ELEMENT_U_LN_QN: {
- final String uri = readStructureString();
- final String localName = readStructureString();
- final String prefix = getPrefixFromQName(readStructureString());
-
- processElement(prefix, uri, localName, isInscope(_depth));
- return _eventType = START_ELEMENT;
- }
- case STATE_ELEMENT_P_U_LN:
- processElement(readStructureString(), readStructureString(), readStructureString(),isInscope(_depth));
- return _eventType = START_ELEMENT;
- case STATE_ELEMENT_U_LN:
- processElement(null, readStructureString(), readStructureString(),isInscope(_depth));
- return _eventType = START_ELEMENT;
- case STATE_ELEMENT_LN:
- processElement(null, null, readStructureString(),isInscope(_depth));
- return _eventType = START_ELEMENT;
- case STATE_TEXT_AS_CHAR_ARRAY_SMALL:
- _textLen = readStructure();
- _textOffset = readContentCharactersBuffer(_textLen);
- _characters = _contentCharactersBuffer;
-
- return _eventType = CHARACTERS;
- case STATE_TEXT_AS_CHAR_ARRAY_MEDIUM:
- _textLen = readStructure16();
- _textOffset = readContentCharactersBuffer(_textLen);
- _characters = _contentCharactersBuffer;
-
- return _eventType = CHARACTERS;
- case STATE_TEXT_AS_CHAR_ARRAY_COPY:
- _characters = readContentCharactersCopy();
- _textLen = _characters.length;
- _textOffset = 0;
-
- return _eventType = CHARACTERS;
- case STATE_TEXT_AS_STRING:
- _eventType = CHARACTERS;
- _charSequence = readContentString();
-
- return _eventType = CHARACTERS;
- case STATE_TEXT_AS_OBJECT:
- _eventType = CHARACTERS;
- _charSequence = (CharSequence)readContentObject();
-
- return _eventType = CHARACTERS;
- case STATE_COMMENT_AS_CHAR_ARRAY_SMALL:
- _textLen = readStructure();
- _textOffset = readContentCharactersBuffer(_textLen);
- _characters = _contentCharactersBuffer;
-
- return _eventType = COMMENT;
- case STATE_COMMENT_AS_CHAR_ARRAY_MEDIUM:
- _textLen = readStructure16();
- _textOffset = readContentCharactersBuffer(_textLen);
- _characters = _contentCharactersBuffer;
-
- return _eventType = COMMENT;
- case STATE_COMMENT_AS_CHAR_ARRAY_COPY:
- _characters = readContentCharactersCopy();
- _textLen = _characters.length;
- _textOffset = 0;
-
- return _eventType = COMMENT;
- case STATE_COMMENT_AS_STRING:
- _charSequence = readContentString();
-
- return _eventType = COMMENT;
- case STATE_PROCESSING_INSTRUCTION:
- _piTarget = readStructureString();
- _piData = readStructureString();
-
- return _eventType = PROCESSING_INSTRUCTION;
- case STATE_END:
- if (_depth > 1) {
- // normal case
- return _eventType = END_ELEMENT;
- } else if (_depth == 1) {
- // this is the last end element for the current tree.
- if (_fragmentMode) {
- if(--_treeCount==0) // is this the last tree in the forest?
- _completionState = PENDING_END_DOCUMENT;
- }
- return _eventType = END_ELEMENT;
- } else {
- // this only happens when we are processing a full document
- // and we hit the "end of document" marker
- _namespaceAIIsEnd = 0;
- _completionState = COMPLETED;
- return _eventType = END_DOCUMENT;
- }
- default:
- throw new XMLStreamException("Internal XSB error: Invalid State="+eiiState);
- }
- // this should be unreachable
- }
- }
-
- public final void require(int type, String namespaceURI, String localName) throws XMLStreamException {
- if( type != _eventType) {
- throw new XMLStreamException("");
- }
- if( namespaceURI != null && !namespaceURI.equals(getNamespaceURI())) {
- throw new XMLStreamException("");
- }
- if(localName != null && !localName.equals(getLocalName())) {
- throw new XMLStreamException("");
- }
- }
-
- public final String getElementTextTrim() throws XMLStreamException {
- // TODO getElementText* methods more efficiently
- return getElementText().trim();
- }
-
- public final String getElementText() throws XMLStreamException {
- if(_eventType != START_ELEMENT) {
- throw new XMLStreamException("");
- }
-
- next();
- return getElementText(true);
- }
-
- public final String getElementText(boolean startElementRead) throws XMLStreamException {
- if (!startElementRead) {
- throw new XMLStreamException("");
- }
-
- int eventType = getEventType();
- StringBuilder content = new StringBuilder();
- while(eventType != END_ELEMENT ) {
- if(eventType == CHARACTERS
- || eventType == CDATA
- || eventType == SPACE
- || eventType == ENTITY_REFERENCE) {
- content.append(getText());
- } else if(eventType == PROCESSING_INSTRUCTION
- || eventType == COMMENT) {
- // skipping
- } else if(eventType == END_DOCUMENT) {
- throw new XMLStreamException("");
- } else if(eventType == START_ELEMENT) {
- throw new XMLStreamException("");
- } else {
- throw new XMLStreamException("");
- }
- eventType = next();
- }
- return content.toString();
- }
-
- public final int nextTag() throws XMLStreamException {
- next();
- return nextTag(true);
- }
-
- public final int nextTag(boolean currentTagRead) throws XMLStreamException {
- int eventType = getEventType();
- if (!currentTagRead) {
- eventType = next();
- }
- while((eventType == CHARACTERS && isWhiteSpace()) // skip whitespace
- || (eventType == CDATA && isWhiteSpace())
- || eventType == SPACE
- || eventType == PROCESSING_INSTRUCTION
- || eventType == COMMENT) {
- eventType = next();
- }
- if (eventType != START_ELEMENT && eventType != END_ELEMENT) {
- throw new XMLStreamException("");
- }
- return eventType;
- }
-
- public final boolean hasNext() {
- return (_eventType != END_DOCUMENT);
- }
-
- public void close() throws XMLStreamException {
- }
-
- public final boolean isStartElement() {
- return (_eventType == START_ELEMENT);
- }
-
- public final boolean isEndElement() {
- return (_eventType == END_ELEMENT);
- }
-
- public final boolean isCharacters() {
- return (_eventType == CHARACTERS);
- }
-
- public final boolean isWhiteSpace() {
- if(isCharacters() || (_eventType == CDATA)){
- char [] ch = this.getTextCharacters();
- int start = this.getTextStart();
- int length = this.getTextLength();
- for (int i = start; i < length; i++){
- final char c = ch[i];
- if (!(c == 0x20 || c == 0x9 || c == 0xD || c == 0xA))
- return false;
- }
- return true;
- }
- return false;
- }
-
- public final String getAttributeValue(String namespaceURI, String localName) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException("");
- }
-
- if (namespaceURI == null) {
- // Set to the empty string to be compatible with the
- // org.xml.sax.Attributes interface
- namespaceURI = "";
- }
-
- return _attributeCache.getValue(namespaceURI, localName);
- }
-
- public final int getAttributeCount() {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException("");
- }
-
- return _attributeCache.getLength();
- }
-
- public final javax.xml.namespace.QName getAttributeName(int index) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException("");
- }
-
- final String prefix = _attributeCache.getPrefix(index);
- final String localName = _attributeCache.getLocalName(index);
- final String uri = _attributeCache.getURI(index);
- return new QName(uri,localName,prefix);
- }
-
-
- public final String getAttributeNamespace(int index) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException("");
- }
- return fixEmptyString(_attributeCache.getURI(index));
- }
-
- public final String getAttributeLocalName(int index) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException("");
- }
- return _attributeCache.getLocalName(index);
- }
-
- public final String getAttributePrefix(int index) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException("");
- }
- return fixEmptyString(_attributeCache.getPrefix(index));
- }
-
- public final String getAttributeType(int index) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException("");
- }
- return _attributeCache.getType(index);
- }
-
- public final String getAttributeValue(int index) {
- if (_eventType != START_ELEMENT) {
- throw new IllegalStateException("");
- }
-
- return _attributeCache.getValue(index);
- }
-
- public final boolean isAttributeSpecified(int index) {
- return false;
- }
-
- public final int getNamespaceCount() {
- if (_eventType == START_ELEMENT || _eventType == END_ELEMENT) {
- return _stackTop.namespaceAIIsEnd - _stackTop.namespaceAIIsStart;
- }
-
- throw new IllegalStateException("");
- }
-
- public final String getNamespacePrefix(int index) {
- if (_eventType == START_ELEMENT || _eventType == END_ELEMENT) {
- return _namespaceAIIsPrefix[_stackTop.namespaceAIIsStart + index];
- }
-
- throw new IllegalStateException("");
- }
-
- public final String getNamespaceURI(int index) {
- if (_eventType == START_ELEMENT || _eventType == END_ELEMENT) {
- return _namespaceAIIsNamespaceName[_stackTop.namespaceAIIsStart + index];
- }
-
- throw new IllegalStateException("");
- }
-
- public final String getNamespaceURI(String prefix) {
- return _nsCtx.getNamespaceURI(prefix);
- }
-
- public final NamespaceContextEx getNamespaceContext() {
- return _nsCtx;
- }
-
- public final int getEventType() {
- return _eventType;
- }
-
- public final String getText() {
- if (_characters != null) {
- String s = new String(_characters, _textOffset, _textLen);
- _charSequence = s;
- return s;
- } else if (_charSequence != null) {
- return _charSequence.toString();
- } else {
- throw new IllegalStateException();
- }
- }
-
- public final char[] getTextCharacters() {
- if (_characters != null) {
- return _characters;
- } else if (_charSequence != null) {
- // TODO try to avoid creation of a temporary String for some
- // CharSequence implementations
- _characters = _charSequence.toString().toCharArray();
- _textLen = _characters.length;
- _textOffset = 0;
- return _characters;
- } else {
- throw new IllegalStateException();
- }
- }
-
- public final int getTextStart() {
- if (_characters != null) {
- return _textOffset;
- } else if (_charSequence != null) {
- return 0;
- } else {
- throw new IllegalStateException();
- }
- }
-
- public final int getTextLength() {
- if (_characters != null) {
- return _textLen;
- } else if (_charSequence != null) {
- return _charSequence.length();
- } else {
- throw new IllegalStateException();
- }
- }
-
- public final int getTextCharacters(int sourceStart, char[] target,
- int targetStart, int length) throws XMLStreamException {
- if (_characters != null) {
- } else if (_charSequence != null) {
- _characters = _charSequence.toString().toCharArray();
- _textLen = _characters.length;
- _textOffset = 0;
- } else {
- throw new IllegalStateException("");
- }
-
- try {
- int remaining = _textLen - sourceStart;
- int len = remaining > length ? length : remaining;
- sourceStart += _textOffset;
- System.arraycopy(_characters, sourceStart, target, targetStart, len);
- return len;
- } catch (IndexOutOfBoundsException e) {
- throw new XMLStreamException(e);
- }
- }
-
- private class CharSequenceImpl implements CharSequence {
- private final int _offset;
- private final int _length;
-
- CharSequenceImpl(int offset, int length) {
- _offset = offset;
- _length = length;
- }
-
- public int length() {
- return _length;
- }
-
- public char charAt(int index) {
- if (index >= 0 && index < _textLen) {
- return _characters[_textOffset + index];
- } else {
- throw new IndexOutOfBoundsException();
- }
- }
-
- public CharSequence subSequence(int start, int end) {
- final int length = end - start;
- if (end < 0 || start < 0 || end > length || start > end) {
- throw new IndexOutOfBoundsException();
- }
-
- return new CharSequenceImpl(_offset + start, length);
- }
-
- @Override
- public String toString() {
- return new String(_characters, _offset, _length);
- }
- }
-
- public final CharSequence getPCDATA() {
- if (_characters != null) {
- return new CharSequenceImpl(_textOffset, _textLen);
- } else if (_charSequence != null) {
- return _charSequence;
- } else {
- throw new IllegalStateException();
- }
- }
-
- public final String getEncoding() {
- return "UTF-8";
- }
-
- public final boolean hasText() {
- return (_characters != null || _charSequence != null);
- }
-
- public final Location getLocation() {
- return new DummyLocation();
- }
-
- public final boolean hasName() {
- return (_eventType == START_ELEMENT || _eventType == END_ELEMENT);
- }
-
- public final QName getName() {
- return _stackTop.getQName();
- }
-
- public final String getLocalName() {
- return _stackTop.localName;
- }
-
- public final String getNamespaceURI() {
- return _stackTop.uri;
- }
-
- public final String getPrefix() {
- return _stackTop.prefix;
-
- }
-
- public final String getVersion() {
- return "1.0";
- }
-
- public final boolean isStandalone() {
- return false;
- }
-
- public final boolean standaloneSet() {
- return false;
- }
-
- public final String getCharacterEncodingScheme() {
- return "UTF-8";
- }
-
- public final String getPITarget() {
- if (_eventType == PROCESSING_INSTRUCTION) {
- return _piTarget;
- }
- throw new IllegalStateException("");
- }
-
- public final String getPIData() {
- if (_eventType == PROCESSING_INSTRUCTION) {
- return _piData;
- }
- throw new IllegalStateException("");
- }
-
- protected void processElement(String prefix, String uri, String localName, boolean inscope) {
- pushElementStack();
- _stackTop.set(prefix, uri, localName);
-
- _attributeCache.clear();
-
- int item = peekStructure();
- if ((item & TYPE_MASK) == T_NAMESPACE_ATTRIBUTE || inscope) {
- // Skip the namespace declarations on the element
- // they will have been added already
- item = processNamespaceAttributes(item, inscope);
- }
- if ((item & TYPE_MASK) == T_ATTRIBUTE) {
- processAttributes(item);
- }
- }
-
- private boolean isInscope(int depth) {
- return _buffer.getInscopeNamespaces().size() > 0 && depth ==0;
- }
-
- private void resizeNamespaceAttributes() {
- final String[] namespaceAIIsPrefix = new String[_namespaceAIIsEnd * 2];
- System.arraycopy(_namespaceAIIsPrefix, 0, namespaceAIIsPrefix, 0, _namespaceAIIsEnd);
- _namespaceAIIsPrefix = namespaceAIIsPrefix;
-
- final String[] namespaceAIIsNamespaceName = new String[_namespaceAIIsEnd * 2];
- System.arraycopy(_namespaceAIIsNamespaceName, 0, namespaceAIIsNamespaceName, 0, _namespaceAIIsEnd);
- _namespaceAIIsNamespaceName = namespaceAIIsNamespaceName;
- }
-
- private int processNamespaceAttributes(int item, boolean inscope){
- _stackTop.namespaceAIIsStart = _namespaceAIIsEnd;
- Set<String> prefixSet = inscope ? new HashSet<String>() : Collections.<String>emptySet();
-
- while((item & TYPE_MASK) == T_NAMESPACE_ATTRIBUTE) {
- if (_namespaceAIIsEnd == _namespaceAIIsPrefix.length) {
- resizeNamespaceAttributes();
- }
-
- switch(getNIIState(item)){
- case STATE_NAMESPACE_ATTRIBUTE:
- // Undeclaration of default namespace
- _namespaceAIIsPrefix[_namespaceAIIsEnd] =
- _namespaceAIIsNamespaceName[_namespaceAIIsEnd++] = "";
- if (inscope) {
- prefixSet.add("");
- }
- break;
- case STATE_NAMESPACE_ATTRIBUTE_P:
- // Undeclaration of namespace
- _namespaceAIIsPrefix[_namespaceAIIsEnd] = readStructureString();
- if (inscope) {
- prefixSet.add(_namespaceAIIsPrefix[_namespaceAIIsEnd]);
- }
- _namespaceAIIsNamespaceName[_namespaceAIIsEnd++] = "";
- break;
- case STATE_NAMESPACE_ATTRIBUTE_P_U:
- // Declaration with prefix
- _namespaceAIIsPrefix[_namespaceAIIsEnd] = readStructureString();
- if (inscope) {
- prefixSet.add(_namespaceAIIsPrefix[_namespaceAIIsEnd]);
- }
- _namespaceAIIsNamespaceName[_namespaceAIIsEnd++] = readStructureString();
- break;
- case STATE_NAMESPACE_ATTRIBUTE_U:
- // Default declaration
- _namespaceAIIsPrefix[_namespaceAIIsEnd] = "";
- if (inscope) {
- prefixSet.add("");
- }
- _namespaceAIIsNamespaceName[_namespaceAIIsEnd++] = readStructureString();
- break;
- }
- readStructure();
-
- item = peekStructure();
- }
-
- if (inscope) {
- for (Map.Entry<String, String> e : _buffer.getInscopeNamespaces().entrySet()) {
- String key = fixNull(e.getKey());
- // If the prefix is already written, do not write the prefix
- if (!prefixSet.contains(key)) {
- if (_namespaceAIIsEnd == _namespaceAIIsPrefix.length) {
- resizeNamespaceAttributes();
- }
- _namespaceAIIsPrefix[_namespaceAIIsEnd] = key;
- _namespaceAIIsNamespaceName[_namespaceAIIsEnd++] = e.getValue();
- }
- }
- }
- _stackTop.namespaceAIIsEnd = _namespaceAIIsEnd;
-
- return item;
- }
-
- private static String fixNull(String s) {
- if (s == null) return "";
- else return s;
- }
-
- private void processAttributes(int item){
- do {
- switch(getAIIState(item)){
- case STATE_ATTRIBUTE_U_LN_QN: {
- final String uri = readStructureString();
- final String localName = readStructureString();
- final String prefix = getPrefixFromQName(readStructureString());
- _attributeCache.addAttributeWithPrefix(prefix, uri, localName, readStructureString(), readContentString());
- break;
- }
- case STATE_ATTRIBUTE_P_U_LN:
- _attributeCache.addAttributeWithPrefix(readStructureString(), readStructureString(), readStructureString(), readStructureString(), readContentString());
- break;
- case STATE_ATTRIBUTE_U_LN:
- // _attributeCache follows SAX convention
- _attributeCache.addAttributeWithPrefix("", readStructureString(), readStructureString(), readStructureString(), readContentString());
- break;
- case STATE_ATTRIBUTE_LN: {
- _attributeCache.addAttributeWithPrefix("", "", readStructureString(), readStructureString(), readContentString());
- break;
- }
- default :
- assert false : "Internal XSB Error: wrong attribute state, Item="+item;
- }
- readStructure();
-
- item = peekStructure();
- } while((item & TYPE_MASK) == T_ATTRIBUTE);
- }
-
- private void pushElementStack() {
- if (_depth == _stack.length) {
- // resize stack
- ElementStackEntry [] tmp = _stack;
- _stack = new ElementStackEntry[_stack.length * 3 /2 + 1];
- System.arraycopy(tmp, 0, _stack, 0, tmp.length);
- for (int i = tmp.length; i < _stack.length; i++){
- _stack[i] = new ElementStackEntry();
- }
- }
-
- _stackTop = _stack[_depth++];
- }
-
- private void popElementStack(int depth) {
- // _depth is checked outside this method
- _stackTop = _stack[depth - 1];
- // Move back the position of the namespace index
- _namespaceAIIsEnd = _stack[depth].namespaceAIIsStart;
- }
-
- private final class ElementStackEntry {
- /**
- * Prefix.
- * Just like everywhere else in StAX, this can be null but can't be empty.
- */
- String prefix;
- /**
- * Namespace URI.
- * Just like everywhere else in StAX, this can be null but can't be empty.
- */
- String uri;
- String localName;
- QName qname;
-
- // Start and end of namespace declarations
- // in namespace declaration arrays
- int namespaceAIIsStart;
- int namespaceAIIsEnd;
-
- public void set(String prefix, String uri, String localName) {
- this.prefix = prefix;
- this.uri = uri;
- this.localName = localName;
- this.qname = null;
-
- this.namespaceAIIsStart = this.namespaceAIIsEnd = StreamReaderBufferProcessor.this._namespaceAIIsEnd;
- }
-
- public QName getQName() {
- if (qname == null) {
- qname = new QName(fixNull(uri), localName, fixNull(prefix));
- }
- return qname;
- }
-
- private String fixNull(String s) {
- return (s == null) ? "" : s;
- }
- }
-
- private final class InternalNamespaceContext implements NamespaceContextEx {
- @SuppressWarnings({"StringEquality"})
- public String getNamespaceURI(String prefix) {
- if (prefix == null) {
- throw new IllegalArgumentException("Prefix cannot be null");
- }
-
- /*
- * If the buffer was created using string interning
- * intern the prefix and check for reference equality
- * rather than using String.equals();
- */
- if (_stringInterningFeature) {
- prefix = prefix.intern();
-
- // Find the most recently declared prefix
- for (int i = _namespaceAIIsEnd - 1; i >=0; i--) {
- if (prefix == _namespaceAIIsPrefix[i]) {
- return _namespaceAIIsNamespaceName[i];
- }
- }
- } else {
- // Find the most recently declared prefix
- for (int i = _namespaceAIIsEnd - 1; i >=0; i--) {
- if (prefix.equals(_namespaceAIIsPrefix[i])) {
- return _namespaceAIIsNamespaceName[i];
- }
- }
- }
-
- // Check for XML-based prefixes
- if (prefix.equals(XMLConstants.XML_NS_PREFIX)) {
- return XMLConstants.XML_NS_URI;
- } else if (prefix.equals(XMLConstants.XMLNS_ATTRIBUTE)) {
- return XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
- }
-
- return null;
- }
-
- public String getPrefix(String namespaceURI) {
- final Iterator i = getPrefixes(namespaceURI);
- if (i.hasNext()) {
- return (String)i.next();
- } else {
- return null;
- }
- }
-
- public Iterator getPrefixes(final String namespaceURI) {
- if (namespaceURI == null){
- throw new IllegalArgumentException("NamespaceURI cannot be null");
- }
-
- if (namespaceURI.equals(XMLConstants.XML_NS_URI)) {
- return Collections.singletonList(XMLConstants.XML_NS_PREFIX).iterator();
- } else if (namespaceURI.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
- return Collections.singletonList(XMLConstants.XMLNS_ATTRIBUTE).iterator();
- }
-
- return new Iterator() {
- private int i = _namespaceAIIsEnd - 1;
- private boolean requireFindNext = true;
- private String p;
-
- private String findNext() {
- while(i >= 0) {
- // Find the most recently declared namespace
- if (namespaceURI.equals(_namespaceAIIsNamespaceName[i])) {
- // Find the most recently declared prefix of the namespace
- // and check if the prefix is in scope with that namespace
- if (getNamespaceURI(_namespaceAIIsPrefix[i]).equals(
- _namespaceAIIsNamespaceName[i])) {
- return p = _namespaceAIIsPrefix[i];
- }
- }
- i--;
- }
- return p = null;
- }
-
- public boolean hasNext() {
- if (requireFindNext) {
- findNext();
- requireFindNext = false;
- }
- return (p != null);
- }
-
- public Object next() {
- if (requireFindNext) {
- findNext();
- }
- requireFindNext = true;
-
- if (p == null) {
- throw new NoSuchElementException();
- }
-
- return p;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
-
- private class BindingImpl implements NamespaceContextEx.Binding {
- final String _prefix;
- final String _namespaceURI;
-
- BindingImpl(String prefix, String namespaceURI) {
- _prefix = prefix;
- _namespaceURI = namespaceURI;
- }
-
- public String getPrefix() {
- return _prefix;
- }
-
- public String getNamespaceURI() {
- return _namespaceURI;
- }
- }
-
- public Iterator<NamespaceContextEx.Binding> iterator() {
- return new Iterator<NamespaceContextEx.Binding>() {
- private final int end = _namespaceAIIsEnd - 1;
- private int current = end;
- private boolean requireFindNext = true;
- private NamespaceContextEx.Binding namespace;
-
- private NamespaceContextEx.Binding findNext() {
- while(current >= 0) {
- final String prefix = _namespaceAIIsPrefix[current];
-
- // Find if the current prefix occurs more recently
- // If so then it is not in scope
- int i = end;
- for (;i > current; i--) {
- if (prefix.equals(_namespaceAIIsPrefix[i])) {
- break;
- }
- }
- if (i == current--) {
- // The current prefix is in-scope
- return namespace = new BindingImpl(prefix, _namespaceAIIsNamespaceName[current]);
- }
- }
- return namespace = null;
- }
-
- public boolean hasNext() {
- if (requireFindNext) {
- findNext();
- requireFindNext = false;
- }
- return (namespace != null);
- }
-
- public NamespaceContextEx.Binding next() {
- if (requireFindNext) {
- findNext();
- }
- requireFindNext = true;
-
- if (namespace == null) {
- throw new NoSuchElementException();
- }
-
- return namespace;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
- }
-
- private class DummyLocation implements Location {
- public int getLineNumber() {
- return -1;
- }
-
- public int getColumnNumber() {
- return -1;
- }
-
- public int getCharacterOffset() {
- return -1;
- }
-
- public String getPublicId() {
- return null;
- }
-
- public String getSystemId() {
- return _buffer.getSystemId();
- }
- }
-
- private static String fixEmptyString(String s) {
- // s must not be null, so no need to check for that. that would be bug.
- if(s.length()==0) return null;
- else return s;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferCreator.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferCreator.java
deleted file mode 100644
index a4c579d2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferCreator.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer.stax;
-
-import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
-import com.sun.xml.internal.org.jvnet.staxex.Base64Data;
-import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx;
-import com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx;
-
-import javax.activation.DataHandler;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import java.io.OutputStream;
-
-/**
- * {@link XMLStreamWriter} that fills {@link MutableXMLStreamBuffer}.
- * <p>
- * TODO: need to retain all attributes/namespaces and then store all namespaces
- * before the attributes. Currently it is necessary for the caller to ensure
- * all namespaces are written before attributes and the caller must not intermix
- * calls to the writeNamespace and writeAttribute methods.
- *
- */
-public class StreamWriterBufferCreator extends StreamBufferCreator implements XMLStreamWriterEx {
- private final NamespaceContexHelper namespaceContext = new NamespaceContexHelper();
-
- /**
- * Nesting depth of the element.
- * This field is ultimately used to keep track of the # of trees we created in
- * the buffer.
- */
- private int depth=0;
-
- public StreamWriterBufferCreator() {
- setXMLStreamBuffer(new MutableXMLStreamBuffer());
- }
-
- public StreamWriterBufferCreator(MutableXMLStreamBuffer buffer) {
- setXMLStreamBuffer(buffer);
- }
-
- // XMLStreamWriter
-
- public Object getProperty(String str) throws IllegalArgumentException {
- return null; //return null for all the property names instead of
- //throwing unsupported operation exception.
- }
-
- public void close() throws XMLStreamException {
- }
-
- public void flush() throws XMLStreamException {
- }
-
- public NamespaceContextEx getNamespaceContext() {
- return namespaceContext;
- }
-
- public void setNamespaceContext(NamespaceContext namespaceContext) throws XMLStreamException {
- /*
- * It is really unclear from the JavaDoc how to implement this method.
- */
- throw new UnsupportedOperationException();
- }
-
- public void setDefaultNamespace(String namespaceURI) throws XMLStreamException {
- setPrefix("", namespaceURI);
- }
-
- public void setPrefix(String prefix, String namespaceURI) throws XMLStreamException {
- namespaceContext.declareNamespace(prefix, namespaceURI);
- }
-
- public String getPrefix(String namespaceURI) throws XMLStreamException {
- return namespaceContext.getPrefix(namespaceURI);
- }
-
-
- public void writeStartDocument() throws XMLStreamException {
- writeStartDocument("", "");
- }
-
- public void writeStartDocument(String version) throws XMLStreamException {
- writeStartDocument("", "");
- }
-
- public void writeStartDocument(String encoding, String version) throws XMLStreamException {
- namespaceContext.resetContexts();
-
- storeStructure(T_DOCUMENT);
- }
-
- public void writeEndDocument() throws XMLStreamException {
- storeStructure(T_END);
- }
-
- public void writeStartElement(String localName) throws XMLStreamException {
- namespaceContext.pushContext();
- depth++;
-
- final String defaultNamespaceURI = namespaceContext.getNamespaceURI("");
-
- if (defaultNamespaceURI == null)
- storeQualifiedName(T_ELEMENT_LN, null, null, localName);
- else
- storeQualifiedName(T_ELEMENT_LN, null, defaultNamespaceURI, localName);
- }
-
- public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException {
- namespaceContext.pushContext();
- depth++;
-
- final String prefix = namespaceContext.getPrefix(namespaceURI);
- if (prefix == null) {
- throw new XMLStreamException();
- }
-
- namespaceContext.pushContext();
- storeQualifiedName(T_ELEMENT_LN, prefix, namespaceURI, localName);
- }
-
- public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
- namespaceContext.pushContext();
- depth++;
-
- storeQualifiedName(T_ELEMENT_LN, prefix, namespaceURI, localName);
- }
-
- public void writeEmptyElement(String localName) throws XMLStreamException {
- writeStartElement(localName);
- writeEndElement();
- }
-
- public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException {
- writeStartElement(namespaceURI, localName);
- writeEndElement();
- }
-
- public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
- writeStartElement(prefix, localName, namespaceURI);
- writeEndElement();
- }
-
- public void writeEndElement() throws XMLStreamException {
- namespaceContext.popContext();
-
- storeStructure(T_END);
- if(--depth==0)
- increaseTreeCount();
- }
-
- public void writeDefaultNamespace(String namespaceURI) throws XMLStreamException {
- storeNamespaceAttribute(null, namespaceURI);
- }
-
- public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException {
- if ("xmlns".equals(prefix))
- prefix = null;
- storeNamespaceAttribute(prefix, namespaceURI);
- }
-
-
- public void writeAttribute(String localName, String value) throws XMLStreamException {
- storeAttribute(null, null, localName, "CDATA", value);
- }
-
- public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException {
- final String prefix = namespaceContext.getPrefix(namespaceURI);
- if (prefix == null) {
- // TODO
- throw new XMLStreamException();
- }
-
- writeAttribute(prefix, namespaceURI, localName, value);
- }
-
- public void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException {
- storeAttribute(prefix, namespaceURI, localName, "CDATA", value);
- }
-
- public void writeCData(String data) throws XMLStreamException {
- storeStructure(T_TEXT_AS_STRING);
- storeContentString(data);
- }
-
- public void writeCharacters(String charData) throws XMLStreamException {
- storeStructure(T_TEXT_AS_STRING);
- storeContentString(charData);
- }
-
- public void writeCharacters(char[] buf, int start, int len) throws XMLStreamException {
- storeContentCharacters(T_TEXT_AS_CHAR_ARRAY, buf, start, len);
- }
-
- public void writeComment(String str) throws XMLStreamException {
- storeStructure(T_COMMENT_AS_STRING);
- storeContentString(str);
- }
-
- public void writeDTD(String str) throws XMLStreamException {
- // not support. just ignore.
- }
-
- public void writeEntityRef(String str) throws XMLStreamException {
- storeStructure(T_UNEXPANDED_ENTITY_REFERENCE);
- storeContentString(str);
- }
-
- public void writeProcessingInstruction(String target) throws XMLStreamException {
- writeProcessingInstruction(target, "");
- }
-
- public void writeProcessingInstruction(String target, String data) throws XMLStreamException {
- storeProcessingInstruction(target, data);
- }
-
- // XMLStreamWriterEx
-
- public void writePCDATA(CharSequence charSequence) throws XMLStreamException {
- if (charSequence instanceof Base64Data) {
- storeStructure(T_TEXT_AS_OBJECT);
- storeContentObject(((Base64Data)charSequence).clone());
- } else {
- writeCharacters(charSequence.toString());
- }
- }
-
- public void writeBinary(byte[] bytes, int offset, int length, String endpointURL) throws XMLStreamException {
- Base64Data d = new Base64Data();
- byte b[] = new byte[length];
- System.arraycopy(bytes, offset, b, 0, length);
- d.set(b, length, null, true);
- storeStructure(T_TEXT_AS_OBJECT);
- storeContentObject(d);
- }
-
- public void writeBinary(DataHandler dataHandler) throws XMLStreamException {
- Base64Data d = new Base64Data();
- d.set(dataHandler);
- storeStructure(T_TEXT_AS_OBJECT);
- storeContentObject(d);
- }
-
- public OutputStream writeBinary(String endpointURL) throws XMLStreamException {
- // TODO
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferProcessor.java b/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferProcessor.java
deleted file mode 100644
index 17110d09..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferProcessor.java
+++ /dev/null
@@ -1,525 +0,0 @@
-/*
- * Copyright (c) 2005, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.stream.buffer.stax;
-
-import com.sun.xml.internal.stream.buffer.AbstractProcessor;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import com.sun.xml.internal.org.jvnet.staxex.Base64Data;
-import com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-
-/**
- * A processor of a {@link XMLStreamBuffer} that writes the XML infoset to a
- * {@link XMLStreamWriter}.
- *
- * @author Paul.Sandoz@Sun.Com
- * @author K.Venugopal@sun.com
- */
-public class StreamWriterBufferProcessor extends AbstractProcessor {
-
-
- public StreamWriterBufferProcessor() {
- }
-
- /**
- * @deprecated
- * Use {@link #StreamWriterBufferProcessor(XMLStreamBuffer, boolean)}
- */
- public StreamWriterBufferProcessor(XMLStreamBuffer buffer) {
- setXMLStreamBuffer(buffer,buffer.isFragment());
- }
-
- /**
- * @param produceFragmentEvent
- * True to generate fragment SAX events without start/endDocument.
- * False to generate a full document SAX events.
- */
- public StreamWriterBufferProcessor(XMLStreamBuffer buffer,boolean produceFragmentEvent) {
- setXMLStreamBuffer(buffer,produceFragmentEvent);
- }
-
- public final void process(XMLStreamBuffer buffer, XMLStreamWriter writer) throws XMLStreamException {
- setXMLStreamBuffer(buffer,buffer.isFragment());
- process(writer);
- }
-
- public void process(XMLStreamWriter writer) throws XMLStreamException {
- if(_fragmentMode){
- writeFragment(writer);
- }else{
- write(writer);
- }
- }
-
- /**
- * @deprecated
- * Use {@link #setXMLStreamBuffer(XMLStreamBuffer, boolean)}
- */
- public void setXMLStreamBuffer(XMLStreamBuffer buffer) {
- setBuffer(buffer);
- }
-
- /**
- * @param produceFragmentEvent
- * True to generate fragment SAX events without start/endDocument.
- * False to generate a full document SAX events.
- */
- public void setXMLStreamBuffer(XMLStreamBuffer buffer, boolean produceFragmentEvent) {
- setBuffer(buffer,produceFragmentEvent);
- }
-
- /**
- * Writes a full XML infoset event to the given writer,
- * including start/end document.
- * Any inscope namespaces present will be written as namespace
- * delcarations on each top-level element.
- */
- public void write(XMLStreamWriter writer) throws XMLStreamException{
-
- if(!_fragmentMode) {
- if(_treeCount>1)
- throw new IllegalStateException("forest cannot be written as a full infoset");
- writer.writeStartDocument();
- }
-
- while(true) {
- int item = getEIIState(peekStructure());
- writer.flush();
-
- switch(item) {
- case STATE_DOCUMENT:
- readStructure(); //skip
- break;
- case STATE_ELEMENT_U_LN_QN:
- case STATE_ELEMENT_P_U_LN:
- case STATE_ELEMENT_U_LN:
- case STATE_ELEMENT_LN:
- writeFragment(writer);
- break;
- case STATE_COMMENT_AS_CHAR_ARRAY_SMALL: {
- readStructure();
- final int length = readStructure();
- final int start = readContentCharactersBuffer(length);
- final String comment = new String(_contentCharactersBuffer, start, length);
- writer.writeComment(comment);
- break;
- }
- case STATE_COMMENT_AS_CHAR_ARRAY_MEDIUM: {
- readStructure();
- final int length = readStructure16();
- final int start = readContentCharactersBuffer(length);
- final String comment = new String(_contentCharactersBuffer, start, length);
- writer.writeComment(comment);
- break;
- }
- case STATE_COMMENT_AS_CHAR_ARRAY_COPY: {
- readStructure();
- final char[] ch = readContentCharactersCopy();
- writer.writeComment(new String(ch));
- break;
- }
- case STATE_PROCESSING_INSTRUCTION:
- readStructure();
- writer.writeProcessingInstruction(readStructureString(), readStructureString());
- break;
- case STATE_END: // done
- readStructure();
- writer.writeEndDocument();
- return;
- default:
- throw new XMLStreamException("Invalid State "+item);
- }
- }
-
- }
-
- /**
- * Writes the buffer as a fragment, meaning
- * the writer will not receive start/endDocument events.
- * Any inscope namespaces present will be written as namespace
- * delcarations on each top-level element.
- * <p>
- * If {@link XMLStreamBuffer} has a forest, this method will write all the forests.
- */
- public void writeFragment(XMLStreamWriter writer) throws XMLStreamException {
- if (writer instanceof XMLStreamWriterEx) {
- writeFragmentEx((XMLStreamWriterEx)writer);
- } else {
- writeFragmentNoEx(writer);
- }
- }
-
- public void writeFragmentEx(XMLStreamWriterEx writer) throws XMLStreamException {
- int depth = 0; // used to determine when we are done with a tree.
-
- int item = getEIIState(peekStructure());
- if(item==STATE_DOCUMENT)
- readStructure(); // skip STATE_DOCUMENT
-
- do {
-
- item = readEiiState();
-
- switch(item) {
- case STATE_DOCUMENT:
- throw new AssertionError();
- case STATE_ELEMENT_U_LN_QN: {
- depth ++;
- final String uri = readStructureString();
- final String localName = readStructureString();
- final String prefix = getPrefixFromQName(readStructureString());
- writer.writeStartElement(prefix,localName,uri);
- writeAttributes(writer, isInscope(depth));
- break;
- }
- case STATE_ELEMENT_P_U_LN: {
- depth ++;
- final String prefix = readStructureString();
- final String uri = readStructureString();
- final String localName = readStructureString();
- writer.writeStartElement(prefix,localName,uri);
- writeAttributes(writer, isInscope(depth));
- break;
- }
- case STATE_ELEMENT_U_LN: {
- depth ++;
- final String uri = readStructureString();
- final String localName = readStructureString();
- writer.writeStartElement("",localName,uri);
- writeAttributes(writer, isInscope(depth));
- break;
- }
- case STATE_ELEMENT_LN: {
- depth ++;
- final String localName = readStructureString();
- writer.writeStartElement(localName);
- writeAttributes(writer, isInscope(depth));
- break;
- }
- case STATE_TEXT_AS_CHAR_ARRAY_SMALL: {
- final int length = readStructure();
- final int start = readContentCharactersBuffer(length);
- writer.writeCharacters(_contentCharactersBuffer,start,length);
- break;
- }
- case STATE_TEXT_AS_CHAR_ARRAY_MEDIUM: {
- final int length = readStructure16();
- final int start = readContentCharactersBuffer(length);
- writer.writeCharacters(_contentCharactersBuffer,start,length);
- break;
- }
- case STATE_TEXT_AS_CHAR_ARRAY_COPY: {
- char[] c = readContentCharactersCopy();
- writer.writeCharacters(c,0,c.length);
- break;
- }
- case STATE_TEXT_AS_STRING: {
- final String s = readContentString();
- writer.writeCharacters(s);
- break;
- }
- case STATE_TEXT_AS_OBJECT: {
- final CharSequence c = (CharSequence)readContentObject();
- writer.writePCDATA(c);
- break;
- }
- case STATE_COMMENT_AS_CHAR_ARRAY_SMALL: {
- final int length = readStructure();
- final int start = readContentCharactersBuffer(length);
- final String comment = new String(_contentCharactersBuffer, start, length);
- writer.writeComment(comment);
- break;
- }
- case STATE_COMMENT_AS_CHAR_ARRAY_MEDIUM: {
- final int length = readStructure16();
- final int start = readContentCharactersBuffer(length);
- final String comment = new String(_contentCharactersBuffer, start, length);
- writer.writeComment(comment);
- break;
- }
- case STATE_COMMENT_AS_CHAR_ARRAY_COPY: {
- final char[] ch = readContentCharactersCopy();
- writer.writeComment(new String(ch));
- break;
- }
- case STATE_PROCESSING_INSTRUCTION:
- writer.writeProcessingInstruction(readStructureString(), readStructureString());
- break;
- case STATE_END:
- writer.writeEndElement();
- depth --;
- if(depth==0)
- _treeCount--;
- break;
- default:
- throw new XMLStreamException("Invalid State "+item);
- }
- } while(depth>0 || _treeCount>0);
-
- }
-
- public void writeFragmentNoEx(XMLStreamWriter writer) throws XMLStreamException {
- int depth = 0;
-
- int item = getEIIState(peekStructure());
- if(item==STATE_DOCUMENT)
- readStructure(); // skip STATE_DOCUMENT
-
- do {
- item = readEiiState();
-
- switch(item) {
- case STATE_DOCUMENT:
- throw new AssertionError();
- case STATE_ELEMENT_U_LN_QN: {
- depth ++;
- final String uri = readStructureString();
- final String localName = readStructureString();
- final String prefix = getPrefixFromQName(readStructureString());
- writer.writeStartElement(prefix,localName,uri);
- writeAttributes(writer, isInscope(depth));
- break;
- }
- case STATE_ELEMENT_P_U_LN: {
- depth ++;
- final String prefix = readStructureString();
- final String uri = readStructureString();
- final String localName = readStructureString();
- writer.writeStartElement(prefix,localName,uri);
- writeAttributes(writer, isInscope(depth));
- break;
- }
- case STATE_ELEMENT_U_LN: {
- depth ++;
- final String uri = readStructureString();
- final String localName = readStructureString();
- writer.writeStartElement("",localName,uri);
- writeAttributes(writer, isInscope(depth));
- break;
- }
- case STATE_ELEMENT_LN: {
- depth ++;
- final String localName = readStructureString();
- writer.writeStartElement(localName);
- writeAttributes(writer, isInscope(depth));
- break;
- }
- case STATE_TEXT_AS_CHAR_ARRAY_SMALL: {
- final int length = readStructure();
- final int start = readContentCharactersBuffer(length);
- writer.writeCharacters(_contentCharactersBuffer,start,length);
- break;
- }
- case STATE_TEXT_AS_CHAR_ARRAY_MEDIUM: {
- final int length = readStructure16();
- final int start = readContentCharactersBuffer(length);
- writer.writeCharacters(_contentCharactersBuffer,start,length);
- break;
- }
- case STATE_TEXT_AS_CHAR_ARRAY_COPY: {
- char[] c = readContentCharactersCopy();
- writer.writeCharacters(c,0,c.length);
- break;
- }
- case STATE_TEXT_AS_STRING: {
- final String s = readContentString();
- writer.writeCharacters(s);
- break;
- }
- case STATE_TEXT_AS_OBJECT: {
- final CharSequence c = (CharSequence)readContentObject();
- if (c instanceof Base64Data) {
- try {
- Base64Data bd = (Base64Data)c;
- bd.writeTo(writer);
- } catch (IOException e) {
- throw new XMLStreamException(e);
- }
- } else {
- writer.writeCharacters(c.toString());
- }
- break;
- }
- case STATE_COMMENT_AS_CHAR_ARRAY_SMALL: {
- final int length = readStructure();
- final int start = readContentCharactersBuffer(length);
- final String comment = new String(_contentCharactersBuffer, start, length);
- writer.writeComment(comment);
- break;
- }
- case STATE_COMMENT_AS_CHAR_ARRAY_MEDIUM: {
- final int length = readStructure16();
- final int start = readContentCharactersBuffer(length);
- final String comment = new String(_contentCharactersBuffer, start, length);
- writer.writeComment(comment);
- break;
- }
- case STATE_COMMENT_AS_CHAR_ARRAY_COPY: {
- final char[] ch = readContentCharactersCopy();
- writer.writeComment(new String(ch));
- break;
- }
- case STATE_PROCESSING_INSTRUCTION:
- writer.writeProcessingInstruction(readStructureString(), readStructureString());
- break;
- case STATE_END:
- writer.writeEndElement();
- depth --;
- if(depth==0)
- _treeCount--;
- break;
- default:
- throw new XMLStreamException("Invalid State "+item);
- }
- } while(depth > 0 || _treeCount>0);
-
- }
-
- private boolean isInscope(int depth) {
- return _buffer.getInscopeNamespaces().size() > 0 && depth ==1;
- }
-
- /*
- * @param inscope: true means write inscope namespaces
- */
- private void writeAttributes(XMLStreamWriter writer, boolean inscope) throws XMLStreamException {
- // prefixSet to collect prefixes that are written before writing inscope namespaces
- Set<String> prefixSet = inscope ? new HashSet<String>() : Collections.<String>emptySet();
- int item = peekStructure();
- if ((item & TYPE_MASK) == T_NAMESPACE_ATTRIBUTE) {
- // Skip the namespace declarations on the element
- // they will have been added already
- item = writeNamespaceAttributes(item, writer, inscope, prefixSet);
- }
- if (inscope) {
- writeInscopeNamespaces(writer, prefixSet);
- }
- if ((item & TYPE_MASK) == T_ATTRIBUTE) {
- writeAttributes(item, writer);
- }
- }
-
- private static String fixNull(String s) {
- if (s == null) return "";
- else return s;
- }
-
- /*
- * @param prefixSet: already written prefixes
- */
- private void writeInscopeNamespaces(XMLStreamWriter writer, Set<String> prefixSet) throws XMLStreamException {
- for (Map.Entry<String, String> e : _buffer.getInscopeNamespaces().entrySet()) {
- String key = fixNull(e.getKey());
- // If the prefix is already written, do not write the prefix
- if (!prefixSet.contains(key)) {
- writer.writeNamespace(key, e.getValue());
- }
- }
- }
-
- private int writeNamespaceAttributes(int item, XMLStreamWriter writer, boolean collectPrefixes, Set<String> prefixSet) throws XMLStreamException {
- do {
- switch(getNIIState(item)){
- case STATE_NAMESPACE_ATTRIBUTE:
- // Undeclaration of default namespace
- writer.writeDefaultNamespace("");
- if (collectPrefixes) {
- prefixSet.add("");
- }
- break;
- case STATE_NAMESPACE_ATTRIBUTE_P:
- // Undeclaration of namespace
- // Declaration with prefix
- String prefix = readStructureString();
- writer.writeNamespace(prefix, "");
- if (collectPrefixes) {
- prefixSet.add(prefix);
- }
- break;
- case STATE_NAMESPACE_ATTRIBUTE_P_U:
- // Declaration with prefix
- prefix = readStructureString();
- writer.writeNamespace(prefix, readStructureString());
- if (collectPrefixes) {
- prefixSet.add(prefix);
- }
- break;
- case STATE_NAMESPACE_ATTRIBUTE_U:
- // Default declaration
- writer.writeDefaultNamespace(readStructureString());
- if (collectPrefixes) {
- prefixSet.add("");
- }
- break;
- }
- readStructure();
-
- item = peekStructure();
- } while((item & TYPE_MASK) == T_NAMESPACE_ATTRIBUTE);
-
- return item;
- }
-
- private void writeAttributes(int item, XMLStreamWriter writer) throws XMLStreamException {
- do {
- switch(getAIIState(item)) {
- case STATE_ATTRIBUTE_U_LN_QN: {
- final String uri = readStructureString();
- final String localName = readStructureString();
- final String prefix = getPrefixFromQName(readStructureString());
- writer.writeAttribute(prefix,uri,localName,readContentString());
- break;
- }
- case STATE_ATTRIBUTE_P_U_LN:
- writer.writeAttribute(readStructureString(), readStructureString(),
- readStructureString(), readContentString());
- break;
- case STATE_ATTRIBUTE_U_LN:
- writer.writeAttribute(readStructureString(), readStructureString(), readContentString());
- break;
- case STATE_ATTRIBUTE_LN:
- writer.writeAttribute(readStructureString(), readContentString());
- break;
- }
- // Ignore the attribute type
- readStructureString();
-
- readStructure();
-
- item = peekStructure();
- } while((item & TYPE_MASK) == T_ATTRIBUTE);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/Attribute.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/Attribute.java
deleted file mode 100644
index fcfc2cf5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/Attribute.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class Attribute {
- final String nsUri;
- final String localName;
-
- /**
- * Attributes of an element form a linked list.
- */
- Attribute next;
-
- /**
- * Attribute value that potentially contains dummy prefixes.
- */
- final StringBuilder value = new StringBuilder();
-
- Attribute(String nsUri, String localName) {
- assert nsUri!=null && localName!=null;
-
- this.nsUri = nsUri;
- this.localName = localName;
- }
-
- boolean hasName( String nsUri, String localName ) {
- return this.localName.equals(localName) && this.nsUri.equals(nsUri);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/Cdata.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/Cdata.java
deleted file mode 100644
index 0ef64b6b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/Cdata.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * CDATA section.
- *
- * @author Kohsuke Kawaguchi
- */
-final class Cdata extends Text {
- Cdata(Document document, NamespaceResolver nsResolver, Object obj) {
- super(document, nsResolver, obj);
- }
-
- void accept(ContentVisitor visitor) {
- visitor.onCdata(buffer);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/Comment.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/Comment.java
deleted file mode 100644
index 93eb630b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/Comment.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * Comment.
- *
- * @author Kohsuke Kawaguchi
- */
-final class Comment extends Content {
- /**
- * The text to be writtten.
- */
- private final StringBuilder buffer = new StringBuilder();
-
- public Comment(Document document, NamespaceResolver nsResolver, Object obj) {
- document.writeValue(obj,nsResolver,buffer);
- }
-
- boolean concludesPendingStartTag() {
- return false;
- }
-
- void accept(ContentVisitor visitor) {
- visitor.onComment(buffer);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/ContainerElement.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/ContainerElement.java
deleted file mode 100644
index fb7ba89d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/ContainerElement.java
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.txw2.annotation.XmlNamespace;
-import com.sun.xml.internal.txw2.annotation.XmlValue;
-import com.sun.xml.internal.txw2.annotation.XmlCDATA;
-
-import javax.xml.namespace.QName;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
-/**
- * Dynamically implements {@link TypedXmlWriter} interfaces.
- *
- * @author Kohsuke Kawaguchi
- */
-final class ContainerElement implements InvocationHandler, TypedXmlWriter {
-
- final Document document;
-
- /**
- * Initially, point to the start tag token, but
- * once we know we are done with the start tag, we will reset it to null
- * so that the token sequence can be GC-ed.
- */
- StartTag startTag;
- final EndTag endTag = new EndTag();
-
- /**
- * Namespace URI of this element.
- */
- private final String nsUri;
-
- /**
- * When this element can accept more child content, this value
- * is non-null and holds the last child {@link Content}.
- *
- * If this element is committed, this parameter is null.
- */
- private Content tail;
-
- /**
- * Uncommitted {@link ContainerElement}s form a doubly-linked list,
- * so that the parent can close them recursively.
- */
- private ContainerElement prevOpen;
- private ContainerElement nextOpen;
- private final ContainerElement parent;
- private ContainerElement lastOpenChild;
-
- /**
- * Set to true if the start eleent is blocked.
- */
- private boolean blocked;
-
- public ContainerElement(Document document,ContainerElement parent,String nsUri, String localName) {
- this.parent = parent;
- this.document = document;
- this.nsUri = nsUri;
- this.startTag = new StartTag(this,nsUri,localName);
- tail = startTag;
-
- if(isRoot())
- document.setFirstContent(startTag);
- }
-
- private boolean isRoot() {
- return parent==null;
- }
-
- private boolean isCommitted() {
- return tail==null;
- }
-
- public Document getDocument() {
- return document;
- }
-
- boolean isBlocked() {
- return blocked && !isCommitted();
- }
-
- public void block() {
- blocked = true;
- }
-
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- if(method.getDeclaringClass()==TypedXmlWriter.class || method.getDeclaringClass()==Object.class) {
- // forward to myself
- try {
- return method.invoke(this,args);
- } catch (InvocationTargetException e) {
- throw e.getTargetException();
- }
- }
-
- XmlAttribute xa = method.getAnnotation(XmlAttribute.class);
- XmlValue xv = method.getAnnotation(XmlValue.class);
- XmlElement xe = method.getAnnotation(XmlElement.class);
-
-
- if(xa!=null) {
- if(xv!=null || xe!=null)
- throw new IllegalAnnotationException(method.toString());
-
- addAttribute(xa,method,args);
- return proxy; // allow method chaining
- }
- if(xv!=null) {
- if(xe!=null)
- throw new IllegalAnnotationException(method.toString());
-
- _pcdata(args);
- return proxy; // allow method chaining
- }
-
- return addElement(xe,method,args);
- }
-
- /**
- * Writes an attribute.
- */
- private void addAttribute(XmlAttribute xa, Method method, Object[] args) {
- assert xa!=null;
-
- checkStartTag();
-
- String localName = xa.value();
- if(xa.value().length()==0)
- localName = method.getName();
-
- _attribute(xa.ns(),localName,args);
- }
-
- private void checkStartTag() {
- if(startTag==null)
- throw new IllegalStateException("start tag has already been written");
- }
-
- /**
- * Writes a new element.
- */
- private Object addElement(XmlElement e, Method method, Object[] args) {
- Class<?> rt = method.getReturnType();
-
- // the last precedence: default name
- String nsUri = "##default";
- String localName = method.getName();
-
- if(e!=null) {
- // then the annotation on this method
- if(e.value().length()!=0)
- localName = e.value();
- nsUri = e.ns();
- }
-
- if(nsUri.equals("##default")) {
- // look for the annotation on the declaring class
- Class<?> c = method.getDeclaringClass();
- XmlElement ce = c.getAnnotation(XmlElement.class);
- if(ce!=null) {
- nsUri = ce.ns();
- }
-
- if(nsUri.equals("##default"))
- // then default to the XmlNamespace
- nsUri = getNamespace(c.getPackage());
- }
-
-
-
- if(rt==Void.TYPE) {
- // leaf element with just a value
-
- boolean isCDATA = method.getAnnotation(XmlCDATA.class)!=null;
-
- StartTag st = new StartTag(document,nsUri,localName);
- addChild(st);
- for( Object arg : args ) {
- Text text;
- if(isCDATA) text = new Cdata(document,st,arg);
- else text = new Pcdata(document,st,arg);
- addChild(text);
- }
- addChild(new EndTag());
- return null;
- }
- if(TypedXmlWriter.class.isAssignableFrom(rt)) {
- // sub writer
- return _element(nsUri,localName,(Class)rt);
- }
-
- throw new IllegalSignatureException("Illegal return type: "+rt);
- }
-
- /**
- * Decides the namespace URI of the given package.
- */
- private String getNamespace(Package pkg) {
- if(pkg==null) return "";
-
- String nsUri;
- XmlNamespace ns = pkg.getAnnotation(XmlNamespace.class);
- if(ns!=null)
- nsUri = ns.value();
- else
- nsUri = "";
- return nsUri;
- }
-
- /**
- * Appends this child object to the tail.
- */
- private void addChild(Content child) {
- tail.setNext(document,child);
- tail = child;
- }
-
- public void commit() {
- commit(true);
- }
-
- public void commit(boolean includingAllPredecessors) {
- _commit(includingAllPredecessors);
- document.flush();
- }
-
- private void _commit(boolean includingAllPredecessors) {
- if(isCommitted()) return;
-
- addChild(endTag);
- if(isRoot())
- addChild(new EndDocument());
- tail = null;
-
- // _commit predecessors if so told
- if(includingAllPredecessors) {
- for( ContainerElement e=this; e!=null; e=e.parent ) {
- while(e.prevOpen!=null) {
- e.prevOpen._commit(false);
- // e.prevOpen should change as a result of committing it.
- }
- }
- }
-
- // _commit all children recursively
- while(lastOpenChild!=null)
- lastOpenChild._commit(false);
-
- // remove this node from the link
- if(parent!=null) {
- if(parent.lastOpenChild==this) {
- assert nextOpen==null : "this must be the last one";
- parent.lastOpenChild = prevOpen;
- } else {
- assert nextOpen.prevOpen==this;
- nextOpen.prevOpen = this.prevOpen;
- }
- if(prevOpen!=null) {
- assert prevOpen.nextOpen==this;
- prevOpen.nextOpen = this.nextOpen;
- }
- }
-
- this.nextOpen = null;
- this.prevOpen = null;
- }
-
- public void _attribute(String localName, Object value) {
- _attribute("",localName,value);
- }
-
- public void _attribute(String nsUri, String localName, Object value) {
- checkStartTag();
- startTag.addAttribute(nsUri,localName,value);
- }
-
- public void _attribute(QName attributeName, Object value) {
- _attribute(attributeName.getNamespaceURI(),attributeName.getLocalPart(),value);
- }
-
- public void _namespace(String uri) {
- _namespace(uri,false);
- }
-
- public void _namespace(String uri, String prefix) {
- if(prefix==null)
- throw new IllegalArgumentException();
- checkStartTag();
- startTag.addNamespaceDecl(uri,prefix,false);
- }
-
- public void _namespace(String uri, boolean requirePrefix) {
- checkStartTag();
- startTag.addNamespaceDecl(uri,null,requirePrefix);
- }
-
- public void _pcdata(Object value) {
- // we need to allow this method even when startTag has already been completed.
- // checkStartTag();
- addChild(new Pcdata(document,startTag,value));
- }
-
- public void _cdata(Object value) {
- addChild(new Cdata(document,startTag,value));
- }
-
- public void _comment(Object value) throws UnsupportedOperationException {
- addChild(new Comment(document,startTag,value));
- }
-
- public <T extends TypedXmlWriter> T _element(String localName, Class<T> contentModel) {
- return _element(nsUri,localName,contentModel);
- }
-
- public <T extends TypedXmlWriter> T _element(QName tagName, Class<T> contentModel) {
- return _element(tagName.getNamespaceURI(),tagName.getLocalPart(),contentModel);
- }
-
- public <T extends TypedXmlWriter> T _element(Class<T> contentModel) {
- return _element(TXW.getTagName(contentModel),contentModel);
- }
-
- public <T extends TypedXmlWriter> T _cast(Class<T> facadeType) {
- return facadeType.cast(Proxy.newProxyInstance(facadeType.getClassLoader(),new Class[]{facadeType},this));
- }
-
- public <T extends TypedXmlWriter> T _element(String nsUri, String localName, Class<T> contentModel) {
- ContainerElement child = new ContainerElement(document,this,nsUri,localName);
- addChild(child.startTag);
- tail = child.endTag;
-
- // update uncommitted link list
- if(lastOpenChild!=null) {
- assert lastOpenChild.parent==this;
-
- assert child.prevOpen==null;
- assert child.nextOpen==null;
- child.prevOpen = lastOpenChild;
- assert lastOpenChild.nextOpen==null;
- lastOpenChild.nextOpen = child;
- }
-
- this.lastOpenChild = child;
-
- return child._cast(contentModel);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/Content.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/Content.java
deleted file mode 100644
index 7ef7b500..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/Content.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-abstract class Content {
- private Content next;
-
- /**
- * Returns null if the next token has not decided yet.
- */
- final Content getNext() {
- return next;
- }
-
- /**
- *
- * @param doc
- * A {@link Content} object is so light-weight that
- * it doesn't even remember what document it belongs to.
- * So the caller needs to "remind" a {@link Content}
- * who its owner is.
- */
- final void setNext(Document doc,Content next) {
- assert next!=null;
- assert this.next==null : "next of "+this+" is already set to "+this.next;
- this.next = next;
- doc.run();
- }
-
- /**
- * Returns true if this content is ready to be committed.
- */
- boolean isReadyToCommit() {
- return true;
- }
-
- /**
- * Returns true if this {@link Content} can guarantee that
- * no more new namespace decls is necessary for the currently
- * pending start tag.
- */
- abstract boolean concludesPendingStartTag();
-
- /**
- * Accepts a visitor.
- */
- abstract void accept(ContentVisitor visitor);
-
- /**
- * Called when this content is written to the output.
- */
- public void written() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/ContentVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/ContentVisitor.java
deleted file mode 100644
index f8006e82..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/ContentVisitor.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * Visits {@link Content}.
- *
- * @author Kohsuke Kawaguchi
- */
-interface ContentVisitor {
- void onStartDocument();
-
- void onEndDocument();
-
- void onEndTag();
-
- void onPcdata(StringBuilder buffer);
-
- void onCdata(StringBuilder buffer);
-
- void onStartTag(String nsUri, String localName, Attribute attributes, NamespaceDecl namespaces);
-
- void onComment(StringBuilder buffer);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/DatatypeWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/DatatypeWriter.java
deleted file mode 100644
index 5153ea04..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/DatatypeWriter.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-import java.util.AbstractList;
-import java.util.Collections;
-import java.util.List;
-import javax.xml.namespace.QName;
-
-/**
- * Pluggable datatype writer.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface DatatypeWriter<DT> {
-
- /**
- * Gets the Java class that this writer can write.
- *
- * @return
- * must not be null. Must be the same value always.
- */
- Class<DT> getType();
-
- /**
- * Prints the given datatype object and appends that result
- * into the given buffer.
- *
- * @param dt
- * the datatype object to be printed.
- * @param resolver
- * allows the converter to declare additional namespace prefixes.
- */
- void print(DT dt, NamespaceResolver resolver, StringBuilder buf);
-
- static final List<DatatypeWriter<?>> BUILTIN = Collections.unmodifiableList(new AbstractList() {
-
- private DatatypeWriter<?>[] BUILTIN_ARRAY = new DatatypeWriter<?>[] {
- new DatatypeWriter<String>() {
- public Class<String> getType() {
- return String.class;
- }
- public void print(String s, NamespaceResolver resolver, StringBuilder buf) {
- buf.append(s);
- }
- },
- new DatatypeWriter<Integer>() {
- public Class<Integer> getType() {
- return Integer.class;
- }
- public void print(Integer i, NamespaceResolver resolver, StringBuilder buf) {
- buf.append(i);
- }
- },
- new DatatypeWriter<Float>() {
- public Class<Float> getType() {
- return Float.class;
- }
- public void print(Float f, NamespaceResolver resolver, StringBuilder buf) {
- buf.append(f);
- }
- },
- new DatatypeWriter<Double>() {
- public Class<Double> getType() {
- return Double.class;
- }
- public void print(Double d, NamespaceResolver resolver, StringBuilder buf) {
- buf.append(d);
- }
- },
- new DatatypeWriter<QName>() {
- public Class<QName> getType() {
- return QName.class;
- }
- public void print(QName qn, NamespaceResolver resolver, StringBuilder buf) {
- String p = resolver.getPrefix(qn.getNamespaceURI());
- if(p.length()!=0)
- buf.append(p).append(':');
- buf.append(qn.getLocalPart());
- }
- }
- };
-
- public DatatypeWriter<?> get(int n) {
- return BUILTIN_ARRAY[n];
- }
-
- public int size() {
- return BUILTIN_ARRAY.length;
- }
- });
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/Document.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/Document.java
deleted file mode 100644
index 0cf3e5e4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/Document.java
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-import com.sun.xml.internal.txw2.output.XmlSerializer;
-
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * Coordinates the entire writing process.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class Document {
-
- private final XmlSerializer out;
-
- /**
- * Set to true once we invoke {@link XmlSerializer#startDocument()}.
- *
- * <p>
- * This is so that we can defer the writing as much as possible.
- */
- private boolean started=false;
-
- /**
- * Currently active writer.
- *
- * <p>
- * This points to the last written token.
- */
- private Content current = null;
-
- private final Map<Class,DatatypeWriter> datatypeWriters = new HashMap<Class,DatatypeWriter>();
-
- /**
- * Used to generate unique namespace prefix.
- */
- private int iota = 1;
-
- /**
- * Used to keep track of in-scope namespace bindings declared in ancestors.
- */
- private final NamespaceSupport inscopeNamespace = new NamespaceSupport();
-
- /**
- * Remembers the namespace declarations of the last unclosed start tag,
- * so that we can fix up dummy prefixes in {@link Pcdata}.
- */
- private NamespaceDecl activeNamespaces;
-
-
- Document(XmlSerializer out) {
- this.out = out;
- for( DatatypeWriter dw : DatatypeWriter.BUILTIN )
- datatypeWriters.put(dw.getType(),dw);
- }
-
- void flush() {
- out.flush();
- }
-
- void setFirstContent(Content c) {
- assert current==null;
- current = new StartDocument();
- current.setNext(this,c);
- }
-
- /**
- * Defines additional user object -> string conversion logic.
- *
- * <p>
- * Applications can add their own {@link DatatypeWriter} so that
- * application-specific objects can be turned into {@link String}
- * for output.
- *
- * @param dw
- * The {@link DatatypeWriter} to be added. Must not be null.
- */
- public void addDatatypeWriter( DatatypeWriter<?> dw ) {
- datatypeWriters.put(dw.getType(),dw);
- }
-
- /**
- * Performs the output as much as possible
- */
- void run() {
- while(true) {
- Content next = current.getNext();
- if(next==null || !next.isReadyToCommit())
- return;
- next.accept(visitor);
- next.written();
- current = next;
- }
- }
-
- /**
- * Appends the given object to the end of the given buffer.
- *
- * @param nsResolver
- * use
- */
- void writeValue( Object obj, NamespaceResolver nsResolver, StringBuilder buf ) {
- if(obj==null)
- throw new IllegalArgumentException("argument contains null");
-
- if(obj instanceof Object[]) {
- for( Object o : (Object[])obj )
- writeValue(o,nsResolver,buf);
- return;
- }
- if(obj instanceof Iterable) {
- for( Object o : (Iterable<?>)obj )
- writeValue(o,nsResolver,buf);
- return;
- }
-
- if(buf.length()>0)
- buf.append(' ');
-
- Class c = obj.getClass();
- while(c!=null) {
- DatatypeWriter dw = datatypeWriters.get(c);
- if(dw!=null) {
- dw.print(obj,nsResolver,buf);
- return;
- }
- c = c.getSuperclass();
- }
-
- // if nothing applies, just use toString
- buf.append(obj);
- }
-
- // I wanted to hide those write method from users
- private final ContentVisitor visitor = new ContentVisitor() {
- public void onStartDocument() {
- // the startDocument token is used as the sentry, so this method shall never
- // be called.
- // out.startDocument() is invoked when we write the start tag of the root element.
- throw new IllegalStateException();
- }
-
- public void onEndDocument() {
- out.endDocument();
- }
-
- public void onEndTag() {
- out.endTag();
- inscopeNamespace.popContext();
- activeNamespaces = null;
- }
-
- public void onPcdata(StringBuilder buffer) {
- if(activeNamespaces!=null)
- buffer = fixPrefix(buffer);
- out.text(buffer);
- }
-
- public void onCdata(StringBuilder buffer) {
- if(activeNamespaces!=null)
- buffer = fixPrefix(buffer);
- out.cdata(buffer);
- }
-
- public void onComment(StringBuilder buffer) {
- if(activeNamespaces!=null)
- buffer = fixPrefix(buffer);
- out.comment(buffer);
- }
-
- public void onStartTag(String nsUri, String localName, Attribute attributes, NamespaceDecl namespaces) {
- assert nsUri!=null;
- assert localName!=null;
-
- activeNamespaces = namespaces;
-
- if(!started) {
- started = true;
- out.startDocument();
- }
-
- inscopeNamespace.pushContext();
-
- // declare the explicitly bound namespaces
- for( NamespaceDecl ns=namespaces; ns!=null; ns=ns.next ) {
- ns.declared = false; // reset this flag
-
- if(ns.prefix!=null) {
- String uri = inscopeNamespace.getURI(ns.prefix);
- if(uri!=null && uri.equals(ns.uri))
- ; // already declared
- else {
- // declare this new binding
- inscopeNamespace.declarePrefix(ns.prefix,ns.uri);
- ns.declared = true;
- }
- }
- }
-
- // then use in-scope namespace to assign prefixes to others
- for( NamespaceDecl ns=namespaces; ns!=null; ns=ns.next ) {
- if(ns.prefix==null) {
- if(inscopeNamespace.getURI("").equals(ns.uri))
- ns.prefix="";
- else {
- String p = inscopeNamespace.getPrefix(ns.uri);
- if(p==null) {
- // assign a new one
- while(inscopeNamespace.getURI(p=newPrefix())!=null)
- ;
- ns.declared = true;
- inscopeNamespace.declarePrefix(p,ns.uri);
- }
- ns.prefix = p;
- }
- }
- }
-
- // the first namespace decl must be the one for the element
- assert namespaces.uri.equals(nsUri);
- assert namespaces.prefix!=null : "a prefix must have been all allocated";
- out.beginStartTag(nsUri,localName,namespaces.prefix);
-
- // declare namespaces
- for( NamespaceDecl ns=namespaces; ns!=null; ns=ns.next ) {
- if(ns.declared)
- out.writeXmlns( ns.prefix, ns.uri );
- }
-
- // writeBody attributes
- for( Attribute a=attributes; a!=null; a=a.next) {
- String prefix;
- if(a.nsUri.length()==0) prefix="";
- else prefix=inscopeNamespace.getPrefix(a.nsUri);
- out.writeAttribute( a.nsUri, a.localName, prefix, fixPrefix(a.value) );
- }
-
- out.endStartTag(nsUri,localName,namespaces.prefix);
- }
- };
-
- /**
- * Used by {@link #newPrefix()}.
- */
- private final StringBuilder prefixSeed = new StringBuilder("ns");
-
- private int prefixIota = 0;
-
- /**
- * Allocates a new unique prefix.
- */
- private String newPrefix() {
- prefixSeed.setLength(2);
- prefixSeed.append(++prefixIota);
- return prefixSeed.toString();
- }
-
- /**
- * Replaces dummy prefixes in the value to the real ones
- * by using {@link #activeNamespaces}.
- *
- * @return
- * the buffer passed as the <tt>buf</tt> parameter.
- */
- private StringBuilder fixPrefix(StringBuilder buf) {
- assert activeNamespaces!=null;
-
- int i;
- int len=buf.length();
- for(i=0;i<len;i++)
- if( buf.charAt(i)==MAGIC )
- break;
- // typically it doens't contain any prefix.
- // just return the original buffer in that case
- if(i==len)
- return buf;
-
- while(i<len) {
- char uriIdx = buf.charAt(i+1);
- NamespaceDecl ns = activeNamespaces;
- while(ns!=null && ns.uniqueId!=uriIdx)
- ns=ns.next;
- if(ns==null)
- throw new IllegalStateException("Unexpected use of prefixes "+buf);
-
- int length = 2;
- String prefix = ns.prefix;
- if(prefix.length()==0) {
- if(buf.length()<=i+2 || buf.charAt(i+2)!=':')
- throw new IllegalStateException("Unexpected use of prefixes "+buf);
- length=3;
- }
-
- buf.replace(i,i+length,prefix);
- len += prefix.length()-length;
-
- while(i<len && buf.charAt(i)!=MAGIC)
- i++;
- }
-
- return buf;
- }
-
- /**
- * The first char of the dummy prefix.
- */
- static final char MAGIC = '\u0000';
-
- char assignNewId() {
- return (char)iota++;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/EndDocument.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/EndDocument.java
deleted file mode 100644
index edfb240e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/EndDocument.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class EndDocument extends Content {
- boolean concludesPendingStartTag() {
- return true;
- }
-
- void accept(ContentVisitor visitor) {
- visitor.onEndDocument();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/EndTag.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/EndTag.java
deleted file mode 100644
index d268f678..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/EndTag.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class EndTag extends Content {
- boolean concludesPendingStartTag() {
- return true;
- }
-
- void accept(ContentVisitor visitor) {
- visitor.onEndTag();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/IllegalAnnotationException.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/IllegalAnnotationException.java
deleted file mode 100644
index a28b66f0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/IllegalAnnotationException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * Signals an incorrect use of TXW annotations.
- *
- * @author Kohsuke Kawaguchi
- */
-public class IllegalAnnotationException extends TxwException {
- public IllegalAnnotationException(String message) {
- super(message);
- }
-
- public IllegalAnnotationException(Throwable cause) {
- super(cause);
- }
-
- public IllegalAnnotationException(String message, Throwable cause) {
- super(message, cause);
- }
-
- private static final long serialVersionUID = 1L;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/IllegalSignatureException.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/IllegalSignatureException.java
deleted file mode 100644
index b891ac18..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/IllegalSignatureException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * Signals incorrect method signatures on {@link TypedXmlWriter}-derived interfaces.
- *
- * @author Kohsuke Kawaguchi
- */
-public class IllegalSignatureException extends TxwException {
- public IllegalSignatureException(String message) {
- super(message);
- }
-
- public IllegalSignatureException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public IllegalSignatureException(Throwable cause) {
- super(cause);
- }
-
- private static final long serialVersionUID = 1L;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/NamespaceDecl.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/NamespaceDecl.java
deleted file mode 100644
index e3cbced1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/NamespaceDecl.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * Namespace declarations.
- *
- * @author Kohsuke Kawaguchi
- */
-final class NamespaceDecl {
- final String uri;
-
- boolean requirePrefix;
-
- /**
- * Dummy prefix assigned for this namespace decl.
- */
- final String dummyPrefix;
-
- final char uniqueId;
-
- /**
- * Set to the real prefix once that's computed.
- */
- String prefix;
-
- /**
- * Used temporarily inside {@link Document#finalizeStartTag()}.
- * true if this prefix is declared on the new element.
- */
- boolean declared;
-
- /**
- * Namespace declarations form a linked list.
- */
- NamespaceDecl next;
-
- NamespaceDecl(char uniqueId, String uri, String prefix, boolean requirePrefix ) {
- this.dummyPrefix = new StringBuilder(2).append(Document.MAGIC).append(uniqueId).toString();
- this.uri = uri;
- this.prefix = prefix;
- this.requirePrefix = requirePrefix;
- this.uniqueId = uniqueId;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/NamespaceResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/NamespaceResolver.java
deleted file mode 100644
index f2f30a93..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/NamespaceResolver.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * Used by {@link DatatypeWriter} to declare additional namespaces.
- *
- * @see DatatypeWriter
- * @author Kohsuke Kawaguchi
- */
-public interface NamespaceResolver {
- /**
- * Allocates a prefix for the specified URI and returns it.
- *
- * @param nsUri
- * the namespace URI to be declared. Can be empty but must not be null.
- * @return
- * the empty string if the URI is bound to the default namespace.
- * Otherwise a non-empty string that represents a prefix.
- */
- String getPrefix(String nsUri);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/NamespaceSupport.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/NamespaceSupport.java
deleted file mode 100644
index 3a3767f9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/NamespaceSupport.java
+++ /dev/null
@@ -1,845 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// NamespaceSupport.java - generic Namespace support for SAX.
-// http://www.saxproject.org
-// Written by David Megginson
-// This class is in the Public Domain. NO WARRANTY!
-
-package com.sun.xml.internal.txw2;
-
-import java.util.EmptyStackException;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
-
-/**
- * Encapsulate Namespace logic for use by applications using SAX,
- * or internally by SAX drivers.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
- * for further information.
- * </blockquote>
- *
- * <p>This class encapsulates the logic of Namespace processing: it
- * tracks the declarations currently in force for each context and
- * automatically processes qualified XML names into their Namespace
- * parts; it can also be used in reverse for generating XML qnames
- * from Namespaces.</p>
- *
- * <p>Namespace support objects are reusable, but the reset method
- * must be invoked between each session.</p>
- *
- * <p>Here is a simple session:</p>
- *
- * <pre>
- * String parts[] = new String[3];
- * NamespaceSupport support = new NamespaceSupport();
- *
- * support.pushContext();
- * support.declarePrefix("", "http://www.w3.org/1999/xhtml");
- * support.declarePrefix("dc", "http://www.purl.org/dc#");
- *
- * parts = support.processName("p", parts, false);
- * System.out.println("Namespace URI: " + parts[0]);
- * System.out.println("Local name: " + parts[1]);
- * System.out.println("Raw name: " + parts[2]);
- *
- * parts = support.processName("dc:title", parts, false);
- * System.out.println("Namespace URI: " + parts[0]);
- * System.out.println("Local name: " + parts[1]);
- * System.out.println("Raw name: " + parts[2]);
- *
- * support.popContext();
- * </pre>
- *
- * <p>Note that this class is optimized for the use case where most
- * elements do not contain Namespace declarations: if the same
- * prefix/URI mapping is repeated for each context (for example), this
- * class will be somewhat less efficient.</p>
- *
- * <p>Although SAX drivers (parsers) may choose to use this class to
- * implement namespace handling, they are not required to do so.
- * Applications must track namespace information themselves if they
- * want to use namespace information.
- *
- * @since SAX 2.0
- * @author David Megginson
- * @version 2.0.1 (sax2r2)
- */
-final class NamespaceSupport
-{
-
-
- ////////////////////////////////////////////////////////////////////
- // Constants.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * The XML Namespace URI as a constant.
- * The value is <code>http://www.w3.org/XML/1998/namespace</code>
- * as defined in the "Namespaces in XML" * recommendation.
- *
- * <p>This is the Namespace URI that is automatically mapped
- * to the "xml" prefix.</p>
- */
- public final static String XMLNS =
- "http://www.w3.org/XML/1998/namespace";
-
-
- /**
- * The namespace declaration URI as a constant.
- * The value is <code>http://www.w3.org/xmlns/2000/</code>, as defined
- * in a backwards-incompatible erratum to the "Namespaces in XML"
- * recommendation. Because that erratum postdated SAX2, SAX2 defaults
- * to the original recommendation, and does not normally use this URI.
- *
- *
- * <p>This is the Namespace URI that is optionally applied to
- * <em>xmlns</em> and <em>xmlns:*</em> attributes, which are used to
- * declare namespaces. </p>
- *
- * @since SAX 2.1alpha
- * @see #setNamespaceDeclUris
- * @see #isNamespaceDeclUris
- */
- public final static String NSDECL =
- "http://www.w3.org/xmlns/2000/";
-
-
- /**
- * An empty enumeration.
- */
- private final static Enumeration EMPTY_ENUMERATION =
- new Vector().elements();
-
-
- ////////////////////////////////////////////////////////////////////
- // Constructor.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Create a new Namespace support object.
- */
- public NamespaceSupport ()
- {
- reset();
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Context management.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Reset this Namespace support object for reuse.
- *
- * <p>It is necessary to invoke this method before reusing the
- * Namespace support object for a new session. If namespace
- * declaration URIs are to be supported, that flag must also
- * be set to a non-default value.
- * </p>
- *
- * @see #setNamespaceDeclUris
- */
- public void reset ()
- {
- contexts = new Context[32];
- namespaceDeclUris = false;
- contextPos = 0;
- contexts[contextPos] = currentContext = new Context();
- currentContext.declarePrefix("xml", XMLNS);
- }
-
-
- /**
- * Start a new Namespace context.
- * The new context will automatically inherit
- * the declarations of its parent context, but it will also keep
- * track of which declarations were made within this context.
- *
- * <p>Event callback code should start a new context once per element.
- * This means being ready to call this in either of two places.
- * For elements that don't include namespace declarations, the
- * <em>ContentHandler.startElement()</em> callback is the right place.
- * For elements with such a declaration, it'd done in the first
- * <em>ContentHandler.startPrefixMapping()</em> callback.
- * A boolean flag can be used to
- * track whether a context has been started yet. When either of
- * those methods is called, it checks the flag to see if a new context
- * needs to be started. If so, it starts the context and sets the
- * flag. After <em>ContentHandler.startElement()</em>
- * does that, it always clears the flag.
- *
- * <p>Normally, SAX drivers would push a new context at the beginning
- * of each XML element. Then they perform a first pass over the
- * attributes to process all namespace declarations, making
- * <em>ContentHandler.startPrefixMapping()</em> callbacks.
- * Then a second pass is made, to determine the namespace-qualified
- * names for all attributes and for the element name.
- * Finally all the information for the
- * <em>ContentHandler.startElement()</em> callback is available,
- * so it can then be made.
- *
- * <p>The Namespace support object always starts with a base context
- * already in force: in this context, only the "xml" prefix is
- * declared.</p>
- *
- * @see org.xml.sax.ContentHandler
- * @see #popContext
- */
- public void pushContext ()
- {
- int max = contexts.length;
-
- contextPos++;
-
- // Extend the array if necessary
- if (contextPos >= max) {
- Context newContexts[] = new Context[max*2];
- System.arraycopy(contexts, 0, newContexts, 0, max);
- max *= 2;
- contexts = newContexts;
- }
-
- // Allocate the context if necessary.
- currentContext = contexts[contextPos];
- if (currentContext == null) {
- contexts[contextPos] = currentContext = new Context();
- }
-
- // Set the parent, if any.
- if (contextPos > 0) {
- currentContext.setParent(contexts[contextPos - 1]);
- }
- }
-
-
- /**
- * Revert to the previous Namespace context.
- *
- * <p>Normally, you should pop the context at the end of each
- * XML element. After popping the context, all Namespace prefix
- * mappings that were previously in force are restored.</p>
- *
- * <p>You must not attempt to declare additional Namespace
- * prefixes after popping a context, unless you push another
- * context first.</p>
- *
- * @see #pushContext
- */
- public void popContext ()
- {
- contexts[contextPos].clear();
- contextPos--;
- if (contextPos < 0) {
- throw new EmptyStackException();
- }
- currentContext = contexts[contextPos];
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Operations within a context.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Declare a Namespace prefix. All prefixes must be declared
- * before they are referenced. For example, a SAX driver (parser)
- * would scan an element's attributes
- * in two passes: first for namespace declarations,
- * then a second pass using {@link #processName processName()} to
- * interpret prefixes against (potentially redefined) prefixes.
- *
- * <p>This method declares a prefix in the current Namespace
- * context; the prefix will remain in force until this context
- * is popped, unless it is shadowed in a descendant context.</p>
- *
- * <p>To declare the default element Namespace, use the empty string as
- * the prefix.</p>
- *
- * <p>Note that there is an asymmetry in this library: {@link
- * #getPrefix getPrefix} will not return the "" prefix,
- * even if you have declared a default element namespace.
- * To check for a default namespace,
- * you have to look it up explicitly using {@link #getURI getURI}.
- * This asymmetry exists to make it easier to look up prefixes
- * for attribute names, where the default prefix is not allowed.</p>
- *
- * @param prefix The prefix to declare, or the empty string to
- * indicate the default element namespace. This may never have
- * the value "xml" or "xmlns".
- * @param uri The Namespace URI to associate with the prefix.
- * @return true if the prefix was legal, false otherwise
- *
- * @see #processName
- * @see #getURI
- * @see #getPrefix
- */
- public boolean declarePrefix (String prefix, String uri)
- {
- if (prefix.equals("xml") || prefix.equals("xmlns")) {
- return false;
- } else {
- currentContext.declarePrefix(prefix, uri);
- return true;
- }
- }
-
-
- /**
- * Process a raw XML qualified name, after all declarations in the
- * current context have been handled by {@link #declarePrefix
- * declarePrefix()}.
- *
- * <p>This method processes a raw XML qualified name in the
- * current context by removing the prefix and looking it up among
- * the prefixes currently declared. The return value will be the
- * array supplied by the caller, filled in as follows:</p>
- *
- * <dl>
- * <dt>parts[0]</dt>
- * <dd>The Namespace URI, or an empty string if none is
- * in use.</dd>
- * <dt>parts[1]</dt>
- * <dd>The local name (without prefix).</dd>
- * <dt>parts[2]</dt>
- * <dd>The original raw name.</dd>
- * </dl>
- *
- * <p>All of the strings in the array will be internalized. If
- * the raw name has a prefix that has not been declared, then
- * the return value will be null.</p>
- *
- * <p>Note that attribute names are processed differently than
- * element names: an unprefixed element name will receive the
- * default Namespace (if any), while an unprefixed attribute name
- * will not.</p>
- *
- * @param qName The XML qualified name to be processed.
- * @param parts An array supplied by the caller, capable of
- * holding at least three members.
- * @param isAttribute A flag indicating whether this is an
- * attribute name (true) or an element name (false).
- * @return The supplied array holding three internalized strings
- * representing the Namespace URI (or empty string), the
- * local name, and the XML qualified name; or null if there
- * is an undeclared prefix.
- * @see #declarePrefix
- * @see java.lang.String#intern */
- public String [] processName (String qName, String parts[],
- boolean isAttribute)
- {
- String myParts[] = currentContext.processName(qName, isAttribute);
- if (myParts == null) {
- return null;
- } else {
- parts[0] = myParts[0];
- parts[1] = myParts[1];
- parts[2] = myParts[2];
- return parts;
- }
- }
-
-
- /**
- * Look up a prefix and get the currently-mapped Namespace URI.
- *
- * <p>This method looks up the prefix in the current context.
- * Use the empty string ("") for the default Namespace.</p>
- *
- * @param prefix The prefix to look up.
- * @return The associated Namespace URI, or null if the prefix
- * is undeclared in this context.
- * @see #getPrefix
- * @see #getPrefixes
- */
- public String getURI (String prefix)
- {
- return currentContext.getURI(prefix);
- }
-
-
- /**
- * Return an enumeration of all prefixes whose declarations are
- * active in the current context.
- * This includes declarations from parent contexts that have
- * not been overridden.
- *
- * <p><strong>Note:</strong> if there is a default prefix, it will not be
- * returned in this enumeration; check for the default prefix
- * using the {@link #getURI getURI} with an argument of "".</p>
- *
- * @return An enumeration of prefixes (never empty).
- * @see #getDeclaredPrefixes
- * @see #getURI
- */
- public Enumeration getPrefixes ()
- {
- return currentContext.getPrefixes();
- }
-
-
- /**
- * Return one of the prefixes mapped to a Namespace URI.
- *
- * <p>If more than one prefix is currently mapped to the same
- * URI, this method will make an arbitrary selection; if you
- * want all of the prefixes, use the {@link #getPrefixes}
- * method instead.</p>
- *
- * <p><strong>Note:</strong> this will never return the empty (default) prefix;
- * to check for a default prefix, use the {@link #getURI getURI}
- * method with an argument of "".</p>
- *
- * @param uri the namespace URI
- * @return one of the prefixes currently mapped to the URI supplied,
- * or null if none is mapped or if the URI is assigned to
- * the default namespace
- * @see #getPrefixes(java.lang.String)
- * @see #getURI
- */
- public String getPrefix (String uri)
- {
- return currentContext.getPrefix(uri);
- }
-
-
- /**
- * Return an enumeration of all prefixes for a given URI whose
- * declarations are active in the current context.
- * This includes declarations from parent contexts that have
- * not been overridden.
- *
- * <p>This method returns prefixes mapped to a specific Namespace
- * URI. The xml: prefix will be included. If you want only one
- * prefix that's mapped to the Namespace URI, and you don't care
- * which one you get, use the {@link #getPrefix getPrefix}
- * method instead.</p>
- *
- * <p><strong>Note:</strong> the empty (default) prefix is <em>never</em> included
- * in this enumeration; to check for the presence of a default
- * Namespace, use the {@link #getURI getURI} method with an
- * argument of "".</p>
- *
- * @param uri The Namespace URI.
- * @return An enumeration of prefixes (never empty).
- * @see #getPrefix
- * @see #getDeclaredPrefixes
- * @see #getURI
- */
- public Enumeration getPrefixes (String uri)
- {
- Vector prefixes = new Vector();
- Enumeration allPrefixes = getPrefixes();
- while (allPrefixes.hasMoreElements()) {
- String prefix = (String)allPrefixes.nextElement();
- if (uri.equals(getURI(prefix))) {
- prefixes.addElement(prefix);
- }
- }
- return prefixes.elements();
- }
-
-
- /**
- * Return an enumeration of all prefixes declared in this context.
- *
- * <p>The empty (default) prefix will be included in this
- * enumeration; note that this behaviour differs from that of
- * {@link #getPrefix} and {@link #getPrefixes}.</p>
- *
- * @return An enumeration of all prefixes declared in this
- * context.
- * @see #getPrefixes
- * @see #getURI
- */
- public Enumeration getDeclaredPrefixes ()
- {
- return currentContext.getDeclaredPrefixes();
- }
-
- /**
- * Controls whether namespace declaration attributes are placed
- * into the {@link #NSDECL NSDECL} namespace
- * by {@link #processName processName()}. This may only be
- * changed before any contexts have been pushed.
- *
- * @since SAX 2.1alpha
- *
- * @exception IllegalStateException when attempting to set this
- * after any context has been pushed.
- */
- public void setNamespaceDeclUris (boolean value)
- {
- if (contextPos != 0)
- throw new IllegalStateException ();
- if (value == namespaceDeclUris)
- return;
- namespaceDeclUris = value;
- if (value)
- currentContext.declarePrefix ("xmlns", NSDECL);
- else {
- contexts[contextPos] = currentContext = new Context();
- currentContext.declarePrefix("xml", XMLNS);
- }
- }
-
- /**
- * Returns true if namespace declaration attributes are placed into
- * a namespace. This behavior is not the default.
- *
- * @since SAX 2.1alpha
- */
- public boolean isNamespaceDeclUris ()
- { return namespaceDeclUris; }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal state.
- ////////////////////////////////////////////////////////////////////
-
- private Context contexts[];
- private Context currentContext;
- private int contextPos;
- private boolean namespaceDeclUris;
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal classes.
- ////////////////////////////////////////////////////////////////////
-
- /**
- * Internal class for a single Namespace context.
- *
- * <p>This module caches and reuses Namespace contexts,
- * so the number allocated
- * will be equal to the element depth of the document, not to the total
- * number of elements (i.e. 5-10 rather than tens of thousands).
- * Also, data structures used to represent contexts are shared when
- * possible (child contexts without declarations) to further reduce
- * the amount of memory that's consumed.
- * </p>
- */
- final class Context {
-
- /**
- * Create the root-level Namespace context.
- */
- Context ()
- {
- copyTables();
- }
-
-
- /**
- * (Re)set the parent of this Namespace context.
- * The context must either have been freshly constructed,
- * or must have been cleared.
- *
- * @param context The parent Namespace context object.
- */
- void setParent (Context parent)
- {
- this.parent = parent;
- declarations = null;
- prefixTable = parent.prefixTable;
- uriTable = parent.uriTable;
- elementNameTable = parent.elementNameTable;
- attributeNameTable = parent.attributeNameTable;
- defaultNS = parent.defaultNS;
- declSeen = false;
- }
-
- /**
- * Makes associated state become collectible,
- * invalidating this context.
- * {@link #setParent} must be called before
- * this context may be used again.
- */
- void clear ()
- {
- parent = null;
- prefixTable = null;
- uriTable = null;
- elementNameTable = null;
- attributeNameTable = null;
- defaultNS = "";
- }
-
-
- /**
- * Declare a Namespace prefix for this context.
- *
- * @param prefix The prefix to declare.
- * @param uri The associated Namespace URI.
- * @see org.xml.sax.helpers.NamespaceSupport#declarePrefix
- */
- void declarePrefix (String prefix, String uri)
- {
- // Lazy processing...
-// if (!declsOK)
-// throw new IllegalStateException (
-// "can't declare any more prefixes in this context");
- if (!declSeen) {
- copyTables();
- }
- if (declarations == null) {
- declarations = new Vector();
- }
-
- prefix = prefix.intern();
- uri = uri.intern();
- if ("".equals(prefix)) {
- defaultNS = uri;
- } else {
- prefixTable.put(prefix, uri);
- uriTable.put(uri, prefix); // may wipe out another prefix
- }
- declarations.addElement(prefix);
- }
-
-
- /**
- * Process an XML qualified name in this context.
- *
- * @param qName The XML qualified name.
- * @param isAttribute true if this is an attribute name.
- * @return An array of three strings containing the
- * URI part (or empty string), the local part,
- * and the raw name, all internalized, or null
- * if there is an undeclared prefix.
- * @see org.xml.sax.helpers.NamespaceSupport#processName
- */
- String [] processName (String qName, boolean isAttribute)
- {
- String name[];
- Hashtable table;
-
- // Select the appropriate table.
- if (isAttribute) {
- table = attributeNameTable;
- } else {
- table = elementNameTable;
- }
-
- // Start by looking in the cache, and
- // return immediately if the name
- // is already known in this content
- name = (String[])table.get(qName);
- if (name != null) {
- return name;
- }
-
- // We haven't seen this name in this
- // context before. Maybe in the parent
- // context, but we can't assume prefix
- // bindings are the same.
- name = new String[3];
- name[2] = qName.intern();
- int index = qName.indexOf(':');
-
-
- // No prefix.
- if (index == -1) {
- if (isAttribute) {
- if (qName == "xmlns" && namespaceDeclUris)
- name[0] = NSDECL;
- else
- name[0] = "";
- } else {
- name[0] = defaultNS;
- }
- name[1] = name[2];
- }
-
- // Prefix
- else {
- String prefix = qName.substring(0, index);
- String local = qName.substring(index+1);
- String uri;
- if ("".equals(prefix)) {
- uri = defaultNS;
- } else {
- uri = (String)prefixTable.get(prefix);
- }
- if (uri == null
- || (!isAttribute && "xmlns".equals (prefix))) {
- return null;
- }
- name[0] = uri;
- name[1] = local.intern();
- }
-
- // Save in the cache for future use.
- // (Could be shared with parent context...)
- table.put(name[2], name);
- return name;
- }
-
-
- /**
- * Look up the URI associated with a prefix in this context.
- *
- * @param prefix The prefix to look up.
- * @return The associated Namespace URI, or null if none is
- * declared.
- * @see org.xml.sax.helpers.NamespaceSupport#getURI
- */
- String getURI (String prefix)
- {
- if ("".equals(prefix)) {
- return defaultNS;
- } else if (prefixTable == null) {
- return null;
- } else {
- return (String)prefixTable.get(prefix);
- }
- }
-
-
- /**
- * Look up one of the prefixes associated with a URI in this context.
- *
- * <p>Since many prefixes may be mapped to the same URI,
- * the return value may be unreliable.</p>
- *
- * @param uri The URI to look up.
- * @return The associated prefix, or null if none is declared.
- * @see org.xml.sax.helpers.NamespaceSupport#getPrefix
- */
- String getPrefix (String uri) {
- if (uriTable != null) {
- String uriPrefix = (String)uriTable.get(uri);
- if (uriPrefix == null) return null;
- String verifyNamespace = (String) prefixTable.get(uriPrefix);
- if (uri.equals(verifyNamespace)) {
- return uriPrefix;
- }
- }
- return null;
- }
-
-
- /**
- * Return an enumeration of prefixes declared in this context.
- *
- * @return An enumeration of prefixes (possibly empty).
- * @see org.xml.sax.helpers.NamespaceSupport#getDeclaredPrefixes
- */
- Enumeration getDeclaredPrefixes ()
- {
- if (declarations == null) {
- return EMPTY_ENUMERATION;
- } else {
- return declarations.elements();
- }
- }
-
-
- /**
- * Return an enumeration of all prefixes currently in force.
- *
- * <p>The default prefix, if in force, is <em>not</em>
- * returned, and will have to be checked for separately.</p>
- *
- * @return An enumeration of prefixes (never empty).
- * @see org.xml.sax.helpers.NamespaceSupport#getPrefixes
- */
- Enumeration getPrefixes ()
- {
- if (prefixTable == null) {
- return EMPTY_ENUMERATION;
- } else {
- return prefixTable.keys();
- }
- }
-
-
-
- ////////////////////////////////////////////////////////////////
- // Internal methods.
- ////////////////////////////////////////////////////////////////
-
-
- /**
- * Copy on write for the internal tables in this context.
- *
- * <p>This class is optimized for the normal case where most
- * elements do not contain Namespace declarations.</p>
- */
- private void copyTables ()
- {
- if (prefixTable != null) {
- prefixTable = (Hashtable)prefixTable.clone();
- } else {
- prefixTable = new Hashtable();
- }
- if (uriTable != null) {
- uriTable = (Hashtable)uriTable.clone();
- } else {
- uriTable = new Hashtable();
- }
- elementNameTable = new Hashtable();
- attributeNameTable = new Hashtable();
- declSeen = true;
- }
-
-
-
- ////////////////////////////////////////////////////////////////
- // Protected state.
- ////////////////////////////////////////////////////////////////
-
- Hashtable prefixTable;
- Hashtable uriTable;
- Hashtable elementNameTable;
- Hashtable attributeNameTable;
- String defaultNS = "";
-
-
-
- ////////////////////////////////////////////////////////////////
- // Internal state.
- ////////////////////////////////////////////////////////////////
-
- private Vector declarations = null;
- private boolean declSeen = false;
- private Context parent = null;
- }
-}
-
-// end of NamespaceSupport.java
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/Pcdata.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/Pcdata.java
deleted file mode 100644
index f48b4c0c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/Pcdata.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * PCDATA.
- *
- * @author Kohsuke Kawaguchi
- */
-final class Pcdata extends Text {
- Pcdata(Document document, NamespaceResolver nsResolver, Object obj) {
- super(document, nsResolver, obj);
- }
-
- void accept(ContentVisitor visitor) {
- visitor.onPcdata(buffer);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/StartDocument.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/StartDocument.java
deleted file mode 100644
index c356dc3e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/StartDocument.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class StartDocument extends Content {
- boolean concludesPendingStartTag() {
- return true;
- }
-
- void accept(ContentVisitor visitor) {
- visitor.onStartDocument();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/StartTag.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/StartTag.java
deleted file mode 100644
index 5ce064c6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/StartTag.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-import javax.xml.namespace.QName;
-
-
-/**
- * Start tag.
- *
- * <p>
- * This object implements {@link NamespaceResolver} for attribute values.
- *
- * @author Kohsuke Kawaguchi
- */
-class StartTag extends Content implements NamespaceResolver {
- /**
- * Tag name of the element.
- *
- * <p>
- * This field is also used as a flag to indicate
- * whether the start tag has been written.
- * This field is initially set to non-null, and
- * then reset to null when it's written.
- */
- private String uri;
- // but we keep the local name non-null so that
- // we can diagnose an error
- private final String localName;
-
- private Attribute firstAtt;
- private Attribute lastAtt;
-
- /**
- * If this {@link StartTag} has the parent {@link ContainerElement},
- * that value. Otherwise null.
- */
- private ContainerElement owner;
-
- /**
- * Explicitly given namespace declarations on this element.
- *
- * <p>
- * Additional namespace declarations might be necessary to
- * generate child {@link QName}s and attributes.
- */
- private NamespaceDecl firstNs;
- private NamespaceDecl lastNs;
-
- final Document document;
-
- public StartTag(ContainerElement owner, String uri, String localName) {
- this(owner.document,uri,localName);
- this.owner = owner;
- }
-
- public StartTag(Document document, String uri, String localName) {
- assert uri!=null;
- assert localName!=null;
-
- this.uri = uri;
- this.localName = localName;
- this.document = document;
-
- // TODO: think about a better way to maintain namespace decls.
- // this requires at least one NamespaceDecl per start tag,
- // which is rather expensive.
- addNamespaceDecl(uri,null,false);
- }
-
- public void addAttribute(String nsUri, String localName, Object arg) {
- checkWritable();
-
- // look for the existing ones
- Attribute a;
- for(a=firstAtt; a!=null; a=a.next) {
- if(a.hasName(nsUri,localName)) {
- break;
- }
- }
-
- // if not found, declare a new one
- if(a==null) {
- a = new Attribute(nsUri,localName);
- if(lastAtt==null) {
- assert firstAtt==null;
- firstAtt = lastAtt = a;
- } else {
- assert firstAtt!=null;
- lastAtt.next = a;
- lastAtt = a;
- }
- if(nsUri.length()>0)
- addNamespaceDecl(nsUri,null,true);
- }
-
- document.writeValue(arg,this,a.value);
- }
-
- /**
- * Declares a new namespace URI on this tag.
- *
- * @param uri
- * namespace URI to be bound. Can be empty, but must not be null.
- * @param prefix
- * If non-null and non-empty, this prefix is bound to the URI
- * on this element. If empty, then the runtime will still try to
- * use the URI as the default namespace, but it may fail to do so
- * because of the constraints in the XML.
- * <p>
- * If this parameter is null, the runtime will allocate an unique prefix.
- * @param requirePrefix
- * Used only when the prefix parameter is null. If true, this indicates
- * that the non-empty prefix must be assigned to this URI. If false,
- * then this URI might be used as the default namespace.
- * <p>
- * Normally you just need to set it to false.
- */
- public NamespaceDecl addNamespaceDecl(String uri, String prefix,boolean requirePrefix) {
- checkWritable();
-
- if(uri==null)
- throw new IllegalArgumentException();
- if(uri.length()==0) {
- if(requirePrefix)
- throw new IllegalArgumentException("The empty namespace cannot have a non-empty prefix");
- if(prefix!=null && prefix.length()>0)
- throw new IllegalArgumentException("The empty namespace can be only bound to the empty prefix");
- prefix = "";
- }
-
- // check for the duplicate
- for(NamespaceDecl n=firstNs; n!=null; n=n.next) {
- if(uri.equals(n.uri)) {
- if(prefix==null) {
- // reuse this binding
- n.requirePrefix |= requirePrefix;
- return n;
- }
- if(n.prefix==null) {
- // reuse this binding
- n.prefix = prefix;
- n.requirePrefix |= requirePrefix;
- return n;
- }
- if(prefix.equals(n.prefix)) {
- // reuse this binding
- n.requirePrefix |= requirePrefix;
- return n;
- }
- }
- if(prefix!=null && n.prefix!=null && n.prefix.equals(prefix))
- throw new IllegalArgumentException(
- "Prefix '"+prefix+"' is already bound to '"+n.uri+'\'');
- }
-
- NamespaceDecl ns = new NamespaceDecl(document.assignNewId(),uri,prefix,requirePrefix);
- if(lastNs==null) {
- assert firstNs==null;
- firstNs = lastNs = ns;
- } else {
- assert firstNs!=null;
- lastNs.next = ns;
- lastNs = ns;
- }
- return ns;
- }
-
- /**
- * Throws an error if the start tag has already been committed.
- */
- private void checkWritable() {
- if(isWritten())
- throw new IllegalStateException(
- "The start tag of "+this.localName+" has already been written. " +
- "If you need out of order writing, see the TypedXmlWriter.block method");
- }
-
- /**
- * Returns true if this start tag has already been written.
- */
- boolean isWritten() {
- return uri==null;
- }
-
- /**
- * A {@link StartTag} can be only written after
- * we are sure that all the necessary namespace declarations are given.
- */
- boolean isReadyToCommit() {
- if(owner!=null && owner.isBlocked())
- return false;
-
- for( Content c=getNext(); c!=null; c=c.getNext() )
- if(c.concludesPendingStartTag())
- return true;
-
- return false;
- }
-
- public void written() {
- firstAtt = lastAtt = null;
- uri = null;
- if(owner!=null) {
- assert owner.startTag==this;
- owner.startTag = null;
- }
- }
-
- boolean concludesPendingStartTag() {
- return true;
- }
-
- void accept(ContentVisitor visitor) {
- visitor.onStartTag(uri,localName,firstAtt,firstNs);
- }
-
- public String getPrefix(String nsUri) {
- NamespaceDecl ns = addNamespaceDecl(nsUri,null,false);
- if(ns.prefix!=null)
- // if the prefix has already been declared, use it.
- return ns.prefix;
- return ns.dummyPrefix;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/TXW.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/TXW.java
deleted file mode 100644
index c10e0c4c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/TXW.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-import com.sun.xml.internal.txw2.output.XmlSerializer;
-import com.sun.xml.internal.txw2.output.TXWSerializer;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.txw2.annotation.XmlNamespace;
-
-import javax.xml.namespace.QName;
-
-/**
- * Entry point to TXW.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class TXW {
- private TXW() {} // no instanciation please
-
-
- /*package*/ static QName getTagName( Class<?> c ) {
- String localName="";
- String nsUri="##default";
-
- XmlElement xe = c.getAnnotation(XmlElement.class);
- if(xe!=null) {
- localName = xe.value();
- nsUri = xe.ns();
- }
-
- if(localName.length()==0) {
- localName = c.getName();
- int idx = localName.lastIndexOf('.');
- if(idx>=0)
- localName = localName.substring(idx+1);
-
- localName = Character.toLowerCase(localName.charAt(0))+localName.substring(1);
- }
-
- if(nsUri.equals("##default")) {
- Package pkg = c.getPackage();
- if(pkg!=null) {
- XmlNamespace xn = pkg.getAnnotation(XmlNamespace.class);
- if(xn!=null)
- nsUri = xn.value();
- }
- }
- if(nsUri.equals("##default"))
- nsUri = "";
-
- return new QName(nsUri,localName);
- }
-
- /**
- * Creates a new {@link TypedXmlWriter} to write a new instance of a document.
- *
- * @param rootElement
- * The {@link TypedXmlWriter} interface that declares the content model of the root element.
- * This interface must have {@link XmlElement} annotation on it to designate the tag name
- * of the root element.
- * @param out
- * The target of the writing.
- */
- public static <T extends TypedXmlWriter> T create( Class<T> rootElement, XmlSerializer out ) {
- if (out instanceof TXWSerializer) {
- TXWSerializer txws = (TXWSerializer) out;
- return txws.txw._element(rootElement);
- }
-
- Document doc = new Document(out);
- QName n = getTagName(rootElement);
- return new ContainerElement(doc,null,n.getNamespaceURI(),n.getLocalPart())._cast(rootElement);
- }
-
- /**
- * Creates a new {@link TypedXmlWriter} to write a new instance of a document.
- *
- * <p>
- * Similar to the other method, but this version allows the caller to set the
- * tag name at the run-time.
- *
- * @param tagName
- * The tag name of the root document.
- *
- * @see #create(Class,XmlSerializer)
- */
- public static <T extends TypedXmlWriter> T create( QName tagName, Class<T> rootElement, XmlSerializer out ) {
- if (out instanceof TXWSerializer) {
- TXWSerializer txws = (TXWSerializer) out;
- return txws.txw._element(tagName,rootElement);
- }
- return new ContainerElement(new Document(out),null,tagName.getNamespaceURI(),tagName.getLocalPart())._cast(rootElement);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/Text.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/Text.java
deleted file mode 100644
index 3eb1cfae..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/Text.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * {@link Pcdata} or {@link Cdata}.
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class Text extends Content {
- /**
- * The text to be writtten.
- */
- protected final StringBuilder buffer = new StringBuilder();
-
- protected Text(Document document, NamespaceResolver nsResolver, Object obj) {
- document.writeValue(obj,nsResolver,buffer);
- }
-
- boolean concludesPendingStartTag() {
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/TxwException.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/TxwException.java
deleted file mode 100644
index 23b5c5c9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/TxwException.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-/**
- * Signals errors in the TXW processing.
- */
-public class TxwException extends RuntimeException {
- public TxwException(String message) {
- super(message);
- }
-
- public TxwException(Throwable cause) {
- super(cause);
- }
-
- public TxwException(String message, Throwable cause) {
- super(message, cause);
- }
-
- private static final long serialVersionUID = 1L;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/TypedXmlWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/TypedXmlWriter.java
deleted file mode 100644
index 0e150b2b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/TypedXmlWriter.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2;
-
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.txw2.output.XmlSerializer;
-
-import javax.xml.namespace.QName;
-
-/**
- * Defines common operations for all typed XML writers&#x2E;
- * Root of all typed XML writer interfaces.
- *
- * <p>
- * This interface defines a series of methods to allow client applications
- * to write arbitrary well-formed documents.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface TypedXmlWriter {
- /**
- * Commits this element (and all its descendants) to the output.
- *
- * <p>
- * Short for <tt>_commit(true)</tt>.
- */
- void commit();
-
- /**
- * Commits this element (and all its descendants) to the output.
- *
- * <p>
- * Once a writer is committed, nothing can be added to it further.
- * Committing allows TXW to output a part of the document even
- * if the rest has not yet been written.
- *
- * @param includingAllPredecessors
- * if false, this operation will _commit this writer and all its
- * descendants writers. If true, in addition to those writers,
- * this operation will close all the writers before this writer
- * in the document order.
- */
- void commit(boolean includingAllPredecessors);
-
- /**
- * Blocks the writing of the start tag so that
- * new attributes can be added even after child
- * elements are appended.
- *
- * <p>
- * This blocks the output at the token before the start tag until
- * the {@link #commit()} method is called to _commit this element.
- *
- * <p>
- * For more information, see the TXW documentation.
- */
- void block();
-
- /**
- * Gets the {@link Document} object that this writer is writing to.
- *
- * @return
- * always non-null.
- */
- Document getDocument();
-
- /**
- * Adds an attribute of the given name and the value.
- *
- * <p>
- * Short for <pre>_attribute("",localName,value);</pre>
- *
- * @see #_attribute(String, String, Object)
- */
- void _attribute( String localName, Object value );
-
- /**
- * Adds an attribute of the given name and the value.
- *
- * <p>
- * Short for <pre>_attribute(new QName(nsUri,localName),value);</pre>
- *
- * @see #_attribute(QName, Object)
- */
- void _attribute( String nsUri, String localName, Object value );
-
- /**
- * Adds an attribute of the given name and the value.
- *
- * @param attributeName
- * must not be null.
- * @param value
- * value of the attribute.
- * must not be null.
- * See the documentation for the conversion rules.
- */
- void _attribute( QName attributeName, Object value );
-
- /**
- * Declares a new namespace URI on this element.
- *
- * <p>
- * The runtime system will assign an unique prefix for the URI.
- *
- * @param uri
- * can be empty, but must not be null.
- */
- void _namespace( String uri );
-
- /**
- * Declares a new namespace URI on this element to
- * a specific prefix.
- *
- * @param uri
- * can be empty, but must not be null.
- * @param prefix
- * If non-empty, this prefix is bound to the URI
- * on this element. If empty, then the runtime will still try to
- * use the URI as the default namespace, but it may fail to do so
- * because of the constraints in the XML.
- *
- * @throws IllegalArgumentException
- * if the same prefix is already declared on this element.
- */
- void _namespace( String uri, String prefix );
-
- /**
- * Declares a new namespace URI on this element.
- *
- * <p>
- * The runtime system will assign an unique prefix for the URI.
- *
- * @param uri
- * can be empty, but must not be null.
- * @param requirePrefix
- * if false, this method behaves just like {@link #_namespace(String)}.
- * if true, this guarantees that the URI is bound to a non empty prefix.
- */
- void _namespace( String uri, boolean requirePrefix );
-
- /**
- * Appends text data.
- *
- * @param value
- * must not be null.
- * See the documentation for the conversion rules.
- */
- void _pcdata( Object value );
-
- /**
- * Appends CDATA section.
- *
- * @param value
- * must not be null.
- * See the documentation for the conversion rules.
- */
- void _cdata( Object value );
-
- /**
- * Appends a comment.
- *
- * @param value
- * must not be null.
- * See the documentation for the conversion rules.
- *
- * @throws UnsupportedOperationException
- * if the underlying {@link XmlSerializer} does not support
- * writing comments, this exception can be thrown.
- */
- void _comment( Object value ) throws UnsupportedOperationException;
-
- /**
- * Appends a new child element.
- *
- * <p>
- * Short for <pre>_element(<i>URI of this element</i>,localName,contentModel);</pre>
- *
- * <p>
- * The namespace URI will be inherited from the parent element.
- *
- * @see #_element(String, String, Class)
- */
- <T extends TypedXmlWriter> T _element( String localName, Class<T> contentModel );
-
- /**
- * Appends a new child element.
- *
- * <p>
- * The newly created child element is appended at the end of the children.
- *
- * @param nsUri
- * The namespace URI of the newly created element.
- * @param localName
- * The local name of the newly created element.
- * @param contentModel
- * The typed XML writer interface used to write the children of
- * the new child element.
- *
- * @return
- * always return non-null {@link TypedXmlWriter} that can be used
- * to write the contents of the newly created child element.
- */
- <T extends TypedXmlWriter> T _element( String nsUri, String localName, Class<T> contentModel );
-
- /**
- * Appends a new child element.
- *
- * <p>
- * Short for <pre>_element(tagName.getNamespaceURI(),tagName.getLocalPart(),contentModel);</pre>
- *
- * @see #_element(String, String, Class)
- */
- <T extends TypedXmlWriter> T _element( QName tagName, Class<T> contentModel );
-
- /**
- * Appends a new child element.
- *
- * <p>
- * This version of the _element method requires the <i>T</i> class to be
- * annotated with {@link XmlElement} annotation. The element name will be
- * taken from there.
- *
- * @see #_element(String, String, Class)
- */
- <T extends TypedXmlWriter> T _element( Class<T> contentModel );
-
- /**
- * Returns a different interface for this typed XML Writer.
- *
- * <p>
- * Semantically, this operation is a 'cast' --- it returns the same underlying
- * writer in a different interface. The returned new writer and the current writer
- * will write to the same element.
- *
- * <p>
- * But this is different from Java's ordinary cast because the returned object
- * is not always the same as the current object.
- *
- * @return
- * always return non-null.
- */
- <T extends TypedXmlWriter> T _cast( Class<T> targetInterface );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlAttribute.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlAttribute.java
deleted file mode 100644
index d06d481e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlAttribute.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.annotation;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * Specifies that the invocation of the method will produce an attribute.
- *
- * <p>
- * The method signature has to match the form <tt>R foo(DT1,DT2,..)</tt>
- *
- * <p>
- * R is either <tt>void</tt> or the type to which the interface that declares
- * this method is assignable. In the case of the latter, the method will return
- * <tt>this</tt> object, allowing you to chain the multiple attribute method
- * invocations like {@link StringBuffer}.
- *
- * <p>
- * DTi must be datatype objects.
- *
- * <p>
- * When this method is called, a new attribute is added to the current element,
- * whose value is whitespace-separated text from each of the datatype objects.
- *
- * @author Kohsuke Kawaguchi
- */
-@Retention(RUNTIME)
-@Target({METHOD})
-public @interface XmlAttribute {
- /**
- * The local name of the attribute.
- *
- * <p>
- * If left unspecified, the method name is used as the attribute name.
- *
- */
- String value() default "";
-
- /**
- * The namespace URI of the attribute.
- */
- String ns() default "";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlCDATA.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlCDATA.java
deleted file mode 100644
index 155ab092..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlCDATA.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.METHOD;
-
-/**
- * Used along with {@link XmlElement} to write a CDATA section,
- * instead of the normal PCDATA.
- *
- * @author Kohsuke Kawaguchi
- */
-@Retention(RUNTIME)
-@Target({METHOD})
-public @interface XmlCDATA {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlElement.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlElement.java
deleted file mode 100644
index ddb02d3e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlElement.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.annotation;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.TXW;
-import com.sun.xml.internal.txw2.output.XmlSerializer;
-
-import javax.xml.namespace.QName;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.METHOD;
-
-/**
- * Specifies the name of the XML element.
- *
- * <h2>Used on method</h2>
- * <p>
- * When used on methods declared on interfaces that derive
- * from {@link TypedXmlWriter}, it specifies that the invocation
- * of the method will produce an element of the specified name.
- *
- * <p>
- * The method signature has to match one of the following patterns.
- *
- * <dl>
- * <dt>Child writer: <tt>TW foo()</tt></dt>
- * <dd>TW must be an interface derived from {@link TypedXmlWriter}.
- * When this method is called, a new child element is started,
- * and its content can be written by using the returned <tt>TW</tt>
- * object. This child element will be ended when its _commit method
- * is called.
- * <dt>Leaf element: <tt>void foo(DT1,DT2,...)</tt></dt>
- * <dd>DTi must be datatype objects.
- * When this method is called, a new child element is started,
- * followed by the whitespace-separated text data from each of
- * the datatype objects, followed by the end tag.
- * </dl>
- *
- * <h2>Used on interface</h2>
- * <p>
- * When used on interfaces that derive from {@link TypedXmlWriter},
- * it associates an element name with that interface. This name is
- * used in a few places, such as in {@link TXW#create(Class,XmlSerializer)}
- * and {@link TypedXmlWriter#_element(Class)}.
- *
- *
- * @author Kohsuke Kawaguchi
- */
-@Retention(RUNTIME)
-@Target({METHOD,TYPE})
-public @interface XmlElement {
- /**
- * The local name of the element.
- */
- String value() default "";
-
- /**
- * The namespace URI of this element.
- *
- * <p>
- * If the annotation is on an interface and this paramter is left unspecified,
- * then the namespace URI is taken from {@link XmlNamespace} annotation on
- * the package that the interface is in. If {@link XmlNamespace} annotation
- * doesn't exist, the namespace URI will be "".
- *
- * <p>
- * If the annotation is on a method and this parameter is left unspecified,
- * then the namespace URI is the same as the namespace URI of the writer interface.
- */
- String ns() default "##default";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlNamespace.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlNamespace.java
deleted file mode 100644
index ad8df78d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlNamespace.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.annotation;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.PACKAGE;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Declares the namespace URI of the {@link TypedXmlWriter}s
- * in a package.
- *
- * <p>
- * This annotation is placed on a package. When specified,
- * it sets the default value of the namespace URI for
- * all the elements ({@link XmlElement}s) in the given package.
- *
- * @author Kohsuke Kawaguchi
- */
-@Retention(RUNTIME)
-@Target({PACKAGE})
-public @interface XmlNamespace {
- /**
- * The namespace URI.
- */
- String value();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlValue.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlValue.java
deleted file mode 100644
index 9d01ed08..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/XmlValue.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.annotation;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Specifies that the invocation of the method will produce a text
- *
- * <p>
- * The method signature has to match the form <tt>R foo(DT1,DT2,..)</tt>
- *
- * <p>
- * R is either <tt>void</tt> or the type to which the interface that declares
- * this method is assignable. In the case of the latter, the method will return
- * <tt>this</tt> object, allowing you to chain the multiple method
- * invocations like {@link StringBuffer}.
- *
- * <p>
- * DTi must be datatype objects.
- *
- * <p>
- * When this method is called, whitespace-separated text data
- * is added from each of the datatype objects.
- *
- * @author Kohsuke Kawaguchi
- */
-@Retention(RUNTIME)
-@Target({METHOD})
-public @interface XmlValue {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/package.html b/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/package.html
deleted file mode 100644
index 9921ff42..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/annotation/package.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-
-
-<body>
- <p>
- Defines a set of annotations that can be used on TypedXmlWriter interfaces.
-
- <h3>Package-level Annotation</h3>
- <p>
- {@link XmlNamespace} can be used on a package to designate the namespace URI for the
- whole package.
-
- <h3>Interface Annotation</h3>
- <p>
- {@link XmlElement} can be used on TypedXmlWriter-derived interfaces to associate
- a tag name to that interface.
-
- <h3>Method Annotations</h3>
- <p>
- {@link XmlElement}, {@link XmlAttribute}, or {@link XmlValue} can be used on a method
- declared on a TypedXmLWriter-derived interface. Those annotations are mutually-exclusive.
- See their javadoc for details. If none of the above three annotations are specified,
- {@link XmlElement} is assumed.
-
-</body>
-</html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/CharacterEscapeHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/CharacterEscapeHandler.java
deleted file mode 100644
index 1eff7c01..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/CharacterEscapeHandler.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.output;
-
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * Performs character escaping and write the result
- * to the output.
- *
- * @since 1.0.1
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface CharacterEscapeHandler {
-
- /**
- * @param ch The array of characters.
- * @param start The starting position.
- * @param length The number of characters to use.
- * @param isAttVal true if this is an attribute value literal.
- */
- void escape( char ch[], int start, int length, boolean isAttVal, Writer out ) throws IOException;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DataWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DataWriter.java
deleted file mode 100644
index 45261fd7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DataWriter.java
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-//@@3RD PARTY CODE@@
-
-// DataWriter.java - XML writer for data-oriented files.
-
-package com.sun.xml.internal.txw2.output;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-import java.io.Writer;
-import java.util.Stack;
-
-
-/**
- * Write data- or field-oriented XML.
- *
- * <p>This filter pretty-prints field-oriented XML without mixed content.
- * all added indentation and newlines will be passed on down
- * the filter chain (if any).</p>
- *
- * <p>In general, all whitespace in an XML document is potentially
- * significant, so a general-purpose XML writing tool like the
- * {@link XMLWriter} class cannot
- * add newlines or indentation.</p>
- *
- * <p>There is, however, a large class of XML documents where information
- * is strictly fielded: each element contains either character data
- * or other elements, but not both. For this special case, it is possible
- * for a writing tool to provide automatic indentation and newlines
- * without requiring extra work from the user. Note that this class
- * will likely not yield appropriate results for document-oriented
- * XML like XHTML pages, which mix character data and elements together.</p>
- *
- * <p>This writer will automatically place each start tag on a new line,
- * optionally indented if an indent step is provided (by default, there
- * is no indentation). If an element contains other elements, the end
- * tag will also appear on a new line with leading indentation. Consider,
- * for example, the following code:</p>
- *
- * <pre>
- * DataWriter w = new DataWriter();
- *
- * w.setIndentStep(2);
- * w.startDocument();
- * w.startElement("Person");
- * w.dataElement("name", "Jane Smith");
- * w.dataElement("date-of-birth", "1965-05-23");
- * w.dataElement("citizenship", "US");
- * w.endElement("Person");
- * w.endDocument();
- * </pre>
- *
- * <p>This code will produce the following document:</p>
- *
- * <pre>
- * &lt;?xml version="1.0" standalone="yes"?>
- *
- * &lt;Person>
- * &lt;name>Jane Smith&lt;/name>
- * &lt;date-of-birth>1965-05-23&lt;/date-of-birth>
- * &lt;citizenship>US&lt;/citizenship>
- * &lt;/Person>
- * </pre>
- *
- * <p>This class inherits from {@link XMLWriter},
- * and provides all of the same support for Namespaces.</p>
- *
- * @since 1.0
- * @author David Megginson, david@megginson.com
- * @version 0.2
- * @see XMLWriter
- */
-public class DataWriter extends XMLWriter
-{
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Constructors.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Create a new data writer for the specified output.
- *
- * @param writer The character stream where the XML document
- * will be written.
- * @param encoding
- * If non-null string is specified, it is written as a part
- * of the XML declaration.
- */
- public DataWriter ( Writer writer, String encoding, CharacterEscapeHandler _escapeHandler )
- {
- super(writer,encoding,_escapeHandler);
- }
-
-
- public DataWriter (Writer writer, String encoding ) {
- this( writer, encoding, DumbEscapeHandler.theInstance );
- }
-
- public DataWriter (Writer writer) {
- this( writer, null, DumbEscapeHandler.theInstance );
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Accessors and setters.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Return the current indent step.
- *
- * <p>Return the current indent step: each start tag will be
- * indented by this number of spaces times the number of
- * ancestors that the element has.</p>
- *
- * @return The number of spaces in each indentation step,
- * or 0 or less for no indentation.
- * @see #setIndentStep(int)
- *
- * @deprecated
- * Only return the length of the indent string.
- */
- public int getIndentStep ()
- {
- return indentStep.length();
- }
-
-
- /**
- * Set the current indent step.
- *
- * @param indentStep The new indent step (0 or less for no
- * indentation).
- * @see #getIndentStep()
- *
- * @deprecated
- * Should use the version that takes string.
- */
- public void setIndentStep (int indentStep)
- {
- StringBuilder s = new StringBuilder();
- for( ; indentStep>0; indentStep-- ) s.append(' ');
- setIndentStep(s.toString());
- }
-
- public void setIndentStep(String s) {
- this.indentStep = s;
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Override methods from XMLWriter.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Reset the writer so that it can be reused.
- *
- * <p>This method is especially useful if the writer failed
- * with an exception the last time through.</p>
- *
- * @see XMLWriter#reset()
- */
- public void reset ()
- {
- depth = 0;
- state = SEEN_NOTHING;
- stateStack = new Stack();
- super.reset();
- }
-
-
- /**
- * Write a start tag.
- *
- * <p>Each tag will begin on a new line, and will be
- * indented by the current indent step times the number
- * of ancestors that the element has.</p>
- *
- * <p>The newline and indentation will be passed on down
- * the filter chain through regular characters events.</p>
- *
- * @param uri The element's Namespace URI.
- * @param localName The element's local name.
- * @param qName The element's qualified (prefixed) name.
- * @param atts The element's attribute list.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the start tag, or if a filter further
- * down the chain raises an exception.
- * @see XMLWriter#startElement(String, String, String, Attributes)
- */
- public void startElement (String uri, String localName,
- String qName, Attributes atts)
- throws SAXException
- {
- stateStack.push(SEEN_ELEMENT);
- state = SEEN_NOTHING;
- if (depth > 0) {
- super.characters("\n");
- }
- doIndent();
- super.startElement(uri, localName, qName, atts);
- depth++;
- }
-
-
- /**
- * Write an end tag.
- *
- * <p>If the element has contained other elements, the tag
- * will appear indented on a new line; otherwise, it will
- * appear immediately following whatever came before.</p>
- *
- * <p>The newline and indentation will be passed on down
- * the filter chain through regular characters events.</p>
- *
- * @param uri The element's Namespace URI.
- * @param localName The element's local name.
- * @param qName The element's qualified (prefixed) name.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the end tag, or if a filter further
- * down the chain raises an exception.
- * @see XMLWriter#endElement(String, String, String)
- */
- public void endElement (String uri, String localName, String qName)
- throws SAXException
- {
- depth--;
- if (state == SEEN_ELEMENT) {
- super.characters("\n");
- doIndent();
- }
- super.endElement(uri, localName, qName);
- state = stateStack.pop();
- }
-
-
-// /**
-// * Write a empty element tag.
-// *
-// * <p>Each tag will appear on a new line, and will be
-// * indented by the current indent step times the number
-// * of ancestors that the element has.</p>
-// *
-// * <p>The newline and indentation will be passed on down
-// * the filter chain through regular characters events.</p>
-// *
-// * @param uri The element's Namespace URI.
-// * @param localName The element's local name.
-// * @param qName The element's qualified (prefixed) name.
-// * @param atts The element's attribute list.
-// * @exception org.xml.sax.SAXException If there is an error
-// * writing the empty tag, or if a filter further
-// * down the chain raises an exception.
-// * @see XMLWriter#emptyElement(String, String, String, Attributes)
-// */
-// public void emptyElement (String uri, String localName,
-// String qName, Attributes atts)
-// throws SAXException
-// {
-// state = SEEN_ELEMENT;
-// if (depth > 0) {
-// super.characters("\n");
-// }
-// doIndent();
-// super.emptyElement(uri, localName, qName, atts);
-// }
-
-
- /**
- * Write a sequence of characters.
- *
- * @param ch The characters to write.
- * @param start The starting position in the array.
- * @param length The number of characters to use.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the characters, or if a filter further
- * down the chain raises an exception.
- * @see XMLWriter#characters(char[], int, int)
- */
- public void characters (char ch[], int start, int length)
- throws SAXException
- {
- state = SEEN_DATA;
- super.characters(ch, start, length);
- }
-
- public void comment(char ch[], int start, int length) throws SAXException {
- if (depth > 0) {
- super.characters("\n");
- }
- doIndent();
- super.comment(ch,start,length);
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal methods.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Print indentation for the current level.
- *
- * @exception org.xml.sax.SAXException If there is an error
- * writing the indentation characters, or if a filter
- * further down the chain raises an exception.
- */
- private void doIndent ()
- throws SAXException
- {
- if (depth > 0) {
- char[] ch = indentStep.toCharArray();
- for( int i=0; i<depth; i++ )
- characters(ch, 0, ch.length);
- }
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Constants.
- ////////////////////////////////////////////////////////////////////
-
- private final static Object SEEN_NOTHING = new Object();
- private final static Object SEEN_ELEMENT = new Object();
- private final static Object SEEN_DATA = new Object();
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal state.
- ////////////////////////////////////////////////////////////////////
-
- private Object state = SEEN_NOTHING;
- private Stack stateStack = new Stack();
-
- private String indentStep = "";
- private int depth = 0;
-
-}
-
-// end of DataWriter.java
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DelegatingXMLStreamWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DelegatingXMLStreamWriter.java
deleted file mode 100644
index 254b5e7a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DelegatingXMLStreamWriter.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.output;
-
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.namespace.NamespaceContext;
-
-/**
- * Delegating {@link XMLStreamWriter}.
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class DelegatingXMLStreamWriter implements XMLStreamWriter {
- private final XMLStreamWriter writer;
-
- public DelegatingXMLStreamWriter(XMLStreamWriter writer) {
- this.writer = writer;
- }
-
- public void writeStartElement(String localName) throws XMLStreamException {
- writer.writeStartElement(localName);
- }
-
- public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException {
- writer.writeStartElement(namespaceURI, localName);
- }
-
- public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
- writer.writeStartElement(prefix, localName, namespaceURI);
- }
-
- public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException {
- writer.writeEmptyElement(namespaceURI, localName);
- }
-
- public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
- writer.writeEmptyElement(prefix, localName, namespaceURI);
- }
-
- public void writeEmptyElement(String localName) throws XMLStreamException {
- writer.writeEmptyElement(localName);
- }
-
- public void writeEndElement() throws XMLStreamException {
- writer.writeEndElement();
- }
-
- public void writeEndDocument() throws XMLStreamException {
- writer.writeEndDocument();
- }
-
- public void close() throws XMLStreamException {
- writer.close();
- }
-
- public void flush() throws XMLStreamException {
- writer.flush();
- }
-
- public void writeAttribute(String localName, String value) throws XMLStreamException {
- writer.writeAttribute(localName, value);
- }
-
- public void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException {
- writer.writeAttribute(prefix, namespaceURI, localName, value);
- }
-
- public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException {
- writer.writeAttribute(namespaceURI, localName, value);
- }
-
- public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException {
- writer.writeNamespace(prefix, namespaceURI);
- }
-
- public void writeDefaultNamespace(String namespaceURI) throws XMLStreamException {
- writer.writeDefaultNamespace(namespaceURI);
- }
-
- public void writeComment(String data) throws XMLStreamException {
- writer.writeComment(data);
- }
-
- public void writeProcessingInstruction(String target) throws XMLStreamException {
- writer.writeProcessingInstruction(target);
- }
-
- public void writeProcessingInstruction(String target, String data) throws XMLStreamException {
- writer.writeProcessingInstruction(target, data);
- }
-
- public void writeCData(String data) throws XMLStreamException {
- writer.writeCData(data);
- }
-
- public void writeDTD(String dtd) throws XMLStreamException {
- writer.writeDTD(dtd);
- }
-
- public void writeEntityRef(String name) throws XMLStreamException {
- writer.writeEntityRef(name);
- }
-
- public void writeStartDocument() throws XMLStreamException {
- writer.writeStartDocument();
- }
-
- public void writeStartDocument(String version) throws XMLStreamException {
- writer.writeStartDocument(version);
- }
-
- public void writeStartDocument(String encoding, String version) throws XMLStreamException {
- writer.writeStartDocument(encoding, version);
- }
-
- public void writeCharacters(String text) throws XMLStreamException {
- writer.writeCharacters(text);
- }
-
- public void writeCharacters(char[] text, int start, int len) throws XMLStreamException {
- writer.writeCharacters(text, start, len);
- }
-
- public String getPrefix(String uri) throws XMLStreamException {
- return writer.getPrefix(uri);
- }
-
- public void setPrefix(String prefix, String uri) throws XMLStreamException {
- writer.setPrefix(prefix, uri);
- }
-
- public void setDefaultNamespace(String uri) throws XMLStreamException {
- writer.setDefaultNamespace(uri);
- }
-
- public void setNamespaceContext(NamespaceContext context) throws XMLStreamException {
- writer.setNamespaceContext(context);
- }
-
- public NamespaceContext getNamespaceContext() {
- return writer.getNamespaceContext();
- }
-
- public Object getProperty(String name) throws IllegalArgumentException {
- return writer.getProperty(name);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DomSerializer.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DomSerializer.java
deleted file mode 100644
index bac4215e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DomSerializer.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.output;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.dom.DOMResult;
-import java.util.ArrayList;
-import java.util.Stack;
-
-import com.sun.xml.internal.txw2.TxwException;
-
-/**
- * {@link XmlSerializer} for {@link javax.xml.transform.dom.DOMResult} and {@link org.w3c.dom.Node}.
- *
- * @author Ryan.Shoemaker@Sun.COM
- */
-public class DomSerializer implements XmlSerializer {
-
- // delegate to SaxSerializer
- private final SaxSerializer serializer;
-
- public DomSerializer(Node node) {
- Dom2SaxAdapter adapter = new Dom2SaxAdapter(node);
- serializer = new SaxSerializer(adapter,adapter,false);
- }
-
- public DomSerializer(DOMResult domResult) {
- Node node = domResult.getNode();
-
- if (node == null) {
- try {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
- DocumentBuilder db = dbf.newDocumentBuilder();
- Document doc = db.newDocument();
- domResult.setNode(doc);
- serializer = new SaxSerializer(new Dom2SaxAdapter(doc),null,false);
- } catch (ParserConfigurationException pce) {
- throw new TxwException(pce);
- }
- } else {
- serializer = new SaxSerializer(new Dom2SaxAdapter(node),null,false);
- }
- }
-
- // XmlSerializer api's - delegate to SaxSerializer
- public void startDocument() {
- serializer.startDocument();
- }
-
- public void beginStartTag(String uri, String localName, String prefix) {
- serializer.beginStartTag(uri, localName, prefix);
- }
-
- public void writeAttribute(String uri, String localName, String prefix, StringBuilder value) {
- serializer.writeAttribute(uri, localName, prefix, value);
- }
-
- public void writeXmlns(String prefix, String uri) {
- serializer.writeXmlns(prefix, uri);
- }
-
- public void endStartTag(String uri, String localName, String prefix) {
- serializer.endStartTag(uri, localName, prefix);
- }
-
- public void endTag() {
- serializer.endTag();
- }
-
- public void text(StringBuilder text) {
- serializer.text(text);
- }
-
- public void cdata(StringBuilder text) {
- serializer.cdata(text);
- }
-
- public void comment(StringBuilder comment) {
- serializer.comment(comment);
- }
-
- public void endDocument() {
- serializer.endDocument();
- }
-
- public void flush() {
- // no flushing
- }
-}
-
-
-
-
-/**
- * Builds a DOM tree from SAX2 events.
- *
- * @author Vivek Pandey
- */
-class Dom2SaxAdapter implements ContentHandler, LexicalHandler {
-
- private final Node _node;
- private final Stack _nodeStk = new Stack();
- private boolean inCDATA;
-
- public final Element getCurrentElement() {
- return (Element) _nodeStk.peek();
- }
-
- /**
- * Document object that owns the specified node.
- */
- private final Document _document;
-
- /**
- * @param node
- * Nodes will be created and added under this object.
- */
- public Dom2SaxAdapter(Node node)
- {
- _node = node;
- _nodeStk.push(_node);
-
- if( node instanceof Document )
- this._document = (Document)node;
- else
- this._document = node.getOwnerDocument();
- }
-
- /**
- * Creates a fresh empty DOM document and adds nodes under this document.
- */
- public Dom2SaxAdapter() throws ParserConfigurationException {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setNamespaceAware(true);
- factory.setValidating(false);
-
- _document = factory.newDocumentBuilder().newDocument();
- _node = _document;
- _nodeStk.push( _document );
- }
-
- public Node getDOM() {
- return _node;
- }
-
- public void startDocument() {
- }
-
- public void endDocument(){
- }
-
- public void startElement(String namespace, String localName, String qName, Attributes attrs){
-
- // some broken DOM implementatino (we confirmed it with SAXON)
- // return null from this method.
- Element element = _document.createElementNS(namespace, qName);
-
- if( element==null ) {
- // if so, report an user-friendly error message,
- // rather than dying mysteriously with NPE.
- throw new TxwException("Your DOM provider doesn't support the createElementNS method properly");
- }
-
- // process namespace bindings
- for( int i=0; i<unprocessedNamespaces.size(); i+=2 ) {
- String prefix = (String)unprocessedNamespaces.get(i+0);
- String uri = (String)unprocessedNamespaces.get(i+1);
-
- String qname;
- if( "".equals(prefix) || prefix==null )
- qname = "xmlns";
- else
- qname = "xmlns:"+prefix;
-
- // older version of Xerces (I confirmed that the bug is gone with Xerces 2.4.0)
- // have a problem of re-setting the same namespace attribute twice.
- // work around this bug removing it first.
- if( element.hasAttributeNS("http://www.w3.org/2000/xmlns/",qname) ) {
- // further workaround for an old Crimson bug where the removeAttribtueNS
- // method throws NPE when the element doesn't have any attribute.
- // to be on the safe side, check the existence of attributes before
- // attempting to remove it.
- // for details about this bug, see org.apache.crimson.tree.ElementNode2
- // line 540 or the following message:
- // https://jaxb.dev.java.net/servlets/ReadMsg?list=users&msgNo=2767
- element.removeAttributeNS("http://www.w3.org/2000/xmlns/",qname);
- }
- // workaround until here
-
- element.setAttributeNS("http://www.w3.org/2000/xmlns/",qname, uri);
- }
- unprocessedNamespaces.clear();
-
-
- int length = attrs.getLength();
- for(int i=0;i<length;i++){
- String namespaceuri = attrs.getURI(i);
- String value = attrs.getValue(i);
- String qname = attrs.getQName(i);
- element.setAttributeNS(namespaceuri, qname, value);
- }
- // append this new node onto current stack node
- getParent().appendChild(element);
- // push this node onto stack
- _nodeStk.push(element);
- }
-
- private final Node getParent() {
- return (Node) _nodeStk.peek();
- }
-
- public void endElement(String namespace, String localName, String qName){
- _nodeStk.pop();
- }
-
-
- public void characters(char[] ch, int start, int length) {
- Node text;
- if(inCDATA)
- text = _document.createCDATASection(new String(ch, start, length));
- else
- text = _document.createTextNode(new String(ch, start, length));
- getParent().appendChild(text);
- }
-
- public void comment(char ch[], int start, int length) throws SAXException {
- getParent().appendChild(_document.createComment(new String(ch,start,length)));
- }
-
-
-
- public void ignorableWhitespace(char[] ch, int start, int length) {
- }
-
- public void processingInstruction(String target, String data) throws org.xml.sax.SAXException{
- Node node = _document.createProcessingInstruction(target, data);
- getParent().appendChild(node);
- }
-
- public void setDocumentLocator(Locator locator) {
- }
-
- public void skippedEntity(String name) {
- }
-
- private ArrayList unprocessedNamespaces = new ArrayList();
-
- public void startPrefixMapping(String prefix, String uri) {
- unprocessedNamespaces.add(prefix);
- unprocessedNamespaces.add(uri);
- }
-
- public void endPrefixMapping(String prefix) {
- }
-
- public void startDTD(String name, String publicId, String systemId) throws SAXException {
- }
-
- public void endDTD() throws SAXException {
- }
-
- public void startEntity(String name) throws SAXException {
- }
-
- public void endEntity(String name) throws SAXException {
- }
-
- public void startCDATA() throws SAXException {
- inCDATA = true;
- }
-
- public void endCDATA() throws SAXException {
- inCDATA = false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DumbEscapeHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DumbEscapeHandler.java
deleted file mode 100644
index 629aeb5a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DumbEscapeHandler.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.output;
-
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * Escape everything above the US-ASCII code range.
- * A fallback position.
- *
- * Works with any JDK, any encoding.
- *
- * @since 1.0.1
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class DumbEscapeHandler implements CharacterEscapeHandler {
-
- private DumbEscapeHandler() {} // no instanciation please
-
- public static final CharacterEscapeHandler theInstance = new DumbEscapeHandler();
-
- public void escape(char[] ch, int start, int length, boolean isAttVal, Writer out) throws IOException {
- int limit = start+length;
- for (int i = start; i < limit; i++) {
- switch (ch[i]) {
- case '&':
- out.write("&amp;");
- break;
- case '<':
- out.write("&lt;");
- break;
- case '>':
- out.write("&gt;");
- break;
- case '\"':
- if (isAttVal) {
- out.write("&quot;");
- } else {
- out.write('\"');
- }
- break;
- default:
- if (ch[i] > '\u007f') {
- out.write("&#");
- out.write(Integer.toString(ch[i]));
- out.write(';');
- } else {
- out.write(ch[i]);
- }
- }
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DumpSerializer.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DumpSerializer.java
deleted file mode 100644
index 3fd6efa4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/DumpSerializer.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.output;
-
-import java.io.PrintStream;
-
-/**
- * Shows the call sequence of {@link XmlSerializer} methods.
- *
- * Useful for debugging and learning how TXW works.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class DumpSerializer implements XmlSerializer {
- private final PrintStream out;
-
- public DumpSerializer(PrintStream out) {
- this.out = out;
- }
-
- public void beginStartTag(String uri, String localName, String prefix) {
- out.println('<'+prefix+':'+localName);
- }
-
- public void writeAttribute(String uri, String localName, String prefix, StringBuilder value) {
- out.println('@'+prefix+':'+localName+'='+value);
- }
-
- public void writeXmlns(String prefix, String uri) {
- out.println("xmlns:"+prefix+'='+uri);
- }
-
- public void endStartTag(String uri, String localName, String prefix) {
- out.println('>');
- }
-
- public void endTag() {
- out.println("</ >");
- }
-
- public void text(StringBuilder text) {
- out.println(text);
- }
-
- public void cdata(StringBuilder text) {
- out.println("<![CDATA[");
- out.println(text);
- out.println("]]>");
- }
-
- public void comment(StringBuilder comment) {
- out.println("<!--");
- out.println(comment);
- out.println("-->");
- }
-
- public void startDocument() {
- out.println("<?xml?>");
- }
-
- public void endDocument() {
- out.println("done");
- }
-
- public void flush() {
- out.println("flush");
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/IndentingXMLFilter.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/IndentingXMLFilter.java
deleted file mode 100644
index 94244495..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/IndentingXMLFilter.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.output;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import java.util.Stack;
-
-/**
- * {@link XMLFilterImpl} that does indentation to SAX events.
- *
- * @author Kohsuke Kawaguchi
- */
-public class IndentingXMLFilter extends XMLFilterImpl implements LexicalHandler {
- private LexicalHandler lexical;
-
- public IndentingXMLFilter() {
- }
-
- public IndentingXMLFilter(ContentHandler handler) {
- setContentHandler(handler);
- }
-
- public IndentingXMLFilter(ContentHandler handler, LexicalHandler lexical) {
- setContentHandler(handler);
- setLexicalHandler(lexical);
- }
-
- public LexicalHandler getLexicalHandler() {
- return lexical;
- }
-
- public void setLexicalHandler(LexicalHandler lexical) {
- this.lexical = lexical;
- }
-
-
- /**
- * Return the current indent step.
- *
- * <p>Return the current indent step: each start tag will be
- * indented by this number of spaces times the number of
- * ancestors that the element has.</p>
- *
- * @return The number of spaces in each indentation step,
- * or 0 or less for no indentation.
- * @see #setIndentStep(int)
- *
- * @deprecated
- * Only return the length of the indent string.
- */
- public int getIndentStep ()
- {
- return indentStep.length();
- }
-
-
- /**
- * Set the current indent step.
- *
- * @param indentStep The new indent step (0 or less for no
- * indentation).
- * @see #getIndentStep()
- *
- * @deprecated
- * Should use the version that takes string.
- */
- public void setIndentStep (int indentStep)
- {
- StringBuilder s = new StringBuilder();
- for( ; indentStep>0; indentStep-- ) s.append(' ');
- setIndentStep(s.toString());
- }
-
- public void setIndentStep(String s) {
- this.indentStep = s;
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Override methods from XMLWriter.
- ////////////////////////////////////////////////////////////////////
-
- /**
- * Write a start tag.
- *
- * <p>Each tag will begin on a new line, and will be
- * indented by the current indent step times the number
- * of ancestors that the element has.</p>
- *
- * <p>The newline and indentation will be passed on down
- * the filter chain through regular characters events.</p>
- *
- * @param uri The element's Namespace URI.
- * @param localName The element's local name.
- * @param qName The element's qualified (prefixed) name.
- * @param atts The element's attribute list.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the start tag, or if a filter further
- * down the chain raises an exception.
- * @see XMLWriter#startElement(String, String, String,Attributes)
- */
- public void startElement (String uri, String localName,
- String qName, Attributes atts)
- throws SAXException {
- stateStack.push(SEEN_ELEMENT);
- state = SEEN_NOTHING;
- if (depth > 0) {
- writeNewLine();
- }
- doIndent();
- super.startElement(uri, localName, qName, atts);
- depth++;
- }
-
- private void writeNewLine() throws SAXException {
- super.characters(NEWLINE,0,NEWLINE.length);
- }
-
- private static final char[] NEWLINE = {'\n'};
-
-
- /**
- * Write an end tag.
- *
- * <p>If the element has contained other elements, the tag
- * will appear indented on a new line; otherwise, it will
- * appear immediately following whatever came before.</p>
- *
- * <p>The newline and indentation will be passed on down
- * the filter chain through regular characters events.</p>
- *
- * @param uri The element's Namespace URI.
- * @param localName The element's local name.
- * @param qName The element's qualified (prefixed) name.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the end tag, or if a filter further
- * down the chain raises an exception.
- * @see XMLWriter#endElement(String, String, String)
- */
- public void endElement (String uri, String localName, String qName)
- throws SAXException
- {
- depth--;
- if (state == SEEN_ELEMENT) {
- writeNewLine();
- doIndent();
- }
- super.endElement(uri, localName, qName);
- state = stateStack.pop();
- }
-
-
-// /**
-// * Write a empty element tag.
-// *
-// * <p>Each tag will appear on a new line, and will be
-// * indented by the current indent step times the number
-// * of ancestors that the element has.</p>
-// *
-// * <p>The newline and indentation will be passed on down
-// * the filter chain through regular characters events.</p>
-// *
-// * @param uri The element's Namespace URI.
-// * @param localName The element's local name.
-// * @param qName The element's qualified (prefixed) name.
-// * @param atts The element's attribute list.
-// * @exception org.xml.sax.SAXException If there is an error
-// * writing the empty tag, or if a filter further
-// * down the chain raises an exception.
-// * @see XMLWriter#emptyElement(String, String, String, Attributes)
-// */
-// public void emptyElement (String uri, String localName,
-// String qName, Attributes atts)
-// throws SAXException
-// {
-// state = SEEN_ELEMENT;
-// if (depth > 0) {
-// super.characters("\n");
-// }
-// doIndent();
-// super.emptyElement(uri, localName, qName, atts);
-// }
-
-
- /**
- * Write a sequence of characters.
- *
- * @param ch The characters to write.
- * @param start The starting position in the array.
- * @param length The number of characters to use.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the characters, or if a filter further
- * down the chain raises an exception.
- * @see XMLWriter#characters(char[], int, int)
- */
- public void characters (char ch[], int start, int length)
- throws SAXException
- {
- state = SEEN_DATA;
- super.characters(ch, start, length);
- }
-
- public void comment(char ch[], int start, int length) throws SAXException {
- if (depth > 0) {
- writeNewLine();
- }
- doIndent();
- if(lexical!=null)
- lexical.comment(ch,start,length);
- }
-
- public void startDTD(String name, String publicId, String systemId) throws SAXException {
- if(lexical!=null)
- lexical.startDTD(name, publicId, systemId);
- }
-
- public void endDTD() throws SAXException {
- if(lexical!=null)
- lexical.endDTD();
- }
-
- public void startEntity(String name) throws SAXException {
- if(lexical!=null)
- lexical.startEntity(name);
- }
-
- public void endEntity(String name) throws SAXException {
- if(lexical!=null)
- lexical.endEntity(name);
- }
-
- public void startCDATA() throws SAXException {
- if(lexical!=null)
- lexical.startCDATA();
- }
-
- public void endCDATA() throws SAXException {
- if(lexical!=null)
- lexical.endCDATA();
- }
-
- ////////////////////////////////////////////////////////////////////
- // Internal methods.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Print indentation for the current level.
- *
- * @exception org.xml.sax.SAXException If there is an error
- * writing the indentation characters, or if a filter
- * further down the chain raises an exception.
- */
- private void doIndent ()
- throws SAXException
- {
- if (depth > 0) {
- char[] ch = indentStep.toCharArray();
- for( int i=0; i<depth; i++ )
- characters(ch, 0, ch.length);
- }
- }
-
-
- ////////////////////////////////////////////////////////////////////
- // Constants.
- ////////////////////////////////////////////////////////////////////
-
- private final static Object SEEN_NOTHING = new Object();
- private final static Object SEEN_ELEMENT = new Object();
- private final static Object SEEN_DATA = new Object();
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal state.
- ////////////////////////////////////////////////////////////////////
-
- private Object state = SEEN_NOTHING;
- private Stack<Object> stateStack = new Stack<Object>();
-
- private String indentStep = "";
- private int depth = 0;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/IndentingXMLStreamWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/IndentingXMLStreamWriter.java
deleted file mode 100644
index 9a9af5f0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/IndentingXMLStreamWriter.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.output;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import java.util.Stack;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public class IndentingXMLStreamWriter extends DelegatingXMLStreamWriter {
- private final static Object SEEN_NOTHING = new Object();
- private final static Object SEEN_ELEMENT = new Object();
- private final static Object SEEN_DATA = new Object();
-
- private Object state = SEEN_NOTHING;
- private Stack<Object> stateStack = new Stack<Object>();
-
- private String indentStep = " ";
- private int depth = 0;
-
- public IndentingXMLStreamWriter(XMLStreamWriter writer) {
- super(writer);
- }
-
- /**
- * Return the current indent step.
- *
- * <p>Return the current indent step: each start tag will be
- * indented by this number of spaces times the number of
- * ancestors that the element has.</p>
- *
- * @return The number of spaces in each indentation step,
- * or 0 or less for no indentation.
- * @see #setIndentStep(int)
- *
- * @deprecated
- * Only return the length of the indent string.
- */
- public int getIndentStep() {
- return indentStep.length();
- }
-
-
- /**
- * Set the current indent step.
- *
- * @param indentStep The new indent step (0 or less for no
- * indentation).
- * @see #getIndentStep()
- *
- * @deprecated
- * Should use the version that takes string.
- */
- public void setIndentStep(int indentStep) {
- StringBuilder s = new StringBuilder();
- for (; indentStep > 0; indentStep--) s.append(' ');
- setIndentStep(s.toString());
- }
-
- public void setIndentStep(String s) {
- this.indentStep = s;
- }
-
- private void onStartElement() throws XMLStreamException {
- stateStack.push(SEEN_ELEMENT);
- state = SEEN_NOTHING;
- if (depth > 0) {
- super.writeCharacters("\n");
- }
- doIndent();
- depth++;
- }
-
- private void onEndElement() throws XMLStreamException {
- depth--;
- if (state == SEEN_ELEMENT) {
- super.writeCharacters("\n");
- doIndent();
- }
- state = stateStack.pop();
- }
-
- private void onEmptyElement() throws XMLStreamException {
- state = SEEN_ELEMENT;
- if (depth > 0) {
- super.writeCharacters("\n");
- }
- doIndent();
- }
-
- /**
- * Print indentation for the current level.
- *
- * @exception org.xml.sax.SAXException If there is an error
- * writing the indentation characters, or if a filter
- * further down the chain raises an exception.
- */
- private void doIndent() throws XMLStreamException {
- if (depth > 0) {
- for (int i = 0; i < depth; i++)
- super.writeCharacters(indentStep);
- }
- }
-
-
- public void writeStartDocument() throws XMLStreamException {
- super.writeStartDocument();
- super.writeCharacters("\n");
- }
-
- public void writeStartDocument(String version) throws XMLStreamException {
- super.writeStartDocument(version);
- super.writeCharacters("\n");
- }
-
- public void writeStartDocument(String encoding, String version) throws XMLStreamException {
- super.writeStartDocument(encoding, version);
- super.writeCharacters("\n");
- }
-
- public void writeStartElement(String localName) throws XMLStreamException {
- onStartElement();
- super.writeStartElement(localName);
- }
-
- public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException {
- onStartElement();
- super.writeStartElement(namespaceURI, localName);
- }
-
- public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
- onStartElement();
- super.writeStartElement(prefix, localName, namespaceURI);
- }
-
- public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException {
- onEmptyElement();
- super.writeEmptyElement(namespaceURI, localName);
- }
-
- public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
- onEmptyElement();
- super.writeEmptyElement(prefix, localName, namespaceURI);
- }
-
- public void writeEmptyElement(String localName) throws XMLStreamException {
- onEmptyElement();
- super.writeEmptyElement(localName);
- }
-
- public void writeEndElement() throws XMLStreamException {
- onEndElement();
- super.writeEndElement();
- }
-
- public void writeCharacters(String text) throws XMLStreamException {
- state = SEEN_DATA;
- super.writeCharacters(text);
- }
-
- public void writeCharacters(char[] text, int start, int len) throws XMLStreamException {
- state = SEEN_DATA;
- super.writeCharacters(text, start, len);
- }
-
- public void writeCData(String data) throws XMLStreamException {
- state = SEEN_DATA;
- super.writeCData(data);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/ResultFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/ResultFactory.java
deleted file mode 100644
index 1ad7c82a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/ResultFactory.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.output;
-
-import javax.xml.transform.Result;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.sax.SAXResult;
-import javax.xml.transform.stream.StreamResult;
-
-/**
- * Factory for producing XmlSerializers for various Result types.
- *
- * @author Ryan.Shoemaker@Sun.COM
- */
-public abstract class ResultFactory {
-
- /**
- * Do not instanciate.
- */
- private ResultFactory() {}
-
- /**
- * Factory method for producing {@link XmlSerializer) from {@link javax.xml.transform.Result}.
- *
- * This method supports {@link javax.xml.transform.sax.SAXResult},
- * {@link javax.xml.transform.stream.StreamResult}, and {@link javax.xml.transform.dom.DOMResult}.
- *
- * @param result the Result that will receive output from the XmlSerializer
- * @return an implementation of XmlSerializer that will produce output on the supplied Result
- */
- public static XmlSerializer createSerializer(Result result) {
- if (result instanceof SAXResult)
- return new SaxSerializer((SAXResult) result);
- if (result instanceof DOMResult)
- return new DomSerializer((DOMResult) result);
- if (result instanceof StreamResult)
- return new StreamSerializer((StreamResult) result);
- if (result instanceof TXWResult)
- return new TXWSerializer(((TXWResult)result).getWriter());
-
- throw new UnsupportedOperationException("Unsupported Result type: " + result.getClass().getName());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/SaxSerializer.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/SaxSerializer.java
deleted file mode 100644
index c08c9154..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/SaxSerializer.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.output;
-
-import com.sun.xml.internal.txw2.TxwException;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.AttributesImpl;
-
-import javax.xml.transform.sax.SAXResult;
-import java.util.Stack;
-
-/**
- * {@link XmlSerializer} for {@link SAXResult} and {@link ContentHandler}.
- *
- * @author Ryan.Shoemaker@Sun.COM
- */
-public class SaxSerializer implements XmlSerializer {
-
- private final ContentHandler writer;
- private final LexicalHandler lexical;
-
- public SaxSerializer(ContentHandler handler) {
- this(handler,null,true);
- }
-
- /**
- * Creates an {@link XmlSerializer} that writes SAX events.
- *
- * <p>
- * Sepcifying a non-null {@link LexicalHandler} allows applications
- * to write comments and CDATA sections.
- */
- public SaxSerializer(ContentHandler handler,LexicalHandler lex) {
- this(handler, lex, true);
- }
-
- public SaxSerializer(ContentHandler handler,LexicalHandler lex, boolean indenting) {
- if(!indenting) {
- writer = handler;
- lexical = lex;
- } else {
- IndentingXMLFilter indenter = new IndentingXMLFilter(handler, lex);
- writer = indenter;
- lexical = indenter;
- }
- }
-
- public SaxSerializer(SAXResult result) {
- this(result.getHandler(),result.getLexicalHandler());
- }
-
-
- // XmlSerializer implementation
-
- public void startDocument() {
- try {
- writer.startDocument();
- } catch (SAXException e) {
- throw new TxwException(e);
- }
- }
-
- // namespace prefix bindings
- // add in #writeXmlns and fired in #endStartTag
- private final Stack<String> prefixBindings = new Stack<String>();
-
- public void writeXmlns(String prefix, String uri) {
- // defend against parsers that pass null in for "xmlns" prefix
- if (prefix == null) {
- prefix = "";
- }
-
- if (prefix.equals("xml")) {
- return;
- }
-
- prefixBindings.add(uri);
- prefixBindings.add(prefix);
- }
-
- // element stack
- private final Stack<String> elementBindings = new Stack<String>();
-
- public void beginStartTag(String uri, String localName, String prefix) {
- // save element bindings for #endTag
- elementBindings.add(getQName(prefix, localName));
- elementBindings.add(localName);
- elementBindings.add(uri);
- }
-
- // attribute storage
- // attrs are buffered in #writeAttribute and sent to the content
- // handler in #endStartTag
- private final AttributesImpl attrs = new AttributesImpl();
-
- public void writeAttribute(String uri, String localName, String prefix, StringBuilder value) {
- attrs.addAttribute(uri,
- localName,
- getQName(prefix, localName),
- "CDATA",
- value.toString());
- }
-
- public void endStartTag(String uri, String localName, String prefix) {
- try {
- while (prefixBindings.size() != 0) {
- writer.startPrefixMapping(prefixBindings.pop(), // prefix
- prefixBindings.pop() // uri
- );
- }
-
- writer.startElement(uri,
- localName,
- getQName(prefix, localName),
- attrs);
-
- attrs.clear();
- } catch (SAXException e) {
- throw new TxwException(e);
- }
- }
-
- public void endTag() {
- try {
- writer.endElement(elementBindings.pop(), // uri
- elementBindings.pop(), // localName
- elementBindings.pop() // qname
- );
- } catch (SAXException e) {
- throw new TxwException(e);
- }
- }
-
- public void text(StringBuilder text) {
- try {
- writer.characters(text.toString().toCharArray(), 0, text.length());
- } catch (SAXException e) {
- throw new TxwException(e);
- }
- }
-
- public void cdata(StringBuilder text) {
- if(lexical==null)
- throw new UnsupportedOperationException("LexicalHandler is needed to write PCDATA");
-
- try {
- lexical.startCDATA();
- text(text);
- lexical.endCDATA();
- } catch (SAXException e) {
- throw new TxwException(e);
- }
- }
-
- public void comment(StringBuilder comment) {
- try {
- if(lexical==null)
- throw new UnsupportedOperationException("LexicalHandler is needed to write comments");
- else
- lexical.comment(comment.toString().toCharArray(), 0, comment.length() );
- } catch (SAXException e) {
- throw new TxwException(e);
- }
- }
-
- public void endDocument() {
- try {
- writer.endDocument();
- } catch (SAXException e) {
- throw new TxwException(e);
- }
- }
-
- public void flush() {
- // noop
- }
-
- // other methods
- private static String getQName(String prefix, String localName) {
- final String qName;
- if (prefix == null || prefix.length() == 0)
- qName = localName;
- else
- qName = prefix + ':' + localName;
-
- return qName;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/StaxSerializer.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/StaxSerializer.java
deleted file mode 100644
index d0ad8e85..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/StaxSerializer.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.output;
-
-import com.sun.xml.internal.txw2.TxwException;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * XML serializer for StAX XMLStreamWriter.
- *
- * TODO: add support for XMLEventWriter (if it makes sense)
- *
- * @author Ryan.Shoemaker@Sun.COM
- */
-
-public class StaxSerializer implements XmlSerializer {
- private final XMLStreamWriter out;
-
- public StaxSerializer(XMLStreamWriter writer) {
- this(writer,true);
- }
-
- public StaxSerializer(XMLStreamWriter writer, boolean indenting) {
- if(indenting)
- writer = new IndentingXMLStreamWriter(writer);
- this.out = writer;
- }
-
- public void startDocument() {
- try {
- out.writeStartDocument();
- } catch (XMLStreamException e) {
- throw new TxwException(e);
- }
- }
-
- public void beginStartTag(String uri, String localName, String prefix) {
- try {
- out.writeStartElement(prefix, localName, uri);
- } catch (XMLStreamException e) {
- throw new TxwException(e);
- }
- }
-
- public void writeAttribute(String uri, String localName, String prefix, StringBuilder value) {
- try {
- out.writeAttribute(prefix, uri, localName, value.toString());
- } catch (XMLStreamException e) {
- throw new TxwException(e);
- }
- }
-
- public void writeXmlns(String prefix, String uri) {
- try {
- if (prefix.length() == 0) {
- out.setDefaultNamespace(uri);
- } else {
- out.setPrefix(prefix, uri);
- }
-
- // this method handles "", null, and "xmlns" prefixes properly
- out.writeNamespace(prefix, uri);
- } catch (XMLStreamException e) {
- throw new TxwException(e);
- }
- }
-
- public void endStartTag(String uri, String localName, String prefix) {
- // NO-OP
- }
-
- public void endTag() {
- try {
- out.writeEndElement();
- } catch (XMLStreamException e) {
- throw new TxwException(e);
- }
- }
-
- public void text(StringBuilder text) {
- try {
- out.writeCharacters(text.toString());
- } catch (XMLStreamException e) {
- throw new TxwException(e);
- }
- }
-
- public void cdata(StringBuilder text) {
- try {
- out.writeCData(text.toString());
- } catch (XMLStreamException e) {
- throw new TxwException(e);
- }
- }
-
- public void comment(StringBuilder comment) {
- try {
- out.writeComment(comment.toString());
- } catch (XMLStreamException e) {
- throw new TxwException(e);
- }
- }
-
- public void endDocument() {
- try {
- out.writeEndDocument();
- out.flush();
- } catch (XMLStreamException e) {
- throw new TxwException(e);
- }
- }
-
- public void flush() {
- try {
- out.flush();
- } catch (XMLStreamException e) {
- throw new TxwException(e);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/StreamSerializer.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/StreamSerializer.java
deleted file mode 100644
index 3b2fe5c2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/StreamSerializer.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.output;
-
-import com.sun.xml.internal.txw2.TxwException;
-
-import javax.xml.transform.stream.StreamResult;
-import java.io.BufferedWriter;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.io.UnsupportedEncodingException;
-
-/**
- * {@link XmlSerializer} for {@link javax.xml.transform.stream.StreamResult}.
- *
- * @author Ryan.Shoemaker@Sun.COM
- */
-public class StreamSerializer implements XmlSerializer {
-
- // delegate to SaxSerializer
- private final SaxSerializer serializer;
-
- private final XMLWriter writer;
-
- public StreamSerializer(OutputStream out) {
- this(createWriter(out));
- }
-
- public StreamSerializer(OutputStream out,String encoding) throws UnsupportedEncodingException {
- this(createWriter(out,encoding));
- }
-
- public StreamSerializer(Writer out) {
- this(new StreamResult(out));
- }
-
- public StreamSerializer(StreamResult streamResult) {
- // if this method opened a stream, let it close it
- final OutputStream[] autoClose = new OutputStream[1];
-
- if (streamResult.getWriter() != null)
- writer = createWriter(streamResult.getWriter());
- else if (streamResult.getOutputStream() != null)
- writer = createWriter(streamResult.getOutputStream());
- else if (streamResult.getSystemId() != null) {
- String fileURL = streamResult.getSystemId();
-
- fileURL = convertURL(fileURL);
-
- try {
- FileOutputStream fos = new FileOutputStream(fileURL);
- autoClose[0] = fos;
- writer = createWriter(fos);
- } catch (IOException e) {
- throw new TxwException(e);
- }
- } else
- throw new IllegalArgumentException();
-
- // now delegate to the SaxSerializer
- serializer = new SaxSerializer(writer,writer,false) {
- public void endDocument() {
- super.endDocument();
- if(autoClose[0]!=null) {
- try {
- autoClose[0].close();
- } catch (IOException e) {
- throw new TxwException(e);
- }
- autoClose[0] = null;
- }
- }
- };
- }
-
- private StreamSerializer(XMLWriter writer) {
- this.writer = writer;
- // now delegate to the SaxSerializer
- serializer = new SaxSerializer(writer,writer,false);
- }
-
- private String convertURL(String url) {
- url = url.replace('\\', '/');
- url = url.replaceAll("//","/");
- url = url.replaceAll("//","/");
- if (url.startsWith("file:/")) {
- if (url.substring(6).indexOf(":") > 0)
- url = url.substring(6);
- else
- url = url.substring(5);
- } // otherwise assume that it's a file name
- return url;
- }
-
- // XmlSerializer api's - delegate to SaxSerializer
- public void startDocument() {
- serializer.startDocument();
- }
-
- public void beginStartTag(String uri, String localName, String prefix) {
- serializer.beginStartTag(uri, localName, prefix);
- }
-
- public void writeAttribute(String uri, String localName, String prefix, StringBuilder value) {
- serializer.writeAttribute(uri, localName, prefix, value);
- }
-
- public void writeXmlns(String prefix, String uri) {
- serializer.writeXmlns(prefix, uri);
- }
-
- public void endStartTag(String uri, String localName, String prefix) {
- serializer.endStartTag(uri, localName, prefix);
- }
-
- public void endTag() {
- serializer.endTag();
- }
-
- public void text(StringBuilder text) {
- serializer.text(text);
- }
-
- public void cdata(StringBuilder text) {
- serializer.cdata(text);
- }
-
- public void comment(StringBuilder comment) {
- serializer.comment(comment);
- }
-
- public void endDocument() {
- serializer.endDocument();
- }
-
- public void flush() {
- serializer.flush();
- try {
- writer.flush();
- } catch (IOException e) {
- throw new TxwException(e);
- }
- }
-
- // other supporting code
- private static XMLWriter createWriter(Writer w) {
- // buffering improves the performance
- DataWriter dw = new DataWriter(new BufferedWriter(w));
- dw.setIndentStep(" ");
- return dw;
- }
-
- private static XMLWriter createWriter(OutputStream os, String encoding) throws UnsupportedEncodingException {
- XMLWriter writer = createWriter(new OutputStreamWriter(os,encoding));
- writer.setEncoding(encoding);
- return writer;
- }
-
- private static XMLWriter createWriter(OutputStream os) {
- try {
- return createWriter(os,"UTF-8");
- } catch (UnsupportedEncodingException e) {
- // UTF-8 is supported on all platforms.
- throw new Error(e);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/TXWResult.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/TXWResult.java
deleted file mode 100644
index bd634e3d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/TXWResult.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.output;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-
-import javax.xml.transform.Result;
-
-/**
- * Allow you to wrap {@link TypedXmlWriter} into a {@link Result}
- * so that it can be passed to {@link ResultFactory}.
- *
- * <p>
- * This class doesn't extend from known {@link Result} type,
- * so it won't work elsewhere.
- *
- * @author Kohsuke Kawaguchi
- */
-public class TXWResult implements Result {
- private String systemId;
-
- private TypedXmlWriter writer;
-
- public TXWResult(TypedXmlWriter writer) {
- this.writer = writer;
- }
-
- public TypedXmlWriter getWriter() {
- return writer;
- }
-
- public void setWriter(TypedXmlWriter writer) {
- this.writer = writer;
- }
-
- public String getSystemId() {
- return systemId;
- }
-
- public void setSystemId(String systemId) {
- this.systemId = systemId;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/TXWSerializer.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/TXWSerializer.java
deleted file mode 100644
index ef2cd60c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/TXWSerializer.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.output;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.TXW;
-
-/**
- * Dummpy implementation to pass through {@link TypedXmlWriter}
- * to {@link TXW}
- *
- * @author Kohsuke Kawaguchi
- */
-public final class TXWSerializer implements XmlSerializer {
- public final TypedXmlWriter txw;
-
- public TXWSerializer(TypedXmlWriter txw) {
- this.txw = txw;
- }
-
- public void startDocument() {
- throw new UnsupportedOperationException();
- }
-
- public void endDocument() {
- throw new UnsupportedOperationException();
- }
-
- public void beginStartTag(String uri, String localName, String prefix) {
- throw new UnsupportedOperationException();
- }
-
- public void writeAttribute(String uri, String localName, String prefix, StringBuilder value) {
- throw new UnsupportedOperationException();
- }
-
- public void writeXmlns(String prefix, String uri) {
- throw new UnsupportedOperationException();
- }
-
- public void endStartTag(String uri, String localName, String prefix) {
- throw new UnsupportedOperationException();
- }
-
- public void endTag() {
- throw new UnsupportedOperationException();
- }
-
- public void text(StringBuilder text) {
- throw new UnsupportedOperationException();
- }
-
- public void cdata(StringBuilder text) {
- throw new UnsupportedOperationException();
- }
-
- public void comment(StringBuilder comment) {
- throw new UnsupportedOperationException();
- }
-
- public void flush() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/XMLWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/XMLWriter.java
deleted file mode 100644
index ce706a86..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/XMLWriter.java
+++ /dev/null
@@ -1,1075 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// @@3RD PARTY CODE@@
-
-// XMLWriter.java - serialize an XML document.
-// Written by David Megginson, david@megginson.com
-// NO WARRANTY! This class is in the public domain.
-
-// Id: XMLWriter.java,v 1.5 2000/09/17 01:08:16 david Exp
-
-package com.sun.xml.internal.txw2.output;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.AttributesImpl;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-
-/**
- * Filter to write an XML document from a SAX event stream.
- *
- * <p>This class can be used by itself or as part of a SAX event
- * stream: it takes as input a series of SAX2 ContentHandler
- * events and uses the information in those events to write
- * an XML document. Since this class is a filter, it can also
- * pass the events on down a filter chain for further processing
- * (you can use the XMLWriter to take a snapshot of the current
- * state at any point in a filter chain), and it can be
- * used directly as a ContentHandler for a SAX2 XMLReader.</p>
- *
- * <p>The client creates a document by invoking the methods for
- * standard SAX2 events, always beginning with the
- * {@link #startDocument startDocument} method and ending with
- * the {@link #endDocument endDocument} method. There are convenience
- * methods provided so that clients to not have to create empty
- * attribute lists or provide empty strings as parameters; for
- * example, the method invocation</p>
- *
- * <pre>
- * w.startElement("foo");
- * </pre>
- *
- * <p>is equivalent to the regular SAX2 ContentHandler method</p>
- *
- * <pre>
- * w.startElement("", "foo", "", new AttributesImpl());
- * </pre>
- *
- * <p>Except that it is more efficient because it does not allocate
- * a new empty attribute list each time. The following code will send
- * a simple XML document to standard output:</p>
- *
- * <pre>
- * XMLWriter w = new XMLWriter();
- *
- * w.startDocument();
- * w.startElement("greeting");
- * w.characters("Hello, world!");
- * w.endElement("greeting");
- * w.endDocument();
- * </pre>
- *
- * <p>The resulting document will look like this:</p>
- *
- * <pre>
- * &lt;?xml version="1.0" standalone="yes"?>
- *
- * &lt;greeting>Hello, world!&lt;/greeting>
- * </pre>
- *
- * <p>In fact, there is an even simpler convenience method,
- * <var>dataElement</var>, designed for writing elements that
- * contain only character data, so the code to generate the
- * document could be shortened to</p>
- *
- * <pre>
- * XMLWriter w = new XMLWriter();
- *
- * w.startDocument();
- * w.dataElement("greeting", "Hello, world!");
- * w.endDocument();
- * </pre>
- *
- * <h2>Whitespace</h2>
- *
- * <p>According to the XML Recommendation, <em>all</em> whitespace
- * in an XML document is potentially significant to an application,
- * so this class never adds newlines or indentation. If you
- * insert three elements in a row, as in</p>
- *
- * <pre>
- * w.dataElement("item", "1");
- * w.dataElement("item", "2");
- * w.dataElement("item", "3");
- * </pre>
- *
- * <p>you will end up with</p>
- *
- * <pre>
- * &lt;item>1&lt;/item>&lt;item>3&lt;/item>&lt;item>3&lt;/item>
- * </pre>
- *
- * <p>You need to invoke one of the <var>characters</var> methods
- * explicitly to add newlines or indentation. Alternatively, you
- * can use {@link DataWriter}, which
- * is derived from this class -- it is optimized for writing
- * purely data-oriented (or field-oriented) XML, and does automatic
- * linebreaks and indentation (but does not support mixed content
- * properly).</p>
- *
- *
- * <h2>Namespace Support</h2>
- *
- * <p>The writer contains extensive support for XML Namespaces, so that
- * a client application does not have to keep track of prefixes and
- * supply <var>xmlns</var> attributes. By default, the XML writer will
- * generate Namespace declarations in the form _NS1, _NS2, etc., wherever
- * they are needed, as in the following example:</p>
- *
- * <pre>
- * w.startDocument();
- * w.emptyElement("http://www.foo.com/ns/", "foo");
- * w.endDocument();
- * </pre>
- *
- * <p>The resulting document will look like this:</p>
- *
- * <pre>
- * &lt;?xml version="1.0" standalone="yes"?>
- *
- * &lt;_NS1:foo xmlns:_NS1="http://www.foo.com/ns/"/>
- * </pre>
- *
- * <p>In many cases, document authors will prefer to choose their
- * own prefixes rather than using the (ugly) default names. The
- * XML writer allows two methods for selecting prefixes:</p>
- *
- * <ol>
- * <li>the qualified name</li>
- * <li>the {@link #setPrefix setPrefix} method.</li>
- * </ol>
- *
- * <p>Whenever the XML writer finds a new Namespace URI, it checks
- * to see if a qualified (prefixed) name is also available; if so
- * it attempts to use the name's prefix (as long as the prefix is
- * not already in use for another Namespace URI).</p>
- *
- * <p>Before writing a document, the client can also pre-map a prefix
- * to a Namespace URI with the setPrefix method:</p>
- *
- * <pre>
- * w.setPrefix("http://www.foo.com/ns/", "foo");
- * w.startDocument();
- * w.emptyElement("http://www.foo.com/ns/", "foo");
- * w.endDocument();
- * </pre>
- *
- * <p>The resulting document will look like this:</p>
- *
- * <pre>
- * &lt;?xml version="1.0" standalone="yes"?>
- *
- * &lt;foo:foo xmlns:foo="http://www.foo.com/ns/"/>
- * </pre>
- *
- * <p>The default Namespace simply uses an empty string as the prefix:</p>
- *
- * <pre>
- * w.setPrefix("http://www.foo.com/ns/", "");
- * w.startDocument();
- * w.emptyElement("http://www.foo.com/ns/", "foo");
- * w.endDocument();
- * </pre>
- *
- * <p>The resulting document will look like this:</p>
- *
- * <pre>
- * &lt;?xml version="1.0" standalone="yes"?>
- *
- * &lt;foo xmlns="http://www.foo.com/ns/"/>
- * </pre>
- *
- * <p>By default, the XML writer will not declare a Namespace until
- * it is actually used. Sometimes, this approach will create
- * a large number of Namespace declarations, as in the following
- * example:</p>
- *
- * <pre>
- * &lt;xml version="1.0" standalone="yes"?>
- *
- * &lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- * &lt;rdf:Description about="http://www.foo.com/ids/books/12345">
- * &lt;dc:title xmlns:dc="http://www.purl.org/dc/">A Dark Night&lt;/dc:title>
- * &lt;dc:creator xmlns:dc="http://www.purl.org/dc/">Jane Smith&lt;/dc:title>
- * &lt;dc:date xmlns:dc="http://www.purl.org/dc/">2000-09-09&lt;/dc:title>
- * &lt;/rdf:Description>
- * &lt;/rdf:RDF>
- * </pre>
- *
- * <p>The "rdf" prefix is declared only once, because the RDF Namespace
- * is used by the root element and can be inherited by all of its
- * descendants; the "dc" prefix, on the other hand, is declared three
- * times, because no higher element uses the Namespace. To solve this
- * problem, you can instruct the XML writer to predeclare Namespaces
- * on the root element even if they are not used there:</p>
- *
- * <pre>
- * w.forceNSDecl("http://www.purl.org/dc/");
- * </pre>
- *
- * <p>Now, the "dc" prefix will be declared on the root element even
- * though it's not needed there, and can be inherited by its
- * descendants:</p>
- *
- * <pre>
- * &lt;xml version="1.0" standalone="yes"?>
- *
- * &lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- * xmlns:dc="http://www.purl.org/dc/">
- * &lt;rdf:Description about="http://www.foo.com/ids/books/12345">
- * &lt;dc:title>A Dark Night&lt;/dc:title>
- * &lt;dc:creator>Jane Smith&lt;/dc:title>
- * &lt;dc:date>2000-09-09&lt;/dc:title>
- * &lt;/rdf:Description>
- * &lt;/rdf:RDF>
- * </pre>
- *
- * <p>This approach is also useful for declaring Namespace prefixes
- * that be used by qualified names appearing in attribute values or
- * character data.</p>
- *
- * @author David Megginson, david@megginson.com
- * @version 0.2
- * @since JAXB1.0
- * @see org.xml.sax.XMLFilter
- * @see org.xml.sax.ContentHandler
- */
-public class XMLWriter extends XMLFilterImpl implements LexicalHandler
-{
- ////////////////////////////////////////////////////////////////////
- // Constructors.
- ////////////////////////////////////////////////////////////////////
-
-
-
-
- /**
- * Create a new XML writer.
- *
- * <p>Write to the writer provided.</p>
- *
- * @param writer
- * The output destination, or null to use standard output.
- * @param encoding
- * If non-null string is specified, it is written as a part
- * of the XML declaration.
- */
- public XMLWriter (Writer writer, String encoding, CharacterEscapeHandler _escapeHandler )
- {
- init(writer,encoding);
- this.escapeHandler = _escapeHandler;
- }
-
- public XMLWriter (Writer writer, String encoding ) {
- this( writer, encoding, DumbEscapeHandler.theInstance );
- }
-
-
-
- /**
- * Internal initialization method.
- *
- * <p>All of the public constructors invoke this method.
- *
- * @param writer The output destination, or null to use
- * standard output.
- */
- private void init (Writer writer,String encoding)
- {
- setOutput(writer,encoding);
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Public methods.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Reset the writer.
- *
- * <p>This method is especially useful if the writer throws an
- * exception before it is finished, and you want to reuse the
- * writer for a new document. It is usually a good idea to
- * invoke {@link #flush flush} before resetting the writer,
- * to make sure that no output is lost.</p>
- *
- * <p>This method is invoked automatically by the
- * {@link #startDocument startDocument} method before writing
- * a new document.</p>
- *
- * <p><strong>Note:</strong> this method will <em>not</em>
- * clear the prefix or URI information in the writer or
- * the selected output writer.</p>
- *
- * @see #flush()
- */
- public void reset ()
- {
- elementLevel = 0;
- startTagIsClosed = true;
- }
-
-
- /**
- * Flush the output.
- *
- * <p>This method flushes the output stream. It is especially useful
- * when you need to make certain that the entire document has
- * been written to output but do not want to _commit the output
- * stream.</p>
- *
- * <p>This method is invoked automatically by the
- * {@link #endDocument endDocument} method after writing a
- * document.</p>
- *
- * @see #reset()
- */
- public void flush ()
- throws IOException
- {
- output.flush();
- }
-
-
- /**
- * Set a new output destination for the document.
- *
- * @param writer The output destination, or null to use
- * standard output.
- * @see #flush()
- */
- public void setOutput (Writer writer,String _encoding)
- {
- if (writer == null) {
- output = new OutputStreamWriter(System.out);
- } else {
- output = writer;
- }
- encoding = _encoding;
- }
-
- public void setEncoding(String encoding) {
- this.encoding = encoding;
- }
-
- /**
- * Set whether the writer should print out the XML declaration
- * (&lt;?xml version='1.0' ... ?>).
- * <p>
- * This option is set to true by default.
- */
- public void setXmlDecl( boolean _writeXmlDecl ) {
- this.writeXmlDecl = _writeXmlDecl;
- }
-
- /**
- * Sets the header string.
- *
- * This string will be written right after the xml declaration
- * without any escaping. Useful for generating a boiler-plate
- * DOCTYPE decl, PIs, and comments.
- *
- * @param _header
- * passing null will work as if the empty string is passed.
- */
- public void setHeader( String _header ) {
- this.header = _header;
- }
-
-
- private final HashMap locallyDeclaredPrefix = new HashMap();
- public void startPrefixMapping( String prefix, String uri ) throws SAXException {
- locallyDeclaredPrefix.put(prefix,uri);
- }
-
-
- ////////////////////////////////////////////////////////////////////
- // Methods from org.xml.sax.ContentHandler.
- ////////////////////////////////////////////////////////////////////
-
- /**
- * Write the XML declaration at the beginning of the document.
- *
- * Pass the event on down the filter chain for further processing.
- *
- * @exception org.xml.sax.SAXException If there is an error
- * writing the XML declaration, or if a handler further down
- * the filter chain raises an exception.
- * @see org.xml.sax.ContentHandler#startDocument()
- */
- public void startDocument ()
- throws SAXException
- {
- try {
- reset();
-
- if(writeXmlDecl) {
- String e="";
- if(encoding!=null)
- e = " encoding=\""+encoding+"\"";
-
- write("<?xml version=\"1.0\""+e+" standalone=\"yes\"?>\n");
- }
-
- if(header!=null)
- write(header);
-
- super.startDocument();
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
- /**
- * Write a newline at the end of the document.
- *
- * Pass the event on down the filter chain for further processing.
- *
- * @exception org.xml.sax.SAXException If there is an error
- * writing the newline, or if a handler further down
- * the filter chain raises an exception.
- * @see org.xml.sax.ContentHandler#endDocument()
- */
- public void endDocument ()
- throws SAXException
- {
- try {
- if (!startTagIsClosed) {
- write("/>");
- startTagIsClosed = true;
- }
- write('\n');
- super.endDocument();
- try {
- flush();
- } catch (IOException e) {
- throw new SAXException(e);
- }
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
- /**
- * Write a start tag.
- *
- * Pass the event on down the filter chain for further processing.
- *
- * @param uri The Namespace URI, or the empty string if none
- * is available.
- * @param localName The element's local (unprefixed) name (required).
- * @param qName The element's qualified (prefixed) name, or the
- * empty string is none is available. This method will
- * use the qName as a template for generating a prefix
- * if necessary, but it is not guaranteed to use the
- * same qName.
- * @param atts The element's attribute list (must not be null).
- * @exception org.xml.sax.SAXException If there is an error
- * writing the start tag, or if a handler further down
- * the filter chain raises an exception.
- * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
- */
- public void startElement (String uri, String localName,
- String qName, Attributes atts)
- throws SAXException
- {
- try {
- if (!startTagIsClosed) {
- write(">");
- }
- elementLevel++;
-// nsSupport.pushContext();
-
- write('<');
- writeName(uri, localName, qName, true);
- writeAttributes(atts);
-
- // declare namespaces specified by the startPrefixMapping methods
- if(!locallyDeclaredPrefix.isEmpty()) {
- Iterator itr = locallyDeclaredPrefix.entrySet().iterator();
- while(itr.hasNext()) {
- Map.Entry e = (Map.Entry)itr.next();
- String p = (String)e.getKey();
- String u = (String)e.getValue();
- if (u == null) {
- u = "";
- }
- write(' ');
- if ("".equals(p)) {
- write("xmlns=\"");
- } else {
- write("xmlns:");
- write(p);
- write("=\"");
- }
- char ch[] = u.toCharArray();
- writeEsc(ch, 0, ch.length, true);
- write('\"');
- }
- locallyDeclaredPrefix.clear(); // clear the contents
- }
-
-// if (elementLevel == 1) {
-// forceNSDecls();
-// }
-// writeNSDecls();
- super.startElement(uri, localName, qName, atts);
- startTagIsClosed = false;
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
- /**
- * Write an end tag.
- *
- * Pass the event on down the filter chain for further processing.
- *
- * @param uri The Namespace URI, or the empty string if none
- * is available.
- * @param localName The element's local (unprefixed) name (required).
- * @param qName The element's qualified (prefixed) name, or the
- * empty string is none is available. This method will
- * use the qName as a template for generating a prefix
- * if necessary, but it is not guaranteed to use the
- * same qName.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the end tag, or if a handler further down
- * the filter chain raises an exception.
- * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String, java.lang.String)
- */
- public void endElement (String uri, String localName, String qName)
- throws SAXException
- {
- try {
- if (startTagIsClosed) {
- write("</");
- writeName(uri, localName, qName, true);
- write('>');
- } else {
- write("/>");
- startTagIsClosed = true;
- }
- if (elementLevel == 1) {
- write('\n');
- }
- super.endElement(uri, localName, qName);
-// nsSupport.popContext();
- elementLevel--;
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
- /**
- * Write character data.
- *
- * Pass the event on down the filter chain for further processing.
- *
- * @param ch The array of characters to write.
- * @param start The starting position in the array.
- * @param len The number of characters to write.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the characters, or if a handler further down
- * the filter chain raises an exception.
- * @see org.xml.sax.ContentHandler#characters(char[], int, int)
- */
- public void characters (char ch[], int start, int len)
- throws SAXException
- {
- try {
- if (!startTagIsClosed) {
- write('>');
- startTagIsClosed = true;
- }
- if(inCDATA)
- output.write(ch,start,len);
- else
- writeEsc(ch, start, len, false);
- super.characters(ch, start, len);
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
- /**
- * Write ignorable whitespace.
- *
- * Pass the event on down the filter chain for further processing.
- *
- * @param ch The array of characters to write.
- * @param start The starting position in the array.
- * @param length The number of characters to write.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the whitespace, or if a handler further down
- * the filter chain raises an exception.
- * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
- */
- public void ignorableWhitespace (char ch[], int start, int length)
- throws SAXException
- {
- try {
- writeEsc(ch, start, length, false);
- super.ignorableWhitespace(ch, start, length);
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
-
- /**
- * Write a processing instruction.
- *
- * Pass the event on down the filter chain for further processing.
- *
- * @param target The PI target.
- * @param data The PI data.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the PI, or if a handler further down
- * the filter chain raises an exception.
- * @see org.xml.sax.ContentHandler#processingInstruction(java.lang.String, java.lang.String)
- */
- public void processingInstruction (String target, String data)
- throws SAXException
- {
- try {
- if (!startTagIsClosed) {
- write('>');
- startTagIsClosed = true;
- }
- write("<?");
- write(target);
- write(' ');
- write(data);
- write("?>");
- if (elementLevel < 1) {
- write('\n');
- }
- super.processingInstruction(target, data);
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Convenience methods.
- ////////////////////////////////////////////////////////////////////
-
-
-
- /**
- * Start a new element without a qname or attributes.
- *
- * <p>This method will provide a default empty attribute
- * list and an empty string for the qualified name.
- * It invokes {@link
- * #startElement(String, String, String, Attributes)}
- * directly.</p>
- *
- * @param uri The element's Namespace URI.
- * @param localName The element's local name.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the start tag, or if a handler further down
- * the filter chain raises an exception.
- * @see #startElement(String, String, String, Attributes)
- */
- public void startElement (String uri, String localName)
- throws SAXException
- {
- startElement(uri, localName, "", EMPTY_ATTS);
- }
-
-
- /**
- * Start a new element without a qname, attributes or a Namespace URI.
- *
- * <p>This method will provide an empty string for the
- * Namespace URI, and empty string for the qualified name,
- * and a default empty attribute list. It invokes
- * #startElement(String, String, String, Attributes)}
- * directly.</p>
- *
- * @param localName The element's local name.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the start tag, or if a handler further down
- * the filter chain raises an exception.
- * @see #startElement(String, String, String, Attributes)
- */
- public void startElement (String localName)
- throws SAXException
- {
- startElement("", localName, "", EMPTY_ATTS);
- }
-
-
- /**
- * End an element without a qname.
- *
- * <p>This method will supply an empty string for the qName.
- * It invokes {@link #endElement(String, String, String)}
- * directly.</p>
- *
- * @param uri The element's Namespace URI.
- * @param localName The element's local name.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the end tag, or if a handler further down
- * the filter chain raises an exception.
- * @see #endElement(String, String, String)
- */
- public void endElement (String uri, String localName)
- throws SAXException
- {
- endElement(uri, localName, "");
- }
-
-
- /**
- * End an element without a Namespace URI or qname.
- *
- * <p>This method will supply an empty string for the qName
- * and an empty string for the Namespace URI.
- * It invokes {@link #endElement(String, String, String)}
- * directly.</p>
- *
- * @param localName The element's local name.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the end tag, or if a handler further down
- * the filter chain raises an exception.
- * @see #endElement(String, String, String)
- */
- public void endElement (String localName)
- throws SAXException
- {
- endElement("", localName, "");
- }
-
-
- /**
- * Write an element with character data content.
- *
- * <p>This is a convenience method to write a complete element
- * with character data content, including the start tag
- * and end tag.</p>
- *
- * <p>This method invokes
- * {@link #startElement(String, String, String, Attributes)},
- * followed by
- * {@link #characters(String)}, followed by
- * {@link #endElement(String, String, String)}.</p>
- *
- * @param uri The element's Namespace URI.
- * @param localName The element's local name.
- * @param qName The element's default qualified name.
- * @param atts The element's attributes.
- * @param content The character data content.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the empty tag, or if a handler further down
- * the filter chain raises an exception.
- * @see #startElement(String, String, String, Attributes)
- * @see #characters(String)
- * @see #endElement(String, String, String)
- */
- public void dataElement (String uri, String localName,
- String qName, Attributes atts,
- String content)
- throws SAXException
- {
- startElement(uri, localName, qName, atts);
- characters(content);
- endElement(uri, localName, qName);
- }
-
-
- /**
- * Write an element with character data content but no attributes.
- *
- * <p>This is a convenience method to write a complete element
- * with character data content, including the start tag
- * and end tag. This method provides an empty string
- * for the qname and an empty attribute list.</p>
- *
- * <p>This method invokes
- * {@link #startElement(String, String, String, Attributes)},
- * followed by
- * {@link #characters(String)}, followed by
- * {@link #endElement(String, String, String)}.</p>
- *
- * @param uri The element's Namespace URI.
- * @param localName The element's local name.
- * @param content The character data content.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the empty tag, or if a handler further down
- * the filter chain raises an exception.
- * @see #startElement(String, String, String, Attributes)
- * @see #characters(String)
- * @see #endElement(String, String, String)
- */
- public void dataElement (String uri, String localName, String content)
- throws SAXException
- {
- dataElement(uri, localName, "", EMPTY_ATTS, content);
- }
-
-
- /**
- * Write an element with character data content but no attributes or Namespace URI.
- *
- * <p>This is a convenience method to write a complete element
- * with character data content, including the start tag
- * and end tag. The method provides an empty string for the
- * Namespace URI, and empty string for the qualified name,
- * and an empty attribute list.</p>
- *
- * <p>This method invokes
- * {@link #startElement(String, String, String, Attributes)},
- * followed by
- * {@link #characters(String)}, followed by
- * {@link #endElement(String, String, String)}.</p>
- *
- * @param localName The element's local name.
- * @param content The character data content.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the empty tag, or if a handler further down
- * the filter chain raises an exception.
- * @see #startElement(String, String, String, Attributes)
- * @see #characters(String)
- * @see #endElement(String, String, String)
- */
- public void dataElement (String localName, String content)
- throws SAXException
- {
- dataElement("", localName, "", EMPTY_ATTS, content);
- }
-
-
- /**
- * Write a string of character data, with XML escaping.
- *
- * <p>This is a convenience method that takes an XML
- * String, converts it to a character array, then invokes
- * {@link #characters(char[], int, int)}.</p>
- *
- * @param data The character data.
- * @exception org.xml.sax.SAXException If there is an error
- * writing the string, or if a handler further down
- * the filter chain raises an exception.
- * @see #characters(char[], int, int)
- */
- public void characters (String data) throws SAXException {
- try {
- if (!startTagIsClosed) {
- write('>');
- startTagIsClosed = true;
- }
- char ch[] = data.toCharArray();
- characters(ch, 0, ch.length);
- } catch( IOException e ) {
- throw new SAXException(e);
- }
- }
-
-
- public void startDTD(String name, String publicId, String systemId) throws SAXException {
- }
-
- public void endDTD() throws SAXException {
- }
-
- public void startEntity(String name) throws SAXException {
- }
-
- public void endEntity(String name) throws SAXException {
- }
-
- public void startCDATA() throws SAXException {
- try {
- if (!startTagIsClosed) {
- write('>');
- startTagIsClosed = true;
- }
- write("<![CDATA[");
- inCDATA = true;
- } catch (IOException e) {
- throw new SAXException(e);
- }
- }
-
- public void endCDATA() throws SAXException {
- try {
- inCDATA = false;
- write("]]>");
- } catch (IOException e) {
- throw new SAXException(e);
- }
- }
-
- public void comment(char ch[], int start, int length) throws SAXException {
- try {
- output.write("<!--");
- output.write(ch,start,length);
- output.write("-->");
- } catch (IOException e) {
- throw new SAXException(e);
- }
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal methods.
- ////////////////////////////////////////////////////////////////////
-
-
-
-
- /**
- * Write a raw character.
- *
- * @param c The character to write.
- */
- private void write (char c) throws IOException {
- output.write(c);
- }
-
-
- /**
- * Write a raw string.
- */
- private void write (String s) throws IOException {
- output.write(s);
- }
-
-
- /**
- * Write out an attribute list, escaping values.
- *
- * The names will have prefixes added to them.
- *
- * @param atts The attribute list to write.
- * @exception SAXException If there is an error writing
- * the attribute list, this method will throw an
- * IOException wrapped in a SAXException.
- */
- private void writeAttributes (Attributes atts) throws IOException, SAXException {
- int len = atts.getLength();
- for (int i = 0; i < len; i++) {
- char ch[] = atts.getValue(i).toCharArray();
- write(' ');
- writeName(atts.getURI(i), atts.getLocalName(i),
- atts.getQName(i), false);
- write("=\"");
- writeEsc(ch, 0, ch.length, true);
- write('"');
- }
- }
-
-
- /**
- * Write an array of data characters with escaping.
- *
- * @param ch The array of characters.
- * @param start The starting position.
- * @param length The number of characters to use.
- * @param isAttVal true if this is an attribute value literal.
- * @exception SAXException If there is an error writing
- * the characters, this method will throw an
- * IOException wrapped in a SAXException.
- */
- private void writeEsc (char ch[], int start,
- int length, boolean isAttVal)
- throws SAXException, IOException
- {
- escapeHandler.escape(ch, start, length, isAttVal, output);
- }
-
-
- /**
- * Write an element or attribute name.
- *
- * @param uri The Namespace URI.
- * @param localName The local name.
- * @param qName The prefixed name, if available, or the empty string.
- * @param isElement true if this is an element name, false if it
- * is an attribute name.
- */
- private void writeName (String uri, String localName,
- String qName, boolean isElement)
- throws IOException
- {
- write(qName);
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Constants.
- ////////////////////////////////////////////////////////////////////
-
- private final Attributes EMPTY_ATTS = new AttributesImpl();
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal state.
- ////////////////////////////////////////////////////////////////////
-
- private boolean inCDATA = false;
- private int elementLevel = 0;
- private Writer output;
- private String encoding;
- private boolean writeXmlDecl = true;
- /**
- * This string will be written right after the xml declaration
- * without any escaping. Useful for generating a boiler-plate DOCTYPE decl
- * , PIs, and comments.
- */
- private String header=null;
-
- private final CharacterEscapeHandler escapeHandler;
-
- private boolean startTagIsClosed = true;
-}
-
-// end of XMLWriter.java
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/XmlSerializer.java b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/XmlSerializer.java
deleted file mode 100644
index 3a84f689..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/XmlSerializer.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.txw2.output;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-
-
-/**
- * Low-level typeless XML writer driven from {@link TypedXmlWriter}.
- *
- * <p>
- * Applications can use one of the predefined implementations to
- * send TXW output to the desired location/format, or they can
- * choose to implement this interface for custom output.
- *
- * <p>
- * One {@link XmlSerializer} instance is responsible for writing
- * one XML document.
- *
- * <h2>Call Sequence</h2>
- * TXW calls methods on this interface in the following order:
- *
- * <pre>
- * WHOLE_SEQUENCE := startDocument ELEMENT endDocument
- * ELEMENT := beginStartTag writeXmlns* writeAttribute* endStartTag CONTENT endTag
- * CONTENT := (text|ELEMENT)*
- * </pre>
- *
- * <p>
- * TXW maintains all the in-scope namespace bindings and prefix allocation.
- * The {@link XmlSerializer} implementation should just use the prefix
- * specified.
- * </p>
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XmlSerializer {
- /**
- * The first method to be called.
- */
- void startDocument();
-
- /**
- * Begins writing a start tag.
- *
- * @param uri
- * the namespace URI of the element. Can be empty but never be null.
- * @param prefix
- * the prefix that should be used for this element. Can be empty,
- * but never null.
- */
- void beginStartTag(String uri,String localName,String prefix);
-
- /**
- * Writes an attribute.
- *
- * @param value
- * The value of the attribute. It's the callee's responsibility to
- * escape special characters (such as &lt;, &gt;, and &amp;) in this buffer.
- *
- * @param uri
- * the namespace URI of the attribute. Can be empty but never be null.
- * @param prefix
- * the prefix that should be used for this attribute. Can be empty,
- * but never null.
- */
- void writeAttribute(String uri,String localName,String prefix,StringBuilder value);
-
- /**
- * Writes a namespace declaration.
- *
- * @param uri
- * the namespace URI to be declared. Can be empty but never be null.
- * @param prefix
- * the prefix that is allocated. Can be empty but never be null.
- */
- void writeXmlns(String prefix,String uri);
-
- /**
- * Completes the start tag.
- *
- * @param uri
- * the namespace URI of the element. Can be empty but never be null.
- * @param prefix
- * the prefix that should be used for this element. Can be empty,
- * but never null.
- */
- void endStartTag(String uri,String localName,String prefix);
-
- /**
- * Writes an end tag.
- */
- void endTag();
-
- /**
- * Writes PCDATA.
- *
- * @param text
- * The character data to be written. It's the callee's responsibility to
- * escape special characters (such as &lt;, &gt;, and &amp;) in this buffer.
- */
- void text(StringBuilder text);
-
- /**
- * Writes CDATA.
- */
- void cdata(StringBuilder text);
-
- /**
- * Writes a comment.
- *
- * @throws UnsupportedOperationException
- * if the writer doesn't support writing a comment, it can throw this exception.
- */
- void comment(StringBuilder comment);
-
- /**
- * The last method to be called.
- */
- void endDocument();
-
- /**
- * Flush the buffer.
- *
- * This method is called when applications invoke {@link TypedXmlWriter#commit(boolean)}
- * method. If the implementation performs any buffering, it should flush the buffer.
- */
- void flush();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/package.html b/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/package.html
deleted file mode 100644
index 4455f6ab..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/output/package.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-
-
-<body>
- <p>
- Defines XmlSerializer and its built-in implementations.
-
-</body>
-</html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/txw2/package.html b/src/share/jaxws_classes/com/sun/xml/internal/txw2/package.html
deleted file mode 100644
index 540dfbbb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/txw2/package.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-
-
-<body>
- <p>
- TXW runtime.
-
-</body>
-</html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/Closeable.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/Closeable.java
deleted file mode 100644
index 1c95e696..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/Closeable.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.Dispatch;
-import java.io.IOException;
-
-/**
- * Closeable JAX-WS proxy object.
- *
- * @author Kohsuke Kawaguchi
- * @since JAX-WS 2.0.2
- */
-// this interface is exposed to applications.
-public interface Closeable extends java.io.Closeable {
- /**
- * Closes this object and cleans up any resources
- * it holds, such as network connections.
- *
- * <p>
- * This interface is implemented by a port proxy
- * or {@link Dispatch}. In particular, this signals
- * the implementation of certain specs (like WS-ReliableMessaging
- * and WS-SecureConversation) to terminate sessions that they
- * create during the life time of a proxy object.
- *
- * <p>
- * This is not a mandatory operation, so the application
- * does not have to call this method.
- *
- *
- * @throws WebServiceException
- * If clean up fails unexpectedly, this exception
- * will be thrown (instead of {@link IOException}.
- */
- public void close() throws WebServiceException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java
deleted file mode 100644
index ee181e5c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing;
-
-import com.sun.xml.internal.ws.api.server.*;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.util.xml.XMLStreamWriterFilter;
-import com.sun.xml.internal.ws.util.xml.XMLStreamReaderToXMLStreamWriter;
-import com.sun.xml.internal.ws.server.WSEndpointImpl;
-import com.sun.xml.internal.ws.wsdl.parser.WSDLConstants;
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.NotNull;
-
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.namespace.NamespaceContext;
-import java.io.IOException;
-import java.util.List;
-import java.util.Collection;
-import java.util.Collections;
-
-/**
- * This class acts as a filter for the Extension elements in the wsa:EndpointReference in the wsdl.
- * In addition to filtering the EPR extensions from WSDL, it adds the extensions configured by the JAX-WS runtime
- * specifc to an endpoint.
- *
- * @author Rama Pulavarthi
- */
-public class EPRSDDocumentFilter implements SDDocumentFilter {
- private final WSEndpointImpl<?> endpoint;
- //initialize lazily
- List<BoundEndpoint> beList;
- public EPRSDDocumentFilter(@NotNull WSEndpointImpl<?> endpoint) {
- this.endpoint = endpoint;
- }
-
- private @Nullable WSEndpointImpl<?> getEndpoint(String serviceName, String portName) {
- if (serviceName == null || portName == null)
- return null;
- if (endpoint.getServiceName().getLocalPart().equals(serviceName) && endpoint.getPortName().getLocalPart().equals(portName))
- return endpoint;
-
- if(beList == null) {
- //check if it is run in a Java EE Container and get hold of other endpoints in the application
- Module module = endpoint.getContainer().getSPI(Module.class);
- if (module != null) {
- beList = module.getBoundEndpoints();
- } else {
- beList = Collections.<BoundEndpoint>emptyList();
- }
- }
-
- for (BoundEndpoint be : beList) {
- WSEndpoint wse = be.getEndpoint();
- if (wse.getServiceName().getLocalPart().equals(serviceName) && wse.getPortName().getLocalPart().equals(portName)) {
- return (WSEndpointImpl) wse;
- }
- }
-
- return null;
-
- }
-
- public XMLStreamWriter filter(SDDocument doc, XMLStreamWriter w) throws XMLStreamException, IOException {
- if (!doc.isWSDL()) {
- return w;
- }
-
- return new XMLStreamWriterFilter(w) {
- private boolean eprExtnFilterON = false; //when true, all writer events are filtered out
-
- private boolean portHasEPR = false;
- private int eprDepth = -1; // -1 -> outside wsa:epr, 0 -> on wsa:epr start/end , > 0 inside wsa:epr
-
- private String serviceName = null; //non null when inside wsdl:service scope
- private boolean onService = false; //flag to get service name when on wsdl:service element start
- private int serviceDepth = -1; // -1 -> outside wsdl:service, 0 -> on wsdl:service start/end , > 0 inside wsdl:service
-
- private String portName = null; //non null when inside wsdl:port scope
- private boolean onPort = false; //flag to get port name when on wsdl:port element start
- private int portDepth = -1; // -1 -> outside wsdl:port, 0 -> on wsdl:port start/end , > 0 inside wsdl:port
-
- private String portAddress; // when a complete epr is written, endpoint address is used as epr address
- private boolean onPortAddress = false; //flag to get endpoint address when on soap:address element start
-
- private void handleStartElement(String localName, String namespaceURI) throws XMLStreamException {
- resetOnElementFlags();
- if (serviceDepth >= 0) {
- serviceDepth++;
- }
- if (portDepth >= 0) {
- portDepth++;
- }
- if (eprDepth >= 0) {
- eprDepth++;
- }
-
- if (namespaceURI.equals(WSDLConstants.QNAME_SERVICE.getNamespaceURI()) && localName.equals(WSDLConstants.QNAME_SERVICE.getLocalPart())) {
- onService = true;
- serviceDepth = 0;
- } else if (namespaceURI.equals(WSDLConstants.QNAME_PORT.getNamespaceURI()) && localName.equals(WSDLConstants.QNAME_PORT.getLocalPart())) {
- if (serviceDepth >= 1) {
- onPort = true;
- portDepth = 0;
- }
- } else if (namespaceURI.equals(W3CAddressingConstants.WSA_NAMESPACE_NAME) && localName.equals("EndpointReference")) {
- if (serviceDepth >= 1 && portDepth >= 1) {
- portHasEPR = true;
- eprDepth = 0;
- }
- } else if ((namespaceURI.equals(WSDLConstants.NS_SOAP_BINDING_ADDRESS.getNamespaceURI()) || namespaceURI.equals(WSDLConstants.NS_SOAP12_BINDING_ADDRESS.getNamespaceURI()))
- && localName.equals("address") && portDepth ==1) {
- onPortAddress = true;
- }
- WSEndpoint endpoint = getEndpoint(serviceName,portName);
- //filter epr for only for the port corresponding to this endpoint
- //if (service.getLocalPart().equals(serviceName) && port.getLocalPart().equals(portName)) {
- if ( endpoint != null) {
- if ((eprDepth == 1) && !namespaceURI.equals(W3CAddressingConstants.WSA_NAMESPACE_NAME)) {
- //epr extension element
- eprExtnFilterON = true;
-
- }
-
- /*
- if (eprExtnFilterON) {
- writeEPRExtensions();
- }
- */
- }
- }
-
- private void resetOnElementFlags() {
- if (onService) {
- onService = false;
- }
- if (onPort) {
- onPort = false;
- }
- if (onPortAddress) {
- onPortAddress = false;
- }
-
- }
-
-
- private void writeEPRExtensions(Collection<WSEndpointReference.EPRExtension> eprExtns) throws XMLStreamException {
- if (eprExtns != null) {
- for (WSEndpointReference.EPRExtension e : eprExtns) {
- XMLStreamReaderToXMLStreamWriter c = new XMLStreamReaderToXMLStreamWriter();
- XMLStreamReader r = e.readAsXMLStreamReader();
- c.bridge(r, writer);
- XMLStreamReaderFactory.recycle(r);
- }
- }
- }
-
- @Override
- public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
- handleStartElement(localName, namespaceURI);
- if (!eprExtnFilterON) {
- super.writeStartElement(prefix, localName, namespaceURI);
- }
- }
-
- @Override
- public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException {
- handleStartElement(localName, namespaceURI);
- if (!eprExtnFilterON) {
- super.writeStartElement(namespaceURI, localName);
- }
- }
-
- @Override
- public void writeStartElement(String localName) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.writeStartElement(localName);
- }
- }
-
- private void handleEndElement() throws XMLStreamException {
- resetOnElementFlags();
- //End of wsdl:port, write complete EPR if not present.
- if (portDepth == 0) {
-
- if (!portHasEPR && getEndpoint(serviceName,portName) != null) {
-
- //write the complete EPR with address.
- writer.writeStartElement(AddressingVersion.W3C.getPrefix(),"EndpointReference", AddressingVersion.W3C.nsUri );
- writer.writeNamespace(AddressingVersion.W3C.getPrefix(), AddressingVersion.W3C.nsUri);
- writer.writeStartElement(AddressingVersion.W3C.getPrefix(), AddressingVersion.W3C.eprType.address, AddressingVersion.W3C.nsUri);
- writer.writeCharacters(portAddress);
- writer.writeEndElement();
- writeEPRExtensions(getEndpoint(serviceName, portName).getEndpointReferenceExtensions());
- writer.writeEndElement();
-
- }
- }
- //End of wsa:EndpointReference, write EPR extension elements
- if (eprDepth == 0) {
- if (portHasEPR && getEndpoint(serviceName,portName) != null) {
- writeEPRExtensions(getEndpoint(serviceName, portName).getEndpointReferenceExtensions());
- }
- eprExtnFilterON = false;
- }
-
- if(serviceDepth >= 0 ) {
- serviceDepth--;
- }
- if(portDepth >= 0) {
- portDepth--;
- }
- if(eprDepth >=0) {
- eprDepth--;
- }
-
- if (serviceDepth == -1) {
- serviceName = null;
- }
- if (portDepth == -1) {
- portHasEPR = false;
- portAddress = null;
- portName = null;
- }
- }
-
- @Override
- public void writeEndElement() throws XMLStreamException {
- handleEndElement();
- if (!eprExtnFilterON) {
- super.writeEndElement();
- }
- }
-
- private void handleAttribute(String localName, String value) {
- if (localName.equals("name")) {
- if (onService) {
- serviceName = value;
- onService = false;
- } else if (onPort) {
- portName = value;
- onPort = false;
- }
- }
- if (localName.equals("location") && onPortAddress) {
- portAddress = value;
- }
-
-
- }
-
- @Override
- public void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException {
- handleAttribute(localName, value);
- if (!eprExtnFilterON) {
- super.writeAttribute(prefix, namespaceURI, localName, value);
- }
- }
-
- @Override
- public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException {
- handleAttribute(localName, value);
- if (!eprExtnFilterON) {
- super.writeAttribute(namespaceURI, localName, value);
- }
- }
-
- @Override
- public void writeAttribute(String localName, String value) throws XMLStreamException {
- handleAttribute(localName, value);
- if (!eprExtnFilterON) {
- super.writeAttribute(localName, value);
- }
- }
-
-
- @Override
- public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.writeEmptyElement(namespaceURI, localName);
- }
- }
-
- @Override
- public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.writeNamespace(prefix, namespaceURI);
- }
- }
-
- @Override
- public void setNamespaceContext(NamespaceContext context) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.setNamespaceContext(context);
- }
- }
-
- @Override
- public void setDefaultNamespace(String uri) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.setDefaultNamespace(uri);
- }
- }
-
- @Override
- public void setPrefix(String prefix, String uri) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.setPrefix(prefix, uri);
- }
- }
-
- @Override
- public void writeProcessingInstruction(String target, String data) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.writeProcessingInstruction(target, data);
- }
- }
-
- @Override
- public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.writeEmptyElement(prefix, localName, namespaceURI);
- }
- }
-
- @Override
- public void writeCData(String data) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.writeCData(data);
- }
- }
-
- @Override
- public void writeCharacters(String text) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.writeCharacters(text);
- }
- }
-
- @Override
- public void writeComment(String data) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.writeComment(data);
- }
- }
-
- @Override
- public void writeDTD(String dtd) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.writeDTD(dtd);
- }
- }
-
- @Override
- public void writeDefaultNamespace(String namespaceURI) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.writeDefaultNamespace(namespaceURI);
- }
- }
-
- @Override
- public void writeEmptyElement(String localName) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.writeEmptyElement(localName);
- }
- }
-
- @Override
- public void writeEntityRef(String name) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.writeEntityRef(name);
- }
- }
-
- @Override
- public void writeProcessingInstruction(String target) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.writeProcessingInstruction(target);
- }
- }
-
-
- @Override
- public void writeCharacters(char[] text, int start, int len) throws XMLStreamException {
- if (!eprExtnFilterON) {
- super.writeCharacters(text, start, len);
- }
- }
-
- };
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EndpointReferenceUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EndpointReferenceUtil.java
deleted file mode 100644
index d21e60a2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EndpointReferenceUtil.java
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferSource;
-import com.sun.xml.internal.stream.buffer.stax.StreamWriterBufferCreator;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.developer.MemberSubmissionEndpointReference;
-import com.sun.xml.internal.ws.util.DOMUtil;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import com.sun.xml.internal.ws.wsdl.parser.WSDLConstants;
-import com.sun.xml.internal.ws.addressing.v200408.MemberSubmissionAddressingConstants;
-import org.w3c.dom.*;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author Rama Pulavarthi
- */
-
-public class EndpointReferenceUtil {
- /**
- * Gives the EPR based on the clazz. It may need to perform tranformation from
- * W3C EPR to MS EPR or vise-versa.
- */
- public static <T extends EndpointReference> T transform(Class<T> clazz, @NotNull EndpointReference epr) {
- assert epr != null;
- if (clazz.isAssignableFrom(W3CEndpointReference.class)) {
- if (epr instanceof W3CEndpointReference) {
- return (T) epr;
- } else if (epr instanceof MemberSubmissionEndpointReference) {
- return (T) toW3CEpr((MemberSubmissionEndpointReference) epr);
- }
- } else if (clazz.isAssignableFrom(MemberSubmissionEndpointReference.class)) {
- if (epr instanceof W3CEndpointReference) {
- return (T) toMSEpr((W3CEndpointReference) epr);
- } else if (epr instanceof MemberSubmissionEndpointReference) {
- return (T) epr;
- }
- }
-
- //This must be an EPR that we dont know
- throw new WebServiceException("Unknwon EndpointReference: " + epr.getClass());
- }
-
- //TODO: bit of redundency on writes of w3c epr, should modularize it
- private static W3CEndpointReference toW3CEpr(MemberSubmissionEndpointReference msEpr) {
- StreamWriterBufferCreator writer = new StreamWriterBufferCreator();
- w3cMetadataWritten = false;
- try {
- writer.writeStartDocument();
- writer.writeStartElement(AddressingVersion.W3C.getPrefix(),
- "EndpointReference", AddressingVersion.W3C.nsUri);
- writer.writeNamespace(AddressingVersion.W3C.getPrefix(),
- AddressingVersion.W3C.nsUri);
- //write wsa:Address
- writer.writeStartElement(AddressingVersion.W3C.getPrefix(),
- AddressingVersion.W3C.eprType.address
- , AddressingVersion.W3C.nsUri);
- writer.writeCharacters(msEpr.addr.uri);
- writer.writeEndElement();
- //TODO: write extension attributes on wsa:Address
- if ((msEpr.referenceProperties != null && msEpr.referenceProperties.elements.size() > 0) ||
- (msEpr.referenceParameters != null && msEpr.referenceParameters.elements.size() > 0)) {
-
- writer.writeStartElement(AddressingVersion.W3C.getPrefix(), "ReferenceParameters", AddressingVersion.W3C.nsUri);
-
- //write ReferenceProperties
- if (msEpr.referenceProperties != null) {
- for (Element e : msEpr.referenceProperties.elements) {
- DOMUtil.serializeNode(e, writer);
- }
- }
- //write referenceParameters
- if (msEpr.referenceParameters != null) {
- for (Element e : msEpr.referenceParameters.elements) {
- DOMUtil.serializeNode(e, writer);
- }
- }
- writer.writeEndElement();
- }
- // Supress writing ServiceName and EndpointName in W3CEPR,
- // Until the ns for those metadata elements is resolved.
- /*
- //Write Interface info
- if (msEpr.portTypeName != null) {
- writeW3CMetadata(writer);
- writer.writeStartElement(AddressingVersion.W3C.getWsdlPrefix(),
- AddressingVersion.W3C.eprType.portTypeName ,
- AddressingVersion.W3C.wsdlNsUri);
- writer.writeNamespace(AddressingVersion.W3C.getWsdlPrefix(),
- AddressingVersion.W3C.wsdlNsUri);
- String portTypePrefix = fixNull(msEpr.portTypeName.name.getPrefix());
- writer.writeNamespace(portTypePrefix, msEpr.portTypeName.name.getNamespaceURI());
- if (portTypePrefix.equals(""))
- writer.writeCharacters(msEpr.portTypeName.name.getLocalPart());
- else
- writer.writeCharacters(portTypePrefix + ":" + msEpr.portTypeName.name.getLocalPart());
- writer.writeEndElement();
- }
- if (msEpr.serviceName != null) {
- writeW3CMetadata(writer);
- //Write service and Port info
- writer.writeStartElement(AddressingVersion.W3C.getWsdlPrefix(),
- AddressingVersion.W3C.eprType.serviceName ,
- AddressingVersion.W3C.wsdlNsUri);
- writer.writeNamespace(AddressingVersion.W3C.getWsdlPrefix(),
- AddressingVersion.W3C.wsdlNsUri);
-
- String servicePrefix = fixNull(msEpr.serviceName.name.getPrefix());
- if (msEpr.serviceName.portName != null)
- writer.writeAttribute(AddressingVersion.W3C.eprType.portName,
- msEpr.serviceName.portName);
-
- writer.writeNamespace(servicePrefix, msEpr.serviceName.name.getNamespaceURI());
- if (servicePrefix.length() > 0)
- writer.writeCharacters(servicePrefix + ":" + msEpr.serviceName.name.getLocalPart());
- else
- writer.writeCharacters(msEpr.serviceName.name.getLocalPart());
- writer.writeEndElement();
- }
- */
- //TODO: revisit this
- Element wsdlElement = null;
- //Check for wsdl in extension elements
- if ((msEpr.elements != null) && (msEpr.elements.size() > 0)) {
- for (Element e : msEpr.elements) {
- if(e.getNamespaceURI().equals(MemberSubmissionAddressingConstants.MEX_METADATA.getNamespaceURI()) &&
- e.getLocalName().equals(MemberSubmissionAddressingConstants.MEX_METADATA.getLocalPart())) {
- NodeList nl = e.getElementsByTagNameNS(WSDLConstants.NS_WSDL,
- WSDLConstants.QNAME_DEFINITIONS.getLocalPart());
- if(nl != null) {
- wsdlElement = (Element) nl.item(0);
- }
- }
- }
- }
- //write WSDL
- if (wsdlElement != null) {
- DOMUtil.serializeNode(wsdlElement, writer);
- }
-
- if (w3cMetadataWritten) {
- writer.writeEndElement();
- }
- //TODO revisit this
- //write extension elements
- if ((msEpr.elements != null) && (msEpr.elements.size() > 0)) {
- for (Element e : msEpr.elements) {
- if (e.getNamespaceURI().equals(WSDLConstants.NS_WSDL) &&
- e.getLocalName().equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart())) {
- // Don't write it as this is written already in Metadata
- }
- DOMUtil.serializeNode(e, writer);
- }
- }
-
- //TODO:write extension attributes
-
- //</EndpointReference>
- writer.writeEndElement();
- writer.writeEndDocument();
- writer.flush();
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- return new W3CEndpointReference(new XMLStreamBufferSource(writer.getXMLStreamBuffer()));
- }
-
- private static boolean w3cMetadataWritten = false;
-
-// private static void writeW3CMetadata(StreamWriterBufferCreator writer) throws XMLStreamException {
-// if (!w3cMetadataWritten) {
-// writer.writeStartElement(AddressingVersion.W3C.getPrefix(), AddressingVersion.W3C.eprType.wsdlMetadata.getLocalPart(), AddressingVersion.W3C.nsUri);
-// w3cMetadataWritten = true;
-// }
-// }
-//
- private static MemberSubmissionEndpointReference toMSEpr(W3CEndpointReference w3cEpr) {
- DOMResult result = new DOMResult();
- w3cEpr.writeTo(result);
- Node eprNode = result.getNode();
- Element e = DOMUtil.getFirstElementChild(eprNode);
- if (e == null) {
- return null;
- }
-
- MemberSubmissionEndpointReference msEpr = new MemberSubmissionEndpointReference();
-
- NodeList nodes = e.getChildNodes();
- for (int i = 0; i < nodes.getLength(); i++) {
- if (nodes.item(i).getNodeType() == Node.ELEMENT_NODE) {
- Element child = (Element) nodes.item(i);
- if (child.getNamespaceURI().equals(AddressingVersion.W3C.nsUri) &&
- child.getLocalName().equals(AddressingVersion.W3C.eprType.address)) {
- if (msEpr.addr == null) {
- msEpr.addr = new MemberSubmissionEndpointReference.Address();
- }
- msEpr.addr.uri = XmlUtil.getTextForNode(child);
-
- } else if (child.getNamespaceURI().equals(AddressingVersion.W3C.nsUri) &&
- child.getLocalName().equals("ReferenceParameters")) {
- NodeList refParams = child.getChildNodes();
- for (int j = 0; j < refParams.getLength(); j++) {
- if (refParams.item(j).getNodeType() == Node.ELEMENT_NODE) {
- if (msEpr.referenceParameters == null) {
- msEpr.referenceParameters = new MemberSubmissionEndpointReference.Elements();
- msEpr.referenceParameters.elements = new ArrayList<Element>();
- }
- msEpr.referenceParameters.elements.add((Element) refParams.item(j));
- }
- }
- } else if (child.getNamespaceURI().equals(AddressingVersion.W3C.nsUri) &&
- child.getLocalName().equals(AddressingVersion.W3C.eprType.wsdlMetadata.getLocalPart())) {
- NodeList metadata = child.getChildNodes();
- String wsdlLocation = child.getAttributeNS(W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_NAMESPACE,
- W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_LOCALNAME);
- Element wsdlDefinitions = null;
- for (int j = 0; j < metadata.getLength(); j++) {
- Node node = metadata.item(j);
- if (node.getNodeType() != Node.ELEMENT_NODE) {
- continue;
- }
-
- Element elm = (Element) node;
- if ((elm.getNamespaceURI().equals(AddressingVersion.W3C.wsdlNsUri) ||
- elm.getNamespaceURI().equals(W3CAddressingMetadataConstants.WSAM_NAMESPACE_NAME)) &&
- elm.getLocalName().equals(AddressingVersion.W3C.eprType.serviceName)) {
- msEpr.serviceName = new MemberSubmissionEndpointReference.ServiceNameType();
- msEpr.serviceName.portName = elm.getAttribute(AddressingVersion.W3C.eprType.portName);
-
- String service = elm.getTextContent();
- String prefix = XmlUtil.getPrefix(service);
- String name = XmlUtil.getLocalPart(service);
-
- //if there is no service name then its not a valid EPR but lets continue as its optional anyway
- if (name == null) {
- continue;
- }
-
- if (prefix != null) {
- String ns = elm.lookupNamespaceURI(prefix);
- if (ns != null) {
- msEpr.serviceName.name = new QName(ns, name, prefix);
- }
- } else {
- msEpr.serviceName.name = new QName(null, name);
- }
- msEpr.serviceName.attributes = getAttributes(elm);
- } else if ((elm.getNamespaceURI().equals(AddressingVersion.W3C.wsdlNsUri) ||
- elm.getNamespaceURI().equals(W3CAddressingMetadataConstants.WSAM_NAMESPACE_NAME)) &&
- elm.getLocalName().equals(AddressingVersion.W3C.eprType.portTypeName)) {
- msEpr.portTypeName = new MemberSubmissionEndpointReference.AttributedQName();
-
- String portType = elm.getTextContent();
- String prefix = XmlUtil.getPrefix(portType);
- String name = XmlUtil.getLocalPart(portType);
-
- //if there is no portType name then its not a valid EPR but lets continue as its optional anyway
- if (name == null) {
- continue;
- }
-
- if (prefix != null) {
- String ns = elm.lookupNamespaceURI(prefix);
- if (ns != null) {
- msEpr.portTypeName.name = new QName(ns, name, prefix);
- }
- } else {
- msEpr.portTypeName.name = new QName(null, name);
- }
- msEpr.portTypeName.attributes = getAttributes(elm);
- } else if(elm.getNamespaceURI().equals(WSDLConstants.NS_WSDL) &&
- elm.getLocalName().equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart())) {
- wsdlDefinitions = elm;
- } else {
- //TODO : Revisit this
- //its extensions in META-DATA and should be copied to extensions in MS EPR
- if (msEpr.elements == null) {
- msEpr.elements = new ArrayList<Element>();
- }
- msEpr.elements.add(elm);
- }
- }
-
-
- Document doc = DOMUtil.createDom();
- Element mexEl = doc.createElementNS(MemberSubmissionAddressingConstants.MEX_METADATA.getNamespaceURI(),
- MemberSubmissionAddressingConstants.MEX_METADATA.getPrefix() + ":"
- + MemberSubmissionAddressingConstants.MEX_METADATA.getLocalPart());
- Element metadataEl = doc.createElementNS(MemberSubmissionAddressingConstants.MEX_METADATA_SECTION.getNamespaceURI(),
- MemberSubmissionAddressingConstants.MEX_METADATA_SECTION.getPrefix() + ":"
- + MemberSubmissionAddressingConstants.MEX_METADATA_SECTION.getLocalPart());
- metadataEl.setAttribute(MemberSubmissionAddressingConstants.MEX_METADATA_DIALECT_ATTRIBUTE,
- MemberSubmissionAddressingConstants.MEX_METADATA_DIALECT_VALUE);
- if (wsdlDefinitions == null && wsdlLocation != null && !wsdlLocation.equals("")) {
- wsdlLocation = wsdlLocation.trim();
- String wsdlTns = wsdlLocation.substring(0, wsdlLocation.indexOf(' '));
- wsdlLocation = wsdlLocation.substring(wsdlLocation.indexOf(' ') + 1);
- Element wsdlEl = doc.createElementNS(WSDLConstants.NS_WSDL,
- WSDLConstants.PREFIX_NS_WSDL + ":"
- + WSDLConstants.QNAME_DEFINITIONS.getLocalPart());
- Element wsdlImportEl = doc.createElementNS(WSDLConstants.NS_WSDL,
- WSDLConstants.PREFIX_NS_WSDL + ":"
- + WSDLConstants.QNAME_IMPORT.getLocalPart());
- wsdlImportEl.setAttribute("namespace", wsdlTns);
- wsdlImportEl.setAttribute("location", wsdlLocation);
- wsdlEl.appendChild(wsdlImportEl);
- metadataEl.appendChild(wsdlEl);
- } else if(wsdlDefinitions != null){
- metadataEl.appendChild(wsdlDefinitions);
- }
- mexEl.appendChild(metadataEl);
-
- if (msEpr.elements == null) {
- msEpr.elements = new ArrayList<Element>();
- }
- msEpr.elements.add(mexEl);
-
-
- } else {
- //its extensions
- if (msEpr.elements == null) {
- msEpr.elements = new ArrayList<Element>();
- }
- msEpr.elements.add((Element) child);
-
- }
- } else if (nodes.item(i).getNodeType() == Node.ATTRIBUTE_NODE) {
- Node n = nodes.item(i);
- if (msEpr.attributes == null) {
- msEpr.attributes = new HashMap<QName, String>();
- String prefix = fixNull(n.getPrefix());
- String ns = fixNull(n.getNamespaceURI());
- String localName = n.getLocalName();
- msEpr.attributes.put(new QName(ns, localName, prefix), n.getNodeValue());
- }
- }
- }
-
- return msEpr;
- }
-
- private static Map<QName, String> getAttributes(Node node) {
- Map<QName, String> attribs = null;
-
- NamedNodeMap nm = node.getAttributes();
- for (int i = 0; i < nm.getLength(); i++) {
- if (attribs == null) {
- attribs = new HashMap<QName, String>();
- }
- Node n = nm.item(i);
- String prefix = fixNull(n.getPrefix());
- String ns = fixNull(n.getNamespaceURI());
- String localName = n.getLocalName();
- if (prefix.equals("xmlns") || prefix.length() == 0 && localName.equals("xmlns")) {
- continue;
- }
-
- //exclude some attributes
- if (!localName.equals(AddressingVersion.W3C.eprType.portName)) {
- attribs.put(new QName(ns, localName, prefix), n.getNodeValue());
- }
- }
- return attribs;
- }
-
- private static
- @NotNull
- String fixNull(@Nullable String s) {
- if (s == null) {
- return "";
- } else {
- return s;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemAction.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemAction.java
deleted file mode 100644
index 7c2373ad..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemAction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlElement;
-
-import com.sun.xml.internal.ws.addressing.W3CAddressingConstants;
-
-/**
- * @author Arun Gupta
- */
-@XmlRootElement(name="ProblemAction", namespace= W3CAddressingConstants.WSA_NAMESPACE_NAME)
-public class ProblemAction {
-
- @XmlElement(name="Action", namespace=W3CAddressingConstants.WSA_NAMESPACE_NAME)
- private String action;
-
- @XmlElement(name="SoapAction", namespace=W3CAddressingConstants.WSA_NAMESPACE_NAME)
- private String soapAction;
-
- /** Creates a new instance of ProblemAction */
- public ProblemAction() {
- }
-
- public ProblemAction(String action) {
- this.action = action;
- }
-
- public ProblemAction(String action, String soapAction) {
- this.action = action;
- this.soapAction = soapAction;
- }
-
- public String getAction() {
- return action;
- }
-
- public String getSoapAction() {
- return soapAction;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemHeaderQName.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemHeaderQName.java
deleted file mode 100644
index 9fa0af73..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemHeaderQName.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.namespace.QName;
-
-import static com.sun.xml.internal.ws.addressing.W3CAddressingConstants.WSA_NAMESPACE_NAME;
-
-/**
- * @author Arun Gupta
- */
-@XmlRootElement(name="ProblemHeaderQName", namespace= WSA_NAMESPACE_NAME)
-public class ProblemHeaderQName {
- @XmlValue
- private QName value;
-
- /** Creates a new instance of ProblemHeaderQName */
- public ProblemHeaderQName() {
- }
-
- public ProblemHeaderQName(QName name) {
- this.value = name;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingConstants.java
deleted file mode 100644
index 324ef307..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingConstants.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-
-/**
- * Constants for W3C WS-Addressing version
- *
- * @author Arun Gupta
- */
-public interface W3CAddressingConstants {
- public static final String WSA_NAMESPACE_NAME = "http://www.w3.org/2005/08/addressing";
- public static final String WSA_NAMESPACE_WSDL_NAME = "http://www.w3.org/2006/05/addressing/wsdl";
-
- public static final String WSAW_SERVICENAME_NAME = "ServiceName";
- public static final String WSAW_INTERFACENAME_NAME = "InterfaceName";
- public static final String WSAW_ENDPOINTNAME_NAME = "EndpointName";
-
- public static final String WSA_REFERENCEPROPERTIES_NAME = "ReferenceParameters";
- public static final QName WSA_REFERENCEPROPERTIES_QNAME = new QName(WSA_NAMESPACE_NAME, WSA_REFERENCEPROPERTIES_NAME);
-
- public static final String WSA_REFERENCEPARAMETERS_NAME = "ReferenceParameters";
- public static final QName WSA_REFERENCEPARAMETERS_QNAME = new QName(WSA_NAMESPACE_NAME, WSA_REFERENCEPARAMETERS_NAME);
-
- public static final String WSA_METADATA_NAME = "Metadata";
- public static final QName WSA_METADATA_QNAME = new QName(WSA_NAMESPACE_NAME, WSA_METADATA_NAME);
-
- public static final String WSA_ADDRESS_NAME = "Address";
- public static final QName WSA_ADDRESS_QNAME = new QName(WSA_NAMESPACE_NAME, WSA_ADDRESS_NAME);
-
- public static final String WSA_ANONYMOUS_ADDRESS = WSA_NAMESPACE_NAME + "/anonymous";
- public static final String WSA_NONE_ADDRESS = WSA_NAMESPACE_NAME + "/none";
-
- public static final String WSA_DEFAULT_FAULT_ACTION = WSA_NAMESPACE_NAME + "/fault";
-
- public static final String WSA_EPR_NAME = "EndpointReference";
- public static final QName WSA_EPR_QNAME = new QName(WSA_NAMESPACE_NAME, WSA_EPR_NAME);
-
-
- public static final String WSAW_USING_ADDRESSING_NAME = "UsingAddressing";
- public static final QName WSAW_USING_ADDRESSING_QNAME = new QName(WSA_NAMESPACE_WSDL_NAME, WSAW_USING_ADDRESSING_NAME);
-
- public static final QName INVALID_MAP_QNAME = new QName(WSA_NAMESPACE_NAME, "InvalidAddressingHeader");
- public static final QName MAP_REQUIRED_QNAME = new QName(WSA_NAMESPACE_NAME, "MessageAddressingHeaderRequired");
- public static final QName DESTINATION_UNREACHABLE_QNAME = new QName(WSA_NAMESPACE_NAME, "DestinationUnreachable");
- public static final QName ACTION_NOT_SUPPORTED_QNAME = new QName(WSA_NAMESPACE_NAME, "ActionNotSupported");
- public static final QName ENDPOINT_UNAVAILABLE_QNAME = new QName(WSA_NAMESPACE_NAME, "EndpointUnavailable");
-
- public static final String ACTION_NOT_SUPPORTED_TEXT = "The \"%s\" cannot be processed at the receiver";
- public static final String DESTINATION_UNREACHABLE_TEXT = "No route can be determined to reach %s";
- public static final String ENDPOINT_UNAVAILABLE_TEXT = "The endpoint is unable to process the message at this time";
- public static final String INVALID_MAP_TEXT = "A header representing a Message Addressing Property is not valid and the message cannot be processed";
- public static final String MAP_REQUIRED_TEXT = "A required header representing a Message Addressing Property is not present";
-
- public static final QName PROBLEM_ACTION_QNAME = new QName(WSA_NAMESPACE_NAME, "ProblemAction");
- public static final QName PROBLEM_HEADER_QNAME_QNAME = new QName(WSA_NAMESPACE_NAME, "ProblemHeaderQName");
- public static final QName FAULT_DETAIL_QNAME = new QName(WSA_NAMESPACE_NAME, "FaultDetail");
-
- // Fault subsubcode when an invalid address is specified.
- public static final QName INVALID_ADDRESS_SUBCODE = new QName(WSA_NAMESPACE_NAME, "InvalidAddress",
- AddressingVersion.W3C.getPrefix());
-
- // Fault subsubcode when an invalid header was expected to be EndpointReference but was not valid.
- public static final QName INVALID_EPR = new QName(WSA_NAMESPACE_NAME, "InvalidEPR", AddressingVersion.W3C.getPrefix());
-
- // Fault subsubcode when greater than expected number of the specified header is received.
- public static final QName INVALID_CARDINALITY = new QName(WSA_NAMESPACE_NAME, "InvalidCardinality",
- AddressingVersion.W3C.getPrefix());
-
- // Fault subsubcode when an invalid header was expected to be EndpointReference but did not contain address.
- public static final QName MISSING_ADDRESS_IN_EPR = new QName(WSA_NAMESPACE_NAME, "MissingAddressInEPR",
- AddressingVersion.W3C.getPrefix());
-
- // Fault subsubcode when a header contains a message id that was a duplicate of one already received.
- public static final QName DUPLICATE_MESSAGEID = new QName(WSA_NAMESPACE_NAME, "DuplicateMessageID",
- AddressingVersion.W3C.getPrefix());
-
- // Fault subsubcode when <code>Action</code> and <code>SOAPAction</code> for the mesage did not match.
- public static final QName ACTION_MISMATCH = new QName(WSA_NAMESPACE_NAME, "ActionMismatch",
- AddressingVersion.W3C.getPrefix());
-
- // Fault subsubcode when the only address supported is the anonymous address.
- public static final QName ONLY_ANONYMOUS_ADDRESS_SUPPORTED = new QName(WSA_NAMESPACE_NAME, "OnlyAnonymousAddressSupported",
- AddressingVersion.W3C.getPrefix());
-
- //Fault subsubcode when anonymous address is not supported.
- public static final QName ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED = new QName(WSA_NAMESPACE_NAME, "OnlyNonAnonymousAddressSupported",
- AddressingVersion.W3C.getPrefix());
-
- public static final String ANONYMOUS_EPR = "<EndpointReference xmlns=\"http://www.w3.org/2005/08/addressing\">\n" +
- " <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>\n" +
- "</EndpointReference>";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingMetadataConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingMetadataConstants.java
deleted file mode 100644
index 6fef6b84..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingMetadataConstants.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing;
-
-import javax.xml.namespace.QName;
-
-/**
- * Constants for W3C Addressing Metadata specification
- * @author Rama Pulavarthi
- */
-public class W3CAddressingMetadataConstants {
- public static final String WSAM_NAMESPACE_NAME = "http://www.w3.org/2007/05/addressing/metadata";
- public static final String WSAM_PREFIX_NAME = "wsam";
- public static final QName WSAM_ACTION_QNAME = new QName(WSAM_NAMESPACE_NAME,"Action",WSAM_PREFIX_NAME);
-
- public static final String WSAM_ADDRESSING_ASSERTION_NAME="Addressing";
- public static final String WSAM_ANONYMOUS_NESTED_ASSERTION_NAME="AnonymousResponses";
- public static final String WSAM_NONANONYMOUS_NESTED_ASSERTION_NAME="NonAnonymousResponses";
-
- public static final QName WSAM_ADDRESSING_ASSERTION = new QName(WSAM_NAMESPACE_NAME,
- WSAM_ADDRESSING_ASSERTION_NAME, WSAM_PREFIX_NAME );
-
- public static final QName WSAM_ANONYMOUS_NESTED_ASSERTION = new QName(WSAM_NAMESPACE_NAME,
- WSAM_ANONYMOUS_NESTED_ASSERTION_NAME, WSAM_PREFIX_NAME );
-
- public static final QName WSAM_NONANONYMOUS_NESTED_ASSERTION = new QName(WSAM_NAMESPACE_NAME,
- WSAM_NONANONYMOUS_NESTED_ASSERTION_NAME, WSAM_PREFIX_NAME );
-
- public static final String WSAM_WSDLI_ATTRIBUTE_NAMESPACE="http://www.w3.org/ns/wsdl-instance";
- public static final String WSAM_WSDLI_ATTRIBUTE_PREFIX="wsdli";
- public static final String WSAM_WSDLI_ATTRIBUTE_LOCALNAME="wsdlLocation";
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaClientTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaClientTube.java
deleted file mode 100644
index b82ca7ff..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaClientTube.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.addressing;
-
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.AddressingUtils;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException;
-
-/**
- * @author Rama Pulavarthi
- */
-public class W3CWsaClientTube extends WsaClientTube {
- public W3CWsaClientTube(WSDLPort wsdlPort, WSBinding binding, Tube next) {
- super(wsdlPort, binding, next);
- }
-
- public W3CWsaClientTube(WsaClientTube that, TubeCloner cloner) {
- super(that, cloner);
- }
-
- @Override
- public W3CWsaClientTube copy(TubeCloner cloner) {
- return new W3CWsaClientTube(this, cloner);
- }
-
- @Override
- protected void checkMandatoryHeaders(Packet packet, boolean foundAction, boolean foundTo, boolean foundReplyTo,
- boolean foundFaultTo, boolean foundMessageID, boolean foundRelatesTo) {
- super.checkMandatoryHeaders(packet, foundAction, foundTo, foundReplyTo, foundFaultTo, foundMessageID, foundRelatesTo);
-
- // if it is not one-way, response must contain wsa:RelatesTo
- // RelatesTo required as per
- // Table 5-3 of http://www.w3.org/TR/2006/WD-ws-addr-wsdl-20060216/#wsdl11requestresponse
- if (expectReply && (packet.getMessage() != null) && !foundRelatesTo) {
- String action = AddressingUtils.getAction(packet.getMessage().getHeaders(), addressingVersion, soapVersion);
- // Don't check for AddressingFaults as
- // Faults for requests with duplicate MessageId will have no wsa:RelatesTo
- if (!packet.getMessage().isFault() || !action.equals(addressingVersion.getDefaultFaultAction())) {
- throw new MissingAddressingHeaderException(addressingVersion.relatesToTag,packet);
- }
- }
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaServerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaServerTube.java
deleted file mode 100644
index 75c07565..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaServerTube.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing;
-
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException;
-import com.sun.xml.internal.ws.addressing.model.InvalidAddressingHeaderException;
-import static com.sun.xml.internal.ws.addressing.W3CAddressingConstants.ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED;
-import static com.sun.xml.internal.ws.addressing.W3CAddressingConstants.ONLY_ANONYMOUS_ADDRESS_SUPPORTED;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.ws.soap.AddressingFeature;
-
-/**
- * @author Rama Pulavarthi
- */
-public class W3CWsaServerTube extends WsaServerTube{
- private final AddressingFeature af;
-
- public W3CWsaServerTube(WSEndpoint endpoint, @NotNull WSDLPort wsdlPort, WSBinding binding, Tube next) {
- super(endpoint, wsdlPort, binding, next);
- af = binding.getFeature(AddressingFeature.class);
- }
-
- public W3CWsaServerTube(W3CWsaServerTube that, TubeCloner cloner) {
- super(that, cloner);
- this.af = that.af;
- }
-
- @Override
- public W3CWsaServerTube copy(TubeCloner cloner) {
- return new W3CWsaServerTube(this, cloner);
- }
-
- @Override
- protected void checkMandatoryHeaders(
- Packet packet, boolean foundAction, boolean foundTo, boolean foundReplyTo,
- boolean foundFaultTo, boolean foundMessageId, boolean foundRelatesTo) {
- super.checkMandatoryHeaders(packet, foundAction, foundTo, foundReplyTo,
- foundFaultTo, foundMessageId, foundRelatesTo);
-
- // find Req/Response or Oneway using WSDLModel(if it is availabe)
- WSDLBoundOperation wbo = getWSDLBoundOperation(packet);
- // Taking care of protocol messages as they do not have any corresponding operations
- if (wbo != null) {
- // if two-way and no wsa:MessageID is found
- if (!wbo.getOperation().isOneWay() && !foundMessageId) {
- throw new MissingAddressingHeaderException(addressingVersion.messageIDTag,packet);
- }
- }
-
- }
-
- @Override
- protected boolean isAnonymousRequired(@Nullable WSDLBoundOperation wbo) {
- return getResponseRequirement(wbo) == WSDLBoundOperation.ANONYMOUS.required;
- }
-
- private WSDLBoundOperation.ANONYMOUS getResponseRequirement(@Nullable WSDLBoundOperation wbo) {
- try {
- if (af.getResponses() == AddressingFeature.Responses.ANONYMOUS) {
- return WSDLBoundOperation.ANONYMOUS.required;
- } else if (af.getResponses() == AddressingFeature.Responses.NON_ANONYMOUS) {
- return WSDLBoundOperation.ANONYMOUS.prohibited;
- }
- } catch (NoSuchMethodError e) {
- //Ignore error, defaut to optional
- }
- //wsaw wsdl binding case will have some value set on wbo
- return wbo != null ? wbo.getAnonymous() : WSDLBoundOperation.ANONYMOUS.optional;
- }
-
- @Override
- protected void checkAnonymousSemantics(WSDLBoundOperation wbo, WSEndpointReference replyTo, WSEndpointReference faultTo) {
- String replyToValue = null;
- String faultToValue = null;
-
- if (replyTo != null)
- replyToValue = replyTo.getAddress();
-
- if (faultTo != null)
- faultToValue = faultTo.getAddress();
- WSDLBoundOperation.ANONYMOUS responseRequirement = getResponseRequirement(wbo);
-
- switch (responseRequirement) {
- case prohibited:
- if (replyToValue != null && replyToValue.equals(addressingVersion.anonymousUri))
- throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);
-
- if (faultToValue != null && faultToValue.equals(addressingVersion.anonymousUri))
- throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED);
- break;
- case required:
- if (replyToValue != null && !replyToValue.equals(addressingVersion.anonymousUri))
- throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);
-
- if (faultToValue != null && !faultToValue.equals(addressingVersion.anonymousUri))
- throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED);
- break;
- default:
- // ALL: no check
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WSEPRExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WSEPRExtension.java
deleted file mode 100644
index f607f57f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WSEPRExtension.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2009, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing;
-
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamException;
-
-/**
- * Implementation backed by XMLStreamBuffer
- *
- * @author Rama.Pulavarthi@sun.com
- */
-public class WSEPRExtension extends WSEndpointReference.EPRExtension {
- XMLStreamBuffer xsb;
- final QName qname;
-
- public WSEPRExtension(XMLStreamBuffer xsb, QName qname) {
- this.xsb = xsb;
- this.qname = qname;
- }
-
-
- public XMLStreamReader readAsXMLStreamReader() throws XMLStreamException {
- return xsb.readAsXMLStreamReader();
- }
-
- public QName getQName() {
- return qname;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaActionUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaActionUtil.java
deleted file mode 100644
index e0882b77..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaActionUtil.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing;
-
-import com.sun.xml.internal.ws.api.model.CheckedException;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.logging.Logger;
-
-/**
- * @author Rama Pulavarthi
- */
-public class WsaActionUtil {
-
- @SuppressWarnings("FinalStaticMethod")
- public static final String getDefaultFaultAction(JavaMethod method, CheckedException ce) {
- String tns = method.getOwner().getTargetNamespace();
- String delim = getDelimiter(tns);
- if (tns.endsWith(delim)) {
- tns = tns.substring(0, tns.length() - 1);
- }
-
- return new StringBuilder(tns).append(delim).append(
- method.getOwner().getPortTypeName().getLocalPart()).append(
- delim).append(method.getOperationName()).append(delim).append("Fault").append(delim).append(ce.getExceptionClass().getSimpleName()).toString();
- }
-
- private static String getDelimiter(String tns) {
- String delim = "/";
- // TODO: is this the correct way to find the separator ?
- try {
- URI uri = new URI(tns);
- if ((uri.getScheme() != null) && uri.getScheme().equalsIgnoreCase("urn")) {
- delim = ":";
- }
- } catch (URISyntaxException e) {
- LOGGER.warning("TargetNamespace of WebService is not a valid URI");
- }
- return delim;
- }
- private static final Logger LOGGER =
- Logger.getLogger(WsaActionUtil.class.getName());
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaClientTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaClientTube.java
deleted file mode 100644
index 41c158a3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaClientTube.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.addressing;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.addressing.model.ActionNotSupportedException;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.AddressingUtils;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.NextAction;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.resources.AddressingMessages;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * WsaClientTube appears in the Tubeline only if addressing is enabled.
- * This tube checks the validity of addressing headers in the incoming messages
- * based on the WSDL model.
- * @author Rama Pulavarthi
- * @author Arun Gupta
- */
-public class WsaClientTube extends WsaTube {
- // capture if the request expects a reply so that it can be used to
- // determine if its oneway for response validation.
- protected boolean expectReply = true;
- public WsaClientTube(WSDLPort wsdlPort, WSBinding binding, Tube next) {
- super(wsdlPort, binding, next);
- }
-
- public WsaClientTube(WsaClientTube that, TubeCloner cloner) {
- super(that, cloner);
- }
-
- public WsaClientTube copy(TubeCloner cloner) {
- return new WsaClientTube(this, cloner);
- }
-
- @Override
- public @NotNull NextAction processRequest(Packet request) {
- expectReply = request.expectReply;
- return doInvoke(next,request);
- }
-
- @Override
- public @NotNull NextAction processResponse(Packet response) {
- // if one-way then, no validation
- if (response.getMessage() != null) {
- response = validateInboundHeaders(response);
- response.addSatellite(new WsaPropertyBag(addressingVersion,soapVersion,response));
- String msgId = AddressingUtils.
- getMessageID(response.getMessage().getHeaders(),
- addressingVersion, soapVersion);
- response.put(WsaPropertyBag.WSA_MSGID_FROM_REQUEST, msgId);
- }
-
- return doReturnWith(response);
- }
-
-
- @Override
- protected void validateAction(Packet packet) {
- //There may not be a WSDL operation. There may not even be a WSDL.
- //For instance this may be a RM CreateSequence message.
- WSDLBoundOperation wbo = getWSDLBoundOperation(packet);
-
- if (wbo == null) return;
-
- String gotA = AddressingUtils.getAction(
- packet.getMessage().getHeaders(),
- addressingVersion, soapVersion);
- if (gotA == null)
- throw new WebServiceException(AddressingMessages.VALIDATION_CLIENT_NULL_ACTION());
-
- String expected = helper.getOutputAction(packet);
-
- if (expected != null && !gotA.equals(expected))
- throw new ActionNotSupportedException(gotA);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaPropertyBag.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaPropertyBag.java
deleted file mode 100644
index 4cb0093b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaPropertyBag.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.addressing;
-
-import com.oracle.webservices.internal.api.message.BasePropertySet;
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.message.AddressingUtils;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.developer.JAXWSProperties;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-
-/**
- * Provides access to the Addressing headers.
- *
- * @author Kohsuke Kawaguchi
- * @author Rama Pulavarthi
- * @since 2.1.3
- */
-public class WsaPropertyBag extends BasePropertySet {
-
- public static final String WSA_REPLYTO_FROM_REQUEST = "com.sun.xml.internal.ws.addressing.WsaPropertyBag.ReplyToFromRequest";
- public static final String WSA_FAULTTO_FROM_REQUEST = "com.sun.xml.internal.ws.addressing.WsaPropertyBag.FaultToFromRequest";
- public static final String WSA_MSGID_FROM_REQUEST = "com.sun.xml.internal.ws.addressing.WsaPropertyBag.MessageIdFromRequest";
- public static final String WSA_TO = "com.sun.xml.internal.ws.addressing.WsaPropertyBag.To";
-
- private final @NotNull AddressingVersion addressingVersion;
- private final @NotNull SOAPVersion soapVersion;
- /**
- * We can't store {@link Message} here as those may get replaced as
- * the packet travels through the pipeline.
- */
- private final @NotNull Packet packet;
-
- public WsaPropertyBag(AddressingVersion addressingVersion, SOAPVersion soapVersion, Packet packet) {
- this.addressingVersion = addressingVersion;
- this.soapVersion = soapVersion;
- this.packet = packet;
- }
-
- /**
- * Gets the <tt>wsa:To</tt> header.
- *
- * @return
- * null if the incoming SOAP message didn't have the header.
- */
- @Property(JAXWSProperties.ADDRESSING_TO)
- public String getTo() throws XMLStreamException {
- if (packet.getMessage() == null) {
- return null;
- }
- Header h = packet.getMessage().getHeaders().get(addressingVersion.toTag, false);
- if(h==null) return null;
- return h.getStringContent();
- }
-
- /**
- * Gets the <tt>wsa:To</tt> header.
- *
- * @return
- * null if the incoming SOAP message didn't have the header.
- */
- @Property(WSA_TO)
- public WSEndpointReference getToAsReference() throws XMLStreamException {
- if (packet.getMessage() == null) {
- return null;
- }
- Header h = packet.getMessage().getHeaders().get(addressingVersion.toTag, false);
- if(h==null) return null;
- return new WSEndpointReference(h.getStringContent(),addressingVersion);
- }
-
- /**
- * Gets the <tt>wsa:From</tt> header.
- *
- * @return
- * null if the incoming SOAP message didn't have the header.
- */
- @Property(JAXWSProperties.ADDRESSING_FROM)
- public WSEndpointReference getFrom() throws XMLStreamException {
- return getEPR(addressingVersion.fromTag);
- }
-
- /**
- * Gets the <tt>wsa:Action</tt> header content as String.
- *
- * @return
- * null if the incoming SOAP message didn't have the header.
- */
- @Property(JAXWSProperties.ADDRESSING_ACTION)
- public String getAction() {
- if (packet.getMessage() == null) {
- return null;
- }
- Header h = packet.getMessage().getHeaders().get(addressingVersion.actionTag, false);
- if(h==null) return null;
- return h.getStringContent();
- }
-
- /**
- * Gets the <tt>wsa:MessageID</tt> header content as String.
- *
- * @return
- * null if the incoming SOAP message didn't have the header.
- */
- // WsaServerTube.REQUEST_MESSAGE_ID is exposed for backward compatibility with 2.1
- @Property({JAXWSProperties.ADDRESSING_MESSAGEID,WsaServerTube.REQUEST_MESSAGE_ID})
- public String getMessageID() {
- if (packet.getMessage() == null) {
- return null;
- }
- return AddressingUtils.getMessageID(packet.getMessage().getHeaders(), addressingVersion,soapVersion);
- }
-
- private WSEndpointReference getEPR(QName tag) throws XMLStreamException {
- if (packet.getMessage() == null) {
- return null;
- }
- Header h = packet.getMessage().getHeaders().get(tag, false);
- if(h==null) return null;
- return h.readAsEPR(addressingVersion);
- }
-
- protected PropertyMap getPropertyMap() {
- return model;
- }
-
- private static final PropertyMap model;
- static {
- model = parse(WsaPropertyBag.class);
- }
-
- private WSEndpointReference _replyToFromRequest = null;
-
- @Property(WSA_REPLYTO_FROM_REQUEST)
- public WSEndpointReference getReplyToFromRequest() {
- return _replyToFromRequest;
- }
-
- public void setReplyToFromRequest(WSEndpointReference ref) {
- _replyToFromRequest = ref;
- }
-
- private WSEndpointReference _faultToFromRequest = null;
-
- @Property(WSA_FAULTTO_FROM_REQUEST)
- public WSEndpointReference getFaultToFromRequest() {
- return _faultToFromRequest;
- }
-
- public void setFaultToFromRequest(WSEndpointReference ref) {
- _faultToFromRequest = ref;
- }
-
- private String _msgIdFromRequest = null;
-
- @Property(WSA_MSGID_FROM_REQUEST)
- public String getMessageIdFromRequest() {
- return _msgIdFromRequest;
- }
-
- public void setMessageIdFromRequest(String id) {
- _msgIdFromRequest = id;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaServerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaServerTube.java
deleted file mode 100644
index 92fc5c67..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaServerTube.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.addressing;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.addressing.model.ActionNotSupportedException;
-import com.sun.xml.internal.ws.addressing.model.InvalidAddressingHeaderException;
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.addressing.NonAnonymousResponseProcessor;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.message.AddressingUtils;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.api.message.Messages;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.*;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.client.Stub;
-import com.sun.xml.internal.ws.developer.JAXWSProperties;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-import com.sun.xml.internal.ws.message.FaultDetailHeader;
-import com.sun.xml.internal.ws.resources.AddressingMessages;
-
-import javax.xml.soap.SOAPFault;
-import javax.xml.ws.WebServiceException;
-import java.net.URI;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Handles WS-Addressing for the server.
- *
- * @author Rama Pulavarthi
- * @author Kohsuke Kawaguchi
- * @author Arun Gupta
- */
-public class WsaServerTube extends WsaTube {
- private WSEndpoint endpoint;
- // store the replyTo/faultTo of the message currently being processed.
- // both will be set to non-null in processRequest
- private WSEndpointReference replyTo;
- private WSEndpointReference faultTo;
- private boolean isAnonymousRequired = false;
- // Used by subclasses to avoid this class closing the transport back
- // channel based on the ReplyTo/FaultTo addrs being non-anonymous. False
- // can be useful in cases where special back-channel handling is required.
- protected boolean isEarlyBackchannelCloseAllowed = true;
-
- /**
- * WSDLBoundOperation calculated on the Request payload.
- * Used for determining ReplyTo or Fault Action for non-anonymous responses *
- */
- private WSDLBoundOperation wbo;
- public WsaServerTube(WSEndpoint endpoint, @NotNull WSDLPort wsdlPort, WSBinding binding, Tube next) {
- super(wsdlPort, binding, next);
- this.endpoint = endpoint;
- }
-
- public WsaServerTube(WsaServerTube that, TubeCloner cloner) {
- super(that, cloner);
- endpoint = that.endpoint;
- }
-
- @Override
- public WsaServerTube copy(TubeCloner cloner) {
- return new WsaServerTube(this, cloner);
- }
-
- @Override
- public @NotNull NextAction processRequest(Packet request) {
- Message msg = request.getMessage();
- if (msg == null) {
- return doInvoke(next,request);
- } // hmm?
-
- // expose bunch of addressing related properties for advanced applications
- request.addSatellite(new WsaPropertyBag(addressingVersion,soapVersion,request));
-
- // Store request ReplyTo and FaultTo in requestPacket.invocationProperties
- // so that they can be used after responsePacket is received.
- // These properties are used if a fault is thrown from the subsequent Pipe/Tubes.
-
- MessageHeaders hl = request.getMessage().getHeaders();
- String msgId;
- try {
- replyTo = AddressingUtils.getReplyTo(hl, addressingVersion, soapVersion);
- faultTo = AddressingUtils.getFaultTo(hl, addressingVersion, soapVersion);
- msgId = AddressingUtils.getMessageID(hl, addressingVersion, soapVersion);
- } catch (InvalidAddressingHeaderException e) {
-
- LOGGER.log(Level.WARNING, addressingVersion.getInvalidMapText()+", Problem header:" + e.getProblemHeader()+ ", Reason: "+ e.getSubsubcode(),e);
-
- // problematic header must be removed since it can fail during Fault message processing
- hl.remove(e.getProblemHeader());
-
- SOAPFault soapFault = helper.createInvalidAddressingHeaderFault(e, addressingVersion);
- // WS-A fault processing for one-way methods
- if ((wsdlPort!=null) && request.getMessage().isOneWay(wsdlPort)) {
- Packet response = request.createServerResponse(null, wsdlPort, null, binding);
- return doReturnWith(response);
- }
-
- Message m = Messages.create(soapFault);
- if (soapVersion == SOAPVersion.SOAP_11) {
- FaultDetailHeader s11FaultDetailHeader = new FaultDetailHeader(addressingVersion, addressingVersion.problemHeaderQNameTag.getLocalPart(), e.getProblemHeader());
- m.getHeaders().add(s11FaultDetailHeader);
- }
-
- Packet response = request.createServerResponse(m, wsdlPort, null, binding);
- return doReturnWith(response);
- }
-
- // defaulting
- if (replyTo == null) {
- replyTo = addressingVersion.anonymousEpr;
- }
- if (faultTo == null) {
- faultTo = replyTo;
- }
-
- // Save a copy into the packet such that we can save it with that
- // packet if we're going to deliver the response at a later time
- // (async from the request).
- request.put(WsaPropertyBag.WSA_REPLYTO_FROM_REQUEST, replyTo);
- request.put(WsaPropertyBag.WSA_FAULTTO_FROM_REQUEST, faultTo);
- request.put(WsaPropertyBag.WSA_MSGID_FROM_REQUEST, msgId);
-
- wbo = getWSDLBoundOperation(request);
- isAnonymousRequired = isAnonymousRequired(wbo);
-
- Packet p = validateInboundHeaders(request);
- // if one-way message and WS-A header processing fault has occurred,
- // then do no further processing
- if (p.getMessage() == null) {
- return doReturnWith(p);
- }
-
- // if we find an error in addressing header, just turn around the direction here
- if (p.getMessage().isFault()) {
- // close the transportBackChannel if we know that
- // we'll never use them
- if (isEarlyBackchannelCloseAllowed &&
- !(isAnonymousRequired) &&
- !faultTo.isAnonymous() && request.transportBackChannel != null) {
- request.transportBackChannel.close();
- }
- return processResponse(p);
- }
- // close the transportBackChannel if we know that
- // we'll never use them
- if (isEarlyBackchannelCloseAllowed &&
- !(isAnonymousRequired) &&
- !replyTo.isAnonymous() && !faultTo.isAnonymous() &&
- request.transportBackChannel != null) {
- request.transportBackChannel.close();
- }
- return doInvoke(next,p);
- }
-
- protected boolean isAnonymousRequired(@Nullable WSDLBoundOperation wbo) {
- //this requirement can only be specified in W3C case, Override this in W3C case.
- return false;
- }
-
- protected void checkAnonymousSemantics(WSDLBoundOperation wbo, WSEndpointReference replyTo, WSEndpointReference faultTo) {
- //this requirement can only be specified in W3C case, Override this in W3C case.
- }
-
- @Override
- public @NotNull NextAction processException(Throwable t) {
- final Packet response = Fiber.current().getPacket();
- ThrowableContainerPropertySet tc = response.getSatellite(ThrowableContainerPropertySet.class);
- if (tc == null) {
- tc = new ThrowableContainerPropertySet(t);
- response.addSatellite(tc);
- } else if (t != tc.getThrowable()) {
- // This is a pathological case where an exception happens after a previous exception.
- // Make sure you report the latest one.
- tc.setThrowable(t);
- }
- return processResponse(response.endpoint.createServiceResponseForException(tc, response, soapVersion, wsdlPort,
- response.endpoint.getSEIModel(),
- binding));
- }
-
- @Override
- public @NotNull NextAction processResponse(Packet response) {
- Message msg = response.getMessage();
- if (msg ==null) {
- return doReturnWith(response);
- } // one way message. Nothing to see here. Move on.
-
- String to = AddressingUtils.getTo(msg.getHeaders(),
- addressingVersion, soapVersion);
- if (to != null) {
- replyTo = faultTo = new WSEndpointReference(to, addressingVersion);
- }
-
- if (replyTo == null) {
- // This is an async response or we're not processing the response in
- // the same tube instance as we processed the request. Get the ReplyTo
- // now, from the properties we stored into the request packet. We
- // assume anyone that interrupted the request->response flow will have
- // saved the ReplyTo and put it back into the packet for our use.
- replyTo = (WSEndpointReference)response.
- get(WsaPropertyBag.WSA_REPLYTO_FROM_REQUEST);
- }
-
- if (faultTo == null) {
- // This is an async response or we're not processing the response in
- // the same tube instance as we processed the request. Get the FaultTo
- // now, from the properties we stored into the request packet. We
- // assume anyone that interrupted the request->response flow will have
- // saved the FaultTo and put it back into the packet for our use.
- faultTo = (WSEndpointReference)response.
- get(WsaPropertyBag.WSA_FAULTTO_FROM_REQUEST);
- }
-
- WSEndpointReference target = msg.isFault() ? faultTo : replyTo;
- if (target == null && response.proxy instanceof Stub) {
- target = ((Stub) response.proxy).getWSEndpointReference();
- }
- if (target == null || target.isAnonymous() || isAnonymousRequired) {
- return doReturnWith(response);
- }
- if (target.isNone()) {
- // the caller doesn't want to hear about it, so proceed like one-way
- response.setMessage(null);
- return doReturnWith(response);
- }
-
- if ((wsdlPort!=null) && response.getMessage().isOneWay(wsdlPort)) {
- // one way message but with replyTo. I believe this is a hack for WS-TX - KK.
- LOGGER.fine(AddressingMessages.NON_ANONYMOUS_RESPONSE_ONEWAY());
- return doReturnWith(response);
- }
-
- // MTU: If we're not sending a response that corresponds to a WSDL op,
- // then take whatever soapAction is set on the packet (as allowing
- // helper.getOutputAction() will only result in a bogus 'unset'
- // action value.
- if (wbo != null || response.soapAction == null) {
- String action = response.getMessage().isFault() ?
- helper.getFaultAction(wbo, response) :
- helper.getOutputAction(wbo);
- //set the SOAPAction, as its got to be same as wsa:Action
- if (response.soapAction == null ||
- (action != null &&
- !action.equals(AddressingVersion.UNSET_OUTPUT_ACTION))) {
- response.soapAction = action;
- }
- }
- response.expectReply = false;
-
- EndpointAddress adrs;
- try {
- adrs = new EndpointAddress(URI.create(target.getAddress()));
- } catch (NullPointerException e) {
- throw new WebServiceException(e);
- } catch (IllegalArgumentException e) {
- throw new WebServiceException(e);
- }
-
- response.endpointAddress = adrs;
-
- if (response.isAdapterDeliversNonAnonymousResponse) {
- return doReturnWith(response);
- }
-
- return doReturnWith(NonAnonymousResponseProcessor.getDefault().process(response));
- }
-
- @Override
- protected void validateAction(Packet packet) {
- //There may not be a WSDL operation. There may not even be a WSDL.
- //For instance this may be a RM CreateSequence message.
- WSDLBoundOperation wsdlBoundOperation = getWSDLBoundOperation(packet);
-
- if (wsdlBoundOperation == null) {
- return;
- }
-
- String gotA = AddressingUtils.getAction(
- packet.getMessage().getHeaders(),
- addressingVersion, soapVersion);
-
- if (gotA == null) {
- throw new WebServiceException(AddressingMessages.VALIDATION_SERVER_NULL_ACTION());
- }
-
- String expected = helper.getInputAction(packet);
- String soapAction = helper.getSOAPAction(packet);
- if (helper.isInputActionDefault(packet) && (soapAction != null && !soapAction.equals(""))) {
- expected = soapAction;
- }
-
- if (expected != null && !gotA.equals(expected)) {
- throw new ActionNotSupportedException(gotA);
- }
- }
-
- @Override
- protected void checkMessageAddressingProperties(Packet packet) {
- super.checkMessageAddressingProperties(packet);
-
- // wsaw:Anonymous validation
- WSDLBoundOperation wsdlBoundOperation = getWSDLBoundOperation(packet);
- checkAnonymousSemantics(wsdlBoundOperation, replyTo, faultTo);
- // check if addresses are valid
- checkNonAnonymousAddresses(replyTo,faultTo);
- }
-
- @SuppressWarnings("ResultOfObjectAllocationIgnored")
- private void checkNonAnonymousAddresses(WSEndpointReference replyTo, WSEndpointReference faultTo) {
- if (!replyTo.isAnonymous()) {
- try {
- new EndpointAddress(URI.create(replyTo.getAddress()));
- } catch (Exception e) {
- throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, addressingVersion.invalidAddressTag);
- }
- }
- //for now only validate ReplyTo
- /*
- if (!faultTo.isAnonymous()) {
- try {
- new EndpointAddress(URI.create(faultTo.getAddress()));
- } catch (IllegalArgumentException e) {
- throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, addressingVersion.invalidAddressTag);
- }
- }
- */
-
- }
-
- /**
- * @deprecated
- * Use {@link JAXWSProperties#ADDRESSING_MESSAGEID}.
- */
- public static final String REQUEST_MESSAGE_ID = "com.sun.xml.internal.ws.addressing.request.messageID";
-
- private static final Logger LOGGER = Logger.getLogger(WsaServerTube.class.getName());
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTube.java
deleted file mode 100644
index c74ce1ed..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTube.java
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.addressing;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.addressing.model.InvalidAddressingHeaderException;
-import com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.message.AddressingUtils;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Messages;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.NextAction;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature;
-import com.sun.xml.internal.ws.message.FaultDetailHeader;
-import com.sun.xml.internal.ws.resources.AddressingMessages;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPFault;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.soap.SOAPBinding;
-import java.util.Iterator;
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-/**
- * WS-Addressing processing code shared between client and server.
- *
- * <p>
- * This tube is used only when WS-Addressing is enabled.
- *
- * @author Rama Pulavarthi
- * @author Arun Gupta
- */
-abstract class WsaTube extends AbstractFilterTubeImpl {
- /**
- * Port that we are processing.
- */
- protected final @NotNull WSDLPort wsdlPort;
- protected final WSBinding binding;
- final WsaTubeHelper helper;
- protected final @NotNull AddressingVersion addressingVersion;
- protected final SOAPVersion soapVersion;
-
- /**
- * True if the addressing headers are mandatory.
- */
- private final boolean addressingRequired;
-
- public WsaTube(WSDLPort wsdlPort, WSBinding binding, Tube next) {
- super(next);
- this.wsdlPort = wsdlPort;
- this.binding = binding;
- addKnownHeadersToBinding(binding);
- addressingVersion = binding.getAddressingVersion();
- soapVersion = binding.getSOAPVersion();
- helper = getTubeHelper();
- addressingRequired = AddressingVersion.isRequired(binding);
- }
-
- public WsaTube(WsaTube that, TubeCloner cloner) {
- super(that, cloner);
- this.wsdlPort = that.wsdlPort;
- this.binding = that.binding;
- this.helper = that.helper;
- addressingVersion = that.addressingVersion;
- soapVersion = that.soapVersion;
- addressingRequired = that.addressingRequired;
- }
-
- private void addKnownHeadersToBinding(WSBinding binding) {
- for (AddressingVersion addrVersion: AddressingVersion.values()) {
- binding.addKnownHeader(addrVersion.actionTag);
- binding.addKnownHeader(addrVersion.faultDetailTag);
- binding.addKnownHeader(addrVersion.faultToTag);
- binding.addKnownHeader(addrVersion.fromTag);
- binding.addKnownHeader(addrVersion.messageIDTag);
- binding.addKnownHeader(addrVersion.relatesToTag);
- binding.addKnownHeader(addrVersion.replyToTag);
- binding.addKnownHeader(addrVersion.toTag);
- }
- }
-
- @Override
- public @NotNull NextAction processException(Throwable t) {
- return super.processException(t);
- }
-
- protected WsaTubeHelper getTubeHelper() {
- if(binding.isFeatureEnabled(AddressingFeature.class)) {
- return new WsaTubeHelperImpl(wsdlPort, null, binding);
- } else if(binding.isFeatureEnabled(MemberSubmissionAddressingFeature.class)) {
- //seiModel is null as it is not needed.
- return new com.sun.xml.internal.ws.addressing.v200408.WsaTubeHelperImpl(wsdlPort, null, binding);
- } else {
- // Addressing is not enabled, WsaTube should not be included in the pipeline
- throw new WebServiceException(AddressingMessages.ADDRESSING_NOT_ENABLED(this.getClass().getSimpleName()));
- }
- }
-
- /**
- * Validates the inbound message. If an error is found, create
- * a fault message and returns that. Otherwise
- * it will pass through the parameter 'packet' object to the return value.
- */
- protected Packet validateInboundHeaders(Packet packet) {
- SOAPFault soapFault;
- FaultDetailHeader s11FaultDetailHeader;
-
- try {
- checkMessageAddressingProperties(packet);
- return packet;
- } catch (InvalidAddressingHeaderException e) {
- LOGGER.log(Level.WARNING,
- addressingVersion.getInvalidMapText()+", Problem header:" + e.getProblemHeader()+ ", Reason: "+ e.getSubsubcode(),e);
- soapFault = helper.createInvalidAddressingHeaderFault(e, addressingVersion);
- s11FaultDetailHeader = new FaultDetailHeader(addressingVersion, addressingVersion.problemHeaderQNameTag.getLocalPart(), e.getProblemHeader());
- } catch (MissingAddressingHeaderException e) {
- LOGGER.log(Level.WARNING,addressingVersion.getMapRequiredText()+", Problem header:"+ e.getMissingHeaderQName(),e);
- soapFault = helper.newMapRequiredFault(e);
- s11FaultDetailHeader = new FaultDetailHeader(addressingVersion, addressingVersion.problemHeaderQNameTag.getLocalPart(), e.getMissingHeaderQName());
- }
-
- if (soapFault != null) {
- // WS-A fault processing for one-way methods
- if ((wsdlPort !=null) && packet.getMessage().isOneWay(wsdlPort)) {
- return packet.createServerResponse(null, wsdlPort, null, binding);
- }
-
- Message m = Messages.create(soapFault);
- if (soapVersion == SOAPVersion.SOAP_11) {
- m.getHeaders().add(s11FaultDetailHeader);
- }
-
- return packet.createServerResponse(m, wsdlPort, null, binding);
- }
-
- return packet;
- }
-
- /**
- * This method checks all the WS-Addressing headers are valid and as per the spec definded rules.
- * Mainly it checks the cardinality of the WSA headers and checks that mandatory headers exist.
- * It also checks if the SOAPAction is equal to wsa:Action value when non-empty.
- *
- * Override this method if you need to additional checking of headers other than just existence of the headers.
- * For ex: On server-side, check Anonymous and Non-Anonymous semantics in addition to checking cardinality.
- *
- * Override checkMandatoryHeaders(Packet p) to have different validation rules for different versions
- *
- * @param packet
- */
- protected void checkMessageAddressingProperties(Packet packet) {
- checkCardinality(packet);
- }
-
- final boolean isAddressingEngagedOrRequired(Packet packet, WSBinding binding) {
- if (AddressingVersion.isRequired(binding))
- return true;
-
- if (packet == null)
- return false;
-
- if (packet.getMessage() == null)
- return false;
-
- if (packet.getMessage().getHeaders() != null)
- return false;
-
- String action = AddressingUtils.getAction(
- packet.getMessage().getHeaders(),
- addressingVersion, soapVersion);
- if (action == null)
- return true;
-
- return true;
- }
-
- /**
- * Checks the cardinality of WS-Addressing headers on an inbound {@link Packet}. This method
- * checks for the cardinality if WS-Addressing is engaged (detected by the presence of wsa:Action
- * header) or wsdl:required=true.
- *
- * @param packet The inbound packet.
- * @throws WebServiceException if:
- * <ul>
- * <li>there is an error reading ReplyTo or FaultTo</li>
- * <li>WS-Addressing is required and {@link Message} within <code>packet</code> is null</li>
- * <li>WS-Addressing is required and no headers are found in the {@link Message}</li>
- * <li>an uknown WS-Addressing header is present</li>
- * </ul>
- */
- protected void checkCardinality(Packet packet) {
- Message message = packet.getMessage();
- if (message == null) {
- if (addressingRequired)
- throw new WebServiceException(AddressingMessages.NULL_MESSAGE());
- else
- return;
- }
-
- Iterator<Header> hIter = message.getHeaders().getHeaders(addressingVersion.nsUri, true);
-
- if (!hIter.hasNext()) {
- // no WS-A headers are found
- if (addressingRequired)
- // if WS-A is required, then throw an exception looking for wsa:Action header
- throw new MissingAddressingHeaderException(addressingVersion.actionTag,packet);
- else
- // else no need to process
- return;
- }
-
- boolean foundFrom = false;
- boolean foundTo = false;
- boolean foundReplyTo = false;
- boolean foundFaultTo = false;
- boolean foundAction = false;
- boolean foundMessageId = false;
- boolean foundRelatesTo = false;
- QName duplicateHeader = null;
-
- while (hIter.hasNext()) {
- Header h = hIter.next();
-
- // check if the Header is in current role
- if (!isInCurrentRole(h, binding)) {
- continue;
- }
-
- String local = h.getLocalPart();
- if (local.equals(addressingVersion.fromTag.getLocalPart())) {
- if (foundFrom) {
- duplicateHeader = addressingVersion.fromTag;
- break;
- }
- foundFrom = true;
- } else if (local.equals(addressingVersion.toTag.getLocalPart())) {
- if (foundTo) {
- duplicateHeader = addressingVersion.toTag;
- break;
- }
- foundTo = true;
- } else if (local.equals(addressingVersion.replyToTag.getLocalPart())) {
- if (foundReplyTo) {
- duplicateHeader = addressingVersion.replyToTag;
- break;
- }
- foundReplyTo = true;
- try { // verify that the header is in a good shape
- h.readAsEPR(addressingVersion);
- } catch (XMLStreamException e) {
- throw new WebServiceException(AddressingMessages.REPLY_TO_CANNOT_PARSE(), e);
- }
- } else if (local.equals(addressingVersion.faultToTag.getLocalPart())) {
- if (foundFaultTo) {
- duplicateHeader = addressingVersion.faultToTag;
- break;
- }
- foundFaultTo = true;
- try { // verify that the header is in a good shape
- h.readAsEPR(addressingVersion);
- } catch (XMLStreamException e) {
- throw new WebServiceException(AddressingMessages.FAULT_TO_CANNOT_PARSE(), e);
- }
- } else if (local.equals(addressingVersion.actionTag.getLocalPart())) {
- if (foundAction) {
- duplicateHeader = addressingVersion.actionTag;
- break;
- }
- foundAction = true;
- } else if (local.equals(addressingVersion.messageIDTag.getLocalPart())) {
- if (foundMessageId) {
- duplicateHeader = addressingVersion.messageIDTag;
- break;
- }
- foundMessageId = true;
- } else if (local.equals(addressingVersion.relatesToTag.getLocalPart())) {
- foundRelatesTo = true;
- } else if (local.equals(addressingVersion.faultDetailTag.getLocalPart())) {
- // TODO: should anything be done here ?
- // TODO: fault detail element - only for SOAP 1.1
- } else {
- System.err.println(AddressingMessages.UNKNOWN_WSA_HEADER());
- }
- }
-
- // check for invalid cardinality first before checking for mandatory headers
- if (duplicateHeader != null) {
- throw new InvalidAddressingHeaderException(duplicateHeader, addressingVersion.invalidCardinalityTag);
- }
-
- // WS-A is engaged if wsa:Action header is found
- boolean engaged = foundAction;
-
- // check for mandatory set of headers only if:
- // 1. WS-A is engaged or
- // 2. wsdl:required=true
- // Both wsa:Action and wsa:To MUST be present on request (for oneway MEP) and
- // response messages (for oneway and request/response MEP only)
- if (engaged || addressingRequired) {
- // Check for mandatory headers always (even for Protocol messages).
- // If it breaks any interop scenarios, Remove the comments.
- /*
- WSDLBoundOperation wbo = getWSDLBoundOperation(packet);
- // no need to check for for non-application messages
- if (wbo == null)
- return;
- */
- checkMandatoryHeaders(packet, foundAction, foundTo, foundReplyTo,
- foundFaultTo, foundMessageId, foundRelatesTo);
- }
- }
-
- final boolean isInCurrentRole(Header header, WSBinding binding) {
- // TODO: binding will be null for protocol messages
- // TODO: returning true assumes that protocol messages are
- // TODO: always in current role, this may not to be fixed.
- if (binding == null)
- return true;
- return ((SOAPBinding)binding).getRoles().contains(header.getRole(soapVersion));
-
- }
-
- protected final WSDLBoundOperation getWSDLBoundOperation(Packet packet) {
- //we can find Req/Response or Oneway only with WSDLModel
- if(wsdlPort == null)
- return null;
- QName opName = packet.getWSDLOperation();
- if(opName != null)
- return wsdlPort.getBinding().get(opName);
- return null;
- }
-
- protected void validateSOAPAction(Packet packet) {
- String gotA = AddressingUtils.getAction(
- packet.getMessage().getHeaders(),
- addressingVersion, soapVersion);
- if (gotA == null)
- throw new WebServiceException(AddressingMessages.VALIDATION_SERVER_NULL_ACTION());
- if(packet.soapAction != null && !packet.soapAction.equals("\"\"") && !packet.soapAction.equals("\""+gotA+"\"")) {
- throw new InvalidAddressingHeaderException(addressingVersion.actionTag, addressingVersion.actionMismatchTag);
- }
- }
-
- protected abstract void validateAction(Packet packet);
-
- /**
- * This should be called only when Addressing is engaged.
- *
- * Checks only for presence of wsa:Action and validates that wsa:Action
- * equals SOAPAction header when non-empty
- * Should be overridden if other wsa headers need to be checked based on version.
- *
- * @param packet
- * @param foundAction
- * @param foundTo
- * @param foundReplyTo
- * @param foundFaultTo
- * @param foundMessageId
- * @param foundRelatesTo
- */
- protected void checkMandatoryHeaders(
- Packet packet, boolean foundAction, boolean foundTo, boolean foundReplyTo,
- boolean foundFaultTo, boolean foundMessageId, boolean foundRelatesTo) {
- // if no wsa:Action header is found
- if (!foundAction)
- throw new MissingAddressingHeaderException(addressingVersion.actionTag,packet);
- validateSOAPAction(packet);
- }
- private static final Logger LOGGER = Logger.getLogger(WsaTube.class.getName());
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelper.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelper.java
deleted file mode 100644
index fdfeb1c2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelper.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.addressing;
-
-import com.sun.xml.internal.ws.addressing.model.InvalidAddressingHeaderException;
-import com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.message.AddressingUtils;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-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.WSDLOutput;
-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.JavaMethodImpl;
-import com.sun.xml.internal.ws.model.CheckedExceptionImpl;
-import com.sun.istack.internal.Nullable;
-import org.w3c.dom.Element;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Detail;
-import javax.xml.soap.SOAPConstants;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFactory;
-import javax.xml.soap.SOAPFault;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.WebServiceException;
-
-/**
- * @author Rama Pulavarthi
- * @author Arun Gupta
- */
-public abstract class WsaTubeHelper {
-
- public WsaTubeHelper(WSBinding binding, SEIModel seiModel, WSDLPort wsdlPort) {
- this.binding = binding;
- this.wsdlPort = wsdlPort;
- this.seiModel = seiModel;
- this.soapVer = binding.getSOAPVersion();
- this.addVer = binding.getAddressingVersion();
-
- }
-
- public String getFaultAction(Packet requestPacket, Packet responsePacket) {
- String action = null;
- if(seiModel != null) {
- action = getFaultActionFromSEIModel(requestPacket,responsePacket);
- }
- if (action != null) {
- return action;
- } else {
- action = addVer.getDefaultFaultAction();
- }
- if (wsdlPort != null) {
- WSDLOperationMapping wsdlOp = requestPacket.getWSDLOperationMapping();
- if (wsdlOp != null) {
- WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
- return getFaultAction(wbo, responsePacket);
- }
- }
- return action;
- }
-
- String getFaultActionFromSEIModel(Packet requestPacket, Packet responsePacket) {
- String action = null;
- if (seiModel == null || wsdlPort == null) {
- return action;
- }
-
- try {
- SOAPMessage sm = responsePacket.getMessage().copy().readAsSOAPMessage();
- if (sm == null) {
- return action;
- }
-
- if (sm.getSOAPBody() == null) {
- return action;
- }
-
- if (sm.getSOAPBody().getFault() == null) {
- return action;
- }
-
- Detail detail = sm.getSOAPBody().getFault().getDetail();
- if (detail == null) {
- return action;
- }
-
- String ns = detail.getFirstChild().getNamespaceURI();
- String name = detail.getFirstChild().getLocalName();
-
- WSDLOperationMapping wsdlOp = requestPacket.getWSDLOperationMapping();
- JavaMethodImpl jm = (wsdlOp != null) ? (JavaMethodImpl)wsdlOp.getJavaMethod() : null;
- if (jm != null) {
- for (CheckedExceptionImpl ce : jm.getCheckedExceptions()) {
- if (ce.getDetailType().tagName.getLocalPart().equals(name) &&
- ce.getDetailType().tagName.getNamespaceURI().equals(ns)) {
- return ce.getFaultAction();
- }
- }
- }
- return action;
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-
- String getFaultAction(@Nullable WSDLBoundOperation wbo, Packet responsePacket) {
- String action = AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), addVer, soapVer);
- if (action != null) {
- return action;
- }
-
- action = addVer.getDefaultFaultAction();
- if (wbo == null) {
- return action;
- }
-
- try {
- SOAPMessage sm = responsePacket.getMessage().copy().readAsSOAPMessage();
- if (sm == null) {
- return action;
- }
-
- if (sm.getSOAPBody() == null) {
- return action;
- }
-
- if (sm.getSOAPBody().getFault() == null) {
- return action;
- }
-
- Detail detail = sm.getSOAPBody().getFault().getDetail();
- if (detail == null) {
- return action;
- }
-
- String ns = detail.getFirstChild().getNamespaceURI();
- String name = detail.getFirstChild().getLocalName();
-
- WSDLOperation o = wbo.getOperation();
-
- WSDLFault fault = o.getFault(new QName(ns, name));
- if (fault == null) {
- return action;
- }
-
- action = fault.getAction();
-
- return action;
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-
- public String getInputAction(Packet packet) {
- String action = null;
-
- if (wsdlPort != null) {
- WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
- if (wsdlOp != null) {
- WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
- WSDLOperation op = wbo.getOperation();
- action = op.getInput().getAction();
- }
- }
-
- return action;
- }
-
- /**
- * This method gives the Input addressing Action for a message.
- * It gives the Action set in the wsdl operation for the corresponding payload.
- * If it is not explicitly set, it gives the soapAction
- * @param packet
- * @return input Action
- */
- public String getEffectiveInputAction(Packet packet) {
- //non-default SOAPAction beomes wsa:action
- if(packet.soapAction != null && !packet.soapAction.equals("")) {
- return packet.soapAction;
- }
- String action;
-
- if (wsdlPort != null) {
- WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
- if (wsdlOp != null) {
- WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
- WSDLOperation op = wbo.getOperation();
- action = op.getInput().getAction();
- } else {
- action = packet.soapAction;
- }
- } else {
- action = packet.soapAction;
- }
- return action;
- }
-
- public boolean isInputActionDefault(Packet packet) {
- if (wsdlPort == null) {
- return false;
- }
- WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
- if(wsdlOp == null) {
- return false;
- }
- WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
- WSDLOperation op = wbo.getOperation();
- return op.getInput().isDefaultAction();
-
- }
-
- public String getSOAPAction(Packet packet) {
- String action = "";
-
- if (packet == null || packet.getMessage() == null) {
- return action;
- }
-
- if (wsdlPort == null) {
- return action;
- }
-
- WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
- if (wsdlOp == null) {
- return action;
- }
-
- WSDLBoundOperation op = wsdlOp.getWSDLBoundOperation();
- action = op.getSOAPAction();
- return action;
- }
-
- public String getOutputAction(Packet packet) {
- //String action = AddressingVersion.UNSET_OUTPUT_ACTION;
- String action = null;
- WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
- if (wsdlOp != null) {
- JavaMethod javaMethod = wsdlOp.getJavaMethod();
- if (javaMethod != null) {
- JavaMethodImpl jm = (JavaMethodImpl) javaMethod;
- if (jm != null && jm.getOutputAction() != null && !jm.getOutputAction().equals("")) {
- return jm.getOutputAction();
- }
- }
- WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
- if (wbo != null) return getOutputAction(wbo);
- }
- return action;
- }
-
- String getOutputAction(@Nullable WSDLBoundOperation wbo) {
- String action = AddressingVersion.UNSET_OUTPUT_ACTION;
- if (wbo != null) {
- WSDLOutput op = wbo.getOperation().getOutput();
- if (op != null) {
- action = op.getAction();
- }
- }
- return action;
- }
-
- public SOAPFault createInvalidAddressingHeaderFault(InvalidAddressingHeaderException e, AddressingVersion av) {
- QName name = e.getProblemHeader();
- QName subsubcode = e.getSubsubcode();
- QName subcode = av.invalidMapTag;
- String faultstring = String.format(av.getInvalidMapText(), name, subsubcode);
-
- try {
- SOAPFactory factory;
- SOAPFault fault;
- if (soapVer == SOAPVersion.SOAP_12) {
- factory = SOAPVersion.SOAP_12.getSOAPFactory();
- fault = factory.createFault();
- fault.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT);
- fault.appendFaultSubcode(subcode);
- fault.appendFaultSubcode(subsubcode);
- getInvalidMapDetail(name, fault.addDetail());
- } else {
- factory = SOAPVersion.SOAP_11.getSOAPFactory();
- fault = factory.createFault();
- fault.setFaultCode(subsubcode);
- }
-
- fault.setFaultString(faultstring);
-
- return fault;
- } catch (SOAPException se) {
- throw new WebServiceException(se);
- }
- }
-
- public SOAPFault newMapRequiredFault(MissingAddressingHeaderException e) {
- QName subcode = addVer.mapRequiredTag;
- QName subsubcode = addVer.mapRequiredTag;
- String faultstring = addVer.getMapRequiredText();
-
- try {
- SOAPFactory factory;
- SOAPFault fault;
- if (soapVer == SOAPVersion.SOAP_12) {
- factory = SOAPVersion.SOAP_12.getSOAPFactory();
- fault = factory.createFault();
- fault.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT);
- fault.appendFaultSubcode(subcode);
- fault.appendFaultSubcode(subsubcode);
- getMapRequiredDetail(e.getMissingHeaderQName(), fault.addDetail());
- } else {
- factory = SOAPVersion.SOAP_11.getSOAPFactory();
- fault = factory.createFault();
- fault.setFaultCode(subsubcode);
- }
-
- fault.setFaultString(faultstring);
-
- return fault;
- } catch (SOAPException se) {
- throw new WebServiceException(se);
- }
- }
-
- public abstract void getProblemActionDetail(String action, Element element);
- public abstract void getInvalidMapDetail(QName name, Element element);
- public abstract void getMapRequiredDetail(QName name, Element element);
-
- protected SEIModel seiModel;
- protected WSDLPort wsdlPort;
- protected WSBinding binding;
- protected final SOAPVersion soapVer;
- protected final AddressingVersion addVer;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelperImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelperImpl.java
deleted file mode 100644
index 5f0aec09..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelperImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import org.w3c.dom.Element;
-
-/**
- * @author Arun Gupta
- */
-public class WsaTubeHelperImpl extends WsaTubeHelper {
- static final JAXBContext jc;
-
- static {
- try {
- jc = JAXBContext.newInstance(ProblemAction.class,
- ProblemHeaderQName.class);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
- }
-
- public WsaTubeHelperImpl(WSDLPort wsdlPort, SEIModel seiModel, WSBinding binding) {
- super(binding,seiModel,wsdlPort);
- }
-
- private Marshaller createMarshaller() throws JAXBException {
- Marshaller marshaller = jc.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
- return marshaller;
- }
-
- @Override
- public final void getProblemActionDetail(String action, Element element) {
- ProblemAction pa = new ProblemAction(action);
- try {
- createMarshaller().marshal(pa, element);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
- }
-
- @Override
- public final void getInvalidMapDetail(QName name, Element element) {
- ProblemHeaderQName phq = new ProblemHeaderQName(name);
- try {
- createMarshaller().marshal(phq, element);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
- }
-
- @Override
- public final void getMapRequiredDetail(QName name, Element element) {
- getInvalidMapDetail(name, element);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/ActionNotSupportedException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/ActionNotSupportedException.java
deleted file mode 100644
index 75a4155f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/ActionNotSupportedException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing.model;
-
-import com.sun.xml.internal.ws.resources.AddressingMessages;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * @author Arun Gupta
- */
-public class ActionNotSupportedException extends WebServiceException {
- private String action;
-
- public ActionNotSupportedException(String action) {
- super(AddressingMessages.ACTION_NOT_SUPPORTED_EXCEPTION(action));
- this.action = action;
- }
-
- public String getAction() {
- return action;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/InvalidAddressingHeaderException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/InvalidAddressingHeaderException.java
deleted file mode 100644
index 937ab772..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/InvalidAddressingHeaderException.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing.model;
-
-import com.sun.xml.internal.ws.resources.AddressingMessages;
-
-import javax.xml.ws.WebServiceException;
-import javax.xml.namespace.QName;
-
-/**
- * This exception captures SOAP Fault information when a WS-Addressing 1.0 Message Addressing
- * Property is invalid and cannot be processed.
- *
- * @author Rama Pulavarthi
- */
-public class InvalidAddressingHeaderException extends WebServiceException {
- private QName problemHeader;
- private QName subsubcode;
-
- /**
- * Creates a InvalidAddressingHeader exception capturing information about the invalid
- * Addressing Message Property and the reason in Subsubcode.
- * @param problemHeader
- * represents the invalid Addressing Header.
- * @param subsubcode
- * represents the reason why the Addressing header in question is invalid.
- */
- public InvalidAddressingHeaderException(QName problemHeader, QName subsubcode) {
- super(AddressingMessages.INVALID_ADDRESSING_HEADER_EXCEPTION(problemHeader,subsubcode));
- this.problemHeader = problemHeader;
- this.subsubcode = subsubcode;
- }
-
- public QName getProblemHeader() {
- return problemHeader;
- }
-
- public QName getSubsubcode() {
- return subsubcode;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/MissingAddressingHeaderException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/MissingAddressingHeaderException.java
deleted file mode 100644
index 9ee6ec32..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/MissingAddressingHeaderException.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing.model;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.resources.AddressingMessages;
-
-import javax.xml.ws.WebServiceException;
-import javax.xml.namespace.QName;
-
-/**
- * This exception signals that a particular WS-Addressing header is missing in a SOAP message.
- *
- * @author Rama Pulavarthi
- */
-public class MissingAddressingHeaderException extends WebServiceException {
- private final QName name;
- private transient final Packet packet;
-
- /**
- *
- * @param name QName of the missing WS-Addressing Header
- */
- public MissingAddressingHeaderException(@NotNull QName name) {
- this(name,null);
- }
-
- public MissingAddressingHeaderException(@NotNull QName name, @Nullable Packet p) {
- super(AddressingMessages.MISSING_HEADER_EXCEPTION(name));
- this.name = name;
- this.packet = p;
- }
-
- /**
- * Gets the QName of the missing WS-Addressing Header.
- *
- * @return
- * never null.
- */
- public QName getMissingHeaderQName() {
- return name;
- }
-
- /**
- * The {@link Packet} in which a header was missing.
- *
- * <p>
- * This object can be used to deep-inspect the problematic SOAP message.
- */
- public Packet getPacket() {
- return packet;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingFeatureConfigurator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingFeatureConfigurator.java
deleted file mode 100644
index f7096d82..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingFeatureConfigurator.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing.policy;
-
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.policy.AssertionSet;
-import com.sun.xml.internal.ws.policy.NestedPolicy;
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapKey;
-import com.sun.xml.internal.ws.policy.jaxws.spi.PolicyFeatureConfigurator;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.addressing.W3CAddressingMetadataConstants;
-import com.sun.xml.internal.ws.resources.ModelerMessages;
-import com.sun.xml.internal.bind.util.Which;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.logging.Level;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.soap.AddressingFeature;
-
-/**
- * This Policy extension configures the WSDLModel with AddressingFeature when Addressing assertions are present in the
- * PolicyMap.
- *
- * @author japod
- * @author Rama Pulavarthi
- */
-public class AddressingFeatureConfigurator implements PolicyFeatureConfigurator {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(AddressingFeatureConfigurator.class);
-
- private static final QName[] ADDRESSING_ASSERTIONS = {
- new QName(AddressingVersion.MEMBER.policyNsUri, "UsingAddressing")};
-
- /**
- * Creates a new instance of AddressingFeatureConfigurator
- */
- public AddressingFeatureConfigurator() {
- }
-
- public Collection<WebServiceFeature> getFeatures(final PolicyMapKey key, final PolicyMap policyMap) throws PolicyException {
- LOGGER.entering(key, policyMap);
- final Collection<WebServiceFeature> features = new LinkedList<WebServiceFeature>();
- if ((key != null) && (policyMap != null)) {
- final Policy policy = policyMap.getEndpointEffectivePolicy(key);
- for (QName addressingAssertionQName : ADDRESSING_ASSERTIONS) {
- if ((policy != null) && policy.contains(addressingAssertionQName)) {
- final Iterator <AssertionSet> assertions = policy.iterator();
- while(assertions.hasNext()){
- final AssertionSet assertionSet = assertions.next();
- final Iterator<PolicyAssertion> policyAssertion = assertionSet.iterator();
- while(policyAssertion.hasNext()){
- final PolicyAssertion assertion = policyAssertion.next();
- if(assertion.getName().equals(addressingAssertionQName)){
- final WebServiceFeature feature = AddressingVersion.getFeature(addressingAssertionQName.getNamespaceURI(), true, !assertion.isOptional());
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine("Added addressing feature \"" + feature + "\" for element \"" + key + "\"");
- }
- features.add(feature);
- } // end-if non optional wsa assertion found
- } // next assertion
- } // next alternative
- } // end-if policy contains wsa assertion
- } //end foreach addr assertion
-
- // Deal with WS-Addressing 1.0 Metadata assertions
- if (policy != null && policy.contains(W3CAddressingMetadataConstants.WSAM_ADDRESSING_ASSERTION)) {
- for (AssertionSet assertions : policy) {
- for (PolicyAssertion assertion : assertions) {
- if (assertion.getName().equals(W3CAddressingMetadataConstants.WSAM_ADDRESSING_ASSERTION)) {
- NestedPolicy nestedPolicy = assertion.getNestedPolicy();
- boolean requiresAnonymousResponses = false;
- boolean requiresNonAnonymousResponses = false;
- if (nestedPolicy != null) {
- requiresAnonymousResponses = nestedPolicy.contains(W3CAddressingMetadataConstants.WSAM_ANONYMOUS_NESTED_ASSERTION);
- requiresNonAnonymousResponses = nestedPolicy.contains(W3CAddressingMetadataConstants.WSAM_NONANONYMOUS_NESTED_ASSERTION);
- }
- if(requiresAnonymousResponses && requiresNonAnonymousResponses) {
- throw new WebServiceException("Only one among AnonymousResponses and NonAnonymousResponses can be nested in an Addressing assertion");
- }
-
- final WebServiceFeature feature;
- try {
- if (requiresAnonymousResponses) {
- feature = new AddressingFeature(true, !assertion.isOptional(), AddressingFeature.Responses.ANONYMOUS);
- } else if (requiresNonAnonymousResponses) {
- feature = new AddressingFeature(true, !assertion.isOptional(), AddressingFeature.Responses.NON_ANONYMOUS);
- } else {
- feature = new AddressingFeature(true, !assertion.isOptional());
- }
- } catch (NoSuchMethodError e) {
- throw LOGGER.logSevereException(new PolicyException(ModelerMessages.RUNTIME_MODELER_ADDRESSING_RESPONSES_NOSUCHMETHOD(toJar(Which.which(AddressingFeature.class))), e));
- }
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine("Added addressing feature \"" + feature + "\" for element \"" + key + "\"");
- }
- features.add(feature);
- }
- }
- }
- }
- }
- LOGGER.exiting(features);
- return features;
- }
-
- /**
- * Given the URL String inside jar, returns the URL to the jar itself.
- */
- private static String toJar(String url) {
- if(!url.startsWith("jar:"))
- return url;
- url = url.substring(4); // cut off jar:
- return url.substring(0,url.lastIndexOf('!')); // cut off everything after '!'
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyMapConfigurator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyMapConfigurator.java
deleted file mode 100644
index 1033c5a0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyMapConfigurator.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing.policy;
-
-import com.sun.xml.internal.ws.addressing.W3CAddressingMetadataConstants;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.policy.AssertionSet;
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicySubject;
-import com.sun.xml.internal.ws.policy.jaxws.spi.PolicyMapConfigurator;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.sourcemodel.AssertionData;
-import com.sun.xml.internal.ws.policy.subject.WsdlBindingSubject;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.logging.Level;
-import javax.xml.namespace.QName;
-import javax.xml.ws.soap.AddressingFeature;
-
-/**
- * Generate an addressing policy and updates the PolicyMap if AddressingFeature is enabled.
- *
- * @author Fabian Ritzmann
- * @author Rama Pulavarthi
- */
-public class AddressingPolicyMapConfigurator implements PolicyMapConfigurator {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(AddressingPolicyMapConfigurator.class);
-
- private static final class AddressingAssertion extends PolicyAssertion {
- /**
- * Creates an assertion with nested alternatives.
- *
- * @param assertionData
- * @param nestedAlternative
- */
- AddressingAssertion(AssertionData assertionData, final AssertionSet nestedAlternative) {
- super(assertionData, null, nestedAlternative);
- }
-
- /**
- * Creates an assertion with no nested alternatives.
- *
- * @param assertionData
- */
- AddressingAssertion(AssertionData assertionData) {
- super(assertionData, null, null);
- }
- }
-
-
- /**
- * Puts an addressing policy into the PolicyMap if the addressing feature was set.
- */
- public Collection<PolicySubject> update(final PolicyMap policyMap, final SEIModel model, final WSBinding wsBinding)
- throws PolicyException {
- LOGGER.entering(policyMap, model, wsBinding);
-
- Collection<PolicySubject> subjects = new ArrayList<PolicySubject>();
- if (policyMap != null) {
- final AddressingFeature addressingFeature = wsBinding.getFeature(AddressingFeature.class);
- if (LOGGER.isLoggable(Level.FINEST)) {
- LOGGER.finest("addressingFeature = " + addressingFeature);
- }
- if ((addressingFeature != null) && addressingFeature.isEnabled()) {
- //add wsam:Addrressing assertion if not exists.
- addWsamAddressing(subjects, policyMap, model, addressingFeature);
- }
- } // endif policy map not null
- LOGGER.exiting(subjects);
- return subjects;
- }
-
- private void addWsamAddressing(Collection<PolicySubject> subjects, PolicyMap policyMap, SEIModel model, AddressingFeature addressingFeature)
- throws PolicyException {
- final QName bindingName = model.getBoundPortTypeName();
- final WsdlBindingSubject wsdlSubject = WsdlBindingSubject.createBindingSubject(bindingName);
- final Policy addressingPolicy = createWsamAddressingPolicy(bindingName, addressingFeature);
- final PolicySubject addressingPolicySubject = new PolicySubject(wsdlSubject, addressingPolicy);
- subjects.add(addressingPolicySubject);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine("Added addressing policy with ID \"" + addressingPolicy.getIdOrName() + "\" to binding element \"" + bindingName + "\"");
- }
- }
-
- /**
- * Create a policy with an WSAM Addressing assertion.
- */
- private Policy createWsamAddressingPolicy(final QName bindingName, AddressingFeature af) {
- final ArrayList<AssertionSet> assertionSets = new ArrayList<AssertionSet>(1);
- final ArrayList<PolicyAssertion> assertions = new ArrayList<PolicyAssertion>(1);
- final AssertionData addressingData =
- AssertionData.createAssertionData(W3CAddressingMetadataConstants.WSAM_ADDRESSING_ASSERTION);
- if (!af.isRequired()) {
- addressingData.setOptionalAttribute(true);
- }
- try {
- AddressingFeature.Responses responses = af.getResponses();
- if (responses == AddressingFeature.Responses.ANONYMOUS) {
- AssertionData nestedAsserData = AssertionData.createAssertionData(W3CAddressingMetadataConstants.WSAM_ANONYMOUS_NESTED_ASSERTION);
- PolicyAssertion nestedAsser = new AddressingAssertion(nestedAsserData, null);
- assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(Collections.singleton(nestedAsser))));
- } else if (responses == AddressingFeature.Responses.NON_ANONYMOUS) {
- final AssertionData nestedAsserData = AssertionData.createAssertionData(W3CAddressingMetadataConstants.WSAM_NONANONYMOUS_NESTED_ASSERTION);
- PolicyAssertion nestedAsser = new AddressingAssertion(nestedAsserData, null);
- assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(Collections.singleton(nestedAsser))));
- } else {
- assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(null)));
- }
- } catch (NoSuchMethodError e) {
- //If JAX-WS 2.2 API is really required, it would been reported in @Addressing or wsam:Addressing processing
- //Don't add any nested assertion to mimic the 2.1 behavior
- assertions.add(new AddressingAssertion(addressingData, AssertionSet.createAssertionSet(null)));
- }
- assertionSets.add(AssertionSet.createAssertionSet(assertions));
- return Policy.createPolicy(null, bindingName.getLocalPart() + "_WSAM_Addressing_Policy", assertionSets);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyValidator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyValidator.java
deleted file mode 100644
index 8879306a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyValidator.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing.policy;
-
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.NestedPolicy;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.spi.PolicyAssertionValidator;
-import com.sun.xml.internal.ws.addressing.W3CAddressingMetadataConstants;
-
-import java.util.ArrayList;
-import javax.xml.namespace.QName;
-
-
-/**
- * This class validates the Addressing assertions.
- * If the assertion is wsam:Addressing, it makes sure that only valid assertions are nested.
- *
- * @author japod
- * @author Rama Pulavarthi
- */
-public class AddressingPolicyValidator implements PolicyAssertionValidator {
-
- private static final ArrayList<QName> supportedAssertions = new ArrayList<QName>();
-
- static {
- supportedAssertions.add(new QName(AddressingVersion.MEMBER.policyNsUri, "UsingAddressing"));
- supportedAssertions.add(W3CAddressingMetadataConstants.WSAM_ADDRESSING_ASSERTION);
- supportedAssertions.add(W3CAddressingMetadataConstants.WSAM_ANONYMOUS_NESTED_ASSERTION);
- supportedAssertions.add(W3CAddressingMetadataConstants.WSAM_NONANONYMOUS_NESTED_ASSERTION);
- }
-
- /**
- * Creates a new instance of AddressingPolicyValidator
- */
- public AddressingPolicyValidator() {
- }
-
- public Fitness validateClientSide(PolicyAssertion assertion) {
- return supportedAssertions.contains(assertion.getName()) ? Fitness.SUPPORTED : Fitness.UNKNOWN;
- }
-
- public Fitness validateServerSide(PolicyAssertion assertion) {
- if (!supportedAssertions.contains(assertion.getName()))
- return Fitness.UNKNOWN;
-
- //Make sure wsam:Addressing contains only one of the allowed nested assertions.
- if (assertion.getName().equals(W3CAddressingMetadataConstants.WSAM_ADDRESSING_ASSERTION)) {
- NestedPolicy nestedPolicy = assertion.getNestedPolicy();
- if (nestedPolicy != null) {
- boolean requiresAnonymousResponses = false;
- boolean requiresNonAnonymousResponses = false;
- for (PolicyAssertion nestedAsser : nestedPolicy.getAssertionSet()) {
- if (nestedAsser.getName().equals(W3CAddressingMetadataConstants.WSAM_ANONYMOUS_NESTED_ASSERTION)) {
- requiresAnonymousResponses = true;
- } else if (nestedAsser.getName().equals(W3CAddressingMetadataConstants.WSAM_NONANONYMOUS_NESTED_ASSERTION)) {
- requiresNonAnonymousResponses = true;
- } else {
- LOGGER.warning("Found unsupported assertion:\n" + nestedAsser + "\nnested into assertion:\n" + assertion);
- return Fitness.UNSUPPORTED;
- }
- }
-
- if (requiresAnonymousResponses && requiresNonAnonymousResponses) {
- LOGGER.warning("Only one among AnonymousResponses and NonAnonymousResponses can be nested in an Addressing assertion");
- return Fitness.INVALID;
- }
- }
- }
-
- return Fitness.SUPPORTED;
- }
-
- public String[] declareSupportedDomains() {
- return new String[]{AddressingVersion.MEMBER.policyNsUri, AddressingVersion.W3C.policyNsUri, W3CAddressingMetadataConstants.WSAM_NAMESPACE_NAME};
- }
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(AddressingPolicyValidator.class);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPrefixMapper.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPrefixMapper.java
deleted file mode 100644
index 5dcd9b51..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPrefixMapper.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing.policy;
-
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.policy.spi.PrefixMapper;
-import com.sun.xml.internal.ws.addressing.W3CAddressingMetadataConstants;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * This supplies the prefixes for the namespaces under Addressing domain.
- *
- * @author Fabian Ritzmann
- * @author Rama Pulavarthi
- */
-public class AddressingPrefixMapper implements PrefixMapper {
-
- private static final Map<String, String> prefixMap = new HashMap<String, String>();
-
- static {
- prefixMap.put(AddressingVersion.MEMBER.policyNsUri, "wsap");
- prefixMap.put(AddressingVersion.MEMBER.nsUri, "wsa");
- prefixMap.put(W3CAddressingMetadataConstants.WSAM_NAMESPACE_NAME,W3CAddressingMetadataConstants.WSAM_PREFIX_NAME);
- }
-
- public Map<String, String> getPrefixMap() {
- return prefixMap;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionAddressingConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionAddressingConstants.java
deleted file mode 100644
index b0e38d29..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionAddressingConstants.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing.v200408;
-
-import javax.xml.namespace.QName;
-
-/**
- * Constants for Member Submission WS-Addressing version
- *
- * @author Arun Gupta
- */
-public interface MemberSubmissionAddressingConstants {
- public static final String WSA_NAMESPACE_NAME = "http://schemas.xmlsoap.org/ws/2004/08/addressing";
- public static final String WSA_NAMESPACE_WSDL_NAME = WSA_NAMESPACE_NAME;
- public static final String WSA_NAMESPACE_POLICY_NAME = "http://schemas.xmlsoap.org/ws/2004/08/addressing/policy";
-
- public static final QName WSA_ACTION_QNAME = new QName(WSA_NAMESPACE_NAME,"Action");
-
- public static final String WSA_SERVICENAME_NAME = "ServiceName";
- public static final String WSA_PORTTYPE_NAME = "PortType";
- public static final String WSA_PORTNAME_NAME = "PortName";
-
- public static final String WSA_ADDRESS_NAME = "Address";
- public static final QName WSA_ADDRESS_QNAME = new QName(WSA_NAMESPACE_NAME, WSA_ADDRESS_NAME);
-
- public static final String WSA_EPR_NAME = "EndpointReference";
- public static final QName WSA_EPR_QNAME = new QName(WSA_NAMESPACE_NAME, WSA_EPR_NAME);
-
- public static final String WSA_ANONYMOUS_ADDRESS = WSA_NAMESPACE_NAME + "/role/anonymous";
- public static final String WSA_NONE_ADDRESS = "";
-
- public static final String WSA_DEFAULT_FAULT_ACTION = WSA_NAMESPACE_NAME + "/fault";
-
- public static final QName INVALID_MAP_QNAME = new QName(WSA_NAMESPACE_NAME, "InvalidMessageInformationHeader");
- public static final QName MAP_REQUIRED_QNAME = new QName(WSA_NAMESPACE_NAME, "MessageInformationHeaderRequired");
- public static final QName DESTINATION_UNREACHABLE_QNAME = new QName(WSA_NAMESPACE_NAME, "DestinationUnreachable");
- public static final QName ACTION_NOT_SUPPORTED_QNAME = new QName(WSA_NAMESPACE_NAME, "ActionNotSupported");
- public static final QName ENDPOINT_UNAVAILABLE_QNAME = new QName(WSA_NAMESPACE_NAME, "EndpointUnavailable");
-
- public static final String ACTION_NOT_SUPPORTED_TEXT = "The \"%s\" cannot be processed at the receiver.";
- public static final String DESTINATION_UNREACHABLE_TEXT = "No route can be determined to reach the destination role defined by the WS-Addressing To.";
- public static final String ENDPOINT_UNAVAILABLE_TEXT = "The endpoint is unable to process the message at this time.";
- public static final String INVALID_MAP_TEXT = "A message information header is not valid and the message cannot be processed.";
- public static final String MAP_REQUIRED_TEXT = "A required message information header, To, MessageID, or Action, is not present.";
-
- public static final QName PROBLEM_ACTION_QNAME = new QName(WSA_NAMESPACE_NAME, "ProblemAction");
- public static final QName PROBLEM_HEADER_QNAME_QNAME = new QName(WSA_NAMESPACE_NAME, "ProblemHeaderQName");
- public static final QName FAULT_DETAIL_QNAME = new QName(WSA_NAMESPACE_NAME, "FaultDetail");
-
- public
- static final String ANONYMOUS_EPR = "<EndpointReference xmlns=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">\n"+
- " <Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</Address>\n"+
- "</EndpointReference>";
-
- public static final QName MEX_METADATA = new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Metadata","mex");
- public static final QName MEX_METADATA_SECTION = new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "MetadataSection","mex");
- public static final String MEX_METADATA_DIALECT_ATTRIBUTE = "Dialect";
- public static final String MEX_METADATA_DIALECT_VALUE = "http://schemas.xmlsoap.org/wsdl/";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaClientTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaClientTube.java
deleted file mode 100644
index 755fa614..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaClientTube.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.addressing.v200408;
-
-import com.sun.xml.internal.ws.addressing.WsaClientTube;
-import com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.AddressingUtils;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.developer.MemberSubmissionAddressing;
-import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature;
-
-/**
- * @author Rama Pulavarthi
- */
-public class MemberSubmissionWsaClientTube extends WsaClientTube {
- private final MemberSubmissionAddressing.Validation validation;
-
- public MemberSubmissionWsaClientTube(WSDLPort wsdlPort, WSBinding binding, Tube next) {
- super(wsdlPort, binding, next);
- validation = binding.getFeature(MemberSubmissionAddressingFeature.class).getValidation();
-
- }
-
- public MemberSubmissionWsaClientTube(MemberSubmissionWsaClientTube that, TubeCloner cloner) {
- super(that, cloner);
- this.validation = that.validation;
-
- }
- public MemberSubmissionWsaClientTube copy(TubeCloner cloner) {
- return new MemberSubmissionWsaClientTube(this, cloner);
- }
-
- @Override
- protected void checkMandatoryHeaders(Packet packet, boolean foundAction, boolean foundTo, boolean foundReplyTo,
- boolean foundFaultTo, boolean foundMessageID, boolean foundRelatesTo) {
- super.checkMandatoryHeaders(packet,foundAction,foundTo,foundReplyTo,foundFaultTo,foundMessageID,foundRelatesTo);
-
- // if no wsa:To header is found
- if (!foundTo) {
- throw new MissingAddressingHeaderException(addressingVersion.toTag,packet);
- }
-
- if (!validation.equals(MemberSubmissionAddressing.Validation.LAX)) {
-
- // if it is not one-way, response must contain wsa:RelatesTo
- // RelatesTo required as per
- // Table 5-3 of http://www.w3.org/TR/2006/WD-ws-addr-wsdl-20060216/#wsdl11requestresponse
- if (expectReply && (packet.getMessage() != null) && !foundRelatesTo) {
- String action = AddressingUtils.getAction(packet.getMessage().getHeaders(), addressingVersion, soapVersion);
- // Don't check for AddressingFaults as
- // Faults for requests with duplicate MessageId will have no wsa:RelatesTo
- if (!packet.getMessage().isFault() || !action.equals(addressingVersion.getDefaultFaultAction())) {
- throw new MissingAddressingHeaderException(addressingVersion.relatesToTag,packet);
- }
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaServerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaServerTube.java
deleted file mode 100644
index c4c03b65..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaServerTube.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing.v200408;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.addressing.WsaServerTube;
-import com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.developer.MemberSubmissionAddressing;
-import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature;
-
-/**
- * @author Rama Pulavarthi
- */
-public class MemberSubmissionWsaServerTube extends WsaServerTube {
- private final MemberSubmissionAddressing.Validation validation;
- public MemberSubmissionWsaServerTube(WSEndpoint endpoint, @NotNull WSDLPort wsdlPort, WSBinding binding, Tube next) {
- super(endpoint, wsdlPort, binding, next);
- validation = binding.getFeature(MemberSubmissionAddressingFeature.class).getValidation();
- }
-
- public MemberSubmissionWsaServerTube(MemberSubmissionWsaServerTube that, TubeCloner cloner) {
- super(that, cloner);
- this.validation = that.validation;
- }
-
- @Override
- public MemberSubmissionWsaServerTube copy(TubeCloner cloner) {
- return new MemberSubmissionWsaServerTube(this, cloner);
- }
-
- @Override
- protected void checkMandatoryHeaders(Packet packet, boolean foundAction, boolean foundTo, boolean foundReplyTo,
- boolean foundFaultTo, boolean foundMessageId, boolean foundRelatesTo) {
-
- super.checkMandatoryHeaders(packet, foundAction, foundTo, foundReplyTo,
- foundFaultTo, foundMessageId, foundRelatesTo);
-
- // if no wsa:To header is found
- if (!foundTo)
- throw new MissingAddressingHeaderException(addressingVersion.toTag,packet);
-
- //we can find Req/Response or Oneway only with WSDLModel
- if (wsdlPort != null) {
- WSDLBoundOperation wbo = getWSDLBoundOperation(packet);
- // if two-way, must contain wsa:ReplyTo
- // Unlike W3C version, we cannot assume default value as anonymous if not present.
- // For protocol messages, don't check as they do not have any corresponding wsdl operations
- if (wbo != null && !wbo.getOperation().isOneWay() && !foundReplyTo) {
- throw new MissingAddressingHeaderException(addressingVersion.replyToTag,packet);
- }
- }
- if (!validation.equals(MemberSubmissionAddressing.Validation.LAX)) {
- // wsa:MessageId is required if wsa:ReplyTo is present.
- if ((foundReplyTo || foundFaultTo) && !foundMessageId)
- throw new MissingAddressingHeaderException(addressingVersion.messageIDTag,packet);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemAction.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemAction.java
deleted file mode 100644
index 597377c2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemAction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing.v200408;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import static com.sun.xml.internal.ws.addressing.v200408.MemberSubmissionAddressingConstants.WSA_NAMESPACE_NAME;
-/**
- * @author Arun Gupta
- */
-@XmlRootElement(name="ProblemAction", namespace= WSA_NAMESPACE_NAME)
-public class ProblemAction {
-
- @XmlElement(name="Action", namespace= WSA_NAMESPACE_NAME)
- private String action;
-
- @XmlElement(name="SoapAction", namespace=WSA_NAMESPACE_NAME)
- private String soapAction;
-
- /** Creates a new instance of ProblemAction */
- public ProblemAction() {
- }
-
- public ProblemAction(String action) {
- this.action = action;
- }
-
- public ProblemAction(String action, String soapAction) {
- this.action = action;
- this.soapAction = soapAction;
- }
-
- public String getAction() {
- return action;
- }
-
- public String getSoapAction() {
- return soapAction;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemHeaderQName.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemHeaderQName.java
deleted file mode 100644
index 2fed08ba..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemHeaderQName.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing.v200408;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.namespace.QName;
-
-import static com.sun.xml.internal.ws.addressing.v200408.MemberSubmissionAddressingConstants.WSA_NAMESPACE_NAME;
-
-/**
- * @author Arun Gupta
- */
-@XmlRootElement(name="ProblemHeaderQName", namespace= WSA_NAMESPACE_NAME)
-public class ProblemHeaderQName {
- @XmlValue
- private QName value;
-
- /** Creates a new instance of ProblemHeaderQName */
- public ProblemHeaderQName() {
- }
-
- public ProblemHeaderQName(QName name) {
- this.value = name;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/WsaTubeHelperImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/WsaTubeHelperImpl.java
deleted file mode 100644
index 32bbca00..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/WsaTubeHelperImpl.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing.v200408;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-
-import com.sun.xml.internal.ws.addressing.WsaTubeHelper;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import org.w3c.dom.Element;
-
-/**
- * @author Arun Gupta
- */
-public class WsaTubeHelperImpl extends WsaTubeHelper {
- static final JAXBContext jc;
-
- static {
- try {
- jc = JAXBContext.newInstance(ProblemAction.class,
- ProblemHeaderQName.class);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
- }
-
- public WsaTubeHelperImpl(WSDLPort wsdlPort, SEIModel seiModel, WSBinding binding) {
- super(binding,seiModel,wsdlPort);
- }
-
- private Marshaller createMarshaller() throws JAXBException {
- Marshaller marshaller = jc.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
- return marshaller;
- }
-
- @Override
- public final void getProblemActionDetail(String action, Element element) {
- ProblemAction pa = new ProblemAction(action);
- try {
- createMarshaller().marshal(pa, element);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
- }
-
- @Override
- public final void getInvalidMapDetail(QName name, Element element) {
- ProblemHeaderQName phq = new ProblemHeaderQName(name);
- try {
- createMarshaller().marshal(phq, element);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
- }
-
- @Override
- public final void getMapRequiredDetail(QName name, Element element) {
- getInvalidMapDetail(name, element);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingID.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingID.java
deleted file mode 100644
index 9ef2aea8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingID.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.binding.SOAPBindingImpl;
-import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
-import com.sun.xml.internal.ws.encoding.SOAPBindingCodec;
-import com.sun.xml.internal.ws.encoding.XMLHTTPBindingCodec;
-import com.sun.xml.internal.ws.encoding.soap.streaming.SOAPNamespaceConstants;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import com.sun.xml.internal.ws.developer.JAXWSProperties;
-
-import javax.xml.ws.BindingType;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.http.HTTPBinding;
-import javax.xml.ws.soap.MTOMFeature;
-import javax.xml.ws.soap.SOAPBinding;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URL;
-import java.net.URLDecoder;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Parsed binding ID string.
- *
- * <p>
- * {@link BindingID} is an immutable object that represents a binding ID,
- * much like how {@link URL} is a representation of an URL.
- * Like {@link URL}, this class offers a bunch of methods that let you
- * query various traits/properties of a binding ID.
- *
- * <p>
- * {@link BindingID} is extensible; one can plug in a parser from
- * {@link String} to {@link BindingID} to interpret binding IDs that
- * the JAX-WS RI does no a-priori knowledge of.
- * Technologies such as Tango uses this to make the JAX-WS RI understand
- * binding IDs defined in their world.
- *
- * Such technologies are free to extend this class and expose more characterstics.
- *
- * <p>
- * Even though this class defines a few well known constants, {@link BindingID}
- * instances do not necessarily have singleton semantics. Use {@link #equals(Object)}
- * for the comparison.
- *
- * <h3>{@link BindingID} and {@link WSBinding}</h3>
- * <p>
- * {@link WSBinding} is mutable and represents a particular "use" of a {@link BindingID}.
- * As such, it has state like a list of {@link Handler}s, which are inherently local
- * to a particular usage. For example, if you have two proxies, you need two instances.
- *
- * {@link BindingID}, OTOH, is immutable and thus the single instance
- * that represents "SOAP1.2/HTTP" can be shared and reused by all proxies in the same VM.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class BindingID {
-
- /**
- * Creates an instance of {@link WSBinding} (which is conceptually an "use"
- * of {@link BindingID}) from a {@link BindingID}.
- *
- * @return
- * Always a new instance.
- */
- public final @NotNull WSBinding createBinding() {
- return BindingImpl.create(this);
- }
-
- /**
- * Returns wsdl:binding@transport attribute. Sub classes
- * are expected to override this method to provide their transport
- * attribute.
- *
- * @return wsdl:binding@transport attribute
- * @since JAX-WS RI 2.1.6
- */
- public @NotNull String getTransport() {
- return SOAPNamespaceConstants.TRANSPORT_HTTP;
- }
-
- public final @NotNull WSBinding createBinding(WebServiceFeature... features) {
- return BindingImpl.create(this, features);
- }
-
- public final @NotNull WSBinding createBinding(WSFeatureList features) {
- return createBinding(features.toArray());
- }
-
- /**
- * Gets the SOAP version of this binding.
- *
- * TODO: clarify what to do with XML/HTTP binding
- *
- * @return
- * If the binding is using SOAP, this method returns
- * a {@link SOAPVersion} constant.
- *
- * If the binding is not based on SOAP, this method
- * returns null. See {@link Message} for how a non-SOAP
- * binding shall be handled by {@link Tube}s.
- */
- public abstract SOAPVersion getSOAPVersion();
-
- /**
- * Creates a new {@link Codec} for this binding.
- *
- * @param binding
- * Ocassionally some aspects of binding can be overridden by
- * {@link WSBinding} at runtime by users, so some {@link Codec}s
- * need to have access to {@link WSBinding} that it's working for.
- */
- public abstract @NotNull Codec createEncoder(@NotNull WSBinding binding);
-
- /**
- * Gets the binding ID, which uniquely identifies the binding.
- *
- * <p>
- * The relevant specs define the binding IDs and what they mean.
- * The ID is used in many places to identify the kind of binding
- * (such as SOAP1.1, SOAP1.2, REST, ...)
- *
- * @return
- * Always non-null same value.
- */
- @Override
- public abstract String toString();
-
- /**
- * Returna a new {@link WebServiceFeatureList} instance
- * that represents the features that are built into this binding ID.
- *
- * <p>
- * For example, {@link BindingID} for
- * <tt>"{@value SOAPBinding#SOAP11HTTP_MTOM_BINDING}"</tt>
- * would always return a list that has {@link MTOMFeature} enabled.
- */
- public WebServiceFeatureList createBuiltinFeatureList() {
- return new WebServiceFeatureList();
- }
-
- /**
- * Returns true if this binding can generate WSDL.
- *
- * <p>
- * For e.g.: SOAP 1.1 and "XSOAP 1.2" is supposed to return true
- * from this method. For SOAP1.2, there is no standard WSDL, so the
- * runtime is not generating one and it expects the WSDL is packaged.
- *
- */
- public boolean canGenerateWSDL() {
- return false;
- }
-
- /**
- * Returns a parameter of this binding ID.
- *
- * <p>
- * Some binding ID, such as those for SOAP/HTTP, uses the URL
- * query syntax (like <tt>?mtom=true</tt>) to control
- * the optional part of the binding. This method obtains
- * the value for such optional parts.
- *
- * <p>
- * For implementors of the derived classes, if your binding ID
- * does not define such optional parts (such as the XML/HTTP binding ID),
- * then you should simply return the specified default value
- * (which is what this implementation does.)
- *
- * @param parameterName
- * The parameter name, such as "mtom" in the above example.
- * @param defaultValue
- * If this binding ID doesn't have the specified parameter explicitly,
- * this value will be returned.
- *
- * @return
- * the value of the parameter, if it's present (such as "true"
- * in the above example.) If not present, this method returns
- * the {@code defaultValue}.
- */
- public String getParameter(String parameterName, String defaultValue) {
- return defaultValue;
- }
-
- /**
- * Compares the equality based on {@link #toString()}.
- */
- @Override
- public boolean equals(Object obj) {
- if(!(obj instanceof BindingID))
- return false;
- return toString().equals(obj.toString());
- }
-
- @Override
- public int hashCode() {
- return toString().hashCode();
- }
-
- /**
- * Parses a binding ID string into a {@link BindingID} object.
- *
- * <p>
- * This method first checks for a few known values and then delegate
- * the parsing to {@link BindingIDFactory}.
- *
- * <p>
- * If parsing succeeds this method returns a value. Otherwise
- * throws {@link WebServiceException}.
- *
- * @throws WebServiceException
- * If the binding ID is not understood.
- */
- public static @NotNull BindingID parse(String lexical) {
- if(lexical.equals(XML_HTTP.toString()))
- return XML_HTTP;
- if(lexical.equals(REST_HTTP.toString()))
- return REST_HTTP;
- if(belongsTo(lexical,SOAP11_HTTP.toString()))
- return customize(lexical,SOAP11_HTTP);
- if(belongsTo(lexical,SOAP12_HTTP.toString()))
- return customize(lexical,SOAP12_HTTP);
- if(belongsTo(lexical,SOAPBindingImpl.X_SOAP12HTTP_BINDING))
- return customize(lexical,X_SOAP12_HTTP);
-
- // OK, it's none of the values JAX-WS understands.
- for( BindingIDFactory f : ServiceFinder.find(BindingIDFactory.class) ) {
- BindingID r = f.parse(lexical);
- if(r!=null)
- return r;
- }
-
- // nobody understood this value
- throw new WebServiceException("Wrong binding ID: "+lexical);
- }
-
- private static boolean belongsTo(String lexical, String id) {
- return lexical.equals(id) || lexical.startsWith(id+'?');
- }
-
- /**
- * Parses parameter portion and returns appropriately populated {@link SOAPHTTPImpl}
- */
- private static SOAPHTTPImpl customize(String lexical, SOAPHTTPImpl base) {
- if(lexical.equals(base.toString()))
- return base;
-
- // otherwise we must have query parameter
- // we assume the spec won't define any tricky parameters that require
- // complicated handling (such as %HH or non-ASCII char), so this parser
- // is quite simple-minded.
- SOAPHTTPImpl r = new SOAPHTTPImpl(base.getSOAPVersion(), lexical, base.canGenerateWSDL());
- try {
- // With X_SOAP12_HTTP, base != lexical and lexical does n't have any query string
- if(lexical.indexOf('?') == -1) {
- return r;
- }
- String query = URLDecoder.decode(lexical.substring(lexical.indexOf('?')+1),"UTF-8");
- for( String token : query.split("&") ) {
- int idx = token.indexOf('=');
- if(idx<0)
- throw new WebServiceException("Malformed binding ID (no '=' in "+token+")");
- r.parameters.put(token.substring(0,idx),token.substring(idx+1));
- }
- } catch (UnsupportedEncodingException e) {
- throw new AssertionError(e); // UTF-8 is supported everywhere
- }
-
- return r;
- }
-
-
- /**
- * Figures out the binding from {@link BindingType} annotation.
- *
- * @return
- * default to {@link BindingID#SOAP11_HTTP}, if no such annotation is present.
- * @see #parse(String)
- */
- public static @NotNull BindingID parse(Class<?> implClass) {
- BindingType bindingType = implClass.getAnnotation(BindingType.class);
- if (bindingType != null) {
- String bindingId = bindingType.value();
- if (bindingId.length() > 0) {
- return BindingID.parse(bindingId);
- }
- }
- return SOAP11_HTTP;
- }
-
- /**
- * Constant that represents implementation specific SOAP1.2/HTTP which is
- * used to generate non-standard WSDLs
- */
- public static final SOAPHTTPImpl X_SOAP12_HTTP = new SOAPHTTPImpl(
- SOAPVersion.SOAP_12, SOAPBindingImpl.X_SOAP12HTTP_BINDING, true);
-
- /**
- * Constant that represents SOAP1.2/HTTP.
- */
- public static final SOAPHTTPImpl SOAP12_HTTP = new SOAPHTTPImpl(
- SOAPVersion.SOAP_12, SOAPBinding.SOAP12HTTP_BINDING, true);
- /**
- * Constant that represents SOAP1.1/HTTP.
- */
- public static final SOAPHTTPImpl SOAP11_HTTP = new SOAPHTTPImpl(
- SOAPVersion.SOAP_11, SOAPBinding.SOAP11HTTP_BINDING, true);
-
- /**
- * Constant that represents SOAP1.2/HTTP.
- */
- public static final SOAPHTTPImpl SOAP12_HTTP_MTOM = new SOAPHTTPImpl(
- SOAPVersion.SOAP_12, SOAPBinding.SOAP12HTTP_MTOM_BINDING, true, true);
- /**
- * Constant that represents SOAP1.1/HTTP.
- */
- public static final SOAPHTTPImpl SOAP11_HTTP_MTOM = new SOAPHTTPImpl(
- SOAPVersion.SOAP_11, SOAPBinding.SOAP11HTTP_MTOM_BINDING, true, true);
-
-
- /**
- * Constant that represents REST.
- */
- public static final BindingID XML_HTTP = new Impl(SOAPVersion.SOAP_11, HTTPBinding.HTTP_BINDING,false) {
- @Override
- public Codec createEncoder(WSBinding binding) {
- return new XMLHTTPBindingCodec(binding.getFeatures());
- }
- };
-
- /**
- * Constant that represents REST.
- */
- private static final BindingID REST_HTTP = new Impl(SOAPVersion.SOAP_11, JAXWSProperties.REST_BINDING,true) {
- @Override
- public Codec createEncoder(WSBinding binding) {
- return new XMLHTTPBindingCodec(binding.getFeatures());
- }
- };
-
- private static abstract class Impl extends BindingID {
- final SOAPVersion version;
- private final String lexical;
- private final boolean canGenerateWSDL;
-
- public Impl(SOAPVersion version, String lexical, boolean canGenerateWSDL) {
- this.version = version;
- this.lexical = lexical;
- this.canGenerateWSDL = canGenerateWSDL;
- }
-
- @Override
- public SOAPVersion getSOAPVersion() {
- return version;
- }
-
- @Override
- public String toString() {
- return lexical;
- }
-
- @Deprecated
- @Override
- public boolean canGenerateWSDL() {
- return canGenerateWSDL;
- }
- }
-
- /**
- * Internal implementation for SOAP/HTTP.
- */
- private static final class SOAPHTTPImpl extends Impl implements Cloneable {
- /*final*/ Map<String,String> parameters = new HashMap<String,String>();
-
- static final String MTOM_PARAM = "mtom";
-
- public SOAPHTTPImpl(SOAPVersion version, String lexical, boolean canGenerateWSDL) {
- super(version, lexical, canGenerateWSDL);
- }
-
- public SOAPHTTPImpl(SOAPVersion version, String lexical, boolean canGenerateWSDL,
- boolean mtomEnabled) {
- this(version, lexical, canGenerateWSDL);
- String mtomStr = mtomEnabled ? "true" : "false";
- parameters.put(MTOM_PARAM, mtomStr);
- }
-
- public @NotNull @Override Codec createEncoder(WSBinding binding) {
- return new SOAPBindingCodec(binding.getFeatures());
- }
-
- private Boolean isMTOMEnabled() {
- String mtom = parameters.get(MTOM_PARAM);
- return mtom==null?null:Boolean.valueOf(mtom);
- }
-
- @Override
- public WebServiceFeatureList createBuiltinFeatureList() {
- WebServiceFeatureList r=super.createBuiltinFeatureList();
- Boolean mtom = isMTOMEnabled();
- if(mtom != null)
- r.add(new MTOMFeature(mtom));
- return r;
- }
-
- @Override
- public String getParameter(String parameterName, String defaultValue) {
- if (parameters.get(parameterName) == null)
- return super.getParameter(parameterName, defaultValue);
- return parameters.get(parameterName);
- }
-
- @Override
- public SOAPHTTPImpl clone() throws CloneNotSupportedException {
- return (SOAPHTTPImpl) super.clone();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingIDFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingIDFactory.java
deleted file mode 100644
index 802be8dd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingIDFactory.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.NotNull;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * Extension point to plug in additional {@link BindingID} parsing logic.
- *
- * <p>
- * When the JAX-WS RI is asked to parse a binding ID string into a {@link BindingID}
- * object, it uses service idiom to look for the implementations of this class
- * in the <tt>META-INF/services/...</tt>.
- *
- * @since JAX-WS 2.0.next
- * @author Kohsuke Kawaguchi
- * @see BindingID#parse(String)
- */
-public abstract class BindingIDFactory {
- /**
- * Parses a binding ID string into {@link BindingID} if possible.
- *
- * @return
- * a non-null return value would cause the JAX-WS RI to consider
- * the parsing to be successful. No furhter {@link BindingIDFactory}
- * will be consulted.
- *
- * <p>
- * Retruning a null value indicates that this factory doesn't understand
- * this string, in which case the JAX-WS RI will keep asking next
- * {@link BindingIDFactory}.
- *
- * @throws WebServiceException
- * if the implementation understood the lexical value but it is not correct,
- * this exception can be thrown to abort the parsing with error.
- * No further {@link BindingIDFactory} will be consulted, and
- * {@link BindingID#parse(String)} will throw the exception.
- */
- public abstract @Nullable BindingID parse(@NotNull String lexical) throws WebServiceException;
-
- /**
- * Creates a {@link BindingID} for given transport and SOAPVersion.
- *
- * @return
- * a non-null return value would cause the JAX-WS RI to consider
- * the creation to be successful. No furhter {@link BindingIDFactory}
- * will be consulted.
- *
- * <p>
- * Retruning a null value indicates that this factory doesn't understand
- * the transport, in which case the JAX-WS RI will keep asking next
- * {@link BindingIDFactory}.
- *
- * @throws WebServiceException
- * if the implementation understood the transport but it is not correct,
- * this exception can be thrown to abort the creation with error.
- * No further {@link BindingIDFactory} will be consulted, and
- * {@link BindingID#create(String, SOAPVersion)} will throw the exception.
- */
- public @Nullable BindingID create(@NotNull String transport, @NotNull SOAPVersion soapVersion) throws WebServiceException {
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/Cancelable.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/Cancelable.java
deleted file mode 100644
index 5cb71bb0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/Cancelable.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-/**
- * Interface for tasks that may be cancelled
- *
- * @since 2.2.6
- */
-public interface Cancelable {
- /**
- * Attempts to cancel execution of this task. This attempt will
- * fail if the task has already completed, has already been cancelled,
- * or could not be cancelled for some other reason. If successful,
- * and this task has not started when <tt>cancel</tt> is called,
- * this task should never run. If the task has already started,
- * then the <tt>mayInterruptIfRunning</tt> parameter determines
- * whether the thread executing this task should be interrupted in
- * an attempt to stop the task.
- *
- * @param mayInterruptIfRunning <tt>true</tt> if the thread executing this
- * task should be interrupted; otherwise, in-progress tasks are allowed
- * to complete
- * @return <tt>false</tt> if the task could not be cancelled,
- * typically because it has already completed normally;
- * <tt>true</tt> otherwise
- */
- public void cancel(boolean mayInterruptIfRunning);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/Component.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/Component.java
deleted file mode 100644
index 296eea6d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/Component.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-
-/**
- * Interface that allows components to hook up with each other.
- * Replaces {@link com.sun.xml.internal.ws.api.server.EndpointComponent} so that component
- * pattern can apply to more RI types.
- *
- * @since 2.2.6
- * @see WSEndpoint#getComponents()
- * @see ComponentRegistry
- */
-public interface Component {
- /**
- * Gets the specified SPI.
- *
- * <p>
- * This method works as a kind of directory service
- * for SPIs, allowing various components to define private contract
- * and talk to each other.
- *
- * @return
- * null if such an SPI is not provided by this object.
- */
- @Nullable <S> S getSPI(@NotNull Class<S> spiType);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentEx.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentEx.java
deleted file mode 100644
index 1185fdbe..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentEx.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.istack.internal.NotNull;
-
-/**
- * Extended version of {@link Component}. Allows component to return multiple
- * SPI implementations through an {@link Iterable}.
- *
- * @since 2.2.6
- */
-public interface ComponentEx extends Component {
- /**
- * Gets an iterator of implementations of the specified SPI.
- *
- * <p>
- * This method works as a kind of directory service
- * for SPIs, allowing various components to define private contract
- * and talk to each other. However unlike {@link Component#getSPI(java.lang.Class)}, this
- * method can support cases where there is an ordered collection (defined
- * by {@link Iterable} of implementations. The SPI contract should define
- * whether lookups are for the first appropriate implementation or whether
- * all returned implementations should be used.
- *
- * @return
- * non-null {@link Iterable} of the SPI's provided by this object. Iterator may have no values.
- */
- @NotNull <S> Iterable<S> getIterableSPI(@NotNull Class<S> spiType);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentFeature.java
deleted file mode 100644
index ab455bfe..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentFeature.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.client.Stub;
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * Allows registration of a {@link Component} against the {@link ComponentRegistry} implementations
- * of the {@link Container}, {@link WSEndpoint}, {@link WSService}, or {@link Stub}. The
- * registration is guaranteed to occur early in the initialization of these objects prior to tubeline creation
- * (applicable to endpoint and stub only).
- * <p>
- * Because the Container is shared among all Stubs created from a common WSService object, this feature must
- * be passed during WSService initialization in order to register a Component against the client-side Container.
- * <p>
- * IllegalArgumentException will be thrown if the feature is used with an inappropriate target, e.g. stub target
- * used during WSEndpoint initialization.
- *
- * @since 2.2.6
- */
-public class ComponentFeature extends WebServiceFeature implements ServiceSharedFeatureMarker {
- /**
- * Targets the object on which the Component will be registered
- *
- */
- public static enum Target {
- CONTAINER, ENDPOINT, SERVICE, STUB
- }
-
- private final Component component;
- private final Target target;
-
- /**
- * Constructs ComponentFeature with indicated component and that is targeted at the Container.
- * @param component component
- */
- public ComponentFeature(Component component) {
- this(component, Target.CONTAINER);
- }
-
- /**
- * Constructs ComponentFeature with indicated component and target
- * @param component component
- * @param target target
- */
- public ComponentFeature(Component component, Target target) {
- this.enabled = true;
- this.component = component;
- this.target = target;
- }
-
- @Override
- public String getID() {
- return ComponentFeature.class.getName();
- }
-
- /**
- * Retrieves component
- * @return component
- */
- public Component getComponent() {
- return component;
- }
-
- /**
- * Retrieves target
- * @return target
- */
- public Target getTarget() {
- return target;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentRegistry.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentRegistry.java
deleted file mode 100644
index faa47f06..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentRegistry.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import java.util.Set;
-
-import com.sun.istack.internal.NotNull;
-
-/**
- * Registry for component delegates. It is expected that implementations of
- * ComponentRegistry will delegate to registered {@link Component}s in its own
- * implementation of {@link Component#getSPI(java.lang.Class)}, either before or after it
- * considers its own SPI implementations.
- *
- * @since 2.2.6
- */
-public interface ComponentRegistry extends Component {
- /**
- * Returns the set of {@link Component}s registered with this object
- * @return set of registered components
- */
- public @NotNull Set<Component> getComponents();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentsFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentsFeature.java
deleted file mode 100644
index 4e0488c5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentsFeature.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import java.util.List;
-
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.client.Stub;
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * Allows registration of multiple {@link Component}s against the {@link ComponentRegistry} implementations
- * of the {@link Container}, {@link WSEndpoint}, {@link WSService}, or {@link Stub}. The
- * registration is guaranteed to occur early in the initialization of these objects prior to tubeline creation
- * (applicable to endpoint and stub only).
- * <p>
- * Because the Container is shared among all Stubs created from a common WSService object, this feature must
- * be passed during WSService initialization in order to register a Component against the client-side Container.
- * <p>
- * IllegalArgumentException will be thrown if the feature is used with an inappropriate target, e.g. stub target
- * used during WSEndpoint initialization.
- *
- * @since 2.2.8
- */
-public class ComponentsFeature extends WebServiceFeature implements ServiceSharedFeatureMarker {
- private final List<ComponentFeature> componentFeatures;
-
- /**
- * Constructs ComponentFeature with indicated component and target
- * @param component component
- * @param target target
- */
- public ComponentsFeature(List<ComponentFeature> componentFeatures) {
- this.enabled = true;
- this.componentFeatures = componentFeatures;
- }
-
- @Override
- public String getID() {
- return ComponentsFeature.class.getName();
- }
-
- /**
- * Retrieves component
- * @return component
- */
- public List<ComponentFeature> getComponentFeatures() {
- return componentFeatures;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/DistributedPropertySet.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/DistributedPropertySet.java
deleted file mode 100644
index 90a96926..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/DistributedPropertySet.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api;
-
-import com.sun.istack.internal.NotNull;
-
-/**
- * Placeholder for backwards compatibility.
- *
- * @deprecated Use com.oracle.webservices.internal.api.message.DistributedPropertySet instead.
- * @author Kohsuke Kawaguchi
- */
-public abstract class DistributedPropertySet extends com.oracle.webservices.internal.api.message.BaseDistributedPropertySet {
-
- /**
- * @deprecated
- */
- public void addSatellite(@NotNull PropertySet satellite) {
- super.addSatellite(satellite);
- }
-
- /**
- * @deprecated
- */
- public void addSatellite(@NotNull Class keyClass, @NotNull PropertySet satellite) {
- super.addSatellite(keyClass, satellite);
- }
-
- /**
- * @deprecated
- */
- public void copySatelliteInto(@NotNull DistributedPropertySet r) {
- super.copySatelliteInto(r);
- }
-
- /**
- * @deprecated
- */
- public void removeSatellite(PropertySet satellite) {
- super.removeSatellite(satellite);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/EndpointAddress.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/EndpointAddress.java
deleted file mode 100644
index edc112e5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/EndpointAddress.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.ws.WebServiceException;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.Proxy;
-import java.net.ProxySelector;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLStreamHandler;
-import java.util.Iterator;
-
-/**
- * Represents the endpoint address URI.
- *
- * <p>
- * Conceptually this can be really thought of as an {@link URI},
- * but it hides some of the details that improve the performance.
- *
- * <p>
- * Being an {@link URI} allows this class to represent custom made-up URIs
- * (like "jms" for example.) Whenever possible, this object
- * also creates an {@link URL} (this is only possible when the address
- * has a registered {@link URLStreamHandler}), so that if the clients
- * of this code wants to use it, it can do so.
- *
- *
- * <h3>How it improves the performance</h3>
- * <ol>
- * <li>
- * Endpoint address is often eventually turned into an {@link URLConnection},
- * and given that generally this value is read more often than being set,
- * it makes sense to eagerly turn it into an {@link URL},
- * thereby avoiding a repeated conversion.
- *
- * <li>
- * JDK spends a lot of time choosing a list of {@link Proxy}
- * to connect to an {@link URL}. Since the default proxy selector
- * implementation always return the same proxy for the same URL,
- * we can determine the proxy by ourselves to let JDK skip its
- * proxy-discovery step.
- *
- * (That said, user-defined proxy selector can do a lot of interesting things
- * --- like doing a round-robin, or pick one from a proxy farm randomly,
- * and so it's dangerous to stick to one proxy. For this case,
- * we still let JDK decide the proxy. This shouldn't be that much of an
- * disappointment, since most people only mess with system properties,
- * and never with {@link ProxySelector}. Also, avoiding optimization
- * with non-standard proxy selector allows people to effectively disable
- * this optimization, which may come in handy for a trouble-shooting.)
- * </ol>
- *
- * @author Kohsuke Kawaguchi
- */
-public final class EndpointAddress {
- @Nullable
- private URL url;
- private final URI uri;
- private final String stringForm;
- private volatile boolean dontUseProxyMethod;
- /**
- * Pre-selected proxy.
- *
- * If {@link #url} is null, this field is null.
- * Otherwise, this field could still be null if the proxy couldn't be chosen
- * upfront.
- */
- private Proxy proxy;
-
- public EndpointAddress(URI uri) {
- this.uri = uri;
- this.stringForm = uri.toString();
- try {
- initURL();
- proxy = chooseProxy();
- } catch (MalformedURLException e) {
- // ignore
- }
- }
-
- /**
- *
- * @see #create(String)
- */
- public EndpointAddress(String url) throws URISyntaxException {
- this.uri = new URI(url);
- this.stringForm = url;
- try {
- initURL();
- proxy = chooseProxy();
- } catch (MalformedURLException e) {
- // ignore
- }
- }
-
-
- private void initURL() throws MalformedURLException {
- String scheme = uri.getScheme();
- //URI.toURL() only works when scheme is not null.
- if (scheme == null) {
- this.url = new URL(uri.toString());
- return;
- }
- scheme =scheme.toLowerCase();
- if ("http".equals(scheme) || "https".equals(scheme)) {
- url = new URL(uri.toASCIIString());
- } else {
- this.url = uri.toURL();
- }
- }
-
- /**
- * Creates a new {@link EndpointAddress} with a reasonably
- * generic error handling.
- */
- public static EndpointAddress create(String url) {
- try {
- return new EndpointAddress(url);
- } catch(URISyntaxException e) {
- throw new WebServiceException("Illegal endpoint address: "+url,e);
- }
- }
-
- private Proxy chooseProxy() {
- ProxySelector sel =
- java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction<ProxySelector>() {
- @Override
- public ProxySelector run() {
- return ProxySelector.getDefault();
- }
- });
-
- if(sel==null)
- return Proxy.NO_PROXY;
-
-
- if(!sel.getClass().getName().equals("sun.net.spi.DefaultProxySelector"))
- // user-defined proxy. may return a different proxy for each invocation
- return null;
-
- Iterator<Proxy> it = sel.select(uri).iterator();
- if(it.hasNext())
- return it.next();
-
- return Proxy.NO_PROXY;
- }
-
- /**
- * Returns an URL of this endpoint adress.
- *
- * @return
- * null if this endpoint address doesn't have a registered {@link URLStreamHandler}.
- */
- public URL getURL() {
- return url;
- }
-
- /**
- * Returns an URI of the endpoint address.
- *
- * @return
- * always non-null.
- */
- public URI getURI() {
- return uri;
- }
-
- /**
- * Tries to open {@link URLConnection} for this endpoint.
- *
- * <p>
- * This is possible only when an endpoint address has
- * the corresponding {@link URLStreamHandler}.
- *
- * @throws IOException
- * if {@link URL#openConnection()} reports an error.
- * @throws AssertionError
- * if this endpoint doesn't have an associated URL.
- * if the code is written correctly this shall never happen.
- */
- public URLConnection openConnection() throws IOException {
- if (url == null) {
- throw new WebServiceException("URI="+uri+" doesn't have the corresponding URL");
- }
- if(proxy!=null && !dontUseProxyMethod) {
- try {
- return url.openConnection(proxy);
- } catch(UnsupportedOperationException e) {
- // Some OSGi and app server environments donot
- // override URLStreamHandler.openConnection(URL, Proxy) as it
- // is introduced in Java SE 5 API. Fallback to the other method.
- dontUseProxyMethod = true;
- }
- }
- return url.openConnection();
- }
-
- @Override
- public String toString() {
- return stringForm;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureConstructor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureConstructor.java
deleted file mode 100644
index 30e82c69..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureConstructor.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.xml.internal.ws.developer.MemberSubmissionAddressing;
-import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature;
-
-import javax.xml.ws.WebServiceFeature;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * <p>
- * This annotation should be used on a constructor of classes extending {@link WebServiceFeature} other than
- * Spec defined features, to help JAX-WS runtime recognize feature extensions.
- * </p>
- * <p>
- * For WebServiceFeature annotations to be recognizable by JAX-WS runtime, the feature annotation should point
- * to a corresponding bean (class extending WebServiceFeature). Only one of the constructors in the bean MUST be marked
- * with @FeatureConstructor whose value captures the annotaion attribute names for the corresponding parameters.
- * </p>
- * For example,
- * @see MemberSubmissionAddressingFeature
- * @see MemberSubmissionAddressing
- *
- * @see com.sun.xml.internal.ws.developer.Stateful
- * @see com.sun.xml.internal.ws.developer.StatefulFeature
- *
- * @author Rama Pulavarthi
- */
-@Retention(RUNTIME)
-@Target(ElementType.CONSTRUCTOR)
-
-public @interface FeatureConstructor {
- /**
- * The name of the parameter.
- */
- String[] value() default {};
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidator.java
deleted file mode 100644
index 7f5c792b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidator.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.WebServiceException;
-
-/**
- * Validates a list of {@link WebServiceFeature} instances when they are added to
- * the client or service binding.
- * <p>
- * {@link WebServiceFeature} classes may specify validator beans using {@link FeatureListValidatorAnnotation}.
- * <p>
- * Current behavior will allow runtime components to add features to the binding after initial validation; however,
- * this behavior is discouraged and will not be supported in later releases of the reference
- * implementation.
- *
- * @since 2.2.8
- * @see FeatureListValidatorAnnotation
- */
-public interface FeatureListValidator {
- /**
- * Validates feature list. Implementations should throw {@link WebServiceException} if the
- * list of features is invalid. Implementations may add features to the list or make other
- * changes; however, only validators belonging to features on the original list will be
- * invoked.
- *
- * @param list feature list
- */
- public void validate(WSFeatureList list);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidatorAnnotation.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidatorAnnotation.java
deleted file mode 100644
index ef5d9fa0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidatorAnnotation.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * This annotation should be used on classes that extend {@link WebServiceFeature} in
- * order to specify the type of {@link FeatureListValidator} bean that will be invoked when
- * instances of the {@link WebServiceFeature} class are included in the list of features
- * that are added to a client or service binding.
- *
- * @since 2.2.8
- */
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface FeatureListValidatorAnnotation {
- /**
- * The <code>FeatureListValidator</code> bean that is associated
- * with the <code>FeatureListValidator</code> annotation
- */
- Class<? extends FeatureListValidator> bean();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ImpliesWebServiceFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ImpliesWebServiceFeature.java
deleted file mode 100644
index 5f3aea62..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ImpliesWebServiceFeature.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-/**
- * Features, Providers, and JWS implementations can implement this interface to
- * receive a callback allowing them to modify the features enabled for a client
- * or endpoint binding.
- *
- * Implementations of this interface can make any changes they like to the set of
- * features; however, general best practice is that implementations should not
- * override features specified by the developer. For instance, a Feature object
- * for WS-ReliableMessaging might use this interface to automatically enable
- * WS-Addressing (by adding the AddressingFeature), but not modify addressing if the
- * user had already specified a different addressing version.
- *
- * @since 2.2.6
- * @deprecated use {@link FeatureListValidatorAnnotation}
- */
-public interface ImpliesWebServiceFeature {
- /**
- * Callback that may inspect the current feature list and add additional features
- * @param list Feature list
- */
- public void implyFeatures(WSFeatureList list);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/PropertySet.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/PropertySet.java
deleted file mode 100644
index d0d171be..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/PropertySet.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api;
-
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-
-/**
- * Placeholder for backwards compatibility.
- *
- * @deprecated Use com.oracle.webservices.internal.api.message.PropertySet instead.
- * @author snajper
- */
-public abstract class PropertySet extends com.oracle.webservices.internal.api.message.BasePropertySet {
- /**
- * Represents the list of strongly-typed known properties
- * (keyed by property names.)
- *
- * <p>
- * Just giving it an alias to make the use of this class more fool-proof.
- * @deprecated
- */
- protected static class PropertyMap extends com.oracle.webservices.internal.api.message.BasePropertySet.PropertyMap {}
-
- /**
- * @deprecated
- */
- protected static PropertyMap parse(final Class clazz) {
- com.oracle.webservices.internal.api.message.BasePropertySet.PropertyMap pm = com.oracle.webservices.internal.api.message.BasePropertySet.parse(clazz);
- PropertyMap map = new PropertyMap();
- map.putAll(pm);
- return map;
- }
-
- /**
- * Gets the name of the property.
- *
- * @param key
- * This field is typed as {@link Object} to follow the {@link Map#get(Object)}
- * convention, but if anything but {@link String} is passed, this method
- * just returns null.
- */
- public Object get(Object key) {
- Accessor sp = getPropertyMap().get(key);
- if(sp!=null)
- return sp.get(this);
- throw new IllegalArgumentException("Undefined property "+key);
- }
-
- /**
- * Sets a property.
- *
- * <h3>Implementation Note</h3>
- * This method is slow. Code inside JAX-WS should define strongly-typed
- * fields in this class and access them directly, instead of using this.
- *
- * @throws ReadOnlyPropertyException
- * if the given key is an alias of a strongly-typed field,
- * and if the name object given is not assignable to the field.
- *
- * @see Property
- */
- public Object put(String key, Object value) {
- Accessor sp = getPropertyMap().get(key);
- if(sp!=null) {
- Object old = sp.get(this);
- sp.set(this,value);
- return old;
- } else {
- throw new IllegalArgumentException("Undefined property "+key);
- }
- }
-
- public boolean supports(Object key) {
- return getPropertyMap().containsKey(key);
- }
-
- public Object remove(Object key) {
- Accessor sp = getPropertyMap().get(key);
- if(sp!=null) {
- Object old = sp.get(this);
- sp.set(this,null);
- return old;
- } else {
- throw new IllegalArgumentException("Undefined property "+key);
- }
- }
-
- protected void createEntrySet(Set<Entry<String,Object>> core) {
- for (final Entry<String, Accessor> e : getPropertyMap().entrySet()) {
- core.add(new Entry<String, Object>() {
- public String getKey() {
- return e.getKey();
- }
-
- public Object getValue() {
- return e.getValue().get(PropertySet.this);
- }
-
- public Object setValue(Object value) {
- Accessor acc = e.getValue();
- Object old = acc.get(PropertySet.this);
- acc.set(PropertySet.this,value);
- return old;
- }
- });
- }
- }
-
- protected abstract PropertyMap getPropertyMap();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ResourceLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ResourceLoader.java
deleted file mode 100644
index afa28657..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ResourceLoader.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.xml.internal.ws.api.server.Container;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-/**
- * Used to locate resources for jax-ws extensions. Using this, extensions
- * do not to have to write container specific code to locate resources.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class ResourceLoader {
-
- /**
- * Returns the actual location of the resource from the 'resource' arg
- * that represents a virtual locaion of a file understood by a container.
- * ResourceLoader impl for a Container knows how to map this
- * virtual location to actual location.
- * <p>
- * Extensions can get hold of this object using {@link Container}.
- * <p/>
- * for e.g.:
- * <pre>
- * ResourceLoader loader = container.getSPI(ResourceLoader.class);
- * URL catalog = loader.get("jax-ws-catalog.xml");
- * </pre>
- * A ResourceLoader for servlet environment, may do the following.
- * <pre>
- * URL getResource(String resource) {
- * return servletContext.getResource("/WEB-INF/"+resource);
- * }
- * </pre>
- *
- * @param resource Designates a path that is understood by the container. The
- * implementations must support "jax-ws-catalog.xml" resource.
- * @return the actual location, if found, or null if not found.
- * @throws MalformedURLException if there is an error in creating URL
- */
- public abstract URL getResource(String resource) throws MalformedURLException;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/SOAPVersion.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/SOAPVersion.java
deleted file mode 100644
index 683e65b9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/SOAPVersion.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api;
-
-import com.sun.xml.internal.bind.util.Which;
-import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory;
-import com.sun.xml.internal.ws.encoding.soap.SOAP12Constants;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPConstants;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFactory;
-import javax.xml.ws.soap.SOAPBinding;
-
-import com.oracle.webservices.internal.api.EnvelopeStyle;
-import com.oracle.webservices.internal.api.EnvelopeStyleFeature;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Version of SOAP (1.1 and 1.2).
- *
- * <p>
- * This class defines various constants for SOAP 1.1 and SOAP 1.2,
- * and also defines convenience methods to simplify the processing
- * of multiple SOAP versions.
- *
- * <p>
- * This constant alows you to do:
- *
- * <pre>
- * SOAPVersion version = ...;
- * version.someOp(...);
- * </pre>
- *
- * As opposed to:
- *
- * <pre>
- * if(binding is SOAP11) {
- * doSomeOp11(...);
- * } else {
- * doSomeOp12(...);
- * }
- * </pre>
- *
- * @author Kohsuke Kawaguchi
- */
-public enum SOAPVersion {
- SOAP_11(SOAPBinding.SOAP11HTTP_BINDING,
- com.sun.xml.internal.ws.encoding.soap.SOAPConstants.URI_ENVELOPE,
- "text/xml",
- SOAPConstants.URI_SOAP_ACTOR_NEXT, "actor",
- javax.xml.soap.SOAPConstants.SOAP_1_1_PROTOCOL,
- new QName(com.sun.xml.internal.ws.encoding.soap.SOAPConstants.URI_ENVELOPE, "MustUnderstand"),
- "Client",
- "Server",
- Collections.singleton(SOAPConstants.URI_SOAP_ACTOR_NEXT)),
-
- SOAP_12(SOAPBinding.SOAP12HTTP_BINDING,
- SOAP12Constants.URI_ENVELOPE,
- "application/soap+xml",
- SOAPConstants.URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER, "role",
- javax.xml.soap.SOAPConstants.SOAP_1_2_PROTOCOL,
- new QName(com.sun.xml.internal.ws.encoding.soap.SOAP12Constants.URI_ENVELOPE, "MustUnderstand"),
- "Sender",
- "Receiver",
- new HashSet<String>(Arrays.asList(SOAPConstants.URI_SOAP_1_2_ROLE_NEXT,SOAPConstants.URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER)));
-
- /**
- * Binding ID for SOAP/HTTP binding of this SOAP version.
- *
- * <p>
- * Either {@link SOAPBinding#SOAP11HTTP_BINDING} or
- * {@link SOAPBinding#SOAP12HTTP_BINDING}
- */
- public final String httpBindingId;
-
- /**
- * SOAP envelope namespace URI.
- */
- public final String nsUri;
-
- /**
- * Content-type. Either "text/xml" or "application/soap+xml".
- */
- public final String contentType;
-
- /**
- * SOAP MustUnderstand FaultCode for this SOAP version
- */
- public final QName faultCodeMustUnderstand;
-
- /**
- * SAAJ {@link MessageFactory} for this SOAP version.
- * @deprecated
- */
- public final MessageFactory saajMessageFactory;
-
- /**
- * SAAJ {@link SOAPFactory} for this SOAP version.
- * @deprecated
- */
- public final SOAPFactory saajSoapFactory;
-
- private final String saajFactoryString;
-
- /**
- * If the actor/role attribute is absent, this SOAP version assumes this value.
- */
- public final String implicitRole;
-
- /**
- * Singleton set that contains {@link #implicitRole}.
- */
- public final Set<String> implicitRoleSet;
-
- /**
- * This represents the roles required to be assumed by SOAP binding implementation.
- */
- public final Set<String> requiredRoles;
-
- /**
- * "role" (SOAP 1.2) or "actor" (SOAP 1.1)
- */
- public final String roleAttributeName;
-
- /**
- * "{nsUri}Client" or "{nsUri}Sender"
- */
- public final QName faultCodeClient;
-
- /**
- * "{nsUri}Server" or "{nsUri}Receiver"
- */
- public final QName faultCodeServer;
-
- private SOAPVersion(String httpBindingId, String nsUri, String contentType, String implicitRole, String roleAttributeName,
- String saajFactoryString, QName faultCodeMustUnderstand, String faultCodeClientLocalName,
- String faultCodeServerLocalName,Set<String> requiredRoles) {
- this.httpBindingId = httpBindingId;
- this.nsUri = nsUri;
- this.contentType = contentType;
- this.implicitRole = implicitRole;
- this.implicitRoleSet = Collections.singleton(implicitRole);
- this.roleAttributeName = roleAttributeName;
- this.saajFactoryString = saajFactoryString;
- try {
- saajMessageFactory = MessageFactory.newInstance(saajFactoryString);
- saajSoapFactory = SOAPFactory.newInstance(saajFactoryString);
- } catch (SOAPException e) {
- throw new Error(e);
- } catch (NoSuchMethodError e) {
- // SAAJ 1.3 is not in the classpath
- LinkageError x = new LinkageError("You are loading old SAAJ from "+ Which.which(MessageFactory.class));
- x.initCause(e);
- throw x;
- }
- this.faultCodeMustUnderstand = faultCodeMustUnderstand;
- this.requiredRoles = requiredRoles;
- this.faultCodeClient = new QName(nsUri,faultCodeClientLocalName);
- this.faultCodeServer = new QName(nsUri,faultCodeServerLocalName);
- }
-
- public SOAPFactory getSOAPFactory() {
- try {
- return SAAJFactory.getSOAPFactory(saajFactoryString);
- } catch (SOAPException e) {
- throw new Error(e);
- } catch (NoSuchMethodError e) {
- // SAAJ 1.3 is not in the classpath
- LinkageError x = new LinkageError("You are loading old SAAJ from "+ Which.which(MessageFactory.class));
- x.initCause(e);
- throw x;
- }
- }
-
- public MessageFactory getMessageFactory() {
- try {
- return SAAJFactory.getMessageFactory(saajFactoryString);
- } catch (SOAPException e) {
- throw new Error(e);
- } catch (NoSuchMethodError e) {
- // SAAJ 1.3 is not in the classpath
- LinkageError x = new LinkageError("You are loading old SAAJ from "+ Which.which(MessageFactory.class));
- x.initCause(e);
- throw x;
- }
- }
-
- public String toString() {
- return httpBindingId;
- }
-
- /**
- * Returns {@link SOAPVersion} whose {@link #httpBindingId} equals to
- * the given string.
- *
- * This method does not perform input string validation.
- *
- * @param binding
- * for historical reason, we treat null as {@link #SOAP_11},
- * but you really shouldn't be passing null.
- * @return always non-null.
- */
- public static SOAPVersion fromHttpBinding(String binding) {
- if(binding==null)
- return SOAP_11;
-
- if(binding.equals(SOAP_12.httpBindingId))
- return SOAP_12;
- else
- return SOAP_11;
- }
-
- /**
- * Returns {@link SOAPVersion} whose {@link #nsUri} equals to
- * the given string.
- *
- * This method does not perform input string validation.
- *
- * @param nsUri
- * must not be null.
- * @return always non-null.
- */
- public static SOAPVersion fromNsUri(String nsUri) {
- if(nsUri.equals(SOAP_12.nsUri))
- return SOAP_12;
- else
- return SOAP_11;
- }
-
- public static SOAPVersion from(EnvelopeStyleFeature f) {
- EnvelopeStyle.Style[] style = f.getStyles();
- if (style.length != 1) throw new IllegalArgumentException ("The EnvelopingFeature must has exactly one Enveloping.Style");
- return from(style[0]);
- }
-
- public static SOAPVersion from(EnvelopeStyle.Style style) {
- switch (style) {
- case SOAP11: return SOAP_11;
- case SOAP12: return SOAP_12;
- case XML: //ERROR??
- default: return SOAP_11;
- }
- }
-
- public EnvelopeStyleFeature toFeature() {
- return SOAP_11.equals(this) ?
- new EnvelopeStyleFeature(new EnvelopeStyle.Style[]{EnvelopeStyle.Style.SOAP11}) :
- new EnvelopeStyleFeature(new EnvelopeStyle.Style[]{EnvelopeStyle.Style.SOAP12});
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ServiceSharedFeatureMarker.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ServiceSharedFeatureMarker.java
deleted file mode 100644
index 230f9007..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ServiceSharedFeatureMarker.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * Marker interface for {@link WebServiceFeature} derived classes that when instances are specified in the feature list to a service delegate must be
- * added to the feature list of any Stubs created by that delegate. WebServiceFeature instances passed directly in the parameters of get...() or createDispatch()
- * must take precedence over feature instances passed during service delegate initialization.
- *
- * @since 2.2.6
- */
-public interface ServiceSharedFeatureMarker {
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSBinding.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSBinding.java
deleted file mode 100644
index 3bc54d4b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSBinding.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Binding;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.handler.Handler;
-import java.util.List;
-import java.util.Set;
-
-
-/**
- * JAX-WS implementation of {@link Binding}.
- *
- * <p>
- * This object can be created by {@link BindingID#createBinding()}.
- *
- * <p>
- * Binding conceptually includes the on-the-wire format of the message,
- * this this object owns {@link Codec}.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface WSBinding extends Binding {
- /**
- * Gets the SOAP version of this binding.
- *
- * TODO: clarify what to do with XML/HTTP binding
- *
- * <p>
- * This is just a short-cut for {@code getBindingID().getSOAPVersion()}
- *
- * @return
- * If the binding is using SOAP, this method returns
- * a {@link SOAPVersion} constant.
- *
- * If the binding is not based on SOAP, this method
- * returns null. See {@link Message} for how a non-SOAP
- * binding shall be handled by {@link Tube}s.
- */
- SOAPVersion getSOAPVersion();
- /**
- * Gets the WS-Addressing version of this binding.
- * <p/>
- * TODO: clarify what to do with XML/HTTP binding
- *
- * @return If the binding is using SOAP and WS-Addressing is enabled,
- * this method returns a {@link AddressingVersion} constant.
- * If binding is not using SOAP or WS-Addressing is not enabled,
- * this method returns null.
- *
- * This might be little slow as it has to go over all the features on binding.
- * Its advisable to cache the addressingVersion wherever possible and reuse it.
- */
- AddressingVersion getAddressingVersion();
-
- /**
- * Gets the binding ID, which uniquely identifies the binding.
- *
- * <p>
- * The relevant specs define the binding IDs and what they mean.
- * The ID is used in many places to identify the kind of binding
- * (such as SOAP1.1, SOAP1.2, REST, ...)
- *
- * @return
- * Always non-null same value.
- */
- @NotNull BindingID getBindingId();
-
- @NotNull@Override
- List<Handler> getHandlerChain();
-
- /**
- * Checks if a particular {@link WebServiceFeature} is enabled.
- *
- * @return
- * true if enabled.
- */
- boolean isFeatureEnabled(@NotNull Class<? extends WebServiceFeature> feature);
-
- /**
- * Experimental: Checks if a particular {@link WebServiceFeature} on an operation is enabled.
- *
- * @param operationName
- * The WSDL name of the operation.
- * @return
- * true if enabled.
- */
- boolean isOperationFeatureEnabled(@NotNull Class<? extends WebServiceFeature> feature,
- @NotNull final QName operationName);
-
- /**
- * Gets a {@link WebServiceFeature} of the specific type.
- *
- * @param featureType
- * The type of the feature to retrieve.
- * @return
- * If the feature is present and enabled, return a non-null instance.
- * Otherwise null.
- */
- @Nullable <F extends WebServiceFeature> F getFeature(@NotNull Class<F> featureType);
-
- /**
- * Experimental: Gets a {@link WebServiceFeature} of the specific type that applies to an operation.
- *
- * @param featureType
- * The type of the feature to retrieve.
- * @param operationName
- * The WSDL name of the operation.
- * @return
- * If the feature is present and enabled, return a non-null instance.
- * Otherwise null.
- */
- @Nullable <F extends WebServiceFeature> F getOperationFeature(@NotNull Class<F> featureType,
- @NotNull final QName operationName);
-
- /**
- * Returns a list of features associated with {@link WSBinding}.
- */
- @NotNull WSFeatureList getFeatures();
-
- /**
- * Experimental: Returns a list of features associated with {@link WSBinding} that apply to
- * a particular operation.
- *
- * @param operationName
- * The WSDL name of the operation.
- */
- @NotNull WSFeatureList getOperationFeatures(@NotNull final QName operationName);
-
- /**
- * Experimental: Returns a list of features associated with {@link WSBinding} that apply to
- * the input message of an operation.
- *
- * @param operationName
- * The WSDL name of the operation.
- */
- @NotNull WSFeatureList getInputMessageFeatures(@NotNull final QName operationName);
-
- /**
- * Experimental: Returns a list of features associated with {@link WSBinding} that apply to
- * the output message of an operation.
- *
- * @param operationName
- * The WSDL name of the operation.
- */
- @NotNull WSFeatureList getOutputMessageFeatures(@NotNull final QName operationName);
-
- /**
- * Experimental: Returns a list of features associated with {@link WSBinding} that apply to
- * one of the fault messages of an operation.
- *
- * @param operationName
- * The WSDL name of the operation.
- * @param messageName
- * The WSDL name of the fault message.
- */
- @NotNull WSFeatureList getFaultMessageFeatures(@NotNull final QName operationName,
- @NotNull final QName messageName);
-
- /**
- * Returns set of header QNames known to be supported by this binding.
- * @return Set of known QNames
- */
- @NotNull Set<QName> getKnownHeaders();
-
- /**
- * Adds header QName to set known to be supported by this binding
- * @param knownHeader Known header QName
- * @return true, if new entry was added; false, if known header QName was already known
- */
- boolean addKnownHeader(QName knownHeader);
-
- /**
- * @return A MessageContextFactory configured according to the binding's features.
- */
- @NotNull com.oracle.webservices.internal.api.message.MessageContextFactory getMessageContextFactory();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSDLLocator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSDLLocator.java
deleted file mode 100644
index 6e364d93..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSDLLocator.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.xml.ws.Service;
-
-/**
- * Used to locate WSDL documents; particularly useful for J2EE deployment archives
- *
- * @since 2.2.6
- */
-public abstract class WSDLLocator {
-
- /**
- * Returns the actual WSDL location
- *
- * @param service Service class
- * @param wsdlLoc Designates the WSDL location either from the service class
- * or through other means
- * @return the actual WSDL location, if found, or null if not found.
- * @throws MalformedURLException if there is an error in creating URL
- */
- public abstract URL locateWSDL(Class<Service> service, String wsdlLoc) throws MalformedURLException;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSFeatureList.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSFeatureList.java
deleted file mode 100644
index 15f55150..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSFeatureList.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * Read-only list of {@link WebServiceFeature}s.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface WSFeatureList extends Iterable<WebServiceFeature> {
- /**
- * Checks if a particular {@link WebServiceFeature} is enabled.
- *
- * @return
- * true if enabled.
- */
- boolean isEnabled(@NotNull Class<? extends WebServiceFeature> feature);
-
- /**
- * Gets a {@link WebServiceFeature} of the specific type.
- *
- * @param featureType
- * The type of the feature to retrieve.
- * @return
- * If the feature is present and enabled, return a non-null instance.
- * Otherwise null.
- */
- @Nullable <F extends WebServiceFeature> F get(@NotNull Class<F> featureType);
-
- /**
- * Obtains all the features in the array.
- */
- @NotNull WebServiceFeature[] toArray();
-
- /**
- * Merges the extra features that are not already set on binding.
- * i.e, if a feature is set already on binding through some other API
- * the corresponding wsdlFeature is not set.
- *
- * @param features Web Service features that need to be merged with already configured features.
- * @param reportConflicts If true, checks if the feature setting in WSDL (wsdl extension or
- * policy configuration) conflicts with feature setting in Deployed Service and
- * logs warning if there are any conflicts.
- */
- void mergeFeatures(@NotNull WebServiceFeature[] features, boolean reportConflicts);
-
- /**
- * Merges the extra features that are not already set on binding.
- * i.e, if a feature is set already on binding through some other API
- * the corresponding wsdlFeature is not set.
- *
- * @param features Web Service features that need to be merged with already configured features.
- * @param reportConflicts If true, checks if the feature setting in WSDL (wsdl extension or
- * policy configuration) conflicts with feature setting in Deployed Service and
- * logs warning if there are any conflicts.
- */
- void mergeFeatures(@NotNull Iterable<WebServiceFeature> features, boolean reportConflicts);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSService.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSService.java
deleted file mode 100644
index 1e9581fa..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSService.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.ContainerResolver;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.client.WSServiceDelegate;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.Service;
-import javax.xml.ws.Service.Mode;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.spi.ServiceDelegate;
-import java.lang.reflect.Field;
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-
-/**
- * JAX-WS implementation of {@link ServiceDelegate}.
- *
- * <p>
- * This abstract class is used only to improve the static type safety
- * of the JAX-WS internal API.
- *
- * <p>
- * The class name intentionally doesn't include "Delegate",
- * because the fact that it's a delegate is a detail of
- * the JSR-224 API, and for the layers above us this object
- * nevertheless represents {@link Service}. We want them
- * to think of this as an internal representation of a service.
- *
- * <p>
- * Only JAX-WS internal code may downcast this to {@link WSServiceDelegate}.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class WSService extends ServiceDelegate implements ComponentRegistry {
- private final Set<Component> components = new CopyOnWriteArraySet<Component>();
-
- protected WSService() {
- }
-
- /**
- * Works like {@link #getPort(EndpointReference, Class, WebServiceFeature...)}
- * but takes {@link WSEndpointReference}.
- */
- public abstract <T> T getPort(WSEndpointReference epr, Class<T> portInterface, WebServiceFeature... features);
-
- /**
- * Works like {@link #createDispatch(javax.xml.ws.EndpointReference, java.lang.Class, javax.xml.ws.Service.Mode, javax.xml.ws.WebServiceFeature[])}
- * but it takes the port name separately, so that EPR without embedded metadata can be used.
- */
- public abstract <T> Dispatch<T> createDispatch(QName portName, WSEndpointReference wsepr, Class<T> aClass, Service.Mode mode, WebServiceFeature... features);
-
- /**
- * Works like {@link #createDispatch(javax.xml.ws.EndpointReference, javax.xml.bind.JAXBContext, javax.xml.ws.Service.Mode, javax.xml.ws.WebServiceFeature[])}
- * but it takes the port name separately, so that EPR without embedded metadata can be used.
- */
- public abstract Dispatch<Object> createDispatch(QName portName, WSEndpointReference wsepr, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeature... features);
-
- /**
- * Gets the {@link Container} object.
- *
- * <p>
- * The components inside {@link WSEndpoint} uses this reference
- * to communicate with the hosting environment.
- *
- * @return
- * always same object. If no "real" {@link Container} instance
- * is given, {@link Container#NONE} will be returned.
- */
- public abstract @NotNull Container getContainer();
-
- public @Nullable <S> S getSPI(@NotNull Class<S> spiType) {
- for (Component c : components) {
- S s = c.getSPI(spiType);
- if (s != null)
- return s;
- }
-
- return getContainer().getSPI(spiType);
- }
-
- public @NotNull Set<Component> getComponents() {
- return components;
- }
-
- /**
- * Create a <code>Service</code> instance.
- *
- * The specified WSDL document location and service qualified name MUST
- * uniquely identify a <code>wsdl:service</code> element.
- *
- * @param wsdlDocumentLocation URL for the WSDL document location
- * for the service
- * @param serviceName QName for the service
- * @throws WebServiceException If any error in creation of the
- * specified service.
- **/
- public static WSService create( URL wsdlDocumentLocation, QName serviceName) {
- return new WSServiceDelegate(wsdlDocumentLocation,serviceName,Service.class);
- }
-
- /**
- * Create a <code>Service</code> instance.
- *
- * @param serviceName QName for the service
- * @throws WebServiceException If any error in creation of the
- * specified service
- */
- public static WSService create(QName serviceName) {
- return create(null,serviceName);
- }
-
- /**
- * Creates a service with a dummy service name.
- */
- public static WSService create() {
- return create(null,new QName(WSService.class.getName(),"dummy"));
- }
-
- /**
- * Typed parameter bag used by {@link WSService#create(URL, QName, InitParams)}
- *
- * @since 2.1.3
- */
- public static final class InitParams {
- private Container container;
- /**
- * Sets the {@link Container} object used by the created service.
- * This allows the client to use a specific {@link Container} instance
- * as opposed to the one obtained by {@link ContainerResolver}.
- */
- public void setContainer(Container c) {
- this.container = c;
- }
- public Container getContainer() {
- return container;
- }
- }
-
- /**
- * To create a {@link Service}, we need to go through the API that doesn't let us
- * pass parameters, so as a hack we use thread local.
- */
- protected static final ThreadLocal<InitParams> INIT_PARAMS = new ThreadLocal<InitParams>();
-
- /**
- * Used as a immutable constant so that we can avoid null check.
- */
- protected static final InitParams EMPTY_PARAMS = new InitParams();
-
- /**
- * Creates a {@link Service} instance.
- *
- * <p>
- * This method works really like {@link Service#create(URL, QName)}
- * except it takes one more RI specific parameter.
- *
- * @param wsdlDocumentLocation
- * {@code URL} for the WSDL document location for the service.
- * Can be null, in which case WSDL is not loaded.
- * @param serviceName
- * {@code QName} for the service.
- * @param properties
- * Additional RI specific initialization parameters. Can be null.
- * @throws WebServiceException
- * If any error in creation of the specified service.
- **/
- public static Service create( URL wsdlDocumentLocation, QName serviceName, InitParams properties) {
- if(INIT_PARAMS.get()!=null)
- throw new IllegalStateException("someone left non-null InitParams");
- INIT_PARAMS.set(properties);
- try {
- Service svc = Service.create(wsdlDocumentLocation, serviceName);
- if(INIT_PARAMS.get()!=null)
- throw new IllegalStateException("Service "+svc+" didn't recognize InitParams");
- return svc;
- } finally {
- // even in case of an exception still reset INIT_PARAMS
- INIT_PARAMS.set(null);
- }
- }
-
- /**
- * Obtains the {@link WSService} that's encapsulated inside a {@link Service}.
- *
- * @throws IllegalArgumentException
- * if the given service object is not from the JAX-WS RI.
- */
- public static WSService unwrap(final Service svc) {
- return AccessController.doPrivileged(new PrivilegedAction<WSService>() {
- public WSService run() {
- try {
- Field f = svc.getClass().getField("delegate");
- f.setAccessible(true);
- Object delegate = f.get(svc);
- if(!(delegate instanceof WSService))
- throw new IllegalArgumentException();
- return (WSService) delegate;
- } catch (NoSuchFieldException e) {
- AssertionError x = new AssertionError("Unexpected service API implementation");
- x.initCause(e);
- throw x;
- } catch (IllegalAccessException e) {
- IllegalAccessError x = new IllegalAccessError(e.getMessage());
- x.initCause(e);
- throw x;
- }
- }
- });
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WebServiceFeatureFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WebServiceFeatureFactory.java
deleted file mode 100644
index 03e65eb7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WebServiceFeatureFactory.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2009, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
-
-import javax.xml.ws.WebServiceFeature;
-import java.lang.annotation.Annotation;
-
-/**
- * Factory methods to get web service features from the corresponding
- * feature annotations
- *
- * @author Jitendra Kotamraju
- */
-public class WebServiceFeatureFactory {
-
- /**
- * Returns a feature list for feature annotations(i.e which have
- * {@link javax.xml.ws.spi.WebServiceFeatureAnnotation} meta annotation)
- *
- * @param ann list of annotations(that can also have non-feature annotations)
- * @return non-null feature list object
- */
- public static WSFeatureList getWSFeatureList(Iterable<Annotation> ann) {
- WebServiceFeatureList list = new WebServiceFeatureList();
- list.parseAnnotations(ann);
- return list;
- }
-
- /**
- * Returns a corresponding feature for a feature annotation(i.e which has
- * {@link javax.xml.ws.spi.WebServiceFeatureAnnotation} meta annotation)
- *
- * @param ann any annotation, not required to be a feature annotation
- * @return corresponding feature for the annotation
- * null, if the annotation is not a feature annotation
- */
- public static WebServiceFeature getWebServiceFeature(Annotation ann) {
- return WebServiceFeatureList.getFeature(ann);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingPropertySet.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingPropertySet.java
deleted file mode 100644
index 39a2f065..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingPropertySet.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.addressing;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.oracle.webservices.internal.api.message.BasePropertySet;
-import javax.xml.ws.handler.MessageContext;
-import java.util.List;
-import java.util.Map;
-
-/**
- * <p>This property set exists so the upper stack can SET addressing info
- * on a PER-REQUEST basis (instead of a per proxy/dispatch basis via OneWayFeature).</p>
- *
- * <p>This class is NOT used for reading addressing header values.</p>
- */
-public class AddressingPropertySet extends BasePropertySet {
-
- // NOTE: Setting ACTION on client side is covered by standard BindingProvider.
-
- public static final String ADDRESSING_FAULT_TO = "com.sun.xml.internal.ws.api.addressing.fault.to";
- private String faultTo;
- @Property(ADDRESSING_FAULT_TO)
- public String getFaultTo() { return faultTo; }
- public void setFaultTo(final String x) { faultTo = x; }
-
- public static final String ADDRESSING_MESSAGE_ID = "com.sun.xml.internal.ws.api.addressing.message.id";
- private String messageId;
- public String getMessageId() { return messageId; }
- public void setMessageId(final String x) { messageId = x; }
-
- public static final String ADDRESSING_RELATES_TO = "com.sun.xml.internal.ws.api.addressing.relates.to";
- @Property(ADDRESSING_RELATES_TO)
- private String relatesTo;
- public String getRelatesTo() { return relatesTo; }
- public void setRelatesTo(final String x) { relatesTo = x; }
-
- public static final String ADDRESSING_REPLY_TO = "com.sun.xml.internal.ws.api.addressing.reply.to";
- @Property(ADDRESSING_REPLY_TO)
- private String replyTo;
- public String getReplyTo() { return replyTo; }
- public void setReplyTo(final String x) { replyTo = x; }
-
- ////////////////////////////////////////////////////
- //
- // PropertySet boilerplate
- //
-
- private static final PropertyMap model;
-
- static {
- model = parse(AddressingPropertySet.class);
- }
-
- @Override
- protected PropertyMap getPropertyMap() {
- return model;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingVersion.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingVersion.java
deleted file mode 100644
index 68cb91cb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingVersion.java
+++ /dev/null
@@ -1,753 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.ws.addressing.W3CAddressingConstants;
-import com.sun.xml.internal.ws.addressing.WsaTubeHelper;
-import com.sun.xml.internal.ws.addressing.v200408.MemberSubmissionAddressingConstants;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Header;
-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.developer.MemberSubmissionAddressingFeature;
-import com.sun.xml.internal.ws.developer.MemberSubmissionEndpointReference;
-import com.sun.xml.internal.ws.message.stream.OutboundStreamHeader;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.io.ByteArrayInputStream;
-import java.io.UnsupportedEncodingException;
-
-/**
- * 'Traits' object that absorbs differences of WS-Addressing versions.
- *
- * @author Arun Gupta
- */
-public enum AddressingVersion {
-
- W3C("http://www.w3.org/2005/08/addressing",
- "wsa",
- W3CAddressingConstants.ANONYMOUS_EPR,
- "http://www.w3.org/2006/05/addressing/wsdl",
- "http://www.w3.org/2006/05/addressing/wsdl",
- "http://www.w3.org/2005/08/addressing/anonymous",
- "http://www.w3.org/2005/08/addressing/none",
- new EPR(W3CEndpointReference.class,
- "Address",
- "ServiceName",
- "EndpointName",
- "InterfaceName",
- new QName("http://www.w3.org/2005/08/addressing","Metadata","wsa"),
- "ReferenceParameters",
- null )) {
-
- /* package */ String getActionMismatchLocalName() {
- return "ActionMismatch";
- }
- @Override
- public boolean isReferenceParameter(String localName) {
- return localName.equals("ReferenceParameters");
- }
-
- @Override
- public WsaTubeHelper getWsaHelper(WSDLPort wsdlPort, SEIModel seiModel, WSBinding binding) {
- return new com.sun.xml.internal.ws.addressing.WsaTubeHelperImpl(wsdlPort, seiModel, binding);
- }
-
- @Override
- /* package */ String getMapRequiredLocalName() {
- return "MessageAddressingHeaderRequired";
- }
-
- @Override
- public String getMapRequiredText() {
- return "A required header representing a Message Addressing Property is not present";
- }
-
- /* package */ String getInvalidAddressLocalName() {
- return "InvalidAddress";
- }
-
- @Override
- /* package */ String getInvalidMapLocalName() {
- return "InvalidAddressingHeader";
- }
-
- @Override
- public String getInvalidMapText() {
- return "A header representing a Message Addressing Property is not valid and the message cannot be processed";
- }
-
- @Override
- /* package */ String getInvalidCardinalityLocalName() {
- return "InvalidCardinality";
- }
-
- /*package*/ Header createReferenceParameterHeader(XMLStreamBuffer mark, String nsUri, String localName) {
- return new OutboundReferenceParameterHeader(mark,nsUri,localName);
- }
-
- /*package*/ String getIsReferenceParameterLocalName() {
- return "IsReferenceParameter";
- }
-
- /* package */ String getWsdlAnonymousLocalName() {
- return "Anonymous";
- }
-
- public String getPrefix() {
- return "wsa";
- }
-
- public String getWsdlPrefix() {
- return "wsaw";
- }
-
- public Class<? extends WebServiceFeature> getFeatureClass() {
- return AddressingFeature.class;
- }
- },
- MEMBER("http://schemas.xmlsoap.org/ws/2004/08/addressing",
- "wsa",
- MemberSubmissionAddressingConstants.ANONYMOUS_EPR,
- "http://schemas.xmlsoap.org/ws/2004/08/addressing",
- "http://schemas.xmlsoap.org/ws/2004/08/addressing/policy",
- "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous",
- "",
- new EPR(MemberSubmissionEndpointReference.class,
- "Address",
- "ServiceName",
- "PortName",
- "PortType",
- MemberSubmissionAddressingConstants.MEX_METADATA,
- "ReferenceParameters",
- "ReferenceProperties")) {
- /* package */ String getActionMismatchLocalName() {
- return "InvalidMessageInformationHeader";
- }
- @Override
- public boolean isReferenceParameter(String localName) {
- return localName.equals("ReferenceParameters") || localName.equals("ReferenceProperties");
- }
-
- @Override
- public WsaTubeHelper getWsaHelper(WSDLPort wsdlPort, SEIModel seiModel, WSBinding binding) {
- return new com.sun.xml.internal.ws.addressing.v200408.WsaTubeHelperImpl(wsdlPort, seiModel, binding);
- }
-
- @Override
- /* package */ String getMapRequiredLocalName() {
- return "MessageInformationHeaderRequired";
- }
-
- @Override
- public String getMapRequiredText() {
- return "A required message information header, To, MessageID, or Action, is not present.";
- }
-
- /* package */ String getInvalidAddressLocalName() {
- return getInvalidMapLocalName();
- }
-
- @Override
- /* package */ String getInvalidMapLocalName() {
- return "InvalidMessageInformationHeader";
- }
-
- @Override
- public String getInvalidMapText() {
- return "A message information header is not valid and the message cannot be processed.";
- }
-
- @Override
- /* package */ String getInvalidCardinalityLocalName() {
- return getInvalidMapLocalName();
- }
-
- /*package*/ Header createReferenceParameterHeader(XMLStreamBuffer mark, String nsUri, String localName) {
- return new OutboundStreamHeader(mark,nsUri,localName);
- }
-
- /*package*/ String getIsReferenceParameterLocalName() {
- return "";
- }
-
- /* package */ String getWsdlAnonymousLocalName() {
- return "";
- }
-
- public String getPrefix() {
- return "wsa";
- }
-
- public String getWsdlPrefix() {
- return "wsaw";
- }
-
- public Class<? extends WebServiceFeature> getFeatureClass() {
- return MemberSubmissionAddressingFeature.class;
- }
- };
-
- /**
- * Namespace URI
- */
- public final String nsUri;
-
- /**
- * Namespace URI for the WSDL Binding
- */
- public final String wsdlNsUri;
-
- /**
- * Representing either {@link W3CEndpointReference} or
- * {@link MemberSubmissionEndpointReference}.
- */
- public final EPR eprType;
-
- /**
- * Namespace URI for the WSDL Binding
- */
- public final String policyNsUri;
-
- /**
- * Gets the anonymous URI value associated with this WS-Addressing version.
- */
- public final @NotNull String anonymousUri;
-
- /**
- * Gets the none URI value associated with this WS-Addressing version.
- */
- public final @NotNull String noneUri;
-
- /**
- * Represents the anonymous EPR.
- */
- public final WSEndpointReference anonymousEpr;
-
- /**
- * Represents the To QName in the SOAP message for a specific WS-Addressing Version.
- */
- public final QName toTag;
-
- /**
- * Represents the From QName in the SOAP message for a specific WS-Addressing Version.
- */
- public final QName fromTag;
-
- /**
- * Represents the ReplyTo QName in the SOAP message for a specific WS-Addressing Version.
- */
- public final QName replyToTag;
-
- /**
- * Represents the FaultTo QName for a specific WS-Addressing Version.
- */
- public final QName faultToTag;
-
- /**
- * Represents the Action QName in the SOAP message for a specific WS-Addressing Version.
- */
- public final QName actionTag;
-
- /**
- * Represents the MessageID QName in the SOAP message for a specific WS-Addressing Version.
- */
- public final QName messageIDTag;
-
- /**
- * Represents the RelatesTo QName in the SOAP message for a specific WS-Addressing Version.
- */
- public final QName relatesToTag;
-
- /**
- * Represents the QName of the fault code when a required header representing a
- * WS-Addressing Message Addressing Property is not present.
- */
- public final QName mapRequiredTag;
-
- /**
- * Represents the QName of the fault code when Action is not supported at this endpoint.
- */
- public final QName actionMismatchTag;
-
- /**
- * Represents the QName of the fault code when Action is not supported at this endpoint.
- */
- public final QName actionNotSupportedTag;
-
- /**
- * Represents the text of the fault when Action is not supported at this endpoint.
- */
- public final String actionNotSupportedText;
-
- /**
- * Represents the QName of the fault code when a header representing a
- * WS-Addressing Message Addressing Property is invalid and cannot be processed.
- */
- public final QName invalidMapTag;
-
- /**
- * Represents the QName of the fault code when a header representing a
- * WS-Addressing Message Addressing Property occurs greater than expected number.
- */
- public final QName invalidCardinalityTag;
-
- /**
- * Represents the QName of the fault code when a header representing an
- * address is not valid.
- */
- public final QName invalidAddressTag;
-
- /**
- * Represents the QName of the element that conveys additional information
- * on the pre-defined WS-Addressing faults.
- */
- public final QName problemHeaderQNameTag;
-
- /**
- * Represents the QName of the element that conveys additional information
- * if Action is not matching with that expected.
- */
- public final QName problemActionTag;
-
- /**
- * Represents the QName of the header element that is used to capture the fault detail
- * if there is a fault processing WS-Addressing Message Addressing Property. This is
- * only used for SOAP 1.1.
- */
- public final QName faultDetailTag;
-
- /**
- * Fault sub-sub-code that represents
- * "Specifies that the invalid header was expected to be an EPR but did not contain an [address]."
- */
- public final QName fault_missingAddressInEpr;
-
- /**
- * Represents the Action QName in the WSDL for a specific WS-Addressing Version.
- */
- public final QName wsdlActionTag;
-
- /**
- * Represents the WSDL extension QName for a specific WS-Addressing Version.
- */
- public final QName wsdlExtensionTag;
-
- /**
- * Represents the WSDL anonymous QName for a specific WS-Addressing Version.
- */
- public final QName wsdlAnonymousTag;
-
- /**
- * Represents the QName of the reference parameter in a SOAP message. This is
- * only valid for W3C WS-Addressing.
- */
- public final QName isReferenceParameterTag;
-
- private static final String EXTENDED_FAULT_NAMESPACE = "http://jax-ws.dev.java.net/addressing/fault";
- public static final String UNSET_OUTPUT_ACTION = "http://jax-ws.dev.java.net/addressing/output-action-not-set";
- public static final String UNSET_INPUT_ACTION = "http://jax-ws.dev.java.net/addressing/input-action-not-set";
-
- /**
- * Fault sub-sub-code that represents duplicate &lt;Address> element in EPR.
- * This is a fault code not defined in the spec.
- */
- public static final QName fault_duplicateAddressInEpr = new QName(
- EXTENDED_FAULT_NAMESPACE, "DuplicateAddressInEpr", "wsa"
- );
-
- private AddressingVersion(String nsUri, String prefix, String anonymousEprString, String wsdlNsUri, String policyNsUri,
- String anonymousUri, String noneUri,
- EPR eprType ) {
- this.nsUri = nsUri;
- this.wsdlNsUri = wsdlNsUri;
- this.policyNsUri = policyNsUri;
- this.anonymousUri = anonymousUri;
- this.noneUri = noneUri;
- toTag = new QName(nsUri,"To", prefix);
- fromTag = new QName(nsUri,"From", prefix);
- replyToTag = new QName(nsUri,"ReplyTo", prefix);
- faultToTag = new QName(nsUri,"FaultTo", prefix);
- actionTag = new QName(nsUri,"Action", prefix);
- messageIDTag = new QName(nsUri,"MessageID", prefix);
- relatesToTag = new QName(nsUri,"RelatesTo", prefix);
-
- mapRequiredTag = new QName(nsUri,getMapRequiredLocalName(), prefix);
- actionMismatchTag = new QName(nsUri,getActionMismatchLocalName(), prefix);
- actionNotSupportedTag = new QName(nsUri,"ActionNotSupported", prefix);
- actionNotSupportedText = "The \"%s\" cannot be processed at the receiver";
- invalidMapTag = new QName(nsUri,getInvalidMapLocalName(), prefix);
- invalidAddressTag = new QName(nsUri,getInvalidAddressLocalName(), prefix);
- invalidCardinalityTag = new QName(nsUri,getInvalidCardinalityLocalName(), prefix);
- faultDetailTag = new QName(nsUri,"FaultDetail", prefix);
-
- problemHeaderQNameTag = new QName(nsUri,"ProblemHeaderQName", prefix);
- problemActionTag = new QName(nsUri, "ProblemAction", prefix);
-
- fault_missingAddressInEpr = new QName(nsUri,"MissingAddressInEPR", prefix);
- isReferenceParameterTag = new QName(nsUri,getIsReferenceParameterLocalName(), prefix);
-
- wsdlActionTag = new QName(wsdlNsUri,"Action", prefix);
- wsdlExtensionTag = new QName(wsdlNsUri, "UsingAddressing", prefix);
- wsdlAnonymousTag = new QName(wsdlNsUri, getWsdlAnonymousLocalName(), prefix);
-
- // create stock anonymous EPR
- try {
- this.anonymousEpr = new WSEndpointReference(new ByteArrayInputStream(anonymousEprString.getBytes("UTF-8")),this);
- } catch (XMLStreamException e) {
- throw new Error(e); // bug in our code as EPR should parse.
- } catch (UnsupportedEncodingException e) {
- throw new Error(e);
- }
- this.eprType = eprType;
- }
-
- /**
- * Gets the local name of the fault when a header representing a WS-Addressing Action is not same as SOAPAction
- *
- * @return local name
- */
- /* package */ abstract String getActionMismatchLocalName();
-
- /**
- * Returns {@link AddressingVersion} whose {@link #nsUri} equals to
- * the given string.
- *
- * This method does not perform input string validation.
- *
- * @param nsUri
- * must not be null.
- * @return always non-null.
- */
- public static AddressingVersion fromNsUri(String nsUri) {
- if (nsUri.equals(W3C.nsUri))
- return W3C;
-
- if (nsUri.equals(MEMBER.nsUri))
- return MEMBER;
-
- return null;
- }
-
- /**
- * Gets the {@link AddressingVersion} from a {@link WSBinding}
- *
- * @param binding WSDL binding
- * @return
- * addresing version enabled, or null if none is enabled.
- */
- public static @Nullable
- AddressingVersion fromBinding(WSBinding binding) {
- // TODO: who is responsible for reporting an error if both versions
- // are on?
- if (binding.isFeatureEnabled(AddressingFeature.class))
- return W3C;
-
- if (binding.isFeatureEnabled(MemberSubmissionAddressingFeature.class))
- return MEMBER;
-
- return null;
- }
-
- /**
- * Gets the {@link AddressingVersion} from a {@link WSDLPort}
- *
- * @param port WSDL port
- * @return addresing version
- */
- public static AddressingVersion fromPort(WSDLPort port) {
- if (port == null)
- return null;
-
- WebServiceFeature wsf = port.getFeature(AddressingFeature.class);
- if (wsf == null) {
- wsf = port.getFeature(MemberSubmissionAddressingFeature.class);
- }
- if (wsf == null)
- return null;
-
- return fromFeature(wsf);
- }
-
- /**
- * Returns {@link #nsUri} associated with this {@link AddressingVersion}
- *
- * @return namespace URI
- * @deprecated
- * Use {@link #nsUri}.
- */
- public String getNsUri() {
- return nsUri;
- }
-
- /**
- * Returns true if the given local name is considered as
- * a reference parameter in EPR.
- *
- * For W3C, this means "ReferenceParameters",
- * and for the member submission version, this means
- * either "ReferenceParameters" or "ReferenceProperties".
- */
- public abstract boolean isReferenceParameter(String localName);
-
- /**
- * Returns WsaTubeHelper for the WS-Addressing version identified by <code>binding</code>
- * {@link WSBinding} and for the {@link WSDLPort} port.
- *
- * @return WS-A version specific helper
- *
- * @deprecated
- * TODO why are we exposing implementation specificc class through api?
- * TODO Remove it if no one elase uses it.
- */
- public abstract WsaTubeHelper getWsaHelper(WSDLPort wsdlPort, SEIModel seiModel, WSBinding binding);
-
- /**
- * Gets the none URI value associated with this WS-Addressing version.
- *
- * @return none URI value
- * @deprecated
- * Use {@link #noneUri}.
- */
- public final String getNoneUri() {
- return noneUri;
- }
-
- /**
- * Gets the anonymous URI value associated with this WS-Addressing version.
- *
- * @deprecated
- * Use {@link #anonymousUri}
- */
- public final String getAnonymousUri() {
- return anonymousUri;
- }
-
- /**
- * Gets the default fault Action value associated with this WS-Addressing version.
- *
- * @return default fault Action value
- */
- public String getDefaultFaultAction() {
- return nsUri + "/fault";
- }
-
- /**
- * Gets the local name of the fault when a header representing a WS-Addressing Message
- * Addresing Property is absent.
- *
- * @return local name
- */
- /* package */ abstract String getMapRequiredLocalName();
-
- /**
- * Gets the description text when a required WS-Addressing header representing a
- * Message Addressing Property is absent.
- *
- * @return description text
- */
- public abstract String getMapRequiredText();
-
- /**
- * Gets the local name of the fault when a header representing anaddress is invalid.
- * @return local name
- */
- /* package */ abstract String getInvalidAddressLocalName();
-
-
- /**
- * Gets the local name of the fault when a header representing a WS-Addressing Message
- * Addresing Property is invalid and cannot be processed.
- *
- * @return local name
- */
- /* package */ abstract String getInvalidMapLocalName();
-
- /**
- * Gets the description text when a header representing a WS-Addressing
- * Message Addressing Property is invalid and cannot be processed.
- *
- * @return description text
- */
- public abstract String getInvalidMapText();
-
- /**
- * Gets the local name of the fault when a header representing a WS-Addressing Message
- * Addresing Property occurs greater than expected number.
- *
- * @return local name
- */
- /* package */ abstract String getInvalidCardinalityLocalName();
-
- /* package */ abstract String getWsdlAnonymousLocalName();
-
- public abstract String getPrefix();
-
- public abstract String getWsdlPrefix();
-
- public abstract Class<? extends WebServiceFeature> getFeatureClass();
- /**
- * Creates an outbound {@link Header} from a reference parameter.
- */
- /*package*/ abstract Header createReferenceParameterHeader(XMLStreamBuffer mark, String nsUri, String localName);
-
- /**
- * Gets the local name for wsa:IsReferenceParameter. This method will return a valid
- * value only valid for W3C WS-Addressing. For Member Submission WS-Addressing, this method
- * returns null.
- */
- /*package*/ abstract String getIsReferenceParameterLocalName();
-
- public static AddressingVersion fromFeature(WebServiceFeature af) {
- if (af.getID().equals(AddressingFeature.ID))
- return W3C;
- else if (af.getID().equals(MemberSubmissionAddressingFeature.ID))
- return MEMBER;
- else
- return null;
- }
-
- /**
- * Gets the {@link WebServiceFeature} corresponding to the namespace URI of
- * WS-Addressing policy assertion in the WSDL. <code>enabled</code> and
- * <code>required</code> are used to initialize the value of the feature.
- *
- * @param nsUri namespace URI of the WS-Addressing policy assertion in the WSDL
- * @param enabled true if feature is to be enabled, false otherwise
- * @param required true if feature is required, false otherwise. Corresponds
- * to wsdl:required on the extension/assertion.
- * @return WebServiceFeature corresponding to the assertion namespace URI
- * @throws WebServiceException if an unsupported namespace URI is passed
- */
- public static @NotNull WebServiceFeature getFeature(String nsUri, boolean enabled, boolean required) {
- if (nsUri.equals(W3C.policyNsUri))
- return new AddressingFeature(enabled, required);
- else if (nsUri.equals(MEMBER.policyNsUri))
- return new MemberSubmissionAddressingFeature(enabled, required);
- else
- throw new WebServiceException("Unsupported namespace URI: " + nsUri);
- }
-
- /**
- * Gets the corresponding {@link AddressingVersion} instance from the
- * EPR class.
- */
- public static @NotNull AddressingVersion fromSpecClass(Class<? extends EndpointReference> eprClass) {
- if(eprClass==W3CEndpointReference.class)
- return W3C;
- if(eprClass==MemberSubmissionEndpointReference.class)
- return MEMBER;
- throw new WebServiceException("Unsupported EPR type: "+eprClass);
- }
-
- /**
- * Returns true if the WebServiceFeature is either a {@link AddressingFeature} or
- * {@link MemberSubmissionAddressingFeature} and is required.
- *
- * @param wsf The WebServiceFeature encaps
- * @throws WebServiceException if <code>wsf</code> does not contain either {@link AddressingFeature} or
- * {@link MemberSubmissionAddressingFeature}
- * @return true if <code>wsf</code> requires WS-Addressing
- */
- public static boolean isRequired(WebServiceFeature wsf) {
- if (wsf.getID().equals(AddressingFeature.ID)) {
- return ((AddressingFeature)wsf).isRequired();
- } else if (wsf.getID().equals(MemberSubmissionAddressingFeature.ID)) {
- return ((MemberSubmissionAddressingFeature)wsf).isRequired();
- } else
- throw new WebServiceException("WebServiceFeature not an Addressing feature: "+ wsf.getID());
- }
-
- /**
- * Returns true if <code>binding</code> contains either a {@link AddressingFeature} or
- * {@link MemberSubmissionAddressingFeature} and is required.
- *
- * @param binding The binding
- * @return true if <code>binding</code> requires WS-Addressing
- */
- public static boolean isRequired(WSBinding binding) {
- AddressingFeature af = binding.getFeature(AddressingFeature.class);
- if (af != null)
- return af.isRequired();
- MemberSubmissionAddressingFeature msaf = binding.getFeature(MemberSubmissionAddressingFeature.class);
- if(msaf != null)
- return msaf.isRequired();
-
- return false;
- }
-
- /**
- * Returns true if <code>binding</code> contains either a {@link AddressingFeature} or
- * {@link MemberSubmissionAddressingFeature} and is enabled.
- *
- * @param binding The binding
- * @return true if WS-Addressing is enabled for <code>binding</code>.
- */
- public static boolean isEnabled(WSBinding binding) {
- return binding.isFeatureEnabled(MemberSubmissionAddressingFeature.class) ||
- binding.isFeatureEnabled(AddressingFeature.class);
- }
-
- public final static class EPR {
- public final Class<? extends EndpointReference> eprClass;
- public final String address;
- public final String serviceName;
- public final String portName;
- public final String portTypeName;
- public final String referenceParameters;
- /**
- * Element under which metadata is specified.
- * In W3C, it is wsa:Metadata
- * In Member, it is directly under mex:MetadataSection
- */
- public final QName wsdlMetadata;
- public final String referenceProperties;
-
- public EPR(Class<? extends EndpointReference> eprClass, String address, String serviceName, String portName,
- String portTypeName, QName wsdlMetadata,
- String referenceParameters, String referenceProperties) {
- this.eprClass = eprClass;
- this.address = address;
- this.serviceName = serviceName;
- this.portName = portName;
- this.portTypeName = portTypeName;
- this.referenceParameters = referenceParameters;
- this.referenceProperties = referenceProperties;
- this.wsdlMetadata = wsdlMetadata;
-
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/EPRHeader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/EPRHeader.java
deleted file mode 100644
index 3c73af04..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/EPRHeader.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.addressing;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.Writer;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.message.AbstractHeaderImpl;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.dom.DOMResult;
-
-/**
- * Used to represent outbound endpoint reference header,
- * such as &lt;ReplyTo> and &lt;FaultTo>.
- * Used from {@link WSEndpointReference}.
- *
- * @author Kohsuke Kawaguchi
- * @see WSEndpointReference
- */
-final class EPRHeader extends AbstractHeaderImpl {
-
- private final String nsUri,localName;
- private final WSEndpointReference epr;
-
- EPRHeader(QName tagName, WSEndpointReference epr) {
- this.nsUri = tagName.getNamespaceURI();
- this.localName = tagName.getLocalPart();
- this.epr = epr;
- }
-
- public @NotNull String getNamespaceURI() {
- return nsUri;
- }
-
- public @NotNull String getLocalPart() {
- return localName;
- }
-
- @Nullable
- public String getAttribute(@NotNull String nsUri, @NotNull String localName) {
- try {
- XMLStreamReader sr = epr.read("EndpointReference"/*doesn't matter*/);
- while(sr.getEventType()!= XMLStreamConstants.START_ELEMENT)
- sr.next();
-
- return sr.getAttributeValue(nsUri,localName);
- } catch (XMLStreamException e) {
- // since we are reading from buffer, this can't happen.
- throw new AssertionError(e);
- }
- }
-
- public XMLStreamReader readHeader() throws XMLStreamException {
- return epr.read(localName);
- }
-
- public void writeTo(XMLStreamWriter w) throws XMLStreamException {
- epr.writeTo(localName, w);
- }
-
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- try {
- // TODO what about in-scope namespaces
- // Not very efficient consider implementing a stream buffer
- // processor that produces a DOM node from the buffer.
- Transformer t = XmlUtil.newTransformer();
- SOAPHeader header = saaj.getSOAPHeader();
- if (header == null)
- header = saaj.getSOAPPart().getEnvelope().addHeader();
-// TODO workaround for oracle xdk bug 16555545, when this bug is fixed the line below can be
-// uncommented and all lines below, except the catch block, can be removed.
-// t.transform(epr.asSource(localName), new DOMResult(header));
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- XMLStreamWriter w = XMLOutputFactory.newFactory().createXMLStreamWriter(baos);
- epr.writeTo(localName, w);
- w.flush();
- ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
- DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();
- fac.setNamespaceAware(true);
- Node eprNode = fac.newDocumentBuilder().parse(bais).getDocumentElement();
- Node eprNodeToAdd = header.getOwnerDocument().importNode(eprNode, true);
- header.appendChild(eprNodeToAdd);
- } catch (Exception e) {
- throw new SOAPException(e);
- }
- }
-
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
- epr.writeTo(localName,contentHandler,errorHandler,true);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/NonAnonymousResponseProcessor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/NonAnonymousResponseProcessor.java
deleted file mode 100644
index 92376b2f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/NonAnonymousResponseProcessor.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing;
-
-import com.sun.istack.internal.NotNull;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext;
-import com.sun.xml.internal.ws.api.pipe.Fiber;
-import com.sun.xml.internal.ws.api.pipe.TransportTubeFactory;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-
-/**
- * Delivers response messages targeted at non-anonymous endpoint addresses
- * @since 2.2.6
- */
-public class NonAnonymousResponseProcessor {
- private static final NonAnonymousResponseProcessor DEFAULT = new NonAnonymousResponseProcessor();
-
- public static NonAnonymousResponseProcessor getDefault() {
- return DEFAULT;
- }
-
- protected NonAnonymousResponseProcessor() {}
-
- /**
- * Send a response to a non-anonymous address. Also closes the transport back channel
- * of {@link Packet} if it's not closed already.
- *
- * @param packet
- * The response from our server, which will be delivered to the destination.
- * @return The response packet that should be used to complete the tubeline response processing
- */
- public Packet process(Packet packet) {
- Fiber.CompletionCallback fiberCallback = null;
- Fiber currentFiber = Fiber.getCurrentIfSet();
- if (currentFiber != null) {
- // Link completion of the current fiber to the new fiber that will
- // deliver the async response. This allows access to the response
- // packet that may be generated by sending a new message for the
- // current async response.
-
- final Fiber.CompletionCallback currentFiberCallback =
- currentFiber.getCompletionCallback();
-
- if (currentFiberCallback != null) {
- fiberCallback = new Fiber.CompletionCallback() {
- public void onCompletion(@NotNull Packet response) {
- currentFiberCallback.onCompletion(response);
- }
-
- public void onCompletion(@NotNull Throwable error) {
- currentFiberCallback.onCompletion(error);
- }
- };
- currentFiber.setCompletionCallback(null);
- }
- }
-
- // we need to assemble a pipeline to talk to this endpoint.
- WSEndpoint<?> endpoint = packet.endpoint;
- WSBinding binding = endpoint.getBinding();
- Tube transport = TransportTubeFactory.create(Thread.currentThread().getContextClassLoader(),
- new ClientTubeAssemblerContext(
- packet.endpointAddress, endpoint.getPort(), (WSService) null,
- binding, endpoint.getContainer(),
- ((BindingImpl) binding).createCodec(), null, null));
- Fiber fiber = endpoint.getEngine().createFiber();
- fiber.start(transport, packet, fiberCallback);
-
- // then we'll proceed the rest like one-way.
- Packet copy = packet.copy(false);
- copy.endpointAddress = null;
-
- return copy;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OneWayFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OneWayFeature.java
deleted file mode 100644
index 9a94a958..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OneWayFeature.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.addressing;
-
-import java.net.URL;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.FeatureConstructor;
-
-import javax.xml.ws.WebServiceFeature;
-
-import com.sun.org.glassfish.gmbal.ManagedAttribute;
-import com.sun.org.glassfish.gmbal.ManagedData;
-
-/**
- * Unsupported RI extension to work around an issue in WSIT.
- *
- * <p>
- * <b>This feature is not meant to be used by a common Web service developer</b> as there
- * is no need to send the above mentioned header for a one-way operation. But these
- * properties may need to be sent in certain middleware Web services.
- *
- * <p>
- * This feature allows ReplyTo, From and RelatesTo Message Addressing Properties
- * to be added for all messages that are sent from the port configured with
- * this annotation. All operations are assumed to be one-way, and
- * this feature should be used for one-way
- * operations only.
- *
- * If a non-null ReplyTo is specified, then MessageID property is also added.
- *
- * @author Arun Gupta
- */
-@ManagedData
-public class OneWayFeature extends WebServiceFeature {
- /**
- * Constant value identifying the {@link OneWayFeature}
- */
- public static final String ID = "http://java.sun.com/xml/ns/jaxws/addressing/oneway";
-
- private String messageId;
- private WSEndpointReference replyTo;
- private WSEndpointReference sslReplyTo;
- private WSEndpointReference from;
- private WSEndpointReference faultTo;
- private WSEndpointReference sslFaultTo;
- private String relatesToID;
- private boolean useAsyncWithSyncInvoke = false;
-
- /**
- * Create an {@link OneWayFeature}. The instance created will be enabled.
- */
- public OneWayFeature() {
- this.enabled = true;
- }
-
- /**
- * Create an {@link OneWayFeature}
- *
- * @param enabled specifies whether this feature should
- * be enabled or not.
- */
- public OneWayFeature(boolean enabled) {
- this.enabled = enabled;
- }
-
- /**
- * Create an {@link OneWayFeature}
- *
- * @param enabled specifies whether this feature should be enabled or not.
- * @param replyTo specifies the {@link WSEndpointReference} of wsa:ReplyTo header.
- */
- public OneWayFeature(boolean enabled, WSEndpointReference replyTo) {
- this.enabled = enabled;
- this.replyTo = replyTo;
- }
-
- /**
- * Create an {@link OneWayFeature}
- *
- * @param enabled specifies whether this feature should be enabled or not.
- * @param replyTo specifies the {@link WSEndpointReference} of wsa:ReplyTo header.
- * @param from specifies the {@link WSEndpointReference} of wsa:From header.
- * @param relatesTo specifies the MessageID to be used for wsa:RelatesTo header.
- */
- @FeatureConstructor({"enabled","replyTo","from","relatesTo"})
- public OneWayFeature(boolean enabled, WSEndpointReference replyTo, WSEndpointReference from, String relatesTo) {
- this.enabled = enabled;
- this.replyTo = replyTo;
- this.from = from;
- this.relatesToID = relatesTo;
- }
-
- public OneWayFeature(final AddressingPropertySet a, AddressingVersion v) {
- this.enabled = true;
- this.messageId = a.getMessageId();
- this.relatesToID = a.getRelatesTo();
- this.replyTo = makeEPR(a.getReplyTo(), v);
- this.faultTo = makeEPR(a.getFaultTo(), v);
- }
-
- private WSEndpointReference makeEPR(final String x, final AddressingVersion v) {
- if (x == null) { return null; }
- return new WSEndpointReference(x, v);
- }
-
- public String getMessageId() {
- return messageId;
- }
-
- /**
- * {@inheritDoc}
- */
- @ManagedAttribute
- public String getID() {
- return ID;
- }
-
- public boolean
- hasSslEprs() {
- return sslReplyTo != null || sslFaultTo != null;
- }
-
- /**
- * Getter for wsa:ReplyTo header {@link WSEndpointReference} .
- *
- * @return address of the wsa:ReplyTo header
- */
- @ManagedAttribute
- public WSEndpointReference getReplyTo() {
- return replyTo;
- }
-
- public WSEndpointReference getReplyTo(boolean ssl) {
- return (ssl && sslReplyTo != null) ? sslReplyTo : replyTo;
- }
-
- /**
- * Setter for wsa:ReplyTo header {@link WSEndpointReference}.
- *
- * @param address
- */
- public void setReplyTo(WSEndpointReference address) {
- this.replyTo = address;
- }
-
- public WSEndpointReference getSslReplyTo() {
- return sslReplyTo;
- }
-
- public void setSslReplyTo(WSEndpointReference sslReplyTo) {
- this.sslReplyTo = sslReplyTo;
- }
-
- /**
- * Getter for wsa:From header {@link WSEndpointReference}.
- *
- * @return address of the wsa:From header
- */
- @ManagedAttribute
- public WSEndpointReference getFrom() {
- return from;
- }
-
- /**
- * Setter for wsa:From header {@link WSEndpointReference}.
- *
- * @param address of the wsa:From header
- */
- public void setFrom(WSEndpointReference address) {
- this.from = address;
- }
-
- /**
- * Getter for MessageID for wsa:RelatesTo header.
- *
- * @return address of the wsa:FaultTo header
- */
- @ManagedAttribute
- public String getRelatesToID() {
- return relatesToID;
- }
-
- /**
- * Setter for MessageID for wsa:RelatesTo header.
- *
- * @param id
- */
- public void setRelatesToID(String id) {
- this.relatesToID = id;
- }
-
- /**
- * Getter for wsa:FaultTo header {@link WSEndpointReference}.
- *
- * @return address of the wsa:FaultTo header
- */
- public WSEndpointReference getFaultTo() {
- return faultTo;
- }
-
- public WSEndpointReference getFaultTo(boolean ssl) {
- return (ssl && sslFaultTo != null) ? sslFaultTo : faultTo;
- }
-
- /**
- * Setter for wsa:FaultTo header {@link WSEndpointReference}.
- *
- * @param address of the wsa:FaultTo header
- */
- public void setFaultTo(WSEndpointReference address) {
- this.faultTo = address;
- }
-
- public WSEndpointReference getSslFaultTo() {
- return sslFaultTo;
- }
-
- public void setSslFaultTo(WSEndpointReference sslFaultTo) {
- this.sslFaultTo = sslFaultTo;
- }
-
- /**
- * Getter for whether async is to be used with sync invoke
- *
- * @return whether async is to be used with sync invoke
- */
- public boolean isUseAsyncWithSyncInvoke() {
- return useAsyncWithSyncInvoke;
- }
-
- /**
- * Setter for whether async is to be used with sync invoke
- *
- * @param useAsyncWithSyncInvoke whether async is to be used with sync invoke
- */
- public void setUseAsyncWithSyncInvoke(boolean useAsyncWithSyncInvoke) {
- this.useAsyncWithSyncInvoke = useAsyncWithSyncInvoke;
- }
-
- /**
- * Calculate a new EPR using an existing one and substituting SSL specific
- * host and port values.
- * @param epr Existing EPR that will be the starting point for the SSL
- * version
- * @param sslHost New SSL host or null if the existing host should be used
- * @param sslPort New SSL port or -1 if the existing port should be used
- * @return
- */
- public static WSEndpointReference
- enableSslForEpr(@NotNull WSEndpointReference epr,
- @Nullable String sslHost,
- int sslPort) {
- if (!epr.isAnonymous()) {
- String address = epr.getAddress();
- URL url;
- try {
- url = new URL(address);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- String protocol = url.getProtocol();
- if (!protocol.equalsIgnoreCase("https")) {
- protocol = "https";
- String host = url.getHost();
- if (sslHost != null) {
- host = sslHost;
- }
- int port = url.getPort();
- if (sslPort > 0) {
- port = sslPort;
- }
- try {
- url = new URL(protocol, host, port, url.getFile());
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- address = url.toExternalForm();
- return
- new WSEndpointReference(address, epr.getVersion());
- }
- }
-
- return epr;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OutboundReferenceParameterHeader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OutboundReferenceParameterHeader.java
deleted file mode 100644
index d0ebbc42..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OutboundReferenceParameterHeader.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing;
-
-import com.sun.istack.internal.FinalArrayList;
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferException;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.message.AbstractHeaderImpl;
-import com.sun.xml.internal.ws.util.xml.XMLStreamWriterFilter;
-import org.w3c.dom.Element;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.stream.util.StreamReaderDelegate;
-import javax.xml.ws.WebServiceException;
-
-/**
- * Used to represent outbound header created from {@link WSEndpointReference}'s
- * referenec parameters.
- *
- * <p>
- * This is optimized for outbound use, so it implements some of the methods lazily,
- * in a slow way.
- *
- * <p>
- * This header adds "wsa:IsReferenceParameter" and thus only used for the W3C version.
- *
- * @author Kohsuke Kawaguchi
- */
-final class OutboundReferenceParameterHeader extends AbstractHeaderImpl {
- private final XMLStreamBuffer infoset;
- private final String nsUri,localName;
-
- /**
- * The attributes on the header element.
- * Lazily parsed.
- * Null if not parsed yet.
- */
- private FinalArrayList<Attribute> attributes;
-
- OutboundReferenceParameterHeader(XMLStreamBuffer infoset, String nsUri, String localName) {
- this.infoset = infoset;
- this.nsUri = nsUri;
- this.localName = localName;
- }
-
- @Override
- public @NotNull String getNamespaceURI() {
- return nsUri;
- }
-
- @Override
- public @NotNull String getLocalPart() {
- return localName;
- }
-
- @Override
- public String getAttribute(String nsUri, String localName) {
- if(attributes==null) {
- parseAttributes();
- }
- for(int i=attributes.size()-1; i>=0; i-- ) {
- Attribute a = attributes.get(i);
- if (a.localName.equals(localName) && a.nsUri.equals(nsUri)) {
- return a.value;
- }
- }
- return null;
- }
-
- /**
- * We don't really expect this to be used, but just to satisfy
- * the {@link Header} contract.
- *
- * So this is rather slow.
- */
- private void parseAttributes() {
- try {
- XMLStreamReader reader = readHeader();
- reader.nextTag(); // move to the first element, which is the header element
-
- attributes = new FinalArrayList<Attribute>();
- boolean refParamAttrWritten = false;
- for (int i = 0; i < reader.getAttributeCount(); i++) {
- final String attrLocalName = reader.getAttributeLocalName(i);
- final String namespaceURI = reader.getAttributeNamespace(i);
- final String value = reader.getAttributeValue(i);
- if (namespaceURI.equals(AddressingVersion.W3C.nsUri)&& attrLocalName.equals("IS_REFERENCE_PARAMETER")) {
- refParamAttrWritten = true;
- }
- attributes.add(new Attribute(namespaceURI,attrLocalName,value));
- }
- // we are adding one more attribute "wsa:IsReferenceParameter", if its not alrady there
- if (!refParamAttrWritten) {
- attributes.add(new Attribute(AddressingVersion.W3C.nsUri,IS_REFERENCE_PARAMETER,TRUE_VALUE));
- }
- } catch (XMLStreamException e) {
- throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e);
- }
- }
-
- @Override
- public XMLStreamReader readHeader() throws XMLStreamException {
- return new StreamReaderDelegate(infoset.readAsXMLStreamReader()) {
- int state=0; /* 0:expecting root, 1:in root, 2:past root */
- @Override
- public int next() throws XMLStreamException {
- return check(super.next());
- }
-
- @Override
- public int nextTag() throws XMLStreamException {
- return check(super.nextTag());
- }
-
- private int check(int type) {
- switch (state) {
- case 0:
- if (type == START_ELEMENT) {
- state = 1;
- }
- break;
- case 1:
- state = 2;
- break;
- default:
- break;
- }
-
- return type;
- }
-
- @Override
- public int getAttributeCount() {
- if (state == 1) {
- return super.getAttributeCount()+1;
- } else {
- return super.getAttributeCount();
- }
- }
-
- @Override
- public String getAttributeLocalName(int index) {
- if (state == 1 && index == super.getAttributeCount()) {
- return IS_REFERENCE_PARAMETER;
- } else {
- return super.getAttributeLocalName(index);
- }
- }
-
- @Override
- public String getAttributeNamespace(int index) {
- if (state == 1 && index==super.getAttributeCount()) {
- return AddressingVersion.W3C.nsUri;
- }
- else {
- return super.getAttributeNamespace(index);
- }
- }
-
- @Override
- public String getAttributePrefix(int index) {
- if(state==1 && index==super.getAttributeCount()) {
- return "wsa";
- } else {
- return super.getAttributePrefix(index);
- }
- }
-
- @Override
- public String getAttributeType(int index) {
- if(state==1 && index==super.getAttributeCount()) {
- return "CDATA";
- } else {
- return super.getAttributeType(index);
- }
- }
-
- @Override
- public String getAttributeValue(int index) {
- if(state==1 && index==super.getAttributeCount()) {
- return TRUE_VALUE;
- } else {
- return super.getAttributeValue(index);
- }
- }
-
- @Override
- public QName getAttributeName(int index) {
- if(state==1 && index==super.getAttributeCount()) {
- return new QName(AddressingVersion.W3C.nsUri, IS_REFERENCE_PARAMETER, "wsa");
- } else {
- return super.getAttributeName(index);
- }
- }
-
- @Override
- public String getAttributeValue(String namespaceUri, String localName) {
- if(state==1 && localName.equals(IS_REFERENCE_PARAMETER) && namespaceUri.equals(AddressingVersion.W3C.nsUri)) {
- return TRUE_VALUE;
- } else {
- return super.getAttributeValue(namespaceUri, localName);
- }
- }
- };
- }
-
- @Override
- public void writeTo(XMLStreamWriter w) throws XMLStreamException {
- infoset.writeToXMLStreamWriter(new XMLStreamWriterFilter(w) {
- private boolean root=true;
- private boolean onRootEl = true;
- @Override
- public void writeStartElement(String localName) throws XMLStreamException {
- super.writeStartElement(localName);
- writeAddedAttribute();
- }
-
- private void writeAddedAttribute() throws XMLStreamException {
- if(!root) {
- onRootEl = false;
- return;
- }
- root=false;
- writeNamespace("wsa",AddressingVersion.W3C.nsUri);
- super.writeAttribute("wsa",AddressingVersion.W3C.nsUri,IS_REFERENCE_PARAMETER,TRUE_VALUE);
- }
-
- @Override
- public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException {
- super.writeStartElement(namespaceURI, localName);
- writeAddedAttribute();
- }
-
- @Override
- public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
- //TODO: Verify with KK later
- //check if prefix is declared before writing start element.
- boolean prefixDeclared = isPrefixDeclared(prefix,namespaceURI);
- super.writeStartElement(prefix, localName, namespaceURI);
- if (!prefixDeclared && !prefix.equals("")) {
- super.writeNamespace(prefix,namespaceURI);
- }
- writeAddedAttribute();
- }
- @Override
- public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException{
- if (!isPrefixDeclared(prefix, namespaceURI)) {
- super.writeNamespace(prefix,namespaceURI);
- }
- }
-
- @Override
- public void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException {
- //skip if its on root element and attribute is wsa;IsReferenceParameter, as we write it.
- if(onRootEl && namespaceURI.equals(AddressingVersion.W3C.nsUri)
- && localName.equals(IS_REFERENCE_PARAMETER)) {
- return;
- }
- writer.writeAttribute(prefix, namespaceURI, localName, value);
- }
-
- @Override
- public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException {
- writer.writeAttribute(namespaceURI, localName, value);
- }
- private boolean isPrefixDeclared(String prefix, String namespaceURI ) {
- return namespaceURI.equals(getNamespaceContext().getNamespaceURI(prefix));
- }
- },true);
- }
-
- @Override
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- //TODO: SAAJ returns null instead of throwing SOAPException,
- // when there is no SOAPHeader in the message,
- // which leads to NPE.
- try {
- SOAPHeader header = saaj.getSOAPHeader();
- if (header == null) {
- header = saaj.getSOAPPart().getEnvelope().addHeader();
- }
- Element node = (Element)infoset.writeTo(header);
- node.setAttributeNS(AddressingVersion.W3C.nsUri,AddressingVersion.W3C.getPrefix()+":"+IS_REFERENCE_PARAMETER,TRUE_VALUE);
- } catch (XMLStreamBufferException e) {
- throw new SOAPException(e);
- }
- }
-
- @Override
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
- class Filter extends XMLFilterImpl {
- Filter(ContentHandler ch) { setContentHandler(ch); }
- private int depth=0;
- @Override
- public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
- if(depth++==0) {
- // add one more attribute
- super.startPrefixMapping("wsa",AddressingVersion.W3C.nsUri);
-
- //Add the attirbute wsa:IsReferenceParameter if not present already
- if(atts.getIndex(AddressingVersion.W3C.nsUri,IS_REFERENCE_PARAMETER) == -1) {
- AttributesImpl atts2 = new AttributesImpl(atts);
- atts2.addAttribute(
- AddressingVersion.W3C.nsUri,
- IS_REFERENCE_PARAMETER,
- "wsa:IsReferenceParameter",
- "CDATA",
- TRUE_VALUE);
- atts = atts2;
- }
- }
-
- super.startElement(uri, localName, qName, atts);
- }
-
- @Override
- public void endElement(String uri, String localName, String qName) throws SAXException {
- super.endElement(uri, localName, qName);
- if (--depth == 0) {
- super.endPrefixMapping("wsa");
- }
- }
- }
-
- infoset.writeTo(new Filter(contentHandler),errorHandler);
- }
-
-
- /**
- * Keep the information about an attribute on the header element.
- */
- static final class Attribute {
- /**
- * Can be empty but never null.
- */
- final String nsUri;
- final String localName;
- final String value;
-
- public Attribute(String nsUri, String localName, String value) {
- this.nsUri = fixNull(nsUri);
- this.localName = localName;
- this.value = value;
- }
-
- /**
- * Convert null to "".
- */
- private static String fixNull(String s) {
- return s == null ? "" : s;
- }
- }
-
- /**
- * We the performance paranoid people in the JAX-WS RI thinks
- * saving three bytes is worth while...
- */
- private static final String TRUE_VALUE = "1";
- private static final String IS_REFERENCE_PARAMETER = "IsReferenceParameter";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/WSEndpointReference.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/WSEndpointReference.java
deleted file mode 100644
index b32238c6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/WSEndpointReference.java
+++ /dev/null
@@ -1,1260 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.addressing;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferResult;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferSource;
-import com.sun.xml.internal.stream.buffer.sax.SAXBufferProcessor;
-import com.sun.xml.internal.stream.buffer.stax.StreamReaderBufferProcessor;
-import com.sun.xml.internal.stream.buffer.stax.StreamWriterBufferCreator;
-import com.sun.xml.internal.ws.addressing.EndpointReferenceUtil;
-import com.sun.xml.internal.ws.addressing.W3CAddressingMetadataConstants;
-import com.sun.xml.internal.ws.addressing.WSEPRExtension;
-import com.sun.xml.internal.ws.addressing.model.InvalidAddressingHeaderException;
-import com.sun.xml.internal.ws.addressing.v200408.MemberSubmissionAddressingConstants;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.HeaderList;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLExtension;
-import com.sun.xml.internal.ws.resources.AddressingMessages;
-import com.sun.xml.internal.ws.resources.ClientMessages;
-import com.sun.xml.internal.ws.spi.ProviderImpl;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.util.DOMUtil;
-import com.sun.xml.internal.ws.util.xml.XMLStreamWriterFilter;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import com.sun.xml.internal.ws.util.xml.XMLStreamReaderToXMLStreamWriter;
-import com.sun.xml.internal.ws.wsdl.parser.WSDLConstants;
-import org.w3c.dom.Element;
-import org.xml.sax.*;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Source;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import java.io.InputStream;
-import java.io.StringWriter;
-import java.net.URI;
-import java.net.URL;
-import java.util.*;
-
-/**
- * Internal representation of the EPR.
- *
- * <p>
- * Instances of this class are immutable and thread-safe.
- *
- * @author Kohsuke Kawaguchi
- * @author Rama Pulavarthi
- *
- * @see AddressingVersion#anonymousEpr
- */
-public final class WSEndpointReference implements WSDLExtension {
- private final XMLStreamBuffer infoset;
- /**
- * Version of the addressing spec.
- */
- private final AddressingVersion version;
-
- /**
- * Marked Reference parameters inside this EPR.
- *
- * Parsed when the object is created. can be empty but never null.
- * @see #parse()
- */
- private @NotNull Header[] referenceParameters;
- private @NotNull String address;
-
- private @NotNull QName rootElement;
- /**
- * Creates from the spec version of {@link EndpointReference}.
- *
- * <p>
- * This method performs the data conversion, so it's slow.
- * Do not use this method in a performance critical path.
- */
- public WSEndpointReference(EndpointReference epr, AddressingVersion version) {
- try {
- MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer();
- epr.writeTo(new XMLStreamBufferResult(xsb));
- this.infoset = xsb;
- this.version = version;
- this.rootElement = new QName("EndpointReference", version.nsUri);
- parse();
- } catch (XMLStreamException e) {
- throw new WebServiceException(ClientMessages.FAILED_TO_PARSE_EPR(epr),e);
- }
- }
-
- /**
- * Creates from the spec version of {@link EndpointReference}.
- *
- * <p>
- * This method performs the data conversion, so it's slow.
- * Do not use this method in a performance critical path.
- */
- public WSEndpointReference(EndpointReference epr) {
- this(epr,AddressingVersion.fromSpecClass(epr.getClass()));
- }
-
- /**
- * Creates a {@link WSEndpointReference} that wraps a given infoset.
- */
- public WSEndpointReference(XMLStreamBuffer infoset, AddressingVersion version) {
- try {
- this.infoset = infoset;
- this.version = version;
- this.rootElement = new QName("EndpointReference", version.nsUri);
- parse();
- } catch (XMLStreamException e) {
- // this can never happen because XMLStreamBuffer never has underlying I/O error.
- throw new AssertionError(e);
- }
- }
-
- /**
- * Creates a {@link WSEndpointReference} by parsing an infoset.
- */
- public WSEndpointReference(InputStream infoset, AddressingVersion version) throws XMLStreamException {
- this(XMLStreamReaderFactory.create(null,infoset,false),version);
- }
-
- /**
- * Creates a {@link WSEndpointReference} from the given infoset.
- * The {@link XMLStreamReader} must point to either a document or an element.
- */
- public WSEndpointReference(XMLStreamReader in, AddressingVersion version) throws XMLStreamException {
- this(XMLStreamBuffer.createNewBufferFromXMLStreamReader(in), version);
- }
-
- /**
- * @see #WSEndpointReference(String, AddressingVersion)
- */
- public WSEndpointReference(URL address, AddressingVersion version) {
- this(address.toExternalForm(), version);
- }
-
- /**
- * @see #WSEndpointReference(String, AddressingVersion)
- */
- public WSEndpointReference(URI address, AddressingVersion version) {
- this(address.toString(), version);
- }
-
- /**
- * Creates a {@link WSEndpointReference} that only has an address.
- */
- public WSEndpointReference(String address, AddressingVersion version) {
- this.infoset = createBufferFromAddress(address,version);
- this.version = version;
- this.address = address;
- this.rootElement = new QName("EndpointReference", version.nsUri);
- this.referenceParameters = EMPTY_ARRAY;
- }
-
- private static XMLStreamBuffer createBufferFromAddress(String address, AddressingVersion version) {
- try {
- MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer();
- StreamWriterBufferCreator w = new StreamWriterBufferCreator(xsb);
- w.writeStartDocument();
- w.writeStartElement(version.getPrefix(),
- "EndpointReference", version.nsUri);
- w.writeNamespace(version.getPrefix(), version.nsUri);
- w.writeStartElement(version.getPrefix(),version.eprType.address, version.nsUri);
- w.writeCharacters(address);
- w.writeEndElement();
- w.writeEndElement();
- w.writeEndDocument();
- w.close();
- return xsb;
- } catch (XMLStreamException e) {
- // can never happen because we are writing to XSB
- throw new AssertionError(e);
- }
- }
-
- /**
- * Creates an EPR from individual components.
- *
- * <p>
- * This version takes various information about metadata, and creates an EPR that has
- * the necessary embedded WSDL.
- */
- public WSEndpointReference(@NotNull AddressingVersion version,
- @NotNull String address,
- @Nullable QName service,
- @Nullable QName port,
- @Nullable QName portType,
- @Nullable List<Element> metadata,
- @Nullable String wsdlAddress,
- @Nullable List<Element> referenceParameters) {
- this(version, address, service, port, portType, metadata, wsdlAddress, null, referenceParameters, null, null);
- }
-
- /**
- * Creates an EPR from individual components.
- *
- * <p>
- * This version takes various information about metadata, and creates an EPR that has
- * the necessary embedded WSDL.
- */
- public WSEndpointReference(@NotNull AddressingVersion version,
- @NotNull String address,
- @Nullable QName service,
- @Nullable QName port,
- @Nullable QName portType,
- @Nullable List<Element> metadata,
- @Nullable String wsdlAddress,
- @Nullable List<Element> referenceParameters,
- @Nullable Collection<EPRExtension> extns,@Nullable Map<QName, String> attributes) {
- this(createBufferFromData(version, address, referenceParameters, service, port, portType, metadata, wsdlAddress, null, extns, attributes),
- version );
- }
-
- /**
- * Creates an EPR from individual components.
- *
- * <p>
- * This version takes various information about metadata, and creates an EPR that has
- * the necessary embedded WSDL.
- * @since JAX-WS 2.2
- */
- public WSEndpointReference(@NotNull AddressingVersion version,
- @NotNull String address,
- @Nullable QName service,
- @Nullable QName port,
- @Nullable QName portType,
- @Nullable List<Element> metadata,
- @Nullable String wsdlAddress,
- @Nullable String wsdlTargetNamepsace,
- @Nullable List<Element> referenceParameters,
- @Nullable List<Element> elements, @Nullable Map<QName, String> attributes) {
- this(
- createBufferFromData(version, address, referenceParameters, service, port, portType, metadata, wsdlAddress,wsdlTargetNamepsace, elements, attributes),
- version );
- }
-
- private static XMLStreamBuffer createBufferFromData(AddressingVersion version, String address, List<Element> referenceParameters, QName service, QName port, QName portType,
- List<Element> metadata, String wsdlAddress, String wsdlTargetNamespace, @Nullable List<Element> elements, @Nullable Map<QName, String> attributes) {
-
- StreamWriterBufferCreator writer = new StreamWriterBufferCreator();
-
- try {
- writer.writeStartDocument();
- writer.writeStartElement(version.getPrefix(),"EndpointReference", version.nsUri);
- writer.writeNamespace(version.getPrefix(),version.nsUri);
-
- writePartialEPRInfoset(writer, version, address, referenceParameters, service, port, portType,
- metadata,wsdlAddress, wsdlTargetNamespace, attributes);
-
- //write extensibility elements in the EPR element
- if (elements != null) {
- for (Element e : elements) {
- DOMUtil.serializeNode(e, writer);
- }
- }
-
- writer.writeEndElement();
- writer.writeEndDocument();
- writer.flush();
-
- return writer.getXMLStreamBuffer();
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- }
-
- private static XMLStreamBuffer createBufferFromData(AddressingVersion version, String address, List<Element> referenceParameters, QName service, QName port, QName portType,
- List<Element> metadata, String wsdlAddress, String wsdlTargetNamespace, @Nullable Collection<EPRExtension> extns, @Nullable Map<QName, String> attributes) {
-
- StreamWriterBufferCreator writer = new StreamWriterBufferCreator();
-
- try {
- writer.writeStartDocument();
- writer.writeStartElement(version.getPrefix(),"EndpointReference", version.nsUri);
- writer.writeNamespace(version.getPrefix(),version.nsUri);
-
- writePartialEPRInfoset(writer, version, address, referenceParameters, service, port, portType,
- metadata,wsdlAddress, wsdlTargetNamespace, attributes);
-
- //write extensibility elements in the EPR element
- if (extns != null) {
- for (EPRExtension e : extns) {
- XMLStreamReaderToXMLStreamWriter c = new XMLStreamReaderToXMLStreamWriter();
- XMLStreamReader r = e.readAsXMLStreamReader();
- c.bridge(r, writer);
- XMLStreamReaderFactory.recycle(r);
- }
- }
-
- writer.writeEndElement();
- writer.writeEndDocument();
- writer.flush();
-
- return writer.getXMLStreamBuffer();
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- }
-
- private static void writePartialEPRInfoset(StreamWriterBufferCreator writer, AddressingVersion version, String address, List<Element> referenceParameters, QName service, QName port, QName portType,
- List<Element> metadata, String wsdlAddress, String wsdlTargetNamespace, @Nullable Map<QName, String> attributes) throws XMLStreamException {
- //add extensibile attributes on the EPR element
- if (attributes != null) {
- for (Map.Entry<QName, String> entry : attributes.entrySet()) {
- QName qname = entry.getKey();
- writer.writeAttribute(qname.getPrefix(), qname.getNamespaceURI(), qname.getLocalPart(), entry.getValue());
- }
- }
-
- writer.writeStartElement(version.getPrefix(), version.eprType.address, version.nsUri);
- writer.writeCharacters(address);
- writer.writeEndElement();
- //When the size of ReferenceParametes is zero, the ReferenceParametes element will not be written.
- if(referenceParameters != null && referenceParameters.size() > 0) {
- writer.writeStartElement(version.getPrefix(), version.eprType.referenceParameters, version.nsUri);
- for (Element e : referenceParameters) {
- DOMUtil.serializeNode(e, writer);
- }
- writer.writeEndElement();
- }
-
- switch (version) {
- case W3C:
- writeW3CMetaData(writer, service, port, portType, metadata, wsdlAddress, wsdlTargetNamespace);
- break;
-
- case MEMBER:
- writeMSMetaData(writer, service, port, portType, metadata);
- if (wsdlAddress != null) {
- //Inline the wsdl as extensibility element
- //Write mex:Metadata wrapper
- writer.writeStartElement(MemberSubmissionAddressingConstants.MEX_METADATA.getPrefix(),
- MemberSubmissionAddressingConstants.MEX_METADATA.getLocalPart(),
- MemberSubmissionAddressingConstants.MEX_METADATA.getNamespaceURI());
- writer.writeStartElement(MemberSubmissionAddressingConstants.MEX_METADATA_SECTION.getPrefix(),
- MemberSubmissionAddressingConstants.MEX_METADATA_SECTION.getLocalPart(),
- MemberSubmissionAddressingConstants.MEX_METADATA_SECTION.getNamespaceURI());
- writer.writeAttribute(MemberSubmissionAddressingConstants.MEX_METADATA_DIALECT_ATTRIBUTE,
- MemberSubmissionAddressingConstants.MEX_METADATA_DIALECT_VALUE);
-
- writeWsdl(writer, service, wsdlAddress);
-
- writer.writeEndElement();
- writer.writeEndElement();
- }
-
- break;
- }
- }
-
- private static boolean isEmty(QName qname) {
- return qname == null || qname.toString().trim().length()== 0;
- }
-
- private static void writeW3CMetaData(StreamWriterBufferCreator writer,
- QName service,
- QName port,
- QName portType, List<Element> metadata,
- String wsdlAddress, String wsdlTargetNamespace) throws XMLStreamException {
-
-
- //.NET treate empty metaData element as bad request.
- if (isEmty(service) && isEmty(port) && isEmty(portType) && metadata == null/* && wsdlAddress == null*/) {
- return;
- }
-
- writer.writeStartElement(AddressingVersion.W3C.getPrefix(),
- AddressingVersion.W3C.eprType.wsdlMetadata.getLocalPart(), AddressingVersion.W3C.nsUri);
- writer.writeNamespace(AddressingVersion.W3C.getWsdlPrefix(),
- AddressingVersion.W3C.wsdlNsUri);
- //write wsdliLication as defined in WS-Addressing 1.0 Metadata spec
- if(wsdlAddress != null) {
- writeWsdliLocation(writer, service, wsdlAddress, wsdlTargetNamespace);
- }
-
- //Write Interface info
- if (portType != null) {
- writer.writeStartElement(W3CAddressingMetadataConstants.WSAM_PREFIX_NAME,
- AddressingVersion.W3C.eprType.portTypeName,
- W3CAddressingMetadataConstants.WSAM_NAMESPACE_NAME);
- writer.writeNamespace(W3CAddressingMetadataConstants.WSAM_PREFIX_NAME,
- W3CAddressingMetadataConstants.WSAM_NAMESPACE_NAME);
- String portTypePrefix = portType.getPrefix();
- if (portTypePrefix == null || portTypePrefix.equals("")) {
- //TODO check prefix again
- portTypePrefix = "wsns";
- }
- writer.writeNamespace(portTypePrefix, portType.getNamespaceURI());
- writer.writeCharacters(portTypePrefix + ":" + portType.getLocalPart());
- writer.writeEndElement();
- }
- if (service != null) {
- //Write service and Port info
- if (!(service.getNamespaceURI().equals("") || service.getLocalPart().equals(""))) {
- writer.writeStartElement(W3CAddressingMetadataConstants.WSAM_PREFIX_NAME,
- AddressingVersion.W3C.eprType.serviceName,
- W3CAddressingMetadataConstants.WSAM_NAMESPACE_NAME);
- writer.writeNamespace(W3CAddressingMetadataConstants.WSAM_PREFIX_NAME,
- W3CAddressingMetadataConstants.WSAM_NAMESPACE_NAME);
- String servicePrefix = service.getPrefix();
- if (servicePrefix == null || servicePrefix.equals("")) {
- //TODO check prefix again
- servicePrefix = "wsns";
- }
- writer.writeNamespace(servicePrefix, service.getNamespaceURI());
- if (port != null) {
- writer.writeAttribute(AddressingVersion.W3C.eprType.portName, port.getLocalPart());
- }
- writer.writeCharacters(servicePrefix + ":" + service.getLocalPart());
- writer.writeEndElement();
- }
- }
- /*
- //Inline the wsdl
- if (wsdlAddress != null) {
- writeWsdl(writer, service, wsdlAddress);
- }
- */
- //Add the extra metadata Elements
- if (metadata != null) {
- for (Element e : metadata) {
- DOMUtil.serializeNode(e, writer);
- }
- }
- writer.writeEndElement();
-
- }
-
- /**
- * @param writer the writer should be at the start of element.
- * @param service Namespace URI of servcie is used as targetNamespace of wsdl if wsdlTargetNamespace is not null
- * @param wsdlAddress wsdl location
- * @param wsdlTargetNamespace targetnamespace of wsdl to be put in wsdliLocation
- *
- */
- private static void writeWsdliLocation(StreamWriterBufferCreator writer, QName service,String wsdlAddress,String wsdlTargetNamespace) throws XMLStreamException {
- String wsdliLocation = "";
- if(wsdlTargetNamespace != null) {
- wsdliLocation = wsdlTargetNamespace + " ";
- } else if (service != null) {
- wsdliLocation = service.getNamespaceURI() + " ";
- } else {
- throw new WebServiceException("WSDL target Namespace cannot be resolved");
- }
- wsdliLocation += wsdlAddress;
- writer.writeNamespace(W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_PREFIX,
- W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_NAMESPACE);
- writer.writeAttribute(W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_PREFIX,
- W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_NAMESPACE,
- W3CAddressingMetadataConstants.WSAM_WSDLI_ATTRIBUTE_LOCALNAME,
- wsdliLocation);
-
- }
- private static void writeMSMetaData(StreamWriterBufferCreator writer,
- QName service,
- QName port,
- QName portType, List<Element> metadata) throws XMLStreamException {
- // TODO: write ReferenceProperties
- //TODO: write ReferenceParameters
- if (portType != null) {
- //Write Interface info
- writer.writeStartElement(AddressingVersion.MEMBER.getPrefix(),
- AddressingVersion.MEMBER.eprType.portTypeName,
- AddressingVersion.MEMBER.nsUri);
-
-
- String portTypePrefix = portType.getPrefix();
- if (portTypePrefix == null || portTypePrefix.equals("")) {
- //TODO check prefix again
- portTypePrefix = "wsns";
- }
- writer.writeNamespace(portTypePrefix, portType.getNamespaceURI());
- writer.writeCharacters(portTypePrefix + ":" + portType.getLocalPart());
- writer.writeEndElement();
- }
- //Write service and Port info
- if (service != null) {
- if (!(service.getNamespaceURI().equals("") || service.getLocalPart().equals(""))) {
- writer.writeStartElement(AddressingVersion.MEMBER.getPrefix(),
- AddressingVersion.MEMBER.eprType.serviceName,
- AddressingVersion.MEMBER.nsUri);
- String servicePrefix = service.getPrefix();
- if (servicePrefix == null || servicePrefix.equals("")) {
- //TODO check prefix again
- servicePrefix = "wsns";
- }
- writer.writeNamespace(servicePrefix, service.getNamespaceURI());
- if (port != null) {
- writer.writeAttribute(AddressingVersion.MEMBER.eprType.portName,
- port.getLocalPart());
- }
- writer.writeCharacters(servicePrefix + ":" + service.getLocalPart());
- writer.writeEndElement();
- }
- }
- }
-
- private static void writeWsdl(StreamWriterBufferCreator writer, QName service, String wsdlAddress) throws XMLStreamException {
- // Inline-wsdl
- writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
- WSDLConstants.QNAME_DEFINITIONS.getLocalPart(),
- WSDLConstants.NS_WSDL);
- writer.writeNamespace(WSDLConstants.PREFIX_NS_WSDL, WSDLConstants.NS_WSDL);
- writer.writeStartElement(WSDLConstants.PREFIX_NS_WSDL,
- WSDLConstants.QNAME_IMPORT.getLocalPart(),
- WSDLConstants.NS_WSDL);
- writer.writeAttribute("namespace", service.getNamespaceURI());
- writer.writeAttribute("location", wsdlAddress);
- writer.writeEndElement();
- writer.writeEndElement();
- }
-
-
-
- /**
- * Converts from {@link EndpointReference}.
- *
- * This handles null {@link EndpointReference} correctly.
- * Call {@link #WSEndpointReference(EndpointReference)} directly
- * if you know it's not null.
- */
- public static @Nullable
- WSEndpointReference create(@Nullable EndpointReference epr) {
- if (epr != null) {
- return new WSEndpointReference(epr);
- } else {
- return null;
- }
- }
-
- /**
- * @see #createWithAddress(String)
- */
- public @NotNull WSEndpointReference createWithAddress(@NotNull URI newAddress) {
- return createWithAddress(newAddress.toString());
- }
-
- /**
- * @see #createWithAddress(String)
- */
- public @NotNull WSEndpointReference createWithAddress(@NotNull URL newAddress) {
- return createWithAddress(newAddress.toString());
- }
-
- /**
- * Creates a new {@link WSEndpointReference} by replacing the address of this EPR
- * to the new one.
- *
- * <p>
- * The following example shows how you can use this to force an HTTPS EPR,
- * when the endpoint can serve both HTTP and HTTPS requests.
- * <pre>
- * if(epr.getAddress().startsWith("http:"))
- * epr = epr.createWithAddress("https:"+epr.getAddress().substring(5));
- * </pre>
- *
- * @param newAddress
- * This is a complete URL to be written inside &lt;Adress> element of the EPR,
- * such as "http://foo.bar/abc/def"
- */
- public @NotNull WSEndpointReference createWithAddress(@NotNull final String newAddress) {
- MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer();
- XMLFilterImpl filter = new XMLFilterImpl() {
- private boolean inAddress = false;
- @Override
- public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
- if (localName.equals("Address") && uri.equals(version.nsUri)) {
- inAddress = true;
- }
- super.startElement(uri,localName,qName,atts);
- }
-
- @Override
- public void characters(char ch[], int start, int length) throws SAXException {
- if (!inAddress) {
- super.characters(ch, start, length);
- }
- }
-
- @Override
- public void endElement(String uri, String localName, String qName) throws SAXException {
- if (inAddress) {
- super.characters(newAddress.toCharArray(),0,newAddress.length());
- }
- inAddress = false;
- super.endElement(uri, localName, qName);
- }
- };
- filter.setContentHandler(xsb.createFromSAXBufferCreator());
- try {
- infoset.writeTo(filter,false);
- } catch (SAXException e) {
- throw new AssertionError(e); // impossible since we are writing from XSB to XSB.
- }
-
- return new WSEndpointReference(xsb,version);
- }
-
- /**
- * Convert the EPR to the spec version. The actual type of
- * {@link EndpointReference} to be returned depends on which version
- * of the addressing spec this EPR conforms to.
- *
- * @throws WebServiceException
- * if the conversion fails, which can happen if the EPR contains
- * invalid infoset (wrong namespace URI, etc.)
- */
- public @NotNull EndpointReference toSpec() {
- return ProviderImpl.INSTANCE.readEndpointReference(asSource("EndpointReference"));
- }
-
- /**
- * Converts the EPR to the specified spec version.
- *
- * If the {@link #getVersion() the addressing version in use} and
- * the given class is different, then this may involve version conversion.
- */
- public @NotNull <T extends EndpointReference> T toSpec(Class<T> clazz) {
- return EndpointReferenceUtil.transform(clazz,toSpec());
- }
-
- /**
- * Creates a proxy that can be used to talk to this EPR.
- *
- * <p>
- * All the normal WS-Addressing processing happens automatically,
- * such as setting the endpoint address to {@link #getAddress() the address},
- * and sending the reference parameters associated with this EPR as
- * headers, etc.
- */
- public @NotNull <T> T getPort(@NotNull Service jaxwsService,
- @NotNull Class<T> serviceEndpointInterface,
- WebServiceFeature... features) {
- // TODO: implement it in a better way
- return jaxwsService.getPort(toSpec(),serviceEndpointInterface,features);
- }
-
- /**
- * Creates a {@link Dispatch} that can be used to talk to this EPR.
- *
- * <p>
- * All the normal WS-Addressing processing happens automatically,
- * such as setting the endpoint address to {@link #getAddress() the address},
- * and sending the reference parameters associated with this EPR as
- * headers, etc.
- */
- public @NotNull <T> Dispatch<T> createDispatch(
- @NotNull Service jaxwsService,
- @NotNull Class<T> type,
- @NotNull Service.Mode mode,
- WebServiceFeature... features) {
-
- // TODO: implement it in a better way
- return jaxwsService.createDispatch(toSpec(),type,mode,features);
- }
-
- /**
- * Creates a {@link Dispatch} that can be used to talk to this EPR.
- *
- * <p>
- * All the normal WS-Addressing processing happens automatically,
- * such as setting the endpoint address to {@link #getAddress() the address},
- * and sending the reference parameters associated with this EPR as
- * headers, etc.
- */
- public @NotNull Dispatch<Object> createDispatch(
- @NotNull Service jaxwsService,
- @NotNull JAXBContext context,
- @NotNull Service.Mode mode,
- WebServiceFeature... features) {
-
- // TODO: implement it in a better way
- return jaxwsService.createDispatch(toSpec(),context,mode,features);
- }
-
- /**
- * Gets the addressing version of this EPR.
- */
- public @NotNull AddressingVersion getVersion() {
- return version;
- }
-
- /**
- * The value of the &lt;wsa:address> header.
- */
- public @NotNull String getAddress() {
- return address;
- }
-
- /**
- * Returns true if this has anonymous URI as the {@link #getAddress() address}.
- */
- public boolean isAnonymous() {
- return address.equals(version.anonymousUri);
- }
-
- /**
- * Returns true if this has {@link AddressingVersion#noneUri none URI}
- * as the {@link #getAddress() address}.
- */
- public boolean isNone() {
- return address.equals(version.noneUri);
- }
-
- /**
- * Parses inside EPR and mark all reference parameters.
- */
- private void parse() throws XMLStreamException {
- // TODO: validate the EPR structure.
- // check for non-existent Address, that sort of things.
-
- StreamReaderBufferProcessor xsr = infoset.readAsXMLStreamReader();
-
- // parser should be either at the start element or the start document
- if (xsr.getEventType()==XMLStreamReader.START_DOCUMENT) {
- xsr.nextTag();
- }
- assert xsr.getEventType()==XMLStreamReader.START_ELEMENT;
-
- String rootLocalName = xsr.getLocalName();
- if(!xsr.getNamespaceURI().equals(version.nsUri)) {
- throw new WebServiceException(AddressingMessages.WRONG_ADDRESSING_VERSION(
- version.nsUri, xsr.getNamespaceURI()));
- }
-
- this.rootElement = new QName(xsr.getNamespaceURI(), rootLocalName);
-
- // since often EPR doesn't have a reference parameter, create array lazily
- List<Header> marks=null;
-
- while(xsr.nextTag()==XMLStreamReader.START_ELEMENT) {
- String localName = xsr.getLocalName();
- if(version.isReferenceParameter(localName)) {
- XMLStreamBuffer mark;
- while((mark = xsr.nextTagAndMark())!=null) {
- if (marks==null) {
- marks = new ArrayList<Header>();
- }
-
- // TODO: need a different header for member submission version
- marks.add(version.createReferenceParameterHeader(
- mark, xsr.getNamespaceURI(), xsr.getLocalName()));
- XMLStreamReaderUtil.skipElement(xsr);
- }
- } else
- if(localName.equals("Address")) {
- if (address!=null) {
- throw new InvalidAddressingHeaderException(new QName(version.nsUri,rootLocalName),AddressingVersion.fault_duplicateAddressInEpr);
- }
- address = xsr.getElementText().trim();
- } else {
- XMLStreamReaderUtil.skipElement(xsr);
- }
- }
-
- // hit to </EndpointReference> by now
-
- if (marks==null) {
- this.referenceParameters = EMPTY_ARRAY;
- } else {
- this.referenceParameters = marks.toArray(new Header[marks.size()]);
- }
-
- if (address==null) {
- throw new InvalidAddressingHeaderException(new QName(version.nsUri,rootLocalName),version.fault_missingAddressInEpr);
- }
- }
-
-
- /**
- * Reads this EPR as {@link XMLStreamReader}.
- *
- * @param localName
- * EPR uses a different root tag name depending on the context.
- * The returned {@link XMLStreamReader} will use the given local name
- * for the root element name.
- */
- public XMLStreamReader read(final @NotNull String localName) throws XMLStreamException {
- return new StreamReaderBufferProcessor(infoset) {
- @Override
- protected void processElement(String prefix, String uri, String _localName, boolean inScope) {
- if (_depth == 0) {
- _localName = localName;
- }
- super.processElement(prefix, uri, _localName, isInscope(infoset,_depth));
- }
- };
- }
-
- private boolean isInscope(XMLStreamBuffer buffer, int depth) {
- return buffer.getInscopeNamespaces().size() > 0 && depth ==0;
- }
-
- /**
- * Returns a {@link Source} that represents this EPR.
- *
- * @param localName
- * EPR uses a different root tag name depending on the context.
- * The returned {@link Source} will use the given local name
- * for the root element name.
- */
- public Source asSource(@NotNull String localName) {
- return new SAXSource(new SAXBufferProcessorImpl(localName),new InputSource());
- }
-
- /**
- * Writes this EPR to the given {@link ContentHandler}.
- *
- * @param localName
- * EPR uses a different root tag name depending on the context.
- * The returned {@link Source} will use the given local name
- * for the root element name.
- * @param fragment
- * If true, generate a fragment SAX events without start/endDocument callbacks.
- * If false, generate a full XML document event.
- */
- public void writeTo(@NotNull String localName, ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
- SAXBufferProcessorImpl p = new SAXBufferProcessorImpl(localName);
- p.setContentHandler(contentHandler);
- p.setErrorHandler(errorHandler);
- p.process(infoset,fragment);
- }
-
- /**
- * Writes this EPR into the given writer.
- *
- * @param localName
- * EPR uses a different root tag name depending on the context.
- * The returned {@link Source} will use the given local name
- */
- public void writeTo(final @NotNull String localName, @NotNull XMLStreamWriter w) throws XMLStreamException {
- infoset.writeToXMLStreamWriter(new XMLStreamWriterFilter(w) {
- private boolean root=true;
-
- @Override
- public void writeStartDocument() throws XMLStreamException {
- }
-
- @Override
- public void writeStartDocument(String encoding, String version) throws XMLStreamException {
- }
-
- @Override
- public void writeStartDocument(String version) throws XMLStreamException {
- }
-
- @Override
- public void writeEndDocument() throws XMLStreamException {
- }
-
- private String override(String ln) {
- if(root) {
- root = false;
- return localName;
- }
- return ln;
- }
-
- @Override
- public void writeStartElement(String localName) throws XMLStreamException {
- super.writeStartElement(override(localName));
- }
-
- @Override
- public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException {
- super.writeStartElement(namespaceURI, override(localName));
- }
-
- @Override
- public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
- super.writeStartElement(prefix, override(localName), namespaceURI);
- }
- },true/*write as fragment*/);
- }
-
- /**
- * Returns a {@link Header} that wraps this {@link WSEndpointReference}.
- *
- * <p>
- * The returned header is immutable too, and can be reused with
- * many {@link Message}s.
- *
- * @param rootTagName
- * The header tag name to be used, such as &lt;ReplyTo> or &lt;FaultTo>.
- * (It's bit ugly that this method takes {@link QName} and not just local name,
- * unlike other methods. If it's making the caller's life miserable, then
- * we can talk.)
- */
- public Header createHeader(QName rootTagName) {
- return new EPRHeader(rootTagName,this);
- }
-
- /**
- * Copies all the reference parameters in this EPR as headers
- * to the given {@link HeaderList}.
- * @deprecated - use addReferenceParametersToList(MessageHeaders)
- */
- @SuppressWarnings("ManualArrayToCollectionCopy")
- public void addReferenceParametersToList(HeaderList outbound) {
- // implemented through iteration because of unsupportedoperation exception thrown from addAll method on headerlist
- // do not change
- for (Header header : referenceParameters) {
- outbound.add(header);
- }
- }
-
- /**
- * Copies all the reference parameters in this EPR as headers
- * to the given {@link MessageHeaders}.
- */
- public void addReferenceParametersToList(MessageHeaders outbound) {
- for (Header header : referenceParameters) {
- outbound.add(header);
- }
- }
- /**
- * Copies all the reference parameters from the given {@link HeaderList}
- * to this EPR
- */
- public void addReferenceParameters(HeaderList headers) {
- if (headers != null) {
- Header[] hs = new Header[referenceParameters.length + headers.size()];
- System.arraycopy(referenceParameters, 0, hs, 0, referenceParameters.length);
- int i = referenceParameters.length;
- for (Header h : headers) {
- hs[i++] = h;
- }
- referenceParameters = hs;
- }
- }
-
- /**
- * Dumps the EPR infoset in a human-readable string.
- */
- @Override
- public String toString() {
- try {
- // debug convenience
- StringWriter sw = new StringWriter();
- XmlUtil.newTransformer().transform(asSource("EndpointReference"),new StreamResult(sw));
- return sw.toString();
- } catch (TransformerException e) {
- return e.toString();
- }
- }
-
- /**
- * Gets the QName of the EndpointReference element.
- * @return
- */
- @Override
- public QName getName() {
- return rootElement;
- }
-
- /**
- * Filtering {@link SAXBufferProcessor} that replaces the root tag name.
- */
- class SAXBufferProcessorImpl extends SAXBufferProcessor {
- private final String rootLocalName;
- private boolean root=true;
-
- public SAXBufferProcessorImpl(String rootLocalName) {
- super(infoset,false);
- this.rootLocalName = rootLocalName;
- }
-
- @Override
- protected void processElement(String uri, String localName, String qName, boolean inscope) throws SAXException {
- if(root) {
- root = false;
-
- if(qName.equals(localName)) {
- qName = localName = rootLocalName;
- } else {
- localName = rootLocalName;
- int idx = qName.indexOf(':');
- qName = qName.substring(0,idx+1)+rootLocalName;
- }
- }
- super.processElement(uri, localName, qName, inscope);
- }
- }
-
- private static final OutboundReferenceParameterHeader[] EMPTY_ARRAY = new OutboundReferenceParameterHeader[0];
-
- private Map<QName, EPRExtension> rootEprExtensions;
-
- /**
- * Represents an extensibility element inside an EndpointReference
- */
- public static abstract class EPRExtension {
- public abstract XMLStreamReader readAsXMLStreamReader() throws XMLStreamException;
-
- public abstract QName getQName();
- }
-
- /**
- * Returns the first extensibility element inside EPR root element with input QName.
- */
- public @Nullable
- EPRExtension getEPRExtension(final QName extnQName) throws XMLStreamException {
- if (rootEprExtensions == null) {
- parseEPRExtensions();
- }
- return rootEprExtensions.get(extnQName);
- }
-
- public @NotNull Collection<EPRExtension> getEPRExtensions() throws XMLStreamException {
- if (rootEprExtensions == null) {
- parseEPRExtensions();
- }
- return rootEprExtensions.values();
- }
-
- private void parseEPRExtensions() throws XMLStreamException {
-
- rootEprExtensions = new HashMap<QName, EPRExtension>();
-
-
- StreamReaderBufferProcessor xsr = infoset.readAsXMLStreamReader();
-
- // parser should be either at the start element or the start document
- if (xsr.getEventType() == XMLStreamReader.START_DOCUMENT) {
- xsr.nextTag();
- }
- assert xsr.getEventType() == XMLStreamReader.START_ELEMENT;
-
- if (!xsr.getNamespaceURI().equals(version.nsUri)) {
- throw new WebServiceException(AddressingMessages.WRONG_ADDRESSING_VERSION(
- version.nsUri, xsr.getNamespaceURI()));
- }
-
- // since often EPR doesn't have extensions, create array lazily
- XMLStreamBuffer mark;
- String localName;
- String ns;
- while ((mark = xsr.nextTagAndMark()) != null) {
- localName = xsr.getLocalName();
- ns = xsr.getNamespaceURI();
- if (version.nsUri.equals(ns)) {
- //EPR extensions do not use the same namespace of the Addressing Version.
- //Not an extension - SKIP
- XMLStreamReaderUtil.skipElement(xsr);
- } else {
- QName qn = new QName(ns, localName);
- rootEprExtensions.put(qn, new WSEPRExtension(mark,qn));
- XMLStreamReaderUtil.skipElement(xsr);
- }
- }
- // hit to </EndpointReference> by now
- }
-
- /**
- * Parses the metadata inside this EPR and obtains it in a easy-to-process form.
- *
- * <p>
- * See {@link Metadata} class for what's avaliable as "metadata".
- */
- public @NotNull Metadata getMetaData() {
- return new Metadata();
- }
-
- /**
- * Parses the Metadata in an EPR and provides convenience methods to access
- * the metadata.
- *
- */
- public class Metadata {
- private @Nullable QName serviceName;
- private @Nullable QName portName;
- private @Nullable QName portTypeName; //interfaceName
- private @Nullable Source wsdlSource;
- private @Nullable String wsdliLocation;
-
- public @Nullable QName getServiceName(){
- return serviceName;
- }
- public @Nullable QName getPortName(){
- return portName;
- }
- public @Nullable QName getPortTypeName(){
- return portTypeName;
- }
- public @Nullable Source getWsdlSource(){
- return wsdlSource;
- }
- public @Nullable String getWsdliLocation(){
- return wsdliLocation;
- }
-
- private Metadata() {
- try {
- parseMetaData();
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- }
-
- /**
- * Parses the Metadata section of the EPR.
- */
- private void parseMetaData() throws XMLStreamException {
- StreamReaderBufferProcessor xsr = infoset.readAsXMLStreamReader();
-
- // parser should be either at the start element or the start document
- if (xsr.getEventType() == XMLStreamReader.START_DOCUMENT) {
- xsr.nextTag();
- }
- assert xsr.getEventType() == XMLStreamReader.START_ELEMENT;
- String rootElement = xsr.getLocalName();
- if (!xsr.getNamespaceURI().equals(version.nsUri)) {
- throw new WebServiceException(AddressingMessages.WRONG_ADDRESSING_VERSION(
- version.nsUri, xsr.getNamespaceURI()));
- }
- String localName;
- String ns;
- if (version == AddressingVersion.W3C) {
- do {
- //If the current element is metadata enclosure, look inside
- if (xsr.getLocalName().equals(version.eprType.wsdlMetadata.getLocalPart())) {
- String wsdlLoc = xsr.getAttributeValue("http://www.w3.org/ns/wsdl-instance","wsdlLocation");
- if (wsdlLoc != null) {
- wsdliLocation = wsdlLoc.trim();
- }
- XMLStreamBuffer mark;
- while ((mark = xsr.nextTagAndMark()) != null) {
- localName = xsr.getLocalName();
- ns = xsr.getNamespaceURI();
- if (localName.equals(version.eprType.serviceName)) {
- String portStr = xsr.getAttributeValue(null, version.eprType.portName);
- if (serviceName != null) {
- throw new RuntimeException("More than one "+ version.eprType.serviceName +" element in EPR Metadata");
- }
- serviceName = getElementTextAsQName(xsr);
- if (serviceName != null && portStr != null) {
- portName = new QName(serviceName.getNamespaceURI(), portStr);
- }
- } else if (localName.equals(version.eprType.portTypeName)) {
- if (portTypeName != null) {
- throw new RuntimeException("More than one "+ version.eprType.portTypeName +" element in EPR Metadata");
- }
- portTypeName = getElementTextAsQName(xsr);
- } else if (ns.equals(WSDLConstants.NS_WSDL)
- && localName.equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart())) {
- wsdlSource = new XMLStreamBufferSource(mark);
- } else {
- XMLStreamReaderUtil.skipElement(xsr);
- }
- }
- } else {
- //Skip is it is not root element
- if (!xsr.getLocalName().equals(rootElement)) {
- XMLStreamReaderUtil.skipElement(xsr);
- }
- }
- } while (XMLStreamReaderUtil.nextElementContent(xsr) == XMLStreamReader.START_ELEMENT);
-
- if(wsdliLocation != null) {
- String wsdlLocation = wsdliLocation.trim();
- wsdlLocation = wsdlLocation.substring(wsdliLocation.lastIndexOf(" "));
- wsdlSource = new StreamSource(wsdlLocation);
- }
- } else if (version == AddressingVersion.MEMBER) {
- do {
- localName = xsr.getLocalName();
- ns = xsr.getNamespaceURI();
- //If the current element is metadata enclosure, look inside
- if (localName.equals(version.eprType.wsdlMetadata.getLocalPart()) &&
- ns.equals(version.eprType.wsdlMetadata.getNamespaceURI())) {
- while (xsr.nextTag() == XMLStreamReader.START_ELEMENT) {
- XMLStreamBuffer mark;
- while ((mark = xsr.nextTagAndMark()) != null) {
- localName = xsr.getLocalName();
- ns = xsr.getNamespaceURI();
- if (ns.equals(WSDLConstants.NS_WSDL)
- && localName.equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart())) {
- wsdlSource = new XMLStreamBufferSource(mark);
- } else {
- XMLStreamReaderUtil.skipElement(xsr);
- }
- }
- }
- } else if (localName.equals(version.eprType.serviceName)) {
- String portStr = xsr.getAttributeValue(null, version.eprType.portName);
- serviceName = getElementTextAsQName(xsr);
- if (serviceName != null && portStr != null) {
- portName = new QName(serviceName.getNamespaceURI(), portStr);
- }
- } else if (localName.equals(version.eprType.portTypeName)) {
- portTypeName = getElementTextAsQName(xsr);
- } else {
- //Skip is it is not root element
- if (!xsr.getLocalName().equals(rootElement)) {
- XMLStreamReaderUtil.skipElement(xsr);
- }
- }
- } while (XMLStreamReaderUtil.nextElementContent(xsr) == XMLStreamReader.START_ELEMENT);
- }
- }
-
- private QName getElementTextAsQName(StreamReaderBufferProcessor xsr) throws XMLStreamException {
- String text = xsr.getElementText().trim();
- String prefix = XmlUtil.getPrefix(text);
- String name = XmlUtil.getLocalPart(text);
- if (name != null) {
- if (prefix != null) {
- String ns = xsr.getNamespaceURI(prefix);
- if (ns != null) {
- return new QName(ns, name, prefix);
- }
- } else {
- return new QName(null, name);
- }
- }
- return null;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/package-info.java
deleted file mode 100644
index 9b714f6d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/package-info.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-@javax.xml.bind.annotation.XmlSchema(namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing",
- location = "http://schemas.xmlsoap.org/ws/2004/08/addressing")
-package com.sun.xml.internal.ws.api.addressing;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ClientPipelineHook.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ClientPipelineHook.java
deleted file mode 100644
index 3b4d911f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ClientPipelineHook.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.pipe.Pipe;
-import com.sun.xml.internal.ws.api.pipe.ClientPipeAssemblerContext;
-
-/**
- * Allow the container (primarily Glassfish) to inject
- * their own pipes into the client pipeline.
- *
- * <p>
- * This interface has a rather ad-hoc set of methods, because
- * we didn't want to define an autonomous pipe-assembly process.
- * (We thought this is a smaller evil compared to that.)
- *
- * <p>
- * JAX-WS obtains this through {@link com.sun.xml.internal.ws.api.server.Container#getSPI(Class)}.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class ClientPipelineHook {
-
- /**
- * Called during the pipeline construction process once to allow a container
- * to register a pipe for security.
- *
- * This pipe will be injected to a point very close to the transport, allowing
- * it to do some security operations.
- *
- * @param ctxt
- * Represents abstraction of SEI, WSDL abstraction etc. Context can be used
- * whether add a new pipe to the head or not.
- *
- * @param tail
- * Head of the partially constructed pipeline. If the implementation
- * wishes to add new pipes, it should do so by extending
- * {@link com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterPipeImpl} and making sure that this {@link com.sun.xml.internal.ws.api.pipe.Pipe}
- * eventually processes messages.
- *
- * @return
- * The default implementation just returns <tt>tail</tt>, which means
- * no additional pipe is inserted. If the implementation adds
- * new pipes, return the new head pipe.
- */
- public @NotNull Pipe createSecurityPipe(ClientPipeAssemblerContext ctxt, @NotNull Pipe tail) {
- return tail;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/SelectOptimalEncodingFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/SelectOptimalEncodingFeature.java
deleted file mode 100644
index f40bfc1b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/SelectOptimalEncodingFeature.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-import com.sun.xml.internal.ws.api.FeatureConstructor;
-
-import javax.xml.ws.WebServiceFeature;
-
-import com.sun.org.glassfish.gmbal.ManagedAttribute;
-import com.sun.org.glassfish.gmbal.ManagedData;
-
-/**
- * Client side feature to enable or disable the selection of the optimal
- * encoding by the client when sending outbound messages.
- * <p>
- * The following describes the affects of this feature with respect
- * to being enabled or disabled:
- * <ul>
- * <li> ENABLED: In this Mode, the most optimal encoding will be selected
- * depending on the configuration and capabilities of the client
- * the capabilities of the Web service.
- * <li> DISABLED: In this Mode, the default encoding will be selected.
- * </ul>
- * <p>
- * If this feature is not present on a Web service then the default behaviour
- * is equivalent to this feature being present and disabled.
- * <p>
- * If this feature is enabled by the client and the Service supports the
- * Fast Infoset encoding, as specified by the {@link com.sun.xml.internal.ws.api.fastinfoset.FastInfosetFeature},
- * and Fast Infoset is determined to be the most optimal encoding, then the
- * Fast Infoset encoding will be automatically selected by the client.
- * <p>
- * TODO: Still not sure if a feature is a server side only thing or can
- * also be a client side thing. If the former then this class should be
- * removed.
- * @author Paul.Sandoz@Sun.Com
- */
-@ManagedData
-public class SelectOptimalEncodingFeature extends WebServiceFeature {
- /**
- * Constant value identifying the {@link SelectOptimalEncodingFeature}
- */
- public static final String ID = "http://java.sun.com/xml/ns/jaxws/client/selectOptimalEncoding";
-
- /**
- * Create a {@link SelectOptimalEncodingFeature}.
- * The instance created will be enabled.
- */
- public SelectOptimalEncodingFeature() {
- this.enabled = true;
- }
-
- /**
- * Create a {@link SelectOptimalEncodingFeature}
- *
- * @param enabled specifies whether this feature should
- * be enabled or not.
- */
- @FeatureConstructor({"enabled"})
- public SelectOptimalEncodingFeature(boolean enabled) {
- this.enabled = enabled;
- }
-
- /**
- * {@inheritDoc}
- */
- @ManagedAttribute
- public String getID() {
- return ID;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptor.java
deleted file mode 100644
index 9e126a5f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptor.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-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.WSBinding;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.developer.WSBindingProvider;
-
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.WebServiceFeature;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Interception point for inner working of {@link WSService}.
- *
- * <p>
- * System-level code could hook an implementation of this to
- * {@link WSService} to augument its behavior.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.1 EA3
- * @see ServiceInterceptorFactory
- */
-public abstract class ServiceInterceptor {
- /**
- * Called before {@link WSBinding} is created, to allow interceptors
- * to add {@link WebServiceFeature}s to the created {@link WSBinding}.
- *
- * @param port
- * Information about the port for which dispatch/proxy will be created.
- * @param serviceEndpointInterface
- * Null if the created binding is for {@link Dispatch}. Otheriwse
- * it represents the port interface of the proxy to be created.
- * @param defaultFeatures
- * The list of features that are currently scheduled to be set for
- * the newly created {@link WSBinding}.
- *
- * @return
- * A set of features to be added to the newly created {@link WSBinding}.
- * Can be empty but never null.
- * <tt>defaultFeatures</tt> will take precedence over what this method
- * would return (because it includes user-specified ones which will
- * take the at-most priority), but features you return from this method
- * will take precedence over {@link BindingID}'s
- * {@link BindingID#createBuiltinFeatureList() implicit features}.
- */
- public List<WebServiceFeature> preCreateBinding(@NotNull WSPortInfo port, @Nullable Class<?> serviceEndpointInterface, @NotNull WSFeatureList defaultFeatures) {
- return Collections.emptyList();
- }
-
- /**
- * A callback to notify the event of creation of proxy object for SEI endpoint. The
- * callback could set some properties on the {@link BindingProvider}.
- *
- * @param bp created proxy instance
- * @param serviceEndpointInterface SEI of the endpoint
- */
- public void postCreateProxy(@NotNull WSBindingProvider bp,@NotNull Class<?> serviceEndpointInterface) {
- }
-
- /**
- * A callback to notify that a {@link Dispatch} object is created. The callback
- * could set some properties on the {@link BindingProvider}.
- *
- * @param bp BindingProvider of dispatch object
- */
- public void postCreateDispatch(@NotNull WSBindingProvider bp) {
- }
-
- /**
- * Aggregates multiple interceptors into one facade.
- */
- public static ServiceInterceptor aggregate(final ServiceInterceptor... interceptors) {
- if(interceptors.length==1)
- return interceptors[0];
- return new ServiceInterceptor() {
- public List<WebServiceFeature> preCreateBinding(@NotNull WSPortInfo port, @Nullable Class<?> portInterface, @NotNull WSFeatureList defaultFeatures) {
- List<WebServiceFeature> r = new ArrayList<WebServiceFeature>();
- for (ServiceInterceptor si : interceptors)
- r.addAll(si.preCreateBinding(port,portInterface,defaultFeatures));
- return r;
- }
-
- public void postCreateProxy(@NotNull WSBindingProvider bp, @NotNull Class<?> serviceEndpointInterface) {
- for (ServiceInterceptor si : interceptors)
- si.postCreateProxy(bp,serviceEndpointInterface);
- }
-
- public void postCreateDispatch(@NotNull WSBindingProvider bp) {
- for (ServiceInterceptor si : interceptors)
- si.postCreateDispatch(bp);
- }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptorFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptorFactory.java
deleted file mode 100644
index 0c8e5613..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptorFactory.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-
-import javax.xml.ws.Service;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Creates {@link ServiceInterceptor}.
- *
- * <p>
- * Code that wishes to inject {@link ServiceInterceptor} into {@link WSService}
- * must implement this class. There are two ways to have the JAX-WS RI
- * recognize your {@link ServiceInterceptor}s.
- *
- * <h3>Use {@link ServiceFinder}</h3>
- * <p>
- * {@link ServiceInterceptorFactory}s discovered via {@link ServiceFinder}
- * will be incorporated to all {@link WSService} instances.
- *
- * <h3>Register per-thread</h3>
- *
- *
- * @author Kohsuke Kawaguchi
- * @see ServiceInterceptor
- * @see 2.1 EA3
- */
-public abstract class ServiceInterceptorFactory {
- public abstract ServiceInterceptor create(@NotNull WSService service);
-
- /**
- * Loads all {@link ServiceInterceptor}s and return aggregated one.
- */
- public static @NotNull ServiceInterceptor load(@NotNull WSService service, @Nullable ClassLoader cl) {
- List<ServiceInterceptor> l = new ArrayList<ServiceInterceptor>();
-
- // first service look-up
- for( ServiceInterceptorFactory f : ServiceFinder.find(ServiceInterceptorFactory.class))
- l.add(f.create(service));
-
- // then thread-local
- for( ServiceInterceptorFactory f : threadLocalFactories.get())
- l.add(f.create(service));
-
- return ServiceInterceptor.aggregate(l.toArray(new ServiceInterceptor[l.size()]));
- }
-
- private static ThreadLocal<Set<ServiceInterceptorFactory>> threadLocalFactories = new ThreadLocal<Set<ServiceInterceptorFactory>>() {
- protected Set<ServiceInterceptorFactory> initialValue() {
- return new HashSet<ServiceInterceptorFactory>();
- }
- };
-
- /**
- * Registers {@link ServiceInterceptorFactory} for this thread.
- *
- * <p>
- * Once registered, {@link ServiceInterceptorFactory}s are consulted for every
- * {@link Service} created in this thread, until it gets unregistered.
- */
- public static boolean registerForThread(ServiceInterceptorFactory factory) {
- return threadLocalFactories.get().add(factory);
- }
-
- /**
- * Removes previously registered {@link ServiceInterceptorFactory} for this thread.
- */
- public static boolean unregisterForThread(ServiceInterceptorFactory factory) {
- return threadLocalFactories.get().remove(factory);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ThrowableInPacketCompletionFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ThrowableInPacketCompletionFeature.java
deleted file mode 100644
index 0a821629..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ThrowableInPacketCompletionFeature.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.client;
-
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.Dispatch;
-
-import com.sun.xml.internal.ws.api.pipe.ThrowableContainerPropertySet;
-
-/**
- * When using {@link Dispatch}<{@link Packet}> and the invocation completes with a Throwable, it is
- * useful to be able to inspect the Packet in addition to the Throwable as the Packet contains
- * meta-data about the request and/or response. However, the default behavior is that the caller
- * only receives the Throwable.
- *
- * When an instance of this feature is enabled on the binding, any Throwable generated will be available
- * on the Packet on the satellite {@link ThrowableContainerPropertySet}.
- *
- * @see ThrowableContainerPropertySet
- */
-public class ThrowableInPacketCompletionFeature extends WebServiceFeature {
-
- public ThrowableInPacketCompletionFeature() {
- this.enabled = true;
- }
-
- @Override
- public String getID() {
- return ThrowableInPacketCompletionFeature.class.getName();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/WSPortInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/WSPortInfo.java
deleted file mode 100644
index ce1380cd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/WSPortInfo.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-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.EndpointAddress;
-import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-
-import javax.xml.ws.handler.PortInfo;
-
-/**
- * JAX-WS RI's extension to {@link PortInfo}.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface WSPortInfo extends PortInfo {
- /**
- * Returns {@link WSService} object that owns this port.
- */
- @NotNull WSService getOwner();
-
- /**
- * Returns the same information as {@link #getBindingID()}
- * but in a strongly-typed fashion
- */
- @NotNull BindingID getBindingId();
-
- /**
- * Gets the endpoint address of this port.
- */
- @NotNull EndpointAddress getEndpointAddress();
-
- /**
- * Gets the {@link WSDLPort} object that represents this port,
- * if {@link WSService} is configured with WSDL. Otherwise null.
- */
- @Nullable WSDLPort getPort();
-
- /**
- * Gives the PolicMap that captures the Policy for the PortInfo
- *
- * @return PolicyMap
- *
- * @deprecated
- * Do not use this method as the PolicyMap API is not final yet and might change in next few months.
- */
-
- public PolicyMap getPolicyMap();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/EndpointCreationAttributes.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/EndpointCreationAttributes.java
deleted file mode 100644
index 1b7b46bb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/EndpointCreationAttributes.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.config.management;
-
-import com.sun.xml.internal.ws.api.server.Invoker;
-
-import org.xml.sax.EntityResolver;
-
-/**
- * Store the parameters that were passed into the original WSEndpoint instance
- * upon creation. This allows us to instantiate a new instance with the same
- * parameters.
- *
- * @author Fabian Ritzmann
- */
-public class EndpointCreationAttributes {
-
- private final boolean processHandlerAnnotation;
- private final Invoker invoker;
- private final EntityResolver entityResolver;
- private final boolean isTransportSynchronous;
-
- /**
- * Instantiate this data access object.
- *
- * @param processHandlerAnnotation The original processHandlerAnnotation setting.
- * @param invoker The original Invoker instance.
- * @param resolver The original EntityResolver instance.
- * @param isTransportSynchronous The original isTransportSynchronous setting.
- */
- public EndpointCreationAttributes(final boolean processHandlerAnnotation,
- final Invoker invoker,
- final EntityResolver resolver,
- final boolean isTransportSynchronous) {
- this.processHandlerAnnotation = processHandlerAnnotation;
- this.invoker = invoker;
- this.entityResolver = resolver;
- this.isTransportSynchronous = isTransportSynchronous;
- }
-
- /**
- * Return the original processHandlerAnnotation setting.
- *
- * @return The original processHandlerAnnotation setting.
- */
- public boolean isProcessHandlerAnnotation() {
- return this.processHandlerAnnotation;
- }
-
- /**
- * Return the original Invoker instance.
- *
- * @return The original Invoker instance.
- */
- public Invoker getInvoker() {
- return this.invoker;
- }
-
- /**
- * Return the original EntityResolver instance.
- *
- * @return The original EntityResolver instance.
- */
- public EntityResolver getEntityResolver() {
- return this.entityResolver;
- }
-
- /**
- * Return the original isTransportSynchronous setting.
- *
- * @return The original isTransportSynchronous setting.
- */
- public boolean isTransportSynchronous() {
- return this.isTransportSynchronous;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/ManagedEndpointFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/ManagedEndpointFactory.java
deleted file mode 100644
index e6a9e4d7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/ManagedEndpointFactory.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.config.management;
-
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-
-/**
- * Interface to create a new WSEndpoint wrapper. This is intended to be implemented
- * by the configuration management to return a ManagedEndpoint that wraps the
- * original WSEndpoint instance.
- *
- * @author Fabian Ritzmann
- */
-public interface ManagedEndpointFactory {
-
- /**
- * This method may return a WSEndpoint implementation that wraps the original
- * WSEndpoint instance. This allows to interject e.g. management code. If
- * management has not been enabled for this endpoint, it will return the original
- * WSEndpoint instance.
- *
- * @param <T> The endpoint implementation type.
- * @param endpoint The endpoint instance.
- * @param attributes The parameters with which the original endpoint instance
- * was created.
- * @return A WSEndpoint that wraps the original WSEndpoint instance or the
- * original WSEndpoint instance.
- */
- public <T> WSEndpoint<T> createEndpoint(WSEndpoint<T> endpoint, EndpointCreationAttributes attributes);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/Reconfigurable.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/Reconfigurable.java
deleted file mode 100644
index 3d287bc5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/Reconfigurable.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.config.management;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * Allows to trigger a reconfiguration action on an object.
- *
- * @author Fabian Ritzmann
- */
-public interface Reconfigurable {
-
- /**
- * Executes any action when an endpoint is reconfigured.
- *
- * @throws WebServiceException Thrown if the reconfiguration failed.
- */
- void reconfigure() throws WebServiceException;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedClientAssertion.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedClientAssertion.java
deleted file mode 100644
index 10b9599a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedClientAssertion.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.config.management.policy;
-
-import com.sun.istack.internal.logging.Logger;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyConstants;
-import com.sun.xml.internal.ws.policy.sourcemodel.AssertionData;
-import com.sun.xml.internal.ws.policy.spi.AssertionCreationException;
-import com.sun.xml.internal.ws.resources.ManagementMessages;
-
-import java.util.Collection;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-
-/**
- * The client-side ManagedClient policy assertion.
- *
- * @author Fabian Ritzmann
- */
-public class ManagedClientAssertion extends ManagementAssertion {
-
- public static final QName MANAGED_CLIENT_QNAME =
- new QName(PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "ManagedClient");
-
- private static final Logger LOGGER = Logger.getLogger(ManagedClientAssertion.class);
-
- /**
- * Return ManagedClient assertion if there is one associated with the client.
- *
- * @param portInfo The client PortInfo.
- * @return The policy assertion if found. Null otherwise.
- * @throws WebServiceException If computing the effective policy of the port failed.
- */
- public static ManagedClientAssertion getAssertion(WSPortInfo portInfo) throws WebServiceException {
- if (portInfo == null)
- return null;
-
- LOGGER.entering(portInfo);
- // getPolicyMap is deprecated because it is only supposed to be used by Metro code
- // and not by other clients.
- @SuppressWarnings("deprecation")
- final PolicyMap policyMap = portInfo.getPolicyMap();
- final ManagedClientAssertion assertion = ManagementAssertion.getAssertion(MANAGED_CLIENT_QNAME,
- policyMap, portInfo.getServiceName(), portInfo.getPortName(), ManagedClientAssertion.class);
- LOGGER.exiting(assertion);
- return assertion;
- }
-
- public ManagedClientAssertion(AssertionData data, Collection<PolicyAssertion> assertionParameters)
- throws AssertionCreationException {
- super(MANAGED_CLIENT_QNAME, data, assertionParameters);
- }
-
- /**
- * Clients cannot be managed.
- *
- * @return False.
- */
- public boolean isManagementEnabled() {
- final String management = this.getAttributeValue(MANAGEMENT_ATTRIBUTE_QNAME);
- if (management != null) {
- if (management.trim().toLowerCase().equals("on") || Boolean.parseBoolean(management)) {
- LOGGER.warning(ManagementMessages.WSM_1006_CLIENT_MANAGEMENT_ENABLED());
- }
- }
- return false;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedServiceAssertion.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedServiceAssertion.java
deleted file mode 100644
index 0127849a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedServiceAssertion.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.config.management.policy;
-
-import com.sun.istack.internal.logging.Logger;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyConstants;
-import com.sun.xml.internal.ws.policy.sourcemodel.AssertionData;
-import com.sun.xml.internal.ws.policy.spi.AssertionCreationException;
-import com.sun.xml.internal.ws.resources.ManagementMessages;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Map;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-
-/**
- * The server-side ManagedService policy assertion.
- *
- * @author Fabian Ritzmann
- */
-public class ManagedServiceAssertion extends ManagementAssertion {
-
- public static final QName MANAGED_SERVICE_QNAME =
- new QName(PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "ManagedService");
-
- private static final QName COMMUNICATION_SERVER_IMPLEMENTATIONS_PARAMETER_QNAME = new QName(
- PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "CommunicationServerImplementations");
- private static final QName COMMUNICATION_SERVER_IMPLEMENTATION_PARAMETER_QNAME = new QName(
- PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "CommunicationServerImplementation");
- private static final QName CONFIGURATOR_IMPLEMENTATION_PARAMETER_QNAME = new QName(
- PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "ConfiguratorImplementation");
- private static final QName CONFIG_SAVER_IMPLEMENTATION_PARAMETER_QNAME = new QName(
- PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "ConfigSaverImplementation");
- private static final QName CONFIG_READER_IMPLEMENTATION_PARAMETER_QNAME = new QName(
- PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "ConfigReaderImplementation");
- private static final QName CLASS_NAME_ATTRIBUTE_QNAME = new QName("className");
- /**
- * The name of the endpointDisposeDelay attribute.
- */
- private static final QName ENDPOINT_DISPOSE_DELAY_ATTRIBUTE_QNAME = new QName("endpointDisposeDelay");
-
- private static final Logger LOGGER = Logger.getLogger(ManagedServiceAssertion.class);
-
- /**
- * Return ManagedService assertion if there is one associated with the endpoint.
- *
- * @param endpoint The endpoint. Must not be null.
- * @return The policy assertion if found. Null otherwise.
- * @throws WebServiceException If computing the effective policy of the endpoint failed.
- */
- public static ManagedServiceAssertion getAssertion(WSEndpoint endpoint) throws WebServiceException {
- LOGGER.entering(endpoint);
- // getPolicyMap is deprecated because it is only supposed to be used by Metro code
- // and not by other clients.
- @SuppressWarnings("deprecation")
- final PolicyMap policyMap = endpoint.getPolicyMap();
- final ManagedServiceAssertion assertion = ManagementAssertion.getAssertion(MANAGED_SERVICE_QNAME,
- policyMap, endpoint.getServiceName(), endpoint.getPortName(), ManagedServiceAssertion.class);
- LOGGER.exiting(assertion);
- return assertion;
- }
-
- public ManagedServiceAssertion(AssertionData data, Collection<PolicyAssertion> assertionParameters)
- throws AssertionCreationException {
- super(MANAGED_SERVICE_QNAME, data, assertionParameters);
- }
-
- /**
- * Returns the value of the management attribute. True if unset or set to "true"
- * or "on". False otherwise.
- *
- * @return The value of the management attribute.
- */
- public boolean isManagementEnabled() {
- final String management = this.getAttributeValue(MANAGEMENT_ATTRIBUTE_QNAME);
- boolean result = true;
- if (management != null) {
- if (management.trim().toLowerCase().equals("on")) {
- result = true;
- }
- else {
- result = Boolean.parseBoolean(management);
- }
- }
- return result;
- }
-
- /**
- * Returns the value of the endpointDisposeDelay attribute or the default value
- * otherwise.
- *
- * @param defaultDelay The default value that is returned if this attribute is
- * not set
- * @return The value of the endpointDisposeDelay attribute or the default value
- * otherwise.
- */
- public long getEndpointDisposeDelay(final long defaultDelay) throws WebServiceException {
- long result = defaultDelay;
- final String delayText = getAttributeValue(ENDPOINT_DISPOSE_DELAY_ATTRIBUTE_QNAME);
- if (delayText != null) {
- try {
- result = Long.parseLong(delayText);
- } catch (NumberFormatException e) {
- throw LOGGER.logSevereException(new WebServiceException(
- ManagementMessages.WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE(delayText), e));
- }
- }
- return result;
- }
-
- /**
- * A list of CommunicationServerImplementation elements that were set as
- * parameters of this assertion.
- *
- * @return A list of CommunicationServerImplementation elements that were set as
- * parameters of this assertion. May be empty.
- */
- public Collection<ImplementationRecord> getCommunicationServerImplementations() {
- final Collection<ImplementationRecord> result = new LinkedList<ImplementationRecord>();
- final Iterator<PolicyAssertion> parameters = getParametersIterator();
- while (parameters.hasNext()) {
- final PolicyAssertion parameter = parameters.next();
- if (COMMUNICATION_SERVER_IMPLEMENTATIONS_PARAMETER_QNAME.equals(parameter.getName())) {
- final Iterator<PolicyAssertion> implementations = parameter.getParametersIterator();
- if (!implementations.hasNext()) {
- throw LOGGER.logSevereException(new WebServiceException(
- ManagementMessages.WSM_1005_EXPECTED_COMMUNICATION_CHILD()));
- }
- while (implementations.hasNext()) {
- final PolicyAssertion implementation = implementations.next();
- if (COMMUNICATION_SERVER_IMPLEMENTATION_PARAMETER_QNAME.equals(implementation.getName())) {
- result.add(getImplementation(implementation));
- }
- else {
- throw LOGGER.logSevereException(new WebServiceException(
- ManagementMessages.WSM_1004_EXPECTED_XML_TAG(
- COMMUNICATION_SERVER_IMPLEMENTATION_PARAMETER_QNAME, implementation.getName())));
- }
- }
- }
- }
- return result;
- }
-
- /**
- * The ConfiguratorImplementation that was set as parameter of this assertion.
- *
- * @return The ConfiguratorImplementation that was set as parameter of this assertion.
- * May be null.
- */
- public ImplementationRecord getConfiguratorImplementation() {
- return findImplementation(CONFIGURATOR_IMPLEMENTATION_PARAMETER_QNAME);
- }
-
- /**
- * The ConfigSaverImplementation that was set as parameter of this assertion.
- *
- * @return The ConfigSaverImplementation that was set as parameter of this assertion.
- * May be null.
- */
- public ImplementationRecord getConfigSaverImplementation() {
- return findImplementation(CONFIG_SAVER_IMPLEMENTATION_PARAMETER_QNAME);
- }
-
- /**
- * The ConfigReaderImplementation that was set as parameter of this assertion.
- *
- * @return The ConfigReaderImplementation that was set as parameter of this assertion.
- * May be null.
- */
- public ImplementationRecord getConfigReaderImplementation() {
- return findImplementation(CONFIG_READER_IMPLEMENTATION_PARAMETER_QNAME);
- }
-
- private ImplementationRecord findImplementation(QName implementationName) {
- final Iterator<PolicyAssertion> parameters = getParametersIterator();
- while (parameters.hasNext()) {
- final PolicyAssertion parameter = parameters.next();
- if (implementationName.equals(parameter.getName())) {
- return getImplementation(parameter);
- }
- }
- return null;
- }
-
- private ImplementationRecord getImplementation(PolicyAssertion rootParameter) {
- final String className = rootParameter.getAttributeValue(CLASS_NAME_ATTRIBUTE_QNAME);
- final HashMap<QName, String> parameterMap = new HashMap<QName, String>();
- final Iterator<PolicyAssertion> implementationParameters = rootParameter.getParametersIterator();
- final Collection<NestedParameters> nestedParameters = new LinkedList<NestedParameters>();
- while (implementationParameters.hasNext()) {
- final PolicyAssertion parameterAssertion = implementationParameters.next();
- final QName parameterName = parameterAssertion.getName();
- if (parameterAssertion.hasParameters()) {
- final Map<QName, String> nestedParameterMap = new HashMap<QName, String>();
- final Iterator<PolicyAssertion> parameters = parameterAssertion.getParametersIterator();
- while (parameters.hasNext()) {
- final PolicyAssertion parameter = parameters.next();
- String value = parameter.getValue();
- if (value != null) {
- value = value.trim();
- }
- nestedParameterMap.put(parameter.getName(), value);
- }
- nestedParameters.add(new NestedParameters(parameterName, nestedParameterMap));
- }
- else {
- String value = parameterAssertion.getValue();
- if (value != null) {
- value = value.trim();
- }
- parameterMap.put(parameterName, value);
- }
- }
- return new ImplementationRecord(className, parameterMap, nestedParameters);
- }
-
-
- /**
- * Return the implementation class name along with all parameters for the
- * implementation.
- */
- public static class ImplementationRecord {
-
- private final String implementation;
- private final Map<QName, String> parameters;
- private final Collection<NestedParameters> nestedParameters;
-
- protected ImplementationRecord(String implementation, Map<QName, String> parameters,
- Collection<NestedParameters> nestedParameters) {
- this.implementation = implementation;
- this.parameters = parameters;
- this.nestedParameters = nestedParameters;
- }
-
- public String getImplementation() {
- return this.implementation;
- }
-
- /**
- * The parameters that were set for this implementation element.
- *
- * @return The parameters that were set for this implementation element.
- * May be null.
- */
- public Map<QName, String> getParameters() {
- return this.parameters;
- }
-
- /**
- * Implementation elements may contain element parameters that contain
- * further parameters.
- *
- * @return The nested parameters that were set for this implementation element.
- * May be null.
- */
- public Collection<NestedParameters> getNestedParameters() {
- return this.nestedParameters;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- final ImplementationRecord other = (ImplementationRecord) obj;
- if ((this.implementation == null) ?
- (other.implementation != null) : !this.implementation.equals(other.implementation)) {
- return false;
- }
- if (this.parameters != other.parameters && (this.parameters == null || !this.parameters.equals(other.parameters))) {
- return false;
- }
- if (this.nestedParameters != other.nestedParameters &&
- (this.nestedParameters == null || !this.nestedParameters.equals(other.nestedParameters))) {
- return false;
- }
- return true;
- }
-
- @Override
- public int hashCode() {
- int hash = 3;
- hash = 53 * hash + (this.implementation != null ? this.implementation.hashCode() : 0);
- hash = 53 * hash + (this.parameters != null ? this.parameters.hashCode() : 0);
- hash = 53 * hash + (this.nestedParameters != null ? this.nestedParameters.hashCode() : 0);
- return hash;
- }
-
- @Override
- public String toString() {
- final StringBuilder text = new StringBuilder("ImplementationRecord: ");
- text.append("implementation = \"").append(this.implementation).append("\", ");
- text.append("parameters = \"").append(this.parameters).append("\", ");
- text.append("nested parameters = \"").append(this.nestedParameters).append("\"");
- return text.toString();
- }
-
- }
-
-
- /**
- * The nested parameters that may be set as part of an implementation element.
- */
- public static class NestedParameters {
-
- private final QName name;
- private final Map<QName, String> parameters;
-
- private NestedParameters(QName name, Map<QName, String> parameters) {
- this.name = name;
- this.parameters = parameters;
- }
-
- public QName getName() {
- return this.name;
- }
-
- public Map<QName, String> getParameters() {
- return this.parameters;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- final NestedParameters other = (NestedParameters) obj;
- if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
- return false;
- }
- if (this.parameters != other.parameters && (this.parameters == null || !this.parameters.equals(other.parameters))) {
- return false;
- }
- return true;
- }
-
- @Override
- public int hashCode() {
- int hash = 5;
- hash = 59 * hash + (this.name != null ? this.name.hashCode() : 0);
- hash = 59 * hash + (this.parameters != null ? this.parameters.hashCode() : 0);
- return hash;
- }
-
- @Override
- public String toString() {
- final StringBuilder text = new StringBuilder("NestedParameters: ");
- text.append("name = \"").append(this.name).append("\", ");
- text.append("parameters = \"").append(this.parameters).append("\"");
- return text.toString();
- }
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagementAssertion.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagementAssertion.java
deleted file mode 100644
index 029e677a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagementAssertion.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.config.management.policy;
-
-import com.sun.istack.internal.logging.Logger;
-import com.sun.xml.internal.ws.policy.AssertionSet;
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapKey;
-import com.sun.xml.internal.ws.policy.SimpleAssertion;
-import com.sun.xml.internal.ws.policy.sourcemodel.AssertionData;
-import com.sun.xml.internal.ws.policy.spi.AssertionCreationException;
-import com.sun.xml.internal.ws.resources.ManagementMessages;
-
-import java.util.Collection;
-import java.util.Iterator;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-
-/**
- * Base class for the #ManagedClientAssertion and #ManagedServiceAssertion. Provides
- * convenience methods to directly access the policy assertion parameters.
- *
- * @author Fabian Ritzmann
- */
-public abstract class ManagementAssertion extends SimpleAssertion {
-
- /**
- * To be able to distinguish between explicit settings and no setting.
- */
- public static enum Setting { NOT_SET, OFF, ON }
-
- /**
- * The name of the management attribute.
- */
- protected static final QName MANAGEMENT_ATTRIBUTE_QNAME = new QName("management");
- /**
- * The name of the monitoring attribute.
- */
- protected static final QName MONITORING_ATTRIBUTE_QNAME = new QName("monitoring");
-
- /**
- * The name of the id attribute.
- */
- private static final QName ID_ATTRIBUTE_QNAME = new QName("id");
- /**
- * The name of the start attribute.
- */
- private static final QName START_ATTRIBUTE_QNAME = new QName("start");
-
- private static final Logger LOGGER = Logger.getLogger(ManagementAssertion.class);
-
- /**
- * Return ManagementAssertion if one can be found in the policy map under
- * the given service and port name.
- *
- * @param <T> The implementation class of the assertion.
- * @param name The fully qualified name of the server or client assertion.
- * @param policyMap The policy map. May be null.
- * @param serviceName The WSDL service name. May not be null.
- * @param portName The WSDL port name. May not be null.
- * @param type The implementation class of the assertion.
- * @return An instance of ManagementAssertion or null.
- * @throws WebServiceException If computing the effective policy of the endpoint scope failed.
- */
- protected static <T extends ManagementAssertion> T getAssertion(final QName name,
- final PolicyMap policyMap, QName serviceName, QName portName, Class<T> type)
- throws WebServiceException {
- try {
- PolicyAssertion assertion = null;
- if (policyMap != null) {
- final PolicyMapKey key = PolicyMap.createWsdlEndpointScopeKey(serviceName, portName);
- final Policy policy = policyMap.getEndpointEffectivePolicy(key);
- if (policy != null) {
- final Iterator<AssertionSet> assertionSets = policy.iterator();
- if (assertionSets.hasNext()) {
- final AssertionSet assertionSet = assertionSets.next();
- final Iterator<PolicyAssertion> assertions = assertionSet.get(name).iterator();
- if (assertions.hasNext()) {
- assertion = assertions.next();
- }
- }
- }
- }
- return assertion == null ? null : assertion.getImplementation(type);
- } catch (PolicyException ex) {
- throw LOGGER.logSevereException(new WebServiceException(
- ManagementMessages.WSM_1001_FAILED_ASSERTION(name), ex));
- }
- }
-
- /**
- * Create a new ManagementAssertion instance.
- *
- * @param name The fully qualified name of the server or client assertion. Must
- * not be null.
- * @param data The assertion data. Must not be null.
- * @param assertionParameters Parameters of the assertion. May be null.
- * @throws AssertionCreationException Thrown if the creation of the assertion failed.
- */
- protected ManagementAssertion(final QName name, AssertionData data, Collection<PolicyAssertion> assertionParameters)
- throws AssertionCreationException {
- super(data, assertionParameters);
- if (!name.equals(data.getName())) {
- throw LOGGER.logSevereException(new AssertionCreationException(data,
- ManagementMessages.WSM_1002_EXPECTED_MANAGEMENT_ASSERTION(name)));
- }
- if (isManagementEnabled() && !data.containsAttribute(ID_ATTRIBUTE_QNAME)) {
- throw LOGGER.logSevereException(new AssertionCreationException(data,
- ManagementMessages.WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID(name)));
- }
- }
-
- /**
- * Returns the value of the id attribute. May not be null.
- *
- * @return The value of the id attribute.
- */
- public String getId() {
- return this.getAttributeValue((ID_ATTRIBUTE_QNAME));
- }
-
- /**
- * Returns the value of the start attribute. May be null.
- *
- * @return The value of the start attribute.
- */
- public String getStart() {
- return this.getAttributeValue((START_ATTRIBUTE_QNAME));
- }
-
- /**
- * Returns the value of the managment attribute depending on whether this is
- * a client-side or server-side assertion.
- *
- * @return The value of the managment attribute.
- */
- public abstract boolean isManagementEnabled();
-
- /**
- * Returns the value of the monitoring attribute.
- *
- * @return The value of the monitoring attribute.
- */
- public Setting monitoringAttribute() {
- final String monitoring = this.getAttributeValue(MONITORING_ATTRIBUTE_QNAME);
- Setting result = Setting.NOT_SET;
- if (monitoring != null) {
- if (monitoring.trim().toLowerCase().equals("on")
- || Boolean.parseBoolean(monitoring)) {
- result = Setting.ON;
- }
- else {
- result = Setting.OFF;
- }
- }
- return result;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/ClientCallBridge.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/ClientCallBridge.java
deleted file mode 100644
index 66ac2f8f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/ClientCallBridge.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.databinding;
-
-import java.lang.reflect.Method;
-import com.oracle.webservices.internal.api.databinding.JavaCallInfo;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-
-public interface ClientCallBridge {
-
- Packet createRequestPacket(JavaCallInfo call);
-
- JavaCallInfo readResponse(Packet packet, JavaCallInfo call) throws Throwable;
-
- Method getMethod();
-
- JavaMethod getOperationModel();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/Databinding.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/Databinding.java
deleted file mode 100644
index 4aac17ee..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/Databinding.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.databinding;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.lang.reflect.Method;
-
-import com.sun.xml.internal.ws.api.message.MessageContextFactory;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.wsdl.DispatchException;
-
-/**
- * {@code Databinding} is the entry point for all the WebService databinding
- * runtime functionality. Primarily, a Databinding is to serialize/deserialize an
- * XML(SOAP) message to/from a JAVA method invocation and return value which
- * are represented as <code>JavaCallInfo</code> instances.
- * <p>
- * </p>
- * Each Databinding is associated with a <code>MessageFactory</code> instance
- * which can be used to create <code>Message</code> instances that can be
- * deserialized by the Databinding. The <code>MessageFactory</code> also supports
- * the conversion of Oracle Fabric Normalized messages.
- * <p>
- * </p>
- * <blockquote> Following is an example that creates a {@code Databinding} which
- * provides the operations to serialize/deserialize a JavaCallInfo to/from a
- * SOAP message:<br />
- *
- * <pre>
- * DatabindingFactory wsfac = DatabindingFactory();
- * Databinding rt = wsfac.createDatabinding(DatabindingConfig);
- * </pre>
- *
- * </blockquote>
- *
- * @author shih-chang.chen@oracle.com
- */
-public interface Databinding extends com.oracle.webservices.internal.api.databinding.Databinding {
-
- /**
- * Gets the MessageFactory instance associated with this WsRuntime
- *
- * @return the MessageFactory instance associated with this WsRuntime
- */
-// MessageFactory getMessageFactory();
-
- /**
- * Deserializes a request XML(SOAP) message to a JavaCallInfo instance
- * representing a JAVA method call.
- *
- * @param soap
- * the request message
- *
- * @return the JavaCallInfo representing a method call
- */
-// JavaCallInfo deserializeRequest(Packet req);
-
- EndpointCallBridge getEndpointBridge(Packet soap) throws DispatchException;
-
- ClientCallBridge getClientBridge(Method method);
-
- /**
- * Serializes a JavaCallInfo instance representing a JAVA method call to a
- * request XML(SOAP) message.
- *
- * @param call
- * the JavaCallInfo representing a method call
- *
- * @return the request XML(SOAP) message
- */
-// Packet serializeRequest(JavaCallInfo call);
-
- /**
- * Serializes a JavaCallInfo instance representing the return value or
- * exception of a JAVA method call to a response XML(SOAP) message.
- *
- * @param call
- * the JavaCallInfo representing the return value or exception of
- * a JAVA method call
- *
- * @return the response XML(SOAP) message
- */
-// Packet serializeResponse(JavaCallInfo call);
-
- /**
- * Deserializes a response XML(SOAP) message to a JavaCallInfo instance
- * representing the return value or exception of a JAVA method call.
- *
- * @param soap
- * the response message
- *
- * @param call
- * the JavaCallInfo instance to be updated
- *
- * @return the JavaCallInfo updated with the return value or exception of a
- * JAVA method call
- */
-// JavaCallInfo deserializeResponse(Packet res, JavaCallInfo call);
-
- /**
- * Gets the WSDL operation metadata of the specified JAVA method.
- *
- * @param method
- * the JAVA method
- * @return the operationMetadata
- */
-// OperationMetadata getOperationMetadata(java.lang.reflect.Method method);
-
- /**
- * Gets the WebServiceFeatures of this webservice endpoint.
- *
- * @return the features
- */
-// WebServiceFeature[] getFeatures();
-
- void generateWSDL(WSDLGenInfo info);
-
- /**
- * @deprecated use MessageContextFactory
- */
- public ContentType encode( Packet packet, OutputStream out ) throws IOException ;
-
- /**
- * @deprecated use MessageContextFactory
- */
- public void decode( InputStream in, String ct, Packet packet ) throws IOException;
-
- public MessageContextFactory getMessageContextFactory();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingConfig.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingConfig.java
deleted file mode 100644
index 854d9b70..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingConfig.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.databinding;
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.Map;
-
-import javax.xml.transform.Source;
-import javax.xml.ws.WebServiceFeature;
-
-import org.xml.sax.EntityResolver;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
-
-/**
- * DatabindingConfig contains the initial states for Databinding. After a Databinding
- * instance is created, all it's internal states should be considered
- * 'immutable' and therefore the operations on Databinding are thread-safe.
- *
- * @author shih-chang.chen@oracle.com
- */
-public class DatabindingConfig {
- protected Class contractClass;
- protected Class endpointClass;
- protected Set<Class> additionalValueTypes = new HashSet<Class>();
- protected MappingInfo mappingInfo = new MappingInfo();
- protected URL wsdlURL;
- protected ClassLoader classLoader;
- protected Iterable<WebServiceFeature> features;
- protected WSBinding wsBinding;
- protected WSDLPort wsdlPort;
- protected MetadataReader metadataReader;
- protected Map<String, Object> properties = new HashMap<String, Object>();
- protected Source wsdlSource;
- protected EntityResolver entityResolver;
-
- public Class getContractClass() {
- return contractClass;
- }
- public void setContractClass(Class contractClass) {
- this.contractClass = contractClass;
- }
- public Class getEndpointClass() {
- return endpointClass;
- }
- public void setEndpointClass(Class implBeanClass) {
- this.endpointClass = implBeanClass;
- }
- public MappingInfo getMappingInfo() {
- return mappingInfo;
- }
- public void setMappingInfo(MappingInfo mappingInfo) {
- this.mappingInfo = mappingInfo;
- }
- public URL getWsdlURL() {
- return wsdlURL;
- }
- public void setWsdlURL(URL wsdlURL) {
- this.wsdlURL = wsdlURL;
- }
- public ClassLoader getClassLoader() {
- return classLoader;
- }
- public void setClassLoader(ClassLoader classLoader) {
- this.classLoader = classLoader;
- }
- public Iterable<WebServiceFeature> getFeatures() {
- if (features == null && wsBinding != null) return wsBinding.getFeatures();
- return features;
- }
- public void setFeatures(WebServiceFeature[] features) {
- setFeatures(new WebServiceFeatureList(features));
- }
- public void setFeatures(Iterable<WebServiceFeature> features) {
- this.features = WebServiceFeatureList.toList(features);
- }
- public WSDLPort getWsdlPort() {
- return wsdlPort;
- }
- public void setWsdlPort(WSDLPort wsdlPort) {
- this.wsdlPort = wsdlPort;
- }
- public Set<Class> additionalValueTypes() {
- return additionalValueTypes;
- }
- public Map<String, Object> properties() {
- return properties;
- }
- public WSBinding getWSBinding() {
- return wsBinding;
- }
- public void setWSBinding(WSBinding wsBinding) {
- this.wsBinding = wsBinding;
- }
- public MetadataReader getMetadataReader() {
- return metadataReader;
- }
- public void setMetadataReader(MetadataReader reader) {
- this.metadataReader = reader;
- }
-
- public Source getWsdlSource() {
- return wsdlSource;
- }
- public void setWsdlSource(Source wsdlSource) {
- this.wsdlSource = wsdlSource;
- }
- public EntityResolver getEntityResolver() {
- return entityResolver;
- }
- public void setEntityResolver(EntityResolver entityResolver) {
- this.entityResolver = entityResolver;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingFactory.java
deleted file mode 100644
index 8c738da0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingFactory.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.databinding;
-
-import java.util.Map;
-
-/**
- * WsFactory is the entry point of all the ws-databinding APIs. A WsFactory
- * instance can be used to create <code>WsTool</code>, <code>WsRuntime</code>,
- * <code>XsTool</code>, and <code>XsRuntime</code> instances.
- * <p>
- * </P>
- * <blockquote>
- * Following is an example that creates a {@code WsTool} which provides the
- * operations for "WSDL to JAVA" and "JAVA to WSDL":<br />
- * <pre>
- * WsFactory wsfac = WsFactory.newInstance();
- * WsTool tool = wsfac.createTool();
- * GenerationStatus status = tool.generateWsdl(javaToWsdkInfo);
- * </pre>
- * </blockquote>
- *
- * <blockquote>
- * Following is an example that creates a {@code WsRuntime} which provides the
- * operations to serialize/deserialize a JavaCallInfo to/from a SOAP message:<br />
- * <pre>
- * WsFactory wsfac = WsFactory.newInstance();
- * WsRuntime rt = wsfac.createRuntime(wsRuntimeConfig);
- * </pre>
- * </blockquote>
- *
- * @see com.sun.xml.internal.ws.api.databinding.Databinding
- *
- * @author shih-chang.chen@oracle.com
- */
-public abstract class DatabindingFactory extends com.oracle.webservices.internal.api.databinding.DatabindingFactory {
-
- /**
- * Creates a new instance of a <code>WsTool</code>.
- *
- * @return New instance of a <code>WsTool</code>
- */
-// abstract public WsTool createTool();
-
- /**
- * Creates a new instance of a <code>WsRuntime</code> which is initialized
- * with the specified configuration object.
- *
- * @param config
- * the EndpointRuntimeConfig to init this WsRuntime
- * @return New instance of a <code>WsRuntime</code>
- */
- abstract public com.oracle.webservices.internal.api.databinding.Databinding createRuntime(DatabindingConfig config);
-
- /**
- * Creates a new instance of a <code>XsTool</code>.
- *
- * @return New instance of a <code>XsTool</code>
- */
-// abstract public XsTool createXsTool(String mode);
-
- /**
- * Creates a new instance of a <code>XsRuntime</code>.
- *
- * @return New instance of a <code>XsRuntime</code>
- */
-// abstract public XsRuntime createXsRuntime(String mode);
-
- /**
- * Access properties on the <code>WsFactory</code> instance.
- *
- * @return properties of this WsFactory
- */
- abstract public Map<String, Object> properties();
-
- /**
- * The default implementation class name.
- */
- static final String ImplClass = com.sun.xml.internal.ws.db.DatabindingFactoryImpl.class.getName();
-
- /**
- * Create a new instance of a <code>WsFactory</code>. This static method
- * creates a new factory instance.
- *
- * Once an application has obtained a reference to a <code>WsFactory</code>
- * it can use the factory to configure and obtain <code>WsTool</code> and
- * <code>WsRuntime</code> instances.
- *
- * @return New instance of a <code>WsFactory</code>
- */
- static public DatabindingFactory newInstance() {
- try {
- Class<?> cls = Class.forName(ImplClass);
- return (DatabindingFactory) cls.newInstance();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/EndpointCallBridge.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/EndpointCallBridge.java
deleted file mode 100644
index 9c200593..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/EndpointCallBridge.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.databinding;
-
-import com.oracle.webservices.internal.api.databinding.JavaCallInfo;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-
-public interface EndpointCallBridge {
-
- public JavaCallInfo deserializeRequest(Packet req);
-
- //Change the return type to??
- public Packet serializeResponse(JavaCallInfo call);
-
- JavaMethod getOperationModel();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/JavaCallInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/JavaCallInfo.java
deleted file mode 100644
index de4e32f8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/JavaCallInfo.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.databinding;
-
-import java.lang.reflect.Method;
-
-/**
- * On the client or service-requestor side, a JavaCallInfo object represents a
- * method call on the service proxy to be serialized as a SOAP request message
- * to be sent to the service. A SOAP response message returned to the service
- * client is deserialized as an update to the JavaCallInfo object which is used
- * to generated the request.
- * <p>
- * </p>
- * On the server or service provider side, a SOAP request message is
- * deserialized to a JavaCallInfo object which can be used to determine which
- * method to call, and get the parameter values to call the back-end service
- * implementation object. The return value or exception returned from the
- * service implementation should be set to the JavaCallInfo object which then
- * can be used to serialize to a A SOAP response or fault message to be sent
- * back to the service client.
- *
- * @author shih-chang.chen@oracle.com
- */
-public class JavaCallInfo implements com.oracle.webservices.internal.api.databinding.JavaCallInfo {
-
- private Method method;
- private Object[] parameters;
- private Object returnValue;
- private Throwable exception;
-
- public JavaCallInfo() {
- }
-
- public JavaCallInfo(Method m, Object[] args) {
- method = m;
- parameters = args;
- }
-
- /**
- * Gets the method of this JavaCallInfo
- *
- * @return the method
- */
- public Method getMethod() {
- return method;
- }
-
- /**
- * Sets the method of this JavaCallInfo
- *
- * @param method
- * the method to set
- */
- public void setMethod(Method method) {
- this.method = method;
- }
-
- /**
- * Gets the parameters of this JavaCallInfo
- *
- * @return the parameters
- */
- public Object[] getParameters() {
- return parameters;
- }
-
- /**
- * Sets the parameters of this JavaCallInfo
- *
- * @param parameters
- * the parameters to set
- */
- public void setParameters(Object[] parameters) {
- this.parameters = parameters;
- }
-
- /**
- * Gets the returnValue of this JavaCallInfo
- *
- * @return the returnValue
- */
- public Object getReturnValue() {
- return returnValue;
- }
-
- /**
- * Sets the returnValue of this JavaCallInfo
- *
- * @param returnValue
- * the returnValue to set
- */
- public void setReturnValue(Object returnValue) {
- this.returnValue = returnValue;
- }
-
- /**
- * Gets the exception of this JavaCallInfo
- *
- * @return the exception
- */
- public Throwable getException() {
- return exception;
- }
-
- /**
- * Sets the exception of this JavaCallInfo
- *
- * @param exception
- * the exception to set
- */
- public void setException(Throwable exception) {
- this.exception = exception;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MappingInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MappingInfo.java
deleted file mode 100644
index 005393e8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MappingInfo.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.databinding;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.ws.api.BindingID;
-
-/**
- * A MappingInfo object is the collection of all the properties of the mapping
- * between a JAVA contract class (SEI) and it's corresponding WSDL artifacts
- * (wsdl:portType and wsdl:binding). A MappingInfo object can be used to provide
- * additional mapping metadata for WSDL generation and the runtime of WebService
- * databinding.
- *
- * @author shih-chang.chen@oracle.com
- */
-public class MappingInfo {
- protected String targetNamespace;
- protected String databindingMode;
- protected SoapBodyStyle soapBodyStyle;
- protected BindingID bindingID;
- protected QName serviceName;
- protected QName portName;
- protected String defaultSchemaNamespaceSuffix;
-
- public String getTargetNamespace() {
- return targetNamespace;
- }
- public void setTargetNamespace(String targetNamespace) {
- this.targetNamespace = targetNamespace;
- }
- public String getDatabindingMode() {
- return databindingMode;
- }
- public void setDatabindingMode(String databindingMode) {
- this.databindingMode = databindingMode;
- }
- public SoapBodyStyle getSoapBodyStyle() {
- return soapBodyStyle;
- }
- public void setSoapBodyStyle(SoapBodyStyle soapBodyStyle) {
- this.soapBodyStyle = soapBodyStyle;
- }
- public BindingID getBindingID() {
- return bindingID;
- }
- public void setBindingID(BindingID bindingID) {
- this.bindingID = bindingID;
- }
- public QName getServiceName() {
- return serviceName;
- }
- public void setServiceName(QName serviceName) {
- this.serviceName = serviceName;
- }
- public QName getPortName() {
- return portName;
- }
- public void setPortName(QName portName) {
- this.portName = portName;
- }
- public String getDefaultSchemaNamespaceSuffix() {
- return defaultSchemaNamespaceSuffix;
- }
- public void setDefaultSchemaNamespaceSuffix(String defaultSchemaNamespaceSuffix) {
- this.defaultSchemaNamespaceSuffix = defaultSchemaNamespaceSuffix;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MetadataReader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MetadataReader.java
deleted file mode 100644
index 24236f77..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MetadataReader.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.databinding;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.Map;
-
-/**
- * MetadataReader
- *
- * @author shih-chang.chen@oracle.com
- */
-public interface MetadataReader {
-
- public Annotation[] getAnnotations(Method m) ;
-
- public Annotation[][] getParameterAnnotations(final Method method);
-
- public <A extends Annotation> A getAnnotation(final Class<A> annType, final Method m);
-
- public <A extends Annotation> A getAnnotation(final Class<A> annType, final Class<?> cls);
-
- public Annotation[] getAnnotations(Class<?> c);
-
- public void getProperties(final Map<String, Object> prop, final Class<?> cls);
-
- public void getProperties(final Map<String, Object> prop, final Method method);
-
- public void getProperties(final Map<String, Object> prop, final Method method, int pos);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/SoapBodyStyle.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/SoapBodyStyle.java
deleted file mode 100644
index 900e5350..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/SoapBodyStyle.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.databinding;
-
-/**
- * The SoapBodyStyle represents the possible choices of the mapping styles
- * between the SOAP body of a wsdl:operation input/output messages and JAVA
- * method parameters and return/output values.
- *
- * @author shih-chang.chen@oracle.com
- */
-public enum SoapBodyStyle {
-
- /**
- * Bare style mapping of a document style with literal use wsdl:operation
- */
- DocumentBare,
-
- /**
- * Wrapper style mapping of a document style with literal use wsdl:operation
- */
- DocumentWrapper,
-
- /**
- * The mapping style of a RPC style with literal use wsdl:operation
- */
- RpcLiteral,
-
- /**
- * The mapping style of a RPC style with encoded use wsdl:operation.
- *
- * Note: this is not offically supported in JAX-WS.
- */
- RpcEncoded,
-
- /**
- * The mapping style is not specified.
- */
- Unspecificed;
-
- public boolean isDocument() {
- return (this.equals(DocumentBare) || this.equals(DocumentWrapper));
- }
-
- public boolean isRpc() {
- return (this.equals(RpcLiteral) || this.equals(RpcEncoded));
- }
-
- public boolean isLiteral() {
- return (this.equals(RpcLiteral) || this.isDocument());
- }
-
- public boolean isBare() {
- return (this.equals(DocumentBare));
- }
-
- public boolean isDocumentWrapper() {
- return (this.equals(DocumentWrapper));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/WSDLGenInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/WSDLGenInfo.java
deleted file mode 100644
index 91f79225..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/WSDLGenInfo.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.databinding;
-
-import com.oracle.webservices.internal.api.databinding.WSDLResolver;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGeneratorExtension;
-
-/**
- * WSDLGenInfo provides the WSDL generation options
- *
- * @author shih-chang.chen@oracle.com
- */
-public class WSDLGenInfo {
- WSDLResolver wsdlResolver;
- Container container;
- boolean inlineSchemas;
- boolean secureXmlProcessingDisabled;
- WSDLGeneratorExtension[] extensions;
-
- public WSDLResolver getWsdlResolver() {
- return wsdlResolver;
- }
- public void setWsdlResolver(WSDLResolver wsdlResolver) {
- this.wsdlResolver = wsdlResolver;
- }
- public Container getContainer() {
- return container;
- }
- public void setContainer(Container container) {
- this.container = container;
- }
- public boolean isInlineSchemas() {
- return inlineSchemas;
- }
- public void setInlineSchemas(boolean inlineSchemas) {
- this.inlineSchemas = inlineSchemas;
- }
- public WSDLGeneratorExtension[] getExtensions() {
- if (extensions == null) return new WSDLGeneratorExtension[0];
- return extensions;
- }
- public void setExtensions(WSDLGeneratorExtension[] extensions) {
- this.extensions = extensions;
- }
-
- public void setSecureXmlProcessingDisabled(boolean secureXmlProcessingDisabled) {
- this.secureXmlProcessingDisabled = secureXmlProcessingDisabled;
- }
-
- public boolean isSecureXmlProcessingDisabled() {
- return secureXmlProcessingDisabled;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/fastinfoset/FastInfosetFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/fastinfoset/FastInfosetFeature.java
deleted file mode 100644
index f59dbd55..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/fastinfoset/FastInfosetFeature.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.fastinfoset;
-
-import com.sun.xml.internal.ws.api.FeatureConstructor;
-
-import javax.xml.ws.WebServiceFeature;
-
-import com.sun.org.glassfish.gmbal.ManagedAttribute;
-import com.sun.org.glassfish.gmbal.ManagedData;
-
-/**
- * Enable or disable Fast Infoset on a Web service.
- * <p>
- * The following describes the affects of this feature with respect
- * to being enabled or disabled:
- * <ul>
- * <li> ENABLED: In this Mode, Fast Infoset will be enabled.
- * <li> DISABLED: In this Mode, Fast Infoset will be disabled and the
- * Web service will not process incoming messages or produce outgoing
- * messages encoded using Fast Infoset.
- * </ul>
- * <p>
- * If this feature is not present on a Web service then the default behaviour
- * is equivalent to this feature being present and enabled.
- * @author Paul.Sandoz@Sun.Com
- */
-@ManagedData
-public class FastInfosetFeature extends WebServiceFeature {
- /**
- * Constant value identifying the {@link FastInfosetFeature}
- */
- public static final String ID = "http://java.sun.com/xml/ns/jaxws/fastinfoset";
-
- /**
- * Create a {@link FastInfosetFeature}. The instance created will be enabled.
- */
- public FastInfosetFeature() {
- this.enabled = true;
- }
-
- /**
- * Create a {@link FastInfosetFeature}
- *
- * @param enabled specifies whether this feature should
- * be enabled or not.
- */
- @FeatureConstructor({"enabled"})
- public FastInfosetFeature(boolean enabled) {
- this.enabled = enabled;
- }
-
- /**
- * {@inheritDoc}
- */
- @ManagedAttribute
- public String getID() {
- return ID;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/HaInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/HaInfo.java
deleted file mode 100644
index 5d7ac28a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/HaInfo.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.ha;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-
-/**
- * This class has HA information
- * <p>
- *
- * This would help a loadbalancer to put the request(in case of a fail-over)
- * on a replica instance that has all the related data. Even if there is no
- * loadbalancer, a backing store could locate the information by directly
- * going to the correct replica instance. This would also help any part of
- * the runtime to know about failover case(and in-turn may invalidate
- * local caches).
- *
- * <p>
- * To achieve this functionality, it carries two pieces of information:
- * <ol>
- * <li>key - Related {@link com.sun.org.glassfish.ha.store.api.BackingStore} keys can
- * use this info for their HashableKey impl. First store creates this object,
- * and subsequent related stores use the same key.
- * <li>replicaInstance - where the related info is replicated
- * </ol>
- *
- * <p>
- * This can be accessed from {@link Packet} using {@link Packet#HA_INFO}
- * property by the runtime. This object is created typically
- * <ul>
- * <li> When a store happens for the first time
- * <li> A subsequent inbound transport creates from cookies
- * <li> A fail-over request stores the data to a different replica
- * </ul>
- *
- * @author Jitendra Kotamraju
- * @since JAX-WS RI 2.2.2
- */
-public class HaInfo {
- private final String replicaInstance;
- private final String key;
- private final boolean failOver;
-
- public HaInfo(String key, String replicaInstance, boolean failOver) {
- this.key = key;
- this.replicaInstance = replicaInstance;
- this.failOver = failOver;
- }
-
- public String getReplicaInstance() {
- return replicaInstance;
- }
-
- public String getKey() {
- return key;
- }
-
- public boolean isFailOver() {
- return failOver;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/StickyFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/StickyFeature.java
deleted file mode 100644
index c45b2e98..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/StickyFeature.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.ha;
-
-
-/**
- * Provides a way to tell the runtime about stickiness of requests. In a
- * HA environment, a client's requests need to land on the same instance so
- * that a {@link com.sun.org.glassfish.ha.store.api.BackingStore} entry for a key is
- * accessed/modified from the same instance.
- *
- * <p>
- * A web service feature may implement this interface. JAX-WS runtime
- * checks if any feature needs stickiness of requests, and if HA is configured
- * ({@link HighAvailabilityProvider#isHaEnvironmentConfigured()}), it will take
- * an appropriate action. For example, in servlet transport, it would create
- * JSESSIONID cookie so that a typical loadbalancer would stick the subsequent
- * client requests to the same instance.
- *
- * @author Jitendra Kotamraju
- * @since JAX-WS RI 2.2.2
- */
-public interface StickyFeature {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandler.java
deleted file mode 100644
index f7a14681..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandler.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.handler;
-
-import javax.xml.ws.handler.Handler;
-import javax.xml.namespace.QName;
-import java.util.Set;
-
-
-/**
- * The <code>MessageHandler</code> class extends <code>Handler</code>
- * to provide typesafety for the message context parameter and add a method
- * to obtain access to the headers that may be processed by the handler.
- * Its provides similar functionality as a SOAPHandler but provides RI's
- * Message in the MessageContext.
- *
- * @author Rama Pulavarthi
- * @since JAX-WS 2.1.3
- */
-public interface MessageHandler<C extends MessageHandlerContext> extends Handler<C> {
-
-
- /** Gets the header blocks that can be processed by this Handler
- * instance.
- *
- * @return Set of <code>QNames</code> of header blocks processed by this
- * handler instance. <code>QName</code> is the qualified
- * name of the outermost element of the Header block.
- **/
- Set<QName> getHeaders();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandlerContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandlerContext.java
deleted file mode 100644
index fbf746fd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandlerContext.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.handler;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-
-import javax.xml.ws.handler.MessageContext;
-import java.util.Set;
-
-/**
- * The <code>MessageHandlerContext</code> interface extends
- * <code>MessageContext</code> to provide easy access to the contained message.
- *
- * This context provides access to RI's <code>Message</code> model for efficient access
- * to various things like accessing headers etc. It also provides access to
- * binding information as <code>WSBinding</code>.
- *
- * @author Rama Pulavarthi
- * @since JAX-WS 2.1.3
- */
-public interface MessageHandlerContext extends MessageContext {
- /**
- * Gets the message from this message context
- *
- * @return The contained message; returns <code>null</code> if no
- * message is present in this message context
- */
- public Message getMessage();
-
-
- /**
- * Sets the message in this message context
- */
- public void setMessage(Message message);
-
- /**
- * @see javax.xml.ws.handler.soap.SOAPMessageContext#getRoles()
- */
- public Set<String> getRoles();
-
-
- /**
- * Provides access to <code>WSBinding</code> which can be used in various ways.
- * for example: <code>WSBinding#getSOAPVersion</code> to get SOAP version of the binding.
- * <code>WSBinding#isFeatureEnabled(AddressingFeature)</code> to check if addressing is enabled
- */
- public WSBinding getWSBinding();
-
- /**
- * Provides access to <code>SEIModel</code>.
- */
- public @Nullable SEIModel getSEIModel();
-
- /**
- * Gets the {@link WSDLPort} that represents the port.
- * @return
- * returns the WSDLModel of the port that the client/endpoint binds to.
- * null when the Service is not configured with WSDL information.
- */
- public @Nullable WSDLPort getPort();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AddressingUtils.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AddressingUtils.java
deleted file mode 100644
index 31b40dea..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AddressingUtils.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.message;
-
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.soap.SOAPBinding;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.addressing.WsaTubeHelper;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.AddressingPropertySet;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.addressing.OneWayFeature;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.message.RelatesToHeader;
-import com.sun.xml.internal.ws.message.StringHeader;
-import com.sun.xml.internal.ws.resources.AddressingMessages;
-import com.sun.xml.internal.ws.resources.ClientMessages;
-
-public class AddressingUtils {
- //TODO is MessageHeaders to be implicitly assumed? Or moved to utility class and taken out from interface?
- public static void fillRequestAddressingHeaders(MessageHeaders headers, Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action) {
- fillRequestAddressingHeaders(headers, packet, av, sv, oneway, action, false);
- }
- public static void fillRequestAddressingHeaders(MessageHeaders headers, Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action, boolean mustUnderstand) {
- fillCommonAddressingHeaders(headers, packet, av, sv, action, mustUnderstand);
-
- // wsa:ReplyTo
- // null or "true" is equivalent to request/response MEP
- if (!oneway) {
- WSEndpointReference epr = av.anonymousEpr;
- if (headers.get(av.replyToTag, false) == null) {
- headers.add(epr.createHeader(av.replyToTag));
- }
-
- // wsa:FaultTo
- if (headers.get(av.faultToTag, false) == null) {
- headers.add(epr.createHeader(av.faultToTag));
- }
-
- // wsa:MessageID
- if (packet.getMessage().getHeaders().get(av.messageIDTag, false) == null) {
- if (headers.get(av.messageIDTag, false) == null) {
- Header h = new StringHeader(av.messageIDTag, Message.generateMessageID());
- headers.add(h);
- }
- }
- }
- }
-// private void fillRequestAddressingHeaders(Packet packet, AddressingVersion av, SOAPVersion sv, OneWayFeature oneWayFeature, boolean oneway, String action);
- public static void fillRequestAddressingHeaders(MessageHeaders headers, WSDLPort wsdlPort, WSBinding binding, Packet packet) {
- if (binding == null) {
- throw new IllegalArgumentException(AddressingMessages.NULL_BINDING());
- }
-
- if (binding.isFeatureEnabled(SuppressAutomaticWSARequestHeadersFeature.class)) {
- return;
- }
-
- //See if WSA headers are already set by the user.
- MessageHeaders hl = packet.getMessage().getHeaders();
- String action = AddressingUtils.getAction(hl, binding.getAddressingVersion(), binding.getSOAPVersion());
- if (action != null) {
- //assume that all the WSA headers are set by the user
- return;
- }
- AddressingVersion addressingVersion = binding.getAddressingVersion();
- //seiModel is passed as null as it is not needed.
- WsaTubeHelper wsaHelper = addressingVersion.getWsaHelper(wsdlPort, null, binding);
-
- // wsa:Action
- String effectiveInputAction = wsaHelper.getEffectiveInputAction(packet);
- if (effectiveInputAction == null || effectiveInputAction.equals("") && binding.getSOAPVersion() == SOAPVersion.SOAP_11) {
- throw new WebServiceException(ClientMessages.INVALID_SOAP_ACTION());
- }
- boolean oneway = !packet.expectReply;
- if (wsdlPort != null) {
- // if WSDL has <wsaw:Anonymous>prohibited</wsaw:Anonymous>, then throw an error
- // as anonymous ReplyTo MUST NOT be added in that case. BindingProvider need to
- // disable AddressingFeature and MemberSubmissionAddressingFeature and hand-craft
- // the SOAP message with non-anonymous ReplyTo/FaultTo.
- if (!oneway && packet.getMessage() != null && packet.getWSDLOperation() != null) {
- WSDLBoundOperation wbo = wsdlPort.getBinding().get(packet.getWSDLOperation());
- if (wbo != null && wbo.getAnonymous() == WSDLBoundOperation.ANONYMOUS.prohibited) {
- throw new WebServiceException(AddressingMessages.WSAW_ANONYMOUS_PROHIBITED());
- }
- }
- }
-
- OneWayFeature oneWayFeature = binding.getFeature(OneWayFeature.class);
- final AddressingPropertySet addressingPropertySet = packet.getSatellite(AddressingPropertySet.class);
- oneWayFeature = addressingPropertySet == null ? oneWayFeature : new OneWayFeature(addressingPropertySet, addressingVersion);
-
- if (oneWayFeature == null || !oneWayFeature.isEnabled()) {
- // standard oneway
- fillRequestAddressingHeaders(headers, packet, addressingVersion, binding.getSOAPVersion(), oneway, effectiveInputAction, AddressingVersion.isRequired(binding));
- } else {
- // custom oneway
- fillRequestAddressingHeaders(headers, packet, addressingVersion, binding.getSOAPVersion(), oneWayFeature, oneway, effectiveInputAction);
- }
- }
-
- public static String getAction(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
- if (av == null) {
- throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
- }
-
- String action = null;
- Header h = getFirstHeader(headers, av.actionTag, true, sv);
- if (h != null) {
- action = h.getStringContent();
- }
-
- return action;
- }
-
- public static WSEndpointReference getFaultTo(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
- if (av == null) {
- throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
- }
-
- Header h = getFirstHeader(headers, av.faultToTag, true, sv);
- WSEndpointReference faultTo = null;
- if (h != null) {
- try {
- faultTo = h.readAsEPR(av);
- } catch (XMLStreamException e) {
- throw new WebServiceException(AddressingMessages.FAULT_TO_CANNOT_PARSE(), e);
- }
- }
-
- return faultTo;
- }
-
- public static String getMessageID(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
- if (av == null) {
- throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
- }
-
- Header h = getFirstHeader(headers, av.messageIDTag, true, sv);
- String messageId = null;
- if (h != null) {
- messageId = h.getStringContent();
- }
-
- return messageId;
- }
- public static String getRelatesTo(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
- if (av == null) {
- throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
- }
-
- Header h = getFirstHeader(headers, av.relatesToTag, true, sv);
- String relatesTo = null;
- if (h != null) {
- relatesTo = h.getStringContent();
- }
-
- return relatesTo;
- }
- public static WSEndpointReference getReplyTo(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
- if (av == null) {
- throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
- }
-
- Header h = getFirstHeader(headers, av.replyToTag, true, sv);
- WSEndpointReference replyTo;
- if (h != null) {
- try {
- replyTo = h.readAsEPR(av);
- } catch (XMLStreamException e) {
- throw new WebServiceException(AddressingMessages.REPLY_TO_CANNOT_PARSE(), e);
- }
- } else {
- replyTo = av.anonymousEpr;
- }
-
- return replyTo;
- }
- public static String getTo(MessageHeaders headers, AddressingVersion av, SOAPVersion sv) {
- if (av == null) {
- throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
- }
-
- Header h = getFirstHeader(headers, av.toTag, true, sv);
- String to;
- if (h != null) {
- to = h.getStringContent();
- } else {
- to = av.anonymousUri;
- }
-
- return to;
- }
-
- public static Header getFirstHeader(MessageHeaders headers, QName name, boolean markUnderstood, SOAPVersion sv) {
- if (sv == null) {
- throw new IllegalArgumentException(AddressingMessages.NULL_SOAP_VERSION());
- }
-
- Iterator<Header> iter = headers.getHeaders(name.getNamespaceURI(), name.getLocalPart(), markUnderstood);
- while (iter.hasNext()) {
- Header h = iter.next();
- if (h.getRole(sv).equals(sv.implicitRole)) {
- return h;
- }
- }
-
- return null;
- }
-
- private static void fillRequestAddressingHeaders(@NotNull MessageHeaders headers, @NotNull Packet packet, @NotNull AddressingVersion av, @NotNull SOAPVersion sv, @NotNull OneWayFeature oneWayFeature, boolean oneway, @NotNull String action) {
- if (!oneway&&!oneWayFeature.isUseAsyncWithSyncInvoke() && Boolean.TRUE.equals(packet.isSynchronousMEP)) {
- fillRequestAddressingHeaders(headers, packet, av, sv, oneway, action);
- } else {
- fillCommonAddressingHeaders(headers, packet, av, sv, action, false);
-
- boolean isMessageIdAdded = false;
-
- // wsa:ReplyTo
- // add if it doesn't already exist and OneWayFeature requests a specific ReplyTo
- if (headers.get(av.replyToTag, false) == null) {
- WSEndpointReference replyToEpr = oneWayFeature.getReplyTo();
- if (replyToEpr != null) {
- headers.add(replyToEpr.createHeader(av.replyToTag));
- // add wsa:MessageID only for non-null ReplyTo
- if (packet.getMessage().getHeaders().get(av.messageIDTag, false) == null) {
- // if header doesn't exist, method getID creates a new random id
- String newID = oneWayFeature.getMessageId() == null ? Message.generateMessageID() : oneWayFeature.getMessageId();
- headers.add(new StringHeader(av.messageIDTag, newID));
- isMessageIdAdded = true;
- }
- }
- }
-
- // If the user sets a messageId, use it.
- final String messageId = oneWayFeature.getMessageId();
- if (!isMessageIdAdded && messageId != null) {
- headers.add(new StringHeader(av.messageIDTag, messageId));
- }
-
- // wsa:FaultTo
- // add if it doesn't already exist and OneWayFeature requests a specific FaultTo
- if (headers.get(av.faultToTag, false) == null) {
- WSEndpointReference faultToEpr = oneWayFeature.getFaultTo();
- if (faultToEpr != null) {
- headers.add(faultToEpr.createHeader(av.faultToTag));
- // add wsa:MessageID only for non-null FaultTo
- if (headers.get(av.messageIDTag, false) == null) {
- headers.add(new StringHeader(av.messageIDTag, Message.generateMessageID()));
- }
- }
- }
-
- // wsa:From
- if (oneWayFeature.getFrom() != null) {
- headers.addOrReplace(oneWayFeature.getFrom().createHeader(av.fromTag));
- }
-
- // wsa:RelatesTo
- if (oneWayFeature.getRelatesToID() != null) {
- headers.addOrReplace(new RelatesToHeader(av.relatesToTag, oneWayFeature.getRelatesToID()));
- }
- }
- }
-
- /**
- * Creates wsa:To, wsa:Action and wsa:MessageID header on the client
- *
- * @param packet request packet
- * @param av WS-Addressing version
- * @param sv SOAP version
- * @param action Action Message Addressing Property value
- * @throws IllegalArgumentException if any of the parameters is null.
- */
- private static void fillCommonAddressingHeaders(MessageHeaders headers, Packet packet, @NotNull AddressingVersion av, @NotNull SOAPVersion sv, @NotNull String action, boolean mustUnderstand) {
- if (packet == null) {
- throw new IllegalArgumentException(AddressingMessages.NULL_PACKET());
- }
-
- if (av == null) {
- throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
- }
-
- if (sv == null) {
- throw new IllegalArgumentException(AddressingMessages.NULL_SOAP_VERSION());
- }
-
- if (action == null && !sv.httpBindingId.equals(SOAPBinding.SOAP12HTTP_BINDING)) {
- throw new IllegalArgumentException(AddressingMessages.NULL_ACTION());
- }
-
- // wsa:To
- if (headers.get(av.toTag, false) == null) {
- StringHeader h = new StringHeader(av.toTag, packet.endpointAddress.toString());
- headers.add(h);
- }
-
- // wsa:Action
- if (action != null) {
- packet.soapAction = action;
- if (headers.get(av.actionTag, false) == null) {
- //As per WS-I BP 1.2/2.0, if one of the WSA headers is MU, then all WSA headers should be treated as MU.,
- // so just set MU on action header
- StringHeader h = new StringHeader(av.actionTag, action, sv, mustUnderstand);
- headers.add(h);
- }
- }
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Attachment.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Attachment.java
deleted file mode 100644
index 70b3bda3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Attachment.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.istack.internal.NotNull;
-
-import javax.activation.DataHandler;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.soap.SOAPException;
-import javax.xml.transform.Source;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * Attachment.
- */
-public interface Attachment {
-
- /**
- * Content ID of the attachment. Uniquely identifies an attachment.
- *
- * http://www.ietf.org/rfc/rfc2392.txt (which is referred by the ws-i attachment profile
- * http://www.ws-i.org/Profiles/AttachmentsProfile-1.0.html)
- *
- * content-id = url-addr-spec
- * url-addr-spec = addr-spec ; URL encoding of RFC 822 addr-spec
- * cid-url = "cid" ":" content-id
- *
- * A "cid" URL is converted to the corresponding Content-ID message header [MIME] by
- * removing the "cid:" prefix, converting the % encoded character to their equivalent
- * US-ASCII characters, and enclosing the remaining parts with an angle bracket pair,
- * "<" and ">". For example, "cid:foo4%25foo1@bar.net" corresponds to
- * Content-ID: <foo4%25foo1@bar.net>
- *
- * @return
- * The content ID like "foo-bar-zot@abc.com", without
- * surrounding '&lt;' and '>' used as the transfer syntax.
- */
- @NotNull String getContentId();
-
- /**
- * Gets the MIME content-type of this attachment.
- */
- String getContentType();
-
- /**
- * Gets the attachment as an exact-length byte array.
- */
- byte[] asByteArray();
-
- /**
- * Gets the attachment as a {@link DataHandler}.
- */
- DataHandler asDataHandler();
-
- /**
- * Gets the attachment as a {@link Source}.
- * Note that there's no guarantee that the attachment is actually an XML.
- */
- Source asSource();
-
- /**
- * Obtains this attachment as an {@link InputStream}.
- */
- InputStream asInputStream();
-
- /**
- * Writes the contents of the attachment into the given stream.
- */
- void writeTo(OutputStream os) throws IOException;
-
- /**
- * Writes this attachment to the given {@link SOAPMessage}.
- */
- void writeTo(SOAPMessage saaj) throws SOAPException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentEx.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentEx.java
deleted file mode 100644
index b009975a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentEx.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.istack.internal.NotNull;
-
-import java.util.Iterator;
-
-/**
- * Attachment extended interface exposing custom MIME headers.
- * @since 2.2.6
- */
-public interface AttachmentEx extends Attachment {
- /**
- * MIME header
- */
- public interface MimeHeader {
- /**
- * MIME header name
- * @return name
- */
- public String getName();
- /**
- * MIME header value
- * @return value
- */
- public String getValue();
- }
-
- /**
- * Iterator of custom MIME headers associated with this attachment
- * @return MIME header iterator
- */
- public @NotNull Iterator<MimeHeader> getMimeHeaders();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentSet.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentSet.java
deleted file mode 100644
index 4f9cea39..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentSet.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.istack.internal.Nullable;
-
-/**
- * A set of {@link Attachment} on a {@link Message}.
- *
- * <p>
- * A particular attention is made to ensure that attachments
- * can be read and parsed lazily as requested.
- *
- * @see Message#getAttachments()
- */
-public interface AttachmentSet extends Iterable<Attachment> {
- /**
- * Gets the attachment by the content ID.
- *
- * @param contentId
- * The content ID like "foo-bar-zot@abc.com", without
- * surrounding '&lt;' and '>' used as the transfer syntax.
- *
- * @return null
- * if no such attachment exist.
- */
- @Nullable
- Attachment get(String contentId);
-
- /**
- * Returns true if there's no attachment.
- */
- boolean isEmpty();
-
- /**
- * Adds an attachment to this set.
- *
- * <p>
- * Note that it's OK for an {@link Attachment} to belong to
- * more than one {@link AttachmentSet} (which is in fact
- * necessary when you wrap a {@link Message} into another.
- *
- * @param att
- * must not be null.
- */
- public void add(Attachment att);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/ExceptionHasMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/ExceptionHasMessage.java
deleted file mode 100644
index 52dc3d3a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/ExceptionHasMessage.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-import com.sun.xml.internal.ws.protocol.soap.VersionMismatchException;
-
-/**
- * This class represents an Exception that needs to be marshalled
- * with a specific protocol wire format. For example, the SOAP's
- * VersionMismatchFault needs to be written with a correct fault code.
- * In that case, decoder could throw {@link VersionMismatchException},
- * and the corresponding fault {@link Message} from {@link ExceptionHasMessage#getFaultMessage()}
- * is sent on the wire.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class ExceptionHasMessage extends JAXWSExceptionBase {
-
- public ExceptionHasMessage(String key, Object... args) {
- super(key, args);
- }
-
- /**
- * Returns the exception into a fault Message
- *
- * @return Message for this exception
- */
- public abstract Message getFaultMessage();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/FilterMessageImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/FilterMessageImpl.java
deleted file mode 100644
index 6cbc2f91..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/FilterMessageImpl.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Source;
-
-/**
- * A <code>FilterMessageImpl</code> contains some other Message, which it uses
- * as its basic source of message data, possibly transforming the data along
- * the way or providing additional functionality.
- *
- * <p>
- * The class <code>FilterMessageImpl</code> itself simply overrides
- * all the methods of <code>Message</code> and invokes them on
- * contained Message delegate. Subclasses of <code>FilterMessageImpl</code>
- * may further override some of these methods and may also provide
- * additional methods and fields.
- *
- * @author Jitendra Kotamraju
- */
-public class FilterMessageImpl extends Message {
- private final Message delegate;
-
- protected FilterMessageImpl(Message delegate) {
- this.delegate = delegate;
- }
-
- public boolean hasHeaders() {
- return delegate.hasHeaders();
- }
-
- public @NotNull MessageHeaders getHeaders() {
- return delegate.getHeaders();
- }
-
- public @NotNull AttachmentSet getAttachments() {
- return delegate.getAttachments();
- }
-
- protected boolean hasAttachments() {
- return delegate.hasAttachments();
- }
-
- public boolean isOneWay(@NotNull WSDLPort port) {
- return delegate.isOneWay(port);
- }
-
- public @Nullable String getPayloadLocalPart() {
- return delegate.getPayloadLocalPart();
- }
-
- public String getPayloadNamespaceURI() {
- return delegate.getPayloadNamespaceURI();
- }
-
- public boolean hasPayload() {
- return delegate.hasPayload();
- }
-
- public boolean isFault() {
- return delegate.isFault();
- }
-
- public @Nullable QName getFirstDetailEntryName() {
- return delegate.getFirstDetailEntryName();
- }
-
- public Source readEnvelopeAsSource() {
- return delegate.readEnvelopeAsSource();
- }
-
- public Source readPayloadAsSource() {
- return delegate.readPayloadAsSource();
- }
-
- public SOAPMessage readAsSOAPMessage() throws SOAPException {
- return delegate.readAsSOAPMessage();
- }
-
- public SOAPMessage readAsSOAPMessage(Packet packet, boolean inbound) throws SOAPException {
- return delegate.readAsSOAPMessage(packet, inbound);
- }
-
- public <T> T readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
- return (T)delegate.readPayloadAsJAXB(unmarshaller);
- }
- /** @deprecated */
- public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
- return delegate.readPayloadAsJAXB(bridge);
- }
-
- public <T> T readPayloadAsJAXB(XMLBridge<T> bridge) throws JAXBException {
- return delegate.readPayloadAsJAXB(bridge);
- }
-
- public XMLStreamReader readPayload() throws XMLStreamException {
- return delegate.readPayload();
- }
-
- public void consume() {
- delegate.consume();
- }
-
- public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
- delegate.writePayloadTo(sw);
- }
-
- public void writeTo(XMLStreamWriter sw) throws XMLStreamException {
- delegate.writeTo(sw);
- }
-
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
- delegate.writeTo(contentHandler, errorHandler);
- }
-
- public Message copy() {
- return delegate.copy();
- }
-
- public @NotNull String getID(@NotNull WSBinding binding) {
- return delegate.getID(binding);
- }
-
- public @NotNull String getID(AddressingVersion av, SOAPVersion sv) {
- return delegate.getID(av, sv);
- }
-
- public SOAPVersion getSOAPVersion() {
- return delegate.getSOAPVersion();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Header.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Header.java
deleted file mode 100644
index a1811feb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Header.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.ws.WebServiceException;
-import java.util.Set;
-
-
-/**
- * A SOAP header.
- *
- * <p>
- * A header is immutable, but unlike body it can be read
- * multiple times.
- * The {@link Header} abstraction hides how the header
- * data is represented in memory; instead, it commits to
- * the ability to write itself to XML infoset.
- *
- * <p>
- * When a message is received from the transport and
- * being processed, the processor needs to "peek"
- * some information of a header, such as the tag name,
- * the mustUnderstand attribute, and so on. Therefore,
- * the {@link Header} interface exposes those information
- * as properties, so that they can be checked without
- * replaying the infoset, which is efficiently but still
- * costly.
- *
- * <p>
- * A {@link Header} may belong to more than one {@link HeaderList}
- * due to wrapping of {@link Message}.
- *
- * @see HeaderList
- * @see Headers
- */
-public interface Header {
- // TODO: Vivek pointed out that the only time we are looking at
- // mustUnderstand and role are when we do the mustUnderstand error check
- // (that is, to find out if there's any header with @mustUnderstand that
- // has appropriate role for us.)
- // if that's the case, it might be better if we define this whole operation
- // as one method, instead of exposing two properties.
-
- /**
- * Checks if this header is ignorable for us (IOW, make sure
- * that this header has a problematic "mustUnderstand" header value
- * that we have to reject.)
- *
- * <p>
- * This method is used as a part of the
- * <a href="HeaderList.html#MU">mustUnderstanx processing</a>.
- * At the end of the processing, the JAX-WS identifies a list of {@link Header}s
- * that were not understood. This method is invoked on those {@link Header}s,
- * to verify that we don't need to report an error for it.
- *
- * <p>
- * specifically, this method has to perform the following tasks:
- *
- * <ul>
- * <li>If this header does not have <tt>mustUnderstand</tt> as "1" nor "true",
- * then this method must return true.
- * <li>Otherwise, check the role attribute (for SOAP 1.2) or the actor attribute (for SOAP 1.1).
- * When those attributes are absent, the default values have to be assumed.
- * See {@link #getRole(SOAPVersion)} for how the values are defaulted.
- * Now, see if the {@code roles} set contains the value.
- * If so, this method must return false (indicating that an error is in order.)
- * <li>Otherwise return true (since we don't play the role this header is intended for.)
- * </ul>
- *
- * @param soapVersion
- * The caller specifies the SOAP version that the pipeline is working against.
- * Often each {@link Header} implementation already knows the SOAP version
- * anyway, but this allows some {@link Header}s to avoid keeping it.
- * That's why this redundant parameter is passed in.
- * @param roles
- * The set of role values that the current JAX-WS pipeline is assuming.
- * Note that SOAP 1.1 and SOAP 1.2 use different strings for the same role,
- * and the caller is responsible for supplying a proper value depending on the
- * active SOAP version in use.
- *
- * @return
- * true if no error needs to be reported. False if an error needs to be raised.
- * See the method javadoc for more discussion.
- */
- public boolean isIgnorable(@NotNull SOAPVersion soapVersion, @NotNull Set<String> roles);
-
- /**
- * Gets the value of the soap:role attribute (or soap:actor for SOAP 1.1).
- *
- * <p>
- * If the attribute is omitted, the value defaults to {@link SOAPVersion#implicitRole}.
- *
- * @param soapVersion
- * The caller specifies the SOAP version that the pipeline is working against.
- * Often each {@link Header} implementation already knows the SOAP version
- * anyway, but this allows some {@link Header}s to avoid keeping it.
- * That's why this redundant parameter is passed in.
- * @return
- * never null. This string need not be interned.
- */
- public @NotNull String getRole(@NotNull SOAPVersion soapVersion);
-
- /**
- * True if this header is to be relayed if not processed.
- * For SOAP 1.1 messages, this method always return false.
- *
- * <p>
- * IOW, this method returns true if there's @soap:relay='true'
- * is present.
- *
- * <h3>Implementation Note</h3>
- * <p>
- * The implementation needs to check for both "true" and "1",
- * but because attribute values are normalized, it doesn't have
- * to consider " true", " 1 ", and so on.
- *
- * @return
- * false.
- */
- public boolean isRelay();
-
- /**
- * Gets the namespace URI of this header element.
- *
- * @return
- * this string must be interned.
- */
- public @NotNull String getNamespaceURI();
-
- /**
- * Gets the local name of this header element.
- *
- * @return
- * this string must be interned.
- */
- public @NotNull String getLocalPart();
-
- /**
- * Gets the attribute value on the header element.
- *
- * @param nsUri
- * The namespace URI of the attribute. Can be empty.
- * @param localName
- * The local name of the attribute.
- *
- * @return
- * if the attribute is found, return the whitespace normalized value.
- * (meaning no leading/trailing space, no consequtive whitespaces in-between.)
- * Otherwise null. Note that the XML parsers are responsible for
- * whitespace-normalizing attributes, so {@link Header} implementation
- * doesn't have to do anything.
- */
- @Nullable String getAttribute(@NotNull String nsUri, @NotNull String localName);
-
- /**
- * Gets the attribute value on the header element.
- *
- * <p>
- * This is a convenience method that calls into {@link #getAttribute(String, String)}
- *
- * @param name
- * Never null.
- *
- * @see #getAttribute(String, String)
- */
- @Nullable String getAttribute(@NotNull QName name);
-
- /**
- * Reads the header as a {@link XMLStreamReader}.
- *
- * <p>
- * The returned parser points at the start element of this header.
- * (IOW, {@link XMLStreamReader#getEventType()} would return
- * {@link XMLStreamReader#START_ELEMENT}.
- *
- * <h3>Performance Expectation</h3>
- * <p>
- * For some {@link Header} implementations, this operation
- * is a non-trivial operation. Therefore, use of this method
- * is discouraged unless the caller is interested in reading
- * the whole header.
- *
- * <p>
- * Similarly, if the caller wants to use this method only to do
- * the API conversion (such as simply firing SAX events from
- * {@link XMLStreamReader}), then the JAX-WS team requests
- * that you talk to us.
- *
- * <p>
- * {@link Message}s that come from tranport usually provides
- * a reasonably efficient implementation of this method.
- *
- * @return
- * must not null.
- */
- public XMLStreamReader readHeader() throws XMLStreamException;
-
- /**
- * Reads the header as a JAXB object by using the given unmarshaller.
- */
- public <T> T readAsJAXB(Unmarshaller unmarshaller) throws JAXBException;
-
- /**
- * Reads the header as a JAXB object by using the given unmarshaller.
- * @deprecated
- */
- public <T> T readAsJAXB(Bridge<T> bridge) throws JAXBException;
-
- /**
- * Reads the header as a data-bond object
- */
- public <T> T readAsJAXB(XMLBridge<T> bridge) throws JAXBException;
-
- /**
- * Reads this header as an {@link WSEndpointReference}.
- *
- * @param expected
- * The version of the addressing used to parse the EPR.
- * If the actual infoset and this doesn't agree, then
- * you'll get an {@link WebServiceException} stating that fact.
- *
- * @return
- * On a successful return, this method never returns null.
- */
- public @NotNull WSEndpointReference readAsEPR(AddressingVersion expected) throws XMLStreamException;
-
- /**
- * Writes out the header as a fragment.
- *
- * @throws XMLStreamException
- * if the operation fails for some reason. This leaves the
- * writer to an undefined state.
- */
- public void writeTo(XMLStreamWriter w) throws XMLStreamException;
-
- /**
- * Writes out the header to the given SOAPMessage.
- *
- * <p>
- * Sometimes a {@link Message} needs to produce itself
- * as {@link SOAPMessage}, in which case each header needs
- * to turn itself into a header.
- *
- * @throws SOAPException
- * if the operation fails for some reason. This leaves the
- * writer to an undefined state.
- */
- public void writeTo(SOAPMessage saaj) throws SOAPException;
-
- /**
- * Writes out the header as SAX events.
- *
- * <p>
- * Sometimes a {@link Message} needs to produce SAX events,
- * and this method is necessary for headers to participate to it.
- *
- * <p>
- * A header is responsible for producing the SAX events for its part,
- * including <tt>startPrefixMapping</tt> and <tt>endPrefixMapping</tt>,
- * but not startDocument/endDocument.
- *
- * <p>
- * Note that SAX contract requires that any error that does NOT originate
- * from {@link ContentHandler} (meaning any parsing error and etc) must
- * be first reported to {@link ErrorHandler}. If the SAX event production
- * cannot be continued and the processing needs to abort, the code may
- * then throw the same {@link SAXParseException} reported to {@link ErrorHandler}.
- *
- * @param contentHandler
- * The {@link ContentHandler} that receives SAX events.
- *
- * @param errorHandler
- * The {@link ErrorHandler} that receives parsing errors.
- */
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException;
-
- /**
- * Used to obtain value XYZ from a header that looks like
- * "&lt;header&gt;XYZ&lt;/header&gt;". The primary use of this header
- * for now is to access certain Addressing headers quickly.
- *
- * @throws WebServiceException
- * If the structure of the header is more complicated than
- * a simple string header.
- *
- * @return
- * Can be empty but always non-null.
- */
- public @NotNull String getStringContent();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/HeaderList.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/HeaderList.java
deleted file mode 100644
index 9f32f765..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/HeaderList.java
+++ /dev/null
@@ -1,976 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.message;
-
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.Pipe;
-import com.sun.xml.internal.ws.binding.SOAPBindingImpl;
-import com.sun.xml.internal.ws.protocol.soap.ClientMUTube;
-import com.sun.xml.internal.ws.protocol.soap.ServerMUTube;
-import java.util.Arrays;
-
-/**
- * A list of {@link Header}s on a {@link Message}.
- *
- * <p>
- * This list can be modified to add headers
- * from outside a {@link Message}, this is necessary
- * since intermediate processing layers often need to
- * put additional headers.
- *
- * <p>
- * Following the SOAP convention, the order among headers
- * are not significant. However, {@link Codec}s are
- * expected to preserve the order of headers in the input
- * message as much as possible.
- *
- *
- * <a name="MU"></a>
- * <h3>MustUnderstand Processing</h3>
- * <p>
- * To perform SOAP mustUnderstang processing correctly, we need to keep
- * track of headers that are understood and headers that are not.
- * This is a collaborative process among {@link Pipe}s, thus it's something
- * a {@link Pipe} author needs to keep in mind.
- *
- * <p>
- * Specifically, when a {@link Pipe} sees a header and processes it
- * (that is, if it did enough computing with the header to claim that
- * the header is understood), then it should mark the corresponding
- * header as "understood". For example, when a pipe that handles JAX-WSA
- * examins the &lt;wsa:To> header, it can claim that it understood the header.
- * But for example, if a pipe that does the signature verification checks
- * &lt;wsa:To> for a signature, that would not be considered as "understood".
- *
- * <p>
- * There are two ways to mark a header as understood:
- *
- * <ol>
- * <li>Use one of the <tt>getXXX</tt> methods that take a
- * boolean <tt>markAsUnderstood</tt> parameter.
- * Most often, a {@link Pipe} knows it's going to understand a header
- * as long as it's present, so this is the easiest and thus the preferred way.
- *
- * For example, if JAX-WSA looks for &lt;wsa:To>, then it can set
- * <tt>markAsUnderstand</tt> to true, to do the obtaining of a header
- * and marking at the same time.
- *
- * <li>Call {@link #understood(int)}.
- * If under a rare circumstance, a pipe cannot determine whether
- * it can understand it or not when you are fetching a header, then
- * you can use this method afterward to mark it as understood.
- * </ol>
- *
- * <p>
- * Intuitively speaking, at the end of the day, if a header is not
- * understood but {@link Header#isIgnorable(SOAPVersion, java.util.Set)} is false, a bad thing
- * will happen. The actual implementation of the checking is more complicated,
- * for that see {@link ClientMUTube}/{@link ServerMUTube}.
- *
- * @see Message#getHeaders()
- */
-public class HeaderList extends ArrayList<Header> implements MessageHeaders {
-
- private static final long serialVersionUID = -6358045781349627237L;
- /**
- * Bit set to keep track of which headers are understood.
- * <p>
- * The first 32 headers use this field, and the rest will use
- * {@link #moreUnderstoodBits}. The expectation is that
- * most of the time a SOAP message will only have up to 32 headers,
- * so we can avoid allocating separate objects for {@link BitSet}.
- */
- private int understoodBits;
- /**
- * If there are more than 32 headers, we use this {@link BitSet}
- * to keep track of whether those headers are understood.
- * Lazily allocated.
- */
- private BitSet moreUnderstoodBits = null;
-
- private SOAPVersion soapVersion;
-
- /**
- * This method is deprecated - instead use this one:
- * public HeaderList(SOAPVersion)
- * Creates an empty {@link HeaderList}.
- */
- @Deprecated
- public HeaderList() {
- }
-
- /**
- * Creates an empty {@link HeaderList} with the given soap version
- * @param soapVersion
- */
- public HeaderList(SOAPVersion soapVersion) {
- this.soapVersion = soapVersion;
- }
-
- /**
- * Copy constructor.
- */
- public HeaderList(HeaderList that) {
- super(that);
- this.understoodBits = that.understoodBits;
- if (that.moreUnderstoodBits != null) {
- this.moreUnderstoodBits = (BitSet) that.moreUnderstoodBits.clone();
- }
- }
-
- public HeaderList(MessageHeaders that) {
- super(that.asList());
- if (that instanceof HeaderList) {
- HeaderList hThat = (HeaderList) that;
- this.understoodBits = hThat.understoodBits;
- if (hThat.moreUnderstoodBits != null) {
- this.moreUnderstoodBits = (BitSet) hThat.moreUnderstoodBits.clone();
- }
- } else {
- Set<QName> understood = that.getUnderstoodHeaders();
- if (understood != null) {
- for (QName qname : understood) {
- understood(qname);
- }
- }
- }
- }
-
- /**
- * The total number of headers.
- */
- @Override
- public int size() {
- return super.size();
- }
-
- @Override
- public boolean hasHeaders() {
- return !isEmpty();
- }
-
- /**
- * Adds all the headers.
- * @deprecated throws UnsupportedOperationException from some HeaderList implementations - better iterate over items one by one
- */
- @Deprecated
- public void addAll(Header... headers) {
- addAll(Arrays.asList(headers));
- }
-
- /**
- * Gets the {@link Header} at the specified index.
- *
- * <p>
- * This method does not mark the returned {@link Header} as understood.
- *
- * @see #understood(int)
- */
- @Override
- public Header get(int index) {
- return super.get(index);
- }
-
- /**
- * Marks the {@link Header} at the specified index as
- * <a href="#MU">"understood"</a>.
- */
- public void understood(int index) {
- // check that index is in range
- if (index >= size()) {
- throw new ArrayIndexOutOfBoundsException(index);
- }
-
- if (index < 32) {
- understoodBits |= 1 << index;
- } else {
- if (moreUnderstoodBits == null) {
- moreUnderstoodBits = new BitSet();
- }
- moreUnderstoodBits.set(index - 32);
- }
- }
-
- /**
- * Returns true if a {@link Header} at the given index
- * was <a href="#MU">"understood"</a>.
- */
- public boolean isUnderstood(int index) {
- // check that index is in range
- if (index >= size()) {
- throw new ArrayIndexOutOfBoundsException(index);
- }
-
- if (index < 32) {
- return understoodBits == (understoodBits | (1 << index));
- } else {
- if (moreUnderstoodBits == null) {
- return false;
- }
- return moreUnderstoodBits.get(index - 32);
- }
- }
-
- /**
- * Marks the specified {@link Header} as <a href="#MU">"understood"</a>.
- *
- * @deprecated
- * By the definition of {@link ArrayList}, this operation requires
- * O(n) search of the array, and thus inherently inefficient.
- *
- * Because of this, if you are developing a {@link Pipe} for
- * a performance sensitive environment, do not use this method.
- *
- * @throws IllegalArgumentException
- * if the given header is not {@link #contains(Object) contained}
- * in this header.
- */
- @Override
- public void understood(@NotNull Header header) {
- int sz = size();
- for (int i = 0; i < sz; i++) {
- if (get(i) == header) {
- understood(i);
- return;
- }
- }
- throw new IllegalArgumentException();
- }
-
- /**
- * Gets the first {@link Header} of the specified name.
- *
- * @param markAsUnderstood
- * If this parameter is true, the returned header will
- * be marked as <a href="#MU">"understood"</a>.
- * @return null if not found.
- */
- @Override
- public @Nullable Header get(@NotNull String nsUri, @NotNull String localName, boolean markAsUnderstood) {
- int len = size();
- for (int i = 0; i < len; i++) {
- Header h = get(i);
- if (h.getLocalPart().equals(localName) && h.getNamespaceURI().equals(nsUri)) {
- if (markAsUnderstood) {
- understood(i);
- }
- return h;
- }
- }
- return null;
- }
-
- /**
- * @deprecated
- * Use {@link #get(String, String, boolean)}
- */
- public Header get(String nsUri, String localName) {
- return get(nsUri, localName, true);
- }
-
- /**
- * Gets the first {@link Header} of the specified name.
- *
- * @param markAsUnderstood
- * If this parameter is true, the returned header will
- * be marked as <a href="#MU">"understood"</a>.
- * @return null
- * if not found.
- */
- @Override
- public @Nullable Header get(@NotNull QName name, boolean markAsUnderstood) {
- return get(name.getNamespaceURI(), name.getLocalPart(), markAsUnderstood);
- }
-
- /**
- * @deprecated
- * Use {@link #get(QName)}
- */
- public
- @Nullable
- Header get(@NotNull QName name) {
- return get(name, true);
- }
-
- /**
- * @deprecated
- * Use {@link #getHeaders(String, String, boolean)}
- */
- public Iterator<Header> getHeaders(final String nsUri, final String localName) {
- return getHeaders(nsUri, localName, true);
- }
-
- /**
- * Gets all the {@link Header}s of the specified name,
- * including duplicates (if any.)
- *
- * @param markAsUnderstood
- * If this parameter is true, the returned headers will
- * be marked as <a href="#MU">"understood"</a> when they are returned
- * from {@link Iterator#next()}.
- * @return empty iterator if not found.
- */
- public
- @NotNull
- @Override
- Iterator<Header> getHeaders(@NotNull final String nsUri, @NotNull final String localName, final boolean markAsUnderstood) {
- return new Iterator<Header>() {
-
- int idx = 0;
- Header next;
-
- @Override
- public boolean hasNext() {
- if (next == null) {
- fetch();
- }
- return next != null;
- }
-
- @Override
- public Header next() {
- if (next == null) {
- fetch();
- if (next == null) {
- throw new NoSuchElementException();
- }
- }
-
- if (markAsUnderstood) {
- assert get(idx - 1) == next;
- understood(idx - 1);
- }
-
- Header r = next;
- next = null;
- return r;
- }
-
- private void fetch() {
- while (idx < size()) {
- Header h = get(idx++);
- if (h.getLocalPart().equals(localName) && h.getNamespaceURI().equals(nsUri)) {
- next = h;
- break;
- }
- }
- }
-
- @Override
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
-
- /**
- * @see #getHeaders(String, String, boolean)
- */
- public
- @NotNull
- @Override
- Iterator<Header> getHeaders(@NotNull QName headerName, final boolean markAsUnderstood) {
- return getHeaders(headerName.getNamespaceURI(), headerName.getLocalPart(), markAsUnderstood);
- }
-
- /**
- * @deprecated
- * use {@link #getHeaders(String, boolean)}.
- */
- public
- @NotNull
- Iterator<Header> getHeaders(@NotNull final String nsUri) {
- return getHeaders(nsUri, true);
- }
-
- /**
- * Gets an iteration of headers {@link Header} in the specified namespace,
- * including duplicates (if any.)
- *
- * @param markAsUnderstood
- * If this parameter is true, the returned headers will
- * be marked as <a href="#MU">"understood"</a> when they are returned
- * from {@link Iterator#next()}.
- * @return
- * empty iterator if not found.
- */
- public
- @NotNull
- @Override
- Iterator<Header> getHeaders(@NotNull final String nsUri, final boolean markAsUnderstood) {
- return new Iterator<Header>() {
-
- int idx = 0;
- Header next;
-
- @Override
- public boolean hasNext() {
- if (next == null) {
- fetch();
- }
- return next != null;
- }
-
- @Override
- public Header next() {
- if (next == null) {
- fetch();
- if (next == null) {
- throw new NoSuchElementException();
- }
- }
-
- if (markAsUnderstood) {
- assert get(idx - 1) == next;
- understood(idx - 1);
- }
-
- Header r = next;
- next = null;
- return r;
- }
-
- private void fetch() {
- while (idx < size()) {
- Header h = get(idx++);
- if (h.getNamespaceURI().equals(nsUri)) {
- next = h;
- break;
- }
- }
- }
-
- @Override
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
-
- /**
- * Returns the value of WS-Addressing <code>To</code> header. The <code>version</code>
- * identifies the WS-Addressing version and the header returned is targeted at
- * the current implicit role. Caches the value for subsequent invocation.
- * Duplicate <code>To</code> headers are detected earlier.
- *
- * @param av WS-Addressing version
- * @param sv SOAP version
- * @throws IllegalArgumentException if either <code>av</code> or <code>sv</code> is null.
- * @return Value of WS-Addressing To header, anonymous URI if no header is present
- */
- public String getTo(AddressingVersion av, SOAPVersion sv) {
- return AddressingUtils.getTo(this, av, sv);
- }
-
- /**
- * Returns the value of WS-Addressing <code>Action</code> header. The <code>version</code>
- * identifies the WS-Addressing version and the header returned is targeted at
- * the current implicit role. Caches the value for subsequent invocation.
- * Duplicate <code>Action</code> headers are detected earlier.
- *
- * @param av WS-Addressing version
- * @param sv SOAP version
- * @throws IllegalArgumentException if either <code>av</code> or <code>sv</code> is null.
- * @return Value of WS-Addressing Action header, null if no header is present
- */
- public String getAction(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
- return AddressingUtils.getAction(this, av, sv);
- }
-
- /**
- * Returns the value of WS-Addressing <code>ReplyTo</code> header. The <code>version</code>
- * identifies the WS-Addressing version and the header returned is targeted at
- * the current implicit role. Caches the value for subsequent invocation.
- * Duplicate <code>ReplyTo</code> headers are detected earlier.
- *
- * @param av WS-Addressing version
- * @param sv SOAP version
- * @throws IllegalArgumentException if either <code>av</code> or <code>sv</code> is null.
- * @return Value of WS-Addressing ReplyTo header, null if no header is present
- */
- public WSEndpointReference getReplyTo(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
- return AddressingUtils.getReplyTo(this, av, sv);
- }
-
- /**
- * Returns the value of WS-Addressing <code>FaultTo</code> header. The <code>version</code>
- * identifies the WS-Addressing version and the header returned is targeted at
- * the current implicit role. Caches the value for subsequent invocation.
- * Duplicate <code>FaultTo</code> headers are detected earlier.
- *
- * @param av WS-Addressing version
- * @param sv SOAP version
- * @throws IllegalArgumentException if either <code>av</code> or <code>sv</code> is null.
- * @return Value of WS-Addressing FaultTo header, null if no header is present
- */
- public WSEndpointReference getFaultTo(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
- return AddressingUtils.getFaultTo(this, av, sv);
- }
-
- /**
- * Returns the value of WS-Addressing <code>MessageID</code> header. The <code>version</code>
- * identifies the WS-Addressing version and the header returned is targeted at
- * the current implicit role. Caches the value for subsequent invocation.
- * Duplicate <code>MessageID</code> headers are detected earlier.
- *
- * @param av WS-Addressing version
- * @param sv SOAP version
- * @throws WebServiceException if either <code>av</code> or <code>sv</code> is null.
- * @return Value of WS-Addressing MessageID header, null if no header is present
- */
- public String getMessageID(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
- return AddressingUtils.getMessageID(this, av, sv);
- }
-
- /**
- * Returns the value of WS-Addressing <code>RelatesTo</code> header. The <code>version</code>
- * identifies the WS-Addressing version and the header returned is targeted at
- * the current implicit role. Caches the value for subsequent invocation.
- * Duplicate <code>RelatesTo</code> headers are detected earlier.
- *
- * @param av WS-Addressing version
- * @param sv SOAP version
- * @throws WebServiceException if either <code>av</code> or <code>sv</code> is null.
- * @return Value of WS-Addressing RelatesTo header, null if no header is present
- */
- public String getRelatesTo(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
- return AddressingUtils.getRelatesTo(this, av, sv);
- }
-
- /**
- * Creates a set of outbound WS-Addressing headers on the client with the
- * specified Action Message Addressing Property value.
- * <p><p>
- * This method needs to be invoked right after such a Message is
- * created which is error prone but so far only MEX, RM and JAX-WS
- * creates a request so this ugliness is acceptable. This method is also used
- * to create protocol messages that are not associated with any {@link WSBinding}
- * and {@link WSDLPort}.
- *
- * @param packet request packet
- * @param av WS-Addressing version
- * @param sv SOAP version
- * @param oneway Indicates if the message exchange pattern is oneway
- * @param action Action Message Addressing Property value
- * @param mustUnderstand to indicate if the addressing headers are set with mustUnderstand attribute
- */
- public void fillRequestAddressingHeaders(Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action, boolean mustUnderstand) {
- AddressingUtils.fillRequestAddressingHeaders(this, packet, av, sv, oneway, action, mustUnderstand);
- }
-
- public void fillRequestAddressingHeaders(Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action) {
- AddressingUtils.fillRequestAddressingHeaders(this, packet, av, sv, oneway, action);
- }
-
- /**
- * Creates a set of outbound WS-Addressing headers on the client with the
- * default Action Message Addressing Property value.
- * <p><p>
- * This method needs to be invoked right after such a Message is
- * created which is error prone but so far only MEX, RM and JAX-WS
- * creates a request so this ugliness is acceptable. If more components
- * are identified using this, then we may revisit this.
- * <p><p>
- * This method is used if default Action Message Addressing Property is to
- * be used. See
- * {@link #fillRequestAddressingHeaders(Packet, com.sun.xml.internal.ws.api.addressing.AddressingVersion, com.sun.xml.internal.ws.api.SOAPVersion, boolean, String)}
- * if non-default Action is to be used, for example when creating a protocol message not
- * associated with {@link WSBinding} and {@link WSDLPort}.
- * This method uses SOAPAction as the Action unless set expplicitly in the wsdl.
- * @param wsdlPort request WSDL port
- * @param binding request WSBinding
- * @param packet request packet
- */
- public void fillRequestAddressingHeaders(WSDLPort wsdlPort, @NotNull WSBinding binding, Packet packet) {
- AddressingUtils.fillRequestAddressingHeaders(this, wsdlPort, binding, packet);
- }
-
- /**
- * Adds a new {@link Header}.
- *
- * <p>
- * Order doesn't matter in headers, so this method
- * does not make any guarantee as to where the new header
- * is inserted.
- *
- * @return
- * always true. Don't use the return value.
- */
- @Override
- public boolean add(Header header) {
- return super.add(header);
- }
-
- /**
- * Removes the first {@link Header} of the specified name.
- * @param nsUri namespace URI of the header to remove
- * @param localName local part of the FQN of the header to remove
- *
- * @return null if not found.
- */
- public
- @Nullable
- @Override
- Header remove(@NotNull String nsUri, @NotNull String localName) {
- int len = size();
- for (int i = 0; i < len; i++) {
- Header h = get(i);
- if (h.getLocalPart().equals(localName) && h.getNamespaceURI().equals(nsUri)) {
- return remove(i);
- }
- }
- return null;
- }
-
- /**
- * Replaces an existing {@link Header} or adds a new {@link Header}.
- *
- * <p>
- * Order doesn't matter in headers, so this method
- * does not make any guarantee as to where the new header
- * is inserted.
- *
- * @return
- * always true. Don't use the return value.
- */
- @Override
- public boolean addOrReplace(Header header) {
- for (int i=0; i < size(); i++) {
- Header hdr = get(i);
- if (hdr.getNamespaceURI().equals(header.getNamespaceURI()) &&
- hdr.getLocalPart().equals(header.getLocalPart())) {
- // Put the new header in the old position. Call super versions
- // internally to avoid UnsupportedOperationException
- removeInternal(i);
- addInternal(i, header);
- return true;
- }
- }
- return add(header);
- }
-
- @Override
- public void replace(Header old, Header header) {
- for (int i=0; i < size(); i++) {
- Header hdr = get(i);
- if (hdr.getNamespaceURI().equals(header.getNamespaceURI()) &&
- hdr.getLocalPart().equals(header.getLocalPart())) {
- // Put the new header in the old position. Call super versions
- // internally to avoid UnsupportedOperationException
- removeInternal(i);
- addInternal(i, header);
- return;
- }
- }
-
- throw new IllegalArgumentException();
- }
-
- protected void addInternal(int index, Header header) {
- super.add(index, header);
- }
-
- protected Header removeInternal(int index) {
- return super.remove(index);
- }
-
- /**
- * Removes the first {@link Header} of the specified name.
- *
- * @param name fully qualified name of the header to remove
- *
- * @return null if not found.
- */
- public
- @Nullable
- @Override
- Header remove(@NotNull QName name) {
- return remove(name.getNamespaceURI(), name.getLocalPart());
- }
-
- /**
- * Removes the first {@link Header} of the specified name.
- *
- * @param index index of the header to remove
- *
- * @return removed header
- */
- @Override
- public Header remove(int index) {
- removeUnderstoodBit(index);
- return super.remove(index);
- }
-
- /**
- * Removes the "understood" bit for header on the position specified by {@code index} parameter
- * from the set of understood header bits.
- *
- * @param index position of the bit to remove
- */
- private void removeUnderstoodBit(int index) {
- assert index < size();
-
- if (index < 32) {
- /**
- * Let
- * R be the bit to be removed
- * M be a more significant "upper" bit than bit R
- * L be a less significant "lower" bit than bit R
- *
- * Then following 3 lines of code produce these results:
- *
- * old understoodBits = MMMMMMMMMMMMRLLLLLLLLLLLLLLLLLLL
- *
- * shiftedUpperBits = 0MMMMMMMMMMMM0000000000000000000
- *
- * lowerBits = 0000000000000LLLLLLLLLLLLLLLLLLL
- *
- * new understoodBits = 0MMMMMMMMMMMMLLLLLLLLLLLLLLLLLLL
- *
- * The R bit is removed and all the upper bits are shifted right (unsigned)
- */
- int shiftedUpperBits = understoodBits >>> -31 + index << index;
- int lowerBits = understoodBits << -index >>> 31 - index >>> 1;
- understoodBits = shiftedUpperBits | lowerBits;
-
- if (moreUnderstoodBits != null && moreUnderstoodBits.cardinality() > 0) {
- if (moreUnderstoodBits.get(0)) {
- understoodBits |= 0x80000000;
- }
-
- moreUnderstoodBits.clear(0);
- for (int i = moreUnderstoodBits.nextSetBit(1); i > 0; i = moreUnderstoodBits.nextSetBit(i + 1)) {
- moreUnderstoodBits.set(i - 1);
- moreUnderstoodBits.clear(i);
- }
- }
- } else if (moreUnderstoodBits != null && moreUnderstoodBits.cardinality() > 0) {
- index -= 32;
- moreUnderstoodBits.clear(index);
- for (int i = moreUnderstoodBits.nextSetBit(index); i >= 1; i = moreUnderstoodBits.nextSetBit(i + 1)) {
- moreUnderstoodBits.set(i - 1);
- moreUnderstoodBits.clear(i);
- }
- }
-
- // remove bit set if the new size will be < 33 => we fit all bits into int
- if (size() - 1 <= 33 && moreUnderstoodBits != null) {
- moreUnderstoodBits = null;
- }
- }
-
- /**
- * Removes a single instance of the specified element from this
- * header list, if it is present. More formally,
- * removes a header <tt>h</tt> such that <tt>(o==null ? h==null :
- * o.equals(h))</tt>, if the header list contains one or more such
- * headers. Returns <tt>true</tt> if the list contained the
- * specified element (or equivalently, if the list changed as a
- * result of the call).<p>
- *
- * @param o element to be removed from this list, if present.
- * @return <tt>true</tt> if the list contained the specified element.
- * @see #remove(javax.xml.namespace.QName)
- */
- @Override
- public boolean remove(Object o) {
- if (o != null) {
- for (int index = 0; index < this.size(); index++) {
- if (o.equals(this.get(index))) {
- remove(index);
- return true;
- }
- }
- }
-
- return false;
- }
-
- public Header remove(Header h) {
- if (remove((Object) h)) {
- return h;
- } else {
- return null;
- }
- }
-
- /**
- * Creates a copy.
- *
- * This handles null {@link HeaderList} correctly.
- *
- * @param original
- * Can be null, in which case null will be returned.
- */
- public static HeaderList copy(MessageHeaders original) {
- if (original == null) {
- return null;
- } else {
- return new HeaderList(original);
- }
- }
-
- /**
- * Creates a copy.
- *
- * This handles null {@link HeaderList} correctly.
- *
- * @param original
- * Can be null, in which case null will be returned.
- */
- public static HeaderList copy(HeaderList original) {
- return copy((MessageHeaders) original);
- }
-
- public void readResponseAddressingHeaders(WSDLPort wsdlPort, WSBinding binding) {
- // read Action
-// String wsaAction = getAction(binding.getAddressingVersion(), binding.getSOAPVersion());
- // TODO: validate client-inbound Action
- }
-
- @Override
- public void understood(QName name) {
- get(name, true);
- }
-
- @Override
- public void understood(String nsUri, String localName) {
- get(nsUri, localName, true);
- }
-
- @Override
- public Set<QName> getUnderstoodHeaders() {
- Set<QName> understoodHdrs = new HashSet<QName>();
- for (int i = 0; i < size(); i++) {
- if (isUnderstood(i)) {
- Header header = get(i);
- understoodHdrs.add(new QName(header.getNamespaceURI(), header.getLocalPart()));
- }
- }
- return understoodHdrs;
-// throw new UnsupportedOperationException("getUnderstoodHeaders() is not implemented by HeaderList");
- }
-
- @Override
- public boolean isUnderstood(Header header) {
- return isUnderstood(header.getNamespaceURI(), header.getLocalPart());
- }
-
- @Override
- public boolean isUnderstood(String nsUri, String localName) {
- for (int i = 0; i < size(); i++) {
- Header h = get(i);
- if (h.getLocalPart().equals(localName) && h.getNamespaceURI().equals(nsUri)) {
- return isUnderstood(i);
- }
- }
- return false;
- }
-
- @Override
- public boolean isUnderstood(QName name) {
- return isUnderstood(name.getNamespaceURI(), name.getLocalPart());
- }
-
- @Override
- public Set<QName> getNotUnderstoodHeaders(Set<String> roles, Set<QName> knownHeaders, WSBinding binding) {
- Set<QName> notUnderstoodHeaders = null;
- if (roles == null) {
- roles = new HashSet<String>();
- }
- SOAPVersion effectiveSoapVersion = getEffectiveSOAPVersion(binding);
- roles.add(effectiveSoapVersion.implicitRole);
- for (int i = 0; i < size(); i++) {
- if (!isUnderstood(i)) {
- Header header = get(i);
- if (!header.isIgnorable(effectiveSoapVersion, roles)) {
- QName qName = new QName(header.getNamespaceURI(), header.getLocalPart());
- if (binding == null) {
- //if binding is null, no further checks needed...we already
- //know this header is not understood from the isUnderstood
- //check above
- if (notUnderstoodHeaders == null) {
- notUnderstoodHeaders = new HashSet<QName>();
- }
- notUnderstoodHeaders.add(qName);
- } else {
- // if the binding is not null, see if the binding can understand it
- if (binding instanceof SOAPBindingImpl && !((SOAPBindingImpl) binding).understandsHeader(qName)) {
- if (!knownHeaders.contains(qName)) {
- //logger.info("Element not understood=" + qName);
- if (notUnderstoodHeaders == null) {
- notUnderstoodHeaders = new HashSet<QName>();
- }
- notUnderstoodHeaders.add(qName);
- }
- }
- }
- }
- }
- }
- return notUnderstoodHeaders;
- }
-
- private SOAPVersion getEffectiveSOAPVersion(WSBinding binding) {
- SOAPVersion mySOAPVersion = (soapVersion != null) ? soapVersion : binding.getSOAPVersion();
- if (mySOAPVersion == null) {
- mySOAPVersion = SOAPVersion.SOAP_11;
- }
- return mySOAPVersion;
- }
-
- public void setSoapVersion(SOAPVersion soapVersion) {
- this.soapVersion = soapVersion;
- }
-
- @Override
- public Iterator<Header> getHeaders() {
- return iterator();
- }
-
- @Override
- public List<Header> asList() {
- return this;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Headers.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Headers.java
deleted file mode 100644
index 63ee6686..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Headers.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.bind.v2.runtime.MarshallerImpl;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.pipe.Pipe;
-import com.sun.xml.internal.ws.message.DOMHeader;
-import com.sun.xml.internal.ws.message.StringHeader;
-import com.sun.xml.internal.ws.message.jaxb.JAXBHeader;
-import com.sun.xml.internal.ws.message.saaj.SAAJHeader;
-import com.sun.xml.internal.ws.message.stream.StreamHeader11;
-import com.sun.xml.internal.ws.message.stream.StreamHeader12;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.BindingContextFactory;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-
-import org.w3c.dom.Element;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Marshaller;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPHeaderElement;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * Factory methods for various {@link Header} implementations.
- *
- * <p>
- * This class provides various methods to create different
- * flavors of {@link Header} classes that store data
- * in different formats.
- *
- * <p>
- * This is a part of the JAX-WS RI internal API so that
- * {@link Pipe} implementations can reuse the implementations
- * done inside the JAX-WS without having a strong dependency
- * to the actual class.
- *
- * <p>
- * If you find some of the useful convenience methods missing
- * from this class, please talk to us.
- *
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class Headers {
- private Headers() {}
-
- /**
- * @deprecated
- * Use {@link #create(BindingContext, Object)} instead.
- */
- public static Header create(SOAPVersion soapVersion, Marshaller m, Object o) {
- return new JAXBHeader(BindingContextFactory.getBindingContext(m),o);
- }
-
- /**
- * Creates a {@link Header} backed a by a JAXB bean.
- */
- public static Header create(JAXBContext context, Object o) {
- return new JAXBHeader(BindingContextFactory.create(context),o);
- }
-
- public static Header create(BindingContext context, Object o) {
- return new JAXBHeader(context,o);
- }
-
- /**
- * Creates a {@link Header} backed a by a JAXB bean, with the given tag name.
- *
- * See {@link #create(SOAPVersion, Marshaller, Object)} for the meaning
- * of other parameters.
- *
- * @param tagName
- * The name of the newly created header. Must not be null.
- * @param o
- * The JAXB bean that represents the contents of the header. Must not be null.
- */
- public static Header create(SOAPVersion soapVersion, Marshaller m, QName tagName, Object o) {
- return create(soapVersion,m,new JAXBElement(tagName,o.getClass(),o));
- }
-
- /**
- * Creates a {@link Header} backed a by a JAXB bean.
- * @deprecated
- */
- public static Header create(Bridge bridge, Object jaxbObject) {
- return new JAXBHeader(new com.sun.xml.internal.ws.db.glassfish.BridgeWrapper(null,bridge), jaxbObject);
- }
-
- public static Header create(XMLBridge bridge, Object jaxbObject) {
- return new JAXBHeader(bridge, jaxbObject);
- }
-
- /**
- * Creates a new {@link Header} backed by a SAAJ object.
- */
- public static Header create(SOAPHeaderElement header) {
- return new SAAJHeader(header);
- }
-
- /**
- * Creates a new {@link Header} backed by an {@link Element}.
- */
- public static Header create( Element node ) {
- return new DOMHeader<Element>(node);
- }
-
- /**
- * @deprecated
- * Use {@link #create(Element)}
- */
- public static Header create( SOAPVersion soapVersion, Element node ) {
- return create(node);
- }
-
- /**
- * Creates a new {@link Header} that reads from {@link XMLStreamReader}.
- *
- * <p>
- * Note that the header implementation will read the entire data
- * into memory anyway, so this might not be as efficient as you might hope.
- */
- public static Header create( SOAPVersion soapVersion, XMLStreamReader reader ) throws XMLStreamException {
- switch(soapVersion) {
- case SOAP_11:
- return new StreamHeader11(reader);
- case SOAP_12:
- return new StreamHeader12(reader);
- default:
- throw new AssertionError();
- }
- }
-
- /**
- * Creates a new {@link Header} that that has a single text value in it
- * (IOW, of the form &lt;foo>text&lt;/foo>.)
- *
- * @param name QName of the header element
- * @param value text value of the header
- */
- public static Header create(QName name, String value) {
- return new StringHeader(name, value);
- }
-
- /**
- * Creates a new {@link Header} that that has a single text value in it
- * (IOW, of the form &lt;foo>text&lt;/foo>.)
- *
- * @param name QName of the header element
- * @param value text value of the header
- */
- public static Header createMustUnderstand(@NotNull SOAPVersion soapVersion, @NotNull QName name,@NotNull String value) {
- return new StringHeader(name, value,soapVersion,true);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Message.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Message.java
deleted file mode 100644
index cd473a7a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Message.java
+++ /dev/null
@@ -1,789 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.WSDLOperationMapping;
-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.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.Pipe;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.client.dispatch.DispatchImpl;
-import com.sun.xml.internal.ws.message.AttachmentSetImpl;
-import com.sun.xml.internal.ws.message.StringHeader;
-import com.sun.xml.internal.ws.message.jaxb.JAXBMessage;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-import com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx;
-import com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.soap.MimeHeaders;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Source;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.WebServiceException;
-import java.io.InputStream;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-/**
- * Represents a SOAP message.
- *
- *
- * <h2>What is a message?</h2>
- * <p>
- * A {@link Message} consists of the following:
- *
- * <ol>
- * <li>
- * Random-accessible list of headers.
- * a header is a representation of an element inside
- * &lt;soap:Header>.
- * It can be read multiple times,
- * can be added or removed, but it is not modifiable.
- * See {@link HeaderList} for more about headers.
- *
- * <li>
- * The payload of the message, which is a representation
- * of an element inside &lt;soap:Body>.
- * the payload is streamed, and therefore it can be
- * only read once (or can be only written to something once.)
- * once a payload is used, a message is said to be <b>consumed</b>.
- * A message {@link #hasPayload() may not have any payload.}
- *
- * <li>
- * Attachments.
- * TODO: can attachments be streamed? I suspect so.
- * does anyone need to read attachment twice?
- *
- * </ol>
- *
- *
- * <h2>How does this abstraction work?</h2>
- * <p>
- * The basic idea behind the {@link Message} is to hide the actual
- * data representation. For example, a {@link Message} might be
- * constructed on top of an {@link InputStream} from the accepted HTTP connection,
- * or it might be constructed on top of a JAXB object as a result
- * of the method invocation through {@link Proxy}. There will be
- * a {@link Message} implementation for each of those cases.
- *
- * <p>
- * This interface provides a lot of methods that access the payload
- * in many different forms, and implementations can implement those
- * methods in the best possible way.
- *
- * <p>
- * A particular attention is paid to make sure that a {@link Message}
- * object can be constructed on a stream that is not fully read yet.
- * We believe this improves the turn-around time on the server side.
- *
- * <p>
- * It is often useful to wrap a {@link Message} into another {@link Message},
- * for example to encrypt the body, or to verify the signature as the body
- * is read.
- *
- * <p>
- * This representation is also used for a REST-ful XML message.
- * In such case we'll construct a {@link Message} with empty
- * attachments and headers, and when serializing all headers
- * and attachments will be ignored.
- *
- *
- *
- * <h2>Message and XOP</h2>
- * <p>
- * XOP is considered as an {@link Codec}, and therefore when you are looking at
- * {@link Message}, you'll never see &lt;xop:Include> or any such elements
- * (instead you'll see the base64 data inlined.) If a consumer of infoset isn't
- * interested in handling XOP by himself, this allows him to work with XOP
- * correctly even without noticing it.
- *
- * <p>
- * For producers and consumers that are interested in accessing the binary data
- * more efficiently, they can use {@link XMLStreamReaderEx} and
- * {@link XMLStreamWriterEx}.
- *
- *
- *
- * <h2>Message lifespan</h2>
- * <p>
- * Often {@link Packet} include information local to a particular
- * invocaion (such as {@code HttpServletRequest}, from this angle, it makes sense
- * to tie a lifespan of a message to one pipeline invocation.
- * <p>
- * On the other hand, if you think about WS-RM, it often needs to hold on to
- * a message longer than a pipeline invocation (you might get an HTTP request,
- * get a message X, get a second HTTP request, get another message Y, and
- * only then you might want to process X.)
- * <p>
- * TODO: what do we do about this?
- *
- *
- * <pre>
- * TODO: can body element have foreign attributes? maybe ID for security?
- * Yes, when the SOAP body is signed there will be an ID attribute present
- * But in this case any security based impl may need access
- * to the concrete representation.
- * TODO: HTTP headers?
- * Yes. Abstracted as transport-based properties.
- * TODO: who handles SOAP 1.1 and SOAP 1.2 difference?
- * As separate channel implementations responsible for the creation of the
- * message?
- * TODO: session?
- * TODO: Do we need to expose SOAPMessage explicitly?
- * SOAPMessage could be the concrete representation but is it necessary to
- * transform between different concrete representations?
- * Perhaps this comes down to how use channels for creation and processing.
- * TODO: Do we need to distinguish better between creation and processing?
- * Do we really need the requirement that a created message can be resused
- * for processing. Shall we bifurcate?
- *
- * TODO: SOAP version issue
- * SOAP version is determined by the context, so message itself doesn't carry it around (?)
- *
- * TODO: wrapping message needs easier. in particular properties and attachments.
- * </pre>
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class Message {
-
- /**
- * Returns true if headers are present in the message.
- *
- * @return
- * true if headers are present.
- */
- public abstract boolean hasHeaders();
-
- /**
- * Gets all the headers of this message.
- *
- * <h3>Implementation Note</h3>
- * <p>
- * {@link Message} implementation is allowed to defer
- * the construction of {@link MessageHeaders} object. So
- * if you only want to check for the existence of any header
- * element, use {@link #hasHeaders()}.
- *
- * @return
- * always return the same non-null object.
- */
- public abstract @NotNull MessageHeaders getHeaders();
-
- /**
- * Gets the attachments of this message
- * (attachments live outside a message.)
- */
- public @NotNull AttachmentSet getAttachments() {
- if (attachmentSet == null) {
- attachmentSet = new AttachmentSetImpl();
- }
- return attachmentSet;
- }
-
- /**
- * Optimization hint for the derived class to check
- * if we may have some attachments.
- */
- protected boolean hasAttachments() {
- return attachmentSet!=null;
- }
-
- protected AttachmentSet attachmentSet;
-
- private WSDLBoundOperation operation = null;
-
- private WSDLOperationMapping wsdlOperationMapping = null;
-
- private MessageMetadata messageMetadata = null;
-
- public void setMessageMedadata(MessageMetadata metadata) {
- messageMetadata = metadata;
- }
-
-
- /**
- * Returns the operation of which this message is an instance of.
- *
- * <p>
- * This method relies on {@link WSDLBoundPortType#getOperation(String, String)} but
- * it does so in an efficient way.
- *
- * @deprecated It is not always possible to uniquely identify the WSDL Operation from just the
- * information in the Message. Instead, Use {@link com.sun.xml.internal.ws.api.message.Packet#getWSDLOperation()}
- * to get it correctly.
- *
- * <p>
- * This method works only for a request. A pipe can determine an operation for a request,
- * and then keep it in a local variable to use it with a response, so there should be
- * no need to find out operation from a response (besides, there might not be any response!).
- *
- * @param boundPortType
- * This represents the port for which this message is used.
- * Most {@link Pipe}s should get this information when they are created,
- * since a pippeline always work against a particular type of {@link WSDLPort}.
- *
- * @return
- * Null if the operation was not found. This is possible, for example when a protocol
- * message is sent through a pipeline, or when we receive an invalid request on the server,
- * or when we are on the client and the user appliation sends a random DOM through
- * {@link Dispatch}, so this error needs to be handled gracefully.
- */
- @Deprecated
- public final @Nullable WSDLBoundOperation getOperation(@NotNull WSDLBoundPortType boundPortType) {
- if (operation == null && messageMetadata != null) {
- if (wsdlOperationMapping == null) wsdlOperationMapping = messageMetadata.getWSDLOperationMapping();
- if (wsdlOperationMapping != null) operation = wsdlOperationMapping.getWSDLBoundOperation();
- }
- if(operation==null)
- operation = boundPortType.getOperation(getPayloadNamespaceURI(),getPayloadLocalPart());
- return operation;
- }
-
- /**
- * The same as {@link #getOperation(WSDLBoundPortType)} but
- * takes {@link WSDLPort} for convenience.
- *
- * @deprecated It is not always possible to uniquely identify the WSDL Operation from just the
- * information in the Message. Instead, Use {@link com.sun.xml.internal.ws.api.message.Packet#getWSDLOperation()}
- * to get it correctly.
- */
- @Deprecated
- public final @Nullable WSDLBoundOperation getOperation(@NotNull WSDLPort port) {
- return getOperation(port.getBinding());
- }
-
- /**
- * Returns the java Method of which this message is an instance of.
- *
- * It is not always possible to uniquely identify the WSDL Operation from just the
- * information in the Message. Instead, Use {@link com.sun.xml.internal.ws.api.message.Packet#getWSDLOperation()}
- * to get the QName of the associated wsdl operation correctly.
- *
- * <p>
- * This method works only for a request. A pipe can determine a {@link Method}
- * for a request, and then keep it in a local variable to use it with a response,
- * so there should be no need to find out operation from a response (besides,
- * there might not be any response!).
- *
- * @param seiModel
- * This represents the java model for the endpoint
- * Some server {@link Pipe}s would get this information when they are created.
- *
- * @return
- * Null if there is no corresponding Method for this message. This is
- * possible, for example when a protocol message is sent through a
- * pipeline, or when we receive an invalid request on the server,
- * or when we are on the client and the user appliation sends a random
- * DOM through {@link Dispatch}, so this error needs to be handled
- * gracefully.
- */
- @Deprecated
- public final @Nullable JavaMethod getMethod(@NotNull SEIModel seiModel) {
- if (wsdlOperationMapping == null && messageMetadata != null) {
- wsdlOperationMapping = messageMetadata.getWSDLOperationMapping();
- }
- if (wsdlOperationMapping != null) {
- return wsdlOperationMapping.getJavaMethod();
- }
- //fall back to the original logic which could be incorrect ...
- String localPart = getPayloadLocalPart();
- String nsUri;
- if (localPart == null) {
- localPart = "";
- nsUri = "";
- } else {
- nsUri = getPayloadNamespaceURI();
- }
- QName name = new QName(nsUri, localPart);
- return seiModel.getJavaMethod(name);
- }
-
- private Boolean isOneWay;
-
- /**
- * Returns true if this message is a request message for a
- * one way operation according to the given WSDL. False otherwise.
- *
- * <p>
- * This method is functionally equivalent as doing
- * {@code getOperation(port).getOperation().isOneWay()}
- * (with proper null check and all.) But this method
- * can sometimes work faster than that (for example,
- * on the client side when used with SEI.)
- *
- * @param port
- * {@link Message}s are always created under the context of
- * one {@link WSDLPort} and they never go outside that context.
- * Pass in that "governing" {@link WSDLPort} object here.
- * We chose to receive this as a parameter instead of
- * keeping {@link WSDLPort} in a message, just to save the storage.
- *
- * <p>
- * The implementation of this method involves caching the return
- * value, so the behavior is undefined if multiple callers provide
- * different {@link WSDLPort} objects, which is a bug of the caller.
- */
- public boolean isOneWay(@NotNull WSDLPort port) {
- if(isOneWay==null) {
- // we don't know, so compute.
- WSDLBoundOperation op = getOperation(port);
- if(op!=null)
- isOneWay = op.getOperation().isOneWay();
- else
- // the contract is to return true only when it's known to be one way.
- isOneWay = false;
- }
- return isOneWay;
- }
-
- /**
- * Makes an assertion that this {@link Message} is
- * a request message for an one-way operation according
- * to the context WSDL.
- *
- * <p>
- * This method is really only intended to be invoked from within
- * the JAX-WS runtime, and not by any code building on top of it.
- *
- * <p>
- * This method can be invoked only when the caller "knows" what
- * WSDL says. Also, there's no point in invoking this method if the caller
- * is doing {@code getOperation(port).getOperation().isOneWay()},
- * or sniffing the payload tag name.
- * In particular, this includes {@link DispatchImpl}.
- *
- * <p>
- * Once called, this allows {@link #isOneWay(WSDLPort)} method
- * to return a value quickly.
- *
- * @see #isOneWay(WSDLPort)
- */
- public final void assertOneWay(boolean value) {
- // if two callers make different assertions, that's a bug.
- // this is an assertion, not a runtime check because
- // nobody outside JAX-WS should be using this.
- assert isOneWay==null || isOneWay==value;
-
- isOneWay = value;
- }
-
-
- /**
- * Gets the local name of the payload element.
- *
- * @return
- * null if a {@link Message} doesn't have any payload.
- */
- public abstract @Nullable String getPayloadLocalPart();
-
- /**
- * Gets the namespace URI of the payload element.
- *
- * @return
- * null if a {@link Message} doesn't have any payload.
- */
- public abstract String getPayloadNamespaceURI();
- // I'm not putting @Nullable on it because doing null check on getPayloadLocalPart() should be suffice
-
- /**
- * Returns true if a {@link Message} has a payload.
- *
- * <p>
- * A message without a payload is a SOAP message that looks like:
- * <pre><xmp>
- * <S:Envelope>
- * <S:Header>
- * ...
- * </S:Header>
- * <S:Body />
- * </S:Envelope>
- * </xmp></pre>
- */
- public abstract boolean hasPayload();
-
- /**
- * Returns true if this message is a fault.
- *
- * <p>
- * Just a convenience method built on {@link #getPayloadNamespaceURI()}
- * and {@link #getPayloadLocalPart()}.
- */
- public boolean isFault() {
- // TODO: is SOAP version a property of a Message?
- // or is it defined by external factors?
- // how do I compare?
- String localPart = getPayloadLocalPart();
- if(localPart==null || !localPart.equals("Fault"))
- return false;
-
- String nsUri = getPayloadNamespaceURI();
- return nsUri.equals(SOAPVersion.SOAP_11.nsUri) || nsUri.equals(SOAPVersion.SOAP_12.nsUri);
- }
-
- /**
- * It gives S:Envelope/S:Body/S:Fault/detail 's first child's name. Should
- * be called for messages that have SOAP Fault.
- *
- * <p> This implementation is expensive so concrete implementations are
- * expected to override this one.
- *
- * @return first detail entry's name, if there is one
- * else null
- */
- public @Nullable QName getFirstDetailEntryName() {
- assert isFault();
- Message msg = copy();
- try {
- SOAPFaultBuilder fault = SOAPFaultBuilder.create(msg);
- return fault.getFirstDetailEntryName();
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
- }
-
- /**
- * Consumes this message including the envelope.
- * returns it as a {@link Source} object.
- */
- public abstract Source readEnvelopeAsSource();
-
-
- /**
- * Returns the payload as a {@link Source} object.
- *
- * This consumes the message.
- *
- * @return
- * if there's no payload, this method returns null.
- */
- public abstract Source readPayloadAsSource();
-
- /**
- * Creates the equivalent {@link SOAPMessage} from this message.
- *
- * This consumes the message.
- *
- * @throws SOAPException
- * if there's any error while creating a {@link SOAPMessage}.
- */
- public abstract SOAPMessage readAsSOAPMessage() throws SOAPException;
-
- /**
- * Creates the equivalent {@link SOAPMessage} from this message. It also uses
- * transport specific headers from Packet during the SOAPMessage construction
- * so that {@link SOAPMessage#getMimeHeaders()} gives meaningful transport
- * headers.
- *
- * This consumes the message.
- *
- * @throws SOAPException
- * if there's any error while creating a {@link SOAPMessage}.
- */
- public SOAPMessage readAsSOAPMessage(Packet packet, boolean inbound) throws SOAPException {
- return readAsSOAPMessage();
- }
-
- public static Map<String, List<String>> getTransportHeaders(Packet packet) {
- return getTransportHeaders(packet, packet.getState().isInbound());
- }
-
- public static Map<String, List<String>> getTransportHeaders(Packet packet, boolean inbound) {
- Map<String, List<String>> headers = null;
- String key = inbound ? Packet.INBOUND_TRANSPORT_HEADERS : Packet.OUTBOUND_TRANSPORT_HEADERS;
- if (packet.supports(key)) {
- headers = (Map<String, List<String>>)packet.get(key);
- }
- return headers;
- }
-
- public static void addSOAPMimeHeaders(MimeHeaders mh, Map<String, List<String>> headers) {
- for(Map.Entry<String, List<String>> e : headers.entrySet()) {
- if (!e.getKey().equalsIgnoreCase("Content-Type")) {
- for(String value : e.getValue()) {
- mh.addHeader(e.getKey(), value);
- }
- }
- }
- }
- /**
- * Reads the payload as a JAXB object by using the given unmarshaller.
- *
- * This consumes the message.
- *
- * @throws JAXBException
- * If JAXB reports an error during the processing.
- */
- public abstract <T> T readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException;
-
- /**
- * Reads the payload as a JAXB object according to the given {@link Bridge}.
- *
- * This consumes the message.
- *
- * @deprecated
- * @return null
- * if there's no payload.
- * @throws JAXBException
- * If JAXB reports an error during the processing.
- */
- public abstract <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException;
-
- /**
- * Reads the payload as a Data-Bond object
- *
- * This consumes the message.
- *
- * @return null
- * if there's no payload.
- * @throws JAXBException
- * If JAXB reports an error during the processing.
- */
- public abstract <T> T readPayloadAsJAXB(XMLBridge<T> bridge) throws JAXBException;
-
- /**
- * Reads the payload as a {@link XMLStreamReader}
- *
- * This consumes the message. The caller is encouraged to call
- * {@link XMLStreamReaderFactory#recycle(XMLStreamReader)} when finished using
- * the instance.
- *
- * @return
- * If there's no payload, this method returns null.
- * Otherwise always non-null valid {@link XMLStreamReader} that points to
- * the payload tag name.
- */
- public abstract XMLStreamReader readPayload() throws XMLStreamException;
-
- /**
- * Marks the message as consumed, without actually reading the contents.
- *
- * <p>
- * This method provides an opportunity for implementations to reuse
- * any reusable resources needed for representing the payload.
- *
- * <p>
- * This method may not be called more than once since it may have
- * released the reusable resources.
- */
- public void consume() {}
-
- /**
- * Writes the payload to StAX.
- *
- * This method writes just the payload of the message to the writer.
- * This consumes the message.
- * The implementation will not write
- * {@link XMLStreamWriter#writeStartDocument()}
- * nor
- * {@link XMLStreamWriter#writeEndDocument()}
- *
- * <p>
- * If there's no payload, this method is no-op.
- *
- * @throws XMLStreamException
- * If the {@link XMLStreamWriter} reports an error,
- * or some other errors happen during the processing.
- */
- public abstract void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException;
-
- /**
- * Writes the whole SOAP message (but not attachments)
- * to the given writer.
- *
- * This consumes the message.
- *
- * @throws XMLStreamException
- * If the {@link XMLStreamWriter} reports an error,
- * or some other errors happen during the processing.
- */
- public abstract void writeTo(XMLStreamWriter sw) throws XMLStreamException;
-
- /**
- * Writes the whole SOAP envelope as SAX events.
- *
- * <p>
- * This consumes the message.
- *
- * @param contentHandler
- * must not be nulll.
- * @param errorHandler
- * must not be null.
- * any error encountered during the SAX event production must be
- * first reported to this error handler. Fatal errors can be then
- * thrown as {@link SAXParseException}. {@link SAXException}s thrown
- * from {@link ErrorHandler} should propagate directly through this method.
- */
- public abstract void writeTo( ContentHandler contentHandler, ErrorHandler errorHandler ) throws SAXException;
-
- // TODO: do we need a method that reads payload as a fault?
- // do we want a separte streaming representation of fault?
- // or would SOAPFault in SAAJ do?
-
-
-
- /**
- * Creates a copy of a {@link Message}.
- *
- * <p>
- * This method creates a new {@link Message} whose header/payload/attachments/properties
- * are identical to this {@link Message}. Once created, the created {@link Message}
- * and the original {@link Message} behaves independently --- adding header/
- * attachment to one {@link Message} doesn't affect another {@link Message}
- * at all.
- *
- * <p>
- * This method does <b>NOT</b> consume a message.
- *
- * <p>
- * To enable efficient copy operations, there's a few restrictions on
- * how copied message can be used.
- *
- * <ol>
- * <li>The original and the copy may not be
- * used concurrently by two threads (this allows two {@link Message}s
- * to share some internal resources, such as JAXB marshallers.)
- * Note that it's OK for the original and the copy to be processed
- * by two threads, as long as they are not concurrent.
- *
- * <li>The copy has the same 'life scope'
- * as the original (this allows shallower copy, such as
- * JAXB beans wrapped in {@link JAXBMessage}.)
- * </ol>
- *
- * <p>
- * A 'life scope' of a message created during a message processing
- * in a pipeline is until a pipeline processes the next message.
- * A message cannot be kept beyond its life scope.
- *
- * (This experimental design is to allow message objects to be reused
- * --- feedback appreciated.)
- *
- *
- *
- * <h3>Design Rationale</h3>
- * <p>
- * Since a {@link Message} body is read-once, sometimes
- * (such as when you do fail-over, or WS-RM) you need to
- * create an idential copy of a {@link Message}.
- *
- * <p>
- * The actual copy operation depends on the layout
- * of the data in memory, hence it's best to be done by
- * the {@link Message} implementation itself.
- *
- * <p>
- * The restrictions placed on the use of copied {@link Message} can be
- * relaxed if necessary, but it will make the copy method more expensive.
- */
- // TODO: update the class javadoc with 'lifescope'
- // and move the discussion about life scope there.
- public abstract Message copy();
-
- /**
- * Retuns a unique id for the message. The id can be used for various things,
- * like debug assistance, logging, and MIME encoding(say for boundary).
- *
- * <p>
- * This method will check the existence of the addressing <MessageID> header,
- * and if present uses that value. Otherwise it generates one from UUID.random(),
- * and return it without adding a new header. But it doesn't add a <MessageID>
- * to the header list since we expect them to be added before calling this
- * method.
- *
- * <p>
- * Addressing tube will go do a separate verification on inbound
- * headers to make sure that <MessageID> header is present when it's
- * supposed to be.
- *
- * @param binding object created by {@link BindingID#createBinding()}
- *
- * @return unique id for the message
- * @deprecated
- */
- public @NotNull String getID(@NotNull WSBinding binding) {
- return getID(binding.getAddressingVersion(), binding.getSOAPVersion());
- }
-
- /**
- * Retuns a unique id for the message.
- * <p><p>
- * @see {@link #getID(com.sun.xml.internal.ws.api.WSBinding)} for detailed description.
- * @param av WS-Addressing version
- * @param sv SOAP version
- * @return unique id for the message
- * @deprecated
- */
- public @NotNull String getID(AddressingVersion av, SOAPVersion sv) {
- String uuid = null;
- if (av != null) {
- uuid = AddressingUtils.getMessageID(getHeaders(), av, sv);
- }
- if (uuid == null) {
- uuid = generateMessageID();
- getHeaders().add(new StringHeader(av.messageIDTag, uuid));
- }
- return uuid;
- }
-
- /**
- * Generates a UUID suitable for use as a MessageID value
- * @return generated UUID
- */
- public static String generateMessageID() {
- return "uuid:" + UUID.randomUUID().toString();
- }
-
- public SOAPVersion getSOAPVersion() {
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageContextFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageContextFactory.java
deleted file mode 100644
index fbd261e0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageContextFactory.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.message;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.soap.MimeHeader;
-import javax.xml.soap.MimeHeaders;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.Source;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.soap.MTOMFeature;
-
-import com.oracle.webservices.internal.api.EnvelopeStyle;
-import com.oracle.webservices.internal.api.EnvelopeStyleFeature;
-import com.oracle.webservices.internal.api.message.MessageContext;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.Codecs;
-import static com.sun.xml.internal.ws.transport.http.HttpAdapter.fixQuotesAroundSoapAction;
-
-/**
- * The MessageContextFactory implements com.oracle.webservices.internal.api.message.MessageContextFactory as
- * a factory of Packet and public facade of Codec(s).
- *
- * @author shih-chang.chen@oracle.com
- */
-public class MessageContextFactory extends com.oracle.webservices.internal.api.message.MessageContextFactory {
-
- private WSFeatureList features;
- private Codec soapCodec;
- private Codec xmlCodec;
- private EnvelopeStyleFeature envelopeStyle;
- private EnvelopeStyle.Style singleSoapStyle;
-
- public MessageContextFactory(WebServiceFeature[] wsf) {
- this(new com.sun.xml.internal.ws.binding.WebServiceFeatureList(wsf));
- }
-
- public MessageContextFactory(WSFeatureList wsf) {
- features = wsf;
- envelopeStyle = features.get(EnvelopeStyleFeature.class);
- if (envelopeStyle == null) {//Default to SOAP11
- envelopeStyle = new EnvelopeStyleFeature(new EnvelopeStyle.Style[]{EnvelopeStyle.Style.SOAP11});
- features.mergeFeatures(new WebServiceFeature[]{envelopeStyle}, false);
- }
- for (EnvelopeStyle.Style s : envelopeStyle.getStyles()) {
- if (s.isXML()) {
- if (xmlCodec == null) xmlCodec = Codecs.createXMLCodec(features);
- } else {
- if (soapCodec == null) soapCodec = Codecs.createSOAPBindingCodec(features);
- singleSoapStyle = s;
- }
- }
- }
-
- protected com.oracle.webservices.internal.api.message.MessageContextFactory newFactory(WebServiceFeature... f) {
- return new com.sun.xml.internal.ws.api.message.MessageContextFactory(f);
- }
-
-
- public com.oracle.webservices.internal.api.message.MessageContext createContext() {
- return packet(null);
- }
-
- public com.oracle.webservices.internal.api.message.MessageContext createContext(SOAPMessage soap) {
- throwIfIllegalMessageArgument(soap);
- return packet(Messages.create(soap));
- }
-
- public MessageContext createContext(Source m, com.oracle.webservices.internal.api.EnvelopeStyle.Style envelopeStyle) {
- throwIfIllegalMessageArgument(m);
- return packet(Messages.create(m, SOAPVersion.from(envelopeStyle)));
- }
-
- public com.oracle.webservices.internal.api.message.MessageContext createContext(Source m) {
- throwIfIllegalMessageArgument(m);
- return packet(Messages.create(m, SOAPVersion.from(singleSoapStyle)));
- }
-
- public com.oracle.webservices.internal.api.message.MessageContext createContext(InputStream in, String contentType) throws IOException {
- throwIfIllegalMessageArgument(in);
- //TODO when do we use xmlCodec?
- Packet p = packet(null);
- soapCodec.decode(in, contentType, p);
- return p;
- }
-
- /**
- * @deprecated http://java.net/jira/browse/JAX_WS-1077
- */
- @Deprecated
- public com.oracle.webservices.internal.api.message.MessageContext createContext(InputStream in, MimeHeaders headers) throws IOException {
- String contentType = getHeader(headers, "Content-Type");
- Packet packet = (Packet) createContext(in, contentType);
- packet.acceptableMimeTypes = getHeader(headers, "Accept");
- packet.soapAction = fixQuotesAroundSoapAction(getHeader(headers, "SOAPAction"));
-// packet.put(Packet.INBOUND_TRANSPORT_HEADERS, toMap(headers));
- return packet;
- }
-
- static String getHeader(MimeHeaders headers, String name) {
- String[] values = headers.getHeader(name);
- return (values != null && values.length > 0) ? values[0] : null;
- }
-
- static Map<String, List<String>> toMap(MimeHeaders headers) {
- HashMap<String, List<String>> map = new HashMap<String, List<String>>();
- for (Iterator<MimeHeader> i = headers.getAllHeaders(); i.hasNext();) {
- MimeHeader mh = i.next();
- List<String> values = map.get(mh.getName());
- if (values == null) {
- values = new ArrayList<String>();
- map.put(mh.getName(), values);
- }
- values.add(mh.getValue());
- }
- return map;
- }
-
- public MessageContext createContext(Message m) {
- throwIfIllegalMessageArgument(m);
- return packet(m);
- }
-
- private Packet packet(Message m) {
- final Packet p = new Packet();
- //TODO when do we use xmlCodec?
- p.codec = soapCodec;
- if (m != null) p.setMessage(m);
- MTOMFeature mf = features.get(MTOMFeature.class);
- if (mf != null) {
- p.setMtomFeature(mf);
- }
- return p;
- }
-
- private void throwIfIllegalMessageArgument(Object message)
- throws IllegalArgumentException
- {
- if (message == null) {
- throw new IllegalArgumentException("null messages are not allowed. Consider using MessageContextFactory.createContext()");
- }
- }
-
- @Deprecated
- public com.oracle.webservices.internal.api.message.MessageContext doCreate() {
- return packet(null);
- }
- @Deprecated
- public com.oracle.webservices.internal.api.message.MessageContext doCreate(SOAPMessage m) {
- return createContext(m);
- }
- @Deprecated
- public com.oracle.webservices.internal.api.message.MessageContext doCreate(Source x, SOAPVersion soapVersion) {
- return packet(Messages.create(x, soapVersion));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageHeaders.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageHeaders.java
deleted file mode 100644
index 0921061b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageHeaders.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.message;
-
-import java.util.List;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-
-/**
- * Interface representing all the headers of a {@link Message}
- */
-public interface MessageHeaders {
- public void understood(Header header);
- public void understood(QName name);
- public void understood(String nsUri, String localName);
- public Header get(String nsUri, String localName, boolean markAsUnderstood);
- public Header get(QName name, boolean markAsUnderstood);
- public Iterator<Header> getHeaders(String nsUri, String localName, final boolean markAsUnderstood);
- /**
- * Get all headers in specified namespace
- * @param nsUri
- * @param markAsUnderstood
- * @return
- */
- public Iterator<Header> getHeaders(String nsUri, final boolean markAsUnderstood);
- public Iterator<Header> getHeaders(QName headerName, final boolean markAsUnderstood);
- public Iterator<Header> getHeaders();
- public boolean hasHeaders();
- public boolean add(Header header);
- public Header remove(QName name);
- public Header remove(String nsUri, String localName);
- //DONT public Header remove(Header header);
- public void replace(Header old, Header header);
-
- /**
- * Replaces an existing {@link Header} or adds a new {@link Header}.
- *
- * <p>
- * Order doesn't matter in headers, so this method
- * does not make any guarantee as to where the new header
- * is inserted.
- *
- * @return
- * always true. Don't use the return value.
- */
- public boolean addOrReplace(Header header);
-
- /**
- * Return a Set of QNames of headers that have been explicitly marked as understood.
- * If none have been marked, this method could return null
- */
- public Set<QName> getUnderstoodHeaders();
-
- /**
- * Returns a Set of QNames of headers that satisfy ALL the following conditions:
- * (a) Have mustUnderstand = true
- * (b) have NOT been explicitly marked as understood
- * (c) If roles argument is non-null, the header has isIgnorable = false
- * for the roles argument and SOAP version
- * (d) If non-null binding is passed in, are NOT understood by the binding
- * (e) If (d) is met, the header is NOT in the knownHeaders list passed in
- *
- * @param roles
- * @param knownHeaders
- * @param binding
- * @return
- */
- public Set<QName> getNotUnderstoodHeaders(Set<String> roles, Set<QName> knownHeaders, WSBinding binding);
-
- /**
- * True if the header has been explicitly marked understood, false otherwise
- * @param header
- * @return
- */
- public boolean isUnderstood(Header header);
-
- /**
- * True if the header has been explicitly marked understood, false otherwise
- * @param header
- * @return
- */
- public boolean isUnderstood(QName header);
-
- /**
- * True if the header has been explicitly marked understood, false otherwise
- * @param header
- * @return
- */
- public boolean isUnderstood(String nsUri, String header);
-
- /**
- * Returns <code>Header</code> instances in a <code>List</code>.
- * @return <code>List</code> containing <code>Header</code> instances
- */
- public List<Header> asList();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageMetadata.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageMetadata.java
deleted file mode 100644
index 230c5767..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageMetadata.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.xml.internal.ws.api.model.WSDLOperationMapping;
-
-/**
- * In order for the Message to get properties from the Packet ...
- *
- * @author shih-chang.chen@oracle.com
- */
-public interface MessageMetadata {
- public WSDLOperationMapping getWSDLOperationMapping();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWrapper.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWrapper.java
deleted file mode 100644
index 708c0971..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWrapper.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.message;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Source;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.message.saaj.SAAJMessage;
-import com.sun.xml.internal.ws.message.stream.StreamMessage;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-
-/**
- * A <code>MessageWrapper</code> wraps the Message for the access through Packet.
- *
- * @author shih-chang.chen@oracle.com
- */
-class MessageWrapper extends StreamMessage {
-
- Packet packet;
- Message delegate;
- StreamMessage streamDelegate;
-
- @Override
- public void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
- streamDelegate.writePayloadTo(contentHandler, errorHandler, fragment);
- }
-
- @Override
- public String getBodyPrologue() {
- return streamDelegate.getBodyPrologue();
- }
-
- @Override
- public String getBodyEpilogue() {
- return streamDelegate.getBodyEpilogue();
- }
-
- MessageWrapper(Packet p, Message m) {
- super(m.getSOAPVersion());
- packet = p;
- delegate = m;
- streamDelegate = (m instanceof StreamMessage) ? (StreamMessage) m : null;
- setMessageMedadata(p);
- }
-
- @Override
- public int hashCode() {
- return delegate.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- return delegate.equals(obj);
- }
-
- @Override
- public boolean hasHeaders() {
- return delegate.hasHeaders();
- }
-
- @Override
- public AttachmentSet getAttachments() {
- return delegate.getAttachments();
- }
-
- @Override
- public String toString() {
- return delegate.toString();
- }
-
- @Override
- public boolean isOneWay(WSDLPort port) {
- return delegate.isOneWay(port);
- }
-
- @Override
- public String getPayloadLocalPart() {
- return delegate.getPayloadLocalPart();
- }
-
- @Override
- public String getPayloadNamespaceURI() {
- return delegate.getPayloadNamespaceURI();
- }
-
- @Override
- public boolean hasPayload() {
- return delegate.hasPayload();
- }
-
- @Override
- public boolean isFault() {
- return delegate.isFault();
- }
-
- @Override
- public QName getFirstDetailEntryName() {
- return delegate.getFirstDetailEntryName();
- }
-
- @Override
- public Source readEnvelopeAsSource() {
- //TODO if (delegate instanceof SAAJMessage)
- return delegate.readEnvelopeAsSource();
- }
-
- @Override
- public Source readPayloadAsSource() {
- //TODO if (delegate instanceof SAAJMessage)
- return delegate.readPayloadAsSource();
- }
-
- @Override
- public SOAPMessage readAsSOAPMessage() throws SOAPException {
- if (!(delegate instanceof SAAJMessage)) {
- delegate = toSAAJ(packet, null);
- }
- return delegate.readAsSOAPMessage();
- }
-
- @Override
- public SOAPMessage readAsSOAPMessage(Packet p, boolean inbound) throws SOAPException {
- if (!(delegate instanceof SAAJMessage)) {
- delegate = toSAAJ(p, inbound);
- }
- return delegate.readAsSOAPMessage();
- }
-
- @Override
- public Object readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
- return delegate.readPayloadAsJAXB(unmarshaller);
- }
-
- @Override
- public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
- return delegate.readPayloadAsJAXB(bridge);
- }
-
- @Override
- public <T> T readPayloadAsJAXB(XMLBridge<T> bridge) throws JAXBException {
- return delegate.readPayloadAsJAXB(bridge);
- }
-
- @Override
- public XMLStreamReader readPayload() {
- try {
- return delegate.readPayload();
- } catch (XMLStreamException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- @Override
- public void consume() {
- delegate.consume();
- }
-
- @Override
- public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
- delegate.writePayloadTo(sw);
- }
-
- @Override
- public void writeTo(XMLStreamWriter sw) throws XMLStreamException {
- delegate.writeTo(sw);
- }
-
- @Override
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler)
- throws SAXException {
- delegate.writeTo(contentHandler, errorHandler);
- }
-
- @Override
- public Message copy() {
- return delegate.copy();
- }
-
- @Override
- public String getID(WSBinding binding) {
- return delegate.getID(binding);
- }
-
- @Override
- public String getID(AddressingVersion av, SOAPVersion sv) {
- return delegate.getID(av, sv);
- }
-
- @Override
- public SOAPVersion getSOAPVersion() {
- return delegate.getSOAPVersion();
- }
-
- @Override
- public @NotNull MessageHeaders getHeaders() {
- return delegate.getHeaders();
- }
-
- @Override
- public void setMessageMedadata(MessageMetadata metadata) {
- super.setMessageMedadata(metadata);
- delegate.setMessageMedadata(metadata);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWritable.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWritable.java
deleted file mode 100644
index 9c9af9b6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWritable.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2012, 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.message;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import javax.xml.ws.soap.MTOMFeature;
-
-import com.oracle.webservices.internal.api.message.ContentType;
-
-/**
- * A Message implementation may implement this interface as an alternative way to write the
- * message into the OutputStream.
- *
- * @author shih-chang.chen@oracle.com
- */
-public interface MessageWritable {
-
- /**
- * Gets the Content-type of this message.
- *
- * @return The MIME content type of this message
- */
- ContentType getContentType();
-
- /**
- * Writes the XML infoset portion of this MessageContext
- * (from &lt;soap:Envelope> to &lt;/soap:Envelope>).
- *
- * @param out
- * Must not be null. The caller is responsible for closing the stream,
- * not the callee.
- *
- * @return
- * The MIME content type of this message (such as "application/xml").
- * This information is often ncessary by transport.
- *
- * @throws IOException
- * if a {@link OutputStream} throws {@link IOException}.
- */
- ContentType writeTo( OutputStream out ) throws IOException;
-
- /**
- * Passes configuration information to this message to ensure the proper
- * wire format is created. (from &lt;soap:Envelope> to &lt;/soap:Envelope>).
- *
- * @param mtomFeature
- * The standard <code>WebServicesFeature</code> for specifying
- * the MTOM enablement and possibly threshold for the endpoint.
- * This value may be <code>null</code>.
- */
- void setMTOMConfiguration(final MTOMFeature mtomFeature);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Messages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Messages.java
deleted file mode 100644
index 5deade6d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Messages.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.Codecs;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-import com.sun.xml.internal.ws.message.AttachmentSetImpl;
-import com.sun.xml.internal.ws.message.DOMMessage;
-import com.sun.xml.internal.ws.message.EmptyMessageImpl;
-import com.sun.xml.internal.ws.message.ProblemActionHeader;
-import com.sun.xml.internal.ws.message.stream.PayloadStreamReaderMessage;
-import com.sun.xml.internal.ws.message.jaxb.JAXBMessage;
-import com.sun.xml.internal.ws.message.source.PayloadSourceMessage;
-import com.sun.xml.internal.ws.message.source.ProtocolSourceMessage;
-import com.sun.xml.internal.ws.spi.db.BindingContextFactory;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderException;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.util.DOMUtil;
-import com.sun.xml.internal.ws.addressing.WsaTubeHelper;
-import com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException;
-import com.sun.xml.internal.ws.resources.AddressingMessages;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.transform.Source;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.ws.ProtocolException;
-import javax.xml.ws.WebServiceException;
-
-/**
- * Factory methods for various {@link Message} implementations.
- *
- * <p>
- * This class provides various methods to create different
- * flavors of {@link Message} classes that store data
- * in different formats.
- *
- * <p>
- * This is a part of the JAX-WS RI internal API so that
- * {@link Tube} implementations can reuse the implementations
- * done inside the JAX-WS.
- *
- * <p>
- * If you find some of the useful convenience methods missing
- * from this class, please talk to us.
- *
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class Messages {
- private Messages() {}
-
- /**
- * Creates a {@link Message} backed by a JAXB bean.
- * @deprecated
- * @param context
- * The context to be used to produce infoset from the object. Must not be null.
- * @param jaxbObject
- * The JAXB object that represents the payload. must not be null. This object
- * must be bound to an element (which means it either is a {@link JAXBElement} or
- * an instanceof a class with {@link XmlRootElement}).
- * @param soapVersion
- * The SOAP version of the message. Must not be null.
- */
- public static Message create(JAXBContext context, Object jaxbObject, SOAPVersion soapVersion) {
- return JAXBMessage.create(context,jaxbObject,soapVersion);
- }
-
- /**
- * @deprecated
- * For use when creating a Dispatch object with an unknown JAXB implementation
- * for he JAXBContext parameter.
- *
- */
- public static Message createRaw(JAXBContext context, Object jaxbObject, SOAPVersion soapVersion) {
- return JAXBMessage.createRaw(context,jaxbObject,soapVersion);
- }
-
- /**
- * @deprecated
- * Use {@link #create(JAXBRIContext, Object, SOAPVersion)}
- */
- public static Message create(Marshaller marshaller, Object jaxbObject, SOAPVersion soapVersion) {
- return create(BindingContextFactory.getBindingContext(marshaller).getJAXBContext(),jaxbObject,soapVersion);
- }
-
- /**
- * Creates a {@link Message} backed by a SAAJ {@link SOAPMessage} object.
- *
- * <p>
- * If the {@link SOAPMessage} contains headers and attachments, this method
- * does the right thing.
- *
- * @param saaj
- * The SOAP message to be represented as a {@link Message}.
- * Must not be null. Once this method is invoked, the created
- * {@link Message} will own the {@link SOAPMessage}, so it shall
- * never be touched directly.
- */
- public static Message create(SOAPMessage saaj) {
- return SAAJFactory.create(saaj);
- }
-
- /**
- * Creates a {@link Message} using {@link Source} as payload.
- *
- * @param payload
- * Source payload is {@link Message}'s payload
- * Must not be null. Once this method is invoked, the created
- * {@link Message} will own the {@link Source}, so it shall
- * never be touched directly.
- *
- * @param ver
- * The SOAP version of the message. Must not be null.
- */
- public static Message createUsingPayload(Source payload, SOAPVersion ver) {
- if (payload instanceof DOMSource) {
- if (((DOMSource)payload).getNode() == null) {
- return new EmptyMessageImpl(ver);
- }
- } else if (payload instanceof StreamSource) {
- StreamSource ss = (StreamSource)payload;
- if (ss.getInputStream() == null && ss.getReader() == null && ss.getSystemId() == null) {
- return new EmptyMessageImpl(ver);
- }
- } else if (payload instanceof SAXSource) {
- SAXSource ss = (SAXSource)payload;
- if (ss.getInputSource() == null && ss.getXMLReader() == null) {
- return new EmptyMessageImpl(ver);
- }
- }
- return new PayloadSourceMessage(payload, ver);
- }
-
- /**
- * Creates a {@link Message} using {@link XMLStreamReader} as payload.
- *
- * @param payload
- * XMLStreamReader payload is {@link Message}'s payload
- * Must not be null. Once this method is invoked, the created
- * {@link Message} will own the {@link XMLStreamReader}, so it shall
- * never be touched directly.
- *
- * @param ver
- * The SOAP version of the message. Must not be null.
- */
- public static Message createUsingPayload(XMLStreamReader payload, SOAPVersion ver) {
- return new PayloadStreamReaderMessage(payload, ver);
- }
-
- /**
- * Creates a {@link Message} from an {@link Element} that represents
- * a payload.
- *
- * @param payload
- * The element that becomes the child element of the SOAP body.
- * Must not be null.
- *
- * @param ver
- * The SOAP version of the message. Must not be null.
- */
- public static Message createUsingPayload(Element payload, SOAPVersion ver) {
- return new DOMMessage(ver,payload);
- }
-
- /**
- * Creates a {@link Message} from an {@link Element} that represents
- * the whole SOAP message.
- *
- * @param soapEnvelope
- * The SOAP envelope element.
- */
- public static Message create(Element soapEnvelope) {
- SOAPVersion ver = SOAPVersion.fromNsUri(soapEnvelope.getNamespaceURI());
- // find the headers
- Element header = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Header");
- HeaderList headers = null;
- if(header!=null) {
- for( Node n=header.getFirstChild(); n!=null; n=n.getNextSibling() ) {
- if(n.getNodeType()==Node.ELEMENT_NODE) {
- if(headers==null)
- headers = new HeaderList(ver);
- headers.add(Headers.create((Element)n));
- }
- }
- }
-
- // find the payload
- Element body = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body");
- if(body==null)
- throw new WebServiceException("Message doesn't have <S:Body> "+soapEnvelope);
- Element payload = DOMUtil.getFirstChild(soapEnvelope, ver.nsUri, "Body");
-
- if(payload==null) {
- return new EmptyMessageImpl(headers, new AttachmentSetImpl(), ver);
- } else {
- return new DOMMessage(ver,headers,payload);
- }
- }
-
- /**
- * Creates a {@link Message} using Source as entire envelope.
- *
- * @param envelope
- * Source envelope is used to create {@link Message}
- * Must not be null. Once this method is invoked, the created
- * {@link Message} will own the {@link Source}, so it shall
- * never be touched directly.
- *
- */
- public static Message create(Source envelope, SOAPVersion soapVersion) {
- return new ProtocolSourceMessage(envelope, soapVersion);
- }
-
-
- /**
- * Creates a {@link Message} that doesn't have any payload.
- */
- public static Message createEmpty(SOAPVersion soapVersion) {
- return new EmptyMessageImpl(soapVersion);
- }
-
- /**
- * Creates a {@link Message} from {@link XMLStreamReader} that points to
- * the start of the envelope.
- *
- * @param reader
- * can point to the start document or the start element (of &lt;s:Envelope>)
- */
- public static @NotNull Message create(@NotNull XMLStreamReader reader) {
- // skip until the root element
- if(reader.getEventType()!=XMLStreamConstants.START_ELEMENT)
- XMLStreamReaderUtil.nextElementContent(reader);
- assert reader.getEventType()== XMLStreamConstants.START_ELEMENT :reader.getEventType();
-
- SOAPVersion ver = SOAPVersion.fromNsUri(reader.getNamespaceURI());
-
- return Codecs.createSOAPEnvelopeXmlCodec(ver).decode(reader);
- }
-
- /**
- * Creates a {@link Message} from {@link XMLStreamBuffer} that retains the
- * whole envelope infoset.
- *
- * @param xsb
- * This buffer must contain the infoset of the whole envelope.
- */
- public static @NotNull Message create(@NotNull XMLStreamBuffer xsb) {
- // TODO: we should be able to let Messae know that it's working off from a buffer,
- // to make some of the operations more efficient.
- // meanwhile, adding this as an API so that our users can take advantage of it
- // when we get around to such an implementation later.
- try {
- return create(xsb.readAsXMLStreamReader());
- } catch (XMLStreamException e) {
- throw new XMLStreamReaderException(e);
- }
- }
-
- /**
- * Creates a {@link Message} that represents an exception as a fault. The
- * created message reflects if t or t.getCause() is SOAPFaultException.
- *
- * creates a fault message with default faultCode env:Server if t or t.getCause()
- * is not SOAPFaultException. Otherwise, it use SOAPFaultException's faultCode
- *
- * @return
- * Always non-null. A message that wraps this {@link Throwable}.
- *
- */
- public static Message create(Throwable t, SOAPVersion soapVersion) {
- return SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, t);
- }
-
- /**
- * Creates a fault {@link Message}.
- *
- * <p>
- * This method is not designed for efficiency, and we don't expect
- * to be used for the performance critical codepath.
- *
- * @param fault
- * The populated SAAJ data structure that represents a fault
- * in detail.
- *
- * @return
- * Always non-null. A message that wraps this {@link SOAPFault}.
- */
- public static Message create(SOAPFault fault) {
- SOAPVersion ver = SOAPVersion.fromNsUri(fault.getNamespaceURI());
- return new DOMMessage(ver,fault);
- }
-
- /**
- * @deprecated
- * Use {@link #createAddressingFaultMessage(WSBinding, Packet, QName)}
- */
- public static Message createAddressingFaultMessage(WSBinding binding, QName missingHeader) {
- return createAddressingFaultMessage(binding,null,missingHeader);
- }
-
- /**
- * Creates a fault {@link Message} that captures the code/subcode/subsubcode
- * defined by WS-Addressing if one of the expected WS-Addressing headers is
- * missing in the message
- *
- * @param binding WSBinding
- * @param p
- * {@link Packet} that was missing a WS-Addressing header.
- * @param missingHeader The missing WS-Addressing Header
- * @return
- * A message representing SOAPFault that contains the WS-Addressing code/subcode/subsubcode.
- */
- public static Message createAddressingFaultMessage(WSBinding binding, Packet p, QName missingHeader) {
- AddressingVersion av = binding.getAddressingVersion();
- if(av == null) {
- // Addressing is not enabled.
- throw new WebServiceException(AddressingMessages.ADDRESSING_SHOULD_BE_ENABLED());
- }
- WsaTubeHelper helper = av.getWsaHelper(null,null,binding);
- return create(helper.newMapRequiredFault(new MissingAddressingHeaderException(missingHeader,p)));
- }
- /**
- * Creates a fault {@link Message} that captures the code/subcode/subsubcode
- * defined by WS-Addressing if wsa:Action is not supported.
- *
- * @param unsupportedAction The unsupported Action. Must not be null.
- * @param av The WS-Addressing version of the message. Must not be null.
- * @param sv The SOAP Version of the message. Must not be null.
- *
- * @return
- * A message representing SOAPFault that contains the WS-Addressing code/subcode/subsubcode.
- */
- public static Message create(@NotNull String unsupportedAction, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
- QName subcode = av.actionNotSupportedTag;
- String faultstring = String.format(av.actionNotSupportedText, unsupportedAction);
-
- Message faultMessage;
- SOAPFault fault;
- try {
- if (sv == SOAPVersion.SOAP_12) {
- fault = SOAPVersion.SOAP_12.getSOAPFactory().createFault();
- fault.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT);
- fault.appendFaultSubcode(subcode);
- Detail detail = fault.addDetail();
- SOAPElement se = detail.addChildElement(av.problemActionTag);
- se = se.addChildElement(av.actionTag);
- se.addTextNode(unsupportedAction);
- } else {
- fault = SOAPVersion.SOAP_11.getSOAPFactory().createFault();
- fault.setFaultCode(subcode);
- }
- fault.setFaultString(faultstring);
-
- faultMessage = SOAPFaultBuilder.createSOAPFaultMessage(sv, fault);
- if (sv == SOAPVersion.SOAP_11) {
- faultMessage.getHeaders().add(new ProblemActionHeader(unsupportedAction, av));
- }
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
-
- return faultMessage;
- }
-
- /**
- * To be called to convert a {@link ProtocolException} and faultcode for a given {@link SOAPVersion} in to a {@link Message}.
- *
- * @param soapVersion {@link SOAPVersion#SOAP_11} or {@link SOAPVersion#SOAP_12}
- * @param pex a ProtocolException
- * @param faultcode soap faultcode. Its ignored if the {@link ProtocolException} instance is {@link javax.xml.ws.soap.SOAPFaultException} and it has a
- * faultcode present in the underlying {@link SOAPFault}.
- * @return {@link Message} representing SOAP fault
- */
- public static @NotNull Message create(@NotNull SOAPVersion soapVersion, @NotNull ProtocolException pex, @Nullable QName faultcode){
- return SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, pex, faultcode);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Packet.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Packet.java
deleted file mode 100644
index fc981a9e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Packet.java
+++ /dev/null
@@ -1,1475 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.message;
-
-import com.oracle.webservices.internal.api.message.ContentType;
-import com.oracle.webservices.internal.api.message.PropertySet;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.bind.marshaller.SAX2DOMEx;
-import com.sun.xml.internal.ws.addressing.WsaPropertyBag;
-import com.sun.xml.internal.ws.addressing.WsaServerTube;
-import com.sun.xml.internal.ws.addressing.WsaTubeHelper;
-import com.sun.xml.internal.ws.api.Component;
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.WSDLOperationMapping;
-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.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.server.Adapter;
-import com.sun.xml.internal.ws.api.server.TransportBackChannel;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.server.WebServiceContextDelegate;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory;
-import com.sun.xml.internal.ws.client.*;
-import com.sun.xml.internal.ws.developer.JAXWSProperties;
-import com.sun.xml.internal.ws.encoding.MtomCodec;
-import com.sun.xml.internal.ws.message.RelatesToHeader;
-import com.sun.xml.internal.ws.message.StringHeader;
-import com.sun.xml.internal.ws.util.DOMUtil;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import com.sun.xml.internal.ws.wsdl.DispatchException;
-import com.sun.xml.internal.ws.wsdl.OperationDispatcher;
-import com.sun.xml.internal.ws.resources.AddressingMessages;
-
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.LogicalMessageContext;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.soap.SOAPMessageContext;
-import javax.xml.ws.soap.MTOMFeature;
-
-import java.util.*;
-import java.util.logging.Logger;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.channels.WritableByteChannel;
-
-/**
- * Represents a container of a {@link Message}.
- *
- * <h2>What is a {@link Packet}?</h2>
- * <p>
- * A packet can be thought of as a frame/envelope/package that wraps
- * a {@link Message}. A packet keeps track of optional metadata (properties)
- * about a {@link Message} that doesn't go across the wire.
- * This roughly corresponds to {@link MessageContext} in the JAX-WS API.
- *
- * <p>
- * Usually a packet contains a {@link Message} in it, but sometimes
- * (such as for a reply of an one-way operation), a packet may
- * float around without a {@link Message} in it.
- *
- *
- * <a name="properties"></a>
- * <h2>Properties</h2>
- * <p>
- * Information frequently used inside the JAX-WS RI
- * is stored in the strongly-typed fields. Other information is stored
- * in terms of a generic {@link Map} (see
- * {@link #invocationProperties}.)
- *
- * <p>
- * Some properties need to be retained between request and response,
- * some don't. For strongly typed fields, this characteristic is
- * statically known for each of them, and propagation happens accordingly.
- * For generic information stored in {@link Map}, {@link #invocationProperties}
- * stores per-invocation scope information (which carries over to
- * the response.)
- *
- * <p>
- * This object is used as the backing store of {@link MessageContext}, and
- * {@link LogicalMessageContext} and {@link SOAPMessageContext} will
- * be delegating to this object for storing/retrieving values.
- *
- *
- * <h3>Relationship to request/response context</h3>
- * <p>
- * {@link BindingProvider#getRequestContext() Request context} is used to
- * seed the initial values of {@link Packet}.
- * Some of those values go to strongly-typed fields, and others go to
- * {@link #invocationProperties}, as they need to be retained in the reply message.
- *
- * <p>
- * Similarly, {@link BindingProvider#getResponseContext() response context}
- * is constructed from {@link Packet} (or rather it's just a view of {@link Packet}.)
- * by using properties from {@link #invocationProperties},
- * modulo properties named explicitly in {@link #getHandlerScopePropertyNames(boolean)}.
- * IOW, properties added to {@link #invocationProperties}
- * are exposed to the response context by default.
- *
- *
- *
- * <h3>TODO</h3>
- * <ol>
- * <li>this class needs to be cloneable since Message is copiable.
- * <li>The three live views aren't implemented correctly. It will be
- * more work to do so, although I'm sure it's possible.
- * <li>{@link PropertySet.Property} annotation is to make it easy
- * for {@link MessageContext} to export properties on this object,
- * but it probably needs some clean up.
- * </ol>
- *
- * @author Kohsuke Kawaguchi
- */
-public final class Packet
- // Packet must continue to extend/implement deprecated interfaces until downstream
- // usage is updated.
- extends com.oracle.webservices.internal.api.message.BaseDistributedPropertySet
- implements com.oracle.webservices.internal.api.message.MessageContext, MessageMetadata {
-
- /**
- * Creates a {@link Packet} that wraps a given {@link Message}.
- *
- * <p>
- * This method should be only used to create a fresh {@link Packet}.
- * To create a {@link Packet} for a reply, use {@link #createResponse(Message)}.
- *
- * @param request
- * The request {@link Message}. Can be null.
- */
- public Packet(Message request) {
- this();
- this.message = request;
- if (message != null) message.setMessageMedadata(this);
- }
-
- /**
- * Creates an empty {@link Packet} that doesn't have any {@link Message}.
- */
- public Packet() {
- this.invocationProperties = new HashMap<String, Object>();
- }
-
- /**
- * Used by {@link #createResponse(Message)} and {@link #copy(boolean)}.
- */
- private Packet(Packet that) {
- relatePackets(that, true);
- this.invocationProperties = that.invocationProperties;
- }
-
- /**
- * Creates a copy of this {@link Packet}.
- *
- * @param copyMessage determines whether the {@link Message} from the original {@link Packet} should be copied as
- * well, or not. If the value is {@code false}, the {@link Message} in the copy of the {@link Packet} is {@code null}.
- * @return copy of the original packet
- */
- public Packet copy(boolean copyMessage) {
- // the copy constructor is originally designed for creating a response packet,
- // but so far the implementation is usable for this purpose as well, so calling the copy constructor
- // to avoid code dupliation.
- Packet copy = new Packet(this);
- if (copyMessage && this.message != null) {
- copy.message = this.message.copy();
- }
- if (copy.message != null) copy.message.setMessageMedadata(copy);
- return copy;
- }
-
- private Message message;
-
- /**
- * Gets the last {@link Message} set through {@link #setMessage(Message)}.
- *
- * @return may null. See the class javadoc for when it's null.
- */
- public Message getMessage() {
- if (message != null && !(message instanceof MessageWrapper)) {
- message = new MessageWrapper(this, message);
- }
- return message;
- }
-
- public Message getInternalMessage() {
- return (message instanceof MessageWrapper)? ((MessageWrapper)message).delegate : message;
- }
-
- public WSBinding getBinding() {
- if (endpoint != null) {
- return endpoint.getBinding();
- }
- if (proxy != null) {
- return (WSBinding) proxy.getBinding();
- }
- return null;
- }
- /**
- * Sets a {@link Message} to this packet.
- *
- * @param message Can be null.
- */
- public void setMessage(Message message) {
- this.message = message;
- if (message != null) this.message.setMessageMedadata(this);
- }
-
- private WSDLOperationMapping wsdlOperationMapping = null;
-
- private QName wsdlOperation;
-
- /**
- * Returns the QName of the wsdl operation associated with this packet.
- * <p/>
- * Information such as Payload QName, wsa:Action header, SOAPAction HTTP header are used depending on the features
- * enabled on the particular port.
- *
- * @return null if there is no WSDL model or
- * runtime cannot uniquely identify the wsdl operation from the information in the packet.
- */
- @Property(MessageContext.WSDL_OPERATION)
- public final
- @Nullable
- QName getWSDLOperation() {
- if (wsdlOperation != null) return wsdlOperation;
- if ( wsdlOperationMapping == null) wsdlOperationMapping = getWSDLOperationMapping();
- if ( wsdlOperationMapping != null ) wsdlOperation = wsdlOperationMapping.getOperationName();
- return wsdlOperation;
- }
-
- public WSDLOperationMapping getWSDLOperationMapping() {
- if (wsdlOperationMapping != null) return wsdlOperationMapping;
- OperationDispatcher opDispatcher = null;
- if (endpoint != null) {
- opDispatcher = endpoint.getOperationDispatcher();
- } else if (proxy != null) {
- opDispatcher = ((Stub) proxy).getOperationDispatcher();
- }
- //OpDispatcher is null when there is no WSDLModel
- if (opDispatcher != null) {
- try {
- wsdlOperationMapping = opDispatcher.getWSDLOperationMapping(this);
- } catch (DispatchException e) {
- //Ignore, this might be a protocol message which may not have a wsdl operation
- //LOGGER.info("Cannot resolve wsdl operation that this Packet is targeted for.");
- }
- }
- return wsdlOperationMapping;
- }
-
- /**
- * Set the wsdl operation to avoid lookup from other data.
- * This is useful in SEI based clients, where the WSDL operation can be known
- * from the associated {@link JavaMethod}
- *
- * @param wsdlOp QName
- */
- public void setWSDLOperation(QName wsdlOp) {
- this.wsdlOperation = wsdlOp;
- }
-
- /**
- * True if this message came from a transport (IOW inbound),
- * and in paricular from a "secure" transport. A transport
- * needs to set this flag appropriately.
- *
- * <p>
- * This is a requirement from the security team.
- */
- // TODO: expose this as a property
- public boolean wasTransportSecure;
-
- /**
- * Inbound transport headers are captured in a transport neutral way.
- * Transports are expected to fill this data after creating a Packet.
- * <p>
- * {@link SOAPMessage#getMimeHeaders()} would return these headers.
- */
- public static final String INBOUND_TRANSPORT_HEADERS = "com.sun.xml.internal.ws.api.message.packet.inbound.transport.headers";
-
- /**
- * Outbound transport headers are captured in a transport neutral way.
- *
- * <p>
- * Transports may choose to ignore certain headers that interfere with
- * its correct operation, such as
- * <tt>Content-Type</tt> and <tt>Content-Length</tt>.
- */
- public static final String OUTBOUND_TRANSPORT_HEADERS = "com.sun.xml.internal.ws.api.message.packet.outbound.transport.headers";
-
- /**
- *
- */
- public static final String HA_INFO = "com.sun.xml.internal.ws.api.message.packet.hainfo";
-
-
- /**
- * This property holds the snapshot of HandlerConfiguration
- * at the time of invocation.
- * This property is used by MUPipe and HandlerPipe implementations.
- */
- @Property(BindingProviderProperties.JAXWS_HANDLER_CONFIG)
- public HandlerConfiguration handlerConfig;
-
- /**
- * If a message originates from a proxy stub that implements
- * a port interface, this field is set to point to that object.
- *
- * TODO: who's using this property?
- */
- @Property(BindingProviderProperties.JAXWS_CLIENT_HANDLE_PROPERTY)
- public BindingProvider proxy;
-
- /**
- * Determines if the governing {@link Adapter} or {@link com.sun.xml.internal.ws.api.pipe.Fiber.CompletionCallback}
- * will handle delivering response messages targeted at non-anonymous endpoint
- * addresses. Prior to the introduction of this flag
- * the {@link WsaServerTube} would deliver non-anonymous responses.
- */
- public boolean isAdapterDeliversNonAnonymousResponse;
-
- /**
- * During invocation of a client Stub or Dispatch a Packet is
- * created then the Stub's RequestContext is copied into the
- * Packet. On certain internal cases the Packet is created
- * *before* the invocation. In those cases we want the contents
- * of the Packet to take precedence when ever any key/value pairs
- * collide : if the Packet contains a value for a key use it,
- * otherwise copy as usual from Stub.
- */
- public boolean packetTakesPriorityOverRequestContext = false;
-
- /**
- * The endpoint address to which this message is sent to.
- *
- * <p>
- * The JAX-WS spec allows this to be changed for each message,
- * so it's designed to be a property.
- *
- * <p>
- * Must not be null for a request message on the client. Otherwise
- * it's null.
- */
- public EndpointAddress endpointAddress;
-
- /**
- * @deprecated
- * The programatic acccess should be done via
- * {@link #endpointAddress}. This is for JAX-WS client applications
- * that access this property via {@link BindingProvider#ENDPOINT_ADDRESS_PROPERTY}.
- */
- @Property(BindingProvider.ENDPOINT_ADDRESS_PROPERTY)
- public String getEndPointAddressString() {
- if (endpointAddress == null) {
- return null;
- } else {
- return endpointAddress.toString();
- }
- }
-
- public void setEndPointAddressString(String s) {
- if (s == null) {
- this.endpointAddress = null;
- } else {
- this.endpointAddress = EndpointAddress.create(s);
- }
- }
-
- /**
- * The value of {@link ContentNegotiation#PROPERTY}
- * property.
- * <p/>
- * This property is used only on the client side.
- */
- public ContentNegotiation contentNegotiation;
-
- @Property(ContentNegotiation.PROPERTY)
- public String getContentNegotiationString() {
- return (contentNegotiation != null) ? contentNegotiation.toString() : null;
- }
-
- public void setContentNegotiationString(String s) {
- if (s == null) {
- contentNegotiation = null;
- } else {
- try {
- contentNegotiation = ContentNegotiation.valueOf(s);
- } catch (IllegalArgumentException e) {
- // If the value is not recognized default to none
- contentNegotiation = ContentNegotiation.none;
- }
- }
- }
-
- /**
- * Gives a list of Reference Parameters in the Message
- * <p>
- * Headers which have attribute wsa:IsReferenceParameter="true"
- * This is not cached as one may reset the Message.
- *<p>
- */
- @Property(MessageContext.REFERENCE_PARAMETERS)
- public
- @NotNull
- List<Element> getReferenceParameters() {
- Message msg = getMessage();
- List<Element> refParams = new ArrayList<Element>();
- if (msg == null) {
- return refParams;
- }
- MessageHeaders hl = msg.getHeaders();
- for (Header h : hl.asList()) {
- String attr = h.getAttribute(AddressingVersion.W3C.nsUri, "IsReferenceParameter");
- if (attr != null && (attr.equals("true") || attr.equals("1"))) {
- Document d = DOMUtil.createDom();
- SAX2DOMEx s2d = new SAX2DOMEx(d);
- try {
- h.writeTo(s2d, XmlUtil.DRACONIAN_ERROR_HANDLER);
- refParams.add((Element) d.getLastChild());
- } catch (SAXException e) {
- throw new WebServiceException(e);
- }
- /*
- DOMResult result = new DOMResult(d);
- XMLDOMWriterImpl domwriter = new XMLDOMWriterImpl(result);
- try {
- h.writeTo(domwriter);
- refParams.add((Element) result.getNode().getLastChild());
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- */
- }
- }
- return refParams;
- }
-
- /**
- * This method is for exposing header list through {@link PropertySet#get(Object)},
- * for user applications, and should never be invoked directly from within the JAX-WS RI.
- */
- @Property(JAXWSProperties.INBOUND_HEADER_LIST_PROPERTY)
- /*package*/ MessageHeaders getHeaderList() {
- Message msg = getMessage();
- if (msg == null) {
- return null;
- }
- return msg.getHeaders();
- }
-
- /**
- * The list of MIME types that are acceptable to a receiver
- * of an outbound message.
- *
- * This property is used only on the server side.
- *
- * <p>The representation shall be that specified by the HTTP Accept
- * request-header field.
- *
- * <p>The list of content types will be obtained from the transport
- * meta-data of a inbound message in a request/response message exchange.
- * Hence this property will be set by the service-side transport pipe.
- */
- public String acceptableMimeTypes;
-
- /**
- * When non-null, this object is consulted to
- * implement {@link WebServiceContext} methods
- * exposed to the user application.
- *
- * Used only on the server side.
- *
- * <p>
- * This property is set from the parameter
- * of {@link WSEndpoint.PipeHead#process}.
- */
- public WebServiceContextDelegate webServiceContextDelegate;
-
- /**
- * Used only on the server side so that the transport
- * can close the connection early.
- *
- * <p>
- * This field can be null. While a message is being processed,
- * this field can be set explicitly to null, to prevent
- * future pipes from closing a transport (see {@link #keepTransportBackChannelOpen()})
- *
- * <p>
- * This property is set from the parameter
- * of {@link WSEndpoint.PipeHead#process}.
- */
- public
- @Nullable
- TransportBackChannel transportBackChannel;
-
- /**
- * Keeps the transport back channel open (by seeting {@link #transportBackChannel} to null.)
- *
- * @return
- * The previous value of {@link #transportBackChannel}.
- */
- public TransportBackChannel keepTransportBackChannelOpen() {
- TransportBackChannel r = transportBackChannel;
- transportBackChannel = null;
- return r;
- }
-
- /**
- * The governing owner of this packet. On the service-side this is the {@link Adapter} and on the client it is the {@link Stub}.
- *
- */
- public Component component;
-
- /**
- * The governing {@link WSEndpoint} in which this message is floating.
- *
- * <p>
- * This property is set if and only if this is on the server side.
- */
- @Property(JAXWSProperties.WSENDPOINT)
- public WSEndpoint endpoint;
-
- /**
- * The value of the SOAPAction header associated with the message.
- *
- * <p>
- * For outgoing messages, the transport may sends out this value.
- * If this field is null, the transport may choose to send <tt>""</tt>
- * (quoted empty string.)
- *
- * For incoming messages, the transport will set this field.
- * If the incoming message did not contain the SOAPAction header,
- * the transport sets this field to null.
- *
- * <p>
- * If the value is non-null, it must be always in the quoted form.
- * The value can be null.
- *
- * <p>
- * Note that the way the transport sends this value out depends on
- * transport and SOAP version.
- * <p/>
- * For HTTP transport and SOAP 1.1, BP requires that SOAPAction
- * header is present (See {@BP R2744} and {@BP R2745}.) For SOAP 1.2,
- * this is moved to the parameter of the "application/soap+xml".
- */
- @Property(BindingProvider.SOAPACTION_URI_PROPERTY)
- public String soapAction;
-
- /**
- * A hint indicating that whether a transport should expect
- * a reply back from the server.
- *
- * <p>
- * This property is used on the client-side for
- * outbound messages, so that a pipeline
- * can communicate to the terminal (or intermediate) {@link Tube}s
- * about this knowledge.
- *
- * <p>
- * This property <b>MUST NOT</b> be used by 2-way transports
- * that have the transport back channel. Those transports
- * must always check a reply coming through the transport back
- * channel regardless of this value, and act accordingly.
- * (This is because the expectation of the client and
- * that of the server can be different, for example because
- * of a bug in user's configuration.)
- *
- * <p>
- * This property is for one-way transports, and more
- * specifically for the coordinator that correlates sent requests
- * and incoming replies, to decide whether to block
- * until a response is received.
- *
- * <p>
- * Also note that this property is related to
- * {@link WSDLOperation#isOneWay()} but not the same thing.
- * In fact in general, they are completely orthogonal.
- *
- * For example, the calling application can choose to invoke
- * {@link Dispatch#invoke(Object)} or {@link Dispatch#invokeOneWay(Object)}
- * with an operation (which determines the value of this property),
- * regardless of whether WSDL actually says it's one way or not.
- * So these two booleans can take any combinations.
- *
- *
- * <p>
- * When this property is {@link Boolean#FALSE}, it means that
- * the pipeline does not expect a reply from a server (and therefore
- * the correlator should not block for a reply message
- * -- if such a reply does arrive, it can be just ignored.)
- *
- * <p>
- * When this property is {@link Boolean#TRUE}, it means that
- * the pipeline expects a reply from a server (and therefore
- * the correlator should block to see if a reply message is received,
- *
- * <p>
- * This property is always set to {@link Boolean#TRUE} or
- * {@link Boolean#FALSE} when used on the request message
- * on the client side.
- * No other {@link Boolean} instances are allowed.
- * <p>
- *
- * In all other situations, this property is null.
- *
- */
- @Property(BindingProviderProperties.ONE_WAY_OPERATION)
- public Boolean expectReply;
-
-
- /**
- * This property will be removed in a near future.
- *
- * <p>
- * A part of what this flag represented moved to
- * {@link #expectReply} and the other part was moved
- * to {@link Message#isOneWay(WSDLPort)}. Please update
- * your code soon, or risk breaking your build!!
- */
- @Deprecated
- public Boolean isOneWay;
-
- /**
- * Indicates whether is invoking a synchronous pattern. If true, no
- * async client programming model (e.g. AsyncResponse or AsyncHandler)
- * were used to make the request that created this packet.
- */
- public Boolean isSynchronousMEP;
-
- /**
- * Indicates whether a non-null AsyncHandler was given at the point of
- * making the request that created this packet. This flag can be used
- * by Tube implementations to decide how to react when isSynchronousMEP
- * is false. If true, the client gave a non-null AsyncHandler instance
- * at the point of request, and will be expecting a response on that
- * handler when this request has been processed.
- */
- public Boolean nonNullAsyncHandlerGiven;
-
- /**
- * USE-CASE:
- * WS-AT is enabled, but there is no WSDL available.
- * If Packet.isRequestReplyMEP() is Boolean.TRUE then WS-AT should
- * add the TX context.
- *
- * This value is exposed to users via facades at higher abstraction layers.
- * The user should NEVER use Packet directly.
- * This value should ONLY be set by users.
- */
- private Boolean isRequestReplyMEP;
- public Boolean isRequestReplyMEP() { return isRequestReplyMEP; }
- public void setRequestReplyMEP(final Boolean x) { isRequestReplyMEP = x; }
-
- /**
- * Lazily created set of handler-scope property names.
- *
- * <p>
- * We expect that this is only used when handlers are present
- * and they explicitly set some handler-scope values.
- *
- * @see #getHandlerScopePropertyNames(boolean)
- */
- private Set<String> handlerScopePropertyNames;
-
- /**
- * Bag to capture properties that are available for the whole
- * message invocation (namely on both requests and responses.)
- *
- * <p>
- * These properties are copied from a request to a response.
- * This is where we keep properties that are set by handlers.
- *
- * <p>
- * See <a href="#properties">class javadoc</a> for more discussion.
- *
- * @see #getHandlerScopePropertyNames(boolean)
- */
- public final Map<String, Object> invocationProperties;
-
- /**
- * Gets a {@link Set} that stores handler-scope properties.
- *
- * <p>
- * These properties will not be exposed to the response context.
- * Consequently, if a {@link Tube} wishes to hide a property
- * to {@link ResponseContext}, it needs to add the property name
- * to this set.
- *
- * @param readOnly
- * Return true if the caller only intends to read the value of this set.
- * Internally, the {@link Set} is allocated lazily, and this flag helps
- * optimizing the strategy.
- *
- * @return
- * always non-null, possibly empty set that stores property names.
- */
- public final Set<String> getHandlerScopePropertyNames(boolean readOnly) {
- Set<String> o = this.handlerScopePropertyNames;
- if (o == null) {
- if (readOnly) {
- return Collections.emptySet();
- }
- o = new HashSet<String>();
- this.handlerScopePropertyNames = o;
- }
- return o;
- }
-
- /**
- * This method no longer works.
- *
- * @deprecated
- * Use {@link #getHandlerScopePropertyNames(boolean)}.
- * To be removed once Tango components are updated.
- */
- public final Set<String> getApplicationScopePropertyNames(boolean readOnly) {
- assert false;
- return new HashSet<String>();
- }
-
- /**
- * Creates a response {@link Packet} from a request packet ({@code this}).
- *
- * <p>
- * When a {@link Packet} for a reply is created, some properties need to be
- * copied over from a request to a response, and this method handles it correctly.
- *
- * @deprecated
- * Use createClientResponse(Message) for client side and
- * createServerResponse(Message, String) for server side response
- * creation.
- *
- * @param msg
- * The {@link Message} that represents a reply. Can be null.
- */
- @Deprecated
- public Packet createResponse(Message msg) {
- Packet response = new Packet(this);
- response.setMessage(msg);
- return response;
- }
-
- /**
- * Creates a response {@link Packet} from a request packet ({@code this}).
- *
- * <p>
- * When a {@link Packet} for a reply is created, some properties need to be
- * copied over from a request to a response, and this method handles it correctly.
- *
- * @param msg
- * The {@link Message} that represents a reply. Can be null.
- */
- public Packet createClientResponse(Message msg) {
- Packet response = new Packet(this);
- response.setMessage(msg);
- finishCreateRelateClientResponse(response);
- return response;
- }
-
- /**
- * For use cases that start with an existing Packet.
- */
- public Packet relateClientResponse(final Packet response) {
- response.relatePackets(this, true);
- finishCreateRelateClientResponse(response);
- return response;
- }
-
- private void finishCreateRelateClientResponse(final Packet response) {
- response.soapAction = null; // de-initializing
- response.setState(State.ClientResponse);
- }
-
- /**
- * Creates a server-side response {@link Packet} from a request
- * packet ({@code this}). If WS-Addressing is enabled, a default Action
- * Message Addressing Property is obtained using <code>wsdlPort</code> {@link WSDLPort}
- * and <code>binding</code> {@link WSBinding}.
- * <p><p>
- * This method should be called to create application response messages
- * since they are associated with a {@link WSBinding} and {@link WSDLPort}.
- * For creating protocol messages that require a non-default Action, use
- * {@link #createServerResponse(Message, com.sun.xml.internal.ws.api.addressing.AddressingVersion, com.sun.xml.internal.ws.api.SOAPVersion, String)}.
- *
- * @param responseMessage The {@link Message} that represents a reply. Can be null.
- * @param wsdlPort The response WSDL port.
- * @param binding The response Binding. Cannot be null.
- * @return response packet
- */
- public Packet createServerResponse(@Nullable Message responseMessage, @Nullable WSDLPort wsdlPort, @Nullable SEIModel seiModel, @NotNull WSBinding binding) {
- Packet r = createClientResponse(responseMessage);
- return relateServerResponse(r, wsdlPort, seiModel, binding);
- }
-
- /**
- * Copy all properties from ({@code this}) packet into a input {@link Packet}
- * @param response packet
- */
- public void copyPropertiesTo(@Nullable Packet response){
- relatePackets(response, false);
- }
-
-
- /**
- * A common method to make members related between input packet and this packet
- *
- * @param packet
- * @param isCopy 'true' means copying all properties from input packet;
- * 'false' means copying all properties from this packet to input packet.
- */
- private void relatePackets(@Nullable Packet packet, boolean isCopy)
- {
- Packet request;
- Packet response;
-
- if (!isCopy) { //is relate
- request = this;
- response = packet;
-
- // processing specific properties
- response.soapAction = null;
- response.invocationProperties.putAll(request.invocationProperties);
- if (this.getState().equals(State.ServerRequest)) {
- response.setState(State.ServerResponse);
- }
- } else { //is copy constructor
- request = packet;
- response = this;
-
- // processing specific properties
- response.soapAction = request.soapAction;
- response.setState(request.getState());
- }
-
- request.copySatelliteInto(response);
- response.isAdapterDeliversNonAnonymousResponse = request.isAdapterDeliversNonAnonymousResponse;
- response.handlerConfig = request.handlerConfig;
- response.handlerScopePropertyNames = request.handlerScopePropertyNames;
- response.contentNegotiation = request.contentNegotiation;
- response.wasTransportSecure = request.wasTransportSecure;
- response.transportBackChannel = request.transportBackChannel;
- response.endpointAddress = request.endpointAddress;
- response.wsdlOperation = request.wsdlOperation;
- response.wsdlOperationMapping = request.wsdlOperationMapping;
- response.acceptableMimeTypes = request.acceptableMimeTypes;
- response.endpoint = request.endpoint;
- response.proxy = request.proxy;
- response.webServiceContextDelegate = request.webServiceContextDelegate;
- response.expectReply = request.expectReply;
- response.component = request.component;
- response.mtomAcceptable = request.mtomAcceptable;
- response.mtomRequest = request.mtomRequest;
- // copy other properties that need to be copied. is there any?
- }
-
-
- public Packet relateServerResponse(@Nullable Packet r, @Nullable WSDLPort wsdlPort, @Nullable SEIModel seiModel, @NotNull WSBinding binding) {
- relatePackets(r, false);
- r.setState(State.ServerResponse);
- AddressingVersion av = binding.getAddressingVersion();
- // populate WS-A headers only if WS-A is enabled
- if (av == null) {
- return r;
- }
-
- if (getMessage() == null) {
- return r;
- }
-
- //populate WS-A headers only if the request has addressing headers
- String inputAction = AddressingUtils.getAction(getMessage().getHeaders(), av, binding.getSOAPVersion());
- if (inputAction == null) {
- return r;
- }
- // if one-way, then dont populate any WS-A headers
- if (r.getMessage() == null || (wsdlPort != null && getMessage().isOneWay(wsdlPort))) {
- return r;
- }
-
- // otherwise populate WS-Addressing headers
- populateAddressingHeaders(binding, r, wsdlPort, seiModel);
- return r;
- }
-
- /**
- * Creates a server-side response {@link Packet} from a request
- * packet ({@code this}). If WS-Addressing is enabled, <code>action</code>
- * is used as Action Message Addressing Property.
- * <p><p>
- * This method should be called only for creating protocol response messages
- * that require a particular value of Action since they are not associated
- * with a {@link WSBinding} and {@link WSDLPort} but do know the {@link AddressingVersion}
- * and {@link SOAPVersion}.
- *
- * @param responseMessage The {@link Message} that represents a reply. Can be null.
- * @param addressingVersion The WS-Addressing version of the response message.
- * @param soapVersion The SOAP version of the response message.
- * @param action The response Action Message Addressing Property value.
- * @return response packet
- */
- public Packet createServerResponse(@Nullable Message responseMessage, @NotNull AddressingVersion addressingVersion, @NotNull SOAPVersion soapVersion, @NotNull String action) {
- Packet responsePacket = createClientResponse(responseMessage);
- responsePacket.setState(State.ServerResponse);
- // populate WS-A headers only if WS-A is enabled
- if (addressingVersion == null) {
- return responsePacket;
- }
- //populate WS-A headers only if the request has addressing headers
- String inputAction = AddressingUtils.getAction(this.getMessage().getHeaders(), addressingVersion, soapVersion);
- if (inputAction == null) {
- return responsePacket;
- }
-
- populateAddressingHeaders(responsePacket, addressingVersion, soapVersion, action, false);
- return responsePacket;
- }
-
- /**
- * Overwrites the {@link Message} of the response packet ({@code this}) by the given {@link Message}.
- * Unlike {@link #setMessage(Message)}, fill in the addressing headers correctly, and this process
- * requires the access to the request packet.
- *
- * <p>
- * This method is useful when the caller needs to swap a response message completely to a new one.
- *
- * @see #createServerResponse(Message, AddressingVersion, SOAPVersion, String)
- */
- public void setResponseMessage(@NotNull Packet request, @Nullable Message responseMessage, @NotNull AddressingVersion addressingVersion, @NotNull SOAPVersion soapVersion, @NotNull String action) {
- Packet temp = request.createServerResponse(responseMessage, addressingVersion, soapVersion, action);
- setMessage(temp.getMessage());
- }
-
- private void populateAddressingHeaders(Packet responsePacket, AddressingVersion av, SOAPVersion sv, String action, boolean mustUnderstand) {
- // populate WS-A headers only if WS-A is enabled
- if (av == null) return;
-
- // if one-way, then dont populate any WS-A headers
- if (responsePacket.getMessage() == null)
- return;
-
- MessageHeaders hl = responsePacket.getMessage().getHeaders();
-
- WsaPropertyBag wpb = getSatellite(WsaPropertyBag.class);
- Message msg = getMessage();
- // wsa:To
- WSEndpointReference replyTo = null;
- Header replyToFromRequestMsg = AddressingUtils.getFirstHeader(msg.getHeaders(), av.replyToTag, true, sv);
- Header replyToFromResponseMsg = hl.get(av.toTag, false);
- boolean replaceToTag = true;
- try{
- if (replyToFromRequestMsg != null){
- replyTo = replyToFromRequestMsg.readAsEPR(av);
- }
- if (replyToFromResponseMsg != null && replyTo == null) {
- replaceToTag = false;
- }
- } catch (XMLStreamException e) {
- throw new WebServiceException(AddressingMessages.REPLY_TO_CANNOT_PARSE(), e);
- }
- if (replyTo == null) {
- replyTo = AddressingUtils.getReplyTo(msg.getHeaders(), av, sv);
- }
-
- // wsa:Action, add if the message doesn't already contain it,
- // generally true for SEI case where there is SEIModel or WSDLModel
- // false for Provider with no wsdl, Expects User to set the coresponding header on the Message.
- if (AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), av, sv) == null) {
- //wsa:Action header is not set in the message, so use the wsa:Action passed as the parameter.
- hl.add(new StringHeader(av.actionTag, action, sv, mustUnderstand));
- }
-
- // wsa:MessageID
- if (responsePacket.getMessage().getHeaders().get(av.messageIDTag, false) == null) {
- // if header doesn't exist, method getID creates a new random id
- String newID = Message.generateMessageID();
- hl.add(new StringHeader(av.messageIDTag, newID));
- }
-
- // wsa:RelatesTo
- String mid = null;
- if (wpb != null) {
- mid = wpb.getMessageID();
- }
- if (mid == null) {
- mid = AddressingUtils.getMessageID(msg.getHeaders(), av, sv);
- }
- if (mid != null) {
- hl.addOrReplace(new RelatesToHeader(av.relatesToTag, mid));
- }
-
-
- // populate reference parameters
- WSEndpointReference refpEPR = null;
- if (responsePacket.getMessage().isFault()) {
- // choose FaultTo
- if (wpb != null) {
- refpEPR = wpb.getFaultToFromRequest();
- }
- if (refpEPR == null) {
- refpEPR = AddressingUtils.getFaultTo(msg.getHeaders(), av, sv);
- }
- // if FaultTo is null, then use ReplyTo
- if (refpEPR == null) {
- refpEPR = replyTo;
- }
- } else {
- // choose ReplyTo
- refpEPR = replyTo;
- }
- if (replaceToTag && refpEPR != null) {
- hl.addOrReplace(new StringHeader(av.toTag, refpEPR.getAddress()));
- refpEPR.addReferenceParametersToList(hl);
- }
- }
-
- private void populateAddressingHeaders(WSBinding binding, Packet responsePacket, WSDLPort wsdlPort, SEIModel seiModel) {
- AddressingVersion addressingVersion = binding.getAddressingVersion();
-
- if (addressingVersion == null) {
- return;
- }
-
- WsaTubeHelper wsaHelper = addressingVersion.getWsaHelper(wsdlPort, seiModel, binding);
- String action = responsePacket.getMessage().isFault() ?
- wsaHelper.getFaultAction(this, responsePacket) :
- wsaHelper.getOutputAction(this);
- if (action == null) {
- LOGGER.info("WSA headers are not added as value for wsa:Action cannot be resolved for this message");
- return;
- }
- populateAddressingHeaders(responsePacket, addressingVersion, binding.getSOAPVersion(), action, AddressingVersion.isRequired(binding));
- }
-
- public String toShortString() {
- return super.toString();
- }
-
- // For use only in a debugger
- @Override
- public String toString() {
- StringBuilder buf = new StringBuilder();
- buf.append(super.toString());
- String content;
- try {
- Message msg = getMessage();
- if (msg != null) {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- XMLStreamWriter xmlWriter = XMLStreamWriterFactory.create(baos, "UTF-8");
- msg.copy().writeTo(xmlWriter);
- xmlWriter.flush();
- xmlWriter.close();
- baos.flush();
- XMLStreamWriterFactory.recycle(xmlWriter);
-
- byte[] bytes = baos.toByteArray();
- //message = Messages.create(XMLStreamReaderFactory.create(null, new ByteArrayInputStream(bytes), "UTF-8", true));
- content = new String(bytes, "UTF-8");
- } else {
- content = "<none>";
- }
- } catch (Throwable t) {
- throw new WebServiceException(t);
- }
- buf.append(" Content: ").append(content);
- return buf.toString();
- }
-
- // completes TypedMap
- private static final PropertyMap model;
-
- static {
- model = parse(Packet.class);
- }
-
- @Override
- protected PropertyMap getPropertyMap() {
- return model;
- }
-
- public Map<String, Object> asMapIncludingInvocationProperties() {
- final Map<String, Object> asMap = asMap();
- return new AbstractMap<String, Object>() {
- @Override
- public Object get(Object key) {
- Object o = asMap.get(key);
- if (o != null)
- return o;
-
- return invocationProperties.get(key);
- }
-
- @Override
- public int size() {
- return asMap.size() + invocationProperties.size();
- }
-
- @Override
- public boolean containsKey(Object key) {
- if (asMap.containsKey(key))
- return true;
- return invocationProperties.containsKey(key);
- }
-
- @Override
- public Set<Entry<String, Object>> entrySet() {
- final Set<Entry<String, Object>> asMapEntries = asMap.entrySet();
- final Set<Entry<String, Object>> ipEntries = invocationProperties.entrySet();
-
- return new AbstractSet<Entry<String, Object>>() {
- @Override
- public Iterator<Entry<String, Object>> iterator() {
- final Iterator<Entry<String, Object>> asMapIt = asMapEntries.iterator();
- final Iterator<Entry<String, Object>> ipIt = ipEntries.iterator();
-
- return new Iterator<Entry<String, Object>>() {
- @Override
- public boolean hasNext() {
- return asMapIt.hasNext() || ipIt.hasNext();
- }
-
- @Override
- public java.util.Map.Entry<String, Object> next() {
- if (asMapIt.hasNext())
- return asMapIt.next();
- return ipIt.next();
- }
-
- @Override
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
-
- @Override
- public int size() {
- return asMap.size() + invocationProperties.size();
- }
- };
- }
-
- @Override
- public Object put(String key, Object value) {
- if (supports(key))
- return asMap.put(key, value);
-
- return invocationProperties.put(key, value);
- }
-
- @Override
- public void clear() {
- asMap.clear();
- invocationProperties.clear();
- }
-
- @Override
- public Object remove(Object key) {
- if (supports(key))
- return asMap.remove(key);
-
- return invocationProperties.remove(key);
- }
- };
- }
-
- private static final Logger LOGGER = Logger.getLogger(Packet.class.getName());
-
- @Override
- public SOAPMessage getSOAPMessage() throws SOAPException {
- return getAsSOAPMessage();
- }
-
- //TODO replace the message to a SAAJMEssage issue - JRFSAAJMessage or SAAJMessage?
- @Override
- public SOAPMessage getAsSOAPMessage() throws SOAPException {
- Message msg = this.getMessage();
- if (msg == null)
- return null;
- if (msg instanceof MessageWritable)
- ((MessageWritable) msg).setMTOMConfiguration(mtomFeature);
- return msg.readAsSOAPMessage(this, this.getState().isInbound());
- }
-
- public
- Codec codec = null;
- public Codec getCodec() {
- if (codec != null) {
- return codec;
- }
- if (endpoint != null) {
- codec = endpoint.createCodec();
- }
- WSBinding wsb = getBinding();
- if (wsb != null) {
- codec = wsb.getBindingId().createEncoder(wsb);
- }
- return codec;
- }
-
- @Override
- public com.oracle.webservices.internal.api.message.ContentType writeTo( OutputStream out ) throws IOException {
- Message msg = getInternalMessage();
- if (msg instanceof MessageWritable) {
- ((MessageWritable) msg).setMTOMConfiguration(mtomFeature);
- return ((MessageWritable)msg).writeTo(out);
- }
- return getCodec().encode(this, out);
- }
-
- public com.oracle.webservices.internal.api.message.ContentType writeTo( WritableByteChannel buffer ) {
- return getCodec().encode(this, buffer);
- }
-
- private ContentType contentType;
-
- /**
- * If the request's Content-Type is multipart/related; type=application/xop+xml, then this set to to true
- *
- * Used on server-side, for encoding the repsonse.
- */
- private Boolean mtomRequest;
-
- /**
- * Based on request's Accept header this is set.
- * Currently only set if MTOMFeature is enabled.
- *
- * Should be used on server-side, for encoding the response.
- */
- private Boolean mtomAcceptable;
-
- private MTOMFeature mtomFeature;
-
- public Boolean getMtomRequest() {
- return mtomRequest;
- }
-
- public void setMtomRequest(Boolean mtomRequest) {
- this.mtomRequest = mtomRequest;
- }
-
- public Boolean getMtomAcceptable() {
- return mtomAcceptable;
- }
-
- Boolean checkMtomAcceptable;
- public void checkMtomAcceptable() {
- if (checkMtomAcceptable == null) {
- if (acceptableMimeTypes == null || isFastInfosetDisabled) {
- checkMtomAcceptable = false;
- } else {
- checkMtomAcceptable = (acceptableMimeTypes.indexOf(MtomCodec.XOP_XML_MIME_TYPE) != -1);
-// StringTokenizer st = new StringTokenizer(acceptableMimeTypes, ",");
-// while (st.hasMoreTokens()) {
-// final String token = st.nextToken().trim();
-// if (token.toLowerCase().contains(MtomCodec.XOP_XML_MIME_TYPE)) {
-// mtomAcceptable = true;
-// }
-// }
-// if (mtomAcceptable == null) mtomAcceptable = false;
- }
- }
- mtomAcceptable = checkMtomAcceptable;
- }
-
- private Boolean fastInfosetAcceptable;
-
- public Boolean getFastInfosetAcceptable(String fiMimeType) {
- if (fastInfosetAcceptable == null) {
- if (acceptableMimeTypes == null || isFastInfosetDisabled) {
- fastInfosetAcceptable = false;
- } else {
- fastInfosetAcceptable = (acceptableMimeTypes.indexOf(fiMimeType) != -1);
- }
-// if (accept == null || isFastInfosetDisabled) return false;
-//
-// StringTokenizer st = new StringTokenizer(accept, ",");
-// while (st.hasMoreTokens()) {
-// final String token = st.nextToken().trim();
-// if (token.equalsIgnoreCase(fiMimeType)) {
-// return true;
-// }
-// }
-// return false;
- }
- return fastInfosetAcceptable;
- }
-
-
- public void setMtomFeature(MTOMFeature mtomFeature) {
- this.mtomFeature = mtomFeature;
- }
-
- public MTOMFeature getMtomFeature() {
- //If we have a binding, use that in preference to an explicitly
- //set MTOMFeature
- WSBinding binding = getBinding();
- if (binding != null) {
- return binding.getFeature(MTOMFeature.class);
- }
- return mtomFeature;
- }
-
- @Override
- public com.oracle.webservices.internal.api.message.ContentType getContentType() {
- if (contentType == null) {
- contentType = getInternalContentType();
- }
- if (contentType == null) {
- contentType = getCodec().getStaticContentType(this);
- }
- if (contentType == null) {
- //TODO write to buffer
- }
- return contentType;
- }
-
- public ContentType getInternalContentType() {
- Message msg = getInternalMessage();
- if (msg instanceof MessageWritable) {
- return ((MessageWritable)msg).getContentType();
- }
- return contentType;
- }
-
- public void setContentType(ContentType contentType) {
- this.contentType = contentType;
- }
-
- public enum Status {
- Request, Response, Unknown;
- public boolean isRequest() { return Request.equals(this); }
- public boolean isResponse() { return Response.equals(this); }
- }
-
- public enum State {
- ServerRequest(true), ClientRequest(false), ServerResponse(false), ClientResponse(true);
- private boolean inbound;
- State(boolean inbound) {
- this.inbound = inbound;
- }
- public boolean isInbound() {
- return inbound;
- }
- }
-
-// private Status status = Status.Unknown;
-
- //Default state is ServerRequest - some custom adapters may not set the value of state
- //upon server request - all other code paths should set it
- private State state = State.ServerRequest;
-
-// public Status getStatus() { return status; }
-
- public State getState() { return state; }
- public void setState(State state) { this.state = state; }
-
- public boolean shouldUseMtom() {
- if (getState().isInbound()) {
- return isMtomContentType();
- } else {
- return shouldUseMtomOutbound();
- }
- }
-
- private boolean shouldUseMtomOutbound() {
- //Use the getter to make sure all the logic is executed correctly
- MTOMFeature myMtomFeature = getMtomFeature();
- if(myMtomFeature != null && myMtomFeature.isEnabled()) {
- //On client, always use XOP encoding if MTOM is enabled
- //On Server, mtomAcceptable and mtomRequest will be set - use XOP encoding
- //if either request is XOP encoded (mtomRequest) or
- //client accepts XOP encoding (mtomAcceptable)
- if (getMtomAcceptable() == null && getMtomRequest() == null) {
- return true;
- } else {
- if (getMtomAcceptable() != null && getMtomAcceptable() && getState().equals(State.ServerResponse)) {
- return true;
- }
- if (getMtomRequest() != null && getMtomRequest() && getState().equals(State.ServerResponse)) {
- return true;
- }
- if (getMtomRequest() != null && getMtomRequest() && getState().equals(State.ClientRequest)) {
- return true;
- }
- }
- }
- return false;
- }
-
- private boolean isMtomContentType() {
- return (getInternalContentType() != null) &&
- (getInternalContentType().getContentType().contains("application/xop+xml"));
- }
-
- /**
- * @deprecated
- */
- public void addSatellite(@NotNull com.sun.xml.internal.ws.api.PropertySet satellite) {
- super.addSatellite(satellite);
- }
-
- /**
- * @deprecated
- */
- public void addSatellite(@NotNull Class keyClass, @NotNull com.sun.xml.internal.ws.api.PropertySet satellite) {
- super.addSatellite(keyClass, satellite);
- }
-
- /**
- * @deprecated
- */
- public void copySatelliteInto(@NotNull com.sun.xml.internal.ws.api.DistributedPropertySet r) {
- super.copySatelliteInto(r);
- }
-
- /**
- * @deprecated
- */
- public void removeSatellite(com.sun.xml.internal.ws.api.PropertySet satellite) {
- super.removeSatellite(satellite);
- }
-
- /**
- * This is propogated from SOAPBindingCodec and will affect isMtomAcceptable and isFastInfosetAcceptable
- */
- private boolean isFastInfosetDisabled;
-
- public void setFastInfosetDisabled(boolean b) {
- isFastInfosetDisabled = b;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/StreamingSOAP.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/StreamingSOAP.java
deleted file mode 100644
index e84ae576..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/StreamingSOAP.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.message;
-
-import javax.xml.stream.XMLStreamReader;
-
-public interface StreamingSOAP {
- public XMLStreamReader readEnvelope();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/SuppressAutomaticWSARequestHeadersFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/SuppressAutomaticWSARequestHeadersFeature.java
deleted file mode 100644
index ea8d0dd5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/SuppressAutomaticWSARequestHeadersFeature.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * Suppresses automatic generation of WS-Addressing headers in request messages. Use this in cases
- * where required headers will be generated by other means.
- *
- * @since 2.2.6
- */
-public class SuppressAutomaticWSARequestHeadersFeature extends
- WebServiceFeature {
-
- public SuppressAutomaticWSARequestHeadersFeature() {
- enabled = true;
- }
-
- @Override
- public String getID() {
- return SuppressAutomaticWSARequestHeadersFeature.class.toString();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/package-info.java
deleted file mode 100644
index 83e8788e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/package-info.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * {@link com.sun.xml.internal.ws.api.message.Message} and related abstractions that represent a SOAP message.
- */
-package com.sun.xml.internal.ws.api.message;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJFactory.java
deleted file mode 100644
index a1bd1da3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJFactory.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.message.saaj;
-
-import java.util.Iterator;
-
-import javax.xml.soap.AttachmentPart;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SAAJMetaFactory;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFactory;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.stream.XMLStreamException;
-
-import org.xml.sax.SAXException;
-
-import com.sun.xml.internal.bind.marshaller.SAX2DOMEx;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.message.AttachmentEx;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.message.saaj.SAAJMessage;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-
-/**
- * Factory SPI for SAAJ implementations
- *
- * @since 2.2.6
- */
-public class SAAJFactory {
- private static final SAAJFactory instance = new SAAJFactory();
-
- /**
- * Creates a new <code>MessageFactory</code> object that is an instance
- * of the specified implementation. May be a dynamic message factory,
- * a SOAP 1.1 message factory, or a SOAP 1.2 message factory. A dynamic
- * message factory creates messages based on the MIME headers specified
- * as arguments to the <code>createMessage</code> method.
- *
- * This method uses the SAAJMetaFactory to locate the implementation class
- * and create the MessageFactory instance.
- *
- * @return a new instance of a <code>MessageFactory</code>
- *
- * @param protocol a string constant representing the class of the
- * specified message factory implementation. May be
- * either <code>DYNAMIC_SOAP_PROTOCOL</code>,
- * <code>DEFAULT_SOAP_PROTOCOL</code> (which is the same
- * as) <code>SOAP_1_1_PROTOCOL</code>, or
- * <code>SOAP_1_2_PROTOCOL</code>.
- *
- * @exception SOAPException if there was an error in creating the
- * specified implementation of <code>MessageFactory</code>.
- * @see SAAJMetaFactory
- */
- public static MessageFactory getMessageFactory(String protocol) throws SOAPException {
- for (SAAJFactory s : ServiceFinder.find(SAAJFactory.class)) {
- MessageFactory mf = s.createMessageFactory(protocol);
- if (mf != null)
- return mf;
- }
-
- return instance.createMessageFactory(protocol);
- }
-
- /**
- * Creates a new <code>SOAPFactory</code> object that is an instance of
- * the specified implementation, this method uses the SAAJMetaFactory to
- * locate the implementation class and create the SOAPFactory instance.
- *
- * @return a new instance of a <code>SOAPFactory</code>
- *
- * @param protocol a string constant representing the protocol of the
- * specified SOAP factory implementation. May be
- * either <code>DYNAMIC_SOAP_PROTOCOL</code>,
- * <code>DEFAULT_SOAP_PROTOCOL</code> (which is the same
- * as) <code>SOAP_1_1_PROTOCOL</code>, or
- * <code>SOAP_1_2_PROTOCOL</code>.
- *
- * @exception SOAPException if there was an error creating the
- * specified <code>SOAPFactory</code>
- * @see SAAJMetaFactory
- */
- public static SOAPFactory getSOAPFactory(String protocol) throws SOAPException {
- for (SAAJFactory s : ServiceFinder.find(SAAJFactory.class)) {
- SOAPFactory sf = s.createSOAPFactory(protocol);
- if (sf != null)
- return sf;
- }
-
- return instance.createSOAPFactory(protocol);
- }
-
- /**
- * Creates Message from SOAPMessage
- * @param saaj SOAPMessage
- * @return created Message
- */
- public static Message create(SOAPMessage saaj) {
- for (SAAJFactory s : ServiceFinder.find(SAAJFactory.class)) {
- Message m = s.createMessage(saaj);
- if (m != null)
- return m;
- }
-
- return instance.createMessage(saaj);
- }
-
- /**
- * Reads Message as SOAPMessage. After this call message is consumed.
- * @param soapVersion SOAP version
- * @param message Message
- * @return Created SOAPMessage
- * @throws SOAPException if SAAJ processing fails
- */
- public static SOAPMessage read(SOAPVersion soapVersion, Message message) throws SOAPException {
- for (SAAJFactory s : ServiceFinder.find(SAAJFactory.class)) {
- SOAPMessage msg = s.readAsSOAPMessage(soapVersion, message);
- if (msg != null)
- return msg;
- }
-
- return instance.readAsSOAPMessage(soapVersion, message);
- }
-
- /**
- * Reads Message as SOAPMessage. After this call message is consumed.
- * @param soapVersion SOAP version
- * @param message Message
- * @param packet The packet that owns the Message
- * @return Created SOAPMessage
- * @throws SOAPException if SAAJ processing fails
- */
- public static SOAPMessage read(SOAPVersion soapVersion, Message message, Packet packet) throws SOAPException {
- for (SAAJFactory s : ServiceFinder.find(SAAJFactory.class)) {
- SOAPMessage msg = s.readAsSOAPMessage(soapVersion, message, packet);
- if (msg != null)
- return msg;
- }
-
- return instance.readAsSOAPMessage(soapVersion, message, packet);
- }
-
- /**
- * Reads the message within the Packet to a SAAJMessage. After this call message is consumed.
- * @param packet Packet
- * @return Created SAAJPMessage
- * @throws SOAPException if SAAJ processing fails
- */
- public static SAAJMessage read(Packet packet) throws SOAPException {
- // Use the Component from the Packet if it exists. Note the logic
- // in the ServiceFinder is such that find(Class) is not equivalent
- // to find (Class, null), so the ternary operator is needed.
- ServiceFinder<SAAJFactory> factories = (packet.component != null ?
- ServiceFinder.find(SAAJFactory.class, packet.component) :
- ServiceFinder.find(SAAJFactory.class));
- for (SAAJFactory s : factories) {
- SAAJMessage msg = s.readAsSAAJ(packet);
- if (msg != null) return msg;
- }
- return instance.readAsSAAJ(packet);
- }
-
- /**
- * Reads the message within the Packet to a SAAJMessage. After this call message is consumed.
- * @param packet Packet
- * @return Created SAAJPMessage
- * @throws SOAPException if SAAJ processing fails
- */
- public SAAJMessage readAsSAAJ(Packet packet) throws SOAPException {
- SOAPVersion v = packet.getMessage().getSOAPVersion();
- SOAPMessage msg = readAsSOAPMessage(v, packet.getMessage());
- return new SAAJMessage(msg);
- }
-
- /**
- * Creates a new <code>MessageFactory</code> object that is an instance
- * of the specified implementation. May be a dynamic message factory,
- * a SOAP 1.1 message factory, or a SOAP 1.2 message factory. A dynamic
- * message factory creates messages based on the MIME headers specified
- * as arguments to the <code>createMessage</code> method.
- *
- * This method uses the SAAJMetaFactory to locate the implementation class
- * and create the MessageFactory instance.
- *
- * @return a new instance of a <code>MessageFactory</code>
- *
- * @param protocol a string constant representing the class of the
- * specified message factory implementation. May be
- * either <code>DYNAMIC_SOAP_PROTOCOL</code>,
- * <code>DEFAULT_SOAP_PROTOCOL</code> (which is the same
- * as) <code>SOAP_1_1_PROTOCOL</code>, or
- * <code>SOAP_1_2_PROTOCOL</code>.
- *
- * @exception SOAPException if there was an error in creating the
- * specified implementation of <code>MessageFactory</code>.
- * @see SAAJMetaFactory
- */
- public MessageFactory createMessageFactory(String protocol) throws SOAPException {
- return MessageFactory.newInstance(protocol);
- }
-
- /**
- * Creates a new <code>SOAPFactory</code> object that is an instance of
- * the specified implementation, this method uses the SAAJMetaFactory to
- * locate the implementation class and create the SOAPFactory instance.
- *
- * @return a new instance of a <code>SOAPFactory</code>
- *
- * @param protocol a string constant representing the protocol of the
- * specified SOAP factory implementation. May be
- * either <code>DYNAMIC_SOAP_PROTOCOL</code>,
- * <code>DEFAULT_SOAP_PROTOCOL</code> (which is the same
- * as) <code>SOAP_1_1_PROTOCOL</code>, or
- * <code>SOAP_1_2_PROTOCOL</code>.
- *
- * @exception SOAPException if there was an error creating the
- * specified <code>SOAPFactory</code>
- * @see SAAJMetaFactory
- */
- public SOAPFactory createSOAPFactory(String protocol) throws SOAPException {
- return SOAPFactory.newInstance(protocol);
- }
-
- /**
- * Creates Message from SOAPMessage
- * @param saaj SOAPMessage
- * @return created Message
- */
- public Message createMessage(SOAPMessage saaj) {
- return new SAAJMessage(saaj);
- }
-
- /**
- * Reads Message as SOAPMessage. After this call message is consumed.
- * @param soapVersion SOAP version
- * @param message Message
- * @return Created SOAPMessage
- * @throws SOAPException if SAAJ processing fails
- */
- public SOAPMessage readAsSOAPMessage(final SOAPVersion soapVersion, final Message message) throws SOAPException {
- SOAPMessage msg = soapVersion.getMessageFactory().createMessage();
- SaajStaxWriter writer = new SaajStaxWriter(msg);
- try {
- message.writeTo(writer);
- } catch (XMLStreamException e) {
- throw (e.getCause() instanceof SOAPException) ? (SOAPException) e.getCause() : new SOAPException(e);
- }
- msg = writer.getSOAPMessage();
- addAttachmentsToSOAPMessage(msg, message);
- if (msg.saveRequired())
- msg.saveChanges();
- return msg;
- }
-
- public SOAPMessage readAsSOAPMessageSax2Dom(final SOAPVersion soapVersion, final Message message) throws SOAPException {
- SOAPMessage msg = soapVersion.getMessageFactory().createMessage();
- SAX2DOMEx s2d = new SAX2DOMEx(msg.getSOAPPart());
- try {
- message.writeTo(s2d, XmlUtil.DRACONIAN_ERROR_HANDLER);
- } catch (SAXException e) {
- throw new SOAPException(e);
- }
- addAttachmentsToSOAPMessage(msg, message);
- if (msg.saveRequired())
- msg.saveChanges();
- return msg;
- }
-
- static protected void addAttachmentsToSOAPMessage(SOAPMessage msg, Message message) {
- for(Attachment att : message.getAttachments()) {
- AttachmentPart part = msg.createAttachmentPart();
- part.setDataHandler(att.asDataHandler());
-
- // Be safe and avoid double angle-brackets.
- String cid = att.getContentId();
- if (cid != null) {
- if (cid.startsWith("<") && cid.endsWith(">"))
- part.setContentId(cid);
- else
- part.setContentId('<' + cid + '>');
- }
-
- // Add any MIME headers beside Content-ID, which is already
- // accounted for above, and Content-Type, which is provided
- // by the DataHandler above.
- if (att instanceof AttachmentEx) {
- AttachmentEx ax = (AttachmentEx) att;
- Iterator<AttachmentEx.MimeHeader> imh = ax.getMimeHeaders();
- while (imh.hasNext()) {
- AttachmentEx.MimeHeader ame = imh.next();
- if ((!"Content-ID".equals(ame.getName()))
- && (!"Content-Type".equals(ame.getName())))
- part.addMimeHeader(ame.getName(), ame.getValue());
- }
- }
- msg.addAttachmentPart(part);
- }
- }
-
- /**
- * Reads Message as SOAPMessage. After this call message is consumed.
- * The implementation in this class simply calls readAsSOAPMessage(SOAPVersion, Message),
- * and ignores the other parameters
- * Subclasses can override and choose to base SOAPMessage creation on Packet properties if needed
- * @param soapVersion SOAP version
- * @param message Message
- * @return Created SOAPMessage
- * @throws SOAPException if SAAJ processing fails
- */
- public SOAPMessage readAsSOAPMessage(SOAPVersion soapVersion, Message message, Packet packet) throws SOAPException {
- return readAsSOAPMessage(soapVersion, message);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java
deleted file mode 100644
index 220dd8ea..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java
+++ /dev/null
@@ -1,498 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.message.saaj;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPHeaderElement;
-import javax.xml.soap.SOAPMessage;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.binding.SOAPBindingImpl;
-import com.sun.xml.internal.ws.message.saaj.SAAJHeader;
-
-public class SAAJMessageHeaders implements MessageHeaders {
- SOAPMessage sm;
- Map<SOAPHeaderElement, Header> nonSAAJHeaders;
- Map<QName, Integer> notUnderstoodCount;
- SOAPVersion soapVersion;
- private Set<QName> understoodHeaders;
-
- public SAAJMessageHeaders(SOAPMessage sm, SOAPVersion version) {
- this.sm = sm;
- this.soapVersion = version;
- initHeaderUnderstanding();
- }
-
- /** Set the initial understood/not understood state of the headers in this
- * object
- */
- private void initHeaderUnderstanding() {
- SOAPHeader soapHeader = ensureSOAPHeader();
- if (soapHeader == null) {
- return;
- }
-
- Iterator allHeaders = soapHeader.examineAllHeaderElements();
- while(allHeaders.hasNext()) {
- SOAPHeaderElement nextHdrElem = (SOAPHeaderElement) allHeaders.next();
- if (nextHdrElem == null) {
- continue;
- }
- if (nextHdrElem.getMustUnderstand()) {
- notUnderstood(nextHdrElem.getElementQName());
- }
- //only headers explicitly marked as understood should be
- //in the understoodHeaders set, so don't add anything to
- //that set at the beginning
- }
-
- }
-
- @Override
- public void understood(Header header) {
- understood(header.getNamespaceURI(), header.getLocalPart());
- }
-
- @Override
- public void understood(String nsUri, String localName) {
- understood(new QName(nsUri, localName));
- }
-
- @Override
- public void understood(QName qName) {
- if (notUnderstoodCount == null) {
- notUnderstoodCount = new HashMap<QName, Integer>();
- }
-
- Integer count = notUnderstoodCount.get(qName);
- if (count != null && count.intValue() > 0) {
- //found the header in notUnderstood headers - decrement count
- count = count.intValue() - 1;
- if (count <= 0) {
- //if the value is zero or negative, remove that header name
- //since all headers by that name are understood now
- notUnderstoodCount.remove(qName);
- } else {
- notUnderstoodCount.put(qName, count);
- }
- }
-
- if (understoodHeaders == null) {
- understoodHeaders = new HashSet<QName>();
- }
- //also add it to the understood headers list (optimization for getUnderstoodHeaders)
- understoodHeaders.add(qName);
-
- }
-
- @Override
- public boolean isUnderstood(Header header) {
- return isUnderstood(header.getNamespaceURI(), header.getLocalPart());
- }
- @Override
- public boolean isUnderstood(String nsUri, String localName) {
- return isUnderstood(new QName(nsUri, localName));
- }
-
- @Override
- public boolean isUnderstood(QName name) {
- if (understoodHeaders == null) {
- return false;
- }
- return understoodHeaders.contains(name);
- }
-
- public boolean isUnderstood(int index) {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public Header get(String nsUri, String localName, boolean markAsUnderstood) {
- SOAPHeaderElement h = find(nsUri, localName);
- if (h != null) {
- if (markAsUnderstood) {
- understood(nsUri, localName);
- }
- return new SAAJHeader(h);
- }
- return null;
- }
-
- @Override
- public Header get(QName name, boolean markAsUnderstood) {
- return get(name.getNamespaceURI(), name.getLocalPart(), markAsUnderstood);
- }
-
- @Override
- public Iterator<Header> getHeaders(QName headerName,
- boolean markAsUnderstood) {
- return getHeaders(headerName.getNamespaceURI(), headerName.getLocalPart(), markAsUnderstood);
- }
-
- @Override
- public Iterator<Header> getHeaders(final String nsUri, final String localName,
- final boolean markAsUnderstood) {
- SOAPHeader soapHeader = ensureSOAPHeader();
- if (soapHeader == null) {
- return null;
- }
- Iterator allHeaders = soapHeader.examineAllHeaderElements();
- if (markAsUnderstood) {
- //mark all the matchingheaders as understood up front
- //make an iterator while we're doing that
- List<Header> headers = new ArrayList<Header>();
- while (allHeaders.hasNext()) {
- SOAPHeaderElement nextHdr = (SOAPHeaderElement) allHeaders.next();
- if (nextHdr != null &&
- nextHdr.getNamespaceURI().equals(nsUri)) {
- if (localName == null ||
- nextHdr.getLocalName().equals(localName)) {
- understood(nextHdr.getNamespaceURI(), nextHdr.getLocalName());
- headers.add(new SAAJHeader(nextHdr));
- }
- }
- }
- return headers.iterator();
- }
- //if we got here markAsUnderstood is false - return a lazy iterator rather
- //than traverse the entire list of headers now
- return new HeaderReadIterator(allHeaders, nsUri, localName);
- }
-
- @Override
- public Iterator<Header> getHeaders(String nsUri, boolean markAsUnderstood) {
- return getHeaders(nsUri, null, markAsUnderstood);
- }
- @Override
- public boolean add(Header header) {
- try {
- header.writeTo(sm);
- } catch (SOAPException e) {
- //TODO log exception
- return false;
- }
-
- //the newly added header is not understood by default
- notUnderstood(new QName(header.getNamespaceURI(), header.getLocalPart()));
-
- //track non saaj headers so that they can be retrieved later
- if (isNonSAAJHeader(header)) {
- //TODO assumes only one header with that name?
- addNonSAAJHeader(find(header.getNamespaceURI(), header.getLocalPart()),
- header);
- }
-
- return true;
- }
-
- @Override
- public Header remove(QName name) {
- return remove(name.getNamespaceURI(), name.getLocalPart());
- }
-
- @Override
- public Header remove(String nsUri, String localName) {
- SOAPHeader soapHeader = ensureSOAPHeader();
- if (soapHeader == null) {
- return null;
- }
- SOAPHeaderElement headerElem = find(nsUri, localName);
- if (headerElem == null) {
- return null;
- }
- headerElem = (SOAPHeaderElement) soapHeader.removeChild(headerElem);
-
- //it might have been a nonSAAJHeader - remove from that map
- removeNonSAAJHeader(headerElem);
-
- //remove it from understoodHeaders and notUnderstoodHeaders if present
- QName hdrName = (nsUri == null) ? new QName(localName) : new QName(nsUri, localName);
- if (understoodHeaders != null) {
- understoodHeaders.remove(hdrName);
- }
- removeNotUnderstood(hdrName);
-
- return new SAAJHeader(headerElem);
- }
-
- private void removeNotUnderstood(QName hdrName) {
- if (notUnderstoodCount == null) {
- return;
- }
- Integer notUnderstood = notUnderstoodCount.get(hdrName);
- if (notUnderstood != null) {
- int intNotUnderstood = notUnderstood;
- intNotUnderstood--;
- if (intNotUnderstood <= 0) {
- notUnderstoodCount.remove(hdrName);
- }
- }
-
- }
-
- private SOAPHeaderElement find(QName qName) {
- return find(qName.getNamespaceURI(), qName.getLocalPart());
- }
-
- private SOAPHeaderElement find(String nsUri, String localName) {
- SOAPHeader soapHeader = ensureSOAPHeader();
- if (soapHeader == null) {
- return null;
- }
- Iterator allHeaders = soapHeader.examineAllHeaderElements();
- while(allHeaders.hasNext()) {
- SOAPHeaderElement nextHdrElem = (SOAPHeaderElement) allHeaders.next();
- if (nextHdrElem.getNamespaceURI().equals(nsUri) &&
- nextHdrElem.getLocalName().equals(localName)) {
- return nextHdrElem;
- }
- }
- return null;
- }
-
- private void notUnderstood(QName qName) {
- if (notUnderstoodCount == null) {
- notUnderstoodCount = new HashMap<QName, Integer>();
- }
- Integer count = notUnderstoodCount.get(qName);
- if (count == null) {
- notUnderstoodCount.put(qName, 1);
- } else {
- notUnderstoodCount.put(qName, count + 1);
- }
-
- //if for some strange reason it was previously understood and now is not,
- //remove it from understoodHeaders if it exists there
- if (understoodHeaders != null) {
- understoodHeaders.remove(qName);
- }
- }
-
- /**
- * Utility method to get the SOAPHeader from a SOAPMessage, adding one if
- * one is not present in the original message.
- */
- private SOAPHeader ensureSOAPHeader() {
- SOAPHeader header;
- try {
- header = sm.getSOAPPart().getEnvelope().getHeader();
- if (header != null) {
- return header;
- } else {
- return sm.getSOAPPart().getEnvelope().addHeader();
- }
- } catch (Exception e) {
- return null;
- }
- }
-
- private boolean isNonSAAJHeader(Header header) {
- return !(header instanceof SAAJHeader);
- }
-
- private void addNonSAAJHeader(SOAPHeaderElement headerElem, Header header) {
- if (nonSAAJHeaders == null) {
- nonSAAJHeaders = new HashMap<SOAPHeaderElement, Header>();
- }
- nonSAAJHeaders.put(headerElem, header);
- }
-
- private void removeNonSAAJHeader(SOAPHeaderElement headerElem) {
- if (nonSAAJHeaders != null) {
- nonSAAJHeaders.remove(headerElem);
- }
- }
-
- @Override
- public boolean addOrReplace(Header header) {
- remove(header.getNamespaceURI(), header.getLocalPart());
- return add(header);
- }
-
- @Override
- public void replace(Header old, Header header) {
- if (remove(old.getNamespaceURI(), old.getLocalPart()) == null)
- throw new IllegalArgumentException();
- add(header);
- }
-
- @Override
- public Set<QName> getUnderstoodHeaders() {
- return understoodHeaders;
- }
-
- @Override
- public Set<QName> getNotUnderstoodHeaders(Set<String> roles,
- Set<QName> knownHeaders, WSBinding binding) {
- Set<QName> notUnderstoodHeaderNames = new HashSet<QName>();
- if (notUnderstoodCount == null) {
- return notUnderstoodHeaderNames;
- }
- for (QName headerName : notUnderstoodCount.keySet()) {
- int count = notUnderstoodCount.get(headerName);
- if (count <= 0) {
- continue;
- }
- SOAPHeaderElement hdrElem = find(headerName);
- if (!hdrElem.getMustUnderstand()) {
- continue;
- }
- SAAJHeader hdr = new SAAJHeader(hdrElem);
- //mustUnderstand attribute is true - but there may be
- //additional criteria
- boolean understood = false;
- if (roles != null) {
- understood = !roles.contains(hdr.getRole(soapVersion));
- }
- if (understood) {
- continue;
- }
- //if it must be understood see if it is understood by the binding
- //or is in knownheaders
- if (binding != null && binding instanceof SOAPBindingImpl) {
- understood = ((SOAPBindingImpl) binding).understandsHeader(headerName);
- if (!understood) {
- if (knownHeaders != null && knownHeaders.contains(headerName)) {
- understood = true;
- }
- }
- }
- if (!understood) {
- notUnderstoodHeaderNames.add(headerName);
- }
- }
- return notUnderstoodHeaderNames;
- }
-
- @Override
- public Iterator<Header> getHeaders() {
- SOAPHeader soapHeader = ensureSOAPHeader();
- if (soapHeader == null) {
- return null;
- }
- Iterator allHeaders = soapHeader.examineAllHeaderElements();
- return new HeaderReadIterator(allHeaders, null, null);
- }
-
- private static class HeaderReadIterator implements Iterator<Header> {
- SOAPHeaderElement current;
- Iterator soapHeaders;
- String myNsUri;
- String myLocalName;
-
- public HeaderReadIterator(Iterator allHeaders, String nsUri,
- String localName) {
- this.soapHeaders = allHeaders;
- this.myNsUri = nsUri;
- this.myLocalName = localName;
- }
-
- @Override
- public boolean hasNext() {
- if (current == null) {
- advance();
- }
- return (current != null);
- }
-
- @Override
- public Header next() {
- if (!hasNext()) {
- return null;
- }
- if (current == null) {
- return null;
- }
-
- SAAJHeader ret = new SAAJHeader(current);
- current = null;
- return ret;
- }
-
- @Override
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- private void advance() {
- while (soapHeaders.hasNext()) {
- SOAPHeaderElement nextHdr = (SOAPHeaderElement) soapHeaders.next();
- if (nextHdr != null &&
- (myNsUri == null || nextHdr.getNamespaceURI().equals(myNsUri)) &&
- (myLocalName == null || nextHdr.getLocalName().equals(myLocalName))) {
- current = nextHdr;
- //found it
- return;
- }
- }
- //if we got here we didn't find a match
- current = null;
- }
-
- }
-
- @Override
- public boolean hasHeaders() {
- SOAPHeader soapHeader = ensureSOAPHeader();
- if (soapHeader == null) {
- return false;
- }
-
- Iterator allHeaders = soapHeader.examineAllHeaderElements();
- return allHeaders.hasNext();
- }
-
- @Override
- public List<Header> asList() {
- SOAPHeader soapHeader = ensureSOAPHeader();
- if (soapHeader == null) {
- return Collections.emptyList();
- }
-
- Iterator allHeaders = soapHeader.examineAllHeaderElements();
- List<Header> headers = new ArrayList<Header>();
- while (allHeaders.hasNext()) {
- SOAPHeaderElement nextHdr = (SOAPHeaderElement) allHeaders.next();
- headers.add(new SAAJHeader(nextHdr));
- }
- return headers;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SaajStaxWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SaajStaxWriter.java
deleted file mode 100644
index f1ed6979..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SaajStaxWriter.java
+++ /dev/null
@@ -1,559 +0,0 @@
-/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message.saaj;
-
-import java.util.Iterator;
-import java.util.Arrays;
-import java.util.List;
-import java.util.LinkedList;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.w3c.dom.Comment;
-import org.w3c.dom.Node;
-
-/**
- * SaajStaxWriter builds a SAAJ SOAPMessage by using XMLStreamWriter interface.
- *
- * <p>
- * Defers creation of SOAPElement until all the aspects of the name of the element are known.
- * In some cases, the namespace uri is indicated only by the {@link #writeNamespace(String, String)} call.
- * After opening an element ({@code writeStartElement}, {@code writeEmptyElement} methods), all attributes
- * and namespace assignments are retained within {@link DeferredElement} object ({@code deferredElement} field).
- * As soon as any other method than {@code writeAttribute}, {@code writeNamespace}, {@code writeDefaultNamespace}
- * or {@code setNamespace} is called, the contents of {@code deferredElement} is transformed into new SOAPElement
- * (which is appropriately inserted into the SOAPMessage under construction).
- * This mechanism is necessary to fix JDK-8159058 issue.
- * </p>
- *
- * @author shih-chang.chen@oracle.com
- */
-public class SaajStaxWriter implements XMLStreamWriter {
-
- protected SOAPMessage soap;
- protected String envURI;
- protected SOAPElement currentElement;
- protected DeferredElement deferredElement;
-
- static final protected String Envelope = "Envelope";
- static final protected String Header = "Header";
- static final protected String Body = "Body";
- static final protected String xmlns = "xmlns";
-
- public SaajStaxWriter(final SOAPMessage msg) throws SOAPException {
- soap = msg;
- currentElement = soap.getSOAPPart().getEnvelope();
- envURI = currentElement.getNamespaceURI();
- this.deferredElement = new DeferredElement();
- }
-
- public SOAPMessage getSOAPMessage() {
- return soap;
- }
-
- @Override
- public void writeStartElement(final String localName) throws XMLStreamException {
- currentElement = deferredElement.flushTo(currentElement);
- deferredElement.setLocalName(localName);
- }
-
- @Override
- public void writeStartElement(final String ns, final String ln) throws XMLStreamException {
- writeStartElement(null, ln, ns);
- }
-
- @Override
- public void writeStartElement(final String prefix, final String ln, final String ns) throws XMLStreamException {
- currentElement = deferredElement.flushTo(currentElement);
-
- if (envURI.equals(ns)) {
- try {
- if (Envelope.equals(ln)) {
- currentElement = soap.getSOAPPart().getEnvelope();
- fixPrefix(prefix);
- return;
- } else if (Header.equals(ln)) {
- currentElement = soap.getSOAPHeader();
- fixPrefix(prefix);
- return;
- } else if (Body.equals(ln)) {
- currentElement = soap.getSOAPBody();
- fixPrefix(prefix);
- return;
- }
- } catch (SOAPException e) {
- throw new XMLStreamException(e);
- }
-
- }
-
- deferredElement.setLocalName(ln);
- deferredElement.setNamespaceUri(ns);
- deferredElement.setPrefix(prefix);
-
- }
-
- private void fixPrefix(final String prfx) throws XMLStreamException {
- String oldPrfx = currentElement.getPrefix();
- if (prfx != null && !prfx.equals(oldPrfx)) {
- currentElement.setPrefix(prfx);
- }
- }
-
- @Override
- public void writeEmptyElement(final String uri, final String ln) throws XMLStreamException {
- writeStartElement(null, ln, uri);
- }
-
- @Override
- public void writeEmptyElement(final String prefix, final String ln, final String uri) throws XMLStreamException {
- writeStartElement(prefix, ln, uri);
- }
-
- @Override
- public void writeEmptyElement(final String ln) throws XMLStreamException {
- writeStartElement(null, ln, null);
- }
-
- @Override
- public void writeEndElement() throws XMLStreamException {
- currentElement = deferredElement.flushTo(currentElement);
- if (currentElement != null) currentElement = currentElement.getParentElement();
- }
-
- @Override
- public void writeEndDocument() throws XMLStreamException {
- currentElement = deferredElement.flushTo(currentElement);
- }
-
- @Override
- public void close() throws XMLStreamException {
- }
-
- @Override
- public void flush() throws XMLStreamException {
- }
-
- @Override
- public void writeAttribute(final String ln, final String val) throws XMLStreamException {
- writeAttribute(null, null, ln, val);
- }
-
- @Override
- public void writeAttribute(final String prefix, final String ns, final String ln, final String value) throws XMLStreamException {
- if (ns == null && prefix == null && xmlns.equals(ln)) {
- writeNamespace("", value);
- } else {
- if (deferredElement.isInitialized()) {
- deferredElement.addAttribute(prefix, ns, ln, value);
- } else {
- addAttibuteToElement(currentElement, prefix, ns, ln, value);
- }
- }
- }
-
- @Override
- public void writeAttribute(final String ns, final String ln, final String val) throws XMLStreamException {
- writeAttribute(null, ns, ln, val);
- }
-
- @Override
- public void writeNamespace(String prefix, final String uri) throws XMLStreamException {
- // make prefix default if null or "xmlns" (according to javadoc)
- String thePrefix = prefix == null || "xmlns".equals(prefix) ? "" : prefix;
- if (deferredElement.isInitialized()) {
- deferredElement.addNamespaceDeclaration(thePrefix, uri);
- } else {
- try {
- currentElement.addNamespaceDeclaration(thePrefix, uri);
- } catch (SOAPException e) {
- throw new XMLStreamException(e);
- }
- }
- }
-
- @Override
- public void writeDefaultNamespace(final String uri) throws XMLStreamException {
- writeNamespace("", uri);
- }
-
- @Override
- public void writeComment(final String data) throws XMLStreamException {
- currentElement = deferredElement.flushTo(currentElement);
- Comment c = soap.getSOAPPart().createComment(data);
- currentElement.appendChild(c);
- }
-
- @Override
- public void writeProcessingInstruction(final String target) throws XMLStreamException {
- currentElement = deferredElement.flushTo(currentElement);
- Node n = soap.getSOAPPart().createProcessingInstruction(target, "");
- currentElement.appendChild(n);
- }
-
- @Override
- public void writeProcessingInstruction(final String target, final String data) throws XMLStreamException {
- currentElement = deferredElement.flushTo(currentElement);
- Node n = soap.getSOAPPart().createProcessingInstruction(target, data);
- currentElement.appendChild(n);
- }
-
- @Override
- public void writeCData(final String data) throws XMLStreamException {
- currentElement = deferredElement.flushTo(currentElement);
- Node n = soap.getSOAPPart().createCDATASection(data);
- currentElement.appendChild(n);
- }
-
- @Override
- public void writeDTD(final String dtd) throws XMLStreamException {
- currentElement = deferredElement.flushTo(currentElement);
- }
-
- @Override
- public void writeEntityRef(final String name) throws XMLStreamException {
- currentElement = deferredElement.flushTo(currentElement);
- Node n = soap.getSOAPPart().createEntityReference(name);
- currentElement.appendChild(n);
- }
-
- @Override
- public void writeStartDocument() throws XMLStreamException {
- }
-
- @Override
- public void writeStartDocument(final String version) throws XMLStreamException {
- if (version != null) soap.getSOAPPart().setXmlVersion(version);
- }
-
- @Override
- public void writeStartDocument(final String encoding, final String version) throws XMLStreamException {
- if (version != null) soap.getSOAPPart().setXmlVersion(version);
- if (encoding != null) {
- try {
- soap.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, encoding);
- } catch (SOAPException e) {
- throw new XMLStreamException(e);
- }
- }
- }
-
- @Override
- public void writeCharacters(final String text) throws XMLStreamException {
- currentElement = deferredElement.flushTo(currentElement);
- try {
- currentElement.addTextNode(text);
- } catch (SOAPException e) {
- throw new XMLStreamException(e);
- }
- }
-
- @Override
- public void writeCharacters(final char[] text, final int start, final int len) throws XMLStreamException {
- currentElement = deferredElement.flushTo(currentElement);
- char[] chr = (start == 0 && len == text.length) ? text : Arrays.copyOfRange(text, start, start + len);
- try {
- currentElement.addTextNode(new String(chr));
- } catch (SOAPException e) {
- throw new XMLStreamException(e);
- }
- }
-
- @Override
- public String getPrefix(final String uri) throws XMLStreamException {
- return currentElement.lookupPrefix(uri);
- }
-
- @Override
- public void setPrefix(final String prefix, final String uri) throws XMLStreamException {
- // TODO: this in fact is not what would be expected from XMLStreamWriter
- // (e.g. XMLStreamWriter for writing to output stream does not write anything as result of
- // this method, it just rememebers that given prefix is associated with the given uri
- // for the scope; to actually declare the prefix assignment in the resulting XML, one
- // needs to call writeNamespace(...) method
- // Kept for backwards compatibility reasons - this might be worth of further investigation.
- if (deferredElement.isInitialized()) {
- deferredElement.addNamespaceDeclaration(prefix, uri);
- } else {
- throw new XMLStreamException("Namespace not associated with any element");
- }
- }
-
- @Override
- public void setDefaultNamespace(final String uri) throws XMLStreamException {
- setPrefix("", uri);
- }
-
- @Override
- public void setNamespaceContext(final NamespaceContext context)throws XMLStreamException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Object getProperty(final String name) throws IllegalArgumentException {
- //TODO the following line is to make eclipselink happy ... they are aware of this problem -
- if (javax.xml.stream.XMLOutputFactory.IS_REPAIRING_NAMESPACES.equals(name)) return Boolean.FALSE;
- return null;
- }
-
- @Override
- public NamespaceContext getNamespaceContext() {
- return new NamespaceContext() {
- public String getNamespaceURI(final String prefix) {
- return currentElement.getNamespaceURI(prefix);
- }
- public String getPrefix(final String namespaceURI) {
- return currentElement.lookupPrefix(namespaceURI);
- }
- public Iterator getPrefixes(final String namespaceURI) {
- return new Iterator<String>() {
- String prefix = getPrefix(namespaceURI);
- public boolean hasNext() {
- return (prefix != null);
- }
- public String next() {
- if (!hasNext()) throw new java.util.NoSuchElementException();
- String next = prefix;
- prefix = null;
- return next;
- }
- public void remove() {}
- };
- }
- };
- }
-
- static void addAttibuteToElement(SOAPElement element, String prefix, String ns, String ln, String value)
- throws XMLStreamException {
- try {
- if (ns == null) {
- element.setAttributeNS("", ln, value);
- } else {
- QName name = prefix == null ? new QName(ns, ln) : new QName(ns, ln, prefix);
- element.addAttribute(name, value);
- }
- } catch (SOAPException e) {
- throw new XMLStreamException(e);
- }
- }
-
- /**
- * Holds details of element that needs to be deferred in order to manage namespace assignments correctly.
- *
- * <p>
- * An instance of can be set with all the aspects of the element name (local name, prefix, namespace uri).
- * Attributes and namespace declarations (special case of attribute) can be added.
- * Namespace declarations are handled so that the element namespace is updated if it is implied by the namespace
- * declaration and the namespace was not set to non-{@code null} value previously.
- * </p>
- *
- * <p>
- * The state of this object can be {@link #flushTo(SOAPElement) flushed} to SOAPElement - new SOAPElement will
- * be added a child element; the new element will have exactly the shape as represented by the state of this
- * object. Note that the {@link #flushTo(SOAPElement)} method does nothing
- * (and returns the argument immediately) if the state of this object is not initialized
- * (i.e. local name is null).
- * </p>
- *
- * @author ondrej.cerny@oracle.com
- */
- static class DeferredElement {
- private String prefix;
- private String localName;
- private String namespaceUri;
- private final List<NamespaceDeclaration> namespaceDeclarations;
- private final List<AttributeDeclaration> attributeDeclarations;
-
- DeferredElement() {
- this.namespaceDeclarations = new LinkedList<NamespaceDeclaration>();
- this.attributeDeclarations = new LinkedList<AttributeDeclaration>();
- reset();
- }
-
-
- /**
- * Set prefix of the element.
- * @param prefix namespace prefix
- */
- public void setPrefix(final String prefix) {
- this.prefix = prefix;
- }
-
- /**
- * Set local name of the element.
- *
- * <p>
- * This method initializes the element.
- * </p>
- *
- * @param localName local name {@code not null}
- */
- public void setLocalName(final String localName) {
- if (localName == null) {
- throw new IllegalArgumentException("localName can not be null");
- }
- this.localName = localName;
- }
-
- /**
- * Set namespace uri.
- *
- * @param namespaceUri namespace uri
- */
- public void setNamespaceUri(final String namespaceUri) {
- this.namespaceUri = namespaceUri;
- }
-
- /**
- * Adds namespace prefix assignment to the element.
- *
- * @param prefix prefix (not {@code null})
- * @param namespaceUri namespace uri
- */
- public void addNamespaceDeclaration(final String prefix, final String namespaceUri) {
- if (null == this.namespaceUri && null != namespaceUri && prefix.equals(emptyIfNull(this.prefix))) {
- this.namespaceUri = namespaceUri;
- }
- this.namespaceDeclarations.add(new NamespaceDeclaration(prefix, namespaceUri));
- }
-
- /**
- * Adds attribute to the element.
- * @param prefix prefix
- * @param ns namespace
- * @param ln local name
- * @param value value
- */
- public void addAttribute(final String prefix, final String ns, final String ln, final String value) {
- if (ns == null && prefix == null && xmlns.equals(ln)) {
- this.addNamespaceDeclaration(prefix, value);
- } else {
- this.attributeDeclarations.add(new AttributeDeclaration(prefix, ns, ln, value));
- }
- }
-
- /**
- * Flushes state of this element to the {@code target} element.
- *
- * <p>
- * If this element is initialized then it is added with all the namespace declarations and attributes
- * to the {@code target} element as a child. The state of this element is reset to uninitialized.
- * The newly added element object is returned.
- * </p>
- * <p>
- * If this element is not initialized then the {@code target} is returned immediately, nothing else is done.
- * </p>
- *
- * @param target target element
- * @return {@code target} or new element
- * @throws XMLStreamException on error
- */
- public SOAPElement flushTo(final SOAPElement target) throws XMLStreamException {
- try {
- if (this.localName != null) {
- // add the element appropriately (based on namespace declaration)
- final SOAPElement newElement;
- if (this.namespaceUri == null) {
- // add element with inherited scope
- newElement = target.addChildElement(this.localName);
- } else if (prefix == null) {
- newElement = target.addChildElement(new QName(this.namespaceUri, this.localName));
- } else {
- newElement = target.addChildElement(this.localName, this.prefix, this.namespaceUri);
- }
- // add namespace declarations
- for (NamespaceDeclaration namespace : this.namespaceDeclarations) {
- target.addNamespaceDeclaration(namespace.prefix, namespace.namespaceUri);
- }
- // add attribute declarations
- for (AttributeDeclaration attribute : this.attributeDeclarations) {
- addAttibuteToElement(newElement,
- attribute.prefix, attribute.namespaceUri, attribute.localName, attribute.value);
- }
- // reset state
- this.reset();
-
- return newElement;
- } else {
- return target;
- }
- // else after reset state -> not initialized
- } catch (SOAPException e) {
- throw new XMLStreamException(e);
- }
- }
-
- /**
- * Is the element initialized?
- * @return boolean indicating whether it was initialized after last flush
- */
- public boolean isInitialized() {
- return this.localName != null;
- }
-
- private void reset() {
- this.localName = null;
- this.prefix = null;
- this.namespaceUri = null;
- this.namespaceDeclarations.clear();
- this.attributeDeclarations.clear();
- }
-
- private static String emptyIfNull(String s) {
- return s == null ? "" : s;
- }
- }
-
- static class NamespaceDeclaration {
- final String prefix;
- final String namespaceUri;
-
- NamespaceDeclaration(String prefix, String namespaceUri) {
- this.prefix = prefix;
- this.namespaceUri = namespaceUri;
- }
- }
-
- static class AttributeDeclaration {
- final String prefix;
- final String namespaceUri;
- final String localName;
- final String value;
-
- AttributeDeclaration(String prefix, String namespaceUri, String localName, String value) {
- this.prefix = prefix;
- this.namespaceUri = namespaceUri;
- this.localName = localName;
- this.value = value;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/InputStreamMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/InputStreamMessage.java
deleted file mode 100644
index 1f9180d8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/InputStreamMessage.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message.stream;
-
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Packet;
-import java.io.InputStream;
-
-/**
- * Low level representation of an XML or SOAP message as an {@link InputStream}.
- *
- */
-public class InputStreamMessage extends StreamBasedMessage {
- /**
- * The MIME content-type of the encoding.
- */
- public final String contentType;
-
- /**
- * The message represented as an {@link InputStream}.
- */
- public final InputStream msg;
-
- /**
- * Create a new message.
- *
- * @param properties
- * the properties of the message.
- *
- * @param contentType
- * the MIME content-type of the encoding.
- *
- * @param msg
- * always a non-null unconsumed {@link InputStream} that
- * represents a request.
- */
- public InputStreamMessage(Packet properties, String contentType, InputStream msg) {
- super(properties);
-
- this.contentType = contentType;
- this.msg = msg;
- }
-
- /**
- * Create a new message.
- *
- * @param properties
- * the properties of the message.
- *
- * @param attachments
- * the attachments of the message.
- *
- * @param contentType
- * the MIME content-type of the encoding.
- *
- * @param msg
- * always a non-null unconsumed {@link InputStream} that
- * represents a request.
- */
- public InputStreamMessage(Packet properties, AttachmentSet attachments,
- String contentType, InputStream msg) {
- super(properties, attachments);
-
- this.contentType = contentType;
- this.msg = msg;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/StreamBasedMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/StreamBasedMessage.java
deleted file mode 100644
index 4a33070a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/StreamBasedMessage.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message.stream;
-
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.message.AttachmentSetImpl;
-
-/**
- * Base representation an XML or SOAP message as stream.
- *
- */
-abstract class StreamBasedMessage {
- /**
- * The properties of the message.
- */
- public final Packet properties;
-
- /**
- * The attachments of this message
- * (attachments live outside a message.)
- */
- public final AttachmentSet attachments;
-
- /**
- * Create a new message.
- *
- * @param properties
- * the properties of the message.
- *
- */
- protected StreamBasedMessage(Packet properties) {
- this.properties = properties;
- this.attachments = new AttachmentSetImpl();
- }
-
- /**
- * Create a new message.
- *
- * @param properties
- * the properties of the message.
- *
- * @param attachments
- * the attachments of the message.
- */
- protected StreamBasedMessage(Packet properties, AttachmentSet attachments) {
- this.properties = properties;
- this.attachments = attachments;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/XMLStreamReaderMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/XMLStreamReaderMessage.java
deleted file mode 100644
index cd89dc5f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/XMLStreamReaderMessage.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message.stream;
-
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Packet;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * Low level representation of an XML or SOAP message as an {@link XMLStreamReader}.
- *
- */
-public class XMLStreamReaderMessage extends StreamBasedMessage {
- /**
- * The message represented as an {@link XMLStreamReader}.
- */
- public final XMLStreamReader msg;
-
- /**
- * Create a new message.
- *
- * @param properties
- * the properties of the message.
- *
- * @param msg
- * always a non-null unconsumed {@link XMLStreamReader} that
- * represents a request.
- */
- public XMLStreamReaderMessage(Packet properties, XMLStreamReader msg) {
- super(properties);
- this.msg = msg;
- }
-
- /**
- * Create a new message.
- *
- * @param properties
- * the properties of the message.
- *
- * @param attachments
- * the attachments of the message.
- *
- * @param msg
- * always a non-null unconsumed {@link XMLStreamReader} that
- * represents a request.
- */
- public XMLStreamReaderMessage(Packet properties, AttachmentSet attachments, XMLStreamReader msg) {
- super(properties, attachments);
- this.msg = msg;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/CheckedException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/CheckedException.java
deleted file mode 100644
index 2dd917e9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/CheckedException.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.xml.internal.bind.api.Bridge;
-
-import javax.xml.ws.WebFault;
-import javax.xml.namespace.QName;
-import java.rmi.RemoteException;
-
-/**
- * This class provides abstractio to the the exception class
- * corresponding to the wsdl:fault, such as class MUST have
- * {@link WebFault} annotation defined on it.
- *
- * Also the exception class must have
- *
- * <code>public WrapperException()String message, FaultBean){}</code>
- *
- * and method
- *
- * <code>public FaultBean getFaultInfo();</code>
- *
- * @author Vivek Pandey
- */
-public interface CheckedException {
- /**
- * Gets the root {@link SEIModel} that owns this model.
- */
- SEIModel getOwner();
-
- /**
- * Gets the parent {@link JavaMethod} to which this checked exception belongs.
- */
- JavaMethod getParent();
-
- /**
- * The returned exception class would be userdefined or WSDL exception class.
- *
- * @return
- * always non-null same object.
- */
- Class getExceptionClass();
-
- /**
- * The detail bean is serialized inside the detail entry in the SOAP message.
- * This must be known to the {@link javax.xml.bind.JAXBContext} inorder to get
- * marshalled/unmarshalled.
- *
- * @return the detail bean
- */
- Class getDetailBean();
-
- /**
- * Gives the {@link com.sun.xml.internal.bind.api.Bridge} associated with the detail
- * @deprecated Why do you need this?
- */
- Bridge getBridge();
-
- /**
- * Tells whether the exception class is a userdefined or a WSDL exception.
- * A WSDL exception class follows the pattern defined in JSR 224. According to that
- * a WSDL exception class must have:
- *
- * <code>public WrapperException()String message, FaultBean){}</code>
- *
- * and accessor method
- *
- * <code>public FaultBean getFaultInfo();</code>
- */
- ExceptionType getExceptionType();
-
- /**
- * Gives the wsdl:portType/wsdl:operation/wsdl:fault@message value - that is the wsdl:message
- * referenced by wsdl:fault
- */
- String getMessageName();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ExceptionType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ExceptionType.java
deleted file mode 100644
index d37d45b7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ExceptionType.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-/**
- * Type of java exception as defined by JAXWS 2.0 JSR 224.
- *
- * Tells whether the exception class is a userdefined or a WSDL exception.
- * A WSDL exception class follows the pattern defined in JSR 224. According to that
- * a WSDL exception class must have:
- *
- * <code>public WrapperException()String message, FaultBean){}</code>
- *
- * and accessor method
- *
- * <code>public FaultBean getFaultInfo();</code>
- *
- * @author Vivek Pandey
- */
-public enum ExceptionType {
- WSDLException(0), UserDefined(1);
-
- ExceptionType(int exceptionType){
- this.exceptionType = exceptionType;
- }
-
- public int value() {
- return exceptionType;
- }
- private final int exceptionType;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/JavaMethod.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/JavaMethod.java
deleted file mode 100644
index 033841fa..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/JavaMethod.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.model.soap.SOAPBinding;
-
-import javax.xml.namespace.QName;
-import java.lang.reflect.Method;
-import javax.jws.WebService;
-
-/**
- * Abstracts the annotated {@link Method} of a SEI.
- *
- * @author Vivek Pandey
- */
-public interface JavaMethod {
-
- /**
- * Gets the root {@link SEIModel} that owns this model.
- */
- SEIModel getOwner();
-
- /**
- * On the server side, it uses this for invocation of the web service
- *
- * <p>
- * {@literal @}{@link WebService}(endpointInterface="I")
- * class A { }
- *
- * In this case, it retuns A's method
- *
- * <p>
- * {@literal @}{@link WebService}(endpointInterface="I")
- * class A implements I { }
- * In this case, it returns A's method
- *
- * <p>
- * {@literal @}{@link WebService}
- * class A { }
- * In this case, it returns A's method
- *
- * @return Returns the java {@link Method}
- */
- @NotNull Method getMethod();
-
-
- /**
- * This should be used if you want to access annotations on WebMethod
- * Returns the SEI method if there is one.
- *
- * <p>
- * {@literal @}{@link WebService}(endpointInterface="I")
- * class A { }
- * In this case, it retuns I's method
- *
- * <p>
- * {@literal @}{@link WebService}(endpointInterface="I")
- * class A implements I { }
- * In this case, it returns I's method
- *
- * <p>
- * {@literal @}{@link WebService}
- * class A { }
- * In this case, it returns A's method
- *
- * @return Returns the java {@link Method}
- */
- @NotNull Method getSEIMethod();
-
- /**
- * @return Returns the {@link MEP}.
- */
- MEP getMEP();
-
- /**
- * Binding object - a {@link SOAPBinding} isntance.
- *
- * @return the Binding object
- */
- SOAPBinding getBinding();
-
- /**
- * Gives the wsdl:operation@name value
- */
- @NotNull String getOperationName();
-
-
- /**
- * Gives the request wsdl:message@name value
- */
- @NotNull String getRequestMessageName();
-
- /**
- * Gives the response wsdl:messageName value
- * @return null if its a oneway operation that is getMEP().isOneWay()==true.
- * @see com.sun.xml.internal.ws.api.model.MEP#isOneWay()
- */
- @Nullable String getResponseMessageName();
-
- /**
- * Gives soap:Body's first child's name for request message.
- *
- * @return
- * null if this operation doesn't have any request parameter bound to the body.
- */
- @Nullable QName getRequestPayloadName();
-
- /**
- * Gives soap:Body's first child's name for response message.
- *
- * @return
- * null if this operation doesn't have any response parameter bound to the body.
- */
- @Nullable QName getResponsePayloadName();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/MEP.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/MEP.java
deleted file mode 100644
index 5d519188..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/MEP.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-/**
- * Constants that represents four message exchange patterns.
- *
- * @author Kohsuke Kawaguchi
- */
-public enum MEP {
- REQUEST_RESPONSE(false),
- ONE_WAY(false),
- ASYNC_POLL(true),
- ASYNC_CALLBACK(true);
-
- /**
- * True for {@link #ASYNC_CALLBACK} and {@link #ASYNC_POLL}.
- */
- public final boolean isAsync;
-
- MEP(boolean async) {
- isAsync = async;
- }
-
- public final boolean isOneWay() {
- return this==ONE_WAY;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/Parameter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/Parameter.java
deleted file mode 100644
index 438f45ca..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/Parameter.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.xml.internal.bind.api.Bridge;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Holder;
-import javax.jws.WebParam;
-import javax.jws.WebParam.Mode;
-
-/**
- * Runtime Parameter that abstracts the annotated java parameter
- * <p/>
- * <p/>
- * A parameter may be bound to a header, a body, or an attachment.
- * Note that when it's bound to a body, it's bound to a body,
- * it binds to the whole payload.
- * <p/>
- * <p/>
- * Sometimes multiple Java parameters are packed into the payload,
- * in which case the subclass {@link com.sun.xml.internal.ws.model.WrapperParameter} is used.
- *
- * @author Vivek Pandey
- */
-public interface Parameter {
- /**
- * Gets the root {@link SEIModel} that owns this model.
- */
- SEIModel getOwner();
-
- /**
- * Gets the parent {@link JavaMethod} to which this parameter belongs.
- */
- JavaMethod getParent();
-
- /**
- * @return Returns the {@link QName} of the payload/infoset of a SOAP body or header.
- */
- QName getName();
-
- /**
- * Gives the {@link Bridge} associated with this Parameter
- * @deprecated
- */
- Bridge getBridge();
-
- /**
- * @return Returns the mode, such as IN, OUT or INOUT.
- */
- Mode getMode();
-
- /**
- * Position of a parameter in the method signature. It would be -1 if the parameter is a return.
- *
- * @return Returns the index.
- */
- int getIndex();
-
- /**
- * @return true if <tt>this instanceof {@link com.sun.xml.internal.ws.model.WrapperParameter}</tt>.
- */
- boolean isWrapperStyle();
-
- /**
- * Returns true if this parameter is bound to the return value from the {@link JavaMethod}.
- *
- * <p>
- * Just the convenience method for <tt>getIndex()==-1</tt>
- */
- boolean isReturnValue();
-
- /**
- * Returns the binding associated with the parameter. For IN parameter the binding will be
- * same as {@link #getInBinding()}, for OUT parameter the binding will be same as
- * {@link #getOutBinding()} and for INOUT parameter the binding will be same as calling
- * {@link #getInBinding()}
- *
- * @return the Binding for this Parameter. Returns {@link ParameterBinding#BODY} by default.
- */
- ParameterBinding getBinding();
-
- /**
- * Returns the {@link ParameterBinding} associated with the IN mode
- *
- * @return the binding
- */
- ParameterBinding getInBinding();
-
- /**
- * Returns the {@link ParameterBinding} associated with the OUT mode
- *
- * @return the binding
- */
- ParameterBinding getOutBinding();
-
- /**
- * @return true if the {@link Mode} associated with the parameter is {@link Mode#IN} and false otherwise.
- */
- boolean isIN();
-
- /**
- * @return true if the {@link Mode} associated with the parameter is {@link Mode#OUT} and false otherwise.
- */
- boolean isOUT();
-
- /**
- * @return true if the {@link Mode} associated with the parameter is {@link Mode#INOUT} and false otherwise.
- */
- boolean isINOUT();
-
- /**
- * If true, this parameter maps to the return value of a method invocation.
- *
- * <p>
- * {@link JavaMethod#getResponseParameters()} is guaranteed to have
- * at most one such {@link Parameter}. Note that there coule be none,
- * in which case the method returns <tt>void</tt>.
- *
- * <p>
- * Other response parameters are bound to {@link Holder}.
- */
- boolean isResponse();
-
- /**
- * Gets the holder value if applicable. To be called for inbound client side
- * message.
- *
- * @param obj
- * @return the holder value if applicable.
- */
- Object getHolderValue(Object obj);
-
- /**
- * Gives the wsdl:part@name value
- *
- * @return Value of {@link WebParam#partName()} annotation if present,
- * otherwise its the localname of the infoset associated with the parameter
- */
- String getPartName();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ParameterBinding.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ParameterBinding.java
deleted file mode 100644
index f0fdcbfd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ParameterBinding.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-/**
- * Denotes the binding of a parameter.
- *
- * <p>
- * This is somewhat like an enumeration (but it is <b>NOT</b> an enumeration.)
- *
- * <p>
- * The possible values are
- * BODY, HEADER, UNBOUND, and ATTACHMENT. BODY, HEADER, and UNBOUND
- * has a singleton semantics, but there are multiple ATTACHMENT instances
- * as it carries additional MIME type parameter.
- *
- * <p>
- * So don't use '==' for testing the equality.
- */
-public final class ParameterBinding {
- /**
- * Singleton instance that represents 'BODY'
- */
- public static final ParameterBinding BODY = new ParameterBinding(Kind.BODY,null);
- /**
- * Singleton instance that represents 'HEADER'
- */
- public static final ParameterBinding HEADER = new ParameterBinding(Kind.HEADER,null);
- /**
- * Singleton instance that represents 'UNBOUND',
- * meaning the parameter doesn't have a representation in a SOAP message.
- */
- public static final ParameterBinding UNBOUND = new ParameterBinding(Kind.UNBOUND,null);
- /**
- * Creates an instance that represents the attachment
- * with a given MIME type.
- *
- * <p>
- * TODO: shall we consider givint the singleton semantics by using
- * a cache? It's more elegant to do so, but
- * no where in JAX-WS RI two {@link ParameterBinding}s are compared today,
- */
- public static ParameterBinding createAttachment(String mimeType) {
- return new ParameterBinding(Kind.ATTACHMENT,mimeType);
- }
-
- /**
- * Represents 4 kinds of binding.
- */
- public static enum Kind {
- BODY, HEADER, UNBOUND, ATTACHMENT;
- }
-
-
- /**
- * Represents the kind of {@link ParameterBinding}.
- * Always non-null.
- */
- public final Kind kind;
-
- /**
- * Only used with attachment binding.
- */
- private String mimeType;
-
- private ParameterBinding(Kind kind,String mimeType) {
- this.kind = kind;
- this.mimeType = mimeType;
- }
-
-
-
- public String toString() {
- return kind.toString();
- }
-
- /**
- * Returns the MIME type associated with this binding.
- *
- * @throws IllegalStateException
- * if this binding doesn't represent an attachment.
- * IOW, if {@link #isAttachment()} returns false.
- * @return
- * Can be null, if the MIME type is not known.
- */
- public String getMimeType() {
- if(!isAttachment())
- throw new IllegalStateException();
- return mimeType;
- }
-
- public boolean isBody(){
- return this==BODY;
- }
-
- public boolean isHeader(){
- return this==HEADER;
- }
-
- public boolean isUnbound(){
- return this==UNBOUND;
- }
-
- public boolean isAttachment(){
- return kind==Kind.ATTACHMENT;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/SEIModel.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/SEIModel.java
deleted file mode 100644
index 5ea19d53..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/SEIModel.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.bind.api.TypeReference;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.util.Pool;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Provider;
-import java.lang.reflect.Method;
-import java.util.Collection;
-
-/**
- * Represents abstraction of SEI.
- *
- * <p>
- * This interface would be used to access which Java concepts correspond to
- * which WSDL concepts, such as which <code>wsdl:port</code> corresponds to
- * a SEI, or which <code>wsdl:operation</code> corresponds to {@link JavaMethod}.
- *
- * <P>
- * It also retains information about the databinding done for a SEI;
- * such as {@link JAXBRIContext} and {@link Bridge}.
- *
- * <p>
- * This model is constructed only when there is a Java SEI. Therefore it's
- * not available with {@link Dispatch} or {@link Provider}. Technologies that
- * need to work regardless of such surface API difference shall not be using
- * this model.
- *
- * @author Vivek Pandey
- */
-public interface SEIModel {
- Pool.Marshaller getMarshallerPool();
-
- /**
- * JAXBContext that will be used to marshall/unmarshall the java classes found in the SEI.
- *
- * @return the <code>{@link JAXBRIContext}</code>
- * @deprecated Why do you need this?
- */
- JAXBContext getJAXBContext();
-
- /**
- * Get the Bridge associated with the {@link TypeReference}
- *
- * @param type
- * @return the <code>{@link Bridge}</code> for the <code>type</code>
- */
-// Bridge getBridge(TypeReference type);
-
- /**
- * Its a known fault if the exception thrown by {@link Method} is annotated with the
- * {@link javax.xml.ws.WebFault#name()} thas equal to the name passed as parameter.
- *
- * @param name is the qualified name of fault detail element as specified by wsdl:fault@element value.
- * @param method is the Java {@link Method}
- * @return true if <code>name</code> is the name
- * of a known fault name for the <code>method</code>
- */
-// boolean isKnownFault(QName name, Method method);
-
- /**
- * Checks if the {@link JavaMethod} for the {@link Method} knowns the exception class.
- *
- * @param m {@link Method} to pickup the right {@link JavaMethod} model
- * @param ex exception class
- * @return true if <code>ex</code> is a Checked Exception
- * for <code>m</code>
- */
-// boolean isCheckedException(Method m, Class ex);
-
- /**
- * This method will be useful to get the {@link JavaMethod} corrrespondiong to
- * a {@link Method} - such as on the client side.
- *
- * @param method for which {@link JavaMethod} is asked for
- * @return the {@link JavaMethod} representing the <code>method</code>
- */
- JavaMethod getJavaMethod(Method method);
-
- /**
- * Gives a {@link JavaMethod} for a given {@link QName}. The {@link QName} will
- * be equivalent to the SOAP Body or Header block or can simply be the name of an
- * infoset that corresponds to the payload.
- * @param name
- * @return the <code>JavaMethod</code> associated with the
- * operation named name
- */
- public JavaMethod getJavaMethod(QName name);
-
- /**
- * Gives the JavaMethod associated with the wsdl operation
- * @param operationName QName of the wsdl operation
- * @return
- */
- public JavaMethod getJavaMethodForWsdlOperation(QName operationName);
-
-
- /**
- * Gives all the {@link JavaMethod} for a wsdl:port for which this {@link SEIModel} is
- * created.
- *
- * @return a {@link Collection} of {@link JavaMethod}
- * associated with the {@link SEIModel}
- */
- Collection<? extends JavaMethod> getJavaMethods();
-
- /**
- * Location of the WSDL that defines the port associated with the {@link SEIModel}
- *
- * @return wsdl location uri - always non-null
- */
- @NotNull String getWSDLLocation();
-
- /**
- * wsdl:service qualified name for the port associated with the {@link SEIModel}
- *
- * @return wsdl:service@name value - always non-null
- */
- @NotNull QName getServiceQName();
-
- /**
- * Gets the {@link WSDLPort} that represents the port that this SEI binds to.
- */
- @NotNull WSDLPort getPort();
-
- /**
- * Value of the wsdl:port name associated with the {@link SEIModel}
- *
- * @return wsdl:service/wsdl:port@name value, always non-null
- */
- @NotNull QName getPortName();
-
- /**
- * Value of wsdl:portType bound to the port associated with the {@link SEIModel}
- *
- * @return
- */
- @NotNull QName getPortTypeName();
-
- /**
- * Gives the wsdl:binding@name value
- */
- @NotNull QName getBoundPortTypeName();
-
- /**
- * Namespace of the wsd;:port associated with the {@link SEIModel}
- */
- @NotNull String getTargetNamespace();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/WSDLOperationMapping.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/WSDLOperationMapping.java
deleted file mode 100644
index e518d22d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/WSDLOperationMapping.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-
-/**
- * WSDLOperationMapping represents the mapping between a WSDL operation and a
- * JavaMethod. This is intended to be the output of resolving a Packet to the
- * targeting WSDL operation.
- *
- * @author shih-chang.chen@oracle.com
- */
-public interface WSDLOperationMapping {
-
- WSDLBoundOperation getWSDLBoundOperation();
-
- JavaMethod getJavaMethod();
-
- /**
- * WSDL1.1 allows operation overloading on the operation name; the operation name should
- * NOT be used as identifier of the operation.
- */
- QName getOperationName();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/soap/SOAPBinding.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/soap/SOAPBinding.java
deleted file mode 100644
index 4412d79a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/soap/SOAPBinding.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.soap;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-
-import javax.jws.soap.SOAPBinding.Style;
-import javax.jws.soap.SOAPBinding.Use;
-import javax.jws.WebMethod;
-
-/**
- * Models soap:binding in a WSDL document or a {@link javax.jws.soap.SOAPBinding} annotation. This
- * can be the return of {@link JavaMethod#getBinding()}.
- *
- * @author Vivek Pandey
- */
-abstract public class SOAPBinding {
- protected Use use = Use.LITERAL;
- protected Style style = Style.DOCUMENT;
- protected SOAPVersion soapVersion = SOAPVersion.SOAP_11;
- protected String soapAction = "";
-
- /**
- * Get {@link Use} such as <code>literal</code> or <code>encoded</code>.
- */
- public Use getUse() {
- return use;
- }
-
- /**
- * Get {@link Style} - such as <code>document</code> or <code>rpc</code>.
- */
- public Style getStyle() {
- return style;
- }
-
- /**
- * Get the {@link SOAPVersion}
- */
- public SOAPVersion getSOAPVersion() {
- return soapVersion;
- }
-
- /**
- * Returns true if its document/literal
- */
- public boolean isDocLit() {
- return style == Style.DOCUMENT && use == Use.LITERAL;
- }
-
- /**
- * Returns true if this is a rpc/literal binding
- */
- public boolean isRpcLit() {
- return style == Style.RPC && use == Use.LITERAL;
- }
-
- /**
- * Value of <code>wsdl:binding/wsdl:operation/soap:operation@soapAction</code> attribute or
- * {@link WebMethod#action()} annotation.
- * <pre>
- * For example:
- * &lt;wsdl:binding name="HelloBinding" type="tns:Hello">
- * &lt;soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- * &lt;wsdl:operation name="echoData">
- * &lt;soap12:operation soapAction=""/>
- * ...
- * </pre>
- * It's always non-null. soap message serializer needs to generated SOAPAction HTTP header with
- * the return of this method enclosed in quotes("").
- *
- * @see com.sun.xml.internal.ws.api.message.Packet#soapAction
- */
- public String getSOAPAction() {
- return soapAction;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundFault.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundFault.java
deleted file mode 100644
index a8f22d26..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundFault.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.namespace.QName;
-
-/**
- * Abstracts wsdl:binding/wsdl:operation/wsdl:fault
- *
- * @author Vivek Pandey
- */
-public interface WSDLBoundFault extends WSDLObject, WSDLExtensible {
-
- /**
- * Gives the wsdl:binding/wsdl:operation/wsdl:fault@name value
- */
- public
- @NotNull
- String getName();
-
- /**
- * Gives the qualified name associated with the fault. the namespace URI of the bounded fault
- * will be the one derived from wsdl:portType namespace.
- *
- * Maybe null if this method is called before the model is completely build (frozen), if a binding fault has no
- * corresponding fault in abstractwsdl:portType/wsdl:operation then the namespace URI of the fault will be that of
- * the WSDBoundPortType.
- */
- public @Nullable QName getQName();
-
- /**
- * Gives the associated abstract fault from
- * wsdl:portType/wsdl:operation/wsdl:fault. It is only available after
- * the WSDL parsing is complete and the entire model is frozen.
- * <p/>
- * Maybe null if a binding fault has no corresponding fault in abstract
- * wsdl:portType/wsdl:operation
- */
- public
- @Nullable
- WSDLFault getFault();
-
- /**
- * Gives the owner {@link WSDLBoundOperation}
- */
- @NotNull WSDLBoundOperation getBoundOperation();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java
deleted file mode 100644
index b0f48427..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.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;
-
-/**
- * Abstracts wsdl:binding/wsdl:operation. It can be used to determine the parts and their binding.
- *
- * @author Vivek Pandey
- */
-public interface WSDLBoundOperation extends WSDLObject, WSDLExtensible {
- /**
- * Short-cut for {@code getOperation().getName()}
- */
- @NotNull QName getName();
-
- /**
- * Gives soapbinding:operation@soapAction value. soapbinding:operation@soapAction is optional attribute.
- * If not present an empty String is returned as per BP 1.1 R2745.
- */
- @NotNull String getSOAPAction();
-
- /**
- * Gets the wsdl:portType/wsdl:operation model - {@link WSDLOperation},
- * associated with this binding operation.
- *
- * @return always same {@link WSDLOperation}
- */
- @NotNull WSDLOperation getOperation();
-
- /**
- * Gives the owner {@link WSDLBoundPortType}
- */
- @NotNull WSDLBoundPortType getBoundPortType();
-
- /**
- * Gets the soapbinding:binding/operation/wsaw:Anonymous. A default value of OPTIONAL is returned.
- *
- * @return Anonymous value of the operation
- */
- ANONYMOUS getAnonymous();
-
- enum ANONYMOUS { optional, required, prohibited }
-
- /**
- * Gets {@link WSDLPart} for the given wsdl:input or wsdl:output part
- *
- * @return null if no part is found
- */
- @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,? extends WSDLPart> getInParts();
-
- /**
- * Gets all outbound {@link WSDLPart} by its {@link WSDLPart#getName() name}.
- */
- @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.
- *
- * <p>
- * It's possible for an operation to define no body part, in which case
- * this method returns null.
- */
- @Nullable QName getRequestPayloadName();
-
- /**
- * Gets the payload QName of the response message.
- *
- * <p>
- * It's possible for an operation to define no body part, in which case
- * this method returns null.
- */
- @Nullable QName getResponsePayloadName();
-
- /**
- * Gets the namespace of request payload.
- */
- String getRequestNamespace();
-
- /**
- * Gets the namespace of response payload.
- */
- String getResponseNamespace();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundPortType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundPortType.java
deleted file mode 100644
index f89e12b5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundPortType.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.model.wsdl;
-
-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.message.Message;
-import com.sun.xml.internal.ws.api.model.ParameterBinding;
-
-import javax.jws.WebParam.Mode;
-import javax.jws.soap.SOAPBinding;
-import javax.xml.namespace.QName;
-
-/**
- * {@link WSDLPortType} bound with a specific binding.
- *
- * @author Vivek Pandey
- */
-public interface WSDLBoundPortType extends WSDLFeaturedObject, WSDLExtensible {
- /**
- * Gets the name of the wsdl:binding@name attribute value as local name and wsdl:definitions@targetNamespace
- * as the namespace uri.
- */
- QName getName();
-
- /**
- * Gets the {@link WSDLModel} that owns this port type.
- */
- @NotNull WSDLModel getOwner();
-
- /**
- * Gets the {@link WSDLBoundOperation} for a given operation name
- *
- * @param operationName non-null operationName
- * @return null if a {@link WSDLBoundOperation} is not found
- */
- public WSDLBoundOperation get(QName operationName);
-
- /**
- * Gets the wsdl:binding@type value, same as {@link WSDLPortType#getName()}
- */
- QName getPortTypeName();
-
- /**
- * Gets the {@link WSDLPortType} associated with the wsdl:binding
- */
- WSDLPortType getPortType();
-
- /**
- * Gets the {@link WSDLBoundOperation}s
- */
- Iterable<? extends WSDLBoundOperation> getBindingOperations();
-
- /**
- * Is this a document style or RPC style?
- *
- * Since we only support literal and not encoding, this means
- * either doc/lit or rpc/lit.
- */
- @NotNull SOAPBinding.Style getStyle();
-
- /**
- * Returns the binding ID.
- * This would typically determined by the binding extension elements in wsdl:binding.
- */
- BindingID getBindingId();
-
- /**
- * Gets the bound operation in this port for a tag name. Here the operation would be the one whose
- * input part descriptor bound to soap:body is same as the tag name except for rpclit where the tag
- * name would be {@link WSDLBoundOperation#getName()}.
- *
- * <p>
- * If you have a {@link Message} and trying to figure out which operation it belongs to,
- * always use {@link Message#getOperation}, as that performs better.
- *
- * <p>
- * For example this can be used in the case when a message receipient can get the
- * {@link WSDLBoundOperation} from the payload tag name.
- *
- * <p>
- * namespaceUri and the local name both can be null to get the WSDLBoundOperation that has empty body -
- * there is no payload. According to BP 1.1 in a port there can be at MOST one operation with empty body.
- * Its an error to have namespace URI non-null but local name as null.
- *
- * @param namespaceUri namespace of the payload element.
- * @param localName local name of the payload
- * @throws NullPointerException if localName is null and namespaceUri is not.
- * @return
- * null if no operation with the given tag name is found.
- */
- @Nullable WSDLBoundOperation getOperation(String namespaceUri, String localName);
-
- /**
- * Gets the {@link ParameterBinding} for a given operation, part name and the direction - IN/OUT
- *
- * @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.
- */
- ParameterBinding getBinding(QName operation, String part, Mode mode);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLDescriptorKind.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLDescriptorKind.java
deleted file mode 100644
index bafd976d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLDescriptorKind.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-/**
- * Enumeration that tells a wsdl:part that can be defined either using a type
- * attribute or an element attribute.
- *
- * @author Vivek Pandey
- */
-public enum WSDLDescriptorKind {
- /**
- * wsdl:part is defined using element attribute.
- *
- * <pre>
- * for exmaple,
- * &lt;wsdl:part name="foo" element="ns1:FooElement">
- * </pre>
- */
- ELEMENT(0),
-
- /**
- * wsdl:part is defined using type attribute.
- *
- * <pre>
- * for exmaple,
- * &lt;wsdl:part name="foo" element="ns1:FooType">
- * </pre>
- */
- TYPE(1);
-
- WSDLDescriptorKind(int value) {
- this.value = value;
- }
-
- private final int value;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtensible.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtensible.java
deleted file mode 100644
index eb3c8690..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtensible.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-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.
- *
- * @author Vivek Pandey
- * @author Kohsuke Kawaguchi
- */
-public interface WSDLExtensible extends WSDLObject {
- /**
- * Gets all the {@link WSDLExtension}s
- * added through {@link #addExtension(WSDLExtension)}.
- *
- * @return
- * never null.
- */
- Iterable<WSDLExtension> getExtensions();
-
- /**
- * Gets all the extensions that is assignable to the given type.
- *
- * <p>
- * This allows clients to find specific extensions in a type-safe
- * and convenient way.
- *
- * @param type
- * The type of the extension to obtain. Must not be null.
- *
- * @return
- * Can be an empty fromjava.collection but never null.
- */
- <T extends WSDLExtension> Iterable<T> getExtensions(Class<T> type);
-
- /**
- * Gets the extension that is assignable to the given type.
- *
- * <p>
- * This is just a convenient version that does
- *
- * <pre>
- * Iterator itr = getExtensions(type);
- * if(itr.hasNext()) return itr.next();
- * else return null;
- * </pre>
- *
- * @return
- * null if the extension was not found.
- */
- <T extends WSDLExtension> T getExtension(Class<T> type);
-
- /**
- * Adds a new {@link WSDLExtension}
- * to this object.
- *
- * @param extension
- * 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();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtension.java
deleted file mode 100644
index 99456ead..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtension.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import javax.xml.namespace.QName;
-
-/**
- * Represents a WSDL extensibility element or attribute.
- *
- * <p>
- * This interface can be implemented by the programs that build
- * on top of the JAX-WS RI, to hook additional information into
- * {@link WSDLModel}.
- *
- * @author Vivek Pandey
- */
-public interface WSDLExtension {
- /**
- * Gets the qualified name of the WSDL extensibility element or attribute.
- *
- * @return
- * must not be null.
- */
- public QName getName();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFault.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFault.java
deleted file mode 100644
index d2d2adb8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFault.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.model.wsdl;
-
-import com.sun.istack.internal.NotNull;
-
-import javax.xml.namespace.QName;
-
-/**
- * Abstracts wsdl:portType/wsdl:operation/wsdl:fault
- *
- * @author Vivek Pandey
- */
-public interface WSDLFault extends WSDLObject, WSDLExtensible {
- /**
- * Gives wsdl:fault@name value
- */
- String getName();
-
- /**
- * Gives the WSDLMessage corresponding to wsdl:fault@message
- * This method should not be called before the entire WSDLModel is built. Basically after the WSDLModel is built
- * all the references are resolve in a post processing phase. IOW, the WSDL extensions should
- * not call this method.
- *
- * @return Always returns null when called from inside WSDL extensions.
- */
- WSDLMessage getMessage();
-
- /**
- * Gives the owning {@link WSDLOperation}
- */
- @NotNull
- WSDLOperation getOperation();
-
- /**
- * Gives qualified name of the wsdl:fault 'name' attribute value.
- * <p/>
- *
- * The namespace uri is determined from the enclosing wsdl:operation.
- */
- @NotNull
- QName getQName();
-
- /**
- * Gives the Action Message Addressing Property value for
- * {@link WSDLFault} message.
- * <p/>
- * This method provides the correct value irrespective of
- * whether the Action is explicitly specified in the WSDL or
- * implicitly derived using the rules defined in WS-Addressing.
- *
- * @return Action
- */
- String getAction();
-
- /**
- * True if this is the default action
- * @return
- */
- public boolean isDefaultAction();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFeaturedObject.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFeaturedObject.java
deleted file mode 100644
index e87967d3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFeaturedObject.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
-
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * {@link WSDLObject} that can have features associated with it.
- *
- * <p>
- * {@link WSDLParserExtension}s can add features to this object,
- * which will then be incorporated when {@link Dispatch}s and
- * proxies are created for the port.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface WSDLFeaturedObject extends WSDLObject {
-
- @Nullable
- <F extends WebServiceFeature> F getFeature(@NotNull Class<F> featureType);
-
- /**
- * Gets the feature list associated with this object.
- */
- @NotNull WSFeatureList getFeatures();
-
- /**
- * Enables a {@link WebServiceFeature} based upon policy assertions on this port.
- * This method would be called during WSDL parsing by WS-Policy code.
- */
- void addFeature(@NotNull WebServiceFeature feature);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLInput.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLInput.java
deleted file mode 100644
index f65036e0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLInput.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.namespace.QName;
-
-/**
- * Abstraction of wsdl:portType/wsdl:operation/wsdl:input
- *
- * @author Vivek Pandey
- */
-public interface WSDLInput extends WSDLObject, WSDLExtensible {
- /**
- * Gives the wsdl:portType/wsdl:operation/wsdl:input@name
- */
- String getName();
-
- /**
- * Gives the WSDLMessage corresponding to wsdl:input@message
- * <p/>
- * This method should not be called before the entire WSDLModel is built. Basically after the WSDLModel is built
- * all the references are resolve in a post processing phase. IOW, the WSDL extensions should
- * not call this method.
- *
- * @return Always returns null when called from inside WSDL extensions.
- */
- WSDLMessage getMessage();
-
- /**
- * Gives the Action Message Addressing Property value for
- * {@link WSDLInput} message.
- * <p/>
- * This method provides the correct value irrespective of
- * whether the Action is explicitly specified in the WSDL or
- * implicitly derived using the rules defined in WS-Addressing.
- *
- * @return Action
- */
- String getAction();
-
- /**
- * Gives the owning {@link WSDLOperation}
- */
- @NotNull
- WSDLOperation getOperation();
-
- /**
- * Gives qualified name of the wsdl:input 'name' attribute value. If there is no name, then it computes the name from:
- *
- * If the wsdl:operation is oneway:
- *
- * wsdl:operation@name value, which is local name of {@link WSDLOperation#getName()}
- * <p/>
- * otherwise
- *
- * wsdl:operation@name+"Request", which is local name of {@link WSDLOperation#getName()} + "Request"
- * <p/>
- *
- * The namespace uri is determined from the enclosing wsdl:operation.
- */
- @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.
- */
- boolean isDefaultAction();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLMessage.java
deleted file mode 100644
index 46ffb9a1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLMessage.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import javax.xml.namespace.QName;
-
-/**
- * Abstraction of wsdl:message.
- *
- * @author Vivek Pandey
- */
-public interface WSDLMessage extends WSDLObject, WSDLExtensible {
- /**
- * Gives wsdl:message@name value.
- */
- QName getName();
-
- /**
- * Gets all the parts.
- */
- Iterable<? extends WSDLPart> parts();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLModel.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLModel.java
deleted file mode 100644
index 3e248535..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLModel.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.model.wsdl;
-
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
-import com.sun.xml.internal.ws.api.wsdl.parser.XMLEntityResolver;
-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;
-
-/**
- * Provides abstraction of wsdl:definitions.
- *
- * @author Vivek Pandey
- */
-public interface WSDLModel extends WSDLExtensible {
- /**
- * Gets {@link WSDLPortType} that models <code>wsdl:portType</code>
- *
- * @param name non-null quaified name of wsdl:message, where the localName is the value of <code>wsdl:portType@name</code> and
- * the namespaceURI is the value of wsdl:definitions@targetNamespace
- * @return A {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLPortType} or null if no wsdl:portType found.
- */
- WSDLPortType getPortType(@NotNull QName name);
-
- /**
- * Gets {@link WSDLBoundPortType} that models <code>wsdl:binding</code>
- *
- * @param name non-null quaified name of wsdl:binding, where the localName is the value of <code>wsdl:binding@name</code> and
- * the namespaceURI is the value of wsdl:definitions@targetNamespace
- * @return A {@link WSDLBoundPortType} or null if no wsdl:binding found
- */
- WSDLBoundPortType getBinding(@NotNull QName name);
-
- /**
- * Give a {@link WSDLBoundPortType} for the given wsdl:service and wsdl:port names.
- *
- * @param serviceName service QName
- * @param portName port QName
- * @return A {@link WSDLBoundPortType}. null if the Binding for the given wsd:service and wsdl:port name are not
- * found.
- */
- WSDLBoundPortType getBinding(@NotNull QName serviceName, @NotNull QName portName);
-
- /**
- * Gets {@link WSDLService} that models <code>wsdl:service</code>
- *
- * @param name non-null quaified name of wsdl:service, where the localName is the value of <code>wsdl:service@name</code> and
- * the namespaceURI is the value of wsdl:definitions@targetNamespace
- * @return A {@link WSDLService} or null if no wsdl:service found
- */
- WSDLService getService(@NotNull QName name);
-
- /**
- * Gives a {@link Map} of wsdl:portType {@link QName} and {@link WSDLPortType}
- *
- * @return an empty Map if the wsdl document has no wsdl:portType
- */
- @NotNull Map<QName, ? extends WSDLPortType> getPortTypes();
-
- /**
- * Gives a {@link Map} of wsdl:binding {@link QName} and {@link WSDLBoundPortType}
- *
- * @return an empty Map if the wsdl document has no wsdl:binding
- */
- @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}
- *
- * @return an empty Map if the wsdl document has no wsdl:service
- */
- @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
- *
- * @return PolicyMap
- *
- * @deprecated
- * Do not use this method as the PolicyMap API is not final yet and might change in next few months.
- */
- public PolicyMap getPolicyMap();
-
- /**
- * Main purpose of this class is to parsing of a WSDL and get the {@link WSDLModel} from it.
- */
- public class WSDLParser{
- /**
- * Parses WSDL from the given wsdlLoc and gives a {@link WSDLModel} built from it.
- *
- * @param wsdlEntityParser Works like an entityResolver to resolve WSDLs
- * @param resolver {@link XMLEntityResolver}, works at XML infoset level
- * @param isClientSide true - its invoked on the client, false means its invoked on the server
- * @param extensions var args of {@link com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension}s
- * @return A {@link WSDLModel} built from the given wsdlLocation}
- * @throws java.io.IOException
- * @throws javax.xml.stream.XMLStreamException
- * @throws org.xml.sax.SAXException
- */
- public static @NotNull WSDLModel parse(XMLEntityResolver.Parser wsdlEntityParser, XMLEntityResolver resolver, boolean isClientSide, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
- return parse(wsdlEntityParser, resolver, isClientSide, Container.NONE, extensions);
- }
-
- /**
- * Parses WSDL from the given wsdlLoc and gives a {@link WSDLModel} built from it.
- *
- * @param wsdlEntityParser Works like an entityResolver to resolve WSDLs
- * @param resolver {@link XMLEntityResolver}, works at XML infoset level
- * @param isClientSide true - its invoked on the client, false means its invoked on the server
- * @param container - container in which the parser is run
- * @param extensions var args of {@link com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension}s
- * @return A {@link WSDLModel} built from the given wsdlLocation}
- * @throws java.io.IOException
- * @throws javax.xml.stream.XMLStreamException
- * @throws org.xml.sax.SAXException
- */
- public static @NotNull WSDLModel parse(XMLEntityResolver.Parser wsdlEntityParser, XMLEntityResolver resolver, boolean isClientSide, @NotNull Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
- return parse(wsdlEntityParser, resolver, isClientSide, container, PolicyResolverFactory.create(),extensions);
- }
-
-
- /**
- * Parses WSDL from the given wsdlLoc and gives a {@link WSDLModel} built from it.
- *
- * @param wsdlEntityParser Works like an entityResolver to resolve WSDLs
- * @param resolver {@link XMLEntityResolver}, works at XML infoset level
- * @param isClientSide true - its invoked on the client, false means its invoked on the server
- * @param container - container in which the parser is run
- * @param policyResolver - PolicyResolver for resolving effective Policy
- * @param extensions var args of {@link com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension}s
- * @return A {@link WSDLModel} built from the given wsdlLocation}
- * @throws java.io.IOException
- * @throws javax.xml.stream.XMLStreamException
- * @throws org.xml.sax.SAXException
- */
- public static @NotNull WSDLModel parse(XMLEntityResolver.Parser wsdlEntityParser, XMLEntityResolver resolver, boolean isClientSide, @NotNull Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
- return RuntimeWSDLParser.parse(wsdlEntityParser, resolver, isClientSide, container, policyResolver, extensions);
- }
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLObject.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLObject.java
deleted file mode 100644
index 1fa40432..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLObject.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.istack.internal.NotNull;
-import org.xml.sax.Locator;
-
-/**
- * Marker interface serves as base interface for the wsdl model
- * @author Vivek Pandey
- */
-public interface WSDLObject {
- /**
- * Gets the source location information in the parsed WSDL.
- *
- * This is useful when producing error messages.
- */
- @NotNull
- Locator getLocation();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java
deleted file mode 100644
index 85698044..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.model.wsdl;
-
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLExtensible;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.namespace.QName;
-
-/**
- * Provides abstraction of wsdl:portType/wsdl:operation.
- *
- * @author Vivek Pandey
- */
-public interface WSDLOperation extends WSDLObject, WSDLExtensible {
- /**
- * Gets the name of the wsdl:portType/wsdl:operation@name attribute value as local name and wsdl:definitions@targetNamespace
- * as the namespace uri.
- */
- @NotNull QName getName();
-
- /**
- * Gets the wsdl:input of this operation
- */
- @NotNull WSDLInput getInput();
-
- /**
- * Gets the wsdl:output of this operation.
- *
- * @return
- * null if this is an one-way operation.
- */
- @Nullable WSDLOutput getOutput();
-
- /**
- * Returns true if this operation is an one-way operation.
- */
- boolean isOneWay();
-
- /**
- * Gets the {@link WSDLFault} corresponding to wsdl:fault of this operation.
- */
- Iterable<? extends WSDLFault> getFaults();
-
- /**
- * Gives {@link WSDLFault} for the given soap fault detail value.
- *
- * <pre>
- *
- * Given a wsdl fault:
- *
- * &lt;wsdl:message nae="faultMessage">
- * &lt;wsdl:part name="fault" element="<b>ns:myException</b>/>
- * &lt;/wsdl:message>
- *
- * &lt;wsdl:portType>
- * &lt;wsdl:operation ...>
- * &lt;wsdl:fault name="aFault" message="faultMessage"/>
- * &lt;/wsdl:operation>
- * &lt;wsdl:portType>
- *
- *
- * For example given a soap 11 soap message:
- *
- * &lt;soapenv:Fault>
- * ...
- * &lt;soapenv:detail>
- * &lt;<b>ns:myException</b>>
- * ...
- * &lt;/ns:myException>
- * &lt;/soapenv:detail>
- *
- * QName faultQName = new QName(ns, "myException");
- * WSDLFault wsdlFault = getFault(faultQName);
- *
- * The above call will return a WSDLFault that abstracts wsdl:portType/wsdl:operation/wsdl:fault.
- *
- * </pre>
- *
- * @param faultDetailName tag name of the element inside soaenv:Fault/detail/, must be non-null.
- * @return returns null if a wsdl fault corresponding to the detail entry name not found.
- */
- @Nullable WSDLFault getFault(QName faultDetailName);
-
- /**
- * Gives the enclosing wsdl:portType@name attribute value.
- */
- @NotNull QName getPortTypeName();
-
- /**
- * Returns parameter order
- * @return Parameter order
- */
- public String getParameterOrder();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOutput.java
deleted file mode 100644
index 71c9035a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOutput.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.model.wsdl;
-
-import com.sun.istack.internal.NotNull;
-
-import javax.xml.namespace.QName;
-
-/**
- * Abstraction of wsdl:portType/wsdl:operation/wsdl:output
- *
- * @author Vivek Pandey
- */
-public interface WSDLOutput extends WSDLObject, WSDLExtensible {
- /**
- * Gives the wsdl:portType/wsdl:operation/wsdl:output@name
- */
- String getName();
-
- /**
- * Gives the WSDLMessage corresponding to wsdl:output@message
- * <p/>
- * This method should not be called before the entire WSDLModel is built. Basically after the WSDLModel is built
- * all the references are resolve in a post processing phase. IOW, the WSDL extensions should
- * not call this method.
- *
- * @return Always returns null when called from inside WSDL extensions.
- */
- WSDLMessage getMessage();
-
- /**
- * Gives the Action Message Addressing Property value for
- * {@link WSDLOutput} message.
- * <p/>
- * This method provides the correct value irrespective of
- * whether the Action is explicitly specified in the WSDL or
- * implicitly derived using the rules defined in WS-Addressing.
- *
- * @return Action
- */
- String getAction();
-
- /**
- * Gives the owning {@link WSDLOperation}
- */
- @NotNull
- WSDLOperation getOperation();
-
- /**
- * Gives qualified name of the wsdl:output 'name' attribute value. If there is no name, then it computes the name from:
- *
- * wsdl:operation@name+"Response", which is local name of {@link WSDLOperation#getName()} + "Response"
- * <p/>
- *
- * The namespace uri is determined from the enclosing wsdl:operation.
- */
- @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();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPart.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPart.java
deleted file mode 100644
index 9f56156b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPart.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import com.sun.xml.internal.ws.api.model.ParameterBinding;
-
-/**
- * Abstracts wsdl:part after applying binding information from wsdl:binding.
- *
- * @author Vivek Pandey
- */
-public interface WSDLPart extends WSDLObject {
- /**
- * Gets wsdl:part@name attribute value.
- */
- String getName();
-
- /**
- * Gets the wsdl:part binding as seen thru wsdl:binding
- */
- ParameterBinding getBinding();
-
- /**
- * Index value is as the order in which the wsdl:part appears inside the input or output wsdl:message.
- * @return n where n >= 0
- */
- int getIndex();
-
- /**
- * Gives the XML Schema descriptor referenced using either wsdl:part@element or wsdl:part@type.
- */
- public WSDLPartDescriptor getDescriptor();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPartDescriptor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPartDescriptor.java
deleted file mode 100644
index 46a95682..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPartDescriptor.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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;
-
-import javax.xml.namespace.QName;
-
-/**
- * Abstracts wsdl:part descriptor that is defined using element or type attribute.
- *
- * @author Vivek Pandey
- */
-public interface WSDLPartDescriptor extends WSDLObject {
- /**
- * Gives Qualified name of the XML Schema element or type
- */
- public QName name();
-
- /**
- * Gives whether wsdl:part references a schema type or a global element.
- */
- public WSDLDescriptorKind type();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPort.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPort.java
deleted file mode 100644
index 337294b4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPort.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.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;
-
-/**
- * Abstracts wsdl:service/wsdl:port
- *
- * @author Vivek Pandey
- */
-public interface WSDLPort extends WSDLFeaturedObject, WSDLExtensible {
- /**
- * Gets wsdl:port@name attribute value as local name and wsdl:definitions@targetNamespace
- * as the namespace uri.
- */
- QName getName();
-
- /**
- * Gets {@link WSDLBoundPortType} associated with the {@link WSDLPort}.
- */
- @NotNull
- WSDLBoundPortType getBinding();
-
- /**
- * Gets endpoint address of this port.
- *
- * @return
- * always non-null.
- */
- EndpointAddress getAddress();
-
- /**
- * Gets the {@link WSDLService} that owns this port.
- *
- * @return
- * always non-null.
- */
- @NotNull
- WSDLService getOwner();
-
- /**
- * Returns endpoint reference
- * @return Endpoint reference
- */
- public @Nullable WSEndpointReference getEPR();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPortType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPortType.java
deleted file mode 100644
index 6a96b454..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPortType.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.model.wsdl;
-
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLExtensible;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
-
-import javax.xml.namespace.QName;
-
-/**
- * Abstraction of wsdl:portType.
- *
- * @author Vivek Pandey
- */
-public interface WSDLPortType extends WSDLObject, WSDLExtensible {
- /**
- * Gets the name of the wsdl:portType@name attribute value as local name and wsdl:definitions@targetNamespace
- * as the namespace uri.
- */
- public QName getName();
-
- /**
- * Gets the {@link WSDLOperation} for a given operation name
- *
- * @param operationName non-null operationName
- * @return null if a {@link WSDLOperation} is not found
- */
- public WSDLOperation get(String operationName);
-
- /**
- * Gets {@link Iterable}<{@link WSDLOperation}>
- */
- public Iterable<? extends WSDLOperation> getOperations();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLService.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLService.java
deleted file mode 100644
index 285e737e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLService.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.model.wsdl;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.namespace.QName;
-
-/**
- * Abstracts wsdl:service.
- *
- * @author Vivek Pandey
- */
-public interface WSDLService extends WSDLObject, WSDLExtensible {
- /**
- * Gets the {@link WSDLModel} that owns this service.
- */
- @NotNull
- WSDLModel getParent();
-
- /**
- * Gets the name of the wsdl:service@name attribute value as local name and wsdl:definitions@targetNamespace
- * as the namespace uri.
- */
- @NotNull
- QName getName();
-
- /**
- * Gets the {@link WSDLPort} for a given port name
- *
- * @param portName non-null operationName
- * @return null if a {@link WSDLPort} is not found
- */
- WSDLPort get(QName portName);
-
- /**
- * Gets the first {@link WSDLPort} if any, or otherwise null.
- */
- 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}
- */
- Iterable<? extends WSDLPort> getPorts();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundFault.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundFault.java
deleted file mode 100644
index f99058ec..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundFault.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-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);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundOperation.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundOperation.java
deleted file mode 100644
index 565c9d7c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundOperation.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.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);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundPortType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundPortType.java
deleted file mode 100644
index ba910bc1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundPortType.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.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();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLFault.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLFault.java
deleted file mode 100644
index e7da811a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLFault.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLInput.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLInput.java
deleted file mode 100644
index fc5d56c3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLInput.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLMessage.java
deleted file mode 100644
index f7a80860..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLMessage.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLModel.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLModel.java
deleted file mode 100644
index 7fee15a1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLModel.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOperation.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOperation.java
deleted file mode 100644
index b0536d96..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOperation.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOutput.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOutput.java
deleted file mode 100644
index 2befb505..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOutput.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPart.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPart.java
deleted file mode 100644
index 3db61950..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPart.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPort.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPort.java
deleted file mode 100644
index 6f78a56a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPort.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPortType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPortType.java
deleted file mode 100644
index 0a1d3b6b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPortType.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLService.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLService.java
deleted file mode 100644
index a162e507..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLService.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/package-info.java
deleted file mode 100644
index ec8307d0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/package-info.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * JAX-WS RI extension of JAX-WS API.
- *
- * <p>
- * This package hosts classes/interfaces that directly extend
- * the JAX-WS API. Sometimes objects of these types are passed
- * to external components from higher layers, only to be passed
- * back into other parts of the JAX-WS RI.
- * By defining these types, we improve the type-safety in
- * this scenario, while isolating the actual implementation classes.
- *
- * <p>
- * Sometimes these types also define additional methods.
- *
- * <p>
- * Types defined in package can only be implemented by the JAX-WS RI.
- * The code internal to the JAX-WS RI may safely case instances
- * of these types to their implementation classes. This warning doesn't
- * apply to subpackages.
- */
-package com.sun.xml.internal.ws.api;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientPipeAssemblerContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientPipeAssemblerContext.java
deleted file mode 100644
index 3856f92c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientPipeAssemblerContext.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.helper.PipeAdapter;
-import com.sun.xml.internal.ws.api.server.Container;
-
-import java.io.PrintStream;
-
-/**
- * Factory for well-known {@link Pipe} implementations
- * that the {@link PipelineAssembler} needs to use
- * to satisfy JAX-WS requirements.
- *
- * @author Kohsuke Kawaguchi
- * @deprecated Use {@link ClientTubeAssemblerContext}.
- */
-public final class ClientPipeAssemblerContext extends ClientTubeAssemblerContext {
-
- public ClientPipeAssemblerContext(@NotNull EndpointAddress address, @NotNull WSDLPort wsdlModel, @NotNull WSService rootOwner, @NotNull WSBinding binding) {
- this(address, wsdlModel, rootOwner, binding, Container.NONE);
- }
-
- public ClientPipeAssemblerContext(@NotNull EndpointAddress address, @NotNull WSDLPort wsdlModel,
- @NotNull WSService rootOwner, @NotNull WSBinding binding,
- @NotNull Container container) {
- super(address, wsdlModel, rootOwner, binding, container);
- }
-
- /**
- * creates a {@link Pipe} that dumps messages that pass through.
- */
- public Pipe createDumpPipe(String name, PrintStream out, Pipe next) {
- return PipeAdapter.adapt(super.createDumpTube(name, out, PipeAdapter.adapt(next)));
- }
-
- /**
- * Creates a {@link Pipe} that performs WS-Addressig processing.
- * This pipe should be before {@link com.sun.xml.internal.ws.protocol.soap.ClientMUTube}.
- */
- public Pipe createWsaPipe(Pipe next) {
- return PipeAdapter.adapt(super.createWsaTube(PipeAdapter.adapt(next)));
- }
-
- /**
- * Creates a {@link Pipe} that performs SOAP mustUnderstand processing.
- * This pipe should be before HandlerPipes.
- */
- public Pipe createClientMUPipe(Pipe next) {
- return PipeAdapter.adapt(super.createClientMUTube(PipeAdapter.adapt(next)));
- }
-
- /**
- * creates a {@link Pipe} that validates messages against schema
- */
- public Pipe createValidationPipe(Pipe next) {
- return PipeAdapter.adapt(super.createValidationTube(PipeAdapter.adapt(next)));
- }
-
- /**
- * Creates a {@link Pipe} that invokes protocol and logical handlers.
- */
- public Pipe createHandlerPipe(Pipe next) {
- return PipeAdapter.adapt(super.createHandlerTube(PipeAdapter.adapt(next)));
- }
-
- /**
- * Creates a {@link Tube} that adds container specific security
- */
- public @NotNull Pipe createSecurityPipe(@NotNull Pipe next) {
- return PipeAdapter.adapt(super.createSecurityTube(PipeAdapter.adapt(next)));
- }
-
- /**
- * Creates a transport pipe (for client), which becomes the terminal pipe.
- */
- public Pipe createTransportPipe() {
- return PipeAdapter.adapt(super.createTransportTube());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientTubeAssemblerContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientTubeAssemblerContext.java
deleted file mode 100644
index 2586f467..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientTubeAssemblerContext.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.addressing.W3CWsaClientTube;
-import com.sun.xml.internal.ws.addressing.v200408.MemberSubmissionWsaClientTube;
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.client.ClientPipelineHook;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.helper.PipeAdapter;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.ClientSchemaValidationTube;
-import com.sun.xml.internal.ws.developer.SchemaValidationFeature;
-import com.sun.xml.internal.ws.developer.WSBindingProvider;
-import com.sun.xml.internal.ws.handler.ClientLogicalHandlerTube;
-import com.sun.xml.internal.ws.handler.ClientMessageHandlerTube;
-import com.sun.xml.internal.ws.handler.ClientSOAPHandlerTube;
-import com.sun.xml.internal.ws.handler.HandlerTube;
-import com.sun.xml.internal.ws.protocol.soap.ClientMUTube;
-import com.sun.xml.internal.ws.transport.DeferredTransportPipe;
-import com.sun.xml.internal.ws.util.pipe.DumpTube;
-
-import javax.xml.ws.soap.SOAPBinding;
-import java.io.PrintStream;
-
-/**
- * Factory for well-known {@link Tube} implementations
- * that the {@link TubelineAssembler} needs to use
- * to satisfy JAX-WS requirements.
- *
- * @author Jitendra Kotamraju
- */
-public class ClientTubeAssemblerContext {
-
- private final @NotNull EndpointAddress address;
- private final @Nullable WSDLPort wsdlModel;
- private final @Nullable SEIModel seiModel;
- private final @Nullable Class sei;
- private final @NotNull WSService rootOwner;
- private final @NotNull WSBinding binding;
- private final @NotNull Container container;
- private @NotNull Codec codec;
-
- //Nullable only to maintain comaptibility with old constructors of this class.
- private final @Nullable WSBindingProvider bindingProvider;
-
- /**
- * This constructor should be used only by JAX-WS Runtime and is not meant for external consumption.
- * @deprecated
- * Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSService, WSBindingProvider, WSBinding, Container, Codec, SEIModel, Class)}
- */
- public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel, @NotNull WSService rootOwner, @NotNull WSBinding binding) {
- this(address, wsdlModel, rootOwner, binding, Container.NONE);
- }
-
- /**
- * This constructor should be used only by JAX-WS Runtime and is not meant for external consumption.
- * @deprecated
- * Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSService, WSBindingProvider, WSBinding, Container, Codec, SEIModel, Class)}
- */
- public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel,
- @NotNull WSService rootOwner, @NotNull WSBinding binding,
- @NotNull Container container) {
- // WSBinding is actually BindingImpl
- this(address, wsdlModel, rootOwner, binding, container, ((BindingImpl)binding).createCodec() );
- }
-
- /**
- * This constructor should be used only by JAX-WS Runtime and is not meant for external consumption.
- * @deprecated
- * Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSService, WSBindingProvider, WSBinding, Container, Codec, SEIModel, Class)}
- */
- public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel,
- @NotNull WSService rootOwner, @NotNull WSBinding binding,
- @NotNull Container container, Codec codec) {
- this(address, wsdlModel, rootOwner, binding, container, codec, null, null);
- }
-
- /**
- * This constructor should be used only by JAX-WS Runtime and is not meant for external consumption.
- * @deprecated
- * Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSService, WSBindingProvider, WSBinding, Container, Codec, SEIModel, Class)}
- */
- public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel,
- @NotNull WSService rootOwner, @NotNull WSBinding binding,
- @NotNull Container container, Codec codec, SEIModel seiModel, Class sei) {
- this(address, wsdlModel, rootOwner, null/* no info on which port it is, so pass null*/, binding, container, codec, seiModel, sei);
- }
-
- /**
- * This constructor should be used only by JAX-WS Runtime and is not meant for external consumption.
- *
- * @since JAX-WS 2.2
- */
- public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel,
- @NotNull WSBindingProvider bindingProvider, @NotNull WSBinding binding,
- @NotNull Container container, Codec codec, SEIModel seiModel, Class sei) {
- this(address, wsdlModel, (bindingProvider==null? null: bindingProvider.getPortInfo().getOwner()), bindingProvider, binding, container, codec, seiModel, sei);
-
- }
-
- //common constructor
- //WSService is null, when ClientTubeAssemblerContext is created for sending non-anonymous responses.
- private ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel,
- @Nullable WSService rootOwner, @Nullable WSBindingProvider bindingProvider, @NotNull WSBinding binding,
- @NotNull Container container, Codec codec, SEIModel seiModel, Class sei) {
- this.address = address;
- this.wsdlModel = wsdlModel;
- this.rootOwner = rootOwner;
- this.bindingProvider = bindingProvider;
- this.binding = binding;
- this.container = container;
- this.codec = codec;
- this.seiModel = seiModel;
- this.sei = sei;
- }
-
- /**
- * The endpoint address. Always non-null. This parameter is taken separately
- * from {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLPort} (even though there's {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLPort#getAddress()})
- * because sometimes WSDL is not available.
- */
- public @NotNull EndpointAddress getAddress() {
- return address;
- }
-
- /**
- * The created pipeline will be used to serve this port.
- * Null if the service isn't associated with any port definition in WSDL,
- * and otherwise non-null.
- */
- public @Nullable WSDLPort getWsdlModel() {
- return wsdlModel;
- }
-
- /**
- * The pipeline is created for this {@link com.sun.xml.internal.ws.api.WSService}.
- * Always non-null. (To be precise, the newly created pipeline
- * is owned by a proxy or a dispatch created from thsi {@link com.sun.xml.internal.ws.api.WSService}.)
- */
- public @NotNull WSService getService() {
- return rootOwner;
- }
-
- /**
- * The pipeline is created for this {@link com.sun.xml.internal.ws.api.client.WSPortInfo}.
- * Nullable incase of backwards compatible usages of this class.
- */
- public @Nullable WSPortInfo getPortInfo() {
- return bindingProvider == null? null: bindingProvider.getPortInfo();
- }
-
-
- /**
- * The pipeline is created for this {@link WSBindingProvider}.
- * Nullable incase of backwards compatible usages of this class.
- */
- public @Nullable WSBindingProvider getBindingProvider() {
- return bindingProvider;
- }
-
- /**
- * The binding of the new pipeline to be created.
- */
- public @NotNull WSBinding getBinding() {
- return binding;
- }
-
- /**
- * The created pipeline will use seiModel to get java concepts for the endpoint
- *
- * @return Null if the service doesn't have SEI model e.g. Dispatch,
- * and otherwise non-null.
- */
- public @Nullable SEIModel getSEIModel() {
- return seiModel;
- }
-
- /**
- * The SEI class for the endpoint
- *
- * @return Null if the service doesn't have SEI model e.g. Dispatch,
- * and otherwise non-null.
- */
- public @Nullable Class getSEI() {
- return sei;
- }
-
- /**
- * Returns the Container in which the client is running
- *
- * @return Container in which client is running
- */
- public Container getContainer() {
- return container;
- }
-
- /**
- * creates a {@link Tube} that dumps messages that pass through.
- */
- public Tube createDumpTube(String name, PrintStream out, Tube next) {
- return new DumpTube(name, out, next);
- }
-
- /**
- * Creates a {@link Tube} that adds container specific security
- */
- public @NotNull Tube createSecurityTube(@NotNull Tube next) {
- ClientPipelineHook hook = container.getSPI(ClientPipelineHook.class);
- if (hook != null) {
- ClientPipeAssemblerContext ctxt = new ClientPipeAssemblerContext(address, wsdlModel,
- rootOwner, binding, container);
- return PipeAdapter.adapt(hook.createSecurityPipe(ctxt, PipeAdapter.adapt(next)));
- }
- return next;
- }
-
- /**
- * Creates a {@link Tube} that invokes protocol and logical handlers.
- */
- public Tube createWsaTube(Tube next) {
- if (binding instanceof SOAPBinding && AddressingVersion.isEnabled(binding) && wsdlModel!=null)
- if(AddressingVersion.fromBinding(binding) == AddressingVersion.MEMBER) {
- return new MemberSubmissionWsaClientTube(wsdlModel, binding, next);
- } else {
- return new W3CWsaClientTube(wsdlModel, binding, next);
- }
- else
- return next;
- }
-
- /**
- * Creates a {@link Tube} that invokes protocol and logical handlers.
- */
- public Tube createHandlerTube(Tube next) {
- HandlerTube cousinHandlerTube = null;
- //XML/HTTP Binding can have only LogicalHandlerPipe
- if (binding instanceof SOAPBinding) {
- //Add MessageHandlerTube
- HandlerTube messageHandlerTube = new ClientMessageHandlerTube(seiModel, binding, wsdlModel, next);
- next = cousinHandlerTube = messageHandlerTube;
-
- //Add SOAPHandlerTuber
- HandlerTube soapHandlerTube = new ClientSOAPHandlerTube(binding, next, cousinHandlerTube);
- next = cousinHandlerTube = soapHandlerTube;
- }
- return new ClientLogicalHandlerTube(binding, seiModel, next, cousinHandlerTube);
- }
-
- /**
- * Creates a {@link Tube} that performs SOAP mustUnderstand processing.
- * This pipe should be before HandlerPipes.
- */
- public Tube createClientMUTube(Tube next) {
- if(binding instanceof SOAPBinding)
- return new ClientMUTube(binding,next);
- else
- return next;
- }
-
- /**
- * creates a {@link Tube} that validates messages against schema
- */
- public Tube createValidationTube(Tube next) {
- if (binding instanceof SOAPBinding && binding.isFeatureEnabled(SchemaValidationFeature.class) && wsdlModel!=null)
- return new ClientSchemaValidationTube(binding, wsdlModel, next);
- else
- return next;
- }
-
- /**
- * Creates a transport pipe (for client), which becomes the terminal pipe.
- */
- public Tube createTransportTube() {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
-
- // The application may configure the endpoint address through request context
- // using {@link BindingProvider#ENDPOINT_ADDRESS_PROPERTY}. Let us
- // defer the creation of actual transport until the service invocation,
- // DeferredTransportPipe is used for this purpose.
- return new DeferredTransportPipe(cl,this);
- }
-
- /**
- * Gets the {@link Codec} that is set by {@link #setCodec} or the default codec
- * based on the binding.
- *
- * @return codec to be used for web service requests
- */
- public @NotNull Codec getCodec() {
- return codec;
- }
-
- /**
- * Interception point to change {@link Codec} during {@link Tube}line assembly. The
- * new codec will be used by jax-ws client runtime for encoding/decoding web service
- * request/response messages. The new codec should be used by the transport tubes.
- *
- * <p>
- * the codec should correctly implement {@link Codec#copy} since it is used while
- * serving requests concurrently.
- *
- * @param codec codec to be used for web service requests
- */
- public void setCodec(@NotNull Codec codec) {
- this.codec = codec;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codec.java
deleted file mode 100644
index f9abc4fa..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codec.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.pipe;
-
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.server.EndpointAwareCodec;
-
-import javax.xml.stream.XMLStreamWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.ByteBuffer;
-import java.nio.channels.ReadableByteChannel;
-import java.nio.channels.WritableByteChannel;
-
-/**
- * Encodes a {@link Message} (its XML infoset and attachments) to a sequence of bytes.
- *
- * <p>
- * This interface provides pluggability for different ways of encoding XML infoset,
- * such as plain XML (plus MIME attachments), XOP, and FastInfoset.
- *
- * <p>
- * Transport usually needs a MIME content type of the encoding, so the {@link Codec}
- * interface is designed to return this information. However, for some encoding
- * (such as XOP), the encoding may actually change based on the actual content of
- * {@link Message}, therefore the codec returns the content type as a result of encoding.
- *
- * <p>
- * {@link Codec} does not produce transport-specific information, such as HTTP headers.
- *
- * <p>
- * {@link Codec} implementations should be thread-safe; a codec instance could be used
- * concurrently in multiple threads. If a codec have to generate or use a per-request
- * state, the codec implementation must store the state in the Packet instead of using an
- * instance variable of the codec implementation.
- *
- * <p>
- * {@link BindingID} determines the {@link Codec}. See {@link BindingID#createEncoder(WSBinding)}.
- *
- * @author Kohsuke Kawaguchi
- * @author shih-chang.chen@oracle.com
- *
- * @see EndpointAwareCodec
- */
-public interface Codec {
-
- /**
- * Get the MIME type associated with this Codec.
- * <p>
- * If available the MIME type will represent the media that the codec
- * encodes and decodes.
- *
- * The MIME type returned will be the most general representation independent
- * of an instance of this MIME type utilized as a MIME content-type.
- *
- * @return
- * null if the MIME type can't be determined by the <code>Codec</code>
- * implementation. Otherwise the MIME type is returned.
- */
- public String getMimeType();
-
- /**
- * If the MIME content-type of the encoding is known statically
- * then this method returns it.
- *
- * <p>
- * Transports often need to write the content type before it writes
- * the message body, and since the encode method returns the content type
- * after the body is written, it requires a buffering.
- *
- * For those {@link Codec}s that always use a constant content type,
- * This method allows a transport to streamline the write operation.
- *
- * @return
- * null if the content-type can't be determined in short of
- * encodin the packet. Otherwise content type for this {@link Packet},
- * such as "application/xml".
- */
- ContentType getStaticContentType(Packet packet);
-
- /**
- * Encodes an XML infoset portion of the {@link Message}
- * (from &lt;soap:Envelope> to &lt;/soap:Envelope>).
- *
- * <p>
- * Internally, this method is most likely invoke {@link Message#writeTo(XMLStreamWriter)}
- * to turn the message into infoset.
- *
- * @param packet
- * @param out
- * Must not be null. The caller is responsible for closing the stream,
- * not the callee.
- *
- * @return
- * The MIME content type of the encoded message (such as "application/xml").
- * This information is often ncessary by transport.
- *
- * @throws IOException
- * if a {@link OutputStream} throws {@link IOException}.
- */
- ContentType encode( Packet packet, OutputStream out ) throws IOException;
-
- /**
- * The version of {@link #encode(Packet,OutputStream)}
- * that writes to NIO {@link ByteBuffer}.
- *
- * <p>
- * TODO: for the convenience of implementation, write
- * an adapter that wraps {@link WritableByteChannel} to {@link OutputStream}.
- */
- ContentType encode( Packet packet, WritableByteChannel buffer );
-
- /*
- * The following methods need to be documented and implemented.
- *
- * Such methods will be used by a client side
- * transport pipe that implements the ClientEdgePipe.
- *
- String encode( InputStreamMessage message, OutputStream out ) throws IOException;
- String encode( InputStreamMessage message, WritableByteChannel buffer );
- */
-
- /**
- * Creates a copy of this {@link Codec}.
- *
- * <p>
- * Since {@link Codec} instance is not re-entrant, the caller
- * who needs to encode two {@link Message}s simultaneously will
- * want to have two {@link Codec} instances. That's what this
- * method produces.
- *
- * <h3>Implentation Note</h3>
- * <p>
- * Note that this method might be invoked by one thread while
- * another thread is executing one of the {@link #encode} methods.
- * <!-- or otherwise you'd always have to maintain one idle copy -->
- * <!-- just so that you can make copies from -->
- * This should be OK because you'll be only copying things that
- * are thread-safe, and creating new ones for thread-unsafe resources,
- * but please let us know if this contract is difficult.
- *
- * @return
- * always non-null valid {@link Codec} that performs
- * the encoding work in the same way --- that is, if you
- * copy an FI codec, you'll get another FI codec.
- *
- * <p>
- * Once copied, two {@link Codec}s may be invoked from
- * two threads concurrently; therefore, they must not share
- * any state that requires isolation (such as temporary buffer.)
- *
- * <p>
- * If the {@link Codec} implementation is already
- * re-entrant and multi-thread safe to begin with,
- * then this method may simply return <tt>this</tt>.
- */
- Codec copy();
-
- /**
- * Reads bytes from {@link InputStream} and constructs a {@link Message}.
- *
- * <p>
- * The design encourages lazy decoding of a {@link Message}, where
- * a {@link Message} is returned even before the whole message is parsed,
- * and additional parsing is done as the {@link Message} body is read along.
- * A {@link Codec} is most likely have its own implementation of {@link Message}
- * for this purpose.
- *
- * @param in
- * the data to be read into a {@link Message}. The transport would have
- * read any transport-specific header before it passes an {@link InputStream},
- * and {@link InputStream} is expected to be read until EOS. Never null.
- *
- * <p>
- * Some transports, such as SMTP, may 'encode' data into another format
- * (such as uuencode, base64, etc.) It is the caller's responsibility to
- * 'decode' these transport-level encoding before it passes data into
- * {@link Codec}.
- *
- * @param contentType
- * The MIME content type (like "application/xml") of this byte stream.
- * Thie text includes all the sub-headers of the content-type header. Therefore,
- * in more complex case, this could be something like
- * <tt>multipart/related; boundary="--=_outer_boundary"; type="multipart/alternative"</tt>.
- * This parameter must not be null.
- *
- * @param response
- * The parsed {@link Message} will be set to this {@link Packet}.
- * {@link Codec} may add additional properties to this {@link Packet}.
- * On a successful method completion, a {@link Packet} must contain a
- * {@link Message}.
- *
- * @throws IOException
- * if {@link InputStream} throws an exception.
- */
- void decode( InputStream in, String contentType, Packet response ) throws IOException;
-
- /**
- *
- * @see #decode(InputStream, String, Packet)
- */
- void decode( ReadableByteChannel in, String contentType, Packet response );
-
- /*
- * The following methods need to be documented and implemented.
- *
- * Such methods will be used by a server side
- * transport pipe that can support the invocation of methods on a
- * ServerEdgePipe.
- *
- XMLStreamReaderMessage decode( InputStream in, String contentType ) throws IOException;
- XMLStreamReaderMessage decode( ReadableByteChannel in, String contentType );
- */
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codecs.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codecs.java
deleted file mode 100644
index e06694c4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codecs.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-
-/**
- * Factory methods for some of the {@link Codec} implementations.
- *
- * <p>
- * This class provides methods to create codecs for SOAP/HTTP binding.
- * It allows to replace default SOAP envelope(primary part in MIME message)
- * codec in the whole Codec.
- *
- * <p>
- * This is a part of the JAX-WS RI internal API so that
- * {@link Tube} and transport implementations can reuse the implementations
- * done inside the JAX-WS.
- *
- * @author Jitendra Kotamraju
- * @author Kohsuke Kawaguchi
- */
-public abstract class Codecs {
-
- /**
- * This creates a full {@link Codec} for SOAP binding.
- *
- * @param feature the WebServiceFeature objects
- * @return non null codec to parse entire SOAP message(including MIME parts)
- */
- public static @NotNull SOAPBindingCodec createSOAPBindingCodec(WSFeatureList feature) {
- return new com.sun.xml.internal.ws.encoding.SOAPBindingCodec(feature);
- }
-
- /**
- * This creates a full {@link Codec} for XML binding.
- *
- * @param feature the WebServiceFeature objects
- * @return non null codec to parse entire XML message.
- */
- public static @NotNull Codec createXMLCodec(WSFeatureList feature) {
- return new com.sun.xml.internal.ws.encoding.XMLHTTPBindingCodec(feature);
- }
-
-
- /**
- * This creates a full {@link Codec} for SOAP binding using the primary
- * XML codec argument. The codec argument is used to encode/decode SOAP envelopes
- * while the returned codec is responsible for encoding/decoding the whole
- * message.
- *
- * <p>
- * Creates codecs can be set during the {@link Tube}line assembly process.
- *
- * @see ServerTubeAssemblerContext#setCodec(Codec)
- * @see ClientTubeAssemblerContext#setCodec(Codec)
- *
- * @param binding binding of the webservice
- * @param xmlEnvelopeCodec SOAP envelope codec
- * @return non null codec to parse entire SOAP message(including MIME parts)
- */
- public static @NotNull SOAPBindingCodec createSOAPBindingCodec(WSBinding binding, StreamSOAPCodec xmlEnvelopeCodec) {
- return new com.sun.xml.internal.ws.encoding.SOAPBindingCodec(binding.getFeatures(), xmlEnvelopeCodec);
- }
-
- /**
- * Creates a default {@link Codec} that can be used to used to
- * decode XML infoset in SOAP envelope(primary part in MIME message). New codecs
- * can be written using this codec as delegate.
- *
- * @param version SOAP version of the binding
- * @return non null default xml codec
- */
- public static @NotNull
- StreamSOAPCodec createSOAPEnvelopeXmlCodec(@NotNull SOAPVersion version) {
- return com.sun.xml.internal.ws.encoding.StreamSOAPCodec.create(version);
- }
-
- /**
- * Creates a default {@link Codec} that can be used to used to
- * decode XML infoset in SOAP envelope(primary part in MIME message).
- * New codecs can be written using this codec as delegate. WSBinding
- * parameter is used to get SOAP version and features.
- *
- * @param binding SOAP version and features are used from this binding
- * @return non null default xml codec
- *
- * @deprecated use {@link #createSOAPEnvelopeXmlCodec(WSFeatureList)}
- */
- public static @NotNull StreamSOAPCodec createSOAPEnvelopeXmlCodec(@NotNull WSBinding binding) {
- return com.sun.xml.internal.ws.encoding.StreamSOAPCodec.create(binding);
- }
-
- /**
- * Creates a default {@link Codec} that can be used to used to
- * decode XML infoset in SOAP envelope(primary part in MIME message).
- * New codecs can be written using this codec as delegate. WSFeatureList
- * parameter is used to get SOAP version and features.
- *
- * @param features SOAP version and features are used from this WSFeatureList
- * @return non null default xml codec
- */
- public static @NotNull StreamSOAPCodec createSOAPEnvelopeXmlCodec(@NotNull WSFeatureList features) {
- return com.sun.xml.internal.ws.encoding.StreamSOAPCodec.create(features);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ContentType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ContentType.java
deleted file mode 100644
index eccbae63..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ContentType.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-/**
- * A Content-Type transport header that will be returned by {@link Codec#encode(com.sun.xml.internal.ws.api.message.Packet, java.io.OutputStream)}.
- * It will provide the Content-Type header and also take care of SOAP 1.1 SOAPAction header.
- *
- * @see com.oracle.webservices.internal.api.message.ContentType
- * TODO: rename to ContentMetadata?
- *
- * @author Vivek Pandey
- */
-public interface ContentType extends com.oracle.webservices.internal.api.message.ContentType {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Engine.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Engine.java
deleted file mode 100644
index 724b86c4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Engine.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import java.util.concurrent.Executor;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.ContainerResolver;
-
-/**
- * Collection of {@link Fiber}s.
- * Owns an {@link Executor} to run them.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public class Engine {
- private volatile Executor threadPool;
- public final String id;
- private final Container container;
-
- String getId() { return id; }
- Container getContainer() { return container; }
- Executor getExecutor() { return threadPool; }
-
- public Engine(String id, Executor threadPool) {
- this(id, ContainerResolver.getDefault().getContainer(), threadPool);
- }
-
- public Engine(String id, Container container, Executor threadPool) {
- this(id, container);
- this.threadPool = threadPool != null ? wrap(threadPool) : null;
- }
-
- public Engine(String id) {
- this(id, ContainerResolver.getDefault().getContainer());
- }
-
- public Engine(String id, Container container) {
- this.id = id;
- this.container = container;
- }
-
- public void setExecutor(Executor threadPool) {
- this.threadPool = threadPool != null ? wrap(threadPool) : null;
- }
-
- void addRunnable(Fiber fiber) {
- if(threadPool==null) {
- synchronized(this) {
- threadPool = wrap(Executors.newCachedThreadPool(new DaemonThreadFactory()));
- }
- }
- threadPool.execute(fiber);
- }
-
- private Executor wrap(Executor ex) {
- return ContainerResolver.getDefault().wrapExecutor(container, ex);
- }
-
- /**
- * Creates a new fiber in a suspended state.
- *
- * <p>
- * To start the returned fiber, call {@link Fiber#start(Tube,Packet,Fiber.CompletionCallback)}.
- * It will start executing the given {@link Tube} with the given {@link Packet}.
- *
- * @return new Fiber
- */
- public Fiber createFiber() {
- return new Fiber(this);
- }
-
- private static class DaemonThreadFactory implements ThreadFactory {
- static final AtomicInteger poolNumber = new AtomicInteger(1);
- final AtomicInteger threadNumber = new AtomicInteger(1);
- final String namePrefix;
-
- DaemonThreadFactory() {
- namePrefix = "jaxws-engine-" + poolNumber.getAndIncrement() + "-thread-";
- }
-
- public Thread newThread(Runnable r) {
- Thread t = new Thread(null, r, namePrefix + threadNumber.getAndIncrement(), 0);
- if (!t.isDaemon()) {
- t.setDaemon(true);
- }
- if (t.getPriority() != Thread.NORM_PRIORITY) {
- t.setPriority(Thread.NORM_PRIORITY);
- }
- return t;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Fiber.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Fiber.java
deleted file mode 100644
index 516da56c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Fiber.java
+++ /dev/null
@@ -1,1414 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.pipe;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.Cancelable;
-import com.sun.xml.internal.ws.api.Component;
-import com.sun.xml.internal.ws.api.ComponentRegistry;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.message.AddressingUtils;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractTubeImpl;
-import com.sun.xml.internal.ws.api.server.Adapter;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.ContainerResolver;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.ReentrantLock;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.ws.Holder;
-import javax.xml.ws.WebServiceException;
-
-/**
- * User-level thread&#x2E; Represents the execution of one request/response processing.
- * <p/>
- * <p/>
- * JAX-WS RI is capable of running a large number of request/response concurrently by
- * using a relatively small number of threads. This is made possible by utilizing
- * a {@link Fiber} &mdash; a user-level thread that gets created for each request/response
- * processing.
- * <p/>
- * <p/>
- * A fiber remembers where in the pipeline the processing is at, what needs to be
- * executed on the way out (when processing response), and other additional information
- * specific to the execution of a particular request/response.
- * <p/>
- * <h2>Suspend/Resume</h2>
- * <p/>
- * Fiber can be {@link NextAction#suspend() suspended} by a {@link Tube}.
- * When a fiber is suspended, it will be kept on the side until it is
- * {@link #resume(Packet) resumed}. This allows threads to go execute
- * other runnable fibers, allowing efficient utilization of smaller number of
- * threads.
- * <p/>
- * <h2>Context-switch Interception</h2>
- * <p/>
- * {@link FiberContextSwitchInterceptor} allows {@link Tube}s and {@link Adapter}s
- * to perform additional processing every time a thread starts running a fiber
- * and stops running it.
- * <p/>
- * <h2>Context ClassLoader</h2>
- * <p/>
- * Just like thread, a fiber has a context class loader (CCL.) A fiber's CCL
- * becomes the thread's CCL when it's executing the fiber. The original CCL
- * of the thread will be restored when the thread leaves the fiber execution.
- * <p/>
- * <p/>
- * <h2>Debugging Aid</h2>
- * <p/>
- * Because {@link Fiber} doesn't keep much in the call stack, and instead use
- * {@link #conts} to store the continuation, debugging fiber related activities
- * could be harder.
- * <p/>
- * <p/>
- * Setting the {@link #LOGGER} for FINE would give you basic start/stop/resume/suspend
- * level logging. Using FINER would cause more detailed logging, which includes
- * what tubes are executed in what order and how they behaved.
- * <p/>
- * <p/>
- * When you debug the server side, consider setting {@link Fiber#serializeExecution}
- * to true, so that execution of fibers are serialized. Debugging a server
- * with more than one running threads is very tricky, and this switch will
- * prevent that. This can be also enabled by setting the system property on.
- * See the source code.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public final class Fiber implements Runnable, Cancelable, ComponentRegistry {
-
- /**
- * Callback interface for notification of suspend and resume.
- *
- * @since 2.2.6
- * @deprecated Use {@link NextAction#suspend(Runnable)}
- */
- public interface Listener {
- /**
- * Fiber has been suspended. Implementations of this callback may resume the Fiber.
- * @param fiber Fiber
- */
- public void fiberSuspended(Fiber fiber);
-
- /**
- * Fiber has been resumed. Behavior is undefined if implementations of this callback attempt to suspend the Fiber.
- * @param fiber Fiber
- */
- public void fiberResumed(Fiber fiber);
- }
-
- private final List<Listener> _listeners = new ArrayList<Listener>();
-
- /**
- * Adds suspend/resume callback listener
- * @param listener Listener
- * @since 2.2.6
- * @deprecated
- */
- public void addListener(Listener listener) {
- synchronized(_listeners) {
- if (!_listeners.contains(listener)) {
- _listeners.add(listener);
- }
- }
- }
-
- /**
- * Removes suspend/resume callback listener
- * @param listener Listener
- * @since 2.2.6
- * @deprecated
- */
- public void removeListener(Listener listener) {
- synchronized(_listeners) {
- _listeners.remove(listener);
- }
- }
-
- List<Listener> getCurrentListeners() {
- synchronized(_listeners) {
- return new ArrayList<Listener>(_listeners);
- }
- }
-
- private void clearListeners() {
- synchronized(_listeners) {
- _listeners.clear();
- }
- }
-
- /**
- * {@link Tube}s whose {@link Tube#processResponse(Packet)} method needs
- * to be invoked on the way back.
- */
- private Tube[] conts = new Tube[16];
- private int contsSize;
-
- /**
- * If this field is non-null, the next instruction to execute is
- * to call its {@link Tube#processRequest(Packet)}. Otherwise
- * the instruction is to call {@link #conts}.
- */
- private Tube next;
-
- private Packet packet;
-
- private Throwable/*but really it's either RuntimeException or Error*/ throwable;
-
- public final Engine owner;
-
- /**
- * Is this thread suspended? 0=not suspended, 1=suspended.
- * <p/>
- * <p/>
- * Logically this is just a boolean, but we need to prepare for the case
- * where the thread is {@link #resume(Packet) resumed} before we get to the {@link #suspend()}.
- * This happens when things happen in the following order:
- * <p/>
- * <ol>
- * <li>Tube decides that the fiber needs to be suspended to wait for the external event.
- * <li>Tube hooks up fiber with some external mechanism (like NIO channel selector)
- * <li>Tube returns with {@link NextAction#suspend()}.
- * <li>"External mechanism" becomes signal state and invokes {@link Fiber#resume(Packet)}
- * to wake up fiber
- * <li>{@link Fiber#doRun} invokes {@link Fiber#suspend()}.
- * </ol>
- * <p/>
- * <p/>
- * Using int, this will work OK because {@link #suspendedCount} becomes -1 when
- * {@link #resume(Packet)} occurs before {@link #suspend()}.
- * <p/>
- * <p/>
- * Increment and decrement is guarded by 'this' object.
- */
- private volatile int suspendedCount = 0;
-
- private volatile boolean isInsideSuspendCallbacks = false;
-
- /**
- * Is this {@link Fiber} currently running in the synchronous mode?
- */
- private boolean synchronous;
-
- private boolean interrupted;
-
- private final int id;
-
- /**
- * Active {@link FiberContextSwitchInterceptor}s for this fiber.
- */
- private List<FiberContextSwitchInterceptor> interceptors;
-
- /**
- * Fiber's context {@link ClassLoader}.
- */
- private
- @Nullable
- ClassLoader contextClassLoader;
-
- private
- @Nullable
- CompletionCallback completionCallback;
-
- private boolean isDeliverThrowableInPacket = false;
-
- public void setDeliverThrowableInPacket(boolean isDeliverThrowableInPacket) {
- this.isDeliverThrowableInPacket = isDeliverThrowableInPacket;
- }
-
- /**
- * The thread on which this Fiber is currently executing, if applicable.
- */
- private Thread currentThread;
-
- /**
- * Replace uses of synchronized(this) with this lock so that we can control
- * unlocking for resume use cases
- */
- private final ReentrantLock lock = new ReentrantLock();
- private final Condition condition = lock.newCondition();
-
- private volatile boolean isCanceled;
-
- /**
- * Set to true if this fiber is started asynchronously, to avoid
- * doubly-invoking completion code.
- */
- private boolean started;
-
- /**
- * Set to true if this fiber is started sync but allowed to run async.
- * This property exists for use cases where the processing model is fundamentally async
- * but some requirement or feature mandates that part of the tubeline run synchronously. For
- * instance, WS-ReliableMessaging with non-anonymous addressing is compatible with running
- * asynchronously, but if in-order message delivery is used then message processing must assign
- * a message number before the remainder of the processing can be asynchronous.
- */
- private boolean startedSync;
-
- /**
- * Callback to be invoked when a {@link Fiber} finishes execution.
- */
- public interface CompletionCallback {
- /**
- * Indicates that the fiber has finished its execution.
- * <p/>
- * <p/>
- * Since the JAX-WS RI runs asynchronously,
- * this method maybe invoked by a different thread
- * than any of the threads that started it or run a part of tubeline.
- */
- void onCompletion(@NotNull Packet response);
-
- /**
- * Indicates that the fiber has finished abnormally, by throwing a given {@link Throwable}.
- */
- void onCompletion(@NotNull Throwable error);
- }
-
- Fiber(Engine engine) {
- this.owner = engine;
- id = iotaGen.incrementAndGet();
- if (isTraceEnabled()) {
- LOGGER.log(Level.FINE, "{0} created", getName());
- }
-
- // if this is run from another fiber, then we naturally inherit its context classloader,
- // so this code works for fiber->fiber inheritance just fine.
- contextClassLoader = Thread.currentThread().getContextClassLoader();
- }
-
- /**
- * Starts the execution of this fiber asynchronously.
- * <p/>
- * <p/>
- * This method works like {@link Thread#start()}.
- *
- * @param tubeline The first tube of the tubeline that will act on the packet.
- * @param request The request packet to be passed to <tt>startPoint.processRequest()</tt>.
- * @param completionCallback The callback to be invoked when the processing is finished and the
- * final response packet is available.
- * @see #runSync(Tube, Packet)
- */
- public void start(@NotNull Tube tubeline, @NotNull Packet request, @Nullable CompletionCallback completionCallback) {
- start(tubeline, request, completionCallback, false);
- }
-
- private void dumpFiberContext(String desc) {
- if(isTraceEnabled()) {
- String action = null;
- String msgId = null;
- if (packet != null) {
- for (SOAPVersion sv: SOAPVersion.values()) {
- for (AddressingVersion av: AddressingVersion.values()) {
- action = packet.getMessage() != null ? AddressingUtils.getAction(packet.getMessage().getHeaders(), av, sv) : null;
- msgId = packet.getMessage() != null ? AddressingUtils.getMessageID(packet.getMessage().getHeaders(), av, sv) : null;
- if (action != null || msgId != null) {
- break;
- }
- }
- if (action != null || msgId != null) {
- break;
- }
- }
- }
- String actionAndMsgDesc;
- if (action == null && msgId == null) {
- actionAndMsgDesc = "NO ACTION or MSG ID";
- } else {
- actionAndMsgDesc = "'" + action + "' and msgId '" + msgId + "'";
- }
-
- String tubeDesc;
- if (next != null) {
- tubeDesc = next.toString() + ".processRequest()";
- } else {
- tubeDesc = peekCont() + ".processResponse()";
- }
-
- LOGGER.log(Level.FINE, "{0} {1} with {2} and ''current'' tube {3} from thread {4} with Packet: {5}", new Object[]{getName(), desc, actionAndMsgDesc, tubeDesc, Thread.currentThread().getName(), packet != null ? packet.toShortString() : null});
- }
- }
-
- /**
- * Starts the execution of this fiber.
- *
- * If forceSync is true, then the fiber is started for an ostensibly async invocation,
- * but allows for some portion of the tubeline to run sync with the calling
- * client instance (Port/Dispatch instance). This allows tubes that enforce
- * ordering to see requests in the order they were sent at the point the
- * client invoked them.
- * <p>
- * The forceSync parameter will be true only when the caller (e.g. AsyncInvoker or
- * SEIStub) knows one or more tubes need to enforce ordering and thus need
- * to run sync with the client. Such tubes can return
- * NextAction.INVOKE_ASYNC to indicate that the next tube in the tubeline
- * should be invoked async to the current thread.
- *
- * <p>
- * This method works like {@link Thread#start()}.
- *
- * @param tubeline
- * The first tube of the tubeline that will act on the packet.
- * @param request
- * The request packet to be passed to <tt>startPoint.processRequest()</tt>.
- * @param completionCallback
- * The callback to be invoked when the processing is finished and the
- * final response packet is available.
- *
- * @see #start(Tube,Packet,CompletionCallback)
- * @see #runSync(Tube,Packet)
- * @since 2.2.6
- */
- public void start(@NotNull Tube tubeline, @NotNull Packet request, @Nullable CompletionCallback completionCallback, boolean forceSync) {
- next = tubeline;
- this.packet = request;
- this.completionCallback = completionCallback;
-
- if (forceSync) {
- this.startedSync = true;
- dumpFiberContext("starting (sync)");
- run();
- } else {
- this.started = true;
- dumpFiberContext("starting (async)");
- owner.addRunnable(this);
- }
- }
-
- /**
- * Wakes up a suspended fiber.
- * <p/>
- * <p/>
- * If a fiber was suspended without specifying the next {@link Tube},
- * then the execution will be resumed in the response processing direction,
- * by calling the {@link Tube#processResponse(Packet)} method on the next/first
- * {@link Tube} in the {@link Fiber}'s processing stack with the specified resume
- * packet as the parameter.
- * <p/>
- * <p/>
- * If a fiber was suspended with specifying the next {@link Tube},
- * then the execution will be resumed in the request processing direction,
- * by calling the next tube's {@link Tube#processRequest(Packet)} method with the
- * specified resume packet as the parameter.
- * <p/>
- * <p/>
- * This method is implemented in a race-free way. Another thread can invoke
- * this method even before this fiber goes into the suspension mode. So the caller
- * need not worry about synchronizing {@link NextAction#suspend()} and this method.
- *
- * @param resumePacket packet used in the resumed processing
- */
- public void resume(@NotNull Packet resumePacket) {
- resume(resumePacket, false);
- }
-
- /**
- * Similar to resume(Packet) but allowing the Fiber to be resumed
- * synchronously (in the current Thread). If you want to know when the
- * fiber completes (not when this method returns) then add/wrap a
- * CompletionCallback on this Fiber.
- * For example, an asynchronous response endpoint that supports WS-ReliableMessaging
- * including in-order message delivery may need to resume the Fiber synchronously
- * until message order is confirmed prior to returning to asynchronous processing.
- * @since 2.2.6
- */
- public void resume(@NotNull Packet resumePacket,
- boolean forceSync) {
- resume(resumePacket, forceSync, null);
- }
-
- /**
- * Similar to resume(Packet, boolean) but allowing the Fiber to be resumed
- * and at the same time atomically assign a new CompletionCallback to it.
- * @since 2.2.6
- */
- public void resume(@NotNull Packet resumePacket,
- boolean forceSync,
- CompletionCallback callback) {
- lock.lock();
- try {
- if (callback != null) {
- setCompletionCallback(callback);
- }
- if(isTraceEnabled())
- LOGGER.log(Level.FINE, "{0} resuming. Will have suspendedCount={1}", new Object[]{getName(), suspendedCount-1});
- packet = resumePacket;
- if( --suspendedCount == 0 ) {
- if (!isInsideSuspendCallbacks) {
- List<Listener> listeners = getCurrentListeners();
- for (Listener listener: listeners) {
- try {
- listener.fiberResumed(this);
- } catch (Throwable e) {
- if (isTraceEnabled())
- LOGGER.log(Level.FINE, "Listener {0} threw exception: {1}", new Object[]{listener, e.getMessage()});
- }
- }
-
- if(synchronous) {
- condition.signalAll();
- } else if (forceSync || startedSync) {
- run();
- } else {
- dumpFiberContext("resuming (async)");
- owner.addRunnable(this);
- }
- }
- } else {
- if (isTraceEnabled()) {
- LOGGER.log(Level.FINE, "{0} taking no action on resume because suspendedCount != 0: {1}", new Object[]{getName(), suspendedCount});
- }
- }
- } finally {
- lock.unlock();
- }
- }
-
- /**
- * Wakes up a suspended fiber and begins response processing.
- * @since 2.2.6
- */
- public void resumeAndReturn(@NotNull Packet resumePacket,
- boolean forceSync) {
- if(isTraceEnabled())
- LOGGER.log(Level.FINE, "{0} resumed with Return Packet", getName());
- next = null;
- resume(resumePacket, forceSync);
- }
-
- /**
- * Wakes up a suspended fiber with an exception.
- * <p/>
- * <p/>
- * The execution of the suspended fiber will be resumed in the response
- * processing direction, by calling the {@link Tube#processException(Throwable)} method
- * on the next/first {@link Tube} in the {@link Fiber}'s processing stack with
- * the specified exception as the parameter.
- * <p/>
- * <p/>
- * This method is implemented in a race-free way. Another thread can invoke
- * this method even before this fiber goes into the suspension mode. So the caller
- * need not worry about synchronizing {@link NextAction#suspend()} and this method.
- *
- * @param throwable exception that is used in the resumed processing
- */
- public void resume(@NotNull Throwable throwable) {
- resume(throwable, packet, false);
- }
-
- /**
- * Wakes up a suspended fiber with an exception.
- * <p/>
- * <p/>
- * The execution of the suspended fiber will be resumed in the response
- * processing direction, by calling the {@link Tube#processException(Throwable)} method
- * on the next/first {@link Tube} in the {@link Fiber}'s processing stack with
- * the specified exception as the parameter.
- * <p/>
- * <p/>
- * This method is implemented in a race-free way. Another thread can invoke
- * this method even before this fiber goes into the suspension mode. So the caller
- * need not worry about synchronizing {@link NextAction#suspend()} and this method.
- *
- * @param throwable exception that is used in the resumed processing
- * @param packet Packet that will be visible on the Fiber after the resume
- * @since 2.2.8
- */
- public void resume(@NotNull Throwable throwable, @NotNull Packet packet) {
- resume(throwable, packet, false);
- }
-
- /**
- * Wakes up a suspend fiber with an exception.
- *
- * If forceSync is true, then the suspended fiber will resume with
- * synchronous processing on the current thread. This will continue
- * until some Tube indicates that it is safe to switch to asynchronous
- * processing.
- *
- * @param error exception that is used in the resumed processing
- * @param forceSync if processing begins synchronously
- * @since 2.2.6
- */
- public void resume(@NotNull Throwable error,
- boolean forceSync) {
- resume(error, packet, forceSync);
- }
-
- /**
- * Wakes up a suspend fiber with an exception.
- *
- * If forceSync is true, then the suspended fiber will resume with
- * synchronous processing on the current thread. This will continue
- * until some Tube indicates that it is safe to switch to asynchronous
- * processing.
- *
- * @param error exception that is used in the resumed processing
- * @param packet Packet that will be visible on the Fiber after the resume
- * @param forceSync if processing begins synchronously
- * @since 2.2.8
- */
- public void resume(@NotNull Throwable error,
- @NotNull Packet packet,
- boolean forceSync) {
- if(isTraceEnabled())
- LOGGER.log(Level.FINE, "{0} resumed with Return Throwable", getName());
- next = null;
- throwable = error;
- resume(packet, forceSync);
- }
-
- /**
- * Marks this Fiber as cancelled. A cancelled Fiber will never invoke its completion callback
- * @param mayInterrupt if cancel should use {@link Thread#interrupt()}
- * @see java.util.concurrent.Future#cancel(boolean)
- * @since 2.2.6
- */
- @Override
- public void cancel(boolean mayInterrupt) {
- isCanceled = true;
- if (mayInterrupt) {
- // synchronized(this) is used as Thread running Fiber will be holding lock
- synchronized(this) {
- if (currentThread != null)
- currentThread.interrupt();
- }
- }
- }
-
- /**
- * Suspends this fiber's execution until the resume method is invoked.
- * <p/>
- * The call returns immediately, and when the fiber is resumed
- * the execution picks up from the last scheduled continuation.
- * @param onExitRunnable runnable to be invoked after fiber is marked for suspension
- * @return if control loop must exit
- */
- private boolean suspend(Holder<Boolean> isRequireUnlock, Runnable onExitRunnable) {
- if(isTraceEnabled()) {
- LOGGER.log(Level.FINE, "{0} suspending. Will have suspendedCount={1}", new Object[]{getName(), suspendedCount+1});
- if (suspendedCount > 0) {
- LOGGER.log(Level.FINE, "WARNING - {0} suspended more than resumed. Will require more than one resume to actually resume this fiber.", getName());
- }
- }
-
- List<Listener> listeners = getCurrentListeners();
- if (++suspendedCount == 1) {
- isInsideSuspendCallbacks = true;
- try {
- for (Listener listener: listeners) {
- try {
- listener.fiberSuspended(this);
- } catch (Throwable e) {
- if(isTraceEnabled())
- LOGGER.log(Level.FINE, "Listener {0} threw exception: {1}", new Object[]{listener, e.getMessage()});
- }
- }
- } finally {
- isInsideSuspendCallbacks = false;
- }
- }
-
- if (suspendedCount <= 0) {
- // suspend callback caused fiber to resume
- for (Listener listener: listeners) {
- try {
- listener.fiberResumed(this);
- } catch (Throwable e) {
- if(isTraceEnabled())
- LOGGER.log(Level.FINE, "Listener {0} threw exception: {1}", new Object[]{listener, e.getMessage()});
- }
- }
-
- } else if (onExitRunnable != null) {
- // synchronous use cases cannot disconnect from the current thread
- if (!synchronous) {
- /* INTENTIONALLY UNLOCKING EARLY */
- synchronized(this) {
- // currentThread is protected by the monitor for this fiber so
- // that it is accessible to cancel() even when the lock is held
- currentThread = null;
- }
- lock.unlock();
- assert(!lock.isHeldByCurrentThread());
- isRequireUnlock.value = Boolean.FALSE;
-
- try {
- onExitRunnable.run();
- } catch(Throwable t) {
- throw new OnExitRunnableException(t);
- }
-
- return true;
-
- } else {
- // for synchronous we will stay with current thread, so do not disconnect
- if (isTraceEnabled())
- LOGGER.fine("onExitRunnable used with synchronous Fiber execution -- not exiting current thread");
- onExitRunnable.run();
- }
- }
-
- return false;
- }
-
- private static final class OnExitRunnableException extends RuntimeException {
- private static final long serialVersionUID = 1L;
-
- Throwable target;
-
- public OnExitRunnableException(Throwable target) {
- super((Throwable)null); // see pattern for InvocationTargetException
- this.target = target;
- }
- }
-
- /**
- * Adds a new {@link FiberContextSwitchInterceptor} to this fiber.
- * <p/>
- * <p/>
- * The newly installed fiber will take effect immediately after the current
- * tube returns from its {@link Tube#processRequest(Packet)} or
- * {@link Tube#processResponse(Packet)}, before the next tube begins processing.
- * <p/>
- * <p/>
- * So when the tubeline consists of X and Y, and when X installs an interceptor,
- * the order of execution will be as follows:
- * <p/>
- * <ol>
- * <li>X.processRequest()
- * <li>interceptor gets installed
- * <li>interceptor.execute() is invoked
- * <li>Y.processRequest()
- * </ol>
- */
- public synchronized void addInterceptor(@NotNull FiberContextSwitchInterceptor interceptor) {
- if (interceptors == null) {
- interceptors = new ArrayList<FiberContextSwitchInterceptor>();
- } else {
- List<FiberContextSwitchInterceptor> l = new ArrayList<FiberContextSwitchInterceptor>();
- l.addAll(interceptors);
- interceptors = l;
- }
- interceptors.add(interceptor);
- }
-
- /**
- * Removes a {@link FiberContextSwitchInterceptor} from this fiber.
- * <p/>
- * <p/>
- * The removal of the interceptor takes effect immediately after the current
- * tube returns from its {@link Tube#processRequest(Packet)} or
- * {@link Tube#processResponse(Packet)}, before the next tube begins processing.
- * <p/>
- * <p/>
- * <p/>
- * So when the tubeline consists of X and Y, and when Y uninstalls an interceptor
- * on the way out, then the order of execution will be as follows:
- * <p/>
- * <ol>
- * <li>Y.processResponse() (notice that this happens with interceptor.execute() in the callstack)
- * <li>interceptor gets uninstalled
- * <li>interceptor.execute() returns
- * <li>X.processResponse()
- * </ol>
- *
- * @return true if the specified interceptor was removed. False if
- * the specified interceptor was not registered with this fiber to begin with.
- */
- public synchronized boolean removeInterceptor(@NotNull FiberContextSwitchInterceptor interceptor) {
- if (interceptors != null) {
- boolean result = interceptors.remove(interceptor);
- if (interceptors.isEmpty())
- interceptors = null;
- else {
- List<FiberContextSwitchInterceptor> l = new ArrayList<FiberContextSwitchInterceptor>();
- l.addAll(interceptors);
- interceptors = l;
- }
- return result;
- }
- return false;
- }
-
- /**
- * Gets the context {@link ClassLoader} of this fiber.
- */
- public
- @Nullable
- ClassLoader getContextClassLoader() {
- return contextClassLoader;
- }
-
- /**
- * Sets the context {@link ClassLoader} of this fiber.
- */
- public ClassLoader setContextClassLoader(@Nullable ClassLoader contextClassLoader) {
- ClassLoader r = this.contextClassLoader;
- this.contextClassLoader = contextClassLoader;
- return r;
- }
-
- /**
- * DO NOT CALL THIS METHOD. This is an implementation detail
- * of {@link Fiber}.
- */
- @Deprecated
- @Override
- public void run() {
- Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
- try {
- assert !synchronous;
- // doRun returns true to indicate an early exit from fiber processing
- if (!doRun()) {
- if (startedSync && suspendedCount == 0 &&
- (next != null || contsSize > 0)) {
- // We bailed out of running this fiber we started as sync, and now
- // want to finish running it async
- startedSync = false;
- // Start back up as an async fiber
- dumpFiberContext("restarting (async) after startSync");
- owner.addRunnable(this);
- } else {
- completionCheck();
- }
- }
- } finally {
- ContainerResolver.getDefault().exitContainer(old);
- }
- }
-
- /**
- * Runs a given {@link Tube} (and everything thereafter) synchronously.
- * <p/>
- * <p/>
- * This method blocks and returns only when all the successive {@link Tube}s
- * complete their request/response processing. This method can be used
- * if a {@link Tube} needs to fallback to synchronous processing.
- * <p/>
- * <h3>Example:</h3>
- * <pre>
- * class FooTube extends {@link AbstractFilterTubeImpl} {
- * NextAction processRequest(Packet request) {
- * // run everything synchronously and return with the response packet
- * return doReturnWith(Fiber.current().runSync(next,request));
- * }
- * NextAction processResponse(Packet response) {
- * // never be invoked
- * }
- * }
- * </pre>
- *
- * @param tubeline The first tube of the tubeline that will act on the packet.
- * @param request The request packet to be passed to <tt>startPoint.processRequest()</tt>.
- * @return The response packet to the <tt>request</tt>.
- * @see #start(Tube, Packet, CompletionCallback)
- */
- public
- @NotNull
- Packet runSync(@NotNull Tube tubeline, @NotNull Packet request) {
- lock.lock();
- try {
- // save the current continuation, so that we return runSync() without executing them.
- final Tube[] oldCont = conts;
- final int oldContSize = contsSize;
- final boolean oldSynchronous = synchronous;
- final Tube oldNext = next;
-
- if (oldContSize > 0) {
- conts = new Tube[16];
- contsSize = 0;
- }
-
- try {
- synchronous = true;
- this.packet = request;
- next = tubeline;
- doRun();
- if (throwable != null) {
- if (isDeliverThrowableInPacket) {
- packet.addSatellite(new ThrowableContainerPropertySet(throwable));
- } else {
- if (throwable instanceof RuntimeException) {
- throw (RuntimeException) throwable;
- }
- if (throwable instanceof Error) {
- throw (Error) throwable;
- }
- // our system is supposed to only accept Error or RuntimeException
- throw new AssertionError(throwable);
- }
- }
- return this.packet;
- } finally {
- conts = oldCont;
- contsSize = oldContSize;
- synchronous = oldSynchronous;
- next = oldNext;
- if(interrupted) {
- Thread.currentThread().interrupt();
- interrupted = false;
- }
- if(!started && !startedSync)
- completionCheck();
- }
- } finally {
- lock.unlock();
- }
- }
-
- private void completionCheck() {
- lock.lock();
- try {
- // Don't trigger completion and callbacks if fiber is suspended
- if(!isCanceled && contsSize==0 && suspendedCount == 0) {
- if(isTraceEnabled())
- LOGGER.log(Level.FINE, "{0} completed", getName());
- clearListeners();
- condition.signalAll();
- if (completionCallback != null) {
- if (throwable != null) {
- if (isDeliverThrowableInPacket) {
- packet.addSatellite(new ThrowableContainerPropertySet(throwable));
- completionCallback.onCompletion(packet);
- } else
- completionCallback.onCompletion(throwable);
- } else
- completionCallback.onCompletion(packet);
- }
- }
- } finally {
- lock.unlock();
- }
- }
-
- /**
- * Invokes all registered {@link InterceptorHandler}s and then call into
- * {@link Fiber#__doRun()}.
- */
- private class InterceptorHandler implements FiberContextSwitchInterceptor.Work<Tube, Tube> {
- private final Holder<Boolean> isUnlockRequired;
- private final List<FiberContextSwitchInterceptor> ints;
-
- /**
- * Index in {@link Fiber#interceptors} to invoke next.
- */
- private int idx;
-
- public InterceptorHandler(Holder<Boolean> isUnlockRequired, List<FiberContextSwitchInterceptor> ints) {
- this.isUnlockRequired = isUnlockRequired;
- this.ints = ints;
- }
-
- /**
- * Initiate the interception, and eventually invokes {@link Fiber#__doRun()}.
- */
- Tube invoke(Tube next) {
- idx = 0;
- return execute(next);
- }
-
- @Override
- public Tube execute(Tube next) {
- if (idx == ints.size()) {
- Fiber.this.next = next;
- if (__doRun(isUnlockRequired, ints))
- return PLACEHOLDER;
- } else {
- FiberContextSwitchInterceptor interceptor = ints.get(idx++);
- return interceptor.execute(Fiber.this, next, this);
- }
- return Fiber.this.next;
- }
- }
-
- private static final PlaceholderTube PLACEHOLDER = new PlaceholderTube();
-
- private static class PlaceholderTube extends AbstractTubeImpl {
-
- @Override
- public NextAction processRequest(Packet request) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public NextAction processResponse(Packet response) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public NextAction processException(Throwable t) {
- return doThrow(t);
- }
-
- @Override
- public void preDestroy() {
- }
-
- @Override
- public PlaceholderTube copy(TubeCloner cloner) {
- throw new UnsupportedOperationException();
- }
- }
-
- /**
- * Executes the fiber as much as possible.
- *
- */
- private boolean doRun() {
- dumpFiberContext("running");
-
- if (serializeExecution) {
- serializedExecutionLock.lock();
- try {
- return _doRun(next);
- } finally {
- serializedExecutionLock.unlock();
- }
- } else {
- return _doRun(next);
- }
- }
-
- private boolean _doRun(Tube next) {
- // isRequireUnlock will contain Boolean.FALSE when lock has already been released in suspend
- Holder<Boolean> isRequireUnlock = new Holder<Boolean>(Boolean.TRUE);
- lock.lock();
- try {
- List<FiberContextSwitchInterceptor> ints;
- ClassLoader old;
- synchronized(this) {
- ints = interceptors;
-
- // currentThread is protected by the monitor for this fiber so
- // that it is accessible to cancel() even when the lock is held
- currentThread = Thread.currentThread();
- if (isTraceEnabled()) {
- LOGGER.log(Level.FINE, "Thread entering _doRun(): {0}", currentThread);
- }
-
- old = currentThread.getContextClassLoader();
- currentThread.setContextClassLoader(contextClassLoader);
- }
-
- try {
- boolean needsToReenter;
- do {
- // if interceptors are set, go through the interceptors.
- if (ints == null) {
- this.next = next;
- if (__doRun(isRequireUnlock, null /*ints*/)) {
- return true;
- }
- } else {
- next = new InterceptorHandler(isRequireUnlock, ints).invoke(next);
- if (next == PLACEHOLDER) {
- return true;
- }
- }
-
- synchronized(this) {
- needsToReenter = (ints != interceptors);
- if (needsToReenter)
- ints = interceptors;
- }
- } while (needsToReenter);
- } catch(OnExitRunnableException o) {
- // catching this exception indicates onExitRunnable in suspend() threw.
- // we must still avoid double unlock
- Throwable t = o.target;
- if (t instanceof WebServiceException)
- throw (WebServiceException) t;
- throw new WebServiceException(t);
- } finally {
- // don't reference currentThread here because fiber processing
- // may already be running on a different thread (Note: isAlreadyExited
- // tracks this state
- Thread thread = Thread.currentThread();
- thread.setContextClassLoader(old);
- if (isTraceEnabled()) {
- LOGGER.log(Level.FINE, "Thread leaving _doRun(): {0}", thread);
- }
- }
-
- return false;
- } finally {
- if (isRequireUnlock.value) {
- synchronized(this) {
- currentThread = null;
- }
- lock.unlock();
- }
- }
- }
-
- /**
- * To be invoked from {@link #doRun()}.
- *
- * @see #doRun()
- */
- private boolean __doRun(Holder<Boolean> isRequireUnlock, List<FiberContextSwitchInterceptor> originalInterceptors) {
- assert(lock.isHeldByCurrentThread());
-
- final Fiber old = CURRENT_FIBER.get();
- CURRENT_FIBER.set(this);
-
- // if true, lots of debug messages to show what's being executed
- final boolean traceEnabled = LOGGER.isLoggable(Level.FINER);
-
- try {
- boolean abortResponse = false;
- while(isReady(originalInterceptors)) {
- if (isCanceled) {
- next = null;
- throwable = null;
- contsSize = 0;
- break;
- }
-
- try {
- NextAction na;
- Tube last;
- if(throwable!=null) {
- if(contsSize==0 || abortResponse) {
- contsSize = 0; // abortResponse case
- // nothing else to execute. we are done.
- return false;
- }
- last = popCont();
- if (traceEnabled)
- LOGGER.log(Level.FINER, "{0} {1}.processException({2})", new Object[]{getName(), last, throwable});
- na = last.processException(throwable);
- } else {
- if(next!=null) {
- if(traceEnabled)
- LOGGER.log(Level.FINER, "{0} {1}.processRequest({2})", new Object[]{getName(), next, packet != null ? "Packet@"+Integer.toHexString(packet.hashCode()) : "null"});
- na = next.processRequest(packet);
- last = next;
- } else {
- if(contsSize==0 || abortResponse) {
- // nothing else to execute. we are done.
- contsSize = 0;
- return false;
- }
- last = popCont();
- if(traceEnabled)
- LOGGER.log(Level.FINER, "{0} {1}.processResponse({2})", new Object[]{getName(), last, packet != null ? "Packet@"+Integer.toHexString(packet.hashCode()) : "null"});
- na = last.processResponse(packet);
- }
- }
-
- if (traceEnabled)
- LOGGER.log(Level.FINER, "{0} {1} returned with {2}", new Object[]{getName(), last, na});
-
- // If resume is called before suspend, then make sure
- // resume(Packet) is not lost
- if (na.kind != NextAction.SUSPEND) {
- // preserve in-flight packet so that processException may inspect
- if (na.kind != NextAction.THROW &&
- na.kind != NextAction.THROW_ABORT_RESPONSE)
- packet = na.packet;
- throwable = na.throwable;
- }
-
- switch(na.kind) {
- case NextAction.INVOKE:
- case NextAction.INVOKE_ASYNC:
- pushCont(last);
- // fall through next
- case NextAction.INVOKE_AND_FORGET:
- next = na.next;
- if (na.kind == NextAction.INVOKE_ASYNC
- && startedSync) {
- // Break out here
- return false;
- }
- break;
- case NextAction.THROW_ABORT_RESPONSE:
- case NextAction.ABORT_RESPONSE:
- abortResponse = true;
- if (isTraceEnabled()) {
- LOGGER.log(Level.FINE, "Fiber {0} is aborting a response due to exception: {1}", new Object[]{this, na.throwable});
- }
- case NextAction.RETURN:
- case NextAction.THROW:
- next = null;
- break;
- case NextAction.SUSPEND:
- if (next != null) {
- // Only store the 'last' tube when we're processing
- // a request, since conts array is for processResponse
- pushCont(last);
- }
- next = na.next;
- if(suspend(isRequireUnlock, na.onExitRunnable))
- return true; // explicitly exiting control loop
- break;
- default:
- throw new AssertionError();
- }
- } catch (RuntimeException t) {
- if (traceEnabled)
- LOGGER.log(Level.FINER, getName() + " Caught " + t + ". Start stack unwinding", t);
- throwable = t;
- } catch (Error t) {
- if (traceEnabled)
- LOGGER.log(Level.FINER, getName() + " Caught " + t + ". Start stack unwinding", t);
- throwable = t;
- }
-
- dumpFiberContext("After tube execution");
- }
-
- // there's nothing we can execute right away.
- // we'll be back when this fiber is resumed.
-
- } finally {
- CURRENT_FIBER.set(old);
- }
-
- return false;
- }
-
- private void pushCont(Tube tube) {
- conts[contsSize++] = tube;
-
- // expand if needed
- int len = conts.length;
- if (contsSize == len) {
- Tube[] newBuf = new Tube[len * 2];
- System.arraycopy(conts, 0, newBuf, 0, len);
- conts = newBuf;
- }
- }
-
- private Tube popCont() {
- return conts[--contsSize];
- }
-
- private Tube peekCont() {
- int index = contsSize - 1;
- if (index >= 0 && index < conts.length) {
- return conts[index];
- } else {
- return null;
- }
- }
-
- /**
- * Only to be used by Tubes that manipulate the Fiber to create alternate flows
- * @since 2.2.6
- */
- public void resetCont(Tube[] conts, int contsSize) {
- this.conts = conts;
- this.contsSize = contsSize;
- }
-
- /**
- * Returns true if the fiber is ready to execute.
- */
- private boolean isReady(List<FiberContextSwitchInterceptor> originalInterceptors) {
- if (synchronous) {
- while (suspendedCount == 1)
- try {
- if (isTraceEnabled()) {
- LOGGER.log(Level.FINE, "{0} is blocking thread {1}", new Object[]{getName(), Thread.currentThread().getName()});
- }
- condition.await(); // the synchronized block is the whole runSync method.
- } catch (InterruptedException e) {
- // remember that we are interrupted, but don't respond to it
- // right away. This behavior is in line with what happens
- // when you are actually running the whole thing synchronously.
- interrupted = true;
- }
-
- synchronized(this) {
- return interceptors == originalInterceptors;
- }
- }
- else {
- if (suspendedCount>0)
- return false;
- synchronized(this) {
- return interceptors == originalInterceptors;
- }
- }
- }
-
- private String getName() {
- return "engine-" + owner.id + "fiber-" + id;
- }
-
- @Override
- public String toString() {
- return getName();
- }
-
- /**
- * Gets the current {@link Packet} associated with this fiber.
- * <p/>
- * <p/>
- * This method returns null if no packet has been associated with the fiber yet.
- */
- public
- @Nullable
- Packet getPacket() {
- return packet;
- }
-
- /**
- * Returns completion callback associated with this Fiber
- * @return Completion callback
- * @since 2.2.6
- */
- public CompletionCallback getCompletionCallback() {
- return completionCallback;
- }
-
- /**
- * Updates completion callback associated with this Fiber
- * @param completionCallback Completion callback
- * @since 2.2.6
- */
- public void setCompletionCallback(CompletionCallback completionCallback) {
- this.completionCallback = completionCallback;
- }
-
- /**
- * (ADVANCED) Returns true if the current fiber is being executed synchronously.
- * <p/>
- * <p/>
- * Fiber may run synchronously for various reasons. Perhaps this is
- * on client side and application has invoked a synchronous method call.
- * Perhaps this is on server side and we have deployed on a synchronous
- * transport (like servlet.)
- * <p/>
- * <p/>
- * When a fiber is run synchronously (IOW by {@link #runSync(Tube, Packet)}),
- * further invocations to {@link #runSync(Tube, Packet)} can be done
- * without degrading the performance.
- * <p/>
- * <p/>
- * So this value can be used as a further optimization hint for
- * advanced {@link Tube}s to choose the best strategy to invoke
- * the next {@link Tube}. For example, a tube may want to install
- * a {@link FiberContextSwitchInterceptor} if running async, yet
- * it might find it faster to do {@link #runSync(Tube, Packet)}
- * if it's already running synchronously.
- */
- public static boolean isSynchronous() {
- return current().synchronous;
- }
-
- /**
- * Returns true if the current Fiber on the current thread was started
- * synchronously. Note, this is not strictly the same as being synchronous
- * because the assumption is that the Fiber will ultimately be dispatched
- * asynchronously, possibly have a completion callback associated with it, etc.
- * Note, the 'startedSync' flag is cleared once the current Fiber is
- * converted to running asynchronously.
- * @since 2.2.6
- */
- public boolean isStartedSync() {
- return startedSync;
- }
-
- /**
- * Gets the current fiber that's running.
- * <p/>
- * <p/>
- * This works like {@link Thread#currentThread()}.
- * This method only works when invoked from {@link Tube}.
- */
- public static
- @NotNull
- @SuppressWarnings({"null", "ConstantConditions"})
- Fiber current() {
- Fiber fiber = CURRENT_FIBER.get();
- if (fiber == null)
- throw new IllegalStateException("Can be only used from fibers");
- return fiber;
- }
-
- /**
- * Gets the current fiber that's running, if set.
- */
- public static Fiber getCurrentIfSet() {
- return CURRENT_FIBER.get();
- }
-
- private static final ThreadLocal<Fiber> CURRENT_FIBER = new ThreadLocal<Fiber>();
-
- /**
- * Used to allocate unique number for each fiber.
- */
- private static final AtomicInteger iotaGen = new AtomicInteger();
-
- private static boolean isTraceEnabled() {
- return LOGGER.isLoggable(Level.FINE);
- }
-
- private static final Logger LOGGER = Logger.getLogger(Fiber.class.getName());
-
-
- private static final ReentrantLock serializedExecutionLock = new ReentrantLock();
-
- /**
- * Set this boolean to true to execute fibers sequentially one by one.
- * See class javadoc.
- */
- public static volatile boolean serializeExecution = Boolean.getBoolean(Fiber.class.getName() + ".serialize");
-
- private final Set<Component> components = new CopyOnWriteArraySet<Component>();
-
- @Override
- public <S> S getSPI(Class<S> spiType) {
- for (Component c : components) {
- S spi = c.getSPI(spiType);
- if (spi != null) {
- return spi;
- }
- }
- return null;
- }
-
- @Override
- public Set<Component> getComponents() {
- return components;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptor.java
deleted file mode 100644
index fdbea65a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptor.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * Interception for {@link Fiber} context switch.
- *
- * <p>
- * Even though pipeline runs asynchronously, sometimes it's desirable
- * to bind some state to the current thread running a fiber. Such state
- * may include security subject (in terms of {@link AccessController#doPrivileged}),
- * or a transaction.
- *
- * <p>
- * This mechanism makes it possible to do such things, by allowing
- * some code to be executed before and after a thread executes a fiber.
- *
- * <p>
- * The design also encapsulates the entire fiber execution in a single
- * opaque method invocation {@link Work#execute}, allowing the use of
- * <tt>finally</tt> block.
- *
- *
- * @author Kohsuke Kawaguchi
- */
-public interface FiberContextSwitchInterceptor {
- /**
- * Allows the interception of the fiber execution.
- *
- * <p>
- * This method needs to be implemented like this:
- *
- * <pre>
- * &lt;R,P> R execute( Fiber f, P p, Work&lt;R,P> work ) {
- * // do some preparation work
- * ...
- * try {
- * // invoke
- * return work.execute(p);
- * } finally {
- * // do some clean up work
- * ...
- * }
- * }
- * </pre>
- *
- * <p>
- * While somewhat unintuitive,
- * this interception mechanism enables the interceptor to wrap
- * the whole fiber execution into a {@link AccessController#doPrivileged(PrivilegedAction)},
- * for example.
- *
- * @param f
- * {@link Fiber} to be executed.
- * @param p
- * The opaque parameter value for {@link Work}. Simply pass this value to
- * {@link Work#execute(Object)}.
- * @return
- * The opaque return value from the the {@link Work}. Simply return
- * the value from {@link Work#execute(Object)}.
- */
- <R,P> R execute( Fiber f, P p, Work<R,P> work );
-
- /**
- * Abstraction of the execution that happens inside the interceptor.
- */
- interface Work<R,P> {
- /**
- * Have the current thread executes the current fiber,
- * and returns when it stops doing so.
- *
- * <p>
- * The parameter and the return value is controlled by the
- * JAX-WS runtime, and interceptors should simply treat
- * them as opaque values.
- */
- R execute(P param);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptorFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptorFactory.java
deleted file mode 100644
index 90c40263..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptorFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-/**
- * Factory for (@link FiberContextSwitchInterceptor} instances
- *
- * @since 2.2.6
- */
-public interface FiberContextSwitchInterceptorFactory {
- /**
- * Creates {@link FiberContextSwitchInterceptor} instance.
- * @return interceptor instance
- */
- public FiberContextSwitchInterceptor create();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/NextAction.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/NextAction.java
deleted file mode 100644
index d7f17b36..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/NextAction.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import java.util.concurrent.Executor;
-
-/**
- * Indicates what shall happen after {@link Tube#processRequest(Packet)} or
- * {@link Tube#processResponse(Packet)} returns.
- *
- * <p>
- * To allow reuse of this object, this class is mutable.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class NextAction {
- int kind;
- Tube next;
- Packet packet;
- /**
- * Really either {@link RuntimeException} or {@link Error}.
- */
- Throwable throwable;
- Runnable onExitRunnable;
-
- // public enum Kind { INVOKE, INVOKE_AND_FORGET, RETURN, SUSPEND }
-
- static final int INVOKE = 0;
- static final int INVOKE_AND_FORGET = 1;
- static final int RETURN = 2;
- static final int THROW = 3;
- static final int SUSPEND = 4;
- // Used to abort processResponse chain if a fatal exception is encountered
- static final int THROW_ABORT_RESPONSE = 5;
- // Used to abort processResponse chain if a response should be aborted
- static final int ABORT_RESPONSE = 6;
- // Used to switch a tubeline from synchronous to asynchronous execution
- // with respect to the thread that started this tubeline.
- static final int INVOKE_ASYNC = 7;
-
- private void set(int k, Tube v, Packet p, Throwable t) {
- this.kind = k;
- this.next = v;
- this.packet = p;
- this.throwable = t;
- }
-
- /**
- * Indicates that the next action should be to
- * invoke the next tube's {@link Tube#processRequest(Packet)},
- * then later invoke the current tube's {@link Tube#processResponse(Packet)}
- * with the response packet.
- */
- public void invoke(Tube next, Packet p) {
- set(INVOKE, next, p, null);
- }
-
- /**
- * Indicates that the next action should be to
- * invoke the next tube's {@link Tube#processRequest(Packet)},
- * but the current tube doesn't want to receive the response packet to
- * its {@link Tube#processResponse(Packet)}.
- */
- public void invokeAndForget(Tube next, Packet p) {
- set(INVOKE_AND_FORGET, next, p, null);
- }
-
- /**
- * Indicates that the next action is to flip the processing direction
- * and starts response processing.
- */
- public void returnWith( Packet response ) {
- set(RETURN, null, response, null);
- }
-
- /**
- * Indicates that the next action is to flip the processing direction
- * and starts exception processing, but with the indicated context.
- *
- * @param t
- * Either {@link RuntimeException} or {@link Error}, but defined to
- * take {@link Throwable} because {@link Tube#processException(Throwable)}
- * takes {@link Throwable}.
- */
- public void throwException( Packet response, Throwable t ) {
- // Use of RETURN is correct -- Fiber processing does not set packet for type of THROW
- set(RETURN, null, response, t);
- }
-
- /**
- * Indicates that the next action is to flip the processing direction
- * and starts exception processing.
- *
- * @param t
- * Either {@link RuntimeException} or {@link Error}, but defined to
- * take {@link Throwable} because {@link Tube#processException(Throwable)}
- * takes {@link Throwable}.
- */
- public void throwException(Throwable t) {
- assert t instanceof RuntimeException || t instanceof Error;
- set(THROW,null,null,t);
- }
-
- /**
- * Indicates that the next action is to abort the processResponse chain
- * because of an exception. How that exception is processed is not
- * defined.
- *
- * @param t
- * Either {@link RuntimeException} or {@link Error}
- */
- public void throwExceptionAbortResponse(Throwable t) {
- set(THROW_ABORT_RESPONSE,null,null,t);
- }
-
- /**
- * Indicates that the next action is to abort the processResponse chain
- * because of some non-exception condition.
- *
- * @param response The response that is being aborted
- */
- public void abortResponse(Packet response) {
- set(ABORT_RESPONSE,null,response,null);
- }
-
- /**
- * Indicates that the next action is to invoke the next tube in the
- * tubeline async from the thread that started the tubeline. Only fibers
- * that were started using startSync should use this next action kind.
- * @param next The next tube in the tubeline
- * @param p The request to pass to the next tube
- */
- public void invokeAsync(Tube next, Packet p) {
- set(INVOKE_ASYNC,next,p,null);
- }
-
- /**
- * Indicates that the fiber should be suspended.
- * Once {@link Fiber#resume(Packet) resumed}, return the response processing.
- * @deprecated Use variants that pass {@link Runnable}
- */
- public void suspend() {
- suspend(null, null);
- }
-
- /**
- * Indicates that the fiber should be suspended. Once the current {@link Thread}
- * exits the fiber's control loop, the onExitRunnable will be invoked. This {@link Runnable}
- * may call {@link Fiber#resume(Packet)}; however it is still guaranteed that the current
- * Thread will return control, therefore, further processing will be handled on a {@link Thread}
- * from the {@link Executor}. For synchronous cases, the Thread invoking this fiber cannot return
- * until fiber processing is complete; therefore, the guarantee is only that the onExitRunnable
- * will be invoked prior to completing the suspension.
- * @since 2.2.7
- */
- public void suspend(Runnable onExitRunnable) {
- suspend(null, onExitRunnable);
- }
-
- /**
- * Indicates that the fiber should be suspended.
- * Once {@link Fiber#resume(Packet) resumed}, resume with the
- * {@link Tube#processRequest(Packet)} on the given next tube.
- * @deprecated Use variants that pass {@link Runnable}
- */
- public void suspend(Tube next) {
- suspend(next, null);
- }
-
- /**
- * Indicates that the fiber should be suspended. Once the current {@link Thread}
- * exits the fiber's control loop, the onExitRunnable will be invoked. This {@link Runnable}
- * may call {@link Fiber#resume(Packet)}; however it is still guaranteed that the current
- * fiber will return control, therefore, further processing will be handled on a {@link Thread}
- * from the {@link Executor}. For synchronous cases, the Thread invoking this fiber cannot return
- * until fiber processing is complete; therefore, the guarantee is only that the onExitRunnable
- * will be invoked prior to completing the suspension.
- * <p>
- * Once {@link Fiber#resume(Packet) resumed}, resume with the
- * {@link Tube#processRequest(Packet)} on the given next tube.
- * @since 2.2.7
- */
- public void suspend(Tube next, Runnable onExitRunnable) {
- set(SUSPEND, next, null, null);
- this.onExitRunnable = onExitRunnable;
- }
-
- /** Returns the next tube
- * @return Next tube
- */
- public Tube getNext() {
- return next;
- }
-
- /** Sets the next tube
- * @param next Next tube
- */
- public void setNext(Tube next) {
- this.next = next;
- }
-
- /**
- * Returns the last Packet
- * @return Packet
- */
- public Packet getPacket() {
- return packet;
- }
-
- /**
- * Returns the Throwable generated by the last Tube
- * @return the Throwable
- */
- public Throwable getThrowable() {
- return throwable;
- }
-
- /**
- * Dumps the contents to assist debugging.
- */
- @Override
- public String toString() {
- StringBuilder buf = new StringBuilder();
- buf.append(super.toString()).append(" [");
- buf.append("kind=").append(getKindString()).append(',');
- buf.append("next=").append(next).append(',');
- buf.append("packet=").append(packet != null ? packet.toShortString() : null).append(',');
- buf.append("throwable=").append(throwable).append(']');
- return buf.toString();
- }
-
- /**
- * Returns {@link #kind} in a human readable string, to assist debugging.
- */
- public String getKindString() {
- switch(kind) {
- case INVOKE: return "INVOKE";
- case INVOKE_AND_FORGET: return "INVOKE_AND_FORGET";
- case RETURN: return "RETURN";
- case THROW: return "THROW";
- case SUSPEND: return "SUSPEND";
- case THROW_ABORT_RESPONSE: return "THROW_ABORT_RESPONSE";
- case ABORT_RESPONSE: return "ABORT_RESPONSE";
- case INVOKE_ASYNC: return "INVOKE_ASYNC";
- default: throw new AssertionError(kind);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Pipe.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Pipe.java
deleted file mode 100644
index e4c90ab5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Pipe.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterPipeImpl;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractPipeImpl;
-
-import javax.annotation.PreDestroy;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Provider;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.handler.LogicalHandler;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.soap.SOAPHandler;
-
-/**
- * Abstraction of the intermediate layers in the processing chain
- * and transport.
- *
- * <h2>What is a {@link Pipe}?</h2>
- * <p>
- * Transport is a kind of pipe. It sends the {@link Packet}
- * through, say, HTTP connection, and receives the data back into another {@link Packet}.
- *
- * <p>
- * More often, a pipe is a filter. It acts on a packet,
- * and then it passes the packet into another pipe. It can
- * do the same on the way back.
- *
- * <p>
- * For example, XWSS will be a {@link Pipe}
- * that delegates to another {@link Pipe}, and it can wrap a {@link Packet} into
- * another {@link Packet} to encrypt the body and add a header, for example.
- *
- * <p>
- * Yet another kind of filter pipe is those that wraps {@link LogicalHandler}
- * and {@link SOAPHandler}. These pipes are heavy-weight; they often consume
- * a message in a packet and create a new one, and then pass it to the next pipe.
- * For performance reason it probably makes sense to have one {@link Pipe}
- * instance that invokes a series of {@link LogicalHandler}s, another one
- * for {@link SOAPHandler}.
- *
- * <p>
- * There would be a {@link Pipe} implementation that invokes {@link Provider}.
- * There would be a {@link Pipe} implementation that invokes a service method
- * on the user's code.
- * There would be a {@link Dispatch} implementation that invokes a {@link Pipe}.
- *
- * <p>
- * WS-MEX can be implemented as a {@link Pipe} that looks for
- * {@link Message#getPayloadNamespaceURI()} and serves the request.
- *
- *
- * <h2>Pipe Lifecycle</h2>
- * {@link Pipe}line is expensive to set up, so once it's created it will be reused.
- * A {@link Pipe}line is not reentrant; one pipeline is used to process one request/response
- * at at time. The same pipeline instance may serve request/response for different threads,
- * if one comes after another and they don't overlap.
- * <p>
- * Where a need arises to process multiple requests concurrently, a pipeline
- * gets cloned through {@link PipeCloner}. Note that this need may happen on
- * both server (because it quite often serves multiple requests concurrently)
- * and client (because it needs to support asynchronous method invocations.)
- * <p>
- * Created pipelines (including cloned ones and the original) may be discarded and GCed
- * at any time at the discretion of whoever owns pipelines. Pipes can, however, expect
- * at least one copy (or original) of pipeline to live at any given time while a pipeline
- * owner is interested in the given pipeline configuration (in more concerete terms,
- * for example, as long as a dispatch object lives, it's going to keep at least one
- * copy of a pipeline alive.)
- * <p>
- * Before a pipeline owner dies, it may invoke {@link #preDestroy()} on the last
- * remaining pipeline. It is "may" for pipeline owners that live in the client-side
- * of JAX-WS (such as dispatches and proxies), but it is a "must" for pipeline owners
- * that live in the server-side of JAX-WS.
- * <p>
- * This last invocation gives a chance for some pipes to clean up any state/resource
- * acquired (such as WS-RM's sequence, WS-Trust's SecurityToken), although as stated above,
- * this is not required for clients.
- *
- *
- *
- * <h2>Pipe and State</h2>
- * <p>
- * The lifecycle of pipelines is designed to allow a {@link Pipe} to store various
- * state in easily accessible fashion.
- *
- *
- * <h3>Per-packet state</h3>
- * <p>
- * Any information that changes from a packet to packet should be
- * stored in {@link Packet}. This includes information like
- * transport-specific headers.
- *
- * <h3>Per-thread state</h3>
- * <p>
- * Any expensive objects that are non-reentrant can be stored in
- * instance variables of a {@link Pipe}, since {@link #process(Packet)} is
- * non reentrant. When a pipe is copied, new instances should be allocated
- * so that two {@link Pipe} instances don't share thread-unsafe resources.
- * This includes things like canonicalizers, JAXB unmarshallers, buffers,
- * and so on.
- *
- * <h3>Per-proxy/per-endpoint state</h3>
- * <p>
- * Information that is tied to a particular proxy/dispatch can be stored
- * in a separate object that is referenced from a pipe. When
- * a new pipe is copied, you can simply hand out a reference to the newly
- * created one, so that all copied pipes refer to the same instance.
- * See the following code as an example:
- *
- * <pre>
- * class PipeImpl {
- * // this object stores per-proxy state
- * class DataStore {
- * int counter;
- * }
- *
- * private DataStore ds;
- *
- * // create a fresh new pipe
- * public PipeImpl(...) {
- * ....
- * ds = new DataStore();
- * }
- *
- * // copy constructor
- * private PipeImpl(PipeImpl that, PipeCloner cloner) {
- * cloner.add(that,this);
- * ...
- * this.ds = that.ds;
- * }
- *
- * public PipeImpl copy(PipeCloner pc) {
- * return new PipeImpl(this,pc);
- * }
- * }
- * </pre>
- *
- * <p>
- * Note that access to such resource often needs to be synchronized,
- * since multiple copies of pipelines may execute concurrently.
- *
- * <p>
- * If such information is read-only,
- * it can be stored as instance variables of a pipe,
- * and its reference copied as pipes get copied. (The only difference between
- * this and per-thread state is that you just won't allocate new things when
- * pipes get copied here.)
- *
- *
- * <h3>VM-wide state</h3>
- * <p>
- * <tt>static</tt> is always there for you to use.
- *
- *
- *
- * <h2>Pipes and Handlers</h2>
- * <p>
- * JAX-WS has a notion of {@link LogicalHandler} and {@link SOAPHandler}, and
- * we intend to have one {@link Pipe} implementation that invokes all the
- * {@link LogicalHandler}s and another {@link Pipe} implementation that invokes
- * all the {@link SOAPHandler}s. Those implementations need to convert a {@link Message}
- * into an appropriate format, but grouping all the handlers together eliminates
- * the intermediate {@link Message} instanciation between such handlers.
- * <p>
- * This grouping also allows such implementations to follow the event notifications
- * to handlers (i.e. {@link Handler#close(MessageContext)} method.
- *
- *
- * <pre>
- * TODO: Possible types of pipe:
- * creator: create message from wire
- * to SAAJ SOAP message
- * to cached representation
- * directly to JAXB beans
- * transformer: transform message from one representation to another
- * JAXB beans to encoded SOAP message
- * StAX writing + JAXB bean to encoded SOAP message
- * modifier: modify message
- * add SOAP header blocks
- * security processing
- * header block processor:
- * process certain SOAP header blocks
- * outbound initiator: input from the client
- * Manage input e.g. JAXB beans and associated with parts of the SOAP message
- * inbound invoker: invoke the service
- * Inkoke SEI, e.g. EJB or SEI in servlet.
- * </pre>
- *
- * @see AbstractPipeImpl
- * @see AbstractFilterPipeImpl
- * @deprecated
- * Use {@link Tube}.
- */
-public interface Pipe {
- /**
- * Sends a {@link Packet} and returns a response {@link Packet} to it.
- *
- * @throws WebServiceException
- * On the server side, this signals an error condition where
- * a fault reply is in order (or the exception gets eaten by
- * the top-most transport {@link Pipe} if it's one-way.)
- * This frees each {@link Pipe} from try/catching a
- * {@link WebServiceException} in every layer.
- *
- * Note that this method is also allowed to return a {@link Packet}
- * that has a fault as the payload.
- *
- * <p>
- * On the client side, the {@link WebServiceException} thrown
- * will be propagated all the way back to the calling client
- * applications. (The consequence of that is that if you are
- * a filtering {@link Pipe}, you must not catch the exception
- * that your next {@link Pipe} threw.
- *
- * @throws RuntimeException
- * Other runtime exception thrown by this method must
- * be treated as a bug in the pipe implementation,
- * and therefore should not be converted into a fault.
- * (Otherwise it becomes very difficult to debug implementation
- * problems.)
- *
- * <p>
- * On the server side, this exception should be most likely
- * just logged. On the client-side it gets propagated to the
- * client application.
- *
- * <p>
- * The consequence of this is that if a pipe calls
- * into an user application (such as {@link SOAPHandler}
- * or {@link LogicalHandler}), where a {@link RuntimeException}
- * is *not* a bug in the JAX-WS implementation, it must be catched
- * and wrapped into a {@link WebServiceException}.
- *
- * @param request
- * The packet that represents a request message. Must not be null.
- * If the packet has a non-null message, it must be a valid
- * unconsumed {@link Message}. This message represents the
- * SOAP message to be sent as a request.
- * <p>
- * The packet is also allowed to carry no message, which indicates
- * that this is an output-only request.
- * (that's called "solicit", right? - KK)
- *
- * @return
- * The packet that represents a response message. Must not be null.
- * If the packet has a non-null message, it must be
- * a valid unconsumed {@link Message}. This message represents
- * a response to the request message passed as a parameter.
- * <p>
- * The packet is also allowed to carry no message, which indicates
- * that there was no response. This is used for things like
- * one-way message and/or one-way transports.
- */
- Packet process( Packet request);
-
- /**
- * Invoked before the last copy of the pipeline is about to be discarded,
- * to give {@link Pipe}s a chance to clean up any resources.
- *
- * <p>
- * This can be used to invoke {@link PreDestroy} lifecycle methods
- * on user handler. The invocation of it is optional on the client side,
- * but mandatory on the server side.
- *
- * <p>
- * When multiple copies of pipelines are created, this method is called
- * only on one of them.
- *
- * @throws WebServiceException
- * If the clean up fails, {@link WebServiceException} can be thrown.
- * This exception will be propagated to users (if this is client),
- * or recorded (if this is server.)
- */
- void preDestroy();
-
- /**
- * Creates an identical clone of this {@link Pipe}.
- *
- * <p>
- * This method creates an identical pipeline that can be used
- * concurrently with this pipeline. When the caller of a pipeline
- * is multi-threaded and need concurrent use of the same pipeline,
- * it can do so by creating copies through this method.
- *
- * <h3>Implementation Note</h3>
- * <p>
- * It is the implementation's responsibility to call
- * {@link PipeCloner#add(Pipe,Pipe)} to register the copied pipe
- * with the original. This is required before you start copying
- * the other {@link Pipe} references you have, or else there's a
- * risk of infinite recursion.
- * <p>
- * For most {@link Pipe} implementations that delegate to another
- * {@link Pipe}, this method requires that you also copy the {@link Pipe}
- * that you delegate to.
- * <p>
- * For limited number of {@link Pipe}s that do not maintain any
- * thread unsafe resource, it is allowed to simply return <tt>this</tt>
- * from this method (notice that even if you are stateless, if you
- * got a delegating {@link Pipe} and that one isn't stateless, you
- * still have to copy yourself.)
- *
- * <p>
- * Note that this method might be invoked by one thread while another
- * thread is executing the {@link #process(Packet)} method. See
- * the {@link Codec#copy()} for more discussion about this.
- *
- * @param cloner
- * Use this object (in particular its {@link PipeCloner#copy(Pipe)} method
- * to clone other pipe references you have
- * in your pipe. See {@link PipeCloner} for more discussion
- * about why.
- *
- * @return
- * always non-null {@link Pipe}.
- */
- Pipe copy(PipeCloner cloner);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeCloner.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeCloner.java
deleted file mode 100644
index 5c0912d2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeCloner.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import java.util.Map;
-
-/**
- * Clones the whole pipeline.
- *
- * <p>
- * Since {@link Pipe}s may form an arbitrary directed graph, someone needs
- * to keep track of isomorphism for a clone to happen correctly. This class
- * serves that role.
- *
- * @deprecated
- * Use {@link TubeCloner}.
- * @author Kohsuke Kawaguchi
- */
-public abstract class PipeCloner extends TubeCloner {
- /**
- * {@link Pipe} version of {@link #clone(Tube)}
- */
- public static Pipe clone(Pipe p) {
- return new PipeClonerImpl().copy(p);
- }
-
- // no need to be constructed publicly. always use the static clone method.
- /*package*/ PipeCloner(Map<Object,Object> master2copy) {
- super(master2copy);
- }
-
- /**
- * {@link Pipe} version of {@link #copy(Tube)}
- */
- @SuppressWarnings("unchecked")
- public abstract <T extends Pipe> T copy(T p);
-
-
- /**
- * The {@link Pipe} version of {@link #add(Tube, Tube)}.
- */
- public abstract void add(Pipe original, Pipe copy);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeClonerImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeClonerImpl.java
deleted file mode 100644
index 779368a2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeClonerImpl.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractTubeImpl;
-
-/**
- * Clones the whole pipeline.
- *
- * <p>
- * Since {@link Pipe}s may form an arbitrary directed graph, someone needs
- * to keep track of isomorphism for a clone to happen correctly. This class
- * serves that role.
- *
- * @author Kohsuke Kawaguchi
- */
-@SuppressWarnings("deprecation")
-public class PipeClonerImpl extends PipeCloner {
-
- private static final Logger LOGGER = Logger.getLogger(PipeClonerImpl.class.getName());
-
- // no need to be constructed publicly. always use the static clone method.
- /*package*/ public PipeClonerImpl() {
- super(new HashMap<Object,Object>());
- }
-
- protected PipeClonerImpl(Map<Object,Object> master2copy) {
- super(master2copy);
- }
-
- /**
- * {@link Pipe} version of {@link #copy(Tube)}
- */
- @SuppressWarnings("unchecked")
- public <T extends Pipe> T copy(T p) {
- Pipe r = (Pipe)master2copy.get(p);
- if(r==null) {
- r = p.copy(this);
- // the pipe must puts its copy to the map by itself
- assert master2copy.get(p)==r : "the pipe must call the add(...) method to register itself before start copying other pipes, but "+p+" hasn't done so";
- }
- return (T)r;
- }
-
-
- /**
- * The {@link Pipe} version of {@link #add(Tube, Tube)}.
- */
- public void add(Pipe original, Pipe copy) {
- assert !master2copy.containsKey(original);
- assert original!=null && copy!=null;
- master2copy.put(original,copy);
- }
-
- /**
- * Disambiguation version.
- */
- public void add(AbstractTubeImpl original, AbstractTubeImpl copy) {
- add((Tube)original,copy);
- }
-
- @Override
- public void add(Tube original, Tube copy) {
- assert !master2copy.containsKey(original);
- assert original!=null && copy!=null;
- master2copy.put(original,copy);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public <T extends Tube> T copy(T t) {
- Tube r = (Tube)master2copy.get(t);
- if(r==null) {
- if (t != null) {
- r = t.copy(this);
- } else {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.fine("WARNING, tube passed to 'copy' in " + this + " was null, so no copy was made");
- }
- }
- }
- return (T)r;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssembler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssembler.java
deleted file mode 100644
index 1635bde5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssembler.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Provider;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
-
-/**
- * Creates a pipeline.
- *
- * <p>
- * This pluggability layer enables the upper layer to
- * control exactly how the pipeline is composed.
- *
- * <p>
- * JAX-WS is going to have its own default implementation
- * when used all by itself, but it can be substituted by
- * other implementations.
- *
- * <p>
- * See {@link PipelineAssemblerFactory} for how {@link PipelineAssembler}s
- * are located.
- *
- * <p>
- * TODO: the JAX-WS team felt that no {@link Pipe} should be relying
- * on the {@link SEIModel}, so it is no longer given to the assembler.
- * Talk to us if you need it.
- *
- * @see ClientPipeAssemblerContext
- *
- * @author Kohsuke Kawaguchi
- */
-public interface PipelineAssembler {
- /**
- * Creates a new pipeline for clients.
- *
- * <p>
- * When a JAX-WS client creates a proxy or a {@link Dispatch} from
- * a {@link Service}, JAX-WS runtime internally uses this method
- * to create a new pipeline as a part of the initilization.
- *
- * @param context
- * Object that captures various contextual information
- * that can be used to determine the pipeline to be assembled.
- *
- * @return
- * non-null freshly created pipeline.
- *
- * @throws WebServiceException
- * if there's any configuration error that prevents the
- * pipeline from being constructed. This exception will be
- * propagated into the application, so it must have
- * a descriptive error.
- */
- @NotNull Pipe createClient(@NotNull ClientPipeAssemblerContext context);
-
- /**
- * Creates a new pipeline for servers.
- *
- * <p>
- * When a JAX-WS server deploys a new endpoint, it internally
- * uses this method to create a new pipeline as a part of the
- * initialization.
- *
- * <p>
- * Note that this method is called only once to set up a
- * 'master pipeline', and it gets {@link Pipe#copy(PipeCloner) copied}
- * from it.
- *
- * @param context
- * Object that captures various contextual information
- * that can be used to determine the pipeline to be assembled.
- *
- * @return
- * non-null freshly created pipeline.
- *
- * @throws WebServiceException
- * if there's any configuration error that prevents the
- * pipeline from being constructed. This exception will be
- * propagated into the container, so it must have
- * a descriptive error.
- *
- */
- @NotNull Pipe createServer(@NotNull ServerPipeAssemblerContext context);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssemblerFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssemblerFactory.java
deleted file mode 100644
index d3dc58e0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssemblerFactory.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-
-import javax.xml.ws.soap.SOAPBinding;
-import java.util.logging.Logger;
-
-/**
- * Creates {@link PipelineAssembler}.
- *
- * <p>
- * To create a pipeline,
- * the JAX-WS runtime locates {@link PipelineAssemblerFactory}s through
- * the <tt>META-INF/services/com.sun.xml.internal.ws.api.pipe.PipelineAssemblerFactory</tt> files.
- * Factories found are checked to see if it supports the given binding ID one by one,
- * and the first valid {@link PipelineAssembler} returned will be used to create
- * a pipeline.
- *
- * <p>
- * TODO: is bindingId really extensible? for this to be extensible,
- * someone seems to need to hook into WSDL parsing.
- *
- * <p>
- * TODO: JAX-WSA might not define its own binding ID -- it may just go to an extension element
- * of WSDL. So this abstraction might need to be worked on.
- *
- * @author Kohsuke Kawaguchi
- * @deprecated
- * Use {@link TubelineAssemblerFactory} instead.
- */
-public abstract class PipelineAssemblerFactory {
- /**
- * Creates a {@link PipelineAssembler} applicable for the given binding ID.
- *
- * @param bindingId
- * The binding ID for which a pipeline will be created,
- * such as {@link SOAPBinding#SOAP11HTTP_BINDING}.
- * Must not be null.
- *
- * @return
- * null if this factory doesn't recognize the given binding ID.
- */
- public abstract PipelineAssembler doCreate(BindingID bindingId);
-
- /**
- * Locates {@link PipelineAssemblerFactory}s and create
- * a suitable {@link PipelineAssembler}.
- *
- * @param bindingId
- * The binding ID string for which the new {@link PipelineAssembler}
- * is created. Must not be null.
- * @return
- * Always non-null, since we fall back to our default {@link PipelineAssembler}.
- */
- public static PipelineAssembler create(ClassLoader classLoader, BindingID bindingId) {
- for (PipelineAssemblerFactory factory : ServiceFinder.find(PipelineAssemblerFactory.class,classLoader)) {
- PipelineAssembler assembler = factory.doCreate(bindingId);
- if(assembler!=null) {
- logger.fine(factory.getClass()+" successfully created "+assembler);
- return assembler;
- }
- }
-
- // default binding IDs that are known
- // TODO: replace this with proper ones
- return new com.sun.xml.internal.ws.util.pipe.StandalonePipeAssembler();
- }
-
- private static final Logger logger = Logger.getLogger(PipelineAssemblerFactory.class.getName());
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SOAPBindingCodec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SOAPBindingCodec.java
deleted file mode 100644
index d40bc49d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SOAPBindingCodec.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Message;
-
-import javax.xml.stream.XMLStreamReader;
-
-/**
- *
- *
- * @see com.sun.xml.internal.ws.api.pipe.Codecs
- * @author Jitendra Kotamraju
- */
-public interface SOAPBindingCodec extends Codec {
- StreamSOAPCodec getXMLCodec();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerPipeAssemblerContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerPipeAssemblerContext.java
deleted file mode 100644
index ffeb2864..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerPipeAssemblerContext.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.helper.PipeAdapter;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-
-import java.io.PrintStream;
-
-/**
- * Factory for well-known server {@link Pipe} implementations
- * that the {@link PipelineAssembler} needs to use
- * to satisfy JAX-WS requirements.
- *
- * @author Jitendra Kotamraju
- * @deprecated Use {@link ServerTubeAssemblerContext}.
- */
-public final class ServerPipeAssemblerContext extends ServerTubeAssemblerContext {
-
- public ServerPipeAssemblerContext(@Nullable SEIModel seiModel, @Nullable WSDLPort wsdlModel, @NotNull WSEndpoint endpoint, @NotNull Tube terminal, boolean isSynchronous) {
- super(seiModel, wsdlModel, endpoint, terminal, isSynchronous);
- }
-
- /**
- * Creates a {@link Pipe} that performs SOAP mustUnderstand processing.
- * This pipe should be before HandlerPipes.
- */
- public @NotNull Pipe createServerMUPipe(@NotNull Pipe next) {
- return PipeAdapter.adapt(super.createServerMUTube(PipeAdapter.adapt(next)));
- }
-
- /**
- * creates a {@link Pipe} that dumps messages that pass through.
- */
- public Pipe createDumpPipe(String name, PrintStream out, Pipe next) {
- return PipeAdapter.adapt(super.createDumpTube(name, out, PipeAdapter.adapt(next)));
- }
-
- /**
- * Creates a {@link Pipe} that does the monitoring of the invocation for a
- * container
- */
- public @NotNull Pipe createMonitoringPipe(@NotNull Pipe next) {
- return PipeAdapter.adapt(super.createMonitoringTube(PipeAdapter.adapt(next)));
- }
-
- /**
- * Creates a {@link Pipe} that adds container specific security
- */
- public @NotNull Pipe createSecurityPipe(@NotNull Pipe next) {
- return PipeAdapter.adapt(super.createSecurityTube(PipeAdapter.adapt(next)));
- }
-
- /**
- * creates a {@link Pipe} that validates messages against schema
- */
- public @NotNull Pipe createValidationPipe(@NotNull Pipe next) {
- return PipeAdapter.adapt(super.createValidationTube(PipeAdapter.adapt(next)));
- }
-
- /**
- * Creates a {@link Pipe} that invokes protocol and logical handlers.
- */
- public @NotNull Pipe createHandlerPipe(@NotNull Pipe next) {
- return PipeAdapter.adapt(super.createHandlerTube(PipeAdapter.adapt(next)));
- }
-
- /**
- * The last {@link Pipe} in the pipeline. The assembler is expected to put
- * additional {@link Pipe}s in front of it.
- *
- * <p>
- * (Just to give you the idea how this is used, normally the terminal pipe
- * is the one that invokes the user application or {@link javax.xml.ws.Provider}.)
- *
- * @return always non-null terminal pipe
- */
- public @NotNull Pipe getTerminalPipe() {
- return PipeAdapter.adapt(super.getTerminalTube());
- }
-
- /**
- * Creates WS-Addressing pipe
- */
- public Pipe createWsaPipe(Pipe next) {
- return PipeAdapter.adapt(super.createWsaTube(PipeAdapter.adapt(next)));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerTubeAssemblerContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerTubeAssemblerContext.java
deleted file mode 100644
index a014604b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerTubeAssemblerContext.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.addressing.W3CWsaServerTube;
-import com.sun.xml.internal.ws.addressing.v200408.MemberSubmissionWsaServerTube;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.helper.PipeAdapter;
-import com.sun.xml.internal.ws.api.server.ServerPipelineHook;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.developer.SchemaValidationFeature;
-import com.sun.xml.internal.ws.handler.HandlerTube;
-import com.sun.xml.internal.ws.handler.ServerLogicalHandlerTube;
-import com.sun.xml.internal.ws.handler.ServerMessageHandlerTube;
-import com.sun.xml.internal.ws.handler.ServerSOAPHandlerTube;
-import com.sun.xml.internal.ws.protocol.soap.ServerMUTube;
-import com.sun.xml.internal.ws.server.ServerSchemaValidationTube;
-import com.sun.xml.internal.ws.util.pipe.DumpTube;
-
-import javax.xml.ws.soap.SOAPBinding;
-import java.io.PrintStream;
-
-/**
- * Factory for well-known server {@link Tube} implementations
- * that the {@link TubelineAssembler} needs to use
- * to satisfy JAX-WS requirements.
- *
- * @author Jitendra Kotamraju
- */
-public class ServerTubeAssemblerContext {
-
- private final SEIModel seiModel;
- private final WSDLPort wsdlModel;
- private final WSEndpoint endpoint;
- private final BindingImpl binding;
- private final Tube terminal;
- private final boolean isSynchronous;
- private @NotNull Codec codec;
-
- public ServerTubeAssemblerContext(@Nullable SEIModel seiModel,
- @Nullable WSDLPort wsdlModel, @NotNull WSEndpoint endpoint,
- @NotNull Tube terminal, boolean isSynchronous) {
- this.seiModel = seiModel;
- this.wsdlModel = wsdlModel;
- this.endpoint = endpoint;
- this.terminal = terminal;
- // WSBinding is actually BindingImpl
- this.binding = (BindingImpl)endpoint.getBinding();
- this.isSynchronous = isSynchronous;
- this.codec = this.binding.createCodec();
- }
-
- /**
- * The created pipeline will use seiModel to get java concepts for the endpoint
- *
- * @return Null if the service doesn't have SEI model e.g. Provider endpoints,
- * and otherwise non-null.
- */
- public @Nullable SEIModel getSEIModel() {
- return seiModel;
- }
-
- /**
- * The created pipeline will be used to serve this port.
- *
- * @return Null if the service isn't associated with any port definition in WSDL,
- * and otherwise non-null.
- */
- public @Nullable WSDLPort getWsdlModel() {
- return wsdlModel;
- }
-
- /**
- *
- * The created pipeline is used to serve this {@link com.sun.xml.internal.ws.api.server.WSEndpoint}.
- * Specifically, its {@link com.sun.xml.internal.ws.api.WSBinding} should be of interest to many
- * {@link com.sun.xml.internal.ws.api.pipe.Pipe}s.
- * @return Always non-null.
- */
- public @NotNull WSEndpoint<?> getEndpoint() {
- return endpoint;
- }
-
- /**
- * The last {@link com.sun.xml.internal.ws.api.pipe.Pipe} in the pipeline. The assembler is expected to put
- * additional {@link com.sun.xml.internal.ws.api.pipe.Pipe}s in front of it.
- *
- * <p>
- * (Just to give you the idea how this is used, normally the terminal pipe
- * is the one that invokes the user application or {@link javax.xml.ws.Provider}.)
- *
- * @return always non-null terminal pipe
- */
- public @NotNull Tube getTerminalTube() {
- return terminal;
- }
-
- /**
- * If this server pipeline is known to be used for serving synchronous transport,
- * then this method returns true. This can be potentially use as an optimization
- * hint, since often synchronous versions are cheaper to execute than asycnhronous
- * versions.
- */
- public boolean isSynchronous() {
- return isSynchronous;
- }
-
- /**
- * Creates a {@link Tube} that performs SOAP mustUnderstand processing.
- * This pipe should be before HandlerPipes.
- */
- public @NotNull Tube createServerMUTube(@NotNull Tube next) {
- if (binding instanceof SOAPBinding)
- return new ServerMUTube(this,next);
- else
- return next;
- }
-
- /**
- * Creates a {@link Tube} that invokes protocol and logical handlers.
- */
- public @NotNull Tube createHandlerTube(@NotNull Tube next) {
- if (!binding.getHandlerChain().isEmpty()) {
- HandlerTube cousin = new ServerLogicalHandlerTube(binding, seiModel, wsdlModel, next);
- next = cousin;
- if (binding instanceof SOAPBinding) {
- //Add SOAPHandlerTube
- next = cousin = new ServerSOAPHandlerTube(binding, next, cousin);
-
- //Add MessageHandlerTube
- next = new ServerMessageHandlerTube(seiModel, binding, next, cousin);
- }
- }
- return next;
- }
-
- /**
- * Creates a {@link Tube} that does the monitoring of the invocation for a
- * container
- */
- public @NotNull Tube createMonitoringTube(@NotNull Tube next) {
- ServerPipelineHook hook = endpoint.getContainer().getSPI(ServerPipelineHook.class);
- if (hook != null) {
- ServerPipeAssemblerContext ctxt = new ServerPipeAssemblerContext(seiModel, wsdlModel, endpoint, terminal, isSynchronous);
- return PipeAdapter.adapt(hook.createMonitoringPipe(ctxt, PipeAdapter.adapt(next)));
- }
- return next;
- }
-
- /**
- * Creates a {@link Tube} that adds container specific security
- */
- public @NotNull Tube createSecurityTube(@NotNull Tube next) {
- ServerPipelineHook hook = endpoint.getContainer().getSPI(ServerPipelineHook.class);
- if (hook != null) {
- ServerPipeAssemblerContext ctxt = new ServerPipeAssemblerContext(seiModel, wsdlModel, endpoint, terminal, isSynchronous);
- return PipeAdapter.adapt(hook.createSecurityPipe(ctxt, PipeAdapter.adapt(next)));
- }
- return next;
- }
-
- /**
- * creates a {@link Tube} that dumps messages that pass through.
- */
- public Tube createDumpTube(String name, PrintStream out, Tube next) {
- return new DumpTube(name, out, next);
- }
-
- /**
- * creates a {@link Tube} that validates messages against schema
- */
- public Tube createValidationTube(Tube next) {
- if (binding instanceof SOAPBinding && binding.isFeatureEnabled(SchemaValidationFeature.class) && wsdlModel!=null)
- return new ServerSchemaValidationTube(endpoint, binding, seiModel, wsdlModel, next);
- else
- return next;
- }
-
- /**
- * Creates WS-Addressing pipe
- */
- public Tube createWsaTube(Tube next) {
- if (binding instanceof SOAPBinding && AddressingVersion.isEnabled(binding)) {
- if(AddressingVersion.fromBinding(binding) == AddressingVersion.MEMBER) {
- return new MemberSubmissionWsaServerTube(endpoint, wsdlModel, binding, next);
- } else {
- return new W3CWsaServerTube(endpoint, wsdlModel, binding, next);
- }
- } else
- return next;
- }
-
- /**
- * Gets the {@link Codec} that is set by {@link #setCodec} or the default codec
- * based on the binding. The codec is a full codec that is responsible for
- * encoding/decoding entire protocol message(for e.g: it is responsible to
- * encode/decode entire MIME messages in SOAP binding)
- *
- * @return codec to be used for web service requests
- * @see Codecs
- */
- public @NotNull Codec getCodec() {
- return codec;
- }
-
- /**
- * Interception point to change {@link Codec} during {@link Tube}line assembly. The
- * new codec will be used by jax-ws server runtime for encoding/decoding web service
- * request/response messages. {@link WSEndpoint#createCodec()} will return a copy
- * of this new codec and will be used in the server runtime.
- *
- * <p>
- * The codec is a full codec that is responsible for
- * encoding/decoding entire protocol message(for e.g: it is responsible to
- * encode/decode entire MIME messages in SOAP binding)
- *
- * <p>
- * the codec should correctly implement {@link Codec#copy} since it is used while
- * serving requests concurrently.
- *
- * @param codec codec to be used for web service requests
- * @see Codecs
- */
- public void setCodec(@NotNull Codec codec) {
- this.codec = codec;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/StreamSOAPCodec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/StreamSOAPCodec.java
deleted file mode 100644
index aa3bdbe0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/StreamSOAPCodec.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * Reads events from {@link XMLStreamReader} and constructs a
- * {@link Message} for SOAP envelope. {@link Codecs} allows a
- * way to construct a whole codec that can handle MTOM, MIME
- * encoded packages using this codec.
- *
- *
- * @see Codecs
- * @author Jitendra Kotamraju
- */
-public interface StreamSOAPCodec extends Codec {
- /**
- * Reads events from {@link XMLStreamReader} and constructs a
- * {@link Message} for SOAP envelope.
- *
- * @param reader that represents SOAP envelope infoset
- * @return a {@link Message} for SOAP envelope
- */
- public @NotNull Message decode(@NotNull XMLStreamReader reader);
-
- /**
- * Reads events from {@link XMLStreamReader} and constructs a
- * {@link Message} for SOAP envelope.
- *
- * @param reader that represents SOAP envelope infoset
- * @param att attachments for the message
- * @return a {@link Message} for SOAP envelope
- */
- public @NotNull Message decode(@NotNull XMLStreamReader reader, @NotNull AttachmentSet att);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Stubs.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Stubs.java
deleted file mode 100644
index b8684f51..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Stubs.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.WSServiceDelegate;
-import com.sun.xml.internal.ws.client.dispatch.DataSourceDispatch;
-import com.sun.xml.internal.ws.client.dispatch.DispatchImpl;
-import com.sun.xml.internal.ws.client.dispatch.JAXBDispatch;
-import com.sun.xml.internal.ws.client.dispatch.MessageDispatch;
-import com.sun.xml.internal.ws.client.dispatch.PacketDispatch;
-import com.sun.xml.internal.ws.client.sei.SEIStub;
-import com.sun.xml.internal.ws.developer.WSBindingProvider;
-import com.sun.xml.internal.ws.model.SOAPSEIModel;
-
-import javax.activation.DataSource;
-import javax.xml.bind.JAXBContext;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.Source;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Service;
-import javax.xml.ws.Service.Mode;
-import javax.xml.ws.WebServiceException;
-import java.lang.reflect.Proxy;
-
-/**
- * Factory methods of various stubs.
- *
- * <p>
- * This class provides various methods to create "stub"s,
- * which are the component that turns a method invocation
- * into a {@link Message} and back into a return value.
- *
- * <p>
- * This class is meant to serve as the API from JAX-WS to
- * Tango, so that they don't have hard-code dependency on
- * our implementation classes.
- *
- * <a name="param"></a>
- * <h2>Common Parameters and Their Meanings</h2>
- *
- * <h3>Pipe next</h3>
- * <p>
- * Stubs turn a method invocation into a {@link Pipe#process(com.sun.xml.internal.ws.api.message.Packet)} invocation,
- * and this pipe passed in as the <tt>next</tt> parameter will receive a {@link Message}
- * from newly created stub. All the methods taking Tube <<next>> parameter are deprecated. JAX-WS Runtime takes care of
- * creating the tubeline when the <tt>next</tt> parameter is not passed. This gives flexibility for the JAX-WS Runtime
- * to pass extra information during the tube line creation via {@link ClientTubeAssemblerContext}.
- *
- * <h3>WSPortInfo portInfo</h3>
- * <p> Gives information about the port for which the "stub" being created. Such information includes Port QName,
- * target endpoint address, and bindingId etc.
- *
- * <h3>BindingImpl binding</h3>
- * <p>
- * Stubs implement {@link BindingProvider}, and its {@link BindingProvider#getBinding()}
- * will return this <tt>binding</tt> object. Stubs often also use this information
- * to decide which SOAP version a {@link Message} should be created in.
- *
- * <h3>{@link WSService} service</h3>
- * <p>
- * This object represents a {@link Service} that owns the newly created stub.
- * For example, asynchronous method invocation will use {@link Service#getExecutor()}.
- *
- * <h3>{@link WSEndpointReference} epr</h3>
- * <p>
- * If you want the created {@link Dispatch} to talk to the given EPR, specify the parameter.
- * Otherwise leave it <tt>null</tt>. Note that the addressing needs to be enabled separately
- * for this to take effect.
- *
- * @author Kohsuke Kawaguchi
- * @author Kathy Walsh
- */
-public abstract class Stubs {
- private Stubs() {} // no instanciation please
-
- /**
- * Creates a new {@link Dispatch} stub for {@link SOAPMessage}.
- *
- * This is short-cut of calling
- * <pre>
- * createDispatch(port,owner,binding,SOAPMessage.class,mode,next);
- * </pre>
- */
- @Deprecated
- public static Dispatch<SOAPMessage> createSAAJDispatch(QName portName, WSService owner, WSBinding binding, Service.Mode mode, Tube next, @Nullable WSEndpointReference epr) {
- DispatchImpl.checkValidSOAPMessageDispatch(binding, mode);
- return new com.sun.xml.internal.ws.client.dispatch.SOAPMessageDispatch(portName, mode, (WSServiceDelegate)owner, next, (BindingImpl)binding, epr);
- }
-
- /**
- * Creates a new {@link Dispatch} stub for {@link SOAPMessage}.
- *
- * This is short-cut of calling
- * <pre>
- * createDispatch(port,owner,binding,SOAPMessage.class,mode,next);
- * </pre>
- */
- public static Dispatch<SOAPMessage> createSAAJDispatch(WSPortInfo portInfo, WSBinding binding, Service.Mode mode, @Nullable WSEndpointReference epr) {
- DispatchImpl.checkValidSOAPMessageDispatch(binding, mode);
- return new com.sun.xml.internal.ws.client.dispatch.SOAPMessageDispatch(portInfo, mode, (BindingImpl)binding, epr);
- }
-
- /**
- * Creates a new {@link Dispatch} stub for {@link DataSource}.
- *
- * This is short-cut of calling
- * <pre>
- * createDispatch(port,owner,binding,DataSource.class,mode,next);
- * </pre>
- */
- @Deprecated
- public static Dispatch<DataSource> createDataSourceDispatch(QName portName, WSService owner, WSBinding binding, Service.Mode mode, Tube next, @Nullable WSEndpointReference epr) {
- DispatchImpl.checkValidDataSourceDispatch(binding, mode);
- return new DataSourceDispatch(portName, mode, (WSServiceDelegate)owner, next, (BindingImpl)binding, epr);
- }
-
- /**
- * Creates a new {@link Dispatch} stub for {@link DataSource}.
- *
- * This is short-cut of calling
- * <pre>
- * createDispatch(port,owner,binding,DataSource.class,mode,next);
- * </pre>
- */
- public static Dispatch<DataSource> createDataSourceDispatch(WSPortInfo portInfo, WSBinding binding, Service.Mode mode,@Nullable WSEndpointReference epr) {
- DispatchImpl.checkValidDataSourceDispatch(binding, mode);
- return new DataSourceDispatch(portInfo, mode, (BindingImpl)binding, epr);
- }
-
- /**
- * Creates a new {@link Dispatch} stub for {@link Source}.
- *
- * This is short-cut of calling
- * <pre>
- * createDispatch(port,owner,binding,Source.class,mode,next);
- * </pre>
- */
- @Deprecated
- public static Dispatch<Source> createSourceDispatch(QName portName, WSService owner, WSBinding binding, Service.Mode mode, Tube next, @Nullable WSEndpointReference epr) {
- return DispatchImpl.createSourceDispatch(portName, mode, (WSServiceDelegate)owner, next, (BindingImpl)binding, epr);
- }
-
- /**
- * Creates a new {@link Dispatch} stub for {@link Source}.
- *
- * This is short-cut of calling
- * <pre>
- * createDispatch(port,owner,binding,Source.class,mode,next);
- * </pre>
- */
- public static Dispatch<Source> createSourceDispatch(WSPortInfo portInfo, WSBinding binding, Service.Mode mode, @Nullable WSEndpointReference epr) {
- return DispatchImpl.createSourceDispatch(portInfo, mode, (BindingImpl)binding, epr);
- }
-
- /**
- * Creates a new {@link Dispatch} stub that connects to the given pipe.
- *
- * @param portName
- * see {@link Service#createDispatch(QName, Class, Service.Mode)}.
- * @param owner
- * see <a href="#param">common parameters</a>
- * @param binding
- * see <a href="#param">common parameters</a>
- * @param clazz
- * Type of the {@link Dispatch} to be created.
- * See {@link Service#createDispatch(QName, Class, Service.Mode)}.
- * @param mode
- * The mode of the dispatch.
- * See {@link Service#createDispatch(QName, Class, Service.Mode)}.
- * @param next
- * see <a href="#param">common parameters</a>
- * @param epr
- * see <a href="#param">common parameters</a>
- * TODO: are these parameters making sense?
- */
- @SuppressWarnings("unchecked")
- public static <T> Dispatch<T> createDispatch(QName portName,
- WSService owner,
- WSBinding binding,
- Class<T> clazz, Service.Mode mode, Tube next,
- @Nullable WSEndpointReference epr) {
- if (clazz == SOAPMessage.class) {
- return (Dispatch<T>) createSAAJDispatch(portName, owner, binding, mode, next, epr);
- } else if (clazz == Source.class) {
- return (Dispatch<T>) createSourceDispatch(portName, owner, binding, mode, next, epr);
- } else if (clazz == DataSource.class) {
- return (Dispatch<T>) createDataSourceDispatch(portName, owner, binding, mode, next, epr);
- } else if (clazz == Message.class) {
- if(mode==Mode.MESSAGE)
- return (Dispatch<T>) createMessageDispatch(portName, owner, binding, next, epr);
- else
- throw new WebServiceException(mode+" not supported with Dispatch<Message>");
- } else if (clazz == Packet.class) {
- return (Dispatch<T>) createPacketDispatch(portName, owner, binding, next, epr);
- } else
- throw new WebServiceException("Unknown class type " + clazz.getName());
- }
-
- /**
- * Creates a new {@link Dispatch} stub that connects to the given pipe.
- *
- * @param portInfo
- * see <a href="#param">common parameters</a>
- * @param owner
- * see <a href="#param">common parameters</a>
- * @param binding
- * see <a href="#param">common parameters</a>
- * @param clazz
- * Type of the {@link Dispatch} to be created.
- * See {@link Service#createDispatch(QName, Class, Service.Mode)}.
- * @param mode
- * The mode of the dispatch.
- * See {@link Service#createDispatch(QName, Class, Service.Mode)}.
- * @param epr
- * see <a href="#param">common parameters</a>
- * TODO: are these parameters making sense?
- */
- public static <T> Dispatch<T> createDispatch(WSPortInfo portInfo,
- WSService owner,
- WSBinding binding,
- Class<T> clazz, Service.Mode mode,
- @Nullable WSEndpointReference epr) {
- if (clazz == SOAPMessage.class) {
- return (Dispatch<T>) createSAAJDispatch(portInfo, binding, mode, epr);
- } else if (clazz == Source.class) {
- return (Dispatch<T>) createSourceDispatch(portInfo, binding, mode, epr);
- } else if (clazz == DataSource.class) {
- return (Dispatch<T>) createDataSourceDispatch(portInfo, binding, mode, epr);
- } else if (clazz == Message.class) {
- if(mode==Mode.MESSAGE)
- return (Dispatch<T>) createMessageDispatch(portInfo, binding, epr);
- else
- throw new WebServiceException(mode+" not supported with Dispatch<Message>");
- } else if (clazz == Packet.class) {
- if(mode==Mode.MESSAGE)
- return (Dispatch<T>) createPacketDispatch(portInfo, binding, epr);
- else
- throw new WebServiceException(mode+" not supported with Dispatch<Packet>");
- } else
- throw new WebServiceException("Unknown class type " + clazz.getName());
- }
-
- /**
- * Creates a new JAXB-based {@link Dispatch} stub that connects to the given pipe.
- *
- * @param portName
- * see {@link Service#createDispatch(QName, Class, Service.Mode)}.
- * @param owner
- * see <a href="#param">common parameters</a>
- * @param binding
- * see <a href="#param">common parameters</a>
- * @param jaxbContext
- * {@link JAXBContext} used to convert between objects and XML.
- * @param mode
- * The mode of the dispatch.
- * See {@link Service#createDispatch(QName, Class, Service.Mode)}.
- * @param next
- * see <a href="#param">common parameters</a>
- * @param epr
- * see <a href="#param">common parameters</a>
- */
- @Deprecated
- public static Dispatch<Object> createJAXBDispatch(
- QName portName, WSService owner, WSBinding binding,
- JAXBContext jaxbContext, Service.Mode mode, Tube next,
- @Nullable WSEndpointReference epr) {
- return new JAXBDispatch(portName, jaxbContext, mode, (WSServiceDelegate)owner, next, (BindingImpl)binding, epr);
- }
-
- /**
- * Creates a new JAXB-based {@link Dispatch} stub that connects to the given pipe.
- *
- * @param portInfo see <a href="#param">common parameters</a>
- * @param binding see <a href="#param">common parameters</a>
- * @param jaxbContext {@link JAXBContext} used to convert between objects and XML.
- * @param mode The mode of the dispatch.
- * See {@link Service#createDispatch(QName, Class, Service.Mode)}.
- * @param epr see <a href="#param">common parameters</a>
- */
- public static Dispatch<Object> createJAXBDispatch(
- WSPortInfo portInfo, WSBinding binding,
- JAXBContext jaxbContext, Service.Mode mode,
- @Nullable WSEndpointReference epr) {
- return new JAXBDispatch(portInfo, jaxbContext, mode, (BindingImpl) binding, epr);
- }
-
-
- /**
- * Creates a new {@link Message}-based {@link Dispatch} stub that connects to the given pipe.
- * The returned dispatch is always {@link Mode#MESSAGE}.
- *
- * @param portName
- * see {@link Service#createDispatch(QName, Class, Service.Mode)}.
- * @param owner
- * see <a href="#param">common parameters</a>
- * @param binding
- * see <a href="#param">common parameters</a>
- * @param next
- * see <a href="#param">common parameters</a>
- * @param epr
- * see <a href="#param">common parameters</a>
- */
- @Deprecated
- public static Dispatch<Message> createMessageDispatch(
- QName portName, WSService owner, WSBinding binding,
- Tube next, @Nullable WSEndpointReference epr) {
- return new MessageDispatch(portName, (WSServiceDelegate)owner, next, (BindingImpl)binding, epr);
- }
-
-
- /**
- * Creates a new {@link Message}-based {@link Dispatch} stub that connects to the given pipe.
- * The returned dispatch is always {@link Mode#MESSAGE}.
- *
- * @param portInfo
- * see <a href="#param">common parameters</a>
- * @param binding
- * see <a href="#param">common parameters</a>
- * @param epr
- * see <a href="#param">common parameters</a>
- */
- public static Dispatch<Message> createMessageDispatch(
- WSPortInfo portInfo, WSBinding binding,
- @Nullable WSEndpointReference epr) {
- return new MessageDispatch(portInfo, (BindingImpl)binding, epr);
- }
-
- /**
- * Creates a new {@link Packet}-based {@link Dispatch} stub that connects to the given pipe.
- *
- * @param portName
- * see {@link Service#createDispatch(QName, Class, Service.Mode)}.
- * @param owner
- * see <a href="#param">common parameters</a>
- * @param binding
- * see <a href="#param">common parameters</a>
- * @param next
- * see <a href="#param">common parameters</a>
- * @param epr
- * see <a href="#param">common parameters</a>
- */
- public static Dispatch<Packet> createPacketDispatch(
- QName portName, WSService owner, WSBinding binding,
- Tube next, @Nullable WSEndpointReference epr) {
- return new PacketDispatch(portName, (WSServiceDelegate)owner, next, (BindingImpl)binding, epr);
- }
-
- /**
- * Creates a new {@link Message}-based {@link Dispatch} stub that connects to the given pipe.
- * The returned dispatch is always {@link Mode#MESSAGE}.
- *
- * @param portInfo
- * see <a href="#param">common parameters</a>
- * @param binding
- * see <a href="#param">common parameters</a>
- * @param epr
- * see <a href="#param">common parameters</a>
- */
- public static Dispatch<Packet> createPacketDispatch(
- WSPortInfo portInfo, WSBinding binding,
- @Nullable WSEndpointReference epr) {
- return new PacketDispatch(portInfo, (BindingImpl)binding, epr);
- }
-
- /**
- * Creates a new strongly-typed proxy object that implements a given port interface.
- *
- * @param service
- * see <a href="#param">common parameters</a>
- * @param binding
- * see <a href="#param">common parameters</a>
- * @param model
- * This model shall represent a port interface.
- * TODO: can model be constructed from portInterface and binding?
- * Find out and update.
- * @param portInterface
- * The port interface that has operations as Java methods.
- * @param next
- * see <a href="#param">common parameters</a>
- * @param epr
- * see <a href="#param">common parameters</a>
- */
- public <T> T createPortProxy( WSService service, WSBinding binding, SEIModel model,
- Class<T> portInterface, Tube next, @Nullable WSEndpointReference epr ) {
-
- SEIStub ps = new SEIStub((WSServiceDelegate)service,(BindingImpl)binding, (SOAPSEIModel)model, next, epr);
- return portInterface.cast(
- Proxy.newProxyInstance( portInterface.getClassLoader(),
- new Class[]{portInterface, WSBindingProvider.class}, ps ));
- }
-
- /**
- * Creates a new strongly-typed proxy object that implements a given port interface.
- *
- * @param portInfo
- * see <a href="#param">common parameters</a>
- * @param binding
- * see <a href="#param">common parameters</a>
- * @param model
- * This model shall represent a port interface.
- * TODO: can model be constructed from portInterface and binding?
- * Find out and update.
- * @param portInterface
- * The port interface that has operations as Java methods.
- * @param epr
- * see <a href="#param">common parameters</a>
- */
- public <T> T createPortProxy( WSPortInfo portInfo, WSBinding binding, SEIModel model,
- Class<T> portInterface, @Nullable WSEndpointReference epr ) {
-
- SEIStub ps = new SEIStub(portInfo, (BindingImpl)binding, (SOAPSEIModel)model, epr);
- return portInterface.cast(
- Proxy.newProxyInstance( portInterface.getClassLoader(),
- new Class[]{portInterface, WSBindingProvider.class}, ps ));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SyncStartForAsyncFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SyncStartForAsyncFeature.java
deleted file mode 100644
index 96d5a66f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SyncStartForAsyncFeature.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * Feature used to request starting a fiber synchronous to the calling
- * thread but allowing it to later switch to run asynchronously to that thread.
- *
- * @since 2.2.6
- */
-public class SyncStartForAsyncFeature
- extends WebServiceFeature {
-
- public SyncStartForAsyncFeature() {
- enabled = true;
- }
-
- @Override
- public String getID() {
- return SyncStartForAsyncFeature.class.getSimpleName();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ThrowableContainerPropertySet.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ThrowableContainerPropertySet.java
deleted file mode 100644
index b627152f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ThrowableContainerPropertySet.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.pipe;
-
-import javax.xml.ws.Dispatch;
-
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.oracle.webservices.internal.api.message.BasePropertySet;
-import com.oracle.webservices.internal.api.message.PropertySet;
-
-/**
- * When using {@link Dispatch}<{@link Packet}> and the invocation completes with a Throwable, it is
- * useful to be able to inspect the Packet in addition to the Throwable as the Packet contains
- * meta-data about the request and/or response. However, the default behavior is that the caller
- * only receives the Throwable.
- *
- * This {@link PropertySet} is part of the implementation that allows a completing Fiber to return
- * the Throwable to the caller as part of the Packet.
- *
- */
-public class ThrowableContainerPropertySet extends BasePropertySet {
-
- public ThrowableContainerPropertySet(final Throwable throwable) {
- this.throwable = throwable;
- }
-
- ////////////////////////////////////////////////////
- //
- // The original throwable
- //
- public static final String FIBER_COMPLETION_THROWABLE = "com.sun.xml.internal.ws.api.pipe.fiber-completion-throwable";
- private Throwable throwable;
- @Property(FIBER_COMPLETION_THROWABLE)
- public Throwable getThrowable() {
- return throwable;
- }
- public void setThrowable(final Throwable throwable) {
- this.throwable = throwable;
- }
-
- ////////////////////////////////////////////////////
- //
- // The FAULT message created in WsaServerTube or WSEndpointImpl
- //
- public static final String FAULT_MESSAGE = "com.sun.xml.internal.ws.api.pipe.fiber-completion-fault-message";
- private Message faultMessage;
- @Property(FAULT_MESSAGE)
- public Message getFaultMessage() {
- return faultMessage;
- }
- public void setFaultMessage(final Message faultMessage) {
- this.faultMessage = faultMessage;
- }
-
- ////////////////////////////////////////////////////
- //
- // The response Packet seen in WsaServerTube.processException or WSEndpointImpl
- //
- public static final String RESPONSE_PACKET = "com.sun.xml.internal.ws.api.pipe.fiber-completion-response-packet";
- private Packet responsePacket;
- @Property(RESPONSE_PACKET)
- public Packet getResponsePacket() {
- return responsePacket;
- }
- public void setResponsePacket(final Packet responsePacket) {
- this.responsePacket = responsePacket;
- }
-
- ////////////////////////////////////////////////////
- //
- // If the fault representation of the exception has already been created
- //
- public static final String IS_FAULT_CREATED = "com.sun.xml.internal.ws.api.pipe.fiber-completion-is-fault-created";
- private boolean isFaultCreated = false;
- @Property(IS_FAULT_CREATED)
- public boolean isFaultCreated() {
- return isFaultCreated;
- }
- public void setFaultCreated(final boolean isFaultCreated) {
- this.isFaultCreated = isFaultCreated;
- }
-
- //
- // boilerplate
- //
-
- @Override
- protected PropertyMap getPropertyMap() {
- return model;
- }
-
- private static final PropertyMap model;
- static {
- model = parse(ThrowableContainerPropertySet.class);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportPipeFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportPipeFactory.java
deleted file mode 100644
index ecdb060c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportPipeFactory.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-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.pipe.helper.PipeAdapter;
-import com.sun.xml.internal.ws.util.pipe.StandalonePipeAssembler;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * Factory for transport pipes that enables transport pluggability.
- *
- * <p>
- * At runtime, on the client side, JAX-WS (more specifically the default {@link PipelineAssembler}
- * of JAX-WS client runtime) relies on this factory to create a suitable transport {@link Pipe}
- * that can handle the given {@link EndpointAddress endpoint address}.
- *
- * <p>
- * JAX-WS extensions that provide additional transport support can
- * extend this class and implement the {@link #doCreate} method.
- * They are expected to check the scheme of the endpoint address
- * (and possibly some other settings from bindings), and create
- * their transport pipe implementations accordingly.
- * For example,
- *
- * <pre>
- * class MyTransportPipeFactoryImpl {
- * Pipe doCreate(...) {
- * String scheme = address.getURI().getScheme();
- * if(scheme.equals("foo"))
- * return new MyTransport(...);
- * else
- * return null;
- * }
- * }
- * </pre>
- *
- * <p>
- * {@link TransportPipeFactory} look-up follows the standard service
- * discovery mechanism, so you need
- * {@code META-INF/services/com.sun.xml.internal.ws.api.pipe.TransportPipeFactory}.
- *
- *
- *
- * <h2>TODO</h2>
- * <p>
- * One of the JAX-WS operation mode is supposedly where it doesn't have no WSDL whatsoever.
- * How do we identify the endpoint in such case?
- *
- * @author Kohsuke Kawaguchi
- * @see StandalonePipeAssembler
- */
-public abstract class TransportPipeFactory {
- /**
- * Creates a transport {@link Pipe} for the given port, if this factory can do so,
- * or return null.
- *
- * @param context
- * Object that captures various contextual information
- * that can be used to determine the pipeline to be assembled.
- *
- * @return
- * null to indicate that this factory isn't capable of creating a transport
- * for this port (which causes the caller to search for other {@link TransportPipeFactory}s
- * that can. Or non-null.
- *
- * @throws WebServiceException
- * if this factory is capable of creating a transport pipe but some fatal
- * error prevented it from doing so. This exception will be propagated
- * back to the user application, and no further {@link TransportPipeFactory}s
- * are consulted.
- */
- public abstract Pipe doCreate(@NotNull ClientPipeAssemblerContext context);
-
- /**
- * Locates {@link PipelineAssemblerFactory}s and create
- * a suitable {@link PipelineAssembler}.
- *
- * @param classLoader
- * used to locate {@code META-INF/servces} files.
- * @return
- * Always non-null, since we fall back to our default {@link PipelineAssembler}.
- *
- * @deprecated
- * Use {@link TransportTubeFactory#create(ClassLoader, ClientTubeAssemblerContext)}
- */
- public static Pipe create(@Nullable ClassLoader classLoader, @NotNull ClientPipeAssemblerContext context) {
- return PipeAdapter.adapt(TransportTubeFactory.create(classLoader,context));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportTubeFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportTubeFactory.java
deleted file mode 100644
index 3dd57f6d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportTubeFactory.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.pipe;
-
-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.pipe.helper.PipeAdapter;
-import com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import com.sun.xml.internal.ws.util.pipe.StandaloneTubeAssembler;
-import java.util.logging.Level;
-
-import javax.xml.ws.WebServiceException;
-import java.util.logging.Logger;
-
-/**
- * Factory for transport tubes that enables transport pluggability.
- *
- * <p>
- * At runtime, on the client side, JAX-WS (more specifically the default {@link TubelineAssembler}
- * of JAX-WS client runtime) relies on this factory to create a suitable transport {@link Tube}
- * that can handle the given {@link EndpointAddress endpoint address}.
- *
- * <p>
- * JAX-WS extensions that provide additional transport support can
- * extend this class and implement the {@link #doCreate} method.
- * They are expected to check the scheme of the endpoint address
- * (and possibly some other settings from bindings), and create
- * their transport tube implementations accordingly.
- * For example,
- *
- * <pre>
- * class MyTransportTubeFactoryImpl {
- * Tube doCreate(...) {
- * String scheme = address.getURI().getScheme();
- * if(scheme.equals("foo"))
- * return new MyTransport(...);
- * else
- * return null;
- * }
- * }
- * </pre>
- *
- * <p>
- * {@link TransportTubeFactory} look-up follows the standard service
- * discovery mechanism, so you need
- * {@code META-INF/services/com.sun.xml.internal.ws.api.pipe.BasicTransportTubeFactory}.
- *
- * @author Jitendra Kotamraju
- * @see StandaloneTubeAssembler
- */
-public abstract class TransportTubeFactory {
- /**
- * Creates a transport {@link Tube} for the given port, if this factory can do so,
- * or return null.
- *
- * @param context
- * Object that captures various contextual information
- * that can be used to determine the tubeline to be assembled.
- *
- * @return
- * null to indicate that this factory isn't capable of creating a transport
- * for this port (which causes the caller to search for other {@link TransportTubeFactory}s
- * that can. Or non-null.
- *
- * @throws WebServiceException
- * if this factory is capable of creating a transport tube but some fatal
- * error prevented it from doing so. This exception will be propagated
- * back to the user application, and no further {@link TransportTubeFactory}s
- * are consulted.
- */
- public abstract Tube doCreate(@NotNull ClientTubeAssemblerContext context);
-
- private static final TransportTubeFactory DEFAULT = new DefaultTransportTubeFactory();
- private static class DefaultTransportTubeFactory extends TransportTubeFactory {
-
- @Override
- public Tube doCreate(ClientTubeAssemblerContext context) {
- return createDefault(context);
- }
-
- }
-
- /**
- * Locates {@link TransportTubeFactory}s and create a suitable transport {@link Tube}.
- *
- * @param classLoader
- * used to locate {@code META-INF/servces} files.
- * @return
- * Always non-null, since we fall back to our default {@link Tube}.
- */
- public static Tube create(@Nullable ClassLoader classLoader, @NotNull ClientTubeAssemblerContext context) {
- for (TransportTubeFactory factory : ServiceFinder.find(TransportTubeFactory.class,classLoader, context.getContainer())) {
- Tube tube = factory.doCreate(context);
- if (tube !=null) {
- if (logger.isLoggable(Level.FINE)) {
- TransportTubeFactory.logger.log(Level.FINE, "{0} successfully created {1}", new Object[]{factory.getClass(), tube});
- }
- return tube;
- }
- }
-
- // See if there is a {@link TransportPipeFactory} out there and use it for compatibility.
- ClientPipeAssemblerContext ctxt = new ClientPipeAssemblerContext(
- context.getAddress(), context.getWsdlModel(), context.getService(),
- context.getBinding(), context.getContainer());
- ctxt.setCodec(context.getCodec());
- for (TransportPipeFactory factory : ServiceFinder.find(TransportPipeFactory.class,classLoader)) {
- Pipe pipe = factory.doCreate(ctxt);
- if (pipe!=null) {
- if (logger.isLoggable(Level.FINE)) {
- logger.log(Level.FINE, "{0} successfully created {1}", new Object[]{factory.getClass(), pipe});
- }
- return PipeAdapter.adapt(pipe);
- }
- }
-
- return DEFAULT.createDefault(ctxt);
- }
-
- protected Tube createDefault(ClientTubeAssemblerContext context) {
- // default built-in transports
- String scheme = context.getAddress().getURI().getScheme();
- if (scheme != null) {
- if(scheme.equalsIgnoreCase("http") || scheme.equalsIgnoreCase("https"))
- return createHttpTransport(context);
- }
- throw new WebServiceException("Unsupported endpoint address: "+context.getAddress()); // TODO: i18n
- }
-
- protected Tube createHttpTransport(ClientTubeAssemblerContext context) {
- return new HttpTransportPipe(context.getCodec(), context.getBinding());
- }
-
- private static final Logger logger = Logger.getLogger(TransportTubeFactory.class.getName());
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Tube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Tube.java
deleted file mode 100644
index 93bac31c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Tube.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractTubeImpl;
-import com.sun.xml.internal.ws.api.server.Adapter;
-
-import javax.annotation.PreDestroy;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Provider;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.LogicalHandler;
-import javax.xml.ws.handler.soap.SOAPHandler;
-import java.text.SimpleDateFormat;
-
-/**
- * Abstraction of the intermediate layers in the processing chain
- * and transport.
- *
- * <h2>What is a {@link Tube}?</h2>
- * <p>
- * {@link Tube} is a basic processing unit that represents SOAP-level
- * protocol handling code. Mutliple tubes are often put together in
- * a line (it needs not one dimensional &mdash; more later), and act on
- * {@link Packet}s in a sequential fashion.
- *
- * <p>
- * {@link Tube}s run asynchronously. That is, there is no guarantee that
- * {@link #processRequest(Packet)} and {@link #processResponse(Packet)} runs
- * in the same thread, nor is there any guarantee that this tube and next
- * tube runs in the same thread. Furthermore, one thread may be used to
- * run multiple pipeline in turn (just like a real CPU runs multiple
- * threads in turn.)
- *
- *
- * <h2>Tube examples</h2>
- * <p>
- * Transport is a kind of tube. It sends the {@link Packet}
- * through, say, HTTP connection, and receives the data back into another {@link Packet}.
- *
- * <p>
- * More often, a tube works like a filter. It acts on a packet,
- * and then it tells the JAX-WS that the packet should be passed into another
- * tube. It can do the same on the way back.
- *
- * <p>
- * For example, XWSS will be a {@link Tube}. It will act on a request
- * {@link Packet}, then perhaps wrap it into
- * another {@link Packet} to encrypt the body and add a header, then
- * the processing will go on to the next tube.
- *
- * <p>
- * Yet another kind of filter tube is those that wraps {@link LogicalHandler}
- * and {@link SOAPHandler}. These tubes are heavy-weight; they often consume
- * a message in a packet and create a new one, and then pass it to the next tube.
- *
- * <p>
- * There would be a {@link Tube} implementation that invokes {@link Provider}.
- * There would be a {@link Tube} implementation that invokes a service method
- * on the user's code.
- * There would be a {@link Dispatch} implementation that invokes a {@link Tube}.
- *
- * <p>
- * WS-MEX can be implemented as a {@link Tube} that looks for
- * {@link Message#getPayloadNamespaceURI()} and serves the request.
- *
- *
- *
- *
- * <h2>Tube Lifecycle</h2>
- * Pipeline is expensive to set up, so once it's created it will be reused.
- * A pipeline is not reentrant; one pipeline is used to process one request/response
- * at at time. The same pipeline instance may serve multiple request/response,
- * if one comes after another and they don't overlap.
- * <p>
- * Where a need arises to process multiple requests concurrently, a pipeline
- * gets cloned through {@link TubeCloner}. Note that this need may happen on
- * both server (because it quite often serves multiple requests concurrently)
- * and client (because it needs to support asynchronous method invocations.)
- * <p>
- * Created pipelines (including cloned ones and the original) may be discarded and GC-ed
- * at any time at the discretion of whoever owns pipelines. Tubes can, however, expect
- * at least one copy (or original) of pipeline to live at any given time while a pipeline
- * owner is interested in the given pipeline configuration (in more concerete terms,
- * for example, as long as a dispatch object lives, it's going to keep at least one
- * copy of a pipeline alive.)
- * <p>
- * Before a pipeline owner dies, it may invoke {@link #preDestroy()} on the last
- * remaining pipeline. It is "may" for pipeline owners that live in the client-side
- * of JAX-WS (such as dispatches and proxies), but it is a "must" for pipeline owners
- * that live in the server-side of JAX-WS.
- * <p>
- * This last invocation gives a chance for some pipes to clean up any state/resource
- * acquired (such as WS-RM's sequence, WS-Trust's SecurityToken), although as stated above,
- * this is not required for clients.
- *
- *
- *
- * <h2>Tube and state</h2>
- * <p>
- * The lifecycle of pipelines is designed to allow a {@link Tube} to store various
- * state in easily accessible fashion.
- *
- *
- * <h3>Per-packet state</h3>
- * <p>
- * Any information that changes from a packet to packet should be
- * stored in {@link Packet} (if such informaton is specific to your problem domain,
- * then most likely {@link Packet#invocationProperties}.)
- * This includes information like transport-specific headers.
- *
- * <h3>Per-thread state</h3>
- * <p>
- * Any expensive-to-create objects that are non-reentrant can be stored
- * either in instance variables of a {@link Tube}, or a static {@link ThreadLocal}.
- *
- * <p>
- * The first approach works, because {@link Tube} is
- * non reentrant. When a tube is copied, new instances should be allocated
- * so that two {@link Tube} instances don't share thread-unsafe resources.
- *
- * Similarly the second approach works, since {@link ThreadLocal} guarantees
- * that each thread gets its own private copy.
- *
- * <p>
- * The former is faster to access, and you need not worry about clean up.
- * On the other hand, because there can be many more concurrent requests
- * than # of threads, you may end up holding onto more resources than necessary.
- *
- * <p>
- * This includes state like canonicalizers, JAXB unmarshallers,
- * {@link SimpleDateFormat}, etc.
- *
- *
- * <h3>Per-proxy/per-endpoint state</h3>
- * <p>
- * Information that is tied to a particular proxy/dispatch can be stored
- * in a separate object that is referenced from a tube. When
- * a new tube is copied, you can simply hand out a reference to the newly
- * created one, so that all copied tubes refer to the same instance.
- * See the following code as an example:
- *
- * <pre>
- * class TubeImpl {
- * // this object stores per-proxy state
- * class DataStore {
- * int counter;
- * }
- *
- * private DataStore ds;
- *
- * // create a fresh new pipe
- * public TubeImpl(...) {
- * ....
- * ds = new DataStore();
- * }
- *
- * // copy constructor
- * private TubeImpl(TubeImpl that, PipeCloner cloner) {
- * cloner.add(that,this);
- * ...
- * this.ds = that.ds;
- * }
- *
- * public TubeImpl copy(PipeCloner pc) {
- * return new TubeImpl(this,pc);
- * }
- * }
- * </pre>
- *
- * <p>
- * Note that access to such resource may need to be synchronized,
- * since multiple copies of pipelines may execute concurrently.
- *
- *
- *
- * <h3>VM-wide state</h3>
- * <p>
- * <tt>static</tt> is always there for you to use.
- *
- *
- *
- * @see AbstractTubeImpl
- * @see AbstractFilterTubeImpl
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public interface Tube {
- /**
- * Acts on a request and perform some protocol specific operation.
- *
- * TODO: exception handling semantics need more discussion
- *
- * @throws WebServiceException
- * On the server side, this signals an error condition where
- * a fault reply is in order (or the exception gets eaten by
- * the top-most transport {@link Adapter} if it's one-way.)
- * This frees each {@link Tube} from try/catching a
- * {@link WebServiceException} in every layer.
- *
- * Note that this method is also allowed to return
- * {@link NextAction#returnWith(Packet)} with
- * a {@link Packet} that has a fault as the payload.
- *
- * <p>
- * On the client side, the {@link WebServiceException} thrown
- * will be propagated all the way back to the calling client
- * applications. (The consequence of that is that if you are
- * a filtering {@link Tube}, you must not eat the exception
- * that was given to {@link #processException(Throwable)} .
- *
- * @throws RuntimeException
- * Other runtime exception thrown by this method must
- * be treated as a bug in the tube implementation,
- * and therefore should not be converted into a fault.
- * (Otherwise it becomes very difficult to debug implementation
- * problems.)
- *
- * <p>
- * On the server side, this exception should be most likely
- * just logged. On the client-side it gets propagated to the
- * client application.
- *
- * <p>
- * The consequence of this is that if a pipe calls
- * into an user application (such as {@link SOAPHandler}
- * or {@link LogicalHandler}), where a {@link RuntimeException}
- * is *not* a bug in the JAX-WS implementation, it must be catched
- * and wrapped into a {@link WebServiceException}.
- *
- * @param request
- * The packet that represents a request message.
- * If the packet has a non-null message, it must be a valid
- * unconsumed {@link Message}. This message represents the
- * SOAP message to be sent as a request.
- * <p>
- * The packet is also allowed to carry no message, which indicates
- * that this is an output-only request.
- * (that's called "solicit", right? - KK)
- *
- * @return
- * A {@link NextAction} object that represents the next action
- * to be taken by the JAX-WS runtime.
- */
- @NotNull NextAction processRequest(@NotNull Packet request);
-
- /**
- * Acts on a response and performs some protocol specific operation.
- *
- * <p>
- * Once a {@link #processRequest(Packet)} is invoked, this method
- * will be always invoked with the response, before this {@link Tube}
- * processes another request.
- *
- * @param response
- * If the packet has a non-null message, it must be
- * a valid unconsumed {@link Message}. This message represents
- * a response to the request message passed to
- * {@link #processRequest(Packet)} earlier.
- * <p>
- * The packet is also allowed to carry no message, which indicates
- * that there was no response. This is used for things like
- * one-way message and/or one-way transports.
- *
- * TODO: exception handling semantics need more discussion
- *
- * @return
- * A {@link NextAction} object that represents the next action
- * to be taken by the JAX-WS runtime.
- */
- @NotNull NextAction processResponse(@NotNull Packet response);
-
-
- /**
- * Acts on a exception and performs some clean up operations.
- *
- * <p>
- * If a {@link #processRequest(Packet)}, {@link #processResponse(Packet)},
- * {@link #processException(Throwable)} throws an exception, this method
- * will be always invoked on all the {@link Tube}s in the remaining
- * {@link NextAction}s.
- *
- * <p>
- * On the server side, the {@link Throwable} thrown will be propagated to the
- * top-most transport. The transport converts the exception to fault reply or
- * simply logs in case of one-way MEP. If you are a filtering {@link Tube} like
- * {@link AbstractTubeImpl}, you don't have to override the implementation). On
- * the other hand, any intermediate {@link Tube} may want to convert the exception
- * to a fault message.
- *
- * <p>
- * On the client side, the {@link Throwable} thrown
- * will be propagated all the way back to the calling client
- * applications. (The consequence of that is that if you are
- * a filtering {@link Tube} like {@link AbstractTubeImpl}, you don't have to
- * override the implementation)
- *
- * @param t
- *
- * @return
- * A {@link NextAction} object that represents the next action
- * to be taken by the JAX-WS runtime.
- */
- @NotNull NextAction processException(@NotNull Throwable t);
-
- /**
- * Invoked before the last copy of the pipeline is about to be discarded,
- * to give {@link Tube}s a chance to clean up any resources.
- *
- * <p>
- * This can be used to invoke {@link PreDestroy} lifecycle methods
- * on user handler. The invocation of it is optional on the client side,
- * but mandatory on the server side.
- *
- * <p>
- * When multiple copies of pipelines are created, this method is called
- * only on one of them.
- *
- * @throws WebServiceException
- * If the clean up fails, {@link WebServiceException} can be thrown.
- * This exception will be propagated to users (if this is client),
- * or recorded (if this is server.)
- */
- void preDestroy();
-
- /**
- * Creates an identical clone of this {@link Tube}.
- *
- * <p>
- * This method creates an identical pipeline that can be used
- * concurrently with this pipeline. When the caller of a pipeline
- * is multi-threaded and need concurrent use of the same pipeline,
- * it can do so by creating copies through this method.
- *
- * <h3>Implementation Note</h3>
- * <p>
- * It is the implementation's responsibility to call
- * {@link TubeCloner#add(Tube,Tube)} to register the copied pipe
- * with the original. This is required before you start copying
- * the other {@link Tube} references you have, or else there's a
- * risk of infinite recursion.
- * <p>
- * For most {@link Tube} implementations that delegate to another
- * {@link Tube}, this method requires that you also copy the {@link Tube}
- * that you delegate to.
- * <p>
- * For limited number of {@link Tube}s that do not maintain any
- * thread unsafe resource, it is allowed to simply return <tt>this</tt>
- * from this method (notice that even if you are stateless, if you
- * got a delegating {@link Tube} and that one isn't stateless, you
- * still have to copy yourself.)
- *
- * <p>
- * Note that this method might be invoked by one thread while another
- * thread is executing the other process method. See
- * the {@link Codec#copy()} for more discussion about this.
- *
- * @param cloner
- * Use this object (in particular its {@link TubeCloner#copy(Tube)} method
- * to clone other pipe references you have
- * in your pipe. See {@link TubeCloner} for more discussion
- * about why.
- *
- * @return
- * always non-null {@link Tube}.
- */
- Tube copy(TubeCloner cloner);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubeCloner.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubeCloner.java
deleted file mode 100644
index 159b1c4b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubeCloner.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import java.util.Map;
-
-/**
- * Clones the whole pipeline.
- *
- * <p>
- * Since {@link Tube}s may form an arbitrary directed graph, someone needs
- * to keep track of isomorphism for a clone to happen correctly. This class
- * serves that role.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class TubeCloner {
- // Pipe to pipe, or tube to tube
- public final Map<Object,Object> master2copy;
-
- /**
- * Invoked by a client of a tube to clone the whole pipeline.
- *
- * <p>
- * {@link Tube}s implementing the {@link Tube#copy(com.sun.xml.internal.ws.api.pipe.TubeCloner)} method
- * shall use {@link #copy(Tube)} method.
- *
- * @param p
- * The entry point of a pipeline to be copied. must not be null.
- * @return
- * The cloned pipeline. Always non-null.
- */
- @SuppressWarnings("deprecation")
- public static Tube clone(Tube p) {
- // we often want to downcast TubeCloner to PipeCloner,
- // so let's create PipeCloner to make that possible
- return new PipeClonerImpl().copy(p);
- }
-
- // no need to be constructed publicly. always use the static clone method.
- /*package*/ TubeCloner(Map<Object,Object> master2copy) {
- this.master2copy = master2copy;
- }
-
- /**
- * Invoked by a {@link Tube#copy(com.sun.xml.internal.ws.api.pipe.TubeCloner)} implementation
- * to copy a reference to another pipe.
- *
- * <p>
- * This method is for {@link Tube} implementations, not for users.
- *
- * <p>
- * If the given tube is already copied for this cloning episode,
- * this method simply returns that reference. Otherwise it copies
- * a tube, make a note, and returns a copied tube. This additional
- * step ensures that a graph is cloned isomorphically correctly.
- *
- * <p>
- * (Think about what happens when a graph is A->B, A->C, B->D, and C->D
- * if you don't have this step.)
- *
- * @param t
- * The tube to be copied.
- * @return
- * The cloned tube. Always non-null.
- */
- public abstract <T extends Tube> T copy(T t);
-
- /**
- * This method must be called from within the copy constructor
- * to notify that the copy was created.
- *
- * <p>
- * When your pipe has references to other pipes,
- * it's particularly important to call this method
- * before you start copying the pipes you refer to,
- * or else there's a chance of inifinite loop.
- */
- public abstract void add(Tube original, Tube copy);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssembler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssembler.java
deleted file mode 100644
index c19f5b41..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssembler.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-import com.sun.istack.internal.NotNull;
-
-/**
- * Creates a tubeline.
- *
- * <p>
- * This pluggability layer enables the upper layer to
- * control exactly how the tubeline is composed.
- *
- * <p>
- * JAX-WS is going to have its own default implementation
- * when used all by itself, but it can be substituted by
- * other implementations.
- *
- * <p>
- * See {@link TubelineAssemblerFactory} for how {@link TubelineAssembler}s
- * are located.
- *
- *
- * @see com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public interface TubelineAssembler {
- /**
- * Creates a new tubeline for clients.
- *
- * <p>
- * When a JAX-WS client creates a proxy or a {@link javax.xml.ws.Dispatch} from
- * a {@link javax.xml.ws.Service}, JAX-WS runtime internally uses this method
- * to create a new tubeline as a part of the initilization.
- *
- * @param context
- * Object that captures various contextual information
- * that can be used to determine the tubeline to be assembled.
- *
- * @return
- * non-null freshly created tubeline.
- *
- * @throws javax.xml.ws.WebServiceException
- * if there's any configuration error that prevents the
- * tubeline from being constructed. This exception will be
- * propagated into the application, so it must have
- * a descriptive error.
- */
- @NotNull Tube createClient(@NotNull ClientTubeAssemblerContext context);
-
- /**
- * Creates a new tubeline for servers.
- *
- * <p>
- * When a JAX-WS server deploys a new endpoint, it internally
- * uses this method to create a new tubeline as a part of the
- * initialization.
- *
- * <p>
- * Note that this method is called only once to set up a
- * 'master tubeline', and it gets {@link Tube#copy(TubeCloner) copied}
- * from it.
- *
- * @param context
- * Object that captures various contextual information
- * that can be used to determine the tubeline to be assembled.
- *
- * @return
- * non-null freshly created tubeline.
- *
- * @throws javax.xml.ws.WebServiceException
- * if there's any configuration error that prevents the
- * tubeline from being constructed. This exception will be
- * propagated into the container, so it must have
- * a descriptive error.
- *
- */
- @NotNull Tube createServer(@NotNull ServerTubeAssemblerContext context);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssemblerFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssemblerFactory.java
deleted file mode 100644
index 601f1206..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssemblerFactory.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe;
-
-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.pipe.helper.PipeAdapter;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.assembler.MetroTubelineAssembler;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import java.util.logging.Level;
-
-import java.util.logging.Logger;
-
-/**
- * Creates {@link TubelineAssembler}.
- * <p/>
- * <p/>
- * To create a tubeline,
- * the JAX-WS runtime locates {@link TubelineAssemblerFactory}s through
- * the <tt>META-INF/services/com.sun.xml.internal.ws.api.pipe.TubelineAssemblerFactory</tt> files.
- * Factories found are checked to see if it supports the given binding ID one by one,
- * and the first valid {@link TubelineAssembler} returned will be used to create
- * a tubeline.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class TubelineAssemblerFactory {
- /**
- * Creates a {@link TubelineAssembler} applicable for the given binding ID.
- *
- * @param bindingId The binding ID for which a tubeline will be created,
- * such as {@link javax.xml.ws.soap.SOAPBinding#SOAP11HTTP_BINDING}.
- * Must not be null.
- * @return null if this factory doesn't recognize the given binding ID.
- */
- public abstract TubelineAssembler doCreate(BindingID bindingId);
-
- /**
- * @deprecated
- * Use {@link #create(ClassLoader, BindingID, Container)}
- */
- public static TubelineAssembler create(ClassLoader classLoader, BindingID bindingId) {
- return create(classLoader,bindingId,null);
- }
-
- /**
- * Locates {@link TubelineAssemblerFactory}s and create
- * a suitable {@link TubelineAssembler}.
- *
- * @param bindingId The binding ID string for which the new {@link TubelineAssembler}
- * is created. Must not be null.
- * @param container
- * if specified, the container is given a chance to specify a {@link TubelineAssembler}
- * instance. This parameter should be always given on the server, but can be null.
- * @return Always non-null, since we fall back to our default {@link TubelineAssembler}.
- */
- public static TubelineAssembler create(ClassLoader classLoader, BindingID bindingId, @Nullable Container container) {
-
- if(container!=null) {
- // first allow the container to control pipeline for individual endpoint.
- TubelineAssemblerFactory taf = container.getSPI(TubelineAssemblerFactory.class);
- if(taf!=null) {
- TubelineAssembler a = taf.doCreate(bindingId);
- if (a != null) {
- return a;
- }
- }
- }
-
- for (TubelineAssemblerFactory factory : ServiceFinder.find(TubelineAssemblerFactory.class, classLoader)) {
- TubelineAssembler assembler = factory.doCreate(bindingId);
- if (assembler != null) {
- TubelineAssemblerFactory.logger.log(Level.FINE, "{0} successfully created {1}", new Object[]{factory.getClass(), assembler});
- return assembler;
- }
- }
-
- // See if there is a PipelineAssembler out there and use it for compatibility.
- for (PipelineAssemblerFactory factory : ServiceFinder.find(PipelineAssemblerFactory.class,classLoader)) {
- PipelineAssembler assembler = factory.doCreate(bindingId);
- if(assembler!=null) {
- logger.log(Level.FINE, "{0} successfully created {1}", new Object[]{factory.getClass(), assembler});
- return new TubelineAssemblerAdapter(assembler);
- }
- }
-
- // default binding IDs that are known
- return new MetroTubelineAssembler(bindingId, MetroTubelineAssembler.JAXWS_TUBES_CONFIG_NAMES);
- }
-
- private static class TubelineAssemblerAdapter implements TubelineAssembler {
- private PipelineAssembler assembler;
-
- TubelineAssemblerAdapter(PipelineAssembler assembler) {
- this.assembler = assembler;
- }
-
- @Override
- public @NotNull Tube createClient(@NotNull ClientTubeAssemblerContext context) {
- ClientPipeAssemblerContext ctxt = new ClientPipeAssemblerContext(
- context.getAddress(), context.getWsdlModel(), context.getService(),
- context.getBinding(), context.getContainer());
- return PipeAdapter.adapt(assembler.createClient(ctxt));
- }
-
- @Override
- public @NotNull Tube createServer(@NotNull ServerTubeAssemblerContext context) {
- if (!(context instanceof ServerPipeAssemblerContext)) {
- throw new IllegalArgumentException("{0} is not instance of ServerPipeAssemblerContext");
- }
- return PipeAdapter.adapt(assembler.createServer((ServerPipeAssemblerContext) context));
- }
- }
-
- private static final Logger logger = Logger.getLogger(TubelineAssemblerFactory.class.getName());
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterPipeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterPipeImpl.java
deleted file mode 100644
index 55931028..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterPipeImpl.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe.helper;
-
-import com.sun.xml.internal.ws.api.pipe.Pipe;
-import com.sun.xml.internal.ws.api.pipe.PipeCloner;
-import com.sun.xml.internal.ws.api.message.Packet;
-
-/**
- * Default implementation of {@link Pipe} that is used as a filter.
- *
- * <p>
- * A filter pipe works on a {@link Packet}, then pass it onto the next pipe.
- *
- *
- * <h2>How do I implement a filter?</h2>
- * <p>
- * Filter {@link Pipe}s are ideal for those components that wish to
- * do some of the followings:
- *
- * <dl>
- * <dt><b>
- * To read an incoming message and perform some work before the
- * application (or more precisely the next pipe sees it)
- * </b>
- * <dd>
- * Implement the {@link #process} method and do some processing before
- * you pass the packet to the next pipe:
- * <pre>
- * process(request) {
- * doSomethingWith(request);
- * return next.process(request);
- * }
- * </pre>
- *
- *
- * <dt><b>
- * To intercept an incoming message and prevent the next pipe from seeing it.
- * </b>
- * <dd>
- * Implement the {@link #process} method and do some processing,
- * then do NOT pass the request onto the next pipe.
- * <pre>
- * process(request) {
- * if(isSomethingWrongWith(request))
- * return createErrorMessage();
- * else
- * return next.proces(request);
- * }
- * </pre>
- *
- * <dt><b>
- * To post process a reply and possibly modify a message:
- * </b>
- * <dd>
- * Implement the {@link #process} method and do some processing,
- * then do NOT pass the request onto the next pipe.
- * <pre>
- * process(request) {
- * op = request.getMessage().getOperation();
- * reply = next.proces(request);
- * if(op is something I care) {
- * reply = playWith(reply);
- * }
- * return reply;
- * }
- * </pre>
- *
- * </dl>
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class AbstractFilterPipeImpl extends AbstractPipeImpl {
- /**
- * Next pipe to call.
- */
- protected final Pipe next;
-
- protected AbstractFilterPipeImpl(Pipe next) {
- this.next = next;
- assert next!=null;
- }
-
- protected AbstractFilterPipeImpl(AbstractFilterPipeImpl that, PipeCloner cloner) {
- super(that, cloner);
- this.next = cloner.copy(that.next);
- assert next!=null;
- }
-
- public Packet process(Packet packet) {
- return next.process(packet);
- }
-
- @Override
- public void preDestroy() {
- next.preDestroy();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterTubeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterTubeImpl.java
deleted file mode 100644
index af6a8a7c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterTubeImpl.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe.helper;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.NextAction;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-
-/**
- * Convenient default implementation for filtering {@link Tube}.
- *
- * <p>
- * In this prototype, this is not that convenient, but in the real production
- * code where we have {@code preDestroy()} and {@code clone()}, this
- * is fairly handy.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class AbstractFilterTubeImpl extends AbstractTubeImpl {
- protected final Tube next;
-
- protected AbstractFilterTubeImpl(Tube next) {
- this.next = next;
- }
-
- protected AbstractFilterTubeImpl(AbstractFilterTubeImpl that, TubeCloner cloner) {
- super(that, cloner);
- if (that.next != null) {
- this.next = cloner.copy(that.next);
- } else {
- this.next = null;
- }
- }
-
- /**
- * Default no-op implementation.
- */
- public @NotNull NextAction processRequest(Packet request) {
- return doInvoke(next,request);
- }
-
- /**
- * Default no-op implementation.
- */
- public @NotNull NextAction processResponse(Packet response) {
- return doReturnWith(response);
- }
-
- /**
- * Default no-op implementation.
- */
- public @NotNull NextAction processException(Throwable t) {
- return doThrow(t);
- }
-
- public void preDestroy() {
- if (next != null) {
- next.preDestroy();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractPipeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractPipeImpl.java
deleted file mode 100644
index 4afb4e44..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractPipeImpl.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe.helper;
-
-import com.sun.xml.internal.ws.api.pipe.Pipe;
-import com.sun.xml.internal.ws.api.pipe.PipeCloner;
-
-/**
- * Partial default implementation of {@link Pipe}.
- *
- * <p>
- * To be shielded from potentail changes in JAX-WS,
- * please consider extending from this class, instead
- * of implementing {@link Pipe} directly.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class AbstractPipeImpl implements Pipe {
-
- /**
- * Do-nothing constructor.
- */
- protected AbstractPipeImpl() {
- }
-
- /**
- * Basis for the copy constructor.
- *
- * <p>
- * This registers the newly created {@link Pipe} with the {@link PipeCloner}
- * through {@link PipeCloner#add(Pipe, Pipe)}.
- */
- protected AbstractPipeImpl(Pipe that, PipeCloner cloner) {
- cloner.add(that,this);
- }
-
- public void preDestroy() {
- // noop
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractTubeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractTubeImpl.java
deleted file mode 100644
index 7f569a5a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractTubeImpl.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe.helper;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Fiber;
-import com.sun.xml.internal.ws.api.pipe.NextAction;
-import com.sun.xml.internal.ws.api.pipe.Pipe;
-import com.sun.xml.internal.ws.api.pipe.PipeCloner;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-
-/**
- * Base class for {@link Tube} implementation.
- *
- * <p>
- * This can be also used as a {@link Pipe}, and thus effectively
- * making every {@link Tube} usable as a {@link Pipe}.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class AbstractTubeImpl implements Tube, Pipe {
-
- /**
- * Default constructor.
- */
- protected AbstractTubeImpl() {
- }
-
- /**
- * Copy constructor.
- */
- protected AbstractTubeImpl(AbstractTubeImpl that, TubeCloner cloner) {
- cloner.add(that,this);
- }
-
- protected final NextAction doInvoke(Tube next, Packet packet) {
- NextAction na = new NextAction();
- na.invoke(next,packet);
- return na;
- }
-
- protected final NextAction doInvokeAndForget(Tube next, Packet packet) {
- NextAction na = new NextAction();
- na.invokeAndForget(next,packet);
- return na;
- }
-
- protected final NextAction doReturnWith(Packet response) {
- NextAction na = new NextAction();
- na.returnWith(response);
- return na;
- }
-
- protected final NextAction doThrow(Packet response, Throwable t) {
- NextAction na = new NextAction();
- na.throwException(response, t);
- return na;
- }
-
- @Deprecated
- protected final NextAction doSuspend() {
- NextAction na = new NextAction();
- na.suspend();
- return na;
- }
-
- protected final NextAction doSuspend(Runnable onExitRunnable) {
- NextAction na = new NextAction();
- na.suspend(onExitRunnable);
- return na;
- }
-
- @Deprecated
- protected final NextAction doSuspend(Tube next) {
- NextAction na = new NextAction();
- na.suspend(next);
- return na;
- }
-
- protected final NextAction doSuspend(Tube next, Runnable onExitRunnable) {
- NextAction na = new NextAction();
- na.suspend(next, onExitRunnable);
- return na;
- }
-
- protected final NextAction doThrow(Throwable t) {
- NextAction na = new NextAction();
- na.throwException(t);
- return na;
- }
-
- /**
- * "Dual stack" compatibility mechanism.
- * Allows {@link Tube} to be invoked from a {@link Pipe}.
- */
- public Packet process(Packet p) {
- return Fiber.current().runSync(this,p);
- }
-
- /**
- * Needs to be implemented by the derived class, but we can't make it abstract
- * without upsetting javac.
- */
- public final AbstractTubeImpl copy(PipeCloner cloner) {
- return copy((TubeCloner)cloner);
- }
-
- public abstract AbstractTubeImpl copy(TubeCloner cloner);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/PipeAdapter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/PipeAdapter.java
deleted file mode 100644
index 4f79c80b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/PipeAdapter.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.pipe.helper;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Fiber;
-import com.sun.xml.internal.ws.api.pipe.NextAction;
-import com.sun.xml.internal.ws.api.pipe.Pipe;
-import com.sun.xml.internal.ws.api.pipe.PipeCloner;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-
-/**
- * {@link Tube} that invokes {@link Pipe}.
- *
- * <p>
- * This can be used to make a {@link Pipe} look like a {@link Tube}.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public class PipeAdapter extends AbstractTubeImpl {
- private final Pipe next;
-
- public static Tube adapt(Pipe p) {
- if (p instanceof Tube) {
- return (Tube) p;
- } else {
- return new PipeAdapter(p);
- }
- }
-
- public static Pipe adapt(Tube p) {
- if (p instanceof Pipe) {
- return (Pipe) p;
- } else {
- class TubeAdapter extends AbstractPipeImpl {
- private final Tube t;
-
- public TubeAdapter(Tube t) {
- this.t = t;
- }
-
- private TubeAdapter(TubeAdapter that, PipeCloner cloner) {
- super(that, cloner);
- this.t = cloner.copy(that.t);
- }
-
- public Packet process(Packet request) {
- return Fiber.current().runSync(t,request);
- }
-
- public Pipe copy(PipeCloner cloner) {
- return new TubeAdapter(this,cloner);
- }
- }
-
- return new TubeAdapter(p);
- }
- }
-
-
- private PipeAdapter(Pipe next) {
- this.next = next;
- }
-
- /**
- * Copy constructor
- */
- private PipeAdapter(PipeAdapter that, TubeCloner cloner) {
- super(that,cloner);
- this.next = ((PipeCloner)cloner).copy(that.next);
- }
-
- /**
- * Uses the current fiber and runs the whole pipe to the completion
- * (meaning everything from now on will run synchronously.)
- */
- public @NotNull NextAction processRequest(@NotNull Packet p) {
- return doReturnWith(next.process(p));
- }
-
- public @NotNull NextAction processResponse(@NotNull Packet p) {
- throw new IllegalStateException();
- }
-
- @NotNull
- public NextAction processException(@NotNull Throwable t) {
- throw new IllegalStateException();
- }
-
- public void preDestroy() {
- next.preDestroy();
- }
-
- public PipeAdapter copy(TubeCloner cloner) {
- return new PipeAdapter(this,cloner);
- }
-
- public String toString() {
- return super.toString()+"["+next.toString()+"]";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/package-info.java
deleted file mode 100644
index 238a9d81..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/package-info.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * Default partial implementations of {@link com.sun.xml.internal.ws.api.pipe.Pipe}.
- *
- * <p>
- * This is intended to be useful for projects building on
- * top of the JAX-WS RI.
- */
-package com.sun.xml.internal.ws.api.pipe.helper;
-
-import com.sun.xml.internal.ws.api.pipe.Pipe;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/package-info.java
deleted file mode 100644
index 0813caec..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/package-info.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * {@link com.sun.xml.internal.ws.api.pipe.Pipe} and related abstractions.
- */
-package com.sun.xml.internal.ws.api.pipe;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/AlternativeSelector.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/AlternativeSelector.java
deleted file mode 100644
index 68f5eaa4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/AlternativeSelector.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.EffectiveAlternativeSelector;
-import com.sun.xml.internal.ws.policy.EffectivePolicyModifier;
-import com.sun.xml.internal.ws.policy.PolicyException;
-
-/**
- *
- * @author Fabian Ritzmann
- */
-public class AlternativeSelector extends EffectiveAlternativeSelector {
-
- public static void doSelection(final EffectivePolicyModifier modifier) throws PolicyException {
- final ValidationProcessor validationProcessor = ValidationProcessor.getInstance();
- selectAlternatives(modifier, validationProcessor);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelGenerator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelGenerator.java
deleted file mode 100644
index 09cbf39f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelGenerator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicyModelGenerator;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel;
-
-/**
- *
- * @author Fabian Ritzmann
- */
-public abstract class ModelGenerator extends PolicyModelGenerator {
-
- private static final SourceModelCreator CREATOR = new SourceModelCreator();
-
- /**
- * This private constructor avoids direct instantiation from outside the class.
- */
- private ModelGenerator() {
- super();
- }
-
- /**
- * Factory method that returns a ModelGenerator instance.
- *
- * @return A ModelGenerator instance.
- */
- public static PolicyModelGenerator getGenerator() {
- return PolicyModelGenerator.getCompactGenerator(CREATOR);
- }
-
-
- protected static class SourceModelCreator extends PolicySourceModelCreator {
-
- @Override
- protected PolicySourceModel create(Policy policy) {
- return SourceModel.createPolicySourceModel(policy.getNamespaceVersion(),
- policy.getId(), policy.getName());
-
- }
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelTranslator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelTranslator.java
deleted file mode 100644
index 28c58c34..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelTranslator.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.config.management.policy.ManagementAssertionCreator;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicyModelTranslator;
-import com.sun.xml.internal.ws.policy.spi.PolicyAssertionCreator;
-import com.sun.xml.internal.ws.resources.ManagementMessages;
-
-import java.util.Arrays;
-
-/**
- * This class provides a method for translating a PolicySourceModel structure to a
- * normalized Policy expression. The resulting Policy is disconnected from its model,
- * thus any additional changes in the model will have no effect on the Policy expression.
- *
- * @author Fabian Ritzmann
- */
-public class ModelTranslator extends PolicyModelTranslator {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(ModelTranslator.class);
-
- private static final PolicyAssertionCreator[] JAXWS_ASSERTION_CREATORS = {
- new ManagementAssertionCreator()
- };
-
- private static final ModelTranslator translator;
- private static final PolicyException creationException;
-
- static {
- ModelTranslator tempTranslator = null;
- PolicyException tempException = null;
- try {
- tempTranslator = new ModelTranslator();
- } catch (PolicyException e) {
- tempException = e;
- LOGGER.warning(ManagementMessages.WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION(), e);
- } finally {
- translator = tempTranslator;
- creationException = tempException;
- }
- }
-
- private ModelTranslator() throws PolicyException {
- super(Arrays.asList(JAXWS_ASSERTION_CREATORS));
- }
-
- /**
- * Method returns thread-safe policy model translator instance.
- *
- * @return A policy model translator instance.
- * @throws PolicyException If instantiating a PolicyAssertionCreator failed.
- */
- public static ModelTranslator getTranslator() throws PolicyException {
- if (creationException != null) {
- throw LOGGER.logSevereException(creationException);
- }
- else {
- return translator;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelUnmarshaller.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelUnmarshaller.java
deleted file mode 100644
index 1b5f9182..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelUnmarshaller.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicyModelGenerator;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel;
-import com.sun.xml.internal.ws.policy.sourcemodel.XmlPolicyModelUnmarshaller;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion;
-
-/**
- *
- * @author Fabian Ritzmann
- */
-public class ModelUnmarshaller extends XmlPolicyModelUnmarshaller {
-
- private static final ModelUnmarshaller INSTANCE = new ModelUnmarshaller();
-
- /**
- * This private constructor avoids direct instantiation from outside the class.
- */
- private ModelUnmarshaller() {
- super();
- }
-
- /**
- * Factory method that returns a {@link ModelUnmarshaller} instance.
- *
- * @return {@link PolicyModelGenerator} instance
- */
- public static ModelUnmarshaller getUnmarshaller() {
- return INSTANCE;
- }
-
- @Override
- protected PolicySourceModel createSourceModel(NamespaceVersion nsVersion, String id, String name) {
- return SourceModel.createSourceModel(nsVersion, id, name);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolver.java
deleted file mode 100644
index 1fe3c104..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolver.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapMutator;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.istack.internal.Nullable;
-import java.util.Arrays;
-import java.util.Collection;
-import javax.xml.ws.WebServiceException;
-
-/**
- * PolicyResolver will be used to resolve the PolicyMap created by configuration understood by JAX-WS.
- *
- * Extensions of this can return effective PolicyMap after merge policies from other configurations.
- * @author Rama Pulavarthi
- */
-public interface PolicyResolver {
- /**
- * Creates a PolicyResolver
- *
- * @param context
- * ServerContext that captures information useful for resolving Policy on server-side
- *
- * @return
- * A PolicyMap with single policy alternative that gets created after consulting various configuration models.
- *
- * @throws WebServiceException
- * If resolution failed
- */
- PolicyMap resolve(ServerContext context) throws WebServiceException;
-
- /**
- * Creates a PolicyResolver
- *
- * @param context
- * ServerContext that captures information useful for resolving Policy on client-side
- *
- * @return
- * A PolicyMap with single policy alternative that gets created after consulting various configuration models.
- *
- * @throws WebServiceException
- * If resolution failed
- */
- PolicyMap resolve(ClientContext context) throws WebServiceException;
-
- public class ServerContext {
- private final PolicyMap policyMap;
- private final Class endpointClass;
- private final Container container;
- private final boolean hasWsdl;
- private final Collection<PolicyMapMutator> mutators;
-
- /**
- * The abstraction of PolicyMap is not finalized, and will change in few months. It is highly discouraged to use
- * PolicyMap until it is finalized.
- *
- * In presence of WSDL, JAX-WS by default creates PolicyMap from Policy Attachemnts in WSDL.
- * In absense of WSDL, JAX-WS creates PolicyMap from WebServiceFeatures configured on the endpoint implementation
- *
- * @param policyMap
- * PolicyMap created from PolicyAttachments in WSDL or Feature annotations on endpoint implementation class.
- * @param container
- * @param endpointClass
- * @param mutators
- * List of PolicyMapMutators that are run eventually when a PolicyMap is created
- */
- public ServerContext(@Nullable PolicyMap policyMap, Container container,
- Class endpointClass, final PolicyMapMutator... mutators) {
- this.policyMap = policyMap;
- this.endpointClass = endpointClass;
- this.container = container;
- this.hasWsdl = true;
- this.mutators = Arrays.asList(mutators);
- }
-
- /**
- * The abstraction of PolicyMap is not finalized, and will change in few months. It is highly discouraged to use
- * PolicyMap until it is finalized.
- *
- * In presence of WSDL, JAX-WS by default creates PolicyMap from Policy Attachemnts in WSDL.
- * In absense of WSDL, JAX-WS creates PolicyMap from WebServiceFeatures configured on the endpoint implementation
- *
- * @param policyMap
- * PolicyMap created from PolicyAttachments in WSDL or Feature annotations on endpoint implementation class.
- * @param container
- * @param endpointClass
- * @param hasWsdl Set to true, if this service is bundled with WSDL, false otherwise
- * @param mutators
- * List of PolicyMapMutators that are run eventually when a PolicyMap is created
- */
- public ServerContext(@Nullable PolicyMap policyMap, Container container,
- Class endpointClass, boolean hasWsdl, final PolicyMapMutator... mutators) {
- this.policyMap = policyMap;
- this.endpointClass = endpointClass;
- this.container = container;
- this.hasWsdl = hasWsdl;
- this.mutators = Arrays.asList(mutators);
- }
-
- public @Nullable PolicyMap getPolicyMap() {
- return policyMap;
- }
-
- public @Nullable Class getEndpointClass() {
- return endpointClass;
- }
-
- public Container getContainer() {
- return container;
- }
-
- /**
- * Return true, if this service is bundled with WSDL, false otherwise
- * @return
- */
- public boolean hasWsdl() {
- return hasWsdl;
- }
-
- public Collection<PolicyMapMutator> getMutators() {
- return mutators;
- }
- }
-
- public class ClientContext {
- private PolicyMap policyMap;
- private Container container;
-
- /**
- * The abstraction of PolicyMap is not finalized, and will change in few months. It is highly discouraged to use
- * PolicyMap until it is finalized.
- *
- * In presence of WSDL, JAX-WS by default creates PolicyMap from Policy Attachemnts in WSDL.
- *
- * @param policyMap PolicyMap created from PolicyAttachemnts in WSDL
- * @param container
- */
- public ClientContext(@Nullable PolicyMap policyMap, Container container) {
- this.policyMap = policyMap;
- this.container = container;
- }
-
- public @Nullable PolicyMap getPolicyMap() {
- return policyMap;
- }
-
- public Container getContainer() {
- return container;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolverFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolverFactory.java
deleted file mode 100644
index 3d0d6606..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolverFactory.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import com.sun.xml.internal.ws.policy.jaxws.DefaultPolicyResolver;
-
-/**
- * PolicyResolverFactory provides a way to override Effective Policy Resolution for a Service or Client.
- * JAX-WS provides DEFAULT_POLICY_RESOLVER implementation that
- * on server-side validates that Policy has single alternative in the scope of each subject
- * on client-side updates with the effective policy by doing alternative selection.
- *
- * Extensions can override this to consult other forms of configuration to give the effective PolicyMap.
- *
- * @author Rama Pulavarthi
- */
-public abstract class PolicyResolverFactory {
-
- public abstract PolicyResolver doCreate();
-
- public static PolicyResolver create(){
- for (PolicyResolverFactory factory : ServiceFinder.find(PolicyResolverFactory.class)) {
- PolicyResolver policyResolver = factory.doCreate();
- if (policyResolver != null) {
- return policyResolver;
- }
- }
- // return default policy resolver.
- return DEFAULT_POLICY_RESOLVER;
- }
-
- /**
- * JAX-WS provided DEFAULT_POLICY_RESOLVER implementation that
- * on server-side validates that Policy has single alternative in the scope of each subject
- * on client-side updates with the effective policy by doing alternative selection.
- */
- public static final PolicyResolver DEFAULT_POLICY_RESOLVER = new DefaultPolicyResolver();
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/SourceModel.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/SourceModel.java
deleted file mode 100644
index d07d66bf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/SourceModel.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.addressing.policy.AddressingPrefixMapper;
-import com.sun.xml.internal.ws.config.management.policy.ManagementPrefixMapper;
-import com.sun.xml.internal.ws.encoding.policy.EncodingPrefixMapper;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion;
-import com.sun.xml.internal.ws.policy.spi.PrefixMapper;
-
-import java.util.Arrays;
-
-/**
- * This class is a root of unmarshalled policy source structure. Each instance of
- * the class contains factory method to create new com.sun.xml.internal.ws.policy.sourcemodel.ModelNode
- * instances associated with the actual model instance.
- *
- * @author Fabian Ritzmann
- */
-public class SourceModel extends PolicySourceModel {
-
- private static final PrefixMapper[] JAXWS_PREFIX_MAPPERS = {
- new AddressingPrefixMapper(),
- new EncodingPrefixMapper(),
- new ManagementPrefixMapper()
- };
-
-
- /**
- * Private constructor that creates a new policy source model instance without any
- * id or name identifier. The namespace-to-prefix map is initialized with mapping
- * of policy namespace to the default value set by
- * {@link PolicyConstants#POLICY_NAMESPACE_PREFIX POLICY_NAMESPACE_PREFIX constant}.
- *
- * @param nsVersion The WS-Policy version.
- */
- private SourceModel(NamespaceVersion nsVersion) {
- this(nsVersion, null, null);
- }
-
- /**
- * Private constructor that creates a new policy source model instance with given
- * id or name identifier and a set of PrefixMappers.
- *
- * @param nsVersion The WS-Policy version.
- * @param policyId Relative policy reference within an XML document. May be {@code null}.
- * @param policyName Absolute IRI of policy expression. May be {@code null}.
- */
- private SourceModel(NamespaceVersion nsVersion, String policyId, String policyName) {
- super(nsVersion, policyId, policyName, Arrays.asList(JAXWS_PREFIX_MAPPERS));
- }
-
- /**
- * Factory method that creates new policy source model instance.
- *
- * @param nsVersion The policy version
- * @return Newly created policy source model instance.
- */
- public static PolicySourceModel createSourceModel(final NamespaceVersion nsVersion) {
- return new SourceModel(nsVersion);
- }
-
- /**
- * Factory method that creates new policy source model instance and initializes it according to parameters provided.
- *
- * @param nsVersion The policy version
- * @param policyId local policy identifier - relative URI. May be {@code null}.
- * @param policyName global policy identifier - absolute policy expression URI. May be {@code null}.
- * @return Newly created policy source model instance with its name and id properly set.
- */
- public static PolicySourceModel createSourceModel(final NamespaceVersion nsVersion,
- final String policyId, final String policyName) {
- return new SourceModel(nsVersion, policyId, policyName);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ValidationProcessor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ValidationProcessor.java
deleted file mode 100644
index d581e312..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ValidationProcessor.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.addressing.policy.AddressingPolicyValidator;
-import com.sun.xml.internal.ws.config.management.policy.ManagementPolicyValidator;
-import com.sun.xml.internal.ws.encoding.policy.EncodingPolicyValidator;
-import com.sun.xml.internal.ws.policy.AssertionValidationProcessor;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.spi.PolicyAssertionValidator;
-
-import java.util.Arrays;
-
-/**
- * Provides methods for assertion validation.
- *
- * @author Fabian Ritzmann
- */
-public class ValidationProcessor extends AssertionValidationProcessor {
-
- private static final PolicyAssertionValidator[] JAXWS_ASSERTION_VALIDATORS = {
- new AddressingPolicyValidator(),
- new EncodingPolicyValidator(),
- new ManagementPolicyValidator()
- };
-
- /**
- * This constructor instantiates the object with a set of dynamically
- * discovered PolicyAssertionValidators.
- *
- * @throws PolicyException Thrown if the set of dynamically discovered
- * PolicyAssertionValidators is empty.
- */
- private ValidationProcessor() throws PolicyException {
- super(Arrays.asList(JAXWS_ASSERTION_VALIDATORS));
- }
-
- /**
- * Factory method that returns singleton instance of the class.
- *
- * @return singleton An instance of the class.
- * @throws PolicyException If instantiation failed.
- */
- public static ValidationProcessor getInstance() throws PolicyException {
- return new ValidationProcessor();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/subject/BindingSubject.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/subject/BindingSubject.java
deleted file mode 100644
index 06f258ef..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/subject/BindingSubject.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.subject;
-
-import javax.xml.namespace.QName;
-
-import com.sun.istack.internal.logging.Logger;
-import com.sun.xml.internal.ws.resources.BindingApiMessages;
-
-/**
- * Experimental: This class identifies WSDL scopes. That allows to attach and
- * retrieve elements to and from WSDL scopes.
- *
- * @author Fabian Ritzmann
- */
-public class BindingSubject {
-
- /**
- * For message subjects, this needs to be set to one of the values INPUT, OUTPUT
- * or FAULT. Any other subject has the message type NO_MESSAGE.
- */
- private enum WsdlMessageType {
- NO_MESSAGE,
- INPUT,
- OUTPUT,
- FAULT
- }
-
- /**
- * Identifies the scope to which this subject belongs. See WS-PolicyAttachment
- * for an explanation on WSDL scopes.
- *
- * The SERVICE scope is not actually used and only listed here for completeness
- * sake.
- */
- private enum WsdlNameScope {
- SERVICE,
- ENDPOINT,
- OPERATION,
- MESSAGE
- }
-
- private static final Logger LOGGER = Logger.getLogger(BindingSubject.class);
-
- private final QName name;
- private final WsdlMessageType messageType;
- private final WsdlNameScope nameScope;
- private final BindingSubject parent;
-
- BindingSubject(final QName name, final WsdlNameScope scope, final BindingSubject parent) {
- this(name, WsdlMessageType.NO_MESSAGE, scope, parent);
- }
-
- BindingSubject(final QName name, final WsdlMessageType messageType, final WsdlNameScope scope, final BindingSubject parent) {
- this.name = name;
- this.messageType = messageType;
- this.nameScope = scope;
- this.parent = parent;
- }
-
- public static BindingSubject createBindingSubject(QName bindingName) {
- return new BindingSubject(bindingName, WsdlNameScope.ENDPOINT, null);
- }
-
- public static BindingSubject createOperationSubject(QName bindingName, QName operationName) {
- final BindingSubject bindingSubject = createBindingSubject(bindingName);
- return new BindingSubject(operationName, WsdlNameScope.OPERATION, bindingSubject);
- }
-
- public static BindingSubject createInputMessageSubject(QName bindingName, QName operationName, QName messageName) {
- final BindingSubject operationSubject = createOperationSubject(bindingName, operationName);
- return new BindingSubject(messageName, WsdlMessageType.INPUT, WsdlNameScope.MESSAGE, operationSubject);
- }
-
- public static BindingSubject createOutputMessageSubject(QName bindingName, QName operationName, QName messageName) {
- final BindingSubject operationSubject = createOperationSubject(bindingName, operationName);
- return new BindingSubject(messageName, WsdlMessageType.OUTPUT, WsdlNameScope.MESSAGE, operationSubject);
- }
-
- public static BindingSubject createFaultMessageSubject(QName bindingName, QName operationName, QName messageName) {
- if (messageName == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(BindingApiMessages.BINDING_API_NO_FAULT_MESSAGE_NAME()));
- }
- final BindingSubject operationSubject = createOperationSubject(bindingName, operationName);
- return new BindingSubject(messageName, WsdlMessageType.FAULT, WsdlNameScope.MESSAGE, operationSubject);
- }
-
- public QName getName() {
- return this.name;
- }
-
- public BindingSubject getParent() {
- return this.parent;
- }
-
- public boolean isBindingSubject() {
- if (this.nameScope == WsdlNameScope.ENDPOINT) {
- return this.parent == null;
- }
- else {
- return false;
- }
- }
-
- public boolean isOperationSubject() {
- if (this.nameScope == WsdlNameScope.OPERATION) {
- if (this.parent != null) {
- return this.parent.isBindingSubject();
- }
- }
- return false;
- }
-
- public boolean isMessageSubject() {
- if (this.nameScope == WsdlNameScope.MESSAGE) {
- if (this.parent != null) {
- return this.parent.isOperationSubject();
- }
- }
- return false;
- }
-
- public boolean isInputMessageSubject() {
- return isMessageSubject() && (this.messageType == WsdlMessageType.INPUT);
- }
-
- public boolean isOutputMessageSubject() {
- return isMessageSubject() && (this.messageType == WsdlMessageType.OUTPUT);
- }
-
- public boolean isFaultMessageSubject() {
- return isMessageSubject() && (this.messageType == WsdlMessageType.FAULT);
- }
-
- @Override
- public boolean equals(final Object that) {
- if (this == that) {
- return true;
- }
-
- if (that == null || !(that instanceof BindingSubject)) {
- return false;
- }
-
- final BindingSubject thatSubject = (BindingSubject) that;
- boolean isEqual = true;
-
- isEqual = isEqual && ((this.name == null) ? thatSubject.name == null : this.name.equals(thatSubject.name));
- isEqual = isEqual && this.messageType.equals(thatSubject.messageType);
- isEqual = isEqual && this.nameScope.equals(thatSubject.nameScope);
- isEqual = isEqual && ((this.parent == null) ? thatSubject.parent == null : this.parent.equals(thatSubject.parent));
-
- return isEqual;
- }
-
- @Override
- public int hashCode() {
- int result = 23;
-
- result = 29 * result + ((this.name == null) ? 0 : this.name.hashCode());
- result = 29 * result + this.messageType.hashCode();
- result = 29 * result + this.nameScope.hashCode();
- result = 29 * result + ((this.parent == null) ? 0 : this.parent.hashCode());
-
- return result;
- }
-
- @Override
- public String toString() {
- final StringBuilder result = new StringBuilder("BindingSubject[");
- result.append(this.name).append(", ").append(this.messageType);
- result.append(", ").append(this.nameScope).append(", ").append(this.parent);
- return result.append("]").toString();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractInstanceResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractInstanceResolver.java
deleted file mode 100644
index 560e98e9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractInstanceResolver.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.server;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.api.server.InstanceResolver;
-import com.sun.xml.internal.ws.api.server.ResourceInjector;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-import com.sun.xml.internal.ws.server.ServerRtException;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * Partial implementation of {@link InstanceResolver} with
- * convenience methods to do the resource injection.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.2.6
- */
-public abstract class AbstractInstanceResolver<T> extends InstanceResolver<T> {
-
- protected static ResourceInjector getResourceInjector(WSEndpoint endpoint) {
- ResourceInjector ri = endpoint.getContainer().getSPI(ResourceInjector.class);
- if(ri==null)
- ri = ResourceInjector.STANDALONE;
- return ri;
- }
-
- /**
- * Helper for invoking a method with elevated privilege.
- */
- protected static void invokeMethod(final @Nullable Method method, final Object instance, final Object... args) {
- if(method==null) return;
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
- public Void run() {
- try {
- if (!method.isAccessible()) {
- method.setAccessible(true);
- }
- MethodUtil.invoke(instance,method, args);
- } catch (IllegalAccessException e) {
- throw new ServerRtException("server.rt.err",e);
- } catch (InvocationTargetException e) {
- throw new ServerRtException("server.rt.err",e);
- }
- return null;
- }
- });
- }
-
- /**
- * Finds the method that has the given annotation, while making sure that
- * there's only at most one such method.
- */
- protected final @Nullable Method findAnnotatedMethod(Class clazz, Class<? extends Annotation> annType) {
- boolean once = false;
- Method r = null;
- for(Method method : clazz.getDeclaredMethods()) {
- if (method.getAnnotation(annType) != null) {
- if (once)
- throw new ServerRtException(ServerMessages.ANNOTATION_ONLY_ONCE(annType));
- if (method.getParameterTypes().length != 0)
- throw new ServerRtException(ServerMessages.NOT_ZERO_PARAMETERS(method));
- r = method;
- once = true;
- }
- }
- return r;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractServerAsyncTransport.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractServerAsyncTransport.java
deleted file mode 100644
index 6dbdb425..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractServerAsyncTransport.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.oracle.webservices.internal.api.message.PropertySet;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.util.Pool;
-
-import java.io.IOException;
-
-
-/**
- * Partial server side async transport implementation. It manages pooling of
- * {@link Codec} and other details.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class AbstractServerAsyncTransport<T> {
-
- private final WSEndpoint endpoint;
- private final CodecPool codecPool;
-
- /**
- * {@link WSEndpoint#setExecutor} should be called before creating the
- * transport
- *
- * @param endpoint webservices requests are directed towards this endpoint
- */
- public AbstractServerAsyncTransport(WSEndpoint endpoint) {
- this.endpoint = endpoint;
- codecPool = new CodecPool(endpoint);
- }
-
- /**
- * decodes the transport data to Packet
- *
- * @param connection that carries the web service request
- * @param codec for encoding/decoding {@link Message}
- * @return decoded {@link Packet}
- * @throws IOException if an i/o error happens while encoding/decoding
- */
- protected Packet decodePacket(T connection, @NotNull Codec codec) throws IOException {
- Packet packet = new Packet();
- packet.acceptableMimeTypes = getAcceptableMimeTypes(connection);
- packet.addSatellite(getPropertySet(connection));
- packet.transportBackChannel = getTransportBackChannel(connection);
- return packet;
- }
-
- /**
- * Encodes the {@link Packet} to infoset and writes on the connection.
- *
- * @param connection that carries the web service request
- * @param packet that needs to encoded to infoset
- * @param codec that does the encoding of Packet
- * @throws IOException if an i/o error happens while encoding/decoding
- */
- protected abstract void encodePacket(T connection, @NotNull Packet packet, @NotNull Codec codec) throws IOException;
-
- /**
- * If the request has Accept header, return that value
- *
- * @param connection that carries the web service request
- * @return Accept MIME types
- */
- protected abstract @Nullable String getAcceptableMimeTypes(T connection);
-
- /**
- * {@link TransportBackChannel} used by jax-ws runtime to close the connection
- * while the processing of the request is still continuing. In oneway HTTP case, a
- * response code needs to be sent before invoking the endpoint.
- *
- * @param connection that carries the web service request
- * @return TransportBackChannel instance using the connection
- */
- protected abstract @Nullable TransportBackChannel getTransportBackChannel(T connection);
-
- /**
- * If there are any properties associated with the connection, those will
- * be added to {@link Packet}
- *
- * @param connection that carries the web service request
- * @return {@link PropertySet} for the connection
- */
- protected abstract @NotNull PropertySet getPropertySet(T connection);
-
- /**
- * Return a {@link WebServiceContextDelegate} using the underlying connection.
- *
- * @param connection that carries the web service request
- * @return non-null WebServiceContextDelegate instance
- */
- protected abstract @NotNull WebServiceContextDelegate getWebServiceContextDelegate(T connection);
-
- /**
- * Reads and decodes infoset from the connection and invokes the endpoints. The
- * response is encoded and written to the connection. The response could be
- * written using a different thread.
- *
- * @param connection that carries the web service request
- * @throws IOException if an i/o error happens while encoding/decoding
- */
- protected void handle(final T connection) throws IOException {
- final Codec codec = codecPool.take();
- Packet request = decodePacket(connection, codec);
- if (!request.getMessage().isFault()) {
- endpoint.schedule(request, new WSEndpoint.CompletionCallback() {
- public void onCompletion(@NotNull Packet response) {
- try {
- encodePacket(connection, response, codec);
- } catch(IOException ioe) {
- ioe.printStackTrace();
- }
- codecPool.recycle(codec);
- }
- });
- }
- }
-
- private static final class CodecPool extends Pool<Codec> {
- WSEndpoint endpoint;
-
- CodecPool(WSEndpoint endpoint) {
- this. endpoint = endpoint;
- }
-
- protected Codec create() {
- return endpoint.createCodec();
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Adapter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Adapter.java
deleted file mode 100644
index 4e73e951..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Adapter.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.xml.internal.ws.api.config.management.Reconfigurable;
-import com.sun.xml.internal.ws.api.Component;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.server.WSEndpoint.PipeHead;
-import com.sun.xml.internal.ws.util.Pool;
-
-/**
- * Receives incoming messages from a transport (such as HTTP, JMS, etc)
- * in a transport specific way, and delivers it to {@link WSEndpoint.PipeHead#process}.
- *
- * <p>
- * Since this class mostly concerns itself with converting a
- * transport-specific message representation to a {@link Packet},
- * the name is the "adapter".
- *
- * <p>
- * The purpose of this class is twofolds:
- *
- * <ol>
- * <li>
- * To hide the logic of converting a transport-specific connection
- * to a {@link Packet} and do the other way around.
- *
- * <li>
- * To manage thread-unsafe resources, such as {@link WSEndpoint.PipeHead},
- * and {@link Codec}.
- * </ol>
- *
- * <p>
- * {@link Adapter}s are extended to work with each kind of transport,
- * and therefore {@link Adapter} class itself is not all that
- * useful by itself --- it merely provides a design template
- * that can be followed.
- *
- * <p>
- * For managing resources, an adapter uses an object called {@link Toolkit}
- * (think of it as a tray full of tools that a dentist uses ---
- * trays are identical, but each patient has to get one. You have
- * a pool of them and you assign it to a patient.)
- *
- * {@link Adapter.Toolkit} can be extended by derived classes.
- * That actual type is the {@code TK} type parameter this class takes.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class Adapter<TK extends Adapter.Toolkit>
- implements Reconfigurable, Component {
-
- protected final WSEndpoint<?> endpoint;
-
- /**
- * Object that groups all thread-unsafe resources.
- */
- public class Toolkit {
- /**
- * For encoding/decoding infoset to/from the byte stream.
- */
- public final Codec codec;
- /**
- * This object from {@link WSEndpoint} serves the request.
- */
- public final PipeHead head;
-
- public Toolkit() {
- this.codec = endpoint.createCodec();
- this.head = endpoint.createPipeHead();
- }
- }
-
- /**
- * Pool of {@link Toolkit}s.
- *
- * Instances of this pool may be replaced at runtime. Therefore, when you take
- * an object out of the pool, you must make sure that it is recycled by the
- * same instance of the pool.
- */
- protected volatile Pool<TK> pool = new Pool<TK>() {
- protected TK create() {
- return createToolkit();
- }
- };
-
- /**
- * Creates an {@link Adapter} that delivers
- * messages to the given endpoint.
- */
- protected Adapter(WSEndpoint endpoint) {
- assert endpoint!=null;
- this.endpoint = endpoint;
- // Enables other components to reconfigure this adapter
- endpoint.getComponents().add(getEndpointComponent());
- }
-
- protected Component getEndpointComponent() {
- return new Component() {
- public <S> S getSPI(Class<S> spiType) {
- if (spiType.isAssignableFrom(Reconfigurable.class)) {
- return spiType.cast(Adapter.this);
- }
- return null;
- }
- };
- }
-
- /**
- * The pool instance needs to be recreated to prevent reuse of old Toolkit instances.
- */
- public void reconfigure() {
- this.pool = new Pool<TK>() {
- protected TK create() {
- return createToolkit();
- }
- };
- }
-
- public <S> S getSPI(Class<S> spiType) {
- if (spiType.isAssignableFrom(Reconfigurable.class)) {
- return spiType.cast(this);
- }
- if (endpoint != null) {
- return endpoint.getSPI(spiType);
- }
- return null;
- }
-
- /**
- * Gets the endpoint that this {@link Adapter} is serving.
- *
- * @return
- * always non-null.
- */
- public WSEndpoint<?> getEndpoint() {
- return endpoint;
- }
-
- /**
- * Returns a reference to the pool of Toolkits for this adapter.
- *
- * The pool may be recreated during runtime reconfiguration and this method
- * will then return a reference to a new instance. When you recycle a toolkit,
- * you must make sure that you return it to the same pool instance that you
- * took it from.
- *
- * @return
- */
- protected Pool<TK> getPool() {
- return pool;
- }
-
- /**
- * Creates a {@link Toolkit} instance.
- *
- * <p>
- * If the derived class doesn't have to add any per-thread state
- * to {@link Toolkit}, simply implement this as {@code new Toolkit()}.
- */
- protected abstract TK createToolkit();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProvider.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProvider.java
deleted file mode 100644
index 18d7243e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProvider.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-
-import javax.xml.ws.Provider;
-import javax.xml.ws.WebServiceContext;
-import java.util.concurrent.Executor;
-
-/**
- * Asynchronous version of {@link Provider}.
- *
- * <p>
- * Applications that use the JAX-WS RI can implement this interface instead of
- * {@link Provider} to implement asynchronous web services (AWS.) AWS enables
- * applications to perform operations with long latency without blocking a thread,
- * and thus particularly suitable for highly scalable service implementation,
- * at the expesnce of implementation complexity.
- *
- * <h2>Programming Model</h2>
- * <p>
- * Whenever a new reuqest arrives, the JAX-WS RI invokes the {@link #invoke} method
- * to notify the application. Normally, the application then schedules an execution
- * of this request, and exit from this method immediately (the point of AWS is not
- * to use this calling thread for request processing.)
- *
- * <p>
- * Unlike the synchronous version, which requires the response to be given as the return value,
- * with AWS the JAX-WS RI will keep the connection with client open, until the application
- * eventually notifies the JAX-WS RI via {@link AsyncProviderCallback}. When that
- * happens that causes the JAX-WS RI to send back a response to the client.
- *
- * <p>
- * The following code shows a very simple AWS example:
- *
- * <pre>
- * &#64;WebService
- * class MyAsyncEchoService implements AsyncProvider&lt;Source> {
- * private static final {@link Executor} exec = ...;
- *
- * public void invoke( final Source request, final AsyncProviderCallback&lt;Source> callback, final WebServiceContext context) {
- * exec.execute(new {@link Runnable}() {
- * public void run() {
- * Thread.sleep(1000); // kill time.
- * callback.send(request); // just echo back
- * }
- * });
- * }
- * }
- * </pre>
- *
- * <p>
- * Please also check the {@link Provider} and its programming model for general
- * provider programming model.
- *
- *
- * <h2>WebServiceContext</h2>
- * <p>
- * In synchronous web services, the injected {@link WebServiceContext} instance uses
- * the calling {@link Thread} to determine which request it should return information about.
- * This no longer works with AWS, as you may need to call {@link WebServiceContext}
- * much later, possibly from entirely different thread.
- *
- * <p>
- * For this reason, {@link AsyncProvider} passes in {@link WebServiceContext} as
- * a parameter. This object remains usable until you invoke {@link AsyncProviderCallback},
- * and it can be invoked from any thread, even concurrently. AWS must not use the injected
- * {@link WebServiceContext}, as its behavior is undefined.
- *
- * @see Provider
- * @author Jitendra Kotamraju
- * @author Kohsuke Kawaguchi
- * @since 2.1
- */
-public interface AsyncProvider<T> {
- /**
- * Schedules an execution of a request.
- *
- * @param request
- * Represents the request message or payload.
- * @param callback
- * Application must notify this callback interface when the processing
- * of a request is complete.
- * @param context
- * The web service context instance that can be used to retrieve
- * context information about the given request.
- */
- public void invoke(
- @NotNull T request,
- @NotNull AsyncProviderCallback<T> callback,
- @NotNull WebServiceContext context);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProviderCallback.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProviderCallback.java
deleted file mode 100644
index 34c30fba..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProviderCallback.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-/**
- * Callback interface to signal JAX-WS RI that the processing of an asynchronous request is complete.
- *
- * <p>
- * The application is responsible for invoking one of the two defined methods to
- * indicate the result of the request processing.
- *
- * <p>
- * Both methods will return immediately, and the JAX-WS RI will
- * send out an actual response at some later point.
- *
- * @author Jitendra Kotamraju
- * @author Kohsuke Kawaguchi
- * @since 2.1
- * @see AsyncProvider
- */
-public interface AsyncProviderCallback<T> {
- /**
- * Indicates that a request was processed successfully.
- *
- * @param response
- * Represents an object to be sent back to the client
- * as a response. To indicate one-way, response needs to be null
- */
- void send(@Nullable T response);
-
- /**
- * Indicates that an error had occured while processing a request.
- *
- * @param t
- * The error is propagated to the client. For example, if this is
- * a SOAP-based web service, the server will send back a SOAP fault.
- */
- void sendError(@NotNull Throwable t);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/BoundEndpoint.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/BoundEndpoint.java
deleted file mode 100644
index e6d9483c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/BoundEndpoint.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.Component;
-
-import java.net.URI;
-
-/**
- * Represents the {@link WSEndpoint} bound to a particular transport.
- *
- * @see Module#getBoundEndpoints()
- * @author Kohsuke Kawaguchi
- */
-public interface BoundEndpoint extends Component {
- /**
- * The endpoint that was bound.
- *
- * <p>
- * Multiple {@link BoundEndpoint}s may point to the same {@link WSEndpoint},
- * if it's bound to multiple transports.
- *
- * @return the endpoint
- */
- @NotNull WSEndpoint getEndpoint();
-
- /**
- * The address of the bound endpoint.
- *
- * <p>
- * For example, if this endpoint is bound to a servlet endpoint
- * "http://foobar/myapp/myservice", then this method should
- * return that address.
- *
- * @return address of the endpoint
- */
- @NotNull URI getAddress();
-
- /**
- * The address of the bound endpoint using the base address. Often
- * times, baseAddress is only avaialble during the request.
- *
- * <p>
- * If the endpoint is bound to a servlet endpoint, the base address
- * won't include the url-pattern, so the base address would be
- * "http://host:port/context". This method would include url-pattern
- * for the endpoint and return that address
- * for e.g. "http://host:port/context/url-pattern"
- *
- * @param baseAddress that is used in computing the full address
- * @return address of the endpoint
- */
- @NotNull URI getAddress(String baseAddress);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Container.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Container.java
deleted file mode 100644
index 914bf920..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Container.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.server;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.Component;
-import com.sun.xml.internal.ws.api.ComponentEx;
-import com.sun.xml.internal.ws.api.ComponentRegistry;
-
-/**
- * Root of the SPI implemented by the container
- * (such as application server.)
- *
- * <p>
- * Often technologies that are built on top of JAX-WS
- * (such as Tango) needs to negotiate private contracts between
- * them and the container. This interface allows such technologies
- * to query the negotiated SPI by using the {@link #getSPI(Class)}.
- *
- * <p>
- * For example, if a security pipe needs to get some information
- * from a container, they can do the following:
- * <ol>
- * <li>Negotiate an interface with the container and define it.
- * (let's call it <tt>ContainerSecuritySPI</tt>.)
- * <li>The container will implement <tt>ContainerSecuritySPI</tt>.
- * <li>At the runtime, a security pipe gets
- * {@link WSEndpoint} and then to {@link Container}.
- * <li>It calls <tt>container.getSPI(ContainerSecuritySPI.class)</tt>
- * <li>The container returns an instance of <tt>ContainerSecuritySPI</tt>.
- * <li>The security pipe talks to the container through this SPI.
- * </ol>
- *
- * <p>
- * This protects JAX-WS from worrying about the details of such contracts,
- * while still providing the necessary service of hooking up those parties.
- *
- * <p>
- * Technologies that run inside JAX-WS server runtime can access this object through
- * {@link WSEndpoint#getContainer()}. In the client runtime, it can be accessed from
- * {@link ContainerResolver#getContainer()}
- *
- * @author Kohsuke Kawaguchi
- * @see WSEndpoint
- */
-public abstract class Container implements ComponentRegistry, ComponentEx {
- private final Set<Component> components = new CopyOnWriteArraySet<Component>();
-
- /**
- * For derived classes.
- */
- protected Container() {
- }
-
- /**
- * Constant that represents a "no {@link Container}",
- * which always returns null from {@link #getSPI(Class)}.
- */
- public static final Container NONE = new NoneContainer();
-
- private static final class NoneContainer extends Container {
- }
-
- public <S> S getSPI(Class<S> spiType) {
- if (components == null) return null;
- for (Component c : components) {
- S s = c.getSPI(spiType);
- if (s != null)
- return s;
- }
- return null;
- }
-
- public Set<Component> getComponents() {
- return components;
- }
-
- public @NotNull <E> Iterable<E> getIterableSPI(Class<E> spiType) {
- E item = getSPI(spiType);
- if (item != null) {
- Collection<E> c = Collections.singletonList(item);
- return c;
- }
- return Collections.emptySet();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ContainerResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ContainerResolver.java
deleted file mode 100644
index 926badd5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ContainerResolver.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-
-/**
- * This class determines an instance of {@link Container} for the runtime.
- * It applies for both server and client runtimes(for e.g in Servlet could
- * be accessing a Web Service).
- *
- * A client that is invoking a web service may be running in a
- * container(for e.g servlet). T
- *
- * <p>
- * ContainerResolver uses a static field to keep the instance of the resolver object.
- * Typically appserver may set its custom container resolver using the static method
- * {@link #setInstance(ContainerResolver)}
- *
- * @author Jitendra Kotamraju
- */
-public abstract class ContainerResolver {
-
- private static final ThreadLocalContainerResolver DEFAULT = new ThreadLocalContainerResolver();
-
- private static volatile ContainerResolver theResolver = DEFAULT;
-
- /**
- * Sets the custom container resolver which can be used to get client's
- * {@link Container}.
- *
- * @param resolver container resolver
- */
- public static void setInstance(ContainerResolver resolver) {
- if(resolver==null)
- resolver = DEFAULT;
- theResolver = resolver;
- }
-
- /**
- * Returns the container resolver which can be used to get client's {@link Container}.
- *
- * @return container resolver instance
- */
- public static @NotNull ContainerResolver getInstance() {
- return theResolver;
- }
-
- /**
- * Returns the default container resolver which can be used to get {@link Container}.
- *
- * @return default container resolver
- */
- public static ThreadLocalContainerResolver getDefault() {
- return DEFAULT;
- }
-
- /**
- * Returns the {@link Container} context in which client is running.
- *
- * @return container instance for the client
- */
- public abstract @NotNull Container getContainer();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/DocumentAddressResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/DocumentAddressResolver.java
deleted file mode 100644
index 44b15f33..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/DocumentAddressResolver.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-/**
- * Resolves relative references among {@link SDDocument}s.
- *
- * <p>
- * This interface is implemented by the caller of
- * {@link SDDocument#writeTo} method so
- * that the {@link SDDocument} can correctly produce references
- * to other documents.
- *
- * <p>
- * This mechanism allows the user of {@link WSEndpoint} to
- * assign logical URLs to each {@link SDDocument} (which is often
- * necessarily done in a transport-dependent way), and then
- * serve description documents.
- *
- *
- *
- * <h2>Usage Example 1</h2>
- * <p>
- * HTTP servlet transport chose to expose those metadata documents
- * to HTTP GET requests where each {@link SDDocument} is identified
- * by a simple query string "?<i>ID</i>". (HTTP servlet transport
- * assigns such IDs by itself.)
- *
- * <p>
- * In this nameing scheme, when {@link SDDocument} X refers to
- * {@link SDDocument} Y, it can put a reference as "?<i>IDofY</i>".
- * By implementing {@link DocumentAddressResolver} it can do so.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface DocumentAddressResolver {
- /**
- * Produces a relative reference from one document to another.
- *
- * @param current
- * The document that is being generated.
- * @param referenced
- * The document that is referenced.
- * @return
- * The reference to be put inside {@code current} to refer to
- * {@code referenced}. This can be a relative URL as well as
- * an absolute. If null is returned, then the {@link SDDocument}
- * will produce a "implicit reference" (for example, &lt;xs:import>
- * without the @schemaLocation attribute, etc).
- */
- @Nullable String getRelativeAddressFor(@NotNull SDDocument current, @NotNull SDDocument referenced);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointAwareCodec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointAwareCodec.java
deleted file mode 100644
index 7e49bb73..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointAwareCodec.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-
-/**
- * Implemented by {@link Codec}s that want to have access to
- * {@link WSEndpoint} object.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.1.1
- */
-public interface EndpointAwareCodec extends Codec {
- /**
- * Called by the {@link WSEndpoint} implementation
- * when the codec is associated with an endpoint.
- */
- void setEndpoint(@NotNull WSEndpoint endpoint);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointComponent.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointComponent.java
deleted file mode 100644
index ebd05370..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointComponent.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.Component;
-
-/**
- * Interface that allows components around {@link WSEndpoint} to hook up
- * with each other.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.1.2
- * @see WSEndpoint#getComponentRegistry()
- * @deprecated replaced by {@link Component}
- */
-public interface EndpointComponent {
- /**
- * Gets the specified SPI.
- *
- * <p>
- * This method works as a kind of directory service
- * for SPIs, allowing various components to define private contract
- * and talk to each other.
- *
- * @return
- * null if such an SPI is not provided by this object.
- */
- @Nullable <T> T getSPI(@NotNull Class<T> spiType);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointData.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointData.java
deleted file mode 100644
index 374f5253..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointData.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2009, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author Jitendra Kotamraju
- */
-public abstract class EndpointData {
-
- public abstract String getNamespace();
-
- public abstract String getServiceName();
-
- public abstract String getPortName();
-
- public abstract String getImplClass();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointReferenceExtensionContributor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointReferenceExtensionContributor.java
deleted file mode 100644
index 2755f406..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointReferenceExtensionContributor.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.pipe.ServerTubeAssemblerContext;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.namespace.QName;
-
-/**
- * Implementations of this class can contribute properties associated with an Endpoint. The properties appear as
- * extensibility elements inside the EndpointReference of the endpoint. If any EPR extensibility elements are configured
- * for an endpoint, the EndpointReference is published inside the WSDL.
- *
- * @since JAX-WS 2.2
- * @author Rama Pulavarthi
- */
-public abstract class EndpointReferenceExtensionContributor {
- /**
- *
- * @param extension EPRExtension is passed if an extension with same QName is already configured on the endpoint
- * via other means (one possible way is by embedding EndpointReference in WSDL).
- *
- * @return EPRExtension that should be finally configured on an Endpoint.
- */
- public abstract WSEndpointReference.EPRExtension getEPRExtension(WSEndpoint endpoint, @Nullable WSEndpointReference.EPRExtension extension );
-
- /**
- *
- * @return QName of the extensibility element that is contributed by this extension.
- */
- public abstract QName getQName();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/HttpEndpoint.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/HttpEndpoint.java
deleted file mode 100644
index e8846c28..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/HttpEndpoint.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.transport.http.HttpAdapter;
-
-/**
- * Light-weight http server transport for {@link WSEndpoint}.
- * It provides a way to start the transport at a local http address and
- * to stop the transport.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class HttpEndpoint {
-
- /**
- * Factory to deploy {@link WSEndpoint} on light-weight
- * http server container.
- *
- * @param endpoint that needs to be deployed at http server
- * @return transport object for the endpoint
- */
- public static HttpEndpoint create(@NotNull WSEndpoint endpoint) {
- return new com.sun.xml.internal.ws.transport.http.server.HttpEndpoint(null, HttpAdapter.createAlone(endpoint));
- }
-
- /**
- * Publishes this endpoint at a localhost's http address.
- *
- * @param address endpoint's http address
- * for e.g http://localhost:8080/ctxt/pattern
- */
- public abstract void publish(@NotNull String address);
-
- /**
- * Stops the published endpoint
- */
- public abstract void stop();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolver.java
deleted file mode 100644
index 7c11e645..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolver.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-import com.sun.xml.internal.ws.resources.WsservletMessages;
-import com.sun.xml.internal.ws.server.ServerRtException;
-import com.sun.xml.internal.ws.server.SingletonResolver;
-
-import javax.xml.ws.Provider;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceException;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Determines the instance that serves
- * the given request packet.
- *
- * <p>
- * The JAX-WS spec always use a singleton instance
- * to serve all the requests, but this hook provides
- * a convenient way to route messages to a proper receiver.
- *
- * <p>
- * Externally, an instance of {@link InstanceResolver} is
- * associated with {@link WSEndpoint}.
- *
- * <h2>Possible Uses</h2>
- * <p>
- * One can use WS-Addressing message properties to
- * decide which instance to deliver a message. This
- * would be an important building block for a stateful
- * web services.
- *
- * <p>
- * One can associate an instance of a service
- * with a specific WS-RM session.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class InstanceResolver<T> {
- /**
- * Decides which instance of 'T' serves the given request message.
- *
- * <p>
- * This method is called concurrently by multiple threads.
- * It is also on a criticail path that affects the performance.
- * A good implementation should try to avoid any synchronization,
- * and should minimize the amount of work as much as possible.
- *
- * @param request
- * Always non-null. Represents the request message to be served.
- * The caller may not consume the {@link Message}.
- */
- public abstract @NotNull T resolve(@NotNull Packet request);
-
- /**
- * Called by the default {@link Invoker} after the method call is done.
- * This gives {@link InstanceResolver} a chance to do clean up.
- *
- * <p>
- * Alternatively, one could override {@link #createInvoker()} to
- * create a custom invoker to do this in more flexible way.
- *
- * <p>
- * The default implementation is a no-op.
- *
- * @param request
- * The same request packet given to {@link #resolve(Packet)} method.
- * @param servant
- * The object returned from the {@link #resolve(Packet)} method.
- * @since 2.1.2
- */
- public void postInvoke(@NotNull Packet request, @NotNull T servant) {
- }
-
- /**
- * Called by {@link WSEndpoint} when it's set up.
- *
- * <p>
- * This is an opportunity for {@link InstanceResolver}
- * to do a endpoint-specific initialization process.
- *
- * @param wsc
- * The {@link WebServiceContext} instance to be injected
- * to the user instances (assuming {@link InstanceResolver}
- */
- public void start(@NotNull WSWebServiceContext wsc, @NotNull WSEndpoint endpoint) {
- // backward compatibility
- start(wsc);
- }
-
- /**
- * @deprecated
- * Use {@link #start(WSWebServiceContext,WSEndpoint)}.
- */
- public void start(@NotNull WebServiceContext wsc) {}
-
- /**
- * Called by {@link WSEndpoint}
- * when {@link WSEndpoint#dispose()} is called.
- *
- * This allows {@link InstanceResolver} to do final clean up.
- *
- * <p>
- * This method is guaranteed to be only called once by {@link WSEndpoint}.
- */
- public void dispose() {}
-
-
- /**
- * Creates a {@link InstanceResolver} implementation that always
- * returns the specified singleton instance.
- */
- public static <T> InstanceResolver<T> createSingleton(T singleton) {
- assert singleton!=null;
- InstanceResolver ir = createFromInstanceResolverAnnotation(singleton.getClass());
- if(ir==null)
- ir = new SingletonResolver<T>(singleton);
- return ir;
- }
-
- /**
- * @deprecated
- * This is added here because a Glassfish integration happened
- * with this signature. Please do not use this. Will be removed
- * after the next GF integration.
- */
- public static <T> InstanceResolver<T> createDefault(@NotNull Class<T> clazz, boolean bool) {
- return createDefault(clazz);
- }
-
- /**
- * Creates a default {@link InstanceResolver} that serves the given class.
- */
- public static <T> InstanceResolver<T> createDefault(@NotNull Class<T> clazz) {
- InstanceResolver<T> ir = createFromInstanceResolverAnnotation(clazz);
- if(ir==null)
- ir = new SingletonResolver<T>(createNewInstance(clazz));
- return ir;
- }
-
- /**
- * Checks for {@link InstanceResolverAnnotation} and creates an instance resolver from it if any.
- * Otherwise null.
- */
- public static <T> InstanceResolver<T> createFromInstanceResolverAnnotation(@NotNull Class<T> clazz) {
- for( Annotation a : clazz.getAnnotations() ) {
- InstanceResolverAnnotation ira = a.annotationType().getAnnotation(InstanceResolverAnnotation.class);
- if(ira==null) continue;
- Class<? extends InstanceResolver> ir = ira.value();
- try {
- return ir.getConstructor(Class.class).newInstance(clazz);
- } catch (InstantiationException e) {
- throw new WebServiceException(ServerMessages.FAILED_TO_INSTANTIATE_INSTANCE_RESOLVER(
- ir.getName(),a.annotationType(),clazz.getName()));
- } catch (IllegalAccessException e) {
- throw new WebServiceException(ServerMessages.FAILED_TO_INSTANTIATE_INSTANCE_RESOLVER(
- ir.getName(),a.annotationType(),clazz.getName()));
- } catch (InvocationTargetException e) {
- throw new WebServiceException(ServerMessages.FAILED_TO_INSTANTIATE_INSTANCE_RESOLVER(
- ir.getName(),a.annotationType(),clazz.getName()));
- } catch (NoSuchMethodException e) {
- throw new WebServiceException(ServerMessages.FAILED_TO_INSTANTIATE_INSTANCE_RESOLVER(
- ir.getName(),a.annotationType(),clazz.getName()));
- }
- }
-
- return null;
- }
-
- protected static <T> T createNewInstance(Class<T> cl) {
- try {
- return cl.newInstance();
- } catch (InstantiationException e) {
- logger.log(Level.SEVERE, e.getMessage(), e);
- throw new ServerRtException(
- WsservletMessages.ERROR_IMPLEMENTOR_FACTORY_NEW_INSTANCE_FAILED(cl));
- } catch (IllegalAccessException e) {
- logger.log(Level.SEVERE, e.getMessage(), e);
- throw new ServerRtException(
- WsservletMessages.ERROR_IMPLEMENTOR_FACTORY_NEW_INSTANCE_FAILED(cl));
- }
- }
-
- /**
- * Wraps this {@link InstanceResolver} into an {@link Invoker}.
- */
- public @NotNull Invoker createInvoker() {
- return new Invoker() {
- @Override
- public void start(@NotNull WSWebServiceContext wsc, @NotNull WSEndpoint endpoint) {
- InstanceResolver.this.start(wsc,endpoint);
- }
-
- @Override
- public void dispose() {
- InstanceResolver.this.dispose();
- }
-
- @Override
- public Object invoke(Packet p, Method m, Object... args) throws InvocationTargetException, IllegalAccessException {
- T t = resolve(p);
- try {
- return MethodUtil.invoke(t, m, args );
- } finally {
- postInvoke(p,t);
- }
- }
-
- @Override
- public <U> U invokeProvider(@NotNull Packet p, U arg) {
- T t = resolve(p);
- try {
- return ((Provider<U>) t).invoke(arg);
- } finally {
- postInvoke(p,t);
- }
- }
-
- public String toString() {
- return "Default Invoker over "+InstanceResolver.this.toString();
- }
- };
- }
-
- private static final Logger logger =
- Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server");
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolverAnnotation.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolverAnnotation.java
deleted file mode 100644
index 5950e150..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolverAnnotation.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * Meta annotation for selecting instance resolver.
- *
- * <p>
- * When service class is annotated with an annotation that has
- * {@link InstanceResolverAnnotation} as meta annotation, the JAX-WS RI
- * runtime will use the instance resolver class specified on {@link #value()}.
- *
- * <p>
- * The {@link InstanceResolver} class must have the public constructor that
- * takes {@link Class}, which represents the type of the service.
- *
- * <p>
- * See {@link com.sun.xml.internal.ws.developer.Stateful} for a real example. This annotation is only for
- * advanced users of the JAX-WS RI.
- *
- * @since JAX-WS 2.1
- * @see com.sun.xml.internal.ws.developer.Stateful
- * @author Kohsuke Kawaguchi
- */
-@Target(ANNOTATION_TYPE)
-@Retention(RUNTIME)
-@Documented
-public @interface InstanceResolverAnnotation {
- Class<? extends InstanceResolver> value();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Invoker.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Invoker.java
deleted file mode 100644
index c6cf0bea..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Invoker.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Packet;
-
-import javax.xml.ws.Provider;
-import javax.xml.ws.WebServiceContext;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-/**
- * Hides the detail of calling into application endpoint implementation.
- *
- * <p>
- * Typical host of the JAX-WS RI would want to use
- * {@link InstanceResolver#createDefault(Class)} and then
- * use <tt>{@link InstanceResolver#createInvoker()} to obtain
- * the default invoker implementation.
- *
- *
- * @author Jitendra Kotamraju
- * @author Kohsuke Kawaguchi
- */
-public abstract class Invoker extends com.sun.xml.internal.ws.server.sei.Invoker {
- /**
- * Called by {@link WSEndpoint} when it's set up.
- *
- * <p>
- * This is an opportunity for {@link Invoker}
- * to do a endpoint-specific initialization process.
- *
- * @param wsc
- * The {@link WebServiceContext} instance that can be injected
- * to the user instances.
- * @param endpoint
- */
- public void start(@NotNull WSWebServiceContext wsc, @NotNull WSEndpoint endpoint) {
- // backward compatibility
- start(wsc);
- }
-
- /**
- * @deprecated
- * Use {@link #start(WSWebServiceContext,WSEndpoint)}
- */
- public void start(@NotNull WebServiceContext wsc) {
- throw new IllegalStateException("deprecated version called");
- }
-
- /**
- * Called by {@link WSEndpoint}
- * when {@link WSEndpoint#dispose()} is called.
- *
- * This allows {@link InstanceResolver} to do final clean up.
- *
- * <p>
- * This method is guaranteed to be only called once by {@link WSEndpoint}.
- */
- public void dispose() {}
-
- /**
- * Invokes {@link Provider#invoke(Object)}
- */
- public <T> T invokeProvider( @NotNull Packet p, T arg ) throws IllegalAccessException, InvocationTargetException {
- // default slow implementation that delegates to the other invoke method.
- return (T)invoke(p,invokeMethod,arg);
- }
-
- /**
- * Invokes {@link AsyncProvider#invoke(Object, AsyncProviderCallback, WebServiceContext)}
- */
- public <T> void invokeAsyncProvider( @NotNull Packet p, T arg, AsyncProviderCallback cbak, WebServiceContext ctxt ) throws IllegalAccessException, InvocationTargetException {
- // default slow implementation that delegates to the other invoke method.
- invoke(p, asyncInvokeMethod, arg, cbak, ctxt);
- }
-
- private static final Method invokeMethod;
-
- static {
- try {
- invokeMethod = Provider.class.getMethod("invoke",Object.class);
- } catch (NoSuchMethodException e) {
- throw new AssertionError(e);
- }
- }
-
- private static final Method asyncInvokeMethod;
-
- static {
- try {
- asyncInvokeMethod = AsyncProvider.class.getMethod("invoke",Object.class, AsyncProviderCallback.class, WebServiceContext.class);
- } catch (NoSuchMethodException e) {
- throw new AssertionError(e);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/LazyMOMProvider.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/LazyMOMProvider.java
deleted file mode 100644
index 86291c35..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/LazyMOMProvider.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.xml.internal.ws.server.WSEndpointImpl;
-import java.util.HashSet;
-import java.util.Set;
-import com.sun.org.glassfish.external.amx.AMXGlassfish;
-import com.sun.org.glassfish.external.amx.MBeanListener;
-import com.sun.org.glassfish.gmbal.ManagedObjectManager;
-
-/**
- * The lazy provider is intended to defer Gmbal API calls until there is a JMX connection. The provider is scope
- * (environment) aware and behaves accordingly to actual scope. The default behaviour does not defers Gmbal API calls.
- *
- * There are two kind of method allowing registration of an object as a listener. One is for {@code WSEndpointImpl}
- * instances (implementing {@code WSEndpointScopeChangeListener}) and the other is for arbitrary objects
- * (implementing {@code DefaultScopeChangeListener}) that want to be notified about scope changes. The distinction is made
- * because of the fact that endpoints should be registered first and other objects (e.g. dependants on endpoints) must
- * be registered after all the endpoints are processed so no inconsistency is present.
- *
- * Glassfish:
- * {@link WebServicesContainer} is one of two classes for which a {@link ManagedObjectManager} instance (see Gmbal API)
- * is created when a webservice application is deployed into the Glassfish. For the purpose of postponing Gmbal API calls
- * the {@code WebServicesContainer} extends {@link MBeanListener.CallbackImpl} so it can register itself as a listener of
- * {@link AMXGlassfish} and receive a notification about a connection of a JMX client to the Glassfish server (see
- * {@code WebServicesContainer#postConstruct} for registration details). The moment the JMX client is connected a notification
- * is sent to the listeners of {@code AMXGlassfish}. When this event is received by {@code WebServiceContainer} (see the
- * callback method {@code mbeanRegistered}) a {@code ManagedObjectManager} instance is created and no further deferring
- * of Gmbal API calls is needed.
- *
- * Metro/JAX-WS:
- * The situation in Metro/JAX-WS is slightly different from the one described above. Metro/JAX-WS can be used as standalone
- * libraries (outside of Glassfish) so no notification from the Glassfish server can be expected in this case. This leads
- * to a situation when Metro/JAX-WS has to be aware of context in which it is used and acts appropriately. There are 3
- * scopes an application using Metro/JAX-WS can be in: {@code STANDALONE}, {@code GLASSFISH_NO_JMX}, {@code GLASSFISH_JMX}
- * ({@link LazyMOMProvider#scope}). The default scope is {@code STANDALONE} and all Gmbal API calls are invoked as they
- * are requested. The other two scopes are applied only when an application is deployed into a Glassfish server. The
- * {@code GLASSFISH_NO_JMX} is set at the moment the application is deployed (see below) and its purpose is to defer Gmbal
- * API calls for as long as possible. For some classes e.g. {@code ManagedObjectManager} proxy classes were introduced to
- * avoid the necessity of creating the real Gmbal objects but if a method is invoked on these proxies the creation of real
- * Gmbal objects is forced even in this scope. The {@code GLASSFISH_JMX} scope is set when a JMX client is connected to
- * the Glassfish server and it processes Gmbal API calls without deferring (as if the application was in the
- * {@code STANDALONE} scope). The entry point for postponing the Gmbal API calls / creating Gmbal objects in Metro/JAX-WS
- * is {@link LazyMOMProvider}. This class is capable of receiving notifications from the Glassfish server
- * ({@code LazyMOMProvider.initMOMForScope}) about the scope change and it also spread this information to its listeners.
- * The listeners of {@code LazyMOMProvider} are of two kinds: {@link LazyMOMProvider.WSEndpointScopeChangeListener} and
- * {@link LazyMOMProvider.DefaultScopeChangeListener}. Extensions of {@link WSEndpoint} (e.g. {@link WSEndpointImpl})
- * should implement the {@code LazyMOMProvider.WSEndpointScopeChangeListener} and register themselves as endpoint listeners
- * of {@code LazyMOMProvider}. Other classes should implement the latter mentioned interface and register themselves as
- * a non-endpoint listener. The differences between these two kind of listeners are described in {@code LazyMOMProvider}
- * class comment. An implementation of {@code LazyMOMProvider.DefaultScopeChangeListener} is provided in Metro
- * ({@link WSEndpointCollectionBasedMOMListener}). As mentioned above this listener register itself as a non-endpoint
- * listener of {@code LazyMOMProvider} ({@code WSEndpointCollectionBasedMOMListener.init}). An instance of this class is
- * used in these factories: {@link SessionManager}, {@link NonceManager} and {@link SequenceManagerFactory}.
- * {@code SessionManager}, {@code NonceManager}, {@code PersistentSequenceManager} and {@code InVmSequenceManager} also
- * (indirectly) implement {@link MOMRegistrationAware} for providing information whether a manager is registered at
- * {@code ManagedObjectManager} or not. Registration of a manager at {@code ManagedObjectManager} can be processed directly
- * (if {@code WSEndpointCollectionBasedMOMListener.canRegisterAtMOM} returns {@code true}) via
- * {@code WSEndpointCollectionBasedMOMListener.registerAtMOM} or is deferred by putting the manager into
- * {@code WSEndpointCollectionBasedMOMListener.registrationAwareMap}. Managers stored in for deferred registration are
- * processed at the moment the {@code LazyMOMProvider} notifies the {@code WSEndpointCollectionBasedMOMListener} about
- * the scope change.
- * The mentioned postponing of Gmbal API calls applies only to the server side of the webservice application.
- */
-public enum LazyMOMProvider {
-
- INSTANCE;
-
- /**
- * Possible scopes (environments) in which the provider (and object associated with it) could be in.
- * Default scope is STANDALONE - applied during initialization of classes. For now, only possible scope change for a
- * object can be in this direction: STANDALONE -> GLASSFISH_NO_JMX -> GLASSFISH_JMX.
- */
- public static enum Scope {
-
- //** Default scope where lazy flag is not applied and all Gmbal API calls are processed immediately. */
- STANDALONE,
-
- /** In this scope almost all Gmbal API call are deferred until a JMX connection to a Glassfish server is created */
- GLASSFISH_NO_JMX,
-
- /** Same as STANDALONE. Gmbal API calls are processed immediately. */
- GLASSFISH_JMX
-
- }
-
- /**
- * Interface for all object that want to be notified about scope change, introducing required methods.
- */
- public static interface ScopeChangeListener {
-
- void scopeChanged(Scope scope);
-
- }
-
- /**
- * Default interface for all object that want to be notified about scope change. This interface should not be
- * implemented directly.
- */
- public static interface DefaultScopeChangeListener extends ScopeChangeListener {
- }
-
- /**
- * Interface used for distinguishing between a registration of a WSEndpointImpl rather than of other classes.
- * Webservice Endpoints should get a notification about scope change sooner than the rest of the registered listeners
- * (there is a possibility that other listeners are dependant on Webservice Endpoints).
- */
- public static interface WSEndpointScopeChangeListener extends ScopeChangeListener {
- }
-
- private final Set<WSEndpointScopeChangeListener> endpointsWaitingForMOM = new HashSet<WSEndpointScopeChangeListener>();
- private final Set<DefaultScopeChangeListener> listeners = new HashSet<DefaultScopeChangeListener>();
-
- private volatile Scope scope = Scope.STANDALONE;
-
- /**
- * Initializes this provider with a given scope. If the given scope is different than the one this provider is
- * currently in and the transition between scopes is valid then a event is fired to all registered listeners.
- *
- * @param scope a scope to initialize this provider with
- */
- public void initMOMForScope(LazyMOMProvider.Scope scope) {
- // cannot go backwards between scopes, for possible scope changes see #Scope
- if ((this.scope == Scope.GLASSFISH_JMX)
- || (scope == Scope.STANDALONE && (this.scope == Scope.GLASSFISH_JMX || this.scope == Scope.GLASSFISH_NO_JMX))
- || this.scope == scope) {
- return;
- }
-
- this.scope = scope;
-
- fireScopeChanged();
- }
-
- /**
- * Notifies the registered listeners about the scope change.
- */
- private void fireScopeChanged() {
- for (ScopeChangeListener wsEndpoint : endpointsWaitingForMOM) {
- wsEndpoint.scopeChanged(this.scope);
- }
-
- for (ScopeChangeListener listener : listeners) {
- listener.scopeChanged(this.scope);
- }
- }
-
- /**
- * Registers the given object as a listener.
- *
- * @param listener a listener to be registered
- */
- public void registerListener(DefaultScopeChangeListener listener) {
- listeners.add(listener);
-
- if (!isProviderInDefaultScope()) {
- listener.scopeChanged(this.scope);
- }
- }
-
- /**
- * Returns {@code true} if this provider is in the default scope.
- *
- * @return {@code true} if this provider is in the default scope,
- * {@code false} otherwise
- */
- private boolean isProviderInDefaultScope() {
- return this.scope == Scope.STANDALONE;
- }
-
- public Scope getScope() {
- return scope;
- }
-
- /**
- * Registers a Webservice Endpoint as a listener.
- * Webservice Endpoints should rather register through this method than through LazyMOMProvider#registerListener
- * because generally they need to be notified sooner than arbitrary listener (i.e. object that is dependant on
- * Webservice Endpoint)
- *
- * @param wsEndpoint a Webservice Endpoint to be registered
- */
- public void registerEndpoint(WSEndpointScopeChangeListener wsEndpoint) {
- endpointsWaitingForMOM.add(wsEndpoint);
-
- if (!isProviderInDefaultScope()) {
- wsEndpoint.scopeChanged(this.scope);
- }
- }
-
- /**
- * Unregisters a Webservice Endpoint from the list of listeners.
- *
- * @param wsEndpoint a Webservice Endpoint to be unregistered
- */
- public void unregisterEndpoint(WSEndpointScopeChangeListener wsEndpoint) {
- endpointsWaitingForMOM.remove(wsEndpoint);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/MethodUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/MethodUtil.java
deleted file mode 100644
index c8497055..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/MethodUtil.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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.server;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks
- * to java.lang,reflect.Method.invoke()
- *
- * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too!
- */
-class MethodUtil {
-
- private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName());
- private static final Method INVOKE_METHOD;
-
- static {
- Method method;
- try {
- Class<?> clazz = Class.forName("sun.reflect.misc.MethodUtil");
- method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods.");
- }
- } catch (Throwable t) {
- method = null;
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM");
- }
- }
- INVOKE_METHOD = method;
- }
-
- static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException {
- if (INVOKE_METHOD != null) {
- // sun.reflect.misc.MethodUtil.invoke(method, owner, args)
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil");
- }
- try {
- return INVOKE_METHOD.invoke(null, method, target, args);
- } catch (InvocationTargetException ite) {
- // unwrap invocation exception added by reflection code ...
- throw unwrapException(ite);
- }
- } else {
- // other then Oracle JDK ...
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM");
- }
- return method.invoke(target, args);
- }
- }
-
- private static InvocationTargetException unwrapException(InvocationTargetException ite) {
- Throwable targetException = ite.getTargetException();
- if (targetException != null && targetException instanceof InvocationTargetException) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Unwrapping invocation target exception");
- }
- return (InvocationTargetException) targetException;
- } else {
- return ite;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Module.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Module.java
deleted file mode 100644
index a676a667..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Module.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.Component;
-import com.sun.xml.internal.ws.transport.http.HttpAdapterList;
-
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
-import java.util.List;
-
-/**
- * Represents an object scoped to the current "module" (like a JavaEE web appliation).
- *
- * <p>
- * This object can be obtained from {@link Container#getSPI(Class)}.
- *
- * <p>
- * The scope of the module is driven by {@link W3CEndpointReferenceBuilder#build()}'s
- * requirement that we need to identify a {@link WSEndpoint} that has a specific
- * service/port name.
- *
- * <p>
- * For JavaEE containers this should be scoped to a JavaEE application. For
- * other environment, this could be scoped to any similar notion. If no such
- * notion is available, the implementation of {@link Container} can return
- * a new {@link Module} object each time {@link Container#getSPI(Class)} is invoked.
- *
- * <p>
- * There's a considerable overlap between this and {@link HttpAdapterList}.
- * The SPI really needs to be reconsidered
- *
- *
- * @see Container
- * @author Kohsuke Kawaguchi
- * @since 2.1 EA3
- */
-public abstract class Module implements Component {
- /**
- * Gets the list of {@link BoundEndpoint} deployed in this module.
- *
- * <p>
- * From the point of view of the {@link Module} implementation,
- * it really only needs to provide a {@link List} object as a data store.
- * JAX-WS will update this list accordingly.
- *
- * @return
- * always return the same non-null instance.
- */
- public abstract @NotNull List<BoundEndpoint> getBoundEndpoints();
-
- public @Nullable <S> S getSPI(@NotNull Class<S> spiType) {
- return null;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/PortAddressResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/PortAddressResolver.java
deleted file mode 100644
index f0e16d14..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/PortAddressResolver.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.namespace.QName;
-
-/**
- * Resolves port address for an endpoint. A WSDL may contain multiple
- * endpoints, and some of the endpoints may be packaged in a single WAR file.
- * If an endpoint is serving the WSDL, it would be nice to fill the port addresses
- * of other endpoints in the WAR.
- *
- * <p>
- * This interface is implemented by the caller of
- * {@link SDDocument#writeTo} method so
- * that the {@link SDDocument} can correctly fills the addresses of known
- * endpoints.
- *
- *
- * @author Jitendra Kotamraju
- */
-public abstract class PortAddressResolver {
- /**
- * Gets the endpoint address for a WSDL port
- *
- * @param serviceName
- * WSDL service name(wsd:service in WSDL) for which address is needed. Always non-null.
- * @param portName
- * WSDL port name(wsdl:port in WSDL) for which address is needed. Always non-null.
- * @return
- * The address needs to be put in WSDL for port element's location
- * attribute. Can be null. If it is null, existing port address
- * is written as it is (without any patching).
- */
- public abstract @Nullable String getAddressFor(@NotNull QName serviceName, @NotNull String portName);
-
- /**
- * Gets the endpoint address for a WSDL port
- *
- * @param serviceName
- * WSDL service name(wsd:service in WSDL) for which address is needed. Always non-null.
- * @param portName
- * WSDL port name(wsdl:port in WSDL) for which address is needed. Always non-null.
- * @param currentAddress
- * Whatever current address specified for the port in the WSDL
- * @return
- * The address needs to be put in WSDL for port element's location
- * attribute. Can be null. If it is null, existing port address
- * is written as it is (without any patching).
- */
- public @Nullable String getAddressFor(@NotNull QName serviceName, @NotNull String portName, String currentAddress) {
- return getAddressFor(serviceName, portName);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ProviderInvokerTubeFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ProviderInvokerTubeFactory.java
deleted file mode 100644
index c5fee67a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ProviderInvokerTubeFactory.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.server;
-
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.server.provider.AsyncProviderInvokerTube;
-import com.sun.xml.internal.ws.server.provider.ProviderArgumentsBuilder;
-import com.sun.xml.internal.ws.server.provider.ProviderInvokerTube;
-import com.sun.xml.internal.ws.server.provider.SyncProviderInvokerTube;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Factory for Provider invoker tubes that know how to handle specific
- * types of Providers (i.e., javax.xml.ws.Provider).
- *
- */
-
-public abstract class ProviderInvokerTubeFactory<T> {
- /**
- *
- */
- protected abstract ProviderInvokerTube<T> doCreate(@NotNull final Class<T> implType,
- @NotNull final Invoker invoker,
- @NotNull final ProviderArgumentsBuilder<?> argsBuilder,
- final boolean isAsync);
-
- private static final ProviderInvokerTubeFactory DEFAULT = new DefaultProviderInvokerTubeFactory();
-
- private static class DefaultProviderInvokerTubeFactory<T> extends ProviderInvokerTubeFactory<T> {
- @Override
- public ProviderInvokerTube<T> doCreate(@NotNull final Class<T> implType,
- @NotNull final Invoker invoker,
- @NotNull final ProviderArgumentsBuilder<?> argsBuilder,
- final boolean isAsync)
- {
- return createDefault(implType, invoker, argsBuilder, isAsync);
- }
- }
-
- /**
- * @param classLoader
- * @param container
- * @param implType
- * @param invoker
- * @param argsBuilder
- * @param isAsync
- *
- * @return
- */
- public static <T> ProviderInvokerTube<T> create(@Nullable final ClassLoader classLoader,
- @NotNull final Container container,
- @NotNull final Class<T> implType,
- @NotNull final Invoker invoker,
- @NotNull final ProviderArgumentsBuilder<?> argsBuilder,
- final boolean isAsync)
- {
- for (ProviderInvokerTubeFactory factory : ServiceFinder.find(ProviderInvokerTubeFactory.class,
- classLoader, container))
- {
- ProviderInvokerTube<T> tube = factory.doCreate(implType, invoker, argsBuilder, isAsync);
- if (tube != null) {
- if (logger.isLoggable(Level.FINE)) {
- ProviderInvokerTubeFactory.logger.log(Level.FINE, "{0} successfully created {1}", new Object[]{factory.getClass(), tube});
- }
- return tube;
- }
- }
- return DEFAULT.createDefault(implType, invoker, argsBuilder, isAsync);
- }
-
- protected ProviderInvokerTube<T> createDefault(@NotNull final Class<T> implType,
- @NotNull final Invoker invoker,
- @NotNull final ProviderArgumentsBuilder<?> argsBuilder,
- final boolean isAsync)
- {
- return
- isAsync
- ? new AsyncProviderInvokerTube(invoker, argsBuilder)
- : new SyncProviderInvokerTube (invoker, argsBuilder);
- }
-
- private static final Logger logger = Logger.getLogger(ProviderInvokerTubeFactory.class.getName());
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ResourceInjector.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ResourceInjector.java
deleted file mode 100644
index 6c89ee06..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ResourceInjector.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.server.DefaultResourceInjector;
-
-import javax.annotation.PostConstruct;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceException;
-
-/**
- * Represents a functionality of the container to inject resources
- * to application service endpoint object (usually but not necessarily as per JavaEE spec.)
- *
- * <p>
- * If {@link Container#getSPI(Class)} returns a valid instance of {@link ResourceInjector},
- * The JAX-WS RI will call the {@link #inject} method for each service endpoint
- * instance that it manages.
- *
- * <p>
- * The JAX-WS RI will be responsible for calling {@link PostConstruct} callback,
- * so implementations of this class need not do so.
- *
- * @author Kohsuke Kawaguchi
- * @see Container
- */
-public abstract class ResourceInjector {
- /**
- * Performs resource injection.
- *
- * @param context
- * {@link WebServiceContext} implementation to be injected into the instance.
- * @param instance
- * Instance of the service endpoint class to which resources will be injected.
- *
- * @throws WebServiceException
- * If the resource injection fails.
- */
- public abstract void inject(@NotNull WSWebServiceContext context, @NotNull Object instance);
-
- /**
- * Fallback {@link ResourceInjector} implementation used when the {@link Container}
- * doesn't provide one.
- *
- * <p>
- * Just inject {@link WSWebServiceContext} and done.
- */
- public static final ResourceInjector STANDALONE = new DefaultResourceInjector();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocument.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocument.java
deleted file mode 100644
index cd8f2d10..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocument.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.Nullable;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.namespace.QName;
-import java.io.OutputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Set;
-
-import com.sun.org.glassfish.gmbal.ManagedAttribute;
-import com.sun.org.glassfish.gmbal.ManagedData;
-
-/**
- * Represents an individual document that forms a {@link ServiceDefinition}.
- *
- * <pre>
- * TODO:
- * how does those documents refer to each other?
- *
- * </pre>
- *
- * @author Jitendra Kotamraju
- */
-@ManagedData
-public interface SDDocument {
-
- /**
- * Gets the root tag name of this document.
- *
- * <p>
- * This can be used to identify a kind of document quickly
- * (such as schema, WSDL, ...)
- *
- * @return
- * always non-null.
- */
- @ManagedAttribute
- QName getRootName();
-
- /**
- * Returns true if this document is WSDL.
- */
- @ManagedAttribute
- boolean isWSDL();
-
- /**
- * Returns true if this document is schema.
- */
- @ManagedAttribute
- boolean isSchema();
-
- /**
- * returns the referenced documents
- */
- @ManagedAttribute
- Set<String> getImports();
-
- /**
- * Gets the system ID of the document where it's taken from. Generated documents
- * use a fake URL that can be used to resolve relative URLs. So donot use this URL
- * for reading or writing.
- */
- @ManagedAttribute
- URL getURL();
-
- /**
- * Writes the document to the given {@link OutputStream}.
- *
- * <p>
- * Since {@link ServiceDefinition} doesn't know which endpoint address
- * {@link Adapter} is serving to, (and often it serves multiple URLs
- * simultaneously), this method takes the PortAddressResolver as a parameter,
- * so that it can produce the corret address information in the generated WSDL.
- *
- * @param portAddressResolver
- * An endpoint address resolver that gives endpoint address for a WSDL
- * port. Can be null.
- * @param resolver
- * Used to resolve relative references among documents.
- * @param os
- * The {@link OutputStream} that receives the generated document.
- *
- * @throws IOException
- * if there was a failure reported from the {@link OutputStream}.
- */
- void writeTo(@Nullable PortAddressResolver portAddressResolver,
- DocumentAddressResolver resolver, OutputStream os) throws IOException;
-
- /**
- * Writes the document to the given {@link XMLStreamWriter}.
- *
- * <p>
- * The same as {@link #writeTo(PortAddressResolver,DocumentAddressResolver,OutputStream)} except
- * it writes to an {@link XMLStreamWriter}.
- *
- * <p>
- * The implementation must not call {@link XMLStreamWriter#writeStartDocument()}
- * nor {@link XMLStreamWriter#writeEndDocument()}. Those are the caller's
- * responsibility.
- *
- * @throws XMLStreamException
- * if the {@link XMLStreamWriter} reports an error.
- */
- void writeTo(PortAddressResolver portAddressResolver,
- DocumentAddressResolver resolver, XMLStreamWriter out) throws XMLStreamException, IOException;
-
- /**
- * {@link SDDocument} that represents an XML Schema.
- */
- interface Schema extends SDDocument {
- /**
- * Gets the target namepsace of this schema.
- */
- @ManagedAttribute
- String getTargetNamespace();
- }
-
- /**
- * {@link SDDocument} that represents a WSDL.
- */
- interface WSDL extends SDDocument {
- /**
- * Gets the target namepsace of this schema.
- */
- @ManagedAttribute
- String getTargetNamespace();
-
- /**
- * This WSDL has a portType definition
- * that matches what {@link WSEndpoint} is serving.
- *
- * TODO: does this info needs to be exposed?
- */
- @ManagedAttribute
- boolean hasPortType();
-
- /**
- * This WSDL has a service definition
- * that matches the {@link WSEndpoint}.
- *
- * TODO: does this info need to be exposed?
- */
- @ManagedAttribute
- boolean hasService();
-
- /**
- * All &lt;service> names that were in this WSDL, or empty set if there was none.
- * Used for error diagnostics.
- */
- @ManagedAttribute
- Set<QName> getAllServices();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentFilter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentFilter.java
deleted file mode 100644
index 56c1fa3d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentFilter.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import java.io.IOException;
-
-/**
- * Provides a way to filter {@link SDDocument} infoset while writing it. These
- * filter objects can be added to {@link ServiceDefinition} using
- * {@link ServiceDefinition#addFilter(SDDocumentFilter)}
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public interface SDDocumentFilter {
- /**
- * Returns a wrapped XMLStreamWriter on top of passed-in XMLStreamWriter.
- * It works like any filtering API for e.g. {@link java.io.FilterOutputStream}.
- * The method returns a XMLStreamWriter that calls the same methods on original
- * XMLStreamWriter with some modified events. The end result is some infoset
- * is filtered before it reaches the original writer and the infoset writer
- * doesn't have to change any code to incorporate this filter.
- *
- * @param doc gives context for the filter. This should only be used to query
- * read-only information. Calling doc.writeTo() may result in infinite loop.
- * @param w Original XMLStreamWriter
- * @return Filtering {@link XMLStreamWriter}
- */
- XMLStreamWriter filter(SDDocument doc, XMLStreamWriter w) throws XMLStreamException, IOException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java
deleted file mode 100644
index 50c497ad..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.ws.streaming.TidyXMLStreamReader;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-/**
- * SPI that provides the source of {@link SDDocument}.
- *
- * <p>
- * This abstract class could be implemented by appliations, or one of the
- * {@link #create} methods can be used.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class SDDocumentSource {
- /**
- * Returns the {@link XMLStreamReader} that reads the document.
- *
- * <p>
- * This method maybe invoked multiple times concurrently.
- *
- * @param xif
- * The implementation may choose to use this object when it wants to
- * create a new parser (or it can just ignore this parameter completely.)
- * @return
- * The caller is responsible for closing the reader to avoid resource leak.
- *
- * @throws XMLStreamException
- * if something goes wrong while creating a parser.
- * @throws IOException
- * if something goes wrong trying to read the document.
- */
- public abstract XMLStreamReader read(XMLInputFactory xif) throws IOException, XMLStreamException;
-
- /**
- * Returns the {@link XMLStreamReader} that reads the document.
- *
- * <p>
- * This method maybe invoked multiple times concurrently.
- *
- * @return
- * The caller is responsible for closing the reader to avoid resource leak.
- *
- * @throws XMLStreamException
- * if something goes wrong while creating a parser.
- * @throws IOException
- * if something goes wrong trying to read the document.
- */
- public abstract XMLStreamReader read() throws IOException, XMLStreamException;
-
- /**
- * System ID of this document.
- */
- public abstract URL getSystemId();
-
- /**
- * Creates {@link SDDocumentSource} from an URL.
- */
- public static SDDocumentSource create(final URL url) {
- return new SDDocumentSource() {
- private final URL systemId = url;
-
- public XMLStreamReader read(XMLInputFactory xif) throws IOException, XMLStreamException {
- InputStream is = url.openStream();
- return new TidyXMLStreamReader(
- xif.createXMLStreamReader(systemId.toExternalForm(),is), is);
- }
-
- public XMLStreamReader read() throws IOException, XMLStreamException {
- InputStream is = url.openStream();
- return new TidyXMLStreamReader(
- XMLStreamReaderFactory.create(systemId.toExternalForm(),is,false), is);
- }
-
- public URL getSystemId() {
- return systemId;
- }
- };
- }
-
- /**
- * Creates a {@link SDDocumentSource} from {@link XMLStreamBuffer}.
- */
- public static SDDocumentSource create(final URL systemId, final XMLStreamBuffer xsb) {
- return new SDDocumentSource() {
- public XMLStreamReader read(XMLInputFactory xif) throws XMLStreamException {
- return xsb.readAsXMLStreamReader();
- }
-
- public XMLStreamReader read() throws XMLStreamException {
- return xsb.readAsXMLStreamReader();
- }
-
- public URL getSystemId() {
- return systemId;
- }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServerPipelineHook.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServerPipelineHook.java
deleted file mode 100644
index fbb7ff33..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServerPipelineHook.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.pipe.Pipe;
-import com.sun.xml.internal.ws.api.pipe.ServerPipeAssemblerContext;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterPipeImpl;
-
-/**
- * Allow the container (primarily Glassfish) to inject
- * their own pipes into the pipeline.
- *
- * <p>
- * This interface has a rather ad-hoc set of methods, because
- * we didn't want to define an autonomous pipe-assembly process.
- * (We thought this is a smaller evil compared to that.)
- *
- * <p>
- * JAX-WS obtains this through {@link Container#getSPI(Class)}.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class ServerPipelineHook {
- /**
- * Called during the pipeline construction process once to allow a container
- * to register a pipe for monitoring.
- *
- * This pipe will be injected to a point very close to the transport, allowing
- * it to measure the time it takes for processing as well as detecting errors.
- *
- * @param ctxt
- * Represents abstraction of SEI, WSDL abstraction etc. Context can be used
- * whether add a new pipe to the head or not.
- *
- * @param tail
- * Head of the partially constructed pipeline. If the implementation
- * wishes to add new pipes, it should do so by extending
- * {@link AbstractFilterPipeImpl} and making sure that this {@link Pipe}
- * eventually processes messages.
- *
- * @return
- * The default implementation just returns <tt>tail</tt>, which means
- * no additional pipe is inserted. If the implementation adds
- * new pipes, return the new head pipe.
- */
- public @NotNull Pipe createMonitoringPipe(ServerPipeAssemblerContext ctxt, @NotNull Pipe tail) {
- return tail;
- }
-
- /**
- * Called during the pipeline construction process once to allow a container
- * to register a pipe for security.
- *
- * This pipe will be injected to a point very close to the transport, allowing
- * it to do some security operations.
- *
- * @param ctxt
- * Represents abstraction of SEI, WSDL abstraction etc. Context can be used
- * whether add a new pipe to the head or not.
- *
- * @param tail
- * Head of the partially constructed pipeline. If the implementation
- * wishes to add new pipes, it should do so by extending
- * {@link AbstractFilterPipeImpl} and making sure that this {@link Pipe}
- * eventually processes messages.
- *
- * @return
- * The default implementation just returns <tt>tail</tt>, which means
- * no additional pipe is inserted. If the implementation adds
- * new pipes, return the new head pipe.
- */
- public @NotNull Pipe createSecurityPipe(ServerPipeAssemblerContext ctxt, @NotNull Pipe tail) {
- return tail;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServiceDefinition.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServiceDefinition.java
deleted file mode 100644
index a2c047b3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServiceDefinition.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
-
-/**
- * Root of the unparsed WSDL and other resources referenced from it.
- * This object represents the description of the service
- * that a {@link WSEndpoint} offers.
- *
- * <p>
- * A description consists of a set of {@link SDDocument}, which
- * each represents a single XML document that forms a part of the
- * descriptor (for example, WSDL might refer to separate schema documents,
- * or a WSDL might refer to another WSDL.)
- *
- * <p>
- * {@link ServiceDefinition} and its descendants are immutable
- * read-only objects. Once they are created, they always return
- * the same value.
- *
- * <h2>Expected Usage</h2>
- * <p>
- * This object is intended to be used for serving the descriptors
- * to remote clients (such as by MEX, or other protocol-specific
- * metadata query, such as HTTP GET with "?wsdl" query string.)
- *
- * <p>
- * This object is <b>NOT</b> intended to be used by other
- * internal components to parse them. For that purpose, use
- * {@link WSDLModel} instead.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface ServiceDefinition extends Iterable<SDDocument> {
- /**
- * Gets the "primary" {@link SDDocument} that represents a WSDL.
- *
- * <p>
- * This WSDL eventually refers to all the other {@link SDDocument}s.
- *
- * @return
- * always non-null.
- */
- @NotNull SDDocument getPrimary();
-
- /**
- * Adds a filter that is called while writing {@link SDDocument}'s infoset. This
- * filter is applied to the all the other reachable {@link SDDocument}s.
- *
- * @param filter that is called while writing the document
- */
- void addFilter(@NotNull SDDocumentFilter filter);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ThreadLocalContainerResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ThreadLocalContainerResolver.java
deleted file mode 100644
index a2672938..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ThreadLocalContainerResolver.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.server;
-
-import java.util.concurrent.Executor;
-
-/**
- * ContainerResolver based on {@link ThreadLocal}.
- * <p>
- * The ThreadLocalContainerResolver is the default implementation available
- * from the ContainerResolver using {@link ContainerResolver#getDefault()}. Code
- * sections that run with a Container must use the following pattern:
- * <pre>
- * public void m() {
- * Container old = ContainerResolver.getDefault().enterContainer(myContainer);
- * try {
- * // ... method body
- * } finally {
- * ContainerResolver.getDefault().exitContainer(old);
- * }
- * }
- * </pre>
- * @since 2.2.7
- */
-public class ThreadLocalContainerResolver extends ContainerResolver {
- private ThreadLocal<Container> containerThreadLocal = new ThreadLocal<Container>() {
- @Override
- protected Container initialValue() {
- return Container.NONE;
- }
- };
-
- public Container getContainer() {
- return containerThreadLocal.get();
- }
-
- /**
- * Enters container
- * @param container Container to set
- * @return Previous container; must be remembered and passed to exitContainer
- */
- public Container enterContainer(Container container) {
- Container old = containerThreadLocal.get();
- containerThreadLocal.set(container);
- return old;
- }
-
- /**
- * Exits container
- * @param old Container returned from enterContainer
- */
- public void exitContainer(Container old) {
- containerThreadLocal.set(old);
- }
-
- /**
- * Used by {@link com.sun.xml.internal.ws.api.pipe.Engine} to wrap asynchronous {@link com.sun.xml.internal.ws.api.pipe.Fiber} executions
- * @param container Container
- * @param ex Executor to wrap
- * @return an Executor that will set the container during executions of Runnables
- */
- public Executor wrapExecutor(final Container container, final Executor ex) {
- if (ex == null)
- return null;
-
- return new Executor() {
- @Override
- public void execute(final Runnable command) {
- ex.execute(new Runnable() {
- @Override
- public void run() {
- Container old = enterContainer(container);
- try {
- command.run();
- } finally {
- exitContainer(old);
- }
- }
- });
- }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/TransportBackChannel.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/TransportBackChannel.java
deleted file mode 100644
index f6428745..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/TransportBackChannel.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.server.WSEndpoint.PipeHead;
-
-/**
- * Represents a transport back-channel.
- *
- * <p>
- * When the JAX-WS runtime finds out that the request
- * {@link Packet} being processed is known not to produce
- * a response, it invokes the {@link #close()} method
- * to indicate that the transport does not need to keep
- * the channel for the response message open.
- *
- * <p>
- * This allows the transport to close down the communication
- * channel sooner than wainting for
- * {@link PipeHead#process}
- * method to return, thereby improving the overall throughput
- * of the system.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitu
- */
-public interface TransportBackChannel {
- /**
- * See the class javadoc for the discussion.
- *
- * <p>
- * JAX-WS is not guaranteed to call this method for all
- * operations that do not have a response. This is merely
- * a hint.
- *
- * <p>
- * When the implementation of this method fails to close
- * the connection successfuly, it should record the error,
- * and return normally. Do not throw any exception.
- */
- void close();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSEndpoint.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSEndpoint.java
deleted file mode 100644
index fc7590d7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSEndpoint.java
+++ /dev/null
@@ -1,714 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.server;
-
-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.Component;
-import com.sun.xml.internal.ws.api.ComponentRegistry;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.config.management.EndpointCreationAttributes;
-import com.sun.xml.internal.ws.api.config.management.ManagedEndpointFactory;
-import com.sun.xml.internal.ws.api.databinding.MetadataReader;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.Engine;
-import com.sun.xml.internal.ws.api.pipe.FiberContextSwitchInterceptor;
-import com.sun.xml.internal.ws.api.pipe.ServerTubeAssemblerContext;
-import com.sun.xml.internal.ws.api.pipe.ThrowableContainerPropertySet;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.server.EndpointAwareTube;
-import com.sun.xml.internal.ws.server.EndpointFactory;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import com.sun.xml.internal.ws.wsdl.OperationDispatcher;
-import com.sun.org.glassfish.gmbal.ManagedObjectManager;
-import org.xml.sax.EntityResolver;
-import org.w3c.dom.Element;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Binding;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceException;
-
-import java.net.URL;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.Executor;
-
-/**
- * Root object that hosts the {@link Packet} processing code
- * at the server.
- *
- * <p>
- * One instance of {@link WSEndpoint} is created for each deployed service
- * endpoint. A hosted service usually handles multiple concurrent
- * requests. To do this efficiently, an endpoint handles incoming
- * {@link Packet} through {@link PipeHead}s, where many copies can be created
- * for each endpoint.
- *
- * <p>
- * Each {@link PipeHead} is thread-unsafe, and request needs to be
- * serialized. A {@link PipeHead} represents a sizable resource
- * (in particular a whole pipeline), so the caller is expected to
- * reuse them and avoid excessive allocations as much as possible.
- * Making {@link PipeHead}s thread-unsafe allow the JAX-WS RI internal to
- * tie thread-local resources to {@link PipeHead}, and reduce the total
- * resource management overhead.
- *
- * <p>
- * To abbreviate this resource management (and for a few other reasons),
- * JAX-WS RI provides {@link Adapter} class. If you are hosting a JAX-WS
- * service, you'll most likely want to send requests to {@link WSEndpoint}
- * through {@link Adapter}.
- *
- * <p>
- * {@link WSEndpoint} is ready to handle {@link Packet}s as soon as
- * it's created. No separate post-initialization step is necessary.
- * However, to comply with the JAX-WS spec requirement, the caller
- * is expected to call the {@link #dispose()} method to allow an
- * orderly shut-down of a hosted service.
- *
- *
- *
- * <h3>Objects Exposed From Endpoint</h3>
- * <p>
- * {@link WSEndpoint} exposes a series of information that represents
- * how an endpoint is configured to host a service. See the getXXX methods
- * for more details.
- *
- *
- *
- * <h3>Implementation Notes</h3>
- * <p>
- * {@link WSEndpoint} owns a {@link WSWebServiceContext} implementation.
- * But a bulk of the work is delegated to {@link WebServiceContextDelegate},
- * which is passed in as a parameter to {@link PipeHead#process(Packet, WebServiceContextDelegate, TransportBackChannel)}.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class WSEndpoint<T> implements ComponentRegistry {
-
- /**
- * Gets the Endpoint's codec that is used to encode/decode {@link Message}s. This is a
- * copy of the master codec and it shouldn't be shared across two requests running
- * concurrently(unless it is stateless).
- *
- * @return codec to encode/decode
- */
- public abstract @NotNull Codec createCodec();
-
- /**
- * Gets the application endpoint's serviceName. It could be got from DD or annotations
- *
- * @return same as wsdl:service QName if WSDL exists or generated
- */
- public abstract @NotNull QName getServiceName();
-
- /**
- * Gets the application endpoint's portName. It could be got from DD or annotations
- *
- * @return same as wsdl:port QName if WSDL exists or generated
- */
- public abstract @NotNull QName getPortName();
-
- /**
- * Gets the application endpoint {@link Class} that eventually serves the request.
- *
- * <p>
- * This is the same value given to the {@link #create} method.
- */
- public abstract @NotNull Class<T> getImplementationClass();
-
- /**
- * Represents the binding for which this {@link WSEndpoint}
- * is created for.
- *
- * @return
- * always same object.
- */
- public abstract @NotNull WSBinding getBinding();
-
- /**
- * Gets the {@link Container} object.
- *
- * <p>
- * The components inside {@link WSEndpoint} uses this reference
- * to communicate with the hosting environment.
- *
- * @return
- * always same object. If no "real" {@link Container} instance
- * is given, {@link Container#NONE} will be returned.
- */
- public abstract @NotNull Container getContainer();
-
- /**
- * Gets the port that this endpoint is serving.
- *
- * <p>
- * A service is not required to have a WSDL, and when it doesn't,
- * this method returns null. Otherwise it returns an object that
- * describes the port that this {@link WSEndpoint} is serving.
- *
- * @return
- * Possibly null, but always the same value.
- */
- public abstract @Nullable WSDLPort getPort();
-
- /**
- * Set this {@link Executor} to run asynchronous requests using this executor.
- * This executor is set on {@link Engine} and must be set before
- * calling {@link #schedule(Packet,CompletionCallback) } and
- * {@link #schedule(Packet,CompletionCallback,FiberContextSwitchInterceptor)} methods.
- *
- * @param exec Executor to run async requests
- */
- public abstract void setExecutor(@NotNull Executor exec);
-
- /**
- * This method takes a {@link Packet} that represents
- * a request, run it through a {@link Tube}line, eventually
- * pass it to the user implementation code, which produces
- * a reply, then run that through the tubeline again,
- * and eventually return it as a return value through {@link CompletionCallback}.
- *
- * <p>
- * This takes care of pooling of {@link Tube}lines and reuses
- * tubeline for requests. Same instance of tubeline is not used concurrently
- * for two requests.
- *
- * <p>
- * If the transport is capable of asynchronous execution, use this
- * instead of using {@link PipeHead#process}.
- *
- * <p>
- * Before calling this method, set the executor using {@link #setExecutor}. The
- * executor may used multiple times to run this request in a asynchronous fashion.
- * The calling thread will be returned immediately, and the callback will be
- * called in a different a thread.
- *
- * <p>
- * {@link Packet#transportBackChannel} should have the correct value, so that
- * one-way message processing happens correctly. {@link Packet#webServiceContextDelegate}
- * should have the correct value, so that some {@link WebServiceContext} methods correctly.
- *
- * @see Packet#transportBackChannel
- * @see Packet#webServiceContextDelegate
- *
- * @param request web service request
- * @param callback callback to get response packet
- */
- public final void schedule(@NotNull Packet request, @NotNull CompletionCallback callback ) {
- schedule(request,callback,null);
- }
-
- /**
- * Schedule invocation of web service asynchronously.
- *
- * @see #schedule(Packet, CompletionCallback)
- *
- * @param request web service request
- * @param callback callback to get response packet(exception if there is one)
- * @param interceptor caller's interceptor to impose a context of execution
- */
- public abstract void schedule(@NotNull Packet request, @NotNull CompletionCallback callback, @Nullable FiberContextSwitchInterceptor interceptor );
-
- public void process(@NotNull Packet request, @NotNull CompletionCallback callback, @Nullable FiberContextSwitchInterceptor interceptor ) {
- schedule(request,callback,interceptor);
- }
-
- /**
- * Returns {@link Engine} for this endpoint
- * @return Engine
- */
- public Engine getEngine() {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Callback to notify that jax-ws runtime has finished execution of a request
- * submitted via schedule().
- */
- public interface CompletionCallback {
- /**
- * Indicates that the jax-ws runtime has finished execution of a request
- * submitted via schedule().
- *
- * <p>
- * Since the JAX-WS RI runs asynchronously,
- * this method maybe invoked by a different thread
- * than any of the threads that started it or run a part of tubeline.
- *
- * @param response {@link Packet}
- */
- void onCompletion(@NotNull Packet response);
- }
-
- /**
- * Creates a new {@link PipeHead} to process
- * incoming requests.
- *
- * <p>
- * This is not a cheap operation. The caller is expected
- * to reuse the returned {@link PipeHead}. See
- * {@link WSEndpoint class javadoc} for details.
- *
- * @return
- * A newly created {@link PipeHead} that's ready to serve.
- */
- public abstract @NotNull PipeHead createPipeHead();
-
- /**
- * Represents a resource local to a thread.
- *
- * See {@link WSEndpoint} class javadoc for more discussion about
- * this.
- */
- public interface PipeHead {
- /**
- * Processes a request and produces a reply.
- *
- * <p>
- * This method takes a {@link Packet} that represents
- * a request, run it through a {@link Tube}line, eventually
- * pass it to the user implementation code, which produces
- * a reply, then run that through the pipeline again,
- * and eventually return it as a return value.
- *
- * @param request
- * Unconsumed {@link Packet} that represents
- * a request.
- * @param wscd
- * {@link WebServiceContextDelegate} to be set to {@link Packet}.
- * (we didn't have to take this and instead just ask the caller to
- * set to {@link Packet#webServiceContextDelegate}, but that felt
- * too error prone.)
- * @param tbc
- * {@link TransportBackChannel} to be set to {@link Packet}.
- * See the {@code wscd} parameter javadoc for why this is a parameter.
- * Can be null.
- * @return
- * Unconsumed {@link Packet} that represents
- * a reply to the request.
- *
- * @throws WebServiceException
- * This method <b>does not</b> throw a {@link WebServiceException}.
- * The {@link WSEndpoint} must always produce a fault {@link Message}
- * for it.
- *
- * @throws RuntimeException
- * A {@link RuntimeException} thrown from this method, including
- * {@link WebServiceException}, must be treated as a bug in the
- * code (including JAX-WS and all the pipe implementations), not
- * an operator error by the user.
- *
- * <p>
- * Therefore, it should be recorded by the caller in a way that
- * allows developers to fix a bug.
- */
- @NotNull Packet process(
- @NotNull Packet request, @Nullable WebServiceContextDelegate wscd, @Nullable TransportBackChannel tbc);
- }
-
- /**
- * Indicates that the {@link WSEndpoint} is about to be turned off,
- * and will no longer serve any packet anymore.
- *
- * <p>
- * This method needs to be invoked for the JAX-WS RI to correctly
- * implement some of the spec semantics (TODO: pointer.)
- * It's the responsibility of the code that hosts a {@link WSEndpoint}
- * to invoke this method.
- *
- * <p>
- * Once this method is called, the behavior is undefed for
- * all in-progress {@link PipeHead#process} methods (by other threads)
- * and future {@link PipeHead#process} method invocations.
- */
- public abstract void dispose();
-
- /**
- * Gets the description of the service.
- *
- * <p>
- * A description is a set of WSDL/schema and other documents that together
- * describes a service.
- * A service is not required to have a description, and when it doesn't,
- * this method returns null.
- *
- * @return
- * Possibly null, always the same value under ordinary circumstances but
- * may change if the endpoint is managed.
- */
- public abstract @Nullable ServiceDefinition getServiceDefinition();
-
- /**
- * Gets the list of {@link BoundEndpoint} that are associated
- * with this endpoint.
- *
- * @return
- * always return the same set.
- */
- public List<BoundEndpoint> getBoundEndpoints() {
- Module m = getContainer().getSPI(Module.class);
- return m != null ? m.getBoundEndpoints() : null;
- }
-
- /**
- * Gets the list of {@link EndpointComponent} that are associated
- * with this endpoint.
- *
- * <p>
- * Components (such as codec, tube, handler, etc) who wish to provide
- * some service to other components in the endpoint can iterate the
- * registry and call its {@link EndpointComponent#getSPI(Class)} to
- * establish a private contract between components.
- * <p>
- * Components who wish to subscribe to such a service can add itself
- * to this set.
- *
- * @return
- * always return the same set.
- * @deprecated
- */
- public abstract @NotNull Set<EndpointComponent> getComponentRegistry();
-
- public @NotNull Set<Component> getComponents() {
- return Collections.emptySet();
- }
-
- public @Nullable <S> S getSPI(@NotNull Class<S> spiType) {
- Set<Component> componentRegistry = getComponents();
- if (componentRegistry != null) {
- for (Component c : componentRegistry) {
- S s = c.getSPI(spiType);
- if (s != null)
- return s;
- }
- }
- return getContainer().getSPI(spiType);
- }
-
- /**
- * Gets the {@link com.sun.xml.internal.ws.api.model.SEIModel} that represents the relationship
- * between WSDL and Java SEI.
- *
- * <p>
- * This method returns a non-null value if and only if this
- * endpoint is ultimately serving an application through an SEI.
- *
- * @return
- * maybe null. See above for more discussion.
- * Always the same value.
- */
- public abstract @Nullable SEIModel getSEIModel();
-
- /**
- * Gives the PolicMap that captures the Policy for the endpoint
- *
- * @return PolicyMap
- *
- * @deprecated
- * Do not use this method as the PolicyMap API is not final yet and might change in next few months.
- */
- public abstract PolicyMap getPolicyMap();
-
- /**
- * Get the ManagedObjectManager for this endpoint.
- */
- public abstract @NotNull ManagedObjectManager getManagedObjectManager();
-
- /**
- * Close the ManagedObjectManager for this endpoint.
- * This is used by the Web Service Configuration Management system so that it
- * closes the MOM before it creates a new WSEndpoint. Then it calls dispose
- * on the existing endpoint and then installs the new endpoint.
- * The call to dispose also calls closeManagedObjectManager, but is a noop
- * if that method has already been called.
- */
- public abstract void closeManagedObjectManager();
-
- /**
- * This is only needed to expose info for monitoring.
- */
- public abstract @NotNull ServerTubeAssemblerContext getAssemblerContext();
-
- /**
- * Creates an endpoint from deployment or programmatic configuration
- *
- * <p>
- * This method works like the following:
- * <ol>
- * <li>{@link ServiceDefinition} is modeleed from the given SEI type.
- * <li>{@link Invoker} that always serves <tt>implementationObject</tt> will be used.
- * </ol>
- * @param implType
- * Endpoint class(not SEI). Enpoint class must have @WebService or @WebServiceProvider
- * annotation.
- * @param processHandlerAnnotation
- * Flag to control processing of @HandlerChain on Impl class
- * if true, processes @HandlerChain on Impl
- * if false, DD might have set HandlerChain no need to parse.
- * @param invoker
- * Pass an object to invoke the actual endpoint object. If it is null, a default
- * invoker is created using {@link InstanceResolver#createDefault}. Appservers
- * could create its own invoker to do additional functions like transactions,
- * invoking the endpoint through proxy etc.
- * @param serviceName
- * Optional service name(may be from DD) to override the one given by the
- * implementation class. If it is null, it will be derived from annotations.
- * @param portName
- * Optional port name(may be from DD) to override the one given by the
- * implementation class. If it is null, it will be derived from annotations.
- * @param container
- * Allows technologies that are built on top of JAX-WS(such as WSIT) needs to
- * negotiate private contracts between them and the container
- * @param binding
- * JAX-WS implementation of {@link Binding}. This object can be created by
- * {@link BindingID#createBinding()}. Usually the binding can be got from
- * DD, {@link javax.xml.ws.BindingType}.
- *
- *
- * TODO: DD has a configuration for MTOM threshold.
- * Maybe we need something more generic so that other technologies
- * like Tango can get information from DD.
- *
- * TODO: does it really make sense for this to take EntityResolver?
- * Given that all metadata has to be given as a list anyway.
- *
- * @param primaryWsdl
- * The {@link ServiceDefinition#getPrimary() primary} WSDL.
- * If null, it'll be generated based on the SEI (if this is an SEI)
- * or no WSDL is associated (if it's a provider.)
- * TODO: shouldn't the implementation find this from the metadata list?
- * @param metadata
- * Other documents that become {@link SDDocument}s. Can be null.
- * @param resolver
- * Optional resolver used to de-reference resources referenced from
- * WSDL. Must be null if the {@code url} is null.
- * @param isTransportSynchronous
- * If the caller knows that the returned {@link WSEndpoint} is going to be
- * used by a synchronous-only transport, then it may pass in <tt>true</tt>
- * to allow the callee to perform an optimization based on that knowledge
- * (since often synchronous version is cheaper than an asynchronous version.)
- * This value is visible from {@link ServerTubeAssemblerContext#isSynchronous()}.
- *
- * @return newly constructed {@link WSEndpoint}.
- * @throws WebServiceException
- * if the endpoint set up fails.
- */
- public static <T> WSEndpoint<T> create(
- @NotNull Class<T> implType,
- boolean processHandlerAnnotation,
- @Nullable Invoker invoker,
- @Nullable QName serviceName,
- @Nullable QName portName,
- @Nullable Container container,
- @Nullable WSBinding binding,
- @Nullable SDDocumentSource primaryWsdl,
- @Nullable Collection<? extends SDDocumentSource> metadata,
- @Nullable EntityResolver resolver,
- boolean isTransportSynchronous) {
- return create(implType, processHandlerAnnotation, invoker, serviceName, portName, container, binding, primaryWsdl, metadata, resolver, isTransportSynchronous, true);
- }
-
- public static <T> WSEndpoint<T> create(
- @NotNull Class<T> implType,
- boolean processHandlerAnnotation,
- @Nullable Invoker invoker,
- @Nullable QName serviceName,
- @Nullable QName portName,
- @Nullable Container container,
- @Nullable WSBinding binding,
- @Nullable SDDocumentSource primaryWsdl,
- @Nullable Collection<? extends SDDocumentSource> metadata,
- @Nullable EntityResolver resolver,
- boolean isTransportSynchronous,
- boolean isStandard)
- {
- final WSEndpoint<T> endpoint =
- EndpointFactory.createEndpoint(
- implType,processHandlerAnnotation, invoker,serviceName,portName,container,binding,primaryWsdl,metadata,resolver,isTransportSynchronous,isStandard);
-
- final Iterator<ManagedEndpointFactory> managementFactories = ServiceFinder.find(ManagedEndpointFactory.class).iterator();
- if (managementFactories.hasNext()) {
- final ManagedEndpointFactory managementFactory = managementFactories.next();
- final EndpointCreationAttributes attributes = new EndpointCreationAttributes(
- processHandlerAnnotation, invoker, resolver, isTransportSynchronous);
-
- WSEndpoint<T> managedEndpoint = managementFactory.createEndpoint(endpoint, attributes);
-
- if (endpoint.getAssemblerContext().getTerminalTube() instanceof EndpointAwareTube) {
- ((EndpointAwareTube)endpoint.getAssemblerContext().getTerminalTube()).setEndpoint(managedEndpoint);
- }
-
- return managedEndpoint;
- }
-
-
- return endpoint;
- }
-
- /**
- * Deprecated version that assumes <tt>isTransportSynchronous==false</tt>
- */
- @Deprecated
- public static <T> WSEndpoint<T> create(
- @NotNull Class<T> implType,
- boolean processHandlerAnnotation,
- @Nullable Invoker invoker,
- @Nullable QName serviceName,
- @Nullable QName portName,
- @Nullable Container container,
- @Nullable WSBinding binding,
- @Nullable SDDocumentSource primaryWsdl,
- @Nullable Collection<? extends SDDocumentSource> metadata,
- @Nullable EntityResolver resolver) {
- return create(implType,processHandlerAnnotation,invoker,serviceName,portName,container,binding,primaryWsdl,metadata,resolver,false);
- }
-
-
- /**
- * The same as
- * {@link #create(Class, boolean, Invoker, QName, QName, Container, WSBinding, SDDocumentSource, Collection, EntityResolver)}
- * except that this version takes an url of the <tt>jax-ws-catalog.xml</tt>.
- *
- * @param catalogUrl
- * if not null, an {@link EntityResolver} is created from it and used.
- * otherwise no resolution will be performed.
- */
- public static <T> WSEndpoint<T> create(
- @NotNull Class<T> implType,
- boolean processHandlerAnnotation,
- @Nullable Invoker invoker,
- @Nullable QName serviceName,
- @Nullable QName portName,
- @Nullable Container container,
- @Nullable WSBinding binding,
- @Nullable SDDocumentSource primaryWsdl,
- @Nullable Collection<? extends SDDocumentSource> metadata,
- @Nullable URL catalogUrl) {
- return create(
- implType,processHandlerAnnotation,invoker,serviceName,portName,container,binding,primaryWsdl,metadata,
- XmlUtil.createEntityResolver(catalogUrl),false);
- }
-
- /**
- * Gives the wsdl:service default name computed from the endpoint implementaiton class
- */
- public static @NotNull QName getDefaultServiceName(Class endpointClass){
- return getDefaultServiceName(endpointClass, true, null);
- }
- public static @NotNull QName getDefaultServiceName(Class endpointClass, MetadataReader metadataReader){
- return getDefaultServiceName(endpointClass, true, metadataReader);
- }
-
- public static @NotNull QName getDefaultServiceName(Class endpointClass, boolean isStandard){
- return getDefaultServiceName(endpointClass, isStandard, null);
- }
- public static @NotNull QName getDefaultServiceName(Class endpointClass, boolean isStandard, MetadataReader metadataReader){
- return EndpointFactory.getDefaultServiceName(endpointClass, isStandard, metadataReader);
- }
-
- /**
- * Gives the wsdl:service/wsdl:port default name computed from the endpoint implementaiton class
- */
- public static @NotNull QName getDefaultPortName(@NotNull QName serviceName, Class endpointClass) {
- return getDefaultPortName(serviceName, endpointClass, null);
- }
- public static @NotNull QName getDefaultPortName(@NotNull QName serviceName, Class endpointClass, MetadataReader metadataReader) {
- return getDefaultPortName(serviceName, endpointClass, true, metadataReader);
- }
-
- public static @NotNull QName getDefaultPortName(@NotNull QName serviceName, Class endpointClass, boolean isStandard) {
- return getDefaultPortName(serviceName, endpointClass, isStandard, null);
- }
- public static @NotNull QName getDefaultPortName(@NotNull QName serviceName, Class endpointClass, boolean isStandard, MetadataReader metadataReader){
- return EndpointFactory.getDefaultPortName(serviceName, endpointClass, isStandard, metadataReader);
- }
-
- /**
- * Return EndpointReference instance, based on passed parameters and spec version represented by clazz
- * @param <T>
- * @param clazz represents spec version
- * @param address endpoint address
- * @param wsdlAddress wsdl address
- * @param referenceParameters any reference parameters to be added to the instance
- * @return EndpointReference instance based on passed parameters and values obtained from current instance
- */
- public abstract <T extends EndpointReference> T getEndpointReference(Class<T> clazz, String address, String wsdlAddress, Element... referenceParameters);
-
- /**
- *
- * @param <T>
- * @param clazz
- * @param address
- * @param wsdlAddress
- * @param metadata
- * @param referenceParameters
- * @return EndpointReference instance based on passed parameters and values obtained from current instance
- */
- public abstract <T extends EndpointReference> T getEndpointReference(Class<T> clazz,
- String address, String wsdlAddress, List<Element> metadata,
- List<Element> referenceParameters);
-
- /**
- * Used for managed endpoints infrastructure to compare equality of proxies vs proxied endpoints.
- * @param endpoint
- * @return true if the proxied endpoint instance held by this instance equals to 'endpoint', otherwise return false.
- */
- public boolean equalsProxiedInstance(WSEndpoint endpoint) {
- if (endpoint == null) return false;
- return this.equals(endpoint);
- }
-
- /**
- * Nullable when there is no associated WSDL Model
- * @return
- */
- public abstract @Nullable OperationDispatcher getOperationDispatcher();
-
-
- /**
- * This is used by WsaServerTube and WSEndpointImpl to create a Packet with SOAPFault message from a Java exception.
- */
- public abstract Packet createServiceResponseForException(final ThrowableContainerPropertySet tc,
- final Packet responsePacket,
- final SOAPVersion soapVersion,
- final WSDLPort wsdlPort,
- final SEIModel seiModel,
- final WSBinding binding);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSWebServiceContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSWebServiceContext.java
deleted file mode 100644
index 529fc903..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSWebServiceContext.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.message.Packet;
-
-import javax.xml.ws.WebServiceContext;
-
-/**
- * {@link WebServiceContext} that exposes JAX-WS RI specific additions.
- *
- * <p>
- * {@link WebServiceContext} instances that JAX-WS injects always
- * implement this interface.
- *
- * <p>
- * The JAX-WS RI may add methods on this interface, so do not implement
- * this interface in your code, or risk {@link LinkageError}.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface WSWebServiceContext extends WebServiceContext {
- /**
- * Obtains the request packet that is being processed.
- * @return Packet for the request
- */
- @Nullable Packet getRequestPacket();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebModule.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebModule.java
deleted file mode 100644
index bbb6bf96..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebModule.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-
-/**
- * {@link Module} that is an HTTP container.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.1 EA3
- */
-public abstract class WebModule extends Module {
- /**
- * Gets the host, port, and context path portion of this module.
- *
- * <p>
- * For example, if this is an web appliation running in a servlet
- * container "http://myhost/myapp", then this method should return
- * this URI.
- *
- * <p>
- * This method follows the convention of the <tt>HttpServletRequest.getContextPath()</tt>,
- * and accepts strings like "http://myhost" (for web applications that are deployed
- * to the root context path), or "http://myhost/foobar" (for web applications
- * that are deployed to context path "/foobar")
- *
- * <p>
- * Notice that this method involves in determining the machine name
- * without relying on HTTP "Host" header.
- */
- public abstract @NotNull String getContextPath();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebServiceContextDelegate.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebServiceContextDelegate.java
deleted file mode 100644
index bf31470f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebServiceContextDelegate.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Pipe;
-
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceException;
-import java.security.Principal;
-
-/**
- * This object is set to {@link Packet#webServiceContextDelegate}
- * to serve {@link WebServiceContext} methods for a {@link Packet}.
- *
- * <p>
- * When the user application calls a method on {@link WebServiceContext},
- * the JAX-WS RI goes to the {@link Packet} that represents the request,
- * then check {@link Packet#webServiceContextDelegate}, and forwards
- * the method calls to {@link WebServiceContextDelegate}.
- *
- * <p>
- * All the methods defined on this interface takes {@link Packet}
- * (whose {@link Packet#webServiceContextDelegate} points to
- * this object), so that a single stateless {@link WebServiceContextDelegate}
- * can be used to serve multiple concurrent {@link Packet}s,
- * if the implementation wishes to do so.
- *
- * <p>
- * (It is also allowed to create one instance of
- * {@link WebServiceContextDelegate} for each packet,
- * and thus effectively ignore the packet parameter.)
- *
- * <p>
- * Attaching this on a {@link Packet} allows {@link Pipe}s to
- * intercept and replace them, if they wish.
- *
- *
- * @author Kohsuke Kawaguchi
- */
-public interface WebServiceContextDelegate {
- /**
- * Implements {@link WebServiceContext#getUserPrincipal()}
- * for the given packet.
- *
- * @param request
- * Always non-null. See class javadoc.
- * @see WebServiceContext#getUserPrincipal()
- */
- Principal getUserPrincipal(@NotNull Packet request);
-
- /**
- * Implements {@link WebServiceContext#isUserInRole(String)}
- * for the given packet.
- *
- * @param request
- * Always non-null. See class javadoc.
- * @see WebServiceContext#isUserInRole(String)
- */
- boolean isUserInRole(@NotNull Packet request,String role);
-
- /**
- * Gets the address of the endpoint.
- *
- * <p>
- * The "address" of endpoints is always affected by a particular
- * client being served, hence it's up to transport to provide this
- * information.
- *
- * @param request
- * Always non-null. See class javadoc.
- * @param endpoint
- * The endpoint whose address will be returned.
- *
- * @throws WebServiceException
- * if this method could not compute the address for some reason.
- * @return
- * Absolute URL of the endpoint. This shold be an address that the client
- * can use to talk back to this same service later.
- *
- * @see WebServiceContext#getEndpointReference
- */
- @NotNull String getEPRAddress(@NotNull Packet request, @NotNull WSEndpoint endpoint);
-
- /**
- * Gets the address of the primary WSDL.
- *
- * <p>
- * If a transport supports publishing of WSDL by itself (instead/in addition to MEX),
- * then it should implement this method so that the rest of the JAX-WS RI can
- * use that information.
- *
- * For example, HTTP transports often use the convention {@code getEPRAddress()+"?wsdl"}
- * for publishing WSDL on HTTP.
- *
- * <p>
- * Some transports may not have such WSDL publishing mechanism on its own.
- * Those transports may choose to return null, indicating that WSDL
- * is not published. If such transports are always used in conjunction with
- * other transports that support WSDL publishing (such as SOAP/TCP used
- * with Servlet transport), then such transport may
- * choose to find the corresponding servlet endpoint by {@link Module#getBoundEndpoints()}
- * and try to obtain the address from there.
- *
- * <p>
- * This information is used to put a metadata reference inside an EPR,
- * among other things. Clients that do not support MEX rely on this
- * WSDL URL to retrieve metadata, it is desirable for transports to support
- * this, but not mandatory.
- *
- * <p>
- * This method will be never invoked if the {@link WSEndpoint}
- * does not have a corresponding WSDL to begin with
- * (IOW {@link WSEndpoint#getServiceDefinition() returning null}.
- *
- * @param request
- * Always non-null. See class javadoc.
- * @param endpoint
- * The endpoint whose address will be returned.
- *
- * @return
- * null if the implementation does not support the notion of
- * WSDL publishing.
- */
- @Nullable String getWSDLAddress(@NotNull Packet request, @NotNull WSEndpoint endpoint);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/package-info.java
deleted file mode 100644
index 0c45d23f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * APIs for hosting JAX-WS services.
- *
- * If you are new to the code, start with {@link com.sun.xml.internal.ws.api.server.WSEndpoint}.
- */
-package com.sun.xml.internal.ws.api.server;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java
deleted file mode 100644
index 56831f59..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.streaming;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-import java.util.WeakHashMap;
-
-/**
- * Simple utility ensuring that the value is cached only in case it is non-internal implementation
- */
-abstract class ContextClassloaderLocal<V> {
-
- private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
-
- private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<ClassLoader, V>();
-
- public V get() throws Error {
- ClassLoader tccl = getContextClassLoader();
- V instance = CACHE.get(tccl);
- if (instance == null) {
- instance = createNewInstance();
- CACHE.put(tccl, instance);
- }
- return instance;
- }
-
- public void set(V instance) {
- CACHE.put(getContextClassLoader(), instance);
- }
-
- protected abstract V initialValue() throws Exception;
-
- private V createNewInstance() {
- try {
- return initialValue();
- } catch (Exception e) {
- throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e);
- }
- }
-
- private static String format(String property, Object... args) {
- String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property);
- return MessageFormat.format(text, args);
- }
-
- private static ClassLoader getContextClassLoader() {
- return (ClassLoader)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- ClassLoader cl = null;
- try {
- cl = Thread.currentThread().getContextClassLoader();
- } catch (SecurityException ex) {
- }
- return cl;
- }
- });
- }
-}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties
deleted file mode 100644
index 1a8fc17a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/ContextClassloaderLocal.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-# Error messages for ContextClassloaderLocal utility class
-FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java
deleted file mode 100644
index 40a51184..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java
+++ /dev/null
@@ -1,619 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.streaming;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.streaming.XMLReaderException;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import org.xml.sax.InputSource;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.security.AccessController;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import com.sun.xml.internal.ws.resources.StreamingMessages;
-
-/**
- * Factory for {@link XMLStreamReader}.
- *
- * <p>
- * This wraps {@link XMLInputFactory} and allows us to reuse {@link XMLStreamReader} instances
- * when appropriate.
- *
- * @author Kohsuke Kawaguchi
- */
-@SuppressWarnings("StaticNonFinalUsedInInitialization")
-public abstract class XMLStreamReaderFactory {
-
- private static final Logger LOGGER = Logger.getLogger(XMLStreamReaderFactory.class.getName());
-
- private static final String CLASS_NAME_OF_WSTXINPUTFACTORY = "com.ctc.wstx.stax.WstxInputFactory";
-
- /**
- * Singleton instance.
- */
- private static volatile ContextClassloaderLocal<XMLStreamReaderFactory> streamReader =
- new ContextClassloaderLocal<XMLStreamReaderFactory>() {
-
- @Override
- protected XMLStreamReaderFactory initialValue() {
-
- XMLInputFactory xif = getXMLInputFactory();
- XMLStreamReaderFactory f=null;
-
- // this system property can be used to disable the pooling altogether,
- // in case someone hits an issue with pooling in the production system.
- if(!getProperty(XMLStreamReaderFactory.class.getName()+".noPool")) {
- f = Zephyr.newInstance(xif);
- }
-
- if(f==null) {
- // is this Woodstox?
- if (xif.getClass().getName().equals(CLASS_NAME_OF_WSTXINPUTFACTORY)) {
- f = new Woodstox(xif);
- }
- }
-
- if (f==null) {
- f = new Default();
- }
-
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "XMLStreamReaderFactory instance is = {0}", f);
- }
- return f;
- }
- };
-
- private static XMLInputFactory getXMLInputFactory() {
- XMLInputFactory xif = null;
- if (getProperty(XMLStreamReaderFactory.class.getName()+".woodstox")) {
- try {
- xif = (XMLInputFactory)Class.forName("com.ctc.wstx.stax.WstxInputFactory").newInstance();
- } catch (Exception e) {
- if (LOGGER.isLoggable(Level.WARNING)) {
- LOGGER.log(Level.WARNING, StreamingMessages.WOODSTOX_CANT_LOAD(CLASS_NAME_OF_WSTXINPUTFACTORY), e);
- }
- }
- }
- if (xif == null) {
- xif = XmlUtil.newXMLInputFactory(true);
- }
- xif.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, true);
- xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
- xif.setProperty(XMLInputFactory.IS_COALESCING, true);
-
- return xif;
- }
-
- /**
- * Overrides the singleton {@link XMLStreamReaderFactory} instance that
- * the JAX-WS RI uses.
- */
- public static void set(XMLStreamReaderFactory f) {
- if(f==null) {
- throw new IllegalArgumentException();
- }
- streamReader.set(f);
- }
-
- public static XMLStreamReaderFactory get() {
- return streamReader.get();
- }
-
- public static XMLStreamReader create(InputSource source, boolean rejectDTDs) {
- try {
- // Char stream available?
- if (source.getCharacterStream() != null) {
- return get().doCreate(source.getSystemId(), source.getCharacterStream(), rejectDTDs);
- }
-
- // Byte stream available?
- if (source.getByteStream() != null) {
- return get().doCreate(source.getSystemId(), source.getByteStream(), rejectDTDs);
- }
-
- // Otherwise, open URI
- return get().doCreate(source.getSystemId(), new URL(source.getSystemId()).openStream(),rejectDTDs);
- } catch (IOException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- }
- }
-
- public static XMLStreamReader create(@Nullable String systemId, InputStream in, boolean rejectDTDs) {
- return get().doCreate(systemId,in,rejectDTDs);
- }
-
- public static XMLStreamReader create(@Nullable String systemId, InputStream in, @Nullable String encoding, boolean rejectDTDs) {
- return (encoding == null)
- ? create(systemId, in, rejectDTDs)
- : get().doCreate(systemId,in,encoding,rejectDTDs);
- }
-
- public static XMLStreamReader create(@Nullable String systemId, Reader reader, boolean rejectDTDs) {
- return get().doCreate(systemId,reader,rejectDTDs);
- }
-
- /**
- * Should be invoked when the code finished using an {@link XMLStreamReader}.
- *
- * <p>
- * If the recycled instance implements {@link RecycleAware},
- * {@link RecycleAware#onRecycled()} will be invoked to let the instance
- * know that it's being recycled.
- *
- * <p>
- * It is not a hard requirement to call this method on every {@link XMLStreamReader}
- * instance. Not doing so just reduces the performance by throwing away
- * possibly reusable instances. So the caller should always consider the effort
- * it takes to recycle vs the possible performance gain by doing so.
- *
- * <p>
- * This method may be invoked by multiple threads concurrently.
- *
- * @param r
- * The {@link XMLStreamReader} instance that the caller finished using.
- * This could be any {@link XMLStreamReader} implementation, not just
- * the ones that were created from this factory. So the implementation
- * of this class needs to be aware of that.
- */
- public static void recycle(XMLStreamReader r) {
- get().doRecycle(r);
- if (r instanceof RecycleAware) {
- ((RecycleAware)r).onRecycled();
- }
- }
-
- // implementations
-
- public abstract XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs);
-
- private XMLStreamReader doCreate(String systemId, InputStream in, @NotNull String encoding, boolean rejectDTDs) {
- Reader reader;
- try {
- reader = new InputStreamReader(in, encoding);
- } catch(UnsupportedEncodingException ue) {
- throw new XMLReaderException("stax.cantCreate", ue);
- }
- return doCreate(systemId, reader, rejectDTDs);
- }
-
- public abstract XMLStreamReader doCreate(String systemId, Reader reader, boolean rejectDTDs);
-
- public abstract void doRecycle(XMLStreamReader r);
-
- /**
- * Interface that can be implemented by {@link XMLStreamReader} to
- * be notified when it's recycled.
- *
- * <p>
- * This provides a filtering {@link XMLStreamReader} an opportunity to
- * recycle its inner {@link XMLStreamReader}.
- */
- public interface RecycleAware {
- void onRecycled();
- }
-
- /**
- * {@link XMLStreamReaderFactory} implementation for SJSXP/JAXP RI.
- */
- private static final class Zephyr extends XMLStreamReaderFactory {
- private final XMLInputFactory xif;
-
- private final ThreadLocal<XMLStreamReader> pool = new ThreadLocal<XMLStreamReader>();
-
- /**
- * Sun StAX impl <code>XMLReaderImpl.setInputSource()</code> method via reflection.
- */
- private final Method setInputSourceMethod;
-
- /**
- * Sun StAX impl <code>XMLReaderImpl.reset()</code> method via reflection.
- */
- private final Method resetMethod;
-
- /**
- * The Sun StAX impl's {@link XMLStreamReader} implementation clas.
- */
- private final Class zephyrClass;
-
- /**
- * Creates {@link Zephyr} instance if the given {@link XMLInputFactory} is the one
- * from Zephyr.
- */
- public static @Nullable
- XMLStreamReaderFactory newInstance(XMLInputFactory xif) {
- // check if this is from Zephyr
- try {
- Class<?> clazz = xif.createXMLStreamReader(new StringReader("<foo/>")).getClass();
- // JDK has different XMLStreamReader impl class. Even if we check for that,
- // it doesn't have setInputSource(InputSource). Let it use Default
- if(!(clazz.getName().startsWith("com.sun.xml.internal.stream.")) )
- return null; // nope
- return new Zephyr(xif,clazz);
- } catch (NoSuchMethodException e) {
- return null; // this factory is not for zephyr
- } catch (XMLStreamException e) {
- return null; // impossible to fail to parse <foo/>, but anyway
- }
- }
-
- public Zephyr(XMLInputFactory xif, Class clazz) throws NoSuchMethodException {
- zephyrClass = clazz;
- setInputSourceMethod = clazz.getMethod("setInputSource", InputSource.class);
- resetMethod = clazz.getMethod("reset");
-
- try {
- // Turn OFF internal factory caching in Zephyr.
- // Santiago told me that this makes it thread-safe.
- xif.setProperty("reuse-instance", false);
- } catch (IllegalArgumentException e) {
- // falls through
- }
- this.xif = xif;
- }
-
- /**
- * Fetchs an instance from the pool if available, otherwise null.
- */
- private @Nullable XMLStreamReader fetch() {
- XMLStreamReader sr = pool.get();
- if(sr==null) return null;
- pool.set(null);
- return sr;
- }
-
- @Override
- public void doRecycle(XMLStreamReader r) {
- if(zephyrClass.isInstance(r))
- pool.set(r);
- }
-
- @Override
- public XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs) {
- try {
- XMLStreamReader xsr = fetch();
- if(xsr==null)
- return xif.createXMLStreamReader(systemId,in);
-
- // try re-using this instance.
- InputSource is = new InputSource(systemId);
- is.setByteStream(in);
- reuse(xsr,is);
- return xsr;
- } catch (IllegalAccessException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- } catch (InvocationTargetException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- } catch (XMLStreamException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- }
- }
-
- @Override
- public XMLStreamReader doCreate(String systemId, Reader in, boolean rejectDTDs) {
- try {
- XMLStreamReader xsr = fetch();
- if(xsr==null)
- return xif.createXMLStreamReader(systemId,in);
-
- // try re-using this instance.
- InputSource is = new InputSource(systemId);
- is.setCharacterStream(in);
- reuse(xsr,is);
- return xsr;
- } catch (IllegalAccessException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- } catch (InvocationTargetException e) {
- Throwable cause = e.getCause();
- if (cause == null) {
- cause = e;
- }
- throw new XMLReaderException("stax.cantCreate", cause);
- } catch (XMLStreamException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- }
- }
-
- private void reuse(XMLStreamReader xsr, InputSource in) throws IllegalAccessException, InvocationTargetException {
- resetMethod.invoke(xsr);
- setInputSourceMethod.invoke(xsr,in);
- }
- }
-
- /**
- * Default {@link XMLStreamReaderFactory} implementation
- * that can work with any {@link XMLInputFactory}.
- *
- * <p>
- * {@link XMLInputFactory} is not required to be thread-safe, but
- * if the create method on this implementation is synchronized,
- * it may run into (see <a href="https://jax-ws.dev.java.net/issues/show_bug.cgi?id=555">
- * race condition</a>). Hence, using a XMLInputFactory per thread.
- */
- public static final class Default extends XMLStreamReaderFactory {
-
- private final ThreadLocal<XMLInputFactory> xif = new ThreadLocal<XMLInputFactory>() {
- @Override
- public XMLInputFactory initialValue() {
- return getXMLInputFactory();
- }
- };
-
- @Override
- public XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs) {
- try {
- return xif.get().createXMLStreamReader(systemId,in);
- } catch (XMLStreamException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- }
- }
-
- @Override
- public XMLStreamReader doCreate(String systemId, Reader in, boolean rejectDTDs) {
- try {
- return xif.get().createXMLStreamReader(systemId,in);
- } catch (XMLStreamException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- }
- }
-
- @Override
- public void doRecycle(XMLStreamReader r) {
- // there's no way to recycle with the default StAX API.
- }
-
- }
-
- /**
- * Similar to {@link Default} but doesn't do any synchronization.
- *
- * <p>
- * This is useful when you know your {@link XMLInputFactory} is thread-safe by itself.
- */
- public static class NoLock extends XMLStreamReaderFactory {
- private final XMLInputFactory xif;
-
- public NoLock(XMLInputFactory xif) {
- this.xif = xif;
- }
-
- @Override
- public XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs) {
- try {
- return xif.createXMLStreamReader(systemId,in);
- } catch (XMLStreamException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- }
- }
-
- @Override
- public XMLStreamReader doCreate(String systemId, Reader in, boolean rejectDTDs) {
- try {
- return xif.createXMLStreamReader(systemId,in);
- } catch (XMLStreamException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- }
- }
-
- @Override
- public void doRecycle(XMLStreamReader r) {
- // there's no way to recycle with the default StAX API.
- }
- }
-
- /**
- * Handles Woodstox's XIF, but sets properties to do the string interning, sets various limits, ...
- * Woodstox {@link XMLInputFactory} is thread safe.
- */
- public static final class Woodstox extends NoLock {
-
- public final static String PROPERTY_MAX_ATTRIBUTES_PER_ELEMENT = "xml.ws.maximum.AttributesPerElement";
- public final static String PROPERTY_MAX_ATTRIBUTE_SIZE = "xml.ws.maximum.AttributeSize";
- public final static String PROPERTY_MAX_CHILDREN_PER_ELEMENT = "xml.ws.maximum.ChildrenPerElement";
- public final static String PROPERTY_MAX_ELEMENT_COUNT = "xml.ws.maximum.ElementCount";
- public final static String PROPERTY_MAX_ELEMENT_DEPTH = "xml.ws.maximum.ElementDepth";
- public final static String PROPERTY_MAX_CHARACTERS = "xml.ws.maximum.Characters";
-
- private static final int DEFAULT_MAX_ATTRIBUTES_PER_ELEMENT = 500;
- private static final int DEFAULT_MAX_ATTRIBUTE_SIZE = 65536 * 8;
- private static final int DEFAULT_MAX_CHILDREN_PER_ELEMENT = Integer.MAX_VALUE;
- private static final int DEFAULT_MAX_ELEMENT_DEPTH = 500;
- private static final long DEFAULT_MAX_ELEMENT_COUNT = Integer.MAX_VALUE;
- private static final long DEFAULT_MAX_CHARACTERS = Long.MAX_VALUE;
-
- /* Woodstox default setting:
- int mMaxAttributesPerElement = 1000;
- int mMaxAttributeSize = 65536 * 8;
- int mMaxChildrenPerElement = Integer.MAX_VALUE;
- int mMaxElementDepth = 1000;
- long mMaxElementCount = Long.MAX_VALUE;
- long mMaxCharacters = Long.MAX_VALUE;
- */
-
- private int maxAttributesPerElement = DEFAULT_MAX_ATTRIBUTES_PER_ELEMENT;
- private int maxAttributeSize = DEFAULT_MAX_ATTRIBUTE_SIZE;
- private int maxChildrenPerElement = DEFAULT_MAX_CHILDREN_PER_ELEMENT;
- private int maxElementDepth = DEFAULT_MAX_ELEMENT_DEPTH;
- private long maxElementCount = DEFAULT_MAX_ELEMENT_COUNT;
- private long maxCharacters = DEFAULT_MAX_CHARACTERS;
-
- // Note: this is a copy from com.ctc.wstx.api.WstxInputProperties, to be removed in the future
- private static final java.lang.String P_MAX_ATTRIBUTES_PER_ELEMENT = "com.ctc.wstx.maxAttributesPerElement";
- private static final java.lang.String P_MAX_ATTRIBUTE_SIZE = "com.ctc.wstx.maxAttributeSize";
- private static final java.lang.String P_MAX_CHILDREN_PER_ELEMENT = "com.ctc.wstx.maxChildrenPerElement";
- private static final java.lang.String P_MAX_ELEMENT_COUNT = "com.ctc.wstx.maxElementCount";
- private static final java.lang.String P_MAX_ELEMENT_DEPTH = "com.ctc.wstx.maxElementDepth";
- private static final java.lang.String P_MAX_CHARACTERS = "com.ctc.wstx.maxCharacters";
- private static final java.lang.String P_INTERN_NSURIS = "org.codehaus.stax2.internNsUris";
-
- public Woodstox(XMLInputFactory xif) {
- super(xif);
-
- if (xif.isPropertySupported(P_INTERN_NSURIS)) {
- xif.setProperty(P_INTERN_NSURIS, true);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, P_INTERN_NSURIS + " is {0}", true);
- }
- }
-
- if (xif.isPropertySupported(P_MAX_ATTRIBUTES_PER_ELEMENT)) {
- maxAttributesPerElement = Integer.valueOf(buildIntegerValue(
- PROPERTY_MAX_ATTRIBUTES_PER_ELEMENT, DEFAULT_MAX_ATTRIBUTES_PER_ELEMENT)
- );
- xif.setProperty(P_MAX_ATTRIBUTES_PER_ELEMENT, maxAttributesPerElement);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, P_MAX_ATTRIBUTES_PER_ELEMENT + " is {0}", maxAttributesPerElement);
- }
- }
-
- if (xif.isPropertySupported(P_MAX_ATTRIBUTE_SIZE)) {
- maxAttributeSize = Integer.valueOf(buildIntegerValue(
- PROPERTY_MAX_ATTRIBUTE_SIZE, DEFAULT_MAX_ATTRIBUTE_SIZE)
- );
- xif.setProperty(P_MAX_ATTRIBUTE_SIZE, maxAttributeSize);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, P_MAX_ATTRIBUTE_SIZE + " is {0}", maxAttributeSize);
- }
- }
-
- if (xif.isPropertySupported(P_MAX_CHILDREN_PER_ELEMENT)) {
- maxChildrenPerElement = Integer.valueOf(buildIntegerValue(
- PROPERTY_MAX_CHILDREN_PER_ELEMENT, DEFAULT_MAX_CHILDREN_PER_ELEMENT)
- );
- xif.setProperty(P_MAX_CHILDREN_PER_ELEMENT, maxChildrenPerElement);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, P_MAX_CHILDREN_PER_ELEMENT + " is {0}", maxChildrenPerElement);
- }
- }
-
- if (xif.isPropertySupported(P_MAX_ELEMENT_DEPTH)) {
- maxElementDepth = Integer.valueOf(buildIntegerValue(
- PROPERTY_MAX_ELEMENT_DEPTH, DEFAULT_MAX_ELEMENT_DEPTH)
- );
- xif.setProperty(P_MAX_ELEMENT_DEPTH, maxElementDepth);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, P_MAX_ELEMENT_DEPTH + " is {0}", maxElementDepth);
- }
- }
-
- if (xif.isPropertySupported(P_MAX_ELEMENT_COUNT)) {
- maxElementCount = Long.valueOf(buildLongValue(
- PROPERTY_MAX_ELEMENT_COUNT, DEFAULT_MAX_ELEMENT_COUNT)
- );
- xif.setProperty(P_MAX_ELEMENT_COUNT, maxElementCount);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, P_MAX_ELEMENT_COUNT + " is {0}", maxElementCount);
- }
- }
-
- if (xif.isPropertySupported(P_MAX_CHARACTERS)) {
- maxCharacters = Long.valueOf(buildLongValue(
- PROPERTY_MAX_CHARACTERS, DEFAULT_MAX_CHARACTERS)
- );
- xif.setProperty(P_MAX_CHARACTERS, maxCharacters);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, P_MAX_CHARACTERS + " is {0}", maxCharacters);
- }
- }
- }
-
- @Override
- public XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs) {
- return super.doCreate(systemId, in, rejectDTDs);
- }
-
- @Override
- public XMLStreamReader doCreate(String systemId, Reader in, boolean rejectDTDs) {
- return super.doCreate(systemId, in, rejectDTDs);
- }
- }
-
- private static int buildIntegerValue(String propertyName, int defaultValue) {
- String propVal = System.getProperty(propertyName);
- if (propVal != null && propVal.length() > 0) {
- try {
- Integer value = Integer.parseInt(propVal);
- if (value > 0) {
- // return with the value in System property
- return value;
- }
- } catch (NumberFormatException nfe) {
- if (LOGGER.isLoggable(Level.WARNING)) {
- LOGGER.log(Level.WARNING, StreamingMessages.INVALID_PROPERTY_VALUE_INTEGER(propertyName, propVal, Integer.toString(defaultValue)), nfe);
- }
- }
- }
- // return with the default value
- return defaultValue;
- }
-
- private static long buildLongValue(String propertyName, long defaultValue) {
- String propVal = System.getProperty(propertyName);
- if (propVal != null && propVal.length() > 0) {
- try {
- long value = Long.parseLong(propVal);
- if (value > 0L) {
- // return with the value in System property
- return value;
- }
- } catch (NumberFormatException nfe) {
- // defult will be returned
- if (LOGGER.isLoggable(Level.WARNING)) {
- LOGGER.log(Level.WARNING, StreamingMessages.INVALID_PROPERTY_VALUE_LONG(propertyName, propVal, Long.toString(defaultValue)), nfe);
- }
- }
- }
- // return with the default value
- return defaultValue;
- }
-
- private static Boolean getProperty(final String prop) {
- return AccessController.doPrivileged(
- new java.security.PrivilegedAction<Boolean>() {
- @Override
- public Boolean run() {
- String value = System.getProperty(prop);
- return value != null ? Boolean.valueOf(value) : Boolean.FALSE;
- }
- }
- );
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java
deleted file mode 100644
index 6cff489b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java
+++ /dev/null
@@ -1,406 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.streaming;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.encoding.HasEncoding;
-import com.sun.xml.internal.ws.encoding.SOAPBindingCodec;
-import com.sun.xml.internal.ws.streaming.XMLReaderException;
-import com.sun.xml.internal.ws.util.xml.XMLStreamWriterFilter;
-
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.ws.WebServiceException;
-import java.io.OutputStream;
-import java.io.StringWriter;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Factory for {@link XMLStreamWriter}.
- *
- * <p>
- * This wraps {@link XMLOutputFactory} and allows us to reuse {@link XMLStreamWriter} instances
- * when appropriate.
- *
- * @author Kohsuke Kawaguchi
- */
-@SuppressWarnings("StaticNonFinalUsedInInitialization")
-public abstract class XMLStreamWriterFactory {
-
- private static final Logger LOGGER = Logger.getLogger(XMLStreamWriterFactory.class.getName());
-
- /**
- * Singleton instance.
- */
- private static volatile ContextClassloaderLocal<XMLStreamWriterFactory> writerFactory =
- new ContextClassloaderLocal<XMLStreamWriterFactory>() {
-
- @Override
- protected XMLStreamWriterFactory initialValue() {
- XMLOutputFactory xof = null;
- if (Boolean.getBoolean(XMLStreamWriterFactory.class.getName()+".woodstox")) {
- try {
- xof = (XMLOutputFactory)Class.forName("com.ctc.wstx.stax.WstxOutputFactory").newInstance();
- } catch (Exception e) {
- // Ignore and fallback to default XMLOutputFactory
- }
- }
- if (xof == null) {
- xof = XMLOutputFactory.newInstance();
- }
-
- XMLStreamWriterFactory f=null;
-
- // this system property can be used to disable the pooling altogether,
- // in case someone hits an issue with pooling in the production system.
- if (!Boolean.getBoolean(XMLStreamWriterFactory.class.getName()+".noPool")) {
- try {
- Class<?> clazz = xof.createXMLStreamWriter(new StringWriter()).getClass();
- if (clazz.getName().startsWith("com.sun.xml.internal.stream.")) {
- f = new Zephyr(xof,clazz);
- }
- } catch (XMLStreamException ex) {
- Logger.getLogger(XMLStreamWriterFactory.class.getName()).log(Level.INFO, null, ex);
- } catch (NoSuchMethodException ex) {
- Logger.getLogger(XMLStreamWriterFactory.class.getName()).log(Level.INFO, null, ex);
- }
- }
-
- if(f==null) {
- // is this Woodstox?
- if(xof.getClass().getName().equals("com.ctc.wstx.stax.WstxOutputFactory"))
- f = new NoLock(xof);
- }
- if (f == null)
- f = new Default(xof);
-
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "XMLStreamWriterFactory instance is = {0}", f);
- }
- return f;
- }
- };
-
- /**
- * See {@link #create(OutputStream)} for the contract.
- * This method may be invoked concurrently.
- */
- public abstract XMLStreamWriter doCreate(OutputStream out);
-
- /**
- * See {@link #create(OutputStream,String)} for the contract.
- * This method may be invoked concurrently.
- */
- public abstract XMLStreamWriter doCreate(OutputStream out, String encoding);
-
- /**
- * See {@link #recycle(XMLStreamWriter)} for the contract.
- * This method may be invoked concurrently.
- */
- public abstract void doRecycle(XMLStreamWriter r);
-
- /**
- * Should be invoked when the code finished using an {@link XMLStreamWriter}.
- *
- * <p>
- * If the recycled instance implements {@link RecycleAware},
- * {@link RecycleAware#onRecycled()} will be invoked to let the instance
- * know that it's being recycled.
- *
- * <p>
- * It is not a hard requirement to call this method on every {@link XMLStreamReader}
- * instance. Not doing so just reduces the performance by throwing away
- * possibly reusable instances. So the caller should always consider the effort
- * it takes to recycle vs the possible performance gain by doing so.
- *
- * <p>
- * This method may be invked by multiple threads concurrently.
- *
- * @param r
- * The {@link XMLStreamReader} instance that the caller finished using.
- * This could be any {@link XMLStreamReader} implementation, not just
- * the ones that were created from this factory. So the implementation
- * of this class needs to be aware of that.
- */
- public static void recycle(XMLStreamWriter r) {
- get().doRecycle(r);
- }
-
- /**
- * Interface that can be implemented by {@link XMLStreamWriter} to
- * be notified when it's recycled.
- *
- * <p>
- * This provides a filtering {@link XMLStreamWriter} an opportunity to
- * recycle its inner {@link XMLStreamWriter}.
- */
- public interface RecycleAware {
- void onRecycled();
- }
-
- /**
- * Gets the singleton instance.
- */
- public static @NotNull XMLStreamWriterFactory get() {
- return writerFactory.get();
- }
-
- /**
- * Overrides the singleton {@link XMLStreamWriterFactory} instance that
- * the JAX-WS RI uses.
- *
- * @param f
- * must not be null.
- */
- @SuppressWarnings({"null", "ConstantConditions"})
- public static void set(@NotNull XMLStreamWriterFactory f) {
- if(f==null) throw new IllegalArgumentException();
- writerFactory.set(f);
- }
-
- /**
- * Short-cut for {@link #create(OutputStream, String)} with UTF-8.
- */
- public static XMLStreamWriter create(OutputStream out) {
- return get().doCreate(out);
- }
-
- public static XMLStreamWriter create(OutputStream out, String encoding) {
- return get().doCreate(out, encoding);
- }
-
- /**
- * @deprecated
- * Use {@link #create(OutputStream)}
- */
- public static XMLStreamWriter createXMLStreamWriter(OutputStream out) {
- return create(out);
- }
-
- /**
- * @deprecated
- * Use {@link #create(OutputStream, String)}
- */
- public static XMLStreamWriter createXMLStreamWriter(OutputStream out, String encoding) {
- return create(out, encoding);
- }
-
- /**
- * @deprecated
- * Use {@link #create(OutputStream, String)}. The boolean flag was unused anyway.
- */
- public static XMLStreamWriter createXMLStreamWriter(OutputStream out, String encoding, boolean declare) {
- return create(out,encoding);
- }
-
- /**
- * Default {@link XMLStreamWriterFactory} implementation
- * that can work with any {@link XMLOutputFactory}.
- *
- * <p>
- * {@link XMLOutputFactory} is not required to be thread-safe, so the
- * create method on this implementation is synchronized.
- */
- public static final class Default extends XMLStreamWriterFactory {
- private final XMLOutputFactory xof;
-
- public Default(XMLOutputFactory xof) {
- this.xof = xof;
- }
-
- @Override
- public XMLStreamWriter doCreate(OutputStream out) {
- return doCreate(out,"UTF-8");
- }
-
- @Override
- public synchronized XMLStreamWriter doCreate(OutputStream out, String encoding) {
- try {
- XMLStreamWriter writer = xof.createXMLStreamWriter(out,encoding);
- return new HasEncodingWriter(writer, encoding);
- } catch (XMLStreamException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- }
- }
-
- @Override
- public void doRecycle(XMLStreamWriter r) {
- // no recycling
- }
- }
-
- /**
- * {@link XMLStreamWriterFactory} implementation for Sun's StaX implementation.
- *
- * <p>
- * This implementation supports instance reuse.
- */
- public static final class Zephyr extends XMLStreamWriterFactory {
- private final XMLOutputFactory xof;
- private final ThreadLocal<XMLStreamWriter> pool = new ThreadLocal<XMLStreamWriter>();
- private final Method resetMethod;
- private final Method setOutputMethod;
- private final Class zephyrClass;
-
- public static XMLStreamWriterFactory newInstance(XMLOutputFactory xof) {
- try {
- Class<?> clazz = xof.createXMLStreamWriter(new StringWriter()).getClass();
-
- if(!clazz.getName().startsWith("com.sun.xml.internal.stream."))
- return null; // nope
-
- return new Zephyr(xof,clazz);
- } catch (XMLStreamException e) {
- return null; // impossible
- } catch (NoSuchMethodException e) {
- return null; // this xof wasn't Zephyr
- }
- }
-
- private Zephyr(XMLOutputFactory xof, Class clazz) throws NoSuchMethodException {
- this.xof = xof;
-
- zephyrClass = clazz;
- setOutputMethod = clazz.getMethod("setOutput", StreamResult.class, String.class);
- resetMethod = clazz.getMethod("reset");
- }
-
- /**
- * Fetchs an instance from the pool if available, otherwise null.
- */
- private @Nullable XMLStreamWriter fetch() {
- XMLStreamWriter sr = pool.get();
- if(sr==null) return null;
- pool.set(null);
- return sr;
- }
-
- @Override
- public XMLStreamWriter doCreate(OutputStream out) {
- return doCreate(out,"UTF-8");
- }
-
- @Override
- public XMLStreamWriter doCreate(OutputStream out, String encoding) {
- XMLStreamWriter xsw = fetch();
- if(xsw!=null) {
- // try to reuse
- try {
- resetMethod.invoke(xsw);
- setOutputMethod.invoke(xsw,new StreamResult(out),encoding);
- } catch (IllegalAccessException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- } catch (InvocationTargetException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- }
- } else {
- // create a new instance
- try {
- xsw = xof.createXMLStreamWriter(out,encoding);
- } catch (XMLStreamException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- }
- }
- return new HasEncodingWriter(xsw, encoding);
- }
-
- @Override
- public void doRecycle(XMLStreamWriter r) {
- if (r instanceof HasEncodingWriter) {
- r = ((HasEncodingWriter)r).getWriter();
- }
- if(zephyrClass.isInstance(r)) {
- // this flushes the underlying stream, so it might cause chunking issue
- try {
- r.close();
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- pool.set(r);
- }
- if(r instanceof RecycleAware)
- ((RecycleAware)r).onRecycled();
- }
- }
-
- /**
- *
- * For {@link javax.xml.stream.XMLOutputFactory} is thread safe.
- */
- public static final class NoLock extends XMLStreamWriterFactory {
- private final XMLOutputFactory xof;
-
- public NoLock(XMLOutputFactory xof) {
- this.xof = xof;
- }
-
- @Override
- public XMLStreamWriter doCreate(OutputStream out) {
- return doCreate(out, SOAPBindingCodec.UTF8_ENCODING);
- }
-
- @Override
- public XMLStreamWriter doCreate(OutputStream out, String encoding) {
- try {
- XMLStreamWriter writer = xof.createXMLStreamWriter(out,encoding);
- return new HasEncodingWriter(writer, encoding);
- } catch (XMLStreamException e) {
- throw new XMLReaderException("stax.cantCreate",e);
- }
- }
-
- @Override
- public void doRecycle(XMLStreamWriter r) {
- // no recycling
- }
-
- }
-
- private static class HasEncodingWriter extends XMLStreamWriterFilter implements HasEncoding {
- private final String encoding;
-
- HasEncodingWriter(XMLStreamWriter writer, String encoding) {
- super(writer);
- this.encoding = encoding;
- }
-
- @Override
- public String getEncoding() {
- return encoding;
- }
-
- XMLStreamWriter getWriter() {
- return writer;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetaDataResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetaDataResolver.java
deleted file mode 100644
index 309fcf9e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetaDataResolver.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.parser;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-import java.net.URI;
-
-/**
- * Resolves metadata such as WSDL/schema. This serves as extensibile plugin point which a wsdl parser can use to
- * get the metadata from an endpoint.
- *
- * @author Vivek Pandey
- */
-public abstract class MetaDataResolver {
- /**
- * Gives {@link com.sun.xml.internal.ws.api.wsdl.parser.ServiceDescriptor} resolved from the given location.
- *
- * TODO: Does this method need to propogate errors?
- *
- * @param location metadata location
- * @return {@link com.sun.xml.internal.ws.api.wsdl.parser.ServiceDescriptor} resolved from the location. It may be null in the cases when MetadataResolver
- * can get the metada associated with the metadata loction.
- */
- public abstract @Nullable ServiceDescriptor resolve(@NotNull URI location);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetadataResolverFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetadataResolverFactory.java
deleted file mode 100644
index 72d1137e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetadataResolverFactory.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.parser;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import org.xml.sax.EntityResolver;
-
-/**
- * Extension point for resolving metadata using wsimport.
- * <p/>
- * wsimport would get a {@link MetaDataResolver} using this factory and from it will resolve all the wsdl/schema
- * metadata.
- *
- * Implementor of this class must provide a zero argument constructor so that
- * it can be loaded during service lookup mechanism.
- *
- * @author Vivek Pandey
- * @see com.sun.xml.internal.ws.api.wsdl.parser.MetaDataResolver#resolve(java.net.URI)
- */
-public abstract class MetadataResolverFactory {
- /**
- * Gets a {@link com.sun.xml.internal.ws.api.wsdl.parser.MetaDataResolver}
- *
- * @param resolver
- */
- public abstract
- @NotNull
- MetaDataResolver metadataResolver(@Nullable EntityResolver resolver);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/PolicyWSDLParserExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/PolicyWSDLParserExtension.java
deleted file mode 100644
index d53d53b2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/PolicyWSDLParserExtension.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.parser;
-
-/**
- * Marker interface for WSDLParserExtension implementations that can replace the default implementation
- *
- * @since 2.2.6
- */
-public interface PolicyWSDLParserExtension {
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/ServiceDescriptor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/ServiceDescriptor.java
deleted file mode 100644
index b96c21ad..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/ServiceDescriptor.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.parser;
-
-import com.sun.istack.internal.NotNull;
-
-import javax.xml.transform.Source;
-import java.util.List;
-
-/**
- * Abstraction over WSDL and Schema metadata
- *
- * @author Vivek Pandey
- */
-public abstract class ServiceDescriptor {
- /**
- * Gives list of wsdls
- * @return List of WSDL documents as {@link Source}.
- * {@link javax.xml.transform.Source#getSystemId()} must be Non-null
- */
- public abstract @NotNull List<? extends Source> getWSDLs();
-
- /**
- * Gives list of schemas.
- * @return List of XML schema documents as {@link Source}. {@link javax.xml.transform.Source#getSystemId()} must be Non-null.
- *
- */
- public abstract @NotNull List<? extends Source> getSchemas();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java
deleted file mode 100644
index 27375730..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.wsdl.parser;
-
-import com.sun.xml.internal.ws.api.WSService;
-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;
-
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.WebServiceException;
-
-/**
- * Extends the WSDL parsing process.
- *
- * <p>
- * This interface is implemented by components that build on top of the JAX-WS RI,
- * to participate in the WSDL parsing process that happens in the runtime.
- * This allows such components to retrieve information from WSDL extension elements,
- * and use that later to, for example, configure {@link Tube}s.
- *
- *
- *
- * <h2>How it works?</h2>
- * <p>
- * Each method on this interface denotes one extension point in WSDL
- * (the place where foreign elements/attributes can be added.) A {@link RuntimeWSDLParser}
- * starts parsing WSDL with a fixed set of {@link WSDLParserExtension}s, and
- * as it finds extension elements/attributes, it calls appropriate callback methods
- * to provide a chance for {@link WSDLParserExtension} to parse such
- * an extension element.
- *
- * <p>
- * There are two kinds of callbacks.
- *
- * <h3>Attribute callbacks</h3>
- * <p>
- * One is for attributes, which ends with the name {@code Attributes}.
- * This callback is invoked with {@link XMLStreamReader} that points
- * to the start tag of the WSDL element.
- *
- * <p>
- * The callback method can read interesting attributes on it.
- * The method must return without advancing the parser to the next token.
- *
- * <h3>Element callbacks</h3>
- * <p>
- * The other callback is for extension elements, which ends with the name
- * {@code Elements}.
- * When a callback is invoked, {@link XMLStreamReader} points to the
- * start tag of the extension element. The callback method can do
- * one of the following:
- *
- * <ol>
- * <li>Return {@code false} without moving {@link XMLStreamReader},
- * to indicate that the extension element isn't recognized.
- * This allows the next {@link WSDLParserExtension} to see this
- * extension element.
- * <li>Parse the whole subtree rooted at the element,
- * move the cursor to the {@link XMLStreamConstants#END_ELEMENT} state,
- * and return {@code true}, indicating that the extension
- * element is consumed.
- * No other {@link WSDLParserExtension}s are notified of this extension.
- * </ol>
- *
- * <h3>Parsing in callback</h3>
- * <p>
- * For each callback, the corresponding WSDL model object is passed in,
- * so that {@link WSDLParserExtension} can relate what it's parsing
- * to the {@link WSDLModel}. Most likely, extensions can parse
- * their data into an {@link WSDLExtension}-derived classes, then
- * use {@link WSDLExtensible} interface to hook them into {@link WSDLModel}.
- *
- * <p>
- * Note that since the {@link WSDLModel} itself
- * is being built, {@link WSDLParserExtension} may not invoke any of
- * the query methods on the WSDL model. Those references are passed just so that
- * {@link WSDLParserExtension} can hold on to those references, or put
- * {@link WSDLExtensible} objects into the model, not to query it.
- *
- * <p>
- * If {@link WSDLParserExtension} needs to query {@link WSDLModel},
- * defer that processing until {@link #finished(WSDLParserExtensionContext)}, when it's
- * safe to use {@link WSDLModel} can be used safely.
- *
- * <p>
- * Also note that {@link WSDLParserExtension}s are called in no particular order.
- * This interface is not designed for having multiple {@link WSDLParserExtension}s
- * parse the same extension element.
- *
- *
- * <h2>Error Handling</h2>
- * <p>
- * For usability, {@link WSDLParserExtension}s are expected to check possible
- * errors in the extension elements that it parses. When an error is found,
- * it may throw a {@link WebServiceException} to abort the parsing of the WSDL.
- * This exception will be propagated to the user, so it should have
- * detailed error messages pointing at the problem.
- *
- * <h2>Discovery</h2>
- * <p>
- * The JAX-WS RI locates the implementation of {@link WSDLParserExtension}s
- * by using the standard service look up mechanism, in particular looking for
- * <tt>META-INF/services/com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension</tt>
- *
- *
- * <h2>TODO</h2>
- * <p>
- * As it's designed today, extensions cannot access to any of the environmental
- * information before the parsing begins (such as what {@link WSService} this
- * WSDL is being parsed for, etc.) We might need to reconsider this aspect.
- * The JAX-WS team waits for feedback on this topic.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class WSDLParserExtension {
-
- public void start(WSDLParserExtensionContext context){
- // noop
- }
-
- public void serviceAttributes(EditableWSDLService service, XMLStreamReader reader) {
- // noop
- }
-
- public boolean serviceElements(EditableWSDLService service, XMLStreamReader reader) {
- return false;
- }
-
- public void portAttributes(EditableWSDLPort port, XMLStreamReader reader) {
- // noop
- }
-
- public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
- return false;
- }
-
- public boolean portTypeOperationInput(EditableWSDLOperation op, XMLStreamReader reader) {
- return false;
- }
-
- public boolean portTypeOperationOutput(EditableWSDLOperation op, XMLStreamReader reader) {
- return false;
- }
-
- public boolean portTypeOperationFault(EditableWSDLOperation op, XMLStreamReader reader) {
- return false;
- }
-
- public boolean definitionsElements(XMLStreamReader reader) {
- return false;
- }
-
- public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
- return false;
- }
-
- public void bindingAttributes(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
- }
-
- public boolean portTypeElements(EditableWSDLPortType portType, XMLStreamReader reader) {
- return false;
- }
-
- public void portTypeAttributes(EditableWSDLPortType portType, XMLStreamReader reader) {
- }
-
- public boolean portTypeOperationElements(EditableWSDLOperation operation, XMLStreamReader reader) {
- return false;
- }
-
- public void portTypeOperationAttributes(EditableWSDLOperation operation, XMLStreamReader reader) {
- }
-
- public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- return false;
- }
-
- public void bindingOperationAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- }
-
- public boolean messageElements(EditableWSDLMessage msg, XMLStreamReader reader) {
- return false;
- }
-
- public void messageAttributes(EditableWSDLMessage msg, XMLStreamReader reader) {
- }
-
- public boolean portTypeOperationInputElements(EditableWSDLInput input, XMLStreamReader reader) {
- return false;
- }
-
- public void portTypeOperationInputAttributes(EditableWSDLInput input, XMLStreamReader reader) {
- }
-
- public boolean portTypeOperationOutputElements(EditableWSDLOutput output, XMLStreamReader reader) {
- return false;
- }
-
- public void portTypeOperationOutputAttributes(EditableWSDLOutput output, XMLStreamReader reader) {
- }
-
- public boolean portTypeOperationFaultElements(EditableWSDLFault fault, XMLStreamReader reader) {
- return false;
- }
-
- public void portTypeOperationFaultAttributes(EditableWSDLFault fault, XMLStreamReader reader) {
- }
-
- public boolean bindingOperationInputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- return false;
- }
-
- public void bindingOperationInputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- }
-
- public boolean bindingOperationOutputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- return false;
- }
-
- public void bindingOperationOutputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- }
-
- public boolean bindingOperationFaultElements(EditableWSDLBoundFault fault, XMLStreamReader reader) {
- return false;
- }
-
- public void bindingOperationFaultAttributes(EditableWSDLBoundFault fault, XMLStreamReader reader) {
- }
-
- // TODO: complete the rest of the callback
-
- /**
- * Called when the parsing of a set of WSDL documents are all done.
- * <p>
- * This is the opportunity to do any post-processing of the parsing
- * you've done.
- *
- * @param context {@link WSDLParserExtensionContext} gives fully parsed {@link WSDLModel}.
- */
- public void finished(WSDLParserExtensionContext context) {
- // noop
- }
-
- public void postFinished(WSDLParserExtensionContext context) {
- // noop
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtensionContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtensionContext.java
deleted file mode 100644
index ebad3d5e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtensionContext.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.wsdl.parser;
-
-import com.sun.istack.internal.NotNull;
-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;
-
-/**
- * Provides contextual information for {@link WSDLParserExtension}s.
- *
- * @author Vivek Pandey
- * @author Fabian Ritzmann
- */
-public interface WSDLParserExtensionContext {
- /**
- * Returns true if the WSDL parsing is happening on the client side. Returns false means
- * its started on the server side.
- */
- boolean isClientSide();
-
- /**
- * Gives the {@link EditableWSDLModel}. The WSDLModel may not be complete until
- * {@link WSDLParserExtension#finished(WSDLParserExtensionContext)} is called.
- */
- EditableWSDLModel getWSDLModel();
-
- /**
- * Provides the {@link Container} in which this service or client is running.
- * May return null.
- *
- * @return The container in which this service or client is running.
- */
- @NotNull Container getContainer();
-
-
- /**
- * Provides the PolicyResolver
- */
- @NotNull
- PolicyResolver getPolicyResolver();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/XMLEntityResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/XMLEntityResolver.java
deleted file mode 100644
index 075bb595..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/XMLEntityResolver.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.parser;
-
-import com.sun.xml.internal.ws.api.server.SDDocumentSource;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.SAXException;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import java.io.IOException;
-import java.net.URL;
-
-/**
- * Resolves a reference to {@link XMLStreamReader}.
- *
- * This is kinda like {@link EntityResolver} but works
- * at the XML infoset level.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface XMLEntityResolver {
- /**
- * See {@link EntityResolver#resolveEntity(String, String)} for the contract.
- */
- Parser resolveEntity(String publicId,String systemId)
- throws SAXException, IOException, XMLStreamException;
-
- public static final class Parser {
- /**
- * System ID of the document being parsed.
- */
- public final URL systemId;
- /**
- * The parser instance parsing the infoset.
- */
- public final XMLStreamReader parser;
-
- public Parser(URL systemId, XMLStreamReader parser) {
- assert parser!=null;
- this.systemId = systemId;
- this.parser = parser;
- }
-
- /**
- * Creates a {@link Parser} that reads from {@link SDDocumentSource}.
- */
- public Parser(SDDocumentSource doc) throws IOException, XMLStreamException {
- this.systemId = doc.getSystemId();
- this.parser = doc.read();
- }
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/package-info.java
deleted file mode 100644
index e3ca201b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/package-info.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * Extension point for WSDL parsing.
- */
-package com.sun.xml.internal.ws.api.wsdl.parser;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGenExtnContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGenExtnContext.java
deleted file mode 100644
index ec14b040..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGenExtnContext.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-/**
- * WSDLGeneatorContext provides a context for the WSDLGeneratorExtension and is used in
- * {@link WSDLGeneratorExtension#start(WSDLGenExtnContext)}. This context consists of TXW, {@link SEIModel},
- * {@link WSBinding}, {@link Container}, and implementation class. WSDL extensions are used to
- * extend the generated WSDL by adding implementation specific extensions.
- *
- * @author Jitendra Kotamraju
- */
-public class WSDLGenExtnContext {
- private final TypedXmlWriter root;
- private final SEIModel model;
- private final WSBinding binding;
- private final Container container;
- private final Class endpointClass;
-
- /**
- * Constructs WSDL Generation context for the extensions
- *
- * @param root This is the root element of the generated WSDL.
- * @param model WSDL is being generated from this {@link SEIModel}.
- * @param binding The binding for which we generate WSDL. the binding {@link WSBinding} represents a particular
- * configuration of JAXWS. This can be typically be overriden by
- * @param container The entry point to the external environment.
- * If this extension is used at the runtime to generate WSDL, you get a {@link Container}
- * that was given to {@link com.sun.xml.internal.ws.api.server.WSEndpoint#create}.
- */
- public WSDLGenExtnContext(@NotNull TypedXmlWriter root, @NotNull SEIModel model, @NotNull WSBinding binding,
- @Nullable Container container, @NotNull Class endpointClass) {
- this.root = root;
- this.model = model;
- this.binding = binding;
- this.container = container;
- this.endpointClass = endpointClass;
- }
-
- public TypedXmlWriter getRoot() {
- return root;
- }
-
- public SEIModel getModel() {
- return model;
- }
-
- public WSBinding getBinding() {
- return binding;
- }
-
- public Container getContainer() {
- return container;
- }
-
- public Class getEndpointClass() {
- return endpointClass;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGeneratorExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGeneratorExtension.java
deleted file mode 100644
index 3d1a560c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGeneratorExtension.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.api.wsdl.writer;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.model.CheckedException;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-
-/**
- * This is a callback interface used to extend the WSDLGenerator. Implementors
- * of this interface can add their own WSDL extensions to the generated WSDL.
- * There are a number of methods that will be invoked allowing the extensions
- * to be generated on various WSDL elements.
- * <p/>
- * The JAX-WS WSDLGenerator uses TXW to serialize the WSDL out to XML.
- * More information about TXW can be located at
- * <a href="http://txw.java.net">http://txw.java.net</a>.
- */
-public abstract class WSDLGeneratorExtension {
- /**
- * Called at the very beginning of the process.
- * <p/>
- * This method is invoked so that the root element can be manipulated before
- * any tags have been written. This allows to set e.g. namespace prefixes.
- * <p/>
- * Another purpose of this method is to let extensions know what model
- * we are generating a WSDL for.
- *
- * @param root This is the root element of the generated WSDL.
- * @param model WSDL is being generated from this {@link SEIModel}.
- * @param binding The binding for which we generate WSDL. the binding {@link WSBinding} represents a particular
- * configuration of JAXWS. This can be typically be overriden by
- * @param container The entry point to the external environment.
- * If this extension is used at the runtime to generate WSDL, you get a {@link Container}
- * that was given to {@link WSEndpoint#create}.
- * TODO: think about tool side
- * @deprecated
- */
- public void start(@NotNull TypedXmlWriter root, @NotNull SEIModel model, @NotNull WSBinding binding, @NotNull Container container) {
- }
-
- /**
- * Called before writing </wsdl:defintions>.
- *
- * @param ctxt
- */
- public void end(@NotNull WSDLGenExtnContext ctxt) {
- }
-
- /**
- * Called at the very beginning of the process.
- * <p/>
- * This method is invoked so that the root element can be manipulated before
- * any tags have been written. This allows to set e.g. namespace prefixes.
- * <p/>
- * Another purpose of this method is to let extensions know what model
- * we are generating a WSDL for.
- *
- * @param ctxt Provides the context for the generator extensions
- */
- public void start(WSDLGenExtnContext ctxt) {
- }
-
- /**
- * This method is invoked so that extensions to a <code>wsdl:definitions</code>
- * element can be generated.
- *
- * @param definitions This is the <code>wsdl:defintions</code> element that the extension can be added to.
- */
- public void addDefinitionsExtension(TypedXmlWriter definitions) {
- }
-
- /**
- * This method is invoked so that extensions to a <code>wsdl:service</code>
- * element can be generated.
- *
- * @param service This is the <code>wsdl:service</code> element that the extension can be added to.
- */
- public void addServiceExtension(TypedXmlWriter service) {
- }
-
- /**
- * This method is invoked so that extensions to a <code>wsdl:port</code>
- * element can be generated.
- *
- * @param port This is the wsdl:port element that the extension can be added to.
- */
- public void addPortExtension(TypedXmlWriter port) {
- }
-
- /**
- * This method is invoked so that extensions to a <code>wsdl:portType</code>
- * element can be generated.
- * <p/>
- *
- * @param portType This is the wsdl:portType element that the extension can be added to.
- */
- public void addPortTypeExtension(TypedXmlWriter portType) {
- }
-
- /**
- * This method is invoked so that extensions to a <code>wsdl:binding</code>
- * element can be generated.
- * <p/>
- * <p/>
- * TODO: Some other information may need to be passed
- *
- * @param binding This is the wsdl:binding element that the extension can be added to.
- */
- public void addBindingExtension(TypedXmlWriter binding) {
- }
-
- /**
- * This method is invoked so that extensions to a <code>wsdl:portType/wsdl:operation</code>
- * element can be generated.
- *
- * @param operation This is the wsdl:portType/wsdl:operation element that the
- * extension can be added to.
- * @param method {@link JavaMethod} which captures all the information to generate wsdl:portType/wsdl:operation
- */
- public void addOperationExtension(TypedXmlWriter operation, JavaMethod method) {
- }
-
-
- /**
- * This method is invoked so that extensions to a <code>wsdl:binding/wsdl:operation</code>
- * element can be generated.
- *
- * @param operation This is the wsdl:binding/wsdl:operation element that the
- * extension can be added to.
- * @param method {@link JavaMethod} which captures all the information to generate wsdl:portType/wsdl:operation
- */
- public void addBindingOperationExtension(TypedXmlWriter operation, JavaMethod method) {
- }
-
- /**
- * This method is invoked so that extensions to an input <code>wsdl:message</code>
- * element can be generated.
- *
- * @param message This is the input wsdl:message element that the
- * extension can be added to.
- * @param method {@link JavaMethod} which captures all the information to generate wsdl:portType/wsdl:operation
- */
- public void addInputMessageExtension(TypedXmlWriter message, JavaMethod method) {
- }
-
- /**
- * This method is invoked so that extensions to an output <code>wsdl:message</code>
- * element can be generated.
- *
- * @param message This is the output wsdl:message element that the
- * extension can be added to.
- * @param method {@link JavaMethod} which captures all the information to generate wsdl:portType/wsdl:operation
- */
- public void addOutputMessageExtension(TypedXmlWriter message, JavaMethod method) {
- }
-
-
- /**
- * This method is invoked so that extensions to a
- * <code>wsdl:portType/wsdl:operation/wsdl:input</code>
- * element can be generated.
- *
- * @param input This is the wsdl:portType/wsdl:operation/wsdl:input element that the
- * extension can be added to.
- * @param method {@link JavaMethod} which captures all the information to generate wsdl:portType/wsdl:operation
- */
- public void addOperationInputExtension(TypedXmlWriter input, JavaMethod method) {
- }
-
-
- /**
- * This method is invoked so that extensions to a <code>wsdl:portType/wsdl:operation/wsdl:output</code>
- * element can be generated.
- *
- * @param output This is the wsdl:portType/wsdl:operation/wsdl:output element that the
- * extension can be added to.
- * @param method {@link JavaMethod} which captures all the information to generate wsdl:portType/wsdl:operation
- */
- public void addOperationOutputExtension(TypedXmlWriter output, JavaMethod method) {
- }
-
- /**
- * This method is invoked so that extensions to a
- * <code>wsdl:binding/wsdl:operation/wsdl:input</code>
- * element can be generated.
- *
- * @param input This is the wsdl:binding/wsdl:operation/wsdl:input element that the
- * extension can be added to.
- * @param method {@link JavaMethod} which captures all the information to generate wsdl:portType/wsdl:operation
- */
- public void addBindingOperationInputExtension(TypedXmlWriter input, JavaMethod method) {
- }
-
-
- /**
- * This method is invoked so that extensions to a <code>wsdl:binding/wsdl:operation/wsdl:output</code>
- * element can be generated.
- *
- * @param output This is the wsdl:binding/wsdl:operation/wsdl:output element that the
- * extension can be added to.
- * @param method {@link JavaMethod} which captures all the information to generate wsdl:portType/wsdl:operation
- */
- public void addBindingOperationOutputExtension(TypedXmlWriter output, JavaMethod method) {
- }
-
- /**
- * This method is invoked so that extensions to a <code>wsdl:binding/wsdl:operation/wsdl:fault</code>
- * element can be generated.
- *
- * @param fault This is the wsdl:binding/wsdl:operation/wsdl:fault or wsdl:portType/wsdl:output/wsdl:operation/wsdl:fault
- * element that the extension can be added to.
- * @param method {@link JavaMethod} which captures all the information to generate wsdl:portType/wsdl:operation
- */
- public void addBindingOperationFaultExtension(TypedXmlWriter fault, JavaMethod method, CheckedException ce) {
- }
-
- /**
- * This method is invoked so that extensions to a <code>wsdl:portType/wsdl:operation/wsdl:fault</code>
- * element can be generated.
- *
- * @param message This is the fault wsdl:message element that the
- * extension can be added to.
- * @param method {@link JavaMethod} which captures all the information to generate wsdl:portType/wsdl:operation
- *
- * @param ce {@link CheckedException} that abstracts wsdl:fault
- */
- public void addFaultMessageExtension(TypedXmlWriter message, JavaMethod method, CheckedException ce) {
- }
-
- /**
- * This method is invoked so that extensions to a <code>wsdl:portType/wsdl:operation/wsdl:fault</code>
- * element can be generated.
- *
- * @param fault This is the wsdl:portType/wsdl:operation/wsdl:fault element that the
- * extension can be added to.
- * @param method {@link JavaMethod} which captures all the information to generate wsdl:portType/wsdl:operation
- * @param ce {@link CheckedException} that abstracts wsdl:fault
- */
- public void addOperationFaultExtension(TypedXmlWriter fault, JavaMethod method, CheckedException ce) {
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultClientTubelineAssemblyContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultClientTubelineAssemblyContext.java
deleted file mode 100644
index 9439a744..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultClientTubelineAssemblyContext.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package com.sun.xml.internal.ws.assembler;
-
-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.WSBinding;
-import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-
-/**
- * The context is a wrapper around the existing JAX-WS {@link ClientTubeAssemblerContext} with additional features
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-class DefaultClientTubelineAssemblyContext extends TubelineAssemblyContextImpl implements ClientTubelineAssemblyContext {
-
- private final @NotNull ClientTubeAssemblerContext wrappedContext;
- private final PolicyMap policyMap;
- private final WSPortInfo portInfo; // TODO: is this really needed?
- private final WSDLPort wsdlPort;
- // TODO: replace the PipeConfiguration
-
- public DefaultClientTubelineAssemblyContext(@NotNull ClientTubeAssemblerContext context) {
- this.wrappedContext = context;
- this.wsdlPort = context.getWsdlModel();
- this.portInfo = context.getPortInfo();
- this.policyMap = context.getPortInfo().getPolicyMap();
- }
-
- public PolicyMap getPolicyMap() {
- return policyMap;
- }
-
- public boolean isPolicyAvailable() {
- return policyMap != null && !policyMap.isEmpty();
- }
-
- /**
- * The created pipeline will be used to serve this port.
- * Null if the service isn't associated with any port definition in WSDL,
- * and otherwise non-null.
- *
- * Replaces {@link com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext#getWsdlModel()}
- */
- public WSDLPort getWsdlPort() {
- return wsdlPort;
- }
-
- public WSPortInfo getPortInfo() {
- return portInfo;
- }
-
- /**
- * The endpoint address. Always non-null. This parameter is taken separately
- * from {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLPort} (even though there's {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLPort#getAddress()})
- * because sometimes WSDL is not available.
- */
- public @NotNull EndpointAddress getAddress() {
- return wrappedContext.getAddress();
- }
-
- /**
- * The pipeline is created for this {@link com.sun.xml.internal.ws.api.WSService}.
- * Always non-null. (To be precise, the newly created pipeline
- * is owned by a proxy or a dispatch created from this {@link com.sun.xml.internal.ws.api.WSService}.)
- */
- public @NotNull WSService getService() {
- return wrappedContext.getService();
- }
-
- /**
- * The binding of the new pipeline to be created.
- */
- public @NotNull WSBinding getBinding() {
- return wrappedContext.getBinding();
- }
-
- /**
- * The created pipeline will use seiModel to get java concepts for the endpoint
- *
- * @return Null if the service doesn't have SEI model e.g. Dispatch,
- * and otherwise non-null.
- */
- public @Nullable SEIModel getSEIModel() {
- return wrappedContext.getSEIModel();
- }
-
- /**
- * Returns the Container in which the client is running
- *
- * @return Container in which client is running
- */
- public Container getContainer() {
- return wrappedContext.getContainer();
- }
-
- /**
- * Gets the {@link Codec} that is set by {@link #setCodec} or the default codec
- * based on the binding.
- *
- * @return codec to be used for web service requests
- */
- public @NotNull Codec getCodec() {
- return wrappedContext.getCodec();
- }
-
- /**
- * Interception point to change {@link Codec} during {@link com.sun.xml.internal.ws.api.pipe.Tube}line assembly. The
- * new codec will be used by jax-ws client runtime for encoding/decoding web service
- * request/response messages. The new codec should be used by the transport tubes.
- *
- * <p>
- * the codec should correctly implement {@link Codec#copy} since it is used while
- * serving requests concurrently.
- *
- * @param codec codec to be used for web service requests
- */
- public void setCodec(@NotNull Codec codec) {
- wrappedContext.setCodec(codec);
- }
-
- public ClientTubeAssemblerContext getWrappedContext() {
- return wrappedContext;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultServerTubelineAssemblyContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultServerTubelineAssemblyContext.java
deleted file mode 100644
index 600037e6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultServerTubelineAssemblyContext.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package com.sun.xml.internal.ws.assembler;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.ServerTubeAssemblerContext;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-
-/**
- * The context is a wrapper around the existing JAX-WS {@link ServerTubeAssemblerContext} with additional features
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-class DefaultServerTubelineAssemblyContext extends TubelineAssemblyContextImpl implements ServerTubelineAssemblyContext {
-
- private final @NotNull ServerTubeAssemblerContext wrappedContext;
- private final PolicyMap policyMap;
- // TODO: add next tube getter/package-private setter
- // TODO: replace the PipeConfiguration
-
- public DefaultServerTubelineAssemblyContext(@NotNull ServerTubeAssemblerContext context) {
- this.wrappedContext = context;
- this.policyMap = context.getEndpoint().getPolicyMap();
- }
-
- public PolicyMap getPolicyMap() {
- return policyMap;
- }
-
- public boolean isPolicyAvailable() {
- return policyMap != null && !policyMap.isEmpty();
- }
-
- /**
- * The created pipeline will use seiModel to get java concepts for the endpoint
- *
- * @return Null if the service doesn't have SEI model e.g. Provider endpoints,
- * and otherwise non-null.
- */
- public @Nullable SEIModel getSEIModel() {
- return wrappedContext.getSEIModel();
- }
-
- /**
- * The created pipeline will be used to serve this port.
- *
- * @return Null if the service isn't associated with any port definition in WSDL,
- * and otherwise non-null.
- */
- public @Nullable WSDLPort getWsdlPort() {
- return wrappedContext.getWsdlModel();
- }
-
- /**
- *
- * The created pipeline is used to serve this {@link com.sun.xml.internal.ws.api.server.WSEndpoint}.
- * Specifically, its {@link com.sun.xml.internal.ws.api.WSBinding} should be of interest to many
- * {@link com.sun.xml.internal.ws.api.pipe.Pipe}s.
- * @return Always non-null.
- */
- public @NotNull WSEndpoint getEndpoint() {
- return wrappedContext.getEndpoint();
- }
-
- /**
- * The last {@link com.sun.xml.internal.ws.api.pipe.Pipe} in the pipeline. The assembler is expected to put
- * additional {@link com.sun.xml.internal.ws.api.pipe.Pipe}s in front of it.
- *
- * <p>
- * (Just to give you the idea how this is used, normally the terminal pipe
- * is the one that invokes the user application or {@link javax.xml.ws.Provider}.)
- *
- * @return always non-null terminal pipe
- */
- public @NotNull Tube getTerminalTube() {
- return wrappedContext.getTerminalTube();
- }
-
- /**
- * If this server pipeline is known to be used for serving synchronous transport,
- * then this method returns true. This can be potentially use as an optimization
- * hint, since often synchronous versions are cheaper to execute than asycnhronous
- * versions.
- */
- public boolean isSynchronous() {
- return wrappedContext.isSynchronous();
- }
-
- /**
- * Gets the {@link Codec} that is set by {@link #setCodec} or the default codec
- * based on the binding. The codec is a full codec that is responsible for
- * encoding/decoding entire protocol message(for e.g: it is responsible to
- * encode/decode entire MIME messages in SOAP binding)
- *
- * @return codec to be used for web service requests
- * @see {@link com.sun.xml.internal.ws.api.pipe.Codecs}
- */
- public @NotNull Codec getCodec() {
- return wrappedContext.getCodec();
- }
-
- /**
- * Interception point to change {@link Codec} during {@link Tube}line assembly. The
- * new codec will be used by jax-ws server runtime for encoding/decoding web service
- * request/response messages. {@link WSEndpoint#createCodec()} will return a copy
- * of this new codec and will be used in the server runtime.
- *
- * <p>
- * The codec is a full codec that is responsible for
- * encoding/decoding entire protocol message(for e.g: it is responsible to
- * encode/decode entire MIME messages in SOAP binding)
- *
- * <p>
- * the codec should correctly implement {@link Codec#copy} since it is used while
- * serving requests concurrently.
- *
- * @param codec codec to be used for web service requests
- * @see {@link com.sun.xml.internal.ws.api.pipe.Codecs}
- */
- public void setCodec(@NotNull Codec codec) {
- wrappedContext.setCodec(codec);
- }
-
- public ServerTubeAssemblerContext getWrappedContext() {
- return wrappedContext;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigLoader.java
deleted file mode 100644
index 1e33628b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigLoader.java
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.assembler;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.logging.Logger;
-import com.sun.xml.internal.ws.api.ResourceLoader;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.resources.TubelineassemblyMessages;
-import com.sun.xml.internal.ws.runtime.config.MetroConfig;
-import com.sun.xml.internal.ws.runtime.config.TubeFactoryList;
-import com.sun.xml.internal.ws.runtime.config.TubelineDefinition;
-import com.sun.xml.internal.ws.runtime.config.TubelineMapping;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.ws.WebServiceException;
-import java.lang.reflect.Method;
-import java.lang.reflect.ReflectPermission;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.security.*;
-import java.util.PropertyPermission;
-import java.util.logging.Level;
-
-/**
- * This class is responsible for locating and loading Metro configuration files
- * (both application jaxws-tubes.xml and default jaxws-tubes-default.xml).
- * <p/>
- * Once the configuration is loaded the class is able to resolve which tubeline
- * configuration belongs to each endpoint or endpoint client. This information is
- * then used in {@link TubelineAssemblyController} to construct the list of
- * {@link TubeCreator} objects that are used in the actual tubeline construction.
- *
- * @author Marek Potociar <marek.potociar at sun.com>
- */
-// TODO Move the logic of this class directly into MetroConfig class.
-class MetroConfigLoader {
-
- private static final Logger LOGGER = Logger.getLogger(MetroConfigLoader.class);
-
- private MetroConfigName defaultTubesConfigNames;
-
- private static interface TubeFactoryListResolver {
-
- TubeFactoryList getFactories(TubelineDefinition td);
- }
-
- private static final TubeFactoryListResolver ENDPOINT_SIDE_RESOLVER = new TubeFactoryListResolver() {
-
- public TubeFactoryList getFactories(TubelineDefinition td) {
- return (td != null) ? td.getEndpointSide() : null;
- }
- };
- private static final TubeFactoryListResolver CLIENT_SIDE_RESOLVER = new TubeFactoryListResolver() {
-
- public TubeFactoryList getFactories(TubelineDefinition td) {
- return (td != null) ? td.getClientSide() : null;
- }
- };
- //
- private MetroConfig defaultConfig;
- private URL defaultConfigUrl;
- private MetroConfig appConfig;
- private URL appConfigUrl;
-
- MetroConfigLoader(Container container, MetroConfigName defaultTubesConfigNames) {
- this.defaultTubesConfigNames = defaultTubesConfigNames;
- ResourceLoader spiResourceLoader = null;
- if (container != null) {
- spiResourceLoader = container.getSPI(ResourceLoader.class);
- }
- // if spi resource can't load resource, default (MetroConfigUrlLoader) is used;
- // it searches the classpath, so it would be most probably used
- // when using jaxws- or metro-defaults from jaxws libraries
- init(container, spiResourceLoader, new MetroConfigUrlLoader(container));
- }
-
- private void init(Container container, ResourceLoader... loaders) {
-
- String appFileName = null;
- String defaultFileName = null;
- if (container != null) {
- MetroConfigName mcn = container.getSPI(MetroConfigName.class);
- if (mcn != null) {
- appFileName = mcn.getAppFileName();
- defaultFileName = mcn.getDefaultFileName();
- }
- }
- if (appFileName == null) {
- appFileName = defaultTubesConfigNames.getAppFileName();
- }
-
- if (defaultFileName == null) {
- defaultFileName = defaultTubesConfigNames.getDefaultFileName();
- }
- this.defaultConfigUrl = locateResource(defaultFileName, loaders);
- if (defaultConfigUrl == null) {
- throw LOGGER.logSevereException(new IllegalStateException(TubelineassemblyMessages.MASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(defaultFileName)));
- }
-
- LOGGER.config(TubelineassemblyMessages.MASM_0002_DEFAULT_CFG_FILE_LOCATED(defaultFileName, defaultConfigUrl));
- this.defaultConfig = MetroConfigLoader.loadMetroConfig(defaultConfigUrl);
- if (defaultConfig == null) {
- throw LOGGER.logSevereException(new IllegalStateException(TubelineassemblyMessages.MASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(defaultFileName)));
- }
- if (defaultConfig.getTubelines() == null) {
- throw LOGGER.logSevereException(new IllegalStateException(TubelineassemblyMessages.MASM_0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE(defaultFileName)));
- }
- if (defaultConfig.getTubelines().getDefault() == null) {
- throw LOGGER.logSevereException(new IllegalStateException(TubelineassemblyMessages.MASM_0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE(defaultFileName)));
- }
-
- this.appConfigUrl = locateResource(appFileName, loaders);
- if (appConfigUrl != null) {
- LOGGER.config(TubelineassemblyMessages.MASM_0006_APP_CFG_FILE_LOCATED(appConfigUrl));
- this.appConfig = MetroConfigLoader.loadMetroConfig(appConfigUrl);
- } else {
- LOGGER.config(TubelineassemblyMessages.MASM_0007_APP_CFG_FILE_NOT_FOUND());
- this.appConfig = null;
- }
- }
-
- TubeFactoryList getEndpointSideTubeFactories(URI endpointReference) {
- return getTubeFactories(endpointReference, ENDPOINT_SIDE_RESOLVER);
- }
-
- TubeFactoryList getClientSideTubeFactories(URI endpointReference) {
- return getTubeFactories(endpointReference, CLIENT_SIDE_RESOLVER);
- }
-
- private TubeFactoryList getTubeFactories(URI endpointReference, TubeFactoryListResolver resolver) {
- if (appConfig != null && appConfig.getTubelines() != null) {
- for (TubelineMapping mapping : appConfig.getTubelines().getTubelineMappings()) {
- if (mapping.getEndpointRef().equals(endpointReference.toString())) {
- TubeFactoryList list = resolver.getFactories(getTubeline(appConfig, resolveReference(mapping.getTubelineRef())));
- if (list != null) {
- return list;
- } else {
- break;
- }
- }
- }
-
- if (appConfig.getTubelines().getDefault() != null) {
- TubeFactoryList list = resolver.getFactories(getTubeline(appConfig, resolveReference(appConfig.getTubelines().getDefault())));
- if (list != null) {
- return list;
- }
- }
- }
-
- for (TubelineMapping mapping : defaultConfig.getTubelines().getTubelineMappings()) {
- if (mapping.getEndpointRef().equals(endpointReference.toString())) {
- TubeFactoryList list = resolver.getFactories(getTubeline(defaultConfig, resolveReference(mapping.getTubelineRef())));
- if (list != null) {
- return list;
- } else {
- break;
- }
- }
- }
-
- return resolver.getFactories(getTubeline(defaultConfig, resolveReference(defaultConfig.getTubelines().getDefault())));
- }
-
- TubelineDefinition getTubeline(MetroConfig config, URI tubelineDefinitionUri) {
- if (config != null && config.getTubelines() != null) {
- for (TubelineDefinition td : config.getTubelines().getTubelineDefinitions()) {
- if (td.getName().equals(tubelineDefinitionUri.getFragment())) {
- return td;
- }
- }
- }
-
- return null;
- }
-
- private static URI resolveReference(String reference) {
- try {
- return new URI(reference);
- } catch (URISyntaxException ex) {
- throw LOGGER.logSevereException(new WebServiceException(TubelineassemblyMessages.MASM_0008_INVALID_URI_REFERENCE(reference), ex));
- }
- }
-
-
- private static URL locateResource(String resource, ResourceLoader loader) {
- if (loader == null) return null;
-
- try {
- return loader.getResource(resource);
- } catch (MalformedURLException ex) {
- LOGGER.severe(TubelineassemblyMessages.MASM_0009_CANNOT_FORM_VALID_URL(resource), ex);
- }
- return null;
- }
-
- private static URL locateResource(String resource, ResourceLoader[] loaders) {
-
- for (ResourceLoader loader : loaders) {
- URL url = locateResource(resource, loader);
- if (url != null) {
- return url;
- }
- }
- return null;
- }
-
- private static MetroConfig loadMetroConfig(@NotNull URL resourceUrl) {
- MetroConfig result = null;
- try {
- JAXBContext jaxbContext = createJAXBContext();
- Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
- XMLInputFactory factory = XmlUtil.newXMLInputFactory(true);
- final JAXBElement<MetroConfig> configElement = unmarshaller.unmarshal(factory.createXMLStreamReader(resourceUrl.openStream()), MetroConfig.class);
- result = configElement.getValue();
- } catch (Exception e) {
- LOGGER.warning(TubelineassemblyMessages.MASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(resourceUrl.toString()), e);
- }
- return result;
- }
-
- private static JAXBContext createJAXBContext() throws Exception {
- if (isJDKInternal()) {
- // since jdk classes are repackaged, extra privilege is necessary to create JAXBContext
- return AccessController.doPrivileged(
- new PrivilegedExceptionAction<JAXBContext>() {
- @Override
- public JAXBContext run() throws Exception {
- return JAXBContext.newInstance(MetroConfig.class.getPackage().getName());
- }
- }, createSecurityContext()
- );
- } else {
- // usage from JAX-WS/Metro/Glassfish
- return JAXBContext.newInstance(MetroConfig.class.getPackage().getName());
- }
- }
-
- private static AccessControlContext createSecurityContext() {
- PermissionCollection perms = new Permissions();
- perms.add(new RuntimePermission("accessClassInPackage.com" + ".sun.xml.internal.ws.runtime.config")); // avoid repackaging
- perms.add(new ReflectPermission("suppressAccessChecks"));
- return new AccessControlContext(
- new ProtectionDomain[]{
- new ProtectionDomain(null, perms),
- });
- }
-
- private static boolean isJDKInternal() {
- // avoid "string repackaging"
- return MetroConfigLoader.class.getName().startsWith("com." + "sun.xml.internal.ws");
- }
-
- private static class MetroConfigUrlLoader extends ResourceLoader {
-
- Container container; // TODO remove the field together with the code path using it (see below)
- ResourceLoader parentLoader;
-
- MetroConfigUrlLoader(ResourceLoader parentLoader) {
- this.parentLoader = parentLoader;
- }
-
- MetroConfigUrlLoader(Container container) {
- this((container != null) ? container.getSPI(ResourceLoader.class) : null);
- this.container = container;
- }
-
- @Override
- public URL getResource(String resource) throws MalformedURLException {
- LOGGER.entering(resource);
- URL resourceUrl = null;
- try {
- if (parentLoader != null) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine(TubelineassemblyMessages.MASM_0011_LOADING_RESOURCE(resource, parentLoader));
- }
-
- resourceUrl = parentLoader.getResource(resource);
- }
-
- if (resourceUrl == null) {
- resourceUrl = loadViaClassLoaders("com/sun/xml/internal/ws/assembler/" + resource);
- }
-
- if (resourceUrl == null && container != null) {
- // TODO: we should remove this code path, the config file should be loaded using ResourceLoader only
- resourceUrl = loadFromServletContext(resource);
- }
-
- return resourceUrl;
- } finally {
- LOGGER.exiting(resourceUrl);
- }
- }
-
- private static URL loadViaClassLoaders(final String resource) {
- URL resourceUrl = tryLoadFromClassLoader(resource, Thread.currentThread().getContextClassLoader());
- if (resourceUrl == null) {
- resourceUrl = tryLoadFromClassLoader(resource, MetroConfigLoader.class.getClassLoader());
- if (resourceUrl == null) {
- return ClassLoader.getSystemResource(resource);
- }
- }
-
- return resourceUrl;
- }
-
- private static URL tryLoadFromClassLoader(final String resource, final ClassLoader loader) {
- return (loader != null) ? loader.getResource(resource) : null;
- }
-
- private URL loadFromServletContext(String resource) throws RuntimeException {
- Object context = null;
- try {
- final Class<?> contextClass = Class.forName("javax.servlet.ServletContext");
- context = container.getSPI(contextClass);
- if (context != null) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine(TubelineassemblyMessages.MASM_0012_LOADING_VIA_SERVLET_CONTEXT(resource, context));
- }
- try {
- final Method method = context.getClass().getMethod("getResource", String.class);
- final Object result = method.invoke(context, "/WEB-INF/" + resource);
- return URL.class.cast(result);
- } catch (Exception e) {
- throw LOGGER.logSevereException(new RuntimeException(TubelineassemblyMessages.MASM_0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD("getResource()")), e);
- }
- }
- } catch (ClassNotFoundException e) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine(TubelineassemblyMessages.MASM_0014_UNABLE_TO_LOAD_CLASS("javax.servlet.ServletContext"));
- }
- }
- return null;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigName.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigName.java
deleted file mode 100644
index 3766fd09..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigName.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler;
-
-/**
- * This interface is used to get the file name used for the metro configuration file.
- * This allows multiple configurations of metro in a single VM.
- *
- * @author Bob Naugle
- */
-public interface MetroConfigName {
- public String getDefaultFileName();
-
- public String getAppFileName();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigNameImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigNameImpl.java
deleted file mode 100644
index 91c6a22a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigNameImpl.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler;
-
-/**
-* TODO: Write some description here ...
-*
-* @author Miroslav Kos (miroslav.kos at oracle.com)
-*/
-public class MetroConfigNameImpl implements MetroConfigName {
-
- private final String defaultFileName;
- private final String appFileName;
-
- public MetroConfigNameImpl(String defaultFileName, String appFileName) {
- this.defaultFileName = defaultFileName;
- this.appFileName = appFileName;
- }
-
- @Override
- public String getDefaultFileName() {
- return defaultFileName;
- }
-
- @Override
- public String getAppFileName() {
- return appFileName;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroTubelineAssembler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroTubelineAssembler.java
deleted file mode 100644
index e8738006..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroTubelineAssembler.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.logging.Logger;
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext;
-import com.sun.xml.internal.ws.api.pipe.ServerTubeAssemblerContext;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubelineAssembler;
-import com.sun.xml.internal.ws.assembler.dev.TubelineAssemblyDecorator;
-import com.sun.xml.internal.ws.dump.LoggingDumpTube;
-import com.sun.xml.internal.ws.resources.TubelineassemblyMessages;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-
-import java.util.Collection;
-import java.util.logging.Level;
-
-/**
-* TODO: Write some description here ...
-*
-* @author Miroslav Kos (miroslav.kos at oracle.com)
-*/
-public class MetroTubelineAssembler implements TubelineAssembler {
-
- private static final String COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE = "com.sun.metro.soap.dump";
- public static final MetroConfigNameImpl JAXWS_TUBES_CONFIG_NAMES = new MetroConfigNameImpl("jaxws-tubes-default.xml", "jaxws-tubes.xml");
-
- private static enum Side {
-
- Client("client"),
- Endpoint("endpoint");
- private final String name;
-
- private Side(String name) {
- this.name = name;
- }
-
- @Override
- public String toString() {
- return name;
- }
- }
-
- private static class MessageDumpingInfo {
-
- final boolean dumpBefore;
- final boolean dumpAfter;
- final Level logLevel;
-
- MessageDumpingInfo(boolean dumpBefore, boolean dumpAfter, Level logLevel) {
- this.dumpBefore = dumpBefore;
- this.dumpAfter = dumpAfter;
- this.logLevel = logLevel;
- }
- }
-
- private static final Logger LOGGER = Logger.getLogger(MetroTubelineAssembler.class);
- private final BindingID bindingId;
- private final TubelineAssemblyController tubelineAssemblyController;
-
- public MetroTubelineAssembler(final BindingID bindingId, MetroConfigName metroConfigName) {
- this.bindingId = bindingId;
- this.tubelineAssemblyController = new TubelineAssemblyController(metroConfigName);
- }
-
- TubelineAssemblyController getTubelineAssemblyController() {
- return tubelineAssemblyController;
- }
-
- @NotNull
- public Tube createClient(@NotNull ClientTubeAssemblerContext jaxwsContext) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer("Assembling client-side tubeline for WS endpoint: " + jaxwsContext.getAddress().getURI().toString());
- }
-
- DefaultClientTubelineAssemblyContext context = createClientContext(jaxwsContext);
-
- Collection<TubeCreator> tubeCreators = tubelineAssemblyController.getTubeCreators(context);
-
- for (TubeCreator tubeCreator : tubeCreators) {
- tubeCreator.updateContext(context);
- }
-
- TubelineAssemblyDecorator decorator = TubelineAssemblyDecorator.composite(
- ServiceFinder.find(TubelineAssemblyDecorator.class, context.getContainer()));
-
- boolean first = true;
- for (TubeCreator tubeCreator : tubeCreators) {
- final MessageDumpingInfo msgDumpInfo = setupMessageDumping(tubeCreator.getMessageDumpPropertyBase(), Side.Client);
-
- final Tube oldTubelineHead = context.getTubelineHead();
- LoggingDumpTube afterDumpTube = null;
- if (msgDumpInfo.dumpAfter) {
- afterDumpTube = new LoggingDumpTube(msgDumpInfo.logLevel, LoggingDumpTube.Position.After, context.getTubelineHead());
- context.setTubelineHead(afterDumpTube);
- }
-
- if (!context.setTubelineHead(decorator.decorateClient(tubeCreator.createTube(context), context))) { // no new tube has been created
- if (afterDumpTube != null) {
- context.setTubelineHead(oldTubelineHead); // removing possible "after" message dumping tube
- }
- } else {
- final String loggedTubeName = context.getTubelineHead().getClass().getName();
- if (afterDumpTube != null) {
- afterDumpTube.setLoggedTubeName(loggedTubeName);
- }
-
- if (msgDumpInfo.dumpBefore) {
- final LoggingDumpTube beforeDumpTube = new LoggingDumpTube(msgDumpInfo.logLevel, LoggingDumpTube.Position.Before, context.getTubelineHead());
- beforeDumpTube.setLoggedTubeName(loggedTubeName);
- context.setTubelineHead(beforeDumpTube);
- }
- }
-
- if (first) {
- context.setTubelineHead(decorator.decorateClientTail(context.getTubelineHead(), context));
- first = false;
- }
- }
-
- return decorator.decorateClientHead(context.getTubelineHead(), context);
- }
-
- @NotNull
- public Tube createServer(@NotNull ServerTubeAssemblerContext jaxwsContext) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer("Assembling endpoint tubeline for WS endpoint: " + jaxwsContext.getEndpoint().getServiceName() + "::" + jaxwsContext.getEndpoint().getPortName());
- }
-
- DefaultServerTubelineAssemblyContext context = createServerContext(jaxwsContext);
-
- // FIXME endpoint URI for provider case
- Collection<TubeCreator> tubeCreators = tubelineAssemblyController.getTubeCreators(context);
- for (TubeCreator tubeCreator : tubeCreators) {
- tubeCreator.updateContext(context);
- }
-
- TubelineAssemblyDecorator decorator = TubelineAssemblyDecorator.composite(
- ServiceFinder.find(TubelineAssemblyDecorator.class, context.getEndpoint().getContainer()));
-
- boolean first = true;
- for (TubeCreator tubeCreator : tubeCreators) {
- final MessageDumpingInfo msgDumpInfo = setupMessageDumping(tubeCreator.getMessageDumpPropertyBase(), Side.Endpoint);
-
- final Tube oldTubelineHead = context.getTubelineHead();
- LoggingDumpTube afterDumpTube = null;
- if (msgDumpInfo.dumpAfter) {
- afterDumpTube = new LoggingDumpTube(msgDumpInfo.logLevel, LoggingDumpTube.Position.After, context.getTubelineHead());
- context.setTubelineHead(afterDumpTube);
- }
-
- if (!context.setTubelineHead(decorator.decorateServer(tubeCreator.createTube(context), context))) { // no new tube has been created
- if (afterDumpTube != null) {
- context.setTubelineHead(oldTubelineHead); // removing possible "after" message dumping tube
- }
- } else {
- final String loggedTubeName = context.getTubelineHead().getClass().getName();
- if (afterDumpTube != null) {
- afterDumpTube.setLoggedTubeName(loggedTubeName);
- }
-
- if (msgDumpInfo.dumpBefore) {
- final LoggingDumpTube beforeDumpTube = new LoggingDumpTube(msgDumpInfo.logLevel, LoggingDumpTube.Position.Before, context.getTubelineHead());
- beforeDumpTube.setLoggedTubeName(loggedTubeName);
- context.setTubelineHead(beforeDumpTube);
- }
- }
-
- if (first) {
- context.setTubelineHead(decorator.decorateServerTail(context.getTubelineHead(), context));
- first = false;
- }
- }
-
- return decorator.decorateServerHead(context.getTubelineHead(), context);
- }
-
- private MessageDumpingInfo setupMessageDumping(String msgDumpSystemPropertyBase, Side side) {
- boolean dumpBefore = false;
- boolean dumpAfter = false;
- Level logLevel = Level.INFO;
-
- // checking common properties
- Boolean value = getBooleanValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE);
- if (value != null) {
- dumpBefore = value.booleanValue();
- dumpAfter = value.booleanValue();
- }
-
- value = getBooleanValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE + ".before");
- dumpBefore = (value != null) ? value.booleanValue() : dumpBefore;
-
- value = getBooleanValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE + ".after");
- dumpAfter = (value != null) ? value.booleanValue() : dumpAfter;
-
- Level levelValue = getLevelValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE + ".level");
- if (levelValue != null) {
- logLevel = levelValue;
- }
-
- // narrowing to proper communication side on common properties
- value = getBooleanValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE + "." + side.toString());
- if (value != null) {
- dumpBefore = value.booleanValue();
- dumpAfter = value.booleanValue();
- }
-
- value = getBooleanValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE + "." + side.toString() + ".before");
- dumpBefore = (value != null) ? value.booleanValue() : dumpBefore;
-
- value = getBooleanValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE + "." + side.toString() + ".after");
- dumpAfter = (value != null) ? value.booleanValue() : dumpAfter;
-
- levelValue = getLevelValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE + "." + side.toString() + ".level");
- if (levelValue != null) {
- logLevel = levelValue;
- }
-
-
- // checking general tube-specific properties
- value = getBooleanValue(msgDumpSystemPropertyBase);
- if (value != null) {
- dumpBefore = value.booleanValue();
- dumpAfter = value.booleanValue();
- }
-
- value = getBooleanValue(msgDumpSystemPropertyBase + ".before");
- dumpBefore = (value != null) ? value.booleanValue() : dumpBefore;
-
- value = getBooleanValue(msgDumpSystemPropertyBase + ".after");
- dumpAfter = (value != null) ? value.booleanValue() : dumpAfter;
-
- levelValue = getLevelValue(msgDumpSystemPropertyBase + ".level");
- if (levelValue != null) {
- logLevel = levelValue;
- }
-
- // narrowing to proper communication side on tube-specific properties
- msgDumpSystemPropertyBase += "." + side.toString();
-
- value = getBooleanValue(msgDumpSystemPropertyBase);
- if (value != null) {
- dumpBefore = value.booleanValue();
- dumpAfter = value.booleanValue();
- }
-
- value = getBooleanValue(msgDumpSystemPropertyBase + ".before");
- dumpBefore = (value != null) ? value.booleanValue() : dumpBefore;
-
- value = getBooleanValue(msgDumpSystemPropertyBase + ".after");
- dumpAfter = (value != null) ? value.booleanValue() : dumpAfter;
-
- levelValue = getLevelValue(msgDumpSystemPropertyBase + ".level");
- if (levelValue != null) {
- logLevel = levelValue;
- }
-
- return new MessageDumpingInfo(dumpBefore, dumpAfter, logLevel);
- }
-
- private Boolean getBooleanValue(String propertyName) {
- Boolean retVal = null;
-
- String stringValue = System.getProperty(propertyName);
- if (stringValue != null) {
- retVal = Boolean.valueOf(stringValue);
- LOGGER.fine(TubelineassemblyMessages.MASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(propertyName, retVal));
- }
-
- return retVal;
- }
-
- private Level getLevelValue(String propertyName) {
- Level retVal = null;
-
- String stringValue = System.getProperty(propertyName);
- if (stringValue != null) {
- // if value is not null => property is set, we will try to override the default logging level
- LOGGER.fine(TubelineassemblyMessages.MASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(propertyName, stringValue));
- try {
- retVal = Level.parse(stringValue);
- } catch (IllegalArgumentException ex) {
- LOGGER.warning(TubelineassemblyMessages.MASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(propertyName, stringValue), ex);
- }
- }
-
- return retVal;
- }
-
- // Extension point to change Tubeline Assembly behaviour: override if necessary ...
- protected DefaultServerTubelineAssemblyContext createServerContext(ServerTubeAssemblerContext jaxwsContext) {
- return new DefaultServerTubelineAssemblyContext(jaxwsContext);
- }
-
- // Extension point to change Tubeline Assembly behaviour: override if necessary ...
- protected DefaultClientTubelineAssemblyContext createClientContext(ClientTubeAssemblerContext jaxwsContext) {
- return new DefaultClientTubelineAssemblyContext(jaxwsContext);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubeCreator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubeCreator.java
deleted file mode 100644
index d0e980ce..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubeCreator.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.assembler;
-
-import com.sun.istack.internal.logging.Logger;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.TubeFactory;
-import com.sun.xml.internal.ws.assembler.dev.TubelineAssemblyContextUpdater;
-import com.sun.xml.internal.ws.resources.TubelineassemblyMessages;
-import com.sun.xml.internal.ws.runtime.config.TubeFactoryConfig;
-
-/**
- * Utility class that encapsulates logic of loading TubeFactory
- * instances and creating Tube instances.
- *
- * @author m_potociar
- */
-final class TubeCreator {
- private static final Logger LOGGER = Logger.getLogger(TubeCreator.class);
- private final TubeFactory factory;
- private final String msgDumpPropertyBase;
-
- TubeCreator(TubeFactoryConfig config, ClassLoader tubeFactoryClassLoader) {
- String className = config.getClassName();
- try {
- Class<?> factoryClass;
- if (isJDKInternal(className)) {
- factoryClass = Class.forName(className, true, null);
- } else {
- factoryClass = Class.forName(className, true, tubeFactoryClassLoader);
- }
- if (TubeFactory.class.isAssignableFrom(factoryClass)) {
- // We can suppress "unchecked" warning here as we are checking for the correct type in the if statement above
- @SuppressWarnings("unchecked")
- Class<TubeFactory> typedClass = (Class<TubeFactory>) factoryClass;
- this.factory = typedClass.newInstance();
- this.msgDumpPropertyBase = this.factory.getClass().getName() + ".dump";
- } else {
- throw new RuntimeException(TubelineassemblyMessages.MASM_0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE(factoryClass.getName(), TubeFactory.class.getName()));
- }
- } catch (InstantiationException ex) {
- throw LOGGER.logSevereException(new RuntimeException(TubelineassemblyMessages.MASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(className), ex), true);
- } catch (IllegalAccessException ex) {
- throw LOGGER.logSevereException(new RuntimeException(TubelineassemblyMessages.MASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(className), ex), true);
- } catch (ClassNotFoundException ex) {
- throw LOGGER.logSevereException(new RuntimeException(TubelineassemblyMessages.MASM_0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS(className), ex), true);
- }
- }
-
- Tube createTube(DefaultClientTubelineAssemblyContext context) {
- // TODO implement passing init parameters (if any) to the factory
- return factory.createTube(context);
- }
-
- Tube createTube(DefaultServerTubelineAssemblyContext context) {
- // TODO implement passing init parameters (if any) to the factory
- return factory.createTube(context);
- }
-
- void updateContext(ClientTubelineAssemblyContext context) {
- if (factory instanceof TubelineAssemblyContextUpdater) {
- ((TubelineAssemblyContextUpdater) factory).prepareContext(context);
- }
- }
-
- void updateContext(DefaultServerTubelineAssemblyContext context) {
- if (factory instanceof TubelineAssemblyContextUpdater) {
- ((TubelineAssemblyContextUpdater) factory).prepareContext(context);
- }
- }
-
- String getMessageDumpPropertyBase() {
- return msgDumpPropertyBase;
- }
-
- private boolean isJDKInternal(String className) {
- // avoid repackaging
- return className.startsWith("com." + "sun.xml.internal.ws");
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyContextImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyContextImpl.java
deleted file mode 100644
index f4b38e40..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyContextImpl.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler;
-
-import com.sun.istack.internal.logging.Logger;
-import com.sun.xml.internal.ws.api.pipe.Pipe;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.helper.PipeAdapter;
-import com.sun.xml.internal.ws.assembler.dev.TubelineAssemblyContext;
-import java.text.MessageFormat;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.logging.Level;
-
-/**
- * A base tubeline assembly context class providing common methods for both
- * client and server assembly context classes.
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-class TubelineAssemblyContextImpl implements TubelineAssemblyContext {
- private static final Logger LOGGER = Logger.getLogger(TubelineAssemblyContextImpl.class);
-
- private Tube head;
- private Pipe adaptedHead;
- private List<Tube> tubes = new LinkedList<Tube>();
-
- @Override
- public Tube getTubelineHead() {
- return head;
- }
-
- @Override
- public Pipe getAdaptedTubelineHead() {
- if (adaptedHead == null) {
- adaptedHead = PipeAdapter.adapt(head);
- }
- return adaptedHead;
- }
-
- boolean setTubelineHead(Tube newHead) {
- if (newHead == head || newHead == adaptedHead) {
- return false;
- }
-
- head = newHead;
- tubes.add(head);
- adaptedHead = null;
-
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("Added '{0}' tube instance to the tubeline.", (newHead == null) ? null : newHead.getClass().getName()));
- }
-
- return true;
- }
-
- @Override
- public <T> T getImplementation(Class<T> type) {
- for (Tube tube : tubes) {
- if (type.isInstance(tube)) {
- return type.cast(tube);
- }
- }
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyController.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyController.java
deleted file mode 100644
index 61f00502..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyController.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.logging.Logger;
-import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext;
-import com.sun.xml.internal.ws.resources.TubelineassemblyMessages;
-import com.sun.xml.internal.ws.runtime.config.TubeFactoryConfig;
-import com.sun.xml.internal.ws.runtime.config.TubeFactoryList;
-
-import javax.xml.namespace.QName;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Collection;
-import java.util.LinkedList;
-
-/**
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-final class TubelineAssemblyController {
-
- private final MetroConfigName metroConfigName;
-
- TubelineAssemblyController(MetroConfigName metroConfigName) {
- this.metroConfigName = metroConfigName;
- }
-
- /**
- * Provides a ordered collection of WSIT/Metro client-side tube creators that are be used to
- * construct a client-side Metro tubeline
- *
- * The order of the tube creators in the collection is last-to-first from the
- * client side request message processing perspective.
- *
- * <b>
- * WARNING: This method is part of Metro internal API and may be changed, removed or
- * replaced by a different method without a prior notice. The method SHOULD NOT be used
- * outside of Metro codebase.
- * </b>
- *
- * @param endpointUri URI of the endpoint for which the collection of tube factories should be returned
- *
- * @return collection of WSIT/Metro client-side tube creators
- */
- Collection<TubeCreator> getTubeCreators(ClientTubelineAssemblyContext context) {
- URI endpointUri;
- if (context.getPortInfo() != null) {
- endpointUri = createEndpointComponentUri(context.getPortInfo().getServiceName(), context.getPortInfo().getPortName());
- } else {
- endpointUri = null;
- }
-
- MetroConfigLoader configLoader = new MetroConfigLoader(context.getContainer(), metroConfigName);
- return initializeTubeCreators(configLoader.getClientSideTubeFactories(endpointUri));
- }
-
- /**
- * Provides a ordered collection of WSIT/Metro server-side tube creators that are be used to
- * construct a server-side Metro tubeline for a given endpoint
- *
- * The order of the tube creators in the collection is last-to-first from the
- * server side request message processing perspective.
- *
- * <b>
- * WARNING: This method is part of Metro internal API and may be changed, removed or
- * replaced by a different method without a prior notice. The method SHOULD NOT be used
- * outside of Metro codebase.
- * </b>
- *
- * @param endpointUri URI of the endpoint for which the collection of tube factories should be returned
- *
- * @return collection of WSIT/Metro server-side tube creators
- */
- Collection<TubeCreator> getTubeCreators(DefaultServerTubelineAssemblyContext context) {
- URI endpointUri;
- if (context.getEndpoint() != null) {
- endpointUri = createEndpointComponentUri(context.getEndpoint().getServiceName(), context.getEndpoint().getPortName());
- } else {
- endpointUri = null;
- }
-
- MetroConfigLoader configLoader = new MetroConfigLoader(context.getEndpoint().getContainer(), metroConfigName);
- return initializeTubeCreators(configLoader.getEndpointSideTubeFactories(endpointUri));
- }
-
- private Collection<TubeCreator> initializeTubeCreators(TubeFactoryList tfl) {
- final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
-
- LinkedList<TubeCreator> tubeCreators = new LinkedList<TubeCreator>();
- for (TubeFactoryConfig tubeFactoryConfig : tfl.getTubeFactoryConfigs()) {
- tubeCreators.addFirst(new TubeCreator(tubeFactoryConfig, contextClassLoader));
- }
- return tubeCreators;
- }
-
- /*
- * Example WSDL component URI: http://org.sample#wsdl11.port(PingService/HttpPingPort)
- */
- private URI createEndpointComponentUri(@NotNull QName serviceName, @NotNull QName portName) {
- StringBuilder sb = new StringBuilder(serviceName.getNamespaceURI()).append("#wsdl11.port(").append(serviceName.getLocalPart()).append('/').append(portName.getLocalPart()).append(')');
- try {
- return new URI(sb.toString());
- } catch (URISyntaxException ex) {
- Logger.getLogger(TubelineAssemblyController.class).warning(
- TubelineassemblyMessages.MASM_0020_ERROR_CREATING_URI_FROM_GENERATED_STRING(sb.toString()),
- ex);
- return null;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ClientTubelineAssemblyContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ClientTubelineAssemblyContext.java
deleted file mode 100644
index a74f7950..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ClientTubelineAssemblyContext.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler.dev;
-
-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.WSBinding;
-import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-
-/**
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public interface ClientTubelineAssemblyContext extends TubelineAssemblyContext {
-
- /**
- * The endpoint address. Always non-null. This parameter is taken separately
- * from {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLPort} (even though there's {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLPort#getAddress()})
- * because sometimes WSDL is not available.
- */
- @NotNull
- EndpointAddress getAddress();
-
- /**
- * The binding of the new pipeline to be created.
- */
- @NotNull
- WSBinding getBinding();
-
- /**
- * Gets the {@link Codec} that is set by {@link #setCodec} or the default codec
- * based on the binding.
- *
- * @return codec to be used for web service requests
- */
- @NotNull
- Codec getCodec();
-
- /**
- * Returns the Container in which the client is running
- *
- * @return Container in which client is running
- */
- Container getContainer();
-
- PolicyMap getPolicyMap();
-
- WSPortInfo getPortInfo();
-
- /**
- * The created pipeline will use seiModel to get java concepts for the endpoint
- *
- * @return Null if the service doesn't have SEI model e.g. Dispatch,
- * and otherwise non-null.
- */
- @Nullable
- SEIModel getSEIModel();
-
- /**
- * The pipeline is created for this {@link com.sun.xml.internal.ws.api.WSService}.
- * Always non-null. (To be precise, the newly created pipeline
- * is owned by a proxy or a dispatch created from this {@link com.sun.xml.internal.ws.api.WSService}.)
- */
- @NotNull
- WSService getService();
-
- ClientTubeAssemblerContext getWrappedContext();
-
- /**
- * The created pipeline will be used to serve this port.
- * Null if the service isn't associated with any port definition in WSDL,
- * and otherwise non-null.
- * <p/>
- * Replaces {@link com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext#getWsdlModel()}
- */
- WSDLPort getWsdlPort();
-
- boolean isPolicyAvailable();
-
- /**
- * Interception point to change {@link Codec} during {@link com.sun.xml.internal.ws.api.pipe.Tube}line assembly. The
- * new codec will be used by jax-ws client runtime for encoding/decoding web service
- * request/response messages. The new codec should be used by the transport tubes.
- * <p/>
- * <p/>
- * the codec should correctly implement {@link Codec#copy} since it is used while
- * serving requests concurrently.
- *
- * @param codec codec to be used for web service requests
- */
- void setCodec(@NotNull
- Codec codec);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ServerTubelineAssemblyContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ServerTubelineAssemblyContext.java
deleted file mode 100644
index e707b53c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ServerTubelineAssemblyContext.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler.dev;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.ServerTubeAssemblerContext;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-
-/**
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public interface ServerTubelineAssemblyContext extends TubelineAssemblyContext {
-
- /**
- * Gets the {@link Codec} that is set by {@link #setCodec} or the default codec
- * based on the binding. The codec is a full codec that is responsible for
- * encoding/decoding entire protocol message(for e.g: it is responsible to
- * encode/decode entire MIME messages in SOAP binding)
- *
- * @return codec to be used for web service requests
- * @see com.sun.xml.internal.ws.api.pipe.Codecs
- */
- @NotNull
- Codec getCodec();
-
- /**
- *
- * The created pipeline is used to serve this {@link com.sun.xml.internal.ws.api.server.WSEndpoint}.
- * Specifically, its {@link com.sun.xml.internal.ws.api.WSBinding} should be of interest to many
- * {@link com.sun.xml.internal.ws.api.pipe.Pipe}s.
- * @return Always non-null.
- */
- @NotNull
- WSEndpoint getEndpoint();
-
- PolicyMap getPolicyMap();
-
- /**
- * The created pipeline will use seiModel to get java concepts for the endpoint
- *
- * @return Null if the service doesn't have SEI model e.g. Provider endpoints,
- * and otherwise non-null.
- */
- @Nullable
- SEIModel getSEIModel();
-
- /**
- * The last {@link com.sun.xml.internal.ws.api.pipe.Pipe} in the pipeline. The assembler is expected to put
- * additional {@link com.sun.xml.internal.ws.api.pipe.Pipe}s in front of it.
- *
- * <p>
- * (Just to give you the idea how this is used, normally the terminal pipe
- * is the one that invokes the user application or {@link javax.xml.ws.Provider}.)
- *
- * @return always non-null terminal pipe
- */
- @NotNull
- Tube getTerminalTube();
-
- ServerTubeAssemblerContext getWrappedContext();
-
- /**
- * The created pipeline will be used to serve this port.
- *
- * @return Null if the service isn't associated with any port definition in WSDL,
- * and otherwise non-null.
- */
- @Nullable
- WSDLPort getWsdlPort();
-
- boolean isPolicyAvailable();
-
- /**
- * If this server pipeline is known to be used for serving synchronous transport,
- * then this method returns true. This can be potentially use as an optimization
- * hint, since often synchronous versions are cheaper to execute than asycnhronous
- * versions.
- */
- boolean isSynchronous();
-
- /**
- * Interception point to change {@link Codec} during {@link Tube}line assembly. The
- * new codec will be used by jax-ws server runtime for encoding/decoding web service
- * request/response messages. {@link WSEndpoint#createCodec()} will return a copy
- * of this new codec and will be used in the server runtime.
- *
- * <p>
- * The codec is a full codec that is responsible for
- * encoding/decoding entire protocol message(for e.g: it is responsible to
- * encode/decode entire MIME messages in SOAP binding)
- *
- * <p>
- * the codec should correctly implement {@link Codec#copy} since it is used while
- * serving requests concurrently.
- *
- * @param codec codec to be used for web service requests
- * @see com.sun.xml.internal.ws.api.pipe.Codecs
- */
- void setCodec(@NotNull
- Codec codec);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubeFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubeFactory.java
deleted file mode 100644
index 5049ad0a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubeFactory.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler.dev;
-
-import com.sun.xml.internal.ws.api.pipe.Tube;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public interface TubeFactory {
- /**
- * Adds RM tube to the client-side tubeline, depending on whether RM is enabled or not.
- *
- * @param context wsit client tubeline assembler context
- * @return new tail of the client-side tubeline
- */
- Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException;
-
- /**
- * Adds RM tube to the service-side tubeline, depending on whether RM is enabled or not.
- *
- * @param context wsit service tubeline assembler context
- * @return new head of the service-side tubeline
- */
- Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContext.java
deleted file mode 100644
index 447e6fb0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContext.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler.dev;
-
-import com.sun.xml.internal.ws.api.pipe.Pipe;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-
-/**
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public interface TubelineAssemblyContext {
-
- Pipe getAdaptedTubelineHead();
-
- <T> T getImplementation(Class<T> type);
-
- Tube getTubelineHead();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContextUpdater.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContextUpdater.java
deleted file mode 100644
index 8c628a15..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContextUpdater.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler.dev;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public interface TubelineAssemblyContextUpdater {
- /**
- * TODO javadoc
- *
- * @param context
- * @throws javax.xml.ws.WebServiceException
- */
- void prepareContext(ClientTubelineAssemblyContext context) throws WebServiceException;
-
- /**
- * TODO javadoc
- *
- * @param context
- * @throws javax.xml.ws.WebServiceException
- */
- void prepareContext(ServerTubelineAssemblyContext context) throws WebServiceException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyDecorator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyDecorator.java
deleted file mode 100644
index 41a5384a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyDecorator.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler.dev;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import com.sun.xml.internal.ws.api.pipe.Tube;
-
-/**
- * Decorate Tubes during tubeline assembly
- *
- * @since 2.2.7
- */
-public class TubelineAssemblyDecorator {
- /**
- * Composite decorator
- * @param decorators decorators
- * @return composite that delegates to a list of decorators
- */
- public static TubelineAssemblyDecorator composite(Iterable<TubelineAssemblyDecorator> decorators) {
- return new CompositeTubelineAssemblyDecorator(decorators);
- }
-
- /**
- * Decorate client tube
- * @param tube tube
- * @param context client context
- * @return updated tube for tubeline or return tube parameter to no-op
- */
- public Tube decorateClient(Tube tube, ClientTubelineAssemblyContext context) {
- return tube;
- }
-
- /**
- * Decorate client head tube. The decorateClient method will have been called first.
- * @param tube tube
- * @param context client context
- * @return updated tube for tubeline or return tube parameter to no-op
- */
- public Tube decorateClientHead(
- Tube tube, ClientTubelineAssemblyContext context) {
- return tube;
- }
-
- /**
- * Decorate client tail tube. The decorateClient method will have been called first.
- * @param tube tube
- * @param context client context
- * @return updated tube for tubeline or return tube parameter to no-op
- */
- public Tube decorateClientTail(
- Tube tube,
- ClientTubelineAssemblyContext context) {
- return tube;
- }
-
- /**
- * Decorate server tube
- * @param tube tube
- * @param context server context
- * @return updated tube for tubeline or return tube parameter to no-op
- */
- public Tube decorateServer(Tube tube, ServerTubelineAssemblyContext context) {
- return tube;
- }
-
- /**
- * Decorate server tail tube. The decorateServer method will have been called first.
- * @param tube tube
- * @param context server context
- * @return updated tube for tubeline or return tube parameter to no-op
- */
- public Tube decorateServerTail(
- Tube tube, ServerTubelineAssemblyContext context) {
- return tube;
- }
-
- /**
- * Decorate server head tube. The decorateServer method will have been called first
- * @param tube tube
- * @param context server context
- * @return updated tube for tubeline or return tube parameter to no-op
- */
- public Tube decorateServerHead(
- Tube tube,
- ServerTubelineAssemblyContext context) {
- return tube;
- }
-
- private static class CompositeTubelineAssemblyDecorator extends TubelineAssemblyDecorator {
- private Collection<TubelineAssemblyDecorator> decorators = new ArrayList<TubelineAssemblyDecorator>();
-
- public CompositeTubelineAssemblyDecorator(Iterable<TubelineAssemblyDecorator> decorators) {
- for (TubelineAssemblyDecorator decorator : decorators) {
- this.decorators.add(decorator);
- }
- }
-
- @Override
- public Tube decorateClient(Tube tube, ClientTubelineAssemblyContext context) {
- for (TubelineAssemblyDecorator decorator : decorators) {
- tube = decorator.decorateClient(tube, context);
- }
- return tube;
- }
-
- @Override
- public Tube decorateClientHead(
- Tube tube, ClientTubelineAssemblyContext context) {
- for (TubelineAssemblyDecorator decorator : decorators) {
- tube = decorator.decorateClientHead(tube, context);
- }
- return tube;
- }
-
- @Override
- public Tube decorateClientTail(
- Tube tube,
- ClientTubelineAssemblyContext context) {
- for (TubelineAssemblyDecorator decorator : decorators) {
- tube = decorator.decorateClientTail(tube, context);
- }
- return tube;
- }
-
- public Tube decorateServer(Tube tube, ServerTubelineAssemblyContext context) {
- for (TubelineAssemblyDecorator decorator : decorators) {
- tube = decorator.decorateServer(tube, context);
- }
- return tube;
- }
-
- @Override
- public Tube decorateServerTail(
- Tube tube, ServerTubelineAssemblyContext context) {
- for (TubelineAssemblyDecorator decorator : decorators) {
- tube = decorator.decorateServerTail(tube, context);
- }
- return tube;
- }
-
- @Override
- public Tube decorateServerHead(
- Tube tube,
- ServerTubelineAssemblyContext context) {
- for (TubelineAssemblyDecorator decorator : decorators) {
- tube = decorator.decorateServerHead(tube, context);
- }
- return tube;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml
deleted file mode 100644
index c1717a30..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<!--
- Document : jaxws-tubes-default.xml
- Author : Marek Potociar (marek.potociar at sun.com)
- Description: The default JAX-WS tubes configuration file.
--->
-
-<metro xmlns='http://java.sun.com/xml/ns/metro/config' version="1.0">
- <tubelines default="#default-metro-tubeline">
- <tubeline name="default-metro-tubeline">
- <client-side>
- <!--<tube-factory className="com.sun.xml.internal.ws.assembler.jaxws.TerminalTubeFactory" />-->
- <tube-factory className="com.sun.xml.internal.ws.assembler.jaxws.HandlerTubeFactory" />
- <tube-factory className="com.sun.xml.internal.ws.assembler.jaxws.ValidationTubeFactory" />
- <!--<tube-factory className="com.sun.xml.internal.ws.assembler.jaxws.MonitoringTubeFactory" />-->
- <tube-factory className="com.sun.xml.internal.ws.assembler.jaxws.MustUnderstandTubeFactory" />
- <tube-factory className="com.sun.xml.internal.ws.assembler.jaxws.AddressingTubeFactory" />
- <tube-factory className="com.sun.xml.internal.ws.dump.MessageDumpingTubeFactory" />
- <!-- TODO: secrity tube(?) -->
- <tube-factory className="com.sun.xml.internal.ws.assembler.jaxws.BasicTransportTubeFactory" />
- </client-side>
- <endpoint-side>
- <!-- TODO: secrity tube(?) -->
- <tube-factory className="com.sun.xml.internal.ws.dump.MessageDumpingTubeFactory" />
- <tube-factory className="com.sun.xml.internal.ws.assembler.jaxws.AddressingTubeFactory" />
- <tube-factory className="com.sun.xml.internal.ws.assembler.jaxws.MustUnderstandTubeFactory" />
- <tube-factory className="com.sun.xml.internal.ws.assembler.jaxws.MonitoringTubeFactory" />
- <tube-factory className="com.sun.xml.internal.ws.assembler.jaxws.HandlerTubeFactory" />
- <tube-factory className="com.sun.xml.internal.ws.assembler.jaxws.ValidationTubeFactory" />
- <tube-factory className="com.sun.xml.internal.ws.assembler.jaxws.TerminalTubeFactory" />
- </endpoint-side>
- </tubeline>
- </tubelines>
-</metro>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/AddressingTubeFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/AddressingTubeFactory.java
deleted file mode 100644
index 1b3bc8fc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/AddressingTubeFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler.jaxws;
-
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.TubeFactory;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * TubeFactory implementation creating one of the standard JAX-WS RI tubes
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public final class AddressingTubeFactory implements TubeFactory {
-
- public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException {
- return context.getWrappedContext().createWsaTube(context.getTubelineHead());
- }
-
- public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException {
- return context.getWrappedContext().createWsaTube(context.getTubelineHead());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/BasicTransportTubeFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/BasicTransportTubeFactory.java
deleted file mode 100644
index e7b8c3e9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/BasicTransportTubeFactory.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler.jaxws;
-
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.TubeFactory;
-
-import javax.xml.ws.WebServiceException;
-
-
-/**
- * TubeFactory implementation creating one of the standard JAX-WS RI tubes
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public final class BasicTransportTubeFactory implements TubeFactory {
-
- public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException {
- return context.getWrappedContext().createTransportTube();
- }
-
- public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException {
- return context.getTubelineHead();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/HandlerTubeFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/HandlerTubeFactory.java
deleted file mode 100644
index d1728994..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/HandlerTubeFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler.jaxws;
-
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.TubeFactory;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * TubeFactory implementation creating one of the standard JAX-WS RI tubes
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public final class HandlerTubeFactory implements TubeFactory {
-
- public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException {
- return context.getWrappedContext().createHandlerTube(context.getTubelineHead());
- }
-
- public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException {
- return context.getWrappedContext().createHandlerTube(context.getTubelineHead());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MonitoringTubeFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MonitoringTubeFactory.java
deleted file mode 100644
index 41a98edb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MonitoringTubeFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler.jaxws;
-
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.TubeFactory;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * TubeFactory implementation creating one of the standard JAX-WS RI tubes
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public final class MonitoringTubeFactory implements TubeFactory {
-
- public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException {
- return context.getTubelineHead();
- }
-
- public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException {
- return context.getWrappedContext().createMonitoringTube(context.getTubelineHead());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MustUnderstandTubeFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MustUnderstandTubeFactory.java
deleted file mode 100644
index b14a98e0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MustUnderstandTubeFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler.jaxws;
-
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.TubeFactory;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * TubeFactory implementation creating one of the standard JAX-WS RI tubes
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public final class MustUnderstandTubeFactory implements TubeFactory {
-
- public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException {
- return context.getWrappedContext().createClientMUTube(context.getTubelineHead());
- }
-
- public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException {
- return context.getWrappedContext().createServerMUTube(context.getTubelineHead());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/TerminalTubeFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/TerminalTubeFactory.java
deleted file mode 100644
index 3097cd22..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/TerminalTubeFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler.jaxws;
-
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.TubeFactory;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * TubeFactory implementation creating one of the standard JAX-WS RI tubes
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public final class TerminalTubeFactory implements TubeFactory {
-
- public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException {
- return context.getTubelineHead();
- }
-
- public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException {
- return context.getWrappedContext().getTerminalTube();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/ValidationTubeFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/ValidationTubeFactory.java
deleted file mode 100644
index abee3968..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/ValidationTubeFactory.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.assembler.jaxws;
-
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.TubeFactory;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * TubeFactory implementation creating one of the standard JAX-WS RI tubes
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public final class ValidationTubeFactory implements TubeFactory {
-
- @Override
- public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException {
- return context.getWrappedContext().createValidationTube(context.getTubelineHead());
- }
-
- @Override
- public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException {
- return context.getWrappedContext().createValidationTube(context.getTubelineHead());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/BindingImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/BindingImpl.java
deleted file mode 100644
index 927fad4d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/BindingImpl.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.binding;
-
-import com.oracle.webservices.internal.api.message.MessageContextFactory;
-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.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.client.HandlerConfiguration;
-import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature;
-import com.sun.xml.internal.ws.developer.BindingTypeFeature;
-
-import javax.activation.CommandInfo;
-import javax.activation.CommandMap;
-import javax.activation.MailcapCommandMap;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.handler.Handler;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.Map;
-
-
-/**
- * Instances are created by the service, which then
- * sets the handler chain on the binding impl.
- *
- * <p>
- * This class is made abstract as we don't see a situation when
- * a BindingImpl has much meaning without binding id.
- * IOW, for a specific binding there will be a class
- * extending BindingImpl, for example SOAPBindingImpl.
- *
- * <p>
- * The spi Binding interface extends Binding.
- *
- * @author WS Development Team
- */
-public abstract class BindingImpl implements WSBinding {
-
- protected static final WebServiceFeature[] EMPTY_FEATURES = new WebServiceFeature[0];
-
- //This is reset when ever Binding.setHandlerChain() or SOAPBinding.setRoles() is called.
- private HandlerConfiguration handlerConfig;
- private final Set<QName> addedHeaders = new HashSet<QName>();
- private final Set<QName> knownHeaders = new HashSet<QName>();
- private final Set<QName> unmodKnownHeaders = Collections.unmodifiableSet(knownHeaders);
- private final BindingID bindingId;
- // Features that are set(enabled/disabled) on the binding
- protected final WebServiceFeatureList features;
- // Features that are set(enabled/disabled) on the binding or an operation
- protected final Map<QName, WebServiceFeatureList> operationFeatures = new HashMap<QName, WebServiceFeatureList>();
- // Features that are set(enabled/disabled) on the binding, an operation or an input message
- protected final Map<QName, WebServiceFeatureList> inputMessageFeatures = new HashMap<QName, WebServiceFeatureList>();
- // Features that are set(enabled/disabled) on the binding, an operation or an output message
- protected final Map<QName, WebServiceFeatureList> outputMessageFeatures = new HashMap<QName, WebServiceFeatureList>();
- // Features that are set(enabled/disabled) on the binding, an operation or a fault message
- protected final Map<MessageKey, WebServiceFeatureList> faultMessageFeatures = new HashMap<MessageKey, WebServiceFeatureList>();
-
- protected javax.xml.ws.Service.Mode serviceMode = javax.xml.ws.Service.Mode.PAYLOAD;
-
- protected MessageContextFactory messageContextFactory;
-
- protected BindingImpl(BindingID bindingId, WebServiceFeature ... features) {
- this.bindingId = bindingId;
- handlerConfig = new HandlerConfiguration(Collections.<String>emptySet(), Collections.<Handler>emptyList());
- if (handlerConfig.getHandlerKnownHeaders() != null)
- knownHeaders.addAll(handlerConfig.getHandlerKnownHeaders());
- this.features = new WebServiceFeatureList(features);
- this.features.validate();
- }
-
- public
- @NotNull
- List<Handler> getHandlerChain() {
- return handlerConfig.getHandlerChain();
- }
-
- public HandlerConfiguration getHandlerConfig() {
- return handlerConfig;
- }
-
- protected void setHandlerConfig(HandlerConfiguration handlerConfig) {
- this.handlerConfig = handlerConfig;
- knownHeaders.clear();
- knownHeaders.addAll(addedHeaders);
- if (handlerConfig != null && handlerConfig.getHandlerKnownHeaders() != null)
- knownHeaders.addAll(handlerConfig.getHandlerKnownHeaders());
- }
-
- public void setMode(@NotNull Service.Mode mode) {
- this.serviceMode = mode;
- }
-
- public Set<QName> getKnownHeaders() {
- return unmodKnownHeaders;
- }
-
- public boolean addKnownHeader(QName headerQName) {
- addedHeaders.add(headerQName);
- return knownHeaders.add(headerQName);
- }
-
- public
- @NotNull
- BindingID getBindingId() {
- return bindingId;
- }
-
- public final SOAPVersion getSOAPVersion() {
- return bindingId.getSOAPVersion();
- }
-
- public AddressingVersion getAddressingVersion() {
- AddressingVersion addressingVersion;
- if (features.isEnabled(AddressingFeature.class))
- addressingVersion = AddressingVersion.W3C;
- else if (features.isEnabled(MemberSubmissionAddressingFeature.class))
- addressingVersion = AddressingVersion.MEMBER;
- else
- addressingVersion = null;
- return addressingVersion;
- }
-
- @NotNull
- public final Codec createCodec() {
-
- // initialization from here should cover most of cases;
- // if not, it would be necessary to call
- // BindingImpl.initializeJavaActivationHandlers()
- // explicitly by programmer
- initializeJavaActivationHandlers();
-
- return bindingId.createEncoder(this);
- }
-
- public static void initializeJavaActivationHandlers() {
- // DataHandler.writeTo() may search for DCH. So adding some default ones.
- try {
- CommandMap map = CommandMap.getDefaultCommandMap();
- if (map instanceof MailcapCommandMap) {
- MailcapCommandMap mailMap = (MailcapCommandMap) map;
-
- // registering our DCH since javamail's DCH doesn't handle
- if (!cmdMapInitialized(mailMap)) {
- mailMap.addMailcap("text/xml;;x-java-content-handler=com.sun.xml.internal.ws.encoding.XmlDataContentHandler");
- mailMap.addMailcap("application/xml;;x-java-content-handler=com.sun.xml.internal.ws.encoding.XmlDataContentHandler");
- mailMap.addMailcap("image/*;;x-java-content-handler=com.sun.xml.internal.ws.encoding.ImageDataContentHandler");
- mailMap.addMailcap("text/plain;;x-java-content-handler=com.sun.xml.internal.ws.encoding.StringDataContentHandler");
- }
- }
- } catch (Throwable t) {
- // ignore the exception.
- }
- }
-
- private static boolean cmdMapInitialized(MailcapCommandMap mailMap) {
- CommandInfo[] commands = mailMap.getAllCommands("text/xml");
- if (commands == null || commands.length == 0) {
- return false;
- }
-
- // SAAJ RI implements it's own DataHandlers which can be used for JAX-WS too;
- // see com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl#initializeJavaActivationHandlers
- // so if found any of SAAJ or our own handler registered, we are ok; anyway using SAAJ directly here
- // is not good idea since we don't want standalone JAX-WS to depend on specific SAAJ impl.
- // This is also reason for duplication of Handler's code by JAX-WS
- String saajClassName = "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler";
- String jaxwsClassName = "com.sun.xml.internal.ws.encoding.XmlDataContentHandler";
- for (CommandInfo command : commands) {
- String commandClass = command.getCommandClass();
- if (saajClassName.equals(commandClass) ||
- jaxwsClassName.equals(commandClass)) {
- return true;
- }
- }
- return false;
- }
-
- public static BindingImpl create(@NotNull BindingID bindingId) {
- if (bindingId.equals(BindingID.XML_HTTP))
- return new HTTPBindingImpl();
- else
- return new SOAPBindingImpl(bindingId);
- }
-
- public static BindingImpl create(@NotNull BindingID bindingId, WebServiceFeature[] features) {
- // Override the BindingID from the features
- for(WebServiceFeature feature : features) {
- if (feature instanceof BindingTypeFeature) {
- BindingTypeFeature f = (BindingTypeFeature)feature;
- bindingId = BindingID.parse(f.getBindingId());
- }
- }
- if (bindingId.equals(BindingID.XML_HTTP))
- return new HTTPBindingImpl(features);
- else
- return new SOAPBindingImpl(bindingId, features);
- }
-
- public static WSBinding getDefaultBinding() {
- return new SOAPBindingImpl(BindingID.SOAP11_HTTP);
- }
-
- public String getBindingID() {
- return bindingId.toString();
- }
-
- public @Nullable <F extends WebServiceFeature> F getFeature(@NotNull Class<F> featureType){
- return features.get(featureType);
- }
-
- public @Nullable <F extends WebServiceFeature> F getOperationFeature(@NotNull Class<F> featureType,
- @NotNull final QName operationName) {
- final WebServiceFeatureList operationFeatureList = this.operationFeatures.get(operationName);
- return FeatureListUtil.mergeFeature(featureType, operationFeatureList, features);
- }
-
- public boolean isFeatureEnabled(@NotNull Class<? extends WebServiceFeature> feature){
- return features.isEnabled(feature);
- }
-
- public boolean isOperationFeatureEnabled(@NotNull Class<? extends WebServiceFeature> featureType,
- @NotNull final QName operationName) {
- final WebServiceFeatureList operationFeatureList = this.operationFeatures.get(operationName);
- return FeatureListUtil.isFeatureEnabled(featureType, operationFeatureList, features);
- }
-
- @NotNull
- public WebServiceFeatureList getFeatures() {
- //TODO scchen convert BindingID to WebServiceFeature[]
- if(!isFeatureEnabled(com.oracle.webservices.internal.api.EnvelopeStyleFeature.class)) {
- WebServiceFeature[] f = { getSOAPVersion().toFeature() };
- features.mergeFeatures(f, false);
- }
- return features;
- }
-
- public @NotNull WebServiceFeatureList getOperationFeatures(@NotNull final QName operationName) {
- final WebServiceFeatureList operationFeatureList = this.operationFeatures.get(operationName);
- return FeatureListUtil.mergeList(operationFeatureList, features);
- }
-
- public @NotNull WebServiceFeatureList getInputMessageFeatures(@NotNull final QName operationName) {
- final WebServiceFeatureList operationFeatureList = this.operationFeatures.get(operationName);
- final WebServiceFeatureList messageFeatureList = this.inputMessageFeatures.get(operationName);
- return FeatureListUtil.mergeList(operationFeatureList, messageFeatureList, features);
-
- }
-
- public @NotNull WebServiceFeatureList getOutputMessageFeatures(@NotNull final QName operationName) {
- final WebServiceFeatureList operationFeatureList = this.operationFeatures.get(operationName);
- final WebServiceFeatureList messageFeatureList = this.outputMessageFeatures.get(operationName);
- return FeatureListUtil.mergeList(operationFeatureList, messageFeatureList, features);
- }
-
- public @NotNull WebServiceFeatureList getFaultMessageFeatures(@NotNull final QName operationName,
- @NotNull final QName messageName) {
- final WebServiceFeatureList operationFeatureList = this.operationFeatures.get(operationName);
- final WebServiceFeatureList messageFeatureList = this.faultMessageFeatures.get(
- new MessageKey(operationName, messageName));
- return FeatureListUtil.mergeList(operationFeatureList, messageFeatureList, features);
- }
-
- public void setOperationFeatures(@NotNull final QName operationName, WebServiceFeature... newFeatures) {
- if (newFeatures != null) {
- WebServiceFeatureList featureList = operationFeatures.get(operationName);
- if (featureList == null) {
- featureList = new WebServiceFeatureList();
- }
- for (WebServiceFeature f : newFeatures) {
- featureList.add(f);
- }
- operationFeatures.put(operationName, featureList);
- }
- }
-
- public void setInputMessageFeatures(@NotNull final QName operationName, WebServiceFeature... newFeatures) {
- if (newFeatures != null) {
- WebServiceFeatureList featureList = inputMessageFeatures.get(operationName);
- if (featureList == null) {
- featureList = new WebServiceFeatureList();
- }
- for (WebServiceFeature f : newFeatures) {
- featureList.add(f);
- }
- inputMessageFeatures.put(operationName, featureList);
- }
- }
-
- public void setOutputMessageFeatures(@NotNull final QName operationName, WebServiceFeature... newFeatures) {
- if (newFeatures != null) {
- WebServiceFeatureList featureList = outputMessageFeatures.get(operationName);
- if (featureList == null) {
- featureList = new WebServiceFeatureList();
- }
- for (WebServiceFeature f : newFeatures) {
- featureList.add(f);
- }
- outputMessageFeatures.put(operationName, featureList);
- }
- }
-
- public void setFaultMessageFeatures(@NotNull final QName operationName, @NotNull final QName messageName, WebServiceFeature... newFeatures) {
- if (newFeatures != null) {
- final MessageKey key = new MessageKey(operationName, messageName);
- WebServiceFeatureList featureList = faultMessageFeatures.get(key);
- if (featureList == null) {
- featureList = new WebServiceFeatureList();
- }
- for (WebServiceFeature f : newFeatures) {
- featureList.add(f);
- }
- faultMessageFeatures.put(key, featureList);
- }
- }
-
- public synchronized @NotNull com.oracle.webservices.internal.api.message.MessageContextFactory getMessageContextFactory () {
- if (messageContextFactory == null) {
- messageContextFactory = MessageContextFactory.createFactory(getFeatures().toArray());
- }
- return messageContextFactory;
- }
-
- /**
- * Experimental: Identify messages based on the name of the message and the
- * operation that uses this message.
- */
- protected static class MessageKey {
-
- final private QName operationName;
- final private QName messageName;
-
- public MessageKey(final QName operationName, final QName messageName) {
- this.operationName = operationName;
- this.messageName = messageName;
- }
-
- @Override
- public int hashCode() {
- final int hashFirst = this.operationName != null ? this.operationName.hashCode() : 0;
- final int hashSecond = this.messageName != null ? this.messageName.hashCode() : 0;
-
- return (hashFirst + hashSecond) * hashSecond + hashFirst;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- final MessageKey other = (MessageKey) obj;
- if (this.operationName != other.operationName && (this.operationName == null || !this.operationName.equals(other.operationName))) {
- return false;
- }
- if (this.messageName != other.messageName && (this.messageName == null || !this.messageName.equals(other.messageName))) {
- return false;
- }
- return true;
- }
-
- @Override
- public String toString() {
- return "(" + this.operationName + ", " + this.messageName + ")";
- }
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/FeatureListUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/FeatureListUtil.java
deleted file mode 100644
index 94ae1c75..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/FeatureListUtil.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.binding;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * Experimental: Utility methods that operate on WebServiceFeatureLists.
- *
- * @author WS Development Team
- */
-public class FeatureListUtil {
-
- /**
- * Merge all features into one list. Returns an empty list if no lists were
- * passed as parameter.
- *
- * @param lists The WebServiceFeatureLists.
- * @return A new WebServiceFeatureList that contains all features.
- */
- public static @NotNull WebServiceFeatureList mergeList(WebServiceFeatureList... lists) {
- final WebServiceFeatureList result = new WebServiceFeatureList();
- for (WebServiceFeatureList list : lists) {
- result.addAll(list);
- }
- return result;
- }
-
- public static @Nullable <F extends WebServiceFeature> F mergeFeature(final @NotNull Class<F> featureType,
- @Nullable WebServiceFeatureList list1, @Nullable WebServiceFeatureList list2)
- throws WebServiceException {
- final F feature1 = list1 != null ? list1.get(featureType) : null;
- final F feature2 = list2 != null ? list2.get(featureType) : null;
- if (feature1 == null) {
- return feature2;
- }
- else if (feature2 == null) {
- return feature1;
- }
- else {
- if (feature1.equals(feature2)) {
- return feature1;
- }
- else {
- // TODO exception text
- throw new WebServiceException(feature1 + ", " + feature2);
- }
- }
- }
-
- public static boolean isFeatureEnabled(@NotNull Class<? extends WebServiceFeature> featureType,
- @Nullable WebServiceFeatureList list1, @Nullable WebServiceFeatureList list2)
- throws WebServiceException {
- final WebServiceFeature mergedFeature = mergeFeature(featureType, list1, list2);
- return (mergedFeature != null) && mergedFeature.isEnabled();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/HTTPBindingImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/HTTPBindingImpl.java
deleted file mode 100644
index 359cf77d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/HTTPBindingImpl.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.binding;
-
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.client.HandlerConfiguration;
-import com.sun.xml.internal.ws.resources.ClientMessages;
-
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.handler.LogicalHandler;
-import javax.xml.ws.http.HTTPBinding;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @author WS Development Team
- */
-public class HTTPBindingImpl extends BindingImpl implements HTTPBinding {
-
- /**
- * Use {@link BindingImpl#create(BindingID)} to create this.
- */
- HTTPBindingImpl() {
- this(EMPTY_FEATURES);
- }
-
- HTTPBindingImpl(WebServiceFeature ... features) {
- super(BindingID.XML_HTTP, features);
- }
-
- /**
- * This method separates the logical and protocol handlers and
- * sets the HandlerConfiguration.
- * Only logical handlers are allowed with HTTPBinding.
- * Setting SOAPHandlers throws WebServiceException
- */
- public void setHandlerChain(List<Handler> chain) {
- for (Handler handler : chain) {
- if (!(handler instanceof LogicalHandler)) {
- throw new WebServiceException(ClientMessages.NON_LOGICAL_HANDLER_SET(handler.getClass()));
- }
- }
- setHandlerConfig(new HandlerConfiguration(Collections.<String>emptySet(), chain));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java
deleted file mode 100644
index 292ed73c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.binding;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.client.HandlerConfiguration;
-import com.sun.xml.internal.ws.encoding.soap.streaming.SOAP12NamespaceConstants;
-import com.sun.xml.internal.ws.resources.ClientMessages;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPFactory;
-
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.soap.MTOMFeature;
-import javax.xml.ws.soap.SOAPBinding;
-import java.util.*;
-
-/**
- * @author WS Development Team
- */
-public final class SOAPBindingImpl extends BindingImpl implements SOAPBinding {
-
- public static final String X_SOAP12HTTP_BINDING =
- "http://java.sun.com/xml/ns/jaxws/2003/05/soap/bindings/HTTP/";
-
- private static final String ROLE_NONE = SOAP12NamespaceConstants.ROLE_NONE;
- //protected boolean enableMtom;
- protected final SOAPVersion soapVersion;
-
- private Set<QName> portKnownHeaders = Collections.emptySet();
- private Set<QName> bindingUnderstoodHeaders = new HashSet<QName>();
-
- /**
- * Use {@link BindingImpl#create(BindingID)} to create this.
- *
- * @param bindingId SOAP binding ID
- */
- SOAPBindingImpl(BindingID bindingId) {
- this(bindingId,EMPTY_FEATURES);
- }
-
- /**
- * Use {@link BindingImpl#create(BindingID)} to create this.
- *
- * @param bindingId binding id
- * @param features
- * These features have a precedence over
- * {@link BindingID#createBuiltinFeatureList() the implicit features}
- * associated with the {@link BindingID}.
- */
- SOAPBindingImpl(BindingID bindingId, WebServiceFeature... features) {
- super(bindingId, features);
- this.soapVersion = bindingId.getSOAPVersion();
- //populates with required roles and updates handlerConfig
- setRoles(new HashSet<String>());
- //Is this still required? comment out for now
- //setupSystemHandlerDelegate(serviceName);
-
- this.features.addAll(bindingId.createBuiltinFeatureList());
- }
-
- /**
- * This method should be called if the binding has SOAPSEIModel
- * The Headers understood by the Port are set, so that they can be used for MU
- * processing.
- *
- * @param headers SOAP header names
- */
- public void setPortKnownHeaders(@NotNull Set<QName> headers) {
- this.portKnownHeaders = headers;
- }
-
- /**
- * TODO A feature should be created to configure processing of MU headers.
- * @param header
- * @return
- */
- public boolean understandsHeader(QName header) {
- return serviceMode == javax.xml.ws.Service.Mode.MESSAGE
- || portKnownHeaders.contains(header)
- || bindingUnderstoodHeaders.contains(header);
-
- }
-
- /**
- * Sets the handlers on the binding and then sorts the handlers in to logical and protocol handlers.
- * Creates a new HandlerConfiguration object and sets it on the BindingImpl. Also parses Headers understood by
- * Protocol Handlers and sets the HandlerConfiguration.
- */
- public void setHandlerChain(List<Handler> chain) {
- setHandlerConfig(new HandlerConfiguration(getHandlerConfig().getRoles(), chain));
- }
-
- protected void addRequiredRoles(Set<String> roles) {
- roles.addAll(soapVersion.requiredRoles);
- }
-
- public Set<String> getRoles() {
- return getHandlerConfig().getRoles();
- }
-
- /**
- * Adds the next and other roles in case this has
- * been called by a user without them.
- * Creates a new HandlerConfiguration object and sets it on the BindingImpl.
- */
- public void setRoles(Set<String> roles) {
- if (roles == null) {
- roles = new HashSet<String>();
- }
- if (roles.contains(ROLE_NONE)) {
- throw new WebServiceException(ClientMessages.INVALID_SOAP_ROLE_NONE());
- }
- addRequiredRoles(roles);
- setHandlerConfig(new HandlerConfiguration(roles, getHandlerConfig()));
- }
-
-
- /**
- * Used typically by the runtime to enable/disable Mtom optimization
- */
- public boolean isMTOMEnabled() {
- return isFeatureEnabled(MTOMFeature.class);
- }
-
- /**
- * Client application can override if the MTOM optimization should be enabled
- */
- public void setMTOMEnabled(boolean b) {
- features.setMTOMEnabled(b);
- }
-
- public SOAPFactory getSOAPFactory() {
- return soapVersion.getSOAPFactory();
- }
-
- public MessageFactory getMessageFactory() {
- return soapVersion.getMessageFactory();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/WebServiceFeatureList.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/WebServiceFeatureList.java
deleted file mode 100644
index 32bf6832..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/WebServiceFeatureList.java
+++ /dev/null
@@ -1,589 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.binding;
-
-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.FeatureListValidator;
-import com.sun.xml.internal.ws.api.FeatureListValidatorAnnotation;
-import com.sun.xml.internal.ws.api.ImpliesWebServiceFeature;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-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.resources.ModelerMessages;
-import com.sun.xml.internal.bind.util.Which;
-
-import javax.xml.ws.RespectBinding;
-import javax.xml.ws.RespectBindingFeature;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.soap.Addressing;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.soap.MTOM;
-import javax.xml.ws.soap.MTOMFeature;
-import javax.xml.ws.spi.WebServiceFeatureAnnotation;
-
-import com.oracle.webservices.internal.api.EnvelopeStyleFeature;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Constructor;
-import java.util.*;
-import java.util.logging.Logger;
-
-/**
- * Represents a list of {@link WebServiceFeature}s that has bunch of utility
- * methods pertaining to web service features.
- *
- * @author Rama Pulavarthi
- */
-public final class WebServiceFeatureList extends AbstractMap<Class<? extends WebServiceFeature>, WebServiceFeature> implements WSFeatureList {
- public static WebServiceFeatureList toList(Iterable<WebServiceFeature> features) {
- if (features instanceof WebServiceFeatureList)
- return (WebServiceFeatureList) features;
- WebServiceFeatureList w = new WebServiceFeatureList();
- if (features != null)
- w.addAll(features);
- return w;
- }
-
- private Map<Class<? extends WebServiceFeature>, WebServiceFeature> wsfeatures = new HashMap<Class<? extends WebServiceFeature>, WebServiceFeature>();
- private boolean isValidating = false;
-
- public WebServiceFeatureList() {
- }
-
- /**
- * Delegate to this parent if non-null.
- */
- private @Nullable
- WSDLFeaturedObject parent;
-
- public WebServiceFeatureList(@NotNull WebServiceFeature... features) {
- if (features != null) {
- for (WebServiceFeature f : features) {
- addNoValidate(f);
- }
- }
- }
-
- public void validate() {
- if (!isValidating) {
- isValidating = true;
-
- // validation
- for (WebServiceFeature ff : this) {
- validate(ff);
- }
- }
- }
-
- private void validate(WebServiceFeature feature) {
- // run validation
- FeatureListValidatorAnnotation fva = feature.getClass().getAnnotation(FeatureListValidatorAnnotation.class);
- if (fva != null) {
- Class<? extends FeatureListValidator> beanClass = fva.bean();
- try {
- FeatureListValidator validator = beanClass.newInstance();
- validator.validate(this);
- } catch (InstantiationException e) {
- throw new WebServiceException(e);
- } catch (IllegalAccessException e) {
- throw new WebServiceException(e);
- }
- }
- }
-
- public WebServiceFeatureList(WebServiceFeatureList features) {
- if (features != null) {
- wsfeatures.putAll(features.wsfeatures);
- parent = features.parent;
- isValidating = features.isValidating;
- }
- }
-
- /**
- * Creates a list by reading featuers from the annotation on a class.
- */
- public WebServiceFeatureList(@NotNull Class<?> endpointClass) {
- parseAnnotations(endpointClass);
- }
-
- /**
- * Adds the corresponding features to the list for feature annotations(i.e
- * which have {@link WebServiceFeatureAnnotation} meta annotation)
- *
- * @param annIt collection of annotations(that can have non-feature annotations)
- */
- public void parseAnnotations(Iterable<Annotation> annIt) {
- for(Annotation ann : annIt) {
- WebServiceFeature feature = getFeature(ann);
- if (feature != null) {
- add(feature);
- }
- }
- }
-
- /**
- * Returns a corresponding feature for a feature annotation(i.e which has
- * {@link WebServiceFeatureAnnotation} meta annotation)
- *
- * @return corresponding feature for the annotation
- * null, if the annotation is nota feature annotation
- */
- public static WebServiceFeature getFeature(Annotation a) {
- WebServiceFeature ftr = null;
- if (!(a.annotationType().isAnnotationPresent(WebServiceFeatureAnnotation.class))) {
- ftr = null;
- } else if (a instanceof Addressing) {
- Addressing addAnn = (Addressing) a;
- try {
- ftr = new AddressingFeature(addAnn.enabled(), addAnn.required(),addAnn.responses());
- } catch(NoSuchMethodError e) {
- //throw error. We can't default to Responses.ALL as we dont know if the user has not used 2.2 annotation with responses.
- throw new RuntimeModelerException(ModelerMessages.RUNTIME_MODELER_ADDRESSING_RESPONSES_NOSUCHMETHOD(toJar(Which.which(Addressing.class))));
- }
- } else if (a instanceof MTOM) {
- MTOM mtomAnn = (MTOM) a;
- ftr = new MTOMFeature(mtomAnn.enabled(), mtomAnn.threshold());
- } else if (a instanceof RespectBinding) {
- RespectBinding rbAnn = (RespectBinding) a;
- ftr = new RespectBindingFeature(rbAnn.enabled());
- } else {
- ftr = getWebServiceFeatureBean(a);
- }
- return ftr;
- }
-
- /**
- *
- * @param endpointClass web service impl class
- */
- public void parseAnnotations(Class<?> endpointClass) {
- for (Annotation a : endpointClass.getAnnotations()) {
- WebServiceFeature ftr = getFeature(a);
- if (ftr != null) {
- if (ftr instanceof MTOMFeature) {
- // check conflict with @BindingType
- BindingID bindingID = BindingID.parse(endpointClass);
- MTOMFeature bindingMtomSetting = bindingID.createBuiltinFeatureList().get(MTOMFeature.class);
- if (bindingMtomSetting != null && bindingMtomSetting.isEnabled() ^ ftr.isEnabled()) {
- throw new RuntimeModelerException(
- ModelerMessages.RUNTIME_MODELER_MTOM_CONFLICT(bindingID, ftr.isEnabled()));
- }
- }
- add(ftr);
- }
- }
- }
-
- /**
- * Given the URL String inside jar, returns the URL to the jar itself.
- */
- private static String toJar(String url) {
- if(!url.startsWith("jar:"))
- return url;
- url = url.substring(4); // cut off jar:
- return url.substring(0,url.lastIndexOf('!')); // cut off everything after '!'
- }
-
- private static WebServiceFeature getWebServiceFeatureBean(Annotation a) {
- WebServiceFeatureAnnotation wsfa = a.annotationType().getAnnotation(WebServiceFeatureAnnotation.class);
- Class<? extends WebServiceFeature> beanClass = wsfa.bean();
- WebServiceFeature bean;
-
- Constructor ftrCtr = null;
- String[] paramNames = null;
- for (Constructor con : beanClass.getConstructors()) {
- FeatureConstructor ftrCtrAnn = (FeatureConstructor) con.getAnnotation(FeatureConstructor.class);
- if (ftrCtrAnn != null) {
- if (ftrCtr == null) {
- ftrCtr = con;
- paramNames = ftrCtrAnn.value();
- } else {
- throw new WebServiceException(
- ModelerMessages.RUNTIME_MODELER_WSFEATURE_MORETHANONE_FTRCONSTRUCTOR(a, beanClass));
- }
- }
- }
- if (ftrCtr == null) {
- bean = getWebServiceFeatureBeanViaBuilder(a, beanClass);
- if (bean != null) {
- return bean;
- } else {
- throw new WebServiceException(
- ModelerMessages.RUNTIME_MODELER_WSFEATURE_NO_FTRCONSTRUCTOR(a, beanClass));
- }
- }
- if (ftrCtr.getParameterTypes().length != paramNames.length) {
- throw new WebServiceException(
- ModelerMessages.RUNTIME_MODELER_WSFEATURE_ILLEGAL_FTRCONSTRUCTOR(a, beanClass));
- }
-
- try {
- Object[] params = new Object[paramNames.length];
- for (int i = 0; i < paramNames.length; i++) {
- Method m = a.annotationType().getDeclaredMethod(paramNames[i]);
- params[i] = m.invoke(a);
- }
- bean = (WebServiceFeature) ftrCtr.newInstance(params);
- } catch (Exception e) {
- throw new WebServiceException(e);
- }
- return bean;
- }
-
- private static WebServiceFeature getWebServiceFeatureBeanViaBuilder(
- final Annotation annotation,
- final Class<? extends WebServiceFeature> beanClass)
- {
- try {
- final Method featureBuilderMethod = beanClass.getDeclaredMethod("builder");
- final Object builder = featureBuilderMethod.invoke(beanClass);
- final Method buildMethod = builder.getClass().getDeclaredMethod("build");
-
- for (Method builderMethod : builder.getClass().getDeclaredMethods()) {
- if (!builderMethod.equals(buildMethod)) {
- final String methodName = builderMethod.getName();
- final Method annotationMethod = annotation.annotationType().getDeclaredMethod(methodName);
- final Object annotationFieldValue = annotationMethod.invoke(annotation);
- final Object[] arg = { annotationFieldValue };
- if (skipDuringOrgJvnetWsToComOracleWebservicesPackageMove(builderMethod, annotationFieldValue)) {
- continue;
- }
- builderMethod.invoke(builder, arg);
- }
- }
-
- final Object result = buildMethod.invoke(builder);
- if (result instanceof WebServiceFeature) {
- return (WebServiceFeature) result;
- } else {
- throw new WebServiceException("Not a WebServiceFeature: " + result);
- }
- } catch (final NoSuchMethodException e) {
- return null;
- } catch (final IllegalAccessException e) {
- throw new WebServiceException(e);
- } catch (final InvocationTargetException e) {
- throw new WebServiceException(e);
- }
- }
-
- // TODO this will be removed after package move is complete.
- private static boolean skipDuringOrgJvnetWsToComOracleWebservicesPackageMove(
- final Method builderMethod,
- final Object annotationFieldValue)
- {
- final Class<?> annotationFieldValueClass = annotationFieldValue.getClass();
- if (! annotationFieldValueClass.isEnum()) {
- return false;
- }
- final Class<?>[] builderMethodParameterTypes = builderMethod.getParameterTypes();
- if (builderMethodParameterTypes.length != 1) {
- throw new WebServiceException("expected only 1 parameter");
- }
- final String builderParameterTypeName = builderMethodParameterTypes[0].getName();
- if (! builderParameterTypeName.startsWith("com.oracle.webservices.internal.test.features_annotations_enums.apinew") &&
- ! builderParameterTypeName.startsWith("com.oracle.webservices.internal.api")) {
- return false;
- }
- return false;
- }
-
- public Iterator<WebServiceFeature> iterator() {
- if (parent != null)
- return new MergedFeatures(parent.getFeatures());
- return wsfeatures.values().iterator();
- }
-
- public @NotNull
- WebServiceFeature[] toArray() {
- if (parent != null)
- return new MergedFeatures(parent.getFeatures()).toArray();
- return wsfeatures.values().toArray(new WebServiceFeature[] {});
- }
-
- public boolean isEnabled(@NotNull Class<? extends WebServiceFeature> feature) {
- WebServiceFeature ftr = get(feature);
- return ftr != null && ftr.isEnabled();
- }
-
- public boolean contains(@NotNull Class<? extends WebServiceFeature> feature) {
- WebServiceFeature ftr = get(feature);
- return ftr != null;
- }
-
- public @Nullable
- <F extends WebServiceFeature> F get(@NotNull Class<F> featureType) {
- WebServiceFeature f = featureType.cast(wsfeatures.get(featureType));
- if (f == null && parent != null) {
- return parent.getFeatures().get(featureType);
- }
- return (F) f;
- }
-
- /**
- * Adds a feature to the list if it's not already added.
- */
- public void add(@NotNull WebServiceFeature f) {
- if(addNoValidate(f) && isValidating)
- validate(f);
- }
-
- private boolean addNoValidate(@NotNull WebServiceFeature f) {
- if (!wsfeatures.containsKey(f.getClass())) {
- wsfeatures.put(f.getClass(), f);
-
- if (f instanceof ImpliesWebServiceFeature)
- ((ImpliesWebServiceFeature) f).implyFeatures(this);
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Adds features to the list if it's not already added.
- */
- public void addAll(@NotNull Iterable<WebServiceFeature> list) {
- for (WebServiceFeature f : list)
- add(f);
- }
-
- /**
- * Sets MTOM feature, overriding any existing feature. This is necessary for compatibility
- * with the existing {@link SOAPBinding.setMTOMEnabled}.
- * @param b if MTOM will be enabled
- */
- void setMTOMEnabled(boolean b) {
- wsfeatures.put(MTOMFeature.class, new MTOMFeature(b));
- }
-
- public boolean equals(Object other) {
- if (!(other instanceof WebServiceFeatureList))
- return false;
-
- WebServiceFeatureList w = (WebServiceFeatureList) other;
- return wsfeatures.equals(w.wsfeatures) && (parent == w.parent);
- }
-
- public String toString() {
- return wsfeatures.toString();
- }
-
- /**
- * Merges the extra features that are not already set on binding.
- * i.e, if a feature is set already on binding through some other API
- * the corresponding wsdlFeature is not set.
- *
- * @param features Web Service features that need to be merged with already configured features.
- * @param reportConflicts If true, checks if the feature setting in WSDL (wsdl extension or
- * policy configuration) conflicts with feature setting in Deployed Service and
- * logs warning if there are any conflicts.
- */
- public void mergeFeatures(@NotNull Iterable<WebServiceFeature> features, boolean reportConflicts) {
- for (WebServiceFeature wsdlFtr : features) {
- if (get(wsdlFtr.getClass()) == null) {
- add(wsdlFtr);
- } else if (reportConflicts) {
- if (isEnabled(wsdlFtr.getClass()) != wsdlFtr.isEnabled()) {
- LOGGER.warning(ModelerMessages.RUNTIME_MODELER_FEATURE_CONFLICT(
- get(wsdlFtr.getClass()), wsdlFtr));
- }
- }
- }
- }
-
- public void mergeFeatures(WebServiceFeature[] features, boolean reportConflicts) {
- for (WebServiceFeature wsdlFtr : features) {
- if (get(wsdlFtr.getClass()) == null) {
- add(wsdlFtr);
- } else if (reportConflicts) {
- if (isEnabled(wsdlFtr.getClass()) != wsdlFtr.isEnabled()) {
- LOGGER.warning(ModelerMessages.RUNTIME_MODELER_FEATURE_CONFLICT(
- get(wsdlFtr.getClass()), wsdlFtr));
- }
- }
- }
- }
-
- /**
- * 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 some other API the corresponding wsdlFeature is not set.
- *
- * @param wsdlPort
- * WSDLPort model
- * @param honorWsdlRequired
- * If this is true add WSDL Feature only if wsd:Required=true In
- * SEI case, it should be false In Provider case, it should be
- * true
- * @param reportConflicts
- * If true, checks if the feature setting in WSDL (wsdl extension
- * or policy configuration) conflicts with feature setting in
- * Deployed Service and logs warning if there are any conflicts.
- */
- public void mergeFeatures(@NotNull WSDLPort wsdlPort,
- boolean honorWsdlRequired, boolean reportConflicts) {
- if (honorWsdlRequired && !isEnabled(RespectBindingFeature.class))
- return;
- if (!honorWsdlRequired) {
- addAll(wsdlPort.getFeatures());
- return;
- }
- // Add only if isRequired returns true, when honorWsdlRequired is true
- for (WebServiceFeature wsdlFtr : wsdlPort.getFeatures()) {
- if (get(wsdlFtr.getClass()) == null) {
- try {
- // if it is a WSDL Extension , it will have required
- // attribute
- Method m = (wsdlFtr.getClass().getMethod("isRequired"));
- try {
- boolean required = (Boolean) m.invoke(wsdlFtr);
- if (required)
- add(wsdlFtr);
- } catch (IllegalAccessException e) {
- throw new WebServiceException(e);
- } catch (InvocationTargetException e) {
- throw new WebServiceException(e);
- }
- } catch (NoSuchMethodException e) {
- // this wsdlFtr is not an WSDL extension, just add it
- add(wsdlFtr);
- }
- } else if (reportConflicts) {
- if (isEnabled(wsdlFtr.getClass()) != wsdlFtr.isEnabled()) {
- LOGGER.warning(ModelerMessages.RUNTIME_MODELER_FEATURE_CONFLICT(
- get(wsdlFtr.getClass()), wsdlFtr));
- }
-
- }
- }
- }
-
- /**
- * Set the parent features. Basically the parent feature list will be
- * overriden by this feature list.
- */
- public void setParentFeaturedObject(@NotNull WSDLFeaturedObject parent) {
- this.parent = parent;
- }
-
- public static @Nullable <F extends WebServiceFeature> F getFeature(@NotNull WebServiceFeature[] features,
- @NotNull Class<F> featureType) {
- for (WebServiceFeature f : features) {
- if (f.getClass() == featureType)
- return (F) f;
- }
- return null;
- }
-
- /**
- * A Union of this WebServiceFeatureList and the parent.
- */
- private final class MergedFeatures implements Iterator<WebServiceFeature> {
- private final Stack<WebServiceFeature> features = new Stack<WebServiceFeature>();
-
- public MergedFeatures(@NotNull WSFeatureList parent) {
-
- for (WebServiceFeature f : wsfeatures.values()) {
- features.push(f);
- }
-
- for (WebServiceFeature f : parent) {
- if (!wsfeatures.containsKey(f.getClass())) {
- features.push(f);
- }
- }
- }
-
- public boolean hasNext() {
- return !features.empty();
- }
-
- public WebServiceFeature next() {
- if (!features.empty()) {
- return features.pop();
- }
- throw new NoSuchElementException();
- }
-
- public void remove() {
- if (!features.empty()) {
- features.pop();
- }
- }
-
- public WebServiceFeature[] toArray() {
- return features.toArray(new WebServiceFeature[] {});
- }
- }
-
- private static final Logger LOGGER = Logger.getLogger(WebServiceFeatureList.class.getName());
-
- @Override
- public Set<java.util.Map.Entry<Class<? extends WebServiceFeature>, WebServiceFeature>> entrySet() {
- return wsfeatures.entrySet();
- }
-
- @Override
- public WebServiceFeature put(Class<? extends WebServiceFeature> key, WebServiceFeature value) {
- return wsfeatures.put(key, value);
- }
-
- static public SOAPVersion getSoapVersion(WSFeatureList features) {
- {
- EnvelopeStyleFeature env = features.get(EnvelopeStyleFeature.class);
- if (env != null) {
- return SOAPVersion.from(env);
- }
- }
- com.oracle.webservices.internal.api.EnvelopeStyleFeature env = features.get(com.oracle.webservices.internal.api.EnvelopeStyleFeature.class);
- return env != null ? SOAPVersion.from(env) : null;
- }
-
- static public boolean isFeatureEnabled(Class<? extends WebServiceFeature> type, WebServiceFeature[] features) {
- WebServiceFeature ftr = getFeature(features, type);
- return ftr != null && ftr.isEnabled();
- }
-
- static public WebServiceFeature[] toFeatureArray(WSBinding binding) {
- //TODO scchen convert BindingID to WebServiceFeature[]
- if(!binding.isFeatureEnabled(EnvelopeStyleFeature.class)) {
- WebServiceFeature[] f = { binding.getSOAPVersion().toFeature() };
- binding.getFeatures().mergeFeatures(f, false);
- }
- return binding.getFeatures().toArray();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/AsyncInvoker.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/AsyncInvoker.java
deleted file mode 100644
index 68fe32e9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/AsyncInvoker.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Fiber.CompletionCallback;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * Invokes {@link Tube}line asynchronously for the client's async API(for e.g.: Dispatch#invokeAsync}
- * The concrete classes need to call {@link Stub#processAsync(AsyncResponseImpl, Packet, RequestContext, Fiber.CompletionCallback) } in
- * run() method.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class AsyncInvoker implements Runnable {
- /**
- * Because of the object instantiation order,
- * we can't take this as a constructor parameter.
- */
- protected AsyncResponseImpl responseImpl;
- protected boolean nonNullAsyncHandlerGiven;
-
- public void setReceiver(AsyncResponseImpl responseImpl) {
- this.responseImpl = responseImpl;
- }
-
- public AsyncResponseImpl getResponseImpl() {
- return responseImpl;
- }
-
- public void setResponseImpl(AsyncResponseImpl responseImpl) {
- this.responseImpl = responseImpl;
- }
-
- public boolean isNonNullAsyncHandlerGiven() {
- return nonNullAsyncHandlerGiven;
- }
-
- public void setNonNullAsyncHandlerGiven(boolean nonNullAsyncHandlerGiven) {
- this.nonNullAsyncHandlerGiven = nonNullAsyncHandlerGiven;
- }
-
- public void run () {
- try {
- do_run();
- }catch(WebServiceException e) {
- throw e;
- }catch(Throwable t) {
- //Wrap it in WebServiceException
- throw new WebServiceException(t);
- }
- }
-
- public abstract void do_run();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/AsyncResponseImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/AsyncResponseImpl.java
deleted file mode 100644
index 66c4b805..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/AsyncResponseImpl.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.Cancelable;
-import com.sun.xml.internal.ws.util.CompletedFuture;
-
-import javax.xml.ws.AsyncHandler;
-import javax.xml.ws.Response;
-import javax.xml.ws.WebServiceException;
-import java.util.Map;
-import java.util.concurrent.FutureTask;
-
-/**
- * {@link Response} implementation. When Runnbale is executed, it just hands the
- * request to Fiber and returns. When the Fiber finishes the execution, it sets
- * response in the {@link FutureTask}
- *
- * @author Jitendra Kotamraju
- */
-public final class AsyncResponseImpl<T> extends FutureTask<T> implements Response<T>, ResponseContextReceiver {
-
- /**
- * Optional {@link AsyncHandler} that gets invoked
- * at the completion of the task.
- */
- private final AsyncHandler<T> handler;
- private ResponseContext responseContext;
- private final Runnable callable;
- private Cancelable cancelable;
-
- /**
- *
- * @param runnable
- * This {@link Runnable} is executed asynchronously.
- * @param handler
- * Optional {@link AsyncHandler} to invoke at the end
- * of the processing. Can be null.
- */
- public AsyncResponseImpl(Runnable runnable, @Nullable AsyncHandler<T> handler) {
- super(runnable, null);
- this.callable = runnable;
- this.handler = handler;
- }
-
- @Override
- public void run() {
- // override so that AsyncInvoker calls set()
- // when Fiber calls the callback
- try {
- callable.run();
- } catch (WebServiceException e) {
- //it could be a WebServiceException or a ProtocolException or any RuntimeException
- // resulting due to some internal bug.
- set(null, e);
- } catch (Throwable e) {
- //its some other exception resulting from user error, wrap it in
- // WebServiceException
- set(null, new WebServiceException(e));
- }
- }
-
-
- public ResponseContext getContext() {
- return responseContext;
- }
-
- public void setResponseContext(ResponseContext rc) {
- responseContext = rc;
- }
-
- public void set(final T v, final Throwable t) {
- // call the handler before we mark the future as 'done'
- if (handler!=null) {
- try {
- /**
- * {@link Response} object passed into the callback.
- * We need a separate {@link java.util.concurrent.Future} because we don't want {@link ResponseImpl}
- * to be marked as 'done' before the callback finishes execution.
- * (That would provide implicit synchronization between the application code
- * in the main thread and the callback code, and is compatible with the JAX-RI 2.0 FCS.
- */
- class CallbackFuture<T> extends CompletedFuture<T> implements Response<T> {
- public CallbackFuture(T v, Throwable t) {
- super(v, t);
- }
-
- public Map<String, Object> getContext() {
- return AsyncResponseImpl.this.getContext();
- }
- }
- handler.handleResponse(new CallbackFuture<T>(v, t));
- } catch (Throwable e) {
- super.setException(e);
- return;
- }
- }
- if (t != null) {
- super.setException(t);
- } else {
- super.set(v);
- }
- }
-
- public void setCancelable(Cancelable cancelable) {
- this.cancelable = cancelable;
- }
-
- public boolean cancel(boolean mayInterruptIfRunning) {
- if (cancelable != null)
- cancelable.cancel(mayInterruptIfRunning);
- return super.cancel(mayInterruptIfRunning);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/BindingProviderProperties.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/BindingProviderProperties.java
deleted file mode 100644
index 76eece07..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/BindingProviderProperties.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-import com.sun.xml.internal.ws.developer.JAXWSProperties;
-
-public interface BindingProviderProperties extends JAXWSProperties{
-
- //legacy properties
- @Deprecated
- public static final String HOSTNAME_VERIFICATION_PROPERTY =
- "com.sun.xml.internal.ws.client.http.HostnameVerificationProperty";
- public static final String HTTP_COOKIE_JAR =
- "com.sun.xml.internal.ws.client.http.CookieJar";
-
- public static final String REDIRECT_REQUEST_PROPERTY =
- "com.sun.xml.internal.ws.client.http.RedirectRequestProperty";
- public static final String ONE_WAY_OPERATION =
- "com.sun.xml.internal.ws.server.OneWayOperation";
-
-
- //JAXWS 2.0
- public static final String JAXWS_HANDLER_CONFIG =
- "com.sun.xml.internal.ws.handler.config";
- public static final String JAXWS_CLIENT_HANDLE_PROPERTY =
- "com.sun.xml.internal.ws.client.handle";
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientContainer.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientContainer.java
deleted file mode 100644
index d2351db8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientContainer.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-import com.sun.xml.internal.ws.api.ResourceLoader;
-import com.sun.xml.internal.ws.api.server.Container;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-/**
- * @author Jitendra Kotamraju
- */
-final class ClientContainer extends Container {
-
- private final ResourceLoader loader = new ResourceLoader() {
- public URL getResource(String resource) throws MalformedURLException {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- if (cl == null) {
- cl = this.getClass().getClassLoader();
- }
- return cl.getResource("META-INF/"+resource);
- }
- };
-
- public <T> T getSPI(Class<T> spiType) {
- T t = super.getSPI(spiType);
- if (t != null)
- return t;
- if (spiType == ResourceLoader.class) {
- return spiType.cast(loader);
- }
- return null;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientSchemaValidationTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientSchemaValidationTube.java
deleted file mode 100644
index aef96b39..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientSchemaValidationTube.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.NextAction;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractTubeImpl;
-import com.sun.xml.internal.ws.api.server.SDDocument;
-import com.sun.xml.internal.ws.util.MetadataUtil;
-import com.sun.xml.internal.ws.util.pipe.AbstractSchemaValidationTube;
-import org.xml.sax.SAXException;
-
-import javax.xml.transform.Source;
-import javax.xml.validation.Schema;
-import javax.xml.validation.Validator;
-import javax.xml.ws.WebServiceException;
-import java.util.Map;
-import java.util.logging.Logger;
-
-/**
- * {@link Tube} that does the schema validation on the client side.
- *
- * @author Jitendra Kotamraju
- */
-public class ClientSchemaValidationTube extends AbstractSchemaValidationTube {
-
- private static final Logger LOGGER = Logger.getLogger(ClientSchemaValidationTube.class.getName());
-
- private final Schema schema;
- private final Validator validator;
- private final boolean noValidation;
- private final WSDLPort port;
-
- public ClientSchemaValidationTube(WSBinding binding, WSDLPort port, Tube next) {
- super(binding, next);
- this.port = port;
- if (port != null) {
- String primaryWsdl = port.getOwner().getParent().getLocation().getSystemId();
- MetadataResolverImpl mdresolver = new MetadataResolverImpl();
- Map<String, SDDocument> docs = MetadataUtil.getMetadataClosure(primaryWsdl, mdresolver, true);
- mdresolver = new MetadataResolverImpl(docs.values());
- Source[] sources = getSchemaSources(docs.values(), mdresolver);
- for(Source source : sources) {
- LOGGER.fine("Constructing client validation schema from = "+source.getSystemId());
- //printDOM((DOMSource)source);
- }
- if (sources.length != 0) {
- noValidation = false;
- sf.setResourceResolver(mdresolver);
- try {
- schema = sf.newSchema(sources);
- } catch(SAXException e) {
- throw new WebServiceException(e);
- }
- validator = schema.newValidator();
- return;
- }
- }
- noValidation = true;
- schema = null;
- validator = null;
- }
-
- protected Validator getValidator() {
- return validator;
- }
-
- protected boolean isNoValidation() {
- return noValidation;
- }
-
- protected ClientSchemaValidationTube(ClientSchemaValidationTube that, TubeCloner cloner) {
- super(that,cloner);
- this.port = that.port;
- this.schema = that.schema;
- this.validator = schema.newValidator();
- this.noValidation = that.noValidation;
- }
-
- public AbstractTubeImpl copy(TubeCloner cloner) {
- return new ClientSchemaValidationTube(this,cloner);
- }
-
- @Override
- public NextAction processRequest(Packet request) {
- if (isNoValidation() || !feature.isOutbound() || !request.getMessage().hasPayload() || request.getMessage().isFault()) {
- return super.processRequest(request);
- }
- try {
- doProcess(request);
- } catch(SAXException se) {
- throw new WebServiceException(se);
- }
- return super.processRequest(request);
- }
-
- @Override
- public NextAction processResponse(Packet response) {
- if (isNoValidation() || !feature.isInbound() || response.getMessage() == null || !response.getMessage().hasPayload() || response.getMessage().isFault()) {
- return super.processResponse(response);
- }
- try {
- doProcess(response);
- } catch(SAXException se) {
- throw new WebServiceException(se);
- }
- return super.processResponse(response);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientTransportException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientTransportException.java
deleted file mode 100644
index 07272ff4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientTransportException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-
-/**
- * @author WS Development Team
- */
-public class ClientTransportException extends JAXWSExceptionBase {
- public ClientTransportException(Localizable msg) {
- super(msg);
- }
-
- public ClientTransportException(Localizable msg, Throwable cause) {
- super(msg, cause);
- }
-
- public ClientTransportException(Throwable throwable) {
- super(throwable);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.client";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ContentNegotiation.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ContentNegotiation.java
deleted file mode 100644
index 07cc3b67..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ContentNegotiation.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-/**
- * Content negotiation enum.
- * <p>
- * A value of {@link #none} means no content negotation at level of the
- * client transport will be performed to negotiate the encoding of XML infoset.
- * The default encoding will always be used.
- * <p>
- * A value of {@link #pessimistic} means the client transport will assume
- * the default encoding of XML infoset for an outbound message unless informed
- * otherwise by a previously received inbound message.
- * (The client transport initially and pessimistically assumes that a service
- * does not support anything other than the default encoding of XML infoset.)
- * <p>
- * A value of {@link #optimistic} means the client transport will assume
- * a non-default encoding of XML infoset for an outbound message.
- * (The client transport optimistically assumes that a service
- * supports the non-default encoding of XML infoset.)
- *
- * @author Paul.Sandoz@Sun.Com
- */
-public enum ContentNegotiation {
- none,
- pessimistic,
- optimistic;
-
- /**
- * Property name for content negotiation on {@link RequestContext}.
- */
- public static final String PROPERTY = "com.sun.xml.internal.ws.client.ContentNegotiation";
-
- /**
- * Obtain the content negotiation value from a system property.
- * <p>
- * This method will never throw a runtime exception.
- *
- * @return the content negotiation value.
- */
- public static ContentNegotiation obtainFromSystemProperty() {
- try {
- String value = System.getProperty(PROPERTY);
-
- if (value == null) {
- return none;
- }
-
- return valueOf(value);
- } catch (Exception e) {
- // Default to none for any unrecognized value or any other
- // runtime exception thrown
- return none;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfiguration.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfiguration.java
deleted file mode 100644
index c861ca18..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfiguration.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.client;
-
-import com.sun.xml.internal.ws.api.handler.MessageHandler;
-import com.sun.xml.internal.ws.handler.HandlerException;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.handler.LogicalHandler;
-import javax.xml.ws.handler.soap.SOAPHandler;
-import java.util.*;
-
-/**
- * This class holds the handler information and roles on the Binding (mutable info in the binding).
- *
- * HandlerConfiguration is immutable, and a new object is created when the BindingImpl is created or User calls
- * Binding.setHandlerChain() or SOAPBinding.setRoles().
- *
- * During invocation in Stub.process(), snapshot of the handler configuration is set in Packet.handlerConfig. The
- * information in the HandlerConfiguration is used by MUPipe and HandlerTube implementations.
- *
- * @author Rama Pulavarthi
- */
-public class HandlerConfiguration {
- private final Set<String> roles;
- /**
- * This chain may contain both soap and logical handlers.
- */
- private final List<Handler> handlerChain;
- private final List<LogicalHandler> logicalHandlers;
- private final List<SOAPHandler> soapHandlers;
- private final List<MessageHandler> messageHandlers;
- private final Set<QName> handlerKnownHeaders;
-
- /**
- * @param roles This contains the roles assumed by the Binding implementation.
- * @param handlerChain This contains the handler chain set on the Binding
- */
- public HandlerConfiguration(Set<String> roles, List<Handler> handlerChain) {
- this.roles = roles;
- this.handlerChain = handlerChain;
- logicalHandlers = new ArrayList<LogicalHandler>();
- soapHandlers = new ArrayList<SOAPHandler>();
- messageHandlers = new ArrayList<MessageHandler>();
- Set<QName> modHandlerKnownHeaders = new HashSet<QName>();
-
- for (Handler handler : handlerChain) {
- if (handler instanceof LogicalHandler) {
- logicalHandlers.add((LogicalHandler) handler);
- } else if (handler instanceof SOAPHandler) {
- soapHandlers.add((SOAPHandler) handler);
- Set<QName> headers = ((SOAPHandler<?>) handler).getHeaders();
- if (headers != null) {
- modHandlerKnownHeaders.addAll(headers);
- }
- } else if (handler instanceof MessageHandler) {
- messageHandlers.add((MessageHandler) handler);
- Set<QName> headers = ((MessageHandler<?>) handler).getHeaders();
- if (headers != null) {
- modHandlerKnownHeaders.addAll(headers);
- }
- }else {
- throw new HandlerException("handler.not.valid.type",
- handler.getClass());
- }
- }
-
- handlerKnownHeaders = Collections.unmodifiableSet(modHandlerKnownHeaders);
- }
-
- /**
- * This is called when roles as reset on binding using SOAPBinding#setRoles(), to save reparsing the handlers again.
- * @param roles
- * @param oldConfig
- */
- public HandlerConfiguration(Set<String> roles, HandlerConfiguration oldConfig) {
- this.roles = roles;
- this.handlerChain = oldConfig.handlerChain;
- this.logicalHandlers = oldConfig.logicalHandlers;
- this.soapHandlers = oldConfig.soapHandlers;
- this.messageHandlers = oldConfig.messageHandlers;
- this.handlerKnownHeaders = oldConfig.handlerKnownHeaders;
- }
-
- public Set<String> getRoles() {
- return roles;
- }
-
- /**
- *
- * @return return a copy of handler chain
- */
- public List<Handler> getHandlerChain() {
- if(handlerChain == null)
- return Collections.emptyList();
- return new ArrayList<Handler>(handlerChain);
-
- }
-
- public List<LogicalHandler> getLogicalHandlers() {
- return logicalHandlers;
- }
-
- public List<SOAPHandler> getSoapHandlers() {
- return soapHandlers;
- }
-
- public List<MessageHandler> getMessageHandlers() {
- return messageHandlers;
- }
-
- public Set<QName> getHandlerKnownHeaders() {
- return handlerKnownHeaders;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfigurator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfigurator.java
deleted file mode 100644
index fbefb94d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfigurator.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.handler.HandlerChainsModel;
-import com.sun.xml.internal.ws.util.HandlerAnnotationInfo;
-import com.sun.xml.internal.ws.util.HandlerAnnotationProcessor;
-
-import javax.jws.HandlerChain;
-import javax.xml.ws.Service;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.handler.HandlerResolver;
-import javax.xml.ws.handler.PortInfo;
-import javax.xml.ws.soap.SOAPBinding;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Used by {@link WSServiceDelegate} to configure {@link BindingImpl}
- * with handlers. The two mechanisms encapsulated by this abstraction
- * is {@link HandlerChain} annotaion and {@link HandlerResolver}
- * interface.
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class HandlerConfigurator {
- /**
- * Configures the given {@link BindingImpl} object by adding handlers to it.
- */
- abstract void configureHandlers(@NotNull WSPortInfo port, @NotNull BindingImpl binding);
-
- /**
- * Returns a {@link HandlerResolver}, if this object encapsulates any {@link HandlerResolver}.
- * Otherwise null.
- */
- abstract HandlerResolver getResolver();
-
-
- /**
- * Configures handlers by calling {@link HandlerResolver}.
- * <p>
- * When a null {@link HandlerResolver} is set by the user to
- * {@link Service#setHandlerResolver(HandlerResolver)}, we'll use this object
- * with null {@link #resolver}.
- */
- static final class HandlerResolverImpl extends HandlerConfigurator {
- private final @Nullable HandlerResolver resolver;
-
- public HandlerResolverImpl(HandlerResolver resolver) {
- this.resolver = resolver;
- }
-
- @Override
- void configureHandlers(@NotNull WSPortInfo port, @NotNull BindingImpl binding) {
- if (resolver!=null) {
- binding.setHandlerChain(resolver.getHandlerChain(port));
- }
- }
-
-
- @Override
- HandlerResolver getResolver() {
- return resolver;
- }
- }
-
- /**
- * Configures handlers from {@link HandlerChain} annotation.
- *
- * <p>
- * This class is a simple
- * map of PortInfo objects to handler chains. It is used by a
- * {@link WSServiceDelegate} object, and can
- * be replaced by user code with a different class implementing
- * HandlerResolver. This class is only used on the client side, and
- * it includes a lot of logging to help when there are issues since
- * it deals with port names, service names, and bindings. All three
- * must match when getting a handler chain from the map.
- *
- * <p>It is created by the {@link WSServiceDelegate}
- * class , which uses {@link HandlerAnnotationProcessor} to create
- * a handler chain and then it sets the chains on this class and they
- * are put into the map. The ServiceContext uses the map to set handler
- * chains on bindings when they are created.
- */
- static final class AnnotationConfigurator extends HandlerConfigurator {
- private final HandlerChainsModel handlerModel;
- private final Map<WSPortInfo,HandlerAnnotationInfo> chainMap = new HashMap<WSPortInfo,HandlerAnnotationInfo>();
- private static final Logger logger = Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".handler");
-
- AnnotationConfigurator(WSServiceDelegate delegate) {
- handlerModel = HandlerAnnotationProcessor.buildHandlerChainsModel(delegate.getServiceClass());
- assert handlerModel!=null; // this class is suppeod to be called only when there's @HandlerCHain
- }
-
-
- void configureHandlers(WSPortInfo port, BindingImpl binding) {
- //Check in cache first
- HandlerAnnotationInfo chain = chainMap.get(port);
-
- if(chain==null) {
- logGetChain(port);
- // Put it in cache
- chain = handlerModel.getHandlersForPortInfo(port);
- chainMap.put(port,chain);
- }
-
- if (binding instanceof SOAPBinding) {
- ((SOAPBinding) binding).setRoles(chain.getRoles());
- }
-
- logSetChain(port,chain);
- binding.setHandlerChain(chain.getHandlers());
- }
-
- HandlerResolver getResolver() {
- return new HandlerResolver() {
- public List<Handler> getHandlerChain(PortInfo portInfo) {
- return new ArrayList<Handler>(
- handlerModel.getHandlersForPortInfo(portInfo).getHandlers());
- }
- };
- }
- // logged at finer level
- private void logSetChain(WSPortInfo info, HandlerAnnotationInfo chain) {
- logger.finer("Setting chain of length " + chain.getHandlers().size() +
- " for port info");
- logPortInfo(info, Level.FINER);
- }
-
- // logged at fine level
- private void logGetChain(WSPortInfo info) {
- logger.fine("No handler chain found for port info:");
- logPortInfo(info, Level.FINE);
- logger.fine("Existing handler chains:");
- if (chainMap.isEmpty()) {
- logger.fine("none");
- } else {
- for (WSPortInfo key : chainMap.keySet()) {
- logger.fine(chainMap.get(key).getHandlers().size() +
- " handlers for port info ");
- logPortInfo(key, Level.FINE);
- }
- }
- }
-
- private void logPortInfo(WSPortInfo info, Level level) {
- logger.log(level, "binding: " + info.getBindingID() +
- "\nservice: " + info.getServiceName() +
- "\nport: " + info.getPortName());
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/MonitorRootClient.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/MonitorRootClient.java
deleted file mode 100644
index 72fd1bb1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/MonitorRootClient.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.client;
-
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLService;
-import com.sun.xml.internal.ws.api.server.Container;
-
-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;
-
-/**
- * @author Harold Carr
- */
-@ManagedObject
-@Description("Metro Web Service client")
-@AMXMetadata(type="WSClient")
-public final class MonitorRootClient extends com.sun.xml.internal.ws.server.MonitorBase {
-
- private final Stub stub;
-
- MonitorRootClient(final Stub stub) {
- this.stub = stub;
- }
-
- /*
- private static final Logger logger = Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".client.stub");
- */
-
- //
- // From WSServiceDelegate
- //
-
- @ManagedAttribute
- private Container getContainer() { return stub.owner.getContainer(); }
-
- @ManagedAttribute
- private Map<QName, PortInfo> qnameToPortInfoMap() { return stub.owner.getQNameToPortInfoMap(); }
-
- @ManagedAttribute
- private QName serviceName() { return stub.owner.getServiceName(); }
-
- @ManagedAttribute
- private Class serviceClass() { return stub.owner.getServiceClass(); }
-
- @ManagedAttribute
- private URL wsdlDocumentLocation() { return stub.owner.getWSDLDocumentLocation(); }
-
- @ManagedAttribute
- private WSDLService wsdlService() { return stub.owner.getWsdlService(); }
-
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java
deleted file mode 100644
index 39be8d86..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.client;
-
-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.EndpointAddress;
-import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.api.policy.PolicyResolverFactory;
-import com.sun.xml.internal.ws.api.policy.PolicyResolver;
-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.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.jaxws.PolicyUtil;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * Information about a port.
- * <p/>
- * This object is owned by {@link WSServiceDelegate} to keep track of a port,
- * since a port maybe added dynamically.
- *
- * @author JAXWS Development Team
- */
-public class PortInfo implements WSPortInfo {
- private final @NotNull WSServiceDelegate owner;
-
- public final @NotNull QName portName;
- public final @NotNull EndpointAddress targetEndpoint;
- public final @NotNull BindingID bindingId;
-
- public final @NotNull PolicyMap policyMap;
- /**
- * If a port is known statically to a WSDL, {@link PortInfo} may
- * have the corresponding WSDL model. This would occur when the
- * service was created with the WSDL location and the port is defined
- * in the WSDL.
- * <p/>
- * If this is a {@link SEIPortInfo}, then this is always non-null.
- */
- public final @Nullable WSDLPort portModel;
-
- public PortInfo(WSServiceDelegate owner, EndpointAddress targetEndpoint, QName name, BindingID bindingId) {
- this.owner = owner;
- this.targetEndpoint = targetEndpoint;
- this.portName = name;
- this.bindingId = bindingId;
- this.portModel = getPortModel(owner, name);
- this.policyMap = createPolicyMap();
-
- }
-
- public PortInfo(@NotNull WSServiceDelegate owner, @NotNull WSDLPort port) {
- this.owner = owner;
- this.targetEndpoint = port.getAddress();
- this.portName = port.getName();
- this.bindingId = port.getBinding().getBindingId();
- this.portModel = port;
- this.policyMap = createPolicyMap();
- }
-
- public PolicyMap getPolicyMap() {
- return policyMap;
- }
-
- public PolicyMap createPolicyMap() {
- PolicyMap map;
- if(portModel != null) {
- map = portModel.getOwner().getParent().getPolicyMap();
- } else {
- map = PolicyResolverFactory.create().resolve(new PolicyResolver.ClientContext(null,owner.getContainer()));
- }
- //still map is null, create a empty map
- if(map == null)
- map = PolicyMap.createPolicyMap(null);
- return map;
- }
- /**
- * Creates {@link BindingImpl} for this {@link PortInfo}.
- *
- * @param webServiceFeatures
- * User-specified features.
- * @param portInterface
- * Null if this is for dispatch. Otherwise the interface the proxy is going to implement
- * @return
- * The initialized BindingImpl
- */
- public BindingImpl createBinding(WebServiceFeature[] webServiceFeatures, Class<?> portInterface) {
- return createBinding(new WebServiceFeatureList(webServiceFeatures), portInterface, null);
- }
-
- public BindingImpl createBinding(WebServiceFeatureList webServiceFeatures, Class<?> portInterface,
- BindingImpl existingBinding) {
- if (existingBinding != null) {
- webServiceFeatures.addAll(existingBinding.getFeatures());
- }
-
- Iterable<WebServiceFeature> configFeatures;
- //TODO incase of Dispatch, provide a way to User for complete control of the message processing by giving
- // ability to turn off the WSDL/Policy based features and its associated tubes.
-
- //Even in case of Dispatch, merge all features configured via WSDL/Policy or deployment configuration
- if (portModel != null) {
- // could have merged features from this.policyMap, but some features are set in WSDLModel which are not there in PolicyMap
- // for ex: <wsaw:UsingAddressing> wsdl extn., and since the policyMap features are merged into WSDLModel anyway during postFinished(),
- // So, using here WsdlModel for merging is right.
-
- // merge features from WSDL
- configFeatures = portModel.getFeatures();
- } else {
- configFeatures = PolicyUtil.getPortScopedFeatures(policyMap, owner.getServiceName(),portName);
- }
- webServiceFeatures.mergeFeatures(configFeatures, false);
-
- // merge features from interceptor
- webServiceFeatures.mergeFeatures(owner.serviceInterceptor.preCreateBinding(this, portInterface, webServiceFeatures), false);
-
- BindingImpl bindingImpl = BindingImpl.create(bindingId, webServiceFeatures.toArray());
- owner.getHandlerConfigurator().configureHandlers(this,bindingImpl);
- return bindingImpl;
- }
-
- //This method is used for Dispatch client only
- private WSDLPort getPortModel(WSServiceDelegate owner, QName portName) {
-
- if (owner.getWsdlService() != null){
- Iterable<? extends WSDLPort> ports = owner.getWsdlService().getPorts();
- for (WSDLPort port : ports){
- if (port.getName().equals(portName))
- return port;
- }
- }
- return null;
- }
-
-//
-// implementation of API PortInfo interface
-//
-
- @Nullable
- public WSDLPort getPort() {
- return portModel;
- }
-
- @NotNull
- public WSService getOwner() {
- return owner;
- }
-
- @NotNull
- public BindingID getBindingId() {
- return bindingId;
- }
-
- @NotNull
- public EndpointAddress getEndpointAddress() {
- return targetEndpoint;
- }
-
- /**
- * @deprecated
- * Only meant to be used via {@link javax.xml.ws.handler.PortInfo}.
- * Use {@link WSServiceDelegate#getServiceName()}.
- */
- public QName getServiceName() {
- return owner.getServiceName();
- }
-
- /**
- * Only meant to be used via {@link javax.xml.ws.handler.PortInfo}.
- * Use {@link #portName}.
- */
- public QName getPortName() {
- return portName;
- }
-
- /**
- * @deprecated
- * Only meant to be used via {@link javax.xml.ws.handler.PortInfo}.
- * Use {@link #bindingId}.
- */
- public String getBindingID() {
- return bindingId.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/RequestContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/RequestContext.java
deleted file mode 100644
index 1ad271d1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/RequestContext.java
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-import com.oracle.webservices.internal.api.message.BaseDistributedPropertySet;
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.transport.Headers;
-
-import javax.xml.ws.BindingProvider;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.logging.Logger;
-
-
-import static javax.xml.ws.BindingProvider.*;
-import static javax.xml.ws.handler.MessageContext.HTTP_REQUEST_HEADERS;
-
-/**
- * Request context implementation.
- *
- * <h2>Why a custom map?</h2>
- * <p>
- * The JAX-WS spec exposes properties as a {@link Map}, but if we just use
- * an ordinary {@link HashMap} for this, it doesn't work as fast as we'd like
- * it to be. Hence we have this class.
- *
- * <p>
- * We expect the user to set a few properties and then use that same
- * setting to make a bunch of invocations. So we'd like to take some hit
- * when the user actually sets a property to do some computation,
- * then use that computed value during a method invocation again and again.
- *
- * <p>
- * For this goal, we use {@link com.sun.xml.internal.ws.api.PropertySet} and implement some properties
- * as virtual properties backed by methods. This allows us to do the computation
- * in the setter, and store it in a field.
- *
- * <p>
- * These fields are used by {@link Stub#process} to populate a {@link Packet}.
- *
- * <h2>How it works?</h2>
- * <p>
- * For better performance, we wan't use strongly typed field as much as possible
- * to avoid reflection and unnecessary collection iterations;
- *
- * Using {@link com.oracle.webservices.internal.api.message.BasePropertySet.MapView} implementation allows client to use {@link Map} interface
- * in a way that all the strongly typed properties are reflected to the fields
- * right away. Any additional (extending) properties can be added by client as well;
- * those would be processed using iterating the {@link MapView} and their processing,
- * of course, would be slower.
- * <p>
- * The previous implementation with fallback mode has been removed to simplify
- * the code and remove the bugs.
- *
- * @author Kohsuke Kawaguchi
- */
-@SuppressWarnings({"SuspiciousMethodCalls"})
-public final class RequestContext extends BaseDistributedPropertySet {
- private static final Logger LOGGER = Logger.getLogger(RequestContext.class.getName());
-
- /**
- * The default value to be use for {@link #contentNegotiation} obtained
- * from a system property.
- * <p>
- * This enables content negotiation to be easily switched on by setting
- * a system property on the command line for testing purposes tests.
- */
- private static ContentNegotiation defaultContentNegotiation =
- ContentNegotiation.obtainFromSystemProperty();
-
- /**
- * @deprecated
- */
- public void addSatellite(@NotNull com.sun.xml.internal.ws.api.PropertySet satellite) {
- super.addSatellite(satellite);
- }
-
- /**
- * The endpoint address to which this message is sent to.
- *
- * <p>
- * This is the actual data store for {@link BindingProvider#ENDPOINT_ADDRESS_PROPERTY}.
- */
- private @NotNull EndpointAddress endpointAddress;
-
- /**
- * Creates {@link BindingProvider#ENDPOINT_ADDRESS_PROPERTY} view
- * on top of {@link #endpointAddress}.
- *
- * @deprecated
- * always access {@link #endpointAddress}.
- */
- @Property(ENDPOINT_ADDRESS_PROPERTY)
- public String getEndPointAddressString() {
- return endpointAddress != null ? endpointAddress.toString() : null;
- }
-
- public void setEndPointAddressString(String s) {
- if (s == null) {
- throw new IllegalArgumentException();
- } else {
- this.endpointAddress = EndpointAddress.create(s);
- }
- }
-
- public void setEndpointAddress(@NotNull EndpointAddress epa) {
- this.endpointAddress = epa;
- }
-
- public @NotNull EndpointAddress getEndpointAddress() {
- return endpointAddress;
- }
-
- /**
- * The value of {@link ContentNegotiation#PROPERTY}
- * property.
- */
- public ContentNegotiation contentNegotiation = defaultContentNegotiation;
-
- @Property(ContentNegotiation.PROPERTY)
- public String getContentNegotiationString() {
- return contentNegotiation.toString();
- }
-
- public void setContentNegotiationString(String s) {
- if (s == null) {
- contentNegotiation = ContentNegotiation.none;
- } else {
- try {
- contentNegotiation = ContentNegotiation.valueOf(s);
- } catch (IllegalArgumentException e) {
- // If the value is not recognized default to none
- contentNegotiation = ContentNegotiation.none;
- }
- }
- }
-
- /**
- * The value of the SOAPAction header associated with the message.
- *
- * <p>
- * For outgoing messages, the transport may sends out this value.
- * If this field is null, the transport may choose to send <tt>""</tt>
- * (quoted empty string.)
- *
- * For incoming messages, the transport will set this field.
- * If the incoming message did not contain the SOAPAction header,
- * the transport sets this field to null.
- *
- * <p>
- * If the value is non-null, it must be always in the quoted form.
- * The value can be null.
- *
- * <p>
- * Note that the way the transport sends this value out depends on
- * transport and SOAP version.
- *
- * For HTTP transport and SOAP 1.1, BP requires that SOAPAction
- * header is present (See {@BP R2744} and {@BP R2745}.) For SOAP 1.2,
- * this is moved to the parameter of the "application/soap+xml".
- */
-
- private String soapAction;
-
- @Property(SOAPACTION_URI_PROPERTY)
- public String getSoapAction() {
- return soapAction;
- }
-
- public void setSoapAction(String sAction) {
- soapAction = sAction;
- }
-
- /**
- * This controls whether BindingProvider.SOAPACTION_URI_PROPERTY is used.
- * See BindingProvider.SOAPACTION_USE_PROPERTY for details.
- *
- * This only control whether value of BindingProvider.SOAPACTION_URI_PROPERTY is used or not and not
- * if it can be sent if it can be obtained by other means such as WSDL binding
- */
- private Boolean soapActionUse;
-
- @Property(SOAPACTION_USE_PROPERTY)
- public Boolean getSoapActionUse() {
- return soapActionUse;
- }
-
- public void setSoapActionUse(Boolean sActionUse) {
- soapActionUse = sActionUse;
- }
-
- /**
- * Creates an empty {@link RequestContext}.
- */
- RequestContext() {
- }
-
- /**
- * Copy constructor.
- */
- private RequestContext(RequestContext that) {
- for (Map.Entry<String, Object> entry : that.asMapLocal().entrySet()) {
- if (!propMap.containsKey(entry.getKey())) {
- asMap().put(entry.getKey(), entry.getValue());
- }
- }
- endpointAddress = that.endpointAddress;
- soapAction = that.soapAction;
- soapActionUse = that.soapActionUse;
- contentNegotiation = that.contentNegotiation;
- that.copySatelliteInto(this);
- }
-
- /**
- * The efficient get method that reads from {@link RequestContext}.
- */
- @Override
- public Object get(Object key) {
- if(supports(key)) {
- return super.get(key);
- } else {
- // use mapView to get extending property
- return asMap().get(key);
- }
- }
-
- /**
- * The efficient put method that updates {@link RequestContext}.
- */
- @Override
- public Object put(String key, Object value) {
-
- if(supports(key)) {
- return super.put(key,value);
- } else {
- // use mapView to put extending property (if the map allows that)
- return asMap().put(key, value);
- }
- }
-
- /**
- * Fill a {@link Packet} with values of this {@link RequestContext}.
- *
- * @param packet to be filled with context values
- * @param isAddressingEnabled flag if addressing enabled (to provide warning if necessary)
- */
- @SuppressWarnings("unchecked")
- public void fill(Packet packet, boolean isAddressingEnabled) {
-
- // handling as many properties as possible (all in propMap.keySet())
- // to avoid slow Packet.put()
- if (endpointAddress != null) {
- packet.endpointAddress = endpointAddress;
- }
- packet.contentNegotiation = contentNegotiation;
- fillSOAPAction(packet, isAddressingEnabled);
- mergeRequestHeaders(packet);
-
- Set<String> handlerScopeNames = new HashSet<String>();
-
- copySatelliteInto(packet);
-
- // extending properties ...
- for (String key : asMapLocal().keySet()) {
-
- //if it is not standard property it defaults to Scope.HANDLER
- if (!supportsLocal(key)) {
- handlerScopeNames.add(key);
- }
-
- // to avoid slow Packet.put(), handle as small number of props as possible
- // => only properties not from RequestContext object
- if (!propMap.containsKey(key)) {
- Object value = asMapLocal().get(key);
- if (packet.supports(key)) {
- // very slow operation - try to avoid it!
- packet.put(key, value);
- } else {
- packet.invocationProperties.put(key, value);
- }
- }
- }
-
- if (!handlerScopeNames.isEmpty()) {
- packet.getHandlerScopePropertyNames(false).addAll(handlerScopeNames);
- }
- }
-
- @SuppressWarnings("unchecked")
- private void mergeRequestHeaders(Packet packet) {
- //for bug 12883765
- //retrieve headers which is set in soap message
- Headers packetHeaders = (Headers) packet.invocationProperties.get(HTTP_REQUEST_HEADERS);
- //retrieve headers from request context
- Map<String, List<String>> myHeaders = (Map<String, List<String>>) asMap().get(HTTP_REQUEST_HEADERS);
- if ((packetHeaders != null) && (myHeaders != null)) {
- //update the headers set in soap message with those in request context
- for (Entry<String, List<String>> entry : myHeaders.entrySet()) {
- String key = entry.getKey();
- if (key != null && key.trim().length() != 0) {
- List<String> listFromPacket = packetHeaders.get(key);
- //if the two headers contain the same key, combine the value
- if (listFromPacket != null) {
- listFromPacket.addAll(entry.getValue());
- } else {
- //add the headers in request context to those set in soap message
- packetHeaders.put(key, myHeaders.get(key));
- }
- }
- }
- // update headers in request context with those set in soap message since it may contain other properties..
- asMap().put(HTTP_REQUEST_HEADERS, packetHeaders);
- }
- }
-
- private void fillSOAPAction(Packet packet, boolean isAddressingEnabled) {
- final boolean p = packet.packetTakesPriorityOverRequestContext;
- final String localSoapAction = p ? packet.soapAction : soapAction;
- final Boolean localSoapActionUse = p ? (Boolean) packet.invocationProperties.get(BindingProvider.SOAPACTION_USE_PROPERTY)
- : soapActionUse;
-
- //JAX-WS-596: Check the semantics of SOAPACTION_USE_PROPERTY before using the SOAPACTION_URI_PROPERTY for
- // SoapAction as specified in the javadoc of BindingProvider. The spec seems to be little contradicting with
- // javadoc and says that the use property effects the sending of SOAPAction property.
- // Since the user has the capability to set the value as "" if needed, implement the javadoc behavior.
- if ((localSoapActionUse != null && localSoapActionUse) || (localSoapActionUse == null && isAddressingEnabled)) {
- if (localSoapAction != null) {
- packet.soapAction = localSoapAction;
- }
- }
-
- if ((!isAddressingEnabled && (localSoapActionUse == null || !localSoapActionUse)) && localSoapAction != null) {
- LOGGER.warning("BindingProvider.SOAPACTION_URI_PROPERTY is set in the RequestContext but is ineffective," +
- " Either set BindingProvider.SOAPACTION_USE_PROPERTY to true or enable AddressingFeature");
- }
- }
-
- public RequestContext copy() {
- return new RequestContext(this);
- }
-
- @Override
- protected PropertyMap getPropertyMap() {
- return propMap;
- }
-
- private static final PropertyMap propMap = parse(RequestContext.class);
-
- @Override
- protected boolean mapAllowsAdditionalProperties() {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContext.java
deleted file mode 100644
index efd93200..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContext.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Attachment;
-
-import javax.xml.ws.handler.MessageContext;
-import javax.activation.DataHandler;
-import java.util.AbstractMap;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Implements "response context" on top of {@link Packet}.
- *
- * <p>
- * This class creates a read-only {@link Map} view that
- * gets exposed to client applications after an invocation
- * is complete.
- *
- * <p>
- * The design goal of this class is to make it efficient
- * to create a new {@link ResponseContext}, at the expense
- * of making some {@link Map} operations slower. This is
- * justified because the response context is mostly just
- * used to query a few known values, and operations like
- * enumeration isn't likely.
- *
- * <p>
- * Some of the {@link Map} methods requre this class to
- * build the complete {@link Set} of properties, but we
- * try to avoid that as much as possible.
- *
- *
- * <pre>
- * TODO: are we exposing all strongly-typed fields, or
- * do they have appliation/handler scope notion?
- * </pre>
- *
- * @author Kohsuke Kawaguchi
- */
-@SuppressWarnings({"SuspiciousMethodCalls"}) // IDE doesn't like me calling Map methods with key typed as Object
-public class ResponseContext extends AbstractMap<String,Object> {
- private final Packet packet;
-
- /**
- * Lazily computed.
- */
- private Set<Map.Entry<String,Object>> entrySet;
-
- /**
- * @param packet
- * The {@link Packet} to wrap.
- */
- public ResponseContext(Packet packet) {
- this.packet = packet;
- }
-
- public boolean containsKey(Object key) {
- if(packet.supports(key))
- return packet.containsKey(key); // strongly typed
-
- if(packet.invocationProperties.containsKey(key))
- // if handler-scope, hide it
- return !packet.getHandlerScopePropertyNames(true).contains(key);
-
- return false;
- }
-
- public Object get(Object key) {
- if(packet.supports(key))
- return packet.get(key); // strongly typed
-
- if(packet.getHandlerScopePropertyNames(true).contains(key))
- return null; // no such application-scope property
-
- Object value = packet.invocationProperties.get(key);
-
- //add the attachments from the Message to the corresponding attachment property
- if(key.equals(MessageContext.INBOUND_MESSAGE_ATTACHMENTS)){
- Map<String, DataHandler> atts = (Map<String, DataHandler>) value;
- if(atts == null)
- atts = new HashMap<String, DataHandler>();
- AttachmentSet attSet = packet.getMessage().getAttachments();
- for(Attachment att : attSet){
- atts.put(att.getContentId(), att.asDataHandler());
- }
- return atts;
- }
- return value;
- }
-
- public Object put(String key, Object value) {
- // response context is read-only
- throw new UnsupportedOperationException();
- }
-
- public Object remove(Object key) {
- // response context is read-only
- throw new UnsupportedOperationException();
- }
-
- public void putAll(Map<? extends String, ? extends Object> t) {
- // response context is read-only
- throw new UnsupportedOperationException();
- }
-
- public void clear() {
- // response context is read-only
- throw new UnsupportedOperationException();
- }
-
- public Set<Entry<String, Object>> entrySet() {
- if(entrySet==null) {
- // this is where the worst case happens. we have to clone the whole properties
- // to get this view.
-
- // use TreeSet so that toString() sort them nicely. It's easier for apps.
- Map<String,Object> r = new HashMap<String,Object>();
-
- // export application-scope properties
- r.putAll(packet.invocationProperties);
-
- // hide handler-scope properties
- r.keySet().removeAll(packet.getHandlerScopePropertyNames(true));
-
- // and all strongly typed ones
- r.putAll(packet.createMapView());
-
- entrySet = Collections.unmodifiableSet(r.entrySet());
- }
-
- return entrySet;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContextReceiver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContextReceiver.java
deleted file mode 100644
index 16f481f8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContextReceiver.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-/**
- * Receives {@link ResponseContext} at the end of
- * the message invocation.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface ResponseContextReceiver {
- /**
- * Called upon the completion of the invocation
- * to set a {@link ResponseContext}.
- *
- * <p>
- * This method is invoked even when the invocation fails.
- */
- void setResponseContext(ResponseContext rc);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SCAnnotations.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SCAnnotations.java
deleted file mode 100644
index 5592d5ad..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SCAnnotations.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-import com.sun.xml.internal.ws.util.JAXWSUtils;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebEndpoint;
-import javax.xml.ws.WebServiceClient;
-import javax.xml.ws.WebServiceException;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-
-/**
- * Represents parsed {@link WebServiceClient} and {@link WebEndpoint}
- * annotations on a {@link Service}-derived class.
- *
- * @author Kohsuke Kawaguchi
- */
-final class SCAnnotations {
- SCAnnotations(final Class<?> sc) {
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
- @Override
- public Void run() {
- WebServiceClient wsc =sc.getAnnotation(WebServiceClient.class);
- if(wsc==null) {
- throw new WebServiceException("Service Interface Annotations required, exiting...");
- }
-
- String tns = wsc.targetNamespace();
- try {
- JAXWSUtils.getFileOrURL(wsc.wsdlLocation());
- } catch (IOException e) {
- // TODO: report a reasonable error message
- throw new WebServiceException(e);
- }
-
- for (Method method : sc.getDeclaredMethods()) {
- WebEndpoint webEndpoint = method.getAnnotation(WebEndpoint.class);
- if (webEndpoint != null) {
- String endpointName = webEndpoint.name();
- QName portQName = new QName(tns, endpointName);
- portQNames.add(portQName);
- }
- Class<?> seiClazz = method.getReturnType();
- if (seiClazz!=void.class) {
- classes.add(seiClazz);
- }
- }
-
- return null;
- }
- });
- }
-
- final ArrayList<QName> portQNames = new ArrayList<QName>();
- final ArrayList<Class> classes = new ArrayList<Class>();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SEIPortInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SEIPortInfo.java
deleted file mode 100644
index 1cba1a11..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SEIPortInfo.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.client;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-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.SOAPBindingImpl;
-import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
-import com.sun.xml.internal.ws.model.SOAPSEIModel;
-
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * {@link PortInfo} that has {@link SEIModel}.
- *
- * This object is created statically when {@link WSServiceDelegate} is created
- * with an service interface.
- *
- * NOTE: Made this class public so that Dispatch instances derived from a
- * 'parent' SEI-based port instance (generally for sending protocol
- * messages or request retries) can still know what the parent's SEI was.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class SEIPortInfo extends PortInfo {
-
- public final Class sei;
-
- /**
- * Model of {@link #sei}.
- */
- public final SOAPSEIModel model;
-
- public SEIPortInfo(WSServiceDelegate owner, Class sei, SOAPSEIModel model, @NotNull WSDLPort portModel) {
- super(owner, portModel);
- this.sei = sei;
- this.model = model;
- assert sei != null && model != null;
- }
-
- @Override
- public BindingImpl createBinding(WebServiceFeature[] webServiceFeatures, Class<?> portInterface) {
- BindingImpl binding = super.createBinding(webServiceFeatures, portInterface);
- return setKnownHeaders(binding);
- }
-
- public BindingImpl createBinding(WebServiceFeatureList webServiceFeatures, Class<?> portInterface) {
- // not to pass in (BindingImpl) model.getWSBinding()
- BindingImpl binding = super.createBinding(webServiceFeatures, portInterface, null);
- return setKnownHeaders(binding);
- }
-
- private BindingImpl setKnownHeaders(BindingImpl binding) {
- if (binding instanceof SOAPBindingImpl) {
- ((SOAPBindingImpl) binding).setPortKnownHeaders(model.getKnownHeaders());
- }
- return binding;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SenderException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SenderException.java
deleted file mode 100644
index 51a63ab5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SenderException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-
-/**
- * @author WS Development Team
- */
-public class SenderException extends JAXWSExceptionBase {
- public SenderException(String key, Object... args) {
- super(key, args);
- }
-
- public SenderException(Throwable throwable) {
- super(throwable);
- }
-
- public SenderException(Localizable arg) {
- super("sender.nestedError", arg);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.sender";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/Stub.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/Stub.java
deleted file mode 100644
index 8f7c918f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/Stub.java
+++ /dev/null
@@ -1,753 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.client;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.ws.addressing.WSEPRExtension;
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.Component;
-import com.sun.xml.internal.ws.api.ComponentFeature;
-import com.sun.xml.internal.ws.api.ComponentFeature.Target;
-import com.sun.xml.internal.ws.api.ComponentRegistry;
-import com.sun.xml.internal.ws.api.ComponentsFeature;
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.api.message.AddressingUtils;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.HeaderList;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext;
-import com.sun.xml.internal.ws.api.pipe.Engine;
-import com.sun.xml.internal.ws.api.pipe.Fiber;
-import com.sun.xml.internal.ws.api.pipe.FiberContextSwitchInterceptorFactory;
-import com.sun.xml.internal.ws.api.pipe.SyncStartForAsyncFeature;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubelineAssembler;
-import com.sun.xml.internal.ws.api.pipe.TubelineAssemblerFactory;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.ContainerResolver;
-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.WSDLPortProperties;
-import com.sun.xml.internal.ws.model.wsdl.WSDLProperties;
-import com.sun.xml.internal.ws.resources.ClientMessages;
-import com.sun.xml.internal.ws.util.Pool;
-import com.sun.xml.internal.ws.util.Pool.TubePool;
-import com.sun.xml.internal.ws.util.RuntimeVersion;
-import com.sun.xml.internal.ws.wsdl.OperationDispatcher;
-import com.sun.org.glassfish.gmbal.ManagedObjectManager;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.RespectBindingFeature;
-import javax.xml.ws.Response;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.http.HTTPBinding;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.Executor;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.management.ObjectName;
-
-/**
- * Base class for stubs, which accept method invocations from
- * client applications and pass the message to a {@link Tube}
- * for processing.
- *
- * <p>
- * This class implements the management of pipe instances,
- * and most of the {@link BindingProvider} methods.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class Stub implements WSBindingProvider, ResponseContextReceiver, ComponentRegistry {
- /**
- * Internal flag indicating async dispatch should be used even when the
- * SyncStartForAsyncInvokeFeature is present on the binding associated
- * with a stub. There is no type associated with this property on the
- * request context. Its presence is what triggers the 'prevent' behavior.
- */
- public static final String PREVENT_SYNC_START_FOR_ASYNC_INVOKE = "com.sun.xml.internal.ws.client.StubRequestSyncStartForAsyncInvoke";
-
- /**
- * Reuse pipelines as it's expensive to create.
- * <p>
- * Set to null when {@link #close() closed}.
- */
- private Pool<Tube> tubes;
-
- private final Engine engine;
-
- /**
- * The {@link WSServiceDelegate} object that owns us.
- */
- protected final WSServiceDelegate owner;
-
- /**
- * Non-null if this stub is configured to talk to an EPR.
- * <p>
- * When this field is non-null, its reference parameters are sent as out-bound headers.
- * This field can be null even when addressing is enabled, but if the addressing is
- * not enabled, this field must be null.
- * <p>
- * Unlike endpoint address, we are not letting users to change the EPR,
- * as it contains references to services and so on that we don't want to change.
- */
- protected
- @Nullable
- WSEndpointReference endpointReference;
-
- protected final BindingImpl binding;
-
- protected final WSPortInfo portInfo;
-
- /**
- * represents AddressingVersion on binding if enabled, otherwise null;
- */
- protected AddressingVersion addrVersion;
-
- public RequestContext requestContext = new RequestContext();
-
- private final RequestContext cleanRequestContext;
-
- /**
- * {@link ResponseContext} from the last synchronous operation.
- */
- private ResponseContext responseContext;
- @Nullable
- protected final WSDLPort wsdlPort;
-
- protected QName portname;
-
- /**
- * {@link Header}s to be added to outbound {@link Packet}.
- * The contents is determined by the user.
- */
- @Nullable
- private volatile Header[] userOutboundHeaders;
-
- private final
- @NotNull
- WSDLProperties wsdlProperties;
- protected OperationDispatcher operationDispatcher = null;
- private final
- @NotNull
- ManagedObjectManager managedObjectManager;
- private boolean managedObjectManagerClosed = false;
-
- private final Set<Component> components = new CopyOnWriteArraySet<Component>();
-
- /**
- * @param master The created stub will send messages to this pipe.
- * @param binding As a {@link BindingProvider}, this object will
- * return this binding from {@link BindingProvider#getBinding()}.
- * @param defaultEndPointAddress The destination of the message. The actual destination
- * could be overridden by {@link RequestContext}.
- * @param epr To create a stub that sends out reference parameters
- * of a specific EPR, give that instance. Otherwise null.
- * Its address field will not be used, and that should be given
- * separately as the <tt>defaultEndPointAddress</tt>.
- */
- @Deprecated
- protected Stub(WSServiceDelegate owner, Tube master, BindingImpl binding, WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
- this(owner, master, null, null, binding, wsdlPort, defaultEndPointAddress, epr);
- }
-
- /**
- * @param portname The name of this port
- * @param master The created stub will send messages to this pipe.
- * @param binding As a {@link BindingProvider}, this object will
- * return this binding from {@link BindingProvider#getBinding()}.
- * @param defaultEndPointAddress The destination of the message. The actual destination
- * could be overridden by {@link RequestContext}.
- * @param epr To create a stub that sends out reference parameters
- * of a specific EPR, give that instance. Otherwise null.
- * Its address field will not be used, and that should be given
- * separately as the <tt>defaultEndPointAddress</tt>.
- */
- @Deprecated
- protected Stub(QName portname, WSServiceDelegate owner, Tube master, BindingImpl binding, WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
- this(owner, master, null, portname, binding, wsdlPort, defaultEndPointAddress, epr);
- }
-
- /**
- * @param portInfo PortInfo for this stub
- * @param binding As a {@link BindingProvider}, this object will
- * return this binding from {@link BindingProvider#getBinding()}.
- * @param master The created stub will send messages to this pipe.
- * @param defaultEndPointAddress The destination of the message. The actual destination
- * could be overridden by {@link RequestContext}.
- * @param epr To create a stub that sends out reference parameters
- * of a specific EPR, give that instance. Otherwise null.
- * Its address field will not be used, and that should be given
- * separately as the <tt>defaultEndPointAddress</tt>.
- */
- protected Stub(WSPortInfo portInfo, BindingImpl binding, Tube master,EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
- this((WSServiceDelegate) portInfo.getOwner(), master, portInfo, null, binding,portInfo.getPort(), defaultEndPointAddress, epr);
- }
-
- /**
- * @param portInfo PortInfo for this stub
- * @param binding As a {@link BindingProvider}, this object will
- * return this binding from {@link BindingProvider#getBinding()}.
- * @param defaultEndPointAddress The destination of the message. The actual destination
- * could be overridden by {@link RequestContext}.
- * @param epr To create a stub that sends out reference parameters
- * of a specific EPR, give that instance. Otherwise null.
- * Its address field will not be used, and that should be given
- * separately as the <tt>defaultEndPointAddress</tt>.
- */
- protected Stub(WSPortInfo portInfo, BindingImpl binding, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
- this(portInfo,binding,null, defaultEndPointAddress,epr);
-
- }
-
- private Stub(WSServiceDelegate owner, @Nullable Tube master, @Nullable WSPortInfo portInfo, QName portname, BindingImpl binding, @Nullable WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) {
- Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
- try {
- this.owner = owner;
- this.portInfo = portInfo;
- this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null);
- this.portname = portname;
- if (portname == null) {
- if (portInfo != null) {
- this.portname = portInfo.getPortName();
- } else if (wsdlPort != null) {
- this.portname = wsdlPort.getName();
- }
- }
- this.binding = binding;
-
- ComponentFeature cf = binding.getFeature(ComponentFeature.class);
- if (cf != null && Target.STUB.equals(cf.getTarget())) {
- components.add(cf.getComponent());
- }
- ComponentsFeature csf = binding.getFeature(ComponentsFeature.class);
- if (csf != null) {
- for (ComponentFeature cfi : csf.getComponentFeatures()) {
- if (Target.STUB.equals(cfi.getTarget()))
- components.add(cfi.getComponent());
- }
- }
-
- // if there is an EPR, EPR's address should be used for invocation instead of default address
- if (epr != null) {
- this.requestContext.setEndPointAddressString(epr.getAddress());
- } else {
- this.requestContext.setEndpointAddress(defaultEndPointAddress);
- }
- this.engine = new Engine(getStringId(), owner.getContainer(), owner.getExecutor());
- this.endpointReference = epr;
- wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort);
-
- this.cleanRequestContext = this.requestContext.copy();
-
- // ManagedObjectManager MUST be created before the pipeline
- // is constructed.
-
- managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this);
-
- if (master != null) {
- this.tubes = new TubePool(master);
- } else {
- this.tubes = new TubePool(createPipeline(portInfo, binding));
- }
-
- addrVersion = binding.getAddressingVersion();
-
- // This needs to happen after createPipeline.
- // TBD: Check if it needs to happen outside the Stub constructor.
- managedObjectManager.resumeJMXRegistration();
- } finally {
- ContainerResolver.getDefault().exitContainer(old);
- }
- }
-
- /**
- * Creates a new pipeline for the given port name.
- */
- private Tube createPipeline(WSPortInfo portInfo, WSBinding binding) {
- //Check all required WSDL extensions are understood
- checkAllWSDLExtensionsUnderstood(portInfo, binding);
- SEIModel seiModel = null;
- Class sei = null;
- if (portInfo instanceof SEIPortInfo) {
- SEIPortInfo sp = (SEIPortInfo) portInfo;
- seiModel = sp.model;
- sei = sp.sei;
- }
- BindingID bindingId = portInfo.getBindingId();
-
- TubelineAssembler assembler = TubelineAssemblerFactory.create(
- Thread.currentThread().getContextClassLoader(), bindingId, owner.getContainer());
- if (assembler == null) {
- throw new WebServiceException("Unable to process bindingID=" + bindingId); // TODO: i18n
- }
- return assembler.createClient(
- new ClientTubeAssemblerContext(
- portInfo.getEndpointAddress(),
- portInfo.getPort(),
- this, binding, owner.getContainer(), ((BindingImpl) binding).createCodec(), seiModel, sei));
- }
-
- public WSDLPort getWSDLPort() {
- return wsdlPort;
- }
-
- public WSService getService() {
- return owner;
- }
-
- public Pool<Tube> getTubes() {
- return tubes;
- }
-
- /**
- * Checks only if RespectBindingFeature is enabled
- * checks if all required wsdl extensions in the
- * corresponding wsdl:Port are understood when RespectBindingFeature is enabled.
- * @throws WebServiceException
- * when any wsdl extension that has wsdl:required=true is not understood
- */
- private static void checkAllWSDLExtensionsUnderstood(WSPortInfo port, WSBinding binding) {
- if (port.getPort() != null && binding.isFeatureEnabled(RespectBindingFeature.class)) {
- port.getPort().areRequiredExtensionsUnderstood();
- }
- }
-
- @Override
- public WSPortInfo getPortInfo() {
- return portInfo;
- }
-
- /**
- * Nullable when there is no associated WSDL Model
- * @return
- */
- public
- @Nullable
- OperationDispatcher getOperationDispatcher() {
- if (operationDispatcher == null && wsdlPort != null) {
- operationDispatcher = new OperationDispatcher(wsdlPort, binding, null);
- }
- return operationDispatcher;
- }
-
- /**
- * Gets the port name that this stub is configured to talk to.
- * <p>
- * When {@link #wsdlPort} is non-null, the port name is always
- * the same as {@link WSDLPort#getName()}, but this method
- * returns a port name even if no WSDL is available for this stub.
- */
- protected abstract
- @NotNull
- QName getPortName();
-
- /**
- * Gets the service name that this stub is configured to talk to.
- * <p>
- * When {@link #wsdlPort} is non-null, the service name is always
- * the same as the one that's inferred from {@link WSDLPort#getOwner()},
- * but this method returns a port name even if no WSDL is available for
- * this stub.
- */
- protected final
- @NotNull
- QName getServiceName() {
- return owner.getServiceName();
- }
-
- /**
- * Gets the {@link Executor} to be used for asynchronous method invocations.
- * <p>
- * Note that the value this method returns may different from invocations
- * to invocations. The caller must not cache.
- *
- * @return always non-null.
- */
- public final Executor getExecutor() {
- return owner.getExecutor();
- }
-
- /**
- * Passes a message to a pipe for processing.
- * <p>
- * Unlike {@link Tube} instances,
- * this method is thread-safe and can be invoked from
- * multiple threads concurrently.
- *
- * @param packet The message to be sent to the server
- * @param requestContext The {@link RequestContext} when this invocation is originally scheduled.
- * This must be the same object as {@link #requestContext} for synchronous
- * invocations, but for asynchronous invocations, it needs to be a snapshot
- * captured at the point of invocation, to correctly satisfy the spec requirement.
- * @param receiver Receives the {@link ResponseContext}. Since the spec requires
- * that the asynchronous invocations must not update response context,
- * depending on the mode of invocation they have to go to different places.
- * So we take a setter that abstracts that away.
- */
- protected final Packet process(Packet packet, RequestContext requestContext, ResponseContextReceiver receiver) {
- packet.isSynchronousMEP = true;
- packet.component = this;
- configureRequestPacket(packet, requestContext);
- Pool<Tube> pool = tubes;
- if (pool == null) {
- throw new WebServiceException("close method has already been invoked"); // TODO: i18n
- }
-
- Fiber fiber = engine.createFiber();
- configureFiber(fiber);
-
- // then send it away!
- Tube tube = pool.take();
-
- try {
- return fiber.runSync(tube, packet);
- } finally {
- // this allows us to capture the packet even when the call failed with an exception.
- // when the call fails with an exception it's no longer a 'reply' but it may provide some information
- // about what went wrong.
-
- // note that Packet can still be updated after
- // ResponseContext is created.
- Packet reply = (fiber.getPacket() == null) ? packet : fiber.getPacket();
- receiver.setResponseContext(new ResponseContext(reply));
-
- pool.recycle(tube);
- }
- }
-
- private void configureRequestPacket(Packet packet, RequestContext requestContext) {
- // fill in Packet
- packet.proxy = this;
- packet.handlerConfig = binding.getHandlerConfig();
-
- // to make it multi-thread safe we need to first get a stable snapshot
- Header[] hl = userOutboundHeaders;
- if (hl != null) {
- MessageHeaders mh = packet.getMessage().getHeaders();
- for (Header h : hl) {
- mh.add(h);
- }
- }
-
- requestContext.fill(packet, (binding.getAddressingVersion() != null));
- packet.addSatellite(wsdlProperties);
-
- if (addrVersion != null) {
- // populate request WS-Addressing headers
- MessageHeaders headerList = packet.getMessage().getHeaders();
- AddressingUtils.fillRequestAddressingHeaders(headerList, wsdlPort, binding, packet);
-
-
- // Spec is not clear on if ReferenceParameters are to be added when addressing is not enabled,
- // but the EPR has ReferenceParameters.
- // Current approach: Add ReferenceParameters only if addressing enabled.
- if (endpointReference != null) {
- endpointReference.addReferenceParametersToList(packet.getMessage().getHeaders());
- }
- }
- }
-
- /**
- * Passes a message through a {@link Tube}line for processing. The processing happens
- * asynchronously and when the response is available, Fiber.CompletionCallback is
- * called. The processing could happen on multiple threads.
- *
- * <p>
- * Unlike {@link Tube} instances,
- * this method is thread-safe and can be invoked from
- * multiple threads concurrently.
- *
- * @param receiver The {@link Response} implementation
- * @param request The message to be sent to the server
- * @param requestContext The {@link RequestContext} when this invocation is originally scheduled.
- * This must be the same object as {@link #requestContext} for synchronous
- * invocations, but for asynchronous invocations, it needs to be a snapshot
- * captured at the point of invocation, to correctly satisfy the spec requirement.
- * @param completionCallback Once the processing is done, the callback is invoked.
- */
- protected final void processAsync(AsyncResponseImpl<?> receiver, Packet request, RequestContext requestContext, final Fiber.CompletionCallback completionCallback) {
- // fill in Packet
- request.component = this;
- configureRequestPacket(request, requestContext);
-
- final Pool<Tube> pool = tubes;
- if (pool == null) {
- throw new WebServiceException("close method has already been invoked"); // TODO: i18n
- }
-
- final Fiber fiber = engine.createFiber();
- configureFiber(fiber);
-
- receiver.setCancelable(fiber);
-
- // check race condition on cancel
- if (receiver.isCancelled()) {
- return;
- }
-
- FiberContextSwitchInterceptorFactory fcsif = owner.getSPI(FiberContextSwitchInterceptorFactory.class);
- if (fcsif != null) {
- fiber.addInterceptor(fcsif.create());
- }
-
- // then send it away!
- final Tube tube = pool.take();
-
- Fiber.CompletionCallback fiberCallback = new Fiber.CompletionCallback() {
- @Override
- public void onCompletion(@NotNull Packet response) {
- pool.recycle(tube);
- completionCallback.onCompletion(response);
- }
-
- @Override
- public void onCompletion(@NotNull Throwable error) {
- // let's not reuse tubes as they might be in a wrong state, so not
- // calling pool.recycle()
- completionCallback.onCompletion(error);
- }
- };
-
- // Check for SyncStartForAsyncInvokeFeature
-
- fiber.start(tube, request, fiberCallback,
- getBinding().isFeatureEnabled(SyncStartForAsyncFeature.class) &&
- !requestContext.containsKey(PREVENT_SYNC_START_FOR_ASYNC_INVOKE));
- }
-
- protected void configureFiber(Fiber fiber) {
- // no-op in the base class, but can be used by derived classes to configure the Fiber prior
- // to invocation
- }
-
- private static final Logger monitoringLogger = Logger.getLogger(com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".monitoring");
-
- @Override
- public void close() {
- TubePool tp = (TubePool) tubes;
- if (tp != null) {
- // multi-thread safety of 'close' needs to be considered more carefully.
- // some calls might be pending while this method is invoked. Should we
- // block until they are complete, or should we abort them (but how?)
- Tube p = tp.takeMaster();
- p.preDestroy();
- tubes = null;
- }
- if (!managedObjectManagerClosed) {
- try {
- final ObjectName name = managedObjectManager.getObjectName(managedObjectManager.getRoot());
- // The name is null when the MOM is a NOOP.
- if (name != null) {
- monitoringLogger.log(Level.INFO, "Closing Metro monitoring root: {0}", name);
- }
- managedObjectManager.close();
- } catch (java.io.IOException e) {
- monitoringLogger.log(Level.WARNING, "Ignoring error when closing Managed Object Manager", e);
- }
- managedObjectManagerClosed = true;
- }
- }
-
- @Override
- public final WSBinding getBinding() {
- return binding;
- }
-
- @Override
- public final Map<String, Object> getRequestContext() {
- return requestContext.asMap();
- }
-
- public void resetRequestContext() {
- requestContext = cleanRequestContext.copy();
- }
-
- @Override
- public final ResponseContext getResponseContext() {
- return responseContext;
- }
-
- @Override
- public void setResponseContext(ResponseContext rc) {
- this.responseContext = rc;
- }
-
- private String getStringId() {
- return RuntimeVersion.VERSION + ": Stub for " + getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
- }
-
- @Override
- public String toString() {
- return getStringId();
- }
-
- @Override
- public final WSEndpointReference getWSEndpointReference() {
- if (binding.getBindingID().equals(HTTPBinding.HTTP_BINDING)) {
- throw new java.lang.UnsupportedOperationException(
- ClientMessages.UNSUPPORTED_OPERATION("BindingProvider.getEndpointReference(Class<T> class)", "XML/HTTP Binding", "SOAP11 or SOAP12 Binding")
- );
- }
-
- if (endpointReference != null) {
- return endpointReference;
- }
-
- String eprAddress = requestContext.getEndpointAddress().toString();
- QName portTypeName = null;
- String wsdlAddress = null;
- List<WSEndpointReference.EPRExtension> wsdlEPRExtensions = new ArrayList<WSEndpointReference.EPRExtension>();
- if (wsdlPort != null) {
- portTypeName = wsdlPort.getBinding().getPortTypeName();
- wsdlAddress = eprAddress + "?wsdl";
-
- //gather EPRExtensions specified in WSDL.
- try {
- WSEndpointReference wsdlEpr = wsdlPort.getEPR();
- if (wsdlEpr != null) {
- for (WSEndpointReference.EPRExtension extnEl : wsdlEpr.getEPRExtensions()) {
- wsdlEPRExtensions.add(new WSEPRExtension(
- XMLStreamBuffer.createNewBufferFromXMLStreamReader(extnEl.readAsXMLStreamReader()), extnEl.getQName()));
- }
- }
-
- } catch (XMLStreamException ex) {
- throw new WebServiceException(ex);
- }
- }
- AddressingVersion av = AddressingVersion.W3C;
- this.endpointReference = new WSEndpointReference(
- av, eprAddress, getServiceName(), getPortName(), portTypeName, null, wsdlAddress, null, wsdlEPRExtensions, null);
-
- return this.endpointReference;
- }
-
-
- @Override
- public final W3CEndpointReference getEndpointReference() {
- if (binding.getBindingID().equals(HTTPBinding.HTTP_BINDING)) {
- throw new java.lang.UnsupportedOperationException(
- ClientMessages.UNSUPPORTED_OPERATION("BindingProvider.getEndpointReference()", "XML/HTTP Binding", "SOAP11 or SOAP12 Binding"));
- }
- return getEndpointReference(W3CEndpointReference.class);
- }
-
- @Override
- public final <T extends EndpointReference> T getEndpointReference(Class<T> clazz) {
- return getWSEndpointReference().toSpec(clazz);
- }
-
- public
- @NotNull
- @Override
- ManagedObjectManager getManagedObjectManager() {
- return managedObjectManager;
- }
-
- //
-//
-// WSBindingProvider methods
-//
-//
- @Override
- public final void setOutboundHeaders(List<Header> headers) {
- if (headers == null) {
- this.userOutboundHeaders = null;
- } else {
- for (Header h : headers) {
- if (h == null) {
- throw new IllegalArgumentException();
- }
- }
- userOutboundHeaders = headers.toArray(new Header[headers.size()]);
- }
- }
-
- @Override
- public final void setOutboundHeaders(Header... headers) {
- if (headers == null) {
- this.userOutboundHeaders = null;
- } else {
- for (Header h : headers) {
- if (h == null) {
- throw new IllegalArgumentException();
- }
- }
- Header[] hl = new Header[headers.length];
- System.arraycopy(headers, 0, hl, 0, headers.length);
- userOutboundHeaders = hl;
- }
- }
-
- @Override
- public final List<Header> getInboundHeaders() {
- return Collections.unmodifiableList(((MessageHeaders)
- responseContext.get(JAXWSProperties.INBOUND_HEADER_LIST_PROPERTY)).asList());
- }
-
- @Override
- public final void setAddress(String address) {
- requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, address);
- }
-
- @Override
- public <S> S getSPI(Class<S> spiType) {
- for (Component c : components) {
- S s = c.getSPI(spiType);
- if (s != null) {
- return s;
- }
- }
- return owner.getSPI(spiType);
- }
-
- @Override
- public Set<Component> getComponents() {
- return components;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java
deleted file mode 100644
index 7805320d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java
+++ /dev/null
@@ -1,971 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.client;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.Closeable;
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.ComponentFeature;
-import com.sun.xml.internal.ws.api.ComponentsFeature;
-import com.sun.xml.internal.ws.api.ComponentFeature.Target;
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.client.ServiceInterceptor;
-import com.sun.xml.internal.ws.api.client.ServiceInterceptorFactory;
-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;
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-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.resources.ClientMessages;
-import com.sun.xml.internal.ws.resources.DispatchMessages;
-import com.sun.xml.internal.ws.resources.ProviderApiMessages;
-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;
-
-import javax.jws.HandlerChain;
-import javax.jws.WebService;
-import javax.xml.bind.JAXBContext;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceClient;
-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;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.security.*;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ThreadFactory;
-
-import static com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver;
-
-/**
- * <code>Service</code> objects provide the client view of a Web service.
- *
- * <p><code>Service</code> acts as a factory of the following:
- * <ul>
- * <li>Proxies for a target service endpoint.
- * <li>Instances of <code>javax.xml.ws.Dispatch</code> for
- * dynamic message-oriented invocation of a remote
- * operation.
- * </li>
- *
- * <p>The ports available on a service can be enumerated using the
- * <code>getPorts</code> method. Alternatively, you can pass a
- * service endpoint interface to the unary <code>getPort</code> method
- * and let the runtime select a compatible port.
- *
- * <p>Handler chains for all the objects created by a <code>Service</code>
- * can be set by means of the provided <code>HandlerRegistry</code>.
- *
- * <p>An <code>Executor</code> may be set on the service in order
- * to gain better control over the threads used to dispatch asynchronous
- * callbacks. For instance, thread pooling with certain parameters
- * can be enabled by creating a <code>ThreadPoolExecutor</code> and
- * registering it with the service.
- *
- * @author WS Development Team
- * @see Executor
- * @since JAX-WS 2.0
- */
-public class WSServiceDelegate extends WSService {
- /**
- * All ports.
- * <p>
- * This includes ports statically known to WSDL, as well as
- * ones that are dynamically added
- * through {@link #addPort(QName, String, String)}.
- * <p>
- * For statically known ports we'll have {@link SEIPortInfo}.
- * For dynamically added ones we'll have {@link PortInfo}.
- */
- private final Map<QName, PortInfo> ports = new HashMap<QName, PortInfo>();
- // For monitoring
- protected Map<QName, PortInfo> getQNameToPortInfoMap() { return ports; }
-
- /**
- * Whenever we create {@link BindingProvider}, we use this to configure handlers.
- */
- private @NotNull HandlerConfigurator handlerConfigurator = new HandlerResolverImpl(null);
-
- private final Class<? extends Service> serviceClass;
-
- private final WebServiceFeatureList features;
-
- /**
- * Name of the service for which this {@link WSServiceDelegate} is created for.
- */
- private final @NotNull QName serviceName;
-
- /**
- * Information about SEI, keyed by their interface type.
- */
- // private final Map<Class,SEIPortInfo> seiContext = new HashMap<Class,SEIPortInfo>();
- private final Map<QName,SEIPortInfo> seiContext = new HashMap<QName,SEIPortInfo>();
-
- // This executor is used for all the async invocations for all proxies
- // created from this service. But once the proxy is created, then changing
- // this executor doesn't affect the already created proxies.
- private volatile Executor executor;
-
- /**
- * The WSDL service that this {@link Service} object represents.
- * <p>
- * This field is null iff no WSDL is given to {@link Service}.
- * 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 WSDLService wsdlService;
-
- private final Container container;
- /**
- * Multiple {@link ServiceInterceptor}s are aggregated into one.
- */
- /*package*/ final @NotNull ServiceInterceptor serviceInterceptor;
- private URL wsdlURL;
-
- public WSServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class<? extends Service> serviceClass, WebServiceFeature... features) {
- this(wsdlDocumentLocation, serviceName, serviceClass, new WebServiceFeatureList(features));
- }
-
- protected WSServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class<? extends Service> serviceClass, WebServiceFeatureList features) {
- this(
- wsdlDocumentLocation==null ? null : new StreamSource(wsdlDocumentLocation.toExternalForm()),
- serviceName,serviceClass, features);
- wsdlURL = wsdlDocumentLocation;
- }
-
- /**
- * @param serviceClass
- * Either {@link Service}.class or other generated service-derived classes.
- */
- public WSServiceDelegate(@Nullable Source wsdl, @NotNull QName serviceName, @NotNull final Class<? extends Service> serviceClass, WebServiceFeature... features) {
- this(wsdl, serviceName, serviceClass, new WebServiceFeatureList(features));
- }
-
- /**
- * @param serviceClass
- * Either {@link Service}.class or other generated service-derived classes.
- */
- protected WSServiceDelegate(@Nullable Source wsdl, @NotNull QName serviceName, @NotNull final Class<? extends Service> serviceClass, WebServiceFeatureList features) {
- this(wsdl, null, serviceName, serviceClass, features);
- }
-
- /**
- * @param serviceClass
- * Either {@link Service}.class or other generated service-derived classes.
- */
- 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));
- }
-
- /**
- * @param serviceClass
- * Either {@link Service}.class or other generated service-derived classes.
- */
- 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));
- }
-
- this.features = features;
-
- InitParams initParams = INIT_PARAMS.get();
- INIT_PARAMS.set(null); // mark it as consumed
- if(initParams==null) {
- initParams = EMPTY_PARAMS;
- }
-
- this.serviceName = serviceName;
- this.serviceClass = serviceClass;
- Container tContainer = initParams.getContainer()!=null ? initParams.getContainer() : ContainerResolver.getInstance().getContainer();
- if (tContainer == Container.NONE) {
- tContainer = new ClientContainer();
- }
- this.container = tContainer;
-
- ComponentFeature cf = this.features.get(ComponentFeature.class);
- if (cf != null) {
- switch(cf.getTarget()) {
- case SERVICE:
- getComponents().add(cf.getComponent());
- break;
- case CONTAINER:
- this.container.getComponents().add(cf.getComponent());
- break;
- default:
- throw new IllegalArgumentException();
- }
- }
- ComponentsFeature csf = this.features.get(ComponentsFeature.class);
- if (csf != null) {
- for (ComponentFeature cfi : csf.getComponentFeatures()) {
- switch(cfi.getTarget()) {
- case SERVICE:
- getComponents().add(cfi.getComponent());
- break;
- case CONTAINER:
- this.container.getComponents().add(cfi.getComponent());
- break;
- default:
- throw new IllegalArgumentException();
- }
- }
- }
-
- // load interceptor
- ServiceInterceptor interceptor = ServiceInterceptorFactory.load(this, Thread.currentThread().getContextClassLoader());
- ServiceInterceptor si = container.getSPI(ServiceInterceptor.class);
- if (si != null) {
- interceptor = ServiceInterceptor.aggregate(interceptor, si);
- }
- this.serviceInterceptor = interceptor;
-
- if (service == null) {
- //if wsdl is null, try and get it from the WebServiceClient.wsdlLocation
- if(wsdl == null){
- if(serviceClass != Service.class){
- WebServiceClient wsClient = AccessController.doPrivileged(new PrivilegedAction<WebServiceClient>() {
- public WebServiceClient run() {
- return serviceClass.getAnnotation(WebServiceClient.class);
- }
- });
- String wsdlLocation = wsClient.wsdlLocation();
- wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation));
- wsdl = new StreamSource(wsdlLocation);
- }
- }
- if (wsdl != null) {
- try {
- URL url = wsdl.getSystemId()==null ? null : JAXWSUtils.getEncodedURL(wsdl.getSystemId());
- WSDLModel model = parseWSDL(url, wsdl, serviceClass);
- service = model.getService(this.serviceName);
- if (service == null)
- throw new WebServiceException(
- ClientMessages.INVALID_SERVICE_NAME(this.serviceName,
- buildNameList(model.getServices().keySet())));
- // fill in statically known ports
- for (WSDLPort port : service.getPorts())
- ports.put(port.getName(), new PortInfo(this, port));
- } catch (MalformedURLException e) {
- 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;
-
- if (serviceClass != Service.class) {
- //if @HandlerChain present, set HandlerResolver on service context
- HandlerChain handlerChain =
- AccessController.doPrivileged(new PrivilegedAction<HandlerChain>() {
- public HandlerChain run() {
- return serviceClass.getAnnotation(HandlerChain.class);
- }
- });
- if (handlerChain != null)
- handlerConfigurator = new AnnotationConfigurator(this);
- }
-
- }
-
- /**
- * Parses the WSDL and builds {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLModel}.
- * @param wsdlDocumentLocation
- * 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 WSDLModel parseWSDL(URL wsdlDocumentLocation, Source wsdlSource, Class serviceClass) {
- try {
- return RuntimeWSDLParser.parse(wsdlDocumentLocation, wsdlSource, createCatalogResolver(),
- true, getContainer(), serviceClass, ServiceFinder.find(WSDLParserExtension.class).toArray());
- } catch (IOException e) {
- throw new WebServiceException(e);
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- } catch (SAXException e) {
- throw new WebServiceException(e);
- } catch (ServiceConfigurationError e) {
- throw new WebServiceException(e);
- }
- }
-
- protected EntityResolver createCatalogResolver() {
- return createDefaultCatalogResolver();
- }
-
- public Executor getExecutor() {
- return executor;
- }
-
- public void setExecutor(Executor executor) {
- this.executor = executor;
- }
-
- public HandlerResolver getHandlerResolver() {
- return handlerConfigurator.getResolver();
- }
-
- /*package*/ final HandlerConfigurator getHandlerConfigurator() {
- return handlerConfigurator;
- }
-
- public void setHandlerResolver(HandlerResolver resolver) {
- handlerConfigurator = new HandlerResolverImpl(resolver);
- }
-
- public <T> T getPort(QName portName, Class<T> portInterface) throws WebServiceException {
- return getPort(portName, portInterface, EMPTY_FEATURES);
- }
-
- public <T> T getPort(QName portName, Class<T> portInterface, WebServiceFeature... features) {
- if (portName == null || portInterface == null)
- throw new IllegalArgumentException();
- 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
- tWsdlService = getWSDLModelfromSEI(portInterface);
- //still null? throw error need wsdl metadata to create a proxy
- if (tWsdlService == null) {
- throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName()));
- }
-
- }
- WSDLPort portModel = getPortModel(tWsdlService, portName);
- return getPort(portModel.getEPR(), portName, portInterface, new WebServiceFeatureList(features));
- }
-
- public <T> T getPort(EndpointReference epr, Class<T> portInterface, WebServiceFeature... features) {
- return getPort(WSEndpointReference.create(epr),portInterface,features);
- }
-
- public <T> T getPort(WSEndpointReference wsepr, Class<T> portInterface, WebServiceFeature... features) {
- //get the portType from SEI, so that it can be used if EPR does n't have endpointName
- WebServiceFeatureList featureList = new WebServiceFeatureList(features);
- QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(featureList, portInterface.getClassLoader()));
- //if port name is not specified in EPR, it will use portTypeName to get it from the WSDL model.
- QName portName = getPortNameFromEPR(wsepr, portTypeName);
- return getPort(wsepr,portName,portInterface, featureList);
- }
-
- protected <T> T getPort(WSEndpointReference wsepr, QName portName, Class<T> portInterface,
- WebServiceFeatureList features) {
- ComponentFeature cf = features.get(ComponentFeature.class);
- if (cf != null && !Target.STUB.equals(cf.getTarget())) {
- throw new IllegalArgumentException();
- }
- ComponentsFeature csf = features.get(ComponentsFeature.class);
- if (csf != null) {
- for (ComponentFeature cfi : csf.getComponentFeatures()) {
- if (!Target.STUB.equals(cfi.getTarget()))
- throw new IllegalArgumentException();
- }
- }
- features.addAll(this.features);
-
- SEIPortInfo spi = addSEI(portName, portInterface, features);
- return createEndpointIFBaseProxy(wsepr,portName,portInterface,features, spi);
- }
-
- @Override
- 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()));
- 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
- tmpWsdlService = getWSDLModelfromSEI(portInterface);
- //still null? throw error need wsdl metadata to create a proxy
- if(tmpWsdlService == null) {
- throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName()));
- }
- }
- //get the first port corresponding to the SEI
- WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName);
- if (port == null) {
- throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName));
- }
- QName portName = port.getName();
- return getPort(portName, portInterface,features);
- }
-
- public <T> T getPort(Class<T> portInterface) throws WebServiceException {
- return getPort(portInterface, EMPTY_FEATURES);
- }
-
- public void addPort(QName portName, String bindingId, String endpointAddress) throws WebServiceException {
- if (!ports.containsKey(portName)) {
- BindingID bid = (bindingId == null) ? BindingID.SOAP11_HTTP : BindingID.parse(bindingId);
- ports.put(portName,
- new PortInfo(this, (endpointAddress == null) ? null :
- EndpointAddress.create(endpointAddress), portName, bid));
- } else
- throw new WebServiceException(DispatchMessages.DUPLICATE_PORT(portName.toString()));
- }
-
-
- public <T> Dispatch<T> createDispatch(QName portName, Class<T> aClass, Service.Mode mode) throws WebServiceException {
- return createDispatch(portName, aClass, mode, EMPTY_FEATURES);
- }
-
- @Override
- public <T> Dispatch<T> createDispatch(QName portName, WSEndpointReference wsepr, Class<T> aClass, Service.Mode mode, WebServiceFeature... features) {
- return createDispatch(portName, wsepr, aClass, mode, new WebServiceFeatureList(features));
- }
-
- public <T> Dispatch<T> createDispatch(QName portName, WSEndpointReference wsepr, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) {
- PortInfo port = safeGetPort(portName);
-
- ComponentFeature cf = features.get(ComponentFeature.class);
- if (cf != null && !Target.STUB.equals(cf.getTarget())) {
- throw new IllegalArgumentException();
- }
- ComponentsFeature csf = features.get(ComponentsFeature.class);
- if (csf != null) {
- for (ComponentFeature cfi : csf.getComponentFeatures()) {
- if (!Target.STUB.equals(cfi.getTarget()))
- throw new IllegalArgumentException();
- }
- }
- features.addAll(this.features);
-
- BindingImpl binding = port.createBinding(features, null, null);
- binding.setMode(mode);
- Dispatch<T> dispatch = Stubs.createDispatch(port, this, binding, aClass, mode, wsepr);
- serviceInterceptor.postCreateDispatch((WSBindingProvider) dispatch);
- return dispatch;
- }
-
- public <T> Dispatch<T> createDispatch(QName portName, Class<T> aClass, Service.Mode mode, WebServiceFeature... features) {
- return createDispatch(portName, aClass, mode, new WebServiceFeatureList(features));
- }
-
- public <T> Dispatch<T> createDispatch(QName portName, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) {
- WSEndpointReference wsepr = null;
- boolean isAddressingEnabled = false;
- AddressingFeature af = features.get(AddressingFeature.class);
- if (af == null) {
- af = this.features.get(AddressingFeature.class);
- }
- if (af != null && af.isEnabled())
- isAddressingEnabled = true;
- MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class);
- if (msa == null) {
- msa = this.features.get(MemberSubmissionAddressingFeature.class);
- }
- if (msa != null && msa.isEnabled())
- isAddressingEnabled = true;
- if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) {
- wsepr = wsdlService.get(portName).getEPR();
- }
- return createDispatch(portName, wsepr, aClass, mode, features);
- }
-
- public <T> Dispatch<T> createDispatch(EndpointReference endpointReference, Class<T> type, Service.Mode mode, WebServiceFeature... features) {
- WSEndpointReference wsepr = new WSEndpointReference(endpointReference);
- QName portName = addPortEpr(wsepr);
- return createDispatch(portName, wsepr, type, mode, features);
- }
-
- /**
- * Obtains {@link PortInfo} for the given name, with error check.
- */
- public
- @NotNull
- PortInfo safeGetPort(QName portName) {
- PortInfo port = ports.get(portName);
- if (port == null) {
- throw new WebServiceException(ClientMessages.INVALID_PORT_NAME(portName, buildNameList(ports.keySet())));
- }
- return port;
- }
-
- private StringBuilder buildNameList(Collection<QName> names) {
- StringBuilder sb = new StringBuilder();
- for (QName qn : names) {
- if (sb.length() > 0) sb.append(',');
- sb.append(qn);
- }
- return sb;
- }
-
- public EndpointAddress getEndpointAddress(QName qName) {
- PortInfo p = ports.get(qName);
- return p != null ? p.targetEndpoint : null;
- }
-
- public Dispatch<Object> createDispatch(QName portName, JAXBContext jaxbContext, Service.Mode mode) throws WebServiceException {
- return createDispatch(portName, jaxbContext, mode, EMPTY_FEATURES);
- }
-
- @Override
- public Dispatch<Object> createDispatch(QName portName, WSEndpointReference wsepr, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeature... features) {
- return createDispatch(portName, wsepr, jaxbContext, mode, new WebServiceFeatureList(features));
- }
-
- protected Dispatch<Object> createDispatch(QName portName, WSEndpointReference wsepr, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeatureList features) {
- PortInfo port = safeGetPort(portName);
-
- ComponentFeature cf = features.get(ComponentFeature.class);
- if (cf != null && !Target.STUB.equals(cf.getTarget())) {
- throw new IllegalArgumentException();
- }
- ComponentsFeature csf = features.get(ComponentsFeature.class);
- if (csf != null) {
- for (ComponentFeature cfi : csf.getComponentFeatures()) {
- if (!Target.STUB.equals(cfi.getTarget()))
- throw new IllegalArgumentException();
- }
- }
- features.addAll(this.features);
-
- BindingImpl binding = port.createBinding(features, null, null);
- binding.setMode(mode);
- Dispatch<Object> dispatch = Stubs.createJAXBDispatch(
- port, binding, jaxbContext, mode,wsepr);
- serviceInterceptor.postCreateDispatch((WSBindingProvider)dispatch);
- return dispatch;
- }
-
- @Override
- public @NotNull Container getContainer() {
- return container;
- }
-
- public Dispatch<Object> createDispatch(QName portName, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeature... webServiceFeatures) {
- return createDispatch(portName, jaxbContext, mode, new WebServiceFeatureList(webServiceFeatures));
- }
-
- protected Dispatch<Object> createDispatch(QName portName, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeatureList features) {
- WSEndpointReference wsepr = null;
- boolean isAddressingEnabled = false;
- AddressingFeature af = features.get(AddressingFeature.class);
- if (af == null) {
- af = this.features.get(AddressingFeature.class);
- }
- if (af != null && af.isEnabled())
- isAddressingEnabled = true;
- MemberSubmissionAddressingFeature msa = features.get(MemberSubmissionAddressingFeature.class);
- if (msa == null) {
- msa = this.features.get(MemberSubmissionAddressingFeature.class);
- }
- if (msa != null && msa.isEnabled())
- isAddressingEnabled = true;
- if(isAddressingEnabled && wsdlService != null && wsdlService.get(portName) != null) {
- wsepr = wsdlService.get(portName).getEPR();
- }
- return createDispatch(portName, wsepr, jaxbContext, mode, features);
- }
-
- public Dispatch<Object> createDispatch(EndpointReference endpointReference, JAXBContext context, Service.Mode mode, WebServiceFeature... features) {
- WSEndpointReference wsepr = new WSEndpointReference(endpointReference);
- QName portName = addPortEpr(wsepr);
- return createDispatch(portName, wsepr, context, mode, features);
- }
-
- private QName addPortEpr(WSEndpointReference wsepr) {
- if (wsepr == null)
- throw new WebServiceException(ProviderApiMessages.NULL_EPR());
- QName eprPortName = getPortNameFromEPR(wsepr, null);
- //add Port, if it does n't exist;
- // TODO: what if it has different epr address?
- {
- PortInfo portInfo = new PortInfo(this, (wsepr.getAddress() == null) ? null : EndpointAddress.create(wsepr.getAddress()), eprPortName,
- getPortModel(wsdlService, eprPortName).getBinding().getBindingId());
- if (!ports.containsKey(eprPortName)) {
- ports.put(eprPortName, portInfo);
- }
- }
- return eprPortName;
- }
-
- /**
- *
- * @param wsepr EndpointReference from which portName will be extracted.
- * If EndpointName ( port name) is null in EPR, then it will try to get if from WSDLModel using portType QName
- * @param portTypeName
- * should be null in dispatch case
- * should be non null in SEI case
- * @return
- * port name from EPR after validating various metadat elements.
- * Also if service instance does n't have wsdl,
- * then it gets the WSDL metadata from EPR and builds wsdl model.
- */
- private QName getPortNameFromEPR(@NotNull WSEndpointReference wsepr, @Nullable QName portTypeName) {
- QName portName;
- WSEndpointReference.Metadata metadata = wsepr.getMetaData();
- QName eprServiceName = metadata.getServiceName();
- QName eprPortName = metadata.getPortName();
- if ((eprServiceName != null ) && !eprServiceName.equals(serviceName)) {
- throw new WebServiceException("EndpointReference WSDL ServiceName differs from Service Instance WSDL Service QName.\n"
- + " The two Service QNames must match");
- }
- if (wsdlService == null) {
- Source eprWsdlSource = metadata.getWsdlSource();
- if (eprWsdlSource == null) {
- throw new WebServiceException(ProviderApiMessages.NULL_WSDL());
- }
- try {
- WSDLModel eprWsdlMdl = parseWSDL(new URL(wsepr.getAddress()), eprWsdlSource, null);
- wsdlService = eprWsdlMdl.getService(serviceName);
- if (wsdlService == null)
- throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME(serviceName,
- buildNameList(eprWsdlMdl.getServices().keySet())));
- } catch (MalformedURLException e) {
- throw new WebServiceException(ClientMessages.INVALID_ADDRESS(wsepr.getAddress()));
- }
- }
- portName = eprPortName;
-
- if (portName == null && portTypeName != null) {
- //get the first port corresponding to the SEI
- WSDLPort port = wsdlService.getMatchingPort(portTypeName);
- if (port == null)
- throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName));
- portName = port.getName();
- }
- if (portName == null)
- throw new WebServiceException(ProviderApiMessages.NULL_PORTNAME());
- if (wsdlService.get(portName) == null)
- throw new WebServiceException(ClientMessages.INVALID_EPR_PORT_NAME(portName, buildWsdlPortNames()));
-
- return portName;
-
- }
-
- private <T> T createProxy(final Class<T> portInterface, final InvocationHandler pis) {
-
- // When creating the proxy, use a ClassLoader that can load classes
- // from both the interface class and also from this classes
- // classloader. This is necessary when this code is used in systems
- // such as OSGi where the class loader for the interface class may
- // not be able to load internal JAX-WS classes like
- // "WSBindingProvider", but the class loader for this class may not
- // be able to load the interface class.
- final ClassLoader loader = getDelegatingLoader(portInterface.getClassLoader(),
- WSServiceDelegate.class.getClassLoader());
-
- // accessClassInPackage privilege needs to be granted ...
- RuntimePermission perm = new RuntimePermission("accessClassInPackage.com.sun." + "xml.internal.*");
- PermissionCollection perms = perm.newPermissionCollection();
- perms.add(perm);
-
- return AccessController.doPrivileged(
- new PrivilegedAction<T>() {
- @Override
- public T run() {
- Object proxy = Proxy.newProxyInstance(loader,
- new Class[]{portInterface, WSBindingProvider.class, Closeable.class}, pis);
- return portInterface.cast(proxy);
- }
- },
- new AccessControlContext(
- new ProtectionDomain[]{
- new ProtectionDomain(null, perms)
- })
- );
- }
-
- private WSDLService getWSDLModelfromSEI(final Class sei) {
- WebService ws = AccessController.doPrivileged(new PrivilegedAction<WebService>() {
- public WebService run() {
- return (WebService) sei.getAnnotation(WebService.class);
- }
- });
- if (ws == null || ws.wsdlLocation().equals(""))
- return null;
- String wsdlLocation = ws.wsdlLocation();
- wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation));
- Source wsdl = new StreamSource(wsdlLocation);
- WSDLService service = null;
-
- try {
- URL url = wsdl.getSystemId() == null ? null : new URL(wsdl.getSystemId());
- WSDLModel model = parseWSDL(url, wsdl, sei);
- service = model.getService(this.serviceName);
- if (service == null)
- throw new WebServiceException(
- ClientMessages.INVALID_SERVICE_NAME(this.serviceName,
- buildNameList(model.getServices().keySet())));
- } catch (MalformedURLException e) {
- throw new WebServiceException(ClientMessages.INVALID_WSDL_URL(wsdl.getSystemId()));
- }
- return service;
- }
-
- public QName getServiceName() {
- return serviceName;
- }
-
- public Class getServiceClass() {
- return serviceClass;
- }
-
- public Iterator<QName> getPorts() throws WebServiceException {
- // KK: the spec seems to be ambigous about whether
- // this returns ports that are dynamically added or not.
- return ports.keySet().iterator();
- }
-
- @Override
- public URL getWSDLDocumentLocation() {
- if(wsdlService==null) return null;
- try {
- return new URL(wsdlService.getParent().getLocation().getSystemId());
- } catch (MalformedURLException e) {
- throw new AssertionError(e); // impossible
- }
- }
-
- private <T> T createEndpointIFBaseProxy(@Nullable WSEndpointReference epr, QName portName, Class<T> portInterface,
- WebServiceFeatureList webServiceFeatures, SEIPortInfo eif) {
- //fail if service doesnt have WSDL
- if (wsdlService == null) {
- throw new WebServiceException(ClientMessages.INVALID_SERVICE_NO_WSDL(serviceName));
- }
-
- if (wsdlService.get(portName)==null) {
- throw new WebServiceException(
- ClientMessages.INVALID_PORT_NAME(portName,buildWsdlPortNames()));
- }
-
- BindingImpl binding = eif.createBinding(webServiceFeatures, portInterface);
- InvocationHandler pis = getStubHandler(binding, eif, epr);
-
- T proxy = createProxy(portInterface, pis);
-
- if (serviceInterceptor != null) {
- serviceInterceptor.postCreateProxy((WSBindingProvider)proxy, portInterface);
- }
- return proxy;
- }
-
- protected InvocationHandler getStubHandler(BindingImpl binding, SEIPortInfo eif, @Nullable WSEndpointReference epr) {
- return new SEIStub(eif, binding, eif.model, epr);
- }
-
- /**
- * Lists up the port names in WSDL. For error diagnostics.
- */
- private StringBuilder buildWsdlPortNames() {
- Set<QName> wsdlPortNames = new HashSet<QName>();
- for (WSDLPort port : wsdlService.getPorts()) {
- wsdlPortNames.add(port.getName());
- }
- return buildNameList(wsdlPortNames);
- }
-
- /**
- * Obtains a {@link WSDLPortImpl} with error check.
- *
- * @return guaranteed to be non-null.
- */
- 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()));
- return port;
- }
-
- /**
- * Contributes to the construction of {@link WSServiceDelegate} by filling in
- * {@link SEIPortInfo} about a given SEI (linked from the {@link Service}-derived class.)
- */
- //todo: valid port in wsdl
- private SEIPortInfo addSEI(QName portName, Class portInterface, WebServiceFeatureList features) throws WebServiceException {
- boolean ownModel = useOwnSEIModel(features);
- if (ownModel) {
- // Create a new model and do not cache it
- return createSEIPortInfo(portName, portInterface, features);
- }
-
- SEIPortInfo spi = seiContext.get(portName);
- if (spi == null) {
- spi = createSEIPortInfo(portName, portInterface, features);
- seiContext.put(spi.portName, spi);
- ports.put(spi.portName, spi);
- }
- return spi;
- }
-
- public SEIModel buildRuntimeModel(QName serviceName, QName portName, Class portInterface, WSDLPort wsdlPort, WebServiceFeatureList features) {
- DatabindingFactory fac = DatabindingFactory.newInstance();
- DatabindingConfig config = new DatabindingConfig();
- config.setContractClass(portInterface);
- config.getMappingInfo().setServiceName(serviceName);
- config.setWsdlPort(wsdlPort);
- config.setFeatures(features);
- config.setClassLoader(portInterface.getClassLoader());
- config.getMappingInfo().setPortName(portName);
- config.setWsdlURL(wsdlURL);
- // if ExternalMetadataFeature present, ExternalMetadataReader will be created ...
- config.setMetadataReader(getMetadadaReader(features, portInterface.getClassLoader()));
-
- com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);
-
- return rt.getModel();
- }
-
- private MetadataReader getMetadadaReader(WebServiceFeatureList features, ClassLoader classLoader) {
- if (features == null) return null;
- com.oracle.webservices.internal.api.databinding.ExternalMetadataFeature ef =
- features.get(com.oracle.webservices.internal.api.databinding.ExternalMetadataFeature.class);
- // TODO-Miran: would it be necessary to disable secure xml processing?
- if (ef != null)
- return ef.getMetadataReader(classLoader, false);
- return null;
- }
-
- private SEIPortInfo createSEIPortInfo(QName portName, Class portInterface, WebServiceFeatureList features) {
- WSDLPort wsdlPort = getPortModel(wsdlService, portName);
- SEIModel model = buildRuntimeModel(serviceName, portName, portInterface, wsdlPort, features);
-
- return new SEIPortInfo(this, portInterface, (SOAPSEIModel) model, wsdlPort);
- }
-
- private boolean useOwnSEIModel(WebServiceFeatureList features) {
- return features.contains(UsesJAXBContextFeature.class);
- }
-
- public WSDLService getWsdlService() {
- return wsdlService;
- }
-
- static class DaemonThreadFactory implements ThreadFactory {
- @Override
- public Thread newThread(Runnable r) {
- Thread daemonThread = new Thread(r);
- daemonThread.setDaemon(Boolean.TRUE);
- return daemonThread;
- }
- }
-
- protected static final WebServiceFeature[] EMPTY_FEATURES = new WebServiceFeature[0];
-
- private static ClassLoader getDelegatingLoader(ClassLoader loader1, ClassLoader loader2) {
- if (loader1 == null) return loader2;
- if (loader2 == null) return loader1;
- return new DelegatingLoader(loader1, loader2);
- }
-
- private static final class DelegatingLoader extends ClassLoader {
- private final ClassLoader loader;
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result
- + ((loader == null) ? 0 : loader.hashCode());
- result = prime * result
- + ((getParent() == null) ? 0 : getParent().hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- DelegatingLoader other = (DelegatingLoader) obj;
- if (loader == null) {
- if (other.loader != null)
- return false;
- } else if (!loader.equals(other.loader))
- return false;
- if (getParent() == null) {
- if (other.getParent() != null)
- return false;
- } else if (!getParent().equals(other.getParent()))
- return false;
- return true;
- }
-
- DelegatingLoader(ClassLoader loader1, ClassLoader loader2) {
- super(loader2);
- this.loader = loader1;
- }
-
- protected Class findClass(String name) throws ClassNotFoundException {
- return loader.loadClass(name);
- }
-
- protected URL findResource(String name) {
- return loader.getResource(name);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DataSourceDispatch.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DataSourceDispatch.java
deleted file mode 100644
index 09fae505..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DataSourceDispatch.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.dispatch;
-
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.WSServiceDelegate;
-import com.sun.xml.internal.ws.client.PortInfo;
-import com.sun.xml.internal.ws.encoding.xml.XMLMessage;
-import com.sun.xml.internal.ws.encoding.xml.XMLMessage.MessageDataSource;
-import com.sun.xml.internal.ws.message.source.PayloadSourceMessage;
-
-import javax.activation.DataSource;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
-
-/**
- *
- * @author WS Development Team
- * @version 1.0
- */
-public class DataSourceDispatch extends DispatchImpl<DataSource> {
- @Deprecated
- public DataSourceDispatch(QName port, Service.Mode mode, WSServiceDelegate service, Tube pipe, BindingImpl binding, WSEndpointReference epr) {
- super(port, mode, service, pipe, binding, epr );
- }
-
- public DataSourceDispatch(WSPortInfo portInfo, Service.Mode mode,BindingImpl binding, WSEndpointReference epr) {
- super(portInfo, mode, binding, epr );
- }
-
- Packet createPacket(DataSource arg) {
-
- switch (mode) {
- case PAYLOAD:
- throw new IllegalArgumentException("DataSource use is not allowed in Service.Mode.PAYLOAD\n");
- case MESSAGE:
- return new Packet(XMLMessage.create(arg, binding.getFeatures()));
- default:
- throw new WebServiceException("Unrecognized message mode");
- }
- }
-
- DataSource toReturnValue(Packet response) {
- Message message = response.getInternalMessage();
- return (message instanceof MessageDataSource)
- ? ((MessageDataSource)message).getDataSource()
- : XMLMessage.getDataSource(message, binding.getFeatures());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DispatchImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DispatchImpl.java
deleted file mode 100644
index 5b3f9c1b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DispatchImpl.java
+++ /dev/null
@@ -1,659 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.client.dispatch;
-
-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.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.api.message.AddressingUtils;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Fiber;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.ContainerResolver;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.*;
-import com.sun.xml.internal.ws.encoding.soap.DeserializationException;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-import com.sun.xml.internal.ws.message.AttachmentSetImpl;
-import com.sun.xml.internal.ws.message.DataHandlerAttachment;
-import com.sun.xml.internal.ws.resources.DispatchMessages;
-
-import javax.activation.DataHandler;
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-import javax.xml.ws.AsyncHandler;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Response;
-import javax.xml.ws.Service;
-import javax.xml.ws.Service.Mode;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.http.HTTPBinding;
-import javax.xml.ws.soap.SOAPBinding;
-import javax.xml.ws.soap.SOAPFaultException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.Future;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-
-/**
- * The <code>DispatchImpl</code> abstract class provides support
- * for the dynamic invocation of a service endpoint operation using XML
- * constructs, JAXB objects or <code>SOAPMessage</code>. The <code>javax.xml.ws.Service</code>
- * interface acts as a factory for the creation of <code>DispatchImpl</code>
- * instances.
- *
- * @author WS Development Team
- * @version 1.0
- */
-public abstract class DispatchImpl<T> extends Stub implements Dispatch<T> {
-
- private static final Logger LOGGER = Logger.getLogger(DispatchImpl.class.getName());
-
- final Service.Mode mode;
- final SOAPVersion soapVersion;
- final boolean allowFaultResponseMsg;
- static final long AWAIT_TERMINATION_TIME = 800L;
-
- /**
- *
- * @param port dispatch instance is associated with this wsdl port qName
- * @param mode Service.mode associated with this Dispatch instance - Service.mode.MESSAGE or Service.mode.PAYLOAD
- * @param owner Service that created the Dispatch
- * @param pipe Master pipe for the pipeline
- * @param binding Binding of this Dispatch instance, current one of SOAP/HTTP or XML/HTTP
- */
- @Deprecated
- protected DispatchImpl(QName port, Service.Mode mode, WSServiceDelegate owner, Tube pipe, BindingImpl binding, @Nullable WSEndpointReference epr) {
- super(port, owner, pipe, binding, (owner.getWsdlService() != null)? owner.getWsdlService().get(port) : null , owner.getEndpointAddress(port), epr);
- this.mode = mode;
- this.soapVersion = binding.getSOAPVersion();
- this.allowFaultResponseMsg = false;
- }
-
- /**
- * @param portInfo dispatch instance is associated with this portInfo
- * @param mode Service.mode associated with this Dispatch instance - Service.mode.MESSAGE or Service.mode.PAYLOAD
- * @param binding Binding of this Dispatch instance, current one of SOAP/HTTP or XML/HTTP
- */
- protected DispatchImpl(WSPortInfo portInfo, Service.Mode mode, BindingImpl binding, @Nullable WSEndpointReference epr) {
- this(portInfo, mode, binding, epr, false);
- }
-
- /**
- * @param portInfo dispatch instance is associated with this portInfo
- * @param mode Service.mode associated with this Dispatch instance - Service.mode.MESSAGE or Service.mode.PAYLOAD
- * @param binding Binding of this Dispatch instance, current one of SOAP/HTTP or XML/HTTP
- * @param allowFaultResponseMsg A packet containing a SOAP fault message is allowed as the response to a request on this dispatch instance.
- */
- protected DispatchImpl(WSPortInfo portInfo, Service.Mode mode, BindingImpl binding, @Nullable WSEndpointReference epr, boolean allowFaultResponseMsg) {
- this(portInfo, mode, binding, null, epr, allowFaultResponseMsg);
- }
-
- /**
- * @param portInfo dispatch instance is associated with this portInfo
- * @param mode Service.mode associated with this Dispatch instance - Service.mode.MESSAGE or Service.mode.PAYLOAD
- * @param binding Binding of this Dispatch instance, current one of SOAP/HTTP or XML/HTTP
- * @param pipe Master pipe for the pipeline
- * @param allowFaultResponseMsg A packet containing a SOAP fault message is allowed as the response to a request on this dispatch instance.
- */
- protected DispatchImpl(WSPortInfo portInfo, Service.Mode mode, BindingImpl binding, Tube pipe, @Nullable WSEndpointReference epr, boolean allowFaultResponseMsg) {
- super(portInfo, binding, pipe, portInfo.getEndpointAddress(), epr);
- this.mode = mode;
- this.soapVersion = binding.getSOAPVersion();
- this.allowFaultResponseMsg = allowFaultResponseMsg;
- }
- /**
- *
- * @param portportInfo dispatch instance is associated with this wsdl port qName
- * @param mode Service.mode associated with this Dispatch instance - Service.mode.MESSAGE or Service.mode.PAYLOAD
- * @param pipe Master pipe for the pipeline
- * @param binding Binding of this Dispatch instance, current one of SOAP/HTTP or XML/HTTP
- * @param allowFaultResponseMsg A packet containing a SOAP fault message is allowed as the response to a request on this dispatch instance.
- */
- protected DispatchImpl(WSPortInfo portInfo, Service.Mode mode, Tube pipe, BindingImpl binding, @Nullable WSEndpointReference epr, boolean allowFaultResponseMsg) {
- super(portInfo, binding, pipe, portInfo.getEndpointAddress(), epr);
- this.mode = mode;
- this.soapVersion = binding.getSOAPVersion();
- this.allowFaultResponseMsg = allowFaultResponseMsg;
- }
-
- /**
- * Abstract method that is implemented by each concrete Dispatch class
- * @param msg message passed in from the client program on the invocation
- * @return The Message created returned as the Interface in actuallity a
- * concrete Message Type
- */
- abstract Packet createPacket(T msg);
-
- /**
- * Obtains the value to return from the response message.
- */
- abstract T toReturnValue(Packet response);
-
- public final Response<T> invokeAsync(T param) {
- Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
- try {
- if (LOGGER.isLoggable(Level.FINE)) {
- dumpParam(param, "invokeAsync(T)");
- }
- AsyncInvoker invoker = new DispatchAsyncInvoker(param);
- AsyncResponseImpl<T> ft = new AsyncResponseImpl<T>(invoker,null);
- invoker.setReceiver(ft);
- ft.run();
- return ft;
- } finally {
- ContainerResolver.getDefault().exitContainer(old);
- }
- }
-
- private void dumpParam(T param, String method) {
- if (param instanceof Packet) {
- Packet message = (Packet)param;
-
- String action;
- String msgId;
- if (LOGGER.isLoggable(Level.FINE)) {
- AddressingVersion av = DispatchImpl.this.getBinding().getAddressingVersion();
- SOAPVersion sv = DispatchImpl.this.getBinding().getSOAPVersion();
- action =
- av != null && message.getMessage() != null ?
- AddressingUtils.getAction(message.getMessage().getHeaders(), av, sv) : null;
- msgId =
- av != null && message.getMessage() != null ?
- AddressingUtils.getMessageID(message.getMessage().getHeaders(), av, sv) : null;
- LOGGER.fine("In DispatchImpl." + method + " for message with action: " + action + " and msg ID: " + msgId + " msg: " + message.getMessage());
-
- if (message.getMessage() == null) {
- LOGGER.fine("Dispatching null message for action: " + action + " and msg ID: " + msgId);
- }
- }
- }
- }
- public final Future<?> invokeAsync(T param, AsyncHandler<T> asyncHandler) {
- Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
- try {
- if (LOGGER.isLoggable(Level.FINE)) {
- dumpParam(param, "invokeAsync(T, AsyncHandler<T>)");
- }
- AsyncInvoker invoker = new DispatchAsyncInvoker(param);
- AsyncResponseImpl<T> ft = new AsyncResponseImpl<T>(invoker,asyncHandler);
- invoker.setReceiver(ft);
- invoker.setNonNullAsyncHandlerGiven(asyncHandler != null);
-
- ft.run();
- return ft;
- } finally {
- ContainerResolver.getDefault().exitContainer(old);
- }
- }
-
- /**
- * Synchronously invokes a service.
- *
- * See {@link #process(Packet, RequestContext, ResponseContextReceiver)} on
- * why it takes a {@link RequestContext} and {@link ResponseContextReceiver} as a parameter.
- */
- public final T doInvoke(T in, RequestContext rc, ResponseContextReceiver receiver){
- Packet response = null;
- try {
- try {
- checkNullAllowed(in, rc, binding, mode);
-
- Packet message = createPacket(in);
- message.setState(Packet.State.ClientRequest);
- resolveEndpointAddress(message, rc);
- setProperties(message,true);
- response = process(message,rc,receiver);
- Message msg = response.getMessage();
-
- // REVIEW: eliminate allowFaultResponseMsg, but make that behavior default for MessageDispatch, PacketDispatch
- if(msg != null && msg.isFault() &&
- !allowFaultResponseMsg) {
- SOAPFaultBuilder faultBuilder = SOAPFaultBuilder.create(msg);
- // passing null means there is no checked excpetion we're looking for all
- // it will get back to us is a protocol exception
- throw (SOAPFaultException)faultBuilder.createException(null);
- }
- } catch (JAXBException e) {
- //TODO: i18nify
- throw new DeserializationException(DispatchMessages.INVALID_RESPONSE_DESERIALIZATION(),e);
- } catch(WebServiceException e){
- //it could be a WebServiceException or a ProtocolException
- throw e;
- } catch(Throwable e){
- // it could be a RuntimeException resulting due to some internal bug or
- // its some other exception resulting from user error, wrap it in
- // WebServiceException
- throw new WebServiceException(e);
- }
-
- return toReturnValue(response);
- } finally {
- // REVIEW: Move to AsyncTransportProvider
- if (response != null && response.transportBackChannel != null)
- response.transportBackChannel.close();
- }
- }
-
- public final T invoke(T in) {
- Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
- try {
- if (LOGGER.isLoggable(Level.FINE)) {
- dumpParam(in, "invoke(T)");
- }
-
- return doInvoke(in,requestContext,this);
- } finally {
- ContainerResolver.getDefault().exitContainer(old);
- }
- }
-
- public final void invokeOneWay(T in) {
- Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
- try {
- if (LOGGER.isLoggable(Level.FINE)) {
- dumpParam(in, "invokeOneWay(T)");
- }
-
- try {
- checkNullAllowed(in, requestContext, binding, mode);
-
- Packet request = createPacket(in);
- request.setState(Packet.State.ClientRequest);
- setProperties(request,false);
- process(request,requestContext,this);
- } catch(WebServiceException e){
- //it could be a WebServiceException or a ProtocolException
- throw e;
- } catch(Throwable e){
- // it could be a RuntimeException resulting due to some internal bug or
- // its some other exception resulting from user error, wrap it in
- // WebServiceException
- throw new WebServiceException(e);
- }
- } finally {
- ContainerResolver.getDefault().exitContainer(old);
- }
- }
-
- void setProperties(Packet packet, boolean expectReply) {
- packet.expectReply = expectReply;
- }
-
- static boolean isXMLHttp(@NotNull WSBinding binding) {
- return binding.getBindingId().equals(BindingID.XML_HTTP);
- }
-
- static boolean isPAYLOADMode(@NotNull Service.Mode mode) {
- return mode == Service.Mode.PAYLOAD;
- }
-
- static void checkNullAllowed(@Nullable Object in, RequestContext rc, WSBinding binding, Service.Mode mode) {
-
- if (in != null)
- return;
-
- //With HTTP Binding a null invocation parameter can not be used
- //with HTTP Request Method == POST
- if (isXMLHttp(binding)){
- if (methodNotOk(rc))
- throw new WebServiceException(DispatchMessages.INVALID_NULLARG_XMLHTTP_REQUEST_METHOD(HTTP_REQUEST_METHOD_POST, HTTP_REQUEST_METHOD_GET));
- } else { //soapBinding
- if (mode == Service.Mode.MESSAGE )
- throw new WebServiceException(DispatchMessages.INVALID_NULLARG_SOAP_MSGMODE(mode.name(), Service.Mode.PAYLOAD.toString()));
- }
- }
-
- static boolean methodNotOk(@NotNull RequestContext rc) {
- String requestMethod = (String)rc.get(MessageContext.HTTP_REQUEST_METHOD);
- String request = (requestMethod == null)? HTTP_REQUEST_METHOD_POST: requestMethod;
- // if method == post or put with a null invocation parameter in xml/http binding this is not ok
- return HTTP_REQUEST_METHOD_POST.equalsIgnoreCase(request) || HTTP_REQUEST_METHOD_PUT.equalsIgnoreCase(request);
- }
-
- public static void checkValidSOAPMessageDispatch(WSBinding binding, Service.Mode mode) {
- // Dispatch<SOAPMessage> is only valid for soap binding and in Service.Mode.MESSAGE
- if (DispatchImpl.isXMLHttp(binding))
- throw new WebServiceException(DispatchMessages.INVALID_SOAPMESSAGE_DISPATCH_BINDING(HTTPBinding.HTTP_BINDING, SOAPBinding.SOAP11HTTP_BINDING + " or " + SOAPBinding.SOAP12HTTP_BINDING));
- if (DispatchImpl.isPAYLOADMode(mode))
- throw new WebServiceException(DispatchMessages.INVALID_SOAPMESSAGE_DISPATCH_MSGMODE(mode.name(), Service.Mode.MESSAGE.toString()));
- }
-
- public static void checkValidDataSourceDispatch(WSBinding binding, Service.Mode mode) {
- // Dispatch<DataSource> is only valid with xml/http binding and in Service.Mode.MESSAGE
- if (!DispatchImpl.isXMLHttp(binding))
- throw new WebServiceException(DispatchMessages.INVALID_DATASOURCE_DISPATCH_BINDING("SOAP/HTTP", HTTPBinding.HTTP_BINDING));
- if (DispatchImpl.isPAYLOADMode(mode))
- throw new WebServiceException(DispatchMessages.INVALID_DATASOURCE_DISPATCH_MSGMODE(mode.name(), Service.Mode.MESSAGE.toString()));
- }
-
- public final @NotNull QName getPortName() {
- return portname;
- }
-
- void resolveEndpointAddress(@NotNull final Packet message, @NotNull final RequestContext requestContext) {
- final boolean p = message.packetTakesPriorityOverRequestContext;
-
- //resolve endpoint look for query parameters, pathInfo
- String endpoint;
- if (p && message.endpointAddress != null) {
- endpoint = message.endpointAddress.toString();
- } else {
- endpoint = (String) requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
- }
- // This is existing before packetTakesPriorityOverRequestContext so leaving in place.
- if (endpoint == null) {
- if (message.endpointAddress == null) throw new WebServiceException(DispatchMessages.INVALID_NULLARG_URI());
- endpoint = message.endpointAddress.toString();
- }
-
- String pathInfo = null;
- String queryString = null;
- if (p && message.invocationProperties.get(MessageContext.PATH_INFO) != null) {
- pathInfo = (String) message.invocationProperties.get(MessageContext.PATH_INFO);
- } else if (requestContext.get(MessageContext.PATH_INFO) != null) {
- pathInfo = (String) requestContext.get(MessageContext.PATH_INFO);
- }
-
- if (p && message.invocationProperties.get(MessageContext.QUERY_STRING) != null) {
- queryString = (String) message.invocationProperties.get(MessageContext.QUERY_STRING);
- } else if (requestContext.get(MessageContext.QUERY_STRING) != null) {
- queryString = (String) requestContext.get(MessageContext.QUERY_STRING);
- }
-
- if (pathInfo != null || queryString != null) {
- pathInfo = checkPath(pathInfo);
- queryString = checkQuery(queryString);
- if (endpoint != null) {
- try {
- final URI endpointURI = new URI(endpoint);
- endpoint = resolveURI(endpointURI, pathInfo, queryString);
- } catch (URISyntaxException e) {
- throw new WebServiceException(DispatchMessages.INVALID_URI(endpoint));
- }
- }
- }
- // These two lines used to be inside the above if. It is outside so:
- // - in cases where there is no setting of address on a Packet before invocation or no pathInfo/queryString
- // this will just put back what it found in the requestContext - basically a noop.
- // - but when info is in the Packet this will update so it will get used later.
- // Remember - we are operating on a copied RequestContext at this point - not the sticky one in the Stub.
- requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpoint);
- // This is not necessary because a later step will copy the resolvedEndpoint put above into message.
- //message.endpointAddress = EndpointAddress.create(endpoint);
- }
-
- protected @NotNull String resolveURI(@NotNull URI endpointURI, @Nullable String pathInfo, @Nullable String queryString) {
- String query = null;
- String fragment = null;
- if (queryString != null) {
- final URI result;
- try {
- URI tp = new URI(null, null, endpointURI.getPath(), queryString, null);
- result = endpointURI.resolve(tp);
- } catch (URISyntaxException e) {
- throw new WebServiceException(DispatchMessages.INVALID_QUERY_STRING(queryString));
- }
- query = result.getQuery();
- fragment = result.getFragment();
- }
-
- final String path = (pathInfo != null) ? pathInfo : endpointURI.getPath();
- try {
- //final URI temp = new URI(null, null, path, query, fragment);
- //return endpointURI.resolve(temp).toURL().toExternalForm();
- // Using the following HACK instead of the above to avoid double encoding of
- // the query. Application's QUERY_STRING is encoded using URLEncoder.encode().
- // If we use that query in URI's constructor, it is encoded again.
- // URLEncoder's encoding is not the same as URI's encoding of the query.
- // See {@link URL}
- StringBuilder spec = new StringBuilder();
- if (path != null) {
- spec.append(path);
- }
- if (query != null) {
- spec.append("?");
- spec.append(query);
- }
- if (fragment != null) {
- spec.append("#");
- spec.append(fragment);
- }
- return new URL(endpointURI.toURL(), spec.toString()).toExternalForm();
- } catch (MalformedURLException e) {
- throw new WebServiceException(DispatchMessages.INVALID_URI_RESOLUTION(path));
- }
- }
-
- private static String checkPath(@Nullable String path) {
- //does it begin with /
- return (path == null || path.startsWith("/")) ? path : "/" + path;
- }
-
- private static String checkQuery(@Nullable String query) {
- if (query == null) return null;
-
- if (query.indexOf('?') == 0)
- throw new WebServiceException(DispatchMessages.INVALID_QUERY_LEADING_CHAR(query));
- return query;
- }
-
-
- protected AttachmentSet setOutboundAttachments() {
- HashMap<String, DataHandler> attachments = (HashMap<String, DataHandler>)
- getRequestContext().get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
-
- if (attachments != null) {
- List<Attachment> alist = new ArrayList();
- for (Map.Entry<String, DataHandler> att : attachments.entrySet()) {
- DataHandlerAttachment dha = new DataHandlerAttachment(att.getKey(), att.getValue());
- alist.add(dha);
- }
- return new AttachmentSetImpl(alist);
- }
- return new AttachmentSetImpl();
- }
-
- /* private void getInboundAttachments(Message msg) {
- AttachmentSet attachments = msg.getAttachments();
- if (!attachments.isEmpty()) {
- Map<String, DataHandler> in = new HashMap<String, DataHandler>();
- for (Attachment attachment : attachments)
- in.put(attachment.getContentId(), attachment.asDataHandler());
- getResponseContext().put(MessageContext.INBOUND_MESSAGE_ATTACHMENTS, in);
- }
-
- }
- */
-
-
- /**
- * Calls {@link DispatchImpl#doInvoke(Object,RequestContext,ResponseContextReceiver)}.
- */
- private class Invoker implements Callable {
- private final T param;
- // snapshot the context now. this is necessary to avoid concurrency issue,
- // and is required by the spec
- private final RequestContext rc = requestContext.copy();
-
- /**
- * Because of the object instantiation order,
- * we can't take this as a constructor parameter.
- */
- private ResponseContextReceiver receiver;
-
- Invoker(T param) {
- this.param = param;
- }
-
- public T call() throws Exception {
- if (LOGGER.isLoggable(Level.FINE)) {
- dumpParam(param, "call()");
- }
- return doInvoke(param,rc,receiver);
- }
-
- void setReceiver(ResponseContextReceiver receiver) {
- this.receiver = receiver;
- }
- }
-
- /**
- *
- */
- private class DispatchAsyncInvoker extends AsyncInvoker {
- private final T param;
- // snapshot the context now. this is necessary to avoid concurrency issue,
- // and is required by the spec
- private final RequestContext rc = requestContext.copy();
-
- DispatchAsyncInvoker(T param) {
- this.param = param;
- }
-
- public void do_run () {
- checkNullAllowed(param, rc, binding, mode);
- final Packet message = createPacket(param);
- message.setState(Packet.State.ClientRequest);
- message.nonNullAsyncHandlerGiven = this.nonNullAsyncHandlerGiven;
- resolveEndpointAddress(message, rc);
- setProperties(message,true);
-
- String action = null;
- String msgId = null;
- if (LOGGER.isLoggable(Level.FINE)) {
- AddressingVersion av = DispatchImpl.this.getBinding().getAddressingVersion();
- SOAPVersion sv = DispatchImpl.this.getBinding().getSOAPVersion();
- action =
- av != null && message.getMessage() != null ?
- AddressingUtils.getAction(message.getMessage().getHeaders(), av, sv) : null;
- msgId =
- av != null&& message.getMessage() != null ?
- AddressingUtils.getMessageID(message.getMessage().getHeaders(), av, sv) : null;
- LOGGER.fine("In DispatchAsyncInvoker.do_run for async message with action: " + action + " and msg ID: " + msgId);
- }
-
- final String actionUse = action;
- final String msgIdUse = msgId;
-
- Fiber.CompletionCallback callback = new Fiber.CompletionCallback() {
- public void onCompletion(@NotNull Packet response) {
-
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine("Done with processAsync in DispatchAsyncInvoker.do_run, and setting response for async message with action: " + actionUse + " and msg ID: " + msgIdUse);
- }
-
- Message msg = response.getMessage();
-
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine("Done with processAsync in DispatchAsyncInvoker.do_run, and setting response for async message with action: " + actionUse + " and msg ID: " + msgIdUse + " msg: " + msg);
- }
-
- try {
- if(msg != null && msg.isFault() &&
- !allowFaultResponseMsg) {
- SOAPFaultBuilder faultBuilder = SOAPFaultBuilder.create(msg);
- // passing null means there is no checked excpetion we're looking for all
- // it will get back to us is a protocol exception
- throw (SOAPFaultException)faultBuilder.createException(null);
- }
- responseImpl.setResponseContext(new ResponseContext(response));
- responseImpl.set(toReturnValue(response), null);
- } catch (JAXBException e) {
- //TODO: i18nify
- responseImpl.set(null, new DeserializationException(DispatchMessages.INVALID_RESPONSE_DESERIALIZATION(),e));
- } catch(WebServiceException e){
- //it could be a WebServiceException or a ProtocolException
- responseImpl.set(null, e);
- } catch(Throwable e){
- // It could be any RuntimeException resulting due to some internal bug.
- // or its some other exception resulting from user error, wrap it in
- // WebServiceException
- responseImpl.set(null, new WebServiceException(e));
- }
- }
- public void onCompletion(@NotNull Throwable error) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine("Done with processAsync in DispatchAsyncInvoker.do_run, and setting response for async message with action: " + actionUse + " and msg ID: " + msgIdUse + " Throwable: " + error.toString());
- }
- if (error instanceof WebServiceException) {
- responseImpl.set(null, error);
-
- } else {
- //its RuntimeException or some other exception resulting from user error, wrap it in
- // WebServiceException
- responseImpl.set(null, new WebServiceException(error));
- }
- }
- };
- processAsync(responseImpl,message,rc, callback);
- }
- }
-
- public void setOutboundHeaders(Object... headers) {
- throw new UnsupportedOperationException();
- }
-
- static final String HTTP_REQUEST_METHOD_GET="GET";
- static final String HTTP_REQUEST_METHOD_POST="POST";
- static final String HTTP_REQUEST_METHOD_PUT="PUT";
-
- @Deprecated
- public static Dispatch<Source> createSourceDispatch(QName port, Mode mode, WSServiceDelegate owner, Tube pipe, BindingImpl binding, WSEndpointReference epr) {
- if(isXMLHttp(binding))
- return new RESTSourceDispatch(port,mode,owner,pipe,binding,epr);
- else
- return new SOAPSourceDispatch(port,mode,owner,pipe,binding,epr);
- }
-
- public static Dispatch<Source> createSourceDispatch(WSPortInfo portInfo, Mode mode, BindingImpl binding, WSEndpointReference epr) {
- if (isXMLHttp(binding))
- return new RESTSourceDispatch(portInfo, mode, binding, epr);
- else
- return new SOAPSourceDispatch(portInfo, mode, binding, epr);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/JAXBDispatch.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/JAXBDispatch.java
deleted file mode 100644
index 8821a41a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/JAXBDispatch.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.dispatch;
-
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.Headers;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Messages;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.WSServiceDelegate;
-import com.sun.xml.internal.ws.message.jaxb.JAXBDispatchMessage;
-import com.sun.xml.internal.ws.spi.db.BindingContextFactory;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
-
-/**
- * The <code>JAXBDispatch</code> class provides support
- * for the dynamic invocation of a service endpoint operation using
- * JAXB objects. The <code>javax.xml.ws.Service</code>
- * interface acts as a factory for the creation of <code>JAXBDispatch</code>
- * instances.
- *
- * @author WS Development Team
- * @version 1.0
- */
-public class JAXBDispatch extends DispatchImpl<Object> {
-
- private final JAXBContext jaxbcontext;
-
- // We will support a JAXBContext parameter from an unknown JAXB
- // implementation by marshaling and unmarshaling directly from the
- // context object, as there is no Bond available.
- private final boolean isContextSupported;
-
- @Deprecated
- public JAXBDispatch(QName port, JAXBContext jc, Service.Mode mode, WSServiceDelegate service, Tube pipe, BindingImpl binding, WSEndpointReference epr) {
- super(port, mode, service, pipe, binding, epr);
- this.jaxbcontext = jc;
- this.isContextSupported = BindingContextFactory.isContextSupported(jc);
- }
-
- public JAXBDispatch(WSPortInfo portInfo, JAXBContext jc, Service.Mode mode, BindingImpl binding, WSEndpointReference epr) {
- super(portInfo, mode, binding, epr);
- this.jaxbcontext = jc;
- this.isContextSupported = BindingContextFactory.isContextSupported(jc);
- }
-
- Object toReturnValue(Packet response) {
- try {
- Unmarshaller unmarshaller = jaxbcontext.createUnmarshaller();
- Message msg = response.getMessage();
- switch (mode) {
- case PAYLOAD:
- return msg.<Object>readPayloadAsJAXB(unmarshaller);
- case MESSAGE:
- Source result = msg.readEnvelopeAsSource();
- return unmarshaller.unmarshal(result);
- default:
- throw new WebServiceException("Unrecognized dispatch mode");
- }
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
- }
-
-
- Packet createPacket(Object msg) {
- assert jaxbcontext != null;
-
- Message message;
- if (mode == Service.Mode.MESSAGE) {
- message = isContextSupported ?
- new JAXBDispatchMessage(BindingContextFactory.create(jaxbcontext), msg, soapVersion) :
- new JAXBDispatchMessage(jaxbcontext, msg, soapVersion);
- } else {
- if (msg == null) {
- message = Messages.createEmpty(soapVersion);
- } else {
- message = isContextSupported ?
- Messages.create(jaxbcontext, msg, soapVersion) :
- Messages.createRaw(jaxbcontext, msg, soapVersion);
- }
- }
-
- return new Packet(message);
-
- }
-
- public void setOutboundHeaders(Object... headers) {
- if (headers == null)
- throw new IllegalArgumentException();
- Header[] hl = new Header[headers.length];
- for (int i = 0; i < hl.length; i++) {
- if (headers[i] == null)
- throw new IllegalArgumentException();
- // TODO: handle any JAXBContext.
- hl[i] = Headers.create((JAXBRIContext) jaxbcontext, headers[i]);
- }
- super.setOutboundHeaders(hl);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/MessageDispatch.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/MessageDispatch.java
deleted file mode 100644
index f226b938..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/MessageDispatch.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.dispatch;
-
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.WSServiceDelegate;
-import com.sun.xml.internal.ws.client.PortInfo;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Service.Mode;
-
-/**
- * {@link Dispatch} implementation for {@link Message}.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.1.1
- */
-public class MessageDispatch extends DispatchImpl<Message> {
- @Deprecated
- public MessageDispatch(QName port, WSServiceDelegate service, Tube pipe, BindingImpl binding, WSEndpointReference epr) {
- super(port, Mode.MESSAGE, service, pipe, binding, epr);
- }
-
- public MessageDispatch(WSPortInfo portInfo, BindingImpl binding, WSEndpointReference epr) {
- super(portInfo, Mode.MESSAGE, binding, epr, true);
- }
-
- @Override
- Message toReturnValue(Packet response) {
- return response.getMessage();
- }
-
- @Override
- Packet createPacket(Message msg) {
- return new Packet(msg);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/PacketDispatch.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/PacketDispatch.java
deleted file mode 100644
index e2e17e1f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/PacketDispatch.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.dispatch;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.client.ThrowableInPacketCompletionFeature;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Fiber;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.WSServiceDelegate;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Service.Mode;
-
-/**
- * {@link Dispatch} implementation for {@link Packet}.
- *
- * @since 2.2.6
- */
-public class PacketDispatch extends DispatchImpl<Packet> {
- private final boolean isDeliverThrowableInPacket;
-
- @Deprecated
- public PacketDispatch(QName port, WSServiceDelegate owner, Tube pipe, BindingImpl binding, @Nullable WSEndpointReference epr) {
- super(port, Mode.MESSAGE, owner, pipe, binding, epr);
- isDeliverThrowableInPacket = calculateIsDeliverThrowableInPacket(binding);
- }
-
-
- public PacketDispatch(WSPortInfo portInfo, Tube pipe, BindingImpl binding, WSEndpointReference epr) {
- this(portInfo, pipe, binding, epr, true);
- }
-
- public PacketDispatch(WSPortInfo portInfo, Tube pipe, BindingImpl binding, WSEndpointReference epr, boolean allowFaultResponseMsg) {
- super(portInfo, Mode.MESSAGE, pipe, binding, epr, allowFaultResponseMsg);
- isDeliverThrowableInPacket = calculateIsDeliverThrowableInPacket(binding);
- }
-
- public PacketDispatch(WSPortInfo portInfo, BindingImpl binding, WSEndpointReference epr) {
- super(portInfo, Mode.MESSAGE, binding, epr, true);
- isDeliverThrowableInPacket = calculateIsDeliverThrowableInPacket(binding);
- }
-
- private boolean calculateIsDeliverThrowableInPacket(BindingImpl binding) {
- return binding.isFeatureEnabled(ThrowableInPacketCompletionFeature.class);
- }
-
- @Override
- protected void configureFiber(Fiber fiber) {
- fiber.setDeliverThrowableInPacket(isDeliverThrowableInPacket);
- }
-
- @Override
- Packet toReturnValue(Packet response) {
- return response;
- }
-
- @Override
- Packet createPacket(Packet request) {
- return request;
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/RESTSourceDispatch.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/RESTSourceDispatch.java
deleted file mode 100644
index a532cb6e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/RESTSourceDispatch.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.dispatch;
-
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Messages;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.WSServiceDelegate;
-import com.sun.xml.internal.ws.client.PortInfo;
-import com.sun.xml.internal.ws.encoding.xml.XMLMessage;
-import com.sun.xml.internal.ws.message.source.PayloadSourceMessage;
-import static com.sun.xml.internal.ws.binding.WebServiceFeatureList.toFeatureArray;
-
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Service.Mode;
-import java.io.IOException;
-
-/**
- * {@link Dispatch} implementation for {@link Source} and XML/HTTP binding.
- *
- * @author Kathy Walsh
- * @author Kohsuke Kawaguchi
- * @see SOAPSourceDispatch
- */
-final class RESTSourceDispatch extends DispatchImpl<Source> {
- @Deprecated
- public RESTSourceDispatch(QName port, Mode mode, WSServiceDelegate owner, Tube pipe, BindingImpl binding, WSEndpointReference epr) {
- super(port, mode, owner, pipe, binding, epr);
- assert isXMLHttp(binding);
- }
-
- public RESTSourceDispatch(WSPortInfo portInfo, Mode mode, BindingImpl binding, WSEndpointReference epr) {
- super(portInfo, mode, binding, epr);
- assert isXMLHttp(binding);
- }
-
- @Override
- Source toReturnValue(Packet response) {
- Message msg = response.getMessage();
- try {
- return new StreamSource(XMLMessage.getDataSource(msg, binding.getFeatures()).getInputStream());
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-
- @Override
- Packet createPacket(Source msg) {
- Message message;
-
- if(msg==null)
- message = Messages.createEmpty(soapVersion);
- else
- message = new PayloadSourceMessage(null, msg, setOutboundAttachments(), soapVersion);
-
- return new Packet(message);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPMessageDispatch.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPMessageDispatch.java
deleted file mode 100644
index 3dc0842f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPMessageDispatch.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.dispatch;
-
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.WSServiceDelegate;
-import com.sun.xml.internal.ws.client.PortInfo;
-import com.sun.xml.internal.ws.message.saaj.SAAJMessage;
-import com.sun.xml.internal.ws.resources.DispatchMessages;
-import com.sun.xml.internal.ws.transport.Headers;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.MimeHeader;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.MessageContext;
-
-import java.util.Iterator;
-
-/**
- * The <code>SOAPMessageDispatch</code> class provides support
- * for the dynamic invocation of a service endpoint operation using
- * the <code>SOAPMessage</code> class. The <code>javax.xml.ws.Service</code>
- * interface acts as a factory for the creation of <code>SOAPMessageDispatch</code>
- * instances.
- *
- * @author WS Development Team
- * @version 1.0
- */
-public class SOAPMessageDispatch extends com.sun.xml.internal.ws.client.dispatch.DispatchImpl<SOAPMessage> {
- @Deprecated
- public SOAPMessageDispatch(QName port, Service.Mode mode, WSServiceDelegate owner, Tube pipe, BindingImpl binding, WSEndpointReference epr) {
- super(port, mode, owner, pipe, binding, epr);
- }
-
- public SOAPMessageDispatch(WSPortInfo portInfo, Service.Mode mode, BindingImpl binding, WSEndpointReference epr) {
- super(portInfo, mode, binding, epr);
- }
-
- Packet createPacket(SOAPMessage arg) {
- Iterator iter = arg.getMimeHeaders().getAllHeaders();
- Headers ch = new Headers();
- while(iter.hasNext()) {
- MimeHeader mh = (MimeHeader) iter.next();
- ch.add(mh.getName(), mh.getValue());
- }
- Packet packet = new Packet(SAAJFactory.create(arg));
- packet.invocationProperties.put(MessageContext.HTTP_REQUEST_HEADERS, ch);
- return packet;
- }
-
- SOAPMessage toReturnValue(Packet response) {
- try {
-
- //not sure if this is the correct way to deal with this.
- if ( response ==null || response.getMessage() == null )
- throw new WebServiceException(DispatchMessages.INVALID_RESPONSE());
- else
- return response.getMessage().readAsSOAPMessage();
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPSourceDispatch.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPSourceDispatch.java
deleted file mode 100644
index 14886439..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPSourceDispatch.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.dispatch;
-
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Messages;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.WSServiceDelegate;
-import com.sun.xml.internal.ws.client.PortInfo;
-import com.sun.xml.internal.ws.message.source.PayloadSourceMessage;
-
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-import javax.xml.ws.Service.Mode;
-import javax.xml.ws.WebServiceException;
-
-
-/**
- * The <code>SOAPSourceDispatch</code> class provides support
- * for the dynamic invocation of a service endpoint operation using XML
- * constructs. The <code>javax.xml.ws.Service</code>
- * interface acts as a factory for the creation of <code>SOAPSourceDispatch</code>
- * instances.
- *
- * @author WS Development Team
- * @version 1.0
- * @see RESTSourceDispatch
- */
-final class SOAPSourceDispatch extends DispatchImpl<Source> {
- @Deprecated
- public SOAPSourceDispatch(QName port, Mode mode, WSServiceDelegate owner, Tube pipe, BindingImpl binding, WSEndpointReference epr) {
- super(port, mode, owner, pipe, binding, epr);
- assert !isXMLHttp(binding);
- }
-
- public SOAPSourceDispatch(WSPortInfo portInfo, Mode mode, BindingImpl binding, WSEndpointReference epr) {
- super(portInfo, mode, binding, epr);
- assert !isXMLHttp(binding);
- }
-
-
- Source toReturnValue(Packet response) {
- Message msg = response.getMessage();
-
- switch (mode) {
- case PAYLOAD:
- return msg.readPayloadAsSource();
- case MESSAGE:
- return msg.readEnvelopeAsSource();
- default:
- throw new WebServiceException("Unrecognized dispatch mode");
- }
- }
-
- @Override
- Packet createPacket(Source msg) {
-
- final Message message;
-
- if (msg == null)
- message = Messages.createEmpty(soapVersion);
- else {
- switch (mode) {
- case PAYLOAD:
- message = new PayloadSourceMessage(null, msg, setOutboundAttachments(), soapVersion);
- break;
- case MESSAGE:
- message = Messages.create(msg, soapVersion);
- break;
- default:
- throw new WebServiceException("Unrecognized message mode");
- }
- }
-
- return new Packet(message);
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/package-info.java
deleted file mode 100644
index 2df6fd5b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/package-info.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * <h1>JAX-WS 2.0.1 Client Runtime</h1>
- * <P>This document describes the architecture of client side
- * JAX-WS 2.0.1 runtime.
- *
- * <h3>JAX-WS 2.0.1 Client Sequence Diagram</h3>
- * <img src='../../../../../jaxws/basic-client.seq.png'>
- * <h3>JAX-WS 2.0.1 Asynchronous Invocation Sequence Diagram</h3>
- * <img src='../../../../../jaxws/client-async.seq.png'>
- * <h3>JAX-WS 2.0.1 Dispatch Invocation Sequence Diagram</h3>
- * <img src='../../../../../jaxws/dispatch.seq.png'>
-
- * <H3>Message Flow</H3>
- * {@link com.sun.xml.internal.ws.client.WebService} provides client view of a Web service.
- * WebService.getPort returns an instance of {@link com.sun.xml.internal.ws.client.EndpointIFInvocationHandler}
- * with {@link com.sun.pept.ept.ContactInfoList} and {@link com.sun.pept.Delegate}
- * initialized. A method invocation on the port, obtained from WebService, invokes
- * {@link com.sun.xml.internal.ws.client.EndpointIFInvocationHandler#invoke}. This method
- * then creates a {@link com.sun.pept.ept.MessageInfo} and populates the data
- * (parameters specified by the user) and metadata such as RuntimeContext, RequestContext,
- * Message Exchange Pattern into this MessageInfo. This method then invokes
- * {@link com.sun.pept.Delegate#send} and returns the response.
- * <P></P>
- * The Delegate.send method iterates through the ContactInfoList and picks up the
- * correct {@link com.sun.pept.ept.ContactInfo} based upon the binding id of
- * {@link javax.xml.ws.BindingProvider} and sets it on the MessageInfo. After the
- * Delegate obtains a specific ContactInfo it uses that ContactInfo to obtain a
- * protocol-specific {@link com.sun.pept.protocol.MessageDispatcher}. There will be
- * two types of client-side MessageDispatchers for JAX-WS 2.0.1,
- * {@link com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher} and
- * {@link com.sun.xml.internal.ws.protocol.xml.client.XMLMessageDispatcher}. The Delegate
- * then invokes {@link com.sun.pept.protocol.MessageDispatcher#send}. The
- * MessageDispatcher.send method makes a decision about the synchronous and
- * asynchronous nature of the message exchange pattern and invokes separate methods
- * accordingly.
- * <p></P>
- * The MessageDispatcher uses ContactInfo to obtain
- * a {@link com.sun.xml.internal.ws.encoding.soap.client.SOAPXMLEncoder} which converts
- * the MessageInfo to {@link com.sun.xml.internal.ws.encoding.soap.internal.InternalMessage}.
- * There will be two types of client-side SOAPXMLEncoder for JAX-WS 2.0.1,
- * SOAPXMEncoder for SOAP 1.1 and {@link com.sun.xml.internal.ws.encoding.soap.client.SOAP12XMLEncoder}
- * for SOAP 1.2. The MessageDispatcher invokes configured handlers and use the
- * codec to convert the InternalMessage to a {@link javax.xml.soap.SOAPMessage}.
- * The metadata from the MessageInfo is classified into {@link javax.xml.soap.MimeHeaders}
- * of this SOAPMessage and context information for {@link com.sun.xml.internal.ws.api.server.WSConnection}.
- * The SOAPMessge is then written to the output stream of the WSConnection
- * obtained from MessageInfo.
- *<P></P>
- * The MessageDispatcher.receive method handles the response. The
- * SOAPMessageDispatcher extracts the SOAPMessage from the input stream of
- * WSConnection and performs the mustUnderstand processing followed by invocation
- * of any handlers. The MessageDispatcher uses ContactInfo to obtain a
- * {@link com.sun.xml.internal.ws.encoding.soap.client.SOAPXMLDecoder} which converts the SOAPMessage
- * to InternalMessage and then InternalMessage to MessageInfo. There will be two types of
- * client-side SOAPXMLDecoder for JAX-WS 2.0.1, SOAPXMLDencoder for SOAP 1.1 and
- * {@link com.sun.xml.internal.ws.encoding.soap.client.SOAP12XMLDecoder} for SOAP 1.2. The
- * response is returned back to the client code via Delegate.
- *
- * <H3>External Interactions</H3>
- * <H4>SAAJ API</H4>
- * <UL>
- * <LI><P>JAX-WS creates SAAJ SOAPMessage from the HttpServletRequest.
- * At present, JAX-WS reads all the bytes from the request stream and
- * then creates SOAPMessage along with the HTTP headers.</P>
- * </UL>
- * <P>MessageFactory(binding).createMessage(MimeHeaders, InputStream)</P>
- * <UL>
- * <LI><P>SOAPMessage parses the content from the stream including MIME
- * data</P>
- * <LI><P>com.sun.xml.internal.ws.server.SOAPMessageDispatcher::checkHeadersPeekBody()</P>
- * <P>SOAPMessage.getSOAPHeader() is used for mustUnderstand processing
- * of headers. It further uses
- * SOAPHeader.examineMustUnderstandHeaderElements(role)</P>
- * <P>SOAPMessage.getSOAPBody().getFistChild() is used for guessing the
- * MEP of the request</P>
- * <LI><P>com.sun.xml.internal.ws.handler.HandlerChainCaller:insertFaultMessage()</P>
- * <P>SOAPMessage.getSOAPPart().getEnvelope() and some other SAAJ calls
- * are made to create a fault in the SOAPMessage</P>
- * <LI><P>com.sun.xml.internal.ws.handler.LogicalMessageImpl::getPayload()
- * interacts with SAAJ to get body from SOAPMessage</P>
- * <LI><P>com.sun.xml.internal.ws.encoding.soap.SOAPEncoder.toSOAPMessage(com.sun.xml.internal.ws.encoding.soap.internal.InternalMessage,
- * SOAPMessage). There is a scenario where there is SOAPMessage and a
- * logical handler sets payload as Source. To write to the stream,
- * SOAPMessage.writeTo() is used but before that the body needs to be
- * updated with logical handler' Source. Need to verify if this
- * scenario is still happening since Handler.close() is changed to take
- * MessageContext.</P>
- * <LI><P>com.sun.xml.internal.ws.handlerSOAPMessageContextImpl.getHeaders()
- * uses SAAJ API to get headers.</P>
- * <LI><P>SOAPMessage.writeTo() is used to write response. At present,
- * it writes into byte[] and this byte[] is written to
- * HttpServletResponse.</P>
- * </UL>
- * <H4>JAXB API</H4>
- * <P>JAX-WS RI uses the JAXB API to marshall/unmarshall user created
- * JAXB objects with user created {@link javax.xml.bind.JAXBContext JAXBContext}.
- * Handler, Dispatch in JAX-WS API provide ways for the user to specify his/her own
- * JAXBContext. {@link com.sun.xml.internal.ws.encoding.jaxb.JAXBTypeSerializer JAXBTypeSerializer} class uses all these methods.</P>
- * <UL>
- * <LI><p>{@link javax.xml.bind.Marshaller#marshal(Object,XMLStreamWriter) Marshaller.marshal(Object,XMLStreamWriter)}</p>
- * <LI><P>{@link javax.xml.bind.Marshaller#marshal(Object,Result) Marshaller.marshal(Object, DomResult)}</P>
- * <LI><P>{@link javax.xml.bind.Unmarshaller#unmarshal(XMLStreamReader) Object Unmarshaller.unmarshal(XMLStreamReader)}</P>
- * <LI><P>{@link javax.xml.bind.Unmarshaller#unmarshal(Source) Object Unmarshaller.unmarshal(Source)}</P>
- * </UL>
- * The following two JAXB classes are implemented by JAX-WS to enable/implement MTOM and XOP
- * <UL>
- * <LI><P>{@link javax.xml.bind.attachment.AttachmentMarshaller AttachmentMarshaller}</P>
- * <LI><P>{@link javax.xml.bind.attachment.AttachmentUnmarshaller AttachmentUnmarshaller}</P>
- * </UL>
- * <H4>JAXB Runtime-API (private contract)</H4>
- * <P>JAX-WS RI uses these private API for serialization/deserialization
- * purposes. This private API is used to serialize/deserialize method
- * parameters at the time of JAXBTypeSerializer class uses all
- * these methods.</P>
- * <UL>
- * <LI><P>{@link com.sun.xml.internal.bind.api.Bridge#marshal(BridgeContext, Object, XMLStreamWriter) Bridge.marshal(BridgeContext, Object, XMLStreamWriter)}</P>
- * <LI><P>{@link com.sun.xml.internal.bind.api.Bridge#marshal(BridgeContext, Object, Node) Bridge.marshal(BridgeContext, Object, Node)}</P>
- * <LI><P>{@link com.sun.xml.internal.bind.api.Bridge#unmarshal(BridgeContext, XMLStreamReader) Object Bridge.unmarshal(BridgeContext, XMLStreamReader)}</P>
- * </UL>
- *
- * @ArchitectureDocument
- **/
-package com.sun.xml.internal.ws.client;
-
-import com.sun.xml.internal.bind.api.BridgeContext;
-
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.w3c.dom.Node;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/AsyncMethodHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/AsyncMethodHandler.java
deleted file mode 100644
index 24119c4a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/AsyncMethodHandler.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.sei;
-
-//import com.sun.tools.internal.ws.wsdl.document.soap.SOAPBinding;
-
-import com.oracle.webservices.internal.api.databinding.JavaCallInfo;
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Fiber;
-import com.sun.xml.internal.ws.client.AsyncInvoker;
-import com.sun.xml.internal.ws.client.AsyncResponseImpl;
-import com.sun.xml.internal.ws.client.RequestContext;
-import com.sun.xml.internal.ws.client.ResponseContext;
-
-import javax.xml.ws.AsyncHandler;
-import javax.xml.ws.Response;
-import javax.xml.ws.WebServiceException;
-
-import java.lang.reflect.Method;
-
-/**
- * Common part between {@link CallbackMethodHandler} and {@link PollingMethodHandler}.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-abstract class AsyncMethodHandler extends MethodHandler {
-
- AsyncMethodHandler(SEIStub owner, Method m) {
- super(owner, m);
- }
-
-// private final ResponseBuilder responseBuilder;
-// /**
-// * Async bean class that has setters for all out parameters
-// */
-// private final @Nullable Class asyncBeanClass;
-//
-// AsyncMethodHandler(SEIStub owner, JavaMethodImpl jm, JavaMethodImpl sync) {
-// super(owner, sync);
-//
-// List<ParameterImpl> rp = sync.getResponseParameters();
-// int size = 0;
-// for( ParameterImpl param : rp ) {
-// if (param.isWrapperStyle()) {
-// WrapperParameter wrapParam = (WrapperParameter)param;
-// size += wrapParam.getWrapperChildren().size();
-// if (sync.getBinding().getStyle() == Style.DOCUMENT) {
-// // doc/asyncBeanClass - asyncBeanClass bean is in async signature
-// // Add 2 or more so that it is considered as async bean case
-// size += 2;
-// }
-// } else {
-// ++size;
-// }
-// }
-//
-// Class tempWrap = null;
-// if (size > 1) {
-// rp = jm.getResponseParameters();
-// for(ParameterImpl param : rp) {
-// if (param.isWrapperStyle()) {
-// WrapperParameter wrapParam = (WrapperParameter)param;
-// if (sync.getBinding().getStyle() == Style.DOCUMENT) {
-// // doc/asyncBeanClass style
-// tempWrap = (Class)wrapParam.getTypeReference().type;
-// break;
-// }
-// for(ParameterImpl p : wrapParam.getWrapperChildren()) {
-// if (p.getIndex() == -1) {
-// tempWrap = (Class)p.getTypeReference().type;
-// break;
-// }
-// }
-// if (tempWrap != null) {
-// break;
-// }
-// } else {
-// if (param.getIndex() == -1) {
-// tempWrap = (Class)param.getTypeReference().type;
-// break;
-// }
-// }
-// }
-// }
-// asyncBeanClass = tempWrap;
-//
-// switch(size) {
-// case 0 :
-// responseBuilder = buildResponseBuilder(sync, ValueSetterFactory.NONE);
-// break;
-// case 1 :
-// responseBuilder = buildResponseBuilder(sync, ValueSetterFactory.SINGLE);
-// break;
-// default :
-// responseBuilder = buildResponseBuilder(sync, new ValueSetterFactory.AsyncBeanValueSetterFactory(asyncBeanClass));
-// }
-//
-// }
-
- protected final Response<Object> doInvoke(Object proxy, Object[] args, AsyncHandler handler) {
-
- AsyncInvoker invoker = new SEIAsyncInvoker(proxy, args);
- invoker.setNonNullAsyncHandlerGiven(handler != null);
- AsyncResponseImpl<Object> ft = new AsyncResponseImpl<Object>(invoker,handler);
- invoker.setReceiver(ft);
- ft.run();
- return ft;
- }
-
- private class SEIAsyncInvoker extends AsyncInvoker {
- // snapshot the context now. this is necessary to avoid concurrency issue,
- // and is required by the spec
- private final RequestContext rc = owner.requestContext.copy();
- private final Object[] args;
-
- SEIAsyncInvoker(Object proxy, Object[] args) {
- this.args = args;
- }
-
- public void do_run () {
- JavaCallInfo call = owner.databinding.createJavaCallInfo(method, args);
- Packet req = (Packet)owner.databinding.serializeRequest(call);
-
- Fiber.CompletionCallback callback = new Fiber.CompletionCallback() {
-
- public void onCompletion(@NotNull Packet response) {
- responseImpl.setResponseContext(new ResponseContext(response));
- Message msg = response.getMessage();
- if (msg == null) {
- return;
- }
- try {
- Object[] rargs = new Object[1];
- JavaCallInfo call = owner.databinding.createJavaCallInfo(method, rargs);
- call = owner.databinding.deserializeResponse(response, call);
- if (call.getException() != null) {
- throw call.getException();
- } else {
- responseImpl.set(rargs[0], null);
- }
-// dbHandler.readResponse(response, call);
-// responseImpl.set(rargs[0], null);
-// if(msg.isFault()) {
-// SOAPFaultBuilder faultBuilder = SOAPFaultBuilder.create(msg);
-// throw faultBuilder.createException(checkedExceptions);
-// } else {
-// Object[] rargs = new Object[1];
-// if (asyncBeanClass != null) {
-// rargs[0] = asyncBeanClass.newInstance();
-// }
-// responseBuilder.readResponse(msg, rargs);
-// responseImpl.set(rargs[0], null);
-// }
- } catch (Throwable t) {
- if (t instanceof RuntimeException) {
- if (t instanceof WebServiceException) {
- responseImpl.set(null, t);
- return;
- }
- } else if (t instanceof Exception) {
- responseImpl.set(null, t);
- return;
- }
- //its RuntimeException or some other exception resulting from user error, wrap it in
- // WebServiceException
- responseImpl.set(null, new WebServiceException(t));
- }
- }
-
-
- public void onCompletion(@NotNull Throwable error) {
- if (error instanceof WebServiceException) {
- responseImpl.set(null, error);
- } else {
- //its RuntimeException or some other exception resulting from user error, wrap it in
- // WebServiceException
- responseImpl.set(null, new WebServiceException(error));
- }
- }
- };
- owner.doProcessAsync(responseImpl, req, rc, callback);
- }
- }
-
- ValueGetterFactory getValueGetterFactory() {
- return ValueGetterFactory.ASYNC;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/BodyBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/BodyBuilder.java
deleted file mode 100644
index 7e8a5b22..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/BodyBuilder.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.sei;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Messages;
-import com.sun.xml.internal.ws.message.jaxb.JAXBMessage;
-import com.sun.xml.internal.ws.model.ParameterImpl;
-import com.sun.xml.internal.ws.model.WrapperParameter;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.spi.db.PropertyAccessor;
-import com.sun.xml.internal.ws.spi.db.WrapperComposite;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Holder;
-import javax.xml.ws.WebServiceException;
-import java.util.List;
-
-/**
- * Builds a JAXB object that represents the payload.
- *
- * @see MessageFiller
- * @author Kohsuke Kawaguchi
- */
-abstract class BodyBuilder {
- abstract Message createMessage(Object[] methodArgs);
-
- static final BodyBuilder EMPTY_SOAP11 = new Empty(SOAPVersion.SOAP_11);
- static final BodyBuilder EMPTY_SOAP12 = new Empty(SOAPVersion.SOAP_12);
-
- private static final class Empty extends BodyBuilder {
- private final SOAPVersion soapVersion;
-
- public Empty(SOAPVersion soapVersion) {
- this.soapVersion = soapVersion;
- }
-
- Message createMessage(Object[] methodArgs) {
- return Messages.createEmpty(soapVersion);
- }
- }
-
- /**
- * Base class for those {@link BodyBuilder}s that build a {@link Message}
- * from JAXB objects.
- */
- private static abstract class JAXB extends BodyBuilder {
- /**
- * This object determines the binding of the object returned
- * from {@link #build(Object[])}.
- */
- private final XMLBridge bridge;
- private final SOAPVersion soapVersion;
-
- protected JAXB(XMLBridge bridge, SOAPVersion soapVersion) {
- assert bridge!=null;
- this.bridge = bridge;
- this.soapVersion = soapVersion;
- }
-
- final Message createMessage(Object[] methodArgs) {
- return JAXBMessage.create( bridge, build(methodArgs), soapVersion );
- }
-
- /**
- * Builds a JAXB object that becomes the payload.
- */
- abstract Object build(Object[] methodArgs);
- }
-
- /**
- * Used to create a payload JAXB object just by taking
- * one of the parameters.
- */
- final static class Bare extends JAXB {
- /**
- * The index of the method invocation parameters that goes into the payload.
- */
- private final int methodPos;
-
- private final ValueGetter getter;
-
- /**
- * Creates a {@link BodyBuilder} from a bare parameter.
- */
- Bare(ParameterImpl p, SOAPVersion soapVersion, ValueGetter getter) {
- super(p.getXMLBridge(), soapVersion);
- this.methodPos = p.getIndex();
- this.getter = getter;
- }
-
- /**
- * Picks up an object from the method arguments and uses it.
- */
- Object build(Object[] methodArgs) {
- return getter.get(methodArgs[methodPos]);
- }
- }
-
-
- /**
- * Used to handle a 'wrapper' style request.
- * Common part of rpc/lit and doc/lit.
- */
- abstract static class Wrapped extends JAXB {
-
- /**
- * Where in the method argument list do they come from?
- */
- protected final int[] indices;
-
- /**
- * Abstracts away the {@link Holder} handling when touching method arguments.
- */
- protected final ValueGetter[] getters;
-
- /**
- * How does each wrapped parameter binds to XML?
- */
- protected XMLBridge[] parameterBridges;
-
- /**
- * List of Parameters packed in the body.
- * Only used for error diagnostics.
- */
- protected List<ParameterImpl> children;
-
- protected Wrapped(WrapperParameter wp, SOAPVersion soapVersion, ValueGetterFactory getter) {
- super(wp.getXMLBridge(), soapVersion);
- children = wp.getWrapperChildren();
- indices = new int[children.size()];
- getters = new ValueGetter[children.size()];
- for( int i=0; i<indices.length; i++ ) {
- ParameterImpl p = children.get(i);
- indices[i] = p.getIndex();
- getters[i] = getter.get(p);
- }
- }
-
- /**
- * Packs a bunch of arguments into a {@link WrapperComposite}.
- */
- protected WrapperComposite buildWrapperComposite(Object[] methodArgs) {
- WrapperComposite cs = new WrapperComposite();
- cs.bridges = parameterBridges;
- cs.values = new Object[parameterBridges.length];
-
- // fill in wrapped parameters from methodArgs
- for( int i=indices.length-1; i>=0; i-- ) {
- Object arg = getters[i].get(methodArgs[indices[i]]);
- if(arg==null) {
- throw new WebServiceException("Method Parameter: "+
- children.get(i).getName()+" cannot be null. This is BP 1.1 R2211 violation.");
- }
- cs.values[i] = arg;
- }
-
- return cs;
- }
- }
-
- /**
- * Used to create a payload JAXB object by wrapping
- * multiple parameters into one "wrapper bean".
- */
- final static class DocLit extends Wrapped {
- /**
- * How does each wrapped parameter binds to XML?
- */
- private final PropertyAccessor[] accessors;
-
- /**
- * Wrapper bean.
- */
- private final Class wrapper;
-
- /**
- * Needed to get wrapper instantiation method.
- */
- private BindingContext bindingContext;
- private boolean dynamicWrapper;
-
- /**
- * Creates a {@link BodyBuilder} from a {@link WrapperParameter}.
- */
- DocLit(WrapperParameter wp, SOAPVersion soapVersion, ValueGetterFactory getter) {
- super(wp, soapVersion, getter);
- bindingContext = wp.getOwner().getBindingContext();
- wrapper = (Class)wp.getXMLBridge().getTypeInfo().type;
- dynamicWrapper = WrapperComposite.class.equals(wrapper);
- parameterBridges = new XMLBridge[children.size()];
- accessors = new PropertyAccessor[children.size()];
- for( int i=0; i<accessors.length; i++ ) {
- ParameterImpl p = children.get(i);
- QName name = p.getName();
- if (dynamicWrapper) {
- parameterBridges[i] = children.get(i).getInlinedRepeatedElementBridge();
- if (parameterBridges[i] == null) parameterBridges[i] = children.get(i).getXMLBridge();
- } else {
- try {
- accessors[i] = p.getOwner().getBindingContext().getElementPropertyAccessor(
- wrapper, name.getNamespaceURI(), name.getLocalPart() );
- } catch (JAXBException e) {
- throw new WebServiceException( // TODO: i18n
- wrapper+" do not have a property of the name "+name,e);
- }
- }
- }
-
- }
-
- /**
- * Packs a bunch of arguments into a {@link WrapperComposite}.
- */
- Object build(Object[] methodArgs) {
- if (dynamicWrapper) return buildWrapperComposite(methodArgs);
- try {
- //Object bean = wrapper.newInstance();
- Object bean = bindingContext.newWrapperInstace(wrapper);
-
- // fill in wrapped parameters from methodArgs
- for( int i=indices.length-1; i>=0; i-- ) {
- accessors[i].set(bean,getters[i].get(methodArgs[indices[i]]));
- }
-
- return bean;
- } catch (InstantiationException e) {
- // this is irrecoverable
- Error x = new InstantiationError(e.getMessage());
- x.initCause(e);
- throw x;
- } catch (IllegalAccessException e) {
- // this is irrecoverable
- Error x = new IllegalAccessError(e.getMessage());
- x.initCause(e);
- throw x;
- } catch (com.sun.xml.internal.ws.spi.db.DatabindingException e) {
- // this can happen when the set method throw a checked exception or something like that
- throw new WebServiceException(e); // TODO:i18n
- }
- }
- }
-
-
- /**
- * Used to create a payload JAXB object by wrapping
- * multiple parameters into a {@link WrapperComposite}.
- *
- * <p>
- * This is used for rpc/lit, as we don't have a wrapper bean for it.
- * (TODO: Why don't we have a wrapper bean for this, when doc/lit does!?)
- */
- final static class RpcLit extends Wrapped {
-
- /**
- * Creates a {@link BodyBuilder} from a {@link WrapperParameter}.
- */
- RpcLit(WrapperParameter wp, SOAPVersion soapVersion, ValueGetterFactory getter) {
- super(wp, soapVersion, getter);
- // we'll use CompositeStructure to pack requests
- assert wp.getTypeInfo().type==WrapperComposite.class;
-
- parameterBridges = new XMLBridge[children.size()];
- for( int i=0; i<parameterBridges.length; i++ )
- parameterBridges[i] = children.get(i).getXMLBridge();
- }
-
- Object build(Object[] methodArgs) {
- return buildWrapperComposite(methodArgs);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/CallbackMethodHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/CallbackMethodHandler.java
deleted file mode 100644
index 55225409..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/CallbackMethodHandler.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.sei;
-
-import com.sun.xml.internal.ws.api.databinding.ClientCallBridge;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import javax.xml.ws.AsyncHandler;
-import javax.xml.ws.WebServiceException;
-
-import java.lang.reflect.Method;
-import java.util.concurrent.Future;
-
-/**
- * {@link MethodHandler} that uses {@link AsyncHandler}.
- *
- * @author Kohsuke Kawaguchi
- */
-final class CallbackMethodHandler extends AsyncMethodHandler {
-
- /**
- * Position of the argument that takes {@link AsyncHandler}.
- */
- private final int handlerPos;
-
- CallbackMethodHandler(SEIStub owner, Method m, int handlerPos) {
- super(owner, m);
- this.handlerPos = handlerPos;
- }
-
-// CallbackMethodHandler(SEIStub owner, JavaMethodImpl jm, JavaMethodImpl core, int handlerPos) {
-// super(owner,jm,core);
-// this.handlerPos = handlerPos;
-// }
-
- Future<?> invoke(Object proxy, Object[] args) throws WebServiceException {
- // the spec requires the last argument
- final AsyncHandler handler = (AsyncHandler)args[handlerPos];
-
- return doInvoke(proxy, args, handler);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MessageFiller.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MessageFiller.java
deleted file mode 100644
index c8d58cde..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MessageFiller.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.client.sei;
-
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.message.Headers;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.message.ByteArrayAttachment;
-import com.sun.xml.internal.ws.message.DataHandlerAttachment;
-import com.sun.xml.internal.ws.message.JAXBAttachment;
-import com.sun.xml.internal.ws.model.ParameterImpl;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.UUID;
-import javax.activation.DataHandler;
-import javax.xml.transform.Source;
-import javax.xml.ws.WebServiceException;
-
-/**
- * Puts a non-payload message parameter to {@link Message}.
- *
- * <p>
- * Instance of this class is used to handle header parameters and attachment parameters.
- * They add things to {@link Message}.
- *
- * @see BodyBuilder
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-abstract class MessageFiller {
-
- /**
- * The index of the method invocation parameters that this object looks for.
- */
- protected final int methodPos;
-
- protected MessageFiller( int methodPos) {
- this.methodPos = methodPos;
- }
-
- /**
- * Moves an argument of a method invocation into a {@link Message}.
- */
- abstract void fillIn(Object[] methodArgs, Message msg);
-
- /**
- * Adds a parameter as an MIME attachment to {@link Message}.
- */
- static abstract class AttachmentFiller extends MessageFiller {
- protected final ParameterImpl param;
- protected final ValueGetter getter;
- protected final String mimeType;
- private final String contentIdPart;
-
- protected AttachmentFiller(ParameterImpl param, ValueGetter getter) {
- super(param.getIndex());
- this.param = param;
- this.getter = getter;
- mimeType = param.getBinding().getMimeType();
- try {
- contentIdPart = URLEncoder.encode(param.getPartName(), "UTF-8")+'=';
- } catch (UnsupportedEncodingException e) {
- throw new WebServiceException(e);
- }
- }
-
- /**
- * Creates an MessageFiller based on the parameter type
- *
- * @param param
- * runtime Parameter that abstracts the annotated java parameter
- * @param getter
- * Gets a value from an object that represents a parameter passed
- * as a method argument.
- */
- public static MessageFiller createAttachmentFiller(ParameterImpl param, ValueGetter getter) {
- Class type = (Class)param.getTypeInfo().type;
- if (DataHandler.class.isAssignableFrom(type) || Source.class.isAssignableFrom(type)) {
- return new DataHandlerFiller(param, getter);
- } else if (byte[].class==type) {
- return new ByteArrayFiller(param, getter);
- } else if(isXMLMimeType(param.getBinding().getMimeType())) {
- return new JAXBFiller(param, getter);
- } else {
- return new DataHandlerFiller(param, getter);
- }
- }
-
- String getContentId() {
- return contentIdPart+UUID.randomUUID()+"@jaxws.sun.com";
- }
- }
-
- private static class ByteArrayFiller extends AttachmentFiller {
- protected ByteArrayFiller(ParameterImpl param, ValueGetter getter) {
- super(param, getter);
- }
- void fillIn(Object[] methodArgs, Message msg) {
- String contentId = getContentId();
- Object obj = getter.get(methodArgs[methodPos]);
- Attachment att = new ByteArrayAttachment(contentId,(byte[])obj,mimeType);
- msg.getAttachments().add(att);
- }
- }
-
- private static class DataHandlerFiller extends AttachmentFiller {
- protected DataHandlerFiller(ParameterImpl param, ValueGetter getter) {
- super(param, getter);
- }
- void fillIn(Object[] methodArgs, Message msg) {
- String contentId = getContentId();
- Object obj = getter.get(methodArgs[methodPos]);
- DataHandler dh = (obj instanceof DataHandler) ? (DataHandler)obj : new DataHandler(obj,mimeType);
- Attachment att = new DataHandlerAttachment(contentId, dh);
- msg.getAttachments().add(att);
- }
- }
-
- private static class JAXBFiller extends AttachmentFiller {
- protected JAXBFiller(ParameterImpl param, ValueGetter getter) {
- super(param, getter);
- }
- void fillIn(Object[] methodArgs, Message msg) {
- String contentId = getContentId();
- Object obj = getter.get(methodArgs[methodPos]);
- Attachment att = new JAXBAttachment(contentId, obj, param.getXMLBridge(), mimeType);
- msg.getAttachments().add(att);
- }
- }
-
- /**
- * Adds a parameter as an header.
- */
- static final class Header extends MessageFiller {
- private final XMLBridge bridge;
- private final ValueGetter getter;
-
- protected Header(int methodPos, XMLBridge bridge, ValueGetter getter) {
- super(methodPos);
- this.bridge = bridge;
- this.getter = getter;
- }
-
- void fillIn(Object[] methodArgs, Message msg) {
- Object value = getter.get(methodArgs[methodPos]);
- msg.getHeaders().add(Headers.create(bridge,value));
- }
- }
-
- private static boolean isXMLMimeType(String mimeType){
- return (mimeType.equals("text/xml") || mimeType.equals("application/xml"));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodHandler.java
deleted file mode 100644
index 60023329..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodHandler.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.sei;
-
-import java.lang.reflect.Method;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-
-import com.sun.xml.internal.ws.api.databinding.ClientCallBridge;
-
-/**
- * Handles an invocation of a method.
- *
- * <p>
- * Each instance of {@link MethodHandler} has an implicit knowledge of
- * a particular method that it handles.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class MethodHandler {
-
- protected final SEIStub owner;
- protected Method method;
-
- protected MethodHandler(SEIStub owner, Method m) {
- this.owner = owner;
- method = m;
- }
-
- /**
- * Performs the method invocation.
- *
- * @param proxy
- * The proxy object exposed to the user. Must not be null.
- * @param args
- * The method invocation arguments. To handle asynchroonus method invocations
- * without array reallocation, this aray is allowed to be longer than the
- * actual number of arguments to the method. Additional array space should be
- * simply ignored.
- * @return
- * a return value from the method invocation. may be null.
- *
- * @throws WebServiceException
- * If used on the client side, a {@link WebServiceException} signals an error
- * during the service invocation.
- * @throws Throwable
- * some faults are reported in terms of checked exceptions.
- */
- abstract Object invoke(Object proxy, Object[] args) throws WebServiceException, Throwable;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java
deleted file mode 100644
index f0daea51..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodUtil.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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.client.sei;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks
- * to java.lang,reflect.Method.invoke()
- * <p/>
- * Be careful, copy of this class exists in several packages, iny modification must be done to other copies too!
- */
-class MethodUtil {
-
- private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName());
- private static final Method INVOKE_METHOD;
-
- static {
- Method method;
- try {
- Class<?> clazz = Class.forName("sun.reflect.misc.MethodUtil");
- method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods.");
- }
- } catch (Throwable t) {
- method = null;
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM");
- }
- }
- INVOKE_METHOD = method;
- }
-
- static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException {
- if (INVOKE_METHOD != null) {
- // sun.reflect.misc.MethodUtil.invoke(method, owner, args)
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil");
- }
- try {
- return INVOKE_METHOD.invoke(null, method, target, args);
- } catch (InvocationTargetException ite) {
- // unwrap invocation exception added by reflection code ...
- throw unwrapException(ite);
- }
- } else {
- // other then Oracle JDK ...
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM");
- }
- return method.invoke(target, args);
- }
- }
-
- private static InvocationTargetException unwrapException(InvocationTargetException ite) {
- Throwable targetException = ite.getTargetException();
- if (targetException != null && targetException instanceof InvocationTargetException) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Unwrapping invocation target exception");
- }
- return (InvocationTargetException) targetException;
- } else {
- return ite;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/PollingMethodHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/PollingMethodHandler.java
deleted file mode 100644
index 8d295ee1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/PollingMethodHandler.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.sei;
-
-import java.lang.reflect.Method;
-
-import com.sun.xml.internal.ws.api.databinding.ClientCallBridge;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import javax.xml.ws.Response;
-import javax.xml.ws.WebServiceException;
-
-/**
- * {@link MethodHandler} that handles asynchronous invocations through {@link Response}.
- * @author Kohsuke Kawaguchi
- */
-final class PollingMethodHandler extends AsyncMethodHandler {
-
-// PollingMethodHandler(SEIStub owner, JavaMethodImpl jm, JavaMethodImpl core) {
-// super(owner, jm, core);
-// }
-
- PollingMethodHandler(SEIStub owner, Method m) {
- super(owner, m);
- }
-
- Response<?> invoke(Object proxy, Object[] args) throws WebServiceException {
- return doInvoke(proxy,args,null);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ResponseBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ResponseBuilder.java
deleted file mode 100644
index a233f741..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ResponseBuilder.java
+++ /dev/null
@@ -1,721 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.client.sei;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.model.ParameterBinding;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.message.AttachmentUnmarshallerImpl;
-import com.sun.xml.internal.ws.model.ParameterImpl;
-import com.sun.xml.internal.ws.model.WrapperParameter;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-import com.sun.xml.internal.ws.spi.db.RepeatedElementBridge;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.spi.db.DatabindingException;
-import com.sun.xml.internal.ws.spi.db.PropertyAccessor;
-import com.sun.xml.internal.ws.spi.db.WrapperComposite;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.encoding.StringDataContentHandler;
-import com.sun.xml.internal.ws.encoding.DataHandlerDataSource;
-
-import javax.activation.DataHandler;
-import javax.imageio.ImageIO;
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFault;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.transform.Source;
-import javax.xml.ws.Holder;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.soap.SOAPFaultException;
-import java.awt.Image;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Reads a response {@link Message}, disassembles it, and moves obtained Java values
- * to the expected places.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public abstract class ResponseBuilder {
- /**
- * Reads a response {@link Message}, disassembles it, and moves obtained Java values
- * to the expected places.
- *
- * @param reply
- * The reply {@link Message} to be de-composed.
- * @param args
- * The Java arguments given to the SEI method invocation.
- * Some parts of the reply message may be set to {@link Holder}s in the arguments.
- * @return
- * If a part of the reply message is returned as a return value from
- * the SEI method, this method returns that value. Otherwise null.
- * @throws JAXBException
- * if there's an error during unmarshalling the reply message.
- * @throws XMLStreamException
- * if there's an error during unmarshalling the reply message.
- */
- public abstract Object readResponse(Message reply, Object[] args) throws JAXBException, XMLStreamException;
-
- static final class WrappedPartBuilder {
- private final XMLBridge bridge;
- private final ValueSetter setter;
- public WrappedPartBuilder(XMLBridge bridge, ValueSetter setter) {
- this.bridge = bridge;
- this.setter = setter;
- }
- final Object readResponse(Object[] args, XMLStreamReader r, AttachmentSet att) throws JAXBException {
- Object obj;
- AttachmentUnmarshallerImpl au = (att != null)?new AttachmentUnmarshallerImpl(att):null;
- if (bridge instanceof RepeatedElementBridge) {
- RepeatedElementBridge rbridge = (RepeatedElementBridge)bridge;
- ArrayList list = new ArrayList();
- QName name = r.getName();
- while (r.getEventType()==XMLStreamReader.START_ELEMENT && name.equals(r.getName())) {
- list.add(rbridge.unmarshal(r, au));
- XMLStreamReaderUtil.toNextTag(r, name);
- }
- obj = rbridge.collectionHandler().convert(list);
- } else {
- obj = bridge.unmarshal(r, au);
- }
- return setter.put(obj,args);
- }
- }
- /**
- * {@link ResponseBuilder.PartBuilder} keyed by the element name (inside the wrapper element.)
- */
- protected Map<QName,WrappedPartBuilder> wrappedParts = null;
- protected QName wrapperName;
-
- protected Object readWrappedResponse(Message msg, Object[] args) throws JAXBException, XMLStreamException {
- Object retVal = null;
-
- if (!msg.hasPayload()) {
- throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element");
- }
- XMLStreamReader reader = msg.readPayload();
- XMLStreamReaderUtil.verifyTag(reader,wrapperName);
- reader.nextTag();
-
- while(reader.getEventType()==XMLStreamReader.START_ELEMENT) {
- // TODO: QName has a performance issue
- WrappedPartBuilder part = wrappedParts.get(reader.getName());
- if(part==null) {
- // no corresponding part found. ignore
- XMLStreamReaderUtil.skipElement(reader);
- reader.nextTag();
- } else {
- Object o = part.readResponse(args,reader, msg.getAttachments());
- // there's only at most one ResponseBuilder that returns a value.
- if(o!=null) {
- assert retVal==null;
- retVal = o;
- }
- }
- // skip any whitespace
- if (reader.getEventType() != XMLStreamConstants.START_ELEMENT &&
- reader.getEventType() != XMLStreamConstants.END_ELEMENT) {
- XMLStreamReaderUtil.nextElementContent(reader);
- }
- }
-
- // we are done with the body
- reader.close();
- XMLStreamReaderFactory.recycle(reader);
-
- return retVal;
- }
-
- static final class None extends ResponseBuilder {
- private None(){
- }
- @Override
- public Object readResponse(Message msg, Object[] args) {
- msg.consume();
- return null;
- }
- }
-
- /**
- * The singleton instance that produces null return value.
- * Used for operations that doesn't have any output.
- */
- public final static ResponseBuilder NONE = new None();
-
- /**
- * Returns the 'uninitialized' value for the given type.
- *
- * <p>
- * For primitive types, it's '0', and for reference types, it's null.
- */
- @SuppressWarnings("element-type-mismatch")
- public static Object getVMUninitializedValue(Type type) {
- // if this map returns null, that means the 'type' is a reference type,
- // in which case 'null' is the correct null value, so this code is correct.
- return primitiveUninitializedValues.get(type);
- }
-
- private static final Map<Class,Object> primitiveUninitializedValues = new HashMap<Class, Object>();
-
- static {
- Map<Class, Object> m = primitiveUninitializedValues;
- m.put(int.class,(int)0);
- m.put(char.class,(char)0);
- m.put(byte.class,(byte)0);
- m.put(short.class,(short)0);
- m.put(long.class,(long)0);
- m.put(float.class,(float)0);
- m.put(double.class,(double)0);
- }
-
- /**
- * {@link ResponseBuilder} that sets the VM uninitialized value to the type.
- */
- public static final class NullSetter extends ResponseBuilder {
- private final ValueSetter setter;
- private final Object nullValue;
-
- public NullSetter(ValueSetter setter, Object nullValue){
- assert setter!=null;
- this.nullValue = nullValue;
- this.setter = setter;
- }
- @Override
- public Object readResponse(Message msg, Object[] args) {
- return setter.put(nullValue, args);
- }
- }
-
- /**
- * {@link ResponseBuilder} that is a composition of multiple
- * {@link ResponseBuilder}s.
- *
- * <p>
- * Sometimes we need to look at multiple parts of the reply message
- * (say, two header params, one body param, and three attachments, etc.)
- * and that's when this object is used to combine multiple {@link ResponseBuilder}s
- * (that each responsible for handling one part).
- *
- * <p>
- * The model guarantees that only at most one {@link ResponseBuilder} will
- * return a value as a return value (and everything else has to go to
- * {@link Holder}s.)
- */
- public static final class Composite extends ResponseBuilder {
- private final ResponseBuilder[] builders;
-
- public Composite(ResponseBuilder... builders) {
- this.builders = builders;
- }
-
- public Composite(Collection<? extends ResponseBuilder> builders) {
- this(builders.toArray(new ResponseBuilder[builders.size()]));
- }
-
- @Override
- public Object readResponse(Message msg, Object[] args) throws JAXBException, XMLStreamException {
- Object retVal = null;
- for (ResponseBuilder builder : builders) {
- Object r = builder.readResponse(msg,args);
- // there's only at most one ResponseBuilder that returns a value.
- if(r!=null) {
- assert retVal==null;
- retVal = r;
- }
- }
- return retVal;
- }
- }
-
- /**
- * Reads an Attachment into a Java parameter.
- */
- public static abstract class AttachmentBuilder extends ResponseBuilder {
- protected final ValueSetter setter;
- protected final ParameterImpl param;
- private final String pname;
- private final String pname1;
-
- AttachmentBuilder(ParameterImpl param, ValueSetter setter) {
- this.setter = setter;
- this.param = param;
- this.pname = param.getPartName();
- this.pname1 = "<"+pname;
- }
-
- /**
- * Creates an AttachmentBuilder based on the parameter type
- *
- * @param param
- * runtime Parameter that abstracts the annotated java parameter
- * @param setter
- * specifies how the obtained value is set into the argument. Takes
- * care of Holder arguments.
- */
- public static ResponseBuilder createAttachmentBuilder(ParameterImpl param, ValueSetter setter) {
- Class type = (Class)param.getTypeInfo().type;
- if (DataHandler.class.isAssignableFrom(type)) {
- return new DataHandlerBuilder(param, setter);
- } else if (byte[].class==type) {
- return new ByteArrayBuilder(param, setter);
- } else if(Source.class.isAssignableFrom(type)) {
- return new SourceBuilder(param, setter);
- } else if(Image.class.isAssignableFrom(type)) {
- return new ImageBuilder(param, setter);
- } else if(InputStream.class==type) {
- return new InputStreamBuilder(param, setter);
- } else if(isXMLMimeType(param.getBinding().getMimeType())) {
- return new JAXBBuilder(param, setter);
- } else if(String.class.isAssignableFrom(type)) {
- return new StringBuilder(param, setter);
- } else {
- throw new UnsupportedOperationException("Unexpected Attachment type ="+type);
- }
- }
-
- @Override
- public Object readResponse(Message msg, Object[] args) throws JAXBException, XMLStreamException {
- // TODO not to loop
- for (Attachment att : msg.getAttachments()) {
- String part = getWSDLPartName(att);
- if (part == null) {
- continue;
- }
- if(part.equals(pname) || part.equals(pname1)){
- return mapAttachment(att, args);
- }
- }
- return null;
- }
-
- abstract Object mapAttachment(Attachment att, Object[] args) throws JAXBException;
- }
-
- private static final class DataHandlerBuilder extends AttachmentBuilder {
- DataHandlerBuilder(ParameterImpl param, ValueSetter setter) {
- super(param, setter);
- }
-
- @Override
- Object mapAttachment(Attachment att, Object[] args) {
- return setter.put(att.asDataHandler(), args);
- }
- }
-
- private static final class StringBuilder extends AttachmentBuilder {
- StringBuilder(ParameterImpl param, ValueSetter setter) {
- super(param, setter);
- }
-
- @Override
- Object mapAttachment(Attachment att, Object[] args) {
- att.getContentType();
- StringDataContentHandler sdh = new StringDataContentHandler();
- try {
- String str = (String)sdh.getContent(new DataHandlerDataSource(att.asDataHandler()));
- return setter.put(str, args);
- } catch(Exception e) {
- throw new WebServiceException(e);
- }
-
- }
- }
-
- private static final class ByteArrayBuilder extends AttachmentBuilder {
- ByteArrayBuilder(ParameterImpl param, ValueSetter setter) {
- super(param, setter);
- }
-
- @Override
- Object mapAttachment(Attachment att, Object[] args) {
- return setter.put(att.asByteArray(), args);
- }
- }
-
- private static final class SourceBuilder extends AttachmentBuilder {
- SourceBuilder(ParameterImpl param, ValueSetter setter) {
- super(param, setter);
- }
-
- @Override
- Object mapAttachment(Attachment att, Object[] args) {
- return setter.put(att.asSource(), args);
- }
- }
-
- private static final class ImageBuilder extends AttachmentBuilder {
- ImageBuilder(ParameterImpl param, ValueSetter setter) {
- super(param, setter);
- }
-
- @Override
- Object mapAttachment(Attachment att, Object[] args) {
- Image image;
- InputStream is = null;
- try {
- is = att.asInputStream();
- image = ImageIO.read(is);
- } catch(IOException ioe) {
- throw new WebServiceException(ioe);
- } finally {
- if (is != null) {
- try {
- is.close();
- } catch(IOException ioe) {
- throw new WebServiceException(ioe);
- }
- }
- }
- return setter.put(image, args);
- }
- }
-
- private static final class InputStreamBuilder extends AttachmentBuilder {
- InputStreamBuilder(ParameterImpl param, ValueSetter setter) {
- super(param, setter);
- }
-
- @Override
- Object mapAttachment(Attachment att, Object[] args) {
- return setter.put(att.asInputStream(), args);
- }
- }
-
- private static final class JAXBBuilder extends AttachmentBuilder {
- JAXBBuilder(ParameterImpl param, ValueSetter setter) {
- super(param, setter);
- }
-
- @Override
- Object mapAttachment(Attachment att, Object[] args) throws JAXBException {
- Object obj = param.getXMLBridge().unmarshal(att.asInputStream());
- return setter.put(obj, args);
- }
- }
-
- /**
- * Gets the WSDL part name of this attachment.
- *
- * <p>
- * According to WSI AP 1.0
- * <PRE>
- * 3.8 Value-space of Content-Id Header
- * Definition: content-id part encoding
- * The "content-id part encoding" consists of the concatenation of:
- * The value of the name attribute of the wsdl:part element referenced by the mime:content, in which characters disallowed in content-id headers (non-ASCII characters as represented by code points above 0x7F) are escaped as follows:
- * o Each disallowed character is converted to UTF-8 as one or more bytes.
- * o Any bytes corresponding to a disallowed character are escaped with the URI escaping mechanism (that is, converted to %HH, where HH is the hexadecimal notation of the byte value).
- * o The original character is replaced by the resulting character sequence.
- * The character '=' (0x3D).
- * A globally unique value such as a UUID.
- * The character '@' (0x40).
- * A valid domain name under the authority of the entity constructing the message.
- * </PRE>
- *
- * So a wsdl:part fooPart will be encoded as:
- * <fooPart=somereallybignumberlikeauuid@example.com>
- *
- * @return null
- * if the parsing fails.
- */
- @SuppressWarnings("FinalStaticMethod")
- public static final String getWSDLPartName(com.sun.xml.internal.ws.api.message.Attachment att){
- String cId = att.getContentId();
-
- int index = cId.lastIndexOf('@', cId.length());
- if(index == -1){
- return null;
- }
- String localPart = cId.substring(0, index);
- index = localPart.lastIndexOf('=', localPart.length());
- if(index == -1){
- return null;
- }
- try {
- return java.net.URLDecoder.decode(localPart.substring(0, index), "UTF-8");
- } catch (UnsupportedEncodingException e) {
- throw new WebServiceException(e);
- }
- }
-
-
- /**
- * Reads a header into a JAXB object.
- */
- public static final class Header extends ResponseBuilder {
- private final XMLBridge<?> bridge;
- private final ValueSetter setter;
- private final QName headerName;
- private final SOAPVersion soapVersion;
-
- /**
- * @param soapVersion
- * SOAP1.1 or 1.2
- * @param name
- * The name of the header element.
- * @param bridge
- * specifies how to unmarshal a header into a JAXB object.
- * @param setter
- * specifies how the obtained value is returned to the client.
- */
- public Header(SOAPVersion soapVersion, QName name, XMLBridge<?> bridge, ValueSetter setter) {
- this.soapVersion = soapVersion;
- this.headerName = name;
- this.bridge = bridge;
- this.setter = setter;
- }
-
- public Header(SOAPVersion soapVersion, ParameterImpl param, ValueSetter setter) {
- this(soapVersion,
- param.getTypeInfo().tagName,
- param.getXMLBridge(),
- setter);
- assert param.getOutBinding()== ParameterBinding.HEADER;
- }
-
- private SOAPFaultException createDuplicateHeaderException() {
- try {
- SOAPFault fault = soapVersion.getSOAPFactory().createFault();
- fault.setFaultCode(soapVersion.faultCodeServer);
- fault.setFaultString(ServerMessages.DUPLICATE_PORT_KNOWN_HEADER(headerName));
- return new SOAPFaultException(fault);
- } catch(SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-
- @Override
- public Object readResponse(Message msg, Object[] args) throws JAXBException {
- com.sun.xml.internal.ws.api.message.Header header = null;
- Iterator<com.sun.xml.internal.ws.api.message.Header> it =
- msg.getHeaders().getHeaders(headerName,true);
- if (it.hasNext()) {
- header = it.next();
- if (it.hasNext()) {
- throw createDuplicateHeaderException();
- }
- }
-
- if(header!=null)
- return setter.put( header.readAsJAXB(bridge), args );
- else
- // header not found.
- return null;
- }
- }
-
- /**
- * Reads the whole payload into a single JAXB bean.
- */
- public static final class Body extends ResponseBuilder {
- private final XMLBridge<?> bridge;
- private final ValueSetter setter;
-
- /**
- * @param bridge
- * specifies how to unmarshal the payload into a JAXB object.
- * @param setter
- * specifies how the obtained value is returned to the client.
- */
- public Body(XMLBridge<?> bridge, ValueSetter setter) {
- this.bridge = bridge;
- this.setter = setter;
- }
-
- @Override
- public Object readResponse(Message msg, Object[] args) throws JAXBException {
- return setter.put( msg.readPayloadAsJAXB(bridge), args );
- }
- }
-
- /**
- * Treats a payload as multiple parts wrapped into one element,
- * and processes all such wrapped parts.
- */
- public static final class DocLit extends ResponseBuilder {
- /**
- * {@link PartBuilder} keyed by the element name (inside the wrapper element.)
- */
- private final PartBuilder[] parts;
-
- private final XMLBridge wrapper;
-
- private boolean dynamicWrapper;
-
- public DocLit(WrapperParameter wp, ValueSetterFactory setterFactory) {
- wrapperName = wp.getName();
- wrapper = wp.getXMLBridge();
- Class wrapperType = (Class) wrapper.getTypeInfo().type;
- dynamicWrapper = WrapperComposite.class.equals(wrapperType);
-
- List<PartBuilder> tempParts = new ArrayList<PartBuilder>();
-
- List<ParameterImpl> children = wp.getWrapperChildren();
- for (ParameterImpl p : children) {
- if(p.isIN())
- continue;
- QName name = p.getName();
- if (dynamicWrapper) {
- if (wrappedParts == null) wrappedParts = new HashMap<QName,WrappedPartBuilder>();
- XMLBridge xmlBridge = p.getInlinedRepeatedElementBridge();
- if (xmlBridge == null) xmlBridge = p.getXMLBridge();
- wrappedParts.put( p.getName(), new WrappedPartBuilder(xmlBridge, setterFactory.get(p)));
- } else {
- try {
- tempParts.add(new PartBuilder(
- wp.getOwner().getBindingContext().getElementPropertyAccessor(
- wrapperType,
- name.getNamespaceURI(),
- p.getName().getLocalPart()),
- setterFactory.get(p)
- ));
- // wrapper parameter itself always bind to body, and
- // so do all its children
- assert p.getBinding()== ParameterBinding.BODY;
- } catch (JAXBException e) {
- throw new WebServiceException( // TODO: i18n
- wrapperType+" do not have a property of the name "+name,e);
- }
- }
- }
- this.parts = tempParts.toArray(new PartBuilder[tempParts.size()]);
- }
-
- @Override
- public Object readResponse(Message msg, Object[] args) throws JAXBException, XMLStreamException {
- if (dynamicWrapper) return readWrappedResponse(msg, args);
- Object retVal = null;
-
- if (parts.length>0) {
- if (!msg.hasPayload()) {
- throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element");
- }
- XMLStreamReader reader = msg.readPayload();
- XMLStreamReaderUtil.verifyTag(reader,wrapperName);
- Object wrapperBean = wrapper.unmarshal(reader, (msg.getAttachments() != null) ?
- new AttachmentUnmarshallerImpl(msg.getAttachments()): null);
-
- try {
- for (PartBuilder part : parts) {
- Object o = part.readResponse(args,wrapperBean);
- // there's only at most one ResponseBuilder that returns a value.
- // TODO: reorder parts so that the return value comes at the end.
- if(o!=null) {
- assert retVal==null;
- retVal = o;
- }
- }
- } catch (DatabindingException e) {
- // this can happen when the set method throw a checked exception or something like that
- throw new WebServiceException(e); // TODO:i18n
- }
-
- // we are done with the body
- reader.close();
- XMLStreamReaderFactory.recycle(reader);
- } else {
- msg.consume();
- }
-
- return retVal;
- }
-
- /**
- * Unmarshals each wrapped part into a JAXB object and moves it
- * to the expected place.
- */
- static final class PartBuilder {
- private final PropertyAccessor accessor;
- private final ValueSetter setter;
-
- /**
- * @param accessor
- * specifies which portion of the wrapper bean to obtain the value from.
- * @param setter
- * specifies how the obtained value is returned to the client.
- */
- public PartBuilder(PropertyAccessor accessor, ValueSetter setter) {
- this.accessor = accessor;
- this.setter = setter;
- assert accessor!=null && setter!=null;
- }
-
- final Object readResponse( Object[] args, Object wrapperBean ) {
- Object obj = accessor.get(wrapperBean);
- return setter.put(obj,args);
- }
-
-
- }
- }
-
- /**
- * Treats a payload as multiple parts wrapped into one element,
- * and processes all such wrapped parts.
- */
- public static final class RpcLit extends ResponseBuilder {
- public RpcLit(WrapperParameter wp, ValueSetterFactory setterFactory) {
- assert wp.getTypeInfo().type== WrapperComposite.class;
- wrapperName = wp.getName();
- wrappedParts = new HashMap<QName,WrappedPartBuilder>();
- List<ParameterImpl> children = wp.getWrapperChildren();
- for (ParameterImpl p : children) {
- wrappedParts.put( p.getName(), new WrappedPartBuilder(
- p.getXMLBridge(), setterFactory.get(p)
- ));
- // wrapper parameter itself always bind to body, and
- // so do all its children
- assert p.getBinding()== ParameterBinding.BODY;
- }
- }
-
- @Override
- public Object readResponse(Message msg, Object[] args) throws JAXBException, XMLStreamException {
- return readWrappedResponse(msg, args);
- }
- }
-
- private static boolean isXMLMimeType(String mimeType){
- return mimeType.equals("text/xml") || mimeType.equals("application/xml");
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIMethodHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIMethodHandler.java
deleted file mode 100644
index 65660a9e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIMethodHandler.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.sei;
-
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.model.CheckedExceptionImpl;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import com.sun.xml.internal.ws.model.ParameterImpl;
-import com.sun.xml.internal.ws.model.WrapperParameter;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * {@link com.sun.xml.internal.ws.client.sei.MethodHandler} that handles synchronous method invocations.
- *
- * <p>
- * This class mainly performs the following two tasks:
- * <ol>
- * <li>Accepts Object[] that represents arguments for a Java method,
- * and creates {@link com.sun.xml.internal.ws.message.jaxb.JAXBMessage} that represents a request message.
- * <li>Takes a {@link com.sun.xml.internal.ws.api.message.Message] that represents a response,
- * and extracts the return value (and updates {@link javax.xml.ws.Holder }s.)
- * </ol>
- *
- * <h2>Creating {@link com.sun.xml.internal.ws.message.jaxb.JAXBMessage }</h2>
- * <p>
- * At the construction time, we prepare {@link com.sun.xml.internal.ws.client.sei.BodyBuilder} and {@link com.sun.xml.internal.ws.client.sei.MessageFiller}s
- * that know how to move arguments into a {@link com.sun.xml.internal.ws.api.message.Message }.
- * Some arguments go to the payload, some go to headers, still others go to attachments.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-abstract class SEIMethodHandler extends MethodHandler {
-
- // these objects together create a message from method parameters
- private BodyBuilder bodyBuilder;
- private MessageFiller[] inFillers;
-
- protected String soapAction;
-
- protected boolean isOneWay;
-
- protected JavaMethodImpl javaMethod;
-
- protected Map<QName, CheckedExceptionImpl> checkedExceptions;
-
- SEIMethodHandler(SEIStub owner) {
- super(owner, null);
- }
-
- SEIMethodHandler(SEIStub owner, JavaMethodImpl method) {
- super(owner, null);
-
- //keep all the CheckedException model for the detail qname
- this.checkedExceptions = new HashMap<QName, CheckedExceptionImpl>();
- for(CheckedExceptionImpl ce : method.getCheckedExceptions()){
- checkedExceptions.put(ce.getBond().getTypeInfo().tagName, ce);
- }
- //If a non-"" soapAction is specified, wsa:action the SOAPAction
- if(method.getInputAction() != null && !method.getBinding().getSOAPAction().equals("") ) {
- this.soapAction = method.getInputAction();
- } else {
- this.soapAction = method.getBinding().getSOAPAction();
- }
- this.javaMethod = method;
-
- {// prepare objects for creating messages
- List<ParameterImpl> rp = method.getRequestParameters();
-
- BodyBuilder tmpBodyBuilder = null;
- List<MessageFiller> fillers = new ArrayList<MessageFiller>();
-
- for (ParameterImpl param : rp) {
- ValueGetter getter = getValueGetterFactory().get(param);
-
- switch(param.getInBinding().kind) {
- case BODY:
- if(param.isWrapperStyle()) {
- if(param.getParent().getBinding().isRpcLit())
- tmpBodyBuilder = new BodyBuilder.RpcLit((WrapperParameter)param, owner.soapVersion, getValueGetterFactory());
- else
- tmpBodyBuilder = new BodyBuilder.DocLit((WrapperParameter)param, owner.soapVersion, getValueGetterFactory());
- } else {
- tmpBodyBuilder = new BodyBuilder.Bare(param, owner.soapVersion, getter);
- }
- break;
- case HEADER:
- fillers.add(new MessageFiller.Header(
- param.getIndex(),
- param.getXMLBridge(),
- getter ));
- break;
- case ATTACHMENT:
- fillers.add(MessageFiller.AttachmentFiller.createAttachmentFiller(param, getter));
- break;
- case UNBOUND:
- break;
- default:
- throw new AssertionError(); // impossible
- }
- }
-
- if(tmpBodyBuilder==null) {
- // no parameter binds to body. we create an empty message
- switch(owner.soapVersion) {
- case SOAP_11:
- tmpBodyBuilder = BodyBuilder.EMPTY_SOAP11;
- break;
- case SOAP_12:
- tmpBodyBuilder = BodyBuilder.EMPTY_SOAP12;
- break;
- default:
- throw new AssertionError();
- }
- }
-
- this.bodyBuilder = tmpBodyBuilder;
- this.inFillers = fillers.toArray(new MessageFiller[fillers.size()]);
- }
-
- this.isOneWay = method.getMEP().isOneWay();
- }
-
- ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) {
- // prepare objects for processing response
- List<ParameterImpl> rp = method.getResponseParameters();
- List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>();
-
- for( ParameterImpl param : rp ) {
- ValueSetter setter;
- switch(param.getOutBinding().kind) {
- case BODY:
- if(param.isWrapperStyle()) {
- if(param.getParent().getBinding().isRpcLit())
- builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory));
- else
- builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory));
- } else {
- setter = setterFactory.get(param);
- builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter));
- }
- break;
- case HEADER:
- setter = setterFactory.get(param);
- builders.add(new ResponseBuilder.Header(owner.soapVersion, param, setter));
- break;
- case ATTACHMENT:
- setter = setterFactory.get(param);
- builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter));
- break;
- case UNBOUND:
- setter = setterFactory.get(param);
- builders.add(new ResponseBuilder.NullSetter(setter,
- ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type)));
- break;
- default:
- throw new AssertionError();
- }
- }
- ResponseBuilder rb;
- switch(builders.size()) {
- case 0:
- rb = ResponseBuilder.NONE;
- break;
- case 1:
- rb = builders.get(0);
- break;
- default:
- rb = new ResponseBuilder.Composite(builders);
- }
- return rb;
- }
-
-
- /**
- * Creates a request {@link com.sun.xml.internal.ws.message.jaxb.JAXBMessage} from method arguments.
- * @param args proxy invocation arguments
- * @return Message for the arguments
- */
- Message createRequestMessage(Object[] args) {
- Message msg = bodyBuilder.createMessage(args);
-
- for (MessageFiller filler : inFillers)
- filler.fillIn(args,msg);
-
- return msg;
- }
-
- abstract ValueGetterFactory getValueGetterFactory();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIStub.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIStub.java
deleted file mode 100644
index 9ad1f6ed..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIStub.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.client.sei;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import com.sun.xml.internal.ws.api.databinding.Databinding;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.Headers;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.MEP;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.api.pipe.Fiber;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.ContainerResolver;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.AsyncResponseImpl;
-import com.sun.xml.internal.ws.client.RequestContext;
-import com.sun.xml.internal.ws.client.ResponseContextReceiver;
-import com.sun.xml.internal.ws.client.Stub;
-import com.sun.xml.internal.ws.client.WSServiceDelegate;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import com.sun.xml.internal.ws.model.SOAPSEIModel;
-import com.sun.xml.internal.ws.wsdl.OperationDispatcher;
-
-import javax.xml.namespace.QName;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.Proxy;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * {@link Stub} that handles method invocations
- * through a strongly-typed endpoint interface.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class SEIStub extends Stub implements InvocationHandler {
-
- Databinding databinding;
-
- @Deprecated
- public SEIStub(WSServiceDelegate owner, BindingImpl binding, SOAPSEIModel seiModel, Tube master, WSEndpointReference epr) {
- super(owner, master, binding, seiModel.getPort(), seiModel.getPort().getAddress(), epr);
- this.seiModel = seiModel;
- this.soapVersion = binding.getSOAPVersion();
- databinding = seiModel.getDatabinding();
- initMethodHandlers();
- }
-
- // added portInterface to the constructor, otherwise AsyncHandler won't work
- public SEIStub(WSPortInfo portInfo, BindingImpl binding, SOAPSEIModel seiModel, WSEndpointReference epr) {
- super(portInfo, binding, seiModel.getPort().getAddress(),epr);
- this.seiModel = seiModel;
- this.soapVersion = binding.getSOAPVersion();
- databinding = seiModel.getDatabinding();
- initMethodHandlers();
- }
-
- private void initMethodHandlers() {
- Map<WSDLBoundOperation, JavaMethodImpl> syncs = new HashMap<WSDLBoundOperation, JavaMethodImpl>();
-
- // fill in methodHandlers.
- // first fill in sychronized versions
- for (JavaMethodImpl m : seiModel.getJavaMethods()) {
- if (!m.getMEP().isAsync) {
- SyncMethodHandler handler = new SyncMethodHandler(this, m);
- syncs.put(m.getOperation(), m);
- methodHandlers.put(m.getMethod(), handler);
- }
- }
-
- for (JavaMethodImpl jm : seiModel.getJavaMethods()) {
- JavaMethodImpl sync = syncs.get(jm.getOperation());
- if (jm.getMEP() == MEP.ASYNC_CALLBACK) {
- Method m = jm.getMethod();
- CallbackMethodHandler handler = new CallbackMethodHandler(
- this, m, m.getParameterTypes().length - 1);
- methodHandlers.put(m, handler);
- }
- if (jm.getMEP() == MEP.ASYNC_POLL) {
- Method m = jm.getMethod();
- PollingMethodHandler handler = new PollingMethodHandler(this, m);
- methodHandlers.put(m, handler);
- }
- }
- }
-
- public final SOAPSEIModel seiModel;
-
- public final SOAPVersion soapVersion;
-
- /**
- * Nullable when there is no associated WSDL Model
- * @return
- */
- public @Nullable
- OperationDispatcher getOperationDispatcher() {
- if(operationDispatcher == null && wsdlPort != null)
- operationDispatcher = new OperationDispatcher(wsdlPort,binding,seiModel);
- return operationDispatcher;
- }
-
- /**
- * For each method on the port interface we have
- * a {@link MethodHandler} that processes it.
- */
- private final Map<Method, MethodHandler> methodHandlers = new HashMap<Method, MethodHandler>();
-
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- validateInputs(proxy, method);
- Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer());
- try {
- MethodHandler handler = methodHandlers.get(method);
- if (handler != null) {
- return handler.invoke(proxy, args);
- } else {
- // we handle the other method invocations by ourselves
- try {
- return method.invoke(this, args);
- } catch (IllegalAccessException e) {
- // impossible
- throw new AssertionError(e);
- } catch (IllegalArgumentException e) {
- throw new AssertionError(e);
- } catch (InvocationTargetException e) {
- throw e.getCause();
- }
- }
- } finally {
- ContainerResolver.getDefault().exitContainer(old);
- }
- }
-
- private void validateInputs(Object proxy, Method method) {
- if (proxy == null || !Proxy.isProxyClass(proxy.getClass())) {
- throw new IllegalStateException("Passed object is not proxy!");
- }
- Class<?> declaringClass = method.getDeclaringClass();
- if (method == null || declaringClass == null
- || Modifier.isStatic(method.getModifiers())) {
- throw new IllegalStateException("Invoking static method is not allowed!");
- }
- }
-
- public final Packet doProcess(Packet request, RequestContext rc, ResponseContextReceiver receiver) {
- return super.process(request, rc, receiver);
- }
-
- public final void doProcessAsync(AsyncResponseImpl<?> receiver, Packet request, RequestContext rc, Fiber.CompletionCallback callback) {
- super.processAsync(receiver, request, rc, callback);
- }
-
- protected final @NotNull QName getPortName() {
- return wsdlPort.getName();
- }
-
-
- public void setOutboundHeaders(Object... headers) {
- if(headers==null)
- throw new IllegalArgumentException();
- Header[] hl = new Header[headers.length];
- for( int i=0; i<hl.length; i++ ) {
- if(headers[i]==null)
- throw new IllegalArgumentException();
- hl[i] = Headers.create(seiModel.getBindingContext(),headers[i]);
- }
- super.setOutboundHeaders(hl);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubAsyncHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubAsyncHandler.java
deleted file mode 100644
index 1db11463..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubAsyncHandler.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.sei;
-
-import java.util.List;
-
-import javax.jws.soap.SOAPBinding.Style;
-
-import com.sun.xml.internal.ws.api.message.MessageContextFactory;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import com.sun.xml.internal.ws.model.ParameterImpl;
-import com.sun.xml.internal.ws.model.WrapperParameter;
-
-public class StubAsyncHandler extends StubHandler {
-
- private final Class asyncBeanClass;
-
- public StubAsyncHandler(JavaMethodImpl jm, JavaMethodImpl sync, MessageContextFactory mcf) {
- super(sync, mcf);
-
- List<ParameterImpl> rp = sync.getResponseParameters();
- int size = 0;
- for( ParameterImpl param : rp ) {
- if (param.isWrapperStyle()) {
- WrapperParameter wrapParam = (WrapperParameter)param;
- size += wrapParam.getWrapperChildren().size();
- if (sync.getBinding().getStyle() == Style.DOCUMENT) {
- // doc/asyncBeanClass - asyncBeanClass bean is in async signature
- // Add 2 or more so that it is considered as async bean case
- size += 2;
- }
- } else {
- ++size;
- }
- }
-
- Class tempWrap = null;
- if (size > 1) {
- rp = jm.getResponseParameters();
- for(ParameterImpl param : rp) {
- if (param.isWrapperStyle()) {
- WrapperParameter wrapParam = (WrapperParameter)param;
- if (sync.getBinding().getStyle() == Style.DOCUMENT) {
- // doc/asyncBeanClass style
- tempWrap = (Class)wrapParam.getTypeInfo().type;
- break;
- }
- for(ParameterImpl p : wrapParam.getWrapperChildren()) {
- if (p.getIndex() == -1) {
- tempWrap = (Class)p.getTypeInfo().type;
- break;
- }
- }
- if (tempWrap != null) {
- break;
- }
- } else {
- if (param.getIndex() == -1) {
- tempWrap = (Class)param.getTypeInfo().type;
- break;
- }
- }
- }
- }
- asyncBeanClass = tempWrap;
-
- switch(size) {
- case 0 :
- responseBuilder = buildResponseBuilder(sync, ValueSetterFactory.NONE);
- break;
- case 1 :
- responseBuilder = buildResponseBuilder(sync, ValueSetterFactory.SINGLE);
- break;
- default :
- responseBuilder = buildResponseBuilder(sync, new ValueSetterFactory.AsyncBeanValueSetterFactory(asyncBeanClass));
- }
-
- }
-
- protected void initArgs(Object[] args) throws Exception {
- if (asyncBeanClass != null) {
- args[0] = asyncBeanClass.newInstance();
- }
- }
-
- ValueGetterFactory getValueGetterFactory() {
- return ValueGetterFactory.ASYNC;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubHandler.java
deleted file mode 100644
index c3a2b002..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubHandler.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.sei;
-
-import com.oracle.webservices.internal.api.databinding.JavaCallInfo;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.databinding.ClientCallBridge;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageContextFactory;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-import com.sun.xml.internal.ws.model.CheckedExceptionImpl;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import com.sun.xml.internal.ws.model.ParameterImpl;
-import com.sun.xml.internal.ws.model.WrapperParameter;
-
-import javax.xml.namespace.QName;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * {@link com.sun.xml.internal.ws.client.sei.MethodHandler} that handles synchronous method invocations.
- * This is refactored from SEIMethodHandler.
- * <p>
- * This class mainly performs the following two tasks:
- * <ol>
- * <li>Accepts Object[] that represents arguments for a Java method,
- * and creates {@link com.sun.xml.internal.ws.message.jaxb.JAXBMessage} that represents a request message.
- * <li>Takes a {@link com.sun.xml.internal.ws.api.message.Message} that represents a response,
- * and extracts the return value (and updates {@link javax.xml.ws.Holder }s.)
- * </ol>
- *
- * <h2>Creating {@link com.sun.xml.internal.ws.message.jaxb.JAXBMessage }</h2>
- * <p>
- * At the construction time, we prepare {@link com.sun.xml.internal.ws.client.sei.BodyBuilder} and {@link com.sun.xml.internal.ws.client.sei.MessageFiller}s
- * that know how to move arguments into a {@link com.sun.xml.internal.ws.api.message.Message }.
- * Some arguments go to the payload, some go to headers, still others go to attachments.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- * @author shih-chang.chen@oracle.com
- */
-public class StubHandler implements ClientCallBridge {
-
- // these objects together create a message from method parameters
- private final BodyBuilder bodyBuilder;
- private final MessageFiller[] inFillers;
- protected final String soapAction;
- protected final boolean isOneWay;
- protected final JavaMethodImpl javaMethod;
- protected final Map<QName, CheckedExceptionImpl> checkedExceptions;
- protected SOAPVersion soapVersion = SOAPVersion.SOAP_11;
- protected ResponseBuilder responseBuilder;
- protected MessageContextFactory packetFactory;
-
- public StubHandler(JavaMethodImpl method, MessageContextFactory mcf) {
- //keep all the CheckedException model for the detail qname
- this.checkedExceptions = new HashMap<QName, CheckedExceptionImpl>();
- for(CheckedExceptionImpl ce : method.getCheckedExceptions()){
- checkedExceptions.put(ce.getBond().getTypeInfo().tagName, ce);
- }
- //If a non-"" soapAction is specified, wsa:action the SOAPAction
- String soapActionFromBinding = method.getBinding().getSOAPAction();
- if(method.getInputAction() != null && soapActionFromBinding != null && !soapActionFromBinding.equals("") ) {
- this.soapAction = method.getInputAction();
- } else {
- this.soapAction = soapActionFromBinding;
- }
- this.javaMethod = method;
- packetFactory = mcf;
-
- soapVersion = javaMethod.getBinding().getSOAPVersion();
-
- {// prepare objects for creating messages
- List<ParameterImpl> rp = method.getRequestParameters();
-
- BodyBuilder bodyBuilder = null;
- List<MessageFiller> fillers = new ArrayList<MessageFiller>();
-
- for (ParameterImpl param : rp) {
- ValueGetter getter = getValueGetterFactory().get(param);
-
- switch(param.getInBinding().kind) {
- case BODY:
- if(param.isWrapperStyle()) {
- if(param.getParent().getBinding().isRpcLit())
- bodyBuilder = new BodyBuilder.RpcLit((WrapperParameter)param, soapVersion, getValueGetterFactory());
- else
- bodyBuilder = new BodyBuilder.DocLit((WrapperParameter)param, soapVersion, getValueGetterFactory());
- } else {
- bodyBuilder = new BodyBuilder.Bare(param, soapVersion, getter);
- }
- break;
- case HEADER:
- fillers.add(new MessageFiller.Header(
- param.getIndex(),
- param.getXMLBridge(),
- getter ));
- break;
- case ATTACHMENT:
- fillers.add(MessageFiller.AttachmentFiller.createAttachmentFiller(param, getter));
- break;
- case UNBOUND:
- break;
- default:
- throw new AssertionError(); // impossible
- }
- }
-
- if(bodyBuilder==null) {
- // no parameter binds to body. we create an empty message
- switch(soapVersion) {
- case SOAP_11:
- bodyBuilder = BodyBuilder.EMPTY_SOAP11;
- break;
- case SOAP_12:
- bodyBuilder = BodyBuilder.EMPTY_SOAP12;
- break;
- default:
- throw new AssertionError();
- }
- }
-
- this.bodyBuilder = bodyBuilder;
- this.inFillers = fillers.toArray(new MessageFiller[fillers.size()]);
- }
-
- this.isOneWay = method.getMEP().isOneWay();
- responseBuilder = buildResponseBuilder(method, ValueSetterFactory.SYNC);
- }
-
- ResponseBuilder buildResponseBuilder(JavaMethodImpl method, ValueSetterFactory setterFactory) {
- // prepare objects for processing response
- List<ParameterImpl> rp = method.getResponseParameters();
- List<ResponseBuilder> builders = new ArrayList<ResponseBuilder>();
-
- for( ParameterImpl param : rp ) {
- ValueSetter setter;
- switch(param.getOutBinding().kind) {
- case BODY:
- if(param.isWrapperStyle()) {
- if(param.getParent().getBinding().isRpcLit())
- builders.add(new ResponseBuilder.RpcLit((WrapperParameter)param, setterFactory));
- else
- builders.add(new ResponseBuilder.DocLit((WrapperParameter)param, setterFactory));
- } else {
- setter = setterFactory.get(param);
- builders.add(new ResponseBuilder.Body(param.getXMLBridge(),setter));
- }
- break;
- case HEADER:
- setter = setterFactory.get(param);
- builders.add(new ResponseBuilder.Header(soapVersion, param, setter));
- break;
- case ATTACHMENT:
- setter = setterFactory.get(param);
- builders.add(ResponseBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter));
- break;
- case UNBOUND:
- setter = setterFactory.get(param);
- builders.add(new ResponseBuilder.NullSetter(setter,
- ResponseBuilder.getVMUninitializedValue(param.getTypeInfo().type)));
- break;
- default:
- throw new AssertionError();
- }
- }
- ResponseBuilder rb;
- switch(builders.size()) {
- case 0:
- rb = ResponseBuilder.NONE;
- break;
- case 1:
- rb = builders.get(0);
- break;
- default:
- rb = new ResponseBuilder.Composite(builders);
- }
- return rb;
- }
-
-
- /**
- * Creates a request {@link com.sun.xml.internal.ws.message.jaxb.JAXBMessage} from method arguments.
- * @param args proxy invocation arguments
- * @return Message for the arguments
- */
- public Packet createRequestPacket(JavaCallInfo args) {
- Message msg = bodyBuilder.createMessage(args.getParameters());
-
- for (MessageFiller filler : inFillers) filler.fillIn(args.getParameters(),msg);
-
- Packet req = (Packet)packetFactory.createContext(msg);
- req.setState(Packet.State.ClientRequest);
- req.soapAction = soapAction;
- req.expectReply = !isOneWay;
- req.getMessage().assertOneWay(isOneWay);
- req.setWSDLOperation(getOperationName());
- return req;
- }
-
- ValueGetterFactory getValueGetterFactory() {
- return ValueGetterFactory.SYNC;
- }
-
- public JavaCallInfo readResponse(Packet p, JavaCallInfo call) throws Throwable {
- Message msg = p.getMessage();
- if(msg.isFault()) {
- SOAPFaultBuilder faultBuilder = SOAPFaultBuilder.create(msg);
- Throwable t = faultBuilder.createException(checkedExceptions);
- call.setException(t);
- throw t;
- } else {
- initArgs(call.getParameters());
- Object ret = responseBuilder.readResponse(msg, call.getParameters());
- call.setReturnValue(ret);
- return call;
- }
- }
-
- public QName getOperationName() {
- //TODO javaMethod.getOperation()
- return javaMethod.getOperationQName();
- }
-
- public String getSoapAction() {
- return soapAction;
- }
-
- public boolean isOneWay() {
- return isOneWay;
- }
-
- protected void initArgs(Object[] args) throws Exception {
- }
-
- public Method getMethod() {
- return javaMethod.getMethod();
- }
-
- public JavaMethod getOperationModel() {
- return javaMethod;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SyncMethodHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SyncMethodHandler.java
deleted file mode 100644
index 0f70951f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SyncMethodHandler.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.client.sei;
-
-import com.oracle.webservices.internal.api.databinding.JavaCallInfo;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.client.RequestContext;
-import com.sun.xml.internal.ws.client.ResponseContextReceiver;
-import com.sun.xml.internal.ws.encoding.soap.DeserializationException;
-import com.sun.xml.internal.ws.message.jaxb.JAXBMessage;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import com.sun.xml.internal.ws.resources.DispatchMessages;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.ws.Holder;
-import javax.xml.ws.WebServiceException;
-
-import java.lang.reflect.Method;
-
-/**
- * {@link MethodHandler} that handles synchronous method invocations.
- *
- * <p>
- * This class mainly performs the following two tasks:
- * <ol>
- * <li>Accepts Object[] that represents arguments for a Java method,
- * and creates {@link JAXBMessage} that represents a request message.
- * <li>Takes a {@link Message] that represents a response,
- * and extracts the return value (and updates {@link Holder}s.)
- * </ol>
- *
- * <h2>Creating {@link JAXBMessage}</h2>
- * <p>
- * At the construction time, we prepare {@link BodyBuilder} and {@link MessageFiller}s
- * that know how to move arguments into a {@link Message}.
- * Some arguments go to the payload, some go to headers, still others go to attachments.
- *
- * @author Kohsuke Kawaguchi
- */
-final class SyncMethodHandler extends MethodHandler {
- final boolean isVoid;
- final boolean isOneway;
- final JavaMethodImpl javaMethod;
- SyncMethodHandler(SEIStub owner, JavaMethodImpl jm) {
- super(owner, jm.getMethod());
- javaMethod = jm;
- isVoid = void.class.equals(jm.getMethod().getReturnType());
- isOneway = jm.getMEP().isOneWay();
- }
-
- Object invoke(Object proxy, Object[] args) throws Throwable {
- return invoke(proxy,args,owner.requestContext,owner);
- }
-
- /**
- * Invokes synchronously, but with the given {@link RequestContext}
- * and {@link ResponseContextReceiver}.
- *
- * @param rc
- * This {@link RequestContext} is used for invoking this method.
- * We take this as a separate parameter because of the async invocation
- * handling, which requires a separate copy.
- */
- Object invoke(Object proxy, Object[] args, RequestContext rc, ResponseContextReceiver receiver) throws Throwable {
- JavaCallInfo call = owner.databinding.createJavaCallInfo(method, args);
- Packet req = (Packet) owner.databinding.serializeRequest(call);
- // process the message
- Packet reply = owner.doProcess(req,rc,receiver);
-
- Message msg = reply.getMessage();
- if(msg == null) {
- if (!isOneway || !isVoid) {
- throw new WebServiceException(DispatchMessages.INVALID_RESPONSE());
- }
- return null;
- }
-
- try {
- call = owner.databinding.deserializeResponse(reply, call);
- if (call.getException() != null) {
- throw call.getException();
- } else {
- return call.getReturnValue();
- }
- } catch (JAXBException e) {
- throw new DeserializationException(DispatchMessages.INVALID_RESPONSE_DESERIALIZATION(), e);
- } catch (XMLStreamException e) {
- throw new DeserializationException(DispatchMessages.INVALID_RESPONSE_DESERIALIZATION(),e);
- } finally {
- if (reply.transportBackChannel != null)
- reply.transportBackChannel.close();
- }
- }
-
- ValueGetterFactory getValueGetterFactory() {
- return ValueGetterFactory.SYNC;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetter.java
deleted file mode 100644
index c3da0afc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetter.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.sei;
-
-import javax.jws.WebParam.Mode;
-import javax.xml.ws.Holder;
-
-/**
- * Gets a value from an object that represents a parameter passed
- * as a method argument.
- *
- * <p>
- * This abstraction hides the handling of {@link Holder}.
- *
- * <p>
- * {@link ValueGetter} is a stateless behavior encapsulation.
- *
- * @author Kohsuke Kawaguchi
- */
-enum ValueGetter {
- /**
- * {@link ValueGetter} that works for {@link Mode#IN} parameter.
- *
- * <p>
- * Since it's the IN mode, the parameter is not a {@link Holder},
- * therefore the parameter itself is a value.
- */
- PLAIN() {
- Object get(Object parameter) {
- return parameter;
- }
- },
- /**
- * Creates {@link ValueGetter} that works for {@link Holder},
- * which is {@link Mode#INOUT} or {@link Mode#OUT}.
- *
- * <p>
- * In those {@link Mode}s, the parameter is a {@link Holder},
- * so the value to be sent is obtained by getting the value of the holder.
- */
- HOLDER() {
- Object get(Object parameter) {
- if(parameter==null)
- // the user is allowed to pass in null where a Holder is expected.
- return null;
- return ((Holder)parameter).value;
- }
- };
-
- /**
- * Gets the value to be sent, from a parameter given as a method argument.
- * @param parameter that is passed by proxy
- * @return if it holder then its value, otherise parameter itself
- */
- abstract Object get(Object parameter);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetterFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetterFactory.java
deleted file mode 100644
index 302d5f5e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetterFactory.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.sei;
-
-import com.sun.xml.internal.ws.model.ParameterImpl;
-
-import javax.jws.WebParam;
-
-/**
- * {@link ValueGetterFactory} is used to create {@link ValueGetter} objects.
- *
- * @author Jitendra Kotamraju
- */
-abstract class ValueGetterFactory {
-
- abstract ValueGetter get(ParameterImpl p);
-
- static final ValueGetterFactory SYNC = new ValueGetterFactory() {
- ValueGetter get(ParameterImpl p) {
- return (p.getMode()== WebParam.Mode.IN || p.getIndex() == -1)
- ? ValueGetter.PLAIN : ValueGetter.HOLDER;
- }
- };
-
- /**
- * In case of SEI async signatures, there are no holders. The OUT
- * parameters go in async bean class
- */
- static final ValueGetterFactory ASYNC = new ValueGetterFactory() {
- ValueGetter get(ParameterImpl p) {
- return ValueGetter.PLAIN;
- }
- };
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetter.java
deleted file mode 100644
index 5b979a15..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetter.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.sei;
-
-import com.sun.xml.internal.ws.api.model.Parameter;
-import com.sun.xml.internal.ws.model.ParameterImpl;
-import com.sun.xml.internal.ws.spi.db.PropertyAccessor;
-
-import javax.xml.ws.Holder;
-import javax.xml.ws.WebServiceException;
-import javax.xml.namespace.QName;
-import javax.xml.bind.JAXBException;
-
-/**
- * Moves a Java value unmarshalled from a response message
- * to the right place.
- *
- * <p>
- * Sometimes values are returned as a return value, and
- * others are returned in the {@link Holder} value. Instances
- * of this interface abstracts this detail.
- *
- * <p>
- * {@link ValueSetter} is a stateless behavior encapsulation.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class ValueSetter {
- private ValueSetter() {}
-
- /**
- * Moves the value to the expected place.
- *
- * @param obj
- * The unmarshalled object.
- * @param args
- * The arguments given to the Java method invocation. If <tt>obj</tt>
- * is supposed to be returned as a {@link Holder} value, a suitable
- * {@link Holder} is obtained from this argument list and <tt>obj</tt>
- * is set.
- *
- * @return
- * if <tt>obj</tt> is supposed to be returned as a return value
- * from the method, this method returns <tt>obj</tt>. Otherwise null.
- */
- abstract Object put(Object obj, Object[] args);
-
- /**
- * Singleton instance.
- */
- private static final ValueSetter RETURN_VALUE = new ReturnValue();
- /**
- * {@link Param}s with small index numbers are used often,
- * so we pool them to reduce the footprint.
- */
- private static final ValueSetter[] POOL = new ValueSetter[16];
-
- static {
- for( int i=0; i<POOL.length; i++ )
- POOL[i] = new Param(i);
- }
-
- /**
- * Returns a {@link ValueSetter} suitable for the given {@link Parameter}.
- */
- static ValueSetter getSync(ParameterImpl p) {
- int idx = p.getIndex();
-
- if(idx==-1)
- return RETURN_VALUE;
- if(idx<POOL.length)
- return POOL[idx];
- else
- return new Param(idx);
- }
-
-
- private static final class ReturnValue extends ValueSetter {
- Object put(Object obj, Object[] args) {
- return obj;
- }
- }
-
- static final class Param extends ValueSetter {
- /**
- * Index of the argument to put the value to.
- */
- private final int idx;
-
- public Param(int idx) {
- this.idx = idx;
- }
-
- Object put(Object obj, Object[] args) {
- Object arg = args[idx];
- if(arg!=null) {
- // we build model in such a way that this is guaranteed
- assert arg instanceof Holder;
- ((Holder)arg).value = obj;
- }
- // else {
- // if null is given as a Holder, there's no place to return
- // the value, so just ignore.
- // }
-
- // no value to return
- return null;
- }
- }
-
- /**
- * Singleton instance.
- */
- static final ValueSetter SINGLE_VALUE = new SingleValue();
-
- /**
- * Used in case of async invocation, where there is only one OUT parameter
- */
- private static final class SingleValue extends ValueSetter {
- /**
- * Set args[0] as the value
- */
- Object put(Object obj, Object[] args) {
- args[0] = obj;
- return null;
- }
- }
-
- /**
- * OUT parameters are set in async bean
- */
- static final class AsyncBeanValueSetter extends ValueSetter {
-
- private final PropertyAccessor accessor;
-
- AsyncBeanValueSetter(ParameterImpl p, Class wrapper) {
- QName name = p.getName();
- try {
- accessor = p.getOwner().getBindingContext().getElementPropertyAccessor(
- wrapper, name.getNamespaceURI(), name.getLocalPart() );
- } catch (JAXBException e) {
- throw new WebServiceException( // TODO: i18n
- wrapper+" do not have a property of the name "+name,e);
- }
- }
-
- /**
- * Sets the property in async bean instance
- *
- * @param obj property in async bean
- * @param args args[0] contains async bean instance
- * @return null always
- */
- Object put(Object obj, Object[] args) {
- assert args != null;
- assert args.length == 1;
- assert args[0] != null;
-
- Object bean = args[0];
- try {
- accessor.set(bean, obj);
- } catch (Exception e) {
- throw new WebServiceException(e); // TODO:i18n
- }
- return null;
- }
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetterFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetterFactory.java
deleted file mode 100644
index cbc91160..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetterFactory.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.client.sei;
-
-import com.sun.xml.internal.ws.model.ParameterImpl;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * {@link ValueSetterFactory} is used to create {@link ValueSetter}.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class ValueSetterFactory {
-
- public abstract ValueSetter get(ParameterImpl p);
-
- public static final ValueSetterFactory SYNC = new ValueSetterFactory() {
- public ValueSetter get(ParameterImpl p) {
- return ValueSetter.getSync(p);
- }
- };
-
- public static final ValueSetterFactory NONE = new ValueSetterFactory() {
- public ValueSetter get(ParameterImpl p) {
- throw new WebServiceException("This shouldn't happen. No response parameters.");
- }
- };
-
- public static final ValueSetterFactory SINGLE = new ValueSetterFactory() {
- public ValueSetter get(ParameterImpl p) {
- return ValueSetter.SINGLE_VALUE;
- }
- };
-
- public static final class AsyncBeanValueSetterFactory extends ValueSetterFactory {
- private Class asyncBean;
-
- public AsyncBeanValueSetterFactory(Class asyncBean) {
- this.asyncBean = asyncBean;
- }
-
- public ValueSetter get(ParameterImpl p) {
- return new ValueSetter.AsyncBeanValueSetter(p, asyncBean);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/pacakge-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/pacakge-info.java
deleted file mode 100644
index c23c0fce..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/pacakge-info.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * {@link SEIStub} and its supporting code.
- */
-package com.sun.xml.internal.ws.client.sei;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.java
deleted file mode 100644
index 492e2441..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.commons.xmlutil;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-import java.util.WeakHashMap;
-
-/**
- * Simple utility ensuring that the value is cached only in case it is non-internal implementation
- */
-abstract class ContextClassloaderLocal<V> {
-
- private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
-
- private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<ClassLoader, V>();
-
- public V get() throws Error {
- ClassLoader tccl = getContextClassLoader();
- V instance = CACHE.get(tccl);
- if (instance == null) {
- instance = createNewInstance();
- CACHE.put(tccl, instance);
- }
- return instance;
- }
-
- public void set(V instance) {
- CACHE.put(getContextClassLoader(), instance);
- }
-
- protected abstract V initialValue() throws Exception;
-
- private V createNewInstance() {
- try {
- return initialValue();
- } catch (Exception e) {
- throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e);
- }
- }
-
- private static String format(String property, Object... args) {
- String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property);
- return MessageFormat.format(text, args);
- }
-
- private static ClassLoader getContextClassLoader() {
- return (ClassLoader)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- ClassLoader cl = null;
- try {
- cl = Thread.currentThread().getContextClassLoader();
- } catch (SecurityException ex) {
- }
- return cl;
- }
- });
- }
-}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.properties
deleted file mode 100644
index 1a8fc17a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/ContextClassloaderLocal.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-# Error messages for ContextClassloaderLocal utility class
-FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/Converter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/Converter.java
deleted file mode 100644
index 0cad920e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/Converter.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.commons.xmlutil;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.logging.Logger;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Messages;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-
-import javax.xml.stream.*;
-import javax.xml.xpath.XPathFactoryConfigurationException;
-import java.io.*;
-import java.lang.reflect.Constructor;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.logging.Level;
-
-/**
- * Utility class that provides conversion of different XML representations
- * from/to various other formats
- *
- * @author Marek Potociar
- */
-public final class Converter {
-
- public static final String UTF_8 = "UTF-8";
-
- private Converter() {
- // prevents instantiation
- }
- private static final Logger LOGGER = Logger.getLogger(Converter.class);
- private static final ContextClassloaderLocal<XMLOutputFactory> xmlOutputFactory = new ContextClassloaderLocal<XMLOutputFactory>() {
- @Override
- protected XMLOutputFactory initialValue() throws Exception {
- return XMLOutputFactory.newInstance();
- }
- };
- private static final AtomicBoolean logMissingStaxUtilsWarning = new AtomicBoolean(false);
-
- /**
- * Converts a throwable to String
- *
- * @param throwable
- * @return String representation of throwable
- */
- public static String toString(Throwable throwable) {
- if (throwable == null) {
- return "[ No exception ]";
- }
-
- StringWriter stringOut = new StringWriter();
- throwable.printStackTrace(new PrintWriter(stringOut));
-
- return stringOut.toString();
- }
-
- public static String toString(Packet packet) {
- if (packet == null) {
- return "[ Null packet ]";
- } else if (packet.getMessage() == null) {
- return "[ Empty packet ]";
- }
-
- return toString(packet.getMessage());
- }
-
- public static String toStringNoIndent(Packet packet) {
- if (packet == null) {
- return "[ Null packet ]";
- } else if (packet.getMessage() == null) {
- return "[ Empty packet ]";
- }
-
- return toStringNoIndent(packet.getMessage());
- }
-
- public static String toString(Message message) {
- return toString(message, true);
- }
-
- public static String toStringNoIndent(Message message) {
- return toString(message, false);
- }
-
- private static String toString(Message message, boolean createIndenter) {
- if (message == null) {
- return "[ Null message ]";
- }
- StringWriter stringOut = null;
- try {
- stringOut = new StringWriter();
- XMLStreamWriter writer = null;
- try {
- writer = xmlOutputFactory.get().createXMLStreamWriter(stringOut);
- if (createIndenter) {
- writer = createIndenter(writer);
- }
- message.copy().writeTo(writer);
- } catch (Exception e) { // WSIT-1596 - Message Dumping should not affect other processing
- LOGGER.log(Level.WARNING, "Unexpected exception occured while dumping message", e);
- } finally {
- if (writer != null) {
- try {
- writer.close();
- } catch (XMLStreamException ignored) {
- LOGGER.fine("Unexpected exception occured while closing XMLStreamWriter", ignored);
- }
- }
- }
- return stringOut.toString();
- } finally {
- if (stringOut != null) {
- try {
- stringOut.close();
- } catch (IOException ex) {
- LOGGER.finest("An exception occured when trying to close StringWriter", ex);
- }
- }
- }
- }
-
- public static byte[] toBytes(Message message, String encoding) throws XMLStreamException {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
- try {
- if (message != null) {
- XMLStreamWriter xsw = xmlOutputFactory.get().createXMLStreamWriter(baos, encoding);
- try {
- message.writeTo(xsw);
- } finally {
- try {
- xsw.close();
- } catch (XMLStreamException ex) {
- LOGGER.warning("Unexpected exception occured while closing XMLStreamWriter", ex);
- }
- }
- }
-
- return baos.toByteArray();
- } finally {
- try {
- baos.close();
- } catch (IOException ex) {
- LOGGER.warning("Unexpected exception occured while closing ByteArrayOutputStream", ex);
- }
- }
- }
-
- /**
- * Converts JAX-WS RI message represented as input stream back to Message
- * object.
- *
- * @param dataStream message data stream
- * @param encoding message data stream encoding
- *
- * @return {@link com.sun.xml.internal.ws.api.message.Message} object created from the data stream
- */
- public static Message toMessage(@NotNull InputStream dataStream, String encoding) throws XMLStreamException {
- XMLStreamReader xsr = XmlUtil.newXMLInputFactory(true).createXMLStreamReader(dataStream, encoding);
- return Messages.create(xsr);
- }
-
- public static String messageDataToString(final byte[] data, final String encoding) {
- try {
- return toString(toMessage(new ByteArrayInputStream(data), encoding));
- // closing ByteArrayInputStream has no effect, so ignoring the redundant call
- } catch (XMLStreamException ex) {
- LOGGER.warning("Unexpected exception occured while converting message data to string", ex);
- return "[ Message Data Conversion Failed ]";
- }
- }
-
- /**
- * Wraps {@link javax.xml.stream.XMLStreamWriter} by an indentation engine if possible.
- *
- * <p>
- * We can do this only when we have <tt>stax-utils.jar</tt> in the class path.
- */
- private static XMLStreamWriter createIndenter(XMLStreamWriter writer) {
- try {
- Class<?> clazz = Converter.class.getClassLoader().loadClass("javanet.staxutils.IndentingXMLStreamWriter");
- Constructor<?> c = clazz.getConstructor(XMLStreamWriter.class);
- writer = XMLStreamWriter.class.cast(c.newInstance(writer));
- } catch (Exception ex) {
- // if stax-utils.jar is not in the classpath, this will fail
- // so, we'll just have to do without indentation
- if (logMissingStaxUtilsWarning.compareAndSet(false, true)) {
- LOGGER.log(Level.WARNING, "Put stax-utils.jar to the classpath to indent the dump output", ex);
- }
- }
- return writer;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementAssertionCreator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementAssertionCreator.java
deleted file mode 100644
index 40b28971..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementAssertionCreator.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.config.management.policy;
-
-import com.sun.xml.internal.ws.api.config.management.policy.ManagedClientAssertion;
-import com.sun.xml.internal.ws.api.config.management.policy.ManagedServiceAssertion;
-import com.sun.xml.internal.ws.policy.AssertionSet;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyConstants;
-import com.sun.xml.internal.ws.policy.sourcemodel.AssertionData;
-import com.sun.xml.internal.ws.policy.spi.AssertionCreationException;
-import com.sun.xml.internal.ws.policy.spi.PolicyAssertionCreator;
-
-import java.util.Collection;
-import javax.xml.namespace.QName;
-
-/**
- * Instantiates a PolicyAssertion of type ManagedServiceAssertion or ManagedClientAssertion.
- *
- * @author Fabian Ritzmann
- */
-public class ManagementAssertionCreator implements PolicyAssertionCreator {
-
- public String[] getSupportedDomainNamespaceURIs() {
- return new String[] { PolicyConstants.SUN_MANAGEMENT_NAMESPACE };
- }
-
- public PolicyAssertion createAssertion(AssertionData data, Collection<PolicyAssertion> assertionParameters,
- AssertionSet nestedAlternative, PolicyAssertionCreator defaultCreator) throws AssertionCreationException {
- final QName name = data.getName();
- if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(name)) {
- return new ManagedServiceAssertion(data, assertionParameters);
- }
- else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(name)) {
- return new ManagedClientAssertion(data, assertionParameters);
- }
- else {
- return defaultCreator.createAssertion(data, assertionParameters, nestedAlternative, null);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPolicyValidator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPolicyValidator.java
deleted file mode 100644
index 07ebf4d1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPolicyValidator.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.config.management.policy;
-
-import com.sun.xml.internal.ws.api.config.management.policy.ManagedClientAssertion;
-import com.sun.xml.internal.ws.api.config.management.policy.ManagedServiceAssertion;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyConstants;
-import com.sun.xml.internal.ws.policy.spi.PolicyAssertionValidator;
-import com.sun.xml.internal.ws.policy.spi.PolicyAssertionValidator.Fitness;
-
-import javax.xml.namespace.QName;
-
-/**
- * Validate the ManagedService and ManagedClient policy assertions.
- *
- * @author Fabian Ritzmann
- */
-public class ManagementPolicyValidator implements PolicyAssertionValidator {
-
- public Fitness validateClientSide(PolicyAssertion assertion) {
- final QName assertionName = assertion.getName();
- if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
- return Fitness.SUPPORTED;
- }
- else if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
- return Fitness.UNSUPPORTED;
- }
- else {
- return Fitness.UNKNOWN;
- }
- }
-
- public Fitness validateServerSide(PolicyAssertion assertion) {
- final QName assertionName = assertion.getName();
- if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
- return Fitness.SUPPORTED;
- }
- else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
- return Fitness.UNSUPPORTED;
- }
- else {
- return Fitness.UNKNOWN;
- }
- }
-
- public String[] declareSupportedDomains() {
- return new String[] { PolicyConstants.SUN_MANAGEMENT_NAMESPACE };
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPrefixMapper.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPrefixMapper.java
deleted file mode 100644
index 3f7366a2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPrefixMapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.config.management.policy;
-
-import com.sun.xml.internal.ws.policy.PolicyConstants;
-import com.sun.xml.internal.ws.policy.spi.PrefixMapper;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Provide the default prefix for the configuration management namespace.
- *
- * @author Fabian Ritzmann
- */
-public class ManagementPrefixMapper implements PrefixMapper {
-
- private static final Map<String, String> prefixMap = new HashMap<String, String>();
-
- static {
- prefixMap.put(PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "sunman");
- }
-
- public Map<String, String> getPrefixMap() {
- return prefixMap;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/dev/FeatureReader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/dev/FeatureReader.java
deleted file mode 100644
index d70a74dc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/dev/FeatureReader.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.config.metro.dev;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLEventReader;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * Parses a XML fragment and is expected to return a corresponding WebServiceFeature.
- *
- * @author Fabian Ritzmann
- */
-public interface FeatureReader<T extends WebServiceFeature> {
-
- public static final QName ENABLED_ATTRIBUTE_NAME = new QName("enabled");
-
- /**
- * Parse an XML stream and return the corresponding WebServiceFeature instance.
- */
- public T parse(XMLEventReader reader) throws WebServiceException;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/util/ParserUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/util/ParserUtil.java
deleted file mode 100644
index 65b5f94e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/util/ParserUtil.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.config.metro.util;
-
-import com.sun.istack.internal.logging.Logger;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- *
- * @author Fabian Ritzmann
- */
-public class ParserUtil {
-
- private static final Logger LOGGER = Logger.getLogger(ParserUtil.class);
-
- private ParserUtil() {
- }
-
- /**
- * Return true if the value is "true" or "1". Return false if the value is
- * "false" or "0". Throw an exception otherwise. The test is case sensitive.
- *
- * @param value The String representation of the value. Must not be null.
- * @return True if the value is "true" or "1". False if the value is
- * "false" or "0".
- * @throws PolicyException If the value is not "true", "false", "0" or "1".
- */
- public static boolean parseBooleanValue(String value) throws WebServiceException {
- if ("true".equals(value) || "1".equals(value)) {
- return true;
- }
- else if ("false".equals(value) || "0".equals(value)) {
- return false;
- }
- // TODO logging message
- throw LOGGER.logSevereException(new WebServiceException("invalid boolean value"));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingFactoryImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingFactoryImpl.java
deleted file mode 100644
index f2bcebb9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingFactoryImpl.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.db;
-
-import java.io.InputStream;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-
-import org.xml.sax.EntityResolver;
-
-import com.oracle.webservices.internal.api.databinding.Databinding;
-import com.oracle.webservices.internal.api.databinding.Databinding.Builder;
-import com.oracle.webservices.internal.api.databinding.WSDLGenerator;
-import com.oracle.webservices.internal.api.databinding.DatabindingModeFeature;
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.WSBinding;
-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.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.spi.db.DatabindingProvider;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-
-/**
- * DatabindingFactoryImpl
- *
- * @author shih-chang.chen@oracle.com
- */
-public class DatabindingFactoryImpl extends DatabindingFactory {
-
- static final String WsRuntimeFactoryDefaultImpl = "com.sun.xml.internal.ws.db.DatabindingProviderImpl";
-
- protected Map<String, Object> properties = new HashMap<String, Object>();
- protected DatabindingProvider defaultRuntimeFactory;
- protected List<DatabindingProvider> providers;
-
- static private List<DatabindingProvider> providers() {
- List<DatabindingProvider> factories = new java.util.ArrayList<DatabindingProvider>();
- for (DatabindingProvider p : ServiceFinder.find(DatabindingProvider.class)) {
- factories.add(p);
- }
- return factories;
- }
-
- public DatabindingFactoryImpl() {
- }
-
- public Map<String, Object> properties() {
- return properties;
- }
-
- <T> T property(Class<T> propType, String propName) {
- if (propName == null) propName = propType.getName();
- return propType.cast(properties.get(propName));
- }
-
- public DatabindingProvider provider(DatabindingConfig config) {
- String mode = databindingMode(config);
- if (providers == null)
- providers = providers();
- DatabindingProvider provider = null;
- if (providers != null) {
- for (DatabindingProvider p : providers)
- if (p.isFor(mode))
- provider = p;
- } if (provider == null) {
- provider = new DatabindingProviderImpl();
- }
- return provider;
- }
-
- public Databinding createRuntime(DatabindingConfig config) {
- DatabindingProvider provider = provider(config);
- return provider.create(config);
- }
-
- public WSDLGenerator createWsdlGen(DatabindingConfig config) {
- DatabindingProvider provider = provider(config);
- return provider.wsdlGen(config);
- }
-
- String databindingMode(DatabindingConfig config) {
- if ( config.getMappingInfo() != null &&
- config.getMappingInfo().getDatabindingMode() != null)
- return config.getMappingInfo().getDatabindingMode();
- if ( config.getFeatures() != null) for (WebServiceFeature f : config.getFeatures()) {
- if (f instanceof DatabindingModeFeature) {
- DatabindingModeFeature dmf = (DatabindingModeFeature) f;
- config.properties().putAll(dmf.getProperties());
- return dmf.getMode();
- }
- }
- return null;
- }
-
- ClassLoader classLoader() {
- ClassLoader classLoader = property(ClassLoader.class, null);
- if (classLoader == null) classLoader = Thread.currentThread().getContextClassLoader();
- return classLoader;
- }
-
- Properties loadPropertiesFile(String fileName) {
- ClassLoader classLoader = classLoader();
- Properties p = new Properties();
- try {
- InputStream is = null;
- if (classLoader == null) {
- is = ClassLoader.getSystemResourceAsStream(fileName);
- } else {
- is = classLoader.getResourceAsStream(fileName);
- }
- if (is != null) {
- p.load(is);
- }
- } catch (Exception e) {
- throw new WebServiceException(e);
- }
- return p;
- }
-
- public Builder createBuilder(Class<?> contractClass, Class<?> endpointClass) {
- return new ConfigBuilder(this, contractClass, endpointClass);
- }
-
- static class ConfigBuilder implements Builder {
- DatabindingConfig config;
- DatabindingFactoryImpl factory;
-
- ConfigBuilder(DatabindingFactoryImpl f, Class<?> contractClass, Class<?> implBeanClass) {
- factory = f;
- config = new DatabindingConfig();
- config.setContractClass(contractClass);
- config.setEndpointClass(implBeanClass);
- }
- public Builder targetNamespace(String targetNamespace) {
- config.getMappingInfo().setTargetNamespace(targetNamespace);
- return this;
- }
- public Builder serviceName(QName serviceName) {
- config.getMappingInfo().setServiceName(serviceName);
- return this;
- }
- public Builder portName(QName portName) {
- config.getMappingInfo().setPortName(portName);
- return this;
- }
- public Builder wsdlURL(URL wsdlURL) {
- config.setWsdlURL(wsdlURL);
- return this;
- }
- public Builder wsdlSource(Source wsdlSource) {
- config.setWsdlSource(wsdlSource);
- return this;
- }
- public Builder entityResolver(EntityResolver entityResolver) {
- config.setEntityResolver(entityResolver);
- return this;
- }
- public Builder classLoader(ClassLoader classLoader) {
- config.setClassLoader(classLoader);
- return this;
- }
- public Builder feature(WebServiceFeature... f) {
- config.setFeatures(f);
- return this;
- }
- public Builder property(String name, Object value) {
- config.properties().put(name, value);
- if (isfor(BindingID.class, name, value)) {
- config.getMappingInfo().setBindingID((BindingID)value);
- }
- if (isfor(WSBinding.class, name, value)) {
- config.setWSBinding((WSBinding)value);
- }
- if (isfor(WSDLPort.class, name, value)) {
- config.setWsdlPort((WSDLPort)value);
- }
- if (isfor(MetadataReader.class, name, value)) {
- config.setMetadataReader((MetadataReader)value);
- }
- return this;
- }
- boolean isfor(Class<?> type, String name, Object value) {
- return type.getName().equals(name) && type.isInstance(value);
- }
-
- public com.oracle.webservices.internal.api.databinding.Databinding build() {
- return factory.createRuntime(config);
- }
- public com.oracle.webservices.internal.api.databinding.WSDLGenerator createWSDLGenerator() {
- return factory.createWsdlGen(config);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingImpl.java
deleted file mode 100644
index 745df5f6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingImpl.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.db;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.ws.WebServiceFeature;
-
-import com.oracle.webservices.internal.api.databinding.JavaCallInfo;
-import com.oracle.webservices.internal.api.message.MessageContext;
-import com.sun.xml.internal.ws.api.databinding.EndpointCallBridge;
-import com.sun.xml.internal.ws.api.databinding.WSDLGenInfo;
-import com.sun.xml.internal.ws.api.databinding.Databinding;
-import com.sun.xml.internal.ws.api.databinding.DatabindingConfig;
-import com.sun.xml.internal.ws.api.databinding.ClientCallBridge;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageContextFactory;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.MEP;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.WSDLOperationMapping;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.sei.StubAsyncHandler;
-import com.sun.xml.internal.ws.client.sei.StubHandler;
-import com.sun.xml.internal.ws.model.AbstractSEIModelImpl;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import com.sun.xml.internal.ws.model.RuntimeModeler;
-import com.sun.xml.internal.ws.server.sei.TieHandler;
-import com.sun.xml.internal.ws.wsdl.ActionBasedOperationSignature;
-import com.sun.xml.internal.ws.wsdl.DispatchException;
-import com.sun.xml.internal.ws.wsdl.OperationDispatcher;
-
-/**
- * WsRuntimeImpl is the databinding processor built on SEIModel
- *
- * @author shih-chang.chen@oracle.com
- */
-public final class DatabindingImpl implements Databinding {
-
- AbstractSEIModelImpl seiModel;
- Map<Method, StubHandler> stubHandlers;
-// QNameMap<TieHandler> wsdlOpMap = new QNameMap<TieHandler>();
- Map<JavaMethodImpl, TieHandler> wsdlOpMap = new HashMap<JavaMethodImpl, TieHandler>();
- Map<Method, TieHandler> tieHandlers = new HashMap<Method, TieHandler>();
- OperationDispatcher operationDispatcher;
- OperationDispatcher operationDispatcherNoWsdl;
- boolean clientConfig = false;
- Codec codec;
- MessageContextFactory packetFactory = null;
-
- public DatabindingImpl(DatabindingProviderImpl p, DatabindingConfig config) {
- RuntimeModeler modeler = new RuntimeModeler(config);
- modeler.setClassLoader(config.getClassLoader());
- seiModel = modeler.buildRuntimeModel();
- WSDLPort wsdlport = config.getWsdlPort();
- packetFactory = new MessageContextFactory(seiModel.getWSBinding().getFeatures());
- clientConfig = isClientConfig(config);
- if (clientConfig) {
- initStubHandlers();
- }
- seiModel.setDatabinding(this);
- if (wsdlport != null) {
- freeze(wsdlport);
- }
- if (operationDispatcher == null) {
- operationDispatcherNoWsdl = new OperationDispatcher(null, seiModel.getWSBinding(), seiModel);
- }
-// if(!clientConfig) {
- for (JavaMethodImpl jm : seiModel.getJavaMethods()) {
- if (!jm.isAsync()) {
- TieHandler th = new TieHandler(jm, seiModel.getWSBinding(), packetFactory);
- wsdlOpMap.put(jm, th);
- tieHandlers.put(th.getMethod(), th);
- }
- }
-// }
- }
-
- //TODO isClientConfig
- private boolean isClientConfig(DatabindingConfig config) {
- if (config.getContractClass() == null) {
- return false;
- }
- if (!config.getContractClass().isInterface()) {
- return false;
- }
- return (config.getEndpointClass() == null || config.getEndpointClass().isInterface());
- }
- //TODO fix freeze
-
- public void freeze(WSDLPort port) {
- if (clientConfig) {
- return;
- }
- synchronized(this) {
- if (operationDispatcher == null) {
- operationDispatcher = (port == null) ? null : new OperationDispatcher(port, seiModel.getWSBinding(), seiModel);
- }
- }
- }
-
- public SEIModel getModel() {
- return seiModel;
- }
-//Refactored from SEIStub
-
- private void initStubHandlers() {
- stubHandlers = new HashMap<Method, StubHandler>();
- Map<ActionBasedOperationSignature, JavaMethodImpl> syncs = new HashMap<ActionBasedOperationSignature, JavaMethodImpl>();
- // fill in methodHandlers.
- // first fill in sychronized versions
- for (JavaMethodImpl m : seiModel.getJavaMethods()) {
- if (!m.getMEP().isAsync) {
- StubHandler handler = new StubHandler(m, packetFactory);
- syncs.put(m.getOperationSignature(), m);
- stubHandlers.put(m.getMethod(), handler);
- }
- }
- for (JavaMethodImpl jm : seiModel.getJavaMethods()) {
- JavaMethodImpl sync = syncs.get(jm.getOperationSignature());
- if (jm.getMEP() == MEP.ASYNC_CALLBACK || jm.getMEP() == MEP.ASYNC_POLL) {
- Method m = jm.getMethod();
- StubAsyncHandler handler = new StubAsyncHandler(jm, sync, packetFactory);
- stubHandlers.put(m, handler);
- }
- }
- }
-
- JavaMethodImpl resolveJavaMethod(Packet req) throws DispatchException {
- WSDLOperationMapping m = req.getWSDLOperationMapping();
- if (m == null) {
- synchronized (this) {
- m = (operationDispatcher != null)
- ? operationDispatcher.getWSDLOperationMapping(req)
- : operationDispatcherNoWsdl.getWSDLOperationMapping(req);
- }
- }
- return (JavaMethodImpl) m.getJavaMethod();
- }
-
- public JavaCallInfo deserializeRequest(Packet req) {
- com.sun.xml.internal.ws.api.databinding.JavaCallInfo call = new com.sun.xml.internal.ws.api.databinding.JavaCallInfo();
- try {
- JavaMethodImpl wsdlOp = resolveJavaMethod(req);
- TieHandler tie = wsdlOpMap.get(wsdlOp);
- call.setMethod(tie.getMethod());
- Object[] args = tie.readRequest(req.getMessage());
- call.setParameters(args);
- } catch (DispatchException e) {
- call.setException(e);
- }
- return call;
- }
-
- public JavaCallInfo deserializeResponse(Packet res, JavaCallInfo call) {
- StubHandler stubHandler = stubHandlers.get(call.getMethod());
- try {
- return stubHandler.readResponse(res, call);
- } catch (Throwable e) {
- call.setException(e);
- return call;
- }
- }
-
- public WebServiceFeature[] getFeatures() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Packet serializeRequest(JavaCallInfo call) {
- StubHandler stubHandler = stubHandlers.get(call.getMethod());
- Packet p = stubHandler.createRequestPacket(call);
- p.setState(Packet.State.ClientRequest);
- return p;
- }
-
- @Override
- public Packet serializeResponse(JavaCallInfo call) {
- Method method = call.getMethod();
- Message message = null;
- if (method != null) {
- TieHandler th = tieHandlers.get(method);
- if (th != null) {
- return th.serializeResponse(call);
- }
- }
- if (call.getException() instanceof DispatchException) {
- message = ((DispatchException) call.getException()).fault;
- }
- Packet p = (Packet) packetFactory.createContext(message);
- p.setState(Packet.State.ServerResponse);
- return p;
- }
-
- @Override
- public ClientCallBridge getClientBridge(Method method) {
- return stubHandlers.get(method);
- }
-
- @Override
- public void generateWSDL(WSDLGenInfo info) {
- com.sun.xml.internal.ws.wsdl.writer.WSDLGenerator wsdlGen = new com.sun.xml.internal.ws.wsdl.writer.WSDLGenerator(
- seiModel,
- info.getWsdlResolver(),
- seiModel.getWSBinding(),
- info.getContainer(), seiModel.getEndpointClass(),
- info.isInlineSchemas(),
- info.isSecureXmlProcessingDisabled(),
- info.getExtensions());
- wsdlGen.doGeneration();
- }
-
- @Override
- public EndpointCallBridge getEndpointBridge(Packet req) throws DispatchException {
- JavaMethodImpl wsdlOp = resolveJavaMethod(req);
- return wsdlOpMap.get(wsdlOp);
- }
-
- Codec getCodec() {
- if (codec == null) {
- codec = ((BindingImpl) seiModel.getWSBinding()).createCodec();
- }
- return codec;
- }
-
- @Override
- public ContentType encode(Packet packet, OutputStream out) throws IOException {
- return getCodec().encode(packet, out);
- }
-
- @Override
- public void decode(InputStream in, String ct, Packet p) throws IOException {
- getCodec().decode(in, ct, p);
- }
-
- @Override
- public com.oracle.webservices.internal.api.databinding.JavaCallInfo createJavaCallInfo(Method method, Object[] args) {
- return new com.sun.xml.internal.ws.api.databinding.JavaCallInfo(method, args);
- }
-
- @Override
- public com.oracle.webservices.internal.api.databinding.JavaCallInfo deserializeResponse(
- MessageContext message, com.oracle.webservices.internal.api.databinding.JavaCallInfo call) {
- return deserializeResponse((Packet) message, (JavaCallInfo) call);
- }
-
- @Override
- public com.oracle.webservices.internal.api.databinding.JavaCallInfo deserializeRequest(MessageContext message) {
- return deserializeRequest((Packet) message);
- }
-
- @Override
- public MessageContextFactory getMessageContextFactory() {
- return packetFactory;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingProviderImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingProviderImpl.java
deleted file mode 100644
index 0e307215..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingProviderImpl.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.db;
-
-import java.io.File;
-import java.util.Map;
-
-import com.oracle.webservices.internal.api.databinding.WSDLGenerator;
-import com.oracle.webservices.internal.api.databinding.WSDLResolver;
-import com.sun.xml.internal.ws.api.databinding.Databinding;
-import com.sun.xml.internal.ws.api.databinding.DatabindingConfig;
-import com.sun.xml.internal.ws.api.databinding.WSDLGenInfo;
-import com.sun.xml.internal.ws.spi.db.DatabindingProvider;
-
-/**
- * DatabindingProviderImpl is the default JAXWS implementation of DatabindingProvider
- *
- * @author shih-chang.chen@oracle.com
- */
-public class DatabindingProviderImpl implements DatabindingProvider {
- static final private String CachedDatabinding = "com.sun.xml.internal.ws.db.DatabindingProviderImpl";
- Map<String, Object> properties;
-
- public void init(Map<String, Object> p) {
- properties = p;
- }
-
- DatabindingImpl getCachedDatabindingImpl(DatabindingConfig config) {
- Object object = config.properties().get(CachedDatabinding);
- return (object != null && object instanceof DatabindingImpl)? (DatabindingImpl)object : null;
- }
-
- public Databinding create(DatabindingConfig config) {
- DatabindingImpl impl = getCachedDatabindingImpl(config);
- if (impl == null) {
- impl = new DatabindingImpl(this, config);
- config.properties().put(CachedDatabinding, impl);
- }
- return impl;
- }
-
- public WSDLGenerator wsdlGen(DatabindingConfig config) {
- DatabindingImpl impl = (DatabindingImpl)create(config);
- return new JaxwsWsdlGen(impl);
- }
-
- public boolean isFor(String databindingMode) {
- //This is the default one, so it always return true
- return true;
- }
-
- static public class JaxwsWsdlGen implements WSDLGenerator {
- DatabindingImpl databinding;
- WSDLGenInfo wsdlGenInfo;
-
- JaxwsWsdlGen(DatabindingImpl impl) {
- databinding = impl;
- wsdlGenInfo = new WSDLGenInfo();
- }
-
- public WSDLGenerator inlineSchema(boolean inline) {
- wsdlGenInfo.setInlineSchemas(inline);
- return this;
- }
-
- public WSDLGenerator property(String name, Object value) {
- // TODO wsdlGenInfo.set...
- return this;
- }
-
- public void generate(WSDLResolver wsdlResolver) {
- wsdlGenInfo.setWsdlResolver(wsdlResolver);
- databinding.generateWSDL(wsdlGenInfo);
- }
-
- public void generate(File outputDir, String name) {
- // TODO Auto-generated method stub
- databinding.generateWSDL(wsdlGenInfo);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/BridgeWrapper.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/BridgeWrapper.java
deleted file mode 100644
index 5cd15b72..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/BridgeWrapper.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.db.glassfish;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.spi.db.DatabindingException;
-import com.sun.xml.internal.ws.spi.db.TypeInfo;
-
-public class BridgeWrapper<T> implements XMLBridge<T> {
-
- private JAXBRIContextWrapper parent;
- private com.sun.xml.internal.bind.api.Bridge<T> bridge;
-
- public BridgeWrapper(JAXBRIContextWrapper p, com.sun.xml.internal.bind.api.Bridge<T> b) {
- parent = p;
- bridge = b;
- }
-
- @Override
- public BindingContext context() {
- return parent;
- }
-
- com.sun.xml.internal.bind.api.Bridge getBridge() {
- return bridge;
- }
-
- @Override
- public boolean equals(Object obj) {
- return bridge.equals(obj);
- }
-
- public JAXBRIContext getContext() {
- return bridge.getContext();
- }
-
- @Override
- public TypeInfo getTypeInfo() {
- return parent.typeInfo(bridge.getTypeReference());
- }
-
- @Override
- public int hashCode() {
- return bridge.hashCode();
- }
-
-// public final void marshal(BridgeContext context, T object, ContentHandler contentHandler) throws JAXBException {
-// bridge.marshal(context, object, contentHandler);
-// }
-//
-// public final void marshal(BridgeContext context, T object, Node output) throws JAXBException {
-// bridge.marshal(context, object, output);
-// }
-//
-// public final void marshal(BridgeContext context, T object, OutputStream output, NamespaceContext nsContext) throws JAXBException {
-// bridge.marshal(context, object, output, nsContext);
-// }
-//
-// public final void marshal(BridgeContext context, T object, Result result) throws JAXBException {
-// bridge.marshal(context, object, result);
-// }
-//
-// public final void marshal(BridgeContext context, T object, XMLStreamWriter output) throws JAXBException {
-// bridge.marshal(context, object, output);
-// }
- public void marshal(Marshaller m, T object, ContentHandler contentHandler) throws JAXBException {
- bridge.marshal(m, object, contentHandler);
- }
-
- public void marshal(Marshaller m, T object, Node output) throws JAXBException {
- bridge.marshal(m, object, output);
- }
-
- public void marshal(Marshaller m, T object, OutputStream output, NamespaceContext nsContext) throws JAXBException {
- bridge.marshal(m, object, output, nsContext);
- }
-
- public void marshal(Marshaller m, T object, Result result) throws JAXBException {
- bridge.marshal(m, object, result);
- }
-
- public void marshal(Marshaller m, T object, XMLStreamWriter output) throws JAXBException {
- bridge.marshal(m, object, output);
-// bridge.marshal(m, (T) convert(object), output);
- }
-
- @Override
- public final void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException {
-// bridge.marshal((T) convert(object), contentHandler, am);
- bridge.marshal(object, contentHandler, am);
- }
-
-// Object convert(Object o) {
-// return (o instanceof WrapperComposite)? convertWrapper((WrapperComposite)o) : o;
-// }
-//
-// static CompositeStructure convertWrapper(WrapperComposite w) {
-// CompositeStructure cs = new CompositeStructure();
-// cs.values = w.values;
-// cs.bridges = new Bridge[w.bridges.length];
-// for (int i = 0; i < cs.bridges.length; i++)
-// cs.bridges[i] = ((BridgeWrapper)w.bridges[i]).getBridge();
-// return cs;
-// }
- public void marshal(T object, ContentHandler contentHandler) throws JAXBException {
- bridge.marshal(object, contentHandler);
-// bridge.marshal((T) convert(object), contentHandler);
- }
-
- @Override
- public void marshal(T object, Node output) throws JAXBException {
- bridge.marshal(object, output);
-// bridge.marshal((T) convert(object), output);
- }
-
- @Override
- public void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException {
-// bridge.marshal((T) convert(object), output, nsContext, am);
- bridge.marshal(object, output, nsContext, am);
- }
-
- public void marshal(T object, OutputStream output, NamespaceContext nsContext) throws JAXBException {
- bridge.marshal(object, output, nsContext);
-// bridge.marshal((T) convert(object), output, nsContext);
- }
-
- @Override
- public final void marshal(T object, Result result) throws JAXBException {
- bridge.marshal(object, result);
- }
-
- @Override
- public final void marshal(T object, XMLStreamWriter output,
- AttachmentMarshaller am) throws JAXBException {
- bridge.marshal(object, output, am);
- }
-
- public final void marshal(T object, XMLStreamWriter output)
- throws JAXBException {
- bridge.marshal(object, output);
- }
-
- @Override
- public String toString() {
- return BridgeWrapper.class.getName() + " : " + bridge.toString();
- }
-
-// public final T unmarshal(BridgeContext context, InputStream in)
-// throws JAXBException {
-// return bridge.unmarshal(context, in);
-// }
-//
-// public final T unmarshal(BridgeContext context, Node n)
-// throws JAXBException {
-// return bridge.unmarshal(context, n);
-// }
-//
-// public final T unmarshal(BridgeContext context, Source in)
-// throws JAXBException {
-// return bridge.unmarshal(context, in);
-// }
-//
-// public final T unmarshal(BridgeContext context, XMLStreamReader in)
-// throws JAXBException {
-// return bridge.unmarshal(context, in);
-// }
- @Override
- public final T unmarshal(InputStream in) throws JAXBException {
- return bridge.unmarshal(in);
- }
-
- @Override
- public final T unmarshal(Node n, AttachmentUnmarshaller au)
- throws JAXBException {
- return bridge.unmarshal(n, au);
- }
-
- public final T unmarshal(Node n) throws JAXBException {
- return bridge.unmarshal(n);
- }
-
- @Override
- public final T unmarshal(Source in, AttachmentUnmarshaller au)
- throws JAXBException {
- return bridge.unmarshal(in, au);
- }
-
- public final T unmarshal(Source in) throws DatabindingException {
- try {
- return bridge.unmarshal(in);
- } catch (JAXBException e) {
- throw new DatabindingException(e);
- }
- }
-
- public T unmarshal(Unmarshaller u, InputStream in) throws JAXBException {
- return bridge.unmarshal(u, in);
- }
-
- public T unmarshal(Unmarshaller context, Node n) throws JAXBException {
- return bridge.unmarshal(context, n);
- }
-
- public T unmarshal(Unmarshaller u, Source in) throws JAXBException {
- return bridge.unmarshal(u, in);
- }
-
- public T unmarshal(Unmarshaller u, XMLStreamReader in) throws JAXBException {
- return bridge.unmarshal(u, in);
- }
-
- @Override
- public final T unmarshal(XMLStreamReader in, AttachmentUnmarshaller au)
- throws JAXBException {
- return bridge.unmarshal(in, au);
- }
-
- public final T unmarshal(XMLStreamReader in) throws JAXBException {
- return bridge.unmarshal(in);
- }
-
- @Override
- public boolean supportOutputStream() {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextFactory.java
deleted file mode 100644
index 673f1883..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextFactory.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.db.glassfish;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.lang.reflect.Type;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Marshaller;
-
-import com.sun.xml.internal.bind.api.TypeReference;
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.bind.api.CompositeStructure;
-import com.sun.xml.internal.bind.v2.ContextFactory;
-import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader;
-import com.sun.xml.internal.bind.v2.runtime.MarshallerImpl;
-import com.sun.xml.internal.ws.developer.JAXBContextFactory;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.BindingContextFactory;
-import com.sun.xml.internal.ws.spi.db.BindingInfo;
-import com.sun.xml.internal.ws.spi.db.DatabindingException;
-import com.sun.xml.internal.ws.spi.db.TypeInfo;
-import com.sun.xml.internal.ws.spi.db.WrapperComposite;
-import java.util.Arrays;
-
-/**
- * JAXBRIContextFactory
- *
- * @author shih-chang.chen@oracle.com
- */
-public class JAXBRIContextFactory extends BindingContextFactory {
-
- @Override
- public BindingContext newContext(JAXBContext context) {
- return new JAXBRIContextWrapper((JAXBRIContext) context, null);
- }
-
- @Override
- public BindingContext newContext(BindingInfo bi) {
- Class[] classes = bi.contentClasses().toArray(new Class[bi.contentClasses().size()]);
- for (int i = 0; i < classes.length; i++) {
- if (WrapperComposite.class.equals(classes[i])) {
- classes[i] = CompositeStructure.class;
- }
- }
- Map<TypeInfo, TypeReference> typeInfoMappings = typeInfoMappings(bi.typeInfos());
- Map<Class, Class> subclassReplacements = bi.subclassReplacements();
- String defaultNamespaceRemap = bi.getDefaultNamespace();
- Boolean c14nSupport = (Boolean) bi.properties().get("c14nSupport");
- RuntimeAnnotationReader ar = (RuntimeAnnotationReader) bi.properties().get("com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader");
- JAXBContextFactory jaxbContextFactory = (JAXBContextFactory) bi.properties().get(JAXBContextFactory.class.getName());
- try {
- JAXBRIContext context = (jaxbContextFactory != null)
- ? jaxbContextFactory.createJAXBContext(
- bi.getSEIModel(),
- toList(classes),
- toList(typeInfoMappings.values()))
- : ContextFactory.createContext(
- classes, typeInfoMappings.values(),
- subclassReplacements, defaultNamespaceRemap,
- (c14nSupport != null) ? c14nSupport : false,
- ar, false, false, false);
- return new JAXBRIContextWrapper(context, typeInfoMappings);
- } catch (Exception e) {
- throw new DatabindingException(e);
- }
- }
-
- private <T> List<T> toList(T[] a) {
- List<T> l = new ArrayList<T>();
- l.addAll(Arrays.asList(a));
- return l;
- }
-
- private <T> List<T> toList(Collection<T> col) {
- if (col instanceof List) {
- return (List<T>) col;
- }
- List<T> l = new ArrayList<T>();
- l.addAll(col);
- return l;
- }
-
- private Map<TypeInfo, TypeReference> typeInfoMappings(Collection<TypeInfo> typeInfos) {
- Map<TypeInfo, TypeReference> map = new java.util.HashMap<TypeInfo, TypeReference>();
- for (TypeInfo ti : typeInfos) {
- Type type = WrapperComposite.class.equals(ti.type) ? CompositeStructure.class : ti.type;
- TypeReference tr = new TypeReference(ti.tagName, type, ti.annotations);
- map.put(ti, tr);
- }
- return map;
- }
-
- @Override
- protected BindingContext getContext(Marshaller m) {
- return newContext(((MarshallerImpl) m).getContext());
- }
-
- @Override
- protected boolean isFor(String str) {
- return (str.equals("glassfish.jaxb")
- || str.equals(this.getClass().getName())
- || str.equals("com.sun.xml.internal.bind.v2.runtime"));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextWrapper.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextWrapper.java
deleted file mode 100644
index 6b710f0f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextWrapper.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.db.glassfish;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.bind.api.TypeReference;
-import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.spi.db.TypeInfo;
-import com.sun.xml.internal.ws.spi.db.WrapperComposite;
-
-class JAXBRIContextWrapper implements BindingContext {
-
- private Map<TypeInfo, TypeReference> typeRefs;
- private Map<TypeReference, TypeInfo> typeInfos;
- private JAXBRIContext context;
-
- JAXBRIContextWrapper(JAXBRIContext cxt, Map<TypeInfo, TypeReference> refs) {
- context = cxt;
- typeRefs = refs;
- if (refs != null) {
- typeInfos = new java.util.HashMap<TypeReference, TypeInfo>();
- for (TypeInfo ti : refs.keySet()) {
- typeInfos.put(typeRefs.get(ti), ti);
- }
- }
- }
-
- TypeReference typeReference(TypeInfo ti) {
- return (typeRefs != null) ? typeRefs.get(ti) : null;
- }
-
- TypeInfo typeInfo(TypeReference tr) {
- return (typeInfos != null) ? typeInfos.get(tr) : null;
- }
-
- @Override
- public Marshaller createMarshaller() throws JAXBException {
- return context.createMarshaller();
- }
-
- @Override
- public Unmarshaller createUnmarshaller() throws JAXBException {
- return context.createUnmarshaller();
- }
-
- @Override
- public void generateSchema(SchemaOutputResolver outputResolver)
- throws IOException {
- context.generateSchema(outputResolver);
- }
-
- @Override
- public String getBuildId() {
- return context.getBuildId();
- }
-
- @Override
- public QName getElementName(Class o) throws JAXBException {
- return context.getElementName(o);
- }
-
- @Override
- public QName getElementName(Object o) throws JAXBException {
- return context.getElementName(o);
- }
-
- @Override
- public <B, V> com.sun.xml.internal.ws.spi.db.PropertyAccessor<B, V> getElementPropertyAccessor(
- Class<B> wrapperBean, String nsUri, String localName)
- throws JAXBException {
- return new RawAccessorWrapper(context.getElementPropertyAccessor(wrapperBean, nsUri, localName));
- }
-
- @Override
- public List<String> getKnownNamespaceURIs() {
- return context.getKnownNamespaceURIs();
- }
-
- public RuntimeTypeInfoSet getRuntimeTypeInfoSet() {
- return context.getRuntimeTypeInfoSet();
- }
-
- public QName getTypeName(com.sun.xml.internal.bind.api.TypeReference tr) {
- return context.getTypeName(tr);
- }
-
- @Override
- public int hashCode() {
- return context.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- final JAXBRIContextWrapper other = (JAXBRIContextWrapper) obj;
- if (this.context != other.context && (this.context == null || !this.context.equals(other.context))) {
- return false;
- }
- return true;
- }
-
- @Override
- public boolean hasSwaRef() {
- return context.hasSwaRef();
- }
-
- @Override
- public String toString() {
- return JAXBRIContextWrapper.class.getName() + " : " + context.toString();
- }
-
- @Override
- public XMLBridge createBridge(TypeInfo ti) {
- TypeReference tr = typeRefs.get(ti);
- com.sun.xml.internal.bind.api.Bridge b = context.createBridge(tr);
- return WrapperComposite.class.equals(ti.type)
- ? new WrapperBridge(this, b)
- : new BridgeWrapper(this, b);
- }
-
- @Override
- public JAXBContext getJAXBContext() {
- return context;
- }
-
- @Override
- public QName getTypeName(TypeInfo ti) {
- TypeReference tr = typeRefs.get(ti);
- return context.getTypeName(tr);
- }
-
- @Override
- public XMLBridge createFragmentBridge() {
- return new MarshallerBridge((com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl) context);
- }
-
- @Override
- public Object newWrapperInstace(Class<?> wrapperType)
- throws InstantiationException, IllegalAccessException {
- return wrapperType.newInstance();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/MarshallerBridge.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/MarshallerBridge.java
deleted file mode 100644
index 26cef3a2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/MarshallerBridge.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.db.glassfish;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.api.TypeReference;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.MarshallerImpl;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.DatabindingException;
-import com.sun.xml.internal.ws.spi.db.TypeInfo;
-
-public class MarshallerBridge
- extends com.sun.xml.internal.bind.api.Bridge
-implements com.sun.xml.internal.ws.spi.db.XMLBridge {
-
- protected MarshallerBridge(JAXBContextImpl context) {
- super(context);
- }
-
- public void marshal(Marshaller m, Object object, XMLStreamWriter output) throws JAXBException {
- m.setProperty(Marshaller.JAXB_FRAGMENT,true);
- try {
- m.marshal(object,output);
- } finally {
- m.setProperty(Marshaller.JAXB_FRAGMENT,false);
- }
- }
-
- public void marshal(Marshaller m, Object object, OutputStream output, NamespaceContext nsContext) throws JAXBException {
- m.setProperty(Marshaller.JAXB_FRAGMENT,true);
- try {
- ((MarshallerImpl)m).marshal(object,output,nsContext);
- } finally {
- m.setProperty(Marshaller.JAXB_FRAGMENT,false);
- }
- }
-
- public void marshal(Marshaller m, Object object, Node output) throws JAXBException {
- m.setProperty(Marshaller.JAXB_FRAGMENT,true);
- try {
- m.marshal(object,output);
- } finally {
- m.setProperty(Marshaller.JAXB_FRAGMENT,false);
- }
- }
-
- public void marshal(Marshaller m, Object object, ContentHandler contentHandler) throws JAXBException {
- m.setProperty(Marshaller.JAXB_FRAGMENT,true);
- try {
- m.marshal(object,contentHandler);
- } finally {
- m.setProperty(Marshaller.JAXB_FRAGMENT,false);
- }
- }
-
- public void marshal(Marshaller m, Object object, Result result) throws JAXBException {
- m.setProperty(Marshaller.JAXB_FRAGMENT,true);
- try {
- m.marshal(object,result);
- } finally {
- m.setProperty(Marshaller.JAXB_FRAGMENT,false);
- }
- }
-
- public Object unmarshal(Unmarshaller u, XMLStreamReader in) {
- throw new UnsupportedOperationException();
- }
-
- public Object unmarshal(Unmarshaller u, Source in) {
- throw new UnsupportedOperationException();
- }
-
- public Object unmarshal(Unmarshaller u, InputStream in) {
- throw new UnsupportedOperationException();
- }
-
- public Object unmarshal(Unmarshaller u, Node n) {
- throw new UnsupportedOperationException();
- }
-
- public TypeInfo getTypeInfo() {
- throw new UnsupportedOperationException();
- }
- public TypeReference getTypeReference() {
- throw new UnsupportedOperationException();
- }
- public BindingContext context() {
- throw new UnsupportedOperationException();
- }
- public boolean supportOutputStream() {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/RawAccessorWrapper.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/RawAccessorWrapper.java
deleted file mode 100644
index a3dd9fb8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/RawAccessorWrapper.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.db.glassfish;
-
-import com.sun.xml.internal.ws.spi.db.DatabindingException;
-import com.sun.xml.internal.ws.spi.db.PropertyAccessor;
-import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.api.RawAccessor;
-
-@SuppressWarnings("unchecked")
-public class RawAccessorWrapper implements PropertyAccessor {
-
- private RawAccessor accessor;
-
- public RawAccessorWrapper(RawAccessor a) {
- accessor = a;
- }
-
- @Override
- public boolean equals(Object obj) {
- return accessor.equals(obj);
- }
-
- @Override
- public Object get(Object bean) throws DatabindingException {
- try {
- return accessor.get(bean);
- } catch (AccessorException e) {
- throw new DatabindingException(e);
- }
- }
-
- @Override
- public int hashCode() {
- return accessor.hashCode();
- }
-
- @Override
- public void set(Object bean, Object value) throws DatabindingException {
- try {
- accessor.set(bean, value);
- } catch (AccessorException e) {
- throw new DatabindingException(e);
- }
- }
-
- @Override
- public String toString() {
- return accessor.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/WrapperBridge.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/WrapperBridge.java
deleted file mode 100644
index e1d9bac7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/WrapperBridge.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.db.glassfish;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.bind.api.CompositeStructure;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.spi.db.TypeInfo;
-import com.sun.xml.internal.ws.spi.db.WrapperComposite;
-
-public class WrapperBridge<T> implements XMLBridge<T> {
-
- private JAXBRIContextWrapper parent;
- private com.sun.xml.internal.bind.api.Bridge<T> bridge;
-
- public WrapperBridge(JAXBRIContextWrapper p, com.sun.xml.internal.bind.api.Bridge<T> b) {
- parent = p;
- bridge = b;
- }
-
- @Override
- public BindingContext context() {
- return parent;
- }
-
- @Override
- public boolean equals(Object obj) {
- return bridge.equals(obj);
- }
-
- @Override
- public TypeInfo getTypeInfo() {
- return parent.typeInfo(bridge.getTypeReference());
- }
-
- @Override
- public int hashCode() {
- return bridge.hashCode();
- }
-
- static CompositeStructure convert(Object o) {
- WrapperComposite w = (WrapperComposite) o;
- CompositeStructure cs = new CompositeStructure();
- cs.values = w.values;
- cs.bridges = new Bridge[w.bridges.length];
- for (int i = 0; i < cs.bridges.length; i++) {
- cs.bridges[i] = ((BridgeWrapper) w.bridges[i]).getBridge();
- }
- return cs;
- }
-
- @Override
- public final void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException {
- bridge.marshal((T) convert(object), contentHandler, am);
-// bridge.marshal(object, contentHandler, am);
- }
-
- @Override
- public void marshal(T object, Node output) throws JAXBException {
- throw new UnsupportedOperationException();
-// bridge.marshal(object, output);
-// bridge.marshal((T) convert(object), output);
- }
-
- @Override
- public void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException {
- bridge.marshal((T) convert(object), output, nsContext, am);
- }
-
- @Override
- public final void marshal(T object, Result result) throws JAXBException {
- throw new UnsupportedOperationException();
-// bridge.marshal(object, result);
- }
-
- @Override
- public final void marshal(T object, XMLStreamWriter output, AttachmentMarshaller am) throws JAXBException {
- bridge.marshal((T) convert(object), output, am);
- }
-
- @Override
- public String toString() {
- return BridgeWrapper.class.getName() + " : " + bridge.toString();
- }
-
- @Override
- public final T unmarshal(InputStream in) throws JAXBException {
- //EndpointArgumentsBuilder.RpcLit.readRequest
- throw new UnsupportedOperationException();
-// return bridge.unmarshal(in);
- }
-
- @Override
- public final T unmarshal(Node n, AttachmentUnmarshaller au) throws JAXBException {
- //EndpointArgumentsBuilder.RpcLit.readRequest
- throw new UnsupportedOperationException();
-// return bridge.unmarshal(n, au);
- }
-
- @Override
- public final T unmarshal(Source in, AttachmentUnmarshaller au) throws JAXBException {
- //EndpointArgumentsBuilder.RpcLit.readRequest
- throw new UnsupportedOperationException();
-// return bridge.unmarshal(in, au);
- }
-
- @Override
- public final T unmarshal(XMLStreamReader in, AttachmentUnmarshaller au) throws JAXBException {
- //EndpointArgumentsBuilder.RpcLit.readRequest
- throw new UnsupportedOperationException();
-// return bridge.unmarshal(in, au);
- }
-
- @Override
- public boolean supportOutputStream() {
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/BindingTypeFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/BindingTypeFeature.java
deleted file mode 100644
index 9b9ac121..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/BindingTypeFeature.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import com.sun.xml.internal.ws.api.BindingID;
-
-import javax.xml.ws.WebServiceFeature;
-
-import com.sun.org.glassfish.gmbal.ManagedAttribute;
-import com.sun.org.glassfish.gmbal.ManagedData;
-
-/**
- * Using this feature, the application could override the binding used by
- * the runtime(usually determined from WSDL).
- *
- * @author Jitendra Kotamraju
- */
-@ManagedData
-public final class BindingTypeFeature extends WebServiceFeature {
-
- public static final String ID = "http://jax-ws.dev.java.net/features/binding";
-
- private final String bindingId;
-
- public BindingTypeFeature(String bindingId) {
- this.bindingId = bindingId;
- }
-
- @ManagedAttribute
- public String getID() {
- return ID;
- }
-
- @ManagedAttribute
- public String getBindingId() {
- return bindingId;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java
deleted file mode 100644
index 51da5ed8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.developer;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-import java.util.WeakHashMap;
-
-/**
- * Simple utility ensuring that the value is cached only in case it is non-internal implementation
- */
-abstract class ContextClassloaderLocal<V> {
-
- private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
-
- private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<ClassLoader, V>();
-
- public V get() throws Error {
- ClassLoader tccl = getContextClassLoader();
- V instance = CACHE.get(tccl);
- if (instance == null) {
- instance = createNewInstance();
- CACHE.put(tccl, instance);
- }
- return instance;
- }
-
- public void set(V instance) {
- CACHE.put(getContextClassLoader(), instance);
- }
-
- protected abstract V initialValue() throws Exception;
-
- private V createNewInstance() {
- try {
- return initialValue();
- } catch (Exception e) {
- throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e);
- }
- }
-
- private static String format(String property, Object... args) {
- String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property);
- return MessageFormat.format(text, args);
- }
-
- private static ClassLoader getContextClassLoader() {
- return (ClassLoader)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- ClassLoader cl = null;
- try {
- cl = Thread.currentThread().getContextClassLoader();
- } catch (SecurityException ex) {
- }
- return cl;
- }
- });
- }
-}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.properties
deleted file mode 100644
index 1a8fc17a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ContextClassloaderLocal.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-# Error messages for ContextClassloaderLocal utility class
-FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/EPRRecipe.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/EPRRecipe.java
deleted file mode 100644
index 03d2c366..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/EPRRecipe.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.Headers;
-
-import javax.xml.transform.Source;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Represents additional data to be added to EPRs
- * created from {@link StatefulWebServiceManager} (for advanced users).
- *
- * <p>
- * Occasionally it is convenient to be able to control the data to be
- * present on {@link EndpointReference}s created by {@link StatefulWebServiceManager}.
- * You can do so by using this class like this:
- *
- * <pre>
- * statefulWebServiceManager.export({@link W3CEndpointReference}.class,myObject,
- * new EPRRecipe().addReferenceParameter({@link Headers}.create(...))
- * .addReferenceParameter({@link Headers}.create(...)));
- * </pre>
- *
- * <p>
- * The methods on this class follows <a href="http://www.martinfowler.com/bliki/FluentInterface.html">
- * the fluent interface design</a> to allow construction without using a variable.
- *
- *
- * <p>
- * See <a href="http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/#eprinfomodel">
- * WS-Addressing EPR information model</a> for more details.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.1.1
- * @see StatefulWebServiceManager
- * @see Headers
- */
-public final class EPRRecipe {
- private final List<Header> referenceParameters = new ArrayList<Header>();
- private final List<Source> metadata = new ArrayList<Source>();
-
- /**
- * Gets all the reference parameters added so far.
- */
- public @NotNull List<Header> getReferenceParameters() {
- return referenceParameters;
- }
-
- /**
- * Gets all the metadata added so far.
- */
- public @NotNull List<Source> getMetadata() {
- return metadata;
- }
-
- /**
- * Adds a new reference parameter.
- */
- public EPRRecipe addReferenceParameter(Header h) {
- if(h==null) throw new IllegalArgumentException();
- referenceParameters.add(h);
- return this;
- }
-
- /**
- * Adds all the headers as reference parameters.
- */
- public EPRRecipe addReferenceParameters(Header... headers) {
- for (Header h : headers)
- addReferenceParameter(h);
- return this;
- }
-
- /**
- * Adds all the headers as reference parameters.
- */
- public EPRRecipe addReferenceParameters(Iterable<? extends Header> headers) {
- for (Header h : headers)
- addReferenceParameter(h);
- return this;
- }
-
- /**
- * Adds a new metadata.
- */
- public EPRRecipe addMetadata(Source source) {
- if(source==null) throw new IllegalArgumentException();
- metadata.add(source);
- return this;
- }
-
- public EPRRecipe addMetadata(Source... sources) {
- for (Source s : sources)
- addMetadata(s);
- return this;
- }
-
- public EPRRecipe addMetadata(Iterable<? extends Source> sources) {
- for (Source s : sources)
- addMetadata(s);
- return this;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/HttpConfigFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/HttpConfigFeature.java
deleted file mode 100644
index 6964e720..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/HttpConfigFeature.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import java.lang.reflect.Constructor;
-import java.net.CookieHandler;
-
-/**
- * A proxy's HTTP configuration (e.g cookie handling) can be configured using
- * this feature. While creating the proxy, this can be passed just like other
- * features.
- *
- * <p>
- * <b>THIS feature IS EXPERIMENTAL AND IS SUBJECT TO CHANGE WITHOUT NOTICE IN FUTURE.</b>
- *
- * @author Jitendra Kotamraju
- */
-public final class HttpConfigFeature extends WebServiceFeature {
- /**
- * Constant value identifying the {@link HttpConfigFeature} feature.
- */
- public static final String ID = "http://jax-ws.java.net/features/http-config";
-
- private static final Constructor cookieManagerConstructor;
- private static final Object cookiePolicy;
- static {
- Constructor tempConstructor;
- Object tempPolicy;
- try {
- /*
- * Using reflection to create CookieManger so that RI would continue to
- * work with JDK 5.
- */
- Class policyClass = Class.forName("java.net.CookiePolicy");
- Class storeClass = Class.forName("java.net.CookieStore");
- tempConstructor = Class.forName("java.net.CookieManager").getConstructor(storeClass, policyClass);
- // JDK's default policy is ACCEPT_ORIGINAL_SERVER, but ACCEPT_ALL
- // is used for backward compatibility
- tempPolicy = policyClass.getField("ACCEPT_ALL").get(null);
- } catch(Exception e) {
- try {
- /*
- * Using reflection so that these classes won't have to be
- * integrated in JDK 6.
- */
- Class policyClass = Class.forName("com.sun.xml.internal.ws.transport.http.client.CookiePolicy");
- Class storeClass = Class.forName("com.sun.xml.internal.ws.transport.http.client.CookieStore");
- tempConstructor = Class.forName("com.sun.xml.internal.ws.transport.http.client.CookieManager").getConstructor(storeClass, policyClass);
- // JDK's default policy is ACCEPT_ORIGINAL_SERVER, but ACCEPT_ALL
- // is used for backward compatibility
- tempPolicy = policyClass.getField("ACCEPT_ALL").get(null);
- } catch(Exception ce) {
- throw new WebServiceException(ce);
- }
- }
- cookieManagerConstructor = tempConstructor;
- cookiePolicy = tempPolicy;
- }
-
- private final CookieHandler cookieJar; // shared object among the tubes
-
- public HttpConfigFeature() {
- this(getInternalCookieHandler());
- }
-
- public HttpConfigFeature(CookieHandler cookieJar) {
- this.enabled = true;
- this.cookieJar = cookieJar;
- }
-
- private static CookieHandler getInternalCookieHandler() {
- try {
- return (CookieHandler)cookieManagerConstructor.newInstance(null, cookiePolicy);
- } catch(Exception e) {
- throw new WebServiceException(e);
- }
- }
-
- public String getID() {
- return ID;
- }
-
- public CookieHandler getCookieHandler() {
- return cookieJar;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXBContextFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXBContextFactory.java
deleted file mode 100644
index 3384c329..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXBContextFactory.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.bind.api.TypeReference;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import java.util.List;
-
-/**
- * Factory to create {@link JAXBContext}.
- *
- * <p>
- * JAX-WS uses JAXB to perform databinding when you use the service endpoint interface, and normally
- * the JAX-WS RI drives JAXB and creates a necessary {@link JAXBContext} automatically.
- *
- * <p>
- * This annotation is a JAX-WS RI vendor-specific feature, which lets applications create {@link JAXBRIContext}
- * (which is the JAXB RI's {@link JAXBContext} implementation.)
- * Combined with the JAXB RI vendor extensions defined in {@link JAXBRIContext}, appliation can use this to
- * fine-tune how the databinding happens, such as by adding more classes to the binding context,
- * by controlling the namespace mappings, and so on.
- *
- * <p>
- * Applications should either use {@link UsesJAXBContextFeature} or {@link UsesJAXBContext} to instruct
- * the JAX-WS runtime to use a custom factory.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.1.5
- */
-public interface JAXBContextFactory {
- /**
- * Called by the JAX-WS runtime to create a {@link JAXBRIContext} for the given SEI.
- *
- * @param sei
- * The {@link SEIModel} object being constructed. This object provides you access to
- * what SEI is being processed, and therefore useful if you are writing a generic
- * {@link JAXBContextFactory} that can work with arbitrary SEI classes.
- *
- * @param classesToBind
- * List of classes that needs to be bound by JAXB. This value is computed according to
- * the JAX-WS spec and given to you.
- *
- * The calling JAX-WS runtime expects the returned {@link JAXBRIContext} to be capable of
- * handling all these classes, but you can add more (which is more common), or remove some
- * (if you know what you are doing.)
- *
- * The callee is free to mutate this list.
- *
- * @param typeReferences
- * List of {@link TypeReference}s, which is also a part of the input to the JAXB RI to control
- * how the databinding happens. Most likely this will be just a pass-through to the
- * {@link JAXBRIContext#newInstance} method.
- *
- * @return
- * A non-null valid {@link JAXBRIContext} object.
- *
- * @throws JAXBException
- * If the callee encounters a fatal problem and wants to abort the JAX-WS runtime processing
- * of the given SEI, throw a {@link JAXBException}. This will cause the port instantiation
- * to fail (if on client), or the application deployment to fail (if on server.)
- */
- @NotNull JAXBRIContext createJAXBContext(@NotNull SEIModel sei, @NotNull List<Class> classesToBind, @NotNull List<TypeReference> typeReferences) throws JAXBException;
-
- /**
- * The default implementation that creates {@link JAXBRIContext} according to the standard behavior.
- */
- public static final JAXBContextFactory DEFAULT = new JAXBContextFactory() {
- @NotNull
- public JAXBRIContext createJAXBContext(@NotNull SEIModel sei, @NotNull List<Class> classesToBind, @NotNull List<TypeReference> typeReferences) throws JAXBException {
- return JAXBRIContext.newInstance(classesToBind.toArray(new Class[classesToBind.size()]),
- typeReferences, null, sei.getTargetNamespace(), false, null);
- }
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXWSProperties.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXWSProperties.java
deleted file mode 100644
index bc564682..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXWSProperties.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import com.sun.xml.internal.ws.api.message.HeaderList;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.SSLSocketFactory;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.BindingType;
-import javax.xml.ws.http.HTTPBinding;
-import java.net.HttpURLConnection;
-
-public interface JAXWSProperties {
- // Content negotiation property: values "none", "pessimistic" and "optimistic"
- // It is split into two strings so that package renaming for
- // Java SE 6 doesn't alter the value. So do not combine them
- @Deprecated
- public static final String CONTENT_NEGOTIATION_PROPERTY = "com.sun."+"xml.ws.client.ContentNegotiation";
- public static final String MTOM_THRESHOLOD_VALUE = "com.sun.xml.internal.ws.common.MtomThresholdValue";
- public static final String HTTP_EXCHANGE = "com.sun.xml.internal.ws.http.exchange";
-
- /**
- * Set this property on the {@link BindingProvider#getRequestContext()} to
- * enable {@link HttpURLConnection#setConnectTimeout(int)}
- *
- *<p>
- * int timeout = ...;
- * Map<String, Object> ctxt = ((BindingProvider)proxy).getRequestContext();
- * ctxt.put(CONNECT_TIMEOUT, timeout);
- */
- public static final String CONNECT_TIMEOUT =
- "com.sun.xml.internal.ws.connect.timeout";
-
- /**
- * Set this property on the {@link BindingProvider#getRequestContext()} to
- * enable {@link HttpURLConnection#setReadTimeout(int)}
- *
- *<p>
- * int timeout = ...;
- * Map<String, Object> ctxt = ((BindingProvider)proxy).getRequestContext();
- * ctxt.put(REQUEST_TIMEOUT, timeout);
- */
- public static final String REQUEST_TIMEOUT =
- "com.sun.xml.internal.ws.request.timeout";
-
- /**
- * Set this property on the {@link BindingProvider#getRequestContext()} to
- * enable {@link HttpURLConnection#setChunkedStreamingMode(int)}
- *
- *<p>
- * int chunkSize = ...;
- * Map<String, Object> ctxt = ((BindingProvider)proxy).getRequestContext();
- * ctxt.put(HTTP_CLIENT_STREAMING_CHUNK_SIZE, chunkSize);
- */
- public static final String HTTP_CLIENT_STREAMING_CHUNK_SIZE = "com.sun.xml.internal.ws.transport.http.client.streaming.chunk.size";
-
-
- /**
- * Set this property on the {@link BindingProvider#getRequestContext()} to
- * enable {@link HttpsURLConnection#setHostnameVerifier(HostnameVerifier)}}. The property
- * is set as follows:
- *
- * <p>
- * HostNameVerifier hostNameVerifier = ...;
- * Map<String, Object> ctxt = ((BindingProvider)proxy).getRequestContext();
- * ctxt.put(HOSTNAME_VERIFIER, hostNameVerifier);
- *
- * <p>
- * <b>THIS PROPERTY IS EXPERIMENTAL AND IS SUBJECT TO CHANGE WITHOUT NOTICE IN FUTURE.</b>
- */
- public static final String HOSTNAME_VERIFIER = "com.sun.xml.internal.ws.transport.https.client.hostname.verifier";
-
- /**
- * Set this property on the {@link BindingProvider#getRequestContext()} to
- * enable {@link HttpsURLConnection#setSSLSocketFactory(SSLSocketFactory)}. The property is set
- * as follows:
- *
- * <p>
- * SSLSocketFactory sslFactory = ...;
- * Map<String, Object> ctxt = ((BindingProvider)proxy).getRequestContext();
- * ctxt.put(SSL_SOCKET_FACTORY, sslFactory);
- *
- * <p>
- * <b>THIS PROPERTY IS EXPERIMENTAL AND IS SUBJECT TO CHANGE WITHOUT NOTICE IN FUTURE.</b>
- */
- public static final String SSL_SOCKET_FACTORY = "com.sun.xml.internal.ws.transport.https.client.SSLSocketFactory";
-
- /**
- * Acccess the list of SOAP headers in the SOAP message.
- *
- * <p>
- * On {@link WebServiceContext}, this property returns a {@link HeaderList} object
- * that represents SOAP headers in the request message that was received.
- * On {@link BindingProvider#getResponseContext()}, this property returns a
- * {@link HeaderList} object that represents SOAP headers in the response message from the server.
- *
- * <p>
- * The property is read-only, and please do not modify the returned {@link HeaderList}
- * as that may break the JAX-WS RI in some unexpected way.
- *
- * <p>
- * <b>THIS PROPERTY IS EXPERIMENTAL AND IS SUBJECT TO CHANGE WITHOUT NOTICE IN FUTURE.</b>
- */
- public static final String INBOUND_HEADER_LIST_PROPERTY = "com.sun.xml.internal.ws.api.message.HeaderList";
-
- /**
- * Access the {@link WSEndpoint} object that delivered the request.
- *
- * <p>
- * {@link WSEndpoint} is the root of the objects that are together
- * responsible for delivering requests to the application SEI object.
- * One can look up this {@link WSEndpoint} from {@link WebServiceContext},
- * and from there access many parts of the JAX-WS RI runtime.
- *
- * <p>
- * <b>THIS PROPERTY IS EXPERIMENTAL AND IS SUBJECT TO CHANGE WITHOUT NOTICE IN FUTURE.</b>
- *
- * @since 2.1.2
- */
- public static final String WSENDPOINT = "com.sun.xml.internal.ws.api.server.WSEndpoint";
-
- /**
- * Gets the <tt>wsa:To</tt> header.
- *
- * The propery value is available on incoming SOAP message. The type of the value
- * is {@link WSEndpointReference}.
- *
- * Null if the incoming SOAP message didn't have the header.
- *
- * @since 2.1.3
- */
- public static final String ADDRESSING_TO = "com.sun.xml.internal.ws.api.addressing.to";
-
- /**
- * Gets the <tt>wsa:From</tt> header.
- *
- * The propery value is available on incoming SOAP message. The type of the value
- * is {@link WSEndpointReference}.
- *
- * Null if the incoming SOAP message didn't have the header.
- *
- * @since 2.1.3
- */
- public static final String ADDRESSING_FROM = "com.sun.xml.internal.ws.api.addressing.from";
-
- /**
- * Gets the <tt>wsa:Action</tt> header value.
- *
- * The propery value is available on incoming SOAP message. The type of the value
- * is {@link String}.
- *
- * Null if the incoming SOAP message didn't have the header.
- *
- * @since 2.1.3
- */
- public static final String ADDRESSING_ACTION = "com.sun.xml.internal.ws.api.addressing.action";
-
- /**
- * Gets the <tt>wsa:MessageID</tt> header value.
- *
- * The propery value is available on incoming SOAP message. The type of the value
- * is {@link String}.
- *
- * Null if the incoming SOAP message didn't have the header.
- *
- * @since 2.1.3
- */
- public static final String ADDRESSING_MESSAGEID = "com.sun.xml.internal.ws.api.addressing.messageId";
-
- /**
- * Reconstructs the URL the client used to make the request. The returned URL
- * contains a protocol, server name, port number, and server path, but it does
- * not include query string parameters.
- * <p>
- * The property value is available on incoming SOAP message on servlet transport.
- *
- * @since 2.1.3
- */
- public static final String HTTP_REQUEST_URL = "com.sun.xml.internal.ws.transport.http.servlet.requestURL";
-
- /**
- * Binding to represent RESTful services. {@link HTTPBinding#HTTP_BINDING} works
- * only for Dispatch/Provider services, but this binding works with even SEI based
- * services. It would be XML, NOT SOAP on the wire. Hence, the SEI parameters
- * shouldn't be mapped to headers.
- *
- * <p>
- * Note that, this only solves limited RESTful usecases.
- *
- * <p>To enable restful binding on the service, specify the binding id via
- * {@link BindingType} or DD
- * <pre>
- * &#64;WebService
- * &#64;BindingType(JAXWSProperties.REST_BINDING)
- * </pre>
- *
- * <p>To enable restful binding on the client side, specify the binding id via
- * {@link BindingTypeFeature}
- * <pre>
- * proxy = echoImplService.getEchoImplPort(new BindingTypeFeature(JAXWSProperties.REST_BINDING));
- * </pre>
- *
- * @since 2.1.4
- */
- public static final String REST_BINDING = "http://jax-ws.dev.java.net/rest";
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressing.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressing.java
deleted file mode 100644
index 0ed28c4e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressing.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-import javax.xml.ws.spi.WebServiceFeatureAnnotation;
-
-/**
- * This feature represents the use of WS-Addressing with either
- * the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding. Using this feature
- * with any other binding is NOT required.
- * <p>
- * Enabling this feature will result in the
- * <code>wsaw:UsingAddressing</code> element being added to the
- * <code>wsdl:Binding</code> for
- * the endpoint and in the runtime being capable of responding to
- * WS-Addressing headers.
- * <p>
- * The following describes the affects of this feature with respect
- * to be enabled or disabled:
- * <ul>
- * <li> ENABLED: In this Mode, Addressing will be enabled.
- * If there is not a WSDL associated with the Endpoint and
- * a WSDL is to be generated, it MUST be generated with the
- * wsaw:UsingAddressing element. At runtime, Addressing headers
- * MUST be consumed by the receiver and generated by the
- * sender even if the WSDL declares otherwise. The
- * mustUnderstand="0" attribute MUST be used on the Addressing
- * headers.
- * <li> DISABLED: In this Mode, Addressing will be disabled
- * even if an associated WSDL specifies otherwise. At runtime,
- * Addressing headers MUST NOT be used.
- * </ul>
- * <p>
- * The {@link #required} property can be used to
- * specify if the <code>required</code> attribute on the
- * <code>wsaw:UsingAddressing</code> element should
- * be <code>true</code> or <code>false</code>. By default the
- * <code>wsdl:required</code> parameter is <code>false</code>.
- *
- * See <a href="http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/">WS-Addressing</a>
- * for more information on WS-Addressing.
- * See <a href="http://www.w3.org/TR/2006/CR-ws-addr-wsdl-20060529/">WS-Addressing - WSDL 1.0
- * </a> for more information on <code>wsaw:UsingAddressing</code>.
- *
- * @since JAX-WS 2.1
- */
-@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-@WebServiceFeatureAnnotation(id= MemberSubmissionAddressingFeature.ID,bean=MemberSubmissionAddressingFeature.class)
-public @interface MemberSubmissionAddressing {
- /**
- * Specifies if this feature is enabled or disabled.
- */
- boolean enabled() default true;
-
- /**
- * Property to determine the value of the
- * <code>wsdl:required</code> attribute on
- * <code>wsaw:UsingAddressing</code> element in the WSDL.
- */
- boolean required() default false;
-
- /**
- * Property to determine if the incoming messsages should be checked for conformance
- * with MemberSubmission version of WS-Addressing.
- *
- * If Validation.LAX, then some WS-Adressing headers are not strictly checked.
- */
- public enum Validation { LAX, STRICT }
-
- Validation validation() default Validation.LAX;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressingFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressingFeature.java
deleted file mode 100644
index 00db1e62..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressingFeature.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import com.sun.xml.internal.ws.api.FeatureConstructor;
-
-import javax.xml.ws.WebServiceFeature;
-
-import com.sun.org.glassfish.gmbal.ManagedAttribute;
-import com.sun.org.glassfish.gmbal.ManagedData;
-
-
-/**
- * Addressing Feature representing MemberSubmission Version.
- *
- * @author Rama Pulavarthi
- */
-
-@ManagedData
-public class MemberSubmissionAddressingFeature extends WebServiceFeature {
- /**
- * Constant value identifying the MemberSubmissionAddressingFeature
- */
- public static final String ID = "http://java.sun.com/xml/ns/jaxws/2004/08/addressing";
-
- /**
- * Constant ID for the <code>required</code> feature parameter
- */
- public static final String IS_REQUIRED = "ADDRESSING_IS_REQUIRED";
-
- private boolean required;
-
- /**
- * Create an MemberSubmissionAddressingFeature
- * The instance created will be enabled.
- */
- public MemberSubmissionAddressingFeature() {
- this.enabled = true;
- }
-
- /**
- * Create an MemberSubmissionAddressingFeature
- *
- * @param enabled specifies whether this feature should
- * be enabled or not.
- */
- public MemberSubmissionAddressingFeature(boolean enabled) {
- this.enabled = enabled;
- }
-
- /**
- * Create an <code>MemberSubmissionAddressingFeature</code>
- *
- * @param enabled specifies whether this feature should
- * be enabled or not.
- * @param required specifies the value that will be used
- * for the <code>required</code> attribute on the
- * <code>wsaw:UsingAddressing</code> element.
- */
- public MemberSubmissionAddressingFeature(boolean enabled, boolean required) {
- this.enabled = enabled;
- this.required = required;
- }
-
- /**
- * Create an <code>MemberSubmissionAddressingFeature</code>
- *
- * @param enabled specifies whether this feature should
- * be enabled or not.
- * @param required specifies the value that will be used
- * for the <code>required</code> attribute on the
- * <code>wsaw:UsingAddressing</code> element.
- * @param validation specifies the value that will be used
- * for validation for the incoming messages. If LAX, messages are not strictly checked for conformance with the spec.
- */
- @FeatureConstructor({"enabled","required","validation"})
- public MemberSubmissionAddressingFeature(boolean enabled, boolean required, MemberSubmissionAddressing.Validation validation) {
- this.enabled = enabled;
- this.required = required;
- this.validation = validation;
- }
-
-
- @ManagedAttribute
- public String getID() {
- return ID;
- }
-
- @ManagedAttribute
- public boolean isRequired() {
- return required;
- }
-
- public void setRequired(boolean required) {
- this.required = required;
- }
-
- private MemberSubmissionAddressing.Validation validation = MemberSubmissionAddressing.Validation.LAX;
- public void setValidation(MemberSubmissionAddressing.Validation validation) {
- this.validation = validation;
-
- }
-
- @ManagedAttribute
- public MemberSubmissionAddressing.Validation getValidation() {
- return validation;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionEndpointReference.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionEndpointReference.java
deleted file mode 100644
index ee70a409..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionEndpointReference.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.developer;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.addressing.v200408.MemberSubmissionAddressingConstants;
-import com.sun.xml.internal.ws.wsdl.parser.WSDLConstants;
-import org.w3c.dom.Element;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceException;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Data model for Member Submission WS-Addressing specification. This is modeled after the
- * member submission schema at:
- *
- * http://schemas.xmlsoap.org/ws/2004/08/addressing/
- *
- * @author Kathy Walsh
- * @author Vivek Pandey
- */
-
-@XmlRootElement(name = "EndpointReference", namespace = MemberSubmissionEndpointReference.MSNS)
-@XmlType(name = "EndpointReferenceType", namespace = MemberSubmissionEndpointReference.MSNS)
-public final class MemberSubmissionEndpointReference extends EndpointReference implements MemberSubmissionAddressingConstants {
-
- private final static ContextClassloaderLocal<JAXBContext> msjc = new ContextClassloaderLocal<JAXBContext>() {
- @Override
- protected JAXBContext initialValue() throws Exception {
- return MemberSubmissionEndpointReference.getMSJaxbContext();
- }
- };
-
- public MemberSubmissionEndpointReference() {
- }
-
- /**
- * construct an EPR from infoset representation
- *
- * @param source A source object containing valid XmlInfoset
- * instance consistent with the Member Submission WS-Addressing
- * @throws javax.xml.ws.WebServiceException
- * if the source does not contain a valid W3C WS-Addressing
- * EndpointReference.
- * @throws WebServiceException if the <code>null</code> <code>source</code> value is given
- */
- public MemberSubmissionEndpointReference(@NotNull Source source) {
-
- if (source == null) {
- throw new WebServiceException("Source parameter can not be null on constructor");
- }
-
- try {
- Unmarshaller unmarshaller = MemberSubmissionEndpointReference.msjc.get().createUnmarshaller();
- MemberSubmissionEndpointReference epr = unmarshaller.unmarshal(source,MemberSubmissionEndpointReference.class).getValue();
-
- this.addr = epr.addr;
- this.referenceProperties = epr.referenceProperties;
- this.referenceParameters = epr.referenceParameters;
- this.portTypeName = epr.portTypeName;
- this.serviceName = epr.serviceName;
- this.attributes = epr.attributes;
- this.elements = epr.elements;
- } catch (JAXBException e) {
- throw new WebServiceException("Error unmarshalling MemberSubmissionEndpointReference ", e);
- } catch (ClassCastException e) {
- throw new WebServiceException("Source did not contain MemberSubmissionEndpointReference", e);
- }
- }
-
- @Override
- public void writeTo(Result result) {
- try {
- Marshaller marshaller = MemberSubmissionEndpointReference.msjc.get().createMarshaller();
- //marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
- marshaller.marshal(this, result);
- } catch (JAXBException e) {
- throw new WebServiceException("Error marshalling W3CEndpointReference. ", e);
- }
- }
-
- /**
- * Constructs a Source containing the wsdl from the MemberSubmissionEndpointReference
- *
- * @return Source A source object containing the wsdl in the MemeberSubmissionEndpointReference, if present.
- */
- public Source toWSDLSource() {
- Element wsdlElement = null;
-
- for (Element elem : elements) {
- if (elem.getNamespaceURI().equals(WSDLConstants.NS_WSDL) &&
- elem.getLocalName().equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart())) {
- wsdlElement = elem;
- }
- }
-
- return new DOMSource(wsdlElement);
- }
-
-
- private static JAXBContext getMSJaxbContext() {
- try {
- return JAXBContext.newInstance(MemberSubmissionEndpointReference.class);
- } catch (JAXBException e) {
- throw new WebServiceException("Error creating JAXBContext for MemberSubmissionEndpointReference. ", e);
- }
- }
-
- @XmlElement(name = "Address", namespace = MemberSubmissionEndpointReference.MSNS)
- public Address addr;
-
- @XmlElement(name = "ReferenceProperties", namespace = MemberSubmissionEndpointReference.MSNS)
- public Elements referenceProperties;
-
- @XmlElement(name = "ReferenceParameters", namespace = MemberSubmissionEndpointReference.MSNS)
- public Elements referenceParameters;
-
- @XmlElement(name = "PortType", namespace = MemberSubmissionEndpointReference.MSNS)
- public AttributedQName portTypeName;
-
- @XmlElement(name = "ServiceName", namespace = MemberSubmissionEndpointReference.MSNS)
- public ServiceNameType serviceName;
-
- @XmlAnyAttribute
- public Map<QName,String> attributes;
-
- @XmlAnyElement
- public List<Element> elements;
-
- @XmlType(name="address", namespace=MemberSubmissionEndpointReference.MSNS)
- public static class Address {
- public Address() {
- }
-
- @XmlValue
- public String uri;
- @XmlAnyAttribute
- public Map<QName, String> attributes;
- }
-
- @XmlType(name="elements", namespace=MemberSubmissionEndpointReference.MSNS)
- public static class Elements {
- public Elements() {}
-
- @XmlAnyElement
- public List<Element> elements;
- }
-
-
- public static class AttributedQName {
- public AttributedQName() {
- }
-
- @XmlValue
- public QName name;
- @XmlAnyAttribute
- public Map<QName, String> attributes;
- }
-
- public static class ServiceNameType extends AttributedQName{
- public ServiceNameType() {
- }
-
- @XmlAttribute(name="PortName")
- public String portName;
- }
-
- protected static final String MSNS = "http://schemas.xmlsoap.org/ws/2004/08/addressing";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidation.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidation.java
deleted file mode 100644
index a04a486f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidation.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import com.sun.xml.internal.ws.server.DraconianValidationErrorHandler;
-
-import javax.jws.WebService;
-import javax.xml.ws.spi.WebServiceFeatureAnnotation;
-import java.lang.annotation.Documented;
-import static java.lang.annotation.ElementType.TYPE;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-
-/**
- * Validates all request and response messages payload(SOAP:Body) for a {@link WebService}
- * against the XML schema. To use this feature, annotate the endpoint class with
- * this annotation.
- *
- * <pre>
- * for e.g.:
- *
- * &#64;WebService
- * &#64;SchemaValidation
- * public class HelloImpl {
- * ...
- * }
- * </pre>
- *
- * At present, schema validation works for doc/lit web services only.
- *
- * @since JAX-WS 2.1.3
- * @author Jitendra Kotamraju
- * @see SchemaValidationFeature
- */
-@Retention(RUNTIME)
-@Target({TYPE, ElementType.METHOD, ElementType.FIELD})
-@Documented
-@WebServiceFeatureAnnotation(id = SchemaValidationFeature.ID, bean = SchemaValidationFeature.class)
-public @interface SchemaValidation {
-
- /**
- * Configure the validation behaviour w.r.t error handling. The default handler
- * just rejects any invalid schema intances. If the application want to change
- * this default behaviour(say just log the errors), it can do so by providing
- * a custom implementation of {@link ValidationErrorHandler}.
- */
- Class<? extends ValidationErrorHandler> handler() default DraconianValidationErrorHandler.class;
-
- /**
- * Turns validation on/off for inbound messages
- *
- * @since JAX-WS RI 2.2.2
- */
- boolean inbound() default true;
-
-
- /**
- * Turns validation on/off for outbound messages
- *
- * @since JAX-WS RI 2.2.2
- */
- boolean outbound() default true;
-
- /**
- * Does validation for bound headers in a SOAP message.
- *
- boolean headers() default false;
- */
-
- /**
- * Additional schema documents that are used to create {@link Schema} object. Useful
- * when the application adds additional SOAP headers to the message. This is a list
- * of system-ids, that are used to create {@link Source} objects and used in creation
- * of {@link Schema} object
- *
- * for e.g.:
- * @SchemaValidation(schemaLocations={"http://bar.foo/b.xsd", "http://foo.bar/a.xsd"}
- *
- String[] schemaLocations() default {};
- */
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidationFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidationFeature.java
deleted file mode 100644
index 14dd4e49..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidationFeature.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import com.sun.xml.internal.ws.api.FeatureConstructor;
-import com.sun.xml.internal.ws.server.DraconianValidationErrorHandler;
-
-import javax.xml.ws.WebServiceFeature;
-
-import com.sun.org.glassfish.gmbal.ManagedAttribute;
-import com.sun.org.glassfish.gmbal.ManagedData;
-
-/**
- * {@link WebServiceFeature} for schema validation.
- *
- * @since JAX-WS 2.1.3
- * @author Jitendra Kotamraju
- * @see SchemaValidation
- */
-@ManagedData
-public class SchemaValidationFeature extends WebServiceFeature {
- /**
- * Constant value identifying the SchemaValidationFeature
- */
- public static final String ID = "http://jax-ws.dev.java.net/features/schema-validation";
-
- private final Class<? extends ValidationErrorHandler> clazz;
- private final boolean inbound;
- private final boolean outbound;
-
- public SchemaValidationFeature() {
- this(true, true, DraconianValidationErrorHandler.class);
- }
-
- /**
- * Create an <code>SchemaValidationFeature</code>.
- * The instance created will be enabled.
- */
- public SchemaValidationFeature(Class<? extends ValidationErrorHandler> clazz) {
- this(true, true, clazz);
- }
-
- /**
- * @since JAX-WS RI 2.2.2
- */
- public SchemaValidationFeature(boolean inbound, boolean outbound) {
- this(inbound, outbound, DraconianValidationErrorHandler.class);
- }
-
- /**
- * @since JAX-WS RI 2.2.2
- */
- @FeatureConstructor({"inbound", "outbound", "handler"})
- public SchemaValidationFeature(boolean inbound, boolean outbound, Class<? extends ValidationErrorHandler> clazz) {
- this.enabled = true;
- this.inbound = inbound;
- this.outbound = outbound;
- this.clazz = clazz;
- }
-
- @ManagedAttribute
- @Override
- public String getID() {
- return ID;
- }
-
- /**
- * Invalid schema instances are rejected, a SOAP fault message is created
- * for any invalid request and response message. If it is set to false, schema
- * validation messages are just logged.
- */
- @ManagedAttribute
- public Class<? extends ValidationErrorHandler> getErrorHandler() {
- return clazz;
- }
-
- /**
- * Turns validation on/off for inbound messages
- *
- * @since JAX-WS RI 2.2.2
- */
- public boolean isInbound() {
- return inbound;
- }
-
- /**
- * Turns validation on/off for outbound messages
- *
- * @since JAX-WS RI 2.2.2
- */
- public boolean isOutbound() {
- return outbound;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/Serialization.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/Serialization.java
deleted file mode 100644
index 52c747af..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/Serialization.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import javax.xml.ws.spi.WebServiceFeatureAnnotation;
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * Configures various aspects of serialization like encoding
- *
- * <pre>
- * for e.g.:
- *
- * &#64;WebService
- * &#64;Serialization(encoding="Shift_JIS")
- * public class HelloImpl {
- * ...
- * }
- * </pre>
- *
- *
- * @since JAX-WS RI 2.2.6
- * @author Jitendra Kotamraju
- * @see com.sun.xml.internal.ws.developer.SerializationFeature
- */
-@Retention(RUNTIME)
-@Target({TYPE, ElementType.METHOD, ElementType.FIELD})
-@Documented
-@WebServiceFeatureAnnotation(id = SerializationFeature.ID, bean = SerializationFeature.class)
-public @interface Serialization {
-
- /**
- * Turns validation on/off for inbound messages
- *
- * @since JAX-WS RI 2.2.6
- */
- String encoding() default "";
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SerializationFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SerializationFeature.java
deleted file mode 100644
index 36e91b37..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SerializationFeature.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import com.sun.xml.internal.ws.api.FeatureConstructor;
-
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * {@link javax.xml.ws.WebServiceFeature} for configuration serialization.
- *
- * @since JAX-WS RI 2.2.6
- * @author Jitendra Kotamraju
- * @see com.sun.xml.internal.ws.developer.Serialization
- */
-public class SerializationFeature extends WebServiceFeature {
- /**
- * Constant value identifying this feature
- */
- public static final String ID = "http://jax-ws.java.net/features/serialization";
- private final String encoding;
-
- public SerializationFeature() {
- this("");
- }
-
- @FeatureConstructor({"encoding"})
- public SerializationFeature(String encoding) {
- this.encoding = encoding;
- }
-
- public String getID() {
- return ID;
- }
-
- public String getEncoding() {
- return encoding;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ServerSideException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ServerSideException.java
deleted file mode 100644
index 0d456741..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ServerSideException.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-/**
- * Represents the exception that has occurred on the server side.
- *
- * <p>
- * When an exception occurs on the server, JAX-WS RI sends the stack
- * trace of that exception to the client. On the client side,
- * instances of this class are used to represent such stack trace.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.1
- */
-public class ServerSideException extends Exception {
- private final String className;
-
- public ServerSideException(String className, String message) {
- super(message);
- this.className = className;
- }
-
- public String getMessage() {
- return "Client received an exception from server: "
- + super.getMessage()
- + " Please see the server log to find more detail regarding exact cause of the failure.";
- }
-
- public String toString() {
- String s = className;
- String message = getLocalizedMessage();
- return (message != null) ? (s + ": " + message) : s;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachment.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachment.java
deleted file mode 100644
index 54aeb9e9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachment.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import javax.xml.ws.spi.WebServiceFeatureAnnotation;
-import java.lang.annotation.*;
-import java.io.File;
-
-/**
- * This feature represents the use of StreamingAttachment attachments with a
- * web service.
- *
- * <p>
- * for e.g.: To keep all MIME attachments in memory, do the following
- *
- * <pre>
- * &#64;WebService
- * &#64;MIME(memoryThreshold=-1L)
- * public class HelloService {
- * }
- * </pre>
- *
- * @see StreamingAttachmentFeature
- *
- * @author Jitendra Kotamraju
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
-@Documented
-@WebServiceFeatureAnnotation(id = StreamingAttachmentFeature.ID, bean = StreamingAttachmentFeature.class)
-public @interface StreamingAttachment {
-
- /**
- * Directory in which large attachments are stored. {@link File#createTempFile}
- * methods are used to create temp files for storing attachments. This
- * value is used in {@link File#createTempFile}, if specified. If a file
- * cannot be created in this dir, then all the content is kept in memory.
- */
- String dir() default "";
-
- /**
- * MIME message is parsed eagerly.
- */
- boolean parseEagerly() default false;
-
- /**
- * After this threshold(no of bytes per attachment), large attachment is
- * written to file system.
- *
- * If the value is -1, then all the attachment content is kept in memory.
- */
- long memoryThreshold() default 1048576L;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachmentFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachmentFeature.java
deleted file mode 100644
index 6811df2a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachmentFeature.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import com.sun.xml.internal.ws.api.FeatureConstructor;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.ws.WebServiceFeature;
-
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEConfig;
-
-import com.sun.org.glassfish.gmbal.ManagedAttribute;
-import com.sun.org.glassfish.gmbal.ManagedData;
-
-/**
- * Proxy needs to be created with this feature to configure StreamingAttachment
- * attachments behaviour.
- *
- * <pre>
- * for e.g.: To configure all StreamingAttachment attachments to be kept in memory
- * <p>
- *
- * StreamingAttachmentFeature feature = new StreamingAttachmentFeature();
- * feature.setAllMemory(true);
- *
- * proxy = HelloService().getHelloPort(feature);
- *
- * </pre>
- *
- * @author Jitendra Kotamraju
- */
-@ManagedData
-public final class StreamingAttachmentFeature extends WebServiceFeature {
- /**
- * Constant value identifying the {@link StreamingAttachment} feature.
- */
- public static final String ID = "http://jax-ws.dev.java.net/features/mime";
-
- private MIMEConfig config;
-
- private String dir;
- private boolean parseEagerly;
- private long memoryThreshold;
-
- public StreamingAttachmentFeature() {
- }
-
- @FeatureConstructor({"dir","parseEagerly","memoryThreshold"})
- public StreamingAttachmentFeature(@Nullable String dir, boolean parseEagerly, long memoryThreshold) {
- this.enabled = true;
- this.dir = dir;
- this.parseEagerly = parseEagerly;
- this.memoryThreshold = memoryThreshold;
- }
-
- @ManagedAttribute
- public String getID() {
- return ID;
- }
-
- /**
- * Returns the configuration object. Once this is called, you cannot
- * change the configuration.
- *
- * @return
- */
- @ManagedAttribute
- public MIMEConfig getConfig() {
- if (config == null) {
- config = new MIMEConfig();
- config.setDir(dir);
- config.setParseEagerly(parseEagerly);
- config.setMemoryThreshold(memoryThreshold);
- config.validate();
- }
- return config;
- }
-
- /**
- * Directory in which large attachments are stored
- */
- public void setDir(String dir) {
- this.dir = dir;
- }
-
- /**
- * StreamingAttachment message is parsed eagerly
- */
- public void setParseEagerly(boolean parseEagerly) {
- this.parseEagerly = parseEagerly;
- }
-
- /**
- * After this threshold(no of bytes), large attachments are
- * written to file system
- */
- public void setMemoryThreshold(long memoryThreshold) {
- this.memoryThreshold = memoryThreshold;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingDataHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingDataHandler.java
deleted file mode 100644
index 9ba60a2c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingDataHandler.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.developer;
-
-import java.net.URL;
-
-import javax.activation.DataSource;
-
-/**
- * Implementation of {@link com.sun.xml.internal.org.jvnet.staxex.StreamingDataHandler} to access MIME
- * attachments efficiently. Applications can use the additional methods and decide
- * on how to access the attachment data in JAX-WS applications.
- *
- * <p>
- * for e.g.:
- *
- * DataHandler dh = proxy.getData();
- * StreamingDataHandler sdh = (StreamingDataHandler)dh;
- * // readOnce() doesn't store attachment on the disk in some cases
- * // for e.g when only one huge attachment after soap envelope part in MIME message
- * InputStream in = sdh.readOnce();
- * ...
- * in.close();
- * sdh.close();
- *
- * @author Jitendra Kotamraju
- */
-public abstract class StreamingDataHandler extends com.sun.xml.internal.org.jvnet.staxex.StreamingDataHandler {
-
- private String hrefCid;
-
- public StreamingDataHandler(Object o, String s) {
- super(o, s);
- }
-
- public StreamingDataHandler(URL url) {
- super(url);
- }
-
- public StreamingDataHandler(DataSource dataSource) {
- super(dataSource);
- }
-
- public String getHrefCid() {
- return hrefCid;
- }
-
- public void setHrefCid(final String cid) {
- this.hrefCid = cid;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContext.java
deleted file mode 100644
index 8abc23c0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContext.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import javax.xml.ws.spi.WebServiceFeatureAnnotation;
-import javax.xml.bind.JAXBContext;
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * This feature instructs that the specified {@link JAXBContextFactory} be used for performing
- * data-binding for the SEI.
- *
- * <p>
- * For example,
- * <pre>
- * &#64;WebService
- * &#64;UsesJAXBContext(MyJAXBContextFactory.class)
- * public class HelloService {
- * ...
- * }
- * </pre>
- *
- * <p>
- * If your {@link JAXBContextFactory} needs to carry some state from your calling application,
- * you can use {@link UsesJAXBContextFeature} to pass in an instance of {@link JAXBContextFactory},
- * instead of using this to specify the type.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.1.5
- */
-@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-@WebServiceFeatureAnnotation(id=UsesJAXBContextFeature.ID,bean=UsesJAXBContextFeature.class)
-public @interface UsesJAXBContext {
- /**
- * Designates the {@link JAXBContextFactory} to be used to create the {@link JAXBContext} object,
- * which in turn will be used by the JAX-WS runtime to marshal/unmarshal parameters and return
- * values to/from XML.
- */
- Class<? extends JAXBContextFactory> value();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContextFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContextFeature.java
deleted file mode 100644
index 5cb20b6c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContextFeature.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import com.sun.xml.internal.ws.api.FeatureConstructor;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.bind.api.TypeReference;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.List;
-
-import com.sun.org.glassfish.gmbal.ManagedAttribute;
-import com.sun.org.glassfish.gmbal.ManagedData;
-
-/**
- * A {@link WebServiceFeature} that instructs the JAX-WS runtime to use a specific {@link JAXBContextFactory}
- * instance of creating {@link JAXBContext}.
- *
- * @see UsesJAXBContext
- * @since 2.1.5
- * @author Kohsuke Kawaguchi
- */
-@ManagedData
-public class UsesJAXBContextFeature extends WebServiceFeature {
- /**
- * Constant value identifying the {@link UsesJAXBContext} feature.
- */
- public static final String ID = "http://jax-ws.dev.java.net/features/uses-jaxb-context";
-
- private final JAXBContextFactory factory;
-
- /**
- * Creates {@link UsesJAXBContextFeature}.
- *
- * @param factoryClass
- * This class has to have a public no-arg constructor, which will be invoked to create
- * a new instance. {@link JAXBContextFactory#createJAXBContext(SEIModel, List, List)} will
- * be then called to create {@link JAXBContext}.
- */
- @FeatureConstructor("value")
- public UsesJAXBContextFeature(@NotNull Class<? extends JAXBContextFactory> factoryClass) {
- try {
- factory = factoryClass.getConstructor().newInstance();
- } catch (InstantiationException e) {
- Error x = new InstantiationError(e.getMessage());
- x.initCause(e);
- throw x;
- } catch (IllegalAccessException e) {
- Error x = new IllegalAccessError(e.getMessage());
- x.initCause(e);
- throw x;
- } catch (InvocationTargetException e) {
- Error x = new InstantiationError(e.getMessage());
- x.initCause(e);
- throw x;
- } catch (NoSuchMethodException e) {
- Error x = new NoSuchMethodError(e.getMessage());
- x.initCause(e);
- throw x;
- }
- }
-
- /**
- * Creates {@link UsesJAXBContextFeature}.
- * This version allows {@link JAXBContextFactory} to carry application specific state.
- *
- * @param factory
- * Uses a specific instance of {@link JAXBContextFactory} to create {@link JAXBContext}.
- */
- public UsesJAXBContextFeature(@Nullable JAXBContextFactory factory) {
- this.factory = factory;
- }
-
- /**
- * Creates {@link UsesJAXBContextFeature}.
- * This version allows you to create {@link JAXBRIContext} upfront and uses it.
- */
- public UsesJAXBContextFeature(@Nullable final JAXBRIContext context) {
- this.factory = new JAXBContextFactory() {
- @NotNull
- public JAXBRIContext createJAXBContext(@NotNull SEIModel sei, @NotNull List<Class> classesToBind, @NotNull List<TypeReference> typeReferences) throws JAXBException {
- return context;
- }
- };
- }
-
- /**
- * Gets the {@link JAXBContextFactory} instance to be used for creating {@link JAXBContext} for SEI.
- *
- * @return
- * null if the default {@link JAXBContext} shall be used.
- */
- @ManagedAttribute
- public @Nullable JAXBContextFactory getFactory() {
- return factory;
- }
-
- @ManagedAttribute
- public String getID() {
- return ID;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ValidationErrorHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ValidationErrorHandler.java
deleted file mode 100644
index d5998a61..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ValidationErrorHandler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import org.xml.sax.ErrorHandler;
-
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.validation.Validator;
-
-/**
- * An {@link ErrorHandler} to receive errors encountered during the
- * {@link Validator#validate} method invocation. Specify
- * a custom handler in {@link SchemaValidation}, {@link SchemaValidationFeature}
- * to customize the error handling process during validation.
- *
- * @see SchemaValidation
- * @author Jitendra Kotamraju
- */
-public abstract class ValidationErrorHandler implements ErrorHandler {
- protected Packet packet;
-
- /**
- * Use it to communicate validation errors with the application.
- *
- * For e.g validation exceptions can be stored in {@link Packet#invocationProperties}
- * during request processing and can be accessed in the endpoint
- * via {@link MessageContext}
- *
- * @param packet for request or response message
- */
- public void setPacket(Packet packet) {
- this.packet = packet;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/WSBindingProvider.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/WSBindingProvider.java
deleted file mode 100644
index 6b4910ab..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/WSBindingProvider.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.developer;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.ComponentRegistry;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.Headers;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.client.WSPortInfo;
-import javax.xml.bind.JAXBContext;
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Service;
-import javax.xml.ws.Service.Mode;
-import java.util.List;
-import java.io.Closeable;
-import com.sun.org.glassfish.gmbal.ManagedObjectManager;
-
-/**
- * {@link BindingProvider} with JAX-WS RI's extension methods.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- * @since 2.1EA3
- */
-public interface WSBindingProvider extends BindingProvider, Closeable, ComponentRegistry {
- /**
- * Sets the out-bound headers to be added to messages sent from
- * this {@link BindingProvider}.
- *
- * <p>
- * Calling this method would discard any out-bound headers
- * that were previously set.
- *
- * <p>
- * A new {@link Header} object can be created by using
- * one of the methods on {@link Headers}.
- *
- * @param headers
- * The headers to be added to the future request messages.
- * To clear the outbound headers, pass in either null
- * or empty list.
- * @throws IllegalArgumentException
- * if the list contains null item.
- */
- void setOutboundHeaders(List<Header> headers);
-
- /**
- * Sets the out-bound headers to be added to messages sent from
- * this {@link BindingProvider}.
- *
- * <p>
- * Works like {@link #setOutboundHeaders(List)} except
- * that it accepts a var arg array.
- *
- * @param headers
- * Can be null or empty.
- */
- void setOutboundHeaders(Header... headers);
-
- /**
- * Sets the out-bound headers to be added to messages sent from
- * this {@link BindingProvider}.
- *
- * <p>
- * Each object must be a JAXB-bound object that is understood
- * by the {@link JAXBContext} object known by this {@link WSBindingProvider}
- * (that is, if this is a {@link Dispatch} with JAXB, then
- * {@link JAXBContext} given to {@link Service#createDispatch(QName,JAXBContext,Mode)}
- * and if this is a typed proxy, then {@link JAXBContext}
- * implicitly created by the JAX-WS RI.)
- *
- * @param headers
- * Can be null or empty.
- * @throws UnsupportedOperationException
- * If this {@link WSBindingProvider} is a {@link Dispatch}
- * that does not use JAXB.
- */
- void setOutboundHeaders(Object... headers);
-
- List<Header> getInboundHeaders();
-
- /**
- * Sets the endpoint address for all the invocations that happen
- * from {@link BindingProvider}. Instead of doing the following
- *
- * <p>
- * ((BindingProvider)proxy).getRequestContext().put(
- * BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "...")
- * <p>
- * you could do this:
- *
- * <p>
- * ((WSBindingProvider)proxy).setAddress("...");
- *
- * @param address Address of the service
- */
- void setAddress(String address);
-
- /**
- * Similar to {link BindingProvider#getEndpointReference(}, but returns WSEndpointReference that has more
- * convenience methods
- *
- * @return WSEndpointReference of the target servcie endpoint
- *
- * @since JAX-WS 2.2
- */
- WSEndpointReference getWSEndpointReference();
-
- /**
- *
- * @return WSPortInfo object that captures the port information for which the stub is created.
- * @since JAX-WS 2.2
- */
- WSPortInfo getPortInfo();
-
- /**
- * Get the ManagedObjectManager for this provider.
- */
- public @NotNull ManagedObjectManager getManagedObjectManager();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/package-info.java
deleted file mode 100644
index 5a84b821..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/package-info.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * JAX-WS RI vendor extension features that are available to the JAX-WS RI users.
- */
-package com.sun.xml.internal.ws.developer;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/LoggingDumpTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/LoggingDumpTube.java
deleted file mode 100644
index fc294436..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/LoggingDumpTube.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dump;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Fiber;
-import com.sun.xml.internal.ws.api.pipe.NextAction;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-import com.sun.xml.internal.ws.commons.xmlutil.Converter;
-import com.sun.xml.internal.ws.dump.MessageDumper.ProcessingState;
-
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- *
- * @author Marek Potociar <marek.potociar at sun.com>
- */
-public class LoggingDumpTube extends AbstractFilterTubeImpl {
- public static enum Position {
- Before(MessageDumper.ProcessingState.Received, MessageDumper.ProcessingState.Processed),
- After(MessageDumper.ProcessingState.Processed, MessageDumper.ProcessingState.Received);
-
- private final MessageDumper.ProcessingState requestState;
- private final MessageDumper.ProcessingState responseState;
-
- private Position(ProcessingState requestState, ProcessingState responseState) {
- this.requestState = requestState;
- this.responseState = responseState;
- }
- }
-
- private static final AtomicInteger ID_GENERATOR = new AtomicInteger(0);
- //
- private MessageDumper messageDumper;
- private final Level loggingLevel;
- private final Position position;
- private final int tubeId;
-
- public LoggingDumpTube(Level loggingLevel, Position position, Tube tubelineHead) {
- super(tubelineHead);
-
- this.position = position;
- this.loggingLevel = loggingLevel;
-
- this.tubeId = ID_GENERATOR.incrementAndGet();
- }
-
- public void setLoggedTubeName(String loggedTubeName) {
- assert messageDumper == null; // must not set a new message dumper once already set
- this.messageDumper = new MessageDumper(loggedTubeName, Logger.getLogger(loggedTubeName), loggingLevel);
- }
-
- /**
- * Copy constructor.
- */
- private LoggingDumpTube(LoggingDumpTube original, TubeCloner cloner) {
- super(original, cloner);
-
- this.messageDumper = original.messageDumper;
- this.loggingLevel = original.loggingLevel;
- this.position = original.position;
-
- this.tubeId = ID_GENERATOR.incrementAndGet();
- }
-
- public LoggingDumpTube copy(TubeCloner cloner) {
- return new LoggingDumpTube(this, cloner);
- }
-
-
- @Override
- public NextAction processRequest(Packet request) {
- if (messageDumper.isLoggable()) {
- Packet dumpPacket = (request != null) ? request.copy(true) : null;
- messageDumper.dump(MessageDumper.MessageType.Request, position.requestState, Converter.toString(dumpPacket), tubeId, Fiber.current().owner.id);
- }
-
- return super.processRequest(request);
- }
-
- @Override
- public NextAction processResponse(Packet response) {
- if (messageDumper.isLoggable()) {
- Packet dumpPacket = (response != null) ? response.copy(true) : null;
- messageDumper.dump(MessageDumper.MessageType.Response, position.responseState, Converter.toString(dumpPacket), tubeId, Fiber.current().owner.id);
- }
-
- return super.processResponse(response);
- }
-
- @Override
- public NextAction processException(Throwable t) {
- if (messageDumper.isLoggable()) {
- messageDumper.dump(MessageDumper.MessageType.Exception, position.responseState, Converter.toString(t), tubeId, Fiber.current().owner.id);
- }
-
- return super.processException(t);
- }
-
- @Override
- public void preDestroy() {
- super.preDestroy();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumper.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumper.java
deleted file mode 100644
index 3d61bfc3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumper.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dump;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- *
- * @author Marek Potociar <marek.potociar at sun.com>
- */
-final class MessageDumper {
-
- static enum MessageType {
- Request("Request message"),
- Response("Response message"),
- Exception("Response exception");
-
- private final String name;
-
- private MessageType(final String name) {
- this.name = name;
- }
-
- @Override
- public String toString() {
- return name;
- }
- }
-
- static enum ProcessingState {
- Received("received"),
- Processed("processed");
-
- private final String name;
-
- private ProcessingState(final String name) {
- this.name = name;
- }
-
- @Override
- public String toString() {
- return name;
- }
- }
-
-
- private final String tubeName;
- private final Logger logger;
- private Level loggingLevel;
-
-
- public MessageDumper(String tubeName, Logger logger, Level loggingLevel) {
- this.tubeName = tubeName;
- this.logger = logger;
- this.loggingLevel = loggingLevel;
- }
-
- final boolean isLoggable() {
- return logger.isLoggable(loggingLevel);
- }
-
- final void setLoggingLevel(Level level) {
- this.loggingLevel = level;
- }
-
- final String createLogMessage(MessageType messageType, ProcessingState processingState, int tubeId, String engineId, String message) {
- return String.format("%s %s in Tube [ %s ] Instance [ %d ] Engine [ %s ] Thread [ %s ]:%n%s",
- messageType,
- processingState,
- tubeName,
- tubeId,
- engineId,
- Thread.currentThread().getName(),
- message);
- }
-
- final String dump(MessageType messageType, ProcessingState processingState, String message, int tubeId, String engineId) {
- String logMessage = createLogMessage(messageType, processingState, tubeId, engineId, message);
- logger.log(loggingLevel, logMessage);
-
- return logMessage;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumping.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumping.java
deleted file mode 100644
index 80e3fc96..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumping.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dump;
-
-
-import javax.xml.ws.spi.WebServiceFeatureAnnotation;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-@WebServiceFeatureAnnotation(id = MessageDumpingFeature.ID, bean = MessageDumpingFeature.class)
-public @interface MessageDumping {
- /**
- * Specifies if this feature is enabled or disabled.
- */
- boolean enabled() default true;
-
- /**
- * Message logging root
- */
- String messageLoggingRoot() default MessageDumpingTube.DEFAULT_MSGDUMP_LOGGING_ROOT;
-
- /**
- * Message logging level
- */
- String messageLoggingLevel() default "FINE";
-
- /**
- * Turns on or off storing messages
- */
- boolean storeMessages() default false;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingFeature.java
deleted file mode 100644
index c5bd7f7f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingFeature.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dump;
-
-import com.sun.xml.internal.ws.api.FeatureConstructor;
-import com.sun.org.glassfish.gmbal.ManagedAttribute;
-import com.sun.org.glassfish.gmbal.ManagedData;
-
-import javax.xml.ws.WebServiceFeature;
-import java.util.Queue;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.logging.Level;
-
-/**
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-@ManagedData
-public final class MessageDumpingFeature extends WebServiceFeature {
-
- public static final String ID = "com.sun.xml.internal.ws.messagedump.MessageDumpingFeature";
- //
- private static final Level DEFAULT_MSG_LOG_LEVEL = Level.FINE;
- //
- private final Queue<String> messageQueue;
- private final AtomicBoolean messageLoggingStatus;
- private final String messageLoggingRoot;
- private final Level messageLoggingLevel;
-
- public MessageDumpingFeature() {
- this(null, null, true);
- }
-
- public MessageDumpingFeature(String msgLogRoot, Level msgLogLevel, boolean storeMessages) {
- this.messageQueue = (storeMessages) ? new java.util.concurrent.ConcurrentLinkedQueue<String>() : null;
- this.messageLoggingStatus = new AtomicBoolean(true);
- this.messageLoggingRoot = (msgLogRoot != null && msgLogRoot.length() > 0) ? msgLogRoot : MessageDumpingTube.DEFAULT_MSGDUMP_LOGGING_ROOT;
- this.messageLoggingLevel = (msgLogLevel != null) ? msgLogLevel : DEFAULT_MSG_LOG_LEVEL;
-
- super.enabled = true;
- }
-
- public MessageDumpingFeature(boolean enabled) {
- // this constructor is here just to satisfy JAX-WS specification requirements
- this();
- super.enabled = enabled;
- }
-
- @FeatureConstructor({"enabled", "messageLoggingRoot", "messageLoggingLevel", "storeMessages"})
- public MessageDumpingFeature(boolean enabled, String msgLogRoot, String msgLogLevel, boolean storeMessages) {
- // this constructor is here just to satisfy JAX-WS specification requirements
- this(msgLogRoot, Level.parse(msgLogLevel), storeMessages);
-
- super.enabled = enabled;
- }
-
- @Override
- @ManagedAttribute
- public String getID() {
- return ID;
- }
-
- public String nextMessage() {
- return (messageQueue != null) ? messageQueue.poll() : null;
- }
-
- public void enableMessageLogging() {
- messageLoggingStatus.set(true);
- }
-
- public void disableMessageLogging() {
- messageLoggingStatus.set(false);
- }
-
- @ManagedAttribute
- public boolean getMessageLoggingStatus() {
- return messageLoggingStatus.get();
- }
-
- @ManagedAttribute
- public String getMessageLoggingRoot() {
- return messageLoggingRoot;
- }
-
- @ManagedAttribute
- public Level getMessageLoggingLevel() {
- return messageLoggingLevel;
- }
-
- boolean offerMessage(String message) {
- return (messageQueue != null) ? messageQueue.offer(message) : false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTube.java
deleted file mode 100644
index 9bebbdf4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTube.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dump;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Fiber;
-import com.sun.xml.internal.ws.api.pipe.NextAction;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-import com.sun.xml.internal.ws.commons.xmlutil.Converter;
-import com.sun.xml.internal.ws.dump.MessageDumper.MessageType;
-import com.sun.xml.internal.ws.dump.MessageDumper.ProcessingState;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-final class MessageDumpingTube extends AbstractFilterTubeImpl {
- static final String DEFAULT_MSGDUMP_LOGGING_ROOT = com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".messagedump";
- private static final AtomicInteger ID_GENERATOR = new AtomicInteger(0);
- //
- private final MessageDumper messageDumper;
- private final int tubeId;
- //
- private final MessageDumpingFeature messageDumpingFeature;
- /**
- * @param name
- * Specify the name that identifies this {@link MessageDumpingTube}
- * instance. This string will be printed when this pipe
- * dumps messages, and allows people to distinguish which
- * pipe instance is dumping a message when multiple
- * {@link com.sun.xml.internal.ws.util.pipe.DumpTube}s print messages out.
- * @param out
- * The output to send dumps to.
- * @param next
- * The next {@link com.sun.xml.internal.ws.api.pipe.Tube} in the pipeline.
- */
- MessageDumpingTube(Tube next, MessageDumpingFeature feature) {
- super(next);
-
- this.messageDumpingFeature = feature;
- this.tubeId = ID_GENERATOR.incrementAndGet();
- this.messageDumper = new MessageDumper(
- "MesageDumpingTube",
- java.util.logging.Logger.getLogger(feature.getMessageLoggingRoot()),
- feature.getMessageLoggingLevel());
- }
-
- /**
- * Copy constructor.
- */
- MessageDumpingTube(MessageDumpingTube that, TubeCloner cloner) {
- super(that, cloner);
-
-
- this.messageDumpingFeature = that.messageDumpingFeature;
- this.tubeId = ID_GENERATOR.incrementAndGet();
- this.messageDumper = that.messageDumper;
- }
-
- public MessageDumpingTube copy(TubeCloner cloner) {
- return new MessageDumpingTube(this, cloner);
- }
-
- @Override
- public NextAction processRequest(Packet request) {
- dump(MessageType.Request, Converter.toString(request), Fiber.current().owner.id);
- return super.processRequest(request);
- }
-
- @Override
- public NextAction processResponse(Packet response) {
- dump(MessageType.Response, Converter.toString(response), Fiber.current().owner.id);
- return super.processResponse(response);
- }
-
- @Override
- public NextAction processException(Throwable t) {
- dump(MessageType.Exception, Converter.toString(t), Fiber.current().owner.id);
-
- return super.processException(t);
- }
-
- protected final void dump(MessageType messageType, String message, String engineId) {
- String logMessage;
- if (messageDumpingFeature.getMessageLoggingStatus()) {
- messageDumper.setLoggingLevel(messageDumpingFeature.getMessageLoggingLevel());
- logMessage = messageDumper.dump(messageType, ProcessingState.Received, message, tubeId, engineId);
- } else {
- logMessage = messageDumper.createLogMessage(messageType, ProcessingState.Received, tubeId, engineId, message);
- }
- messageDumpingFeature.offerMessage(logMessage);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTubeFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTubeFactory.java
deleted file mode 100644
index b2c69871..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTubeFactory.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.dump;
-
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext;
-import com.sun.xml.internal.ws.assembler.dev.TubeFactory;
-
-import javax.xml.ws.WebServiceException;
-
-public final class MessageDumpingTubeFactory implements TubeFactory {
-
- public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException {
- MessageDumpingFeature messageDumpingFeature = context.getBinding().getFeature(MessageDumpingFeature.class);
- if (messageDumpingFeature != null) {
- return new MessageDumpingTube(context.getTubelineHead(), messageDumpingFeature);
- }
-
- return context.getTubelineHead();
- }
-
- public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException {
- MessageDumpingFeature messageDumpingFeature = context.getEndpoint().getBinding().getFeature(MessageDumpingFeature.class);
- if (messageDumpingFeature != null) {
- return new MessageDumpingTube(context.getTubelineHead(), messageDumpingFeature);
- }
-
- return context.getTubelineHead();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentType.java
deleted file mode 100644
index 9b36d830..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentType.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)ContentType.java 1.7 02/03/27
- */
-
-
-
-package com.sun.xml.internal.ws.encoding;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * This class represents a MIME ContentType value. It provides
- * methods to parse a ContentType string into individual components
- * and to generate a MIME style ContentType string.
- *
- * @version 1.7, 02/03/27
- * @author John Mani
- */
-public final class ContentType {
-
- private String primaryType; // primary type
- private String subType; // subtype
- private ParameterList list; // parameter list
-
- /**
- * Constructor that takes a Content-Type string. The String
- * is parsed into its constituents: primaryType, subType
- * and parameters. A ParseException is thrown if the parse fails.
- *
- * @param s the Content-Type string.
- * @exception WebServiceException if the parse fails.
- */
- public ContentType(String s) throws WebServiceException {
- HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
- HeaderTokenizer.Token tk;
-
- // First "type" ..
- tk = h.next();
- if (tk.getType() != HeaderTokenizer.Token.ATOM)
- throw new WebServiceException();
- primaryType = tk.getValue();
-
- // The '/' separator ..
- tk = h.next();
- if ((char)tk.getType() != '/')
- throw new WebServiceException();
-
- // Then "subType" ..
- tk = h.next();
- if (tk.getType() != HeaderTokenizer.Token.ATOM)
- throw new WebServiceException();
- subType = tk.getValue();
-
- // Finally parameters ..
- String rem = h.getRemainder();
- if (rem != null)
- list = new ParameterList(rem);
- }
-
-
- /**
- * Return the primary type.
- * @return the primary type
- */
- public String getPrimaryType() {
- return primaryType;
- }
-
- /**
- * Return the subType.
- * @return the subType
- */
- public String getSubType() {
- return subType;
- }
-
- /**
- * Return the MIME type string, without the parameters.
- * The returned value is basically the concatenation of
- * the primaryType, the '/' character and the secondaryType.
- *
- * @return the type
- */
- public String getBaseType() {
- return primaryType + '/' + subType;
- }
-
- /**
- * Return the specified parameter value. Returns <code>null</code>
- * if this parameter is absent.
- *
- * @param name parameter name
- * @return parameter value
- */
- public String getParameter(String name) {
- if (list == null)
- return null;
-
- return list.get(name);
- }
-
- /**
- * Return a ParameterList object that holds all the available
- * parameters. Returns null if no parameters are available.
- *
- * @return ParameterList
- */
- public ParameterList getParameterList() {
- return list;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentTypeImpl.java
deleted file mode 100644
index 5c62d0c2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentTypeImpl.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.NotNull;
-
-/**
- * @author Vivek Pandey
- */
-public final class ContentTypeImpl implements com.sun.xml.internal.ws.api.pipe.ContentType {
- private final @NotNull String contentType;
- private final @NotNull String soapAction;
- private String accept;
- private final @Nullable String charset;
- private String boundary;
- private String boundaryParameter;
- private String rootId;
- private ContentType internalContentType;
-
- public ContentTypeImpl(String contentType) {
- this(contentType, null, null);
- }
-
- public ContentTypeImpl(String contentType, @Nullable String soapAction) {
- this(contentType, soapAction, null);
- }
-
- public ContentTypeImpl(String contentType, @Nullable String soapAction, @Nullable String accept) {
- this(contentType, soapAction, accept, null);
- }
-
- public ContentTypeImpl(String contentType, @Nullable String soapAction, @Nullable String accept, String charsetParam) {
- this.contentType = contentType;
- this.accept = accept;
- this.soapAction = getQuotedSOAPAction(soapAction);
- if (charsetParam == null) {
- String tmpCharset = null;
- try {
- internalContentType = new ContentType(contentType);
- tmpCharset = internalContentType.getParameter("charset");
- } catch(Exception e) {
- //Ignore the parsing exception.
- }
- charset = tmpCharset;
- } else {
- charset = charsetParam;
- }
- }
-
- /**
- * Returns the character set encoding.
- *
- * @return returns the character set encoding.
- */
- public @Nullable String getCharSet() {
- return charset;
- }
-
- /** BP 1.1 R1109 requires SOAPAction too be a quoted value **/
- private String getQuotedSOAPAction(String soapAction){
- if(soapAction == null || soapAction.length() == 0){
- return "\"\"";
- }else if(soapAction.charAt(0) != '"' && soapAction.charAt(soapAction.length() -1) != '"'){
- //surround soapAction by double quotes for BP R1109
- return "\"" + soapAction + "\"";
- }else{
- return soapAction;
- }
- }
-
- @Override
- public String getContentType() {
- return contentType;
- }
-
- @Override
- public String getSOAPActionHeader() {
- return soapAction;
- }
-
- @Override
- public String getAcceptHeader() {
- return accept;
- }
-
- public void setAcceptHeader(String accept) {
- this.accept = accept;
- }
-
- public String getBoundary() {
- if (boundary == null) {
- if (internalContentType == null) internalContentType = new ContentType(contentType);
- boundary = internalContentType.getParameter("boundary");
- }
- return boundary;
- }
-
- public void setBoundary(String boundary) {
- this.boundary = boundary;
- }
-
- public String getBoundaryParameter() {
- return boundaryParameter;
- }
-
- public void setBoundaryParameter(String boundaryParameter) {
- this.boundaryParameter = boundaryParameter;
- }
-
- public String getRootId() {
- if (rootId == null) {
- if (internalContentType == null) internalContentType = new ContentType(contentType);
- rootId = internalContentType.getParameter("start");
- }
- return rootId;
- }
-
- public void setRootId(String rootId) {
- this.rootId = rootId;
- }
-
- public static class Builder {
- public String contentType;
- public String soapAction;
- public String accept;
- public String charset;
- public ContentTypeImpl build() {
- return new ContentTypeImpl(contentType, soapAction, accept, charset);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataHandlerDataSource.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataHandlerDataSource.java
deleted file mode 100644
index f42513b0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataHandlerDataSource.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding;
-
-import javax.activation.DataSource;
-import javax.activation.DataHandler;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * {@link DataSource} impl using a DataHandler
- *
- * @author Jitendra Kotamraju
- */
-public class DataHandlerDataSource implements DataSource {
- private final DataHandler dataHandler;
-
- public DataHandlerDataSource(DataHandler dh) {
- this.dataHandler = dh;
- }
-
- /**
- * Returns an <code>InputStream</code> representing this object.
- *
- * @return the <code>InputStream</code>
- */
- public InputStream getInputStream() throws IOException {
- return dataHandler.getInputStream();
- }
-
- /**
- * Returns the <code>OutputStream</code> for this object.
- *
- * @return the <code>OutputStream</code>
- */
- public OutputStream getOutputStream() throws IOException {
- return dataHandler.getOutputStream();
- }
-
- /**
- * Returns the MIME type of the data represented by this object.
- *
- * @return the MIME type
- */
- public String getContentType() {
- return dataHandler.getContentType();
- }
-
- /**
- * Returns the name of this object.
- *
- * @return the name of this object
- */
- public String getName() {
- return dataHandler.getName();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataSourceStreamingDataHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataSourceStreamingDataHandler.java
deleted file mode 100644
index 53d53a81..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataSourceStreamingDataHandler.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding;
-
-import javax.activation.DataSource;
-import java.io.*;
-
-import com.sun.xml.internal.ws.developer.StreamingDataHandler;
-
-/**
- * @author Jitendra Kotamraju
- */
-public class DataSourceStreamingDataHandler extends StreamingDataHandler {
-
- public DataSourceStreamingDataHandler(DataSource ds) {
- super(ds);
- }
-
- @Override
- public InputStream readOnce() throws IOException {
- return getInputStream();
- }
-
- @Override
- public void moveTo(File file) throws IOException {
- InputStream in = getInputStream();
- OutputStream os = new FileOutputStream(file);
- try {
- byte[] temp = new byte[8192];
- int len;
- while((len=in.read(temp)) != -1) {
- os.write(temp, 0, len);
- }
- in.close();
- } finally {
- if (os != null) {
- os.close();
- }
- }
- }
-
- @Override
- public void close() throws IOException {
- // nothing to do here
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HasEncoding.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HasEncoding.java
deleted file mode 100644
index fbe9676e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HasEncoding.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding;
-
-/**
- * A {@link javax.xml.stream.XMLStreamWriter} doesn't expose any method to
- * give encoding. An implementation of writer may implement
- * this interface to give the encoding with which the writer is created.
- *
- * @author Jitendra Kotamraju
- * @since JAX-WS RI 2.2.6
- */
-public interface HasEncoding {
- public String getEncoding();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HeaderTokenizer.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HeaderTokenizer.java
deleted file mode 100644
index 350f2137..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HeaderTokenizer.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * This class tokenizes RFC822 and MIME headers into the basic
- * symbols specified by RFC822 and MIME. <p>
- *
- * This class handles folded headers (ie headers with embedded
- * CRLF SPACE sequences). The folds are removed in the returned
- * tokens.
- *
- * @version 1.9, 02/03/27
- * @author John Mani
- */
-
-class HeaderTokenizer {
-
- /**
- * The Token class represents tokens returned by the
- * HeaderTokenizer.
- */
- static class Token {
-
- private int type;
- private String value;
-
- /**
- * Token type indicating an ATOM.
- */
- public static final int ATOM = -1;
-
- /**
- * Token type indicating a quoted string. The value
- * field contains the string without the quotes.
- */
- public static final int QUOTEDSTRING = -2;
-
- /**
- * Token type indicating a comment. The value field
- * contains the comment string without the comment
- * start and end symbols.
- */
- public static final int COMMENT = -3;
-
- /**
- * Token type indicating end of input.
- */
- public static final int EOF = -4;
-
- /**
- * Constructor.
- * @param type Token type
- * @param value Token value
- */
- public Token(int type, String value) {
- this.type = type;
- this.value = value;
- }
-
- /**
- * Return the type of the token. If the token represents a
- * delimiter or a control character, the type is that character
- * itself, converted to an integer. Otherwise, it's value is
- * one of the following:
- * <ul>
- * <li><code>ATOM</code> A sequence of ASCII characters
- * delimited by either SPACE, CTL, "(", <"> or the
- * specified SPECIALS
- * <li><code>QUOTEDSTRING</code> A sequence of ASCII characters
- * within quotes
- * <li><code>COMMENT</code> A sequence of ASCII characters
- * within "(" and ")".
- * <li><code>EOF</code> End of header
- * </ul>
- */
- public int getType() {
- return type;
- }
-
- /**
- * Returns the value of the token just read. When the current
- * token is a quoted string, this field contains the body of the
- * string, without the quotes. When the current token is a comment,
- * this field contains the body of the comment.
- *
- * @return token value
- */
- public String getValue() {
- return value;
- }
- }
-
- private String string; // the string to be tokenized
- private boolean skipComments; // should comments be skipped ?
- private String delimiters; // delimiter string
- private int currentPos; // current parse position
- private int maxPos; // string length
- private int nextPos; // track start of next Token for next()
- private int peekPos; // track start of next Token for peek()
-
- /**
- * RFC822 specials
- */
- private final static String RFC822 = "()<>@,;:\\\"\t .[]";
-
- /**
- * MIME specials
- */
- final static String MIME = "()<>@,;:\\\"\t []/?=";
-
- // The EOF Token
- private final static Token EOFToken = new Token(Token.EOF, null);
-
- /**
- * Constructor that takes a rfc822 style header.
- *
- * @param header The rfc822 header to be tokenized
- * @param delimiters Set of delimiter characters
- * to be used to delimit ATOMS. These
- * are usually <code>RFC822</code> or
- * <code>MIME</code>
- * @param skipComments If true, comments are skipped and
- * not returned as tokens
- */
- HeaderTokenizer(String header, String delimiters,
- boolean skipComments) {
- string = (header == null) ? "" : header; // paranoia ?!
- this.skipComments = skipComments;
- this.delimiters = delimiters;
- currentPos = nextPos = peekPos = 0;
- maxPos = string.length();
- }
-
- /**
- * Constructor. Comments are ignored and not returned as tokens
- *
- * @param header The header that is tokenized
- * @param delimiters The delimiters to be used
- */
- HeaderTokenizer(String header, String delimiters) {
- this(header, delimiters, true);
- }
-
- /**
- * Constructor. The RFC822 defined delimiters - RFC822 - are
- * used to delimit ATOMS. Also comments are skipped and not
- * returned as tokens
- */
- HeaderTokenizer(String header) {
- this(header, RFC822);
- }
-
- /**
- * Parses the next token from this String. <p>
- *
- * Clients sit in a loop calling next() to parse successive
- * tokens until an EOF Token is returned.
- *
- * @return the next Token
- * @exception WebServiceException if the parse fails
- */
- Token next() throws WebServiceException {
- Token tk;
-
- currentPos = nextPos; // setup currentPos
- tk = getNext();
- nextPos = peekPos = currentPos; // update currentPos and peekPos
- return tk;
- }
-
- /**
- * Peek at the next token, without actually removing the token
- * from the parse stream. Invoking this method multiple times
- * will return successive tokens, until <code>next()</code> is
- * called. <p>
- *
- * @return the next Token
- * @exception WebServiceException if the parse fails
- */
- Token peek() throws WebServiceException {
- Token tk;
-
- currentPos = peekPos; // setup currentPos
- tk = getNext();
- peekPos = currentPos; // update peekPos
- return tk;
- }
-
- /**
- * Return the rest of the Header.
- *
- * @return String rest of header. null is returned if we are
- * already at end of header
- */
- String getRemainder() {
- return string.substring(nextPos);
- }
-
- /*
- * Return the next token starting from 'currentPos'. After the
- * parse, 'currentPos' is updated to point to the start of the
- * next token.
- */
- private Token getNext() throws WebServiceException {
- // If we're already at end of string, return EOF
- if (currentPos >= maxPos)
- return EOFToken;
-
- // Skip white-space, position currentPos beyond the space
- if (skipWhiteSpace() == Token.EOF)
- return EOFToken;
-
- char c;
- int start;
- boolean filter = false;
-
- c = string.charAt(currentPos);
-
- // Check or Skip comments and position currentPos
- // beyond the comment
- while (c == '(') {
- // Parsing comment ..
- int nesting;
- for (start = ++currentPos, nesting = 1;
- nesting > 0 && currentPos < maxPos;
- currentPos++) {
- c = string.charAt(currentPos);
- if (c == '\\') { // Escape sequence
- currentPos++; // skip the escaped character
- filter = true;
- } else if (c == '\r')
- filter = true;
- else if (c == '(')
- nesting++;
- else if (c == ')')
- nesting--;
- }
- if (nesting != 0)
- throw new WebServiceException("Unbalanced comments");
-
- if (!skipComments) {
- // Return the comment, if we are asked to.
- // Note that the comment start & end markers are ignored.
- String s;
- if (filter) // need to go thru the token again.
- s = filterToken(string, start, currentPos-1);
- else
- s = string.substring(start,currentPos-1);
-
- return new Token(Token.COMMENT, s);
- }
-
- // Skip any whitespace after the comment.
- if (skipWhiteSpace() == Token.EOF)
- return EOFToken;
- c = string.charAt(currentPos);
- }
-
- // Check for quoted-string and position currentPos
- // beyond the terminating quote
- if (c == '"') {
- for (start = ++currentPos; currentPos < maxPos; currentPos++) {
- c = string.charAt(currentPos);
- if (c == '\\') { // Escape sequence
- currentPos++;
- filter = true;
- } else if (c == '\r')
- filter = true;
- else if (c == '"') {
- currentPos++;
- String s;
-
- if (filter)
- s = filterToken(string, start, currentPos-1);
- else
- s = string.substring(start,currentPos-1);
-
- return new Token(Token.QUOTEDSTRING, s);
- }
- }
- throw new WebServiceException("Unbalanced quoted string");
- }
-
- // Check for SPECIAL or CTL
- if (c < 040 || c >= 0177 || delimiters.indexOf(c) >= 0) {
- currentPos++; // re-position currentPos
- char ch[] = new char[1];
- ch[0] = c;
- return new Token((int)c, new String(ch));
- }
-
- // Check for ATOM
- for (start = currentPos; currentPos < maxPos; currentPos++) {
- c = string.charAt(currentPos);
- // ATOM is delimited by either SPACE, CTL, "(", <">
- // or the specified SPECIALS
- if (c < 040 || c >= 0177 || c == '(' || c == ' ' ||
- c == '"' || delimiters.indexOf(c) >= 0)
- break;
- }
- return new Token(Token.ATOM, string.substring(start, currentPos));
- }
-
- // Skip SPACE, HT, CR and NL
- private int skipWhiteSpace() {
- char c;
- for (; currentPos < maxPos; currentPos++)
- if (((c = string.charAt(currentPos)) != ' ') &&
- (c != '\t') && (c != '\r') && (c != '\n'))
- return currentPos;
- return Token.EOF;
- }
-
- /* Process escape sequences and embedded LWSPs from a comment or
- * quoted string.
- */
- private static String filterToken(String s, int start, int end) {
- StringBuffer sb = new StringBuffer();
- char c;
- boolean gotEscape = false;
- boolean gotCR = false;
-
- for (int i = start; i < end; i++) {
- c = s.charAt(i);
- if (c == '\n' && gotCR) {
- // This LF is part of an unescaped
- // CRLF sequence (i.e, LWSP). Skip it.
- gotCR = false;
- continue;
- }
-
- gotCR = false;
- if (!gotEscape) {
- // Previous character was NOT '\'
- if (c == '\\') // skip this character
- gotEscape = true;
- else if (c == '\r') // skip this character
- gotCR = true;
- else // append this character
- sb.append(c);
- } else {
- // Previous character was '\'. So no need to
- // bother with any special processing, just
- // append this character
- sb.append(c);
- gotEscape = false;
- }
- }
- return sb.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ImageDataContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ImageDataContentHandler.java
deleted file mode 100644
index 35b70d28..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ImageDataContentHandler.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding;
-
-import javax.activation.DataContentHandler;
-import javax.activation.ActivationDataFlavor;
-import javax.activation.DataSource;
-import javax.imageio.ImageIO;
-import javax.imageio.ImageWriter;
-import javax.imageio.stream.ImageOutputStream;
-import java.awt.*;
-import java.awt.image.BufferedImage;
-import java.awt.datatransfer.DataFlavor;
-import java.util.logging.Logger;
-import java.util.Iterator;
-import java.io.IOException;
-import java.io.BufferedInputStream;
-import java.io.OutputStream;
-import java.util.Arrays;
-
-/**
- * @author Jitendra Kotamraju
- */
-
-public class ImageDataContentHandler extends Component
- implements DataContentHandler {
-
- private static final Logger log = Logger.getLogger(ImageDataContentHandler.class.getName());
- private final DataFlavor[] flavor;
-
- public ImageDataContentHandler() {
- String[] mimeTypes = ImageIO.getReaderMIMETypes();
- flavor = new DataFlavor[mimeTypes.length];
- for(int i=0; i < mimeTypes.length; i++) {
- flavor[i] = new ActivationDataFlavor(Image.class, mimeTypes[i], "Image");
- }
- }
-
- /**
- * Returns an array of DataFlavor objects indicating the flavors the
- * data can be provided in. The array should be ordered according to
- * preference for providing the data (from most richly descriptive to
- * least descriptive).
- *
- * @return The DataFlavors.
- */
- public DataFlavor[] getTransferDataFlavors() {
- return Arrays.copyOf(flavor, flavor.length);
- }
-
- /**
- * Returns an object which represents the data to be transferred.
- * The class of the object returned is defined by the representation class
- * of the flavor.
- *
- * @param df The DataFlavor representing the requested type.
- * @param ds The DataSource representing the data to be converted.
- * @return The constructed Object.
- */
- public Object getTransferData(DataFlavor df, DataSource ds)
- throws IOException {
- for (DataFlavor aFlavor : flavor) {
- if (aFlavor.equals(df)) {
- return getContent(ds);
- }
- }
- return null;
- }
-
- /**
- * Return an object representing the data in its most preferred form.
- * Generally this will be the form described by the first DataFlavor
- * returned by the <code>getTransferDataFlavors</code> method.
- *
- * @param ds The DataSource representing the data to be converted.
- * @return The constructed Object.
- */
- public Object getContent(DataSource ds) throws IOException {
- return ImageIO.read(new BufferedInputStream(ds.getInputStream()));
- }
-
- /**
- * Convert the object to a byte stream of the specified MIME type
- * and write it to the output stream.
- *
- * @param obj The object to be converted.
- * @param type The requested MIME type of the resulting byte stream.
- * @param os The output stream into which to write the converted
- * byte stream.
- */
-
- public void writeTo(Object obj, String type, OutputStream os)
- throws IOException {
-
- try {
- BufferedImage bufImage;
- if (obj instanceof BufferedImage) {
- bufImage = (BufferedImage)obj;
- } else if (obj instanceof Image) {
- bufImage = render((Image)obj);
- } else {
- throw new IOException(
- "ImageDataContentHandler requires Image object, "
- + "was given object of type "
- + obj.getClass().toString());
- }
- ImageWriter writer = null;
- Iterator<ImageWriter> i = ImageIO.getImageWritersByMIMEType(type);
- if (i.hasNext()) {
- writer = i.next();
- }
- if (writer != null) {
- ImageOutputStream stream = ImageIO.createImageOutputStream(os);
- writer.setOutput(stream);
- writer.write(bufImage);
- writer.dispose();
- stream.close();
- } else {
- throw new IOException("Unsupported mime type:"+ type);
- }
- } catch (Exception e) {
- throw new IOException("Unable to encode the image to a stream "
- + e.getMessage());
- }
- }
-
-
- private BufferedImage render(Image img) throws InterruptedException {
-
- MediaTracker tracker = new MediaTracker(this);
- tracker.addImage(img, 0);
- tracker.waitForAll();
- BufferedImage bufImage = new BufferedImage(img.getWidth(null),
- img.getHeight(null), BufferedImage.TYPE_INT_RGB);
- Graphics g = bufImage.createGraphics();
- g.drawImage(img, 0, 0, null);
- g.dispose();
- return bufImage;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MIMEPartStreamingDataHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MIMEPartStreamingDataHandler.java
deleted file mode 100644
index 02b452a2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MIMEPartStreamingDataHandler.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding;
-
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart;
-
-import javax.activation.DataSource;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.File;
-
-import com.sun.xml.internal.ws.developer.StreamingDataHandler;
-
-/**
- * Implementation of {@link StreamingDataHandler} to access MIME
- * attachments efficiently. Applications can use the additional methods and decide
- * on how to access the attachment data in JAX-WS applications.
- *
- * <p>
- * for e.g.:
- *
- * DataHandler dh = proxy.getData();
- * StreamingDataHandler sdh = (StreamingDataHandler)dh;
- * // readOnce() doesn't store attachment on the disk in some cases
- * // for e.g when only one huge attachment after soap envelope part in MIME message
- * InputStream in = sdh.readOnce();
- * ...
- * in.close();
- * sdh.close();
- *
- * @author Jitendra Kotamraju
- */
-public class MIMEPartStreamingDataHandler extends StreamingDataHandler {
- private final StreamingDataSource ds;
-
- public MIMEPartStreamingDataHandler(MIMEPart part) {
- super(new StreamingDataSource(part));
- ds = (StreamingDataSource)getDataSource();
- }
-
- @Override
- public InputStream readOnce() throws IOException {
- return ds.readOnce();
- }
-
- @Override
- public void moveTo(File file) throws IOException {
- ds.moveTo(file);
- }
-
- @Override
- public void close() throws IOException {
- ds.close();
- }
-
- private static final class StreamingDataSource implements DataSource {
- private final MIMEPart part;
-
- StreamingDataSource(MIMEPart part) {
- this.part = part;
- }
-
- @Override
- public InputStream getInputStream() throws IOException {
- return part.read(); //readOnce() ??
- }
-
- InputStream readOnce() throws IOException {
- try {
- return part.readOnce();
- } catch(Exception e) {
- throw new MyIOException(e);
- }
- }
-
- void moveTo(File file) throws IOException {
- part.moveTo(file);
- }
-
- @Override
- public OutputStream getOutputStream() throws IOException {
- return null;
- }
-
- @Override
- public String getContentType() {
- return part.getContentType();
- }
-
- @Override
- public String getName() {
- return "";
- }
-
- public void close() throws IOException {
- part.close();
- }
- }
-
- private static final class MyIOException extends IOException {
- private final Exception linkedException;
-
- MyIOException(Exception linkedException) {
- this.linkedException = linkedException;
- }
-
- @Override
- public Throwable getCause() {
- return linkedException;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeCodec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeCodec.java
deleted file mode 100644
index 44bb6dd9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeCodec.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.encoding;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.message.AttachmentEx;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.developer.StreamingAttachmentFeature;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.channels.ReadableByteChannel;
-import java.util.Iterator;
-import java.util.UUID;
-
-/**
- * {@link Codec}s that uses the MIME multipart as the underlying format.
- *
- * <p>
- * When the runtime needs to dynamically choose a {@link Codec}, and
- * when there are more than one {@link Codec}s that use MIME multipart,
- * it is often impossible to determine the right {@link Codec} unless
- * you parse the multipart message to some extent.
- *
- * <p>
- * By having all such {@link Codec}s extending from this class,
- * the "sniffer" can decode a multipart message partially, and then
- * pass the partial parse result to the ultimately-responsible {@link Codec}.
- * This improves the performance.
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class MimeCodec implements Codec {
-
- public static final String MULTIPART_RELATED_MIME_TYPE = "multipart/related";
-
- protected Codec mimeRootCodec;
- protected final SOAPVersion version;
- protected final WSFeatureList features;
-
- protected MimeCodec(SOAPVersion version, WSFeatureList f) {
- this.version = version;
- this.features = f;
- }
-
- public String getMimeType() {
- return MULTIPART_RELATED_MIME_TYPE;
- }
-
- protected Codec getMimeRootCodec(Packet packet) {
- return mimeRootCodec;
- }
-
- // TODO: preencode String literals to byte[] so that they don't have to
- // go through char[]->byte[] conversion at runtime.
- public ContentType encode(Packet packet, OutputStream out) throws IOException {
- Message msg = packet.getMessage();
- if (msg == null) {
- return null;
- }
- ContentTypeImpl ctImpl = (ContentTypeImpl)getStaticContentType(packet);
- String boundary = ctImpl.getBoundary();
- boolean hasAttachments = (boundary != null);
- Codec rootCodec = getMimeRootCodec(packet);
- if (hasAttachments) {
- writeln("--"+boundary, out);
- ContentType ct = rootCodec.getStaticContentType(packet);
- String ctStr = (ct != null) ? ct.getContentType() : rootCodec.getMimeType();
- writeln("Content-Type: " + ctStr, out);
- writeln(out);
- }
- ContentType primaryCt = rootCodec.encode(packet, out);
-
- if (hasAttachments) {
- writeln(out);
- // Encode all the attchments
- for (Attachment att : msg.getAttachments()) {
- writeln("--"+boundary, out);
- //SAAJ's AttachmentPart.getContentId() returns content id already enclosed with
- //angle brackets. For now put angle bracket only if its not there
- String cid = att.getContentId();
- if(cid != null && cid.length() >0 && cid.charAt(0) != '<')
- cid = '<' + cid + '>';
- writeln("Content-Id:" + cid, out);
- writeln("Content-Type: " + att.getContentType(), out);
- writeCustomMimeHeaders(att, out);
- writeln("Content-Transfer-Encoding: binary", out);
- writeln(out); // write \r\n
- att.writeTo(out);
- writeln(out); // write \r\n
- }
- writeAsAscii("--"+boundary, out);
- writeAsAscii("--", out);
- }
- // TODO not returing correct multipart/related type(no boundary)
- return hasAttachments ? ctImpl : primaryCt;
- }
-
- private void writeCustomMimeHeaders(Attachment att, OutputStream out) throws IOException {
- if (att instanceof AttachmentEx) {
- Iterator<AttachmentEx.MimeHeader> allMimeHeaders = ((AttachmentEx) att).getMimeHeaders();
- while (allMimeHeaders.hasNext()) {
- AttachmentEx.MimeHeader mh = allMimeHeaders.next();
- String name = mh.getName();
-
- if (!"Content-Type".equalsIgnoreCase(name) && !"Content-Id".equalsIgnoreCase(name)) {
- writeln(name +": " + mh.getValue(), out);
- }
- }
- }
- }
-
- public ContentType getStaticContentType(Packet packet) {
- ContentType ct = (ContentType) packet.getInternalContentType();
- if ( ct != null ) return ct;
- Message msg = packet.getMessage();
- boolean hasAttachments = !msg.getAttachments().isEmpty();
- Codec rootCodec = getMimeRootCodec(packet);
-
- if (hasAttachments) {
- String boundary = "uuid:" + UUID.randomUUID().toString();
- String boundaryParameter = "boundary=\"" + boundary + "\"";
- // TODO use primaryEncoder to get type
- String messageContentType = MULTIPART_RELATED_MIME_TYPE +
- "; type=\"" + rootCodec.getMimeType() + "\"; " +
- boundaryParameter;
- ContentTypeImpl impl = new ContentTypeImpl(messageContentType, packet.soapAction, null);
- impl.setBoundary(boundary);
- impl.setBoundaryParameter(boundaryParameter);
- packet.setContentType(impl);
- return impl;
- } else {
- ct = rootCodec.getStaticContentType(packet);
- packet.setContentType(ct);
- return ct;
- }
- }
-
- /**
- * Copy constructor.
- */
- protected MimeCodec(MimeCodec that) {
- this.version = that.version;
- this.features = that.features;
- }
-
- public void decode(InputStream in, String contentType, Packet packet) throws IOException {
- MimeMultipartParser parser = new MimeMultipartParser(in, contentType, features.get(StreamingAttachmentFeature.class));
- decode(parser,packet);
- }
-
- public void decode(ReadableByteChannel in, String contentType, Packet packet) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Parses a {@link Packet} from a {@link MimeMultipartParser}.
- */
- protected abstract void decode(MimeMultipartParser mpp, Packet packet) throws IOException;
-
- public abstract MimeCodec copy();
-
-
- public static void writeln(String s,OutputStream out) throws IOException {
- writeAsAscii(s,out);
- writeln(out);
- }
-
- /**
- * Writes a string as ASCII string.
- */
- public static void writeAsAscii(String s,OutputStream out) throws IOException {
- int len = s.length();
- for( int i=0; i<len; i++ )
- out.write((byte)s.charAt(i));
- }
-
- public static void writeln(OutputStream out) throws IOException {
- out.write('\r');
- out.write('\n');
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeMultipartParser.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeMultipartParser.java
deleted file mode 100644
index ca0ee816..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeMultipartParser.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.encoding;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.message.AttachmentEx;
-import com.sun.xml.internal.ws.developer.StreamingAttachmentFeature;
-import com.sun.xml.internal.ws.developer.StreamingDataHandler;
-import com.sun.xml.internal.ws.util.ByteArrayBuffer;
-import com.sun.xml.internal.ws.util.ByteArrayDataSource;
-
-import com.sun.xml.internal.org.jvnet.mimepull.Header;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEMessage;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart;
-
-import javax.activation.DataHandler;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.WebServiceException;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Parses Mime multipart message into primary part and attachment parts. It
- * parses the stream lazily as and when required.
- *
- * @author Vivek Pandey
- * @author Jitendra Kotamraju
- */
-public final class MimeMultipartParser {
-
- private final String start;
- private final MIMEMessage message;
- private Attachment root;
- private ContentTypeImpl contentType;
-
- // Attachments without root part
- private final Map<String, Attachment> attachments = new HashMap<String, Attachment>();
-
- private boolean gotAll;
-
- public MimeMultipartParser(InputStream in, String cType, StreamingAttachmentFeature feature) {
- this.contentType = new ContentTypeImpl(cType);
-// ContentType ct = new ContentType(cType);
-// String boundary = ct.getParameter("boundary");
- String boundary = contentType.getBoundary();
- if (boundary == null || boundary.equals("")) {
- throw new WebServiceException("MIME boundary parameter not found" + contentType);
- }
- message = (feature != null)
- ? new MIMEMessage(in, boundary, feature.getConfig())
- : new MIMEMessage(in, boundary);
- // Strip <...> from root part's Content-ID
-// String st = ct.getParameter("start");
- String st = contentType.getRootId();
- if (st != null && st.length() > 2 && st.charAt(0) == '<' && st.charAt(st.length()-1) == '>') {
- st = st.substring(1, st.length()-1);
- }
- start = st;
- }
-
- /**
- * Parses the stream and returns the root part. If start parameter is
- * present in Content-Type, it is used to determine the root part, otherwise
- * root part is the first part.
- *
- * @return StreamAttachment for root part
- * null if root part cannot be found
- *
- */
- public @Nullable Attachment getRootPart() {
- if (root == null) {
- root = new PartAttachment((start != null) ? message.getPart(start) : message.getPart(0));
- }
- return root;
- }
-
- /**
- * Parses the entire stream and returns all MIME parts except root MIME part.
- *
- * @return Map<String, StreamAttachment> for all attachment parts
- */
- public @NotNull Map<String, Attachment> getAttachmentParts() {
- if (!gotAll) {
- MIMEPart rootPart = (start != null) ? message.getPart(start) : message.getPart(0);
- List<MIMEPart> parts = message.getAttachments();
- for(MIMEPart part : parts) {
- if (part != rootPart) {
- String cid = part.getContentId();
- if (!attachments.containsKey(cid)) {
- PartAttachment attach = new PartAttachment(part);
- attachments.put(attach.getContentId(), attach);
- }
- }
- }
- gotAll = true;
- }
- return attachments;
- }
-
- /**
- * This method can be called to get a matching MIME attachment part for the
- * given contentId. It parses the stream until it finds a matching part.
- *
- * @return StreamAttachment attachment for contentId
- * null if there is no attachment for contentId
- */
- public @Nullable Attachment getAttachmentPart(String contentId) throws IOException {
- //first see if this attachment is already parsed, if so return it
- Attachment attach = attachments.get(contentId);
- if (attach == null) {
- MIMEPart part = message.getPart(contentId);
- attach = new PartAttachment(part);
- attachments.put(contentId, attach);
- }
- return attach;
- }
-
- static class PartAttachment implements AttachmentEx {
-
- final MIMEPart part;
- byte[] buf;
- private StreamingDataHandler streamingDataHandler;
-
- PartAttachment(MIMEPart part) {
- this.part = part;
- }
-
- public @NotNull @Override String getContentId() {
- return part.getContentId();
- }
-
- public @NotNull @Override String getContentType() {
- return part.getContentType();
- }
-
- @Override
- public byte[] asByteArray() {
- if (buf == null) {
- ByteArrayBuffer baf = new ByteArrayBuffer();
- try {
- baf.write(part.readOnce());
- } catch(IOException ioe) {
- throw new WebServiceException(ioe);
- } finally {
- if (baf != null) {
- try {
- baf.close();
- } catch (IOException ex) {
- Logger.getLogger(MimeMultipartParser.class.getName()).log(Level.FINE, null, ex);
- }
- }
- }
- buf = baf.toByteArray();
- }
- return buf;
- }
-
- @Override
- public DataHandler asDataHandler() {
- if (streamingDataHandler == null) {
- streamingDataHandler = (buf != null)
- ? new DataSourceStreamingDataHandler(new ByteArrayDataSource(buf,getContentType()))
- : new MIMEPartStreamingDataHandler(part);
- }
- return streamingDataHandler;
- }
-
- @Override
- public Source asSource() {
- return (buf != null)
- ? new StreamSource(new ByteArrayInputStream(buf))
- : new StreamSource(part.read());
- }
-
- @Override
- public InputStream asInputStream() {
- return (buf != null)
- ? new ByteArrayInputStream(buf) : part.read();
- }
-
- @Override
- public void writeTo(OutputStream os) throws IOException {
- if (buf != null) {
- os.write(buf);
- } else {
- InputStream in = part.read();
- byte[] temp = new byte[8192];
- int len;
- while((len=in.read(temp)) != -1) {
- os.write(temp, 0, len);
- }
- in.close();
- }
- }
-
- @Override
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- saaj.createAttachmentPart().setDataHandler(asDataHandler());
- }
-
- // AttachmentEx methods begin here
- @Override
- public Iterator<MimeHeader> getMimeHeaders() {
- final Iterator<? extends Header> ih = part.getAllHeaders()
- .iterator();
- return new Iterator<MimeHeader>() {
- @Override
- public boolean hasNext() {
- return ih.hasNext();
- }
-
- @Override
- public MimeHeader next() {
- final Header hdr = ih.next();
- return new AttachmentEx.MimeHeader() {
- @Override
- public String getValue() {
- return hdr.getValue();
- }
- @Override
- public String getName() {
- return hdr.getName();
- }
- };
- }
-
- @Override
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
- }
-
- public ContentTypeImpl getContentType() {
- return contentType;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MtomCodec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MtomCodec.java
deleted file mode 100644
index 0db9233e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MtomCodec.java
+++ /dev/null
@@ -1,662 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.encoding;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.DatatypeConverterImpl;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.api.pipe.StreamSOAPCodec;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory;
-import com.sun.xml.internal.ws.developer.SerializationFeature;
-import com.sun.xml.internal.ws.developer.StreamingDataHandler;
-import com.sun.xml.internal.ws.message.MimeAttachmentSet;
-import com.sun.xml.internal.ws.streaming.XMLStreamWriterUtil;
-import com.sun.xml.internal.ws.util.ByteArrayDataSource;
-import com.sun.xml.internal.ws.util.xml.NamespaceContextExAdaper;
-import com.sun.xml.internal.ws.util.xml.XMLStreamReaderFilter;
-import com.sun.xml.internal.ws.util.xml.XMLStreamWriterFilter;
-import com.sun.xml.internal.ws.streaming.MtomStreamWriter;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.server.UnsupportedMediaException;
-import com.sun.xml.internal.org.jvnet.staxex.Base64Data;
-import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx;
-import com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx;
-import com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx;
-
-import javax.activation.DataHandler;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.soap.MTOMFeature;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.nio.channels.WritableByteChannel;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-/**
- * Mtom message Codec. It can be used even for non-soap message's mtom encoding.
- *
- * @author Vivek Pandey
- * @author Jitendra Kotamraju
- */
-public class MtomCodec extends MimeCodec {
-
- public static final String XOP_XML_MIME_TYPE = "application/xop+xml";
- public static final String XOP_LOCALNAME = "Include";
- public static final String XOP_NAMESPACEURI = "http://www.w3.org/2004/08/xop/include";
-
- private final StreamSOAPCodec codec;
- private final MTOMFeature mtomFeature;
- private final SerializationFeature sf;
- private final static String DECODED_MESSAGE_CHARSET = "decodedMessageCharset";
-
- MtomCodec(SOAPVersion version, StreamSOAPCodec codec, WSFeatureList features){
- super(version, features);
- this.codec = codec;
- sf = features.get(SerializationFeature.class);
- MTOMFeature mtom = features.get(MTOMFeature.class);
- if(mtom == null)
- this.mtomFeature = new MTOMFeature();
- else
- this.mtomFeature = mtom;
- }
-
- /**
- * Return the soap 1.1 and soap 1.2 specific XOP packaged ContentType
- *
- * @return A non-null content type for soap11 or soap 1.2 content type
- */
- @Override
- public ContentType getStaticContentType(Packet packet) {
- return getStaticContentTypeStatic(packet, version);
- }
-
- public static ContentType getStaticContentTypeStatic(Packet packet, SOAPVersion version) {
- ContentType ct = (ContentType) packet.getInternalContentType();
- if ( ct != null ) return ct;
-
- String uuid = UUID.randomUUID().toString();
- String boundary = "uuid:" + uuid;
- String rootId = "<rootpart*"+uuid+"@example.jaxws.sun.com>";
- String soapActionParameter = SOAPVersion.SOAP_11.equals(version) ? null : createActionParameter(packet);
-
- String boundaryParameter = "boundary=\"" + boundary +"\"";
- String messageContentType = MULTIPART_RELATED_MIME_TYPE +
- ";start=\""+rootId +"\"" +
- ";type=\"" + XOP_XML_MIME_TYPE + "\";" +
- boundaryParameter +
- ";start-info=\"" + version.contentType +
- (soapActionParameter == null? "" : soapActionParameter) +
- "\"";
-
- ContentTypeImpl ctImpl = SOAPVersion.SOAP_11.equals(version) ?
- new ContentTypeImpl(messageContentType, (packet.soapAction == null)?"":packet.soapAction, null) :
- new ContentTypeImpl(messageContentType, null, null);
- ctImpl.setBoundary(boundary);
- ctImpl.setRootId(rootId);
- packet.setContentType(ctImpl);
- return ctImpl;
- }
-
- private static String createActionParameter(Packet packet) {
- return packet.soapAction != null? ";action=\\\""+packet.soapAction+"\\\"" : "";
- }
-
- @Override
- public ContentType encode(Packet packet, OutputStream out) throws IOException {
- ContentTypeImpl ctImpl = (ContentTypeImpl) this.getStaticContentType(packet);
- String boundary = ctImpl.getBoundary();
- String rootId = ctImpl.getRootId();
-
- if(packet.getMessage() != null){
- try {
- String encoding = getPacketEncoding(packet);
- packet.invocationProperties.remove(DECODED_MESSAGE_CHARSET);
-
- String actionParameter = getActionParameter(packet, version);
- String soapXopContentType = getSOAPXopContentType(encoding, version, actionParameter);
-
- writeln("--"+boundary, out);
- writeMimeHeaders(soapXopContentType, rootId, out);
-
- //mtom attachments that need to be written after the root part
- List<ByteArrayBuffer> mtomAttachments = new ArrayList<ByteArrayBuffer>();
- MtomStreamWriterImpl writer = new MtomStreamWriterImpl(
- XMLStreamWriterFactory.create(out, encoding), mtomAttachments, boundary, mtomFeature);
-
- packet.getMessage().writeTo(writer);
- XMLStreamWriterFactory.recycle(writer);
- writeln(out);
-
- for(ByteArrayBuffer bos : mtomAttachments){
- bos.write(out);
- }
-
- // now write out the attachments in the message that weren't
- // previously written
- writeNonMtomAttachments(packet.getMessage().getAttachments(),
- out, boundary);
-
- //write out the end boundary
- writeAsAscii("--"+boundary, out);
- writeAsAscii("--", out);
-
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- }
- //now create the boundary for next encode() call
-// createConteTypeHeader();
- return ctImpl;
- }
-
- public static String getSOAPXopContentType(String encoding, SOAPVersion version,
- String actionParameter) {
- return XOP_XML_MIME_TYPE +";charset="+encoding+";type=\""+version.contentType+ actionParameter + "\"";
- }
-
- public static String getActionParameter(Packet packet, SOAPVersion version) {
- return (version == SOAPVersion.SOAP_11) ? "" : createActionParameter(packet);
- }
-
- public static class ByteArrayBuffer{
- final String contentId;
-
- private final DataHandler dh;
- private final String boundary;
-
- ByteArrayBuffer(@NotNull DataHandler dh, String b) {
- this.dh = dh;
- String cid = null;
- if (dh instanceof StreamingDataHandler) {
- StreamingDataHandler sdh = (StreamingDataHandler) dh;
- if (sdh.getHrefCid() != null)
- cid = sdh.getHrefCid();
- }
- this.contentId = cid != null ? cid : encodeCid();
- boundary = b;
- }
-
- public void write(OutputStream os) throws IOException {
- //build attachment frame
- writeln("--"+boundary, os);
- writeMimeHeaders(dh.getContentType(), contentId, os);
- dh.writeTo(os);
- writeln(os);
- }
- }
-
- public static void writeMimeHeaders(String contentType, String contentId, OutputStream out) throws IOException {
- String cid = contentId;
- if(cid != null && cid.length() >0 && cid.charAt(0) != '<')
- cid = '<' + cid + '>';
- writeln("Content-Id: " + cid, out);
- writeln("Content-Type: " + contentType, out);
- writeln("Content-Transfer-Encoding: binary", out);
- writeln(out);
- }
-
- // Compiler warning for not calling close, but cannot call close,
- // will consume attachment bytes.
- @SuppressWarnings("resource")
- private void writeNonMtomAttachments(AttachmentSet attachments,
- OutputStream out, String boundary) throws IOException {
-
- for (Attachment att : attachments) {
-
- DataHandler dh = att.asDataHandler();
- if (dh instanceof StreamingDataHandler) {
- StreamingDataHandler sdh = (StreamingDataHandler) dh;
- // If DataHandler has href Content-ID, it is MTOM, so skip.
- if (sdh.getHrefCid() != null)
- continue;
- }
-
- // build attachment frame
- writeln("--" + boundary, out);
- writeMimeHeaders(att.getContentType(), att.getContentId(), out);
- att.writeTo(out);
- writeln(out); // write \r\n
- }
- }
-
- @Override
- public ContentType encode(Packet packet, WritableByteChannel buffer) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public MtomCodec copy() {
- return new MtomCodec(version, (StreamSOAPCodec)codec.copy(), features);
- }
-
- private static String encodeCid(){
- String cid="example.jaxws.sun.com";
- String name = UUID.randomUUID()+"@";
- return name + cid;
- }
-
- @Override
- protected void decode(MimeMultipartParser mpp, Packet packet) throws IOException {
- //TODO shouldn't we check for SOAP1.1/SOAP1.2 and throw
- //TODO UnsupportedMediaException like StreamSOAPCodec
- String charset = null;
- String ct = mpp.getRootPart().getContentType();
- if (ct != null) {
- charset = new ContentTypeImpl(ct).getCharSet();
- }
- if (charset != null && !Charset.isSupported(charset)) {
- throw new UnsupportedMediaException(charset);
- }
-
- if (charset != null) {
- packet.invocationProperties.put(DECODED_MESSAGE_CHARSET, charset);
- } else {
- packet.invocationProperties.remove(DECODED_MESSAGE_CHARSET);
- }
-
- // we'd like to reuse those reader objects but unfortunately decoder may be reused
- // before the decoded message is completely used.
- XMLStreamReader mtomReader = new MtomXMLStreamReaderEx( mpp,
- XMLStreamReaderFactory.create(null, mpp.getRootPart().asInputStream(), charset, true)
- );
-
- packet.setMessage(codec.decode(mtomReader, new MimeAttachmentSet(mpp)));
- packet.setMtomFeature(mtomFeature);
- packet.setContentType(mpp.getContentType());
- }
-
- private String getPacketEncoding(Packet packet) {
- // If SerializationFeature is set, just use that encoding
- if (sf != null && sf.getEncoding() != null) {
- return sf.getEncoding().equals("") ? SOAPBindingCodec.DEFAULT_ENCODING : sf.getEncoding();
- }
- return determinePacketEncoding(packet);
- }
-
- public static String determinePacketEncoding(Packet packet) {
- if (packet != null && packet.endpoint != null) {
- // Use request message's encoding for Server-side response messages
- String charset = (String)packet.invocationProperties.get(DECODED_MESSAGE_CHARSET);
- return charset == null
- ? SOAPBindingCodec.DEFAULT_ENCODING : charset;
- }
-
- // Use default encoding for client-side request messages
- return SOAPBindingCodec.DEFAULT_ENCODING;
- }
-
- public static class MtomStreamWriterImpl extends XMLStreamWriterFilter implements XMLStreamWriterEx,
- MtomStreamWriter, HasEncoding {
- private final List<ByteArrayBuffer> mtomAttachments;
- private final String boundary;
- private final MTOMFeature myMtomFeature;
- public MtomStreamWriterImpl(XMLStreamWriter w, List<ByteArrayBuffer> mtomAttachments, String b, MTOMFeature myMtomFeature) {
- super(w);
- this.mtomAttachments = mtomAttachments;
- this.boundary = b;
- this.myMtomFeature = myMtomFeature;
- }
-
- @Override
- public void writeBinary(byte[] data, int start, int len, String contentType) throws XMLStreamException {
- //check threshold and if less write as base64encoded value
- if(myMtomFeature.getThreshold() > len){
- writeCharacters(DatatypeConverterImpl._printBase64Binary(data, start, len));
- return;
- }
- ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, start, len, contentType)), boundary);
- writeBinary(bab);
- }
-
- @Override
- public void writeBinary(DataHandler dataHandler) throws XMLStreamException {
- // TODO how do we check threshold and if less inline the data
- writeBinary(new ByteArrayBuffer(dataHandler, boundary));
- }
-
- @Override
- public OutputStream writeBinary(String contentType) throws XMLStreamException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void writePCDATA(CharSequence data) throws XMLStreamException {
- if(data == null)
- return;
- if(data instanceof Base64Data){
- Base64Data binaryData = (Base64Data)data;
- writeBinary(binaryData.getDataHandler());
- return;
- }
- writeCharacters(data.toString());
- }
-
- private void writeBinary(ByteArrayBuffer bab) {
- try {
- mtomAttachments.add(bab);
- String prefix = writer.getPrefix(XOP_NAMESPACEURI);
- if (prefix == null || !prefix.equals("xop")) {
- writer.setPrefix("xop", XOP_NAMESPACEURI);
- writer.writeNamespace("xop", XOP_NAMESPACEURI);
- }
- writer.writeStartElement(XOP_NAMESPACEURI, XOP_LOCALNAME);
- writer.writeAttribute("href", "cid:"+bab.contentId);
- writer.writeEndElement();
- writer.flush();
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- }
-
- @Override
- public Object getProperty(String name) throws IllegalArgumentException {
- // Hack for JDK6's SJSXP
- if (name.equals("sjsxp-outputstream") && writer instanceof Map) {
- Object obj = ((Map) writer).get("sjsxp-outputstream");
- if (obj != null) {
- return obj;
- }
- }
- return super.getProperty(name);
- }
-
- /**
- * JAXBMessage writes envelope directly to the OutputStream(for SJSXP, woodstox).
- * While writing, it calls the AttachmentMarshaller methods for adding attachments.
- * JAXB writes xop:Include in this case.
- */
- @Override
- public AttachmentMarshaller getAttachmentMarshaller() {
- return new AttachmentMarshaller() {
-
- @Override
- public String addMtomAttachment(DataHandler data, String elementNamespace, String elementLocalName) {
- // Should we do the threshold processing on DataHandler ? But that would be
- // expensive as DataHolder need to read the data again from its source
- ByteArrayBuffer bab = new ByteArrayBuffer(data, boundary);
- mtomAttachments.add(bab);
- return "cid:"+bab.contentId;
- }
-
- @Override
- public String addMtomAttachment(byte[] data, int offset, int length, String mimeType, String elementNamespace, String elementLocalName) {
- // inline the data based on the threshold
- if (myMtomFeature.getThreshold() > length) {
- return null; // JAXB inlines the attachment data
- }
- ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, offset, length, mimeType)), boundary);
- mtomAttachments.add(bab);
- return "cid:"+bab.contentId;
- }
-
- @Override
- public String addSwaRefAttachment(DataHandler data) {
- ByteArrayBuffer bab = new ByteArrayBuffer(data, boundary);
- mtomAttachments.add(bab);
- return "cid:"+bab.contentId;
- }
-
- @Override
- public boolean isXOPPackage() {
- return true;
- }
- };
- }
-
- public List<ByteArrayBuffer> getMtomAttachments() {
- return this.mtomAttachments;
- }
-
- @Override
- public String getEncoding() {
- return XMLStreamWriterUtil.getEncoding(writer);
- }
-
- private static class MtomNamespaceContextEx implements NamespaceContextEx {
- private final NamespaceContext nsContext;
-
- public MtomNamespaceContextEx(NamespaceContext nsContext) {
- this.nsContext = nsContext;
- }
-
- @Override
- public Iterator<Binding> iterator() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String getNamespaceURI(String prefix) {
- return nsContext.getNamespaceURI(prefix);
- }
-
- @Override
- public String getPrefix(String namespaceURI) {
- return nsContext.getPrefix(namespaceURI);
- }
-
- @Override
- public Iterator getPrefixes(String namespaceURI) {
- return nsContext.getPrefixes(namespaceURI);
- }
- }
-
- @Override
- public NamespaceContextEx getNamespaceContext() {
- NamespaceContext nsContext = writer.getNamespaceContext();
- return new MtomNamespaceContextEx(nsContext);
- }
- }
-
- public static class MtomXMLStreamReaderEx extends XMLStreamReaderFilter implements XMLStreamReaderEx {
- /**
- * The parser for the outer MIME 'shell'.
- */
- private final MimeMultipartParser mimeMP;
-
- private boolean xopReferencePresent = false;
- private Base64Data base64AttData;
-
- //To be used with #getTextCharacters
- private char[] base64EncodedText;
-
- private String xopHref;
-
- public MtomXMLStreamReaderEx(MimeMultipartParser mimeMP, XMLStreamReader reader) {
- super(reader);
- this.mimeMP = mimeMP;
- }
-
- @Override
- public CharSequence getPCDATA() throws XMLStreamException {
- if(xopReferencePresent){
- return base64AttData;
- }
- return reader.getText();
- }
-
- @Override
- public NamespaceContextEx getNamespaceContext() {
- return new NamespaceContextExAdaper(reader.getNamespaceContext());
- }
-
- @Override
- public String getElementTextTrim() throws XMLStreamException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public int getTextLength() {
- if (xopReferencePresent) {
- return base64AttData.length();
- }
- return reader.getTextLength();
- }
-
- @Override
- public int getTextStart() {
- if (xopReferencePresent) {
- return 0;
- }
- return reader.getTextStart();
- }
-
- @Override
- public int getEventType() {
- if(xopReferencePresent)
- return XMLStreamConstants.CHARACTERS;
- return super.getEventType();
- }
-
- @Override
- public int next() throws XMLStreamException {
- int event = reader.next();
- if (event == XMLStreamConstants.START_ELEMENT && reader.getLocalName().equals(XOP_LOCALNAME) && reader.getNamespaceURI().equals(XOP_NAMESPACEURI)) {
- //its xop reference, take the URI reference
- String href = reader.getAttributeValue(null, "href");
- try {
- xopHref = href;
- Attachment att = getAttachment(href);
- if(att != null){
- DataHandler dh = att.asDataHandler();
- if (dh instanceof StreamingDataHandler) {
- ((StreamingDataHandler)dh).setHrefCid(att.getContentId());
- }
- base64AttData = new Base64Data();
- base64AttData.set(dh);
- }
- xopReferencePresent = true;
- } catch (IOException e) {
- throw new WebServiceException(e);
- }
- //move to the </xop:Include>
- XMLStreamReaderUtil.nextElementContent(reader);
- return XMLStreamConstants.CHARACTERS;
- }
- if(xopReferencePresent){
- xopReferencePresent = false;
- base64EncodedText = null;
- xopHref = null;
- }
- return event;
- }
-
- private String decodeCid(String cid) {
- try {
- cid = URLDecoder.decode(cid, "utf-8");
- } catch (UnsupportedEncodingException e) {
- //on recceiving side lets not fail now, try to look for it
- }
- return cid;
- }
-
- private Attachment getAttachment(String cid) throws IOException {
- if (cid.startsWith("cid:"))
- cid = cid.substring(4, cid.length());
- if (cid.indexOf('%') != -1) {
- cid = decodeCid(cid);
- return mimeMP.getAttachmentPart(cid);
- }
- return mimeMP.getAttachmentPart(cid);
- }
-
- @Override
- public char[] getTextCharacters() {
- if (xopReferencePresent) {
- char[] chars = new char[base64AttData.length()];
- base64AttData.writeTo(chars, 0);
- return chars;
- }
- return reader.getTextCharacters();
- }
-
- @Override
- public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException {
- if(xopReferencePresent){
- if(target == null){
- throw new NullPointerException("target char array can't be null") ;
- }
-
- if(targetStart < 0 || length < 0 || sourceStart < 0 || targetStart >= target.length ||
- (targetStart + length ) > target.length) {
- throw new IndexOutOfBoundsException();
- }
-
- int textLength = base64AttData.length();
- if(sourceStart > textLength)
- throw new IndexOutOfBoundsException();
-
- if(base64EncodedText == null){
- base64EncodedText = new char[base64AttData.length()];
- base64AttData.writeTo(base64EncodedText, 0);
- }
-
- int copiedLength = Math.min(textLength - sourceStart, length);
- System.arraycopy(base64EncodedText, sourceStart , target, targetStart, copiedLength);
- return copiedLength;
- }
- return reader.getTextCharacters(sourceStart, target, targetStart, length);
- }
-
- @Override
- public String getText() {
- if (xopReferencePresent) {
- return base64AttData.toString();
- }
- return reader.getText();
- }
-
- protected boolean isXopReference() throws XMLStreamException {
- return xopReferencePresent;
- }
-
- protected String getXopHref() {
- return xopHref;
- }
-
- public MimeMultipartParser getMimeMultipartParser() {
- return mimeMP;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ParameterList.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ParameterList.java
deleted file mode 100644
index 68c61253..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ParameterList.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding;
-
-import javax.xml.ws.WebServiceException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * This class holds MIME parameters (attribute-value pairs).
- *
- * @version 1.10, 03/02/12
- * @author John Mani
- */
-
-final class ParameterList {
-
- private final Map<String, String> list;
-
- /**
- * Constructor that takes a parameter-list string. The String
- * is parsed and the parameters are collected and stored internally.
- * A ParseException is thrown if the parse fails.
- * Note that an empty parameter-list string is valid and will be
- * parsed into an empty ParameterList.
- *
- * @param s the parameter-list string.
- * @exception WebServiceException if the parse fails.
- */
- ParameterList(String s) {
- HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
- HeaderTokenizer.Token tk;
- int type;
- String name;
-
- list = new HashMap<String, String>();
- while (true) {
- tk = h.next();
- type = tk.getType();
-
- if (type == HeaderTokenizer.Token.EOF) // done
- return;
-
- if ((char)type == ';') {
- // expect parameter name
- tk = h.next();
- // tolerate trailing semicolon, even though it violates the spec
- if (tk.getType() == HeaderTokenizer.Token.EOF)
- return;
- // parameter name must be a MIME Atom
- if (tk.getType() != HeaderTokenizer.Token.ATOM)
- throw new WebServiceException();
- name = tk.getValue().toLowerCase();
-
- // expect '='
- tk = h.next();
- if ((char)tk.getType() != '=')
- throw new WebServiceException();
-
- // expect parameter value
- tk = h.next();
- type = tk.getType();
- // parameter value must be a MIME Atom or Quoted String
- if (type != HeaderTokenizer.Token.ATOM &&
- type != HeaderTokenizer.Token.QUOTEDSTRING)
- throw new WebServiceException();
-
- list.put(name, tk.getValue());
- } else
- throw new WebServiceException();
- }
- }
-
- /**
- * Return the number of parameters in this list.
- *
- * @return number of parameters.
- */
- int size() {
- return list.size();
- }
-
- /**
- * Returns the value of the specified parameter. Note that
- * parameter names are case-insensitive.
- *
- * @param name parameter name.
- * @return Value of the parameter. Returns
- * <code>null</code> if the parameter is not
- * present.
- */
- String get(String name) {
- return list.get(name.trim().toLowerCase());
- }
-
-
- /**
- * Return an enumeration of the names of all parameters in this
- * list.
- *
- * @return Enumeration of all parameter names in this list.
- */
- Iterator<String> getNames() {
- return list.keySet().iterator();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/RootOnlyCodec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/RootOnlyCodec.java
deleted file mode 100644
index 1d6ea0a0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/RootOnlyCodec.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.channels.ReadableByteChannel;
-
-/**
- * {@link Codec} that works only on the root part of the MIME/multipart.
- * It doesn't work on the attachment parts, so it takes {@link AttachmentSet}
- * as an argument and creates a corresponding {@link Message}. This enables
- * attachments to be parsed lazily by wrapping the mimepull parser into an
- * {@link AttachmentSet}
- *
- * @author Jitendra Kotamraju
- */
-public interface RootOnlyCodec extends Codec {
-
- /**
- * Reads root part bytes from {@link InputStream} and constructs a {@link Message}
- * along with the given attachments.
- *
- * @param in root part's data
- *
- * @param contentType root part's MIME content type (like "application/xml")
- *
- * @param packet the new created {@link Message} is set in this packet
- *
- * @param att attachments
- *
- * @throws IOException
- * if {@link InputStream} throws an exception.
- */
- void decode(@NotNull InputStream in, @NotNull String contentType, @NotNull Packet packet, @NotNull AttachmentSet att)
- throws IOException;
-
- /**
- *
- * @see #decode(InputStream, String, Packet, AttachmentSet)
- */
- void decode(@NotNull ReadableByteChannel in, @NotNull String contentType, @NotNull Packet packet, @NotNull AttachmentSet att);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SOAPBindingCodec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SOAPBindingCodec.java
deleted file mode 100644
index 706cff25..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SOAPBindingCodec.java
+++ /dev/null
@@ -1,484 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.encoding;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.api.client.SelectOptimalEncodingFeature;
-import com.sun.xml.internal.ws.api.fastinfoset.FastInfosetFeature;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.message.ExceptionHasMessage;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.Codecs;
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.api.pipe.StreamSOAPCodec;
-import com.sun.xml.internal.ws.client.ContentNegotiation;
-import com.sun.xml.internal.ws.protocol.soap.MessageCreationException;
-import com.sun.xml.internal.ws.resources.StreamingMessages;
-import com.sun.xml.internal.ws.server.UnsupportedMediaException;
-import static com.sun.xml.internal.ws.binding.WebServiceFeatureList.getSoapVersion;
-
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.soap.MTOMFeature;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.lang.reflect.Method;
-import java.nio.channels.ReadableByteChannel;
-import java.nio.channels.WritableByteChannel;
-//import java.util.StringTokenizer;
-
-/**
- * SOAP binding {@link Codec} that can handle MTOM, SwA, and SOAP messages
- * encoded using XML or Fast Infoset.
- *
- * <p>
- * This is used when we need to determine the encoding from what we received (for decoding)
- * and from configuration and {@link Message} contents (for encoding)
- *
- * <p>
- * TODO: Split this Codec into two, one that supports FI and one that does not.
- * Then further split the FI Codec into two, one for client and one for
- * server. This will simplify the logic and make it easier to understand/maintain.
- *
- * @author Vivek Pandey
- * @author Kohsuke Kawaguchi
- */
-public class SOAPBindingCodec extends MimeCodec implements com.sun.xml.internal.ws.api.pipe.SOAPBindingCodec {
-
- public static final String UTF8_ENCODING = "utf-8";
- public static final String DEFAULT_ENCODING = UTF8_ENCODING;
-
-
- /**
- * True if Fast Infoset functionality has been
- * configured to be disabled, or the Fast Infoset
- * runtime is not available.
- */
- private boolean isFastInfosetDisabled;
-
- /**
- * True if the Fast Infoset codec should be used for encoding.
- */
- private boolean useFastInfosetForEncoding;
-
- /**
- * True if the content negotiation property should
- * be ignored by the client. This will be used in
- * the case of Fast Infoset being configured to be
- * disabled or automatically selected.
- */
- private boolean ignoreContentNegotiationProperty;
-
- // The XML SOAP codec
- private final StreamSOAPCodec xmlSoapCodec;
-
- // The Fast Infoset SOAP codec
- private final Codec fiSoapCodec;
-
- // The XML MTOM codec
- private final MimeCodec xmlMtomCodec;
-
- // The XML SWA codec
- private final MimeCodec xmlSwaCodec;
-
- // The Fast Infoset SWA codec
- private final MimeCodec fiSwaCodec;
-
- /**
- * The XML SOAP MIME type
- */
- private final String xmlMimeType;
-
- /**
- * The Fast Infoset SOAP MIME type
- */
- private final String fiMimeType;
-
- /**
- * The Accept header for XML encodings
- */
- private final String xmlAccept;
-
- /**
- * The Accept header for Fast Infoset and XML encodings
- */
- private final String connegXmlAccept;
-
- public StreamSOAPCodec getXMLCodec() {
- return xmlSoapCodec;
- }
-
- private ContentTypeImpl setAcceptHeader(Packet p, ContentTypeImpl c) {
- String _accept;
- if (!ignoreContentNegotiationProperty && p.contentNegotiation != ContentNegotiation.none) {
- _accept = connegXmlAccept;
- } else {
- _accept = xmlAccept;
- }
- c.setAcceptHeader(_accept);
- return c;
- }
-
- public SOAPBindingCodec(WSFeatureList features) {
- this(features, Codecs.createSOAPEnvelopeXmlCodec(features));
- }
-
- public SOAPBindingCodec(WSFeatureList features, StreamSOAPCodec xmlSoapCodec) {
- super(getSoapVersion(features), features);
-
- this.xmlSoapCodec = xmlSoapCodec;
- xmlMimeType = xmlSoapCodec.getMimeType();
-
- xmlMtomCodec = new MtomCodec(version, xmlSoapCodec, features);
-
- xmlSwaCodec = new SwACodec(version, features, xmlSoapCodec);
-
- String clientAcceptedContentTypes = xmlSoapCodec.getMimeType() + ", " +
- xmlMtomCodec.getMimeType();
-
- WebServiceFeature fi = features.get(FastInfosetFeature.class);
- isFastInfosetDisabled = (fi != null && !fi.isEnabled());
- if (!isFastInfosetDisabled) {
- fiSoapCodec = getFICodec(xmlSoapCodec, version);
- if (fiSoapCodec != null) {
- fiMimeType = fiSoapCodec.getMimeType();
- fiSwaCodec = new SwACodec(version, features, fiSoapCodec);
- connegXmlAccept = fiMimeType + ", " + clientAcceptedContentTypes;
-
- /**
- * This feature will only be present on the client side.
- *
- * Fast Infoset is enabled on the client if the service
- * explicitly supports Fast Infoset.
- */
- WebServiceFeature select = features.get(SelectOptimalEncodingFeature.class);
- if (select != null) { // if the client FI feature is set - ignore negotiation property
- ignoreContentNegotiationProperty = true;
- if (select.isEnabled()) {
- // If the client's FI encoding feature is enabled, and server's is not disabled
- if (fi != null) { // if server's FI feature also enabled
- useFastInfosetForEncoding = true;
- }
-
- clientAcceptedContentTypes = connegXmlAccept;
- } else { // If client FI feature is disabled
- isFastInfosetDisabled = true;
- }
- }
- } else {
- // Fast Infoset could not be loaded by the runtime
- isFastInfosetDisabled = true;
- fiSwaCodec = null;
- fiMimeType = "";
- connegXmlAccept = clientAcceptedContentTypes;
- ignoreContentNegotiationProperty = true;
- }
- } else {
- // Fast Infoset is explicitly not supported by the service
- fiSoapCodec = fiSwaCodec = null;
- fiMimeType = "";
- connegXmlAccept = clientAcceptedContentTypes;
- ignoreContentNegotiationProperty = true;
- }
-
- xmlAccept = clientAcceptedContentTypes;
-
- if(getSoapVersion(features) == null)
- throw new WebServiceException("Expecting a SOAP binding but found ");
- }
-
- public String getMimeType() {
- return null;
- }
-
- public ContentType getStaticContentType(Packet packet) {
- ContentType toAdapt = getEncoder(packet).getStaticContentType(packet);
- return setAcceptHeader(packet, (ContentTypeImpl)toAdapt);
- }
-
- public ContentType encode(Packet packet, OutputStream out) throws IOException {
- preEncode(packet);
- ContentType ct = getEncoder(packet).encode(packet, out);
- ct = setAcceptHeader(packet, (ContentTypeImpl)ct);
- postEncode();
- return ct;
- }
-
- public ContentType encode(Packet packet, WritableByteChannel buffer) {
- preEncode(packet);
- ContentType ct = getEncoder(packet).encode(packet, buffer);
- ct = setAcceptHeader(packet, (ContentTypeImpl)ct);
- postEncode();
- return ct;
- }
-
- /**
- * Should be called before encode().
- * Set the state so that such state is used by encode process.
- */
- private void preEncode(Packet p) {
- }
-
- /**
- * Should be called after encode()
- * Reset the encoding state.
- */
- private void postEncode() {
- }
-
- /**
- * Should be called before decode().
- * Set the state so that such state is used by decode().
- */
- private void preDecode(Packet p) {
- if (p.contentNegotiation == null)
- useFastInfosetForEncoding = false;
- }
-
- /**
- * Should be called after decode().
- * Set the state so that such state is used by encode().
- */
- private void postDecode(Packet p) {
- p.setFastInfosetDisabled(isFastInfosetDisabled);
- if(features.isEnabled(MTOMFeature.class)) p.checkMtomAcceptable();
-// p.setMtomAcceptable( isMtomAcceptable(p.acceptableMimeTypes) );
- MTOMFeature mtomFeature = features.get(MTOMFeature.class);
- if (mtomFeature != null) {
- p.setMtomFeature(mtomFeature);
- }
- if (!useFastInfosetForEncoding) {
- useFastInfosetForEncoding = p.getFastInfosetAcceptable(fiMimeType);
-// useFastInfosetForEncoding = isFastInfosetAcceptable(p.acceptableMimeTypes);
- }
- }
-
- public void decode(InputStream in, String contentType, Packet packet) throws IOException {
- if (contentType == null) {
- contentType = xmlMimeType;
- }
- packet.setContentType(new ContentTypeImpl(contentType));
- preDecode(packet);
- try {
- if(isMultipartRelated(contentType))
- // parse the multipart portion and then decide whether it's MTOM or SwA
- super.decode(in, contentType, packet);
- else if(isFastInfoset(contentType)) {
- if (!ignoreContentNegotiationProperty && packet.contentNegotiation == ContentNegotiation.none)
- throw noFastInfosetForDecoding();
-
- useFastInfosetForEncoding = true;
- fiSoapCodec.decode(in, contentType, packet);
- } else
- xmlSoapCodec.decode(in, contentType, packet);
- } catch(RuntimeException we) {
- if (we instanceof ExceptionHasMessage || we instanceof UnsupportedMediaException) {
- throw we;
- } else {
- throw new MessageCreationException(version, we);
- }
- }
- postDecode(packet);
- }
-
- public void decode(ReadableByteChannel in, String contentType, Packet packet) {
- if (contentType == null) {
- throw new UnsupportedMediaException();
- }
-
- preDecode(packet);
- try {
- if(isMultipartRelated(contentType))
- super.decode(in, contentType, packet);
- else if(isFastInfoset(contentType)) {
- if (packet.contentNegotiation == ContentNegotiation.none)
- throw noFastInfosetForDecoding();
-
- useFastInfosetForEncoding = true;
- fiSoapCodec.decode(in, contentType, packet);
- } else
- xmlSoapCodec.decode(in, contentType, packet);
- } catch(RuntimeException we) {
- if (we instanceof ExceptionHasMessage || we instanceof UnsupportedMediaException) {
- throw we;
- } else {
- throw new MessageCreationException(version, we);
- }
- }
- postDecode(packet);
- }
-
- public SOAPBindingCodec copy() {
- return new SOAPBindingCodec(features, (StreamSOAPCodec)xmlSoapCodec.copy());
- }
-
- @Override
- protected void decode(MimeMultipartParser mpp, Packet packet) throws IOException {
- // is this SwA or XOP?
- final String rootContentType = mpp.getRootPart().getContentType();
- boolean isMTOM = isApplicationXopXml(rootContentType);
- packet.setMtomRequest(isMTOM);
- if(isMTOM) {
- xmlMtomCodec.decode(mpp,packet);
- } else if (isFastInfoset(rootContentType)) {
- if (packet.contentNegotiation == ContentNegotiation.none)
- throw noFastInfosetForDecoding();
-
- useFastInfosetForEncoding = true;
- fiSwaCodec.decode(mpp,packet);
- } else if (isXml(rootContentType))
- xmlSwaCodec.decode(mpp,packet);
- else {
- // TODO localize exception
- throw new IOException("");
- }
-// checkDuplicateKnownHeaders(packet);
- }
-
- private boolean isMultipartRelated(String contentType) {
- return compareStrings(contentType, MimeCodec.MULTIPART_RELATED_MIME_TYPE);
- }
-
- private boolean isApplicationXopXml(String contentType) {
- return compareStrings(contentType, MtomCodec.XOP_XML_MIME_TYPE);
- }
-
- private boolean isXml(String contentType) {
- return compareStrings(contentType, xmlMimeType);
- }
-
- private boolean isFastInfoset(String contentType) {
- if (isFastInfosetDisabled) return false;
-
- return compareStrings(contentType, fiMimeType);
- }
-
- private boolean compareStrings(String a, String b) {
- return a.length() >= b.length() &&
- b.equalsIgnoreCase(
- a.substring(0,
- b.length()));
- }
-
-// private boolean isFastInfosetAcceptable(String accept) {
-// if (accept == null || isFastInfosetDisabled) return false;
-//
-// StringTokenizer st = new StringTokenizer(accept, ",");
-// while (st.hasMoreTokens()) {
-// final String token = st.nextToken().trim();
-// if (token.equalsIgnoreCase(fiMimeType)) {
-// return true;
-// }
-// }
-// return false;
-// }
-
- /*
- * Just check if the Accept header contains application/xop+xml,
- * no need to worry about q values.
- */
-// private boolean isMtomAcceptable(String accept) {
-// if (accept == null || isFastInfosetDisabled) return false;
-// StringTokenizer st = new StringTokenizer(accept, ",");
-// while (st.hasMoreTokens()) {
-// final String token = st.nextToken().trim();
-// if (token.toLowerCase().contains(MtomCodec.XOP_XML_MIME_TYPE)) {
-// return true;
-// }
-// }
-// return false;
-// }
-
- /**
- * Determines the encoding codec.
- */
- private Codec getEncoder(Packet p) {
- /**
- * The following logic is only for outbound packets
- * to be encoded by a client.
- * For a server the p.contentNegotiation == null.
- */
- if (!ignoreContentNegotiationProperty) {
- if (p.contentNegotiation == ContentNegotiation.none) {
- // The client may have changed the negotiation property from
- // pessismistic to none between invocations
- useFastInfosetForEncoding = false;
- } else if (p.contentNegotiation == ContentNegotiation.optimistic) {
- // Always encode using Fast Infoset if in optimisitic mode
- useFastInfosetForEncoding = true;
- }
- }
-
- // Override the MTOM binding for now
- // Note: Using FI with MTOM does not make sense
- if (useFastInfosetForEncoding) {
- final Message m = p.getMessage();
- if(m==null || m.getAttachments().isEmpty() || features.isEnabled(MTOMFeature.class))
- return fiSoapCodec;
- else
- return fiSwaCodec;
- }
-
- //If the packet does not have a binding, explicitly set the MTOMFeature
- //on the packet so that it has a way to determine whether to use MTOM
- if (p.getBinding() == null) {
- if (features != null) {
- p.setMtomFeature(features.get(MTOMFeature.class));
- }
- }
-
- if (p.shouldUseMtom()) {
- return xmlMtomCodec;
- }
-
- Message m = p.getMessage();
- if(m==null || m.getAttachments().isEmpty())
- return xmlSoapCodec;
- else
- return xmlSwaCodec;
- }
-
- private RuntimeException noFastInfosetForDecoding() {
- return new RuntimeException(StreamingMessages.FASTINFOSET_DECODING_NOT_ACCEPTED());
- }
-
- /**
- * Obtain an FI SOAP codec instance using reflection.
- */
- private static Codec getFICodec(StreamSOAPCodec soapCodec, SOAPVersion version) {
- try {
- Class c = Class.forName("com.sun.xml.internal.ws.encoding.fastinfoset.FastInfosetStreamSOAPCodec");
- Method m = c.getMethod("create", StreamSOAPCodec.class, SOAPVersion.class);
- return (Codec)m.invoke(null, soapCodec, version);
- } catch (Exception e) {
- // TODO Log that FI cannot be loaded
- return null;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP11Codec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP11Codec.java
deleted file mode 100644
index d267cab3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP11Codec.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.encoding;
-
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.message.stream.StreamHeader11;
-
-import javax.xml.stream.XMLStreamReader;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * {@link StreamSOAPCodec} for SOAP 1.1.
- *
- * @author Paul.Sandoz@Sun.Com
- */
-final class StreamSOAP11Codec extends StreamSOAPCodec {
-
- public static final String SOAP11_MIME_TYPE = "text/xml";
- public static final String DEFAULT_SOAP11_CONTENT_TYPE =
- SOAP11_MIME_TYPE+"; charset="+SOAPBindingCodec.DEFAULT_ENCODING;
-
- private static final List<String> EXPECTED_CONTENT_TYPES = Collections.singletonList(SOAP11_MIME_TYPE);
-
- /*package*/ StreamSOAP11Codec() {
- super(SOAPVersion.SOAP_11);
- }
-
- /*package*/ StreamSOAP11Codec(WSBinding binding) {
- super(binding);
- }
-
- /*package*/ StreamSOAP11Codec(WSFeatureList features) {
- super(features);
- }
-
- public String getMimeType() {
- return SOAP11_MIME_TYPE;
- }
-
- @Override
- protected ContentType getContentType(Packet packet) {
- ContentTypeImpl.Builder b = getContenTypeBuilder(packet);
- b.soapAction = packet.soapAction;
- return b.build();
- }
-
- @Override
- protected String getDefaultContentType() {
- return DEFAULT_SOAP11_CONTENT_TYPE;
- }
-
- protected List<String> getExpectedContentTypes() {
- return EXPECTED_CONTENT_TYPES;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP12Codec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP12Codec.java
deleted file mode 100644
index 4e84fd74..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP12Codec.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.encoding;
-
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.message.stream.StreamHeader12;
-
-import javax.xml.stream.XMLStreamReader;
-import java.util.Collections;
-import java.util.List;
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * {@link StreamSOAPCodec} for SOAP 1.2.
- *
- * @author Paul.Sandoz@Sun.Com
- */
-final class StreamSOAP12Codec extends StreamSOAPCodec {
-
- public static final String SOAP12_MIME_TYPE = "application/soap+xml";
- public static final String DEFAULT_SOAP12_CONTENT_TYPE =
- SOAP12_MIME_TYPE+"; charset="+SOAPBindingCodec.DEFAULT_ENCODING;
- private static final List<String> EXPECTED_CONTENT_TYPES = Collections.singletonList(SOAP12_MIME_TYPE);
-
- /*package*/ StreamSOAP12Codec() {
- super(SOAPVersion.SOAP_12);
- }
-
- /*package*/ StreamSOAP12Codec(WSBinding binding) {
- super(binding);
- }
-
- /*package*/ StreamSOAP12Codec(WSFeatureList features) {
- super(features);
- }
-
- public String getMimeType() {
- return SOAP12_MIME_TYPE;
- }
-
- @Override
- protected ContentType getContentType(Packet packet) {
- ContentTypeImpl.Builder b = getContenTypeBuilder(packet);
- // TODO: set accept header
- if (packet.soapAction == null) {
- return b.build();
- } else {
- b.contentType = b.contentType + ";action="+fixQuotesAroundSoapAction(packet.soapAction);
- return b.build();
- }
- }
-
- @Override
- public void decode(InputStream in, String contentType, Packet packet, AttachmentSet att ) throws IOException {
- com.sun.xml.internal.ws.encoding.ContentType ct = new com.sun.xml.internal.ws.encoding.ContentType(contentType);
- packet.soapAction = fixQuotesAroundSoapAction(ct.getParameter("action"));
- super.decode(in,contentType,packet,att);
- }
-
- private String fixQuotesAroundSoapAction(String soapAction) {
- if(soapAction != null && (!soapAction.startsWith("\"") || !soapAction.endsWith("\"")) ) {
- String fixedSoapAction = soapAction;
- if(!soapAction.startsWith("\""))
- fixedSoapAction = "\"" + fixedSoapAction;
- if(!soapAction.endsWith("\""))
- fixedSoapAction = fixedSoapAction + "\"";
- return fixedSoapAction;
- }
- return soapAction;
- }
-
- protected List<String> getExpectedContentTypes() {
- return EXPECTED_CONTENT_TYPES;
- }
-
- @Override
- protected String getDefaultContentType() {
- return DEFAULT_SOAP12_CONTENT_TYPE;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAPCodec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAPCodec.java
deleted file mode 100644
index 4edafad8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAPCodec.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.encoding;
-
-import static com.sun.xml.internal.ws.binding.WebServiceFeatureList.getSoapVersion;
-
-import com.oracle.webservices.internal.impl.encoding.StreamDecoderImpl;
-import com.oracle.webservices.internal.impl.internalspi.encoding.StreamDecoder;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferMark;
-import com.sun.xml.internal.stream.buffer.stax.StreamReaderBufferCreator;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.HeaderList;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory;
-import com.sun.xml.internal.ws.developer.SerializationFeature;
-import com.sun.xml.internal.ws.message.AttachmentSetImpl;
-import com.sun.xml.internal.ws.message.stream.StreamMessage;
-import com.sun.xml.internal.ws.protocol.soap.VersionMismatchException;
-import com.sun.xml.internal.ws.server.UnsupportedMediaException;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.ws.WebServiceException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.channels.ReadableByteChannel;
-import java.nio.channels.WritableByteChannel;
-import java.nio.charset.Charset;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * A stream SOAP codec.
- *
- * @author Paul Sandoz
- */
-@SuppressWarnings({"StringEquality"})
-public abstract class StreamSOAPCodec implements com.sun.xml.internal.ws.api.pipe.StreamSOAPCodec, RootOnlyCodec {
-
- private static final String SOAP_ENVELOPE = "Envelope";
- private static final String SOAP_HEADER = "Header";
- private static final String SOAP_BODY = "Body";
-
- private final SOAPVersion soapVersion;
- protected final SerializationFeature serializationFeature;
-
- private final StreamDecoder streamDecoder;
-
- // charset of last decoded message. Will be used for encoding server's
- // response messages with the request message's encoding
- // it will stored in the packet.invocationProperties
- private final static String DECODED_MESSAGE_CHARSET = "decodedMessageCharset";
-
- /*package*/ StreamSOAPCodec(SOAPVersion soapVersion) {
- this(soapVersion, null);
- }
-
- /*package*/ StreamSOAPCodec(WSBinding binding) {
- this(binding.getSOAPVersion(), binding.getFeature(SerializationFeature.class));
- }
-
- StreamSOAPCodec(WSFeatureList features) {
- this(getSoapVersion(features), features.get(SerializationFeature.class));
- }
-
- private StreamSOAPCodec(SOAPVersion soapVersion, @Nullable SerializationFeature sf) {
- this.soapVersion = soapVersion;
- this.serializationFeature = sf;
- this.streamDecoder = selectStreamDecoder();
- }
-
- private StreamDecoder selectStreamDecoder() {
- for (StreamDecoder sd : ServiceFinder.find(StreamDecoder.class)) {
- return sd;
- }
-
- return new StreamDecoderImpl();
- }
-
- public ContentType getStaticContentType(Packet packet) {
- return getContentType(packet);
- }
-
- public ContentType encode(Packet packet, OutputStream out) {
- if (packet.getMessage() != null) {
- String encoding = getPacketEncoding(packet);
- packet.invocationProperties.remove(DECODED_MESSAGE_CHARSET);
- XMLStreamWriter writer = XMLStreamWriterFactory.create(out, encoding);
- try {
- packet.getMessage().writeTo(writer);
- writer.flush();
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- XMLStreamWriterFactory.recycle(writer);
- }
- return getContentType(packet);
- }
-
- protected abstract ContentType getContentType(Packet packet);
-
- protected abstract String getDefaultContentType();
-
- public ContentType encode(Packet packet, WritableByteChannel buffer) {
- //TODO: not yet implemented
- throw new UnsupportedOperationException();
- }
-
- protected abstract List<String> getExpectedContentTypes();
-
- public void decode(InputStream in, String contentType, Packet packet) throws IOException {
- decode(in, contentType, packet, new AttachmentSetImpl());
- }
-
- /*
- * Checks against expected Content-Type headers that is handled by a codec
- *
- * @param ct the Content-Type of the request
- * @param expected expected Content-Types for a codec
- * @return true if the codec supports this Content-Type
- * false otherwise
- */
- private static boolean isContentTypeSupported(String ct, List<String> expected) {
- for(String contentType : expected) {
- if (ct.contains(contentType)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Decodes a message from {@link XMLStreamReader} that points to
- * the beginning of a SOAP infoset.
- *
- * @param reader
- * can point to the start document or the start element.
- */
- public final @NotNull Message decode(@NotNull XMLStreamReader reader) {
- return decode(reader,new AttachmentSetImpl());
- }
-
- /**
- * Decodes a message from {@link XMLStreamReader} that points to
- * the beginning of a SOAP infoset.
- *
- * @param reader
- * can point to the start document or the start element.
- * @param attachmentSet
- * {@link StreamSOAPCodec} can take attachments parsed outside,
- * so that this codec can be used as a part of a biggre codec
- * (like MIME multipart codec.)
- */
- public final Message decode(XMLStreamReader reader, @NotNull AttachmentSet attachmentSet) {
- return decode(soapVersion, reader, attachmentSet);
- }
-
- public static final Message decode(SOAPVersion soapVersion, XMLStreamReader reader, @NotNull AttachmentSet attachmentSet) {
- // Move to soap:Envelope and verify
- if(reader.getEventType()!=XMLStreamConstants.START_ELEMENT)
- XMLStreamReaderUtil.nextElementContent(reader);
- XMLStreamReaderUtil.verifyReaderState(reader,XMLStreamConstants.START_ELEMENT);
- if (SOAP_ENVELOPE.equals(reader.getLocalName()) && !soapVersion.nsUri.equals(reader.getNamespaceURI())) {
- throw new VersionMismatchException(soapVersion, soapVersion.nsUri, reader.getNamespaceURI());
- }
- XMLStreamReaderUtil.verifyTag(reader, soapVersion.nsUri, SOAP_ENVELOPE);
- return new StreamMessage(soapVersion, reader, attachmentSet);
- }
-
- public void decode(ReadableByteChannel in, String contentType, Packet packet ) {
- throw new UnsupportedOperationException();
- }
-
- public final StreamSOAPCodec copy() {
- return this;
- }
-
- public void decode(InputStream in, String contentType, Packet packet, AttachmentSet att ) throws IOException {
- List<String> expectedContentTypes = getExpectedContentTypes();
- if (contentType != null && !isContentTypeSupported(contentType,expectedContentTypes)) {
- throw new UnsupportedMediaException(contentType, expectedContentTypes);
- }
- com.oracle.webservices.internal.api.message.ContentType pct = packet.getInternalContentType();
- ContentTypeImpl cti = (pct != null && pct instanceof ContentTypeImpl) ?
- (ContentTypeImpl)pct : new ContentTypeImpl(contentType);
- String charset = cti.getCharSet();
- if (charset != null && !Charset.isSupported(charset)) {
- throw new UnsupportedMediaException(charset);
- }
- if (charset != null) {
- packet.invocationProperties.put(DECODED_MESSAGE_CHARSET, charset);
- } else {
- packet.invocationProperties.remove(DECODED_MESSAGE_CHARSET);
- }
- packet.setMessage(streamDecoder.decode(in, charset, att, soapVersion));
- }
-
- public void decode(ReadableByteChannel in, String contentType, Packet response, AttachmentSet att ) {
- throw new UnsupportedOperationException();
- }
-
- /*
- * Creates a new {@link StreamSOAPCodec} instance.
- */
- public static StreamSOAPCodec create(SOAPVersion version) {
- if(version==null)
- // this decoder is for SOAP, not for XML/HTTP
- throw new IllegalArgumentException();
- switch(version) {
- case SOAP_11:
- return new StreamSOAP11Codec();
- case SOAP_12:
- return new StreamSOAP12Codec();
- default:
- throw new AssertionError();
- }
- }
-
- /*
- * Creates a new {@link StreamSOAPCodec} instance using binding
- */
- public static StreamSOAPCodec create(WSFeatureList features) {
- SOAPVersion version = getSoapVersion(features);
- if(version==null)
- // this decoder is for SOAP, not for XML/HTTP
- throw new IllegalArgumentException();
- switch(version) {
- case SOAP_11:
- return new StreamSOAP11Codec(features);
- case SOAP_12:
- return new StreamSOAP12Codec(features);
- default:
- throw new AssertionError();
- }
- }
-
- /**
- * Creates a new {@link StreamSOAPCodec} instance using binding
- *
- * @deprecated use {@link #create(WSFeatureList)}
- */
- public static StreamSOAPCodec create(WSBinding binding) {
- SOAPVersion version = binding.getSOAPVersion();
- if(version==null)
- // this decoder is for SOAP, not for XML/HTTP
- throw new IllegalArgumentException();
- switch(version) {
- case SOAP_11:
- return new StreamSOAP11Codec(binding);
- case SOAP_12:
- return new StreamSOAP12Codec(binding);
- default:
- throw new AssertionError();
- }
- }
-
- private String getPacketEncoding(Packet packet) {
- // If SerializationFeature is set, just use that encoding
- if (serializationFeature != null && serializationFeature.getEncoding() != null) {
- return serializationFeature.getEncoding().equals("")
- ? SOAPBindingCodec.DEFAULT_ENCODING : serializationFeature.getEncoding();
- }
-
- if (packet != null && packet.endpoint != null) {
- // Use request message's encoding for Server-side response messages
- String charset = (String)packet.invocationProperties.get(DECODED_MESSAGE_CHARSET);
- return charset == null
- ? SOAPBindingCodec.DEFAULT_ENCODING : charset;
- }
-
- // Use default encoding for client-side request messages
- return SOAPBindingCodec.DEFAULT_ENCODING;
- }
-
- protected ContentTypeImpl.Builder getContenTypeBuilder(Packet packet) {
- ContentTypeImpl.Builder b = new ContentTypeImpl.Builder();
- String encoding = getPacketEncoding(packet);
- if (SOAPBindingCodec.DEFAULT_ENCODING.equalsIgnoreCase(encoding)) {
- b.contentType = getDefaultContentType();
- b.charset = SOAPBindingCodec.DEFAULT_ENCODING;
- return b;
- }
- b.contentType = getMimeType()+" ;charset="+encoding;
- b.charset = encoding;
- return b;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StringDataContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StringDataContentHandler.java
deleted file mode 100644
index d0e1f243..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StringDataContentHandler.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding;
-
-import javax.activation.ActivationDataFlavor;
-import javax.activation.DataSource;
-import javax.activation.DataContentHandler;
-import java.awt.datatransfer.DataFlavor;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.nio.charset.Charset;
-
-/**
- * JavaMail's data content handler for text/plain -->String
- */
-public class StringDataContentHandler implements DataContentHandler {
- private static final ActivationDataFlavor myDF = new ActivationDataFlavor(
- java.lang.String.class, "text/plain", "Text String");
-
- protected ActivationDataFlavor getDF() {
- return myDF;
- }
-
- /**
- * Return the DataFlavors for this <code>DataContentHandler</code>.
- *
- * @return The DataFlavors
- */
- public DataFlavor[] getTransferDataFlavors() {
- return new DataFlavor[]{getDF()};
- }
-
- /**
- * Return the Transfer Data of type DataFlavor from InputStream.
- *
- * @param df The DataFlavor
- * @param ds The DataSource corresponding to the data
- * @return String object
- */
- public Object getTransferData(DataFlavor df, DataSource ds)
- throws IOException {
- // use myDF.equals to be sure to get ActivationDataFlavor.equals,
- // which properly ignores Content-Type parameters in comparison
- if (getDF().equals(df))
- return getContent(ds);
- else
- return null;
- }
-
- public Object getContent(DataSource ds) throws IOException {
- String enc = null;
- InputStreamReader is;
-
- try {
- enc = getCharset(ds.getContentType());
- is = new InputStreamReader(ds.getInputStream(), enc);
- } catch (IllegalArgumentException iex) {
- /*
- * An unknown charset of the form ISO-XXX-XXX will cause
- * the JDK to throw an IllegalArgumentException. The
- * JDK will attempt to create a classname using this string,
- * but valid classnames must not contain the character '-',
- * and this results in an IllegalArgumentException, rather than
- * the expected UnsupportedEncodingException. Yikes.
- */
- throw new UnsupportedEncodingException(enc);
- }
-
- try {
- int pos = 0;
- int count;
- char buf[] = new char[1024];
-
- while ((count = is.read(buf, pos, buf.length - pos)) != -1) {
- pos += count;
- if (pos >= buf.length) {
- int size = buf.length;
- if (size < 256 * 1024)
- size += size;
- else
- size += 256 * 1024;
- char tbuf[] = new char[size];
- System.arraycopy(buf, 0, tbuf, 0, pos);
- buf = tbuf;
- }
- }
- return new String(buf, 0, pos);
- } finally {
- try {
- is.close();
- } catch (IOException ex) {
- // not much can be done
- }
- }
- }
-
- /**
- * Write the object to the output stream, using the specified MIME type.
- */
- public void writeTo(Object obj, String type, OutputStream os)
- throws IOException {
- if (!(obj instanceof String))
- throw new IOException("\"" + getDF().getMimeType() +
- "\" DataContentHandler requires String object, " +
- "was given object of type " + obj.getClass().toString());
-
- String enc = null;
- OutputStreamWriter osw;
-
- try {
- enc = getCharset(type);
- osw = new OutputStreamWriter(os, enc);
- } catch (IllegalArgumentException iex) {
- /*
- * An unknown charset of the form ISO-XXX-XXX will cause
- * the JDK to throw an IllegalArgumentException. The
- * JDK will attempt to create a classname using this string,
- * but valid classnames must not contain the character '-',
- * and this results in an IllegalArgumentException, rather than
- * the expected UnsupportedEncodingException. Yikes.
- */
- throw new UnsupportedEncodingException(enc);
- }
-
- String s = (String) obj;
- osw.write(s, 0, s.length());
- osw.flush();
- }
-
- private String getCharset(String type) {
- try {
- ContentType ct = new ContentType(type);
- String charset = ct.getParameter("charset");
- if (charset == null)
- // If the charset parameter is absent, use US-ASCII.
- charset = "us-ascii";
-
- return Charset.forName(charset).name();
- //return MimeUtility.javaCharset(charset);
- } catch (Exception ex) {
- return null;
- }
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SwACodec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SwACodec.java
deleted file mode 100644
index 99125ed2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SwACodec.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.message.MimeAttachmentSet;
-
-import java.io.IOException;
-import java.nio.channels.WritableByteChannel;
-import java.util.Map;
-
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * {@link Codec} that uses MIME/multipart as the base format.
- *
- * @author Jitendra Kotamraju
- */
-public final class SwACodec extends MimeCodec {
-
- public SwACodec(SOAPVersion version, WSFeatureList f, Codec rootCodec) {
- super(version, f);
- this.mimeRootCodec = rootCodec;
- }
-
- private SwACodec(SwACodec that) {
- super(that);
- this.mimeRootCodec = that.mimeRootCodec.copy();
- }
-
- @Override
- protected void decode(MimeMultipartParser mpp, Packet packet) throws IOException {
- // TODO: handle attachments correctly
- Attachment root = mpp.getRootPart();
- Codec rootCodec = getMimeRootCodec(packet);
- if (rootCodec instanceof RootOnlyCodec) {
- ((RootOnlyCodec)rootCodec).decode(root.asInputStream(),root.getContentType(),packet, new MimeAttachmentSet(mpp));
- } else {
- rootCodec.decode(root.asInputStream(),root.getContentType(),packet);
- Map<String, Attachment> atts = mpp.getAttachmentParts();
- for(Map.Entry<String, Attachment> att : atts.entrySet()) {
- packet.getMessage().getAttachments().add(att.getValue());
- }
- }
- }
-
- public ContentType encode(Packet packet, WritableByteChannel buffer) {
- //TODO: not yet implemented
- throw new UnsupportedOperationException();
- }
-
- public SwACodec copy() {
- return new SwACodec(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/TagInfoset.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/TagInfoset.java
deleted file mode 100644
index 9eb66a30..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/TagInfoset.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.encoding;
-
-import java.util.List;
-
-import org.xml.sax.helpers.AttributesImpl;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.stream.XMLStreamException;
-
-import com.sun.xml.internal.ws.message.stream.StreamMessage;
-import com.sun.xml.internal.ws.encoding.StreamSOAPCodec;
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.NotNull;
-
-/**
- * Complete infoset about a start tag.
- *
- * <p>
- * This is used between {@link StreamMessage} and {@link StreamSOAPCodec}
- * to capture the infoset of the s:Envelope, s:Header, and s:Body elements.
- *
- *
- * <h3>Design Note</h3>
- * <p>
- * Since StAX and SAX uses different null vs empty string convention, one has
- * to choose which format we store things. It can go either way, but I'm assuming
- * that we'll be using StAX more in JAX-WS, so things are kept in the StAX style
- * in this class.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class TagInfoset {
- /**
- * Namespace declarations on this tag. Read-only.
- *
- * This is an array of the even length of the form { prefix0, uri0, prefix1, uri1, ... }.
- *
- * URIs/prefixes can be null (StAX-style)
- */
- public final @NotNull String[] ns;
- /**
- * Attributes on this tag. Read-only.
- */
- public final @NotNull AttributesImpl atts;
-
- /**
- * Prefix of the start tag in stax-style.
- */
- public final @Nullable String prefix;
-
- /**
- * Namespace URI of the start tag in stax-style.
- */
- public final @Nullable String nsUri;
-
- /**
- * Local name of the start tag.
- */
- public final @NotNull String localName;
-
- /**
- * Lazily computed QName (i.e., "foo:bar")
- */
- private @Nullable String qname;
-
- public TagInfoset(String nsUri, String localName, String prefix, AttributesImpl atts, String... ns) {
- this.nsUri = nsUri;
- this.prefix = prefix;
- this.localName = localName;
- this.atts = atts;
- this.ns = ns;
- }
-
- /**
- * Fills a {@link TagInfoset} object by the current element
- * that the reader points to.
- */
- public TagInfoset(XMLStreamReader reader) {
- prefix = reader.getPrefix();
- nsUri = reader.getNamespaceURI();
- localName = reader.getLocalName();
-
- int nsc = reader.getNamespaceCount();
- if(nsc>0) {
- ns = new String[nsc*2];
- for(int i=0; i<nsc; i++){
- ns[i*2 ] = fixNull(reader.getNamespacePrefix(i));
- ns[i*2+1] = fixNull(reader.getNamespaceURI(i));
- }
- } else {
- ns = EMPTY_ARRAY;
- }
-
- int ac = reader.getAttributeCount();
- if(ac>0) {
- atts = new AttributesImpl();
- StringBuilder sb = new StringBuilder();
- for(int i=0; i< ac;i++){
- sb.setLength(0);
- String prefix = reader.getAttributePrefix(i);
- String localName = reader.getAttributeLocalName(i);
-
- String qname;
- if(prefix != null && prefix.length()!=0){
- sb.append(prefix);
- sb.append(":");
- sb.append(localName);
- qname = sb.toString();
- } else {
- qname = localName;
- }
-
- atts.addAttribute(
- fixNull(reader.getAttributeNamespace(i)),
- localName,
- qname,
- reader.getAttributeType(i),
- reader.getAttributeValue(i));
- }
- } else {
- atts = EMPTY_ATTRIBUTES;
- }
- }
-
- /**
- * Writes the start element event.
- */
- public void writeStart(ContentHandler contentHandler) throws SAXException {
- for( int i=0; i<ns.length; i+=2 )
- contentHandler.startPrefixMapping(fixNull(ns[i]),fixNull(ns[i+1]));
- contentHandler.startElement(fixNull(nsUri), localName ,getQName(), atts);
- }
-
- /**
- * Writes the end element event.
- */
- public void writeEnd(ContentHandler contentHandler) throws SAXException{
- contentHandler.endElement(fixNull(nsUri),localName,getQName());
- for( int i=ns.length-2; i>=0; i-=2 ) {
- contentHandler.endPrefixMapping(fixNull(ns[i]));
- }
- }
-
- /**
- * Writes the start element event.
- */
- public void writeStart(XMLStreamWriter w) throws XMLStreamException {
- // write start tag.
- if(prefix==null) {
- if(nsUri==null)
- w.writeStartElement(localName);
- else {
- //fix Null prefix. otherwise throws XMLStreamException,
- // if the namespace URI has not been bound to a prefix
- w.writeStartElement("",localName,nsUri);
- }
- } else {
- w.writeStartElement(prefix,localName,nsUri);
- }
-
- for( int i=0; i<ns.length; i+=2 ) {
- w.writeNamespace(ns[i],ns[i+1]);
- }
-
- for( int i=0; i<atts.getLength(); i++ ) {
- String nsUri = atts.getURI(i);
- if(nsUri==null || nsUri.length() ==0) {
- w.writeAttribute(atts.getLocalName(i),atts.getValue(i));
- } else {
- String rawName = atts.getQName(i);
- String prefix = rawName.substring(0,rawName.indexOf(':'));
- w.writeAttribute(prefix,nsUri,atts.getLocalName(i),atts.getValue(i));
- }
- }
- }
-
- private String getQName() {
- if(qname!=null) return qname;
-
- StringBuilder sb = new StringBuilder();
- if(prefix!=null){
- sb.append(prefix);
- sb.append(':');
- sb.append(localName);
- qname = sb.toString();
- } else {
- qname = localName;
- }
- return qname;
- }
- private static String fixNull(String s) {
- if(s==null) return "";
- else return s;
- }
-
- private static final String[] EMPTY_ARRAY = new String[0];
- private static final AttributesImpl EMPTY_ATTRIBUTES = new AttributesImpl();
-
- public String getNamespaceURI(String prefix) {
- int size = ns.length/2;
- for(int i=0; i<size; i++){
- String p = ns[i*2 ];
- String n = ns[i*2+1];
- if (prefix.equals(p)) return n;
- }
- return null;
- }
-
- public String getPrefix(String namespaceURI) {
- int size = ns.length/2;
- for(int i=0; i<size; i++){
- String p = ns[i*2 ];
- String n = ns[i*2+1];
- if (namespaceURI.equals(n)) return p;
- }
- return null;
- }
- //Who wants this?
- public List<String> allPrefixes(String namespaceURI) {
- int size = ns.length/2;
- List<String> l = new java.util.ArrayList<String>();
- for(int i=0; i<size; i++){
- String p = ns[i*2 ];
- String n = ns[i*2+1];
- if (namespaceURI.equals(n)) l.add(p);
- }
- return l;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XMLHTTPBindingCodec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XMLHTTPBindingCodec.java
deleted file mode 100644
index e12251a0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XMLHTTPBindingCodec.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.encoding;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.client.ContentNegotiation;
-import com.sun.xml.internal.ws.encoding.xml.XMLCodec;
-import com.sun.xml.internal.ws.encoding.xml.XMLMessage;
-import com.sun.xml.internal.ws.encoding.xml.XMLMessage.MessageDataSource;
-import com.sun.xml.internal.ws.encoding.xml.XMLMessage.UnknownContent;
-import com.sun.xml.internal.ws.encoding.xml.XMLMessage.XMLMultiPart;
-import com.sun.xml.internal.ws.resources.StreamingMessages;
-import com.sun.xml.internal.ws.util.ByteArrayBuffer;
-
-import javax.activation.DataSource;
-import javax.xml.ws.WebServiceException;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.lang.reflect.Method;
-import java.nio.channels.WritableByteChannel;
-import java.util.StringTokenizer;
-
-/**
- * XML (infoset) over HTTP binding {@link Codec}.
- * <p>
- * TODO: Support FI for multipart/related
- * Support FI for MessageDataSource
- *
- * @author Jitendra Kotamraju
- */
-public final class XMLHTTPBindingCodec extends MimeCodec {
- /**
- * Base HTTP Accept request-header.
- */
- private static final String BASE_ACCEPT_VALUE =
- "*";
-
- /**
- * Fast Infoset MIME type.
- */
- private static final String APPLICATION_FAST_INFOSET_MIME_TYPE =
- "application/fastinfoset";
-
- /**
- * True if the Fast Infoset codec should be used
- */
- private boolean useFastInfosetForEncoding;
-
- /**
- * The XML codec
- */
- private final Codec xmlCodec;
-
- /**
- * The FI codec
- */
- private final Codec fiCodec;
-
- /**
- * The Accept header for XML encodings
- */
- private static final String xmlAccept = null;
-
- /**
- * The Accept header for Fast Infoset and XML encodings
- */
- private static final String fiXmlAccept = APPLICATION_FAST_INFOSET_MIME_TYPE + ", " + BASE_ACCEPT_VALUE;
-
- private ContentTypeImpl setAcceptHeader(Packet p, ContentType c) {
- ContentTypeImpl ctImpl = (ContentTypeImpl)c;
- if (p.contentNegotiation == ContentNegotiation.optimistic
- || p.contentNegotiation == ContentNegotiation.pessimistic) {
- ctImpl.setAcceptHeader(fiXmlAccept);
- } else {
- ctImpl.setAcceptHeader(xmlAccept);
- }
- p.setContentType(ctImpl);
- return ctImpl;
- }
-
- public XMLHTTPBindingCodec(WSFeatureList f) {
- super(SOAPVersion.SOAP_11, f);
-
- xmlCodec = new XMLCodec(f);
-
- fiCodec = getFICodec();
- }
-
- @Override
- public String getMimeType() {
- return null;
- }
-
- @Override
- public ContentType getStaticContentType(Packet packet) {
- ContentType ct;
- if (packet.getInternalMessage() instanceof MessageDataSource) {
- final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
- if (mds.hasUnconsumedDataSource()) {
- ct = getStaticContentType(mds);
- return (ct != null)
- ? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
- : null;
- }
- }
-
- ct = super.getStaticContentType(packet);
- return (ct != null)
- ? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
- : null;
- }
-
- @Override
- public ContentType encode(Packet packet, OutputStream out) throws IOException {
- if (packet.getInternalMessage() instanceof MessageDataSource) {
- final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
- if (mds.hasUnconsumedDataSource())
- return setAcceptHeader(packet, encode(mds, out));
- }
-
- return setAcceptHeader(packet, super.encode(packet, out));
- }
-
- @Override
- public ContentType encode(Packet packet, WritableByteChannel buffer) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void decode(InputStream in, String contentType, Packet packet) throws IOException {
- /**
- * Reset the encoding state when on the server side for each
- * decode/encode step.
- */
- if (packet.contentNegotiation == null)
- useFastInfosetForEncoding = false;
-
- if (contentType == null) {
- xmlCodec.decode(in, contentType, packet);
- } else if (isMultipartRelated(contentType)) {
- packet.setMessage(new XMLMultiPart(contentType, in, features));
- } else if(isFastInfoset(contentType)) {
- if (fiCodec == null) {
- throw new RuntimeException(StreamingMessages.FASTINFOSET_NO_IMPLEMENTATION());
- }
-
- useFastInfosetForEncoding = true;
- fiCodec.decode(in, contentType, packet);
- } else if (isXml(contentType)) {
- xmlCodec.decode(in, contentType, packet);
- } else {
- packet.setMessage(new UnknownContent(contentType, in));
- }
-
- if (!useFastInfosetForEncoding) {
- useFastInfosetForEncoding = isFastInfosetAcceptable(packet.acceptableMimeTypes);
- }
- }
-
- @Override
- protected void decode(MimeMultipartParser mpp, Packet packet) throws IOException {
- // This method will never be invoked
- }
-
- @Override
- public MimeCodec copy() {
- return new XMLHTTPBindingCodec(features);
- }
-
- private boolean isMultipartRelated(String contentType) {
- return compareStrings(contentType, MimeCodec.MULTIPART_RELATED_MIME_TYPE);
- }
-
- private boolean isXml(String contentType) {
- return compareStrings(contentType, XMLCodec.XML_APPLICATION_MIME_TYPE)
- || compareStrings(contentType, XMLCodec.XML_TEXT_MIME_TYPE)
- || (compareStrings(contentType, "application/")&&(contentType.toLowerCase().indexOf("+xml") != -1));
- }
-
- private boolean isFastInfoset(String contentType) {
- return compareStrings(contentType, APPLICATION_FAST_INFOSET_MIME_TYPE);
- }
-
- private boolean compareStrings(String a, String b) {
- return a.length() >= b.length() &&
- b.equalsIgnoreCase(
- a.substring(0,
- b.length()));
- }
-
- private boolean isFastInfosetAcceptable(String accept) {
- if (accept == null) return false;
-
- StringTokenizer st = new StringTokenizer(accept, ",");
- while (st.hasMoreTokens()) {
- final String token = st.nextToken().trim();
- if (token.equalsIgnoreCase(APPLICATION_FAST_INFOSET_MIME_TYPE)) {
- return true;
- }
- }
- return false;
- }
-
- private ContentType getStaticContentType(MessageDataSource mds) {
- final String contentType = mds.getDataSource().getContentType();
- final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType);
-
- if (!requiresTransformationOfDataSource(isFastInfoset,
- useFastInfosetForEncoding)) {
- return new ContentTypeImpl(contentType);
- } else {
- return null;
- }
- }
-
- private ContentType encode(MessageDataSource mds, OutputStream out) {
- try {
- final boolean isFastInfoset = XMLMessage.isFastInfoset(
- mds.getDataSource().getContentType());
- DataSource ds = transformDataSource(mds.getDataSource(),
- isFastInfoset, useFastInfosetForEncoding, features);
-
- InputStream is = ds.getInputStream();
- byte[] buf = new byte[1024];
- int count;
- while((count=is.read(buf)) != -1) {
- out.write(buf, 0, count);
- }
- return new ContentTypeImpl(ds.getContentType());
- } catch(IOException ioe) {
- throw new WebServiceException(ioe);
- }
- }
-
- @Override
- protected Codec getMimeRootCodec(Packet p) {
- /**
- * The following logic is only for outbound packets
- * to be encoded by client.
- * On the server the p.contentNegotiation == null.
- */
- if (p.contentNegotiation == ContentNegotiation.none) {
- // The client may have changed the negotiation property from
- // pessismistic to none between invocations
- useFastInfosetForEncoding = false;
- } else if (p.contentNegotiation == ContentNegotiation.optimistic) {
- // Always encode using Fast Infoset if in optimisitic mode
- useFastInfosetForEncoding = true;
- }
-
- return (useFastInfosetForEncoding && fiCodec != null)? fiCodec : xmlCodec;
- }
-
- public static boolean requiresTransformationOfDataSource(
- boolean isFastInfoset, boolean useFastInfoset) {
- return (isFastInfoset && !useFastInfoset) || (!isFastInfoset && useFastInfoset);
- }
-
- public static DataSource transformDataSource(DataSource in,
- boolean isFastInfoset, boolean useFastInfoset, WSFeatureList f) {
- try {
- if (isFastInfoset && !useFastInfoset) {
- // Convert from Fast Infoset to XML
- Codec codec = new XMLHTTPBindingCodec(f);
- Packet p = new Packet();
- codec.decode(in.getInputStream(), in.getContentType(), p);
-
- p.getMessage().getAttachments();
- codec.getStaticContentType(p);
-
- ByteArrayBuffer bos = new ByteArrayBuffer();
- ContentType ct = codec.encode(p, bos);
- return XMLMessage.createDataSource(ct.getContentType(), bos.newInputStream());
- } else if (!isFastInfoset && useFastInfoset) {
- // Convert from XML to Fast Infoset
- Codec codec = new XMLHTTPBindingCodec(f);
- Packet p = new Packet();
- codec.decode(in.getInputStream(), in.getContentType(), p);
-
- p.contentNegotiation = ContentNegotiation.optimistic;
- p.getMessage().getAttachments();
- codec.getStaticContentType(p);
-
- ByteArrayBuffer bos = new ByteArrayBuffer();
- com.sun.xml.internal.ws.api.pipe.ContentType ct = codec.encode(p, bos);
- return XMLMessage.createDataSource(ct.getContentType(), bos.newInputStream());
- }
- } catch(Exception ex) {
- throw new WebServiceException(ex);
- }
-
- return in;
- }
-
- /**
- * Obtain an FI SOAP codec instance using reflection.
- */
- private static Codec getFICodec() {
- try {
- Class c = Class.forName("com.sun.xml.internal.ws.encoding.fastinfoset.FastInfosetCodec");
- Method m = c.getMethod("create");
- return (Codec)m.invoke(null);
- } catch (Exception e) {
- return null;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XmlDataContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XmlDataContentHandler.java
deleted file mode 100644
index 8064a208..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XmlDataContentHandler.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding;
-
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-
-import javax.activation.ActivationDataFlavor;
-import javax.activation.DataContentHandler;
-import javax.activation.DataSource;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-import java.awt.datatransfer.DataFlavor;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.util.Arrays;
-
-/**
- * JAF data handler for XML content
- *
- * @author Jitendra Kotamraju
- */
-public class XmlDataContentHandler implements DataContentHandler {
-
- private final DataFlavor[] flavors;
-
- public XmlDataContentHandler() throws ClassNotFoundException {
- flavors = new DataFlavor[3];
- flavors[0] = new ActivationDataFlavor(StreamSource.class, "text/xml", "XML");
- flavors[1] = new ActivationDataFlavor(StreamSource.class, "application/xml", "XML");
- flavors[2] = new ActivationDataFlavor(String.class, "text/xml", "XML String");
- }
-
- public DataFlavor[] getTransferDataFlavors() {
- return Arrays.copyOf(flavors, flavors.length);
- }
-
- public Object getTransferData(DataFlavor df, DataSource ds)
- throws IOException {
-
- for (DataFlavor aFlavor : flavors) {
- if (aFlavor.equals(df)) {
- return getContent(ds);
- }
- }
- return null;
- }
-
- /**
- * Create an object from the input stream
- */
- public Object getContent(DataSource ds) throws IOException {
- String ctStr = ds.getContentType();
- String charset = null;
- if (ctStr != null) {
- ContentType ct = new ContentType(ctStr);
- if (!isXml(ct)) {
- throw new IOException(
- "Cannot convert DataSource with content type \""
- + ctStr + "\" to object in XmlDataContentHandler");
- }
- charset = ct.getParameter("charset");
- }
- return (charset != null)
- ? new StreamSource(new InputStreamReader(ds.getInputStream()), charset)
- : new StreamSource(ds.getInputStream());
- }
-
- /**
- * Convert the object to a byte stream
- */
- public void writeTo(Object obj, String mimeType, OutputStream os)
- throws IOException {
-
- if (!(obj instanceof DataSource || obj instanceof Source || obj instanceof String)) {
- throw new IOException("Invalid Object type = "+obj.getClass()+
- ". XmlDataContentHandler can only convert DataSource|Source|String to XML.");
- }
-
- ContentType ct = new ContentType(mimeType);
- if (!isXml(ct)) {
- throw new IOException(
- "Invalid content type \"" + mimeType + "\" for XmlDataContentHandler");
- }
-
- String charset = ct.getParameter("charset");
- if (obj instanceof String) {
- String s = (String) obj;
- if (charset == null) {
- charset = "utf-8";
- }
- OutputStreamWriter osw = new OutputStreamWriter(os, charset);
- osw.write(s, 0, s.length());
- osw.flush();
- return;
- }
-
- Source source = (obj instanceof DataSource)
- ? (Source)getContent((DataSource)obj) : (Source)obj;
- try {
- Transformer transformer = XmlUtil.newTransformer();
- if (charset != null) {
- transformer.setOutputProperty(OutputKeys.ENCODING, charset);
- }
- StreamResult result = new StreamResult(os);
- transformer.transform(source, result);
- } catch (Exception ex) {
- throw new IOException(
- "Unable to run the JAXP transformer in XmlDataContentHandler "
- + ex.getMessage());
- }
- }
-
- private boolean isXml(ContentType ct) {
- return ct.getSubType().equals("xml") &&
- (ct.getPrimaryType().equals("text") || ct.getPrimaryType().equals("application"));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetCodec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetCodec.java
deleted file mode 100644
index b735a07d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetCodec.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.encoding.fastinfoset;
-
-import com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer;
-import com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser;
-import com.sun.xml.internal.fastinfoset.vocab.ParserVocabulary;
-import com.sun.xml.internal.fastinfoset.vocab.SerializerVocabulary;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Messages;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.encoding.ContentTypeImpl;
-import java.io.BufferedInputStream;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.ws.WebServiceException;
-import java.io.OutputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.nio.channels.WritableByteChannel;
-import java.nio.channels.ReadableByteChannel;
-import com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSource;
-
-/**
- * A codec for encoding/decoding XML infosets to/from fast
- * infoset documents.
- *
- * @author Paul Sandoz
- */
-public class FastInfosetCodec implements Codec {
- private static final int DEFAULT_INDEXED_STRING_SIZE_LIMIT = 32;
- private static final int DEFAULT_INDEXED_STRING_MEMORY_LIMIT = 4 * 1024 * 1024; //4M limit
-
- private StAXDocumentParser _parser;
-
- private StAXDocumentSerializer _serializer;
-
- private final boolean _retainState;
-
- private final ContentType _contentType;
-
- /* package */ FastInfosetCodec(boolean retainState) {
- _retainState = retainState;
- _contentType = (retainState) ? new ContentTypeImpl(FastInfosetMIMETypes.STATEFUL_INFOSET) :
- new ContentTypeImpl(FastInfosetMIMETypes.INFOSET);
- }
-
- public String getMimeType() {
- return _contentType.getContentType();
- }
-
- public Codec copy() {
- return new FastInfosetCodec(_retainState);
- }
-
- public ContentType getStaticContentType(Packet packet) {
- return _contentType;
- }
-
- public ContentType encode(Packet packet, OutputStream out) {
- Message message = packet.getMessage();
- if (message != null && message.hasPayload()) {
- final XMLStreamWriter writer = getXMLStreamWriter(out);
- try {
- writer.writeStartDocument();
- packet.getMessage().writePayloadTo(writer);
- writer.writeEndDocument();
- writer.flush();
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- }
-
- return _contentType;
- }
-
- public ContentType encode(Packet packet, WritableByteChannel buffer) {
- //TODO: not yet implemented
- throw new UnsupportedOperationException();
- }
-
- public void decode(InputStream in, String contentType, Packet packet) throws IOException {
- /* Implements similar logic as the XMLMessage.create(String, InputStream).
- * But it's faster, as we know the InputStream has FastInfoset content*/
- Message message;
- in = hasSomeData(in);
- if (in != null) {
- message = Messages.createUsingPayload(new FastInfosetSource(in),
- SOAPVersion.SOAP_11);
- } else {
- message = Messages.createEmpty(SOAPVersion.SOAP_11);
- }
-
- packet.setMessage(message);
- }
-
- public void decode(ReadableByteChannel in, String contentType, Packet response) {
- throw new UnsupportedOperationException();
- }
-
- private XMLStreamWriter getXMLStreamWriter(OutputStream out) {
- if (_serializer != null) {
- _serializer.setOutputStream(out);
- return _serializer;
- } else {
- return _serializer = createNewStreamWriter(out, _retainState);
- }
- }
-
- /**
- * Creates a new {@link FastInfosetCodec} instance.
- *
- * @return a new {@link FastInfosetCodec} instance.
- */
- public static FastInfosetCodec create() {
- return create(false);
- }
-
- /**
- * Creates a new {@link FastInfosetCodec} instance.
- *
- * @param retainState if true the Codec should retain the state of
- * vocabulary tables for multiple encode/decode invocations.
- * @return a new {@link FastInfosetCodec} instance.
- */
- public static FastInfosetCodec create(boolean retainState) {
- return new FastInfosetCodec(retainState);
- }
-
- /**
- * Create a new (@link StAXDocumentSerializer} instance.
- *
- * @param in the OutputStream to serialize to.
- * @param retainState if true the serializer should retain the state of
- * vocabulary tables for multiple serializations.
- * @return a new {@link StAXDocumentSerializer} instance.
- */
- /* package */ static StAXDocumentSerializer createNewStreamWriter(OutputStream out, boolean retainState) {
- return createNewStreamWriter(out, retainState, DEFAULT_INDEXED_STRING_SIZE_LIMIT, DEFAULT_INDEXED_STRING_MEMORY_LIMIT);
- }
-
- /**
- * Create a new (@link StAXDocumentSerializer} instance.
- *
- * @param in the OutputStream to serialize to.
- * @param retainState if true the serializer should retain the state of
- * vocabulary tables for multiple serializations.
- * @return a new {@link StAXDocumentSerializer} instance.
- */
- /* package */ static StAXDocumentSerializer createNewStreamWriter(OutputStream out,
- boolean retainState, int indexedStringSizeLimit, int stringsMemoryLimit) {
- StAXDocumentSerializer serializer = new StAXDocumentSerializer(out);
- if (retainState) {
- /**
- * Create a serializer vocabulary external to the serializer.
- * This will ensure that the vocabulary will never be cleared
- * for each serialization and will be retained (and will grow)
- * for each serialization
- */
- SerializerVocabulary vocabulary = new SerializerVocabulary();
- serializer.setVocabulary(vocabulary);
- serializer.setMinAttributeValueSize(0);
- serializer.setMaxAttributeValueSize(indexedStringSizeLimit);
- serializer.setMinCharacterContentChunkSize(0);
- serializer.setMaxCharacterContentChunkSize(indexedStringSizeLimit);
- serializer.setAttributeValueMapMemoryLimit(stringsMemoryLimit);
- serializer.setCharacterContentChunkMapMemoryLimit(stringsMemoryLimit);
- }
- return serializer;
- }
-
- /**
- * Create a new (@link StAXDocumentParser} instance.
- *
- * @param in the InputStream to parse from.
- * @param retainState if true the parser should retain the state of
- * vocabulary tables for multiple parses.
- * @return a new {@link StAXDocumentParser} instance.
- */
- /* package */ static StAXDocumentParser createNewStreamReader(InputStream in, boolean retainState) {
- StAXDocumentParser parser = new StAXDocumentParser(in);
- parser.setStringInterning(true);
- if (retainState) {
- /**
- * Create a parser vocabulary external to the parser.
- * This will ensure that the vocabulary will never be cleared
- * for each parse and will be retained (and will grow)
- * for each parse.
- */
- ParserVocabulary vocabulary = new ParserVocabulary();
- parser.setVocabulary(vocabulary);
- }
- return parser;
- }
-
- /**
- * Create a new (@link StAXDocumentParser} recyclable instance.
- *
- * @param in the InputStream to parse from.
- * @param retainState if true the parser should retain the state of
- * vocabulary tables for multiple parses.
- * @return a new recyclable {@link StAXDocumentParser} instance.
- */
- /* package */ static StAXDocumentParser createNewStreamReaderRecyclable(InputStream in, boolean retainState) {
- StAXDocumentParser parser = new FastInfosetStreamReaderRecyclable(in);
- parser.setStringInterning(true);
- parser.setForceStreamClose(true);
- if (retainState) {
- /**
- * Create a parser vocabulary external to the parser.
- * This will ensure that the vocabulary will never be cleared
- * for each parse and will be retained (and will grow)
- * for each parse.
- */
- ParserVocabulary vocabulary = new ParserVocabulary();
- parser.setVocabulary(vocabulary);
- }
- return parser;
- }
-
- /**
- * Method is copied from com.sun.xml.internal.ws.encoding.xml.XMLMessage
- * @TODO method should be public in some util package?
- *
- * Finds if the stream has some content or not
- *
- * @return null if there is no data
- * else stream to be used
- */
- private static InputStream hasSomeData(InputStream in) throws IOException {
- if (in != null) {
- if (in.available() < 1) {
- if (!in.markSupported()) {
- in = new BufferedInputStream(in);
- }
- in.mark(1);
- if (in.read() != -1) {
- in.reset();
- } else {
- in = null; // No data
- }
- }
- }
- return in;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetMIMETypes.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetMIMETypes.java
deleted file mode 100644
index 2a6c7fc1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetMIMETypes.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.fastinfoset;
-
-/**
- * MIME types for Infosets encoded as fast infoset documents.
- *
- * @author Paul.Sandoz@Sun.Com
- */
-public final class FastInfosetMIMETypes {
- /**
- * MIME type for a generic Infoset encoded as a fast infoset document.
- */
- static public final String INFOSET = "application/fastinfoset";
- /**
- * MIME type for a SOAP 1.1 Infoset encoded as a fast infoset document.
- */
- static public final String SOAP_11 = "application/fastinfoset";
- /**
- * MIME type for a SOAP 1.2 Infoset encoded as a fast infoset document.
- */
- static public final String SOAP_12 = "application/soap+fastinfoset";
-
- /**
- * MIME type for a generic Infoset encoded as a stateful fast infoset document.
- */
- static public final String STATEFUL_INFOSET = "application/vnd.sun.stateful.fastinfoset";
- /**
- * MIME type for a SOAP 1.1 Infoset encoded as a stateful fast infoset document.
- */
- static public final String STATEFUL_SOAP_11 = "application/vnd.sun.stateful.fastinfoset";
- /**
- * MIME type for a SOAP 1.2 Infoset encoded as a stateful fast infoset document.
- */
- static public final String STATEFUL_SOAP_12 = "application/vnd.sun.stateful.soap+fastinfoset";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderFactory.java
deleted file mode 100644
index ad7529a3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderFactory.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.fastinfoset;
-
-import com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import java.io.InputStream;
-import java.io.Reader;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * @author Alexey Stashok
- */
-public final class FastInfosetStreamReaderFactory extends XMLStreamReaderFactory {
- private static final FastInfosetStreamReaderFactory factory = new FastInfosetStreamReaderFactory();
-
- private ThreadLocal<StAXDocumentParser> pool = new ThreadLocal<StAXDocumentParser>();
-
- public static FastInfosetStreamReaderFactory getInstance() {
- return factory;
- }
-
- public XMLStreamReader doCreate(String systemId, InputStream in, boolean rejectDTDs) {
- StAXDocumentParser parser = fetch();
- if (parser == null) {
- return FastInfosetCodec.createNewStreamReaderRecyclable(in, false);
- }
-
- parser.setInputStream(in);
- return parser;
- }
-
- public XMLStreamReader doCreate(String systemId, Reader reader, boolean rejectDTDs) {
- throw new UnsupportedOperationException();
- }
-
- private StAXDocumentParser fetch() {
- StAXDocumentParser parser = pool.get();
- pool.set(null);
- return parser;
- }
-
- public void doRecycle(XMLStreamReader r) {
- if (r instanceof StAXDocumentParser) {
- pool.set((StAXDocumentParser) r);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderRecyclable.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderRecyclable.java
deleted file mode 100644
index 0cbd4129..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderRecyclable.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.fastinfoset;
-
-import com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import java.io.InputStream;
-
-/**
- * @author Alexey Stashok
- */
-public final class FastInfosetStreamReaderRecyclable extends StAXDocumentParser implements XMLStreamReaderFactory.RecycleAware {
- private static final FastInfosetStreamReaderFactory READER_FACTORY = FastInfosetStreamReaderFactory.getInstance();
-
- public FastInfosetStreamReaderRecyclable() {
- super();
- }
-
- public FastInfosetStreamReaderRecyclable(InputStream in) {
- super(in);
- }
-
- public void onRecycled() {
- READER_FACTORY.doRecycle(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP11Codec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP11Codec.java
deleted file mode 100644
index 6015d419..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP11Codec.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.fastinfoset;
-
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.pipe.StreamSOAPCodec;
-import com.sun.xml.internal.ws.encoding.ContentTypeImpl;
-import com.sun.xml.internal.ws.message.stream.StreamHeader;
-import com.sun.xml.internal.ws.message.stream.StreamHeader11;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * A codec that converts SOAP 1.1 messages infosets to fast infoset
- * documents.
- *
- * @author Paul.Sandoz@Sun.Com
- */
-final class FastInfosetStreamSOAP11Codec extends FastInfosetStreamSOAPCodec {
- /*package*/ FastInfosetStreamSOAP11Codec(StreamSOAPCodec soapCodec, boolean retainState) {
- super(soapCodec, SOAPVersion.SOAP_11, retainState,
- (retainState) ? FastInfosetMIMETypes.STATEFUL_SOAP_11 : FastInfosetMIMETypes.SOAP_11);
- }
-
- private FastInfosetStreamSOAP11Codec(FastInfosetStreamSOAP11Codec that) {
- super(that);
- }
-
- public Codec copy() {
- return new FastInfosetStreamSOAP11Codec(this);
- }
-
- protected final StreamHeader createHeader(XMLStreamReader reader, XMLStreamBuffer mark) {
- return new StreamHeader11(reader, mark);
- }
-
- protected ContentType getContentType(String soapAction) {
- if (soapAction == null || soapAction.length() == 0) {
- return _defaultContentType;
- } else {
- return new ContentTypeImpl(_defaultContentType.getContentType(), soapAction);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP12Codec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP12Codec.java
deleted file mode 100644
index b26ee31d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP12Codec.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.fastinfoset;
-
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.pipe.StreamSOAPCodec;
-import com.sun.xml.internal.ws.encoding.ContentTypeImpl;
-import com.sun.xml.internal.ws.message.stream.StreamHeader;
-import com.sun.xml.internal.ws.message.stream.StreamHeader12;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * A codec that converts SOAP 1.2 messages infosets to fast infoset
- * documents.
- *
- * @author Paul.Sandoz@Sun.Com
- */
-final class FastInfosetStreamSOAP12Codec extends FastInfosetStreamSOAPCodec {
- /*package*/ FastInfosetStreamSOAP12Codec(StreamSOAPCodec soapCodec, boolean retainState) {
- super(soapCodec, SOAPVersion.SOAP_12, retainState,
- (retainState) ? FastInfosetMIMETypes.STATEFUL_SOAP_12 : FastInfosetMIMETypes.SOAP_12);
- }
-
- private FastInfosetStreamSOAP12Codec(FastInfosetStreamSOAPCodec that) {
- super(that);
- }
-
- public Codec copy() {
- return new FastInfosetStreamSOAP12Codec(this);
- }
-
- protected final StreamHeader createHeader(XMLStreamReader reader, XMLStreamBuffer mark) {
- return new StreamHeader12(reader, mark);
- }
-
- protected ContentType getContentType(String soapAction) {
- if (soapAction == null) {
- return _defaultContentType;
- } else {
- return new ContentTypeImpl(
- _defaultContentType.getContentType() + ";action=\""+soapAction+"\"");
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAPCodec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAPCodec.java
deleted file mode 100644
index 28bb5fa7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAPCodec.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.encoding.fastinfoset;
-
-import com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer;
-import com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.pipe.StreamSOAPCodec;
-import com.sun.xml.internal.ws.message.stream.StreamHeader;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.ws.encoding.ContentTypeImpl;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.WebServiceException;
-import java.io.OutputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.nio.channels.WritableByteChannel;
-import java.nio.channels.ReadableByteChannel;
-
-/**
- * A stream SOAP codec for handling SOAP message infosets to fast
- * infoset documents.
- *
- * <p>
- * This implementation currently defers to {@link StreamSOAPCodec} for the decoding
- * using {@link XMLStreamReader}.
- *
- * @author Paul Sandoz
- */
-public abstract class FastInfosetStreamSOAPCodec implements Codec {
- private static final FastInfosetStreamReaderFactory READER_FACTORY = FastInfosetStreamReaderFactory.getInstance();
-
- private StAXDocumentParser _statefulParser;
- private StAXDocumentSerializer _serializer;
-
- private final StreamSOAPCodec _soapCodec;
-
- private final boolean _retainState;
-
- protected final ContentType _defaultContentType;
-
- /* package */ FastInfosetStreamSOAPCodec(StreamSOAPCodec soapCodec, SOAPVersion soapVersion, boolean retainState, String mimeType) {
-// _soapCodec = StreamSOAPCodec.create(soapVersion);
- _soapCodec = soapCodec;
- _retainState = retainState;
- _defaultContentType = new ContentTypeImpl(mimeType);
- }
-
- /* package */ FastInfosetStreamSOAPCodec(FastInfosetStreamSOAPCodec that) {
- this._soapCodec = (StreamSOAPCodec) that._soapCodec.copy();
- this._retainState = that._retainState;
- this._defaultContentType = that._defaultContentType;
- }
-
- public String getMimeType() {
- return _defaultContentType.getContentType();
- }
-
- public ContentType getStaticContentType(Packet packet) {
- return getContentType(packet.soapAction);
- }
-
- public ContentType encode(Packet packet, OutputStream out) {
- if (packet.getMessage() != null) {
- final XMLStreamWriter writer = getXMLStreamWriter(out);
- try {
- packet.getMessage().writeTo(writer);
- writer.flush();
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- }
- return getContentType(packet.soapAction);
- }
-
- public ContentType encode(Packet packet, WritableByteChannel buffer) {
- //TODO: not yet implemented
- throw new UnsupportedOperationException();
- }
-
- public void decode(InputStream in, String contentType, Packet response) throws IOException {
- response.setMessage(
- _soapCodec.decode(getXMLStreamReader(in)));
- }
-
- public void decode(ReadableByteChannel in, String contentType, Packet response) {
- throw new UnsupportedOperationException();
- }
-
- protected abstract StreamHeader createHeader(XMLStreamReader reader, XMLStreamBuffer mark);
-
- protected abstract ContentType getContentType(String soapAction);
-
- private XMLStreamWriter getXMLStreamWriter(OutputStream out) {
- if (_serializer != null) {
- _serializer.setOutputStream(out);
- return _serializer;
- } else {
- return _serializer = FastInfosetCodec.createNewStreamWriter(out, _retainState);
- }
- }
-
- private XMLStreamReader getXMLStreamReader(InputStream in) {
- // If the _retainState is true (FI stateful) then pick up Codec assiciated XMLStreamReader
- if (_retainState) {
- if (_statefulParser != null) {
- _statefulParser.setInputStream(in);
- return _statefulParser;
- } else {
- return _statefulParser = FastInfosetCodec.createNewStreamReader(in, _retainState);
- }
- }
-
- // Otherwise thread assiciated XMLStreamReader
- return READER_FACTORY.doCreate(null, in, false);
- }
-
- /**
- * Creates a new {@link FastInfosetStreamSOAPCodec} instance.
- *
- * @param version the SOAP version of the codec.
- * @return a new {@link FastInfosetStreamSOAPCodec} instance.
- */
- public static FastInfosetStreamSOAPCodec create(StreamSOAPCodec soapCodec, SOAPVersion version) {
- return create(soapCodec, version, false);
- }
-
- /**
- * Creates a new {@link FastInfosetStreamSOAPCodec} instance.
- *
- * @param version the SOAP version of the codec.
- * @param retainState if true the Codec should retain the state of
- * vocabulary tables for multiple encode/decode invocations.
- * @return a new {@link FastInfosetStreamSOAPCodec} instance.
- */
- public static FastInfosetStreamSOAPCodec create(StreamSOAPCodec soapCodec,
- SOAPVersion version, boolean retainState) {
- if(version==null)
- // this decoder is for SOAP, not for XML/HTTP
- throw new IllegalArgumentException();
- switch(version) {
- case SOAP_11:
- return new FastInfosetStreamSOAP11Codec(soapCodec, retainState);
- case SOAP_12:
- return new FastInfosetStreamSOAP12Codec(soapCodec, retainState);
- default:
- throw new AssertionError();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingConstants.java
deleted file mode 100644
index 6bc6fa72..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingConstants.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.policy;
-
-import javax.xml.namespace.QName;
-
-/**
- * File holding all encoding constants
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public final class EncodingConstants {
- /** Prevents creation of new EncodingConstants instance */
- private EncodingConstants() {
- }
-
- public static final String SUN_FI_SERVICE_NS = "http://java.sun.com/xml/ns/wsit/2006/09/policy/fastinfoset/service";
- public static final QName OPTIMIZED_FI_SERIALIZATION_ASSERTION = new QName(SUN_FI_SERVICE_NS, "OptimizedFastInfosetSerialization");
-
- public static final String SUN_ENCODING_CLIENT_NS = "http://java.sun.com/xml/ns/wsit/2006/09/policy/encoding/client";
- public static final QName SELECT_OPTIMAL_ENCODING_ASSERTION = new QName(SUN_ENCODING_CLIENT_NS, "AutomaticallySelectOptimalEncoding");
-
- public static final String OPTIMIZED_MIME_NS = "http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization";
- public static final QName OPTIMIZED_MIME_SERIALIZATION_ASSERTION = new QName(OPTIMIZED_MIME_NS, "OptimizedMimeSerialization");
-
- public static final String ENCODING_NS = "http://schemas.xmlsoap.org/ws/2004/09/policy/encoding";
- public static final QName UTF816FFFE_CHARACTER_ENCODING_ASSERTION = new QName(ENCODING_NS, "Utf816FFFECharacterEncoding");
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPolicyValidator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPolicyValidator.java
deleted file mode 100644
index 6dde0501..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPolicyValidator.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.policy;
-
-import com.sun.xml.internal.ws.policy. PolicyAssertion;
-import com.sun.xml.internal.ws.policy.spi.PolicyAssertionValidator;
-import com.sun.xml.internal.ws.policy.spi.PolicyAssertionValidator.Fitness;
-import java.util.ArrayList;
-import javax.xml.namespace.QName;
-
-import static com.sun.xml.internal.ws.encoding.policy.EncodingConstants.*;
-
-/**
- *
- * @author Jakub Podlesak (jakub.podlesak at sun.com)
- */
-public class EncodingPolicyValidator implements PolicyAssertionValidator {
-
- private static final ArrayList<QName> serverSideSupportedAssertions = new ArrayList<QName>(3);
- private static final ArrayList<QName> clientSideSupportedAssertions = new ArrayList<QName>(4);
-
- static {
- serverSideSupportedAssertions.add(OPTIMIZED_MIME_SERIALIZATION_ASSERTION);
- serverSideSupportedAssertions.add(UTF816FFFE_CHARACTER_ENCODING_ASSERTION);
- serverSideSupportedAssertions.add(OPTIMIZED_FI_SERIALIZATION_ASSERTION);
-
- clientSideSupportedAssertions.add(SELECT_OPTIMAL_ENCODING_ASSERTION);
- clientSideSupportedAssertions.addAll(serverSideSupportedAssertions);
- }
-
- /**
- * Creates a new instance of EncodingPolicyValidator
- */
- public EncodingPolicyValidator() {
- }
-
- public Fitness validateClientSide(PolicyAssertion assertion) {
- return clientSideSupportedAssertions.contains(assertion.getName()) ? Fitness.SUPPORTED : Fitness.UNKNOWN;
- }
-
- public Fitness validateServerSide(PolicyAssertion assertion) {
- QName assertionName = assertion.getName();
- if (serverSideSupportedAssertions.contains(assertionName)) {
- return Fitness.SUPPORTED;
- } else if (clientSideSupportedAssertions.contains(assertionName)) {
- return Fitness.UNSUPPORTED;
- } else {
- return Fitness.UNKNOWN;
- }
- }
-
- public String[] declareSupportedDomains() {
- return new String[] {OPTIMIZED_MIME_NS, ENCODING_NS, SUN_ENCODING_CLIENT_NS, SUN_FI_SERVICE_NS};
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPrefixMapper.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPrefixMapper.java
deleted file mode 100644
index 767ff954..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPrefixMapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.policy;
-
-import com.sun.xml.internal.ws.policy.spi.PrefixMapper;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- *
- * @author Fabian Ritzmann
- */
-public class EncodingPrefixMapper implements PrefixMapper {
-
- private static final Map<String, String> prefixMap = new HashMap<String, String>();
-
- static {
- prefixMap.put(EncodingConstants.ENCODING_NS, "wspe");
- prefixMap.put(EncodingConstants.OPTIMIZED_MIME_NS, "wsoma");
- prefixMap.put(EncodingConstants.SUN_ENCODING_CLIENT_NS, "cenc");
- prefixMap.put(EncodingConstants.SUN_FI_SERVICE_NS, "fi");
- }
-
- public Map<String, String> getPrefixMap() {
- return prefixMap;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/FastInfosetFeatureConfigurator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/FastInfosetFeatureConfigurator.java
deleted file mode 100644
index 177fc879..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/FastInfosetFeatureConfigurator.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.policy;
-
-import com.sun.xml.internal.ws.api.fastinfoset.FastInfosetFeature;
-import com.sun.xml.internal.ws.policy.AssertionSet;
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapKey;
-import com.sun.xml.internal.ws.policy.jaxws.spi.PolicyFeatureConfigurator;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-import javax.xml.namespace.QName;
-
-import static com.sun.xml.internal.ws.encoding.policy.EncodingConstants.OPTIMIZED_FI_SERIALIZATION_ASSERTION;
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * A configurator provider for FastInfoset policy assertions.
- *
- * @author Paul.Sandoz@Sun.Com
- * @author Fabian Ritzmann
- */
-public class FastInfosetFeatureConfigurator implements PolicyFeatureConfigurator {
-
- public static final QName enabled = new QName("enabled");
-
- /**
- * Process FastInfoset policy assertions.
- *
- * @param key Key to identify the endpoint scope.
- * @param policyMap the policy map.
- * @throws PolicyException If retrieving the policy triggered an exception.
- */
- public Collection<WebServiceFeature> getFeatures(final PolicyMapKey key, final PolicyMap policyMap) throws PolicyException {
- final Collection<WebServiceFeature> features = new LinkedList<WebServiceFeature>();
- if ((key != null) && (policyMap != null)) {
- Policy policy = policyMap.getEndpointEffectivePolicy(key);
- if (null!=policy && policy.contains(OPTIMIZED_FI_SERIALIZATION_ASSERTION)) {
- Iterator <AssertionSet> assertions = policy.iterator();
- while(assertions.hasNext()){
- AssertionSet assertionSet = assertions.next();
- Iterator<PolicyAssertion> policyAssertion = assertionSet.iterator();
- while(policyAssertion.hasNext()){
- PolicyAssertion assertion = policyAssertion.next();
- if(OPTIMIZED_FI_SERIALIZATION_ASSERTION.equals(assertion.getName())){
- String value = assertion.getAttributeValue(enabled);
- boolean isFastInfosetEnabled = Boolean.valueOf(value.trim());
- features.add(new FastInfosetFeature(isFastInfosetEnabled));
- } // end-if non optional fast infoset assertion found
- } // next assertion
- } // next alternative
- } // end-if policy contains fast infoset assertion
- }
- return features;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomFeatureConfigurator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomFeatureConfigurator.java
deleted file mode 100644
index e43a0d1c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomFeatureConfigurator.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.policy;
-
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType;
-import com.sun.xml.internal.ws.policy.AssertionSet;
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapKey;
-import com.sun.xml.internal.ws.policy.jaxws.spi.PolicyFeatureConfigurator;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.soap.MTOMFeature;
-
-import static com.sun.xml.internal.ws.encoding.policy.EncodingConstants.OPTIMIZED_MIME_SERIALIZATION_ASSERTION;
-
-/**
- *
- * @author japod
- * @author Fabian Ritzmann
- */
-public class MtomFeatureConfigurator implements PolicyFeatureConfigurator {
- /**
- * Creates a new instance of MtomFeatureConfigurator
- */
- public MtomFeatureConfigurator() {
- }
-
- /**
- * process Mtom policy assertions and if found and is not optional then mtom is enabled on the
- * {@link WSDLBoundPortType}
- *
- * @param key Key that identifies the endpoint scope
- * @param policyMap Must be non-null
- * @throws PolicyException If retrieving the policy triggered an exception
- */
- public Collection<WebServiceFeature> getFeatures(PolicyMapKey key, PolicyMap policyMap) throws PolicyException {
- final Collection<WebServiceFeature> features = new LinkedList<WebServiceFeature>();
- if ((key != null) && (policyMap != null)) {
- Policy policy = policyMap.getEndpointEffectivePolicy(key);
- if (null!=policy && policy.contains(OPTIMIZED_MIME_SERIALIZATION_ASSERTION)) {
- Iterator <AssertionSet> assertions = policy.iterator();
- while(assertions.hasNext()){
- AssertionSet assertionSet = assertions.next();
- Iterator<PolicyAssertion> policyAssertion = assertionSet.iterator();
- while(policyAssertion.hasNext()){
- PolicyAssertion assertion = policyAssertion.next();
- if(OPTIMIZED_MIME_SERIALIZATION_ASSERTION.equals(assertion.getName())){
- features.add(new MTOMFeature(true));
- } // end-if non optional mtom assertion found
- } // next assertion
- } // next alternative
- } // end-if policy contains mtom assertion
- }
- return features;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomPolicyMapConfigurator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomPolicyMapConfigurator.java
deleted file mode 100644
index 4365863d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomPolicyMapConfigurator.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.policy;
-
-import static com.sun.xml.internal.ws.encoding.policy.EncodingConstants.OPTIMIZED_MIME_SERIALIZATION_ASSERTION;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.policy.AssertionSet;
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicySubject;
-import com.sun.xml.internal.ws.policy.jaxws.spi.PolicyMapConfigurator;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.sourcemodel.AssertionData;
-import com.sun.xml.internal.ws.policy.subject.WsdlBindingSubject;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.logging.Level;
-import javax.xml.namespace.QName;
-import javax.xml.ws.soap.MTOMFeature;
-
-/**
- * Generate an MTOM policy if MTOM was enabled.
- *
- * @author Jakub Podlesak (japod at sun.com)
- * @author Fabian Ritzmann
- */
-public class MtomPolicyMapConfigurator implements PolicyMapConfigurator {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(MtomPolicyMapConfigurator.class);
-
- static class MtomAssertion extends PolicyAssertion {
-
- private static final AssertionData mtomData;
- static {
- mtomData= AssertionData.createAssertionData(OPTIMIZED_MIME_SERIALIZATION_ASSERTION);
- //JAX-WS MTOMFeature does n't currently capture if MTOM is required/optional.
- //JAX-WS accepts both normal messages and XOP encoded messages. Using wsp:Optional=true represents that behavior.
- //Moreover, this allows interoperability with non-MTOM aware clients.
- //See https://wsit.dev.java.net/issues/show_bug.cgi?id=1062
- mtomData.setOptionalAttribute(true);
- }
-
- MtomAssertion() {
- super(mtomData, null, null);
-
- }
- }
-
- /**
- * Generates an MTOM policy if MTOM is enabled.
- *
- * <ol>
- * <li>If MTOM is enabled
- * <ol>
- * <li>If MTOM policy does not already exist, generate
- * <li>Otherwise do nothing
- * </ol>
- * <li>Otherwise, do nothing (that implies that we do not remove any MTOM policies if MTOM is disabled)
- * </ol>
- *
- */
- public Collection<PolicySubject> update(PolicyMap policyMap, SEIModel model, WSBinding wsBinding) throws PolicyException {
- LOGGER.entering(policyMap, model, wsBinding);
-
- Collection<PolicySubject> subjects = new ArrayList<PolicySubject>();
- if (policyMap != null) {
- final MTOMFeature mtomFeature = wsBinding.getFeature(MTOMFeature.class);
- if (LOGGER.isLoggable(Level.FINEST)) {
- LOGGER.finest("mtomFeature = " + mtomFeature);
- }
- if ((mtomFeature != null) && mtomFeature.isEnabled()) {
- final QName bindingName = model.getBoundPortTypeName();
- final WsdlBindingSubject wsdlSubject = WsdlBindingSubject.createBindingSubject(bindingName);
- final Policy mtomPolicy = createMtomPolicy(bindingName);
- final PolicySubject mtomPolicySubject = new PolicySubject(wsdlSubject, mtomPolicy);
- subjects.add(mtomPolicySubject);
- if (LOGGER.isLoggable(Level.FINEST)) {
- LOGGER.fine("Added MTOM policy with ID \"" + mtomPolicy.getIdOrName() + "\" to binding element \"" + bindingName + "\"");
- }
- }
- } // endif policy map not null
-
- LOGGER.exiting(subjects);
- return subjects;
- }
-
-
- /**
- * Create a policy with an MTOM assertion.
- *
- * @param model The binding element name. Used to generate a (locally) unique ID for the policy.
- * @return The policy.
- */
- private Policy createMtomPolicy(final QName bindingName) {
- ArrayList<AssertionSet> assertionSets = new ArrayList<AssertionSet>(1);
- ArrayList<PolicyAssertion> assertions = new ArrayList<PolicyAssertion>(1);
- assertions.add(new MtomAssertion());
- assertionSets.add(AssertionSet.createAssertionSet(assertions));
- return Policy.createPolicy(null, bindingName.getLocalPart() + "_MTOM_Policy", assertionSets);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/SelectOptimalEncodingFeatureConfigurator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/SelectOptimalEncodingFeatureConfigurator.java
deleted file mode 100644
index b33b2130..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/SelectOptimalEncodingFeatureConfigurator.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.policy;
-
-import com.sun.xml.internal.ws.api.client.SelectOptimalEncodingFeature;
-import com.sun.xml.internal.ws.policy.AssertionSet;
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapKey;
-import com.sun.xml.internal.ws.policy.jaxws.spi.PolicyFeatureConfigurator;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-import javax.xml.namespace.QName;
-
-import static com.sun.xml.internal.ws.encoding.policy.EncodingConstants.SELECT_OPTIMAL_ENCODING_ASSERTION;
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * A configurator provider for FastInfoset policy assertions.
- *
- * @author Paul.Sandoz@Sun.Com
- * @author Fabian Ritzmann
- */
-public class SelectOptimalEncodingFeatureConfigurator implements PolicyFeatureConfigurator {
- public static final QName enabled = new QName("enabled");
-
- /**
- * Process SelectOptimalEncoding policy assertions.
- *
- * @param key Key that identifies the endpoint scope.
- * @param policyMap The policy map.
- * @throws PolicyException If retrieving the policy triggered an exception.
- */
- public Collection<WebServiceFeature> getFeatures(PolicyMapKey key, PolicyMap policyMap) throws PolicyException {
- final Collection<WebServiceFeature> features = new LinkedList<WebServiceFeature>();
- if ((key != null) && (policyMap != null)) {
- Policy policy = policyMap.getEndpointEffectivePolicy(key);
- if (null!=policy && policy.contains(SELECT_OPTIMAL_ENCODING_ASSERTION)) {
- Iterator <AssertionSet> assertions = policy.iterator();
- while(assertions.hasNext()){
- AssertionSet assertionSet = assertions.next();
- Iterator<PolicyAssertion> policyAssertion = assertionSet.iterator();
- while(policyAssertion.hasNext()){
- PolicyAssertion assertion = policyAssertion.next();
- if(SELECT_OPTIMAL_ENCODING_ASSERTION.equals(assertion.getName())){
- String value = assertion.getAttributeValue(enabled);
- boolean isSelectOptimalEncodingEnabled = value == null || Boolean.valueOf(value.trim());
- features.add(new SelectOptimalEncodingFeature(isSelectOptimalEncodingEnabled));
- }
- }
- }
- }
- }
- return features;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/DeserializationException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/DeserializationException.java
deleted file mode 100644
index dcb324f6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/DeserializationException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.soap;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-/**
- * DeserializationException represents an exception that occurred while
- * deserializing a Java value from XML.
- *
- * @see JAXWSExceptionBase
- *
- * @author WS Development Team
- */
-public class DeserializationException extends JAXWSExceptionBase {
-
- public DeserializationException(String key, Object... args) {
- super(key, args);
- }
-
- public DeserializationException(Throwable throwable) {
- super(throwable);
- }
-
- public DeserializationException(Localizable arg) {
- super("nestedDeserializationError", arg);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.encoding";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAP12Constants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAP12Constants.java
deleted file mode 100644
index 33c0ea74..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAP12Constants.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.soap;
-
-import com.sun.xml.internal.ws.encoding.soap.streaming.SOAP12NamespaceConstants;
-
-import javax.xml.namespace.QName;
-
-/**
- *
- * @author WS Development Team
- */
-public class SOAP12Constants {
-
- public static final String URI_ENVELOPE = SOAP12NamespaceConstants.ENVELOPE;
- public static final String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
- public static final String URI_HTTP = SOAP12NamespaceConstants.TRANSPORT_HTTP;
- public static final String URI_SOAP_RPC = SOAP12NamespaceConstants.SOAP_RPC;
-
-
- public static final QName QNAME_SOAP_RPC = new QName(URI_SOAP_RPC, "rpc");
- public static final QName QNAME_SOAP_RESULT = new QName(URI_SOAP_RPC, "result");
-
- public static final QName QNAME_SOAP_ENVELOPE = new QName(URI_ENVELOPE, "Envelope");
- public static final QName QNAME_SOAP_BODY = new QName(URI_ENVELOPE, "Body");
- public static final QName QNAME_SOAP_HEADER = new QName(URI_ENVELOPE, "Header");
- public static final QName QNAME_ENVELOPE_ENCODINGSTYLE = new QName(URI_ENVELOPE, "encodingStyle");
- public static final QName QNAME_SOAP_FAULT = new QName(URI_ENVELOPE, "Fault");
- public static final QName QNAME_MUSTUNDERSTAND = new QName(URI_ENVELOPE, "mustUnderstand");
- public static final QName QNAME_ROLE = new QName(URI_ENVELOPE, "role");
-
- public static final QName QNAME_NOT_UNDERSTOOD = new QName(URI_ENVELOPE, "NotUnderstood");
-
- //fault
- public static final QName QNAME_FAULT_CODE = new QName(URI_ENVELOPE, "Code");
- public static final QName QNAME_FAULT_SUBCODE = new QName(URI_ENVELOPE, "Subcode");
- public static final QName QNAME_FAULT_VALUE = new QName(URI_ENVELOPE, "Value");
- public static final QName QNAME_FAULT_REASON = new QName(URI_ENVELOPE, "Reason");
- public static final QName QNAME_FAULT_NODE = new QName(URI_ENVELOPE, "Node");
- public static final QName QNAME_FAULT_ROLE = new QName(URI_ENVELOPE, "Role");
- public static final QName QNAME_FAULT_DETAIL = new QName(URI_ENVELOPE, "Detail");
- public static final QName QNAME_FAULT_REASON_TEXT = new QName(URI_ENVELOPE, "Text");
- public final static QName QNAME_UPGRADE = new QName(URI_ENVELOPE, "Upgrade");
- public final static QName QNAME_UPGRADE_SUPPORTED_ENVELOPE = new QName(URI_ENVELOPE, "SupportedEnvelope");
-
-
- //fault codes
- public final static QName FAULT_CODE_MUST_UNDERSTAND = new QName(URI_ENVELOPE, "MustUnderstand");
- public final static QName FAULT_CODE_MISUNDERSTOOD = new QName(URI_ENVELOPE, "Misunderstood");
- public final static QName FAULT_CODE_VERSION_MISMATCH = new QName(URI_ENVELOPE, "VersionMismatch");
- public final static QName FAULT_CODE_DATA_ENCODING_UNKNOWN = new QName(URI_ENVELOPE, "DataEncodingUnknown");
- public final static QName FAULT_CODE_PROCEDURE_NOT_PRESENT = new QName(URI_ENVELOPE, "ProcedureNotPresent");
- public final static QName FAULT_CODE_BAD_ARGUMENTS = new QName(URI_ENVELOPE, "BadArguments");
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAPConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAPConstants.java
deleted file mode 100644
index 341912af..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAPConstants.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.soap;
-
-import com.sun.xml.internal.ws.encoding.soap.streaming.SOAPNamespaceConstants;
-
-import javax.xml.namespace.QName;
-
-/**
- *
- * @author WS Development Team
- */
-public class SOAPConstants {
-
- public static final String URI_ENVELOPE = SOAPNamespaceConstants.ENVELOPE;
- public static final String URI_HTTP = SOAPNamespaceConstants.TRANSPORT_HTTP;
- public static final String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
- public static final String NS_WSDL_SOAP = "http://schemas.xmlsoap.org/wsdl/soap/";
- public static final QName QNAME_ENVELOPE_ENCODINGSTYLE = new QName(URI_ENVELOPE, "encodingStyle");
-
- public final static QName QNAME_SOAP_ENVELOPE = new QName(URI_ENVELOPE, "Envelope");
- public final static QName QNAME_SOAP_HEADER = new QName(URI_ENVELOPE, "Header");
- public static final QName QNAME_MUSTUNDERSTAND = new QName(URI_ENVELOPE, "mustUnderstand");
- public static final QName QNAME_ROLE = new QName(URI_ENVELOPE, "actor");
- public final static QName QNAME_SOAP_BODY = new QName(URI_ENVELOPE, "Body");
- public final static QName QNAME_SOAP_FAULT = new QName(URI_ENVELOPE, "Fault");
- public final static QName QNAME_SOAP_FAULT_CODE = new QName("", "faultcode");
- public final static QName QNAME_SOAP_FAULT_STRING = new QName("", "faultstring");
- public final static QName QNAME_SOAP_FAULT_ACTOR = new QName("", "faultactor");
- public final static QName QNAME_SOAP_FAULT_DETAIL = new QName("", "detail");
- public final static QName FAULT_CODE_MUST_UNDERSTAND = new QName(URI_ENVELOPE, "MustUnderstand");
-
- public final static QName FAULT_CODE_VERSION_MISMATCH = new QName(URI_ENVELOPE, "VersionMismatch");
- public final static QName FAULT_CODE_DATA_ENCODING_UNKNOWN = new QName(URI_ENVELOPE, "DataEncodingUnknown");
- public final static QName FAULT_CODE_PROCEDURE_NOT_PRESENT = new QName(URI_ENVELOPE, "ProcedureNotPresent");
- public final static QName FAULT_CODE_BAD_ARGUMENTS = new QName(URI_ENVELOPE, "BadArguments");
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializationException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializationException.java
deleted file mode 100644
index 5a548e14..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializationException.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.soap;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-/**
- * SerializationException represents an exception that occurred while
- * serializing a Java value as XML.
- *
- * @see JAXWSExceptionBase
- *
- * @author WS Development Team
- */
-public class SerializationException extends JAXWSExceptionBase {
-
- public SerializationException(String key, Object... args) {
- super(key, args);
- }
-
- public SerializationException(Localizable arg) {
- super("nestedSerializationError", arg);
- }
-
- public SerializationException(Throwable throwable) {
- super(throwable);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.encoding";
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializerConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializerConstants.java
deleted file mode 100644
index ddbd6247..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializerConstants.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.soap;
-
-/**
- *
- * @author WS Development Team
- */
-public interface SerializerConstants {
- public static final boolean ENCODE_TYPE = true;
- public static final boolean DONT_ENCODE_TYPE = false;
- public static final boolean SERIALIZE_AS_REF = true;
- public static final boolean DONT_SERIALIZE_AS_REF = false;
- public static final boolean REFERENCEABLE = true;
- public static final boolean NOT_REFERENCEABLE = false;
- public static final boolean NULLABLE = true;
- public static final boolean NOT_NULLABLE = false;
- public static final boolean REFERENCED_INSTANCE = true;
- public static final boolean UNREFERENCED_INSTANCE = false;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAP12NamespaceConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAP12NamespaceConstants.java
deleted file mode 100644
index 3d9c8344..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAP12NamespaceConstants.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.soap.streaming;
-
-/**
- * @author WS Development Team
- */
-public class SOAP12NamespaceConstants {
- public static final String XML_NS = "http://www.w3.org/XML/1998/namespace";
- public static final String ENVELOPE =
- "http://www.w3.org/2003/05/soap-envelope";
- public static final String ENCODING =
- "http://www.w3.org/2003/05/soap-encoding";
- public static final String SOAP_RPC = "http://www.w3.org/2002/06/soap-rpc";
- public static final String XSD = "http://www.w3.org/2001/XMLSchema";
- public static final String XSI =
- "http://www.w3.org/2001/XMLSchema-instance";
- public static final String TRANSPORT_HTTP =
- "http://www.w3.org/2003/05/soap/bindings/HTTP/";
-
- public static final String ACTOR_NEXT = "http://www.w3.org/2003/05/soap-envelope/role/next";
-
- public static final String ROLE_NEXT =
- "http://www.w3.org/2003/05/soap-envelope/role/next";
- public static final String ROLE_NONE = "http://www.w3.org/2003/05/soap-envelope/role/none";
- public static final String ROLE_ULTIMATE_RECEIVER = "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver";
-
- public static final String SOAP_UPGRADE =
- "http://www.w3.org/2002/06/soap-upgrade";
-
- public static final String TAG_ENVELOPE = "Envelope";
- public static final String TAG_HEADER = "Header";
- public static final String TAG_BODY = "Body";
- public static final String TAG_RESULT = "result";
- public static final String TAG_NOT_UNDERSTOOD = "NotUnderstood";
-
- public static final String ATTR_ACTOR = "role";
- public static final String ATTR_MUST_UNDERSTAND = "mustUnderstand";
- public static final String ATTR_MISUNDERSTOOD = "missUnderstood";
- public static final String ATTR_ENCODING_STYLE = "encodingStyle";
- public static final String ATTR_NOT_UNDERSTOOD_QNAME = "qname";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAPNamespaceConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAPNamespaceConstants.java
deleted file mode 100644
index e500da3a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAPNamespaceConstants.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.soap.streaming;
-
-/**
- * @author WS Development Team
- */
-public class SOAPNamespaceConstants {
- public static final String NSPREFIX_SOAP_ENVELOPE = "soapenv";
- public static final String ENVELOPE = "http://schemas.xmlsoap.org/soap/envelope/";
- public static final String ENCODING =
- "http://schemas.xmlsoap.org/soap/encoding/";
- public static final String XSD = "http://www.w3.org/2001/XMLSchema";
- public static final String XSI =
- "http://www.w3.org/2001/XMLSchema-instance";
- public static final String XMLNS = "http://www.w3.org/XML/1998/namespace";
- public static final String TRANSPORT_HTTP =
- "http://schemas.xmlsoap.org/soap/http";
- public static final String ACTOR_NEXT =
- "http://schemas.xmlsoap.org/soap/actor/next";
-
- public static final String TAG_ENVELOPE = "Envelope";
- public static final String TAG_HEADER = "Header";
- public static final String TAG_BODY = "Body";
- public static final String TAG_FAULT = "Fault";
-
- public static final String ATTR_ACTOR = "actor";
- public static final String ATTR_MUST_UNDERSTAND = "mustUnderstand";
- public static final String ATTR_ENCODING_STYLE = "encodingStyle";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLCodec.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLCodec.java
deleted file mode 100644
index a4fabbb3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLCodec.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.encoding.xml;
-
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.encoding.ContentTypeImpl;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.channels.ReadableByteChannel;
-import java.nio.channels.WritableByteChannel;
-
-public final class XMLCodec implements Codec {
- public static final String XML_APPLICATION_MIME_TYPE = "application/xml";
-
- public static final String XML_TEXT_MIME_TYPE = "text/xml";
-
- private static final ContentType contentType = new ContentTypeImpl(XML_TEXT_MIME_TYPE);
-
-// private final WSBinding binding;
- private WSFeatureList features;
-
- public XMLCodec(WSFeatureList f) {
-// this.binding = binding;
- features = f;
- }
-
- public String getMimeType() {
- return XML_APPLICATION_MIME_TYPE;
- }
-
- public ContentType getStaticContentType(Packet packet) {
- return contentType;
- }
-
- public ContentType encode(Packet packet, OutputStream out) {
- String encoding = (String) packet.invocationProperties
- .get(XMLConstants.OUTPUT_XML_CHARACTER_ENCODING);
-
- XMLStreamWriter writer = null;
-
- if (encoding != null && encoding.length() > 0) {
- writer = XMLStreamWriterFactory.create(out, encoding);
- } else {
- writer = XMLStreamWriterFactory.create(out);
- }
-
- try {
- if (packet.getMessage().hasPayload()){
- writer.writeStartDocument();
- packet.getMessage().writePayloadTo(writer);
- writer.flush();
- }
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- return contentType;
- }
-
- public ContentType encode(Packet packet, WritableByteChannel buffer) {
- //TODO: not yet implemented
- throw new UnsupportedOperationException();
- }
-
- public Codec copy() {
- return this;
- }
-
- public void decode(InputStream in, String contentType, Packet packet) throws IOException {
- Message message = XMLMessage.create(contentType, in, features);
- packet.setMessage(message);
- }
-
- public void decode(ReadableByteChannel in, String contentType, Packet packet) {
- // TODO
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLConstants.java
deleted file mode 100644
index 5a0a6d4b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLConstants.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.xml;
-
-public class XMLConstants {
-
- public static final String OUTPUT_XML_CHARACTER_ENCODING = "com.sun.jaxws.rest.contenttype";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLMessage.java
deleted file mode 100644
index f9f8e989..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLMessage.java
+++ /dev/null
@@ -1,636 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.encoding.xml;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.api.message.*;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory;
-import com.sun.xml.internal.ws.developer.StreamingAttachmentFeature;
-import com.sun.xml.internal.ws.encoding.ContentType;
-import com.sun.xml.internal.ws.encoding.MimeMultipartParser;
-import com.sun.xml.internal.ws.encoding.XMLHTTPBindingCodec;
-import com.sun.xml.internal.ws.message.AbstractMessageImpl;
-import com.sun.xml.internal.ws.message.EmptyMessageImpl;
-import com.sun.xml.internal.ws.message.MimeAttachmentSet;
-import com.sun.xml.internal.ws.message.source.PayloadSourceMessage;
-import com.sun.xml.internal.ws.util.ByteArrayBuffer;
-import com.sun.xml.internal.ws.util.StreamUtils;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import javax.activation.DataSource;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.WebServiceException;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- *
- * @author Jitendra Kotamraju
- */
-public final class XMLMessage {
-
- private static final int PLAIN_XML_FLAG = 1; // 00001
- private static final int MIME_MULTIPART_FLAG = 2; // 00010
- private static final int FI_ENCODED_FLAG = 16; // 10000
-
- /*
- * Construct a message given a content type and an input stream.
- */
- public static Message create(final String ct, InputStream in, WSFeatureList f) {
- Message data;
- try {
- in = StreamUtils.hasSomeData(in);
- if (in == null) {
- return Messages.createEmpty(SOAPVersion.SOAP_11);
- }
-
- if (ct != null) {
- final ContentType contentType = new ContentType(ct);
- final int contentTypeId = identifyContentType(contentType);
- if ((contentTypeId & MIME_MULTIPART_FLAG) != 0) {
- data = new XMLMultiPart(ct, in, f);
- } else if ((contentTypeId & PLAIN_XML_FLAG) != 0) {
- data = new XmlContent(ct, in, f);
- } else {
- data = new UnknownContent(ct, in);
- }
- } else {
- // According to HTTP spec 7.2.1, if the media type remain
- // unknown, treat as application/octet-stream
- data = new UnknownContent("application/octet-stream", in);
- }
- } catch(Exception ex) {
- throw new WebServiceException(ex);
- }
- return data;
- }
-
-
- public static Message create(Source source) {
- return (source == null) ?
- Messages.createEmpty(SOAPVersion.SOAP_11) :
- Messages.createUsingPayload(source, SOAPVersion.SOAP_11);
- }
-
- public static Message create(DataSource ds, WSFeatureList f) {
- try {
- return (ds == null) ?
- Messages.createEmpty(SOAPVersion.SOAP_11) :
- create(ds.getContentType(), ds.getInputStream(), f);
- } catch(IOException ioe) {
- throw new WebServiceException(ioe);
- }
- }
-
- public static Message create(Exception e) {
- return new FaultMessage(SOAPVersion.SOAP_11);
- }
-
- /*
- * Get the content type ID from the content type.
- */
- private static int getContentId(String ct) {
- try {
- final ContentType contentType = new ContentType(ct);
- return identifyContentType(contentType);
- } catch(Exception ex) {
- throw new WebServiceException(ex);
- }
- }
-
- /**
- * Return true if the content uses fast infoset.
- */
- public static boolean isFastInfoset(String ct) {
- return (getContentId(ct) & FI_ENCODED_FLAG) != 0;
- }
-
- /*
- * Verify a contentType.
- *
- * @return
- * MIME_MULTIPART_FLAG | PLAIN_XML_FLAG
- * MIME_MULTIPART_FLAG | FI_ENCODED_FLAG;
- * PLAIN_XML_FLAG
- * FI_ENCODED_FLAG
- *
- */
- public static int identifyContentType(ContentType contentType) {
- String primary = contentType.getPrimaryType();
- String sub = contentType.getSubType();
-
- if (primary.equalsIgnoreCase("multipart") && sub.equalsIgnoreCase("related")) {
- String type = contentType.getParameter("type");
- if (type != null) {
- if (isXMLType(type)) {
- return MIME_MULTIPART_FLAG | PLAIN_XML_FLAG;
- } else if (isFastInfosetType(type)) {
- return MIME_MULTIPART_FLAG | FI_ENCODED_FLAG;
- }
- }
- return 0;
- } else if (isXMLType(primary, sub)) {
- return PLAIN_XML_FLAG;
- } else if (isFastInfosetType(primary, sub)) {
- return FI_ENCODED_FLAG;
- }
- return 0;
- }
-
- protected static boolean isXMLType(@NotNull String primary, @NotNull String sub) {
- return (primary.equalsIgnoreCase("text") && sub.equalsIgnoreCase("xml"))
- || (primary.equalsIgnoreCase("application") && sub.equalsIgnoreCase("xml"))
- || (primary.equalsIgnoreCase("application") && sub.toLowerCase().endsWith("+xml"));
- }
-
- protected static boolean isXMLType(String type) {
- String lowerType = type.toLowerCase();
- return lowerType.startsWith("text/xml")
- || lowerType.startsWith("application/xml")
- || (lowerType.startsWith("application/") && (lowerType.indexOf("+xml") != -1));
- }
-
- protected static boolean isFastInfosetType(String primary, String sub) {
- return primary.equalsIgnoreCase("application") && sub.equalsIgnoreCase("fastinfoset");
- }
-
- protected static boolean isFastInfosetType(String type) {
- return type.toLowerCase().startsWith("application/fastinfoset");
- }
-
-
- /**
- * Access a {@link Message} as a {@link DataSource}.
- * <p>
- * A {@link Message} implementation will implement this if the
- * messages is to be access as data source.
- * <p>
- * TODO: consider putting as part of the API.
- */
- public static interface MessageDataSource {
- /**
- * Check if the data source has been consumed.
- * @return true of the data source has been consumed, otherwise false.
- */
- boolean hasUnconsumedDataSource();
-
- /**
- * Get the data source.
- * @return the data source.
- */
- DataSource getDataSource();
- }
-
- /**
- * It's conent-type is some XML type
- *
- */
- private static class XmlContent extends AbstractMessageImpl implements MessageDataSource {
- private final XmlDataSource dataSource;
- private boolean consumed;
- private Message delegate;
- private final HeaderList headerList;
-// private final WSBinding binding;
- private WSFeatureList features;
-
- public XmlContent(String ct, InputStream in, WSFeatureList f) {
- super(SOAPVersion.SOAP_11);
- dataSource = new XmlDataSource(ct, in);
- this.headerList = new HeaderList(SOAPVersion.SOAP_11);
-// this.binding = binding;
- features = f;
- }
-
- private Message getMessage() {
- if (delegate == null) {
- InputStream in = dataSource.getInputStream();
- assert in != null;
- delegate = Messages.createUsingPayload(new StreamSource(in), SOAPVersion.SOAP_11);
- consumed = true;
- }
- return delegate;
- }
-
- public boolean hasUnconsumedDataSource() {
- return !dataSource.consumed()&&!consumed;
- }
-
- public DataSource getDataSource() {
- return hasUnconsumedDataSource() ? dataSource :
- XMLMessage.getDataSource(getMessage(), features);
- }
-
- public boolean hasHeaders() {
- return false;
- }
-
- public @NotNull MessageHeaders getHeaders() {
- return headerList;
- }
-
- public String getPayloadLocalPart() {
- return getMessage().getPayloadLocalPart();
- }
-
- public String getPayloadNamespaceURI() {
- return getMessage().getPayloadNamespaceURI();
- }
-
- public boolean hasPayload() {
- return true;
- }
-
- public boolean isFault() {
- return false;
- }
-
- public Source readEnvelopeAsSource() {
- return getMessage().readEnvelopeAsSource();
- }
-
- public Source readPayloadAsSource() {
- return getMessage().readPayloadAsSource();
- }
-
- public SOAPMessage readAsSOAPMessage() throws SOAPException {
- return getMessage().readAsSOAPMessage();
- }
-
- public SOAPMessage readAsSOAPMessage(Packet packet, boolean inbound) throws SOAPException {
- return getMessage().readAsSOAPMessage(packet, inbound);
- }
-
- public <T> T readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
- return (T)getMessage().readPayloadAsJAXB(unmarshaller);
- }
- /** @deprecated */
- public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
- return getMessage().readPayloadAsJAXB(bridge);
- }
-
- public XMLStreamReader readPayload() throws XMLStreamException {
- return getMessage().readPayload();
- }
-
-
- public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
- getMessage().writePayloadTo(sw);
- }
-
- public void writeTo(XMLStreamWriter sw) throws XMLStreamException {
- getMessage().writeTo(sw);
- }
-
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
- getMessage().writeTo(contentHandler, errorHandler);
- }
-
- public Message copy() {
- return getMessage().copy();
- }
-
- protected void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
- throw new UnsupportedOperationException();
- }
-
- }
-
-
-
- /**
- * Data represented as a multi-part MIME message.
- * <p>
- * The root part may be an XML or an FI document. This class
- * parses MIME message lazily.
- */
- public static final class XMLMultiPart extends AbstractMessageImpl implements MessageDataSource {
- private final DataSource dataSource;
- private final StreamingAttachmentFeature feature;
- private Message delegate;
- private HeaderList headerList;// = new HeaderList();
-// private final WSBinding binding;
- private final WSFeatureList features;
-
- public XMLMultiPart(final String contentType, final InputStream is, WSFeatureList f) {
- super(SOAPVersion.SOAP_11);
- headerList = new HeaderList(SOAPVersion.SOAP_11);
- dataSource = createDataSource(contentType, is);
- this.feature = f.get(StreamingAttachmentFeature.class);
- this.features = f;
- }
-
- private Message getMessage() {
- if (delegate == null) {
- MimeMultipartParser mpp;
- try {
- mpp = new MimeMultipartParser(dataSource.getInputStream(),
- dataSource.getContentType(), feature);
- } catch(IOException ioe) {
- throw new WebServiceException(ioe);
- }
- InputStream in = mpp.getRootPart().asInputStream();
- assert in != null;
- delegate = new PayloadSourceMessage(headerList, new StreamSource(in), new MimeAttachmentSet(mpp), SOAPVersion.SOAP_11);
- }
- return delegate;
- }
-
- public boolean hasUnconsumedDataSource() {
- return delegate == null;
- }
-
- public DataSource getDataSource() {
- return hasUnconsumedDataSource() ? dataSource :
- XMLMessage.getDataSource(getMessage(), features);
- }
-
- public boolean hasHeaders() {
- return false;
- }
-
- public @NotNull MessageHeaders getHeaders() {
- return headerList;
- }
-
- public String getPayloadLocalPart() {
- return getMessage().getPayloadLocalPart();
- }
-
- public String getPayloadNamespaceURI() {
- return getMessage().getPayloadNamespaceURI();
- }
-
- public boolean hasPayload() {
- return true;
- }
-
- public boolean isFault() {
- return false;
- }
-
- public Source readEnvelopeAsSource() {
- return getMessage().readEnvelopeAsSource();
- }
-
- public Source readPayloadAsSource() {
- return getMessage().readPayloadAsSource();
- }
-
- public SOAPMessage readAsSOAPMessage() throws SOAPException {
- return getMessage().readAsSOAPMessage();
- }
-
- public SOAPMessage readAsSOAPMessage(Packet packet, boolean inbound) throws SOAPException {
- return getMessage().readAsSOAPMessage(packet, inbound);
- }
-
- public <T> T readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
- return (T)getMessage().readPayloadAsJAXB(unmarshaller);
- }
-
- public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
- return getMessage().readPayloadAsJAXB(bridge);
- }
-
- public XMLStreamReader readPayload() throws XMLStreamException {
- return getMessage().readPayload();
- }
-
- public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
- getMessage().writePayloadTo(sw);
- }
-
- public void writeTo(XMLStreamWriter sw) throws XMLStreamException {
- getMessage().writeTo(sw);
- }
-
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
- getMessage().writeTo(contentHandler, errorHandler);
- }
-
- public Message copy() {
- return getMessage().copy();
- }
-
- protected void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean isOneWay(@NotNull WSDLPort port) {
- return false;
- }
-
- public @NotNull AttachmentSet getAttachments() {
- return getMessage().getAttachments();
- }
-
- }
-
- private static class FaultMessage extends EmptyMessageImpl {
-
- public FaultMessage(SOAPVersion version) {
- super(version);
- }
-
- @Override
- public boolean isFault() {
- return true;
- }
- }
-
-
- /**
- * Don't know about this content. It's conent-type is NOT the XML types
- * we recognize(text/xml, application/xml, multipart/related;text/xml etc).
- *
- * This could be used to represent image/jpeg etc
- */
- public static class UnknownContent extends AbstractMessageImpl implements MessageDataSource {
- private final DataSource ds;
- private final HeaderList headerList;
-
- public UnknownContent(final String ct, final InputStream in) {
- this(createDataSource(ct,in));
- }
-
- public UnknownContent(DataSource ds) {
- super(SOAPVersion.SOAP_11);
- this.ds = ds;
- this.headerList = new HeaderList(SOAPVersion.SOAP_11);
- }
-
- /*
- * Copy constructor.
- */
- private UnknownContent(UnknownContent that) {
- super(that.soapVersion);
- this.ds = that.ds;
- this.headerList = HeaderList.copy(that.headerList);
- }
-
- public boolean hasUnconsumedDataSource() {
- return true;
- }
-
- public DataSource getDataSource() {
- assert ds != null;
- return ds;
- }
-
- protected void writePayloadTo(ContentHandler contentHandler,
- ErrorHandler errorHandler, boolean fragment) throws SAXException {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasHeaders() {
- return false;
- }
-
- public boolean isFault() {
- return false;
- }
-
- public MessageHeaders getHeaders() {
- return headerList;
- }
-
- public String getPayloadLocalPart() {
- throw new UnsupportedOperationException();
- }
-
- public String getPayloadNamespaceURI() {
- throw new UnsupportedOperationException();
- }
-
- public boolean hasPayload() {
- return false;
- }
-
- public Source readPayloadAsSource() {
- return null;
- }
-
- public XMLStreamReader readPayload() throws XMLStreamException {
- throw new WebServiceException("There isn't XML payload. Shouldn't come here.");
- }
-
- public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
- // No XML. Nothing to do
- }
-
- public Message copy() {
- return new UnknownContent(this);
- }
-
- }
-
- public static DataSource getDataSource(Message msg, WSFeatureList f) {
- if (msg == null)
- return null;
- if (msg instanceof MessageDataSource) {
- return ((MessageDataSource)msg).getDataSource();
- } else {
- AttachmentSet atts = msg.getAttachments();
- if (atts != null && !atts.isEmpty()) {
- final ByteArrayBuffer bos = new ByteArrayBuffer();
- try {
- Codec codec = new XMLHTTPBindingCodec(f);
- Packet packet = new Packet(msg);
- com.sun.xml.internal.ws.api.pipe.ContentType ct = codec.getStaticContentType(packet);
- codec.encode(packet, bos);
- return createDataSource(ct.getContentType(), bos.newInputStream());
- } catch(IOException ioe) {
- throw new WebServiceException(ioe);
- }
-
- } else {
- final ByteArrayBuffer bos = new ByteArrayBuffer();
- XMLStreamWriter writer = XMLStreamWriterFactory.create(bos);
- try {
- msg.writePayloadTo(writer);
- writer.flush();
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- return XMLMessage.createDataSource("text/xml", bos.newInputStream());
- }
- }
- }
-
- public static DataSource createDataSource(final String contentType, final InputStream is) {
- return new XmlDataSource(contentType, is);
- }
-
- private static class XmlDataSource implements DataSource {
- private final String contentType;
- private final InputStream is;
- private boolean consumed;
-
- XmlDataSource(String contentType, final InputStream is) {
- this.contentType = contentType;
- this.is = is;
- }
-
- public boolean consumed() {
- return consumed;
- }
-
- public InputStream getInputStream() {
- consumed = !consumed;
- return is;
- }
-
- public OutputStream getOutputStream() {
- return null;
- }
-
- public String getContentType() {
- return contentType;
- }
-
- public String getName() {
- return "";
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLPropertyBag.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLPropertyBag.java
deleted file mode 100644
index a8851a21..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLPropertyBag.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.encoding.xml;
-
-import com.oracle.webservices.internal.api.message.BasePropertySet;
-import com.oracle.webservices.internal.api.message.PropertySet;
-
-public class XMLPropertyBag extends BasePropertySet {
-
- private String contentType;
- protected PropertyMap getPropertyMap() {
- return model;
- }
-
- @Property(XMLConstants.OUTPUT_XML_CHARACTER_ENCODING)
- public String getXMLContentType(){
- return contentType;
- }
-
- public void setXMLContentType(String content){
- contentType = content;
- }
-
- private static final PropertyMap model;
-
- static {
- model = parse(XMLPropertyBag.class);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/CodeType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/CodeType.java
deleted file mode 100644
index 58f356cb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/CodeType.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.fault;
-
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.namespace.QName;
-
-/**
- * <pre>
- * &lt;env:Code>
- * &lt;env:Value>env:Sender&lt;/env:Value>
- * &lt;env:Subcode>
- * &lt;env:Value>m:MessageTimeout1&lt;/env:Value>
- * &lt;env:Subcode>
- * &lt;env:Value>m:MessageTimeout2&lt;/env:Value>
- * &lt;/env:Subcode>
- * &lt;/env:Subcode>
- * &lt;/env:Code>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "CodeType", namespace = "http://www.w3.org/2003/05/soap-envelope", propOrder = {
- "Value",
- "Subcode"
-})
-class CodeType {
- @XmlTransient
- private static final String ns="http://www.w3.org/2003/05/soap-envelope";
-
- /**
- * mandatory, minOccurs=1
- */
- @XmlElement(namespace = ns)
- private QName Value;
-
- /**
- * optional, minOcccurs=0, maxOccurs="1"
- */
- @XmlElement(namespace = ns)
- private SubcodeType Subcode;
-
- CodeType(QName value) {
- Value = value;
- }
-
- CodeType() {
- }
-
- QName getValue(){
- return Value;
- }
-
- SubcodeType getSubcode(){
- return Subcode;
- }
-
- void setSubcode(SubcodeType subcode) {
- Subcode = subcode;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/DetailType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/DetailType.java
deleted file mode 100644
index 7f405325..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/DetailType.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.fault;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import javax.xml.bind.annotation.XmlAnyElement;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * &lt;env:Detail>
- * &lt;m:MaxTime>P5M</m:MaxTime>
- * &lt;/env:Detail>
- */
-class DetailType {
- /**
- * The detail entry could be 0 or more elements. Perhaps some elements may be
- * known to JAXB while others can be handled using DOMHandler.
- *
- * Even though the jaxbContext is aware of the detail jaxbBean but we get the list of
- * {@link org.w3c.dom.Node}s.
- *
- * this is because since we unmarshall using {@link com.sun.xml.internal.bind.api.Bridge} all we're
- * going to get during unmarshalling is {@link org.w3c.dom.Node} and not the jaxb bean instances.
- *
- * TODO: For now detailEntry would be List of Node isntead of Object and it needs to be changed to
- * {@link Object} once we have better solution that working thru {@link com.sun.xml.internal.bind.api.Bridge}
- */
- @XmlAnyElement
- private final List<Element> detailEntry = new ArrayList<Element>();
-
- @NotNull
- List<Element> getDetails() {
- return detailEntry;
- }
-
- /**
- * Gets the n-th detail object, or null if no such item exists.
- */
- @Nullable
- Node getDetail(int n) {
- if(n < detailEntry.size())
- return detailEntry.get(n);
- else
- return null;
- }
-
- DetailType(Element detailObject) {
- if(detailObject != null)
- detailEntry.add(detailObject);
- }
-
- DetailType() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ExceptionBean.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ExceptionBean.java
deleted file mode 100644
index 83701464..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ExceptionBean.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.fault;
-
-import com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper;
-import com.sun.xml.internal.ws.developer.ServerSideException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.PropertyException;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * JAXB-bound bean that captures the exception and its call stack.
- *
- * <p>
- * This is used to capture the stack trace of the server side error and
- * send that over to the client.
- *
- * @author Kohsuke Kawaguchi
- */
-@XmlRootElement(namespace=ExceptionBean.NS,name=ExceptionBean.LOCAL_NAME)
-final class ExceptionBean {
- /**
- * Converts the given {@link Throwable} into an XML representation
- * and put that as a DOM tree under the given node.
- */
- public static void marshal( Throwable t, Node parent ) throws JAXBException {
- Marshaller m = JAXB_CONTEXT.createMarshaller();
- try {
- m.setProperty("com.sun.xml.internal.bind.namespacePrefixMapper",nsp);
- } catch (PropertyException pe) {}
- m.marshal(new ExceptionBean(t), parent );
- }
-
- /**
- * Does the reverse operation of {@link #marshal(Throwable, Node)}. Constructs an
- * {@link Exception} object from the XML.
- */
- public static ServerSideException unmarshal( Node xml ) throws JAXBException {
- ExceptionBean e = (ExceptionBean) JAXB_CONTEXT.createUnmarshaller().unmarshal(xml);
- return e.toException();
- }
-
- @XmlAttribute(name="class")
- public String className;
- @XmlElement
- public String message;
- @XmlElementWrapper(namespace=NS,name="stackTrace")
- @XmlElement(namespace=NS,name="frame")
- public List<StackFrame> stackTrace = new ArrayList<StackFrame>();
- @XmlElement(namespace=NS,name="cause")
- public ExceptionBean cause;
-
- // so that people noticed this fragment can turn it off
- @XmlAttribute
- public String note = "To disable this feature, set "+SOAPFaultBuilder.CAPTURE_STACK_TRACE_PROPERTY+" system property to false";
-
- ExceptionBean() {// for JAXB
- }
-
- /**
- * Creates an {@link ExceptionBean} tree that represents the given {@link Throwable}.
- */
- private ExceptionBean(Throwable t) {
- this.className = t.getClass().getName();
- this.message = t.getMessage();
-
- for (StackTraceElement f : t.getStackTrace()) {
- stackTrace.add(new StackFrame(f));
- }
-
- Throwable cause = t.getCause();
- if(t!=cause && cause!=null)
- this.cause = new ExceptionBean(cause);
- }
-
- private ServerSideException toException() {
- ServerSideException e = new ServerSideException(className,message);
- if(stackTrace!=null) {
- StackTraceElement[] ste = new StackTraceElement[stackTrace.size()];
- for( int i=0; i<stackTrace.size(); i++ )
- ste[i] = stackTrace.get(i).toStackTraceElement();
- e.setStackTrace(ste);
- }
- if(cause!=null)
- e.initCause(cause.toException());
- return e;
- }
-
- /**
- * Captures one stack frame.
- */
- static final class StackFrame {
- @XmlAttribute(name="class")
- public String declaringClass;
- @XmlAttribute(name="method")
- public String methodName;
- @XmlAttribute(name="file")
- public String fileName;
- @XmlAttribute(name="line")
- public String lineNumber;
-
- StackFrame() {// for JAXB
- }
-
- public StackFrame(StackTraceElement ste) {
- this.declaringClass = ste.getClassName();
- this.methodName = ste.getMethodName();
- this.fileName = ste.getFileName();
- this.lineNumber = box(ste.getLineNumber());
- }
-
- private String box(int i) {
- if(i>=0) return String.valueOf(i);
- if(i==-2) return "native";
- return "unknown";
- }
-
- private int unbox(String v) {
- try {
- return Integer.parseInt(v);
- } catch (NumberFormatException e) {
- if ("native".equals(v)) {
- return -2;
- }
- return -1;
- }
- }
-
- private StackTraceElement toStackTraceElement() {
- return new StackTraceElement(declaringClass,methodName,fileName,unbox(lineNumber));
- }
- }
-
- /**
- * Checks if the given element is the XML representation of {@link ExceptionBean}.
- */
- public static boolean isStackTraceXml(Element n) {
- return LOCAL_NAME.equals(n.getLocalName()) && NS.equals(n.getNamespaceURI());
- }
-
- private static final JAXBContext JAXB_CONTEXT;
-
- /**
- * Namespace URI.
- */
- /*package*/ static final String NS = "http://jax-ws.dev.java.net/";
-
- /*package*/ static final String LOCAL_NAME = "exception";
-
- static {
- try {
- JAXB_CONTEXT = JAXBContext.newInstance(ExceptionBean.class);
- } catch (JAXBException e) {
- // this must be a bug in our code
- throw new Error(e);
- }
- }
-
- private static final NamespacePrefixMapper nsp = new NamespacePrefixMapper() {
- public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) {
- if (NS.equals(namespaceUri)) {
- return "";
- }
- return suggestion;
- }
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ReasonType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ReasonType.java
deleted file mode 100644
index 8ed7e040..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ReasonType.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.fault;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * <pre>
- * &lt;env:Reason>
- * &lt;env:Text xml:lang="en">Sender Timeout</env:Text>
- * &lt;/env:Reason>
- * </pre>
- */
-class ReasonType {
- ReasonType() {
- }
-
- ReasonType(String txt) {
- text.add(new TextType(txt));
- }
-
-
-
- /**
- * minOccurs=1 maxOccurs=unbounded
- */
- @XmlElements(@XmlElement(name = "Text", namespace = "http://www.w3.org/2003/05/soap-envelope", type = TextType.class))
- private final List<TextType> text = new ArrayList<TextType>();
-
- List<TextType> texts() {
- return text;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP11Fault.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP11Fault.java
deleted file mode 100644
index 927ee131..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP11Fault.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.fault;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.util.DOMUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import javax.xml.bind.annotation.*;
-import javax.xml.namespace.QName;
-import javax.xml.soap.Detail;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFault;
-import javax.xml.ws.WebServiceException;
-import java.util.Iterator;
-
-/**
- * This class represents SOAP1.1 Fault. This class will be used to marshall/unmarshall a soap fault using JAXB.
- * <p/>
- * <pre>
- * Example:
- * <p/>
- * &lt;soap:Fault xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
- * &lt;faultcode>soap:Client&lt;/faultcode>
- * &lt;faultstring>Invalid message format&lt;/faultstring>
- * &lt;faultactor>http://example.org/someactor&lt;/faultactor>
- * &lt;detail>
- * &lt;m:msg xmlns:m='http://example.org/faults/exceptions'>
- * Test message
- * &lt;/m:msg>
- * &lt;/detail>
- * &lt;/soap:Fault>
- * <p/>
- * Above, m:msg, if a known fault (described in the WSDL), IOW, if m:msg is known by JAXBContext it should be unmarshalled into a
- * Java object otherwise it should be deserialized as {@link javax.xml.soap.Detail}
- * </pre>
- * <p/>
- *
- * @author Vivek Pandey
- */
-
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
- "faultcode",
- "faultstring",
- "faultactor",
- "detail"
- })
-@XmlRootElement(name = "Fault", namespace = "http://schemas.xmlsoap.org/soap/envelope/")
-class SOAP11Fault extends SOAPFaultBuilder {
- @XmlElement(namespace = "")
- private QName faultcode;
-
- @XmlElement(namespace = "")
- private String faultstring;
-
- @XmlElement(namespace = "")
- private String faultactor;
-
- @XmlElement(namespace = "")
- private DetailType detail;
-
- SOAP11Fault() {
- }
-
- /**
- * This constructor takes soap fault detail among other things. The detail could represent {@link javax.xml.soap.Detail}
- * or a java object that can be marshalled/unmarshalled by JAXB.
- *
- * @param code
- * @param reason
- * @param actor
- * @param detailObject
- */
- SOAP11Fault(QName code, String reason, String actor, Element detailObject) {
- this.faultcode = code;
- this.faultstring = reason;
- this.faultactor = actor;
- if (detailObject != null) {
- if ((detailObject.getNamespaceURI() == null ||
- "".equals(detailObject.getNamespaceURI())) && "detail".equals(detailObject.getLocalName())) {
- detail = new DetailType();
- for(Element detailEntry : DOMUtil.getChildElements(detailObject)) {
- detail.getDetails().add(detailEntry);
- }
- } else {
- detail = new DetailType(detailObject);
- }
- }
- }
-
- SOAP11Fault(SOAPFault fault) {
- this.faultcode = fault.getFaultCodeAsQName();
- this.faultstring = fault.getFaultString();
- this.faultactor = fault.getFaultActor();
- if (fault.getDetail() != null) {
- detail = new DetailType();
- Iterator iter = fault.getDetail().getDetailEntries();
- while(iter.hasNext()){
- Element fd = (Element)iter.next();
- detail.getDetails().add(fd);
- }
- }
- }
-
- QName getFaultcode() {
- return faultcode;
- }
-
- void setFaultcode(QName faultcode) {
- this.faultcode = faultcode;
- }
-
- @Override
- String getFaultString() {
- return faultstring;
- }
-
- void setFaultstring(String faultstring) {
- this.faultstring = faultstring;
- }
-
- String getFaultactor() {
- return faultactor;
- }
-
- void setFaultactor(String faultactor) {
- this.faultactor = faultactor;
- }
-
- /**
- * returns the object that represents detail.
- */
- @Override
- DetailType getDetail() {
- return detail;
- }
-
- void setDetail(DetailType detail) {
- this.detail = detail;
- }
-
- protected Throwable getProtocolException() {
- try {
- SOAPFault fault = SOAPVersion.SOAP_11.getSOAPFactory().createFault(faultstring, faultcode);
- fault.setFaultActor(faultactor);
- if(detail != null){
- Detail d = fault.addDetail();
- for(Element det : detail.getDetails()){
- Node n = fault.getOwnerDocument().importNode(det, true);
- d.appendChild(n);
- }
- }
- return new ServerSOAPFaultException(fault);
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP12Fault.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP12Fault.java
deleted file mode 100644
index 4a508a50..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP12Fault.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.fault;
-
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.util.DOMUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFault;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.soap.SOAPFaultException;
-import java.util.Iterator;
-
-/**
- * SOAP 1.2 Fault class that can be marshalled/unmarshalled by JAXB
- * <p/>
- * <pre>
- * Example:
- * &lt;env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
- * xmlns:m="http://www.example.org/timeouts"
- * xmlns:xml="http://www.w3.org/XML/1998/namespace">
- * &lt;env:Body>
- * &lt;env:Fault>
- * &lt;env:Code>
- * &lt;env:Value>env:Sender* &lt;/env:Value>
- * &lt;env:Subcode>
- * &lt;env:Value>m:MessageTimeout* &lt;/env:Value>
- * &lt;/env:Subcode>
- * &lt;/env:Code>
- * &lt;env:Reason>
- * &lt;env:Text xml:lang="en">Sender Timeout* &lt;/env:Text>
- * &lt;/env:Reason>
- * &lt;env:Detail>
- * &lt;m:MaxTime>P5M* &lt;/m:MaxTime>
- * &lt;/env:Detail>
- * &lt;/env:Fault>
- * &lt;/env:Body>
- * &lt;/env:Envelope>
- * </pre>
- *
- * @author Vivek Pandey
- */
-@XmlRootElement(name = "Fault", namespace = "http://www.w3.org/2003/05/soap-envelope")
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
- "code",
- "reason",
- "node",
- "role",
- "detail"
-})
-class SOAP12Fault extends SOAPFaultBuilder {
- @XmlTransient
- private static final String ns = "http://www.w3.org/2003/05/soap-envelope";
-
- @XmlElement(namespace=ns, name="Code")
- private CodeType code;
-
- @XmlElement(namespace=ns, name="Reason")
- private ReasonType reason;
-
- @XmlElement(namespace=ns, name="Node")
- private String node;
-
- @XmlElement(namespace=ns, name="Role")
- private String role;
-
- @XmlElement(namespace=ns, name="Detail")
- private DetailType detail;
-
- SOAP12Fault() {
- }
-
- SOAP12Fault(CodeType code, ReasonType reason, String node, String role, DetailType detail) {
- this.code = code;
- this.reason = reason;
- this.node = node;
- this.role = role;
- this.detail = detail;
- }
-
- SOAP12Fault(CodeType code, ReasonType reason, String node, String role, Element detailObject) {
- this.code = code;
- this.reason = reason;
- this.node = node;
- this.role = role;
- if (detailObject != null) {
- if(detailObject.getNamespaceURI().equals(ns) && detailObject.getLocalName().equals("Detail")){
- detail = new DetailType();
- for(Element detailEntry : DOMUtil.getChildElements(detailObject)){
- detail.getDetails().add(detailEntry);
- }
- }else{
- detail = new DetailType(detailObject);
- }
- }
- }
-
- SOAP12Fault(SOAPFault fault) {
- code = new CodeType(fault.getFaultCodeAsQName());
- try {
- fillFaultSubCodes(fault);
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
-
- reason = new ReasonType(fault.getFaultString());
- role = fault.getFaultRole();
- node = fault.getFaultNode();
- if (fault.getDetail() != null) {
- detail = new DetailType();
- Iterator iter = fault.getDetail().getDetailEntries();
- while(iter.hasNext()){
- Element fd = (Element)iter.next();
- detail.getDetails().add(fd);
- }
- }
- }
-
- SOAP12Fault(QName code, String reason, Element detailObject) {
- this(new CodeType(code), new ReasonType(reason), null, null, detailObject);
- }
-
- CodeType getCode() {
- return code;
- }
-
- ReasonType getReason() {
- return reason;
- }
-
- String getNode() {
- return node;
- }
-
- String getRole() {
- return role;
- }
-
- @Override
- DetailType getDetail() {
- return detail;
- }
-
- @Override
- void setDetail(DetailType detail) {
- this.detail = detail;
- }
-
- @Override
- String getFaultString() {
- return reason.texts().get(0).getText();
- }
-
- protected Throwable getProtocolException() {
- try {
- SOAPFault fault = SOAPVersion.SOAP_12.getSOAPFactory().createFault();;
- if(reason != null){
- for(TextType tt : reason.texts()){
- fault.setFaultString(tt.getText());
- }
- }
-
- if(code != null){
- fault.setFaultCode(code.getValue());
- fillFaultSubCodes(fault, code.getSubcode());
- }
-
- if(detail != null && detail.getDetail(0) != null){
- javax.xml.soap.Detail detail = fault.addDetail();
- for(Node obj: this.detail.getDetails()){
- Node n = fault.getOwnerDocument().importNode(obj, true);
- detail.appendChild(n);
- }
- }
-
- if(node != null) {
- fault.setFaultNode(node);
- }
-
- return new ServerSOAPFaultException(fault);
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-
- /**
- * Recursively populate the Subcodes
- */
- private void fillFaultSubCodes(SOAPFault fault, SubcodeType subcode) throws SOAPException {
- if(subcode != null){
- fault.appendFaultSubcode(subcode.getValue());
- fillFaultSubCodes(fault, subcode.getSubcode());
- }
- }
-
- /**
- * Adds Fault subcodes from {@link SOAPFault} to {@link #code}
- */
- private void fillFaultSubCodes(SOAPFault fault) throws SOAPException {
- Iterator subcodes = fault.getFaultSubcodes();
- SubcodeType firstSct = null;
- while(subcodes.hasNext()){
- QName subcode = (QName)subcodes.next();
- if(firstSct == null){
- firstSct = new SubcodeType(subcode);
- code.setSubcode(firstSct);
- continue;
- }
- SubcodeType nextSct = new SubcodeType(subcode);
- firstSct.setSubcode(nextSct);
- firstSct = nextSct;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java
deleted file mode 100644
index 92bd3b26..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java
+++ /dev/null
@@ -1,601 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.fault;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.model.ExceptionType;
-import com.sun.xml.internal.ws.encoding.soap.SOAP12Constants;
-import com.sun.xml.internal.ws.encoding.soap.SOAPConstants;
-import com.sun.xml.internal.ws.encoding.soap.SerializationException;
-import com.sun.xml.internal.ws.message.jaxb.JAXBMessage;
-import com.sun.xml.internal.ws.message.FaultMessage;
-import com.sun.xml.internal.ws.model.CheckedExceptionImpl;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.util.DOMUtil;
-import com.sun.xml.internal.ws.util.StringUtils;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPFault;
-import javax.xml.soap.Detail;
-import javax.xml.soap.DetailEntry;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.ws.ProtocolException;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.soap.SOAPFaultException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.ReflectPermission;
-import java.security.AccessControlContext;
-import java.security.AccessController;
-import java.security.Permissions;
-import java.security.PrivilegedAction;
-import java.security.ProtectionDomain;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Base class that represents SOAP 1.1 or SOAP 1.2 fault. This class can be used by the invocation handlers to create
- * an Exception from a received messge.
- *
- * @author Vivek Pandey
- */
-public abstract class SOAPFaultBuilder {
-
- /**
- * Gives the {@link DetailType} for a Soap 1.1 or Soap 1.2 message that can be used to create either a checked exception or
- * a protocol specific exception
- */
- abstract DetailType getDetail();
-
- abstract void setDetail(DetailType detailType);
-
- public @XmlTransient @Nullable QName getFirstDetailEntryName() {
- DetailType dt = getDetail();
- if (dt != null) {
- Node entry = dt.getDetail(0);
- if (entry != null) {
- return new QName(entry.getNamespaceURI(), entry.getLocalName());
- }
- }
- return null;
- }
-
- /**
- * gives the fault string that can be used to create an {@link Exception}
- */
- abstract String getFaultString();
-
- /**
- * This should be called from the client side to throw an {@link Exception} for a given soap mesage
- */
- public Throwable createException(Map<QName, CheckedExceptionImpl> exceptions) throws JAXBException {
- DetailType dt = getDetail();
- Node detail = null;
- if(dt != null) detail = dt.getDetail(0);
-
- //return ProtocolException if the detail is not present or there is no checked exception
- if(detail == null || exceptions == null){
- // No soap detail, doesnt look like its a checked exception
- // throw a protocol exception
- return attachServerException(getProtocolException());
- }
-
- //check if the detail is a checked exception, if not throw a ProtocolException
- QName detailName = new QName(detail.getNamespaceURI(), detail.getLocalName());
- CheckedExceptionImpl ce = exceptions.get(detailName);
- if (ce == null) {
- //No Checked exception for the received detail QName, throw a SOAPFault exception
- return attachServerException(getProtocolException());
-
- }
-
- if (ce.getExceptionType().equals(ExceptionType.UserDefined)) {
- return attachServerException(createUserDefinedException(ce));
-
- }
- Class exceptionClass = ce.getExceptionClass();
- try {
- Constructor constructor = exceptionClass.getConstructor(String.class, (Class) ce.getDetailType().type);
- Exception exception = (Exception) constructor.newInstance(getFaultString(), getJAXBObject(detail, ce));
- return attachServerException(exception);
- } catch (Exception e) {
- throw new WebServiceException(e);
- }
- }
-
- /**
- * To be called to convert a {@link ProtocolException} and faultcode for a given {@link SOAPVersion} in to a {@link Message}.
- *
- * @param soapVersion {@link SOAPVersion#SOAP_11} or {@link SOAPVersion#SOAP_12}
- * @param ex a ProtocolException
- * @param faultcode soap faultcode. Its ignored if the {@link ProtocolException} instance is {@link SOAPFaultException} and it has a
- * faultcode present in the underlying {@link SOAPFault}.
- * @return {@link Message} representing SOAP fault
- */
- public static @NotNull Message createSOAPFaultMessage(@NotNull SOAPVersion soapVersion, @NotNull ProtocolException ex, @Nullable QName faultcode){
- Object detail = getFaultDetail(null, ex);
- if(soapVersion == SOAPVersion.SOAP_12)
- return createSOAP12Fault(soapVersion, ex, detail, null, faultcode);
- return createSOAP11Fault(soapVersion, ex, detail, null, faultcode);
- }
-
- /**
- * To be called by the server runtime in the situations when there is an Exception that needs to be transformed in
- * to a soapenv:Fault payload.
- *
- * @param ceModel {@link CheckedExceptionImpl} model that provides useful informations such as the detail tagname
- * and the Exception associated with it. Caller of this constructor should get the CheckedException
- * model by calling {@link JavaMethodImpl#getCheckedException(Class)}, where
- * Class is t.getClass().
- * <p>
- * If its null then this is not a checked exception and in that case the soap fault will be
- * serialized only from the exception as described below.
- * @param ex Exception that needs to be translated into soapenv:Fault, always non-null.
- * <ul>
- * <li>If t is instance of {@link SOAPFaultException} then its serilaized as protocol exception.
- * <li>If t.getCause() is instance of {@link SOAPFaultException} and t is a checked exception then
- * the soap fault detail is serilaized from t and the fault actor/string/role is taken from t.getCause().
- * </ul>
- * @param soapVersion non-null
- */
- public static Message createSOAPFaultMessage(SOAPVersion soapVersion, CheckedExceptionImpl ceModel, Throwable ex) {
- // Sometimes InvocationTargetException.getCause() is null
- // but InvocationTargetException.getTargetException() contains the real exception
- // even though they are supposed to be equivalent.
- // If we only look at .getCause this results in the real exception being lost.
- // Looks like a JDK bug.
- final Throwable t =
- ex instanceof java.lang.reflect.InvocationTargetException
- ?
- ((java.lang.reflect.InvocationTargetException)ex).getTargetException()
- :
- ex;
- return createSOAPFaultMessage(soapVersion, ceModel, t, null);
- }
-
- /**
- * Create the Message with the specified faultCode
- *
- * @see #createSOAPFaultMessage(SOAPVersion, CheckedExceptionImpl, Throwable)
- */
- public static Message createSOAPFaultMessage(SOAPVersion soapVersion, CheckedExceptionImpl ceModel, Throwable ex, QName faultCode) {
- Object detail = getFaultDetail(ceModel, ex);
- if(soapVersion == SOAPVersion.SOAP_12)
- return createSOAP12Fault(soapVersion, ex, detail, ceModel, faultCode);
- return createSOAP11Fault(soapVersion, ex, detail, ceModel, faultCode);
- }
-
- /**
- * Server runtime will call this when there is some internal error not resulting from an exception.
- *
- * @param soapVersion {@link SOAPVersion#SOAP_11} or {@link SOAPVersion#SOAP_12}
- * @param faultString must be non-null
- * @param faultCode For SOAP 1.1, it must be one of
- * <ul>
- * <li>{@link SOAPVersion#faultCodeClient}
- * <li>{@link SOAPVersion#faultCodeServer}
- * <li>{@link SOAPConstants#FAULT_CODE_MUST_UNDERSTAND}
- * <li>{@link SOAPConstants#FAULT_CODE_VERSION_MISMATCH}
- * </ul>
- *
- * For SOAP 1.2
- * <ul>
- * <li>{@link SOAPVersion#faultCodeClient}
- * <li>{@link SOAPVersion#faultCodeServer}
- * <li>{@link SOAP12Constants#FAULT_CODE_MUST_UNDERSTAND}
- * <li>{@link SOAP12Constants#FAULT_CODE_VERSION_MISMATCH}
- * <li>{@link SOAP12Constants#FAULT_CODE_DATA_ENCODING_UNKNOWN}
- * </ul>
- * @return non-null {@link Message}
- */
- public static Message createSOAPFaultMessage(SOAPVersion soapVersion, String faultString, QName faultCode) {
- if (faultCode == null)
- faultCode = getDefaultFaultCode(soapVersion);
- return createSOAPFaultMessage(soapVersion, faultString, faultCode, null);
- }
-
- public static Message createSOAPFaultMessage(SOAPVersion soapVersion, SOAPFault fault) {
- switch (soapVersion) {
- case SOAP_11:
- return JAXBMessage.create(JAXB_CONTEXT, new SOAP11Fault(fault), soapVersion);
- case SOAP_12:
- return JAXBMessage.create(JAXB_CONTEXT, new SOAP12Fault(fault), soapVersion);
- default:
- throw new AssertionError();
- }
- }
-
- private static Message createSOAPFaultMessage(SOAPVersion soapVersion, String faultString, QName faultCode, Element detail) {
- switch (soapVersion) {
- case SOAP_11:
- return JAXBMessage.create(JAXB_CONTEXT, new SOAP11Fault(faultCode, faultString, null, detail), soapVersion);
- case SOAP_12:
- return JAXBMessage.create(JAXB_CONTEXT, new SOAP12Fault(faultCode, faultString, detail), soapVersion);
- default:
- throw new AssertionError();
- }
- }
-
- /**
- * Creates a DOM node that represents the complete stack trace of the exception,
- * and attach that to {@link DetailType}.
- */
- final void captureStackTrace(@Nullable Throwable t) {
- if(t==null) return;
- if(!captureStackTrace) return; // feature disabled
-
- try {
- Document d = DOMUtil.createDom();
- ExceptionBean.marshal(t,d);
-
- DetailType detail = getDetail();
- if(detail==null)
- setDetail(detail=new DetailType());
-
- detail.getDetails().add(d.getDocumentElement());
- } catch (JAXBException e) {
- // this should never happen
- logger.log(Level.WARNING, "Unable to capture the stack trace into XML",e);
- }
- }
-
- /**
- * Initialize the cause of this exception by attaching the server side exception.
- */
- private <T extends Throwable> T attachServerException(T t) {
- DetailType detail = getDetail();
- if(detail==null) return t; // no details
-
- for (Element n : detail.getDetails()) {
- if(ExceptionBean.isStackTraceXml(n)) {
- try {
- t.initCause(ExceptionBean.unmarshal(n));
- } catch (JAXBException e) {
- // perhaps incorrectly formatted XML.
- logger.log(Level.WARNING, "Unable to read the capture stack trace in the fault",e);
- }
- return t;
- }
- }
-
- return t;
- }
-
- abstract protected Throwable getProtocolException();
-
- private Object getJAXBObject(Node jaxbBean, CheckedExceptionImpl ce) throws JAXBException {
- XMLBridge bridge = ce.getBond();
- return bridge.unmarshal(jaxbBean,null);
- }
-
- private Exception createUserDefinedException(CheckedExceptionImpl ce) {
- Class exceptionClass = ce.getExceptionClass();
- Class detailBean = ce.getDetailBean();
- try{
- Node detailNode = getDetail().getDetails().get(0);
- Object jaxbDetail = getJAXBObject(detailNode, ce);
- Constructor exConstructor;
- try{
- exConstructor = exceptionClass.getConstructor(String.class, detailBean);
- return (Exception) exConstructor.newInstance(getFaultString(), jaxbDetail);
- }catch(NoSuchMethodException e){
- exConstructor = exceptionClass.getConstructor(String.class);
- return (Exception) exConstructor.newInstance(getFaultString());
- }
- } catch (Exception e) {
- throw new WebServiceException(e);
- }
- }
-
- private static String getWriteMethod(Field f) {
- return "set" + StringUtils.capitalize(f.getName());
- }
-
- private static Object getFaultDetail(CheckedExceptionImpl ce, Throwable exception) {
- if (ce == null)
- return null;
- if (ce.getExceptionType().equals(ExceptionType.UserDefined)) {
- return createDetailFromUserDefinedException(ce, exception);
- }
- try {
- Method m = exception.getClass().getMethod("getFaultInfo");
- return m.invoke(exception);
- } catch (Exception e) {
- throw new SerializationException(e);
- }
- }
-
- private static Object createDetailFromUserDefinedException(CheckedExceptionImpl ce, Object exception) {
- Class detailBean = ce.getDetailBean();
- Field[] fields = detailBean.getDeclaredFields();
- try {
- Object detail = detailBean.newInstance();
- for (Field f : fields) {
- Method em = exception.getClass().getMethod(getReadMethod(f));
- try {
- Method sm = detailBean.getMethod(getWriteMethod(f), em.getReturnType());
- sm.invoke(detail, em.invoke(exception));
- } catch(NoSuchMethodException ne) {
- // Try to use exception bean's public field to populate the value.
- Field sf = detailBean.getField(f.getName());
- sf.set(detail, em.invoke(exception));
- }
- }
- return detail;
- } catch (Exception e) {
- throw new SerializationException(e);
- }
- }
-
- private static String getReadMethod(Field f) {
- if (f.getType().isAssignableFrom(boolean.class))
- return "is" + StringUtils.capitalize(f.getName());
- return "get" + StringUtils.capitalize(f.getName());
- }
-
- private static Message createSOAP11Fault(SOAPVersion soapVersion, Throwable e, Object detail, CheckedExceptionImpl ce, QName faultCode) {
- SOAPFaultException soapFaultException = null;
- String faultString = null;
- String faultActor = null;
- Throwable cause = e.getCause();
- if (e instanceof SOAPFaultException) {
- soapFaultException = (SOAPFaultException) e;
- } else if (cause != null && cause instanceof SOAPFaultException) {
- soapFaultException = (SOAPFaultException) e.getCause();
- }
- if (soapFaultException != null) {
- QName soapFaultCode = soapFaultException.getFault().getFaultCodeAsQName();
- if(soapFaultCode != null)
- faultCode = soapFaultCode;
-
- faultString = soapFaultException.getFault().getFaultString();
- faultActor = soapFaultException.getFault().getFaultActor();
- }
-
- if (faultCode == null) {
- faultCode = getDefaultFaultCode(soapVersion);
- }
-
- if (faultString == null) {
- faultString = e.getMessage();
- if (faultString == null) {
- faultString = e.toString();
- }
- }
- Element detailNode = null;
- QName firstEntry = null;
- if (detail == null && soapFaultException != null) {
- detailNode = soapFaultException.getFault().getDetail();
- firstEntry = getFirstDetailEntryName((Detail)detailNode);
- } else if(ce != null){
- try {
- DOMResult dr = new DOMResult();
- ce.getBond().marshal(detail,dr);
- detailNode = (Element)dr.getNode().getFirstChild();
- firstEntry = getFirstDetailEntryName(detailNode);
- } catch (JAXBException e1) {
- //Should we throw Internal Server Error???
- faultString = e.getMessage();
- faultCode = getDefaultFaultCode(soapVersion);
- }
- }
- SOAP11Fault soap11Fault = new SOAP11Fault(faultCode, faultString, faultActor, detailNode);
-
- //Don't fill the stacktrace for Service specific exceptions.
- if(ce == null) {
- soap11Fault.captureStackTrace(e);
- }
- Message msg = JAXBMessage.create(JAXB_CONTEXT, soap11Fault, soapVersion);
- return new FaultMessage(msg, firstEntry);
- }
-
- private static @Nullable QName getFirstDetailEntryName(@Nullable Detail detail) {
- if (detail != null) {
- Iterator<DetailEntry> it = detail.getDetailEntries();
- if (it.hasNext()) {
- DetailEntry entry = it.next();
- return getFirstDetailEntryName(entry);
- }
- }
- return null;
- }
-
- private static @NotNull QName getFirstDetailEntryName(@NotNull Element entry) {
- return new QName(entry.getNamespaceURI(), entry.getLocalName());
- }
-
- private static Message createSOAP12Fault(SOAPVersion soapVersion, Throwable e, Object detail, CheckedExceptionImpl ce, QName faultCode) {
- SOAPFaultException soapFaultException = null;
- CodeType code = null;
- String faultString = null;
- String faultRole = null;
- String faultNode = null;
- Throwable cause = e.getCause();
- if (e instanceof SOAPFaultException) {
- soapFaultException = (SOAPFaultException) e;
- } else if (cause != null && cause instanceof SOAPFaultException) {
- soapFaultException = (SOAPFaultException) e.getCause();
- }
- if (soapFaultException != null) {
- SOAPFault fault = soapFaultException.getFault();
- QName soapFaultCode = fault.getFaultCodeAsQName();
- if(soapFaultCode != null){
- faultCode = soapFaultCode;
- code = new CodeType(faultCode);
- Iterator iter = fault.getFaultSubcodes();
- boolean first = true;
- SubcodeType subcode = null;
- while(iter.hasNext()){
- QName value = (QName)iter.next();
- if(first){
- SubcodeType sct = new SubcodeType(value);
- code.setSubcode(sct);
- subcode = sct;
- first = false;
- continue;
- }
- subcode = fillSubcodes(subcode, value);
- }
- }
- faultString = soapFaultException.getFault().getFaultString();
- faultRole = soapFaultException.getFault().getFaultActor();
- faultNode = soapFaultException.getFault().getFaultNode();
- }
-
- if (faultCode == null) {
- faultCode = getDefaultFaultCode(soapVersion);
- code = new CodeType(faultCode);
- }else if(code == null){
- code = new CodeType(faultCode);
- }
-
- if (faultString == null) {
- faultString = e.getMessage();
- if (faultString == null) {
- faultString = e.toString();
- }
- }
-
- ReasonType reason = new ReasonType(faultString);
- Element detailNode = null;
- QName firstEntry = null;
- if (detail == null && soapFaultException != null) {
- detailNode = soapFaultException.getFault().getDetail();
- firstEntry = getFirstDetailEntryName((Detail)detailNode);
- } else if(detail != null){
- try {
- DOMResult dr = new DOMResult();
- ce.getBond().marshal(detail, dr);
- detailNode = (Element)dr.getNode().getFirstChild();
- firstEntry = getFirstDetailEntryName(detailNode);
- } catch (JAXBException e1) {
- //Should we throw Internal Server Error???
- faultString = e.getMessage();
- }
- }
-
- SOAP12Fault soap12Fault = new SOAP12Fault(code, reason, faultNode, faultRole, detailNode);
-
- //Don't fill the stacktrace for Service specific exceptions.
- if(ce == null) {
- soap12Fault.captureStackTrace(e);
- }
- Message msg = JAXBMessage.create(JAXB_CONTEXT, soap12Fault, soapVersion);
- return new FaultMessage(msg, firstEntry);
- }
-
- private static SubcodeType fillSubcodes(SubcodeType parent, QName value){
- SubcodeType newCode = new SubcodeType(value);
- parent.setSubcode(newCode);
- return newCode;
- }
-
- private static QName getDefaultFaultCode(SOAPVersion soapVersion) {
- return soapVersion.faultCodeServer;
- }
-
- /**
- * Parses a fault {@link Message} and returns it as a {@link SOAPFaultBuilder}.
- *
- * @return always non-null valid object.
- * @throws JAXBException if the parsing fails.
- */
- public static SOAPFaultBuilder create(Message msg) throws JAXBException {
- return msg.readPayloadAsJAXB(JAXB_CONTEXT.createUnmarshaller());
- }
-
- /**
- * This {@link JAXBContext} can handle SOAP 1.1/1.2 faults.
- */
- private static final JAXBContext JAXB_CONTEXT;
-
- private static final Logger logger = Logger.getLogger(SOAPFaultBuilder.class.getName());
-
- /**
- * Set to false if you don't want the generated faults to have stack trace in it.
- */
- public static final boolean captureStackTrace;
-
- /*package*/ static final String CAPTURE_STACK_TRACE_PROPERTY = SOAPFaultBuilder.class.getName()+".captureStackTrace";
-
- static {
- boolean tmpVal = false;
- try {
- tmpVal = Boolean.getBoolean(CAPTURE_STACK_TRACE_PROPERTY);
- } catch (SecurityException e) {
- // ignore
- }
- captureStackTrace = tmpVal;
- JAXB_CONTEXT = createJAXBContext();
- }
-
- private static JAXBContext createJAXBContext() {
-
- // in jdk runtime doPrivileged is necessary since JAX-WS internal classes are in restricted packages
- if (isJDKRuntime()) {
- Permissions permissions = new Permissions();
- permissions.add(new RuntimePermission("accessClassInPackage.com.sun." + "xml.internal.ws.fault"));
- permissions.add(new ReflectPermission("suppressAccessChecks"));
- return AccessController.doPrivileged(
- new PrivilegedAction<JAXBContext>() {
- @Override
- public JAXBContext run() {
- try {
- return JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class);
- } catch (JAXBException e) {
- throw new Error(e);
- }
- }
- },
- new AccessControlContext(new ProtectionDomain[]{new ProtectionDomain(null, permissions)})
- );
-
- } else {
- try {
- return JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class);
- } catch (JAXBException e) {
- throw new Error(e);
- }
- }
- }
-
- private static boolean isJDKRuntime() {
- return SOAPFaultBuilder.class.getName().contains("internal");
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ServerSOAPFaultException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ServerSOAPFaultException.java
deleted file mode 100644
index d4ed0f77..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ServerSOAPFaultException.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.fault;
-
-import javax.xml.soap.SOAPFault;
-import javax.xml.ws.soap.SOAPFaultException;
-
-/**
- * Represents the SOAPFaultException that has occurred on the server side.
- *
- * <p>
- * When an exception occurs on the server, JAX-WS RI sends the SOAPFaultException
- * to the client. On the client side, instances of this class are used to represent
- * SOAPFaultException that adds diagnostic information to error message for easily
- * identifying the cause of exception.
- *
- * @author chinmay.patel
- *
- */
-public class ServerSOAPFaultException extends SOAPFaultException {
-
- public ServerSOAPFaultException(SOAPFault soapFault) {
- super(soapFault);
- }
-
- public String getMessage() {
- return "Client received SOAP Fault from server: "
- + super.getMessage()
- + " Please see the server log to find more detail regarding exact cause of the failure.";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SubcodeType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SubcodeType.java
deleted file mode 100644
index 038a7a22..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SubcodeType.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.fault;
-
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.namespace.QName;
-
-/**
- * <pre>
- * &lt;env:Subcode>
- * &lt;env:Value>m:MessageTimeout1&lt;/env:Value>
- * &lt;env:Subcode>
- * &lt;env:Value>m:MessageTimeout2&lt;/env:Value>
- * &lt;/env:Subcode>
- * &lt;/env:Subcode>
- * </pre>
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "SubcodeType", namespace = "http://www.w3.org/2003/05/soap-envelope", propOrder = {
- "Value",
- "Subcode"
- })
-class SubcodeType {
- @XmlTransient
- private static final String ns="http://www.w3.org/2003/05/soap-envelope";
- /**
- * mandatory, minOccurs=1
- */
- @XmlElement(namespace = ns)
- private QName Value;
-
- /**
- * optional, minOcccurs=0
- */
- @XmlElements(@XmlElement(namespace = ns))
- private SubcodeType Subcode;
-
- public SubcodeType(QName value) {
- Value = value;
- }
-
- public SubcodeType() {
- }
-
- QName getValue() {
- return Value;
- }
-
- SubcodeType getSubcode() {
- return Subcode;
- }
-
- void setSubcode(SubcodeType subcode) {
- Subcode = subcode;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/TextType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/TextType.java
deleted file mode 100644
index f90e08a5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/TextType.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.fault;
-
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.bind.annotation.XmlAttribute;
-import java.util.Locale;
-
-/**
- * <pre>
- * &lt;env:Text xml:lang="en">Sender Timeout</env:Text>
- * </pre>
- */
-@XmlType(name = "TextType", namespace = "http://www.w3.org/2003/05/soap-envelope")
-class TextType {
- private @XmlValue String text;
-
- /**
- * xml:lang attribute. What should be value of namespace for "xml"
- */
- @XmlAttribute(name = "lang", namespace = "http://www.w3.org/XML/1998/namespace", required = true)
- private String lang;
-
- TextType() {
- }
-
- TextType(String text) {
- this.text = text;
- this.lang = Locale.getDefault().getLanguage();
- }
-
- String getText(){
- return text;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientLogicalHandlerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientLogicalHandlerTube.java
deleted file mode 100644
index 91d93339..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientLogicalHandlerTube.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.handler;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-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.binding.BindingImpl;
-import com.sun.xml.internal.ws.model.AbstractSEIModelImpl;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-
-import javax.xml.ws.handler.LogicalHandler;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.WebServiceException;
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- *
- * @author WS Development Team
- */
-public class ClientLogicalHandlerTube extends HandlerTube {
-
- private SEIModel seiModel;
-
- /**
- * Creates a new instance of LogicalHandlerTube
- */
- public ClientLogicalHandlerTube(WSBinding binding, SEIModel seiModel, WSDLPort port, Tube next) {
- super(next, port, binding);
- this.seiModel = seiModel;
- }
-
- /**
- * This constructor is used on client-side where, SOAPHandlerTube is created
- * first and then a LogicalHandlerTube is created with a handler to that
- * SOAPHandlerTube.
- * With this handle, LogicalHandlerTube can call
- * SOAPHandlerTube.closeHandlers()
- */
- public ClientLogicalHandlerTube(WSBinding binding, SEIModel seiModel, Tube next, HandlerTube cousinTube) {
- super(next, cousinTube, binding);
- this.seiModel = seiModel;
- }
-
- /**
- * Copy constructor for {@link com.sun.xml.internal.ws.api.pipe.Tube#copy(com.sun.xml.internal.ws.api.pipe.TubeCloner)}.
- */
-
- private ClientLogicalHandlerTube(ClientLogicalHandlerTube that, TubeCloner cloner) {
- super(that, cloner);
- this.seiModel = that.seiModel;
- }
-
- //should be overridden by DriverHandlerTubes
- @Override
- protected void initiateClosing(MessageContext mc) {
- close(mc);
- super.initiateClosing(mc);
- }
-
- public AbstractFilterTubeImpl copy(TubeCloner cloner) {
- return new ClientLogicalHandlerTube(this, cloner);
- }
-
- void setUpProcessor() {
- if (handlers == null) {
- // Take a snapshot, User may change chain after invocation, Same chain
- // should be used for the entire MEP
- handlers = new ArrayList<Handler>();
- WSBinding binding = getBinding();
- List<LogicalHandler> logicalSnapShot= ((BindingImpl) binding).getHandlerConfig().getLogicalHandlers();
- if (!logicalSnapShot.isEmpty()) {
- handlers.addAll(logicalSnapShot);
- if (binding.getSOAPVersion() == null) {
- processor = new XMLHandlerProcessor(this, binding,
- handlers);
- } else {
- processor = new SOAPHandlerProcessor(true, this, binding,
- handlers);
- }
- }
- }
- }
-
-
- MessageUpdatableContext getContext(Packet packet) {
- return new LogicalMessageContextImpl(getBinding(), getBindingContext(), packet);
- }
-
- private BindingContext getBindingContext() {
- return (seiModel!= null && seiModel instanceof AbstractSEIModelImpl) ?
- ((AbstractSEIModelImpl)seiModel).getBindingContext() : null;
- }
-
- boolean callHandlersOnRequest(MessageUpdatableContext context, boolean isOneWay) {
-
- boolean handlerResult;
- try {
-
- //CLIENT-SIDE
- handlerResult = processor.callHandlersRequest(HandlerProcessor.Direction.OUTBOUND, context, !isOneWay);
- } catch (WebServiceException wse) {
- remedyActionTaken = true;
- //no rewrapping
- throw wse;
- } catch (RuntimeException re) {
- remedyActionTaken = true;
-
- throw new WebServiceException(re);
-
- }
- if (!handlerResult) {
- remedyActionTaken = true;
- }
- return handlerResult;
- }
-
- void callHandlersOnResponse(MessageUpdatableContext context, boolean handleFault) {
- try {
-
- //CLIENT-SIDE
- processor.callHandlersResponse(HandlerProcessor.Direction.INBOUND, context, handleFault);
-
- } catch (WebServiceException wse) {
- //no rewrapping
- throw wse;
- } catch (RuntimeException re) {
-
- throw new WebServiceException(re);
-
- }
- }
- void closeHandlers(MessageContext mc) {
- closeClientsideHandlers(mc);
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientMessageHandlerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientMessageHandlerTube.java
deleted file mode 100644
index 704d8b36..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientMessageHandlerTube.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.handler;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.handler.MessageHandler;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.HandlerConfiguration;
-import com.sun.xml.internal.ws.message.DataHandlerAttachment;
-
-import javax.activation.DataHandler;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.Handler;
-import java.util.*;
-import java.util.Map.Entry;
-
-/**
- * @author Rama Pulavarthi
- */
-public class ClientMessageHandlerTube extends HandlerTube {
- private SEIModel seiModel;
- private Set<String> roles;
-
- /**
- * Creates a new instance of MessageHandlerTube
- */
- public ClientMessageHandlerTube(@Nullable SEIModel seiModel, WSBinding binding, WSDLPort port, Tube next) {
- super(next, port, binding);
- this.seiModel = seiModel;
- }
-
- /**
- * Copy constructor for {@link com.sun.xml.internal.ws.api.pipe.Tube#copy(com.sun.xml.internal.ws.api.pipe.TubeCloner)}.
- */
- private ClientMessageHandlerTube(ClientMessageHandlerTube that, TubeCloner cloner) {
- super(that, cloner);
- this.seiModel = that.seiModel;
- }
-
- public AbstractFilterTubeImpl copy(TubeCloner cloner) {
- return new ClientMessageHandlerTube(this, cloner);
- }
-
- void callHandlersOnResponse(MessageUpdatableContext context, boolean handleFault) {
- try {
- //CLIENT-SIDE
- processor.callHandlersResponse(HandlerProcessor.Direction.INBOUND, context, handleFault);
-
- } catch (WebServiceException wse) {
- //no rewrapping
- throw wse;
- } catch (RuntimeException re) {
- throw new WebServiceException(re);
- }
- }
-
- boolean callHandlersOnRequest(MessageUpdatableContext context, boolean isOneWay) {
- boolean handlerResult;
-
- //Lets copy all the MessageContext.OUTBOUND_ATTACHMENT_PROPERTY to the message
- Map<String, DataHandler> atts = (Map<String, DataHandler>) context.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
- AttachmentSet attSet = context.packet.getMessage().getAttachments();
- for (Entry<String, DataHandler> entry : atts.entrySet()) {
- String cid = entry.getKey();
- if (attSet.get(cid) == null) { // Otherwise we would be adding attachments twice
- Attachment att = new DataHandlerAttachment(cid, atts.get(cid));
- attSet.add(att);
- }
- }
-
- try {
- //CLIENT-SIDE
- handlerResult = processor.callHandlersRequest(HandlerProcessor.Direction.OUTBOUND, context, !isOneWay);
- } catch (WebServiceException wse) {
- remedyActionTaken = true;
- //no rewrapping
- throw wse;
- } catch (RuntimeException re) {
- remedyActionTaken = true;
-
- throw new WebServiceException(re);
-
- }
- if (!handlerResult) {
- remedyActionTaken = true;
- }
- return handlerResult;
- }
-
- void closeHandlers(MessageContext mc) {
- closeClientsideHandlers(mc);
-
- }
-
- void setUpProcessor() {
- if (handlers == null) {
- // Take a snapshot, User may change chain after invocation, Same chain
- // should be used for the entire MEP
- handlers = new ArrayList<Handler>();
- HandlerConfiguration handlerConfig = ((BindingImpl) getBinding()).getHandlerConfig();
- List<MessageHandler> msgHandlersSnapShot= handlerConfig.getMessageHandlers();
- if (!msgHandlersSnapShot.isEmpty()) {
- handlers.addAll(msgHandlersSnapShot);
- roles = new HashSet<String>();
- roles.addAll(handlerConfig.getRoles());
- processor = new SOAPHandlerProcessor(true, this, getBinding(), handlers);
- }
- }
- }
-
-
-
- MessageUpdatableContext getContext(Packet p) {
- MessageHandlerContextImpl context = new MessageHandlerContextImpl(seiModel, getBinding(), port, p, roles);
- return context;
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientSOAPHandlerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientSOAPHandlerTube.java
deleted file mode 100644
index 8124e5fb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientSOAPHandlerTube.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.handler;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.client.HandlerConfiguration;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.message.DataHandlerAttachment;
-
-import javax.xml.ws.handler.soap.SOAPHandler;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.WebServiceException;
-import javax.activation.DataHandler;
-import java.util.*;
-import java.util.Map.Entry;
-
-/**
- *
- * @author WS Development Team
- */
-public class ClientSOAPHandlerTube extends HandlerTube {
-
- private Set<String> roles;
-
- /**
- * Creates a new instance of SOAPHandlerTube
- */
- public ClientSOAPHandlerTube(WSBinding binding, WSDLPort port, Tube next) {
- super(next, port, binding);
- if (binding.getSOAPVersion() != null) {
- // SOAPHandlerTube should n't be used for bindings other than SOAP.
- // TODO: throw Exception
- }
- }
-
- // Handle to LogicalHandlerTube means its used on SERVER-SIDE
-
- /**
- * This constructor is used on client-side where, LogicalHandlerTube is created
- * first and then a SOAPHandlerTube is created with a handler to that
- * LogicalHandlerTube.
- * With this handle, SOAPHandlerTube can call LogicalHandlerTube.closeHandlers()
- */
- public ClientSOAPHandlerTube(WSBinding binding, Tube next, HandlerTube cousinTube) {
- super(next, cousinTube, binding);
- }
-
- /**
- * Copy constructor for {@link com.sun.xml.internal.ws.api.pipe.Tube#copy(com.sun.xml.internal.ws.api.pipe.TubeCloner)}.
- */
- private ClientSOAPHandlerTube(ClientSOAPHandlerTube that, TubeCloner cloner) {
- super(that, cloner);
- }
-
- public AbstractFilterTubeImpl copy(TubeCloner cloner) {
- return new ClientSOAPHandlerTube(this, cloner);
- }
-
- void setUpProcessor() {
- if (handlers == null) {
- // Take a snapshot, User may change chain after invocation, Same chain
- // should be used for the entire MEP
- handlers = new ArrayList<Handler>();
- HandlerConfiguration handlerConfig = ((BindingImpl) getBinding()).getHandlerConfig();
- List<SOAPHandler> soapSnapShot= handlerConfig.getSoapHandlers();
- if (!soapSnapShot.isEmpty()) {
- handlers.addAll(soapSnapShot);
- roles = new HashSet<String>();
- roles.addAll(handlerConfig.getRoles());
- processor = new SOAPHandlerProcessor(true, this, getBinding(), handlers);
- }
- }
- }
-
- MessageUpdatableContext getContext(Packet packet) {
- SOAPMessageContextImpl context = new SOAPMessageContextImpl(getBinding(), packet,roles);
- return context;
- }
-
- boolean callHandlersOnRequest(MessageUpdatableContext context, boolean isOneWay) {
-
- boolean handlerResult;
- //Lets copy all the MessageContext.OUTBOUND_ATTACHMENT_PROPERTY to the message
- Map<String, DataHandler> atts = (Map<String, DataHandler>) context.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
- AttachmentSet attSet = context.packet.getMessage().getAttachments();
- for (Entry<String, DataHandler> entry : atts.entrySet()) {
- String cid = entry.getKey();
- if (attSet.get(cid) == null) { // Otherwise we would be adding attachments twice
- Attachment att = new DataHandlerAttachment(cid, atts.get(cid));
- attSet.add(att);
- }
- }
-
- try {
- //CLIENT-SIDE
- handlerResult = processor.callHandlersRequest(HandlerProcessor.Direction.OUTBOUND, context, !isOneWay);
- } catch (WebServiceException wse) {
- remedyActionTaken = true;
- //no rewrapping
- throw wse;
- } catch (RuntimeException re) {
- remedyActionTaken = true;
-
- throw new WebServiceException(re);
-
- }
- if (!handlerResult) {
- remedyActionTaken = true;
- }
- return handlerResult;
- }
-
- void callHandlersOnResponse(MessageUpdatableContext context, boolean handleFault) {
- try {
-
- //CLIENT-SIDE
- processor.callHandlersResponse(HandlerProcessor.Direction.INBOUND, context, handleFault);
-
- } catch (WebServiceException wse) {
- //no rewrapping
- throw wse;
- } catch (RuntimeException re) {
- throw new WebServiceException(re);
- }
- }
-
- void closeHandlers(MessageContext mc) {
- closeClientsideHandlers(mc);
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerChainsModel.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerChainsModel.java
deleted file mode 100644
index ff9a0ae1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerChainsModel.java
+++ /dev/null
@@ -1,568 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.handler;
-
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.transport.http.DeploymentDescriptorParser;
-import com.sun.xml.internal.ws.util.HandlerAnnotationInfo;
-import com.sun.xml.internal.ws.util.JAXWSUtils;
-import com.sun.xml.internal.ws.util.UtilException;
-
-import javax.annotation.PostConstruct;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.handler.PortInfo;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.logging.Logger;
-
-
-public class HandlerChainsModel {
- private static final Logger logger = Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".util");
-
- private Class annotatedClass;
- private List<HandlerChainType> handlerChains;
- private String id;
- /** Creates a new instance of HandlerChains */
- private HandlerChainsModel(Class annotatedClass) {
- this.annotatedClass = annotatedClass;
- }
-
- private List<HandlerChainType> getHandlerChain() {
- if (handlerChains == null) {
- handlerChains = new ArrayList<HandlerChainType>();
- }
- return handlerChains;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String value) {
- this.id = value;
- }
- /**
- * reader should be on <handler-chains> element
- */
- public static HandlerChainsModel parseHandlerConfigFile(Class annotatedClass, XMLStreamReader reader) {
- ensureProperName(reader,QNAME_HANDLER_CHAINS);
- HandlerChainsModel handlerModel = new HandlerChainsModel(annotatedClass);
- List<HandlerChainType> hChains = handlerModel.getHandlerChain();
- XMLStreamReaderUtil.nextElementContent(reader);
-
- while (reader.getName().equals(QNAME_HANDLER_CHAIN)) {
- HandlerChainType hChain = new HandlerChainType();
- XMLStreamReaderUtil.nextElementContent(reader);
-
- if (reader.getName().equals(QNAME_CHAIN_PORT_PATTERN)) {
- QName portNamePattern = XMLStreamReaderUtil.getElementQName(reader);
- hChain.setPortNamePattern(portNamePattern);
- XMLStreamReaderUtil.nextElementContent(reader);
- } else if (reader.getName().equals(QNAME_CHAIN_PROTOCOL_BINDING)) {
- String bindingList = XMLStreamReaderUtil.getElementText(reader);
- StringTokenizer stk = new StringTokenizer(bindingList);
- while(stk.hasMoreTokens()) {
- String token = stk.nextToken();
- // This will convert tokens into Binding URI
- hChain.addProtocolBinding(token);
- }
- XMLStreamReaderUtil.nextElementContent(reader);
- } else if (reader.getName().equals(QNAME_CHAIN_SERVICE_PATTERN)) {
- QName serviceNamepattern = XMLStreamReaderUtil.getElementQName(reader);
- hChain.setServiceNamePattern(serviceNamepattern);
- XMLStreamReaderUtil.nextElementContent(reader);
- }
- List<HandlerType> handlers = hChain.getHandlers();
- // process all <handler> elements
- while (reader.getName().equals(QNAME_HANDLER)) {
- HandlerType handler = new HandlerType();
-
- XMLStreamReaderUtil.nextContent(reader);
- if (reader.getName().equals(QNAME_HANDLER_NAME)) {
- String handlerName =
- XMLStreamReaderUtil.getElementText(reader).trim();
- handler.setHandlerName(handlerName);
- XMLStreamReaderUtil.nextContent(reader);
- }
-
- // handler class
- ensureProperName(reader, QNAME_HANDLER_CLASS);
- String handlerClass =
- XMLStreamReaderUtil.getElementText(reader).trim();
- handler.setHandlerClass(handlerClass);
- XMLStreamReaderUtil.nextContent(reader);
-
- // init params (ignored)
- while (reader.getName().equals(QNAME_HANDLER_PARAM)) {
- skipInitParamElement(reader);
- }
-
- // headers (ignored)
- while (reader.getName().equals(QNAME_HANDLER_HEADER)) {
- skipTextElement(reader);
- }
-
- // roles (not stored per handler)
- while (reader.getName().equals(QNAME_HANDLER_ROLE)) {
- List<String> soapRoles = handler.getSoapRoles();
- soapRoles.add(XMLStreamReaderUtil.getElementText(reader));
- XMLStreamReaderUtil.nextContent(reader);
- }
-
- handlers.add(handler);
-
- // move past </handler>
- ensureProperName(reader, QNAME_HANDLER);
- XMLStreamReaderUtil.nextContent(reader);
- }
-
- // move past </handler-chain>
- ensureProperName(reader, QNAME_HANDLER_CHAIN);
- hChains.add(hChain);
- XMLStreamReaderUtil.nextContent(reader);
- }
-
- return handlerModel;
- }
-
- /**
- * <p>This method is called internally by HandlerAnnotationProcessor,
- * and by
- * {@link com.sun.xml.internal.ws.transport.http.DeploymentDescriptorParser}
- * directly when it reaches the handler chains element in the
- * descriptor file it is parsing.
- * @param reader should be on <handler-chains> element
- * @return A HandlerAnnotationInfo object that stores the
- * handlers and roles.
- */
-
-
-
- public static HandlerAnnotationInfo parseHandlerFile(XMLStreamReader reader,
- ClassLoader classLoader, QName serviceName, QName portName,
- WSBinding wsbinding) {
- ensureProperName(reader,QNAME_HANDLER_CHAINS);
- String bindingId = wsbinding.getBindingId().toString();
- HandlerAnnotationInfo info = new HandlerAnnotationInfo();
-
- XMLStreamReaderUtil.nextElementContent(reader);
-
- List<Handler> handlerChain = new ArrayList<Handler>();
- Set<String> roles = new HashSet<String>();
-
- while (reader.getName().equals(QNAME_HANDLER_CHAIN)) {
-
- XMLStreamReaderUtil.nextElementContent(reader);
-
- if (reader.getName().equals(QNAME_CHAIN_PORT_PATTERN)) {
- if (portName == null) {
- logger.warning("handler chain sepcified for port " +
- "but port QName passed to parser is null");
- }
- boolean parseChain = JAXWSUtils.matchQNames(portName,
- XMLStreamReaderUtil.getElementQName(reader));
- if (!parseChain) {
- skipChain(reader);
- continue;
- }
- XMLStreamReaderUtil.nextElementContent(reader);
- } else if (reader.getName().equals(QNAME_CHAIN_PROTOCOL_BINDING)) {
- if (bindingId == null) {
- logger.warning("handler chain sepcified for bindingId " +
- "but bindingId passed to parser is null");
- }
- String bindingConstraint = XMLStreamReaderUtil.getElementText(reader);
- boolean skipThisChain = true;
- StringTokenizer stk = new StringTokenizer(bindingConstraint);
- List<String> bindingList = new ArrayList<String>();
- while(stk.hasMoreTokens()) {
- String tokenOrURI = stk.nextToken();
- /*
- Convert short-form tokens to API's binding ids
- Unknown token, Put it as it is
- */
- tokenOrURI = DeploymentDescriptorParser.getBindingIdForToken(tokenOrURI);
- String binding = BindingID.parse(tokenOrURI).toString();
- bindingList.add(binding);
- }
- if(bindingList.contains(bindingId)){
- skipThisChain = false;
- }
-
- if (skipThisChain) {
- skipChain(reader);
- continue;
- }
- XMLStreamReaderUtil.nextElementContent(reader);
- } else if (reader.getName().equals(QNAME_CHAIN_SERVICE_PATTERN)) {
- if (serviceName == null) {
- logger.warning("handler chain sepcified for service " +
- "but service QName passed to parser is null");
- }
- boolean parseChain = JAXWSUtils.matchQNames(
- serviceName,
- XMLStreamReaderUtil.getElementQName(reader));
- if (!parseChain) {
- skipChain(reader);
- continue;
- }
- XMLStreamReaderUtil.nextElementContent(reader);
- }
-
- // process all <handler> elements
- while (reader.getName().equals(QNAME_HANDLER)) {
- Handler handler;
-
- XMLStreamReaderUtil.nextContent(reader);
- if (reader.getName().equals(QNAME_HANDLER_NAME)) {
- skipTextElement(reader);
- }
-
- // handler class
- ensureProperName(reader, QNAME_HANDLER_CLASS);
- try {
- handler = (Handler) loadClass(classLoader,
- XMLStreamReaderUtil.getElementText(reader).trim()).newInstance();
- } catch (InstantiationException ie){
- throw new RuntimeException(ie);
- } catch (IllegalAccessException e) {
- throw new RuntimeException(e);
- }
- XMLStreamReaderUtil.nextContent(reader);
-
- // init params (ignored)
- while (reader.getName().equals(QNAME_HANDLER_PARAM)) {
- skipInitParamElement(reader);
- }
-
- // headers (ignored)
- while (reader.getName().equals(QNAME_HANDLER_HEADER)) {
- skipTextElement(reader);
- }
-
- // roles (not stored per handler)
- while (reader.getName().equals(QNAME_HANDLER_ROLE)) {
- roles.add(XMLStreamReaderUtil.getElementText(reader));
- XMLStreamReaderUtil.nextContent(reader);
- }
-
- // call @PostConstruct method on handler if present
- for (Method method : handler.getClass().getMethods()) {
- if (method.getAnnotation(PostConstruct.class) == null) {
- continue;
- }
- try {
- method.invoke(handler, new Object [0]);
- break;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- handlerChain.add(handler);
-
- // move past </handler>
- ensureProperName(reader, QNAME_HANDLER);
- XMLStreamReaderUtil.nextContent(reader);
- }
-
- // move past </handler-chain>
- ensureProperName(reader, QNAME_HANDLER_CHAIN);
- XMLStreamReaderUtil.nextContent(reader);
- }
-
- info.setHandlers(handlerChain);
- info.setRoles(roles);
- return info;
- }
-
- public HandlerAnnotationInfo getHandlersForPortInfo(PortInfo info){
-
- HandlerAnnotationInfo handlerInfo = new HandlerAnnotationInfo();
- List<Handler> handlerClassList = new ArrayList<Handler>();
- Set<String> roles = new HashSet<String>();
-
- for(HandlerChainType hchain : handlerChains) {
- boolean hchainMatched = false;
- if((!hchain.isConstraintSet()) ||
- JAXWSUtils.matchQNames(info.getServiceName(), hchain.getServiceNamePattern()) ||
- JAXWSUtils.matchQNames(info.getPortName(), hchain.getPortNamePattern()) ||
- hchain.getProtocolBindings().contains(info.getBindingID()) ){
- hchainMatched = true;
-
- }
- if(hchainMatched) {
- for(HandlerType handler : hchain.getHandlers()) {
- try {
- Handler handlerClass = (Handler) loadClass(annotatedClass.getClassLoader(),
- handler.getHandlerClass()).newInstance();
- callHandlerPostConstruct(handlerClass);
- handlerClassList.add(handlerClass);
- } catch (InstantiationException ie){
- throw new RuntimeException(ie);
- } catch (IllegalAccessException e) {
- throw new RuntimeException(e);
- }
-
- roles.addAll(handler.getSoapRoles());
- }
-
- }
- }
-
- handlerInfo.setHandlers(handlerClassList);
- handlerInfo.setRoles(roles);
- return handlerInfo;
-
- }
-
- private static Class loadClass(ClassLoader loader, String name) {
- try {
- return Class.forName(name, true, loader);
- } catch (ClassNotFoundException e) {
- throw new UtilException(
- "util.handler.class.not.found",
- name);
- }
- }
-
- private static void callHandlerPostConstruct(Object handlerClass) {
- // call @PostConstruct method on handler if present
- for (Method method : handlerClass.getClass().getMethods()) {
- if (method.getAnnotation(PostConstruct.class) == null) {
- continue;
- }
- try {
- method.invoke(handlerClass, new Object [0]);
- break;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
- }
-
- private static void skipChain(XMLStreamReader reader) {
- while (XMLStreamReaderUtil.nextContent(reader) !=
- XMLStreamConstants.END_ELEMENT ||
- !reader.getName().equals(QNAME_HANDLER_CHAIN)) {}
- XMLStreamReaderUtil.nextElementContent(reader);
- }
-
- private static void skipTextElement(XMLStreamReader reader) {
- XMLStreamReaderUtil.nextContent(reader);
- XMLStreamReaderUtil.nextElementContent(reader);
- XMLStreamReaderUtil.nextElementContent(reader);
- }
-
- private static void skipInitParamElement(XMLStreamReader reader) {
- int state;
- do {
- state = XMLStreamReaderUtil.nextContent(reader);
- } while (state != XMLStreamReader.END_ELEMENT ||
- !reader.getName().equals(QNAME_HANDLER_PARAM));
- XMLStreamReaderUtil.nextElementContent(reader);
- }
-
- private static void ensureProperName(XMLStreamReader reader,
- QName expectedName) {
-
- if (!reader.getName().equals(expectedName)) {
- failWithLocalName("util.parser.wrong.element", reader,
- expectedName.getLocalPart());
- }
- }
-
- static void ensureProperName(XMLStreamReader reader, String expectedName) {
- if (!reader.getLocalName().equals(expectedName)) {
- failWithLocalName("util.parser.wrong.element", reader,
- expectedName);
- }
- }
-
- private static void failWithLocalName(String key,
- XMLStreamReader reader, String arg) {
- throw new UtilException(key,
- Integer.toString(reader.getLocation().getLineNumber()),
- reader.getLocalName(),
- arg );
- }
-
- public static final String PROTOCOL_SOAP11_TOKEN = "##SOAP11_HTTP";
- public static final String PROTOCOL_SOAP12_TOKEN = "##SOAP12_HTTP";
- public static final String PROTOCOL_XML_TOKEN = "##XML_HTTP";
-
- public static final String NS_109 =
- "http://java.sun.com/xml/ns/javaee";
- public static final QName QNAME_CHAIN_PORT_PATTERN =
- new QName(NS_109, "port-name-pattern");
- public static final QName QNAME_CHAIN_PROTOCOL_BINDING =
- new QName(NS_109, "protocol-bindings");
- public static final QName QNAME_CHAIN_SERVICE_PATTERN =
- new QName(NS_109, "service-name-pattern");
- public static final QName QNAME_HANDLER_CHAIN =
- new QName(NS_109, "handler-chain");
- public static final QName QNAME_HANDLER_CHAINS =
- new QName(NS_109, "handler-chains");
- public static final QName QNAME_HANDLER =
- new QName(NS_109, "handler");
- public static final QName QNAME_HANDLER_NAME =
- new QName(NS_109, "handler-name");
- public static final QName QNAME_HANDLER_CLASS =
- new QName(NS_109, "handler-class");
- public static final QName QNAME_HANDLER_PARAM =
- new QName(NS_109, "init-param");
- public static final QName QNAME_HANDLER_PARAM_NAME =
- new QName(NS_109, "param-name");
- public static final QName QNAME_HANDLER_PARAM_VALUE =
- new QName(NS_109, "param-value");
- public static final QName QNAME_HANDLER_HEADER =
- new QName(NS_109, "soap-header");
- public static final QName QNAME_HANDLER_ROLE =
- new QName(NS_109, "soap-role");
-
- static class HandlerChainType {
- //constraints
- QName serviceNamePattern;
- QName portNamePattern;
- List<String> protocolBindings;
-
- // This flag is set if one of the above constraint is set on handler chain
- boolean constraintSet = false;
-
- List<HandlerType> handlers;
- String id;
-
-
- /** Creates a new instance of HandlerChain */
- public HandlerChainType() {
- protocolBindings = new ArrayList<String>();
- }
-
- public void setServiceNamePattern(QName value) {
- this.serviceNamePattern = value;
- constraintSet = true;
- }
-
- public QName getServiceNamePattern() {
- return serviceNamePattern;
- }
-
- public void setPortNamePattern(QName value) {
- this.portNamePattern = value;
- constraintSet = true;
- }
-
- public QName getPortNamePattern() {
- return portNamePattern;
- }
-
- public List<java.lang.String> getProtocolBindings() {
- return this.protocolBindings;
- }
-
- public void addProtocolBinding(String tokenOrURI){
- /*
- Convert short-form tokens to API's binding ids
- Unknown token, Put it as it is
- */
- tokenOrURI = DeploymentDescriptorParser.getBindingIdForToken(tokenOrURI);
- String binding = BindingID.parse(tokenOrURI).toString();
- protocolBindings.add(binding);
- constraintSet = true;
- }
-
- public boolean isConstraintSet() {
- return constraintSet || !protocolBindings.isEmpty();
- }
- public java.lang.String getId() {
- return id;
- }
-
- public void setId(java.lang.String value) {
- this.id = value;
- }
-
- public List<HandlerType> getHandlers() {
- if (handlers == null) {
- handlers = new ArrayList<HandlerType>();
- }
- return this.handlers;
- }
- }
-
- static class HandlerType {
- String handlerName;
- String handlerClass;
- List<String> soapRoles;
-
- java.lang.String id;
-
- /** Creates a new instance of HandlerComponent */
- public HandlerType() {
- }
-
- public String getHandlerName() {
- return handlerName;
- }
-
- public void setHandlerName(String value) {
- this.handlerName = value;
- }
-
- public String getHandlerClass() {
- return handlerClass;
- }
-
- public void setHandlerClass(String value) {
- this.handlerClass = value;
- }
-
- public java.lang.String getId() {
- return id;
- }
-
- public void setId(java.lang.String value) {
- this.id = value;
- }
-
- public List<String> getSoapRoles() {
- if (soapRoles == null) {
- soapRoles = new ArrayList<String>();
- }
- return this.soapRoles;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerException.java
deleted file mode 100644
index 1cce96fc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.handler;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-/**
- * Exception thrown by handler-related code. Extends
- * {@link com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase}
- * using the appropriate resource bundle.
- *
- * @see com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase
- *
- * @author WS Development Team
- */
-public class HandlerException extends JAXWSExceptionBase {
- public HandlerException(String key, Object... args) {
- super(key, args);
- }
-
- public HandlerException(Throwable throwable) {
- super(throwable);
- }
-
- public HandlerException(Localizable arg) {
- super("handler.nestedError", arg);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.handler";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerProcessor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerProcessor.java
deleted file mode 100644
index af82f4c9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerProcessor.java
+++ /dev/null
@@ -1,412 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.handler;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-
-import javax.xml.ws.ProtocolException;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.handler.MessageContext;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * @author WS Development Team
- */
-abstract class HandlerProcessor<C extends MessageUpdatableContext> {
-
- boolean isClient;
- static final Logger logger = Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".handler");
-
- // need request or response for Handle interface
- public enum RequestOrResponse {
- REQUEST, RESPONSE }
-
- public enum Direction {
- OUTBOUND, INBOUND }
-
- private List<? extends Handler> handlers; // may be logical/soap mixed
-
- WSBinding binding;
- private int index = -1;
- private HandlerTube owner;
-
- /**
- * The handlers that are passed in will be sorted into
- * logical and soap handlers. During this sorting, the
- * understood headers are also obtained from any soap
- * handlers.
- *
- * @param chain A list of handler objects, which can
- * be protocol or logical handlers.
- */
- protected HandlerProcessor(HandlerTube owner, WSBinding binding, List<? extends Handler> chain) {
- this.owner = owner;
- if (chain == null) { // should only happen in testing
- chain = new ArrayList<Handler>();
- }
- handlers = chain;
- this.binding = binding;
- }
-
- /**
- * Gives index of the handler in the chain to know what handlers in the chain
- * are invoked
- */
- int getIndex() {
- return index;
- }
-
- /**
- * This is called when a handler returns false or throws a RuntimeException
- */
- void setIndex(int i) {
- index = i;
- }
-
- /**
- * TODO: Just putting thoughts,
- * Current contract: This is Called during Request Processing.
- * return true, if all handlers in the chain return true
- * Current Pipe can call nextPipe.process();
- * return false, One of the handlers has returned false or thrown a
- * RuntimeException. Remedy Actions taken:
- * 1) In this case, The processor will setIndex()to track what
- * handlers are invoked until that point.
- * 2) Previously invoked handlers are again invoked (handleMessage()
- * or handleFault()) to take remedy action.
- * CurrentPipe should NOT call nextPipe.process()
- * While closing handlers, check getIndex() to get the invoked
- * handlers.
- * @throws RuntimeException this happens when a RuntimeException occurs during
- * handleMessage during Request processing or
- * during remedy action 2)
- * CurrentPipe should NOT call nextPipe.process() and throw the
- * exception to the previous Pipe
- * While closing handlers, check getIndex() to get the invoked
- * handlers.
- */
- public boolean callHandlersRequest(Direction direction,
- C context,
- boolean responseExpected) {
- setDirection(direction, context);
- boolean result;
- // call handlers
- try {
- if (direction == Direction.OUTBOUND) {
- result = callHandleMessage(context, 0, handlers.size() - 1);
- } else {
- result = callHandleMessage(context, handlers.size() - 1, 0);
- }
- } catch (ProtocolException pe) {
- logger.log(Level.FINER, "exception in handler chain", pe);
- if (responseExpected) {
- //insert fault message if its not a fault message
- insertFaultMessage(context, pe);
- // reverse direction
- reverseDirection(direction, context);
- //Set handleFault so that cousinTube is aware of fault
- setHandleFaultProperty();
- // call handle fault
- if (direction == Direction.OUTBOUND) {
- callHandleFault(context, getIndex() - 1, 0);
- } else {
- callHandleFault(context, getIndex() + 1, handlers.size() - 1);
- }
- return false;
- }
- throw pe;
- } catch (RuntimeException re) {
- logger.log(Level.FINER, "exception in handler chain", re);
- throw re;
- }
-
- if (!result) {
- if (responseExpected) {
- // reverse direction
- reverseDirection(direction, context);
- // call handle message
- if (direction == Direction.OUTBOUND) {
- callHandleMessageReverse(context, getIndex() - 1, 0);
- } else {
- callHandleMessageReverse(context, getIndex() + 1, handlers.size() - 1);
- }
- } else {
- // Set handleFalse so that cousinTube is aware of false processing
- // Oneway, dispatch the message
- // cousinTube should n't call handleMessage() anymore.
- setHandleFalseProperty();
- }
- return false;
- }
-
- return result;
- }
-
-
- /**
- * TODO: Just putting thoughts,
- * Current contract: This is Called during Response Processing.
- * Runs all handlers until handle returns false or throws a RuntimeException
- * CurrentPipe should close all the handlers in the chain.
- * throw RuntimeException, this happens when a RuntimeException occurs during
- * normal Response processing or remedy action 2) taken
- * during callHandlersRequest().
- * CurrentPipe should close all the handlers in the chain. *
- */
- public void callHandlersResponse(Direction direction,
- C context, boolean isFault) {
- setDirection(direction, context);
- try {
- if (isFault) {
- // call handleFault on handlers
- if (direction == Direction.OUTBOUND) {
- callHandleFault(context, 0, handlers.size() - 1);
- } else {
- callHandleFault(context, handlers.size() - 1, 0);
- }
- } else {
- // call handleMessage on handlers
- if (direction == Direction.OUTBOUND) {
- callHandleMessageReverse(context, 0, handlers.size() - 1);
- } else {
- callHandleMessageReverse(context, handlers.size() - 1, 0);
- }
- }
- } catch (RuntimeException re) {
- logger.log(Level.FINER, "exception in handler chain", re);
- throw re;
- }
- }
-
-
- /**
- * Reverses the Message Direction.
- * MessageContext.MESSAGE_OUTBOUND_PROPERTY is changed.
- */
- private void reverseDirection(Direction origDirection, C context) {
- if (origDirection == Direction.OUTBOUND) {
- context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, false);
- } else {
- context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, true);
- }
- }
-
- /**
- * Sets the Message Direction.
- * MessageContext.MESSAGE_OUTBOUND_PROPERTY is changed.
- */
- private void setDirection(Direction direction, C context) {
- if (direction == Direction.OUTBOUND) {
- context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, true);
- } else {
- context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, false);
- }
- }
-
- /**
- * When this property is set HandlerPipes can call handleFault() on the
- * message
- */
- private void setHandleFaultProperty() {
- owner.setHandleFault();
- }
-
- /**
- * When this property is set HandlerPipes will not call
- * handleMessage() during Response processing.
- */
- private void setHandleFalseProperty() {
- owner.setHandleFalse();
- }
-
- /**
- * When a ProtocolException is thrown, this is called.
- * If it's XML/HTTP Binding, clear the the message
- * If its SOAP/HTTP Binding, put right SOAP Fault version
- */
- abstract void insertFaultMessage(C context,
- ProtocolException exception);
-
- /*
- * Calls handleMessage on the handlers. Indices are
- * inclusive. Exceptions get passed up the chain, and an
- * exception or return of 'false' ends processing.
- */
- private boolean callHandleMessage(C context, int start, int end) {
- /* Do we need this check?
- if (handlers.isEmpty() ||
- start == -1 ||
- start == handlers.size()) {
- return false;
- }
- */
- int i = start;
- try {
- if (start > end) {
- while (i >= end) {
- if (!handlers.get(i).handleMessage(context)) {
- setIndex(i);
- return false;
- }
- i--;
- }
- } else {
- while (i <= end) {
- if (!handlers.get(i).handleMessage(context)) {
- setIndex(i);
- return false;
- }
- i++;
- }
- }
- } catch (RuntimeException e) {
- setIndex(i);
- throw e;
- }
- return true;
- }
-
- /*
- * Calls handleMessage on the handlers. Indices are
- * inclusive. Exceptions get passed up the chain, and an
- * exception (or)
- * return of 'false' calls addHandleFalseProperty(context) and
- * ends processing.
- * setIndex() is not called.
- *
- */
- private boolean callHandleMessageReverse(C context, int start, int end) {
-
- if (handlers.isEmpty() ||
- start == -1 ||
- start == handlers.size()) {
- return false;
- }
-
- int i = start;
-
- if (start > end) {
- while (i >= end) {
- if (!handlers.get(i).handleMessage(context)) {
- // Set handleFalse so that cousinTube is aware of false processing
- setHandleFalseProperty();
- return false;
- }
- i--;
- }
- } else {
- while (i <= end) {
- if (!handlers.get(i).handleMessage(context)) {
- // Set handleFalse so that cousinTube is aware of false processing
- setHandleFalseProperty();
- return false;
- }
- i++;
- }
- }
- return true;
- }
-
- /*
- * Calls handleFault on the handlers. Indices are
- * inclusive. Exceptions get passed up the chain, and an
- * exception or return of 'false' ends processing.
- */
-
- private boolean callHandleFault(C context, int start, int end) {
-
- if (handlers.isEmpty() ||
- start == -1 ||
- start == handlers.size()) {
- return false;
- }
-
- int i = start;
- if (start > end) {
- try {
- while (i >= end) {
- if (!handlers.get(i).handleFault(context)) {
- return false;
- }
- i--;
- }
- } catch (RuntimeException re) {
- logger.log(Level.FINER,
- "exception in handler chain", re);
- throw re;
- }
- } else {
- try {
- while (i <= end) {
- if (!handlers.get(i).handleFault(context)) {
- return false;
- }
- i++;
- }
- } catch (RuntimeException re) {
- logger.log(Level.FINER,
- "exception in handler chain", re);
- throw re;
- }
- }
- return true;
- }
-
- /**
- * Calls close on the handlers from the starting
- * index through the ending index (inclusive). Made indices
- * inclusive to allow both directions more easily.
- */
- void closeHandlers(MessageContext context, int start, int end) {
- if (handlers.isEmpty() ||
- start == -1) {
- return;
- }
- if (start > end) {
- for (int i = start; i >= end; i--) {
- try {
- handlers.get(i).close(context);
- } catch (RuntimeException re) {
- logger.log(Level.INFO,
- "Exception ignored during close", re);
- }
- }
- } else {
- for (int i = start; i <= end; i++) {
- try {
- handlers.get(i).close(context);
- } catch (RuntimeException re) {
- logger.log(Level.INFO,
- "Exception ignored during close", re);
- }
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerTube.java
deleted file mode 100644
index d82cc78d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerTube.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.handler;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.*;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.HandlerConfiguration;
-
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.Handler;
-import java.util.List;
-
-/**
- * @author WS Development team
- */
-
-public abstract class HandlerTube extends AbstractFilterTubeImpl {
- /**
- * handle hold reference to other Tube for inter-tube communication
- */
- HandlerTube cousinTube;
- protected List<Handler> handlers;
- HandlerProcessor processor;
- boolean remedyActionTaken = false;
- protected final @Nullable WSDLPort port;
- // flag used to decide whether to call close on cousinTube
- boolean requestProcessingSucessful = false;
- private WSBinding binding;
- private HandlerConfiguration hc;
-
- public HandlerTube(Tube next, WSDLPort port, WSBinding binding) {
- super(next);
- this.port = port;
- this.binding = binding;
- }
-
- public HandlerTube(Tube next, HandlerTube cousinTube, WSBinding binding) {
- super(next);
- this.cousinTube = cousinTube;
- this.binding = binding;
- if(cousinTube != null) {
- this.port = cousinTube.port;
- } else {
- this.port = null;
- }
- }
-
- /**
- * Copy constructor for {@link Tube#copy(TubeCloner)}.
- */
- protected HandlerTube(HandlerTube that, TubeCloner cloner) {
- super(that,cloner);
- if(that.cousinTube != null) {
- this.cousinTube = cloner.copy(that.cousinTube);
- }
- this.port = that.port;
- this.binding = that.binding;
- }
-
- protected WSBinding getBinding() {
- return binding;
- }
-
- @Override
- public NextAction processRequest(Packet request) {
- setupExchange();
- // This check is done to cover handler returning false in Oneway request
- if (isHandleFalse()) {
- // Cousin HandlerTube returned false during Oneway Request processing.
- // Don't call handlers and dispatch the message.
- remedyActionTaken = true;
- return doInvoke(super.next, request);
- }
-
- // This is done here instead of the constructor, since User can change
- // the roles and handlerchain after a stub/proxy is created.
- setUpProcessorInternal();
-
- MessageUpdatableContext context = getContext(request);
- boolean isOneWay = checkOneWay(request);
- try {
- if (!isHandlerChainEmpty()) {
- // Call handlers on Request
- boolean handlerResult = callHandlersOnRequest(context, isOneWay);
- //Update Packet with user modifications
- context.updatePacket();
- // two-way case where no message is sent
- if (!isOneWay && !handlerResult) {
- return doReturnWith(request);
- }
- }
- requestProcessingSucessful = true;
- // Call next Tube
- return doInvoke(super.next, request);
- } catch (RuntimeException re) {
- if(isOneWay) {
- //Eat the exception, its already logged and close the transportBackChannel
- if(request.transportBackChannel != null ) {
- request.transportBackChannel.close();
- }
- request.setMessage(null);
- return doReturnWith(request);
- } else
- throw re;
- } finally {
- if(!requestProcessingSucessful) {
- initiateClosing(context.getMessageContext());
- }
- }
-
- }
-
- @Override
- public NextAction processResponse(Packet response) {
- setupExchange();
- MessageUpdatableContext context = getContext(response);
- try {
- if (isHandleFalse() || (response.getMessage() == null)) {
- // Cousin HandlerTube returned false during Response processing.
- // or it is oneway request
- // or handler chain is empty
- // Don't call handlers.
- return doReturnWith(response);
- }
-
- setUpProcessorInternal();
-
- boolean isFault = isHandleFault(response);
- if (!isHandlerChainEmpty()) {
- // Call handlers on Response
- callHandlersOnResponse(context, isFault);
- }
- } finally {
- initiateClosing(context.getMessageContext());
- }
- //Update Packet with user modifications
- context.updatePacket();
-
- return doReturnWith(response);
-
- }
-
- @Override
- public NextAction processException(Throwable t) {
- try {
- return doThrow(t);
- } finally {
- Packet packet = Fiber.current().getPacket();
- MessageUpdatableContext context = getContext(packet);
- initiateClosing(context.getMessageContext());
- /* TODO revisit: commented this out as the modified packet is no longer used
- In future if the message is propagated even when an exception
- occurs, then uncomment context.updatePacket();
- */
- //Update Packet with user modifications
- //context.updatePacket();
-
-
- }
- }
-
- /**
- * Must be overridden by HandlerTube that drives other handler tubes for processing a message.
- * On Client-side: ClientLogicalHandlerTube drives the Handler Processing.
- * On Server-side: In case SOAP Binding, ServerMessageHandlerTube drives the Handler Processing.
- * In case XML/HTTP Binding, ServerLogicalHandlerTube drives the Handler Processing.
- *
- *
- * If its a top HandlerTube, should override by calling #close(MessaggeContext);
- *
- */
-
- protected void initiateClosing(MessageContext mc) {
- // Do nothing
-
- }
-
- /**
- * Calls close on previously invoked handlers.
- * Also, Cleans up any state left over in the Tube instance from the current
- * invocation, as Tube instances can be reused after the completion of MEP.
- *
- * On Client, SOAPHandlers are closed first and then LogicalHandlers
- * On Server, LogicalHandlers are closed first and then SOAPHandlers
- */
- final public void close(MessageContext msgContext) {
- //assuming cousinTube is called if requestProcessingSucessful is true
- if (requestProcessingSucessful) {
- if (cousinTube != null) {
- cousinTube.close(msgContext);
- }
-
- }
- if (processor != null)
- closeHandlers(msgContext);
-
- // Clean up the exchange for next invocation.
- exchange = null;
- requestProcessingSucessful = false;
-
- }
-
- /**
- * On Client, Override by calling #closeClientHandlers(MessageContext mc)
- * On Server, Override by calling #closeServerHandlers(MessageContext mc)
- * The difference is the order in which they are closed.
- * @param mc
- */
- abstract void closeHandlers(MessageContext mc);
-
- /**
- * Called by close(MessageContext mc) in a Client Handlertube
- */
- protected void closeClientsideHandlers(MessageContext msgContext) {
- if (processor == null)
- return;
- if (remedyActionTaken) {
- //Close only invoked handlers in the chain
-
- //CLIENT-SIDE
- processor.closeHandlers(msgContext, processor.getIndex(), 0);
- processor.setIndex(-1);
- //reset remedyActionTaken
- remedyActionTaken = false;
- } else {
- //Close all handlers in the chain
-
- //CLIENT-SIDE
- processor.closeHandlers(msgContext, handlers.size() - 1, 0);
-
- }
- }
-
- /**
- * Called by close(MessageContext mc) in a Server Handlertube
- */
- protected void closeServersideHandlers(MessageContext msgContext) {
- if (processor == null)
- return;
- if (remedyActionTaken) {
- //Close only invoked handlers in the chain
-
- //SERVER-SIDE
- processor.closeHandlers(msgContext, processor.getIndex(), handlers.size() - 1);
- processor.setIndex(-1);
- //reset remedyActionTaken
- remedyActionTaken = false;
- } else {
- //Close all handlers in the chain
-
- //SERVER-SIDE
- processor.closeHandlers(msgContext, 0, handlers.size() - 1);
-
- }
- }
-
- abstract void callHandlersOnResponse(MessageUpdatableContext context, boolean handleFault);
-
- abstract boolean callHandlersOnRequest(MessageUpdatableContext context, boolean oneWay);
-
- private boolean checkOneWay(Packet packet) {
- if (port != null) {
- /* we can determine this value from WSDL */
- return packet.getMessage().isOneWay(port);
- } else {
- /*
- otherwise use this value as an approximation, since this carries
- the application's intention --- whether it was invokeOneway vs invoke,etc.
- */
- return !(packet.expectReply != null && packet.expectReply);
- }
- }
-
- private void setUpProcessorInternal() {
- HandlerConfiguration hc = ((BindingImpl) binding).getHandlerConfig();
- if (hc != this.hc)
- resetProcessor();
- this.hc = hc;
-
- setUpProcessor();
- }
-
- abstract void setUpProcessor();
-
- protected void resetProcessor() {
- handlers = null;
- }
-
- final public boolean isHandlerChainEmpty() {
- return handlers.isEmpty();
- }
- abstract MessageUpdatableContext getContext(Packet p);
-
- private boolean isHandleFault(Packet packet) {
- if (cousinTube != null) {
- return exchange.isHandleFault();
- } else {
- boolean isFault = packet.getMessage().isFault();
- exchange.setHandleFault(isFault);
- return isFault;
- }
- }
-
- final void setHandleFault() {
- exchange.setHandleFault(true);
- }
-
- private boolean isHandleFalse() {
- return exchange.isHandleFalse();
- }
-
- final void setHandleFalse() {
- exchange.setHandleFalse();
- }
-
- private void setupExchange() {
- if(exchange == null) {
- exchange = new HandlerTubeExchange();
- if(cousinTube != null) {
- cousinTube.exchange = exchange;
- }
- } else {
- if(cousinTube != null) {
- cousinTube.exchange = exchange;
- }
-
- }
- }
- private HandlerTubeExchange exchange;
-
- /**
- * This class is used primarily to exchange information or status between
- * LogicalHandlerTube and SOAPHandlerTube
- */
- static final class HandlerTubeExchange {
- private boolean handleFalse;
- private boolean handleFault;
-
- boolean isHandleFault() {
- return handleFault;
- }
-
- void setHandleFault(boolean isFault) {
- this.handleFault = isFault;
- }
-
- public boolean isHandleFalse() {
- return handleFalse;
- }
-
- void setHandleFalse() {
- this.handleFalse = true;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageContextImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageContextImpl.java
deleted file mode 100644
index f45a82b2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageContextImpl.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.handler;
-
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-
-import javax.xml.ws.LogicalMessage;
-import javax.xml.ws.handler.LogicalMessageContext;
-
-/**
- * Implementation of LogicalMessageContext. This class is used at runtime
- * to pass to the handlers for processing logical messages.
- *
- * <p>This Class delegates most of the fuctionality to Packet
- *
- * @see Packet
- *
- * @author WS Development Team
- */
-class LogicalMessageContextImpl extends MessageUpdatableContext implements LogicalMessageContext {
- private LogicalMessageImpl lm;
- private WSBinding binding;
-// private JAXBContext defaultJaxbContext;
- private BindingContext defaultJaxbContext;
- public LogicalMessageContextImpl(WSBinding binding, BindingContext defaultJAXBContext, Packet packet) {
- super(packet);
- this.binding = binding;
- this.defaultJaxbContext = defaultJAXBContext;
- }
-
- public LogicalMessage getMessage() {
- if(lm == null)
- lm = new LogicalMessageImpl(defaultJaxbContext, packet);
- return lm;
- }
-
- void setPacketMessage(Message newMessage){
- if(newMessage != null) {
- packet.setMessage(newMessage);
- lm = null;
- }
- }
-
-
- protected void updateMessage() {
- //If LogicalMessage is not acccessed, its not modified.
- if(lm != null) {
- //Check if LogicalMessageImpl has changed, if so construct new one
- // Packet are handled through MessageContext
- if(lm.isPayloadModifed()){
- Message msg = packet.getMessage();
- Message updatedMsg = lm.getMessage(msg.getHeaders(),msg.getAttachments(),binding);
- packet.setMessage(updatedMsg);
- }
- lm = null;
- }
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageImpl.java
deleted file mode 100644
index 52cb5028..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageImpl.java
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.handler;
-
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.BindingContextFactory;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import com.sun.xml.internal.ws.message.EmptyMessageImpl;
-import com.sun.xml.internal.ws.message.DOMMessage;
-import com.sun.xml.internal.ws.message.jaxb.JAXBMessage;
-import com.sun.xml.internal.ws.message.source.PayloadSourceMessage;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.util.JAXBSource;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.ws.LogicalMessage;
-import javax.xml.ws.WebServiceException;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.Document;
-
-/**
- * Implementation of {@link LogicalMessage}. This class implements the methods
- * used by LogicalHandlers to get/set the request or response either
- * as a JAXB object or as javax.xml.transform.Source.
- * <p/>
- * <p>The {@link Message} that is passed into the constructor
- * is used to retrieve the payload of the request or response.
- *
- * @author WS Development Team
- * @see Message
- * @see LogicalMessageContextImpl
- */
-class LogicalMessageImpl implements LogicalMessage {
- private Packet packet;
-// protected JAXBContext defaultJaxbContext;
- protected BindingContext defaultJaxbContext;
- private ImmutableLM lm = null;
-
-
- public LogicalMessageImpl(BindingContext defaultJaxbContext, Packet
- packet) {
- // don't create extract payload until Users wants it.
- this.packet = packet;
- this.defaultJaxbContext = defaultJaxbContext;
- }
-
- public Source getPayload() {
- if (lm == null) {
- Source payload = packet.getMessage().copy().readPayloadAsSource();
- if (payload instanceof DOMSource) {
- lm = createLogicalMessageImpl(payload);
- }
- return payload;
- } else {
- return lm.getPayload();
- }
- }
-
- public void setPayload(Source payload) {
- lm = createLogicalMessageImpl(payload);
- }
-
- private ImmutableLM createLogicalMessageImpl(Source payload) {
- if (payload == null) {
- lm = new EmptyLogicalMessageImpl();
- } else if (payload instanceof DOMSource) {
- lm = new DOMLogicalMessageImpl((DOMSource) payload);
- } else {
- lm = new SourceLogicalMessageImpl(payload);
- }
- return lm;
- }
-
- public Object getPayload(BindingContext context) {
- if (context == null) {
- context = defaultJaxbContext;
- }
- if (context == null)
- throw new WebServiceException("JAXBContext parameter cannot be null");
-
- Object o;
- if (lm == null) {
- try {
- o = packet.getMessage().copy().readPayloadAsJAXB(context.createUnmarshaller());
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
- } else {
- o = lm.getPayload(context);
- lm = new JAXBLogicalMessageImpl(context.getJAXBContext(), o);
- }
- return o;
- }
-
- public Object getPayload(JAXBContext context) {
- if (context == null) {
- return getPayload(defaultJaxbContext);
- }
- if (context == null)
- throw new WebServiceException("JAXBContext parameter cannot be null");
-
- Object o;
- if (lm == null) {
- try {
- o = packet.getMessage().copy().readPayloadAsJAXB(context.createUnmarshaller());
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
- } else {
- o = lm.getPayload(context);
- lm = new JAXBLogicalMessageImpl(context, o);
- }
- return o;
- }
-
- public void setPayload(Object payload, BindingContext context) {
- if (context == null) {
- context = defaultJaxbContext;
- }
- if (payload == null) {
- lm = new EmptyLogicalMessageImpl();
- } else {
- lm = new JAXBLogicalMessageImpl(context.getJAXBContext(), payload);
- }
- }
-
- public void setPayload(Object payload, JAXBContext context) {
- if (context == null) {
- setPayload(payload, defaultJaxbContext);
- }
- if (payload == null) {
- lm = new EmptyLogicalMessageImpl();
- } else {
- lm = new JAXBLogicalMessageImpl(context, payload);
- }
- }
-
- public boolean isPayloadModifed() {
- return (lm != null);
- }
-
- /**
- * This should be called by first checking if the payload is modified.
- *
- * @param headers
- * @param attachments
- * @param binding
- * @return
- */
- public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) {
- assert isPayloadModifed();
- if(isPayloadModifed()) {
- return lm.getMessage(headers,attachments,binding);
- } else {
- return packet.getMessage();
- }
-
- }
-
-
- private abstract class ImmutableLM {
- public abstract Source getPayload();
- public abstract Object getPayload(BindingContext context);
- public abstract Object getPayload(JAXBContext context);
- public abstract Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding);
-
- }
-
- private class DOMLogicalMessageImpl extends SourceLogicalMessageImpl {
- private DOMSource dom;
-
- public DOMLogicalMessageImpl(DOMSource dom) {
- super(dom);
- this.dom = dom;
- }
-
- @Override
- public Source getPayload() {
- return dom;
- }
-
- public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) {
- Node n = dom.getNode();
- if(n.getNodeType()== Node.DOCUMENT_NODE) {
- n = ((Document)n).getDocumentElement();
- }
- return new DOMMessage(binding.getSOAPVersion(), headers, (Element)n, attachments);
- }
- }
-
- private class EmptyLogicalMessageImpl extends ImmutableLM {
- public EmptyLogicalMessageImpl() {
-
- }
-
- @Override
- public Source getPayload() {
- return null;
- }
-
- @Override
- public Object getPayload(JAXBContext context) {
- return null;
- }
-
- @Override
- public Object getPayload(BindingContext context) {
- return null;
- }
-
- public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) {
- return new EmptyMessageImpl(headers,attachments,binding.getSOAPVersion());
- }
- }
-
- private class JAXBLogicalMessageImpl extends ImmutableLM {
- private JAXBContext ctxt;
- private Object o;
-
- public JAXBLogicalMessageImpl(JAXBContext ctxt, Object o) {
- this.ctxt = ctxt;
- this.o = o;
-
- }
-
- @Override
- public Source getPayload() {
- JAXBContext context = ctxt;
- if (context == null) {
- context = defaultJaxbContext.getJAXBContext();
- }
- try {
- return new JAXBSource(context, o);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
- }
-
- @Override
- public Object getPayload(JAXBContext context) {
-// if(context == ctxt) {
-// return o;
-// }
- try {
- Source payloadSrc = getPayload();
- if (payloadSrc == null)
- return null;
- Unmarshaller unmarshaller = context.createUnmarshaller();
- return unmarshaller.unmarshal(payloadSrc);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
- }
- public Object getPayload(BindingContext context) {
-// if(context == ctxt) {
-// return o;
-// }
- try {
- Source payloadSrc = getPayload();
- if (payloadSrc == null)
- return null;
- Unmarshaller unmarshaller = context.createUnmarshaller();
- return unmarshaller.unmarshal(payloadSrc);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
- }
-
- public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) {
- return JAXBMessage.create(BindingContextFactory.create(ctxt), o,binding.getSOAPVersion(), headers,attachments);
- }
- }
-
- private class SourceLogicalMessageImpl extends ImmutableLM {
- private Source payloadSrc;
-
- public SourceLogicalMessageImpl(Source source) {
- this.payloadSrc = source;
- }
-
- public Source getPayload() {
- assert (!(payloadSrc instanceof DOMSource));
- try {
- Transformer transformer = XmlUtil.newTransformer();
- DOMResult domResult = new DOMResult();
- transformer.transform(payloadSrc, domResult);
- DOMSource dom = new DOMSource(domResult.getNode());
- lm = new DOMLogicalMessageImpl((DOMSource) dom);
- payloadSrc = null;
- return dom;
- } catch (TransformerException te) {
- throw new WebServiceException(te);
- }
- }
-
- public Object getPayload(JAXBContext context) {
- try {
- Source payloadSrc = getPayload();
- if (payloadSrc == null)
- return null;
- Unmarshaller unmarshaller = context.createUnmarshaller();
- return unmarshaller.unmarshal(payloadSrc);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
-
- }
-
- public Object getPayload(BindingContext context) {
- try {
- Source payloadSrc = getPayload();
- if (payloadSrc == null)
- return null;
- Unmarshaller unmarshaller = context.createUnmarshaller();
- return unmarshaller.unmarshal(payloadSrc);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
-
- }
-
- public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) {
- assert (payloadSrc!=null);
- return new PayloadSourceMessage(headers, payloadSrc, attachments,binding.getSOAPVersion());
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageContextImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageContextImpl.java
deleted file mode 100644
index 46b096e6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageContextImpl.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.handler;
-
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Packet;
-
-import javax.activation.DataHandler;
-import javax.xml.ws.handler.MessageContext;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-
-/**
- *
- * @author WS Development Team
- */
-
-class MessageContextImpl implements MessageContext {
- private final Set<String> handlerScopeProps;
- private final Packet packet;
- private final Map<String, Object> asMapIncludingInvocationProperties;
-
- /** Creates a new instance of MessageContextImpl */
- public MessageContextImpl(Packet packet) {
- this.packet = packet;
- this.asMapIncludingInvocationProperties = packet.asMapIncludingInvocationProperties();
- this.handlerScopeProps = packet.getHandlerScopePropertyNames(false);
- }
-
- protected void updatePacket() {
- throw new UnsupportedOperationException("wrong call");
- }
-
- public void setScope(String name, Scope scope) {
- if(!containsKey(name))
- throw new IllegalArgumentException("Property " + name + " does not exist.");
- if(scope == Scope.APPLICATION) {
- handlerScopeProps.remove(name);
- } else {
- handlerScopeProps.add(name);
-
- }
- }
-
- public Scope getScope(String name) {
- if(!containsKey(name))
- throw new IllegalArgumentException("Property " + name + " does not exist.");
- if(handlerScopeProps.contains(name)) {
- return Scope.HANDLER;
- } else {
- return Scope.APPLICATION;
- }
- }
-
- public int size() {
- return asMapIncludingInvocationProperties.size();
- }
-
- public boolean isEmpty() {
- return asMapIncludingInvocationProperties.isEmpty();
- }
-
- public boolean containsKey(Object key) {
- return asMapIncludingInvocationProperties.containsKey(key);
- }
-
- public boolean containsValue(Object value) {
- return asMapIncludingInvocationProperties.containsValue(value);
- }
-
- public Object put(String key, Object value) {
- if (!asMapIncludingInvocationProperties.containsKey(key)) {
- //new property, default to Scope.HANDLER
- handlerScopeProps.add(key);
- }
- return asMapIncludingInvocationProperties.put(key, value);
- }
- public Object get(Object key) {
- if(key == null)
- return null;
- Object value = asMapIncludingInvocationProperties.get(key);
- //add the attachments from the Message to the corresponding attachment property
- if(key.equals(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS) ||
- key.equals(MessageContext.INBOUND_MESSAGE_ATTACHMENTS)){
- Map<String, DataHandler> atts = (Map<String, DataHandler>) value;
- if(atts == null)
- atts = new HashMap<String, DataHandler>();
- AttachmentSet attSet = packet.getMessage().getAttachments();
- for(Attachment att : attSet){
- String cid = att.getContentId();
- if (cid.indexOf("@jaxws.sun.com") == -1) {
- Object a = atts.get(cid);
- if (a == null) {
- a = atts.get("<" + cid + ">");
- if (a == null) atts.put(att.getContentId(), att.asDataHandler());
- }
- } else {
- atts.put(att.getContentId(), att.asDataHandler());
- }
- }
- return atts;
- }
- return value;
- }
-
- public void putAll(Map<? extends String, ? extends Object> t) {
- for(String key: t.keySet()) {
- if(!asMapIncludingInvocationProperties.containsKey(key)) {
- //new property, default to Scope.HANDLER
- handlerScopeProps.add(key);
- }
- }
- asMapIncludingInvocationProperties.putAll(t);
- }
-
- public void clear() {
- asMapIncludingInvocationProperties.clear();
- }
- public Object remove(Object key){
- handlerScopeProps.remove(key);
- return asMapIncludingInvocationProperties.remove(key);
- }
- public Set<String> keySet() {
- return asMapIncludingInvocationProperties.keySet();
- }
- public Set<Map.Entry<String, Object>> entrySet(){
- return asMapIncludingInvocationProperties.entrySet();
- }
- public Collection<Object> values() {
- return asMapIncludingInvocationProperties.values();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageHandlerContextImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageHandlerContextImpl.java
deleted file mode 100644
index a03e2e8f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageHandlerContextImpl.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.handler;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.handler.MessageHandlerContext;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-
-import java.util.Set;
-
-/**
- * @author Rama Pulavarthi
- */
-public class MessageHandlerContextImpl extends MessageUpdatableContext implements MessageHandlerContext {
- private @Nullable SEIModel seiModel;
- private Set<String> roles;
- private WSBinding binding;
- private @Nullable WSDLPort wsdlModel;
-
- public MessageHandlerContextImpl(@Nullable SEIModel seiModel, WSBinding binding, @Nullable WSDLPort wsdlModel, Packet packet, Set<String> roles) {
- super(packet);
- this.seiModel = seiModel;
- this.binding = binding;
- this.wsdlModel = wsdlModel;
- this.roles = roles;
- }
- public Message getMessage() {
- return packet.getMessage();
- }
-
- public void setMessage(Message message) {
- packet.setMessage(message);
- }
-
- public Set<String> getRoles() {
- return roles;
- }
-
- public WSBinding getWSBinding() {
- return binding;
- }
-
- public @Nullable SEIModel getSEIModel() {
- return seiModel;
- }
-
- public @Nullable WSDLPort getPort() {
- return wsdlModel;
- }
-
- void updateMessage() {
- // Do Nothing
- }
-
- void setPacketMessage(Message newMessage) {
- setMessage(newMessage);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageUpdatableContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageUpdatableContext.java
deleted file mode 100644
index 01f5c79f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageUpdatableContext.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.handler;
-
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-import javax.xml.ws.handler.MessageContext;
-
-/**
- * The class represents a MessageContext(Properties) and also allows the Message to be modified.
- * This is extended by SOAPMessageContextImpl and LogicalMessageContextImpl.
- *
- * @author WS Development Team
- */
-public abstract class MessageUpdatableContext implements MessageContext {
- final Packet packet;
- private MessageContextImpl ctxt;
- /** Creates a new instance of MessageUpdatableContext */
- public MessageUpdatableContext(Packet packet) {
- ctxt = new MessageContextImpl(packet);
- this.packet = packet;
- }
-
- /**
- * Updates Message in the packet with user modifications
- */
- abstract void updateMessage();
-
- /**
- * Updates Message in the packet with user modifications
- * returns the new packet's message
- */
- Message getPacketMessage(){
- updateMessage();
- return packet.getMessage();
- }
-
- /**
- * Sets Message in the packet
- * Any user modifications done on previous Message are lost.
- */
- abstract void setPacketMessage(Message newMessage);
-
- /**
- * Updates the complete packet with user modfications to the message and
- * properties cahnges in MessageContext
- */
- public final void updatePacket() {
- updateMessage();
- }
-
- MessageContextImpl getMessageContext() {
- return ctxt;
- }
-
- public void setScope(String name, Scope scope) {
- ctxt.setScope(name, scope);
- }
-
- public Scope getScope(String name) {
- return ctxt.getScope(name);
- }
-
- /* java.util.Map methods below here */
-
- public void clear() {
- ctxt.clear();
- }
-
- public boolean containsKey(Object obj) {
- return ctxt.containsKey(obj);
- }
-
- public boolean containsValue(Object obj) {
- return ctxt.containsValue(obj);
- }
-
- public Set<Entry<String, Object>> entrySet() {
- return ctxt.entrySet();
- }
-
- public Object get(Object obj) {
- return ctxt.get(obj);
- }
-
- public boolean isEmpty() {
- return ctxt.isEmpty();
- }
-
- public Set<String> keySet() {
- return ctxt.keySet();
- }
-
- public Object put(String str, Object obj) {
- return ctxt.put(str, obj);
- }
-
- public void putAll(Map<? extends String, ? extends Object> map) {
- ctxt.putAll(map);
- }
-
- public Object remove(Object obj) {
- return ctxt.remove(obj);
- }
-
- public int size() {
- return ctxt.size();
- }
-
- public Collection<Object> values() {
- return ctxt.values();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/PortInfoImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/PortInfoImpl.java
deleted file mode 100644
index 1efd5adf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/PortInfoImpl.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.handler;
-
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.client.WSServiceDelegate;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.handler.PortInfo;
-
-/**
- * <p>Implementation of the PortInfo interface. This is just a simple
- * class used to hold the info necessary to uniquely identify a port,
- * including the port name, service name, and binding ID. This class
- * is only used on the client side.
- *
- * <p>An instance is created by
- * {@link WSServiceDelegate} when used to
- * place a handler chain into the HandlerResolver map. Another is
- * created later by
- * {@link com.sun.xml.internal.ws.client.WSServiceDelegate} to retrieve the
- * necessary handler chain to set on a binding instance.
- *
- * @see WSServiceDelegate
- * @see com.sun.xml.internal.ws.client.HandlerResolverImpl
- *
- * @author WS Development Team
- */
-public class PortInfoImpl implements PortInfo {
-
- private BindingID bindingId;
- private QName portName;
- private QName serviceName;
-
- /**
- * The class is constructed with the information needed to identify
- * a port. This information cannot be changed later.
- *
- * @param bindingId The binding ID string.
- * @param portName The QName of the port.
- * @param serviceName The QName of the service.
- */
- public PortInfoImpl(BindingID bindingId, QName portName, QName serviceName) {
- if (bindingId == null) {
- throw new RuntimeException("bindingId cannot be null");
- }
- if (portName == null) {
- throw new RuntimeException("portName cannot be null");
- }
- if (serviceName == null) {
- throw new RuntimeException("serviceName cannot be null");
- }
- this.bindingId = bindingId;
- this.portName = portName;
- this.serviceName = serviceName;
- }
-
- public String getBindingID() {
- return bindingId.toString();
- }
-
- public QName getPortName() {
- return portName;
- }
-
- public QName getServiceName() {
- return serviceName;
- }
-
- /**
- * Object.equals is overridden here so that PortInfo objects
- * can be compared when using them as keys in the map in
- * HandlerResolverImpl. This method relies on the equals()
- * methods of java.lang.String and javax.xml.namespace.QName.
- *
- * @param obj The PortInfo object to test for equality.
- * @return True if they match, and false if they do not or
- * if the object passed in is not a PortInfo.
- */
- public boolean equals(Object obj) {
- if (obj instanceof PortInfo) {
- PortInfo info = (PortInfo) obj;
- if (bindingId.toString().equals(info.getBindingID()) &&
- portName.equals(info.getPortName()) &&
- serviceName.equals(info.getServiceName())) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Needed so PortInfoImpl can be used as a key in a map. This
- * method just delegates to the hashCode method of java.lang.String.
- */
- public int hashCode() {
- return bindingId.hashCode();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPHandlerProcessor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPHandlerProcessor.java
deleted file mode 100644
index 2f6642af..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPHandlerProcessor.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * SOAPHandlerProcessor.java
- *
- * Created on February 8, 2006, 5:43 PM
- *
- *
- */
-
-package com.sun.xml.internal.ws.handler;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Messages;
-import com.sun.xml.internal.ws.encoding.soap.SOAP12Constants;
-import com.sun.xml.internal.ws.encoding.soap.SOAPConstants;
-import java.util.List;
-import java.util.logging.Level;
-import javax.xml.namespace.QName;
-import javax.xml.ws.ProtocolException;
-import javax.xml.ws.handler.Handler;
-
-/**
- *
- * @author WS Development Team
- */
-final class SOAPHandlerProcessor<C extends MessageUpdatableContext> extends HandlerProcessor<C> {
-
- /**
- * Creates a new instance of SOAPHandlerProcessor
- */
- public SOAPHandlerProcessor(boolean isClient, HandlerTube owner, WSBinding binding, List<? extends Handler> chain) {
- super(owner, binding, chain);
- this.isClient = isClient;
- }
-
- /**
- * Replace the message in the given message context with a
- * fault message. If the context already contains a fault
- * message, then return without changing it.
- *
- * <p>This method should only be called during a request,
- * because during a response an exception from a handler
- * is dispatched rather than replacing the message with
- * a fault. So this method can use the MESSAGE_OUTBOUND_PROPERTY
- * to determine whether it is being called on the client
- * or the server side. If this changes in the spec, then
- * something else will need to be passed to the method
- * to determine whether the fault code is client or server.
- */
- final void insertFaultMessage(C context,
- ProtocolException exception) {
- try {
- if(!context.getPacketMessage().isFault()) {
- Message faultMessage = Messages.create(binding.getSOAPVersion(),
- exception,determineFaultCode(binding.getSOAPVersion()));
- context.setPacketMessage(faultMessage);
- }
- } catch (Exception e) {
- // severe since this is from runtime and not handler
- logger.log(Level.SEVERE,
- "exception while creating fault message in handler chain", e);
- throw new RuntimeException(e);
- }
- }
-
- /**
- * <p>Figure out if the fault code local part is client,
- * server, sender, receiver, etc. This is called by
- * insertFaultMessage.
- */
- private QName determineFaultCode(SOAPVersion soapVersion) {
- return isClient ? soapVersion.faultCodeClient : soapVersion.faultCodeServer;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPMessageContextImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPMessageContextImpl.java
deleted file mode 100644
index e2f5a030..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPMessageContextImpl.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.handler;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.soap.SOAPMessageContext;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Implementation of {@link SOAPMessageContext}. This class is used at runtime
- * to pass to the handlers for processing soap messages.
- *
- * @see MessageContextImpl
- *
- * @author WS Development Team
- */
-public class SOAPMessageContextImpl extends MessageUpdatableContext implements SOAPMessageContext {
-
- private Set<String> roles;
- private SOAPMessage soapMsg = null;
- private WSBinding binding;
-
- public SOAPMessageContextImpl(WSBinding binding, Packet packet,Set<String> roles) {
- super(packet);
- this.binding = binding;
- this.roles = roles;
- }
-
- public SOAPMessage getMessage() {
- if(soapMsg == null) {
- try {
- Message m = packet.getMessage();
- soapMsg = m != null ? m.readAsSOAPMessage() : null;
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
- return soapMsg;
- }
-
- public void setMessage(SOAPMessage soapMsg) {
- try {
- this.soapMsg = soapMsg;
- } catch(Exception e) {
- throw new WebServiceException(e);
- }
- }
-
- void setPacketMessage(Message newMessage){
- if(newMessage != null) {
- packet.setMessage(newMessage);
- soapMsg = null;
- }
- }
-
- protected void updateMessage() {
- //Check if SOAPMessage has changed, if so construct new one,
- // Packet are handled through MessageContext
- if(soapMsg != null) {
- packet.setMessage(SAAJFactory.create(soapMsg));
- soapMsg = null;
- }
- }
-
- public Object[] getHeaders(QName header, JAXBContext jaxbContext, boolean allRoles) {
- SOAPVersion soapVersion = binding.getSOAPVersion();
-
- List<Object> beanList = new ArrayList<Object>();
- try {
- Iterator<Header> itr = packet.getMessage().getHeaders().getHeaders(header,false);
- if(allRoles) {
- while(itr.hasNext()) {
- beanList.add(itr.next().readAsJAXB(jaxbContext.createUnmarshaller()));
- }
- } else {
- while(itr.hasNext()) {
- Header soapHeader = itr.next();
- //Check if the role is one of the roles on this Binding
- String role = soapHeader.getRole(soapVersion);
- if(getRoles().contains(role)) {
- beanList.add(soapHeader.readAsJAXB(jaxbContext.createUnmarshaller()));
- }
- }
- }
- return beanList.toArray();
- } catch(Exception e) {
- throw new WebServiceException(e);
- }
- }
-
- public Set<String> getRoles() {
- return roles;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerLogicalHandlerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerLogicalHandlerTube.java
deleted file mode 100644
index c6836a02..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerLogicalHandlerTube.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.handler;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-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.binding.BindingImpl;
-import com.sun.xml.internal.ws.message.DataHandlerAttachment;
-import com.sun.xml.internal.ws.model.AbstractSEIModelImpl;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-
-import javax.xml.ws.handler.LogicalHandler;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.WebServiceException;
-import javax.activation.DataHandler;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.Map.Entry;
-
-/**
- *
- * @author WS Development Team
- */
-public class ServerLogicalHandlerTube extends HandlerTube {
-
- private SEIModel seiModel;
-
- /**
- * Creates a new instance of LogicalHandlerTube
- */
- public ServerLogicalHandlerTube(WSBinding binding, SEIModel seiModel, WSDLPort port, Tube next) {
- super(next, port, binding);
- this.seiModel = seiModel;
- setUpHandlersOnce();
- }
-
- /**
- * This constructor is used on client-side where, SOAPHandlerTube is created
- * first and then a LogicalHandlerTube is created with a handler to that
- * SOAPHandlerTube.
- * With this handle, LogicalHandlerTube can call
- * SOAPHandlerTube.closeHandlers()
- */
- public ServerLogicalHandlerTube(WSBinding binding, SEIModel seiModel, Tube next, HandlerTube cousinTube) {
- super(next, cousinTube, binding);
- this.seiModel = seiModel;
- setUpHandlersOnce();
- }
-
- /**
- * Copy constructor for {@link com.sun.xml.internal.ws.api.pipe.Tube#copy(com.sun.xml.internal.ws.api.pipe.TubeCloner)}.
- */
-
- private ServerLogicalHandlerTube(ServerLogicalHandlerTube that, TubeCloner cloner) {
- super(that, cloner);
- this.seiModel = that.seiModel;
- this.handlers = that.handlers;
- }
-
- //should be overridden by DriverHandlerTubes
- @Override
- protected void initiateClosing(MessageContext mc) {
- if (getBinding().getSOAPVersion() != null) {
- super.initiateClosing(mc);
- } else {
- close(mc);
- super.initiateClosing(mc);
- }
- }
-
- public AbstractFilterTubeImpl copy(TubeCloner cloner) {
- return new ServerLogicalHandlerTube(this, cloner);
- }
-
- private void setUpHandlersOnce() {
- handlers = new ArrayList<Handler>();
- List<LogicalHandler> logicalSnapShot= ((BindingImpl) getBinding()).getHandlerConfig().getLogicalHandlers();
- if (!logicalSnapShot.isEmpty()) {
- handlers.addAll(logicalSnapShot);
- }
- }
-
- protected void resetProcessor() {
- processor = null;
- }
-
- void setUpProcessor() {
- if (!handlers.isEmpty() && processor == null) {
- if (getBinding().getSOAPVersion() == null) {
- processor = new XMLHandlerProcessor(this, getBinding(),
- handlers);
- } else {
- processor = new SOAPHandlerProcessor(false, this, getBinding(), handlers);
- }
- }
- }
-
- MessageUpdatableContext getContext(Packet packet) {
- return new LogicalMessageContextImpl(getBinding(), getBindingContext(), packet);
- }
-
- private BindingContext getBindingContext() {
- return (seiModel!= null && seiModel instanceof AbstractSEIModelImpl) ?
- ((AbstractSEIModelImpl)seiModel).getBindingContext() : null;
- }
-
- boolean callHandlersOnRequest(MessageUpdatableContext context, boolean isOneWay) {
-
- boolean handlerResult;
- try {
- //SERVER-SIDE
- handlerResult = processor.callHandlersRequest(HandlerProcessor.Direction.INBOUND, context, !isOneWay);
-
- } catch (RuntimeException re) {
- remedyActionTaken = true;
- throw re;
- }
- if (!handlerResult) {
- remedyActionTaken = true;
- }
- return handlerResult;
- }
-
- void callHandlersOnResponse(MessageUpdatableContext context, boolean handleFault) {
- //Lets copy all the MessageContext.OUTBOUND_ATTACHMENT_PROPERTY to the message
- Map<String, DataHandler> atts = (Map<String, DataHandler>) context.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
- AttachmentSet attSet = context.packet.getMessage().getAttachments();
- for (Entry<String, DataHandler> entry : atts.entrySet()) {
- String cid = entry.getKey();
- Attachment att = new DataHandlerAttachment(cid, atts.get(cid));
- attSet.add(att);
- }
-
- try {
- //SERVER-SIDE
- processor.callHandlersResponse(HandlerProcessor.Direction.OUTBOUND, context, handleFault);
-
- } catch (WebServiceException wse) {
- //no rewrapping
- throw wse;
- } catch (RuntimeException re) {
- throw re;
- }
- }
-
- void closeHandlers(MessageContext mc) {
- closeServersideHandlers(mc);
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerMessageHandlerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerMessageHandlerTube.java
deleted file mode 100644
index 7cab39b4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerMessageHandlerTube.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.handler;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.handler.MessageHandler;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.client.HandlerConfiguration;
-import com.sun.xml.internal.ws.message.DataHandlerAttachment;
-
-import javax.activation.DataHandler;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.Handler;
-import java.util.*;
-import java.util.Map.Entry;
-
-/**
- * @author Rama Pulavarthi
- */
-public class ServerMessageHandlerTube extends HandlerTube{
- private SEIModel seiModel;
- private Set<String> roles;
-
- public ServerMessageHandlerTube(SEIModel seiModel, WSBinding binding, Tube next, HandlerTube cousinTube) {
- super(next, cousinTube, binding);
- this.seiModel = seiModel;
- setUpHandlersOnce();
- }
-
- /**
- * Copy constructor for {@link com.sun.xml.internal.ws.api.pipe.Tube#copy(com.sun.xml.internal.ws.api.pipe.TubeCloner)}.
- */
- private ServerMessageHandlerTube(ServerMessageHandlerTube that, TubeCloner cloner) {
- super(that, cloner);
- this.seiModel = that.seiModel;
- this.handlers = that.handlers;
- this.roles = that.roles;
- }
-
- private void setUpHandlersOnce() {
- handlers = new ArrayList<Handler>();
- HandlerConfiguration handlerConfig = ((BindingImpl) getBinding()).getHandlerConfig();
- List<MessageHandler> msgHandlersSnapShot= handlerConfig.getMessageHandlers();
- if (!msgHandlersSnapShot.isEmpty()) {
- handlers.addAll(msgHandlersSnapShot);
- roles = new HashSet<String>();
- roles.addAll(handlerConfig.getRoles());
- }
- }
-
- void callHandlersOnResponse(MessageUpdatableContext context, boolean handleFault) {
- //Lets copy all the MessageContext.OUTBOUND_ATTACHMENT_PROPERTY to the message
- Map<String, DataHandler> atts = (Map<String, DataHandler>) context.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
- AttachmentSet attSet = context.packet.getMessage().getAttachments();
- for (Entry<String, DataHandler> entry : atts.entrySet()) {
- String cid = entry.getKey();
- if (attSet.get(cid) == null) { // Otherwise we would be adding attachments twice
- Attachment att = new DataHandlerAttachment(cid, atts.get(cid));
- attSet.add(att);
- }
- }
-
- try {
- //SERVER-SIDE
- processor.callHandlersResponse(HandlerProcessor.Direction.OUTBOUND, context, handleFault);
-
- } catch (WebServiceException wse) {
- //no rewrapping
- throw wse;
- } catch (RuntimeException re) {
- throw re;
-
- }
- }
-
- boolean callHandlersOnRequest(MessageUpdatableContext context, boolean isOneWay) {
- boolean handlerResult;
- try {
- //SERVER-SIDE
- handlerResult = processor.callHandlersRequest(HandlerProcessor.Direction.INBOUND, context, !isOneWay);
-
- } catch (RuntimeException re) {
- remedyActionTaken = true;
- throw re;
-
- }
- if (!handlerResult) {
- remedyActionTaken = true;
- }
- return handlerResult;
- }
-
- protected void resetProcessor() {
- processor = null;
- }
-
- void setUpProcessor() {
- if(!handlers.isEmpty() && processor == null) {
- processor = new SOAPHandlerProcessor(false, this, getBinding(), handlers);
- }
- }
-
- void closeHandlers(MessageContext mc) {
- closeServersideHandlers(mc);
-
- }
- MessageUpdatableContext getContext(Packet packet) {
- MessageHandlerContextImpl context = new MessageHandlerContextImpl(seiModel, getBinding(), port, packet, roles);
- return context;
- }
-
- //should be overridden by DriverHandlerTubes
- @Override
- protected void initiateClosing(MessageContext mc) {
- close(mc);
- super.initiateClosing(mc);
- }
-
- public AbstractFilterTubeImpl copy(TubeCloner cloner) {
- return new ServerMessageHandlerTube(this, cloner);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerSOAPHandlerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerSOAPHandlerTube.java
deleted file mode 100644
index 0ca35201..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerSOAPHandlerTube.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.handler;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.client.HandlerConfiguration;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.message.DataHandlerAttachment;
-
-import javax.xml.ws.handler.soap.SOAPHandler;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.WebServiceException;
-import javax.activation.DataHandler;
-import java.util.*;
-
-/**
- *
- * @author WS Development Team
- */
-public class ServerSOAPHandlerTube extends HandlerTube {
-
- private Set<String> roles;
-
- /**
- * Creates a new instance of SOAPHandlerTube
- */
- public ServerSOAPHandlerTube(WSBinding binding, WSDLPort port, Tube next) {
- super(next, port, binding);
- if (binding.getSOAPVersion() != null) {
- // SOAPHandlerTube should n't be used for bindings other than SOAP.
- // TODO: throw Exception
- }
- setUpHandlersOnce();
- }
-
- // Handle to LogicalHandlerTube means its used on SERVER-SIDE
-
- /**
- * This constructor is used on client-side where, LogicalHandlerTube is created
- * first and then a SOAPHandlerTube is created with a handler to that
- * LogicalHandlerTube.
- * With this handle, SOAPHandlerTube can call LogicalHandlerTube.closeHandlers()
- */
- public ServerSOAPHandlerTube(WSBinding binding, Tube next, HandlerTube cousinTube) {
- super(next, cousinTube, binding);
- setUpHandlersOnce();
- }
-
- /**
- * Copy constructor for {@link com.sun.xml.internal.ws.api.pipe.Tube#copy(com.sun.xml.internal.ws.api.pipe.TubeCloner)}.
- */
- private ServerSOAPHandlerTube(ServerSOAPHandlerTube that, TubeCloner cloner) {
- super(that, cloner);
- this.handlers = that.handlers;
- this.roles = that.roles;
- }
-
-
- public AbstractFilterTubeImpl copy(TubeCloner cloner) {
- return new ServerSOAPHandlerTube(this, cloner);
- }
-
- private void setUpHandlersOnce() {
- handlers = new ArrayList<Handler>();
- HandlerConfiguration handlerConfig = ((BindingImpl) getBinding()).getHandlerConfig();
- List<SOAPHandler> soapSnapShot= handlerConfig.getSoapHandlers();
- if (!soapSnapShot.isEmpty()) {
- handlers.addAll(soapSnapShot);
- roles = new HashSet<String>();
- roles.addAll(handlerConfig.getRoles());
- }
- }
-
- protected void resetProcessor() {
- processor = null;
- }
-
- void setUpProcessor() {
- if(!handlers.isEmpty() && processor == null)
- processor = new SOAPHandlerProcessor(false, this, getBinding(), handlers);
- }
- MessageUpdatableContext getContext(Packet packet) {
- SOAPMessageContextImpl context = new SOAPMessageContextImpl(getBinding(), packet,roles);
- return context;
- }
-
- boolean callHandlersOnRequest(MessageUpdatableContext context, boolean isOneWay) {
-
- boolean handlerResult;
- try {
- //SERVER-SIDE
- handlerResult = processor.callHandlersRequest(HandlerProcessor.Direction.INBOUND, context, !isOneWay);
-
- } catch (RuntimeException re) {
- remedyActionTaken = true;
- throw re;
-
- }
- if (!handlerResult) {
- remedyActionTaken = true;
- }
- return handlerResult;
- }
-
- void callHandlersOnResponse(MessageUpdatableContext context, boolean handleFault) {
-
- //Lets copy all the MessageContext.OUTBOUND_ATTACHMENT_PROPERTY to the message
- Map<String, DataHandler> atts = (Map<String, DataHandler>) context.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
- AttachmentSet attSet = context.packet.getMessage().getAttachments();
- for (Map.Entry<String, DataHandler> entry : atts.entrySet()) {
- String cid = entry.getKey();
- if (attSet.get(cid) == null) { // Otherwise we would be adding attachments twice
- Attachment att = new DataHandlerAttachment(cid, atts.get(cid));
- attSet.add(att);
- }
- }
-
- try {
- //SERVER-SIDE
- processor.callHandlersResponse(HandlerProcessor.Direction.OUTBOUND, context, handleFault);
-
- } catch (WebServiceException wse) {
- //no rewrapping
- throw wse;
- } catch (RuntimeException re) {
- throw re;
-
- }
- }
-
- void closeHandlers(MessageContext mc) {
- closeServersideHandlers(mc);
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/XMLHandlerProcessor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/XMLHandlerProcessor.java
deleted file mode 100644
index fcbfbca4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/XMLHandlerProcessor.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * LogicalHandlerProcessor.java
- *
- * Created on February 8, 2006, 5:40 PM
- *
- */
-
-package com.sun.xml.internal.ws.handler;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Messages;
-import java.util.List;
-import javax.xml.ws.ProtocolException;
-import javax.xml.ws.handler.Handler;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.http.HTTPException;
-
-/**
- * This is used only for XML/HTTP binding
- * @author WS Development Team
- */
-final class XMLHandlerProcessor<C extends MessageUpdatableContext> extends HandlerProcessor<C> {
-
- /**
- * Creates a new instance of LogicalHandlerProcessor
- */
- public XMLHandlerProcessor(HandlerTube owner, WSBinding binding, List<? extends Handler> chain) {
- super(owner, binding, chain);
- }
-
- /*
- * TODO: This is valid only for XML/HTTP binding
- * Empty the XML message
- */
- final void insertFaultMessage(C context,
- ProtocolException exception) {
- if(exception instanceof HTTPException) {
- context.put(MessageContext.HTTP_RESPONSE_CODE,((HTTPException)exception).getStatusCode());
- }
- if (context != null) {
- // non-soap case
- context.setPacketMessage(Messages.createEmpty(binding.getSOAPVersion()));
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractHeaderImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractHeaderImpl.java
deleted file mode 100644
index 051ebdbd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractHeaderImpl.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.bind.api.BridgeContext;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-
-import org.xml.sax.helpers.AttributesImpl;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import java.util.Set;
-
-/**
- * Partial default implementation of {@link Header}.
- *
- * <p>
- * This is meant to be a convenient base class
- * for {@link Header}-derived classes.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class AbstractHeaderImpl implements Header {
-
- protected AbstractHeaderImpl() {
- }
-
- /**
- * @deprecated
- */
- public final <T> T readAsJAXB(Bridge<T> bridge, BridgeContext context) throws JAXBException {
- return readAsJAXB(bridge);
- }
-
- public <T> T readAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
- try {
- return (T)unmarshaller.unmarshal(readHeader());
- } catch (Exception e) {
- throw new JAXBException(e);
- }
- }
- /** @deprecated */
- public <T> T readAsJAXB(Bridge<T> bridge) throws JAXBException {
- try {
- return bridge.unmarshal(readHeader());
- } catch (XMLStreamException e) {
- throw new JAXBException(e);
- }
- }
-
- public <T> T readAsJAXB(XMLBridge<T> bridge) throws JAXBException {
- try {
- return bridge.unmarshal(readHeader(), null);
- } catch (XMLStreamException e) {
- throw new JAXBException(e);
- }
- }
-
- /**
- * Default implementation that copies the infoset. Not terribly efficient.
- */
- public WSEndpointReference readAsEPR(AddressingVersion expected) throws XMLStreamException {
- XMLStreamReader xsr = readHeader();
- WSEndpointReference epr = new WSEndpointReference(xsr, expected);
- XMLStreamReaderFactory.recycle(xsr);
- return epr;
- }
-
- public boolean isIgnorable(@NotNull SOAPVersion soapVersion, @NotNull Set<String> roles) {
- // check mustUnderstand
- String v = getAttribute(soapVersion.nsUri, "mustUnderstand");
- if(v==null || !parseBool(v)) return true;
-
- if (roles == null) return true;
-
- // now role
- return !roles.contains(getRole(soapVersion));
- }
-
- public @NotNull String getRole(@NotNull SOAPVersion soapVersion) {
- String v = getAttribute(soapVersion.nsUri, soapVersion.roleAttributeName);
- if(v==null)
- v = soapVersion.implicitRole;
- return v;
- }
-
- public boolean isRelay() {
- String v = getAttribute(SOAPVersion.SOAP_12.nsUri,"relay");
- if(v==null) return false; // on SOAP 1.1 message there shouldn't be such an attribute, so this works fine
- return parseBool(v);
- }
-
- public String getAttribute(QName name) {
- return getAttribute(name.getNamespaceURI(),name.getLocalPart());
- }
-
- /**
- * Parses a string that looks like <tt>xs:boolean</tt> into boolean.
- *
- * This method assumes that the whilespace normalization has already taken place.
- */
- protected final boolean parseBool(String value) {
- if(value.length()==0)
- return false;
-
- char ch = value.charAt(0);
- return ch=='t' || ch=='1';
- }
-
- public String getStringContent() {
- try {
- XMLStreamReader xsr = readHeader();
- xsr.nextTag();
- return xsr.getElementText();
- } catch (XMLStreamException e) {
- return null;
- }
- }
-
- protected static final AttributesImpl EMPTY_ATTS = new AttributesImpl();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractMessageImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractMessageImpl.java
deleted file mode 100644
index 056b31b9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractMessageImpl.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.api.message.MessageWritable;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory;
-import com.sun.xml.internal.ws.encoding.TagInfoset;
-import com.sun.xml.internal.ws.message.saaj.SAAJMessage;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import java.util.ArrayList;
-import java.util.Collections;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-import org.xml.sax.helpers.LocatorImpl;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Source;
-import javax.xml.transform.sax.SAXSource;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * Partial {@link Message} implementation.
- *
- * <p>
- * This class implements some of the {@link Message} methods.
- * The idea is that those implementations may be non-optimal but
- * it may save effort in implementing {@link Message} and reduce
- * the code size.
- *
- * <p>
- * {@link Message} classes that are used more commonly should
- * examine carefully which method can be implemented faster,
- * and override them accordingly.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class AbstractMessageImpl extends Message {
- /**
- * SOAP version of this message.
- * Used to implement some of the methods, but nothing more than that.
- *
- * <p>
- * So if you aren't using those methods that use this field,
- * this can be null.
- */
- protected final SOAPVersion soapVersion;
-
- protected @NotNull TagInfoset envelopeTag;
- protected @NotNull TagInfoset headerTag;
- protected @NotNull TagInfoset bodyTag;
-
- protected static final AttributesImpl EMPTY_ATTS;
- protected static final LocatorImpl NULL_LOCATOR = new LocatorImpl();
- protected static final List<TagInfoset> DEFAULT_TAGS;
-
- static void create(SOAPVersion v, List c) {
- int base = v.ordinal()*3;
- c.add(base, new TagInfoset(v.nsUri, "Envelope", "S", EMPTY_ATTS,"S", v.nsUri));
- c.add(base+1, new TagInfoset(v.nsUri, "Header", "S", EMPTY_ATTS));
- c.add(base+2, new TagInfoset(v.nsUri, "Body", "S", EMPTY_ATTS));
- }
-
- static {
- EMPTY_ATTS = new AttributesImpl();
- List<TagInfoset> tagList = new ArrayList<TagInfoset>();
- create(SOAPVersion.SOAP_11, tagList);
- create(SOAPVersion.SOAP_12, tagList);
- DEFAULT_TAGS = Collections.unmodifiableList(tagList);
- }
-
- protected AbstractMessageImpl(SOAPVersion soapVersion) {
- this.soapVersion = soapVersion;
- }
-
- @Override
- public SOAPVersion getSOAPVersion() {
- return soapVersion;
- }
- /**
- * Copy constructor.
- */
- protected AbstractMessageImpl(AbstractMessageImpl that) {
- this.soapVersion = that.soapVersion;
- }
-
- @Override
- public Source readEnvelopeAsSource() {
- return new SAXSource(new XMLReaderImpl(this), XMLReaderImpl.THE_SOURCE);
- }
-
- @Override
- public <T> T readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
- if(hasAttachments())
- unmarshaller.setAttachmentUnmarshaller(new AttachmentUnmarshallerImpl(getAttachments()));
- try {
- return (T) unmarshaller.unmarshal(readPayloadAsSource());
- } finally{
- unmarshaller.setAttachmentUnmarshaller(null);
- }
- }
- /** @deprecated */
- @Override
- public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
- return bridge.unmarshal(readPayloadAsSource(),
- hasAttachments()? new AttachmentUnmarshallerImpl(getAttachments()) : null );
- }
-
- @Override
- public <T> T readPayloadAsJAXB(XMLBridge<T> bridge) throws JAXBException {
- return bridge.unmarshal(readPayloadAsSource(),
- hasAttachments()? new AttachmentUnmarshallerImpl(getAttachments()) : null );
- }
-
- /**
- * Default implementation that relies on {@link #writePayloadTo(XMLStreamWriter)}
- */
- @Override
- public void writeTo(XMLStreamWriter w) throws XMLStreamException {
- String soapNsUri = soapVersion.nsUri;
- w.writeStartDocument();
- w.writeStartElement("S","Envelope",soapNsUri);
- w.writeNamespace("S",soapNsUri);
- if(hasHeaders()) {
- w.writeStartElement("S","Header",soapNsUri);
- MessageHeaders headers = getHeaders();
- for (Header h : headers.asList()) {
- h.writeTo(w);
- }
- w.writeEndElement();
- }
- // write the body
- w.writeStartElement("S","Body",soapNsUri);
-
- writePayloadTo(w);
-
- w.writeEndElement();
- w.writeEndElement();
- w.writeEndDocument();
- }
-
- /**
- * Writes the whole envelope as SAX events.
- */
- @Override
- public void writeTo( ContentHandler contentHandler, ErrorHandler errorHandler ) throws SAXException {
- String soapNsUri = soapVersion.nsUri;
-
- contentHandler.setDocumentLocator(NULL_LOCATOR);
- contentHandler.startDocument();
- contentHandler.startPrefixMapping("S",soapNsUri);
- contentHandler.startElement(soapNsUri,"Envelope","S:Envelope",EMPTY_ATTS);
- if(hasHeaders()) {
- contentHandler.startElement(soapNsUri,"Header","S:Header",EMPTY_ATTS);
- MessageHeaders headers = getHeaders();
- for (Header h : headers.asList()) {
- h.writeTo(contentHandler,errorHandler);
- }
- contentHandler.endElement(soapNsUri,"Header","S:Header");
- }
- // write the body
- contentHandler.startElement(soapNsUri,"Body","S:Body",EMPTY_ATTS);
- writePayloadTo(contentHandler,errorHandler, true);
- contentHandler.endElement(soapNsUri,"Body","S:Body");
- contentHandler.endElement(soapNsUri,"Envelope","S:Envelope");
- }
-
- /**
- * Writes the payload to SAX events.
- *
- * @param fragment
- * if true, this method will fire SAX events without start/endDocument events,
- * suitable for embedding this into a bigger SAX event sequence.
- * if false, this method generaets a completely SAX event sequence on its own.
- */
- protected abstract void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException;
-
- public Message toSAAJ(Packet p, Boolean inbound) throws SOAPException {
- SAAJMessage message = SAAJFactory.read(p);
- if (message instanceof MessageWritable)
- ((MessageWritable) message)
- .setMTOMConfiguration(p.getMtomFeature());
- if (inbound != null) transportHeaders(p, inbound, message.readAsSOAPMessage());
- return message;
- }
-
- /**
- * Default implementation that uses {@link #writeTo(ContentHandler, ErrorHandler)}
- */
- @Override
- public SOAPMessage readAsSOAPMessage() throws SOAPException {
- return SAAJFactory.read(soapVersion, this);
- }
-
- @Override
- public SOAPMessage readAsSOAPMessage(Packet packet, boolean inbound) throws SOAPException {
- SOAPMessage msg = SAAJFactory.read(soapVersion, this, packet);
- transportHeaders(packet, inbound, msg);
- return msg;
- }
-
- private void transportHeaders(Packet packet, boolean inbound, SOAPMessage msg) throws SOAPException {
- Map<String, List<String>> headers = getTransportHeaders(packet, inbound);
- if (headers != null) {
- addSOAPMimeHeaders(msg.getMimeHeaders(), headers);
- }
- if (msg.saveRequired()) msg.saveChanges();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentSetImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentSetImpl.java
deleted file mode 100644
index 0a459315..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentSetImpl.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Attachment;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-/**
- * Default dumb {@link AttachmentSet} implementation backed by {@link ArrayList}.
- *
- * <p>
- * The assumption here is that the number of attachments are small enough to
- * justify linear search in {@link #get(String)}.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class AttachmentSetImpl implements AttachmentSet {
-
- private final ArrayList<Attachment> attList = new ArrayList<Attachment>();
-
- /**
- * Creates an empty {@link AttachmentSet}.
- */
- public AttachmentSetImpl() {
- }
-
- /**
- * Creates an {@link AttachmentSet} by copying contents from another.
- */
- public AttachmentSetImpl(Iterable<Attachment> base) {
- for (Attachment a : base)
- add(a);
- }
-
- public Attachment get(String contentId) {
- for( int i=attList.size()-1; i>=0; i-- ) {
- Attachment a = attList.get(i);
- if(a.getContentId().equals(contentId))
- return a;
- }
- return null;
- }
-
- public boolean isEmpty() {
- return attList.isEmpty();
- }
-
- public void add(Attachment att) {
- attList.add(att);
- }
-
- public Iterator<Attachment> iterator() {
- return attList.iterator();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentUnmarshallerImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentUnmarshallerImpl.java
deleted file mode 100644
index 9769a0b9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentUnmarshallerImpl.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.encoding.MimeMultipartParser;
-import com.sun.xml.internal.ws.resources.EncodingMessages;
-
-import javax.activation.DataHandler;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-import javax.xml.ws.WebServiceException;
-
-/**
- * Implementation of {@link AttachmentUnmarshaller} that uses
- * loads attachments from {@link AttachmentSet} directly.
- *
- * @author Vivek Pandey
- * @see MimeMultipartParser
- */
-public final class AttachmentUnmarshallerImpl extends AttachmentUnmarshaller {
-
- private final AttachmentSet attachments;
-
- public AttachmentUnmarshallerImpl(AttachmentSet attachments) {
- this.attachments = attachments;
- }
-
- @Override
- public DataHandler getAttachmentAsDataHandler(String cid) {
- Attachment a = attachments.get(stripScheme(cid));
- if(a==null)
- throw new WebServiceException(EncodingMessages.NO_SUCH_CONTENT_ID(cid));
- return a.asDataHandler();
- }
-
- @Override
- public byte[] getAttachmentAsByteArray(String cid) {
- Attachment a = attachments.get(stripScheme(cid));
- if(a==null)
- throw new WebServiceException(EncodingMessages.NO_SUCH_CONTENT_ID(cid));
- return a.asByteArray();
- }
-
- /**
- * The CID reference has 'cid:' prefix, so get rid of it.
- */
- private String stripScheme(String cid) {
- if(cid.startsWith("cid:")) // work defensively, in case the input is wrong
- cid = cid.substring(4);
- return cid;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/ByteArrayAttachment.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/ByteArrayAttachment.java
deleted file mode 100644
index 258e12b5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/ByteArrayAttachment.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.util.ByteArrayDataSource;
-import com.sun.xml.internal.ws.encoding.DataSourceStreamingDataHandler;
-
-import java.io.ByteArrayInputStream;
-
-import javax.activation.DataHandler;
-import javax.xml.soap.AttachmentPart;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * @author Jitendra Kotamraju
- */
-public final class ByteArrayAttachment implements Attachment {
-
- private final String contentId;
- private byte[] data;
- private int start;
- private final int len;
- private final String mimeType;
-
- public ByteArrayAttachment(@NotNull String contentId, byte[] data, int start, int len, String mimeType) {
- this.contentId = contentId;
- this.data = data;
- this.start = start;
- this.len = len;
- this.mimeType = mimeType;
- }
-
- public ByteArrayAttachment(@NotNull String contentId, byte[] data, String mimeType) {
- this(contentId, data, 0, data.length, mimeType);
- }
-
- public String getContentId() {
- return contentId;
- }
-
- public String getContentType() {
- return mimeType;
- }
-
- public byte[] asByteArray() {
- if(start!=0 || len!=data.length) {
- // if our buffer isn't exact, switch to the exact one
- byte[] exact = new byte[len];
- System.arraycopy(data,start,exact,0,len);
- start = 0;
- data = exact;
- }
- return data;
- }
-
- public DataHandler asDataHandler() {
- return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,start,len,getContentType()));
- }
-
- public Source asSource() {
- return new StreamSource(asInputStream());
- }
-
- public InputStream asInputStream() {
- return new ByteArrayInputStream(data,start,len);
- }
-
- public void writeTo(OutputStream os) throws IOException {
- os.write(asByteArray());
- }
-
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- AttachmentPart part = saaj.createAttachmentPart();
- part.setDataHandler(asDataHandler());
- part.setContentId(contentId);
- saaj.addAttachmentPart(part);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMHeader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMHeader.java
deleted file mode 100644
index f430f4b8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMHeader.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.bind.unmarshaller.DOMScanner;
-import com.sun.xml.internal.ws.streaming.DOMStreamReader;
-import com.sun.xml.internal.ws.util.DOMUtil;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * {@link com.sun.xml.internal.ws.api.message.Header} implementation for a DOM.
- *
- * @author Kohsuke Kawaguchi
- */
-public class DOMHeader<N extends Element> extends AbstractHeaderImpl {
- protected final N node;
-
- private final String nsUri;
- private final String localName;
-
- public DOMHeader(N node) {
- assert node!=null;
- this.node = node;
-
- this.nsUri = fixNull(node.getNamespaceURI());
- this.localName = node.getLocalName();
- }
-
-
- public String getNamespaceURI() {
- return nsUri;
- }
-
- public String getLocalPart() {
- return localName;
- }
-
- public XMLStreamReader readHeader() throws XMLStreamException {
- DOMStreamReader r = new DOMStreamReader(node);
- r.nextTag(); // move ahead to the start tag
- return r;
- }
-
- public <T> T readAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
- return (T) unmarshaller.unmarshal(node);
- }
- /** @deprecated */
- public <T> T readAsJAXB(Bridge<T> bridge) throws JAXBException {
- return bridge.unmarshal(node);
- }
-
- public void writeTo(XMLStreamWriter w) throws XMLStreamException {
- DOMUtil.serializeNode(node, w);
- }
-
- private static String fixNull(String s) {
- if(s!=null) return s;
- else return "";
- }
-
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
- DOMScanner ds = new DOMScanner();
- ds.setContentHandler(contentHandler);
- ds.scan(node);
- }
-
- public String getAttribute(String nsUri, String localName) {
- if(nsUri.length()==0) nsUri=null; // DOM wants null, not "".
- return node.getAttributeNS(nsUri,localName);
- }
-
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- SOAPHeader header = saaj.getSOAPHeader();
- if(header == null)
- header = saaj.getSOAPPart().getEnvelope().addHeader();
- Node clone = header.getOwnerDocument().importNode(node,true);
- header.appendChild(clone);
- }
-
- @Override
- public String getStringContent() {
- return node.getTextContent();
- }
-
- public N getWrappedNode() {
- return node;
- }
-
-
- @Override
- public int hashCode() {
- return getWrappedNode().hashCode();
- }
-
-
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof DOMHeader) {
- return getWrappedNode().equals(((DOMHeader) obj).getWrappedNode());
- } else {
- return false;
- }
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMMessage.java
deleted file mode 100644
index 4052989b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMMessage.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.message;
-
-import com.sun.istack.internal.FragmentContentHandler;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.bind.unmarshaller.DOMScanner;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.HeaderList;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.streaming.DOMStreamReader;
-import com.sun.xml.internal.ws.util.DOMUtil;
-import org.w3c.dom.Element;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.ws.WebServiceException;
-
-/**
- * {@link Message} backed by a DOM {@link Element} that represents the payload.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class DOMMessage extends AbstractMessageImpl {
- private MessageHeaders headers;
- private final Element payload;
-
- public DOMMessage(SOAPVersion ver, Element payload) {
- this(ver,null,payload);
- }
-
- public DOMMessage(SOAPVersion ver, MessageHeaders headers, Element payload) {
- this(ver,headers,payload,null);
- }
-
- public DOMMessage(SOAPVersion ver, MessageHeaders headers, Element payload, AttachmentSet attachments) {
- super(ver);
- this.headers = headers;
- this.payload = payload;
- this.attachmentSet = attachments;
- assert payload!=null;
- }
- /**
- * This constructor is a convenience and called by the {@link #copy}
- */
- private DOMMessage(DOMMessage that) {
- super(that);
- this.headers = HeaderList.copy(that.headers);
- this.payload = that.payload;
- }
-
- public boolean hasHeaders() {
- return getHeaders().hasHeaders();
- }
-
- public MessageHeaders getHeaders() {
- if (headers == null)
- headers = new HeaderList(getSOAPVersion());
-
- return headers;
- }
-
- public String getPayloadLocalPart() {
- return payload.getLocalName();
- }
-
- public String getPayloadNamespaceURI() {
- return payload.getNamespaceURI();
- }
-
- public boolean hasPayload() {
- return true;
- }
-
- public Source readPayloadAsSource() {
- return new DOMSource(payload);
- }
-
- public <T> T readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
- if(hasAttachments())
- unmarshaller.setAttachmentUnmarshaller(new AttachmentUnmarshallerImpl(getAttachments()));
- try {
- return (T)unmarshaller.unmarshal(payload);
- } finally{
- unmarshaller.setAttachmentUnmarshaller(null);
- }
- }
- /** @deprecated */
- public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
- return bridge.unmarshal(payload,
- hasAttachments()? new AttachmentUnmarshallerImpl(getAttachments()) : null);
- }
-
- public XMLStreamReader readPayload() throws XMLStreamException {
- DOMStreamReader dss = new DOMStreamReader();
- dss.setCurrentNode(payload);
- dss.nextTag();
- assert dss.getEventType()==XMLStreamReader.START_ELEMENT;
- return dss;
- }
-
- public void writePayloadTo(XMLStreamWriter sw) {
- try {
- if (payload != null)
- DOMUtil.serializeNode(payload, sw);
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- }
-
- protected void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
- if(fragment)
- contentHandler = new FragmentContentHandler(contentHandler);
- DOMScanner ds = new DOMScanner();
- ds.setContentHandler(contentHandler);
- ds.scan(payload);
- }
-
- public Message copy() {
- return new DOMMessage(this);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DataHandlerAttachment.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DataHandlerAttachment.java
deleted file mode 100644
index 480c84c2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DataHandlerAttachment.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.util.ByteArrayBuffer;
-
-import javax.activation.DataHandler;
-import javax.xml.soap.AttachmentPart;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.WebServiceException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.ByteArrayOutputStream;
-
-/**
- * @author Jitendra Kotamraju
- */
-public final class DataHandlerAttachment implements Attachment {
-
- private final DataHandler dh;
- private final String contentId;
- String contentIdNoAngleBracket;
-
- /**
- * This will be constructed by {@link com.sun.xml.internal.ws.message.jaxb.AttachmentMarshallerImpl}
- */
- public DataHandlerAttachment(@NotNull String contentId, @NotNull DataHandler dh) {
- this.dh = dh;
- this.contentId = contentId;
- }
-
- public String getContentId() {
-// return contentId;
- if (contentIdNoAngleBracket == null) {
- contentIdNoAngleBracket = contentId;
- if (contentIdNoAngleBracket != null && contentIdNoAngleBracket.charAt(0) == '<')
- contentIdNoAngleBracket = contentIdNoAngleBracket.substring(1, contentIdNoAngleBracket.length()-1);
- }
- return contentIdNoAngleBracket;
- }
-
- public String getContentType() {
- return dh.getContentType();
- }
-
- public byte[] asByteArray() {
- try {
- ByteArrayOutputStream os = new ByteArrayOutputStream();
- dh.writeTo(os);
- return os.toByteArray();
- } catch (IOException e) {
- throw new WebServiceException(e);
- }
- }
-
- public DataHandler asDataHandler() {
- return dh;
- }
-
- public Source asSource() {
- try {
- return new StreamSource(dh.getInputStream());
- } catch (IOException e) {
- throw new WebServiceException(e);
- }
- }
-
- public InputStream asInputStream() {
- try {
- return dh.getInputStream();
- } catch (IOException e) {
- throw new WebServiceException(e);
- }
- }
-
- public void writeTo(OutputStream os) throws IOException {
- dh.writeTo(os);
- }
-
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- AttachmentPart part = saaj.createAttachmentPart();
- part.setDataHandler(dh);
- part.setContentId(contentId);
- saaj.addAttachmentPart(part);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/EmptyMessageImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/EmptyMessageImpl.java
deleted file mode 100644
index 1ca4f0ba..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/EmptyMessageImpl.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.HeaderList;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Source;
-
-/**
- * {@link Message} that has no body.
- *
- * @author Kohsuke Kawaguchi
- */
-public class EmptyMessageImpl extends AbstractMessageImpl {
-
- /**
- * If a message has no payload, it's more likely to have
- * some header, so we create it eagerly here.
- */
- private final MessageHeaders headers;
- private final AttachmentSet attachmentSet;
-
- public EmptyMessageImpl(SOAPVersion version) {
- super(version);
- this.headers = new HeaderList(version);
- this.attachmentSet = new AttachmentSetImpl();
- }
-
- public EmptyMessageImpl(MessageHeaders headers, @NotNull AttachmentSet attachmentSet, SOAPVersion version){
- super(version);
- if(headers==null)
- headers = new HeaderList(version);
- this.attachmentSet = attachmentSet;
- this.headers = headers;
- }
-
- /**
- * Copy constructor.
- */
- private EmptyMessageImpl(EmptyMessageImpl that) {
- super(that);
- this.headers = new HeaderList(that.headers);
- this.attachmentSet = that.attachmentSet;
- }
-
- public boolean hasHeaders() {
- return headers.hasHeaders();
- }
-
- public MessageHeaders getHeaders() {
- return headers;
- }
-
- public String getPayloadLocalPart() {
- return null;
- }
-
- public String getPayloadNamespaceURI() {
- return null;
- }
-
- public boolean hasPayload() {
- return false;
- }
-
- public Source readPayloadAsSource() {
- return null;
- }
-
- public XMLStreamReader readPayload() throws XMLStreamException {
- return null;
- }
-
- public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
- // noop
- }
-
- public void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
- // noop
- }
-
- public Message copy() {
- return new EmptyMessageImpl(this);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultDetailHeader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultDetailHeader.java
deleted file mode 100644
index ed0e6a7d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultDetailHeader.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPHeaderElement;
-import javax.xml.namespace.QName;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-/**
- * @author Arun Gupta
- */
-public class FaultDetailHeader extends AbstractHeaderImpl {
-
- private AddressingVersion av;
- private String wrapper;
- private String problemValue = null;
-
- public FaultDetailHeader(AddressingVersion av, String wrapper, QName problemHeader) {
- this.av = av;
- this.wrapper = wrapper;
- this.problemValue = problemHeader.toString();
- }
-
- public FaultDetailHeader(AddressingVersion av, String wrapper, String problemValue) {
- this.av = av;
- this.wrapper = wrapper;
- this.problemValue = problemValue;
- }
-
- public
- @NotNull
- String getNamespaceURI() {
- return av.nsUri;
- }
-
- public
- @NotNull
- String getLocalPart() {
- return av.faultDetailTag.getLocalPart();
- }
-
- @Nullable
- public String getAttribute(@NotNull String nsUri, @NotNull String localName) {
- return null;
- }
-
- public XMLStreamReader readHeader() throws XMLStreamException {
- MutableXMLStreamBuffer buf = new MutableXMLStreamBuffer();
- XMLStreamWriter w = buf.createFromXMLStreamWriter();
- writeTo(w);
- return buf.readAsXMLStreamReader();
- }
-
- public void writeTo(XMLStreamWriter w) throws XMLStreamException {
- w.writeStartElement("", av.faultDetailTag.getLocalPart(), av.faultDetailTag.getNamespaceURI());
- w.writeDefaultNamespace(av.nsUri);
- w.writeStartElement("", wrapper, av.nsUri);
- w.writeCharacters(problemValue);
- w.writeEndElement();
- w.writeEndElement();
- }
-
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- SOAPHeader header = saaj.getSOAPHeader();
- if (header == null)
- header = saaj.getSOAPPart().getEnvelope().addHeader();
- SOAPHeaderElement she = header.addHeaderElement(av.faultDetailTag);
- she = header.addHeaderElement(new QName(av.nsUri, wrapper));
- she.addTextNode(problemValue);
- }
-
- public void writeTo(ContentHandler h, ErrorHandler errorHandler) throws SAXException {
- String nsUri = av.nsUri;
- String ln = av.faultDetailTag.getLocalPart();
-
- h.startPrefixMapping("",nsUri);
- h.startElement(nsUri,ln,ln,EMPTY_ATTS);
- h.startElement(nsUri,wrapper,wrapper,EMPTY_ATTS);
- h.characters(problemValue.toCharArray(),0,problemValue.length());
- h.endElement(nsUri,wrapper,wrapper);
- h.endElement(nsUri,ln,ln);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultMessage.java
deleted file mode 100644
index d3e60770..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultMessage.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.FilterMessageImpl;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault;
-
-import javax.xml.namespace.QName;
-
-/**
- * SOAP Fault message. It has optimized implementation to get
- * first detail entry's name. This is useful to identify the
- * corresponding {@link WSDLFault}
- *
- * @author Jitendra Kotamraju
- */
-public class FaultMessage extends FilterMessageImpl {
-
- private final @Nullable QName detailEntryName;
-
- public FaultMessage(Message delegate, @Nullable QName detailEntryName) {
- super(delegate);
- this.detailEntryName = detailEntryName;
- }
-
- @Override
- public @Nullable QName getFirstDetailEntryName() {
- return detailEntryName;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/JAXBAttachment.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/JAXBAttachment.java
deleted file mode 100644
index 42291619..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/JAXBAttachment.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.util.ByteArrayBuffer;
-import com.sun.xml.internal.ws.encoding.DataSourceStreamingDataHandler;
-
-import javax.activation.DataHandler;
-import javax.activation.DataSource;
-import javax.xml.bind.JAXBException;
-import javax.xml.soap.AttachmentPart;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.WebServiceException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * @author Jitendra Kotamraju
- */
-public final class JAXBAttachment implements Attachment, DataSource {
-
- private final String contentId;
- private final String mimeType;
- private final Object jaxbObject;
- private final XMLBridge bridge;
-
- public JAXBAttachment(@NotNull String contentId, Object jaxbObject, XMLBridge bridge, String mimeType) {
- this.contentId = contentId;
- this.jaxbObject = jaxbObject;
- this.bridge = bridge;
- this.mimeType = mimeType;
- }
-
- @Override
- public String getContentId() {
- return contentId;
- }
-
- @Override
- public String getContentType() {
- return mimeType;
- }
-
- @Override
- public byte[] asByteArray() {
- ByteArrayBuffer bab = new ByteArrayBuffer();
- try {
- writeTo(bab);
- } catch (IOException e) {
- throw new WebServiceException(e);
- }
- return bab.getRawData();
- }
-
- @Override
- public DataHandler asDataHandler() {
- return new DataSourceStreamingDataHandler(this);
- }
-
- @Override
- public Source asSource() {
- return new StreamSource(asInputStream());
- }
-
- @Override
- public InputStream asInputStream() {
- ByteArrayBuffer bab = new ByteArrayBuffer();
- try {
- writeTo(bab);
- } catch (IOException e) {
- throw new WebServiceException(e);
- }
- return bab.newInputStream();
- }
-
- @Override
- public void writeTo(OutputStream os) throws IOException {
- try {
- bridge.marshal(jaxbObject, os, null, null);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- }
- }
-
- @Override
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- AttachmentPart part = saaj.createAttachmentPart();
- part.setDataHandler(asDataHandler());
- part.setContentId(contentId);
- saaj.addAttachmentPart(part);
- }
-
- @Override
- public InputStream getInputStream() throws IOException {
- return asInputStream();
- }
-
- @Override
- public OutputStream getOutputStream() throws IOException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String getName() {
- return null;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/MimeAttachmentSet.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/MimeAttachmentSet.java
deleted file mode 100644
index 685198df..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/MimeAttachmentSet.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.encoding.MimeMultipartParser;
-import com.sun.xml.internal.ws.resources.EncodingMessages;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.ws.WebServiceException;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.HashMap;
-import java.io.IOException;
-
-/**
- * {@link AttachmentSet} backed by {@link com.sun.xml.internal.ws.encoding.MimeMultipartParser}
- *
- * @author Vivek Pandey
- */
-public final class MimeAttachmentSet implements AttachmentSet {
- private final MimeMultipartParser mpp;
- private Map<String, Attachment> atts = new HashMap<String, Attachment>();
-
-
- public MimeAttachmentSet(MimeMultipartParser mpp) {
- this.mpp = mpp;
- }
-
- @Nullable
- public Attachment get(String contentId) {
- Attachment att;
- /**
- * First try to get the Attachment from internal map, maybe this attachment
- * is added by the user.
- */
- att = atts.get(contentId);
- if(att != null)
- return att;
- try {
- /**
- * Attachment is not found in the internal map, now do look in
- * the mpp, if found add to the internal Attachment map.
- */
- att = mpp.getAttachmentPart(contentId);
- if(att != null){
- atts.put(contentId, att);
- }
- } catch (IOException e) {
- throw new WebServiceException(EncodingMessages.NO_SUCH_CONTENT_ID(contentId), e);
- }
- return att;
- }
-
- /**
- * This is expensive operation, its going to to read all the underlying
- * attachments in {@link MimeMultipartParser}.
- */
- public boolean isEmpty() {
- return atts.size() <= 0 && mpp.getAttachmentParts().isEmpty();
- }
-
- public void add(Attachment att) {
- atts.put(att.getContentId(), att);
- }
-
- /**
- * Expensive operation.
- */
- public Iterator<Attachment> iterator() {
- /**
- * Browse thru all the attachments in the mpp, add them to #atts,
- * then return whether its empty.
- */
- Map<String, Attachment> attachments = mpp.getAttachmentParts();
- for(Map.Entry<String, Attachment> att : attachments.entrySet()) {
- if(atts.get(att.getKey()) == null){
- atts.put(att.getKey(), att.getValue());
- }
- }
-
- return atts.values().iterator();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/PayloadElementSniffer.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/PayloadElementSniffer.java
deleted file mode 100644
index 3abb5859..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/PayloadElementSniffer.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.xml.internal.ws.encoding.soap.SOAP12Constants;
-import com.sun.xml.internal.ws.encoding.soap.SOAPConstants;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import javax.xml.namespace.QName;
-
-/**
- * Parses the SOAP message in order to get {@link QName} of a payload element.
- * It parses message until it
- *
- * @author Miroslav Kos (miroslav.kos at oracle.com)
- */
-public class PayloadElementSniffer extends DefaultHandler {
-
- // flag if the last element was SOAP body
- private boolean bodyStarted;
-
- // payloadQName used as a return value
- private QName payloadQName;
-
- @Override
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
-
- if (bodyStarted) {
- payloadQName = new QName(uri, localName);
- // we have what we wanted - let's skip rest of parsing ...
- throw new SAXException("Payload element found, interrupting the parsing process.");
- }
-
- // check for both SOAP 1.1/1.2
- if (equalsQName(uri, localName, SOAPConstants.QNAME_SOAP_BODY) ||
- equalsQName(uri, localName, SOAP12Constants.QNAME_SOAP_BODY)) {
- bodyStarted = true;
- }
-
- }
-
- private boolean equalsQName(String uri, String localName, QName qname) {
- return qname.getLocalPart().equals(localName) &&
- qname.getNamespaceURI().equals(uri);
- }
-
- public QName getPayloadQName() {
- return payloadQName;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/ProblemActionHeader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/ProblemActionHeader.java
deleted file mode 100644
index 0d86ed3c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/ProblemActionHeader.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.message.Header;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPHeaderElement;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * {@link Header} that represents &lt;wsa:ProblemAction>
- * @author Arun Gupta
- */
-public class ProblemActionHeader extends AbstractHeaderImpl {
- protected @NotNull String action;
- protected String soapAction;
- protected @NotNull AddressingVersion av;
-
- private static final String actionLocalName = "Action";
- private static final String soapActionLocalName = "SoapAction";
-
- public ProblemActionHeader(@NotNull String action, @NotNull AddressingVersion av) {
- this(action,null,av);
- }
-
- public ProblemActionHeader(@NotNull String action, String soapAction, @NotNull AddressingVersion av) {
- assert action!=null;
- assert av!=null;
- this.action = action;
- this.soapAction = soapAction;
- this.av = av;
- }
-
- public
- @NotNull
- String getNamespaceURI() {
- return av.nsUri;
- }
-
- public
- @NotNull
- String getLocalPart() {
- return "ProblemAction";
- }
-
- @Nullable
- public String getAttribute(@NotNull String nsUri, @NotNull String localName) {
- return null;
- }
-
- public XMLStreamReader readHeader() throws XMLStreamException {
- MutableXMLStreamBuffer buf = new MutableXMLStreamBuffer();
- XMLStreamWriter w = buf.createFromXMLStreamWriter();
- writeTo(w);
- return buf.readAsXMLStreamReader();
- }
-
- public void writeTo(XMLStreamWriter w) throws XMLStreamException {
- w.writeStartElement("", getLocalPart(), getNamespaceURI());
- w.writeDefaultNamespace(getNamespaceURI());
- w.writeStartElement(actionLocalName);
- w.writeCharacters(action);
- w.writeEndElement();
- if (soapAction != null) {
- w.writeStartElement(soapActionLocalName);
- w.writeCharacters(soapAction);
- w.writeEndElement();
- }
- w.writeEndElement();
- }
-
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- SOAPHeader header = saaj.getSOAPHeader();
- if(header == null)
- header = saaj.getSOAPPart().getEnvelope().addHeader();
- SOAPHeaderElement she = header.addHeaderElement(new QName(getNamespaceURI(), getLocalPart()));
- she.addChildElement(actionLocalName);
- she.addTextNode(action);
- if (soapAction != null) {
- she.addChildElement(soapActionLocalName);
- she.addTextNode(soapAction);
- }
- }
-
- public void writeTo(ContentHandler h, ErrorHandler errorHandler) throws SAXException {
- String nsUri = getNamespaceURI();
- String ln = getLocalPart();
-
- h.startPrefixMapping("",nsUri);
- h.startElement(nsUri,ln,ln,EMPTY_ATTS);
- h.startElement(nsUri,actionLocalName,actionLocalName,EMPTY_ATTS);
- h.characters(action.toCharArray(),0,action.length());
- h.endElement(nsUri,actionLocalName,actionLocalName);
- if (soapAction != null) {
- h.startElement(nsUri,soapActionLocalName,soapActionLocalName,EMPTY_ATTS);
- h.characters(soapAction.toCharArray(),0,soapAction.length());
- h.endElement(nsUri,soapActionLocalName,soapActionLocalName);
- }
- h.endElement(nsUri,ln,ln);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/RelatesToHeader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/RelatesToHeader.java
deleted file mode 100644
index d2e91a2f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/RelatesToHeader.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPHeaderElement;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * WS-Addressing &lt;RelatesTo> header.
- *
- * Used for outbound only.
- *
- * @author Arun Gupta
- */
-public final class RelatesToHeader extends StringHeader {
- protected String type;
- private final QName typeAttributeName;
-
- public RelatesToHeader(QName name, String messageId, String type) {
- super(name, messageId);
- this.type = type;
- this.typeAttributeName = new QName(name.getNamespaceURI(), "type");
- }
-
- public RelatesToHeader(QName name, String mid) {
- super(name, mid);
- this.typeAttributeName = new QName(name.getNamespaceURI(), "type");
- }
-
- public String getType() {
- return type;
- }
-
- @Override
- public void writeTo(XMLStreamWriter w) throws XMLStreamException {
- w.writeStartElement("", name.getLocalPart(), name.getNamespaceURI());
- w.writeDefaultNamespace(name.getNamespaceURI());
- if (type != null)
- w.writeAttribute("type", type);
- w.writeCharacters(value);
- w.writeEndElement();
- }
-
- @Override
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- SOAPHeader header = saaj.getSOAPHeader();
- if (header == null)
- header = saaj.getSOAPPart().getEnvelope().addHeader();
- SOAPHeaderElement she = header.addHeaderElement(name);
-
- if (type != null)
- she.addAttribute(typeAttributeName, type);
- she.addTextNode(value);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/RootElementSniffer.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/RootElementSniffer.java
deleted file mode 100644
index 06b3f4ec..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/RootElementSniffer.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * Sniffs the root element name and its attributes from SAX events.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class RootElementSniffer extends DefaultHandler {
- private String nsUri = "##error";
- private String localName = "##error";
- private Attributes atts;
-
- private final boolean parseAttributes;
-
- public RootElementSniffer(boolean parseAttributes) {
- this.parseAttributes = parseAttributes;
- }
-
- public RootElementSniffer() {
- this(true);
- }
-
- public void startElement(String uri, String localName, String qName, Attributes a) throws SAXException {
- this.nsUri = uri;
- this.localName = localName;
-
- if(parseAttributes) {
- if(a.getLength()==0) // often there's no attribute
- this.atts = EMPTY_ATTRIBUTES;
- else
- this.atts = new AttributesImpl(a);
- }
-
- // no need to parse any further.
- throw aSAXException;
- }
-
- public String getNsUri() {
- return nsUri;
- }
-
- public String getLocalName() {
- return localName;
- }
-
- public Attributes getAttributes() {
- return atts;
- }
-
- private static final SAXException aSAXException = new SAXException();
- private static final Attributes EMPTY_ATTRIBUTES = new AttributesImpl();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/StringHeader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/StringHeader.java
deleted file mode 100644
index ab4f347e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/StringHeader.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.Header;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPHeaderElement;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * {@link Header} that has a single text value in it
- * (IOW, of the form &lt;foo>text&lt;/foo>.)
- *
- * @author Rama Pulavarthi
- * @author Arun Gupta
- */
-public class StringHeader extends AbstractHeaderImpl {
- /**
- * Tag name.
- */
- protected final QName name;
- /**
- * Header value.
- */
- protected final String value;
-
- protected boolean mustUnderstand = false;
- protected SOAPVersion soapVersion;
-
- public StringHeader(@NotNull QName name, @NotNull String value) {
- assert name != null;
- assert value != null;
- this.name = name;
- this.value = value;
- }
-
- public StringHeader(@NotNull QName name, @NotNull String value, @NotNull SOAPVersion soapVersion, boolean mustUnderstand ) {
- this.name = name;
- this.value = value;
- this.soapVersion = soapVersion;
- this.mustUnderstand = mustUnderstand;
- }
-
- public @NotNull String getNamespaceURI() {
- return name.getNamespaceURI();
- }
-
- public @NotNull String getLocalPart() {
- return name.getLocalPart();
- }
-
- @Nullable public String getAttribute(@NotNull String nsUri, @NotNull String localName) {
- if(mustUnderstand && soapVersion.nsUri.equals(nsUri) && MUST_UNDERSTAND.equals(localName)) {
- return getMustUnderstandLiteral(soapVersion);
- }
- return null;
- }
-
- public XMLStreamReader readHeader() throws XMLStreamException {
- MutableXMLStreamBuffer buf = new MutableXMLStreamBuffer();
- XMLStreamWriter w = buf.createFromXMLStreamWriter();
- writeTo(w);
- return buf.readAsXMLStreamReader();
- }
-
- public void writeTo(XMLStreamWriter w) throws XMLStreamException {
- w.writeStartElement("", name.getLocalPart(), name.getNamespaceURI());
- w.writeDefaultNamespace(name.getNamespaceURI());
- if (mustUnderstand) {
- //Writing the ns declaration conditionally checking in the NSContext breaks XWSS. as readHeader() adds ns declaration,
- // where as writing alonf with the soap envelope does n't add it.
- //Looks like they expect the readHeader() and writeTo() produce the same infoset, Need to understand their usage
-
- //if(w.getNamespaceContext().getPrefix(soapVersion.nsUri) == null) {
- w.writeNamespace("S", soapVersion.nsUri);
- w.writeAttribute("S", soapVersion.nsUri, MUST_UNDERSTAND, getMustUnderstandLiteral(soapVersion));
- // } else {
- // w.writeAttribute(soapVersion.nsUri,MUST_UNDERSTAND, getMustUnderstandLiteral(soapVersion));
- // }
- }
- w.writeCharacters(value);
- w.writeEndElement();
- }
-
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- SOAPHeader header = saaj.getSOAPHeader();
- if(header == null)
- header = saaj.getSOAPPart().getEnvelope().addHeader();
- SOAPHeaderElement she = header.addHeaderElement(name);
- if(mustUnderstand) {
- she.setMustUnderstand(true);
- }
- she.addTextNode(value);
- }
-
- public void writeTo(ContentHandler h, ErrorHandler errorHandler) throws SAXException {
- String nsUri = name.getNamespaceURI();
- String ln = name.getLocalPart();
-
- h.startPrefixMapping("",nsUri);
- if(mustUnderstand) {
- AttributesImpl attributes = new AttributesImpl();
- attributes.addAttribute(soapVersion.nsUri,MUST_UNDERSTAND,"S:"+MUST_UNDERSTAND,"CDATA", getMustUnderstandLiteral(soapVersion));
- h.startElement(nsUri,ln,ln,attributes);
- } else {
- h.startElement(nsUri,ln,ln,EMPTY_ATTS);
- }
- h.characters(value.toCharArray(),0,value.length());
- h.endElement(nsUri,ln,ln);
- }
-
- private static String getMustUnderstandLiteral(SOAPVersion sv) {
- if(sv == SOAPVersion.SOAP_12) {
- return S12_MUST_UNDERSTAND_TRUE;
- } else {
- return S11_MUST_UNDERSTAND_TRUE;
- }
-
- }
-
- protected static final String MUST_UNDERSTAND = "mustUnderstand";
- protected static final String S12_MUST_UNDERSTAND_TRUE ="true";
- protected static final String S11_MUST_UNDERSTAND_TRUE ="1";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/Util.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/Util.java
deleted file mode 100644
index 0aebcc38..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/Util.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.xml.internal.ws.api.message.Message;
-
-/**
- * Utility code for the {@link Message} implementation.
- */
-public abstract class Util {
- /**
- * Parses a stringthat represents a boolean into boolean.
- * This method assumes that the whilespace normalization has already taken place.
- *
- * @param value
- */
- public static boolean parseBool(String value) {
- if(value.length()==0)
- return false;
-
- char ch = value.charAt(0);
- return ch=='t' || ch=='1';
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/XMLReaderImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/XMLReaderImpl.java
deleted file mode 100644
index 23656605..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/XMLReaderImpl.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message;
-
-import com.sun.xml.internal.ws.api.message.Message;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import javax.xml.transform.sax.SAXSource;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class XMLReaderImpl extends XMLFilterImpl {
-
- private final Message msg;
-
- XMLReaderImpl(Message msg) {
- this.msg = msg;
- }
-
- public void parse(String systemId) {
- reportError();
- }
-
- private void reportError() {
- // TODO: i18n
- throw new IllegalStateException(
- "This is a special XMLReader implementation that only works with the InputSource given in SAXSource.");
- }
-
- public void parse(InputSource input) throws SAXException {
- if(input!=THE_SOURCE)
- reportError();
- msg.writeTo(this,this);
- }
-
- @Override
- public ContentHandler getContentHandler() {
- if(super.getContentHandler()==DUMMY) return null;
- return super.getContentHandler();
- }
-
- @Override
- public void setContentHandler(ContentHandler contentHandler) {
- if(contentHandler==null) contentHandler = DUMMY;
- super.setContentHandler(contentHandler);
- }
-
- private static final ContentHandler DUMMY = new DefaultHandler();
-
- /**
- * Special {@link InputSource} instance that we use to pass to {@link SAXSource}.
- */
- protected static final InputSource THE_SOURCE = new InputSource();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/AttachmentMarshallerImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/AttachmentMarshallerImpl.java
deleted file mode 100644
index 65feec62..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/AttachmentMarshallerImpl.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.message.jaxb;
-
-import com.sun.istack.internal.logging.Logger;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.message.DataHandlerAttachment;
-
-import javax.activation.DataHandler;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.ws.WebServiceException;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URLEncoder;
-import java.util.UUID;
-import java.util.logging.Level;
-
-/**
- * Implementation of {@link AttachmentMarshaller}, its used from JAXBMessage to marshall swaref type
- *
- * @author Vivek Pandey
- * @see JAXBMessage
- */
-final class AttachmentMarshallerImpl extends AttachmentMarshaller {
-
- private static final Logger LOGGER = Logger.getLogger(AttachmentMarshallerImpl.class);
-
- private AttachmentSet attachments;
-
- public AttachmentMarshallerImpl(AttachmentSet attachemnts) {
- this.attachments = attachemnts;
- }
-
- /**
- * Release a reference to user objects to avoid keeping it in memory.
- */
- void cleanup() {
- attachments = null;
- }
-
- @Override
- public String addMtomAttachment(DataHandler data, String elementNamespace, String elementLocalName) {
- // We don't use JAXB for handling XOP
- throw new IllegalStateException();
- }
-
- @Override
- public String addMtomAttachment(byte[] data, int offset, int length, String mimeType, String elementNamespace, String elementLocalName) {
- // We don't use JAXB for handling XOP
- throw new IllegalStateException();
- }
-
- @Override
- public String addSwaRefAttachment(DataHandler data) {
- String cid = encodeCid(null);
- Attachment att = new DataHandlerAttachment(cid, data);
- attachments.add(att);
- cid = "cid:" + cid;
- return cid;
- }
-
- private String encodeCid(String ns) {
- String cid = "example.jaxws.sun.com";
- String name = UUID.randomUUID() + "@";
- if (ns != null && (ns.length() > 0)) {
- try {
- URI uri = new URI(ns);
- cid = uri.toURL().getHost();
- } catch (URISyntaxException e) {
- if (LOGGER.isLoggable(Level.INFO)) {
- LOGGER.log(Level.INFO, null, e);
- }
- return null;
- } catch (MalformedURLException e) {
- try {
- cid = URLEncoder.encode(ns, "UTF-8");
- } catch (UnsupportedEncodingException e1) {
- throw new WebServiceException(e);
- }
- }
- }
- return name + cid;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBBridgeSource.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBBridgeSource.java
deleted file mode 100644
index 9dd3cd8d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBBridgeSource.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message.jaxb;
-
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-
-import org.xml.sax.*;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.transform.Source;
-import javax.xml.transform.sax.SAXSource;
-
-/**
- * Wraps a bridge and JAXB object into a pseudo-{@link Source}.
- * @author Kohsuke Kawaguchi
- */
-final class JAXBBridgeSource extends SAXSource {
-
- public JAXBBridgeSource( XMLBridge bridge, Object contentObject ) {
- this.bridge = bridge;
- this.contentObject = contentObject;
-
- super.setXMLReader(pseudoParser);
- // pass a dummy InputSource. We don't care
- super.setInputSource(new InputSource());
- }
-
- private final XMLBridge bridge;
- private final Object contentObject;
-
- // this object will pretend as an XMLReader.
- // no matter what parameter is specified to the parse method,
- // it just parse the contentObject.
- private final XMLReader pseudoParser = new XMLFilterImpl() {
- public boolean getFeature(String name) throws SAXNotRecognizedException {
- if(name.equals("http://xml.org/sax/features/namespaces"))
- return true;
- if(name.equals("http://xml.org/sax/features/namespace-prefixes"))
- return false;
- throw new SAXNotRecognizedException(name);
- }
-
- public void setFeature(String name, boolean value) throws SAXNotRecognizedException {
- if(name.equals("http://xml.org/sax/features/namespaces") && value)
- return;
- if(name.equals("http://xml.org/sax/features/namespace-prefixes") && !value)
- return;
- throw new SAXNotRecognizedException(name);
- }
-
- public Object getProperty(String name) throws SAXNotRecognizedException {
- if( "http://xml.org/sax/properties/lexical-handler".equals(name) ) {
- return lexicalHandler;
- }
- throw new SAXNotRecognizedException(name);
- }
-
- public void setProperty(String name, Object value) throws SAXNotRecognizedException {
- if( "http://xml.org/sax/properties/lexical-handler".equals(name) ) {
- this.lexicalHandler = (LexicalHandler)value;
- return;
- }
- throw new SAXNotRecognizedException(name);
- }
-
- private LexicalHandler lexicalHandler;
-
- public void parse(InputSource input) throws SAXException {
- parse();
- }
-
- public void parse(String systemId) throws SAXException {
- parse();
- }
-
- public void parse() throws SAXException {
- // parses a content object by using the given bridge
- // SAX events will be sent to the repeater, and the repeater
- // will further forward it to an appropriate component.
- try {
- startDocument();
- // this method only writes a fragment, so need start/end document
- bridge.marshal( contentObject, this, null );
- endDocument();
- } catch( JAXBException e ) {
- // wrap it to a SAXException
- SAXParseException se =
- new SAXParseException( e.getMessage(),
- null, null, -1, -1, e );
-
- // if the consumer sets an error handler, it is our responsibility
- // to notify it.
- fatalError(se);
-
- // this is a fatal error. Even if the error handler
- // returns, we will abort anyway.
- throw se;
- }
- }
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBDispatchMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBDispatchMessage.java
deleted file mode 100644
index 4d3c82f8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBDispatchMessage.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.message.jaxb;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.encoding.SOAPBindingCodec;
-import com.sun.xml.internal.ws.message.AbstractMessageImpl;
-import com.sun.xml.internal.ws.message.PayloadElementSniffer;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.streaming.MtomStreamWriter;
-import com.sun.xml.internal.ws.streaming.XMLStreamWriterUtil;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Source;
-import javax.xml.ws.WebServiceException;
-import java.io.OutputStream;
-
-/**
- * {@link Message} backed by a JAXB bean; this implementation is used when client uses
- * Dispatch mechanism in JAXB/MESSAGE mode; difference from {@link JAXBMessage} is
- * that {@code jaxbObject} holds whole SOAP message including SOAP envelope;
- * it's the client who is responsible for preparing message content.
- *
- * @author Miroslav Kos (miroslav.kos at oracle.com)
- */
-public class JAXBDispatchMessage extends AbstractMessageImpl {
-
- private final Object jaxbObject;
-
- private final XMLBridge bridge;
-
- /**
- * For the use case of a user-supplied JAXB context that is not
- * a known JAXB type, as when creating a Disaptch object with a
- * JAXB object parameter, we will marshal and unmarshal directly with
- * the context object, as there is no Bond available. In this case,
- * swaRef is not supported.
- */
- private final JAXBContext rawContext;
-
- /**
- * Lazily sniffed payload element name
- */
- private QName payloadQName;
-
- /**
- * Copy constructor.
- */
- private JAXBDispatchMessage(JAXBDispatchMessage that) {
- super(that);
- jaxbObject = that.jaxbObject;
- rawContext = that.rawContext;
- bridge = that.bridge;
- }
-
- public JAXBDispatchMessage(JAXBContext rawContext, Object jaxbObject, SOAPVersion soapVersion) {
- super(soapVersion);
- this.bridge = null;
- this.rawContext = rawContext;
- this.jaxbObject = jaxbObject;
- }
-
- public JAXBDispatchMessage(BindingContext context, Object jaxbObject, SOAPVersion soapVersion) {
- super(soapVersion);
- this.bridge = context.createFragmentBridge();
- this.rawContext = null;
- this.jaxbObject = jaxbObject;
- }
-
- @Override
- protected void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean hasHeaders() {
- return false;
- }
-
- @Override
- public MessageHeaders getHeaders() {
- return null;
- }
-
- @Override
- public String getPayloadLocalPart() {
- if (payloadQName == null) {
- readPayloadElement();
- }
- return payloadQName.getLocalPart();
- }
-
- @Override
- public String getPayloadNamespaceURI() {
- if (payloadQName == null) {
- readPayloadElement();
- }
- return payloadQName.getNamespaceURI();
- }
-
- private void readPayloadElement() {
- PayloadElementSniffer sniffer = new PayloadElementSniffer();
- try {
- if (rawContext != null) {
- Marshaller m = rawContext.createMarshaller();
- m.setProperty("jaxb.fragment", Boolean.FALSE);
- m.marshal(jaxbObject, sniffer);
- } else {
- bridge.marshal(jaxbObject, sniffer, null);
- }
-
- } catch (JAXBException e) {
- // if it's due to us aborting the processing after the first element,
- // we can safely ignore this exception.
- //
- // if it's due to error in the object, the same error will be reported
- // when the readHeader() method is used, so we don't have to report
- // an error right now.
- payloadQName = sniffer.getPayloadQName();
- }
- }
-
- @Override
- public boolean hasPayload() {
- return true;
- }
-
- @Override
- public Source readPayloadAsSource() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public XMLStreamReader readPayload() throws XMLStreamException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Message copy() {
- return new JAXBDispatchMessage(this);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public void writeTo(XMLStreamWriter sw) throws XMLStreamException {
- try {
- // MtomCodec sets its own AttachmentMarshaller
- AttachmentMarshaller am = (sw instanceof MtomStreamWriter)
- ? ((MtomStreamWriter) sw).getAttachmentMarshaller()
- : new AttachmentMarshallerImpl(attachmentSet);
-
- // Get the encoding of the writer
- String encoding = XMLStreamWriterUtil.getEncoding(sw);
-
- // Get output stream and use JAXB UTF-8 writer
- OutputStream os = bridge.supportOutputStream() ? XMLStreamWriterUtil.getOutputStream(sw) : null;
- if (rawContext != null) {
- Marshaller m = rawContext.createMarshaller();
- m.setProperty("jaxb.fragment", Boolean.FALSE);
- m.setAttachmentMarshaller(am);
- if (os != null) {
- m.marshal(jaxbObject, os);
- } else {
- m.marshal(jaxbObject, sw);
- }
-
- } else {
-
- if (os != null && encoding != null && encoding.equalsIgnoreCase(SOAPBindingCodec.UTF8_ENCODING)) {
- bridge.marshal(jaxbObject, os, sw.getNamespaceContext(), am);
- } else {
- bridge.marshal(jaxbObject, sw, am);
- }
- }
- //cleanup() is not needed since JAXB doesn't keep ref to AttachmentMarshaller
- } catch (JAXBException e) {
- // bug 6449684, spec 4.3.4
- throw new WebServiceException(e);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBHeader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBHeader.java
deleted file mode 100644
index f0b947a4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBHeader.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.message.jaxb;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.XMLStreamException2;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferResult;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.encoding.SOAPBindingCodec;
-import com.sun.xml.internal.ws.message.AbstractHeaderImpl;
-import com.sun.xml.internal.ws.message.RootElementSniffer;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.streaming.XMLStreamWriterUtil;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.util.JAXBResult;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import java.io.OutputStream;
-
-/**
- * {@link Header} whose physical data representation is a JAXB bean.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class JAXBHeader extends AbstractHeaderImpl {
-
- /**
- * The JAXB object that represents the header.
- */
- private final Object jaxbObject;
-
- private final XMLBridge bridge;
-
- // information about this header. lazily obtained.
- private String nsUri;
- private String localName;
- private Attributes atts;
-
- /**
- * Once the header is turned into infoset,
- * this buffer keeps it.
- */
- private XMLStreamBuffer infoset;
-
- public JAXBHeader(BindingContext context, Object jaxbObject) {
- this.jaxbObject = jaxbObject;
-// this.bridge = new MarshallerBridge(context);
- this.bridge = context.createFragmentBridge();
-
- if (jaxbObject instanceof JAXBElement) {
- JAXBElement e = (JAXBElement) jaxbObject;
- this.nsUri = e.getName().getNamespaceURI();
- this.localName = e.getName().getLocalPart();
- }
- }
-
- public JAXBHeader(XMLBridge bridge, Object jaxbObject) {
- this.jaxbObject = jaxbObject;
- this.bridge = bridge;
-
- QName tagName = bridge.getTypeInfo().tagName;
- this.nsUri = tagName.getNamespaceURI();
- this.localName = tagName.getLocalPart();
- }
-
- /**
- * Lazily parse the first element to obtain attribute values on it.
- */
- private void parse() {
- RootElementSniffer sniffer = new RootElementSniffer();
- try {
- bridge.marshal(jaxbObject,sniffer,null);
- } catch (JAXBException e) {
- // if it's due to us aborting the processing after the first element,
- // we can safely ignore this exception.
- //
- // if it's due to error in the object, the same error will be reported
- // when the readHeader() method is used, so we don't have to report
- // an error right now.
- nsUri = sniffer.getNsUri();
- localName = sniffer.getLocalName();
- atts = sniffer.getAttributes();
- }
- }
-
-
- public @NotNull String getNamespaceURI() {
- if(nsUri==null)
- parse();
- return nsUri;
- }
-
- public @NotNull String getLocalPart() {
- if(localName==null)
- parse();
- return localName;
- }
-
- public String getAttribute(String nsUri, String localName) {
- if(atts==null)
- parse();
- return atts.getValue(nsUri,localName);
- }
-
- public XMLStreamReader readHeader() throws XMLStreamException {
- if(infoset==null) {
- MutableXMLStreamBuffer buffer = new MutableXMLStreamBuffer();
- writeTo(buffer.createFromXMLStreamWriter());
- infoset = buffer;
- }
- return infoset.readAsXMLStreamReader();
- }
-
- public <T> T readAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
- try {
- JAXBResult r = new JAXBResult(unmarshaller);
- // bridge marshals a fragment, so we need to add start/endDocument by ourselves
- r.getHandler().startDocument();
- bridge.marshal(jaxbObject,r);
- r.getHandler().endDocument();
- return (T)r.getResult();
- } catch (SAXException e) {
- throw new JAXBException(e);
- }
- }
- /** @deprecated */
- public <T> T readAsJAXB(Bridge<T> bridge) throws JAXBException {
- return bridge.unmarshal(new JAXBBridgeSource(this.bridge,jaxbObject));
- }
-
- public <T> T readAsJAXB(XMLBridge<T> bond) throws JAXBException {
- return bond.unmarshal(new JAXBBridgeSource(this.bridge,jaxbObject),null);
- }
-
- public void writeTo(XMLStreamWriter sw) throws XMLStreamException {
- try {
- // Get the encoding of the writer
- String encoding = XMLStreamWriterUtil.getEncoding(sw);
-
- // Get output stream and use JAXB UTF-8 writer
- OutputStream os = bridge.supportOutputStream() ? XMLStreamWriterUtil.getOutputStream(sw) : null;
- if (os != null && encoding != null && encoding.equalsIgnoreCase(SOAPBindingCodec.UTF8_ENCODING)) {
- bridge.marshal(jaxbObject, os, sw.getNamespaceContext(), null);
- } else {
- bridge.marshal(jaxbObject,sw, null);
- }
- } catch (JAXBException e) {
- throw new XMLStreamException2(e);
- }
- }
-
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- try {
- SOAPHeader header = saaj.getSOAPHeader();
- if (header == null)
- header = saaj.getSOAPPart().getEnvelope().addHeader();
- bridge.marshal(jaxbObject,header);
- } catch (JAXBException e) {
- throw new SOAPException(e);
- }
- }
-
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
- try {
- bridge.marshal(jaxbObject,contentHandler,null);
- } catch (JAXBException e) {
- SAXParseException x = new SAXParseException(e.getMessage(),null,null,-1,-1,e);
- errorHandler.fatalError(x);
- throw x;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBMessage.java
deleted file mode 100644
index 28047945..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBMessage.java
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.message.jaxb;
-
-import com.sun.istack.internal.FragmentContentHandler;
-import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferResult;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.HeaderList;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.api.message.StreamingSOAP;
-import com.sun.xml.internal.ws.encoding.SOAPBindingCodec;
-import com.sun.xml.internal.ws.message.AbstractMessageImpl;
-import com.sun.xml.internal.ws.message.AttachmentSetImpl;
-import com.sun.xml.internal.ws.message.RootElementSniffer;
-import com.sun.xml.internal.ws.message.stream.StreamMessage;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.BindingContextFactory;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.streaming.XMLStreamWriterUtil;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.streaming.MtomStreamWriter;
-import com.sun.xml.internal.ws.util.xml.XMLReaderComposite;
-import com.sun.xml.internal.ws.util.xml.XMLReaderComposite.ElemInfo;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.util.JAXBResult;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import static javax.xml.stream.XMLStreamConstants.START_DOCUMENT;
-import javax.xml.transform.Source;
-import javax.xml.ws.WebServiceException;
-import java.io.OutputStream;
-import java.util.List;
-
-/**
- * {@link Message} backed by a JAXB bean.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class JAXBMessage extends AbstractMessageImpl implements StreamingSOAP {
- private MessageHeaders headers;
-
- /**
- * The JAXB object that represents the payload.
- */
- private final Object jaxbObject;
-
- private final XMLBridge bridge;
-
- /**
- * For the use case of a user-supplied JAXB context that is not
- * a known JAXB type, as when creating a Disaptch object with a
- * JAXB object parameter, we will marshal and unmarshal directly with
- * the context object, as there is no Bond available. In this case,
- * swaRef is not supported.
- */
- private final JAXBContext rawContext;
-
- /**
- * Lazily sniffed payload element name
- */
- private String nsUri,localName;
-
- /**
- * If we have the infoset representation for the payload, this field is non-null.
- */
- private XMLStreamBuffer infoset;
-
- public static Message create(BindingContext context, Object jaxbObject, SOAPVersion soapVersion, MessageHeaders headers, AttachmentSet attachments) {
- if(!context.hasSwaRef()) {
- return new JAXBMessage(context,jaxbObject,soapVersion,headers,attachments);
- }
-
- // If we have swaRef, then that means we might have attachments.
- // to comply with the packet API, we need to eagerly turn the JAXB object into infoset
- // to correctly find out about attachments.
-
- try {
- MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer();
-
- Marshaller m = context.createMarshaller();
- AttachmentMarshallerImpl am = new AttachmentMarshallerImpl(attachments);
- m.setAttachmentMarshaller(am);
- am.cleanup();
- m.marshal(jaxbObject,xsb.createFromXMLStreamWriter());
-
- // any way to reuse this XMLStreamBuffer in StreamMessage?
- return new StreamMessage(headers,attachments,xsb.readAsXMLStreamReader(),soapVersion);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- }
- /**
- * Creates a {@link Message} backed by a JAXB bean.
- *
- * @param context
- * The JAXBContext to be used for marshalling.
- * @param jaxbObject
- * The JAXB object that represents the payload. must not be null. This object
- * must be bound to an element (which means it either is a {@link JAXBElement} or
- * an instanceof a class with {@link XmlRootElement}).
- * @param soapVersion
- * The SOAP version of the message. Must not be null.
- */
- public static Message create(BindingContext context, Object jaxbObject, SOAPVersion soapVersion) {
- return create(context,jaxbObject,soapVersion,null,null);
- }
- /** @deprecated */
- public static Message create(JAXBContext context, Object jaxbObject, SOAPVersion soapVersion) {
- return create(BindingContextFactory.create(context),jaxbObject,soapVersion,null,null);
- }
-
- /**
- * @deprecated
- * For use when creating a Dispatch object with an unknown JAXB implementation
- * for he JAXBContext parameter.
- *
- */
- public static Message createRaw(JAXBContext context, Object jaxbObject, SOAPVersion soapVersion) {
- return new JAXBMessage(context,jaxbObject,soapVersion,null,null);
- }
-
- private JAXBMessage( BindingContext context, Object jaxbObject, SOAPVersion soapVer, MessageHeaders headers, AttachmentSet attachments ) {
- super(soapVer);
-// this.bridge = new MarshallerBridge(context);
- this.bridge = context.createFragmentBridge();
- this.rawContext = null;
- this.jaxbObject = jaxbObject;
- this.headers = headers;
- this.attachmentSet = attachments;
- }
-
- private JAXBMessage( JAXBContext rawContext, Object jaxbObject, SOAPVersion soapVer, MessageHeaders headers, AttachmentSet attachments ) {
- super(soapVer);
-// this.bridge = new MarshallerBridge(context);
- this.rawContext = rawContext;
- this.bridge = null;
- this.jaxbObject = jaxbObject;
- this.headers = headers;
- this.attachmentSet = attachments;
- }
-
- /**
- * Creates a {@link Message} backed by a JAXB bean.
- *
- * @param bridge
- * Specify the payload tag name and how <tt>jaxbObject</tt> is bound.
- * @param jaxbObject
- */
- public static Message create(XMLBridge bridge, Object jaxbObject, SOAPVersion soapVer) {
- if(!bridge.context().hasSwaRef()) {
- return new JAXBMessage(bridge,jaxbObject,soapVer);
- }
-
- // If we have swaRef, then that means we might have attachments.
- // to comply with the packet API, we need to eagerly turn the JAXB object into infoset
- // to correctly find out about attachments.
-
- try {
- MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer();
-
- AttachmentSetImpl attachments = new AttachmentSetImpl();
- AttachmentMarshallerImpl am = new AttachmentMarshallerImpl(attachments);
- bridge.marshal(jaxbObject,xsb.createFromXMLStreamWriter(), am);
- am.cleanup();
-
- // any way to reuse this XMLStreamBuffer in StreamMessage?
- return new StreamMessage(null,attachments,xsb.readAsXMLStreamReader(),soapVer);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- }
-
- private JAXBMessage(XMLBridge bridge, Object jaxbObject, SOAPVersion soapVer) {
- super(soapVer);
- // TODO: think about a better way to handle BridgeContext
- this.bridge = bridge;
- this.rawContext = null;
- this.jaxbObject = jaxbObject;
- QName tagName = bridge.getTypeInfo().tagName;
- this.nsUri = tagName.getNamespaceURI();
- this.localName = tagName.getLocalPart();
- this.attachmentSet = new AttachmentSetImpl();
- }
-
- /**
- * Copy constructor.
- */
- public JAXBMessage(JAXBMessage that) {
- super(that);
- this.headers = that.headers;
- if(this.headers!=null)
- this.headers = new HeaderList(this.headers);
- this.attachmentSet = that.attachmentSet;
-
- this.jaxbObject = that.jaxbObject;
- this.bridge = that.bridge;
- this.rawContext = that.rawContext;
- }
-
- @Override
- public boolean hasHeaders() {
- return headers!=null && headers.hasHeaders();
- }
-
- @Override
- public MessageHeaders getHeaders() {
- if(headers==null)
- headers = new HeaderList(getSOAPVersion());
- return headers;
- }
-
- @Override
- public String getPayloadLocalPart() {
- if(localName==null)
- sniff();
- return localName;
- }
-
- @Override
- public String getPayloadNamespaceURI() {
- if(nsUri==null)
- sniff();
- return nsUri;
- }
-
- @Override
- public boolean hasPayload() {
- return true;
- }
-
- /**
- * Obtains the tag name of the root element.
- */
- private void sniff() {
- RootElementSniffer sniffer = new RootElementSniffer(false);
- try {
- if (rawContext != null) {
- Marshaller m = rawContext.createMarshaller();
- m.setProperty("jaxb.fragment", Boolean.TRUE);
- m.marshal(jaxbObject,sniffer);
- } else
- bridge.marshal(jaxbObject,sniffer,null);
- } catch (JAXBException e) {
- // if it's due to us aborting the processing after the first element,
- // we can safely ignore this exception.
- //
- // if it's due to error in the object, the same error will be reported
- // when the readHeader() method is used, so we don't have to report
- // an error right now.
- nsUri = sniffer.getNsUri();
- localName = sniffer.getLocalName();
- }
- }
-
- @Override
- public Source readPayloadAsSource() {
- return new JAXBBridgeSource(bridge,jaxbObject);
- }
-
- @Override
- public <T> T readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
- JAXBResult out = new JAXBResult(unmarshaller);
- // since the bridge only produces fragments, we need to fire start/end document.
- try {
- out.getHandler().startDocument();
- if (rawContext != null) {
- Marshaller m = rawContext.createMarshaller();
- m.setProperty("jaxb.fragment", Boolean.TRUE);
- m.marshal(jaxbObject,out);
- } else
- bridge.marshal(jaxbObject,out);
- out.getHandler().endDocument();
- } catch (SAXException e) {
- throw new JAXBException(e);
- }
- return (T)out.getResult();
- }
-
- @Override
- public XMLStreamReader readPayload() throws XMLStreamException {
- try {
- if(infoset==null) {
- if (rawContext != null) {
- XMLStreamBufferResult sbr = new XMLStreamBufferResult();
- Marshaller m = rawContext.createMarshaller();
- m.setProperty("jaxb.fragment", Boolean.TRUE);
- m.marshal(jaxbObject, sbr);
- infoset = sbr.getXMLStreamBuffer();
- } else {
- MutableXMLStreamBuffer buffer = new MutableXMLStreamBuffer();
- writePayloadTo(buffer.createFromXMLStreamWriter());
- infoset = buffer;
- }
- }
- XMLStreamReader reader = infoset.readAsXMLStreamReader();
- if(reader.getEventType()== START_DOCUMENT)
- XMLStreamReaderUtil.nextElementContent(reader);
- return reader;
- } catch (JAXBException e) {
- // bug 6449684, spec 4.3.4
- throw new WebServiceException(e);
- }
- }
-
- /**
- * Writes the payload as SAX events.
- */
- @Override
- protected void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
- try {
- if(fragment)
- contentHandler = new FragmentContentHandler(contentHandler);
- AttachmentMarshallerImpl am = new AttachmentMarshallerImpl(attachmentSet);
- if (rawContext != null) {
- Marshaller m = rawContext.createMarshaller();
- m.setProperty("jaxb.fragment", Boolean.TRUE);
- m.setAttachmentMarshaller(am);
- m.marshal(jaxbObject,contentHandler);
- } else
- bridge.marshal(jaxbObject,contentHandler, am);
- am.cleanup();
- } catch (JAXBException e) {
- // this is really more helpful but spec compliance
- // errorHandler.fatalError(new SAXParseException(e.getMessage(),NULL_LOCATOR,e));
- // bug 6449684, spec 4.3.4
- throw new WebServiceException(e.getMessage(),e);
- }
- }
-
- @Override
- public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
- try {
- // MtomCodec sets its own AttachmentMarshaller
- AttachmentMarshaller am = (sw instanceof MtomStreamWriter)
- ? ((MtomStreamWriter)sw).getAttachmentMarshaller()
- : new AttachmentMarshallerImpl(attachmentSet);
-
- // Get the encoding of the writer
- String encoding = XMLStreamWriterUtil.getEncoding(sw);
-
- // Get output stream and use JAXB UTF-8 writer
- OutputStream os = bridge.supportOutputStream() ? XMLStreamWriterUtil.getOutputStream(sw) : null;
- if (rawContext != null) {
- Marshaller m = rawContext.createMarshaller();
- m.setProperty("jaxb.fragment", Boolean.TRUE);
- m.setAttachmentMarshaller(am);
- if (os != null) {
- m.marshal(jaxbObject, os);
- } else {
- m.marshal(jaxbObject, sw);
- }
- } else {
- if (os != null && encoding != null && encoding.equalsIgnoreCase(SOAPBindingCodec.UTF8_ENCODING)) {
- bridge.marshal(jaxbObject, os, sw.getNamespaceContext(), am);
- } else {
- bridge.marshal(jaxbObject, sw, am);
- }
- }
- //cleanup() is not needed since JAXB doesn't keep ref to AttachmentMarshaller
- //am.cleanup();
- } catch (JAXBException e) {
- // bug 6449684, spec 4.3.4
- throw new WebServiceException(e);
- }
- }
-
- @Override
- public Message copy() {
- return new JAXBMessage(this);
- }
-
- public XMLStreamReader readEnvelope() {
- int base = soapVersion.ordinal()*3;
- this.envelopeTag = DEFAULT_TAGS.get(base);
- this.bodyTag = DEFAULT_TAGS.get(base+2);
- List<XMLStreamReader> hReaders = new java.util.ArrayList<XMLStreamReader>();
- ElemInfo envElem = new ElemInfo(envelopeTag, null);
- ElemInfo bdyElem = new ElemInfo(bodyTag, envElem);
- for (Header h : getHeaders().asList()) {
- try {
- hReaders.add(h.readHeader());
- } catch (XMLStreamException e) {
- throw new RuntimeException(e);
- }
- }
- XMLStreamReader soapHeader = null;
- if(hReaders.size()>0) {
- headerTag = DEFAULT_TAGS.get(base+1);
- ElemInfo hdrElem = new ElemInfo(headerTag, envElem);
- soapHeader = new XMLReaderComposite(hdrElem, hReaders.toArray(new XMLStreamReader[hReaders.size()]));
- }
- try {
- XMLStreamReader payload= readPayload();
- XMLStreamReader soapBody = new XMLReaderComposite(bdyElem, new XMLStreamReader[]{payload});
- XMLStreamReader[] soapContent = (soapHeader != null) ? new XMLStreamReader[]{soapHeader, soapBody} : new XMLStreamReader[]{soapBody};
- return new XMLReaderComposite(envElem, soapContent);
- } catch (XMLStreamException e) {
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/MarshallerBridge.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/MarshallerBridge.java
deleted file mode 100644
index 891e7992..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/MarshallerBridge.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message.jaxb;
-
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.bind.api.TypeReference;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.MarshallerImpl;
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * Used to adapt {@link Marshaller} into a {@link Bridge}.
- * @deprecated
- * @author Kohsuke Kawaguchi
- */
-final class MarshallerBridge extends Bridge {
- public MarshallerBridge(JAXBRIContext context) {
- super((JAXBContextImpl)context);
- }
-
- public void marshal(Marshaller m, Object object, XMLStreamWriter output) throws JAXBException {
- m.setProperty(Marshaller.JAXB_FRAGMENT,true);
- try {
- m.marshal(object,output);
- } finally {
- m.setProperty(Marshaller.JAXB_FRAGMENT,false);
- }
- }
-
- public void marshal(Marshaller m, Object object, OutputStream output, NamespaceContext nsContext) throws JAXBException {
- m.setProperty(Marshaller.JAXB_FRAGMENT,true);
- try {
- ((MarshallerImpl)m).marshal(object,output,nsContext);
- } finally {
- m.setProperty(Marshaller.JAXB_FRAGMENT,false);
- }
- }
-
- public void marshal(Marshaller m, Object object, Node output) throws JAXBException {
- m.setProperty(Marshaller.JAXB_FRAGMENT,true);
- try {
- m.marshal(object,output);
- } finally {
- m.setProperty(Marshaller.JAXB_FRAGMENT,false);
- }
- }
-
- public void marshal(Marshaller m, Object object, ContentHandler contentHandler) throws JAXBException {
- m.setProperty(Marshaller.JAXB_FRAGMENT,true);
- try {
- m.marshal(object,contentHandler);
- } finally {
- m.setProperty(Marshaller.JAXB_FRAGMENT,false);
- }
- }
-
- public void marshal(Marshaller m, Object object, Result result) throws JAXBException {
- m.setProperty(Marshaller.JAXB_FRAGMENT,true);
- try {
- m.marshal(object,result);
- } finally {
- m.setProperty(Marshaller.JAXB_FRAGMENT,false);
- }
- }
-
- public Object unmarshal(Unmarshaller u, XMLStreamReader in) {
- throw new UnsupportedOperationException();
- }
-
- public Object unmarshal(Unmarshaller u, Source in) {
- throw new UnsupportedOperationException();
- }
-
- public Object unmarshal(Unmarshaller u, InputStream in) {
- throw new UnsupportedOperationException();
- }
-
- public Object unmarshal(Unmarshaller u, Node n) {
- throw new UnsupportedOperationException();
- }
-
- public TypeReference getTypeReference() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/package-info.java
deleted file mode 100644
index 54536a67..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/package-info.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * {@link com.sun.xml.internal.ws.api.message.Message} implementation for JAXB.
- *
- * <pre>
- * TODO:
- * Because a producer of a message doesn't generally know
- * when a message is consumed, it's difficult for
- * the caller to do a proper instance caching. Perhaps
- * there should be a layer around JAXBContext that does that?
- * </pre>
- */
-package com.sun.xml.internal.ws.message.jaxb;
-
-import com.sun.xml.internal.ws.api.message.Message;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/package-info.java
deleted file mode 100644
index 8b7a3e74..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * {@link com.sun.xml.internal.ws.api.message.Message} implementations.
- */
-package com.sun.xml.internal.ws.message;
-
-import com.sun.xml.internal.ws.api.message.Message;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJHeader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJHeader.java
deleted file mode 100644
index 9aa6abde..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJHeader.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message.saaj;
-
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.message.DOMHeader;
-import com.sun.istack.internal.NotNull;
-
-import javax.xml.soap.SOAPHeaderElement;
-
-/**
- * {@link Header} for {@link SOAPHeaderElement}.
- *
- * @author Vivek Pandey
- */
-public final class SAAJHeader extends DOMHeader<SOAPHeaderElement> {
- public SAAJHeader(SOAPHeaderElement header) {
- // we won't rely on any of the super class method that uses SOAPVersion,
- // so we can just pass in a dummy version
- super(header);
- }
-
- public
- @NotNull
- String getRole(@NotNull SOAPVersion soapVersion) {
- String v = getAttribute(soapVersion.nsUri, soapVersion.roleAttributeName);
- if(v==null || v.equals(""))
- v = soapVersion.implicitRole;
- return v;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJMessage.java
deleted file mode 100644
index 72c054c8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJMessage.java
+++ /dev/null
@@ -1,778 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.message.saaj;
-
-import com.sun.istack.internal.FragmentContentHandler;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.XMLStreamException2;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.bind.unmarshaller.DOMScanner;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.*;
-import com.sun.xml.internal.ws.message.AttachmentUnmarshallerImpl;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.streaming.DOMStreamReader;
-import com.sun.xml.internal.ws.util.ASCIIUtility;
-import com.sun.xml.internal.ws.util.DOMUtil;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-import org.xml.sax.helpers.LocatorImpl;
-
-import javax.activation.DataHandler;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.soap.*;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.WebServiceException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * {@link Message} implementation backed by {@link SOAPMessage}.
- *
- * @author Vivek Pandey
- * @author Rama Pulavarthi
- */
-public class SAAJMessage extends Message {
- // flag to switch between representations
- private boolean parsedMessage;
- // flag to check if Message API is exercised;
- private boolean accessedMessage;
- private final SOAPMessage sm;
-
- private MessageHeaders headers;
- private List<Element> bodyParts;
- private Element payload;
-
- private String payloadLocalName;
- private String payloadNamespace;
- private SOAPVersion soapVersion;
-
- //Collect the attrbutes on the enclosing elements so that the same message can be reproduced without loss of any
- // valuable info
- private NamedNodeMap bodyAttrs, headerAttrs, envelopeAttrs;
-
- public SAAJMessage(SOAPMessage sm) {
- this.sm = sm;
- }
-
- /**
- * This constructor is a convenience and called by the {@link #copy}
- *
- * @param headers
- * @param sm
- */
- private SAAJMessage(MessageHeaders headers, AttachmentSet as, SOAPMessage sm, SOAPVersion version) {
- this.sm = sm;
- this.parse();
- if(headers == null)
- headers = new HeaderList(version);
- this.headers = headers;
- this.attachmentSet = as;
- }
-
- private void parse() {
- if (!parsedMessage) {
- try {
- access();
- if (headers == null)
- headers = new HeaderList(getSOAPVersion());
- SOAPHeader header = sm.getSOAPHeader();
- if (header != null) {
- headerAttrs = header.getAttributes();
- Iterator iter = header.examineAllHeaderElements();
- while (iter.hasNext()) {
- headers.add(new SAAJHeader((SOAPHeaderElement) iter.next()));
- }
- }
- attachmentSet = new SAAJAttachmentSet(sm);
-
- parsedMessage = true;
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
- }
-
- protected void access() {
- if (!accessedMessage) {
- try {
- envelopeAttrs = sm.getSOAPPart().getEnvelope().getAttributes();
- Node body = sm.getSOAPBody();
- bodyAttrs = body.getAttributes();
- soapVersion = SOAPVersion.fromNsUri(body.getNamespaceURI());
- //cature all the body elements
- bodyParts = DOMUtil.getChildElements(body);
- //we treat payload as the first body part
- payload = bodyParts.size() > 0 ? bodyParts.get(0) : null;
- // hope this is correct. Caching the localname and namespace of the payload should be fine
- // but what about if a Handler replaces the payload with something else? Weel, may be it
- // will be error condition anyway
- if (payload != null) {
- payloadLocalName = payload.getLocalName();
- payloadNamespace = payload.getNamespaceURI();
- }
- accessedMessage = true;
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
- }
-
- public boolean hasHeaders() {
- parse();
- return headers.hasHeaders();
- }
-
- public @NotNull MessageHeaders getHeaders() {
- parse();
- return headers;
- }
-
- /**
- * Gets the attachments of this message
- * (attachments live outside a message.)
- */
- @Override
- public @NotNull AttachmentSet getAttachments() {
- if (attachmentSet == null) attachmentSet = new SAAJAttachmentSet(sm);
- return attachmentSet;
- }
-
- /**
- * Optimization hint for the derived class to check
- * if we may have some attachments.
- */
- @Override
- protected boolean hasAttachments() {
- return !getAttachments().isEmpty();
- }
-
- public @Nullable String getPayloadLocalPart() {
- soapBodyFirstChild();
- return payloadLocalName;
- }
-
- public String getPayloadNamespaceURI() {
- soapBodyFirstChild();
- return payloadNamespace;
- }
-
- public boolean hasPayload() {
- return soapBodyFirstChild() != null;
- }
-
- private void addAttributes(Element e, NamedNodeMap attrs) {
- if(attrs == null)
- return;
- String elPrefix = e.getPrefix();
- for(int i=0; i < attrs.getLength();i++) {
- Attr a = (Attr)attrs.item(i);
- //check if attr is ns declaration
- if("xmlns".equals(a.getPrefix()) || "xmlns".equals(a.getLocalName())) {
- if(elPrefix == null && a.getLocalName().equals("xmlns")) {
- // the target element has already default ns declaration, dont' override it
- continue;
- } else if(elPrefix != null && "xmlns".equals(a.getPrefix()) && elPrefix.equals(a.getLocalName())) {
- //dont bind the prefix to ns again, its already in the target element.
- continue;
- }
- e.setAttributeNS(a.getNamespaceURI(),a.getName(),a.getValue());
- continue;
- }
- e.setAttributeNS(a.getNamespaceURI(),a.getName(),a.getValue());
- }
- }
-
- public Source readEnvelopeAsSource() {
- try {
- if (!parsedMessage) {
- SOAPEnvelope se = sm.getSOAPPart().getEnvelope();
- return new DOMSource(se);
-
- } else {
- SOAPMessage msg = soapVersion.getMessageFactory().createMessage();
- addAttributes(msg.getSOAPPart().getEnvelope(),envelopeAttrs);
-
- SOAPBody newBody = msg.getSOAPPart().getEnvelope().getBody();
- addAttributes(newBody, bodyAttrs);
- for (Element part : bodyParts) {
- Node n = newBody.getOwnerDocument().importNode(part, true);
- newBody.appendChild(n);
- }
- addAttributes(msg.getSOAPHeader(),headerAttrs);
- for (Header header : headers.asList()) {
- header.writeTo(msg);
- }
- SOAPEnvelope se = msg.getSOAPPart().getEnvelope();
- return new DOMSource(se);
- }
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-
- public SOAPMessage readAsSOAPMessage() throws SOAPException {
- if (!parsedMessage) {
- return sm;
- } else {
- SOAPMessage msg = soapVersion.getMessageFactory().createMessage();
- addAttributes(msg.getSOAPPart().getEnvelope(),envelopeAttrs);
- SOAPBody newBody = msg.getSOAPPart().getEnvelope().getBody();
- addAttributes(newBody, bodyAttrs);
- for (Element part : bodyParts) {
- Node n = newBody.getOwnerDocument().importNode(part, true);
- newBody.appendChild(n);
- }
- addAttributes(msg.getSOAPHeader(),headerAttrs);
- for (Header header : headers.asList()) {
- header.writeTo(msg);
- }
- for (Attachment att : getAttachments()) {
- AttachmentPart part = msg.createAttachmentPart();
- part.setDataHandler(att.asDataHandler());
- part.setContentId('<' + att.getContentId() + '>');
- addCustomMimeHeaders(att, part);
- msg.addAttachmentPart(part);
- }
- msg.saveChanges();
- return msg;
- }
- }
-
- private void addCustomMimeHeaders(Attachment att, AttachmentPart part) {
- if (att instanceof AttachmentEx) {
- Iterator<AttachmentEx.MimeHeader> allMimeHeaders = ((AttachmentEx) att).getMimeHeaders();
- while (allMimeHeaders.hasNext()) {
- AttachmentEx.MimeHeader mh = allMimeHeaders.next();
- String name = mh.getName();
- if (!"Content-Type".equalsIgnoreCase(name)
- && !"Content-Id".equalsIgnoreCase(name)) {
- part.addMimeHeader(name, mh.getValue());
- }
- }
- }
- }
-
- public Source readPayloadAsSource() {
- access();
- return (payload != null) ? new DOMSource(payload) : null;
- }
-
- public <T> T readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
- access();
- if (payload != null) {
- if(hasAttachments())
- unmarshaller.setAttachmentUnmarshaller(new AttachmentUnmarshallerImpl(getAttachments()));
- return (T) unmarshaller.unmarshal(payload);
-
- }
- return null;
- }
-
- /** @deprecated */
- public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
- access();
- if (payload != null)
- return bridge.unmarshal(payload,hasAttachments()? new AttachmentUnmarshallerImpl(getAttachments()) : null);
- return null;
- }
- public <T> T readPayloadAsJAXB(XMLBridge<T> bridge) throws JAXBException {
- access();
- if (payload != null)
- return bridge.unmarshal(payload,hasAttachments()? new AttachmentUnmarshallerImpl(getAttachments()) : null);
- return null;
- }
-
- public XMLStreamReader readPayload() throws XMLStreamException {
- return soapBodyFirstChildReader();
- }
-
- public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
- access();
- try {
- for (Element part : bodyParts)
- DOMUtil.serializeNode(part, sw);
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- }
-
- public void writeTo(XMLStreamWriter writer) throws XMLStreamException {
- try {
- writer.writeStartDocument();
- if (!parsedMessage) {
- DOMUtil.serializeNode(sm.getSOAPPart().getEnvelope(), writer);
- } else {
- SOAPEnvelope env = sm.getSOAPPart().getEnvelope();
- DOMUtil.writeTagWithAttributes(env, writer);
- if (hasHeaders()) {
- if(env.getHeader() != null) {
- DOMUtil.writeTagWithAttributes(env.getHeader(), writer);
- } else {
- writer.writeStartElement(env.getPrefix(), "Header", env.getNamespaceURI());
- }
- for (Header h : headers.asList()) {
- h.writeTo(writer);
- }
- writer.writeEndElement();
- }
-
- DOMUtil.serializeNode(sm.getSOAPBody(), writer);
- writer.writeEndElement();
- }
- writer.writeEndDocument();
- writer.flush();
- } catch (SOAPException ex) {
- throw new XMLStreamException2(ex);
- //for now. ask jaxws team what to do.
- }
- }
-
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
- String soapNsUri = soapVersion.nsUri;
- if (!parsedMessage) {
- DOMScanner ds = new DOMScanner();
- ds.setContentHandler(contentHandler);
- ds.scan(sm.getSOAPPart());
- } else {
- contentHandler.setDocumentLocator(NULL_LOCATOR);
- contentHandler.startDocument();
- contentHandler.startPrefixMapping("S", soapNsUri);
- startPrefixMapping(contentHandler, envelopeAttrs,"S");
- contentHandler.startElement(soapNsUri, "Envelope", "S:Envelope", getAttributes(envelopeAttrs));
- if (hasHeaders()) {
- startPrefixMapping(contentHandler, headerAttrs,"S");
- contentHandler.startElement(soapNsUri, "Header", "S:Header", getAttributes(headerAttrs));
- MessageHeaders headers = getHeaders();
- for (Header h : headers.asList()) {
- h.writeTo(contentHandler, errorHandler);
- }
- endPrefixMapping(contentHandler, headerAttrs,"S");
- contentHandler.endElement(soapNsUri, "Header", "S:Header");
-
- }
- startPrefixMapping(contentHandler, bodyAttrs,"S");
- // write the body
- contentHandler.startElement(soapNsUri, "Body", "S:Body", getAttributes(bodyAttrs));
- writePayloadTo(contentHandler, errorHandler, true);
- endPrefixMapping(contentHandler, bodyAttrs,"S");
- contentHandler.endElement(soapNsUri, "Body", "S:Body");
- endPrefixMapping(contentHandler, envelopeAttrs,"S");
- contentHandler.endElement(soapNsUri, "Envelope", "S:Envelope");
- }
- }
- /**
- * Gets the Attributes that are not namesapce declarations
- * @param attrs
- * @return
- */
- private AttributesImpl getAttributes(NamedNodeMap attrs) {
- AttributesImpl atts = new AttributesImpl();
- if(attrs == null)
- return EMPTY_ATTS;
- for(int i=0; i < attrs.getLength();i++) {
- Attr a = (Attr)attrs.item(i);
- //check if attr is ns declaration
- if("xmlns".equals(a.getPrefix()) || "xmlns".equals(a.getLocalName())) {
- continue;
- }
- atts.addAttribute(fixNull(a.getNamespaceURI()),a.getLocalName(),a.getName(),a.getSchemaTypeInfo().getTypeName(),a.getValue());
- }
- return atts;
- }
-
- /**
- * Collects the ns declarations and starts the prefix mapping, consequently the associated endPrefixMapping needs to be called.
- * @param contentHandler
- * @param attrs
- * @param excludePrefix , this is to excldue the global prefix mapping "S" used at the start
- * @throws SAXException
- */
- private void startPrefixMapping(ContentHandler contentHandler, NamedNodeMap attrs, String excludePrefix) throws SAXException {
- if(attrs == null)
- return;
- for(int i=0; i < attrs.getLength();i++) {
- Attr a = (Attr)attrs.item(i);
- //check if attr is ns declaration
- if("xmlns".equals(a.getPrefix()) || "xmlns".equals(a.getLocalName())) {
- if(!fixNull(a.getPrefix()).equals(excludePrefix)) {
- contentHandler.startPrefixMapping(fixNull(a.getPrefix()), a.getNamespaceURI());
- }
- }
- }
- }
-
- private void endPrefixMapping(ContentHandler contentHandler, NamedNodeMap attrs, String excludePrefix) throws SAXException {
- if(attrs == null)
- return;
- for(int i=0; i < attrs.getLength();i++) {
- Attr a = (Attr)attrs.item(i);
- //check if attr is ns declaration
- if("xmlns".equals(a.getPrefix()) || "xmlns".equals(a.getLocalName())) {
- if(!fixNull(a.getPrefix()).equals(excludePrefix)) {
- contentHandler.endPrefixMapping(fixNull(a.getPrefix()));
- }
- }
- }
- }
-
- private static String fixNull(String s) {
- if(s==null) return "";
- else return s;
- }
-
- private void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
- if(fragment)
- contentHandler = new FragmentContentHandler(contentHandler);
- DOMScanner ds = new DOMScanner();
- ds.setContentHandler(contentHandler);
- ds.scan(payload);
- }
-
- /**
- * Creates a copy of a {@link com.sun.xml.internal.ws.api.message.Message}.
- * <p/>
- * <p/>
- * This method creates a new {@link com.sun.xml.internal.ws.api.message.Message} whose header/payload/attachments/properties
- * are identical to this {@link com.sun.xml.internal.ws.api.message.Message}. Once created, the created {@link com.sun.xml.internal.ws.api.message.Message}
- * and the original {@link com.sun.xml.internal.ws.api.message.Message} behaves independently --- adding header/
- * attachment to one {@link com.sun.xml.internal.ws.api.message.Message} doesn't affect another {@link com.sun.xml.internal.ws.api.message.Message}
- * at all.
- * <p/>
- * <h3>Design Rationale</h3>
- * <p/>
- * Since a {@link com.sun.xml.internal.ws.api.message.Message} body is read-once, sometimes
- * (such as when you do fail-over, or WS-RM) you need to
- * create an idential copy of a {@link com.sun.xml.internal.ws.api.message.Message}.
- * <p/>
- * <p/>
- * The actual copy operation depends on the layout
- * of the data in memory, hence it's best to be done by
- * the {@link com.sun.xml.internal.ws.api.message.Message} implementation itself.
- */
- public Message copy() {
- try {
- if (!parsedMessage) {
- return new SAAJMessage(readAsSOAPMessage());
- } else {
- SOAPMessage msg = soapVersion.getMessageFactory().createMessage();
- SOAPBody newBody = msg.getSOAPPart().getEnvelope().getBody();
- for (Element part : bodyParts) {
- Node n = newBody.getOwnerDocument().importNode(part, true);
- newBody.appendChild(n);
- }
- addAttributes(newBody, bodyAttrs);
- return new SAAJMessage(getHeaders(), getAttachments(), msg, soapVersion);
- }
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
- private static final AttributesImpl EMPTY_ATTS = new AttributesImpl();
- private static final LocatorImpl NULL_LOCATOR = new LocatorImpl();
-
- protected static class SAAJAttachment implements AttachmentEx {
-
- final AttachmentPart ap;
-
- String contentIdNoAngleBracket;
-
- public SAAJAttachment(AttachmentPart part) {
- this.ap = part;
- }
-
- /**
- * Content ID of the attachment. Uniquely identifies an attachment.
- */
- public String getContentId() {
- if (contentIdNoAngleBracket == null) {
- contentIdNoAngleBracket = ap.getContentId();
- if (contentIdNoAngleBracket != null && contentIdNoAngleBracket.charAt(0) == '<')
- contentIdNoAngleBracket = contentIdNoAngleBracket.substring(1, contentIdNoAngleBracket.length()-1);
- }
- return contentIdNoAngleBracket;
- }
-
- /**
- * Gets the MIME content-type of this attachment.
- */
- public String getContentType() {
- return ap.getContentType();
- }
-
- /**
- * Gets the attachment as an exact-length byte array.
- */
- public byte[] asByteArray() {
- try {
- return ap.getRawContentBytes();
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-
- /**
- * Gets the attachment as a {@link javax.activation.DataHandler}.
- */
- public DataHandler asDataHandler() {
- try {
- return ap.getDataHandler();
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-
- /**
- * Gets the attachment as a {@link javax.xml.transform.Source}.
- * Note that there's no guarantee that the attachment is actually an XML.
- */
- public Source asSource() {
- try {
- return new StreamSource(ap.getRawContent());
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-
- /**
- * Obtains this attachment as an {@link java.io.InputStream}.
- */
- public InputStream asInputStream() {
- try {
- return ap.getRawContent();
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-
- /**
- * Writes the contents of the attachment into the given stream.
- */
- public void writeTo(OutputStream os) throws IOException {
- try {
- ASCIIUtility.copyStream(ap.getRawContent(), os);
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-
- /**
- * Writes this attachment to the given {@link javax.xml.soap.SOAPMessage}.
- */
- public void writeTo(SOAPMessage saaj) {
- saaj.addAttachmentPart(ap);
- }
-
- AttachmentPart asAttachmentPart(){
- return ap;
- }
-
- public Iterator<MimeHeader> getMimeHeaders() {
- final Iterator it = ap.getAllMimeHeaders();
- return new Iterator<MimeHeader>() {
- public boolean hasNext() {
- return it.hasNext();
- }
-
- public MimeHeader next() {
- final javax.xml.soap.MimeHeader mh = (javax.xml.soap.MimeHeader) it.next();
- return new MimeHeader() {
- public String getName() {
- return mh.getName();
- }
-
- public String getValue() {
- return mh.getValue();
- }
- };
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
- }
-
- /**
- * {@link AttachmentSet} for SAAJ.
- *
- * SAAJ wants '&lt;' and '>' for the content ID, but {@link AttachmentSet}
- * doesn't. S this class also does the conversion between them.
- */
- protected static class SAAJAttachmentSet implements AttachmentSet {
-
- private Map<String, Attachment> attMap;
- private Iterator attIter;
-
- public SAAJAttachmentSet(SOAPMessage sm) {
- attIter = sm.getAttachments();
- }
-
- /**
- * Gets the attachment by the content ID.
- *
- * @return null
- * if no such attachment exist.
- */
- public Attachment get(String contentId) {
- // if this is the first time then create the attachment Map
- if (attMap == null) {
- if (!attIter.hasNext())
- return null;
- attMap = createAttachmentMap();
- }
- if(contentId.charAt(0) != '<'){
- return attMap.get('<'+contentId+'>');
- }
- return attMap.get(contentId);
- }
-
- public boolean isEmpty() {
- if(attMap!=null)
- return attMap.isEmpty();
- else
- return !attIter.hasNext();
- }
-
- /**
- * Returns an iterator over a set of elements of type T.
- *
- * @return an Iterator.
- */
- public Iterator<Attachment> iterator() {
- if (attMap == null) {
- attMap = createAttachmentMap();
- }
- return attMap.values().iterator();
- }
-
- private Map<String, Attachment> createAttachmentMap() {
- HashMap<String, Attachment> map = new HashMap<String, Attachment>();
- while (attIter.hasNext()) {
- AttachmentPart ap = (AttachmentPart) attIter.next();
- map.put(ap.getContentId(), new SAAJAttachment(ap));
- }
- return map;
- }
-
- public void add(Attachment att) {
- attMap.put('<'+att.getContentId()+'>', att);
- }
- }
-
- public SOAPVersion getSOAPVersion() {
- return soapVersion;
- }
-
- private XMLStreamReader soapBodyFirstChildReader;
-
- /**
- * This allow the subclass to retain the XMLStreamReader.
- */
- protected XMLStreamReader getXMLStreamReader(SOAPElement soapElement) {
- return null;
- }
-
- protected XMLStreamReader createXMLStreamReader(SOAPElement soapElement) {
- DOMStreamReader dss = new DOMStreamReader();
- dss.setCurrentNode(soapElement);
- return dss;
- }
-
- protected XMLStreamReader soapBodyFirstChildReader() {
- if (soapBodyFirstChildReader != null) return soapBodyFirstChildReader;
- soapBodyFirstChild();
- if (soapBodyFirstChild != null) {
- soapBodyFirstChildReader = getXMLStreamReader(soapBodyFirstChild);
- if (soapBodyFirstChildReader == null) soapBodyFirstChildReader =
- createXMLStreamReader(soapBodyFirstChild);
- if (soapBodyFirstChildReader.getEventType() == XMLStreamReader.START_DOCUMENT) {
- try {
- while(soapBodyFirstChildReader.getEventType() != XMLStreamReader.START_ELEMENT)
- soapBodyFirstChildReader.next();
- } catch (XMLStreamException e) {
- throw new RuntimeException(e);
- }
- }
- return soapBodyFirstChildReader;
- } else {
- payloadLocalName = null;
- payloadNamespace = null;
- return null;
- }
- }
-
- private SOAPElement soapBodyFirstChild;
-
- SOAPElement soapBodyFirstChild() {
- if (soapBodyFirstChild != null) return soapBodyFirstChild;
- try {
- boolean foundElement = false;
- for (Node n = sm.getSOAPBody().getFirstChild(); n != null && !foundElement; n = n.getNextSibling()) {
- if (n.getNodeType() == Node.ELEMENT_NODE) {
- foundElement = true;
- if (n instanceof SOAPElement) {
- soapBodyFirstChild = (SOAPElement) n;
- payloadLocalName = soapBodyFirstChild.getLocalName();
- payloadNamespace = soapBodyFirstChild.getNamespaceURI();
- return soapBodyFirstChild;
- }
- }
- }
- if(foundElement) for(Iterator i = sm.getSOAPBody().getChildElements(); i.hasNext();){
- Object o = i.next();
- if (o instanceof SOAPElement) {
- soapBodyFirstChild = (SOAPElement)o;
- payloadLocalName = soapBodyFirstChild.getLocalName();
- payloadNamespace = soapBodyFirstChild.getNamespaceURI();
- return soapBodyFirstChild;
- }
- }
- } catch (SOAPException e) {
- throw new RuntimeException(e);
- }
- return soapBodyFirstChild;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/PayloadSourceMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/PayloadSourceMessage.java
deleted file mode 100644
index 80faaa2d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/PayloadSourceMessage.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.message.source;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.HeaderList;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.message.AttachmentSetImpl;
-import com.sun.xml.internal.ws.message.stream.PayloadStreamReaderMessage;
-import com.sun.xml.internal.ws.streaming.SourceReaderFactory;
-
-import javax.xml.transform.Source;
-
-/**
- * {@link Message} backed by {@link Source} as payload
- *
- * @author Vivek Pandey
- */
-public class PayloadSourceMessage extends PayloadStreamReaderMessage {
-
- public PayloadSourceMessage(@Nullable MessageHeaders headers,
- @NotNull Source payload, @NotNull AttachmentSet attSet,
- @NotNull SOAPVersion soapVersion) {
-
- super(headers, SourceReaderFactory.createSourceReader(payload, true),
- attSet, soapVersion);
- }
-
- public PayloadSourceMessage(Source s, SOAPVersion soapVer) {
- this(null, s, new AttachmentSetImpl(), soapVer);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/ProtocolSourceMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/ProtocolSourceMessage.java
deleted file mode 100644
index ad2fa7be..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/ProtocolSourceMessage.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.message.source;
-
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.pipe.Codecs;
-import com.sun.xml.internal.ws.api.pipe.StreamSOAPCodec;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.streaming.SourceReaderFactory;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Source;
-
-/**
- * Implementation of {@link Message} backed by {@link Source} where the Source
- * represents the complete message such as a SOAP envelope. It uses
- * {@link StreamSOAPCodec} to create a {@link Message} and uses it as a
- * delegate for all the methods.
- *
- * @author Vivek Pandey
- * @author Jitendra Kotamraju
- */
-public class ProtocolSourceMessage extends Message {
- private final Message sm;
-
- public ProtocolSourceMessage(Source source, SOAPVersion soapVersion) {
- XMLStreamReader reader = SourceReaderFactory.createSourceReader(source, true);
- com.sun.xml.internal.ws.api.pipe.StreamSOAPCodec codec = Codecs.createSOAPEnvelopeXmlCodec(soapVersion);
- sm = codec.decode(reader);
- }
-
- public boolean hasHeaders() {
- return sm.hasHeaders();
- }
-
- public String getPayloadLocalPart() {
- return sm.getPayloadLocalPart();
- }
-
- public String getPayloadNamespaceURI() {
- return sm.getPayloadNamespaceURI();
- }
-
- public boolean hasPayload() {
- return sm.hasPayload();
- }
-
- public Source readPayloadAsSource() {
- return sm.readPayloadAsSource();
- }
-
- public XMLStreamReader readPayload() throws XMLStreamException {
- return sm.readPayload();
- }
-
- public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
- sm.writePayloadTo(sw);
- }
-
- public void writeTo(XMLStreamWriter sw) throws XMLStreamException {
- sm.writeTo(sw);
- }
-
- public Message copy() {
- return sm.copy();
- }
-
- public Source readEnvelopeAsSource() {
- return sm.readEnvelopeAsSource();
- }
-
- public SOAPMessage readAsSOAPMessage() throws SOAPException {
- return sm.readAsSOAPMessage();
- }
-
- public SOAPMessage readAsSOAPMessage(Packet packet, boolean inbound) throws SOAPException {
- return sm.readAsSOAPMessage(packet, inbound);
- }
-
- public <T> T readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
- return (T)sm.readPayloadAsJAXB(unmarshaller);
- }
- /** @deprecated */
- public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
- return sm.readPayloadAsJAXB(bridge);
- }
- public <T> T readPayloadAsJAXB(XMLBridge<T> bridge) throws JAXBException {
- return sm.readPayloadAsJAXB(bridge);
- }
-
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
- sm.writeTo(contentHandler, errorHandler);
- }
-
- public SOAPVersion getSOAPVersion() {
- return sm.getSOAPVersion();
- }
-
- @Override
- public MessageHeaders getHeaders() {
- return sm.getHeaders();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/SourceUtils.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/SourceUtils.java
deleted file mode 100644
index 78f8e184..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/SourceUtils.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message.source;
-
-import com.sun.xml.internal.ws.message.RootElementSniffer;
-import com.sun.xml.internal.ws.streaming.SourceReaderFactory;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.sax.SAXResult;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.WebServiceException;
-
-/**
- *
- * @author Vivek Pandey
- */
-final class SourceUtils {
-
- int srcType;
-
- private static final int domSource = 1;
- private static final int streamSource = 2;
- private static final int saxSource=4;
-
- public SourceUtils(Source src) {
- if(src instanceof StreamSource){
- srcType = streamSource;
- }else if(src instanceof DOMSource){
- srcType = domSource;
- }else if(src instanceof SAXSource){
- srcType = saxSource;
- }
- }
-
- public boolean isDOMSource(){
- return (srcType&domSource) == domSource;
- }
-
- public boolean isStreamSource(){
- return (srcType&streamSource) == streamSource;
- }
-
- public boolean isSaxSource(){
- return (srcType&saxSource) == saxSource;
- }
-
- /**
- * This would peek into the Source (DOMSource and SAXSource) for the localName and NamespaceURI
- * of the top-level element.
- * @param src
- * @return QName of the payload
- */
- public QName sniff(Source src) {
- return sniff(src, new RootElementSniffer());
- }
-
- public QName sniff(Source src, RootElementSniffer sniffer){
- String localName = null;
- String namespaceUri = null;
-
- if(isDOMSource()){
- DOMSource domSrc = (DOMSource)src;
- Node n = domSrc.getNode();
- if(n.getNodeType()== Node.DOCUMENT_NODE) {
- n = ((Document)n).getDocumentElement();
- }
- localName = n.getLocalName();
- namespaceUri = n.getNamespaceURI();
- }else if(isSaxSource()){
- SAXSource saxSrc = (SAXSource)src;
- SAXResult saxResult = new SAXResult(sniffer);
- try {
- Transformer tr = XmlUtil.newTransformer();
- tr.transform(saxSrc, saxResult);
- } catch (TransformerConfigurationException e) {
- throw new WebServiceException(e);
- } catch (TransformerException e) {
- // if it's due to aborting the processing after the first element,
- // we can safely ignore this exception.
- //
- // if it's due to error in the object, the same error will be reported
- // when the readHeader() method is used, so we don't have to report
- // an error right now.
- localName = sniffer.getLocalName();
- namespaceUri = sniffer.getNsUri();
- }
- }
- return new QName(namespaceUri, localName);
- }
-
- public static void serializeSource(Source src, XMLStreamWriter writer) throws XMLStreamException {
- XMLStreamReader reader = SourceReaderFactory.createSourceReader(src, true);
- int state;
- do {
- state = reader.next();
- switch (state) {
- case XMLStreamConstants.START_ELEMENT:
- /*
- * TODO: Is this necessary, shouldn't zephyr return "" instead of
- * null for getNamespaceURI() and getPrefix()?
- */
- String uri = reader.getNamespaceURI();
- String prefix = reader.getPrefix();
- String localName = reader.getLocalName();
-
- if (prefix == null) {
- if (uri == null) {
- writer.writeStartElement(localName);
- } else {
- writer.writeStartElement(uri, localName);
- }
- } else {
-// assert uri != null;
-
- if(prefix.length() > 0){
- /**
- * Before we write the
- */
- String writerURI = null;
- if (writer.getNamespaceContext() != null) {
- writerURI = writer.getNamespaceContext().getNamespaceURI(prefix);
- }
- String writerPrefix = writer.getPrefix(uri);
- if(declarePrefix(prefix, uri, writerPrefix, writerURI)){
- writer.writeStartElement(prefix, localName, uri);
- writer.setPrefix(prefix, uri != null ? uri : "");
- writer.writeNamespace(prefix, uri);
- }else{
- writer.writeStartElement(prefix, localName, uri);
- }
- }else{
- writer.writeStartElement(prefix, localName, uri);
- }
- }
-
- int n = reader.getNamespaceCount();
- // Write namespace declarations
- for (int i = 0; i < n; i++) {
- String nsPrefix = reader.getNamespacePrefix(i);
- if (nsPrefix == null) {
- nsPrefix = "";
- }
- // StAX returns null for default ns
- String writerURI = null;
- if (writer.getNamespaceContext() != null) {
- writerURI = writer.getNamespaceContext().getNamespaceURI(nsPrefix);
- }
-
- // Zephyr: Why is this returning null?
- // Compare nsPrefix with prefix because of [1] (above)
- String readerURI = reader.getNamespaceURI(i);
-
- /**
- * write the namespace in 3 conditions
- * - when the namespace URI is not bound to the prefix in writer(writerURI == 0)
- * - when the readerPrefix and writerPrefix are ""
- * - when readerPrefix and writerPrefix are not equal and the URI bound to them
- * are different
- */
- if (writerURI == null || ((nsPrefix.length() == 0) || (prefix.length() == 0)) ||
- (!nsPrefix.equals(prefix) && !writerURI.equals(readerURI))) {
- writer.setPrefix(nsPrefix, readerURI != null ? readerURI : "");
- writer.writeNamespace(nsPrefix, readerURI != null ? readerURI : "");
- }
- }
-
- // Write attributes
- n = reader.getAttributeCount();
- for (int i = 0; i < n; i++) {
- String attrPrefix = reader.getAttributePrefix(i);
- String attrURI = reader.getAttributeNamespace(i);
-
- writer.writeAttribute(attrPrefix != null ? attrPrefix : "",
- attrURI != null ? attrURI : "",
- reader.getAttributeLocalName(i),
- reader.getAttributeValue(i));
- // if the attribute prefix is undeclared in current writer scope then declare it
- setUndeclaredPrefix(attrPrefix, attrURI, writer);
- }
- break;
- case XMLStreamConstants.END_ELEMENT:
- writer.writeEndElement();
- break;
- case XMLStreamConstants.CHARACTERS:
- writer.writeCharacters(reader.getText());
- break;
- default:
- break;
- }
- } while (state != XMLStreamConstants.END_DOCUMENT);
- reader.close();
- }
-
- /**
- * sets undeclared prefixes on the writer
- * @param prefix
- * @param writer
- * @throws XMLStreamException
- */
- private static void setUndeclaredPrefix(String prefix, String readerURI, XMLStreamWriter writer) throws XMLStreamException {
- String writerURI = null;
- if (writer.getNamespaceContext() != null) {
- writerURI = writer.getNamespaceContext().getNamespaceURI(prefix);
- }
-
- if (writerURI == null) {
- writer.setPrefix(prefix, readerURI != null ? readerURI : "");
- writer.writeNamespace(prefix, readerURI != null ? readerURI : "");
- }
- }
-
- /**
- * check if we need to declare
- * @param rPrefix
- * @param rUri
- * @param wPrefix
- * @param wUri
- */
- private static boolean declarePrefix(String rPrefix, String rUri, String wPrefix, String wUri){
- if (wUri == null ||((wPrefix != null) && !rPrefix.equals(wPrefix))||
- (rUri != null && !wUri.equals(rUri))) {
- return true;
- }
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/OutboundStreamHeader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/OutboundStreamHeader.java
deleted file mode 100644
index 28dc981f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/OutboundStreamHeader.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message.stream;
-
-import com.sun.istack.internal.FinalArrayList;
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferException;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.message.AbstractHeaderImpl;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.ws.WebServiceException;
-
-/**
- * Used to represent outbound header created from {@link XMLStreamBuffer}.
- *
- * <p>
- * This is optimized for outbound use, so it implements some of the methods lazily,
- * in a slow way.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class OutboundStreamHeader extends AbstractHeaderImpl {
- private final XMLStreamBuffer infoset;
- private final String nsUri,localName;
-
- /**
- * The attributes on the header element.
- * Lazily parsed.
- * Null if not parsed yet.
- */
- private FinalArrayList<Attribute> attributes;
-
- public OutboundStreamHeader(XMLStreamBuffer infoset, String nsUri, String localName) {
- this.infoset = infoset;
- this.nsUri = nsUri;
- this.localName = localName;
- }
-
- public @NotNull String getNamespaceURI() {
- return nsUri;
- }
-
- public @NotNull String getLocalPart() {
- return localName;
- }
-
- public String getAttribute(String nsUri, String localName) {
- if(attributes==null)
- parseAttributes();
- for(int i=attributes.size()-1; i>=0; i-- ) {
- Attribute a = attributes.get(i);
- if(a.localName.equals(localName) && a.nsUri.equals(nsUri))
- return a.value;
- }
- return null;
- }
-
- /**
- * We don't really expect this to be used, but just to satisfy
- * the {@link Header} contract.
- *
- * So this is rather slow.
- */
- private void parseAttributes() {
- try {
- XMLStreamReader reader = readHeader();
-
- attributes = new FinalArrayList<Attribute>();
-
- for (int i = 0; i < reader.getAttributeCount(); i++) {
- final String localName = reader.getAttributeLocalName(i);
- final String namespaceURI = reader.getAttributeNamespace(i);
- final String value = reader.getAttributeValue(i);
-
- attributes.add(new Attribute(namespaceURI,localName,value));
- }
- } catch (XMLStreamException e) {
- throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e);
- }
- }
-
- public XMLStreamReader readHeader() throws XMLStreamException {
- return infoset.readAsXMLStreamReader();
- }
-
- public void writeTo(XMLStreamWriter w) throws XMLStreamException {
- infoset.writeToXMLStreamWriter(w,true);
- }
-
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- try {
- SOAPHeader header = saaj.getSOAPHeader();
- if (header == null)
- header = saaj.getSOAPPart().getEnvelope().addHeader();
- infoset.writeTo(header);
- } catch (XMLStreamBufferException e) {
- throw new SOAPException(e);
- }
- }
-
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
- infoset.writeTo(contentHandler,errorHandler);
- }
-
-
- /**
- * Keep the information about an attribute on the header element.
- */
- static final class Attribute {
- /**
- * Can be empty but never null.
- */
- final String nsUri;
- final String localName;
- final String value;
-
- public Attribute(String nsUri, String localName, String value) {
- this.nsUri = fixNull(nsUri);
- this.localName = localName;
- this.value = value;
- }
-
- /**
- * Convert null to "".
- */
- private static String fixNull(String s) {
- if(s==null) return "";
- else return s;
- }
- }
-
- /**
- * We the performance paranoid people in the JAX-WS RI thinks
- * saving three bytes is worth while...
- */
- private static final String TRUE_VALUE = "1";
- private static final String IS_REFERENCE_PARAMETER = "IsReferenceParameter";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/PayloadStreamReaderMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/PayloadStreamReaderMessage.java
deleted file mode 100644
index 7e025be7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/PayloadStreamReaderMessage.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.message.stream;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.message.AbstractMessageImpl;
-import com.sun.xml.internal.ws.message.AttachmentSetImpl;
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.NotNull;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Source;
-
-/**
- * {@link Message} backed by {@link XMLStreamReader} as payload
- *
- * @author Jitendra Kotamraju
- */
-public class PayloadStreamReaderMessage extends AbstractMessageImpl {
- private final StreamMessage message;
-
- public PayloadStreamReaderMessage(XMLStreamReader reader, SOAPVersion soapVer) {
- this(null, reader,new AttachmentSetImpl(), soapVer);
- }
-
- public PayloadStreamReaderMessage(@Nullable MessageHeaders headers, @NotNull XMLStreamReader reader,
- @NotNull AttachmentSet attSet, @NotNull SOAPVersion soapVersion) {
- super(soapVersion);
- message = new StreamMessage(headers, attSet, reader, soapVersion);
- }
-
- public boolean hasHeaders() {
- return message.hasHeaders();
- }
-
- public AttachmentSet getAttachments() {
- return message.getAttachments();
- }
-
- public String getPayloadLocalPart() {
- return message.getPayloadLocalPart();
- }
-
- public String getPayloadNamespaceURI() {
- return message.getPayloadNamespaceURI();
- }
-
- public boolean hasPayload() {
- return true;
- }
-
- public Source readPayloadAsSource() {
- return message.readPayloadAsSource();
- }
-
- public XMLStreamReader readPayload() throws XMLStreamException {
- return message.readPayload();
- }
-
- public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
- message.writePayloadTo(sw);
- }
-
- public <T> T readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
- return (T) message.readPayloadAsJAXB(unmarshaller);
- }
-
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
- message.writeTo(contentHandler, errorHandler);
- }
-
- protected void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
- message.writePayloadTo(contentHandler, errorHandler, fragment);
- }
-
- public Message copy() {
- return message.copy();
- }
-
- @Override
- public @NotNull MessageHeaders getHeaders() {
- return message.getHeaders();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamAttachment.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamAttachment.java
deleted file mode 100644
index dda1f187..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamAttachment.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message.stream;
-
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.util.ByteArrayDataSource;
-import com.sun.xml.internal.ws.util.ByteArrayBuffer;
-import com.sun.xml.internal.ws.encoding.DataSourceStreamingDataHandler;
-
-import javax.activation.DataHandler;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.soap.AttachmentPart;
-import javax.xml.soap.SOAPException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.IOException;
-import java.io.ByteArrayInputStream;
-
-import com.sun.xml.internal.org.jvnet.staxex.Base64Data;
-
-/**
- * Attachment created from raw bytes.
- *
- * @author Vivek Pandey
- */
-public class StreamAttachment implements Attachment {
- private final String contentId;
- private final String contentType;
- private final ByteArrayBuffer byteArrayBuffer;
- private final byte[] data;
- private final int len;
-
- public StreamAttachment(ByteArrayBuffer buffer, String contentId, String contentType) {
- this.contentId = contentId;
- this.contentType = contentType;
- this.byteArrayBuffer = buffer;
- this.data = byteArrayBuffer.getRawData();
- this.len = byteArrayBuffer.size();
- }
-
- public String getContentId() {
- return contentId;
- }
-
- public String getContentType() {
- return contentType;
- }
-
-
- public byte[] asByteArray() {
- //we got to reallocate and give the exact byte[]
- return byteArrayBuffer.toByteArray();
- }
-
- public DataHandler asDataHandler() {
- return new DataSourceStreamingDataHandler(new ByteArrayDataSource(data,0,len,getContentType()));
- }
-
- public Source asSource() {
- return new StreamSource(new ByteArrayInputStream(data,0,len));
- }
-
- public InputStream asInputStream() {
- return byteArrayBuffer.newInputStream();
- }
-
- public Base64Data asBase64Data(){
- Base64Data base64Data = new Base64Data();
- base64Data.set(data, len, contentType);
- return base64Data;
- }
-
- public void writeTo(OutputStream os) throws IOException {
- byteArrayBuffer.writeTo(os);
- }
-
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- AttachmentPart part = saaj.createAttachmentPart();
- part.setRawContentBytes(data,0,len,getContentType());
- part.setContentId(contentId);
- saaj.addAttachmentPart(part);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader.java
deleted file mode 100644
index 6415f131..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.message.stream;
-
-import com.sun.istack.internal.FinalArrayList;
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferSource;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.message.AbstractHeaderImpl;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMResult;
-import java.util.List;
-import java.util.Set;
-
-/**
- * {@link Header} whose physical data representation is an XMLStreamBuffer.
- *
- * @author Paul.Sandoz@Sun.Com
- */
-public abstract class StreamHeader extends AbstractHeaderImpl {
- protected final XMLStreamBuffer _mark;
-
- protected boolean _isMustUnderstand;
-
- /**
- * Role or actor value.
- */
- protected @NotNull String _role;
-
- protected boolean _isRelay;
-
- protected String _localName;
-
- protected String _namespaceURI;
-
- /**
- * Keep the information about an attribute on the header element.
- *
- * TODO: this whole attribute handling could be done better, I think.
- */
- protected static final class Attribute {
- /**
- * Can be empty but never null.
- */
- final String nsUri;
- final String localName;
- final String value;
-
- public Attribute(String nsUri, String localName, String value) {
- this.nsUri = fixNull(nsUri);
- this.localName = localName;
- this.value = value;
- }
- }
-
- /**
- * The attributes on the header element.
- * We expect there to be only a small number of them,
- * so the use of {@link List} would be justified.
- *
- * Null if no attribute is present.
- */
- private final FinalArrayList<Attribute> attributes;
-
- /**
- * Creates a {@link StreamHeader}.
- *
- * @param reader
- * The parser pointing at the start of the mark.
- * Technically this information is redundant,
- * but it achieves a better performance.
- * @param mark
- * The start of the buffered header content.
- */
- protected StreamHeader(XMLStreamReader reader, XMLStreamBuffer mark) {
- assert reader!=null && mark!=null;
- _mark = mark;
- _localName = reader.getLocalName();
- _namespaceURI = reader.getNamespaceURI();
- attributes = processHeaderAttributes(reader);
- }
-
- /**
- * Creates a {@link StreamHeader}.
- *
- * @param reader
- * The parser that points to the start tag of the header.
- * By the end of this method, the parser will point at
- * the end tag of this element.
- */
- protected StreamHeader(XMLStreamReader reader) throws XMLStreamException {
- _localName = reader.getLocalName();
- _namespaceURI = reader.getNamespaceURI();
- attributes = processHeaderAttributes(reader);
- // cache the body
- _mark = XMLStreamBuffer.createNewBufferFromXMLStreamReader(reader);
- }
-
- public final boolean isIgnorable(@NotNull SOAPVersion soapVersion, @NotNull Set<String> roles) {
- // check mustUnderstand
- if(!_isMustUnderstand) return true;
-
- if (roles == null)
- return true;
-
- // now role
- return !roles.contains(_role);
- }
-
- public @NotNull String getRole(@NotNull SOAPVersion soapVersion) {
- assert _role!=null;
- return _role;
- }
-
- public boolean isRelay() {
- return _isRelay;
- }
-
- public @NotNull String getNamespaceURI() {
- return _namespaceURI;
- }
-
- public @NotNull String getLocalPart() {
- return _localName;
- }
-
- public String getAttribute(String nsUri, String localName) {
- if(attributes!=null) {
- for(int i=attributes.size()-1; i>=0; i-- ) {
- Attribute a = attributes.get(i);
- if(a.localName.equals(localName) && a.nsUri.equals(nsUri))
- return a.value;
- }
- }
- return null;
- }
-
- /**
- * Reads the header as a {@link XMLStreamReader}
- */
- public XMLStreamReader readHeader() throws XMLStreamException {
- return _mark.readAsXMLStreamReader();
- }
-
- public void writeTo(XMLStreamWriter w) throws XMLStreamException {
- if(_mark.getInscopeNamespaces().size() > 0)
- _mark.writeToXMLStreamWriter(w,true);
- else
- _mark.writeToXMLStreamWriter(w);
- }
-
- public void writeTo(SOAPMessage saaj) throws SOAPException {
- try {
- // TODO what about in-scope namespaces
- // Not very efficient consider implementing a stream buffer
- // processor that produces a DOM node from the buffer.
- TransformerFactory tf = XmlUtil.newTransformerFactory();
- Transformer t = tf.newTransformer();
- XMLStreamBufferSource source = new XMLStreamBufferSource(_mark);
- DOMResult result = new DOMResult();
- t.transform(source, result);
- Node d = result.getNode();
- if(d.getNodeType() == Node.DOCUMENT_NODE)
- d = d.getFirstChild();
- SOAPHeader header = saaj.getSOAPHeader();
- if(header == null)
- header = saaj.getSOAPPart().getEnvelope().addHeader();
- Node node = header.getOwnerDocument().importNode(d, true);
- header.appendChild(node);
- } catch (Exception e) {
- throw new SOAPException(e);
- }
- }
-
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
- _mark.writeTo(contentHandler);
- }
-
- /**
- * Creates an EPR without copying infoset.
- *
- * This is the most common implementation on which {@link Header#readAsEPR(AddressingVersion)}
- * is invoked on.
- */
- @Override @NotNull
- public WSEndpointReference readAsEPR(AddressingVersion expected) throws XMLStreamException {
- return new WSEndpointReference(_mark,expected);
- }
-
- protected abstract FinalArrayList<Attribute> processHeaderAttributes(XMLStreamReader reader);
-
- /**
- * Convert null to "".
- */
- private static String fixNull(String s) {
- if(s==null) return "";
- else return s;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader11.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader11.java
deleted file mode 100644
index 1c815041..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader11.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message.stream;
-
-import com.sun.istack.internal.FinalArrayList;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.ws.message.Util;
-
-import javax.xml.soap.SOAPConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * {@link StreamHeader} for SOAP 1.1.
- *
- * @author Paul.Sandoz@Sun.Com
- */
-@SuppressWarnings({"StringEquality"})
-public class StreamHeader11 extends StreamHeader {
- protected static final String SOAP_1_1_MUST_UNDERSTAND = "mustUnderstand";
-
- protected static final String SOAP_1_1_ROLE = "actor";
-
- public StreamHeader11(XMLStreamReader reader, XMLStreamBuffer mark) {
- super(reader, mark);
- }
-
- public StreamHeader11(XMLStreamReader reader) throws XMLStreamException {
- super(reader);
- }
-
- protected final FinalArrayList<Attribute> processHeaderAttributes(XMLStreamReader reader) {
- FinalArrayList<Attribute> atts = null;
-
- _role = SOAPConstants.URI_SOAP_ACTOR_NEXT;
-
- for (int i = 0; i < reader.getAttributeCount(); i++) {
- final String localName = reader.getAttributeLocalName(i);
- final String namespaceURI = reader.getAttributeNamespace(i);
- final String value = reader.getAttributeValue(i);
-
- if (SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE.equals(namespaceURI)) {
- if (SOAP_1_1_MUST_UNDERSTAND.equals(localName)) {
- _isMustUnderstand = Util.parseBool(value);
- } else if (SOAP_1_1_ROLE.equals(localName)) {
- if (value != null && value.length() > 0) {
- _role = value;
- }
- }
- }
-
- if(atts==null) {
- atts = new FinalArrayList<Attribute>();
- }
- atts.add(new Attribute(namespaceURI,localName,value));
- }
-
- return atts;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader12.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader12.java
deleted file mode 100644
index 1546da09..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader12.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.message.stream;
-
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.ws.message.Util;
-import com.sun.istack.internal.FinalArrayList;
-
-import javax.xml.soap.SOAPConstants;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamException;
-
-/**
- * {@link StreamHeader} for SOAP 1.2.
- *
- * @author Paul.Sandoz@Sun.Com
- */
-@SuppressWarnings({"StringEquality"})
-public class StreamHeader12 extends StreamHeader {
- protected static final String SOAP_1_2_MUST_UNDERSTAND = "mustUnderstand";
-
- protected static final String SOAP_1_2_ROLE = "role";
-
- protected static final String SOAP_1_2_RELAY = "relay";
-
- public StreamHeader12(XMLStreamReader reader, XMLStreamBuffer mark) {
- super(reader, mark);
- }
-
- public StreamHeader12(XMLStreamReader reader) throws XMLStreamException {
- super(reader);
- }
-
- protected final FinalArrayList<Attribute> processHeaderAttributes(XMLStreamReader reader) {
- FinalArrayList<Attribute> atts = null;
-
- _role = SOAPConstants.URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER;
-
- for (int i = 0; i < reader.getAttributeCount(); i++) {
- final String localName = reader.getAttributeLocalName(i);
- final String namespaceURI = reader.getAttributeNamespace(i);
- final String value = reader.getAttributeValue(i);
-
- if (SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE.equals(namespaceURI)) {
- if (SOAP_1_2_MUST_UNDERSTAND.equals(localName)) {
- _isMustUnderstand = Util.parseBool(value);
- } else if (SOAP_1_2_ROLE.equals(localName)) {
- if (value != null && value.length() > 0) {
- _role = value;
- }
- } else if (SOAP_1_2_RELAY.equals(localName)) {
- _isRelay = Util.parseBool(value);
- }
- }
-
- if(atts==null) {
- atts = new FinalArrayList<Attribute>();
- }
- atts.add(new Attribute(namespaceURI,localName,value));
- }
-
- return atts;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamMessage.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamMessage.java
deleted file mode 100644
index 244471d1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamMessage.java
+++ /dev/null
@@ -1,766 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.message.stream;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.XMLStreamReaderToContentHandler;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferMark;
-import com.sun.xml.internal.stream.buffer.stax.StreamReaderBufferCreator;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.HeaderList;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.api.message.StreamingSOAP;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.encoding.TagInfoset;
-import com.sun.xml.internal.ws.message.AbstractMessageImpl;
-import com.sun.xml.internal.ws.message.AttachmentUnmarshallerImpl;
-import com.sun.xml.internal.ws.protocol.soap.VersionMismatchException;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.util.xml.DummyLocation;
-import com.sun.xml.internal.ws.util.xml.StAXSource;
-import com.sun.xml.internal.ws.util.xml.XMLReaderComposite;
-import com.sun.xml.internal.ws.util.xml.XMLStreamReaderToXMLStreamWriter;
-import com.sun.xml.internal.ws.util.xml.XMLReaderComposite.ElemInfo;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.NamespaceSupport;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.stream.*;
-
-import static javax.xml.stream.XMLStreamConstants.START_DOCUMENT;
-import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
-import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
-import javax.xml.transform.Source;
-import javax.xml.ws.WebServiceException;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * {@link Message} implementation backed by {@link XMLStreamReader}.
- *
- * TODO: we need another message class that keeps {@link XMLStreamReader} that points
- * at the start of the envelope element.
- */
-public class StreamMessage extends AbstractMessageImpl implements StreamingSOAP {
- /**
- * The reader will be positioned at
- * the first child of the SOAP body
- */
- private @NotNull XMLStreamReader reader;
-
- // lazily created
- private @Nullable MessageHeaders headers;
-
- /**
- * Because the StreamMessage leaves out the white spaces around payload
- * when being instantiated the space characters between soap:Body opening and
- * payload is stored in this field to be reused later (necessary for message security);
- * Instantiated after StreamMessage creation
- */
- private String bodyPrologue = null;
-
- /**
- * instantiated after writing message to XMLStreamWriter
- */
- private String bodyEpilogue = null;
-
- private String payloadLocalName;
-
- private String payloadNamespaceURI;
-
- /**
- * Used only for debugging. This records where the message was consumed.
- */
- private Throwable consumedAt;
-
- private XMLStreamReader envelopeReader;
-
- public StreamMessage(SOAPVersion v) {
- super(v);
- payloadLocalName = null;
- payloadNamespaceURI = null;
- }
-
- public StreamMessage(SOAPVersion v, @NotNull XMLStreamReader envelope, @NotNull AttachmentSet attachments) {
- super(v);
- envelopeReader = envelope;
- attachmentSet = attachments;
- }
-
- public XMLStreamReader readEnvelope() {
- if (envelopeReader == null) {
- List<XMLStreamReader> hReaders = new java.util.ArrayList<XMLStreamReader>();
- ElemInfo envElem = new ElemInfo(envelopeTag, null);
- ElemInfo hdrElem = (headerTag != null) ? new ElemInfo(headerTag, envElem) : null;
- ElemInfo bdyElem = new ElemInfo(bodyTag, envElem);
- for (Header h : getHeaders().asList()) {
- try {
- hReaders.add(h.readHeader());
- } catch (XMLStreamException e) {
- throw new RuntimeException(e);
- }
- }
- XMLStreamReader soapHeader = (hdrElem != null) ? new XMLReaderComposite(hdrElem, hReaders.toArray(new XMLStreamReader[hReaders.size()])) : null;
- XMLStreamReader[] payload = {readPayload()};
- XMLStreamReader soapBody = new XMLReaderComposite(bdyElem, payload);
- XMLStreamReader[] soapContent = (soapHeader != null) ? new XMLStreamReader[]{soapHeader, soapBody} : new XMLStreamReader[]{soapBody};
- return new XMLReaderComposite(envElem, soapContent);
- }
- return envelopeReader;
- }
-
- /**
- * Creates a {@link StreamMessage} from a {@link XMLStreamReader}
- * that points at the start element of the payload, and headers.
- *
- * <p>
- * This method creates a {@link Message} from a payload.
- *
- * @param headers
- * if null, it means no headers. if non-null,
- * it will be owned by this message.
- * @param reader
- * points at the start element/document of the payload (or the end element of the &lt;s:Body>
- * if there's no payload)
- */
- public StreamMessage(@Nullable MessageHeaders headers, @NotNull AttachmentSet attachmentSet, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) {
- super(soapVersion);
- init(headers, attachmentSet, reader, soapVersion);
- }
-
- private void init(@Nullable MessageHeaders headers, @NotNull AttachmentSet attachmentSet, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) {
- this.headers = headers;
- this.attachmentSet = attachmentSet;
- this.reader = reader;
-
- if(reader.getEventType()== START_DOCUMENT)
- XMLStreamReaderUtil.nextElementContent(reader);
-
- //if the reader is pointing to the end element </soapenv:Body> then its empty message
- // or no payload
- if(reader.getEventType() == XMLStreamConstants.END_ELEMENT){
- String body = reader.getLocalName();
- String nsUri = reader.getNamespaceURI();
- assert body != null;
- assert nsUri != null;
- //if its not soapenv:Body then throw exception, we received malformed stream
- if(body.equals("Body") && nsUri.equals(soapVersion.nsUri)){
- this.payloadLocalName = null;
- this.payloadNamespaceURI = null;
- }else{ //TODO: i18n and also we should be throwing better message that this
- throw new WebServiceException("Malformed stream: {"+nsUri+"}"+body);
- }
- }else{
- this.payloadLocalName = reader.getLocalName();
- this.payloadNamespaceURI = reader.getNamespaceURI();
- }
-
- // use the default infoset representation for headers
- int base = soapVersion.ordinal()*3;
- this.envelopeTag = DEFAULT_TAGS.get(base);
- this.headerTag = DEFAULT_TAGS.get(base+1);
- this.bodyTag = DEFAULT_TAGS.get(base+2);
- }
-
- /**
- * Creates a {@link StreamMessage} from a {@link XMLStreamReader}
- * and the complete infoset of the SOAP envelope.
- *
- * <p>
- * See {@link #StreamMessage(MessageHeaders, AttachmentSet, XMLStreamReader, SOAPVersion)} for
- * the description of the basic parameters.
- *
- * @param headerTag
- * Null if the message didn't have a header tag.
- *
- */
- public StreamMessage(@NotNull TagInfoset envelopeTag, @Nullable TagInfoset headerTag, @NotNull AttachmentSet attachmentSet, @Nullable MessageHeaders headers, @NotNull TagInfoset bodyTag, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) {
- this(envelopeTag, headerTag, attachmentSet, headers, null, bodyTag, null, reader, soapVersion);
- }
-
- public StreamMessage(@NotNull TagInfoset envelopeTag, @Nullable TagInfoset headerTag, @NotNull AttachmentSet attachmentSet, @Nullable MessageHeaders headers, @Nullable String bodyPrologue, @NotNull TagInfoset bodyTag, @Nullable String bodyEpilogue, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) {
- super(soapVersion);
- init(envelopeTag, headerTag, attachmentSet, headers, bodyPrologue, bodyTag, bodyEpilogue, reader, soapVersion);
- }
-
- private void init(@NotNull TagInfoset envelopeTag, @Nullable TagInfoset headerTag, @NotNull AttachmentSet attachmentSet, @Nullable MessageHeaders headers, @Nullable String bodyPrologue, @NotNull TagInfoset bodyTag, @Nullable String bodyEpilogue, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) {
- init(headers,attachmentSet,reader,soapVersion);
- if(envelopeTag == null ) {
- throw new IllegalArgumentException("EnvelopeTag TagInfoset cannot be null");
- }
- if(bodyTag == null ) {
- throw new IllegalArgumentException("BodyTag TagInfoset cannot be null");
- }
- this.envelopeTag = envelopeTag;
- this.headerTag = headerTag;
- this.bodyTag = bodyTag;
- this.bodyPrologue = bodyPrologue;
- this.bodyEpilogue = bodyEpilogue;
- }
-
- public boolean hasHeaders() {
- if ( envelopeReader != null ) readEnvelope(this);
- return headers!=null && headers.hasHeaders();
- }
-
- public MessageHeaders getHeaders() {
- if ( envelopeReader != null ) readEnvelope(this);
- if (headers == null) {
- headers = new HeaderList(getSOAPVersion());
- }
- return headers;
- }
-
- public String getPayloadLocalPart() {
- if ( envelopeReader != null ) readEnvelope(this);
- return payloadLocalName;
- }
-
- public String getPayloadNamespaceURI() {
- if ( envelopeReader != null ) readEnvelope(this);
- return payloadNamespaceURI;
- }
-
- public boolean hasPayload() {
- if ( envelopeReader != null ) readEnvelope(this);
- return payloadLocalName!=null;
- }
-
- public Source readPayloadAsSource() {
- if(hasPayload()) {
- assert unconsumed();
- return new StAXSource(reader, true, getInscopeNamespaces());
- } else
- return null;
- }
-
- /**
- * There is no way to enumerate inscope namespaces for XMLStreamReader. That means
- * namespaces declared in envelope, and body tags need to be computed using their
- * {@link TagInfoset}s.
- *
- * @return array of the even length of the form { prefix0, uri0, prefix1, uri1, ... }
- */
- private String[] getInscopeNamespaces() {
- NamespaceSupport nss = new NamespaceSupport();
-
- nss.pushContext();
- for(int i=0; i < envelopeTag.ns.length; i+=2) {
- nss.declarePrefix(envelopeTag.ns[i], envelopeTag.ns[i+1]);
- }
-
- nss.pushContext();
- for(int i=0; i < bodyTag.ns.length; i+=2) {
- nss.declarePrefix(bodyTag.ns[i], bodyTag.ns[i+1]);
- }
-
- List<String> inscope = new ArrayList<String>();
- for( Enumeration en = nss.getPrefixes(); en.hasMoreElements(); ) {
- String prefix = (String)en.nextElement();
- inscope.add(prefix);
- inscope.add(nss.getURI(prefix));
- }
- return inscope.toArray(new String[inscope.size()]);
- }
-
- public Object readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException {
- if(!hasPayload())
- return null;
- assert unconsumed();
- // TODO: How can the unmarshaller process this as a fragment?
- if(hasAttachments())
- unmarshaller.setAttachmentUnmarshaller(new AttachmentUnmarshallerImpl(getAttachments()));
- try {
- return unmarshaller.unmarshal(reader);
- } finally{
- unmarshaller.setAttachmentUnmarshaller(null);
- XMLStreamReaderUtil.readRest(reader);
- XMLStreamReaderUtil.close(reader);
- XMLStreamReaderFactory.recycle(reader);
- }
- }
- /** @deprecated */
- public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
- if(!hasPayload())
- return null;
- assert unconsumed();
- T r = bridge.unmarshal(reader,
- hasAttachments() ? new AttachmentUnmarshallerImpl(getAttachments()) : null);
- XMLStreamReaderUtil.readRest(reader);
- XMLStreamReaderUtil.close(reader);
- XMLStreamReaderFactory.recycle(reader);
- return r;
- }
-
- public <T> T readPayloadAsJAXB(XMLBridge<T> bridge) throws JAXBException {
- if(!hasPayload())
- return null;
- assert unconsumed();
- T r = bridge.unmarshal(reader,
- hasAttachments() ? new AttachmentUnmarshallerImpl(getAttachments()) : null);
- XMLStreamReaderUtil.readRest(reader);
- XMLStreamReaderUtil.close(reader);
- XMLStreamReaderFactory.recycle(reader);
- return r;
- }
-
- @Override
- public void consume() {
- assert unconsumed();
- XMLStreamReaderUtil.readRest(reader);
- XMLStreamReaderUtil.close(reader);
- XMLStreamReaderFactory.recycle(reader);
- }
-
- public XMLStreamReader readPayload() {
- if(!hasPayload())
- return null;
- // TODO: What about access at and beyond </soap:Body>
- assert unconsumed();
- return this.reader;
- }
-
- public void writePayloadTo(XMLStreamWriter writer)throws XMLStreamException {
- if ( envelopeReader != null ) readEnvelope(this);
- assert unconsumed();
-
- if(payloadLocalName==null) {
- return; // no body
- }
-
- if (bodyPrologue != null) {
- writer.writeCharacters(bodyPrologue);
- }
-
- XMLStreamReaderToXMLStreamWriter conv = new XMLStreamReaderToXMLStreamWriter();
-
- while(reader.getEventType() != XMLStreamConstants.END_DOCUMENT){
- String name = reader.getLocalName();
- String nsUri = reader.getNamespaceURI();
-
- // After previous conv.bridge() call the cursor will be at END_ELEMENT.
- // Check if its not soapenv:Body then move to next ELEMENT
- if(reader.getEventType() == XMLStreamConstants.END_ELEMENT){
-
- if (!isBodyElement(name, nsUri)){
- // closing payload element: store epilogue for further signing, if applicable
- // however if there more than one payloads exist - the last one is stored
- String whiteSpaces = XMLStreamReaderUtil.nextWhiteSpaceContent(reader);
- if (whiteSpaces != null) {
- this.bodyEpilogue = whiteSpaces;
- // write it to the message too
- writer.writeCharacters(whiteSpaces);
- }
- } else {
- // body closed > exit
- break;
- }
-
- } else {
- // payload opening element: copy payload to writer
- conv.bridge(reader,writer);
- }
- }
-
- XMLStreamReaderUtil.readRest(reader);
- XMLStreamReaderUtil.close(reader);
- XMLStreamReaderFactory.recycle(reader);
- }
-
- private boolean isBodyElement(String name, String nsUri) {
- return name.equals("Body") && nsUri.equals(soapVersion.nsUri);
- }
-
- public void writeTo(XMLStreamWriter sw) throws XMLStreamException{
- if ( envelopeReader != null ) readEnvelope(this);
- writeEnvelope(sw);
- }
-
- /**
- * This method should be called when the StreamMessage is created with a payload
- * @param writer
- */
- private void writeEnvelope(XMLStreamWriter writer) throws XMLStreamException {
- if ( envelopeReader != null ) readEnvelope(this);
- writer.writeStartDocument();
- envelopeTag.writeStart(writer);
-
- //write headers
- MessageHeaders hl = getHeaders();
- if (hl.hasHeaders() && headerTag == null) headerTag = new TagInfoset(envelopeTag.nsUri,"Header",envelopeTag.prefix,EMPTY_ATTS);
- if (headerTag != null) {
- headerTag.writeStart(writer);
- if (hl.hasHeaders()){
- for(Header h : hl.asList()){
- h.writeTo(writer);
- }
- }
- writer.writeEndElement();
- }
- bodyTag.writeStart(writer);
- if(hasPayload())
- writePayloadTo(writer);
- writer.writeEndElement();
- writer.writeEndElement();
- writer.writeEndDocument();
- }
-
- public void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException {
- if ( envelopeReader != null ) readEnvelope(this);
- assert unconsumed();
-
- try {
- if(payloadLocalName==null)
- return; // no body
-
- if (bodyPrologue != null) {
- char[] chars = bodyPrologue.toCharArray();
- contentHandler.characters(chars, 0, chars.length);
- }
-
- XMLStreamReaderToContentHandler conv = new XMLStreamReaderToContentHandler(reader,contentHandler,true,fragment,getInscopeNamespaces());
-
- while(reader.getEventType() != XMLStreamConstants.END_DOCUMENT){
- String name = reader.getLocalName();
- String nsUri = reader.getNamespaceURI();
-
- // After previous conv.bridge() call the cursor will be at END_ELEMENT.
- // Check if its not soapenv:Body then move to next ELEMENT
- if(reader.getEventType() == XMLStreamConstants.END_ELEMENT){
-
- if (!isBodyElement(name, nsUri)){
- // closing payload element: store epilogue for further signing, if applicable
- // however if there more than one payloads exist - the last one is stored
- String whiteSpaces = XMLStreamReaderUtil.nextWhiteSpaceContent(reader);
- if (whiteSpaces != null) {
- this.bodyEpilogue = whiteSpaces;
- // write it to the message too
- char[] chars = whiteSpaces.toCharArray();
- contentHandler.characters(chars, 0, chars.length);
- }
- } else {
- // body closed > exit
- break;
- }
-
- } else {
- // payload opening element: copy payload to writer
- conv.bridge();
- }
- }
- XMLStreamReaderUtil.readRest(reader);
- XMLStreamReaderUtil.close(reader);
- XMLStreamReaderFactory.recycle(reader);
- } catch (XMLStreamException e) {
- Location loc = e.getLocation();
- if(loc==null) loc = DummyLocation.INSTANCE;
-
- SAXParseException x = new SAXParseException(
- e.getMessage(),loc.getPublicId(),loc.getSystemId(),loc.getLineNumber(),loc.getColumnNumber(),e);
- errorHandler.error(x);
- }
- }
-
- // TODO: this method should be probably rewritten to respect spaces between elements; is it used at all?
- @Override
- public Message copy() {
- if ( envelopeReader != null ) readEnvelope(this);
- try {
- assert unconsumed();
- consumedAt = null; // but we don't want to mark it as consumed
- MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer();
- StreamReaderBufferCreator c = new StreamReaderBufferCreator(xsb);
-
- // preserving inscope namespaces from envelope, and body. Other option
- // would be to create a filtering XMLStreamReader from reader+envelopeTag+bodyTag
- c.storeElement(envelopeTag.nsUri, envelopeTag.localName, envelopeTag.prefix, envelopeTag.ns);
- c.storeElement(bodyTag.nsUri, bodyTag.localName, bodyTag.prefix, bodyTag.ns);
-
- if (hasPayload()) {
- // Loop all the way for multi payload case
- while(reader.getEventType() != XMLStreamConstants.END_DOCUMENT){
- String name = reader.getLocalName();
- String nsUri = reader.getNamespaceURI();
- if(isBodyElement(name, nsUri) || (reader.getEventType() == XMLStreamConstants.END_DOCUMENT))
- break;
- c.create(reader);
-
- // Skip whitespaces in between payload and </Body> or between elements
- // those won't be in the message itself, but we store them in field bodyEpilogue
- if (reader.isWhiteSpace()) {
- bodyEpilogue = XMLStreamReaderUtil.currentWhiteSpaceContent(reader);
- } else {
- // clear it in case the existing was not the last one
- // (we are interested only in the last one?)
- bodyEpilogue = null;
- }
- }
- }
- c.storeEndElement(); // create structure element for </Body>
- c.storeEndElement(); // create structure element for </Envelope>
- c.storeEndElement(); // create structure element for END_DOCUMENT
-
- XMLStreamReaderUtil.readRest(reader);
- XMLStreamReaderUtil.close(reader);
- XMLStreamReaderFactory.recycle(reader);
-
- reader = xsb.readAsXMLStreamReader();
- XMLStreamReader clone = xsb.readAsXMLStreamReader();
-
- // advance to the start tag of the <Body> first child element
- proceedToRootElement(reader);
- proceedToRootElement(clone);
-
- return new StreamMessage(envelopeTag, headerTag, attachmentSet, HeaderList.copy(headers), bodyPrologue, bodyTag, bodyEpilogue, clone, soapVersion);
- } catch (XMLStreamException e) {
- throw new WebServiceException("Failed to copy a message",e);
- }
- }
-
- private void proceedToRootElement(XMLStreamReader xsr) throws XMLStreamException {
- assert xsr.getEventType()==START_DOCUMENT;
- xsr.nextTag();
- xsr.nextTag();
- xsr.nextTag();
- assert xsr.getEventType()==START_ELEMENT || xsr.getEventType()==END_ELEMENT;
- }
-
- public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler ) throws SAXException {
- if ( envelopeReader != null ) readEnvelope(this);
- contentHandler.setDocumentLocator(NULL_LOCATOR);
- contentHandler.startDocument();
- envelopeTag.writeStart(contentHandler);
- if (hasHeaders() && headerTag == null) headerTag = new TagInfoset(envelopeTag.nsUri,"Header",envelopeTag.prefix,EMPTY_ATTS);
- if (headerTag != null) {
- headerTag.writeStart(contentHandler);
- if (hasHeaders()) {
- MessageHeaders headers = getHeaders();
- for (Header h : headers.asList()) {
- // shouldn't JDK be smart enough to use array-style indexing for this foreach!?
- h.writeTo(contentHandler,errorHandler);
- }
- }
- headerTag.writeEnd(contentHandler);
- }
- bodyTag.writeStart(contentHandler);
- writePayloadTo(contentHandler,errorHandler, true);
- bodyTag.writeEnd(contentHandler);
- envelopeTag.writeEnd(contentHandler);
- contentHandler.endDocument();
- }
-
- /**
- * Used for an assertion. Returns true when the message is unconsumed,
- * or otherwise throw an exception.
- *
- * <p>
- * Calling this method also marks the stream as 'consumed'
- */
- private boolean unconsumed() {
- if(payloadLocalName==null)
- return true; // no payload. can be consumed multiple times.
-
- if(reader.getEventType()!=XMLStreamReader.START_ELEMENT) {
- AssertionError error = new AssertionError("StreamMessage has been already consumed. See the nested exception for where it's consumed");
- error.initCause(consumedAt);
- throw error;
- }
- consumedAt = new Exception().fillInStackTrace();
- return true;
- }
-
- public String getBodyPrologue() {
- if ( envelopeReader != null ) readEnvelope(this);
- return bodyPrologue;
- }
-
- public String getBodyEpilogue() {
- if ( envelopeReader != null ) readEnvelope(this);
- return bodyEpilogue;
- }
-
- public XMLStreamReader getReader() {
- if ( envelopeReader != null ) readEnvelope(this);
- assert unconsumed();
- return reader;
- }
-
-
- private static final String SOAP_ENVELOPE = "Envelope";
- private static final String SOAP_HEADER = "Header";
- private static final String SOAP_BODY = "Body";
-
- protected interface StreamHeaderDecoder {
- public Header decodeHeader(XMLStreamReader reader, XMLStreamBuffer mark);
- }
-
- static final StreamHeaderDecoder SOAP12StreamHeaderDecoder = new StreamHeaderDecoder() {
- @Override
- public Header decodeHeader(XMLStreamReader reader, XMLStreamBuffer mark) {
- return new StreamHeader12(reader, mark);
- }
- };
-
- static final StreamHeaderDecoder SOAP11StreamHeaderDecoder = new StreamHeaderDecoder() {
- @Override
- public Header decodeHeader(XMLStreamReader reader, XMLStreamBuffer mark) {
- return new StreamHeader11(reader, mark);
- }
- };
-
- static private void readEnvelope(StreamMessage message) {
- if ( message.envelopeReader == null ) return;
- XMLStreamReader reader = message.envelopeReader;
- message.envelopeReader = null;
- SOAPVersion soapVersion = message.soapVersion;
- // Move to soap:Envelope and verify
- if(reader.getEventType()!=XMLStreamConstants.START_ELEMENT)
- XMLStreamReaderUtil.nextElementContent(reader);
- XMLStreamReaderUtil.verifyReaderState(reader,XMLStreamConstants.START_ELEMENT);
- if (SOAP_ENVELOPE.equals(reader.getLocalName()) && !soapVersion.nsUri.equals(reader.getNamespaceURI())) {
- throw new VersionMismatchException(soapVersion, soapVersion.nsUri, reader.getNamespaceURI());
- }
- XMLStreamReaderUtil.verifyTag(reader, soapVersion.nsUri, SOAP_ENVELOPE);
-
- TagInfoset envelopeTag = new TagInfoset(reader);
-
- // Collect namespaces on soap:Envelope
- Map<String,String> namespaces = new HashMap<String,String>();
- for(int i=0; i< reader.getNamespaceCount();i++){
- namespaces.put(reader.getNamespacePrefix(i), reader.getNamespaceURI(i));
- }
-
- // Move to next element
- XMLStreamReaderUtil.nextElementContent(reader);
- XMLStreamReaderUtil.verifyReaderState(reader,
- javax.xml.stream.XMLStreamConstants.START_ELEMENT);
-
- HeaderList headers = null;
- TagInfoset headerTag = null;
-
- if (reader.getLocalName().equals(SOAP_HEADER)
- && reader.getNamespaceURI().equals(soapVersion.nsUri)) {
- headerTag = new TagInfoset(reader);
-
- // Collect namespaces on soap:Header
- for(int i=0; i< reader.getNamespaceCount();i++){
- namespaces.put(reader.getNamespacePrefix(i), reader.getNamespaceURI(i));
- }
- // skip <soap:Header>
- XMLStreamReaderUtil.nextElementContent(reader);
-
- // If SOAP header blocks are present (i.e. not <soap:Header/>)
- if (reader.getEventType() == XMLStreamConstants.START_ELEMENT) {
- headers = new HeaderList(soapVersion);
-
- try {
- // Cache SOAP header blocks
- StreamHeaderDecoder headerDecoder = SOAPVersion.SOAP_11.equals(soapVersion) ? SOAP11StreamHeaderDecoder : SOAP12StreamHeaderDecoder;
- cacheHeaders(reader, namespaces, headers, headerDecoder);
- } catch (XMLStreamException e) {
- // TODO need to throw more meaningful exception
- throw new WebServiceException(e);
- }
- }
-
- // Move to soap:Body
- XMLStreamReaderUtil.nextElementContent(reader);
- }
-
- // Verify that <soap:Body> is present
- XMLStreamReaderUtil.verifyTag(reader, soapVersion.nsUri, SOAP_BODY);
- TagInfoset bodyTag = new TagInfoset(reader);
-
- String bodyPrologue = XMLStreamReaderUtil.nextWhiteSpaceContent(reader);
- message.init(envelopeTag,headerTag,message.attachmentSet,headers,bodyPrologue,bodyTag,null,reader,soapVersion);
- // when there's no payload,
- // it's tempting to use EmptyMessageImpl, but it doesn't preserve the infoset
- // of <envelope>,<header>, and <body>, so we need to stick to StreamMessage.
- }
-
-
- private static XMLStreamBuffer cacheHeaders(XMLStreamReader reader,
- Map<String, String> namespaces, HeaderList headers,
- StreamHeaderDecoder headerDecoder) throws XMLStreamException {
- MutableXMLStreamBuffer buffer = createXMLStreamBuffer();
- StreamReaderBufferCreator creator = new StreamReaderBufferCreator();
- creator.setXMLStreamBuffer(buffer);
-
- // Reader is positioned at the first header block
- while(reader.getEventType() == javax.xml.stream.XMLStreamConstants.START_ELEMENT) {
- Map<String,String> headerBlockNamespaces = namespaces;
-
- // Collect namespaces on SOAP header block
- if (reader.getNamespaceCount() > 0) {
- headerBlockNamespaces = new HashMap<String,String>(namespaces);
- for (int i = 0; i < reader.getNamespaceCount(); i++) {
- headerBlockNamespaces.put(reader.getNamespacePrefix(i), reader.getNamespaceURI(i));
- }
- }
-
- // Mark
- XMLStreamBuffer mark = new XMLStreamBufferMark(headerBlockNamespaces, creator);
- // Create Header
- headers.add(headerDecoder.decodeHeader(reader, mark));
-
-
- // Cache the header block
- // After caching Reader will be positioned at next header block or
- // the end of the </soap:header>
- creator.createElementFragment(reader, false);
- if (reader.getEventType() != XMLStreamConstants.START_ELEMENT &&
- reader.getEventType() != XMLStreamConstants.END_ELEMENT) {
- XMLStreamReaderUtil.nextElementContent(reader);
- }
- }
-
- return buffer;
- }
-
- private static MutableXMLStreamBuffer createXMLStreamBuffer() {
- // TODO: Decode should own one MutableXMLStreamBuffer for reuse
- // since it is more efficient. ISSUE: possible issue with
- // lifetime of information in the buffer if accessed beyond
- // the pipe line.
- return new MutableXMLStreamBuffer();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/AbstractSEIModelImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/AbstractSEIModelImpl.java
deleted file mode 100644
index 4ba30623..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/AbstractSEIModelImpl.java
+++ /dev/null
@@ -1,534 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.bind.api.TypeReference;
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.databinding.Databinding;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.api.model.ParameterBinding;
-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.WSDLPart;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.encoding.soap.streaming.SOAPNamespaceConstants;
-import com.sun.xml.internal.ws.resources.ModelerMessages;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.BindingContextFactory;
-import com.sun.xml.internal.ws.spi.db.BindingInfo;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.spi.db.TypeInfo;
-import com.sun.xml.internal.ws.util.Pool;
-import com.sun.xml.internal.ws.developer.UsesJAXBContextFeature;
-import com.sun.xml.internal.ws.developer.JAXBContextFactory;
-import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
-
-import javax.jws.WebParam.Mode;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-
-
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * model of the web service. Used by the runtime marshall/unmarshall
- * web service invocations
- *
- * @author JAXWS Development Team
- */
-public abstract class AbstractSEIModelImpl implements SEIModel {
-
- protected AbstractSEIModelImpl(WebServiceFeatureList features) {
- this.features = features;
- databindingInfo = new BindingInfo();
- databindingInfo.setSEIModel(this);
- }
-
- void postProcess() {
- // should be called only once.
- if (jaxbContext != null) {
- return;
- }
- populateMaps();
- createJAXBContext();
- }
-
- /**
- * Link {@link SEIModel} to {@link WSDLModel}.
- * Merge it with {@link #postProcess()}.
- */
- public void freeze(WSDLPort port) {
- this.port = port;
- for (JavaMethodImpl m : javaMethods) {
- m.freeze(port);
- putOp(m.getOperationQName(),m);
-
- }
- if (databinding != null) {
- ((com.sun.xml.internal.ws.db.DatabindingImpl)databinding).freeze(port);
- }
- }
-
- /**
- * Populate methodToJM and nameToJM maps.
- */
- abstract protected void populateMaps();
-
- @Override
- public Pool.Marshaller getMarshallerPool() {
- return marshallers;
- }
-
- /**
- * @return the <code>JAXBRIContext</code>
- * @deprecated
- */
- @Override
- public JAXBContext getJAXBContext() {
- JAXBContext jc = bindingContext.getJAXBContext();
- if (jc != null) {
- return jc;
- }
- return jaxbContext;
- }
-
- public BindingContext getBindingContext() {
- return bindingContext;
- }
-
- /**
- * @return the known namespaces from JAXBRIContext
- */
- public List<String> getKnownNamespaceURIs() {
- return knownNamespaceURIs;
- }
-
- /**
- * @return the <code>Bridge</code> for the <code>type</code>
- * @deprecated use getBond
- */
- public final Bridge getBridge(TypeReference type) {
- Bridge b = bridgeMap.get(type);
- assert b!=null; // we should have created Bridge for all TypeReferences known to this model
- return b;
- }
-
- public final XMLBridge getXMLBridge(TypeInfo type) {
- XMLBridge b = xmlBridgeMap.get(type);
- assert b!=null; // we should have created Bridge for all TypeReferences known to this model
- return b;
- }
-
- private void /*JAXBRIContext*/ createJAXBContext() {
- final List<TypeInfo> types = getAllTypeInfos();
- final List<Class> cls = new ArrayList<Class>(types.size() + additionalClasses.size());
-
- cls.addAll(additionalClasses);
- for (TypeInfo type : types) {
- cls.add((Class) type.type);
- }
-
- try {
- //jaxbContext = JAXBRIContext.newInstance(cls, types, targetNamespace, false);
- // Need to avoid doPriv block once JAXB is fixed. Afterwards, use the above
- bindingContext = AccessController.doPrivileged(new PrivilegedExceptionAction<BindingContext>() {
- public BindingContext run() throws Exception {
- if(LOGGER.isLoggable(Level.FINEST)) {
- LOGGER.log(Level.FINEST, "Creating JAXBContext with classes={0} and types={1}", new Object[]{cls, types});
- }
- UsesJAXBContextFeature f = features.get(UsesJAXBContextFeature.class);
- com.oracle.webservices.internal.api.databinding.DatabindingModeFeature dmf =
- features.get(com.oracle.webservices.internal.api.databinding.DatabindingModeFeature.class);
- JAXBContextFactory factory = f!=null ? f.getFactory() : null;
- if(factory==null) factory=JAXBContextFactory.DEFAULT;
-
-// return factory.createJAXBContext(AbstractSEIModelImpl.this,cls,types);
-
- databindingInfo.properties().put(JAXBContextFactory.class.getName(), factory);
- if (dmf != null) {
- if (LOGGER.isLoggable(Level.FINE))
- LOGGER.log(Level.FINE, "DatabindingModeFeature in SEI specifies mode: {0}", dmf.getMode());
- databindingInfo.setDatabindingMode(dmf
- .getMode());
- }
-
- if (f!=null) databindingInfo.setDatabindingMode(BindingContextFactory.DefaultDatabindingMode);
- databindingInfo.setClassLoader(classLoader);
- databindingInfo.contentClasses().addAll(cls);
- databindingInfo.typeInfos().addAll(types);
- databindingInfo.properties().put("c14nSupport", Boolean.FALSE);
- databindingInfo.setDefaultNamespace(AbstractSEIModelImpl.this.getDefaultSchemaNamespace());
- BindingContext bc = BindingContextFactory.create(databindingInfo);
- if (LOGGER.isLoggable(Level.FINE))
- LOGGER.log(Level.FINE,
- "Created binding context: "
- + bc.getClass().getName());
-// System.out.println("---------------------- databinding " + bc);
- return bc;
- }
- });
-// createBridgeMap(types);
- createBondMap(types);
- } catch (PrivilegedActionException e) {
- throw new WebServiceException(ModelerMessages.UNABLE_TO_CREATE_JAXB_CONTEXT(), e);
- }
- knownNamespaceURIs = new ArrayList<String>();
- for (String namespace : bindingContext.getKnownNamespaceURIs()) {
- if (namespace.length() > 0) {
- if (!namespace.equals(SOAPNamespaceConstants.XSD) && !namespace.equals(SOAPNamespaceConstants.XMLNS))
- knownNamespaceURIs.add(namespace);
- }
- }
-
- marshallers = new Pool.Marshaller(jaxbContext);
-
- //return getJAXBContext();
- }
-
- /**
- * @return returns non-null list of TypeReference
- */
- private List<TypeInfo> getAllTypeInfos() {
- List<TypeInfo> types = new ArrayList<TypeInfo>();
- Collection<JavaMethodImpl> methods = methodToJM.values();
- for (JavaMethodImpl m : methods) {
- m.fillTypes(types);
- }
- return types;
- }
-
- private void createBridgeMap(List<TypeReference> types) {
- for (TypeReference type : types) {
- Bridge bridge = jaxbContext.createBridge(type);
- bridgeMap.put(type, bridge);
- }
- }
- private void createBondMap(List<TypeInfo> types) {
- for (TypeInfo type : types) {
- XMLBridge binding = bindingContext.createBridge(type);
- xmlBridgeMap.put(type, binding);
- }
- }
-
-
- /**
- * @return true if <code>name</code> is the name
- * of a known fault name for the <code>Method method</code>
- */
- public boolean isKnownFault(QName name, Method method) {
- JavaMethodImpl m = getJavaMethod(method);
- for (CheckedExceptionImpl ce : m.getCheckedExceptions()) {
- if (ce.getDetailType().tagName.equals(name))
- return true;
- }
- return false;
- }
-
- /**
- * @return true if <code>ex</code> is a Checked Exception
- * for <code>Method m</code>
- */
- public boolean isCheckedException(Method m, Class ex) {
- JavaMethodImpl jm = getJavaMethod(m);
- for (CheckedExceptionImpl ce : jm.getCheckedExceptions()) {
- if (ce.getExceptionClass().equals(ex))
- return true;
- }
- return false;
- }
-
- /**
- * @return the <code>JavaMethod</code> representing the <code>method</code>
- */
- public JavaMethodImpl getJavaMethod(Method method) {
- return methodToJM.get(method);
- }
-
- /**
- * @return the <code>JavaMethod</code> associated with the
- * operation named name
- */
- public JavaMethodImpl getJavaMethod(QName name) {
- return nameToJM.get(name);
- }
-
- public JavaMethod getJavaMethodForWsdlOperation(QName operationName) {
- return wsdlOpToJM.get(operationName);
- }
-
-
- /**
- * @return the <code>QName</code> associated with the
- * JavaMethod jm.
- *
- * @deprecated
- * Use {@link JavaMethod#getOperationName()}.
- */
- public QName getQNameForJM(JavaMethodImpl jm) {
- for (QName key : nameToJM.keySet()) {
- JavaMethodImpl jmethod = nameToJM.get(key);
- if (jmethod.getOperationName().equals(jm.getOperationName())){
- return key;
- }
- }
- return null;
- }
-
- /**
- * @return a <code>Collection</code> of <code>JavaMethods</code>
- * associated with this <code>RuntimeModel</code>
- */
- public final Collection<JavaMethodImpl> getJavaMethods() {
- return Collections.unmodifiableList(javaMethods);
- }
-
- void addJavaMethod(JavaMethodImpl jm) {
- if (jm != null)
- javaMethods.add(jm);
- }
-
- /**
- * Applies binding related information to the RpcLitPayload. The payload map is populated correctly
- * @return
- * Returns attachment parameters if/any.
- */
- private List<ParameterImpl> applyRpcLitParamBinding(JavaMethodImpl method, WrapperParameter wrapperParameter, WSDLBoundPortType boundPortType, Mode mode) {
- QName opName = new QName(boundPortType.getPortTypeName().getNamespaceURI(), method.getOperationName());
- WSDLBoundOperation bo = boundPortType.get(opName);
- Map<Integer, ParameterImpl> bodyParams = new HashMap<Integer, ParameterImpl>();
- List<ParameterImpl> unboundParams = new ArrayList<ParameterImpl>();
- List<ParameterImpl> attachParams = new ArrayList<ParameterImpl>();
- for(ParameterImpl param : wrapperParameter.wrapperChildren){
- String partName = param.getPartName();
- if(partName == null)
- continue;
-
- ParameterBinding paramBinding = boundPortType.getBinding(opName,
- partName, mode);
- if(paramBinding != null){
- if(mode == Mode.IN)
- param.setInBinding(paramBinding);
- else if(mode == Mode.OUT || mode == Mode.INOUT)
- param.setOutBinding(paramBinding);
-
- if(paramBinding.isUnbound()){
- unboundParams.add(param);
- } else if(paramBinding.isAttachment()){
- attachParams.add(param);
- }else if(paramBinding.isBody()){
- if(bo != null){
- WSDLPart p = bo.getPart(param.getPartName(), mode);
- if(p != null)
- bodyParams.put(p.getIndex(), param);
- else
- bodyParams.put(bodyParams.size(), param);
- }else{
- bodyParams.put(bodyParams.size(), param);
- }
- }
- }
-
- }
- wrapperParameter.clear();
- for(int i = 0; i < bodyParams.size();i++){
- ParameterImpl p = bodyParams.get(i);
- wrapperParameter.addWrapperChild(p);
- }
-
- //add unbounded parts
- for(ParameterImpl p:unboundParams){
- wrapperParameter.addWrapperChild(p);
- }
- return attachParams;
- }
-
-
- void put(QName name, JavaMethodImpl jm) {
- nameToJM.put(name, jm);
- }
-
- void put(Method method, JavaMethodImpl jm) {
- methodToJM.put(method, jm);
- }
-
- void putOp(QName opName, JavaMethodImpl jm) {
- wsdlOpToJM.put(opName, jm);
- }
- public String getWSDLLocation() {
- return wsdlLocation;
- }
-
- void setWSDLLocation(String location) {
- wsdlLocation = location;
- }
-
- public QName getServiceQName() {
- return serviceName;
- }
-
- public WSDLPort getPort() {
- return port;
- }
-
- public QName getPortName() {
- return portName;
- }
-
- public QName getPortTypeName() {
- return portTypeName;
- }
-
- void setServiceQName(QName name) {
- serviceName = name;
- }
-
- void setPortName(QName name) {
- portName = name;
- }
-
- void setPortTypeName(QName name) {
- portTypeName = name;
- }
-
- /**
- * This is the targetNamespace for the WSDL containing the PortType
- * definition
- */
- void setTargetNamespace(String namespace) {
- targetNamespace = namespace;
- }
-
- /**
- * This is the targetNamespace for the WSDL containing the PortType
- * definition
- */
- public String getTargetNamespace() {
- return targetNamespace;
- }
-
- String getDefaultSchemaNamespace() {
- String defaultNamespace = getTargetNamespace();
- if (defaultSchemaNamespaceSuffix == null) return defaultNamespace;
- if (!defaultNamespace.endsWith("/")) {
- defaultNamespace += "/";
- }
- return (defaultNamespace + defaultSchemaNamespaceSuffix);
- }
-
- @NotNull
- public QName getBoundPortTypeName() {
- assert portName != null;
- return new QName(portName.getNamespaceURI(), portName.getLocalPart()+"Binding");
- }
-
- /**
- * Adds additional classes obtained from {@link XmlSeeAlso} annotation. In starting
- * from wsdl case these classes would most likely be JAXB ObjectFactory that references other classes.
- */
- public void addAdditionalClasses(Class... additionalClasses) {
- for(Class cls : additionalClasses)
- this.additionalClasses.add(cls);
- }
-
- public Databinding getDatabinding() {
- return databinding;
- }
-
- public void setDatabinding(Databinding wsRuntime) {
- this.databinding = wsRuntime;
- }
-
- public WSBinding getWSBinding() {
- return wsBinding;
- }
-
- public Class getContractClass() {
- return contractClass;
- }
-
- public Class getEndpointClass() {
- return endpointClass;
- }
-
- private List<Class> additionalClasses = new ArrayList<Class>();
-
- private Pool.Marshaller marshallers;
- /**
- * @deprecated
- */
- protected JAXBRIContext jaxbContext;
- protected BindingContext bindingContext;
- private String wsdlLocation;
- private QName serviceName;
- private QName portName;
- private QName portTypeName;
- private Map<Method,JavaMethodImpl> methodToJM = new HashMap<Method, JavaMethodImpl>();
- /**
- * Payload QName to the method that handles it.
- */
- private Map<QName,JavaMethodImpl> nameToJM = new HashMap<QName, JavaMethodImpl>();
- /**
- * Wsdl Operation QName to the method that handles it.
- */
- private Map<QName, JavaMethodImpl> wsdlOpToJM = new HashMap<QName, JavaMethodImpl>();
-
- private List<JavaMethodImpl> javaMethods = new ArrayList<JavaMethodImpl>();
- private final Map<TypeReference, Bridge> bridgeMap = new HashMap<TypeReference, Bridge>();
- private final Map<TypeInfo, XMLBridge> xmlBridgeMap = new HashMap<TypeInfo, XMLBridge>();
- protected final QName emptyBodyName = new QName("");
- private String targetNamespace = "";
- private List<String> knownNamespaceURIs = null;
- private WSDLPort port;
- private final WebServiceFeatureList features;
- private Databinding databinding;
- BindingID bindingId;
- protected Class contractClass;
- protected Class endpointClass;
- protected ClassLoader classLoader = null;
- protected WSBinding wsBinding;
- protected BindingInfo databindingInfo;
- protected String defaultSchemaNamespaceSuffix;
- private static final Logger LOGGER = Logger.getLogger(AbstractSEIModelImpl.class.getName());
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/AbstractWrapperBeanGenerator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/AbstractWrapperBeanGenerator.java
deleted file mode 100644
index 32c07d92..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/AbstractWrapperBeanGenerator.java
+++ /dev/null
@@ -1,468 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.ws.spi.db.BindingHelper;
-import com.sun.xml.internal.ws.util.StringUtils;
-
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.xml.bind.annotation.*;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.ws.WebServiceException;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.*;
-import java.util.logging.Logger;
-
-/**
- * Finds request/response wrapper and exception bean memebers.
- *
- * <p>
- * It uses JAXB's {@link AnnotationReader}, {@link Navigator} so that
- * tools can use this with annotation processing, and the runtime can use this with
- * reflection.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class AbstractWrapperBeanGenerator<T,C,M,A extends Comparable> {
-
- private static final Logger LOGGER = Logger.getLogger(AbstractWrapperBeanGenerator.class.getName());
-
- private static final String RETURN = "return";
- private static final String EMTPY_NAMESPACE_ID = "";
-
- private static final Class[] jaxbAnns = new Class[] {
- XmlAttachmentRef.class, XmlMimeType.class, XmlJavaTypeAdapter.class,
- XmlList.class, XmlElement.class
- };
-
- private static final Set<String> skipProperties = new HashSet<String>();
- static{
- skipProperties.add("getCause");
- skipProperties.add("getLocalizedMessage");
- skipProperties.add("getClass");
- skipProperties.add("getStackTrace");
- skipProperties.add("getSuppressed"); // JDK 7 adds this
- }
-
- private final AnnotationReader<T,C,?,M> annReader;
- private final Navigator<T,C,?,M> nav;
- private final BeanMemberFactory<T,A> factory;
-
- protected AbstractWrapperBeanGenerator(AnnotationReader<T,C,?,M> annReader,
- Navigator<T,C,?,M> nav, BeanMemberFactory<T,A> factory) {
- this.annReader = annReader;
- this.nav = nav;
- this.factory = factory;
- }
-
- public static interface BeanMemberFactory<T,A> {
- A createWrapperBeanMember(T paramType, String paramName, List<Annotation> jaxbAnnotations);
- }
-
- // Collects the JAXB annotations on a method
- private List<Annotation> collectJAXBAnnotations(M method) {
- List<Annotation> jaxbAnnotation = new ArrayList<Annotation>();
- for(Class jaxbClass : jaxbAnns) {
- Annotation ann = annReader.getMethodAnnotation(jaxbClass, method, null);
- if (ann != null) {
- jaxbAnnotation.add(ann);
- }
- }
- return jaxbAnnotation;
- }
-
- // Collects the JAXB annotations on a parameter
- private List<Annotation> collectJAXBAnnotations(M method, int paramIndex) {
- List<Annotation> jaxbAnnotation = new ArrayList<Annotation>();
- for(Class jaxbClass : jaxbAnns) {
- Annotation ann = annReader.getMethodParameterAnnotation(jaxbClass, method, paramIndex, null);
- if (ann != null) {
- jaxbAnnotation.add(ann);
- }
- }
- return jaxbAnnotation;
- }
-
- protected abstract T getSafeType(T type);
-
- /**
- * Returns Holder's value type.
- *
- * @return null if it not a Holder, otherwise return Holder's value type
- */
- protected abstract T getHolderValueType(T type);
-
- protected abstract boolean isVoidType(T type);
-
- /**
- * Computes request bean members for a method. Collects all IN and INOUT
- * parameters as request bean fields. In this process, if a parameter
- * has any known JAXB annotations they are collected as well.
- * Special processing for @XmlElement annotation is done.
- *
- * @param method SEI method for which request bean members are computed
- * @return List of request bean members
- */
- public List<A> collectRequestBeanMembers(M method) {
-
- List<A> requestMembers = new ArrayList<A>();
- int paramIndex = -1;
-
- for (T param : nav.getMethodParameters(method)) {
- paramIndex++;
- WebParam webParam = annReader.getMethodParameterAnnotation(WebParam.class, method, paramIndex, null);
- if (webParam != null && (webParam.header() || webParam.mode().equals(WebParam.Mode.OUT))) {
- continue;
- }
- T holderType = getHolderValueType(param);
-// if (holderType != null && webParam != null && webParam.mode().equals(WebParam.Mode.IN)) {
-// // Should we flag an error - holder cannot be IN part ??
-// continue;
-// }
-
- T paramType = (holderType != null) ? holderType : getSafeType(param);
- String paramName = (webParam != null && webParam.name().length() > 0)
- ? webParam.name() : "arg"+paramIndex;
- String paramNamespace = (webParam != null && webParam.targetNamespace().length() > 0)
- ? webParam.targetNamespace() : EMTPY_NAMESPACE_ID;
-
- // Collect JAXB annotations on a parameter
- List<Annotation> jaxbAnnotation = collectJAXBAnnotations(method, paramIndex);
-
- // If a parameter contains @XmlElement, process it.
- processXmlElement(jaxbAnnotation, paramName, paramNamespace, paramType);
- A member = factory.createWrapperBeanMember(paramType,
- getPropertyName(paramName), jaxbAnnotation);
- requestMembers.add(member);
- }
- return requestMembers;
- }
-
- /**
- * Computes response bean members for a method. Collects all OUT and INOUT
- * parameters as response bean fields. In this process, if a parameter
- * has any known JAXB annotations they are collected as well.
- * Special processing for @XmlElement annotation is done.
- *
- * @param method SEI method for which response bean members are computed
- * @return List of response bean members
- */
- public List<A> collectResponseBeanMembers(M method) {
-
- List<A> responseMembers = new ArrayList<A>();
-
- // return that need to be part response wrapper bean
- String responseElementName = RETURN;
- String responseNamespace = EMTPY_NAMESPACE_ID;
- boolean isResultHeader = false;
- WebResult webResult = annReader.getMethodAnnotation(WebResult.class, method ,null);
- if (webResult != null) {
- if (webResult.name().length() > 0) {
- responseElementName = webResult.name();
- }
- if (webResult.targetNamespace().length() > 0) {
- responseNamespace = webResult.targetNamespace();
- }
- isResultHeader = webResult.header();
- }
- T returnType = getSafeType(nav.getReturnType(method));
- if (!isVoidType(returnType) && !isResultHeader) {
- List<Annotation> jaxbRespAnnotations = collectJAXBAnnotations(method);
- processXmlElement(jaxbRespAnnotations, responseElementName, responseNamespace, returnType);
- responseMembers.add(factory.createWrapperBeanMember(returnType, getPropertyName(responseElementName), jaxbRespAnnotations));
- }
-
- // Now parameters that need to be part response wrapper bean
- int paramIndex = -1;
- for (T param : nav.getMethodParameters(method)) {
- paramIndex++;
-
- T paramType = getHolderValueType(param);
- WebParam webParam = annReader.getMethodParameterAnnotation(WebParam.class, method, paramIndex, null);
- if (paramType == null || (webParam != null && webParam.header())) {
- continue; // not a holder or a header - so don't add it
- }
-
- String paramName = (webParam != null && webParam.name().length() > 0)
- ? webParam.name() : "arg"+paramIndex;
- String paramNamespace = (webParam != null && webParam.targetNamespace().length() > 0)
- ? webParam.targetNamespace() : EMTPY_NAMESPACE_ID;
- List<Annotation> jaxbAnnotation = collectJAXBAnnotations(method, paramIndex);
- processXmlElement(jaxbAnnotation, paramName, paramNamespace, paramType);
- A member = factory.createWrapperBeanMember(paramType,
- getPropertyName(paramName), jaxbAnnotation);
- responseMembers.add(member);
- }
-
- return responseMembers;
- }
-
- private void processXmlElement(List<Annotation> jaxb, String elemName, String elemNS, T type) {
- XmlElement elemAnn = null;
- for (Annotation a : jaxb) {
- if (a.annotationType() == XmlElement.class) {
- elemAnn = (XmlElement) a;
- jaxb.remove(a);
- break;
- }
- }
- String name = (elemAnn != null && !elemAnn.name().equals("##default"))
- ? elemAnn.name() : elemName;
-
- String ns = (elemAnn != null && !elemAnn.namespace().equals("##default"))
- ? elemAnn.namespace() : elemNS;
-
- boolean nillable = nav.isArray(type)
- || (elemAnn != null && elemAnn.nillable());
-
- boolean required = elemAnn != null && elemAnn.required();
- XmlElementHandler handler = new XmlElementHandler(name, ns, nillable, required);
- XmlElement elem = (XmlElement) Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class<?>[]{XmlElement.class}, handler);
- jaxb.add(elem);
- }
-
-
- private static class XmlElementHandler implements InvocationHandler {
- private String name;
- private String namespace;
- private boolean nillable;
- private boolean required;
-
- XmlElementHandler(String name, String namespace, boolean nillable,
- boolean required) {
- this.name = name;
- this.namespace = namespace;
- this.nillable = nillable;
- this.required = required;
- }
-
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- String methodName = method.getName();
- if (methodName.equals("name")) {
- return name;
- } else if (methodName.equals("namespace")) {
- return namespace;
- } else if (methodName.equals("nillable")) {
- return nillable;
- } else if (methodName.equals("required")) {
- return required;
- } else {
- throw new WebServiceException("Not handling "+methodName);
- }
- }
- }
-
- /**
- * Computes and sorts exception bean members for a given exception as per
- * the 3.7 section of the spec. It takes all getter properties in the
- * exception and its superclasses(except getCause, getLocalizedMessage,
- * getStackTrace, getClass). The returned collection is sorted based
- * on the property names.
- *
- * <p>
- * But if the exception has @XmlType its values are honored. Only the
- * propOrder properties are considered. The returned collection is sorted
- * as per the given propOrder.
- *
- * @param exception
- * @return list of properties in the correct order for an exception bean
- */
- public Collection<A> collectExceptionBeanMembers(C exception) {
- return collectExceptionBeanMembers(exception, true);
- }
-
- /**
- * Computes and sorts exception bean members for a given exception as per
- * the 3.7 section of the spec. It takes all getter properties in the
- * exception and its superclasses(except getCause, getLocalizedMessage,
- * getStackTrace, getClass). The returned collection is sorted based
- * on the property names.
- *
- * <p>
- * But if the exception has @XmlType its values are honored. Only the
- * propOrder properties are considered. The returned collection is sorted
- * as per the given propOrder.
- *
- * @param exception
- * @param decapitalize if true, all the property names are decapitalized
- *
- * @return list of properties in the correct order for an exception bean
- */
- public Collection<A> collectExceptionBeanMembers(C exception, boolean decapitalize ) {
- TreeMap<String, A> fields = new TreeMap<String, A>();
- getExceptionProperties(exception, fields, decapitalize);
-
- // Consider only the @XmlType(propOrder) properties
- XmlType xmlType = annReader.getClassAnnotation(XmlType.class, exception, null);
- if (xmlType != null) {
- String[] propOrder = xmlType.propOrder();
- // If not the default order of properties, use that propOrder
- if (propOrder.length > 0 && propOrder[0].length() != 0) {
- List<A> list = new ArrayList<A>();
- for(String prop : propOrder) {
- A a = fields.get(prop);
- if (a != null) {
- list.add(a);
- } else {
- throw new WebServiceException("Exception "+exception+
- " has @XmlType and its propOrder contains unknown property "+prop);
- }
- }
- return list;
- }
- }
-
- return fields.values();
- }
-
-
- private void getExceptionProperties(C exception, TreeMap<String, A> fields, boolean decapitalize) {
- C sc = nav.getSuperClass(exception);
- if (sc != null) {
- getExceptionProperties(sc, fields, decapitalize);
- }
- Collection<? extends M> methods = nav.getDeclaredMethods(exception);
-
- for (M method : methods) {
-
- // 2.1.x is doing the following: no final static, transient, non-public
- // transient cannot used as modifier for method, so not doing it now
- if (!nav.isPublicMethod(method)
- || (nav.isStaticMethod(method) && nav.isFinalMethod(method))) {
- continue;
- }
-
- if (!nav.isPublicMethod(method)) {
- continue;
- }
-
- String name = nav.getMethodName(method);
-
- if (!(name.startsWith("get") || name.startsWith("is")) || skipProperties.contains(name) ||
- name.equals("get") || name.equals("is")) {
- // Don't bother with invalid propertyNames.
- continue;
- }
-
- T returnType = getSafeType(nav.getReturnType(method));
- if (nav.getMethodParameters(method).length == 0) {
- String fieldName = name.startsWith("get") ? name.substring(3) : name.substring(2);
- if (decapitalize) fieldName = StringUtils.decapitalize(fieldName);
- fields.put(fieldName, factory.createWrapperBeanMember(returnType, fieldName, Collections.<Annotation>emptyList()));
- }
- }
-
- }
-
- /**
- * Gets the property name by mangling using JAX-WS rules
- * @param name to be mangled
- * @return property name
- */
- private static String getPropertyName(String name) {
- String propertyName = BindingHelper.mangleNameToVariableName(name);
- //We wont have to do this if JAXBRIContext.mangleNameToVariableName() takes
- //care of mangling java identifiers
- return getJavaReservedVarialbeName(propertyName);
- }
-
-
- //TODO MOVE Names.java to runtime (instead of doing the following)
- /*
- * See if its a java keyword name, if so then mangle the name
- */
- private static @NotNull String getJavaReservedVarialbeName(@NotNull String name) {
- String reservedName = reservedWords.get(name);
- return reservedName == null ? name : reservedName;
- }
-
- private static final Map<String, String> reservedWords;
-
- static {
- reservedWords = new HashMap<String, String>();
- reservedWords.put("abstract", "_abstract");
- reservedWords.put("assert", "_assert");
- reservedWords.put("boolean", "_boolean");
- reservedWords.put("break", "_break");
- reservedWords.put("byte", "_byte");
- reservedWords.put("case", "_case");
- reservedWords.put("catch", "_catch");
- reservedWords.put("char", "_char");
- reservedWords.put("class", "_class");
- reservedWords.put("const", "_const");
- reservedWords.put("continue", "_continue");
- reservedWords.put("default", "_default");
- reservedWords.put("do", "_do");
- reservedWords.put("double", "_double");
- reservedWords.put("else", "_else");
- reservedWords.put("extends", "_extends");
- reservedWords.put("false", "_false");
- reservedWords.put("final", "_final");
- reservedWords.put("finally", "_finally");
- reservedWords.put("float", "_float");
- reservedWords.put("for", "_for");
- reservedWords.put("goto", "_goto");
- reservedWords.put("if", "_if");
- reservedWords.put("implements", "_implements");
- reservedWords.put("import", "_import");
- reservedWords.put("instanceof", "_instanceof");
- reservedWords.put("int", "_int");
- reservedWords.put("interface", "_interface");
- reservedWords.put("long", "_long");
- reservedWords.put("native", "_native");
- reservedWords.put("new", "_new");
- reservedWords.put("null", "_null");
- reservedWords.put("package", "_package");
- reservedWords.put("private", "_private");
- reservedWords.put("protected", "_protected");
- reservedWords.put("public", "_public");
- reservedWords.put("return", "_return");
- reservedWords.put("short", "_short");
- reservedWords.put("static", "_static");
- reservedWords.put("strictfp", "_strictfp");
- reservedWords.put("super", "_super");
- reservedWords.put("switch", "_switch");
- reservedWords.put("synchronized", "_synchronized");
- reservedWords.put("this", "_this");
- reservedWords.put("throw", "_throw");
- reservedWords.put("throws", "_throws");
- reservedWords.put("transient", "_transient");
- reservedWords.put("true", "_true");
- reservedWords.put("try", "_try");
- reservedWords.put("void", "_void");
- reservedWords.put("volatile", "_volatile");
- reservedWords.put("while", "_while");
- reservedWords.put("enum", "_enum");
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/CheckedExceptionImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/CheckedExceptionImpl.java
deleted file mode 100644
index 3549721b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/CheckedExceptionImpl.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model;
-
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.ws.api.model.CheckedException;
-import com.sun.xml.internal.ws.api.model.ExceptionType;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.addressing.WsaActionUtil;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.spi.db.TypeInfo;
-
-/**
- * CheckedException class. Holds the exception class - class that has public
- * constructor
- *
- * <code>public WrapperException()String message, FaultBean){}</code>
- *
- * and method
- *
- * <code>public FaultBean getFaultInfo();</code>
- *
- * @author Vivek Pandey
- */
-public final class CheckedExceptionImpl implements CheckedException {
- private final Class exceptionClass;
- private final TypeInfo detail;
- private final ExceptionType exceptionType;
- private final JavaMethodImpl javaMethod;
- private String messageName;
- private String faultAction = "";
-
- /**
- * @param jm {@link JavaMethodImpl} that throws this exception
- * @param exceptionClass
- * Userdefined or WSDL exception class that extends
- * java.lang.Exception.
- * @param detail
- * detail or exception bean's TypeReference
- * @param exceptionType
- * either ExceptionType.UserDefined or
- */
- public CheckedExceptionImpl(JavaMethodImpl jm, Class exceptionClass, TypeInfo detail, ExceptionType exceptionType) {
- this.detail = detail;
- this.exceptionType = exceptionType;
- this.exceptionClass = exceptionClass;
- this.javaMethod = jm;
- }
-
- public AbstractSEIModelImpl getOwner() {
- return javaMethod.owner;
- }
-
- public JavaMethod getParent() {
- return javaMethod;
- }
-
- /**
- * @return the <code>Class</clode> for this object
- *
- */
- public Class getExceptionClass() {
- return exceptionClass;
- }
-
- public Class getDetailBean() {
- return (Class) detail.type;
- }
- /** @deprecated */
- public Bridge getBridge() {
-//TODO return getOwner().getBridge(detail);
- return null;
- }
-
- public XMLBridge getBond() {
- return getOwner().getXMLBridge(detail);
- }
-
- public TypeInfo getDetailType() {
- return detail;
- }
-
- public ExceptionType getExceptionType() {
- return exceptionType;
- }
-
- public String getMessageName() {
- return messageName;
- }
-
- public void setMessageName(String messageName) {
- this.messageName = messageName;
- }
-
- public String getFaultAction() {
- return faultAction;
- }
-
- public void setFaultAction(String faultAction) {
- this.faultAction = faultAction;
- }
-
- public String getDefaultFaultAction() {
- return WsaActionUtil.getDefaultFaultAction(javaMethod,this);
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ExternalMetadataReader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ExternalMetadataReader.java
deleted file mode 100644
index 2de13dc3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ExternalMetadataReader.java
+++ /dev/null
@@ -1,549 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model;
-
-import com.oracle.xmlns.internal.webservices.jaxws_databinding.JavaMethod;
-import com.oracle.xmlns.internal.webservices.jaxws_databinding.JavaParam;
-import com.oracle.xmlns.internal.webservices.jaxws_databinding.JavaWsdlMappingType;
-import com.oracle.xmlns.internal.webservices.jaxws_databinding.ObjectFactory;
-import com.sun.xml.internal.bind.api.JAXBRIContext;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.util.JAXBResult;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-import java.io.*;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.util.*;
-
-import static com.oracle.xmlns.internal.webservices.jaxws_databinding.ExistingAnnotationsType.MERGE;
-
-/**
- * Metadata Reader able to read from either class annotations or external metadata files or combine both,
- * depending on configuration provided in xml file itself.
- *
- * @author shih-chang.chen@oracle.com, miroslav.kos@oracle.com
- */
-public class ExternalMetadataReader extends ReflectAnnotationReader {
-
- private static final String NAMESPACE_WEBLOGIC_WSEE_DATABINDING = "http://xmlns.oracle.com/weblogic/weblogic-wsee-databinding";
- private static final String NAMESPACE_JAXWS_RI_EXTERNAL_METADATA = "http://xmlns.oracle.com/webservices/jaxws-databinding";
-
- /**
- * map of readers for defined java types
- */
- private Map<String, JavaWsdlMappingType> readers = new HashMap<String, JavaWsdlMappingType>();
-
- public ExternalMetadataReader(Collection<File> files, Collection<String> resourcePaths, ClassLoader classLoader,
- boolean xsdValidation, boolean disableXmlSecurity) {
-
- if (files != null) {
- for (File file : files) {
- try {
- 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());
- }
- }
- }
-
- if (resourcePaths != null) {
- for (String resourcePath : resourcePaths) {
- try {
- 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);
- }
- }
- }
- }
-
- private StreamSource newSource(String resourcePath, ClassLoader classLoader) {
- InputStream is = classLoader.getResourceAsStream(resourcePath);
- return new StreamSource(is);
- }
-
- 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, disableXmlSecurity);
- } if (NAMESPACE_JAXWS_RI_EXTERNAL_METADATA.equals(namespace)) {
- 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());
- }
- }
-
- private StreamSource newSource(File file) {
- try {
- return new StreamSource(new FileInputStream(file));
- } catch (FileNotFoundException e) {
- throw new RuntimeModelerException("runtime.modeler.external.metadata.unable.to.read", file.getAbsolutePath());
- }
- }
-
- public <A extends Annotation> A getAnnotation(Class<A> annType, Class<?> cls) {
- JavaWsdlMappingType r = reader(cls);
- return r == null ? super.getAnnotation(annType, cls) : Util.annotation(r, annType);
- }
-
- private JavaWsdlMappingType reader(Class<?> cls) {
- return readers.get(cls.getName());
- }
-
- Annotation[] getAnnotations(List<Object> objects) {
- ArrayList<Annotation> list = new ArrayList<Annotation>();
- for (Object a : objects) {
- if (Annotation.class.isInstance(a)) {
- list.add(Annotation.class.cast(a));
- }
- }
- return list.toArray(new Annotation[list.size()]);
- }
-
- public Annotation[] getAnnotations(final Class<?> c) {
-
- Merger<Annotation[]> merger = new Merger<Annotation[]>(reader(c)) {
- Annotation[] reflection() {
- return ExternalMetadataReader.super.getAnnotations(c);
- }
-
- Annotation[] external() {
- return getAnnotations(reader.getClassAnnotation());
- }
- };
- return merger.merge();
- }
-
- public Annotation[] getAnnotations(final Method m) {
- Merger<Annotation[]> merger = new Merger<Annotation[]>(reader(m.getDeclaringClass())) {
- Annotation[] reflection() {
- return ExternalMetadataReader.super.getAnnotations(m);
- }
-
- Annotation[] external() {
- JavaMethod jm = getJavaMethod(m, reader);
- return (jm == null) ? new Annotation[0] : getAnnotations(jm.getMethodAnnotation());
- }
- };
- return merger.merge();
- }
-
- @SuppressWarnings("unchecked")
- public <A extends Annotation> A getAnnotation(final Class<A> annType, final Method m) {
- Merger<Annotation> merger = new Merger<Annotation>(reader(m.getDeclaringClass())) {
- Annotation reflection() {
- return ExternalMetadataReader.super.getAnnotation(annType, m);
- }
-
- Annotation external() {
- JavaMethod jm = getJavaMethod(m, reader);
- return Util.annotation(jm, annType);
- }
- };
- return (A) merger.merge();
- }
-
- public Annotation[][] getParameterAnnotations(final Method m) {
- Merger<Annotation[][]> merger = new Merger<Annotation[][]>(reader(m.getDeclaringClass())) {
- Annotation[][] reflection() {
- return ExternalMetadataReader.super.getParameterAnnotations(m);
- }
-
- Annotation[][] external() {
- JavaMethod jm = getJavaMethod(m, reader);
- Annotation[][] a = m.getParameterAnnotations();
- for (int i = 0; i < m.getParameterTypes().length; i++) {
- if (jm == null) continue;
- JavaParam jp = jm.getJavaParams().getJavaParam().get(i);
- a[i] = getAnnotations(jp.getParamAnnotation());
- }
- return a;
- }
- };
- return merger.merge();
- }
-
- public void getProperties(final Map<String, Object> prop, final Class<?> cls) {
-
- JavaWsdlMappingType r = reader(cls);
-
- // no external reader or it requires annotations merging ...
- if (r == null || MERGE.equals(r.getExistingAnnotations())) {
- super.getProperties(prop, cls);
- }
-
- }
-
- public void getProperties(final Map<String, Object> prop, final Method m) {
-
- JavaWsdlMappingType r = reader(m.getDeclaringClass());
-
- // no external reader or it requires annotations merging ...
- if (r == null || MERGE.equals(r.getExistingAnnotations())) {
- super.getProperties(prop, m);
- }
-
- if (r != null) {
- JavaMethod jm = getJavaMethod(m, r);
- Element[] e = Util.annotation(jm);
- prop.put("eclipselink-oxm-xml.xml-element", findXmlElement(e));
- }
-
- }
-
- public void getProperties(final Map<String, Object> prop, final Method m, int pos) {
-
- JavaWsdlMappingType r = reader(m.getDeclaringClass());
-
- // no external reader or it requires annotations merging ...
- if (r == null || MERGE.equals(r.getExistingAnnotations())) {
- super.getProperties(prop, m, pos);
- }
-
- if (r != null) {
- JavaMethod jm = getJavaMethod(m, r);
- if (jm == null) return;
- JavaParam jp = jm.getJavaParams().getJavaParam().get(pos);
- Element[] e = Util.annotation(jp);
- prop.put("eclipselink-oxm-xml.xml-element", findXmlElement(e));
- }
- }
-
- JavaMethod getJavaMethod(Method method, JavaWsdlMappingType r) {
-
- JavaWsdlMappingType.JavaMethods javaMethods = r.getJavaMethods();
- if (javaMethods == null) {
- return null;
- }
-
- List<JavaMethod> sameName = new ArrayList<JavaMethod>();
- for (JavaMethod jm : javaMethods.getJavaMethod()) {
- if (method.getName().equals(jm.getName())) {
- sameName.add(jm);
- }
- }
-
- if (sameName.isEmpty()) {
- return null;
- } else {
- if (sameName.size() == 1) {
- return sameName.get(0);
- } else {
- Class<?>[] argCls = method.getParameterTypes();
- for (JavaMethod jm : sameName) {
- JavaMethod.JavaParams params = jm.getJavaParams();
- if (params != null && params.getJavaParam() != null && params.getJavaParam().size() == argCls.length) {
- int count = 0;
- for (int i = 0; i < argCls.length; i++) {
- JavaParam jp = params.getJavaParam().get(i);
- if (argCls[i].getName().equals(jp.getJavaType())) {
- count++;
- }
- }
- if (count == argCls.length) {
- return jm;
- }
- }
- }
- }
- }
- return null;
- }
-
- Element findXmlElement(Element[] xa) {
- if (xa == null) return null;
- for (Element e : xa) {
- if (e.getLocalName().equals("java-type")) return e;
- if (e.getLocalName().equals("xml-element")) return e;
- }
- return null;
- }
-
- /**
- * Helper class to merge two different arrays of annotation objects. It merges annotations based on attribute
- * <code>existing-annotations</code> in external customization file.
- * <p/>
- * We suppose that in the result array there wouldn't be two annotations of same type:
- * annotation.annotationType().getName(); if there are found such annotations the one from reflection is
- * considered overriden and is thrown away.
- * <p/>
- * The helper can work either with one and two dimensional array, but it can be used for two single Annotation
- * objects;
- */
- static abstract class Merger<T> {
-
- JavaWsdlMappingType reader;
-
- Merger(JavaWsdlMappingType r) {
- this.reader = r;
- }
-
- abstract T reflection();
-
- abstract T external();
-
- @SuppressWarnings("unchecked")
- T merge() {
- T reflection = reflection();
- if (reader == null) {
- return reflection;
- }
-
- T external = external();
- if (!MERGE.equals(reader.getExistingAnnotations())) {
- return external;
- }
-
- if (reflection instanceof Annotation) {
- return (T) doMerge((Annotation) reflection, (Annotation) external);
- } else if (reflection instanceof Annotation[][]) {
- return (T) doMerge((Annotation[][]) reflection, (Annotation[][]) external);
- } else {
- return (T) doMerge((Annotation[]) reflection, (Annotation[]) external);
- }
- }
-
- private Annotation doMerge(Annotation reflection, Annotation external) {
- return external != null ? external : reflection;
- }
-
- private Annotation[][] doMerge(Annotation[][] reflection, Annotation[][] external) {
- for (int i = 0; i < reflection.length; i++) {
- reflection[i] = doMerge(reflection[i], external.length > i ? external[i] : null);
- }
- return reflection;
- }
-
- private Annotation[] doMerge(Annotation[] annotations, Annotation[] externalAnnotations) {
- HashMap<String, Annotation> mergeMap = new HashMap<String, Annotation>();
- if (annotations != null) {
- for (Annotation reflectionAnnotation : annotations) {
- mergeMap.put(reflectionAnnotation.annotationType().getName(), reflectionAnnotation);
- }
- }
-
- // overriding happens here, based on annotationType().getName() ...
- if (externalAnnotations != null) {
- for (Annotation externalAnnotation : externalAnnotations) {
- mergeMap.put(externalAnnotation.annotationType().getName(), externalAnnotation);
- }
- }
- Collection<Annotation> values = mergeMap.values();
- int size = values.size();
- return size == 0 ? null : values.toArray(new Annotation[size]);
- }
-
- }
-
- static class Util {
-
- //private static final String DATABINDING_XSD = "com/sun/xml/internal/ws/model/jaxws-databinding.xsd";
- private static final String DATABINDING_XSD = "jaxws-databinding.xsd";
- //private static final String TRANSLATE_NAMESPACES_XSL = "/com/sun/xml/internal/ws/model/jaxws-databinding-translate-namespaces.xml";
- private static final String TRANSLATE_NAMESPACES_XSL = "jaxws-databinding-translate-namespaces.xml";
-
- static Schema schema;
- static JAXBContext jaxbContext;
-
- static {
- SchemaFactory sf = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
- try {
- URL xsdUrl = getResource();
- if (xsdUrl != null) {
- schema = sf.newSchema(xsdUrl);
- }
- } catch (SAXException e1) {
- // e1.printStackTrace();
- }
-
- jaxbContext = createJaxbContext(false);
- }
-
- private static URL getResource() {
- ClassLoader classLoader = Util.class.getClassLoader();
- return classLoader != null ? classLoader.getResource(DATABINDING_XSD) : ClassLoader.getSystemResource(DATABINDING_XSD);
- }
-
- private static JAXBContext createJaxbContext(boolean disableXmlSecurity) {
- Class[] cls = {ObjectFactory.class};
- try {
- if (disableXmlSecurity) {
- Map<String, Object> properties = new HashMap<String, Object>();
- properties.put(JAXBRIContext.DISABLE_XML_SECURITY, disableXmlSecurity);
- return JAXBContext.newInstance(cls, properties);
- } else {
- return JAXBContext.newInstance(cls);
- }
- } catch (JAXBException e) {
- e.printStackTrace();
- return null;
- }
- }
-
- @SuppressWarnings("unchecked")
- public static JavaWsdlMappingType read(Source src, boolean xsdValidation, boolean disableXmlSecurity) throws IOException, JAXBException {
- JAXBContext ctx = jaxbContext(disableXmlSecurity);
- try {
- Unmarshaller um = ctx.createUnmarshaller();
- if (xsdValidation) {
- if (schema == null) {
- //TODO 0 warning for schema == null
- }
- um.setSchema(schema);
- }
- Object o = um.unmarshal(src);
- return getJavaWsdlMapping(o);
- } catch (JAXBException e) {
- // throw new
- // WebServiceException(WsDatabindingMessages.mappingFileCannotRead
- // (src.getSystemId()), e);
- URL url = new URL(src.getSystemId());
- Source s = new StreamSource(url.openStream());
- Unmarshaller um = ctx.createUnmarshaller();
- if (xsdValidation) {
- if (schema == null) {
- //TODO 0 warning for schema == null
- }
- um.setSchema(schema);
- }
- Object o = um.unmarshal(s);
- return getJavaWsdlMapping(o);
- }
- }
-
- 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 disableXmlSecurity ? createJaxbContext(true) : jaxbContext;
- }
-
- 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(disableXmlSecurity));
- TransformerFactory tf = XmlUtil.newTransformerFactory(!disableXmlSecurity);
- Transformer transformer = tf.newTemplates(xsl).newTransformer();
- transformer.transform(src, result);
- return getJavaWsdlMapping(result.getResult());
- }
-
-
- static JavaWsdlMappingType getJavaWsdlMapping(Object o) {
- Object val = (o instanceof JAXBElement) ? ((JAXBElement) o).getValue() : o;
- if (val instanceof JavaWsdlMappingType) return (JavaWsdlMappingType) val;
- // else if (val instanceof JavaWsdlMappings)
- // for (JavaWsdlMappingType m: ((JavaWsdlMappings) val).getJavaWsdlMapping())
- // if (seiName.equals(m.javaTypeName)) return m;
- return null;
- }
-
- static <T> T findInstanceOf(Class<T> type, List<Object> objects) {
- for (Object o : objects) {
- if (type.isInstance(o)) {
- return type.cast(o);
- }
- }
- return null;
- }
-
- static public <T> T annotation(JavaWsdlMappingType jwse, Class<T> anntype) {
- if (jwse == null || jwse.getClassAnnotation() == null) {
- return null;
- }
- return findInstanceOf(anntype, jwse.getClassAnnotation());
- }
-
- static public <T> T annotation(JavaMethod jm, Class<T> anntype) {
- if (jm == null || jm.getMethodAnnotation() == null) {
- return null;
- }
- return findInstanceOf(anntype, jm.getMethodAnnotation());
- }
-
- static public <T> T annotation(JavaParam jp, Class<T> anntype) {
- if (jp == null || jp.getParamAnnotation() == null) {
- return null;
- }
- return findInstanceOf(anntype, jp.getParamAnnotation());
- }
-
- static public Element[] annotation(JavaMethod jm) {
- if (jm == null || jm.getMethodAnnotation() == null) {
- return null;
- }
- return findElements(jm.getMethodAnnotation());
- }
-
- static public Element[] annotation(JavaParam jp) {
- if (jp == null || jp.getParamAnnotation() == null) {
- return null;
- }
- return findElements(jp.getParamAnnotation());
- }
-
- private static Element[] findElements(List<Object> objects) {
- List<Element> elems = new ArrayList<Element>();
- for (Object o : objects) {
- if (o instanceof Element) {
- elems.add((Element) o);
- }
- }
- return elems.toArray(new Element[elems.size()]);
- }
-
- static String documentRootNamespace(Source src, boolean disableXmlSecurity) throws XMLStreamException {
- XMLInputFactory factory;
- factory = XmlUtil.newXMLInputFactory(!disableXmlSecurity);
- XMLStreamReader streamReader = factory.createXMLStreamReader(src);
- XMLStreamReaderUtil.nextElementContent(streamReader);
- String namespaceURI = streamReader.getName().getNamespaceURI();
- XMLStreamReaderUtil.close(streamReader);
- return namespaceURI;
- }
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/FieldSignature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/FieldSignature.java
deleted file mode 100644
index 2f8218f5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/FieldSignature.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model;
-
-import java.lang.reflect.*;
-
-/**
- * Creates vm signature string from Type
- *
- * TypeSignature: Z | C | B | S | I | F | J | D | FieldTypeSignature
- * FieldTypeSignature: ClassTypeSignature | [ TypeSignature | TypeVar
- * ClassTypeSignature: L Id ( / Id )* TypeArgs? ( . Id TypeArgs? )* ;
- * TypeArgs: < TypeArg+ >
- * TypeArg: * | ( + | - )? FieldTypeSignature
- * TypeVar: T Id ;
- *
- * @author Jitendra Kotamraju
- */
-final class FieldSignature {
-
- static String vms(Type t) {
- if (t instanceof Class && ((Class)t).isPrimitive()) {
- Class c = (Class)t;
- if (c == Integer.TYPE) {
- return "I";
- } else if (c == Void.TYPE) {
- return "V";
- } else if (c == Boolean.TYPE) {
- return "Z";
- } else if (c == Byte.TYPE) {
- return "B";
- } else if (c == Character.TYPE) {
- return "C";
- } else if (c == Short.TYPE) {
- return "S";
- } else if (c == Double.TYPE) {
- return "D";
- } else if (c == Float.TYPE) {
- return "F";
- } else if (c == Long.TYPE) {
- return "J";
- }
- } else if (t instanceof Class && ((Class)t).isArray()) {
- return "["+vms(((Class)t).getComponentType());
- } else if (t instanceof Class || t instanceof ParameterizedType) {
- return "L"+fqcn(t)+";";
- } else if (t instanceof GenericArrayType) {
- return "["+vms(((GenericArrayType)t).getGenericComponentType());
- } else if (t instanceof TypeVariable) {
- // While creating wrapper bean fields, it doesn't create with TypeVariables
- // Otherwise, the type variable need to be declared in the wrapper bean class
- // return "T"+((TypeVariable)t).getName()+";";
- return "Ljava/lang/Object;";
- } else if (t instanceof WildcardType) {
- WildcardType w = (WildcardType)t;
- if (w.getLowerBounds().length > 0) {
- return "-"+vms(w.getLowerBounds()[0]);
- } else if (w.getUpperBounds().length > 0) {
- Type wt = w.getUpperBounds()[0];
- if (wt.equals(Object.class)) {
- return "*";
- } else {
- return "+"+vms(wt);
- }
- }
- }
- throw new IllegalArgumentException("Illegal vms arg " + t);
- }
-
- private static String fqcn(Type t) {
- if (t instanceof Class) {
- Class c = (Class)t;
- if (c.getDeclaringClass() == null) {
- return c.getName().replace('.', '/');
- } else {
- return fqcn(c.getDeclaringClass())+"$"+c.getSimpleName();
- }
- } else if (t instanceof ParameterizedType) {
- ParameterizedType p = (ParameterizedType)t;
- if (p.getOwnerType() == null) {
- return fqcn(p.getRawType())+args(p);
- } else {
- assert p.getRawType() instanceof Class;
- return fqcn(p.getOwnerType())+"."+
- ((Class)p.getRawType()).getSimpleName()+args(p);
- }
- }
- throw new IllegalArgumentException("Illegal fqcn arg = "+t);
- }
-
- private static String args(ParameterizedType p) {
- StringBuilder sig = new StringBuilder("<");
- for(Type t : p.getActualTypeArguments()) {
- sig.append(vms(t));
- }
- return sig.append(">").toString();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Injector.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Injector.java
deleted file mode 100644
index 1ba5a4cd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Injector.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2008, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model;
-
-import javax.xml.ws.WebServiceException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * A {@link ClassLoader} used to "inject" wrapper and exception bean classes
- * into the VM.
- *
- * @author Jitendra kotamraju
- */
-final class Injector {
-
- private static final Logger LOGGER = Logger.getLogger(Injector.class.getName());
-
- private static final Method defineClass;
- private static final Method resolveClass;
- private static final Method getPackage;
- private static final Method definePackage;
-
- static {
- try {
- defineClass = ClassLoader.class.getDeclaredMethod("defineClass",String.class,byte[].class,Integer.TYPE,Integer.TYPE);
- resolveClass = ClassLoader.class.getDeclaredMethod("resolveClass",Class.class);
- getPackage = ClassLoader.class.getDeclaredMethod("getPackage", String.class);
- definePackage = ClassLoader.class.getDeclaredMethod("definePackage",
- String.class, String.class, String.class, String.class,
- String.class, String.class, String.class, URL.class);
- } catch (NoSuchMethodException e) {
- // impossible
- throw new NoSuchMethodError(e.getMessage());
- }
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
- public Void run() {
- // TODO: check security implication
- // do these setAccessible allow anyone to call these methods freely?s
- defineClass.setAccessible(true);
- resolveClass.setAccessible(true);
- getPackage.setAccessible(true);
- definePackage.setAccessible(true);
- return null;
- }
- });
- }
-
- static synchronized Class inject(ClassLoader cl, String className, byte[] image) {
- // To avoid race conditions let us check if the classloader
- // already contains the class
- try {
- return cl.loadClass(className);
- } catch (ClassNotFoundException e) {
- // nothing to do
- }
- try {
- int packIndex = className.lastIndexOf('.');
- if (packIndex != -1) {
- String pkgname = className.substring(0, packIndex);
- // Check if package already loaded.
- Package pkg = (Package)getPackage.invoke(cl, pkgname);
- if (pkg == null) {
- definePackage.invoke(cl, pkgname, null, null, null, null, null, null, null);
- }
- }
-
- Class c = (Class)defineClass.invoke(cl,className.replace('/','.'),image,0,image.length);
- resolveClass.invoke(cl, c);
- return c;
- } catch (IllegalAccessException e) {
- LOGGER.log(Level.FINE,"Unable to inject "+className,e);
- throw new WebServiceException(e);
- } catch (InvocationTargetException e) {
- LOGGER.log(Level.FINE,"Unable to inject "+className,e);
- throw new WebServiceException(e);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/JavaMethodImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/JavaMethodImpl.java
deleted file mode 100644
index c6acfe0b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/JavaMethodImpl.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model;
-
-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;
-import com.sun.xml.internal.ws.api.model.MEP;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault;
-import com.sun.xml.internal.ws.api.model.soap.SOAPBinding;
-import com.sun.xml.internal.ws.model.soap.SOAPBindingImpl;
-import com.sun.xml.internal.ws.spi.db.TypeInfo;
-import com.sun.xml.internal.ws.wsdl.ActionBasedOperationSignature;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Action;
-import javax.xml.ws.WebServiceException;
-import javax.jws.WebMethod;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.logging.Logger;
-
-/**
- * Build this runtime model using java SEI and annotations
- *
- * @author Vivek Pandey
- */
-public final class JavaMethodImpl implements JavaMethod {
-
- private String inputAction = "";
- private String outputAction = "";
- private final List<CheckedExceptionImpl> exceptions = new ArrayList<CheckedExceptionImpl>();
- private final Method method;
- /*package*/ final List<ParameterImpl> requestParams = new ArrayList<ParameterImpl>();
- /*package*/ final List<ParameterImpl> responseParams = new ArrayList<ParameterImpl>();
- private final List<ParameterImpl> unmReqParams = Collections.unmodifiableList(requestParams);
- private final List<ParameterImpl> unmResParams = Collections.unmodifiableList(responseParams);
- private SOAPBinding binding;
- private MEP mep;
- private QName operationName;
- private WSDLBoundOperation wsdlOperation;
- /*package*/ final AbstractSEIModelImpl owner;
- private final Method seiMethod;
- private QName requestPayloadName;
- private String soapAction;
-
- /**
- * @param owner
- * @param method : Implementation class method
- * @param seiMethod : corresponding SEI Method.
- * Is there is no SEI, it should be Implementation class method
- */
- public JavaMethodImpl(AbstractSEIModelImpl owner, Method method, Method seiMethod, MetadataReader metadataReader) {
- this.owner = owner;
- this.method = method;
- this.seiMethod = seiMethod;
- setWsaActions(metadataReader);
- }
-
- private void setWsaActions(MetadataReader metadataReader) {
- Action action = (metadataReader != null)? metadataReader.getAnnotation(Action.class, seiMethod):seiMethod.getAnnotation(Action.class);
- if(action != null) {
- inputAction = action.input();
- outputAction = action.output();
- }
-
- //@Action(input) =="", get it from @WebMethod(action)
- WebMethod webMethod = (metadataReader != null)? metadataReader.getAnnotation(WebMethod.class, seiMethod):seiMethod.getAnnotation(WebMethod.class);
- soapAction = "";
- if (webMethod != null )
- soapAction = webMethod.action();
- if(!soapAction.equals("")) {
- //non-empty soapAction
- if(inputAction.equals(""))
- // set input action to non-empty soapAction
- inputAction = soapAction;
- else if(!inputAction.equals(soapAction)){
- //both are explicitly set via annotations, make sure @Action == @WebMethod.action
- //http://java.net/jira/browse/JAX_WS-1108
- //throw new WebServiceException("@Action and @WebMethod(action=\"\" does not match on operation "+ method.getName());
- }
- }
- }
-
- public ActionBasedOperationSignature getOperationSignature() {
- QName qname = getRequestPayloadName();
- if (qname == null) qname = new QName("", "");
- return new ActionBasedOperationSignature(getInputAction(), qname);
- }
-
- public SEIModel getOwner() {
- return owner;
- }
-
- /**
- * @see JavaMethod
- *
- * @return Returns the method.
- */
- public Method getMethod() {
- return method;
- }
-
- /**
- * @see JavaMethod
- *
- * @return Returns the SEI method where annotations are present
- */
- public Method getSEIMethod() {
- return seiMethod;
- }
-
- /**
- * @return Returns the mep.
- */
- public MEP getMEP() {
- return mep;
- }
-
- /**
- * @param mep
- * The mep to set.
- */
- void setMEP(MEP mep) {
- this.mep = mep;
- }
-
- /**
- * @return the Binding object
- */
- public SOAPBinding getBinding() {
- if (binding == null)
- return new SOAPBindingImpl();
- return binding;
- }
-
- /**
- * @param binding
- */
- void setBinding(SOAPBinding binding) {
- this.binding = binding;
- }
-
- /**
- * Returns the {@link WSDLBoundOperation} Operation associated with {@link JavaMethodImpl}
- * operation.
- * @deprecated
- * @return the WSDLBoundOperation for this JavaMethod
- */
- public WSDLBoundOperation getOperation() {
-// assert wsdlOperation != null;
- return wsdlOperation;
- }
-
- public void setOperationQName(QName name) {
- this.operationName = name;
- }
-
- public QName getOperationQName() {
- return (wsdlOperation != null)? wsdlOperation.getName(): operationName;
- }
-
- public String getSOAPAction() {
- return (wsdlOperation != null)? wsdlOperation.getSOAPAction(): soapAction;
- }
-
- public String getOperationName() {
- return operationName.getLocalPart();
- }
-
- public String getRequestMessageName() {
- return getOperationName();
- }
-
- public String getResponseMessageName() {
- if(mep.isOneWay())
- return null;
- return getOperationName()+"Response";
- }
-
- public void setRequestPayloadName(QName n) {
- requestPayloadName = n;
- }
-
- /**
- * @return soap:Body's first child name for request message.
- */
- public @Nullable QName getRequestPayloadName() {
- 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.getResponsePayloadName();
- }
-
- /**
- * @return returns unmodifiable list of request parameters
- */
- public List<ParameterImpl> getRequestParameters() {
- return unmReqParams;
- }
-
- /**
- * @return returns unmodifiable list of response parameters
- */
- public List<ParameterImpl> getResponseParameters() {
- return unmResParams;
- }
-
- void addParameter(ParameterImpl p) {
- if (p.isIN() || p.isINOUT()) {
- assert !requestParams.contains(p);
- requestParams.add(p);
- }
-
- if (p.isOUT() || p.isINOUT()) {
- // this check is only for out parameters
- assert !responseParams.contains(p);
- responseParams.add(p);
- }
- }
-
- void addRequestParameter(ParameterImpl p){
- if (p.isIN() || p.isINOUT()) {
- requestParams.add(p);
- }
- }
-
- void addResponseParameter(ParameterImpl p){
- if (p.isOUT() || p.isINOUT()) {
- responseParams.add(p);
- }
- }
-
- /**
- * @return Returns number of java method parameters - that will be all the
- * IN, INOUT and OUT holders
- *
- * @deprecated no longer use in the new architecture
- */
- public int getInputParametersCount() {
- int count = 0;
- for (ParameterImpl param : requestParams) {
- if (param.isWrapperStyle()) {
- count += ((WrapperParameter) param).getWrapperChildren().size();
- } else {
- count++;
- }
- }
-
- for (ParameterImpl param : responseParams) {
- if (param.isWrapperStyle()) {
- for (ParameterImpl wc : ((WrapperParameter) param).getWrapperChildren()) {
- if (!wc.isResponse() && wc.isOUT()) {
- count++;
- }
- }
- } else if (!param.isResponse() && param.isOUT()) {
- count++;
- }
- }
-
- return count;
- }
-
- /**
- * @param ce
- */
- void addException(CheckedExceptionImpl ce) {
- if (!exceptions.contains(ce))
- exceptions.add(ce);
- }
-
- /**
- * @param exceptionClass
- * @return CheckedException corresponding to the exceptionClass. Returns
- * null if not found.
- */
- public CheckedExceptionImpl getCheckedException(Class exceptionClass) {
- for (CheckedExceptionImpl ce : exceptions) {
- if (ce.getExceptionClass()==exceptionClass)
- return ce;
- }
- return null;
- }
-
-
- /**
- * @return a list of checked Exceptions thrown by this method
- */
- public List<CheckedExceptionImpl> getCheckedExceptions(){
- return Collections.unmodifiableList(exceptions);
- }
-
- public String getInputAction() {
-// return (wsdlOperation != null)? wsdlOperation.getOperation().getInput().getAction(): inputAction;
- return inputAction;
- }
-
- public String getOutputAction() {
-// return (wsdlOperation != null)? wsdlOperation.getOperation().getOutput().getAction(): outputAction;
- return outputAction;
- }
-
- /**
- * @deprecated
- * @param detailType
- * @return Gets the CheckedException corresponding to detailType. Returns
- * null if no CheckedExcpetion with the detailType found.
- */
- public CheckedExceptionImpl getCheckedException(TypeReference detailType) {
- for (CheckedExceptionImpl ce : exceptions) {
- TypeInfo actual = ce.getDetailType();
- if (actual.tagName.equals(detailType.tagName) && actual.type==detailType.type) {
- return ce;
- }
- }
- return null;
- }
-
-
-
- /**
- * Returns if the java method is async
- * @return if this is an Asynch
- */
- public boolean isAsync(){
- return mep.isAsync;
- }
-
- /*package*/ void freeze(WSDLPort portType) {
- this.wsdlOperation = portType.getBinding().get(new QName(portType.getBinding().getPortType().getName().getNamespaceURI(),getOperationName()));
- // TODO: replace this with proper error handling
- if(wsdlOperation ==null)
- throw new WebServiceException("Method "+seiMethod.getName()+" is exposed as WebMethod, but there is no corresponding wsdl operation with name "+operationName+" in the wsdl:portType" + portType.getBinding().getPortType().getName());
-
- //so far, the inputAction, outputAction and fault actions are set from the @Action and @FaultAction
- //set the values from WSDLModel, if such annotations are not present or defaulted
- if(inputAction.equals("")) {
- inputAction = wsdlOperation.getOperation().getInput().getAction();
- } else if(!inputAction.equals(wsdlOperation.getOperation().getInput().getAction()))
- //TODO input action might be from @Action or WebMethod(action)
- LOGGER.warning("Input Action on WSDL operation "+wsdlOperation.getName().getLocalPart() + " and @Action on its associated Web Method " + seiMethod.getName() +" did not match and will cause problems in dispatching the requests");
-
- if (!mep.isOneWay()) {
- if (outputAction.equals(""))
- outputAction = wsdlOperation.getOperation().getOutput().getAction();
-
- for (CheckedExceptionImpl ce : exceptions) {
- if (ce.getFaultAction().equals("")) {
- QName detailQName = ce.getDetailType().tagName;
- WSDLFault wsdlfault = wsdlOperation.getOperation().getFault(detailQName);
- if(wsdlfault == null) {
- // mismatch between wsdl model and SEI model, log a warning and use SEI model for Action determination
- LOGGER.warning("Mismatch between Java model and WSDL model found, For wsdl operation " +
- wsdlOperation.getName() + ",There is no matching wsdl fault with detail QName " +
- ce.getDetailType().tagName);
- ce.setFaultAction(ce.getDefaultFaultAction());
- } else {
- ce.setFaultAction(wsdlfault.getAction());
- }
- }
- }
- }
- }
-
- final void fillTypes(List<TypeInfo> types) {
- fillTypes(requestParams, types);
- fillTypes(responseParams, types);
-
- for (CheckedExceptionImpl ce : exceptions) {
- types.add(ce.getDetailType());
- }
- }
-
- private void fillTypes(List<ParameterImpl> params, List<TypeInfo> types) {
- for (ParameterImpl p : params) {
- p.fillTypes(types);
- }
- }
-
- private static final Logger LOGGER = Logger.getLogger(com.sun.xml.internal.ws.model.JavaMethodImpl.class.getName());
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ParameterImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ParameterImpl.java
deleted file mode 100644
index d17dd3c8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ParameterImpl.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model;
-
-import com.sun.xml.internal.bind.api.Bridge;
-import com.sun.xml.internal.bind.api.TypeReference;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.api.model.Parameter;
-import com.sun.xml.internal.ws.api.model.ParameterBinding;
-import com.sun.xml.internal.ws.spi.db.RepeatedElementBridge;
-import com.sun.xml.internal.ws.spi.db.WrapperComposite;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.spi.db.TypeInfo;
-
-import javax.jws.WebParam.Mode;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Holder;
-import java.util.List;
-
-/**
- * runtime Parameter that abstracts the annotated java parameter
- *
- * <p>
- * A parameter may be bound to a header, a body, or an attachment.
- * Note that when it's bound to a body, it's bound to a body,
- * it binds to the whole payload.
- *
- * <p>
- * Sometimes multiple Java parameters are packed into the payload,
- * in which case the subclass {@link WrapperParameter} is used.
- *
- * @author Vivek Pandey
- */
-public class ParameterImpl implements Parameter {
-
- private ParameterBinding binding;
- private ParameterBinding outBinding;
- private String partName;
- private final int index;
- private final Mode mode;
- /** @deprecated */
- private TypeReference typeReference;
- private TypeInfo typeInfo;
- private QName name;
- private final JavaMethodImpl parent;
-
- WrapperParameter wrapper;
- TypeInfo itemTypeInfo;
-
- public ParameterImpl(JavaMethodImpl parent, TypeInfo type, Mode mode, int index) {
- assert type != null;
-
- this.typeInfo = type;
- this.name = type.tagName;
- this.mode = mode;
- this.index = index;
- this.parent = parent;
- }
-
- public AbstractSEIModelImpl getOwner() {
- return parent.owner;
- }
-
- public JavaMethod getParent() {
- return parent;
- }
-
- /**
- * @return Returns the name.
- */
- public QName getName() {
- return name;
- }
-
- public XMLBridge getXMLBridge() {
- return getOwner().getXMLBridge(typeInfo);
- }
-
- public XMLBridge getInlinedRepeatedElementBridge() {
- TypeInfo itemType = getItemType();
- if (itemType != null) {
- XMLBridge xb = getOwner().getXMLBridge(itemType);
- if (xb != null) return new RepeatedElementBridge(typeInfo, xb);
- }
- return null;
- }
-
- public TypeInfo getItemType() {
- if (itemTypeInfo != null) return itemTypeInfo;
- //RpcLit cannot inline repeated element in wrapper
- if (parent.getBinding().isRpcLit() || wrapper == null) return null;
- //InlinedRepeatedElementBridge is only used for dynamic wrapper (no wrapper class)
- if (!WrapperComposite.class.equals(wrapper.getTypeInfo().type)) return null;
- if (!getBinding().isBody()) return null;
- itemTypeInfo = typeInfo.getItemType();
- return itemTypeInfo;
- }
-
- /** @deprecated */
- public Bridge getBridge() {
- return getOwner().getBridge(typeReference);
- }
- /** @deprecated */
- protected Bridge getBridge(TypeReference typeRef) {
- return getOwner().getBridge(typeRef);
- }
-
- /**
- * TODO: once the model gets JAXBContext, shouldn't {@link Bridge}s
- * be made available from model objects?
- * @deprecated use getTypeInfo
- * @return Returns the TypeReference associated with this Parameter
- */
- public TypeReference getTypeReference() {
- return typeReference;
- }
- public TypeInfo getTypeInfo() {
- return typeInfo;
- }
-
- /**
- * Sometimes we need to overwrite the typeReferenc, such as during patching for rpclit
- * @see AbstractSEIModelImpl#applyRpcLitParamBinding(JavaMethodImpl, WrapperParameter, WSDLBoundPortType, WebParam.Mode)
- * @deprecated
- */
- void setTypeReference(TypeReference type){
- typeReference = type;
- name = type.tagName;
- }
-
-
- public Mode getMode() {
- return mode;
- }
-
- public int getIndex() {
- return index;
- }
-
- /**
- * @return true if <tt>this instanceof {@link WrapperParameter}</tt>.
- */
- public boolean isWrapperStyle() {
- return false;
- }
-
- public boolean isReturnValue() {
- return index==-1;
- }
-
- /**
- * @return the Binding for this Parameter
- */
- public ParameterBinding getBinding() {
- if(binding == null)
- return ParameterBinding.BODY;
- return binding;
- }
-
- /**
- * @param binding
- */
- public void setBinding(ParameterBinding binding) {
- this.binding = binding;
- }
-
- public void setInBinding(ParameterBinding binding){
- this.binding = binding;
- }
-
- public void setOutBinding(ParameterBinding binding){
- this.outBinding = binding;
- }
-
- public ParameterBinding getInBinding(){
- return binding;
- }
-
- public ParameterBinding getOutBinding(){
- if(outBinding == null)
- return binding;
- return outBinding;
- }
-
- public boolean isIN() {
- return mode==Mode.IN;
- }
-
- public boolean isOUT() {
- return mode==Mode.OUT;
- }
-
- public boolean isINOUT() {
- return mode==Mode.INOUT;
- }
-
- /**
- * If true, this parameter maps to the return value of a method invocation.
- *
- * <p>
- * {@link JavaMethodImpl#getResponseParameters()} is guaranteed to have
- * at most one such {@link ParameterImpl}. Note that there coule be none,
- * in which case the method returns <tt>void</tt>.
- */
- public boolean isResponse() {
- return index == -1;
- }
-
-
- /**
- * Gets the holder value if applicable. To be called for inbound client side
- * message.
- *
- * @param obj
- * @return the holder value if applicable.
- */
- public Object getHolderValue(Object obj) {
- if (obj != null && obj instanceof Holder)
- return ((Holder) obj).value;
- return obj;
- }
-
- public String getPartName() {
- if(partName == null)
- return name.getLocalPart();
- return partName;
- }
-
- public void setPartName(String partName) {
- this.partName = partName;
- }
-
- void fillTypes(List<TypeInfo> types) {
- TypeInfo itemType = getItemType();
- types.add((itemType != null) ? itemType : getTypeInfo());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ReflectAnnotationReader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ReflectAnnotationReader.java
deleted file mode 100644
index 004c52c6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ReflectAnnotationReader.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Map;
-
-import com.sun.xml.internal.ws.api.databinding.MetadataReader;
-
-/**
- * ReflectAnnotationReader
- *
- * @author shih-chang.chen@oracle.com
- */
-public class ReflectAnnotationReader implements MetadataReader {
-//getAnnotationOnImpl SEIorIMpl
- public Annotation[] getAnnotations(Method m) {
- return m.getAnnotations();
- }
-
- public Annotation[][] getParameterAnnotations(final Method method) {
- return AccessController.doPrivileged(new PrivilegedAction<Annotation[][]>() {
- public Annotation[][] run() {
- return method.getParameterAnnotations();
- }
- });
- }
-
- public <A extends Annotation> A getAnnotation(final Class<A> annType, final Method m) {
- return AccessController.doPrivileged(new PrivilegedAction<A>() {
- public A run() {
- return m.getAnnotation(annType);
- }
- });
- }
-
- public <A extends Annotation> A getAnnotation(final Class<A> annType, final Class<?> cls) {
- return AccessController.doPrivileged(new PrivilegedAction<A>() {
- public A run() {
- return cls.getAnnotation(annType);
- }
- });
- }
-
- public Annotation[] getAnnotations(final Class<?> cls) {
- return AccessController.doPrivileged(new PrivilegedAction<Annotation[]>() {
- public Annotation[] run() {
- return cls.getAnnotations();
- }
- });
- }
-
- public void getProperties(final Map<String, Object> prop, final Class<?> cls){}
-
- public void getProperties(final Map<String, Object> prop, final Method method){}
-
- public void getProperties(final Map<String, Object> prop, final Method method, int pos){}
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java
deleted file mode 100644
index a466b845..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java
+++ /dev/null
@@ -1,1737 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.databinding.DatabindingConfig;
-import com.sun.xml.internal.ws.api.databinding.MetadataReader;
-import com.sun.xml.internal.ws.api.model.ExceptionType;
-import com.sun.xml.internal.ws.api.model.MEP;
-import com.sun.xml.internal.ws.api.model.Parameter;
-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.WSDLInput;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPart;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
-import com.sun.xml.internal.ws.model.soap.SOAPBindingImpl;
-import com.sun.xml.internal.ws.resources.ModelerMessages;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.TypeInfo;
-import com.sun.xml.internal.ws.spi.db.WrapperComposite;
-
-import static com.sun.xml.internal.ws.binding.WebServiceFeatureList.getSoapVersion;
-
-import javax.jws.*;
-import javax.jws.WebParam.Mode;
-import javax.jws.soap.SOAPBinding;
-import javax.jws.soap.SOAPBinding.Style;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.namespace.QName;
-import javax.xml.ws.*;
-import javax.xml.ws.soap.MTOM;
-import javax.xml.ws.soap.MTOMFeature;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.rmi.RemoteException;
-import java.security.AccessController;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.TreeMap;
-import java.util.concurrent.Future;
-import java.util.logging.Logger;
-
-import static javax.jws.soap.SOAPBinding.ParameterStyle.WRAPPED;
-
-/**
- * Creates a runtime model of a SEI (portClass).
- *
- * @author WS Developement Team
- */
-public class RuntimeModeler {
- private final WebServiceFeatureList features;
- private BindingID bindingId;
- private WSBinding wsBinding;
- private final Class portClass;
- private AbstractSEIModelImpl model;
- private SOAPBindingImpl defaultBinding;
- // can be empty but never null
- private String packageName;
- private String targetNamespace;
- private boolean isWrapped = true;
- private ClassLoader classLoader;
- private final WSDLPort binding;
- private QName serviceName;
- private QName portName;
- private Set<Class> classUsesWebMethod;
- private DatabindingConfig config;
- private MetadataReader metadataReader;
- /**
- *
- */
- public static final String PD_JAXWS_PACKAGE_PD = ".jaxws.";
- /**
- *
- */
- public static final String JAXWS_PACKAGE_PD = "jaxws.";
- public static final String RESPONSE = "Response";
- public static final String RETURN = "return";
- public static final String BEAN = "Bean";
- public static final String SERVICE = "Service";
- public static final String PORT = "Port";
- public static final Class HOLDER_CLASS = Holder.class;
- public static final Class<RemoteException> REMOTE_EXCEPTION_CLASS = RemoteException.class;
- public static final Class<RuntimeException> RUNTIME_EXCEPTION_CLASS = RuntimeException.class;
- public static final Class<Exception> EXCEPTION_CLASS = Exception.class;
- public static final String DecapitalizeExceptionBeanProperties = "com.sun.xml.internal.ws.api.model.DecapitalizeExceptionBeanProperties";
- public static final String SuppressDocLitWrapperGeneration = "com.sun.xml.internal.ws.api.model.SuppressDocLitWrapperGeneration";
- public static final String DocWrappeeNamespapceQualified = "com.sun.xml.internal.ws.api.model.DocWrappeeNamespapceQualified";
-
- /*public RuntimeModeler(@NotNull Class portClass, @NotNull QName serviceName, @NotNull BindingID bindingId, @NotNull WebServiceFeature... features) {
- this(portClass, serviceName, null, bindingId, features);
- }*/
-
- /**
- *
- * creates an instance of RunTimeModeler given a <code>sei</code> and <code>binding</code>
- * @param portClass The SEI class to be modeled.
- * @param serviceName The ServiceName to use instead of one calculated from the implementation class
- * @param wsdlPort {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLPort}
- * @param features web service features
- */
- /*public RuntimeModeler(@NotNull Class portClass, @NotNull QName serviceName, @NotNull WSDLPortImpl wsdlPort, @NotNull WebServiceFeature... features){
- this(portClass, serviceName, wsdlPort, wsdlPort.getBinding().getBindingId(), features);
- }*/
-
- /*private RuntimeModeler(@NotNull Class portClass, @NotNull QName serviceName, WSDLPortImpl binding, BindingID bindingId, @NotNull WebServiceFeature... features) {
- this.portClass = portClass;
- this.serviceName = serviceName;
- this.binding = binding;
- this.bindingId = bindingId;
- this.features = features;
- }*/
-
- public RuntimeModeler(@NotNull DatabindingConfig config){
- this.portClass = (config.getEndpointClass() != null)? config.getEndpointClass() : config.getContractClass();
- this.serviceName = config.getMappingInfo().getServiceName();
- this.binding = config.getWsdlPort();
- this.classLoader = config.getClassLoader();
- this.portName = config.getMappingInfo().getPortName();
- this.config = config;
- this.wsBinding = config.getWSBinding();
- metadataReader = config.getMetadataReader();
- targetNamespace = config.getMappingInfo().getTargetNamespace();
- if (metadataReader == null) metadataReader = new ReflectAnnotationReader();
- if (wsBinding != null) {
- this.bindingId = wsBinding.getBindingId();
- if (config.getFeatures() != null) wsBinding.getFeatures().mergeFeatures(config.getFeatures(), false);
- if (binding != null) wsBinding.getFeatures().mergeFeatures(binding.getFeatures(), false);
- this.features = WebServiceFeatureList.toList(wsBinding.getFeatures());
- } else {
- this.bindingId = config.getMappingInfo().getBindingID();
- this.features = WebServiceFeatureList.toList(config.getFeatures());
- if (binding != null) bindingId = binding.getBinding().getBindingId();
- if (bindingId == null) bindingId = getDefaultBindingID();
- if (!features.contains(MTOMFeature.class)) {
- MTOM mtomAn = getAnnotation(portClass, MTOM.class);
- if (mtomAn != null) features.add(WebServiceFeatureList.getFeature(mtomAn));
- }
- if (!features.contains(com.oracle.webservices.internal.api.EnvelopeStyleFeature.class)) {
- com.oracle.webservices.internal.api.EnvelopeStyle es = getAnnotation(portClass, com.oracle.webservices.internal.api.EnvelopeStyle.class);
- if (es != null) features.add(WebServiceFeatureList.getFeature(es));
- }
- this.wsBinding = bindingId.createBinding(features);
- }
- }
-
- private BindingID getDefaultBindingID() {
- BindingType bt = getAnnotation(portClass, BindingType.class);
- if (bt != null) return BindingID.parse(bt.value());
- SOAPVersion ver = getSoapVersion(features);
- boolean mtomEnabled = features.isEnabled(MTOMFeature.class);
- if (SOAPVersion.SOAP_12.equals(ver)) {
- return (mtomEnabled) ? BindingID.SOAP12_HTTP_MTOM : BindingID.SOAP12_HTTP;
- } else {
- return (mtomEnabled) ? BindingID.SOAP11_HTTP_MTOM : BindingID.SOAP11_HTTP;
- }
- }
-
- /**
- * sets the classloader to be used when loading classes by the <code>RuntimeModeler</code>.
- * @param classLoader ClassLoader used to load classes
- */
- public void setClassLoader(ClassLoader classLoader) {
- this.classLoader = classLoader;
- }
-
- /**
- * sets the PortName to be used by the <code>RuntimeModeler</code>.
- * @param portName The PortName to be used instead of the PortName
- * retrieved via annotations
- */
- public void setPortName(QName portName) {
- this.portName = portName;
- }
-
- private <T extends Annotation> T getAnnotation(final Class<?> clazz, final Class<T> T) {
- return metadataReader.getAnnotation(T, clazz);
- }
-
- private <T extends Annotation> T getAnnotation(final Method method, final Class<T> T) {
- return metadataReader.getAnnotation(T, method);
- }
-
- private Annotation[] getAnnotations(final Method method) {
- return metadataReader.getAnnotations(method);
- }
-
- private Annotation[] getAnnotations(final Class<?> c) {
- return metadataReader.getAnnotations(c);
- }
- private Annotation[][] getParamAnnotations(final Method method) {
- return metadataReader.getParameterAnnotations(method);
- }
-
- private static final Logger logger =
- Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server");
-
- //currently has many local vars which will be eliminated after debugging issues
- //first draft
- /**
- * builds the runtime model from the <code>portClass</code> using the binding ID <code>bindingId</code>.
- * @return the runtime model for the <code>portClass</code>.
- */
- public AbstractSEIModelImpl buildRuntimeModel() {
- model = new SOAPSEIModel(features);
- model.contractClass = config.getContractClass();
- model.endpointClass = config.getEndpointClass();
- model.classLoader = this.classLoader;
- model.wsBinding = wsBinding;
- model.databindingInfo.setWsdlURL(config.getWsdlURL());
- model.databindingInfo.properties().putAll(config.properties());
- if (model.contractClass == null) model.contractClass = portClass;
- if (model.endpointClass == null && !portClass.isInterface()) model.endpointClass = portClass;
- Class<?> seiClass = portClass;
- metadataReader.getProperties(model.databindingInfo.properties(), portClass);
- WebService webService = getAnnotation(portClass, WebService.class);
- if (webService == null) {
- throw new RuntimeModelerException("runtime.modeler.no.webservice.annotation",
- portClass.getCanonicalName());
- }
- Class<?> seiFromConfig = configEndpointInterface();
- if (webService.endpointInterface().length() > 0 || seiFromConfig != null) {
- if (seiFromConfig != null) {
- seiClass = seiFromConfig;
- } else {
- seiClass = getClass(webService.endpointInterface(), ModelerMessages.localizableRUNTIME_MODELER_CLASS_NOT_FOUND(webService.endpointInterface()));
- }
- model.contractClass = seiClass;
- model.endpointClass = portClass;
- WebService seiService = getAnnotation(seiClass, WebService.class);
- if (seiService == null) {
- throw new RuntimeModelerException("runtime.modeler.endpoint.interface.no.webservice",
- webService.endpointInterface());
- }
-
- //check if @SOAPBinding is defined on the impl class
- SOAPBinding sbPortClass = getAnnotation(portClass, SOAPBinding.class);
- SOAPBinding sbSei = getAnnotation(seiClass, SOAPBinding.class);
- if(sbPortClass != null){
- if(sbSei == null || sbSei.style() != sbPortClass.style()|| sbSei.use() != sbPortClass.use()){
- logger.warning(ServerMessages.RUNTIMEMODELER_INVALIDANNOTATION_ON_IMPL("@SOAPBinding", portClass.getName(), seiClass.getName()));
- }
- }
- }
- if (serviceName == null)
- serviceName = getServiceName(portClass, metadataReader);
- model.setServiceQName(serviceName);
-
-// String portLocalName = portClass.getSimpleName()+PORT;
-// if (webService.portName().length() >0) {
-// portLocalName = webService.portName();
-// } else if (webService.name().length() >0) {
-// portLocalName = webService.name()+PORT;
-// }
-//
-// if (portName == null)
-// portName = new QName(serviceName.getNamespaceURI(), portLocalName);
-// if (!portName.getNamespaceURI().equals(serviceName.getNamespaceURI())) {
-// throw new RuntimeModelerException("runtime.modeler.portname.servicename.namespace.mismatch",
-// serviceName, portName);
-// }
-
- if (portName == null) portName = getPortName(portClass, metadataReader, serviceName.getNamespaceURI());
- model.setPortName(portName);
-
- // Check if databinding is overridden in annotation.
- com.oracle.webservices.internal.api.databinding.DatabindingMode dbm2 = getAnnotation(portClass, com.oracle.webservices.internal.api.databinding.DatabindingMode.class);
- if (dbm2 != null) model.databindingInfo.setDatabindingMode(dbm2.value());
-
- processClass(seiClass);
- if (model.getJavaMethods().size() == 0)
- throw new RuntimeModelerException("runtime.modeler.no.operations",
- portClass.getName());
- model.postProcess();
-
- // Make the configured databinding mode available to the
- // DatabindingConfig.
- config.properties().put(BindingContext.class.getName(),
- model.bindingContext);
-
- // TODO: this needs to be fixed properly --
- // when we are building RuntimeModel first before building WSDLModel,
- // we still need to do this correctly
- if(binding!=null)
- model.freeze(binding);
- return model;
- }
-
- private Class configEndpointInterface() {
- if (config.getEndpointClass() == null ||
- config.getEndpointClass().isInterface() ) return null; //client proxy Interface
- return config.getContractClass();
- }
-
- /**
- * utility method to load classes
- * @param className the name of the class to load
- * @param errorMessage
- * Error message to use when the resolution fails.
- * @return the class specified by <code>className</code>
- */
- private Class getClass(String className, Localizable errorMessage) {
- try {
- if (classLoader == null)
- return Thread.currentThread().getContextClassLoader().loadClass(className);
- else
- return classLoader.loadClass(className);
- } catch (ClassNotFoundException e) {
- throw new RuntimeModelerException(errorMessage);
- }
- }
-
- private boolean noWrapperGen() {
- Object o = config.properties().get(SuppressDocLitWrapperGeneration);
- return (o!= null && o instanceof Boolean) ? ((Boolean) o) : false;
- }
-
- private Class getRequestWrapperClass(String className, Method method, QName reqElemName) {
- ClassLoader loader = (classLoader == null) ? Thread.currentThread().getContextClassLoader() : classLoader;
- try {
- return loader.loadClass(className);
- } catch (ClassNotFoundException e) {
- if (noWrapperGen()) return WrapperComposite.class;
- logger.fine("Dynamically creating request wrapper Class " + className);
- return WrapperBeanGenerator.createRequestWrapperBean(className, method, reqElemName, loader);
- }
- }
-
- private Class getResponseWrapperClass(String className, Method method, QName resElemName) {
- ClassLoader loader = (classLoader == null) ? Thread.currentThread().getContextClassLoader() : classLoader;
- try {
- return loader.loadClass(className);
- } catch (ClassNotFoundException e) {
- if (noWrapperGen()) return WrapperComposite.class;
- logger.fine("Dynamically creating response wrapper bean Class " + className);
- return WrapperBeanGenerator.createResponseWrapperBean(className, method, resElemName, loader);
- }
- }
-
-
- private Class getExceptionBeanClass(String className, Class exception, String name, String namespace) {
- boolean decapitalizeExceptionBeanProperties = true;
- Object o = config.properties().get(DecapitalizeExceptionBeanProperties);
- if (o!= null && o instanceof Boolean) decapitalizeExceptionBeanProperties = (Boolean) o;
- ClassLoader loader = (classLoader == null) ? Thread.currentThread().getContextClassLoader() : classLoader;
- try {
- return loader.loadClass(className);
- } catch (ClassNotFoundException e) {
- logger.fine("Dynamically creating exception bean Class " + className);
- return WrapperBeanGenerator.createExceptionBean(className, exception, targetNamespace, name, namespace, loader, decapitalizeExceptionBeanProperties);
- }
- }
-
- protected void determineWebMethodUse(Class clazz) {
- if (clazz == null)
- return;
- if (!clazz.isInterface()) {
- if (clazz == Object.class)
- return;
- WebMethod webMethod;
- for (Method method : clazz.getMethods()) {
- if (method.getDeclaringClass()!=clazz)
- continue;
- webMethod = getAnnotation(method, WebMethod.class);
- if (webMethod != null && !webMethod.exclude()) {
- classUsesWebMethod.add(clazz);
- break;
- }
- }
- }
- determineWebMethodUse(clazz.getSuperclass());
- }
-
- void processClass(Class clazz) {
- classUsesWebMethod = new HashSet<Class>();
- determineWebMethodUse(clazz);
- WebService webService = getAnnotation(clazz, WebService.class);
- QName portTypeName = getPortTypeName(clazz, targetNamespace, metadataReader);
-// String portTypeLocalName = clazz.getSimpleName();
-// if (webService.name().length() >0)
-// portTypeLocalName = webService.name();
-//
-// targetNamespace = webService.targetNamespace();
- packageName = "";
- if (clazz.getPackage() != null)
- packageName = clazz.getPackage().getName();
-// if (targetNamespace.length() == 0) {
-// targetNamespace = getNamespace(packageName);
-// }
-// model.setTargetNamespace(targetNamespace);
-// QName portTypeName = new QName(targetNamespace, portTypeLocalName);
- targetNamespace = portTypeName.getNamespaceURI();
- model.setPortTypeName(portTypeName);
- model.setTargetNamespace(targetNamespace);
- model.defaultSchemaNamespaceSuffix = config.getMappingInfo().getDefaultSchemaNamespaceSuffix();
- model.setWSDLLocation(webService.wsdlLocation());
-
- SOAPBinding soapBinding = getAnnotation(clazz, SOAPBinding.class);
- if (soapBinding != null) {
- if (soapBinding.style() == SOAPBinding.Style.RPC && soapBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) {
- throw new RuntimeModelerException("runtime.modeler.invalid.soapbinding.parameterstyle",
- soapBinding, clazz);
-
- }
- isWrapped = soapBinding.parameterStyle()== WRAPPED;
- }
- defaultBinding = createBinding(soapBinding);
- /*
- * if clazz != portClass then there is an SEI. If there is an
- * SEI, then all methods should be processed. However, if there is
- * no SEI, and the implementation class uses at least one
- * WebMethod annotation, then only methods with this annotation
- * will be processed.
- */
-/* if (clazz == portClass) {
- WebMethod webMethod;
- for (Method method : clazz.getMethods()) {
- webMethod = getPrivMethodAnnotation(method, WebMethod.class);
- if (webMethod != null &&
- !webMethod.exclude()) {
- usesWebMethod = true;
- break;
- }
- }
- }*/
-
- for (Method method : clazz.getMethods()) {
- if (!clazz.isInterface()) { // if clazz is SEI, then all methods are web methods
- if (method.getDeclaringClass() == Object.class) continue;
- if (!getBooleanSystemProperty("com.sun.xml.internal.ws.legacyWebMethod")) { // legacy webMethod computation behaviour to be used
- if (!isWebMethodBySpec(method, clazz))
- continue;
- } else {
- if (!isWebMethod(method))
- continue;
- }
- }
- // TODO: binding can be null. We need to figure out how to post-process
- // RuntimeModel to link to WSDLModel
- processMethod(method);
- }
- //Add additional jaxb classes referenced by {@link XmlSeeAlso}
- XmlSeeAlso xmlSeeAlso = getAnnotation(clazz, XmlSeeAlso.class);
- if(xmlSeeAlso != null)
- model.addAdditionalClasses(xmlSeeAlso.value());
- }
-
- /*
- * Section 3.3 of spec
- * Otherwise, the class implicitly defines a service endpoint interface (SEI) which
- * comprises all of the public methods that satisfy one of the following conditions:
- * 1. They are annotated with the javax.jws.WebMethod annotation with the exclude element set to
- * false or missing (since false is the default for this annotation element).
- * 2. They are not annotated with the javax.jws.WebMethod annotation but their declaring class has a
- * javax.jws.WebService annotation.
- *
- * also the method should non-static or non-final
- */
- private boolean isWebMethodBySpec(Method method, Class clazz) {
-
- int modifiers = method.getModifiers();
- boolean staticFinal = Modifier.isStatic(modifiers) || Modifier.isFinal(modifiers);
-
- assert Modifier.isPublic(modifiers);
- assert !clazz.isInterface();
-
- WebMethod webMethod = getAnnotation(method, WebMethod.class);
- if (webMethod != null) {
- if (webMethod.exclude()) {
- return false; // @WebMethod(exclude="true")
- }
- if (staticFinal) {
- throw new RuntimeModelerException(ModelerMessages.localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATICFINAL(method));
- }
- return true; // @WebMethod
- }
-
- if (staticFinal) {
- return false;
- }
-
- Class declClass = method.getDeclaringClass();
- return getAnnotation(declClass, WebService.class) != null;
- }
-
- private boolean isWebMethod(Method method) {
- int modifiers = method.getModifiers();
- if (Modifier.isStatic(modifiers) || Modifier.isFinal(modifiers))
- return false;
-
- Class clazz = method.getDeclaringClass();
- boolean declHasWebService = getAnnotation(clazz, WebService.class) != null;
- WebMethod webMethod = getAnnotation(method, WebMethod.class);
- if (webMethod != null && !webMethod.exclude() && declHasWebService)
- return true;
- return declHasWebService && !classUsesWebMethod.contains(clazz);
- }
-
- /**
- * creates a runtime model <code>SOAPBinding</code> from a <code>javax.jws.soap.SOAPBinding</code> object
- * @param soapBinding the <code>javax.jws.soap.SOAPBinding</code> to model
- * @return returns the runtime model SOAPBinding corresponding to <code>soapBinding</code>
- */
- protected SOAPBindingImpl createBinding(SOAPBinding soapBinding) {
- SOAPBindingImpl rtSOAPBinding = new SOAPBindingImpl();
- Style style = soapBinding!=null ? soapBinding.style() : Style.DOCUMENT;
- rtSOAPBinding.setStyle(style);
- assert bindingId != null;
- model.bindingId = bindingId;
- SOAPVersion soapVersion = bindingId.getSOAPVersion();
- rtSOAPBinding.setSOAPVersion(soapVersion);
- return rtSOAPBinding;
- }
-
- /**
- * gets the namespace <code>String</code> for a given <code>packageName</code>
- * @param packageName the name of the package used to find a namespace.
- * can be empty.
- * @return the namespace for the specified <code>packageName</code>
- */
- public static String getNamespace(@NotNull String packageName) {
- if (packageName.length() == 0)
- return null;
-
- StringTokenizer tokenizer = new StringTokenizer(packageName, ".");
- String[] tokens;
- if (tokenizer.countTokens() == 0) {
- tokens = new String[0];
- } else {
- tokens = new String[tokenizer.countTokens()];
- for (int i=tokenizer.countTokens()-1; i >= 0; i--) {
- tokens[i] = tokenizer.nextToken();
- }
- }
- StringBuilder namespace = new StringBuilder("http://");
- for (int i=0; i<tokens.length; i++) {
- if (i!=0)
- namespace.append('.');
- namespace.append(tokens[i]);
- }
- namespace.append('/');
- return namespace.toString();
- }
-
- /*
- * Returns true if an exception is service specific exception as per JAX-WS rules.
- * @param exception
- * @return
- */
- private boolean isServiceException(Class<?> exception) {
- return EXCEPTION_CLASS.isAssignableFrom(exception) &&
- !(RUNTIME_EXCEPTION_CLASS.isAssignableFrom(exception) || REMOTE_EXCEPTION_CLASS.isAssignableFrom(exception));
- }
-
- /**
- * creates the runtime model for a method on the <code>portClass</code>
- * @param method the method to model
- */
- private void processMethod(Method method) {
-// int mods = method.getModifiers();
- WebMethod webMethod = getAnnotation(method, WebMethod.class);
- if (webMethod != null && webMethod.exclude()) return;
-/*
- validations are already done
-
- if (!Modifier.isPublic(mods) || Modifier.isStatic(mods)) {
- if(webMethod != null) {
- // if the user put @WebMethod on these non-qualifying method,
- // it's an error
- if(Modifier.isStatic(mods))
- throw new RuntimeModelerException(ModelerMessages.localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATIC(method));
- else
- throw new RuntimeModelerException(ModelerMessages.localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_PUBLIC(method));
- }
- return;
- }
-
- if (webMethod != null && webMethod.exclude())
- return;
-*/
-
- String methodName = method.getName();
- boolean isOneway = (getAnnotation(method, Oneway.class) != null);
-
- //Check that oneway methods don't thorw any checked exceptions
- if (isOneway) {
- for (Class<?> exception : method.getExceptionTypes()) {
- if(isServiceException(exception)) {
- throw new RuntimeModelerException("runtime.modeler.oneway.operation.no.checked.exceptions",
- portClass.getCanonicalName(), methodName, exception.getName());
- }
- }
- }
-
- JavaMethodImpl javaMethod;
- //Class implementorClass = portClass;
- if (method.getDeclaringClass()==portClass) {
- javaMethod = new JavaMethodImpl(model,method,method,metadataReader);
- } else {
- try {
- Method tmpMethod = portClass.getMethod(method.getName(),
- method.getParameterTypes());
- javaMethod = new JavaMethodImpl(model,tmpMethod,method,metadataReader);
- } catch (NoSuchMethodException e) {
- throw new RuntimeModelerException("runtime.modeler.method.not.found",
- method.getName(), portClass.getName());
- }
- }
-
-
-
- //set MEP -oneway, async, req/resp
- MEP mep = getMEP(method);
- javaMethod.setMEP(mep);
-
- String action = null;
-
-
- String operationName = method.getName();
- if (webMethod != null ) {
- action = webMethod.action();
- operationName = webMethod.operationName().length() > 0 ?
- webMethod.operationName() :
- operationName;
- }
-
- //override the @WebMethod.action value by the one from the WSDL
- if(binding != null){
- WSDLBoundOperation bo = binding.getBinding().get(new QName(targetNamespace, operationName));
- if(bo != null){
- WSDLInput wsdlInput = bo.getOperation().getInput();
- String wsaAction = wsdlInput.getAction();
- if(wsaAction != null && !wsdlInput.isDefaultAction())
- action = wsaAction;
- else
- action = bo.getSOAPAction();
- }
- }
-
- javaMethod.setOperationQName(new QName(targetNamespace,operationName));
- SOAPBinding methodBinding = getAnnotation(method, SOAPBinding.class);
- if(methodBinding != null && methodBinding.style() == SOAPBinding.Style.RPC) {
- logger.warning(ModelerMessages.RUNTIMEMODELER_INVALID_SOAPBINDING_ON_METHOD(methodBinding, method.getName(), method.getDeclaringClass().getName()));
- } else if (methodBinding == null && !method.getDeclaringClass().equals(portClass)) {
- methodBinding = getAnnotation(method.getDeclaringClass(), SOAPBinding.class);
- if (methodBinding != null && methodBinding.style() == SOAPBinding.Style.RPC && methodBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) {
- throw new RuntimeModelerException("runtime.modeler.invalid.soapbinding.parameterstyle",
- methodBinding, method.getDeclaringClass());
- }
- }
-
- if(methodBinding!= null && defaultBinding.getStyle() != methodBinding.style()) {
- throw new RuntimeModelerException("runtime.modeler.soapbinding.conflict",
- methodBinding.style(), method.getName(),defaultBinding.getStyle());
- }
-
- boolean methodIsWrapped = isWrapped;
- Style style = defaultBinding.getStyle();
- if (methodBinding != null) {
- SOAPBindingImpl mySOAPBinding = createBinding(methodBinding);
- style = mySOAPBinding.getStyle();
- if (action != null)
- mySOAPBinding.setSOAPAction(action);
- methodIsWrapped = methodBinding.parameterStyle().equals(
- WRAPPED);
- javaMethod.setBinding(mySOAPBinding);
- } else {
- SOAPBindingImpl sb = new SOAPBindingImpl(defaultBinding);
- if (action != null) {
- sb.setSOAPAction(action);
- } else {
- String defaults = SOAPVersion.SOAP_11 == sb.getSOAPVersion() ? "" : null;
- sb.setSOAPAction(defaults);
- }
- javaMethod.setBinding(sb);
- }
- if (!methodIsWrapped) {
- processDocBareMethod(javaMethod, operationName, method);
- } else if (style.equals(Style.DOCUMENT)) {
- processDocWrappedMethod(javaMethod, methodName, operationName,
- method);
- } else {
- processRpcMethod(javaMethod, methodName, operationName, method);
- }
- model.addJavaMethod(javaMethod);
- }
-
- private MEP getMEP(Method m){
- if (getAnnotation(m, Oneway.class)!= null) {
- return MEP.ONE_WAY;
- }
- if(Response.class.isAssignableFrom(m.getReturnType())){
- return MEP.ASYNC_POLL;
- }else if(Future.class.isAssignableFrom(m.getReturnType())){
- return MEP.ASYNC_CALLBACK;
- }
- return MEP.REQUEST_RESPONSE;
- }
-
- /**
- * models a document/literal wrapped method
- * @param javaMethod the runtime model <code>JavaMethod</code> instance being created
- * @param methodName the runtime model <code>JavaMethod</code> instance being created
- * @param operationName the runtime model <code>JavaMethod</code> instance being created
- * @param method the <code>method</code> to model
- */
- protected void processDocWrappedMethod(JavaMethodImpl javaMethod, String methodName,
- String operationName, Method method) {
- boolean methodHasHeaderParams = false;
- boolean isOneway = getAnnotation(method, Oneway.class)!= null;
- RequestWrapper reqWrapper = getAnnotation(method,RequestWrapper.class);
- ResponseWrapper resWrapper = getAnnotation(method,ResponseWrapper.class);
- String beanPackage = packageName + PD_JAXWS_PACKAGE_PD;
- if (packageName == null || packageName.length() == 0) {
- beanPackage = JAXWS_PACKAGE_PD;
- }
- String requestClassName;
- if(reqWrapper != null && reqWrapper.className().length()>0){
- requestClassName = reqWrapper.className();
- }else{
- requestClassName = beanPackage + capitalize(method.getName());
- }
-
-
- String responseClassName;
- if(resWrapper != null && resWrapper.className().length()>0){
- responseClassName = resWrapper.className();
- }else{
- responseClassName = beanPackage + capitalize(method.getName()) + RESPONSE;
- }
-
- String reqName = operationName;
- String reqNamespace = targetNamespace;
- String reqPartName = "parameters";
- if (reqWrapper != null) {
- if (reqWrapper.targetNamespace().length() > 0)
- reqNamespace = reqWrapper.targetNamespace();
- if (reqWrapper.localName().length() > 0)
- reqName = reqWrapper.localName();
- try {
- if (reqWrapper.partName().length() > 0)
- reqPartName = reqWrapper.partName();
- } catch(LinkageError e) {
- //2.1 API dopes n't have this method
- //Do nothing, just default to "parameters"
- }
- }
- QName reqElementName = new QName(reqNamespace, reqName);
- javaMethod.setRequestPayloadName(reqElementName);
- Class requestClass = getRequestWrapperClass(requestClassName, method, reqElementName);
-
- Class responseClass = null;
- String resName = operationName+"Response";
- String resNamespace = targetNamespace;
- QName resElementName = null;
- String resPartName = "parameters";
- if (!isOneway) {
- if (resWrapper != null) {
- if (resWrapper.targetNamespace().length() > 0)
- resNamespace = resWrapper.targetNamespace();
- if (resWrapper.localName().length() > 0)
- resName = resWrapper.localName();
- try {
- if (resWrapper.partName().length() > 0)
- resPartName = resWrapper.partName();
- } catch (LinkageError e) {
- //2.1 API does n't have this method
- //Do nothing, just default to "parameters"
- }
- }
- resElementName = new QName(resNamespace, resName);
- responseClass = getResponseWrapperClass(responseClassName, method, resElementName);
- }
-
- TypeInfo typeRef =
- new TypeInfo(reqElementName, requestClass);
- typeRef.setNillable(false);
- WrapperParameter requestWrapper = new WrapperParameter(javaMethod, typeRef,
- Mode.IN, 0);
- requestWrapper.setPartName(reqPartName);
- requestWrapper.setBinding(ParameterBinding.BODY);
- javaMethod.addParameter(requestWrapper);
- WrapperParameter responseWrapper = null;
- if (!isOneway) {
- typeRef = new TypeInfo(resElementName, responseClass);
- typeRef.setNillable(false);
- responseWrapper = new WrapperParameter(javaMethod, typeRef, Mode.OUT, -1);
- javaMethod.addParameter(responseWrapper);
- responseWrapper.setBinding(ParameterBinding.BODY);
- }
-
- // return value
-
-
- WebResult webResult = getAnnotation(method, WebResult.class);
- XmlElement xmlElem = getAnnotation(method, XmlElement.class);
- QName resultQName = getReturnQName(method, webResult, xmlElem);
- Class returnType = method.getReturnType();
- boolean isResultHeader = false;
- if (webResult != null) {
- isResultHeader = webResult.header();
- methodHasHeaderParams = isResultHeader || methodHasHeaderParams;
- if (isResultHeader && xmlElem != null) {
- throw new RuntimeModelerException("@XmlElement cannot be specified on method "+method+" as the return value is bound to header");
- }
- if (resultQName.getNamespaceURI().length() == 0 && webResult.header()) {
- // headers must have a namespace
- resultQName = new QName(targetNamespace, resultQName.getLocalPart());
- }
- }
-
- if(javaMethod.isAsync()){
- returnType = getAsyncReturnType(method, returnType);
- resultQName = new QName(RETURN);
- }
- resultQName = qualifyWrappeeIfNeeded(resultQName, resNamespace);
- if (!isOneway && (returnType != null) && (!returnType.getName().equals("void"))) {
- Annotation[] rann = getAnnotations(method);
- if (resultQName.getLocalPart() != null) {
- TypeInfo rTypeReference = new TypeInfo(resultQName, returnType, rann);
- metadataReader.getProperties(rTypeReference.properties(), method);
- rTypeReference.setGenericType(method.getGenericReturnType());
- ParameterImpl returnParameter = new ParameterImpl(javaMethod, rTypeReference, Mode.OUT, -1);
- if (isResultHeader) {
- returnParameter.setBinding(ParameterBinding.HEADER);
- javaMethod.addParameter(returnParameter);
- } else {
- returnParameter.setBinding(ParameterBinding.BODY);
- responseWrapper.addWrapperChild(returnParameter);
- }
- }
- }
-
- //get WebParam
- Class<?>[] parameterTypes = method.getParameterTypes();
- Type[] genericParameterTypes = method.getGenericParameterTypes();
- Annotation[][] pannotations = getParamAnnotations(method);
- int pos = 0;
- for (Class clazzType : parameterTypes) {
- String partName=null;
- String paramName = "arg"+pos;
- //String paramNamespace = "";
- boolean isHeader = false;
-
- if(javaMethod.isAsync() && AsyncHandler.class.isAssignableFrom(clazzType)){
- continue;
- }
-
- boolean isHolder = HOLDER_CLASS.isAssignableFrom(clazzType);
- //set the actual type argument of Holder in the TypeReference
- if (isHolder) {
- if(clazzType==Holder.class){
- clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
- }
- }
- Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
- WebParam webParam = null;
- xmlElem = null;
- for (Annotation annotation : pannotations[pos]) {
- if (annotation.annotationType() == WebParam.class)
- webParam = (WebParam)annotation;
- else if (annotation.annotationType() == XmlElement.class)
- xmlElem = (XmlElement)annotation;
- }
-
- QName paramQName = getParameterQName(method, webParam, xmlElem, paramName);
- if (webParam != null) {
- isHeader = webParam.header();
- methodHasHeaderParams = isHeader || methodHasHeaderParams;
- if (isHeader && xmlElem != null) {
- throw new RuntimeModelerException("@XmlElement cannot be specified on method "+method+" parameter that is bound to header");
- }
- if(webParam.partName().length() > 0)
- partName = webParam.partName();
- else
- partName = paramQName.getLocalPart();
- if (isHeader && paramQName.getNamespaceURI().equals("")) { // headers cannot be in empty namespace
- paramQName = new QName(targetNamespace, paramQName.getLocalPart());
- }
- paramMode = webParam.mode();
- if (isHolder && paramMode == Mode.IN)
- paramMode = Mode.INOUT;
- }
- paramQName = qualifyWrappeeIfNeeded(paramQName, reqNamespace);
- typeRef =
- new TypeInfo(paramQName, clazzType, pannotations[pos]);
- metadataReader.getProperties(typeRef.properties(), method, pos);
- typeRef.setGenericType(genericParameterTypes[pos]);
- ParameterImpl param = new ParameterImpl(javaMethod, typeRef, paramMode, pos++);
-
- if (isHeader) {
- param.setBinding(ParameterBinding.HEADER);
- javaMethod.addParameter(param);
- param.setPartName(partName);
- } else {
- param.setBinding(ParameterBinding.BODY);
- if (paramMode!=Mode.OUT) {
- requestWrapper.addWrapperChild(param);
- }
- if (paramMode!=Mode.IN) {
- if (isOneway) {
- throw new RuntimeModelerException("runtime.modeler.oneway.operation.no.out.parameters",
- portClass.getCanonicalName(), methodName);
- }
- responseWrapper.addWrapperChild(param);
- }
- }
- }
-
- //If the method has any parameter or return type that is bound to a header, use "result" as part name to avoid
- // name collison of same input part name and output part name ("parameters") shown up as param names on the
- // client mapping.
- if(methodHasHeaderParams) {
- resPartName = "result";
- }
- if(responseWrapper != null)
- responseWrapper.setPartName(resPartName);
- processExceptions(javaMethod, method);
- }
-
- private QName qualifyWrappeeIfNeeded(QName resultQName, String ns) {
- Object o = config.properties().get(DocWrappeeNamespapceQualified);
- boolean qualified = (o!= null && o instanceof Boolean) ? ((Boolean) o) : false;
- if (qualified) {
- if (resultQName.getNamespaceURI() == null || "".equals(resultQName.getNamespaceURI())) {
- return new QName(ns, resultQName.getLocalPart());
- }
- }
- return resultQName;
- }
-
- /**
- * models a rpc/literal method
- * @param javaMethod the runtime model <code>JavaMethod</code> instance being created
- * @param methodName the name of the <code>method</code> being modeled.
- * @param operationName the WSDL operation name for this <code>method</code>
- * @param method the runtime model <code>JavaMethod</code> instance being created
- */
- protected void processRpcMethod(JavaMethodImpl javaMethod, String methodName,
- String operationName, Method method) {
- boolean isOneway = getAnnotation(method, Oneway.class) != null;
-
- // use Map to build parameters in the part order when they are known.
- // if part is unbound, we just put them at the end, and for that we
- // use a large index (10000+) to avoid colliding with ordered ones.
- // this assumes that there's no operation with # of parameters > 10000,
- // but I think it's a pretty safe assumption - KK.
- Map<Integer, ParameterImpl> resRpcParams = new TreeMap<Integer, ParameterImpl>();
- Map<Integer, ParameterImpl> reqRpcParams = new TreeMap<Integer, ParameterImpl>();
-
- //Lets take the service namespace and overwrite it with the one we get it from wsdl
- String reqNamespace = targetNamespace;
- String respNamespace = targetNamespace;
-
- if(binding != null && Style.RPC.equals(binding.getBinding().getStyle())){
- QName opQName = new QName(binding.getBinding().getPortTypeName().getNamespaceURI(), operationName);
- WSDLBoundOperation op = binding.getBinding().get(opQName);
- if(op != null){
- //it cant be null, but lets not fail and try to work with service namespce
- if(op.getRequestNamespace() != null){
- reqNamespace = op.getRequestNamespace();
- }
-
- //it cant be null, but lets not fail and try to work with service namespce
- if(op.getResponseNamespace() != null){
- respNamespace = op.getResponseNamespace();
- }
- }
- }
-
- QName reqElementName = new QName(reqNamespace, operationName);
- javaMethod.setRequestPayloadName(reqElementName);
- QName resElementName = null;
- if (!isOneway) {
- resElementName = new QName(respNamespace, operationName+RESPONSE);
- }
-
- Class wrapperType = WrapperComposite.class;
- TypeInfo typeRef = new TypeInfo(reqElementName, wrapperType);
- WrapperParameter requestWrapper = new WrapperParameter(javaMethod, typeRef, Mode.IN, 0);
- requestWrapper.setInBinding(ParameterBinding.BODY);
- javaMethod.addParameter(requestWrapper);
- WrapperParameter responseWrapper = null;
- if (!isOneway) {
- typeRef = new TypeInfo(resElementName, wrapperType);
- responseWrapper = new WrapperParameter(javaMethod, typeRef, Mode.OUT, -1);
- responseWrapper.setOutBinding(ParameterBinding.BODY);
- javaMethod.addParameter(responseWrapper);
- }
-
- Class returnType = method.getReturnType();
- String resultName = RETURN;
- String resultTNS = targetNamespace;
- String resultPartName = resultName;
- boolean isResultHeader = false;
- WebResult webResult = getAnnotation(method, WebResult.class);
-
- if (webResult != null) {
- isResultHeader = webResult.header();
- if (webResult.name().length() > 0)
- resultName = webResult.name();
- if (webResult.partName().length() > 0) {
- resultPartName = webResult.partName();
- if (!isResultHeader)
- resultName = resultPartName;
- } else
- resultPartName = resultName;
- if (webResult.targetNamespace().length() > 0)
- resultTNS = webResult.targetNamespace();
- isResultHeader = webResult.header();
- }
- QName resultQName;
- if (isResultHeader)
- resultQName = new QName(resultTNS, resultName);
- else
- resultQName = new QName(resultName);
-
- if(javaMethod.isAsync()){
- returnType = getAsyncReturnType(method, returnType);
- }
-
- if (!isOneway && returnType!=null && returnType!=void.class) {
- Annotation[] rann = getAnnotations(method);
- TypeInfo rTypeReference = new TypeInfo(resultQName, returnType, rann);
- metadataReader.getProperties(rTypeReference.properties(), method);
- rTypeReference.setGenericType(method.getGenericReturnType());
- ParameterImpl returnParameter = new ParameterImpl(javaMethod, rTypeReference, Mode.OUT, -1);
- returnParameter.setPartName(resultPartName);
- if(isResultHeader){
- returnParameter.setBinding(ParameterBinding.HEADER);
- javaMethod.addParameter(returnParameter);
- rTypeReference.setGlobalElement(true);
- }else{
- ParameterBinding rb = getBinding(operationName, resultPartName, false, Mode.OUT);
- returnParameter.setBinding(rb);
- if(rb.isBody()){
- rTypeReference.setGlobalElement(false);
- WSDLPart p = getPart(new QName(targetNamespace,operationName), resultPartName, Mode.OUT);
- if(p == null)
- resRpcParams.put(resRpcParams.size()+10000, returnParameter);
- else
- resRpcParams.put(p.getIndex(), returnParameter);
- }else{
- javaMethod.addParameter(returnParameter);
- }
- }
- }
-
- //get WebParam
- Class<?>[] parameterTypes = method.getParameterTypes();
- Type[] genericParameterTypes = method.getGenericParameterTypes();
- Annotation[][] pannotations = getParamAnnotations(method);
- int pos = 0;
- for (Class clazzType : parameterTypes) {
- String paramName = "";
- String paramNamespace = "";
- String partName = "";
- boolean isHeader = false;
-
- if(javaMethod.isAsync() && AsyncHandler.class.isAssignableFrom(clazzType)){
- continue;
- }
-
- boolean isHolder = HOLDER_CLASS.isAssignableFrom(clazzType);
- //set the actual type argument of Holder in the TypeReference
- if (isHolder) {
- if (clazzType==Holder.class)
- clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
- }
- Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
- for (Annotation annotation : pannotations[pos]) {
- if (annotation.annotationType() == javax.jws.WebParam.class) {
- javax.jws.WebParam webParam = (javax.jws.WebParam) annotation;
- paramName = webParam.name();
- partName = webParam.partName();
- isHeader = webParam.header();
- WebParam.Mode mode = webParam.mode();
- paramNamespace = webParam.targetNamespace();
- if (isHolder && mode == Mode.IN)
- mode = Mode.INOUT;
- paramMode = mode;
- break;
- }
- }
-
- if (paramName.length() == 0) {
- paramName = "arg"+pos;
- }
- if (partName.length() == 0) {
- partName = paramName;
- } else if (!isHeader) {
- paramName = partName;
- }
- if (partName.length() == 0) {
- partName = paramName;
- }
-
- QName paramQName;
- if (!isHeader) {
- //its rpclit body param, set namespace to ""
- paramQName = new QName("", paramName);
- } else {
- if (paramNamespace.length() == 0)
- paramNamespace = targetNamespace;
- paramQName = new QName(paramNamespace, paramName);
- }
- typeRef =
- new TypeInfo(paramQName, clazzType, pannotations[pos]);
- metadataReader.getProperties(typeRef.properties(), method, pos);
- typeRef.setGenericType(genericParameterTypes[pos]);
- ParameterImpl param = new ParameterImpl(javaMethod, typeRef, paramMode, pos++);
- param.setPartName(partName);
-
- if(paramMode == Mode.INOUT){
- ParameterBinding pb = getBinding(operationName, partName, isHeader, Mode.IN);
- param.setInBinding(pb);
- pb = getBinding(operationName, partName, isHeader, Mode.OUT);
- param.setOutBinding(pb);
- }else{
- if (isHeader) {
- typeRef.setGlobalElement(true);
- param.setBinding(ParameterBinding.HEADER);
- } else {
- ParameterBinding pb = getBinding(operationName, partName, false, paramMode);
- param.setBinding(pb);
- }
- }
- if(param.getInBinding().isBody()){
- typeRef.setGlobalElement(false);
- if(!param.isOUT()){
- WSDLPart p = getPart(new QName(targetNamespace,operationName), partName, Mode.IN);
- if(p == null)
- reqRpcParams.put(reqRpcParams.size()+10000, param);
- else
- reqRpcParams.put(p.getIndex(), param);
- }
-
- if(!param.isIN()){
- if (isOneway) {
- throw new RuntimeModelerException("runtime.modeler.oneway.operation.no.out.parameters",
- portClass.getCanonicalName(), methodName);
- }
- WSDLPart p = getPart(new QName(targetNamespace,operationName), partName, Mode.OUT);
- if(p == null)
- resRpcParams.put(resRpcParams.size()+10000, param);
- else
- resRpcParams.put(p.getIndex(), param);
- }
- }else{
- javaMethod.addParameter(param);
- }
- }
- for (ParameterImpl p : reqRpcParams.values())
- requestWrapper.addWrapperChild(p);
- for (ParameterImpl p : resRpcParams.values())
- responseWrapper.addWrapperChild(p);
- processExceptions(javaMethod, method);
- }
-
- /**
- * models the exceptions thrown by <code>method</code> and adds them to the <code>javaMethod</code>
- * runtime model object
- * @param javaMethod the runtime model object to add the exception model objects to
- * @param method the <code>method</code> from which to find the exceptions to model
- */
- protected void processExceptions(JavaMethodImpl javaMethod, Method method) {
- Action actionAnn = getAnnotation(method, Action.class);
- FaultAction[] faultActions = {};
- if(actionAnn != null)
- faultActions = actionAnn.fault();
- for (Class<?> exception : method.getExceptionTypes()) {
-
- //Exclude RuntimeException, RemoteException and Error etc
- if (!EXCEPTION_CLASS.isAssignableFrom(exception))
- continue;
- if (RUNTIME_EXCEPTION_CLASS.isAssignableFrom(exception) || REMOTE_EXCEPTION_CLASS.isAssignableFrom(exception))
- continue;
-
- Class exceptionBean;
- Annotation[] anns;
- WebFault webFault = getAnnotation(exception, WebFault.class);
- Method faultInfoMethod = getWSDLExceptionFaultInfo(exception);
- ExceptionType exceptionType = ExceptionType.WSDLException;
- String namespace = targetNamespace;
- String name = exception.getSimpleName();
- String beanPackage = packageName + PD_JAXWS_PACKAGE_PD;
- if (packageName.length() == 0)
- beanPackage = JAXWS_PACKAGE_PD;
- String className = beanPackage+ name + BEAN;
- String messageName = exception.getSimpleName();
- if (webFault != null) {
- if (webFault.faultBean().length()>0)
- className = webFault.faultBean();
- if (webFault.name().length()>0)
- name = webFault.name();
- if (webFault.targetNamespace().length()>0)
- namespace = webFault.targetNamespace();
- if (webFault.messageName().length()>0)
- messageName = webFault.messageName();
- }
- if (faultInfoMethod == null) {
- exceptionBean = getExceptionBeanClass(className, exception, name, namespace);
- exceptionType = ExceptionType.UserDefined;
- anns = getAnnotations(exceptionBean);
- } else {
- exceptionBean = faultInfoMethod.getReturnType();
- anns = getAnnotations(faultInfoMethod);
- }
- QName faultName = new QName(namespace, name);
- TypeInfo typeRef = new TypeInfo(faultName, exceptionBean, anns);
- CheckedExceptionImpl checkedException =
- new CheckedExceptionImpl(javaMethod, exception, typeRef, exceptionType);
- checkedException.setMessageName(messageName);
- for(FaultAction fa: faultActions) {
- if(fa.className().equals(exception) && !fa.value().equals("")) {
- checkedException.setFaultAction(fa.value());
- break;
- }
- }
- javaMethod.addException(checkedException);
- }
- }
-
- /**
- * returns the method that corresponds to "getFaultInfo". Returns null if this is not an
- * exception generated from a WSDL
- * @param exception the class to search for the "getFaultInfo" method
- * @return the method named "getFaultInfo" if this is an exception generated from WSDL or an
- * exception that contains the <code>WebFault</code> annotation. Otherwise it returns null
- */
- protected Method getWSDLExceptionFaultInfo(Class exception) {
-// if (!exception.isAnnotationPresent(WebFault.class))
- if (getAnnotation(exception, WebFault.class) == null)
- return null;
- try {
- return exception.getMethod("getFaultInfo");
- } catch (NoSuchMethodException e) {
- return null;
- }
- }
-
- /**
- * models a document/literal bare method
- * @param javaMethod the runtime model <code>JavaMethod</code> instance being created
- * @param operationName the runtime model <code>JavaMethod</code> instance being created
- * @param method the runtime model <code>JavaMethod</code> instance being created
- */
- protected void processDocBareMethod(JavaMethodImpl javaMethod,
- String operationName, Method method) {
-
- String resultName = operationName+RESPONSE;
- String resultTNS = targetNamespace;
- String resultPartName = null;
- boolean isResultHeader = false;
- WebResult webResult = getAnnotation(method, WebResult.class);
- if (webResult != null) {
- if (webResult.name().length() > 0)
- resultName = webResult.name();
- if (webResult.targetNamespace().length() > 0)
- resultTNS = webResult.targetNamespace();
- resultPartName = webResult.partName();
- isResultHeader = webResult.header();
- }
-
- Class returnType = method.getReturnType();
- Type gReturnType = method.getGenericReturnType();
- if(javaMethod.isAsync()){
- returnType = getAsyncReturnType(method, returnType);
- }
-
- if ((returnType != null) && (!returnType.getName().equals("void"))) {
- Annotation[] rann = getAnnotations(method);
- if (resultName != null) {
- QName responseQName = new QName(resultTNS, resultName);
- TypeInfo rTypeReference = new TypeInfo(responseQName, returnType, rann);
- rTypeReference.setGenericType(gReturnType);
- metadataReader.getProperties(rTypeReference.properties(), method);
- ParameterImpl returnParameter = new ParameterImpl(javaMethod, rTypeReference, Mode.OUT, -1);
-
- if(resultPartName == null || (resultPartName.length() == 0)){
- resultPartName = resultName;
- }
- returnParameter.setPartName(resultPartName);
- if(isResultHeader){
- returnParameter.setBinding(ParameterBinding.HEADER);
- }else{
- ParameterBinding rb = getBinding(operationName, resultPartName, false, Mode.OUT);
- returnParameter.setBinding(rb);
- }
- javaMethod.addParameter(returnParameter);
- }
- }
-
- //get WebParam
- Class<?>[] parameterTypes = method.getParameterTypes();
- Type[] genericParameterTypes = method.getGenericParameterTypes();
- Annotation[][] pannotations = getParamAnnotations(method);
- int pos = 0;
- for (Class clazzType : parameterTypes) {
- String paramName = operationName; //method.getName();
- String partName = null;
- String requestNamespace = targetNamespace;
- boolean isHeader = false;
-
- //async
- if(javaMethod.isAsync() && AsyncHandler.class.isAssignableFrom(clazzType)){
- continue;
- }
-
- boolean isHolder = HOLDER_CLASS.isAssignableFrom(clazzType);
- //set the actual type argument of Holder in the TypeReference
- if (isHolder) {
- if (clazzType==Holder.class)
- clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
- }
-
- Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
- for (Annotation annotation : pannotations[pos]) {
- if (annotation.annotationType() == javax.jws.WebParam.class) {
- javax.jws.WebParam webParam = (javax.jws.WebParam) annotation;
- paramMode = webParam.mode();
- if (isHolder && paramMode == Mode.IN)
- paramMode = Mode.INOUT;
- isHeader = webParam.header();
- if(isHeader)
- paramName = "arg"+pos;
- if(paramMode == Mode.OUT && !isHeader)
- paramName = operationName+RESPONSE;
- if (webParam.name().length() > 0)
- paramName = webParam.name();
- partName = webParam.partName();
- if (!webParam.targetNamespace().equals("")) {
- requestNamespace = webParam.targetNamespace();
- }
- break;
- }
- }
-
- QName requestQName = new QName(requestNamespace, paramName);
- if (!isHeader && paramMode != Mode.OUT) javaMethod.setRequestPayloadName(requestQName);
- //doclit/wrapped
- TypeInfo typeRef = //operationName with upper 1 char
- new TypeInfo(requestQName, clazzType,
- pannotations[pos]);
- metadataReader.getProperties(typeRef.properties(), method, pos);
- typeRef.setGenericType(genericParameterTypes[pos]);
- ParameterImpl param = new ParameterImpl(javaMethod, typeRef, paramMode, pos++);
- if(partName == null || (partName.length() == 0)){
- partName = paramName;
- }
- param.setPartName(partName);
- if(paramMode == Mode.INOUT){
- ParameterBinding pb = getBinding(operationName, partName, isHeader, Mode.IN);
- param.setInBinding(pb);
- pb = getBinding(operationName, partName, isHeader, Mode.OUT);
- param.setOutBinding(pb);
- }else{
- if (isHeader){
- param.setBinding(ParameterBinding.HEADER);
- }else{
- ParameterBinding pb = getBinding(operationName, partName, false, paramMode);
- param.setBinding(pb);
- }
- }
- javaMethod.addParameter(param);
- }
- validateDocBare(javaMethod);
- processExceptions(javaMethod, method);
- }
-
- // Does a conservative check if there is only one BODY part for input
- // and output message. We are not considering INOUT parameters at this
- // time since binding information is not applied. Also, there isn't
- // anyway to represent some cases in SEI. For example, a INOUT parameter
- // could be bound to body for input message, header for OUTPUT message
- // in wsdl:binding
- private void validateDocBare(JavaMethodImpl javaMethod) {
- int numInBodyBindings = 0;
- for(Parameter param : javaMethod.getRequestParameters()){
- if(param.getBinding().equals(ParameterBinding.BODY) && param.isIN()){
- numInBodyBindings++;
- }
- if(numInBodyBindings > 1){
- throw new RuntimeModelerException(ModelerMessages.localizableNOT_A_VALID_BARE_METHOD(portClass.getName(), javaMethod.getMethod().getName()));
- }
- }
-
- int numOutBodyBindings = 0;
- for(Parameter param : javaMethod.getResponseParameters()){
- if(param.getBinding().equals(ParameterBinding.BODY) && param.isOUT()){
- numOutBodyBindings++;
- }
- if(numOutBodyBindings > 1){
- throw new RuntimeModelerException(ModelerMessages.localizableNOT_A_VALID_BARE_METHOD(portClass.getName(), javaMethod.getMethod().getName()));
- }
- }
- }
-
- private Class getAsyncReturnType(Method method, Class returnType) {
- if(Response.class.isAssignableFrom(returnType)){
- Type ret = method.getGenericReturnType();
- return (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)ret).getActualTypeArguments()[0]);
- }else{
- Type[] types = method.getGenericParameterTypes();
- Class[] params = method.getParameterTypes();
- int i = 0;
- for(Class cls : params){
- if(AsyncHandler.class.isAssignableFrom(cls)){
- return (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)types[i]).getActualTypeArguments()[0]);
- }
- i++;
- }
- }
- return returnType;
- }
-
- /**
- * utility to capitalize the first letter in a string
- * @param name the string to capitalize
- * @return the capitalized string
- */
- public static String capitalize(String name) {
- if (name == null || name.length() == 0) {
- return name;
- }
- char chars[] = name.toCharArray();
- chars[0] = Character.toUpperCase(chars[0]);
- return new String(chars);
- }
-
- /*
- * Return service QName
- */
- /**
- * gets the <code>wsdl:serviceName</code> for a given implementation class
- * @param implClass the implementation class
- * @return the <code>wsdl:serviceName</code> for the <code>implClass</code>
- */
- public static QName getServiceName(Class<?> implClass) {
- return getServiceName(implClass, null);
- }
-
- public static QName getServiceName(Class<?> implClass, boolean isStandard) {
- return getServiceName(implClass, null, isStandard);
- }
-
- public static QName getServiceName(Class<?> implClass, MetadataReader reader) {
- return getServiceName(implClass, reader, true);
- }
-
- public static QName getServiceName(Class<?> implClass, MetadataReader reader, boolean isStandard) {
- if (implClass.isInterface()) {
- throw new RuntimeModelerException("runtime.modeler.cannot.get.serviceName.from.interface",
- implClass.getCanonicalName());
- }
-
- String name = implClass.getSimpleName()+SERVICE;
- String packageName = "";
- if (implClass.getPackage() != null)
- packageName = implClass.getPackage().getName();
-
- WebService webService = getAnnotation(WebService.class, implClass, reader);
- if (isStandard && webService == null) {
- throw new RuntimeModelerException("runtime.modeler.no.webservice.annotation",
- implClass.getCanonicalName());
- }
- if (webService != null && webService.serviceName().length() > 0) {
- name = webService.serviceName();
- }
- String targetNamespace = getNamespace(packageName);
- if (webService != null && webService.targetNamespace().length() > 0) {
- targetNamespace = webService.targetNamespace();
- } else if (targetNamespace == null) {
- throw new RuntimeModelerException("runtime.modeler.no.package",
- implClass.getName());
- }
- return new QName(targetNamespace, name);
- }
-
- /**
- * gets the <code>wsdl:portName</code> for a given implementation class
- * @param implClass the implementation class
- * @param targetNamespace Namespace URI for service name
- * @return the <code>wsdl:portName</code> for the <code>implClass</code>
- */
- public static QName getPortName(Class<?> implClass, String targetNamespace) {
- return getPortName(implClass, null, targetNamespace);
- }
-
- public static QName getPortName(Class<?> implClass, String targetNamespace, boolean isStandard) {
- return getPortName(implClass, null, targetNamespace, isStandard);
- }
-
- public static QName getPortName(Class<?> implClass, MetadataReader reader, String targetNamespace) {
- return getPortName(implClass, reader, targetNamespace, true);
- }
-
- public static QName getPortName(Class<?> implClass, MetadataReader reader, String targetNamespace, boolean isStandard) {
- WebService webService = getAnnotation(WebService.class, implClass, reader);
- if (isStandard && webService == null) {
- throw new RuntimeModelerException("runtime.modeler.no.webservice.annotation",
- implClass.getCanonicalName());
- }
- String name;
- if (webService != null && webService.portName().length() > 0) {
- name = webService.portName();
- } else if (webService != null && webService.name().length() > 0) {
- name = webService.name()+PORT;
- } else {
- name = implClass.getSimpleName()+PORT;
- }
-
- if (targetNamespace == null) {
- if (webService != null && webService.targetNamespace().length() > 0) {
- targetNamespace = webService.targetNamespace();
- } else {
- String packageName = null;
- if (implClass.getPackage() != null) {
- packageName = implClass.getPackage().getName();
- }
- if (packageName != null) {
- targetNamespace = getNamespace(packageName);
- }
- if (targetNamespace == null) {
- throw new RuntimeModelerException("runtime.modeler.no.package",
- implClass.getName());
- }
- }
-
- }
-
- return new QName(targetNamespace, name);
- }
-
- static <A extends Annotation> A getAnnotation(Class<A> t, Class<?> cls, MetadataReader reader) {
- return (reader == null)? cls.getAnnotation(t) : reader.getAnnotation(t, cls);
- }
-
- /**
- * Gives portType QName from implementatorClass or SEI
- * @param implOrSeiClass cant be null
- * @return <code>wsdl:portType@name</code>, null if it could not find the annotated class.
- */
- public static QName getPortTypeName(Class<?> implOrSeiClass){
- return getPortTypeName(implOrSeiClass, null, null);
- }
-
- public static QName getPortTypeName(Class<?> implOrSeiClass, MetadataReader metadataReader){
- return getPortTypeName(implOrSeiClass, null, metadataReader);
- }
-
- public static QName getPortTypeName(Class<?> implOrSeiClass, String tns, MetadataReader reader){
- assert(implOrSeiClass != null);
- WebService webService = getAnnotation(WebService.class, implOrSeiClass, reader);
- Class<?> clazz = implOrSeiClass;
- if (webService == null)
- throw new RuntimeModelerException("runtime.modeler.no.webservice.annotation",
- implOrSeiClass.getCanonicalName());
-
- if (!implOrSeiClass.isInterface()) {
- String epi = webService.endpointInterface();
- if (epi.length() > 0) {
- try {
- clazz = Thread.currentThread().getContextClassLoader().loadClass(epi);
- } catch (ClassNotFoundException e) {
- throw new RuntimeModelerException("runtime.modeler.class.not.found", epi);
- }
- WebService ws = getAnnotation(WebService.class, clazz, reader);
- if (ws == null) {
- throw new RuntimeModelerException("runtime.modeler.endpoint.interface.no.webservice",
- webService.endpointInterface());
- }
- }
- }
-
- webService = getAnnotation(WebService.class, clazz, reader);
- String name = webService.name();
- if(name.length() == 0){
- name = clazz.getSimpleName();
- }
- if (tns == null || "".equals(tns.trim())) tns = webService.targetNamespace();
- if (tns.length() == 0)
- tns = getNamespace(clazz.getPackage().getName());
- if (tns == null) {
- throw new RuntimeModelerException("runtime.modeler.no.package", clazz.getName());
- }
- return new QName(tns, name);
- }
-
- private ParameterBinding getBinding(String operation, String part, boolean isHeader, Mode mode){
- if(binding == null){
- if(isHeader)
- return ParameterBinding.HEADER;
- else
- return ParameterBinding.BODY;
- }
- QName opName = new QName(binding.getBinding().getPortType().getName().getNamespaceURI(), operation);
- return binding.getBinding().getBinding(opName, part, mode);
- }
-
- private WSDLPart getPart(QName opName, String partName, Mode mode){
- if(binding != null){
- WSDLBoundOperation bo = binding.getBinding().get(opName);
- if(bo != null)
- return bo.getPart(partName, mode);
- }
- return null;
- }
-
- private static Boolean getBooleanSystemProperty(final String prop) {
- return AccessController.doPrivileged(
- new java.security.PrivilegedAction<Boolean>() {
- public Boolean run() {
- String value = System.getProperty(prop);
- return value != null ? Boolean.valueOf(value) : Boolean.FALSE;
- }
- }
- );
- }
-
- private static QName getReturnQName(Method method, WebResult webResult, XmlElement xmlElem) {
- String webResultName = null;
- if (webResult != null && webResult.name().length() > 0) {
- webResultName = webResult.name();
- }
- String xmlElemName = null;
- if (xmlElem != null && !xmlElem.name().equals("##default")) {
- xmlElemName = xmlElem.name();
- }
- if (xmlElemName != null && webResultName != null && !xmlElemName.equals(webResultName)) {
- throw new RuntimeModelerException("@XmlElement(name)="+xmlElemName+" and @WebResult(name)="+webResultName+" are different for method " +method);
- }
- String localPart = RETURN;
- if (webResultName != null) {
- localPart = webResultName;
- } else if (xmlElemName != null) {
- localPart = xmlElemName;
- }
-
- String webResultNS = null;
- if (webResult != null && webResult.targetNamespace().length() > 0) {
- webResultNS = webResult.targetNamespace();
- }
- String xmlElemNS = null;
- if (xmlElem != null && !xmlElem.namespace().equals("##default")) {
- xmlElemNS = xmlElem.namespace();
- }
- if (xmlElemNS != null && webResultNS != null && !xmlElemNS.equals(webResultNS)) {
- throw new RuntimeModelerException("@XmlElement(namespace)="+xmlElemNS+" and @WebResult(targetNamespace)="+webResultNS+" are different for method " +method);
- }
- String ns = "";
- if (webResultNS != null) {
- ns = webResultNS;
- } else if (xmlElemNS != null) {
- ns = xmlElemNS;
- }
-
- return new QName(ns, localPart);
- }
-
- private static QName getParameterQName(Method method, WebParam webParam, XmlElement xmlElem, String paramDefault) {
- String webParamName = null;
- if (webParam != null && webParam.name().length() > 0) {
- webParamName = webParam.name();
- }
- String xmlElemName = null;
- if (xmlElem != null && !xmlElem.name().equals("##default")) {
- xmlElemName = xmlElem.name();
- }
- if (xmlElemName != null && webParamName != null && !xmlElemName.equals(webParamName)) {
- throw new RuntimeModelerException("@XmlElement(name)="+xmlElemName+" and @WebParam(name)="+webParamName+" are different for method " +method);
- }
- String localPart = paramDefault;
- if (webParamName != null) {
- localPart = webParamName;
- } else if (xmlElemName != null) {
- localPart = xmlElemName;
- }
-
- String webParamNS = null;
- if (webParam != null && webParam.targetNamespace().length() > 0) {
- webParamNS = webParam.targetNamespace();
- }
- String xmlElemNS = null;
- if (xmlElem != null && !xmlElem.namespace().equals("##default")) {
- xmlElemNS = xmlElem.namespace();
- }
- if (xmlElemNS != null && webParamNS != null && !xmlElemNS.equals(webParamNS)) {
- throw new RuntimeModelerException("@XmlElement(namespace)="+xmlElemNS+" and @WebParam(targetNamespace)="+webParamNS+" are different for method " +method);
- }
- String ns = "";
- if (webParamNS != null) {
- ns = webParamNS;
- } else if (xmlElemNS != null) {
- ns = xmlElemNS;
- }
-
- return new QName(ns, localPart);
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModelerException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModelerException.java
deleted file mode 100644
index f25af0ea..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModelerException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model;
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-/**
- * RuntimeModelerException represents an exception that occurred while
- * serializing a Java value as XML.
- *
- * @see JAXWSExceptionBase
- *
- * @author WS Development Team
- */
-public class RuntimeModelerException extends JAXWSExceptionBase {
-
- public RuntimeModelerException(String key, Object... args) {
- super(key, args);
- }
-
- public RuntimeModelerException(Throwable throwable) {
- super(throwable);
- }
-
- public RuntimeModelerException(Localizable arg) {
- super("nestedModelerError", arg);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.modeler";
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java
deleted file mode 100644
index e3434a58..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model;
-
-import com.sun.xml.internal.ws.api.model.ParameterBinding;
-import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
-
-import javax.jws.WebParam.Mode;
-import javax.xml.namespace.QName;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * Creates SOAP specific RuntimeModel
- *
- * @author Vivek Pandey
- */
-public class SOAPSEIModel extends AbstractSEIModelImpl {
-
- public SOAPSEIModel(WebServiceFeatureList features) {
- super(features);
- }
-
- @Override
- protected void populateMaps() {
- int emptyBodyCount = 0;
- for(JavaMethodImpl jm : getJavaMethods()){
- put(jm.getMethod(), jm);
- boolean bodyFound = false;
- for(ParameterImpl p:jm.getRequestParameters()){
- ParameterBinding binding = p.getBinding();
- if(binding.isBody()){
- put(p.getName(), jm);
- bodyFound = true;
- }
- }
- if(!bodyFound){
- put(emptyBodyName, jm);
-// System.out.println("added empty body for: "+jm.getMethod().getName());
- emptyBodyCount++;
- }
- }
- if(emptyBodyCount > 1){
- //TODO throw exception
-// System.out.println("Error: Unqiue signature violation - more than 1 empty body!");
- }
- }
-
- public Set<QName> getKnownHeaders() {
- Set<QName> headers = new HashSet<QName>();
- for (JavaMethodImpl method : getJavaMethods()) {
- // fill in request headers
- Iterator<ParameterImpl> params = method.getRequestParameters().iterator();
- fillHeaders(params, headers, Mode.IN);
-
- // fill in response headers
- params = method.getResponseParameters().iterator();
- fillHeaders(params, headers, Mode.OUT);
- }
- return headers;
- }
-
- /**
- * @param params
- * @param headers
- */
- private void fillHeaders(Iterator<ParameterImpl> params, Set<QName> headers, Mode mode) {
- while (params.hasNext()) {
- ParameterImpl param = params.next();
- ParameterBinding binding = (mode == Mode.IN)?param.getInBinding():param.getOutBinding();
- QName name = param.getName();
- if (binding.isHeader() && !headers.contains(name)) {
- headers.add(name);
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java
deleted file mode 100644
index 02d9c959..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model;
-
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Utils class.
- *
- * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages.
- *
- * Has *package private* access to avoid inappropriate usage.
- */
-final class Utils {
-
- private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
-
- /**
- * static ReflectionNavigator field to avoid usage of reflection every time we use it.
- */
- static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
-
- static { // we statically initializing REFLECTION_NAVIGATOR property
- try {
- final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
-
- // requires accessClassInPackage privilege
- final Method getInstance = AccessController.doPrivileged(
- new PrivilegedAction<Method>() {
- @Override
- public Method run() {
- try {
- Method getInstance = refNav.getDeclaredMethod("getInstance");
- getInstance.setAccessible(true);
- return getInstance;
- } catch (NoSuchMethodException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
- }
- }
- }
- );
-
- //noinspection unchecked
- REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
- } catch (ClassNotFoundException e) {
- throw new IllegalStateException("Can't find ReflectionNavigator class");
- } catch (InvocationTargetException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
- } catch (IllegalAccessException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
- } catch (SecurityException e) {
- LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
- throw e;
- }
- }
-
- /**
- * private constructor to avoid util class instantiating
- */
- private Utils() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java
deleted file mode 100644
index d6be9a11..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model;
-
-import com.sun.xml.internal.ws.model.AbstractWrapperBeanGenerator.BeanMemberFactory;
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.annotation.RuntimeInlineAnnotationReader;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.ws.org.objectweb.asm.*;
-import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.*;
-import com.sun.xml.internal.ws.org.objectweb.asm.Type;
-
-import javax.xml.bind.annotation.XmlAttachmentRef;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlList;
-import javax.xml.bind.annotation.XmlMimeType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Holder;
-import javax.xml.ws.WebServiceException;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.*;
-import java.util.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Runtime Wrapper and exception bean generator implementation.
- * It uses ASM to generate request, response and exception beans.
- *
- * @author Jitendra Kotamraju
- */
-public class WrapperBeanGenerator {
-
- private static final Logger LOGGER = Logger.getLogger(WrapperBeanGenerator.class.getName());
-
- private static final FieldFactory FIELD_FACTORY = new FieldFactory();
-
- private static final AbstractWrapperBeanGenerator RUNTIME_GENERATOR =
- new RuntimeWrapperBeanGenerator(new RuntimeInlineAnnotationReader(),
- (Navigator<java.lang.reflect.Type, Class, ?, Method>) Utils.REFLECTION_NAVIGATOR, FIELD_FACTORY);
-
- private static final class RuntimeWrapperBeanGenerator extends AbstractWrapperBeanGenerator<java.lang.reflect.Type, Class, java.lang.reflect.Method, Field> {
-
- protected RuntimeWrapperBeanGenerator(AnnotationReader<java.lang.reflect.Type, Class, ?, Method> annReader, Navigator<java.lang.reflect.Type, Class, ?, Method> nav, BeanMemberFactory<java.lang.reflect.Type, Field> beanMemberFactory) {
- super(annReader, nav, beanMemberFactory);
- }
-
- @Override
- protected java.lang.reflect.Type getSafeType(java.lang.reflect.Type type) {
- return type;
- }
-
- @Override
- protected java.lang.reflect.Type getHolderValueType(java.lang.reflect.Type paramType) {
- if (paramType instanceof ParameterizedType) {
- ParameterizedType p = (ParameterizedType)paramType;
- if (p.getRawType().equals(Holder.class)) {
- return p.getActualTypeArguments()[0];
- }
- }
- return null;
- }
-
- @Override
- protected boolean isVoidType(java.lang.reflect.Type type) {
- return type == Void.TYPE;
- }
-
- }
-
- private static final class FieldFactory implements BeanMemberFactory<java.lang.reflect.Type, Field> {
- @Override
- public Field createWrapperBeanMember(java.lang.reflect.Type paramType,
- String paramName, List<Annotation> jaxb) {
- return new Field(paramName, paramType, getASMType(paramType), jaxb);
- }
- }
-
- // Creates class's bytes
- private static byte[] createBeanImage(String className,
- String rootName, String rootNS,
- String typeName, String typeNS,
- Collection<Field> fields) throws Exception {
-
- ClassWriter cw = new ClassWriter(0);
- //org.objectweb.asm.util.TraceClassVisitor cw = new org.objectweb.asm.util.TraceClassVisitor(actual, new java.io.PrintWriter(System.out));
-
- cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, replaceDotWithSlash(className), null, "java/lang/Object", null);
-
- AnnotationVisitor root = cw.visitAnnotation("Ljavax/xml/bind/annotation/XmlRootElement;", true);
- root.visit("name", rootName);
- root.visit("namespace", rootNS);
- root.visitEnd();
-
- AnnotationVisitor type = cw.visitAnnotation("Ljavax/xml/bind/annotation/XmlType;", true);
- type.visit("name", typeName);
- type.visit("namespace", typeNS);
- if (fields.size() > 1) {
- AnnotationVisitor propVisitor = type.visitArray("propOrder");
- for(Field field : fields) {
- propVisitor.visit("propOrder", field.fieldName);
- }
- propVisitor.visitEnd();
- }
- type.visitEnd();
-
- for(Field field : fields) {
- FieldVisitor fv = cw.visitField(ACC_PUBLIC, field.fieldName, field.asmType.getDescriptor(), field.getSignature(), null);
-
- for(Annotation ann : field.jaxbAnnotations) {
- if (ann instanceof XmlMimeType) {
- AnnotationVisitor mime = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlMimeType;", true);
- mime.visit("value", ((XmlMimeType)ann).value());
- mime.visitEnd();
- } else if (ann instanceof XmlJavaTypeAdapter) {
- AnnotationVisitor ada = fv.visitAnnotation("Ljavax/xml/bind/annotation/adapters/XmlJavaTypeAdapter;", true);
- ada.visit("value", getASMType(((XmlJavaTypeAdapter)ann).value()));
- // XmlJavaTypeAdapter.type() is for package only. No need to copy.
- // ada.visit("type", ((XmlJavaTypeAdapter)ann).type());
- ada.visitEnd();
- } else if (ann instanceof XmlAttachmentRef) {
- AnnotationVisitor att = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlAttachmentRef;", true);
- att.visitEnd();
- } else if (ann instanceof XmlList) {
- AnnotationVisitor list = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlList;", true);
- list.visitEnd();
- } else if (ann instanceof XmlElement) {
- AnnotationVisitor elem = fv.visitAnnotation("Ljavax/xml/bind/annotation/XmlElement;", true);
- XmlElement xmlElem = (XmlElement)ann;
- elem.visit("name", xmlElem.name());
- elem.visit("namespace", xmlElem.namespace());
- if (xmlElem.nillable()) {
- elem.visit("nillable", true);
- }
- if (xmlElem.required()) {
- elem.visit("required", true);
- }
- elem.visitEnd();
- } else {
- throw new WebServiceException("Unknown JAXB annotation " + ann);
- }
- }
-
- fv.visitEnd();
- }
-
- MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
- mv.visitCode();
- mv.visitVarInsn(ALOAD, 0);
- mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
- mv.visitInsn(RETURN);
- mv.visitMaxs(1, 1);
- mv.visitEnd();
-
- cw.visitEnd();
-
- if (LOGGER.isLoggable(Level.FINE)) {
- // Class's @XmlRootElement
- StringBuilder sb = new StringBuilder();
- sb.append("\n");
- sb.append("@XmlRootElement(name=").append(rootName)
- .append(", namespace=").append(rootNS).append(")");
-
- // Class's @XmlType
- sb.append("\n");
- sb.append("@XmlType(name=").append(typeName)
- .append(", namespace=").append(typeNS);
- if (fields.size() > 1) {
- sb.append(", propOrder={");
- for(Field field : fields) {
- sb.append(" ");
- sb.append(field.fieldName);
- }
- sb.append(" }");
- }
- sb.append(")");
-
- // class declaration
- sb.append("\n");
- sb.append("public class ").append(className).append(" {");
-
- // fields declaration
- for(Field field : fields) {
- sb.append("\n");
-
- // Field's other JAXB annotations
- for(Annotation ann : field.jaxbAnnotations) {
- sb.append("\n ");
-
- if (ann instanceof XmlMimeType) {
- sb.append("@XmlMimeType(value=").append(((XmlMimeType)ann).value()).append(")");
- } else if (ann instanceof XmlJavaTypeAdapter) {
- sb.append("@XmlJavaTypeAdapter(value=").append(getASMType(((XmlJavaTypeAdapter)ann).value())).append(")");
- } else if (ann instanceof XmlAttachmentRef) {
- sb.append("@XmlAttachmentRef");
- } else if (ann instanceof XmlList) {
- sb.append("@XmlList");
- } else if (ann instanceof XmlElement) {
- XmlElement xmlElem = (XmlElement)ann;
- sb.append("\n ");
- sb.append("@XmlElement(name=").append(xmlElem.name())
- .append(", namespace=").append(xmlElem.namespace());
- if (xmlElem.nillable()) {
- sb.append(", nillable=true");
- }
- if (xmlElem.required()) {
- sb.append(", required=true");
- }
- sb.append(")");
- } else {
- throw new WebServiceException("Unknown JAXB annotation " + ann);
- }
- }
-
- // Field declaration
- sb.append("\n ");
- sb.append("public ");
- if (field.getSignature() == null) {
- sb.append(field.asmType.getDescriptor());
- } else {
- sb.append(field.getSignature());
- }
- sb.append(" ");
- sb.append(field.fieldName);
- }
-
- sb.append("\n\n}");
- LOGGER.fine(sb.toString());
- }
-
- return cw.toByteArray();
- }
-
- private static String replaceDotWithSlash(String name) {
- return name.replace('.', '/');
- }
-
- static Class createRequestWrapperBean(String className, Method method, QName reqElemName, ClassLoader cl) {
-
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Request Wrapper Class : {0}", className);
- }
-
- List<Field> requestMembers = RUNTIME_GENERATOR.collectRequestBeanMembers(
- method);
-
- byte[] image;
- try {
- image = createBeanImage(className, reqElemName.getLocalPart(), reqElemName.getNamespaceURI(),
- reqElemName.getLocalPart(), reqElemName.getNamespaceURI(),
- requestMembers);
- } catch(Exception e) {
- throw new WebServiceException(e);
- }
-// write(image, className);
- return Injector.inject(cl, className, image);
- }
-
- static Class createResponseWrapperBean(String className, Method method, QName resElemName, ClassLoader cl) {
-
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Response Wrapper Class : {0}", className);
- }
-
- List<Field> responseMembers = RUNTIME_GENERATOR.collectResponseBeanMembers(method);
-
- byte[] image;
- try {
- image = createBeanImage(className, resElemName.getLocalPart(), resElemName.getNamespaceURI(),
- resElemName.getLocalPart(), resElemName.getNamespaceURI(),
- responseMembers);
- } catch(Exception e) {
- throw new WebServiceException(e);
- }
-// write(image, className);
-
- return Injector.inject(cl, className, image);
- }
-
-
- private static Type getASMType(java.lang.reflect.Type t) {
- assert t!=null;
-
- if (t instanceof Class) {
- return Type.getType((Class)t);
- }
-
- if (t instanceof ParameterizedType) {
- ParameterizedType pt = (ParameterizedType)t;
- if (pt.getRawType() instanceof Class) {
- return Type.getType((Class)pt.getRawType());
- }
- }
- if (t instanceof GenericArrayType) {
- return Type.getType(FieldSignature.vms(t));
- }
-
- if (t instanceof WildcardType) {
- return Type.getType(FieldSignature.vms(t));
- }
-
- if (t instanceof TypeVariable) {
- TypeVariable tv = (TypeVariable)t;
- if (tv.getBounds()[0] instanceof Class) {
- return Type.getType((Class)tv.getBounds()[0]);
- }
- }
-
- throw new IllegalArgumentException("Not creating ASM Type for type = "+t);
- }
-
-
- static Class createExceptionBean(String className, Class exception, String typeNS, String elemName, String elemNS, ClassLoader cl) {
- return createExceptionBean(className, exception, typeNS, elemName, elemNS, cl, true);
- }
-
- static Class createExceptionBean(String className, Class exception, String typeNS, String elemName, String elemNS, ClassLoader cl, boolean decapitalizeExceptionBeanProperties) {
-
- Collection<Field> fields = RUNTIME_GENERATOR.collectExceptionBeanMembers(exception, decapitalizeExceptionBeanProperties);
-
- byte[] image;
- try {
- image = createBeanImage(className, elemName, elemNS,
- exception.getSimpleName(), typeNS,
- fields);
- } catch(Exception e) {
- throw new WebServiceException(e);
- }
-
- return Injector.inject(cl, className, image);
- }
-
- /**
- * Note: this class has a natural ordering that is inconsistent with equals.
- */
- private static class Field implements Comparable<Field> {
- private final java.lang.reflect.Type reflectType;
- private final Type asmType;
- private final String fieldName;
- private final List<Annotation> jaxbAnnotations;
-
- Field(String paramName, java.lang.reflect.Type paramType, Type asmType,
- List<Annotation> jaxbAnnotations) {
- this.reflectType = paramType;
- this.asmType = asmType;
- this.fieldName = paramName;
- this.jaxbAnnotations = jaxbAnnotations;
- }
-
- String getSignature() {
- if (reflectType instanceof Class) {
- return null;
- }
- if (reflectType instanceof TypeVariable) {
- return null;
- }
- return FieldSignature.vms(reflectType);
- }
-
- @Override
- public int compareTo(Field o) {
- return fieldName.compareTo(o.fieldName);
- }
- }
-
- static void write(byte[] b, String className) {
- className = className.substring(className.lastIndexOf(".")+1);
- try {
- java.io.FileOutputStream fo = new java.io.FileOutputStream(className + ".class");
- fo.write(b);
- fo.flush();
- fo.close();
- } catch (java.io.IOException e) {
- LOGGER.log(Level.INFO, "Error Writing class", e);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperParameter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperParameter.java
deleted file mode 100644
index d1a95c65..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperParameter.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model;
-
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.api.model.ParameterBinding;
-import com.sun.xml.internal.ws.spi.db.TypeInfo;
-import com.sun.xml.internal.ws.spi.db.WrapperComposite;
-
-import javax.jws.WebParam.Mode;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * {@link ParameterImpl} that represents a wrapper,
- * which is a parameter that consists of multiple nested {@link ParameterImpl}s
- * within, which together form a body part.
- *
- * <p>
- * Java method parameters represented by nested {@link ParameterImpl}s will be
- * packed into a "wrapper bean" and it becomes the {@link ParameterImpl} for the
- * body.
- *
- * <p>
- * This parameter is only used for the {@link ParameterBinding#BODY} binding.
- * Other parameters that bind to other parts (such as headers or unbound)
- * will show up directly under {@link JavaMethod}.
- *
- * @author Vivek Pandey
- */
-public class WrapperParameter extends ParameterImpl {
- protected final List<ParameterImpl> wrapperChildren = new ArrayList<ParameterImpl>();
-
- // TODO: wrapper parameter doesn't use 'typeRef' --- it only uses tag name.
- public WrapperParameter(JavaMethodImpl parent, TypeInfo typeRef, Mode mode, int index) {
- super(parent, typeRef, mode, index);
- //chen workaround for document-literal wrapper - new feature on eclipselink API requested
- typeRef.properties().put(WrapperParameter.class.getName(), this);
- }
-
- /**
- *
- * @deprecated
- * Why are you calling a method that always return true?
- */
- @Override
- public boolean isWrapperStyle() {
- return true;
- }
-
- /**
- * @return Returns the wrapperChildren.
- */
- public List<ParameterImpl> getWrapperChildren() {
- return wrapperChildren;
- }
-
- /**
- * Adds a new child parameter.
- *
- * @param wrapperChild
- */
- public void addWrapperChild(ParameterImpl wrapperChild) {
- wrapperChildren.add(wrapperChild);
- wrapperChild.wrapper = this;
- // must bind to body. see class javadoc
- assert wrapperChild.getBinding()== ParameterBinding.BODY;
- }
-
- public void clear(){
- wrapperChildren.clear();
- }
-
- @Override
- void fillTypes(List<TypeInfo> types) {
- super.fillTypes(types);
- if(WrapperComposite.class.equals(getTypeInfo().type)) {
- for (ParameterImpl p : wrapperChildren) p.fillTypes(types);
- }
-// if(getParent().getBinding().isRpcLit()) {
-// // for rpc/lit, we need to individually marshal/unmarshal wrapped values,
-// // so their TypeReference needs to be collected
-//// assert getTypeReference().type==CompositeStructure.class;
-// for (ParameterImpl p : wrapperChildren)
-// p.fillTypes(types);
-// }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/soap/SOAPBindingImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/soap/SOAPBindingImpl.java
deleted file mode 100644
index 461a0323..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/soap/SOAPBindingImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model.soap;
-
-import com.sun.xml.internal.ws.api.model.soap.SOAPBinding;
-import javax.jws.soap.SOAPBinding.Style;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-
-/**
- * A wsdl:opeartion binding object that represents soap:binding. This can be
- * the return of {@link com.sun.xml.internal.ws.api.model.JavaMethod#getBinding()}.
- * <p/>
- * the default values are always document/literal and SoapVersion is SOAP 1.1.
- *
- * @author Vivek Pandey
- */
-public class SOAPBindingImpl extends SOAPBinding {
- public SOAPBindingImpl() {
- }
-
- public SOAPBindingImpl(SOAPBinding sb) {
- this.use = sb.getUse();
- this.style = sb.getStyle();
- this.soapVersion = sb.getSOAPVersion();
- this.soapAction = sb.getSOAPAction();
- }
-
- /**
- * @param style The style to set.
- */
- public void setStyle(Style style) {
- this.style = style;
- }
-
- /**
- * @param version
- */
- public void setSOAPVersion(SOAPVersion version) {
- this.soapVersion = version;
- }
-
- /**
- * @param soapAction The soapAction to set.
- */
- public void setSOAPAction(String soapAction) {
- this.soapAction = soapAction;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractExtensibleImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractExtensibleImpl.java
deleted file mode 100644
index d7b3be40..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractExtensibleImpl.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model.wsdl;
-
-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.istack.internal.NotNull;
-
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.xml.sax.Locator;
-
-/**
- * All the WSDL 1.1 elements that are extensible should subclass from this abstract implementation of
- * {@link WSDLExtensible} interface.
- *
- * @author Vivek Pandey
- * @author Kohsuke Kawaguchi
- */
-abstract class AbstractExtensibleImpl extends AbstractObjectImpl implements WSDLExtensible {
- protected final Set<WSDLExtension> extensions = new HashSet<WSDLExtension>();
- // this captures any wsdl extensions that are not understood by WSDLExtensionParsers
- // and have wsdl:required=true
- protected List<UnknownWSDLExtension> notUnderstoodExtensions =
- new ArrayList<UnknownWSDLExtension>();
-
- protected AbstractExtensibleImpl(XMLStreamReader xsr) {
- super(xsr);
- }
-
- protected AbstractExtensibleImpl(String systemId, int lineNumber) {
- super(systemId, lineNumber);
- }
-
- public final Iterable<WSDLExtension> getExtensions() {
- return extensions;
- }
-
- public final <T extends WSDLExtension> Iterable<T> getExtensions(Class<T> type) {
- // TODO: this is a rather stupid implementation
- List<T> r = new ArrayList<T>(extensions.size());
- for (WSDLExtension e : extensions) {
- if(type.isInstance(e))
- r.add(type.cast(e));
- }
- return r;
- }
-
- public <T extends WSDLExtension> T getExtension(Class<T> type) {
- for (WSDLExtension e : extensions) {
- if(type.isInstance(e))
- return type.cast(e);
- }
- return null;
- }
-
- public void addExtension(WSDLExtension ex) {
- if(ex==null)
- // I don't trust plugins. So let's always check it, instead of making this an assertion
- throw new IllegalArgumentException();
- 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
- * @param extnEl
- * @param locator
- */
- public void addNotUnderstoodExtension(QName extnEl, Locator locator) {
- notUnderstoodExtensions.add(new UnknownWSDLExtension(extnEl, locator));
- }
-
- protected static class UnknownWSDLExtension implements WSDLExtension, WSDLObject {
- private final QName extnEl;
- private final Locator locator;
- public UnknownWSDLExtension(QName extnEl, Locator locator) {
- this.extnEl = extnEl;
- this.locator = locator;
- }
- public QName getName() {
- return extnEl;
- }
- @NotNull public Locator getLocation() {
- return locator;
- }
- public String toString(){
- return extnEl + " "+ UtilMessages.UTIL_LOCATION( locator.getLineNumber(), locator.getSystemId());
- }
- }
-
- /**
- * This method should be called after freezing the WSDLModel
- * @return true if all wsdl required extensions on Port and Binding are understood
- */
- public boolean areRequiredExtensionsUnderstood() {
- if (notUnderstoodExtensions.size() != 0) {
- StringBuilder buf = new StringBuilder("Unknown WSDL extensibility elements:");
- for (UnknownWSDLExtension extn : notUnderstoodExtensions)
- buf.append('\n').append(extn.toString());
- throw new WebServiceException(buf.toString());
- }
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractFeaturedObjectImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractFeaturedObjectImpl.java
deleted file mode 100644
index df10b822..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractFeaturedObjectImpl.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model.wsdl;import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLFeaturedObject;
-import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
-
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-abstract class AbstractFeaturedObjectImpl extends AbstractExtensibleImpl implements WSDLFeaturedObject {
- protected WebServiceFeatureList features;
-
- protected AbstractFeaturedObjectImpl(XMLStreamReader xsr) {
- super(xsr);
- }
- protected AbstractFeaturedObjectImpl(String systemId, int lineNumber) {
- super(systemId, lineNumber);
- }
-
- public final void addFeature(WebServiceFeature feature) {
- if (features == null)
- features = new WebServiceFeatureList();
-
- features.add(feature);
- }
-
- public @NotNull WebServiceFeatureList getFeatures() {
- if(features == null)
- return new WebServiceFeatureList();
- return features;
- }
-
- public final WebServiceFeature getFeature(String id) {
- if (features != null) {
- for (WebServiceFeature f : features) {
- if (f.getID().equals(id))
- return f;
- }
- }
-
- return null;
- }
-
- @Nullable
- public <F extends WebServiceFeature> F getFeature(@NotNull Class<F> featureType) {
- if(features==null)
- return null;
- else
- return features.get(featureType);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractObjectImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractObjectImpl.java
deleted file mode 100644
index 08ff403c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractObjectImpl.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model.wsdl;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLObject;
-import org.xml.sax.Locator;
-import org.xml.sax.helpers.LocatorImpl;
-
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-abstract class AbstractObjectImpl implements WSDLObject {
- // source location information
- private final int lineNumber;
- private final String systemId;
-
-
- /*package*/ AbstractObjectImpl(XMLStreamReader xsr) {
- Location loc = xsr.getLocation();
- this.lineNumber = loc.getLineNumber();
- this.systemId = loc.getSystemId();
- }
-
- /*package*/ AbstractObjectImpl(String systemId, int lineNumber) {
- this.systemId = systemId;
- this.lineNumber = lineNumber;
- }
-
- public final @NotNull Locator getLocation() {
- LocatorImpl loc = new LocatorImpl();
- loc.setSystemId(systemId);
- loc.setLineNumber(lineNumber);
- return loc;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java
deleted file mode 100644
index bdd590e2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model.wsdl;
-
-import com.sun.istack.internal.NotNull;
-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;
-
-/**
- * @author Vivek Pandey
- */
-public class WSDLBoundFaultImpl extends AbstractExtensibleImpl implements EditableWSDLBoundFault {
- private final String name;
- private EditableWSDLFault fault;
- private EditableWSDLBoundOperation owner;
-
- public WSDLBoundFaultImpl(XMLStreamReader xsr, String name, EditableWSDLBoundOperation owner) {
- super(xsr);
- this.name = name;
- this.owner = owner;
- }
-
- public
- @NotNull
- String getName() {
- return name;
- }
-
- public QName getQName() {
- if(owner.getOperation() != null){
- return new QName(owner.getOperation().getName().getNamespaceURI(), name);
- }
- return null;
- }
-
- public EditableWSDLFault getFault() {
- return fault;
- }
-
- @NotNull
- public EditableWSDLBoundOperation getBoundOperation() {
- return owner;
- }
-
- public void freeze(EditableWSDLBoundOperation root) {
- assert root != null;
- EditableWSDLOperation op = root.getOperation();
- if (op != null) {
- for (EditableWSDLFault f : op.getFaults()) {
- if (f.getName().equals(name)) {
- this.fault = f;
- break;
- }
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundOperationImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundOperationImpl.java
deleted file mode 100644
index e4f00970..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundOperationImpl.java
+++ /dev/null
@@ -1,430 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model.wsdl;
-
-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.*;
-
-/**
- * Implementation of {@link WSDLBoundOperation}
- *
- * @author Vivek Pandey
- */
-public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl implements EditableWSDLBoundOperation {
- private final QName name;
-
- // map of wsdl:part to the binding
- private final Map<String, ParameterBinding> inputParts;
- private final Map<String, ParameterBinding> outputParts;
- private final Map<String, ParameterBinding> faultParts;
- private final Map<String, String> inputMimeTypes;
- private final Map<String, String> outputMimeTypes;
- private final Map<String, String> faultMimeTypes;
-
- private boolean explicitInputSOAPBodyParts = false;
- private boolean explicitOutputSOAPBodyParts = false;
- private boolean explicitFaultSOAPBodyParts = false;
-
- private Boolean emptyInputBody;
- private Boolean emptyOutputBody;
- private Boolean emptyFaultBody;
-
- 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 EditableWSDLBoundPortType owner;
-
- /**
- *
- * @param name wsdl:operation name qualified value
- */
- public WSDLBoundOperationImpl(XMLStreamReader xsr, EditableWSDLBoundPortType owner, QName name) {
- super(xsr);
- this.name = name;
- inputParts = new HashMap<String, ParameterBinding>();
- outputParts = new HashMap<String, ParameterBinding>();
- faultParts = new HashMap<String, ParameterBinding>();
- inputMimeTypes = new HashMap<String, String>();
- outputMimeTypes = new HashMap<String, String>();
- faultMimeTypes = new HashMap<String, String>();
- inParts = new HashMap<String, EditableWSDLPart>();
- outParts = new HashMap<String, EditableWSDLPart>();
- wsdlBoundFaults = new ArrayList<EditableWSDLBoundFault>();
- this.owner = owner;
- }
-
- @Override
- public QName getName(){
- return name;
- }
-
- @Override
- public String getSOAPAction() {
- return soapAction;
- }
-
- public void setSoapAction(String soapAction) {
- this.soapAction = soapAction!=null?soapAction:"";
- }
-
- @Override
- public EditableWSDLPart getPart(String partName, Mode mode) {
- if(mode==Mode.IN){
- return inParts.get(partName);
- }else if(mode==Mode.OUT){
- return outParts.get(partName);
- }
- return null;
- }
-
- public void addPart(EditableWSDLPart part, Mode mode){
- if(mode==Mode.IN)
- inParts.put(part.getName(), part);
- else if(mode==Mode.OUT)
- outParts.put(part.getName(), part);
- }
-
- /**
- * 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() {
- return inputParts;
- }
-
- /**
- * 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() {
- return outputParts;
- }
-
- /**
- * 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() {
- return faultParts;
- }
-
- // TODO: what's the difference between this and inputParts/outputParts?
- @Override
- public Map<String, ? extends EditableWSDLPart> getInParts() {
- return Collections.<String, EditableWSDLPart>unmodifiableMap(inParts);
- }
-
- @Override
- public Map<String, ? extends EditableWSDLPart> getOutParts() {
- return Collections.<String, EditableWSDLPart>unmodifiableMap(outParts);
- }
-
- @NotNull
- @Override
- public List<? extends EditableWSDLBoundFault> getFaults() {
- return wsdlBoundFaults;
- }
-
- public void addFault(@NotNull EditableWSDLBoundFault fault){
- wsdlBoundFaults.add(fault);
- }
-
-
- /**
- * 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){
- if(emptyInputBody == null){
- if(inputParts.get(" ") != null)
- emptyInputBody = true;
- else
- emptyInputBody = false;
- }
- ParameterBinding block = inputParts.get(part);
- if(block == null){
- if(explicitInputSOAPBodyParts || emptyInputBody)
- return ParameterBinding.UNBOUND;
- return ParameterBinding.BODY;
- }
-
- return block;
- }
-
- /**
- * 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){
- if(emptyOutputBody == null){
- if(outputParts.get(" ") != null)
- emptyOutputBody = true;
- else
- emptyOutputBody = false;
- }
- ParameterBinding block = outputParts.get(part);
- if(block == null){
- if(explicitOutputSOAPBodyParts || emptyOutputBody)
- return ParameterBinding.UNBOUND;
- return ParameterBinding.BODY;
- }
-
- return block;
- }
-
- /**
- * 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){
- if(emptyFaultBody == null){
- if(faultParts.get(" ") != null)
- emptyFaultBody = true;
- else
- emptyFaultBody = false;
- }
- ParameterBinding block = faultParts.get(part);
- if(block == null){
- if(explicitFaultSOAPBodyParts || emptyFaultBody)
- return ParameterBinding.UNBOUND;
- return ParameterBinding.BODY;
- }
-
- return block;
- }
-
- /**
- * 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){
- return inputMimeTypes.get(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){
- return outputMimeTypes.get(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){
- return faultMimeTypes.get(part);
- }
-
- @Override
- public EditableWSDLOperation getOperation() {
- return operation;
- }
-
-
- @Override
- public EditableWSDLBoundPortType getBoundPortType() {
- return owner;
- }
-
- public void setInputExplicitBodyParts(boolean b) {
- explicitInputSOAPBodyParts = b;
- }
-
- public void setOutputExplicitBodyParts(boolean b) {
- explicitOutputSOAPBodyParts = b;
- }
-
- public void setFaultExplicitBodyParts(boolean b) {
- explicitFaultSOAPBodyParts = b;
- }
-
- private Style style = Style.DOCUMENT;
- public void setStyle(Style style){
- this.style = style;
- }
-
- @Override
- public @Nullable QName getRequestPayloadName() {
- if (emptyRequestPayload)
- return null;
-
- if (requestPayloadName != null)
- return requestPayloadName;
-
- if(style.equals(Style.RPC)){
- String ns = getRequestNamespace() != null ? getRequestNamespace() : name.getNamespaceURI();
- requestPayloadName = new QName(ns, name.getLocalPart());
- return requestPayloadName;
- }else{
- QName inMsgName = operation.getInput().getMessage().getName();
- EditableWSDLMessage message = messages.get(inMsgName);
- for(EditableWSDLPart part:message.parts()){
- ParameterBinding binding = getInputBinding(part.getName());
- if(binding.isBody()){
- requestPayloadName = part.getDescriptor().name();
- return requestPayloadName;
- }
- }
-
- //Its empty payload
- emptyRequestPayload = true;
- }
- //empty body
- return null;
- }
-
- @Override
- public @Nullable QName getResponsePayloadName() {
- if (emptyResponsePayload)
- return null;
-
- if (responsePayloadName != null)
- return responsePayloadName;
-
- if(style.equals(Style.RPC)){
- String ns = getResponseNamespace() != null ? getResponseNamespace() : name.getNamespaceURI();
- responsePayloadName = new QName(ns, name.getLocalPart()+"Response");
- return responsePayloadName;
- }else{
- QName outMsgName = operation.getOutput().getMessage().getName();
- EditableWSDLMessage message = messages.get(outMsgName);
- for(EditableWSDLPart part:message.parts()){
- ParameterBinding binding = getOutputBinding(part.getName());
- if(binding.isBody()){
- responsePayloadName = part.getDescriptor().name();
- return responsePayloadName;
- }
- }
-
- //Its empty payload
- emptyResponsePayload = true;
- }
- //empty body
- return null;
- }
-
-
- private String reqNamespace;
- private String respNamespace;
-
- /**
- * For rpclit gives namespace value on soapbinding:body@namespace
- *
- * @return non-null for rpclit and null for doclit
- * @see RuntimeModeler#processRpcMethod(JavaMethodImpl, String, String, Method)
- */
- @Override
- public String getRequestNamespace(){
- return (reqNamespace != null)?reqNamespace:name.getNamespaceURI();
- }
-
- public void setRequestNamespace(String ns){
- reqNamespace = ns;
- }
-
- /**
- * For rpclit gives namespace value on soapbinding:body@namespace
- *
- * @return non-null for rpclit and null for doclit
- * @see RuntimeModeler#processRpcMethod(JavaMethodImpl, String, String, Method)
- */
- @Override
- public String getResponseNamespace(){
- return (respNamespace!=null)?respNamespace:name.getNamespaceURI();
- }
-
- public void setResponseNamespace(String ns){
- respNamespace = ns;
- }
-
- EditableWSDLBoundPortType getOwner(){
- return owner;
- }
-
- private QName requestPayloadName;
- private QName responsePayloadName;
- private boolean emptyRequestPayload;
- private boolean emptyResponsePayload;
- private Map<QName, ? extends EditableWSDLMessage> messages;
-
- public void freeze(EditableWSDLModel parent) {
- messages = parent.getMessages();
- operation = owner.getPortType().get(name.getLocalPart());
- for(EditableWSDLBoundFault bf : wsdlBoundFaults){
- bf.freeze(this);
- }
- }
-
- public void setAnonymous(ANONYMOUS anonymous) {
- this.anonymous = anonymous;
- }
-
- /**
- * @inheritDoc
- */
- @Override
- public ANONYMOUS getAnonymous() {
- return anonymous;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java
deleted file mode 100644
index ddd052de..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model.wsdl;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.BindingID;
-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;
-
-import javax.jws.WebParam.Mode;
-import javax.jws.soap.SOAPBinding;
-import javax.jws.soap.SOAPBinding.Style;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.soap.MTOMFeature;
-
-/**
- * Implementation of {@link WSDLBoundPortType}
- *
- * @author Vivek Pandey
- */
-public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl implements EditableWSDLBoundPortType {
- private final QName name;
- private final QName portTypeName;
- private EditableWSDLPortType portType;
- private BindingID bindingId;
- private final @NotNull EditableWSDLModel owner;
- private final QNameMap<EditableWSDLBoundOperation> bindingOperations = new QNameMap<EditableWSDLBoundOperation>();
-
- /**
- * Operations keyed by the payload tag name.
- */
- private QNameMap<EditableWSDLBoundOperation> payloadMap;
- /**
- * {@link #payloadMap} doesn't allow null key, so we store the value for it here.
- */
- private EditableWSDLBoundOperation emptyPayloadOperation;
-
-
-
- public WSDLBoundPortTypeImpl(XMLStreamReader xsr,@NotNull EditableWSDLModel owner, QName name, QName portTypeName) {
- super(xsr);
- this.owner = owner;
- this.name = name;
- this.portTypeName = portTypeName;
- owner.addBinding(this);
- }
-
- public QName getName() {
- return name;
- }
-
- public @NotNull EditableWSDLModel getOwner() {
- return owner;
- }
-
- public EditableWSDLBoundOperation get(QName operationName) {
- return bindingOperations.get(operationName);
- }
-
- /**
- * 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) {
- bindingOperations.put(opName,ptOp);
- }
-
- public QName getPortTypeName() {
- return portTypeName;
- }
-
- public EditableWSDLPortType getPortType() {
- return portType;
- }
-
- public Iterable<EditableWSDLBoundOperation> getBindingOperations() {
- return bindingOperations.values();
- }
-
- public BindingID getBindingId() {
- //Should the default be SOAP1.1/HTTP binding? For now lets keep it for
- //JBI bug 6509800
- return (bindingId==null)?BindingID.SOAP11_HTTP:bindingId;
- }
-
- public void setBindingId(BindingID bindingId) {
- this.bindingId = bindingId;
- }
-
- /**
- * sets whether the {@link WSDLBoundPortType} is rpc or lit
- */
- private Style style = Style.DOCUMENT;
- public void setStyle(Style style){
- this.style = style;
- }
-
- public SOAPBinding.Style getStyle() {
- return style;
- }
-
- public boolean isRpcLit(){
- return Style.RPC==style;
- }
-
- public boolean isDoclit(){
- return Style.DOCUMENT==style;
- }
-
-
- /**
- * Gets the {@link ParameterBinding} for a given operation, part name and the direction - IN/OUT
- *
- * @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 ParameterBinding getBinding(QName operation, String part, Mode mode) {
- EditableWSDLBoundOperation op = get(operation);
- if (op == null) {
- //TODO throw exception
- return null;
- }
- if ((Mode.IN == mode) || (Mode.INOUT == mode))
- return op.getInputBinding(part);
- else
- return op.getOutputBinding(part);
- }
-
- public EditableWSDLBoundOperation getOperation(String namespaceUri, String localName) {
- if(namespaceUri==null && localName == null)
- return emptyPayloadOperation;
- else{
- return payloadMap.get((namespaceUri==null)?"":namespaceUri,localName);
- }
- }
-
- public void freeze() {
- portType = owner.getPortType(portTypeName);
- if(portType == null){
- throw new LocatableWebServiceException(
- ClientMessages.UNDEFINED_PORT_TYPE(portTypeName), getLocation());
- }
- portType.freeze();
-
- for (EditableWSDLBoundOperation op : bindingOperations.values()) {
- op.freeze(owner);
- }
-
- freezePayloadMap();
- owner.finalizeRpcLitBinding(this);
- }
-
- private void freezePayloadMap() {
- if(style== Style.RPC) {
- payloadMap = new QNameMap<EditableWSDLBoundOperation>();
- for(EditableWSDLBoundOperation op : bindingOperations.values()){
- payloadMap.put(op.getRequestPayloadName(), op);
- }
- } else {
- payloadMap = new QNameMap<EditableWSDLBoundOperation>();
- // For doclit The tag will be the operation that has the same input part descriptor value
- for(EditableWSDLBoundOperation op : bindingOperations.values()){
- QName name = op.getRequestPayloadName();
- if(name == null){
- //empty payload
- emptyPayloadOperation = op;
- continue;
- }
-
- payloadMap.put(name, op);
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLDirectProperties.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLDirectProperties.java
deleted file mode 100644
index 2e01c6aa..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLDirectProperties.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model.wsdl;
-
-import com.sun.xml.internal.ws.api.model.SEIModel;
-
-import javax.xml.namespace.QName;
-
-/**
- * Replacement for {@link WSDLPortProperties} for when elements from the WSDL are known,
- * but the full WSDL is not available.
- *
- */
-public final class WSDLDirectProperties extends WSDLProperties {
- private final QName serviceName;
- private final QName portName;
-
- public WSDLDirectProperties(QName serviceName, QName portName) {
- this(serviceName, portName, null);
- }
-
- public WSDLDirectProperties(QName serviceName, QName portName, SEIModel seiModel) {
- super(seiModel);
- this.serviceName = serviceName;
- this.portName = portName;
- }
-
- public QName getWSDLService() {
- return serviceName;
- }
-
- public QName getWSDLPort() {
- return portName;
- }
-
- public QName getWSDLPortType() {
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLFaultImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLFaultImpl.java
deleted file mode 100644
index cfe3d5bb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLFaultImpl.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model.wsdl;
-
-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;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * @author Vivek Pandey
- */
-public final class WSDLFaultImpl extends AbstractExtensibleImpl implements EditableWSDLFault {
- private final String name;
- private final QName messageName;
- private EditableWSDLMessage message;
- private EditableWSDLOperation operation;
- private String action = "";
- private boolean defaultAction = true;
-
- public WSDLFaultImpl(XMLStreamReader xsr, String name, QName messageName, EditableWSDLOperation operation) {
- super(xsr);
- this.name = name;
- this.messageName = messageName;
- this.operation = operation;
- }
-
- public String getName() {
- return name;
- }
-
- public EditableWSDLMessage getMessage() {
- return message;
- }
-
- @NotNull
- public EditableWSDLOperation getOperation() {
- return operation;
- }
-
- @NotNull
- public QName getQName() {
- return new QName(operation.getName().getNamespaceURI(), name);
- }
-
- @NotNull
- public String getAction() {
- return action;
- }
-
- public void setAction(String action) {
- this.action = action;
- }
-
- public boolean isDefaultAction() {
- return defaultAction;
- }
-
- public void setDefaultAction(boolean defaultAction) {
- this.defaultAction = defaultAction;
- }
-
- public void freeze(EditableWSDLModel root){
- message = root.getMessage(messageName);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLInputImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLInputImpl.java
deleted file mode 100644
index c90c84cd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLInputImpl.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model.wsdl;
-
-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 javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * @author Vivek Pandey
- */
-public final class WSDLInputImpl extends AbstractExtensibleImpl implements EditableWSDLInput {
- private String name;
- private QName messageName;
- private EditableWSDLOperation operation;
- private EditableWSDLMessage message;
- private String action;
- private boolean defaultAction = true;
-
- public WSDLInputImpl(XMLStreamReader xsr,String name, QName messageName, EditableWSDLOperation operation) {
- super(xsr);
- this.name = name;
- this.messageName = messageName;
- this.operation = operation;
- }
-
- public String getName() {
- if(name != null)
- return name;
-
- return (operation.isOneWay())?operation.getName().getLocalPart():operation.getName().getLocalPart()+"Request";
- }
-
- public EditableWSDLMessage getMessage() {
- return message;
- }
-
- public String getAction() {
- return action;
- }
-
- @NotNull
- public EditableWSDLOperation getOperation() {
- return operation;
- }
-
- public QName getQName() {
- return new QName(operation.getName().getNamespaceURI(), getName());
- }
-
- public void setAction(String action) {
- this.action = action;
- }
-
- public boolean isDefaultAction() {
- return defaultAction;
- }
-
- public void setDefaultAction(boolean defaultAction) {
- this.defaultAction = defaultAction;
- }
-
- public void freeze(EditableWSDLModel parent) {
- message = parent.getMessage(messageName);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLMessageImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLMessageImpl.java
deleted file mode 100644
index 22dcc2b1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLMessageImpl.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model.wsdl;
-
-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 EditableWSDLMessage {
- private final QName name;
- private final ArrayList<EditableWSDLPart> parts;
-
- /**
- * @param name wsdl:message name attribute value
- */
- public WSDLMessageImpl(XMLStreamReader xsr,QName name) {
- super(xsr);
- this.name = name;
- this.parts = new ArrayList<EditableWSDLPart>();
- }
-
- public QName getName() {
- return name;
- }
-
- public void add(EditableWSDLPart part){
- parts.add(part);
- }
-
- public Iterable<EditableWSDLPart> parts(){
- return parts;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLModelImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLModelImpl.java
deleted file mode 100644
index 798388ac..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLModelImpl.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.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.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.WSDLPortType;
-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.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * Implementation of {@link WSDLModel}
- *
- * @author Vivek Pandey
- */
-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, EditableWSDLBoundPortType> unmBindings
- = Collections.<QName, EditableWSDLBoundPortType>unmodifiableMap(bindings);
-
-
- public WSDLModelImpl(@NotNull String systemId) {
- super(systemId,-1);
- }
-
- /**
- * To create {@link WSDLModelImpl} from WSDL that doesn't have a system ID.
- */
- public WSDLModelImpl() {
- super(null,-1);
- }
-
- public void addMessage(EditableWSDLMessage msg){
- messages.put(msg.getName(), msg);
- }
-
- public EditableWSDLMessage getMessage(QName name){
- return messages.get(name);
- }
-
- public void addPortType(EditableWSDLPortType pt){
- portTypes.put(pt.getName(), pt);
- }
-
- public EditableWSDLPortType getPortType(QName name){
- return portTypes.get(name);
- }
-
- public void addBinding(EditableWSDLBoundPortType boundPortType){
- assert !bindings.containsValue(boundPortType);
- bindings.put(boundPortType.getName(), boundPortType);
- }
-
- public EditableWSDLBoundPortType getBinding(QName name){
- return bindings.get(name);
- }
-
- public void addService(EditableWSDLService svc){
- services.put(svc.getName(), svc);
- }
-
- public EditableWSDLService getService(QName name){
- return services.get(name);
- }
-
- public Map<QName, EditableWSDLMessage> getMessages() {
- return messages;
- }
-
- public @NotNull Map<QName, EditableWSDLPortType> getPortTypes() {
- return portTypes;
- }
-
- public @NotNull Map<QName, ? extends EditableWSDLBoundPortType> getBindings() {
- return unmBindings;
- }
-
- public @NotNull Map<QName, EditableWSDLService> getServices(){
- return services;
- }
-
- /**
- * Returns the first service QName from insertion order
- */
- public QName getFirstServiceName(){
- if(services.isEmpty())
- return null;
- return services.values().iterator().next().getName();
- }
-
- /**
- *
- * @param serviceName non-null service QName
- * @param portName non-null port QName
- * @return
- * WSDLBoundOperation on success otherwise null. throws NPE if any of the parameters null
- */
- public EditableWSDLBoundPortType getBinding(QName serviceName, QName portName){
- EditableWSDLService service = services.get(serviceName);
- if(service != null){
- EditableWSDLPort port = service.get(portName);
- if(port != null)
- return port.getBinding();
- }
- return null;
- }
-
- public void finalizeRpcLitBinding(EditableWSDLBoundPortType boundPortType){
- assert(boundPortType != null);
- QName portTypeName = boundPortType.getPortTypeName();
- if(portTypeName == null)
- return;
- WSDLPortType pt = portTypes.get(portTypeName);
- if(pt == null)
- return;
- for (EditableWSDLBoundOperation bop : boundPortType.getBindingOperations()) {
- WSDLOperation pto = pt.get(bop.getName().getLocalPart());
- WSDLMessage inMsgName = pto.getInput().getMessage();
- if(inMsgName == null)
- continue;
- EditableWSDLMessage inMsg = messages.get(inMsgName.getName());
- int bodyindex = 0;
- if(inMsg != null){
- for(EditableWSDLPart part:inMsg.parts()){
- String name = part.getName();
- ParameterBinding pb = bop.getInputBinding(name);
- if(pb.isBody()){
- part.setIndex(bodyindex++);
- part.setBinding(pb);
- bop.addPart(part, Mode.IN);
- }
- }
- }
- bodyindex=0;
- if(pto.isOneWay())
- continue;
- WSDLMessage outMsgName = pto.getOutput().getMessage();
- if(outMsgName == null)
- continue;
- EditableWSDLMessage outMsg = messages.get(outMsgName.getName());
- if(outMsg!= null){
- for(EditableWSDLPart part:outMsg.parts()){
- String name = part.getName();
- ParameterBinding pb = bop.getOutputBinding(name);
- if(pb.isBody()){
- part.setIndex(bodyindex++);
- part.setBinding(pb);
- bop.addPart(part, Mode.OUT);
- }
- }
- }
- }
- }
-
- /**
- * Gives the PolicyMap associated with the WSDLModel
- *
- * @return PolicyMap
- */
- public PolicyMap getPolicyMap() {
- return policyMap;
- }
-
- /**
- * Set PolicyMap for the WSDLModel.
- * @param policyMap
- */
- public void setPolicyMap(PolicyMap policyMap) {
- this.policyMap = policyMap;
- }
-
- /**
- * Invoked at the end of the model construction to fix up references, etc.
- */
- public void freeze() {
- for (EditableWSDLService service : services.values()) {
- service.freeze(this);
- }
- for (EditableWSDLBoundPortType bp : bindings.values()) {
- bp.freeze();
- }
- // Enforce freeze all the portTypes referenced by this endpoints, see Bug8966673 for detail
- for (EditableWSDLPortType pt : portTypes.values()) {
- pt.freeze();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOperationImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOperationImpl.java
deleted file mode 100644
index c4699940..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOperationImpl.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model.wsdl;
-
-import com.sun.istack.internal.NotNull;
-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.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.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOutput;
-import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart;
-import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType;
-import com.sun.xml.internal.ws.util.QNameMap;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Implementaiton of {@link WSDLOperation}
- *
- * @author Vivek Pandey
- */
-public final class WSDLOperationImpl extends AbstractExtensibleImpl implements EditableWSDLOperation {
- private final QName name;
- private String parameterOrder;
- private EditableWSDLInput input;
- private EditableWSDLOutput output;
- private final List<EditableWSDLFault> faults;
- private final QNameMap<EditableWSDLFault> faultMap;
- protected Iterable<EditableWSDLMessage> messages;
- private final EditableWSDLPortType owner;
-
- public WSDLOperationImpl(XMLStreamReader xsr, EditableWSDLPortType owner, QName name) {
- super(xsr);
- this.name = name;
- this.faults = new ArrayList<EditableWSDLFault>();
- this.faultMap = new QNameMap<EditableWSDLFault>();
- this.owner = owner;
- }
-
- public QName getName() {
- return name;
- }
-
- public String getParameterOrder() {
- return parameterOrder;
- }
-
- public void setParameterOrder(String parameterOrder) {
- this.parameterOrder = parameterOrder;
- }
-
- public EditableWSDLInput getInput() {
- return input;
- }
-
- public void setInput(EditableWSDLInput input) {
- this.input = input;
- }
-
- public EditableWSDLOutput getOutput() {
- return output;
- }
-
- public boolean isOneWay() {
- return output == null;
- }
-
- public void setOutput(EditableWSDLOutput output) {
- this.output = output;
- }
-
- public Iterable<EditableWSDLFault> getFaults() {
- return faults;
- }
-
- public EditableWSDLFault getFault(QName faultDetailName) {
- EditableWSDLFault fault = faultMap.get(faultDetailName);
- if(fault != null)
- return fault;
-
- for(EditableWSDLFault fi : faults){
- assert fi.getMessage().parts().iterator().hasNext();
- EditableWSDLPart part = fi.getMessage().parts().iterator().next();
- if(part.getDescriptor().name().equals(faultDetailName)){
- faultMap.put(faultDetailName, fi);
- return fi;
- }
- }
- return null;
- }
-
- @NotNull
- public QName getPortTypeName() {
- return owner.getName();
- }
-
- public void addFault(EditableWSDLFault fault) {
- faults.add(fault);
- }
-
- public void freeze(EditableWSDLModel root) {
- assert input != null;
- input.freeze(root);
- if(output != null)
- output.freeze(root);
- for(EditableWSDLFault fault : faults){
- fault.freeze(root);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.java
deleted file mode 100644
index 672c3680..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model.wsdl;
-
-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.EditableWSDLOutput;
-import com.sun.istack.internal.NotNull;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * @author Vivek Pandey
- */
-public final class WSDLOutputImpl extends AbstractExtensibleImpl implements EditableWSDLOutput {
- private String name;
- private QName messageName;
- private EditableWSDLOperation operation;
- private EditableWSDLMessage message;
- private String action;
- private boolean defaultAction = true;
-
- public WSDLOutputImpl(XMLStreamReader xsr,String name, QName messageName, EditableWSDLOperation operation) {
- super(xsr);
- this.name = name;
- this.messageName = messageName;
- this.operation = operation;
- }
-
- public String getName() {
- return (name == null)?operation.getName().getLocalPart()+"Response":name;
- }
-
- public EditableWSDLMessage getMessage() {
- return message;
- }
-
- public String getAction() {
- return action;
- }
-
- public boolean isDefaultAction() {
- return defaultAction;
- }
-
- public void setDefaultAction(boolean defaultAction) {
- this.defaultAction = defaultAction;
- }
-
- @NotNull
- public EditableWSDLOperation getOperation() {
- return operation;
- }
-
- @NotNull
- public QName getQName() {
- return new QName(operation.getName().getNamespaceURI(), getName());
- }
-
- public void setAction(String action) {
- this.action = action;
- }
-
- public void freeze(EditableWSDLModel root) {
- message = root.getMessage(messageName);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartDescriptorImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartDescriptorImpl.java
deleted file mode 100644
index f796fa2e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartDescriptorImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model.wsdl;
-
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLDescriptorKind;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPartDescriptor;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * @author Vivek Pandey
- */
-public final class WSDLPartDescriptorImpl extends AbstractObjectImpl implements WSDLPartDescriptor {
- private QName name;
- private WSDLDescriptorKind type;
-
- public WSDLPartDescriptorImpl(XMLStreamReader xsr,QName name, WSDLDescriptorKind kind) {
- super(xsr);
- this.name = name;
- this.type = kind;
- }
-
- public QName name() {
- return name;
- }
-
- public WSDLDescriptorKind type() {
- return type;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartImpl.java
deleted file mode 100644
index 64df1c0a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartImpl.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model.wsdl;
-
-import com.sun.xml.internal.ws.api.model.ParameterBinding;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPart;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPartDescriptor;
-import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart;
-
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * Implementation of {@link WSDLPart}
- *
- * @author Vivek Pandey
- */
-public final class WSDLPartImpl extends AbstractObjectImpl implements EditableWSDLPart {
- private final String name;
- private ParameterBinding binding;
- private int index;
- private final WSDLPartDescriptor descriptor;
-
- public WSDLPartImpl(XMLStreamReader xsr, String partName, int index, WSDLPartDescriptor descriptor) {
- super(xsr);
- this.name = partName;
- this.binding = ParameterBinding.UNBOUND;
- this.index = index;
- this.descriptor = descriptor;
-
- }
-
- public String getName() {
- return name;
- }
-
- public ParameterBinding getBinding() {
- return binding;
- }
-
- public void setBinding(ParameterBinding binding) {
- this.binding = binding;
- }
-
- public int getIndex() {
- return index;
- }
-
- //need to set the index in case of rpclit to reorder the body parts
- public void setIndex(int index){
- this.index = index;
- }
-
- public WSDLPartDescriptor getDescriptor() {
- return descriptor;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortImpl.java
deleted file mode 100644
index f5c9e845..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortImpl.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model.wsdl;
-
-import java.util.List;
-
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-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.EditableWSDLPort;
-import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService;
-import com.sun.xml.internal.ws.resources.ClientMessages;
-import com.sun.xml.internal.ws.util.exception.LocatableWebServiceException;
-import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser;
-import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.NotNull;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * Implementation of {@link WSDLPort}
- *
- * @author Vivek Pandey
- */
-public final class WSDLPortImpl extends AbstractFeaturedObjectImpl implements EditableWSDLPort {
- private final QName name;
- private EndpointAddress address;
- private final QName bindingName;
- private final EditableWSDLService owner;
- private WSEndpointReference epr;
-
- /**
- * To be set after the WSDL parsing is complete.
- */
- private EditableWSDLBoundPortType boundPortType;
-
- public WSDLPortImpl(XMLStreamReader xsr, EditableWSDLService owner, QName name, QName binding) {
- super(xsr);
- this.owner = owner;
- this.name = name;
- this.bindingName = binding;
- }
-
- public QName getName() {
- return name;
- }
-
- public QName getBindingName() {
- return bindingName;
- }
-
- public EndpointAddress getAddress() {
- return address;
- }
-
- public EditableWSDLService getOwner() {
- return owner;
- }
-
- /**
- * Only meant for {@link RuntimeWSDLParser} to call.
- */
- public void setAddress(EndpointAddress address) {
- assert address!=null;
- this.address = address;
- }
-
- /**
- * Only meant for {@link RuntimeWSDLParser} to call.
- */
- public void setEPR(@NotNull WSEndpointReference epr) {
- assert epr!=null;
- this.addExtension(epr);
- this.epr = epr;
- }
-
- public @Nullable WSEndpointReference getEPR() {
- return epr;
- }
-
- public EditableWSDLBoundPortType getBinding() {
- return boundPortType;
- }
-
- @SuppressWarnings("unchecked")
- public void freeze(EditableWSDLModel root) {
- boundPortType = root.getBinding(bindingName);
- if(boundPortType==null) {
- throw new LocatableWebServiceException(
- ClientMessages.UNDEFINED_BINDING(bindingName), getLocation());
- }
- if(features == null)
- features = new WebServiceFeatureList();
- features.setParentFeaturedObject(boundPortType);
- notUnderstoodExtensions.addAll((List<UnknownWSDLExtension>)boundPortType.getNotUnderstoodExtensions());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortProperties.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortProperties.java
deleted file mode 100644
index f67af101..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortProperties.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.model.wsdl;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.handler.MessageContext;
-
-/**
- * Properties exposed from {@link WSDLPort} for {@link MessageContext}.
- * Donot add this satellite if {@link WSDLPort} is null.
- *
- * @author Jitendra Kotamraju
- */
-public final class WSDLPortProperties extends WSDLProperties {
-
- private final @NotNull WSDLPort port;
-
- public WSDLPortProperties(@NotNull WSDLPort port) {
- this(port, null);
- }
-
- public WSDLPortProperties(@NotNull WSDLPort port, @Nullable SEIModel seiModel) {
- super(seiModel);
- this.port = port;
- }
-
- public QName getWSDLService() {
- return port.getOwner().getName();
- }
-
- public QName getWSDLPort() {
- return port.getName();
- }
-
- public QName getWSDLPortType() {
- return port.getBinding().getPortTypeName();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortTypeImpl.java
deleted file mode 100644
index 6ad0980c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortTypeImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model.wsdl;
-
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPortType;
-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.EditableWSDLPortType;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-
-import java.util.Hashtable;
-import java.util.Map;
-
-/**
- * Provides implementation of {@link WSDLPortType}
- *
- * @author Vivek Pandey
- */
-public final class WSDLPortTypeImpl extends AbstractExtensibleImpl implements EditableWSDLPortType {
- private QName name;
- private final Map<String, EditableWSDLOperation> portTypeOperations;
- private EditableWSDLModel owner;
-
- public WSDLPortTypeImpl(XMLStreamReader xsr, EditableWSDLModel owner, QName name) {
- super(xsr);
- this.name = name;
- this.owner = owner;
- portTypeOperations = new Hashtable<String, EditableWSDLOperation>();
- }
-
- public QName getName() {
- return name;
- }
-
- public EditableWSDLOperation get(String operationName) {
- return portTypeOperations.get(operationName);
- }
-
- public Iterable<EditableWSDLOperation> getOperations() {
- return portTypeOperations.values();
- }
-
- /**
- * Populates the Map that holds operation name as key and {@link WSDLOperation} 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(String opName, EditableWSDLOperation ptOp){
- portTypeOperations.put(opName, ptOp);
- }
-
- EditableWSDLModel getOwner(){
- return owner;
- }
-
- public void freeze() {
- for(EditableWSDLOperation op : portTypeOperations.values()){
- op.freeze(owner);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLProperties.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLProperties.java
deleted file mode 100644
index 0d2d287a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLProperties.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model.wsdl;
-
-import com.oracle.webservices.internal.api.message.BasePropertySet;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.handler.MessageContext;
-
-
-import org.xml.sax.InputSource;
-
-/**
- * Properties exposed from {@link WSDLPort} for {@link MessageContext}.
- * Donot add this satellite if {@link WSDLPort} is null.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class WSDLProperties extends BasePropertySet {
-
- private static final PropertyMap model;
- static {
- model = parse(WSDLProperties.class);
- }
-
- private final @Nullable SEIModel seiModel;
-
- protected WSDLProperties(@Nullable SEIModel seiModel) {
- this.seiModel = seiModel;
- }
-
- @Property(MessageContext.WSDL_SERVICE)
- public abstract QName getWSDLService();
-
- @Property(MessageContext.WSDL_PORT)
- public abstract QName getWSDLPort();
-
- @Property(MessageContext.WSDL_INTERFACE)
- public abstract QName getWSDLPortType();
-
- @Property(MessageContext.WSDL_DESCRIPTION)
- public InputSource getWSDLDescription() {
- return seiModel != null ? new InputSource(seiModel.getWSDLLocation()) : null;
- }
-
- @Override
- protected PropertyMap getPropertyMap() {
- return model;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLServiceImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLServiceImpl.java
deleted file mode 100644
index acc1d37a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLServiceImpl.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.model.wsdl;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-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.model.wsdl.editable.EditableWSDLModel;
-import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPort;
-import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * Implementation of {@link WSDLService}
- *
- * @author Vivek Pandey
- */
-public final class WSDLServiceImpl extends AbstractExtensibleImpl implements EditableWSDLService {
- private final QName name;
- private final Map<QName, EditableWSDLPort> ports;
- private final EditableWSDLModel parent;
-
- public WSDLServiceImpl(XMLStreamReader xsr, EditableWSDLModel parent, QName name) {
- super(xsr);
- this.parent = parent;
- this.name = name;
- ports = new LinkedHashMap<QName, EditableWSDLPort>();
- }
-
- public @NotNull
- EditableWSDLModel getParent() {
- return parent;
- }
-
- public QName getName() {
- return name;
- }
-
- public EditableWSDLPort get(QName portName) {
- return ports.get(portName);
- }
-
- public EditableWSDLPort getFirstPort() {
- if(ports.isEmpty())
- return null;
- else
- return ports.values().iterator().next();
- }
-
- public Iterable<EditableWSDLPort> getPorts(){
- return ports.values();
- }
-
- /**
- * gets the first port in this service which matches the portType
- */
- public @Nullable
- EditableWSDLPort getMatchingPort(QName portTypeName){
- for(EditableWSDLPort port : getPorts()){
- QName ptName = port.getBinding().getPortTypeName();
- assert (ptName != null);
- if(ptName.equals(portTypeName))
- return port;
- }
- return null;
- }
-
- /**
- * Populates the Map that holds port name as key and {@link WSDLPort} as the value.
- *
- * @param portName Must be non-null
- * @param port Must be non-null
- * @throws NullPointerException if either opName or ptOp is null
- */
- public void put(QName portName, EditableWSDLPort port) {
- if (portName == null || port == null)
- throw new NullPointerException();
- ports.put(portName, port);
- }
-
- public void freeze(EditableWSDLModel root) {
- for (EditableWSDLPort port : ports.values()) {
- port.freeze(root);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/AnnotationVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/AnnotationVisitor.java
deleted file mode 100644
index 5e9f284c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/AnnotationVisitor.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * A visitor to visit a Java annotation. The methods of this interface must be
- * called in the following order: (<tt>visit<tt> | <tt>visitEnum<tt> |
- * <tt>visitAnnotation<tt> | <tt>visitArray<tt>)* <tt>visitEnd<tt>.
- *
- * @author Eric Bruneton
- * @author Eugene Kuleshov
- */
-public interface AnnotationVisitor {
-
- /**
- * Visits a primitive value of the annotation.
- *
- * @param name the value name.
- * @param value the actual value, whose type must be {@link Byte},
- * {@link Boolean}, {@link Character}, {@link Short},
- * {@link Integer}, {@link Long}, {@link Float}, {@link Double},
- * {@link String} or {@link Type}. This value can also be an array
- * of byte, boolean, short, char, int, long, float or double values
- * (this is equivalent to using {@link #visitArray visitArray} and
- * visiting each array element in turn, but is more convenient).
- */
- void visit(String name, Object value);
-
- /**
- * Visits an enumeration value of the annotation.
- *
- * @param name the value name.
- * @param desc the class descriptor of the enumeration class.
- * @param value the actual enumeration value.
- */
- void visitEnum(String name, String desc, String value);
-
- /**
- * Visits a nested annotation value of the annotation.
- *
- * @param name the value name.
- * @param desc the class descriptor of the nested annotation class.
- * @return a visitor to visit the actual nested annotation value, or
- * <tt>null</tt> if this visitor is not interested in visiting
- * this nested annotation. <i>The nested annotation value must be
- * fully visited before calling other methods on this annotation
- * visitor</i>.
- */
- AnnotationVisitor visitAnnotation(String name, String desc);
-
- /**
- * Visits an array value of the annotation. Note that arrays of primitive
- * types (such as byte, boolean, short, char, int, long, float or double)
- * can be passed as value to {@link #visit visit}. This is what
- * {@link ClassReader} does.
- *
- * @param name the value name.
- * @return a visitor to visit the actual array value elements, or
- * <tt>null</tt> if this visitor is not interested in visiting
- * these values. The 'name' parameters passed to the methods of this
- * visitor are ignored. <i>All the array values must be visited
- * before calling other methods on this annotation visitor</i>.
- */
- AnnotationVisitor visitArray(String name);
-
- /**
- * Visits the end of the annotation.
- */
- void visitEnd();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/AnnotationWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/AnnotationWriter.java
deleted file mode 100644
index d7590973..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/AnnotationWriter.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * An {@link AnnotationVisitor} that generates annotations in bytecode form.
- *
- * @author Eric Bruneton
- * @author Eugene Kuleshov
- */
-final class AnnotationWriter implements AnnotationVisitor {
-
- /**
- * The class writer to which this annotation must be added.
- */
- private final ClassWriter cw;
-
- /**
- * The number of values in this annotation.
- */
- private int size;
-
- /**
- * <tt>true<tt> if values are named, <tt>false</tt> otherwise. Annotation
- * writers used for annotation default and annotation arrays use unnamed
- * values.
- */
- private final boolean named;
-
- /**
- * The annotation values in bytecode form. This byte vector only contains
- * the values themselves, i.e. the number of values must be stored as a
- * unsigned short just before these bytes.
- */
- private final ByteVector bv;
-
- /**
- * The byte vector to be used to store the number of values of this
- * annotation. See {@link #bv}.
- */
- private final ByteVector parent;
-
- /**
- * Where the number of values of this annotation must be stored in
- * {@link #parent}.
- */
- private final int offset;
-
- /**
- * Next annotation writer. This field is used to store annotation lists.
- */
- AnnotationWriter next;
-
- /**
- * Previous annotation writer. This field is used to store annotation lists.
- */
- AnnotationWriter prev;
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
-
- /**
- * Constructs a new {@link AnnotationWriter}.
- *
- * @param cw the class writer to which this annotation must be added.
- * @param named <tt>true<tt> if values are named, <tt>false</tt> otherwise.
- * @param bv where the annotation values must be stored.
- * @param parent where the number of annotation values must be stored.
- * @param offset where in <tt>parent</tt> the number of annotation values must
- * be stored.
- */
- AnnotationWriter(
- final ClassWriter cw,
- final boolean named,
- final ByteVector bv,
- final ByteVector parent,
- final int offset)
- {
- this.cw = cw;
- this.named = named;
- this.bv = bv;
- this.parent = parent;
- this.offset = offset;
- }
-
- // ------------------------------------------------------------------------
- // Implementation of the AnnotationVisitor interface
- // ------------------------------------------------------------------------
-
- public void visit(final String name, final Object value) {
- ++size;
- if (named) {
- bv.putShort(cw.newUTF8(name));
- }
- if (value instanceof String) {
- bv.put12('s', cw.newUTF8((String) value));
- } else if (value instanceof Byte) {
- bv.put12('B', cw.newInteger(((Byte) value).byteValue()).index);
- } else if (value instanceof Boolean) {
- int v = ((Boolean) value).booleanValue() ? 1 : 0;
- bv.put12('Z', cw.newInteger(v).index);
- } else if (value instanceof Character) {
- bv.put12('C', cw.newInteger(((Character) value).charValue()).index);
- } else if (value instanceof Short) {
- bv.put12('S', cw.newInteger(((Short) value).shortValue()).index);
- } else if (value instanceof Type) {
- bv.put12('c', cw.newUTF8(((Type) value).getDescriptor()));
- } else if (value instanceof byte[]) {
- byte[] v = (byte[]) value;
- bv.put12('[', v.length);
- for (int i = 0; i < v.length; i++) {
- bv.put12('B', cw.newInteger(v[i]).index);
- }
- } else if (value instanceof boolean[]) {
- boolean[] v = (boolean[]) value;
- bv.put12('[', v.length);
- for (int i = 0; i < v.length; i++) {
- bv.put12('Z', cw.newInteger(v[i] ? 1 : 0).index);
- }
- } else if (value instanceof short[]) {
- short[] v = (short[]) value;
- bv.put12('[', v.length);
- for (int i = 0; i < v.length; i++) {
- bv.put12('S', cw.newInteger(v[i]).index);
- }
- } else if (value instanceof char[]) {
- char[] v = (char[]) value;
- bv.put12('[', v.length);
- for (int i = 0; i < v.length; i++) {
- bv.put12('C', cw.newInteger(v[i]).index);
- }
- } else if (value instanceof int[]) {
- int[] v = (int[]) value;
- bv.put12('[', v.length);
- for (int i = 0; i < v.length; i++) {
- bv.put12('I', cw.newInteger(v[i]).index);
- }
- } else if (value instanceof long[]) {
- long[] v = (long[]) value;
- bv.put12('[', v.length);
- for (int i = 0; i < v.length; i++) {
- bv.put12('J', cw.newLong(v[i]).index);
- }
- } else if (value instanceof float[]) {
- float[] v = (float[]) value;
- bv.put12('[', v.length);
- for (int i = 0; i < v.length; i++) {
- bv.put12('F', cw.newFloat(v[i]).index);
- }
- } else if (value instanceof double[]) {
- double[] v = (double[]) value;
- bv.put12('[', v.length);
- for (int i = 0; i < v.length; i++) {
- bv.put12('D', cw.newDouble(v[i]).index);
- }
- } else {
- Item i = cw.newConstItem(value);
- bv.put12(".s.IFJDCS".charAt(i.type), i.index);
- }
- }
-
- public void visitEnum(
- final String name,
- final String desc,
- final String value)
- {
- ++size;
- if (named) {
- bv.putShort(cw.newUTF8(name));
- }
- bv.put12('e', cw.newUTF8(desc)).putShort(cw.newUTF8(value));
- }
-
- public AnnotationVisitor visitAnnotation(
- final String name,
- final String desc)
- {
- ++size;
- if (named) {
- bv.putShort(cw.newUTF8(name));
- }
- // write tag and type, and reserve space for values count
- bv.put12('@', cw.newUTF8(desc)).putShort(0);
- return new AnnotationWriter(cw, true, bv, bv, bv.length - 2);
- }
-
- public AnnotationVisitor visitArray(final String name) {
- ++size;
- if (named) {
- bv.putShort(cw.newUTF8(name));
- }
- // write tag, and reserve space for array size
- bv.put12('[', 0);
- return new AnnotationWriter(cw, false, bv, bv, bv.length - 2);
- }
-
- public void visitEnd() {
- if (parent != null) {
- byte[] data = parent.data;
- data[offset] = (byte) (size >>> 8);
- data[offset + 1] = (byte) size;
- }
- }
-
- // ------------------------------------------------------------------------
- // Utility methods
- // ------------------------------------------------------------------------
-
- /**
- * Returns the size of this annotation writer list.
- *
- * @return the size of this annotation writer list.
- */
- int getSize() {
- int size = 0;
- AnnotationWriter aw = this;
- while (aw != null) {
- size += aw.bv.length;
- aw = aw.next;
- }
- return size;
- }
-
- /**
- * Puts the annotations of this annotation writer list into the given byte
- * vector.
- *
- * @param out where the annotations must be put.
- */
- void put(final ByteVector out) {
- int n = 0;
- int size = 2;
- AnnotationWriter aw = this;
- AnnotationWriter last = null;
- while (aw != null) {
- ++n;
- size += aw.bv.length;
- aw.visitEnd(); // in case user forgot to call visitEnd
- aw.prev = last;
- last = aw;
- aw = aw.next;
- }
- out.putInt(size);
- out.putShort(n);
- aw = last;
- while (aw != null) {
- out.putByteArray(aw.bv.data, 0, aw.bv.length);
- aw = aw.prev;
- }
- }
-
- /**
- * Puts the given annotation lists into the given byte vector.
- *
- * @param panns an array of annotation writer lists.
- * @param off index of the first annotation to be written.
- * @param out where the annotations must be put.
- */
- static void put(
- final AnnotationWriter[] panns,
- final int off,
- final ByteVector out)
- {
- int size = 1 + 2 * (panns.length - off);
- for (int i = off; i < panns.length; ++i) {
- size += panns[i] == null ? 0 : panns[i].getSize();
- }
- out.putInt(size).putByte(panns.length - off);
- for (int i = off; i < panns.length; ++i) {
- AnnotationWriter aw = panns[i];
- AnnotationWriter last = null;
- int n = 0;
- while (aw != null) {
- ++n;
- aw.visitEnd(); // in case user forgot to call visitEnd
- aw.prev = last;
- last = aw;
- aw = aw.next;
- }
- out.putShort(n);
- aw = last;
- while (aw != null) {
- out.putByteArray(aw.bv.data, 0, aw.bv.length);
- aw = aw.prev;
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Attribute.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Attribute.java
deleted file mode 100644
index 509e3b4c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Attribute.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * A non standard class, field, method or code attribute.
- *
- * @author Eric Bruneton
- * @author Eugene Kuleshov
- */
-public class Attribute {
-
- /**
- * The type of this attribute.
- */
- public final String type;
-
- /**
- * The raw value of this attribute, used only for unknown attributes.
- */
- byte[] value;
-
- /**
- * The next attribute in this attribute list. May be <tt>null</tt>.
- */
- Attribute next;
-
- /**
- * Constructs a new empty attribute.
- *
- * @param type the type of the attribute.
- */
- protected Attribute(final String type) {
- this.type = type;
- }
-
- /**
- * Returns <tt>true</tt> if this type of attribute is unknown. The default
- * implementation of this method always returns <tt>true</tt>.
- *
- * @return <tt>true</tt> if this type of attribute is unknown.
- */
- public boolean isUnknown() {
- return true;
- }
-
- /**
- * Returns <tt>true</tt> if this type of attribute is a code attribute.
- *
- * @return <tt>true</tt> if this type of attribute is a code attribute.
- */
- public boolean isCodeAttribute() {
- return false;
- }
-
- /**
- * Returns the labels corresponding to this attribute.
- *
- * @return the labels corresponding to this attribute, or <tt>null</tt> if
- * this attribute is not a code attribute that contains labels.
- */
- protected Label[] getLabels() {
- return null;
- }
-
- /**
- * Reads a {@link #type type} attribute. This method must return a <i>new</i>
- * {@link Attribute} object, of type {@link #type type}, corresponding to
- * the <tt>len</tt> bytes starting at the given offset, in the given class
- * reader.
- *
- * @param cr the class that contains the attribute to be read.
- * @param off index of the first byte of the attribute's content in {@link
- * ClassReader#b cr.b}. The 6 attribute header bytes, containing the
- * type and the length of the attribute, are not taken into account
- * here.
- * @param len the length of the attribute's content.
- * @param buf buffer to be used to call
- * {@link ClassReader#readUTF8 readUTF8},
- * {@link ClassReader#readClass(int,char[]) readClass} or
- * {@link ClassReader#readConst readConst}.
- * @param codeOff index of the first byte of code's attribute content in
- * {@link ClassReader#b cr.b}, or -1 if the attribute to be read is
- * not a code attribute. The 6 attribute header bytes, containing the
- * type and the length of the attribute, are not taken into account
- * here.
- * @param labels the labels of the method's code, or <tt>null</tt> if the
- * attribute to be read is not a code attribute.
- * @return a <i>new</i> {@link Attribute} object corresponding to the given
- * bytes.
- */
- protected Attribute read(
- final ClassReader cr,
- final int off,
- final int len,
- final char[] buf,
- final int codeOff,
- final Label[] labels)
- {
- Attribute attr = new Attribute(type);
- attr.value = new byte[len];
- System.arraycopy(cr.b, off, attr.value, 0, len);
- return attr;
- }
-
- /**
- * Returns the byte array form of this attribute.
- *
- * @param cw the class to which this attribute must be added. This parameter
- * can be used to add to the constant pool of this class the items
- * that corresponds to this attribute.
- * @param code the bytecode of the method corresponding to this code
- * attribute, or <tt>null</tt> if this attribute is not a code
- * attributes.
- * @param len the length of the bytecode of the method corresponding to this
- * code attribute, or <tt>null</tt> if this attribute is not a code
- * attribute.
- * @param maxStack the maximum stack size of the method corresponding to
- * this code attribute, or -1 if this attribute is not a code
- * attribute.
- * @param maxLocals the maximum number of local variables of the method
- * corresponding to this code attribute, or -1 if this attribute is
- * not a code attribute.
- * @return the byte array form of this attribute.
- */
- protected ByteVector write(
- final ClassWriter cw,
- final byte[] code,
- final int len,
- final int maxStack,
- final int maxLocals)
- {
- ByteVector v = new ByteVector();
- v.data = value;
- v.length = value.length;
- return v;
- }
-
- /**
- * Returns the length of the attribute list that begins with this attribute.
- *
- * @return the length of the attribute list that begins with this attribute.
- */
- final int getCount() {
- int count = 0;
- Attribute attr = this;
- while (attr != null) {
- count += 1;
- attr = attr.next;
- }
- return count;
- }
-
- /**
- * Returns the size of all the attributes in this attribute list.
- *
- * @param cw the class writer to be used to convert the attributes into byte
- * arrays, with the {@link #write write} method.
- * @param code the bytecode of the method corresponding to these code
- * attributes, or <tt>null</tt> if these attributes are not code
- * attributes.
- * @param len the length of the bytecode of the method corresponding to
- * these code attributes, or <tt>null</tt> if these attributes are
- * not code attributes.
- * @param maxStack the maximum stack size of the method corresponding to
- * these code attributes, or -1 if these attributes are not code
- * attributes.
- * @param maxLocals the maximum number of local variables of the method
- * corresponding to these code attributes, or -1 if these attributes
- * are not code attributes.
- * @return the size of all the attributes in this attribute list. This size
- * includes the size of the attribute headers.
- */
- final int getSize(
- final ClassWriter cw,
- final byte[] code,
- final int len,
- final int maxStack,
- final int maxLocals)
- {
- Attribute attr = this;
- int size = 0;
- while (attr != null) {
- cw.newUTF8(attr.type);
- size += attr.write(cw, code, len, maxStack, maxLocals).length + 6;
- attr = attr.next;
- }
- return size;
- }
-
- /**
- * Writes all the attributes of this attribute list in the given byte
- * vector.
- *
- * @param cw the class writer to be used to convert the attributes into byte
- * arrays, with the {@link #write write} method.
- * @param code the bytecode of the method corresponding to these code
- * attributes, or <tt>null</tt> if these attributes are not code
- * attributes.
- * @param len the length of the bytecode of the method corresponding to
- * these code attributes, or <tt>null</tt> if these attributes are
- * not code attributes.
- * @param maxStack the maximum stack size of the method corresponding to
- * these code attributes, or -1 if these attributes are not code
- * attributes.
- * @param maxLocals the maximum number of local variables of the method
- * corresponding to these code attributes, or -1 if these attributes
- * are not code attributes.
- * @param out where the attributes must be written.
- */
- final void put(
- final ClassWriter cw,
- final byte[] code,
- final int len,
- final int maxStack,
- final int maxLocals,
- final ByteVector out)
- {
- Attribute attr = this;
- while (attr != null) {
- ByteVector b = attr.write(cw, code, len, maxStack, maxLocals);
- out.putShort(cw.newUTF8(attr.type)).putInt(b.length);
- out.putByteArray(b.data, 0, b.length);
- attr = attr.next;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ByteVector.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ByteVector.java
deleted file mode 100644
index 1ba36bd7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ByteVector.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * A dynamically extensible vector of bytes. This class is roughly equivalent to
- * a DataOutputStream on top of a ByteArrayOutputStream, but is more efficient.
- *
- * @author Eric Bruneton
- */
-public class ByteVector {
-
- /**
- * The content of this vector.
- */
- byte[] data;
-
- /**
- * Actual number of bytes in this vector.
- */
- int length;
-
- /**
- * Constructs a new {@link ByteVector ByteVector} with a default initial
- * size.
- */
- public ByteVector() {
- data = new byte[64];
- }
-
- /**
- * Constructs a new {@link ByteVector ByteVector} with the given initial
- * size.
- *
- * @param initialSize the initial size of the byte vector to be constructed.
- */
- public ByteVector(final int initialSize) {
- data = new byte[initialSize];
- }
-
- /**
- * Puts a byte into this byte vector. The byte vector is automatically
- * enlarged if necessary.
- *
- * @param b a byte.
- * @return this byte vector.
- */
- public ByteVector putByte(final int b) {
- int length = this.length;
- if (length + 1 > data.length) {
- enlarge(1);
- }
- data[length++] = (byte) b;
- this.length = length;
- return this;
- }
-
- /**
- * Puts two bytes into this byte vector. The byte vector is automatically
- * enlarged if necessary.
- *
- * @param b1 a byte.
- * @param b2 another byte.
- * @return this byte vector.
- */
- ByteVector put11(final int b1, final int b2) {
- int length = this.length;
- if (length + 2 > data.length) {
- enlarge(2);
- }
- byte[] data = this.data;
- data[length++] = (byte) b1;
- data[length++] = (byte) b2;
- this.length = length;
- return this;
- }
-
- /**
- * Puts a short into this byte vector. The byte vector is automatically
- * enlarged if necessary.
- *
- * @param s a short.
- * @return this byte vector.
- */
- public ByteVector putShort(final int s) {
- int length = this.length;
- if (length + 2 > data.length) {
- enlarge(2);
- }
- byte[] data = this.data;
- data[length++] = (byte) (s >>> 8);
- data[length++] = (byte) s;
- this.length = length;
- return this;
- }
-
- /**
- * Puts a byte and a short into this byte vector. The byte vector is
- * automatically enlarged if necessary.
- *
- * @param b a byte.
- * @param s a short.
- * @return this byte vector.
- */
- ByteVector put12(final int b, final int s) {
- int length = this.length;
- if (length + 3 > data.length) {
- enlarge(3);
- }
- byte[] data = this.data;
- data[length++] = (byte) b;
- data[length++] = (byte) (s >>> 8);
- data[length++] = (byte) s;
- this.length = length;
- return this;
- }
-
- /**
- * Puts an int into this byte vector. The byte vector is automatically
- * enlarged if necessary.
- *
- * @param i an int.
- * @return this byte vector.
- */
- public ByteVector putInt(final int i) {
- int length = this.length;
- if (length + 4 > data.length) {
- enlarge(4);
- }
- byte[] data = this.data;
- data[length++] = (byte) (i >>> 24);
- data[length++] = (byte) (i >>> 16);
- data[length++] = (byte) (i >>> 8);
- data[length++] = (byte) i;
- this.length = length;
- return this;
- }
-
- /**
- * Puts a long into this byte vector. The byte vector is automatically
- * enlarged if necessary.
- *
- * @param l a long.
- * @return this byte vector.
- */
- public ByteVector putLong(final long l) {
- int length = this.length;
- if (length + 8 > data.length) {
- enlarge(8);
- }
- byte[] data = this.data;
- int i = (int) (l >>> 32);
- data[length++] = (byte) (i >>> 24);
- data[length++] = (byte) (i >>> 16);
- data[length++] = (byte) (i >>> 8);
- data[length++] = (byte) i;
- i = (int) l;
- data[length++] = (byte) (i >>> 24);
- data[length++] = (byte) (i >>> 16);
- data[length++] = (byte) (i >>> 8);
- data[length++] = (byte) i;
- this.length = length;
- return this;
- }
-
- /**
- * Puts an UTF8 string into this byte vector. The byte vector is
- * automatically enlarged if necessary.
- *
- * @param s a String.
- * @return this byte vector.
- */
- public ByteVector putUTF8(final String s) {
- int charLength = s.length();
- if (length + 2 + charLength > data.length) {
- enlarge(2 + charLength);
- }
- int len = length;
- byte[] data = this.data;
- // optimistic algorithm: instead of computing the byte length and then
- // serializing the string (which requires two loops), we assume the byte
- // length is equal to char length (which is the most frequent case), and
- // we start serializing the string right away. During the serialization,
- // if we find that this assumption is wrong, we continue with the
- // general method.
- data[len++] = (byte) (charLength >>> 8);
- data[len++] = (byte) charLength;
- for (int i = 0; i < charLength; ++i) {
- char c = s.charAt(i);
- if (c >= '\001' && c <= '\177') {
- data[len++] = (byte) c;
- } else {
- int byteLength = i;
- for (int j = i; j < charLength; ++j) {
- c = s.charAt(j);
- if (c >= '\001' && c <= '\177') {
- byteLength++;
- } else if (c > '\u07FF') {
- byteLength += 3;
- } else {
- byteLength += 2;
- }
- }
- data[length] = (byte) (byteLength >>> 8);
- data[length + 1] = (byte) byteLength;
- if (length + 2 + byteLength > data.length) {
- length = len;
- enlarge(2 + byteLength);
- data = this.data;
- }
- for (int j = i; j < charLength; ++j) {
- c = s.charAt(j);
- if (c >= '\001' && c <= '\177') {
- data[len++] = (byte) c;
- } else if (c > '\u07FF') {
- data[len++] = (byte) (0xE0 | c >> 12 & 0xF);
- data[len++] = (byte) (0x80 | c >> 6 & 0x3F);
- data[len++] = (byte) (0x80 | c & 0x3F);
- } else {
- data[len++] = (byte) (0xC0 | c >> 6 & 0x1F);
- data[len++] = (byte) (0x80 | c & 0x3F);
- }
- }
- break;
- }
- }
- length = len;
- return this;
- }
-
- /**
- * Puts an array of bytes into this byte vector. The byte vector is
- * automatically enlarged if necessary.
- *
- * @param b an array of bytes. May be <tt>null</tt> to put <tt>len</tt>
- * null bytes into this byte vector.
- * @param off index of the fist byte of b that must be copied.
- * @param len number of bytes of b that must be copied.
- * @return this byte vector.
- */
- public ByteVector putByteArray(final byte[] b, final int off, final int len)
- {
- if (length + len > data.length) {
- enlarge(len);
- }
- if (b != null) {
- System.arraycopy(b, off, data, length, len);
- }
- length += len;
- return this;
- }
-
- /**
- * Enlarge this byte vector so that it can receive n more bytes.
- *
- * @param size number of additional bytes that this byte vector should be
- * able to receive.
- */
- private void enlarge(final int size) {
- int length1 = 2 * data.length;
- int length2 = length + size;
- byte[] newData = new byte[length1 > length2 ? length1 : length2];
- System.arraycopy(data, 0, newData, 0, length);
- data = newData;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassAdapter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassAdapter.java
deleted file mode 100644
index f6411011..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassAdapter.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * An empty {@link ClassVisitor} that delegates to another {@link ClassVisitor}.
- * This class can be used as a super class to quickly implement usefull class
- * adapter classes, just by overriding the necessary methods.
- *
- * @author Eric Bruneton
- */
-public class ClassAdapter implements ClassVisitor {
-
- /**
- * The {@link ClassVisitor} to which this adapter delegates calls.
- */
- protected ClassVisitor cv;
-
- /**
- * Constructs a new {@link ClassAdapter} object.
- *
- * @param cv the class visitor to which this adapter must delegate calls.
- */
- public ClassAdapter(final ClassVisitor cv) {
- this.cv = cv;
- }
-
- public void visit(
- final int version,
- final int access,
- final String name,
- final String signature,
- final String superName,
- final String[] interfaces)
- {
- cv.visit(version, access, name, signature, superName, interfaces);
- }
-
- public void visitSource(final String source, final String debug) {
- cv.visitSource(source, debug);
- }
-
- public void visitOuterClass(
- final String owner,
- final String name,
- final String desc)
- {
- cv.visitOuterClass(owner, name, desc);
- }
-
- public AnnotationVisitor visitAnnotation(
- final String desc,
- final boolean visible)
- {
- return cv.visitAnnotation(desc, visible);
- }
-
- public void visitAttribute(final Attribute attr) {
- cv.visitAttribute(attr);
- }
-
- public void visitInnerClass(
- final String name,
- final String outerName,
- final String innerName,
- final int access)
- {
- cv.visitInnerClass(name, outerName, innerName, access);
- }
-
- public FieldVisitor visitField(
- final int access,
- final String name,
- final String desc,
- final String signature,
- final Object value)
- {
- return cv.visitField(access, name, desc, signature, value);
- }
-
- public MethodVisitor visitMethod(
- final int access,
- final String name,
- final String desc,
- final String signature,
- final String[] exceptions)
- {
- return cv.visitMethod(access, name, desc, signature, exceptions);
- }
-
- public void visitEnd() {
- cv.visitEnd();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassReader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassReader.java
deleted file mode 100644
index ed98247d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassReader.java
+++ /dev/null
@@ -1,2039 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * A Java class parser to make a {@link ClassVisitor} visit an existing class.
- * This class parses a byte array conforming to the Java class file format and
- * calls the appropriate visit methods of a given class visitor for each field,
- * method and bytecode instruction encountered.
- *
- * @author Eric Bruneton
- * @author Eugene Kuleshov
- */
-public class ClassReader {
-
- /**
- * True to enable signatures support.
- */
- static final boolean SIGNATURES = true;
-
- /**
- * True to enable annotations support.
- */
- static final boolean ANNOTATIONS = true;
-
- /**
- * True to enable stack map frames support.
- */
- static final boolean FRAMES = true;
-
- /**
- * True to enable bytecode writing support.
- */
- static final boolean WRITER = true;
-
- /**
- * True to enable JSR_W and GOTO_W support.
- */
- static final boolean RESIZE = true;
-
- /**
- * Flag to skip method code. If this class is set <code>CODE</code>
- * attribute won't be visited. This can be used, for example, to retrieve
- * annotations for methods and method parameters.
- */
- public static final int SKIP_CODE = 1;
-
- /**
- * Flag to skip the debug information in the class. If this flag is set the
- * debug information of the class is not visited, i.e. the
- * {@link MethodVisitor#visitLocalVariable visitLocalVariable} and
- * {@link MethodVisitor#visitLineNumber visitLineNumber} methods will not be
- * called.
- */
- public static final int SKIP_DEBUG = 2;
-
- /**
- * Flag to skip the stack map frames in the class. If this flag is set the
- * stack map frames of the class is not visited, i.e. the
- * {@link MethodVisitor#visitFrame visitFrame} method will not be called.
- * This flag is useful when the {@link ClassWriter#COMPUTE_FRAMES} option is
- * used: it avoids visiting frames that will be ignored and recomputed from
- * scratch in the class writer.
- */
- public static final int SKIP_FRAMES = 4;
-
- /**
- * Flag to expand the stack map frames. By default stack map frames are
- * visited in their original format (i.e. "expanded" for classes whose
- * version is less than V1_6, and "compressed" for the other classes). If
- * this flag is set, stack map frames are always visited in expanded format
- * (this option adds a decompression/recompression step in ClassReader and
- * ClassWriter which degrades performances quite a lot).
- */
- public static final int EXPAND_FRAMES = 8;
-
- /**
- * The class to be parsed. <i>The content of this array must not be
- * modified. This field is intended for {@link Attribute} sub classes, and
- * is normally not needed by class generators or adapters.</i>
- */
- public final byte[] b;
-
- /**
- * The start index of each constant pool item in {@link #b b}, plus one.
- * The one byte offset skips the constant pool item tag that indicates its
- * type.
- */
- private final int[] items;
-
- /**
- * The String objects corresponding to the CONSTANT_Utf8 items. This cache
- * avoids multiple parsing of a given CONSTANT_Utf8 constant pool item,
- * which GREATLY improves performances (by a factor 2 to 3). This caching
- * strategy could be extended to all constant pool items, but its benefit
- * would not be so great for these items (because they are much less
- * expensive to parse than CONSTANT_Utf8 items).
- */
- private final String[] strings;
-
- /**
- * Maximum length of the strings contained in the constant pool of the
- * class.
- */
- private final int maxStringLength;
-
- /**
- * Start index of the class header information (access, name...) in
- * {@link #b b}.
- */
- public final int header;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructs a new {@link ClassReader} object.
- *
- * @param b the bytecode of the class to be read.
- */
- public ClassReader(final byte[] b) {
- this(b, 0, b.length);
- }
-
- /**
- * Constructs a new {@link ClassReader} object.
- *
- * @param b the bytecode of the class to be read.
- * @param off the start offset of the class data.
- * @param len the length of the class data.
- */
- public ClassReader(final byte[] b, final int off, final int len) {
- this.b = b;
- // parses the constant pool
- items = new int[readUnsignedShort(off + 8)];
- int n = items.length;
- strings = new String[n];
- int max = 0;
- int index = off + 10;
- for (int i = 1; i < n; ++i) {
- items[i] = index + 1;
- int size;
- switch (b[index]) {
- case ClassWriter.FIELD:
- case ClassWriter.METH:
- case ClassWriter.IMETH:
- case ClassWriter.INT:
- case ClassWriter.FLOAT:
- case ClassWriter.NAME_TYPE:
- size = 5;
- break;
- case ClassWriter.LONG:
- case ClassWriter.DOUBLE:
- size = 9;
- ++i;
- break;
- case ClassWriter.UTF8:
- size = 3 + readUnsignedShort(index + 1);
- if (size > max) {
- max = size;
- }
- break;
- // case ClassWriter.CLASS:
- // case ClassWriter.STR:
- default:
- size = 3;
- break;
- }
- index += size;
- }
- maxStringLength = max;
- // the class header information starts just after the constant pool
- header = index;
- }
-
- /**
- * Returns the class's access flags (see {@link Opcodes}). This value may
- * not reflect Deprecated and Synthetic flags when bytecode is before 1.5
- * and those flags are represented by attributes.
- *
- * @return the class access flags
- *
- * @see ClassVisitor#visit(int, int, String, String, String, String[])
- */
- public int getAccess() {
- return readUnsignedShort(header);
- }
-
- /**
- * Returns the internal name of the class (see
- * {@link Type#getInternalName() getInternalName}).
- *
- * @return the internal class name
- *
- * @see ClassVisitor#visit(int, int, String, String, String, String[])
- */
- public String getClassName() {
- return readClass(header + 2, new char[maxStringLength]);
- }
-
- /**
- * Returns the internal of name of the super class (see
- * {@link Type#getInternalName() getInternalName}). For interfaces, the
- * super class is {@link Object}.
- *
- * @return the internal name of super class, or <tt>null</tt> for
- * {@link Object} class.
- *
- * @see ClassVisitor#visit(int, int, String, String, String, String[])
- */
- public String getSuperName() {
- int n = items[readUnsignedShort(header + 4)];
- return n == 0 ? null : readUTF8(n, new char[maxStringLength]);
- }
-
- /**
- * Returns the internal names of the class's interfaces (see
- * {@link Type#getInternalName() getInternalName}).
- *
- * @return the array of internal names for all implemented interfaces or
- * <tt>null</tt>.
- *
- * @see ClassVisitor#visit(int, int, String, String, String, String[])
- */
- public String[] getInterfaces() {
- int index = header + 6;
- int n = readUnsignedShort(index);
- String[] interfaces = new String[n];
- if (n > 0) {
- char[] buf = new char[maxStringLength];
- for (int i = 0; i < n; ++i) {
- index += 2;
- interfaces[i] = readClass(index, buf);
- }
- }
- return interfaces;
- }
-
- /**
- * Copies the constant pool data into the given {@link ClassWriter}. Should
- * be called before the {@link #accept(ClassVisitor,int)} method.
- *
- * @param classWriter the {@link ClassWriter} to copy constant pool into.
- */
- void copyPool(final ClassWriter classWriter) {
- char[] buf = new char[maxStringLength];
- int ll = items.length;
- Item[] items2 = new Item[ll];
- for (int i = 1; i < ll; i++) {
- int index = items[i];
- int tag = b[index - 1];
- Item item = new Item(i);
- int nameType;
- switch (tag) {
- case ClassWriter.FIELD:
- case ClassWriter.METH:
- case ClassWriter.IMETH:
- nameType = items[readUnsignedShort(index + 2)];
- item.set(tag,
- readClass(index, buf),
- readUTF8(nameType, buf),
- readUTF8(nameType + 2, buf));
- break;
-
- case ClassWriter.INT:
- item.set(readInt(index));
- break;
-
- case ClassWriter.FLOAT:
- item.set(Float.intBitsToFloat(readInt(index)));
- break;
-
- case ClassWriter.NAME_TYPE:
- item.set(tag,
- readUTF8(index, buf),
- readUTF8(index + 2, buf),
- null);
- break;
-
- case ClassWriter.LONG:
- item.set(readLong(index));
- ++i;
- break;
-
- case ClassWriter.DOUBLE:
- item.set(Double.longBitsToDouble(readLong(index)));
- ++i;
- break;
-
- case ClassWriter.UTF8: {
- String s = strings[i];
- if (s == null) {
- index = items[i];
- s = strings[i] = readUTF(index + 2,
- readUnsignedShort(index),
- buf);
- }
- item.set(tag, s, null, null);
- }
- break;
-
- // case ClassWriter.STR:
- // case ClassWriter.CLASS:
- default:
- item.set(tag, readUTF8(index, buf), null, null);
- break;
- }
-
- int index2 = item.hashCode % items2.length;
- item.next = items2[index2];
- items2[index2] = item;
- }
-
- int off = items[1] - 1;
- classWriter.pool.putByteArray(b, off, header - off);
- classWriter.items = items2;
- classWriter.threshold = (int) (0.75d * ll);
- classWriter.index = ll;
- }
-
- /**
- * Constructs a new {@link ClassReader} object.
- *
- * @param is an input stream from which to read the class.
- * @throws IOException if a problem occurs during reading.
- */
- public ClassReader(final InputStream is) throws IOException {
- this(readClass(is));
- }
-
- /**
- * Constructs a new {@link ClassReader} object.
- *
- * @param name the fully qualified name of the class to be read.
- * @throws IOException if an exception occurs during reading.
- */
- public ClassReader(final String name) throws IOException {
- this(ClassLoader.getSystemResourceAsStream(name.replace('.', '/')
- + ".class"));
- }
-
- /**
- * Reads the bytecode of a class.
- *
- * @param is an input stream from which to read the class.
- * @return the bytecode read from the given input stream.
- * @throws IOException if a problem occurs during reading.
- */
- private static byte[] readClass(final InputStream is) throws IOException {
- if (is == null) {
- throw new IOException("Class not found");
- }
- byte[] b = new byte[is.available()];
- int len = 0;
- while (true) {
- int n = is.read(b, len, b.length - len);
- if (n == -1) {
- if (len < b.length) {
- byte[] c = new byte[len];
- System.arraycopy(b, 0, c, 0, len);
- b = c;
- }
- return b;
- }
- len += n;
- if (len == b.length) {
- byte[] c = new byte[b.length + 1000];
- System.arraycopy(b, 0, c, 0, len);
- b = c;
- }
- }
- }
-
- // ------------------------------------------------------------------------
- // Public methods
- // ------------------------------------------------------------------------
-
- /**
- * Makes the given visitor visit the Java class of this {@link ClassReader}.
- * This class is the one specified in the constructor (see
- * {@link #ClassReader(byte[]) ClassReader}).
- *
- * @param classVisitor the visitor that must visit this class.
- * @param flags option flags that can be used to modify the default behavior
- * of this class. See {@link #SKIP_DEBUG}, {@link #EXPAND_FRAMES},
- * {@link #SKIP_FRAMES}, {@link #SKIP_CODE}.
- */
- public void accept(final ClassVisitor classVisitor, final int flags) {
- accept(classVisitor, new Attribute[0], flags);
- }
-
- /**
- * Makes the given visitor visit the Java class of this {@link ClassReader}.
- * This class is the one specified in the constructor (see
- * {@link #ClassReader(byte[]) ClassReader}).
- *
- * @param classVisitor the visitor that must visit this class.
- * @param attrs prototypes of the attributes that must be parsed during the
- * visit of the class. Any attribute whose type is not equal to the
- * type of one the prototypes will not be parsed: its byte array
- * value will be passed unchanged to the ClassWriter. <i>This may
- * corrupt it if this value contains references to the constant pool,
- * or has syntactic or semantic links with a class element that has
- * been transformed by a class adapter between the reader and the
- * writer</i>.
- * @param flags option flags that can be used to modify the default behavior
- * of this class. See {@link #SKIP_DEBUG}, {@link #EXPAND_FRAMES},
- * {@link #SKIP_FRAMES}, {@link #SKIP_CODE}.
- */
- public void accept(
- final ClassVisitor classVisitor,
- final Attribute[] attrs,
- final int flags)
- {
- byte[] b = this.b; // the bytecode array
- char[] c = new char[maxStringLength]; // buffer used to read strings
- int i, j, k; // loop variables
- int u, v, w; // indexes in b
- Attribute attr;
-
- int access;
- String name;
- String desc;
- String attrName;
- String signature;
- int anns = 0;
- int ianns = 0;
- Attribute cattrs = null;
-
- // visits the header
- u = header;
- access = readUnsignedShort(u);
- name = readClass(u + 2, c);
- v = items[readUnsignedShort(u + 4)];
- String superClassName = v == 0 ? null : readUTF8(v, c);
- String[] implementedItfs = new String[readUnsignedShort(u + 6)];
- w = 0;
- u += 8;
- for (i = 0; i < implementedItfs.length; ++i) {
- implementedItfs[i] = readClass(u, c);
- u += 2;
- }
-
- boolean skipCode = (flags & SKIP_CODE) != 0;
- boolean skipDebug = (flags & SKIP_DEBUG) != 0;
- boolean unzip = (flags & EXPAND_FRAMES) != 0;
-
- // skips fields and methods
- v = u;
- i = readUnsignedShort(v);
- v += 2;
- for (; i > 0; --i) {
- j = readUnsignedShort(v + 6);
- v += 8;
- for (; j > 0; --j) {
- v += 6 + readInt(v + 2);
- }
- }
- i = readUnsignedShort(v);
- v += 2;
- for (; i > 0; --i) {
- j = readUnsignedShort(v + 6);
- v += 8;
- for (; j > 0; --j) {
- v += 6 + readInt(v + 2);
- }
- }
- // reads the class's attributes
- signature = null;
- String sourceFile = null;
- String sourceDebug = null;
- String enclosingOwner = null;
- String enclosingName = null;
- String enclosingDesc = null;
-
- i = readUnsignedShort(v);
- v += 2;
- for (; i > 0; --i) {
- attrName = readUTF8(v, c);
- // tests are sorted in decreasing frequency order
- // (based on frequencies observed on typical classes)
- if ("SourceFile".equals(attrName)) {
- sourceFile = readUTF8(v + 6, c);
- } else if ("InnerClasses".equals(attrName)) {
- w = v + 6;
- } else if ("EnclosingMethod".equals(attrName)) {
- enclosingOwner = readClass(v + 6, c);
- int item = readUnsignedShort(v + 8);
- if (item != 0) {
- enclosingName = readUTF8(items[item], c);
- enclosingDesc = readUTF8(items[item] + 2, c);
- }
- } else if (SIGNATURES && "Signature".equals(attrName)) {
- signature = readUTF8(v + 6, c);
- } else if (ANNOTATIONS && "RuntimeVisibleAnnotations".equals(attrName)) {
- anns = v + 6;
- } else if ("Deprecated".equals(attrName)) {
- access |= Opcodes.ACC_DEPRECATED;
- } else if ("Synthetic".equals(attrName)) {
- access |= Opcodes.ACC_SYNTHETIC;
- } else if ("SourceDebugExtension".equals(attrName)) {
- int len = readInt(v + 2);
- sourceDebug = readUTF(v + 6, len, new char[len]);
- } else if (ANNOTATIONS && "RuntimeInvisibleAnnotations".equals(attrName)) {
- ianns = v + 6;
- } else {
- attr = readAttribute(attrs,
- attrName,
- v + 6,
- readInt(v + 2),
- c,
- -1,
- null);
- if (attr != null) {
- attr.next = cattrs;
- cattrs = attr;
- }
- }
- v += 6 + readInt(v + 2);
- }
- // calls the visit method
- classVisitor.visit(readInt(4),
- access,
- name,
- signature,
- superClassName,
- implementedItfs);
-
- // calls the visitSource method
- if (!skipDebug && (sourceFile != null || sourceDebug != null)) {
- classVisitor.visitSource(sourceFile, sourceDebug);
- }
-
- // calls the visitOuterClass method
- if (enclosingOwner != null) {
- classVisitor.visitOuterClass(enclosingOwner,
- enclosingName,
- enclosingDesc);
- }
-
- // visits the class annotations
- if (ANNOTATIONS) {
- for (i = 1; i >= 0; --i) {
- v = i == 0 ? ianns : anns;
- if (v != 0) {
- j = readUnsignedShort(v);
- v += 2;
- for (; j > 0; --j) {
- v = readAnnotationValues(v + 2,
- c,
- true,
- classVisitor.visitAnnotation(readUTF8(v, c), i != 0));
- }
- }
- }
- }
-
- // visits the class attributes
- while (cattrs != null) {
- attr = cattrs.next;
- cattrs.next = null;
- classVisitor.visitAttribute(cattrs);
- cattrs = attr;
- }
-
- // calls the visitInnerClass method
- if (w != 0) {
- i = readUnsignedShort(w);
- w += 2;
- for (; i > 0; --i) {
- classVisitor.visitInnerClass(readUnsignedShort(w) == 0
- ? null
- : readClass(w, c), readUnsignedShort(w + 2) == 0
- ? null
- : readClass(w + 2, c), readUnsignedShort(w + 4) == 0
- ? null
- : readUTF8(w + 4, c), readUnsignedShort(w + 6));
- w += 8;
- }
- }
-
- // visits the fields
- i = readUnsignedShort(u);
- u += 2;
- for (; i > 0; --i) {
- access = readUnsignedShort(u);
- name = readUTF8(u + 2, c);
- desc = readUTF8(u + 4, c);
- // visits the field's attributes and looks for a ConstantValue
- // attribute
- int fieldValueItem = 0;
- signature = null;
- anns = 0;
- ianns = 0;
- cattrs = null;
-
- j = readUnsignedShort(u + 6);
- u += 8;
- for (; j > 0; --j) {
- attrName = readUTF8(u, c);
- // tests are sorted in decreasing frequency order
- // (based on frequencies observed on typical classes)
- if ("ConstantValue".equals(attrName)) {
- fieldValueItem = readUnsignedShort(u + 6);
- } else if (SIGNATURES && "Signature".equals(attrName)) {
- signature = readUTF8(u + 6, c);
- } else if ("Deprecated".equals(attrName)) {
- access |= Opcodes.ACC_DEPRECATED;
- } else if ("Synthetic".equals(attrName)) {
- access |= Opcodes.ACC_SYNTHETIC;
- } else if (ANNOTATIONS && "RuntimeVisibleAnnotations".equals(attrName)) {
- anns = u + 6;
- } else if (ANNOTATIONS && "RuntimeInvisibleAnnotations".equals(attrName)) {
- ianns = u + 6;
- } else {
- attr = readAttribute(attrs,
- attrName,
- u + 6,
- readInt(u + 2),
- c,
- -1,
- null);
- if (attr != null) {
- attr.next = cattrs;
- cattrs = attr;
- }
- }
- u += 6 + readInt(u + 2);
- }
- // visits the field
- FieldVisitor fv = classVisitor.visitField(access,
- name,
- desc,
- signature,
- fieldValueItem == 0 ? null : readConst(fieldValueItem, c));
- // visits the field annotations and attributes
- if (fv != null) {
- if (ANNOTATIONS) {
- for (j = 1; j >= 0; --j) {
- v = j == 0 ? ianns : anns;
- if (v != 0) {
- k = readUnsignedShort(v);
- v += 2;
- for (; k > 0; --k) {
- v = readAnnotationValues(v + 2,
- c,
- true,
- fv.visitAnnotation(readUTF8(v, c), j != 0));
- }
- }
- }
- }
- while (cattrs != null) {
- attr = cattrs.next;
- cattrs.next = null;
- fv.visitAttribute(cattrs);
- cattrs = attr;
- }
- fv.visitEnd();
- }
- }
-
- // visits the methods
- i = readUnsignedShort(u);
- u += 2;
- for (; i > 0; --i) {
- int u0 = u + 6;
- access = readUnsignedShort(u);
- name = readUTF8(u + 2, c);
- desc = readUTF8(u + 4, c);
- signature = null;
- anns = 0;
- ianns = 0;
- int dann = 0;
- int mpanns = 0;
- int impanns = 0;
- cattrs = null;
- v = 0;
- w = 0;
-
- // looks for Code and Exceptions attributes
- j = readUnsignedShort(u + 6);
- u += 8;
- for (; j > 0; --j) {
- attrName = readUTF8(u, c);
- int attrSize = readInt(u + 2);
- u += 6;
- // tests are sorted in decreasing frequency order
- // (based on frequencies observed on typical classes)
- if ("Code".equals(attrName)) {
- if (!skipCode) {
- v = u;
- }
- } else if ("Exceptions".equals(attrName)) {
- w = u;
- } else if (SIGNATURES && "Signature".equals(attrName)) {
- signature = readUTF8(u, c);
- } else if ("Deprecated".equals(attrName)) {
- access |= Opcodes.ACC_DEPRECATED;
- } else if (ANNOTATIONS && "RuntimeVisibleAnnotations".equals(attrName)) {
- anns = u;
- } else if (ANNOTATIONS && "AnnotationDefault".equals(attrName)) {
- dann = u;
- } else if ("Synthetic".equals(attrName)) {
- access |= Opcodes.ACC_SYNTHETIC;
- } else if (ANNOTATIONS && "RuntimeInvisibleAnnotations".equals(attrName)) {
- ianns = u;
- } else if (ANNOTATIONS && "RuntimeVisibleParameterAnnotations".equals(attrName))
- {
- mpanns = u;
- } else if (ANNOTATIONS && "RuntimeInvisibleParameterAnnotations".equals(attrName))
- {
- impanns = u;
- } else {
- attr = readAttribute(attrs,
- attrName,
- u,
- attrSize,
- c,
- -1,
- null);
- if (attr != null) {
- attr.next = cattrs;
- cattrs = attr;
- }
- }
- u += attrSize;
- }
- // reads declared exceptions
- String[] exceptions;
- if (w == 0) {
- exceptions = null;
- } else {
- exceptions = new String[readUnsignedShort(w)];
- w += 2;
- for (j = 0; j < exceptions.length; ++j) {
- exceptions[j] = readClass(w, c);
- w += 2;
- }
- }
-
- // visits the method's code, if any
- MethodVisitor mv = classVisitor.visitMethod(access,
- name,
- desc,
- signature,
- exceptions);
-
- if (mv != null) {
- /*
- * if the returned MethodVisitor is in fact a MethodWriter, it
- * means there is no method adapter between the reader and the
- * writer. If, in addition, the writer's constant pool was
- * copied from this reader (mw.cw.cr == this), and the signature
- * and exceptions of the method have not been changed, then it
- * is possible to skip all visit events and just copy the
- * original code of the method to the writer (the access, name
- * and descriptor can have been changed, this is not important
- * since they are not copied as is from the reader).
- */
- if (WRITER && mv instanceof MethodWriter) {
- MethodWriter mw = (MethodWriter) mv;
- if (mw.cw.cr == this) {
- if (signature == mw.signature) {
- boolean sameExceptions = false;
- if (exceptions == null) {
- sameExceptions = mw.exceptionCount == 0;
- } else {
- if (exceptions.length == mw.exceptionCount) {
- sameExceptions = true;
- for (j = exceptions.length - 1; j >= 0; --j)
- {
- w -= 2;
- if (mw.exceptions[j] != readUnsignedShort(w))
- {
- sameExceptions = false;
- break;
- }
- }
- }
- }
- if (sameExceptions) {
- /*
- * we do not copy directly the code into
- * MethodWriter to save a byte array copy
- * operation. The real copy will be done in
- * ClassWriter.toByteArray().
- */
- mw.classReaderOffset = u0;
- mw.classReaderLength = u - u0;
- continue;
- }
- }
- }
- }
-
- if (ANNOTATIONS && dann != 0) {
- AnnotationVisitor dv = mv.visitAnnotationDefault();
- readAnnotationValue(dann, c, null, dv);
- if (dv != null) {
- dv.visitEnd();
- }
- }
- if (ANNOTATIONS) {
- for (j = 1; j >= 0; --j) {
- w = j == 0 ? ianns : anns;
- if (w != 0) {
- k = readUnsignedShort(w);
- w += 2;
- for (; k > 0; --k) {
- w = readAnnotationValues(w + 2,
- c,
- true,
- mv.visitAnnotation(readUTF8(w, c), j != 0));
- }
- }
- }
- }
- if (ANNOTATIONS && mpanns != 0) {
- readParameterAnnotations(mpanns, desc, c, true, mv);
- }
- if (ANNOTATIONS && impanns != 0) {
- readParameterAnnotations(impanns, desc, c, false, mv);
- }
- while (cattrs != null) {
- attr = cattrs.next;
- cattrs.next = null;
- mv.visitAttribute(cattrs);
- cattrs = attr;
- }
- }
-
- if (mv != null && v != 0) {
- int maxStack = readUnsignedShort(v);
- int maxLocals = readUnsignedShort(v + 2);
- int codeLength = readInt(v + 4);
- v += 8;
-
- int codeStart = v;
- int codeEnd = v + codeLength;
-
- mv.visitCode();
-
- // 1st phase: finds the labels
- int label;
- Label[] labels = new Label[codeLength + 2];
- readLabel(codeLength + 1, labels);
- while (v < codeEnd) {
- w = v - codeStart;
- int opcode = b[v] & 0xFF;
- switch (ClassWriter.TYPE[opcode]) {
- case ClassWriter.NOARG_INSN:
- case ClassWriter.IMPLVAR_INSN:
- v += 1;
- break;
- case ClassWriter.LABEL_INSN:
- readLabel(w + readShort(v + 1), labels);
- v += 3;
- break;
- case ClassWriter.LABELW_INSN:
- readLabel(w + readInt(v + 1), labels);
- v += 5;
- break;
- case ClassWriter.WIDE_INSN:
- opcode = b[v + 1] & 0xFF;
- if (opcode == Opcodes.IINC) {
- v += 6;
- } else {
- v += 4;
- }
- break;
- case ClassWriter.TABL_INSN:
- // skips 0 to 3 padding bytes*
- v = v + 4 - (w & 3);
- // reads instruction
- readLabel(w + readInt(v), labels);
- j = readInt(v + 8) - readInt(v + 4) + 1;
- v += 12;
- for (; j > 0; --j) {
- readLabel(w + readInt(v), labels);
- v += 4;
- }
- break;
- case ClassWriter.LOOK_INSN:
- // skips 0 to 3 padding bytes*
- v = v + 4 - (w & 3);
- // reads instruction
- readLabel(w + readInt(v), labels);
- j = readInt(v + 4);
- v += 8;
- for (; j > 0; --j) {
- readLabel(w + readInt(v + 4), labels);
- v += 8;
- }
- break;
- case ClassWriter.VAR_INSN:
- case ClassWriter.SBYTE_INSN:
- case ClassWriter.LDC_INSN:
- v += 2;
- break;
- case ClassWriter.SHORT_INSN:
- case ClassWriter.LDCW_INSN:
- case ClassWriter.FIELDORMETH_INSN:
- case ClassWriter.TYPE_INSN:
- case ClassWriter.IINC_INSN:
- v += 3;
- break;
- case ClassWriter.ITFMETH_INSN:
- v += 5;
- break;
- // case MANA_INSN:
- default:
- v += 4;
- break;
- }
- }
- // parses the try catch entries
- j = readUnsignedShort(v);
- v += 2;
- for (; j > 0; --j) {
- Label start = readLabel(readUnsignedShort(v), labels);
- Label end = readLabel(readUnsignedShort(v + 2), labels);
- Label handler = readLabel(readUnsignedShort(v + 4), labels);
- int type = readUnsignedShort(v + 6);
- if (type == 0) {
- mv.visitTryCatchBlock(start, end, handler, null);
- } else {
- mv.visitTryCatchBlock(start,
- end,
- handler,
- readUTF8(items[type], c));
- }
- v += 8;
- }
- // parses the local variable, line number tables, and code
- // attributes
- int varTable = 0;
- int varTypeTable = 0;
- int stackMap = 0;
- int frameCount = 0;
- int frameMode = 0;
- int frameOffset = 0;
- int frameLocalCount = 0;
- int frameLocalDiff = 0;
- int frameStackCount = 0;
- Object[] frameLocal = null;
- Object[] frameStack = null;
- boolean zip = true;
- cattrs = null;
- j = readUnsignedShort(v);
- v += 2;
- for (; j > 0; --j) {
- attrName = readUTF8(v, c);
- if ("LocalVariableTable".equals(attrName)) {
- if (!skipDebug) {
- varTable = v + 6;
- k = readUnsignedShort(v + 6);
- w = v + 8;
- for (; k > 0; --k) {
- label = readUnsignedShort(w);
- if (labels[label] == null) {
- readLabel(label, labels).status |= Label.DEBUG;
- }
- label += readUnsignedShort(w + 2);
- if (labels[label] == null) {
- readLabel(label, labels).status |= Label.DEBUG;
- }
- w += 10;
- }
- }
- } else if ("LocalVariableTypeTable".equals(attrName)) {
- varTypeTable = v + 6;
- } else if ("LineNumberTable".equals(attrName)) {
- if (!skipDebug) {
- k = readUnsignedShort(v + 6);
- w = v + 8;
- for (; k > 0; --k) {
- label = readUnsignedShort(w);
- if (labels[label] == null) {
- readLabel(label, labels).status |= Label.DEBUG;
- }
- labels[label].line = readUnsignedShort(w + 2);
- w += 4;
- }
- }
- } else if (FRAMES && "StackMapTable".equals(attrName)) {
- if ((flags & SKIP_FRAMES) == 0) {
- stackMap = v + 8;
- frameCount = readUnsignedShort(v + 6);
- }
- /*
- * here we do not extract the labels corresponding to
- * the attribute content. This would require a full
- * parsing of the attribute, which would need to be
- * repeated in the second phase (see below). Instead the
- * content of the attribute is read one frame at a time
- * (i.e. after a frame has been visited, the next frame
- * is read), and the labels it contains are also
- * extracted one frame at a time. Thanks to the ordering
- * of frames, having only a "one frame lookahead" is not
- * a problem, i.e. it is not possible to see an offset
- * smaller than the offset of the current insn and for
- * which no Label exist.
- */
- // TODO true for frame offsets,
- // but for UNINITIALIZED type offsets?
- } else if (FRAMES && "StackMap".equals(attrName)) {
- if ((flags & SKIP_FRAMES) == 0) {
- stackMap = v + 8;
- frameCount = readUnsignedShort(v + 6);
- zip = false;
- }
- /*
- * IMPORTANT! here we assume that the frames are
- * ordered, as in the StackMapTable attribute, although
- * this is not guaranteed by the attribute format.
- */
- } else {
- for (k = 0; k < attrs.length; ++k) {
- if (attrs[k].type.equals(attrName)) {
- attr = attrs[k].read(this,
- v + 6,
- readInt(v + 2),
- c,
- codeStart - 8,
- labels);
- if (attr != null) {
- attr.next = cattrs;
- cattrs = attr;
- }
- }
- }
- }
- v += 6 + readInt(v + 2);
- }
-
- // 2nd phase: visits each instruction
- if (FRAMES && stackMap != 0) {
- // creates the very first (implicit) frame from the method
- // descriptor
- frameLocal = new Object[maxLocals];
- frameStack = new Object[maxStack];
- if (unzip) {
- int local = 0;
- if ((access & Opcodes.ACC_STATIC) == 0) {
- if ("<init>".equals(name)) {
- frameLocal[local++] = Opcodes.UNINITIALIZED_THIS;
- } else {
- frameLocal[local++] = readClass(header + 2, c);
- }
- }
- j = 1;
- loop: while (true) {
- k = j;
- switch (desc.charAt(j++)) {
- case 'Z':
- case 'C':
- case 'B':
- case 'S':
- case 'I':
- frameLocal[local++] = Opcodes.INTEGER;
- break;
- case 'F':
- frameLocal[local++] = Opcodes.FLOAT;
- break;
- case 'J':
- frameLocal[local++] = Opcodes.LONG;
- break;
- case 'D':
- frameLocal[local++] = Opcodes.DOUBLE;
- break;
- case '[':
- while (desc.charAt(j) == '[') {
- ++j;
- }
- if (desc.charAt(j) == 'L') {
- ++j;
- while (desc.charAt(j) != ';') {
- ++j;
- }
- }
- frameLocal[local++] = desc.substring(k, ++j);
- break;
- case 'L':
- while (desc.charAt(j) != ';') {
- ++j;
- }
- frameLocal[local++] = desc.substring(k + 1,
- j++);
- break;
- default:
- break loop;
- }
- }
- frameLocalCount = local;
- }
- /*
- * for the first explicit frame the offset is not
- * offset_delta + 1 but only offset_delta; setting the
- * implicit frame offset to -1 allow the use of the
- * "offset_delta + 1" rule in all cases
- */
- frameOffset = -1;
- }
- v = codeStart;
- Label l;
- while (v < codeEnd) {
- w = v - codeStart;
-
- l = labels[w];
- if (l != null) {
- mv.visitLabel(l);
- if (!skipDebug && l.line > 0) {
- mv.visitLineNumber(l.line, l);
- }
- }
-
- while (FRAMES && frameLocal != null
- && (frameOffset == w || frameOffset == -1))
- {
- // if there is a frame for this offset,
- // makes the visitor visit it,
- // and reads the next frame if there is one.
- if (!zip || unzip) {
- mv.visitFrame(Opcodes.F_NEW,
- frameLocalCount,
- frameLocal,
- frameStackCount,
- frameStack);
- } else if (frameOffset != -1) {
- mv.visitFrame(frameMode,
- frameLocalDiff,
- frameLocal,
- frameStackCount,
- frameStack);
- }
-
- if (frameCount > 0) {
- int tag, delta, n;
- if (zip) {
- tag = b[stackMap++] & 0xFF;
- } else {
- tag = MethodWriter.FULL_FRAME;
- frameOffset = -1;
- }
- frameLocalDiff = 0;
- if (tag < MethodWriter.SAME_LOCALS_1_STACK_ITEM_FRAME)
- {
- delta = tag;
- frameMode = Opcodes.F_SAME;
- frameStackCount = 0;
- } else if (tag < MethodWriter.RESERVED) {
- delta = tag
- - MethodWriter.SAME_LOCALS_1_STACK_ITEM_FRAME;
- stackMap = readFrameType(frameStack,
- 0,
- stackMap,
- c,
- labels);
- frameMode = Opcodes.F_SAME1;
- frameStackCount = 1;
- } else {
- delta = readUnsignedShort(stackMap);
- stackMap += 2;
- if (tag == MethodWriter.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED)
- {
- stackMap = readFrameType(frameStack,
- 0,
- stackMap,
- c,
- labels);
- frameMode = Opcodes.F_SAME1;
- frameStackCount = 1;
- } else if (tag >= MethodWriter.CHOP_FRAME
- && tag < MethodWriter.SAME_FRAME_EXTENDED)
- {
- frameMode = Opcodes.F_CHOP;
- frameLocalDiff = MethodWriter.SAME_FRAME_EXTENDED
- - tag;
- frameLocalCount -= frameLocalDiff;
- frameStackCount = 0;
- } else if (tag == MethodWriter.SAME_FRAME_EXTENDED)
- {
- frameMode = Opcodes.F_SAME;
- frameStackCount = 0;
- } else if (tag < MethodWriter.FULL_FRAME) {
- j = unzip ? frameLocalCount : 0;
- for (k = tag
- - MethodWriter.SAME_FRAME_EXTENDED; k > 0; k--)
- {
- stackMap = readFrameType(frameLocal,
- j++,
- stackMap,
- c,
- labels);
- }
- frameMode = Opcodes.F_APPEND;
- frameLocalDiff = tag
- - MethodWriter.SAME_FRAME_EXTENDED;
- frameLocalCount += frameLocalDiff;
- frameStackCount = 0;
- } else { // if (tag == FULL_FRAME) {
- frameMode = Opcodes.F_FULL;
- n = frameLocalDiff = frameLocalCount = readUnsignedShort(stackMap);
- stackMap += 2;
- for (j = 0; n > 0; n--) {
- stackMap = readFrameType(frameLocal,
- j++,
- stackMap,
- c,
- labels);
- }
- n = frameStackCount = readUnsignedShort(stackMap);
- stackMap += 2;
- for (j = 0; n > 0; n--) {
- stackMap = readFrameType(frameStack,
- j++,
- stackMap,
- c,
- labels);
- }
- }
- }
- frameOffset += delta + 1;
- readLabel(frameOffset, labels);
-
- --frameCount;
- } else {
- frameLocal = null;
- }
- }
-
- int opcode = b[v] & 0xFF;
- switch (ClassWriter.TYPE[opcode]) {
- case ClassWriter.NOARG_INSN:
- mv.visitInsn(opcode);
- v += 1;
- break;
- case ClassWriter.IMPLVAR_INSN:
- if (opcode > Opcodes.ISTORE) {
- opcode -= 59; // ISTORE_0
- mv.visitVarInsn(Opcodes.ISTORE + (opcode >> 2),
- opcode & 0x3);
- } else {
- opcode -= 26; // ILOAD_0
- mv.visitVarInsn(Opcodes.ILOAD + (opcode >> 2),
- opcode & 0x3);
- }
- v += 1;
- break;
- case ClassWriter.LABEL_INSN:
- mv.visitJumpInsn(opcode, labels[w
- + readShort(v + 1)]);
- v += 3;
- break;
- case ClassWriter.LABELW_INSN:
- mv.visitJumpInsn(opcode - 33, labels[w
- + readInt(v + 1)]);
- v += 5;
- break;
- case ClassWriter.WIDE_INSN:
- opcode = b[v + 1] & 0xFF;
- if (opcode == Opcodes.IINC) {
- mv.visitIincInsn(readUnsignedShort(v + 2),
- readShort(v + 4));
- v += 6;
- } else {
- mv.visitVarInsn(opcode,
- readUnsignedShort(v + 2));
- v += 4;
- }
- break;
- case ClassWriter.TABL_INSN:
- // skips 0 to 3 padding bytes
- v = v + 4 - (w & 3);
- // reads instruction
- label = w + readInt(v);
- int min = readInt(v + 4);
- int max = readInt(v + 8);
- v += 12;
- Label[] table = new Label[max - min + 1];
- for (j = 0; j < table.length; ++j) {
- table[j] = labels[w + readInt(v)];
- v += 4;
- }
- mv.visitTableSwitchInsn(min,
- max,
- labels[label],
- table);
- break;
- case ClassWriter.LOOK_INSN:
- // skips 0 to 3 padding bytes
- v = v + 4 - (w & 3);
- // reads instruction
- label = w + readInt(v);
- j = readInt(v + 4);
- v += 8;
- int[] keys = new int[j];
- Label[] values = new Label[j];
- for (j = 0; j < keys.length; ++j) {
- keys[j] = readInt(v);
- values[j] = labels[w + readInt(v + 4)];
- v += 8;
- }
- mv.visitLookupSwitchInsn(labels[label],
- keys,
- values);
- break;
- case ClassWriter.VAR_INSN:
- mv.visitVarInsn(opcode, b[v + 1] & 0xFF);
- v += 2;
- break;
- case ClassWriter.SBYTE_INSN:
- mv.visitIntInsn(opcode, b[v + 1]);
- v += 2;
- break;
- case ClassWriter.SHORT_INSN:
- mv.visitIntInsn(opcode, readShort(v + 1));
- v += 3;
- break;
- case ClassWriter.LDC_INSN:
- mv.visitLdcInsn(readConst(b[v + 1] & 0xFF, c));
- v += 2;
- break;
- case ClassWriter.LDCW_INSN:
- mv.visitLdcInsn(readConst(readUnsignedShort(v + 1),
- c));
- v += 3;
- break;
- case ClassWriter.FIELDORMETH_INSN:
- case ClassWriter.ITFMETH_INSN:
- int cpIndex = items[readUnsignedShort(v + 1)];
- String iowner = readClass(cpIndex, c);
- cpIndex = items[readUnsignedShort(cpIndex + 2)];
- String iname = readUTF8(cpIndex, c);
- String idesc = readUTF8(cpIndex + 2, c);
- if (opcode < Opcodes.INVOKEVIRTUAL) {
- mv.visitFieldInsn(opcode, iowner, iname, idesc);
- } else {
- mv.visitMethodInsn(opcode, iowner, iname, idesc);
- }
- if (opcode == Opcodes.INVOKEINTERFACE) {
- v += 5;
- } else {
- v += 3;
- }
- break;
- case ClassWriter.TYPE_INSN:
- mv.visitTypeInsn(opcode, readClass(v + 1, c));
- v += 3;
- break;
- case ClassWriter.IINC_INSN:
- mv.visitIincInsn(b[v + 1] & 0xFF, b[v + 2]);
- v += 3;
- break;
- // case MANA_INSN:
- default:
- mv.visitMultiANewArrayInsn(readClass(v + 1, c),
- b[v + 3] & 0xFF);
- v += 4;
- break;
- }
- }
- l = labels[codeEnd - codeStart];
- if (l != null) {
- mv.visitLabel(l);
- }
- // visits the local variable tables
- if (!skipDebug && varTable != 0) {
- int[] typeTable = null;
- if (varTypeTable != 0) {
- k = readUnsignedShort(varTypeTable) * 3;
- w = varTypeTable + 2;
- typeTable = new int[k];
- while (k > 0) {
- typeTable[--k] = w + 6; // signature
- typeTable[--k] = readUnsignedShort(w + 8); // index
- typeTable[--k] = readUnsignedShort(w); // start
- w += 10;
- }
- }
- k = readUnsignedShort(varTable);
- w = varTable + 2;
- for (; k > 0; --k) {
- int start = readUnsignedShort(w);
- int length = readUnsignedShort(w + 2);
- int index = readUnsignedShort(w + 8);
- String vsignature = null;
- if (typeTable != null) {
- for (int a = 0; a < typeTable.length; a += 3) {
- if (typeTable[a] == start
- && typeTable[a + 1] == index)
- {
- vsignature = readUTF8(typeTable[a + 2], c);
- break;
- }
- }
- }
- mv.visitLocalVariable(readUTF8(w + 4, c),
- readUTF8(w + 6, c),
- vsignature,
- labels[start],
- labels[start + length],
- index);
- w += 10;
- }
- }
- // visits the other attributes
- while (cattrs != null) {
- attr = cattrs.next;
- cattrs.next = null;
- mv.visitAttribute(cattrs);
- cattrs = attr;
- }
- // visits the max stack and max locals values
- mv.visitMaxs(maxStack, maxLocals);
- }
-
- if (mv != null) {
- mv.visitEnd();
- }
- }
-
- // visits the end of the class
- classVisitor.visitEnd();
- }
-
- /**
- * Reads parameter annotations and makes the given visitor visit them.
- *
- * @param v start offset in {@link #b b} of the annotations to be read.
- * @param desc the method descriptor.
- * @param buf buffer to be used to call {@link #readUTF8 readUTF8},
- * {@link #readClass(int,char[]) readClass} or
- * {@link #readConst readConst}.
- * @param visible <tt>true</tt> if the annotations to be read are visible
- * at runtime.
- * @param mv the visitor that must visit the annotations.
- */
- private void readParameterAnnotations(
- int v,
- final String desc,
- final char[] buf,
- final boolean visible,
- final MethodVisitor mv)
- {
- int i;
- int n = b[v++] & 0xFF;
- // workaround for a bug in javac (javac compiler generates a parameter
- // annotation array whose size is equal to the number of parameters in
- // the Java source file, while it should generate an array whose size is
- // equal to the number of parameters in the method descriptor - which
- // includes the synthetic parameters added by the compiler). This work-
- // around supposes that the synthetic parameters are the first ones.
- int synthetics = Type.getArgumentTypes(desc).length - n;
- AnnotationVisitor av;
- for (i = 0; i < synthetics; ++i) {
- // virtual annotation to detect synthetic parameters in MethodWriter
- av = mv.visitParameterAnnotation(i, "Ljava/lang/Synthetic;", false);
- if (av != null) {
- av.visitEnd();
- }
- }
- for (; i < n + synthetics; ++i) {
- int j = readUnsignedShort(v);
- v += 2;
- for (; j > 0; --j) {
- av = mv.visitParameterAnnotation(i, readUTF8(v, buf), visible);
- v = readAnnotationValues(v + 2, buf, true, av);
- }
- }
- }
-
- /**
- * Reads the values of an annotation and makes the given visitor visit them.
- *
- * @param v the start offset in {@link #b b} of the values to be read
- * (including the unsigned short that gives the number of values).
- * @param buf buffer to be used to call {@link #readUTF8 readUTF8},
- * {@link #readClass(int,char[]) readClass} or
- * {@link #readConst readConst}.
- * @param named if the annotation values are named or not.
- * @param av the visitor that must visit the values.
- * @return the end offset of the annotation values.
- */
- private int readAnnotationValues(
- int v,
- final char[] buf,
- final boolean named,
- final AnnotationVisitor av)
- {
- int i = readUnsignedShort(v);
- v += 2;
- if (named) {
- for (; i > 0; --i) {
- v = readAnnotationValue(v + 2, buf, readUTF8(v, buf), av);
- }
- } else {
- for (; i > 0; --i) {
- v = readAnnotationValue(v, buf, null, av);
- }
- }
- if (av != null) {
- av.visitEnd();
- }
- return v;
- }
-
- /**
- * Reads a value of an annotation and makes the given visitor visit it.
- *
- * @param v the start offset in {@link #b b} of the value to be read (<i>not
- * including the value name constant pool index</i>).
- * @param buf buffer to be used to call {@link #readUTF8 readUTF8},
- * {@link #readClass(int,char[]) readClass} or
- * {@link #readConst readConst}.
- * @param name the name of the value to be read.
- * @param av the visitor that must visit the value.
- * @return the end offset of the annotation value.
- */
- private int readAnnotationValue(
- int v,
- final char[] buf,
- final String name,
- final AnnotationVisitor av)
- {
- int i;
- if (av == null) {
- switch (b[v] & 0xFF) {
- case 'e': // enum_const_value
- return v + 5;
- case '@': // annotation_value
- return readAnnotationValues(v + 3, buf, true, null);
- case '[': // array_value
- return readAnnotationValues(v + 1, buf, false, null);
- default:
- return v + 3;
- }
- }
- switch (b[v++] & 0xFF) {
- case 'I': // pointer to CONSTANT_Integer
- case 'J': // pointer to CONSTANT_Long
- case 'F': // pointer to CONSTANT_Float
- case 'D': // pointer to CONSTANT_Double
- av.visit(name, readConst(readUnsignedShort(v), buf));
- v += 2;
- break;
- case 'B': // pointer to CONSTANT_Byte
- av.visit(name,
- new Byte((byte) readInt(items[readUnsignedShort(v)])));
- v += 2;
- break;
- case 'Z': // pointer to CONSTANT_Boolean
- av.visit(name, readInt(items[readUnsignedShort(v)]) == 0
- ? Boolean.FALSE
- : Boolean.TRUE);
- v += 2;
- break;
- case 'S': // pointer to CONSTANT_Short
- av.visit(name,
- new Short((short) readInt(items[readUnsignedShort(v)])));
- v += 2;
- break;
- case 'C': // pointer to CONSTANT_Char
- av.visit(name,
- new Character((char) readInt(items[readUnsignedShort(v)])));
- v += 2;
- break;
- case 's': // pointer to CONSTANT_Utf8
- av.visit(name, readUTF8(v, buf));
- v += 2;
- break;
- case 'e': // enum_const_value
- av.visitEnum(name, readUTF8(v, buf), readUTF8(v + 2, buf));
- v += 4;
- break;
- case 'c': // class_info
- av.visit(name, Type.getType(readUTF8(v, buf)));
- v += 2;
- break;
- case '@': // annotation_value
- v = readAnnotationValues(v + 2,
- buf,
- true,
- av.visitAnnotation(name, readUTF8(v, buf)));
- break;
- case '[': // array_value
- int size = readUnsignedShort(v);
- v += 2;
- if (size == 0) {
- return readAnnotationValues(v - 2,
- buf,
- false,
- av.visitArray(name));
- }
- switch (this.b[v++] & 0xFF) {
- case 'B':
- byte[] bv = new byte[size];
- for (i = 0; i < size; i++) {
- bv[i] = (byte) readInt(items[readUnsignedShort(v)]);
- v += 3;
- }
- av.visit(name, bv);
- --v;
- break;
- case 'Z':
- boolean[] zv = new boolean[size];
- for (i = 0; i < size; i++) {
- zv[i] = readInt(items[readUnsignedShort(v)]) != 0;
- v += 3;
- }
- av.visit(name, zv);
- --v;
- break;
- case 'S':
- short[] sv = new short[size];
- for (i = 0; i < size; i++) {
- sv[i] = (short) readInt(items[readUnsignedShort(v)]);
- v += 3;
- }
- av.visit(name, sv);
- --v;
- break;
- case 'C':
- char[] cv = new char[size];
- for (i = 0; i < size; i++) {
- cv[i] = (char) readInt(items[readUnsignedShort(v)]);
- v += 3;
- }
- av.visit(name, cv);
- --v;
- break;
- case 'I':
- int[] iv = new int[size];
- for (i = 0; i < size; i++) {
- iv[i] = readInt(items[readUnsignedShort(v)]);
- v += 3;
- }
- av.visit(name, iv);
- --v;
- break;
- case 'J':
- long[] lv = new long[size];
- for (i = 0; i < size; i++) {
- lv[i] = readLong(items[readUnsignedShort(v)]);
- v += 3;
- }
- av.visit(name, lv);
- --v;
- break;
- case 'F':
- float[] fv = new float[size];
- for (i = 0; i < size; i++) {
- fv[i] = Float.intBitsToFloat(readInt(items[readUnsignedShort(v)]));
- v += 3;
- }
- av.visit(name, fv);
- --v;
- break;
- case 'D':
- double[] dv = new double[size];
- for (i = 0; i < size; i++) {
- dv[i] = Double.longBitsToDouble(readLong(items[readUnsignedShort(v)]));
- v += 3;
- }
- av.visit(name, dv);
- --v;
- break;
- default:
- v = readAnnotationValues(v - 3,
- buf,
- false,
- av.visitArray(name));
- }
- }
- return v;
- }
-
- private int readFrameType(
- final Object[] frame,
- final int index,
- int v,
- final char[] buf,
- final Label[] labels)
- {
- int type = b[v++] & 0xFF;
- switch (type) {
- case 0:
- frame[index] = Opcodes.TOP;
- break;
- case 1:
- frame[index] = Opcodes.INTEGER;
- break;
- case 2:
- frame[index] = Opcodes.FLOAT;
- break;
- case 3:
- frame[index] = Opcodes.DOUBLE;
- break;
- case 4:
- frame[index] = Opcodes.LONG;
- break;
- case 5:
- frame[index] = Opcodes.NULL;
- break;
- case 6:
- frame[index] = Opcodes.UNINITIALIZED_THIS;
- break;
- case 7: // Object
- frame[index] = readClass(v, buf);
- v += 2;
- break;
- default: // Uninitialized
- frame[index] = readLabel(readUnsignedShort(v), labels);
- v += 2;
- }
- return v;
- }
-
- /**
- * Returns the label corresponding to the given offset. The default
- * implementation of this method creates a label for the given offset if it
- * has not been already created.
- *
- * @param offset a bytecode offset in a method.
- * @param labels the already created labels, indexed by their offset. If a
- * label already exists for offset this method must not create a new
- * one. Otherwise it must store the new label in this array.
- * @return a non null Label, which must be equal to labels[offset].
- */
- protected Label readLabel(int offset, Label[] labels) {
- if (labels[offset] == null) {
- labels[offset] = new Label();
- }
- return labels[offset];
- }
-
- /**
- * Reads an attribute in {@link #b b}.
- *
- * @param attrs prototypes of the attributes that must be parsed during the
- * visit of the class. Any attribute whose type is not equal to the
- * type of one the prototypes is ignored (i.e. an empty
- * {@link Attribute} instance is returned).
- * @param type the type of the attribute.
- * @param off index of the first byte of the attribute's content in
- * {@link #b b}. The 6 attribute header bytes, containing the type
- * and the length of the attribute, are not taken into account here
- * (they have already been read).
- * @param len the length of the attribute's content.
- * @param buf buffer to be used to call {@link #readUTF8 readUTF8},
- * {@link #readClass(int,char[]) readClass} or
- * {@link #readConst readConst}.
- * @param codeOff index of the first byte of code's attribute content in
- * {@link #b b}, or -1 if the attribute to be read is not a code
- * attribute. The 6 attribute header bytes, containing the type and
- * the length of the attribute, are not taken into account here.
- * @param labels the labels of the method's code, or <tt>null</tt> if the
- * attribute to be read is not a code attribute.
- * @return the attribute that has been read, or <tt>null</tt> to skip this
- * attribute.
- */
- private Attribute readAttribute(
- final Attribute[] attrs,
- final String type,
- final int off,
- final int len,
- final char[] buf,
- final int codeOff,
- final Label[] labels)
- {
- for (int i = 0; i < attrs.length; ++i) {
- if (attrs[i].type.equals(type)) {
- return attrs[i].read(this, off, len, buf, codeOff, labels);
- }
- }
- return new Attribute(type).read(this, off, len, null, -1, null);
- }
-
- // ------------------------------------------------------------------------
- // Utility methods: low level parsing
- // ------------------------------------------------------------------------
-
- /**
- * Returns the start index of the constant pool item in {@link #b b}, plus
- * one. <i>This method is intended for {@link Attribute} sub classes, and is
- * normally not needed by class generators or adapters.</i>
- *
- * @param item the index a constant pool item.
- * @return the start index of the constant pool item in {@link #b b}, plus
- * one.
- */
- public int getItem(final int item) {
- return items[item];
- }
-
- /**
- * Reads a byte value in {@link #b b}. <i>This method is intended for
- * {@link Attribute} sub classes, and is normally not needed by class
- * generators or adapters.</i>
- *
- * @param index the start index of the value to be read in {@link #b b}.
- * @return the read value.
- */
- public int readByte(final int index) {
- return b[index] & 0xFF;
- }
-
- /**
- * Reads an unsigned short value in {@link #b b}. <i>This method is
- * intended for {@link Attribute} sub classes, and is normally not needed by
- * class generators or adapters.</i>
- *
- * @param index the start index of the value to be read in {@link #b b}.
- * @return the read value.
- */
- public int readUnsignedShort(final int index) {
- byte[] b = this.b;
- return ((b[index] & 0xFF) << 8) | (b[index + 1] & 0xFF);
- }
-
- /**
- * Reads a signed short value in {@link #b b}. <i>This method is intended
- * for {@link Attribute} sub classes, and is normally not needed by class
- * generators or adapters.</i>
- *
- * @param index the start index of the value to be read in {@link #b b}.
- * @return the read value.
- */
- public short readShort(final int index) {
- byte[] b = this.b;
- return (short) (((b[index] & 0xFF) << 8) | (b[index + 1] & 0xFF));
- }
-
- /**
- * Reads a signed int value in {@link #b b}. <i>This method is intended for
- * {@link Attribute} sub classes, and is normally not needed by class
- * generators or adapters.</i>
- *
- * @param index the start index of the value to be read in {@link #b b}.
- * @return the read value.
- */
- public int readInt(final int index) {
- byte[] b = this.b;
- return ((b[index] & 0xFF) << 24) | ((b[index + 1] & 0xFF) << 16)
- | ((b[index + 2] & 0xFF) << 8) | (b[index + 3] & 0xFF);
- }
-
- /**
- * Reads a signed long value in {@link #b b}. <i>This method is intended
- * for {@link Attribute} sub classes, and is normally not needed by class
- * generators or adapters.</i>
- *
- * @param index the start index of the value to be read in {@link #b b}.
- * @return the read value.
- */
- public long readLong(final int index) {
- long l1 = readInt(index);
- long l0 = readInt(index + 4) & 0xFFFFFFFFL;
- return (l1 << 32) | l0;
- }
-
- /**
- * Reads an UTF8 string constant pool item in {@link #b b}. <i>This method
- * is intended for {@link Attribute} sub classes, and is normally not needed
- * by class generators or adapters.</i>
- *
- * @param index the start index of an unsigned short value in {@link #b b},
- * whose value is the index of an UTF8 constant pool item.
- * @param buf buffer to be used to read the item. This buffer must be
- * sufficiently large. It is not automatically resized.
- * @return the String corresponding to the specified UTF8 item.
- */
- public String readUTF8(int index, final char[] buf) {
- int item = readUnsignedShort(index);
- String s = strings[item];
- if (s != null) {
- return s;
- }
- index = items[item];
- return strings[item] = readUTF(index + 2, readUnsignedShort(index), buf);
- }
-
- /**
- * Reads UTF8 string in {@link #b b}.
- *
- * @param index start offset of the UTF8 string to be read.
- * @param utfLen length of the UTF8 string to be read.
- * @param buf buffer to be used to read the string. This buffer must be
- * sufficiently large. It is not automatically resized.
- * @return the String corresponding to the specified UTF8 string.
- */
- private String readUTF(int index, final int utfLen, final char[] buf) {
- int endIndex = index + utfLen;
- byte[] b = this.b;
- int strLen = 0;
- int c, d, e;
- while (index < endIndex) {
- c = b[index++] & 0xFF;
- switch (c >> 4) {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- // 0xxxxxxx
- buf[strLen++] = (char) c;
- break;
- case 12:
- case 13:
- // 110x xxxx 10xx xxxx
- d = b[index++];
- buf[strLen++] = (char) (((c & 0x1F) << 6) | (d & 0x3F));
- break;
- default:
- // 1110 xxxx 10xx xxxx 10xx xxxx
- d = b[index++];
- e = b[index++];
- buf[strLen++] = (char) (((c & 0x0F) << 12)
- | ((d & 0x3F) << 6) | (e & 0x3F));
- break;
- }
- }
- return new String(buf, 0, strLen);
- }
-
- /**
- * Reads a class constant pool item in {@link #b b}. <i>This method is
- * intended for {@link Attribute} sub classes, and is normally not needed by
- * class generators or adapters.</i>
- *
- * @param index the start index of an unsigned short value in {@link #b b},
- * whose value is the index of a class constant pool item.
- * @param buf buffer to be used to read the item. This buffer must be
- * sufficiently large. It is not automatically resized.
- * @return the String corresponding to the specified class item.
- */
- public String readClass(final int index, final char[] buf) {
- // computes the start index of the CONSTANT_Class item in b
- // and reads the CONSTANT_Utf8 item designated by
- // the first two bytes of this CONSTANT_Class item
- return readUTF8(items[readUnsignedShort(index)], buf);
- }
-
- /**
- * Reads a numeric or string constant pool item in {@link #b b}. <i>This
- * method is intended for {@link Attribute} sub classes, and is normally not
- * needed by class generators or adapters.</i>
- *
- * @param item the index of a constant pool item.
- * @param buf buffer to be used to read the item. This buffer must be
- * sufficiently large. It is not automatically resized.
- * @return the {@link Integer}, {@link Float}, {@link Long},
- * {@link Double}, {@link String} or {@link Type} corresponding to
- * the given constant pool item.
- */
- public Object readConst(final int item, final char[] buf) {
- int index = items[item];
- switch (b[index - 1]) {
- case ClassWriter.INT:
- return new Integer(readInt(index));
- case ClassWriter.FLOAT:
- return new Float(Float.intBitsToFloat(readInt(index)));
- case ClassWriter.LONG:
- return new Long(readLong(index));
- case ClassWriter.DOUBLE:
- return new Double(Double.longBitsToDouble(readLong(index)));
- case ClassWriter.CLASS:
- return Type.getObjectType(readUTF8(index, buf));
- // case ClassWriter.STR:
- default:
- return readUTF8(index, buf);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassVisitor.java
deleted file mode 100644
index 1cc27a6d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassVisitor.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * A visitor to visit a Java class. The methods of this interface must be called
- * in the following order: <tt>visit</tt> [ <tt>visitSource</tt> ] [
- * <tt>visitOuterClass</tt> ] ( <tt>visitAnnotation</tt> |
- * <tt>visitAttribute</tt> )* (<tt>visitInnerClass</tt> |
- * <tt>visitField</tt> | <tt>visitMethod</tt> )* <tt>visitEnd</tt>.
- *
- * @author Eric Bruneton
- */
-public interface ClassVisitor {
-
- /**
- * Visits the header of the class.
- *
- * @param version the class version.
- * @param access the class's access flags (see {@link Opcodes}). This
- * parameter also indicates if the class is deprecated.
- * @param name the internal name of the class (see
- * {@link Type#getInternalName() getInternalName}).
- * @param signature the signature of this class. May be <tt>null</tt> if
- * the class is not a generic one, and does not extend or implement
- * generic classes or interfaces.
- * @param superName the internal of name of the super class (see
- * {@link Type#getInternalName() getInternalName}). For interfaces,
- * the super class is {@link Object}. May be <tt>null</tt>, but
- * only for the {@link Object} class.
- * @param interfaces the internal names of the class's interfaces (see
- * {@link Type#getInternalName() getInternalName}). May be
- * <tt>null</tt>.
- */
- void visit(
- int version,
- int access,
- String name,
- String signature,
- String superName,
- String[] interfaces);
-
- /**
- * Visits the source of the class.
- *
- * @param source the name of the source file from which the class was
- * compiled. May be <tt>null</tt>.
- * @param debug additional debug information to compute the correspondance
- * between source and compiled elements of the class. May be
- * <tt>null</tt>.
- */
- void visitSource(String source, String debug);
-
- /**
- * Visits the enclosing class of the class. This method must be called only
- * if the class has an enclosing class.
- *
- * @param owner internal name of the enclosing class of the class.
- * @param name the name of the method that contains the class, or
- * <tt>null</tt> if the class is not enclosed in a method of its
- * enclosing class.
- * @param desc the descriptor of the method that contains the class, or
- * <tt>null</tt> if the class is not enclosed in a method of its
- * enclosing class.
- */
- void visitOuterClass(String owner, String name, String desc);
-
- /**
- * Visits an annotation of the class.
- *
- * @param desc the class descriptor of the annotation class.
- * @param visible <tt>true</tt> if the annotation is visible at runtime.
- * @return a visitor to visit the annotation values, or <tt>null</tt> if
- * this visitor is not interested in visiting this annotation.
- */
- AnnotationVisitor visitAnnotation(String desc, boolean visible);
-
- /**
- * Visits a non standard attribute of the class.
- *
- * @param attr an attribute.
- */
- void visitAttribute(Attribute attr);
-
- /**
- * Visits information about an inner class. This inner class is not
- * necessarily a member of the class being visited.
- *
- * @param name the internal name of an inner class (see
- * {@link Type#getInternalName() getInternalName}).
- * @param outerName the internal name of the class to which the inner class
- * belongs (see {@link Type#getInternalName() getInternalName}). May
- * be <tt>null</tt> for not member classes.
- * @param innerName the (simple) name of the inner class inside its
- * enclosing class. May be <tt>null</tt> for anonymous inner
- * classes.
- * @param access the access flags of the inner class as originally declared
- * in the enclosing class.
- */
- void visitInnerClass(
- String name,
- String outerName,
- String innerName,
- int access);
-
- /**
- * Visits a field of the class.
- *
- * @param access the field's access flags (see {@link Opcodes}). This
- * parameter also indicates if the field is synthetic and/or
- * deprecated.
- * @param name the field's name.
- * @param desc the field's descriptor (see {@link Type Type}).
- * @param signature the field's signature. May be <tt>null</tt> if the
- * field's type does not use generic types.
- * @param value the field's initial value. This parameter, which may be
- * <tt>null</tt> if the field does not have an initial value, must
- * be an {@link Integer}, a {@link Float}, a {@link Long}, a
- * {@link Double} or a {@link String} (for <tt>int</tt>,
- * <tt>float</tt>, <tt>long</tt> or <tt>String</tt> fields
- * respectively). <i>This parameter is only used for static fields</i>.
- * Its value is ignored for non static fields, which must be
- * initialized through bytecode instructions in constructors or
- * methods.
- * @return a visitor to visit field annotations and attributes, or
- * <tt>null</tt> if this class visitor is not interested in
- * visiting these annotations and attributes.
- */
- FieldVisitor visitField(
- int access,
- String name,
- String desc,
- String signature,
- Object value);
-
- /**
- * Visits a method of the class. This method <i>must</i> return a new
- * {@link MethodVisitor} instance (or <tt>null</tt>) each time it is
- * called, i.e., it should not return a previously returned visitor.
- *
- * @param access the method's access flags (see {@link Opcodes}). This
- * parameter also indicates if the method is synthetic and/or
- * deprecated.
- * @param name the method's name.
- * @param desc the method's descriptor (see {@link Type Type}).
- * @param signature the method's signature. May be <tt>null</tt> if the
- * method parameters, return type and exceptions do not use generic
- * types.
- * @param exceptions the internal names of the method's exception classes
- * (see {@link Type#getInternalName() getInternalName}). May be
- * <tt>null</tt>.
- * @return an object to visit the byte code of the method, or <tt>null</tt>
- * if this class visitor is not interested in visiting the code of
- * this method.
- */
- MethodVisitor visitMethod(
- int access,
- String name,
- String desc,
- String signature,
- String[] exceptions);
-
- /**
- * Visits the end of the class. This method, which is the last one to be
- * called, is used to inform the visitor that all the fields and methods of
- * the class have been visited.
- */
- void visitEnd();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassWriter.java
deleted file mode 100644
index 25ba36b3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassWriter.java
+++ /dev/null
@@ -1,1374 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * A {@link ClassVisitor} that generates classes in bytecode form. More
- * precisely this visitor generates a byte array conforming to the Java class
- * file format. It can be used alone, to generate a Java class "from scratch",
- * or with one or more {@link ClassReader ClassReader} and adapter class visitor
- * to generate a modified class from one or more existing Java classes.
- *
- * @author Eric Bruneton
- */
-public class ClassWriter implements ClassVisitor {
-
- /**
- * Flag to automatically compute the maximum stack size and the maximum
- * number of local variables of methods. If this flag is set, then the
- * arguments of the {@link MethodVisitor#visitMaxs visitMaxs} method of the
- * {@link MethodVisitor} returned by the {@link #visitMethod visitMethod}
- * method will be ignored, and computed automatically from the signature and
- * the bytecode of each method.
- *
- * @see #ClassWriter(int)
- */
- public static final int COMPUTE_MAXS = 1;
-
- /**
- * Flag to automatically compute the stack map frames of methods from
- * scratch. If this flag is set, then the calls to the
- * {@link MethodVisitor#visitFrame} method are ignored, and the stack map
- * frames are recomputed from the methods bytecode. The arguments of the
- * {@link MethodVisitor#visitMaxs visitMaxs} method are also ignored and
- * recomputed from the bytecode. In other words, computeFrames implies
- * computeMaxs.
- *
- * @see #ClassWriter(int)
- */
- public static final int COMPUTE_FRAMES = 2;
-
- /**
- * The type of instructions without any argument.
- */
- static final int NOARG_INSN = 0;
-
- /**
- * The type of instructions with an signed byte argument.
- */
- static final int SBYTE_INSN = 1;
-
- /**
- * The type of instructions with an signed short argument.
- */
- static final int SHORT_INSN = 2;
-
- /**
- * The type of instructions with a local variable index argument.
- */
- static final int VAR_INSN = 3;
-
- /**
- * The type of instructions with an implicit local variable index argument.
- */
- static final int IMPLVAR_INSN = 4;
-
- /**
- * The type of instructions with a type descriptor argument.
- */
- static final int TYPE_INSN = 5;
-
- /**
- * The type of field and method invocations instructions.
- */
- static final int FIELDORMETH_INSN = 6;
-
- /**
- * The type of the INVOKEINTERFACE instruction.
- */
- static final int ITFMETH_INSN = 7;
-
- /**
- * The type of instructions with a 2 bytes bytecode offset label.
- */
- static final int LABEL_INSN = 8;
-
- /**
- * The type of instructions with a 4 bytes bytecode offset label.
- */
- static final int LABELW_INSN = 9;
-
- /**
- * The type of the LDC instruction.
- */
- static final int LDC_INSN = 10;
-
- /**
- * The type of the LDC_W and LDC2_W instructions.
- */
- static final int LDCW_INSN = 11;
-
- /**
- * The type of the IINC instruction.
- */
- static final int IINC_INSN = 12;
-
- /**
- * The type of the TABLESWITCH instruction.
- */
- static final int TABL_INSN = 13;
-
- /**
- * The type of the LOOKUPSWITCH instruction.
- */
- static final int LOOK_INSN = 14;
-
- /**
- * The type of the MULTIANEWARRAY instruction.
- */
- static final int MANA_INSN = 15;
-
- /**
- * The type of the WIDE instruction.
- */
- static final int WIDE_INSN = 16;
-
- /**
- * The instruction types of all JVM opcodes.
- */
- static final byte[] TYPE;
-
- /**
- * The type of CONSTANT_Class constant pool items.
- */
- static final int CLASS = 7;
-
- /**
- * The type of CONSTANT_Fieldref constant pool items.
- */
- static final int FIELD = 9;
-
- /**
- * The type of CONSTANT_Methodref constant pool items.
- */
- static final int METH = 10;
-
- /**
- * The type of CONSTANT_InterfaceMethodref constant pool items.
- */
- static final int IMETH = 11;
-
- /**
- * The type of CONSTANT_String constant pool items.
- */
- static final int STR = 8;
-
- /**
- * The type of CONSTANT_Integer constant pool items.
- */
- static final int INT = 3;
-
- /**
- * The type of CONSTANT_Float constant pool items.
- */
- static final int FLOAT = 4;
-
- /**
- * The type of CONSTANT_Long constant pool items.
- */
- static final int LONG = 5;
-
- /**
- * The type of CONSTANT_Double constant pool items.
- */
- static final int DOUBLE = 6;
-
- /**
- * The type of CONSTANT_NameAndType constant pool items.
- */
- static final int NAME_TYPE = 12;
-
- /**
- * The type of CONSTANT_Utf8 constant pool items.
- */
- static final int UTF8 = 1;
-
- /**
- * Normal type Item stored in the ClassWriter {@link ClassWriter#typeTable},
- * instead of the constant pool, in order to avoid clashes with normal
- * constant pool items in the ClassWriter constant pool's hash table.
- */
- static final int TYPE_NORMAL = 13;
-
- /**
- * Uninitialized type Item stored in the ClassWriter
- * {@link ClassWriter#typeTable}, instead of the constant pool, in order to
- * avoid clashes with normal constant pool items in the ClassWriter constant
- * pool's hash table.
- */
- static final int TYPE_UNINIT = 14;
-
- /**
- * Merged type Item stored in the ClassWriter {@link ClassWriter#typeTable},
- * instead of the constant pool, in order to avoid clashes with normal
- * constant pool items in the ClassWriter constant pool's hash table.
- */
- static final int TYPE_MERGED = 15;
-
- /**
- * The class reader from which this class writer was constructed, if any.
- */
- ClassReader cr;
-
- /**
- * Minor and major version numbers of the class to be generated.
- */
- int version;
-
- /**
- * Index of the next item to be added in the constant pool.
- */
- int index;
-
- /**
- * The constant pool of this class.
- */
- final ByteVector pool;
-
- /**
- * The constant pool's hash table data.
- */
- Item[] items;
-
- /**
- * The threshold of the constant pool's hash table.
- */
- int threshold;
-
- /**
- * A reusable key used to look for items in the {@link #items} hash table.
- */
- final Item key;
-
- /**
- * A reusable key used to look for items in the {@link #items} hash table.
- */
- final Item key2;
-
- /**
- * A reusable key used to look for items in the {@link #items} hash table.
- */
- final Item key3;
-
- /**
- * A type table used to temporarily store internal names that will not
- * necessarily be stored in the constant pool. This type table is used by
- * the control flow and data flow analysis algorithm used to compute stack
- * map frames from scratch. This array associates to each index <tt>i</tt>
- * the Item whose index is <tt>i</tt>. All Item objects stored in this
- * array are also stored in the {@link #items} hash table. These two arrays
- * allow to retrieve an Item from its index or, conversely, to get the index
- * of an Item from its value. Each Item stores an internal name in its
- * {@link Item#strVal1} field.
- */
- Item[] typeTable;
-
- /**
- * Number of elements in the {@link #typeTable} array.
- */
- private short typeCount;
-
- /**
- * The access flags of this class.
- */
- private int access;
-
- /**
- * The constant pool item that contains the internal name of this class.
- */
- private int name;
-
- /**
- * The internal name of this class.
- */
- String thisName;
-
- /**
- * The constant pool item that contains the signature of this class.
- */
- private int signature;
-
- /**
- * The constant pool item that contains the internal name of the super class
- * of this class.
- */
- private int superName;
-
- /**
- * Number of interfaces implemented or extended by this class or interface.
- */
- private int interfaceCount;
-
- /**
- * The interfaces implemented or extended by this class or interface. More
- * precisely, this array contains the indexes of the constant pool items
- * that contain the internal names of these interfaces.
- */
- private int[] interfaces;
-
- /**
- * The index of the constant pool item that contains the name of the source
- * file from which this class was compiled.
- */
- private int sourceFile;
-
- /**
- * The SourceDebug attribute of this class.
- */
- private ByteVector sourceDebug;
-
- /**
- * The constant pool item that contains the name of the enclosing class of
- * this class.
- */
- private int enclosingMethodOwner;
-
- /**
- * The constant pool item that contains the name and descriptor of the
- * enclosing method of this class.
- */
- private int enclosingMethod;
-
- /**
- * The runtime visible annotations of this class.
- */
- private AnnotationWriter anns;
-
- /**
- * The runtime invisible annotations of this class.
- */
- private AnnotationWriter ianns;
-
- /**
- * The non standard attributes of this class.
- */
- private Attribute attrs;
-
- /**
- * The number of entries in the InnerClasses attribute.
- */
- private int innerClassesCount;
-
- /**
- * The InnerClasses attribute.
- */
- private ByteVector innerClasses;
-
- /**
- * The fields of this class. These fields are stored in a linked list of
- * {@link FieldWriter} objects, linked to each other by their
- * {@link FieldWriter#next} field. This field stores the first element of
- * this list.
- */
- FieldWriter firstField;
-
- /**
- * The fields of this class. These fields are stored in a linked list of
- * {@link FieldWriter} objects, linked to each other by their
- * {@link FieldWriter#next} field. This field stores the last element of
- * this list.
- */
- FieldWriter lastField;
-
- /**
- * The methods of this class. These methods are stored in a linked list of
- * {@link MethodWriter} objects, linked to each other by their
- * {@link MethodWriter#next} field. This field stores the first element of
- * this list.
- */
- MethodWriter firstMethod;
-
- /**
- * The methods of this class. These methods are stored in a linked list of
- * {@link MethodWriter} objects, linked to each other by their
- * {@link MethodWriter#next} field. This field stores the last element of
- * this list.
- */
- MethodWriter lastMethod;
-
- /**
- * <tt>true</tt> if the maximum stack size and number of local variables
- * must be automatically computed.
- */
- private final boolean computeMaxs;
-
- /**
- * <tt>true</tt> if the stack map frames must be recomputed from scratch.
- */
- private final boolean computeFrames;
-
- /**
- * <tt>true</tt> if the stack map tables of this class are invalid. The
- * {@link MethodWriter#resizeInstructions} method cannot transform existing
- * stack map tables, and so produces potentially invalid classes when it is
- * executed. In this case the class is reread and rewritten with the
- * {@link #COMPUTE_FRAMES} option (the resizeInstructions method can resize
- * stack map tables when this option is used).
- */
- boolean invalidFrames;
-
- // ------------------------------------------------------------------------
- // Static initializer
- // ------------------------------------------------------------------------
-
- /**
- * Computes the instruction types of JVM opcodes.
- */
- static {
- int i;
- byte[] b = new byte[220];
- String s = "AAAAAAAAAAAAAAAABCKLLDDDDDEEEEEEEEEEEEEEEEEEEEAAAAAAAADD"
- + "DDDEEEEEEEEEEEEEEEEEEEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
- + "AAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAIIIIIIIIIIIIIIIIDNOAA"
- + "AAAAGGGGGGGHAFBFAAFFAAQPIIJJIIIIIIIIIIIIIIIIII";
- for (i = 0; i < b.length; ++i) {
- b[i] = (byte) (s.charAt(i) - 'A');
- }
- TYPE = b;
-
- // code to generate the above string
- //
- // // SBYTE_INSN instructions
- // b[Constants.NEWARRAY] = SBYTE_INSN;
- // b[Constants.BIPUSH] = SBYTE_INSN;
- //
- // // SHORT_INSN instructions
- // b[Constants.SIPUSH] = SHORT_INSN;
- //
- // // (IMPL)VAR_INSN instructions
- // b[Constants.RET] = VAR_INSN;
- // for (i = Constants.ILOAD; i <= Constants.ALOAD; ++i) {
- // b[i] = VAR_INSN;
- // }
- // for (i = Constants.ISTORE; i <= Constants.ASTORE; ++i) {
- // b[i] = VAR_INSN;
- // }
- // for (i = 26; i <= 45; ++i) { // ILOAD_0 to ALOAD_3
- // b[i] = IMPLVAR_INSN;
- // }
- // for (i = 59; i <= 78; ++i) { // ISTORE_0 to ASTORE_3
- // b[i] = IMPLVAR_INSN;
- // }
- //
- // // TYPE_INSN instructions
- // b[Constants.NEW] = TYPE_INSN;
- // b[Constants.ANEWARRAY] = TYPE_INSN;
- // b[Constants.CHECKCAST] = TYPE_INSN;
- // b[Constants.INSTANCEOF] = TYPE_INSN;
- //
- // // (Set)FIELDORMETH_INSN instructions
- // for (i = Constants.GETSTATIC; i <= Constants.INVOKESTATIC; ++i) {
- // b[i] = FIELDORMETH_INSN;
- // }
- // b[Constants.INVOKEINTERFACE] = ITFMETH_INSN;
- //
- // // LABEL(W)_INSN instructions
- // for (i = Constants.IFEQ; i <= Constants.JSR; ++i) {
- // b[i] = LABEL_INSN;
- // }
- // b[Constants.IFNULL] = LABEL_INSN;
- // b[Constants.IFNONNULL] = LABEL_INSN;
- // b[200] = LABELW_INSN; // GOTO_W
- // b[201] = LABELW_INSN; // JSR_W
- // // temporary opcodes used internally by ASM - see Label and
- // MethodWriter
- // for (i = 202; i < 220; ++i) {
- // b[i] = LABEL_INSN;
- // }
- //
- // // LDC(_W) instructions
- // b[Constants.LDC] = LDC_INSN;
- // b[19] = LDCW_INSN; // LDC_W
- // b[20] = LDCW_INSN; // LDC2_W
- //
- // // special instructions
- // b[Constants.IINC] = IINC_INSN;
- // b[Constants.TABLESWITCH] = TABL_INSN;
- // b[Constants.LOOKUPSWITCH] = LOOK_INSN;
- // b[Constants.MULTIANEWARRAY] = MANA_INSN;
- // b[196] = WIDE_INSN; // WIDE
- //
- // for (i = 0; i < b.length; ++i) {
- // System.err.print((char)('A' + b[i]));
- // }
- // System.err.println();
- }
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
-
- /**
- * Constructs a new {@link ClassWriter} object.
- *
- * @param flags option flags that can be used to modify the default behavior
- * of this class. See {@link #COMPUTE_MAXS}, {@link #COMPUTE_FRAMES}.
- */
- public ClassWriter(final int flags) {
- index = 1;
- pool = new ByteVector();
- items = new Item[256];
- threshold = (int) (0.75d * items.length);
- key = new Item();
- key2 = new Item();
- key3 = new Item();
- this.computeMaxs = (flags & COMPUTE_MAXS) != 0;
- this.computeFrames = (flags & COMPUTE_FRAMES) != 0;
- }
-
- /**
- * Constructs a new {@link ClassWriter} object and enables optimizations for
- * "mostly add" bytecode transformations. These optimizations are the
- * following:
- *
- * <ul> <li>The constant pool from the original class is copied as is in
- * the new class, which saves time. New constant pool entries will be added
- * at the end if necessary, but unused constant pool entries <i>won't be
- * removed</i>.</li> <li>Methods that are not transformed are copied as
- * is in the new class, directly from the original class bytecode (i.e.
- * without emitting visit events for all the method instructions), which
- * saves a <i>lot</i> of time. Untransformed methods are detected by the
- * fact that the {@link ClassReader} receives {@link MethodVisitor} objects
- * that come from a {@link ClassWriter} (and not from a custom
- * {@link ClassAdapter} or any other {@link ClassVisitor} instance).</li>
- * </ul>
- *
- * @param classReader the {@link ClassReader} used to read the original
- * class. It will be used to copy the entire constant pool from the
- * original class and also to copy other fragments of original
- * bytecode where applicable.
- * @param flags option flags that can be used to modify the default behavior
- * of this class. See {@link #COMPUTE_MAXS}, {@link #COMPUTE_FRAMES}.
- */
- public ClassWriter(final ClassReader classReader, final int flags) {
- this(flags);
- classReader.copyPool(this);
- this.cr = classReader;
- }
-
- // ------------------------------------------------------------------------
- // Implementation of the ClassVisitor interface
- // ------------------------------------------------------------------------
-
- public void visit(
- final int version,
- final int access,
- final String name,
- final String signature,
- final String superName,
- final String[] interfaces)
- {
- this.version = version;
- this.access = access;
- this.name = newClass(name);
- thisName = name;
- if (ClassReader.SIGNATURES && signature != null) {
- this.signature = newUTF8(signature);
- }
- this.superName = superName == null ? 0 : newClass(superName);
- if (interfaces != null && interfaces.length > 0) {
- interfaceCount = interfaces.length;
- this.interfaces = new int[interfaceCount];
- for (int i = 0; i < interfaceCount; ++i) {
- this.interfaces[i] = newClass(interfaces[i]);
- }
- }
- }
-
- public void visitSource(final String file, final String debug) {
- if (file != null) {
- sourceFile = newUTF8(file);
- }
- if (debug != null) {
- sourceDebug = new ByteVector().putUTF8(debug);
- }
- }
-
- public void visitOuterClass(
- final String owner,
- final String name,
- final String desc)
- {
- enclosingMethodOwner = newClass(owner);
- if (name != null && desc != null) {
- enclosingMethod = newNameType(name, desc);
- }
- }
-
- public AnnotationVisitor visitAnnotation(
- final String desc,
- final boolean visible)
- {
- if (!ClassReader.ANNOTATIONS) {
- return null;
- }
- ByteVector bv = new ByteVector();
- // write type, and reserve space for values count
- bv.putShort(newUTF8(desc)).putShort(0);
- AnnotationWriter aw = new AnnotationWriter(this, true, bv, bv, 2);
- if (visible) {
- aw.next = anns;
- anns = aw;
- } else {
- aw.next = ianns;
- ianns = aw;
- }
- return aw;
- }
-
- public void visitAttribute(final Attribute attr) {
- attr.next = attrs;
- attrs = attr;
- }
-
- public void visitInnerClass(
- final String name,
- final String outerName,
- final String innerName,
- final int access)
- {
- if (innerClasses == null) {
- innerClasses = new ByteVector();
- }
- ++innerClassesCount;
- innerClasses.putShort(name == null ? 0 : newClass(name));
- innerClasses.putShort(outerName == null ? 0 : newClass(outerName));
- innerClasses.putShort(innerName == null ? 0 : newUTF8(innerName));
- innerClasses.putShort(access);
- }
-
- public FieldVisitor visitField(
- final int access,
- final String name,
- final String desc,
- final String signature,
- final Object value)
- {
- return new FieldWriter(this, access, name, desc, signature, value);
- }
-
- public MethodVisitor visitMethod(
- final int access,
- final String name,
- final String desc,
- final String signature,
- final String[] exceptions)
- {
- return new MethodWriter(this,
- access,
- name,
- desc,
- signature,
- exceptions,
- computeMaxs,
- computeFrames);
- }
-
- public void visitEnd() {
- }
-
- // ------------------------------------------------------------------------
- // Other public methods
- // ------------------------------------------------------------------------
-
- /**
- * Returns the bytecode of the class that was build with this class writer.
- *
- * @return the bytecode of the class that was build with this class writer.
- */
- public byte[] toByteArray() {
- // computes the real size of the bytecode of this class
- int size = 24 + 2 * interfaceCount;
- int nbFields = 0;
- FieldWriter fb = firstField;
- while (fb != null) {
- ++nbFields;
- size += fb.getSize();
- fb = fb.next;
- }
- int nbMethods = 0;
- MethodWriter mb = firstMethod;
- while (mb != null) {
- ++nbMethods;
- size += mb.getSize();
- mb = mb.next;
- }
- int attributeCount = 0;
- if (ClassReader.SIGNATURES && signature != 0) {
- ++attributeCount;
- size += 8;
- newUTF8("Signature");
- }
- if (sourceFile != 0) {
- ++attributeCount;
- size += 8;
- newUTF8("SourceFile");
- }
- if (sourceDebug != null) {
- ++attributeCount;
- size += sourceDebug.length + 4;
- newUTF8("SourceDebugExtension");
- }
- if (enclosingMethodOwner != 0) {
- ++attributeCount;
- size += 10;
- newUTF8("EnclosingMethod");
- }
- if ((access & Opcodes.ACC_DEPRECATED) != 0) {
- ++attributeCount;
- size += 6;
- newUTF8("Deprecated");
- }
- if ((access & Opcodes.ACC_SYNTHETIC) != 0
- && (version & 0xffff) < Opcodes.V1_5)
- {
- ++attributeCount;
- size += 6;
- newUTF8("Synthetic");
- }
- if (innerClasses != null) {
- ++attributeCount;
- size += 8 + innerClasses.length;
- newUTF8("InnerClasses");
- }
- if (ClassReader.ANNOTATIONS && anns != null) {
- ++attributeCount;
- size += 8 + anns.getSize();
- newUTF8("RuntimeVisibleAnnotations");
- }
- if (ClassReader.ANNOTATIONS && ianns != null) {
- ++attributeCount;
- size += 8 + ianns.getSize();
- newUTF8("RuntimeInvisibleAnnotations");
- }
- if (attrs != null) {
- attributeCount += attrs.getCount();
- size += attrs.getSize(this, null, 0, -1, -1);
- }
- size += pool.length;
- // allocates a byte vector of this size, in order to avoid unnecessary
- // arraycopy operations in the ByteVector.enlarge() method
- ByteVector out = new ByteVector(size);
- out.putInt(0xCAFEBABE).putInt(version);
- out.putShort(index).putByteArray(pool.data, 0, pool.length);
- out.putShort(access).putShort(name).putShort(superName);
- out.putShort(interfaceCount);
- for (int i = 0; i < interfaceCount; ++i) {
- out.putShort(interfaces[i]);
- }
- out.putShort(nbFields);
- fb = firstField;
- while (fb != null) {
- fb.put(out);
- fb = fb.next;
- }
- out.putShort(nbMethods);
- mb = firstMethod;
- while (mb != null) {
- mb.put(out);
- mb = mb.next;
- }
- out.putShort(attributeCount);
- if (ClassReader.SIGNATURES && signature != 0) {
- out.putShort(newUTF8("Signature")).putInt(2).putShort(signature);
- }
- if (sourceFile != 0) {
- out.putShort(newUTF8("SourceFile")).putInt(2).putShort(sourceFile);
- }
- if (sourceDebug != null) {
- int len = sourceDebug.length - 2;
- out.putShort(newUTF8("SourceDebugExtension")).putInt(len);
- out.putByteArray(sourceDebug.data, 2, len);
- }
- if (enclosingMethodOwner != 0) {
- out.putShort(newUTF8("EnclosingMethod")).putInt(4);
- out.putShort(enclosingMethodOwner).putShort(enclosingMethod);
- }
- if ((access & Opcodes.ACC_DEPRECATED) != 0) {
- out.putShort(newUTF8("Deprecated")).putInt(0);
- }
- if ((access & Opcodes.ACC_SYNTHETIC) != 0
- && (version & 0xffff) < Opcodes.V1_5)
- {
- out.putShort(newUTF8("Synthetic")).putInt(0);
- }
- if (innerClasses != null) {
- out.putShort(newUTF8("InnerClasses"));
- out.putInt(innerClasses.length + 2).putShort(innerClassesCount);
- out.putByteArray(innerClasses.data, 0, innerClasses.length);
- }
- if (ClassReader.ANNOTATIONS && anns != null) {
- out.putShort(newUTF8("RuntimeVisibleAnnotations"));
- anns.put(out);
- }
- if (ClassReader.ANNOTATIONS && ianns != null) {
- out.putShort(newUTF8("RuntimeInvisibleAnnotations"));
- ianns.put(out);
- }
- if (attrs != null) {
- attrs.put(this, null, 0, -1, -1, out);
- }
- if (invalidFrames) {
- ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
- new ClassReader(out.data).accept(cw, ClassReader.SKIP_FRAMES);
- return cw.toByteArray();
- }
- return out.data;
- }
-
- // ------------------------------------------------------------------------
- // Utility methods: constant pool management
- // ------------------------------------------------------------------------
-
- /**
- * Adds a number or string constant to the constant pool of the class being
- * build. Does nothing if the constant pool already contains a similar item.
- *
- * @param cst the value of the constant to be added to the constant pool.
- * This parameter must be an {@link Integer}, a {@link Float}, a
- * {@link Long}, a {@link Double}, a {@link String} or a
- * {@link Type}.
- * @return a new or already existing constant item with the given value.
- */
- Item newConstItem(final Object cst) {
- if (cst instanceof Integer) {
- int val = ((Integer) cst).intValue();
- return newInteger(val);
- } else if (cst instanceof Byte) {
- int val = ((Byte) cst).intValue();
- return newInteger(val);
- } else if (cst instanceof Character) {
- int val = ((Character) cst).charValue();
- return newInteger(val);
- } else if (cst instanceof Short) {
- int val = ((Short) cst).intValue();
- return newInteger(val);
- } else if (cst instanceof Boolean) {
- int val = ((Boolean) cst).booleanValue() ? 1 : 0;
- return newInteger(val);
- } else if (cst instanceof Float) {
- float val = ((Float) cst).floatValue();
- return newFloat(val);
- } else if (cst instanceof Long) {
- long val = ((Long) cst).longValue();
- return newLong(val);
- } else if (cst instanceof Double) {
- double val = ((Double) cst).doubleValue();
- return newDouble(val);
- } else if (cst instanceof String) {
- return newString((String) cst);
- } else if (cst instanceof Type) {
- Type t = (Type) cst;
- return newClassItem(t.getSort() == Type.OBJECT
- ? t.getInternalName()
- : t.getDescriptor());
- } else {
- throw new IllegalArgumentException("value " + cst);
- }
- }
-
- /**
- * Adds a number or string constant to the constant pool of the class being
- * build. Does nothing if the constant pool already contains a similar item.
- * <i>This method is intended for {@link Attribute} sub classes, and is
- * normally not needed by class generators or adapters.</i>
- *
- * @param cst the value of the constant to be added to the constant pool.
- * This parameter must be an {@link Integer}, a {@link Float}, a
- * {@link Long}, a {@link Double} or a {@link String}.
- * @return the index of a new or already existing constant item with the
- * given value.
- */
- public int newConst(final Object cst) {
- return newConstItem(cst).index;
- }
-
- /**
- * Adds an UTF8 string to the constant pool of the class being build. Does
- * nothing if the constant pool already contains a similar item. <i>This
- * method is intended for {@link Attribute} sub classes, and is normally not
- * needed by class generators or adapters.</i>
- *
- * @param value the String value.
- * @return the index of a new or already existing UTF8 item.
- */
- public int newUTF8(final String value) {
- key.set(UTF8, value, null, null);
- Item result = get(key);
- if (result == null) {
- pool.putByte(UTF8).putUTF8(value);
- result = new Item(index++, key);
- put(result);
- }
- return result.index;
- }
-
- /**
- * Adds a class reference to the constant pool of the class being build.
- * Does nothing if the constant pool already contains a similar item.
- * <i>This method is intended for {@link Attribute} sub classes, and is
- * normally not needed by class generators or adapters.</i>
- *
- * @param value the internal name of the class.
- * @return a new or already existing class reference item.
- */
- Item newClassItem(final String value) {
- key2.set(CLASS, value, null, null);
- Item result = get(key2);
- if (result == null) {
- pool.put12(CLASS, newUTF8(value));
- result = new Item(index++, key2);
- put(result);
- }
- return result;
- }
-
- /**
- * Adds a class reference to the constant pool of the class being build.
- * Does nothing if the constant pool already contains a similar item.
- * <i>This method is intended for {@link Attribute} sub classes, and is
- * normally not needed by class generators or adapters.</i>
- *
- * @param value the internal name of the class.
- * @return the index of a new or already existing class reference item.
- */
- public int newClass(final String value) {
- return newClassItem(value).index;
- }
-
- /**
- * Adds a field reference to the constant pool of the class being build.
- * Does nothing if the constant pool already contains a similar item.
- *
- * @param owner the internal name of the field's owner class.
- * @param name the field's name.
- * @param desc the field's descriptor.
- * @return a new or already existing field reference item.
- */
- Item newFieldItem(final String owner, final String name, final String desc)
- {
- key3.set(FIELD, owner, name, desc);
- Item result = get(key3);
- if (result == null) {
- put122(FIELD, newClass(owner), newNameType(name, desc));
- result = new Item(index++, key3);
- put(result);
- }
- return result;
- }
-
- /**
- * Adds a field reference to the constant pool of the class being build.
- * Does nothing if the constant pool already contains a similar item.
- * <i>This method is intended for {@link Attribute} sub classes, and is
- * normally not needed by class generators or adapters.</i>
- *
- * @param owner the internal name of the field's owner class.
- * @param name the field's name.
- * @param desc the field's descriptor.
- * @return the index of a new or already existing field reference item.
- */
- public int newField(final String owner, final String name, final String desc)
- {
- return newFieldItem(owner, name, desc).index;
- }
-
- /**
- * Adds a method reference to the constant pool of the class being build.
- * Does nothing if the constant pool already contains a similar item.
- *
- * @param owner the internal name of the method's owner class.
- * @param name the method's name.
- * @param desc the method's descriptor.
- * @param itf <tt>true</tt> if <tt>owner</tt> is an interface.
- * @return a new or already existing method reference item.
- */
- Item newMethodItem(
- final String owner,
- final String name,
- final String desc,
- final boolean itf)
- {
- int type = itf ? IMETH : METH;
- key3.set(type, owner, name, desc);
- Item result = get(key3);
- if (result == null) {
- put122(type, newClass(owner), newNameType(name, desc));
- result = new Item(index++, key3);
- put(result);
- }
- return result;
- }
-
- /**
- * Adds a method reference to the constant pool of the class being build.
- * Does nothing if the constant pool already contains a similar item.
- * <i>This method is intended for {@link Attribute} sub classes, and is
- * normally not needed by class generators or adapters.</i>
- *
- * @param owner the internal name of the method's owner class.
- * @param name the method's name.
- * @param desc the method's descriptor.
- * @param itf <tt>true</tt> if <tt>owner</tt> is an interface.
- * @return the index of a new or already existing method reference item.
- */
- public int newMethod(
- final String owner,
- final String name,
- final String desc,
- final boolean itf)
- {
- return newMethodItem(owner, name, desc, itf).index;
- }
-
- /**
- * Adds an integer to the constant pool of the class being build. Does
- * nothing if the constant pool already contains a similar item.
- *
- * @param value the int value.
- * @return a new or already existing int item.
- */
- Item newInteger(final int value) {
- key.set(value);
- Item result = get(key);
- if (result == null) {
- pool.putByte(INT).putInt(value);
- result = new Item(index++, key);
- put(result);
- }
- return result;
- }
-
- /**
- * Adds a float to the constant pool of the class being build. Does nothing
- * if the constant pool already contains a similar item.
- *
- * @param value the float value.
- * @return a new or already existing float item.
- */
- Item newFloat(final float value) {
- key.set(value);
- Item result = get(key);
- if (result == null) {
- pool.putByte(FLOAT).putInt(key.intVal);
- result = new Item(index++, key);
- put(result);
- }
- return result;
- }
-
- /**
- * Adds a long to the constant pool of the class being build. Does nothing
- * if the constant pool already contains a similar item.
- *
- * @param value the long value.
- * @return a new or already existing long item.
- */
- Item newLong(final long value) {
- key.set(value);
- Item result = get(key);
- if (result == null) {
- pool.putByte(LONG).putLong(value);
- result = new Item(index, key);
- put(result);
- index += 2;
- }
- return result;
- }
-
- /**
- * Adds a double to the constant pool of the class being build. Does nothing
- * if the constant pool already contains a similar item.
- *
- * @param value the double value.
- * @return a new or already existing double item.
- */
- Item newDouble(final double value) {
- key.set(value);
- Item result = get(key);
- if (result == null) {
- pool.putByte(DOUBLE).putLong(key.longVal);
- result = new Item(index, key);
- put(result);
- index += 2;
- }
- return result;
- }
-
- /**
- * Adds a string to the constant pool of the class being build. Does nothing
- * if the constant pool already contains a similar item.
- *
- * @param value the String value.
- * @return a new or already existing string item.
- */
- private Item newString(final String value) {
- key2.set(STR, value, null, null);
- Item result = get(key2);
- if (result == null) {
- pool.put12(STR, newUTF8(value));
- result = new Item(index++, key2);
- put(result);
- }
- return result;
- }
-
- /**
- * Adds a name and type to the constant pool of the class being build. Does
- * nothing if the constant pool already contains a similar item. <i>This
- * method is intended for {@link Attribute} sub classes, and is normally not
- * needed by class generators or adapters.</i>
- *
- * @param name a name.
- * @param desc a type descriptor.
- * @return the index of a new or already existing name and type item.
- */
- public int newNameType(final String name, final String desc) {
- key2.set(NAME_TYPE, name, desc, null);
- Item result = get(key2);
- if (result == null) {
- put122(NAME_TYPE, newUTF8(name), newUTF8(desc));
- result = new Item(index++, key2);
- put(result);
- }
- return result.index;
- }
-
- /**
- * Adds the given internal name to {@link #typeTable} and returns its index.
- * Does nothing if the type table already contains this internal name.
- *
- * @param type the internal name to be added to the type table.
- * @return the index of this internal name in the type table.
- */
- int addType(final String type) {
- key.set(TYPE_NORMAL, type, null, null);
- Item result = get(key);
- if (result == null) {
- result = addType(key);
- }
- return result.index;
- }
-
- /**
- * Adds the given "uninitialized" type to {@link #typeTable} and returns its
- * index. This method is used for UNINITIALIZED types, made of an internal
- * name and a bytecode offset.
- *
- * @param type the internal name to be added to the type table.
- * @param offset the bytecode offset of the NEW instruction that created
- * this UNINITIALIZED type value.
- * @return the index of this internal name in the type table.
- */
- int addUninitializedType(final String type, final int offset) {
- key.type = TYPE_UNINIT;
- key.intVal = offset;
- key.strVal1 = type;
- key.hashCode = 0x7FFFFFFF & (TYPE_UNINIT + type.hashCode() + offset);
- Item result = get(key);
- if (result == null) {
- result = addType(key);
- }
- return result.index;
- }
-
- /**
- * Adds the given Item to {@link #typeTable}.
- *
- * @param item the value to be added to the type table.
- * @return the added Item, which a new Item instance with the same value as
- * the given Item.
- */
- private Item addType(final Item item) {
- ++typeCount;
- Item result = new Item(typeCount, key);
- put(result);
- if (typeTable == null) {
- typeTable = new Item[16];
- }
- if (typeCount == typeTable.length) {
- Item[] newTable = new Item[2 * typeTable.length];
- System.arraycopy(typeTable, 0, newTable, 0, typeTable.length);
- typeTable = newTable;
- }
- typeTable[typeCount] = result;
- return result;
- }
-
- /**
- * Returns the index of the common super type of the two given types. This
- * method calls {@link #getCommonSuperClass} and caches the result in the
- * {@link #items} hash table to speedup future calls with the same
- * parameters.
- *
- * @param type1 index of an internal name in {@link #typeTable}.
- * @param type2 index of an internal name in {@link #typeTable}.
- * @return the index of the common super type of the two given types.
- */
- int getMergedType(final int type1, final int type2) {
- key2.type = TYPE_MERGED;
- key2.longVal = type1 | (((long) type2) << 32);
- key2.hashCode = 0x7FFFFFFF & (TYPE_MERGED + type1 + type2);
- Item result = get(key2);
- if (result == null) {
- String t = typeTable[type1].strVal1;
- String u = typeTable[type2].strVal1;
- key2.intVal = addType(getCommonSuperClass(t, u));
- result = new Item((short) 0, key2);
- put(result);
- }
- return result.intVal;
- }
-
- /**
- * Returns the common super type of the two given types. The default
- * implementation of this method <i>loads<i> the two given classes and uses
- * the java.lang.Class methods to find the common super class. It can be
- * overridden to compute this common super type in other ways, in particular
- * without actually loading any class, or to take into account the class
- * that is currently being generated by this ClassWriter, which can of
- * course not be loaded since it is under construction.
- *
- * @param type1 the internal name of a class.
- * @param type2 the internal name of another class.
- * @return the internal name of the common super class of the two given
- * classes.
- */
- protected String getCommonSuperClass(final String type1, final String type2)
- {
- Class c, d;
- try {
- c = Class.forName(type1.replace('/', '.'));
- d = Class.forName(type2.replace('/', '.'));
- } catch (Exception e) {
- throw new RuntimeException(e.toString());
- }
- if (c.isAssignableFrom(d)) {
- return type1;
- }
- if (d.isAssignableFrom(c)) {
- return type2;
- }
- if (c.isInterface() || d.isInterface()) {
- return "java/lang/Object";
- } else {
- do {
- c = c.getSuperclass();
- } while (!c.isAssignableFrom(d));
- return c.getName().replace('.', '/');
- }
- }
-
- /**
- * Returns the constant pool's hash table item which is equal to the given
- * item.
- *
- * @param key a constant pool item.
- * @return the constant pool's hash table item which is equal to the given
- * item, or <tt>null</tt> if there is no such item.
- */
- private Item get(final Item key) {
- Item i = items[key.hashCode % items.length];
- while (i != null && !key.isEqualTo(i)) {
- i = i.next;
- }
- return i;
- }
-
- /**
- * Puts the given item in the constant pool's hash table. The hash table
- * <i>must</i> not already contains this item.
- *
- * @param i the item to be added to the constant pool's hash table.
- */
- private void put(final Item i) {
- if (index > threshold) {
- int ll = items.length;
- int nl = ll * 2 + 1;
- Item[] newItems = new Item[nl];
- for (int l = ll - 1; l >= 0; --l) {
- Item j = items[l];
- while (j != null) {
- int index = j.hashCode % newItems.length;
- Item k = j.next;
- j.next = newItems[index];
- newItems[index] = j;
- j = k;
- }
- }
- items = newItems;
- threshold = (int) (nl * 0.75);
- }
- int index = i.hashCode % items.length;
- i.next = items[index];
- items[index] = i;
- }
-
- /**
- * Puts one byte and two shorts into the constant pool.
- *
- * @param b a byte.
- * @param s1 a short.
- * @param s2 another short.
- */
- private void put122(final int b, final int s1, final int s2) {
- pool.put12(b, s1).putShort(s2);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Edge.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Edge.java
deleted file mode 100644
index 105b2369..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Edge.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * An edge in the control flow graph of a method body. See {@link Label Label}.
- *
- * @author Eric Bruneton
- */
-class Edge {
-
- /**
- * Denotes a normal control flow graph edge.
- */
- static final int NORMAL = 0;
-
- /**
- * Denotes a control flow graph edge corresponding to an exception handler.
- * More precisely any {@link Edge} whose {@link #info} is strictly positive
- * corresponds to an exception handler. The actual value of {@link #info} is
- * the index, in the {@link ClassWriter} type table, of the exception that
- * is catched.
- */
- static final int EXCEPTION = 0x7FFFFFFF;
-
- /**
- * Information about this control flow graph edge. If
- * {@link ClassWriter#COMPUTE_MAXS} is used this field is the (relative)
- * stack size in the basic block from which this edge originates. This size
- * is equal to the stack size at the "jump" instruction to which this edge
- * corresponds, relatively to the stack size at the beginning of the
- * originating basic block. If {@link ClassWriter#COMPUTE_FRAMES} is used,
- * this field is the kind of this control flow graph edge (i.e. NORMAL or
- * EXCEPTION).
- */
- int info;
-
- /**
- * The successor block of the basic block from which this edge originates.
- */
- Label successor;
-
- /**
- * The next edge in the list of successors of the originating basic block.
- * See {@link Label#successors successors}.
- */
- Edge next;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/FieldVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/FieldVisitor.java
deleted file mode 100644
index 3bbb5235..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/FieldVisitor.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * A visitor to visit a Java field. The methods of this interface must be called
- * in the following order: ( <tt>visitAnnotation</tt> |
- * <tt>visitAttribute</tt> )* <tt>visitEnd</tt>.
- *
- * @author Eric Bruneton
- */
-public interface FieldVisitor {
-
- /**
- * Visits an annotation of the field.
- *
- * @param desc the class descriptor of the annotation class.
- * @param visible <tt>true</tt> if the annotation is visible at runtime.
- * @return a visitor to visit the annotation values, or <tt>null</tt> if
- * this visitor is not interested in visiting this annotation.
- */
- AnnotationVisitor visitAnnotation(String desc, boolean visible);
-
- /**
- * Visits a non standard attribute of the field.
- *
- * @param attr an attribute.
- */
- void visitAttribute(Attribute attr);
-
- /**
- * Visits the end of the field. This method, which is the last one to be
- * called, is used to inform the visitor that all the annotations and
- * attributes of the field have been visited.
- */
- void visitEnd();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/FieldWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/FieldWriter.java
deleted file mode 100644
index 8286a699..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/FieldWriter.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * An {@link FieldVisitor} that generates Java fields in bytecode form.
- *
- * @author Eric Bruneton
- */
-final class FieldWriter implements FieldVisitor {
-
- /**
- * Next field writer (see {@link ClassWriter#firstField firstField}).
- */
- FieldWriter next;
-
- /**
- * The class writer to which this field must be added.
- */
- private final ClassWriter cw;
-
- /**
- * Access flags of this field.
- */
- private final int access;
-
- /**
- * The index of the constant pool item that contains the name of this
- * method.
- */
- private final int name;
-
- /**
- * The index of the constant pool item that contains the descriptor of this
- * field.
- */
- private final int desc;
-
- /**
- * The index of the constant pool item that contains the signature of this
- * field.
- */
- private int signature;
-
- /**
- * The index of the constant pool item that contains the constant value of
- * this field.
- */
- private int value;
-
- /**
- * The runtime visible annotations of this field. May be <tt>null</tt>.
- */
- private AnnotationWriter anns;
-
- /**
- * The runtime invisible annotations of this field. May be <tt>null</tt>.
- */
- private AnnotationWriter ianns;
-
- /**
- * The non standard attributes of this field. May be <tt>null</tt>.
- */
- private Attribute attrs;
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
-
- /**
- * Constructs a new {@link FieldWriter}.
- *
- * @param cw the class writer to which this field must be added.
- * @param access the field's access flags (see {@link Opcodes}).
- * @param name the field's name.
- * @param desc the field's descriptor (see {@link Type}).
- * @param signature the field's signature. May be <tt>null</tt>.
- * @param value the field's constant value. May be <tt>null</tt>.
- */
- FieldWriter(
- final ClassWriter cw,
- final int access,
- final String name,
- final String desc,
- final String signature,
- final Object value)
- {
- if (cw.firstField == null) {
- cw.firstField = this;
- } else {
- cw.lastField.next = this;
- }
- cw.lastField = this;
- this.cw = cw;
- this.access = access;
- this.name = cw.newUTF8(name);
- this.desc = cw.newUTF8(desc);
- if (ClassReader.SIGNATURES && signature != null) {
- this.signature = cw.newUTF8(signature);
- }
- if (value != null) {
- this.value = cw.newConstItem(value).index;
- }
- }
-
- // ------------------------------------------------------------------------
- // Implementation of the FieldVisitor interface
- // ------------------------------------------------------------------------
-
- public AnnotationVisitor visitAnnotation(
- final String desc,
- final boolean visible)
- {
- if (!ClassReader.ANNOTATIONS) {
- return null;
- }
- ByteVector bv = new ByteVector();
- // write type, and reserve space for values count
- bv.putShort(cw.newUTF8(desc)).putShort(0);
- AnnotationWriter aw = new AnnotationWriter(cw, true, bv, bv, 2);
- if (visible) {
- aw.next = anns;
- anns = aw;
- } else {
- aw.next = ianns;
- ianns = aw;
- }
- return aw;
- }
-
- public void visitAttribute(final Attribute attr) {
- attr.next = attrs;
- attrs = attr;
- }
-
- public void visitEnd() {
- }
-
- // ------------------------------------------------------------------------
- // Utility methods
- // ------------------------------------------------------------------------
-
- /**
- * Returns the size of this field.
- *
- * @return the size of this field.
- */
- int getSize() {
- int size = 8;
- if (value != 0) {
- cw.newUTF8("ConstantValue");
- size += 8;
- }
- if ((access & Opcodes.ACC_SYNTHETIC) != 0
- && (cw.version & 0xffff) < Opcodes.V1_5)
- {
- cw.newUTF8("Synthetic");
- size += 6;
- }
- if ((access & Opcodes.ACC_DEPRECATED) != 0) {
- cw.newUTF8("Deprecated");
- size += 6;
- }
- if (ClassReader.SIGNATURES && signature != 0) {
- cw.newUTF8("Signature");
- size += 8;
- }
- if (ClassReader.ANNOTATIONS && anns != null) {
- cw.newUTF8("RuntimeVisibleAnnotations");
- size += 8 + anns.getSize();
- }
- if (ClassReader.ANNOTATIONS && ianns != null) {
- cw.newUTF8("RuntimeInvisibleAnnotations");
- size += 8 + ianns.getSize();
- }
- if (attrs != null) {
- size += attrs.getSize(cw, null, 0, -1, -1);
- }
- return size;
- }
-
- /**
- * Puts the content of this field into the given byte vector.
- *
- * @param out where the content of this field must be put.
- */
- void put(final ByteVector out) {
- out.putShort(access).putShort(name).putShort(desc);
- int attributeCount = 0;
- if (value != 0) {
- ++attributeCount;
- }
- if ((access & Opcodes.ACC_SYNTHETIC) != 0
- && (cw.version & 0xffff) < Opcodes.V1_5)
- {
- ++attributeCount;
- }
- if ((access & Opcodes.ACC_DEPRECATED) != 0) {
- ++attributeCount;
- }
- if (ClassReader.SIGNATURES && signature != 0) {
- ++attributeCount;
- }
- if (ClassReader.ANNOTATIONS && anns != null) {
- ++attributeCount;
- }
- if (ClassReader.ANNOTATIONS && ianns != null) {
- ++attributeCount;
- }
- if (attrs != null) {
- attributeCount += attrs.getCount();
- }
- out.putShort(attributeCount);
- if (value != 0) {
- out.putShort(cw.newUTF8("ConstantValue"));
- out.putInt(2).putShort(value);
- }
- if ((access & Opcodes.ACC_SYNTHETIC) != 0
- && (cw.version & 0xffff) < Opcodes.V1_5)
- {
- out.putShort(cw.newUTF8("Synthetic")).putInt(0);
- }
- if ((access & Opcodes.ACC_DEPRECATED) != 0) {
- out.putShort(cw.newUTF8("Deprecated")).putInt(0);
- }
- if (ClassReader.SIGNATURES && signature != 0) {
- out.putShort(cw.newUTF8("Signature"));
- out.putInt(2).putShort(signature);
- }
- if (ClassReader.ANNOTATIONS && anns != null) {
- out.putShort(cw.newUTF8("RuntimeVisibleAnnotations"));
- anns.put(out);
- }
- if (ClassReader.ANNOTATIONS && ianns != null) {
- out.putShort(cw.newUTF8("RuntimeInvisibleAnnotations"));
- ianns.put(out);
- }
- if (attrs != null) {
- attrs.put(cw, null, 0, -1, -1, out);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Frame.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Frame.java
deleted file mode 100644
index b3630ed3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Frame.java
+++ /dev/null
@@ -1,1432 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * Information about the input and output stack map frames of a basic block.
- *
- * @author Eric Bruneton
- */
-final class Frame {
-
- /*
- * Frames are computed in a two steps process: during the visit of each
- * instruction, the state of the frame at the end of current basic block is
- * updated by simulating the action of the instruction on the previous state
- * of this so called "output frame". In visitMaxs, a fix point algorithm is
- * used to compute the "input frame" of each basic block, i.e. the stack map
- * frame at the begining of the basic block, starting from the input frame
- * of the first basic block (which is computed from the method descriptor),
- * and by using the previously computed output frames to compute the input
- * state of the other blocks.
- *
- * All output and input frames are stored as arrays of integers. Reference
- * and array types are represented by an index into a type table (which is
- * not the same as the constant pool of the class, in order to avoid adding
- * unnecessary constants in the pool - not all computed frames will end up
- * being stored in the stack map table). This allows very fast type
- * comparisons.
- *
- * Output stack map frames are computed relatively to the input frame of the
- * basic block, which is not yet known when output frames are computed. It
- * is therefore necessary to be able to represent abstract types such as
- * "the type at position x in the input frame locals" or "the type at
- * position x from the top of the input frame stack" or even "the type at
- * position x in the input frame, with y more (or less) array dimensions".
- * This explains the rather complicated type format used in output frames.
- *
- * This format is the following: DIM KIND VALUE (4, 4 and 24 bits). DIM is a
- * signed number of array dimensions (from -8 to 7). KIND is either BASE,
- * LOCAL or STACK. BASE is used for types that are not relative to the input
- * frame. LOCAL is used for types that are relative to the input local
- * variable types. STACK is used for types that are relative to the input
- * stack types. VALUE depends on KIND. For LOCAL types, it is an index in
- * the input local variable types. For STACK types, it is a position
- * relatively to the top of input frame stack. For BASE types, it is either
- * one of the constants defined in FrameVisitor, or for OBJECT and
- * UNINITIALIZED types, a tag and an index in the type table.
- *
- * Output frames can contain types of any kind and with a positive or
- * negative dimension (and even unassigned types, represented by 0 - which
- * does not correspond to any valid type value). Input frames can only
- * contain BASE types of positive or null dimension. In all cases the type
- * table contains only internal type names (array type descriptors are
- * forbidden - dimensions must be represented through the DIM field).
- *
- * The LONG and DOUBLE types are always represented by using two slots (LONG +
- * TOP or DOUBLE + TOP), for local variable types as well as in the operand
- * stack. This is necessary to be able to simulate DUPx_y instructions,
- * whose effect would be dependent on the actual type values if types were
- * always represented by a single slot in the stack (and this is not
- * possible, since actual type values are not always known - cf LOCAL and
- * STACK type kinds).
- */
-
- /**
- * Mask to get the dimension of a frame type. This dimension is a signed
- * integer between -8 and 7.
- */
- static final int DIM = 0xF0000000;
-
- /**
- * Constant to be added to a type to get a type with one more dimension.
- */
- static final int ARRAY_OF = 0x10000000;
-
- /**
- * Constant to be added to a type to get a type with one less dimension.
- */
- static final int ELEMENT_OF = 0xF0000000;
-
- /**
- * Mask to get the kind of a frame type.
- *
- * @see #BASE
- * @see #LOCAL
- * @see #STACK
- */
- static final int KIND = 0xF000000;
-
- /**
- * Mask to get the value of a frame type.
- */
- static final int VALUE = 0xFFFFFF;
-
- /**
- * Mask to get the kind of base types.
- */
- static final int BASE_KIND = 0xFF00000;
-
- /**
- * Mask to get the value of base types.
- */
- static final int BASE_VALUE = 0xFFFFF;
-
- /**
- * Kind of the types that are not relative to an input stack map frame.
- */
- static final int BASE = 0x1000000;
-
- /**
- * Base kind of the base reference types. The BASE_VALUE of such types is an
- * index into the type table.
- */
- static final int OBJECT = BASE | 0x700000;
-
- /**
- * Base kind of the uninitialized base types. The BASE_VALUE of such types
- * in an index into the type table (the Item at that index contains both an
- * instruction offset and an internal class name).
- */
- static final int UNINITIALIZED = BASE | 0x800000;
-
- /**
- * Kind of the types that are relative to the local variable types of an
- * input stack map frame. The value of such types is a local variable index.
- */
- private static final int LOCAL = 0x2000000;
-
- /**
- * Kind of the the types that are relative to the stack of an input stack
- * map frame. The value of such types is a position relatively to the top of
- * this stack.
- */
- private static final int STACK = 0x3000000;
-
- /**
- * The TOP type. This is a BASE type.
- */
- static final int TOP = BASE | 0;
-
- /**
- * The BOOLEAN type. This is a BASE type mainly used for array types.
- */
- static final int BOOLEAN = BASE | 9;
-
- /**
- * The BYTE type. This is a BASE type mainly used for array types.
- */
- static final int BYTE = BASE | 10;
-
- /**
- * The CHAR type. This is a BASE type mainly used for array types.
- */
- static final int CHAR = BASE | 11;
-
- /**
- * The SHORT type. This is a BASE type mainly used for array types.
- */
- static final int SHORT = BASE | 12;
-
- /**
- * The INTEGER type. This is a BASE type.
- */
- static final int INTEGER = BASE | 1;
-
- /**
- * The FLOAT type. This is a BASE type.
- */
- static final int FLOAT = BASE | 2;
-
- /**
- * The DOUBLE type. This is a BASE type.
- */
- static final int DOUBLE = BASE | 3;
-
- /**
- * The LONG type. This is a BASE type.
- */
- static final int LONG = BASE | 4;
-
- /**
- * The NULL type. This is a BASE type.
- */
- static final int NULL = BASE | 5;
-
- /**
- * The UNINITIALIZED_THIS type. This is a BASE type.
- */
- static final int UNINITIALIZED_THIS = BASE | 6;
-
- /**
- * The stack size variation corresponding to each JVM instruction. This
- * stack variation is equal to the size of the values produced by an
- * instruction, minus the size of the values consumed by this instruction.
- */
- static final int[] SIZE;
-
- /**
- * Computes the stack size variation corresponding to each JVM instruction.
- */
- static {
- int i;
- int[] b = new int[202];
- String s = "EFFFFFFFFGGFFFGGFFFEEFGFGFEEEEEEEEEEEEEEEEEEEEDEDEDDDDD"
- + "CDCDEEEEEEEEEEEEEEEEEEEEBABABBBBDCFFFGGGEDCDCDCDCDCDCDCDCD"
- + "CDCEEEEDDDDDDDCDCDCEFEFDDEEFFDEDEEEBDDBBDDDDDDCCCCCCCCEFED"
- + "DDCDCDEEEEEEEEEEFEEEEEEDDEEDDEE";
- for (i = 0; i < b.length; ++i) {
- b[i] = s.charAt(i) - 'E';
- }
- SIZE = b;
-
- // code to generate the above string
- //
- // int NA = 0; // not applicable (unused opcode or variable size opcode)
- //
- // b = new int[] {
- // 0, //NOP, // visitInsn
- // 1, //ACONST_NULL, // -
- // 1, //ICONST_M1, // -
- // 1, //ICONST_0, // -
- // 1, //ICONST_1, // -
- // 1, //ICONST_2, // -
- // 1, //ICONST_3, // -
- // 1, //ICONST_4, // -
- // 1, //ICONST_5, // -
- // 2, //LCONST_0, // -
- // 2, //LCONST_1, // -
- // 1, //FCONST_0, // -
- // 1, //FCONST_1, // -
- // 1, //FCONST_2, // -
- // 2, //DCONST_0, // -
- // 2, //DCONST_1, // -
- // 1, //BIPUSH, // visitIntInsn
- // 1, //SIPUSH, // -
- // 1, //LDC, // visitLdcInsn
- // NA, //LDC_W, // -
- // NA, //LDC2_W, // -
- // 1, //ILOAD, // visitVarInsn
- // 2, //LLOAD, // -
- // 1, //FLOAD, // -
- // 2, //DLOAD, // -
- // 1, //ALOAD, // -
- // NA, //ILOAD_0, // -
- // NA, //ILOAD_1, // -
- // NA, //ILOAD_2, // -
- // NA, //ILOAD_3, // -
- // NA, //LLOAD_0, // -
- // NA, //LLOAD_1, // -
- // NA, //LLOAD_2, // -
- // NA, //LLOAD_3, // -
- // NA, //FLOAD_0, // -
- // NA, //FLOAD_1, // -
- // NA, //FLOAD_2, // -
- // NA, //FLOAD_3, // -
- // NA, //DLOAD_0, // -
- // NA, //DLOAD_1, // -
- // NA, //DLOAD_2, // -
- // NA, //DLOAD_3, // -
- // NA, //ALOAD_0, // -
- // NA, //ALOAD_1, // -
- // NA, //ALOAD_2, // -
- // NA, //ALOAD_3, // -
- // -1, //IALOAD, // visitInsn
- // 0, //LALOAD, // -
- // -1, //FALOAD, // -
- // 0, //DALOAD, // -
- // -1, //AALOAD, // -
- // -1, //BALOAD, // -
- // -1, //CALOAD, // -
- // -1, //SALOAD, // -
- // -1, //ISTORE, // visitVarInsn
- // -2, //LSTORE, // -
- // -1, //FSTORE, // -
- // -2, //DSTORE, // -
- // -1, //ASTORE, // -
- // NA, //ISTORE_0, // -
- // NA, //ISTORE_1, // -
- // NA, //ISTORE_2, // -
- // NA, //ISTORE_3, // -
- // NA, //LSTORE_0, // -
- // NA, //LSTORE_1, // -
- // NA, //LSTORE_2, // -
- // NA, //LSTORE_3, // -
- // NA, //FSTORE_0, // -
- // NA, //FSTORE_1, // -
- // NA, //FSTORE_2, // -
- // NA, //FSTORE_3, // -
- // NA, //DSTORE_0, // -
- // NA, //DSTORE_1, // -
- // NA, //DSTORE_2, // -
- // NA, //DSTORE_3, // -
- // NA, //ASTORE_0, // -
- // NA, //ASTORE_1, // -
- // NA, //ASTORE_2, // -
- // NA, //ASTORE_3, // -
- // -3, //IASTORE, // visitInsn
- // -4, //LASTORE, // -
- // -3, //FASTORE, // -
- // -4, //DASTORE, // -
- // -3, //AASTORE, // -
- // -3, //BASTORE, // -
- // -3, //CASTORE, // -
- // -3, //SASTORE, // -
- // -1, //POP, // -
- // -2, //POP2, // -
- // 1, //DUP, // -
- // 1, //DUP_X1, // -
- // 1, //DUP_X2, // -
- // 2, //DUP2, // -
- // 2, //DUP2_X1, // -
- // 2, //DUP2_X2, // -
- // 0, //SWAP, // -
- // -1, //IADD, // -
- // -2, //LADD, // -
- // -1, //FADD, // -
- // -2, //DADD, // -
- // -1, //ISUB, // -
- // -2, //LSUB, // -
- // -1, //FSUB, // -
- // -2, //DSUB, // -
- // -1, //IMUL, // -
- // -2, //LMUL, // -
- // -1, //FMUL, // -
- // -2, //DMUL, // -
- // -1, //IDIV, // -
- // -2, //LDIV, // -
- // -1, //FDIV, // -
- // -2, //DDIV, // -
- // -1, //IREM, // -
- // -2, //LREM, // -
- // -1, //FREM, // -
- // -2, //DREM, // -
- // 0, //INEG, // -
- // 0, //LNEG, // -
- // 0, //FNEG, // -
- // 0, //DNEG, // -
- // -1, //ISHL, // -
- // -1, //LSHL, // -
- // -1, //ISHR, // -
- // -1, //LSHR, // -
- // -1, //IUSHR, // -
- // -1, //LUSHR, // -
- // -1, //IAND, // -
- // -2, //LAND, // -
- // -1, //IOR, // -
- // -2, //LOR, // -
- // -1, //IXOR, // -
- // -2, //LXOR, // -
- // 0, //IINC, // visitIincInsn
- // 1, //I2L, // visitInsn
- // 0, //I2F, // -
- // 1, //I2D, // -
- // -1, //L2I, // -
- // -1, //L2F, // -
- // 0, //L2D, // -
- // 0, //F2I, // -
- // 1, //F2L, // -
- // 1, //F2D, // -
- // -1, //D2I, // -
- // 0, //D2L, // -
- // -1, //D2F, // -
- // 0, //I2B, // -
- // 0, //I2C, // -
- // 0, //I2S, // -
- // -3, //LCMP, // -
- // -1, //FCMPL, // -
- // -1, //FCMPG, // -
- // -3, //DCMPL, // -
- // -3, //DCMPG, // -
- // -1, //IFEQ, // visitJumpInsn
- // -1, //IFNE, // -
- // -1, //IFLT, // -
- // -1, //IFGE, // -
- // -1, //IFGT, // -
- // -1, //IFLE, // -
- // -2, //IF_ICMPEQ, // -
- // -2, //IF_ICMPNE, // -
- // -2, //IF_ICMPLT, // -
- // -2, //IF_ICMPGE, // -
- // -2, //IF_ICMPGT, // -
- // -2, //IF_ICMPLE, // -
- // -2, //IF_ACMPEQ, // -
- // -2, //IF_ACMPNE, // -
- // 0, //GOTO, // -
- // 1, //JSR, // -
- // 0, //RET, // visitVarInsn
- // -1, //TABLESWITCH, // visiTableSwitchInsn
- // -1, //LOOKUPSWITCH, // visitLookupSwitch
- // -1, //IRETURN, // visitInsn
- // -2, //LRETURN, // -
- // -1, //FRETURN, // -
- // -2, //DRETURN, // -
- // -1, //ARETURN, // -
- // 0, //RETURN, // -
- // NA, //GETSTATIC, // visitFieldInsn
- // NA, //PUTSTATIC, // -
- // NA, //GETFIELD, // -
- // NA, //PUTFIELD, // -
- // NA, //INVOKEVIRTUAL, // visitMethodInsn
- // NA, //INVOKESPECIAL, // -
- // NA, //INVOKESTATIC, // -
- // NA, //INVOKEINTERFACE, // -
- // NA, //UNUSED, // NOT VISITED
- // 1, //NEW, // visitTypeInsn
- // 0, //NEWARRAY, // visitIntInsn
- // 0, //ANEWARRAY, // visitTypeInsn
- // 0, //ARRAYLENGTH, // visitInsn
- // NA, //ATHROW, // -
- // 0, //CHECKCAST, // visitTypeInsn
- // 0, //INSTANCEOF, // -
- // -1, //MONITORENTER, // visitInsn
- // -1, //MONITOREXIT, // -
- // NA, //WIDE, // NOT VISITED
- // NA, //MULTIANEWARRAY, // visitMultiANewArrayInsn
- // -1, //IFNULL, // visitJumpInsn
- // -1, //IFNONNULL, // -
- // NA, //GOTO_W, // -
- // NA, //JSR_W, // -
- // };
- // for (i = 0; i < b.length; ++i) {
- // System.err.print((char)('E' + b[i]));
- // }
- // System.err.println();
- }
-
- /**
- * The label (i.e. basic block) to which these input and output stack map
- * frames correspond.
- */
- Label owner;
-
- /**
- * The input stack map frame locals.
- */
- int[] inputLocals;
-
- /**
- * The input stack map frame stack.
- */
- int[] inputStack;
-
- /**
- * The output stack map frame locals.
- */
- private int[] outputLocals;
-
- /**
- * The output stack map frame stack.
- */
- private int[] outputStack;
-
- /**
- * Relative size of the output stack. The exact semantics of this field
- * depends on the algorithm that is used.
- *
- * When only the maximum stack size is computed, this field is the size of
- * the output stack relatively to the top of the input stack.
- *
- * When the stack map frames are completely computed, this field is the
- * actual number of types in {@link #outputStack}.
- */
- private int outputStackTop;
-
- /**
- * Number of types that are initialized in the basic block.
- *
- * @see #initializations
- */
- private int initializationCount;
-
- /**
- * The types that are initialized in the basic block. A constructor
- * invocation on an UNINITIALIZED or UNINITIALIZED_THIS type must replace
- * <i>every occurence</i> of this type in the local variables and in the
- * operand stack. This cannot be done during the first phase of the
- * algorithm since, during this phase, the local variables and the operand
- * stack are not completely computed. It is therefore necessary to store the
- * types on which constructors are invoked in the basic block, in order to
- * do this replacement during the second phase of the algorithm, where the
- * frames are fully computed. Note that this array can contain types that
- * are relative to input locals or to the input stack (see below for the
- * description of the algorithm).
- */
- private int[] initializations;
-
- /**
- * Returns the output frame local variable type at the given index.
- *
- * @param local the index of the local that must be returned.
- * @return the output frame local variable type at the given index.
- */
- private int get(final int local) {
- if (outputLocals == null || local >= outputLocals.length) {
- // this local has never been assigned in this basic block,
- // so it is still equal to its value in the input frame
- return LOCAL | local;
- } else {
- int type = outputLocals[local];
- if (type == 0) {
- // this local has never been assigned in this basic block,
- // so it is still equal to its value in the input frame
- type = outputLocals[local] = LOCAL | local;
- }
- return type;
- }
- }
-
- /**
- * Sets the output frame local variable type at the given index.
- *
- * @param local the index of the local that must be set.
- * @param type the value of the local that must be set.
- */
- private void set(final int local, final int type) {
- // creates and/or resizes the output local variables array if necessary
- if (outputLocals == null) {
- outputLocals = new int[10];
- }
- int n = outputLocals.length;
- if (local >= n) {
- int[] t = new int[Math.max(local + 1, 2 * n)];
- System.arraycopy(outputLocals, 0, t, 0, n);
- outputLocals = t;
- }
- // sets the local variable
- outputLocals[local] = type;
- }
-
- /**
- * Pushes a new type onto the output frame stack.
- *
- * @param type the type that must be pushed.
- */
- private void push(final int type) {
- // creates and/or resizes the output stack array if necessary
- if (outputStack == null) {
- outputStack = new int[10];
- }
- int n = outputStack.length;
- if (outputStackTop >= n) {
- int[] t = new int[Math.max(outputStackTop + 1, 2 * n)];
- System.arraycopy(outputStack, 0, t, 0, n);
- outputStack = t;
- }
- // pushes the type on the output stack
- outputStack[outputStackTop++] = type;
- // updates the maximun height reached by the output stack, if needed
- int top = owner.inputStackTop + outputStackTop;
- if (top > owner.outputStackMax) {
- owner.outputStackMax = top;
- }
- }
-
- /**
- * Pushes a new type onto the output frame stack.
- *
- * @param cw the ClassWriter to which this label belongs.
- * @param desc the descriptor of the type to be pushed. Can also be a method
- * descriptor (in this case this method pushes its return type onto
- * the output frame stack).
- */
- private void push(final ClassWriter cw, final String desc) {
- int type = type(cw, desc);
- if (type != 0) {
- push(type);
- if (type == LONG || type == DOUBLE) {
- push(TOP);
- }
- }
- }
-
- /**
- * Returns the int encoding of the given type.
- *
- * @param cw the ClassWriter to which this label belongs.
- * @param desc a type descriptor.
- * @return the int encoding of the given type.
- */
- private static int type(final ClassWriter cw, final String desc) {
- String t;
- int index = desc.charAt(0) == '(' ? desc.indexOf(')') + 1 : 0;
- switch (desc.charAt(index)) {
- case 'V':
- return 0;
- case 'Z':
- case 'C':
- case 'B':
- case 'S':
- case 'I':
- return INTEGER;
- case 'F':
- return FLOAT;
- case 'J':
- return LONG;
- case 'D':
- return DOUBLE;
- case 'L':
- // stores the internal name, not the descriptor!
- t = desc.substring(index + 1, desc.length() - 1);
- return OBJECT | cw.addType(t);
- // case '[':
- default:
- // extracts the dimensions and the element type
- int data;
- int dims = index + 1;
- while (desc.charAt(dims) == '[') {
- ++dims;
- }
- switch (desc.charAt(dims)) {
- case 'Z':
- data = BOOLEAN;
- break;
- case 'C':
- data = CHAR;
- break;
- case 'B':
- data = BYTE;
- break;
- case 'S':
- data = SHORT;
- break;
- case 'I':
- data = INTEGER;
- break;
- case 'F':
- data = FLOAT;
- break;
- case 'J':
- data = LONG;
- break;
- case 'D':
- data = DOUBLE;
- break;
- // case 'L':
- default:
- // stores the internal name, not the descriptor
- t = desc.substring(dims + 1, desc.length() - 1);
- data = OBJECT | cw.addType(t);
- }
- return (dims - index) << 28 | data;
- }
- }
-
- /**
- * Pops a type from the output frame stack and returns its value.
- *
- * @return the type that has been popped from the output frame stack.
- */
- private int pop() {
- if (outputStackTop > 0) {
- return outputStack[--outputStackTop];
- } else {
- // if the output frame stack is empty, pops from the input stack
- return STACK | -(--owner.inputStackTop);
- }
- }
-
- /**
- * Pops the given number of types from the output frame stack.
- *
- * @param elements the number of types that must be popped.
- */
- private void pop(final int elements) {
- if (outputStackTop >= elements) {
- outputStackTop -= elements;
- } else {
- // if the number of elements to be popped is greater than the number
- // of elements in the output stack, clear it, and pops the remaining
- // elements from the input stack.
- owner.inputStackTop -= elements - outputStackTop;
- outputStackTop = 0;
- }
- }
-
- /**
- * Pops a type from the output frame stack.
- *
- * @param desc the descriptor of the type to be popped. Can also be a method
- * descriptor (in this case this method pops the types corresponding
- * to the method arguments).
- */
- private void pop(final String desc) {
- char c = desc.charAt(0);
- if (c == '(') {
- pop((MethodWriter.getArgumentsAndReturnSizes(desc) >> 2) - 1);
- } else if (c == 'J' || c == 'D') {
- pop(2);
- } else {
- pop(1);
- }
- }
-
- /**
- * Adds a new type to the list of types on which a constructor is invoked in
- * the basic block.
- *
- * @param var a type on a which a constructor is invoked.
- */
- private void init(final int var) {
- // creates and/or resizes the initializations array if necessary
- if (initializations == null) {
- initializations = new int[2];
- }
- int n = initializations.length;
- if (initializationCount >= n) {
- int[] t = new int[Math.max(initializationCount + 1, 2 * n)];
- System.arraycopy(initializations, 0, t, 0, n);
- initializations = t;
- }
- // stores the type to be initialized
- initializations[initializationCount++] = var;
- }
-
- /**
- * Replaces the given type with the appropriate type if it is one of the
- * types on which a constructor is invoked in the basic block.
- *
- * @param cw the ClassWriter to which this label belongs.
- * @param t a type
- * @return t or, if t is one of the types on which a constructor is invoked
- * in the basic block, the type corresponding to this constructor.
- */
- private int init(final ClassWriter cw, final int t) {
- int s;
- if (t == UNINITIALIZED_THIS) {
- s = OBJECT | cw.addType(cw.thisName);
- } else if ((t & (DIM | BASE_KIND)) == UNINITIALIZED) {
- String type = cw.typeTable[t & BASE_VALUE].strVal1;
- s = OBJECT | cw.addType(type);
- } else {
- return t;
- }
- for (int j = 0; j < initializationCount; ++j) {
- int u = initializations[j];
- int dim = u & DIM;
- int kind = u & KIND;
- if (kind == LOCAL) {
- u = dim + inputLocals[u & VALUE];
- } else if (kind == STACK) {
- u = dim + inputStack[inputStack.length - (u & VALUE)];
- }
- if (t == u) {
- return s;
- }
- }
- return t;
- }
-
- /**
- * Initializes the input frame of the first basic block from the method
- * descriptor.
- *
- * @param cw the ClassWriter to which this label belongs.
- * @param access the access flags of the method to which this label belongs.
- * @param args the formal parameter types of this method.
- * @param maxLocals the maximum number of local variables of this method.
- */
- void initInputFrame(
- final ClassWriter cw,
- final int access,
- final Type[] args,
- final int maxLocals)
- {
- inputLocals = new int[maxLocals];
- inputStack = new int[0];
- int i = 0;
- if ((access & Opcodes.ACC_STATIC) == 0) {
- if ((access & MethodWriter.ACC_CONSTRUCTOR) == 0) {
- inputLocals[i++] = OBJECT | cw.addType(cw.thisName);
- } else {
- inputLocals[i++] = UNINITIALIZED_THIS;
- }
- }
- for (int j = 0; j < args.length; ++j) {
- int t = type(cw, args[j].getDescriptor());
- inputLocals[i++] = t;
- if (t == LONG || t == DOUBLE) {
- inputLocals[i++] = TOP;
- }
- }
- while (i < maxLocals) {
- inputLocals[i++] = TOP;
- }
- }
-
- /**
- * Simulates the action of the given instruction on the output stack frame.
- *
- * @param opcode the opcode of the instruction.
- * @param arg the operand of the instruction, if any.
- * @param cw the class writer to which this label belongs.
- * @param item the operand of the instructions, if any.
- */
- void execute(
- final int opcode,
- final int arg,
- final ClassWriter cw,
- final Item item)
- {
- int t1, t2, t3, t4;
- switch (opcode) {
- case Opcodes.NOP:
- case Opcodes.INEG:
- case Opcodes.LNEG:
- case Opcodes.FNEG:
- case Opcodes.DNEG:
- case Opcodes.I2B:
- case Opcodes.I2C:
- case Opcodes.I2S:
- case Opcodes.GOTO:
- case Opcodes.RETURN:
- break;
- case Opcodes.ACONST_NULL:
- push(NULL);
- break;
- case Opcodes.ICONST_M1:
- case Opcodes.ICONST_0:
- case Opcodes.ICONST_1:
- case Opcodes.ICONST_2:
- case Opcodes.ICONST_3:
- case Opcodes.ICONST_4:
- case Opcodes.ICONST_5:
- case Opcodes.BIPUSH:
- case Opcodes.SIPUSH:
- case Opcodes.ILOAD:
- push(INTEGER);
- break;
- case Opcodes.LCONST_0:
- case Opcodes.LCONST_1:
- case Opcodes.LLOAD:
- push(LONG);
- push(TOP);
- break;
- case Opcodes.FCONST_0:
- case Opcodes.FCONST_1:
- case Opcodes.FCONST_2:
- case Opcodes.FLOAD:
- push(FLOAT);
- break;
- case Opcodes.DCONST_0:
- case Opcodes.DCONST_1:
- case Opcodes.DLOAD:
- push(DOUBLE);
- push(TOP);
- break;
- case Opcodes.LDC:
- switch (item.type) {
- case ClassWriter.INT:
- push(INTEGER);
- break;
- case ClassWriter.LONG:
- push(LONG);
- push(TOP);
- break;
- case ClassWriter.FLOAT:
- push(FLOAT);
- break;
- case ClassWriter.DOUBLE:
- push(DOUBLE);
- push(TOP);
- break;
- case ClassWriter.CLASS:
- push(OBJECT | cw.addType("java/lang/Class"));
- break;
- // case ClassWriter.STR:
- default:
- push(OBJECT | cw.addType("java/lang/String"));
- }
- break;
- case Opcodes.ALOAD:
- push(get(arg));
- break;
- case Opcodes.IALOAD:
- case Opcodes.BALOAD:
- case Opcodes.CALOAD:
- case Opcodes.SALOAD:
- pop(2);
- push(INTEGER);
- break;
- case Opcodes.LALOAD:
- case Opcodes.D2L:
- pop(2);
- push(LONG);
- push(TOP);
- break;
- case Opcodes.FALOAD:
- pop(2);
- push(FLOAT);
- break;
- case Opcodes.DALOAD:
- case Opcodes.L2D:
- pop(2);
- push(DOUBLE);
- push(TOP);
- break;
- case Opcodes.AALOAD:
- pop(1);
- t1 = pop();
- push(ELEMENT_OF + t1);
- break;
- case Opcodes.ISTORE:
- case Opcodes.FSTORE:
- case Opcodes.ASTORE:
- t1 = pop();
- set(arg, t1);
- if (arg > 0) {
- t2 = get(arg - 1);
- // if t2 is of kind STACK or LOCAL we cannot know its size!
- if (t2 == LONG || t2 == DOUBLE) {
- set(arg - 1, TOP);
- }
- }
- break;
- case Opcodes.LSTORE:
- case Opcodes.DSTORE:
- pop(1);
- t1 = pop();
- set(arg, t1);
- set(arg + 1, TOP);
- if (arg > 0) {
- t2 = get(arg - 1);
- // if t2 is of kind STACK or LOCAL we cannot know its size!
- if (t2 == LONG || t2 == DOUBLE) {
- set(arg - 1, TOP);
- }
- }
- break;
- case Opcodes.IASTORE:
- case Opcodes.BASTORE:
- case Opcodes.CASTORE:
- case Opcodes.SASTORE:
- case Opcodes.FASTORE:
- case Opcodes.AASTORE:
- pop(3);
- break;
- case Opcodes.LASTORE:
- case Opcodes.DASTORE:
- pop(4);
- break;
- case Opcodes.POP:
- case Opcodes.IFEQ:
- case Opcodes.IFNE:
- case Opcodes.IFLT:
- case Opcodes.IFGE:
- case Opcodes.IFGT:
- case Opcodes.IFLE:
- case Opcodes.IRETURN:
- case Opcodes.FRETURN:
- case Opcodes.ARETURN:
- case Opcodes.TABLESWITCH:
- case Opcodes.LOOKUPSWITCH:
- case Opcodes.ATHROW:
- case Opcodes.MONITORENTER:
- case Opcodes.MONITOREXIT:
- case Opcodes.IFNULL:
- case Opcodes.IFNONNULL:
- pop(1);
- break;
- case Opcodes.POP2:
- case Opcodes.IF_ICMPEQ:
- case Opcodes.IF_ICMPNE:
- case Opcodes.IF_ICMPLT:
- case Opcodes.IF_ICMPGE:
- case Opcodes.IF_ICMPGT:
- case Opcodes.IF_ICMPLE:
- case Opcodes.IF_ACMPEQ:
- case Opcodes.IF_ACMPNE:
- case Opcodes.LRETURN:
- case Opcodes.DRETURN:
- pop(2);
- break;
- case Opcodes.DUP:
- t1 = pop();
- push(t1);
- push(t1);
- break;
- case Opcodes.DUP_X1:
- t1 = pop();
- t2 = pop();
- push(t1);
- push(t2);
- push(t1);
- break;
- case Opcodes.DUP_X2:
- t1 = pop();
- t2 = pop();
- t3 = pop();
- push(t1);
- push(t3);
- push(t2);
- push(t1);
- break;
- case Opcodes.DUP2:
- t1 = pop();
- t2 = pop();
- push(t2);
- push(t1);
- push(t2);
- push(t1);
- break;
- case Opcodes.DUP2_X1:
- t1 = pop();
- t2 = pop();
- t3 = pop();
- push(t2);
- push(t1);
- push(t3);
- push(t2);
- push(t1);
- break;
- case Opcodes.DUP2_X2:
- t1 = pop();
- t2 = pop();
- t3 = pop();
- t4 = pop();
- push(t2);
- push(t1);
- push(t4);
- push(t3);
- push(t2);
- push(t1);
- break;
- case Opcodes.SWAP:
- t1 = pop();
- t2 = pop();
- push(t1);
- push(t2);
- break;
- case Opcodes.IADD:
- case Opcodes.ISUB:
- case Opcodes.IMUL:
- case Opcodes.IDIV:
- case Opcodes.IREM:
- case Opcodes.IAND:
- case Opcodes.IOR:
- case Opcodes.IXOR:
- case Opcodes.ISHL:
- case Opcodes.ISHR:
- case Opcodes.IUSHR:
- case Opcodes.L2I:
- case Opcodes.D2I:
- case Opcodes.FCMPL:
- case Opcodes.FCMPG:
- pop(2);
- push(INTEGER);
- break;
- case Opcodes.LADD:
- case Opcodes.LSUB:
- case Opcodes.LMUL:
- case Opcodes.LDIV:
- case Opcodes.LREM:
- case Opcodes.LAND:
- case Opcodes.LOR:
- case Opcodes.LXOR:
- pop(4);
- push(LONG);
- push(TOP);
- break;
- case Opcodes.FADD:
- case Opcodes.FSUB:
- case Opcodes.FMUL:
- case Opcodes.FDIV:
- case Opcodes.FREM:
- case Opcodes.L2F:
- case Opcodes.D2F:
- pop(2);
- push(FLOAT);
- break;
- case Opcodes.DADD:
- case Opcodes.DSUB:
- case Opcodes.DMUL:
- case Opcodes.DDIV:
- case Opcodes.DREM:
- pop(4);
- push(DOUBLE);
- push(TOP);
- break;
- case Opcodes.LSHL:
- case Opcodes.LSHR:
- case Opcodes.LUSHR:
- pop(3);
- push(LONG);
- push(TOP);
- break;
- case Opcodes.IINC:
- set(arg, INTEGER);
- break;
- case Opcodes.I2L:
- case Opcodes.F2L:
- pop(1);
- push(LONG);
- push(TOP);
- break;
- case Opcodes.I2F:
- pop(1);
- push(FLOAT);
- break;
- case Opcodes.I2D:
- case Opcodes.F2D:
- pop(1);
- push(DOUBLE);
- push(TOP);
- break;
- case Opcodes.F2I:
- case Opcodes.ARRAYLENGTH:
- case Opcodes.INSTANCEOF:
- pop(1);
- push(INTEGER);
- break;
- case Opcodes.LCMP:
- case Opcodes.DCMPL:
- case Opcodes.DCMPG:
- pop(4);
- push(INTEGER);
- break;
- case Opcodes.JSR:
- case Opcodes.RET:
- throw new RuntimeException("JSR/RET are not supported with computeFrames option");
- case Opcodes.GETSTATIC:
- push(cw, item.strVal3);
- break;
- case Opcodes.PUTSTATIC:
- pop(item.strVal3);
- break;
- case Opcodes.GETFIELD:
- pop(1);
- push(cw, item.strVal3);
- break;
- case Opcodes.PUTFIELD:
- pop(item.strVal3);
- pop();
- break;
- case Opcodes.INVOKEVIRTUAL:
- case Opcodes.INVOKESPECIAL:
- case Opcodes.INVOKESTATIC:
- case Opcodes.INVOKEINTERFACE:
- pop(item.strVal3);
- if (opcode != Opcodes.INVOKESTATIC) {
- t1 = pop();
- if (opcode == Opcodes.INVOKESPECIAL
- && item.strVal2.charAt(0) == '<')
- {
- init(t1);
- }
- }
- push(cw, item.strVal3);
- break;
- case Opcodes.NEW:
- push(UNINITIALIZED | cw.addUninitializedType(item.strVal1, arg));
- break;
- case Opcodes.NEWARRAY:
- pop();
- switch (arg) {
- case Opcodes.T_BOOLEAN:
- push(ARRAY_OF | BOOLEAN);
- break;
- case Opcodes.T_CHAR:
- push(ARRAY_OF | CHAR);
- break;
- case Opcodes.T_BYTE:
- push(ARRAY_OF | BYTE);
- break;
- case Opcodes.T_SHORT:
- push(ARRAY_OF | SHORT);
- break;
- case Opcodes.T_INT:
- push(ARRAY_OF | INTEGER);
- break;
- case Opcodes.T_FLOAT:
- push(ARRAY_OF | FLOAT);
- break;
- case Opcodes.T_DOUBLE:
- push(ARRAY_OF | DOUBLE);
- break;
- // case Opcodes.T_LONG:
- default:
- push(ARRAY_OF | LONG);
- break;
- }
- break;
- case Opcodes.ANEWARRAY:
- String s = item.strVal1;
- pop();
- if (s.charAt(0) == '[') {
- push(cw, '[' + s);
- } else {
- push(ARRAY_OF | OBJECT | cw.addType(s));
- }
- break;
- case Opcodes.CHECKCAST:
- s = item.strVal1;
- pop();
- if (s.charAt(0) == '[') {
- push(cw, s);
- } else {
- push(OBJECT | cw.addType(s));
- }
- break;
- // case Opcodes.MULTIANEWARRAY:
- default:
- pop(arg);
- push(cw, item.strVal1);
- break;
- }
- }
-
- /**
- * Merges the input frame of the given basic block with the input and output
- * frames of this basic block. Returns <tt>true</tt> if the input frame of
- * the given label has been changed by this operation.
- *
- * @param cw the ClassWriter to which this label belongs.
- * @param frame the basic block whose input frame must be updated.
- * @param edge the kind of the {@link Edge} between this label and 'label'.
- * See {@link Edge#info}.
- * @return <tt>true</tt> if the input frame of the given label has been
- * changed by this operation.
- */
- boolean merge(final ClassWriter cw, final Frame frame, final int edge) {
- boolean changed = false;
- int i, s, dim, kind, t;
-
- int nLocal = inputLocals.length;
- int nStack = inputStack.length;
- if (frame.inputLocals == null) {
- frame.inputLocals = new int[nLocal];
- changed = true;
- }
-
- for (i = 0; i < nLocal; ++i) {
- if (outputLocals != null && i < outputLocals.length) {
- s = outputLocals[i];
- if (s == 0) {
- t = inputLocals[i];
- } else {
- dim = s & DIM;
- kind = s & KIND;
- if (kind == LOCAL) {
- t = dim + inputLocals[s & VALUE];
- } else if (kind == STACK) {
- t = dim + inputStack[nStack - (s & VALUE)];
- } else {
- t = s;
- }
- }
- } else {
- t = inputLocals[i];
- }
- if (initializations != null) {
- t = init(cw, t);
- }
- changed |= merge(cw, t, frame.inputLocals, i);
- }
-
- if (edge > 0) {
- for (i = 0; i < nLocal; ++i) {
- t = inputLocals[i];
- changed |= merge(cw, t, frame.inputLocals, i);
- }
- if (frame.inputStack == null) {
- frame.inputStack = new int[1];
- changed = true;
- }
- changed |= merge(cw, edge, frame.inputStack, 0);
- return changed;
- }
-
- int nInputStack = inputStack.length + owner.inputStackTop;
- if (frame.inputStack == null) {
- frame.inputStack = new int[nInputStack + outputStackTop];
- changed = true;
- }
-
- for (i = 0; i < nInputStack; ++i) {
- t = inputStack[i];
- if (initializations != null) {
- t = init(cw, t);
- }
- changed |= merge(cw, t, frame.inputStack, i);
- }
- for (i = 0; i < outputStackTop; ++i) {
- s = outputStack[i];
- dim = s & DIM;
- kind = s & KIND;
- if (kind == LOCAL) {
- t = dim + inputLocals[s & VALUE];
- } else if (kind == STACK) {
- t = dim + inputStack[nStack - (s & VALUE)];
- } else {
- t = s;
- }
- if (initializations != null) {
- t = init(cw, t);
- }
- changed |= merge(cw, t, frame.inputStack, nInputStack + i);
- }
- return changed;
- }
-
- /**
- * Merges the type at the given index in the given type array with the given
- * type. Returns <tt>true</tt> if the type array has been modified by this
- * operation.
- *
- * @param cw the ClassWriter to which this label belongs.
- * @param t the type with which the type array element must be merged.
- * @param types an array of types.
- * @param index the index of the type that must be merged in 'types'.
- * @return <tt>true</tt> if the type array has been modified by this
- * operation.
- */
- private static boolean merge(
- final ClassWriter cw,
- int t,
- final int[] types,
- final int index)
- {
- int u = types[index];
- if (u == t) {
- // if the types are equal, merge(u,t)=u, so there is no change
- return false;
- }
- if ((t & ~DIM) == NULL) {
- if (u == NULL) {
- return false;
- }
- t = NULL;
- }
- if (u == 0) {
- // if types[index] has never been assigned, merge(u,t)=t
- types[index] = t;
- return true;
- }
- int v;
- if ((u & BASE_KIND) == OBJECT || (u & DIM) != 0) {
- // if u is a reference type of any dimension
- if (t == NULL) {
- // if t is the NULL type, merge(u,t)=u, so there is no change
- return false;
- } else if ((t & (DIM | BASE_KIND)) == (u & (DIM | BASE_KIND))) {
- if ((u & BASE_KIND) == OBJECT) {
- // if t is also a reference type, and if u and t have the
- // same dimension merge(u,t) = dim(t) | common parent of the
- // element types of u and t
- v = (t & DIM) | OBJECT
- | cw.getMergedType(t & BASE_VALUE, u & BASE_VALUE);
- } else {
- // if u and t are array types, but not with the same element
- // type, merge(u,t)=java/lang/Object
- v = OBJECT | cw.addType("java/lang/Object");
- }
- } else if ((t & BASE_KIND) == OBJECT || (t & DIM) != 0) {
- // if t is any other reference or array type,
- // merge(u,t)=java/lang/Object
- v = OBJECT | cw.addType("java/lang/Object");
- } else {
- // if t is any other type, merge(u,t)=TOP
- v = TOP;
- }
- } else if (u == NULL) {
- // if u is the NULL type, merge(u,t)=t,
- // or TOP if t is not a reference type
- v = (t & BASE_KIND) == OBJECT || (t & DIM) != 0 ? t : TOP;
- } else {
- // if u is any other type, merge(u,t)=TOP whatever t
- v = TOP;
- }
- if (u != v) {
- types[index] = v;
- return true;
- }
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Handler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Handler.java
deleted file mode 100644
index 9b6e0dfe..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Handler.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * Information about an exception handler block.
- *
- * @author Eric Bruneton
- */
-class Handler {
-
- /**
- * Beginning of the exception handler's scope (inclusive).
- */
- Label start;
-
- /**
- * End of the exception handler's scope (exclusive).
- */
- Label end;
-
- /**
- * Beginning of the exception handler's code.
- */
- Label handler;
-
- /**
- * Internal name of the type of exceptions handled by this handler, or
- * <tt>null</tt> to catch any exceptions.
- */
- String desc;
-
- /**
- * Constant pool index of the internal name of the type of exceptions
- * handled by this handler, or 0 to catch any exceptions.
- */
- int type;
-
- /**
- * Next exception handler block info.
- */
- Handler next;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Item.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Item.java
deleted file mode 100644
index 46766717..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Item.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * A constant pool item. Constant pool items can be created with the 'newXXX'
- * methods in the {@link ClassWriter} class.
- *
- * @author Eric Bruneton
- */
-final class Item {
-
- /**
- * Index of this item in the constant pool.
- */
- int index;
-
- /**
- * Type of this constant pool item. A single class is used to represent all
- * constant pool item types, in order to minimize the bytecode size of this
- * package. The value of this field is one of {@link ClassWriter#INT},
- * {@link ClassWriter#LONG}, {@link ClassWriter#FLOAT},
- * {@link ClassWriter#DOUBLE}, {@link ClassWriter#UTF8},
- * {@link ClassWriter#STR}, {@link ClassWriter#CLASS},
- * {@link ClassWriter#NAME_TYPE}, {@link ClassWriter#FIELD},
- * {@link ClassWriter#METH}, {@link ClassWriter#IMETH}.
- *
- * Special Item types are used for Items that are stored in the ClassWriter
- * {@link ClassWriter#typeTable}, instead of the constant pool, in order to
- * avoid clashes with normal constant pool items in the ClassWriter constant
- * pool's hash table. These special item types are
- * {@link ClassWriter#TYPE_NORMAL}, {@link ClassWriter#TYPE_UNINIT} and
- * {@link ClassWriter#TYPE_MERGED}.
- */
- int type;
-
- /**
- * Value of this item, for an integer item.
- */
- int intVal;
-
- /**
- * Value of this item, for a long item.
- */
- long longVal;
-
- /**
- * First part of the value of this item, for items that do not hold a
- * primitive value.
- */
- String strVal1;
-
- /**
- * Second part of the value of this item, for items that do not hold a
- * primitive value.
- */
- String strVal2;
-
- /**
- * Third part of the value of this item, for items that do not hold a
- * primitive value.
- */
- String strVal3;
-
- /**
- * The hash code value of this constant pool item.
- */
- int hashCode;
-
- /**
- * Link to another constant pool item, used for collision lists in the
- * constant pool's hash table.
- */
- Item next;
-
- /**
- * Constructs an uninitialized {@link Item}.
- */
- Item() {
- }
-
- /**
- * Constructs an uninitialized {@link Item} for constant pool element at
- * given position.
- *
- * @param index index of the item to be constructed.
- */
- Item(final int index) {
- this.index = index;
- }
-
- /**
- * Constructs a copy of the given item.
- *
- * @param index index of the item to be constructed.
- * @param i the item that must be copied into the item to be constructed.
- */
- Item(final int index, final Item i) {
- this.index = index;
- type = i.type;
- intVal = i.intVal;
- longVal = i.longVal;
- strVal1 = i.strVal1;
- strVal2 = i.strVal2;
- strVal3 = i.strVal3;
- hashCode = i.hashCode;
- }
-
- /**
- * Sets this item to an integer item.
- *
- * @param intVal the value of this item.
- */
- void set(final int intVal) {
- this.type = ClassWriter.INT;
- this.intVal = intVal;
- this.hashCode = 0x7FFFFFFF & (type + intVal);
- }
-
- /**
- * Sets this item to a long item.
- *
- * @param longVal the value of this item.
- */
- void set(final long longVal) {
- this.type = ClassWriter.LONG;
- this.longVal = longVal;
- this.hashCode = 0x7FFFFFFF & (type + (int) longVal);
- }
-
- /**
- * Sets this item to a float item.
- *
- * @param floatVal the value of this item.
- */
- void set(final float floatVal) {
- this.type = ClassWriter.FLOAT;
- this.intVal = Float.floatToRawIntBits(floatVal);
- this.hashCode = 0x7FFFFFFF & (type + (int) floatVal);
- }
-
- /**
- * Sets this item to a double item.
- *
- * @param doubleVal the value of this item.
- */
- void set(final double doubleVal) {
- this.type = ClassWriter.DOUBLE;
- this.longVal = Double.doubleToRawLongBits(doubleVal);
- this.hashCode = 0x7FFFFFFF & (type + (int) doubleVal);
- }
-
- /**
- * Sets this item to an item that do not hold a primitive value.
- *
- * @param type the type of this item.
- * @param strVal1 first part of the value of this item.
- * @param strVal2 second part of the value of this item.
- * @param strVal3 third part of the value of this item.
- */
- void set(
- final int type,
- final String strVal1,
- final String strVal2,
- final String strVal3)
- {
- this.type = type;
- this.strVal1 = strVal1;
- this.strVal2 = strVal2;
- this.strVal3 = strVal3;
- switch (type) {
- case ClassWriter.UTF8:
- case ClassWriter.STR:
- case ClassWriter.CLASS:
- case ClassWriter.TYPE_NORMAL:
- hashCode = 0x7FFFFFFF & (type + strVal1.hashCode());
- return;
- case ClassWriter.NAME_TYPE:
- hashCode = 0x7FFFFFFF & (type + strVal1.hashCode()
- * strVal2.hashCode());
- return;
- // ClassWriter.FIELD:
- // ClassWriter.METH:
- // ClassWriter.IMETH:
- default:
- hashCode = 0x7FFFFFFF & (type + strVal1.hashCode()
- * strVal2.hashCode() * strVal3.hashCode());
- }
- }
-
- /**
- * Indicates if the given item is equal to this one.
- *
- * @param i the item to be compared to this one.
- * @return <tt>true</tt> if the given item if equal to this one,
- * <tt>false</tt> otherwise.
- */
- boolean isEqualTo(final Item i) {
- if (i.type == type) {
- switch (type) {
- case ClassWriter.INT:
- case ClassWriter.FLOAT:
- return i.intVal == intVal;
- case ClassWriter.TYPE_MERGED:
- case ClassWriter.LONG:
- case ClassWriter.DOUBLE:
- return i.longVal == longVal;
- case ClassWriter.UTF8:
- case ClassWriter.STR:
- case ClassWriter.CLASS:
- case ClassWriter.TYPE_NORMAL:
- return i.strVal1.equals(strVal1);
- case ClassWriter.TYPE_UNINIT:
- return i.intVal == intVal && i.strVal1.equals(strVal1);
- case ClassWriter.NAME_TYPE:
- return i.strVal1.equals(strVal1)
- && i.strVal2.equals(strVal2);
- // ClassWriter.FIELD:
- // ClassWriter.METH:
- // ClassWriter.IMETH:
- default:
- return i.strVal1.equals(strVal1)
- && i.strVal2.equals(strVal2)
- && i.strVal3.equals(strVal3);
- }
- }
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Label.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Label.java
deleted file mode 100644
index bee7068d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Label.java
+++ /dev/null
@@ -1,556 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * A label represents a position in the bytecode of a method. Labels are used
- * for jump, goto, and switch instructions, and for try catch blocks.
- *
- * @author Eric Bruneton
- */
-public class Label {
-
- /**
- * Indicates if this label is only used for debug attributes. Such a label
- * is not the start of a basic block, the target of a jump instruction, or
- * an exception handler. It can be safely ignored in control flow graph
- * analysis algorithms (for optimization purposes).
- */
- static final int DEBUG = 1;
-
- /**
- * Indicates if the position of this label is known.
- */
- static final int RESOLVED = 2;
-
- /**
- * Indicates if this label has been updated, after instruction resizing.
- */
- static final int RESIZED = 4;
-
- /**
- * Indicates if this basic block has been pushed in the basic block stack.
- * See {@link MethodWriter#visitMaxs visitMaxs}.
- */
- static final int PUSHED = 8;
-
- /**
- * Indicates if this label is the target of a jump instruction, or the start
- * of an exception handler.
- */
- static final int TARGET = 16;
-
- /**
- * Indicates if a stack map frame must be stored for this label.
- */
- static final int STORE = 32;
-
- /**
- * Indicates if this label corresponds to a reachable basic block.
- */
- static final int REACHABLE = 64;
-
- /**
- * Indicates if this basic block ends with a JSR instruction.
- */
- static final int JSR = 128;
-
- /**
- * Indicates if this basic block ends with a RET instruction.
- */
- static final int RET = 256;
-
- /**
- * Indicates if this basic block is the start of a subroutine.
- */
- static final int SUBROUTINE = 512;
-
- /**
- * Indicates if this subroutine basic block has been visited.
- */
- static final int VISITED = 1024;
-
- /**
- * Field used to associate user information to a label. Warning: this field
- * is used by the ASM tree package. In order to use it with the ASM tree
- * package you must override the {@link
- * com.sun.xml.internal.ws.org.objectweb.asm.tree.MethodNode#getLabelNode} method.
- */
- public Object info;
-
- /**
- * Flags that indicate the status of this label.
- *
- * @see #DEBUG
- * @see #RESOLVED
- * @see #RESIZED
- * @see #PUSHED
- * @see #TARGET
- * @see #STORE
- * @see #REACHABLE
- * @see #JSR
- * @see #RET
- */
- int status;
-
- /**
- * The line number corresponding to this label, if known.
- */
- int line;
-
- /**
- * The position of this label in the code, if known.
- */
- int position;
-
- /**
- * Number of forward references to this label, times two.
- */
- private int referenceCount;
-
- /**
- * Informations about forward references. Each forward reference is
- * described by two consecutive integers in this array: the first one is the
- * position of the first byte of the bytecode instruction that contains the
- * forward reference, while the second is the position of the first byte of
- * the forward reference itself. In fact the sign of the first integer
- * indicates if this reference uses 2 or 4 bytes, and its absolute value
- * gives the position of the bytecode instruction. This array is also used
- * as a bitset to store the subroutines to which a basic block belongs. This
- * information is needed in {@linked MethodWriter#visitMaxs}, after all
- * forward references have been resolved. Hence the same array can be used
- * for both purposes without problems.
- */
- private int[] srcAndRefPositions;
-
- // ------------------------------------------------------------------------
-
- /*
- * Fields for the control flow and data flow graph analysis algorithms (used
- * to compute the maximum stack size or the stack map frames). A control
- * flow graph contains one node per "basic block", and one edge per "jump"
- * from one basic block to another. Each node (i.e., each basic block) is
- * represented by the Label object that corresponds to the first instruction
- * of this basic block. Each node also stores the list of its successors in
- * the graph, as a linked list of Edge objects.
- *
- * The control flow analysis algorithms used to compute the maximum stack
- * size or the stack map frames are similar and use two steps. The first
- * step, during the visit of each instruction, builds information about the
- * state of the local variables and the operand stack at the end of each
- * basic block, called the "output frame", <i>relatively</i> to the frame
- * state at the beginning of the basic block, which is called the "input
- * frame", and which is <i>unknown</i> during this step. The second step,
- * in {@link MethodWriter#visitMaxs}, is a fix point algorithm that
- * computes information about the input frame of each basic block, from the
- * input state of the first basic block (known from the method signature),
- * and by the using the previously computed relative output frames.
- *
- * The algorithm used to compute the maximum stack size only computes the
- * relative output and absolute input stack heights, while the algorithm
- * used to compute stack map frames computes relative output frames and
- * absolute input frames.
- */
-
- /**
- * Start of the output stack relatively to the input stack. The exact
- * semantics of this field depends on the algorithm that is used.
- *
- * When only the maximum stack size is computed, this field is the number of
- * elements in the input stack.
- *
- * When the stack map frames are completely computed, this field is the
- * offset of the first output stack element relatively to the top of the
- * input stack. This offset is always negative or null. A null offset means
- * that the output stack must be appended to the input stack. A -n offset
- * means that the first n output stack elements must replace the top n input
- * stack elements, and that the other elements must be appended to the input
- * stack.
- */
- int inputStackTop;
-
- /**
- * Maximum height reached by the output stack, relatively to the top of the
- * input stack. This maximum is always positive or null.
- */
- int outputStackMax;
-
- /**
- * Information about the input and output stack map frames of this basic
- * block. This field is only used when {@link ClassWriter#COMPUTE_FRAMES}
- * option is used.
- */
- Frame frame;
-
- /**
- * The successor of this label, in the order they are visited. This linked
- * list does not include labels used for debug info only. If
- * {@link ClassWriter#COMPUTE_FRAMES} option is used then, in addition, it
- * does not contain successive labels that denote the same bytecode position
- * (in this case only the first label appears in this list).
- */
- Label successor;
-
- /**
- * The successors of this node in the control flow graph. These successors
- * are stored in a linked list of {@link Edge Edge} objects, linked to each
- * other by their {@link Edge#next} field.
- */
- Edge successors;
-
- /**
- * The next basic block in the basic block stack. This stack is used in the
- * main loop of the fix point algorithm used in the second step of the
- * control flow analysis algorithms.
- *
- * @see MethodWriter#visitMaxs
- */
- Label next;
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
-
- /**
- * Constructs a new label.
- */
- public Label() {
- }
-
- // ------------------------------------------------------------------------
- // Methods to compute offsets and to manage forward references
- // ------------------------------------------------------------------------
-
- /**
- * Returns the offset corresponding to this label. This offset is computed
- * from the start of the method's bytecode. <i>This method is intended for
- * {@link Attribute} sub classes, and is normally not needed by class
- * generators or adapters.</i>
- *
- * @return the offset corresponding to this label.
- * @throws IllegalStateException if this label is not resolved yet.
- */
- public int getOffset() {
- if ((status & RESOLVED) == 0) {
- throw new IllegalStateException("Label offset position has not been resolved yet");
- }
- return position;
- }
-
- /**
- * Puts a reference to this label in the bytecode of a method. If the
- * position of the label is known, the offset is computed and written
- * directly. Otherwise, a null offset is written and a new forward reference
- * is declared for this label.
- *
- * @param owner the code writer that calls this method.
- * @param out the bytecode of the method.
- * @param source the position of first byte of the bytecode instruction that
- * contains this label.
- * @param wideOffset <tt>true</tt> if the reference must be stored in 4
- * bytes, or <tt>false</tt> if it must be stored with 2 bytes.
- * @throws IllegalArgumentException if this label has not been created by
- * the given code writer.
- */
- void put(
- final MethodWriter owner,
- final ByteVector out,
- final int source,
- final boolean wideOffset)
- {
- if ((status & RESOLVED) == 0) {
- if (wideOffset) {
- addReference(-1 - source, out.length);
- out.putInt(-1);
- } else {
- addReference(source, out.length);
- out.putShort(-1);
- }
- } else {
- if (wideOffset) {
- out.putInt(position - source);
- } else {
- out.putShort(position - source);
- }
- }
- }
-
- /**
- * Adds a forward reference to this label. This method must be called only
- * for a true forward reference, i.e. only if this label is not resolved
- * yet. For backward references, the offset of the reference can be, and
- * must be, computed and stored directly.
- *
- * @param sourcePosition the position of the referencing instruction. This
- * position will be used to compute the offset of this forward
- * reference.
- * @param referencePosition the position where the offset for this forward
- * reference must be stored.
- */
- private void addReference(
- final int sourcePosition,
- final int referencePosition)
- {
- if (srcAndRefPositions == null) {
- srcAndRefPositions = new int[6];
- }
- if (referenceCount >= srcAndRefPositions.length) {
- int[] a = new int[srcAndRefPositions.length + 6];
- System.arraycopy(srcAndRefPositions,
- 0,
- a,
- 0,
- srcAndRefPositions.length);
- srcAndRefPositions = a;
- }
- srcAndRefPositions[referenceCount++] = sourcePosition;
- srcAndRefPositions[referenceCount++] = referencePosition;
- }
-
- /**
- * Resolves all forward references to this label. This method must be called
- * when this label is added to the bytecode of the method, i.e. when its
- * position becomes known. This method fills in the blanks that where left
- * in the bytecode by each forward reference previously added to this label.
- *
- * @param owner the code writer that calls this method.
- * @param position the position of this label in the bytecode.
- * @param data the bytecode of the method.
- * @return <tt>true</tt> if a blank that was left for this label was to
- * small to store the offset. In such a case the corresponding jump
- * instruction is replaced with a pseudo instruction (using unused
- * opcodes) using an unsigned two bytes offset. These pseudo
- * instructions will need to be replaced with true instructions with
- * wider offsets (4 bytes instead of 2). This is done in
- * {@link MethodWriter#resizeInstructions}.
- * @throws IllegalArgumentException if this label has already been resolved,
- * or if it has not been created by the given code writer.
- */
- boolean resolve(
- final MethodWriter owner,
- final int position,
- final byte[] data)
- {
- boolean needUpdate = false;
- this.status |= RESOLVED;
- this.position = position;
- int i = 0;
- while (i < referenceCount) {
- int source = srcAndRefPositions[i++];
- int reference = srcAndRefPositions[i++];
- int offset;
- if (source >= 0) {
- offset = position - source;
- if (offset < Short.MIN_VALUE || offset > Short.MAX_VALUE) {
- /*
- * changes the opcode of the jump instruction, in order to
- * be able to find it later (see resizeInstructions in
- * MethodWriter). These temporary opcodes are similar to
- * jump instruction opcodes, except that the 2 bytes offset
- * is unsigned (and can therefore represent values from 0 to
- * 65535, which is sufficient since the size of a method is
- * limited to 65535 bytes).
- */
- int opcode = data[reference - 1] & 0xFF;
- if (opcode <= Opcodes.JSR) {
- // changes IFEQ ... JSR to opcodes 202 to 217
- data[reference - 1] = (byte) (opcode + 49);
- } else {
- // changes IFNULL and IFNONNULL to opcodes 218 and 219
- data[reference - 1] = (byte) (opcode + 20);
- }
- needUpdate = true;
- }
- data[reference++] = (byte) (offset >>> 8);
- data[reference] = (byte) offset;
- } else {
- offset = position + source + 1;
- data[reference++] = (byte) (offset >>> 24);
- data[reference++] = (byte) (offset >>> 16);
- data[reference++] = (byte) (offset >>> 8);
- data[reference] = (byte) offset;
- }
- }
- return needUpdate;
- }
-
- /**
- * Returns the first label of the series to which this label belongs. For an
- * isolated label or for the first label in a series of successive labels,
- * this method returns the label itself. For other labels it returns the
- * first label of the series.
- *
- * @return the first label of the series to which this label belongs.
- */
- Label getFirst() {
- return !ClassReader.FRAMES || frame == null ? this : frame.owner;
- }
-
- // ------------------------------------------------------------------------
- // Methods related to subroutines
- // ------------------------------------------------------------------------
-
- /**
- * Returns true is this basic block belongs to the given subroutine.
- *
- * @param id a subroutine id.
- * @return true is this basic block belongs to the given subroutine.
- */
- boolean inSubroutine(final long id) {
- if ((status & Label.VISITED) != 0) {
- return (srcAndRefPositions[(int) (id >>> 32)] & (int) id) != 0;
- }
- return false;
- }
-
- /**
- * Returns true if this basic block and the given one belong to a common
- * subroutine.
- *
- * @param block another basic block.
- * @return true if this basic block and the given one belong to a common
- * subroutine.
- */
- boolean inSameSubroutine(final Label block) {
- for (int i = 0; i < srcAndRefPositions.length; ++i) {
- if ((srcAndRefPositions[i] & block.srcAndRefPositions[i]) != 0) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Marks this basic block as belonging to the given subroutine.
- *
- * @param id a subroutine id.
- * @param nbSubroutines the total number of subroutines in the method.
- */
- void addToSubroutine(final long id, final int nbSubroutines) {
- if ((status & VISITED) == 0) {
- status |= VISITED;
- srcAndRefPositions = new int[(nbSubroutines - 1) / 32 + 1];
- }
- srcAndRefPositions[(int) (id >>> 32)] |= (int) id;
- }
-
- /**
- * Finds the basic blocks that belong to a given subroutine, and marks these
- * blocks as belonging to this subroutine. This recursive method follows the
- * control flow graph to find all the blocks that are reachable from the
- * current block WITHOUT following any JSR target.
- *
- * @param JSR a JSR block that jumps to this subroutine. If this JSR is not
- * null it is added to the successor of the RET blocks found in the
- * subroutine.
- * @param id the id of this subroutine.
- * @param nbSubroutines the total number of subroutines in the method.
- */
- void visitSubroutine(final Label JSR, final long id, final int nbSubroutines)
- {
- if (JSR != null) {
- if ((status & VISITED) != 0) {
- return;
- }
- status |= VISITED;
- // adds JSR to the successors of this block, if it is a RET block
- if ((status & RET) != 0) {
- if (!inSameSubroutine(JSR)) {
- Edge e = new Edge();
- e.info = inputStackTop;
- e.successor = JSR.successors.successor;
- e.next = successors;
- successors = e;
- }
- }
- } else {
- // if this block already belongs to subroutine 'id', returns
- if (inSubroutine(id)) {
- return;
- }
- // marks this block as belonging to subroutine 'id'
- addToSubroutine(id, nbSubroutines);
- }
- // calls this method recursively on each successor, except JSR targets
- Edge e = successors;
- while (e != null) {
- // if this block is a JSR block, then 'successors.next' leads
- // to the JSR target (see {@link #visitJumpInsn}) and must therefore
- // not be followed
- if ((status & Label.JSR) == 0 || e != successors.next) {
- e.successor.visitSubroutine(JSR, id, nbSubroutines);
- }
- e = e.next;
- }
- }
-
- // ------------------------------------------------------------------------
- // Overriden Object methods
- // ------------------------------------------------------------------------
-
- /**
- * Returns a string representation of this label.
- *
- * @return a string representation of this label.
- */
- public String toString() {
- return "L" + System.identityHashCode(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodAdapter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodAdapter.java
deleted file mode 100644
index 2e61b0cd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodAdapter.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * An empty {@link MethodVisitor} that delegates to another
- * {@link MethodVisitor}. This class can be used as a super class to quickly
- * implement usefull method adapter classes, just by overriding the necessary
- * methods.
- *
- * @author Eric Bruneton
- */
-public class MethodAdapter implements MethodVisitor {
-
- /**
- * The {@link MethodVisitor} to which this adapter delegates calls.
- */
- protected MethodVisitor mv;
-
- /**
- * Constructs a new {@link MethodAdapter} object.
- *
- * @param mv the code visitor to which this adapter must delegate calls.
- */
- public MethodAdapter(final MethodVisitor mv) {
- this.mv = mv;
- }
-
- public AnnotationVisitor visitAnnotationDefault() {
- return mv.visitAnnotationDefault();
- }
-
- public AnnotationVisitor visitAnnotation(
- final String desc,
- final boolean visible)
- {
- return mv.visitAnnotation(desc, visible);
- }
-
- public AnnotationVisitor visitParameterAnnotation(
- final int parameter,
- final String desc,
- final boolean visible)
- {
- return mv.visitParameterAnnotation(parameter, desc, visible);
- }
-
- public void visitAttribute(final Attribute attr) {
- mv.visitAttribute(attr);
- }
-
- public void visitCode() {
- mv.visitCode();
- }
-
- public void visitFrame(
- final int type,
- final int nLocal,
- final Object[] local,
- final int nStack,
- final Object[] stack)
- {
- mv.visitFrame(type, nLocal, local, nStack, stack);
- }
-
- public void visitInsn(final int opcode) {
- mv.visitInsn(opcode);
- }
-
- public void visitIntInsn(final int opcode, final int operand) {
- mv.visitIntInsn(opcode, operand);
- }
-
- public void visitVarInsn(final int opcode, final int var) {
- mv.visitVarInsn(opcode, var);
- }
-
- public void visitTypeInsn(final int opcode, final String type) {
- mv.visitTypeInsn(opcode, type);
- }
-
- public void visitFieldInsn(
- final int opcode,
- final String owner,
- final String name,
- final String desc)
- {
- mv.visitFieldInsn(opcode, owner, name, desc);
- }
-
- public void visitMethodInsn(
- final int opcode,
- final String owner,
- final String name,
- final String desc)
- {
- mv.visitMethodInsn(opcode, owner, name, desc);
- }
-
- public void visitJumpInsn(final int opcode, final Label label) {
- mv.visitJumpInsn(opcode, label);
- }
-
- public void visitLabel(final Label label) {
- mv.visitLabel(label);
- }
-
- public void visitLdcInsn(final Object cst) {
- mv.visitLdcInsn(cst);
- }
-
- public void visitIincInsn(final int var, final int increment) {
- mv.visitIincInsn(var, increment);
- }
-
- public void visitTableSwitchInsn(
- final int min,
- final int max,
- final Label dflt,
- final Label[] labels)
- {
- mv.visitTableSwitchInsn(min, max, dflt, labels);
- }
-
- public void visitLookupSwitchInsn(
- final Label dflt,
- final int[] keys,
- final Label[] labels)
- {
- mv.visitLookupSwitchInsn(dflt, keys, labels);
- }
-
- public void visitMultiANewArrayInsn(final String desc, final int dims) {
- mv.visitMultiANewArrayInsn(desc, dims);
- }
-
- public void visitTryCatchBlock(
- final Label start,
- final Label end,
- final Label handler,
- final String type)
- {
- mv.visitTryCatchBlock(start, end, handler, type);
- }
-
- public void visitLocalVariable(
- final String name,
- final String desc,
- final String signature,
- final Label start,
- final Label end,
- final int index)
- {
- mv.visitLocalVariable(name, desc, signature, start, end, index);
- }
-
- public void visitLineNumber(final int line, final Label start) {
- mv.visitLineNumber(line, start);
- }
-
- public void visitMaxs(final int maxStack, final int maxLocals) {
- mv.visitMaxs(maxStack, maxLocals);
- }
-
- public void visitEnd() {
- mv.visitEnd();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodVisitor.java
deleted file mode 100644
index 8bbe7142..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodVisitor.java
+++ /dev/null
@@ -1,425 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * A visitor to visit a Java method. The methods of this interface must be
- * called in the following order: [ <tt>visitAnnotationDefault</tt> ] (
- * <tt>visitAnnotation</tt> | <tt>visitParameterAnnotation</tt> |
- * <tt>visitAttribute</tt> )* [ <tt>visitCode</tt> ( <tt>visitFrame</tt> |
- * <tt>visit</tt><i>X</i>Insn</tt> | <tt>visitLabel</tt> | <tt>visitTryCatchBlock</tt> |
- * <tt>visitLocalVariable</tt> | <tt>visitLineNumber</tt>)* <tt>visitMaxs</tt> ]
- * <tt>visitEnd</tt>. In addition, the <tt>visit</tt><i>X</i>Insn</tt>
- * and <tt>visitLabel</tt> methods must be called in the sequential order of
- * the bytecode instructions of the visited code, <tt>visitTryCatchBlock</tt>
- * must be called <i>before</i> the labels passed as arguments have been
- * visited, and the <tt>visitLocalVariable</tt> and <tt>visitLineNumber</tt>
- * methods must be called <i>after</i> the labels passed as arguments have been
- * visited.
- *
- * @author Eric Bruneton
- */
-public interface MethodVisitor {
-
- // -------------------------------------------------------------------------
- // Annotations and non standard attributes
- // -------------------------------------------------------------------------
-
- /**
- * Visits the default value of this annotation interface method.
- *
- * @return a visitor to the visit the actual default value of this
- * annotation interface method, or <tt>null</tt> if this visitor
- * is not interested in visiting this default value. The 'name'
- * parameters passed to the methods of this annotation visitor are
- * ignored. Moreover, exacly one visit method must be called on this
- * annotation visitor, followed by visitEnd.
- */
- AnnotationVisitor visitAnnotationDefault();
-
- /**
- * Visits an annotation of this method.
- *
- * @param desc the class descriptor of the annotation class.
- * @param visible <tt>true</tt> if the annotation is visible at runtime.
- * @return a visitor to visit the annotation values, or <tt>null</tt> if
- * this visitor is not interested in visiting this annotation.
- */
- AnnotationVisitor visitAnnotation(String desc, boolean visible);
-
- /**
- * Visits an annotation of a parameter this method.
- *
- * @param parameter the parameter index.
- * @param desc the class descriptor of the annotation class.
- * @param visible <tt>true</tt> if the annotation is visible at runtime.
- * @return a visitor to visit the annotation values, or <tt>null</tt> if
- * this visitor is not interested in visiting this annotation.
- */
- AnnotationVisitor visitParameterAnnotation(
- int parameter,
- String desc,
- boolean visible);
-
- /**
- * Visits a non standard attribute of this method.
- *
- * @param attr an attribute.
- */
- void visitAttribute(Attribute attr);
-
- /**
- * Starts the visit of the method's code, if any (i.e. non abstract method).
- */
- void visitCode();
-
- /**
- * Visits the current state of the local variables and operand stack
- * elements. This method must(*) be called <i>just before</i> any
- * instruction <b>i</b> that follows an unconditionnal branch instruction
- * such as GOTO or THROW, that is the target of a jump instruction, or that
- * starts an exception handler block. The visited types must describe the
- * values of the local variables and of the operand stack elements <i>just
- * before</i> <b>i</b> is executed. <br> <br> (*) this is mandatory only
- * for classes whose version is greater than or equal to
- * {@link Opcodes#V1_6 V1_6}. <br> <br> Packed frames are basically
- * "deltas" from the state of the previous frame (very first frame is
- * implicitly defined by the method's parameters and access flags): <ul>
- * <li>{@link Opcodes#F_SAME} representing frame with exactly the same
- * locals as the previous frame and with the empty stack.</li> <li>{@link Opcodes#F_SAME1}
- * representing frame with exactly the same locals as the previous frame and
- * with single value on the stack (<code>nStack</code> is 1 and
- * <code>stack[0]</code> contains value for the type of the stack item).</li>
- * <li>{@link Opcodes#F_APPEND} representing frame with current locals are
- * the same as the locals in the previous frame, except that additional
- * locals are defined (<code>nLocal</code> is 1, 2 or 3 and
- * <code>local</code> elements contains values representing added types).</li>
- * <li>{@link Opcodes#F_CHOP} representing frame with current locals are
- * the same as the locals in the previous frame, except that the last 1-3
- * locals are absent and with the empty stack (<code>nLocals</code> is 1,
- * 2 or 3). </li> <li>{@link Opcodes#F_FULL} representing complete frame
- * data.</li> </li> </ul>
- *
- * @param type the type of this stack map frame. Must be
- * {@link Opcodes#F_NEW} for expanded frames, or
- * {@link Opcodes#F_FULL}, {@link Opcodes#F_APPEND},
- * {@link Opcodes#F_CHOP}, {@link Opcodes#F_SAME} or
- * {@link Opcodes#F_APPEND}, {@link Opcodes#F_SAME1} for compressed
- * frames.
- * @param nLocal the number of local variables in the visited frame.
- * @param local the local variable types in this frame. This array must not
- * be modified. Primitive types are represented by
- * {@link Opcodes#TOP}, {@link Opcodes#INTEGER},
- * {@link Opcodes#FLOAT}, {@link Opcodes#LONG},
- * {@link Opcodes#DOUBLE},{@link Opcodes#NULL} or
- * {@link Opcodes#UNINITIALIZED_THIS} (long and double are
- * represented by a single element). Reference types are represented
- * by String objects (representing internal names), and uninitialized
- * types by Label objects (this label designates the NEW instruction
- * that created this uninitialized value).
- * @param nStack the number of operand stack elements in the visited frame.
- * @param stack the operand stack types in this frame. This array must not
- * be modified. Its content has the same format as the "local" array.
- */
- void visitFrame(
- int type,
- int nLocal,
- Object[] local,
- int nStack,
- Object[] stack);
-
- // -------------------------------------------------------------------------
- // Normal instructions
- // -------------------------------------------------------------------------
-
- /**
- * Visits a zero operand instruction.
- *
- * @param opcode the opcode of the instruction to be visited. This opcode is
- * either NOP, ACONST_NULL, ICONST_M1, ICONST_0, ICONST_1, ICONST_2,
- * ICONST_3, ICONST_4, ICONST_5, LCONST_0, LCONST_1, FCONST_0,
- * FCONST_1, FCONST_2, DCONST_0, DCONST_1, IALOAD, LALOAD, FALOAD,
- * DALOAD, AALOAD, BALOAD, CALOAD, SALOAD, IASTORE, LASTORE, FASTORE,
- * DASTORE, AASTORE, BASTORE, CASTORE, SASTORE, POP, POP2, DUP,
- * DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, SWAP, IADD, LADD, FADD,
- * DADD, ISUB, LSUB, FSUB, DSUB, IMUL, LMUL, FMUL, DMUL, IDIV, LDIV,
- * FDIV, DDIV, IREM, LREM, FREM, DREM, INEG, LNEG, FNEG, DNEG, ISHL,
- * LSHL, ISHR, LSHR, IUSHR, LUSHR, IAND, LAND, IOR, LOR, IXOR, LXOR,
- * I2L, I2F, I2D, L2I, L2F, L2D, F2I, F2L, F2D, D2I, D2L, D2F, I2B,
- * I2C, I2S, LCMP, FCMPL, FCMPG, DCMPL, DCMPG, IRETURN, LRETURN,
- * FRETURN, DRETURN, ARETURN, RETURN, ARRAYLENGTH, ATHROW,
- * MONITORENTER, or MONITOREXIT.
- */
- void visitInsn(int opcode);
-
- /**
- * Visits an instruction with a single int operand.
- *
- * @param opcode the opcode of the instruction to be visited. This opcode is
- * either BIPUSH, SIPUSH or NEWARRAY.
- * @param operand the operand of the instruction to be visited.<br> When
- * opcode is BIPUSH, operand value should be between Byte.MIN_VALUE
- * and Byte.MAX_VALUE.<br> When opcode is SIPUSH, operand value
- * should be between Short.MIN_VALUE and Short.MAX_VALUE.<br> When
- * opcode is NEWARRAY, operand value should be one of
- * {@link Opcodes#T_BOOLEAN}, {@link Opcodes#T_CHAR},
- * {@link Opcodes#T_FLOAT}, {@link Opcodes#T_DOUBLE},
- * {@link Opcodes#T_BYTE}, {@link Opcodes#T_SHORT},
- * {@link Opcodes#T_INT} or {@link Opcodes#T_LONG}.
- */
- void visitIntInsn(int opcode, int operand);
-
- /**
- * Visits a local variable instruction. A local variable instruction is an
- * instruction that loads or stores the value of a local variable.
- *
- * @param opcode the opcode of the local variable instruction to be visited.
- * This opcode is either ILOAD, LLOAD, FLOAD, DLOAD, ALOAD, ISTORE,
- * LSTORE, FSTORE, DSTORE, ASTORE or RET.
- * @param var the operand of the instruction to be visited. This operand is
- * the index of a local variable.
- */
- void visitVarInsn(int opcode, int var);
-
- /**
- * Visits a type instruction. A type instruction is an instruction that
- * takes the internal name of a class as parameter.
- *
- * @param opcode the opcode of the type instruction to be visited. This
- * opcode is either NEW, ANEWARRAY, CHECKCAST or INSTANCEOF.
- * @param type the operand of the instruction to be visited. This operand
- * must be the internal name of an object or array class (see {@link
- * Type#getInternalName() getInternalName}).
- */
- void visitTypeInsn(int opcode, String type);
-
- /**
- * Visits a field instruction. A field instruction is an instruction that
- * loads or stores the value of a field of an object.
- *
- * @param opcode the opcode of the type instruction to be visited. This
- * opcode is either GETSTATIC, PUTSTATIC, GETFIELD or PUTFIELD.
- * @param owner the internal name of the field's owner class (see {@link
- * Type#getInternalName() getInternalName}).
- * @param name the field's name.
- * @param desc the field's descriptor (see {@link Type Type}).
- */
- void visitFieldInsn(int opcode, String owner, String name, String desc);
-
- /**
- * Visits a method instruction. A method instruction is an instruction that
- * invokes a method.
- *
- * @param opcode the opcode of the type instruction to be visited. This
- * opcode is either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or
- * INVOKEINTERFACE.
- * @param owner the internal name of the method's owner class (see {@link
- * Type#getInternalName() getInternalName}).
- * @param name the method's name.
- * @param desc the method's descriptor (see {@link Type Type}).
- */
- void visitMethodInsn(int opcode, String owner, String name, String desc);
-
- /**
- * Visits a jump instruction. A jump instruction is an instruction that may
- * jump to another instruction.
- *
- * @param opcode the opcode of the type instruction to be visited. This
- * opcode is either IFEQ, IFNE, IFLT, IFGE, IFGT, IFLE, IF_ICMPEQ,
- * IF_ICMPNE, IF_ICMPLT, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ACMPEQ,
- * IF_ACMPNE, GOTO, JSR, IFNULL or IFNONNULL.
- * @param label the operand of the instruction to be visited. This operand
- * is a label that designates the instruction to which the jump
- * instruction may jump.
- */
- void visitJumpInsn(int opcode, Label label);
-
- /**
- * Visits a label. A label designates the instruction that will be visited
- * just after it.
- *
- * @param label a {@link Label Label} object.
- */
- void visitLabel(Label label);
-
- // -------------------------------------------------------------------------
- // Special instructions
- // -------------------------------------------------------------------------
-
- /**
- * Visits a LDC instruction.
- *
- * @param cst the constant to be loaded on the stack. This parameter must be
- * a non null {@link Integer}, a {@link Float}, a {@link Long}, a
- * {@link Double} a {@link String} (or a {@link Type} for
- * <tt>.class</tt> constants, for classes whose version is 49.0 or
- * more).
- */
- void visitLdcInsn(Object cst);
-
- /**
- * Visits an IINC instruction.
- *
- * @param var index of the local variable to be incremented.
- * @param increment amount to increment the local variable by.
- */
- void visitIincInsn(int var, int increment);
-
- /**
- * Visits a TABLESWITCH instruction.
- *
- * @param min the minimum key value.
- * @param max the maximum key value.
- * @param dflt beginning of the default handler block.
- * @param labels beginnings of the handler blocks. <tt>labels[i]</tt> is
- * the beginning of the handler block for the <tt>min + i</tt> key.
- */
- void visitTableSwitchInsn(int min, int max, Label dflt, Label[] labels);
-
- /**
- * Visits a LOOKUPSWITCH instruction.
- *
- * @param dflt beginning of the default handler block.
- * @param keys the values of the keys.
- * @param labels beginnings of the handler blocks. <tt>labels[i]</tt> is
- * the beginning of the handler block for the <tt>keys[i]</tt> key.
- */
- void visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels);
-
- /**
- * Visits a MULTIANEWARRAY instruction.
- *
- * @param desc an array type descriptor (see {@link Type Type}).
- * @param dims number of dimensions of the array to allocate.
- */
- void visitMultiANewArrayInsn(String desc, int dims);
-
- // -------------------------------------------------------------------------
- // Exceptions table entries, debug information, max stack and max locals
- // -------------------------------------------------------------------------
-
- /**
- * Visits a try catch block.
- *
- * @param start beginning of the exception handler's scope (inclusive).
- * @param end end of the exception handler's scope (exclusive).
- * @param handler beginning of the exception handler's code.
- * @param type internal name of the type of exceptions handled by the
- * handler, or <tt>null</tt> to catch any exceptions (for "finally"
- * blocks).
- * @throws IllegalArgumentException if one of the labels has already been
- * visited by this visitor (by the {@link #visitLabel visitLabel}
- * method).
- */
- void visitTryCatchBlock(Label start, Label end, Label handler, String type);
-
- /**
- * Visits a local variable declaration.
- *
- * @param name the name of a local variable.
- * @param desc the type descriptor of this local variable.
- * @param signature the type signature of this local variable. May be
- * <tt>null</tt> if the local variable type does not use generic
- * types.
- * @param start the first instruction corresponding to the scope of this
- * local variable (inclusive).
- * @param end the last instruction corresponding to the scope of this local
- * variable (exclusive).
- * @param index the local variable's index.
- * @throws IllegalArgumentException if one of the labels has not already
- * been visited by this visitor (by the
- * {@link #visitLabel visitLabel} method).
- */
- void visitLocalVariable(
- String name,
- String desc,
- String signature,
- Label start,
- Label end,
- int index);
-
- /**
- * Visits a line number declaration.
- *
- * @param line a line number. This number refers to the source file from
- * which the class was compiled.
- * @param start the first instruction corresponding to this line number.
- * @throws IllegalArgumentException if <tt>start</tt> has not already been
- * visited by this visitor (by the {@link #visitLabel visitLabel}
- * method).
- */
- void visitLineNumber(int line, Label start);
-
- /**
- * Visits the maximum stack size and the maximum number of local variables
- * of the method.
- *
- * @param maxStack maximum stack size of the method.
- * @param maxLocals maximum number of local variables for the method.
- */
- void visitMaxs(int maxStack, int maxLocals);
-
- /**
- * Visits the end of the method. This method, which is the last one to be
- * called, is used to inform the visitor that all the annotations and
- * attributes of the method have been visited.
- */
- void visitEnd();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodWriter.java
deleted file mode 100644
index feddb77a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodWriter.java
+++ /dev/null
@@ -1,2631 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * A {@link MethodVisitor} that generates methods in bytecode form. Each visit
- * method of this class appends the bytecode corresponding to the visited
- * instruction to a byte vector, in the order these methods are called.
- *
- * @author Eric Bruneton
- * @author Eugene Kuleshov
- */
-class MethodWriter implements MethodVisitor {
-
- /**
- * Pseudo access flag used to denote constructors.
- */
- static final int ACC_CONSTRUCTOR = 262144;
-
- /**
- * Frame has exactly the same locals as the previous stack map frame and
- * number of stack items is zero.
- */
- static final int SAME_FRAME = 0; // to 63 (0-3f)
-
- /**
- * Frame has exactly the same locals as the previous stack map frame and
- * number of stack items is 1
- */
- static final int SAME_LOCALS_1_STACK_ITEM_FRAME = 64; // to 127 (40-7f)
-
- /**
- * Reserved for future use
- */
- static final int RESERVED = 128;
-
- /**
- * Frame has exactly the same locals as the previous stack map frame and
- * number of stack items is 1. Offset is bigger then 63;
- */
- static final int SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED = 247; // f7
-
- /**
- * Frame where current locals are the same as the locals in the previous
- * frame, except that the k last locals are absent. The value of k is given
- * by the formula 251-frame_type.
- */
- static final int CHOP_FRAME = 248; // to 250 (f8-fA)
-
- /**
- * Frame has exactly the same locals as the previous stack map frame and
- * number of stack items is zero. Offset is bigger then 63;
- */
- static final int SAME_FRAME_EXTENDED = 251; // fb
-
- /**
- * Frame where current locals are the same as the locals in the previous
- * frame, except that k additional locals are defined. The value of k is
- * given by the formula frame_type-251.
- */
- static final int APPEND_FRAME = 252; // to 254 // fc-fe
-
- /**
- * Full frame
- */
- static final int FULL_FRAME = 255; // ff
-
- /**
- * Indicates that the stack map frames must be recomputed from scratch. In
- * this case the maximum stack size and number of local variables is also
- * recomputed from scratch.
- *
- * @see #compute
- */
- private static final int FRAMES = 0;
-
- /**
- * Indicates that the maximum stack size and number of local variables must
- * be automatically computed.
- *
- * @see #compute
- */
- private static final int MAXS = 1;
-
- /**
- * Indicates that nothing must be automatically computed.
- *
- * @see #compute
- */
- private static final int NOTHING = 2;
-
- /**
- * Next method writer (see {@link ClassWriter#firstMethod firstMethod}).
- */
- MethodWriter next;
-
- /**
- * The class writer to which this method must be added.
- */
- final ClassWriter cw;
-
- /**
- * Access flags of this method.
- */
- private int access;
-
- /**
- * The index of the constant pool item that contains the name of this
- * method.
- */
- private final int name;
-
- /**
- * The index of the constant pool item that contains the descriptor of this
- * method.
- */
- private final int desc;
-
- /**
- * The descriptor of this method.
- */
- private final String descriptor;
-
- /**
- * The signature of this method.
- */
- String signature;
-
- /**
- * If not zero, indicates that the code of this method must be copied from
- * the ClassReader associated to this writer in <code>cw.cr</code>. More
- * precisely, this field gives the index of the first byte to copied from
- * <code>cw.cr.b</code>.
- */
- int classReaderOffset;
-
- /**
- * If not zero, indicates that the code of this method must be copied from
- * the ClassReader associated to this writer in <code>cw.cr</code>. More
- * precisely, this field gives the number of bytes to copied from
- * <code>cw.cr.b</code>.
- */
- int classReaderLength;
-
- /**
- * Number of exceptions that can be thrown by this method.
- */
- int exceptionCount;
-
- /**
- * The exceptions that can be thrown by this method. More precisely, this
- * array contains the indexes of the constant pool items that contain the
- * internal names of these exception classes.
- */
- int[] exceptions;
-
- /**
- * The annotation default attribute of this method. May be <tt>null</tt>.
- */
- private ByteVector annd;
-
- /**
- * The runtime visible annotations of this method. May be <tt>null</tt>.
- */
- private AnnotationWriter anns;
-
- /**
- * The runtime invisible annotations of this method. May be <tt>null</tt>.
- */
- private AnnotationWriter ianns;
-
- /**
- * The runtime visible parameter annotations of this method. May be
- * <tt>null</tt>.
- */
- private AnnotationWriter[] panns;
-
- /**
- * The runtime invisible parameter annotations of this method. May be
- * <tt>null</tt>.
- */
- private AnnotationWriter[] ipanns;
-
- /**
- * The number of synthetic parameters of this method.
- */
- private int synthetics;
-
- /**
- * The non standard attributes of the method.
- */
- private Attribute attrs;
-
- /**
- * The bytecode of this method.
- */
- private ByteVector code = new ByteVector();
-
- /**
- * Maximum stack size of this method.
- */
- private int maxStack;
-
- /**
- * Maximum number of local variables for this method.
- */
- private int maxLocals;
-
- /**
- * Number of stack map frames in the StackMapTable attribute.
- */
- private int frameCount;
-
- /**
- * The StackMapTable attribute.
- */
- private ByteVector stackMap;
-
- /**
- * The offset of the last frame that was written in the StackMapTable
- * attribute.
- */
- private int previousFrameOffset;
-
- /**
- * The last frame that was written in the StackMapTable attribute.
- *
- * @see #frame
- */
- private int[] previousFrame;
-
- /**
- * Index of the next element to be added in {@link #frame}.
- */
- private int frameIndex;
-
- /**
- * The current stack map frame. The first element contains the offset of the
- * instruction to which the frame corresponds, the second element is the
- * number of locals and the third one is the number of stack elements. The
- * local variables start at index 3 and are followed by the operand stack
- * values. In summary frame[0] = offset, frame[1] = nLocal, frame[2] =
- * nStack, frame[3] = nLocal. All types are encoded as integers, with the
- * same format as the one used in {@link Label}, but limited to BASE types.
- */
- private int[] frame;
-
- /**
- * Number of elements in the exception handler list.
- */
- private int handlerCount;
-
- /**
- * The first element in the exception handler list.
- */
- private Handler firstHandler;
-
- /**
- * The last element in the exception handler list.
- */
- private Handler lastHandler;
-
- /**
- * Number of entries in the LocalVariableTable attribute.
- */
- private int localVarCount;
-
- /**
- * The LocalVariableTable attribute.
- */
- private ByteVector localVar;
-
- /**
- * Number of entries in the LocalVariableTypeTable attribute.
- */
- private int localVarTypeCount;
-
- /**
- * The LocalVariableTypeTable attribute.
- */
- private ByteVector localVarType;
-
- /**
- * Number of entries in the LineNumberTable attribute.
- */
- private int lineNumberCount;
-
- /**
- * The LineNumberTable attribute.
- */
- private ByteVector lineNumber;
-
- /**
- * The non standard attributes of the method's code.
- */
- private Attribute cattrs;
-
- /**
- * Indicates if some jump instructions are too small and need to be resized.
- */
- private boolean resize;
-
- /**
- * The number of subroutines in this method.
- */
- private int subroutines;
-
- // ------------------------------------------------------------------------
-
- /*
- * Fields for the control flow graph analysis algorithm (used to compute the
- * maximum stack size). A control flow graph contains one node per "basic
- * block", and one edge per "jump" from one basic block to another. Each
- * node (i.e., each basic block) is represented by the Label object that
- * corresponds to the first instruction of this basic block. Each node also
- * stores the list of its successors in the graph, as a linked list of Edge
- * objects.
- */
-
- /**
- * Indicates what must be automatically computed.
- *
- * @see #FRAMES
- * @see #MAXS
- * @see #NOTHING
- */
- private final int compute;
-
- /**
- * A list of labels. This list is the list of basic blocks in the method,
- * i.e. a list of Label objects linked to each other by their
- * {@link Label#successor} field, in the order they are visited by
- * {@link MethodVisitor#visitLabel}, and starting with the first basic block.
- */
- private Label labels;
-
- /**
- * The previous basic block.
- */
- private Label previousBlock;
-
- /**
- * The current basic block.
- */
- private Label currentBlock;
-
- /**
- * The (relative) stack size after the last visited instruction. This size
- * is relative to the beginning of the current basic block, i.e., the true
- * stack size after the last visited instruction is equal to the
- * {@link Label#inputStackTop beginStackSize} of the current basic block
- * plus <tt>stackSize</tt>.
- */
- private int stackSize;
-
- /**
- * The (relative) maximum stack size after the last visited instruction.
- * This size is relative to the beginning of the current basic block, i.e.,
- * the true maximum stack size after the last visited instruction is equal
- * to the {@link Label#inputStackTop beginStackSize} of the current basic
- * block plus <tt>stackSize</tt>.
- */
- private int maxStackSize;
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
-
- /**
- * Constructs a new {@link MethodWriter}.
- *
- * @param cw the class writer in which the method must be added.
- * @param access the method's access flags (see {@link Opcodes}).
- * @param name the method's name.
- * @param desc the method's descriptor (see {@link Type}).
- * @param signature the method's signature. May be <tt>null</tt>.
- * @param exceptions the internal names of the method's exceptions. May be
- * <tt>null</tt>.
- * @param computeMaxs <tt>true</tt> if the maximum stack size and number
- * of local variables must be automatically computed.
- * @param computeFrames <tt>true</tt> if the stack map tables must be
- * recomputed from scratch.
- */
- MethodWriter(
- final ClassWriter cw,
- final int access,
- final String name,
- final String desc,
- final String signature,
- final String[] exceptions,
- final boolean computeMaxs,
- final boolean computeFrames)
- {
- if (cw.firstMethod == null) {
- cw.firstMethod = this;
- } else {
- cw.lastMethod.next = this;
- }
- cw.lastMethod = this;
- this.cw = cw;
- this.access = access;
- this.name = cw.newUTF8(name);
- this.desc = cw.newUTF8(desc);
- this.descriptor = desc;
- if (ClassReader.SIGNATURES) {
- this.signature = signature;
- }
- if (exceptions != null && exceptions.length > 0) {
- exceptionCount = exceptions.length;
- this.exceptions = new int[exceptionCount];
- for (int i = 0; i < exceptionCount; ++i) {
- this.exceptions[i] = cw.newClass(exceptions[i]);
- }
- }
- this.compute = computeFrames ? FRAMES : (computeMaxs ? MAXS : NOTHING);
- if (computeMaxs || computeFrames) {
- if (computeFrames && "<init>".equals(name)) {
- this.access |= ACC_CONSTRUCTOR;
- }
- // updates maxLocals
- int size = getArgumentsAndReturnSizes(descriptor) >> 2;
- if ((access & Opcodes.ACC_STATIC) != 0) {
- --size;
- }
- maxLocals = size;
- // creates and visits the label for the first basic block
- labels = new Label();
- labels.status |= Label.PUSHED;
- visitLabel(labels);
- }
- }
-
- // ------------------------------------------------------------------------
- // Implementation of the MethodVisitor interface
- // ------------------------------------------------------------------------
-
- public AnnotationVisitor visitAnnotationDefault() {
- if (!ClassReader.ANNOTATIONS) {
- return null;
- }
- annd = new ByteVector();
- return new AnnotationWriter(cw, false, annd, null, 0);
- }
-
- public AnnotationVisitor visitAnnotation(
- final String desc,
- final boolean visible)
- {
- if (!ClassReader.ANNOTATIONS) {
- return null;
- }
- ByteVector bv = new ByteVector();
- // write type, and reserve space for values count
- bv.putShort(cw.newUTF8(desc)).putShort(0);
- AnnotationWriter aw = new AnnotationWriter(cw, true, bv, bv, 2);
- if (visible) {
- aw.next = anns;
- anns = aw;
- } else {
- aw.next = ianns;
- ianns = aw;
- }
- return aw;
- }
-
- public AnnotationVisitor visitParameterAnnotation(
- final int parameter,
- final String desc,
- final boolean visible)
- {
- if (!ClassReader.ANNOTATIONS) {
- return null;
- }
- ByteVector bv = new ByteVector();
- if ("Ljava/lang/Synthetic;".equals(desc)) {
- // workaround for a bug in javac with synthetic parameters
- // see ClassReader.readParameterAnnotations
- synthetics = Math.max(synthetics, parameter + 1);
- return new AnnotationWriter(cw, false, bv, null, 0);
- }
- // write type, and reserve space for values count
- bv.putShort(cw.newUTF8(desc)).putShort(0);
- AnnotationWriter aw = new AnnotationWriter(cw, true, bv, bv, 2);
- if (visible) {
- if (panns == null) {
- panns = new AnnotationWriter[Type.getArgumentTypes(descriptor).length];
- }
- aw.next = panns[parameter];
- panns[parameter] = aw;
- } else {
- if (ipanns == null) {
- ipanns = new AnnotationWriter[Type.getArgumentTypes(descriptor).length];
- }
- aw.next = ipanns[parameter];
- ipanns[parameter] = aw;
- }
- return aw;
- }
-
- public void visitAttribute(final Attribute attr) {
- if (attr.isCodeAttribute()) {
- attr.next = cattrs;
- cattrs = attr;
- } else {
- attr.next = attrs;
- attrs = attr;
- }
- }
-
- public void visitCode() {
- }
-
- public void visitFrame(
- final int type,
- final int nLocal,
- final Object[] local,
- final int nStack,
- final Object[] stack)
- {
- if (!ClassReader.FRAMES || compute == FRAMES) {
- return;
- }
-
- if (type == Opcodes.F_NEW) {
- startFrame(code.length, nLocal, nStack);
- for (int i = 0; i < nLocal; ++i) {
- if (local[i] instanceof String) {
- frame[frameIndex++] = Frame.OBJECT
- | cw.addType((String) local[i]);
- } else if (local[i] instanceof Integer) {
- frame[frameIndex++] = ((Integer) local[i]).intValue();
- } else {
- frame[frameIndex++] = Frame.UNINITIALIZED
- | cw.addUninitializedType("",
- ((Label) local[i]).position);
- }
- }
- for (int i = 0; i < nStack; ++i) {
- if (stack[i] instanceof String) {
- frame[frameIndex++] = Frame.OBJECT
- | cw.addType((String) stack[i]);
- } else if (stack[i] instanceof Integer) {
- frame[frameIndex++] = ((Integer) stack[i]).intValue();
- } else {
- frame[frameIndex++] = Frame.UNINITIALIZED
- | cw.addUninitializedType("",
- ((Label) stack[i]).position);
- }
- }
- endFrame();
- } else {
- int delta;
- if (stackMap == null) {
- stackMap = new ByteVector();
- delta = code.length;
- } else {
- delta = code.length - previousFrameOffset - 1;
- }
-
- switch (type) {
- case Opcodes.F_FULL:
- stackMap.putByte(FULL_FRAME)
- .putShort(delta)
- .putShort(nLocal);
- for (int i = 0; i < nLocal; ++i) {
- writeFrameType(local[i]);
- }
- stackMap.putShort(nStack);
- for (int i = 0; i < nStack; ++i) {
- writeFrameType(stack[i]);
- }
- break;
- case Opcodes.F_APPEND:
- stackMap.putByte(SAME_FRAME_EXTENDED + nLocal)
- .putShort(delta);
- for (int i = 0; i < nLocal; ++i) {
- writeFrameType(local[i]);
- }
- break;
- case Opcodes.F_CHOP:
- stackMap.putByte(SAME_FRAME_EXTENDED - nLocal)
- .putShort(delta);
- break;
- case Opcodes.F_SAME:
- if (delta < 64) {
- stackMap.putByte(delta);
- } else {
- stackMap.putByte(SAME_FRAME_EXTENDED).putShort(delta);
- }
- break;
- case Opcodes.F_SAME1:
- if (delta < 64) {
- stackMap.putByte(SAME_LOCALS_1_STACK_ITEM_FRAME + delta);
- } else {
- stackMap.putByte(SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED)
- .putShort(delta);
- }
- writeFrameType(stack[0]);
- break;
- }
-
- previousFrameOffset = code.length;
- ++frameCount;
- }
- }
-
- public void visitInsn(final int opcode) {
- // adds the instruction to the bytecode of the method
- code.putByte(opcode);
- // update currentBlock
- // Label currentBlock = this.currentBlock;
- if (currentBlock != null) {
- if (compute == FRAMES) {
- currentBlock.frame.execute(opcode, 0, null, null);
- } else {
- // updates current and max stack sizes
- int size = stackSize + Frame.SIZE[opcode];
- if (size > maxStackSize) {
- maxStackSize = size;
- }
- stackSize = size;
- }
- // if opcode == ATHROW or xRETURN, ends current block (no successor)
- if ((opcode >= Opcodes.IRETURN && opcode <= Opcodes.RETURN)
- || opcode == Opcodes.ATHROW)
- {
- noSuccessor();
- }
- }
- }
-
- public void visitIntInsn(final int opcode, final int operand) {
- // Label currentBlock = this.currentBlock;
- if (currentBlock != null) {
- if (compute == FRAMES) {
- currentBlock.frame.execute(opcode, operand, null, null);
- } else if (opcode != Opcodes.NEWARRAY) {
- // updates current and max stack sizes only for NEWARRAY
- // (stack size variation = 0 for BIPUSH or SIPUSH)
- int size = stackSize + 1;
- if (size > maxStackSize) {
- maxStackSize = size;
- }
- stackSize = size;
- }
- }
- // adds the instruction to the bytecode of the method
- if (opcode == Opcodes.SIPUSH) {
- code.put12(opcode, operand);
- } else { // BIPUSH or NEWARRAY
- code.put11(opcode, operand);
- }
- }
-
- public void visitVarInsn(final int opcode, final int var) {
- // Label currentBlock = this.currentBlock;
- if (currentBlock != null) {
- if (compute == FRAMES) {
- currentBlock.frame.execute(opcode, var, null, null);
- } else {
- // updates current and max stack sizes
- if (opcode == Opcodes.RET) {
- // no stack change, but end of current block (no successor)
- currentBlock.status |= Label.RET;
- // save 'stackSize' here for future use
- // (see {@link #findSubroutineSuccessors})
- currentBlock.inputStackTop = stackSize;
- noSuccessor();
- } else { // xLOAD or xSTORE
- int size = stackSize + Frame.SIZE[opcode];
- if (size > maxStackSize) {
- maxStackSize = size;
- }
- stackSize = size;
- }
- }
- }
- if (compute != NOTHING) {
- // updates max locals
- int n;
- if (opcode == Opcodes.LLOAD || opcode == Opcodes.DLOAD
- || opcode == Opcodes.LSTORE || opcode == Opcodes.DSTORE)
- {
- n = var + 2;
- } else {
- n = var + 1;
- }
- if (n > maxLocals) {
- maxLocals = n;
- }
- }
- // adds the instruction to the bytecode of the method
- if (var < 4 && opcode != Opcodes.RET) {
- int opt;
- if (opcode < Opcodes.ISTORE) {
- /* ILOAD_0 */
- opt = 26 + ((opcode - Opcodes.ILOAD) << 2) + var;
- } else {
- /* ISTORE_0 */
- opt = 59 + ((opcode - Opcodes.ISTORE) << 2) + var;
- }
- code.putByte(opt);
- } else if (var >= 256) {
- code.putByte(196 /* WIDE */).put12(opcode, var);
- } else {
- code.put11(opcode, var);
- }
- if (opcode >= Opcodes.ISTORE && compute == FRAMES && handlerCount > 0) {
- visitLabel(new Label());
- }
- }
-
- public void visitTypeInsn(final int opcode, final String type) {
- Item i = cw.newClassItem(type);
- // Label currentBlock = this.currentBlock;
- if (currentBlock != null) {
- if (compute == FRAMES) {
- currentBlock.frame.execute(opcode, code.length, cw, i);
- } else if (opcode == Opcodes.NEW) {
- // updates current and max stack sizes only if opcode == NEW
- // (no stack change for ANEWARRAY, CHECKCAST, INSTANCEOF)
- int size = stackSize + 1;
- if (size > maxStackSize) {
- maxStackSize = size;
- }
- stackSize = size;
- }
- }
- // adds the instruction to the bytecode of the method
- code.put12(opcode, i.index);
- }
-
- public void visitFieldInsn(
- final int opcode,
- final String owner,
- final String name,
- final String desc)
- {
- Item i = cw.newFieldItem(owner, name, desc);
- // Label currentBlock = this.currentBlock;
- if (currentBlock != null) {
- if (compute == FRAMES) {
- currentBlock.frame.execute(opcode, 0, cw, i);
- } else {
- int size;
- // computes the stack size variation
- char c = desc.charAt(0);
- switch (opcode) {
- case Opcodes.GETSTATIC:
- size = stackSize + (c == 'D' || c == 'J' ? 2 : 1);
- break;
- case Opcodes.PUTSTATIC:
- size = stackSize + (c == 'D' || c == 'J' ? -2 : -1);
- break;
- case Opcodes.GETFIELD:
- size = stackSize + (c == 'D' || c == 'J' ? 1 : 0);
- break;
- // case Constants.PUTFIELD:
- default:
- size = stackSize + (c == 'D' || c == 'J' ? -3 : -2);
- break;
- }
- // updates current and max stack sizes
- if (size > maxStackSize) {
- maxStackSize = size;
- }
- stackSize = size;
- }
- }
- // adds the instruction to the bytecode of the method
- code.put12(opcode, i.index);
- }
-
- public void visitMethodInsn(
- final int opcode,
- final String owner,
- final String name,
- final String desc)
- {
- boolean itf = opcode == Opcodes.INVOKEINTERFACE;
- Item i = cw.newMethodItem(owner, name, desc, itf);
- int argSize = i.intVal;
- // Label currentBlock = this.currentBlock;
- if (currentBlock != null) {
- if (compute == FRAMES) {
- currentBlock.frame.execute(opcode, 0, cw, i);
- } else {
- /*
- * computes the stack size variation. In order not to recompute
- * several times this variation for the same Item, we use the
- * intVal field of this item to store this variation, once it
- * has been computed. More precisely this intVal field stores
- * the sizes of the arguments and of the return value
- * corresponding to desc.
- */
- if (argSize == 0) {
- // the above sizes have not been computed yet,
- // so we compute them...
- argSize = getArgumentsAndReturnSizes(desc);
- // ... and we save them in order
- // not to recompute them in the future
- i.intVal = argSize;
- }
- int size;
- if (opcode == Opcodes.INVOKESTATIC) {
- size = stackSize - (argSize >> 2) + (argSize & 0x03) + 1;
- } else {
- size = stackSize - (argSize >> 2) + (argSize & 0x03);
- }
- // updates current and max stack sizes
- if (size > maxStackSize) {
- maxStackSize = size;
- }
- stackSize = size;
- }
- }
- // adds the instruction to the bytecode of the method
- if (itf) {
- if (argSize == 0) {
- argSize = getArgumentsAndReturnSizes(desc);
- i.intVal = argSize;
- }
- code.put12(Opcodes.INVOKEINTERFACE, i.index).put11(argSize >> 2, 0);
- } else {
- code.put12(opcode, i.index);
- }
- }
-
- public void visitJumpInsn(final int opcode, final Label label) {
- Label nextInsn = null;
- // Label currentBlock = this.currentBlock;
- if (currentBlock != null) {
- if (compute == FRAMES) {
- currentBlock.frame.execute(opcode, 0, null, null);
- // 'label' is the target of a jump instruction
- label.getFirst().status |= Label.TARGET;
- // adds 'label' as a successor of this basic block
- addSuccessor(Edge.NORMAL, label);
- if (opcode != Opcodes.GOTO) {
- // creates a Label for the next basic block
- nextInsn = new Label();
- }
- } else {
- if (opcode == Opcodes.JSR) {
- if ((label.status & Label.SUBROUTINE) == 0) {
- label.status |= Label.SUBROUTINE;
- ++subroutines;
- }
- currentBlock.status |= Label.JSR;
- addSuccessor(stackSize + 1, label);
- // creates a Label for the next basic block
- nextInsn = new Label();
- /*
- * note that, by construction in this method, a JSR block
- * has at least two successors in the control flow graph:
- * the first one leads the next instruction after the JSR,
- * while the second one leads to the JSR target.
- */
- } else {
- // updates current stack size (max stack size unchanged
- // because stack size variation always negative in this
- // case)
- stackSize += Frame.SIZE[opcode];
- addSuccessor(stackSize, label);
- }
- }
- }
- // adds the instruction to the bytecode of the method
- if ((label.status & Label.RESOLVED) != 0
- && label.position - code.length < Short.MIN_VALUE)
- {
- /*
- * case of a backward jump with an offset < -32768. In this case we
- * automatically replace GOTO with GOTO_W, JSR with JSR_W and IFxxx
- * <l> with IFNOTxxx <l'> GOTO_W <l>, where IFNOTxxx is the
- * "opposite" opcode of IFxxx (i.e., IFNE for IFEQ) and where <l'>
- * designates the instruction just after the GOTO_W.
- */
- if (opcode == Opcodes.GOTO) {
- code.putByte(200); // GOTO_W
- } else if (opcode == Opcodes.JSR) {
- code.putByte(201); // JSR_W
- } else {
- // if the IF instruction is transformed into IFNOT GOTO_W the
- // next instruction becomes the target of the IFNOT instruction
- if (nextInsn != null) {
- nextInsn.status |= Label.TARGET;
- }
- code.putByte(opcode <= 166
- ? ((opcode + 1) ^ 1) - 1
- : opcode ^ 1);
- code.putShort(8); // jump offset
- code.putByte(200); // GOTO_W
- }
- label.put(this, code, code.length - 1, true);
- } else {
- /*
- * case of a backward jump with an offset >= -32768, or of a forward
- * jump with, of course, an unknown offset. In these cases we store
- * the offset in 2 bytes (which will be increased in
- * resizeInstructions, if needed).
- */
- code.putByte(opcode);
- label.put(this, code, code.length - 1, false);
- }
- if (currentBlock != null) {
- if (nextInsn != null) {
- // if the jump instruction is not a GOTO, the next instruction
- // is also a successor of this instruction. Calling visitLabel
- // adds the label of this next instruction as a successor of the
- // current block, and starts a new basic block
- visitLabel(nextInsn);
- }
- if (opcode == Opcodes.GOTO) {
- noSuccessor();
- }
- }
- }
-
- public void visitLabel(final Label label) {
- // resolves previous forward references to label, if any
- resize |= label.resolve(this, code.length, code.data);
- // updates currentBlock
- if ((label.status & Label.DEBUG) != 0) {
- return;
- }
- if (compute == FRAMES) {
- if (currentBlock != null) {
- if (label.position == currentBlock.position) {
- // successive labels, do not start a new basic block
- currentBlock.status |= (label.status & Label.TARGET);
- label.frame = currentBlock.frame;
- return;
- }
- // ends current block (with one new successor)
- addSuccessor(Edge.NORMAL, label);
- }
- // begins a new current block
- currentBlock = label;
- if (label.frame == null) {
- label.frame = new Frame();
- label.frame.owner = label;
- }
- // updates the basic block list
- if (previousBlock != null) {
- if (label.position == previousBlock.position) {
- previousBlock.status |= (label.status & Label.TARGET);
- label.frame = previousBlock.frame;
- currentBlock = previousBlock;
- return;
- }
- previousBlock.successor = label;
- }
- previousBlock = label;
- } else if (compute == MAXS) {
- if (currentBlock != null) {
- // ends current block (with one new successor)
- currentBlock.outputStackMax = maxStackSize;
- addSuccessor(stackSize, label);
- }
- // begins a new current block
- currentBlock = label;
- // resets the relative current and max stack sizes
- stackSize = 0;
- maxStackSize = 0;
- // updates the basic block list
- if (previousBlock != null) {
- previousBlock.successor = label;
- }
- previousBlock = label;
- }
- }
-
- public void visitLdcInsn(final Object cst) {
- Item i = cw.newConstItem(cst);
- // Label currentBlock = this.currentBlock;
- if (currentBlock != null) {
- if (compute == FRAMES) {
- currentBlock.frame.execute(Opcodes.LDC, 0, cw, i);
- } else {
- int size;
- // computes the stack size variation
- if (i.type == ClassWriter.LONG || i.type == ClassWriter.DOUBLE)
- {
- size = stackSize + 2;
- } else {
- size = stackSize + 1;
- }
- // updates current and max stack sizes
- if (size > maxStackSize) {
- maxStackSize = size;
- }
- stackSize = size;
- }
- }
- // adds the instruction to the bytecode of the method
- int index = i.index;
- if (i.type == ClassWriter.LONG || i.type == ClassWriter.DOUBLE) {
- code.put12(20 /* LDC2_W */, index);
- } else if (index >= 256) {
- code.put12(19 /* LDC_W */, index);
- } else {
- code.put11(Opcodes.LDC, index);
- }
- }
-
- public void visitIincInsn(final int var, final int increment) {
- if (currentBlock != null) {
- if (compute == FRAMES) {
- currentBlock.frame.execute(Opcodes.IINC, var, null, null);
- }
- }
- if (compute != NOTHING) {
- // updates max locals
- int n = var + 1;
- if (n > maxLocals) {
- maxLocals = n;
- }
- }
- // adds the instruction to the bytecode of the method
- if ((var > 255) || (increment > 127) || (increment < -128)) {
- code.putByte(196 /* WIDE */)
- .put12(Opcodes.IINC, var)
- .putShort(increment);
- } else {
- code.putByte(Opcodes.IINC).put11(var, increment);
- }
- }
-
- public void visitTableSwitchInsn(
- final int min,
- final int max,
- final Label dflt,
- final Label[] labels)
- {
- // adds the instruction to the bytecode of the method
- int source = code.length;
- code.putByte(Opcodes.TABLESWITCH);
- code.length += (4 - code.length % 4) % 4;
- dflt.put(this, code, source, true);
- code.putInt(min).putInt(max);
- for (int i = 0; i < labels.length; ++i) {
- labels[i].put(this, code, source, true);
- }
- // updates currentBlock
- visitSwitchInsn(dflt, labels);
- }
-
- public void visitLookupSwitchInsn(
- final Label dflt,
- final int[] keys,
- final Label[] labels)
- {
- // adds the instruction to the bytecode of the method
- int source = code.length;
- code.putByte(Opcodes.LOOKUPSWITCH);
- code.length += (4 - code.length % 4) % 4;
- dflt.put(this, code, source, true);
- code.putInt(labels.length);
- for (int i = 0; i < labels.length; ++i) {
- code.putInt(keys[i]);
- labels[i].put(this, code, source, true);
- }
- // updates currentBlock
- visitSwitchInsn(dflt, labels);
- }
-
- private void visitSwitchInsn(final Label dflt, final Label[] labels) {
- // Label currentBlock = this.currentBlock;
- if (currentBlock != null) {
- if (compute == FRAMES) {
- currentBlock.frame.execute(Opcodes.LOOKUPSWITCH, 0, null, null);
- // adds current block successors
- addSuccessor(Edge.NORMAL, dflt);
- dflt.getFirst().status |= Label.TARGET;
- for (int i = 0; i < labels.length; ++i) {
- addSuccessor(Edge.NORMAL, labels[i]);
- labels[i].getFirst().status |= Label.TARGET;
- }
- } else {
- // updates current stack size (max stack size unchanged)
- --stackSize;
- // adds current block successors
- addSuccessor(stackSize, dflt);
- for (int i = 0; i < labels.length; ++i) {
- addSuccessor(stackSize, labels[i]);
- }
- }
- // ends current block
- noSuccessor();
- }
- }
-
- public void visitMultiANewArrayInsn(final String desc, final int dims) {
- Item i = cw.newClassItem(desc);
- // Label currentBlock = this.currentBlock;
- if (currentBlock != null) {
- if (compute == FRAMES) {
- currentBlock.frame.execute(Opcodes.MULTIANEWARRAY, dims, cw, i);
- } else {
- // updates current stack size (max stack size unchanged because
- // stack size variation always negative or null)
- stackSize += 1 - dims;
- }
- }
- // adds the instruction to the bytecode of the method
- code.put12(Opcodes.MULTIANEWARRAY, i.index).putByte(dims);
- }
-
- public void visitTryCatchBlock(
- final Label start,
- final Label end,
- final Label handler,
- final String type)
- {
- ++handlerCount;
- Handler h = new Handler();
- h.start = start;
- h.end = end;
- h.handler = handler;
- h.desc = type;
- h.type = type != null ? cw.newClass(type) : 0;
- if (lastHandler == null) {
- firstHandler = h;
- } else {
- lastHandler.next = h;
- }
- lastHandler = h;
- }
-
- public void visitLocalVariable(
- final String name,
- final String desc,
- final String signature,
- final Label start,
- final Label end,
- final int index)
- {
- if (signature != null) {
- if (localVarType == null) {
- localVarType = new ByteVector();
- }
- ++localVarTypeCount;
- localVarType.putShort(start.position)
- .putShort(end.position - start.position)
- .putShort(cw.newUTF8(name))
- .putShort(cw.newUTF8(signature))
- .putShort(index);
- }
- if (localVar == null) {
- localVar = new ByteVector();
- }
- ++localVarCount;
- localVar.putShort(start.position)
- .putShort(end.position - start.position)
- .putShort(cw.newUTF8(name))
- .putShort(cw.newUTF8(desc))
- .putShort(index);
- if (compute != NOTHING) {
- // updates max locals
- char c = desc.charAt(0);
- int n = index + (c == 'J' || c == 'D' ? 2 : 1);
- if (n > maxLocals) {
- maxLocals = n;
- }
- }
- }
-
- public void visitLineNumber(final int line, final Label start) {
- if (lineNumber == null) {
- lineNumber = new ByteVector();
- }
- ++lineNumberCount;
- lineNumber.putShort(start.position);
- lineNumber.putShort(line);
- }
-
- public void visitMaxs(final int maxStack, final int maxLocals) {
- if (ClassReader.FRAMES && compute == FRAMES) {
- // completes the control flow graph with exception handler blocks
- Handler handler = firstHandler;
- while (handler != null) {
- Label l = handler.start.getFirst();
- Label h = handler.handler.getFirst();
- Label e = handler.end.getFirst();
- // computes the kind of the edges to 'h'
- String t = handler.desc == null
- ? "java/lang/Throwable"
- : handler.desc;
- int kind = Frame.OBJECT | cw.addType(t);
- // h is an exception handler
- h.status |= Label.TARGET;
- // adds 'h' as a successor of labels between 'start' and 'end'
- while (l != e) {
- // creates an edge to 'h'
- Edge b = new Edge();
- b.info = kind;
- b.successor = h;
- // adds it to the successors of 'l'
- b.next = l.successors;
- l.successors = b;
- // goes to the next label
- l = l.successor;
- }
- handler = handler.next;
- }
-
- // creates and visits the first (implicit) frame
- Frame f = labels.frame;
- Type[] args = Type.getArgumentTypes(descriptor);
- f.initInputFrame(cw, access, args, this.maxLocals);
- visitFrame(f);
-
- /*
- * fix point algorithm: mark the first basic block as 'changed'
- * (i.e. put it in the 'changed' list) and, while there are changed
- * basic blocks, choose one, mark it as unchanged, and update its
- * successors (which can be changed in the process).
- */
- int max = 0;
- Label changed = labels;
- while (changed != null) {
- // removes a basic block from the list of changed basic blocks
- Label l = changed;
- changed = changed.next;
- l.next = null;
- f = l.frame;
- // a reacheable jump target must be stored in the stack map
- if ((l.status & Label.TARGET) != 0) {
- l.status |= Label.STORE;
- }
- // all visited labels are reacheable, by definition
- l.status |= Label.REACHABLE;
- // updates the (absolute) maximum stack size
- int blockMax = f.inputStack.length + l.outputStackMax;
- if (blockMax > max) {
- max = blockMax;
- }
- // updates the successors of the current basic block
- Edge e = l.successors;
- while (e != null) {
- Label n = e.successor.getFirst();
- boolean change = f.merge(cw, n.frame, e.info);
- if (change && n.next == null) {
- // if n has changed and is not already in the 'changed'
- // list, adds it to this list
- n.next = changed;
- changed = n;
- }
- e = e.next;
- }
- }
- this.maxStack = max;
-
- // visits all the frames that must be stored in the stack map
- Label l = labels;
- while (l != null) {
- f = l.frame;
- if ((l.status & Label.STORE) != 0) {
- visitFrame(f);
- }
- if ((l.status & Label.REACHABLE) == 0) {
- // finds start and end of dead basic block
- Label k = l.successor;
- int start = l.position;
- int end = (k == null ? code.length : k.position) - 1;
- // if non empty basic block
- if (end >= start) {
- // replaces instructions with NOP ... NOP ATHROW
- for (int i = start; i < end; ++i) {
- code.data[i] = Opcodes.NOP;
- }
- code.data[end] = (byte) Opcodes.ATHROW;
- // emits a frame for this unreachable block
- startFrame(start, 0, 1);
- frame[frameIndex++] = Frame.OBJECT
- | cw.addType("java/lang/Throwable");
- endFrame();
- }
- }
- l = l.successor;
- }
- } else if (compute == MAXS) {
- // completes the control flow graph with exception handler blocks
- Handler handler = firstHandler;
- while (handler != null) {
- Label l = handler.start;
- Label h = handler.handler;
- Label e = handler.end;
- // adds 'h' as a successor of labels between 'start' and 'end'
- while (l != e) {
- // creates an edge to 'h'
- Edge b = new Edge();
- b.info = Edge.EXCEPTION;
- b.successor = h;
- // adds it to the successors of 'l'
- if ((l.status & Label.JSR) == 0) {
- b.next = l.successors;
- l.successors = b;
- } else {
- // if l is a JSR block, adds b after the first two edges
- // to preserve the hypothesis about JSR block successors
- // order (see {@link #visitJumpInsn})
- b.next = l.successors.next.next;
- l.successors.next.next = b;
- }
- // goes to the next label
- l = l.successor;
- }
- handler = handler.next;
- }
-
- if (subroutines > 0) {
- // completes the control flow graph with the RET successors
- /*
- * first step: finds the subroutines. This step determines, for
- * each basic block, to which subroutine(s) it belongs.
- */
- // finds the basic blocks that belong to the "main" subroutine
- int id = 0;
- labels.visitSubroutine(null, 1, subroutines);
- // finds the basic blocks that belong to the real subroutines
- Label l = labels;
- while (l != null) {
- if ((l.status & Label.JSR) != 0) {
- // the subroutine is defined by l's TARGET, not by l
- Label subroutine = l.successors.next.successor;
- // if this subroutine has not been visited yet...
- if ((subroutine.status & Label.VISITED) == 0) {
- // ...assigns it a new id and finds its basic blocks
- id += 1;
- subroutine.visitSubroutine(null, (id / 32L) << 32
- | (1L << (id % 32)), subroutines);
- }
- }
- l = l.successor;
- }
- // second step: finds the successors of RET blocks
- l = labels;
- while (l != null) {
- if ((l.status & Label.JSR) != 0) {
- Label L = labels;
- while (L != null) {
- L.status &= ~Label.VISITED;
- L = L.successor;
- }
- // the subroutine is defined by l's TARGET, not by l
- Label subroutine = l.successors.next.successor;
- subroutine.visitSubroutine(l, 0, subroutines);
- }
- l = l.successor;
- }
- }
-
- /*
- * control flow analysis algorithm: while the block stack is not
- * empty, pop a block from this stack, update the max stack size,
- * compute the true (non relative) begin stack size of the
- * successors of this block, and push these successors onto the
- * stack (unless they have already been pushed onto the stack).
- * Note: by hypothesis, the {@link Label#inputStackTop} of the
- * blocks in the block stack are the true (non relative) beginning
- * stack sizes of these blocks.
- */
- int max = 0;
- Label stack = labels;
- while (stack != null) {
- // pops a block from the stack
- Label l = stack;
- stack = stack.next;
- // computes the true (non relative) max stack size of this block
- int start = l.inputStackTop;
- int blockMax = start + l.outputStackMax;
- // updates the global max stack size
- if (blockMax > max) {
- max = blockMax;
- }
- // analyzes the successors of the block
- Edge b = l.successors;
- if ((l.status & Label.JSR) != 0) {
- // ignores the first edge of JSR blocks (virtual successor)
- b = b.next;
- }
- while (b != null) {
- l = b.successor;
- // if this successor has not already been pushed...
- if ((l.status & Label.PUSHED) == 0) {
- // computes its true beginning stack size...
- l.inputStackTop = b.info == Edge.EXCEPTION ? 1 : start
- + b.info;
- // ...and pushes it onto the stack
- l.status |= Label.PUSHED;
- l.next = stack;
- stack = l;
- }
- b = b.next;
- }
- }
- this.maxStack = max;
- } else {
- this.maxStack = maxStack;
- this.maxLocals = maxLocals;
- }
- }
-
- public void visitEnd() {
- }
-
- // ------------------------------------------------------------------------
- // Utility methods: control flow analysis algorithm
- // ------------------------------------------------------------------------
-
- /**
- * Computes the size of the arguments and of the return value of a method.
- *
- * @param desc the descriptor of a method.
- * @return the size of the arguments of the method (plus one for the
- * implicit this argument), argSize, and the size of its return
- * value, retSize, packed into a single int i =
- * <tt>(argSize << 2) | retSize</tt> (argSize is therefore equal
- * to <tt>i >> 2</tt>, and retSize to <tt>i & 0x03</tt>).
- */
- static int getArgumentsAndReturnSizes(final String desc) {
- int n = 1;
- int c = 1;
- while (true) {
- char car = desc.charAt(c++);
- if (car == ')') {
- car = desc.charAt(c);
- return n << 2
- | (car == 'V' ? 0 : (car == 'D' || car == 'J' ? 2 : 1));
- } else if (car == 'L') {
- while (desc.charAt(c++) != ';') {
- }
- n += 1;
- } else if (car == '[') {
- while ((car = desc.charAt(c)) == '[') {
- ++c;
- }
- if (car == 'D' || car == 'J') {
- n -= 1;
- }
- } else if (car == 'D' || car == 'J') {
- n += 2;
- } else {
- n += 1;
- }
- }
- }
-
- /**
- * Adds a successor to the {@link #currentBlock currentBlock} block.
- *
- * @param info information about the control flow edge to be added.
- * @param successor the successor block to be added to the current block.
- */
- private void addSuccessor(final int info, final Label successor) {
- // creates and initializes an Edge object...
- Edge b = new Edge();
- b.info = info;
- b.successor = successor;
- // ...and adds it to the successor list of the currentBlock block
- b.next = currentBlock.successors;
- currentBlock.successors = b;
- }
-
- /**
- * Ends the current basic block. This method must be used in the case where
- * the current basic block does not have any successor.
- */
- private void noSuccessor() {
- if (compute == FRAMES) {
- Label l = new Label();
- l.frame = new Frame();
- l.frame.owner = l;
- l.resolve(this, code.length, code.data);
- previousBlock.successor = l;
- previousBlock = l;
- } else {
- currentBlock.outputStackMax = maxStackSize;
- }
- currentBlock = null;
- }
-
- // ------------------------------------------------------------------------
- // Utility methods: stack map frames
- // ------------------------------------------------------------------------
-
- /**
- * Visits a frame that has been computed from scratch.
- *
- * @param f the frame that must be visited.
- */
- private void visitFrame(final Frame f) {
- int i, t;
- int nTop = 0;
- int nLocal = 0;
- int nStack = 0;
- int[] locals = f.inputLocals;
- int[] stacks = f.inputStack;
- // computes the number of locals (ignores TOP types that are just after
- // a LONG or a DOUBLE, and all trailing TOP types)
- for (i = 0; i < locals.length; ++i) {
- t = locals[i];
- if (t == Frame.TOP) {
- ++nTop;
- } else {
- nLocal += nTop + 1;
- nTop = 0;
- }
- if (t == Frame.LONG || t == Frame.DOUBLE) {
- ++i;
- }
- }
- // computes the stack size (ignores TOP types that are just after
- // a LONG or a DOUBLE)
- for (i = 0; i < stacks.length; ++i) {
- t = stacks[i];
- ++nStack;
- if (t == Frame.LONG || t == Frame.DOUBLE) {
- ++i;
- }
- }
- // visits the frame and its content
- startFrame(f.owner.position, nLocal, nStack);
- for (i = 0; nLocal > 0; ++i, --nLocal) {
- t = locals[i];
- frame[frameIndex++] = t;
- if (t == Frame.LONG || t == Frame.DOUBLE) {
- ++i;
- }
- }
- for (i = 0; i < stacks.length; ++i) {
- t = stacks[i];
- frame[frameIndex++] = t;
- if (t == Frame.LONG || t == Frame.DOUBLE) {
- ++i;
- }
- }
- endFrame();
- }
-
- /**
- * Starts the visit of a stack map frame.
- *
- * @param offset the offset of the instruction to which the frame
- * corresponds.
- * @param nLocal the number of local variables in the frame.
- * @param nStack the number of stack elements in the frame.
- */
- private void startFrame(final int offset, final int nLocal, final int nStack)
- {
- int n = 3 + nLocal + nStack;
- if (frame == null || frame.length < n) {
- frame = new int[n];
- }
- frame[0] = offset;
- frame[1] = nLocal;
- frame[2] = nStack;
- frameIndex = 3;
- }
-
- /**
- * Checks if the visit of the current frame {@link #frame} is finished, and
- * if yes, write it in the StackMapTable attribute.
- */
- private void endFrame() {
- if (previousFrame != null) { // do not write the first frame
- if (stackMap == null) {
- stackMap = new ByteVector();
- }
- writeFrame();
- ++frameCount;
- }
- previousFrame = frame;
- frame = null;
- }
-
- /**
- * Compress and writes the current frame {@link #frame} in the StackMapTable
- * attribute.
- */
- private void writeFrame() {
- int clocalsSize = frame[1];
- int cstackSize = frame[2];
- if ((cw.version & 0xFFFF) < Opcodes.V1_6) {
- stackMap.putShort(frame[0]).putShort(clocalsSize);
- writeFrameTypes(3, 3 + clocalsSize);
- stackMap.putShort(cstackSize);
- writeFrameTypes(3 + clocalsSize, 3 + clocalsSize + cstackSize);
- return;
- }
- int localsSize = previousFrame[1];
- int type = FULL_FRAME;
- int k = 0;
- int delta;
- if (frameCount == 0) {
- delta = frame[0];
- } else {
- delta = frame[0] - previousFrame[0] - 1;
- }
- if (cstackSize == 0) {
- k = clocalsSize - localsSize;
- switch (k) {
- case -3:
- case -2:
- case -1:
- type = CHOP_FRAME;
- localsSize = clocalsSize;
- break;
- case 0:
- type = delta < 64 ? SAME_FRAME : SAME_FRAME_EXTENDED;
- break;
- case 1:
- case 2:
- case 3:
- type = APPEND_FRAME;
- break;
- }
- } else if (clocalsSize == localsSize && cstackSize == 1) {
- type = delta < 63
- ? SAME_LOCALS_1_STACK_ITEM_FRAME
- : SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED;
- }
- if (type != FULL_FRAME) {
- // verify if locals are the same
- int l = 3;
- for (int j = 0; j < localsSize; j++) {
- if (frame[l] != previousFrame[l]) {
- type = FULL_FRAME;
- break;
- }
- l++;
- }
- }
- switch (type) {
- case SAME_FRAME:
- stackMap.putByte(delta);
- break;
- case SAME_LOCALS_1_STACK_ITEM_FRAME:
- stackMap.putByte(SAME_LOCALS_1_STACK_ITEM_FRAME + delta);
- writeFrameTypes(3 + clocalsSize, 4 + clocalsSize);
- break;
- case SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED:
- stackMap.putByte(SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED)
- .putShort(delta);
- writeFrameTypes(3 + clocalsSize, 4 + clocalsSize);
- break;
- case SAME_FRAME_EXTENDED:
- stackMap.putByte(SAME_FRAME_EXTENDED).putShort(delta);
- break;
- case CHOP_FRAME:
- stackMap.putByte(SAME_FRAME_EXTENDED + k).putShort(delta);
- break;
- case APPEND_FRAME:
- stackMap.putByte(SAME_FRAME_EXTENDED + k).putShort(delta);
- writeFrameTypes(3 + localsSize, 3 + clocalsSize);
- break;
- // case FULL_FRAME:
- default:
- stackMap.putByte(FULL_FRAME)
- .putShort(delta)
- .putShort(clocalsSize);
- writeFrameTypes(3, 3 + clocalsSize);
- stackMap.putShort(cstackSize);
- writeFrameTypes(3 + clocalsSize, 3 + clocalsSize + cstackSize);
- }
- }
-
- /**
- * Writes some types of the current frame {@link #frame} into the
- * StackMapTableAttribute. This method converts types from the format used
- * in {@link Label} to the format used in StackMapTable attributes. In
- * particular, it converts type table indexes to constant pool indexes.
- *
- * @param start index of the first type in {@link #frame} to write.
- * @param end index of last type in {@link #frame} to write (exclusive).
- */
- private void writeFrameTypes(final int start, final int end) {
- for (int i = start; i < end; ++i) {
- int t = frame[i];
- int d = t & Frame.DIM;
- if (d == 0) {
- int v = t & Frame.BASE_VALUE;
- switch (t & Frame.BASE_KIND) {
- case Frame.OBJECT:
- stackMap.putByte(7)
- .putShort(cw.newClass(cw.typeTable[v].strVal1));
- break;
- case Frame.UNINITIALIZED:
- stackMap.putByte(8).putShort(cw.typeTable[v].intVal);
- break;
- default:
- stackMap.putByte(v);
- }
- } else {
- StringBuffer buf = new StringBuffer();
- d >>= 28;
- while (d-- > 0) {
- buf.append('[');
- }
- if ((t & Frame.BASE_KIND) == Frame.OBJECT) {
- buf.append('L');
- buf.append(cw.typeTable[t & Frame.BASE_VALUE].strVal1);
- buf.append(';');
- } else {
- switch (t & 0xF) {
- case 1:
- buf.append('I');
- break;
- case 2:
- buf.append('F');
- break;
- case 3:
- buf.append('D');
- break;
- case 9:
- buf.append('Z');
- break;
- case 10:
- buf.append('B');
- break;
- case 11:
- buf.append('C');
- break;
- case 12:
- buf.append('S');
- break;
- default:
- buf.append('J');
- }
- }
- stackMap.putByte(7).putShort(cw.newClass(buf.toString()));
- }
- }
- }
-
- private void writeFrameType(final Object type) {
- if (type instanceof String) {
- stackMap.putByte(7).putShort(cw.newClass((String) type));
- } else if (type instanceof Integer) {
- stackMap.putByte(((Integer) type).intValue());
- } else {
- stackMap.putByte(8).putShort(((Label) type).position);
- }
- }
-
- // ------------------------------------------------------------------------
- // Utility methods: dump bytecode array
- // ------------------------------------------------------------------------
-
- /**
- * Returns the size of the bytecode of this method.
- *
- * @return the size of the bytecode of this method.
- */
- final int getSize() {
- if (classReaderOffset != 0) {
- return 6 + classReaderLength;
- }
- if (resize) {
- // replaces the temporary jump opcodes introduced by Label.resolve.
- if (ClassReader.RESIZE) {
- resizeInstructions();
- } else {
- throw new RuntimeException("Method code too large!");
- }
- }
- int size = 8;
- if (code.length > 0) {
- cw.newUTF8("Code");
- size += 18 + code.length + 8 * handlerCount;
- if (localVar != null) {
- cw.newUTF8("LocalVariableTable");
- size += 8 + localVar.length;
- }
- if (localVarType != null) {
- cw.newUTF8("LocalVariableTypeTable");
- size += 8 + localVarType.length;
- }
- if (lineNumber != null) {
- cw.newUTF8("LineNumberTable");
- size += 8 + lineNumber.length;
- }
- if (stackMap != null) {
- boolean zip = (cw.version & 0xFFFF) >= Opcodes.V1_6;
- cw.newUTF8(zip ? "StackMapTable" : "StackMap");
- size += 8 + stackMap.length;
- }
- if (cattrs != null) {
- size += cattrs.getSize(cw,
- code.data,
- code.length,
- maxStack,
- maxLocals);
- }
- }
- if (exceptionCount > 0) {
- cw.newUTF8("Exceptions");
- size += 8 + 2 * exceptionCount;
- }
- if ((access & Opcodes.ACC_SYNTHETIC) != 0
- && (cw.version & 0xffff) < Opcodes.V1_5)
- {
- cw.newUTF8("Synthetic");
- size += 6;
- }
- if ((access & Opcodes.ACC_DEPRECATED) != 0) {
- cw.newUTF8("Deprecated");
- size += 6;
- }
- if (ClassReader.SIGNATURES && signature != null) {
- cw.newUTF8("Signature");
- cw.newUTF8(signature);
- size += 8;
- }
- if (ClassReader.ANNOTATIONS && annd != null) {
- cw.newUTF8("AnnotationDefault");
- size += 6 + annd.length;
- }
- if (ClassReader.ANNOTATIONS && anns != null) {
- cw.newUTF8("RuntimeVisibleAnnotations");
- size += 8 + anns.getSize();
- }
- if (ClassReader.ANNOTATIONS && ianns != null) {
- cw.newUTF8("RuntimeInvisibleAnnotations");
- size += 8 + ianns.getSize();
- }
- if (ClassReader.ANNOTATIONS && panns != null) {
- cw.newUTF8("RuntimeVisibleParameterAnnotations");
- size += 7 + 2 * (panns.length - synthetics);
- for (int i = panns.length - 1; i >= synthetics; --i) {
- size += panns[i] == null ? 0 : panns[i].getSize();
- }
- }
- if (ClassReader.ANNOTATIONS && ipanns != null) {
- cw.newUTF8("RuntimeInvisibleParameterAnnotations");
- size += 7 + 2 * (ipanns.length - synthetics);
- for (int i = ipanns.length - 1; i >= synthetics; --i) {
- size += ipanns[i] == null ? 0 : ipanns[i].getSize();
- }
- }
- if (attrs != null) {
- size += attrs.getSize(cw, null, 0, -1, -1);
- }
- return size;
- }
-
- /**
- * Puts the bytecode of this method in the given byte vector.
- *
- * @param out the byte vector into which the bytecode of this method must be
- * copied.
- */
- final void put(final ByteVector out) {
- out.putShort(access).putShort(name).putShort(desc);
- if (classReaderOffset != 0) {
- out.putByteArray(cw.cr.b, classReaderOffset, classReaderLength);
- return;
- }
- int attributeCount = 0;
- if (code.length > 0) {
- ++attributeCount;
- }
- if (exceptionCount > 0) {
- ++attributeCount;
- }
- if ((access & Opcodes.ACC_SYNTHETIC) != 0
- && (cw.version & 0xffff) < Opcodes.V1_5)
- {
- ++attributeCount;
- }
- if ((access & Opcodes.ACC_DEPRECATED) != 0) {
- ++attributeCount;
- }
- if (ClassReader.SIGNATURES && signature != null) {
- ++attributeCount;
- }
- if (ClassReader.ANNOTATIONS && annd != null) {
- ++attributeCount;
- }
- if (ClassReader.ANNOTATIONS && anns != null) {
- ++attributeCount;
- }
- if (ClassReader.ANNOTATIONS && ianns != null) {
- ++attributeCount;
- }
- if (ClassReader.ANNOTATIONS && panns != null) {
- ++attributeCount;
- }
- if (ClassReader.ANNOTATIONS && ipanns != null) {
- ++attributeCount;
- }
- if (attrs != null) {
- attributeCount += attrs.getCount();
- }
- out.putShort(attributeCount);
- if (code.length > 0) {
- int size = 12 + code.length + 8 * handlerCount;
- if (localVar != null) {
- size += 8 + localVar.length;
- }
- if (localVarType != null) {
- size += 8 + localVarType.length;
- }
- if (lineNumber != null) {
- size += 8 + lineNumber.length;
- }
- if (stackMap != null) {
- size += 8 + stackMap.length;
- }
- if (cattrs != null) {
- size += cattrs.getSize(cw,
- code.data,
- code.length,
- maxStack,
- maxLocals);
- }
- out.putShort(cw.newUTF8("Code")).putInt(size);
- out.putShort(maxStack).putShort(maxLocals);
- out.putInt(code.length).putByteArray(code.data, 0, code.length);
- out.putShort(handlerCount);
- if (handlerCount > 0) {
- Handler h = firstHandler;
- while (h != null) {
- out.putShort(h.start.position)
- .putShort(h.end.position)
- .putShort(h.handler.position)
- .putShort(h.type);
- h = h.next;
- }
- }
- attributeCount = 0;
- if (localVar != null) {
- ++attributeCount;
- }
- if (localVarType != null) {
- ++attributeCount;
- }
- if (lineNumber != null) {
- ++attributeCount;
- }
- if (stackMap != null) {
- ++attributeCount;
- }
- if (cattrs != null) {
- attributeCount += cattrs.getCount();
- }
- out.putShort(attributeCount);
- if (localVar != null) {
- out.putShort(cw.newUTF8("LocalVariableTable"));
- out.putInt(localVar.length + 2).putShort(localVarCount);
- out.putByteArray(localVar.data, 0, localVar.length);
- }
- if (localVarType != null) {
- out.putShort(cw.newUTF8("LocalVariableTypeTable"));
- out.putInt(localVarType.length + 2).putShort(localVarTypeCount);
- out.putByteArray(localVarType.data, 0, localVarType.length);
- }
- if (lineNumber != null) {
- out.putShort(cw.newUTF8("LineNumberTable"));
- out.putInt(lineNumber.length + 2).putShort(lineNumberCount);
- out.putByteArray(lineNumber.data, 0, lineNumber.length);
- }
- if (stackMap != null) {
- boolean zip = (cw.version & 0xFFFF) >= Opcodes.V1_6;
- out.putShort(cw.newUTF8(zip ? "StackMapTable" : "StackMap"));
- out.putInt(stackMap.length + 2).putShort(frameCount);
- out.putByteArray(stackMap.data, 0, stackMap.length);
- }
- if (cattrs != null) {
- cattrs.put(cw, code.data, code.length, maxLocals, maxStack, out);
- }
- }
- if (exceptionCount > 0) {
- out.putShort(cw.newUTF8("Exceptions"))
- .putInt(2 * exceptionCount + 2);
- out.putShort(exceptionCount);
- for (int i = 0; i < exceptionCount; ++i) {
- out.putShort(exceptions[i]);
- }
- }
- if ((access & Opcodes.ACC_SYNTHETIC) != 0
- && (cw.version & 0xffff) < Opcodes.V1_5)
- {
- out.putShort(cw.newUTF8("Synthetic")).putInt(0);
- }
- if ((access & Opcodes.ACC_DEPRECATED) != 0) {
- out.putShort(cw.newUTF8("Deprecated")).putInt(0);
- }
- if (ClassReader.SIGNATURES && signature != null) {
- out.putShort(cw.newUTF8("Signature"))
- .putInt(2)
- .putShort(cw.newUTF8(signature));
- }
- if (ClassReader.ANNOTATIONS && annd != null) {
- out.putShort(cw.newUTF8("AnnotationDefault"));
- out.putInt(annd.length);
- out.putByteArray(annd.data, 0, annd.length);
- }
- if (ClassReader.ANNOTATIONS && anns != null) {
- out.putShort(cw.newUTF8("RuntimeVisibleAnnotations"));
- anns.put(out);
- }
- if (ClassReader.ANNOTATIONS && ianns != null) {
- out.putShort(cw.newUTF8("RuntimeInvisibleAnnotations"));
- ianns.put(out);
- }
- if (ClassReader.ANNOTATIONS && panns != null) {
- out.putShort(cw.newUTF8("RuntimeVisibleParameterAnnotations"));
- AnnotationWriter.put(panns, synthetics, out);
- }
- if (ClassReader.ANNOTATIONS && ipanns != null) {
- out.putShort(cw.newUTF8("RuntimeInvisibleParameterAnnotations"));
- AnnotationWriter.put(ipanns, synthetics, out);
- }
- if (attrs != null) {
- attrs.put(cw, null, 0, -1, -1, out);
- }
- }
-
- // ------------------------------------------------------------------------
- // Utility methods: instruction resizing (used to handle GOTO_W and JSR_W)
- // ------------------------------------------------------------------------
-
- /**
- * Resizes and replaces the temporary instructions inserted by
- * {@link Label#resolve} for wide forward jumps, while keeping jump offsets
- * and instruction addresses consistent. This may require to resize other
- * existing instructions, or even to introduce new instructions: for
- * example, increasing the size of an instruction by 2 at the middle of a
- * method can increases the offset of an IFEQ instruction from 32766 to
- * 32768, in which case IFEQ 32766 must be replaced with IFNEQ 8 GOTO_W
- * 32765. This, in turn, may require to increase the size of another jump
- * instruction, and so on... All these operations are handled automatically
- * by this method. <p> <i>This method must be called after all the method
- * that is being built has been visited</i>. In particular, the
- * {@link Label Label} objects used to construct the method are no longer
- * valid after this method has been called.
- */
- private void resizeInstructions() {
- byte[] b = code.data; // bytecode of the method
- int u, v, label; // indexes in b
- int i, j; // loop indexes
- /*
- * 1st step: As explained above, resizing an instruction may require to
- * resize another one, which may require to resize yet another one, and
- * so on. The first step of the algorithm consists in finding all the
- * instructions that need to be resized, without modifying the code.
- * This is done by the following "fix point" algorithm:
- *
- * Parse the code to find the jump instructions whose offset will need
- * more than 2 bytes to be stored (the future offset is computed from
- * the current offset and from the number of bytes that will be inserted
- * or removed between the source and target instructions). For each such
- * instruction, adds an entry in (a copy of) the indexes and sizes
- * arrays (if this has not already been done in a previous iteration!).
- *
- * If at least one entry has been added during the previous step, go
- * back to the beginning, otherwise stop.
- *
- * In fact the real algorithm is complicated by the fact that the size
- * of TABLESWITCH and LOOKUPSWITCH instructions depends on their
- * position in the bytecode (because of padding). In order to ensure the
- * convergence of the algorithm, the number of bytes to be added or
- * removed from these instructions is over estimated during the previous
- * loop, and computed exactly only after the loop is finished (this
- * requires another pass to parse the bytecode of the method).
- */
- int[] allIndexes = new int[0]; // copy of indexes
- int[] allSizes = new int[0]; // copy of sizes
- boolean[] resize; // instructions to be resized
- int newOffset; // future offset of a jump instruction
-
- resize = new boolean[code.length];
-
- // 3 = loop again, 2 = loop ended, 1 = last pass, 0 = done
- int state = 3;
- do {
- if (state == 3) {
- state = 2;
- }
- u = 0;
- while (u < b.length) {
- int opcode = b[u] & 0xFF; // opcode of current instruction
- int insert = 0; // bytes to be added after this instruction
-
- switch (ClassWriter.TYPE[opcode]) {
- case ClassWriter.NOARG_INSN:
- case ClassWriter.IMPLVAR_INSN:
- u += 1;
- break;
- case ClassWriter.LABEL_INSN:
- if (opcode > 201) {
- // converts temporary opcodes 202 to 217, 218 and
- // 219 to IFEQ ... JSR (inclusive), IFNULL and
- // IFNONNULL
- opcode = opcode < 218 ? opcode - 49 : opcode - 20;
- label = u + readUnsignedShort(b, u + 1);
- } else {
- label = u + readShort(b, u + 1);
- }
- newOffset = getNewOffset(allIndexes, allSizes, u, label);
- if (newOffset < Short.MIN_VALUE
- || newOffset > Short.MAX_VALUE)
- {
- if (!resize[u]) {
- if (opcode == Opcodes.GOTO
- || opcode == Opcodes.JSR)
- {
- // two additional bytes will be required to
- // replace this GOTO or JSR instruction with
- // a GOTO_W or a JSR_W
- insert = 2;
- } else {
- // five additional bytes will be required to
- // replace this IFxxx <l> instruction with
- // IFNOTxxx <l'> GOTO_W <l>, where IFNOTxxx
- // is the "opposite" opcode of IFxxx (i.e.,
- // IFNE for IFEQ) and where <l'> designates
- // the instruction just after the GOTO_W.
- insert = 5;
- }
- resize[u] = true;
- }
- }
- u += 3;
- break;
- case ClassWriter.LABELW_INSN:
- u += 5;
- break;
- case ClassWriter.TABL_INSN:
- if (state == 1) {
- // true number of bytes to be added (or removed)
- // from this instruction = (future number of padding
- // bytes - current number of padding byte) -
- // previously over estimated variation =
- // = ((3 - newOffset%4) - (3 - u%4)) - u%4
- // = (-newOffset%4 + u%4) - u%4
- // = -(newOffset & 3)
- newOffset = getNewOffset(allIndexes, allSizes, 0, u);
- insert = -(newOffset & 3);
- } else if (!resize[u]) {
- // over estimation of the number of bytes to be
- // added to this instruction = 3 - current number
- // of padding bytes = 3 - (3 - u%4) = u%4 = u & 3
- insert = u & 3;
- resize[u] = true;
- }
- // skips instruction
- u = u + 4 - (u & 3);
- u += 4 * (readInt(b, u + 8) - readInt(b, u + 4) + 1) + 12;
- break;
- case ClassWriter.LOOK_INSN:
- if (state == 1) {
- // like TABL_INSN
- newOffset = getNewOffset(allIndexes, allSizes, 0, u);
- insert = -(newOffset & 3);
- } else if (!resize[u]) {
- // like TABL_INSN
- insert = u & 3;
- resize[u] = true;
- }
- // skips instruction
- u = u + 4 - (u & 3);
- u += 8 * readInt(b, u + 4) + 8;
- break;
- case ClassWriter.WIDE_INSN:
- opcode = b[u + 1] & 0xFF;
- if (opcode == Opcodes.IINC) {
- u += 6;
- } else {
- u += 4;
- }
- break;
- case ClassWriter.VAR_INSN:
- case ClassWriter.SBYTE_INSN:
- case ClassWriter.LDC_INSN:
- u += 2;
- break;
- case ClassWriter.SHORT_INSN:
- case ClassWriter.LDCW_INSN:
- case ClassWriter.FIELDORMETH_INSN:
- case ClassWriter.TYPE_INSN:
- case ClassWriter.IINC_INSN:
- u += 3;
- break;
- case ClassWriter.ITFMETH_INSN:
- u += 5;
- break;
- // case ClassWriter.MANA_INSN:
- default:
- u += 4;
- break;
- }
- if (insert != 0) {
- // adds a new (u, insert) entry in the allIndexes and
- // allSizes arrays
- int[] newIndexes = new int[allIndexes.length + 1];
- int[] newSizes = new int[allSizes.length + 1];
- System.arraycopy(allIndexes,
- 0,
- newIndexes,
- 0,
- allIndexes.length);
- System.arraycopy(allSizes, 0, newSizes, 0, allSizes.length);
- newIndexes[allIndexes.length] = u;
- newSizes[allSizes.length] = insert;
- allIndexes = newIndexes;
- allSizes = newSizes;
- if (insert > 0) {
- state = 3;
- }
- }
- }
- if (state < 3) {
- --state;
- }
- } while (state != 0);
-
- // 2nd step:
- // copies the bytecode of the method into a new bytevector, updates the
- // offsets, and inserts (or removes) bytes as requested.
-
- ByteVector newCode = new ByteVector(code.length);
-
- u = 0;
- while (u < code.length) {
- int opcode = b[u] & 0xFF;
- switch (ClassWriter.TYPE[opcode]) {
- case ClassWriter.NOARG_INSN:
- case ClassWriter.IMPLVAR_INSN:
- newCode.putByte(opcode);
- u += 1;
- break;
- case ClassWriter.LABEL_INSN:
- if (opcode > 201) {
- // changes temporary opcodes 202 to 217 (inclusive), 218
- // and 219 to IFEQ ... JSR (inclusive), IFNULL and
- // IFNONNULL
- opcode = opcode < 218 ? opcode - 49 : opcode - 20;
- label = u + readUnsignedShort(b, u + 1);
- } else {
- label = u + readShort(b, u + 1);
- }
- newOffset = getNewOffset(allIndexes, allSizes, u, label);
- if (resize[u]) {
- // replaces GOTO with GOTO_W, JSR with JSR_W and IFxxx
- // <l> with IFNOTxxx <l'> GOTO_W <l>, where IFNOTxxx is
- // the "opposite" opcode of IFxxx (i.e., IFNE for IFEQ)
- // and where <l'> designates the instruction just after
- // the GOTO_W.
- if (opcode == Opcodes.GOTO) {
- newCode.putByte(200); // GOTO_W
- } else if (opcode == Opcodes.JSR) {
- newCode.putByte(201); // JSR_W
- } else {
- newCode.putByte(opcode <= 166
- ? ((opcode + 1) ^ 1) - 1
- : opcode ^ 1);
- newCode.putShort(8); // jump offset
- newCode.putByte(200); // GOTO_W
- // newOffset now computed from start of GOTO_W
- newOffset -= 3;
- }
- newCode.putInt(newOffset);
- } else {
- newCode.putByte(opcode);
- newCode.putShort(newOffset);
- }
- u += 3;
- break;
- case ClassWriter.LABELW_INSN:
- label = u + readInt(b, u + 1);
- newOffset = getNewOffset(allIndexes, allSizes, u, label);
- newCode.putByte(opcode);
- newCode.putInt(newOffset);
- u += 5;
- break;
- case ClassWriter.TABL_INSN:
- // skips 0 to 3 padding bytes
- v = u;
- u = u + 4 - (v & 3);
- // reads and copies instruction
- newCode.putByte(Opcodes.TABLESWITCH);
- newCode.length += (4 - newCode.length % 4) % 4;
- label = v + readInt(b, u);
- u += 4;
- newOffset = getNewOffset(allIndexes, allSizes, v, label);
- newCode.putInt(newOffset);
- j = readInt(b, u);
- u += 4;
- newCode.putInt(j);
- j = readInt(b, u) - j + 1;
- u += 4;
- newCode.putInt(readInt(b, u - 4));
- for (; j > 0; --j) {
- label = v + readInt(b, u);
- u += 4;
- newOffset = getNewOffset(allIndexes, allSizes, v, label);
- newCode.putInt(newOffset);
- }
- break;
- case ClassWriter.LOOK_INSN:
- // skips 0 to 3 padding bytes
- v = u;
- u = u + 4 - (v & 3);
- // reads and copies instruction
- newCode.putByte(Opcodes.LOOKUPSWITCH);
- newCode.length += (4 - newCode.length % 4) % 4;
- label = v + readInt(b, u);
- u += 4;
- newOffset = getNewOffset(allIndexes, allSizes, v, label);
- newCode.putInt(newOffset);
- j = readInt(b, u);
- u += 4;
- newCode.putInt(j);
- for (; j > 0; --j) {
- newCode.putInt(readInt(b, u));
- u += 4;
- label = v + readInt(b, u);
- u += 4;
- newOffset = getNewOffset(allIndexes, allSizes, v, label);
- newCode.putInt(newOffset);
- }
- break;
- case ClassWriter.WIDE_INSN:
- opcode = b[u + 1] & 0xFF;
- if (opcode == Opcodes.IINC) {
- newCode.putByteArray(b, u, 6);
- u += 6;
- } else {
- newCode.putByteArray(b, u, 4);
- u += 4;
- }
- break;
- case ClassWriter.VAR_INSN:
- case ClassWriter.SBYTE_INSN:
- case ClassWriter.LDC_INSN:
- newCode.putByteArray(b, u, 2);
- u += 2;
- break;
- case ClassWriter.SHORT_INSN:
- case ClassWriter.LDCW_INSN:
- case ClassWriter.FIELDORMETH_INSN:
- case ClassWriter.TYPE_INSN:
- case ClassWriter.IINC_INSN:
- newCode.putByteArray(b, u, 3);
- u += 3;
- break;
- case ClassWriter.ITFMETH_INSN:
- newCode.putByteArray(b, u, 5);
- u += 5;
- break;
- // case MANA_INSN:
- default:
- newCode.putByteArray(b, u, 4);
- u += 4;
- break;
- }
- }
-
- // recomputes the stack map frames
- if (frameCount > 0) {
- if (compute == FRAMES) {
- frameCount = 0;
- stackMap = null;
- previousFrame = null;
- frame = null;
- Frame f = new Frame();
- f.owner = labels;
- Type[] args = Type.getArgumentTypes(descriptor);
- f.initInputFrame(cw, access, args, maxLocals);
- visitFrame(f);
- Label l = labels;
- while (l != null) {
- /*
- * here we need the original label position. getNewOffset
- * must therefore never have been called for this label.
- */
- u = l.position - 3;
- if ((l.status & Label.STORE) != 0 || (u >= 0 && resize[u]))
- {
- getNewOffset(allIndexes, allSizes, l);
- // TODO update offsets in UNINITIALIZED values
- visitFrame(l.frame);
- }
- l = l.successor;
- }
- } else {
- /*
- * Resizing an existing stack map frame table is really hard.
- * Not only the table must be parsed to update the offets, but
- * new frames may be needed for jump instructions that were
- * inserted by this method. And updating the offsets or
- * inserting frames can change the format of the following
- * frames, in case of packed frames. In practice the whole table
- * must be recomputed. For this the frames are marked as
- * potentially invalid. This will cause the whole class to be
- * reread and rewritten with the COMPUTE_FRAMES option (see the
- * ClassWriter.toByteArray method). This is not very efficient
- * but is much easier and requires much less code than any other
- * method I can think of.
- */
- cw.invalidFrames = true;
- }
- }
- // updates the exception handler block labels
- Handler h = firstHandler;
- while (h != null) {
- getNewOffset(allIndexes, allSizes, h.start);
- getNewOffset(allIndexes, allSizes, h.end);
- getNewOffset(allIndexes, allSizes, h.handler);
- h = h.next;
- }
- // updates the instructions addresses in the
- // local var and line number tables
- for (i = 0; i < 2; ++i) {
- ByteVector bv = i == 0 ? localVar : localVarType;
- if (bv != null) {
- b = bv.data;
- u = 0;
- while (u < bv.length) {
- label = readUnsignedShort(b, u);
- newOffset = getNewOffset(allIndexes, allSizes, 0, label);
- writeShort(b, u, newOffset);
- label += readUnsignedShort(b, u + 2);
- newOffset = getNewOffset(allIndexes, allSizes, 0, label)
- - newOffset;
- writeShort(b, u + 2, newOffset);
- u += 10;
- }
- }
- }
- if (lineNumber != null) {
- b = lineNumber.data;
- u = 0;
- while (u < lineNumber.length) {
- writeShort(b, u, getNewOffset(allIndexes,
- allSizes,
- 0,
- readUnsignedShort(b, u)));
- u += 4;
- }
- }
- // updates the labels of the other attributes
- Attribute attr = cattrs;
- while (attr != null) {
- Label[] labels = attr.getLabels();
- if (labels != null) {
- for (i = labels.length - 1; i >= 0; --i) {
- getNewOffset(allIndexes, allSizes, labels[i]);
- }
- }
- attr = attr.next;
- }
-
- // replaces old bytecodes with new ones
- code = newCode;
- }
-
- /**
- * Reads an unsigned short value in the given byte array.
- *
- * @param b a byte array.
- * @param index the start index of the value to be read.
- * @return the read value.
- */
- static int readUnsignedShort(final byte[] b, final int index) {
- return ((b[index] & 0xFF) << 8) | (b[index + 1] & 0xFF);
- }
-
- /**
- * Reads a signed short value in the given byte array.
- *
- * @param b a byte array.
- * @param index the start index of the value to be read.
- * @return the read value.
- */
- static short readShort(final byte[] b, final int index) {
- return (short) (((b[index] & 0xFF) << 8) | (b[index + 1] & 0xFF));
- }
-
- /**
- * Reads a signed int value in the given byte array.
- *
- * @param b a byte array.
- * @param index the start index of the value to be read.
- * @return the read value.
- */
- static int readInt(final byte[] b, final int index) {
- return ((b[index] & 0xFF) << 24) | ((b[index + 1] & 0xFF) << 16)
- | ((b[index + 2] & 0xFF) << 8) | (b[index + 3] & 0xFF);
- }
-
- /**
- * Writes a short value in the given byte array.
- *
- * @param b a byte array.
- * @param index where the first byte of the short value must be written.
- * @param s the value to be written in the given byte array.
- */
- static void writeShort(final byte[] b, final int index, final int s) {
- b[index] = (byte) (s >>> 8);
- b[index + 1] = (byte) s;
- }
-
- /**
- * Computes the future value of a bytecode offset. <p> Note: it is possible
- * to have several entries for the same instruction in the <tt>indexes</tt>
- * and <tt>sizes</tt>: two entries (index=a,size=b) and (index=a,size=b')
- * are equivalent to a single entry (index=a,size=b+b').
- *
- * @param indexes current positions of the instructions to be resized. Each
- * instruction must be designated by the index of its <i>last</i>
- * byte, plus one (or, in other words, by the index of the <i>first</i>
- * byte of the <i>next</i> instruction).
- * @param sizes the number of bytes to be <i>added</i> to the above
- * instructions. More precisely, for each i < <tt>len</tt>,
- * <tt>sizes</tt>[i] bytes will be added at the end of the
- * instruction designated by <tt>indexes</tt>[i] or, if
- * <tt>sizes</tt>[i] is negative, the <i>last</i> |<tt>sizes[i]</tt>|
- * bytes of the instruction will be removed (the instruction size
- * <i>must not</i> become negative or null).
- * @param begin index of the first byte of the source instruction.
- * @param end index of the first byte of the target instruction.
- * @return the future value of the given bytecode offset.
- */
- static int getNewOffset(
- final int[] indexes,
- final int[] sizes,
- final int begin,
- final int end)
- {
- int offset = end - begin;
- for (int i = 0; i < indexes.length; ++i) {
- if (begin < indexes[i] && indexes[i] <= end) {
- // forward jump
- offset += sizes[i];
- } else if (end < indexes[i] && indexes[i] <= begin) {
- // backward jump
- offset -= sizes[i];
- }
- }
- return offset;
- }
-
- /**
- * Updates the offset of the given label.
- *
- * @param indexes current positions of the instructions to be resized. Each
- * instruction must be designated by the index of its <i>last</i>
- * byte, plus one (or, in other words, by the index of the <i>first</i>
- * byte of the <i>next</i> instruction).
- * @param sizes the number of bytes to be <i>added</i> to the above
- * instructions. More precisely, for each i < <tt>len</tt>,
- * <tt>sizes</tt>[i] bytes will be added at the end of the
- * instruction designated by <tt>indexes</tt>[i] or, if
- * <tt>sizes</tt>[i] is negative, the <i>last</i> |<tt>sizes[i]</tt>|
- * bytes of the instruction will be removed (the instruction size
- * <i>must not</i> become negative or null).
- * @param label the label whose offset must be updated.
- */
- static void getNewOffset(
- final int[] indexes,
- final int[] sizes,
- final Label label)
- {
- if ((label.status & Label.RESIZED) == 0) {
- label.position = getNewOffset(indexes, sizes, 0, label.position);
- label.status |= Label.RESIZED;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Opcodes.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Opcodes.java
deleted file mode 100644
index c4eebe75..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Opcodes.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-/**
- * Defines the JVM opcodes, access flags and array type codes. This interface
- * does not define all the JVM opcodes because some opcodes are automatically
- * handled. For example, the xLOAD and xSTORE opcodes are automatically replaced
- * by xLOAD_n and xSTORE_n opcodes when possible. The xLOAD_n and xSTORE_n
- * opcodes are therefore not defined in this interface. Likewise for LDC,
- * automatically replaced by LDC_W or LDC2_W when necessary, WIDE, GOTO_W and
- * JSR_W.
- *
- * @author Eric Bruneton
- * @author Eugene Kuleshov
- */
-public interface Opcodes {
-
- // versions
-
- int V1_1 = 3 << 16 | 45;
- int V1_2 = 0 << 16 | 46;
- int V1_3 = 0 << 16 | 47;
- int V1_4 = 0 << 16 | 48;
- int V1_5 = 0 << 16 | 49;
- int V1_6 = 0 << 16 | 50;
-
- // access flags
-
- int ACC_PUBLIC = 0x0001; // class, field, method
- int ACC_PRIVATE = 0x0002; // class, field, method
- int ACC_PROTECTED = 0x0004; // class, field, method
- int ACC_STATIC = 0x0008; // field, method
- int ACC_FINAL = 0x0010; // class, field, method
- int ACC_SUPER = 0x0020; // class
- int ACC_SYNCHRONIZED = 0x0020; // method
- int ACC_VOLATILE = 0x0040; // field
- int ACC_BRIDGE = 0x0040; // method
- int ACC_VARARGS = 0x0080; // method
- int ACC_TRANSIENT = 0x0080; // field
- int ACC_NATIVE = 0x0100; // method
- int ACC_INTERFACE = 0x0200; // class
- int ACC_ABSTRACT = 0x0400; // class, method
- int ACC_STRICT = 0x0800; // method
- int ACC_SYNTHETIC = 0x1000; // class, field, method
- int ACC_ANNOTATION = 0x2000; // class
- int ACC_ENUM = 0x4000; // class(?) field inner
-
- // ASM specific pseudo access flags
-
- int ACC_DEPRECATED = 131072; // class, field, method
-
- // types for NEWARRAY
-
- int T_BOOLEAN = 4;
- int T_CHAR = 5;
- int T_FLOAT = 6;
- int T_DOUBLE = 7;
- int T_BYTE = 8;
- int T_SHORT = 9;
- int T_INT = 10;
- int T_LONG = 11;
-
- // stack map frame types
-
- /**
- * Represents an expanded frame. See {@link ClassReader#EXPAND_FRAMES}.
- */
- int F_NEW = -1;
-
- /**
- * Represents a compressed frame with complete frame data.
- */
- int F_FULL = 0;
-
- /**
- * Represents a compressed frame where locals are the same as the locals in
- * the previous frame, except that additional 1-3 locals are defined, and
- * with an empty stack.
- */
- int F_APPEND = 1;
-
- /**
- * Represents a compressed frame where locals are the same as the locals in
- * the previous frame, except that the last 1-3 locals are absent and with
- * an empty stack.
- */
- int F_CHOP = 2;
-
- /**
- * Represents a compressed frame with exactly the same locals as the
- * previous frame and with an empty stack.
- */
- int F_SAME = 3;
-
- /**
- * Represents a compressed frame with exactly the same locals as the
- * previous frame and with a single value on the stack.
- */
- int F_SAME1 = 4;
-
- Integer TOP = new Integer(0);
- Integer INTEGER = new Integer(1);
- Integer FLOAT = new Integer(2);
- Integer DOUBLE = new Integer(3);
- Integer LONG = new Integer(4);
- Integer NULL = new Integer(5);
- Integer UNINITIALIZED_THIS = new Integer(6);
-
- // opcodes // visit method (- = idem)
-
- int NOP = 0; // visitInsn
- int ACONST_NULL = 1; // -
- int ICONST_M1 = 2; // -
- int ICONST_0 = 3; // -
- int ICONST_1 = 4; // -
- int ICONST_2 = 5; // -
- int ICONST_3 = 6; // -
- int ICONST_4 = 7; // -
- int ICONST_5 = 8; // -
- int LCONST_0 = 9; // -
- int LCONST_1 = 10; // -
- int FCONST_0 = 11; // -
- int FCONST_1 = 12; // -
- int FCONST_2 = 13; // -
- int DCONST_0 = 14; // -
- int DCONST_1 = 15; // -
- int BIPUSH = 16; // visitIntInsn
- int SIPUSH = 17; // -
- int LDC = 18; // visitLdcInsn
- // int LDC_W = 19; // -
- // int LDC2_W = 20; // -
- int ILOAD = 21; // visitVarInsn
- int LLOAD = 22; // -
- int FLOAD = 23; // -
- int DLOAD = 24; // -
- int ALOAD = 25; // -
- // int ILOAD_0 = 26; // -
- // int ILOAD_1 = 27; // -
- // int ILOAD_2 = 28; // -
- // int ILOAD_3 = 29; // -
- // int LLOAD_0 = 30; // -
- // int LLOAD_1 = 31; // -
- // int LLOAD_2 = 32; // -
- // int LLOAD_3 = 33; // -
- // int FLOAD_0 = 34; // -
- // int FLOAD_1 = 35; // -
- // int FLOAD_2 = 36; // -
- // int FLOAD_3 = 37; // -
- // int DLOAD_0 = 38; // -
- // int DLOAD_1 = 39; // -
- // int DLOAD_2 = 40; // -
- // int DLOAD_3 = 41; // -
- // int ALOAD_0 = 42; // -
- // int ALOAD_1 = 43; // -
- // int ALOAD_2 = 44; // -
- // int ALOAD_3 = 45; // -
- int IALOAD = 46; // visitInsn
- int LALOAD = 47; // -
- int FALOAD = 48; // -
- int DALOAD = 49; // -
- int AALOAD = 50; // -
- int BALOAD = 51; // -
- int CALOAD = 52; // -
- int SALOAD = 53; // -
- int ISTORE = 54; // visitVarInsn
- int LSTORE = 55; // -
- int FSTORE = 56; // -
- int DSTORE = 57; // -
- int ASTORE = 58; // -
- // int ISTORE_0 = 59; // -
- // int ISTORE_1 = 60; // -
- // int ISTORE_2 = 61; // -
- // int ISTORE_3 = 62; // -
- // int LSTORE_0 = 63; // -
- // int LSTORE_1 = 64; // -
- // int LSTORE_2 = 65; // -
- // int LSTORE_3 = 66; // -
- // int FSTORE_0 = 67; // -
- // int FSTORE_1 = 68; // -
- // int FSTORE_2 = 69; // -
- // int FSTORE_3 = 70; // -
- // int DSTORE_0 = 71; // -
- // int DSTORE_1 = 72; // -
- // int DSTORE_2 = 73; // -
- // int DSTORE_3 = 74; // -
- // int ASTORE_0 = 75; // -
- // int ASTORE_1 = 76; // -
- // int ASTORE_2 = 77; // -
- // int ASTORE_3 = 78; // -
- int IASTORE = 79; // visitInsn
- int LASTORE = 80; // -
- int FASTORE = 81; // -
- int DASTORE = 82; // -
- int AASTORE = 83; // -
- int BASTORE = 84; // -
- int CASTORE = 85; // -
- int SASTORE = 86; // -
- int POP = 87; // -
- int POP2 = 88; // -
- int DUP = 89; // -
- int DUP_X1 = 90; // -
- int DUP_X2 = 91; // -
- int DUP2 = 92; // -
- int DUP2_X1 = 93; // -
- int DUP2_X2 = 94; // -
- int SWAP = 95; // -
- int IADD = 96; // -
- int LADD = 97; // -
- int FADD = 98; // -
- int DADD = 99; // -
- int ISUB = 100; // -
- int LSUB = 101; // -
- int FSUB = 102; // -
- int DSUB = 103; // -
- int IMUL = 104; // -
- int LMUL = 105; // -
- int FMUL = 106; // -
- int DMUL = 107; // -
- int IDIV = 108; // -
- int LDIV = 109; // -
- int FDIV = 110; // -
- int DDIV = 111; // -
- int IREM = 112; // -
- int LREM = 113; // -
- int FREM = 114; // -
- int DREM = 115; // -
- int INEG = 116; // -
- int LNEG = 117; // -
- int FNEG = 118; // -
- int DNEG = 119; // -
- int ISHL = 120; // -
- int LSHL = 121; // -
- int ISHR = 122; // -
- int LSHR = 123; // -
- int IUSHR = 124; // -
- int LUSHR = 125; // -
- int IAND = 126; // -
- int LAND = 127; // -
- int IOR = 128; // -
- int LOR = 129; // -
- int IXOR = 130; // -
- int LXOR = 131; // -
- int IINC = 132; // visitIincInsn
- int I2L = 133; // visitInsn
- int I2F = 134; // -
- int I2D = 135; // -
- int L2I = 136; // -
- int L2F = 137; // -
- int L2D = 138; // -
- int F2I = 139; // -
- int F2L = 140; // -
- int F2D = 141; // -
- int D2I = 142; // -
- int D2L = 143; // -
- int D2F = 144; // -
- int I2B = 145; // -
- int I2C = 146; // -
- int I2S = 147; // -
- int LCMP = 148; // -
- int FCMPL = 149; // -
- int FCMPG = 150; // -
- int DCMPL = 151; // -
- int DCMPG = 152; // -
- int IFEQ = 153; // visitJumpInsn
- int IFNE = 154; // -
- int IFLT = 155; // -
- int IFGE = 156; // -
- int IFGT = 157; // -
- int IFLE = 158; // -
- int IF_ICMPEQ = 159; // -
- int IF_ICMPNE = 160; // -
- int IF_ICMPLT = 161; // -
- int IF_ICMPGE = 162; // -
- int IF_ICMPGT = 163; // -
- int IF_ICMPLE = 164; // -
- int IF_ACMPEQ = 165; // -
- int IF_ACMPNE = 166; // -
- int GOTO = 167; // -
- int JSR = 168; // -
- int RET = 169; // visitVarInsn
- int TABLESWITCH = 170; // visiTableSwitchInsn
- int LOOKUPSWITCH = 171; // visitLookupSwitch
- int IRETURN = 172; // visitInsn
- int LRETURN = 173; // -
- int FRETURN = 174; // -
- int DRETURN = 175; // -
- int ARETURN = 176; // -
- int RETURN = 177; // -
- int GETSTATIC = 178; // visitFieldInsn
- int PUTSTATIC = 179; // -
- int GETFIELD = 180; // -
- int PUTFIELD = 181; // -
- int INVOKEVIRTUAL = 182; // visitMethodInsn
- int INVOKESPECIAL = 183; // -
- int INVOKESTATIC = 184; // -
- int INVOKEINTERFACE = 185; // -
- // int UNUSED = 186; // NOT VISITED
- int NEW = 187; // visitTypeInsn
- int NEWARRAY = 188; // visitIntInsn
- int ANEWARRAY = 189; // visitTypeInsn
- int ARRAYLENGTH = 190; // visitInsn
- int ATHROW = 191; // -
- int CHECKCAST = 192; // visitTypeInsn
- int INSTANCEOF = 193; // -
- int MONITORENTER = 194; // visitInsn
- int MONITOREXIT = 195; // -
- // int WIDE = 196; // NOT VISITED
- int MULTIANEWARRAY = 197; // visitMultiANewArrayInsn
- int IFNULL = 198; // visitJumpInsn
- int IFNONNULL = 199; // -
- // int GOTO_W = 200; // -
- // int JSR_W = 201; // -
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Type.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Type.java
deleted file mode 100644
index b1a35d17..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/Type.java
+++ /dev/null
@@ -1,824 +0,0 @@
-/*
- * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * ASM: a very small and fast Java bytecode manipulation framework
- * Copyright (c) 2000-2007 INRIA, France Telecom
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-package com.sun.xml.internal.ws.org.objectweb.asm;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-
-/**
- * A Java type. This class can be used to make it easier to manipulate type and
- * method descriptors.
- *
- * @author Eric Bruneton
- * @author Chris Nokleberg
- */
-public class Type {
-
- /**
- * The sort of the <tt>void</tt> type. See {@link #getSort getSort}.
- */
- public static final int VOID = 0;
-
- /**
- * The sort of the <tt>boolean</tt> type. See {@link #getSort getSort}.
- */
- public static final int BOOLEAN = 1;
-
- /**
- * The sort of the <tt>char</tt> type. See {@link #getSort getSort}.
- */
- public static final int CHAR = 2;
-
- /**
- * The sort of the <tt>byte</tt> type. See {@link #getSort getSort}.
- */
- public static final int BYTE = 3;
-
- /**
- * The sort of the <tt>short</tt> type. See {@link #getSort getSort}.
- */
- public static final int SHORT = 4;
-
- /**
- * The sort of the <tt>int</tt> type. See {@link #getSort getSort}.
- */
- public static final int INT = 5;
-
- /**
- * The sort of the <tt>float</tt> type. See {@link #getSort getSort}.
- */
- public static final int FLOAT = 6;
-
- /**
- * The sort of the <tt>long</tt> type. See {@link #getSort getSort}.
- */
- public static final int LONG = 7;
-
- /**
- * The sort of the <tt>double</tt> type. See {@link #getSort getSort}.
- */
- public static final int DOUBLE = 8;
-
- /**
- * The sort of array reference types. See {@link #getSort getSort}.
- */
- public static final int ARRAY = 9;
-
- /**
- * The sort of object reference type. See {@link #getSort getSort}.
- */
- public static final int OBJECT = 10;
-
- /**
- * The <tt>void</tt> type.
- */
- public static final Type VOID_TYPE = new Type(VOID);
-
- /**
- * The <tt>boolean</tt> type.
- */
- public static final Type BOOLEAN_TYPE = new Type(BOOLEAN);
-
- /**
- * The <tt>char</tt> type.
- */
- public static final Type CHAR_TYPE = new Type(CHAR);
-
- /**
- * The <tt>byte</tt> type.
- */
- public static final Type BYTE_TYPE = new Type(BYTE);
-
- /**
- * The <tt>short</tt> type.
- */
- public static final Type SHORT_TYPE = new Type(SHORT);
-
- /**
- * The <tt>int</tt> type.
- */
- public static final Type INT_TYPE = new Type(INT);
-
- /**
- * The <tt>float</tt> type.
- */
- public static final Type FLOAT_TYPE = new Type(FLOAT);
-
- /**
- * The <tt>long</tt> type.
- */
- public static final Type LONG_TYPE = new Type(LONG);
-
- /**
- * The <tt>double</tt> type.
- */
- public static final Type DOUBLE_TYPE = new Type(DOUBLE);
-
- // ------------------------------------------------------------------------
- // Fields
- // ------------------------------------------------------------------------
-
- /**
- * The sort of this Java type.
- */
- private final int sort;
-
- /**
- * A buffer containing the internal name of this Java type. This field is
- * only used for reference types.
- */
- private final char[] buf;
-
- /**
- * The offset of the internal name of this Java type in {@link #buf buf}.
- * This field is only used for reference types.
- */
- private final int off;
-
- /**
- * The length of the internal name of this Java type. This field is only
- * used for reference types.
- */
- private final int len;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructs a primitive type.
- *
- * @param sort the sort of the primitive type to be constructed.
- */
- private Type(final int sort) {
- this(sort, null, 0, 1);
- }
-
- /**
- * Constructs a reference type.
- *
- * @param sort the sort of the reference type to be constructed.
- * @param buf a buffer containing the descriptor of the previous type.
- * @param off the offset of this descriptor in the previous buffer.
- * @param len the length of this descriptor.
- */
- private Type(final int sort, final char[] buf, final int off, final int len)
- {
- this.sort = sort;
- this.buf = buf;
- this.off = off;
- this.len = len;
- }
-
- /**
- * Returns the Java type corresponding to the given type descriptor.
- *
- * @param typeDescriptor a type descriptor.
- * @return the Java type corresponding to the given type descriptor.
- */
- public static Type getType(final String typeDescriptor) {
- return getType(typeDescriptor.toCharArray(), 0);
- }
-
- /**
- * Returns the Java type corresponding to the given internal name.
- *
- * @param internalName an internal name.
- * @return the Java type corresponding to the given internal name.
- */
- public static Type getObjectType(final String internalName) {
- char[] buf = internalName.toCharArray();
- return new Type(buf[0] == '[' ? ARRAY : OBJECT, buf, 0, buf.length);
- }
-
- /**
- * Returns the Java type corresponding to the given class.
- *
- * @param c a class.
- * @return the Java type corresponding to the given class.
- */
- public static Type getType(final Class c) {
- if (c.isPrimitive()) {
- if (c == Integer.TYPE) {
- return INT_TYPE;
- } else if (c == Void.TYPE) {
- return VOID_TYPE;
- } else if (c == Boolean.TYPE) {
- return BOOLEAN_TYPE;
- } else if (c == Byte.TYPE) {
- return BYTE_TYPE;
- } else if (c == Character.TYPE) {
- return CHAR_TYPE;
- } else if (c == Short.TYPE) {
- return SHORT_TYPE;
- } else if (c == Double.TYPE) {
- return DOUBLE_TYPE;
- } else if (c == Float.TYPE) {
- return FLOAT_TYPE;
- } else /* if (c == Long.TYPE) */{
- return LONG_TYPE;
- }
- } else {
- return getType(getDescriptor(c));
- }
- }
-
- /**
- * Returns the Java types corresponding to the argument types of the given
- * method descriptor.
- *
- * @param methodDescriptor a method descriptor.
- * @return the Java types corresponding to the argument types of the given
- * method descriptor.
- */
- public static Type[] getArgumentTypes(final String methodDescriptor) {
- char[] buf = methodDescriptor.toCharArray();
- int off = 1;
- int size = 0;
- while (true) {
- char car = buf[off++];
- if (car == ')') {
- break;
- } else if (car == 'L') {
- while (buf[off++] != ';') {
- }
- ++size;
- } else if (car != '[') {
- ++size;
- }
- }
- Type[] args = new Type[size];
- off = 1;
- size = 0;
- while (buf[off] != ')') {
- args[size] = getType(buf, off);
- off += args[size].len + (args[size].sort == OBJECT ? 2 : 0);
- size += 1;
- }
- return args;
- }
-
- /**
- * Returns the Java types corresponding to the argument types of the given
- * method.
- *
- * @param method a method.
- * @return the Java types corresponding to the argument types of the given
- * method.
- */
- public static Type[] getArgumentTypes(final Method method) {
- Class[] classes = method.getParameterTypes();
- Type[] types = new Type[classes.length];
- for (int i = classes.length - 1; i >= 0; --i) {
- types[i] = getType(classes[i]);
- }
- return types;
- }
-
- /**
- * Returns the Java type corresponding to the return type of the given
- * method descriptor.
- *
- * @param methodDescriptor a method descriptor.
- * @return the Java type corresponding to the return type of the given
- * method descriptor.
- */
- public static Type getReturnType(final String methodDescriptor) {
- char[] buf = methodDescriptor.toCharArray();
- return getType(buf, methodDescriptor.indexOf(')') + 1);
- }
-
- /**
- * Returns the Java type corresponding to the return type of the given
- * method.
- *
- * @param method a method.
- * @return the Java type corresponding to the return type of the given
- * method.
- */
- public static Type getReturnType(final Method method) {
- return getType(method.getReturnType());
- }
-
- /**
- * Returns the Java type corresponding to the given type descriptor.
- *
- * @param buf a buffer containing a type descriptor.
- * @param off the offset of this descriptor in the previous buffer.
- * @return the Java type corresponding to the given type descriptor.
- */
- private static Type getType(final char[] buf, final int off) {
- int len;
- switch (buf[off]) {
- case 'V':
- return VOID_TYPE;
- case 'Z':
- return BOOLEAN_TYPE;
- case 'C':
- return CHAR_TYPE;
- case 'B':
- return BYTE_TYPE;
- case 'S':
- return SHORT_TYPE;
- case 'I':
- return INT_TYPE;
- case 'F':
- return FLOAT_TYPE;
- case 'J':
- return LONG_TYPE;
- case 'D':
- return DOUBLE_TYPE;
- case '[':
- len = 1;
- while (buf[off + len] == '[') {
- ++len;
- }
- if (buf[off + len] == 'L') {
- ++len;
- while (buf[off + len] != ';') {
- ++len;
- }
- }
- return new Type(ARRAY, buf, off, len + 1);
- // case 'L':
- default:
- len = 1;
- while (buf[off + len] != ';') {
- ++len;
- }
- return new Type(OBJECT, buf, off + 1, len - 1);
- }
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * Returns the sort of this Java type.
- *
- * @return {@link #VOID VOID}, {@link #BOOLEAN BOOLEAN},
- * {@link #CHAR CHAR}, {@link #BYTE BYTE}, {@link #SHORT SHORT},
- * {@link #INT INT}, {@link #FLOAT FLOAT}, {@link #LONG LONG},
- * {@link #DOUBLE DOUBLE}, {@link #ARRAY ARRAY} or
- * {@link #OBJECT OBJECT}.
- */
- public int getSort() {
- return sort;
- }
-
- /**
- * Returns the number of dimensions of this array type. This method should
- * only be used for an array type.
- *
- * @return the number of dimensions of this array type.
- */
- public int getDimensions() {
- int i = 1;
- while (buf[off + i] == '[') {
- ++i;
- }
- return i;
- }
-
- /**
- * Returns the type of the elements of this array type. This method should
- * only be used for an array type.
- *
- * @return Returns the type of the elements of this array type.
- */
- public Type getElementType() {
- return getType(buf, off + getDimensions());
- }
-
- /**
- * Returns the name of the class corresponding to this type.
- *
- * @return the fully qualified name of the class corresponding to this type.
- */
- public String getClassName() {
- switch (sort) {
- case VOID:
- return "void";
- case BOOLEAN:
- return "boolean";
- case CHAR:
- return "char";
- case BYTE:
- return "byte";
- case SHORT:
- return "short";
- case INT:
- return "int";
- case FLOAT:
- return "float";
- case LONG:
- return "long";
- case DOUBLE:
- return "double";
- case ARRAY:
- StringBuffer b = new StringBuffer(getElementType().getClassName());
- for (int i = getDimensions(); i > 0; --i) {
- b.append("[]");
- }
- return b.toString();
- // case OBJECT:
- default:
- return new String(buf, off, len).replace('/', '.');
- }
- }
-
- /**
- * Returns the internal name of the class corresponding to this object or
- * array type. The internal name of a class is its fully qualified name (as
- * returned by Class.getName(), where '.' are replaced by '/'. This method
- * should only be used for an object or array type.
- *
- * @return the internal name of the class corresponding to this object type.
- */
- public String getInternalName() {
- return new String(buf, off, len);
- }
-
- // ------------------------------------------------------------------------
- // Conversion to type descriptors
- // ------------------------------------------------------------------------
-
- /**
- * Returns the descriptor corresponding to this Java type.
- *
- * @return the descriptor corresponding to this Java type.
- */
- public String getDescriptor() {
- StringBuffer buf = new StringBuffer();
- getDescriptor(buf);
- return buf.toString();
- }
-
- /**
- * Returns the descriptor corresponding to the given argument and return
- * types.
- *
- * @param returnType the return type of the method.
- * @param argumentTypes the argument types of the method.
- * @return the descriptor corresponding to the given argument and return
- * types.
- */
- public static String getMethodDescriptor(
- final Type returnType,
- final Type[] argumentTypes)
- {
- StringBuffer buf = new StringBuffer();
- buf.append('(');
- for (int i = 0; i < argumentTypes.length; ++i) {
- argumentTypes[i].getDescriptor(buf);
- }
- buf.append(')');
- returnType.getDescriptor(buf);
- return buf.toString();
- }
-
- /**
- * Appends the descriptor corresponding to this Java type to the given
- * string buffer.
- *
- * @param buf the string buffer to which the descriptor must be appended.
- */
- private void getDescriptor(final StringBuffer buf) {
- switch (sort) {
- case VOID:
- buf.append('V');
- return;
- case BOOLEAN:
- buf.append('Z');
- return;
- case CHAR:
- buf.append('C');
- return;
- case BYTE:
- buf.append('B');
- return;
- case SHORT:
- buf.append('S');
- return;
- case INT:
- buf.append('I');
- return;
- case FLOAT:
- buf.append('F');
- return;
- case LONG:
- buf.append('J');
- return;
- case DOUBLE:
- buf.append('D');
- return;
- case ARRAY:
- buf.append(this.buf, off, len);
- return;
- // case OBJECT:
- default:
- buf.append('L');
- buf.append(this.buf, off, len);
- buf.append(';');
- }
- }
-
- // ------------------------------------------------------------------------
- // Direct conversion from classes to type descriptors,
- // without intermediate Type objects
- // ------------------------------------------------------------------------
-
- /**
- * Returns the internal name of the given class. The internal name of a
- * class is its fully qualified name, as returned by Class.getName(), where
- * '.' are replaced by '/'.
- *
- * @param c an object or array class.
- * @return the internal name of the given class.
- */
- public static String getInternalName(final Class c) {
- return c.getName().replace('.', '/');
- }
-
- /**
- * Returns the descriptor corresponding to the given Java type.
- *
- * @param c an object class, a primitive class or an array class.
- * @return the descriptor corresponding to the given class.
- */
- public static String getDescriptor(final Class c) {
- StringBuffer buf = new StringBuffer();
- getDescriptor(buf, c);
- return buf.toString();
- }
-
- /**
- * Returns the descriptor corresponding to the given constructor.
- *
- * @param c a {@link Constructor Constructor} object.
- * @return the descriptor of the given constructor.
- */
- public static String getConstructorDescriptor(final Constructor c) {
- Class[] parameters = c.getParameterTypes();
- StringBuffer buf = new StringBuffer();
- buf.append('(');
- for (int i = 0; i < parameters.length; ++i) {
- getDescriptor(buf, parameters[i]);
- }
- return buf.append(")V").toString();
- }
-
- /**
- * Returns the descriptor corresponding to the given method.
- *
- * @param m a {@link Method Method} object.
- * @return the descriptor of the given method.
- */
- public static String getMethodDescriptor(final Method m) {
- Class[] parameters = m.getParameterTypes();
- StringBuffer buf = new StringBuffer();
- buf.append('(');
- for (int i = 0; i < parameters.length; ++i) {
- getDescriptor(buf, parameters[i]);
- }
- buf.append(')');
- getDescriptor(buf, m.getReturnType());
- return buf.toString();
- }
-
- /**
- * Appends the descriptor of the given class to the given string buffer.
- *
- * @param buf the string buffer to which the descriptor must be appended.
- * @param c the class whose descriptor must be computed.
- */
- private static void getDescriptor(final StringBuffer buf, final Class c) {
- Class d = c;
- while (true) {
- if (d.isPrimitive()) {
- char car;
- if (d == Integer.TYPE) {
- car = 'I';
- } else if (d == Void.TYPE) {
- car = 'V';
- } else if (d == Boolean.TYPE) {
- car = 'Z';
- } else if (d == Byte.TYPE) {
- car = 'B';
- } else if (d == Character.TYPE) {
- car = 'C';
- } else if (d == Short.TYPE) {
- car = 'S';
- } else if (d == Double.TYPE) {
- car = 'D';
- } else if (d == Float.TYPE) {
- car = 'F';
- } else /* if (d == Long.TYPE) */{
- car = 'J';
- }
- buf.append(car);
- return;
- } else if (d.isArray()) {
- buf.append('[');
- d = d.getComponentType();
- } else {
- buf.append('L');
- String name = d.getName();
- int len = name.length();
- for (int i = 0; i < len; ++i) {
- char car = name.charAt(i);
- buf.append(car == '.' ? '/' : car);
- }
- buf.append(';');
- return;
- }
- }
- }
-
- // ------------------------------------------------------------------------
- // Corresponding size and opcodes
- // ------------------------------------------------------------------------
-
- /**
- * Returns the size of values of this type.
- *
- * @return the size of values of this type, i.e., 2 for <tt>long</tt> and
- * <tt>double</tt>, and 1 otherwise.
- */
- public int getSize() {
- return sort == LONG || sort == DOUBLE ? 2 : 1;
- }
-
- /**
- * Returns a JVM instruction opcode adapted to this Java type.
- *
- * @param opcode a JVM instruction opcode. This opcode must be one of ILOAD,
- * ISTORE, IALOAD, IASTORE, IADD, ISUB, IMUL, IDIV, IREM, INEG, ISHL,
- * ISHR, IUSHR, IAND, IOR, IXOR and IRETURN.
- * @return an opcode that is similar to the given opcode, but adapted to
- * this Java type. For example, if this type is <tt>float</tt> and
- * <tt>opcode</tt> is IRETURN, this method returns FRETURN.
- */
- public int getOpcode(final int opcode) {
- if (opcode == Opcodes.IALOAD || opcode == Opcodes.IASTORE) {
- switch (sort) {
- case BOOLEAN:
- case BYTE:
- return opcode + 5;
- case CHAR:
- return opcode + 6;
- case SHORT:
- return opcode + 7;
- case INT:
- return opcode;
- case FLOAT:
- return opcode + 2;
- case LONG:
- return opcode + 1;
- case DOUBLE:
- return opcode + 3;
- // case ARRAY:
- // case OBJECT:
- default:
- return opcode + 4;
- }
- } else {
- switch (sort) {
- case VOID:
- return opcode + 5;
- case BOOLEAN:
- case CHAR:
- case BYTE:
- case SHORT:
- case INT:
- return opcode;
- case FLOAT:
- return opcode + 2;
- case LONG:
- return opcode + 1;
- case DOUBLE:
- return opcode + 3;
- // case ARRAY:
- // case OBJECT:
- default:
- return opcode + 4;
- }
- }
- }
-
- // ------------------------------------------------------------------------
- // Equals, hashCode and toString
- // ------------------------------------------------------------------------
-
- /**
- * Tests if the given object is equal to this type.
- *
- * @param o the object to be compared to this type.
- * @return <tt>true</tt> if the given object is equal to this type.
- */
- public boolean equals(final Object o) {
- if (this == o) {
- return true;
- }
- if (!(o instanceof Type)) {
- return false;
- }
- Type t = (Type) o;
- if (sort != t.sort) {
- return false;
- }
- if (sort == OBJECT || sort == ARRAY) {
- if (len != t.len) {
- return false;
- }
- for (int i = off, j = t.off, end = i + len; i < end; i++, j++) {
- if (buf[i] != t.buf[j]) {
- return false;
- }
- }
- }
- return true;
- }
-
- /**
- * Returns a hash code value for this type.
- *
- * @return a hash code value for this type.
- */
- public int hashCode() {
- int hc = 13 * sort;
- if (sort == OBJECT || sort == ARRAY) {
- for (int i = off, end = i + len; i < end; i++) {
- hc = 17 * (hc + buf[i]);
- }
- }
- return hc;
- }
-
- /**
- * Returns a string representation of this type.
- *
- * @return the descriptor of this type.
- */
- public String toString() {
- return getDescriptor();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/package-info.java
deleted file mode 100644
index a9c675cb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/package-info.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- *
- * <P>This document describes the architecture of JAX-WS 2.0 runtime. JAX-WS is
- * the aggregating component of what is called the integrated Stack
- * (I-Stack). The I-Stack consists of JAX-WS, JAX-B, StAX, SAAJ and Fast
- * Infoset. JAX-B is the databinding component of the stack. StAX is the
- * Streaming XML parser used by the stack. SAAJ is used for its
- * attachment support with SOAP messages and to allow handler developers
- * to gain access to the SOAP message via a standard interface. Fast
- * Infoset is a binary encoding of XML that can improve performance.</P>
- * <P>The remainder of this document will describe the JAX-WS runtime
- * architecture from the client and server perspectives.</P>
- *
- * <p>
- * <dl>
- * <dt>{@link com.sun.xml.internal.ws.server Server}
- * <dd>
- * The server side portion of the JAX-WS runtime.
- *
- * <dt>{@link com.sun.xml.internal.ws.client Client}
- * <dd>
- * The client side portion of the JAX-WS runtime.
- *
- * </dl>
- *
- * @ArchitectureDocument
- **/
-package com.sun.xml.internal.ws;
-
-//import javax.xml.ws.Binding;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/AssertionSet.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/AssertionSet.java
deleted file mode 100644
index 8a011189..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/AssertionSet.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.TreeSet;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * The AssertionSet is a set of assertions. It represents a single policy alternative.
- *
- * @author Fabian Ritzmann, Marek Potociar
- */
-public final class AssertionSet implements Iterable<PolicyAssertion>, Comparable<AssertionSet> {
- private static final AssertionSet EMPTY_ASSERTION_SET = new AssertionSet(Collections.unmodifiableList(new LinkedList<PolicyAssertion>()));
- /**
- * The comparator comapres policy assertions according to their publicly accessible attributes, in the following
- * order of attributes:
- *
- * 1. namespace (not null String)
- * 2. local name (not null String)
- * 3. value (String): null < "" < "not empty"
- * 4. has nested assertions (boolean): false < true
- * 5. has nested policy (boolean): false < true
- * 6. hashCode comparison
- */
- private static final Comparator<PolicyAssertion> ASSERTION_COMPARATOR = new Comparator<PolicyAssertion>() {
- public int compare(final PolicyAssertion pa1, final PolicyAssertion pa2) {
- if (pa1.equals(pa2)) {
- return 0;
- }
-
- int result;
-
- result = PolicyUtils.Comparison.QNAME_COMPARATOR.compare(pa1.getName(), pa2.getName());
- if (result != 0) {
- return result;
- }
-
- result = PolicyUtils.Comparison.compareNullableStrings(pa1.getValue(), pa2.getValue());
- if (result != 0) {
- return result;
- }
-
- result = PolicyUtils.Comparison.compareBoolean(pa1.hasNestedAssertions(), pa2.hasNestedAssertions());
- if (result != 0) {
- return result;
- }
-
- result = PolicyUtils.Comparison.compareBoolean(pa1.hasNestedPolicy(), pa2.hasNestedPolicy());
- if (result != 0) {
- return result;
- }
-
- return Math.round(Math.signum(pa1.hashCode() - pa2.hashCode()));
- }
- };
-
- private final List<PolicyAssertion> assertions;
- private final Set<QName> vocabulary = new TreeSet<QName>(PolicyUtils.Comparison.QNAME_COMPARATOR);
- private final Collection<QName> immutableVocabulary = Collections.unmodifiableCollection(vocabulary);
-
- private AssertionSet(List<PolicyAssertion> list) {
- assert (list != null) : LocalizationMessages.WSP_0037_PRIVATE_CONSTRUCTOR_DOES_NOT_TAKE_NULL();
- this.assertions = list;
- }
-
- private AssertionSet(final Collection<AssertionSet> alternatives) {
- this.assertions = new LinkedList<PolicyAssertion>();
- for (AssertionSet alternative : alternatives) {
- addAll(alternative.assertions);
- }
- }
-
- private boolean add(final PolicyAssertion assertion) {
- if (assertion == null) {
- return false;
- }
-
- if (this.assertions.contains(assertion)) {
- return false;
- } else {
- this.assertions.add(assertion);
- this.vocabulary.add(assertion.getName());
- return true;
- }
- }
-
- private boolean addAll(final Collection<? extends PolicyAssertion> assertions) {
- boolean result = true;
-
- if (assertions != null) {
- for (PolicyAssertion assertion : assertions) {
- result &= add(assertion); // this is here to ensure that vocabulary is built correctly as well
- }
- }
-
- return result;
- }
-
- /**
- * Return all assertions contained in this assertion set.
- *
- * @return All assertions contained in this assertion set
- */
- Collection<PolicyAssertion> getAssertions() {
- return assertions;
- }
-
- /**
- * Retrieves the vocabulary of this policy expression. The vocabulary is represented by an immutable collection of
- * unique QName objects. Each of those objects represents single assertion type contained in the assertion set.
- *
- * @return immutable collection of assertion types contained in the assertion set (a policy vocabulary).
- */
- Collection<QName> getVocabulary() {
- return immutableVocabulary;
- }
-
- /**
- * Checks whether this policy alternative is compatible with the provided policy alternative.
- *
- * @param alternative policy alternative used for compatibility test
- * @param mode compatibility mode to be used
- * @return {@code true} if the two policy alternatives are compatible, {@code false} otherwise
- */
- boolean isCompatibleWith(final AssertionSet alternative, PolicyIntersector.CompatibilityMode mode) {
- boolean result = (mode == PolicyIntersector.CompatibilityMode.LAX) || this.vocabulary.equals(alternative.vocabulary);
-
- result = result && this.areAssertionsCompatible(alternative, mode);
- result = result && alternative.areAssertionsCompatible(this, mode);
-
- return result;
- }
-
- private boolean areAssertionsCompatible(final AssertionSet alternative, PolicyIntersector.CompatibilityMode mode) {
- nextAssertion: for (PolicyAssertion thisAssertion : this.assertions) {
- if ((mode == PolicyIntersector.CompatibilityMode.STRICT) || !thisAssertion.isIgnorable()) {
- for (PolicyAssertion thatAssertion : alternative.assertions) {
- if (thisAssertion.isCompatibleWith(thatAssertion, mode)) {
- continue nextAssertion;
- }
- }
- return false;
- }
- }
- return true;
- }
-
- /**
- * Creates and returns new assertion set holding content of all provided policy assertion sets.
- * <p/>
- * This method should not be used to perform a merge of general Policy instances. A client should be aware of the
- * method's result meaning and the difference between merge of Policy instances and merge of AssertionSet instances.
- *
- *
- * @param alternatives collection of provided policy assertion sets which content is to be stored in the assertion set.
- * May be {@code null} - empty assertion set is returned in such case.
- * @return new instance of assertion set holding the content of all provided policy assertion sets.
- */
- public static AssertionSet createMergedAssertionSet(final Collection<AssertionSet> alternatives) {
- if (alternatives == null || alternatives.isEmpty()) {
- return EMPTY_ASSERTION_SET;
- }
-
- final AssertionSet result = new AssertionSet(alternatives);
- Collections.sort(result.assertions, ASSERTION_COMPARATOR);
-
- return result;
- }
-
- /**
- * Creates and returns new assertion set holding a set of provided policy assertions.
- *
- * @param assertions collection of provided policy assertions to be stored in the assertion set. May be {@code null}.
- * @return new instance of assertion set holding the provided policy assertions
- */
- public static AssertionSet createAssertionSet(final Collection<? extends PolicyAssertion> assertions) {
- if (assertions == null || assertions.isEmpty()) {
- return EMPTY_ASSERTION_SET;
- }
-
- final AssertionSet result = new AssertionSet(new LinkedList<PolicyAssertion>());
- result.addAll(assertions);
- Collections.sort(result.assertions, ASSERTION_COMPARATOR);
-
- return result;
- }
-
- public static AssertionSet emptyAssertionSet() {
- return EMPTY_ASSERTION_SET;
- }
- /**
- * Returns an iterator over a set of child policy assertion objects.
- *
- * @return policy assertion Iterator.
- */
- public Iterator<PolicyAssertion> iterator() {
- return this.assertions.iterator();
- }
-
- /**
- * Searches for assertions with given name. Only assertions that are contained as immediate children of the assertion set are
- * searched, i.e. nested policies are not searched.
- *
- * @param name The fully qualified name of searched assertion
- * @return List of all assertions matching the requested name. If no assertions are found, the returned list is empty
- * (i.e. {@code null} value is never returned).
- */
- public Collection<PolicyAssertion> get(final QName name) {
- final List<PolicyAssertion> matched = new LinkedList<PolicyAssertion>();
-
- if (vocabulary.contains(name)) {
- // we iterate the assertion set only if we are sure we contain such assertion name in our vocabulary
- for (PolicyAssertion assertion : assertions) {
- if (assertion.getName().equals(name)) {
- matched.add(assertion);
- }
- }
- }
-
- return matched;
- }
-
- /**
- * Returns {@code true} if this assertion set contains no assertions.
- *
- * @return {@code true} if this assertion set contains no assertions.
- */
- public boolean isEmpty() {
- return assertions.isEmpty();
- }
-
- /**
- * Returns true if the assertion set contains the assertion name specified in its vocabulary
- *
- * @param assertionName the fully qualified name of the assertion
- * @return {@code true}, if an assertion with the given name could be found in the assertion set vocabulary {@code false} otherwise.
- */
- public boolean contains(final QName assertionName) {
- return vocabulary.contains(assertionName);
- }
-
- /**
- * An {@code Comparable<T>.compareTo(T o)} interface method implementation.
- * @param that other alternative to compare with
- */
- public int compareTo(final AssertionSet that) {
- if (this.equals(that)) {
- return 0;
- }
-
- // comparing vocabularies
- final Iterator<QName> vIterator1 = this.getVocabulary().iterator();
- final Iterator<QName> vIterator2 = that.getVocabulary().iterator();
- while (vIterator1.hasNext()) {
- final QName entry1 = vIterator1.next();
- if (vIterator2.hasNext()) {
- final QName entry2 = vIterator2.next();
- final int result = PolicyUtils.Comparison.QNAME_COMPARATOR.compare(entry1, entry2);
- if (result != 0) {
- return result;
- }
- } else {
- return 1; // we have more entries in this vocabulary
- }
- }
-
- if (vIterator2.hasNext()) {
- return -1; // we have more entries in that vocabulary
- }
-
- // vocabularies are equal => comparing assertions
- final Iterator<PolicyAssertion> pIterator1 = this.getAssertions().iterator();
- final Iterator<PolicyAssertion> pIterator2 = that.getAssertions().iterator();
- while (pIterator1.hasNext()) {
- final PolicyAssertion pa1 = pIterator1.next();
- if (pIterator2.hasNext()) {
- final PolicyAssertion pa2 = pIterator2.next();
- final int result = ASSERTION_COMPARATOR.compare(pa1, pa2);
- if (result != 0) {
- return result;
- }
- } else {
- return 1; // we have more entries in this assertion set
- }
- }
-
- if (pIterator2.hasNext()) {
- return -1; // we have more entries in that assertion set
- }
-
- // seems like objects are very simmilar although not equal => we must not return 0 otherwise the TreeSet
- // holding this element would discard the newly added element. Thus we return that the first argument is
- // greater than second (just because it is first...)
- return 1;
- }
-
- /**
- * An {@code Object.equals(Object obj)} method override.
- */
- public boolean equals(final Object obj) {
- if (this == obj) {
- return true;
- }
-
- if (!(obj instanceof AssertionSet)) {
- return false;
- }
-
- final AssertionSet that = (AssertionSet) obj;
- boolean result = true;
-
- result = result && this.vocabulary.equals(that.vocabulary);
- result = result && this.assertions.size() == that.assertions.size() && this.assertions.containsAll(that.assertions);
-
- return result;
- }
-
- /**
- * An {@code Object.hashCode()} method override.
- */
- public int hashCode() {
- int result = 17;
-
- result = 37 * result + vocabulary.hashCode();
- result = 37 * result + assertions.hashCode();
-
- return result;
- }
-
- /**
- * An {@code Object.toString()} method override.
- */
- public String toString() {
- return toString(0, new StringBuffer()).toString();
- }
-
- /**
- * A helper method that appends indented string representation of this instance to the input string buffer.
- *
- * @param indentLevel indentation level to be used.
- * @param buffer buffer to be used for appending string representation of this instance
- * @return modified buffer containing new string representation of the instance
- */
- StringBuffer toString(final int indentLevel, final StringBuffer buffer) {
- final String indent = PolicyUtils.Text.createIndent(indentLevel);
- final String innerIndent = PolicyUtils.Text.createIndent(indentLevel + 1);
-
- buffer.append(indent).append("assertion set {").append(PolicyUtils.Text.NEW_LINE);
-
- if (assertions.isEmpty()) {
- buffer.append(innerIndent).append("no assertions").append(PolicyUtils.Text.NEW_LINE);
- } else {
- for (PolicyAssertion assertion : assertions) {
- assertion.toString(indentLevel + 1, buffer).append(PolicyUtils.Text.NEW_LINE);
- }
- }
-
- buffer.append(indent).append('}');
-
- return buffer;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/AssertionValidationProcessor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/AssertionValidationProcessor.java
deleted file mode 100644
index 55aaa635..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/AssertionValidationProcessor.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
-import com.sun.xml.internal.ws.policy.spi.PolicyAssertionValidator;
-import static com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages.WSP_0076_NO_SERVICE_PROVIDERS_FOUND;
-
-import java.util.Collection;
-import java.util.LinkedList;
-
-/**
- * Provides methods for assertion validation.
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- * @author Fabian Ritzmann
- */
-public class AssertionValidationProcessor {
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(AssertionValidationProcessor.class);
-
- private final Collection<PolicyAssertionValidator> validators = new LinkedList<PolicyAssertionValidator>();
-
- /**
- * This constructor instantiates the object with a set of dynamically
- * discovered PolicyAssertionValidators.
- *
- * @throws PolicyException Thrown if the set of dynamically discovered
- * PolicyAssertionValidators is empty.
- */
- private AssertionValidationProcessor() throws PolicyException {
- this(null);
- }
-
- /**
- * This constructor adds the given set of policy validators to the dynamically
- * discovered PolicyAssertionValidators.
- *
- * This constructor is intended to be used by the JAX-WS com.sun.xml.internal.ws.policy.api.ValidationProcessor.
- *
- * @param policyValidators A set of PolicyAssertionValidators. May be null
- * @throws PolicyException Thrown if the set of given PolicyAssertionValidators
- * and dynamically discovered PolicyAssertionValidators is empty.
- */
- protected AssertionValidationProcessor(final Collection<PolicyAssertionValidator> policyValidators)
- throws PolicyException {
- for(PolicyAssertionValidator validator : PolicyUtils.ServiceProvider.load(PolicyAssertionValidator.class)) {
- validators.add(validator);
- }
- if (policyValidators != null) {
- for (PolicyAssertionValidator validator : policyValidators) {
- validators.add(validator);
- }
- }
- if (validators.size() == 0) {
- throw LOGGER.logSevereException(new PolicyException(WSP_0076_NO_SERVICE_PROVIDERS_FOUND(PolicyAssertionValidator.class.getName())));
- }
- }
-
- /**
- * Factory method that returns singleton instance of the class.
- *
- * This method is only intended to be used by code that has no dependencies on
- * JAX-WS. Otherwise use com.sun.xml.internal.ws.api.policy.ValidationProcessor.
- *
- * @return singleton An instance of the class.
- * @throws PolicyException If instantiation failed.
- */
- public static AssertionValidationProcessor getInstance() throws PolicyException {
- return new AssertionValidationProcessor();
- }
-
- /**
- * Validates fitness of the {@code assertion} on the client side.
- *
- * return client side {@code assertion} fitness
- * @param assertion The assertion to be validated.
- * @return The fitness of the assertion on the client side.
- * @throws PolicyException If validation failed.
- */
- public PolicyAssertionValidator.Fitness validateClientSide(final PolicyAssertion assertion) throws PolicyException {
- PolicyAssertionValidator.Fitness assertionFitness = PolicyAssertionValidator.Fitness.UNKNOWN;
- for ( PolicyAssertionValidator validator : validators ) {
- assertionFitness = assertionFitness.combine(validator.validateClientSide(assertion));
- if (assertionFitness == PolicyAssertionValidator.Fitness.SUPPORTED) {
- break;
- }
- }
-
- return assertionFitness;
- }
-
- /**
- * Validates fitness of the {@code assertion} on the server side.
- *
- * return server side {@code assertion} fitness
- * @param assertion The assertion to be validated.
- * @return The fitness of the assertion on the server side.
- * @throws PolicyException If validation failed.
- */
- public PolicyAssertionValidator.Fitness validateServerSide(final PolicyAssertion assertion) throws PolicyException {
- PolicyAssertionValidator.Fitness assertionFitness = PolicyAssertionValidator.Fitness.UNKNOWN;
- for (PolicyAssertionValidator validator : validators) {
- assertionFitness = assertionFitness.combine(validator.validateServerSide(assertion));
- if (assertionFitness == PolicyAssertionValidator.Fitness.SUPPORTED) {
- break;
- }
- }
-
- return assertionFitness;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/ComplexAssertion.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/ComplexAssertion.java
deleted file mode 100644
index 0a0e6dcb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/ComplexAssertion.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.sourcemodel.AssertionData;
-import java.util.Collection;
-
-/**
- * Complex assertion is an abstract class that serves as a base class for any assertion
- * that <b>MAY</b> contain nested policies.
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public abstract class ComplexAssertion extends PolicyAssertion {
-
- private final NestedPolicy nestedPolicy;
-
- protected ComplexAssertion() {
- super();
-
- this.nestedPolicy = NestedPolicy.createNestedPolicy(AssertionSet.emptyAssertionSet());
- }
-
- protected ComplexAssertion(final AssertionData data, final Collection<? extends PolicyAssertion> assertionParameters, final AssertionSet nestedAlternative) {
- super(data, assertionParameters);
-
- AssertionSet nestedSet = (nestedAlternative != null) ? nestedAlternative : AssertionSet.emptyAssertionSet();
- this.nestedPolicy = NestedPolicy.createNestedPolicy(nestedSet);
- }
-
- @Override
- public final boolean hasNestedPolicy() {
- return true;
- }
-
- @Override
- public final NestedPolicy getNestedPolicy() {
- return nestedPolicy;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/EffectiveAlternativeSelector.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/EffectiveAlternativeSelector.java
deleted file mode 100644
index 20386884..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/EffectiveAlternativeSelector.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.spi.PolicyAssertionValidator.Fitness;
-import java.util.Collection;
-import java.util.LinkedList;
-
-/**
- * Contains static methods for policy alternative selection. Given policy map is changed so that
- * each effective policy contains at most one policy alternative. Uses domain
- * specific @see com.sun.xml.internal.ws.policy.spi.PolicySelector
- * to find out whether particular policy assertion is actually supported.
- *
- * If you are using JAX-WS, use the com.sun.xml.internal.ws.api.policy.AlternativeSelector
- * instead of this class.
- *
- * @author Jakub Podlesak (jakub.podlesak at sun.com)
- * @author Fabian Ritzmann
- */
-public class EffectiveAlternativeSelector {
- private enum AlternativeFitness {
- UNEVALUATED {
- AlternativeFitness combine(final Fitness assertionFitness) {
- switch (assertionFitness) {
- case UNKNOWN:
- return UNKNOWN;
- case UNSUPPORTED:
- return UNSUPPORTED;
- case SUPPORTED:
- return SUPPORTED;
- case INVALID:
- return INVALID;
- default:
- return UNEVALUATED;
- }
- }
- },
- INVALID {
- AlternativeFitness combine(final Fitness assertionFitness) {
- return INVALID;
- }
- },
- UNKNOWN {
- AlternativeFitness combine(final Fitness assertionFitness) {
- switch (assertionFitness) {
- case UNKNOWN:
- return UNKNOWN;
- case UNSUPPORTED:
- return UNSUPPORTED;
- case SUPPORTED:
- return PARTIALLY_SUPPORTED;
- case INVALID:
- return INVALID;
- default:
- return UNEVALUATED;
- }
- }
- },
- UNSUPPORTED {
- AlternativeFitness combine(final Fitness assertionFitness) {
- switch (assertionFitness) {
- case UNKNOWN:
- case UNSUPPORTED:
- return UNSUPPORTED;
- case SUPPORTED:
- return PARTIALLY_SUPPORTED;
- case INVALID:
- return INVALID;
- default:
- return UNEVALUATED;
- }
- }
- },
- PARTIALLY_SUPPORTED {
- AlternativeFitness combine(final Fitness assertionFitness) {
- switch (assertionFitness) {
- case UNKNOWN:
- case UNSUPPORTED:
- case SUPPORTED:
- return PARTIALLY_SUPPORTED;
- case INVALID:
- return INVALID;
- default:
- return UNEVALUATED;
- }
- }
- },
- SUPPORTED_EMPTY {
- AlternativeFitness combine(final Fitness assertionFitness) {
- // will not localize - this exception may not occur if there is no programatic error in this class
- throw new UnsupportedOperationException("Combine operation was called unexpectedly on 'SUPPORTED_EMPTY' alternative fitness enumeration state.");
- }
- },
- SUPPORTED {
- AlternativeFitness combine(final Fitness assertionFitness) {
- switch (assertionFitness) {
- case UNKNOWN:
- case UNSUPPORTED:
- return PARTIALLY_SUPPORTED;
- case SUPPORTED:
- return SUPPORTED;
- case INVALID:
- return INVALID;
- default:
- return UNEVALUATED;
- }
- }
- };
-
- abstract AlternativeFitness combine(Fitness assertionFitness);
- }
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(EffectiveAlternativeSelector.class);
-
- /**
- * Does the selection for policy map bound to given modifier.
- *
- * If you are using JAX-WS, use the com.sun.xml.internal.ws.api.policy.AlternativeSelector
- * instead of this class.
- *
- * @param modifier Holds the policy map
- * @throws PolicyException Most likely an internal error if a policy could not be read or set on the policy map
- * @see EffectivePolicyModifier which the map is bound to
- */
- public static void doSelection(final EffectivePolicyModifier modifier) throws PolicyException {
- final AssertionValidationProcessor validationProcessor = AssertionValidationProcessor.getInstance();
- selectAlternatives(modifier, validationProcessor);
- }
-
- /**
- * This method is intended to be called by extension classes that need to
- * override the behavior of {@link #doSelection}.
- *
- * @param modifier
- * @param validationProcessor
- * @throws PolicyException
- */
- protected static void selectAlternatives(final EffectivePolicyModifier modifier,
- final AssertionValidationProcessor validationProcessor)
- throws PolicyException {
- final PolicyMap map = modifier.getMap();
- for (PolicyMapKey mapKey : map.getAllServiceScopeKeys()) {
- final Policy oldPolicy = map.getServiceEffectivePolicy(mapKey);
- modifier.setNewEffectivePolicyForServiceScope(mapKey, selectBestAlternative(oldPolicy, validationProcessor));
- }
- for (PolicyMapKey mapKey : map.getAllEndpointScopeKeys()) {
- final Policy oldPolicy = map.getEndpointEffectivePolicy(mapKey);
- modifier.setNewEffectivePolicyForEndpointScope(mapKey, selectBestAlternative(oldPolicy, validationProcessor));
- }
- for (PolicyMapKey mapKey : map.getAllOperationScopeKeys()) {
- final Policy oldPolicy = map.getOperationEffectivePolicy(mapKey);
- modifier.setNewEffectivePolicyForOperationScope(mapKey, selectBestAlternative(oldPolicy, validationProcessor));
- }
- for (PolicyMapKey mapKey : map.getAllInputMessageScopeKeys()) {
- final Policy oldPolicy = map.getInputMessageEffectivePolicy(mapKey);
- modifier.setNewEffectivePolicyForInputMessageScope(mapKey, selectBestAlternative(oldPolicy, validationProcessor));
- }
- for (PolicyMapKey mapKey : map.getAllOutputMessageScopeKeys()) {
- final Policy oldPolicy = map.getOutputMessageEffectivePolicy(mapKey);
- modifier.setNewEffectivePolicyForOutputMessageScope(mapKey, selectBestAlternative(oldPolicy, validationProcessor));
- }
- for (PolicyMapKey mapKey : map.getAllFaultMessageScopeKeys()) {
- final Policy oldPolicy = map.getFaultMessageEffectivePolicy(mapKey);
- modifier.setNewEffectivePolicyForFaultMessageScope(mapKey, selectBestAlternative(oldPolicy, validationProcessor));
- }
- }
-
- private static Policy selectBestAlternative(final Policy policy, final AssertionValidationProcessor validationProcessor) throws PolicyException {
- AssertionSet bestAlternative = null;
- AlternativeFitness bestAlternativeFitness = AlternativeFitness.UNEVALUATED;
- for (AssertionSet alternative : policy) {
- AlternativeFitness alternativeFitness = (alternative.isEmpty()) ? AlternativeFitness.SUPPORTED_EMPTY : AlternativeFitness.UNEVALUATED;
- for ( PolicyAssertion assertion : alternative ) {
-
- final Fitness assertionFitness = validationProcessor.validateClientSide(assertion);
- switch(assertionFitness) {
- case UNKNOWN:
- case UNSUPPORTED:
- case INVALID:
- LOGGER.warning(LocalizationMessages.WSP_0075_PROBLEMATIC_ASSERTION_STATE(assertion.getName(), assertionFitness));
- break;
- default:
- break;
- }
-
- alternativeFitness = alternativeFitness.combine(assertionFitness);
- }
-
- if (bestAlternativeFitness.compareTo(alternativeFitness) < 0) {
- // better alternative found
- bestAlternative = alternative;
- bestAlternativeFitness = alternativeFitness;
- }
-
- if (bestAlternativeFitness == AlternativeFitness.SUPPORTED) {
- // all assertions supported by at least one selector
- break;
- }
- }
-
- switch (bestAlternativeFitness) {
- case INVALID:
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0053_INVALID_CLIENT_SIDE_ALTERNATIVE()));
- case UNKNOWN:
- case UNSUPPORTED:
- case PARTIALLY_SUPPORTED:
- LOGGER.warning(LocalizationMessages.WSP_0019_SUBOPTIMAL_ALTERNATIVE_SELECTED(bestAlternativeFitness));
- break;
- default:
- break;
- }
-
- Collection<AssertionSet> alternativeSet = null;
- if (bestAlternative != null) {
- // return a policy containing just the picked alternative
- alternativeSet = new LinkedList<AssertionSet>();
- alternativeSet.add(bestAlternative);
- }
- return Policy.createPolicy(policy.getNamespaceVersion(), policy.getName(), policy.getId(), alternativeSet);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/EffectivePolicyModifier.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/EffectivePolicyModifier.java
deleted file mode 100644
index f577e17a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/EffectivePolicyModifier.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-/**
- * The class serves as a policy map mutator that allows for replacement of current effective policies
- * stored in the policy map with new effective policy provided by the mutator user.
- *
- * @author Marek Potociar (marek.potociar@sun.com)
- */
-public final class EffectivePolicyModifier extends PolicyMapMutator {
- public static EffectivePolicyModifier createEffectivePolicyModifier() {
- return new EffectivePolicyModifier();
- }
-
- /**
- * Ensures that direct instantiation is not possible from outside of the class
- */
- private EffectivePolicyModifier() {
- // no initialization required
- }
-
- /**
- * Replaces current effective policy on the service scope (identified by a {@code key} parameter) with the new efective
- * policy provided as a second input parameter. If no policy was defined for the presented key, the new policy is simply
- * stored with the key.
- *
- * @param key identifier of the scope the effective policy should be replaced with the new one. Must not be {@code null}.
- * @param newEffectivePolicy the new policy to replace the old effective policy of the scope. Must not be {@code null}.
- *
- * @throws IllegalArgumentException in case any of the input parameters is {@code null}
- */
- public void setNewEffectivePolicyForServiceScope(
- final PolicyMapKey key, final Policy newEffectivePolicy) {
- getMap().setNewEffectivePolicyForScope(PolicyMap.ScopeType.SERVICE, key, newEffectivePolicy);
- }
-
- /**
- * Replaces current effective policy on the endpoint scope (identified by a {@code key} parameter) with the new efective
- * policy provided as a second input parameter.
- *
- * @param key identifier of the scope the effective policy should be replaced with the new one. Must not be {@code null}.
- * @param newEffectivePolicy the new policy to replace the old effective policy of the scope. Must not be {@code null}.
- *
- * @throws IllegalArgumentException in case any of the input parameters is {@code null}
- */
- public void setNewEffectivePolicyForEndpointScope(
- final PolicyMapKey key, final Policy newEffectivePolicy) {
- getMap().setNewEffectivePolicyForScope(PolicyMap.ScopeType.ENDPOINT, key, newEffectivePolicy);
- }
-
- /**
- * Replaces current effective policy on the operation scope (identified by a {@code key} parameter) with the new efective
- * policy provided as a second input parameter. If no policy was defined for the presented key, the new policy is simply
- * stored with the key.
- *
- * @param key identifier of the scope the effective policy should be replaced with the new one. Must not be {@code null}.
- * @param newEffectivePolicy the new policy to replace the old effective policy of the scope. Must not be {@code null}.
- *
- * @throws IllegalArgumentException in case any of the input parameters is {@code null}
- */
- public void setNewEffectivePolicyForOperationScope(
- final PolicyMapKey key, final Policy newEffectivePolicy) {
- getMap().setNewEffectivePolicyForScope(PolicyMap.ScopeType.OPERATION, key, newEffectivePolicy);
- }
-
- /**
- * Replaces current effective policy on the input message scope (identified by a {@code key} parameter) with the new efective
- * policy provided as a second input parameter. If no policy was defined for the presented key, the new policy is simply
- * stored with the key.
- *
- * @param key identifier of the scope the effective policy should be replaced with the new one. Must not be {@code null}.
- * @param newEffectivePolicy the new policy to replace the old effective policy of the scope. Must not be {@code null}.
- *
- * @throws IllegalArgumentException in case any of the input parameters is {@code null}
- */
- public void setNewEffectivePolicyForInputMessageScope(
- final PolicyMapKey key, final Policy newEffectivePolicy) {
- getMap().setNewEffectivePolicyForScope(PolicyMap.ScopeType.INPUT_MESSAGE, key, newEffectivePolicy);
- }
-
- /**
- * Replaces current effective policy on the output message scope (identified by a {@code key} parameter) with the new efective
- * policy provided as a second input parameter. If no policy was defined for the presented key, the new policy is simply
- * stored with the key.
- *
- * @param key identifier of the scope the effective policy should be replaced with the new one. Must not be {@code null}.
- * @param newEffectivePolicy the new policy to replace the old effective policy of the scope. Must not be {@code null}.
- *
- * @throws IllegalArgumentException in case any of the input parameters is {@code null}
- */
- public void setNewEffectivePolicyForOutputMessageScope(
- final PolicyMapKey key, final Policy newEffectivePolicy) {
- getMap().setNewEffectivePolicyForScope(PolicyMap.ScopeType.OUTPUT_MESSAGE, key, newEffectivePolicy);
- }
-
- /**
- * Replaces current effective policy on the fault message scope (identified by a {@code key} parameter) with the new efective
- * policy provided as a second input parameter. If no policy was defined for the presented key, the new policy is simply
- * stored with the key.
- *
- * @param key identifier of the scope the effective policy should be replaced with the new one. Must not be {@code null}.
- * @param newEffectivePolicy the new policy to replace the old effective policy of the scope. Must not be {@code null}.
- *
- * @throws IllegalArgumentException in case any of the input parameters is {@code null}
- */
- public void setNewEffectivePolicyForFaultMessageScope(
- final PolicyMapKey key, final Policy newEffectivePolicy) {
- getMap().setNewEffectivePolicyForScope(PolicyMap.ScopeType.FAULT_MESSAGE, key, newEffectivePolicy);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/NestedPolicy.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/NestedPolicy.java
deleted file mode 100644
index 1a5f7bb8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/NestedPolicy.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-/**
- * A special policy implementation that assures that only no or single policy alternative is possible within this type of policy.
- *
- * @author Marek Potociar
- */
-public final class NestedPolicy extends Policy {
- private static final String NESTED_POLICY_TOSTRING_NAME = "nested policy";
-
- private NestedPolicy(final AssertionSet set) {
- super(NESTED_POLICY_TOSTRING_NAME, Arrays.asList(new AssertionSet[] { set }));
- }
-
- private NestedPolicy(final String name, final String policyId, final AssertionSet set) {
- super(NESTED_POLICY_TOSTRING_NAME, name, policyId, Arrays.asList(new AssertionSet[] { set }));
- }
-
- static NestedPolicy createNestedPolicy(final AssertionSet set) {
- return new NestedPolicy(set);
- }
-
- static NestedPolicy createNestedPolicy(final String name, final String policyId, final AssertionSet set) {
- return new NestedPolicy(name, policyId, set);
- }
-
- /**
- * Returns the AssertionSet instance representing a single policy alterantive held wihtin this nested policy object.
- * If the nested policy represents a policy with no alternatives (i.e. nothing is allowed) the method returns {@code null}.
- *
- * @return nested policy alternative represented by AssertionSet object. May return {@code null} in case the nested policy
- * represents 'nothing allowed' policy.
- */
- public AssertionSet getAssertionSet() {
- final Iterator<AssertionSet> iterator = iterator();
- if (iterator.hasNext()) {
- return iterator.next();
- } else {
- return null;
- }
- }
-
- /**
- * An {@code Object.equals(Object obj)} method override.
- */
- @Override
- public boolean equals(final Object obj) {
- if (this == obj) {
- return true;
- }
-
- if (!(obj instanceof NestedPolicy)) {
- return false;
- }
-
- final NestedPolicy that = (NestedPolicy) obj;
-
- return super.equals(that);
- }
-
- @Override
- public int hashCode() {
- return super.hashCode();
- }
-
- /**
- * An {@code Object.toString()} method override.
- */
- @Override
- public String toString() {
- return toString(0, new StringBuffer()).toString();
- }
-
- /**
- * A helper method that appends indented string representation of this instance to the input string buffer.
- *
- * @param indentLevel indentation level to be used.
- * @param buffer buffer to be used for appending string representation of this instance
- * @return modified buffer containing new string representation of the instance
- */
- @Override
- StringBuffer toString(final int indentLevel, final StringBuffer buffer) {
- return super.toString(indentLevel, buffer);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/Policy.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/Policy.java
deleted file mode 100644
index a3ff0391..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/Policy.java
+++ /dev/null
@@ -1,661 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion;
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-import javax.xml.namespace.QName;
-
-/**
- * A policy represents normalized policy as a wrapper of available policy alternatives represented by
- * child {@link AssertionSet AssertionSets}.
- *
- * @author Fabian Ritzmann, Marek Potociar
- */
-public class Policy implements Iterable<AssertionSet> {
- /**
- * A string constant used in package private constructor to customize the object's toString() method output.
- */
- private static final String POLICY_TOSTRING_NAME = "policy";
-
- /**
- * Constant represents empty list of assertion sets. This represents the content of a 'NULL' policy - a policy with
- * no alternatives. The constant supports memory effective creation of 'NULL' policy objects.
- */
- private static final List<AssertionSet> NULL_POLICY_ASSERTION_SETS = Collections.unmodifiableList(new LinkedList<AssertionSet>());
-
- /**
- * Constant represents list of assertion sets with single empty assertion set. This represents the content of
- * an 'EMPTY' policy - a policy with a single empty alternative. The constant supports memory effective creation
- * of 'EMPTY' policy objects.
- */
- private static final List<AssertionSet> EMPTY_POLICY_ASSERTION_SETS = Collections.unmodifiableList(new LinkedList<AssertionSet>(Arrays.asList(new AssertionSet[] {AssertionSet.emptyAssertionSet()})));
-
- /**
- * Constant represents empty vocabulary of a 'NULL' or 'EMPTY' policies. The constant supports memory effective
- * creation of 'NULL' and 'EMPTY' policy objects.
- */
- private static final Set<QName> EMPTY_VOCABULARY = Collections.unmodifiableSet(new TreeSet<QName>(PolicyUtils.Comparison.QNAME_COMPARATOR));
-
- /**
- * Constant representation of all 'NULL' policies returned by createNullPolicy() factory method. This is to optimize
- * the memory footprint.
- */
- private static final Policy ANONYMOUS_NULL_POLICY = new Policy(null, null, NULL_POLICY_ASSERTION_SETS, EMPTY_VOCABULARY);
-
- /**
- * Constant representation of all 'EMPTY' policies returned by createEmptyPolicy() factory method. This constant is
- * to optimize the memory footprint.
- */
- private static final Policy ANONYMOUS_EMPTY_POLICY = new Policy(null, null, EMPTY_POLICY_ASSERTION_SETS, EMPTY_VOCABULARY);
-
- /**
- * Policy ID holder
- */
- private String policyId;
-
- /**
- * Policy name holder
- */
- private String name;
-
- /**
- * Namespace version holder
- */
- private NamespaceVersion nsVersion;
-
- /**
- * internal collection of policy alternatives
- */
- private final List<AssertionSet> assertionSets;
-
- /**
- * internal collection of policy vocabulary entries (qualified names of all assertion types present in the policy expression)
- */
- private final Set<QName> vocabulary;
-
- /**
- * immutable version of policy vocabulary that is made available to clients via getter method
- */
- private final Collection<QName> immutableVocabulary;
-
- /**
- * policy object name used in a toString() method. This ensures that Policy class children can customize
- * (via package private Policy constructors) the toString() method without having to override it.
- */
- private final String toStringName;
-
- /**
- * The factory method creates an <b>immutable</b> policy instance which represents a <emph>'nothing allowed'</emph>
- * policy expression. The policy is created using the latest namespace version supported.
- *
- * @return policy instance which represents a <emph>'nothing allowed'</emph> (no policy alternatives).
- */
- public static Policy createNullPolicy() {
- return ANONYMOUS_NULL_POLICY;
- }
-
- /**
- * The factory method creates an <b>immutable</b> policy instance which represents a <emph>'anything allowed'</emph>
- * policy expression. The policy is created using the latest namespace version supported.
- *
- * @return policy instance which represents a <emph>'anything allowed'</emph> (empty policy alternative with no plicy
- * assertions prescribed).
- */
- public static Policy createEmptyPolicy() {
- return ANONYMOUS_EMPTY_POLICY;
- }
-
- /**
- * The factory method creates an <b>immutable</b> policy instance which represents a <emph>'nothing allowed'</emph>
- * policy expression. The policy is created using the latest namespace version supported.
- *
- * @param name global URI of the policy. May be {@code null}.
- * @param policyId local URI of the policy. May be {@code null}.
- * @return policy instance which represents a <emph>'nothing allowed'</emph> (no policy alternatives).
- */
- public static Policy createNullPolicy(final String name, final String policyId) {
- if (name == null && policyId == null) {
- return ANONYMOUS_NULL_POLICY;
- } else {
- return new Policy(name, policyId, NULL_POLICY_ASSERTION_SETS, EMPTY_VOCABULARY);
- }
- }
-
- /**
- * The factory method creates an <b>immutable</b> policy instance which represents a <emph>'nothing allowed'</emph>
- * policy expression. The policy is created using the latest namespace version supported.
- *
- * @param nsVersion Policy namespace version to be used when marshalling the policy expression
- * @param name global URI of the policy. May be {@code null}.
- * @param policyId local URI of the policy. May be {@code null}.
- * @return policy instance which represents a <emph>'nothing allowed'</emph> (no policy alternatives).
- */
- public static Policy createNullPolicy(final NamespaceVersion nsVersion, final String name, final String policyId) {
- if ((nsVersion == null || nsVersion == NamespaceVersion.getLatestVersion()) && name == null && policyId == null) {
- return ANONYMOUS_NULL_POLICY;
- } else {
- return new Policy(nsVersion, name, policyId, NULL_POLICY_ASSERTION_SETS, EMPTY_VOCABULARY);
- }
- }
-
- /**
- * The factory method creates an <b>immutable</b> policy instance which represents a <emph>'anything allowed'</emph>
- * policy expression. The policy is created using the latest namespace version supported.
- *
- * @param name global URI of the policy. May be {@code null}.
- * @param policyId local URI of the policy. May be {@code null}.
- *
- * @return policy instance which represents a <emph>'anything allowed'</emph> (empty policy alternative with no plicy
- * assertions prescribed).
- */
- public static Policy createEmptyPolicy(final String name, final String policyId) {
- if (name == null && policyId == null) {
- return ANONYMOUS_EMPTY_POLICY;
- } else {
- return new Policy(name, policyId, EMPTY_POLICY_ASSERTION_SETS, EMPTY_VOCABULARY);
- }
- }
-
- /**
- * The factory method creates an <b>immutable</b> policy instance which represents a <emph>'anything allowed'</emph>
- * policy expression. The policy is created using the latest namespace version supported.
- *
- * @param nsVersion Policy namespace version to be used when marshalling the policy expression
- * @param name global URI of the policy. May be {@code null}.
- * @param policyId local URI of the policy. May be {@code null}.
- *
- * @return policy instance which represents a <emph>'anything allowed'</emph> (empty policy alternative with no plicy
- * assertions prescribed).
- */
- public static Policy createEmptyPolicy(final NamespaceVersion nsVersion, final String name, final String policyId) {
- if ((nsVersion == null || nsVersion == NamespaceVersion.getLatestVersion()) && name == null && policyId == null) {
- return ANONYMOUS_EMPTY_POLICY;
- } else {
- return new Policy(nsVersion, name, policyId, EMPTY_POLICY_ASSERTION_SETS, EMPTY_VOCABULARY);
- }
- }
-
- /**
- * The factory method creates an <b>immutable</b> policy instance which represents a policy expression with
- * alternatives specified by {@code sets} input parameter. If the collection of policy alternatives is null or empty
- * an object representing a 'NULL' policy expression is returned. However, in such case it is better to use
- * {@link #createNullPolicy()} factory method directly. The policy is created using the latest namespace version supported.
- *
- * @param sets represents the collection of policy alternatives of the policy object created. During the creation of
- * the new policy object, the content of the alternatives collection is copied into an internal policy object structure,
- * thus any subsequent operations on the collection will have no impact on the newly constructed policy object.
- *
- * @return policy instance which represents the policy with given alternatives.
- */
- public static Policy createPolicy(final Collection<AssertionSet> sets) {
- if (sets == null || sets.isEmpty()) {
- return createNullPolicy();
- } else {
- return new Policy(POLICY_TOSTRING_NAME, sets);
- }
- }
-
- /**
- * The factory method creates an <b>immutable</b> policy instance which represents a policy expression with
- * alternatives specified by {@code sets} input parameter. If the collection of policy alternatives is null or empty
- * an object representing a 'NULL' policy expression is returned. However, in such case it is better to use
- * {@link #createNullPolicy(String, String)} factory method directly. The policy is created using the latest namespace version supported.
- *
- * @param name global URI of the policy. May be {@code null}.
- * @param policyId local URI of the policy. May be {@code null}.
- * @param sets represents the collection of policy alternatives of the policy object created. During the creation of
- * the new policy object, the content of the alternatives collection is copied into an internal policy object structure,
- * thus any subsequent operations on the collection will have no impact on the newly constructed policy object.
- *
- * @return policy instance which represents the policy with given alternatives.
- */
- public static Policy createPolicy(final String name, final String policyId, final Collection<AssertionSet> sets) {
- if (sets == null || sets.isEmpty()) {
- return createNullPolicy(name, policyId);
- } else {
- return new Policy(POLICY_TOSTRING_NAME, name, policyId, sets);
- }
- }
-
- /**
- * The factory method creates an <b>immutable</b> policy instance which represents a policy expression with
- * alternatives specified by {@code sets} input parameter. If the collection of policy alternatives is null or empty
- * an object representing a 'NULL' policy expression is returned. However, in such case it is better to use
- * {@link #createNullPolicy(String, String)} factory method directly. The policy is created using the latest namespace version supported.
- *
- * @param nsVersion Policy namespace version to be used when marshalling the policy expression
- * @param name global URI of the policy. May be {@code null}.
- * @param policyId local URI of the policy. May be {@code null}.
- * @param sets represents the collection of policy alternatives of the policy object created. During the creation of
- * the new policy object, the content of the alternatives collection is copied into an internal policy object structure,
- * thus any subsequent operations on the collection will have no impact on the newly constructed policy object.
- *
- * @return policy instance which represents the policy with given alternatives.
- */
- public static Policy createPolicy(NamespaceVersion nsVersion, final String name, final String policyId, final Collection<AssertionSet> sets) {
- if (sets == null || sets.isEmpty()) {
- return createNullPolicy(nsVersion, name, policyId);
- } else {
- return new Policy(nsVersion, POLICY_TOSTRING_NAME, name, policyId, sets);
- }
- }
-
- /**
- * A most flexible policy object constructor that allows private creation of policy objects and direct setting
- * of all its attributes.
- *
- * @param name global URI of the policy. May be {@code null}.
- * @param policyId local URI of the policy. May be {@code null}.
- * @param assertionSets represents the collection of policy alternatives of the policy object created. The list is directly
- * assigned to the policy object internal attribute. Subsequent manipulations on the collection must be handled with
- * care.
- * @param vocabulary represents the vocabulary of the policy object. Subsequent manipulations on the collection
- * must be handled with care.
- */
- private Policy(final String name, final String policyId, final List<AssertionSet> assertionSets, final Set<QName> vocabulary) {
- this.nsVersion = NamespaceVersion.getLatestVersion();
- this.toStringName = POLICY_TOSTRING_NAME;
- this.name = name;
- this.policyId = policyId;
- this.assertionSets = assertionSets;
- this.vocabulary = vocabulary;
- this.immutableVocabulary = Collections.unmodifiableCollection(this.vocabulary);
- }
-
- /**
- * Constructor that should be overridden by child implementation. The constructor allows for easy toString() output
- * customization.
- *
- * @param toStringName a general name of the object (such as 'policy' or 'nested policy') that will be used in the
- * toString() method to identify the object.
- * @param sets represents the collection of policy alternatives of the policy object created. During the creation of
- * the new policy object, the content of the alternatives collection is copied into an internal policy object structure,
- * thus any subsequent operations on the collection will have no impact on the newly constructed policy object. The
- * collection may be {@code null} or empty. In such case a 'NULL' policy object is constructed.
- */
- Policy(final String toStringName, final Collection<AssertionSet> sets) {
- this.nsVersion = NamespaceVersion.getLatestVersion();
- this.toStringName = toStringName;
-
- if (sets == null || sets.isEmpty()) {
- this.assertionSets = NULL_POLICY_ASSERTION_SETS;
- this.vocabulary = EMPTY_VOCABULARY;
- this.immutableVocabulary = EMPTY_VOCABULARY;
- } else {
- this.assertionSets = new LinkedList<AssertionSet>();
- this.vocabulary = new TreeSet<QName>(PolicyUtils.Comparison.QNAME_COMPARATOR);
- this.immutableVocabulary = Collections.unmodifiableCollection(this.vocabulary);
-
- addAll(sets);
- }
- }
-
- /**
- * Constructor that should be overridden by child implementation. The constructor allows for easy toString() output
- * customization.
- *
- * @param toStringName a general name of the object (such as 'policy' or 'nested policy') that will be used in the
- * toString() method to identify the object.
- * @param name global URI of the policy. May be {@code null}.
- * @param policyId local URI of the policy. May be {@code null}.
- * @param sets represents the collection of policy alternatives of the policy object created. During the creation of
- * the new policy object, the content of the alternatives collection is copied into an internal policy object structure,
- * thus any subsequent operations on the collection will have no impact on the newly constructed policy object. The
- * collection may be {@code null} or empty. In such case a 'NULL' policy object is constructed.
- */
- Policy(final String toStringName, final String name, final String policyId, final Collection<AssertionSet> sets) {
- this(toStringName, sets);
- this.name = name;
- this.policyId = policyId;
- }
-
- /**
- * A most flexible policy object constructor that allows private creation of policy objects and direct setting
- * of all its attributes.
- *
- * @param nsVersion Policy namespace version to be used when marshalling the policy expression
- * @param name global URI of the policy. May be {@code null}.
- * @param policyId local URI of the policy. May be {@code null}.
- * @param assertionSets represents the collection of policy alternatives of the policy object created. The list is directly
- * assigned to the policy object internal attribute. Subsequent manipulations on the collection must be handled with
- * care.
- * @param vocabulary represents the vocabulary of the policy object. Subsequent manipulations on the collection
- * must be handled with care.
- */
- private Policy(final NamespaceVersion nsVersion, final String name, final String policyId, final List<AssertionSet> assertionSets, final Set<QName> vocabulary) {
- this.nsVersion = nsVersion;
- this.toStringName = POLICY_TOSTRING_NAME;
- this.name = name;
- this.policyId = policyId;
- this.assertionSets = assertionSets;
- this.vocabulary = vocabulary;
- this.immutableVocabulary = Collections.unmodifiableCollection(this.vocabulary);
- }
-
- /**
- * Constructor that should be overridden by child implementation. The constructor allows for easy toString() output
- * customization.
- *
- * @param nsVersion Policy namespace version to be used when marshalling the policy expression
- * @param toStringName a general name of the object (such as 'policy' or 'nested policy') that will be used in the
- * toString() method to identify the object.
- * @param sets represents the collection of policy alternatives of the policy object created. During the creation of
- * the new policy object, the content of the alternatives collection is copied into an internal policy object structure,
- * thus any subsequent operations on the collection will have no impact on the newly constructed policy object. The
- * collection may be {@code null} or empty. In such case a 'NULL' policy object is constructed.
- */
- Policy(final NamespaceVersion nsVersion, final String toStringName, final Collection<AssertionSet> sets) {
- this.nsVersion = nsVersion;
- this.toStringName = toStringName;
-
- if (sets == null || sets.isEmpty()) {
- this.assertionSets = NULL_POLICY_ASSERTION_SETS;
- this.vocabulary = EMPTY_VOCABULARY;
- this.immutableVocabulary = EMPTY_VOCABULARY;
- } else {
- this.assertionSets = new LinkedList<AssertionSet>();
- this.vocabulary = new TreeSet<QName>(PolicyUtils.Comparison.QNAME_COMPARATOR);
- this.immutableVocabulary = Collections.unmodifiableCollection(this.vocabulary);
-
- addAll(sets);
- }
- }
-
- /**
- * Constructor that should be overridden by child implementation. The constructor allows for easy toString() output
- * customization.
- *
- * @param nsVersion Policy namespace version to be used when marshalling the policy expression
- * @param toStringName a general name of the object (such as 'policy' or 'nested policy') that will be used in the
- * toString() method to identify the object.
- * @param name global URI of the policy. May be {@code null}.
- * @param policyId local URI of the policy. May be {@code null}.
- * @param sets represents the collection of policy alternatives of the policy object created. During the creation of
- * the new policy object, the content of the alternatives collection is copied into an internal policy object structure,
- * thus any subsequent operations on the collection will have no impact on the newly constructed policy object. The
- * collection may be {@code null} or empty. In such case a 'NULL' policy object is constructed.
- */
- Policy(final NamespaceVersion nsVersion, final String toStringName, final String name, final String policyId, final Collection<AssertionSet> sets) {
- this(nsVersion, toStringName, sets);
- this.name = name;
- this.policyId = policyId;
- }
-
- /**
- * Adds single alternative to the internal alternatives set of the policy object.
- *
- * @param set assertion set (policy alternative) object to be added. May be {@code null}; in such case the method
- * returns false.
- *
- * @return {@code true} or {@code false} depending on whether the new alternative was added to the policy object or not.
- */
- private boolean add(final AssertionSet set) {
- if (set == null) {
- return false;
- }
-
- if (this.assertionSets.contains(set)) {
- return false;
- } else {
- this.assertionSets.add(set);
- this.vocabulary.addAll(set.getVocabulary());
- return true;
- }
- }
-
- /**
- * Adds all alternatives from the input collection of assertion sets to the policy object's internal set of alternatives.
- * The policy object's vocabulary structure is updated as well.
- *
- * @param sets collection of new alternatives. Must NOT be {@code null} or empty. The check for null or empty input
- * parameter is performed with help of {@code assert} keyword, thus during the testing and development of this class
- * {@code -ea} switch should be turned on for this class.
- *
- * @return {@code true} if all elements in the input collection were added to internal structure, {@code false} otherwise.
- */
- private boolean addAll(final Collection<AssertionSet> sets) {
- assert (sets != null && !sets.isEmpty()) : LocalizationMessages.WSP_0036_PRIVATE_METHOD_DOES_NOT_ACCEPT_NULL_OR_EMPTY_COLLECTION();
-
- boolean result = true;
- for (AssertionSet set : sets) {
- result &= add(set); // this is here to ensure that vocabulary is built correctly as well
- }
- Collections.sort(this.assertionSets);
-
- return result;
- }
-
- Collection<AssertionSet> getContent() {
- return assertionSets;
- }
-
- /**
- * Returns the policy identifier that serves as a local relative policy URI.
- *
- * @return policy identifier - a local relative policy URI. If no policy identifier is set, returns {@code null}.
- */
- public String getId() {
- return policyId;
- }
-
- /**
- * Returns the policy name that serves as a global policy URI.
- *
- * @return policy name - a global policy URI. If no policy name is set, returns {@code null}.
- */
- public String getName() {
- return name;
- }
-
- public NamespaceVersion getNamespaceVersion() {
- return nsVersion;
- }
-
- /**
- * Returns the policy ID or if that is null the policy name. May return null
- * if both attributes are null.
- *
- * @see #getId()
- * @see #getName()
- * @return The policy ID if it was set, or the name or null if no attribute was set.
- */
- public String getIdOrName() {
- if (policyId != null) {
- return policyId;
- }
- return name;
- }
-
- /**
- * Method returns how many policy alternatives this policy instance contains.
- *
- * @return number of policy alternatives contained in this policy instance
- */
- public int getNumberOfAssertionSets() {
- return assertionSets.size();
- }
-
- /**
- * A policy usually contains one or more assertion sets. Each assertion set
- * corresponds to a policy alternative as defined by WS-Policy.
- *
- * @return An iterator to iterate through all contained assertion sets
- */
- public Iterator<AssertionSet> iterator() {
- return assertionSets.iterator();
- }
-
- /**
- * Returns {@code true} if the policy instance represents "nothing allowed" policy expression
- *
- * @return {@code true} if the policy instance represents "nothing allowed" policy expression, {@code false} otherwise.
- */
- public boolean isNull() {
- return assertionSets.size() == 0;
- }
-
- /**
- * Returns {@code true} if the policy instance represents "anything allowed" policy expression
- *
- * @return {@code true} if the policy instance represents "anything allowed" policy expression, {@code false} otherwise.
- */
- public boolean isEmpty() {
- return assertionSets.size() == 1 && assertionSets.get(0).isEmpty();
- }
-
- /**
- * Returns true if the policy contains the assertion names with specified namespace in its vocabulary
- *
- * @param namespaceUri the assertion namespace URI (identifying assertion domain)
- * @return {@code true}, if an assertion with the given name could be found in the policy vocabulary {@code false} otherwise.
- */
- public boolean contains(final String namespaceUri) {
- for (QName entry : vocabulary) {
- if (entry.getNamespaceURI().equals(namespaceUri)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Retrieves the vocabulary of this policy expression. The vocabulary is represented by an immutable collection of
- * unique QName objects. Each of those objects represents single assertion type contained in the policy.
- *
- * @return immutable collection of assertion types contained in the policy (a policy vocabulary).
- */
- public Collection<QName> getVocabulary() {
- return immutableVocabulary;
- }
-
- /**
- * Determines if the policy instance contains the assertion with the name specified in its vocabulary.
- *
- * @param assertionName the name of the assertion to be tested.
- *
- * @return {@code true} if the assertion with the specified name is part of the policy instance's vocabulary,
- * {@code false} otherwise.
- */
- public boolean contains(final QName assertionName) {
- return vocabulary.contains(assertionName);
- }
-
- /**
- * An {@code Object.equals(Object obj)} method override.
- */
- @Override
- public boolean equals(final Object obj) {
- if (this == obj) {
- return true;
- }
-
- if (!(obj instanceof Policy)) {
- return false;
- }
-
- final Policy that = (Policy) obj;
-
- boolean result = true;
-
- result = result && this.vocabulary.equals(that.vocabulary);
- result = result && this.assertionSets.size() == that.assertionSets.size() && this.assertionSets.containsAll(that.assertionSets);
-
- return result;
- }
-
- /**
- * An {@code Object.hashCode()} method override.
- */
- @Override
- public int hashCode() {
- int result = 17;
-
- result = 37 * result + vocabulary.hashCode();
- result = 37 * result + assertionSets.hashCode();
-
- return result;
- }
-
- /**
- * An {@code Object.toString()} method override.
- */
- @Override
- public String toString() {
- return toString(0, new StringBuffer()).toString();
- }
-
- /**
- * A helper method that appends indented string representation of this instance to the input string buffer.
- *
- * @param indentLevel indentation level to be used.
- * @param buffer buffer to be used for appending string representation of this instance
- * @return modified buffer containing new string representation of the instance
- */
- StringBuffer toString(final int indentLevel, final StringBuffer buffer) {
- final String indent = PolicyUtils.Text.createIndent(indentLevel);
- final String innerIndent = PolicyUtils.Text.createIndent(indentLevel + 1);
- final String innerDoubleIndent = PolicyUtils.Text.createIndent(indentLevel + 2);
-
- buffer.append(indent).append(toStringName).append(" {").append(PolicyUtils.Text.NEW_LINE);
- buffer.append(innerIndent).append("namespace version = '").append(nsVersion.name()).append('\'').append(PolicyUtils.Text.NEW_LINE);
- buffer.append(innerIndent).append("id = '").append(policyId).append('\'').append(PolicyUtils.Text.NEW_LINE);
- buffer.append(innerIndent).append("name = '").append(name).append('\'').append(PolicyUtils.Text.NEW_LINE);
-
- buffer.append(innerIndent).append("vocabulary {").append(PolicyUtils.Text.NEW_LINE);
- if (vocabulary.isEmpty()) {
- buffer.append(innerDoubleIndent).append("no entries").append(PolicyUtils.Text.NEW_LINE);
- } else {
- int index = 1;
- for (QName entry : vocabulary) {
- buffer.append(innerDoubleIndent).append(index++).append(". entry = '").append(entry.getNamespaceURI()).append(':').append(entry.getLocalPart()).append('\'').append(PolicyUtils.Text.NEW_LINE);
- }
- }
- buffer.append(innerIndent).append('}').append(PolicyUtils.Text.NEW_LINE);
-
- if (assertionSets.isEmpty()) {
- buffer.append(innerIndent).append("no assertion sets").append(PolicyUtils.Text.NEW_LINE);
- } else {
- for (AssertionSet set : assertionSets) {
- set.toString(indentLevel + 1, buffer).append(PolicyUtils.Text.NEW_LINE);
- }
- }
-
- buffer.append(indent).append('}');
-
- return buffer;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyAssertion.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyAssertion.java
deleted file mode 100644
index 3860c004..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyAssertion.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
-import com.sun.xml.internal.ws.policy.sourcemodel.AssertionData;
-import com.sun.xml.internal.ws.policy.sourcemodel.ModelNode;
-
-/**
- * Base class for any policy assertion implementations. It defines the common
- * interface and provides some default implentation for common policy assertion
- * functionality.
- * <p/>
- * NOTE: Assertion implementers should not extend this class directly. {@link SimpleAssertion}
- * or {@link ComplexAssertion} should be used as a base class instead.
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- * @author Fabian Ritzmann
- */
-public abstract class PolicyAssertion {
-
- private final AssertionData data;
- private AssertionSet parameters;
- private NestedPolicy nestedPolicy; // TODO: remove
-
- protected PolicyAssertion() {
- this.data = AssertionData.createAssertionData(null);
- this.parameters = AssertionSet.createAssertionSet(null);
- }
-
- /**
- * Creates generic assertionand stores the data specified in input parameters
- *
- * @param assertionData assertion creation data specifying the details of newly created assertion. May be {@code null}.
- * @param assertionParameters collection of assertions parameters of this policy assertion. May be {@code null}.
- * @param nestedAlternative assertion set specifying nested policy alternative. May be {@code null}.
- *
- * @deprecated Non-abstract assertion types should derive from {@link SimpleAssertion}
- * or {@link ComplexAssertion} instead. {@link Policy} class will not provide support for
- * nested policy alternatives in the future. This responsibility is delegated to
- * {@link ComplexAssertion} class instead.
- */
- @Deprecated
- protected PolicyAssertion(final AssertionData assertionData, final Collection<? extends PolicyAssertion> assertionParameters, final AssertionSet nestedAlternative) {
- this.data = assertionData;
- if (nestedAlternative != null) {
- this.nestedPolicy = NestedPolicy.createNestedPolicy(nestedAlternative);
- }
-
- this.parameters = AssertionSet.createAssertionSet(assertionParameters);
- }
-
- /**
- * Creates generic assertionand stores the data specified in input parameters
- *
- * @param assertionData assertion creation data specifying the details of newly created assertion
- * @param assertionParameters collection of assertions parameters of this policy assertion. May be {@code null}.
- */
- protected PolicyAssertion(final AssertionData assertionData, final Collection<? extends PolicyAssertion> assertionParameters) {
- if (assertionData == null) {
- this.data = AssertionData.createAssertionData(null);
- } else {
- this.data = assertionData;
- }
- this.parameters = AssertionSet.createAssertionSet(assertionParameters);
- }
-
- /**
- * Returns the fully qualified name of the assertion.
- *
- * @return assertion's fully qualified name.
- */
- public final QName getName() {
- return data.getName();
- }
-
- /**
- * Returns the value of the assertion - the character data content contained in the assertion element representation.
- *
- * @return assertion's value. May return {@code null} if there is no value set for the assertion.
- */
- public final String getValue() {
- return data.getValue();
- }
-
- /**
- * Method specifies whether the assertion is otpional or not.
- * <p/>
- * This is a default implementation that may be overriden. The method returns {@code true} if the {@code wsp:optional} attribute
- * is present on the assertion and its value is {@code 'true'}. Otherwise the method returns {@code false}.
- *
- * @return {@code 'true'} if the assertion is optional. Returns {@code false} otherwise.
- */
- public boolean isOptional() {
- return data.isOptionalAttributeSet();
- }
-
- /**
- * Method specifies whether the assertion is ignorable or not.
- * <p/>
- * This is a default implementation that may be overriden. The method returns {@code true} if the {@code wsp:Ignorable} attribute
- * is present on the assertion and its value is {@code 'true'}. Otherwise the method returns {@code false}.
- *
- * @return {@code 'true'} if the assertion is ignorable. Returns {@code false} otherwise.
- */
- public boolean isIgnorable() {
- return data.isIgnorableAttributeSet();
- }
-
- /**
- * Method specifies whether the assertion is private or not. This is specified by our proprietary visibility element.
- *
- * @return {@code 'true'} if the assertion is marked as private (i.e. should not be marshalled int generated WSDL documents). Returns {@code false} otherwise.
- */
- public final boolean isPrivate() {
- return data.isPrivateAttributeSet();
- }
-
- /**
- * Returns the disconnected set of attributes attached to the assertion. Each attribute is represented as a single
- * {@code Map.Entry<attributeName, attributeValue>} element.
- * <p/>
- * 'Disconnected' means, that the result of this method will not be synchronized with any consequent assertion's attribute modification. It is
- * also important to notice that a manipulation with returned set of attributes will not have any effect on the actual assertion's
- * attributes.
- *
- * @return disconected set of attributes attached to the assertion.
- */
- public final Set<Map.Entry<QName, String>> getAttributesSet() {
- return data.getAttributesSet();
- }
-
- /**
- * Returns the disconnected map of attributes attached to the assertion.
- * <p/>
- * 'Disconnected' means, that the result of this method will not be synchronized with any consequent assertion's attribute modification. It is
- * also important to notice that a manipulation with returned set of attributes will not have any effect on the actual assertion's
- * attributes.
- *
- * @return disconnected map of attributes attached to the assertion.
- */
- public final Map<QName, String> getAttributes() {
- return data.getAttributes();
- }
-
- /**
- * Returns the value of an attribute. Returns null if an attribute with the given name does not exist.
- *
- * @param name The fully qualified name of the attribute
- * @return The value of the attribute. Returns {@code null} if there is no such attribute or if it's value is null.
- */
- public final String getAttributeValue(final QName name) {
- return data.getAttributeValue(name);
- }
-
- /**
- * Returns the boolean information whether this assertion contains any parameters.
- *
- * @return {@code true} if the assertion contains parameters. Returns {@code false} otherwise.
- *
- * @deprecated Use hasParameters() instead
- */
- @Deprecated
- public final boolean hasNestedAssertions() {
- // TODO: remove
- return !parameters.isEmpty();
- }
-
- /**
- * Returns the boolean information whether this assertion contains any parameters.
- *
- * @return {@code true} if the assertion contains parameters. Returns {@code false} otherwise.
- */
- public final boolean hasParameters() {
- return !parameters.isEmpty();
- }
-
- /**
- * Returns the assertion's parameter collection iterator.
- *
- * @return the assertion's parameter collection iterator.
- *
- * @deprecated Use getNestedParametersIterator() instead
- */
- @Deprecated
- public final Iterator<PolicyAssertion> getNestedAssertionsIterator() {
- // TODO: remove
- return parameters.iterator();
- }
-
- /**
- * Returns the assertion's parameter collection iterator.
- *
- * @return the assertion's parameter collection iterator.
- */
- public final Iterator<PolicyAssertion> getParametersIterator() {
- return parameters.iterator();
- }
-
- boolean isParameter() {
- return data.getNodeType() == ModelNode.Type.ASSERTION_PARAMETER_NODE;
- }
-
- /**
- * Returns the boolean information whether this assertion contains nested policy.
- *
- * @return {@code true} if the assertion contains child (nested) policy. Returns {@code false} otherwise.
- */
- public boolean hasNestedPolicy() {
- // TODO: make abstract
- return getNestedPolicy() != null;
- }
-
- /**
- * Returns the nested policy if any.
- *
- * @return the nested policy if the assertion contains a nested policy. Returns {@code null} otherwise.
- */
- public NestedPolicy getNestedPolicy() {
- // TODO: make abstract
- return nestedPolicy;
- }
-
- /**
- * Casts the assertion to the implementation type. Returns null if that is not
- * possible.
- *
- * @param <T> The implementation type of the assertion.
- * @param type The implementation type of the assertion. May not be null.
- * @return The instance of the implementation type. Null otherwise.
- */
- public <T extends PolicyAssertion> T getImplementation(Class<T> type) {
- if (type.isAssignableFrom(this.getClass())) {
- return type.cast(this);
- }
- else {
- return null;
- }
- }
-
- /**
- * An {@code Object.toString()} method override.
- */
- @Override
- public String toString() {
- return toString(0, new StringBuffer()).toString();
- }
-
- /**
- * A helper method that appends indented string representation of this instance to the input string buffer.
- *
- * @param indentLevel indentation level to be used.
- * @param buffer buffer to be used for appending string representation of this instance
- * @return modified buffer containing new string representation of the instance
- */
- protected StringBuffer toString(final int indentLevel, final StringBuffer buffer) {
- final String indent = PolicyUtils.Text.createIndent(indentLevel);
- final String innerIndent = PolicyUtils.Text.createIndent(indentLevel + 1);
-
- buffer.append(indent).append("Assertion[").append(this.getClass().getName()).append("] {").append(PolicyUtils.Text.NEW_LINE);
- data.toString(indentLevel + 1, buffer);
- buffer.append(PolicyUtils.Text.NEW_LINE);
-
- if (hasParameters()) {
- buffer.append(innerIndent).append("parameters {").append(PolicyUtils.Text.NEW_LINE);
- for (PolicyAssertion parameter : parameters) {
- parameter.toString(indentLevel + 2, buffer).append(PolicyUtils.Text.NEW_LINE);
- }
- buffer.append(innerIndent).append('}').append(PolicyUtils.Text.NEW_LINE);
- } else {
- buffer.append(innerIndent).append("no parameters").append(PolicyUtils.Text.NEW_LINE);
- }
-
- if (hasNestedPolicy()) {
- getNestedPolicy().toString(indentLevel + 1, buffer).append(PolicyUtils.Text.NEW_LINE);
- } else {
- buffer.append(innerIndent).append("no nested policy").append(PolicyUtils.Text.NEW_LINE);
- }
-
- buffer.append(indent).append('}');
-
- return buffer;
- }
-
- /**
- * Checks whether this policy alternative is compatible with the provided policy alternative.
- *
- * @param assertion policy alternative used for compatibility test
- * @param mode compatibility mode to be used
- * @return {@code true} if the two policy alternatives are compatible, {@code false} otherwise
- */
- boolean isCompatibleWith(final PolicyAssertion assertion, PolicyIntersector.CompatibilityMode mode) {
- boolean result = this.data.getName().equals(assertion.data.getName()) && (this.hasNestedPolicy() == assertion.hasNestedPolicy());
-
- if (result && this.hasNestedPolicy()) {
- result = this.getNestedPolicy().getAssertionSet().isCompatibleWith(assertion.getNestedPolicy().getAssertionSet(), mode);
- }
-
- return result;
- }
-
- /**
- * An {@code Object.equals(Object obj)} method override.
- */
- @Override
- public boolean equals(final Object obj) {
- if (this == obj) {
- return true;
- }
-
- if (!(obj instanceof PolicyAssertion)) {
- return false;
- }
-
- final PolicyAssertion that = (PolicyAssertion) obj;
- boolean result = true;
-
- result = result && this.data.equals(that.data);
- result = result && this.parameters.equals(that.parameters);
- result = result && ((this.getNestedPolicy() == null) ? ((that.getNestedPolicy() == null) ? true : false) : this.getNestedPolicy().equals(that.getNestedPolicy()));
-
- return result;
- }
-
- /**
- * An {@code Object.hashCode()} method override.
- */
- @Override
- public int hashCode() {
- int result = 17;
-
- result = 37 * result + data.hashCode();
- result = 37 * result + ((hasParameters()) ? 17 : 0);
- result = 37 * result + ((hasNestedPolicy()) ? 17 : 0);
-
- return result;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyConstants.java
deleted file mode 100644
index cbb18dc7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyConstants.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import javax.xml.namespace.QName;
-
-/**
- * Commonly used constants by the policy implementations
- */
-public final class PolicyConstants {
- /**
- * Sun proprietary policy namespace URI
- */
- public static final String SUN_POLICY_NAMESPACE_URI = "http://java.sun.com/xml/ns/wsit/policy";
-
- /**
- * Sun proprietary policy namespace prefix
- */
- public static final String SUN_POLICY_NAMESPACE_PREFIX = "sunwsp";
-
- /**
- * Fully qualified name of the SUN's proprietary policy assertion visibility attribute
- */
- public static final QName VISIBILITY_ATTRIBUTE = new QName(SUN_POLICY_NAMESPACE_URI, "visibility");
-
- /**
- * Recognized value of the SUN's proprietary policy assertion visibility attribute
- */
- public static final String VISIBILITY_VALUE_PRIVATE = "private";
-
- /**
- * Standard WS-Security Utility namespace URI, used in Policy Id
- */
- public static final String WSU_NAMESPACE_URI = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
-
- /**
- * Standard WS-Security Utility namespace prefix, used in Policy Id
- */
- public static final String WSU_NAMESPACE_PREFIX = "wsu";
-
- /**
- * Fully qualified name of the Policy wsu:Id XML attribute
- */
- public static final QName WSU_ID = new QName(WSU_NAMESPACE_URI, "Id");
-
- /**
- * Standard XML namespace URI
- */
- public static final String XML_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace";
-
- /**
- * Fully qualified name of the xml:id policy attribute
- */
- public static final QName XML_ID = new QName(XML_NAMESPACE_URI, "id");
-
- /**
- * Identifier of the client-side configuration file
- */
- public static final String CLIENT_CONFIGURATION_IDENTIFIER = "client";
-
- /**
- * XML namespace for management policy assertions
- */
- public static final String SUN_MANAGEMENT_NAMESPACE = "http://java.sun.com/xml/ns/metro/management";
-
- /**
- * Prevent instantiation of this class.
- */
- private PolicyConstants() {
- // nothing to initialize
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyException.java
deleted file mode 100644
index 3a7ec568..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-/**
- * This is a base exception class and thrown when there is an error in the policy processing
- */
-public class PolicyException extends Exception {
-
- public PolicyException(String message) {
- super(message);
- }
-
-
- public PolicyException(String message, Throwable cause) {
- super(message, cause);
- }
-
-
- public PolicyException(Throwable cause) {
- super(cause);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyIntersector.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyIntersector.java
deleted file mode 100644
index 5ecc477c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyIntersector.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Queue;
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion;
-import java.util.ArrayList;
-
-/**
- * The instance of this class is intended to provide policy intersection mechanism.
- *
- * @author Marek Potociar (marek.potociar@sun.com)
- */
-public final class PolicyIntersector {
- static enum CompatibilityMode {
- STRICT,
- LAX
- }
-
- private static final PolicyIntersector STRICT_INTERSECTOR = new PolicyIntersector(CompatibilityMode.STRICT);
- private static final PolicyIntersector LAX_INTERSECTOR = new PolicyIntersector(CompatibilityMode.LAX);
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyIntersector.class);
-
- private CompatibilityMode mode;
-
- /**
- * Prevents direct instantiation of this class from outside
- * @param intersectionMode intersection mode
- */
- private PolicyIntersector(CompatibilityMode intersectionMode) {
- this.mode = intersectionMode;
- }
-
- /**
- * Returns a strict policy intersector that can be used to intersect group of policies.
- *
- * @return policy intersector instance.
- */
- public static PolicyIntersector createStrictPolicyIntersector() {
- return PolicyIntersector.STRICT_INTERSECTOR;
- }
-
- /**
- * Returns a strict policy intersector that can be used to intersect group of policies.
- *
- * @return policy intersector instance.
- */
- public static PolicyIntersector createLaxPolicyIntersector() {
- return PolicyIntersector.LAX_INTERSECTOR;
- }
-
- /**
- * Performs intersection on the input collection of policies and returns the resulting (intersected) policy. If input policy
- * collection contains only a single policy instance, no intersection is performed and the instance is directly returned
- * as a method call result.
- *
- * @param policies collection of policies to be intersected. Must not be {@code null} nor empty, otherwise exception is thrown.
- * @return intersected policy as a result of perfromed policy intersection. A {@code null} value is never returned.
- *
- * @throws IllegalArgumentException in case {@code policies} argument is either {@code null} or empty collection.
- */
- public Policy intersect(final Policy... policies) {
- if (policies == null || policies.length == 0) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0056_NEITHER_NULL_NOR_EMPTY_POLICY_COLLECTION_EXPECTED()));
- } else if (policies.length == 1) {
- return policies[0];
- }
-
- // check for "null" and "empty" policy: if such policy is found return "null" policy,
- // or if all policies are "empty", return "empty" policy
- boolean found = false;
- boolean allPoliciesEmpty = true;
- NamespaceVersion latestVersion = null;
- for (Policy tested : policies) {
- if (tested.isEmpty()) {
- found = true;
- } else {
- if (tested.isNull()) {
- found = true;
- }
- allPoliciesEmpty = false;
- }
- if (latestVersion == null) {
- latestVersion = tested.getNamespaceVersion();
- } else if (latestVersion.compareTo(tested.getNamespaceVersion()) < 0) {
- latestVersion = tested.getNamespaceVersion();
- }
-
- if (found && !allPoliciesEmpty) {
- return Policy.createNullPolicy(latestVersion, null, null);
- }
- }
- latestVersion = (latestVersion != null) ? latestVersion : NamespaceVersion.getLatestVersion();
- if (allPoliciesEmpty) {
- return Policy.createEmptyPolicy(latestVersion, null, null);
- }
-
- // simple tests didn't lead to final answer => let's performe some intersecting ;)
- final List<AssertionSet> finalAlternatives = new LinkedList<AssertionSet>(policies[0].getContent());
- final Queue<AssertionSet> testedAlternatives = new LinkedList<AssertionSet>();
- final List<AssertionSet> alternativesToMerge = new ArrayList<AssertionSet>(2);
- for (int i = 1; i < policies.length; i++) {
- final Collection<AssertionSet> currentAlternatives = policies[i].getContent();
-
- testedAlternatives.clear();
- testedAlternatives.addAll(finalAlternatives);
- finalAlternatives.clear();
-
- AssertionSet testedAlternative;
- while ((testedAlternative = testedAlternatives.poll()) != null) {
- for (AssertionSet currentAlternative : currentAlternatives) {
- if (testedAlternative.isCompatibleWith(currentAlternative, this.mode)) {
- alternativesToMerge.add(testedAlternative);
- alternativesToMerge.add(currentAlternative);
- finalAlternatives.add(AssertionSet.createMergedAssertionSet(alternativesToMerge));
- alternativesToMerge.clear();
- }
- }
- }
- }
-
- return Policy.createPolicy(latestVersion, null, null, finalAlternatives);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMap.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMap.java
deleted file mode 100644
index 800acbcc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMap.java
+++ /dev/null
@@ -1,671 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import javax.xml.namespace.QName;
-
-/**
- * A PolicyMap holds all policies for a scope.
- *
- * This map is modeled around WSDL 1.1 policy scopes according to WS-PolicyAttachment. The map holds an information about
- * every scope for service, endpoint, operation, and input/output/fault message. It also provide accessibility methods for
- * computing and obtaining effective policy on each scope.
- *
- * TODO: rename createWsdlMessageScopeKey to createWsdlInputOutputMessageScopeKey
- *
- * @author Fabian Ritzmann
- */
-public final class PolicyMap implements Iterable<Policy> {
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyMap.class);
-
- private static final PolicyMapKeyHandler serviceKeyHandler = new PolicyMapKeyHandler() {
- public boolean areEqual(final PolicyMapKey key1, final PolicyMapKey key2) {
- return key1.getService().equals(key2.getService());
- }
-
- public int generateHashCode(final PolicyMapKey key) {
- int result = 17;
-
- result = 37 * result + key.getService().hashCode();
-
- return result;
- }
- };
-
- private static final PolicyMapKeyHandler endpointKeyHandler = new PolicyMapKeyHandler() {
- public boolean areEqual(final PolicyMapKey key1, final PolicyMapKey key2) {
- boolean retVal = true;
-
- retVal = retVal && key1.getService().equals(key2.getService());
- retVal = retVal && ((key1.getPort() == null) ? key2.getPort() == null : key1.getPort().equals(key2.getPort()));
-
- return retVal;
- }
-
- public int generateHashCode(final PolicyMapKey key) {
- int result = 17;
-
- result = 37 * result + key.getService().hashCode();
- result = 37 * result + ((key.getPort() == null) ? 0 : key.getPort().hashCode());
-
- return result;
- }
- };
-
- private static final PolicyMapKeyHandler operationAndInputOutputMessageKeyHandler = new PolicyMapKeyHandler() {
- // we use the same algorithm to handle operation and input/output message keys
-
- public boolean areEqual(final PolicyMapKey key1, final PolicyMapKey key2) {
- boolean retVal = true;
-
- retVal = retVal && key1.getService().equals(key2.getService());
- retVal = retVal && ((key1.getPort() == null) ? key2.getPort() == null : key1.getPort().equals(key2.getPort()));
- retVal = retVal && ((key1.getOperation() == null) ? key2.getOperation() == null : key1.getOperation().equals(key2.getOperation()));
-
- return retVal;
- }
-
- public int generateHashCode(final PolicyMapKey key) {
- int result = 17;
-
- result = 37 * result + key.getService().hashCode();
- result = 37 * result + ((key.getPort() == null) ? 0 : key.getPort().hashCode());
- result = 37 * result + ((key.getOperation() == null) ? 0 : key.getOperation().hashCode());
-
- return result;
- }
- };
-
- private static final PolicyMapKeyHandler faultMessageHandler = new PolicyMapKeyHandler() {
- public boolean areEqual(final PolicyMapKey key1, final PolicyMapKey key2) {
- boolean retVal = true;
-
- retVal = retVal && key1.getService().equals(key2.getService());
- retVal = retVal && ((key1.getPort() == null) ? key2.getPort() == null : key1.getPort().equals(key2.getPort()));
- retVal = retVal && ((key1.getOperation() == null) ? key2.getOperation() == null : key1.getOperation().equals(key2.getOperation()));
- retVal = retVal && ((key1.getFaultMessage() == null) ? key2.getFaultMessage() == null : key1.getFaultMessage().equals(key2.getFaultMessage()));
-
- return retVal;
- }
-
- public int generateHashCode(final PolicyMapKey key) {
- int result = 17;
-
- result = 37 * result + key.getService().hashCode();
- result = 37 * result + ((key.getPort() == null) ? 0 : key.getPort().hashCode());
- result = 37 * result + ((key.getOperation() == null) ? 0 : key.getOperation().hashCode());
- result = 37 * result + ((key.getFaultMessage() == null) ? 0 : key.getFaultMessage().hashCode());
-
- return result;
- }
- };
-
-
- static enum ScopeType {
- SERVICE,
- ENDPOINT,
- OPERATION,
- INPUT_MESSAGE,
- OUTPUT_MESSAGE,
- FAULT_MESSAGE
- }
-
- private static final class ScopeMap implements Iterable<Policy> {
- private final Map<PolicyMapKey, PolicyScope> internalMap = new HashMap<PolicyMapKey, PolicyScope>();
- private final PolicyMapKeyHandler scopeKeyHandler;
- private final PolicyMerger merger;
-
- ScopeMap(final PolicyMerger merger, final PolicyMapKeyHandler scopeKeyHandler) {
- this.merger = merger;
- this.scopeKeyHandler = scopeKeyHandler;
- }
-
- Policy getEffectivePolicy(final PolicyMapKey key) throws PolicyException {
- final PolicyScope scope = internalMap.get(createLocalCopy(key));
- return (scope == null) ? null : scope.getEffectivePolicy(merger);
- }
-
- void putSubject(final PolicyMapKey key, final PolicySubject subject) {
- final PolicyMapKey localKey = createLocalCopy(key);
- final PolicyScope scope = internalMap.get(localKey);
- if (scope == null) {
- final List<PolicySubject> list = new LinkedList<PolicySubject>();
- list.add(subject);
- internalMap.put(localKey, new PolicyScope(list));
- } else {
- scope.attach(subject);
- }
- }
-
- void setNewEffectivePolicy(final PolicyMapKey key, final Policy newEffectivePolicy) {
- // we add this policy map as a subject, because there is nothing reasonable we could add there, since
- // this is an artificial policy subject
- final PolicySubject subject = new PolicySubject(key, newEffectivePolicy);
-
- final PolicyMapKey localKey = createLocalCopy(key);
- final PolicyScope scope = internalMap.get(localKey);
- if (scope == null) {
- final List<PolicySubject> list = new LinkedList<PolicySubject>();
- list.add(subject);
- internalMap.put(localKey, new PolicyScope(list));
- } else {
- scope.dettachAllSubjects();
- scope.attach(subject);
- }
- }
-
- Collection<PolicyScope> getStoredScopes() {
- return internalMap.values();
- }
-
- Set<PolicyMapKey> getAllKeys() {
- return internalMap.keySet();
- }
-
- private PolicyMapKey createLocalCopy(final PolicyMapKey key) {
- if (key == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0045_POLICY_MAP_KEY_MUST_NOT_BE_NULL()));
- }
-
- final PolicyMapKey localKeyCopy = new PolicyMapKey(key);
- localKeyCopy.setHandler(scopeKeyHandler);
-
- return localKeyCopy;
- }
-
- public Iterator<Policy> iterator() {
- return new Iterator<Policy> () {
- private final Iterator<PolicyMapKey> keysIterator = internalMap.keySet().iterator();
-
- public boolean hasNext() {
- return keysIterator.hasNext();
- }
-
- public Policy next() {
- final PolicyMapKey key = keysIterator.next();
- try {
- return getEffectivePolicy(key);
- } catch (PolicyException e) {
- throw LOGGER.logSevereException(new IllegalStateException(LocalizationMessages.WSP_0069_EXCEPTION_WHILE_RETRIEVING_EFFECTIVE_POLICY_FOR_KEY(key), e));
- }
- }
-
- public void remove() {
- throw LOGGER.logSevereException(new UnsupportedOperationException(LocalizationMessages.WSP_0034_REMOVE_OPERATION_NOT_SUPPORTED()));
- }
- };
- }
-
- public boolean isEmpty() {
- return internalMap.isEmpty();
- }
-
- @Override
- public String toString() {
- return internalMap.toString();
- }
- }
-
- private static final PolicyMerger merger = PolicyMerger.getMerger();
-
- private final ScopeMap serviceMap = new ScopeMap(merger, serviceKeyHandler);
- private final ScopeMap endpointMap = new ScopeMap(merger, endpointKeyHandler);
- private final ScopeMap operationMap = new ScopeMap(merger, operationAndInputOutputMessageKeyHandler);
- private final ScopeMap inputMessageMap = new ScopeMap(merger, operationAndInputOutputMessageKeyHandler);
- private final ScopeMap outputMessageMap = new ScopeMap(merger, operationAndInputOutputMessageKeyHandler);
- private final ScopeMap faultMessageMap = new ScopeMap(merger, faultMessageHandler);
-
- /**
- * This constructor is private to prevent direct instantiation from outside of the class
- */
- private PolicyMap() {
- // nothing to initialize
- }
-
- /**
- * Creates new policy map instance and connects provided collection of policy map mutators to the created policy map.
- *
- * @param mutators collection of mutators that should be connected to the newly created map.
- * @return new policy map instance (mutable via provided collection of mutators).
- */
- public static PolicyMap createPolicyMap(final Collection<? extends PolicyMapMutator> mutators) {
- final PolicyMap result = new PolicyMap();
-
- if (mutators != null && !mutators.isEmpty()) {
- for (PolicyMapMutator mutator : mutators) {
- mutator.connect(result);
- }
- }
-
- return result;
- }
-
- public Policy getServiceEffectivePolicy(final PolicyMapKey key) throws PolicyException {
- return serviceMap.getEffectivePolicy(key);
- }
-
- public Policy getEndpointEffectivePolicy(final PolicyMapKey key) throws PolicyException {
- return endpointMap.getEffectivePolicy(key);
- }
-
- public Policy getOperationEffectivePolicy(final PolicyMapKey key) throws PolicyException {
- return operationMap.getEffectivePolicy(key);
- }
-
- public Policy getInputMessageEffectivePolicy(final PolicyMapKey key) throws PolicyException {
- return inputMessageMap.getEffectivePolicy(key);
- }
-
- public Policy getOutputMessageEffectivePolicy(final PolicyMapKey key) throws PolicyException {
- return outputMessageMap.getEffectivePolicy(key);
- }
-
- public Policy getFaultMessageEffectivePolicy(final PolicyMapKey key) throws PolicyException {
- return faultMessageMap.getEffectivePolicy(key);
- }
-
- /**
- * Returns all service scope keys stored in this policy map
- *
- * @return collection of service scope policy map keys stored in the map.
- */
- public Collection<PolicyMapKey> getAllServiceScopeKeys() {
- return serviceMap.getAllKeys();
- }
-
- /**
- * Returns all endpoint scope keys stored in this policy map
- *
- * @return collection of endpoint scope policy map keys stored in the map.
- */
- public Collection<PolicyMapKey> getAllEndpointScopeKeys() {
- return endpointMap.getAllKeys();
- }
-
- /**
- * Returns all operation scope keys stored in this policy map
- *
- * @return collection of operation scope policy map keys stored in the map.
- */
- public Collection<PolicyMapKey> getAllOperationScopeKeys() {
- return operationMap.getAllKeys();
- }
-
- /**
- * Returns all input message scope keys stored in this policy map
- *
- * @return collection of input message scope policy map keys stored in the map.
- */
- public Collection<PolicyMapKey> getAllInputMessageScopeKeys() {
- return inputMessageMap.getAllKeys();
- }
-
- /**
- * Returns all output message scope keys stored in this policy map
- *
- * @return collection of output message scope policy map keys stored in the map.
- */
- public Collection<PolicyMapKey> getAllOutputMessageScopeKeys() {
- return outputMessageMap.getAllKeys();
- }
-
- /**
- * Returns all fault message scope keys stored in this policy map
- *
- * @return collection of input message scope policy map keys stored in the map.
- */
- public Collection<PolicyMapKey> getAllFaultMessageScopeKeys() {
- return faultMessageMap.getAllKeys();
- }
-
- /**
- * Places new subject into policy map under the scope identified by it's type and policy map key.
- *
- * @param scopeType the type of the scope the subject belongs to
- * @param key a policy map key to be used to store the subject
- * @param subject actual policy subject to be stored in the policy map
- *
- * @throw IllegalArgumentException in case the scope type is not recognized.
- */
- void putSubject(final ScopeType scopeType, final PolicyMapKey key, final PolicySubject subject) {
- switch (scopeType) {
- case SERVICE:
- serviceMap.putSubject(key, subject);
- break;
- case ENDPOINT:
- endpointMap.putSubject(key, subject);
- break;
- case OPERATION:
- operationMap.putSubject(key, subject);
- break;
- case INPUT_MESSAGE:
- inputMessageMap.putSubject(key, subject);
- break;
- case OUTPUT_MESSAGE:
- outputMessageMap.putSubject(key, subject);
- break;
- case FAULT_MESSAGE:
- faultMessageMap.putSubject(key, subject);
- break;
- default:
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0002_UNRECOGNIZED_SCOPE_TYPE(scopeType)));
- }
- }
-
- /**
- * Replaces current effective policy on given scope (identified by a {@code key} parameter) with the new efective
- * policy provided as a second input parameter. If no policy was defined for the presented key, the new policy is simply
- * stored with the key.
- *
- * @param scopeType the type of the scope the subject belongs to. Must not be {@code null}.
- * @param key identifier of the scope the effective policy should be replaced with the new one. Must not be {@code null}.
- * @param newEffectivePolicy the new policy to replace the old effective policy of the scope. Must not be {@code null}.
- *
- * @throw IllegalArgumentException in case any of the input parameters is {@code null}
- * or in case the scope type is not recognized.
- */
- void setNewEffectivePolicyForScope(final ScopeType scopeType, final PolicyMapKey key, final Policy newEffectivePolicy) throws IllegalArgumentException {
- if (scopeType == null || key == null || newEffectivePolicy == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0062_INPUT_PARAMS_MUST_NOT_BE_NULL()));
- }
-
- switch (scopeType) {
- case SERVICE :
- serviceMap.setNewEffectivePolicy(key, newEffectivePolicy);
- break;
- case ENDPOINT :
- endpointMap.setNewEffectivePolicy(key, newEffectivePolicy);
- break;
- case OPERATION :
- operationMap.setNewEffectivePolicy(key, newEffectivePolicy);
- break;
- case INPUT_MESSAGE :
- inputMessageMap.setNewEffectivePolicy(key, newEffectivePolicy);
- break;
- case OUTPUT_MESSAGE :
- outputMessageMap.setNewEffectivePolicy(key, newEffectivePolicy);
- break;
- case FAULT_MESSAGE :
- faultMessageMap.setNewEffectivePolicy(key, newEffectivePolicy);
- break;
- default:
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0002_UNRECOGNIZED_SCOPE_TYPE(scopeType)));
- }
- }
-
- /**
- * Returns all policy subjects contained by this map.
- *
- * @return All policy subjects contained by this map
- */
- public Collection<PolicySubject> getPolicySubjects() {
- final List<PolicySubject> subjects = new LinkedList<PolicySubject>();
- addSubjects(subjects, serviceMap);
- addSubjects(subjects, endpointMap);
- addSubjects(subjects, operationMap);
- addSubjects(subjects, inputMessageMap);
- addSubjects(subjects, outputMessageMap);
- addSubjects(subjects, faultMessageMap);
- return subjects;
- }
-
- /*
- * TODO: reconsider this QUICK HACK
- */
- public boolean isInputMessageSubject(final PolicySubject subject) {
- for (PolicyScope scope : inputMessageMap.getStoredScopes()) {
- if (scope.getPolicySubjects().contains(subject)) {
- return true;
- }
- }
- return false;
- }
-
- /*
- * TODO: reconsider this QUICK HACK
- */
- public boolean isOutputMessageSubject(final PolicySubject subject) {
- for (PolicyScope scope : outputMessageMap.getStoredScopes()) {
- if (scope.getPolicySubjects().contains(subject)) {
- return true;
- }
- }
- return false;
- }
-
-
- /*
- * TODO: reconsider this QUICK HACK
- */
- public boolean isFaultMessageSubject(final PolicySubject subject) {
- for (PolicyScope scope : faultMessageMap.getStoredScopes()) {
- if (scope.getPolicySubjects().contains(subject)) {
- return true;
- }
- }
- return false;
- }
-
-
- /**
- * Returns true if this map contains no key - policy pairs
- *
- * A null object key or policy constitutes a non-empty map.
- *
- * @return true if this map contains no key - policy pairs
- */
- public boolean isEmpty() {
- return serviceMap.isEmpty() && endpointMap.isEmpty() &&
- operationMap.isEmpty() && inputMessageMap.isEmpty() &&
- outputMessageMap.isEmpty() && faultMessageMap.isEmpty();
- }
-
-
- /**
- * Add all subjects in the given map to the collection
- *
- * @param subjects A collection that should hold subjects. The new subjects are added to the collection. Must not be {@code null}.
- * @param scopeMap A scope map that holds policy scopes. The subjects are retrieved from the scope objects.
- */
- private void addSubjects(final Collection<PolicySubject> subjects, final ScopeMap scopeMap) {
- for (PolicyScope scope : scopeMap.getStoredScopes()) {
- final Collection<PolicySubject> scopedSubjects = scope.getPolicySubjects();
- subjects.addAll(scopedSubjects);
- }
- }
-
- /**
- * Creates a service policy scope <emph>locator</emph> object, that serves as a access key into
- * a {@code PolicyMap} where actual service policy scope for given service can be retrieved.
- *
- * @param service qualified name of the service. Must not be {@code null}.
- * @throws IllegalArgumentException in case service, port or operation parameter is {@code null}.
- */
- public static PolicyMapKey createWsdlServiceScopeKey(final QName service) throws IllegalArgumentException {
- if (service == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0031_SERVICE_PARAM_MUST_NOT_BE_NULL()));
- }
- return new PolicyMapKey(service, null, null, serviceKeyHandler);
- }
-
- /**
- * Creates an endpoint policy scope <emph>locator</emph> object, that serves as a access key into
- * a {@code PolicyMap} where actual endpoint policy scope for given endpoint can be retrieved.
- *
- * @param service qualified name of the service. Must not be {@code null}.
- * @param port qualified name of the endpoint. Must not be {@code null}.
- * @throws IllegalArgumentException in case service, port or operation parameter is {@code null}.
- */
- public static PolicyMapKey createWsdlEndpointScopeKey(final QName service, final QName port) throws IllegalArgumentException {
- if (service == null || port == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0033_SERVICE_AND_PORT_PARAM_MUST_NOT_BE_NULL(service, port)));
- }
- return new PolicyMapKey(service, port, null, endpointKeyHandler);
- }
-
- /**
- * Creates an operation policy scope <emph>locator</emph> object, that serves as a access key into
- * a {@code PolicyMap} where actual operation policy scope for given bound operation can be retrieved.
- *
- * @param service qualified name of the service. Must not be {@code null}.
- * @param port qualified name of the endpoint. Must not be {@code null}.
- * @param operation qualified name of the operation. Must not be {@code null}.
- * @throws IllegalArgumentException in case service, port or operation parameter is {@code null}.
- */
- public static PolicyMapKey createWsdlOperationScopeKey(final QName service, final QName port, final QName operation) throws IllegalArgumentException {
- return createOperationOrInputOutputMessageKey(service, port, operation);
- }
-
- /**
- * Creates an input/output message policy scope <emph>locator</emph> object identified by a bound operation, that serves as a
- * access key into {@code PolicyMap} where actual input/output message policy scope for given input message of a bound operation
- * can be retrieved.
- * <p/>
- * The method returns a key that is compliant with <emph>WSDL 1.1 Basic Profile Specification</emph>, according to which there
- * should be no two operations with the same name in a single port type definition.
- *
- * @param service qualified name of the service. Must not be {@code null}.
- * @param port qualified name of the endpoint. Must not be {@code null}.
- * @param operation qualified name of the operation. Must not be {@code null}.
- * @throws IllegalArgumentException in case service, port or operation parameter is {@code null}.
- *
- */
- public static PolicyMapKey createWsdlMessageScopeKey(final QName service, final QName port, final QName operation) throws IllegalArgumentException {
- return createOperationOrInputOutputMessageKey(service, port, operation);
- }
-
- /**
- * Creates a fault message policy scope <emph>locator</emph> object identified by a bound operation, that serves as a
- * access key into {@code PolicyMap} where the actual fault message policy scope for one of the faults of a bound operation
- * can be retrieved.
- * <p/>
- * The method returns a key that is compliant with the <emph>WSDL 1.1 Basic Profile Specification</emph>, according to which there
- * should be no two operations with the same name in a single port type definition.
- *
- * @param service qualified name of the service. Must not be {@code null}.
- * @param port qualified name of the endpoint. Must not be {@code null}.
- * @param operation qualified name of the operation. Must not be {@code null}.
- * @param fault qualified name of the fault. Do not confuse this with the name of the actual message. This parameter
- * takes the wsdl:binding/wsdl:operation/wsdl:fault name and not the wsdl:message name. Must not be {@code null}.
- * @throws IllegalArgumentException in case service, port or operation parameter is {@code null}.
- *
- */
- public static PolicyMapKey createWsdlFaultMessageScopeKey(final QName service, final QName port, final QName operation, final QName fault) throws IllegalArgumentException {
- if (service == null || port == null || operation == null || fault == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0030_SERVICE_PORT_OPERATION_FAULT_MSG_PARAM_MUST_NOT_BE_NULL(service, port, operation, fault)));
- }
-
- return new PolicyMapKey(service, port, operation, fault, faultMessageHandler);
- }
-
- private static PolicyMapKey createOperationOrInputOutputMessageKey(final QName service, final QName port, final QName operation) {
- if (service == null || port == null || operation == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0029_SERVICE_PORT_OPERATION_PARAM_MUST_NOT_BE_NULL(service, port, operation)));
- }
-
- return new PolicyMapKey(service, port, operation, operationAndInputOutputMessageKeyHandler);
- }
-
- @Override
- public String toString(){
- // TODO
- final StringBuffer result = new StringBuffer();
- if(null!=this.serviceMap) {
- result.append("\nServiceMap=").append(this.serviceMap);
- }
- if(null!=this.endpointMap) {
- result.append("\nEndpointMap=").append(this.endpointMap);
- }
- if(null!=this.operationMap) {
- result.append("\nOperationMap=").append(this.operationMap);
- }
- if(null!=this.inputMessageMap) {
- result.append("\nInputMessageMap=").append(this.inputMessageMap);
- }
- if(null!=this.outputMessageMap) {
- result.append("\nOutputMessageMap=").append(this.outputMessageMap);
- }
- if(null!=this.faultMessageMap) {
- result.append("\nFaultMessageMap=").append(this.faultMessageMap);
- }
- return result.toString();
- }
-
- public Iterator<Policy> iterator() {
- return new Iterator<Policy> () {
- private final Iterator<Iterator<Policy>> mainIterator;
- private Iterator<Policy> currentScopeIterator;
-
- { // instance initialization
- final Collection<Iterator<Policy>> scopeIterators = new ArrayList<Iterator<Policy>>(6);
- scopeIterators.add(serviceMap.iterator());
- scopeIterators.add(endpointMap.iterator());
- scopeIterators.add(operationMap.iterator());
- scopeIterators.add(inputMessageMap.iterator());
- scopeIterators.add(outputMessageMap.iterator());
- scopeIterators.add(faultMessageMap.iterator());
-
- mainIterator = scopeIterators.iterator();
- currentScopeIterator = mainIterator.next();
- }
-
- public boolean hasNext() {
- while (!currentScopeIterator.hasNext()) {
- if (mainIterator.hasNext()) {
- currentScopeIterator = mainIterator.next();
- } else {
- return false;
- }
- }
-
- return true;
- }
-
- public Policy next() {
- if (hasNext()) {
- return currentScopeIterator.next();
- }
- throw LOGGER.logSevereException(new NoSuchElementException(LocalizationMessages.WSP_0054_NO_MORE_ELEMS_IN_POLICY_MAP()));
- }
-
- public void remove() {
- throw LOGGER.logSevereException(new UnsupportedOperationException(LocalizationMessages.WSP_0034_REMOVE_OPERATION_NOT_SUPPORTED()));
- }
- };
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapExtender.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapExtender.java
deleted file mode 100644
index 4b2b1e1c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapExtender.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-/**
- * The class provides methods to extend policy map content with new policies
- *
- * @author Marek Potociar (marek.potociar@sun.com)
- */
-public final class PolicyMapExtender extends PolicyMapMutator {
-
- /**
- * This constructor is private to prevent direct instantiation from outside of the class
- */
- private PolicyMapExtender() {
- // nothing to initialize
- }
-
- public static PolicyMapExtender createPolicyMapExtender() {
- return new PolicyMapExtender();
- }
-
- public void putServiceSubject(final PolicyMapKey key, final PolicySubject subject) {
- getMap().putSubject(PolicyMap.ScopeType.SERVICE, key, subject);
- }
-
- public void putEndpointSubject(final PolicyMapKey key, final PolicySubject subject) {
- getMap().putSubject(PolicyMap.ScopeType.ENDPOINT, key, subject);
- }
-
- public void putOperationSubject(final PolicyMapKey key, final PolicySubject subject) {
- getMap().putSubject(PolicyMap.ScopeType.OPERATION, key, subject);
- }
-
- public void putInputMessageSubject(final PolicyMapKey key, final PolicySubject subject) {
- getMap().putSubject(PolicyMap.ScopeType.INPUT_MESSAGE, key, subject);
- }
-
- public void putOutputMessageSubject(final PolicyMapKey key, final PolicySubject subject) {
- getMap().putSubject(PolicyMap.ScopeType.OUTPUT_MESSAGE, key, subject);
- }
-
- public void putFaultMessageSubject(final PolicyMapKey key, final PolicySubject subject) {
- getMap().putSubject(PolicyMap.ScopeType.FAULT_MESSAGE, key, subject);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapKey.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapKey.java
deleted file mode 100644
index 278f3fb6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapKey.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-
-import javax.xml.namespace.QName;
-
-/**
- * This class provides implementation of PolicyMapKey interface to be used in connection with {@link PolicyMap}.
- * Instances of the class are created by a call to one of {@link PolicyMap} <code>createWsdl<emph>XXX</emph>PolicyMapKey(...)</code>
- * methods.
- * <p/>
- * The class wraps scope information and adds a package setter method to allow injection of actual equality comparator/tester. This injection
- * is made within a <code>get...</code> call on {@link PolicyMap}, before the actual scope map search is performed.
- *
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- * @author Fabian Ritzmann
- */
-final public class PolicyMapKey {
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyMapKey.class);
-
- private final QName service;
- private final QName port;
- private final QName operation;
- private final QName faultMessage;
-
- private PolicyMapKeyHandler handler;
-
- PolicyMapKey(final QName service, final QName port, final QName operation, final PolicyMapKeyHandler handler) {
- this(service, port, operation, null, handler);
- }
-
- PolicyMapKey(final QName service, final QName port, final QName operation, final QName faultMessage, final PolicyMapKeyHandler handler) {
- if (handler == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET()));
- }
-
- this.service = service;
- this.port = port;
- this.operation = operation;
- this.faultMessage = faultMessage;
- this.handler = handler;
- }
-
- PolicyMapKey(final PolicyMapKey that) {
- this.service = that.service;
- this.port = that.port;
- this.operation = that.operation;
- this.faultMessage = that.faultMessage;
- this.handler = that.handler;
- }
-
- public QName getOperation() {
- return operation;
- }
-
- public QName getPort() {
- return port;
- }
-
- public QName getService() {
- return service;
- }
-
- void setHandler(PolicyMapKeyHandler handler) {
- if (handler == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET()));
- }
-
- this.handler = handler;
- }
-
- public QName getFaultMessage() {
- return faultMessage;
- }
-
- @Override
- public boolean equals(final Object that) {
- if (this == that) {
- return true; // we are lucky here => no special handling is required
- }
-
- if (that == null) {
- return false;
- }
-
- if (that instanceof PolicyMapKey) {
- return handler.areEqual(this, (PolicyMapKey) that);
- } else {
- return false;
- }
- }
-
- @Override
- public int hashCode() {
- return handler.generateHashCode(this);
- }
-
- @Override
- public String toString() {
- final StringBuffer result = new StringBuffer("PolicyMapKey(");
- result.append(this.service).append(", ").append(port).append(", ").append(operation).append(", ").append(faultMessage);
- return result.append(")").toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapKeyHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapKeyHandler.java
deleted file mode 100644
index 5dedd1a7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapKeyHandler.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-
-/**
- * This interface defines method that is used to handle actual equality comparison and hash code generation for PolicyMapKey object.
- * <p/>
- * The different implementations of this interface may allow different strategies to be applied for operations mentioned above. This feature
- * is used within {@link WSPolicyMap} to restrict set of fields to be compared when searching different policy scope maps.
- *
- *
- *
- * @author Marek Potociar
- */
-interface PolicyMapKeyHandler {
- boolean areEqual(PolicyMapKey locator1, PolicyMapKey locator2);
-
- int generateHashCode(PolicyMapKey locator);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapMutator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapMutator.java
deleted file mode 100644
index 37d27231..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapMutator.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-
-/**
- * The class serves as a base for specific policy map mutator implementations. It provides common methods that allow
- * concrete mutator implementations to connect and disconnect to/from a policy map instance.
- *
- * @author Marek Potociar (marek.potociar@sun.com)
- */
-public abstract class PolicyMapMutator {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyMapMutator.class);
-
- private PolicyMap map = null;
-
- /**
- * Creates a new instance of PolicyMapMutator. This class cannot be extended from outside of this package.
- */
- PolicyMapMutator() {
- // nothing to instantiate
- }
-
- /**
- * The method is used to connect the policy map mutator instance to the map it should mutate.
- *
- * @param map the policy map instance that will be mutable by this mutator.
- * @throws IllegalStateException in case this mutator object is already connected to a policy map.
- */
- public void connect(final PolicyMap map) {
- if (isConnected()) {
- throw LOGGER.logSevereException(new IllegalStateException(LocalizationMessages.WSP_0044_POLICY_MAP_MUTATOR_ALREADY_CONNECTED()));
- }
-
- this.map = map;
- }
-
- /**
- * Can be used to retrieve the policy map currently connected to this mutator. Will return {@code null} if not connected.
- *
- * @return policy map currently connected to this mutator. May return {@code null} if the mutator is not connected.
- *
- * @see #isConnected()
- * @see #disconnect()
- */
- public PolicyMap getMap() {
- return this.map;
- }
-
- /**
- * Disconnects the mutator from the policy map object it is connected to. Method must be called prior to connecting this
- * mutator instance to another policy map.
- * <p/>
- * This operation is irreversible: you cannot connect the mutator to the same policy map instance once you disconnect from it.
- * Multiple consequent calls of this method will have no effect.
- */
- public void disconnect() {
- this.map = null;
- }
-
- /**
- * This method provides connection status information of the policy map mutator instance.
- *
- * @return {@code true} if the mutator instance is connected to a policy map, otherwise returns {@code false}.
- */
- public boolean isConnected() {
- return this.map != null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapUtil.java
deleted file mode 100644
index 6aa63a96..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMapUtil.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.PolicyMap.ScopeType;
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.subject.PolicyMapKeyConverter;
-import com.sun.xml.internal.ws.policy.subject.WsdlBindingSubject;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedList;
-import javax.xml.namespace.QName;
-
-/**
- * Utility methods that operate on a PolicyMap.
- *
- * @author Fabian Ritzmann
- */
-public class PolicyMapUtil {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyMapUtil.class);
-
- private static final PolicyMerger MERGER = PolicyMerger.getMerger();
-
- /**
- * Prevent instantiation.
- */
- private PolicyMapUtil() {
- }
-
- /**
- * Throw an exception if the policy map contains any policy with at least two
- * policy alternatives.
- *
- * Optional assertions are not considered (unless they have been normalized into
- * two policy alternatives).
- *
- * @param map policy map to be processed
- * @throws PolicyException Thrown if the policy map contains at least one policy
- * with more than one policy alternative
- */
- public static void rejectAlternatives(final PolicyMap map) throws PolicyException {
- for (Policy policy : map) {
- if (policy.getNumberOfAssertionSets() > 1) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0035_RECONFIGURE_ALTERNATIVES(policy.getIdOrName())));
- }
- }
- }
-
- /**
- * Inserts all PolicySubjects of type WsdlBindingSubject into the given policy map.
- *
- * @param policyMap The policy map
- * @param policySubjects The policy subjects. The actual subject must have the
- * type WsdlBindingSubject, otherwise it will not be processed.
- * @param serviceName The name of the current WSDL service
- * @param portName The name of the current WSDL port
- * @throws PolicyException Thrown if the effective policy of a policy subject
- * could not be computed
- */
- public static void insertPolicies(final PolicyMap policyMap, final Collection<PolicySubject> policySubjects, QName serviceName, QName portName)
- throws PolicyException {
- LOGGER.entering(policyMap, policySubjects, serviceName, portName);
-
- final HashMap<WsdlBindingSubject, Collection<Policy>> subjectToPolicies = new HashMap<WsdlBindingSubject, Collection<Policy>>();
- for (PolicySubject subject: policySubjects) {
- final Object actualSubject = subject.getSubject();
- if (actualSubject instanceof WsdlBindingSubject) {
- final WsdlBindingSubject wsdlSubject = (WsdlBindingSubject) actualSubject;
- final Collection<Policy> subjectPolicies = new LinkedList<Policy>();
- subjectPolicies.add(subject.getEffectivePolicy(MERGER));
- final Collection<Policy> existingPolicies = subjectToPolicies.put(wsdlSubject, subjectPolicies);
- if (existingPolicies != null) {
- subjectPolicies.addAll(existingPolicies);
- }
- }
- }
-
- final PolicyMapKeyConverter converter = new PolicyMapKeyConverter(serviceName, portName);
- for (WsdlBindingSubject wsdlSubject : subjectToPolicies.keySet()) {
- final PolicySubject newSubject = new PolicySubject(wsdlSubject, subjectToPolicies.get(wsdlSubject));
- PolicyMapKey mapKey = converter.getPolicyMapKey(wsdlSubject);
-
- if (wsdlSubject.isBindingSubject()) {
- policyMap.putSubject(ScopeType.ENDPOINT, mapKey, newSubject);
- }
- else if (wsdlSubject.isBindingOperationSubject()) {
- policyMap.putSubject(ScopeType.OPERATION, mapKey, newSubject);
- }
- else if (wsdlSubject.isBindingMessageSubject()) {
- switch (wsdlSubject.getMessageType()) {
- case INPUT:
- policyMap.putSubject(ScopeType.INPUT_MESSAGE, mapKey, newSubject);
- break;
- case OUTPUT:
- policyMap.putSubject(ScopeType.OUTPUT_MESSAGE, mapKey, newSubject);
- break;
- case FAULT:
- policyMap.putSubject(ScopeType.FAULT_MESSAGE, mapKey, newSubject);
- break;
- }
- }
- }
-
- LOGGER.exiting();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMerger.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMerger.java
deleted file mode 100644
index 70f40215..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyMerger.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.LinkedList;
-
-/**
- * Merge policies and return the effective policy.
- *
- * WS-PolicyAttachment defines a merge algorithm for WSDL 1.1 policy attachments.
- */
-public final class PolicyMerger {
- private static final PolicyMerger merger = new PolicyMerger();
-
- /**
- * This private constructor is to avoid direct class instantiation from outsied of the package
- */
- private PolicyMerger() {
- // nothing to instantiate
- }
-
- /**
- * Factory method for obtaining thread-safe policy merger instance.
- *
- * @return policy merger instance.
- */
- public static PolicyMerger getMerger() {
- return merger;
- }
-
- /**
- * Takes collection of policies and merges them into a single policy using algorithm described in
- * WS-PolicyAttachment specification. None of the original policies in the collection are modified in
- * any way.
- *
- * The newly created policy has an ID that is a concatentation of all merged policy IDs.
- *
- * @param policies collection of policies to be merged. The collection must not contain '{@code null}' elements!
- * @return merged policy containing combination of policy alternatives stored in all input policies.
- * If provided collection of policies is {@code null} or empty, returns {@code null}. If provided
- * collection of policies contains only single policy, the policy is returned.
- */
- public Policy merge(final Collection<Policy> policies) {
- if (policies == null || policies.isEmpty()) {
- return null;
- } else if (policies.size() == 1) {
- return policies.iterator().next();
- }
-
- final Collection<Collection<AssertionSet>> alternativeSets = new LinkedList<Collection<AssertionSet>>();
- final StringBuilder id = new StringBuilder();
- NamespaceVersion mergedVersion = policies.iterator().next().getNamespaceVersion();
- for (Policy policy : policies) {
- alternativeSets.add(policy.getContent());
- if (mergedVersion.compareTo(policy.getNamespaceVersion()) < 0) {
- mergedVersion = policy.getNamespaceVersion();
- }
- final String policyId = policy.getId();
- if (policyId != null) {
- if (id.length() > 0) {
- id.append('-');
- }
- id.append(policyId);
- }
- }
-
- final Collection<Collection<AssertionSet>> combinedAlternatives = PolicyUtils.Collections.combine(null, alternativeSets, false);
-
- if (combinedAlternatives == null || combinedAlternatives.isEmpty()) {
- return Policy.createNullPolicy(mergedVersion, null, id.length() == 0 ? null : id.toString());
- } else {
- final Collection<AssertionSet> mergedSetList = new ArrayList<AssertionSet>(combinedAlternatives.size());
- for (Collection<AssertionSet> toBeMerged : combinedAlternatives) {
- mergedSetList.add(AssertionSet.createMergedAssertionSet(toBeMerged));
- }
- return Policy.createPolicy(mergedVersion, null, id.length() == 0 ? null : id.toString(), mergedSetList);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyScope.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyScope.java
deleted file mode 100644
index 808372cc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicyScope.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * A policy scope is a collection of equally ranked elements or subjects that
- * hold policies
- *
- * @author Fabian Ritzmann
- */
-final class PolicyScope {
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyScope.class);
-
- private final List<PolicySubject> subjects = new LinkedList<PolicySubject>();
-
- PolicyScope(final List<PolicySubject> initialSubjects) {
- if (initialSubjects != null && !initialSubjects.isEmpty()) {
- this.subjects.addAll(initialSubjects);
- }
- }
-
- void attach(final PolicySubject subject) {
- if (subject == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0020_SUBJECT_PARAM_MUST_NOT_BE_NULL()));
- }
-
- subjects.add(subject);
- }
-
- void dettachAllSubjects() {
- subjects.clear();
- }
-
- /**
- * Returns all policies of the scope merged into one policy
- *
- * @return effective policy of the scope
- */
- Policy getEffectivePolicy(final PolicyMerger merger) throws PolicyException {
- final LinkedList<Policy> policies = new LinkedList<Policy>();
- for (PolicySubject subject : subjects) {
- policies.add(subject.getEffectivePolicy(merger));
- }
- return merger.merge(policies);
- }
-
- /**
- * Returns all subjects contained by this scope
- *
- * @return The subjects contained by this scope
- */
- Collection<PolicySubject> getPolicySubjects() {
- return this.subjects;
- }
-
-
- /**
- * An {@code Object.toString()} method override.
- */
- @Override
- public String toString() {
- return toString(0, new StringBuffer()).toString();
- }
-
- /**
- * A helper method that appends indented string representation of this instance to the input string buffer.
- *
- * @param indentLevel indentation level to be used.
- * @param buffer buffer to be used for appending string representation of this instance
- * @return modified buffer containing new string representation of the instance
- */
- StringBuffer toString(final int indentLevel, final StringBuffer buffer) {
- final String indent = PolicyUtils.Text.createIndent(indentLevel);
-
- buffer.append(indent).append("policy scope {").append(PolicyUtils.Text.NEW_LINE);
- for (PolicySubject policySubject : subjects) {
- policySubject.toString(indentLevel + 1, buffer).append(PolicyUtils.Text.NEW_LINE);
- }
- buffer.append(indent).append('}');
-
- return buffer;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicySubject.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicySubject.java
deleted file mode 100644
index a4164b01..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/PolicySubject.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * A PolicySubject is an entity (e.g., a port, operation, binding,
- * service) with which a policy can be associated.
- *
- * @author Fabian Ritzmann
- */
-public final class PolicySubject {
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicySubject.class);
-
- private final List<Policy> policies = new LinkedList<Policy>();
- private final Object subject;
-
- /**
- * Constructs a policy subject instance.
- *
- * @param subject object to which the policies are attached. Must not be {@code null}.
- * @param policy first policy attached to the subject. Must not be {@code null}.
- *
- * @throws IllegalArgumentException in case any of the arguments is {@code null}.
- */
- public PolicySubject(Object subject, Policy policy) throws IllegalArgumentException {
- if (subject == null || policy == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0021_SUBJECT_AND_POLICY_PARAM_MUST_NOT_BE_NULL(subject, policy)));
- }
-
- this.subject = subject;
- this.attach(policy);
- }
-
- /**
- * Constructs a policy subject instance.
- *
- * @param subject object to which the policies are attached. Must not be {@code null}.
- * @param policies first policy attached to the subject. Must not be {@code null}.
- *
- * @throws IllegalArgumentException in case any of the arguments is {@code null} or
- * in case {@code policies} argument represents empty collection.
- */
- public PolicySubject(Object subject, Collection<Policy> policies) throws IllegalArgumentException {
- if (subject == null || policies == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0062_INPUT_PARAMS_MUST_NOT_BE_NULL()));
- }
-
- if (policies.isEmpty()) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0064_INITIAL_POLICY_COLLECTION_MUST_NOT_BE_EMPTY()));
- }
-
- this.subject = subject;
- this.policies.addAll(policies);
- }
-
- /**
- * Attaches another Policy instance to the policy subject.
- *
- * @param policy new policy instance to be attached to this subject
- *
- * @throws IllegalArgumentException in case {@code policy} argument is {@code null}.
- */
- public void attach(final Policy policy) {
- if (policy == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0038_POLICY_TO_ATTACH_MUST_NOT_BE_NULL()));
- }
- this.policies.add(policy);
- }
-
- /**
- * Returns the effective policy of the subject, i.e. all policies of the subject
- * merged together.
- *
- * @return effective policy of the subject
- */
- public Policy getEffectivePolicy(final PolicyMerger merger) throws PolicyException {
- return merger.merge(policies);
- }
-
- /**
- * A unique identifier of the subject
- *
- * Subjects may not always be uniquely identifiable. Also, once the subject is
- * assigned to a scope, its identity may not matter anymore. Therefore this
- * may be null.
- */
- public Object getSubject() {
- return this.subject;
- }
-
- /**
- * An {@code Object.toString()} method override.
- */
- @Override
- public String toString() {
- return toString(0, new StringBuffer()).toString();
- }
-
- /**
- * A helper method that appends indented string representation of this instance to the input string buffer.
- *
- * @param indentLevel indentation level to be used.
- * @param buffer buffer to be used for appending string representation of this instance
- * @return modified buffer containing new string representation of the instance
- */
- StringBuffer toString(final int indentLevel, final StringBuffer buffer) {
- final String indent = PolicyUtils.Text.createIndent(indentLevel);
- final String innerIndent = PolicyUtils.Text.createIndent(indentLevel + 1);
-
- buffer.append(indent).append("policy subject {").append(PolicyUtils.Text.NEW_LINE);
- buffer.append(innerIndent).append("subject = '").append(subject).append('\'').append(PolicyUtils.Text.NEW_LINE);
- for (Policy policy : policies) {
- policy.toString(indentLevel + 1, buffer).append(PolicyUtils.Text.NEW_LINE);
- }
- buffer.append(indent).append('}');
-
- return buffer;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/SimpleAssertion.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/SimpleAssertion.java
deleted file mode 100644
index 58018889..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/SimpleAssertion.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy;
-
-import com.sun.xml.internal.ws.policy.sourcemodel.AssertionData;
-import java.util.Collection;
-
-/**
- * Simple assertion is an abstract class that serves as a base class for any assertion
- * that <b>MAY NOT</b> contain nested policies.
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public abstract class SimpleAssertion extends PolicyAssertion {
- protected SimpleAssertion() {
- super();
- }
-
- protected SimpleAssertion(AssertionData data, Collection<? extends PolicyAssertion> assertionParameters) {
- super(data, assertionParameters);
- }
-
- @Override
- public final boolean hasNestedPolicy() { // TODO: make abstract
- return false;
- }
-
- @Override
- public final NestedPolicy getNestedPolicy() { // TODO: make abstract
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandler.java
deleted file mode 100644
index 09811ee7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandler.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.jaxws;
-
-import com.sun.xml.internal.ws.api.policy.ModelTranslator;
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMapExtender;
-import com.sun.xml.internal.ws.policy.PolicySubject;
-import com.sun.xml.internal.ws.resources.PolicyMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-
-/**
- *
- * @author Jakub Podlesak (jakub.podlesak at sun.com)
- */
-abstract class BuilderHandler{
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(BuilderHandler.class);
-
- Map<String,PolicySourceModel> policyStore;
- Collection<String> policyURIs;
- Object policySubject;
-
- /**
- * Creates a new instance of BuilderHandler
- */
- BuilderHandler(Collection<String> policyURIs, Map<String,PolicySourceModel> policyStore, Object policySubject) {
- this.policyStore = policyStore;
- this.policyURIs = policyURIs;
- this.policySubject = policySubject;
- }
-
- final void populate(final PolicyMapExtender policyMapExtender) throws PolicyException {
- if (null == policyMapExtender) {
- throw LOGGER.logSevereException(new PolicyException(PolicyMessages.WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL()));
- }
-
- doPopulate(policyMapExtender);
- }
-
- protected abstract void doPopulate(final PolicyMapExtender policyMapExtender) throws PolicyException;
-
- final Collection<Policy> getPolicies() throws PolicyException {
- if (null == policyURIs) {
- throw LOGGER.logSevereException(new PolicyException(PolicyMessages.WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL()));
- }
- if (null == policyStore) {
- throw LOGGER.logSevereException(new PolicyException(PolicyMessages.WSP_1010_NO_POLICIES_DEFINED()));
- }
-
- final Collection<Policy> result = new ArrayList<Policy>(policyURIs.size());
-
- for (String policyURI : policyURIs) {
- final PolicySourceModel sourceModel = policyStore.get(policyURI);
- if (sourceModel == null) {
- throw LOGGER.logSevereException(new PolicyException(PolicyMessages.WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST(policyURI)));
- } else {
- result.add(ModelTranslator.getTranslator().translate(sourceModel));
- }
- }
-
- return result;
- }
-
- final Collection<PolicySubject> getPolicySubjects() throws PolicyException {
- final Collection<Policy> policies = getPolicies();
- final Collection<PolicySubject> result = new ArrayList<PolicySubject>(policies.size());
- for (Policy policy : policies) {
- result.add(new PolicySubject(policySubject, policy));
- }
- return result;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerEndpointScope.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerEndpointScope.java
deleted file mode 100644
index 02487dff..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerEndpointScope.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.jaxws;
-
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapExtender;
-import com.sun.xml.internal.ws.policy.PolicyMapKey;
-import com.sun.xml.internal.ws.policy.PolicySubject;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel;
-
-import java.util.Collection;
-import java.util.Map;
-import javax.xml.namespace.QName;
-
-/**
- *
- * @author Jakub Podlesak (jakub.podlesak at sun.com)
- */
-final class BuilderHandlerEndpointScope extends BuilderHandler{
- private final QName service;
- private final QName port;
-
- /** Creates a new instance of WSDLServiceScopeBuilderHandler */
- BuilderHandlerEndpointScope(Collection<String> policyURIs, Map<String,PolicySourceModel> policyStore, Object policySubject, QName service, QName port) {
-
- super(policyURIs, policyStore, policySubject);
- this.service = service;
- this.port = port;
- }
-
- protected void doPopulate(final PolicyMapExtender policyMapExtender) throws PolicyException {
- final PolicyMapKey mapKey = PolicyMap.createWsdlEndpointScopeKey(service, port);
- for (PolicySubject subject : getPolicySubjects()) {
- policyMapExtender.putEndpointSubject(mapKey, subject);
- }
- }
-
- @Override
- public String toString() {
- return (new StringBuffer(service.toString())).append(":").append(port.toString()).toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerMessageScope.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerMessageScope.java
deleted file mode 100644
index fa18db60..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerMessageScope.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.jaxws;
-
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapExtender;
-import com.sun.xml.internal.ws.policy.PolicyMapKey;
-import com.sun.xml.internal.ws.policy.PolicySubject;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel;
-
-import java.util.Collection;
-import java.util.Map;
-import javax.xml.namespace.QName;
-
-/**
- *
- * @author Jakub Podlesak (jakub.podlesak at sun.com)
- */
-final class BuilderHandlerMessageScope extends BuilderHandler{
- private final QName service;
- private final QName port;
- private final QName operation;
- private final QName message;
- private final Scope scope;
-
- enum Scope{
- InputMessageScope,
- OutputMessageScope,
- FaultMessageScope,
- };
-
-
- /** Creates a new instance of WSDLServiceScopeBuilderHandler */
- BuilderHandlerMessageScope(
- Collection<String> policyURIs
- , Map<String,PolicySourceModel> policyStore
- , Object policySubject
- , Scope scope
- , QName service, QName port, QName operation, QName message) {
-
- super(policyURIs, policyStore, policySubject);
- this.service = service;
- this.port = port;
- this.operation = operation;
- this.scope = scope;
- this.message = message;
- }
-
- /**
- * Multiple bound operations may refer to the same fault messages. This would result
- * in multiple builder handlers referring to the same policies. This method allows
- * to sort out these duplicate handlers.
- */
- @Override
- public boolean equals(final Object obj) {
- if (this == obj) {
- return true;
- }
-
- if (!(obj instanceof BuilderHandlerMessageScope)) {
- return false;
- }
-
- final BuilderHandlerMessageScope that = (BuilderHandlerMessageScope) obj;
- boolean result = true;
-
- result = result && ((this.policySubject == null) ? ((that.policySubject == null) ? true : false) :this.policySubject.equals(that.policySubject));
- result = result && ((this.scope == null) ? ((that.scope == null) ? true : false) :this.scope.equals(that.scope));
- result = result && ((this.message == null) ? ((that.message == null) ? true : false) :this.message.equals(that.message));
- if (this.scope != Scope.FaultMessageScope) {
- result = result && ((this.service == null) ? ((that.service == null) ? true : false) :this.service.equals(that.service));
- result = result && ((this.port == null) ? ((that.port == null) ? true : false) :this.port.equals(that.port));
- result = result && ((this.operation == null) ? ((that.operation == null) ? true : false) :this.operation.equals(that.operation));
- }
-
- return result;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 19;
- hashCode = 31 * hashCode + (policySubject == null ? 0 : policySubject.hashCode());
- hashCode = 31 * hashCode + (message == null ? 0 : message.hashCode());
- hashCode = 31 * hashCode + (scope == null ? 0 : scope.hashCode());
- if (scope != Scope.FaultMessageScope) {
- hashCode = 31 * hashCode + (service == null ? 0 : service.hashCode());
- hashCode = 31 * hashCode + (port == null ? 0 : port.hashCode());
- hashCode = 31 * hashCode + (operation == null ? 0 : operation.hashCode());
- }
- return hashCode;
- }
-
- protected void doPopulate(final PolicyMapExtender policyMapExtender) throws PolicyException{
- PolicyMapKey mapKey;
-
- if (Scope.FaultMessageScope == scope) {
- mapKey = PolicyMap.createWsdlFaultMessageScopeKey(service, port, operation, message);
- } else { // in|out msg scope
- mapKey = PolicyMap.createWsdlMessageScopeKey(service, port, operation);
- }
-
- if (Scope.InputMessageScope == scope) {
- for (PolicySubject subject:getPolicySubjects()) {
- policyMapExtender.putInputMessageSubject(mapKey, subject);
- }
- } else if (Scope.OutputMessageScope == scope) {
- for (PolicySubject subject:getPolicySubjects()) {
- policyMapExtender.putOutputMessageSubject(mapKey, subject);
- }
- } else if (Scope.FaultMessageScope == scope) {
- for (PolicySubject subject : getPolicySubjects()) {
- policyMapExtender.putFaultMessageSubject(mapKey, subject);
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerOperationScope.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerOperationScope.java
deleted file mode 100644
index 6796873c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerOperationScope.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.jaxws;
-
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapExtender;
-import com.sun.xml.internal.ws.policy.PolicyMapKey;
-import com.sun.xml.internal.ws.policy.PolicySubject;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel;
-
-import java.util.Collection;
-import java.util.Map;
-import javax.xml.namespace.QName;
-
-/**
- *
- * @author Jakub Podlesak (jakub.podlesak at sun.com)
- */
-final class BuilderHandlerOperationScope extends BuilderHandler{
- private final QName service;
- private final QName port;
- private final QName operation;
-
- /** Creates a new instance of WSDLServiceScopeBuilderHandler */
- BuilderHandlerOperationScope(
- Collection<String> policyURIs
- , Map<String,PolicySourceModel> policyStore
- , Object policySubject
- , QName service, QName port, QName operation) {
-
- super(policyURIs, policyStore, policySubject);
- this.service = service;
- this.port = port;
- this.operation = operation;
- }
-
- protected void doPopulate(final PolicyMapExtender policyMapExtender) throws PolicyException{
- final PolicyMapKey mapKey = PolicyMap.createWsdlOperationScopeKey(service, port, operation);
- for (PolicySubject subject : getPolicySubjects()) {
- policyMapExtender.putOperationSubject(mapKey, subject);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerServiceScope.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerServiceScope.java
deleted file mode 100644
index 31e5456f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerServiceScope.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.jaxws;
-
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapExtender;
-import com.sun.xml.internal.ws.policy.PolicyMapKey;
-import com.sun.xml.internal.ws.policy.PolicySubject;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel;
-
-import java.util.Collection;
-import java.util.Map;
-import javax.xml.namespace.QName;
-
-/**
- *
- * @author Jakub Podlesak (jakub.podlesak at sun.com)
- */
-final class BuilderHandlerServiceScope extends BuilderHandler{
- private final QName service;
-
- /**
- * Creates a new instance of BuilderHandlerServiceScope
- */
- BuilderHandlerServiceScope(
- Collection<String> policyURIs, Map<String,PolicySourceModel> policyStore, Object policySubject, QName service) {
-
- super(policyURIs, policyStore, policySubject);
- this.service = service;
- }
-
- protected void doPopulate(final PolicyMapExtender policyMapExtender) throws PolicyException{
- final PolicyMapKey mapKey = PolicyMap.createWsdlServiceScopeKey(service);
- for (PolicySubject subject : getPolicySubjects()) {
- policyMapExtender.putServiceSubject(mapKey, subject);
- }
- }
-
- @Override
- public String toString() {
- return service.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/DefaultPolicyResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/DefaultPolicyResolver.java
deleted file mode 100644
index 5e995f16..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/DefaultPolicyResolver.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.jaxws;
-
-import com.sun.xml.internal.ws.api.policy.AlternativeSelector;
-import com.sun.xml.internal.ws.api.policy.PolicyResolver;
-import com.sun.xml.internal.ws.api.policy.ValidationProcessor;
-import com.sun.xml.internal.ws.policy.AssertionSet;
-import com.sun.xml.internal.ws.policy.EffectivePolicyModifier;
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.spi.PolicyAssertionValidator.Fitness;
-import com.sun.xml.internal.ws.resources.PolicyMessages;
-
-import javax.xml.ws.WebServiceException;
-
-/**
- * This default implementation runs the policy validators on the server side and
- * selects a policy alternative on the client side.
- *
- * @author Rama Pulavarthi
- * @author Fabian Ritzmann
- */
-public class DefaultPolicyResolver implements PolicyResolver {
-
- public PolicyMap resolve(ServerContext context) {
- PolicyMap map = context.getPolicyMap();
- if(map != null)
- validateServerPolicyMap(map);
- return map;
- }
-
- public PolicyMap resolve(ClientContext context) {
- PolicyMap map = context.getPolicyMap();
- if(map != null)
- map = doAlternativeSelection(map);
- return map;
- }
-
- /**
- * Checks if the PolicyMap has only single alternative in the scope.
- *
- * @param policyMap
- * PolicyMap that needs to be validated.
- */
- private void validateServerPolicyMap(PolicyMap policyMap) {
- try {
- final ValidationProcessor validationProcessor = ValidationProcessor.getInstance();
-
- for (Policy policy : policyMap) {
-
- // TODO: here is a good place to check if the actual policy has only one alternative...
-
- for (AssertionSet assertionSet : policy) {
- for (PolicyAssertion assertion : assertionSet) {
- Fitness validationResult = validationProcessor.validateServerSide(assertion);
- if (validationResult != Fitness.SUPPORTED) {
- throw new PolicyException(PolicyMessages.WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(
- assertion.getName(),
- validationResult));
- }
- }
- }
- }
- } catch (PolicyException e) {
- throw new WebServiceException(e);
- }
- }
-
- /**
- * Selects a best alternative if there are multiple policy alternatives.
- *
- * @param policyMap
- * @return
- */
- private PolicyMap doAlternativeSelection(PolicyMap policyMap) {
- final EffectivePolicyModifier modifier = EffectivePolicyModifier.createEffectivePolicyModifier();
- modifier.connect(policyMap);
- try {
- AlternativeSelector.doSelection(modifier);
- } catch (PolicyException e) {
- throw new WebServiceException(e);
- }
- return policyMap;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyMapBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyMapBuilder.java
deleted file mode 100644
index da9caccd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyMapBuilder.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.jaxws;
-
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapExtender;
-import com.sun.xml.internal.ws.policy.PolicyMapMutator;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * Used for populating changes into PolicyMap. Once a PolicyMap is created
- * PolicyMapBuilder notifies all the registered WSPolicyBuilderHandler to populate
- * changes to the PolicyMap.
- *
- *
- * @author Jakub Podlesak (jakub.podlesak at sun.com)
- */
-class PolicyMapBuilder {
- /**
- * policyBuilders should contain list of registered PolicyBuilders
- */
- private List<BuilderHandler> policyBuilders = new LinkedList<BuilderHandler>();
-
- /**
- * Creates a new instance of PolicyMapBuilder
- */
- PolicyMapBuilder() {
- // nothing to initialize
- }
-
- /**
- * Registers another builder, which has to be notified after a new
- * PolicyMap is created in order to populate it's changes.
- *
- */
- void registerHandler(final BuilderHandler builder){
- if (null != builder) {
- policyBuilders.add(builder);
- }
- }
-
- /**
- * Iterates all the registered PolicyBuilders and lets them populate
- * their changes into PolicyMap. Registers mutators given as a parameter
- * with the newly created map.
- */
- PolicyMap getPolicyMap(final PolicyMapMutator... externalMutators) throws PolicyException{
- return getNewPolicyMap(externalMutators);
- }
-
-
- /**
- * Iterates all the registered PolicyBuilders and lets them populate
- * their changes into PolicyMap. Registers mutators from collection given as a parameter
- * with the newly created map.
- */
- private PolicyMap getNewPolicyMap(final PolicyMapMutator... externalMutators) throws PolicyException{
- final HashSet<PolicyMapMutator> mutators = new HashSet<PolicyMapMutator>();
- final PolicyMapExtender myExtender = PolicyMapExtender.createPolicyMapExtender();
- mutators.add(myExtender);
- if (null != externalMutators) {
- mutators.addAll(Arrays.asList(externalMutators));
- }
- final PolicyMap policyMap = PolicyMap.createPolicyMap(mutators);
- for(BuilderHandler builder : policyBuilders){
- builder.populate(myExtender);
- }
- return policyMap;
- }
-
- void unregisterAll() {
- this.policyBuilders = null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyUtil.java
deleted file mode 100644
index a3497ce9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyUtil.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.jaxws;
-
-import com.sun.xml.internal.ws.addressing.policy.AddressingFeatureConfigurator;
-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.encoding.policy.FastInfosetFeatureConfigurator;
-import com.sun.xml.internal.ws.encoding.policy.MtomFeatureConfigurator;
-import com.sun.xml.internal.ws.encoding.policy.SelectOptimalEncodingFeatureConfigurator;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapKey;
-import com.sun.xml.internal.ws.policy.jaxws.spi.PolicyFeatureConfigurator;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.WebServiceException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-/**
- * @author Rama Pulavarthi
- * @author Fabian Ritzmann
- */
-public class PolicyUtil {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyUtil.class);
- private static final Collection<PolicyFeatureConfigurator> CONFIGURATORS =
- new LinkedList<PolicyFeatureConfigurator>();
-
- static {
- // Add feature configurators that are already built into JAX-WS
- CONFIGURATORS.add(new AddressingFeatureConfigurator());
- CONFIGURATORS.add(new MtomFeatureConfigurator());
- CONFIGURATORS.add(new FastInfosetFeatureConfigurator());
- CONFIGURATORS.add(new SelectOptimalEncodingFeatureConfigurator());
-
- // Dynamically discover remaining feature configurators
- addServiceProviders(CONFIGURATORS, PolicyFeatureConfigurator.class);
- }
-
- /**
- * Adds the dynamically discovered implementations for the given service class
- * to the given collection.
- *
- * @param <T> The type of the service class.
- * @param providers The discovered implementations are added to this collection.
- * @param service The service interface.
- */
- public static <T> void addServiceProviders(Collection<T> providers, Class<T> service) {
- final Iterator<T> foundProviders = ServiceFinder.find(service).iterator();
- while (foundProviders.hasNext()) {
- providers.add(foundProviders.next());
- }
- }
-
- /**
- * Iterates through the ports in the WSDL model, for each policy in the policy
- * map that is attached at endpoint scope computes a list of corresponding
- * WebServiceFeatures and sets them on the port.
- *
- * @param model The WSDL model
- * @param policyMap The policy map
- * @throws PolicyException If the list of WebServiceFeatures could not be computed
- */
- public static void configureModel(final WSDLModel model, PolicyMap policyMap) throws PolicyException {
- LOGGER.entering(model, policyMap);
- for (WSDLService service : model.getServices().values()) {
- for (WSDLPort port : service.getPorts()) {
- final Collection<WebServiceFeature> features = getPortScopedFeatures(policyMap, service.getName(), port.getName());
- for (WebServiceFeature feature : features) {
- port.addFeature(feature);
- port.getBinding().addFeature(feature);
- }
- }
- }
- LOGGER.exiting();
- }
-
- /**
- * Returns the list of features that correspond to the policies in the policy
- * map for a give port
- *
- * @param policyMap The service policies
- * @param serviceName The service name
- * @param portName The service port name
- * @return List of features for the given port corresponding to the policies in the map
- */
- public static Collection<WebServiceFeature> getPortScopedFeatures(PolicyMap policyMap, QName serviceName, QName portName) {
- LOGGER.entering(policyMap, serviceName, portName);
- Collection<WebServiceFeature> features = new ArrayList<WebServiceFeature>();
- try {
- final PolicyMapKey key = PolicyMap.createWsdlEndpointScopeKey(serviceName, portName);
- for (PolicyFeatureConfigurator configurator : CONFIGURATORS) {
- Collection<WebServiceFeature> additionalFeatures = configurator.getFeatures(key, policyMap);
- if (additionalFeatures != null) {
- features.addAll(additionalFeatures);
- }
- }
- } catch (PolicyException e) {
- throw new WebServiceException(e);
- }
- LOGGER.exiting(features);
- return features;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLGeneratorExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLGeneratorExtension.java
deleted file mode 100644
index 6310c916..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLGeneratorExtension.java
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.jaxws;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.ws.addressing.policy.AddressingPolicyMapConfigurator;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.policy.PolicyResolverFactory;
-import com.sun.xml.internal.ws.api.policy.PolicyResolver;
-import com.sun.xml.internal.ws.api.model.CheckedException;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundFault;
-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.WSDLFault;
-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.WSDLOutput;
-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.policy.ModelGenerator;
-import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGeneratorExtension;
-import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGenExtnContext;
-import com.sun.xml.internal.ws.encoding.policy.MtomPolicyMapConfigurator;
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyConstants;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapExtender;
-import com.sun.xml.internal.ws.policy.PolicyMapUtil;
-import com.sun.xml.internal.ws.policy.PolicyMerger;
-import com.sun.xml.internal.ws.policy.PolicySubject;
-import com.sun.xml.internal.ws.policy.jaxws.spi.PolicyMapConfigurator;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicyModelGenerator;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicyModelMarshaller;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.XmlToken;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion;
-import com.sun.xml.internal.ws.policy.subject.WsdlBindingSubject;
-import com.sun.xml.internal.ws.resources.PolicyMessages;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.Set;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-
-/**
- * Marshals the contents of a policy map to WSDL.
- *
- * @author Jakub Podlesak (jakub.podlesak at sun.com)
- * @author Fabian Ritzmann
- */
-public class PolicyWSDLGeneratorExtension extends WSDLGeneratorExtension {
-
- static enum ScopeType {
-
- SERVICE,
- ENDPOINT,
- OPERATION,
- INPUT_MESSAGE,
- OUTPUT_MESSAGE,
- FAULT_MESSAGE
- }
- private final static PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyWSDLGeneratorExtension.class);
- private PolicyMap policyMap;
- private SEIModel seiModel;
- private final Collection<PolicySubject> subjects = new LinkedList<PolicySubject>();
- private final PolicyModelMarshaller marshaller = PolicyModelMarshaller.getXmlMarshaller(true);
- private final PolicyMerger merger = PolicyMerger.getMerger();
-
- @Override
- public void start(final WSDLGenExtnContext context) {
- LOGGER.entering();
- try {
- this.seiModel = context.getModel();
-
- final PolicyMapConfigurator[] policyMapConfigurators = loadConfigurators();
- final PolicyMapExtender[] extenders = new PolicyMapExtender[policyMapConfigurators.length];
- for (int i = 0; i < policyMapConfigurators.length; i++) {
- extenders[i] = PolicyMapExtender.createPolicyMapExtender();
- }
- // Read policy config file
- policyMap = PolicyResolverFactory.create().resolve(
- new PolicyResolver.ServerContext(policyMap, context.getContainer(), context.getEndpointClass(), false, extenders));
-
- if (policyMap == null) {
- LOGGER.fine(PolicyMessages.WSP_1019_CREATE_EMPTY_POLICY_MAP());
- policyMap = PolicyMap.createPolicyMap(Arrays.asList(extenders));
- }
-
- final WSBinding binding = context.getBinding();
- try {
- final Collection<PolicySubject> policySubjects = new LinkedList<PolicySubject>();
- for (int i = 0; i < policyMapConfigurators.length; i++) {
- policySubjects.addAll(policyMapConfigurators[i].update(policyMap, seiModel, binding));
- extenders[i].disconnect();
- }
- PolicyMapUtil.insertPolicies(policyMap, policySubjects, this.seiModel.getServiceQName(), this.seiModel.getPortName());
- } catch (PolicyException e) {
- throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1017_MAP_UPDATE_FAILED(), e));
- }
- final TypedXmlWriter root = context.getRoot();
- root._namespace(NamespaceVersion.v1_2.toString(), NamespaceVersion.v1_2.getDefaultNamespacePrefix());
- root._namespace(NamespaceVersion.v1_5.toString(), NamespaceVersion.v1_5.getDefaultNamespacePrefix());
- root._namespace(PolicyConstants.WSU_NAMESPACE_URI, PolicyConstants.WSU_NAMESPACE_PREFIX);
-
- } finally {
- LOGGER.exiting();
- }
- }
-
- @Override
- public void addDefinitionsExtension(final TypedXmlWriter definitions) {
- try {
- LOGGER.entering();
- if (policyMap == null) {
- LOGGER.fine(PolicyMessages.WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL());
- } else {
- subjects.addAll(policyMap.getPolicySubjects());
- final PolicyModelGenerator generator = ModelGenerator.getGenerator();
- Set<String> policyIDsOrNamesWritten = new HashSet<String>();
- for (PolicySubject subject : subjects) {
- if (subject.getSubject() == null) {
- LOGGER.fine(PolicyMessages.WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL(subject));
- } else {
- final Policy policy;
- try {
- policy = subject.getEffectivePolicy(merger);
- } catch (PolicyException e) {
- throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(subject.toString()), e));
- }
- if ((null == policy.getIdOrName()) || (policyIDsOrNamesWritten.contains(policy.getIdOrName()))) {
- LOGGER.fine(PolicyMessages.WSP_1016_POLICY_ID_NULL_OR_DUPLICATE(policy));
- } else {
- try {
- final PolicySourceModel policyInfoset = generator.translate(policy);
- marshaller.marshal(policyInfoset, definitions);
- } catch (PolicyException e) {
- throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1018_FAILED_TO_MARSHALL_POLICY(policy.getIdOrName()), e));
- }
- policyIDsOrNamesWritten.add(policy.getIdOrName());
- }
- }
- }
- }
- } finally {
- LOGGER.exiting();
- }
- }
-
- @Override
- public void addServiceExtension(final TypedXmlWriter service) {
- LOGGER.entering();
- final String serviceName = (null == seiModel) ? null : seiModel.getServiceQName().getLocalPart();
- selectAndProcessSubject(service, WSDLService.class, ScopeType.SERVICE, serviceName);
- LOGGER.exiting();
- }
-
- @Override
- public void addPortExtension(final TypedXmlWriter port) {
- LOGGER.entering();
- final String portName = (null == seiModel) ? null : seiModel.getPortName().getLocalPart();
- selectAndProcessSubject(port, WSDLPort.class, ScopeType.ENDPOINT, portName);
- LOGGER.exiting();
- }
-
- @Override
- public void addPortTypeExtension(final TypedXmlWriter portType) {
- LOGGER.entering();
- final String portTypeName = (null == seiModel) ? null : seiModel.getPortTypeName().getLocalPart();
- selectAndProcessSubject(portType, WSDLPortType.class, ScopeType.ENDPOINT, portTypeName);
- LOGGER.exiting();
- }
-
- @Override
- public void addBindingExtension(final TypedXmlWriter binding) {
- LOGGER.entering();
- final QName bindingName = (null == seiModel) ? null : seiModel.getBoundPortTypeName();
- selectAndProcessBindingSubject(binding, WSDLBoundPortType.class, ScopeType.ENDPOINT, bindingName);
- LOGGER.exiting();
- }
-
- @Override
- public void addOperationExtension(final TypedXmlWriter operation, final JavaMethod method) {
- LOGGER.entering();
- selectAndProcessSubject(operation, WSDLOperation.class, ScopeType.OPERATION, (String)null);
- LOGGER.exiting();
- }
-
- @Override
- public void addBindingOperationExtension(final TypedXmlWriter operation, final JavaMethod method) {
- LOGGER.entering();
- final QName operationName = (method == null) ? null : new QName(method.getOwner().getTargetNamespace(), method.getOperationName());
- selectAndProcessBindingSubject(operation, WSDLBoundOperation.class, ScopeType.OPERATION, operationName);
- LOGGER.exiting();
- }
-
- @Override
- public void addInputMessageExtension(final TypedXmlWriter message, final JavaMethod method) {
- LOGGER.entering();
- final String messageName = (null == method) ? null : method.getRequestMessageName();
- selectAndProcessSubject(message, WSDLMessage.class, ScopeType.INPUT_MESSAGE, messageName);
- LOGGER.exiting();
- }
-
- @Override
- public void addOutputMessageExtension(final TypedXmlWriter message, final JavaMethod method) {
- LOGGER.entering();
- final String messageName = (null == method) ? null : method.getResponseMessageName();
- selectAndProcessSubject(message, WSDLMessage.class, ScopeType.OUTPUT_MESSAGE, messageName);
- LOGGER.exiting();
- }
-
- @Override
- public void addFaultMessageExtension(final TypedXmlWriter message, final JavaMethod method, final CheckedException exception) {
- LOGGER.entering();
- final String messageName = (null == exception) ? null : exception.getMessageName();
- selectAndProcessSubject(message, WSDLMessage.class, ScopeType.FAULT_MESSAGE, messageName);
- LOGGER.exiting();
- }
-
- @Override
- public void addOperationInputExtension(final TypedXmlWriter input, final JavaMethod method) {
- LOGGER.entering();
- final String messageName = (null == method) ? null : method.getRequestMessageName();
- selectAndProcessSubject(input, WSDLInput.class, ScopeType.INPUT_MESSAGE, messageName);
- LOGGER.exiting();
- }
-
- @Override
- public void addOperationOutputExtension(final TypedXmlWriter output, final JavaMethod method) {
- LOGGER.entering();
- final String messageName = (null == method) ? null : method.getResponseMessageName();
- selectAndProcessSubject(output, WSDLOutput.class, ScopeType.OUTPUT_MESSAGE, messageName);
- LOGGER.exiting();
- }
-
- @Override
- public void addOperationFaultExtension(final TypedXmlWriter fault, final JavaMethod method, final CheckedException exception) {
- LOGGER.entering();
- final String messageName = (null == exception) ? null : exception.getMessageName();
- selectAndProcessSubject(fault, WSDLFault.class, ScopeType.FAULT_MESSAGE, messageName);
- LOGGER.exiting();
- }
-
- @Override
- public void addBindingOperationInputExtension(final TypedXmlWriter input, final JavaMethod method) {
- LOGGER.entering();
- final QName operationName = new QName(method.getOwner().getTargetNamespace(), method.getOperationName());
- selectAndProcessBindingSubject(input, WSDLBoundOperation.class, ScopeType.INPUT_MESSAGE, operationName);
- LOGGER.exiting();
- }
-
- @Override
- public void addBindingOperationOutputExtension(final TypedXmlWriter output, final JavaMethod method) {
- LOGGER.entering();
- final QName operationName = new QName(method.getOwner().getTargetNamespace(), method.getOperationName());
- selectAndProcessBindingSubject(output, WSDLBoundOperation.class, ScopeType.OUTPUT_MESSAGE, operationName);
- LOGGER.exiting();
- }
-
- @Override
- public void addBindingOperationFaultExtension(final TypedXmlWriter writer, final JavaMethod method, final CheckedException exception) {
- LOGGER.entering(writer, method, exception);
- if (subjects != null) {
- for (PolicySubject subject : subjects) { // iterate over all subjects in policy map
- if (this.policyMap.isFaultMessageSubject(subject)) {
- final Object concreteSubject = subject.getSubject();
- if (concreteSubject != null) {
- final String exceptionName = exception == null ? null : exception.getMessageName();
- if (exceptionName == null) { // no name provided to check
- writePolicyOrReferenceIt(subject, writer);
- }
- if (WSDLBoundFaultContainer.class.isInstance(concreteSubject)) { // is it our class?
- WSDLBoundFaultContainer faultContainer = (WSDLBoundFaultContainer) concreteSubject;
- WSDLBoundFault fault = faultContainer.getBoundFault();
- WSDLBoundOperation operation = faultContainer.getBoundOperation();
- if (exceptionName.equals(fault.getName()) &&
- operation.getName().getLocalPart().equals(method.getOperationName())) {
- writePolicyOrReferenceIt(subject, writer);
- }
- }
- else if (WsdlBindingSubject.class.isInstance(concreteSubject)) {
- WsdlBindingSubject wsdlSubject = (WsdlBindingSubject) concreteSubject;
- if ((wsdlSubject.getMessageType() == WsdlBindingSubject.WsdlMessageType.FAULT) &&
- exception.getOwner().getTargetNamespace().equals(wsdlSubject.getName().getNamespaceURI()) &&
- exceptionName.equals(wsdlSubject.getName().getLocalPart())) {
- writePolicyOrReferenceIt(subject, writer);
- }
- }
- }
- }
- }
- }
- LOGGER.exiting();
- }
-
- /**
- * This method should only be invoked by interface methods that deal with WSDL binding because they
- * may use the QName of the WSDL binding element as PolicySubject instead of a WSDL object.
- *
- * @param xmlWriter A TypedXmlWriter.
- * @param clazz The policy subject.
- * @param scopeType The WSDL scope.
- * @param bindingName The WSDL binding name.
- */
- private void selectAndProcessSubject(final TypedXmlWriter xmlWriter, final Class clazz, final ScopeType scopeType, final QName bindingName) {
- LOGGER.entering(xmlWriter, clazz, scopeType, bindingName);
- if (bindingName == null) {
- selectAndProcessSubject(xmlWriter, clazz, scopeType, (String) null);
- } else {
- if (subjects != null) {
- for (PolicySubject subject : subjects) {
- if (bindingName.equals(subject.getSubject())) {
- writePolicyOrReferenceIt(subject, xmlWriter);
- }
- }
- }
- selectAndProcessSubject(xmlWriter, clazz, scopeType, bindingName.getLocalPart());
- }
- LOGGER.exiting();
- }
-
- private void selectAndProcessBindingSubject(final TypedXmlWriter xmlWriter, final Class clazz, final ScopeType scopeType, final QName bindingName) {
- LOGGER.entering(xmlWriter, clazz, scopeType, bindingName);
- if ((subjects != null) && (bindingName != null)) {
- for (PolicySubject subject : subjects) {
- if (subject.getSubject() instanceof WsdlBindingSubject) {
- final WsdlBindingSubject wsdlSubject = (WsdlBindingSubject) subject.getSubject();
- if (bindingName.equals(wsdlSubject.getName())) {
- writePolicyOrReferenceIt(subject, xmlWriter);
- }
- }
- }
- }
- selectAndProcessSubject(xmlWriter, clazz, scopeType, bindingName);
- LOGGER.exiting();
- }
-
- private void selectAndProcessSubject(final TypedXmlWriter xmlWriter, final Class clazz, final ScopeType scopeType, final String wsdlName) {
- LOGGER.entering(xmlWriter, clazz, scopeType, wsdlName);
- if (subjects != null) {
- for (PolicySubject subject : subjects) { // iterate over all subjects in policy map
- if (isCorrectType(policyMap, subject, scopeType)) {
- final Object concreteSubject = subject.getSubject();
- if (concreteSubject != null && clazz.isInstance(concreteSubject)) { // is it our class?
- if (null == wsdlName) { // no name provided to check
- writePolicyOrReferenceIt(subject, xmlWriter);
- } else {
- try {
- final Method getNameMethod = clazz.getDeclaredMethod("getName");
- if (stringEqualsToStringOrQName(wsdlName, getNameMethod.invoke(concreteSubject))) {
- writePolicyOrReferenceIt(subject, xmlWriter);
- }
- } catch (NoSuchMethodException e) {
- throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(clazz.getName(), wsdlName), e));
- } catch (IllegalAccessException e) {
- throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(clazz.getName(), wsdlName), e));
- } catch (InvocationTargetException e) {
- throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(clazz.getName(), wsdlName), e));
- }
- }
- }
- }
- }
- }
- LOGGER.exiting();
- }
-
- private static boolean isCorrectType(final PolicyMap map, final PolicySubject subject, final ScopeType type) {
- switch (type) {
- case OPERATION:
- return !(map.isInputMessageSubject(subject) || map.isOutputMessageSubject(subject) || map.isFaultMessageSubject(subject));
- case INPUT_MESSAGE:
- return map.isInputMessageSubject(subject);
- case OUTPUT_MESSAGE:
- return map.isOutputMessageSubject(subject);
- case FAULT_MESSAGE:
- return map.isFaultMessageSubject(subject);
- default:
- return true;
- }
- }
-
- private boolean stringEqualsToStringOrQName(final String first, final Object second) {
- return (second instanceof QName) ? first.equals(((QName) second).getLocalPart()) : first.equals(second);
- }
-
- /**
- * Adds a PolicyReference element that points to the policy of the element,
- * if the policy does not have any id or name. Writes policy inside the element otherwise.
- *
- * @param subject
- * PolicySubject to be referenced or marshalled
- * @param writer
- * A TXW on to which we shall add the PolicyReference
- */
- private void writePolicyOrReferenceIt(final PolicySubject subject, final TypedXmlWriter writer) {
- final Policy policy;
- try {
- policy = subject.getEffectivePolicy(merger);
- } catch (PolicyException e) {
- throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(subject.toString()), e));
- }
- if (policy != null) {
- if (null == policy.getIdOrName()) {
- final PolicyModelGenerator generator = ModelGenerator.getGenerator();
- try {
- final PolicySourceModel policyInfoset = generator.translate(policy);
- marshaller.marshal(policyInfoset, writer);
- } catch (PolicyException pe) {
- throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE(), pe));
- }
- } else {
- final TypedXmlWriter policyReference = writer._element(policy.getNamespaceVersion().asQName(XmlToken.PolicyReference), TypedXmlWriter.class);
- policyReference._attribute(XmlToken.Uri.toString(), '#' + policy.getIdOrName());
- }
- }
- }
-
- private PolicyMapConfigurator[] loadConfigurators() {
- final Collection<PolicyMapConfigurator> configurators = new LinkedList<PolicyMapConfigurator>();
-
- // Add map configurators that are already built into JAX-WS
- configurators.add(new AddressingPolicyMapConfigurator());
- configurators.add(new MtomPolicyMapConfigurator());
-
- // Dynamically discover remaining map configurators
- PolicyUtil.addServiceProviders(configurators, PolicyMapConfigurator.class);
-
- return configurators.toArray(new PolicyMapConfigurator[configurators.size()]);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLParserExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLParserExtension.java
deleted file mode 100644
index 42166f41..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLParserExtension.java
+++ /dev/null
@@ -1,990 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.policy.jaxws;
-
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLObject;
-import com.sun.xml.internal.ws.api.model.wsdl.editable.*;
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtensionContext;
-import com.sun.xml.internal.ws.api.policy.PolicyResolver;
-import com.sun.xml.internal.ws.resources.PolicyMessages;
-import com.sun.xml.internal.ws.policy.jaxws.SafePolicyReader.PolicyRecord;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModelContext;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.XmlToken;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.List;
-import java.util.HashSet;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.WebServiceException;
-
-/**
- * This class parses the Policy Attachments in the WSDL and creates a PolicyMap thaty captures the policies configured on
- * different PolicySubjects in the wsdl.
- *
- * After, it is finished it sets the PolicyMap on the WSDLModel.
- *
- * @author Jakub Podlesak (jakub.podlesak at sun.com)
- * @author Fabian Ritzmann
- * @author Rama Pulavarthi
- */
-final public class PolicyWSDLParserExtension extends WSDLParserExtension {
-
- enum HandlerType {
- PolicyUri, AnonymousPolicyId
- }
-
- final static class PolicyRecordHandler {
- String handler;
- HandlerType type;
-
- PolicyRecordHandler(HandlerType type, String handler) {
- this.type = type;
- this.handler = handler;
- }
-
- HandlerType getType() {
- return type;
- }
-
- String getHandler() {
- return handler;
- }
- }
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyWSDLParserExtension.class);
-
- //anonymous policy id prefix
- private static final StringBuffer AnonymnousPolicyIdPrefix = new StringBuffer("#__anonymousPolicy__ID");
-
- // anonymous policies count
- private int anonymousPoliciesCount;
-
- private final SafePolicyReader policyReader = new SafePolicyReader();
-
- // policy queue -- needed for evaluating the right order policy of policy models expansion
- private PolicyRecord expandQueueHead = null;
-
- // storage for policy models with an id passed by
- private Map<String,PolicyRecord> policyRecordsPassedBy = null;
- // storage for anonymous policies defined within given WSDL
- private Map<String,PolicySourceModel> anonymousPolicyModels = null;
-
- // container for URIs of policies referenced
- private List<String> unresolvedUris = null;
-
- // structures for policies really needed to build a map
- private final LinkedList<String> urisNeeded = new LinkedList<String>();
- private final Map<String, PolicySourceModel> modelsNeeded = new HashMap<String, PolicySourceModel>();
-
- // lookup tables for Policy attachments found
- private Map<WSDLObject, Collection<PolicyRecordHandler>> handlers4ServiceMap = null;
- private Map<WSDLObject, Collection<PolicyRecordHandler>> handlers4PortMap = null;
- private Map<WSDLObject, Collection<PolicyRecordHandler>> handlers4PortTypeMap = null;
- private Map<WSDLObject, Collection<PolicyRecordHandler>> handlers4BindingMap = null;
- private Map<WSDLObject, Collection<PolicyRecordHandler>> handlers4BoundOperationMap = null;
- private Map<WSDLObject, Collection<PolicyRecordHandler>> handlers4OperationMap = null;
- private Map<WSDLObject, Collection<PolicyRecordHandler>> handlers4MessageMap = null;
- private Map<WSDLObject, Collection<PolicyRecordHandler>> handlers4InputMap = null;
- private Map<WSDLObject, Collection<PolicyRecordHandler>> handlers4OutputMap = null;
- private Map<WSDLObject, Collection<PolicyRecordHandler>> handlers4FaultMap = null;
- private Map<WSDLObject, Collection<PolicyRecordHandler>> handlers4BindingInputOpMap = null;
- private Map<WSDLObject, Collection<PolicyRecordHandler>> handlers4BindingOutputOpMap = null;
- private Map<WSDLObject, Collection<PolicyRecordHandler>> handlers4BindingFaultOpMap = null;
-
- private PolicyMapBuilder policyBuilder = new PolicyMapBuilder();
-
- private boolean isPolicyProcessed(final String policyUri) {
- return modelsNeeded.containsKey(policyUri);
- }
-
- private void addNewPolicyNeeded(final String policyUri, final PolicySourceModel policyModel) {
- if (!modelsNeeded.containsKey(policyUri)) {
- modelsNeeded.put(policyUri, policyModel);
- urisNeeded.addFirst(policyUri);
- }
- }
-
- private Map<String, PolicySourceModel> getPolicyModels() {
- return modelsNeeded;
- }
-
- private Map<String,PolicyRecord> getPolicyRecordsPassedBy() {
- if (null==policyRecordsPassedBy) {
- policyRecordsPassedBy = new HashMap<String,PolicyRecord>();
- }
- return policyRecordsPassedBy;
- }
-
- private Map<String,PolicySourceModel> getAnonymousPolicyModels() {
- if (null==anonymousPolicyModels) {
- anonymousPolicyModels = new HashMap<String,PolicySourceModel>();
- }
- return anonymousPolicyModels;
- }
-
- private Map<WSDLObject, Collection<PolicyRecordHandler>> getHandlers4ServiceMap() {
- if (null==handlers4ServiceMap) {
- handlers4ServiceMap = new HashMap<WSDLObject,Collection<PolicyRecordHandler>>();
- }
- return handlers4ServiceMap;
- }
-
- private Map<WSDLObject, Collection<PolicyRecordHandler>> getHandlers4PortMap() {
- if (null==handlers4PortMap) {
- handlers4PortMap = new HashMap<WSDLObject,Collection<PolicyRecordHandler>>();
- }
- return handlers4PortMap;
- }
-
- private Map<WSDLObject, Collection<PolicyRecordHandler>> getHandlers4PortTypeMap() {
- if (null==handlers4PortTypeMap) {
- handlers4PortTypeMap = new HashMap<WSDLObject,Collection<PolicyRecordHandler>>();
- }
- return handlers4PortTypeMap;
- }
-
- private Map<WSDLObject, Collection<PolicyRecordHandler>> getHandlers4BindingMap() {
- if (null==handlers4BindingMap) {
- handlers4BindingMap = new HashMap<WSDLObject,Collection<PolicyRecordHandler>>();
- }
- return handlers4BindingMap;
- }
-
- private Map<WSDLObject, Collection<PolicyRecordHandler>> getHandlers4OperationMap() {
- if (null==handlers4OperationMap) {
- handlers4OperationMap = new HashMap<WSDLObject,Collection<PolicyRecordHandler>>();
- }
- return handlers4OperationMap;
- }
-
- private Map<WSDLObject, Collection<PolicyRecordHandler>> getHandlers4BoundOperationMap() {
- if (null==handlers4BoundOperationMap) {
- handlers4BoundOperationMap = new HashMap<WSDLObject,Collection<PolicyRecordHandler>>();
- }
- return handlers4BoundOperationMap;
- }
-
- private Map<WSDLObject, Collection<PolicyRecordHandler>> getHandlers4MessageMap() {
- if (null==handlers4MessageMap) {
- handlers4MessageMap = new HashMap<WSDLObject,Collection<PolicyRecordHandler>>();
- }
- return handlers4MessageMap;
- }
-
- private Map<WSDLObject, Collection<PolicyRecordHandler>> getHandlers4InputMap() {
- if (null==handlers4InputMap) {
- handlers4InputMap = new HashMap<WSDLObject,Collection<PolicyRecordHandler>>();
- }
- return handlers4InputMap;
- }
-
- private Map<WSDLObject, Collection<PolicyRecordHandler>> getHandlers4OutputMap() {
- if (null==handlers4OutputMap) {
- handlers4OutputMap = new HashMap<WSDLObject,Collection<PolicyRecordHandler>>();
- }
- return handlers4OutputMap;
- }
-
- private Map<WSDLObject, Collection<PolicyRecordHandler>> getHandlers4FaultMap() {
- if (null==handlers4FaultMap) {
- handlers4FaultMap = new HashMap<WSDLObject,Collection<PolicyRecordHandler>>();
- }
- return handlers4FaultMap;
- }
-
- private Map<WSDLObject, Collection<PolicyRecordHandler>> getHandlers4BindingInputOpMap() {
- if (null==handlers4BindingInputOpMap) {
- handlers4BindingInputOpMap = new HashMap<WSDLObject,Collection<PolicyRecordHandler>>();
- }
- return handlers4BindingInputOpMap;
- }
-
- private Map<WSDLObject, Collection<PolicyRecordHandler>> getHandlers4BindingOutputOpMap() {
- if (null==handlers4BindingOutputOpMap) {
- handlers4BindingOutputOpMap = new HashMap<WSDLObject,Collection<PolicyRecordHandler>>();
- }
- return handlers4BindingOutputOpMap;
- }
-
- private Map<WSDLObject, Collection<PolicyRecordHandler>> getHandlers4BindingFaultOpMap() {
- if (null==handlers4BindingFaultOpMap) {
- handlers4BindingFaultOpMap = new HashMap<WSDLObject,Collection<PolicyRecordHandler>>();
- }
- return handlers4BindingFaultOpMap;
- }
-
- private List<String> getUnresolvedUris(final boolean emptyListNeeded) {
- if ((null == unresolvedUris) || emptyListNeeded) {
- unresolvedUris = new LinkedList<String>();
- }
- return unresolvedUris;
- }
-
-
-
- private void policyRecToExpandQueue(final PolicyRecord policyRec) {
- if (null==expandQueueHead) {
- expandQueueHead = policyRec;
- } else {
- expandQueueHead = expandQueueHead.insert(policyRec);
- }
- }
-
- /**
- * Creates a new instance of PolicyWSDLParserExtension
- */
- public PolicyWSDLParserExtension() {
-
- }
-
-
- private PolicyRecordHandler readSinglePolicy(final PolicyRecord policyRec, final boolean inner) {
- PolicyRecordHandler handler = null;
- String policyId = policyRec.policyModel.getPolicyId();
- if (policyId == null) {
- policyId = policyRec.policyModel.getPolicyName();
- }
- if (policyId != null) { // policy id defined, keep the policy
- handler = new PolicyRecordHandler(HandlerType.PolicyUri, policyRec.getUri());
- getPolicyRecordsPassedBy().put(policyRec.getUri(), policyRec);
- policyRecToExpandQueue(policyRec);
- } else if (inner) { // no id given to the policy --> keep as an annonymous policy model
- final String anonymousId = AnonymnousPolicyIdPrefix.append(anonymousPoliciesCount++).toString();
- handler = new PolicyRecordHandler(HandlerType.AnonymousPolicyId,anonymousId);
- getAnonymousPolicyModels().put(anonymousId, policyRec.policyModel);
- if (null != policyRec.unresolvedURIs) {
- getUnresolvedUris(false).addAll(policyRec.unresolvedURIs);
- }
- }
- return handler;
- }
-
-
- private void addHandlerToMap(
- final Map<WSDLObject, Collection<PolicyRecordHandler>> map, final WSDLObject key, final PolicyRecordHandler handler) {
- if (map.containsKey(key)) {
- map.get(key).add(handler);
- } else {
- final Collection<PolicyRecordHandler> newSet = new LinkedList<PolicyRecordHandler>();
- newSet.add(handler);
- map.put(key,newSet);
- }
- }
-
- private String getBaseUrl(final String policyUri) {
- if (null == policyUri) {
- return null;
- }
- // TODO: encoded urls (escaped characters) might be a problem ?
- final int fragmentIdx = policyUri.indexOf('#');
- return (fragmentIdx == -1) ? policyUri : policyUri.substring(0, fragmentIdx);
- }
-
- // adding current url even to locally referenced policies
- // in order to distinguish imported policies
- private void processReferenceUri(
- final String policyUri,
- final WSDLObject element,
- final XMLStreamReader reader,
- final Map<WSDLObject, Collection<PolicyRecordHandler>> map) {
-
- if (null == policyUri || policyUri.length() == 0) {
- return;
- }
- if ('#' != policyUri.charAt(0)) { // external uri (already)
- getUnresolvedUris(false).add(policyUri);
- }
-
- addHandlerToMap(map, element,
- new PolicyRecordHandler(
- HandlerType.PolicyUri,
- SafePolicyReader.relativeToAbsoluteUrl(policyUri, reader.getLocation().getSystemId())));
- }
-
- private boolean processSubelement(
- final WSDLObject element, final XMLStreamReader reader, final Map<WSDLObject, Collection<PolicyRecordHandler>> map) {
- if (NamespaceVersion.resolveAsToken(reader.getName()) == XmlToken.PolicyReference) { // "PolicyReference" element interests us
- processReferenceUri(policyReader.readPolicyReferenceElement(reader), element, reader, map);
- return true;
- } else if (NamespaceVersion.resolveAsToken(reader.getName()) == XmlToken.Policy) { // policy could be defined here
- final PolicyRecordHandler handler =
- readSinglePolicy(
- policyReader.readPolicyElement(
- reader,
- (null == reader.getLocation().getSystemId()) ? // baseUrl
- "" : reader.getLocation().getSystemId()),
- true);
- if (null != handler) { // only policies with an Id can work for us
- addHandlerToMap(map, element, handler);
- } // endif null != handler
- return true; // element consumed
- }//end if Policy element found
- return false;
- }
-
- private void processAttributes(final WSDLObject element, final XMLStreamReader reader, final Map<WSDLObject, Collection<PolicyRecordHandler>> map) {
- final String[] uriArray = getPolicyURIsFromAttr(reader);
- if (null != uriArray) {
- for (String policyUri : uriArray) {
- processReferenceUri(policyUri, element, reader, map);
- }
- }
- }
-
- @Override
- public boolean portElements(final EditableWSDLPort port, final XMLStreamReader reader) {
- LOGGER.entering();
- final boolean result = processSubelement(port, reader, getHandlers4PortMap());
- LOGGER.exiting();
- return result;
- }
-
- @Override
- public void portAttributes(final EditableWSDLPort port, final XMLStreamReader reader) {
- LOGGER.entering();
- processAttributes(port, reader, getHandlers4PortMap());
- LOGGER.exiting();
- }
-
- @Override
- public boolean serviceElements(final EditableWSDLService service, final XMLStreamReader reader) {
- LOGGER.entering();
- final boolean result = processSubelement(service, reader, getHandlers4ServiceMap());
- LOGGER.exiting();
- return result;
- }
-
- @Override
- public void serviceAttributes(final EditableWSDLService service, final XMLStreamReader reader) {
- LOGGER.entering();
- processAttributes(service, reader, getHandlers4ServiceMap());
- LOGGER.exiting();
- }
-
-
- @Override
- public boolean definitionsElements(final XMLStreamReader reader){
- LOGGER.entering();
- if (NamespaceVersion.resolveAsToken(reader.getName()) == XmlToken.Policy) { // Only "Policy" element interests me
- readSinglePolicy(
- policyReader.readPolicyElement(
- reader,
- (null == reader.getLocation().getSystemId()) ? // baseUrl
- "" : reader.getLocation().getSystemId()),
- false);
- LOGGER.exiting();
- return true;
- }
- LOGGER.exiting();
- return false;
- }
-
- @Override
- public boolean bindingElements(final EditableWSDLBoundPortType binding, final XMLStreamReader reader) {
- LOGGER.entering();
- final boolean result = processSubelement(binding, reader, getHandlers4BindingMap());
- LOGGER.exiting();
- return result;
- }
-
- @Override
- public void bindingAttributes(final EditableWSDLBoundPortType binding, final XMLStreamReader reader) {
- LOGGER.entering();
- processAttributes(binding, reader, getHandlers4BindingMap());
- LOGGER.exiting();
- }
-
- @Override
- public boolean portTypeElements(final EditableWSDLPortType portType, final XMLStreamReader reader) {
- LOGGER.entering();
- final boolean result = processSubelement(portType, reader, getHandlers4PortTypeMap());
- LOGGER.exiting();
- return result;
- }
-
- @Override
- public void portTypeAttributes(final EditableWSDLPortType portType, final XMLStreamReader reader) {
- LOGGER.entering();
- processAttributes(portType, reader, getHandlers4PortTypeMap());
- LOGGER.exiting();
- }
-
- @Override
- public boolean portTypeOperationElements(final EditableWSDLOperation operation, final XMLStreamReader reader) {
- LOGGER.entering();
- final boolean result = processSubelement(operation, reader, getHandlers4OperationMap());
- LOGGER.exiting();
- return result;
- }
-
- @Override
- public void portTypeOperationAttributes(final EditableWSDLOperation operation, final XMLStreamReader reader) {
- LOGGER.entering();
- processAttributes(operation, reader, getHandlers4OperationMap());
- LOGGER.exiting();
- }
-
- @Override
- public boolean bindingOperationElements(final EditableWSDLBoundOperation boundOperation, final XMLStreamReader reader) {
- LOGGER.entering();
- final boolean result = processSubelement(boundOperation, reader, getHandlers4BoundOperationMap());
- LOGGER.exiting();
- return result;
- }
-
- @Override
- public void bindingOperationAttributes(final EditableWSDLBoundOperation boundOperation, final XMLStreamReader reader) {
- LOGGER.entering();
- processAttributes(boundOperation, reader, getHandlers4BoundOperationMap());
- LOGGER.exiting();
- }
-
- @Override
- public boolean messageElements(final EditableWSDLMessage msg, final XMLStreamReader reader) {
- LOGGER.entering();
- final boolean result = processSubelement(msg, reader, getHandlers4MessageMap());
- LOGGER.exiting();
- return result;
- }
-
- @Override
- public void messageAttributes(final EditableWSDLMessage msg, final XMLStreamReader reader) {
- LOGGER.entering();
- processAttributes(msg, reader, getHandlers4MessageMap());
- LOGGER.exiting();
- }
-
- @Override
- public boolean portTypeOperationInputElements(final EditableWSDLInput input, final XMLStreamReader reader) {
- LOGGER.entering();
- final boolean result = processSubelement(input, reader, getHandlers4InputMap());
- LOGGER.exiting();
- return result;
- }
-
- @Override
- public void portTypeOperationInputAttributes(final EditableWSDLInput input, final XMLStreamReader reader) {
- LOGGER.entering();
- processAttributes(input, reader, getHandlers4InputMap());
- LOGGER.exiting();
- }
-
-
- @Override
- public boolean portTypeOperationOutputElements(final EditableWSDLOutput output, final XMLStreamReader reader) {
- LOGGER.entering();
- final boolean result = processSubelement(output, reader, getHandlers4OutputMap());
- LOGGER.exiting();
- return result;
- }
-
- @Override
- public void portTypeOperationOutputAttributes(final EditableWSDLOutput output, final XMLStreamReader reader) {
- LOGGER.entering();
- processAttributes(output, reader, getHandlers4OutputMap());
- LOGGER.exiting();
- }
-
-
- @Override
- public boolean portTypeOperationFaultElements(final EditableWSDLFault fault, final XMLStreamReader reader) {
- LOGGER.entering();
- final boolean result = processSubelement(fault, reader, getHandlers4FaultMap());
- LOGGER.exiting();
- return result;
- }
-
- @Override
- public void portTypeOperationFaultAttributes(final EditableWSDLFault fault, final XMLStreamReader reader) {
- LOGGER.entering();
- processAttributes(fault, reader, getHandlers4FaultMap());
- LOGGER.exiting();
- }
-
- @Override
- public boolean bindingOperationInputElements(final EditableWSDLBoundOperation operation, final XMLStreamReader reader) {
- LOGGER.entering();
- final boolean result = processSubelement(operation, reader, getHandlers4BindingInputOpMap());
- LOGGER.exiting();
- return result;
- }
-
- @Override
- public void bindingOperationInputAttributes(final EditableWSDLBoundOperation operation, final XMLStreamReader reader) {
- LOGGER.entering();
- processAttributes(operation, reader, getHandlers4BindingInputOpMap());
- LOGGER.exiting();
- }
-
-
- @Override
- public boolean bindingOperationOutputElements(final EditableWSDLBoundOperation operation, final XMLStreamReader reader) {
- LOGGER.entering();
- final boolean result = processSubelement(operation, reader, getHandlers4BindingOutputOpMap());
- LOGGER.exiting();
- return result;
- }
-
- @Override
- public void bindingOperationOutputAttributes(final EditableWSDLBoundOperation operation, final XMLStreamReader reader) {
- LOGGER.entering();
- processAttributes(operation, reader, getHandlers4BindingOutputOpMap());
- LOGGER.exiting();
- }
-
- @Override
- public boolean bindingOperationFaultElements(final EditableWSDLBoundFault fault, final XMLStreamReader reader) {
- LOGGER.entering();
- final boolean result = processSubelement(fault, reader, getHandlers4BindingFaultOpMap());
- LOGGER.exiting(result);
- return result;
- }
-
- @Override
- public void bindingOperationFaultAttributes(final EditableWSDLBoundFault fault, final XMLStreamReader reader) {
- LOGGER.entering();
- processAttributes(fault, reader, getHandlers4BindingFaultOpMap());
- LOGGER.exiting();
- }
-
-
- private PolicyMapBuilder getPolicyMapBuilder() {
- if (null == policyBuilder) {
- policyBuilder = new PolicyMapBuilder();
- }
- return policyBuilder;
- }
-
- private Collection<String> getPolicyURIs(
- final Collection<PolicyRecordHandler> handlers, final PolicySourceModelContext modelContext) throws PolicyException{
- final Collection<String> result = new ArrayList<String>(handlers.size());
- String policyUri;
- for (PolicyRecordHandler handler : handlers) {
- policyUri = handler.handler;
- if (HandlerType.AnonymousPolicyId == handler.type) {
- final PolicySourceModel policyModel = getAnonymousPolicyModels().get(policyUri);
- policyModel.expand(modelContext);
- while (getPolicyModels().containsKey(policyUri)) {
- policyUri = AnonymnousPolicyIdPrefix.append(anonymousPoliciesCount++).toString();
- }
- getPolicyModels().put(policyUri,policyModel);
- }
- result.add(policyUri);
- }
- return result;
- }
-
- private boolean readExternalFile(final String fileUrl) {
- InputStream ios = null;
- XMLStreamReader reader = null;
- try {
- final URL xmlURL = new URL(fileUrl);
- ios = xmlURL.openStream();
- reader = XmlUtil.newXMLInputFactory(true).createXMLStreamReader(ios);
- while (reader.hasNext()) {
- if (reader.isStartElement() && NamespaceVersion.resolveAsToken(reader.getName()) == XmlToken.Policy) {
- readSinglePolicy(policyReader.readPolicyElement(reader, fileUrl), false);
- }
- reader.next();
- }
- return true;
- } catch (IOException ioe) {
- return false;
- } catch (XMLStreamException xmlse) {
- return false;
- } finally {
- PolicyUtils.IO.closeResource(reader);
- PolicyUtils.IO.closeResource(ios);
- }
- }
-
- @Override
- public void finished(final WSDLParserExtensionContext context) {
- LOGGER.entering(context);
- // need to make sure proper beginning order of internal policies within unresolvedUris list
- if (null != expandQueueHead) { // any policies found
- final List<String> externalUris = getUnresolvedUris(false); // protect list of possible external policies
- getUnresolvedUris(true); // cleaning up the list only
- final LinkedList<String> baseUnresolvedUris = new LinkedList<String>();
- for (PolicyRecord currentRec = expandQueueHead ; null != currentRec ; currentRec = currentRec.next) {
- baseUnresolvedUris.addFirst(currentRec.getUri());
- }
- getUnresolvedUris(false).addAll(baseUnresolvedUris);
- expandQueueHead = null; // cut the queue off
- getUnresolvedUris(false).addAll(externalUris);
- }
-
- while (!getUnresolvedUris(false).isEmpty()) {
- final List<String> urisToBeSolvedList = getUnresolvedUris(false);
- getUnresolvedUris(true); // just cleaning up the list
- for (String currentUri : urisToBeSolvedList) {
- if (!isPolicyProcessed(currentUri)) {
- final PolicyRecord prefetchedRecord = getPolicyRecordsPassedBy().get(currentUri);
- if (null == prefetchedRecord) {
- if (policyReader.getUrlsRead().contains(getBaseUrl(currentUri))) { // --> unresolvable policy
- LOGGER.logSevereException(new PolicyException(PolicyMessages.WSP_1014_CAN_NOT_FIND_POLICY(currentUri)));
- } else {
- if (readExternalFile(getBaseUrl(currentUri))) {
- getUnresolvedUris(false).add(currentUri);
- }
- }
- } else { // policy has not been yet passed by
- if (null != prefetchedRecord.unresolvedURIs) {
- getUnresolvedUris(false).addAll(prefetchedRecord.unresolvedURIs);
- } // end-if null != prefetchedRecord.unresolvedURIs
- addNewPolicyNeeded(currentUri, prefetchedRecord.policyModel);
- }
- } // end-if policy already processed
- } // end-foreach unresolved uris
- }
- final PolicySourceModelContext modelContext = PolicySourceModelContext.createContext();
- for (String policyUri : urisNeeded) {
- final PolicySourceModel sourceModel = modelsNeeded.get(policyUri);
- try {
- sourceModel.expand(modelContext);
- modelContext.addModel(new URI(policyUri), sourceModel);
- } catch (URISyntaxException e) {
- LOGGER.logSevereException(e);
- } catch (PolicyException e) {
- LOGGER.logSevereException(e);
- }
- }
-
- // Start-preparation of policy map builder
- // iterating over all services and binding all the policies read before
- try {
- // messageSet holds the handlers for all wsdl:message elements. There
- // may otherwise be multiple entries for policies that are contained
- // by fault messages.
- HashSet<BuilderHandlerMessageScope> messageSet = new HashSet<BuilderHandlerMessageScope>();
- for (EditableWSDLService service : context.getWSDLModel().getServices().values()) {
- if (getHandlers4ServiceMap().containsKey(service)) {
- getPolicyMapBuilder().registerHandler(new BuilderHandlerServiceScope(
- getPolicyURIs(getHandlers4ServiceMap().get(service),modelContext)
- ,getPolicyModels()
- ,service
- ,service.getName()));
- }
- // end service scope
-
- for (EditableWSDLPort port : service.getPorts()) {
- if (getHandlers4PortMap().containsKey(port)) {
- getPolicyMapBuilder().registerHandler(
- new BuilderHandlerEndpointScope(
- getPolicyURIs(getHandlers4PortMap().get(port),modelContext)
- ,getPolicyModels()
- ,port
- ,port.getOwner().getName()
- ,port.getName()));
- }
- if ( // port.getBinding may not be null, but in case ...
- null != port.getBinding()) {
- if ( // handler for binding
- getHandlers4BindingMap().containsKey(port.getBinding())) {
- getPolicyMapBuilder()
- .registerHandler(
- new BuilderHandlerEndpointScope(
- getPolicyURIs(getHandlers4BindingMap().get(port.getBinding()),modelContext)
- ,getPolicyModels()
- ,port.getBinding()
- ,service.getName()
- ,port.getName()));
- } // endif handler for binding
- if ( // handler for port type
- getHandlers4PortTypeMap().containsKey(port.getBinding().getPortType())) {
- getPolicyMapBuilder()
- .registerHandler(
- new BuilderHandlerEndpointScope(
- getPolicyURIs(getHandlers4PortTypeMap().get(port.getBinding().getPortType()),modelContext)
- ,getPolicyModels()
- ,port.getBinding().getPortType()
- ,service.getName()
- ,port.getName()));
- } // endif handler for port type
- // end endpoint scope
-
- for (EditableWSDLBoundOperation boundOperation : port.getBinding().getBindingOperations()) {
-
- final EditableWSDLOperation operation = boundOperation.getOperation();
- final QName operationName = new QName(boundOperation.getBoundPortType().getName().getNamespaceURI(), boundOperation.getName().getLocalPart());
- // We store the message and portType/operation under the same namespace as the binding/operation so that we can match them up later
- if ( // handler for operation scope -- by boundOperation
- getHandlers4BoundOperationMap().containsKey(boundOperation)) {
- getPolicyMapBuilder()
- .registerHandler(
- new BuilderHandlerOperationScope(
- getPolicyURIs(getHandlers4BoundOperationMap().get(boundOperation),modelContext)
- ,getPolicyModels()
- ,boundOperation
- ,service.getName()
- ,port.getName()
- ,operationName));
- } // endif handler for binding:operation scope
- if ( // handler for operation scope -- by operation map
- getHandlers4OperationMap().containsKey(operation)) {
- getPolicyMapBuilder()
- .registerHandler(
- new BuilderHandlerOperationScope(
- getPolicyURIs(getHandlers4OperationMap().get(operation),modelContext)
- ,getPolicyModels()
- ,operation
- ,service.getName()
- ,port.getName()
- ,operationName));
- } // endif for portType:operation scope
- // end operation scope
-
- final EditableWSDLInput input = operation.getInput();
- if (null!=input) {
- EditableWSDLMessage inputMsg = input.getMessage();
- if (inputMsg != null && getHandlers4MessageMap().containsKey(inputMsg)) {
- messageSet.add(new BuilderHandlerMessageScope(
- getPolicyURIs(
- getHandlers4MessageMap().get(inputMsg), modelContext)
- ,getPolicyModels()
- ,inputMsg
- ,BuilderHandlerMessageScope.Scope.InputMessageScope
- ,service.getName()
- ,port.getName()
- ,operationName
- ,null)
- );
- }
- }
- if ( // binding op input msg
- getHandlers4BindingInputOpMap().containsKey(boundOperation)) {
- getPolicyMapBuilder()
- .registerHandler(
- new BuilderHandlerMessageScope(
- getPolicyURIs(getHandlers4BindingInputOpMap().get(boundOperation),modelContext)
- ,getPolicyModels()
- ,boundOperation
- ,BuilderHandlerMessageScope.Scope.InputMessageScope
- ,service.getName()
- ,port.getName()
- ,operationName
- ,null));
- } // endif binding op input msg
- if ( null != input // portType op input msg
- && getHandlers4InputMap().containsKey(input)) {
- getPolicyMapBuilder()
- .registerHandler(
- new BuilderHandlerMessageScope(
- getPolicyURIs(getHandlers4InputMap().get(input),modelContext)
- ,getPolicyModels()
- ,input
- ,BuilderHandlerMessageScope.Scope.InputMessageScope
- ,service.getName()
- ,port.getName()
- ,operationName
- ,null));
- } // endif portType op input msg
- // end input message scope
-
- final EditableWSDLOutput output = operation.getOutput();
- if (null!=output) {
- EditableWSDLMessage outputMsg = output.getMessage();
- if (outputMsg != null && getHandlers4MessageMap().containsKey(outputMsg)) {
- messageSet.add(new BuilderHandlerMessageScope(
- getPolicyURIs(
- getHandlers4MessageMap().get(outputMsg),modelContext)
- ,getPolicyModels()
- ,outputMsg
- ,BuilderHandlerMessageScope.Scope.OutputMessageScope
- ,service.getName()
- ,port.getName()
- ,operationName
- ,null)
- );
- }
- }
- if ( // binding op output msg
- getHandlers4BindingOutputOpMap().containsKey(boundOperation)) {
- getPolicyMapBuilder()
- .registerHandler(
- new BuilderHandlerMessageScope(
- getPolicyURIs(getHandlers4BindingOutputOpMap().get(boundOperation),modelContext)
- ,getPolicyModels()
- ,boundOperation
- ,BuilderHandlerMessageScope.Scope.OutputMessageScope
- ,service.getName()
- ,port.getName()
- ,operationName
- ,null));
- } // endif binding op output msg
- if ( null != output // portType op output msg
- && getHandlers4OutputMap().containsKey(output)) {
- getPolicyMapBuilder()
- .registerHandler(
- new BuilderHandlerMessageScope(
- getPolicyURIs(getHandlers4OutputMap().get(output),modelContext)
- ,getPolicyModels()
- ,output
- ,BuilderHandlerMessageScope.Scope.OutputMessageScope
- ,service.getName()
- ,port.getName()
- ,operationName
- ,null));
- } // endif portType op output msg
- // end output message scope
-
- for (EditableWSDLBoundFault boundFault : boundOperation.getFaults()) {
- final EditableWSDLFault fault = boundFault.getFault();
-
- // this shouldn't happen ususally,
- // but since this scenario tested in lagacy tests, dont' fail here
- if (fault == null) {
- LOGGER.warning(PolicyMessages.WSP_1021_FAULT_NOT_BOUND(boundFault.getName()));
- continue;
- }
-
- final EditableWSDLMessage faultMessage = fault.getMessage();
- final QName faultName = new QName(boundOperation.getBoundPortType().getName().getNamespaceURI(), boundFault.getName());
- // We store the message and portType/fault under the same namespace as the binding/fault so that we can match them up later
- if (faultMessage != null && getHandlers4MessageMap().containsKey(faultMessage)) {
- messageSet.add(
- new BuilderHandlerMessageScope(
- getPolicyURIs(getHandlers4MessageMap().get(faultMessage), modelContext)
- ,getPolicyModels()
- ,new WSDLBoundFaultContainer(boundFault, boundOperation)
- ,BuilderHandlerMessageScope.Scope.FaultMessageScope
- ,service.getName()
- ,port.getName()
- ,operationName
- ,faultName)
- );
- }
- if (getHandlers4FaultMap().containsKey(fault)) {
- messageSet.add(
- new BuilderHandlerMessageScope(
- getPolicyURIs(getHandlers4FaultMap().get(fault), modelContext)
- ,getPolicyModels()
- ,new WSDLBoundFaultContainer(boundFault, boundOperation)
- ,BuilderHandlerMessageScope.Scope.FaultMessageScope
- ,service.getName()
- ,port.getName()
- ,operationName
- ,faultName)
- );
- }
- if (getHandlers4BindingFaultOpMap().containsKey(boundFault)) {
- messageSet.add(
- new BuilderHandlerMessageScope(
- getPolicyURIs(getHandlers4BindingFaultOpMap().get(boundFault), modelContext)
- ,getPolicyModels()
- ,new WSDLBoundFaultContainer(boundFault, boundOperation)
- ,BuilderHandlerMessageScope.Scope.FaultMessageScope
- ,service.getName()
- ,port.getName()
- ,operationName
- ,faultName)
- );
- }
- } // end foreach binding operation fault msg
- // end fault message scope
-
- } // end foreach boundOperation in port
- } // endif port.getBinding() != null
- } // end foreach port in service
- } // end foreach service in wsdl
- // Add handlers for wsdl:message elements
- for (BuilderHandlerMessageScope scopeHandler : messageSet) {
- getPolicyMapBuilder().registerHandler(scopeHandler);
- }
- } catch(PolicyException e) {
- LOGGER.logSevereException(e);
- }
- // End-preparation of policy map builder
-
- LOGGER.exiting();
- }
-
-
- // time to read possible config file and do alternative selection (on client side)
- @Override
- public void postFinished(final WSDLParserExtensionContext context) {
- // finally register the PolicyMap on the WSDLModel
- EditableWSDLModel wsdlModel = context.getWSDLModel();
- PolicyMap effectiveMap;
- try {
- if(context.isClientSide())
- effectiveMap = context.getPolicyResolver().resolve(new PolicyResolver.ClientContext(policyBuilder.getPolicyMap(),context.getContainer()));
- else
- effectiveMap = context.getPolicyResolver().resolve(new PolicyResolver.ServerContext(policyBuilder.getPolicyMap(), context.getContainer(),null));
- wsdlModel.setPolicyMap(effectiveMap);
- } catch (PolicyException e) {
- LOGGER.logSevereException(e);
- throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL(), e));
- }
- try {
- PolicyUtil.configureModel(wsdlModel,effectiveMap);
- } catch (PolicyException e) {
- LOGGER.logSevereException(e);
- throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1012_FAILED_CONFIGURE_WSDL_MODEL(), e));
- }
- LOGGER.exiting();
- }
-
-
- /**
- * Reads policy reference URIs from PolicyURIs attribute and returns them
- * as a String array returns null if there is no such attribute. This method
- * will attempt to check for the attribute in every supported policy namespace.
- * Resulting array of URIs is concatenation of URIs defined in all found
- * PolicyURIs attribute version.
- */
- private String[] getPolicyURIsFromAttr(final XMLStreamReader reader) {
- final StringBuilder policyUriBuffer = new StringBuilder();
- for (NamespaceVersion version : NamespaceVersion.values()) {
- final String value = reader.getAttributeValue(version.toString(), XmlToken.PolicyUris.toString());
- if (value != null) {
- policyUriBuffer.append(value).append(" ");
- }
- }
- return (policyUriBuffer.length() > 0) ? policyUriBuffer.toString().split("[\\n ]+") : null;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/SafePolicyReader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/SafePolicyReader.java
deleted file mode 100644
index 8f36da1b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/SafePolicyReader.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.jaxws;
-
-import com.sun.xml.internal.ws.api.policy.ModelUnmarshaller;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.XmlToken;
-import com.sun.xml.internal.ws.resources.PolicyMessages;
-
-import java.io.StringReader;
-import java.util.HashSet;
-import java.util.Set;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.WebServiceException;
-
-/**
-* Provides methods to unmarshal policies from a XMLStreamReader safely
-*
-* @author Fabian Ritzmann
-*/
-public class SafePolicyReader {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(SafePolicyReader.class);
-
- // urls of xml docs policies were read from
- private final Set<String> urlsRead = new HashSet<String>();
-
- private final Set<String> qualifiedPolicyUris = new HashSet<String>();
-
-
- public final class PolicyRecord {
- PolicyRecord next;
- PolicySourceModel policyModel;
- Set<String> unresolvedURIs;
- private String uri;
-
- PolicyRecord() {
- // nothing to initialize
- }
-
- PolicyRecord insert(final PolicyRecord insertedRec) {
- if (null==insertedRec.unresolvedURIs || insertedRec.unresolvedURIs.isEmpty()) {
- insertedRec.next = this;
- return insertedRec;
- }
- final PolicyRecord head = this;
- PolicyRecord oneBeforeCurrent = null;
- PolicyRecord current;
- for (current = head ; null != current.next ; ) {
- if ((null != current.unresolvedURIs) && current.unresolvedURIs.contains(insertedRec.uri)) {
- if (null == oneBeforeCurrent) {
- insertedRec.next = current;
- return insertedRec;
- } else { // oneBeforeCurrent != null
- oneBeforeCurrent.next = insertedRec;
- insertedRec.next = current;
- return head;
- } // end-if-else oneBeforeCurrent == null
- }// end-if current record depends on inserted one
- if (insertedRec.unresolvedURIs.remove(current.uri) && (insertedRec.unresolvedURIs.isEmpty())) {
- insertedRec.next = current.next;
- current.next = insertedRec;
- return head;
- } // end-if one of unresolved URIs resolved by current record and thus unresolvedURIs empty
- oneBeforeCurrent = current;
- current = current.next;
- } // end for (current = head; null!=current.next; )
- insertedRec.next = null;
- current.next = insertedRec;
- return head;
- }
-
- /**
- * Set the URI that identifies the policy.
- *
- * @param uri The fully qualified URI of the policy. May be a relative URI
- * if JAX-WS did not pass on any system id.
- * @param id The short ID of the policy. Used for error reporting.
- * @throws PolicyException If there already is a policy recorded with the
- * same id.
- */
- public void setUri(final String uri, final String id) throws PolicyException {
- if (qualifiedPolicyUris.contains(uri)) {
- throw LOGGER.logSevereException(new PolicyException(PolicyMessages.WSP_1020_DUPLICATE_ID(id)));
- }
- this.uri = uri;
- qualifiedPolicyUris.add(uri);
- }
-
- public String getUri() {
- return this.uri;
- }
-
- @Override
- public String toString() {
- String result = uri;
- if (null!=next) {
- result += "->" + next.toString();
- }
- return result;
- }
- }
-
-
- /**
- * Reads a policy expression from the XML stream.
- *
- * The XMLStreamReader should be in START_ELEMENT state and point to the policy element.
- * The content of the stream is copied and then the copy is unmarshalled. The result
- * is returned as a PolicyRecord.
- *
- * @param reader The XMLStreamReader should be in START_ELEMENT state and point to the policy element.
- * @param baseUrl The system id of the document read by the reader.
- * @return The policy that was read from the XML stream.
- */
- public PolicyRecord readPolicyElement(final XMLStreamReader reader, final String baseUrl) {
- if ((null == reader) || (!reader.isStartElement())) {
- return null;
- }
- final StringBuffer elementCode = new StringBuffer();
- final PolicyRecord policyRec = new PolicyRecord();
- final QName elementName = reader.getName();
- boolean insidePolicyReferenceAttr;
- int depth = 0;
- try{
- do {
- switch (reader.getEventType()) {
- case XMLStreamConstants.START_ELEMENT: // process start of next element
- QName curName = reader.getName();
- insidePolicyReferenceAttr = NamespaceVersion.resolveAsToken(curName) == XmlToken.PolicyReference;
- if (elementName.equals(curName)) { // it is our element !
- depth++; // we are then deeper
- }
- final StringBuffer xmlnsCode = new StringBuffer(); // take care about namespaces as well
- final Set<String> tmpNsSet = new HashSet<String>();
- if ((null == curName.getPrefix()) || ("".equals(curName.getPrefix()))) { // no prefix
- elementCode
- .append('<') // start tag
- .append(curName.getLocalPart());
- xmlnsCode
- .append(" xmlns=\"")
- .append(curName.getNamespaceURI())
- .append('"');
-
- } else { // prefix presented
- elementCode
- .append('<') // start tag
- .append(curName.getPrefix())
- .append(':')
- .append(curName.getLocalPart());
- xmlnsCode
- .append(" xmlns:")
- .append(curName.getPrefix())
- .append("=\"")
- .append(curName.getNamespaceURI())
- .append('"');
- tmpNsSet.add(curName.getPrefix());
- }
- final int attrCount = reader.getAttributeCount(); // process element attributes
- final StringBuffer attrCode = new StringBuffer();
- for (int i=0; i < attrCount; i++) {
- boolean uriAttrFlg = false;
- if (insidePolicyReferenceAttr && "URI".equals(
- reader.getAttributeName(i).getLocalPart())) { // PolicyReference found
- uriAttrFlg = true;
- if (null == policyRec.unresolvedURIs) { // first such URI found
- policyRec.unresolvedURIs = new HashSet<String>(); // initialize URIs set
- }
- policyRec.unresolvedURIs.add( // add the URI
- relativeToAbsoluteUrl(reader.getAttributeValue(i), baseUrl));
- } // end-if PolicyReference attribute found
- if ("xmlns".equals(reader.getAttributePrefix(i)) && tmpNsSet.contains(reader.getAttributeLocalName(i))) {
- continue; // do not append already defined ns
- }
- if ((null == reader.getAttributePrefix(i)) || ("".equals(reader.getAttributePrefix(i)))) { // no attribute prefix
- attrCode
- .append(' ')
- .append(reader.getAttributeLocalName(i))
- .append("=\"")
- .append(uriAttrFlg ? relativeToAbsoluteUrl(reader.getAttributeValue(i), baseUrl) : reader.getAttributeValue(i))
- .append('"');
- } else { // prefix`presented
- attrCode
- .append(' ')
- .append(reader.getAttributePrefix(i))
- .append(':')
- .append(reader.getAttributeLocalName(i))
- .append("=\"")
- .append(uriAttrFlg ? relativeToAbsoluteUrl(reader.getAttributeValue(i), baseUrl) : reader.getAttributeValue(i))
- .append('"');
- if (!tmpNsSet.contains(reader.getAttributePrefix(i))) {
- xmlnsCode
- .append(" xmlns:")
- .append(reader.getAttributePrefix(i))
- .append("=\"")
- .append(reader.getAttributeNamespace(i))
- .append('"');
- tmpNsSet.add(reader.getAttributePrefix(i));
- } // end if prefix already processed
- }
- } // end foreach attr
- elementCode
- .append(xmlnsCode) // complete the start element tag
- .append(attrCode)
- .append('>');
- break;
- //case XMLStreamConstants.ATTRIBUTE: Unreachable (I hope ;-)
- // break;
- //case XMLStreamConstants.NAMESPACE: Unreachable (I hope ;-)
- // break;
- case XMLStreamConstants.END_ELEMENT:
- curName = reader.getName();
- if (elementName.equals(curName)) { // it is our element !
- depth--; // go up
- }
- elementCode
- .append("</") // append appropriate XML code
- .append("".equals(curName.getPrefix())?"":curName.getPrefix()+':')
- .append(curName.getLocalPart())
- .append('>'); // complete the end element tag
- break;
- case XMLStreamConstants.CHARACTERS:
- elementCode.append(reader.getText()); // append text data
- break;
- case XMLStreamConstants.CDATA:
- elementCode
- .append("<![CDATA[") // append CDATA delimiters
- .append(reader.getText())
- .append("]]>");
- break;
- case XMLStreamConstants.COMMENT: // Ignore any comments
- break;
- case XMLStreamConstants.SPACE: // Ignore spaces as well
- break;
- }
- if (reader.hasNext() && depth>0) {
- reader.next();
- }
- } while (XMLStreamConstants.END_DOCUMENT!=reader.getEventType() && depth>0);
- policyRec.policyModel = ModelUnmarshaller.getUnmarshaller().unmarshalModel(
- new StringReader(elementCode.toString()));
- if (null != policyRec.policyModel.getPolicyId()) {
- policyRec.setUri(baseUrl + "#" + policyRec.policyModel.getPolicyId(), policyRec.policyModel.getPolicyId());
- } else if (policyRec.policyModel.getPolicyName() != null) {
- policyRec.setUri(policyRec.policyModel.getPolicyName(), policyRec.policyModel.getPolicyName());
- }
- } catch(Exception e) {
- throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT(elementCode.toString()), e));
- }
- urlsRead.add(baseUrl);
- return policyRec;
- }
-
-
- public Set<String> getUrlsRead() {
- return this.urlsRead;
- }
-
-
- /**
- * Reads policy reference element <wsp:PolicyReference/> and returns referenced policy URI as String
- *
- * @param reader The XMLStreamReader should be in START_ELEMENT state and point to the PolicyReference element.
- * @return The URI contained in the PolicyReference
- */
- public String readPolicyReferenceElement(final XMLStreamReader reader) {
- try {
- if (NamespaceVersion.resolveAsToken(reader.getName()) == XmlToken.PolicyReference) { // "PolicyReference" element interests me
- for (int i = 0; i < reader.getAttributeCount(); i++) {
- if (XmlToken.resolveToken(reader.getAttributeName(i).getLocalPart()) == XmlToken.Uri) {
- final String uriValue = reader.getAttributeValue(i);
- reader.next();
- return uriValue;
- }
- }
- }
- reader.next();
- return null;
- } catch(XMLStreamException e) {
- throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE(), e));
- }
- }
-
-
- /**
- * Utility method to construct an absolute URL from a relative URI and a base URL.
- *
- * If the relativeUri already is an absolute URL, the method returns the relativeUri.
- *
- * @param relativeUri The relative URI
- * @param baseUri The base URL
- * @return The relative URI appended to the base URL. If relativeUri already is
- * an absolute URL, the method returns the relativeUri.
- */
- public static String relativeToAbsoluteUrl(final String relativeUri, final String baseUri) {
- if ('#' != relativeUri.charAt(0)) { // TODO: escaped char could be an issue?
- return relativeUri; // absolute already
- }
- return (null == baseUri) ? relativeUri : baseUri + relativeUri;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/WSDLBoundFaultContainer.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/WSDLBoundFaultContainer.java
deleted file mode 100644
index b3cd21f0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/WSDLBoundFaultContainer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.jaxws;
-
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundFault;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLObject;
-
-import org.xml.sax.Locator;
-
-/**
- * We need data from the WSDL operation that the default WSDLBoundFault does not
- * give us. This class holds all the necessary data.
- *
- * @author Fabian Ritzmann
- */
-class WSDLBoundFaultContainer implements WSDLObject {
-
- private final WSDLBoundFault boundFault;
- private final WSDLBoundOperation boundOperation;
-
- public WSDLBoundFaultContainer(final WSDLBoundFault fault, final WSDLBoundOperation operation) {
- this.boundFault = fault;
- this.boundOperation = operation;
- }
-
- public Locator getLocation() {
- return null;
- }
-
- public WSDLBoundFault getBoundFault() {
- return this.boundFault;
- }
-
- public WSDLBoundOperation getBoundOperation() {
- return this.boundOperation;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyFeatureConfigurator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyFeatureConfigurator.java
deleted file mode 100644
index 2e9304be..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyFeatureConfigurator.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.jaxws.spi;
-
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapKey;
-import java.util.Collection;
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * The service provider implementing this interface will be discovered and called to configure
- * wsdl model based on PolicyMap bound to it.
- *
- * @since JAX-WS 2.2
- *
- * @author japod
- * @author Fabian Ritzmann
- * @author Rama.Pulavarthi@sun.com
- */
-public interface PolicyFeatureConfigurator {
-
- /**
- * A callback method that allows to retrieve policy related information from provided PolicyMap
- * and return a list of corresponding WebServiceFeatures.
- *
- * @param key Identifies the policy in the policy map
- * @param policyMap Provides policies as a source of information on proper configuration
- * @return A list of features that correspond to the policy identified by the policy map key. May be empty but not null.
- * @throws PolicyException If an error occurred
- */
- public Collection<WebServiceFeature> getFeatures(PolicyMapKey key, PolicyMap policyMap) throws PolicyException;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyMapConfigurator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyMapConfigurator.java
deleted file mode 100644
index ba2db58c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyMapConfigurator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.jaxws.spi;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicySubject;
-import java.util.Collection;
-
-/**
- * The service provider implementing this interface will be discovered and called to extend created PolicyMap instance with additional policy
- * bindings. The call is performed directly after WSIT config file is parsed.
- *
- * @since JAX-WS 2.2
- * @author Marek Potociar (marek.potociar at sun.com)
- * @author Fabian Ritzmann
- * @author Rama.Pulavarthi@sun.com
- */
-public interface PolicyMapConfigurator {
-
- /**
- * A callback method that allows to retrieve policy related information from provided parameters
- * return a collection of new policies that are added to the map.
- *
- * When new policies are returned, the caller may merge them with existing policies
- * in the policy map.
- *
- * @param policyMap This map contains the policies that were already created
- * @param model The WSDL model of the service
- * @param wsBinding The binding of the service
- * @return A collection of policies and the subject to which they are attached.
- * May return null or an empty collection.
- * @throws PolicyException Throw this exception if an error occurs
- */
- Collection<PolicySubject> update(PolicyMap policyMap, SEIModel model, WSBinding wsBinding) throws PolicyException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/package-info.java
deleted file mode 100644
index 3163bdf2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/package-info.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * The root package of public policy API. The package contains interfaces expected to be
- * used in the most common policy processing use cases, such as scope policy retrieval.
- * <p/>
- * Any policy API classes that are commonly used by other parts of policy API (such as
- * policy-specific exceptions, constants etc.) are expected to be found in this package.
- */
-package com.sun.xml.internal.ws.policy;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/Localization.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/Localization.properties
deleted file mode 100644
index fcb71a77..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/Localization.properties
+++ /dev/null
@@ -1,120 +0,0 @@
-#
-# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSP_0001_UNSUPPORTED_MODEL_NODE_TYPE=WSP0001: Unsupported model node type: ''{0}''
-WSP_0002_UNRECOGNIZED_SCOPE_TYPE=WSP0002: Unrecoginzed scope type: "{0}"
-WSP_0003_UNMARSHALLING_FAILED_END_TAG_DOES_NOT_MATCH=WSP0003: Policy model unmarshalling failed: Actual XML end tag does not match current element. Expected tag FQN: "{0}", actual tag FQN: "{1}"
-WSP_0004_UNEXPECTED_VISIBILITY_ATTR_VALUE=WSP0004: Unexpected visibility attribute value: {0}
-WSP_0005_UNEXPECTED_POLICY_ELEMENT_FOUND_IN_ASSERTION_PARAM=WSP0005: Unexpected nested policy element found in assertion parameter: {0}
-WSP_0006_UNEXPECTED_MULTIPLE_POLICY_NODES=WSP0006: Unexpected multiple nested policy nodes within a single assertion
-WSP_0007_UNEXPECTED_MODEL_NODE_TYPE_FOUND=WSP0007: Unexpected model node type ({0})found during policy expression content decomposition
-WSP_0008_UNEXPECTED_CHILD_MODEL_TYPE=WSP0008: Unexpected type of child model node nested in an 'ASSERTION' node: ''{0}''
-WSP_0009_UNEXPECTED_CDATA_ON_SOURCE_MODEL_NODE=WSP0009: Unexpected character data on current policy source model node "{0}" : data = "{1}"
-WSP_0010_UNEXPANDED_POLICY_REFERENCE_NODE_FOUND_REFERENCING=WSP0010: Unexpanded "POLICY_REFERENCE" node found referencing {0}
-WSP_0011_UNABLE_TO_UNMARSHALL_POLICY_XML_ELEM_EXPECTED=WSP0011: Failed to unmarshal policy expression. Expected XML element
-WSP_0012_UNABLE_TO_UNMARSHALL_POLICY_MALFORMED_URI=WSP0012: Unable to unmarshall policy referenced due to malformed URI value in attribute
-WSP_0013_UNABLE_TO_SET_PARENT_MODEL_ON_ROOT=WSP0013: Unable to set parent model on root model node
-WSP_0014_UNABLE_TO_INSTANTIATE_READER_FOR_STORAGE=WSP0014: Unable to instantiate XMLEventReader for given storage
-WSP_0015_UNABLE_TO_INSTANTIATE_DIGEST_ALG_URI_FIELD=WSP0015: Unable to instantiate static constant field 'DEFAULT_DIGEST_ALGORITHM_URI'
-WSP_0016_UNABLE_TO_CLONE_POLICY_SOURCE_MODEL=WSP0016: Unable to clone input policy source model
-WSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON=WSP0017: Unable to access policy source model identified by URI: {0}\nDetailed reason: {1}
-WSP_0018_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL=WSP0018: Unable to access policy source model identified by URI: {0}
-WSP_0019_SUBOPTIMAL_ALTERNATIVE_SELECTED=WSP0019: Suboptimal policy alternative selected on the client side with fitness "{0}".
-WSP_0020_SUBJECT_PARAM_MUST_NOT_BE_NULL=WSP0020: Parameter subject must not be null
-WSP_0021_SUBJECT_AND_POLICY_PARAM_MUST_NOT_BE_NULL=WSP0021: Parameters "subject" and "policy" must not be null. (subject={0}, policy={1})
-WSP_0022_STORAGE_TYPE_NOT_SUPPORTED=WSP0022: Storage type "{0}" is not supported
-WSP_0023_UNEXPECTED_ERROR_WHILE_CLOSING_RESOURCE=WSP0023: Unexpected error occured while closing resource "{0}".
-WSP_0024_SPI_FAIL_SERVICE_URL_LINE_MSG=WSP0024: {0}:{1}: {2}
-WSP_0025_SPI_FAIL_SERVICE_MSG=WSP0025: {0}: {1}
-WSP_0026_SINGLE_EMPTY_ALTERNATIVE_COMBINATION_CREATED=WSP0026: Single empty alternative combination created: Returning "anything allowed" policy
-WSP_0027_SERVICE_PROVIDER_NOT_FOUND=WSP0027: Service provider {0} not found
-WSP_0028_SERVICE_PROVIDER_COULD_NOT_BE_INSTANTIATED=WSP0028: Service provider {0} could not be instantiated
-WSP_0029_SERVICE_PORT_OPERATION_PARAM_MUST_NOT_BE_NULL=WSP0029: Parameters "service", "port" and "operation" must not be null. (service={0}, port={1}, operation={2})
-WSP_0030_SERVICE_PORT_OPERATION_FAULT_MSG_PARAM_MUST_NOT_BE_NULL=WSP0030: Parameters "service", "port", "operation" and "faultMessage" must not be null. (service={0}, port={1}, operation={2}, faultMessage={3})
-WSP_0031_SERVICE_PARAM_MUST_NOT_BE_NULL=WSP0031: Parameter 'service' must not be null
-WSP_0032_SERVICE_CAN_NOT_BE_NULL=WSP0032: Service can not be null
-WSP_0033_SERVICE_AND_PORT_PARAM_MUST_NOT_BE_NULL=WSP0033: Parameters "service" and "port" must not be null. (service={0}, port={1})
-WSP_0034_REMOVE_OPERATION_NOT_SUPPORTED=WSP0034: Remove operation not supported by this iterator
-WSP_0035_RECONFIGURE_ALTERNATIVES=WSP0035: Policy "{0}" contains more than one policy alternative. Please reconfigure the service with only one policy alternative.
-WSP_0036_PRIVATE_METHOD_DOES_NOT_ACCEPT_NULL_OR_EMPTY_COLLECTION=WSP0036: This private method does not accept null or empty collection
-WSP_0037_PRIVATE_CONSTRUCTOR_DOES_NOT_TAKE_NULL=WSP0037: Private constructor must not receive 'null' argument as a initial policy assertion list
-WSP_0038_POLICY_TO_ATTACH_MUST_NOT_BE_NULL=WSP0038: Policy to be attached must not be null
-WSP_0039_POLICY_SRC_MODEL_INPUT_PARAMETER_MUST_NOT_BE_NULL=WSP0039: Policy source model input parameter must not be null
-WSP_0040_POLICY_REFERENCE_URI_ATTR_NOT_FOUND=WSP0040: Policy reference 'URI' attribute not found
-WSP_0041_POLICY_REFERENCE_NODE_FOUND_WITH_NO_POLICY_REFERENCE_IN_IT=WSP0041: Unexpanded "POLICY_REFERENCE" node found containing no policy reference data
-WSP_0042_POLICY_REFERENCE_NODE_EXPECTED_INSTEAD_OF=WSP0042: Input model node argument is not a policy reference. Real node type: {0}
-WSP_0043_POLICY_MODEL_TRANSLATION_ERROR_INPUT_PARAM_NULL=WSP0043: Policy model translation error: Input policy source model parameter is null
-WSP_0044_POLICY_MAP_MUTATOR_ALREADY_CONNECTED=WSP0044: This policy map mutator is already connected to a policy map. Please, disconnect it first, before connecting to another policy map
-WSP_0045_POLICY_MAP_KEY_MUST_NOT_BE_NULL=WSP0045: Provided policy map key must not be null! Create a proper policy map key by calling one of PolicyMap's createXxxScopeKey(...) methods first
-WSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET=WSP0046: Policy map key handler is not set
-WSP_0047_POLICY_IS_NULL_RETURNING=WSP0047: Policy is null, returning
-WSP_0048_POLICY_ELEMENT_EXPECTED_FIRST=WSP0048: Failed to unmarshal policy expression. Expected 'Policy' as a first XML element
-WSP_0049_PARENT_MODEL_CAN_NOT_BE_CHANGED=WSP0049: The parent model may not be changed on a child node which is not a root of the policy source model tree
-WSP_0050_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_POLICY_REFERENCE_NODE_TYPE=WSP0050: This operation is supported only for 'POLICY_REFERENCE' node type. It is not supported for the node type ''{0}''
-WSP_0051_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_ASSERTION_RELATED_NODE_TYPE=WSP0051: This operation is supported only for 'ASSERTION' and 'ASSERTION_PARAMETER_NODE' node types. It is not supported for the node type ''{0}''
-WSP_0052_NUMBER_OF_ALTERNATIVE_COMBINATIONS_CREATED=WSP0052: Number of policy alternative combinations created: {0}
-WSP_0053_INVALID_CLIENT_SIDE_ALTERNATIVE=WSP0053: Client cannot proceed to call the web service - invalid policy alternative found. For more information see "WSP0075" warning messages in the log file.
-WSP_0054_NO_MORE_ELEMS_IN_POLICY_MAP=WSP0054: There are no more elements in the policy map
-WSP_0055_NO_ALTERNATIVE_COMBINATIONS_CREATED=WSP0055: No alternative combinations created: Returning "nothing allowed" policy
-WSP_0056_NEITHER_NULL_NOR_EMPTY_POLICY_COLLECTION_EXPECTED=WSP0056: Input policy collection is expected not to be null nor empty collection
-WSP_0057_N_ALTERNATIVE_COMBINATIONS_M_POLICY_ALTERNATIVES_CREATED=WSP0057: {0} policy alternative combinations created: Returning created policy with {1} inequal policy alternatives
-WSP_0058_MULTIPLE_POLICY_IDS_NOT_ALLOWED=WSP0058: Multiple identifiers of policy expression detected. Single policy expression must not contain both wsu:Id and xml:id identifiers at once
-WSP_0059_MULTIPLE_ATTRS_WITH_SAME_NAME_DETECTED_FOR_ASSERTION=WSP0059: Multiple attributes with the same name "{0}" detected for assertion "{1}"
-WSP_0060_POLICY_ELEMENT_TYPE_UNKNOWN=WSP0060: Unknown policy element type "{0}"
-WSP_0061_METHOD_INVOCATION_FAILED=WSP0061: Method invocation failed (class={0}, method={1}, parameters={2})
-WSP_0062_INPUT_PARAMS_MUST_NOT_BE_NULL=WSP0062: Input parameters must not be 'null'
-WSP_0063_ERROR_WHILE_CONSTRUCTING_EXCEPTION=WSP0063: Unexpected exception occured while constructing exception of class "{0}".
-WSP_0064_INITIAL_POLICY_COLLECTION_MUST_NOT_BE_EMPTY=WSP0064: Initial collection of policies must not be empty
-WSP_0065_INCONSISTENCY_IN_POLICY_SOURCE_MODEL=WSP0065: Inconsistency in policy source model detected: Cannot create policy assertion parameter from a model node of type: ''{0}''
-WSP_0066_ILLEGAL_PROVIDER_CLASSNAME=WSP0066: Illegal provider-class name: {0}
-WSP_0067_ILLEGAL_CFG_FILE_SYNTAX=WSP0067: Illegal configuration-file syntax
-WSP_0068_FAILED_TO_UNMARSHALL_POLICY_EXPRESSION=WSP0068: Failed to unmarshal policy expression
-WSP_0069_EXCEPTION_WHILE_RETRIEVING_EFFECTIVE_POLICY_FOR_KEY=WSP0069: Exception occured while retrieving effective policy for given key {0}
-WSP_0070_ERROR_REGISTERING_ASSERTION_CREATOR=WSP0070: Error registering policy assertion creator of class ''{0}'''. Supported domain nemaspace URI string must not be neither null nor empty!"
-WSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE=WSP0071: Multiple policy assertion creators try to register for namespace ''{0}''. Old creator`s class: ''{1}'', new creator`s class: ''{2}''.
-WSP_0072_DIGEST_MUST_NOT_BE_NULL_WHEN_ALG_DEFINED=WSP0072: Digest must not be null if the digest algorithm is defined
-WSP_0073_CREATE_CHILD_NODE_OPERATION_NOT_SUPPORTED=WSP0073: Cannot create child node of type ''{0}'' in the node of type ''{1}''. Create operation is not supported for this combination of node types.
-WSP_0074_CANNOT_CREATE_ASSERTION_BAD_TYPE=WSP0074: Cannot create AssertionData instance for this type of ModelNode: "{0}"; Supported types are "{1}" and "{2}"
-WSP_0075_PROBLEMATIC_ASSERTION_STATE=WSP0075: Policy assertion "{0}" was evaluated as "{1}".
-WSP_0076_NO_SERVICE_PROVIDERS_FOUND=WSP0076: Policy engine could not locate any service providers implementing "{0}" interface. Please, check "META-INF/services" directory in your "webservices-rt.jar".
-WSP_0077_ASSERTION_CREATOR_DOES_NOT_SUPPORT_ANY_URI=WSP0077: Discovered policy assertion creator of class=''{0}'' does not support any URI
-WSP_0078_ASSERTION_CREATOR_DISCOVERED=WSP0078: Policy assertion creator discovered: class=''{0}'', supported namespace=''{1}''
-WSP_0079_ERROR_WHILE_RFC2396_UNESCAPING=WSP0079: Error while unescaping ''{0}'' by RFC2396
-WSP_0080_IMPLEMENTATION_EXPECTED_NOT_NULL=WSP0080: Expected config file identifier, got null instead. Implementation fault.
-WSP_0081_UNABLE_TO_INSERT_CHILD=WSP0081: Failed to insert child node ''{1}'' into queue ''{0}''
-WSP_0082_NO_SUBJECT_TYPE=WSP0082: Implementation fault. Failed to determine subject type.
-WSP_0083_MESSAGE_TYPE_NULL=WSP0083: The message type may not be null.
-WSP_0084_MESSAGE_TYPE_NO_MESSAGE=WSP0084: The message type may not be NO_MESSAGE.
-WSP_0085_MESSAGE_FAULT_NO_NAME=WSP0085: Messages of type fault must have a name.
-WSP_0086_FAILED_CREATE_READER=WSP0086: Failed to create XMLEventReader for source {0}
-WSP_0087_UNKNOWN_EVENT=WSP0087: Received unknown event {0}
-WSP_0088_FAILED_PARSE=WSP0088: Failed to parse XML document at location {0}
-WSP_0089_EXPECTED_ELEMENT=WSP0089: Expected tag {0}, but read <{1}> at location {2}
-WSP_0090_UNEXPECTED_ELEMENT=WSP0090: Unexpected element <{0}> at location {1}
-WSP_0091_END_ELEMENT_NO_MATCH=WSP0091: Expected end element {0} but read <{1}> at location {2}
-WSP_0092_CHARACTER_DATA_UNEXPECTED=WSP0092: Character data in unexpected element {0}, character data = {1}, location = {2}
-WSP_0093_INVALID_URI=WSP0093: Invalid URI "{0}" at location {1}
-WSP_0094_INVALID_URN=WSP0094: Internal implementation error. Apparently failed to pass valid URN.
-WSP_0095_INVALID_BOOLEAN_VALUE=WSP0095: A value of boolean type may have one of the values "true", "false", "1", "0". This value was "{0}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/LocalizationMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/LocalizationMessages.java
deleted file mode 100644
index 53860ddb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/LocalizationMessages.java
+++ /dev/null
@@ -1,1183 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.privateutil;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class LocalizationMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.policy.privateutil.Localization");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableWSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON", arg0, arg1);
- }
-
- /**
- * WSP0017: Unable to access policy source model identified by URI: {0}
- * Detailed reason: {1}
- *
- */
- public static String WSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON(arg0, arg1));
- }
-
- public static Localizable localizableWSP_0028_SERVICE_PROVIDER_COULD_NOT_BE_INSTANTIATED(Object arg0) {
- return messageFactory.getMessage("WSP_0028_SERVICE_PROVIDER_COULD_NOT_BE_INSTANTIATED", arg0);
- }
-
- /**
- * WSP0028: Service provider {0} could not be instantiated
- *
- */
- public static String WSP_0028_SERVICE_PROVIDER_COULD_NOT_BE_INSTANTIATED(Object arg0) {
- return localizer.localize(localizableWSP_0028_SERVICE_PROVIDER_COULD_NOT_BE_INSTANTIATED(arg0));
- }
-
- public static Localizable localizableWSP_0081_UNABLE_TO_INSERT_CHILD(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_0081_UNABLE_TO_INSERT_CHILD", arg0, arg1);
- }
-
- /**
- * WSP0081: Failed to insert child node ''{1}'' into queue ''{0}''
- *
- */
- public static String WSP_0081_UNABLE_TO_INSERT_CHILD(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_0081_UNABLE_TO_INSERT_CHILD(arg0, arg1));
- }
-
- public static Localizable localizableWSP_0018_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL(Object arg0) {
- return messageFactory.getMessage("WSP_0018_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL", arg0);
- }
-
- /**
- * WSP0018: Unable to access policy source model identified by URI: {0}
- *
- */
- public static String WSP_0018_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL(Object arg0) {
- return localizer.localize(localizableWSP_0018_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL(arg0));
- }
-
- public static Localizable localizableWSP_0090_UNEXPECTED_ELEMENT(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_0090_UNEXPECTED_ELEMENT", arg0, arg1);
- }
-
- /**
- * WSP0090: Unexpected element <{0}> at location {1}
- *
- */
- public static String WSP_0090_UNEXPECTED_ELEMENT(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_0090_UNEXPECTED_ELEMENT(arg0, arg1));
- }
-
- public static Localizable localizableWSP_0043_POLICY_MODEL_TRANSLATION_ERROR_INPUT_PARAM_NULL() {
- return messageFactory.getMessage("WSP_0043_POLICY_MODEL_TRANSLATION_ERROR_INPUT_PARAM_NULL");
- }
-
- /**
- * WSP0043: Policy model translation error: Input policy source model parameter is null
- *
- */
- public static String WSP_0043_POLICY_MODEL_TRANSLATION_ERROR_INPUT_PARAM_NULL() {
- return localizer.localize(localizableWSP_0043_POLICY_MODEL_TRANSLATION_ERROR_INPUT_PARAM_NULL());
- }
-
- public static Localizable localizableWSP_0055_NO_ALTERNATIVE_COMBINATIONS_CREATED() {
- return messageFactory.getMessage("WSP_0055_NO_ALTERNATIVE_COMBINATIONS_CREATED");
- }
-
- /**
- * WSP0055: No alternative combinations created: Returning "nothing allowed" policy
- *
- */
- public static String WSP_0055_NO_ALTERNATIVE_COMBINATIONS_CREATED() {
- return localizer.localize(localizableWSP_0055_NO_ALTERNATIVE_COMBINATIONS_CREATED());
- }
-
- public static Localizable localizableWSP_0072_DIGEST_MUST_NOT_BE_NULL_WHEN_ALG_DEFINED() {
- return messageFactory.getMessage("WSP_0072_DIGEST_MUST_NOT_BE_NULL_WHEN_ALG_DEFINED");
- }
-
- /**
- * WSP0072: Digest must not be null if the digest algorithm is defined
- *
- */
- public static String WSP_0072_DIGEST_MUST_NOT_BE_NULL_WHEN_ALG_DEFINED() {
- return localizer.localize(localizableWSP_0072_DIGEST_MUST_NOT_BE_NULL_WHEN_ALG_DEFINED());
- }
-
- public static Localizable localizableWSP_0016_UNABLE_TO_CLONE_POLICY_SOURCE_MODEL() {
- return messageFactory.getMessage("WSP_0016_UNABLE_TO_CLONE_POLICY_SOURCE_MODEL");
- }
-
- /**
- * WSP0016: Unable to clone input policy source model
- *
- */
- public static String WSP_0016_UNABLE_TO_CLONE_POLICY_SOURCE_MODEL() {
- return localizer.localize(localizableWSP_0016_UNABLE_TO_CLONE_POLICY_SOURCE_MODEL());
- }
-
- public static Localizable localizableWSP_0058_MULTIPLE_POLICY_IDS_NOT_ALLOWED() {
- return messageFactory.getMessage("WSP_0058_MULTIPLE_POLICY_IDS_NOT_ALLOWED");
- }
-
- /**
- * WSP0058: Multiple identifiers of policy expression detected. Single policy expression must not contain both wsu:Id and xml:id identifiers at once
- *
- */
- public static String WSP_0058_MULTIPLE_POLICY_IDS_NOT_ALLOWED() {
- return localizer.localize(localizableWSP_0058_MULTIPLE_POLICY_IDS_NOT_ALLOWED());
- }
-
- public static Localizable localizableWSP_0061_METHOD_INVOCATION_FAILED(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("WSP_0061_METHOD_INVOCATION_FAILED", arg0, arg1, arg2);
- }
-
- /**
- * WSP0061: Method invocation failed (class={0}, method={1}, parameters={2})
- *
- */
- public static String WSP_0061_METHOD_INVOCATION_FAILED(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSP_0061_METHOD_INVOCATION_FAILED(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSP_0048_POLICY_ELEMENT_EXPECTED_FIRST() {
- return messageFactory.getMessage("WSP_0048_POLICY_ELEMENT_EXPECTED_FIRST");
- }
-
- /**
- * WSP0048: Failed to unmarshal policy expression. Expected 'Policy' as a first XML element
- *
- */
- public static String WSP_0048_POLICY_ELEMENT_EXPECTED_FIRST() {
- return localizer.localize(localizableWSP_0048_POLICY_ELEMENT_EXPECTED_FIRST());
- }
-
- public static Localizable localizableWSP_0068_FAILED_TO_UNMARSHALL_POLICY_EXPRESSION() {
- return messageFactory.getMessage("WSP_0068_FAILED_TO_UNMARSHALL_POLICY_EXPRESSION");
- }
-
- /**
- * WSP0068: Failed to unmarshal policy expression
- *
- */
- public static String WSP_0068_FAILED_TO_UNMARSHALL_POLICY_EXPRESSION() {
- return localizer.localize(localizableWSP_0068_FAILED_TO_UNMARSHALL_POLICY_EXPRESSION());
- }
-
- public static Localizable localizableWSP_0029_SERVICE_PORT_OPERATION_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("WSP_0029_SERVICE_PORT_OPERATION_PARAM_MUST_NOT_BE_NULL", arg0, arg1, arg2);
- }
-
- /**
- * WSP0029: Parameters "service", "port" and "operation" must not be null. (service={0}, port={1}, operation={2})
- *
- */
- public static String WSP_0029_SERVICE_PORT_OPERATION_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSP_0029_SERVICE_PORT_OPERATION_PARAM_MUST_NOT_BE_NULL(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSP_0080_IMPLEMENTATION_EXPECTED_NOT_NULL() {
- return messageFactory.getMessage("WSP_0080_IMPLEMENTATION_EXPECTED_NOT_NULL");
- }
-
- /**
- * WSP0080: Expected config file identifier, got null instead. Implementation fault.
- *
- */
- public static String WSP_0080_IMPLEMENTATION_EXPECTED_NOT_NULL() {
- return localizer.localize(localizableWSP_0080_IMPLEMENTATION_EXPECTED_NOT_NULL());
- }
-
- public static Localizable localizableWSP_0051_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_ASSERTION_RELATED_NODE_TYPE(Object arg0) {
- return messageFactory.getMessage("WSP_0051_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_ASSERTION_RELATED_NODE_TYPE", arg0);
- }
-
- /**
- * WSP0051: This operation is supported only for 'ASSERTION' and 'ASSERTION_PARAMETER_NODE' node types. It is not supported for the node type ''{0}''
- *
- */
- public static String WSP_0051_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_ASSERTION_RELATED_NODE_TYPE(Object arg0) {
- return localizer.localize(localizableWSP_0051_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_ASSERTION_RELATED_NODE_TYPE(arg0));
- }
-
- public static Localizable localizableWSP_0008_UNEXPECTED_CHILD_MODEL_TYPE(Object arg0) {
- return messageFactory.getMessage("WSP_0008_UNEXPECTED_CHILD_MODEL_TYPE", arg0);
- }
-
- /**
- * WSP0008: Unexpected type of child model node nested in an 'ASSERTION' node: ''{0}''
- *
- */
- public static String WSP_0008_UNEXPECTED_CHILD_MODEL_TYPE(Object arg0) {
- return localizer.localize(localizableWSP_0008_UNEXPECTED_CHILD_MODEL_TYPE(arg0));
- }
-
- public static Localizable localizableWSP_0023_UNEXPECTED_ERROR_WHILE_CLOSING_RESOURCE(Object arg0) {
- return messageFactory.getMessage("WSP_0023_UNEXPECTED_ERROR_WHILE_CLOSING_RESOURCE", arg0);
- }
-
- /**
- * WSP0023: Unexpected error occured while closing resource "{0}".
- *
- */
- public static String WSP_0023_UNEXPECTED_ERROR_WHILE_CLOSING_RESOURCE(Object arg0) {
- return localizer.localize(localizableWSP_0023_UNEXPECTED_ERROR_WHILE_CLOSING_RESOURCE(arg0));
- }
-
- public static Localizable localizableWSP_0091_END_ELEMENT_NO_MATCH(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("WSP_0091_END_ELEMENT_NO_MATCH", arg0, arg1, arg2);
- }
-
- /**
- * WSP0091: Expected end element {0} but read <{1}> at location {2}
- *
- */
- public static String WSP_0091_END_ELEMENT_NO_MATCH(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSP_0091_END_ELEMENT_NO_MATCH(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSP_0001_UNSUPPORTED_MODEL_NODE_TYPE(Object arg0) {
- return messageFactory.getMessage("WSP_0001_UNSUPPORTED_MODEL_NODE_TYPE", arg0);
- }
-
- /**
- * WSP0001: Unsupported model node type: ''{0}''
- *
- */
- public static String WSP_0001_UNSUPPORTED_MODEL_NODE_TYPE(Object arg0) {
- return localizer.localize(localizableWSP_0001_UNSUPPORTED_MODEL_NODE_TYPE(arg0));
- }
-
- public static Localizable localizableWSP_0053_INVALID_CLIENT_SIDE_ALTERNATIVE() {
- return messageFactory.getMessage("WSP_0053_INVALID_CLIENT_SIDE_ALTERNATIVE");
- }
-
- /**
- * WSP0053: Client cannot proceed to call the web service - invalid policy alternative found. For more information see "WSP0075" warning messages in the log file.
- *
- */
- public static String WSP_0053_INVALID_CLIENT_SIDE_ALTERNATIVE() {
- return localizer.localize(localizableWSP_0053_INVALID_CLIENT_SIDE_ALTERNATIVE());
- }
-
- public static Localizable localizableWSP_0087_UNKNOWN_EVENT(Object arg0) {
- return messageFactory.getMessage("WSP_0087_UNKNOWN_EVENT", arg0);
- }
-
- /**
- * WSP0087: Received unknown event {0}
- *
- */
- public static String WSP_0087_UNKNOWN_EVENT(Object arg0) {
- return localizer.localize(localizableWSP_0087_UNKNOWN_EVENT(arg0));
- }
-
- public static Localizable localizableWSP_0065_INCONSISTENCY_IN_POLICY_SOURCE_MODEL(Object arg0) {
- return messageFactory.getMessage("WSP_0065_INCONSISTENCY_IN_POLICY_SOURCE_MODEL", arg0);
- }
-
- /**
- * WSP0065: Inconsistency in policy source model detected: Cannot create policy assertion parameter from a model node of type: ''{0}''
- *
- */
- public static String WSP_0065_INCONSISTENCY_IN_POLICY_SOURCE_MODEL(Object arg0) {
- return localizer.localize(localizableWSP_0065_INCONSISTENCY_IN_POLICY_SOURCE_MODEL(arg0));
- }
-
- public static Localizable localizableWSP_0032_SERVICE_CAN_NOT_BE_NULL() {
- return messageFactory.getMessage("WSP_0032_SERVICE_CAN_NOT_BE_NULL");
- }
-
- /**
- * WSP0032: Service can not be null
- *
- */
- public static String WSP_0032_SERVICE_CAN_NOT_BE_NULL() {
- return localizer.localize(localizableWSP_0032_SERVICE_CAN_NOT_BE_NULL());
- }
-
- public static Localizable localizableWSP_0093_INVALID_URI(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_0093_INVALID_URI", arg0, arg1);
- }
-
- /**
- * WSP0093: Invalid URI "{0}" at location {1}
- *
- */
- public static String WSP_0093_INVALID_URI(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_0093_INVALID_URI(arg0, arg1));
- }
-
- public static Localizable localizableWSP_0045_POLICY_MAP_KEY_MUST_NOT_BE_NULL() {
- return messageFactory.getMessage("WSP_0045_POLICY_MAP_KEY_MUST_NOT_BE_NULL");
- }
-
- /**
- * WSP0045: Provided policy map key must not be null! Create a proper policy map key by calling one of PolicyMap's createXxxScopeKey(...) methods first
- *
- */
- public static String WSP_0045_POLICY_MAP_KEY_MUST_NOT_BE_NULL() {
- return localizer.localize(localizableWSP_0045_POLICY_MAP_KEY_MUST_NOT_BE_NULL());
- }
-
- public static Localizable localizableWSP_0079_ERROR_WHILE_RFC_2396_UNESCAPING(Object arg0) {
- return messageFactory.getMessage("WSP_0079_ERROR_WHILE_RFC2396_UNESCAPING", arg0);
- }
-
- /**
- * WSP0079: Error while unescaping ''{0}'' by RFC2396
- *
- */
- public static String WSP_0079_ERROR_WHILE_RFC_2396_UNESCAPING(Object arg0) {
- return localizer.localize(localizableWSP_0079_ERROR_WHILE_RFC_2396_UNESCAPING(arg0));
- }
-
- public static Localizable localizableWSP_0064_INITIAL_POLICY_COLLECTION_MUST_NOT_BE_EMPTY() {
- return messageFactory.getMessage("WSP_0064_INITIAL_POLICY_COLLECTION_MUST_NOT_BE_EMPTY");
- }
-
- /**
- * WSP0064: Initial collection of policies must not be empty
- *
- */
- public static String WSP_0064_INITIAL_POLICY_COLLECTION_MUST_NOT_BE_EMPTY() {
- return localizer.localize(localizableWSP_0064_INITIAL_POLICY_COLLECTION_MUST_NOT_BE_EMPTY());
- }
-
- public static Localizable localizableWSP_0044_POLICY_MAP_MUTATOR_ALREADY_CONNECTED() {
- return messageFactory.getMessage("WSP_0044_POLICY_MAP_MUTATOR_ALREADY_CONNECTED");
- }
-
- /**
- * WSP0044: This policy map mutator is already connected to a policy map. Please, disconnect it first, before connecting to another policy map
- *
- */
- public static String WSP_0044_POLICY_MAP_MUTATOR_ALREADY_CONNECTED() {
- return localizer.localize(localizableWSP_0044_POLICY_MAP_MUTATOR_ALREADY_CONNECTED());
- }
-
- public static Localizable localizableWSP_0015_UNABLE_TO_INSTANTIATE_DIGEST_ALG_URI_FIELD() {
- return messageFactory.getMessage("WSP_0015_UNABLE_TO_INSTANTIATE_DIGEST_ALG_URI_FIELD");
- }
-
- /**
- * WSP0015: Unable to instantiate static constant field 'DEFAULT_DIGEST_ALGORITHM_URI'
- *
- */
- public static String WSP_0015_UNABLE_TO_INSTANTIATE_DIGEST_ALG_URI_FIELD() {
- return localizer.localize(localizableWSP_0015_UNABLE_TO_INSTANTIATE_DIGEST_ALG_URI_FIELD());
- }
-
- public static Localizable localizableWSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET() {
- return messageFactory.getMessage("WSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET");
- }
-
- /**
- * WSP0046: Policy map key handler is not set
- *
- */
- public static String WSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET() {
- return localizer.localize(localizableWSP_0046_POLICY_MAP_KEY_HANDLER_NOT_SET());
- }
-
- public static Localizable localizableWSP_0012_UNABLE_TO_UNMARSHALL_POLICY_MALFORMED_URI() {
- return messageFactory.getMessage("WSP_0012_UNABLE_TO_UNMARSHALL_POLICY_MALFORMED_URI");
- }
-
- /**
- * WSP0012: Unable to unmarshall policy referenced due to malformed URI value in attribute
- *
- */
- public static String WSP_0012_UNABLE_TO_UNMARSHALL_POLICY_MALFORMED_URI() {
- return localizer.localize(localizableWSP_0012_UNABLE_TO_UNMARSHALL_POLICY_MALFORMED_URI());
- }
-
- public static Localizable localizableWSP_0003_UNMARSHALLING_FAILED_END_TAG_DOES_NOT_MATCH(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_0003_UNMARSHALLING_FAILED_END_TAG_DOES_NOT_MATCH", arg0, arg1);
- }
-
- /**
- * WSP0003: Policy model unmarshalling failed: Actual XML end tag does not match current element. Expected tag FQN: "{0}", actual tag FQN: "{1}"
- *
- */
- public static String WSP_0003_UNMARSHALLING_FAILED_END_TAG_DOES_NOT_MATCH(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_0003_UNMARSHALLING_FAILED_END_TAG_DOES_NOT_MATCH(arg0, arg1));
- }
-
- public static Localizable localizableWSP_0007_UNEXPECTED_MODEL_NODE_TYPE_FOUND(Object arg0) {
- return messageFactory.getMessage("WSP_0007_UNEXPECTED_MODEL_NODE_TYPE_FOUND", arg0);
- }
-
- /**
- * WSP0007: Unexpected model node type ({0})found during policy expression content decomposition
- *
- */
- public static String WSP_0007_UNEXPECTED_MODEL_NODE_TYPE_FOUND(Object arg0) {
- return localizer.localize(localizableWSP_0007_UNEXPECTED_MODEL_NODE_TYPE_FOUND(arg0));
- }
-
- public static Localizable localizableWSP_0086_FAILED_CREATE_READER(Object arg0) {
- return messageFactory.getMessage("WSP_0086_FAILED_CREATE_READER", arg0);
- }
-
- /**
- * WSP0086: Failed to create XMLEventReader for source {0}
- *
- */
- public static String WSP_0086_FAILED_CREATE_READER(Object arg0) {
- return localizer.localize(localizableWSP_0086_FAILED_CREATE_READER(arg0));
- }
-
- public static Localizable localizableWSP_0077_ASSERTION_CREATOR_DOES_NOT_SUPPORT_ANY_URI(Object arg0) {
- return messageFactory.getMessage("WSP_0077_ASSERTION_CREATOR_DOES_NOT_SUPPORT_ANY_URI", arg0);
- }
-
- /**
- * WSP0077: Discovered policy assertion creator of class=''{0}'' does not support any URI
- *
- */
- public static String WSP_0077_ASSERTION_CREATOR_DOES_NOT_SUPPORT_ANY_URI(Object arg0) {
- return localizer.localize(localizableWSP_0077_ASSERTION_CREATOR_DOES_NOT_SUPPORT_ANY_URI(arg0));
- }
-
- public static Localizable localizableWSP_0082_NO_SUBJECT_TYPE() {
- return messageFactory.getMessage("WSP_0082_NO_SUBJECT_TYPE");
- }
-
- /**
- * WSP0082: Implementation fault. Failed to determine subject type.
- *
- */
- public static String WSP_0082_NO_SUBJECT_TYPE() {
- return localizer.localize(localizableWSP_0082_NO_SUBJECT_TYPE());
- }
-
- public static Localizable localizableWSP_0089_EXPECTED_ELEMENT(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("WSP_0089_EXPECTED_ELEMENT", arg0, arg1, arg2);
- }
-
- /**
- * WSP0089: Expected tag {0}, but read <{1}> at location {2}
- *
- */
- public static String WSP_0089_EXPECTED_ELEMENT(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSP_0089_EXPECTED_ELEMENT(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSP_0031_SERVICE_PARAM_MUST_NOT_BE_NULL() {
- return messageFactory.getMessage("WSP_0031_SERVICE_PARAM_MUST_NOT_BE_NULL");
- }
-
- /**
- * WSP0031: Parameter 'service' must not be null
- *
- */
- public static String WSP_0031_SERVICE_PARAM_MUST_NOT_BE_NULL() {
- return localizer.localize(localizableWSP_0031_SERVICE_PARAM_MUST_NOT_BE_NULL());
- }
-
- public static Localizable localizableWSP_0030_SERVICE_PORT_OPERATION_FAULT_MSG_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1, Object arg2, Object arg3) {
- return messageFactory.getMessage("WSP_0030_SERVICE_PORT_OPERATION_FAULT_MSG_PARAM_MUST_NOT_BE_NULL", arg0, arg1, arg2, arg3);
- }
-
- /**
- * WSP0030: Parameters "service", "port", "operation" and "faultMessage" must not be null. (service={0}, port={1}, operation={2}, faultMessage={3})
- *
- */
- public static String WSP_0030_SERVICE_PORT_OPERATION_FAULT_MSG_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1, Object arg2, Object arg3) {
- return localizer.localize(localizableWSP_0030_SERVICE_PORT_OPERATION_FAULT_MSG_PARAM_MUST_NOT_BE_NULL(arg0, arg1, arg2, arg3));
- }
-
- public static Localizable localizableWSP_0040_POLICY_REFERENCE_URI_ATTR_NOT_FOUND() {
- return messageFactory.getMessage("WSP_0040_POLICY_REFERENCE_URI_ATTR_NOT_FOUND");
- }
-
- /**
- * WSP0040: Policy reference 'URI' attribute not found
- *
- */
- public static String WSP_0040_POLICY_REFERENCE_URI_ATTR_NOT_FOUND() {
- return localizer.localize(localizableWSP_0040_POLICY_REFERENCE_URI_ATTR_NOT_FOUND());
- }
-
- public static Localizable localizableWSP_0034_REMOVE_OPERATION_NOT_SUPPORTED() {
- return messageFactory.getMessage("WSP_0034_REMOVE_OPERATION_NOT_SUPPORTED");
- }
-
- /**
- * WSP0034: Remove operation not supported by this iterator
- *
- */
- public static String WSP_0034_REMOVE_OPERATION_NOT_SUPPORTED() {
- return localizer.localize(localizableWSP_0034_REMOVE_OPERATION_NOT_SUPPORTED());
- }
-
- public static Localizable localizableWSP_0084_MESSAGE_TYPE_NO_MESSAGE() {
- return messageFactory.getMessage("WSP_0084_MESSAGE_TYPE_NO_MESSAGE");
- }
-
- /**
- * WSP0084: The message type may not be NO_MESSAGE.
- *
- */
- public static String WSP_0084_MESSAGE_TYPE_NO_MESSAGE() {
- return localizer.localize(localizableWSP_0084_MESSAGE_TYPE_NO_MESSAGE());
- }
-
- public static Localizable localizableWSP_0004_UNEXPECTED_VISIBILITY_ATTR_VALUE(Object arg0) {
- return messageFactory.getMessage("WSP_0004_UNEXPECTED_VISIBILITY_ATTR_VALUE", arg0);
- }
-
- /**
- * WSP0004: Unexpected visibility attribute value: {0}
- *
- */
- public static String WSP_0004_UNEXPECTED_VISIBILITY_ATTR_VALUE(Object arg0) {
- return localizer.localize(localizableWSP_0004_UNEXPECTED_VISIBILITY_ATTR_VALUE(arg0));
- }
-
- public static Localizable localizableWSP_0074_CANNOT_CREATE_ASSERTION_BAD_TYPE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("WSP_0074_CANNOT_CREATE_ASSERTION_BAD_TYPE", arg0, arg1, arg2);
- }
-
- /**
- * WSP0074: Cannot create AssertionData instance for this type of ModelNode: "{0}"; Supported types are "{1}" and "{2}"
- *
- */
- public static String WSP_0074_CANNOT_CREATE_ASSERTION_BAD_TYPE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSP_0074_CANNOT_CREATE_ASSERTION_BAD_TYPE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSP_0052_NUMBER_OF_ALTERNATIVE_COMBINATIONS_CREATED(Object arg0) {
- return messageFactory.getMessage("WSP_0052_NUMBER_OF_ALTERNATIVE_COMBINATIONS_CREATED", arg0);
- }
-
- /**
- * WSP0052: Number of policy alternative combinations created: {0}
- *
- */
- public static String WSP_0052_NUMBER_OF_ALTERNATIVE_COMBINATIONS_CREATED(Object arg0) {
- return localizer.localize(localizableWSP_0052_NUMBER_OF_ALTERNATIVE_COMBINATIONS_CREATED(arg0));
- }
-
- public static Localizable localizableWSP_0037_PRIVATE_CONSTRUCTOR_DOES_NOT_TAKE_NULL() {
- return messageFactory.getMessage("WSP_0037_PRIVATE_CONSTRUCTOR_DOES_NOT_TAKE_NULL");
- }
-
- /**
- * WSP0037: Private constructor must not receive 'null' argument as a initial policy assertion list
- *
- */
- public static String WSP_0037_PRIVATE_CONSTRUCTOR_DOES_NOT_TAKE_NULL() {
- return localizer.localize(localizableWSP_0037_PRIVATE_CONSTRUCTOR_DOES_NOT_TAKE_NULL());
- }
-
- public static Localizable localizableWSP_0067_ILLEGAL_CFG_FILE_SYNTAX() {
- return messageFactory.getMessage("WSP_0067_ILLEGAL_CFG_FILE_SYNTAX");
- }
-
- /**
- * WSP0067: Illegal configuration-file syntax
- *
- */
- public static String WSP_0067_ILLEGAL_CFG_FILE_SYNTAX() {
- return localizer.localize(localizableWSP_0067_ILLEGAL_CFG_FILE_SYNTAX());
- }
-
- public static Localizable localizableWSP_0085_MESSAGE_FAULT_NO_NAME() {
- return messageFactory.getMessage("WSP_0085_MESSAGE_FAULT_NO_NAME");
- }
-
- /**
- * WSP0085: Messages of type fault must have a name.
- *
- */
- public static String WSP_0085_MESSAGE_FAULT_NO_NAME() {
- return localizer.localize(localizableWSP_0085_MESSAGE_FAULT_NO_NAME());
- }
-
- public static Localizable localizableWSP_0050_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_POLICY_REFERENCE_NODE_TYPE(Object arg0) {
- return messageFactory.getMessage("WSP_0050_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_POLICY_REFERENCE_NODE_TYPE", arg0);
- }
-
- /**
- * WSP0050: This operation is supported only for 'POLICY_REFERENCE' node type. It is not supported for the node type ''{0}''
- *
- */
- public static String WSP_0050_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_POLICY_REFERENCE_NODE_TYPE(Object arg0) {
- return localizer.localize(localizableWSP_0050_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_POLICY_REFERENCE_NODE_TYPE(arg0));
- }
-
- public static Localizable localizableWSP_0042_POLICY_REFERENCE_NODE_EXPECTED_INSTEAD_OF(Object arg0) {
- return messageFactory.getMessage("WSP_0042_POLICY_REFERENCE_NODE_EXPECTED_INSTEAD_OF", arg0);
- }
-
- /**
- * WSP0042: Input model node argument is not a policy reference. Real node type: {0}
- *
- */
- public static String WSP_0042_POLICY_REFERENCE_NODE_EXPECTED_INSTEAD_OF(Object arg0) {
- return localizer.localize(localizableWSP_0042_POLICY_REFERENCE_NODE_EXPECTED_INSTEAD_OF(arg0));
- }
-
- public static Localizable localizableWSP_0014_UNABLE_TO_INSTANTIATE_READER_FOR_STORAGE() {
- return messageFactory.getMessage("WSP_0014_UNABLE_TO_INSTANTIATE_READER_FOR_STORAGE");
- }
-
- /**
- * WSP0014: Unable to instantiate XMLEventReader for given storage
- *
- */
- public static String WSP_0014_UNABLE_TO_INSTANTIATE_READER_FOR_STORAGE() {
- return localizer.localize(localizableWSP_0014_UNABLE_TO_INSTANTIATE_READER_FOR_STORAGE());
- }
-
- public static Localizable localizableWSP_0054_NO_MORE_ELEMS_IN_POLICY_MAP() {
- return messageFactory.getMessage("WSP_0054_NO_MORE_ELEMS_IN_POLICY_MAP");
- }
-
- /**
- * WSP0054: There are no more elements in the policy map
- *
- */
- public static String WSP_0054_NO_MORE_ELEMS_IN_POLICY_MAP() {
- return localizer.localize(localizableWSP_0054_NO_MORE_ELEMS_IN_POLICY_MAP());
- }
-
- public static Localizable localizableWSP_0083_MESSAGE_TYPE_NULL() {
- return messageFactory.getMessage("WSP_0083_MESSAGE_TYPE_NULL");
- }
-
- /**
- * WSP0083: The message type may not be null.
- *
- */
- public static String WSP_0083_MESSAGE_TYPE_NULL() {
- return localizer.localize(localizableWSP_0083_MESSAGE_TYPE_NULL());
- }
-
- public static Localizable localizableWSP_0011_UNABLE_TO_UNMARSHALL_POLICY_XML_ELEM_EXPECTED() {
- return messageFactory.getMessage("WSP_0011_UNABLE_TO_UNMARSHALL_POLICY_XML_ELEM_EXPECTED");
- }
-
- /**
- * WSP0011: Failed to unmarshal policy expression. Expected XML element
- *
- */
- public static String WSP_0011_UNABLE_TO_UNMARSHALL_POLICY_XML_ELEM_EXPECTED() {
- return localizer.localize(localizableWSP_0011_UNABLE_TO_UNMARSHALL_POLICY_XML_ELEM_EXPECTED());
- }
-
- public static Localizable localizableWSP_0025_SPI_FAIL_SERVICE_MSG(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_0025_SPI_FAIL_SERVICE_MSG", arg0, arg1);
- }
-
- /**
- * WSP0025: {0}: {1}
- *
- */
- public static String WSP_0025_SPI_FAIL_SERVICE_MSG(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_0025_SPI_FAIL_SERVICE_MSG(arg0, arg1));
- }
-
- public static Localizable localizableWSP_0094_INVALID_URN() {
- return messageFactory.getMessage("WSP_0094_INVALID_URN");
- }
-
- /**
- * WSP0094: Internal implementation error. Apparently failed to pass valid URN.
- *
- */
- public static String WSP_0094_INVALID_URN() {
- return localizer.localize(localizableWSP_0094_INVALID_URN());
- }
-
- public static Localizable localizableWSP_0026_SINGLE_EMPTY_ALTERNATIVE_COMBINATION_CREATED() {
- return messageFactory.getMessage("WSP_0026_SINGLE_EMPTY_ALTERNATIVE_COMBINATION_CREATED");
- }
-
- /**
- * WSP0026: Single empty alternative combination created: Returning "anything allowed" policy
- *
- */
- public static String WSP_0026_SINGLE_EMPTY_ALTERNATIVE_COMBINATION_CREATED() {
- return localizer.localize(localizableWSP_0026_SINGLE_EMPTY_ALTERNATIVE_COMBINATION_CREATED());
- }
-
- public static Localizable localizableWSP_0078_ASSERTION_CREATOR_DISCOVERED(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_0078_ASSERTION_CREATOR_DISCOVERED", arg0, arg1);
- }
-
- /**
- * WSP0078: Policy assertion creator discovered: class=''{0}'', supported namespace=''{1}''
- *
- */
- public static String WSP_0078_ASSERTION_CREATOR_DISCOVERED(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_0078_ASSERTION_CREATOR_DISCOVERED(arg0, arg1));
- }
-
- public static Localizable localizableWSP_0041_POLICY_REFERENCE_NODE_FOUND_WITH_NO_POLICY_REFERENCE_IN_IT() {
- return messageFactory.getMessage("WSP_0041_POLICY_REFERENCE_NODE_FOUND_WITH_NO_POLICY_REFERENCE_IN_IT");
- }
-
- /**
- * WSP0041: Unexpanded "POLICY_REFERENCE" node found containing no policy reference data
- *
- */
- public static String WSP_0041_POLICY_REFERENCE_NODE_FOUND_WITH_NO_POLICY_REFERENCE_IN_IT() {
- return localizer.localize(localizableWSP_0041_POLICY_REFERENCE_NODE_FOUND_WITH_NO_POLICY_REFERENCE_IN_IT());
- }
-
- public static Localizable localizableWSP_0039_POLICY_SRC_MODEL_INPUT_PARAMETER_MUST_NOT_BE_NULL() {
- return messageFactory.getMessage("WSP_0039_POLICY_SRC_MODEL_INPUT_PARAMETER_MUST_NOT_BE_NULL");
- }
-
- /**
- * WSP0039: Policy source model input parameter must not be null
- *
- */
- public static String WSP_0039_POLICY_SRC_MODEL_INPUT_PARAMETER_MUST_NOT_BE_NULL() {
- return localizer.localize(localizableWSP_0039_POLICY_SRC_MODEL_INPUT_PARAMETER_MUST_NOT_BE_NULL());
- }
-
- public static Localizable localizableWSP_0070_ERROR_REGISTERING_ASSERTION_CREATOR(Object arg0) {
- return messageFactory.getMessage("WSP_0070_ERROR_REGISTERING_ASSERTION_CREATOR", arg0);
- }
-
- /**
- * WSP0070: Error registering policy assertion creator of class ''{0}'''. Supported domain nemaspace URI string must not be neither null nor empty!"
- *
- */
- public static String WSP_0070_ERROR_REGISTERING_ASSERTION_CREATOR(Object arg0) {
- return localizer.localize(localizableWSP_0070_ERROR_REGISTERING_ASSERTION_CREATOR(arg0));
- }
-
- public static Localizable localizableWSP_0036_PRIVATE_METHOD_DOES_NOT_ACCEPT_NULL_OR_EMPTY_COLLECTION() {
- return messageFactory.getMessage("WSP_0036_PRIVATE_METHOD_DOES_NOT_ACCEPT_NULL_OR_EMPTY_COLLECTION");
- }
-
- /**
- * WSP0036: This private method does not accept null or empty collection
- *
- */
- public static String WSP_0036_PRIVATE_METHOD_DOES_NOT_ACCEPT_NULL_OR_EMPTY_COLLECTION() {
- return localizer.localize(localizableWSP_0036_PRIVATE_METHOD_DOES_NOT_ACCEPT_NULL_OR_EMPTY_COLLECTION());
- }
-
- public static Localizable localizableWSP_0027_SERVICE_PROVIDER_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("WSP_0027_SERVICE_PROVIDER_NOT_FOUND", arg0);
- }
-
- /**
- * WSP0027: Service provider {0} not found
- *
- */
- public static String WSP_0027_SERVICE_PROVIDER_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableWSP_0027_SERVICE_PROVIDER_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableWSP_0056_NEITHER_NULL_NOR_EMPTY_POLICY_COLLECTION_EXPECTED() {
- return messageFactory.getMessage("WSP_0056_NEITHER_NULL_NOR_EMPTY_POLICY_COLLECTION_EXPECTED");
- }
-
- /**
- * WSP0056: Input policy collection is expected not to be null nor empty collection
- *
- */
- public static String WSP_0056_NEITHER_NULL_NOR_EMPTY_POLICY_COLLECTION_EXPECTED() {
- return localizer.localize(localizableWSP_0056_NEITHER_NULL_NOR_EMPTY_POLICY_COLLECTION_EXPECTED());
- }
-
- public static Localizable localizableWSP_0022_STORAGE_TYPE_NOT_SUPPORTED(Object arg0) {
- return messageFactory.getMessage("WSP_0022_STORAGE_TYPE_NOT_SUPPORTED", arg0);
- }
-
- /**
- * WSP0022: Storage type "{0}" is not supported
- *
- */
- public static String WSP_0022_STORAGE_TYPE_NOT_SUPPORTED(Object arg0) {
- return localizer.localize(localizableWSP_0022_STORAGE_TYPE_NOT_SUPPORTED(arg0));
- }
-
- public static Localizable localizableWSP_0095_INVALID_BOOLEAN_VALUE(Object arg0) {
- return messageFactory.getMessage("WSP_0095_INVALID_BOOLEAN_VALUE", arg0);
- }
-
- /**
- * WSP0095: A value of boolean type may have one of the values "true", "false", "1", "0". This value was "{0}".
- *
- */
- public static String WSP_0095_INVALID_BOOLEAN_VALUE(Object arg0) {
- return localizer.localize(localizableWSP_0095_INVALID_BOOLEAN_VALUE(arg0));
- }
-
- public static Localizable localizableWSP_0059_MULTIPLE_ATTRS_WITH_SAME_NAME_DETECTED_FOR_ASSERTION(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_0059_MULTIPLE_ATTRS_WITH_SAME_NAME_DETECTED_FOR_ASSERTION", arg0, arg1);
- }
-
- /**
- * WSP0059: Multiple attributes with the same name "{0}" detected for assertion "{1}"
- *
- */
- public static String WSP_0059_MULTIPLE_ATTRS_WITH_SAME_NAME_DETECTED_FOR_ASSERTION(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_0059_MULTIPLE_ATTRS_WITH_SAME_NAME_DETECTED_FOR_ASSERTION(arg0, arg1));
- }
-
- public static Localizable localizableWSP_0047_POLICY_IS_NULL_RETURNING() {
- return messageFactory.getMessage("WSP_0047_POLICY_IS_NULL_RETURNING");
- }
-
- /**
- * WSP0047: Policy is null, returning
- *
- */
- public static String WSP_0047_POLICY_IS_NULL_RETURNING() {
- return localizer.localize(localizableWSP_0047_POLICY_IS_NULL_RETURNING());
- }
-
- public static Localizable localizableWSP_0088_FAILED_PARSE(Object arg0) {
- return messageFactory.getMessage("WSP_0088_FAILED_PARSE", arg0);
- }
-
- /**
- * WSP0088: Failed to parse XML document at location {0}
- *
- */
- public static String WSP_0088_FAILED_PARSE(Object arg0) {
- return localizer.localize(localizableWSP_0088_FAILED_PARSE(arg0));
- }
-
- public static Localizable localizableWSP_0005_UNEXPECTED_POLICY_ELEMENT_FOUND_IN_ASSERTION_PARAM(Object arg0) {
- return messageFactory.getMessage("WSP_0005_UNEXPECTED_POLICY_ELEMENT_FOUND_IN_ASSERTION_PARAM", arg0);
- }
-
- /**
- * WSP0005: Unexpected nested policy element found in assertion parameter: {0}
- *
- */
- public static String WSP_0005_UNEXPECTED_POLICY_ELEMENT_FOUND_IN_ASSERTION_PARAM(Object arg0) {
- return localizer.localize(localizableWSP_0005_UNEXPECTED_POLICY_ELEMENT_FOUND_IN_ASSERTION_PARAM(arg0));
- }
-
- public static Localizable localizableWSP_0009_UNEXPECTED_CDATA_ON_SOURCE_MODEL_NODE(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_0009_UNEXPECTED_CDATA_ON_SOURCE_MODEL_NODE", arg0, arg1);
- }
-
- /**
- * WSP0009: Unexpected character data on current policy source model node "{0}" : data = "{1}"
- *
- */
- public static String WSP_0009_UNEXPECTED_CDATA_ON_SOURCE_MODEL_NODE(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_0009_UNEXPECTED_CDATA_ON_SOURCE_MODEL_NODE(arg0, arg1));
- }
-
- public static Localizable localizableWSP_0024_SPI_FAIL_SERVICE_URL_LINE_MSG(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("WSP_0024_SPI_FAIL_SERVICE_URL_LINE_MSG", arg0, arg1, arg2);
- }
-
- /**
- * WSP0024: {0}:{1}: {2}
- *
- */
- public static String WSP_0024_SPI_FAIL_SERVICE_URL_LINE_MSG(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSP_0024_SPI_FAIL_SERVICE_URL_LINE_MSG(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSP_0057_N_ALTERNATIVE_COMBINATIONS_M_POLICY_ALTERNATIVES_CREATED(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_0057_N_ALTERNATIVE_COMBINATIONS_M_POLICY_ALTERNATIVES_CREATED", arg0, arg1);
- }
-
- /**
- * WSP0057: {0} policy alternative combinations created: Returning created policy with {1} inequal policy alternatives
- *
- */
- public static String WSP_0057_N_ALTERNATIVE_COMBINATIONS_M_POLICY_ALTERNATIVES_CREATED(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_0057_N_ALTERNATIVE_COMBINATIONS_M_POLICY_ALTERNATIVES_CREATED(arg0, arg1));
- }
-
- public static Localizable localizableWSP_0020_SUBJECT_PARAM_MUST_NOT_BE_NULL() {
- return messageFactory.getMessage("WSP_0020_SUBJECT_PARAM_MUST_NOT_BE_NULL");
- }
-
- /**
- * WSP0020: Parameter subject must not be null
- *
- */
- public static String WSP_0020_SUBJECT_PARAM_MUST_NOT_BE_NULL() {
- return localizer.localize(localizableWSP_0020_SUBJECT_PARAM_MUST_NOT_BE_NULL());
- }
-
- public static Localizable localizableWSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("WSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE", arg0, arg1, arg2);
- }
-
- /**
- * WSP0071: Multiple policy assertion creators try to register for namespace ''{0}''. Old creator`s class: ''{1}'', new creator`s class: ''{2}''.
- *
- */
- public static String WSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSP_0038_POLICY_TO_ATTACH_MUST_NOT_BE_NULL() {
- return messageFactory.getMessage("WSP_0038_POLICY_TO_ATTACH_MUST_NOT_BE_NULL");
- }
-
- /**
- * WSP0038: Policy to be attached must not be null
- *
- */
- public static String WSP_0038_POLICY_TO_ATTACH_MUST_NOT_BE_NULL() {
- return localizer.localize(localizableWSP_0038_POLICY_TO_ATTACH_MUST_NOT_BE_NULL());
- }
-
- public static Localizable localizableWSP_0033_SERVICE_AND_PORT_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_0033_SERVICE_AND_PORT_PARAM_MUST_NOT_BE_NULL", arg0, arg1);
- }
-
- /**
- * WSP0033: Parameters "service" and "port" must not be null. (service={0}, port={1})
- *
- */
- public static String WSP_0033_SERVICE_AND_PORT_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_0033_SERVICE_AND_PORT_PARAM_MUST_NOT_BE_NULL(arg0, arg1));
- }
-
- public static Localizable localizableWSP_0060_POLICY_ELEMENT_TYPE_UNKNOWN(Object arg0) {
- return messageFactory.getMessage("WSP_0060_POLICY_ELEMENT_TYPE_UNKNOWN", arg0);
- }
-
- /**
- * WSP0060: Unknown policy element type "{0}"
- *
- */
- public static String WSP_0060_POLICY_ELEMENT_TYPE_UNKNOWN(Object arg0) {
- return localizer.localize(localizableWSP_0060_POLICY_ELEMENT_TYPE_UNKNOWN(arg0));
- }
-
- public static Localizable localizableWSP_0013_UNABLE_TO_SET_PARENT_MODEL_ON_ROOT() {
- return messageFactory.getMessage("WSP_0013_UNABLE_TO_SET_PARENT_MODEL_ON_ROOT");
- }
-
- /**
- * WSP0013: Unable to set parent model on root model node
- *
- */
- public static String WSP_0013_UNABLE_TO_SET_PARENT_MODEL_ON_ROOT() {
- return localizer.localize(localizableWSP_0013_UNABLE_TO_SET_PARENT_MODEL_ON_ROOT());
- }
-
- public static Localizable localizableWSP_0019_SUBOPTIMAL_ALTERNATIVE_SELECTED(Object arg0) {
- return messageFactory.getMessage("WSP_0019_SUBOPTIMAL_ALTERNATIVE_SELECTED", arg0);
- }
-
- /**
- * WSP0019: Suboptimal policy alternative selected on the client side with fitness "{0}".
- *
- */
- public static String WSP_0019_SUBOPTIMAL_ALTERNATIVE_SELECTED(Object arg0) {
- return localizer.localize(localizableWSP_0019_SUBOPTIMAL_ALTERNATIVE_SELECTED(arg0));
- }
-
- public static Localizable localizableWSP_0073_CREATE_CHILD_NODE_OPERATION_NOT_SUPPORTED(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_0073_CREATE_CHILD_NODE_OPERATION_NOT_SUPPORTED", arg0, arg1);
- }
-
- /**
- * WSP0073: Cannot create child node of type ''{0}'' in the node of type ''{1}''. Create operation is not supported for this combination of node types.
- *
- */
- public static String WSP_0073_CREATE_CHILD_NODE_OPERATION_NOT_SUPPORTED(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_0073_CREATE_CHILD_NODE_OPERATION_NOT_SUPPORTED(arg0, arg1));
- }
-
- public static Localizable localizableWSP_0002_UNRECOGNIZED_SCOPE_TYPE(Object arg0) {
- return messageFactory.getMessage("WSP_0002_UNRECOGNIZED_SCOPE_TYPE", arg0);
- }
-
- /**
- * WSP0002: Unrecoginzed scope type: "{0}"
- *
- */
- public static String WSP_0002_UNRECOGNIZED_SCOPE_TYPE(Object arg0) {
- return localizer.localize(localizableWSP_0002_UNRECOGNIZED_SCOPE_TYPE(arg0));
- }
-
- public static Localizable localizableWSP_0062_INPUT_PARAMS_MUST_NOT_BE_NULL() {
- return messageFactory.getMessage("WSP_0062_INPUT_PARAMS_MUST_NOT_BE_NULL");
- }
-
- /**
- * WSP0062: Input parameters must not be 'null'
- *
- */
- public static String WSP_0062_INPUT_PARAMS_MUST_NOT_BE_NULL() {
- return localizer.localize(localizableWSP_0062_INPUT_PARAMS_MUST_NOT_BE_NULL());
- }
-
- public static Localizable localizableWSP_0063_ERROR_WHILE_CONSTRUCTING_EXCEPTION(Object arg0) {
- return messageFactory.getMessage("WSP_0063_ERROR_WHILE_CONSTRUCTING_EXCEPTION", arg0);
- }
-
- /**
- * WSP0063: Unexpected exception occured while constructing exception of class "{0}".
- *
- */
- public static String WSP_0063_ERROR_WHILE_CONSTRUCTING_EXCEPTION(Object arg0) {
- return localizer.localize(localizableWSP_0063_ERROR_WHILE_CONSTRUCTING_EXCEPTION(arg0));
- }
-
- public static Localizable localizableWSP_0021_SUBJECT_AND_POLICY_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_0021_SUBJECT_AND_POLICY_PARAM_MUST_NOT_BE_NULL", arg0, arg1);
- }
-
- /**
- * WSP0021: Parameters "subject" and "policy" must not be null. (subject={0}, policy={1})
- *
- */
- public static String WSP_0021_SUBJECT_AND_POLICY_PARAM_MUST_NOT_BE_NULL(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_0021_SUBJECT_AND_POLICY_PARAM_MUST_NOT_BE_NULL(arg0, arg1));
- }
-
- public static Localizable localizableWSP_0075_PROBLEMATIC_ASSERTION_STATE(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_0075_PROBLEMATIC_ASSERTION_STATE", arg0, arg1);
- }
-
- /**
- * WSP0075: Policy assertion "{0}" was evaluated as "{1}".
- *
- */
- public static String WSP_0075_PROBLEMATIC_ASSERTION_STATE(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_0075_PROBLEMATIC_ASSERTION_STATE(arg0, arg1));
- }
-
- public static Localizable localizableWSP_0006_UNEXPECTED_MULTIPLE_POLICY_NODES() {
- return messageFactory.getMessage("WSP_0006_UNEXPECTED_MULTIPLE_POLICY_NODES");
- }
-
- /**
- * WSP0006: Unexpected multiple nested policy nodes within a single assertion
- *
- */
- public static String WSP_0006_UNEXPECTED_MULTIPLE_POLICY_NODES() {
- return localizer.localize(localizableWSP_0006_UNEXPECTED_MULTIPLE_POLICY_NODES());
- }
-
- public static Localizable localizableWSP_0092_CHARACTER_DATA_UNEXPECTED(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("WSP_0092_CHARACTER_DATA_UNEXPECTED", arg0, arg1, arg2);
- }
-
- /**
- * WSP0092: Character data in unexpected element {0}, character data = {1}, location = {2}
- *
- */
- public static String WSP_0092_CHARACTER_DATA_UNEXPECTED(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSP_0092_CHARACTER_DATA_UNEXPECTED(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSP_0069_EXCEPTION_WHILE_RETRIEVING_EFFECTIVE_POLICY_FOR_KEY(Object arg0) {
- return messageFactory.getMessage("WSP_0069_EXCEPTION_WHILE_RETRIEVING_EFFECTIVE_POLICY_FOR_KEY", arg0);
- }
-
- /**
- * WSP0069: Exception occured while retrieving effective policy for given key {0}
- *
- */
- public static String WSP_0069_EXCEPTION_WHILE_RETRIEVING_EFFECTIVE_POLICY_FOR_KEY(Object arg0) {
- return localizer.localize(localizableWSP_0069_EXCEPTION_WHILE_RETRIEVING_EFFECTIVE_POLICY_FOR_KEY(arg0));
- }
-
- public static Localizable localizableWSP_0010_UNEXPANDED_POLICY_REFERENCE_NODE_FOUND_REFERENCING(Object arg0) {
- return messageFactory.getMessage("WSP_0010_UNEXPANDED_POLICY_REFERENCE_NODE_FOUND_REFERENCING", arg0);
- }
-
- /**
- * WSP0010: Unexpanded "POLICY_REFERENCE" node found referencing {0}
- *
- */
- public static String WSP_0010_UNEXPANDED_POLICY_REFERENCE_NODE_FOUND_REFERENCING(Object arg0) {
- return localizer.localize(localizableWSP_0010_UNEXPANDED_POLICY_REFERENCE_NODE_FOUND_REFERENCING(arg0));
- }
-
- public static Localizable localizableWSP_0035_RECONFIGURE_ALTERNATIVES(Object arg0) {
- return messageFactory.getMessage("WSP_0035_RECONFIGURE_ALTERNATIVES", arg0);
- }
-
- /**
- * WSP0035: Policy "{0}" contains more than one policy alternative. Please reconfigure the service with only one policy alternative.
- *
- */
- public static String WSP_0035_RECONFIGURE_ALTERNATIVES(Object arg0) {
- return localizer.localize(localizableWSP_0035_RECONFIGURE_ALTERNATIVES(arg0));
- }
-
- public static Localizable localizableWSP_0066_ILLEGAL_PROVIDER_CLASSNAME(Object arg0) {
- return messageFactory.getMessage("WSP_0066_ILLEGAL_PROVIDER_CLASSNAME", arg0);
- }
-
- /**
- * WSP0066: Illegal provider-class name: {0}
- *
- */
- public static String WSP_0066_ILLEGAL_PROVIDER_CLASSNAME(Object arg0) {
- return localizer.localize(localizableWSP_0066_ILLEGAL_PROVIDER_CLASSNAME(arg0));
- }
-
- public static Localizable localizableWSP_0076_NO_SERVICE_PROVIDERS_FOUND(Object arg0) {
- return messageFactory.getMessage("WSP_0076_NO_SERVICE_PROVIDERS_FOUND", arg0);
- }
-
- /**
- * WSP0076: Policy engine could not locate any service providers implementing "{0}" interface. Please, check "META-INF/services" directory in your "webservices-rt.jar".
- *
- */
- public static String WSP_0076_NO_SERVICE_PROVIDERS_FOUND(Object arg0) {
- return localizer.localize(localizableWSP_0076_NO_SERVICE_PROVIDERS_FOUND(arg0));
- }
-
- public static Localizable localizableWSP_0049_PARENT_MODEL_CAN_NOT_BE_CHANGED() {
- return messageFactory.getMessage("WSP_0049_PARENT_MODEL_CAN_NOT_BE_CHANGED");
- }
-
- /**
- * WSP0049: The parent model may not be changed on a child node which is not a root of the policy source model tree
- *
- */
- public static String WSP_0049_PARENT_MODEL_CAN_NOT_BE_CHANGED() {
- return localizer.localize(localizableWSP_0049_PARENT_MODEL_CAN_NOT_BE_CHANGED());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java
deleted file mode 100644
index ad2ad4a6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/MethodUtil.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * 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.policy.privateutil;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Utility class to invoke sun.reflect.misc.MethodUtil.invoke() if available. If not (other then Oracle JDK) fallbacks
- * to java.lang,reflect.Method.invoke()
- */
-class MethodUtil {
-
- private static final Logger LOGGER = Logger.getLogger(MethodUtil.class.getName());
- private static final Method INVOKE_METHOD;
-
- static {
- Method method;
- try {
- Class<?> clazz = Class.forName("sun.reflect.misc.MethodUtil");
- method = clazz.getMethod("invoke", Method.class, Object.class, Object[].class);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil found; it will be used to invoke methods.");
- }
- } catch (Throwable t) {
- method = null;
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Class sun.reflect.misc.MethodUtil not found, probably non-Oracle JVM");
- }
- }
- INVOKE_METHOD = method;
- }
-
- static Object invoke(Object target, Method method, Object[] args) throws IllegalAccessException, InvocationTargetException {
- if (INVOKE_METHOD != null) {
- // sun.reflect.misc.MethodUtil.invoke(method, owner, args)
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Invoking method using sun.reflect.misc.MethodUtil");
- }
- try {
- return INVOKE_METHOD.invoke(null, method, target, args);
- } catch (InvocationTargetException ite) {
- // unwrap invocation exception added by reflection code ...
- throw unwrapException(ite);
- }
- } else {
- // other then Oracle JDK ...
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Invoking method directly, probably non-Oracle JVM");
- }
- return method.invoke(target, args);
- }
- }
-
- private static InvocationTargetException unwrapException(InvocationTargetException ite) {
- Throwable targetException = ite.getTargetException();
- if (targetException != null && targetException instanceof InvocationTargetException) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Unwrapping invocation target exception");
- }
- return (InvocationTargetException) targetException;
- } else {
- return ite;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyLogger.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyLogger.java
deleted file mode 100644
index c04f05b6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyLogger.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.privateutil;
-
-import com.sun.istack.internal.logging.Logger;
-import java.lang.reflect.Field;
-
-/**
- * This is a helper class that provides some conveniece methods wrapped around the
- * standard {@link java.util.logging.Logger} interface.
- *
- * @author Marek Potociar
- * @author Fabian Ritzmann
- */
-public final class PolicyLogger extends Logger {
-
- /**
- * If we run with JAX-WS, we are using its logging domain (appended with ".wspolicy").
- * Otherwise we default to "wspolicy".
- */
- private static final String POLICY_PACKAGE_ROOT = "com.sun.xml.internal.ws.policy";
-
- /**
- * Make sure this class cannot be instantiated by client code.
- *
- * @param policyLoggerName The name of the subsystem to be logged.
- * @param className The fully qualified class name.
- */
- private PolicyLogger(final String policyLoggerName, final String className) {
- super(policyLoggerName, className);
- }
-
- /**
- * The factory method returns preconfigured PolicyLogger wrapper for the class. Since there is no caching implemented,
- * it is advised that the method is called only once per a class in order to initialize a final static logger variable,
- * which is then used through the class to perform actual logging tasks.
- *
- * @param componentClass class of the component that will use the logger instance. Must not be {@code null}.
- * @return logger instance preconfigured for use with the component
- * @throws NullPointerException if the componentClass parameter is {@code null}.
- */
- public static PolicyLogger getLogger(final Class<?> componentClass) {
- final String componentClassName = componentClass.getName();
-
- if (componentClassName.startsWith(POLICY_PACKAGE_ROOT)) {
- return new PolicyLogger(getLoggingSubsystemName() + componentClassName.substring(POLICY_PACKAGE_ROOT.length()),
- componentClassName);
- } else {
- return new PolicyLogger(getLoggingSubsystemName() + "." + componentClassName, componentClassName);
- }
- }
-
- private static String getLoggingSubsystemName() {
- String loggingSubsystemName = "wspolicy";
- try {
- // Looking up JAX-WS class at run-time, so that we don't need to depend
- // on it at compile-time.
- Class jaxwsConstants = Class.forName("com.sun.xml.internal.ws.util.Constants");
- Field loggingDomainField = jaxwsConstants.getField("LoggingDomain");
- Object loggingDomain = loggingDomainField.get(null);
- loggingSubsystemName = loggingDomain.toString().concat(".wspolicy");
- } catch (RuntimeException e) {
- // if we catch an exception, we stick with the default name
- // this catch is redundant but works around a Findbugs warning
- } catch (Exception e) {
- // if we catch an exception, we stick with the default name
- }
- return loggingSubsystemName;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyUtils.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyUtils.java
deleted file mode 100644
index ec537d88..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/PolicyUtils.java
+++ /dev/null
@@ -1,480 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.policy.privateutil;
-
-import com.sun.xml.internal.ws.policy.PolicyException;
-import java.io.Closeable;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Queue;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * This is a wrapper class for various utilities that may be reused within Policy API implementation.
- * The class is not part of public Policy API. Do not use it from your client code!
- *
- * @author Marek Potociar
- */
-public final class PolicyUtils {
- private PolicyUtils() { }
-
- public static class Commons {
- /**
- * Method returns the name of the method that is on the {@code methodIndexInStack}
- * position in the call stack of the current {@link Thread}.
- *
- * @param methodIndexInStack index to the call stack to get the method name for.
- * @return the name of the method that is on the {@code methodIndexInStack}
- * position in the call stack of the current {@link Thread}.
- */
- public static String getStackMethodName(final int methodIndexInStack) {
- final String methodName;
-
- final StackTraceElement[] stack = Thread.currentThread().getStackTrace();
- if (stack.length > methodIndexInStack + 1) {
- methodName = stack[methodIndexInStack].getMethodName();
- } else {
- methodName = "UNKNOWN METHOD";
- }
-
- return methodName;
- }
-
- /**
- * Function returns the name of the caller method for the method executing this
- * function.
- *
- * @return caller method name from the call stack of the current {@link Thread}.
- */
- public static String getCallerMethodName() {
- String result = getStackMethodName(5);
- if (result.equals("invoke0")) {
- // We are likely running on Mac OS X, which returns a shorter stack trace
- result = getStackMethodName(4);
- }
- return result;
- }
- }
-
- public static class IO {
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyUtils.IO.class);
-
- /**
- * If the {@code resource} is not {@code null}, this method will try to close the
- * {@code resource} instance and log warning about any unexpected
- * {@link IOException} that may occur.
- *
- * @param resource resource to be closed
- */
- public static void closeResource(Closeable resource) {
- if (resource != null) {
- try {
- resource.close();
- } catch (IOException e) {
- LOGGER.warning(LocalizationMessages.WSP_0023_UNEXPECTED_ERROR_WHILE_CLOSING_RESOURCE(resource.toString()), e);
- }
- }
- }
-
- /**
- * If the {@code reader} is not {@code null}, this method will try to close the
- * {@code reader} instance and log warning about any unexpected
- * {@link IOException} that may occur.
- *
- * @param reader resource to be closed
- */
- public static void closeResource(XMLStreamReader reader) {
- if (reader != null) {
- try {
- reader.close();
- } catch (XMLStreamException e) {
- LOGGER.warning(LocalizationMessages.WSP_0023_UNEXPECTED_ERROR_WHILE_CLOSING_RESOURCE(reader.toString()), e);
- }
- }
- }
- }
-
- /**
- * Text utilities wrapper.
- */
- public static class Text {
- /**
- * System-specific line separator character retrieved from the Java system property
- * <code>line.separator</code>
- */
- public final static String NEW_LINE = System.getProperty("line.separator");
-
- /**
- * Method creates indent string consisting of as many {@code TAB} characters as specified by {@code indentLevel} parameter
- *
- * @param indentLevel indentation level
- * @return indentation string as specified by indentation level
- *
- */
- public static String createIndent(final int indentLevel) {
- final char[] charData = new char[indentLevel * 4];
- Arrays.fill(charData, ' ');
- return String.valueOf(charData);
- }
- }
-
- public static class Comparison {
- /**
- * The comparator comapres QName objects according to their publicly accessible attributes, in the following
- * order of attributes:
- *
- * 1. namespace (not null String)
- * 2. local name (not null String)
- */
- public static final Comparator<QName> QNAME_COMPARATOR = new Comparator<QName>() {
- public int compare(final QName qn1, final QName qn2) {
- if (qn1 == qn2 || qn1.equals(qn2)) {
- return 0;
- }
-
- int result;
-
- result = qn1.getNamespaceURI().compareTo(qn2.getNamespaceURI());
- if (result != 0) {
- return result;
- }
-
- return qn1.getLocalPart().compareTo(qn2.getLocalPart());
- }
- };
-
- /**
- * Compares two boolean values in the following way: {@code false < true}
- *
- * @return {@code -1} if {@code b1 < b2}, {@code 0} if {@code b1 == b2}, {@code 1} if {@code b1 > b2}
- */
- public static int compareBoolean(final boolean b1, final boolean b2) {
- final int i1 = (b1) ? 1 : 0;
- final int i2 = (b2) ? 1 : 0;
-
- return i1 - i2;
- }
-
- /**
- * Compares two String values, that may possibly be null in the following way: {@code null < "string value"}
- *
- * @return {@code -1} if {@code s1 < s2}, {@code 0} if {@code s1 == s2}, {@code 1} if {@code s1 > s2}
- */
- public static int compareNullableStrings(final String s1, final String s2) {
- return ((s1 == null) ? ((s2 == null) ? 0 : -1) : ((s2 == null) ? 1 : s1.compareTo(s2)));
- }
- }
-
- public static class Collections {
- /**
- * TODO javadocs
- *
- * @param initialBase the combination base that will be present in each combination. May be {@code null} or empty.
- * @param options options that should be combined. May be {@code null} or empty.
- * @param ignoreEmptyOption flag identifies whether empty options should be ignored or whether the method should halt
- * processing and return {@code null} when an empty option is encountered
- * @return TODO
- */
- public static <E, T extends Collection<? extends E>, U extends Collection<? extends E>> Collection<Collection<E>> combine(final U initialBase, final Collection<T> options, final boolean ignoreEmptyOption) {
- List<Collection<E>> combinations = null;
- if (options == null || options.isEmpty()) {
- // no combination creation needed
- if (initialBase != null) {
- combinations = new ArrayList<Collection<E>>(1);
- combinations.add(new ArrayList<E>(initialBase));
- }
- return combinations;
- }
-
- // creating defensive and modifiable copy of the base
- final Collection<E> base = new LinkedList<E>();
- if (initialBase != null && !initialBase.isEmpty()) {
- base.addAll(initialBase);
- }
- /**
- * now we iterate over all options and build up an option processing queue:
- * 1. if ignoreEmptyOption flag is not set and we found an empty option, we are going to stop processing and return null. Otherwise we
- * ignore the empty option.
- * 2. if the option has one child only, we add the child directly to the base.
- * 3. if there are more children in examined node, we add it to the queue for further processing and precoumpute the final size of
- * resulting collection of combinations.
- */
- int finalCombinationsSize = 1;
- final Queue<T> optionProcessingQueue = new LinkedList<T>();
- for (T option : options) {
- final int optionSize = option.size();
-
- if (optionSize == 0) {
- if (!ignoreEmptyOption) {
- return null;
- }
- } else if (optionSize == 1) {
- base.addAll(option);
- } else {
- optionProcessingQueue.offer(option);
- finalCombinationsSize *= optionSize;
- }
- }
-
- // creating final combinations
- combinations = new ArrayList<Collection<E>>(finalCombinationsSize);
- combinations.add(base);
- if (finalCombinationsSize > 1) {
- T processedOption;
- while ((processedOption = optionProcessingQueue.poll()) != null) {
- final int actualSemiCombinationCollectionSize = combinations.size();
- final int newSemiCombinationCollectionSize = actualSemiCombinationCollectionSize * processedOption.size();
-
- int semiCombinationIndex = 0;
- for (E optionElement : processedOption) {
- for (int i = 0; i < actualSemiCombinationCollectionSize; i++) {
- final Collection<E> semiCombination = combinations.get(semiCombinationIndex); // unfinished combination
-
- if (semiCombinationIndex + actualSemiCombinationCollectionSize < newSemiCombinationCollectionSize) {
- // this is not the last optionElement => we create a new combination copy for the next child
- combinations.add(new LinkedList<E>(semiCombination));
- }
-
- semiCombination.add(optionElement);
- semiCombinationIndex++;
- }
- }
- }
- }
- return combinations;
- }
- }
-
- /**
- * Reflection utilities wrapper
- */
- static class Reflection {
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyUtils.Reflection.class);
-
- /**
- * Reflectively invokes specified method on the specified target
- */
- static <T> T invoke(final Object target, final String methodName,
- final Class<T> resultClass, final Object... parameters) throws RuntimePolicyUtilsException {
- Class[] parameterTypes;
- if (parameters != null && parameters.length > 0) {
- parameterTypes = new Class[parameters.length];
- int i = 0;
- for (Object parameter : parameters) {
- parameterTypes[i++] = parameter.getClass();
- }
- } else {
- parameterTypes = null;
- }
-
- return invoke(target, methodName, resultClass, parameters, parameterTypes);
- }
-
- /**
- * Reflectively invokes specified method on the specified target
- */
- public static <T> T invoke(final Object target, final String methodName, final Class<T> resultClass,
- final Object[] parameters, final Class[] parameterTypes) throws RuntimePolicyUtilsException {
- try {
- final Method method = target.getClass().getMethod(methodName, parameterTypes);
- final Object result = MethodUtil.invoke(target, method,parameters);
-
- return resultClass.cast(result);
- } catch (IllegalArgumentException e) {
- throw LOGGER.logSevereException(new RuntimePolicyUtilsException(createExceptionMessage(target, parameters, methodName), e));
- } catch (InvocationTargetException e) {
- throw LOGGER.logSevereException(new RuntimePolicyUtilsException(createExceptionMessage(target, parameters, methodName), e));
- } catch (IllegalAccessException e) {
- throw LOGGER.logSevereException(new RuntimePolicyUtilsException(createExceptionMessage(target, parameters, methodName), e.getCause()));
- } catch (SecurityException e) {
- throw LOGGER.logSevereException(new RuntimePolicyUtilsException(createExceptionMessage(target, parameters, methodName), e));
- } catch (NoSuchMethodException e) {
- throw LOGGER.logSevereException(new RuntimePolicyUtilsException(createExceptionMessage(target, parameters, methodName), e));
- }
- }
-
- private static String createExceptionMessage(final Object target, final Object[] parameters, final String methodName) {
- return LocalizationMessages.WSP_0061_METHOD_INVOCATION_FAILED(target.getClass().getName(), methodName,
- parameters == null ? null : Arrays.asList(parameters).toString());
- }
- }
-
- public static class ConfigFile {
- /**
- * Generates a config file resource name from provided config file identifier.
- * The generated file name can be transformed into a URL instance using
- * {@link #loadFromContext(String, Object)} or {@link #loadFromClasspath(String)}
- * method.
- *
- * @param configFileIdentifier the string used to generate the config file URL that will be parsed. Each WSIT config
- * file is in form of <code>wsit-<i>{configFileIdentifier}</i>.xml</code>. Must not be {@code null}.
- * @return generated config file resource name
- * @throw PolicyException If configFileIdentifier is null.
- */
- public static String generateFullName(final String configFileIdentifier) throws PolicyException {
- if (configFileIdentifier != null) {
- final StringBuffer buffer = new StringBuffer("wsit-");
- buffer.append(configFileIdentifier).append(".xml");
- return buffer.toString();
- } else {
- throw new PolicyException(LocalizationMessages.WSP_0080_IMPLEMENTATION_EXPECTED_NOT_NULL());
- }
- }
-
- /**
- * Returns a URL pointing to the given config file. The file name is
- * looked up as a resource from a ServletContext.
- *
- * May return null if the file can not be found.
- *
- * @param configFileName The name of the file resource
- * @param context A ServletContext object. May not be null.
- */
- public static URL loadFromContext(final String configFileName, final Object context) {
- return Reflection.invoke(context, "getResource", URL.class, configFileName);
- }
-
- /**
- * Returns a URL pointing to the given config file. The file is looked up as
- * a resource on the classpath.
- *
- * May return null if the file can not be found.
- *
- * @param configFileName the name of the file resource. May not be {@code null}.
- */
- public static URL loadFromClasspath(final String configFileName) {
- final ClassLoader cl = Thread.currentThread().getContextClassLoader();
- if (cl == null) {
- return ClassLoader.getSystemResource(configFileName);
- } else {
- return cl.getResource(configFileName);
- }
- }
- }
-
- /**
- * Wrapper for ServiceFinder class which is not part of the Java SE yet.
- */
- public static class ServiceProvider {
- /**
- * Locates and incrementally instantiates the available providers of a
- * given service using the given class loader.
- * <p/>
- * <p> This method transforms the name of the given service class into a
- * provider-configuration filename as described above and then uses the
- * <tt>getResources</tt> method of the given class loader to find all
- * available files with that name. These files are then read and parsed to
- * produce a list of provider-class names. Eventually each provider class is
- * instantiated and array of those instances is returned.
- * <p/>
- * <p> Because it is possible for extensions to be installed into a running
- * Java virtual machine, this method may return different results each time
- * it is invoked. <p>
- *
- * @param serviceClass The service's abstract service class. Must not be {@code null}.
- * @param loader The class loader to be used to load provider-configuration files
- * and instantiate provider classes, or <tt>null</tt> if the system
- * class loader (or, failing that the bootstrap class loader) is to
- * be used
- * @throws NullPointerException in case {@code service} input parameter is {@code null}.
- * @throws ServiceConfigurationError If a provider-configuration file violates the specified format
- * or names a provider class that cannot be found and instantiated
- * @see #load(Class)
- */
- public static <T> T[] load(final Class<T> serviceClass, final ClassLoader loader) {
- return ServiceFinder.find(serviceClass, loader).toArray();
- }
-
- /**
- * Locates and incrementally instantiates the available providers of a
- * given service using the context class loader. This convenience method
- * is equivalent to
- * <p/>
- * <pre>
- * ClassLoader cl = Thread.currentThread().getContextClassLoader();
- * return PolicyUtils.ServiceProvider.load(service, cl);
- * </pre>
- *
- * @param serviceClass The service's abstract service class. Must not be {@code null}.
- *
- * @throws NullPointerException in case {@code service} input parameter is {@code null}.
- * @throws ServiceConfigurationError If a provider-configuration file violates the specified format
- * or names a provider class that cannot be found and instantiated
- * @see #load(Class, ClassLoader)
- */
- public static <T> T[] load(final Class<T> serviceClass) {
- return ServiceFinder.find(serviceClass).toArray();
- }
- }
-
- public static class Rfc2396 {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyUtils.Reflection.class);
-
- // converts "hello%20world" into "hello world"
- public static String unquote(final String quoted) {
- if (null == quoted) {
- return null;
- }
- final byte[] unquoted = new byte[quoted.length()]; // result cannot be longer than original string
- int newLength = 0;
- char c;
- int hi, lo;
- for (int i=0; i < quoted.length(); i++) { // iterarate over all chars in the input
- c = quoted.charAt(i);
- if ('%' == c) { // next escape sequence found
- if ((i + 2) >= quoted.length()) {
- throw LOGGER.logSevereException(new RuntimePolicyUtilsException(LocalizationMessages.WSP_0079_ERROR_WHILE_RFC_2396_UNESCAPING(quoted)), false);
- }
- hi = Character.digit(quoted.charAt(++i), 16);
- lo = Character.digit(quoted.charAt(++i), 16);
- if ((0 > hi) || (0 > lo)) {
- throw LOGGER.logSevereException(new RuntimePolicyUtilsException(LocalizationMessages.WSP_0079_ERROR_WHILE_RFC_2396_UNESCAPING(quoted)), false);
- }
- unquoted[newLength++] = (byte) (hi * 16 + lo);
- } else { // regular character found
- unquoted[newLength++] = (byte) c;
- }
- }
- try {
- return new String(unquoted, 0, newLength, "utf-8");
- } catch (UnsupportedEncodingException uee) {
- throw LOGGER.logSevereException(new RuntimePolicyUtilsException(LocalizationMessages.WSP_0079_ERROR_WHILE_RFC_2396_UNESCAPING(quoted), uee));
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/RuntimePolicyUtilsException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/RuntimePolicyUtilsException.java
deleted file mode 100644
index d5df4b56..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/RuntimePolicyUtilsException.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.privateutil;
-
-/**
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public final class RuntimePolicyUtilsException extends RuntimeException {
-
- RuntimePolicyUtilsException(final String message) {
- super(message);
- }
-
- RuntimePolicyUtilsException(final String message, final Throwable cause) {
- super(message, cause);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/ServiceConfigurationError.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/ServiceConfigurationError.java
deleted file mode 100644
index 12bf3324..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/ServiceConfigurationError.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.privateutil;
-
-/**
- * Error thrown when something goes wrong while looking up service providers.
- * In particular, this error will be thrown in the following situations:
- *
- * <ul>
- * <li> A concrete provider class cannot be found,
- * <li> A concrete provider class cannot be instantiated,
- * <li> The format of a provider-configuration file is illegal, or
- * <li> An IOException occurs while reading a provider-configuration file.
- * </ul>
- *
- * @author Mark Reinhold
- * @version 1.7, 03/12/19
- * @since 1.3
- */
-public class ServiceConfigurationError extends Error {
-
- /**
- * Constructs a new instance with the specified detail string.
- */
- public ServiceConfigurationError(String message) {
- super(message);
- }
-
- /**
- * Constructs a new instance that wraps the specified throwable.
- */
- public ServiceConfigurationError(Throwable throwable) {
- super(throwable);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/ServiceFinder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/ServiceFinder.java
deleted file mode 100644
index 1e6a6b2f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/ServiceFinder.java
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.privateutil;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.lang.reflect.Array;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.TreeSet;
-
-
-/**
- *
- * A simple service-provider lookup mechanism. A <i>service</i> is a
- * well-known set of interfaces and (usually abstract) classes. A <i>service
- * provider</i> is a specific implementation of a service. The classes in a
- * provider typically implement the interfaces and subclass the classes defined
- * in the service itself. Service providers may be installed in an
- * implementation of the Java platform in the form of extensions, that is, jar
- * files placed into any of the usual extension directories. Providers may
- * also be made available by adding them to the applet or application class
- * path or by some other platform-specific means.
- * <p/>
- * <p> In this lookup mechanism a service is represented by an interface or an
- * abstract class. (A concrete class may be used, but this is not
- * recommended.) A provider of a given service contains one or more concrete
- * classes that extend this <i>service class</i> with data and code specific to
- * the provider. This <i>provider class</i> will typically not be the entire
- * provider itself but rather a proxy that contains enough information to
- * decide whether the provider is able to satisfy a particular request together
- * with code that can create the actual provider on demand. The details of
- * provider classes tend to be highly service-specific; no single class or
- * interface could possibly unify them, so no such class has been defined. The
- * only requirement enforced here is that provider classes must have a
- * zero-argument constructor so that they may be instantiated during lookup.
- * <p/>
- * <p> A service provider identifies itself by placing a provider-configuration
- * file in the resource directory <tt>META-INF/services</tt>. The file's name
- * should consist of the fully-qualified name of the abstract service class.
- * The file should contain a list of fully-qualified concrete provider-class
- * names, one per line. Space and tab characters surrounding each name, as
- * well as blank lines, are ignored. The comment character is <tt>'#'</tt>
- * (<tt>0x23</tt>); on each line all characters following the first comment
- * character are ignored. The file must be encoded in UTF-8.
- * <p/>
- * <p> If a particular concrete provider class is named in more than one
- * configuration file, or is named in the same configuration file more than
- * once, then the duplicates will be ignored. The configuration file naming a
- * particular provider need not be in the same jar file or other distribution
- * unit as the provider itself. The provider must be accessible from the same
- * class loader that was initially queried to locate the configuration file;
- * note that this is not necessarily the class loader that found the file.
- * <p/>
- * <p> <b>Example:</b> Suppose we have a service class named
- * <tt>java.io.spi.CharCodec</tt>. It has two abstract methods:
- * <p/>
- * <pre>
- * public abstract CharEncoder getEncoder(String encodingName);
- * public abstract CharDecoder getDecoder(String encodingName);
- * </pre>
- * <p/>
- * Each method returns an appropriate object or <tt>null</tt> if it cannot
- * translate the given encoding. Typical <tt>CharCodec</tt> providers will
- * support more than one encoding.
- * <p/>
- * <p> If <tt>sun.io.StandardCodec</tt> is a provider of the <tt>CharCodec</tt>
- * service then its jar file would contain the file
- * <tt>META-INF/services/java.io.spi.CharCodec</tt>. This file would contain
- * the single line:
- * <p/>
- * <pre>
- * sun.io.StandardCodec # Standard codecs for the platform
- * </pre>
- * <p/>
- * To locate an encoder for a given encoding name, the internal I/O code would
- * do something like this:
- * <p/>
- * <pre>
- * CharEncoder getEncoder(String encodingName) {
- * for( CharCodec cc : ServiceFinder.find(CharCodec.class) ) {
- * CharEncoder ce = cc.getEncoder(encodingName);
- * if (ce != null)
- * return ce;
- * }
- * return null;
- * }
- * </pre>
- * <p/>
- * The provider-lookup mechanism always executes in the security context of the
- * caller. Trusted system code should typically invoke the methods in this
- * class from within a privileged security context.
- *
- * @author Mark Reinhold
- * @version 1.11, 03/12/19
- * @since 1.3
- */
-final class ServiceFinder<T> implements Iterable<T> {
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(ServiceFinder.class);
-
- private static final String prefix = "META-INF/services/";
-
- private final Class<T> serviceClass;
- private final ClassLoader classLoader;
-
- /**
- * Locates and incrementally instantiates the available providers of a
- * given service using the given class loader.
- * <p/>
- * <p> This method transforms the name of the given service class into a
- * provider-configuration filename as described above and then uses the
- * <tt>getResources</tt> method of the given class loader to find all
- * available files with that name. These files are then read and parsed to
- * produce a list of provider-class names. The iterator that is returned
- * uses the given class loader to lookup and then instantiate each element
- * of the list.
- * <p/>
- * <p> Because it is possible for extensions to be installed into a running
- * Java virtual machine, this method may return different results each time
- * it is invoked. <p>
- *
- * @param service The service's abstract service class
- * @param loader The class loader to be used to load provider-configuration files
- * and instantiate provider classes, or <tt>null</tt> if the system
- * class loader (or, failing that the bootstrap class loader) is to
- * be used
- * @throws ServiceConfigurationError If a provider-configuration file violates the specified format
- * or names a provider class that cannot be found and instantiated
- * @see #find(Class)
- */
- static <T> ServiceFinder<T> find(final Class<T> service, final ClassLoader loader) {
- if (null==service) {
- throw LOGGER.logSevereException(new NullPointerException(LocalizationMessages.WSP_0032_SERVICE_CAN_NOT_BE_NULL()));
- }
- return new ServiceFinder<T>(service,loader);
- }
-
- /**
- * Locates and incrementally instantiates the available providers of a
- * given service using the context class loader. This convenience method
- * is equivalent to
- * <p/>
- * <pre>
- * ClassLoader cl = Thread.currentThread().getContextClassLoader();
- * return Service.providers(service, cl);
- * </pre>
- *
- * @param service The service's abstract service class
- *
- * @throws ServiceConfigurationError If a provider-configuration file violates the specified format
- * or names a provider class that cannot be found and instantiated
- * @see #find(Class, ClassLoader)
- */
- public static <T> ServiceFinder<T> find(final Class<T> service) {
- return find(service,Thread.currentThread().getContextClassLoader());
- }
-
- private ServiceFinder(Class<T> service, ClassLoader loader) {
- this.serviceClass = service;
- this.classLoader = loader;
- }
-
- /**
- * Returns discovered objects incrementally.
- *
- * @return An <tt>Iterator</tt> that yields provider objects for the given
- * service, in some arbitrary order. The iterator will throw a
- * <tt>ServiceConfigurationError</tt> if a provider-configuration
- * file violates the specified format or if a provider class cannot
- * be found and instantiated.
- */
- public Iterator<T> iterator() {
- return new LazyIterator<T>(serviceClass,classLoader);
- }
-
- /**
- * Returns discovered objects all at once.
- *
- * @return
- * can be empty but never null.
- *
- * @throws ServiceConfigurationError
- */
- @SuppressWarnings({"unchecked"})
- public T[] toArray() {
- List<T> result = new ArrayList<T>();
- for (T t : this) {
- result.add(t);
- }
- return result.toArray((T[])Array.newInstance(serviceClass,result.size()));
- }
-
- private static void fail(final Class service, final String msg, final Throwable cause)
- throws ServiceConfigurationError {
- final ServiceConfigurationError sce
- = new ServiceConfigurationError(LocalizationMessages.WSP_0025_SPI_FAIL_SERVICE_MSG(service.getName(), msg));
- if (null != cause) {
- sce.initCause(cause);
- }
-
- throw LOGGER.logSevereException(sce);
- }
-
-/* private static void fail(Class service, String msg)
- throws ServiceConfigurationError {
- throw new ServiceConfigurationError(LocalizationMessages.WSP_0025_SPI_FAIL_SERVICE_MSG(service.getName(), msg));
- }*/
-
- private static void fail(final Class service, final URL u, final int line, final String msg, final Throwable cause)
- throws ServiceConfigurationError {
- fail(service, LocalizationMessages.WSP_0024_SPI_FAIL_SERVICE_URL_LINE_MSG(u , line, msg), cause);
- }
-
- /**
- * Parse a single line from the given configuration file, adding the name
- * on the line to both the names list and the returned set iff the name is
- * not already a member of the returned set.
- */
- private static int parseLine(final Class service, final URL u, final BufferedReader r, final int lc,
- final List<String> names, final Set<String> returned)
- throws IOException, ServiceConfigurationError {
- String ln = r.readLine();
- if (ln == null) {
- return -1;
- }
- final int ci = ln.indexOf('#');
- if (ci >= 0) ln = ln.substring(0, ci);
- ln = ln.trim();
- final int n = ln.length();
- if (n != 0) {
- if ((ln.indexOf(' ') >= 0) || (ln.indexOf('\t') >= 0))
- fail(service, u, lc, LocalizationMessages.WSP_0067_ILLEGAL_CFG_FILE_SYNTAX(), null);
- int cp = ln.codePointAt(0);
- if (!Character.isJavaIdentifierStart(cp))
- fail(service, u, lc, LocalizationMessages.WSP_0066_ILLEGAL_PROVIDER_CLASSNAME(ln), null);
- for (int i = Character.charCount(cp); i < n; i += Character.charCount(cp)) {
- cp = ln.codePointAt(i);
- if (!Character.isJavaIdentifierPart(cp) && (cp != '.'))
- fail(service, u, lc, LocalizationMessages.WSP_0066_ILLEGAL_PROVIDER_CLASSNAME(ln), null);
- }
- if (!returned.contains(ln)) {
- names.add(ln);
- returned.add(ln);
- }
- }
- return lc + 1;
- }
-
- /**
- * Parse the content of the given URL as a provider-configuration file.
- *
- * @param service The service class for which providers are being sought;
- * used to construct error detail strings
- * @param u The URL naming the configuration file to be parsed
- * @param returned A Set containing the names of provider classes that have already
- * been returned. This set will be updated to contain the names
- * that will be yielded from the returned <tt>Iterator</tt>.
- * @return A (possibly empty) <tt>Iterator</tt> that will yield the
- * provider-class names in the given configuration file that are
- * not yet members of the returned set
- * @throws ServiceConfigurationError If an I/O error occurs while reading from the given URL, or
- * if a configuration-file format error is detected
- */
- @SuppressWarnings({"StatementWithEmptyBody"})
- private static Iterator<String> parse(Class service, URL u, Set<String> returned)
- throws ServiceConfigurationError {
- InputStream in = null;
- BufferedReader r = null;
- ArrayList<String> names = new ArrayList<String>();
- try {
- in = u.openStream();
- r = new BufferedReader(new InputStreamReader(in, "utf-8"));
- int lc = 1;
- while ((lc = parseLine(service, u, r, lc, names, returned)) >= 0) ;
- } catch (IOException x) {
- fail(service, ": " + x, x);
- } finally {
- try {
- if (r != null) r.close();
- if (in != null) in.close();
- } catch (IOException y) {
- fail(service, ": " + y, y);
- }
- }
- return names.iterator();
- }
-
-
- /**
- * Private inner class implementing fully-lazy provider lookup
- */
- private static class LazyIterator<T> implements Iterator<T> {
- Class<T> service;
- ClassLoader loader;
- Enumeration<URL> configs = null;
- Iterator<String> pending = null;
- Set<String> returned = new TreeSet<String>();
- String nextName = null;
-
- private LazyIterator(Class<T> service, ClassLoader loader) {
- this.service = service;
- this.loader = loader;
- }
-
- public boolean hasNext() throws ServiceConfigurationError {
- if (nextName != null) {
- return true;
- }
- if (configs == null) {
- try {
- final String fullName = prefix + service.getName();
- if (loader == null)
- configs = ClassLoader.getSystemResources(fullName);
- else
- configs = loader.getResources(fullName);
- } catch (IOException x) {
- fail(service, ": " + x, x);
- }
- }
- while ((pending == null) || !pending.hasNext()) {
- if (!configs.hasMoreElements()) {
- return false;
- }
- pending = parse(service, configs.nextElement(), returned);
- }
- nextName = pending.next();
- return true;
- }
-
- public T next() throws ServiceConfigurationError {
- if (!hasNext()) {
- throw new NoSuchElementException();
- }
- final String cn = nextName;
- nextName = null;
- try {
- return service.cast(Class.forName(cn, true, loader).newInstance());
- } catch (ClassNotFoundException x) {
- fail(service, LocalizationMessages.WSP_0027_SERVICE_PROVIDER_NOT_FOUND(cn), x);
- } catch (Exception x) {
- fail(service, LocalizationMessages.WSP_0028_SERVICE_PROVIDER_COULD_NOT_BE_INSTANTIATED(cn), x);
- }
- return null; /* This cannot happen */
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/package-info.java
deleted file mode 100644
index 1bec65ca..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/privateutil/package-info.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * This package contains utility classes that are not part of the public Policy API. None of the classes contained in this
- * package should be used outside the Policy API implementation. The creators of the Policy API will not provide any support
- * concerning usage of the classes in this package. I should be also clear that any method signatures, classes and interfaces
- * may be changed or even removed without a prior notice.
- * <p/>
- * To put it simple: <b>Do not use classes in this package, unless you are member of the WS policy implementation team!!!</b>
- */
-package com.sun.xml.internal.ws.policy.privateutil;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/AssertionData.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/AssertionData.java
deleted file mode 100644
index 26852d70..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/AssertionData.java
+++ /dev/null
@@ -1,429 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel;
-
-import com.sun.xml.internal.ws.policy.PolicyConstants;
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import javax.xml.namespace.QName;
-
-/**
- * Wrapper class for possible data that each "assertion" and "assertion parameter content" policy source model node may
- * have attached.
- * <p/>
- * This data, when stored in an 'assertion' model node, is intended to be used as input parameter when creating
- * {@link com.sun.xml.internal.ws.policy.PolicyAssertion} objects via {@link com.sun.xml.internal.ws.policy.spi.PolicyAssertionCreator}
- * implementations.
- *
- * @author Marek Potociar (marek.potociar@sun.com)
- * @author Fabian Ritzmann
- */
-public final class AssertionData implements Cloneable, Serializable {
- private static final long serialVersionUID = 4416256070795526315L;
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(AssertionData.class);
-
- private final QName name;
- private final String value;
- private final Map<QName, String> attributes;
- private ModelNode.Type type;
-
- private boolean optional;
- private boolean ignorable;
-
- /**
- * Constructs assertion data wrapper instance for an assertion that does not
- * contain any value nor any attributes.
- *
- * @param name the FQN of the assertion
- *
- * @throws IllegalArgumentException in case the {@code type} parameter is not
- * {@link ModelNode.Type#ASSERTION ASSERTION} or
- * {@link ModelNode.Type#ASSERTION_PARAMETER_NODE ASSERTION_PARAMETER_NODE}
- */
- public static AssertionData createAssertionData(final QName name) throws IllegalArgumentException {
- return new AssertionData(name, null, null, ModelNode.Type.ASSERTION, false, false);
- }
-
- /**
- * Constructs assertion data wrapper instance for an assertion parameter that
- * does not contain any value nor any attributes.
- *
- * @param name the FQN of the assertion parameter
- *
- * @throws IllegalArgumentException in case the {@code type} parameter is not
- * {@link ModelNode.Type#ASSERTION ASSERTION} or
- * {@link ModelNode.Type#ASSERTION_PARAMETER_NODE ASSERTION_PARAMETER_NODE}
- */
- public static AssertionData createAssertionParameterData(final QName name) throws IllegalArgumentException {
- return new AssertionData(name, null, null, ModelNode.Type.ASSERTION_PARAMETER_NODE, false, false);
- }
-
- /**
- * Constructs assertion data wrapper instance for an assertion that does
- * contain a value or attributes.
- *
- * @param name the FQN of the assertion
- * @param value a {@link String} representation of model node value
- * @param attributes map of model node's &lt;attribute name, attribute value&gt; pairs
- * @param optional flag indicating whether the assertion is optional or not
- * @param ignorable flag indicating whether the assertion is ignorable or not
- *
- * @throws IllegalArgumentException in case the {@code type} parameter is not
- * {@link ModelNode.Type#ASSERTION ASSERTION} or
- * {@link ModelNode.Type#ASSERTION_PARAMETER_NODE ASSERTION_PARAMETER_NODE}
- */
- public static AssertionData createAssertionData(final QName name, final String value, final Map<QName, String> attributes, boolean optional, boolean ignorable) throws IllegalArgumentException {
- return new AssertionData(name, value, attributes, ModelNode.Type.ASSERTION, optional, ignorable);
- }
-
- /**
- * Constructs assertion data wrapper instance for an assertion parameter that
- * contains a value or attributes
- *
- * @param name the FQN of the assertion parameter
- * @param value a {@link String} representation of model node value
- * @param attributes map of model node's &lt;attribute name, attribute value&gt; pairs
- *
- * @throws IllegalArgumentException in case the {@code type} parameter is not
- * {@link ModelNode.Type#ASSERTION ASSERTION} or
- * {@link ModelNode.Type#ASSERTION_PARAMETER_NODE ASSERTION_PARAMETER_NODE}
- */
- public static AssertionData createAssertionParameterData(final QName name, final String value, final Map<QName, String> attributes) throws IllegalArgumentException {
- return new AssertionData(name, value, attributes, ModelNode.Type.ASSERTION_PARAMETER_NODE, false, false);
- }
-
- /**
- * Constructs assertion data wrapper instance for an assertion or assertion parameter that contains a value or
- * some attributes. Whether the data wrapper is constructed for assertion or assertion parameter node is distinguished by
- * the supplied {@code type} parameter.
- *
- * @param name the FQN of the assertion or assertion parameter
- * @param value a {@link String} representation of model node value
- * @param attributes map of model node's &lt;attribute name, attribute value&gt; pairs
- * @param type specifies whether the data will belong to the assertion or assertion parameter node. This is
- * a workaround solution that allows us to transfer this information about the owner node to
- * a policy assertion instance factory without actualy having to touch the {@link PolicyAssertionCreator}
- * interface and protected {@link PolicyAssertion} constructors.
- *
- * @throws IllegalArgumentException in case the {@code type} parameter is not
- * {@link ModelNode.Type#ASSERTION ASSERTION} or
- * {@link ModelNode.Type#ASSERTION_PARAMETER_NODE ASSERTION_PARAMETER_NODE}
- */
- AssertionData(QName name, String value, Map<QName, String> attributes, ModelNode.Type type, boolean optional, boolean ignorable) throws IllegalArgumentException {
- this.name = name;
- this.value = value;
- this.optional = optional;
- this.ignorable = ignorable;
-
- this.attributes = new HashMap<QName, String>();
- if (attributes != null && !attributes.isEmpty()) {
- this.attributes.putAll(attributes);
- }
- setModelNodeType(type);
- }
-
- private void setModelNodeType(final ModelNode.Type type) throws IllegalArgumentException {
- if (type == ModelNode.Type.ASSERTION || type == ModelNode.Type.ASSERTION_PARAMETER_NODE) {
- this.type = type;
- } else {
- throw LOGGER.logSevereException(new IllegalArgumentException(
- LocalizationMessages.WSP_0074_CANNOT_CREATE_ASSERTION_BAD_TYPE(type, ModelNode.Type.ASSERTION, ModelNode.Type.ASSERTION_PARAMETER_NODE)));
- }
- }
-
- /**
- * Copy constructor.
- *
- * @param data The instance that is to be copied.
- */
- AssertionData(final AssertionData data) {
- this.name = data.name;
- this.value = data.value;
- this.attributes = new HashMap<QName, String>();
- if (!data.attributes.isEmpty()) {
- this.attributes.putAll(data.attributes);
- }
- this.type = data.type;
- }
-
- @Override
- protected AssertionData clone() throws CloneNotSupportedException {
- return (AssertionData) super.clone();
- }
-
- /**
- * Returns true if the given attribute exists, false otherwise.
- *
- * @param name The name of the attribute. Must not be null.
- * @return True if the given attribute exists, false otherwise.
- */
- public boolean containsAttribute(final QName name) {
- synchronized (attributes) {
- return attributes.containsKey(name);
- }
- }
-
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj) {
- return true;
- }
-
- if (!(obj instanceof AssertionData)) {
- return false;
- }
-
- boolean result = true;
- final AssertionData that = (AssertionData) obj;
-
- result = result && this.name.equals(that.name);
- result = result && ((this.value == null) ? that.value == null : this.value.equals(that.value));
- synchronized (attributes) {
- result = result && this.attributes.equals(that.attributes);
- }
-
- return result;
- }
-
-
- /**
- * Returns the value of the given attribute. Returns null if the attribute
- * does not exist.
- *
- * @param name The name of the attribute. Must not be null.
- * @return The value of the given attribute. Returns null if the attribute
- * does not exist.
- */
- public String getAttributeValue(final QName name) {
- synchronized (attributes) {
- return attributes.get(name);
- }
- }
-
-
- /**
- * Returns the disconnected map of attributes attached to the assertion.
- * <p/>
- * 'Disconnected' means, that the result of this method will not be synchronized with any consequent assertion's attribute modification. It is
- * also important to notice that a manipulation with returned set of attributes will not have any effect on the actual assertion's
- * attributes.
- *
- * @return disconnected map of attributes attached to the assertion.
- */
- public Map<QName, String> getAttributes() {
- synchronized (attributes) {
- return new HashMap<QName, String>(attributes);
- }
- }
-
-
- /**
- * Returns the disconnected set of attributes attached to the assertion. Each attribute is represented as a single
- * {@code Map.Entry<attributeName, attributeValue>} element.
- * <p/>
- * 'Disconnected' means, that the result of this method will not be synchronized with any consequent assertion's attribute modification. It is
- * also important to notice that a manipulation with returned set of attributes will not have any effect on the actual assertion's
- * attributes.
- *
- * @return disconnected set of attributes attached to the assertion.
- */
- public Set<Map.Entry<QName, String>> getAttributesSet() {
- synchronized (attributes) {
- return new HashSet<Map.Entry<QName, String>>(attributes.entrySet());
- }
- }
-
-
- /**
- * Returns the name of the assertion.
- *
- * @return assertion's name
- */
- public QName getName() {
- return name;
- }
-
-
- /**
- * Returns the value of the assertion.
- *
- * @return assertion's value
- */
- public String getValue() {
- return value;
- }
-
-
- /**
- * An {@code Object.hashCode()} method override.
- */
- @Override
- public int hashCode() {
- int result = 17;
-
- result = 37 * result + this.name.hashCode();
- result = 37 * result + ((this.value == null) ? 0 : this.value.hashCode());
- synchronized (attributes) {
- result = 37 * result + this.attributes.hashCode();
- }
- return result;
- }
-
-
- /**
- * Method specifies whether the assertion data contain proprietary visibility element set to "private" value.
- *
- * @return {@code 'true'} if the attribute is present and set properly (i.e. the node containing this assertion data instance should
- * not be marshaled into generated WSDL documents). Returns {@code false} otherwise.
- */
- public boolean isPrivateAttributeSet() {
- return PolicyConstants.VISIBILITY_VALUE_PRIVATE.equals(getAttributeValue(PolicyConstants.VISIBILITY_ATTRIBUTE));
- }
-
- /**
- * Removes the given attribute from the assertion data.
- *
- * @param name The name of the attribute. Must not be null
- * @return The value of the removed attribute.
- */
- public String removeAttribute(final QName name) {
- synchronized (attributes) {
- return attributes.remove(name);
- }
- }
-
- /**
- * Adds or overwrites an attribute.
- *
- * @param name The name of the attribute.
- * @param value The value of the attribute.
- */
- public void setAttribute(final QName name, final String value) {
- synchronized (attributes) {
- attributes.put(name, value);
- }
- }
-
- /**
- * Sets the optional attribute.
- *
- * @param value The value of the optional attribute.
- */
- public void setOptionalAttribute(final boolean value) {
- optional = value;
- }
-
- /**
- * Tests if the optional attribute is set.
- *
- * @return True if optional is set and is true. False otherwise.
- */
- public boolean isOptionalAttributeSet() {
- return optional;
- }
-
- /**
- * Sets the ignorable attribute.
- *
- * @param value The value of the ignorable attribute.
- */
- public void setIgnorableAttribute(final boolean value) {
- ignorable = value;
- }
-
- /**
- * Tests if the ignorable attribute is set.
- *
- * @return True if ignorable is set and is true. False otherwise.
- */
- public boolean isIgnorableAttributeSet() {
- return ignorable;
- }
-
- @Override
- public String toString() {
- return toString(0, new StringBuffer()).toString();
- }
-
- /**
- * A helper method that appends indented string representation of this instance to the input string buffer.
- *
- * @param indentLevel indentation level to be used.
- * @param buffer buffer to be used for appending string representation of this instance
- * @return modified buffer containing new string representation of the instance
- */
- public StringBuffer toString(final int indentLevel, final StringBuffer buffer) {
- final String indent = PolicyUtils.Text.createIndent(indentLevel);
- final String innerIndent = PolicyUtils.Text.createIndent(indentLevel + 1);
- final String innerDoubleIndent = PolicyUtils.Text.createIndent(indentLevel + 2);
-
- buffer.append(indent);
- if (type == ModelNode.Type.ASSERTION) {
- buffer.append("assertion data {");
- } else {
- buffer.append("assertion parameter data {");
- }
- buffer.append(PolicyUtils.Text.NEW_LINE);
-
- buffer.append(innerIndent).append("namespace = '").append(name.getNamespaceURI()).append('\'').append(PolicyUtils.Text.NEW_LINE);
- buffer.append(innerIndent).append("prefix = '").append(name.getPrefix()).append('\'').append(PolicyUtils.Text.NEW_LINE);
- buffer.append(innerIndent).append("local name = '").append(name.getLocalPart()).append('\'').append(PolicyUtils.Text.NEW_LINE);
- buffer.append(innerIndent).append("value = '").append(value).append('\'').append(PolicyUtils.Text.NEW_LINE);
- buffer.append(innerIndent).append("optional = '").append(optional).append('\'').append(PolicyUtils.Text.NEW_LINE);
- buffer.append(innerIndent).append("ignorable = '").append(ignorable).append('\'').append(PolicyUtils.Text.NEW_LINE);
- synchronized (attributes) {
- if (attributes.isEmpty()) {
- buffer.append(innerIndent).append("no attributes");
- } else {
-
- buffer.append(innerIndent).append("attributes {").append(PolicyUtils.Text.NEW_LINE);
- for(Map.Entry<QName, String> entry : attributes.entrySet()) {
- final QName aName = entry.getKey();
- buffer.append(innerDoubleIndent).append("name = '").append(aName.getNamespaceURI()).append(':').append(aName.getLocalPart());
- buffer.append("', value = '").append(entry.getValue()).append('\'').append(PolicyUtils.Text.NEW_LINE);
- }
- buffer.append(innerIndent).append('}');
- }
- }
-
- buffer.append(PolicyUtils.Text.NEW_LINE).append(indent).append('}');
-
- return buffer;
- }
-
- public ModelNode.Type getNodeType() {
- return type;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/CompactModelGenerator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/CompactModelGenerator.java
deleted file mode 100644
index f5af189d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/CompactModelGenerator.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel;
-
-import com.sun.xml.internal.ws.policy.AssertionSet;
-import com.sun.xml.internal.ws.policy.NestedPolicy;
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-
-/**
- * Create a compact WS-Policy infoset. ExactlyOne and All elements are omitted
- * where possible.
- *
- * @author Fabian Ritzmann
- */
-class CompactModelGenerator extends PolicyModelGenerator {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(CompactModelGenerator.class);
-
- private final PolicySourceModelCreator sourceModelCreator;
-
-
- CompactModelGenerator(PolicySourceModelCreator sourceModelCreator) {
- this.sourceModelCreator = sourceModelCreator;
- }
-
- @Override
- public PolicySourceModel translate(final Policy policy) throws PolicyException {
- LOGGER.entering(policy);
-
- PolicySourceModel model = null;
-
- if (policy == null) {
- LOGGER.fine(LocalizationMessages.WSP_0047_POLICY_IS_NULL_RETURNING());
- } else {
- model = this.sourceModelCreator.create(policy);
- ModelNode rootNode = model.getRootNode();
- final int numberOfAssertionSets = policy.getNumberOfAssertionSets();
- if (numberOfAssertionSets > 1) {
- rootNode = rootNode.createChildExactlyOneNode();
- }
- ModelNode alternativeNode = rootNode;
- for (AssertionSet set : policy) {
- if (numberOfAssertionSets > 1) {
- alternativeNode = rootNode.createChildAllNode();
- }
- for (PolicyAssertion assertion : set) {
- final AssertionData data = AssertionData.createAssertionData(assertion.getName(), assertion.getValue(), assertion.getAttributes(), assertion.isOptional(), assertion.isIgnorable());
- final ModelNode assertionNode = alternativeNode.createChildAssertionNode(data);
- if (assertion.hasNestedPolicy()) {
- translate(assertionNode, assertion.getNestedPolicy());
- }
- if (assertion.hasParameters()) {
- translate(assertionNode, assertion.getParametersIterator());
- }
- }
- }
- }
-
- LOGGER.exiting(model);
- return model;
- }
-
- @Override
- protected ModelNode translate(final ModelNode parentAssertion, final NestedPolicy policy) {
- final ModelNode nestedPolicyRoot = parentAssertion.createChildPolicyNode();
- final AssertionSet set = policy.getAssertionSet();
- translate(nestedPolicyRoot, set);
- return nestedPolicyRoot;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/DefaultPolicyAssertionCreator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/DefaultPolicyAssertionCreator.java
deleted file mode 100644
index b29961fc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/DefaultPolicyAssertionCreator.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel;
-
-import com.sun.xml.internal.ws.policy.*;
-import com.sun.xml.internal.ws.policy.spi.AssertionCreationException;
-import com.sun.xml.internal.ws.policy.spi.PolicyAssertionCreator;
-import java.util.Collection;
-
-/**
- * Default implementation of a policy assertion creator. This implementation is used to create policy assertions in case
- * no domain specific policy assertion creator is registered for the namespace of the policy assertion.
- *
- * This is the only PolicyAssertionCreator implementation that is allowed to break general contract, claiming that
- * {@code getSupportedDomainNamespaceUri()} must not return empty String without causing PolicyAssertionCreator registration
- * fail.
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-class DefaultPolicyAssertionCreator implements PolicyAssertionCreator {
- private static final class DefaultPolicyAssertion extends PolicyAssertion {
- DefaultPolicyAssertion(AssertionData data, Collection<PolicyAssertion> assertionParameters, AssertionSet nestedAlternative) {
- super (data, assertionParameters, nestedAlternative);
- }
- }
-
- /**
- * Creates a new instance of DefaultPolicyAssertionCreator
- */
- DefaultPolicyAssertionCreator() {
- // nothing to initialize
- }
-
- /**
- * See {@link PolicyAssertionCreator#getSupportedDomainNamespaceURIs() method documentation in interface}
- */
- public String[] getSupportedDomainNamespaceURIs() {
- return null;
- }
-
- /**
- * See {@link PolicyAssertionCreator#createAssertion(AssertionData, Collection, AssertionSet, PolicyAssertionCreator) method documentation in interface}
- */
- public PolicyAssertion createAssertion(final AssertionData data, final Collection<PolicyAssertion> assertionParameters, final AssertionSet nestedAlternative, final PolicyAssertionCreator defaultCreator) throws AssertionCreationException {
- return new DefaultPolicyAssertion(data, assertionParameters, nestedAlternative);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/ModelNode.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/ModelNode.java
deleted file mode 100644
index 70181356..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/ModelNode.java
+++ /dev/null
@@ -1,596 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel;
-
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.XmlToken;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-/**
- * The general representation of a single node within a {@link com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel} instance.
- * The model node is created via factory methods of the {@link com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel} instance.
- * It may also hold {@link com.sun.xml.internal.ws.policy.sourcemodel.AssertionData} instance in case its type is {@code ModelNode.Type.ASSERTION}.
- *
- * @author Marek Potociar
- */
-public final class ModelNode implements Iterable<ModelNode>, Cloneable {
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(ModelNode.class);
-
- /**
- * Policy source model node type enumeration
- */
- public static enum Type {
- POLICY(XmlToken.Policy),
- ALL(XmlToken.All),
- EXACTLY_ONE(XmlToken.ExactlyOne),
- POLICY_REFERENCE(XmlToken.PolicyReference),
- ASSERTION(XmlToken.UNKNOWN),
- ASSERTION_PARAMETER_NODE(XmlToken.UNKNOWN);
-
- private XmlToken token;
-
- Type(XmlToken token) {
- this.token = token;
- }
-
- public XmlToken getXmlToken() {
- return token;
- }
-
- /**
- * Method checks the PSM state machine if the creation of new child of given type is plausible for a node element
- * with type set to this type instance.
- *
- * @param childType The type.
- * @return True if the type is supported, false otherwise
- */
- private boolean isChildTypeSupported(final Type childType) {
- switch (this) {
- case POLICY:
- case ALL:
- case EXACTLY_ONE:
- switch (childType) {
- case ASSERTION_PARAMETER_NODE:
- return false;
- default:
- return true;
- }
- case POLICY_REFERENCE:
- return false;
- case ASSERTION:
- switch (childType) {
- case POLICY:
- case POLICY_REFERENCE:
- case ASSERTION_PARAMETER_NODE:
- return true;
- default:
- return false;
- }
- case ASSERTION_PARAMETER_NODE:
- switch (childType) {
- case ASSERTION_PARAMETER_NODE:
- return true;
- default:
- return false;
- }
- default:
- throw LOGGER.logSevereException(new IllegalStateException(
- LocalizationMessages.WSP_0060_POLICY_ELEMENT_TYPE_UNKNOWN(this)));
- }
- }
- }
-
- // comon model node attributes
- private LinkedList<ModelNode> children;
- private Collection<ModelNode> unmodifiableViewOnContent;
- private final ModelNode.Type type;
- private ModelNode parentNode;
- private PolicySourceModel parentModel;
-
- // attributes used only in 'POLICY_REFERENCE' model node
- private PolicyReferenceData referenceData;
- private PolicySourceModel referencedModel;
-
- // attibutes used only in 'ASSERTION' or 'ASSERTION_PARAMETER_NODE' model node
- private AssertionData nodeData;
-
- /**
- * The factory method creates and initializes the POLICY model node and sets it's parent model reference to point to
- * the model supplied as an input parameter. This method is intended to be used ONLY from {@link PolicySourceModel} during
- * the initialization of its own internal structures.
- *
- * @param model policy source model to be used as a parent model of the newly created {@link ModelNode}. Must not be {@code null}
- * @return POLICY model node with the parent model reference initialized to the model supplied as an input parameter
- * @throws IllegalArgumentException if the {@code model} input parameter is {@code null}
- */
- static ModelNode createRootPolicyNode(final PolicySourceModel model) throws IllegalArgumentException {
- if (model == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0039_POLICY_SRC_MODEL_INPUT_PARAMETER_MUST_NOT_BE_NULL()));
- }
- return new ModelNode(ModelNode.Type.POLICY, model);
- }
-
- private ModelNode(Type type, PolicySourceModel parentModel) {
- this.type = type;
- this.parentModel = parentModel;
- this.children = new LinkedList<ModelNode>();
- this.unmodifiableViewOnContent = Collections.unmodifiableCollection(this.children);
- }
-
- private ModelNode(Type type, PolicySourceModel parentModel, AssertionData data) {
- this(type, parentModel);
-
- this.nodeData = data;
- }
-
- private ModelNode(PolicySourceModel parentModel, PolicyReferenceData data) {
- this(Type.POLICY_REFERENCE, parentModel);
-
- this.referenceData = data;
- }
-
- private void checkCreateChildOperationSupportForType(final Type type) throws UnsupportedOperationException {
- if (!this.type.isChildTypeSupported(type)) {
- throw LOGGER.logSevereException(new UnsupportedOperationException(LocalizationMessages.WSP_0073_CREATE_CHILD_NODE_OPERATION_NOT_SUPPORTED(type, this.type)));
- }
- }
-
- /**
- * Factory method that creates new policy source model node as specified by a factory method name and input parameters.
- * Each node is created with respect to its enclosing policy source model.
- *
- * @return A new Policy node.
- */
- public ModelNode createChildPolicyNode() {
- checkCreateChildOperationSupportForType(Type.POLICY);
-
- final ModelNode node = new ModelNode(ModelNode.Type.POLICY, parentModel);
- this.addChild(node);
-
- return node;
- }
-
- /**
- * Factory method that creates new policy source model node as specified by a factory method name and input parameters.
- * Each node is created with respect to its enclosing policy source model.
- *
- * @return A new All node.
- */
- public ModelNode createChildAllNode() {
- checkCreateChildOperationSupportForType(Type.ALL);
-
- final ModelNode node = new ModelNode(ModelNode.Type.ALL, parentModel);
- this.addChild(node);
-
- return node;
- }
-
- /**
- * Factory method that creates new policy source model node as specified by a factory method name and input parameters.
- * Each node is created with respect to its enclosing policy source model.
- *
- * @return A new ExactlyOne node.
- */
- public ModelNode createChildExactlyOneNode() {
- checkCreateChildOperationSupportForType(Type.EXACTLY_ONE);
-
- final ModelNode node = new ModelNode(ModelNode.Type.EXACTLY_ONE, parentModel);
- this.addChild(node);
-
- return node;
- }
-
- /**
- * Factory method that creates new policy source model node as specified by a factory method name and input parameters.
- * Each node is created with respect to its enclosing policy source model.
- *
- * @return A new policy assertion node.
- */
- public ModelNode createChildAssertionNode() {
- checkCreateChildOperationSupportForType(Type.ASSERTION);
-
- final ModelNode node = new ModelNode(ModelNode.Type.ASSERTION, parentModel);
- this.addChild(node);
-
- return node;
- }
-
- /**
- * Factory method that creates new policy source model node as specified by a factory method name and input parameters.
- * Each node is created with respect to its enclosing policy source model.
- *
- * @param nodeData The policy assertion data.
- * @return A new policy assertion node.
- */
- public ModelNode createChildAssertionNode(final AssertionData nodeData) {
- checkCreateChildOperationSupportForType(Type.ASSERTION);
-
- final ModelNode node = new ModelNode(Type.ASSERTION, parentModel, nodeData);
- this.addChild(node);
-
- return node;
- }
-
- /**
- * Factory method that creates new policy source model node as specified by a factory method name and input parameters.
- * Each node is created with respect to its enclosing policy source model.
- *
- * @return A new assertion parameter node.
- */
- public ModelNode createChildAssertionParameterNode() {
- checkCreateChildOperationSupportForType(Type.ASSERTION_PARAMETER_NODE);
-
- final ModelNode node = new ModelNode(ModelNode.Type.ASSERTION_PARAMETER_NODE, parentModel);
- this.addChild(node);
-
- return node;
- }
-
- /**
- * Factory method that creates new policy source model node as specified by a factory method name and input parameters.
- * Each node is created with respect to its enclosing policy source model.
- *
- * @param nodeData The assertion parameter data.
- * @return A new assertion parameter node.
- */
- ModelNode createChildAssertionParameterNode(final AssertionData nodeData) {
- checkCreateChildOperationSupportForType(Type.ASSERTION_PARAMETER_NODE);
-
- final ModelNode node = new ModelNode(Type.ASSERTION_PARAMETER_NODE, parentModel, nodeData);
- this.addChild(node);
-
- return node;
- }
-
- /**
- * Factory method that creates new policy source model node as specified by a factory method name and input parameters.
- * Each node is created with respect to its enclosing policy source model.
- *
- * @param referenceData The PolicyReference data.
- * @return A new PolicyReference node.
- */
- ModelNode createChildPolicyReferenceNode(final PolicyReferenceData referenceData) {
- checkCreateChildOperationSupportForType(Type.POLICY_REFERENCE);
-
- final ModelNode node = new ModelNode(parentModel, referenceData);
- this.parentModel.addNewPolicyReference(node);
- this.addChild(node);
-
- return node;
- }
-
- Collection<ModelNode> getChildren() {
- return unmodifiableViewOnContent;
- }
-
- /**
- * Sets the parent model reference on the node and its children. The method may be invoked only on the root node
- * of the policy source model (or - in general - on a model node that dose not reference a parent node). Otherwise an
- * exception is thrown.
- *
- * @param model new parent policy source model to be set.
- * @throws IllegalAccessException in case this node references a parent node (i.e. is not a root node of the model).
- */
- void setParentModel(final PolicySourceModel model) throws IllegalAccessException {
- if (parentNode != null) {
- throw LOGGER.logSevereException(new IllegalAccessException(LocalizationMessages.WSP_0049_PARENT_MODEL_CAN_NOT_BE_CHANGED()));
- }
-
- this.updateParentModelReference(model);
- }
-
- /**
- * The method updates the parentModel reference on current model node instance and all of it's children
- *
- * @param model new policy source model reference.
- */
- private void updateParentModelReference(final PolicySourceModel model) {
- this.parentModel = model;
-
- for (ModelNode child : children) {
- child.updateParentModelReference(model);
- }
- }
-
- /**
- * Returns the parent policy source model that contains this model node.
- *
- * @return the parent policy source model
- */
- public PolicySourceModel getParentModel() {
- return parentModel;
- }
-
- /**
- * Returns the type of this policy source model node.
- *
- * @return actual type of this policy source model node
- */
- public ModelNode.Type getType() {
- return type;
- }
-
- /**
- * Returns the parent referenced by this policy source model node.
- *
- * @return current parent of this policy source model node or {@code null} if the node does not have a parent currently.
- */
- public ModelNode getParentNode() {
- return parentNode;
- }
-
- /**
- * Returns the data for this policy source model node (if any). The model node data are expected to be not {@code null} only in
- * case the type of this node is ASSERTION or ASSERTION_PARAMETER_NODE.
- *
- * @return the data of this policy source model node or {@code null} if the node does not have any data associated to it
- * attached.
- */
- public AssertionData getNodeData() {
- return nodeData;
- }
-
- /**
- * Returns the policy reference data for this policy source model node. The policy reference data are expected to be not {@code null} only in
- * case the type of this node is POLICY_REFERENCE.
- *
- * @return the policy reference data for this policy source model node or {@code null} if the node does not have any policy reference data
- * attached.
- */
- PolicyReferenceData getPolicyReferenceData() {
- return referenceData;
- }
-
- /**
- * The method may be used to set or replace assertion data set for this node. If there are assertion data set already,
- * those are replaced by a new reference and eventualy returned from the method.
- * <p/>
- * This method is supported only in case this model node instance's type is {@code ASSERTION} or {@code ASSERTION_PARAMETER_NODE}.
- * If used from other node types, an exception is thrown.
- *
- * @param newData new assertion data to be set.
- * @return old and replaced assertion data if any or {@code null} otherwise.
- *
- * @throws UnsupportedOperationException in case this method is called on nodes of type other than {@code ASSERTION}
- * or {@code ASSERTION_PARAMETER_NODE}
- */
- public AssertionData setOrReplaceNodeData(final AssertionData newData) {
- if (!isDomainSpecific()) {
- throw LOGGER.logSevereException(new UnsupportedOperationException(LocalizationMessages.WSP_0051_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_ASSERTION_RELATED_NODE_TYPE(type)));
- }
-
- final AssertionData oldData = this.nodeData;
- this.nodeData = newData;
-
- return oldData;
- }
-
- /**
- * The method specifies whether the model node instance represents assertion related node, it means whether its type
- * is 'ASSERTION' or 'ASSERTION_PARAMETER_NODE'. This is, for example, the way to determine whether the node supports
- * setting a {@link AssertionData} object via {@link #setOrReplaceNodeData(AssertionData)} method or not.
- *
- * @return {@code true} or {@code false} according to whether the node instance represents assertion related node or not.
- */
- boolean isDomainSpecific() {
- return type == Type.ASSERTION || type == Type.ASSERTION_PARAMETER_NODE;
- }
-
- /**
- * Appends the specified child node to the end of the children list of this node and sets it's parent to reference
- * this node.
- *
- * @param child node to be appended to the children list of this node.
- * @return {@code true} (as per the general contract of the {@code Collection.add} method).
- *
- * @throws NullPointerException if the specified node is {@code null}.
- * @throws IllegalArgumentException if child has a parent node set already to point to some node
- */
- private boolean addChild(final ModelNode child) {
- children.add(child);
- child.parentNode = this;
-
- return true;
- }
-
- void setReferencedModel(final PolicySourceModel model) {
- if (this.type != Type.POLICY_REFERENCE) {
- throw LOGGER.logSevereException(new UnsupportedOperationException(LocalizationMessages.WSP_0050_OPERATION_NOT_SUPPORTED_FOR_THIS_BUT_POLICY_REFERENCE_NODE_TYPE(type)));
- }
-
- referencedModel = model;
- }
-
- PolicySourceModel getReferencedModel() {
- return referencedModel;
- }
-
- /**
- * Returns the number of child policy source model nodes. If this model node contains
- * more than {@code Integer.MAX_VALUE} children, returns {@code Integer.MAX_VALUE}.
- *
- * @return the number of children of this node.
- */
- public int childrenSize() {
- return children.size();
- }
-
- /**
- * Returns true if the node has at least one child node.
- *
- * @return true if the node has at least one child node, false otherwise.
- */
- public boolean hasChildren() {
- return !children.isEmpty();
- }
-
- /**
- * Iterates through all child nodes.
- *
- * @return An iterator for the child nodes
- */
- public Iterator<ModelNode> iterator() {
- return children.iterator();
- }
-
- /**
- * An {@code Object.equals(Object obj)} method override. Method ignores the parent source model. It means that two
- * model nodes may be the same even if they belong to different models.
- * <p/>
- * If parent model comparison is desired, it must be accomplished separately. To perform that, the reference equality
- * test is sufficient ({@code nodeA.getParentModel() == nodeB.getParentModel()}), since all model nodes are created
- * for specific model instances.
- */
- @Override
- public boolean equals(final Object obj) {
- if (this == obj) {
- return true;
- }
-
- if (!(obj instanceof ModelNode)) {
- return false;
- }
-
- boolean result = true;
- final ModelNode that = (ModelNode) obj;
-
- result = result && this.type.equals(that.type);
- // result = result && ((this.parentNode == null) ? that.parentNode == null : this.parentNode.equals(that.parentNode));
- result = result && ((this.nodeData == null) ? that.nodeData == null : this.nodeData.equals(that.nodeData));
- result = result && ((this.children == null) ? that.children == null : this.children.equals(that.children));
-
- return result;
- }
-
- /**
- * An {@code Object.hashCode()} method override.
- */
- @Override
- public int hashCode() {
- int result = 17;
-
- result = 37 * result + this.type.hashCode();
- result = 37 * result + ((this.parentNode == null) ? 0 : this.parentNode.hashCode());
- result = 37 * result + ((this.nodeData == null) ? 0 : this.nodeData.hashCode());
- result = 37 * result + this.children.hashCode();
-
- return result;
- }
-
- /**
- * Returns a string representation of the object. In general, the <code>toString</code> method
- * returns a string that "textually represents" this object.
- *
- * @return a string representation of the object.
- */
- @Override
- public String toString() {
- return toString(0, new StringBuffer()).toString();
- }
-
- /**
- * A helper method that appends indented string representation of this instance to the input string buffer.
- *
- * @param indentLevel indentation level to be used.
- * @param buffer buffer to be used for appending string representation of this instance
- * @return modified buffer containing new string representation of the instance
- */
- public StringBuffer toString(final int indentLevel, final StringBuffer buffer) {
- final String indent = PolicyUtils.Text.createIndent(indentLevel);
- final String innerIndent = PolicyUtils.Text.createIndent(indentLevel + 1);
-
- buffer.append(indent).append(type).append(" {").append(PolicyUtils.Text.NEW_LINE);
- if (type == Type.ASSERTION) {
- if (nodeData == null) {
- buffer.append(innerIndent).append("no assertion data set");
- } else {
- nodeData.toString(indentLevel + 1, buffer);
- }
- buffer.append(PolicyUtils.Text.NEW_LINE);
- } else if (type == Type.POLICY_REFERENCE) {
- if (referenceData == null) {
- buffer.append(innerIndent).append("no policy reference data set");
- } else {
- referenceData.toString(indentLevel + 1, buffer);
- }
- buffer.append(PolicyUtils.Text.NEW_LINE);
- } else if (type == Type.ASSERTION_PARAMETER_NODE) {
- if (nodeData == null) {
- buffer.append(innerIndent).append("no parameter data set");
- }
- else {
- nodeData.toString(indentLevel + 1, buffer);
- }
- buffer.append(PolicyUtils.Text.NEW_LINE);
- }
-
- if (children.size() > 0) {
- for (ModelNode child : children) {
- child.toString(indentLevel + 1, buffer).append(PolicyUtils.Text.NEW_LINE);
- }
- } else {
- buffer.append(innerIndent).append("no child nodes").append(PolicyUtils.Text.NEW_LINE);
- }
-
- buffer.append(indent).append('}');
- return buffer;
- }
-
- @Override
- protected ModelNode clone() throws CloneNotSupportedException {
- final ModelNode clone = (ModelNode) super.clone();
-
- if (this.nodeData != null) {
- clone.nodeData = this.nodeData.clone();
- }
-
- // no need to clone PolicyReferenceData, since those are immutable
-
- if (this.referencedModel != null) {
- clone.referencedModel = this.referencedModel.clone();
- }
-
-
- clone.children = new LinkedList<ModelNode>();
- clone.unmodifiableViewOnContent = Collections.unmodifiableCollection(clone.children);
-
- for (ModelNode thisChild : this.children) {
- clone.addChild(thisChild.clone());
- }
-
- return clone;
- }
-
- PolicyReferenceData getReferenceData() {
- return referenceData;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/NormalizedModelGenerator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/NormalizedModelGenerator.java
deleted file mode 100644
index f65bb60a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/NormalizedModelGenerator.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel;
-
-import com.sun.xml.internal.ws.policy.AssertionSet;
-import com.sun.xml.internal.ws.policy.NestedPolicy;
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-
-/**
- * Create a fully normalized WS-Policy infoset.
- *
- * @author Fabian Ritzmann
- */
-class NormalizedModelGenerator extends PolicyModelGenerator {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(NormalizedModelGenerator.class);
-
- private final PolicySourceModelCreator sourceModelCreator;
-
-
- NormalizedModelGenerator(PolicySourceModelCreator sourceModelCreator) {
- this.sourceModelCreator = sourceModelCreator;
- }
-
- @Override
- public PolicySourceModel translate(final Policy policy) throws PolicyException {
- LOGGER.entering(policy);
-
- PolicySourceModel model = null;
-
- if (policy == null) {
- LOGGER.fine(LocalizationMessages.WSP_0047_POLICY_IS_NULL_RETURNING());
- } else {
- model = this.sourceModelCreator.create(policy);
- final ModelNode rootNode = model.getRootNode();
- final ModelNode exactlyOneNode = rootNode.createChildExactlyOneNode();
- for (AssertionSet set : policy) {
- final ModelNode alternativeNode = exactlyOneNode.createChildAllNode();
- for (PolicyAssertion assertion : set) {
- final AssertionData data = AssertionData.createAssertionData(assertion.getName(), assertion.getValue(), assertion.getAttributes(), assertion.isOptional(), assertion.isIgnorable());
- final ModelNode assertionNode = alternativeNode.createChildAssertionNode(data);
- if (assertion.hasNestedPolicy()) {
- translate(assertionNode, assertion.getNestedPolicy());
- }
- if (assertion.hasParameters()) {
- translate(assertionNode, assertion.getParametersIterator());
- }
- }
- }
- }
-
- LOGGER.exiting(model);
- return model;
- }
-
- @Override
- protected ModelNode translate(final ModelNode parentAssertion, final NestedPolicy policy) {
- final ModelNode nestedPolicyRoot = parentAssertion.createChildPolicyNode();
- final ModelNode exactlyOneNode = nestedPolicyRoot.createChildExactlyOneNode();
- final AssertionSet set = policy.getAssertionSet();
- final ModelNode alternativeNode = exactlyOneNode.createChildAllNode();
- translate(alternativeNode, set);
- return nestedPolicyRoot;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelGenerator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelGenerator.java
deleted file mode 100644
index 0682eb21..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelGenerator.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel;
-
-import com.sun.xml.internal.ws.policy.AssertionSet;
-import com.sun.xml.internal.ws.policy.NestedPolicy;
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-
-import java.util.Iterator;
-
-/**
- * Translate a policy into a PolicySourceModel.
- *
- * Code that depends on JAX-WS should use com.sun.xml.internal.ws.api.policy.ModelGenerator
- * instead of this class.
- *
- * @author Marek Potociar
- * @author Fabian Ritzmann
- */
-public abstract class PolicyModelGenerator {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyModelGenerator.class);
-
- /**
- * This protected constructor avoids direct instantiation from outside of the class
- */
- protected PolicyModelGenerator() {
- // nothing to initialize
- }
-
- /**
- * Factory method that returns a {@link PolicyModelGenerator} instance.
- *
- * @return {@link PolicyModelGenerator} instance
- */
- public static PolicyModelGenerator getGenerator() {
- return getNormalizedGenerator(new PolicySourceModelCreator());
- }
-
- /**
- * Allows derived classes to create instances of the package private
- * CompactModelGenerator.
- *
- * @param creator An implementation of the PolicySourceModelCreator.
- * @return An instance of CompactModelGenerator.
- */
- protected static PolicyModelGenerator getCompactGenerator(PolicySourceModelCreator creator) {
- return new CompactModelGenerator(creator);
- }
-
- /**
- * Allows derived classes to create instances of the package private
- * NormalizedModelGenerator.
- *
- * @param creator An implementation of the PolicySourceModelCreator.
- * @return An instance of NormalizedModelGenerator.
- */
- protected static PolicyModelGenerator getNormalizedGenerator(PolicySourceModelCreator creator) {
- return new NormalizedModelGenerator(creator);
- }
-
- /**
- * This method translates a {@link Policy} into a
- * {@link com.sun.xml.internal.ws.policy.sourcemodel policy infoset}. The resulting
- * PolicySourceModel is disconnected from the input policy, thus any
- * additional changes in the policy will have no effect on the PolicySourceModel.
- *
- * @param policy The policy to be translated into an infoset. May be null.
- * @return translated The policy infoset. May be null if the input policy was
- * null.
- * @throws PolicyException in case Policy translation fails.
- */
- public abstract PolicySourceModel translate(final Policy policy) throws PolicyException;
-
- /**
- * Iterates through a nested policy and returns the corresponding policy info model.
- *
- * @param parentAssertion The parent node.
- * @param policy The nested policy.
- * @return The nested policy translated to the policy info model.
- */
- protected abstract ModelNode translate(final ModelNode parentAssertion, final NestedPolicy policy);
-
- /**
- * Add the contents of the assertion set as child node to the given model node.
- *
- * @param node The content of this assertion set are added as child nodes to this node.
- * May not be null.
- * @param assertions The assertions that are to be added to the node. May not be null.
- */
- protected void translate(final ModelNode node, final AssertionSet assertions) {
- for (PolicyAssertion assertion : assertions) {
- final AssertionData data = AssertionData.createAssertionData(assertion.getName(), assertion.getValue(), assertion.getAttributes(), assertion.isOptional(), assertion.isIgnorable());
- final ModelNode assertionNode = node.createChildAssertionNode(data);
- if (assertion.hasNestedPolicy()) {
- translate(assertionNode, assertion.getNestedPolicy());
- }
- if (assertion.hasParameters()) {
- translate(assertionNode, assertion.getParametersIterator());
- }
- }
- }
-
- /**
- * Iterates through all contained assertions and adds them to the info model.
- *
- * @param assertionParametersIterator The contained assertions.
- * @param assertionNode The node to which the assertions are added as child nodes
- */
- protected void translate(final ModelNode assertionNode, final Iterator<PolicyAssertion> assertionParametersIterator) {
- while (assertionParametersIterator.hasNext()) {
- final PolicyAssertion assertionParameter = assertionParametersIterator.next();
- final AssertionData data = AssertionData.createAssertionParameterData(assertionParameter.getName(), assertionParameter.getValue(), assertionParameter.getAttributes());
- final ModelNode assertionParameterNode = assertionNode.createChildAssertionParameterNode(data);
- if (assertionParameter.hasNestedPolicy()) {
- throw LOGGER.logSevereException(new IllegalStateException(LocalizationMessages.WSP_0005_UNEXPECTED_POLICY_ELEMENT_FOUND_IN_ASSERTION_PARAM(assertionParameter)));
- }
- if (assertionParameter.hasNestedAssertions()) {
- translate(assertionParameterNode, assertionParameter.getNestedAssertionsIterator());
- }
- }
- }
-
-
- /**
- * Allows derived classes to pass their own implementation of PolicySourceModelCreator
- * into the PolicyModelGenerator instance.
- */
- protected static class PolicySourceModelCreator {
-
- /**
- * Create an instance of the PolicySourceModel.
- *
- * @param policy The policy that underlies the created PolicySourceModel.
- * @return An instance of the PolicySourceModel.
- */
- protected PolicySourceModel create(final Policy policy) {
- return PolicySourceModel.createPolicySourceModel(policy.getNamespaceVersion(),
- policy.getId(), policy.getName());
- }
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelMarshaller.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelMarshaller.java
deleted file mode 100644
index d8414b0f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelMarshaller.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel;
-
-import java.util.Collection;
-import com.sun.xml.internal.ws.policy.PolicyException;
-
-/**
- * Abstract class defines interface for policy model marshaller implementations that are specific to underlying
- * persistence layer.
- *
- * @author Marek Potociar
- */
-public abstract class PolicyModelMarshaller {
- private static final PolicyModelMarshaller defaultXmlMarshaller = new XmlPolicyModelMarshaller(false);
- private static final PolicyModelMarshaller invisibleAssertionXmlMarshaller = new XmlPolicyModelMarshaller(true);
-
- /**
- * Default constructor to ensure we have a common model marshaller base, but only our API classes implemented in this
- * package will be able to extend this abstract class. This is to restrict attempts of extending the class from
- * a client code.
- */
- PolicyModelMarshaller() {
- // nothing to instantiate
- }
-
- /**
- * Marshalls the policy source model using provided storage reference
- *
- * @param model policy source model to be marshalled
- * @param storage reference to underlying storage that should be used for model marshalling
- * @throws PolicyException If marshalling failed
- */
- public abstract void marshal(PolicySourceModel model, Object storage) throws PolicyException;
-
- /**
- * Marshalls the collection of policy source models using provided storage reference
- *
- * @param models collection of policy source models to be marshalled
- * @param storage reference to underlying storage that should be used for model marshalling
- * @throws PolicyException If marshalling failed
- */
- public abstract void marshal(Collection<PolicySourceModel> models, Object storage) throws PolicyException;
-
- /**
- * Factory methods that returns a marshaller instance based on input parameter.
- *
- * @param marshallInvisible boolean parameter indicating whether the marshaller
- * returned by this method does marshall private assertions or not.
- *
- * @return policy model marshaller that either marshalls private assertions or not
- * based on the input argument.
- */
- public static PolicyModelMarshaller getXmlMarshaller(final boolean marshallInvisible) {
- return (marshallInvisible) ? invisibleAssertionXmlMarshaller : defaultXmlMarshaller;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelTranslator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelTranslator.java
deleted file mode 100644
index ae872adf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelTranslator.java
+++ /dev/null
@@ -1,459 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Queue;
-
-import com.sun.xml.internal.ws.policy.AssertionSet;
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
-import com.sun.xml.internal.ws.policy.spi.AssertionCreationException;
-import com.sun.xml.internal.ws.policy.spi.PolicyAssertionCreator;
-
-/**
- * This class provides a method for translating a {@link PolicySourceModel} structure to a normalized {@link Policy} expression.
- * The resulting Policy is disconnected from its model, thus any additional changes in the model will have no effect on the Policy
- * expression.
- *
- * @author Marek Potociar
- * @author Fabian Ritzmann
- */
-public class PolicyModelTranslator {
-
- private static final class ContentDecomposition {
- final List<Collection<ModelNode>> exactlyOneContents = new LinkedList<Collection<ModelNode>>();
- final List<ModelNode> assertions = new LinkedList<ModelNode>();
-
- void reset() {
- exactlyOneContents.clear();
- assertions.clear();
- }
- }
-
- private static final class RawAssertion {
- ModelNode originalNode; // used to initialize nestedPolicy and nestedAssertions in the constructor of RawAlternative
- Collection<RawAlternative> nestedAlternatives = null;
- final Collection<ModelNode> parameters;
-
- RawAssertion(ModelNode originalNode, Collection<ModelNode> parameters) {
- this.parameters = parameters;
- this.originalNode = originalNode;
- }
- }
-
- private static final class RawAlternative {
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyModelTranslator.RawAlternative.class);
-
- final List<RawPolicy> allNestedPolicies = new LinkedList<RawPolicy>(); // used to track the nested policies which need to be normalized
- final Collection<RawAssertion> nestedAssertions;
-
- RawAlternative(Collection<ModelNode> assertionNodes) throws PolicyException {
- this.nestedAssertions = new LinkedList<RawAssertion>();
- for (ModelNode node : assertionNodes) {
- RawAssertion assertion = new RawAssertion(node, new LinkedList<ModelNode>());
- nestedAssertions.add(assertion);
-
- for (ModelNode assertionNodeChild : assertion.originalNode.getChildren()) {
- switch (assertionNodeChild.getType()) {
- case ASSERTION_PARAMETER_NODE:
- assertion.parameters.add(assertionNodeChild);
- break;
- case POLICY:
- case POLICY_REFERENCE:
- if (assertion.nestedAlternatives == null) {
- assertion.nestedAlternatives = new LinkedList<RawAlternative>();
- RawPolicy nestedPolicy;
- if (assertionNodeChild.getType() == ModelNode.Type.POLICY) {
- nestedPolicy = new RawPolicy(assertionNodeChild, assertion.nestedAlternatives);
- } else {
- nestedPolicy = new RawPolicy(getReferencedModelRootNode(assertionNodeChild), assertion.nestedAlternatives);
- }
- this.allNestedPolicies.add(nestedPolicy);
- } else {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0006_UNEXPECTED_MULTIPLE_POLICY_NODES()));
- }
- break;
- default:
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0008_UNEXPECTED_CHILD_MODEL_TYPE(assertionNodeChild.getType())));
- }
- }
- }
- }
-
- }
-
- private static final class RawPolicy {
- final Collection<ModelNode> originalContent;
- final Collection<RawAlternative> alternatives;
-
- RawPolicy(ModelNode policyNode, Collection<RawAlternative> alternatives) {
- originalContent = policyNode.getChildren();
- this.alternatives = alternatives;
- }
- }
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyModelTranslator.class);
-
- private static final PolicyAssertionCreator defaultCreator = new DefaultPolicyAssertionCreator();
-
- private final Map<String, PolicyAssertionCreator> assertionCreators;
-
-
- private PolicyModelTranslator() throws PolicyException {
- this(null);
- }
-
- protected PolicyModelTranslator(final Collection<PolicyAssertionCreator> creators) throws PolicyException {
- LOGGER.entering(creators);
-
- final Collection<PolicyAssertionCreator> allCreators = new LinkedList<PolicyAssertionCreator>();
- final PolicyAssertionCreator[] discoveredCreators = PolicyUtils.ServiceProvider.load(PolicyAssertionCreator.class);
- for (PolicyAssertionCreator creator : discoveredCreators) {
- allCreators.add(creator);
- }
- if (creators != null) {
- for (PolicyAssertionCreator creator : creators) {
- allCreators.add(creator);
- }
- }
-
- final Map<String, PolicyAssertionCreator> pacMap = new HashMap<String, PolicyAssertionCreator>();
- for (PolicyAssertionCreator creator : allCreators) {
- final String[] supportedURIs = creator.getSupportedDomainNamespaceURIs();
- final String creatorClassName = creator.getClass().getName();
-
- if (supportedURIs == null || supportedURIs.length == 0) {
- LOGGER.warning(LocalizationMessages.WSP_0077_ASSERTION_CREATOR_DOES_NOT_SUPPORT_ANY_URI(creatorClassName));
- continue;
- }
-
- for (String supportedURI : supportedURIs) {
- LOGGER.config(LocalizationMessages.WSP_0078_ASSERTION_CREATOR_DISCOVERED(creatorClassName, supportedURI));
- if (supportedURI == null || supportedURI.length() == 0) {
- throw LOGGER.logSevereException(new PolicyException(
- LocalizationMessages.WSP_0070_ERROR_REGISTERING_ASSERTION_CREATOR(creatorClassName)));
- }
-
- final PolicyAssertionCreator oldCreator = pacMap.put(supportedURI, creator);
- if (oldCreator != null) {
- throw LOGGER.logSevereException(new PolicyException(
- LocalizationMessages.WSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE(
- supportedURI, oldCreator.getClass().getName(), creator.getClass().getName())));
- }
- }
- }
-
- this.assertionCreators = Collections.unmodifiableMap(pacMap);
- LOGGER.exiting();
- }
-
- /**
- * Method returns thread-safe policy model translator instance.
- *
- * This method is only intended to be used by code that has no dependencies on
- * JAX-WS. Otherwise use com.sun.xml.internal.ws.policy.api.ModelTranslator.
- *
- * @return A policy model translator instance.
- * @throws PolicyException If instantiating a PolicyAssertionCreator failed.
- */
- public static PolicyModelTranslator getTranslator() throws PolicyException {
- return new PolicyModelTranslator();
- }
-
- /**
- * The method translates {@link PolicySourceModel} structure into normalized {@link Policy} expression. The resulting Policy
- * is disconnected from its model, thus any additional changes in model will have no effect on the Policy expression.
- *
- * @param model the model to be translated into normalized policy expression. Must not be {@code null}.
- * @return translated policy expression in it's normalized form.
- * @throws PolicyException in case of translation failure
- */
- public Policy translate(final PolicySourceModel model) throws PolicyException {
- LOGGER.entering(model);
-
- if (model == null) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0043_POLICY_MODEL_TRANSLATION_ERROR_INPUT_PARAM_NULL()));
- }
-
- PolicySourceModel localPolicyModelCopy;
- try {
- localPolicyModelCopy = model.clone();
- } catch (CloneNotSupportedException e) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0016_UNABLE_TO_CLONE_POLICY_SOURCE_MODEL(), e));
- }
-
- final String policyId = localPolicyModelCopy.getPolicyId();
- final String policyName = localPolicyModelCopy.getPolicyName();
-
- final Collection<AssertionSet> alternatives = createPolicyAlternatives(localPolicyModelCopy);
- LOGGER.finest(LocalizationMessages.WSP_0052_NUMBER_OF_ALTERNATIVE_COMBINATIONS_CREATED(alternatives.size()));
-
- Policy policy = null;
- if (alternatives.size() == 0) {
- policy = Policy.createNullPolicy(model.getNamespaceVersion(), policyName, policyId);
- LOGGER.finest(LocalizationMessages.WSP_0055_NO_ALTERNATIVE_COMBINATIONS_CREATED());
- } else if (alternatives.size() == 1 && alternatives.iterator().next().isEmpty()) {
- policy = Policy.createEmptyPolicy(model.getNamespaceVersion(), policyName, policyId);
- LOGGER.finest(LocalizationMessages.WSP_0026_SINGLE_EMPTY_ALTERNATIVE_COMBINATION_CREATED());
- } else {
- policy = Policy.createPolicy(model.getNamespaceVersion(), policyName, policyId, alternatives);
- LOGGER.finest(LocalizationMessages.WSP_0057_N_ALTERNATIVE_COMBINATIONS_M_POLICY_ALTERNATIVES_CREATED(alternatives.size(), policy.getNumberOfAssertionSets()));
- }
-
- LOGGER.exiting(policy);
- return policy;
- }
-
- /**
- * Method creates policy alternatives according to provided model. The model structure is modified in the process.
- *
- * @return created policy alternatives resulting from policy source model.
- */
- private Collection<AssertionSet> createPolicyAlternatives(final PolicySourceModel model) throws PolicyException {
- // creating global method variables
- final ContentDecomposition decomposition = new ContentDecomposition();
-
- // creating processing queue and starting the processing iterations
- final Queue<RawPolicy> policyQueue = new LinkedList<RawPolicy>();
- final Queue<Collection<ModelNode>> contentQueue = new LinkedList<Collection<ModelNode>>();
-
- final RawPolicy rootPolicy = new RawPolicy(model.getRootNode(), new LinkedList<RawAlternative>());
- RawPolicy processedPolicy = rootPolicy;
- do {
- Collection<ModelNode> processedContent = processedPolicy.originalContent;
- do {
- decompose(processedContent, decomposition);
- if (decomposition.exactlyOneContents.isEmpty()) {
- final RawAlternative alternative = new RawAlternative(decomposition.assertions);
- processedPolicy.alternatives.add(alternative);
- if (!alternative.allNestedPolicies.isEmpty()) {
- policyQueue.addAll(alternative.allNestedPolicies);
- }
- } else { // we have a non-empty collection of exactly ones
- final Collection<Collection<ModelNode>> combinations = PolicyUtils.Collections.combine(decomposition.assertions, decomposition.exactlyOneContents, false);
- if (combinations != null && !combinations.isEmpty()) {
- // processed alternative was split into some new alternatives, which we need to process
- contentQueue.addAll(combinations);
- }
- }
- } while ((processedContent = contentQueue.poll()) != null);
- } while ((processedPolicy = policyQueue.poll()) != null);
-
- // normalize nested policies to contain single alternative only
- final Collection<AssertionSet> assertionSets = new LinkedList<AssertionSet>();
- for (RawAlternative rootAlternative : rootPolicy.alternatives) {
- final Collection<AssertionSet> normalizedAlternatives = normalizeRawAlternative(rootAlternative);
- assertionSets.addAll(normalizedAlternatives);
- }
-
- return assertionSets;
- }
-
- /**
- * Decomposes the unprocessed alternative content into two different collections:
- * <p/>
- * Content of 'EXACTLY_ONE' child nodes is expanded and placed in one list and
- * 'ASSERTION' nodes are placed into other list. Direct 'ALL' and 'POLICY' child nodes are 'dissolved' in the process.
- *
- * Method reuses precreated ContentDecomposition object, which is reset before reuse.
- */
- private void decompose(final Collection<ModelNode> content, final ContentDecomposition decomposition) throws PolicyException {
- decomposition.reset();
-
- final Queue<ModelNode> allContentQueue = new LinkedList<ModelNode>(content);
- ModelNode node;
- while ((node = allContentQueue.poll()) != null) {
- // dissolving direct 'POLICY', 'POLICY_REFERENCE' and 'ALL' child nodes
- switch (node.getType()) {
- case POLICY :
- case ALL :
- allContentQueue.addAll(node.getChildren());
- break;
- case POLICY_REFERENCE :
- allContentQueue.addAll(getReferencedModelRootNode(node).getChildren());
- break;
- case EXACTLY_ONE :
- decomposition.exactlyOneContents.add(expandsExactlyOneContent(node.getChildren()));
- break;
- case ASSERTION :
- decomposition.assertions.add(node);
- break;
- default :
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0007_UNEXPECTED_MODEL_NODE_TYPE_FOUND(node.getType())));
- }
- }
- }
-
- private static ModelNode getReferencedModelRootNode(final ModelNode policyReferenceNode) throws PolicyException {
- final PolicySourceModel referencedModel = policyReferenceNode.getReferencedModel();
- if (referencedModel == null) {
- final PolicyReferenceData refData = policyReferenceNode.getPolicyReferenceData();
- if (refData == null) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0041_POLICY_REFERENCE_NODE_FOUND_WITH_NO_POLICY_REFERENCE_IN_IT()));
- } else {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0010_UNEXPANDED_POLICY_REFERENCE_NODE_FOUND_REFERENCING(refData.getReferencedModelUri())));
- }
- } else {
- return referencedModel.getRootNode();
- }
- }
-
- /**
- * Expands content of 'EXACTLY_ONE' node. Direct 'EXACTLY_ONE' child nodes are dissolved in the process.
- */
- private Collection<ModelNode> expandsExactlyOneContent(final Collection<ModelNode> content) throws PolicyException {
- final Collection<ModelNode> result = new LinkedList<ModelNode>();
-
- final Queue<ModelNode> eoContentQueue = new LinkedList<ModelNode>(content);
- ModelNode node;
- while ((node = eoContentQueue.poll()) != null) {
- // dissolving direct 'EXACTLY_ONE' child nodes
- switch (node.getType()) {
- case POLICY :
- case ALL :
- case ASSERTION :
- result.add(node);
- break;
- case POLICY_REFERENCE :
- result.add(getReferencedModelRootNode(node));
- break;
- case EXACTLY_ONE :
- eoContentQueue.addAll(node.getChildren());
- break;
- default :
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0001_UNSUPPORTED_MODEL_NODE_TYPE(node.getType())));
- }
- }
-
- return result;
- }
-
- private List<AssertionSet> normalizeRawAlternative(final RawAlternative alternative) throws AssertionCreationException, PolicyException {
- final List<PolicyAssertion> normalizedContentBase = new LinkedList<PolicyAssertion>();
- final Collection<List<PolicyAssertion>> normalizedContentOptions = new LinkedList<List<PolicyAssertion>>();
- if (!alternative.nestedAssertions.isEmpty()) {
- final Queue<RawAssertion> nestedAssertionsQueue = new LinkedList<RawAssertion>(alternative.nestedAssertions);
- RawAssertion rawAssertion;
- while((rawAssertion = nestedAssertionsQueue.poll()) != null) {
- final List<PolicyAssertion> normalized = normalizeRawAssertion(rawAssertion);
- // if there is only a single result, we can add it direclty to the content base collection
- // more elements in the result indicate that we will have to create combinations
- if (normalized.size() == 1) {
- normalizedContentBase.addAll(normalized);
- } else {
- normalizedContentOptions.add(normalized);
- }
- }
- }
-
- final List<AssertionSet> options = new LinkedList<AssertionSet>();
- if (normalizedContentOptions.isEmpty()) {
- // we do not have any options to combine => returning this assertion
- options.add(AssertionSet.createAssertionSet(normalizedContentBase));
- } else {
- // we have some options to combine => creating assertion options based on content combinations
- final Collection<Collection<PolicyAssertion>> contentCombinations = PolicyUtils.Collections.combine(normalizedContentBase, normalizedContentOptions, true);
- for (Collection<PolicyAssertion> contentOption : contentCombinations) {
- options.add(AssertionSet.createAssertionSet(contentOption));
- }
- }
- return options;
- }
-
- private List<PolicyAssertion> normalizeRawAssertion(final RawAssertion assertion) throws AssertionCreationException, PolicyException {
- List<PolicyAssertion> parameters;
- if (assertion.parameters.isEmpty()) {
- parameters = null;
- } else {
- parameters = new ArrayList<PolicyAssertion>(assertion.parameters.size());
- for (ModelNode parameterNode : assertion.parameters) {
- parameters.add(createPolicyAssertionParameter(parameterNode));
- }
- }
-
- final List<AssertionSet> nestedAlternatives = new LinkedList<AssertionSet>();
- if (assertion.nestedAlternatives != null && !assertion.nestedAlternatives.isEmpty()) {
- final Queue<RawAlternative> nestedAlternativeQueue = new LinkedList<RawAlternative>(assertion.nestedAlternatives);
- RawAlternative rawAlternative;
- while((rawAlternative = nestedAlternativeQueue.poll()) != null) {
- nestedAlternatives.addAll(normalizeRawAlternative(rawAlternative));
- }
- // if there is only a single result, we can add it direclty to the content base collection
- // more elements in the result indicate that we will have to create combinations
- }
-
- final List<PolicyAssertion> assertionOptions = new LinkedList<PolicyAssertion>();
- final boolean nestedAlternativesAvailable = !nestedAlternatives.isEmpty();
- if (nestedAlternativesAvailable) {
- for (AssertionSet nestedAlternative : nestedAlternatives) {
- assertionOptions.add(createPolicyAssertion(assertion.originalNode.getNodeData(), parameters, nestedAlternative));
- }
- } else {
- assertionOptions.add(createPolicyAssertion(assertion.originalNode.getNodeData(), parameters, null));
- }
- return assertionOptions;
- }
-
- private PolicyAssertion createPolicyAssertionParameter(final ModelNode parameterNode) throws AssertionCreationException, PolicyException {
- if (parameterNode.getType() != ModelNode.Type.ASSERTION_PARAMETER_NODE) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0065_INCONSISTENCY_IN_POLICY_SOURCE_MODEL(parameterNode.getType())));
- }
-
- List<PolicyAssertion> childParameters = null;
- if (parameterNode.hasChildren()) {
- childParameters = new ArrayList<PolicyAssertion>(parameterNode.childrenSize());
- for (ModelNode childParameterNode : parameterNode) {
- childParameters.add(createPolicyAssertionParameter(childParameterNode));
- }
- }
-
- return createPolicyAssertion(parameterNode.getNodeData(), childParameters, null /* parameters do not have any nested alternatives */);
- }
-
- private PolicyAssertion createPolicyAssertion(final AssertionData data, final Collection<PolicyAssertion> assertionParameters, final AssertionSet nestedAlternative) throws AssertionCreationException {
- final String assertionNamespace = data.getName().getNamespaceURI();
- final PolicyAssertionCreator domainSpecificPAC = assertionCreators.get(assertionNamespace);
-
-
- if (domainSpecificPAC == null) {
- return defaultCreator.createAssertion(data, assertionParameters, nestedAlternative, null);
- } else {
- return domainSpecificPAC.createAssertion(data, assertionParameters, nestedAlternative, defaultCreator);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelUnmarshaller.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelUnmarshaller.java
deleted file mode 100644
index b4cdd7cd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyModelUnmarshaller.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel;
-
-import com.sun.xml.internal.ws.policy.PolicyException;
-
-/**
- * Abstract class defines interface for policy model unmarshaller implementations that are specific to underlying
- * persistence layer.
- *
- * Code that depends on JAX-WS should use com.sun.xml.internal.ws.api.policy.ModelUnmarshaller
- * instead of this class.
- *
- * @author Marek Potociar
- * @author Fabian Ritzmann
- */
-public abstract class PolicyModelUnmarshaller {
- private static final PolicyModelUnmarshaller xmlUnmarshaller = new XmlPolicyModelUnmarshaller();
-
- /**
- * Default constructor to ensure we have a common model unmarshaller base, but only our API classes implemented in this
- * package will be able to extend this abstract class. This is to restrict attempts of extending the class from
- * a client code.
- */
- PolicyModelUnmarshaller() {
- // nothing to intitialize
- }
-
- /**
- * Unmarshalls single policy source model from provided storage reference. Method expects that the storage
- * cursor to be alread placed on the start of a policy expression. Inner comments and whitespaces are skipped
- * in processing. Any other cursor position results in a PolicyException being thrown.
- *
- * @param storage reference to underlying storage that should be used for model unmarshalling
- * @return unmarshalled policy source model. If no policies are found, returns {@code null}.
- * @throws PolicyException in case of the unmarshalling problems
- */
- public abstract PolicySourceModel unmarshalModel(Object storage) throws PolicyException;
-
- /**
- * Factory method that returns policy model unmarshaller able to unmarshal
- * policy expressions from XML source.
- *
- * Code that depends on JAX-WS should use com.sun.xml.internal.ws.api.policy.ModelUnmarshaller.getUnmarshaller()
- * instead of this method.
- *
- * @return policy model unmarshaller able to unmarshal policy expressions from XML source.
- */
- public static PolicyModelUnmarshaller getXmlUnmarshaller() {
- return xmlUnmarshaller;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyReferenceData.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyReferenceData.java
deleted file mode 100644
index 2f7d860a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicyReferenceData.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel;
-
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-/**
- *
- * @author Marek Potociar
- */
-final class PolicyReferenceData {
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyReferenceData.class);
-
- private static final URI DEFAULT_DIGEST_ALGORITHM_URI;
- private static final URISyntaxException CLASS_INITIALIZATION_EXCEPTION;
- static {
- URISyntaxException tempEx = null;
- URI tempUri = null;
- try {
- tempUri = new URI("http://schemas.xmlsoap.org/ws/2004/09/policy/Sha1Exc");
- } catch (URISyntaxException e) {
- tempEx = e;
- } finally {
- DEFAULT_DIGEST_ALGORITHM_URI = tempUri;
- CLASS_INITIALIZATION_EXCEPTION = tempEx;
- }
- }
-
- private final URI referencedModelUri;
- private final String digest;
- private final URI digestAlgorithmUri;
-
- /** Creates a new instance of PolicyReferenceData */
- public PolicyReferenceData(URI referencedModelUri) {
- this.referencedModelUri = referencedModelUri;
- this.digest = null;
- this.digestAlgorithmUri = null;
- }
-
- public PolicyReferenceData(URI referencedModelUri, String expectedDigest, URI usedDigestAlgorithm) {
- if (CLASS_INITIALIZATION_EXCEPTION != null) {
- throw LOGGER.logSevereException(new IllegalStateException(LocalizationMessages.WSP_0015_UNABLE_TO_INSTANTIATE_DIGEST_ALG_URI_FIELD(), CLASS_INITIALIZATION_EXCEPTION));
- }
-
- if (usedDigestAlgorithm != null && expectedDigest == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0072_DIGEST_MUST_NOT_BE_NULL_WHEN_ALG_DEFINED()));
- }
-
- this.referencedModelUri = referencedModelUri;
- if (expectedDigest == null) {
- this.digest = null;
- this.digestAlgorithmUri = null;
- } else {
- this.digest = expectedDigest;
-
- if (usedDigestAlgorithm == null) {
- this.digestAlgorithmUri = DEFAULT_DIGEST_ALGORITHM_URI;
- } else {
- this.digestAlgorithmUri = usedDigestAlgorithm;
- }
- }
- }
-
- public URI getReferencedModelUri() {
- return referencedModelUri;
- }
-
- public String getDigest() {
- return digest;
- }
-
- public URI getDigestAlgorithmUri() {
- return digestAlgorithmUri;
- }
-
- /**
- * An {@code Object.toString()} method override.
- */
- @Override
- public String toString() {
- return toString(0, new StringBuffer()).toString();
- }
-
- /**
- * A helper method that appends indented string representation of this instance to the input string buffer.
- *
- * @param indentLevel indentation level to be used.
- * @param buffer buffer to be used for appending string representation of this instance
- * @return modified buffer containing new string representation of the instance
- */
- public StringBuffer toString(final int indentLevel, final StringBuffer buffer) {
- final String indent = PolicyUtils.Text.createIndent(indentLevel);
- final String innerIndent = PolicyUtils.Text.createIndent(indentLevel + 1);
-
- buffer.append(indent).append("reference data {").append(PolicyUtils.Text.NEW_LINE);
- buffer.append(innerIndent).append("referenced policy model URI = '").append(referencedModelUri).append('\'').append(PolicyUtils.Text.NEW_LINE);
- if (digest == null) {
- buffer.append(innerIndent).append("no digest specified").append(PolicyUtils.Text.NEW_LINE);
- } else {
- buffer.append(innerIndent).append("digest algorith URI = '").append(digestAlgorithmUri).append('\'').append(PolicyUtils.Text.NEW_LINE);
- buffer.append(innerIndent).append("digest = '").append(digest).append('\'').append(PolicyUtils.Text.NEW_LINE);
- }
- buffer.append(indent).append('}');
-
- return buffer;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicySourceModel.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicySourceModel.java
deleted file mode 100644
index 9dfd38f4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicySourceModel.java
+++ /dev/null
@@ -1,428 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel;
-
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion;
-import com.sun.xml.internal.ws.policy.PolicyConstants;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;
-import com.sun.xml.internal.ws.policy.spi.PrefixMapper;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Queue;
-import java.util.Set;
-import javax.xml.namespace.QName;
-
-/**
- * This class is a root of unmarshaled policy source structure. Each instance of the class contains factory method
- * to create new {@link com.sun.xml.internal.ws.policy.sourcemodel.ModelNode} instances associated with the actual model instance.
- *
- * @author Marek Potociar
- * @author Fabian Ritzmann
- */
-public class PolicySourceModel implements Cloneable {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicySourceModel.class);
-
- private static final Map<String, String> DEFAULT_NAMESPACE_TO_PREFIX = new HashMap<String, String>();
- static {
- PrefixMapper[] prefixMappers = PolicyUtils.ServiceProvider.load(PrefixMapper.class);
- if (prefixMappers != null) {
- for (PrefixMapper mapper: prefixMappers) {
- DEFAULT_NAMESPACE_TO_PREFIX.putAll(mapper.getPrefixMap());
- }
- }
-
- for (NamespaceVersion version : NamespaceVersion.values()) {
- DEFAULT_NAMESPACE_TO_PREFIX.put(version.toString(), version.getDefaultNamespacePrefix());
- }
- DEFAULT_NAMESPACE_TO_PREFIX.put(PolicyConstants.WSU_NAMESPACE_URI,
- PolicyConstants.WSU_NAMESPACE_PREFIX);
- DEFAULT_NAMESPACE_TO_PREFIX.put(PolicyConstants.SUN_POLICY_NAMESPACE_URI,
- PolicyConstants.SUN_POLICY_NAMESPACE_PREFIX);
- }
-
- // Map namespaces to prefixes
- private final Map<String, String> namespaceToPrefix =
- new HashMap<String, String>(DEFAULT_NAMESPACE_TO_PREFIX);
-
- private ModelNode rootNode;
- private final String policyId;
- private final String policyName;
- private final NamespaceVersion nsVersion;
- private final List<ModelNode> references = new LinkedList<ModelNode>(); // links to policy reference nodes
- private boolean expanded = false;
-
-
- /**
- * Factory method that creates new policy source model instance.
- *
- * This method is only intended to be used by code that has no dependencies on
- * JAX-WS. Otherwise use com.sun.xml.internal.ws.policy.api.SourceModel.
- *
- * @param nsVersion The policy version
- * @return Newly created policy source model instance.
- */
- public static PolicySourceModel createPolicySourceModel(final NamespaceVersion nsVersion) {
- return new PolicySourceModel(nsVersion);
- }
-
- /**
- * Factory method that creates new policy source model instance and initializes it according to parameters provided.
- *
- * This method is only intended to be used by code that has no dependencies on
- * JAX-WS. Otherwise use com.sun.xml.internal.ws.policy.api.SourceModel.
- *
- * @param nsVersion The policy version
- * @param policyId local policy identifier - relative URI. May be {@code null}.
- * @param policyName global policy identifier - absolute policy expression URI. May be {@code null}.
- * @return Newly created policy source model instance with its name and id properly set.
- */
- public static PolicySourceModel createPolicySourceModel(final NamespaceVersion nsVersion, final String policyId, final String policyName) {
- return new PolicySourceModel(nsVersion, policyId, policyName);
- }
-
- /**
- * Constructor that creates a new policy source model instance without any
- * id or name identifier. The namespace-to-prefix map is initialized with mapping
- * of policy namespace to the default value set by
- * {@link PolicyConstants#POLICY_NAMESPACE_PREFIX POLICY_NAMESPACE_PREFIX constant}.
- *
- * @param nsVersion The WS-Policy version.
- */
- private PolicySourceModel(NamespaceVersion nsVersion) {
- this(nsVersion, null, null);
- }
-
- /**
- * Constructor that creates a new policy source model instance with given
- * id or name identifier.
- *
- * @param nsVersion The WS-Policy version.
- * @param policyId Relative policy reference within an XML document. May be {@code null}.
- * @param policyName Absolute IRI of policy expression. May be {@code null}.
- */
- private PolicySourceModel(NamespaceVersion nsVersion, String policyId, String policyName) {
- this(nsVersion, policyId, policyName, null);
- }
-
- /**
- * Constructor that creates a new policy source model instance with given
- * id or name identifier and a set of PrefixMappers.
- *
- * This constructor is intended to be used by the JAX-WS com.sun.xml.internal.ws.policy.api.SourceModel.
- *
- * @param nsVersion The WS-Policy version.
- * @param policyId Relative policy reference within an XML document. May be {@code null}.
- * @param policyName Absolute IRI of policy expression. May be {@code null}.
- * @param prefixMappers A collection of PrefixMappers to be used with this instance. May be {@code null}.
- */
- protected PolicySourceModel(NamespaceVersion nsVersion, String policyId,
- String policyName, Collection<PrefixMapper> prefixMappers) {
- this.rootNode = ModelNode.createRootPolicyNode(this);
- this.nsVersion = nsVersion;
- this.policyId = policyId;
- this.policyName = policyName;
- if (prefixMappers != null) {
- for (PrefixMapper prefixMapper : prefixMappers) {
- this.namespaceToPrefix.putAll(prefixMapper.getPrefixMap());
- }
- }
- }
-
- /**
- * Returns a root node of this policy source model. It is allways of POLICY type.
- *
- * @return root policy source model node - allways of POLICY type.
- */
- public ModelNode getRootNode() {
- return rootNode;
- }
-
- /**
- * Returns a policy name of this policy source model.
- *
- * @return policy name.
- */
- public String getPolicyName() {
- return policyName;
- }
-
- /**
- * Returns a policy ID of this policy source model.
- *
- * @return policy ID.
- */
- public String getPolicyId() {
- return policyId;
- }
-
- /**
- * Returns an original namespace version of this policy source model.
- *
- * @return namespace version.
- */
- public NamespaceVersion getNamespaceVersion() {
- return nsVersion;
- }
-
- /**
- * Provides information about how namespaces used in this {@link PolicySourceModel}
- * instance should be mapped to their default prefixes when marshalled.
- *
- * @return immutable map that holds information about namespaces used in the
- * model and their mapping to prefixes that should be used when marshalling
- * this model.
- * @throws PolicyException Thrown if one of the prefix mappers threw an exception.
- */
- Map<String, String> getNamespaceToPrefixMapping() throws PolicyException {
- final Map<String, String> nsToPrefixMap = new HashMap<String, String>();
-
- final Collection<String> namespaces = getUsedNamespaces();
- for (String namespace : namespaces) {
- final String prefix = getDefaultPrefix(namespace);
- if (prefix != null) {
- nsToPrefixMap.put(namespace, prefix);
- }
- }
-
- return nsToPrefixMap;
- }
-
- /**
- * An {@code Object.equals(Object obj)} method override.
- * <p/>
- * When child nodes are tested for equality, the parent policy source model is not considered. Thus two different
- * policy source models instances may be equal based on their node content.
- */
- @Override
- public boolean equals(final Object obj) {
- if (this == obj) {
- return true;
- }
-
- if (!(obj instanceof PolicySourceModel)) {
- return false;
- }
-
- boolean result = true;
- final PolicySourceModel that = (PolicySourceModel) obj;
-
- result = result && ((this.policyId == null) ? that.policyId == null : this.policyId.equals(that.policyId));
- result = result && ((this.policyName == null) ? that.policyName == null : this.policyName.equals(that.policyName));
- result = result && this.rootNode.equals(that.rootNode);
-
- return result;
- }
-
- /**
- * An {@code Object.hashCode()} method override.
- */
- @Override
- public int hashCode() {
- int result = 17;
-
- result = 37 * result + ((this.policyId == null) ? 0 : this.policyId.hashCode());
- result = 37 * result + ((this.policyName == null) ? 0 : this.policyName.hashCode());
- result = 37 * result + this.rootNode.hashCode();
-
- return result;
- }
-
- /**
- * Returns a string representation of the object. In general, the <code>toString</code> method
- * returns a string that "textually represents" this object.
- *
- * @return a string representation of the object.
- */
- @Override
- public String toString() {
- final String innerIndent = PolicyUtils.Text.createIndent(1);
- final StringBuffer buffer = new StringBuffer(60);
-
- buffer.append("Policy source model {").append(PolicyUtils.Text.NEW_LINE);
- buffer.append(innerIndent).append("policy id = '").append(policyId).append('\'').append(PolicyUtils.Text.NEW_LINE);
- buffer.append(innerIndent).append("policy name = '").append(policyName).append('\'').append(PolicyUtils.Text.NEW_LINE);
- rootNode.toString(1, buffer).append(PolicyUtils.Text.NEW_LINE).append('}');
-
- return buffer.toString();
- }
-
- @Override
- protected PolicySourceModel clone() throws CloneNotSupportedException {
- final PolicySourceModel clone = (PolicySourceModel) super.clone();
-
- clone.rootNode = this.rootNode.clone();
- try {
- clone.rootNode.setParentModel(clone);
- } catch (IllegalAccessException e) {
- throw LOGGER.logSevereException(new CloneNotSupportedException(LocalizationMessages.WSP_0013_UNABLE_TO_SET_PARENT_MODEL_ON_ROOT()), e);
- }
-
- return clone;
- }
-
- /**
- * Returns a boolean value indicating whether this policy source model contains references to another policy source models.
- * <p/>
- * Every source model that references other policies must be expanded before it can be translated into a Policy objects. See
- * {@link #expand(PolicySourceModelContext)} and {@link #isExpanded()} for more details.
- *
- * @return {@code true} or {code false} depending on whether this policy source model contains references to another policy source models.
- */
- public boolean containsPolicyReferences() {
- return !references.isEmpty();
- }
-
- /**
- * Returns a boolean value indicating whether this policy source model contains is already expanded (i.e. contains no unexpanded
- * policy references) or not. This means that if model does not originally contain any policy references, it is considered as expanded,
- * thus this method returns {@code true} in such case. Also this method does not check whether the references policy source models are expanded
- * as well, so after expanding this model a value of {@code true} is returned even if referenced models are not expanded yet. Thus each model
- * can be considered to be fully expanded only if all policy source models stored in PolicySourceModelContext instance are expanded, provided the
- * PolicySourceModelContext instance contains full set of policy source models.
- * <p/>
- * Every source model that references other policies must be expanded before it can be translated into a Policy object. See
- * {@link #expand(PolicySourceModelContext)} and {@link #containsPolicyReferences()} for more details.
- *
- * @return {@code true} or {@code false} depending on whether this policy source model contains is expanded or not.
- */
- private boolean isExpanded() {
- return references.isEmpty() || expanded;
- }
-
- /**
- * Expands current policy model. This means, that if this model contains any (unexpanded) policy references, then the method expands those
- * references by placing the content of the referenced policy source models under the policy reference nodes. This operation merely creates
- * a link between this and referenced policy source models. Thus any change in the referenced models will be visible wihtin this model as well.
- * <p/>
- * Please, notice that the method does not check if the referenced models are already expanded nor does the method try to expand unexpanded
- * referenced models. This must be preformed manually within client's code. Consecutive calls of this method will have no effect.
- * <p/>
- * Every source model that references other policies must be expanded before it can be translated into a Policy object. See
- * {@link #isExpanded()} and {@link #containsPolicyReferences()} for more details.
- *
- * @param context a policy source model context holding the set of unmarshalled policy source models within the same context.
- * @throws PolicyException Thrown if a referenced policy could not be resolved
- */
- public synchronized void expand(final PolicySourceModelContext context) throws PolicyException {
- if (!isExpanded()) {
- for (ModelNode reference : references) {
- final PolicyReferenceData refData = reference.getPolicyReferenceData();
- final String digest = refData.getDigest();
- PolicySourceModel referencedModel;
- if (digest == null) {
- referencedModel = context.retrieveModel(refData.getReferencedModelUri());
- } else {
- referencedModel = context.retrieveModel(refData.getReferencedModelUri(), refData.getDigestAlgorithmUri(), digest);
- }
-
- reference.setReferencedModel(referencedModel);
- }
- expanded = true;
- }
- }
-
- /**
- * Adds new policy reference to the policy source model. The method is used by
- * the ModelNode instances of type POLICY_REFERENCE that need to register themselves
- * as policy references in the model.
- *
- * @param node policy reference model node to be registered as a policy reference
- * in this model.
- */
- void addNewPolicyReference(final ModelNode node) {
- if (node.getType() != ModelNode.Type.POLICY_REFERENCE) {
- throw new IllegalArgumentException(LocalizationMessages.WSP_0042_POLICY_REFERENCE_NODE_EXPECTED_INSTEAD_OF(node.getType()));
- }
-
- references.add(node);
- }
-
- /**
- * Iterates through policy vocabulary and extracts set of namespaces used in
- * the policy expression.
- *
- * @return collection of used namespaces within given policy instance
- * @throws PolicyException Thrown if internal processing failed.
- */
- private Collection<String> getUsedNamespaces() throws PolicyException {
- final Set<String> namespaces = new HashSet<String>();
- namespaces.add(getNamespaceVersion().toString());
-
- if (this.policyId != null) {
- namespaces.add(PolicyConstants.WSU_NAMESPACE_URI);
- }
-
- final Queue<ModelNode> nodesToBeProcessed = new LinkedList<ModelNode>();
- nodesToBeProcessed.add(rootNode);
-
- ModelNode processedNode;
- while ((processedNode = nodesToBeProcessed.poll()) != null) {
- for (ModelNode child : processedNode.getChildren()) {
- if (child.hasChildren()) {
- if (!nodesToBeProcessed.offer(child)) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0081_UNABLE_TO_INSERT_CHILD(nodesToBeProcessed, child)));
- }
- }
-
- if (child.isDomainSpecific()) {
- final AssertionData nodeData = child.getNodeData();
- namespaces.add(nodeData.getName().getNamespaceURI());
- if (nodeData.isPrivateAttributeSet()) {
- namespaces.add(PolicyConstants.SUN_POLICY_NAMESPACE_URI);
- }
-
- for (Entry<QName, String> attribute : nodeData.getAttributesSet()) {
- namespaces.add(attribute.getKey().getNamespaceURI());
- }
- }
- }
- }
-
- return namespaces;
- }
-
- /**
- * Method retrieves default prefix for given namespace. Method returns null if
- * no default prefix is defined..
- *
- * @param namespace to get default prefix for.
- * @return default prefix for given namespace. May return {@code null} if the
- * default prefix for given namespace is not defined.
- */
- private String getDefaultPrefix(final String namespace) {
- return namespaceToPrefix.get(namespace);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicySourceModelContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicySourceModelContext.java
deleted file mode 100644
index 3851b2a9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/PolicySourceModelContext.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel;
-
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- *
- * @author Marek Potociar, Jakub Podlesak
- */
-public final class PolicySourceModelContext {
-
- Map<URI,PolicySourceModel> policyModels;
-
- /**
- * Private constructor prevents instantiation of the instance from outside of the class
- */
- private PolicySourceModelContext() {
- // nothing to initialize
- }
-
- private Map<URI,PolicySourceModel> getModels() {
- if (null==policyModels) {
- policyModels = new HashMap<URI,PolicySourceModel>();
- }
- return policyModels;
- }
-
- public void addModel(final URI modelUri, final PolicySourceModel model) {
- getModels().put(modelUri,model);
- }
-
- public static PolicySourceModelContext createContext() {
- return new PolicySourceModelContext();
- }
-
- public boolean containsModel(final URI modelUri) {
- return getModels().containsKey(modelUri);
- }
-
- PolicySourceModel retrieveModel(final URI modelUri) {
- return getModels().get(modelUri);
- }
-
- PolicySourceModel retrieveModel(final URI modelUri, final URI digestAlgorithm, final String digest) {
- // TODO: implement
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String toString() {
- return "PolicySourceModelContext: policyModels = " + this.policyModels;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/XmlPolicyModelMarshaller.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/XmlPolicyModelMarshaller.java
deleted file mode 100644
index 4c847bbb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/XmlPolicyModelMarshaller.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel;
-
-import com.sun.xml.internal.txw2.TXW;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.output.StaxSerializer;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.XmlToken;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion;
-import com.sun.xml.internal.ws.policy.PolicyConstants;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Map.Entry;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamWriter;
-
-
-public final class XmlPolicyModelMarshaller extends PolicyModelMarshaller {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(XmlPolicyModelMarshaller.class);
-
- private final boolean marshallInvisible;
-
-
- XmlPolicyModelMarshaller(boolean marshallInvisible) {
- this.marshallInvisible = marshallInvisible;
- }
-
- public void marshal(final PolicySourceModel model, final Object storage) throws PolicyException {
- if (storage instanceof StaxSerializer) {
- marshal(model, (StaxSerializer) storage);
- } else if (storage instanceof TypedXmlWriter) {
- marshal(model, (TypedXmlWriter) storage);
- } else if (storage instanceof XMLStreamWriter) {
- marshal(model, (XMLStreamWriter) storage);
- } else {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0022_STORAGE_TYPE_NOT_SUPPORTED(storage.getClass().getName())));
- }
- }
-
- public void marshal(final Collection<PolicySourceModel> models, final Object storage) throws PolicyException {
- for (PolicySourceModel model : models) {
- marshal(model, storage);
- }
- }
-
- /**
- * Marshal a policy onto the given StaxSerializer.
- *
- * @param model A policy source model.
- * @param writer A Stax serializer.
- * @throws PolicyException If marshalling failed.
- */
- private void marshal(final PolicySourceModel model, final StaxSerializer writer) throws PolicyException {
- final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, writer);
-
- marshalDefaultPrefixes(model, policy);
- marshalPolicyAttributes(model, policy);
- marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
- policy.commit();
- }
-
- /**
- * Marshal a policy onto the given TypedXmlWriter.
- *
- * @param model A policy source model.
- * @param writer A typed XML writer.
- * @throws PolicyException If marshalling failed.
- */
- private void marshal(final PolicySourceModel model, final TypedXmlWriter writer) throws PolicyException {
- final TypedXmlWriter policy = writer._element(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class);
-
- marshalDefaultPrefixes(model, policy);
- marshalPolicyAttributes(model, policy);
- marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
- }
-
- /**
- * Marshal a policy onto the given XMLStreamWriter.
- *
- * @param model A policy source model.
- * @param writer An XML stream writer.
- * @throws PolicyException If marshalling failed.
- */
- private void marshal(final PolicySourceModel model, final XMLStreamWriter writer) throws PolicyException {
- final StaxSerializer serializer = new StaxSerializer(writer);
- final TypedXmlWriter policy = TXW.create(model.getNamespaceVersion().asQName(XmlToken.Policy), TypedXmlWriter.class, serializer);
-
- marshalDefaultPrefixes(model, policy);
- marshalPolicyAttributes(model, policy);
- marshal(model.getNamespaceVersion(), model.getRootNode(), policy);
- policy.commit();
- serializer.flush();
- }
-
- /**
- * Marshal the Policy root element attributes onto the TypedXmlWriter.
- *
- * @param model The policy source model.
- * @param writer The typed XML writer.
- */
- private static void marshalPolicyAttributes(final PolicySourceModel model, final TypedXmlWriter writer) {
- final String policyId = model.getPolicyId();
- if (policyId != null) {
- writer._attribute(PolicyConstants.WSU_ID, policyId);
- }
-
- final String policyName = model.getPolicyName();
- if (policyName != null) {
- writer._attribute(model.getNamespaceVersion().asQName(XmlToken.Name), policyName);
- }
- }
-
- /**
- * Marshal given ModelNode and child elements on given TypedXmlWriter.
- *
- * @param nsVersion The WS-Policy version.
- * @param rootNode The ModelNode that is marshalled.
- * @param writer The TypedXmlWriter onto which the content of the rootNode is marshalled.
- */
- private void marshal(final NamespaceVersion nsVersion, final ModelNode rootNode, final TypedXmlWriter writer) {
- for (ModelNode node : rootNode) {
- final AssertionData data = node.getNodeData();
- if (marshallInvisible || data == null || !data.isPrivateAttributeSet()) {
- TypedXmlWriter child = null;
- if (data == null) {
- child = writer._element(nsVersion.asQName(node.getType().getXmlToken()), TypedXmlWriter.class);
- } else {
- child = writer._element(data.getName(), TypedXmlWriter.class);
- final String value = data.getValue();
- if (value != null) {
- child._pcdata(value);
- }
- if (data.isOptionalAttributeSet()) {
- child._attribute(nsVersion.asQName(XmlToken.Optional), Boolean.TRUE);
- }
- if (data.isIgnorableAttributeSet()) {
- child._attribute(nsVersion.asQName(XmlToken.Ignorable), Boolean.TRUE);
- }
- for (Entry<QName, String> entry : data.getAttributesSet()) {
- child._attribute(entry.getKey(), entry.getValue());
- }
- }
- marshal(nsVersion, node, child);
- }
- }
- }
-
- /**
- * Write default prefixes onto the given TypedXmlWriter
- *
- * @param model The policy source model. May not be null.
- * @param writer The TypedXmlWriter. May not be null.
- * @throws PolicyException If the creation of the prefix to namespace URI map failed.
- */
- private void marshalDefaultPrefixes(final PolicySourceModel model, final TypedXmlWriter writer) throws PolicyException {
- final Map<String, String> nsMap = model.getNamespaceToPrefixMapping();
- if (!marshallInvisible && nsMap.containsKey(PolicyConstants.SUN_POLICY_NAMESPACE_URI)) {
- nsMap.remove(PolicyConstants.SUN_POLICY_NAMESPACE_URI);
- }
- for (Map.Entry<String, String> nsMappingEntry : nsMap.entrySet()) {
- writer._namespace(nsMappingEntry.getKey(), nsMappingEntry.getValue());
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/XmlPolicyModelUnmarshaller.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/XmlPolicyModelUnmarshaller.java
deleted file mode 100644
index 44f75411..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/XmlPolicyModelUnmarshaller.java
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel;
-
-import com.sun.xml.internal.ws.policy.PolicyConstants;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion;
-import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.XmlToken;
-
-import java.io.Reader;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLEventReader;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.events.Attribute;
-import javax.xml.stream.events.Characters;
-import javax.xml.stream.events.EndElement;
-import javax.xml.stream.events.StartElement;
-import javax.xml.stream.events.XMLEvent;
-
-/**
- * Unmarshal XML policy expressions.
- *
- * @author Marek Potociar
- * @author Fabian Ritzmann
- */
-public class XmlPolicyModelUnmarshaller extends PolicyModelUnmarshaller {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(XmlPolicyModelUnmarshaller.class);
-
- /**
- * Creates a new instance of XmlPolicyModelUnmarshaller
- */
- protected XmlPolicyModelUnmarshaller() {
- // nothing to initialize
- }
-
- /**
- * See {@link PolicyModelUnmarshaller#unmarshalModel(Object) base method documentation}.
- */
- public PolicySourceModel unmarshalModel(final Object storage) throws PolicyException {
- final XMLEventReader reader = createXMLEventReader(storage);
- PolicySourceModel model = null;
-
- loop:
- while (reader.hasNext()) {
- try {
- final XMLEvent event = reader.peek();
- switch (event.getEventType()) {
- case XMLStreamConstants.START_DOCUMENT:
- case XMLStreamConstants.COMMENT:
- reader.nextEvent();
- break; // skipping the comments and start document events
- case XMLStreamConstants.CHARACTERS:
- processCharacters(ModelNode.Type.POLICY, event.asCharacters(), null);
- // we advance the reader only if there is no exception thrown from
- // the processCharacters(...) call. Otherwise we don't modify the stream
- reader.nextEvent();
- break;
- case XMLStreamConstants.START_ELEMENT:
- if (NamespaceVersion.resolveAsToken(event.asStartElement().getName()) == XmlToken.Policy) {
- StartElement rootElement = reader.nextEvent().asStartElement();
-
- model = initializeNewModel(rootElement);
- unmarshalNodeContent(model.getNamespaceVersion(), model.getRootNode(), rootElement.getName(), reader);
-
- break loop;
- } else {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0048_POLICY_ELEMENT_EXPECTED_FIRST()));
- }
- default:
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0048_POLICY_ELEMENT_EXPECTED_FIRST()));
- }
- } catch (XMLStreamException e) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0068_FAILED_TO_UNMARSHALL_POLICY_EXPRESSION(), e));
- }
- }
- return model;
- }
-
- /**
- * Allow derived classes to pass in a custom instance of PolicySourceModel.
- *
- * @param nsVersion
- * @param id
- * @param name
- * @return
- */
- protected PolicySourceModel createSourceModel(NamespaceVersion nsVersion, String id, String name) {
- return PolicySourceModel.createPolicySourceModel(nsVersion, id, name);
- }
-
- private PolicySourceModel initializeNewModel(final StartElement element) throws PolicyException, XMLStreamException {
- PolicySourceModel model;
-
- final NamespaceVersion nsVersion = NamespaceVersion.resolveVersion(element.getName().getNamespaceURI());
-
- final Attribute policyName = getAttributeByName(element, nsVersion.asQName(XmlToken.Name));
- final Attribute xmlId = getAttributeByName(element, PolicyConstants.XML_ID);
- Attribute policyId = getAttributeByName(element, PolicyConstants.WSU_ID);
-
- if (policyId == null) {
- policyId = xmlId;
- } else if (xmlId != null) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0058_MULTIPLE_POLICY_IDS_NOT_ALLOWED()));
- }
-
- model = createSourceModel(nsVersion,
- (policyId == null) ? null : policyId.getValue(),
- (policyName == null) ? null : policyName.getValue());
-
- return model;
- }
-
- private ModelNode addNewChildNode(final NamespaceVersion nsVersion, final ModelNode parentNode, final StartElement childElement) throws PolicyException {
- ModelNode childNode;
- final QName childElementName = childElement.getName();
- if (parentNode.getType() == ModelNode.Type.ASSERTION_PARAMETER_NODE) {
- childNode = parentNode.createChildAssertionParameterNode();
- } else {
- XmlToken token = NamespaceVersion.resolveAsToken(childElementName);
-
- switch (token) {
- case Policy:
- childNode = parentNode.createChildPolicyNode();
- break;
- case All:
- childNode = parentNode.createChildAllNode();
- break;
- case ExactlyOne:
- childNode = parentNode.createChildExactlyOneNode();
- break;
- case PolicyReference:
- final Attribute uri = getAttributeByName(childElement, nsVersion.asQName(XmlToken.Uri));
- if (uri == null) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0040_POLICY_REFERENCE_URI_ATTR_NOT_FOUND()));
- } else {
- try {
- final URI reference = new URI(uri.getValue());
- final Attribute digest = getAttributeByName(childElement, nsVersion.asQName(XmlToken.Digest));
- PolicyReferenceData refData;
- if (digest == null) {
- refData = new PolicyReferenceData(reference);
- } else {
- final Attribute digestAlgorithm = getAttributeByName(childElement, nsVersion.asQName(XmlToken.DigestAlgorithm));
- URI algorithmRef = null;
- if (digestAlgorithm != null) {
- algorithmRef = new URI(digestAlgorithm.getValue());
- }
- refData = new PolicyReferenceData(reference, digest.getValue(), algorithmRef);
- }
- childNode = parentNode.createChildPolicyReferenceNode(refData);
- } catch (URISyntaxException e) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0012_UNABLE_TO_UNMARSHALL_POLICY_MALFORMED_URI(), e));
- }
- }
- break;
- default:
- if (parentNode.isDomainSpecific()) {
- childNode = parentNode.createChildAssertionParameterNode();
- } else {
- childNode = parentNode.createChildAssertionNode();
- }
- }
- }
-
- return childNode;
- }
-
- private void parseAssertionData(NamespaceVersion nsVersion, String value, ModelNode childNode, final StartElement childElement) throws IllegalArgumentException, PolicyException {
- // finish assertion node processing: create and set assertion data...
- final Map<QName, String> attributeMap = new HashMap<QName, String>();
- boolean optional = false;
- boolean ignorable = false;
-
- final Iterator iterator = childElement.getAttributes();
- while (iterator.hasNext()) {
- final Attribute nextAttribute = (Attribute) iterator.next();
- final QName name = nextAttribute.getName();
- if (attributeMap.containsKey(name)) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0059_MULTIPLE_ATTRS_WITH_SAME_NAME_DETECTED_FOR_ASSERTION(nextAttribute.getName(), childElement.getName())));
- } else {
- if (nsVersion.asQName(XmlToken.Optional).equals(name)) {
- optional = parseBooleanValue(nextAttribute.getValue());
- } else if (nsVersion.asQName(XmlToken.Ignorable).equals(name)) {
- ignorable = parseBooleanValue(nextAttribute.getValue());
- } else {
- attributeMap.put(name, nextAttribute.getValue());
- }
- }
- }
- final AssertionData nodeData = new AssertionData(childElement.getName(), value, attributeMap, childNode.getType(), optional, ignorable);
-
- // check visibility value syntax if present...
- if (nodeData.containsAttribute(PolicyConstants.VISIBILITY_ATTRIBUTE)) {
- final String visibilityValue = nodeData.getAttributeValue(PolicyConstants.VISIBILITY_ATTRIBUTE);
- if (!PolicyConstants.VISIBILITY_VALUE_PRIVATE.equals(visibilityValue)) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0004_UNEXPECTED_VISIBILITY_ATTR_VALUE(visibilityValue)));
- }
- }
-
- childNode.setOrReplaceNodeData(nodeData);
- }
-
- private Attribute getAttributeByName(final StartElement element,
- final QName attributeName) {
- // call standard API method to retrieve the attribute by name
- Attribute attribute = element.getAttributeByName(attributeName);
-
- // try to find the attribute without a prefix.
- if (attribute == null) {
- final String localAttributeName = attributeName.getLocalPart();
- final Iterator iterator = element.getAttributes();
- while (iterator.hasNext()) {
- final Attribute nextAttribute = (Attribute) iterator.next();
- final QName aName = nextAttribute.getName();
- final boolean attributeFoundByWorkaround = aName.equals(attributeName) || (aName.getLocalPart().equals(localAttributeName) && (aName.getPrefix() == null || "".equals(aName.getPrefix())));
- if (attributeFoundByWorkaround) {
- attribute = nextAttribute;
- break;
- }
-
- }
- }
-
- return attribute;
- }
-
- private String unmarshalNodeContent(final NamespaceVersion nsVersion, final ModelNode node, final QName nodeElementName, final XMLEventReader reader) throws PolicyException {
- StringBuilder valueBuffer = null;
-
- loop:
- while (reader.hasNext()) {
- try {
- final XMLEvent xmlParserEvent = reader.nextEvent();
- switch (xmlParserEvent.getEventType()) {
- case XMLStreamConstants.COMMENT:
- break; // skipping the comments
- case XMLStreamConstants.CHARACTERS:
- valueBuffer = processCharacters(node.getType(), xmlParserEvent.asCharacters(), valueBuffer);
- break;
- case XMLStreamConstants.END_ELEMENT:
- checkEndTagName(nodeElementName, xmlParserEvent.asEndElement());
- break loop; // data exctraction for currently processed policy node is done
- case XMLStreamConstants.START_ELEMENT:
- final StartElement childElement = xmlParserEvent.asStartElement();
-
- ModelNode childNode = addNewChildNode(nsVersion, node, childElement);
- String value = unmarshalNodeContent(nsVersion, childNode, childElement.getName(), reader);
-
- if (childNode.isDomainSpecific()) {
- parseAssertionData(nsVersion, value, childNode, childElement);
- }
- break;
- default:
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0011_UNABLE_TO_UNMARSHALL_POLICY_XML_ELEM_EXPECTED()));
- }
- } catch (XMLStreamException e) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0068_FAILED_TO_UNMARSHALL_POLICY_EXPRESSION(), e));
- }
- }
-
- return (valueBuffer == null) ? null : valueBuffer.toString().trim();
- }
-
- /**
- * Method checks if the storage type is supported and transforms it to XMLEventReader instance which is then returned.
- * Throws PolicyException if the transformation is not succesfull or if the storage type is not supported.
- *
- * @param storage An XMLEventReader instance.
- * @return The storage cast to an XMLEventReader.
- * @throws PolicyException If the XMLEventReader cast failed.
- */
- private XMLEventReader createXMLEventReader(final Object storage)
- throws PolicyException {
- if (storage instanceof XMLEventReader) {
- return (XMLEventReader) storage;
- }
- else if (!(storage instanceof Reader)) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0022_STORAGE_TYPE_NOT_SUPPORTED(storage.getClass().getName())));
- }
-
- try {
- return XMLInputFactory.newInstance().createXMLEventReader((Reader) storage);
- } catch (XMLStreamException e) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0014_UNABLE_TO_INSTANTIATE_READER_FOR_STORAGE(), e));
- }
-
- }
-
- /**
- * Method checks whether the actual name of the end tag is equal to the expected name - the name of currently unmarshalled
- * XML policy model element. Throws exception, if the two FQNs are not equal as expected.
- *
- * @param expected The expected element name.
- * @param element The actual element.
- * @throws PolicyException If the actual element name did not match the expected element.
- */
- private void checkEndTagName(final QName expected, final EndElement element) throws PolicyException {
- final QName actual = element.getName();
- if (!expected.equals(actual)) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0003_UNMARSHALLING_FAILED_END_TAG_DOES_NOT_MATCH(expected, actual)));
- }
-
- }
-
- private StringBuilder processCharacters(final ModelNode.Type currentNodeType, final Characters characters,
- final StringBuilder currentValueBuffer)
- throws PolicyException {
- if (characters.isWhiteSpace()) {
- return currentValueBuffer;
- } else {
- final StringBuilder buffer = (currentValueBuffer == null) ? new StringBuilder() : currentValueBuffer;
- final String data = characters.getData();
- if (currentNodeType == ModelNode.Type.ASSERTION || currentNodeType == ModelNode.Type.ASSERTION_PARAMETER_NODE) {
- return buffer.append(data);
- } else {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0009_UNEXPECTED_CDATA_ON_SOURCE_MODEL_NODE(currentNodeType, data)));
- }
-
- }
- }
-
- /**
- * Return true if the value is "true" or "1". Return false if the value is
- * "false" or "0". Throw an exception otherwise. The test is case sensitive.
- *
- * @param value The String representation of the value. Must not be null.
- * @return True if the value is "true" or "1". False if the value is
- * "false" or "0".
- * @throws PolicyException If the value is not "true", "false", "0" or "1".
- */
- private boolean parseBooleanValue(String value) throws PolicyException {
- if ("true".equals(value) || "1".equals(value)) {
- return true;
- }
- else if ("false".equals(value) || "0".equals(value)) {
- return false;
- }
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0095_INVALID_BOOLEAN_VALUE(value)));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.java
deleted file mode 100644
index a9a73812..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.policy.sourcemodel.attach;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-import java.util.WeakHashMap;
-
-/**
- * Simple utility ensuring that the value is cached only in case it is non-internal implementation
- */
-abstract class ContextClassloaderLocal<V> {
-
- private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
-
- private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<ClassLoader, V>();
-
- public V get() throws Error {
- ClassLoader tccl = getContextClassLoader();
- V instance = CACHE.get(tccl);
- if (instance == null) {
- instance = createNewInstance();
- CACHE.put(tccl, instance);
- }
- return instance;
- }
-
- public void set(V instance) {
- CACHE.put(getContextClassLoader(), instance);
- }
-
- protected abstract V initialValue() throws Exception;
-
- private V createNewInstance() {
- try {
- return initialValue();
- } catch (Exception e) {
- throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e);
- }
- }
-
- private static String format(String property, Object... args) {
- String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property);
- return MessageFormat.format(text, args);
- }
-
- private static ClassLoader getContextClassLoader() {
- return (ClassLoader)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- ClassLoader cl = null;
- try {
- cl = Thread.currentThread().getContextClassLoader();
- } catch (SecurityException ex) {
- }
- return cl;
- }
- });
- }
-}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.properties
deleted file mode 100644
index 1a8fc17a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ContextClassloaderLocal.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-# Error messages for ContextClassloaderLocal utility class
-FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ExternalAttachmentsUnmarshaller.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ExternalAttachmentsUnmarshaller.java
deleted file mode 100644
index aaed1d8f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/ExternalAttachmentsUnmarshaller.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.policy.sourcemodel.attach;
-
-import com.sun.xml.internal.ws.policy.Policy;
-import com.sun.xml.internal.ws.policy.PolicyConstants;
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicyModelTranslator;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicyModelUnmarshaller;
-import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel;
-
-import java.io.Reader;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import javax.xml.namespace.QName;
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLEventReader;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.events.Characters;
-import javax.xml.stream.events.EndElement;
-import javax.xml.stream.events.StartElement;
-import javax.xml.stream.events.XMLEvent;
-
-/**
- * Unmarshal external policy attachments.
- *
- * @author Fabian Ritzmann
- */
-public class ExternalAttachmentsUnmarshaller {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(ExternalAttachmentsUnmarshaller.class);
-
- public static final URI BINDING_ID;
- public static final URI BINDING_OPERATION_ID;
- public static final URI BINDING_OPERATION_INPUT_ID;
- public static final URI BINDING_OPERATION_OUTPUT_ID;
- public static final URI BINDING_OPERATION_FAULT_ID;
-
- static {
- try {
- BINDING_ID = new URI("urn:uuid:c9bef600-0d7a-11de-abc1-0002a5d5c51b");
- BINDING_OPERATION_ID = new URI("urn:uuid:62e66b60-0d7b-11de-a1a2-0002a5d5c51b");
- BINDING_OPERATION_INPUT_ID = new URI("urn:uuid:730d8d20-0d7b-11de-84e9-0002a5d5c51b");
- BINDING_OPERATION_OUTPUT_ID = new URI("urn:uuid:85b0f980-0d7b-11de-8e9d-0002a5d5c51b");
- BINDING_OPERATION_FAULT_ID = new URI("urn:uuid:917cb060-0d7b-11de-9e80-0002a5d5c51b");
- } catch (URISyntaxException e) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0094_INVALID_URN()), e);
- }
- }
-
- private static final QName POLICY_ATTACHMENT = new QName("http://www.w3.org/ns/ws-policy", "PolicyAttachment");
- private static final QName APPLIES_TO = new QName("http://www.w3.org/ns/ws-policy", "AppliesTo");
- private static final QName POLICY = new QName("http://www.w3.org/ns/ws-policy", "Policy");
- private static final QName URI = new QName("http://www.w3.org/ns/ws-policy", "URI");
- private static final QName POLICIES = new QName(PolicyConstants.SUN_MANAGEMENT_NAMESPACE, "Policies");
- private static final ContextClassloaderLocal<XMLInputFactory> XML_INPUT_FACTORY = new ContextClassloaderLocal<XMLInputFactory>() {
- @Override
- protected XMLInputFactory initialValue() throws Exception {
- return XMLInputFactory.newInstance();
- }
- };
-
- private static final PolicyModelUnmarshaller POLICY_UNMARSHALLER = PolicyModelUnmarshaller.getXmlUnmarshaller();
-
- private final Map<URI, Policy> map = new HashMap<URI, Policy>();
- private URI currentUri = null;
- private Policy currentPolicy = null;
-
- public static Map<URI, Policy> unmarshal(final Reader source) throws PolicyException {
- LOGGER.entering(source);
- try {
- XMLEventReader reader = XML_INPUT_FACTORY.get().createXMLEventReader(source);
- ExternalAttachmentsUnmarshaller instance = new ExternalAttachmentsUnmarshaller();
- final Map<URI, Policy> map = instance.unmarshal(reader, null);
- LOGGER.exiting(map);
- return Collections.unmodifiableMap(map);
- } catch (XMLStreamException ex) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0086_FAILED_CREATE_READER(source)), ex);
- }
- }
-
- private Map<URI, Policy> unmarshal(final XMLEventReader reader, final StartElement parentElement) throws PolicyException {
- XMLEvent event = null;
- while (reader.hasNext()) {
- try {
- event = reader.peek();
- switch (event.getEventType()) {
- case XMLStreamConstants.START_DOCUMENT:
- case XMLStreamConstants.COMMENT:
- reader.nextEvent();
- break;
-
- case XMLStreamConstants.CHARACTERS:
- processCharacters(event.asCharacters(), parentElement, map);
- reader.nextEvent();
- break;
-
- case XMLStreamConstants.END_ELEMENT:
- processEndTag(event.asEndElement(), parentElement);
- reader.nextEvent();
- return map;
-
- case XMLStreamConstants.START_ELEMENT:
- final StartElement element = event.asStartElement();
- processStartTag(element, parentElement, reader, map);
- break;
-
- case XMLStreamConstants.END_DOCUMENT:
- return map;
-
- default:
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0087_UNKNOWN_EVENT(event)));
- }
- } catch (XMLStreamException e) {
- final Location location = event == null ? null : event.getLocation();
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0088_FAILED_PARSE(location)), e);
- }
- }
- return map;
- }
-
- private void processStartTag(final StartElement element, final StartElement parent,
- final XMLEventReader reader, final Map<URI, Policy> map)
- throws PolicyException {
- try {
- final QName name = element.getName();
- if (parent == null) {
- if (!name.equals(POLICIES)) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0089_EXPECTED_ELEMENT("<Policies>", name, element.getLocation())));
- }
- } else {
- final QName parentName = parent.getName();
- if (parentName.equals(POLICIES)) {
- if (!name.equals(POLICY_ATTACHMENT)) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0089_EXPECTED_ELEMENT("<PolicyAttachment>", name, element.getLocation())));
- }
- } else if (parentName.equals(POLICY_ATTACHMENT)) {
- if (name.equals(POLICY)) {
- readPolicy(reader);
- return;
- } else if (!name.equals(APPLIES_TO)) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0089_EXPECTED_ELEMENT("<AppliesTo> or <Policy>", name, element.getLocation())));
- }
- } else if (parentName.equals(APPLIES_TO)) {
- if (!name.equals(URI)) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0089_EXPECTED_ELEMENT("<URI>", name, element.getLocation())));
- }
- } else {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0090_UNEXPECTED_ELEMENT(name, element.getLocation())));
- }
- }
- reader.nextEvent();
- this.unmarshal(reader, element);
- } catch (XMLStreamException e) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0088_FAILED_PARSE(element.getLocation()), e));
- }
- }
-
- private void readPolicy(final XMLEventReader reader) throws PolicyException {
- final PolicySourceModel policyModel = POLICY_UNMARSHALLER.unmarshalModel(reader);
- final PolicyModelTranslator translator = PolicyModelTranslator.getTranslator();
- final Policy policy = translator.translate(policyModel);
- if (this.currentUri != null) {
- map.put(this.currentUri, policy);
- this.currentUri = null;
- this.currentPolicy = null;
- }
- else {
- this.currentPolicy = policy;
- }
- }
-
- private void processEndTag(EndElement element, StartElement startElement) throws PolicyException {
- checkEndTagName(startElement.getName(), element);
- }
-
- private void checkEndTagName(final QName expectedName, final EndElement element) throws PolicyException {
- final QName actualName = element.getName();
- if (!expectedName.equals(actualName)) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0091_END_ELEMENT_NO_MATCH(expectedName, element, element.getLocation())));
- }
-
- }
-
- private void processCharacters(final Characters chars, final StartElement currentElement, final Map<URI, Policy> map)
- throws PolicyException {
- if (chars.isWhiteSpace()) {
- return;
- }
- else {
- final String data = chars.getData();
- if ((currentElement != null) && URI.equals(currentElement.getName())) {
- processUri(chars, map);
- return;
- } else {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0092_CHARACTER_DATA_UNEXPECTED(currentElement, data, chars.getLocation())));
- }
-
- }
- }
-
- private void processUri(final Characters chars, final Map<URI, Policy> map) throws PolicyException {
- final String data = chars.getData().trim();
- try {
- final URI uri = new URI(data);
- if (this.currentPolicy != null) {
- map.put(uri, this.currentPolicy);
- this.currentUri = null;
- this.currentPolicy = null;
- } else {
- this.currentUri = uri;
- }
- } catch (URISyntaxException e) {
- throw LOGGER.logSevereException(new PolicyException(LocalizationMessages.WSP_0093_INVALID_URI(data, chars.getLocation())), e);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/package-info.java
deleted file mode 100644
index f15afc9e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/attach/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel.attach;
-
-/**
- * Implements utility routines to parse external policy attachments as defined
- * by WS-PolicyAttachment.
- */
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/package-info.java
deleted file mode 100644
index b652d1f9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/package-info.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * The part of public policy API that defines the classes and interfaces dealing with
- * the policy tree structure (policy source model) creation and manipulation.
- */
-package com.sun.xml.internal.ws.policy.sourcemodel;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/wspolicy/NamespaceVersion.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/wspolicy/NamespaceVersion.java
deleted file mode 100644
index 77f6b47b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/wspolicy/NamespaceVersion.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel.wspolicy;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import javax.xml.namespace.QName;
-
-/**
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public enum NamespaceVersion {
- v1_2("http://schemas.xmlsoap.org/ws/2004/09/policy", "wsp1_2", new XmlToken[] {
- XmlToken.Policy,
- XmlToken.ExactlyOne,
- XmlToken.All,
- XmlToken.PolicyReference,
- XmlToken.UsingPolicy,
- XmlToken.Name,
- XmlToken.Optional,
- XmlToken.Ignorable,
- XmlToken.PolicyUris,
- XmlToken.Uri,
- XmlToken.Digest,
- XmlToken.DigestAlgorithm
- }),
- v1_5("http://www.w3.org/ns/ws-policy", "wsp", new XmlToken[] {
- XmlToken.Policy,
- XmlToken.ExactlyOne,
- XmlToken.All,
- XmlToken.PolicyReference,
- XmlToken.UsingPolicy,
- XmlToken.Name,
- XmlToken.Optional,
- XmlToken.Ignorable,
- XmlToken.PolicyUris,
- XmlToken.Uri,
- XmlToken.Digest,
- XmlToken.DigestAlgorithm
- });
-
- /**
- * Resolves URI represented as a String into an enumeration value. If the URI
- * doesn't represent any existing enumeration value, method returns
- * {@code null}.
- *
- * @param uri WS-Policy namespace URI
- * @return Enumeration value that represents given URI or {@code null} if
- * no enumeration value exists for given URI.
- */
- public static NamespaceVersion resolveVersion(String uri) {
- for (NamespaceVersion namespaceVersion : NamespaceVersion.values()) {
- if (namespaceVersion.toString().equalsIgnoreCase(uri)) {
- return namespaceVersion;
- }
- }
-
- return null;
- }
-
- /**
- * Resolves fully qualified name defined in the WS-Policy namespace into an
- * enumeration value. If the URI in the name doesn't represent any existing
- * enumeration value, method returns {@code null}
- *
- * @param name fully qualified name defined in the WS-Policy namespace
- * @return Enumeration value that represents given namespace or {@code null} if
- * no enumeration value exists for given namespace.
- */
- public static NamespaceVersion resolveVersion(QName name) {
- return resolveVersion(name.getNamespaceURI());
- }
-
- /**
- * Returns latest supported version of the policy namespace
- *
- * @return latest supported policy namespace version.
- */
- public static NamespaceVersion getLatestVersion() {
- return v1_5;
- }
-
- /**
- * Resolves FQN into a policy XML token. The version of the token can be determined
- * by invoking {@link #resolveVersion(QName)}.
- *
- * @param name fully qualified name defined in the WS-Policy namespace
- * @return XML token enumeration that represents this fully qualified name.
- * If the token or the namespace is not resolved {@link XmlToken#UNKNOWN} value
- * is returned.
- */
- public static XmlToken resolveAsToken(QName name) {
- NamespaceVersion nsVersion = resolveVersion(name);
- if (nsVersion != null) {
- XmlToken token = XmlToken.resolveToken(name.getLocalPart());
- if (nsVersion.tokenToQNameCache.containsKey(token)) {
- return token;
- }
- }
- return XmlToken.UNKNOWN;
- }
-
- private final String nsUri;
- private final String defaultNsPrefix;
- private final Map<XmlToken, QName> tokenToQNameCache;
-
- private NamespaceVersion(String uri, String prefix, XmlToken... supportedTokens) {
- nsUri = uri;
- defaultNsPrefix = prefix;
-
- Map<XmlToken, QName> temp = new HashMap<XmlToken, QName>();
- for (XmlToken token : supportedTokens) {
- temp.put(token, new QName(nsUri, token.toString()));
- }
- tokenToQNameCache = Collections.unmodifiableMap(temp);
- }
-
- /**
- * Method returns default namespace prefix for given namespace version.
- *
- * @return default namespace prefix for given namespace version
- */
- public String getDefaultNamespacePrefix() {
- return defaultNsPrefix;
- }
-
- /**
- * Resolves XML token into a fully qualified name within given namespace version.
- *
- * @param token XML token enumeration value.
- * @return fully qualified name of the {@code token} within given namespace
- * version. Method returns {@code null} in case the token is not supported in
- * given namespace version or in case {@link XmlToken#UNKNOWN} was used as
- * an input parameter.
- */
- public QName asQName(XmlToken token) throws IllegalArgumentException {
- return tokenToQNameCache.get(token);
- }
-
- @Override
- public String toString() {
- return nsUri;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/wspolicy/XmlToken.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/wspolicy/XmlToken.java
deleted file mode 100644
index a4547a44..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/sourcemodel/wspolicy/XmlToken.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.sourcemodel.wspolicy;
-
-/**
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public enum XmlToken {
- Policy("Policy", true),
- ExactlyOne("ExactlyOne", true),
- All("All", true),
- PolicyReference("PolicyReference", true),
- UsingPolicy("UsingPolicy", true),
- Name("Name", false),
- Optional("Optional", false),
- Ignorable("Ignorable", false),
- PolicyUris("PolicyURIs", false),
- Uri("URI", false),
- Digest("Digest", false),
- DigestAlgorithm("DigestAlgorithm", false),
-
- UNKNOWN("", true);
-
-
-
- /**
- * Resolves URI represented as a String into an enumeration value. If the URI
- * doesn't represent any existing enumeration value, method returns {@code null}
- *
- * @param uri
- * @return Enumeration value that represents given URI or {@code null} if
- * no enumeration value exists for given URI.
- */
- public static XmlToken resolveToken(String name) {
- for (XmlToken token : XmlToken.values()) {
- if (token.toString().equals(name)) {
- return token;
- }
- }
-
- return UNKNOWN;
- }
-
- private String tokenName;
- private boolean element;
-
- private XmlToken(final String name, boolean element) {
- this.tokenName = name;
- this.element = element;
- }
-
- public boolean isElement() {
- return element;
- }
-
- @Override
- public String toString() {
- return tokenName;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/AbstractQNameValidator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/AbstractQNameValidator.java
deleted file mode 100644
index 9e6379d4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/AbstractQNameValidator.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.spi;
-
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import javax.xml.namespace.QName;
-
-/**
- * This abstract policy assertion validator validates assertions by their qualified
- * name. Server and client side validation methods return {@link Fitness} based on
- * following schema:
- *
- * <ul>
- * <li>{@link Fitness#SUPPORTED} - if the assertion qualified name is in the list of
- * supported assertion names on the server/client side</li>
- * <li>{@link Fitness#UNSUPPORTED} - if the assertion qualified name is not in the list of
- * supported assertion names on the server/client side, however it is in the list of
- * assertion names supported on the other side</li>
- * <li>{@link Fitness#UNKNOWN} - if the assertion qualified name is not present in the any of
- * the lists of supported assertion names</li>
- * </ul>
- *
- * For some domains such validation may be sufficient enough. Other domains may
- * use functionality of this base class as a first step validation before any attempts
- * to validate content of the assertion. To do this one needs to override and reuse
- * the default behavior of {@link #validateClientSide(PolicyAssertion)} and
- * {@link #validateServerSide(PolicyAssertion)} methods.
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public abstract class AbstractQNameValidator implements PolicyAssertionValidator {
- private final Set<String> supportedDomains = new HashSet<String>();
- private final Collection<QName> serverAssertions;
- private final Collection<QName> clientAssertions;
-
- /**
- * Constructor that takes two collections specifying qualified names of assertions
- * supported on either server or client side. The set of all assertion namespaces
- * defines list of all domains supported by the assertion validator
- * (see {@link PolicyAssertionValidator#declareSupportedDomains}).
- *
- * @param serverSideAssertions The server-side assertions.
- * @param clientSideAssertions The client-side assertions.
- */
- protected AbstractQNameValidator(Collection<QName> serverSideAssertions, Collection<QName> clientSideAssertions) {
- if (serverSideAssertions != null) {
- this.serverAssertions = new HashSet<QName>(serverSideAssertions);
- for (QName assertion : this.serverAssertions) {
- supportedDomains.add(assertion.getNamespaceURI());
- }
- } else {
- this.serverAssertions = new HashSet<QName>(0);
- }
-
- if (clientSideAssertions != null) {
- this.clientAssertions = new HashSet<QName>(clientSideAssertions);
- for (QName assertion : this.clientAssertions) {
- supportedDomains.add(assertion.getNamespaceURI());
- }
- } else {
- this.clientAssertions = new HashSet<QName>(0);
- }
- }
-
- public String[] declareSupportedDomains() {
- return supportedDomains.toArray(new String[supportedDomains.size()]);
- }
-
- public Fitness validateClientSide(PolicyAssertion assertion) {
- return validateAssertion(assertion, clientAssertions, serverAssertions);
- }
-
- public Fitness validateServerSide(PolicyAssertion assertion) {
- return validateAssertion(assertion, serverAssertions, clientAssertions);
- }
-
- private Fitness validateAssertion(PolicyAssertion assertion, Collection<QName> thisSideAssertions, Collection<QName> otherSideAssertions) {
- QName assertionName = assertion.getName();
- if (thisSideAssertions.contains(assertionName)) {
- return Fitness.SUPPORTED;
- } else if (otherSideAssertions.contains(assertionName)) {
- return Fitness.UNSUPPORTED;
- } else {
- return Fitness.UNKNOWN;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/AssertionCreationException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/AssertionCreationException.java
deleted file mode 100644
index 49283880..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/AssertionCreationException.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.spi;
-
-import com.sun.xml.internal.ws.policy.PolicyException;
-import com.sun.xml.internal.ws.policy.sourcemodel.AssertionData;
-
-/**
- * Exception thrown in case of assertion creation failure.
- *
- * @author Marek Potociar
- */
-public final class AssertionCreationException extends PolicyException {
-
- private final AssertionData assertionData;
-
- /**
- * Constructs a new assertion creation exception with the specified detail message and cause.
- * <p/>
- * Note that the detail message associated with {@code cause} is <emph>not</emph> automatically incorporated in
- * this exception's detail message.
- *
- * @param assertionData the data provided for assertion creation
- * @param message the detail message.
- */
- public AssertionCreationException(final AssertionData assertionData, final String message) {
- super(message);
- this.assertionData = assertionData;
- }
-
- /**
- * Constructs a new assertion creation exception with the specified detail message and cause.
- * <p/>
- * Note that the detail message associated with {@code cause} is <emph>not</emph> automatically incorporated in
- * this exception's detail message.
- *
- * @param assertionData the data provided for assertion creation
- * @param message the detail message.
- * @param cause the cause. (A {@code null} value is permitted, and indicates that the cause is nonexistent or unknown.)
- */
- public AssertionCreationException(final AssertionData assertionData, final String message, final Throwable cause) {
- super(message, cause);
- this.assertionData = assertionData;
- }
-
- /**
- * Constructs a new assertion creation exception with the specified detail message and cause.
- *
- * @param assertionData the data provided for assertion creation
- * @param cause the cause. (A {@code null} value is permitted, and indicates that the cause is nonexistent or unknown.)
- */
- public AssertionCreationException(AssertionData assertionData, Throwable cause) {
- super(cause);
- this.assertionData = assertionData;
- }
-
- /**
- * Retrieves assertion data associated with the exception.
- *
- * @return associated assertion data (present when assertion creation failed raising this exception).
- */
- public AssertionData getAssertionData() {
- return this.assertionData;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PolicyAssertionCreator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PolicyAssertionCreator.java
deleted file mode 100644
index d89dd214..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PolicyAssertionCreator.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.spi;
-
-import com.sun.xml.internal.ws.policy.AssertionSet;
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-import com.sun.xml.internal.ws.policy.sourcemodel.AssertionData;
-import java.util.Collection;
-
-/**
- * The interface defines contract for custom (domain specific) policy assertion
- * factories. The implementations are discovered using service provider mechanism
- * described in the
- * <a href="http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Service%20Provider">J2SE JAR File Specification</a>.
- *<p/>
- * Every implementation of policy assertion creator is expected to <b>fully</b>
- * handle the creation of assertions for the domain (namespace) it claims to
- * support by returning the namespace string from the {link #getSupportedDomainNamespaceUri()}
- * method. To handle creation of domain-specific assertions that are not intended
- * to be customized, the default policy assertion creator (passed as one of the
- * input parameters into the {@link #createAssertion(AssertionData, Collection, AssertionSet, PolicyAssertionCreator)} method)
- * shall be used.
- *
- * @author Marek Potociar
- */
-public interface PolicyAssertionCreator {
-
- /**
- * This method returns the namespace URIs of the domains that are supported by the implementation of
- * this inteface. There can be multiple URIs supported per single implementation.
- * <p/>
- * Supporting domain namespace URI means that particular {@code PolicyAssertionCreator} implementation
- * is able to create assertion instances for the domains identified by the namespace URIs returned from this
- * method. It is required that each {@code PolicyAssertionCreator} implementation handles the policy
- * assertion creation for <b>each</b> assertion in every domain it claims to support.
- *
- * @return string array representing the namespace URIs of the supported domains. It is expected that multiple calls on this method return the
- * same value each time. <b>Returned string array must be neither {@code null} nor empty. Also each string value in the array must not be {@code null}
- * nor empty.</b>
- *
- */
- String[] getSupportedDomainNamespaceURIs();
-
- /**
- * Creates domain-specific policy assertion instance according to assertion data provided. For the provided
- * assertion data and this policy assertion creator instance, it will allways be true that assertion namespace
- * URI equals to one of supported domain namespace URIs.
- *<p/>
- * Additional method parameter (which must not be {@code null}) supplied by the policy framework specifies a default policy
- * assertion creator that might be used to handle creation of unsupported domain assertion in the default way. This is
- * to give policy assertion creator a chance to handle also creation of "unsupported" domain assertions and to encourage
- * implemetors to use class composition instad of class inheritance.
- *
- * @param data assertion creation data specifying the details of newly created assertion
- * @param assertionParameters collection of assertions parameters of this policy assertion. May be {@code null}.
- * @param nestedAlternative assertion set specifying nested policy alternative. May be {@code null}.
- * @param defaultCreator default policy assertion creator implementation that shall be used to handle creation of assertions
- * which are not explicitly supported by this policy assertion creator implementation
- * @return domain specific policy assertion implementation according to assertion data provided.
- *
- * @throws AssertionCreationException in case of assertion creation failure
- */
- PolicyAssertion createAssertion(AssertionData data, Collection<PolicyAssertion> assertionParameters, AssertionSet nestedAlternative, PolicyAssertionCreator defaultCreator) throws AssertionCreationException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PolicyAssertionValidator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PolicyAssertionValidator.java
deleted file mode 100644
index 7cc7832d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PolicyAssertionValidator.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.spi;
-
-import com.sun.xml.internal.ws.policy.PolicyAssertion;
-
-/**
- *
- *
- * @author Marek Potociar (marek.potociar at sun.com)
- */
-public interface PolicyAssertionValidator {
-
- public static enum Fitness {
- UNKNOWN,
- INVALID,
- UNSUPPORTED,
- SUPPORTED;
-
- public Fitness combine(Fitness other) {
- if (this.compareTo(other) < 0) {
- return other;
- } else {
- return this;
- }
- }
- }
-
-
- /**
- * An implementation of this method must return:
- * <ul>
- * <li>
- * {@code Fitness.UNKNOWN} if the policy assertion type is not recognized
- * </li>
- * <li>
- * {@code Fitness.SUPPORTED} if the policy assertion is supported in the
- * client-side context
- * </li>
- * <li>
- * {@code Fitness.UNSUPPORTED} if the policy assertion is recognized however
- * it's content is not supported. For each assetion that will be eventually marked with
- * this validation value, the policy processor will log a WARNING message however
- * an attempt to call the web service will be made.
- * </li>
- * <li>
- * {@code Fitness.INVALID} if the policy assertion is recognized however
- * its content (value, parameters, nested assertions) is invalid. For each assetion
- * that will be eventually marked with this validation value, the policy processor
- * will log a SEVERE error and throw an exception. No further attempts to call
- * the web service will be made.
- * </li>
- * </ul>
- *
- * @param assertion A policy asssertion (See {@link com.sun.xml.internal.ws.policy.PolicyAssertion PolicyAssertion}).
- * May contain nested policies and assertions.
- * @return fitness of the {@code assertion} on in the client-side context. Must not be {@code null}.
- */
- public Fitness validateClientSide(PolicyAssertion assertion);
-
- /**
- * An implementation of this method must return:
- * <ul>
- * <li>
- * {@code Fitness.UNKNOWN} if the policy assertion type is not recognized
- * </li>
- * <li>
- * {@code Fitness.SUPPORTED} if the policy assertion is supported in the
- * server-side context
- * </li>
- * <li>
- * {@code Fitness.UNSUPPORTED} if the policy assertion is recognized however
- * it's content is not supported.
- * </li>
- * <li>
- * {@code Fitness.INVALID} if the policy assertion is recognized however
- * its content (value, parameters, nested assertions) is invalid.
- * </li>
- * </ul>
- *
- * For each assetion that will be eventually marked with validation value of
- * UNKNOWN, UNSUPPORTED or INVALID, the policy processor will log a SEVERE error
- * and throw an exception.
- *
- * @param assertion A policy asssertion (See {@link com.sun.xml.internal.ws.policy.PolicyAssertion PolicyAssertion}).
- * May contain nested policies and assertions.
- * @return fitness of the {@code assertion} on in the server-side context. Must not be {@code null}.
- */
- public Fitness validateServerSide(PolicyAssertion assertion);
-
- /**
- * Each service provider that implements this SPI must make sure to identify all possible domains it supports.
- * This operation must be implemented as idempotent (must return same values on multiple calls).
- * <p/>
- * It is legal for two or more {@code PolicyAssertionValidator}s to support the same domain. In such case,
- * the most significant result returned from validation methods will be eventually assigned to the assertion.
- * The significance of validation results is as follows (from most to least significant):
- * <ol>
- * <li>SUPPORTED</li>
- * <li>UNSUPPORTED</li>
- * <li>INVALID</li>
- * <li>UNKNOWN</li>
- * </ol>
- *
- *
- * @return {@code String} array holding {@code String} representations of identifiers of all supported domains.
- * Usually a domain identifier is represented by a namespace.
- */
- public String[] declareSupportedDomains();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PrefixMapper.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PrefixMapper.java
deleted file mode 100644
index 4fec585d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/PrefixMapper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.spi;
-
-import java.util.Map;
-
-/**
- * Maps an XML prefix to a namespace.
- *
- * This class allows policy domains to configure to which XML prefix an XML
- * namespace is mapped.
- *
- * @author Fabian Ritzmann
- */
-public interface PrefixMapper {
-
- /**
- * Returns a map of XML prefixes to namespaces for the domain.
- *
- * The keys of the map must be a name for an XML prefix, e.g. "wsrmp". The
- * values must be the name of an XML namespace, e.g.
- * "http://docs.oasis-open.org/ws-rx/wsrmp/200702".
- *
- * @return A map of XML prefixes to namespaces for the domain.
- */
- Map<String, String> getPrefixMap();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/package-info.java
deleted file mode 100644
index 2ea7ff14..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/spi/package-info.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * The package contains policy API extension point definitions.
- */
-package com.sun.xml.internal.ws.policy.spi;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/PolicyMapKeyConverter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/PolicyMapKeyConverter.java
deleted file mode 100644
index 720d8f68..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/PolicyMapKeyConverter.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.subject;
-
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.PolicyMapKey;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import com.sun.xml.internal.ws.policy.subject.WsdlBindingSubject.WsdlMessageType;
-import javax.xml.namespace.QName;
-
-/**
- * Computes a PolicyMapKey instance for a given WsdlBindingSubject.
- *
- * @author Fabian Ritzmann
- */
-public class PolicyMapKeyConverter {
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(PolicyMapKeyConverter.class);
-
- private final QName serviceName;
- private final QName portName;
-
- public PolicyMapKeyConverter(QName serviceName, QName portName) {
- this.serviceName = serviceName;
- this.portName = portName;
- }
-
- public PolicyMapKey getPolicyMapKey(final WsdlBindingSubject subject) {
- LOGGER.entering(subject);
-
- PolicyMapKey key = null;
- if (subject.isBindingSubject()) {
- key = PolicyMap.createWsdlEndpointScopeKey(this.serviceName, this.portName);
- }
- else if (subject.isBindingOperationSubject()) {
- key = PolicyMap.createWsdlOperationScopeKey(this.serviceName, this.portName, subject.getName());
- }
- else if (subject.isBindingMessageSubject()) {
- if (subject.getMessageType() == WsdlMessageType.FAULT) {
- key = PolicyMap.createWsdlFaultMessageScopeKey(this.serviceName, this.portName,
- subject.getParent().getName(), subject.getName());
- }
- else {
- key = PolicyMap.createWsdlMessageScopeKey(this.serviceName, this.portName, subject.getParent().getName());
- }
- }
-
- LOGGER.exiting(key);
- return key;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/WsdlBindingSubject.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/WsdlBindingSubject.java
deleted file mode 100644
index e685cd77..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/WsdlBindingSubject.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.policy.subject;
-
-import com.sun.xml.internal.ws.policy.privateutil.LocalizationMessages;
-import com.sun.xml.internal.ws.policy.privateutil.PolicyLogger;
-import javax.xml.namespace.QName;
-
-/**
- * Provides objects for use as WSDL 1.0/1.1 policy subjects.
- *
- * An instance of this class may represent a wsdl:binding element or a wsdl:binding/operation
- * element or a wsdl:binding/operation/message element.
- *
- * @author Fabian Ritzmann
- */
-public class WsdlBindingSubject {
-
- /**
- * For message subjects, this needs to be set to one of the values INPUT, OUTPUT
- * or FAULT. Any other subject has the message type NO_MESSAGE.
- */
- public enum WsdlMessageType {
- NO_MESSAGE,
- INPUT,
- OUTPUT,
- FAULT
- }
-
- /**
- * Identifies the scope to which this subject belongs. See WS-PolicyAttachment
- * for an explanation on WSDL scopes.
- *
- * The SERVICE scope is not actually used and only listed here for completeness
- * sake.
- */
- public enum WsdlNameScope {
- SERVICE,
- ENDPOINT,
- OPERATION,
- MESSAGE
- }
-
- private static final PolicyLogger LOGGER = PolicyLogger.getLogger(WsdlBindingSubject.class);
-
- private final QName name;
- private final WsdlMessageType messageType;
- private final WsdlNameScope nameScope;
- private final WsdlBindingSubject parent;
-
- WsdlBindingSubject(final QName name, final WsdlNameScope scope, final WsdlBindingSubject parent) {
- this(name, WsdlMessageType.NO_MESSAGE, scope, parent);
- }
-
- WsdlBindingSubject(final QName name, final WsdlMessageType messageType, final WsdlNameScope scope, final WsdlBindingSubject parent) {
- this.name = name;
- this.messageType = messageType;
- this.nameScope = scope;
- this.parent = parent;
- }
-
- public static WsdlBindingSubject createBindingSubject(QName bindingName) {
- return new WsdlBindingSubject(bindingName, WsdlNameScope.ENDPOINT, null);
- }
-
- public static WsdlBindingSubject createBindingOperationSubject(QName bindingName, QName operationName) {
- final WsdlBindingSubject bindingSubject = createBindingSubject(bindingName);
- return new WsdlBindingSubject(operationName, WsdlNameScope.OPERATION, bindingSubject);
- }
-
- public static WsdlBindingSubject createBindingMessageSubject(QName bindingName, QName operationName, QName messageName, WsdlMessageType messageType) {
- if (messageType == null) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0083_MESSAGE_TYPE_NULL()));
- }
- if (messageType == WsdlMessageType.NO_MESSAGE) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0084_MESSAGE_TYPE_NO_MESSAGE()));
- }
- if ((messageType == WsdlMessageType.FAULT) && (messageName == null)) {
- throw LOGGER.logSevereException(new IllegalArgumentException(LocalizationMessages.WSP_0085_MESSAGE_FAULT_NO_NAME()));
- }
- final WsdlBindingSubject operationSubject = createBindingOperationSubject(bindingName, operationName);
- return new WsdlBindingSubject(messageName, messageType, WsdlNameScope.MESSAGE, operationSubject);
- }
-
- public QName getName() {
- return this.name;
- }
-
- public WsdlMessageType getMessageType() {
- return this.messageType;
- }
-
- public WsdlBindingSubject getParent() {
- return this.parent;
- }
-
- public boolean isBindingSubject() {
- if (this.nameScope == WsdlNameScope.ENDPOINT) {
- return this.parent == null;
- }
- else {
- return false;
- }
- }
-
- public boolean isBindingOperationSubject() {
- if (this.nameScope == WsdlNameScope.OPERATION) {
- if (this.parent != null) {
- return this.parent.isBindingSubject();
- }
- }
- return false;
- }
-
- public boolean isBindingMessageSubject() {
- if (this.nameScope == WsdlNameScope.MESSAGE) {
- if (this.parent != null) {
- return this.parent.isBindingOperationSubject();
- }
- }
- return false;
- }
-
- @Override
- public boolean equals(final Object that) {
- if (this == that) {
- return true;
- }
-
- if (that == null || !(that instanceof WsdlBindingSubject)) {
- return false;
- }
-
- final WsdlBindingSubject thatSubject = (WsdlBindingSubject) that;
- boolean isEqual = true;
-
- isEqual = isEqual && ((this.name == null) ? thatSubject.name == null : this.name.equals(thatSubject.name));
- isEqual = isEqual && this.messageType.equals(thatSubject.messageType);
- isEqual = isEqual && this.nameScope.equals(thatSubject.nameScope);
- isEqual = isEqual && ((this.parent == null) ? thatSubject.parent == null : this.parent.equals(thatSubject.parent));
-
- return isEqual;
- }
-
- @Override
- public int hashCode() {
- int result = 23;
-
- result = 31 * result + ((this.name == null) ? 0 : this.name.hashCode());
- result = 31 * result + this.messageType.hashCode();
- result = 31 * result + this.nameScope.hashCode();
- result = 31 * result + ((this.parent == null) ? 0 : this.parent.hashCode());
-
- return result;
- }
-
- @Override
- public String toString() {
- final StringBuilder result = new StringBuilder("WsdlBindingSubject[");
- result.append(this.name).append(", ").append(this.messageType);
- result.append(", ").append(this.nameScope).append(", ").append(this.parent);
- return result.append("]").toString();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/package-info.java
deleted file mode 100644
index 8628b4a6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/subject/package-info.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * Provides utility classes and objects that can serve as policy subjects for
- * {@link com.sun.xml.internal.ws.policy.PolicySubject}. The current implementation provides
- * subjects for WSDL 1.0/1.1 binding elements.
- *
- * We are not trying to provide an exact model of WSDL elements. The JAX-WS
- * WSDLModel does that already. Instead, we are aiming at providing a light-weight
- * and easy to use representation of WSDL elements.
- *
- * At the same time, this implementation is providing a simple way of mapping the
- * subjects to WSDL scopes. That limits how the WsdlSubjects can be used. Ultimately,
- * each subject is always linked to one service, port and binding element. That
- * means that WsdlSubjects cannot accurately represent e.g. a WSDL message element
- * that is referenced by multiple WSDL binding operations.
- */
-package com.sun.xml.internal.ws.policy.subject;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ClientMUTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ClientMUTube.java
deleted file mode 100644
index 0507d8b2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ClientMUTube.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.protocol.soap;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.NextAction;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.client.HandlerConfiguration;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.soap.SOAPFaultException;
-import java.util.Set;
-
-/**
- * Performs soap mustUnderstand processing for clients.
- *
- * @author Rama Pulavarthi
- */
-public class ClientMUTube extends MUTube {
-
- public ClientMUTube(WSBinding binding, Tube next) {
- super(binding, next);
- }
-
- protected ClientMUTube(ClientMUTube that, TubeCloner cloner) {
- super(that,cloner);
- }
-
- /**
- * Do MU Header Processing on incoming message (response)
- *
- * @return
- * if all the headers in the packet are understood, returns an action to
- * call the previous pipes with response packet
- * @throws SOAPFaultException
- * if all the headers in the packet are not understood, throws SOAPFaultException
- */
- @Override @NotNull
- public NextAction processResponse(Packet response) {
- if (response.getMessage() == null) {
- return super.processResponse(response);
- }
- HandlerConfiguration handlerConfig = response.handlerConfig;
-
- if (handlerConfig == null) {
- //Use from binding instead of defaults in case response packet does not have it,
- //may have been changed from the time of invocation, it ok as its only fallback case.
- handlerConfig = binding.getHandlerConfig();
- }
- Set<QName> misUnderstoodHeaders = getMisUnderstoodHeaders(response.getMessage().getHeaders(), handlerConfig.getRoles(),binding.getKnownHeaders());
- if((misUnderstoodHeaders == null) || misUnderstoodHeaders.isEmpty()) {
- return super.processResponse(response);
- }
- throw createMUSOAPFaultException(misUnderstoodHeaders);
- }
-
- public ClientMUTube copy(TubeCloner cloner) {
- return new ClientMUTube(this,cloner);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MUTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MUTube.java
deleted file mode 100644
index 6f43a202..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MUTube.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.protocol.soap;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import static com.sun.xml.internal.ws.api.SOAPVersion.SOAP_11;
-import static com.sun.xml.internal.ws.api.SOAPVersion.SOAP_12;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Header;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-import com.sun.xml.internal.ws.binding.SOAPBindingImpl;
-import com.sun.xml.internal.ws.message.DOMHeader;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-import org.w3c.dom.Element;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFault;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.soap.SOAPBinding;
-import javax.xml.ws.soap.SOAPFaultException;
-import java.util.Set;
-import java.util.logging.Logger;
-
-/**
- * @author Rama Pulavarthi
- */
-
-abstract class MUTube extends AbstractFilterTubeImpl {
-
- private static final String MU_FAULT_DETAIL_LOCALPART = "NotUnderstood";
- private final static QName MU_HEADER_DETAIL = new QName(SOAPVersion.SOAP_12.nsUri, MU_FAULT_DETAIL_LOCALPART);
- //TODO: change
- protected static final Logger logger = Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".soap.decoder");
- private final static String MUST_UNDERSTAND_FAULT_MESSAGE_STRING =
- "One or more mandatory SOAP header blocks not understood";
-
- protected final SOAPVersion soapVersion;
- protected SOAPBindingImpl binding;
-
- protected MUTube(WSBinding binding, Tube next) {
- super(next);
- // MUPipe should n't be used for bindings other than SOAP.
- if (!(binding instanceof SOAPBinding)) {
- throw new WebServiceException(
- "MUPipe should n't be used for bindings other than SOAP.");
- }
- this.binding = (SOAPBindingImpl) binding;
- this.soapVersion = binding.getSOAPVersion();
- }
-
- protected MUTube(MUTube that, TubeCloner cloner) {
- super(that, cloner);
- binding = that.binding;
- soapVersion = that.soapVersion;
- }
-
- /**
- * @param headers HeaderList that needs MU processing
- * @param roles Roles configured on the Binding. Required Roles supposed to be assumbed a by a
- * SOAP Binding implementation are added.
- * @param handlerKnownHeaders Set of headers that the handlerchain associated with the binding understands
- * @return returns the headers that have mustUnderstand attribute and are not understood
- * by the binding.
- */
- public final Set<QName> getMisUnderstoodHeaders(MessageHeaders headers, Set<String> roles,
- Set<QName> handlerKnownHeaders) {
- return headers.getNotUnderstoodHeaders(roles, handlerKnownHeaders, binding);
-
- }
-
- /**
- * @param notUnderstoodHeaders
- * @return SOAPfaultException with SOAPFault representing the MustUnderstand SOAP Fault.
- * notUnderstoodHeaders are added in the fault detail.
- */
- final SOAPFaultException createMUSOAPFaultException(Set<QName> notUnderstoodHeaders) {
- try {
- SOAPFault fault = soapVersion.getSOAPFactory().createFault(
- MUST_UNDERSTAND_FAULT_MESSAGE_STRING,
- soapVersion.faultCodeMustUnderstand);
- fault.setFaultString("MustUnderstand headers:" +
- notUnderstoodHeaders + " are not understood");
- return new SOAPFaultException(fault);
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-
- /**
- * This should be used only in ServerMUPipe
- *
- * @param notUnderstoodHeaders
- * @return Message representing a SOAPFault
- * In SOAP 1.1, notUnderstoodHeaders are added in the fault Detail
- * in SOAP 1.2, notUnderstoodHeaders are added as the SOAP Headers
- */
-
- final Message createMUSOAPFaultMessage(Set<QName> notUnderstoodHeaders) {
- try {
- String faultString = MUST_UNDERSTAND_FAULT_MESSAGE_STRING;
- if (soapVersion == SOAP_11) {
- faultString = "MustUnderstand headers:" + notUnderstoodHeaders + " are not understood";
- }
- Message muFaultMessage = SOAPFaultBuilder.createSOAPFaultMessage(
- soapVersion,faultString,soapVersion.faultCodeMustUnderstand);
-
- if (soapVersion == SOAP_12) {
- addHeader(muFaultMessage, notUnderstoodHeaders);
- }
- return muFaultMessage;
- } catch (SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-
- private static void addHeader(Message m, Set<QName> notUnderstoodHeaders) throws SOAPException {
- for (QName qname : notUnderstoodHeaders) {
- SOAPElement soapEl = SOAP_12.getSOAPFactory().createElement(MU_HEADER_DETAIL);
- soapEl.addNamespaceDeclaration("abc", qname.getNamespaceURI());
- soapEl.setAttribute("qname", "abc:" + qname.getLocalPart());
- Header header = new DOMHeader<Element>(soapEl);
- m.getHeaders().add(header);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MessageCreationException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MessageCreationException.java
deleted file mode 100644
index c63a526d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MessageCreationException.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.protocol.soap;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.ExceptionHasMessage;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-
-import javax.xml.namespace.QName;
-
-/**
- * This is used to represent Message creation exception when a {@link com.sun.xml.internal.ws.api.pipe.Codec}
- * trying to create a {@link Message}.
- *
- * @author Jitendra Kotamraju
- */
-public class MessageCreationException extends ExceptionHasMessage {
-
- private final SOAPVersion soapVersion;
-
- public MessageCreationException(SOAPVersion soapVersion, Object... args) {
- super("soap.msg.create.err", args);
- this.soapVersion = soapVersion;
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.soap";
- }
-
- public Message getFaultMessage() {
- QName faultCode = soapVersion.faultCodeClient;
- return SOAPFaultBuilder.createSOAPFaultMessage(
- soapVersion, getLocalizedMessage(), faultCode);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ServerMUTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ServerMUTube.java
deleted file mode 100644
index bbca1f20..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ServerMUTube.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.protocol.soap;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.*;
-import com.sun.xml.internal.ws.client.HandlerConfiguration;
-import javax.xml.namespace.QName;
-import java.util.Set;
-
-/**
- * @author Rama Pulavarthi
- */
-
-public class ServerMUTube extends MUTube {
-
- private ServerTubeAssemblerContext tubeContext;
- private final Set<String> roles;
- private final Set<QName> handlerKnownHeaders;
-
- public ServerMUTube(ServerTubeAssemblerContext tubeContext, Tube next) {
- super(tubeContext.getEndpoint().getBinding(), next);
-
- this.tubeContext = tubeContext;
-
- //On Server, HandlerConfiguration does n't change after publish, so store locally
- HandlerConfiguration handlerConfig = binding.getHandlerConfig();
- roles = handlerConfig.getRoles();
- handlerKnownHeaders = binding.getKnownHeaders();
- }
-
- protected ServerMUTube(ServerMUTube that, TubeCloner cloner) {
- super(that,cloner);
- tubeContext = that.tubeContext;
- roles = that.roles;
- handlerKnownHeaders = that.handlerKnownHeaders;
- }
-
- /**
- * Do MU Header Processing on incoming message (request)
- * @return
- * if all the headers in the packet are understood, returns action such that
- * next pipe will be inovked.
- * if all the headers in the packet are not understood, returns action such that
- * SOAPFault Message is sent to previous pipes.
- */
- @Override
- public NextAction processRequest(Packet request) {
- Set<QName> misUnderstoodHeaders = getMisUnderstoodHeaders(request.getMessage().getHeaders(),roles, handlerKnownHeaders);
- if((misUnderstoodHeaders == null) || misUnderstoodHeaders.isEmpty()) {
- return doInvoke(super.next, request);
- }
- return doReturnWith(request.createServerResponse(createMUSOAPFaultMessage(misUnderstoodHeaders),
- tubeContext.getWsdlModel(), tubeContext.getSEIModel(), tubeContext.getEndpoint().getBinding()));
- }
-
- public ServerMUTube copy(TubeCloner cloner) {
- return new ServerMUTube(this,cloner);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/VersionMismatchException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/VersionMismatchException.java
deleted file mode 100644
index c95cbafc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/VersionMismatchException.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.protocol.soap;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.ExceptionHasMessage;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.encoding.soap.SOAP12Constants;
-import com.sun.xml.internal.ws.encoding.soap.SOAPConstants;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-
-import javax.xml.namespace.QName;
-
-/**
- * This is used to represent SOAP VersionMismatchFault. Use
- * this when the received soap envelope is in a different namespace
- * than what the specified Binding says.
- *
- * @author Jitendra Kotamraju
- */
-public class VersionMismatchException extends ExceptionHasMessage {
-
- private final SOAPVersion soapVersion;
-
- public VersionMismatchException(SOAPVersion soapVersion, Object... args) {
- super("soap.version.mismatch.err", args);
- this.soapVersion = soapVersion;
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.soap";
- }
-
- public Message getFaultMessage() {
- QName faultCode = (soapVersion == SOAPVersion.SOAP_11)
- ? SOAPConstants.FAULT_CODE_VERSION_MISMATCH
- : SOAP12Constants.FAULT_CODE_VERSION_MISMATCH;
- return SOAPFaultBuilder.createSOAPFaultMessage(
- soapVersion, getLocalizedMessage(), faultCode);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/xml/XMLMessageException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/xml/XMLMessageException.java
deleted file mode 100644
index 329ec89a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/xml/XMLMessageException.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.protocol.xml;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-/**
- * @author WS Development Team
- */
-public class XMLMessageException extends JAXWSExceptionBase {
-
- public XMLMessageException(String key, Object... args) {
- super(key, args);
- }
-
- public XMLMessageException(Throwable throwable) {
- super(throwable);
- }
-
- public XMLMessageException(Localizable arg) {
- super("server.rt.err", arg);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.xmlmessage";
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/AddressingMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/AddressingMessages.java
deleted file mode 100644
index 0246650a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/AddressingMessages.java
+++ /dev/null
@@ -1,390 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class AddressingMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.addressing");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableNON_ANONYMOUS_RESPONSE_ONEWAY() {
- return messageFactory.getMessage("nonAnonymous.response.oneway");
- }
-
- /**
- * Ignoring non-anonymous response for one-way message
- *
- */
- public static String NON_ANONYMOUS_RESPONSE_ONEWAY() {
- return localizer.localize(localizableNON_ANONYMOUS_RESPONSE_ONEWAY());
- }
-
- public static Localizable localizableNULL_WSA_HEADERS() {
- return messageFactory.getMessage("null.wsa.headers");
- }
-
- /**
- * No WS-Addressing headers found processing the server inbound request
- *
- */
- public static String NULL_WSA_HEADERS() {
- return localizer.localize(localizableNULL_WSA_HEADERS());
- }
-
- public static Localizable localizableUNKNOWN_WSA_HEADER() {
- return messageFactory.getMessage("unknown.wsa.header");
- }
-
- /**
- * Unknown WS-Addressing header
- *
- */
- public static String UNKNOWN_WSA_HEADER() {
- return localizer.localize(localizableUNKNOWN_WSA_HEADER());
- }
-
- public static Localizable localizableNULL_ACTION() {
- return messageFactory.getMessage("null.action");
- }
-
- /**
- * Populating request Addressing headers and found null Action
- *
- */
- public static String NULL_ACTION() {
- return localizer.localize(localizableNULL_ACTION());
- }
-
- public static Localizable localizableINVALID_WSAW_ANONYMOUS(Object arg0) {
- return messageFactory.getMessage("invalid.wsaw.anonymous", arg0);
- }
-
- /**
- * Invalid value obtained from wsaw:Anonymous: "{0}"
- *
- */
- public static String INVALID_WSAW_ANONYMOUS(Object arg0) {
- return localizer.localize(localizableINVALID_WSAW_ANONYMOUS(arg0));
- }
-
- public static Localizable localizableNULL_SOAP_VERSION() {
- return messageFactory.getMessage("null.soap.version");
- }
-
- /**
- * Unexpected null SOAP version
- *
- */
- public static String NULL_SOAP_VERSION() {
- return localizer.localize(localizableNULL_SOAP_VERSION());
- }
-
- public static Localizable localizableWSDL_BOUND_OPERATION_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("wsdlBoundOperation.notFound", arg0);
- }
-
- /**
- * Cannot find an operation in wsdl:binding for "{0}"
- *
- */
- public static String WSDL_BOUND_OPERATION_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableWSDL_BOUND_OPERATION_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableNON_UNIQUE_OPERATION_SIGNATURE(Object arg0, Object arg1, Object arg2, Object arg3) {
- return messageFactory.getMessage("non.unique.operation.signature", arg0, arg1, arg2, arg3);
- }
-
- /**
- * Operations in a port should have unique operation signature to successfuly identify a associated wsdl operation for a message. WSDL operation {0} and {1} have the same operation signature, wsa:Action "{2}" and request body block "{3}", Method dispatching may fail at runtime. Use unique wsa:Action for each operation
- *
- */
- public static String NON_UNIQUE_OPERATION_SIGNATURE(Object arg0, Object arg1, Object arg2, Object arg3) {
- return localizer.localize(localizableNON_UNIQUE_OPERATION_SIGNATURE(arg0, arg1, arg2, arg3));
- }
-
- public static Localizable localizableNON_ANONYMOUS_RESPONSE() {
- return messageFactory.getMessage("nonAnonymous.response");
- }
-
- /**
- * Sending 202 and processing non-anonymous response
- *
- */
- public static String NON_ANONYMOUS_RESPONSE() {
- return localizer.localize(localizableNON_ANONYMOUS_RESPONSE());
- }
-
- public static Localizable localizableVALIDATION_SERVER_NULL_ACTION() {
- return messageFactory.getMessage("validation.server.nullAction");
- }
-
- /**
- * Validating inbound Addressing headers on server and found null Action
- *
- */
- public static String VALIDATION_SERVER_NULL_ACTION() {
- return localizer.localize(localizableVALIDATION_SERVER_NULL_ACTION());
- }
-
- public static Localizable localizableFAULT_TO_CANNOT_PARSE() {
- return messageFactory.getMessage("faultTo.cannot.parse");
- }
-
- /**
- * FaultTo header cannot be parsed
- *
- */
- public static String FAULT_TO_CANNOT_PARSE() {
- return localizer.localize(localizableFAULT_TO_CANNOT_PARSE());
- }
-
- public static Localizable localizableVALIDATION_CLIENT_NULL_ACTION() {
- return messageFactory.getMessage("validation.client.nullAction");
- }
-
- /**
- * Validating inbound Addressing headers on client and found null Action
- *
- */
- public static String VALIDATION_CLIENT_NULL_ACTION() {
- return localizer.localize(localizableVALIDATION_CLIENT_NULL_ACTION());
- }
-
- public static Localizable localizableNULL_MESSAGE() {
- return messageFactory.getMessage("null.message");
- }
-
- /**
- * Null message found when processing the server inbound request and WS-Addressing is required
- *
- */
- public static String NULL_MESSAGE() {
- return localizer.localize(localizableNULL_MESSAGE());
- }
-
- public static Localizable localizableACTION_NOT_SUPPORTED_EXCEPTION(Object arg0) {
- return messageFactory.getMessage("action.not.supported.exception", arg0);
- }
-
- /**
- * Action: "{0}" not supported
- *
- */
- public static String ACTION_NOT_SUPPORTED_EXCEPTION(Object arg0) {
- return localizer.localize(localizableACTION_NOT_SUPPORTED_EXCEPTION(arg0));
- }
-
- public static Localizable localizableNON_ANONYMOUS_RESPONSE_NULL_HEADERS(Object arg0) {
- return messageFactory.getMessage("nonAnonymous.response.nullHeaders", arg0);
- }
-
- /**
- * No response headers found in non-anonymous response from "{0}"
- *
- */
- public static String NON_ANONYMOUS_RESPONSE_NULL_HEADERS(Object arg0) {
- return localizer.localize(localizableNON_ANONYMOUS_RESPONSE_NULL_HEADERS(arg0));
- }
-
- public static Localizable localizableNON_ANONYMOUS_RESPONSE_SENDING(Object arg0) {
- return messageFactory.getMessage("nonAnonymous.response.sending", arg0);
- }
-
- /**
- * Sending non-anonymous reply to "{0}"
- *
- */
- public static String NON_ANONYMOUS_RESPONSE_SENDING(Object arg0) {
- return localizer.localize(localizableNON_ANONYMOUS_RESPONSE_SENDING(arg0));
- }
-
- public static Localizable localizableREPLY_TO_CANNOT_PARSE() {
- return messageFactory.getMessage("replyTo.cannot.parse");
- }
-
- /**
- * ReplyTo header cannot be parsed
- *
- */
- public static String REPLY_TO_CANNOT_PARSE() {
- return localizer.localize(localizableREPLY_TO_CANNOT_PARSE());
- }
-
- public static Localizable localizableINVALID_ADDRESSING_HEADER_EXCEPTION(Object arg0, Object arg1) {
- return messageFactory.getMessage("invalid.addressing.header.exception", arg0, arg1);
- }
-
- /**
- * Invalid WS-Addressing header: "{0}",Reason: "{1}"
- *
- */
- public static String INVALID_ADDRESSING_HEADER_EXCEPTION(Object arg0, Object arg1) {
- return localizer.localize(localizableINVALID_ADDRESSING_HEADER_EXCEPTION(arg0, arg1));
- }
-
- public static Localizable localizableWSAW_ANONYMOUS_PROHIBITED() {
- return messageFactory.getMessage("wsaw.anonymousProhibited");
- }
-
- /**
- * Operation has "prohibited" value for wsaw:anonymous in the WSDL, Addressing must be disabled and SOAP message need to be hand-crafted
- *
- */
- public static String WSAW_ANONYMOUS_PROHIBITED() {
- return localizer.localize(localizableWSAW_ANONYMOUS_PROHIBITED());
- }
-
- public static Localizable localizableNULL_WSDL_PORT() {
- return messageFactory.getMessage("null.wsdlPort");
- }
-
- /**
- * Populating request Addressing headers and found null WSDLPort
- *
- */
- public static String NULL_WSDL_PORT() {
- return localizer.localize(localizableNULL_WSDL_PORT());
- }
-
- public static Localizable localizableADDRESSING_SHOULD_BE_ENABLED() {
- return messageFactory.getMessage("addressing.should.be.enabled.");
- }
-
- /**
- * Addressing is not enabled
- *
- */
- public static String ADDRESSING_SHOULD_BE_ENABLED() {
- return localizer.localize(localizableADDRESSING_SHOULD_BE_ENABLED());
- }
-
- public static Localizable localizableNULL_ADDRESSING_VERSION() {
- return messageFactory.getMessage("null.addressing.version");
- }
-
- /**
- * Unexpected null Addressing version
- *
- */
- public static String NULL_ADDRESSING_VERSION() {
- return localizer.localize(localizableNULL_ADDRESSING_VERSION());
- }
-
- public static Localizable localizableMISSING_HEADER_EXCEPTION(Object arg0) {
- return messageFactory.getMessage("missing.header.exception", arg0);
- }
-
- /**
- * Missing WS-Addressing header: "{0}"
- *
- */
- public static String MISSING_HEADER_EXCEPTION(Object arg0) {
- return localizer.localize(localizableMISSING_HEADER_EXCEPTION(arg0));
- }
-
- public static Localizable localizableNULL_PACKET() {
- return messageFactory.getMessage("null.packet");
- }
-
- /**
- * Populating request Addressing headers and found null Packet
- *
- */
- public static String NULL_PACKET() {
- return localizer.localize(localizableNULL_PACKET());
- }
-
- public static Localizable localizableWRONG_ADDRESSING_VERSION(Object arg0, Object arg1) {
- return messageFactory.getMessage("wrong.addressing.version", arg0, arg1);
- }
-
- /**
- * Expected "{0}" version of WS-Addressing but found "{1}"
- *
- */
- public static String WRONG_ADDRESSING_VERSION(Object arg0, Object arg1) {
- return localizer.localize(localizableWRONG_ADDRESSING_VERSION(arg0, arg1));
- }
-
- public static Localizable localizableADDRESSING_NOT_ENABLED(Object arg0) {
- return messageFactory.getMessage("addressing.notEnabled", arg0);
- }
-
- /**
- * Addressing is not enabled, {0} should not be included in the pipeline"
- *
- */
- public static String ADDRESSING_NOT_ENABLED(Object arg0) {
- return localizer.localize(localizableADDRESSING_NOT_ENABLED(arg0));
- }
-
- public static Localizable localizableNON_ANONYMOUS_UNKNOWN_PROTOCOL(Object arg0) {
- return messageFactory.getMessage("nonAnonymous.unknown.protocol", arg0);
- }
-
- /**
- * Unknown protocol: "{0}"
- *
- */
- public static String NON_ANONYMOUS_UNKNOWN_PROTOCOL(Object arg0) {
- return localizer.localize(localizableNON_ANONYMOUS_UNKNOWN_PROTOCOL(arg0));
- }
-
- public static Localizable localizableNULL_HEADERS() {
- return messageFactory.getMessage("null.headers");
- }
-
- /**
- * No headers found when processing the server inbound request and WS-Addressing is required
- *
- */
- public static String NULL_HEADERS() {
- return localizer.localize(localizableNULL_HEADERS());
- }
-
- public static Localizable localizableNULL_BINDING() {
- return messageFactory.getMessage("null.binding");
- }
-
- /**
- * Populating request Addressing headers and found null Binding
- *
- */
- public static String NULL_BINDING() {
- return localizer.localize(localizableNULL_BINDING());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java
deleted file mode 100644
index 06951142..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class BindingApiMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.bindingApi");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableBINDING_API_NO_FAULT_MESSAGE_NAME() {
- return messageFactory.getMessage("binding.api.no.fault.message.name");
- }
-
- /**
- * Fault message name must not be null.
- *
- */
- public static String BINDING_API_NO_FAULT_MESSAGE_NAME() {
- return localizer.localize(localizableBINDING_API_NO_FAULT_MESSAGE_NAME());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ClientMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ClientMessages.java
deleted file mode 100644
index 714d8733..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ClientMessages.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class ClientMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.client");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableFAILED_TO_PARSE(Object arg0, Object arg1) {
- return messageFactory.getMessage("failed.to.parse", arg0, arg1);
- }
-
- /**
- * Failed to access the WSDL at: {0}. It failed with:
- * {1}.
- *
- */
- public static String FAILED_TO_PARSE(Object arg0, Object arg1) {
- return localizer.localize(localizableFAILED_TO_PARSE(arg0, arg1));
- }
-
- public static Localizable localizableINVALID_BINDING_ID(Object arg0, Object arg1) {
- return messageFactory.getMessage("invalid.binding.id", arg0, arg1);
- }
-
- /**
- * Invalid binding id: {0}. Must be: {1}
- *
- */
- public static String INVALID_BINDING_ID(Object arg0, Object arg1) {
- return localizer.localize(localizableINVALID_BINDING_ID(arg0, arg1));
- }
-
- public static Localizable localizableEPR_WITHOUT_ADDRESSING_ON() {
- return messageFactory.getMessage("epr.without.addressing.on");
- }
-
- /**
- * EPR is specified without enabling WS-Addressing support.
- *
- */
- public static String EPR_WITHOUT_ADDRESSING_ON() {
- return localizer.localize(localizableEPR_WITHOUT_ADDRESSING_ON());
- }
-
- public static Localizable localizableINVALID_SERVICE_NO_WSDL(Object arg0) {
- return messageFactory.getMessage("invalid.service.no.wsdl", arg0);
- }
-
- /**
- * No wsdl metadata for service: {0}, can't create proxy! Try creating Service by providing a WSDL URL
- *
- */
- public static String INVALID_SERVICE_NO_WSDL(Object arg0) {
- return localizer.localize(localizableINVALID_SERVICE_NO_WSDL(arg0));
- }
-
- public static Localizable localizableINVALID_SOAP_ROLE_NONE() {
- return messageFactory.getMessage("invalid.soap.role.none");
- }
-
- /**
- * Cannot set SOAP 1.2 role "none"
- *
- */
- public static String INVALID_SOAP_ROLE_NONE() {
- return localizer.localize(localizableINVALID_SOAP_ROLE_NONE());
- }
-
- public static Localizable localizableUNDEFINED_BINDING(Object arg0) {
- return messageFactory.getMessage("undefined.binding", arg0);
- }
-
- /**
- * Undefined binding: {0}
- *
- */
- public static String UNDEFINED_BINDING(Object arg0) {
- return localizer.localize(localizableUNDEFINED_BINDING(arg0));
- }
-
- public static Localizable localizableHTTP_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("http.not.found", arg0);
- }
-
- /**
- * HTTP Status-Code 404: Not Found - {0}
- *
- */
- public static String HTTP_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableHTTP_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableINVALID_EPR_PORT_NAME(Object arg0, Object arg1) {
- return messageFactory.getMessage("invalid.epr.port.name", arg0, arg1);
- }
-
- /**
- * EndpointName specified in EPR {0} is not a WSDL port QName, valid Ports are {1}
- *
- */
- public static String INVALID_EPR_PORT_NAME(Object arg0, Object arg1) {
- return localizer.localize(localizableINVALID_EPR_PORT_NAME(arg0, arg1));
- }
-
- public static Localizable localizableFAILED_TO_PARSE_WITH_MEX(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("failed.to.parseWithMEX", arg0, arg1, arg2);
- }
-
- /**
- * Failed to access the WSDL at: {0}. It failed with:
- * {1}.
- * Retrying with MEX gave:
- * {2}
- *
- */
- public static String FAILED_TO_PARSE_WITH_MEX(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableFAILED_TO_PARSE_WITH_MEX(arg0, arg1, arg2));
- }
-
- public static Localizable localizableHTTP_STATUS_CODE(Object arg0, Object arg1) {
- return messageFactory.getMessage("http.status.code", arg0, arg1);
- }
-
- /**
- * The server sent HTTP status code {0}: {1}
- *
- */
- public static String HTTP_STATUS_CODE(Object arg0, Object arg1) {
- return localizer.localize(localizableHTTP_STATUS_CODE(arg0, arg1));
- }
-
- public static Localizable localizableINVALID_ADDRESS(Object arg0) {
- return messageFactory.getMessage("invalid.address", arg0);
- }
-
- /**
- * Invalid address: {0}
- *
- */
- public static String INVALID_ADDRESS(Object arg0) {
- return localizer.localize(localizableINVALID_ADDRESS(arg0));
- }
-
- public static Localizable localizableUNDEFINED_PORT_TYPE(Object arg0) {
- return messageFactory.getMessage("undefined.portType", arg0);
- }
-
- /**
- * Undefined port type: {0}
- *
- */
- public static String UNDEFINED_PORT_TYPE(Object arg0) {
- return localizer.localize(localizableUNDEFINED_PORT_TYPE(arg0));
- }
-
- public static Localizable localizableWSDL_CONTAINS_NO_SERVICE(Object arg0) {
- return messageFactory.getMessage("wsdl.contains.no.service", arg0);
- }
-
- /**
- * WSDL {0} contains no service definition.
- *
- */
- public static String WSDL_CONTAINS_NO_SERVICE(Object arg0) {
- return localizer.localize(localizableWSDL_CONTAINS_NO_SERVICE(arg0));
- }
-
- public static Localizable localizableINVALID_SOAP_ACTION() {
- return messageFactory.getMessage("invalid.soap.action");
- }
-
- /**
- * A valid SOAPAction should be set in the RequestContext when Addressing is enabled, Use BindingProvider.SOAPACTION_URI_PROPERTY to set it.
- *
- */
- public static String INVALID_SOAP_ACTION() {
- return localizer.localize(localizableINVALID_SOAP_ACTION());
- }
-
- public static Localizable localizableNON_LOGICAL_HANDLER_SET(Object arg0) {
- return messageFactory.getMessage("non.logical.handler.set", arg0);
- }
-
- /**
- * Cannot set {0} on binding. Handler must be a LogicalHandler.
- *
- */
- public static String NON_LOGICAL_HANDLER_SET(Object arg0) {
- return localizer.localize(localizableNON_LOGICAL_HANDLER_SET(arg0));
- }
-
- public static Localizable localizableLOCAL_CLIENT_FAILED(Object arg0) {
- return messageFactory.getMessage("local.client.failed", arg0);
- }
-
- /**
- * local transport error: {0}
- *
- */
- public static String LOCAL_CLIENT_FAILED(Object arg0) {
- return localizer.localize(localizableLOCAL_CLIENT_FAILED(arg0));
- }
-
- public static Localizable localizableRUNTIME_WSDLPARSER_INVALID_WSDL(Object arg0, Object arg1, Object arg2, Object arg3) {
- return messageFactory.getMessage("runtime.wsdlparser.invalidWSDL", arg0, arg1, arg2, arg3);
- }
-
- /**
- * Invalid WSDL {0}, expected {1} found {2} at (line{3})
- *
- */
- public static String RUNTIME_WSDLPARSER_INVALID_WSDL(Object arg0, Object arg1, Object arg2, Object arg3) {
- return localizer.localize(localizableRUNTIME_WSDLPARSER_INVALID_WSDL(arg0, arg1, arg2, arg3));
- }
-
- public static Localizable localizableWSDL_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("wsdl.not.found", arg0);
- }
-
- /**
- * WSDL url {0} is not accessible.
- *
- */
- public static String WSDL_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableWSDL_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableHTTP_CLIENT_FAILED(Object arg0) {
- return messageFactory.getMessage("http.client.failed", arg0);
- }
-
- /**
- * HTTP transport error: {0}
- *
- */
- public static String HTTP_CLIENT_FAILED(Object arg0) {
- return localizer.localize(localizableHTTP_CLIENT_FAILED(arg0));
- }
-
- public static Localizable localizableINVALID_SERVICE_NAME_NULL(Object arg0) {
- return messageFactory.getMessage("invalid.service.name.null", arg0);
- }
-
- /**
- * {0} is not a valid service
- *
- */
- public static String INVALID_SERVICE_NAME_NULL(Object arg0) {
- return localizer.localize(localizableINVALID_SERVICE_NAME_NULL(arg0));
- }
-
- public static Localizable localizableINVALID_WSDL_URL(Object arg0) {
- return messageFactory.getMessage("invalid.wsdl.url", arg0);
- }
-
- /**
- * Invalid WSDL URL: {0}
- *
- */
- public static String INVALID_WSDL_URL(Object arg0) {
- return localizer.localize(localizableINVALID_WSDL_URL(arg0));
- }
-
- public static Localizable localizableINVALID_PORT_NAME(Object arg0, Object arg1) {
- return messageFactory.getMessage("invalid.port.name", arg0, arg1);
- }
-
- /**
- * {0} is not a valid port. Valid ports are: {1}
- *
- */
- public static String INVALID_PORT_NAME(Object arg0, Object arg1) {
- return localizer.localize(localizableINVALID_PORT_NAME(arg0, arg1));
- }
-
- public static Localizable localizableINVALID_SERVICE_NAME(Object arg0, Object arg1) {
- return messageFactory.getMessage("invalid.service.name", arg0, arg1);
- }
-
- /**
- * {0} is not a valid service. Valid services are: {1}
- *
- */
- public static String INVALID_SERVICE_NAME(Object arg0, Object arg1) {
- return localizer.localize(localizableINVALID_SERVICE_NAME(arg0, arg1));
- }
-
- public static Localizable localizableUNSUPPORTED_OPERATION(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("unsupported.operation", arg0, arg1, arg2);
- }
-
- /**
- * {0} not supported with {1}. Must be: {2}
- *
- */
- public static String UNSUPPORTED_OPERATION(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableUNSUPPORTED_OPERATION(arg0, arg1, arg2));
- }
-
- public static Localizable localizableFAILED_TO_PARSE_EPR(Object arg0) {
- return messageFactory.getMessage("failed.to.parse.epr", arg0);
- }
-
- /**
- * Failed to parse EPR: {0}
- *
- */
- public static String FAILED_TO_PARSE_EPR(Object arg0) {
- return localizer.localize(localizableFAILED_TO_PARSE_EPR(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/DispatchMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/DispatchMessages.java
deleted file mode 100644
index 933378d8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/DispatchMessages.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class DispatchMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.dispatch");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableINVALID_NULLARG_XMLHTTP_REQUEST_METHOD(Object arg0, Object arg1) {
- return messageFactory.getMessage("invalid.nullarg.xmlhttp.request.method", arg0, arg1);
- }
-
- /**
- * A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals {0} with a Null invocation Argument is not allowed. Must be: {1}
- *
- */
- public static String INVALID_NULLARG_XMLHTTP_REQUEST_METHOD(Object arg0, Object arg1) {
- return localizer.localize(localizableINVALID_NULLARG_XMLHTTP_REQUEST_METHOD(arg0, arg1));
- }
-
- public static Localizable localizableINVALID_NULLARG_URI() {
- return messageFactory.getMessage("invalid.nullarg.uri");
- }
-
- /**
- * Endpoint address URI is not allowed with a null argument
- *
- */
- public static String INVALID_NULLARG_URI() {
- return localizer.localize(localizableINVALID_NULLARG_URI());
- }
-
- public static Localizable localizableINVALID_SOAPMESSAGE_DISPATCH_MSGMODE(Object arg0, Object arg1) {
- return messageFactory.getMessage("invalid.soapmessage.dispatch.msgmode", arg0, arg1);
- }
-
- /**
- * Can not create Dispatch<SOAPMessage> of {0}. Must be {1}.
- *
- */
- public static String INVALID_SOAPMESSAGE_DISPATCH_MSGMODE(Object arg0, Object arg1) {
- return localizer.localize(localizableINVALID_SOAPMESSAGE_DISPATCH_MSGMODE(arg0, arg1));
- }
-
- public static Localizable localizableINVALID_RESPONSE_DESERIALIZATION() {
- return messageFactory.getMessage("invalid.response.deserialization");
- }
-
- /**
- * Failed to deserialize the response.
- *
- */
- public static String INVALID_RESPONSE_DESERIALIZATION() {
- return localizer.localize(localizableINVALID_RESPONSE_DESERIALIZATION());
- }
-
- public static Localizable localizableINVALID_QUERY_LEADING_CHAR(Object arg0) {
- return messageFactory.getMessage("invalid.query.leading.char", arg0);
- }
-
- /**
- * Leading '?' of MessageContext.QUERY_STRING: {0} is not valid. Remove '?' and run again.
- *
- */
- public static String INVALID_QUERY_LEADING_CHAR(Object arg0) {
- return localizer.localize(localizableINVALID_QUERY_LEADING_CHAR(arg0));
- }
-
- public static Localizable localizableINVALID_QUERY_STRING(Object arg0) {
- return messageFactory.getMessage("invalid.query.string", arg0);
- }
-
- /**
- * Unable to resolve endpoint address using the supplied query string: {0}.
- *
- */
- public static String INVALID_QUERY_STRING(Object arg0) {
- return localizer.localize(localizableINVALID_QUERY_STRING(arg0));
- }
-
- public static Localizable localizableDUPLICATE_PORT(Object arg0) {
- return messageFactory.getMessage("duplicate.port", arg0);
- }
-
- /**
- * WSDLPort {0} already exists. Can not create a port of the same QName.
- *
- */
- public static String DUPLICATE_PORT(Object arg0) {
- return localizer.localize(localizableDUPLICATE_PORT(arg0));
- }
-
- public static Localizable localizableINVALID_DATASOURCE_DISPATCH_BINDING(Object arg0, Object arg1) {
- return messageFactory.getMessage("invalid.datasource.dispatch.binding", arg0, arg1);
- }
-
- /**
- * Can not create Dispatch<DataSource> with {0}. Must be: {1}
- *
- */
- public static String INVALID_DATASOURCE_DISPATCH_BINDING(Object arg0, Object arg1) {
- return localizer.localize(localizableINVALID_DATASOURCE_DISPATCH_BINDING(arg0, arg1));
- }
-
- public static Localizable localizableINVALID_DATASOURCE_DISPATCH_MSGMODE(Object arg0, Object arg1) {
- return messageFactory.getMessage("invalid.datasource.dispatch.msgmode", arg0, arg1);
- }
-
- /**
- * Can not create Dispatch<DataSource> of Service.Mode.PAYLOAD{0}. Must be: {1}
- *
- */
- public static String INVALID_DATASOURCE_DISPATCH_MSGMODE(Object arg0, Object arg1) {
- return localizer.localize(localizableINVALID_DATASOURCE_DISPATCH_MSGMODE(arg0, arg1));
- }
-
- public static Localizable localizableINVALID_NULLARG_SOAP_MSGMODE(Object arg0, Object arg1) {
- return messageFactory.getMessage("invalid.nullarg.soap.msgmode", arg0, arg1);
- }
-
- /**
- * SOAP/HTTP Binding in {0} is not allowed with a null invocation argument. Must be: {1}
- *
- */
- public static String INVALID_NULLARG_SOAP_MSGMODE(Object arg0, Object arg1) {
- return localizer.localize(localizableINVALID_NULLARG_SOAP_MSGMODE(arg0, arg1));
- }
-
- public static Localizable localizableINVALID_URI(Object arg0) {
- return messageFactory.getMessage("invalid.uri", arg0);
- }
-
- /**
- * Endpoint String: {0} is and invalid URI.
- *
- */
- public static String INVALID_URI(Object arg0) {
- return localizer.localize(localizableINVALID_URI(arg0));
- }
-
- public static Localizable localizableINVALID_SOAPMESSAGE_DISPATCH_BINDING(Object arg0, Object arg1) {
- return messageFactory.getMessage("invalid.soapmessage.dispatch.binding", arg0, arg1);
- }
-
- /**
- * Can not create Dispatch<SOAPMessage> with {0} Binding. Must be: {1} Binding.
- *
- */
- public static String INVALID_SOAPMESSAGE_DISPATCH_BINDING(Object arg0, Object arg1) {
- return localizer.localize(localizableINVALID_SOAPMESSAGE_DISPATCH_BINDING(arg0, arg1));
- }
-
- public static Localizable localizableINVALID_URI_PATH_QUERY(Object arg0, Object arg1) {
- return messageFactory.getMessage("invalid.uri.path.query", arg0, arg1);
- }
-
- /**
- * Unable to construct a URI with this path info {0} and this query string {1}.
- *
- */
- public static String INVALID_URI_PATH_QUERY(Object arg0, Object arg1) {
- return localizer.localize(localizableINVALID_URI_PATH_QUERY(arg0, arg1));
- }
-
- public static Localizable localizableINVALID_RESPONSE() {
- return messageFactory.getMessage("invalid.response");
- }
-
- /**
- * No response returned.
- *
- */
- public static String INVALID_RESPONSE() {
- return localizer.localize(localizableINVALID_RESPONSE());
- }
-
- public static Localizable localizableINVALID_URI_RESOLUTION(Object arg0) {
- return messageFactory.getMessage("invalid.uri.resolution", arg0);
- }
-
- /**
- * Unable to resolve endpoint address using the supplied path: {0}.
- *
- */
- public static String INVALID_URI_RESOLUTION(Object arg0) {
- return localizer.localize(localizableINVALID_URI_RESOLUTION(arg0));
- }
-
- public static Localizable localizableINVALID_URI_DECODE() {
- return messageFactory.getMessage("invalid.uri.decode");
- }
-
- /**
- * Unable to decode the resolved endpoint using UTF-8 encoding.
- *
- */
- public static String INVALID_URI_DECODE() {
- return localizer.localize(localizableINVALID_URI_DECODE());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/EncodingMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/EncodingMessages.java
deleted file mode 100644
index 73787f5d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/EncodingMessages.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class EncodingMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.encoding");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableFAILED_TO_READ_RESPONSE(Object arg0) {
- return messageFactory.getMessage("failed.to.read.response", arg0);
- }
-
- /**
- * Failed to read a response: {0}
- *
- */
- public static String FAILED_TO_READ_RESPONSE(Object arg0) {
- return localizer.localize(localizableFAILED_TO_READ_RESPONSE(arg0));
- }
-
- public static Localizable localizableEXCEPTION_INCORRECT_TYPE(Object arg0) {
- return messageFactory.getMessage("exception.incorrectType", arg0);
- }
-
- /**
- * incorrect type. Expected java.lang.Exception, found {0}
- *
- */
- public static String EXCEPTION_INCORRECT_TYPE(Object arg0) {
- return localizer.localize(localizableEXCEPTION_INCORRECT_TYPE(arg0));
- }
-
- public static Localizable localizableEXCEPTION_NOTFOUND(Object arg0) {
- return messageFactory.getMessage("exception.notfound", arg0);
- }
-
- /**
- * exception class: {0} not found in the model!
- *
- */
- public static String EXCEPTION_NOTFOUND(Object arg0) {
- return localizer.localize(localizableEXCEPTION_NOTFOUND(arg0));
- }
-
- public static Localizable localizableXSD_UNEXPECTED_ELEMENT_NAME(Object arg0, Object arg1) {
- return messageFactory.getMessage("xsd.unexpectedElementName", arg0, arg1);
- }
-
- /**
- * unexpected element name: expected={0}, actual: {1}
- *
- */
- public static String XSD_UNEXPECTED_ELEMENT_NAME(Object arg0, Object arg1) {
- return localizer.localize(localizableXSD_UNEXPECTED_ELEMENT_NAME(arg0, arg1));
- }
-
- public static Localizable localizableNESTED_DESERIALIZATION_ERROR(Object arg0) {
- return messageFactory.getMessage("nestedDeserializationError", arg0);
- }
-
- /**
- * deserialization error: {0}
- *
- */
- public static String NESTED_DESERIALIZATION_ERROR(Object arg0) {
- return localizer.localize(localizableNESTED_DESERIALIZATION_ERROR(arg0));
- }
-
- public static Localizable localizableNESTED_ENCODING_ERROR(Object arg0) {
- return messageFactory.getMessage("nestedEncodingError", arg0);
- }
-
- /**
- * encoding error: {0}
- *
- */
- public static String NESTED_ENCODING_ERROR(Object arg0) {
- return localizer.localize(localizableNESTED_ENCODING_ERROR(arg0));
- }
-
- public static Localizable localizableXSD_UNKNOWN_PREFIX(Object arg0) {
- return messageFactory.getMessage("xsd.unknownPrefix", arg0);
- }
-
- /**
- * unknown prefix "{0}"
- *
- */
- public static String XSD_UNKNOWN_PREFIX(Object arg0) {
- return localizer.localize(localizableXSD_UNKNOWN_PREFIX(arg0));
- }
-
- public static Localizable localizableNESTED_SERIALIZATION_ERROR(Object arg0) {
- return messageFactory.getMessage("nestedSerializationError", arg0);
- }
-
- /**
- * serialization error: {0}
- *
- */
- public static String NESTED_SERIALIZATION_ERROR(Object arg0) {
- return localizer.localize(localizableNESTED_SERIALIZATION_ERROR(arg0));
- }
-
- public static Localizable localizableNO_SUCH_CONTENT_ID(Object arg0) {
- return messageFactory.getMessage("noSuchContentId", arg0);
- }
-
- /**
- * There''s no attachment for the content ID "{0}"
- *
- */
- public static String NO_SUCH_CONTENT_ID(Object arg0) {
- return localizer.localize(localizableNO_SUCH_CONTENT_ID(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HandlerMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HandlerMessages.java
deleted file mode 100644
index 892d8cad..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HandlerMessages.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class HandlerMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.handler");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableHANDLER_MESSAGE_CONTEXT_INVALID_CLASS(Object arg0, Object arg1) {
- return messageFactory.getMessage("handler.messageContext.invalid.class", arg0, arg1);
- }
-
- /**
- * "{0}" is not an allowed value for the property "{1}"
- *
- */
- public static String HANDLER_MESSAGE_CONTEXT_INVALID_CLASS(Object arg0, Object arg1) {
- return localizer.localize(localizableHANDLER_MESSAGE_CONTEXT_INVALID_CLASS(arg0, arg1));
- }
-
- public static Localizable localizableCANNOT_EXTEND_HANDLER_DIRECTLY(Object arg0) {
- return messageFactory.getMessage("cannot.extend.handler.directly", arg0);
- }
-
- /**
- * Handler {0} must implement LogicalHandler or SOAPHandler.
- *
- */
- public static String CANNOT_EXTEND_HANDLER_DIRECTLY(Object arg0) {
- return localizer.localize(localizableCANNOT_EXTEND_HANDLER_DIRECTLY(arg0));
- }
-
- public static Localizable localizableHANDLER_NOT_VALID_TYPE(Object arg0) {
- return messageFactory.getMessage("handler.not.valid.type", arg0);
- }
-
- /**
- * {0} does not implement one of the handler interfaces.
- *
- */
- public static String HANDLER_NOT_VALID_TYPE(Object arg0) {
- return localizer.localize(localizableHANDLER_NOT_VALID_TYPE(arg0));
- }
-
- public static Localizable localizableCANNOT_INSTANTIATE_HANDLER(Object arg0, Object arg1) {
- return messageFactory.getMessage("cannot.instantiate.handler", arg0, arg1);
- }
-
- /**
- * Unable to instantiate handler: {0} because: {1}
- *
- */
- public static String CANNOT_INSTANTIATE_HANDLER(Object arg0, Object arg1) {
- return localizer.localize(localizableCANNOT_INSTANTIATE_HANDLER(arg0, arg1));
- }
-
- public static Localizable localizableHANDLER_CHAIN_CONTAINS_HANDLER_ONLY(Object arg0) {
- return messageFactory.getMessage("handler.chain.contains.handler.only", arg0);
- }
-
- /**
- * A HandlerChain can only contain Handler instances: {0}
- *
- */
- public static String HANDLER_CHAIN_CONTAINS_HANDLER_ONLY(Object arg0) {
- return localizer.localize(localizableHANDLER_CHAIN_CONTAINS_HANDLER_ONLY(arg0));
- }
-
- public static Localizable localizableHANDLER_NESTED_ERROR(Object arg0) {
- return messageFactory.getMessage("handler.nestedError", arg0);
- }
-
- /**
- * handler error: {0}
- *
- */
- public static String HANDLER_NESTED_ERROR(Object arg0) {
- return localizer.localize(localizableHANDLER_NESTED_ERROR(arg0));
- }
-
- public static Localizable localizableHANDLER_PREDESTROY_IGNORE(Object arg0) {
- return messageFactory.getMessage("handler.predestroy.ignore", arg0);
- }
-
- /**
- * Exception ignored from invoking handler @PreDestroy method: {0}
- *
- */
- public static String HANDLER_PREDESTROY_IGNORE(Object arg0) {
- return localizer.localize(localizableHANDLER_PREDESTROY_IGNORE(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java
deleted file mode 100644
index 3bac4c6c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class HttpserverMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.httpserver");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableUNEXPECTED_HTTP_METHOD(Object arg0) {
- return messageFactory.getMessage("unexpected.http.method", arg0);
- }
-
- /**
- * Cannot handle HTTP method: {0}
- *
- */
- public static String UNEXPECTED_HTTP_METHOD(Object arg0) {
- return localizer.localize(localizableUNEXPECTED_HTTP_METHOD(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ManagementMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ManagementMessages.java
deleted file mode 100644
index c59dbb64..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ManagementMessages.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class ManagementMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.management");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableWSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE(Object arg0) {
- return messageFactory.getMessage("WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE", arg0);
- }
-
- /**
- * WSM1008: Expected an integer as value of the endpointDisposeDelay attribute, got this instead: "{0}".
- *
- */
- public static String WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE(Object arg0) {
- return localizer.localize(localizableWSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE(arg0));
- }
-
- public static Localizable localizableWSM_1004_EXPECTED_XML_TAG(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSM_1004_EXPECTED_XML_TAG", arg0, arg1);
- }
-
- /**
- * WSM1004: Expected tag <{0}> but instead read <{1}>.
- *
- */
- public static String WSM_1004_EXPECTED_XML_TAG(Object arg0, Object arg1) {
- return localizer.localize(localizableWSM_1004_EXPECTED_XML_TAG(arg0, arg1));
- }
-
- public static Localizable localizableWSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION() {
- return messageFactory.getMessage("WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION");
- }
-
- /**
- * WSM1007: Failed to create a ModelTranslator instance.
- *
- */
- public static String WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION() {
- return localizer.localize(localizableWSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION());
- }
-
- public static Localizable localizableWSM_1002_EXPECTED_MANAGEMENT_ASSERTION(Object arg0) {
- return messageFactory.getMessage("WSM_1002_EXPECTED_MANAGEMENT_ASSERTION", arg0);
- }
-
- /**
- * WSM1002: Expected policy assertion {0} in this namespace.
- *
- */
- public static String WSM_1002_EXPECTED_MANAGEMENT_ASSERTION(Object arg0) {
- return localizer.localize(localizableWSM_1002_EXPECTED_MANAGEMENT_ASSERTION(arg0));
- }
-
- public static Localizable localizableWSM_1006_CLIENT_MANAGEMENT_ENABLED() {
- return messageFactory.getMessage("WSM_1006_CLIENT_MANAGEMENT_ENABLED");
- }
-
- /**
- * WSM1006: The management property of the ManagedClient policy assertion is set to on. Clients cannot be managed and this setting will be ignored.
- *
- */
- public static String WSM_1006_CLIENT_MANAGEMENT_ENABLED() {
- return localizer.localize(localizableWSM_1006_CLIENT_MANAGEMENT_ENABLED());
- }
-
- public static Localizable localizableWSM_1001_FAILED_ASSERTION(Object arg0) {
- return messageFactory.getMessage("WSM_1001_FAILED_ASSERTION", arg0);
- }
-
- /**
- * WSM1001: Failed to get policy assertion {0}.
- *
- */
- public static String WSM_1001_FAILED_ASSERTION(Object arg0) {
- return localizer.localize(localizableWSM_1001_FAILED_ASSERTION(arg0));
- }
-
- public static Localizable localizableWSM_1005_EXPECTED_COMMUNICATION_CHILD() {
- return messageFactory.getMessage("WSM_1005_EXPECTED_COMMUNICATION_CHILD");
- }
-
- /**
- * WSM1005: Expected to find a CommunicationServerImplementation tag as child node of CommunicationServerImplementations.
- *
- */
- public static String WSM_1005_EXPECTED_COMMUNICATION_CHILD() {
- return localizer.localize(localizableWSM_1005_EXPECTED_COMMUNICATION_CHILD());
- }
-
- public static Localizable localizableWSM_1003_MANAGEMENT_ASSERTION_MISSING_ID(Object arg0) {
- return messageFactory.getMessage("WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID", arg0);
- }
-
- /**
- * WSM1003: Policy assertion {0} must have id attribute when management is enabled.
- *
- */
- public static String WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID(Object arg0) {
- return localizer.localize(localizableWSM_1003_MANAGEMENT_ASSERTION_MISSING_ID(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ModelerMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ModelerMessages.java
deleted file mode 100644
index 832c2c68..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ModelerMessages.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class ModelerMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.modeler");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableNESTED_MODELER_ERROR(Object arg0) {
- return messageFactory.getMessage("nestedModelerError", arg0);
- }
-
- /**
- * runtime modeler error: {0}
- *
- */
- public static String NESTED_MODELER_ERROR(Object arg0) {
- return localizer.localize(localizableNESTED_MODELER_ERROR(arg0));
- }
-
- public static Localizable localizableRUNTIME_MODELER_WSFEATURE_NO_FTRCONSTRUCTOR(Object arg0, Object arg1) {
- return messageFactory.getMessage("runtime.modeler.wsfeature.no.ftrconstructor", arg0, arg1);
- }
-
- /**
- * Annotation {0} is not recognizable, at least one constructor of {1} should be marked with @FeatureConstructor
- *
- */
- public static String RUNTIME_MODELER_WSFEATURE_NO_FTRCONSTRUCTOR(Object arg0, Object arg1) {
- return localizer.localize(localizableRUNTIME_MODELER_WSFEATURE_NO_FTRCONSTRUCTOR(arg0, arg1));
- }
-
- public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNABLE_TO_READ(Object arg0) {
- return messageFactory.getMessage("runtime.modeler.external.metadata.unable.to.read", arg0);
- }
-
- /**
- * Unable to read metadata file {0}. Check configuration/deployment.
- *
- */
- public static String RUNTIME_MODELER_EXTERNAL_METADATA_UNABLE_TO_READ(Object arg0) {
- return localizer.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNABLE_TO_READ(arg0));
- }
-
- public static Localizable localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_PUBLIC(Object arg0) {
- return messageFactory.getMessage("runtime.modeler.webmethod.must.be.public", arg0);
- }
-
- /**
- * @WebMethod is not allowed on a non-public method {0}
- *
- */
- public static String RUNTIME_MODELER_WEBMETHOD_MUST_BE_PUBLIC(Object arg0) {
- return localizer.localize(localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_PUBLIC(arg0));
- }
-
- public static Localizable localizableRUNTIME_MODELER_WRAPPER_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("runtime.modeler.wrapper.not.found", arg0);
- }
-
- /**
- * Wrapper class {0} is not found. Have you run annotation processing to generate them?
- *
- */
- public static String RUNTIME_MODELER_WRAPPER_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableRUNTIME_MODELER_WRAPPER_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableRUNTIME_MODELER_MTOM_CONFLICT(Object arg0, Object arg1) {
- return messageFactory.getMessage("runtime.modeler.mtom.conflict", arg0, arg1);
- }
-
- /**
- * Error in @BindingType: MTOM Configuration in binding identifier {0} conflicts with feature @MTOM {1}
- *
- */
- public static String RUNTIME_MODELER_MTOM_CONFLICT(Object arg0, Object arg1) {
- return localizer.localize(localizableRUNTIME_MODELER_MTOM_CONFLICT(arg0, arg1));
- }
-
- public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_GENERIC(Object arg0) {
- return messageFactory.getMessage("runtime.modeler.external.metadata.generic", arg0);
- }
-
- /**
- * An error occurred while processing external WS metadata; check configuration/deployment. Nested error: {0}.
- *
- */
- public static String RUNTIME_MODELER_EXTERNAL_METADATA_GENERIC(Object arg0) {
- return localizer.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_GENERIC(arg0));
- }
-
- public static Localizable localizableRUNTIME_MODELER_FEATURE_CONFLICT(Object arg0, Object arg1) {
- return messageFactory.getMessage("runtime.modeler.feature.conflict", arg0, arg1);
- }
-
- /**
- * Feature {0} in implementation conflicts with {1} in WSDL configuration
- *
- */
- public static String RUNTIME_MODELER_FEATURE_CONFLICT(Object arg0, Object arg1) {
- return localizer.localize(localizableRUNTIME_MODELER_FEATURE_CONFLICT(arg0, arg1));
- }
-
- public static Localizable localizableRUNTIME_MODELER_INVALID_SOAPBINDING_PARAMETERSTYLE(Object arg0, Object arg1) {
- return messageFactory.getMessage("runtime.modeler.invalid.soapbinding.parameterstyle", arg0, arg1);
- }
-
- /**
- * Incorrect usage of Annotation {0} on {1}, ParameterStyle can only be WRAPPED with RPC Style Web service.
- *
- */
- public static String RUNTIME_MODELER_INVALID_SOAPBINDING_PARAMETERSTYLE(Object arg0, Object arg1) {
- return localizer.localize(localizableRUNTIME_MODELER_INVALID_SOAPBINDING_PARAMETERSTYLE(arg0, arg1));
- }
-
- public static Localizable localizableRUNTIME_MODELER_WSFEATURE_MORETHANONE_FTRCONSTRUCTOR(Object arg0, Object arg1) {
- return messageFactory.getMessage("runtime.modeler.wsfeature.morethanone.ftrconstructor", arg0, arg1);
- }
-
- /**
- * Annotation {0} is illegal, Only one constructor of {1} can be marked as @FeatureConstructor
- *
- */
- public static String RUNTIME_MODELER_WSFEATURE_MORETHANONE_FTRCONSTRUCTOR(Object arg0, Object arg1) {
- return localizer.localize(localizableRUNTIME_MODELER_WSFEATURE_MORETHANONE_FTRCONSTRUCTOR(arg0, arg1));
- }
-
- public static Localizable localizableNOT_A_VALID_BARE_METHOD(Object arg0, Object arg1) {
- return messageFactory.getMessage("not.a.valid.bare.method", arg0, arg1);
- }
-
- /**
- * SEI {0} has method {1} annotated as BARE but it has more than one parameter bound to body. This is invalid. Please annotate the method with annotation: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
- *
- */
- public static String NOT_A_VALID_BARE_METHOD(Object arg0, Object arg1) {
- return localizer.localize(localizableNOT_A_VALID_BARE_METHOD(arg0, arg1));
- }
-
- public static Localizable localizableRUNTIME_MODELER_NO_PACKAGE(Object arg0) {
- return messageFactory.getMessage("runtime.modeler.no.package", arg0);
- }
-
- /**
- * A @WebService.targetNamespace must be specified on classes with no package. Class: {0}
- *
- */
- public static String RUNTIME_MODELER_NO_PACKAGE(Object arg0) {
- return localizer.localize(localizableRUNTIME_MODELER_NO_PACKAGE(arg0));
- }
-
- public static Localizable localizableRUNTIME_MODELER_NO_WEBSERVICE_ANNOTATION(Object arg0) {
- return messageFactory.getMessage("runtime.modeler.no.webservice.annotation", arg0);
- }
-
- /**
- * A WebService annotation is not present on class: {0}
- *
- */
- public static String RUNTIME_MODELER_NO_WEBSERVICE_ANNOTATION(Object arg0) {
- return localizer.localize(localizableRUNTIME_MODELER_NO_WEBSERVICE_ANNOTATION(arg0));
- }
-
- public static Localizable localizableRUNTIME_MODELER_ADDRESSING_RESPONSES_NOSUCHMETHOD(Object arg0) {
- return messageFactory.getMessage("runtime.modeler.addressing.responses.nosuchmethod", arg0);
- }
-
- /**
- * JAX-WS 2.1 API is loaded from {0}, But JAX-WS runtime requires JAX-WS 2.2 API. Use the endorsed standards override mechanism to load JAX-WS 2.2 API
- *
- */
- public static String RUNTIME_MODELER_ADDRESSING_RESPONSES_NOSUCHMETHOD(Object arg0) {
- return localizer.localize(localizableRUNTIME_MODELER_ADDRESSING_RESPONSES_NOSUCHMETHOD(arg0));
- }
-
- public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_WRONG_FORMAT(Object arg0) {
- return messageFactory.getMessage("runtime.modeler.external.metadata.wrong.format", arg0);
- }
-
- /**
- * Unable to read metadata from {0}. Is the format correct?
- *
- */
- public static String RUNTIME_MODELER_EXTERNAL_METADATA_WRONG_FORMAT(Object arg0) {
- return localizer.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_WRONG_FORMAT(arg0));
- }
-
- public static Localizable localizableRUNTIME_MODELER_ONEWAY_OPERATION_NO_OUT_PARAMETERS(Object arg0, Object arg1) {
- return messageFactory.getMessage("runtime.modeler.oneway.operation.no.out.parameters", arg0, arg1);
- }
-
- /**
- * oneway operation should not have OUT parameters class: {0} method: {1}
- *
- */
- public static String RUNTIME_MODELER_ONEWAY_OPERATION_NO_OUT_PARAMETERS(Object arg0, Object arg1) {
- return localizer.localize(localizableRUNTIME_MODELER_ONEWAY_OPERATION_NO_OUT_PARAMETERS(arg0, arg1));
- }
-
- public static Localizable localizableUNABLE_TO_CREATE_JAXB_CONTEXT() {
- return messageFactory.getMessage("unable.to.create.JAXBContext");
- }
-
- /**
- * Unable to create JAXBContext
- *
- */
- public static String UNABLE_TO_CREATE_JAXB_CONTEXT() {
- return localizer.localize(localizableUNABLE_TO_CREATE_JAXB_CONTEXT());
- }
-
- public static Localizable localizableRUNTIME_MODELER_NO_OPERATIONS(Object arg0) {
- return messageFactory.getMessage("runtime.modeler.no.operations", arg0);
- }
-
- /**
- * The web service defined by the class {0} does not contain any valid WebMethods.
- *
- */
- public static String RUNTIME_MODELER_NO_OPERATIONS(Object arg0) {
- return localizer.localize(localizableRUNTIME_MODELER_NO_OPERATIONS(arg0));
- }
-
- public static Localizable localizableRUNTIME_MODELER_ONEWAY_OPERATION_NO_CHECKED_EXCEPTIONS(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("runtime.modeler.oneway.operation.no.checked.exceptions", arg0, arg1, arg2);
- }
-
- /**
- * Oneway operation should not throw any checked exceptions class: {0} method: {1} throws: {2}
- *
- */
- public static String RUNTIME_MODELER_ONEWAY_OPERATION_NO_CHECKED_EXCEPTIONS(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableRUNTIME_MODELER_ONEWAY_OPERATION_NO_CHECKED_EXCEPTIONS(arg0, arg1, arg2));
- }
-
- public static Localizable localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATIC(Object arg0) {
- return messageFactory.getMessage("runtime.modeler.webmethod.must.be.nonstatic", arg0);
- }
-
- /**
- * @WebMethod is not allowed on a static method {0}
- *
- */
- public static String RUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATIC(Object arg0) {
- return localizer.localize(localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATIC(arg0));
- }
-
- public static Localizable localizableRUNTIME_MODELER_METHOD_NOT_FOUND(Object arg0, Object arg1) {
- return messageFactory.getMessage("runtime.modeler.method.not.found", arg0, arg1);
- }
-
- /**
- * method: {0} could not be found on class: {1}
- *
- */
- public static String RUNTIME_MODELER_METHOD_NOT_FOUND(Object arg0, Object arg1) {
- return localizer.localize(localizableRUNTIME_MODELER_METHOD_NOT_FOUND(arg0, arg1));
- }
-
- public static Localizable localizableRUNTIME_MODELER_CLASS_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("runtime.modeler.class.not.found", arg0);
- }
-
- /**
- * class: {0} could not be found
- *
- */
- public static String RUNTIME_MODELER_CLASS_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableRUNTIME_MODELER_CLASS_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableRUNTIME_MODELER_SOAPBINDING_CONFLICT(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("runtime.modeler.soapbinding.conflict", arg0, arg1, arg2);
- }
-
- /**
- * SOAPBinding Style {0} for method {1} conflicts with global SOAPBinding Style {2}
- *
- */
- public static String RUNTIME_MODELER_SOAPBINDING_CONFLICT(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableRUNTIME_MODELER_SOAPBINDING_CONFLICT(arg0, arg1, arg2));
- }
-
- public static Localizable localizableRUNTIME_MODELER_CANNOT_GET_SERVICE_NAME_FROM_INTERFACE(Object arg0) {
- return messageFactory.getMessage("runtime.modeler.cannot.get.serviceName.from.interface", arg0);
- }
-
- /**
- * The serviceName cannot be retrieved from an interface. class {0}
- *
- */
- public static String RUNTIME_MODELER_CANNOT_GET_SERVICE_NAME_FROM_INTERFACE(Object arg0) {
- return localizer.localize(localizableRUNTIME_MODELER_CANNOT_GET_SERVICE_NAME_FROM_INTERFACE(arg0));
- }
-
- public static Localizable localizableRUNTIME_MODELER_ENDPOINT_INTERFACE_NO_WEBSERVICE(Object arg0) {
- return messageFactory.getMessage("runtime.modeler.endpoint.interface.no.webservice", arg0);
- }
-
- /**
- * The Endpoint Interface: {0} does not have WebService Annotation
- *
- */
- public static String RUNTIME_MODELER_ENDPOINT_INTERFACE_NO_WEBSERVICE(Object arg0) {
- return localizer.localize(localizableRUNTIME_MODELER_ENDPOINT_INTERFACE_NO_WEBSERVICE(arg0));
- }
-
- public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNSUPPORTED_SCHEMA(Object arg0, Object arg1) {
- return messageFactory.getMessage("runtime.modeler.external.metadata.unsupported.schema", arg0, arg1);
- }
-
- /**
- * Unsupported metadata file schema {0}. Supported schemes are {1}.
- *
- */
- public static String RUNTIME_MODELER_EXTERNAL_METADATA_UNSUPPORTED_SCHEMA(Object arg0, Object arg1) {
- return localizer.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNSUPPORTED_SCHEMA(arg0, arg1));
- }
-
- public static Localizable localizableRUNTIMEMODELER_INVALID_SOAPBINDING_ON_METHOD(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("runtimemodeler.invalid.soapbindingOnMethod", arg0, arg1, arg2);
- }
-
- /**
- * Invalid annotation: {0} on Method {1} in Class {2}, A method cannot be annotated with @SOAPBinding with Style "RPC"
- *
- */
- public static String RUNTIMEMODELER_INVALID_SOAPBINDING_ON_METHOD(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableRUNTIMEMODELER_INVALID_SOAPBINDING_ON_METHOD(arg0, arg1, arg2));
- }
-
- public static Localizable localizableRUNTIME_MODELER_PORTNAME_SERVICENAME_NAMESPACE_MISMATCH(Object arg0, Object arg1) {
- return messageFactory.getMessage("runtime.modeler.portname.servicename.namespace.mismatch", arg0, arg1);
- }
-
- /**
- * The namespace of the serviceName "{0}" and the namespace of the portName "{1}" must match
- *
- */
- public static String RUNTIME_MODELER_PORTNAME_SERVICENAME_NAMESPACE_MISMATCH(Object arg0, Object arg1) {
- return localizer.localize(localizableRUNTIME_MODELER_PORTNAME_SERVICENAME_NAMESPACE_MISMATCH(arg0, arg1));
- }
-
- public static Localizable localizableRUNTIME_MODELER_WSFEATURE_ILLEGAL_FTRCONSTRUCTOR(Object arg0, Object arg1) {
- return messageFactory.getMessage("runtime.modeler.wsfeature.illegal.ftrconstructor", arg0, arg1);
- }
-
- /**
- * Annotation {0} is illegal, In {1} @FeatureConstructor value doesn't match the constructor parameters
- *
- */
- public static String RUNTIME_MODELER_WSFEATURE_ILLEGAL_FTRCONSTRUCTOR(Object arg0, Object arg1) {
- return localizer.localize(localizableRUNTIME_MODELER_WSFEATURE_ILLEGAL_FTRCONSTRUCTOR(arg0, arg1));
- }
-
- public static Localizable localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATICFINAL(Object arg0) {
- return messageFactory.getMessage("runtime.modeler.webmethod.must.be.nonstaticfinal", arg0);
- }
-
- /**
- * @WebMethod is not allowed on a static or final method {0}
- *
- */
- public static String RUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATICFINAL(Object arg0) {
- return localizer.localize(localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_NONSTATICFINAL(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/PolicyMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/PolicyMessages.java
deleted file mode 100644
index 443a8c3c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/PolicyMessages.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class PolicyMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.policy");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableWSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL() {
- return messageFactory.getMessage("WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL");
- }
-
- /**
- * WSP1007: Policy exception occurred when finishing WSDL parsing.
- *
- */
- public static String WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL() {
- return localizer.localize(localizableWSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL());
- }
-
- public static Localizable localizableWSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE() {
- return messageFactory.getMessage("WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE");
- }
-
- /**
- * WSP1002: Unable to marshall policy or it's reference. See original exception for more details.
- *
- */
- public static String WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE() {
- return localizer.localize(localizableWSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE());
- }
-
- public static Localizable localizableWSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED", arg0, arg1);
- }
-
- /**
- * WSP1015: Server side assertion validation failed for "{0}" assertion. Assertion was evaluated as "{1}".
- *
- */
- public static String WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(arg0, arg1));
- }
-
- public static Localizable localizableWSP_1017_MAP_UPDATE_FAILED() {
- return messageFactory.getMessage("WSP_1017_MAP_UPDATE_FAILED");
- }
-
- /**
- * WSP1048: Policy map setup failed - exception occurred while trying to modify policy map content.
- *
- */
- public static String WSP_1017_MAP_UPDATE_FAILED() {
- return localizer.localize(localizableWSP_1017_MAP_UPDATE_FAILED());
- }
-
- public static Localizable localizableWSP_1010_NO_POLICIES_DEFINED() {
- return messageFactory.getMessage("WSP_1010_NO_POLICIES_DEFINED");
- }
-
- /**
- * WSP1010: No policies defined.
- *
- */
- public static String WSP_1010_NO_POLICIES_DEFINED() {
- return localizer.localize(localizableWSP_1010_NO_POLICIES_DEFINED());
- }
-
- public static Localizable localizableWSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL(Object arg0) {
- return messageFactory.getMessage("WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL", arg0);
- }
-
- /**
- * WSP1008: Not marshalling policy, wsdl subject is null for "{0}".
- *
- */
- public static String WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL(Object arg0) {
- return localizer.localize(localizableWSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL(arg0));
- }
-
- public static Localizable localizableWSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL() {
- return messageFactory.getMessage("WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL");
- }
-
- /**
- * WSP1009: Policy map was null, not marshalling any policies.
- *
- */
- public static String WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL() {
- return localizer.localize(localizableWSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL());
- }
-
- public static Localizable localizableWSP_1020_DUPLICATE_ID(Object arg0) {
- return messageFactory.getMessage("WSP_1020_DUPLICATE_ID", arg0);
- }
-
- /**
- * WSP1020: Found two policies in one document with the same id: "{0}".
- *
- */
- public static String WSP_1020_DUPLICATE_ID(Object arg0) {
- return localizer.localize(localizableWSP_1020_DUPLICATE_ID(arg0));
- }
-
- public static Localizable localizableWSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(Object arg0, Object arg1) {
- return messageFactory.getMessage("WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME", arg0, arg1);
- }
-
- /**
- * WSP1003: Unable to check element name for class "{0}" and WSDL name "{1}".
- *
- */
- public static String WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(Object arg0, Object arg1) {
- return localizer.localize(localizableWSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME(arg0, arg1));
- }
-
- public static Localizable localizableWSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT(Object arg0) {
- return messageFactory.getMessage("WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT", arg0);
- }
-
- /**
- * WSP1013: Exception occurred while reading policy element. Following was read so far: {0}.
- *
- */
- public static String WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT(Object arg0) {
- return localizer.localize(localizableWSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT(arg0));
- }
-
- public static Localizable localizableWSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL() {
- return messageFactory.getMessage("WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL");
- }
-
- /**
- * WSP1006: Policy map extender can not be null.
- *
- */
- public static String WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL() {
- return localizer.localize(localizableWSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL());
- }
-
- public static Localizable localizableWSP_1018_FAILED_TO_MARSHALL_POLICY(Object arg0) {
- return messageFactory.getMessage("WSP_1018_FAILED_TO_MARSHALL_POLICY", arg0);
- }
-
- /**
- * WSP1018: Failed to marshal policy "{0}".
- *
- */
- public static String WSP_1018_FAILED_TO_MARSHALL_POLICY(Object arg0) {
- return localizer.localize(localizableWSP_1018_FAILED_TO_MARSHALL_POLICY(arg0));
- }
-
- public static Localizable localizableWSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST(Object arg0) {
- return messageFactory.getMessage("WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST", arg0);
- }
-
- /**
- * WSP1005: Failed to find policy referenced by URI "{0}".
- *
- */
- public static String WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST(Object arg0) {
- return localizer.localize(localizableWSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST(arg0));
- }
-
- public static Localizable localizableWSP_1016_POLICY_ID_NULL_OR_DUPLICATE(Object arg0) {
- return messageFactory.getMessage("WSP_1016_POLICY_ID_NULL_OR_DUPLICATE", arg0);
- }
-
- /**
- * WSP1016: The policy is not added because it has no ID or a policy with the same ID was already added: {0}.
- *
- */
- public static String WSP_1016_POLICY_ID_NULL_OR_DUPLICATE(Object arg0) {
- return localizer.localize(localizableWSP_1016_POLICY_ID_NULL_OR_DUPLICATE(arg0));
- }
-
- public static Localizable localizableWSP_1014_CAN_NOT_FIND_POLICY(Object arg0) {
- return messageFactory.getMessage("WSP_1014_CAN_NOT_FIND_POLICY", arg0);
- }
-
- /**
- * WSP1014: Can not find policy "{0}" that is referenced in from the WSDL. Please, check your policy references in the WSDL.
- *
- */
- public static String WSP_1014_CAN_NOT_FIND_POLICY(Object arg0) {
- return localizer.localize(localizableWSP_1014_CAN_NOT_FIND_POLICY(arg0));
- }
-
- public static Localizable localizableWSP_1012_FAILED_CONFIGURE_WSDL_MODEL() {
- return messageFactory.getMessage("WSP_1012_FAILED_CONFIGURE_WSDL_MODEL");
- }
-
- /**
- * WSP1012: Failed to configure wsdl model.
- *
- */
- public static String WSP_1012_FAILED_CONFIGURE_WSDL_MODEL() {
- return localizer.localize(localizableWSP_1012_FAILED_CONFIGURE_WSDL_MODEL());
- }
-
- public static Localizable localizableWSP_1021_FAULT_NOT_BOUND(Object arg0) {
- return messageFactory.getMessage("WSP_1021_FAULT_NOT_BOUND", arg0);
- }
-
- /**
- * WSP1021: Fault "{0}" not bound. Check names in port and binding definitions.
- *
- */
- public static String WSP_1021_FAULT_NOT_BOUND(Object arg0) {
- return localizer.localize(localizableWSP_1021_FAULT_NOT_BOUND(arg0));
- }
-
- public static Localizable localizableWSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(Object arg0) {
- return messageFactory.getMessage("WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT", arg0);
- }
-
- /**
- * WSP1011: Failed to retrieve effective policy for subject: {0}.
- *
- */
- public static String WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(Object arg0) {
- return localizer.localize(localizableWSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(arg0));
- }
-
- public static Localizable localizableWSP_1019_CREATE_EMPTY_POLICY_MAP() {
- return messageFactory.getMessage("WSP_1019_CREATE_EMPTY_POLICY_MAP");
- }
-
- /**
- * WSP1019: Failed to find any configuration file. Creating new empty policy map.
- *
- */
- public static String WSP_1019_CREATE_EMPTY_POLICY_MAP() {
- return localizer.localize(localizableWSP_1019_CREATE_EMPTY_POLICY_MAP());
- }
-
- public static Localizable localizableWSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE() {
- return messageFactory.getMessage("WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE");
- }
-
- /**
- * WSP1001: XMLStreamException occurred when reading policy reference element.
- *
- */
- public static String WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE() {
- return localizer.localize(localizableWSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE());
- }
-
- public static Localizable localizableWSP_1004_POLICY_URIS_CAN_NOT_BE_NULL() {
- return messageFactory.getMessage("WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL");
- }
-
- /**
- * WSP1004: Policy URIs can not be null.
- *
- */
- public static String WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL() {
- return localizer.localize(localizableWSP_1004_POLICY_URIS_CAN_NOT_BE_NULL());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java
deleted file mode 100644
index e7f47259..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class ProviderApiMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.providerApi");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableNULL_ADDRESS_SERVICE_ENDPOINT() {
- return messageFactory.getMessage("null.address.service.endpoint");
- }
-
- /**
- * Address in an EPR cannot be null, when serviceName or portName is null
- *
- */
- public static String NULL_ADDRESS_SERVICE_ENDPOINT() {
- return localizer.localize(localizableNULL_ADDRESS_SERVICE_ENDPOINT());
- }
-
- public static Localizable localizableNO_WSDL_NO_PORT(Object arg0) {
- return messageFactory.getMessage("no.wsdl.no.port", arg0);
- }
-
- /**
- * WSDL Metadata not available to create the proxy, either Service instance or ServiceEndpointInterface {0} should have WSDL information
- *
- */
- public static String NO_WSDL_NO_PORT(Object arg0) {
- return localizer.localize(localizableNO_WSDL_NO_PORT(arg0));
- }
-
- public static Localizable localizableNULL_SERVICE() {
- return messageFactory.getMessage("null.service");
- }
-
- /**
- * serviceName can't be null when portName is specified
- *
- */
- public static String NULL_SERVICE() {
- return localizer.localize(localizableNULL_SERVICE());
- }
-
- public static Localizable localizableNULL_ADDRESS() {
- return messageFactory.getMessage("null.address");
- }
-
- /**
- * Address in an EPR cannot be null
- *
- */
- public static String NULL_ADDRESS() {
- return localizer.localize(localizableNULL_ADDRESS());
- }
-
- public static Localizable localizableNULL_PORTNAME() {
- return messageFactory.getMessage("null.portname");
- }
-
- /**
- * EPR doesn't have EndpointName in the Metadata
- *
- */
- public static String NULL_PORTNAME() {
- return localizer.localize(localizableNULL_PORTNAME());
- }
-
- public static Localizable localizableNOTFOUND_SERVICE_IN_WSDL(Object arg0, Object arg1) {
- return messageFactory.getMessage("notfound.service.in.wsdl", arg0, arg1);
- }
-
- /**
- * Service: {0} not found in WSDL: {1}
- *
- */
- public static String NOTFOUND_SERVICE_IN_WSDL(Object arg0, Object arg1) {
- return localizer.localize(localizableNOTFOUND_SERVICE_IN_WSDL(arg0, arg1));
- }
-
- public static Localizable localizableNULL_EPR() {
- return messageFactory.getMessage("null.epr");
- }
-
- /**
- * EndpointReference is null
- *
- */
- public static String NULL_EPR() {
- return localizer.localize(localizableNULL_EPR());
- }
-
- public static Localizable localizableNULL_WSDL() {
- return messageFactory.getMessage("null.wsdl");
- }
-
- /**
- * EPR doesn't have WSDL Metadata which is needed for the current operation
- *
- */
- public static String NULL_WSDL() {
- return localizer.localize(localizableNULL_WSDL());
- }
-
- public static Localizable localizableNOTFOUND_PORT_IN_WSDL(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("notfound.port.in.wsdl", arg0, arg1, arg2);
- }
-
- /**
- * Port: {0} not a valid port in Service: {1} in WSDL: {2}
- *
- */
- public static String NOTFOUND_PORT_IN_WSDL(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableNOTFOUND_PORT_IN_WSDL(arg0, arg1, arg2));
- }
-
- public static Localizable localizableERROR_WSDL(Object arg0) {
- return messageFactory.getMessage("error.wsdl", arg0);
- }
-
- /**
- * Error in parsing WSDL: {0}
- *
- */
- public static String ERROR_WSDL(Object arg0) {
- return localizer.localize(localizableERROR_WSDL(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SenderMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SenderMessages.java
deleted file mode 100644
index a26b58dc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SenderMessages.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class SenderMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.sender");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableSENDER_REQUEST_ILLEGAL_VALUE_FOR_CONTENT_NEGOTIATION(Object arg0) {
- return messageFactory.getMessage("sender.request.illegalValueForContentNegotiation", arg0);
- }
-
- /**
- * illegal value for content negotiation property "{0}"
- *
- */
- public static String SENDER_REQUEST_ILLEGAL_VALUE_FOR_CONTENT_NEGOTIATION(Object arg0) {
- return localizer.localize(localizableSENDER_REQUEST_ILLEGAL_VALUE_FOR_CONTENT_NEGOTIATION(arg0));
- }
-
- public static Localizable localizableSENDER_RESPONSE_CANNOT_DECODE_FAULT_DETAIL() {
- return messageFactory.getMessage("sender.response.cannotDecodeFaultDetail");
- }
-
- /**
- * fault detail cannot be decoded
- *
- */
- public static String SENDER_RESPONSE_CANNOT_DECODE_FAULT_DETAIL() {
- return localizer.localize(localizableSENDER_RESPONSE_CANNOT_DECODE_FAULT_DETAIL());
- }
-
- public static Localizable localizableSENDER_NESTED_ERROR(Object arg0) {
- return messageFactory.getMessage("sender.nestedError", arg0);
- }
-
- /**
- * sender error: {0}
- *
- */
- public static String SENDER_NESTED_ERROR(Object arg0) {
- return localizer.localize(localizableSENDER_NESTED_ERROR(arg0));
- }
-
- public static Localizable localizableSENDER_REQUEST_MESSAGE_NOT_READY() {
- return messageFactory.getMessage("sender.request.messageNotReady");
- }
-
- /**
- * message not ready to be sent
- *
- */
- public static String SENDER_REQUEST_MESSAGE_NOT_READY() {
- return localizer.localize(localizableSENDER_REQUEST_MESSAGE_NOT_READY());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ServerMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ServerMessages.java
deleted file mode 100644
index 53a4e033..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ServerMessages.java
+++ /dev/null
@@ -1,731 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class ServerMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.server");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICE(Object arg0, Object arg1) {
- return messageFactory.getMessage("runtime.parser.wsdl.incorrectservice", arg0, arg1);
- }
-
- /**
- * could not get binding from WSDL! service: {0} not found in the WSDL {1}.
- * It could be because service name does not match WSDL''s wsdl:service name:
- * 1. service name is not there in deployment descriptor OR
- * 2. Either there is a typo in deployment descriptor''s service name OR
- * 3. The computed names from @WebService do not match wsdl:service name
- * OR
- * 1. There is an error while parsing the wsdl and Service with name {0} is not found in the WSDLModel.
- * Suggest doing the following:
- * 1. Add/Correct entries for service name in deployment descriptor OR
- * 2. Specify targetNamespace, serviceName in @WebService on the endpoint class
- *
- */
- public static String RUNTIME_PARSER_WSDL_INCORRECTSERVICE(Object arg0, Object arg1) {
- return localizer.localize(localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICE(arg0, arg1));
- }
-
- public static Localizable localizableRUNTIME_PARSER_MISSING_ATTRIBUTE_NO_LINE() {
- return messageFactory.getMessage("runtime.parser.missing.attribute.no.line");
- }
-
- /**
- * missing attribute "{2}" in element "{1}" of runtime descriptor
- *
- */
- public static String RUNTIME_PARSER_MISSING_ATTRIBUTE_NO_LINE() {
- return localizer.localize(localizableRUNTIME_PARSER_MISSING_ATTRIBUTE_NO_LINE());
- }
-
- public static Localizable localizableSTATEFUL_COOKIE_HEADER_INCORRECT(Object arg0, Object arg1) {
- return messageFactory.getMessage("stateful.cookie.header.incorrect", arg0, arg1);
- }
-
- /**
- * Invalid/expired {0} header value: {1}
- *
- */
- public static String STATEFUL_COOKIE_HEADER_INCORRECT(Object arg0, Object arg1) {
- return localizer.localize(localizableSTATEFUL_COOKIE_HEADER_INCORRECT(arg0, arg1));
- }
-
- public static Localizable localizableNOT_IMPLEMENT_PROVIDER(Object arg0) {
- return messageFactory.getMessage("not.implement.provider", arg0);
- }
-
- /**
- * "{0}" doesn't implement Provider
- *
- */
- public static String NOT_IMPLEMENT_PROVIDER(Object arg0) {
- return localizer.localize(localizableNOT_IMPLEMENT_PROVIDER(arg0));
- }
-
- public static Localizable localizableSTATEFUL_REQURES_ADDRESSING(Object arg0) {
- return messageFactory.getMessage("stateful.requres.addressing", arg0);
- }
-
- /**
- * Stateful web service {0} requires the WS-Addressing support to be enabled. Perhaps you are missing @Addressing
- *
- */
- public static String STATEFUL_REQURES_ADDRESSING(Object arg0) {
- return localizer.localize(localizableSTATEFUL_REQURES_ADDRESSING(arg0));
- }
-
- public static Localizable localizableSOAPDECODER_ERR() {
- return messageFactory.getMessage("soapdecoder.err");
- }
-
- /**
- * Error in decoding SOAP Message
- *
- */
- public static String SOAPDECODER_ERR() {
- return localizer.localize(localizableSOAPDECODER_ERR());
- }
-
- public static Localizable localizableGENERATE_NON_STANDARD_WSDL() {
- return messageFactory.getMessage("generate.non.standard.wsdl");
- }
-
- /**
- * Generating non-standard WSDL for the specified binding
- *
- */
- public static String GENERATE_NON_STANDARD_WSDL() {
- return localizer.localize(localizableGENERATE_NON_STANDARD_WSDL());
- }
-
- public static Localizable localizableDISPATCH_CANNOT_FIND_METHOD(Object arg0) {
- return messageFactory.getMessage("dispatch.cannotFindMethod", arg0);
- }
-
- /**
- * Cannot find dispatch method for {0}
- *
- */
- public static String DISPATCH_CANNOT_FIND_METHOD(Object arg0) {
- return localizer.localize(localizableDISPATCH_CANNOT_FIND_METHOD(arg0));
- }
-
- public static Localizable localizableNO_CONTENT_TYPE() {
- return messageFactory.getMessage("no.contentType");
- }
-
- /**
- * Request doesn't have a Content-Type
- *
- */
- public static String NO_CONTENT_TYPE() {
- return localizer.localize(localizableNO_CONTENT_TYPE());
- }
-
- public static Localizable localizableRUNTIME_PARSER_INVALID_VERSION_NUMBER() {
- return messageFactory.getMessage("runtime.parser.invalidVersionNumber");
- }
-
- /**
- * unsupported runtime descriptor version: {2}
- *
- */
- public static String RUNTIME_PARSER_INVALID_VERSION_NUMBER() {
- return localizer.localize(localizableRUNTIME_PARSER_INVALID_VERSION_NUMBER());
- }
-
- public static Localizable localizablePROVIDER_INVALID_PARAMETER_TYPE(Object arg0, Object arg1) {
- return messageFactory.getMessage("provider.invalid.parameterType", arg0, arg1);
- }
-
- /**
- * "{0}" implements Provider but its type parameter {1} is incorrect
- *
- */
- public static String PROVIDER_INVALID_PARAMETER_TYPE(Object arg0, Object arg1) {
- return localizer.localize(localizablePROVIDER_INVALID_PARAMETER_TYPE(arg0, arg1));
- }
-
- public static Localizable localizableWRONG_NO_PARAMETERS(Object arg0) {
- return messageFactory.getMessage("wrong.no.parameters", arg0);
- }
-
- /**
- * Incorrect no of arguments for method "{0}"
- *
- */
- public static String WRONG_NO_PARAMETERS(Object arg0) {
- return localizer.localize(localizableWRONG_NO_PARAMETERS(arg0));
- }
-
- public static Localizable localizableANNOTATION_ONLY_ONCE(Object arg0) {
- return messageFactory.getMessage("annotation.only.once", arg0);
- }
-
- /**
- * Only one method should have the annotation "{0}"
- *
- */
- public static String ANNOTATION_ONLY_ONCE(Object arg0) {
- return localizer.localize(localizableANNOTATION_ONLY_ONCE(arg0));
- }
-
- public static Localizable localizableALREADY_HTTPS_SERVER(Object arg0) {
- return messageFactory.getMessage("already.https.server", arg0);
- }
-
- /**
- * There is already a HTTPS server at : {0}
- *
- */
- public static String ALREADY_HTTPS_SERVER(Object arg0) {
- return localizer.localize(localizableALREADY_HTTPS_SERVER(arg0));
- }
-
- public static Localizable localizableRUNTIME_PARSER_XML_READER(Object arg0) {
- return messageFactory.getMessage("runtime.parser.xmlReader", arg0);
- }
-
- /**
- * error parsing runtime descriptor: {0}
- *
- */
- public static String RUNTIME_PARSER_XML_READER(Object arg0) {
- return localizer.localize(localizableRUNTIME_PARSER_XML_READER(arg0));
- }
-
- public static Localizable localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICEPORT(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("runtime.parser.wsdl.incorrectserviceport", arg0, arg1, arg2);
- }
-
- /**
- * could not get binding from WSDL! service: {0} or port {1} not found in the WSDL {2}.
- * It could be because service and port names do not match WSDL''s wsdl:service and wsdl:port names:
- * 1. service and port names are not there in deployment descriptor OR
- * 2. Either there is a typo in deployment descriptor''s service and port names OR
- * 3. The computed names from @WebService do not match wsdl:service and wsdl:port names
- * Suggest doing the following:
- * 1. Add/Correct entries for service and port names in deployment descriptor OR
- * 2. Specify targetNamespace, serviceName, portName in @WebService on the endpoint class
- *
- */
- public static String RUNTIME_PARSER_WSDL_INCORRECTSERVICEPORT(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICEPORT(arg0, arg1, arg2));
- }
-
- public static Localizable localizableSERVER_RT_ERR(Object arg0) {
- return messageFactory.getMessage("server.rt.err", arg0);
- }
-
- /**
- * Server Runtime Error: {0}
- *
- */
- public static String SERVER_RT_ERR(Object arg0) {
- return localizer.localize(localizableSERVER_RT_ERR(arg0));
- }
-
- public static Localizable localizableRUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("runtime.parser.invalidAttributeValue", arg0, arg1, arg2);
- }
-
- /**
- * invalid value for attribute "{2}" of element "{1}" in runtime descriptor (line {0})
- *
- */
- public static String RUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableRUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableNO_CURRENT_PACKET() {
- return messageFactory.getMessage("no.current.packet");
- }
-
- /**
- * This thread is not currently processing any web service request.
- *
- */
- public static String NO_CURRENT_PACKET() {
- return localizer.localize(localizableNO_CURRENT_PACKET());
- }
-
- public static Localizable localizableRUNTIME_PARSER_UNEXPECTED_CONTENT(Object arg0) {
- return messageFactory.getMessage("runtime.parser.unexpectedContent", arg0);
- }
-
- /**
- * unexpected content in runtime descriptor (line {0})
- *
- */
- public static String RUNTIME_PARSER_UNEXPECTED_CONTENT(Object arg0) {
- return localizer.localize(localizableRUNTIME_PARSER_UNEXPECTED_CONTENT(arg0));
- }
-
- public static Localizable localizableSTATEFUL_COOKIE_HEADER_REQUIRED(Object arg0) {
- return messageFactory.getMessage("stateful.cookie.header.required", arg0);
- }
-
- /**
- * This is a stateful web service and {0} header is required.
- *
- */
- public static String STATEFUL_COOKIE_HEADER_REQUIRED(Object arg0) {
- return localizer.localize(localizableSTATEFUL_COOKIE_HEADER_REQUIRED(arg0));
- }
-
- public static Localizable localizableNULL_IMPLEMENTOR() {
- return messageFactory.getMessage("null.implementor");
- }
-
- /**
- * Implementor cannot be null
- *
- */
- public static String NULL_IMPLEMENTOR() {
- return localizer.localize(localizableNULL_IMPLEMENTOR());
- }
-
- public static Localizable localizableRUNTIME_PARSER_WSDL(Object arg0) {
- return messageFactory.getMessage("runtime.parser.wsdl", arg0);
- }
-
- /**
- * exception during WSDL parsing: {0}
- *
- */
- public static String RUNTIME_PARSER_WSDL(Object arg0) {
- return localizer.localize(localizableRUNTIME_PARSER_WSDL(arg0));
- }
-
- public static Localizable localizableSOAPENCODER_ERR() {
- return messageFactory.getMessage("soapencoder.err");
- }
-
- /**
- * Error in encoding SOAP Message
- *
- */
- public static String SOAPENCODER_ERR() {
- return localizer.localize(localizableSOAPENCODER_ERR());
- }
-
- public static Localizable localizableWSDL_REQUIRED() {
- return messageFactory.getMessage("wsdl.required");
- }
-
- /**
- * wsdl is required
- *
- */
- public static String WSDL_REQUIRED() {
- return localizer.localize(localizableWSDL_REQUIRED());
- }
-
- public static Localizable localizableRUNTIME_PARSER_WSDL_NOSERVICE_IN_WSDLMODEL(Object arg0) {
- return messageFactory.getMessage("runtime.parser.wsdl.noservice.in.wsdlmodel", arg0);
- }
-
- /**
- * There is an error in processing the WSDL {0} and no valid services are found.
- *
- */
- public static String RUNTIME_PARSER_WSDL_NOSERVICE_IN_WSDLMODEL(Object arg0) {
- return localizer.localize(localizableRUNTIME_PARSER_WSDL_NOSERVICE_IN_WSDLMODEL(arg0));
- }
-
- public static Localizable localizablePORT_NAME_REQUIRED() {
- return messageFactory.getMessage("port.name.required");
- }
-
- /**
- * Port QName is not found
- *
- */
- public static String PORT_NAME_REQUIRED() {
- return localizer.localize(localizablePORT_NAME_REQUIRED());
- }
-
- public static Localizable localizableWRONG_TNS_FOR_PORT(Object arg0) {
- return messageFactory.getMessage("wrong.tns.for.port", arg0);
- }
-
- /**
- * Port namespace {0} doesn't match Service namespace {1}
- *
- */
- public static String WRONG_TNS_FOR_PORT(Object arg0) {
- return localizer.localize(localizableWRONG_TNS_FOR_PORT(arg0));
- }
-
- public static Localizable localizableRUNTIME_PARSER_WSDL_MULTIPLEBINDING(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("runtime.parser.wsdl.multiplebinding", arg0, arg1, arg2);
- }
-
- /**
- * multiple bindings found for binding ID {0} for service {1} in WSDL {2}
- *
- */
- public static String RUNTIME_PARSER_WSDL_MULTIPLEBINDING(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableRUNTIME_PARSER_WSDL_MULTIPLEBINDING(arg0, arg1, arg2));
- }
-
- public static Localizable localizableNOT_KNOW_HTTP_CONTEXT_TYPE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("not.know.HttpContext.type", arg0, arg1, arg2);
- }
-
- /**
- * Doesn''t support Endpoint.publish({0}). Known context types are {1}, and {2}
- *
- */
- public static String NOT_KNOW_HTTP_CONTEXT_TYPE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableNOT_KNOW_HTTP_CONTEXT_TYPE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableNON_UNIQUE_DISPATCH_QNAME(Object arg0, Object arg1) {
- return messageFactory.getMessage("non.unique.dispatch.qname", arg0, arg1);
- }
-
- /**
- * Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signature on the wire for successful dispatch. Methods {0} have the same request body block {1}. Method dispatching may fail, runtime will try to dispatch using SOAPAction. Another option is to enable AddressingFeature to enabled runtime to uniquely identify WSDL operation using wsa:Action header.
- *
- */
- public static String NON_UNIQUE_DISPATCH_QNAME(Object arg0, Object arg1) {
- return localizer.localize(localizableNON_UNIQUE_DISPATCH_QNAME(arg0, arg1));
- }
-
- public static Localizable localizableALREADY_HTTP_SERVER(Object arg0) {
- return messageFactory.getMessage("already.http.server", arg0);
- }
-
- /**
- * There is already a HTTP server at : {0}# {0} - probably URL/port of a server
- *
- */
- public static String ALREADY_HTTP_SERVER(Object arg0) {
- return localizer.localize(localizableALREADY_HTTP_SERVER(arg0));
- }
-
- public static Localizable localizableCAN_NOT_GENERATE_WSDL(Object arg0) {
- return messageFactory.getMessage("can.not.generate.wsdl", arg0);
- }
-
- /**
- * Cannot generate WSDL for binding "{0}"
- *
- */
- public static String CAN_NOT_GENERATE_WSDL(Object arg0) {
- return localizer.localize(localizableCAN_NOT_GENERATE_WSDL(arg0));
- }
-
- public static Localizable localizableRUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) {
- return messageFactory.getMessage("runtime.parser.invalid.attribute.value", arg0, arg1);
- }
-
- /**
- * invalid attribute value "{1}" in runtime descriptor (line {0})
- *
- */
- public static String RUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(Object arg0, Object arg1) {
- return localizer.localize(localizableRUNTIME_PARSER_INVALID_ATTRIBUTE_VALUE(arg0, arg1));
- }
-
- public static Localizable localizableRUNTIME_PARSER_WRONG_ELEMENT(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("runtime.parser.wrong.element", arg0, arg1, arg2);
- }
-
- /**
- * found element "{1}", expected "{2}" in runtime descriptor (line {0})
- *
- */
- public static String RUNTIME_PARSER_WRONG_ELEMENT(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableRUNTIME_PARSER_WRONG_ELEMENT(arg0, arg1, arg2));
- }
-
- public static Localizable localizableRUNTIMEMODELER_INVALIDANNOTATION_ON_IMPL(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("runtimemodeler.invalidannotationOnImpl", arg0, arg1, arg2);
- }
-
- /**
- * Invalid annotation: {0} on endpoint implementation class "{1}" - will be ignored. "{1}" is annotated with @WebService(endpointInterface="{2}"}, it must not be annotated with {0}, to fix it - put this annotation on the SEI {2}.
- *
- */
- public static String RUNTIMEMODELER_INVALIDANNOTATION_ON_IMPL(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableRUNTIMEMODELER_INVALIDANNOTATION_ON_IMPL(arg0, arg1, arg2));
- }
-
- public static Localizable localizableSERVICE_NAME_REQUIRED() {
- return messageFactory.getMessage("service.name.required");
- }
-
- /**
- * Service QName is not found
- *
- */
- public static String SERVICE_NAME_REQUIRED() {
- return localizer.localize(localizableSERVICE_NAME_REQUIRED());
- }
-
- public static Localizable localizablePROVIDER_NOT_PARAMETERIZED(Object arg0) {
- return messageFactory.getMessage("provider.not.parameterized", arg0);
- }
-
- /**
- * "{0}" implements Provider but doesn't specify the type parameter
- *
- */
- public static String PROVIDER_NOT_PARAMETERIZED(Object arg0) {
- return localizer.localize(localizablePROVIDER_NOT_PARAMETERIZED(arg0));
- }
-
- public static Localizable localizableRUNTIME_WSDL_PATCHER() {
- return messageFactory.getMessage("runtime.wsdl.patcher");
- }
-
- /**
- * error while patching WSDL related document
- *
- */
- public static String RUNTIME_WSDL_PATCHER() {
- return localizer.localize(localizableRUNTIME_WSDL_PATCHER());
- }
-
- public static Localizable localizableRUNTIME_SAXPARSER_EXCEPTION(Object arg0, Object arg1) {
- return messageFactory.getMessage("runtime.saxparser.exception", arg0, arg1);
- }
-
- /**
- * {0}
- * {1}
- *
- */
- public static String RUNTIME_SAXPARSER_EXCEPTION(Object arg0, Object arg1) {
- return localizer.localize(localizableRUNTIME_SAXPARSER_EXCEPTION(arg0, arg1));
- }
-
- public static Localizable localizableWRONG_PARAMETER_TYPE(Object arg0) {
- return messageFactory.getMessage("wrong.parameter.type", arg0);
- }
-
- /**
- * Incorrect argument types for method "{0}"
- *
- */
- public static String WRONG_PARAMETER_TYPE(Object arg0) {
- return localizer.localize(localizableWRONG_PARAMETER_TYPE(arg0));
- }
-
- public static Localizable localizableRUNTIME_PARSER_WSDL_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("runtime.parser.wsdl.not.found", arg0);
- }
-
- /**
- * {0} is not found in the WAR file. Package it in the WAR file or correct it in sun-jaxws.xml.
- *
- */
- public static String RUNTIME_PARSER_WSDL_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableRUNTIME_PARSER_WSDL_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableRUNTIME_PARSER_CLASS_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("runtime.parser.classNotFound", arg0);
- }
-
- /**
- * class not found in runtime descriptor: {0}
- *
- */
- public static String RUNTIME_PARSER_CLASS_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableRUNTIME_PARSER_CLASS_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableUNSUPPORTED_CHARSET(Object arg0) {
- return messageFactory.getMessage("unsupported.charset", arg0);
- }
-
- /**
- * Unsupported charset "{0}" in the received message''s Content-Type
- *
- */
- public static String UNSUPPORTED_CHARSET(Object arg0) {
- return localizer.localize(localizableUNSUPPORTED_CHARSET(arg0));
- }
-
- public static Localizable localizableSTATIC_RESOURCE_INJECTION_ONLY(Object arg0, Object arg1) {
- return messageFactory.getMessage("static.resource.injection.only", arg0, arg1);
- }
-
- /**
- * Static resource {0} cannot be injected to non-static "{1}"
- *
- */
- public static String STATIC_RESOURCE_INJECTION_ONLY(Object arg0, Object arg1) {
- return localizer.localize(localizableSTATIC_RESOURCE_INJECTION_ONLY(arg0, arg1));
- }
-
- public static Localizable localizableNOT_ZERO_PARAMETERS(Object arg0) {
- return messageFactory.getMessage("not.zero.parameters", arg0);
- }
-
- /**
- * Method "{0}" shouldn''t have any arguments
- *
- */
- public static String NOT_ZERO_PARAMETERS(Object arg0) {
- return localizer.localize(localizableNOT_ZERO_PARAMETERS(arg0));
- }
-
- public static Localizable localizableDUPLICATE_PRIMARY_WSDL(Object arg0) {
- return messageFactory.getMessage("duplicate.primary.wsdl", arg0);
- }
-
- /**
- * Metadata has more than one WSDL that has Service definition for the endpoint. WSDL={0} is one such WSDL.
- *
- */
- public static String DUPLICATE_PRIMARY_WSDL(Object arg0) {
- return localizer.localize(localizableDUPLICATE_PRIMARY_WSDL(arg0));
- }
-
- public static Localizable localizableDUPLICATE_ABSTRACT_WSDL(Object arg0) {
- return messageFactory.getMessage("duplicate.abstract.wsdl", arg0);
- }
-
- /**
- * Metadata has more than one WSDL that has PortType definition for the endpoint. WSDL={0} is one such WSDL.
- *
- */
- public static String DUPLICATE_ABSTRACT_WSDL(Object arg0) {
- return localizer.localize(localizableDUPLICATE_ABSTRACT_WSDL(arg0));
- }
-
- public static Localizable localizableSTATEFUL_INVALID_WEBSERVICE_CONTEXT(Object arg0) {
- return messageFactory.getMessage("stateful.invalid.webservice.context", arg0);
- }
-
- /**
- * Not a WebServiceContext from JAX-WS RI: {0}
- *
- */
- public static String STATEFUL_INVALID_WEBSERVICE_CONTEXT(Object arg0) {
- return localizer.localize(localizableSTATEFUL_INVALID_WEBSERVICE_CONTEXT(arg0));
- }
-
- public static Localizable localizableRUNTIME_PARSER_INVALID_ELEMENT(Object arg0, Object arg1) {
- return messageFactory.getMessage("runtime.parser.invalidElement", arg0, arg1);
- }
-
- /**
- * invalid element "{1}" in runtime descriptor (line {0})
- *
- */
- public static String RUNTIME_PARSER_INVALID_ELEMENT(Object arg0, Object arg1) {
- return localizer.localize(localizableRUNTIME_PARSER_INVALID_ELEMENT(arg0, arg1));
- }
-
- public static Localizable localizableRUNTIME_PARSER_MISSING_ATTRIBUTE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("runtime.parser.missing.attribute", arg0, arg1, arg2);
- }
-
- /**
- * missing attribute "{2}" in element "{1}" of runtime descriptor (line {0})
- *
- */
- public static String RUNTIME_PARSER_MISSING_ATTRIBUTE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableRUNTIME_PARSER_MISSING_ATTRIBUTE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWRONG_FIELD_TYPE(Object arg0) {
- return messageFactory.getMessage("wrong.field.type", arg0);
- }
-
- /**
- * Incorrect type for field "{0}"
- *
- */
- public static String WRONG_FIELD_TYPE(Object arg0) {
- return localizer.localize(localizableWRONG_FIELD_TYPE(arg0));
- }
-
- public static Localizable localizableDUPLICATE_PORT_KNOWN_HEADER(Object arg0) {
- return messageFactory.getMessage("duplicate.portKnownHeader", arg0);
- }
-
- /**
- * Received SOAP message contains duplicate header: {0} for a bound parameter
- *
- */
- public static String DUPLICATE_PORT_KNOWN_HEADER(Object arg0) {
- return localizer.localize(localizableDUPLICATE_PORT_KNOWN_HEADER(arg0));
- }
-
- public static Localizable localizableUNSUPPORTED_CONTENT_TYPE(Object arg0, Object arg1) {
- return messageFactory.getMessage("unsupported.contentType", arg0, arg1);
- }
-
- /**
- * Unsupported Content-Type: {0} Supported ones are: {1}
- *
- */
- public static String UNSUPPORTED_CONTENT_TYPE(Object arg0, Object arg1) {
- return localizer.localize(localizableUNSUPPORTED_CONTENT_TYPE(arg0, arg1));
- }
-
- public static Localizable localizableFAILED_TO_INSTANTIATE_INSTANCE_RESOLVER(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("failed.to.instantiate.instanceResolver", arg0, arg1, arg2);
- }
-
- /**
- * Unable to instantiate {0} (which is specified in {1} on {2})
- *
- */
- public static String FAILED_TO_INSTANTIATE_INSTANCE_RESOLVER(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableFAILED_TO_INSTANTIATE_INSTANCE_RESOLVER(arg0, arg1, arg2));
- }
-
- public static Localizable localizableDD_MTOM_CONFLICT(Object arg0, Object arg1) {
- return messageFactory.getMessage("dd.mtom.conflict", arg0, arg1);
- }
-
- /**
- * Error in Deployment Descriptor : MTOM Configuration in binding {0} conflicts with enable-mtom attribute value {1}
- *
- */
- public static String DD_MTOM_CONFLICT(Object arg0, Object arg1) {
- return localizer.localize(localizableDD_MTOM_CONFLICT(arg0, arg1));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SoapMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SoapMessages.java
deleted file mode 100644
index 214e5ae0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SoapMessages.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class SoapMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.soap");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableSOAP_FAULT_CREATE_ERR(Object arg0) {
- return messageFactory.getMessage("soap.fault.create.err", arg0);
- }
-
- /**
- * Couldn''t create SOAP Fault due to exception: {0}
- *
- */
- public static String SOAP_FAULT_CREATE_ERR(Object arg0) {
- return localizer.localize(localizableSOAP_FAULT_CREATE_ERR(arg0));
- }
-
- public static Localizable localizableSOAP_MSG_FACTORY_CREATE_ERR(Object arg0) {
- return messageFactory.getMessage("soap.msg.factory.create.err", arg0);
- }
-
- /**
- * Couldn''t create SOAP message factory due to exception: {0}
- *
- */
- public static String SOAP_MSG_FACTORY_CREATE_ERR(Object arg0) {
- return localizer.localize(localizableSOAP_MSG_FACTORY_CREATE_ERR(arg0));
- }
-
- public static Localizable localizableSOAP_MSG_CREATE_ERR(Object arg0) {
- return messageFactory.getMessage("soap.msg.create.err", arg0);
- }
-
- /**
- * Couldn''t create SOAP message due to exception: {0}
- *
- */
- public static String SOAP_MSG_CREATE_ERR(Object arg0) {
- return localizer.localize(localizableSOAP_MSG_CREATE_ERR(arg0));
- }
-
- public static Localizable localizableSOAP_FACTORY_CREATE_ERR(Object arg0) {
- return messageFactory.getMessage("soap.factory.create.err", arg0);
- }
-
- /**
- * Couldn''t create SOAP factory due to exception: {0}
- *
- */
- public static String SOAP_FACTORY_CREATE_ERR(Object arg0) {
- return localizer.localize(localizableSOAP_FACTORY_CREATE_ERR(arg0));
- }
-
- public static Localizable localizableSOAP_PROTOCOL_INVALID_FAULT_CODE(Object arg0) {
- return messageFactory.getMessage("soap.protocol.invalidFaultCode", arg0);
- }
-
- /**
- * Invalid fault code: {0}
- *
- */
- public static String SOAP_PROTOCOL_INVALID_FAULT_CODE(Object arg0) {
- return localizer.localize(localizableSOAP_PROTOCOL_INVALID_FAULT_CODE(arg0));
- }
-
- public static Localizable localizableSOAP_VERSION_MISMATCH_ERR(Object arg0, Object arg1) {
- return messageFactory.getMessage("soap.version.mismatch.err", arg0, arg1);
- }
-
- /**
- * Couldn''t create SOAP message. Expecting Envelope in namespace {0}, but got {1}
- *
- */
- public static String SOAP_VERSION_MISMATCH_ERR(Object arg0, Object arg1) {
- return localizer.localize(localizableSOAP_VERSION_MISMATCH_ERR(arg0, arg1));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/StreamingMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/StreamingMessages.java
deleted file mode 100644
index f139643a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/StreamingMessages.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class StreamingMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.streaming");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableFASTINFOSET_DECODING_NOT_ACCEPTED() {
- return messageFactory.getMessage("fastinfoset.decodingNotAccepted");
- }
-
- /**
- * Fast Infoset decoding is not accepted
- *
- */
- public static String FASTINFOSET_DECODING_NOT_ACCEPTED() {
- return localizer.localize(localizableFASTINFOSET_DECODING_NOT_ACCEPTED());
- }
-
- public static Localizable localizableSTAX_CANT_CREATE() {
- return messageFactory.getMessage("stax.cantCreate");
- }
-
- /**
- * Unable to create StAX reader or writer
- *
- */
- public static String STAX_CANT_CREATE() {
- return localizer.localize(localizableSTAX_CANT_CREATE());
- }
-
- public static Localizable localizableSTREAMING_IO_EXCEPTION(Object arg0) {
- return messageFactory.getMessage("streaming.ioException", arg0);
- }
-
- /**
- * XML parsing error: {0}
- *
- */
- public static String STREAMING_IO_EXCEPTION(Object arg0) {
- return localizer.localize(localizableSTREAMING_IO_EXCEPTION(arg0));
- }
-
- public static Localizable localizableSOURCEREADER_INVALID_SOURCE(Object arg0) {
- return messageFactory.getMessage("sourcereader.invalidSource", arg0);
- }
-
- /**
- * Unable to create reader from source "{0}"
- *
- */
- public static String SOURCEREADER_INVALID_SOURCE(Object arg0) {
- return localizer.localize(localizableSOURCEREADER_INVALID_SOURCE(arg0));
- }
-
- public static Localizable localizableXMLREADER_UNEXPECTED_STATE(Object arg0, Object arg1) {
- return messageFactory.getMessage("xmlreader.unexpectedState", arg0, arg1);
- }
-
- /**
- * unexpected XML reader state. expected: {0} but found: {1}
- *
- */
- public static String XMLREADER_UNEXPECTED_STATE(Object arg0, Object arg1) {
- return localizer.localize(localizableXMLREADER_UNEXPECTED_STATE(arg0, arg1));
- }
-
- public static Localizable localizableWOODSTOX_CANT_LOAD(Object arg0) {
- return messageFactory.getMessage("woodstox.cant.load", arg0);
- }
-
- /**
- * Unable to load Woodstox class {0}
- *
- */
- public static String WOODSTOX_CANT_LOAD(Object arg0) {
- return localizer.localize(localizableWOODSTOX_CANT_LOAD(arg0));
- }
-
- public static Localizable localizableXMLREADER_IO_EXCEPTION(Object arg0) {
- return messageFactory.getMessage("xmlreader.ioException", arg0);
- }
-
- /**
- * XML reader error: {0}
- *
- */
- public static String XMLREADER_IO_EXCEPTION(Object arg0) {
- return localizer.localize(localizableXMLREADER_IO_EXCEPTION(arg0));
- }
-
- public static Localizable localizableFASTINFOSET_NO_IMPLEMENTATION() {
- return messageFactory.getMessage("fastinfoset.noImplementation");
- }
-
- /**
- * Unable to locate compatible implementation of Fast Infoset in classpath
- *
- */
- public static String FASTINFOSET_NO_IMPLEMENTATION() {
- return localizer.localize(localizableFASTINFOSET_NO_IMPLEMENTATION());
- }
-
- public static Localizable localizableINVALID_PROPERTY_VALUE_INTEGER(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("invalid.property.value.integer", arg0, arg1, arg2);
- }
-
- /**
- * Ignoring system property "{0}" as value "{1}" is invalid, property value must be a valid integer. Using default value "{2}".
- *
- */
- public static String INVALID_PROPERTY_VALUE_INTEGER(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableINVALID_PROPERTY_VALUE_INTEGER(arg0, arg1, arg2));
- }
-
- public static Localizable localizableXMLWRITER_IO_EXCEPTION(Object arg0) {
- return messageFactory.getMessage("xmlwriter.ioException", arg0);
- }
-
- /**
- * XML writer error: {0}
- *
- */
- public static String XMLWRITER_IO_EXCEPTION(Object arg0) {
- return localizer.localize(localizableXMLWRITER_IO_EXCEPTION(arg0));
- }
-
- public static Localizable localizableXMLREADER_UNEXPECTED_CHARACTER_CONTENT(Object arg0) {
- return messageFactory.getMessage("xmlreader.unexpectedCharacterContent", arg0);
- }
-
- /**
- * XML reader error: unexpected character content: "{0}"
- *
- */
- public static String XMLREADER_UNEXPECTED_CHARACTER_CONTENT(Object arg0) {
- return localizer.localize(localizableXMLREADER_UNEXPECTED_CHARACTER_CONTENT(arg0));
- }
-
- public static Localizable localizableSTREAMING_PARSE_EXCEPTION(Object arg0) {
- return messageFactory.getMessage("streaming.parseException", arg0);
- }
-
- /**
- * XML parsing error: {0}
- *
- */
- public static String STREAMING_PARSE_EXCEPTION(Object arg0) {
- return localizer.localize(localizableSTREAMING_PARSE_EXCEPTION(arg0));
- }
-
- public static Localizable localizableXMLWRITER_NO_PREFIX_FOR_URI(Object arg0) {
- return messageFactory.getMessage("xmlwriter.noPrefixForURI", arg0);
- }
-
- /**
- * XML writer error: no prefix for URI: "{0}"
- *
- */
- public static String XMLWRITER_NO_PREFIX_FOR_URI(Object arg0) {
- return localizer.localize(localizableXMLWRITER_NO_PREFIX_FOR_URI(arg0));
- }
-
- public static Localizable localizableXMLREADER_NESTED_ERROR(Object arg0) {
- return messageFactory.getMessage("xmlreader.nestedError", arg0);
- }
-
- /**
- * XML reader error: {0}
- *
- */
- public static String XMLREADER_NESTED_ERROR(Object arg0) {
- return localizer.localize(localizableXMLREADER_NESTED_ERROR(arg0));
- }
-
- public static Localizable localizableINVALID_PROPERTY_VALUE_LONG(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("invalid.property.value.long", arg0, arg1, arg2);
- }
-
- /**
- * Ignoring system property "{0}" as value "{1}" is invalid, property value must be a valid long. Using default value "{2}".
- *
- */
- public static String INVALID_PROPERTY_VALUE_LONG(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableINVALID_PROPERTY_VALUE_LONG(arg0, arg1, arg2));
- }
-
- public static Localizable localizableSTAXREADER_XMLSTREAMEXCEPTION(Object arg0) {
- return messageFactory.getMessage("staxreader.xmlstreamexception", arg0);
- }
-
- /**
- * XML stream reader exception: {0}
- *
- */
- public static String STAXREADER_XMLSTREAMEXCEPTION(Object arg0) {
- return localizer.localize(localizableSTAXREADER_XMLSTREAMEXCEPTION(arg0));
- }
-
- public static Localizable localizableXMLWRITER_NESTED_ERROR(Object arg0) {
- return messageFactory.getMessage("xmlwriter.nestedError", arg0);
- }
-
- /**
- * XML writer error: {0}
- *
- */
- public static String XMLWRITER_NESTED_ERROR(Object arg0) {
- return localizer.localize(localizableXMLWRITER_NESTED_ERROR(arg0));
- }
-
- public static Localizable localizableXMLREADER_ILLEGAL_STATE_ENCOUNTERED(Object arg0) {
- return messageFactory.getMessage("xmlreader.illegalStateEncountered", arg0);
- }
-
- /**
- * XML reader internal error: illegal state ({0})
- *
- */
- public static String XMLREADER_ILLEGAL_STATE_ENCOUNTERED(Object arg0) {
- return localizer.localize(localizableXMLREADER_ILLEGAL_STATE_ENCOUNTERED(arg0));
- }
-
- public static Localizable localizableXMLREADER_UNEXPECTED_STATE_TAG(Object arg0, Object arg1) {
- return messageFactory.getMessage("xmlreader.unexpectedState.tag", arg0, arg1);
- }
-
- /**
- * unexpected XML tag. expected: {0} but found: {1}
- *
- */
- public static String XMLREADER_UNEXPECTED_STATE_TAG(Object arg0, Object arg1) {
- return localizer.localize(localizableXMLREADER_UNEXPECTED_STATE_TAG(arg0, arg1));
- }
-
- public static Localizable localizableXMLREADER_UNEXPECTED_STATE_MESSAGE(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("xmlreader.unexpectedState.message", arg0, arg1, arg2);
- }
-
- /**
- * unexpected XML reader state. expected: {0} but found: {1}. {2}
- *
- */
- public static String XMLREADER_UNEXPECTED_STATE_MESSAGE(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableXMLREADER_UNEXPECTED_STATE_MESSAGE(arg0, arg1, arg2));
- }
-
- public static Localizable localizableXMLREADER_PARSE_EXCEPTION(Object arg0) {
- return messageFactory.getMessage("xmlreader.parseException", arg0);
- }
-
- /**
- * XML parsing error: {0}
- *
- */
- public static String XMLREADER_PARSE_EXCEPTION(Object arg0) {
- return localizer.localize(localizableXMLREADER_PARSE_EXCEPTION(arg0));
- }
-
- public static Localizable localizableXMLRECORDER_RECORDING_ENDED() {
- return messageFactory.getMessage("xmlrecorder.recording.ended");
- }
-
- /**
- * no more recorded elements available
- *
- */
- public static String XMLRECORDER_RECORDING_ENDED() {
- return localizer.localize(localizableXMLRECORDER_RECORDING_ENDED());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java
deleted file mode 100644
index e86c57e9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class TubelineassemblyMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.tubelineassembly");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableMASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(Object arg0, Object arg1) {
- return messageFactory.getMessage("MASM0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE", arg0, arg1);
- }
-
- /**
- * MASM0019: Illegal logging level value "{1}" stored in the {0} message logging system property. Using default logging level.
- *
- */
- public static String MASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(Object arg0, Object arg1) {
- return localizer.localize(localizableMASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(arg0, arg1));
- }
-
- public static Localizable localizableMASM_0009_CANNOT_FORM_VALID_URL(Object arg0) {
- return messageFactory.getMessage("MASM0009_CANNOT_FORM_VALID_URL", arg0);
- }
-
- /**
- * MASM0009: Cannot form a valid URL from the resource name "{0}". For more details see the nested exception.
- *
- */
- public static String MASM_0009_CANNOT_FORM_VALID_URL(Object arg0) {
- return localizer.localize(localizableMASM_0009_CANNOT_FORM_VALID_URL(arg0));
- }
-
- public static Localizable localizableMASM_0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE(Object arg0) {
- return messageFactory.getMessage("MASM0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE", arg0);
- }
-
- /**
- * MASM0005: No default tubeline is defined in the default [ {0} ] configuration file
- *
- */
- public static String MASM_0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE(Object arg0) {
- return localizer.localize(localizableMASM_0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE(arg0));
- }
-
- public static Localizable localizableMASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(Object arg0) {
- return messageFactory.getMessage("MASM0003_DEFAULT_CFG_FILE_NOT_LOADED", arg0);
- }
-
- /**
- * MASM0003: Default [ {0} ] configuration file was not loaded
- *
- */
- public static String MASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(Object arg0) {
- return localizer.localize(localizableMASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(arg0));
- }
-
- public static Localizable localizableMASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(Object arg0, Object arg1) {
- return messageFactory.getMessage("MASM0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE", arg0, arg1);
- }
-
- /**
- * MASM0018: Message logging {0} system property detected to be set to value {1}
- *
- */
- public static String MASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(Object arg0, Object arg1) {
- return localizer.localize(localizableMASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(arg0, arg1));
- }
-
- public static Localizable localizableMASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("MASM0001_DEFAULT_CFG_FILE_NOT_FOUND", arg0);
- }
-
- /**
- * MASM0001: Default configuration file [ {0} ] was not found
- *
- */
- public static String MASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableMASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableMASM_0020_ERROR_CREATING_URI_FROM_GENERATED_STRING(Object arg0) {
- return messageFactory.getMessage("MASM0020_ERROR_CREATING_URI_FROM_GENERATED_STRING", arg0);
- }
-
- /**
- * MASM0020: Unable to create a new URI instance for generated endpoint URI string [ {0} ]
- *
- */
- public static String MASM_0020_ERROR_CREATING_URI_FROM_GENERATED_STRING(Object arg0) {
- return localizer.localize(localizableMASM_0020_ERROR_CREATING_URI_FROM_GENERATED_STRING(arg0));
- }
-
- public static Localizable localizableMASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(Object arg0) {
- return messageFactory.getMessage("MASM0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY", arg0);
- }
-
- /**
- * MASM0016: Unable to instantiate Tube factory class [ {0} ]
- *
- */
- public static String MASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(Object arg0) {
- return localizer.localize(localizableMASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(arg0));
- }
-
- public static Localizable localizableMASM_0012_LOADING_VIA_SERVLET_CONTEXT(Object arg0, Object arg1) {
- return messageFactory.getMessage("MASM0012_LOADING_VIA_SERVLET_CONTEXT", arg0, arg1);
- }
-
- /**
- * MASM0012: Trying to load [ {0} ] via servlet context [ {1} ]
- *
- */
- public static String MASM_0012_LOADING_VIA_SERVLET_CONTEXT(Object arg0, Object arg1) {
- return localizer.localize(localizableMASM_0012_LOADING_VIA_SERVLET_CONTEXT(arg0, arg1));
- }
-
- public static Localizable localizableMASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(Object arg0) {
- return messageFactory.getMessage("MASM0010_ERROR_READING_CFG_FILE_FROM_LOCATION", arg0);
- }
-
- /**
- * MASM0010: Unable to unmarshall metro config file from location [ {0} ]
- *
- */
- public static String MASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(Object arg0) {
- return localizer.localize(localizableMASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(arg0));
- }
-
- public static Localizable localizableMASM_0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE(Object arg0) {
- return messageFactory.getMessage("MASM0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE", arg0);
- }
-
- /**
- * MASM0004: No <tubelines> section found in the default [ {0} ] configuration file
- *
- */
- public static String MASM_0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE(Object arg0) {
- return localizer.localize(localizableMASM_0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE(arg0));
- }
-
- public static Localizable localizableMASM_0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD(Object arg0) {
- return messageFactory.getMessage("MASM0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD", arg0);
- }
-
- /**
- * MASM0013: Unable to invoke {0} method on servlet context instance
- *
- */
- public static String MASM_0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD(Object arg0) {
- return localizer.localize(localizableMASM_0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD(arg0));
- }
-
- public static Localizable localizableMASM_0007_APP_CFG_FILE_NOT_FOUND() {
- return messageFactory.getMessage("MASM0007_APP_CFG_FILE_NOT_FOUND");
- }
-
- /**
- * MASM0007: No application metro.xml configuration file found.
- *
- */
- public static String MASM_0007_APP_CFG_FILE_NOT_FOUND() {
- return localizer.localize(localizableMASM_0007_APP_CFG_FILE_NOT_FOUND());
- }
-
- public static Localizable localizableMASM_0002_DEFAULT_CFG_FILE_LOCATED(Object arg0, Object arg1) {
- return messageFactory.getMessage("MASM0002_DEFAULT_CFG_FILE_LOCATED", arg0, arg1);
- }
-
- /**
- * MASM0002: Default [ {0} ] configuration file located at [ {1} ]
- *
- */
- public static String MASM_0002_DEFAULT_CFG_FILE_LOCATED(Object arg0, Object arg1) {
- return localizer.localize(localizableMASM_0002_DEFAULT_CFG_FILE_LOCATED(arg0, arg1));
- }
-
- public static Localizable localizableMASM_0014_UNABLE_TO_LOAD_CLASS(Object arg0) {
- return messageFactory.getMessage("MASM0014_UNABLE_TO_LOAD_CLASS", arg0);
- }
-
- /**
- * MASM0014: Unable to load [ {0} ] class
- *
- */
- public static String MASM_0014_UNABLE_TO_LOAD_CLASS(Object arg0) {
- return localizer.localize(localizableMASM_0014_UNABLE_TO_LOAD_CLASS(arg0));
- }
-
- public static Localizable localizableMASM_0006_APP_CFG_FILE_LOCATED(Object arg0) {
- return messageFactory.getMessage("MASM0006_APP_CFG_FILE_LOCATED", arg0);
- }
-
- /**
- * MASM0006: Application metro.xml configuration file located at [ {0} ]
- *
- */
- public static String MASM_0006_APP_CFG_FILE_LOCATED(Object arg0) {
- return localizer.localize(localizableMASM_0006_APP_CFG_FILE_LOCATED(arg0));
- }
-
- public static Localizable localizableMASM_0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS(Object arg0) {
- return messageFactory.getMessage("MASM0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS", arg0);
- }
-
- /**
- * MASM0017: Unable to load Tube factory class [ {0} ]
- *
- */
- public static String MASM_0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS(Object arg0) {
- return localizer.localize(localizableMASM_0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS(arg0));
- }
-
- public static Localizable localizableMASM_0008_INVALID_URI_REFERENCE(Object arg0) {
- return messageFactory.getMessage("MASM0008_INVALID_URI_REFERENCE", arg0);
- }
-
- /**
- * MASM0008: Invalid URI reference [ {0} ]
- *
- */
- public static String MASM_0008_INVALID_URI_REFERENCE(Object arg0) {
- return localizer.localize(localizableMASM_0008_INVALID_URI_REFERENCE(arg0));
- }
-
- public static Localizable localizableMASM_0011_LOADING_RESOURCE(Object arg0, Object arg1) {
- return messageFactory.getMessage("MASM0011_LOADING_RESOURCE", arg0, arg1);
- }
-
- /**
- * MASM0011: Trying to load [ {0} ] via parent resouce loader [ {1} ]
- *
- */
- public static String MASM_0011_LOADING_RESOURCE(Object arg0, Object arg1) {
- return localizer.localize(localizableMASM_0011_LOADING_RESOURCE(arg0, arg1));
- }
-
- public static Localizable localizableMASM_0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE(Object arg0, Object arg1) {
- return messageFactory.getMessage("MASM0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE", arg0, arg1);
- }
-
- /**
- * MASM0015: Class [ {0} ] does not implement [ {1} ] interface
- *
- */
- public static String MASM_0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE(Object arg0, Object arg1) {
- return localizer.localize(localizableMASM_0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE(arg0, arg1));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/UtilMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/UtilMessages.java
deleted file mode 100644
index c5373ccc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/UtilMessages.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class UtilMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.util");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableUTIL_LOCATION(Object arg0, Object arg1) {
- return messageFactory.getMessage("util.location", arg0, arg1);
- }
-
- /**
- * at line {0} of {1}
- *
- */
- public static String UTIL_LOCATION(Object arg0, Object arg1) {
- return localizer.localize(localizableUTIL_LOCATION(arg0, arg1));
- }
-
- public static Localizable localizableUTIL_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
- return messageFactory.getMessage("util.failed.to.parse.handlerchain.file", arg0, arg1);
- }
-
- /**
- * Could not parse handler chain file {1} for class {0}
- *
- */
- public static String UTIL_FAILED_TO_PARSE_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
- return localizer.localize(localizableUTIL_FAILED_TO_PARSE_HANDLERCHAIN_FILE(arg0, arg1));
- }
-
- public static Localizable localizableUTIL_PARSER_WRONG_ELEMENT(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("util.parser.wrong.element", arg0, arg1, arg2);
- }
-
- /**
- * found element "{1}", expected "{2}" in handler chain configuration (line {0})
- *
- */
- public static String UTIL_PARSER_WRONG_ELEMENT(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableUTIL_PARSER_WRONG_ELEMENT(arg0, arg1, arg2));
- }
-
- public static Localizable localizableUTIL_HANDLER_CLASS_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("util.handler.class.not.found", arg0);
- }
-
- /**
- * "Class: {0} could not be found"
- *
- */
- public static String UTIL_HANDLER_CLASS_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableUTIL_HANDLER_CLASS_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableUTIL_HANDLER_ENDPOINT_INTERFACE_NO_WEBSERVICE(Object arg0) {
- return messageFactory.getMessage("util.handler.endpoint.interface.no.webservice", arg0);
- }
-
- /**
- * "The Endpoint Interface: {0} does not have WebService Annotation"
- *
- */
- public static String UTIL_HANDLER_ENDPOINT_INTERFACE_NO_WEBSERVICE(Object arg0) {
- return localizer.localize(localizableUTIL_HANDLER_ENDPOINT_INTERFACE_NO_WEBSERVICE(arg0));
- }
-
- public static Localizable localizableUTIL_HANDLER_NO_WEBSERVICE_ANNOTATION(Object arg0) {
- return messageFactory.getMessage("util.handler.no.webservice.annotation", arg0);
- }
-
- /**
- * "A WebService annotation is not present on class: {0}"
- *
- */
- public static String UTIL_HANDLER_NO_WEBSERVICE_ANNOTATION(Object arg0) {
- return localizer.localize(localizableUTIL_HANDLER_NO_WEBSERVICE_ANNOTATION(arg0));
- }
-
- public static Localizable localizableUTIL_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
- return messageFactory.getMessage("util.failed.to.find.handlerchain.file", arg0, arg1);
- }
-
- /**
- * Could not find handler chain file {1} for class {0}
- *
- */
- public static String UTIL_FAILED_TO_FIND_HANDLERCHAIN_FILE(Object arg0, Object arg1) {
- return localizer.localize(localizableUTIL_FAILED_TO_FIND_HANDLERCHAIN_FILE(arg0, arg1));
- }
-
- public static Localizable localizableUTIL_HANDLER_CANNOT_COMBINE_SOAPMESSAGEHANDLERS() {
- return messageFactory.getMessage("util.handler.cannot.combine.soapmessagehandlers");
- }
-
- /**
- * You must use HanlderChain annotation, not SOAPMessageHandlers
- *
- */
- public static String UTIL_HANDLER_CANNOT_COMBINE_SOAPMESSAGEHANDLERS() {
- return localizer.localize(localizableUTIL_HANDLER_CANNOT_COMBINE_SOAPMESSAGEHANDLERS());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java
deleted file mode 100644
index ad7d4d21..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class WsdlmodelMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.wsdlmodel");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableWSDL_PORTADDRESS_EPRADDRESS_NOT_MATCH(Object arg0, Object arg1, Object arg2) {
- return messageFactory.getMessage("wsdl.portaddress.epraddress.not.match", arg0, arg1, arg2);
- }
-
- /**
- * For Port: {0}, service location {1} does not match address {2} in the EndpointReference
- *
- */
- public static String WSDL_PORTADDRESS_EPRADDRESS_NOT_MATCH(Object arg0, Object arg1, Object arg2) {
- return localizer.localize(localizableWSDL_PORTADDRESS_EPRADDRESS_NOT_MATCH(arg0, arg1, arg2));
- }
-
- public static Localizable localizableWSDL_IMPORT_SHOULD_BE_WSDL(Object arg0) {
- return messageFactory.getMessage("wsdl.import.should.be.wsdl", arg0);
- }
-
- /**
- * Import of {0} is violation of BP 1.1 R2001. Proceeding with a warning.
- * R2001 A DESCRIPTION must only use the WSDL "import" statement to import another WSDL description.
- *
- */
- public static String WSDL_IMPORT_SHOULD_BE_WSDL(Object arg0) {
- return localizer.localize(localizableWSDL_IMPORT_SHOULD_BE_WSDL(arg0));
- }
-
- public static Localizable localizableMEX_METADATA_SYSTEMID_NULL() {
- return messageFactory.getMessage("Mex.metadata.systemid.null");
- }
-
- /**
- * MEX WSDL metadata can not be parsed, the systemId is of the MEX source is null.
- *
- */
- public static String MEX_METADATA_SYSTEMID_NULL() {
- return localizer.localize(localizableMEX_METADATA_SYSTEMID_NULL());
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsservletMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsservletMessages.java
deleted file mode 100644
index e424adf4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsservletMessages.java
+++ /dev/null
@@ -1,1868 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class WsservletMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.wsservlet");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableERROR_WSDL_PUBLISHER_CANNOT_READ_CONFIGURATION() {
- return messageFactory.getMessage("error.wsdlPublisher.cannotReadConfiguration");
- }
-
- /**
- * WSSERVLET46: cannot read configuration
- *
- */
- public static String ERROR_WSDL_PUBLISHER_CANNOT_READ_CONFIGURATION() {
- return localizer.localize(localizableERROR_WSDL_PUBLISHER_CANNOT_READ_CONFIGURATION());
- }
-
- public static Localizable localizableWSSERVLET_22_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET22.diag.check.1");
- }
-
- /**
- * Set endpoint with stub.setTargetEndpoint property
- *
- */
- public static String WSSERVLET_22_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_22_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_33_DIAG_CAUSE_2() {
- return messageFactory.getMessage("WSSERVLET33.diag.cause.2");
- }
-
- /**
- * When publishing the service wsdl, the http location is patched with the deployed location/endpoint using XSLT transformation. The transformer could not be created to do the transformation.
- *
- */
- public static String WSSERVLET_33_DIAG_CAUSE_2() {
- return localizer.localize(localizableWSSERVLET_33_DIAG_CAUSE_2());
- }
-
- public static Localizable localizableWSSERVLET_33_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET33.diag.cause.1");
- }
-
- /**
- * When publishing the service wsdl, the http location is patched with the deployed location/endpoint using XSLT transformation. The transformer could not be created to do the transformation.
- *
- */
- public static String WSSERVLET_33_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_33_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_DUPLICATE_NAME(Object arg0) {
- return messageFactory.getMessage("error.implementorRegistry.duplicateName", arg0);
- }
-
- /**
- * WSSERVLET42: duplicate port name: {0}
- *
- */
- public static String ERROR_IMPLEMENTOR_REGISTRY_DUPLICATE_NAME(Object arg0) {
- return localizer.localize(localizableERROR_IMPLEMENTOR_REGISTRY_DUPLICATE_NAME(arg0));
- }
-
- public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_FILE_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("error.implementorRegistry.fileNotFound", arg0);
- }
-
- /**
- * WSSERVLET45: file not found: {0}
- *
- */
- public static String ERROR_IMPLEMENTOR_REGISTRY_FILE_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableERROR_IMPLEMENTOR_REGISTRY_FILE_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableSERVLET_TRACE_INVOKING_IMPLEMENTOR(Object arg0) {
- return messageFactory.getMessage("servlet.trace.invokingImplementor", arg0);
- }
-
- /**
- * WSSERVLET21: invoking implementor: {0}
- *
- */
- public static String SERVLET_TRACE_INVOKING_IMPLEMENTOR(Object arg0) {
- return localizer.localize(localizableSERVLET_TRACE_INVOKING_IMPLEMENTOR(arg0));
- }
-
- public static Localizable localizableWSSERVLET_17_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET17.diag.cause.1");
- }
-
- /**
- * Two or more endpoints with the same name where found in the jaxrpc-ri.xml runtime descriptor
- *
- */
- public static String WSSERVLET_17_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_17_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableHTML_NON_ROOT_PAGE_BODY_2() {
- return messageFactory.getMessage("html.nonRootPage.body2");
- }
-
- /**
- * <p>Invalid request URI.</p><p>Please check your deployment information.</p>
- *
- */
- public static String HTML_NON_ROOT_PAGE_BODY_2() {
- return localizer.localize(localizableHTML_NON_ROOT_PAGE_BODY_2());
- }
-
- public static Localizable localizableHTML_NON_ROOT_PAGE_BODY_1() {
- return messageFactory.getMessage("html.nonRootPage.body1");
- }
-
- /**
- * <p>A Web Service is installed at this URL.</p>
- *
- */
- public static String HTML_NON_ROOT_PAGE_BODY_1() {
- return localizer.localize(localizableHTML_NON_ROOT_PAGE_BODY_1());
- }
-
- public static Localizable localizablePUBLISHER_INFO_APPLYING_TRANSFORMATION(Object arg0) {
- return messageFactory.getMessage("publisher.info.applyingTransformation", arg0);
- }
-
- /**
- * WSSERVLET31: applying transformation with actual address: {0}
- *
- */
- public static String PUBLISHER_INFO_APPLYING_TRANSFORMATION(Object arg0) {
- return localizer.localize(localizablePUBLISHER_INFO_APPLYING_TRANSFORMATION(arg0));
- }
-
- public static Localizable localizableWSSERVLET_29_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET29.diag.check.1");
- }
-
- /**
- * Is the port valid? Unzip the war file and make sure the tie and serializers are present
- *
- */
- public static String WSSERVLET_29_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_29_DIAG_CHECK_1());
- }
-
- public static Localizable localizableSERVLET_TRACE_GOT_REQUEST_FOR_ENDPOINT(Object arg0) {
- return messageFactory.getMessage("servlet.trace.gotRequestForEndpoint", arg0);
- }
-
- /**
- * WSSERVLET19: got request for endpoint: {0}
- *
- */
- public static String SERVLET_TRACE_GOT_REQUEST_FOR_ENDPOINT(Object arg0) {
- return localizer.localize(localizableSERVLET_TRACE_GOT_REQUEST_FOR_ENDPOINT(arg0));
- }
-
- public static Localizable localizableERROR_SERVLET_INIT_CONFIG_PARAMETER_MISSING(Object arg0) {
- return messageFactory.getMessage("error.servlet.init.config.parameter.missing", arg0);
- }
-
- /**
- * WSSERVLET47: cannot find configuration parameter: "{0}"
- *
- */
- public static String ERROR_SERVLET_INIT_CONFIG_PARAMETER_MISSING(Object arg0) {
- return localizer.localize(localizableERROR_SERVLET_INIT_CONFIG_PARAMETER_MISSING(arg0));
- }
-
- public static Localizable localizableERROR_IMPLEMENTOR_FACTORY_SERVANT_INIT_FAILED(Object arg0) {
- return messageFactory.getMessage("error.implementorFactory.servantInitFailed", arg0);
- }
-
- /**
- * WSSERVLET44: failed to initialize the service implementor for port "{0}"
- *
- */
- public static String ERROR_IMPLEMENTOR_FACTORY_SERVANT_INIT_FAILED(Object arg0) {
- return localizer.localize(localizableERROR_IMPLEMENTOR_FACTORY_SERVANT_INIT_FAILED(arg0));
- }
-
- public static Localizable localizableWSSERVLET_13_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET13.diag.check.1");
- }
-
- /**
- * Normal web service shutdown
- *
- */
- public static String WSSERVLET_13_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_13_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_31_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET31.diag.cause.1");
- }
-
- /**
- * Transformation being applied
- *
- */
- public static String WSSERVLET_31_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_31_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_50_DIAG_CHECK_3() {
- return messageFactory.getMessage("WSSERVLET50.diag.check.3");
- }
-
- /**
- * Check the server.xml file in the domain directory for failures
- *
- */
- public static String WSSERVLET_50_DIAG_CHECK_3() {
- return localizer.localize(localizableWSSERVLET_50_DIAG_CHECK_3());
- }
-
- public static Localizable localizableERROR_IMPLEMENTOR_FACTORY_NO_INPUT_STREAM() {
- return messageFactory.getMessage("error.implementorFactory.noInputStream");
- }
-
- /**
- * WSSERVLET37: no configuration specified
- *
- */
- public static String ERROR_IMPLEMENTOR_FACTORY_NO_INPUT_STREAM() {
- return localizer.localize(localizableERROR_IMPLEMENTOR_FACTORY_NO_INPUT_STREAM());
- }
-
- public static Localizable localizableWSSERVLET_24_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET24.diag.cause.1");
- }
-
- /**
- * SOAPFault message is being returned to the client.
- *
- */
- public static String WSSERVLET_24_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_24_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_50_DIAG_CHECK_2() {
- return messageFactory.getMessage("WSSERVLET50.diag.check.2");
- }
-
- /**
- * Verify that Application server deployment descriptors are correct in the service war file
- *
- */
- public static String WSSERVLET_50_DIAG_CHECK_2() {
- return localizer.localize(localizableWSSERVLET_50_DIAG_CHECK_2());
- }
-
- public static Localizable localizableWSSERVLET_50_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET50.diag.check.1");
- }
-
- /**
- * Verify that sun-jaxws.xml and web.xml are correct in the service war file
- *
- */
- public static String WSSERVLET_50_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_50_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_43_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET43.diag.check.1");
- }
-
- /**
- * Make sure web service is available and public. Examine exception for more details
- *
- */
- public static String WSSERVLET_43_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_43_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_15_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET15.diag.cause.1");
- }
-
- /**
- * Web Services servlet shutdown.
- *
- */
- public static String WSSERVLET_15_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_15_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_27_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET27.diag.check.1");
- }
-
- /**
- * Remove the implicit URL
- *
- */
- public static String WSSERVLET_27_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_27_DIAG_CHECK_1());
- }
-
- public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_UNKNOWN_NAME(Object arg0) {
- return messageFactory.getMessage("error.implementorRegistry.unknownName", arg0);
- }
-
- /**
- * WSSERVLET38: unknown port name: {0}
- *
- */
- public static String ERROR_IMPLEMENTOR_REGISTRY_UNKNOWN_NAME(Object arg0) {
- return localizer.localize(localizableERROR_IMPLEMENTOR_REGISTRY_UNKNOWN_NAME(arg0));
- }
-
- public static Localizable localizableSERVLET_HTML_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("servlet.html.notFound", arg0);
- }
-
- /**
- * <h1>404 Not Found: {0}</h1>
- *
- */
- public static String SERVLET_HTML_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableSERVLET_HTML_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableHTML_ROOT_PAGE_TITLE() {
- return messageFactory.getMessage("html.rootPage.title");
- }
-
- /**
- * Web Service
- *
- */
- public static String HTML_ROOT_PAGE_TITLE() {
- return localizer.localize(localizableHTML_ROOT_PAGE_TITLE());
- }
-
- public static Localizable localizableWSSERVLET_20_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET20.diag.check.1");
- }
-
- /**
- * Unzip the war, are the tie and serializer classes found?
- *
- */
- public static String WSSERVLET_20_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_20_DIAG_CHECK_1());
- }
-
- public static Localizable localizableJAXRPCSERVLET_11_DIAG_CAUSE_1() {
- return messageFactory.getMessage("JAXRPCSERVLET11.diag.cause.1");
- }
-
- /**
- * WSRuntimeInfoParser could not parse sun-jaxws.xml runtime descriptor
- *
- */
- public static String JAXRPCSERVLET_11_DIAG_CAUSE_1() {
- return localizer.localize(localizableJAXRPCSERVLET_11_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_11_DIAG_CHECK_2() {
- return messageFactory.getMessage("WSSERVLET11.diag.check.2");
- }
-
- /**
- * Please check the jaxrpc-ri.xml file to make sure it is present in the war file
- *
- */
- public static String WSSERVLET_11_DIAG_CHECK_2() {
- return localizer.localize(localizableWSSERVLET_11_DIAG_CHECK_2());
- }
-
- public static Localizable localizableWSSERVLET_11_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET11.diag.check.1");
- }
-
- /**
- * Please check the sun-jaxws.xml file to make sure it is correct
- *
- */
- public static String WSSERVLET_11_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_11_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_22_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET22.diag.cause.1");
- }
-
- /**
- * A request was invoked with no endpoint
- *
- */
- public static String WSSERVLET_22_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_22_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_34_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET34.diag.check.1");
- }
-
- /**
- * Check the log file(s) for more detailed errors/exceptions.
- *
- */
- public static String WSSERVLET_34_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_34_DIAG_CHECK_1());
- }
-
- public static Localizable localizableERROR_SERVLET_NO_IMPLEMENTOR_FOR_PORT(Object arg0) {
- return messageFactory.getMessage("error.servlet.noImplementorForPort", arg0);
- }
-
- /**
- * WSSERVLET52: no implementor registered for port: {0}
- *
- */
- public static String ERROR_SERVLET_NO_IMPLEMENTOR_FOR_PORT(Object arg0) {
- return localizer.localize(localizableERROR_SERVLET_NO_IMPLEMENTOR_FOR_PORT(arg0));
- }
-
- public static Localizable localizableWSSERVLET_64_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET64.diag.check.1");
- }
-
- /**
- * Make sure the client request is using text/xml
- *
- */
- public static String WSSERVLET_64_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_64_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_18_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET18.diag.check.1");
- }
-
- /**
- * This may or may not be intentional. If not examine client program for errors.
- *
- */
- public static String WSSERVLET_18_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_18_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_29_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET29.diag.cause.1");
- }
-
- /**
- * A port is specified, but a corresponding service implementation is not found
- *
- */
- public static String WSSERVLET_29_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_29_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableSERVLET_ERROR_NO_RESPONSE_MESSAGE() {
- return messageFactory.getMessage("servlet.error.noResponseMessage");
- }
-
- /**
- * WSSERVLET23: no response message
- *
- */
- public static String SERVLET_ERROR_NO_RESPONSE_MESSAGE() {
- return localizer.localize(localizableSERVLET_ERROR_NO_RESPONSE_MESSAGE());
- }
-
- public static Localizable localizableMESSAGE_TOO_LONG(Object arg0) {
- return messageFactory.getMessage("message.too.long", arg0);
- }
-
- /**
- *
- * Message has been truncated
- * use {0} property to increase the amount of printed part of the message
- *
- */
- public static String MESSAGE_TOO_LONG(Object arg0) {
- return localizer.localize(localizableMESSAGE_TOO_LONG(arg0));
- }
-
- public static Localizable localizableLISTENER_INFO_INITIALIZE() {
- return messageFactory.getMessage("listener.info.initialize");
- }
-
- /**
- * WSSERVLET12: JAX-WS context listener initializing
- *
- */
- public static String LISTENER_INFO_INITIALIZE() {
- return localizer.localize(localizableLISTENER_INFO_INITIALIZE());
- }
-
- public static Localizable localizableSERVLET_HTML_NO_INFO_AVAILABLE() {
- return messageFactory.getMessage("servlet.html.noInfoAvailable");
- }
-
- /**
- * <p>No JAX-WS context information available.</p>
- *
- */
- public static String SERVLET_HTML_NO_INFO_AVAILABLE() {
- return localizer.localize(localizableSERVLET_HTML_NO_INFO_AVAILABLE());
- }
-
- public static Localizable localizableSERVLET_HTML_INFORMATION_TABLE(Object arg0, Object arg1) {
- return messageFactory.getMessage("servlet.html.information.table", arg0, arg1);
- }
-
- /**
- * <table border="0"><tr><td>Address:</td><td>{0}</td></tr><tr><td>WSDL:</td><td><a href="{0}?wsdl">{0}?wsdl</a></td></tr><tr><td>Implementation class:</td><td>{1}</td></tr></table>
- *
- */
- public static String SERVLET_HTML_INFORMATION_TABLE(Object arg0, Object arg1) {
- return localizer.localize(localizableSERVLET_HTML_INFORMATION_TABLE(arg0, arg1));
- }
-
- public static Localizable localizableSERVLET_TRACE_WRITING_FAULT_RESPONSE() {
- return messageFactory.getMessage("servlet.trace.writingFaultResponse");
- }
-
- /**
- * WSSERVLET24: writing fault response
- *
- */
- public static String SERVLET_TRACE_WRITING_FAULT_RESPONSE() {
- return localizer.localize(localizableSERVLET_TRACE_WRITING_FAULT_RESPONSE());
- }
-
- public static Localizable localizableSERVLET_ERROR_NO_IMPLEMENTOR_FOR_ENDPOINT(Object arg0) {
- return messageFactory.getMessage("servlet.error.noImplementorForEndpoint", arg0);
- }
-
- /**
- * WSSERVLET20: no implementor for endpoint: {0}
- *
- */
- public static String SERVLET_ERROR_NO_IMPLEMENTOR_FOR_ENDPOINT(Object arg0) {
- return localizer.localize(localizableSERVLET_ERROR_NO_IMPLEMENTOR_FOR_ENDPOINT(arg0));
- }
-
- public static Localizable localizableWSSERVLET_13_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET13.diag.cause.1");
- }
-
- /**
- * Context listener shutdown
- *
- */
- public static String WSSERVLET_13_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_13_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_50_DIAG_CAUSE_3() {
- return messageFactory.getMessage("WSSERVLET50.diag.cause.3");
- }
-
- /**
- * There may some Application Server initialization problems
- *
- */
- public static String WSSERVLET_50_DIAG_CAUSE_3() {
- return localizer.localize(localizableWSSERVLET_50_DIAG_CAUSE_3());
- }
-
- public static Localizable localizableWSSERVLET_32_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET32.diag.check.1");
- }
-
- /**
- * Normal Operation.
- *
- */
- public static String WSSERVLET_32_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_32_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_50_DIAG_CAUSE_2() {
- return messageFactory.getMessage("WSSERVLET50.diag.cause.2");
- }
-
- /**
- * Application server deployment descriptors may be incorrect
- *
- */
- public static String WSSERVLET_50_DIAG_CAUSE_2() {
- return localizer.localize(localizableWSSERVLET_50_DIAG_CAUSE_2());
- }
-
- public static Localizable localizableWSSERVLET_50_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET50.diag.cause.1");
- }
-
- /**
- * WS runtime sun-jaxws.xml or web.xml may be incorrect
- *
- */
- public static String WSSERVLET_50_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_50_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_25_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET25.diag.check.1");
- }
-
- /**
- * Tracing message, normal response.
- *
- */
- public static String WSSERVLET_25_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_25_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_43_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET43.diag.cause.1");
- }
-
- /**
- * Instantiation of the web service failed.
- *
- */
- public static String WSSERVLET_43_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_43_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_27_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET27.diag.cause.1");
- }
-
- /**
- * Implicit URLS are not supported in this release
- *
- */
- public static String WSSERVLET_27_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_27_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableERROR_SERVLET_CAUGHT_THROWABLE_IN_INIT(Object arg0) {
- return messageFactory.getMessage("error.servlet.caughtThrowableInInit", arg0);
- }
-
- /**
- * WSSERVLET50: caught throwable during servlet initialization: {0}
- *
- */
- public static String ERROR_SERVLET_CAUGHT_THROWABLE_IN_INIT(Object arg0) {
- return localizer.localize(localizableERROR_SERVLET_CAUGHT_THROWABLE_IN_INIT(arg0));
- }
-
- public static Localizable localizableSERVLET_HTML_ENDPOINT_TABLE(Object arg0, Object arg1) {
- return messageFactory.getMessage("servlet.html.endpoint.table", arg0, arg1);
- }
-
- /**
- * <table border="0"><tr><td>Service Name:</td><td>{0}</td></tr><tr><td>Port Name:</td><td>{1}</td></tr></table>
- *
- */
- public static String SERVLET_HTML_ENDPOINT_TABLE(Object arg0, Object arg1) {
- return localizer.localize(localizableSERVLET_HTML_ENDPOINT_TABLE(arg0, arg1));
- }
-
- public static Localizable localizableERROR_SERVLET_CAUGHT_THROWABLE_WHILE_RECOVERING(Object arg0) {
- return messageFactory.getMessage("error.servlet.caughtThrowableWhileRecovering", arg0);
- }
-
- /**
- * WSSERVLET51: caught throwable while recovering from a previous exception: {0}
- *
- */
- public static String ERROR_SERVLET_CAUGHT_THROWABLE_WHILE_RECOVERING(Object arg0) {
- return localizer.localize(localizableERROR_SERVLET_CAUGHT_THROWABLE_WHILE_RECOVERING(arg0));
- }
-
- public static Localizable localizableNO_SUNJAXWS_XML(Object arg0) {
- return messageFactory.getMessage("no.sunjaxws.xml", arg0);
- }
-
- /**
- * Runtime descriptor "{0}" is missing
- *
- */
- public static String NO_SUNJAXWS_XML(Object arg0) {
- return localizer.localize(localizableNO_SUNJAXWS_XML(arg0));
- }
-
- public static Localizable localizableSERVLET_HTML_TITLE_2() {
- return messageFactory.getMessage("servlet.html.title2");
- }
-
- /**
- * <h1>Web Services</h1>
- *
- */
- public static String SERVLET_HTML_TITLE_2() {
- return localizer.localize(localizableSERVLET_HTML_TITLE_2());
- }
-
- public static Localizable localizableLISTENER_INFO_DESTROY() {
- return messageFactory.getMessage("listener.info.destroy");
- }
-
- /**
- * WSSERVLET13: JAX-WS context listener destroyed
- *
- */
- public static String LISTENER_INFO_DESTROY() {
- return localizer.localize(localizableLISTENER_INFO_DESTROY());
- }
-
- public static Localizable localizableEXCEPTION_TEMPLATE_CREATION_FAILED() {
- return messageFactory.getMessage("exception.templateCreationFailed");
- }
-
- /**
- * WSSERVLET35: failed to create a template object
- *
- */
- public static String EXCEPTION_TEMPLATE_CREATION_FAILED() {
- return localizer.localize(localizableEXCEPTION_TEMPLATE_CREATION_FAILED());
- }
-
- public static Localizable localizableWSSERVLET_20_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET20.diag.cause.1");
- }
-
- /**
- * Implementation for this service can not be found
- *
- */
- public static String WSSERVLET_20_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_20_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableTRACE_SERVLET_WRITING_FAULT_RESPONSE() {
- return messageFactory.getMessage("trace.servlet.writingFaultResponse");
- }
-
- /**
- * WSSERVLET61: writing fault response
- *
- */
- public static String TRACE_SERVLET_WRITING_FAULT_RESPONSE() {
- return localizer.localize(localizableTRACE_SERVLET_WRITING_FAULT_RESPONSE());
- }
-
- public static Localizable localizableWSSERVLET_23_DIAG_CHECK_2() {
- return messageFactory.getMessage("WSSERVLET23.diag.check.2");
- }
-
- /**
- * The request may be malformed and be accepted by the service, yet did not generate a response
- *
- */
- public static String WSSERVLET_23_DIAG_CHECK_2() {
- return localizer.localize(localizableWSSERVLET_23_DIAG_CHECK_2());
- }
-
- public static Localizable localizableWSSERVLET_23_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET23.diag.check.1");
- }
-
- /**
- * If a response was expected, check that a request message was actually sent
- *
- */
- public static String WSSERVLET_23_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_23_DIAG_CHECK_1());
- }
-
- public static Localizable localizableSERVLET_WARNING_MISSING_CONTEXT_INFORMATION() {
- return messageFactory.getMessage("servlet.warning.missingContextInformation");
- }
-
- /**
- * WSSERVLET16: missing context information
- *
- */
- public static String SERVLET_WARNING_MISSING_CONTEXT_INFORMATION() {
- return localizer.localize(localizableSERVLET_WARNING_MISSING_CONTEXT_INFORMATION());
- }
-
- public static Localizable localizableWSSERVLET_16_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET16.diag.check.1");
- }
-
- /**
- * Unjar the service war file; check to see that the jaxrpc-ri-runtime.xml file is present
- *
- */
- public static String WSSERVLET_16_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_16_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_34_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET34.diag.cause.1");
- }
-
- /**
- * The location patching on the wsdl failed when attempting to transform.
- *
- */
- public static String WSSERVLET_34_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_34_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableHTML_NON_ROOT_PAGE_TITLE() {
- return messageFactory.getMessage("html.nonRootPage.title");
- }
-
- /**
- * Web Service
- *
- */
- public static String HTML_NON_ROOT_PAGE_TITLE() {
- return localizer.localize(localizableHTML_NON_ROOT_PAGE_TITLE());
- }
-
- public static Localizable localizableSERVLET_HTML_COLUMN_HEADER_INFORMATION() {
- return messageFactory.getMessage("servlet.html.columnHeader.information");
- }
-
- /**
- * Information
- *
- */
- public static String SERVLET_HTML_COLUMN_HEADER_INFORMATION() {
- return localizer.localize(localizableSERVLET_HTML_COLUMN_HEADER_INFORMATION());
- }
-
- public static Localizable localizableWSSERVLET_18_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET18.diag.cause.1");
- }
-
- /**
- * Message sent by client is empty
- *
- */
- public static String WSSERVLET_18_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_18_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_64_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET64.diag.cause.1");
- }
-
- /**
- * Web service requests must be a content type text/xml: WSI BP 1.0
- *
- */
- public static String WSSERVLET_64_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_64_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableINFO_SERVLET_INITIALIZING() {
- return messageFactory.getMessage("info.servlet.initializing");
- }
-
- /**
- * WSSERVLET56: JAX-WS servlet: init
- *
- */
- public static String INFO_SERVLET_INITIALIZING() {
- return localizer.localize(localizableINFO_SERVLET_INITIALIZING());
- }
-
- public static Localizable localizableSERVLET_INFO_EMPTY_REQUEST_MESSAGE() {
- return messageFactory.getMessage("servlet.info.emptyRequestMessage");
- }
-
- /**
- * WSSERVLET18: got empty request message
- *
- */
- public static String SERVLET_INFO_EMPTY_REQUEST_MESSAGE() {
- return localizer.localize(localizableSERVLET_INFO_EMPTY_REQUEST_MESSAGE());
- }
-
- public static Localizable localizableSERVLET_ERROR_NO_ENDPOINT_SPECIFIED() {
- return messageFactory.getMessage("servlet.error.noEndpointSpecified");
- }
-
- /**
- * WSSERVLET22: no endpoint specified
- *
- */
- public static String SERVLET_ERROR_NO_ENDPOINT_SPECIFIED() {
- return localizer.localize(localizableSERVLET_ERROR_NO_ENDPOINT_SPECIFIED());
- }
-
- public static Localizable localizableWSSERVLET_11_DIAG_CAUSE_2() {
- return messageFactory.getMessage("WSSERVLET11.diag.cause.2");
- }
-
- /**
- * The sun-jaxws.xml runtime deployment descriptor may be missing
- *
- */
- public static String WSSERVLET_11_DIAG_CAUSE_2() {
- return localizer.localize(localizableWSSERVLET_11_DIAG_CAUSE_2());
- }
-
- public static Localizable localizableWSSERVLET_30_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET30.diag.check.1");
- }
-
- /**
- * This could be due to a number of causes. Check the server log file for exceptions.
- *
- */
- public static String WSSERVLET_30_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_30_DIAG_CHECK_1());
- }
-
- public static Localizable localizableEXCEPTION_CANNOT_CREATE_TRANSFORMER() {
- return messageFactory.getMessage("exception.cannotCreateTransformer");
- }
-
- /**
- * WSSERVLET33: cannot create transformer
- *
- */
- public static String EXCEPTION_CANNOT_CREATE_TRANSFORMER() {
- return localizer.localize(localizableEXCEPTION_CANNOT_CREATE_TRANSFORMER());
- }
-
- public static Localizable localizableSERVLET_FAULTSTRING_INVALID_SOAP_ACTION() {
- return messageFactory.getMessage("servlet.faultstring.invalidSOAPAction");
- }
-
- /**
- * WSSERVLET65: Invalid Header SOAPAction required
- *
- */
- public static String SERVLET_FAULTSTRING_INVALID_SOAP_ACTION() {
- return localizer.localize(localizableSERVLET_FAULTSTRING_INVALID_SOAP_ACTION());
- }
-
- public static Localizable localizableWSSERVLET_14_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET14.diag.check.1");
- }
-
- /**
- * Normal Web Service deployment. Deployment of service complete.
- *
- */
- public static String WSSERVLET_14_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_14_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_32_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET32.diag.cause.1");
- }
-
- /**
- * WSDL being generated
- *
- */
- public static String WSSERVLET_32_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_32_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_25_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET25.diag.cause.1");
- }
-
- /**
- * SOAPMessage response is being returned to client
- *
- */
- public static String WSSERVLET_25_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_25_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_44_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET44.diag.check.1");
- }
-
- /**
- * Check the exception for more details. Make sure all the configuration files are correct.
- *
- */
- public static String WSSERVLET_44_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_44_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_28_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET28.diag.check.1");
- }
-
- /**
- * Set target endpoint with stub.setTargetEndpoint() property.
- *
- */
- public static String WSSERVLET_28_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_28_DIAG_CHECK_1());
- }
-
- public static Localizable localizableSERVLET_INFO_INITIALIZE() {
- return messageFactory.getMessage("servlet.info.initialize");
- }
-
- /**
- * WSSERVLET14: JAX-WS servlet initializing
- *
- */
- public static String SERVLET_INFO_INITIALIZE() {
- return localizer.localize(localizableSERVLET_INFO_INITIALIZE());
- }
-
- public static Localizable localizableERROR_SERVLET_INIT_CONFIG_FILE_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("error.servlet.init.config.fileNotFound", arg0);
- }
-
- /**
- * WSSERVLET48: config file: "{0}" not found
- *
- */
- public static String ERROR_SERVLET_INIT_CONFIG_FILE_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableERROR_SERVLET_INIT_CONFIG_FILE_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableHTML_WSDL_PAGE_TITLE() {
- return messageFactory.getMessage("html.wsdlPage.title");
- }
-
- /**
- * Web Service
- *
- */
- public static String HTML_WSDL_PAGE_TITLE() {
- return localizer.localize(localizableHTML_WSDL_PAGE_TITLE());
- }
-
- public static Localizable localizableSERVLET_HTML_COLUMN_HEADER_PORT_NAME() {
- return messageFactory.getMessage("servlet.html.columnHeader.portName");
- }
-
- /**
- * Endpoint
- *
- */
- public static String SERVLET_HTML_COLUMN_HEADER_PORT_NAME() {
- return localizer.localize(localizableSERVLET_HTML_COLUMN_HEADER_PORT_NAME());
- }
-
- public static Localizable localizableHTML_ROOT_PAGE_BODY_2_B() {
- return messageFactory.getMessage("html.rootPage.body2b");
- }
-
- /**
- * </p>
- *
- */
- public static String HTML_ROOT_PAGE_BODY_2_B() {
- return localizer.localize(localizableHTML_ROOT_PAGE_BODY_2_B());
- }
-
- public static Localizable localizableHTML_ROOT_PAGE_BODY_2_A() {
- return messageFactory.getMessage("html.rootPage.body2a");
- }
-
- /**
- * <p>It supports the following ports:
- *
- */
- public static String HTML_ROOT_PAGE_BODY_2_A() {
- return localizer.localize(localizableHTML_ROOT_PAGE_BODY_2_A());
- }
-
- public static Localizable localizableWSSERVLET_21_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET21.diag.check.1");
- }
-
- /**
- * Normal web service invocation.
- *
- */
- public static String WSSERVLET_21_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_21_DIAG_CHECK_1());
- }
-
- public static Localizable localizableERROR_SERVLET_NO_PORT_SPECIFIED() {
- return messageFactory.getMessage("error.servlet.noPortSpecified");
- }
-
- /**
- * WSSERVLET53: no port specified in HTTP POST request URL
- *
- */
- public static String ERROR_SERVLET_NO_PORT_SPECIFIED() {
- return localizer.localize(localizableERROR_SERVLET_NO_PORT_SPECIFIED());
- }
-
- public static Localizable localizableINFO_SERVLET_GOT_EMPTY_REQUEST_MESSAGE() {
- return messageFactory.getMessage("info.servlet.gotEmptyRequestMessage");
- }
-
- /**
- * WSSERVLET55: got empty request message
- *
- */
- public static String INFO_SERVLET_GOT_EMPTY_REQUEST_MESSAGE() {
- return localizer.localize(localizableINFO_SERVLET_GOT_EMPTY_REQUEST_MESSAGE());
- }
-
- public static Localizable localizableWSSERVLET_51_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET51.diag.check.1");
- }
-
- /**
- * Check the server.xml log file for exception information
- *
- */
- public static String WSSERVLET_51_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_51_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_23_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET23.diag.cause.1");
- }
-
- /**
- * The request generated no response from the service
- *
- */
- public static String WSSERVLET_23_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_23_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_16_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET16.diag.cause.1");
- }
-
- /**
- * The jaxrpc-ri.xml file may be missing from the war file
- *
- */
- public static String WSSERVLET_16_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_16_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_35_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET35.diag.check.1");
- }
-
- /**
- * An exception was thrown during creation of the template. View exception and stacktrace for more details.
- *
- */
- public static String WSSERVLET_35_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_35_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_65_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET65.diag.check.1");
- }
-
- /**
- * Add SOAPAction and appropriate value
- *
- */
- public static String WSSERVLET_65_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_65_DIAG_CHECK_1());
- }
-
- public static Localizable localizableTRACE_SERVLET_HANDING_REQUEST_OVER_TO_IMPLEMENTOR(Object arg0) {
- return messageFactory.getMessage("trace.servlet.handingRequestOverToImplementor", arg0);
- }
-
- /**
- * WSSERVLET59: handing request over to implementor: {0}
- *
- */
- public static String TRACE_SERVLET_HANDING_REQUEST_OVER_TO_IMPLEMENTOR(Object arg0) {
- return localizer.localize(localizableTRACE_SERVLET_HANDING_REQUEST_OVER_TO_IMPLEMENTOR(arg0));
- }
-
- public static Localizable localizableWSSERVLET_19_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET19.diag.check.1");
- }
-
- /**
- * Informational message only. Normal operation.
- *
- */
- public static String WSSERVLET_19_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_19_DIAG_CHECK_1());
- }
-
- public static Localizable localizablePUBLISHER_INFO_GENERATING_WSDL(Object arg0) {
- return messageFactory.getMessage("publisher.info.generatingWSDL", arg0);
- }
-
- /**
- * WSSERVLET32: generating WSDL for endpoint: {0}
- *
- */
- public static String PUBLISHER_INFO_GENERATING_WSDL(Object arg0) {
- return localizer.localize(localizablePUBLISHER_INFO_GENERATING_WSDL(arg0));
- }
-
- public static Localizable localizableSERVLET_WARNING_DUPLICATE_ENDPOINT_URL_PATTERN(Object arg0) {
- return messageFactory.getMessage("servlet.warning.duplicateEndpointUrlPattern", arg0);
- }
-
- /**
- * WSSERVLET26: duplicate URL pattern in endpoint: {0}
- *
- */
- public static String SERVLET_WARNING_DUPLICATE_ENDPOINT_URL_PATTERN(Object arg0) {
- return localizer.localize(localizableSERVLET_WARNING_DUPLICATE_ENDPOINT_URL_PATTERN(arg0));
- }
-
- public static Localizable localizableWSSERVLET_49_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET49.diag.check.1");
- }
-
- /**
- * Check the server.xml log file for exception information
- *
- */
- public static String WSSERVLET_49_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_49_DIAG_CHECK_1());
- }
-
- public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_CANNOT_READ_CONFIGURATION() {
- return messageFactory.getMessage("error.implementorRegistry.cannotReadConfiguration");
- }
-
- /**
- * WSSERVLET39: cannot read configuration
- *
- */
- public static String ERROR_IMPLEMENTOR_REGISTRY_CANNOT_READ_CONFIGURATION() {
- return localizer.localize(localizableERROR_IMPLEMENTOR_REGISTRY_CANNOT_READ_CONFIGURATION());
- }
-
- public static Localizable localizableTRACE_SERVLET_GOT_RESPONSE_FROM_IMPLEMENTOR(Object arg0) {
- return messageFactory.getMessage("trace.servlet.gotResponseFromImplementor", arg0);
- }
-
- /**
- * WSSERVLET60: got response from implementor: {0}
- *
- */
- public static String TRACE_SERVLET_GOT_RESPONSE_FROM_IMPLEMENTOR(Object arg0) {
- return localizer.localize(localizableTRACE_SERVLET_GOT_RESPONSE_FROM_IMPLEMENTOR(arg0));
- }
-
- public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_INCOMPLETE_INFORMATION() {
- return messageFactory.getMessage("error.implementorRegistry.incompleteInformation");
- }
-
- /**
- * WSSERVLET41: configuration information is incomplete
- *
- */
- public static String ERROR_IMPLEMENTOR_REGISTRY_INCOMPLETE_INFORMATION() {
- return localizer.localize(localizableERROR_IMPLEMENTOR_REGISTRY_INCOMPLETE_INFORMATION());
- }
-
- public static Localizable localizableWSSERVLET_12_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET12.diag.check.1");
- }
-
- /**
- * Normal web service startup
- *
- */
- public static String WSSERVLET_12_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_12_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_30_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET30.diag.cause.1");
- }
-
- /**
- * There was a server error processing the request
- *
- */
- public static String WSSERVLET_30_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_30_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableHTML_WSDL_PAGE_NO_WSDL() {
- return messageFactory.getMessage("html.wsdlPage.noWsdl");
- }
-
- /**
- * <p>No WSDL document available for publishing.</p><p>Please check your deployment information.</p>
- *
- */
- public static String HTML_WSDL_PAGE_NO_WSDL() {
- return localizer.localize(localizableHTML_WSDL_PAGE_NO_WSDL());
- }
-
- public static Localizable localizableWSSERVLET_14_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET14.diag.cause.1");
- }
-
- /**
- * Web Services servlet starting up.
- *
- */
- public static String WSSERVLET_14_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_14_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableINFO_SERVLET_DESTROYING() {
- return messageFactory.getMessage("info.servlet.destroying");
- }
-
- /**
- * WSSERVLET57: JAX-WS servlet: destroy
- *
- */
- public static String INFO_SERVLET_DESTROYING() {
- return localizer.localize(localizableINFO_SERVLET_DESTROYING());
- }
-
- public static Localizable localizableERROR_SERVLET_NO_RESPONSE_WAS_PRODUCED() {
- return messageFactory.getMessage("error.servlet.noResponseWasProduced");
- }
-
- /**
- * WSSERVLET54: no response was produced (internal error)
- *
- */
- public static String ERROR_SERVLET_NO_RESPONSE_WAS_PRODUCED() {
- return localizer.localize(localizableERROR_SERVLET_NO_RESPONSE_WAS_PRODUCED());
- }
-
- public static Localizable localizableWSSERVLET_26_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET26.diag.check.1");
- }
-
- /**
- * This may cause a problem, please remove duplicate endpoints
- *
- */
- public static String WSSERVLET_26_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_26_DIAG_CHECK_1());
- }
-
- public static Localizable localizableSERVLET_HTML_TITLE() {
- return messageFactory.getMessage("servlet.html.title");
- }
-
- /**
- * Web Services
- *
- */
- public static String SERVLET_HTML_TITLE() {
- return localizer.localize(localizableSERVLET_HTML_TITLE());
- }
-
- public static Localizable localizableWSSERVLET_44_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET44.diag.cause.1");
- }
-
- /**
- * The web service was instantiated, however, it could not be initialized
- *
- */
- public static String WSSERVLET_44_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_44_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_63_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET63.diag.check.1");
- }
-
- /**
- * Make sure that your HTTP client is using POST requests, not GET requests
- *
- */
- public static String WSSERVLET_63_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_63_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_28_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET28.diag.cause.1");
- }
-
- /**
- * Target endpoint is null
- *
- */
- public static String WSSERVLET_28_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_28_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableERROR_IMPLEMENTOR_FACTORY_NO_CONFIGURATION() {
- return messageFactory.getMessage("error.implementorFactory.noConfiguration");
- }
-
- /**
- * WSSERVLET36: no configuration specified
- *
- */
- public static String ERROR_IMPLEMENTOR_FACTORY_NO_CONFIGURATION() {
- return localizer.localize(localizableERROR_IMPLEMENTOR_FACTORY_NO_CONFIGURATION());
- }
-
- public static Localizable localizableHTML_ROOT_PAGE_BODY_4() {
- return messageFactory.getMessage("html.rootPage.body4");
- }
-
- /**
- * <p>This endpoint is incorrectly configured. Please check the location and contents of the configuration file.</p>
- *
- */
- public static String HTML_ROOT_PAGE_BODY_4() {
- return localizer.localize(localizableHTML_ROOT_PAGE_BODY_4());
- }
-
- public static Localizable localizableHTML_ROOT_PAGE_BODY_1() {
- return messageFactory.getMessage("html.rootPage.body1");
- }
-
- /**
- * <p>A Web Service is installed at this URL.</p>
- *
- */
- public static String HTML_ROOT_PAGE_BODY_1() {
- return localizer.localize(localizableHTML_ROOT_PAGE_BODY_1());
- }
-
- public static Localizable localizableEXCEPTION_TRANSFORMATION_FAILED(Object arg0) {
- return messageFactory.getMessage("exception.transformationFailed", arg0);
- }
-
- /**
- * WSSERVLET34: transformation failed : {0}
- *
- */
- public static String EXCEPTION_TRANSFORMATION_FAILED(Object arg0) {
- return localizer.localize(localizableEXCEPTION_TRANSFORMATION_FAILED(arg0));
- }
-
- public static Localizable localizableSERVLET_HTML_METHOD() {
- return messageFactory.getMessage("servlet.html.method");
- }
-
- /**
- * WSSERVLET63: must use Post for this type of request
- *
- */
- public static String SERVLET_HTML_METHOD() {
- return localizer.localize(localizableSERVLET_HTML_METHOD());
- }
-
- public static Localizable localizableSERVLET_FAULTSTRING_MISSING_PORT() {
- return messageFactory.getMessage("servlet.faultstring.missingPort");
- }
-
- /**
- * WSSERVLET28: Missing port information
- *
- */
- public static String SERVLET_FAULTSTRING_MISSING_PORT() {
- return localizer.localize(localizableSERVLET_FAULTSTRING_MISSING_PORT());
- }
-
- public static Localizable localizableWSSERVLET_21_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET21.diag.cause.1");
- }
-
- /**
- * The Web service is being invoked
- *
- */
- public static String WSSERVLET_21_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_21_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableSERVLET_TRACE_WRITING_SUCCESS_RESPONSE() {
- return messageFactory.getMessage("servlet.trace.writingSuccessResponse");
- }
-
- /**
- * WSSERVLET25: writing success response
- *
- */
- public static String SERVLET_TRACE_WRITING_SUCCESS_RESPONSE() {
- return localizer.localize(localizableSERVLET_TRACE_WRITING_SUCCESS_RESPONSE());
- }
-
- public static Localizable localizableWSSERVLET_33_DIAG_CHECK_2() {
- return messageFactory.getMessage("WSSERVLET33.diag.check.2");
- }
-
- /**
- * There maybe a transformation engine may not be supported or compatible. Check the server.xml file for exceptions.
- *
- */
- public static String WSSERVLET_33_DIAG_CHECK_2() {
- return localizer.localize(localizableWSSERVLET_33_DIAG_CHECK_2());
- }
-
- public static Localizable localizableWSSERVLET_33_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET33.diag.check.1");
- }
-
- /**
- * There maybe a transformation engine being used that is not compatible. Make sure you are using the correct transformer and version.
- *
- */
- public static String WSSERVLET_33_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_33_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_51_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET51.diag.cause.1");
- }
-
- /**
- * Service processing of the request generated an exception; while attempting to return a SOAPPFaultMessage a throwable was again generated
- *
- */
- public static String WSSERVLET_51_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_51_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_24_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET24.diag.check.1");
- }
-
- /**
- * Tracing message fault recorded.
- *
- */
- public static String WSSERVLET_24_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_24_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_17_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET17.diag.check.1");
- }
-
- /**
- * Note that this may cause problems with service deployment
- *
- */
- public static String WSSERVLET_17_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_17_DIAG_CHECK_1());
- }
-
- public static Localizable localizableWSSERVLET_35_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET35.diag.cause.1");
- }
-
- /**
- * A XSLT stylesheet template is create for the wsdl location patching using transformation. Template create failed.
- *
- */
- public static String WSSERVLET_35_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_35_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_19_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET19.diag.cause.1");
- }
-
- /**
- * Client request for this endpoint arrived
- *
- */
- public static String WSSERVLET_19_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_19_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_65_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET65.diag.cause.1");
- }
-
- /**
- * SOAP Action is required
- *
- */
- public static String WSSERVLET_65_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_65_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableLISTENER_PARSING_FAILED(Object arg0) {
- return messageFactory.getMessage("listener.parsingFailed", arg0);
- }
-
- /**
- * WSSERVLET11: failed to parse runtime descriptor: {0}
- *
- */
- public static String LISTENER_PARSING_FAILED(Object arg0) {
- return localizer.localize(localizableLISTENER_PARSING_FAILED(arg0));
- }
-
- public static Localizable localizableSERVLET_WARNING_IGNORING_IMPLICIT_URL_PATTERN(Object arg0) {
- return messageFactory.getMessage("servlet.warning.ignoringImplicitUrlPattern", arg0);
- }
-
- /**
- * WSSERVLET27: unsupported implicit URL pattern in endpoint: {0}
- *
- */
- public static String SERVLET_WARNING_IGNORING_IMPLICIT_URL_PATTERN(Object arg0) {
- return localizer.localize(localizableSERVLET_WARNING_IGNORING_IMPLICIT_URL_PATTERN(arg0));
- }
-
- public static Localizable localizableWSSERVLET_49_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET49.diag.cause.1");
- }
-
- /**
- * Service processing of the request generated an exception; while attempting to return a SOAPFaultMessage a throwable was again generated
- *
- */
- public static String WSSERVLET_49_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_49_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableERROR_IMPLEMENTOR_FACTORY_NEW_INSTANCE_FAILED(Object arg0) {
- return messageFactory.getMessage("error.implementorFactory.newInstanceFailed", arg0);
- }
-
- /**
- * WSSERVLET43: failed to instantiate service implementor for port "{0}"
- *
- */
- public static String ERROR_IMPLEMENTOR_FACTORY_NEW_INSTANCE_FAILED(Object arg0) {
- return localizer.localize(localizableERROR_IMPLEMENTOR_FACTORY_NEW_INSTANCE_FAILED(arg0));
- }
-
- public static Localizable localizableWSSERVLET_12_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET12.diag.cause.1");
- }
-
- /**
- * Context listener starting
- *
- */
- public static String WSSERVLET_12_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_12_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableWSSERVLET_31_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET31.diag.check.1");
- }
-
- /**
- * Normal operation
- *
- */
- public static String WSSERVLET_31_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_31_DIAG_CHECK_1());
- }
-
- public static Localizable localizableSERVLET_FAULTSTRING_INVALID_CONTENT_TYPE() {
- return messageFactory.getMessage("servlet.faultstring.invalidContentType");
- }
-
- /**
- * WSSERVLET64: Invalid Content-Type, text/xml required
- *
- */
- public static String SERVLET_FAULTSTRING_INVALID_CONTENT_TYPE() {
- return localizer.localize(localizableSERVLET_FAULTSTRING_INVALID_CONTENT_TYPE());
- }
-
- public static Localizable localizableERROR_SERVLET_CAUGHT_THROWABLE(Object arg0) {
- return messageFactory.getMessage("error.servlet.caughtThrowable", arg0);
- }
-
- /**
- * WSSERVLET49: caught throwable: {0}
- *
- */
- public static String ERROR_SERVLET_CAUGHT_THROWABLE(Object arg0) {
- return localizer.localize(localizableERROR_SERVLET_CAUGHT_THROWABLE(arg0));
- }
-
- public static Localizable localizableTRACE_SERVLET_WRITING_SUCCESS_RESPONSE() {
- return messageFactory.getMessage("trace.servlet.writingSuccessResponse");
- }
-
- /**
- * WSSERVLET62: writing success response
- *
- */
- public static String TRACE_SERVLET_WRITING_SUCCESS_RESPONSE() {
- return localizer.localize(localizableTRACE_SERVLET_WRITING_SUCCESS_RESPONSE());
- }
-
- public static Localizable localizableERROR_IMPLEMENTOR_REGISTRY_CLASS_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("error.implementorRegistry.classNotFound", arg0);
- }
-
- /**
- * WSSERVLET40: class not found: {0}
- *
- */
- public static String ERROR_IMPLEMENTOR_REGISTRY_CLASS_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableERROR_IMPLEMENTOR_REGISTRY_CLASS_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableWSSERVLET_15_DIAG_CHECK_1() {
- return messageFactory.getMessage("WSSERVLET15.diag.check.1");
- }
-
- /**
- * Normal Web service undeployment. Undeployment complete.
- *
- */
- public static String WSSERVLET_15_DIAG_CHECK_1() {
- return localizer.localize(localizableWSSERVLET_15_DIAG_CHECK_1());
- }
-
- public static Localizable localizableSERVLET_FAULTSTRING_PORT_NOT_FOUND(Object arg0) {
- return messageFactory.getMessage("servlet.faultstring.portNotFound", arg0);
- }
-
- /**
- * WSSERVLET29: Port not found ({0})
- *
- */
- public static String SERVLET_FAULTSTRING_PORT_NOT_FOUND(Object arg0) {
- return localizer.localize(localizableSERVLET_FAULTSTRING_PORT_NOT_FOUND(arg0));
- }
-
- public static Localizable localizableSERVLET_INFO_DESTROY() {
- return messageFactory.getMessage("servlet.info.destroy");
- }
-
- /**
- * WSSERVLET15: JAX-WS servlet destroyed
- *
- */
- public static String SERVLET_INFO_DESTROY() {
- return localizer.localize(localizableSERVLET_INFO_DESTROY());
- }
-
- public static Localizable localizableSERVLET_FAULTSTRING_INTERNAL_SERVER_ERROR(Object arg0) {
- return messageFactory.getMessage("servlet.faultstring.internalServerError", arg0);
- }
-
- /**
- * WSSERVLET30: Internal server error ({0})
- *
- */
- public static String SERVLET_FAULTSTRING_INTERNAL_SERVER_ERROR(Object arg0) {
- return localizer.localize(localizableSERVLET_FAULTSTRING_INTERNAL_SERVER_ERROR(arg0));
- }
-
- public static Localizable localizableWSSERVLET_26_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET26.diag.cause.1");
- }
-
- /**
- * The endpoint URL is a duplicate
- *
- */
- public static String WSSERVLET_26_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_26_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableSERVLET_HTML_COLUMN_HEADER_STATUS() {
- return messageFactory.getMessage("servlet.html.columnHeader.status");
- }
-
- /**
- * Status
- *
- */
- public static String SERVLET_HTML_COLUMN_HEADER_STATUS() {
- return localizer.localize(localizableSERVLET_HTML_COLUMN_HEADER_STATUS());
- }
-
- public static Localizable localizableWSSERVLET_63_DIAG_CAUSE_1() {
- return messageFactory.getMessage("WSSERVLET63.diag.cause.1");
- }
-
- /**
- * Web service requests must use HTTP POST method: WSI BP 1.0
- *
- */
- public static String WSSERVLET_63_DIAG_CAUSE_1() {
- return localizer.localize(localizableWSSERVLET_63_DIAG_CAUSE_1());
- }
-
- public static Localizable localizableSERVLET_WARNING_DUPLICATE_ENDPOINT_NAME() {
- return messageFactory.getMessage("servlet.warning.duplicateEndpointName");
- }
-
- /**
- * WSSERVLET17: duplicate endpoint name
- *
- */
- public static String SERVLET_WARNING_DUPLICATE_ENDPOINT_NAME() {
- return localizer.localize(localizableSERVLET_WARNING_DUPLICATE_ENDPOINT_NAME());
- }
-
- public static Localizable localizableTRACE_SERVLET_REQUEST_FOR_PORT_NAMED(Object arg0) {
- return messageFactory.getMessage("trace.servlet.requestForPortNamed", arg0);
- }
-
- /**
- * WSSERVLET58: got request for port: {0}
- *
- */
- public static String TRACE_SERVLET_REQUEST_FOR_PORT_NAMED(Object arg0) {
- return localizer.localize(localizableTRACE_SERVLET_REQUEST_FOR_PORT_NAMED(arg0));
- }
-
- public static Localizable localizableSERVLET_NO_ADDRESS_AVAILABLE(Object arg0) {
- return messageFactory.getMessage("servlet.no.address.available", arg0);
- }
-
- /**
- * No address is available for {0}
- *
- */
- public static String SERVLET_NO_ADDRESS_AVAILABLE(Object arg0) {
- return localizer.localize(localizableSERVLET_NO_ADDRESS_AVAILABLE(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java
deleted file mode 100644
index 9069f9fe..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.resources;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-
-
-/**
- * Defines string formatting method for each constant in the resource file
- *
- */
-public final class XmlmessageMessages {
-
- private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.xmlmessage");
- private final static Localizer localizer = new Localizer();
-
- public static Localizable localizableXML_NULL_HEADERS() {
- return messageFactory.getMessage("xml.null.headers");
- }
-
- /**
- * Invalid argument. MimeHeaders=null
- *
- */
- public static String XML_NULL_HEADERS() {
- return localizer.localize(localizableXML_NULL_HEADERS());
- }
-
- public static Localizable localizableXML_SET_PAYLOAD_ERR() {
- return messageFactory.getMessage("xml.set.payload.err");
- }
-
- /**
- * Couldn't set Payload in XMLMessage
- *
- */
- public static String XML_SET_PAYLOAD_ERR() {
- return localizer.localize(localizableXML_SET_PAYLOAD_ERR());
- }
-
- public static Localizable localizableXML_CONTENT_TYPE_MUSTBE_MULTIPART() {
- return messageFactory.getMessage("xml.content-type.mustbe.multipart");
- }
-
- /**
- * Content-Type needs to be Multipart/Related and with type=text/xml
- *
- */
- public static String XML_CONTENT_TYPE_MUSTBE_MULTIPART() {
- return localizer.localize(localizableXML_CONTENT_TYPE_MUSTBE_MULTIPART());
- }
-
- public static Localizable localizableXML_UNKNOWN_CONTENT_TYPE() {
- return messageFactory.getMessage("xml.unknown.Content-Type");
- }
-
- /**
- * Unrecognized Content-Type
- *
- */
- public static String XML_UNKNOWN_CONTENT_TYPE() {
- return localizer.localize(localizableXML_UNKNOWN_CONTENT_TYPE());
- }
-
- public static Localizable localizableXML_GET_DS_ERR() {
- return messageFactory.getMessage("xml.get.ds.err");
- }
-
- /**
- * Couldn't get DataSource
- *
- */
- public static String XML_GET_DS_ERR() {
- return localizer.localize(localizableXML_GET_DS_ERR());
- }
-
- public static Localizable localizableXML_CONTENT_TYPE_PARSE_ERR() {
- return messageFactory.getMessage("xml.Content-Type.parse.err");
- }
-
- /**
- * Error while parsing MimeHeaders for Content-Type
- *
- */
- public static String XML_CONTENT_TYPE_PARSE_ERR() {
- return localizer.localize(localizableXML_CONTENT_TYPE_PARSE_ERR());
- }
-
- public static Localizable localizableXML_GET_SOURCE_ERR() {
- return messageFactory.getMessage("xml.get.source.err");
- }
-
- /**
- * Couldn't return Source
- *
- */
- public static String XML_GET_SOURCE_ERR() {
- return localizer.localize(localizableXML_GET_SOURCE_ERR());
- }
-
- public static Localizable localizableXML_CANNOT_INTERNALIZE_MESSAGE() {
- return messageFactory.getMessage("xml.cannot.internalize.message");
- }
-
- /**
- * Cannot create XMLMessage
- *
- */
- public static String XML_CANNOT_INTERNALIZE_MESSAGE() {
- return localizer.localize(localizableXML_CANNOT_INTERNALIZE_MESSAGE());
- }
-
- public static Localizable localizableXML_NO_CONTENT_TYPE() {
- return messageFactory.getMessage("xml.no.Content-Type");
- }
-
- /**
- * MimeHeaders doesn't contain Content-Type header
- *
- */
- public static String XML_NO_CONTENT_TYPE() {
- return localizer.localize(localizableXML_NO_CONTENT_TYPE());
- }
-
- public static Localizable localizableXML_ROOT_PART_INVALID_CONTENT_TYPE(Object arg0) {
- return messageFactory.getMessage("xml.root.part.invalid.Content-Type", arg0);
- }
-
- /**
- * Bad Content-Type for Root Part : {0}
- *
- */
- public static String XML_ROOT_PART_INVALID_CONTENT_TYPE(Object arg0) {
- return localizer.localize(localizableXML_ROOT_PART_INVALID_CONTENT_TYPE(arg0));
- }
-
- public static Localizable localizableXML_INVALID_CONTENT_TYPE(Object arg0) {
- return messageFactory.getMessage("xml.invalid.content-type", arg0);
- }
-
- /**
- * Invalid Content-Type: {0}
- *
- */
- public static String XML_INVALID_CONTENT_TYPE(Object arg0) {
- return localizer.localize(localizableXML_INVALID_CONTENT_TYPE(arg0));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing.properties
deleted file mode 100644
index 323b2b19..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing.properties
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wrong.addressing.version=Expected "{0}" version of WS-Addressing but found "{1}"
-replyTo.cannot.parse=ReplyTo header cannot be parsed
-faultTo.cannot.parse=FaultTo header cannot be parsed
-unknown.wsa.header=Unknown WS-Addressing header
-invalid.wsaw.anonymous=Invalid value obtained from wsaw:Anonymous: "{0}"
-wsaw.anonymousProhibited=Operation has "prohibited" value for wsaw:anonymous in the WSDL, \
- Addressing must be disabled and SOAP message need to be hand-crafted
-null.addressing.version=Unexpected null Addressing version
-null.soap.version=Unexpected null SOAP version
-# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText"
-wsdlBoundOperation.notFound=Cannot find an operation in wsdl:binding for "{0}"
-null.binding=Populating request Addressing headers and found null Binding
-null.wsdlPort=Populating request Addressing headers and found null WSDLPort
-null.packet=Populating request Addressing headers and found null Packet
-null.action=Populating request Addressing headers and found null Action
-null.message=Null message found when processing the server inbound request and WS-Addressing is required
-null.headers=No headers found when processing the server inbound request and WS-Addressing is required
-null.wsa.headers=No WS-Addressing headers found processing the server inbound request
-# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline
-addressing.notEnabled=Addressing is not enabled, {0} should not be included in the pipeline"
-addressing.should.be.enabled.=Addressing is not enabled
-validation.client.nullAction=Validating inbound Addressing headers on client and found null Action
-validation.server.nullAction=Validating inbound Addressing headers on server and found null Action
-
-nonAnonymous.response=Sending 202 and processing non-anonymous response
-nonAnonymous.unknown.protocol=Unknown protocol: "{0}"
-# {0} - URL
-nonAnonymous.response.sending=Sending non-anonymous reply to "{0}"
-nonAnonymous.response.nullHeaders=No response headers found in non-anonymous response from "{0}"
-# Usage not found. TODO Remove
-#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}"
-nonAnonymous.response.oneway=Ignoring non-anonymous response for one-way message
-
-invalid.addressing.header.exception=Invalid WS-Addressing header: "{0}",Reason: "{1}"
-action.not.supported.exception=Action: "{0}" not supported
-missing.header.exception=Missing WS-Addressing header: "{0}"
-non.unique.operation.signature=Operations in a port should have unique operation signature to successfuly identify a \
- associated wsdl operation for a message. WSDL operation {0} and {1} have the \
- same operation signature, wsa:Action "{2}" and request body block "{3}", Method dispatching may fail at runtime. \
- Use unique wsa:Action for each operation
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_de.properties
deleted file mode 100644
index 6acc1a2a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_de.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wrong.addressing.version=Version "{0}" von WS-Adressierung wurde erwartet, "{1}" wurde jedoch ermittelt
-replyTo.cannot.parse=ReplyTo-Header kann nicht geparst werden.
-faultTo.cannot.parse=FaultTo-Header kann nicht geparst werden.
-unknown.wsa.header=Unbekannter WS-Adressierungs-Header
-invalid.wsaw.anonymous=Ung\u00FCltiger Wert aus wsaw:Anonymous abgerufen: "{0}"
-wsaw.anonymousProhibited=Vorgang enth\u00E4lt nicht zugelassenen Wert f\u00FCr wsaw:anonymous in der WSDL, Adressierung muss deaktiviert werden, und SOAP-Nachricht muss manuell erstellt werden
-null.addressing.version=Nicht erwartete Nulladressierungsversion
-null.soap.version=Nicht erwartete Null-SOAP-Version
-# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText"
-wsdlBoundOperation.notFound=Es kann kein Vorgang in wsdl:binding f\u00FCr "{0}" gefunden werden
-null.binding=Anforderungsadressierungs-Header werden ausgef\u00FCllt und Null-Binding wurde ermittelt
-null.wsdlPort=Anforderungsadressierungs-Header werden ausgef\u00FCllt und Null-WSDLPort wurde ermittelt
-null.packet=Anforderungsadressierungs-Header werden ausgef\u00FCllt und Nullpaket wurde ermittelt
-null.action=Anforderungsadressierungs-Header werden ausgef\u00FCllt und Nullaktion wurde ermittelt
-null.message=Nullnachricht bei Verarbeitung der eingehenden Serveranforderung gefunden, w\u00E4hrend WS-Adressierung erforderlich ist
-null.headers=Bei Verarbeitung der eingehenden Serveranforderung wurden keine Header gefunden, w\u00E4hrend WS-Adressierung erforderlich ist
-null.wsa.headers=Bei der Verarbeitung der eingehenden Serveranforderung wurden keine WS-Adressierungs-Header gefunden
-# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline
-addressing.notEnabled=Adressierung ist nicht aktiviert, {0} sollte nicht in der Pipeline enthalten sein"
-addressing.should.be.enabled.=Adressierung ist nicht aktiviert
-validation.client.nullAction=Eingehende Adressierungs-Header werden auf Client validiert, dabei wurde Nullaktion ermittelt
-validation.server.nullAction=Eingehende Adressierungs-Header werden auf Server validiert, dabei wurde Nullaktion ermittelt
-
-nonAnonymous.response=202 wird gesendet und nicht-anonyme Antwort wird verarbeitet
-nonAnonymous.unknown.protocol=Unbekanntes Protokoll: "{0}"
-# {0} - URL
-nonAnonymous.response.sending=Nicht-anonyme Antwort wird an "{0}" gesendet
-nonAnonymous.response.nullHeaders=Keine Antwort-Header in nicht-anonymer Antwort von "{0}" gefunden
-# Usage not found. TODO Remove
-#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}"
-nonAnonymous.response.oneway=Nicht-anonyme Antwort wird bei unidirektionaler Nachricht ignoriert
-
-invalid.addressing.header.exception=Ung\u00FCltiger WS-Adressierungs-Header: "{0}", Ursache: "{1}"
-action.not.supported.exception=Aktion: "{0}" nicht unterst\u00FCtzt
-missing.header.exception=WS-Adressierungs-Header fehlt: "{0}"
-non.unique.operation.signature=Vorg\u00E4nge in einem Port m\u00FCssen eine eindeutige Vorgangssignatur enthalten, damit ein zugeh\u00F6riger WSDL-Vorgang f\u00FCr eine Nachricht erfolgreich identifiziert werden kann. WSDL-Vorg\u00E4nge {0} und {1} haben dieselbe Vorgangssignatur, dieselbe wsa:Action "{2}" und denselben Anforderungstextblock "{3}", Methodenverteilung verl\u00E4uft zur Laufzeit m\u00F6glicherweise nicht erfolgreich. Verwenden Sie eine eindeutige wsa:Action f\u00FCr jeden Vorgang
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_es.properties
deleted file mode 100644
index 54aced8a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_es.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wrong.addressing.version=Se esperaba la versi\u00F3n "{0}" de WS-Addressing, pero se ha encontrado "{1}"
-replyTo.cannot.parse=No se puede analizar la cabecera ReplyTo
-faultTo.cannot.parse=No se puede analizar la cabecera FaultTo
-unknown.wsa.header=Cabecera WS-Addressing desconocida
-invalid.wsaw.anonymous=Se ha obtenido un valor no v\u00E1lido de wsaw:Anonymous: "{0}"
-wsaw.anonymousProhibited=La operaci\u00F3n tiene un valor "prohibido" para wsaw:anonymous en el WSDL. Hay que desactivar Addressing y el mensaje de SOAP se tiene que tratar manualmente
-null.addressing.version=Versi\u00F3n de Addressing nula inesperada
-null.soap.version=Versi\u00F3n de SOAP nula inesperada
-# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText"
-wsdlBoundOperation.notFound=No se ha encontrado una operaci\u00F3n en wsdl:binding para "{0}"
-null.binding=Rellenando las cabeceras de Addressing de la solicitud y se ha encontrado un enlace nulo
-null.wsdlPort=Rellenando las cabeceras de Addressing de la solicitud y se ha encontrado un puerto WSDL nulo
-null.packet=Rellenando las cabeceras de Addressing de la solicitud y se ha encontrado un paquete nulo
-null.action=Rellenando las cabeceras de Addressing de la solicitud y se ha encontrado una acci\u00F3n nula
-null.message=Se ha encontrado un mensaje nulo al procesar la solicitud entrante del servidor y se necesita WS-Addressing
-null.headers=No se ha encontrado ninguna cabecera al procesar la solicitud entrante del servidor y se necesita WS-Addressing
-null.wsa.headers=No se ha encontrado ninguna cabecera de WS-Addressing al procesar la solicitud entrante del servidor
-# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline
-addressing.notEnabled=El direccionamiento no est\u00E1 activado; {0} no se debe incluir en el pipeline"
-addressing.should.be.enabled.=El direccionamiento no est\u00E1 activado
-validation.client.nullAction=Validando las cabeceras de Addressing entrantes en el cliente y se ha encontrado una acci\u00F3n nula
-validation.server.nullAction=Validando las cabeceras de Addressing entrantes en el servidor y se ha encontrado una acci\u00F3n nula
-
-nonAnonymous.response=Enviando 202 y procesando respuesta no an\u00F3nima
-nonAnonymous.unknown.protocol=Protocolo desconocido: "{0}"
-# {0} - URL
-nonAnonymous.response.sending=Enviando respuesta no an\u00F3nima a "{0}"
-nonAnonymous.response.nullHeaders=No se ha encontrado ninguna cabecera de respuesta en una respuesta no an\u00F3nima de "{0}"
-# Usage not found. TODO Remove
-#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}"
-nonAnonymous.response.oneway=Ignorando la respuesta no an\u00F3nima para el mensaje unidireccional
-
-invalid.addressing.header.exception=Cabecera de WS-Addressing no v\u00E1lida: "{0}", Motivo: "{1}"
-action.not.supported.exception=Acci\u00F3n: "{0}" no soportada
-missing.header.exception=Falta la cabecera de WS-Addressing: "{0}"
-non.unique.operation.signature=Las operaciones de un puerto deben tener una firma de operaci\u00F3n \u00FAnica para identificar correctamente una operaci\u00F3n WSDL asociada de un mensaje. La operaci\u00F3n WSDL {0} y {1} tienen la misma firma de operaci\u00F3n, wsa:Action "{2}" y bloque del cuerpo de solicitud "{3}". Puede que la distribuci\u00F3n del m\u00E9todo falle en tiempo de ejecuci\u00F3n. Utilice un elemento wsa:Action \u00FAnico para cada operaci\u00F3n
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_fr.properties
deleted file mode 100644
index d50bdc40..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_fr.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wrong.addressing.version=Version "{0}" de WS-Addressing attendue, mais "{1}" trouv\u00E9e
-replyTo.cannot.parse=L'en-t\u00EAte ReplyTo ne peut pas \u00EAtre analys\u00E9
-faultTo.cannot.parse=L'en-t\u00EAte FaultTo ne peut pas \u00EAtre analys\u00E9
-unknown.wsa.header=En-t\u00EAte WS-Addressing inconnu
-invalid.wsaw.anonymous=Valeur non valide obtenue \u00E0 partir de wsaw:Anonymous : "{0}"
-wsaw.anonymousProhibited=L'op\u00E9ration a "interdit" la valeur pour wsaw:anonymous dans le WSDL, l'adressage doit \u00EAtre d\u00E9sactiv\u00E9 et le message SOAP doit \u00EAtre con\u00E7u manuellement
-null.addressing.version=Version d'adressage NULL inattendue
-null.soap.version=Version SOAP NULL inattendue
-# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText"
-wsdlBoundOperation.notFound=Op\u00E9ration introuvable dans wsdl:binding pour "{0}"
-null.binding=Remplissage des en-t\u00EAtes d'adressage de demande et binding NULL trouv\u00E9
-null.wsdlPort=Remplissage des en-t\u00EAtes d'adressage de la demande et WSDLPort NULL trouv\u00E9
-null.packet=Remplissage des en-t\u00EAtes d'adressage de demande et paquet NULL trouv\u00E9
-null.action=Remplissage des en-t\u00EAtes d'adressage de demande et action NULL trouv\u00E9e
-null.message=Message NULL trouv\u00E9 lors du traitement de la demande entrante du serveur et WS-Addressing requis
-null.headers=Aucun en-t\u00EAte trouv\u00E9 lors du traitement de la demande entrante du serveur et WS-Addressing requis
-null.wsa.headers=Aucun en-t\u00EAte WS-Addressing trouv\u00E9 lors du traitement de la demande entrante du serveur
-# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline
-addressing.notEnabled=L''adressage n''est pas activ\u00E9, {0} ne doit pas \u00EAtre inclus dans le pipeline"
-addressing.should.be.enabled.=L'adressage n'est pas activ\u00E9
-validation.client.nullAction=Validation des en-t\u00EAtes d'adressage entrant sur le client et action NULL trouv\u00E9e
-validation.server.nullAction=Validation des en-t\u00EAtes d'adressage entrant sur le serveur et action NULL trouv\u00E9e
-
-nonAnonymous.response=Envoi de 202 et traitement de la r\u00E9ponse non anonyme
-nonAnonymous.unknown.protocol=Protocole inconnu : "{0}"
-# {0} - URL
-nonAnonymous.response.sending=Envoi de la r\u00E9ponse non anonyme \u00E0 "{0}"
-nonAnonymous.response.nullHeaders=Aucun en-t\u00EAte de r\u00E9ponse trouv\u00E9 dans la r\u00E9ponse non anonyme \u00E0 partir de "{0}"
-# Usage not found. TODO Remove
-#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}"
-nonAnonymous.response.oneway=Non-prise en compte de la r\u00E9ponse non anonyme pour le message unidirectionnel
-
-invalid.addressing.header.exception=En-t\u00EAte WS-Addressing non valide : "{0}", raison : "{1}"
-action.not.supported.exception=Action "{0}" non prise en charge
-missing.header.exception=En-t\u00EAte WS-Addressing manquant : "{0}"
-non.unique.operation.signature=Les op\u00E9rations d''un port doivent comporter une signature d''op\u00E9ration unique pour identifier une op\u00E9ration WSDL associ\u00E9e pour un message. Les op\u00E9rations WSDL {0} et {1} ont les m\u00EAmes signature d''op\u00E9ration wsa:Action "{2}" et bloc de corps de demande "{3}". Echec possible de la r\u00E9partition de m\u00E9thode lors de l''ex\u00E9cution. Utilisez une signature wsa:Action unique pour chaque op\u00E9ration
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_it.properties
deleted file mode 100644
index f585de85..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_it.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wrong.addressing.version=Prevista la versione "{0}" di WS-Addressing ma \u00E8 stata trovata "{1}"
-replyTo.cannot.parse=Impossibile analizzare l'intestazione ReplyTo
-faultTo.cannot.parse=Impossibile analizzare l'intestazione FaultTo
-unknown.wsa.header=Intestazione WS-Addressing sconosciuta
-invalid.wsaw.anonymous=Valore non valido ottenuto da wsaw:Anonymous: "{0}"
-wsaw.anonymousProhibited=L'operazione ha un valore "vietato" per wsaw:anonymous in WSDL, \u00E8 necessario disabilitare l'indirizzamento e generare manualmente il messaggio SOAP
-null.addressing.version=Versione Addressing nulla non prevista
-null.soap.version=Versione SOAP nulla non prevista
-# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText"
-wsdlBoundOperation.notFound=Impossibile trovare un''operazione in wsdl:binding per "{0}"
-null.binding=\u00C8 in corso l'inserimento dei dati nelle intestazioni di indirizzamento delle richieste ed \u00E8 stata trovata una Binding nulla
-null.wsdlPort=\u00C8 in corso l'inserimento dei dati nelle intestazioni di indirizzamento delle richieste ed \u00E8 stata trovata una WSDLPort nulla
-null.packet=\u00C8 in corso l'inserimento dei dati nelle intestazioni di indirizzamento delle richieste ed \u00E8 stato trovato un Package nullo
-null.action=\u00C8 in corso l'inserimento dei dati nelle intestazioni di indirizzamento delle richieste ed \u00E8 stata trovata una Action nulla
-null.message=Nessun messaggio trovato durante l'elaborazione della richiesta in entrata del server ed \u00E8 richiesto WS-Addressing
-null.headers=Nessuna intestazione trovata durante l'elaborazione della richiesta in entrata del server ed \u00E8 richiesto WS-Addressing
-null.wsa.headers=Nessuna intestazione WS-Addressing trovata durante l'elaborazione della richiesta in entrata del server
-# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline
-addressing.notEnabled=Indirizzamento non abilitato. {0} non deve essere incluso nella pipeline"
-addressing.should.be.enabled.=Indirizzamento non abilitato
-validation.client.nullAction=\u00C8 in corso la convalida delle intestazioni di indirizzamento in entrata sul client ed \u00E8 stata trovata una Action nulla
-validation.server.nullAction=\u00C8 in corso la convalida delle intestazioni di indirizzamento in entrata sul server ed \u00E8 stata trovata una Action nulla
-
-nonAnonymous.response=\u00C8 in corso l'invio di 202 e l'elaborazione della risposta non anonima
-nonAnonymous.unknown.protocol=Protocollo sconosciuto: "{0}"
-# {0} - URL
-nonAnonymous.response.sending=\u00C8 in corso l''invio della risposta non anonima a "{0}"
-nonAnonymous.response.nullHeaders=Nessuna intestazione di risposta trovata nella risposta non anonima da "{0}"
-# Usage not found. TODO Remove
-#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}"
-nonAnonymous.response.oneway=La risposta non anonima per un messaggio unidirezionale verr\u00E0 ignorata
-
-invalid.addressing.header.exception=Intestazione WS-Addressing non valida: "{0}". Motivo: "{1}"
-action.not.supported.exception=Azione: "{0}" non supportata
-missing.header.exception=Intestazione WS-Addressing mancante: "{0}"
-non.unique.operation.signature=Le operazioni in una porta devono avere una firma dell''operazione univoca affinch\u00E9 l''identificazione di un''operazione WSDL associata per un messaggio riesca. Le operazioni WSDL {0} e {1} hanno la stessa firma dell''operazione, wsa:Action "{2}", e blocco del corpo della richiesta "{3}". \u00C8 possibile che il metodo di spedizione non riesca in fase di esecuzione. Usare una wsa:Action univoca per ogni operazione
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ja.properties
deleted file mode 100644
index 6b4ca72a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ja.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wrong.addressing.version=WS-Addressing\u306E\u30D0\u30FC\u30B8\u30E7\u30F3"{0}"\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001"{1}"\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-replyTo.cannot.parse=ReplyTo\u30D8\u30C3\u30C0\u30FC\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093
-faultTo.cannot.parse=FaultTo\u30D8\u30C3\u30C0\u30FC\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093
-unknown.wsa.header=\u4E0D\u660E\u306AWS-Addressing\u30D8\u30C3\u30C0\u30FC
-invalid.wsaw.anonymous=wsaw:Anonymous\u304B\u3089\u7121\u52B9\u306A\u5024\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F: "{0}"
-wsaw.anonymousProhibited=WSDL\u306Ewsaw:anonymous\u3067\u64CD\u4F5C\u306B"\u7981\u6B62\u3055\u308C\u305F"\u5024\u304C\u542B\u307E\u308C\u307E\u3059\u3002\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u3092\u7121\u52B9\u306B\u3057\u3001SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u306F\u624B\u52D5\u3067\u4F5C\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-null.addressing.version=\u4E88\u671F\u3057\u306A\u3044null\u306E\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u30D0\u30FC\u30B8\u30E7\u30F3
-null.soap.version=\u4E88\u671F\u3057\u306A\u3044null\u306ESOAP\u30D0\u30FC\u30B8\u30E7\u30F3
-# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText"
-wsdlBoundOperation.notFound="{0}"\u306B\u3064\u3044\u3066wsdl:binding\u306B\u64CD\u4F5C\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-null.binding=\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u30D8\u30C3\u30C0\u30FC\u306E\u79FB\u5165\u4E2D\u306Bnull\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-null.wsdlPort=\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u30D8\u30C3\u30C0\u30FC\u306E\u79FB\u5165\u4E2D\u306Bnull\u306EWSDLPort\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-null.packet=\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u30D8\u30C3\u30C0\u30FC\u306E\u79FB\u5165\u4E2D\u306Bnull\u306E\u30D1\u30B1\u30C3\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-null.action=\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u30D8\u30C3\u30C0\u30FC\u306E\u79FB\u5165\u4E2D\u306Bnull\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-null.message=\u30B5\u30FC\u30D0\u30FC\u30FB\u30A4\u30F3\u30D0\u30A6\u30F3\u30C9\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u51E6\u7406\u4E2D\u306BNull\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002WS-Addressing\u304C\u5FC5\u8981\u3067\u3059
-null.headers=\u30B5\u30FC\u30D0\u30FC\u30FB\u30A4\u30F3\u30D0\u30A6\u30F3\u30C9\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u51E6\u7406\u4E2D\u306B\u30D8\u30C3\u30C0\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002WS-Addressing\u304C\u5FC5\u8981\u3067\u3059
-null.wsa.headers=\u30B5\u30FC\u30D0\u30FC\u30FB\u30A4\u30F3\u30D0\u30A6\u30F3\u30C9\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u51E6\u7406\u4E2D\u306BWS-Addressing\u30D8\u30C3\u30C0\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F
-# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline
-addressing.notEnabled=\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u305B\u3093\u3002{0}\u3092\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u306B\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"
-addressing.should.be.enabled.=\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u305B\u3093
-validation.client.nullAction=\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3067\u30A4\u30F3\u30D0\u30A6\u30F3\u30C9\u30FB\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u30D8\u30C3\u30C0\u30FC\u306E\u691C\u8A3C\u4E2D\u306B\u3001null\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-validation.server.nullAction=\u30B5\u30FC\u30D0\u30FC\u3067\u30A4\u30F3\u30D0\u30A6\u30F3\u30C9\u30FB\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u30D8\u30C3\u30C0\u30FC\u306E\u691C\u8A3C\u4E2D\u306B\u3001null\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-
-nonAnonymous.response=202\u3092\u9001\u4FE1\u3057\u3001\u975E\u533F\u540D\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u51E6\u7406\u3057\u3066\u3044\u307E\u3059
-nonAnonymous.unknown.protocol=\u4E0D\u660E\u306A\u30D7\u30ED\u30C8\u30B3\u30EB: "{0}"
-# {0} - URL
-nonAnonymous.response.sending=\u975E\u533F\u540D\u5FDC\u7B54\u3092"{0}"\u306B\u9001\u4FE1\u3057\u3066\u3044\u307E\u3059
-nonAnonymous.response.nullHeaders="{0}"\u304B\u3089\u306E\u975E\u533F\u540D\u30EC\u30B9\u30DD\u30F3\u30B9\u306B\u30EC\u30B9\u30DD\u30F3\u30B9\u30FB\u30D8\u30C3\u30C0\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-# Usage not found. TODO Remove
-#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}"
-nonAnonymous.response.oneway=\u4E00\u65B9\u5411\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3067\u306F\u975E\u533F\u540D\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u7121\u8996\u3057\u307E\u3059
-
-invalid.addressing.header.exception=\u7121\u52B9\u306AWS-Addressing\u30D8\u30C3\u30C0\u30FC: "{0}"\u3001\u7406\u7531: "{1}"
-action.not.supported.exception=\u30A2\u30AF\u30B7\u30E7\u30F3: "{0}"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-missing.header.exception=WS-Addressing\u30D8\u30C3\u30C0\u30FC\u304C\u3042\u308A\u307E\u305B\u3093: "{0}"
-non.unique.operation.signature=\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u95A2\u9023\u4ED8\u3051\u3089\u308C\u305FWSDL\u64CD\u4F5C\u3092\u6B63\u5E38\u306B\u8B58\u5225\u3059\u308B\u305F\u3081\u306B\u3001\u30DD\u30FC\u30C8\u306E\u64CD\u4F5C\u306B\u306F\u4E00\u610F\u306E\u64CD\u4F5C\u7F72\u540D\u304C\u5FC5\u8981\u3067\u3059\u3002WSDL\u64CD\u4F5C{0}\u304A\u3088\u3073{1}\u306B\u306F\u540C\u4E00\u306E\u64CD\u4F5C\u7F72\u540D(wsa:Action "{2}"\u304A\u3088\u3073\u30EA\u30AF\u30A8\u30B9\u30C8\u672C\u6587\u30D6\u30ED\u30C3\u30AF"{3}")\u304C\u3042\u308A\u3001\u5B9F\u884C\u6642\u306B\u30E1\u30BD\u30C3\u30C9\u306E\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u306B\u5931\u6557\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u64CD\u4F5C\u3054\u3068\u306B\u4E00\u610F\u306Ewsa:Action\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ko.properties
deleted file mode 100644
index ffc10b3f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ko.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wrong.addressing.version=WS-Addressing\uC758 "{0}" \uBC84\uC804\uC774 \uD544\uC694\uD558\uC9C0\uB9CC "{1}"\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-replyTo.cannot.parse=ReplyTo \uD5E4\uB354\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-faultTo.cannot.parse=FaultTo \uD5E4\uB354\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-unknown.wsa.header=\uC54C \uC218 \uC5C6\uB294 WS-Addressing \uD5E4\uB354
-invalid.wsaw.anonymous=wsaw:Anonymous\uC5D0\uC11C \uBD80\uC801\uD569\uD55C \uAC12\uC774 \uD655\uC778\uB428: "{0}"
-wsaw.anonymousProhibited=\uC791\uC5C5\uC5D0\uC11C WSDL\uC758 wsaw:anonymous\uC5D0 \uB300\uD55C \uAC12\uC744 "\uAE08\uC9C0"\uD588\uC2B5\uB2C8\uB2E4. Addressing\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD558\uACE0 SOAP \uBA54\uC2DC\uC9C0\uB97C \uC218\uB3D9\uC73C\uB85C \uCC98\uB9AC\uD574\uC57C \uD569\uB2C8\uB2E4.
-null.addressing.version=\uC608\uC0C1\uCE58 \uC54A\uC740 \uB110 Addressing \uBC84\uC804
-null.soap.version=\uC608\uC0C1\uCE58 \uC54A\uC740 \uB110 SOAP \uBC84\uC804
-# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText"
-wsdlBoundOperation.notFound="{0}"\uC5D0 \uB300\uD55C wsdl:binding\uC5D0\uC11C \uC791\uC5C5\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-null.binding=\uC694\uCCAD Addressing \uD5E4\uB354 \uBC0F \uBC1C\uACAC\uB41C \uB110 \uBC14\uC778\uB529\uC744 \uCC44\uC6B0\uB294 \uC911
-null.wsdlPort=\uC694\uCCAD Addressing \uD5E4\uB354 \uBC0F \uBC1C\uACAC\uB41C \uB110 WSDLPort\uB97C \uCC44\uC6B0\uB294 \uC911
-null.packet=\uC694\uCCAD Addressing \uD5E4\uB354 \uBC0F \uBC1C\uACAC\uB41C \uB110 \uD328\uD0B7\uC744 \uCC44\uC6B0\uB294 \uC911
-null.action=\uC694\uCCAD Addressing \uD5E4\uB354 \uBC0F \uBC1C\uACAC\uB41C \uB110 \uC791\uC5C5\uC744 \uCC44\uC6B0\uB294 \uC911
-null.message=\uC11C\uBC84 \uC778\uBC14\uC6B4\uB4DC \uC694\uCCAD \uBC0F WS-Addressing \uCC98\uB9AC\uAC00 \uD544\uC694\uD560 \uB54C \uB110 \uBA54\uC2DC\uC9C0\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-null.headers=\uC11C\uBC84 \uC778\uBC14\uC6B4\uB4DC \uC694\uCCAD \uBC0F WS-Addressing \uCC98\uB9AC\uAC00 \uD544\uC694\uD560 \uB54C \uD5E4\uB354\uB97C \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.
-null.wsa.headers=\uC11C\uBC84 \uC778\uBC14\uC6B4\uB4DC \uC694\uCCAD\uC744 \uCC98\uB9AC\uD558\uB294 \uC911 WS-Addressing \uD5E4\uB354\uB97C \uCC3E\uC9C0 \uBABB\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.
-# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline
-addressing.notEnabled=Addressing\uC774 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. {0}\uC774(\uAC00) \uD30C\uC774\uD504\uB77C\uC778\uC5D0 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-addressing.should.be.enabled.=Addressing\uC774 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-validation.client.nullAction=\uD074\uB77C\uC774\uC5B8\uD2B8\uCE21 \uC778\uBC14\uC6B4\uB4DC Addressing \uD5E4\uB354 \uBC0F \uBC1C\uACAC\uB41C \uB110 \uC791\uC5C5\uC744 \uAC80\uC99D\uD558\uB294 \uC911
-validation.server.nullAction=\uC11C\uBC84\uCE21 \uC778\uBC14\uC6B4\uB4DC Addressing \uD5E4\uB354 \uBC0F \uBC1C\uACAC\uB41C \uB110 \uC791\uC5C5\uC744 \uAC80\uC99D\uD558\uB294 \uC911
-
-nonAnonymous.response=202\uB97C \uC804\uC1A1\uD558\uACE0 \uBE44\uC775\uBA85 \uC751\uB2F5\uC744 \uCC98\uB9AC\uD558\uB294 \uC911
-nonAnonymous.unknown.protocol=\uC54C \uC218 \uC5C6\uB294 \uD504\uB85C\uD1A0\uCF5C: "{0}"
-# {0} - URL
-nonAnonymous.response.sending="{0}"(\uC73C)\uB85C \uBE44\uC775\uBA85 \uD68C\uC2E0\uC744 \uC804\uC1A1\uD558\uB294 \uC911
-nonAnonymous.response.nullHeaders="{0}"\uC758 \uBE44\uC775\uBA85 \uC751\uB2F5\uC5D0\uC11C \uC751\uB2F5 \uD5E4\uB354\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-# Usage not found. TODO Remove
-#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}"
-nonAnonymous.response.oneway=\uB2E8\uBC29\uD5A5 \uBA54\uC2DC\uC9C0\uC5D0 \uB300\uD55C \uBE44\uC775\uBA85 \uC751\uB2F5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911
-
-invalid.addressing.header.exception=\uBD80\uC801\uD569\uD55C WS-Addressing \uD5E4\uB354: "{0}", \uC6D0\uC778: "{1}"
-action.not.supported.exception="{0}" \uC791\uC5C5\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-missing.header.exception=WS-Addressing \uD5E4\uB354\uAC00 \uB204\uB77D\uB428: "{0}"
-non.unique.operation.signature=\uBA54\uC2DC\uC9C0\uC5D0 \uB300\uD574 \uC5F0\uAD00\uB41C WSDL\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uC2DD\uBCC4\uD558\uB824\uBA74 \uD3EC\uD2B8\uC758 \uC791\uC5C5\uC5D0 \uACE0\uC720\uD55C \uC791\uC5C5 \uC11C\uBA85\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. WSDL \uC791\uC5C5 {0}\uACFC(\uC640) {1}\uC758 \uC791\uC5C5 \uC11C\uBA85, wsa:Action "{2}" \uBC0F \uC694\uCCAD \uBCF8\uBB38 \uBE14\uB85D "{3}"\uC774(\uAC00) \uB3D9\uC77C\uD558\uC5EC \uB7F0\uD0C0\uC784 \uC2DC \uBA54\uC18C\uB4DC \uC791\uC5C5 \uD560\uB2F9\uC744 \uC2E4\uD328\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uAC01 \uC791\uC5C5\uC5D0 \uACE0\uC720\uD55C wsa:Action\uC744 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_pt_BR.properties
deleted file mode 100644
index f933acbc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_pt_BR.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wrong.addressing.version=Vers\u00E3o "{0}" esperada do Endere\u00E7amento WS, mas encontrou "{1}"
-replyTo.cannot.parse=O cabe\u00E7alho ReplyTo n\u00E3o pode ser submetido a parse
-faultTo.cannot.parse=O cabe\u00E7alho FaultTo n\u00E3o pode ser submetido a parse
-unknown.wsa.header=Cabe\u00E7alho de Endere\u00E7amento WS desconhecido
-invalid.wsaw.anonymous=Valor inv\u00E1lido obtido de wsaw:Anonymous: "{0}"
-wsaw.anonymousProhibited=A opera\u00E7\u00E3o tem valor "proibido" para wsaw:anonymous no WSDL. O endere\u00E7amento deve ser desativado e a mensagem SOAP precisa ser feita manualmente
-null.addressing.version=Vers\u00E3o de Endere\u00E7amento nulo esperada
-null.soap.version=Vers\u00E3o de SOAP nula inesperada
-# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText"
-wsdlBoundOperation.notFound=N\u00E3o \u00E9 poss\u00EDvel localizar uma opera\u00E7\u00E3o no wsdl:binding para "{0}"
-null.binding=Preenchendo cabe\u00E7alhos de Endere\u00E7amento da solicita\u00E7\u00E3o e encontrou Bind nulo
-null.wsdlPort=Preenchendo cabe\u00E7alhos de Endere\u00E7amento da solicita\u00E7\u00E3o e encontrou WSDLPort nulo
-null.packet=Preenchendo cabe\u00E7alhos de Endere\u00E7amento da solicita\u00E7\u00E3o e encontrou Pacote nulo
-null.action=Preenchendo cabe\u00E7alhos de Endere\u00E7amento da solicita\u00E7\u00E3o e encontrou A\u00E7\u00E3o nula
-null.message=Mensagem nula encontrada ao processar a solicita\u00E7\u00E3o de entrada do servidor e o Endere\u00E7amento WS \u00E9 necess\u00E1rio
-null.headers=Nenhum cabe\u00E7alho encontrado ao processar a solicita\u00E7\u00E3o de entrada do servidor e o Endere\u00E7amento WS \u00E9 necess\u00E1rio
-null.wsa.headers=Nenhum cabe\u00E7alho de Endere\u00E7amento de WS encontrado ao processar a solicita\u00E7\u00E3o de entrada do servidor
-# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline
-addressing.notEnabled=O endere\u00E7amento n\u00E3o est\u00E1 ativado; {0} n\u00E3o deve ser inclu\u00EDdo no pipeline"
-addressing.should.be.enabled.=O endere\u00E7amento n\u00E3o foi ativado
-validation.client.nullAction=Validando cabe\u00E7alhos de Endere\u00E7amento de entrada no cliente e encontrou A\u00E7\u00E3o nula
-validation.server.nullAction=Validando cabe\u00E7alhos de Endere\u00E7amento de entrada no servidor e encontrou A\u00E7\u00E3o nula
-
-nonAnonymous.response=Enviando 202 e processando resposta n\u00E3o an\u00F4nima
-nonAnonymous.unknown.protocol=Protocolo desconhecido: "{0}"
-# {0} - URL
-nonAnonymous.response.sending=Enviando resposta n\u00E3o an\u00F4nima para "{0}"
-nonAnonymous.response.nullHeaders=Nenhum cabe\u00E7alho de resposta encontrado na resposta n\u00E3o an\u00F4nima de "{0}"
-# Usage not found. TODO Remove
-#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}"
-nonAnonymous.response.oneway=Ignorando resposta n\u00E3o an\u00F4nima de uma mensagem unidirecional
-
-invalid.addressing.header.exception=Cabe\u00E7alho de Endere\u00E7amento WS inv\u00E1lido: "{0}", Motivo: "{1}"
-action.not.supported.exception=A\u00E7\u00E3o: "{0}" n\u00E3o suportada
-missing.header.exception=Cabe\u00E7alho de Endere\u00E7amento WS n\u00E3o encontrado: "{0}"
-non.unique.operation.signature=As opera\u00E7\u00F5es em uma porta devem ter assinatura de opera\u00E7\u00E3o exclusiva para identificar uma opera\u00E7\u00E3o wsdl associada a uma mensagem. A opera\u00E7\u00E3o WSDL {0} e {1} t\u00EAm a mesma assinatura da opera\u00E7\u00E3o, wsa:Action "{2}" e bloco de corpo da solicita\u00E7\u00E3o "{3}". O despacho do m\u00E9todo pode falhar no runtime. Use wsa:Action exclusivo para cada opera\u00E7\u00E3o
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_CN.properties
deleted file mode 100644
index 9ce4f5bc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_CN.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wrong.addressing.version=WS-Addressing \u7684\u7248\u672C\u5E94\u4E3A "{0}", \u4F46\u627E\u5230\u7684\u662F "{1}"
-replyTo.cannot.parse=\u65E0\u6CD5\u89E3\u6790 ReplyTo \u6807\u5934
-faultTo.cannot.parse=\u65E0\u6CD5\u89E3\u6790 FaultTo \u6807\u5934
-unknown.wsa.header=\u672A\u77E5\u7684 WS-Addressing \u6807\u5934
-invalid.wsaw.anonymous=\u4ECE wsaw:Anonymous \u83B7\u53D6\u7684\u503C\u65E0\u6548: "{0}"
-wsaw.anonymousProhibited=\u5BF9\u4E8E WSDL \u4E2D\u7684 wsaw:anonymous, \u64CD\u4F5C\u7684\u503C\u4E3A "\u7981\u6B62", \u5FC5\u987B\u7981\u7528\u5BFB\u5740\u5E76\u9700\u8981\u624B\u52A8\u751F\u6210 SOAP \u6D88\u606F
-null.addressing.version=\u610F\u5916\u7684\u7A7A\u5BFB\u5740\u7248\u672C
-null.soap.version=\u610F\u5916\u7684\u7A7A SOAP \u7248\u672C
-# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText"
-wsdlBoundOperation.notFound=\u5728 "{0}" \u7684 wsdl:binding \u4E2D\u627E\u4E0D\u5230\u64CD\u4F5C
-null.binding=\u6B63\u5728\u586B\u5145\u8BF7\u6C42\u5BFB\u5740\u6807\u5934, \u627E\u5230\u7A7A\u7ED1\u5B9A
-null.wsdlPort=\u6B63\u5728\u586B\u5145\u8BF7\u6C42\u5BFB\u5740\u6807\u5934, \u627E\u5230\u7A7A WSDLPort
-null.packet=\u6B63\u5728\u586B\u5145\u8BF7\u6C42\u5BFB\u5740\u6807\u5934, \u627E\u5230\u7A7A\u6570\u636E\u5305
-null.action=\u6B63\u5728\u586B\u5145\u8BF7\u6C42\u5BFB\u5740\u6807\u5934, \u627E\u5230\u7A7A\u64CD\u4F5C
-null.message=\u5904\u7406\u670D\u52A1\u5668\u5165\u7AD9\u8BF7\u6C42\u65F6\u53D1\u73B0\u7A7A\u6D88\u606F, \u9700\u8981 WS-Addressing
-null.headers=\u5904\u7406\u670D\u52A1\u5668\u5165\u7AD9\u8BF7\u6C42\u65F6\u627E\u4E0D\u5230\u6807\u5934, \u9700\u8981 WS-Addressing
-null.wsa.headers=\u5904\u7406\u670D\u52A1\u5668\u5165\u7AD9\u8BF7\u6C42\u65F6\u627E\u4E0D\u5230 WS-Addressing \u6807\u5934
-# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline
-addressing.notEnabled=\u672A\u542F\u7528\u5BFB\u5740, {0} \u4E0D\u5E94\u5305\u542B\u5728\u7BA1\u9053\u4E2D"
-addressing.should.be.enabled.=\u672A\u542F\u7528\u5BFB\u5740
-validation.client.nullAction=\u6B63\u5728\u9A8C\u8BC1\u5BA2\u6237\u673A\u4E0A\u7684\u5165\u7AD9\u5BFB\u5740\u6807\u5934, \u627E\u5230\u7A7A\u64CD\u4F5C
-validation.server.nullAction=\u6B63\u5728\u9A8C\u8BC1\u670D\u52A1\u5668\u4E0A\u7684\u5165\u7AD9\u5BFB\u5740\u6807\u5934, \u627E\u5230\u7A7A\u64CD\u4F5C
-
-nonAnonymous.response=\u53D1\u9001 202 \u5E76\u5904\u7406\u975E\u533F\u540D\u54CD\u5E94
-nonAnonymous.unknown.protocol=\u672A\u77E5\u534F\u8BAE: "{0}"
-# {0} - URL
-nonAnonymous.response.sending=\u5C06\u975E\u533F\u540D\u56DE\u590D\u53D1\u9001\u5230 "{0}"
-nonAnonymous.response.nullHeaders=\u5728\u6765\u81EA "{0}" \u7684\u975E\u533F\u540D\u54CD\u5E94\u4E2D\u627E\u4E0D\u5230\u54CD\u5E94\u6807\u5934
-# Usage not found. TODO Remove
-#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}"
-nonAnonymous.response.oneway=\u5FFD\u7565\u5355\u5411\u6D88\u606F\u7684\u975E\u533F\u540D\u54CD\u5E94
-
-invalid.addressing.header.exception=WS-Addressing \u6807\u5934\u65E0\u6548: "{0}", \u539F\u56E0: "{1}"
-action.not.supported.exception=\u4E0D\u652F\u6301\u64CD\u4F5C "{0}"
-missing.header.exception=\u7F3A\u5C11 WS-Addressing \u6807\u5934: "{0}"
-non.unique.operation.signature=\u7AEF\u53E3\u4E2D\u7684\u64CD\u4F5C\u5E94\u5177\u6709\u552F\u4E00\u64CD\u4F5C\u7B7E\u540D, \u4EE5\u6210\u529F\u6807\u8BC6\u6D88\u606F\u7684\u5173\u8054 wsdl \u64CD\u4F5C\u3002WSDL \u64CD\u4F5C{0}\u548C{1}\u5177\u6709\u76F8\u540C\u7684\u64CD\u4F5C\u7B7E\u540D, wsa:Action "{2}" \u548C\u8BF7\u6C42\u4E3B\u4F53\u5757 "{3}", \u65B9\u6CD5\u5206\u6D3E\u5728\u8FD0\u884C\u65F6\u53EF\u80FD\u5931\u8D25\u3002\u8BF7\u5BF9\u6BCF\u4E2A\u64CD\u4F5C\u4F7F\u7528\u552F\u4E00\u7684 wsa:Action
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_TW.properties
deleted file mode 100644
index 01dbc01c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_TW.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-wrong.addressing.version=\u9810\u671F\u70BA "{0}" \u7248\u672C\u7684 Web \u670D\u52D9\u5B9A\u5740, \u4F46\u627E\u5230 "{1}"
-replyTo.cannot.parse=\u7121\u6CD5\u5256\u6790 ReplyTo \u6A19\u982D
-faultTo.cannot.parse=\u7121\u6CD5\u5256\u6790 FaultTo \u6A19\u982D
-unknown.wsa.header=\u4E0D\u660E\u7684 Web \u670D\u52D9\u5B9A\u5740\u6A19\u982D
-invalid.wsaw.anonymous=\u5F9E wsaw:Anonymous \u53D6\u5F97\u7684\u503C\u7121\u6548: "{0}"
-wsaw.anonymousProhibited=\u4F5C\u696D\u5DF2\u7981\u6B62 WSDL \u4E2D\u7684 wsaw:anonymous \u503C, \u5FC5\u9808\u505C\u7528\u5B9A\u5740, \u4E26\u4E14\u5FC5\u9808\u81EA\u8A02 SOAP \u8A0A\u606F
-null.addressing.version=\u672A\u9810\u671F\u7684\u7A7A\u503C\u5B9A\u5740\u7248\u672C
-null.soap.version=\u672A\u9810\u671F\u7684\u7A7A\u503C SOAP \u7248\u672C
-# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText"
-wsdlBoundOperation.notFound=\u5728 "{0}" \u7684 wsdl:binding \u4E2D\u627E\u4E0D\u5230\u4F5C\u696D
-null.binding=\u586B\u5165\u8981\u6C42\u5B9A\u5740\u6A19\u982D, \u4F46\u767C\u73FE\u7A7A\u503C\u7684 Binding
-null.wsdlPort=\u586B\u5165\u8981\u6C42\u5B9A\u5740\u6A19\u982D, \u4F46\u767C\u73FE\u7A7A\u503C\u7684 WSDLPort
-null.packet=\u586B\u5165\u8981\u6C42\u5B9A\u5740\u6A19\u982D, \u4F46\u767C\u73FE\u7A7A\u503C\u7684 Packet
-null.action=\u586B\u5165\u8981\u6C42\u5B9A\u5740\u6A19\u982D, \u4F46\u767C\u73FE\u7A7A\u503C\u7684 Action
-null.message=\u8655\u7406\u4F3A\u670D\u5668\u5167\u9001\u8981\u6C42\u6642\u627E\u5230\u7A7A\u503C\u7684\u8A0A\u606F, \u4F46\u9700\u8981 Web \u670D\u52D9\u5B9A\u5740
-null.headers=\u8655\u7406\u4F3A\u670D\u5668\u5167\u9001\u8981\u6C42\u6642\u627E\u4E0D\u5230\u4EFB\u4F55\u6A19\u982D, \u4F46\u9700\u8981 Web \u670D\u52D9\u5B9A\u5740
-null.wsa.headers=\u8655\u7406\u4F3A\u670D\u5668\u5167\u9001\u8981\u6C42\u6642\u627E\u4E0D\u5230 Web \u670D\u52D9\u5B9A\u5740\u6A19\u982D
-# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline
-addressing.notEnabled=\u672A\u555F\u7528\u5B9A\u5740, {0} \u4E0D\u61C9\u5305\u542B\u65BC\u7BA1\u9053\u4E2D
-addressing.should.be.enabled.=\u672A\u555F\u7528\u5B9A\u5740
-validation.client.nullAction=\u5728\u5F9E\u5C6C\u7AEF\u9A57\u8B49\u5167\u9001\u7684\u5B9A\u5740\u6A19\u982D, \u4F46\u767C\u73FE\u7A7A\u503C\u7684\u52D5\u4F5C
-validation.server.nullAction=\u5728\u4F3A\u670D\u5668\u9A57\u8B49\u5167\u9001\u7684\u5B9A\u5740\u6A19\u982D, \u4F46\u767C\u73FE\u7A7A\u503C\u7684\u52D5\u4F5C
-
-nonAnonymous.response=\u50B3\u9001 202 \u4E26\u8655\u7406\u975E\u533F\u540D\u56DE\u61C9
-nonAnonymous.unknown.protocol=\u4E0D\u660E\u7684\u5354\u5B9A: "{0}"
-# {0} - URL
-nonAnonymous.response.sending=\u50B3\u9001\u975E\u533F\u540D\u7684\u56DE\u8986\u7D66 "{0}"
-nonAnonymous.response.nullHeaders=\u4F86\u81EA "{0}" \u7684\u975E\u533F\u540D\u56DE\u61C9\u4E2D\u627E\u4E0D\u5230\u56DE\u61C9\u6A19\u982D
-# Usage not found. TODO Remove
-#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}"
-nonAnonymous.response.oneway=\u5FFD\u7565\u55AE\u5411\u8A0A\u606F\u7684\u975E\u533F\u540D\u56DE\u61C9
-
-invalid.addressing.header.exception=\u7121\u6548\u7684 Web \u670D\u52D9\u5B9A\u5740\u6A19\u982D: "{0}", \u539F\u56E0: "{1}"
-action.not.supported.exception=\u52D5\u4F5C: \u4E0D\u652F\u63F4 "{0}"
-missing.header.exception=\u907A\u6F0F Web \u670D\u52D9\u5B9A\u5740\u6A19\u982D: "{0}"
-non.unique.operation.signature=\u9023\u63A5\u57E0\u4E2D\u7684\u4F5C\u696D\u61C9\u5305\u542B\u552F\u4E00\u7684\u4F5C\u696D\u7C3D\u7AE0, \u624D\u80FD\u9806\u5229\u8B58\u5225\u8A0A\u606F\u7684\u76F8\u95DC WSDL \u4F5C\u696D. WSDL \u4F5C\u696D {0} \u8207 {1} \u6709\u76F8\u540C\u7684\u4F5C\u696D\u7C3D\u7AE0\u3001wsa:Action "{2}" \u4EE5\u53CA\u8981\u6C42\u4E3B\u9AD4\u5340\u584A "{3}", \u65B9\u6CD5\u5206\u914D\u53EF\u80FD\u6703\u5728\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u6642\u5931\u6557. \u8ACB\u70BA\u6BCF\u500B\u4F5C\u696D\u4F7F\u7528\u552F\u4E00\u7684 wsa:Action
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi.properties
deleted file mode 100644
index 2b7ce3a9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-binding.api.no.fault.message.name=Fault message name must not be null.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_de.properties
deleted file mode 100644
index cf97ec78..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_de.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-binding.api.no.fault.message.name=Fault-Meldungsname darf nicht null sein.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_es.properties
deleted file mode 100644
index 670385d1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_es.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-binding.api.no.fault.message.name=El nombre del mensaje de fallo no debe ser nulo.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_fr.properties
deleted file mode 100644
index 30ef1822..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_fr.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-binding.api.no.fault.message.name=Le nom du message d'erreur ne doit pas \u00EAtre NULL.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_it.properties
deleted file mode 100644
index e518fe02..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_it.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-binding.api.no.fault.message.name=Il nome del messaggio di errore non deve essere nullo.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ja.properties
deleted file mode 100644
index e98fef75..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ja.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-binding.api.no.fault.message.name=\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u540D\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ko.properties
deleted file mode 100644
index 918ad315..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ko.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-binding.api.no.fault.message.name=\uACB0\uD568 \uBA54\uC2DC\uC9C0 \uC774\uB984\uC740 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_pt_BR.properties
deleted file mode 100644
index 85abccd9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_pt_BR.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-binding.api.no.fault.message.name=O nome da mensagem com falha n\u00E3o deve ser nulo.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_CN.properties
deleted file mode 100644
index 14bac4c2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_CN.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-binding.api.no.fault.message.name=\u9ED8\u8BA4\u6D88\u606F\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_TW.properties
deleted file mode 100644
index 2db25d1c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_TW.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-binding.api.no.fault.message.name=\u932F\u8AA4\u8A0A\u606F\u540D\u7A31\u4E0D\u5F97\u70BA\u7A7A\u503C.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client.properties
deleted file mode 100644
index f31bbe0b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client.properties
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#http.client.cannot.connect=cannot connect to server: {0}
-http.client.failed=HTTP transport error: {0}
-local.client.failed=local transport error: {0}
-# Usage not found. TODO Remove
-#http.client.cannotCreateMessageFactory=cannot create message factory
-# Usage not found. TODO Remove
-#http.client.unauthorized=request requires HTTP authentication: {0}
-http.not.found=HTTP Status-Code 404: Not Found - {0}
-http.status.code=The server sent HTTP status code {0}: {1}
-invalid.port.name={0} is not a valid port. Valid ports are: {1}
-invalid.epr.port.name=EndpointName specified in EPR {0} is not a WSDL port QName, valid Ports are {1}
-invalid.service.name={0} is not a valid service. Valid services are: {1}
-invalid.service.name.null={0} is not a valid service
-invalid.service.no.wsdl=No wsdl metadata for service: {0}, can't create proxy! Try creating Service by providing a WSDL URL
-invalid.binding.id=Invalid binding id: {0}. Must be: {1}
-invalid.soap.role.none=Cannot set SOAP 1.2 role "none"
-non.logical.handler.set=Cannot set {0} on binding. Handler must be a LogicalHandler.
-runtime.wsdlparser.invalidWSDL=Invalid WSDL {0}, expected {1} found {2} at (line{3})
-undefined.binding=Undefined binding: {0}
-undefined.portType=Undefined port type: {0}
-# EPR = EndPoint Reference.
-failed.to.parse.epr=Failed to parse EPR: {0}
-# EPR = EndPoint Reference.
-epr.without.addressing.on=EPR is specified without enabling WS-Addressing support.
-invalid.wsdl.url=Invalid WSDL URL: {0}
-wsdl.not.found=WSDL url {0} is not accessible.
-invalid.address=Invalid address: {0}
-# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class<T> class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding
-unsupported.operation={0} not supported with {1}. Must be: {2}
-invalid.soap.action=A valid SOAPAction should be set in the RequestContext when Addressing is enabled, \
- Use BindingProvider.SOAPACTION_URI_PROPERTY to set it.
-# {0} - WSDL URL, {1}, {2} - exception message
-failed.to.parseWithMEX=Failed to access the WSDL at: {0}. It failed with: \n\t{1}.\nRetrying with MEX gave: \n\t{2}
-# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect.
-failed.to.parse=Failed to access the WSDL at: {0}. It failed with: \n\t{1}.
-wsdl.contains.no.service=WSDL {0} contains no service definition.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_de.properties
deleted file mode 100644
index 99d7689c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_de.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#http.client.cannot.connect=cannot connect to server: {0}
-http.client.failed=HTTP-Transportfehler: {0}
-local.client.failed=Lokaler Transportfehler: {0}
-# Usage not found. TODO Remove
-#http.client.cannotCreateMessageFactory=cannot create message factory
-# Usage not found. TODO Remove
-#http.client.unauthorized=request requires HTTP authentication: {0}
-http.not.found=HTTP-Statuscode 404: Nicht gefunden - {0}
-http.status.code=Der Server hat HTTP-Statuscode {0} gesendet: {1}
-invalid.port.name={0} ist kein g\u00FCltiger Port. G\u00FCltige Ports sind: {1}
-invalid.epr.port.name=EndpointName, der in EPR {0} angegeben wird, ist kein WSDL-Port-QName, g\u00FCltige Ports sind {1}
-invalid.service.name={0} ist kein g\u00FCltiger Service. G\u00FCltige Services sind: {1}
-invalid.service.name.null={0} ist kein g\u00FCltiger Service
-invalid.service.no.wsdl=Keine WSDL-Metadaten f\u00FCr Service: {0}, Proxy kann nicht erstellt werden. Versuchen Sie, den Service zu erstellen, indem Sie eine WSDL-URL angeben
-invalid.binding.id=Ung\u00FCltige Binding-ID: {0}. Muss {1} sein
-invalid.soap.role.none=SOAP 1.2-Attribut "role" kann nicht auf "none" festgelegt werden
-non.logical.handler.set={0} kann in Binding nicht festgelegt werden. Handler muss ein LogicalHandler sein.
-runtime.wsdlparser.invalidWSDL=Ung\u00FCltige WSDL {0}, {1} erwartet, {2} in (Zeile{3}) gefunden
-undefined.binding=Undefiniertes Binding: {0}
-undefined.portType=Undefinierter Porttyp: {0}
-# EPR = EndPoint Reference.
-failed.to.parse.epr=EPR konnte nicht geparst werden: {0}
-# EPR = EndPoint Reference.
-epr.without.addressing.on=EPR wird ohne Aktivierung von WS-Adressierungsunterst\u00FCtzung angegeben.
-invalid.wsdl.url=Ung\u00FCltige WSDL-URL: {0}
-wsdl.not.found=Auf WSDL-URL {0} kann nicht zugegriffen werden.
-invalid.address=Ung\u00FCltige Adresse: {0}
-# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class<T> class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding
-unsupported.operation={0} nicht unterst\u00FCtzt mit {1}. Muss {2} sein
-invalid.soap.action=Eine g\u00FCltige SOAPAction muss im RequestContext festgelegt werden, wenn die Adressierung aktiviert ist. Legen Sie sie mit BindingProvider.SOAPACTION_URI_PROPERTY fest.
-# {0} - WSDL URL, {1}, {2} - exception message
-failed.to.parseWithMEX=Kein Zugriff auf WSDL bei: {0}. Zugriff nicht erfolgreich mit: \n\t{1}.\nWiederholung des Vorgangs mit MEX ergab: \n\t{2}
-# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect.
-failed.to.parse=Kein Zugriff auf WSDL bei: {0}. Zugriff nicht erfolgreich mit: \n\t{1}.
-wsdl.contains.no.service=WSDL {0} enth\u00E4lt keine Servicedefinition.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_es.properties
deleted file mode 100644
index 07fcfcd8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_es.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#http.client.cannot.connect=cannot connect to server: {0}
-http.client.failed=Error de transporte HTTP: {0}
-local.client.failed=error de transporte local: {0}
-# Usage not found. TODO Remove
-#http.client.cannotCreateMessageFactory=cannot create message factory
-# Usage not found. TODO Remove
-#http.client.unauthorized=request requires HTTP authentication: {0}
-http.not.found=C\u00F3digo de estado HTTP 404: no encontrado - {0}
-http.status.code=El servidor ha enviado el c\u00F3digo de estado HTTP {0}: {1}
-invalid.port.name={0} no es un puerto v\u00E1lido. Los puertos v\u00E1lidos son: {1}
-invalid.epr.port.name=El elemento EndpointName especificado en la referencia de punto final {0} no es un QName de puerto WSDL; los puertos v\u00E1lidos son {1}
-invalid.service.name={0} no es un servicio v\u00E1lido. Los servicios v\u00E1lidos son: {1}
-invalid.service.name.null={0} no es un servicio v\u00E1lido
-invalid.service.no.wsdl=No hay metadatos de WSDL para el servicio: {0}, no se puede crear el proxy. Intente crear el servicio proporcionando una URL de WSDL
-invalid.binding.id=Identificador de enlace no v\u00E1lido: {0}. Debe ser: {1}
-invalid.soap.role.none=No se puede definir el rol de SOAP 1.2 "ninguno"
-non.logical.handler.set=No se puede definir {0} en el enlace. El manejador debe ser un manejador l\u00F3gico.
-runtime.wsdlparser.invalidWSDL=WSDL no v\u00E1lido {0}; se esperaba {1}, pero se ha encontrado {2} en (l\u00EDnea{3})
-undefined.binding=Enlace no definido: {0}
-undefined.portType=Tipo de puerto no definido: {0}
-# EPR = EndPoint Reference.
-failed.to.parse.epr=Fallo al analizar la referencia de punto final: {0}
-# EPR = EndPoint Reference.
-epr.without.addressing.on=Se ha especificado la referencia de punto final sin activar el soporte de WS-Addressing.
-invalid.wsdl.url=URL de WSDL no v\u00E1lida: {0}
-wsdl.not.found=No se puede acceder a la URL de WSDL {0}.
-invalid.address=Direcci\u00F3n no v\u00E1lida: {0}
-# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class<T> class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding
-unsupported.operation={0} no est\u00E1 soportado con {1}. Debe ser: {2}
-invalid.soap.action=Se debe definir una acci\u00F3n de SOAP v\u00E1lida en RequestContext cuando Addressing est\u00E9 activado. Utilice BindingProvider.SOAPACTION_URI_PROPERTY para definirlo.
-# {0} - WSDL URL, {1}, {2} - exception message
-failed.to.parseWithMEX=Fallo al acceder al WSDL en: {0}. Ha fallado con: \n\t{1}.\nAl volver a intentarlo con MEX, ha devuelto: \n\t{2}
-# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect.
-failed.to.parse=Fallo al acceder al WSDL en: {0}. Ha fallado con: \n\t{1}.
-wsdl.contains.no.service=El WSDL {0} no contiene ninguna definici\u00F3n de servicio.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_fr.properties
deleted file mode 100644
index 2036fae6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_fr.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#http.client.cannot.connect=cannot connect to server: {0}
-http.client.failed=erreur de transport HTTP : {0}
-local.client.failed=erreur de transport local : {0}
-# Usage not found. TODO Remove
-#http.client.cannotCreateMessageFactory=cannot create message factory
-# Usage not found. TODO Remove
-#http.client.unauthorized=request requires HTTP authentication: {0}
-http.not.found=Code de statut HTTP 404 : introuvable - {0}
-http.status.code=Le serveur a envoy\u00E9 le code de statut HTTP {0} : {1}
-invalid.port.name={0} n''est pas un port valide. Les ports valides sont : {1}
-invalid.epr.port.name=Le nom d''adresse indiqu\u00E9 dans la r\u00E9f\u00E9rence d''adresse {0} n''est pas un QName de port WSDL, les ports valides sont {1}
-invalid.service.name={0} n''est pas un service valide. Les services valides sont : {1}
-invalid.service.name.null={0} n''est pas un service valide
-invalid.service.no.wsdl=Aucune m\u00E9tadonn\u00E9e WSDL pour le service {0}, impossible de cr\u00E9er un proxy. Essayez de cr\u00E9er un service en fournissant une URL WSDL
-invalid.binding.id=ID de binding non valide : {0}. Il doit s''agir de : {1}
-invalid.soap.role.none=Impossible de d\u00E9finir le r\u00F4le SOAP 1.2 "aucun"
-non.logical.handler.set=Impossible de d\u00E9finir {0} lors du binding. Le gestionnaire doit \u00EAtre de type LogicalHandler.
-runtime.wsdlparser.invalidWSDL=WSDL {0} non valide, {1} attendu, {2} trouv\u00E9 dans (ligne {3})
-undefined.binding=Binding non d\u00E9fini : {0}
-undefined.portType=Type de port non d\u00E9fini : {0}
-# EPR = EndPoint Reference.
-failed.to.parse.epr=Echec de l''analyse de la r\u00E9f\u00E9rence d''adresse : {0}
-# EPR = EndPoint Reference.
-epr.without.addressing.on=La r\u00E9f\u00E9rence d'adresse est indiqu\u00E9e sans activation de la prise en charge de WS-Addressing.
-invalid.wsdl.url=URL WSDL non valide : {0}
-wsdl.not.found=L''URL WSDL {0} n''est pas accessible.
-invalid.address=Adresse non valide : {0}
-# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class<T> class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding
-unsupported.operation={0} non pris en charge avec {1}. Il doit s''agir de : {2}
-invalid.soap.action=Un en-t\u00EAte SOAPAction valide doit \u00EAtre d\u00E9fini dans RequestContext lorsque l'adressage est activ\u00E9, utilisez BindingProvider.SOAPACTION_URI_PROPERTY pour le d\u00E9finir.
-# {0} - WSDL URL, {1}, {2} - exception message
-failed.to.parseWithMEX=Echec de l''acc\u00E8s au WSDL \u00E0 {0} avec \n\t{1}.\nLa nouvelle tentative avec MEX a renvoy\u00E9 \n\t{2}
-# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect.
-failed.to.parse=Echec de l''acc\u00E8s au WSDL \u00E0 {0} avec \n\t{1}.
-wsdl.contains.no.service=Le WSDL {0} ne contient aucune d\u00E9finition de service.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_it.properties
deleted file mode 100644
index e51c17cd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_it.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#http.client.cannot.connect=cannot connect to server: {0}
-http.client.failed=errore di trasporto HTTP: {0}
-local.client.failed=errore di trasporto locale: {0}
-# Usage not found. TODO Remove
-#http.client.cannotCreateMessageFactory=cannot create message factory
-# Usage not found. TODO Remove
-#http.client.unauthorized=request requires HTTP authentication: {0}
-http.not.found=Codice di stato HTTP 404: Non trovato - {0}
-http.status.code=Il server ha inviato il codice di stato HTTP {0}: {1}
-invalid.port.name={0} non \u00E8 una porta valida. Le porte valide sono: {1}
-invalid.epr.port.name=L''EndpointName specificato nell''EPR {0} non \u00E8 un QName della porta WSDL. Le porte valide sono {1}
-invalid.service.name={0} non \u00E8 un servizio valido. I servizi validi sono: {1}
-invalid.service.name.null={0} non \u00E8 un servizio valido
-invalid.service.no.wsdl=Non sono presenti metadati WSDL per il servizio: {0}. Impossibile creare il proxy. Provare a creare il servizio fornendo un URL WSDL
-invalid.binding.id=ID di associazione non valido: {0}. Deve essere: {1}
-invalid.soap.role.none=Impostare il ruolo SOAP 1.2 su "none"
-non.logical.handler.set=Impossibile impostare {0} sull''associazione. L''handler deve essere un LogicalHandler.
-runtime.wsdlparser.invalidWSDL=WSDL non valido {0}: previsto {1}, trovato {2} in (riga {3})
-undefined.binding=Associazione non definita: {0}
-undefined.portType=Tipo di porta non definito: {0}
-# EPR = EndPoint Reference.
-failed.to.parse.epr=Analisi dell''EPR non riuscita: {0}
-# EPR = EndPoint Reference.
-epr.without.addressing.on=EPR specificato senza abilitare il supporto WS-Addressing.
-invalid.wsdl.url=URL WSDL non valido: {0}
-wsdl.not.found=URL WSDL {0} non accessibile.
-invalid.address=Indirizzo non valido: {0}
-# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class<T> class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding
-unsupported.operation={0} non supportato con {1}. Deve essere: {2}
-invalid.soap.action=\u00C8 necessario impostare una SOAPAction valida in RequestContext quando \u00E8 abilitato l'indirizzamento. Usare BindingProvider.SOAPACTION_URI_PROPERTY per impostarla.
-# {0} - WSDL URL, {1}, {2} - exception message
-failed.to.parseWithMEX=Accesso a WSDL non riuscito in: {0}. Non riuscito con: \n\t{1}.\nIl nuovo tentativo con MEX ha fornito: \n\t{2}
-# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect.
-failed.to.parse=Accesso a WSDL non riuscito in: {0}. Non riuscito con: \n\t{1}.
-wsdl.contains.no.service=WSDL {0} non contiene alcuna definizione di servizio.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ja.properties
deleted file mode 100644
index 9f7271d3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ja.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#http.client.cannot.connect=cannot connect to server: {0}
-http.client.failed=HTTP\u30C8\u30E9\u30F3\u30B9\u30DD\u30FC\u30C8\u30FB\u30A8\u30E9\u30FC: {0}
-local.client.failed=\u30ED\u30FC\u30AB\u30EB\u30FB\u30C8\u30E9\u30F3\u30B9\u30DD\u30FC\u30C8\u30FB\u30A8\u30E9\u30FC: {0}
-# Usage not found. TODO Remove
-#http.client.cannotCreateMessageFactory=cannot create message factory
-# Usage not found. TODO Remove
-#http.client.unauthorized=request requires HTTP authentication: {0}
-http.not.found=HTTP\u30B9\u30C6\u30FC\u30BF\u30B9\u30FB\u30B3\u30FC\u30C9404: \u898B\u3064\u304B\u308A\u307E\u305B\u3093 - {0}
-http.status.code=\u30B5\u30FC\u30D0\u30FC\u304CHTTP\u30B9\u30C6\u30FC\u30BF\u30B9\u30FB\u30B3\u30FC\u30C9{0}\u3092\u9001\u4FE1\u3057\u307E\u3057\u305F: {1}
-invalid.port.name={0}\u306F\u6709\u52B9\u306A\u30DD\u30FC\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u6709\u52B9\u306A\u30DD\u30FC\u30C8: {1}
-invalid.epr.port.name=EPR {0}\u3067\u6307\u5B9A\u3055\u308C\u305FEndpointName\u306FWSDL\u30DD\u30FC\u30C8\u306EQName\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u6709\u52B9\u306A\u30DD\u30FC\u30C8\u306F{1}\u3067\u3059
-invalid.service.name={0}\u306F\u6709\u52B9\u306A\u30B5\u30FC\u30D3\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u6709\u52B9\u306A\u30B5\u30FC\u30D3\u30B9: {1}
-invalid.service.name.null={0}\u306F\u6709\u52B9\u306A\u30B5\u30FC\u30D3\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-invalid.service.no.wsdl=\u30B5\u30FC\u30D3\u30B9: {0}\u306EWSDL\u30E1\u30BF\u30C7\u30FC\u30BF\u304C\u306A\u3044\u305F\u3081\u3001\u30D7\u30ED\u30AD\u30B7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002WSDL URL\u3092\u6307\u5B9A\u3057\u3066\u30B5\u30FC\u30D3\u30B9\u3092\u4F5C\u6210\u3057\u3066\u304F\u3060\u3055\u3044
-invalid.binding.id=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0ID: {0}\u304C\u7121\u52B9\u3067\u3059\u3002\u6B21\u306E\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {1}
-invalid.soap.role.none=SOAP 1.2\u30ED\u30FC\u30EB\u300C\u306A\u3057\u300D\u306F\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093
-non.logical.handler.set=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306B{0}\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002\u30CF\u30F3\u30C9\u30E9\u306FLogicalHandler\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-runtime.wsdlparser.invalidWSDL=WSDL {0}\u304C\u7121\u52B9\u3067\u3059\u3002\u6B21\u306E\u5834\u6240\u3067{1}\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001{2}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F(\u884C{3})
-undefined.binding=\u672A\u5B9A\u7FA9\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0: {0}
-undefined.portType=\u672A\u5B9A\u7FA9\u306E\u30DD\u30FC\u30C8\u30FB\u30BF\u30A4\u30D7: {0}
-# EPR = EndPoint Reference.
-failed.to.parse.epr=EPR\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}
-# EPR = EndPoint Reference.
-epr.without.addressing.on=EPR\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001WS-Addressing\u306E\u30B5\u30DD\u30FC\u30C8\u304C\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-invalid.wsdl.url=\u7121\u52B9\u306AWSDL URL: {0}
-wsdl.not.found=WSDL URL {0}\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\u3002
-invalid.address=\u7121\u52B9\u306A\u30A2\u30C9\u30EC\u30B9: {0}
-# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class<T> class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding
-unsupported.operation={0}\u306F{1}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u6B21\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {2}
-invalid.soap.action=\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u304C\u6709\u52B9\u3067\u3042\u308B\u5834\u5408\u306F\u3001RequestContext\u3067\u6709\u52B9\u306ASOAPAction\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002BindingProvider.SOAPACTION_URI_PROPERTY\u3092\u4F7F\u7528\u3057\u3066\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-# {0} - WSDL URL, {1}, {2} - exception message
-failed.to.parseWithMEX=\u6B21\u306E\u5834\u6240\u3067WSDL\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}\u3002\u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u3088\u308A\u5931\u6557\u3057\u307E\u3057\u305F: \n\t{1}\u3002\nMEX\u3067\u518D\u8A66\u884C\u3059\u308B\u3068\u6B21\u306E\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F: \n\t{2}
-# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect.
-failed.to.parse=\u6B21\u306E\u5834\u6240\u3067WSDL\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}\u3002\u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u3088\u308A\u5931\u6557\u3057\u307E\u3057\u305F: \n\t{1}\u3002
-wsdl.contains.no.service=WSDL {0}\u306B\u30B5\u30FC\u30D3\u30B9\u5B9A\u7FA9\u304C\u542B\u307E\u308C\u307E\u305B\u3093\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ko.properties
deleted file mode 100644
index 4ed01e7c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ko.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#http.client.cannot.connect=cannot connect to server: {0}
-http.client.failed=HTTP \uC804\uC1A1 \uC624\uB958: {0}
-local.client.failed=\uB85C\uCEEC \uC804\uC1A1 \uC624\uB958: {0}
-# Usage not found. TODO Remove
-#http.client.cannotCreateMessageFactory=cannot create message factory
-# Usage not found. TODO Remove
-#http.client.unauthorized=request requires HTTP authentication: {0}
-http.not.found=HTTP \uC0C1\uD0DC \uCF54\uB4DC 404: \uCC3E\uC744 \uC218 \uC5C6\uC74C - {0}
-http.status.code=\uC11C\uBC84\uAC00 HTTP \uC0C1\uD0DC \uCF54\uB4DC {0}\uC744(\uB97C) \uC804\uC1A1\uD568: {1}
-invalid.port.name={0}\uC740(\uB294) \uC801\uD569\uD55C \uD3EC\uD2B8\uAC00 \uC544\uB2D9\uB2C8\uB2E4. \uC801\uD569\uD55C \uD3EC\uD2B8: {1}
-invalid.epr.port.name=EPR {0}\uC5D0 \uC9C0\uC815\uB41C EndpointName\uC740 WSDL \uD3EC\uD2B8 QName\uC774 \uC544\uB2D9\uB2C8\uB2E4. \uC801\uD569\uD55C \uD3EC\uD2B8\uB294 {1}\uC785\uB2C8\uB2E4.
-invalid.service.name={0}\uC740(\uB294) \uC801\uD569\uD55C \uC11C\uBE44\uC2A4\uAC00 \uC544\uB2D9\uB2C8\uB2E4. \uC801\uD569\uD55C \uC11C\uBE44\uC2A4: {1}
-invalid.service.name.null={0}\uC740(\uB294) \uC801\uD569\uD55C \uC11C\uBE44\uC2A4\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
-invalid.service.no.wsdl=\uC11C\uBE44\uC2A4\uC5D0 \uB300\uD55C WSDL \uBA54\uD0C0 \uB370\uC774\uD130\uAC00 \uC5C6\uC74C: {0}. \uD504\uB85D\uC2DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4! WSDL URL\uC744 \uC81C\uACF5\uD558\uC5EC \uC11C\uBE44\uC2A4\uB97C \uC0DD\uC131\uD574 \uBCF4\uC2ED\uC2DC\uC624.
-invalid.binding.id=\uBD80\uC801\uD569\uD55C \uBC14\uC778\uB529 ID: {0}. \uD544\uC218: {1}
-invalid.soap.role.none=SOAP 1.2 \uB864\uC744 "none"\uC73C\uB85C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-non.logical.handler.set=\uBC14\uC778\uB529\uC5D0 \uB300\uD574 {0}\uC744(\uB97C) \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uCC98\uB9AC\uAE30\uB294 LogicalHandler\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-runtime.wsdlparser.invalidWSDL={0}\uC740(\uB294) \uBD80\uC801\uD569\uD55C WSDL\uC785\uB2C8\uB2E4. {1}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {3}\uD589\uC5D0\uC11C {2}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-undefined.binding=\uC815\uC758\uB418\uC9C0 \uC54A\uC740 \uBC14\uC778\uB529: {0}
-undefined.portType=\uC815\uC758\uB418\uC9C0 \uC54A\uC740 \uD3EC\uD2B8 \uC720\uD615: {0}
-# EPR = EndPoint Reference.
-failed.to.parse.epr=EPR\uC758 \uAD6C\uBB38 \uBD84\uC11D \uC2E4\uD328: {0}
-# EPR = EndPoint Reference.
-epr.without.addressing.on=WS-Addressing \uC9C0\uC6D0\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD558\uC9C0 \uC54A\uC740 \uC0C1\uD0DC\uC5D0\uC11C EPR\uC774 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-invalid.wsdl.url=\uBD80\uC801\uD569\uD55C WSDL URL: {0}
-wsdl.not.found=WSDL URL {0}\uC5D0 \uC561\uC138\uC2A4\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-invalid.address=\uBD80\uC801\uD569\uD55C \uC8FC\uC18C: {0}
-# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class<T> class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding
-unsupported.operation={0}\uC740(\uB294) {1}\uC5D0\uC11C \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uD544\uC218: {2}
-invalid.soap.action=Addressing\uC774 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 RequestContext\uC5D0\uC11C \uC801\uD569\uD55C SOAPAction\uC744 \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4. BindingProvider.SOAPACTION_URI_PROPERTY\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC124\uC815\uD558\uC2ED\uC2DC\uC624.
-# {0} - WSDL URL, {1}, {2} - exception message
-failed.to.parseWithMEX=\uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC640 \uD568\uAED8 {0}\uC758 WSDL\uC5D0 \uB300\uD55C \uC561\uC138\uC2A4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \n\t{1}.\nMEX gave\uB85C \uC7AC\uC2DC\uB3C4\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \n\t{2}
-# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect.
-failed.to.parse=\uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC640 \uD568\uAED8 {0}\uC758 WSDL\uC5D0 \uB300\uD55C \uC561\uC138\uC2A4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \n\t{1}.
-wsdl.contains.no.service=WSDL {0}\uC5D0 \uC11C\uBE44\uC2A4 \uC815\uC758\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_pt_BR.properties
deleted file mode 100644
index 5d6c3faf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_pt_BR.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#http.client.cannot.connect=cannot connect to server: {0}
-http.client.failed=Erro de transporte HTTP: {0}
-local.client.failed=erro de transporte local: {0}
-# Usage not found. TODO Remove
-#http.client.cannotCreateMessageFactory=cannot create message factory
-# Usage not found. TODO Remove
-#http.client.unauthorized=request requires HTTP authentication: {0}
-http.not.found=C\u00F3digo de Status HTTP 404: N\u00E3o Encontrado - {0}
-http.status.code=O servidor enviou c\u00F3digo de status HTTP {0}: {1}
-invalid.port.name={0} n\u00E3o \u00E9 uma porta v\u00E1lida. As portas v\u00E1lidas s\u00E3o: {1}
-invalid.epr.port.name=EndpointName especificado no EPR {0} n\u00E3o \u00E9 um QName de porta WSDL; as Portas v\u00E1lidas s\u00E3o {1}
-invalid.service.name={0} n\u00E3o \u00E9 um servi\u00E7o v\u00E1lido. Os servi\u00E7os v\u00E1lidos s\u00E3o {1}
-invalid.service.name.null={0} n\u00E3o \u00E9 um servi\u00E7o v\u00E1lido
-invalid.service.no.wsdl=Nenhum metadado wsdl para o servi\u00E7o {0}. N\u00E3o \u00E9 poss\u00EDvel criar o proxy! Tente criar o Servi\u00E7o fornecendo um URL do WSDL
-invalid.binding.id=Id de bind inv\u00E1lido: {0}. Deve ser: {1}
-invalid.soap.role.none=N\u00E3o \u00E9 poss\u00EDvel definir a atribui\u00E7\u00E3o SOAP 1.2 como "nenhuma"
-non.logical.handler.set=N\u00E3o \u00E9 poss\u00EDvel definir {0} no bind. O handler deve ser um LogicalHandler.
-runtime.wsdlparser.invalidWSDL=WSDL {0} inv\u00E1lido, esperada {1} encontrou {2} na (linha{3})
-undefined.binding=Bind indefinido: {0}
-undefined.portType=Tipo de porta indefinido: {0}
-# EPR = EndPoint Reference.
-failed.to.parse.epr=Falha ao fazer parse de EPR: {0}
-# EPR = EndPoint Reference.
-epr.without.addressing.on=A EPR foi especificada sem ativar o suporte de Endere\u00E7amento de WS.
-invalid.wsdl.url=URL do WSDL Inv\u00E1lido: {0}
-wsdl.not.found=Url do WSDL {0} n\u00E3o acess\u00EDvel.
-invalid.address=Endere\u00E7o inv\u00E1lido: {0}
-# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class<T> class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding
-unsupported.operation={0} n\u00E3o suportado com {1}. Deve ser: {2}
-invalid.soap.action=Uma SOAPAction v\u00E1lida dever\u00E1 ser definida no RequestContext quando o Endere\u00E7amento estiver ativado. Use BindingProvider.SOAPACTION_URI_PROPERTY para defini-la.
-# {0} - WSDL URL, {1}, {2} - exception message
-failed.to.parseWithMEX=Falha ao acessar o WSDL em {0}. Ele falhou com: \n\t{1}.\nRecuperando com MEX fornecido: \n\t{2}
-# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect.
-failed.to.parse=Falha ao acessar o WSDL em {0}. Ele falhou com: \n\t{1}.
-wsdl.contains.no.service=O WSDL {0} n\u00E3o cont\u00E9m uma defini\u00E7\u00E3o de servi\u00E7o.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_CN.properties
deleted file mode 100644
index 84f0063b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_CN.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#http.client.cannot.connect=cannot connect to server: {0}
-http.client.failed=HTTP \u4F20\u8F93\u9519\u8BEF: {0}
-local.client.failed=\u672C\u5730\u4F20\u8F93\u9519\u8BEF: {0}
-# Usage not found. TODO Remove
-#http.client.cannotCreateMessageFactory=cannot create message factory
-# Usage not found. TODO Remove
-#http.client.unauthorized=request requires HTTP authentication: {0}
-http.not.found=HTTP \u72B6\u6001\u4EE3\u7801 404: \u672A\u627E\u5230 - {0}
-http.status.code=\u670D\u52A1\u5668\u53D1\u9001\u4E86 HTTP \u72B6\u6001\u4EE3\u7801 {0}: {1}
-invalid.port.name={0} \u4E0D\u662F\u6709\u6548\u7AEF\u53E3\u3002\u6709\u6548\u7AEF\u53E3\u4E3A: {1}
-invalid.epr.port.name=EPR {0}\u4E2D\u6307\u5B9A\u7684 EndpointName \u4E0D\u662F WSDL \u7AEF\u53E3 QName, \u6709\u6548\u7AEF\u53E3\u4E3A {1}
-invalid.service.name={0}\u4E0D\u662F\u6709\u6548\u670D\u52A1\u3002\u6709\u6548\u670D\u52A1\u4E3A: {1}
-invalid.service.name.null={0}\u4E0D\u662F\u6709\u6548\u670D\u52A1
-invalid.service.no.wsdl=\u6CA1\u6709\u7528\u4E8E\u670D\u52A1\u7684 wsdl \u5143\u6570\u636E: {0}, \u65E0\u6CD5\u521B\u5EFA\u4EE3\u7406! \u8BF7\u5C1D\u8BD5\u901A\u8FC7\u63D0\u4F9B WSDL URL \u6765\u521B\u5EFA\u670D\u52A1
-invalid.binding.id=\u7ED1\u5B9A ID \u65E0\u6548: {0}\u3002\u5FC5\u987B\u662F: {1}
-invalid.soap.role.none=\u65E0\u6CD5\u8BBE\u7F6E SOAP 1.2 \u89D2\u8272 "\u65E0"
-non.logical.handler.set=\u65E0\u6CD5\u5BF9\u7ED1\u5B9A\u8BBE\u7F6E{0}\u3002\u5904\u7406\u7A0B\u5E8F\u5FC5\u987B\u662F LogicalHandler\u3002
-runtime.wsdlparser.invalidWSDL=WSDL {0}\u65E0\u6548, \u5E94\u4E3A{1}, \u5728\u884C {3} \u627E\u5230\u7684\u662F{2}
-undefined.binding=\u672A\u5B9A\u4E49\u7684\u7ED1\u5B9A: {0}
-undefined.portType=\u672A\u5B9A\u4E49\u7684\u7AEF\u53E3\u7C7B\u578B: {0}
-# EPR = EndPoint Reference.
-failed.to.parse.epr=\u65E0\u6CD5\u89E3\u6790 EPR: {0}
-# EPR = EndPoint Reference.
-epr.without.addressing.on=\u6307\u5B9A\u4E86 EPR, \u4F46\u672A\u542F\u7528 WS-Addressing \u652F\u6301\u3002
-invalid.wsdl.url=WSDL URL \u65E0\u6548: {0}
-wsdl.not.found=WSDL url {0}\u4E0D\u53EF\u8BBF\u95EE\u3002
-invalid.address=\u5730\u5740\u65E0\u6548: {0}
-# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class<T> class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding
-unsupported.operation={1}\u4E0D\u652F\u6301{0}\u3002\u5FC5\u987B\u4E3A: {2}
-invalid.soap.action=\u5728\u542F\u7528\u5BFB\u5740\u540E\u5E94\u5728 RequestContext \u4E2D\u8BBE\u7F6E\u6709\u6548\u7684 SOAPAction\u3002\u8BF7\u4F7F\u7528 BindingProvider.SOAPACTION_URI_PROPERTY \u8FDB\u884C\u8BBE\u7F6E\u3002
-# {0} - WSDL URL, {1}, {2} - exception message
-failed.to.parseWithMEX=\u65E0\u6CD5\u8BBF\u95EE\u4F4D\u4E8E\u4EE5\u4E0B\u4F4D\u7F6E\u7684 WSDL: {0}\u3002\u8BE5\u64CD\u4F5C\u5931\u8D25\u5E76\u663E\u793A: \n\t{1}\u3002\n\u4F7F\u7528 MEX \u91CD\u8BD5\u65F6\u663E\u793A: \n\t{2}
-# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect.
-failed.to.parse=\u65E0\u6CD5\u8BBF\u95EE\u4F4D\u4E8E\u4EE5\u4E0B\u4F4D\u7F6E\u7684 WSDL: {0}\u3002\u8BE5\u64CD\u4F5C\u5931\u8D25\u5E76\u663E\u793A: \n\t{1}\u3002
-wsdl.contains.no.service=WSDL {0}\u4E0D\u5305\u542B\u670D\u52A1\u5B9A\u4E49\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_TW.properties
deleted file mode 100644
index d3814db7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_TW.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Usage not found. TODO Remove
-#http.client.cannot.connect=cannot connect to server: {0}
-http.client.failed=HTTP \u50B3\u8F38\u932F\u8AA4: {0}
-local.client.failed=\u672C\u6A5F\u50B3\u8F38\u932F\u8AA4: {0}
-# Usage not found. TODO Remove
-#http.client.cannotCreateMessageFactory=cannot create message factory
-# Usage not found. TODO Remove
-#http.client.unauthorized=request requires HTTP authentication: {0}
-http.not.found=HTTP \u72C0\u614B\u4EE3\u78BC 404: \u627E\u4E0D\u5230 - {0}
-http.status.code=\u4F3A\u670D\u5668\u5DF2\u50B3\u9001 HTTP \u72C0\u614B\u4EE3\u78BC {0}: {1}
-invalid.port.name={0} \u4E0D\u662F\u6709\u6548\u7684\u9023\u63A5\u57E0. \u6709\u6548\u7684\u9023\u63A5\u57E0\u70BA: {1}
-invalid.epr.port.name=\u5728 EPR {0} \u4E2D\u6307\u5B9A\u7684 EndpointName \u4E0D\u662F WSDL \u9023\u63A5\u57E0 QName, \u6709\u6548\u7684\u9023\u63A5\u57E0\u70BA {1}
-invalid.service.name={0} \u4E0D\u662F\u6709\u6548\u7684\u670D\u52D9. \u6709\u6548\u7684\u670D\u52D9\u70BA: {1}
-invalid.service.name.null={0} \u4E0D\u662F\u6709\u6548\u7684\u670D\u52D9
-invalid.service.no.wsdl=\u670D\u52D9: {0} \u6C92\u6709 WSDL \u63CF\u8FF0\u8CC7\u6599, \u7121\u6CD5\u5EFA\u7ACB\u4EE3\u7406\u4E3B\u6A5F! \u8ACB\u5617\u8A66\u63D0\u4F9B WSDL URL \u4EE5\u5EFA\u7ACB\u670D\u52D9
-invalid.binding.id=\u7121\u6548\u7684\u9023\u7D50 ID: {0}. \u5FC5\u9808\u70BA: {1}
-invalid.soap.role.none=\u7121\u6CD5\u8A2D\u5B9A SOAP 1.2 \u89D2\u8272 "none"
-non.logical.handler.set=\u7121\u6CD5\u5728\u9023\u7D50\u4E2D\u8A2D\u5B9A {0}. \u8655\u7406\u7A0B\u5F0F\u5FC5\u9808\u70BA LogicalHandler.
-runtime.wsdlparser.invalidWSDL=\u7121\u6548\u7684 WSDL {0}, \u9810\u671F\u70BA {1}, \u5728\u7B2C {3} \u884C \u767C\u73FE {2}
-undefined.binding=\u672A\u5B9A\u7FA9\u7684\u9023\u7D50: {0}
-undefined.portType=\u672A\u5B9A\u7FA9\u7684\u9023\u63A5\u57E0\u985E\u578B: {0}
-# EPR = EndPoint Reference.
-failed.to.parse.epr=\u7121\u6CD5\u5256\u6790 EPR: {0}
-# EPR = EndPoint Reference.
-epr.without.addressing.on=EPR \u6307\u5B9A\u6642\u672A\u555F\u7528 Web \u670D\u52D9\u5B9A\u5740\u652F\u63F4.
-invalid.wsdl.url=\u7121\u6548\u7684 WSDL URL: {0}
-wsdl.not.found=\u7121\u6CD5\u5B58\u53D6 WSDL URL {0}.
-invalid.address=\u7121\u6548\u7684\u4F4D\u5740: {0}
-# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class<T> class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding
-unsupported.operation={0} \u4E0D\u652F\u63F4\u8207 {1} \u4E00\u8D77\u4F7F\u7528. \u5FC5\u9808\u70BA: {2}
-invalid.soap.action=\u7576\u5B9A\u5740\u555F\u7528\u6642, \u61C9\u5728 RequestContext \u4E2D\u8A2D\u5B9A\u6709\u6548\u7684 SOAPAction, \u8ACB\u4F7F\u7528 BindingProvider.SOAPACTION_URI_PROPERTY \u4E88\u4EE5\u8A2D\u5B9A.
-# {0} - WSDL URL, {1}, {2} - exception message
-failed.to.parseWithMEX=\u7121\u6CD5\u5B58\u53D6\u4F4D\u65BC: {0} \u7684 WSDL. \u5931\u6557\u539F\u56E0\u5982\u4E0B: \n\t{1}.\n\u4F7F\u7528\u63D0\u4F9B\u7684 MEX \u91CD\u8A66: \n\t{2}
-# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect.
-failed.to.parse=\u7121\u6CD5\u5B58\u53D6\u4F4D\u65BC: {0} \u7684 WSDL. \u5931\u6557\u539F\u56E0\u5982\u4E0B: \n\t{1}.
-wsdl.contains.no.service=WSDL {0} \u672A\u5305\u542B\u670D\u52D9\u5B9A\u7FA9.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch.properties
deleted file mode 100644
index e364d253..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch.properties
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-invalid.nullarg.soap.msgmode=SOAP/HTTP Binding in {0} is not allowed with a null invocation argument. Must be: {1}
-# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET
-invalid.nullarg.xmlhttp.request.method=A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals {0} with a Null invocation Argument is not allowed. Must be: {1}
-invalid.nullarg.uri=Endpoint address URI is not allowed with a null argument
-invalid.response=No response returned.
-invalid.response.deserialization=Failed to deserialize the response.
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.datasource.dispatch.msgmode=Can not create Dispatch<DataSource> of Service.Mode.PAYLOAD{0}. Must be: {1}
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.soapmessage.dispatch.msgmode=Can not create Dispatch<SOAPMessage> of {0}. Must be {1}.
-invalid.datasource.dispatch.binding=Can not create Dispatch<DataSource> with {0}. Must be: {1}
-invalid.soapmessage.dispatch.binding=Can not create Dispatch<SOAPMessage> with {0} Binding. Must be: {1} Binding.
-invalid.query.string=Unable to resolve endpoint address using the supplied query string: {0}.
-invalid.uri.path.query=Unable to construct a URI with this path info {0} and this query string {1}.
-invalid.uri=Endpoint String: {0} is and invalid URI.
-invalid.uri.decode=Unable to decode the resolved endpoint using UTF-8 encoding.
-invalid.uri.resolution=Unable to resolve endpoint address using the supplied path: {0}.
-duplicate.port=WSDLPort {0} already exists. Can not create a port of the same QName.
-invalid.query.leading.char=Leading '?' of MessageContext.QUERY_STRING: {0} is not valid. Remove '?' and run again.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_de.properties
deleted file mode 100644
index 0d17a5a0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_de.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-invalid.nullarg.soap.msgmode=SOAP-/HTTP-Binding in {0} ist bei Null-Aufrufargument nicht zul\u00E4ssig. Muss {1} sein
-# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET
-invalid.nullarg.xmlhttp.request.method=Eine XML-/HTTP-Anforderung, die "MessageContext.HTTP_REQUEST_METHOD gleich {0}" mit einem Null-Aufrufargument verwendet, ist nicht zul\u00E4ssig. Muss {1} sein
-invalid.response=Keine Antwort zur\u00FCckgegeben.
-invalid.response.deserialization=Die Antwort konnte nicht deserialisiert werden.
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.datasource.dispatch.msgmode=Dispatch<DataSource> von Service.Mode.PAYLOAD{0} kann nicht erstellt werden. Muss {1} sein
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.soapmessage.dispatch.msgmode=Dispatch<SOAPMessage> von {0} kann nicht erstellt werden. Muss {1} sein.
-invalid.datasource.dispatch.binding=Dispatch<DataSource> mit {0} kann nicht erstellt werden. Muss {1} sein
-invalid.soapmessage.dispatch.binding=Dispatch<SOAPMessage> mit {0}-Binding kann nicht erstellt werden. Muss {1}-Binding sein.
-invalid.query.string=End Point-Adresse kann mit der angegebenen Abfragezeichenfolge nicht aufgel\u00F6st werden: {0}.
-invalid.uri.path.query=Ein URI mit diesen Pfadinformationen {0} und dieser Abfragezeichenfolge {1} kann nicht erstellt werden.
-invalid.uri=End Point-Zeichenfolge: {0} ist ein ung\u00FCltiger URI.
-invalid.uri.decode=Der aufgel\u00F6ste End Point kann mit der UTF-8-Codierung nicht decodiert werden.
-invalid.uri.resolution=End Point-Adresse kann mit dem angegebenen Pfad nicht aufgel\u00F6st werden: {0}.
-duplicate.port=WSDLPort {0} ist bereits vorhanden. Ein Port mit demselben QName kann nicht erstellt werden.
-invalid.query.leading.char=F\u00FChrendes ''?'' von MessageContext.QUERY_STRING: {0} ist nicht g\u00FCltig. Entfernen Sie ''?'', und f\u00FChren Sie den Vorgang erneut aus.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_es.properties
deleted file mode 100644
index 65e621ba..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_es.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-invalid.nullarg.soap.msgmode=No se permite el enlace SOAP/HTTP en {0} con un argumento de llamada nulo. Debe ser: {1}
-# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET
-invalid.nullarg.xmlhttp.request.method=No se permite una solicitud XML/HTTP que utiliza el m\u00E9todo MessageContext.HTTP_REQUEST_METHOD igual a {0} con un argumento de llamada nulo. Debe ser: {1}
-invalid.response=No se ha devuelto ninguna respuesta.
-invalid.response.deserialization=Fallo al anular la serializaci\u00F3n de la respuesta.
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.datasource.dispatch.msgmode=No se puede crear Dispatch<DataSource> de Service.Mode.PAYLOAD{0}. Debe ser: {1}
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.soapmessage.dispatch.msgmode=No se puede crear Dispatch<SOAPMessage> de {0}. Debe ser {1}.
-invalid.datasource.dispatch.binding=No se puede crear Dispatch<DataSource> con {0}. Debe ser: {1}
-invalid.soapmessage.dispatch.binding=No se puede crear Dispatch<SOAPMessage> con el enlace {0}. Debe ser: enlace {1}.
-invalid.query.string=No se ha podido resolver la direcci\u00F3n de punto final utilizando la cadena de consulta proporcionada: {0}.
-invalid.uri.path.query=No se ha podido construir un URI con esta informaci\u00F3n de ruta de acceso {0} y esta cadena de consulta {1}.
-invalid.uri=La cadena de punto final {0} es un URI no v\u00E1lido.
-invalid.uri.decode=No se ha podido descodificar el punto final resuelto utilizando la codificaci\u00F3n UTF-8.
-invalid.uri.resolution=No se ha podido resolver la direcci\u00F3n de punto final utilizando la ruta de acceso proporcionada: {0}.
-duplicate.port=WSDLPort {0} ya existe. No se puede crear un puerto con el mismo QName.
-invalid.query.leading.char=El signo ''?'' que precede a MessageContext.QUERY_STRING: {0} no es v\u00E1lido. Elimine ''?'' y vuelva a ejecutarlo.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_fr.properties
deleted file mode 100644
index 255f6ca4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_fr.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-invalid.nullarg.soap.msgmode=Le binding SOAP/HTTP dans {0} n''est pas autoris\u00E9 avec un argument d''appel NULL. Il doit s''agir de : {1}
-# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET
-invalid.nullarg.xmlhttp.request.method=Une demande XML/HTTP \u00E0 l''aide de MessageContext.HTTP_REQUEST_METHOD \u00E9quivaut \u00E0 {0} avec un argument d''appel NULL et n''est pas autoris\u00E9e. Il doit s''agir de : {1}
-invalid.response=Aucune r\u00E9ponse renvoy\u00E9e.
-invalid.response.deserialization=Echec de la d\u00E9s\u00E9rialisation de la r\u00E9ponse.
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.datasource.dispatch.msgmode=Impossible de cr\u00E9er Dispatch<DataSource> de Service.Mode.PAYLOAD{0}. Il doit s''agir de : {1}
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.soapmessage.dispatch.msgmode=Impossible de cr\u00E9er Dispatch<SOAPMessage> de {0}. Il doit s''agir de : {1}.
-invalid.datasource.dispatch.binding=Impossible de cr\u00E9er Dispatch<DataSource> avec {0}. Il doit s''agir de : {1}
-invalid.soapmessage.dispatch.binding=Impossible de cr\u00E9er Dispatch<SOAPMessage> avec le binding {0}. Il doit s''agir du binding {1}.
-invalid.query.string=Impossible de r\u00E9soudre l''adresse \u00E0 l''aide de la cha\u00EEne de requ\u00EAte fournie : {0}.
-invalid.uri.path.query=Impossible de construire un URI avec ces informations sur le chemin {0} et cette cha\u00EEne de requ\u00EAte {1}.
-invalid.uri=La cha\u00EEne d''adresse {0} est un URI non valide.
-invalid.uri.decode=Impossible de d\u00E9coder l'adresse r\u00E9solue \u00E0 l'aide de l'encodage UTF-8.
-invalid.uri.resolution=Impossible de r\u00E9soudre l''adresse \u00E0 l''aide du chemin fourni : {0}.
-duplicate.port=Le WSDLPort {0} existe d\u00E9j\u00E0. Impossible de cr\u00E9er un port ayant le m\u00EAme QName.
-invalid.query.leading.char=Le signe ''?'' de d\u00E9but de MessageContext.QUERY_STRING {0} n''est pas valide. Enlevez le signe ''?'' et recommencez.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_it.properties
deleted file mode 100644
index 8c67cf2c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_it.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-invalid.nullarg.soap.msgmode=L''associazione SOAP/HTTP in {0} non \u00E8 consentita con un argomento di richiamo nullo. Deve essere: {1}
-# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET
-invalid.nullarg.xmlhttp.request.method=Non \u00E8 consentita una richiesta XML/HTTP che usa MessageContext.HTTP_REQUEST_METHOD uguale a {0} con un argomento di richiamo nullo. Deve essere: {1}
-invalid.response=Nessuna risposta restituita.
-invalid.response.deserialization=Deserializzazione della risposta non riuscita.
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.datasource.dispatch.msgmode=Impossibile creare Dispatch<DataSource> di Service.Mode.PAYLOAD{0}. Deve essere: {1}
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.soapmessage.dispatch.msgmode=Impossibile creare Dispatch<SOAPMessage> di {0}. Deve essere: {1}
-invalid.datasource.dispatch.binding=Impossibile creare Dispatch<DataSource> con {0}. Deve essere: {1}
-invalid.soapmessage.dispatch.binding=Impossibile creare Dispatch<SOAPMessage> con l''associazione {0}. Deve essere: associazione {1}.
-invalid.query.string=Impossibile risolvere l''indirizzo dell''endpoint usando la stringa di query fornita: {0}.
-invalid.uri.path.query=Impossibile costruire un URI con queste informazioni sul percorso {0} e questa stringa di query {1}.
-invalid.uri=La stringa dell''endpoint: {0} \u00E8 un URI non valido.
-invalid.uri.decode=Impossibile decodificare l'endpoint risolto usando la codifica UTF-8.
-invalid.uri.resolution=Impossibile risolvere l''indirizzo dell''endpoint usando il percorso fornito: {0}.
-duplicate.port=WSDLPort {0} esiste gi\u00E0. Impossibile creare una porta con lo stesso QName.
-invalid.query.leading.char=''?'' iniziale di MessageContext.QUERY_STRING: {0} non valido. Rimuovere ''?'' e ripetere l''esecuzione.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ja.properties
deleted file mode 100644
index 2cc9f947..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ja.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-invalid.nullarg.soap.msgmode=\u547C\u51FA\u3057\u5F15\u6570\u304Cnull\u306E\u5834\u5408\u3001{0}\u3067\u306ESOAP/HTTP\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {1}
-# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET
-invalid.nullarg.xmlhttp.request.method=\u547C\u51FA\u3057\u5F15\u6570\u304CNULL\u306E\u5834\u5408\u3001MessageContext.HTTP_REQUEST_METHOD equals {0}\u3092\u4F7F\u7528\u3057\u305FXML/HTTP\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {1}
-invalid.response=\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u8FD4\u3055\u308C\u307E\u305B\u3093\u3002
-invalid.response.deserialization=\u30EC\u30B9\u30DD\u30F3\u30B9\u306E\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.datasource.dispatch.msgmode=Service.Mode.PAYLOAD{0}\u306EDispatch<DataSource>\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {1}
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.soapmessage.dispatch.msgmode={0}\u306EDispatch<SOAPMessage>\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002{1}\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-invalid.datasource.dispatch.binding={0}\u3067Dispatch<DataSource>\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {1}
-invalid.soapmessage.dispatch.binding={0}\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3067Dispatch<SOAPMessage>\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002{1}\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-invalid.query.string=\u6307\u5B9A\u3055\u308C\u305F\u554F\u5408\u305B\u6587\u5B57\u5217\u3092\u4F7F\u7528\u3057\u3066\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A2\u30C9\u30EC\u30B9\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093: {0}\u3002
-invalid.uri.path.query=\u3053\u306E\u30D1\u30B9\u60C5\u5831{0}\u304A\u3088\u3073\u3053\u306E\u554F\u5408\u305B\u6587\u5B57\u5217{1}\u3092\u4F7F\u7528\u3057\u3066URI\u3092\u69CB\u7BC9\u3067\u304D\u307E\u305B\u3093\u3002
-invalid.uri=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u6587\u5B57\u5217: {0}\u306F\u7121\u52B9\u306AURI\u3067\u3059\u3002
-invalid.uri.decode=UTF-8\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u4F7F\u7528\u3057\u3066\u89E3\u6C7A\u6E08\u306E\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u3092\u30C7\u30B3\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3002
-invalid.uri.resolution=\u6307\u5B9A\u3055\u308C\u305F\u30D1\u30B9\u3092\u4F7F\u7528\u3057\u3066\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A2\u30C9\u30EC\u30B9\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093: {0}\u3002
-duplicate.port=WSDLPort {0}\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059\u3002\u540C\u3058QName\u306E\u30DD\u30FC\u30C8\u306F\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002
-invalid.query.leading.char=MessageContext.QUERY_STRING: {0}\u306E\u5148\u982D\u306E''?''\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002''?''\u3092\u524A\u9664\u3057\u3066\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ko.properties
deleted file mode 100644
index ea868d17..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ko.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-invalid.nullarg.soap.msgmode={0}\uC758 SOAP/HTTP \uBC14\uC778\uB529\uC5D0\uB294 \uB110 \uD638\uCD9C \uC778\uC218\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uD544\uC218: {1}
-# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET
-invalid.nullarg.xmlhttp.request.method=MessageContext.HTTP_REQUEST_METHOD\uB85C \uD638\uCD9C \uC778\uC218\uAC00 \uB110\uC778 {0}\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB294 XML/HTTP \uC694\uCCAD\uC740 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uD544\uC218: {1}
-invalid.response=\uBC18\uD658\uB41C \uC751\uB2F5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-invalid.response.deserialization=\uC751\uB2F5 \uC9C1\uB82C\uD654 \uD574\uC81C\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.datasource.dispatch.msgmode=Service.Mode.PAYLOAD {0}\uC758 Dispatch<DataSource>\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD544\uC218: {1}
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.soapmessage.dispatch.msgmode={0}\uC758 Dispatch<SOAPMessage>\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD544\uC218: {1}
-invalid.datasource.dispatch.binding={0}(\uC73C)\uB85C Dispatch<DataSource>\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD544\uC218: {1}
-invalid.soapmessage.dispatch.binding={0} \uBC14\uC778\uB529\uC73C\uB85C Dispatch<SOAPMessage>\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD544\uC218: {1} \uBC14\uC778\uB529
-invalid.query.string=\uC81C\uACF5\uB41C \uC9C8\uC758 \uBB38\uC790\uC5F4\uC744 \uC0AC\uC6A9\uD558\uC5EC \uB05D\uC810 \uC8FC\uC18C\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC74C: {0}.
-invalid.uri.path.query=\uACBD\uB85C \uC815\uBCF4 {0} \uBC0F \uC9C8\uC758 \uBB38\uC790\uC5F4 {1}(\uC73C)\uB85C URI\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-invalid.uri=\uB05D\uC810 \uBB38\uC790\uC5F4 {0}\uC740(\uB294) \uBD80\uC801\uD569\uD55C URI\uC785\uB2C8\uB2E4.
-invalid.uri.decode=UTF-8 \uC778\uCF54\uB529\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBD84\uC11D\uB41C \uB05D\uC810\uC744 \uB514\uCF54\uB529\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-invalid.uri.resolution=\uC81C\uACF5\uB41C \uACBD\uB85C\uB97C \uC0AC\uC6A9\uD558\uC5EC \uB05D\uC810 \uC8FC\uC18C\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC74C: {0}.
-duplicate.port=WSDLPort {0}\uC774(\uAC00) \uC874\uC7AC\uD569\uB2C8\uB2E4. \uB3D9\uC77C\uD55C QName\uC758 \uD3EC\uD2B8\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-invalid.query.leading.char=MessageContext.QUERY_STRING {0} \uC55E\uC5D0\uB294 ''?''\uAC00 \uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ''?''\uB97C \uC81C\uAC70\uD55C \uD6C4 \uB2E4\uC2DC \uC2E4\uD589\uD558\uC2ED\uC2DC\uC624.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_pt_BR.properties
deleted file mode 100644
index 0c4d8ae9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_pt_BR.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-invalid.nullarg.soap.msgmode=Bind de SOAP/HTTP em {0} n\u00E3o permitido com um argumento de chamada nulo. Deve ser: {1}
-# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET
-invalid.nullarg.xmlhttp.request.method=N\u00E3o \u00E9 permitida uma solicita\u00E7\u00E3o de XML/HTTP usando MessageContext.HTTP_REQUEST_METHOD igual a {0} com um Argumento de Chamada Nulo. Deve ser: {1}
-invalid.response=Nenhuma resposta retornada.
-invalid.response.deserialization=Falha ao desserializar a resposta.
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.datasource.dispatch.msgmode=N\u00E3o \u00E9 poss\u00EDvel criar o Despacho<DataSource> de Service.Mode.PAYLOAD{0}. Deve ser: {1}
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.soapmessage.dispatch.msgmode=N\u00E3o \u00E9 poss\u00EDvel criar o Despacho<SOAPMessage> de {0}. Deve ser {1}.
-invalid.datasource.dispatch.binding=N\u00E3o \u00E9 poss\u00EDvel criar o Despacho<DataSource> com {0}. Deve ser: {1}
-invalid.soapmessage.dispatch.binding=N\u00E3o \u00E9 poss\u00EDvel criar o Despacho<SOAPMessage> com o Bind {0}. Deve ser: Bind {1}.
-invalid.query.string=N\u00E3o \u00E9 poss\u00EDvel resolver o endere\u00E7o do ponto final usando a string de consulta fornecida: {0}
-invalid.uri.path.query=N\u00E3o \u00E9 poss\u00EDvel construir um URI com estas informa\u00E7\u00F5es de caminho {0} e esta string de consulta {1}.
-invalid.uri=String do Ponto Final: {0} \u00E9 um URI inv\u00E1lido.
-invalid.uri.decode=N\u00E3o \u00E9 poss\u00EDvel decodificar o ponto final resolvido usando a codifica\u00E7\u00E3o UTF-8.
-invalid.uri.resolution=N\u00E3o \u00E9 poss\u00EDvel resolver o endere\u00E7o do ponto final usando o caminho fornecido: {0}
-duplicate.port=WSDLPort {0} j\u00E1 existe. N\u00E3o \u00E9 poss\u00EDvel criar uma porta com o mesmo QName.
-invalid.query.leading.char=''?'' \u00E0 esquerda de MessageContext.QUERY_STRING: {0} n\u00E3o \u00E9 v\u00E1lida. Remover ''?'' e executar novamente.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_CN.properties
deleted file mode 100644
index daf3632b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_CN.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-invalid.nullarg.soap.msgmode=\u4E0D\u5141\u8BB8\u5BF9{0}\u4E2D\u7684 SOAP/HTTP \u7ED1\u5B9A\u4F7F\u7528\u7A7A\u8C03\u7528\u53C2\u6570\u3002\u5FC5\u987B\u4E3A: {1}
-# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET
-invalid.nullarg.xmlhttp.request.method=\u4E0D\u5141\u8BB8 XML/HTTP \u8BF7\u6C42\u4F7F\u7528\u201CMessageContext.HTTP_REQUEST_METHOD = {0}\u201D\u5E76\u4E14\u5177\u6709\u7A7A\u8C03\u7528\u53C2\u6570\u3002\u5FC5\u987B\u4E3A: {1}
-invalid.response=\u672A\u8FD4\u56DE\u54CD\u5E94\u3002
-invalid.response.deserialization=\u65E0\u6CD5\u53CD\u5E8F\u5217\u5316\u54CD\u5E94\u3002
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.datasource.dispatch.msgmode=\u65E0\u6CD5\u521B\u5EFA Service.Mode.PAYLOAD{0} \u7684 Dispatch<DataSource>\u3002\u5FC5\u987B\u4E3A: {1}
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.soapmessage.dispatch.msgmode=\u65E0\u6CD5\u521B\u5EFA{0}\u7684 Dispatch<SOAPMessage>\u3002\u5FC5\u987B\u4E3A{1}\u3002
-invalid.datasource.dispatch.binding=\u65E0\u6CD5\u4F7F\u7528{0}\u521B\u5EFA Dispatch<DataSource>\u3002\u5FC5\u987B\u4E3A: {1}
-invalid.soapmessage.dispatch.binding=\u65E0\u6CD5\u4F7F\u7528{0}\u7ED1\u5B9A\u521B\u5EFA Dispatch<SOAPMessage>\u3002\u5FC5\u987B\u4E3A: {1}\u7ED1\u5B9A\u3002
-invalid.query.string=\u65E0\u6CD5\u4F7F\u7528\u63D0\u4F9B\u7684\u67E5\u8BE2\u5B57\u7B26\u4E32\u89E3\u6790\u7AEF\u70B9\u5730\u5740: {0}\u3002
-invalid.uri.path.query=\u65E0\u6CD5\u4F7F\u7528\u6B64\u8DEF\u5F84\u4FE1\u606F{0}\u548C\u6B64\u67E5\u8BE2\u5B57\u7B26\u4E32{1}\u6784\u9020 URI\u3002
-invalid.uri=\u7AEF\u70B9\u5B57\u7B26\u4E32{0}\u662F\u65E0\u6548\u7684 URI\u3002
-invalid.uri.decode=\u65E0\u6CD5\u4F7F\u7528 UTF-8 \u7F16\u7801\u5BF9\u89E3\u6790\u7684\u7AEF\u70B9\u8FDB\u884C\u89E3\u7801\u3002
-invalid.uri.resolution=\u65E0\u6CD5\u4F7F\u7528\u63D0\u4F9B\u7684\u8DEF\u5F84\u89E3\u6790\u7AEF\u70B9\u5730\u5740: {0}\u3002
-duplicate.port=WSDLPort {0} \u5DF2\u5B58\u5728\u3002\u65E0\u6CD5\u521B\u5EFA QName \u76F8\u540C\u7684\u7AEF\u53E3\u3002
-invalid.query.leading.char=MessageContext.QUERY_STRING {0}\u7684\u524D\u5BFC ''?'' \u65E0\u6548\u3002\u8BF7\u5220\u9664 ''?'' \u5E76\u91CD\u65B0\u8FD0\u884C\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_TW.properties
deleted file mode 100644
index 5eb2bd0e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_TW.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-invalid.nullarg.soap.msgmode={0} \u4E2D\u7684 SOAP/HTTP \u9023\u7D50\u4E0D\u5141\u8A31\u7A7A\u503C\u7684\u547C\u53EB\u5F15\u6578. \u5FC5\u9808\u70BA: {1}
-# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET
-invalid.nullarg.xmlhttp.request.method=\u4F7F\u7528 MessageContext.HTTP_REQUEST_METHOD \u7B49\u65BC {0} \u7684 XML/HTTP \u8981\u6C42, \u4E0D\u5F97\u6709\u7A7A\u503C\u7684\u547C\u53EB\u5F15\u6578. \u5FC5\u9808\u70BA: {1}
-invalid.response=\u672A\u50B3\u56DE\u4EFB\u4F55\u56DE\u61C9.
-invalid.response.deserialization=\u7121\u6CD5\u53D6\u6D88\u5E8F\u5217\u5316\u56DE\u61C9.
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.datasource.dispatch.msgmode=\u7121\u6CD5\u5EFA\u7ACB Service.Mode.PAYLOAD{0} \u7684 Dispatch<DataSource>. \u5FC5\u9808\u70BA: {1}
-# {0} - "PAYLOAD", {1} - "MESSAGE"
-invalid.soapmessage.dispatch.msgmode=\u7121\u6CD5\u5EFA\u7ACB {0} \u7684 Dispatch<SOAPMessage>. \u5FC5\u9808\u70BA {1}.
-invalid.datasource.dispatch.binding=\u7121\u6CD5\u5EFA\u7ACB\u542B\u6709 {0} \u7684 Dispatch<DataSource>. \u5FC5\u9808\u70BA: {1}
-invalid.soapmessage.dispatch.binding=\u7121\u6CD5\u5EFA\u7ACB\u542B\u6709 {0} \u9023\u7D50\u7684 Dispatch<SOAPMessage>. \u5FC5\u9808\u70BA: {1} \u9023\u7D50.
-invalid.query.string=\u7121\u6CD5\u4F7F\u7528\u63D0\u4F9B\u7684\u67E5\u8A62\u5B57\u4E32\u89E3\u6790\u7AEF\u9EDE\u4F4D\u5740: {0}.
-invalid.uri.path.query=\u7121\u6CD5\u4F7F\u7528\u6B64\u8DEF\u5F91\u8CC7\u8A0A {0} \u8207\u6B64\u67E5\u8A62\u5B57\u4E32 {1} \u4F86\u5EFA\u69CB URI.
-invalid.uri=\u7AEF\u9EDE\u5B57\u4E32: {0} \u662F\u7121\u6548\u7684 URI.
-invalid.uri.decode=\u7121\u6CD5\u4F7F\u7528 UTF-8 \u7DE8\u78BC\u4F86\u89E3\u78BC\u89E3\u6790\u7684\u7AEF\u9EDE.
-invalid.uri.resolution=\u7121\u6CD5\u4F7F\u7528\u63D0\u4F9B\u7684\u8DEF\u5F91\u89E3\u6790\u7AEF\u9EDE\u4F4D\u5740: {0}.
-duplicate.port=WSDLPort {0} \u5DF2\u5B58\u5728. \u7121\u6CD5\u5EFA\u7ACB\u76F8\u540C QName \u7684\u9023\u63A5\u57E0.
-invalid.query.leading.char=MessageContext.QUERY_STRING: {0} \u524D\u7AEF\u7684 ''?'' \u7121\u6548. \u8ACB\u79FB\u9664 ''?'' \u5F8C\u518D\u6B21\u57F7\u884C.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding.properties
deleted file mode 100644
index f002d244..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#nested
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedSerializationError=serialization error: {0}
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedDeserializationError=deserialization error: {0}
-nestedEncodingError=encoding error: {0}
-
-noSuchContentId=There''s no attachment for the content ID "{0}"
-
-#EncoderDecoder
-exception.notfound=exception class: {0} not found in the model!
-exception.incorrectType=incorrect type. Expected java.lang.Exception, found {0}
-# Usage not found. TODO Remove
-#incorrect.messageinfo=can't write object! unexpected type: {0}
-# Usage not found. TODO Remove
-#unknown.object=don\'t know how to write object: {0}
-xsd.unknownPrefix=unknown prefix \"{0}\"
-xsd.unexpectedElementName=unexpected element name: expected={0}, actual: {1}
-
-failed.to.read.response=Failed to read a response: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_de.properties
deleted file mode 100644
index 827a66eb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_de.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#nested
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedSerializationError=Serialisierungsfehler: {0}
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedDeserializationError=Deserialisierungsfehler: {0}
-nestedEncodingError=Codierungsfehler: {0}
-
-noSuchContentId=Es ist kein Anhang f\u00FCr diese Content-ID "{0}" vorhanden
-
-#EncoderDecoder
-exception.notfound=Ausnahmeklasse: {0} im Modell nicht gefunden.
-exception.incorrectType=ung\u00FCltiger Typ. Java.lang.Exception wurde erwartet, {0} gefunden
-# Usage not found. TODO Remove
-#incorrect.messageinfo=can't write object! unexpected type: {0}
-# Usage not found. TODO Remove
-#unknown.object=don\'t know how to write object: {0}
-xsd.unknownPrefix=unbekanntes Pr\u00E4fix ''{0}''
-xsd.unexpectedElementName=Unerwarteter Elementname: erwartet={0}, tats\u00E4chlich={1}
-
-failed.to.read.response=Eine Antwort konnte nicht gelesen werden: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_es.properties
deleted file mode 100644
index badbf0a4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_es.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#nested
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedSerializationError=error de serializaci\u00F3n: {0}
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedDeserializationError=error de anulaci\u00F3n de serializaci\u00F3n: {0}
-nestedEncodingError=error de codificaci\u00F3n: {0}
-
-noSuchContentId=No hay ning\u00FAn anexo para el identificador de contenido "{0}"
-
-#EncoderDecoder
-exception.notfound=la clase de excepci\u00F3n: {0} no se ha encontrado en el modelo.
-exception.incorrectType=tipo incorrecto. Se esperaba java.lang.Exception, pero se ha encontrado {0}
-# Usage not found. TODO Remove
-#incorrect.messageinfo=can't write object! unexpected type: {0}
-# Usage not found. TODO Remove
-#unknown.object=don\'t know how to write object: {0}
-xsd.unknownPrefix=prefijo desconocido \"{0}\"
-xsd.unexpectedElementName=nombre de elemento inesperado: se esperaba={0}, valor real:{1}
-
-failed.to.read.response=Fallo al leer una respuesta: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_fr.properties
deleted file mode 100644
index 37b14eb7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_fr.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#nested
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedSerializationError=erreur de s\u00E9rialisation : {0}
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedDeserializationError=erreur de d\u00E9s\u00E9rialisation : {0}
-nestedEncodingError=erreur d''encodage : {0}
-
-noSuchContentId=Il n''existe aucune pi\u00E8ce jointe pour l''ID de contenu "{0}"
-
-#EncoderDecoder
-exception.notfound=classe d''exception {0} introuvable dans le mod\u00E8le.
-exception.incorrectType=type incorrect. Exception java.lang.Exception attendue, {0} trouv\u00E9e
-# Usage not found. TODO Remove
-#incorrect.messageinfo=can't write object! unexpected type: {0}
-# Usage not found. TODO Remove
-#unknown.object=don\'t know how to write object: {0}
-xsd.unknownPrefix=pr\u00E9fixe \"{0}\" inconnu
-xsd.unexpectedElementName=nom d''\u00E9l\u00E9ment inattendu : attendu={0}, obtenu={1}
-
-failed.to.read.response=Echec de la lecture d''une r\u00E9ponse : {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_it.properties
deleted file mode 100644
index da2c100b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_it.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#nested
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedSerializationError=errore di serializzazione: {0}
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedDeserializationError=errore di deserializzazione: {0}
-nestedEncodingError=errore di codifica: {0}
-
-noSuchContentId=Non \u00E8 presente alcun allegato per l''ID contenuto "{0}"
-
-#EncoderDecoder
-exception.notfound=classe di eccezione: {0} non trovato nel modello
-exception.incorrectType=tipo errato. Previsto java.lang.Exception, trovato {0}
-# Usage not found. TODO Remove
-#incorrect.messageinfo=can't write object! unexpected type: {0}
-# Usage not found. TODO Remove
-#unknown.object=don\'t know how to write object: {0}
-xsd.unknownPrefix=prefisso sconosciuto \"{0}\"
-xsd.unexpectedElementName=nome elemento imprevisto: previsto={0}, effettivo: {1}
-
-failed.to.read.response=Lettura di una risposta non riuscita: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ja.properties
deleted file mode 100644
index adc31fdf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ja.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#nested
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedSerializationError=\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3\u30FB\u30A8\u30E9\u30FC: {0}
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedDeserializationError=\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3\u30FB\u30A8\u30E9\u30FC: {0}
-nestedEncodingError=\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u30FB\u30A8\u30E9\u30FC: {0}
-
-noSuchContentId=\u30B3\u30F3\u30C6\u30F3\u30C4ID "{0}"\u306E\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u305B\u3093
-
-#EncoderDecoder
-exception.notfound=\u4F8B\u5916\u30AF\u30E9\u30B9: {0}\u304C\u30E2\u30C7\u30EB\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
-exception.incorrectType=\u4E0D\u6B63\u306A\u30BF\u30A4\u30D7\u3067\u3059\u3002java.lang.Exception\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001{0}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-# Usage not found. TODO Remove
-#incorrect.messageinfo=can't write object! unexpected type: {0}
-# Usage not found. TODO Remove
-#unknown.object=don\'t know how to write object: {0}
-xsd.unknownPrefix=\u63A5\u982D\u8F9E\"{0}\"\u304C\u4E0D\u660E\u3067\u3059
-xsd.unexpectedElementName=\u4E88\u671F\u3057\u306A\u3044\u8981\u7D20\u540D: \u4E88\u671F={0}\u3001\u5B9F\u969B: {1}
-
-failed.to.read.response=\u30EC\u30B9\u30DD\u30F3\u30B9\u306E\u8AAD\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ko.properties
deleted file mode 100644
index 0901727b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ko.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#nested
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedSerializationError=\uC9C1\uB82C\uD654 \uC624\uB958: {0}
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedDeserializationError=\uC9C1\uB82C\uD654 \uD574\uC81C \uC624\uB958: {0}
-nestedEncodingError=\uC778\uCF54\uB529 \uC624\uB958: {0}
-
-noSuchContentId=\uCF58\uD150\uCE20 ID "{0}"\uC5D0 \uB300\uD55C \uCCA8\uBD80 \uD30C\uC77C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-#EncoderDecoder
-exception.notfound=\uC608\uC678 \uC0AC\uD56D \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uBAA8\uB378\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!
-exception.incorrectType=\uC720\uD615\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. java.lang.Exception\uC774 \uD544\uC694\uD558\uC9C0\uB9CC {0}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-# Usage not found. TODO Remove
-#incorrect.messageinfo=can't write object! unexpected type: {0}
-# Usage not found. TODO Remove
-#unknown.object=don\'t know how to write object: {0}
-xsd.unknownPrefix=\"{0}\"\uC740(\uB294) \uC54C \uC218 \uC5C6\uB294 \uC811\uB450\uC5B4\uC785\uB2C8\uB2E4.
-xsd.unexpectedElementName=\uC608\uC0C1\uCE58 \uC54A\uC740 \uC694\uC18C \uC774\uB984: {0}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {1}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-failed.to.read.response=\uC751\uB2F5 \uC77D\uAE30 \uC2E4\uD328: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_pt_BR.properties
deleted file mode 100644
index 790c9905..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_pt_BR.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#nested
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedSerializationError=erro de serializa\u00E7\u00E3o: {0}
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedDeserializationError=erro de desserializa\u00E7\u00E3o: {0}
-nestedEncodingError=erro de codifica\u00E7\u00E3o: {0}
-
-noSuchContentId=N\u00E3o h\u00E1 anexo para o ID de conte\u00FAdo "{0}"
-
-#EncoderDecoder
-exception.notfound=classe de exce\u00E7\u00E3o {0} n\u00E3o encontrada no modelo!
-exception.incorrectType=tipo incorreto. Esperava java.lang.Exception; encontrou {0}
-# Usage not found. TODO Remove
-#incorrect.messageinfo=can't write object! unexpected type: {0}
-# Usage not found. TODO Remove
-#unknown.object=don\'t know how to write object: {0}
-xsd.unknownPrefix=prefixo desconhecido \"{0}\"
-xsd.unexpectedElementName=nome do elemento inesperado: esperado={0}, real:{1}
-
-failed.to.read.response=Falha ao ler uma resposta: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_CN.properties
deleted file mode 100644
index c2677bf4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_CN.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#nested
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedSerializationError=\u5E8F\u5217\u5316\u9519\u8BEF: {0}
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedDeserializationError=\u53CD\u5E8F\u5217\u5316\u9519\u8BEF: {0}
-nestedEncodingError=\u7F16\u7801\u9519\u8BEF: {0}
-
-noSuchContentId=\u6CA1\u6709\u5185\u5BB9 ID \u4E3A "{0}" \u7684\u9644\u4EF6
-
-#EncoderDecoder
-exception.notfound=\u5728\u6A21\u578B\u4E2D\u672A\u627E\u5230\u5F02\u5E38\u9519\u8BEF\u7C7B{0}!
-exception.incorrectType=\u7C7B\u578B\u4E0D\u6B63\u786E\u3002\u5E94\u4E3A java.lang.Exception, \u4F46\u627E\u5230\u7684\u662F{0}
-# Usage not found. TODO Remove
-#incorrect.messageinfo=can't write object! unexpected type: {0}
-# Usage not found. TODO Remove
-#unknown.object=don\'t know how to write object: {0}
-xsd.unknownPrefix=\u672A\u77E5\u7684\u524D\u7F00 \"{0}\"
-xsd.unexpectedElementName=\u610F\u5916\u7684\u5143\u7D20\u540D: \u5E94\u4E3A{0}, \u5B9E\u9645\u4E3A{1}
-
-failed.to.read.response=\u65E0\u6CD5\u8BFB\u53D6\u54CD\u5E94: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_TW.properties
deleted file mode 100644
index ccc31c54..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_TW.properties
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#nested
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedSerializationError=\u5E8F\u5217\u5316\u932F\u8AA4: {0}
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedDeserializationError=\u9084\u539F\u5E8F\u5217\u5316\u932F\u8AA4: {0}
-nestedEncodingError=\u7DE8\u78BC\u932F\u8AA4: {0}
-
-noSuchContentId=\u5167\u5BB9 ID "{0}" \u6C92\u6709\u9644\u4EF6
-
-#EncoderDecoder
-exception.notfound=\u5728\u6A21\u578B\u4E2D\u627E\u4E0D\u5230\u7570\u5E38\u72C0\u6CC1\u985E\u5225: {0}!
-exception.incorrectType=\u985E\u578B\u4E0D\u6B63\u78BA. \u9810\u671F\u70BA java.lang.Exception, \u767C\u73FE\u7684\u662F {0}
-# Usage not found. TODO Remove
-#incorrect.messageinfo=can't write object! unexpected type: {0}
-# Usage not found. TODO Remove
-#unknown.object=don\'t know how to write object: {0}
-xsd.unknownPrefix=\u4E0D\u660E\u7684\u524D\u7F6E\u78BC \"{0}\"
-xsd.unexpectedElementName=\u672A\u9810\u671F\u7684\u5143\u7D20\u540D\u7A31: \u9810\u671F\u70BA={0}, \u5BE6\u969B\u70BA: {1}
-
-failed.to.read.response=\u7121\u6CD5\u8B80\u53D6\u56DE\u61C9: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler.properties
deleted file mode 100644
index 260b417b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-handler.nestedError=handler error: {0}
-handler.chain.contains.handler.only=A HandlerChain can only contain Handler instances: {0}
-# {1} - exception message
-cannot.instantiate.handler=Unable to instantiate handler: {0} because: {1}
-cannot.extend.handler.directly=Handler {0} must implement LogicalHandler or SOAPHandler.
-# {0} - class name
-handler.not.valid.type= {0} does not implement one of the handler interfaces.
-handler.messageContext.invalid.class= \"{0}\" is not an allowed value for the property \"{1}\"
-handler.predestroy.ignore=Exception ignored from invoking handler @PreDestroy method: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_de.properties
deleted file mode 100644
index f6c1fcbe..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_de.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-handler.nestedError=Handler-Fehler: {0}
-handler.chain.contains.handler.only=Eine HandlerChain darf nur Handler-Instanzen enthalten: {0}
-# {1} - exception message
-cannot.instantiate.handler=Handler kann nicht instanziiert werden: {0}, Ursache: {1}
-cannot.extend.handler.directly=Handler {0} muss LogicalHandler oder SOAPHandler implementieren.
-# {0} - class name
-handler.not.valid.type= {0} implementiert keine der Handler-Schnittstellen.
-handler.messageContext.invalid.class= \"{0}\" ist kein zul\u00E4ssiger Wert f\u00FCr die Eigenschaft \"{1}\"
-handler.predestroy.ignore=Ausnahme bei Aufruf von @PreDestroy-Methode des Handlers ignoriert: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_es.properties
deleted file mode 100644
index d65a4d00..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_es.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-handler.nestedError=error de manejador: {0}
-handler.chain.contains.handler.only=HandlerChain s\u00F3lo puede contener instancias de manejador: {0}
-# {1} - exception message
-cannot.instantiate.handler=No se ha podido instanciar el manejador: {0} porque: {1}
-cannot.extend.handler.directly=El manejador {0} debe implantar LogicalHandler o SOAPHandler.
-# {0} - class name
-handler.not.valid.type= {0} no implanta una de las interfaces del manejador.
-handler.messageContext.invalid.class= \"{0}\" no es un valor permitido para la propiedad \"{1}\"
-handler.predestroy.ignore=Se ha ignorado la excepci\u00F3n al llamar al m\u00E9todo @PreDestroy del manejador: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_fr.properties
deleted file mode 100644
index 26721a7c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_fr.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-handler.nestedError=erreur de gestionnaire : {0}
-handler.chain.contains.handler.only=HandlerChain ne peut contenir que des instances : {0}
-# {1} - exception message
-cannot.instantiate.handler=Impossible d''instancier le gestionnaire {0} car {1}
-cannot.extend.handler.directly=Le gestionnaire {0} doit impl\u00E9menter LogicalHandler ou SOAPHandler.
-# {0} - class name
-handler.not.valid.type= {0} n''impl\u00E9mente aucune interface de gestionnaire.
-handler.messageContext.invalid.class= \"{0}\" n''est pas une valeur autoris\u00E9e pour la propri\u00E9t\u00E9 \"{1}\"
-handler.predestroy.ignore=Exception non prise en compte lors de l''appel de la m\u00E9thode @PreDestroy de gestionnaire : {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_it.properties
deleted file mode 100644
index 7b4c3b44..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_it.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-handler.nestedError=errore dell''handler: {0}
-handler.chain.contains.handler.only=Un HandlerChain pu\u00F2 contenere solo istanze di handler: {0}
-# {1} - exception message
-cannot.instantiate.handler=Impossibile creare un''istanza dell''handler {0} a causa di: {1}
-cannot.extend.handler.directly=L''handler {0} deve implementare LogicalHandler o SOAPHandler.
-# {0} - class name
-handler.not.valid.type= {0} non implementa una delle interfacce dell''handler.
-handler.messageContext.invalid.class= \"{0}\" non \u00E8 un valore consentito per la propriet\u00E0 \"{1}\"
-handler.predestroy.ignore=Eccezione ignorata dal richiamo del metodo @PreDestroy dell''handler: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ja.properties
deleted file mode 100644
index 2d3561c1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ja.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-handler.nestedError=\u30CF\u30F3\u30C9\u30E9\u30FB\u30A8\u30E9\u30FC: {0}
-handler.chain.contains.handler.only=HandlerChain\u306B\u542B\u3081\u3089\u308C\u308B\u306E\u306FHandler\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u306E\u307F\u3067\u3059: {0}
-# {1} - exception message
-cannot.instantiate.handler=\u30CF\u30F3\u30C9\u30E9\u3092\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3067\u304D\u307E\u305B\u3093: {0}\u3002\u7406\u7531: {1}
-cannot.extend.handler.directly=\u30CF\u30F3\u30C9\u30E9{0}\u306FLogicalHandler\u307E\u305F\u306FSOAPHandler\u3092\u5B9F\u88C5\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-# {0} - class name
-handler.not.valid.type= {0}\u306F\u3044\u305A\u308C\u304B\u306E\u30CF\u30F3\u30C9\u30E9\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3092\u5B9F\u88C5\u3057\u3066\u3044\u307E\u305B\u3093\u3002
-handler.messageContext.invalid.class= \"{0}\"\u306F\u3001\u30D7\u30ED\u30D1\u30C6\u30A3\"{1}\"\u306B\u8A31\u53EF\u3055\u308C\u305F\u5024\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-handler.predestroy.ignore=@PreDestroy\u30CF\u30F3\u30C9\u30E9\u30FB\u30E1\u30BD\u30C3\u30C9\u306E\u547C\u51FA\u3057\u304B\u3089\u306E\u4F8B\u5916\u304C\u7121\u8996\u3055\u308C\u307E\u3057\u305F: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ko.properties
deleted file mode 100644
index 3f4a31ef..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ko.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-handler.nestedError=\uCC98\uB9AC\uAE30 \uC624\uB958: {0}
-handler.chain.contains.handler.only=HandlerChain\uC740 \uCC98\uB9AC\uAE30 \uC778\uC2A4\uD134\uC2A4\uB9CC \uD3EC\uD568\uD560 \uC218 \uC788\uC74C: {0}
-# {1} - exception message
-cannot.instantiate.handler={0} \uCC98\uB9AC\uAE30\uB97C \uC778\uC2A4\uD134\uC2A4\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC6D0\uC778: {1}
-cannot.extend.handler.directly={0} \uCC98\uB9AC\uAE30\uB294 LogicalHandler \uB610\uB294 SOAPHandler\uB97C \uAD6C\uD604\uD574\uC57C \uD569\uB2C8\uB2E4.
-# {0} - class name
-handler.not.valid.type= {0}\uC740(\uB294) \uCC98\uB9AC\uAE30 \uC778\uD130\uD398\uC774\uC2A4 \uC911 \uD558\uB098\uB97C \uAD6C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-handler.messageContext.invalid.class= \"{0}\"\uC740(\uB294) \"{1}\" \uC18D\uC131\uC5D0 \uB300\uD574 \uD5C8\uC6A9\uB418\uB294 \uAC12\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-handler.predestroy.ignore=\uD638\uCD9C\uD558\uB294 \uCC98\uB9AC\uAE30 @PreDestroy \uBA54\uC18C\uB4DC\uC5D0\uC11C \uC608\uC678 \uC0AC\uD56D\uC774 \uBB34\uC2DC\uB428: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_pt_BR.properties
deleted file mode 100644
index a349dfea..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_pt_BR.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-handler.nestedError=erro de handler: {0}
-handler.chain.contains.handler.only=Uma HandlerChain somente pode conter inst\u00E2ncias de Handler: {0}
-# {1} - exception message
-cannot.instantiate.handler=N\u00E3o \u00E9 poss\u00EDvel instanciar o handler {0} em decorr\u00EAncia de {1}
-cannot.extend.handler.directly=O handler {0} deve implementar LogicalHandler ou SOAPHandler.
-# {0} - class name
-handler.not.valid.type= {0} n\u00E3o implementa uma das interfaces do handler.
-handler.messageContext.invalid.class= \"{0}\" n\u00E3o \u00E9 um valor permitido da propriedade \"{1}\"
-handler.predestroy.ignore=Exce\u00E7\u00E3o ignorada do m\u00E9todo @PreDestroy do handler de chamada: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_CN.properties
deleted file mode 100644
index a9f11170..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_CN.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-handler.nestedError=\u5904\u7406\u7A0B\u5E8F\u9519\u8BEF: {0}
-handler.chain.contains.handler.only=HandlerChain \u53EA\u80FD\u5305\u542B\u5904\u7406\u7A0B\u5E8F\u5B9E\u4F8B: {0}
-# {1} - exception message
-cannot.instantiate.handler=\u65E0\u6CD5\u5B9E\u4F8B\u5316\u5904\u7406\u7A0B\u5E8F: {0}, \u539F\u56E0\u662F: {1}
-cannot.extend.handler.directly=\u5904\u7406\u7A0B\u5E8F{0}\u5FC5\u987B\u5B9E\u73B0 LogicalHandler \u6216 SOAPHandler\u3002
-# {0} - class name
-handler.not.valid.type= {0}\u672A\u5B9E\u73B0\u5904\u7406\u7A0B\u5E8F\u63A5\u53E3\u4E4B\u4E00\u3002
-handler.messageContext.invalid.class= \"{0}\" \u4E0D\u662F\u5C5E\u6027 \"{1}\" \u7684\u5141\u8BB8\u503C
-handler.predestroy.ignore=\u5728\u8C03\u7528\u5904\u7406\u7A0B\u5E8F @PreDestroy \u65B9\u6CD5\u671F\u95F4\u5FFD\u7565\u5F02\u5E38\u9519\u8BEF: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_TW.properties
deleted file mode 100644
index bcdabde4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_TW.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-handler.nestedError=\u8655\u7406\u7A0B\u5F0F\u932F\u8AA4: {0}
-handler.chain.contains.handler.only=HandlerChain \u53EA\u80FD\u5305\u542B\u300C\u8655\u7406\u7A0B\u5F0F\u300D\u57F7\u884C\u8655\u7406: {0}
-# {1} - exception message
-cannot.instantiate.handler=\u7121\u6CD5\u5EFA\u7ACB\u8655\u7406\u7A0B\u5F0F: {0} \u56E0\u70BA: {1}
-cannot.extend.handler.directly=\u8655\u7406\u7A0B\u5F0F {0} \u5FC5\u9808\u5BE6\u884C LogicalHandler \u6216 SOAPHandler.
-# {0} - class name
-handler.not.valid.type= {0} \u672A\u5BE6\u884C\u5176\u4E2D\u4E00\u500B\u8655\u7406\u7A0B\u5F0F\u4ECB\u9762.
-handler.messageContext.invalid.class= \"{0}\" \u4E0D\u662F\u7279\u6027 \"{1}\" \u7684\u5141\u8A31\u503C
-handler.predestroy.ignore=\u547C\u53EB\u8655\u7406\u7A0B\u5F0F @PreDestroy \u65B9\u6CD5: {0} \u7684\u7570\u5E38\u72C0\u6CC1\u5DF2\u5FFD\u7565
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver.properties
deleted file mode 100644
index 9ed1e92e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-unexpected.http.method=Cannot handle HTTP method: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_de.properties
deleted file mode 100644
index 58133cbc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_de.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-unexpected.http.method=HTTP-Methode kann nicht verarbeitet werden: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_es.properties
deleted file mode 100644
index 6d762bae..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_es.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-unexpected.http.method=No se puede manejar el m\u00E9todo HTTP: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_fr.properties
deleted file mode 100644
index 09afaee3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_fr.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-unexpected.http.method=Impossible de g\u00E9rer la m\u00E9thode HTTP : {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_it.properties
deleted file mode 100644
index 94a6c7d5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_it.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-unexpected.http.method=Impossibile gestire il metodo HTTP: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ja.properties
deleted file mode 100644
index 0e187be0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ja.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-unexpected.http.method=HTTP\u30E1\u30BD\u30C3\u30C9: {0}\u3092\u51E6\u7406\u3067\u304D\u307E\u305B\u3093
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ko.properties
deleted file mode 100644
index b4bf24a6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ko.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-unexpected.http.method=HTTP \uBA54\uC18C\uB4DC\uB97C \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC74C: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_pt_BR.properties
deleted file mode 100644
index 4d9c0972..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_pt_BR.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-unexpected.http.method=N\u00E3o \u00E9 poss\u00EDvel tratar o m\u00E9todo HTTP: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_CN.properties
deleted file mode 100644
index afaf92e0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_CN.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-unexpected.http.method=\u65E0\u6CD5\u5904\u7406 HTTP \u65B9\u6CD5: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_TW.properties
deleted file mode 100644
index a14c9803..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_TW.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-unexpected.http.method=\u7121\u6CD5\u8655\u7406 HTTP \u65B9\u6CD5: {0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management.properties
deleted file mode 100644
index 323d032a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSM_1001_FAILED_ASSERTION=WSM1001: Failed to get policy assertion {0}.
-WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: Expected policy assertion {0} in this namespace.
-WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: Policy assertion {0} must have id attribute when management is enabled.
-WSM_1004_EXPECTED_XML_TAG=WSM1004: Expected tag <{0}> but instead read <{1}>.
-WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: Expected to find a CommunicationServerImplementation tag as child node of CommunicationServerImplementations.
-WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: The management property of the ManagedClient policy assertion is set to on. Clients cannot be managed and this setting will be ignored.
-WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: Failed to create a ModelTranslator instance.
-WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: Expected an integer as value of the endpointDisposeDelay attribute, got this instead: "{0}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_de.properties
deleted file mode 100644
index 1a4beefe..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_de.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSM_1001_FAILED_ASSERTION=WSM1001: Policy-Assertion {0} konnte nicht abgerufen werden.
-WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: Policy-Assertion {0} in diesem Namespace erwartet.
-WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: Policy-Assertion {0} muss ID-Attribut haben, wenn Management aktiviert ist.
-WSM_1004_EXPECTED_XML_TAG=WSM1004: Tag <{0}> wurde erwartet, stattdessen wurde <{1}> gelesen.
-WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: CommunicationServerImplementation-Tag wurde als untergeordneter Knoten von CommunicationServerImplementations erwartet.
-WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: Die Managementeigenschaft der ManagedClient Policy-Assertion ist aktiviert. Clients k\u00F6nnen nicht verwaltet werden, und diese Einstellung wird ignoriert.
-WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: ModelTranslator-Instanz konnte nicht erstellt werden.
-WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: Eine Ganzzahl wurde als Wert des Attributs endpointDisposeDelay erwartet, stattdessen wurde "{0}" erhalten.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_es.properties
deleted file mode 100644
index 0a7ba98b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_es.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSM_1001_FAILED_ASSERTION=WSM1001: fallo al obtener la afirmaci\u00F3n de pol\u00EDtica {0}.
-WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: afirmaci\u00F3n de pol\u00EDtica esperada {0} en este espacio de nombres.
-WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: la afirmaci\u00F3n de pol\u00EDtica {0} debe tener un atributo de identificador si la gesti\u00F3n est\u00E1 activada.
-WSM_1004_EXPECTED_XML_TAG=WSM1004: se esperaba la etiqueta <{0}>, pero se ha le\u00EDdo <{1}>.
-WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: se esperaba encontrar una etiqueta CommunicationServerImplementation como nodo secundario de CommunicationServerImplementations.
-WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: la propiedad de gesti\u00F3n de la afirmaci\u00F3n de pol\u00EDtica ManagedClient est\u00E1 activada. Los clientes no se pueden gestionar y este valor se ignorar\u00E1.
-WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: fallo al crear una instancia de ModelTranslator.
-WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: se esperaba un entero como valor del atributo endpointDisposeDelay, pero se ha obtenido esto: "{0}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_fr.properties
deleted file mode 100644
index 1382d1a2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_fr.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSM_1001_FAILED_ASSERTION=WSM1001 : \u00E9chec de l''obtention de l''assertion de strat\u00E9gie {0}.
-WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002 : assertion de strat\u00E9gie {0} attendue dans cet espace de noms.
-WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003 : l''assertion de strat\u00E9gie {0} doit avoir un attribut d''ID lorsque la gestion est activ\u00E9e.
-WSM_1004_EXPECTED_XML_TAG=WSM1004 : balise <{0}> attendue mais <{1}> lue \u00E0 la place.
-WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005 : balise CommunicationServerImplementation attendue en tant que noeud enfant de CommunicationServerImplementations.
-WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006 : la propri\u00E9t\u00E9 de gestion de l'assertion de strat\u00E9gie ManagedClient est activ\u00E9e. Les clients ne peuvent pas \u00EAtre g\u00E9r\u00E9s et ce param\u00E8tre ne sera pas pris en compte.
-WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007 : impossible de cr\u00E9er une instance ModelTranslator.
-WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008 : entier attendu en tant que valeur de l''attribut endpointDisposeDelay, obtention de "{0}" \u00E0 la place.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_it.properties
deleted file mode 100644
index 9cc306c6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_it.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSM_1001_FAILED_ASSERTION=WSM1001: Recupero dell''asserzione dei criteri non riuscito {0}.
-WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: Asserzione dei criteri {0} previsto in questo spazio di nomi.
-WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: L''asserzione dei criteri {0} deve avere un attributo ID quando \u00E8 abilitata la gestione.
-WSM_1004_EXPECTED_XML_TAG=WSM1004: Prevista tag <{0}> ma letta invece <{1}>.
-WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: Prevista una tag CommunicationServerImplementation come nodo figlio di CommunicationServerImplementations.
-WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: La propriet\u00E0 di gestione dell'asserzione dei criteri ManagedClient \u00E8 impostata su attivo. I client non possono essere gestiti e questa impostazione verr\u00E0 ignorata.
-WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: Creazione di un'istanza ModelTranslator non riuscita.
-WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: Previsto un numero intero come valore dell''attributo endpointDisposeDelay, ottenuto invece: "{0}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ja.properties
deleted file mode 100644
index 20168ba4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ja.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSM_1001_FAILED_ASSERTION=WSM1001: \u30DD\u30EA\u30B7\u30FC\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3{0}\u306E\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: \u3053\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3067\u306F\u30DD\u30EA\u30B7\u30FC\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3{0}\u304C\u4E88\u671F\u3055\u308C\u307E\u3059\u3002
-WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: \u7BA1\u7406\u304C\u6709\u52B9\u3067\u3042\u308B\u5834\u5408\u3001\u30DD\u30B7\u30EA\u30FC\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3{0}\u306B\u306Fid\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002
-WSM_1004_EXPECTED_XML_TAG=WSM1004: \u30BF\u30B0<{0}>\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001\u304B\u308F\u308A\u306B<{1}>\u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002
-WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: CommunicationServerImplementations\u306E\u5B50\u30CE\u30FC\u30C9\u3068\u3057\u3066CommunicationServerImplementation\u30BF\u30B0\u3092\u691C\u51FA\u3059\u308B\u3053\u3068\u304C\u4E88\u671F\u3055\u308C\u307E\u3059\u3002
-WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: ManagedClient\u30DD\u30EA\u30B7\u30FC\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u306E\u7BA1\u7406\u30D7\u30ED\u30D1\u30C6\u30A3\u306F\u30AA\u30F3\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306F\u7BA1\u7406\u3067\u304D\u305A\u3001\u3053\u306E\u8A2D\u5B9A\u306F\u7121\u8996\u3055\u308C\u307E\u3059\u3002
-WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: ModelTranslator\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u306E\u4F5C\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: endpointDisposeDelay\u5C5E\u6027\u306E\u5024\u3068\u3057\u3066\u6574\u6570\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001\u304B\u308F\u308A\u306B\u6B21\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F: "{0}"\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ko.properties
deleted file mode 100644
index 790bc622..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ko.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSM_1001_FAILED_ASSERTION=WSM1001: \uC815\uCC45 \uBA85\uC81C {0} \uAC00\uC838\uC624\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: \uC774 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uC815\uCC45 \uBA85\uC81C {0}\uC774(\uAC00) \uD544\uC694\uD569\uB2C8\uB2E4.
-WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: \uAD00\uB9AC\uAC00 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 \uC815\uCC45 \uBA85\uC81C {0}\uC5D0 ID \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-WSM_1004_EXPECTED_XML_TAG=WSM1004: <{0}> \uD0DC\uADF8\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC \uB300\uC2E0 <{1}>\uC744(\uB97C) \uC77D\uC5C8\uC2B5\uB2C8\uB2E4.
-WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: CommunicationServerImplementations\uC758 \uD558\uC704 \uB178\uB4DC\uB85C CommunicationServerImplementation \uD0DC\uADF8\uB97C \uCC3E\uC544\uC57C \uD569\uB2C8\uB2E4.
-WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: ManagedClient \uC815\uCC45 \uBA85\uC81C\uC758 management \uC18D\uC131\uC774 on\uC73C\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uD074\uB77C\uC774\uC5B8\uD2B8\uB97C \uAD00\uB9AC\uD560 \uC218 \uC5C6\uC73C\uBA70 \uC774 \uC124\uC815\uC774 \uBB34\uC2DC\uB429\uB2C8\uB2E4.
-WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: ModelTranslator \uC778\uC2A4\uD134\uC2A4 \uC0DD\uC131\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: endpointDisposeDelay \uC18D\uC131\uAC12\uC73C\uB85C \uC815\uC218\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC \uB300\uC2E0 "{0}"\uC744(\uB97C) \uAC00\uC838\uC654\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_pt_BR.properties
deleted file mode 100644
index 7d91849b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_pt_BR.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSM_1001_FAILED_ASSERTION=WSM1001: falha ao obter a asser\u00E7\u00E3o da pol\u00EDtica {0}.
-WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: era esperada a asser\u00E7\u00E3o da pol\u00EDtica {0} neste namespace.
-WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: a asser\u00E7\u00E3o {0} da pol\u00EDtica dever\u00E1 ter o atributo do id quando o gerenciamento estiver ativado.
-WSM_1004_EXPECTED_XML_TAG=WSM1004: esperada a tag <{0}> mas, leu <{1}>.
-WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: esperava localizar uma tag CommunicationServerImplementation como n\u00F3 do filho de CommunicationServerImplementations.
-WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: a propriedade de gerenciamento da asser\u00E7\u00E3o da pol\u00EDtica ManagedClient foi definida como ativada. Os clientes n\u00E3o podem ser gerenciados e esta defini\u00E7\u00E3o ser\u00E1 ignorada.
-WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: falha ao criar uma inst\u00E2ncia ModelTranslator.
-WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: esperava um n\u00FAmero inteiro como valor do atributo endpointDisposeDelay, mas obteve: "{0}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_CN.properties
deleted file mode 100644
index 96a791cf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_CN.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSM_1001_FAILED_ASSERTION=WSM1001: \u65E0\u6CD5\u83B7\u53D6\u7B56\u7565\u65AD\u8A00{0}\u3002
-WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: \u6B64\u540D\u79F0\u7A7A\u95F4\u4E2D\u5E94\u6709\u7B56\u7565\u65AD\u8A00{0}\u3002
-WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: \u542F\u7528\u7BA1\u7406\u65F6\u7B56\u7565\u65AD\u8A00{0}\u5FC5\u987B\u5177\u6709 ID \u5C5E\u6027\u3002
-WSM_1004_EXPECTED_XML_TAG=WSM1004: \u5E94\u4E3A\u6807\u8BB0 <{0}> \u800C\u663E\u793A\u7684\u662F <{1}>\u3002
-WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: \u5E94\u627E\u5230 CommunicationServerImplementation \u6807\u8BB0\u4F5C\u4E3A CommunicationServerImplementations \u7684\u5B50\u8282\u70B9\u3002
-WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: ManagedClient \u7B56\u7565\u65AD\u8A00\u7684\u7BA1\u7406\u5C5E\u6027\u8BBE\u7F6E\u4E3A\u542F\u7528\u3002\u65E0\u6CD5\u7BA1\u7406\u5BA2\u6237\u673A, \u5C06\u5FFD\u7565\u6B64\u8BBE\u7F6E\u3002
-WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: \u65E0\u6CD5\u521B\u5EFA ModelTranslator \u5B9E\u4F8B\u3002
-WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: endpointDisposeDelay \u5C5E\u6027\u7684\u503C\u5E94\u4E3A\u6574\u6570, \u800C\u5F97\u5230\u7684\u503C\u4E3A: "{0}"\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_TW.properties
deleted file mode 100644
index fbd910f1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_TW.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSM_1001_FAILED_ASSERTION=WSM1001: \u7121\u6CD5\u53D6\u5F97\u539F\u5247\u5BA3\u544A {0}.
-WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: \u6B64\u547D\u540D\u7A7A\u9593\u4E2D\u9810\u671F\u61C9\u6709\u539F\u5247\u5BA3\u544A {0}.
-WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: \u555F\u7528\u7BA1\u7406\u6642, \u539F\u5247\u5BA3\u544A {0} \u5FC5\u9808\u5305\u542B ID \u5C6C\u6027.
-WSM_1004_EXPECTED_XML_TAG=WSM1004: \u9810\u671F\u70BA\u6A19\u8A18 <{0}>, \u4F46\u8B80\u5230\u7684\u662F <{1}>.
-WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: \u9810\u671F\u627E\u5230\u505A\u70BA CommunicationServerImplementations \u5B50\u7BC0\u9EDE\u7684 CommunicationServerImplementation \u6A19\u8A18.
-WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: ManagedClient \u539F\u5247\u5BA3\u544A\u7684\u7BA1\u7406\u7279\u6027\u8A2D\u70BA\u958B\u555F. \u7121\u6CD5\u7BA1\u7406\u5F9E\u5C6C\u7AEF, \u5C07\u5FFD\u7565\u6B64\u8A2D\u5B9A.
-WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: \u7121\u6CD5\u5EFA\u7ACB ModelTranslator \u57F7\u884C\u8655\u7406.
-WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: \u9810\u671F\u70BA\u6574\u6578\u7684 endpointDisposeDelay \u5C6C\u6027\u503C, \u4F46\u5F97\u5230\u7684\u662F: "{0}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler.properties
deleted file mode 100644
index 71854d9b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler.properties
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedModelerError=runtime modeler error: {0}
-
-runtime.modeler.external.metadata.generic=An error occurred while processing external WS metadata; check configuration/deployment. Nested error: {0}.
-runtime.modeler.external.metadata.unable.to.read=Unable to read metadata file {0}. Check configuration/deployment.
-runtime.modeler.external.metadata.unsupported.schema=Unsupported metadata file schema {0}. Supported schemes are {1}.
-runtime.modeler.external.metadata.wrong.format=Unable to read metadata from {0}. Is the format correct?
-runtime.modeler.no.webservice.annotation=A WebService annotation is not present on class: {0}
-runtime.modeler.endpoint.interface.no.webservice=The Endpoint Interface: {0} does not have WebService Annotation
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.class.not.found=class: {0} could not be found
-# APT - Annotation Processing Tool. Should not be translated.
-runtime.modeler.wrapper.not.found=Wrapper class {0} is not found. Have you run annotation processing to generate them?
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.method.not.found=method: {0} could not be found on class: {1}
-runtime.modeler.webmethod.must.be.public=@WebMethod is not allowed on a non-public method {0}
-runtime.modeler.webmethod.must.be.nonstatic=@WebMethod is not allowed on a static method {0}
-runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod is not allowed on a static or final method {0}
-runtime.modeler.oneway.operation.no.out.parameters=oneway operation should not have OUT parameters class: {0} method: {1}
-runtime.modeler.oneway.operation.no.checked.exceptions=Oneway operation should not throw any checked exceptions class: {0} method: {1} throws: {2}
-runtime.modeler.cannot.get.serviceName.from.interface=The serviceName cannot be retrieved from an interface. class {0}
-runtime.modeler.portname.servicename.namespace.mismatch=The namespace of the serviceName \"{0}\" and the namespace of the portName \"{1}\" must match
-runtime.modeler.no.package=A @WebService.targetNamespace must be specified on classes with no package. Class: {0}
-runtime.modeler.no.operations=The web service defined by the class {0} does not contain any valid WebMethods.
-runtime.modeler.mtom.conflict = Error in @BindingType: MTOM Configuration in binding identifier {0} conflicts with feature @MTOM {1}
-# {0} - feature class name, {1} - feature class name
-runtime.modeler.feature.conflict= Feature {0} in implementation conflicts with {1} in WSDL configuration
-# {0} - absolute class location
-runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API is loaded from {0}, But JAX-WS runtime requires JAX-WS 2.2 API. \
- Use the endorsed standards override mechanism to load JAX-WS 2.2 API
-runtime.modeler.wsfeature.no.ftrconstructor=Annotation {0} is not recognizable, at least one constructor of {1} should be marked with @FeatureConstructor
-runtime.modeler.wsfeature.morethanone.ftrconstructor=Annotation {0} is illegal, Only one constructor of {1} can be marked as @FeatureConstructor
-runtime.modeler.wsfeature.illegal.ftrconstructor=Annotation {0} is illegal, In {1} @FeatureConstructor value doesn't match the constructor parameters
-# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name
-runtime.modeler.invalid.soapbinding.parameterstyle= Incorrect usage of Annotation {0} on {1}, ParameterStyle can only be WRAPPED with RPC Style Web service.
-runtime.modeler.soapbinding.conflict= SOAPBinding Style {0} for method {1} conflicts with global SOAPBinding Style {2}
-runtimemodeler.invalid.soapbindingOnMethod=Invalid annotation: {0} on Method {1} in Class {2}, A method cannot be annotated with @SOAPBinding with Style \"RPC\"
-unable.to.create.JAXBContext=Unable to create JAXBContext
-# BARE is a member of enumeration and should not be translated.
-not.a.valid.bare.method=SEI {0} has method {1} annotated as BARE but it has more than one parameter bound to body. This is invalid. Please annotate the method with annotation: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_de.properties
deleted file mode 100644
index a55f0114..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_de.properties
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedModelerError=Runtime Modeler-Fehler: {0}
-
-runtime.modeler.no.webservice.annotation=Eine WebService-Annotation ist in Klasse nicht vorhanden: {0}
-runtime.modeler.endpoint.interface.no.webservice=Die End Point-Schnittstelle: {0} hat keine WebService-Annotation
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.class.not.found=Klasse: {0} konnte nicht gefunden werden
-# APT - Annotation Processing Tool. Should not be translated.
-runtime.modeler.wrapper.not.found=Wrapper-Klasse {0} wurde nicht gefunden. Haben Sie eine Annotationsverarbeitung ausgef\u00FChrt, um sie zu generieren?
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.method.not.found=Methode: {0} konnte in Klasse nicht gefunden werden: {1}
-runtime.modeler.webmethod.must.be.public=@WebMethod ist bei einer nicht \u00F6ffentlichen Methode {0} nicht zul\u00E4ssig
-runtime.modeler.webmethod.must.be.nonstatic=@WebMethod ist bei einer statischen Methode {0} nicht zul\u00E4ssig
-runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod ist bei einer statischen oder finalen Methode {0} nicht zul\u00E4ssig
-runtime.modeler.oneway.operation.no.out.parameters=Unidirektionaler Vorgang darf keine OUT-Parameterklasse enthalten: {0} Methode: {1}
-runtime.modeler.oneway.operation.no.checked.exceptions=Unidirektionaler Vorgang darf keine gepr\u00FCfte Ausnahmeklasse ausl\u00F6sen: {0}-Methode: {1} l\u00F6st {2} aus
-runtime.modeler.cannot.get.serviceName.from.interface=Der serviceName darf nicht aus einer Schnittstelle abgerufen werden. Klasse {0}
-runtime.modeler.portname.servicename.namespace.mismatch=Der Namespace von serviceName \\"{0}\\" und der Namespace von portName \\"{1}\\" m\u00FCssen \u00FCbereinstimmen
-runtime.modeler.no.package=Ein @WebService.targetNamespace muss f\u00FCr Klassen ohne Package angegeben werden. Klasse: {0}
-runtime.modeler.no.operations=Der Webservice, der von der Klasse {0} definiert wird, enth\u00E4lt keine g\u00FCltigen WebMethods.
-runtime.modeler.mtom.conflict = Fehler bei @BindingType: MTOM-Konfiguration in Binding-ID {0} ist nicht mit Feature @MTOM {1} vereinbar
-# {0} - feature class name, {1} - feature class name
-runtime.modeler.feature.conflict= Feature {0} in Implementierung ist nicht mit {1} in WSDL-Konfiguration vereinbar
-# {0} - absolute class location
-runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API wird aus {0} geladen, die JAX-WS-Laufzeitumgebung erfordert jedoch JAX-WS 2.2 API. Verwenden Sie das "Endorsed Standards Override Mechanism"-Verfahren, um JAX-WS 2.2 API zu laden
-runtime.modeler.wsfeature.no.ftrconstructor=Annotation {0} kann nicht erkannt werden, mindestens ein Konstruktor von {1} muss mit @FeatureConstructor markiert werden
-runtime.modeler.wsfeature.morethanone.ftrconstructor=Annotation {0} ist unzul\u00E4ssig. Nur ein Konstruktor von {1} kann als @FeatureConstructor markiert werden
-runtime.modeler.wsfeature.illegal.ftrconstructor=Annotation {0} ist unzul\u00E4ssig. In {1} stimmt der @FeatureConstructor-Wert nicht mit den Konstruktorparametern \u00FCberein
-# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name
-runtime.modeler.invalid.soapbinding.parameterstyle= Ung\u00FCltige Verwendung von Annotation {0} in {1}, ParameterStyle kann nur WRAPPED bei RPC-Webservice sein.
-runtime.modeler.soapbinding.conflict= SOAPBinding-Stil {0} f\u00FCr Methode {1} ist nicht mit globalem SOAPBinding-Stil {2} vereinbar
-runtimemodeler.invalid.soapbindingOnMethod=Ung\u00FCltige Annotation: {0} in Methode {1} in Klasse {2}. Eine Methode kann nicht mit @SOAPBinding-Annotation mit \\"RPC\\"-Stil versehen werden
-unable.to.create.JAXBContext=JAXBContext kann nicht erstellt werden
-# BARE is a member of enumeration and should not be translated.
-not.a.valid.bare.method=SEI {0} enth\u00E4lt Methode {1} mit Annotation BARE, enth\u00E4lt jedoch mehr als einen Parameter, der an den Nachrichtentext gebunden ist. Dies ist ung\u00FCltig. Versehen Sie die Methode mit folgender Annotation: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_es.properties
deleted file mode 100644
index e0f2a8d5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_es.properties
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedModelerError=error de modelador en tiempo de ejecuci\u00F3n: {0}
-
-runtime.modeler.no.webservice.annotation=No existe una anotaci\u00F3n de WebService en la clase: {0}
-runtime.modeler.endpoint.interface.no.webservice=La interfaz de punto final: {0} no tiene una anotaci\u00F3n de WebService
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.class.not.found=No se ha encontrado la clase: {0}.
-# APT - Annotation Processing Tool. Should not be translated.
-runtime.modeler.wrapper.not.found=No se ha encontrado la clase de envoltorio {0}. \u00BFHa ejecutado la herramienta de procesamiento de anotaciones para generarlas?
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.method.not.found=No se ha encontrado el m\u00E9todo {0} en la clase {1}.
-runtime.modeler.webmethod.must.be.public=@WebMethod no est\u00E1 permitido en un m\u00E9todo no p\u00FAblico {0}
-runtime.modeler.webmethod.must.be.nonstatic=@WebMethod no est\u00E1 permitido en un m\u00E9todo est\u00E1tico {0}
-runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod no est\u00E1 permitido en un m\u00E9todo est\u00E1tico o final {0}
-runtime.modeler.oneway.operation.no.out.parameters=la operaci\u00F3n unidireccional no deber\u00EDa tener la clase de par\u00E1metros OUT: {0} m\u00E9todo: {1}
-runtime.modeler.oneway.operation.no.checked.exceptions=La operaci\u00F3n unidireccional no deber\u00EDa devolver ninguna clase de excepci\u00F3n comprobada: {0} m\u00E9todo: {1} devuelve: {2}
-runtime.modeler.cannot.get.serviceName.from.interface=No se puede recuperar el elemento serviceName de una interfaz. Clase {0}
-runtime.modeler.portname.servicename.namespace.mismatch=El espacio de nombres de serviceName \\"{0}\\" debe coincidir con el espacio de nombres de portName \\"{1}\\"
-runtime.modeler.no.package=Se debe especificar @WebService.targetNamespace en las clases sin paquete. Clase: {0}
-runtime.modeler.no.operations=El servicio web definido por la clase {0} no contiene ning\u00FAn m\u00E9todo web v\u00E1lido.
-runtime.modeler.mtom.conflict = Error en @BindingType: la configuraci\u00F3n de MTOM del identificador de enlace {0} entra en conflicto con la funci\u00F3n @MTOM {1}
-# {0} - feature class name, {1} - feature class name
-runtime.modeler.feature.conflict= La funci\u00F3n {0} de la implantaci\u00F3n entra en conflicto con {1} en la configuraci\u00F3n de WSDL
-# {0} - absolute class location
-runtime.modeler.addressing.responses.nosuchmethod = La API de JAX-WS 2.1 se ha cargado desde {0}, pero JAX-WS en tiempo de ejecuci\u00F3n necesita la API JAX-WS 2.2. Utilice el mecanismo de sustituci\u00F3n de est\u00E1ndares aprobado para cargar la API JAX-WS 2.2
-runtime.modeler.wsfeature.no.ftrconstructor=La anotaci\u00F3n {0} no es reconocible. Al menos un constructor de {1} se deber\u00EDa marcar con @FeatureConstructor
-runtime.modeler.wsfeature.morethanone.ftrconstructor=La anotaci\u00F3n {0} no es v\u00E1lida. S\u00F3lo un constructor de {1} se puede marcar como @FeatureConstructor
-runtime.modeler.wsfeature.illegal.ftrconstructor=La anotaci\u00F3n {0} no es v\u00E1lida. En {1}, el valor de @FeatureConstructor no coincide con los par\u00E1metros del constructor
-# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name
-runtime.modeler.invalid.soapbinding.parameterstyle= Uso incorrecto de la anotaci\u00F3n {0} en {1}. ParameterStyle s\u00F3lo puede ser WRAPPED con el servicio web de estilo RPC.
-runtime.modeler.soapbinding.conflict= El estilo SOAPBinding {0} del m\u00E9todo {1} entra en conflicto con el estilo SOAPBinding global {2}
-runtimemodeler.invalid.soapbindingOnMethod=Anotaci\u00F3n no v\u00E1lida: {0} en el m\u00E9todo {1} de la clase {2}. No se puede anotar un m\u00E9todo con @SOAPBinding con el estilo \\"RPC\\"
-unable.to.create.JAXBContext=No se ha podido crear JAXBContext.
-# BARE is a member of enumeration and should not be translated.
-not.a.valid.bare.method=La interfaz de punto final de servicio {0} tiene anotado el m\u00E9todo {1} como BARE, pero tiene m\u00E1s de un par\u00E1metro enlazado al cuerpo. Esto no es v\u00E1lido. Anote el m\u00E9todo con la anotaci\u00F3n: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_fr.properties
deleted file mode 100644
index 4bbbe060..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_fr.properties
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedModelerError=erreur de modeleur d''ex\u00E9cution : {0}
-
-runtime.modeler.no.webservice.annotation=Aucune annotation WebService ne figure sur la classe {0}
-runtime.modeler.endpoint.interface.no.webservice=L''interface d''adresse {0} ne comporte aucune annotation WebService
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.class.not.found=la classe {0} est introuvable
-# APT - Annotation Processing Tool. Should not be translated.
-runtime.modeler.wrapper.not.found=La classe de wrapper {0} est introuvable. Avez-vous ex\u00E9cut\u00E9 le traitement d''annotation pour la g\u00E9n\u00E9rer ?
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.method.not.found=la m\u00E9thode {0} est introuvable sur la classe {1}
-runtime.modeler.webmethod.must.be.public=@WebMethod n''est pas autoris\u00E9e sur une m\u00E9thode d''un type autre que public {0}
-runtime.modeler.webmethod.must.be.nonstatic=@WebMethod n''est pas autoris\u00E9e sur une m\u00E9thode de type static {0}
-runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod n''est pas autoris\u00E9e sur une m\u00E9thode de type static ou final {0}
-runtime.modeler.oneway.operation.no.out.parameters=une op\u00E9ration unidirectionnelle ne doit pas comporter une classe de param\u00E8tres OUT : {0} m\u00E9thode : {1}
-runtime.modeler.oneway.operation.no.checked.exceptions=L''op\u00E9ration unidirectionnelle ne doit g\u00E9n\u00E9rer aucune classe d''exceptions contr\u00F4l\u00E9es : {0}. La m\u00E9thode {1} g\u00E9n\u00E8re {2}
-runtime.modeler.cannot.get.serviceName.from.interface=L''\u00E9l\u00E9ment serviceName ne peut pas \u00EAtre extrait d''une interface. Classe : {0}
-runtime.modeler.portname.servicename.namespace.mismatch=Les espaces de noms de l''\u00E9l\u00E9ment serviceName \"{0}\" et de l''\u00E9l\u00E9ment portName \"{1}\" doivent correspondre
-runtime.modeler.no.package=Une annotation @WebService.targetNamespace doit \u00EAtre indiqu\u00E9e sur les classes sans package. Classe : {0}
-runtime.modeler.no.operations=Le service Web d\u00E9fini par la classe {0} ne contient aucun \u00E9l\u00E9ment WebMethod valide.
-runtime.modeler.mtom.conflict = Erreur dans @BindingType : la configuration MTOM dans l''identificateur de binding {0} est en conflit avec la fonctionnalit\u00E9 @MTOM {1}
-# {0} - feature class name, {1} - feature class name
-runtime.modeler.feature.conflict= La fonctionnalit\u00E9 {0} dans l''impl\u00E9mentation est en conflit avec {1} dans la configuration WSDL
-# {0} - absolute class location
-runtime.modeler.addressing.responses.nosuchmethod = L''API JAX-WS 2.1 est charg\u00E9 \u00E0 partir de {0}, mais le runtime JAX-WS exige l''API JAX-WS 2.2. Utilisez le m\u00E9canisme Endorsed Standards Override Mechanism pour charger l''API JAX-WS 2.2
-runtime.modeler.wsfeature.no.ftrconstructor=L''annotation {0} n''est pas reconnaissable, au moins un constructeur de {1} doit \u00EAtre marqu\u00E9 avec @FeatureConstructor
-runtime.modeler.wsfeature.morethanone.ftrconstructor=L''annotation {0} est interdite, seul un constructeur de {1} peut \u00EAtre marqu\u00E9 comme @FeatureConstructor
-runtime.modeler.wsfeature.illegal.ftrconstructor=L''annotation {0} est interdite ; dans {1}, la valeur @FeatureConstructor ne correspond pas aux param\u00E8tres constructeur
-# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name
-runtime.modeler.invalid.soapbinding.parameterstyle= Syntaxe incorrecte de l''annotation {0} sur {1}, ParameterStyle ne peut \u00EAtre que WRAPPED avec le service Web de style RPC.
-runtime.modeler.soapbinding.conflict= Le style SOAPBinding {0} de la m\u00E9thode {1} est en conflit avec le style SOAPBinding {2} global
-runtimemodeler.invalid.soapbindingOnMethod=Annotation {0} non valide sur la m\u00E9thode {1} dans la classe {2}, une m\u00E9thode ne peut pas \u00EAtre annot\u00E9e avec @SOAPBinding avec le style \"RPC\"
-unable.to.create.JAXBContext=Impossible de cr\u00E9er JAXBContext
-# BARE is a member of enumeration and should not be translated.
-not.a.valid.bare.method=L''interface d''adresse de service {0} comporte la m\u00E9thode {1} qui est annot\u00E9e comme \u00E9tant BARE mais contient plus d''un param\u00E8tre li\u00E9 au corps. Cela n''est pas valide. Annotez la m\u00E9thode comme suit : @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_it.properties
deleted file mode 100644
index 6efd0ed8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_it.properties
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedModelerError=errore del modeler di runtime: {0}
-
-runtime.modeler.no.webservice.annotation=Annotazione WebService non presente sulla classe: {0}
-runtime.modeler.endpoint.interface.no.webservice=L''interfaccia Endpoint: {0} non dispone dell''annotazione WebService
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.class.not.found=impossibile trovare la classe: {0}
-# APT - Annotation Processing Tool. Should not be translated.
-runtime.modeler.wrapper.not.found=Classe wrapper {0} non trovata. \u00C8 stata eseguita l''elaborazione dell''annotazione per generarla?
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.method.not.found=impossibile trovare il metodo: {0} sulla classe: {1}
-runtime.modeler.webmethod.must.be.public=@WebMethod non \u00E8 consentito su un metodo non pubblico {0}
-runtime.modeler.webmethod.must.be.nonstatic=@WebMethod non \u00E8 consentito su un metodo statico {0}
-runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod non \u00E8 consentito su un metodo statico o finale {0}
-runtime.modeler.oneway.operation.no.out.parameters=l''operazione unidirezionale non deve avere parametri OUT. Classe: {0} metodo: {1}
-runtime.modeler.oneway.operation.no.checked.exceptions=L''operazione unidirezionale non deve restituire eccezioni verificate. Classe: {0} metodo: {1} restituzioni: {2}
-runtime.modeler.cannot.get.serviceName.from.interface=Impossibile recuperare il serviceName da un''interfaccia. Classe {0}
-runtime.modeler.portname.servicename.namespace.mismatch=Lo spazio di nomi del serviceName \"{0}\" e quello del portName \"{1}\" devono corrispondere
-runtime.modeler.no.package=\u00C8 necessario specificare un @WebService.targetNamespace sulle classi senza package. Classe: {0}
-runtime.modeler.no.operations=Il servizio Web definito dalla classe {0} non contiene alcun WebMethods valido.
-runtime.modeler.mtom.conflict = Errore in @BindingType: la configurazione MTOM nell''identificativo di associazione {0} \u00E8 in conflitto con la funzione @MTOM {1}
-# {0} - feature class name, {1} - feature class name
-runtime.modeler.feature.conflict= La funzione {0} nell''implementazione \u00E8 in conflitto con {1} nella configurazione WSDL
-# {0} - absolute class location
-runtime.modeler.addressing.responses.nosuchmethod = L''API JAX-WS 2.1 viene caricata da {0} ma il runtime JAX-WS richiede l''API JAX-WS 2.2. Usare il meccanismo Endorsed Standards Override Mechanism per caricare l''API JAX-WS 2.2
-runtime.modeler.wsfeature.no.ftrconstructor=L''annotazione {0} non \u00E8 riconoscibile. Almeno un costruttore di {1} deve essere contrassegnato con @FeatureConstructor
-runtime.modeler.wsfeature.morethanone.ftrconstructor=L''annotazione {0} non \u00E8 valida. Solo un costruttore di {1} pu\u00F2 essere contrassegnato come @FeatureConstructor
-runtime.modeler.wsfeature.illegal.ftrconstructor=L''annotazione {0} non \u00E8 valida. Il valore {1} @FeatureConstructor non corrisponde ai parametri del costruttore
-# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name
-runtime.modeler.invalid.soapbinding.parameterstyle= Uso errato dell''annotazione {0} su {1}. ParameterStyle pu\u00F2 essere solo WRAPPED con il servizio Web dello stile RPC.
-runtime.modeler.soapbinding.conflict= Lo stile SOAPBinding {0} per il metodo {1} \u00E8 in conflitto con lo stile SOAPBinding globale {2}
-runtimemodeler.invalid.soapbindingOnMethod=Annotazione non valida: {0} sul metodo {1} nella classe {2}. Un metodo non pu\u00F2 essere annotato con @SOAPBinding con lo stile \"RPC\"
-unable.to.create.JAXBContext=Impossibile creare JAXBContext
-# BARE is a member of enumeration and should not be translated.
-not.a.valid.bare.method=SEI {0} ha il metodo {1} annotato come BARE ma ha pi\u00F9 parametri associati al corpo. Questo non \u00E8 valido. Annotare il metodo con l''annotazione: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ja.properties
deleted file mode 100644
index 21c0c5c1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ja.properties
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedModelerError=\u5B9F\u884C\u6642\u30E2\u30C7\u30E9\u30FC\u30FB\u30A8\u30E9\u30FC: {0}
-
-runtime.modeler.no.webservice.annotation=WebService\u6CE8\u91C8\u304C\u30AF\u30E9\u30B9: {0}\u306B\u5B58\u5728\u3057\u307E\u305B\u3093
-runtime.modeler.endpoint.interface.no.webservice=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9: {0}\u306BWebService\u6CE8\u91C8\u304C\u3042\u308A\u307E\u305B\u3093
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.class.not.found=\u30AF\u30E9\u30B9: {0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F
-# APT - Annotation Processing Tool. Should not be translated.
-runtime.modeler.wrapper.not.found=\u30E9\u30C3\u30D1\u30FC\u30FB\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u30E9\u30C3\u30D1\u30FC\u30FB\u30AF\u30E9\u30B9\u3092\u751F\u6210\u3059\u308B\u305F\u3081\u306E\u6CE8\u91C8\u51E6\u7406\u3092\u5B9F\u884C\u3057\u307E\u3057\u305F\u304B\u3002
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.method.not.found=\u30E1\u30BD\u30C3\u30C9: {0}\u304C\u30AF\u30E9\u30B9: {1}\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F
-runtime.modeler.webmethod.must.be.public=@WebMethod\u306Fpublic\u4EE5\u5916\u306E\u30E1\u30BD\u30C3\u30C9{0}\u3067\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
-runtime.modeler.webmethod.must.be.nonstatic=@WebMethod\u306Fstatic\u30E1\u30BD\u30C3\u30C9{0}\u3067\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
-runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod\u306Fstatic\u307E\u305F\u306Ffinal\u30E1\u30BD\u30C3\u30C9{0}\u3067\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
-runtime.modeler.oneway.operation.no.out.parameters=\u4E00\u65B9\u5411\u64CD\u4F5C\u306B\u306FOUT\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9: {0}\u3001\u30E1\u30BD\u30C3\u30C9: {1}
-runtime.modeler.oneway.operation.no.checked.exceptions=\u4E00\u65B9\u5411\u64CD\u4F5C\u306F\u78BA\u8A8D\u6E08\u4F8B\u5916\u3092\u30B9\u30ED\u30FC\u3057\u306A\u3044\u3088\u3046\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30AF\u30E9\u30B9: {0}\u3001\u30E1\u30BD\u30C3\u30C9: {1}\u3001\u30B9\u30ED\u30FC: {2}
-runtime.modeler.cannot.get.serviceName.from.interface=serviceName\u3092\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9{0}
-runtime.modeler.portname.servicename.namespace.mismatch=serviceName \"{0}\"\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304A\u3088\u3073portName \"{1}\"\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306F\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-runtime.modeler.no.package=@WebService.targetNamespace\u306F\u30D1\u30C3\u30B1\u30FC\u30B8\u306A\u3057\u306E\u30AF\u30E9\u30B9\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9: {0}
-runtime.modeler.no.operations=\u30AF\u30E9\u30B9{0}\u306B\u3088\u308A\u5B9A\u7FA9\u3055\u308C\u305FWeb\u30B5\u30FC\u30D3\u30B9\u306B\u306F\u3001\u6709\u52B9\u306AWebMethods\u304C\u542B\u307E\u308C\u307E\u305B\u3093\u3002
-runtime.modeler.mtom.conflict = @BindingType\u306E\u30A8\u30E9\u30FC: \u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u8B58\u5225\u5B50{0}\u306EMTOM\u69CB\u6210\u304C\u6A5F\u80FD@MTOM {1}\u3068\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059
-# {0} - feature class name, {1} - feature class name
-runtime.modeler.feature.conflict= \u5B9F\u88C5\u306E\u6A5F\u80FD{0}\u304CWSDL\u69CB\u6210\u306E{1}\u3068\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059
-# {0} - absolute class location
-runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API\u306F{0}\u304B\u3089\u30ED\u30FC\u30C9\u3055\u308C\u307E\u3059\u304C\u3001JAX-WS\u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u306FJAX-WS 2.2 API\u304C\u5FC5\u8981\u3067\u3059\u3002JAX-WS 2.2 API\u3092\u30ED\u30FC\u30C9\u3059\u308B\u306B\u306F\u3001Endorsed Standards Override Mechanism\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044
-runtime.modeler.wsfeature.no.ftrconstructor=\u6CE8\u91C8{0}\u3092\u8A8D\u8B58\u3067\u304D\u307E\u305B\u3093\u3002{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u5C11\u306A\u304F\u3068\u30821\u3064\u304C@FeatureConstructor\u3067\u30DE\u30FC\u30AF\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-runtime.modeler.wsfeature.morethanone.ftrconstructor=\u6CE8\u91C8{0}\u304C\u4E0D\u6B63\u3067\u3059\u3002@FeatureConstructor\u3068\u3057\u3066\u30DE\u30FC\u30AF\u3067\u304D\u308B{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306F\u30011\u3064\u306E\u307F\u3067\u3059
-runtime.modeler.wsfeature.illegal.ftrconstructor=\u6CE8\u91C8{0}\u304C\u4E0D\u6B63\u3067\u3059\u3002{1}\u3067\u3001@FeatureConstructor\u306E\u5024\u304C\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093
-# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name
-runtime.modeler.invalid.soapbinding.parameterstyle= {1}\u306B\u304A\u3051\u308B\u6CE8\u91C8{0}\u306E\u4F7F\u7528\u65B9\u6CD5\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\u3002RPC\u30B9\u30BF\u30A4\u30EBWeb\u30B5\u30FC\u30D3\u30B9\u3067\u306F\u3001ParameterStyle\u306FWRAPPED\u306E\u307F\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002
-runtime.modeler.soapbinding.conflict= \u30E1\u30BD\u30C3\u30C9{1}\u306ESOAPBinding\u30B9\u30BF\u30A4\u30EB{0}\u304C\u30B0\u30ED\u30FC\u30D0\u30EBSOAPBinding\u30B9\u30BF\u30A4\u30EB{2}\u3068\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059
-runtimemodeler.invalid.soapbindingOnMethod=\u30AF\u30E9\u30B9{2}\u306E\u30E1\u30BD\u30C3\u30C9{1}\u306E\u6CE8\u91C8: {0}\u304C\u7121\u52B9\u3067\u3059\u3002\u30B9\u30BF\u30A4\u30EB\"RPC\"\u306E\u30E1\u30BD\u30C3\u30C9\u306F@SOAPBinding\u3067\u6CE8\u91C8\u3092\u4ED8\u3051\u3089\u308C\u307E\u305B\u3093
-unable.to.create.JAXBContext=JAXBContext\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-# BARE is a member of enumeration and should not be translated.
-not.a.valid.bare.method=SEI {0}\u306B\u306FBARE\u3068\u3057\u3066\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30E1\u30BD\u30C3\u30C9{1}\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u8907\u6570\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u672C\u6587\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u3053\u308C\u306F\u7121\u52B9\u3067\u3059\u3002\u30E1\u30BD\u30C3\u30C9\u306B\u6B21\u306E\u6CE8\u91C8\u3092\u4ED8\u3051\u3066\u304F\u3060\u3055\u3044: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ko.properties
deleted file mode 100644
index 3041777a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ko.properties
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedModelerError=\uB7F0\uD0C0\uC784 \uBAA8\uB378\uB7EC \uC624\uB958: {0}
-
-runtime.modeler.no.webservice.annotation=WebService \uC8FC\uC11D\uC774 \uD074\uB798\uC2A4\uC5D0 \uC5C6\uC74C: {0}
-runtime.modeler.endpoint.interface.no.webservice=\uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4 {0}\uC5D0 WebService \uC8FC\uC11D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.class.not.found={0} \uD074\uB798\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-# APT - Annotation Processing Tool. Should not be translated.
-runtime.modeler.wrapper.not.found=\uB798\uD37C \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC8FC\uC11D \uCC98\uB9AC\uB97C \uC2E4\uD589\uD558\uC5EC \uC0DD\uC131\uD588\uC2B5\uB2C8\uAE4C?
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.method.not.found={0} \uBA54\uC18C\uB4DC\uB97C \uD074\uB798\uC2A4\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {1}
-runtime.modeler.webmethod.must.be.public=@WebMethod\uB294 non-public \uBA54\uC18C\uB4DC {0}\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-runtime.modeler.webmethod.must.be.nonstatic=@WebMethod\uB294 static \uBA54\uC18C\uB4DC {0}\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod\uB294 static \uB610\uB294 final \uBA54\uC18C\uB4DC {0}\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-runtime.modeler.oneway.operation.no.out.parameters=\uB2E8\uBC29\uD5A5 \uC791\uC5C5\uC5D0\uB294 OUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC5C6\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4: {0}, \uBA54\uC18C\uB4DC: {1}
-runtime.modeler.oneway.operation.no.checked.exceptions=\uB2E8\uBC29\uD5A5 \uC791\uC5C5\uC774 \uD655\uC778\uB41C \uC608\uC678 \uC0AC\uD56D\uC744 throw\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4: {0}, \uBA54\uC18C\uB4DC: {1}, throw: {2}
-runtime.modeler.cannot.get.serviceName.from.interface=\uC778\uD130\uD398\uC774\uC2A4\uC5D0\uC11C serviceName\uC744 \uAC80\uC0C9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4: {0}
-runtime.modeler.portname.servicename.namespace.mismatch=serviceName \"{0}\"\uC758 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC640 portName \"{1}\"\uC758 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4.
-runtime.modeler.no.package=\uD328\uD0A4\uC9C0\uAC00 \uC5C6\uB294 \uD074\uB798\uC2A4\uC5D0 \uB300\uD574 @WebService.targetNamespace\uB97C \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4: {0}
-runtime.modeler.no.operations={0} \uD074\uB798\uC2A4\uAC00 \uC815\uC758\uD55C \uC6F9 \uC11C\uBE44\uC2A4\uC5D0 \uC801\uD569\uD55C WebMethods\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-runtime.modeler.mtom.conflict = @BindingType\uC5D0 \uC624\uB958 \uBC1C\uC0DD: \uBC14\uC778\uB529 \uC2DD\uBCC4\uC790 {0}\uC758 MTOM \uAD6C\uC131\uC774 @MTOM {1} \uAE30\uB2A5\uACFC \uCDA9\uB3CC\uD569\uB2C8\uB2E4.
-# {0} - feature class name, {1} - feature class name
-runtime.modeler.feature.conflict= \uAD6C\uD604\uC758 {0} \uAE30\uB2A5\uC774 WSDL \uAD6C\uC131\uC758 {1}\uACFC(\uC640) \uCDA9\uB3CC\uD569\uB2C8\uB2E4.
-# {0} - absolute class location
-runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API\uAC00 {0}\uC5D0\uC11C \uB85C\uB4DC\uB418\uC5C8\uC9C0\uB9CC JAX-WS \uB7F0\uD0C0\uC784\uC5D0 JAX-WS 2.2 API\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uC778\uC99D\uB41C \uD45C\uC900 \uBB34\uD6A8\uD654 \uBC29\uC2DD\uC744 \uC0AC\uC6A9\uD558\uC5EC AX-WS 2.2 API\uB97C \uB85C\uB4DC\uD558\uC2ED\uC2DC\uC624.
-runtime.modeler.wsfeature.no.ftrconstructor={0} \uC8FC\uC11D\uC744 \uC778\uC2DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD558\uB098 \uC774\uC0C1\uC758 {1} \uC0DD\uC131\uC790\uAC00 @FeatureConstructor\uB85C \uD45C\uC2DC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-runtime.modeler.wsfeature.morethanone.ftrconstructor={0} \uC8FC\uC11D\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uD558\uB098\uC758 {1} \uC0DD\uC131\uC790\uB9CC @FeatureConstructor\uB85C \uD45C\uC2DC\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-runtime.modeler.wsfeature.illegal.ftrconstructor={0} \uC8FC\uC11D\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. {1}\uC5D0\uC11C @FeatureConstructor \uAC12\uC774 \uC0DD\uC131\uC790 \uB9E4\uAC1C\uBCC0\uC218\uC640 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name
-runtime.modeler.invalid.soapbinding.parameterstyle= {1}\uC5D0 {0} \uC8FC\uC11D\uC774 \uC798\uBABB \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4. ParameterStyle\uC740 RPC \uC2A4\uD0C0\uC77C \uC6F9 \uC11C\uBE44\uC2A4\uB85C\uB9CC WRAPPED\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-runtime.modeler.soapbinding.conflict= {1} \uBA54\uC18C\uB4DC\uC5D0 \uB300\uD55C SOAPBinding \uC2A4\uD0C0\uC77C {0}\uC774(\uAC00) \uC804\uC5ED SOAPBinding \uC2A4\uD0C0\uC77C {2}\uACFC(\uC640) \uCDA9\uB3CC\uD569\uB2C8\uB2E4.
-runtimemodeler.invalid.soapbindingOnMethod={2} \uD074\uB798\uC2A4\uC758 {1} \uBA54\uC18C\uB4DC\uC5D0 \uBD80\uC801\uD569\uD55C \uC8FC\uC11D {0}\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4. \uBA54\uC18C\uB4DC\uB294 \"RPC\" \uC2A4\uD0C0\uC77C\uC758 @SOAPBinding\uC73C\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-unable.to.create.JAXBContext=JAXBContext\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-# BARE is a member of enumeration and should not be translated.
-not.a.valid.bare.method=SEI {0}\uC758 {1} \uBA54\uC18C\uB4DC\uAC00 BARE\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uC9C0\uB9CC \uB450 \uAC1C \uC774\uC0C1\uC758 \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uBCF8\uBB38\uC5D0 \uBC14\uC778\uB4DC\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. \uC774\uB294 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uBA54\uC18C\uB4DC\uB97C @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED \uC8FC\uC11D\uC73C\uB85C \uC8FC\uC11D \uCC98\uB9AC\uD558\uC2ED\uC2DC\uC624.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_pt_BR.properties
deleted file mode 100644
index ce6362b9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_pt_BR.properties
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedModelerError=erro do modelador de runtime: {0}
-
-runtime.modeler.no.webservice.annotation=Uma anota\u00E7\u00E3o do WebService n\u00E3o est\u00E1 presente na classe: {0}
-runtime.modeler.endpoint.interface.no.webservice=A Interface do Ponto Final: {0} n\u00E3o tem Anota\u00E7\u00E3o do WebService
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.class.not.found=n\u00E3o foi poss\u00EDvel encontrar a classe: {0}
-# APT - Annotation Processing Tool. Should not be translated.
-runtime.modeler.wrapper.not.found=A classe {0} de wrapper n\u00E3o foi encontrada. Voc\u00EA executou o processamento da anota\u00E7\u00E3o para ger\u00E1-la?
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.method.not.found=n\u00E3o foi poss\u00EDvel encontrar o m\u00E9todo: {0} na classe: {1}
-runtime.modeler.webmethod.must.be.public=@WebMethod n\u00E3o \u00E9 permitido em um m\u00E9todo n\u00E3o p\u00FAblico {0}
-runtime.modeler.webmethod.must.be.nonstatic=@WebMethod n\u00E3o \u00E9 permitido em um m\u00E9todo est\u00E1tico {0}
-runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod n\u00E3o \u00E9 permitido em um m\u00E9todo est\u00E1tico ou final {0}
-runtime.modeler.oneway.operation.no.out.parameters=a opera\u00E7\u00E3o unidirecional n\u00E3o deve ter a classe de par\u00E2metros OUT: {0} m\u00E9todo: {1}
-runtime.modeler.oneway.operation.no.checked.exceptions=A opera\u00E7\u00E3o unidirecional n\u00E3o deve gerar nenhuma classe {0}: m\u00E9todo: {1} gera\u00E7\u00F5es: {2} de exce\u00E7\u00F5es verificadas
-runtime.modeler.cannot.get.serviceName.from.interface=O serviceName n\u00E3o pode ser recuperado de uma interface. classe {0}
-runtime.modeler.portname.servicename.namespace.mismatch=O namespace do serviceName \\"{0}\\" e o namespace do portName \\"{1}\\" devem ser correspondentes
-runtime.modeler.no.package=Um @WebService.targetNamespace deve ser especificado nas classes sem pacote. Classe: {0}
-runtime.modeler.no.operations=O web service definido pela classe {0} n\u00E3o cont\u00E9m nenhum WebMethods v\u00E1lido.
-runtime.modeler.mtom.conflict = Erro em @BindingType: a Configura\u00E7\u00E3o de MTOM no identificador de bind {0} est\u00E1 em conflito com o recurso @MTOM {1}
-# {0} - feature class name, {1} - feature class name
-runtime.modeler.feature.conflict= O recurso {0} na implementa\u00E7\u00E3o est\u00E1 em conflito com {1} na configura\u00E7\u00E3o do WSDL
-# {0} - absolute class location
-runtime.modeler.addressing.responses.nosuchmethod = A API de JAX-WS 2.1 foi carregada de {0}, mas o runtime de JAX-WS requer a API JAX-WS 2.2. Use o mecanismo de substitui\u00E7\u00E3o de padr\u00F5es endossados para carregar a API de JAX-WS 2.2
-runtime.modeler.wsfeature.no.ftrconstructor=A anota\u00E7\u00E3o {0} n\u00E3o \u00E9 reconhec\u00EDvel, pelo menos um construtor de {1} deve ser marcado com @FeatureConstructor
-runtime.modeler.wsfeature.morethanone.ftrconstructor=A anota\u00E7\u00E3o {0} \u00E9 inv\u00E1lida. Somente um construtor de {1} pode ser marcado como @FeatureConstructor
-runtime.modeler.wsfeature.illegal.ftrconstructor=A anota\u00E7\u00E3o {0} \u00E9 inv\u00E1lida. No {1} o valor de @FeatureConstructor n\u00E3o corresponde aos par\u00E2metros do construtor
-# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name
-runtime.modeler.invalid.soapbinding.parameterstyle= Uso incorreto da Anota\u00E7\u00E3o {0} em {1}; o ParameterStyle s\u00F3 pode ser WRAPPED com o Web service de Estilo de RPC.
-runtime.modeler.soapbinding.conflict= O Estilo de SOAPBinding {0} do m\u00E9todo {1} est\u00E1 em conflito com o Estilo SOAPBinding {2} global
-runtimemodeler.invalid.soapbindingOnMethod=Anota\u00E7\u00E3o inv\u00E1lida: {0} no M\u00E9todo {1} na Classe {2}. Um m\u00E9todo n\u00E3o pode ser anotado com @SOAPBinding com Estilo \\"RPC\\"
-unable.to.create.JAXBContext=N\u00E3o \u00E9 poss\u00EDvel criar o JAXBContext
-# BARE is a member of enumeration and should not be translated.
-not.a.valid.bare.method=SEI {0} tem o m\u00E9todo {1} anotado como BARE, mas tem mais de um par\u00E2metro vinculado ao corpo. Ele \u00E9 v\u00E1lido. Anote o m\u00E9todo com a anota\u00E7\u00E3o: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_CN.properties
deleted file mode 100644
index eee8988d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_CN.properties
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedModelerError=\u8FD0\u884C\u65F6\u5EFA\u6A21\u7A0B\u5E8F\u9519\u8BEF: {0}
-
-runtime.modeler.no.webservice.annotation=\u7C7B\u4E0A\u4E0D\u5B58\u5728 Web \u670D\u52A1\u6CE8\u91CA: {0}
-runtime.modeler.endpoint.interface.no.webservice=\u7AEF\u70B9\u63A5\u53E3{0}\u6CA1\u6709 Web \u670D\u52A1\u6CE8\u91CA
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.class.not.found=\u627E\u4E0D\u5230\u7C7B{0}
-# APT - Annotation Processing Tool. Should not be translated.
-runtime.modeler.wrapper.not.found=\u672A\u627E\u5230\u5305\u88C5\u7C7B{0}\u3002\u60A8\u662F\u5426\u5DF2\u8FD0\u884C\u6CE8\u91CA\u5904\u7406\u6765\u751F\u6210\u5B83\u4EEC?
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.method.not.found=\u5728\u7C7B{1}\u4E0A\u627E\u4E0D\u5230\u65B9\u6CD5{0}
-runtime.modeler.webmethod.must.be.public=\u975E\u516C\u5171\u65B9\u6CD5{0}\u4E0A\u4E0D\u5141\u8BB8\u6709 @WebMethod
-runtime.modeler.webmethod.must.be.nonstatic=\u9759\u6001\u65B9\u6CD5{0}\u4E0A\u4E0D\u5141\u8BB8\u6709 @WebMethod
-runtime.modeler.webmethod.must.be.nonstaticfinal=\u9759\u6001\u6216\u6700\u7EC8\u65B9\u6CD5{0}\u4E0A\u4E0D\u5141\u8BB8\u6709 @WebMethod
-runtime.modeler.oneway.operation.no.out.parameters=\u5355\u5411\u64CD\u4F5C\u4E0D\u5E94\u6709 OUT \u53C2\u6570\u7C7B: {0}, \u65B9\u6CD5: {1}
-runtime.modeler.oneway.operation.no.checked.exceptions=\u5355\u5411\u64CD\u4F5C\u4E0D\u80FD\u629B\u51FA\u4EFB\u4F55\u9009\u4E2D\u7684\u5F02\u5E38\u9519\u8BEF\u7C7B: {0}, \u65B9\u6CD5: {1}, \u629B\u51FA: {2}
-runtime.modeler.cannot.get.serviceName.from.interface=\u65E0\u6CD5\u4ECE\u63A5\u53E3\u68C0\u7D22 serviceName\u3002\u7C7B{0}
-runtime.modeler.portname.servicename.namespace.mismatch=serviceName \"{0}\" \u7684\u540D\u79F0\u7A7A\u95F4\u4E0E portName \"{1}\" \u7684\u540D\u79F0\u7A7A\u95F4\u5FC5\u987B\u5339\u914D
-runtime.modeler.no.package=\u5FC5\u987B\u5728\u6CA1\u6709\u7A0B\u5E8F\u5305\u7684\u7C7B\u4E0A\u6307\u5B9A @WebService.targetNamespace\u3002\u7C7B: {0}
-runtime.modeler.no.operations=\u7531\u7C7B{0}\u5B9A\u4E49\u7684 Web \u670D\u52A1\u4E0D\u5305\u542B\u4EFB\u4F55\u6709\u6548\u7684 WebMethods\u3002
-runtime.modeler.mtom.conflict = @BindingType \u4E2D\u51FA\u9519: \u7ED1\u5B9A\u6807\u8BC6\u7B26{0}\u4E2D\u7684 MTOM \u914D\u7F6E\u4E0E\u529F\u80FD @MTOM {1}\u53D1\u751F\u51B2\u7A81
-# {0} - feature class name, {1} - feature class name
-runtime.modeler.feature.conflict= \u5B9E\u73B0\u4E2D\u7684\u529F\u80FD{0}\u4E0E WSDL \u914D\u7F6E\u4E2D\u7684{1}\u53D1\u751F\u51B2\u7A81
-# {0} - absolute class location
-runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API \u5DF2\u4ECE{0}\u4E2D\u52A0\u8F7D, \u4F46 JAX-WS \u8FD0\u884C\u65F6\u9700\u8981 JAX-WS 2.2 API\u3002\u8BF7\u4F7F\u7528\u6388\u6743\u6807\u51C6\u8986\u76D6\u673A\u5236\u6765\u52A0\u8F7D JAX-WS 2.2 API
-runtime.modeler.wsfeature.no.ftrconstructor=\u65E0\u6CD5\u8BC6\u522B\u6CE8\u91CA{0}, \u5E94\u4F7F\u7528 @FeatureConstructor \u81F3\u5C11\u6807\u8BB0{1}\u7684\u4E00\u4E2A\u6784\u9020\u5668
-runtime.modeler.wsfeature.morethanone.ftrconstructor=\u6CE8\u91CA{0}\u662F\u975E\u6CD5\u7684, \u53EA\u80FD\u5C06{1}\u7684\u4E00\u4E2A\u6784\u9020\u5668\u6807\u8BB0\u4E3A @FeatureConstructor
-runtime.modeler.wsfeature.illegal.ftrconstructor=\u6CE8\u91CA{0}\u662F\u975E\u6CD5\u7684, \u5728{1}\u4E2D, @FeatureConstructor \u503C\u4E0E\u6784\u9020\u5668\u53C2\u6570\u4E0D\u5339\u914D
-# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name
-runtime.modeler.invalid.soapbinding.parameterstyle= {1}\u4E0A\u6CE8\u91CA{0}\u7684\u7528\u6CD5\u4E0D\u6B63\u786E, ParameterStyle \u53EA\u80FD\u662F\u5E26\u6709 RPC \u6837\u5F0F Web \u670D\u52A1\u7684 WRAPPED\u3002
-runtime.modeler.soapbinding.conflict= \u65B9\u6CD5{1}\u7684 SOAPBinding \u6837\u5F0F{0}\u4E0E\u5168\u5C40 SOAPBinding \u6837\u5F0F{2}\u53D1\u751F\u51B2\u7A81
-runtimemodeler.invalid.soapbindingOnMethod=\u7C7B{2}\u4E2D\u7684\u65B9\u6CD5{1}\u4E0A\u7684\u6CE8\u91CA{0}\u65E0\u6548, \u65B9\u6CD5\u4E0D\u80FD\u4F7F\u7528\u5177\u6709\u6837\u5F0F \"RPC\" \u7684 @SOAPBinding \u8FDB\u884C\u6CE8\u91CA
-unable.to.create.JAXBContext=\u65E0\u6CD5\u521B\u5EFA JAXBContext
-# BARE is a member of enumeration and should not be translated.
-not.a.valid.bare.method=SEI {0}\u5177\u6709\u6CE8\u91CA\u4E3A BARE \u7684\u65B9\u6CD5{1}, \u4F46\u8BE5\u65B9\u6CD5\u6709\u591A\u4E2A\u53C2\u6570\u7ED1\u5B9A\u5230\u4E3B\u4F53\u3002\u8FD9\u662F\u65E0\u6548\u7684\u3002\u8BF7\u4F7F\u7528\u4EE5\u4E0B\u6CE8\u91CA\u5BF9\u8BE5\u65B9\u6CD5\u8FDB\u884C\u6CE8\u91CA: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_TW.properties
deleted file mode 100644
index 85ef977a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_TW.properties
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-nestedModelerError=\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u6A21\u578B\u88FD\u4F5C\u5668\u932F\u8AA4: {0}
-
-runtime.modeler.no.webservice.annotation=Web \u670D\u52D9\u8A3B\u89E3\u4E0D\u5B58\u5728\u4E0B\u5217\u985E\u5225\u4E2D: {0}
-runtime.modeler.endpoint.interface.no.webservice=\u7AEF\u9EDE\u4ECB\u9762: {0} \u672A\u5305\u542B Web \u670D\u52D9\u8A3B\u89E3
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.class.not.found=\u627E\u4E0D\u5230\u985E\u5225: {0}
-# APT - Annotation Processing Tool. Should not be translated.
-runtime.modeler.wrapper.not.found=\u627E\u4E0D\u5230\u5305\u88DD\u51FD\u5F0F\u985E\u5225 {0}. \u60A8\u662F\u5426\u5DF2\u57F7\u884C\u8A3B\u89E3\u8655\u7406\u4F86\u7522\u751F\u5B83\u5011?
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.modeler.method.not.found=\u5728\u985E\u5225: {1} \u627E\u4E0D\u5230\u65B9\u6CD5: {0}
-runtime.modeler.webmethod.must.be.public=\u4E0D\u5141\u8A31\u5728\u975E\u516C\u7528\u65B9\u6CD5 {0} \u4E2D\u4F7F\u7528 @WebMethod
-runtime.modeler.webmethod.must.be.nonstatic=\u4E0D\u5141\u8A31\u5728\u975C\u614B\u65B9\u6CD5 {0} \u4E2D\u4F7F\u7528 @WebMethod
-runtime.modeler.webmethod.must.be.nonstaticfinal=\u4E0D\u5141\u8A31\u5728\u975C\u614B\u6216\u6700\u7D42\u65B9\u6CD5 {0} \u4E2D\u4F7F\u7528 @WebMethod
-runtime.modeler.oneway.operation.no.out.parameters=\u55AE\u5411\u4F5C\u696D\u4E0D\u61C9\u5305\u542B OUT \u53C3\u6578\u985E\u5225: {0} \u65B9\u6CD5: {1}
-runtime.modeler.oneway.operation.no.checked.exceptions=\u55AE\u5411\u4F5C\u696D\u4E0D\u61C9\u767C\u51FA\u4EFB\u4F55\u5DF2\u6AA2\u67E5\u7684\u7570\u5E38\u72C0\u6CC1\u985E\u5225: {0} \u65B9\u6CD5: {1} \u767C\u51FA: {2}
-runtime.modeler.cannot.get.serviceName.from.interface=\u7121\u6CD5\u5F9E\u4ECB\u9762\u64F7\u53D6 serviceName. \u985E\u5225 {0}
-runtime.modeler.portname.servicename.namespace.mismatch=serviceName \"{0}\" \u7684\u547D\u540D\u7A7A\u9593\u8207 portName \"{1}\" \u7684\u547D\u540D\u7A7A\u9593\u5FC5\u9808\u76F8\u7B26
-runtime.modeler.no.package=\u6C92\u6709\u5957\u88DD\u7A0B\u5F0F\u7684\u985E\u5225\u5FC5\u9808\u6307\u5B9A @WebService.targetNamespace. \u985E\u5225: {0}
-runtime.modeler.no.operations=\u985E\u5225 {0} \u5B9A\u7FA9\u7684 Web \u670D\u52D9\u672A\u5305\u542B\u4EFB\u4F55\u6709\u6548\u7684 WebMethod.
-runtime.modeler.mtom.conflict = @BindingType \u767C\u751F\u932F\u8AA4: \u9023\u7D50 ID {0} \u4E2D\u7684 MTOM \u7D44\u614B\u8207\u529F\u80FD @MTOM {1} \u767C\u751F\u885D\u7A81
-# {0} - feature class name, {1} - feature class name
-runtime.modeler.feature.conflict= \u5BE6\u884C\u4E2D\u7684\u529F\u80FD {0} \u8207 WSDL \u7D44\u614B\u4E2D\u7684 {1} \u767C\u751F\u885D\u7A81
-# {0} - absolute class location
-runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API \u5DF2\u5F9E {0} \u8F09\u5165, \u4F46 JAX-WS \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u9700\u8981 JAX-WS 2.2 API. \u8ACB\u4F7F\u7528\u8A8D\u53EF\u7684\u6A19\u6E96\u8986\u5BEB\u6A5F\u5236\u4F86\u8F09\u5165 JAX-WS 2.2 API
-runtime.modeler.wsfeature.no.ftrconstructor=\u8A3B\u89E3 {0} \u7121\u6CD5\u8FA8\u8B58, \u81F3\u5C11\u4E00\u500B {1} \u7684\u5EFA\u69CB\u5B50\u61C9\u6A19\u793A @FeatureConstructor
-runtime.modeler.wsfeature.morethanone.ftrconstructor=\u8A3B\u89E3 {0} \u7121\u6548, \u53EA\u80FD\u6709\u4E00\u500B {1} \u7684\u5EFA\u69CB\u5B50\u6A19\u793A\u70BA @FeatureConstructor
-runtime.modeler.wsfeature.illegal.ftrconstructor=\u8A3B\u89E3 {0} \u7121\u6548, \u5728 {1} \u4E2D, @FeatureConstructor \u503C\u8207\u5EFA\u69CB\u5B50\u53C3\u6578\u4E0D\u7B26
-# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name
-runtime.modeler.invalid.soapbinding.parameterstyle= {1} \u7684\u8A3B\u89E3 {0} \u7528\u6CD5\u4E0D\u6B63\u78BA, ParameterStyle \u53EA\u80FD\u662F\u4F7F\u7528 RPC \u6A23\u5F0F Web \u670D\u52D9\u7684 WRAPPED.
-runtime.modeler.soapbinding.conflict= \u65B9\u6CD5 {1} \u7684 SOAPBinding \u6A23\u5F0F {0} \u8207\u5168\u57DF SOAPBinding \u6A23\u5F0F {2} \u885D\u7A81
-runtimemodeler.invalid.soapbindingOnMethod=\u985E\u5225 {2} \u65B9\u6CD5 {1} \u4E2D\u7684\u8A3B\u89E3: {0} \u7121\u6548, \u4E0D\u80FD\u4F7F\u7528\u5177\u6709\u6A23\u5F0F \"RPC\" \u7684 @SOAPBinding \u4F86\u52A0\u8A3B\u65B9\u6CD5
-unable.to.create.JAXBContext=\u7121\u6CD5\u5EFA\u7ACB JAXBContext
-# BARE is a member of enumeration and should not be translated.
-not.a.valid.bare.method=SEI {0} \u7684\u65B9\u6CD5 {1} \u5DF2\u52A0\u8A3B\u70BA BARE, \u4F46\u5176\u6709\u4E00\u500B\u4EE5\u4E0A\u7684\u53C3\u6578\u9023\u7D50\u81F3\u4E3B\u9AD4. \u9019\u662F\u7121\u6548\u7684. \u8ACB\u4F7F\u7528\u8A3B\u89E3: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED) \u5C07\u65B9\u6CD5\u52A0\u8A3B
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy.properties
deleted file mode 100644
index bfa4ab4d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy.properties
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: XMLStreamException occurred when reading policy reference element.
-WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: Unable to marshall policy or it's reference. See original exception for more details.
-WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: Unable to check element name for class "{0}" and WSDL name "{1}".
-WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: Policy URIs can not be null.
-WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: Failed to find policy referenced by URI "{0}".
-WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: Policy map extender can not be null.
-WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: Policy exception occurred when finishing WSDL parsing.
-# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }"
-WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: Not marshalling policy, wsdl subject is null for "{0}".
-WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: Policy map was null, not marshalling any policies.
-WSP_1010_NO_POLICIES_DEFINED=WSP1010: No policies defined.
-WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: Failed to retrieve effective policy for subject: {0}.
-WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: Failed to configure wsdl model.
-# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: <wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="ProcessesPortBindingPolicy"><wsp:ExactlyOne xmlns:wsp="http://www.w3.org/ns/ws-policy"><wsp:All xmlns:wsp="http://www.w3.org/ns/ws-policy"></wsp:All></wsp:ExactlyOne></wsp:Policy>.
-WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: Exception occurred while reading policy element. Following was read so far: {0}.
-WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: Can not find policy "{0}" that is referenced in from the WSDL. Please, check your policy references in the WSDL.
-WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: Server side assertion validation failed for "{0}" assertion. Assertion was evaluated as "{1}".
-WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: The policy is not added because it has no ID or a policy with the same ID was already added: {0}.
-WSP_1017_MAP_UPDATE_FAILED=WSP1048: Policy map setup failed - exception occurred while trying to modify policy map content.
-WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: Failed to marshal policy "{0}".
-WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: Failed to find any configuration file. Creating new empty policy map.
-WSP_1020_DUPLICATE_ID=WSP1020: Found two policies in one document with the same id: "{0}".
-WSP_1021_FAULT_NOT_BOUND=WSP1021: Fault "{0}" not bound. Check names in port and binding definitions.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_de.properties
deleted file mode 100644
index 5c832540..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_de.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: XMLStreamException beim Lesen des Policy-Referenzelements.
-WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: Marshalling von Policy oder deren Referenz nicht m\u00F6glich. Weitere Einzelheiten finden Sie in der urspr\u00FCnglichen Ausnahme.
-WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: Elementname f\u00FCr Klasse "{0}" und WSDL-Name "{1}" kann nicht gepr\u00FCft werden.
-WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: Policy-URIs d\u00FCrfen nicht null sein.
-WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: Policy, die von URI "{0}" referenziert wird, konnte nicht gefunden werden.
-WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: Policy-Zuordnungserweiterung darf nicht null sein.
-WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: Policy-Ausnahme bei Abschluss des WSDL-Parsings aufgetreten.
-# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }"
-WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: Keine Marshalling Policy, WSDL-Subject ist null f\u00FCr "{0}".
-WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: Policy-Zuordnung war null, kein Marshalling von Policys.
-WSP_1010_NO_POLICIES_DEFINED=WSP1010: Keine Policys definiert.
-WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: G\u00FCltige Policy f\u00FCr Subject konnte nicht abgerufen werden: {0}.
-WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: WSDL-Modell konnte nicht konfiguriert werden.
-# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: <wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="ProcessesPortBindingPolicy"><wsp:ExactlyOne xmlns:wsp="http://www.w3.org/ns/ws-policy"><wsp:All xmlns:wsp="http://www.w3.org/ns/ws-policy"></wsp:All></wsp:ExactlyOne></wsp:Policy>.
-WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: Ausnahme beim Lesen des Policy-Elements aufgetreten. Bis jetzt wurde Folgendes gelesen: {0}.
-WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: Policy "{0}" kann nicht gefunden werden, die von WSDL referenziert wird. Pr\u00FCfen Sie die Policy-Referenzen in der WSDL.
-WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: Serverseitige Assertionsvalidierung f\u00FCr "{0}"-Assertion war nicht erfolgreich. Assertion wurde als "{1}" ausgewertet.
-WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: Die Policy wird nicht hinzugef\u00FCgt, weil sie keine ID hat oder weil bereits eine Policy mit derselben ID hinzugef\u00FCgt wurde: {0}.
-WSP_1017_MAP_UPDATE_FAILED=WSP1048: Setup der Policy-Zuordnung nicht erfolgreich - Ausnahme beim Versuch, Content der Policy-Zuordnung zu \u00E4ndern.
-WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: Marshalling von Policy "{0}" nicht erfolgreich.
-WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: Es konnte keine Konfigurationsdatei gefunden werden. Eine neue leere Policy-Zuordnung wird erstellt.
-WSP_1020_DUPLICATE_ID=WSP1020: Es wurde zwei Policys mit derselben ID in einem Dokument gefunden: "{0}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_es.properties
deleted file mode 100644
index 259a55ca..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_es.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: se ha producido una excepci\u00F3n de flujo XML al leer el elemento de referencia de la pol\u00EDtica.
-WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: no se ha podido canalizar la pol\u00EDtica o su referencia. Consulte la excepci\u00F3n original para obtener m\u00E1s informaci\u00F3n.
-WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: no se ha podido comprobar el nombre de elemento de la clase "{0}" y el nombre de WSDL "{1}".
-WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: los URI de pol\u00EDtica no pueden ser nulos.
-WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: no se ha encontrado la pol\u00EDtica a la que hace referencia el URI "{0}".
-WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: el extensor de asignaciones de pol\u00EDticas no puede ser nulo.
-WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: se ha producido una excepci\u00F3n de pol\u00EDtica al finalizar el an\u00E1lisis de WSDL.
-# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }"
-WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: no se est\u00E1 canalizando la pol\u00EDtica; el asunto de WSDL es nulo para "{0}".
-WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: la asignaci\u00F3n de pol\u00EDtica es nula; no se est\u00E1 canalizando ninguna pol\u00EDtica.
-WSP_1010_NO_POLICIES_DEFINED=WSP1010: no se ha definido ninguna pol\u00EDtica.
-WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: Fallo al recuperar la pol\u00EDtica efectiva para el asunto: {0}.
-WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: fallo al configurar el modelo de WSDL.
-# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: <wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="ProcessesPortBindingPolicy"><wsp:ExactlyOne xmlns:wsp="http://www.w3.org/ns/ws-policy"><wsp:All xmlns:wsp="http://www.w3.org/ns/ws-policy"></wsp:All></wsp:ExactlyOne></wsp:Policy>.
-WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: se ha producido una excepci\u00F3n al leer el elemento de la pol\u00EDtica. Se ha le\u00EDdo lo siguiente hasta ahora: {0}.
-WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: no se ha encontrado la pol\u00EDtica "{0}" a la que se hace referencia desde el WSDL. Compruebe las referencias de la pol\u00EDtica en el WSDL.
-WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: fallo de validaci\u00F3n de afirmaci\u00F3n del servidor para la afirmaci\u00F3n "{0}". La afirmaci\u00F3n se ha evaluado como "{1}".
-WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: La pol\u00EDtica no se ha agregado porque no tiene un identificador o ya se ha agregado una pol\u00EDtica con el mismo identificador: {0}.
-WSP_1017_MAP_UPDATE_FAILED=WSP1048: Fallo en la configuraci\u00F3n de asignaci\u00F3n de pol\u00EDticas: se ha producido una excepci\u00F3n al intentar modificar el contenido de asignaci\u00F3n de pol\u00EDticas.
-WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: fallo al canalizar la pol\u00EDtica "{0}".
-WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: no se ha encontrado ning\u00FAn archivo de configuraci\u00F3n. Creando nueva asignaci\u00F3n de pol\u00EDtica vac\u00EDa.
-WSP_1020_DUPLICATE_ID=WSP1020: Se han encontrado dos pol\u00EDticas en un documento con el mismo identificador: "{0}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_fr.properties
deleted file mode 100644
index 931c3477..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_fr.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001 : une exception XMLStreamException s'est produite lors de la lecture de l'\u00E9l\u00E9ment de r\u00E9f\u00E9rence de strat\u00E9gie.
-WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002 : impossible de s\u00E9rialiser la strat\u00E9gie ou sa r\u00E9f\u00E9rence. Pour plus de d\u00E9tails, consultez l'exception d'origine.
-WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003 : impossible de v\u00E9rifier le nom d''\u00E9l\u00E9ment pour la classe "{0}" et le nom WSDL "{1}".
-WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004 : les URI de strat\u00E9gie ne peuvent pas \u00EAtre NULL.
-WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005 : strat\u00E9gie r\u00E9f\u00E9renc\u00E9e par l''URI "{0}" introuvable.
-WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006 : l'extension de la mappe de strat\u00E9gie ne peut pas \u00EAtre NULL.
-WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007 : une exception de strat\u00E9gie s'est produite lors de la finalisation de l'analyse WSDL.
-# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }"
-WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008 : aucune strat\u00E9gie de s\u00E9rialisation, le sujet WSDL est NULL pour "{0}".
-WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009 : la mappe de strat\u00E9gie \u00E9tait NULL, aucune s\u00E9rialisation des strat\u00E9gies.
-WSP_1010_NO_POLICIES_DEFINED=WSP1010 : aucune strat\u00E9gie d\u00E9finie.
-WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011 : \u00E9chec de l''extraction de la strat\u00E9gie en cours pour le sujet {0}.
-WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012 : \u00E9chec de la configuration du mod\u00E8le WSDL.
-# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: <wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="ProcessesPortBindingPolicy"><wsp:ExactlyOne xmlns:wsp="http://www.w3.org/ns/ws-policy"><wsp:All xmlns:wsp="http://www.w3.org/ns/ws-policy"></wsp:All></wsp:ExactlyOne></wsp:Policy>.
-WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013 : une exception s''est produite lors de la lecture de l''\u00E9l\u00E9ment de strat\u00E9gie. Voici ce qui a \u00E9t\u00E9 lu jusqu''\u00E0 pr\u00E9sent : {0}.
-WSP_1014_CAN_NOT_FIND_POLICY=WSP1014 : la strat\u00E9gie "{0}" r\u00E9f\u00E9renc\u00E9e \u00E0 partir du WSDL est introuvable. V\u00E9rifiez les r\u00E9f\u00E9rences de strat\u00E9gie dans le WSDL.
-WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015 : \u00E9chec de la validation d''assertion c\u00F4t\u00E9 serveur pour l''assertion "{0}". L''assertion a \u00E9t\u00E9 \u00E9valu\u00E9e en tant que "{1}".
-WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016 : la strat\u00E9gie n''est pas ajout\u00E9e car elle ne contient aucun ID ou une strat\u00E9gie avec le m\u00EAme ID a d\u00E9j\u00E0 \u00E9t\u00E9 ajout\u00E9e : {0}.
-WSP_1017_MAP_UPDATE_FAILED=WSP1048 : \u00E9chec de configuration de la mappe de strat\u00E9gie. Une exception s'est produite lors de la tentative de modification du contenu de la mappe de strat\u00E9gie.
-WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018 : \u00E9chec de la s\u00E9rialisation de la strat\u00E9gie "{0}".
-WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019 : fichier de configuration introuvable. Cr\u00E9ation d'une mappe de strat\u00E9gie vide.
-WSP_1020_DUPLICATE_ID=WSP1020 : deux strat\u00E9gies trouv\u00E9es dans un document avec le m\u00EAme ID : "{0}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_it.properties
deleted file mode 100644
index 9c228e21..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_it.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: Si \u00E8 verificata una XMLStreamException durante la lettura dell'elemento di riferimento del criterio.
-WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: Impossibile eseguire il marshalling del criterio o del relativo riferimento. Vedere l'eccezione originale per ulteriori dettagli.
-WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: Impossibile controllare il nome dell''elemento per la classe "{0}" e il nome WSDL "{1}".
-WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: Gli URI del criterio non possono essere nulli.
-WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: Individuazione non riuscita del criterio a cui viene fatto riferimento dall''URI: {0}.
-WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1004: L'estensione della mappa dei criteri non pu\u00F2 essere nulla.
-WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: Si \u00E8 verificata un'eccezione del criterio alla fine dell'analisi WSDL.
-# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }"
-WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: Non viene eseguito il marshalling del criterio. L''oggetto WSDL \u00E8 nullo per "{0}".
-WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1004: La mappa dei criteri \u00E8 nulla. Non viene eseguito il marshalling di alcun criterio.
-WSP_1010_NO_POLICIES_DEFINED=WSP1010: Nessun criterio definito.
-WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: Recupero non riuscito del criterio effettivo per l''oggetto: {0}.
-WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: Configurazione del modello WSDL non riuscita.
-# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: <wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="ProcessesPortBindingPolicy"><wsp:ExactlyOne xmlns:wsp="http://www.w3.org/ns/ws-policy"><wsp:All xmlns:wsp="http://www.w3.org/ns/ws-policy"></wsp:All></wsp:ExactlyOne></wsp:Policy>.
-WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: Si \u00E8 verificata un''eccezione durante la lettura dell''elemento del criterio. Di seguito \u00E8 riportato quanto \u00E8 stato letto finora: {0}.
-WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: Impossibile trovare il criterio "{0}" a cui viene fatto riferimento nel WSDL. Controllare i riferimenti del criterio nel WSDL.
-WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: Convalida dell''asserzione lato server non riuscita per l''asserzione "{0}". L''asserzione \u00E8 stata valutata come "{1}".
-WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: Il criterio non viene aggiunto perch\u00E9 non ha un ID oppure \u00E8 gi\u00E0 stato aggiunto un criterio con lo stesso ID: {0}.
-WSP_1017_MAP_UPDATE_FAILED=WSP1048: Impostazione della mappa dei criteri non riuscita. Si \u00E8 verificata un'eccezione durante il tentativo di modifica del contenuto della mappa dei criteri.
-WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: Marshalling del criterio "{0}" non riuscito.
-WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: Individuazione di un file di configurazione non riuscita. Viene creata una nuova mappa dei criteri vuota.
-WSP_1020_DUPLICATE_ID=WSP1020: Trovati due criteri in un documento con lo stesso ID: "{0}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ja.properties
deleted file mode 100644
index 223afc21..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ja.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: \u30DD\u30EA\u30B7\u30FC\u53C2\u7167\u8981\u7D20\u306E\u8AAD\u53D6\u308A\u4E2D\u306BXMLStreamException\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
-WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: \u30DD\u30EA\u30B7\u30FC\u307E\u305F\u306F\u30DD\u30EA\u30B7\u30FC\u306E\u53C2\u7167\u3092\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u3067\u304D\u307E\u305B\u3093\u3002\u8A73\u7D30\u306F\u5143\u306E\u4F8B\u5916\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: \u30AF\u30E9\u30B9"{0}"\u306E\u8981\u7D20\u540D\u304A\u3088\u3073WSDL\u540D"{1}"\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3002
-WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: \u30DD\u30EA\u30B7\u30FCURI\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093\u3002
-WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: URI "{0}"\u3067\u53C2\u7167\u3055\u308C\u3066\u3044\u308B\u30DD\u30EA\u30B7\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002
-WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: \u30DD\u30EA\u30B7\u30FC\u30FB\u30DE\u30C3\u30D7\u62E1\u5F35\u6A5F\u80FD\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093\u3002
-WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: WSDL\u89E3\u6790\u306E\u7D42\u4E86\u6642\u306B\u30DD\u30EA\u30B7\u30FC\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
-# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }"
-WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: \u30DD\u30EA\u30B7\u30FC\u3092\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u3057\u3066\u3044\u307E\u305B\u3093\u3002"{0}"\u306EWSDL\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u304Cnull\u3067\u3059\u3002
-WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: \u30DD\u30EA\u30B7\u30FC\u30FB\u30DE\u30C3\u30D7\u304Cnull\u3067\u3042\u308A\u3001\u3044\u305A\u308C\u306E\u30DD\u30EA\u30B7\u30FC\u3082\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u3057\u3066\u3044\u307E\u305B\u3093\u3002
-WSP_1010_NO_POLICIES_DEFINED=WSP1010: \u30DD\u30EA\u30B7\u30FC\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: \u30B5\u30D6\u30B8\u30A7\u30AF\u30C8: {0}\u306E\u6709\u52B9\u306A\u30DD\u30EA\u30B7\u30FC\u306E\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: WSDL\u30E2\u30C7\u30EB\u306E\u69CB\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: <wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="ProcessesPortBindingPolicy"><wsp:ExactlyOne xmlns:wsp="http://www.w3.org/ns/ws-policy"><wsp:All xmlns:wsp="http://www.w3.org/ns/ws-policy"></wsp:All></wsp:ExactlyOne></wsp:Policy>.
-WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: \u30DD\u30EA\u30B7\u30FC\u8981\u7D20\u306E\u8AAD\u53D6\u308A\u4E2D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u3053\u308C\u307E\u3067\u8AAD\u307F\u53D6\u3089\u308C\u305F\u5185\u5BB9\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059: {0}\u3002
-WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: WSDL\u304B\u3089\u53C2\u7167\u3055\u308C\u3066\u3044\u308B\u30DD\u30EA\u30B7\u30FC"{0}"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002WSDL\u3067\u306E\u30DD\u30EA\u30B7\u30FC\u53C2\u7167\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: \u30B5\u30FC\u30D0\u30FC\u5074\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u691C\u8A3C\u304C"{0}"\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3067\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u306F"{1}"\u3068\u3057\u3066\u8A55\u4FA1\u3055\u308C\u307E\u3057\u305F\u3002
-WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: \u30DD\u30EA\u30B7\u30FC\u306BID\u304C\u306A\u3044\u304B\u3001\u540C\u3058ID\u3092\u6301\u3064\u30DD\u30EA\u30B7\u30FC\u304C\u3059\u3067\u306B\u8FFD\u52A0\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u3053\u306E\u30DD\u30EA\u30B7\u30FC\u306F\u8FFD\u52A0\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0}\u3002
-WSP_1017_MAP_UPDATE_FAILED=WSP1048: \u30DD\u30EA\u30B7\u30FC\u30FB\u30DE\u30C3\u30D7\u306E\u8A2D\u5B9A\u306B\u5931\u6557\u3057\u307E\u3057\u305F - \u30DD\u30EA\u30B7\u30FC\u30FB\u30DE\u30C3\u30D7\u30FB\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u5909\u66F4\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
-WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: \u30DD\u30EA\u30B7\u30FC"{0}"\u306E\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: \u69CB\u6210\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u7A7A\u306E\u65B0\u898F\u30DD\u30EA\u30B7\u30FC\u30FB\u30DE\u30C3\u30D7\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059\u3002
-WSP_1020_DUPLICATE_ID=WSP1020: 1\u3064\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u306B\u3001\u540C\u3058ID: "{0}"\u3092\u6301\u30642\u3064\u306E\u30DD\u30EA\u30B7\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ko.properties
deleted file mode 100644
index 34cb6b43..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ko.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: \uC815\uCC45 \uCC38\uC870 \uC694\uC18C\uB97C \uC77D\uB294 \uC911 XMLStreamException\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: \uC815\uCC45 \uB610\uB294 \uD574\uB2F9 \uCC38\uC870\uB97C \uB9C8\uC15C\uB9C1\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uC6D0\uB798 \uC608\uC678 \uC0AC\uD56D\uC744 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.
-WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: "{0}" \uD074\uB798\uC2A4 \uBC0F WSDL \uC774\uB984 "{1}"\uC5D0 \uB300\uD55C \uC694\uC18C \uC774\uB984\uC744 \uD655\uC778\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: \uC815\uCC45 URI\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: URI "{0}"\uC774(\uAC00) \uCC38\uC870\uD558\uB294 \uC815\uCC45 \uCC3E\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: \uC815\uCC45 \uB9F5 \uD655\uC7A5\uAE30\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: WSDL \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC644\uB8CC\uD558\uB294 \uC911 \uC815\uCC45 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }"
-WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: \uC815\uCC45\uC744 \uB9C8\uC15C\uB9C1\uD558\uACE0 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. "{0}"\uC5D0 \uB300\uD55C WSDL \uC8FC\uCCB4\uAC00 \uB110\uC785\uB2C8\uB2E4.
-WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: \uC815\uCC45 \uB9F5\uC774 \uB110\uC785\uB2C8\uB2E4. \uC815\uCC45\uC744 \uB9C8\uC15C\uB9C1\uD558\uACE0 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-WSP_1010_NO_POLICIES_DEFINED=WSP1010: \uC815\uC758\uB41C \uC815\uCC45\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: \uC8FC\uCCB4\uC5D0 \uB300\uD55C \uC720\uD6A8\uD55C \uC815\uCC45 \uAC80\uC0C9 \uC2E4\uD328: {0}.
-WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: WSDL \uBAA8\uB378 \uAD6C\uC131\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: <wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="ProcessesPortBindingPolicy"><wsp:ExactlyOne xmlns:wsp="http://www.w3.org/ns/ws-policy"><wsp:All xmlns:wsp="http://www.w3.org/ns/ws-policy"></wsp:All></wsp:ExactlyOne></wsp:Policy>.
-WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: \uC815\uCC45 \uC694\uC18C\uB97C \uC77D\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uC9C0\uAE08\uAE4C\uC9C0 \uC77D\uC740 \uC694\uC18C: {0}.
-WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: WSDL\uC5D0\uC11C \uCC38\uC870\uB41C "{0}" \uC815\uCC45\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. WSDL\uC5D0\uC11C \uC815\uCC45 \uCC38\uC870\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: "{0}" \uBA85\uC81C\uC5D0 \uB300\uD55C \uC11C\uBC84\uCE21 \uBA85\uC81C \uAC80\uC99D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uBA85\uC81C\uAC00 "{1}"(\uC73C)\uB85C \uD3C9\uAC00\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: \uC815\uCC45\uC5D0 ID\uAC00 \uC5C6\uAC70\uB098 \uB3D9\uC77C\uD55C ID\uB97C \uC0AC\uC6A9\uD558\uB294 \uC815\uCC45\uC774 \uC774\uBBF8 \uCD94\uAC00\uB418\uC5B4 \uC815\uCC45\uC774 \uCD94\uAC00\uB418\uC9C0 \uC54A\uC74C: {0}.
-WSP_1017_MAP_UPDATE_FAILED=WSP1048: \uC815\uCC45 \uB9F5 \uC124\uC815 \uC2E4\uD328 - \uC815\uCC45 \uB9F5 \uCF58\uD150\uCE20\uB97C \uC218\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: "{0}" \uC815\uCC45 \uB9C8\uC15C\uB9C1\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: \uAD6C\uC131 \uD30C\uC77C \uCC3E\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uBE44\uC5B4 \uC788\uB294 \uC0C8 \uC815\uCC45 \uB9F5\uC744 \uC0DD\uC131\uD558\uB294 \uC911\uC785\uB2C8\uB2E4.
-WSP_1020_DUPLICATE_ID=WSP1020: \uB3D9\uC77C\uD55C ID\uB97C \uC0AC\uC6A9\uD558\uB294 \uD558\uB098\uC758 \uBB38\uC11C\uC5D0\uC11C \uB450 \uAC1C\uC758 \uC815\uCC45\uC744 \uCC3E\uC74C: "{0}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_pt_BR.properties
deleted file mode 100644
index 93b78dc8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_pt_BR.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: ocorreu XMLStreamException ao ler o elemento de refer\u00EAncia da pol\u00EDtica.
-WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: n\u00E3o \u00E9 poss\u00EDvel efetuar marshalling da pol\u00EDtica ou de sua refer\u00EAncia. Consulte a exce\u00E7\u00E3o original para obter mais detalhes.
-WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: n\u00E3o \u00E9 poss\u00EDvel verificar o nome do elemento da classe "{0}" e o nome do WSDL "{1}".
-WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: os URIs da pol\u00EDtica n\u00E3o podem ser nulos.
-WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: falha ao localizar a pol\u00EDtica mencionada pelo URI "{0}".
-WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: o extensor do mapa de pol\u00EDtica n\u00E3o pode ser nulo.
-WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: ocorreu uma exce\u00E7\u00E3o da pol\u00EDtica ao finalizar o parse do WSDL.
-# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }"
-WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: n\u00E3o efetuar marshalling da pol\u00EDtica; o assunto do wsdl \u00E9 nulo para "{0}".
-WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: o mapa da pol\u00EDtica era nulo; n\u00E3o fazer marshall de nenhuma pol\u00EDtica.
-WSP_1010_NO_POLICIES_DEFINED=WSP1010: nenhuma pol\u00EDtica definida.
-WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: falha ao recuperar a pol\u00EDtica efetiva do assunto: {0}.
-WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: falha ao configurar o modelo wsdl.
-# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: <wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="ProcessesPortBindingPolicy"><wsp:ExactlyOne xmlns:wsp="http://www.w3.org/ns/ws-policy"><wsp:All xmlns:wsp="http://www.w3.org/ns/ws-policy"></wsp:All></wsp:ExactlyOne></wsp:Policy>.
-WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: ocorreu uma exce\u00E7\u00E3o ao ler o elemento da pol\u00EDtica. O seguinte item foi lido at\u00E9 o momento: {0}.
-WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: n\u00E3o \u00E9 poss\u00EDvel localizar a pol\u00EDtica "{0}" mencionada no WSDL. Verifique as refer\u00EAncias da pol\u00EDtica no WSDL.
-WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: falha na valida\u00E7\u00E3o de asser\u00E7\u00E3o do servidor para a asser\u00E7\u00E3o "{0}". A asser\u00E7\u00E3o foi avaliada como "{1}".
-WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: a pol\u00EDtica n\u00E3o foi adicionada porque ela n\u00E3o tem ID ou porque uma pol\u00EDtica com o mesmo ID j\u00E1 foi adicionada: {0}.
-WSP_1017_MAP_UPDATE_FAILED=WSP1048: falha na configura\u00E7\u00E3o do mapa da pol\u00EDtica - ocorreu uma exce\u00E7\u00E3o ao tentar modificar o conte\u00FAdo do mapa da pol\u00EDtica.
-WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: falha ao fazer marshall da pol\u00EDtica "{0}".
-WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: falha ao localizar qualquer arquivo de configura\u00E7\u00E3o. Criando novo mapa de pol\u00EDtica vazia.
-WSP_1020_DUPLICATE_ID=WSP1020: foram detectadas duas pol\u00EDticas em um documento com o mesmo id: "{0}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_CN.properties
deleted file mode 100644
index 0da2903e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_CN.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: \u8BFB\u53D6\u7B56\u7565\u5F15\u7528\u5143\u7D20\u65F6\u51FA\u73B0 XMLStreamException\u3002
-WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: \u65E0\u6CD5\u7F16\u96C6\u7B56\u7565\u6216\u5176\u5F15\u7528\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u539F\u59CB\u5F02\u5E38\u9519\u8BEF\u3002
-WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: \u65E0\u6CD5\u68C0\u67E5\u7C7B "{0}" \u7684\u5143\u7D20\u540D\u548C WSDL \u540D\u79F0 "{1}"\u3002
-WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: \u7B56\u7565 URI \u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002
-WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: \u627E\u4E0D\u5230\u7531 URI "{0}" \u5F15\u7528\u7684\u7B56\u7565\u3002
-WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: \u7B56\u7565\u6620\u5C04\u6269\u5C55\u7A0B\u5E8F\u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002
-WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: \u5B8C\u6210 WSDL \u89E3\u6790\u65F6\u51FA\u73B0\u7B56\u7565\u5F02\u5E38\u9519\u8BEF\u3002
-# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }"
-WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: \u672A\u7F16\u96C6\u7B56\u7565, "{0}" \u7684 wsdl \u4E3B\u9898\u4E3A\u7A7A\u503C\u3002
-WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: \u7B56\u7565\u6620\u5C04\u4E3A\u7A7A\u503C, \u672A\u7F16\u96C6\u4EFB\u4F55\u7B56\u7565\u3002
-WSP_1010_NO_POLICIES_DEFINED=WSP1010: \u672A\u5B9A\u4E49\u7B56\u7565\u3002
-WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: \u65E0\u6CD5\u68C0\u7D22\u4E3B\u9898{0}\u7684\u6709\u6548\u7B56\u7565\u3002
-WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: \u65E0\u6CD5\u914D\u7F6E wsdl \u6A21\u578B\u3002
-# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: <wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="ProcessesPortBindingPolicy"><wsp:ExactlyOne xmlns:wsp="http://www.w3.org/ns/ws-policy"><wsp:All xmlns:wsp="http://www.w3.org/ns/ws-policy"></wsp:All></wsp:ExactlyOne></wsp:Policy>.
-WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: \u8BFB\u53D6\u7B56\u7565\u5143\u7D20\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF\u3002\u4E0B\u9762\u662F\u5230\u76EE\u524D\u4E3A\u6B62\u6240\u663E\u793A\u7684\u5185\u5BB9: {0}\u3002
-WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: \u627E\u4E0D\u5230\u4ECE WSDL \u4E2D\u5F15\u7528\u7684\u7B56\u7565 "{0}"\u3002\u8BF7\u5728 WSDL \u4E2D\u68C0\u67E5\u7B56\u7565\u5F15\u7528\u3002
-WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: "{0}" \u65AD\u8A00\u7684\u670D\u52A1\u5668\u7AEF\u65AD\u8A00\u9A8C\u8BC1\u5931\u8D25\u3002\u65AD\u8A00\u5DF2\u8BC4\u4F30\u4E3A "{1}"\u3002
-WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: \u672A\u6DFB\u52A0\u8BE5\u7B56\u7565, \u539F\u56E0\u662F\u8BE5\u7B56\u7565\u6CA1\u6709 ID \u6216\u5DF2\u6DFB\u52A0\u5177\u6709\u76F8\u540C ID \u7684\u7B56\u7565: {0}\u3002
-WSP_1017_MAP_UPDATE_FAILED=WSP1048: \u7B56\u7565\u6620\u5C04\u8BBE\u7F6E\u5931\u8D25 - \u5C1D\u8BD5\u4FEE\u6539\u7B56\u7565\u6620\u5C04\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF\u3002
-WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: \u65E0\u6CD5\u7F16\u96C6\u7B56\u7565 "{0}"\u3002
-WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: \u627E\u4E0D\u5230\u4EFB\u4F55\u914D\u7F6E\u6587\u4EF6\u3002\u6B63\u5728\u521B\u5EFA\u65B0\u7684\u7A7A\u7B56\u7565\u6620\u5C04\u3002
-WSP_1020_DUPLICATE_ID=WSP1020: \u5728\u4E00\u4E2A\u6587\u6863\u627E\u5230\u5177\u6709\u76F8\u540C ID \u7684\u4E24\u4E2A\u7B56\u7565: "{0}"\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_TW.properties
deleted file mode 100644
index b5373c29..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_TW.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: \u8B80\u53D6\u539F\u5247\u53C3\u7167\u5143\u7D20\u6642\u767C\u751F XMLStreamException.
-WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: \u7121\u6CD5\u5C01\u9001\u8655\u7406 (Marshal) \u539F\u5247\u6216\u5176\u53C3\u7167. \u8ACB\u53C3\u95B1\u539F\u59CB\u7684\u7570\u5E38\u72C0\u6CC1\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A.
-WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: \u7121\u6CD5\u6AA2\u67E5\u985E\u5225 "{0}" \u7684\u5143\u7D20\u540D\u7A31\u8207 WSDL \u540D\u7A31 "{1}".
-WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: \u539F\u5247 URI \u4E0D\u53EF\u70BA\u7A7A\u503C.
-WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: \u627E\u4E0D\u5230 URI "{0}" \u53C3\u7167\u7684\u539F\u5247.
-WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: \u539F\u5247\u5C0D\u61C9\u64F4\u5145\u9805\u4E0D\u53EF\u70BA\u7A7A\u503C.
-WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: \u5B8C\u6210 WSDL \u5256\u6790\u6642\u767C\u751F\u539F\u5247\u7570\u5E38\u72C0\u6CC1.
-# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }"
-WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: \u672A\u5C01\u9001\u8655\u7406 (Marshal) \u539F\u5247, "{0}" \u7684 WSDL \u4E3B\u9AD4\u70BA\u7A7A\u503C.
-WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: \u539F\u5247\u5C0D\u61C9\u70BA\u7A7A\u503C, \u672A\u5C01\u9001\u8655\u7406 (Marshal) \u4EFB\u4F55\u539F\u5247.
-WSP_1010_NO_POLICIES_DEFINED=WSP1010: \u672A\u5B9A\u7FA9\u539F\u5247.
-WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: \u7121\u6CD5\u64F7\u53D6\u4E3B\u9AD4: {0} \u7684\u6709\u6548\u539F\u5247.
-WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: \u7121\u6CD5\u8A2D\u5B9A WSDL \u6A21\u578B.
-# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: <wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="ProcessesPortBindingPolicy"><wsp:ExactlyOne xmlns:wsp="http://www.w3.org/ns/ws-policy"><wsp:All xmlns:wsp="http://www.w3.org/ns/ws-policy"></wsp:All></wsp:ExactlyOne></wsp:Policy>.
-WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: \u8B80\u53D6\u539F\u5247\u5143\u7D20\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1. \u76EE\u524D\u8B80\u5230\u7684\u8CC7\u8A0A\u5982\u4E0B: {0}.
-WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: \u627E\u4E0D\u5230 WSDL \u53C3\u7167\u7684\u539F\u5247 "{0}". \u8ACB\u6AA2\u67E5 WSDL \u4E2D\u7684\u539F\u5247\u53C3\u7167.
-WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: "{0}" \u5BA3\u544A\u7684\u4F3A\u670D\u5668\u7AEF\u5BA3\u544A\u9A57\u8B49\u5931\u6557. \u5BA3\u544A\u5DF2\u8A55\u4F30\u70BA "{1}".
-WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: \u672A\u65B0\u589E\u539F\u5247, \u56E0\u70BA\u5B83\u6C92\u6709 ID, \u6216\u5DF2\u65B0\u589E\u4E86\u76F8\u540C ID \u7684\u539F\u5247: {0}.
-WSP_1017_MAP_UPDATE_FAILED=WSP1048: \u539F\u5247\u5C0D\u61C9\u8A2D\u5B9A\u5931\u6557 - \u5617\u8A66\u4FEE\u6539\u539F\u5247\u5C0D\u61C9\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1.
-WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: \u7121\u6CD5\u5C01\u9001\u8655\u7406 (Marshal) \u539F\u5247 "{0}".
-WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: \u627E\u4E0D\u5230\u4EFB\u4F55\u7D44\u614B\u6A94. \u6B63\u5728\u5EFA\u7ACB\u65B0\u7684\u7A7A\u767D\u539F\u5247\u5C0D\u61C9.
-WSP_1020_DUPLICATE_ID=WSP1020: \u5728\u4E00\u500B\u6587\u4EF6\u4E2D\u767C\u73FE\u5169\u500B\u539F\u5247\u64C1\u6709\u76F8\u540C ID: "{0}".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi.properties
deleted file mode 100644
index e29e03b7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-null.address=Address in an EPR cannot be null
-null.address.service.endpoint=Address in an EPR cannot be null, when serviceName or portName is null
-null.service=serviceName can't be null when portName is specified
-null.portname=EPR doesn't have EndpointName in the Metadata
-null.wsdl= EPR doesn't have WSDL Metadata which is needed for the current operation
-notfound.service.in.wsdl= Service: {0} not found in WSDL: {1}
-no.wsdl.no.port = WSDL Metadata not available to create the proxy, either Service instance or \
- ServiceEndpointInterface {0} should have WSDL information
-notfound.port.in.wsdl=Port: {0} not a valid port in Service: {1} in WSDL: {2}
-error.wsdl= Error in parsing WSDL: {0}
-null.epr= EndpointReference is null
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_de.properties
deleted file mode 100644
index 18f53f5c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_de.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-null.address=Adresse in einer EPR darf nicht null sein
-null.address.service.endpoint=Adresse in einer EPR darf nicht null sein, wenn serviceName oder portName null ist
-null.service=serviceName darf nicht null sein, wenn portName angegeben ist
-null.portname=EPR enth\u00E4lt EndpointName in den Metadaten nicht
-null.wsdl= EPR enth\u00E4lt keine WSDL-Metadaten, die f\u00FCr den aktuellen Vorgang ben\u00F6tigt werden
-notfound.service.in.wsdl= Service: {0} in WSDL {1} nicht gefunden
-no.wsdl.no.port = WSDL-Metadaten f\u00FCr Erstellen des Proxys nicht verf\u00FCgbar, entweder Serviceinstanz oder ServiceEndpointInterface {0} muss WSDL-Informationen enthalten
-notfound.port.in.wsdl=Port: {0} ist kein g\u00FCltiger Port in Service: {1} in WSDL: {2}
-error.wsdl= Fehler beim Parsen von WSDL: {0}.
-null.epr= EndpointReference ist null
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_es.properties
deleted file mode 100644
index 56e0d0cb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_es.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-null.address=La direcci\u00F3n en una referencia de punto final no puede ser nula
-null.address.service.endpoint=La direcci\u00F3n en una referencia de punto final no puede ser nula si serviceName o portName son nulos
-null.service=serviceName no puede ser nulo si se especifica portName
-null.portname=La referencia de punto final no tiene EndpointName en los metadatos
-null.wsdl= La referencia de punto final no tiene los metadatos de WSDL que son necesarios para la operaci\u00F3n actual
-notfound.service.in.wsdl= El servicio: {0} no se ha encontrado en el WSDL: {1}
-no.wsdl.no.port = Los metadatos de WSDL no est\u00E1n disponibles para crear el proxy. La instancia de servicio o ServiceEndpointInterface {0} deber\u00EDan tener informaci\u00F3n de WSDL
-notfound.port.in.wsdl=El puerto: {0} no es v\u00E1lido en el servicio: {1} de WSDL: {2}
-error.wsdl= Error al analizar el WSDL: {0}
-null.epr= EndpointReference es nulo
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_fr.properties
deleted file mode 100644
index 0bafda43..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_fr.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-null.address=L'adresse d'une r\u00E9f\u00E9rence d'adresse ne peut pas \u00EAtre NULL
-null.address.service.endpoint=L'adresse d'une r\u00E9f\u00E9rence d'adresse ne peut pas \u00EAtre NULL lorsque serviceName ou portName est NULL
-null.service=serviceName ne peut pas \u00EAtre NULL lorsque portName est indiqu\u00E9
-null.portname=La r\u00E9f\u00E9rence d'adresse ne comporte pas de nom d'adresse dans les m\u00E9tadonn\u00E9es
-null.wsdl= La r\u00E9f\u00E9rence d'adresse ne comporte pas les m\u00E9tadonn\u00E9es WSDL n\u00E9cessaires \u00E0 l'op\u00E9ration en cours
-notfound.service.in.wsdl= Service {0} introuvable dans le WSDL {1}
-no.wsdl.no.port = M\u00E9tadonn\u00E9es WSDL non disponibles pour cr\u00E9er le proxy, l''instance de service ou ServiceEndpointInterface {0} doit comporter des informations WSDL
-notfound.port.in.wsdl=Le port {0} n''est pas valide dans le service {1} dans le WSDL {2}
-error.wsdl= Erreur lors de l''analyse du WSDL : {0}.
-null.epr= EndpointReference est NULL
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_it.properties
deleted file mode 100644
index 46fd9e7f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_it.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-null.address=L'indirizzo in un EPR non pu\u00F2 essere nullo
-null.address.service.endpoint=L'indirizzo in un EPR non pu\u00F2 essere nullo quando \u00E8 nullo serviceName o portName
-null.service=serviceName non pu\u00F2 essere nullo quando \u00E8 specificato portName
-null.portname=L'EPR non dispone di EndpointName nei metadati
-null.wsdl= L'EPR non dispone dei metadati WSDL necessari per l'operazione corrente
-notfound.service.in.wsdl= Servizio: {0} non trovato in WSDL: {1}
-no.wsdl.no.port = Metadati WSDL non disponibili per la creazione del proxy. L''istanza di servizio o ServiceEndpointInterface {0} devono contenere le informazioni WSDL
-notfound.port.in.wsdl=La porta: {0} non \u00E8 una porta valida nel servizio: {1} in WSDL: {2}
-error.wsdl= Errore durante l''analisi di WSDL: {0}
-null.epr= EndpointReference nullo
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ja.properties
deleted file mode 100644
index 2cfcc72b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ja.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-null.address=EPR\u306E\u30A2\u30C9\u30EC\u30B9\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093
-null.address.service.endpoint=serviceName\u307E\u305F\u306FportName\u304Cnull\u3067\u3042\u308B\u5834\u5408\u3001EPR\u306E\u30A2\u30C9\u30EC\u30B9\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093
-null.service=portName\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001serviceName\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093
-null.portname=EPR\u3067\u30E1\u30BF\u30C7\u30FC\u30BF\u306BEndpointName\u304C\u3042\u308A\u307E\u305B\u3093
-null.wsdl= EPR\u306B\u306F\u73FE\u5728\u306E\u64CD\u4F5C\u306B\u5FC5\u8981\u306AWSDL\u30E1\u30BF\u30C7\u30FC\u30BF\u304C\u3042\u308A\u307E\u305B\u3093
-notfound.service.in.wsdl= WSDL: {1}\u306B\u30B5\u30FC\u30D3\u30B9: {0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-no.wsdl.no.port = \u30D7\u30ED\u30AD\u30B7\u3092\u4F5C\u6210\u3059\u308B\u305F\u3081\u306EWSDL\u30E1\u30BF\u30C7\u30FC\u30BF\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u30B5\u30FC\u30D3\u30B9\u30FB\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u307E\u305F\u306FServiceEndpointInterface {0}\u306BWSDL\u60C5\u5831\u304C\u5FC5\u8981\u3067\u3059
-notfound.port.in.wsdl=WSDL: {2}\u306E\u30B5\u30FC\u30D3\u30B9: {1}\u306E\u30DD\u30FC\u30C8: {0}\u306F\u6709\u52B9\u306A\u30DD\u30FC\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-error.wsdl= WSDL: {0}\u306E\u89E3\u6790\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-null.epr= EndpointReference\u304Cnull\u3067\u3059
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ko.properties
deleted file mode 100644
index 2e77661a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ko.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-null.address=EPR\uC758 \uC8FC\uC18C\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-null.address.service.endpoint=serviceName \uB610\uB294 portName\uC774 \uB110\uC778 \uACBD\uC6B0 EPR\uC758 \uC8FC\uC18C\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-null.service=portName\uC774 \uC9C0\uC815\uB41C \uACBD\uC6B0 serviceName\uC740 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-null.portname=EPR\uC758 \uBA54\uD0C0 \uB370\uC774\uD130\uC5D0 EndpointName\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-null.wsdl= \uD604\uC7AC \uC791\uC5C5\uC5D0 \uD544\uC694\uD55C WSDL \uBA54\uD0C0 \uB370\uC774\uD130\uAC00 EPR\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4.
-notfound.service.in.wsdl= {0} \uC11C\uBE44\uC2A4\uB97C WSDL\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {1}
-no.wsdl.no.port = \uD504\uB85D\uC2DC \uC0DD\uC131\uC5D0 WSDL \uBA54\uD0C0 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC11C\uBE44\uC2A4 \uC778\uC2A4\uD134\uC2A4 \uB610\uB294 ServiceEndpointInterface {0}\uC5D0 WSDL \uC815\uBCF4\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-notfound.port.in.wsdl={0} \uD3EC\uD2B8\uAC00 WSDL\uC758 {1} \uC11C\uBE44\uC2A4\uC5D0 \uC801\uD569\uD55C \uD3EC\uD2B8\uAC00 \uC544\uB2D8: {2}
-error.wsdl= WSDL\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD558\uB294 \uC911 \uC624\uB958 \uBC1C\uC0DD: {0}
-null.epr= EndpointReference\uAC00 \uB110\uC785\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_pt_BR.properties
deleted file mode 100644
index e1b7d918..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_pt_BR.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-null.address=O endere\u00E7o em um EPR n\u00E3o pode ser nulo
-null.address.service.endpoint=O endere\u00E7o em um EPF n\u00E3o poder\u00E1 ser nulo quando serviceName ou portName for nulo
-null.service=serviceName n\u00E3o poder\u00E1 ser nulo quando portName for especificado
-null.portname=O EPF n\u00E3o tem EndpointName nos Metadados
-null.wsdl= O EPR n\u00E3o tem os Metadados WSDL necess\u00E1rios \u00E0 opera\u00E7\u00E3o atual
-notfound.service.in.wsdl= Servi\u00E7o: {0} n\u00E3o encontrado no WSDL: {1}
-no.wsdl.no.port = Os Metadados WSDL n\u00E3o est\u00E3o dispon\u00EDveis para criar o proxy; a inst\u00E2ncia Service ou ServiceEndpointInterface {0} deve ter informa\u00E7\u00F5es do WSDL
-notfound.port.in.wsdl=Porta: {0} n\u00E3o \u00E9 uma porta v\u00E1lida no Servi\u00E7o {1} no WSDL {2}
-error.wsdl= Erro ao fazer parse do WSDL: {0}
-null.epr= EndpointReference \u00E9 nulo
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_CN.properties
deleted file mode 100644
index c01eadd9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_CN.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-null.address=EPR \u4E2D\u7684\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A\u503C
-null.address.service.endpoint=\u5F53 serviceName \u6216 portName \u4E3A\u7A7A\u503C\u65F6, EPR \u4E2D\u7684\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A\u503C
-null.service=\u6307\u5B9A portName \u65F6, serviceName \u4E0D\u80FD\u4E3A\u7A7A\u503C
-null.portname=EPR \u7684\u5143\u6570\u636E\u4E2D\u6CA1\u6709 EndpointName
-null.wsdl= EPR \u6CA1\u6709\u5F53\u524D\u64CD\u4F5C\u6240\u9700\u7684 WSDL \u5143\u6570\u636E
-notfound.service.in.wsdl= \u5728 WSDL {1}\u4E2D\u672A\u627E\u5230\u670D\u52A1{0}
-no.wsdl.no.port = WSDL \u5143\u6570\u636E\u65E0\u6CD5\u7528\u4E8E\u521B\u5EFA\u4EE3\u7406, \u670D\u52A1\u5B9E\u4F8B\u6216 ServiceEndpointInterface {0}\u5E94\u5305\u542B WSDL \u4FE1\u606F
-notfound.port.in.wsdl=\u7AEF\u53E3{0}\u4E0D\u662F WSDL {2}\u7684\u670D\u52A1{1}\u4E2D\u7684\u6709\u6548\u7AEF\u53E3
-error.wsdl= \u89E3\u6790 WSDL \u65F6\u51FA\u9519: {0}
-null.epr= EndpointReference \u4E3A\u7A7A\u503C
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_TW.properties
deleted file mode 100644
index d9d38bb4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_TW.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-null.address=EPR \u4E2D\u7684\u4F4D\u5740\u4E0D\u53EF\u70BA\u7A7A\u503C
-null.address.service.endpoint=\u7576 serviceName \u6216 portName \u70BA\u7A7A\u503C\u6642, EPR \u4E2D\u7684\u4F4D\u5740\u4E0D\u53EF\u70BA\u7A7A\u503C
-null.service=\u7576\u6307\u5B9A portName \u6642, serviceName \u4E0D\u53EF\u70BA\u7A7A\u503C
-null.portname=EPR \u7684\u63CF\u8FF0\u8CC7\u6599\u4E2D\u6C92\u6709 EndpointName
-null.wsdl= EPR \u6C92\u6709\u76EE\u524D\u4F5C\u696D\u6240\u9700\u7684 WSDL \u63CF\u8FF0\u8CC7\u6599
-notfound.service.in.wsdl= \u5728 WSDL: {1} \u4E2D\u627E\u4E0D\u5230\u670D\u52D9: {0}
-no.wsdl.no.port = WSDL \u63CF\u8FF0\u8CC7\u6599\u7121\u6CD5\u7528\u65BC\u5EFA\u7ACB\u4EE3\u7406\u4E3B\u6A5F, \u670D\u52D9\u57F7\u884C\u8655\u7406\u6216 ServiceEndpointInterface {0} \u61C9\u5305\u542B WSDL \u8CC7\u8A0A
-notfound.port.in.wsdl=WSDL: {2} \u4E2D\u4E4B\u670D\u52D9: {1} \u7684\u9023\u63A5\u57E0: {0} \u4E0D\u662F\u6709\u6548\u7684\u9023\u63A5\u57E0
-error.wsdl= \u5256\u6790 WSDL \u6642\u767C\u751F\u932F\u8AA4: {0}
-null.epr= EndpointReference \u70BA\u7A7A\u503C
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender.properties
deleted file mode 100644
index c43dfacd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-sender.nestedError=sender error: {0}
-sender.request.messageNotReady=message not ready to be sent
-sender.response.cannotDecodeFaultDetail=fault detail cannot be decoded
-sender.request.illegalValueForContentNegotiation=illegal value for content negotiation property \"{0}\"
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_de.properties
deleted file mode 100644
index 246ab9a0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_de.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-sender.nestedError=Absenderfehler: {0}
-sender.request.messageNotReady=Nachricht nicht zum Senden bereit
-sender.response.cannotDecodeFaultDetail=Fault-Details k\u00F6nnen nicht decodiert werden
-sender.request.illegalValueForContentNegotiation=Unzul\u00E4ssiger Wert f\u00FCr Contentnegotiationseigenschaft \\"{0}\\"
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_es.properties
deleted file mode 100644
index 69776f3b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_es.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-sender.nestedError=error de remitente: {0}
-sender.request.messageNotReady=el mensaje no est\u00E1 preparado para ser enviado
-sender.response.cannotDecodeFaultDetail=no se puede descodificar el detalle del fallo
-sender.request.illegalValueForContentNegotiation=valor no v\u00E1lido para la propiedad de negociaci\u00F3n de contenido \"{0}\"
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_fr.properties
deleted file mode 100644
index b472fd16..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_fr.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-sender.nestedError=erreur d''\u00E9metteur : {0}
-sender.request.messageNotReady=le message n'est pas pr\u00EAt \u00E0 \u00EAtre envoy\u00E9
-sender.response.cannotDecodeFaultDetail=le d\u00E9tail par d\u00E9faut ne peut pas \u00EAtre d\u00E9cod\u00E9
-sender.request.illegalValueForContentNegotiation=valeur interdite pour la propri\u00E9t\u00E9 de n\u00E9gociation de contenu \"{0}\"
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_it.properties
deleted file mode 100644
index 62ee177e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_it.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-sender.nestedError=errore del mittente: {0}
-sender.request.messageNotReady=il messaggio non \u00E8 pronto per essere inviato
-sender.response.cannotDecodeFaultDetail=impossibile decodificare i dettagli dell'errore
-sender.request.illegalValueForContentNegotiation=valore non valido per la propriet\u00E0 di negoziazione del contenuto \"{0}\"
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ja.properties
deleted file mode 100644
index 7696a1d7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ja.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-sender.nestedError=\u9001\u4FE1\u5074\u30A8\u30E9\u30FC: {0}
-sender.request.messageNotReady=\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u9001\u4FE1\u3059\u308B\u6E96\u5099\u304C\u3067\u304D\u3066\u3044\u307E\u305B\u3093
-sender.response.cannotDecodeFaultDetail=\u30D5\u30A9\u30EB\u30C8\u8A73\u7D30\u3092\u30C7\u30B3\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093
-sender.request.illegalValueForContentNegotiation=\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30CD\u30B4\u30B7\u30A8\u30FC\u30B7\u30E7\u30F3\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\"{0}\"\u306E\u5024\u304C\u4E0D\u6B63\u3067\u3059
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ko.properties
deleted file mode 100644
index 5746e91a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ko.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-sender.nestedError=\uBC1C\uC2E0\uC790 \uC624\uB958: {0}
-sender.request.messageNotReady=\uBA54\uC2DC\uC9C0 \uC804\uC1A1 \uC900\uBE44\uAC00 \uC644\uB8CC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-sender.response.cannotDecodeFaultDetail=\uACB0\uD568 \uC138\uBD80 \uC815\uBCF4\uB97C \uB514\uCF54\uB529\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-sender.request.illegalValueForContentNegotiation=\uCF58\uD150\uCE20 \uD611\uC0C1 \uC18D\uC131 \"{0}\"\uC5D0 \uB300\uD55C \uAC12\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_pt_BR.properties
deleted file mode 100644
index 4cc56be5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_pt_BR.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-sender.nestedError=erro do emissor: {0}
-sender.request.messageNotReady=a mensagem n\u00E3o est\u00E1 pronta para ser enviada
-sender.response.cannotDecodeFaultDetail=o detalhe da falha n\u00E3o pode ser decodificado
-sender.request.illegalValueForContentNegotiation=valor inv\u00E1lido para a propriedade \"{0}\" de negocia\u00E7\u00E3o de conte\u00FAdo
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_CN.properties
deleted file mode 100644
index 22b0c1d3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_CN.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-sender.nestedError=\u53D1\u9001\u65B9\u9519\u8BEF: {0}
-sender.request.messageNotReady=\u6D88\u606F\u5C1A\u672A\u5C31\u7EEA, \u65E0\u6CD5\u53D1\u9001
-sender.response.cannotDecodeFaultDetail=\u65E0\u6CD5\u89E3\u7801\u6545\u969C\u8BE6\u7EC6\u4FE1\u606F
-sender.request.illegalValueForContentNegotiation=\u5185\u5BB9\u534F\u5546\u5C5E\u6027 \"{0}\" \u7684\u503C\u975E\u6CD5
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_TW.properties
deleted file mode 100644
index 2bf72dee..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_TW.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Wrapped into an Exception. {0} - localizable exception message of another exception
-sender.nestedError=\u5BC4\u4EF6\u8005\u932F\u8AA4: {0}
-sender.request.messageNotReady=\u8A0A\u606F\u5C1A\u672A\u5099\u59A5, \u7121\u6CD5\u50B3\u9001
-sender.response.cannotDecodeFaultDetail=\u7121\u6CD5\u89E3\u78BC\u932F\u8AA4\u8A73\u7D30\u8CC7\u8A0A
-sender.request.illegalValueForContentNegotiation=\u5167\u5BB9\u5354\u8B70\u7279\u6027 \"{0}\" \u7684\u503C\u7121\u6548
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server.properties
deleted file mode 100644
index a94cb838..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server.properties
+++ /dev/null
@@ -1,136 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soapdecoder.err=Error in decoding SOAP Message
-server.rt.err=Server Runtime Error: {0}
-soapencoder.err=Error in encoding SOAP Message
-
-annotation.only.once=Only one method should have the annotation \"{0}\"
-not.zero.parameters=Method \"{0}\" shouldn''t have any arguments
-
-wrong.field.type=Incorrect type for field \"{0}\"
-wrong.no.parameters=Incorrect no of arguments for method \"{0}\"
-wrong.parameter.type=Incorrect argument types for method \"{0}\"
-
-can.not.generate.wsdl=Cannot generate WSDL for binding \"{0}\"
-generate.non.standard.wsdl=Generating non-standard WSDL for the specified binding
-null.implementor=Implementor cannot be null
-
-runtime.wsdl.patcher=error while patching WSDL related document
-
-# {0} - class name
-not.implement.provider=\"{0}\" doesn't implement Provider
-# {0} - class name
-provider.not.parameterized=\"{0}\" implements Provider but doesn't specify the type parameter
-# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect
-provider.invalid.parameterType=\"{0}\" implements Provider but its type parameter {1} is incorrect
-
-wsdl.required=wsdl is required
-service.name.required=Service QName is not found
-port.name.required=Port QName is not found
-wrong.tns.for.port=Port namespace {0} doesn't match Service namespace {1}
-
-# {0} - probably URL/port of a server
-already.http.server=There is already a HTTP server at : {0}\
-# {0} - probably URL/port of a server
-already.https.server=There is already a HTTPS server at : {0}
-#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0}
-
-not.know.HttpContext.type=Doesn''t support Endpoint.publish({0}). Known context types are {1}, and {2}
-
-duplicate.primary.wsdl=Metadata has more than one WSDL that has Service definition for the endpoint. WSDL={0} is one such WSDL.
-duplicate.abstract.wsdl=Metadata has more than one WSDL that has PortType definition for the endpoint. WSDL={0} is one such WSDL.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.classNotFound=class not found in runtime descriptor: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.xmlReader=error parsing runtime descriptor: {0}
-# Usage not found. TODO Remove
-#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0}
-runtime.parser.unexpectedContent=unexpected content in runtime descriptor (line {0})
-runtime.parser.invalidElement=invalid element \"{1}\" in runtime descriptor (line {0})
-runtime.parser.invalidAttributeValue=invalid value for attribute \"{2}\" of element \"{1}\" in runtime descriptor (line {0})
-runtime.parser.invalidVersionNumber=unsupported runtime descriptor version: {2}
-runtime.parser.missing.attribute=missing attribute \"{2}\" in element \"{1}\" of runtime descriptor (line {0})
-runtime.parser.invalid.attribute.value=invalid attribute value \"{1}\" in runtime descriptor (line {0})
-runtime.parser.missing.attribute.no.line=missing attribute \"{2}\" in element \"{1}\" of runtime descriptor
-runtime.parser.wrong.element=found element \"{1}\", expected \"{2}\" in runtime descriptor (line {0})
-runtime.parser.wsdl.not.found={0} is not found in the WAR file. Package it in the WAR file or correct it in sun-jaxws.xml.
-runtime.parser.wsdl=exception during WSDL parsing: {0}
-runtime.saxparser.exception={0}\n{1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2}
-runtime.parser.wsdl.multiplebinding=multiple bindings found for binding ID {0} for service {1} in WSDL {2}
-runtime.parser.wsdl.noservice.in.wsdlmodel=There is an error in processing the WSDL {0} and no valid services are found.
-runtime.parser.wsdl.incorrectservice=could not get binding from WSDL! service: {0} not found in the WSDL {1}.\n\
- It could be because service name does not match WSDL''s wsdl:service name:\n\
- 1. service name is not there in deployment descriptor OR\n\
- 2. Either there is a typo in deployment descriptor''s service name OR\n\
- 3. The computed names from @WebService do not match wsdl:service name\n\
- OR\n\
- 1. There is an error while parsing the wsdl and Service with name {0} is not found in the WSDLModel.\n\
- Suggest doing the following:\n\
- 1. Add/Correct entries for service name in deployment descriptor OR \n\
- 2. Specify targetNamespace, serviceName in @WebService on the endpoint class
-
-runtime.parser.wsdl.incorrectserviceport=could not get binding from WSDL! service: {0} or port {1} not found in the WSDL {2}.\n\
- It could be because service and port names do not match WSDL''s wsdl:service and wsdl:port names:\n\
- 1. service and port names are not there in deployment descriptor OR\n\
- 2. Either there is a typo in deployment descriptor''s service and port names OR\n\
- 3. The computed names from @WebService do not match wsdl:service and wsdl:port names\n\
- Suggest doing the following:\n\
- 1. Add/Correct entries for service and port names in deployment descriptor OR \n\
- 2. Specify targetNamespace, serviceName, portName in @WebService on the endpoint class
-
-stateful.cookie.header.required=This is a stateful web service and {0} header is required.
-stateful.cookie.header.incorrect=Invalid/expired {0} header value: {1}
-stateful.invalid.webservice.context=Not a WebServiceContext from JAX-WS RI: {0}
-stateful.requres.addressing=Stateful web service {0} requires the WS-Addressing support to be enabled. Perhaps you are missing @Addressing
-
-no.current.packet=This thread is not currently processing any web service request.
-
-# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2)
-failed.to.instantiate.instanceResolver=Unable to instantiate {0} (which is specified in {1} on {2})
-
-static.resource.injection.only=Static resource {0} cannot be injected to non-static "{1}"
-
-dd.mtom.conflict = Error in Deployment Descriptor : MTOM Configuration in binding {0} conflicts with enable-mtom attribute value {1}
-
-# {0} - qname of an element
-dispatch.cannotFindMethod=Cannot find dispatch method for {0}
-non.unique.dispatch.qname=Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique \
- operation signature on the wire for successful dispatch. Methods {0} have the \
- same request body block {1}. Method dispatching may fail, runtime will try to \
- dispatch using SOAPAction. Another option is to enable AddressingFeature to enabled runtime to uniquely identify \
- WSDL operation using wsa:Action header.
-
-unsupported.contentType=Unsupported Content-Type: {0} Supported ones are: {1}
-no.contentType=Request doesn't have a Content-Type
-unsupported.charset=Unsupported charset "{0}" in the received message''s Content-Type
-duplicate.portKnownHeader=Received SOAP message contains duplicate header: {0} for a bound parameter
-
-runtimemodeler.invalidannotationOnImpl=Invalid annotation: {0} on endpoint implementation class \"{1}\" - will be ignored. \"{1}\" is annotated with @WebService(endpointInterface=\"{2}\"}, it must not be annotated with {0}, to fix it - put this annotation on the SEI {2}.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_de.properties
deleted file mode 100644
index 5476c17b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_de.properties
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soapdecoder.err=Fehler beim Decodieren von SOAP-Nachricht
-server.rt.err=Serverlaufzeitfehler: {0}
-soapencoder.err=Fehler beim Codieren von SOAP-Nachricht
-
-annotation.only.once=Nur eine Methode kann die Annotation \"{0}\" enthalten
-not.zero.parameters=Methode \"{0}\" darf keine Argumente enthalten
-
-wrong.field.type=Ung\u00FCltiger Typ f\u00FCr Feld \"{0}\"
-wrong.no.parameters=Ung\u00FCltige Anzahl Argumente f\u00FCr Methode \"{0}\"
-wrong.parameter.type=Ung\u00FCltige Argumenttypen f\u00FCr Methode \"{0}\"
-
-can.not.generate.wsdl=WSDL f\u00FCr Binding \"{0}\" kann nicht generiert werden
-generate.non.standard.wsdl=Nicht-Standard-WSDL f\u00FCr das angegebene Binding wird generiert
-null.implementor=Implementor darf nicht null sein
-
-runtime.wsdl.patcher=Fehler beim Patchen des zu WSDL geh\u00F6rigen Dokuments
-
-# {0} - class name
-not.implement.provider=\"{0}\" implementiert Provider nicht
-# {0} - class name
-provider.not.parameterized=\"{0}\" implementiert Provider, gibt jedoch den Typparameter nicht an
-# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect
-provider.invalid.parameterType=\"{0}\" implementiert Provider, der Typparameter {1} ist jedoch ung\u00FCltig
-
-wsdl.required=WSDL ist erforderlich
-service.name.required=Service-QName nicht gefunden
-port.name.required=Port-QName nicht gefunden
-wrong.tns.for.port=Port-Namespace {0} stimmt nicht mit Service-Namespace {1} \u00FCberein
-
-# {0} - probably URL/port of a server
-already.http.server=Es ist bereits ein HTTP-Server vorhanden in: {0}# {0} - wahrscheinlich URL/Port eines Servers
-already.https.server=Es ist bereits ein HTTPS-Server vorhanden in: {0}
-#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0}
-
-not.know.HttpContext.type=Unterst\u00FCtzt Endpoint.publish({0}) nicht. Bekannte Kontexttypen sind {1} und {2}
-
-duplicate.primary.wsdl=Metadaten enthalten mehr als eine WSDL, die die Servicedefinition f\u00FCr den End Point enth\u00E4lt. WSDL={0} ist eine derartige WSDL.
-duplicate.abstract.wsdl=Metadaten enthalten mehr als eine WSDL, die die PortType-Definition f\u00FCr den End Point enth\u00E4lt. WSDL={0} ist eine derartige WSDL.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.classNotFound=Klasse in Laufzeitdeskriptor nicht gefunden: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.xmlReader=Fehler beim Parsen von Laufzeitdeskriptor: {0}
-# Usage not found. TODO Remove
-#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0}
-runtime.parser.unexpectedContent=unerwarteter Content in Laufzeitdeskriptor (Zeile {0})
-runtime.parser.invalidElement=ung\u00FCltiges Element \"{1}\" in Laufzeitdeskriptor (Zeile {0})
-runtime.parser.invalidAttributeValue=ung\u00FCltiger Wert f\u00FCr Attribut \"{2}\" von Element \"{1}\" in Laufzeitdeskriptor (Zeile {0})
-runtime.parser.invalidVersionNumber=nicht unterst\u00FCtzte Laufzeitdeskriptorversion: {2}
-runtime.parser.missing.attribute=fehlendes Attribut \"{2}\" in Element \"{1}\" von Laufzeitdeskriptor (Zeile {0})
-runtime.parser.invalid.attribute.value=ung\u00FCltiger Attributwert \"{1}\" in Laufzeitdeskriptor (Zeile {0})
-runtime.parser.missing.attribute.no.line=fehlendes Attribut \"{2}\" in Element \"{1}\" von Laufzeitdeskriptor
-runtime.parser.wrong.element=Element \"{1}\" ermittelt, \"{2}\" in Laufzeitdeskriptor erwartet (Zeile {0})
-runtime.parser.wsdl.not.found={0} wurde in der .war-Datei nicht gefunden. Verpacken Sie sie in der .war-Datei, oder korrigieren Sie sie in sun-jaxws.xml.
-runtime.parser.wsdl=Ausnahme beim Parsen von WSDL: {0}
-runtime.saxparser.exception={0}\n{1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2}
-runtime.parser.wsdl.multiplebinding=mehrere Bindings f\u00FCr Binding-ID {0} f\u00FCr Service {1} in WSDL {2} gefunden
-runtime.parser.wsdl.noservice.in.wsdlmodel=Bei der Verarbeitung der WSDL {0} ist ein Fehler aufgetreten, und es wurden keine g\u00FCltigen Services gefunden.
-runtime.parser.wsdl.incorrectservice=Binding konnte nicht aus WSDL!-Service abgerufen werden: {0} nicht in der WSDL {1} gefunden.\nM\u00F6glicherweise stimmt der Servicename nicht mit wsdl:service-Name der WSDL \u00FCberein. Folgende Ursachen sind m\u00F6glich:\n1. Servicename ist in Deployment-Deskriptor nicht vorhanden\n2. Der Servicename des Deployment-Deskriptors enth\u00E4lt einen Tippfehler.\n3. Die berechneten Namen aus @WebService stimmen nicht mit wsdl:service-Name \u00FCberein \nODER\n4. Beim Parsen der WSDL ist ein Fehler aufgetreten und der Service mit Name {0} wurde in WSDLModel nicht gefunden.\nEs wird empfohlen, dass Sie eine der folgenden Schritte ausf\u00FChren:\n1. F\u00FCgen Sie Eintr\u00E4ge f\u00FCr den Servicenamen in den Deployment-Deskriptor ein bzw. korrigieren Sie diese \n2. Geben Sie targetNamespace, serviceName in @WebService in der End Point-Klasse an
-
-runtime.parser.wsdl.incorrectserviceport=Binding konnte nicht aus WSDL!-Service abgerufen werden: {0} oder Port {1} wurde nicht in der WSDL gefunden {2}.\nM\u00F6glicherweise stimmen die Service- und Portnamen nicht mit den wsdl:service- und wsdl:port-Namen der WSDL \u00FCberein. Folgende Ursachen sind m\u00F6glich:\n1. Service- und Portnamen sind im Deployment-Deskriptor nicht vorhanden.\n2. Die Service- und Portnamen im Deployment-Deskriptor enthalten einen Tippfehler.\n3. Die berechneten Namen aus @WebService stimmen nicht mit den wsdl:service- und wsdl:port-Namen \u00FCberein.\nEs wird empfohlen, dass Sie einen der folgenden Schritte ausf\u00FChren:\n1. F\u00FCgen Sie Eintr\u00E4ge f\u00FCr die Service- und Portnamen in den Deployment-Deskriptor ein bzw. korrigieren Sie diese.\n2. Geben Sie targetNamespace, serviceName, portName in @WebService in der End Point-Klasse an
-
-stateful.cookie.header.required=Dies ist ein Stateful-Webservice und {0}-Header ist erforderlich.
-stateful.cookie.header.incorrect=Ung\u00FCltiger/abgelaufener {0}-Header-Wert: {1}
-stateful.invalid.webservice.context=Kein WebServiceContext aus JAX-WS RI: {0}
-stateful.requres.addressing=Stateful-Webservice {0} erfordert die Unterst\u00FCtzung der WS-Adressierung, damit er aktiviert werden kann. M\u00F6glicherweise fehlt @Addressing
-
-no.current.packet=Dieser Thread verarbeitet aktuell keine Webserviceanforderung
-
-# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2)
-failed.to.instantiate.instanceResolver={0} kann nicht instanziiert werden (wird in {1} in {2} angegeben)
-
-static.resource.injection.only=Injection von statischer Ressource {0} in nicht-statischer "{1}" ist nicht m\u00F6glich
-
-dd.mtom.conflict = Fehler in Deployment-Deskriptor: MTOM-Konfiguration in Binding {0} ist nicht mit enable-mtom-Attributwert {1} vereinbar
-
-# {0} - qname of an element
-dispatch.cannotFindMethod=Verteilungsmethode f\u00FCr {0} kann nicht gefunden werden
-non.unique.dispatch.qname=Nicht eindeutige Textteile. Gem\u00E4\u00DF BP 1.1 R2710 m\u00FCssen Vorg\u00E4nge in einem Port eindeutige Vorgangssignaturen enthalten, damit die Verteilung erfolgreich verl\u00E4uft. Methoden {0} haben denselben Anforderungstextblock {1}. Die Verteilung von Methoden verl\u00E4uft m\u00F6glicherweise nicht erfolgreich, die Laufzeitumgebung wird versuchen, die Verteilung mit SOAPAction vorzunehmen. Eine andere M\u00F6glichkeit besteht darin, AddressingFeature zu aktivieren, damit die Laufzeitumgebung WSDL-Vorg\u00E4nge eindeutig mit wsa:Action-Header identifizieren kann.
-
-unsupported.contentType=Nicht unterst\u00FCtzter Content-Type: {0} Unterst\u00FCtzte Content-Types sind: {1}
-no.contentType=Die Anforderung hat keinen Content-Type.
-unsupported.charset=Nicht unterst\u00FCtzter Zeichensatz "{0}" im Content-Type der empfangenen Nachricht
-duplicate.portKnownHeader=Empfangene SOAP-Nachricht enth\u00E4lt doppelten Header: {0} f\u00FCr einen gebundenen Parameter
-
-runtimemodeler.invalidannotationOnImpl=Ung\u00FCltige Annotation: {0} bei End Point-Implementierungsklasse \\"{1}\\" - wird ignoriert. \\"{1}\\" ist mit @WebService-Annotation versehen (endpointInterface=\\"{2}\\"}, sie darf keine {0}-Annotation enthalten. Um das Problem zu beheben, setzen Sie diese Annotation in SEI {2}.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_es.properties
deleted file mode 100644
index 8194ec01..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_es.properties
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soapdecoder.err=Error al descodificar el mensaje de SOAP
-server.rt.err=Error en tiempo de ejecuci\u00F3n del servidor: {0}
-soapencoder.err=Error al codificar el mensaje de SOAP
-
-annotation.only.once=S\u00F3lo un m\u00E9todo debe tener la anotaci\u00F3n \"{0}\"
-not.zero.parameters=El m\u00E9todo \"{0}\" no deber\u00EDa tener ning\u00FAn argumento
-
-wrong.field.type=Tipo incorrecto para el campo \\"{0}\\"
-wrong.no.parameters=N\u00FAmero de argumentos incorrecto para el m\u00E9todo \"{0}\".
-wrong.parameter.type=Tipos de argumentos incorrectos para el m\u00E9todo \"{0}\"
-
-can.not.generate.wsdl=No se puede generar el WSDL para el enlace \"{0}\"
-generate.non.standard.wsdl=Generando WSDL no est\u00E1ndar para el enlace especificado
-null.implementor=El implantador no puede ser nulo
-
-runtime.wsdl.patcher=error al aplicar el parche al documento relacionado con el WSDL
-
-# {0} - class name
-not.implement.provider=\"{0}\" no implanta el proveedor
-# {0} - class name
-provider.not.parameterized=\"{0}\" implanta el proveedor, pero no especifica el par\u00E1metro del tipo
-# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect
-provider.invalid.parameterType=\"{0}\" implanta el proveedor, pero el par\u00E1metro de tipo {1} es incorrecto
-
-wsdl.required=el WSDL es necesario
-service.name.required=No se ha encontrado el QName del servicio
-port.name.required=No se ha encontrado el QName del puerto
-wrong.tns.for.port=El espacio de nombres del puerto {0} no coincide con el espacio de nombres del servicio {1}
-
-# {0} - probably URL/port of a server
-already.http.server=Ya hay un servidor HTTP en: {0}# {0}; probablemente es la URL/puerto de un servidor
-already.https.server=Ya hay un servidor HTTPS en: {0}
-#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0}
-
-not.know.HttpContext.type=No soporta Endpoint.publish({0}). Los tipos de contextos conocidos son {1} y {2}
-
-duplicate.primary.wsdl=Los metadatos tienen m\u00E1s de un WSDL que tiene una definici\u00F3n de servicio para el punto final. WSDL={0} es uno de esos WSDL.
-duplicate.abstract.wsdl=Los metadatos tienen m\u00E1s de un WSDL que tiene una definici\u00F3n de PortType para el punto final. WSDL={0} es uno de esos WSDL.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.classNotFound=No se ha encontrado la clase en el descriptor de tiempo de ejecuci\u00F3n: {0}.
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.xmlReader=Error al analizar el descriptor de tiempo de ejecuci\u00F3n: {0}.
-# Usage not found. TODO Remove
-#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0}
-runtime.parser.unexpectedContent=contenido inesperado en el descriptor de tiempo de ejecuci\u00F3n (l\u00EDnea {0})
-runtime.parser.invalidElement=elemento no v\u00E1lido \"{1}\" en el descriptor de tiempo de ejecuci\u00F3n (l\u00EDnea {0})
-runtime.parser.invalidAttributeValue=valor no v\u00E1lido para el atributo \"{2}\" del elemento \"{1}\" en el descriptor de tiempo de ejecuci\u00F3n (l\u00EDnea {0})
-runtime.parser.invalidVersionNumber=versi\u00F3n del descriptor de tiempo de ejecuci\u00F3n no soportada: {2}
-runtime.parser.missing.attribute=falta el atributo \"{2}\" en el elemento \"{1}\" del descriptor de tiempo de ejecuci\u00F3n (l\u00EDnea {0})
-runtime.parser.invalid.attribute.value=valor de atributo no v\u00E1lido \"{1}\" en el descriptor de tiempo de ejecuci\u00F3n (l\u00EDnea {0})
-runtime.parser.missing.attribute.no.line=falta el atributo \"{2}\" en el elemento \"{1}\" del descriptor de tiempo de ejecuci\u00F3n
-runtime.parser.wrong.element=se ha encontrado el elemento \"{1}\", pero se esperaba \"{2}\" en el descriptor de tiempo de ejecuci\u00F3n (l\u00EDnea{0})
-runtime.parser.wsdl.not.found={0} no se ha encontrado en el archivo WAR. Empaqu\u00E9telo en el archivo WAR o corr\u00EDjalo en sun-jaxws.xml.
-runtime.parser.wsdl=excepci\u00F3n durante el an\u00E1lisis de WSDL: {0}
-runtime.saxparser.exception={0}\n{1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2}
-runtime.parser.wsdl.multiplebinding=se han encontrado varios enlaces para el identificador de enlace {0} del servicio {1} en el WSDL {2}
-runtime.parser.wsdl.noservice.in.wsdlmodel=Se ha producido un error al procesar el WSDL {0} y no se ha encontrado ning\u00FAn servicio v\u00E1lido.
-runtime.parser.wsdl.incorrectservice=no se ha podido obtener el enlace del WSDL. El servicio {0} no se ha encontrado en el WSDL {1}.\nEsto podr\u00EDa deberse a que el nombre del servicio no coincide con el nombre de wsdl:service del WSDL:\n1. el nombre de servicio no est\u00E1 all\u00ED en el descriptor de despliegue O \n2. Tambi\u00E9n puede haber un error tipogr\u00E1fico en el nombre de servicio del descriptor de despliegue O\n3. Los nombres calculados de @WebService no coinciden con el nombre de wsdl:service\nO\n1. Se ha producido un error al analizar el WSDL y el servicio con el nombre {0} no se ha encontrado en WSDLModel.\nSe sugiere lo siguiente:\n1. Agregar o corregir las entradas del nombre de servicio en el descriptor de despliegue O \n2. Especificar targetNamespace, serviceName en @WebService en la clase de punto final
-
-runtime.parser.wsdl.incorrectserviceport=no se ha podido obtener el enlace del WSDL. El servicio: {0} o el puerto {1} no se han encontrado en el WSDL {2}.\nEsto podr\u00EDa deberse a que los nombres del servicio y el puerto no coinciden con los nombres de wsdl:service y wsdl:port del WSDL:\n1. los nombres de servicio y de puerto no est\u00E1n all\u00ED en el descriptor de despliegue O\n2. Tambi\u00E9n puede haber un error tipogr\u00E1fico en los nombres de servicio y de puerto del descriptor de despliegue O\n3. Los nombres calculados de @WebService no coinciden con los nombres de wsdl:service y wsdl:port\nSe sugiere lo siguiente:\n1. Agregar o corregir las entradas de los nombres de servicio y de puerto en el descriptor de despliegue O \n2. Especificar targetNamespace, serviceName, portName en @WebService en la clase de punto final
-
-stateful.cookie.header.required=Esto es un servicio web con estado y se necesita la cabecera {0}.
-stateful.cookie.header.incorrect=Valor de cabecera {0} no v\u00E1lido/caducado: {1}
-stateful.invalid.webservice.context=No es un WebServiceContext de la implantaci\u00F3n de referencia de JAX-WS: {0}
-stateful.requres.addressing=El servicio web con estado {0} necesita que est\u00E9 activado el soporte de WS-Addressing. Quiz\u00E1 le falta @Addressing
-
-no.current.packet=Este thread no est\u00E1 procesando actualmente ninguna solicitud de servicio web.
-
-# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2)
-failed.to.instantiate.instanceResolver=No se ha podido instanciar {0} (que se especifica en {1} en {2})
-
-static.resource.injection.only=El recurso est\u00E1tico {0} no se puede inyectar en un "{1}" no est\u00E1tico
-
-dd.mtom.conflict = Error en el descriptor de despliegue: la configuraci\u00F3n de MTOM en el enlace {0} entra en conflicto con el valor del atributo enable-mtom {1}
-
-# {0} - qname of an element
-dispatch.cannotFindMethod=No se ha encontrado el m\u00E9todo de distribuci\u00F3n de {0}
-non.unique.dispatch.qname=Partes de cuerpo no \u00FAnicas. En un puerto, las operaciones R2710 de BP 1.1 deben tener una firma de operaci\u00F3n \u00FAnica en la transmisi\u00F3n para que se distribuyan correctamente. Los m\u00E9todos {0} poseen el mismo bloque del cuerpo de solicitud {1}. Puede que la distribuci\u00F3n de m\u00E9todos falle, en cuyo caso el tiempo de ejecuci\u00F3n intentar\u00E1 realizar la distribuci\u00F3n utilizando la acci\u00F3n de SOAP. Otra opci\u00F3n es activar AddressingFeature para permitir que el tiempo de ejecuci\u00F3n identifique la operaci\u00F3n de WSDL de manera \u00FAnica utilizando la cabecera de wsa:Action.
-
-unsupported.contentType=Tipo de contenido no soportado: {0} Los soportados son: {1}
-no.contentType=La solicitud no tiene un tipo de contenido
-unsupported.charset=Juego de caracteres no soportado "{0}" en el tipo de contenido del mensaje recibido
-duplicate.portKnownHeader=El mensaje SOAP recibido contiene una cabecera duplicada: {0} para un par\u00E1metro enlazado
-
-runtimemodeler.invalidannotationOnImpl=La anotaci\u00F3n no v\u00E1lida: {0} en la clase de implantaci\u00F3n de punto final \\"{1}\\" se ignorar\u00E1. \\"{1}\\" est\u00E1 anotado con @WebService(endpointInterface=\\"{2}\\"}; no se debe anotar con {0}; para corregirlo, coloque esta anotaci\u00F3n en la interfaz de punto final de servicio {2}.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_fr.properties
deleted file mode 100644
index 0ff4d89e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_fr.properties
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soapdecoder.err=Erreur lors du d\u00E9codage du message SOAP
-server.rt.err=Erreur d''ex\u00E9cution du serveur : {0}
-soapencoder.err=Erreur de l'encodage du message SOAP
-
-annotation.only.once=Une seule m\u00E9thode doit comporter l''annotation \"{0}\"
-not.zero.parameters=La m\u00E9thode \"{0}\" ne doit comporter aucun argument
-
-wrong.field.type=Type incorrect pour le champ \"{0}\"
-wrong.no.parameters=Nombre incorrect d''arguments pour la m\u00E9thode \"{0}\"
-wrong.parameter.type=Types d''argument incorrects pour la m\u00E9thode \"{0}\"
-
-can.not.generate.wsdl=Impossible de g\u00E9n\u00E9rer le WSDL pour le binding \"{0}\"
-generate.non.standard.wsdl=G\u00E9n\u00E9ration d'un WSDL non standard pour le binding indiqu\u00E9
-null.implementor=L'impl\u00E9mentateur ne peut pas \u00EAtre NULL
-
-runtime.wsdl.patcher=erreur lors de l'application de patches sur le document associ\u00E9 au WSDL
-
-# {0} - class name
-not.implement.provider=\"{0}\" n''impl\u00E9mente pas le fournisseur
-# {0} - class name
-provider.not.parameterized=\"{0}\" impl\u00E9mente le fournisseur mais n''indique pas le param\u00E8tre de type
-# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect
-provider.invalid.parameterType=\"{0}\" impl\u00E9mente le fournisseur mais son param\u00E8tre de type {1} est incorrect
-
-wsdl.required=le WSDL est obligatoire
-service.name.required=Le QName de service est introuvable
-port.name.required=Le QName de port est introuvable
-wrong.tns.for.port=L''espace de noms de port {0} ne correspond \u00E0 aucun espace de noms de service {1}
-
-# {0} - probably URL/port of a server
-already.http.server=Il existe d\u00E9j\u00E0 un serveur HTTP dans {0}# {0}, probablement l''URL/le port d''un serveur
-already.https.server=Il existe d\u00E9j\u00E0 un serveur HTTP dans {0}
-#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0}
-
-not.know.HttpContext.type=Ne prend pas en charge Endpoint.publish({0}). Les types de contexte connus sont {1} et {2}
-
-duplicate.primary.wsdl=Les m\u00E9tadonn\u00E9es comportent plusieurs WSDL ayant une d\u00E9finition de service pour l''adresse. Le WSDL {0} est l''un d''entre eux.
-duplicate.abstract.wsdl=Les m\u00E9tadonn\u00E9es comportent plusieurs WSDL ayant une d\u00E9finition PortType pour l''adresse. Le WSDL {0} est l''un d''entre eux
-
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.classNotFound=classe introuvable dans le descripteur d''ex\u00E9cution : {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.xmlReader=erreur lors de l''analyse du descripteur d''ex\u00E9cution : {0}
-# Usage not found. TODO Remove
-#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0}
-runtime.parser.unexpectedContent=contenu inattendu dans le descripteur d''ex\u00E9cution (ligne {0})
-runtime.parser.invalidElement=\u00E9l\u00E9ment \"{1}\" non valide dans le descripteur d''ex\u00E9cution (ligne {0})
-runtime.parser.invalidAttributeValue=valeur non valide pour l''attribut \"{2}\" de l''\u00E9l\u00E9ment \"{1}\" dans le descripteur d''ex\u00E9cution (ligne {0})
-runtime.parser.invalidVersionNumber=version de descripteur d''ex\u00E9cution non prise en charge : {2}
-runtime.parser.missing.attribute=attribut \"{2}\" manquant dans l''\u00E9l\u00E9ment \"{1}\" du descripteur d''ex\u00E9cution (ligne {0})
-runtime.parser.invalid.attribute.value=valeur d''attribut \"{1}\" non valide dans le descripteur d''ex\u00E9cution (ligne {0})
-runtime.parser.missing.attribute.no.line=attribut \"{2}\" manquant dans l''\u00E9l\u00E9ment \"{1}\" du descripteur d''ex\u00E9cution
-runtime.parser.wrong.element=\u00E9l\u00E9ment \"{1}\" trouv\u00E9, \"{2}\" attendu dans le descripteur d''ex\u00E9cution (ligne {0})
-runtime.parser.wsdl.not.found={0} est introuvable dans le fichier WAR. Packagez-le dans le fichier WAR ou corrigez-le dans sun-jaxws.xml.
-runtime.parser.wsdl=exception lors de l''analyse du WSDL : {0}
-runtime.saxparser.exception={0}\n{1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2}
-runtime.parser.wsdl.multiplebinding=plusieurs bindings trouv\u00E9s dans l''ID de binding {0} pour le service {1} dans le WSDL {2}
-runtime.parser.wsdl.noservice.in.wsdlmodel=Une erreur s''est produite lors du traitement du WSDL {0} et aucun service valide n''a \u00E9t\u00E9 trouv\u00E9.
-runtime.parser.wsdl.incorrectservice=impossible d''obtenir le binding du service WSDL : {0} introuvable dans le WSDL {1}.\nCela peut \u00EAtre d\u00FB au fait que le nom de service ne correspond pas au nom wsdl:service du WSDL :\n1. Le nom de service ne figure pas dans le descripteur de d\u00E9ploiement. OU\n2. Le nom de service du descripteur de d\u00E9ploiement comporte une faute de frappe. OU\n3. Les noms calcul\u00E9s \u00E0 partir de @WebService ne correspondent pas au nom wsdl:service.\nOU\n4. Une erreur a \u00E9t\u00E9 d\u00E9tect\u00E9e lors de l''analyse du WSDL et le service portant le nom {0} est introuvable dans le WSDLModel.\nNous vous sugg\u00E9rons les solutions suivantes :\n1. Ajoutez/Corrigez les entr\u00E9es pour le nom de service dans le descripteur de d\u00E9ploiement OU \n2. Indiquez targetNamespace, serviceName dans @WebService sur la classe d''adresse
-
-runtime.parser.wsdl.incorrectserviceport=impossible d''obtenir le binding \u00E0 partir du service WSDL {0} ou le port {1} est introuvable dans le WSDL {2}.\nCela peut \u00EAtre d\u00FB au fait que les noms de service et de port ne correspondant pas aux noms wsdl:service et wsdl:port du WSDL :\n1. Les noms de service et de port ne figurent pas dans le descripteur de d\u00E9ploiement. OU\n2. Les noms de service et de port du descripteur de d\u00E9ploiement comportent une faute de frappe. OU\n3. Les noms calcul\u00E9s \u00E0 partir de @WebService ne correspondent pas aux noms wsdl:service et wsdl:port.\nNous vous sugg\u00E9rons les solutions suivantes :\n1. Ajoutez/Corrigez les entr\u00E9es pour les noms de service et de port dans le descripteur de d\u00E9ploiement. OU \n2. Indiquez targetNamespace, serviceName, portName dans @WebService sur la classe d''adresse.
-
-stateful.cookie.header.required=Il s''agit d''un service Web avec conservation de statut et l''en-t\u00EAte {0} est obligatoire.
-stateful.cookie.header.incorrect=Valeur d''en-t\u00EAte {0} non valide/arriv\u00E9e \u00E0 expiration : {1}
-stateful.invalid.webservice.context=N''est pas un \u00E9l\u00E9ment WebServiceContext de l''impl\u00E9mentation de r\u00E9f\u00E9rence JAX-WS : {0}
-stateful.requres.addressing=Le service Web avec conservation de statut {0} exige l''activation de la prise en charge de WS-Addressing. Il manque peut-\u00EAtre @Addressing
-
-no.current.packet=Ce thread ne traite actuellement aucune demande de service Web.
-
-# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2)
-failed.to.instantiate.instanceResolver=Impossible d''instancier {0} (indiqu\u00E9 dans {1} sur {2})
-
-static.resource.injection.only=La ressource statique {0} ne peut pas \u00EAtre inject\u00E9e dans un \u00E9l\u00E9ment "{1}" non statique
-
-dd.mtom.conflict = Erreur dans le descripteur de d\u00E9ploiement : la configuration MTOM dans le binding {0} est en conflit avec la valeur d''attribut enable-mtom {1}
-
-# {0} - qname of an element
-dispatch.cannotFindMethod=M\u00E9thode de r\u00E9partition introuvable pour {0}
-non.unique.dispatch.qname=Parties du corps non uniques. Dans un port, les op\u00E9rations BP 1.1 R2710 doivent comporter une signature d''op\u00E9ration unique sur le wire pour une r\u00E9partition r\u00E9ussie. Les m\u00E9thodes {0} ont le m\u00EAme bloc de corps de demande {1}. La r\u00E9partition de m\u00E9thode peut \u00E9chouer, le runtime essaiera d''effectuer la r\u00E9partition \u00E0 l''aide de SOAPAction. Vous pouvez \u00E9galement activer AddressingFeature pour permettre au runtime d''identifier de mani\u00E8re unique l''op\u00E9ration WSDL \u00E0 l''aide de l''en-t\u00EAte wsa:Action.
-
-unsupported.contentType=Content-Type non pris en charge : {0}. Les \u00E9l\u00E9ments pris en charge sont : {1}
-no.contentType=Content-Type manquant dans la demande
-unsupported.charset=Jeu de caract\u00E8res "{0}" non pris en charge dans l''en-t\u00EAte Content-Type du message re\u00E7u
-duplicate.portKnownHeader=Le message SOAP re\u00E7u contient un en-t\u00EAte en double {0} pour un param\u00E8tre li\u00E9
-
-runtimemodeler.invalidannotationOnImpl=L''annotation non valide {0} sur la classe d''impl\u00E9mentation d''adresse \"{1}\" ne sera pas prise en compte. \"{1}\" est annot\u00E9 avec @WebService(endpointInterface = \"{2}\"}, il doit \u00EAtre annot\u00E9 avec {0} ; pour le corriger, placez cette annotation sur l''interface d''adresse de service {2}.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_it.properties
deleted file mode 100644
index 482f243b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_it.properties
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soapdecoder.err=Errore durante la decodifica del messaggio SOAP
-server.rt.err=errore in fase di esecuzione del server: {0}
-soapencoder.err=Errore durante la codifica del messaggio SOAP
-
-annotation.only.once=Solo un metodo deve avere l''annotazione \"{0}\"
-not.zero.parameters=Il metodo \"{0}\" non deve avere alcun argomento
-
-wrong.field.type=Tipo errato per il campo \"{0}\"
-wrong.no.parameters=Numero errato di argomenti per il metodo \"{0}\"
-wrong.parameter.type=Tipi di argomenti errati per il metodo \"{0}\"
-
-can.not.generate.wsdl=Impossibile generare WSDL per l''associazione \"{0}\"
-generate.non.standard.wsdl=Generazione di WSDL non standard per l'associazione specificata
-null.implementor=L'implementatore non pu\u00F2 essere nullo
-
-runtime.wsdl.patcher=errore durante l'applicazione di patch al documento relativo a WSDL
-
-# {0} - class name
-not.implement.provider=\"{0}\" non implementa il provider
-# {0} - class name
-provider.not.parameterized=\"{0}\" implementa il provider ma non specifica il parametro del tipo
-# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect
-provider.invalid.parameterType=\"{0}\" implementa il provider ma il relativo parametro del tipo {1} \u00E8 errato
-
-wsdl.required=WSDL \u00E8 obbligatorio
-service.name.required=QName del servizio non trovato
-port.name.required=QName della porta non trovato
-wrong.tns.for.port=Lo spazio di nomi della porta {0} non corrisponde allo spazio di nomi del servizio {1}
-
-# {0} - probably URL/port of a server
-already.http.server=Esiste gi\u00E0 un server HTTPS in: {0}# {0} - probabilmente l''URL o la porta di un server
-already.https.server=Esiste gi\u00E0 un server HTTPS in: {0}
-#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0}
-
-not.know.HttpContext.type=Non supporta Endpoint.publish({0}). I tipi di contesto conosciuti sono {1} e {2}
-
-duplicate.primary.wsdl=I metadati hanno pi\u00F9 WSDL contenenti la definizione di servizio per l''endpoint. WSDL={0} \u00E8 uno di tali WSDL.
-duplicate.abstract.wsdl=I metadati hanno pi\u00F9 WSDL contenenti la definizione PortType per l''endpoint. WSDL={0} \u00E8 uno di tali WSDL.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.classNotFound=classe non trovata nel descrittore di runtime: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.xmlReader=errore durante l''analisi del descrittore di runtime: {0}
-# Usage not found. TODO Remove
-#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0}
-runtime.parser.unexpectedContent=contenuto imprevisto nel descrittore di runtime (riga {0})
-runtime.parser.invalidElement=elemento non valido \"{1}\" nel descrittore di runtime (riga {0})
-runtime.parser.invalidAttributeValue=valore non valido per l''attributo \"{2}\" dell''elemento \"{1}\" nel descrittore di runtime (riga {0})
-runtime.parser.invalidVersionNumber=versione del descrittore di runtime non supportata: {2}
-runtime.parser.missing.attribute=attributo mancante \"{2}\" nell''elemento \"{1}\" del descrittore di runtime (riga {0})
-runtime.parser.invalid.attribute.value=valore dell''attributo non valido \"{1}\" nel descrittore di runtime (riga {0})
-runtime.parser.missing.attribute.no.line=attributo mancante \"{2}\" nell''elemento \"{1}\" del descrittore di runtime
-runtime.parser.wrong.element=trovato elemento \"{1}\", previsto \"{2}\", nel descrittore di runtime (riga {0})
-runtime.parser.wsdl.not.found={0} non trovato nel file WAR. Inserirlo all''interno di un package nel file WAR oppure correggerlo in sun-jaxws.xml.
-runtime.parser.wsdl=eccezione durante l''analisi di WSDL: {0}
-runtime.saxparser.exception={0}\n{1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2}
-runtime.parser.wsdl.multiplebinding=trovate pi\u00F9 associazioni per l''ID associazione {0} per il servizio {1} in WSDL {2}
-runtime.parser.wsdl.noservice.in.wsdlmodel=Errore durante l''elaborazione di WSDL {0} e nessun servizio valido trovato.
-runtime.parser.wsdl.incorrectservice=impossibile ottenere l''associazione da WSDL. Servizio: {0} non trovato in WSDL {1}.\nIl motivo potrebbe essere la mancata corrispondenza del nome servizio con il nome sdl:service di WSDL:\n1. Il nome servizio non \u00E8 presente nel descrittore di distribuzione O\n2. Nel nome servizio del descrittore di distribuzione \u00E8 presente un errore di battitura O\n3. I nomi calcolati da @WebService non corrispondono al nome wsdl:service\nO\n1. Si \u00E8 verificato un errore durante l''analisi di WSDL e il servizio con nome {0} non \u00E8 stato trovato in WSDLModel.\nSi suggerisce di eseguire le seguenti operazioni:\n1. Aggiungere/correggere le voci per il nome servizio nel descrittore di distribuzione O \n2. Specificare targetNamespace, serviceName in @WebService sulla classe dell''endpoint
-
-runtime.parser.wsdl.incorrectserviceport=impossibile ottenere l''associazione da WSDL. Servizio: {0} o porta {1} non trovati in WSDL {2}.\nIl motivo potrebbe essere la mancata corrispondenza dei nomi servizio e porta con i nomi wsdl:service e wsdl:port di WSDL:\n1. I nomi servizio e porta non sono presenti nel descrittore di distribuzione O\n2. Nei nomi servizio e porta del descrittore di distribuzione \u00E8 presente un errore di battitura O\n3. I nomi calcolati da @WebService non corrispondono ai nomi wsdl:service e wsdl:port\nSi suggerisce di eseguire le seguenti operazioni:\n1. Aggiungere/correggere le voci per i nomi servizio e porta nel descrittore di distribuzione O \n2. Specificare targetNamespace, serviceName, portName in @WebService sulla classe dell''endpoint
-
-stateful.cookie.header.required=Questo \u00E8 un servizio Web con conservazione dello stato ed \u00E8 obbligatoria l''intestazione {0}.
-stateful.cookie.header.incorrect=Valore dell''intestazione {0} non valido/scaduto: {1}
-stateful.invalid.webservice.context=Non un WebServiceContext da JAX-WS RI: {0}
-stateful.requres.addressing=Il servizio Web con conservazione dello stato {0} richiede l''abilitazione del supporto WS-Addressing. \u00C8 possibile che manchi @Addressing
-
-no.current.packet=Al momento questo thread non sta elaborando alcuna richiesta del servizio Web.
-
-# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2)
-failed.to.instantiate.instanceResolver=Impossibile creare un''istanza di {0} (specificata in {1} su {2})
-
-static.resource.injection.only=Impossibile inserire la risorsa statica {0} in "{1}" non statico
-
-dd.mtom.conflict = Errore nel descrittore di distribuzione: la configurazione MTOM nell''associazione {0} \u00E8 in conflitto con il valore dell''attributo enable-mtom {1}
-
-# {0} - qname of an element
-dispatch.cannotFindMethod=Impossibile trovare il metodo di spedizione per {0}
-non.unique.dispatch.qname=Parti del corpo non univoche. In una porta, come per BP 1.1 R2710, le operazioni devono avere una firma dell''operazione univoca in rete affinch\u00E9 la spedizione riesca. I metodi {0} hanno lo stesso blocco del corpo della richiesta {1}. Se il metodo di spedizione non riesce, runtime prover\u00E0 a consegnare usando SOAPAction. Un''altra opzione \u00E8 di abilitare AddressingFeature per il runtime abilitato in modo che identifichi solo l''operazione WSDL usando l''intestazione wsa:Action.
-
-unsupported.contentType=Content-Type non supportato: {0}. I tipi supportati sono: {1}
-no.contentType=La richiesta non ha un Content-Type
-unsupported.charset=Set di caratteri non supportato "{0}" nel Content-Type del messaggio ricevuto
-duplicate.portKnownHeader=Il messaggio SOAP ricevuto contiene un''intestazione duplicata: {0} per un parametro associato
-
-runtimemodeler.invalidannotationOnImpl=Annotazione non valida: {0} sulla classe di implementazione dell''endpoint \"{1}\" e pertanto verr\u00E0 ignorata. \"{1}\" \u00E8 annotato con @WebService(endpointInterface=\"{2}\"}, non deve essere annotato con {0}. Per correggerlo inserire questa annotazione su SEI {2}.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ja.properties
deleted file mode 100644
index 7a01e10d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ja.properties
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soapdecoder.err=SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u30C7\u30B3\u30FC\u30C9\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-server.rt.err=\u30B5\u30FC\u30D0\u30FC\u5B9F\u884C\u6642\u30A8\u30E9\u30FC: {0}
-soapencoder.err=SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u30A8\u30F3\u30B3\u30FC\u30C9\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-
-annotation.only.once=\u6CE8\u91C8\"{0}\"\u3092\u4ED8\u3051\u308B\u30E1\u30BD\u30C3\u30C9\u306F1\u3064\u306E\u307F\u3068\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-not.zero.parameters=\u30E1\u30BD\u30C3\u30C9\"{0}\"\u306B\u306F\u5F15\u6570\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
-
-wrong.field.type=\u30D5\u30A3\u30FC\u30EB\u30C9\"{0}\"\u306E\u30BF\u30A4\u30D7\u304C\u4E0D\u6B63\u3067\u3059
-wrong.no.parameters=\u30E1\u30BD\u30C3\u30C9\"{0}\"\u306E\u5F15\u6570\u306E\u6570\u304C\u4E0D\u6B63\u3067\u3059
-wrong.parameter.type=\u30E1\u30BD\u30C3\u30C9\"{0}\"\u306E\u5F15\u6570\u30BF\u30A4\u30D7\u304C\u4E0D\u6B63\u3067\u3059
-
-can.not.generate.wsdl=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\"{0}\"\u7528\u306EWSDL\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093
-generate.non.standard.wsdl=\u6307\u5B9A\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u7528\u306E\u975E\u6A19\u6E96WSDL\u3092\u751F\u6210\u3057\u3066\u3044\u307E\u3059
-null.implementor=\u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093
-
-runtime.wsdl.patcher=WSDL\u95A2\u9023\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3078\u306E\u30D1\u30C3\u30C1\u9069\u7528\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-
-# {0} - class name
-not.implement.provider=\"{0}\"\u306F\u30D7\u30ED\u30D0\u30A4\u30C0\u3092\u5B9F\u88C5\u3057\u3066\u3044\u307E\u305B\u3093
-# {0} - class name
-provider.not.parameterized=\"{0}\"\u306F\u30D7\u30ED\u30D0\u30A4\u30C0\u3092\u5B9F\u88C5\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u30BF\u30A4\u30D7\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6307\u5B9A\u3057\u3066\u3044\u307E\u305B\u3093
-# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect
-provider.invalid.parameterType=\"{0}\"\u306F\u30D7\u30ED\u30D0\u30A4\u30C0\u3092\u5B9F\u88C5\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u30BF\u30A4\u30D7\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF{1}\u304C\u4E0D\u6B63\u3067\u3059
-
-wsdl.required=WSDL\u306F\u5FC5\u9808\u3067\u3059
-service.name.required=\u30B5\u30FC\u30D3\u30B9\u306EQName\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-port.name.required=\u30DD\u30FC\u30C8\u306EQName\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-wrong.tns.for.port=\u30DD\u30FC\u30C8\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9{0}\u304C\u30B5\u30FC\u30D3\u30B9\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9{1}\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093
-
-# {0} - probably URL/port of a server
-already.http.server=\u6B21\u306E\u5834\u6240\u306B\u3059\u3067\u306BHTTP\u30B5\u30FC\u30D0\u30FC\u304C\u3042\u308A\u307E\u3059: {0}# {0} - \u901A\u5E38\u306F\u30B5\u30FC\u30D0\u30FC\u306EURL/\u30DD\u30FC\u30C8
-already.https.server=\u6B21\u306E\u5834\u6240\u306B\u3059\u3067\u306BHTTPS\u30B5\u30FC\u30D0\u30FC\u304C\u3042\u308A\u307E\u3059: {0}
-#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0}
-
-not.know.HttpContext.type=Endpoint.publish({0})\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u4E0D\u660E\u306A\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30BF\u30A4\u30D7\u306F{1}\u304A\u3088\u3073{2}\u3067\u3059
-
-duplicate.primary.wsdl=\u30E1\u30BF\u30C7\u30FC\u30BF\u306B\u3001\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306E\u30B5\u30FC\u30D3\u30B9\u5B9A\u7FA9\u304C\u3042\u308B\u8907\u6570\u306EWSDL\u304C\u542B\u307E\u308C\u307E\u3059\u3002WSDL={0}\u306F\u305D\u306E\u3088\u3046\u306AWSDL\u306E\u4E00\u3064\u3067\u3059\u3002
-duplicate.abstract.wsdl=\u30E1\u30BF\u30C7\u30FC\u30BF\u306B\u3001\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306EPortType\u5B9A\u7FA9\u304C\u3042\u308B\u8907\u6570\u306EWSDL\u304C\u542B\u307E\u308C\u307E\u3059\u3002WSDL={0}\u306F\u305D\u306E\u3088\u3046\u306AWSDL\u306E\u4E00\u3064\u3067\u3059\u3002
-
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.classNotFound=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306B\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.xmlReader=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306E\u89E3\u6790\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {0}
-# Usage not found. TODO Remove
-#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0}
-runtime.parser.unexpectedContent=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF(\u884C{0})\u306B\u4E88\u671F\u3057\u306A\u3044\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u3042\u308A\u307E\u3059
-runtime.parser.invalidElement=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF(\u884C{0})\u3067\u8981\u7D20\"{1}\"\u304C\u7121\u52B9\u3067\u3059
-runtime.parser.invalidAttributeValue=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF(\u884C{0})\u3067\u8981\u7D20\"{1}\"\u306E\u5C5E\u6027\"{2}\"\u306E\u5024\u304C\u7121\u52B9\u3067\u3059
-runtime.parser.invalidVersionNumber=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u3059: {2}
-runtime.parser.missing.attribute=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF(\u884C{0})\u306E\u8981\u7D20\"{1}\"\u306B\u5C5E\u6027\"{2}\"\u304C\u3042\u308A\u307E\u305B\u3093
-runtime.parser.invalid.attribute.value=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF(\u884C{0})\u3067\u5C5E\u6027\u5024\"{1}\"\u304C\u7121\u52B9\u3067\u3059
-runtime.parser.missing.attribute.no.line=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306E\u8981\u7D20\"{1}\"\u306B\u5C5E\u6027\"{2}\"\u304C\u3042\u308A\u307E\u305B\u3093
-runtime.parser.wrong.element=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF(\u884C{0})\u306B\u8981\u7D20\"{1}\"\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u304C\u3001\"{2}\"\u304C\u4E88\u671F\u3055\u308C\u307E\u3059
-runtime.parser.wsdl.not.found=WAR\u30D5\u30A1\u30A4\u30EB\u306B{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u3053\u308C\u3092WAR\u30D5\u30A1\u30A4\u30EB\u306B\u30D1\u30C3\u30B1\u30FC\u30B8\u5316\u3059\u308B\u304B\u3001sun-jaxws.xml\u3067\u4FEE\u6B63\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-runtime.parser.wsdl=WSDL\u306E\u89E3\u6790\u4E2D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {0}
-runtime.saxparser.exception={0}\n{1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2}
-runtime.parser.wsdl.multiplebinding=WSDL {2}\u306E\u30B5\u30FC\u30D3\u30B9{1}\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0ID {0}\u306B\u8907\u6570\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-runtime.parser.wsdl.noservice.in.wsdlmodel=WSDL {0}\u306E\u51E6\u7406\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6709\u52B9\u306A\u30B5\u30FC\u30D3\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
-runtime.parser.wsdl.incorrectservice=WSDL\u304B\u3089\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B5\u30FC\u30D3\u30B9: {0}\u304CWSDL {1}\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\n\u30B5\u30FC\u30D3\u30B9\u540D\u304CWSDL\u306Ewsdl:service\u540D\u3068\u4E00\u81F4\u3057\u306A\u3044\u305F\u3081\u3067\u3042\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059: \n1. \u30B5\u30FC\u30D3\u30B9\u540D\u304C\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306B\u3042\u308A\u307E\u305B\u3093\n2.\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306E\u30B5\u30FC\u30D3\u30B9\u540D\u306B\u5165\u529B\u30DF\u30B9\u304C\u3042\u308A\u307E\u3059\n3.@WebService\u304B\u3089\u7B97\u51FA\u3055\u308C\u305F\u540D\u524D\u304Cwsdl:service\u540D\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093\n\u307E\u305F\u306F\n1.wsdl\u306E\u89E3\u6790\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u540D\u524D{0}\u306E\u30B5\u30FC\u30D3\u30B9\u304CWSDLModel\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\n\u6B21\u306E\u3068\u304A\u308A\u5B9F\u884C\u3059\u308B\u3053\u3068\u3092\u304A\u85A6\u3081\u3057\u307E\u3059:\n1.\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306B\u30B5\u30FC\u30D3\u30B9\u540D\u306E\u30A8\u30F3\u30C8\u30EA\u3092\u8FFD\u52A0\u3059\u308B\u304B\u3001\u4FEE\u6B63\u3057\u307E\u3059\u3002\u307E\u305F\u306F\n2.\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30AF\u30E9\u30B9\u306E@WebService\u3067\u3001targetNamespace\u3001serviceName\u3092\u6307\u5B9A\u3057\u307E\u3059
-
-runtime.parser.wsdl.incorrectserviceport=WSDL\u304B\u3089\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B5\u30FC\u30D3\u30B9: {0}\u307E\u305F\u306F\u30DD\u30FC\u30C8{1}\u304CWSDL {2}\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\n\u30B5\u30FC\u30D3\u30B9\u540D\u304A\u3088\u3073\u30DD\u30FC\u30C8\u540D\u304CWSDL\u306Ewsdl:service\u540D\u304A\u3088\u3073wsdl:port\u540D\u3068\u4E00\u81F4\u3057\u306A\u3044\u305F\u3081\u3067\u3042\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059:\n1.\u30B5\u30FC\u30D3\u30B9\u540D\u304A\u3088\u3073\u30DD\u30FC\u30C8\u540D\u304C\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306B\u3042\u308A\u307E\u305B\u3093\n2.\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306E\u30B5\u30FC\u30D3\u30B9\u540D\u304A\u3088\u3073\u30DD\u30FC\u30C8\u540D\u306B\u5165\u529B\u30DF\u30B9\u304C\u3042\u308A\u307E\u3059\n3.@WebService\u304B\u3089\u7B97\u51FA\u3055\u308C\u305F\u540D\u524D\u304Cwsdl:service\u540D\u304A\u3088\u3073wsdl:port\u540D\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093\n\u6B21\u306E\u3068\u304A\u308A\u5B9F\u884C\u3059\u308B\u3053\u3068\u3092\u304A\u85A6\u3081\u3057\u307E\u3059:\n1.\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306B\u30B5\u30FC\u30D3\u30B9\u540D\u304A\u3088\u3073\u30DD\u30FC\u30C8\u540D\u306E\u30A8\u30F3\u30C8\u30EA\u3092\u8FFD\u52A0\u3059\u308B\u304B\u3001\u4FEE\u6B63\u3057\u307E\u3059\u3002\u307E\u305F\u306F\n2.\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30AF\u30E9\u30B9\u306E@WebService\u3067\u3001targetNamespace\u3001serviceName\u3001portName\u3092\u6307\u5B9A\u3057\u307E\u3059
-
-stateful.cookie.header.required=\u3053\u308C\u306F\u30B9\u30C6\u30FC\u30C8\u30D5\u30EBWeb\u30B5\u30FC\u30D3\u30B9\u3067\u3042\u308A\u3001{0}\u30D8\u30C3\u30C0\u30FC\u304C\u5FC5\u8981\u3067\u3059\u3002
-stateful.cookie.header.incorrect=\u7121\u52B9/\u671F\u9650\u5207\u308C{0}\u30D8\u30C3\u30C0\u30FC\u5024: {1}
-stateful.invalid.webservice.context=JAX-WS RI\u306EWebServiceContext\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {0}
-stateful.requres.addressing=\u30B9\u30C6\u30FC\u30C8\u30D5\u30EBWeb\u30B5\u30FC\u30D3\u30B9{0}\u3067\u306F\u3001WS-Addressing\u306E\u30B5\u30DD\u30FC\u30C8\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002@Addressing\u304C\u6B20\u843D\u3057\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
-
-no.current.packet=\u3053\u306E\u30B9\u30EC\u30C3\u30C9\u3067\u306F\u3001\u73FE\u5728\u3044\u305A\u308C\u306EWeb\u30B5\u30FC\u30D3\u30B9\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u3082\u51E6\u7406\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-
-# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2)
-failed.to.instantiate.instanceResolver={0} ({2}\u306E{1}\u3067\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059)\u3092\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3067\u304D\u307E\u305B\u3093
-
-static.resource.injection.only=\u9759\u7684\u30EA\u30BD\u30FC\u30B9{0}\u306F\u9759\u7684\u3067\u306A\u3044"{1}"\u306B\u6CE8\u5165\u3067\u304D\u307E\u305B\u3093
-
-dd.mtom.conflict = \u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306E\u30A8\u30E9\u30FC: \u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0{0}\u306EMTOM\u69CB\u6210\u304Cenable-mtom\u306E\u5C5E\u6027\u5024{1}\u3068\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059
-
-# {0} - qname of an element
-dispatch.cannotFindMethod={0}\u306E\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u30FB\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-non.unique.dispatch.qname=\u672C\u6587\u30D1\u30FC\u30C8\u304C\u4E00\u610F\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u30DD\u30FC\u30C8\u306B\u304A\u3044\u3066BP 1.1 R2710\u306E\u3068\u304A\u308A\u3001\u6B63\u5E38\u306B\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u3059\u308B\u305F\u3081\u306B\u64CD\u4F5C\u306B\u306F\u901A\u4FE1\u4E0A\u306B\u4E00\u610F\u306E\u64CD\u4F5C\u7F72\u540D\u304C\u5FC5\u8981\u3067\u3059\u3002\u30E1\u30BD\u30C3\u30C9{0}\u306B\u540C\u3058\u30EA\u30AF\u30A8\u30B9\u30C8\u672C\u6587\u30D6\u30ED\u30C3\u30AF{1}\u304C\u3042\u308A\u307E\u3059\u3002\u30E1\u30BD\u30C3\u30C9\u306E\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u304C\u5931\u6557\u3057\u305F\u5834\u5408\u306F\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u3088\u3063\u3066SOAPAction\u3092\u4F7F\u7528\u3057\u305F\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u304C\u8A66\u884C\u3055\u308C\u307E\u3059\u3002\u307E\u305F\u3001\u6709\u52B9\u5316\u3055\u308C\u305F\u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u5BFE\u3057\u3066AddressingFeature\u3092\u6709\u52B9\u5316\u3057\u3001wsa:Action\u30D8\u30C3\u30C0\u30FC\u3092\u4F7F\u7528\u3057\u3066WSDL\u64CD\u4F5C\u3092\u4E00\u610F\u306B\u8B58\u5225\u3059\u308B\u65B9\u6CD5\u3082\u3042\u308A\u307E\u3059\u3002
-
-unsupported.contentType=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044Content-Type: {0} \u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u306E\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059: {1}
-no.contentType=\u30EA\u30AF\u30A8\u30B9\u30C8\u306BContent-Type\u304C\u3042\u308A\u307E\u305B\u3093
-unsupported.charset=\u53D7\u3051\u53D6\u3063\u305F\u30E1\u30C3\u30BB\u30FC\u30B8\u306EContent-Type\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u6587\u5B57\u30BB\u30C3\u30C8"{0}"\u304C\u3042\u308A\u307E\u3059
-duplicate.portKnownHeader=\u53D7\u3051\u53D6\u3063\u305FSOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u3001\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u305F\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u5BFE\u3059\u308B\u91CD\u8907\u3059\u308B\u30D8\u30C3\u30C0\u30FC: {0}\u304C\u542B\u307E\u308C\u307E\u3059
-
-runtimemodeler.invalidannotationOnImpl=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u5B9F\u88C5\u30AF\u30E9\u30B9\"{1}\"\u306E\u7121\u52B9\u306A\u6CE8\u91C8: {0} - \u7121\u8996\u3055\u308C\u307E\u3059\u3002\"{1}\"\u306B\u306F@WebService(endpointInterface=\"{2}\"}\u306E\u6CE8\u91C8\u304C\u4ED8\u3044\u3066\u3044\u307E\u3059\u304C\u3001{0}\u306E\u6CE8\u91C8\u3092\u4ED8\u3051\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002\u4FEE\u6B63\u3059\u308B\u306B\u306F\u3001SEI {2}\u306B\u3053\u306E\u6CE8\u91C8\u3092\u7F6E\u304D\u307E\u3059\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ko.properties
deleted file mode 100644
index 11432265..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ko.properties
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soapdecoder.err=SOAP \uBA54\uC2DC\uC9C0\uB97C \uB514\uCF54\uB529\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-server.rt.err=\uC11C\uBC84 \uB7F0\uD0C0\uC784 \uC624\uB958: {0}
-soapencoder.err=SOAP \uBA54\uC2DC\uC9C0\uB97C \uC778\uCF54\uB529\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-
-annotation.only.once=\uD558\uB098\uC758 \uBA54\uC18C\uB4DC\uC5D0\uB9CC \"{0}\" \uC8FC\uC11D\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-not.zero.parameters=\"{0}\" \uBA54\uC18C\uB4DC\uC5D0\uB294 \uC778\uC218\uAC00 \uC5C6\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-wrong.field.type=\"{0}\" \uD544\uB4DC\uC5D0 \uB300\uD55C \uC720\uD615\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-wrong.no.parameters=\"{0}\" \uBA54\uC18C\uB4DC\uC5D0 \uB300\uD55C \uC778\uC218 \uC218\uAC00 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-wrong.parameter.type=\"{0}\" \uBA54\uC18C\uB4DC\uC5D0 \uB300\uD55C \uC778\uC218 \uC720\uD615\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-can.not.generate.wsdl=\"{0}\" \uBC14\uC778\uB529\uC5D0 \uB300\uD55C WSDL\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-generate.non.standard.wsdl=\uC9C0\uC815\uB41C \uBC14\uC778\uB529\uC5D0 \uB300\uD55C \uBE44\uD45C\uC900 WSDL\uC744 \uC0DD\uC131\uD558\uB294 \uC911
-null.implementor=\uAD6C\uD604\uC790\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-runtime.wsdl.patcher=WSDL \uAD00\uB828 \uBB38\uC11C\uC758 \uD328\uCE58\uB97C \uC801\uC6A9\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-
-# {0} - class name
-not.implement.provider=\"{0}\"\uC774(\uAC00) \uC81C\uACF5\uC790\uB97C \uAD6C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-# {0} - class name
-provider.not.parameterized=\"{0}\"\uC774(\uAC00) \uC81C\uACF5\uC790\uB97C \uAD6C\uD604\uD558\uC9C0\uB9CC \uC720\uD615 \uB9E4\uAC1C\uBCC0\uC218\uB97C \uC9C0\uC815\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect
-provider.invalid.parameterType=\"{0}\"\uC774(\uAC00) \uC81C\uACF5\uC790\uB97C \uAD6C\uD604\uD558\uC9C0\uB9CC \uD574\uB2F9 \uC720\uD615 \uB9E4\uAC1C\uBCC0\uC218 {1}\uC774(\uAC00) \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-wsdl.required=WSDL\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-service.name.required=\uC11C\uBE44\uC2A4 QName\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-port.name.required=\uD3EC\uD2B8 QName\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-wrong.tns.for.port=\uD3EC\uD2B8 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 {0}\uC774(\uAC00) \uC11C\uBE44\uC2A4 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 {1}\uACFC(\uC640) \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-# {0} - probably URL/port of a server
-already.http.server={0}#\uC5D0 HTTP \uC11C\uBC84\uAC00 \uC774\uBBF8 \uC788\uC2B5\uB2C8\uB2E4. {0}\uC740(\uB294) \uC11C\uBC84\uC758 URL/\uD3EC\uD2B8\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-already.https.server={0}\uC5D0 HTTPS \uC11C\uBC84\uAC00 \uC774\uBBF8 \uC788\uC2B5\uB2C8\uB2E4.
-#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0}
-
-not.know.HttpContext.type=Endpoint.publish({0})\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uD655\uC778\uB41C \uCEE8\uD14D\uC2A4\uD2B8 \uC720\uD615\uC740 {1} \uBC0F {2}\uC785\uB2C8\uB2E4.
-
-duplicate.primary.wsdl=\uBA54\uD0C0 \uB370\uC774\uD130\uC5D0 \uB05D\uC810\uC5D0 \uB300\uD55C \uC11C\uBE44\uC2A4 \uC815\uC758\uB97C \uD3EC\uD568\uD558\uB294 WSDL\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. WSDL={0}\uC774(\uAC00) \uD574\uB2F9 WSDL \uC911 \uD558\uB098\uC785\uB2C8\uB2E4.
-duplicate.abstract.wsdl=\uBA54\uD0C0 \uB370\uC774\uD130\uC5D0 \uB05D\uC810\uC5D0 \uB300\uD55C PortType \uC815\uC758\uB97C \uD3EC\uD568\uD558\uB294 WSDL\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. WSDL={0}\uC774(\uAC00) \uD574\uB2F9 WSDL \uC911 \uD558\uB098\uC785\uB2C8\uB2E4.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.classNotFound=\uD074\uB798\uC2A4\uB97C \uB7F0\uD0C0\uC784 \uAE30\uC220\uC790\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.xmlReader=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD558\uB294 \uC911 \uC624\uB958 \uBC1C\uC0DD: {0}
-# Usage not found. TODO Remove
-#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0}
-runtime.parser.unexpectedContent=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790({0}\uD589)\uC5D0 \uC608\uC0C1\uCE58 \uC54A\uC740 \uCF58\uD150\uCE20\uAC00 \uC788\uC2B5\uB2C8\uB2E4.
-runtime.parser.invalidElement=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790({0}\uD589)\uC5D0 \uBD80\uC801\uD569\uD55C \uC694\uC18C \"{1}\"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.
-runtime.parser.invalidAttributeValue=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790({0}\uD589)\uC5D0 \"{1}\" \uC694\uC18C\uC758 \"{2}\" \uC18D\uC131\uC5D0 \uB300\uD55C \uBD80\uC801\uD569\uD55C \uAC12\uC774 \uC788\uC2B5\uB2C8\uB2E4.
-runtime.parser.invalidVersionNumber=\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uB7F0\uD0C0\uC784 \uAE30\uC220\uC790 \uBC84\uC804: {2}
-runtime.parser.missing.attribute=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790({0}\uD589)\uC758 \"{1}\" \uC694\uC18C\uC5D0 \"{2}\" \uC18D\uC131\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-runtime.parser.invalid.attribute.value=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790({0}\uD589)\uC5D0 \uBD80\uC801\uD569\uD55C \uC18D\uC131\uAC12 \"{1}\"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.
-runtime.parser.missing.attribute.no.line=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790\uC758 \"{1}\" \uC694\uC18C\uC5D0 \"{2}\" \uC18D\uC131\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-runtime.parser.wrong.element=\"{1}\" \uC694\uC18C\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC9C0\uB9CC \uB7F0\uD0C0\uC784 \uAE30\uC220\uC790({0}\uD589)\uC5D0\uB294 \"{2}\"\uC774(\uAC00) \uD544\uC694\uD569\uB2C8\uB2E4.
-runtime.parser.wsdl.not.found={0}\uC744(\uB97C) WAR \uD30C\uC77C\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. WAR \uD30C\uC77C\uC5D0\uC11C \uD328\uD0A4\uC9C0\uD654\uD558\uAC70\uB098 sun-jaxws.xml\uC5D0\uC11C \uC218\uC815\uD558\uC2ED\uC2DC\uC624.
-runtime.parser.wsdl=WSDL \uAD6C\uBB38 \uBD84\uC11D \uC911 \uC608\uC678 \uC0AC\uD56D \uBC1C\uC0DD: {0}
-runtime.saxparser.exception={0}\n{1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2}
-runtime.parser.wsdl.multiplebinding={1} \uC11C\uBE44\uC2A4\uC758 \uBC14\uC778\uB529 ID {0}\uC5D0 \uB300\uD55C \uBC14\uC778\uB529\uC774 WSDL {2}\uC5D0\uC11C \uC5EC\uB7EC \uAC1C \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-runtime.parser.wsdl.noservice.in.wsdlmodel=WSDL {0}\uC744(\uB97C) \uCC98\uB9AC\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC73C\uBA70 \uC801\uD569\uD55C \uC11C\uBE44\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-runtime.parser.wsdl.incorrectservice=WSDL\uC5D0\uC11C \uBC14\uC778\uB529\uC744 \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4! {0} \uC11C\uBE44\uC2A4\uB97C WSDL {1}\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\uC11C\uBE44\uC2A4 \uC774\uB984\uC774 WSDL\uC758 wsdl:service name\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uAE30 \uB54C\uBB38\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n1. \uC11C\uBE44\uC2A4 \uC774\uB984\uC774 \uBC30\uCE58 \uAE30\uC220\uC790\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4.\n2. \uBC30\uCE58 \uAE30\uC220\uC790\uC758 \uC11C\uBE44\uC2A4 \uC774\uB984\uC5D0 \uCCA0\uC790 \uC624\uB958\uAC00 \uC788\uC2B5\uB2C8\uB2E4.\n3. @WebService\uC758 \uACC4\uC0B0\uB41C \uC774\uB984\uC774 wsdl:service name\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n\uB610\uB294\n1. WSDL\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC73C\uBA70 \uC774\uB984\uC774 {0}\uC778 \uC11C\uBE44\uC2A4\uB97C WSDLModel\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\uB2E4\uC74C \uC791\uC5C5 \uC911 \uD558\uB098\uB97C \uC218\uD589\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.\n1. \uBC30\uCE58 \uAE30\uC220\uC790\uC5D0\uC11C \uC11C\uBE44\uC2A4 \uC774\uB984\uC5D0 \uB300\uD55C \uD56D\uBAA9\uC744 \uCD94\uAC00/\uC218\uC815\uD569\uB2C8\uB2E4. \n2. \uB05D\uC810 \uD074\uB798\uC2A4\uC758 @WebService\uC5D0 targetNamespace, serviceName\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4.
-
-runtime.parser.wsdl.incorrectserviceport=WSDL\uC5D0\uC11C \uBC14\uC778\uB529\uC744 \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4! {0} \uC11C\uBE44\uC2A4 \uB610\uB294 {1} \uD3EC\uD2B8\uB97C WSDL {2}\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\uC11C\uBE44\uC2A4 \uBC0F \uD3EC\uD2B8 \uC774\uB984\uC774 WSDL\uC758 wsdl:service name \uBC0F wsdl:port name\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uAE30 \uB54C\uBB38\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n1. \uC11C\uBE44\uC2A4 \uBC0F \uD3EC\uD2B8 \uC774\uB984\uC774 \uBC30\uCE58 \uAE30\uC220\uC790\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4.\n2. \uBC30\uCE58 \uAE30\uC220\uC790\uC758 \uC11C\uBE44\uC2A4 \uBC0F \uD3EC\uD2B8 \uC774\uB984\uC5D0 \uCCA0\uC790 \uC624\uB958\uAC00 \uC788\uC2B5\uB2C8\uB2E4.\n3. @WebService\uC758 \uACC4\uC0B0\uB41C \uC774\uB984\uC774 wsdl:service name \uBC0F wsdl:port name\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n\uB2E4\uC74C \uC791\uC5C5 \uC911 \uD558\uB098\uB97C \uC218\uD589\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.\n1. \uBC30\uCE58 \uAE30\uC220\uC790\uC5D0\uC11C \uC11C\uBE44\uC2A4 \uBC0F \uD3EC\uD2B8 \uC774\uB984\uC5D0 \uB300\uD55C \uD56D\uBAA9\uC744 \uCD94\uAC00/\uC218\uC815\uD569\uB2C8\uB2E4. \n2. \uB05D\uC810 \uD074\uB798\uC2A4\uC758 @WebService\uC5D0 targetNamespace, serviceName, portName\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4.
-
-stateful.cookie.header.required=Stateful \uC6F9 \uC11C\uBE44\uC2A4\uC774\uBA70 {0} \uD5E4\uB354\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
-stateful.cookie.header.incorrect=\uBD80\uC801\uD569\uD558\uAC70\uB098 \uB9CC\uB8CC\uB41C {0} \uD5E4\uB354 \uAC12: {1}
-stateful.invalid.webservice.context=JAX-WS RI\uC758 WebServiceContext\uAC00 \uC544\uB2D8: {0}
-stateful.requres.addressing=Stateful \uC6F9 \uC11C\uBE44\uC2A4 {0}\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB824\uBA74 WS-Addressing \uC9C0\uC6D0\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4. @Addressing\uC774 \uB204\uB77D\uB41C \uAC83 \uAC19\uC2B5\uB2C8\uB2E4.
-
-no.current.packet=\uC774 \uC2A4\uB808\uB4DC\uB294 \uD604\uC7AC \uC6F9 \uC11C\uBE44\uC2A4 \uC694\uCCAD\uC744 \uCC98\uB9AC\uD558\uACE0 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-
-# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2)
-failed.to.instantiate.instanceResolver={2}\uC758 {1}\uC5D0 \uC9C0\uC815\uB41C {0}\uC744(\uB97C) \uC778\uC2A4\uD134\uC2A4\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-static.resource.injection.only=\uC815\uC801 \uB9AC\uC18C\uC2A4 {0}\uC744(\uB97C) \uBE44\uC815\uC801 "{1}"\uC5D0 \uC0BD\uC785\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-dd.mtom.conflict = \uBC30\uCE58 \uAE30\uC220\uC790\uC5D0 \uC624\uB958 \uBC1C\uC0DD: {0} \uBC14\uC778\uB529\uC758 MTOM \uAD6C\uC131\uC774 enable-mtom \uC18D\uC131\uAC12 {1}\uACFC(\uC640) \uCDA9\uB3CC\uD569\uB2C8\uB2E4.
-
-# {0} - qname of an element
-dispatch.cannotFindMethod={0}\uC5D0 \uB300\uD55C dispatch \uBA54\uC18C\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-non.unique.dispatch.qname=\uACE0\uC720\uD558\uC9C0 \uC54A\uC740 \uBCF8\uBB38 \uBD80\uBD84\uC785\uB2C8\uB2E4! \uC791\uC5C5 \uD560\uB2F9\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uC218\uD589\uD558\uB824\uBA74 BP 1.1 R2710\uC5D0 \uB530\uB77C \uD3EC\uD2B8\uC5D0\uC11C \uC791\uC5C5\uC5D0 \uACE0\uC720\uD55C \uC791\uC5C5 \uC11C\uBA85\uC774 \uC5F0\uACB0\uB418\uC5B4 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. {0} \uBA54\uC18C\uB4DC\uC758 \uC694\uCCAD \uBCF8\uBB38 \uBE14\uB85D {1}\uC774(\uAC00) \uB3D9\uC77C\uD569\uB2C8\uB2E4. \uBA54\uC18C\uB4DC \uC791\uC5C5 \uD560\uB2F9\uC744 \uC2E4\uD328\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB7F0\uD0C0\uC784\uC774 SOAPAction\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC791\uC5C5 \uD560\uB2F9\uC744 \uC2DC\uB3C4\uD569\uB2C8\uB2E4. \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uB7F0\uD0C0\uC784\uC5D0 \uB300\uD574 AddressingFeature\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD558\uC5EC wsa:Action \uD5E4\uB354\uB97C \uC0AC\uC6A9\uD558\uB294 WSDL \uC791\uC5C5\uC744 \uACE0\uC720\uD558\uAC8C \uC2DD\uBCC4\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.
-
-unsupported.contentType=\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 Content-Type: {0}. \uC9C0\uC6D0\uB418\uB294 Content-Type: {1}
-no.contentType=\uC694\uCCAD\uC5D0 Content-Type\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-unsupported.charset=\uC218\uC2E0\uB41C \uBA54\uC2DC\uC9C0\uC758 Content-Type\uC5D0 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uBB38\uC790 \uC9D1\uD569 "{0}"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.
-duplicate.portKnownHeader=\uC218\uC2E0\uB41C SOAP \uBA54\uC2DC\uC9C0\uC5D0 \uD3EC\uD568\uB418\uC5B4 \uC788\uB294 \uBC14\uC778\uB4DC\uB41C \uB9E4\uAC1C\uBCC0\uC218\uC5D0 \uB300\uD55C {0} \uD5E4\uB354\uAC00 \uC911\uBCF5\uB429\uB2C8\uB2E4.
-
-runtimemodeler.invalidannotationOnImpl=\uB05D\uC810 \uAD6C\uD604 \uD074\uB798\uC2A4 \"{1}\"\uC758 \uBD80\uC801\uD569\uD55C \uC8FC\uC11D {0}\uC774(\uAC00) \uBB34\uC2DC\uB429\uB2C8\uB2E4. \"{1}\"\uC740(\uB294) @WebService(endpointInterface=\"{2}\")\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uC73C\uBA70 {0}(\uC73C)\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. \uC218\uC815\uD558\uB824\uBA74 SEI {2}\uC5D0\uC11C \uC774 \uC8FC\uC11D\uC744 \uC0BD\uC785\uD558\uC2ED\uC2DC\uC624.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_pt_BR.properties
deleted file mode 100644
index 4e07e979..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_pt_BR.properties
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soapdecoder.err=Erro na decodifica\u00E7\u00E3o da Mensagem SOAP
-server.rt.err=Erro de Runtime do Servidor: {0}
-soapencoder.err=Erro na codifica\u00E7\u00E3o da Mensagem SOAP
-
-annotation.only.once=S\u00F3 um m\u00E9todo deve ter a anota\u00E7\u00E3o \"{0}\"
-not.zero.parameters=O m\u00E9todo \"{0}\" n\u00E3o deve ter argumentos
-
-wrong.field.type=Tipo incorreto de campo \"{0}\"
-wrong.no.parameters=N\u00FAmero incorreto de argumentos para o m\u00E9todo \"{0}\"
-wrong.parameter.type=Tipos de argumentos incorretos para o m\u00E9todo \"{0}\"
-
-can.not.generate.wsdl=N\u00E3o \u00E9 poss\u00EDvel gerar o WSDL para bind \\"{0}\\"
-generate.non.standard.wsdl=Gerando WSDL n\u00E3o padr\u00E3o para o bind especificado
-null.implementor=O implementador n\u00E3o pode ser nulo
-
-runtime.wsdl.patcher=erro ao fazer patch do documento relacionado ao WSDL
-
-# {0} - class name
-not.implement.provider=\"{0}\" n\u00E3o implementa o Provedor
-# {0} - class name
-provider.not.parameterized=\"{0}\" implementa o Provedor mas n\u00E3o especifica o par\u00E2metro de tipo
-# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect
-provider.invalid.parameterType=\"{0}\" implementa o Provedor mas seu par\u00E2metro de tipo {1} \u00E9 incorreto
-
-wsdl.required=wsdl \u00E9 obrigat\u00F3rio
-service.name.required=QName de Servi\u00E7o n\u00E3o encontrado
-port.name.required=QName da Porta n\u00E3o encontrado
-wrong.tns.for.port=O namespace da porta {0} n\u00E3o corresponde ao namespace {1} do Servi\u00E7o
-
-# {0} - probably URL/port of a server
-already.http.server=J\u00E1 existe um servidor HTTP em : {0}# {0} - provavelmente URL/porta de um servidor
-already.https.server=J\u00E1 existe um servidor HTTPS em: {0}
-#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0}
-
-not.know.HttpContext.type=N\u00E3o suporta Endpoint.publish({0}). Os tipos de contexto conhecidos s\u00E3o {1} e {2}
-
-duplicate.primary.wsdl=Os metadados t\u00EAm mais de um WSDL que tem defini\u00E7\u00E3o de Servi\u00E7o do ponto final. O WSDL={0} \u00E9 um desses WSDLs.
-duplicate.abstract.wsdl=Os metadados t\u00EAm mais de um WSDL que tem defini\u00E7\u00E3o de Servi\u00E7o do ponto final. O WSDL={0} \u00E9 desses WSDLs.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.classNotFound=classe n\u00E3o encontrada no descritor de runtime: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.xmlReader=erro ao fazer parse do descritor de runtime: {0}
-# Usage not found. TODO Remove
-#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0}
-runtime.parser.unexpectedContent=conte\u00FAdo inesperado no descritor de runtime (linha {0})
-runtime.parser.invalidElement=elemento inv\u00E1lido \\"{1}\\" no descritor de runtime (linha {0})
-runtime.parser.invalidAttributeValue=valor inv\u00E1lido para o atributo \\"{2}\\" do elemento \\"{1}\\" no descritor de runtime (linha {0})
-runtime.parser.invalidVersionNumber=vers\u00E3o do descritor de runtime n\u00E3o suportada: {2}
-runtime.parser.missing.attribute=atributo \\"{2}\\" n\u00E3o encontrado no elemento \\"{1}\\" do descritor de runtime (linha {0})
-runtime.parser.invalid.attribute.value=valor do atributo inv\u00E1lido \\"{1}\\" no descritor de runtime (linha {0})
-runtime.parser.missing.attribute.no.line=atributo \\"{2}\\" n\u00E3o encontrado no elemento \\"{1}\\" do descritor de runtime
-runtime.parser.wrong.element=elemento \\"{1}\\" encontrado, esperava \\"{2}\\" no descritor de runtime (linha {0})
-runtime.parser.wsdl.not.found={0} n\u00E3o encontrado no arquivo WAR. Empacote-o no arquivo WAR ou corrija-o no sun-jaxws.xml.
-runtime.parser.wsdl=exce\u00E7\u00E3o durante o parse do WSDL: {0}
-runtime.saxparser.exception={0}\n{1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2}
-runtime.parser.wsdl.multiplebinding=v\u00E1rios binds encontrados para o ID de binding {0} do servi\u00E7o {1} no WSDL {2}
-runtime.parser.wsdl.noservice.in.wsdlmodel=Houve um erro no processamento do WSDL {0} e nenhum servi\u00E7o v\u00E1lido foi encontrado.
-runtime.parser.wsdl.incorrectservice=n\u00E3o foi poss\u00EDvel obter bind do WSDL!: o servi\u00E7o {0} n\u00E3o foi encontrado no WSDL {1}.\nIsso pode ocorrer porque o nome do servi\u00E7o n\u00E3o corresponde ao wsdl:service name de WSDL:\n1. o nome do servi\u00E7o n\u00E3o est\u00E1 no descritor de implanta\u00E7\u00E3o OU\n2. H\u00E1 um erro de digita\u00E7\u00E3o no nome do servi\u00E7o do descritor de implanta\u00E7\u00E3o OU\n3. Os nomes calculados de @WebService n\u00E3o correspondem ao nome do wsdl:service\nOU\n1. H\u00E1 um erro ao fazer parse do wsdl e o Servi\u00E7o com o nome {0} n\u00E3o foi encontrado no WSDLModel.\nSugerimos o seguinte:\n1. Adicionar/corrigir entradas do nome de servi\u00E7o no descritor de implanta\u00E7\u00E3o OU \n2. Especificar targetNamespace, serviceName no @WebService na classe do ponto final
-
-runtime.parser.wsdl.incorrectserviceport=n\u00E3o foi poss\u00EDvel obter bind do WSDL!: o servi\u00E7o {0} ou a porta {1} n\u00E3o foi encontrado(a) no WSDL {2}.\nIsso pode ocorrer porque os nomes do servi\u00E7o e da porta n\u00E3o correspondem aos nomes de wsdl:service e wsdl:port de WSDL:\n1. os nomes do servi\u00E7o e da porta n\u00E3o est\u00E3o no descritor de implanta\u00E7\u00E3o OU\n2. H\u00E1 um erro de digita\u00E7\u00E3o no nome do servi\u00E7o e da porta do descritor de implanta\u00E7\u00E3o OU\n3. Os nomes calculados de @WebService n\u00E3o correspondem ao nome do wsdl:service e do wsdl:port\nSugerimos o seguinte:\n1. Adicionar/corrigir entradas de nome de servi\u00E7o e porta no descritor de implanta\u00E7\u00E3o OU \n2. Especificar targetNamespace, serviceName, portName no @WebService na classe do ponto final
-
-stateful.cookie.header.required=Este \u00E9 um web service com informa\u00E7\u00F5es de estado e o cabe\u00E7alho {0} \u00E9 necess\u00E1rio.
-stateful.cookie.header.incorrect=Valor do cabe\u00E7alho {0} inv\u00E1lido/expirado: {1}
-stateful.invalid.webservice.context=N\u00E3o \u00E9 uma WebServiceContext de JAX-WS RI: {0}
-stateful.requres.addressing=Web service {0} com informa\u00E7\u00F5es de estado requer que o suporte de Endere\u00E7amento de WS seja ativado. Talvez esteja faltando @Addressing
-
-no.current.packet=Este thread n\u00E3o est\u00E1 processamento nenhuma solicita\u00E7\u00E3o de web servi\u00E7o no momento.
-
-# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2)
-failed.to.instantiate.instanceResolver=N\u00E3o \u00E9 poss\u00EDvel instanciar {0} (que foi especificado em {1} na {2})
-
-static.resource.injection.only=O recurso est\u00E1tico {0} n\u00E3o pode ser injetado para n\u00E3o est\u00E1tico "{1}"
-
-dd.mtom.conflict = Erro no Descritor de Implanta\u00E7\u00E3o: a Configura\u00E7\u00E3o de MTOM no bind {0} est\u00E1 em conflito com o valor do atributo enable-mtom {1}
-
-# {0} - qname of an element
-dispatch.cannotFindMethod=N\u00E3o \u00E9 poss\u00EDvel localizar o m\u00E9todo de despacho para {0}
-non.unique.dispatch.qname=Sem partes do corpo exclusivas! Em uma porta, conforme BP 1.1 R2710, as opera\u00E7\u00F5es devem ter assinatura de opera\u00E7\u00E3o exclusiva na conex\u00E3o para obter despacho com sucesso. Os m\u00E9todos {0} t\u00EAm o mesmo bloco do corpo da solicita\u00E7\u00E3o {1}. O m\u00E9todo de despacho pode falhar, o runtime tentar\u00E1 despachar usando SOAPAction. Outra op\u00E7\u00E3o \u00E9 ativar o AddressingFeature para o runtime ativado identificar exclusivamente a opera\u00E7\u00E3o do WSDL usando o cabe\u00E7alho wsa:Action.
-
-unsupported.contentType=Tipo de Conte\u00FAdo N\u00E3o Suportado: {0} Os tipos suportados s\u00E3o: {1}
-no.contentType=A solicita\u00E7\u00E3o n\u00E3o tem um Tipo de Conte\u00FAdo
-unsupported.charset=Conjunto de caracteres "{0}" n\u00E3o suportados no Tipo de Conte\u00FAdo da mensagem recebida
-duplicate.portKnownHeader=A mensagem SOAP recebida cont\u00E9m cabe\u00E7alho duplicado: {0} para um par\u00E2metro associado
-
-runtimemodeler.invalidannotationOnImpl=Anota\u00E7\u00E3o inv\u00E1lida: {0} na classe de implementa\u00E7\u00E3o do ponto final \\"{1}\\" - ser\u00E1 ignorado(a). \\"{1}\\" est\u00E1 anotada com @WebService(endpointInterface=\\"{2}\\"}, ela n\u00E3o deve ser anotada com {0}, para corrig\u00ED-la, coloque esta anota\u00E7\u00E3o no SEI {2}.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_CN.properties
deleted file mode 100644
index 13b3cdfb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_CN.properties
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soapdecoder.err=\u89E3\u7801 SOAP \u6D88\u606F\u65F6\u51FA\u9519
-server.rt.err=\u670D\u52A1\u5668\u8FD0\u884C\u65F6\u9519\u8BEF: {0}
-soapencoder.err=\u7F16\u7801 SOAP \u6D88\u606F\u65F6\u51FA\u9519
-
-annotation.only.once=\u53EA\u80FD\u6709\u4E00\u4E2A\u65B9\u6CD5\u5177\u6709\u6CE8\u91CA \"{0}\"
-not.zero.parameters=\u65B9\u6CD5 \"{0}\" \u4E0D\u5E94\u6709\u4EFB\u4F55\u53C2\u6570
-
-wrong.field.type=\u5B57\u6BB5 \"{0}\" \u7684\u7C7B\u578B\u4E0D\u6B63\u786E
-wrong.no.parameters=\u65B9\u6CD5 \"{0}\" \u7684\u53C2\u6570\u6570\u76EE\u4E0D\u6B63\u786E
-wrong.parameter.type=\u65B9\u6CD5 \"{0}\" \u7684\u53C2\u6570\u7C7B\u578B\u4E0D\u6B63\u786E
-
-can.not.generate.wsdl=\u65E0\u6CD5\u4E3A\u7ED1\u5B9A \"{0}\" \u751F\u6210 WSDL
-generate.non.standard.wsdl=\u4E3A\u6307\u5B9A\u7684\u7ED1\u5B9A\u751F\u6210\u975E\u6807\u51C6 WSDL
-null.implementor=\u5B9E\u73B0\u65B9\u4E0D\u80FD\u4E3A\u7A7A\u503C
-
-runtime.wsdl.patcher=\u4E3A WSDL \u76F8\u5173\u6587\u6863\u6253\u8865\u4E01\u65F6\u51FA\u9519
-
-# {0} - class name
-not.implement.provider=\"{0}\" \u4E0D\u5B9E\u73B0\u63D0\u4F9B\u65B9
-# {0} - class name
-provider.not.parameterized=\"{0}\" \u5B9E\u73B0\u63D0\u4F9B\u65B9, \u4F46\u672A\u6307\u5B9A\u7C7B\u578B\u53C2\u6570
-# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect
-provider.invalid.parameterType=\"{0}\" \u5B9E\u73B0\u63D0\u4F9B\u65B9, \u4F46\u5176\u7C7B\u578B\u53C2\u6570{1}\u4E0D\u6B63\u786E
-
-wsdl.required=wsdl \u662F\u5FC5\u9700\u7684
-service.name.required=\u672A\u627E\u5230\u670D\u52A1 QName
-port.name.required=\u672A\u627E\u5230\u7AEF\u53E3 QName
-wrong.tns.for.port=\u7AEF\u53E3\u540D\u79F0\u7A7A\u95F4{0}\u4E0E\u670D\u52A1\u540D\u79F0\u7A7A\u95F4{1}\u4E0D\u5339\u914D
-
-# {0} - probably URL/port of a server
-already.http.server=\u4EE5\u4E0B\u4F4D\u7F6E\u5DF2\u6709\u4E00\u4E2A HTTP \u670D\u52A1\u5668: {0}# {0} - \u53EF\u80FD\u662F\u670D\u52A1\u5668\u7684 URL/\u7AEF\u53E3
-already.https.server=\u4EE5\u4E0B\u4F4D\u7F6E\u5DF2\u6709\u4E00\u4E2A HTTPS \u670D\u52A1\u5668: {0}
-#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0}
-
-not.know.HttpContext.type=\u4E0D\u652F\u6301 Endpoint.publish({0})\u3002\u5DF2\u77E5\u4E0A\u4E0B\u6587\u7C7B\u578B\u4E3A{1}\u548C{2}
-
-duplicate.primary.wsdl=\u5143\u6570\u636E\u6709\u591A\u4E2A WSDL \u5305\u542B\u7AEF\u70B9\u7684\u670D\u52A1\u5B9A\u4E49\u3002WSDL={0}\u5C31\u662F\u5176\u4E2D\u4E00\u4E2A\u8FD9\u6837\u7684 WSDL\u3002
-duplicate.abstract.wsdl=\u5143\u6570\u636E\u6709\u591A\u4E2A WSDL \u5305\u542B\u7AEF\u70B9\u7684 PortType \u5B9A\u4E49\u3002WSDL={0}\u5C31\u662F\u5176\u4E2D\u4E00\u4E2A\u8FD9\u6837\u7684 WSDL\u3002
-
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.classNotFound=\u5728\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u4E2D\u672A\u627E\u5230\u7C7B: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.xmlReader=\u89E3\u6790\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u65F6\u51FA\u9519: {0}
-# Usage not found. TODO Remove
-#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0}
-runtime.parser.unexpectedContent=\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u4E2D\u51FA\u73B0\u610F\u5916\u7684\u5185\u5BB9 (\u7B2C {0} \u884C)
-runtime.parser.invalidElement=\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u4E2D\u7684\u5143\u7D20 \"{1}\" \u65E0\u6548 (\u7B2C {0} \u884C)
-runtime.parser.invalidAttributeValue=\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u4E2D\u7684\u5143\u7D20 \"{1}\" \u7684\u5C5E\u6027 \"{2}\" \u7684\u503C\u65E0\u6548 (\u7B2C {0} \u884C)
-runtime.parser.invalidVersionNumber=\u4E0D\u652F\u6301\u7684\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u7248\u672C: {2}
-runtime.parser.missing.attribute=\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u7684\u5143\u7D20 \"{1}\" \u4E2D\u7F3A\u5C11\u5C5E\u6027 \"{2}\" (\u7B2C {0} \u884C)
-runtime.parser.invalid.attribute.value=\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u4E2D\u7684\u5C5E\u6027\u503C \"{1}\" \u65E0\u6548 (\u7B2C {0} \u884C)
-runtime.parser.missing.attribute.no.line=\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u7684\u5143\u7D20 \"{1}\" \u4E2D\u7F3A\u5C11\u5C5E\u6027 \"{2}\"
-runtime.parser.wrong.element=\u5728\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u4E2D\u627E\u5230\u5143\u7D20 \"{1}\", \u5E94\u4E3A \"{2}\" (\u7B2C {0} \u884C)
-runtime.parser.wsdl.not.found=\u5728 WAR \u6587\u4EF6\u4E2D\u672A\u627E\u5230{0}\u3002\u8BF7\u5C06\u5B83\u6253\u5305\u5728 WAR \u6587\u4EF6\u4E2D\u6216\u5728 sun-jaxws.xml \u4E2D\u66F4\u6B63\u5B83\u3002
-runtime.parser.wsdl=WSDL \u89E3\u6790\u671F\u95F4\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF: {0}
-runtime.saxparser.exception={0}\n{1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2}
-runtime.parser.wsdl.multiplebinding=\u9488\u5BF9 WSDL {2}\u4E2D\u7684\u670D\u52A1{1}\u7684\u7ED1\u5B9A ID {0}, \u627E\u5230\u591A\u4E2A\u7ED1\u5B9A
-runtime.parser.wsdl.noservice.in.wsdlmodel=\u5904\u7406 WSDL {0}\u65F6\u51FA\u9519, \u627E\u4E0D\u5230\u6709\u6548\u7684\u670D\u52A1\u3002
-runtime.parser.wsdl.incorrectservice=\u65E0\u6CD5\u4ECE WSDL \u83B7\u53D6\u7ED1\u5B9A! \u5728 WSDL {1}\u4E2D\u672A\u627E\u5230\u670D\u52A1{0}\u3002\n\u8FD9\u53EF\u80FD\u662F\u56E0\u4E3A\u670D\u52A1\u540D\u4E0E WSDL \u7684 wsdl:service \u540D\u4E0D\u5339\u914D:\n1. \u670D\u52A1\u540D\u6CA1\u6709\u4F4D\u4E8E\u90E8\u7F72\u63CF\u8FF0\u7B26\u4E2D, \u6216\u8005\n2. \u90E8\u7F72\u63CF\u8FF0\u7B26\u7684\u670D\u52A1\u540D\u4E2D\u5B58\u5728\u62FC\u5199\u9519\u8BEF, \u6216\u8005\n3. \u4ECE @WebService \u8BA1\u7B97\u5F97\u51FA\u7684\u540D\u79F0\u4E0E wsdl:service \u540D\u4E0D\u5339\u914D\n\u6216\u8005\n1. \u89E3\u6790 wsdl \u65F6\u51FA\u9519, \u5728 WSDLModel \u4E2D\u627E\u4E0D\u5230\u540D\u4E3A{0}\u7684\u670D\u52A1\u3002\n\u5EFA\u8BAE\u6267\u884C\u4EE5\u4E0B\u64CD\u4F5C:\n1. \u5728\u90E8\u7F72\u63CF\u8FF0\u7B26\u4E2D\u6DFB\u52A0/\u66F4\u6B63\u670D\u52A1\u540D\u7684\u6761\u76EE, \u6216\u8005\n2. \u5728\u7AEF\u70B9\u7C7B\u4E0A\u7684 @WebService \u4E2D\u6307\u5B9A targetNamespace, serviceName
-
-runtime.parser.wsdl.incorrectserviceport=\u65E0\u6CD5\u4ECE WSDL \u83B7\u53D6\u7ED1\u5B9A! \u5728 WSDL {2}\u4E2D\u672A\u627E\u5230\u670D\u52A1{0}\u6216\u7AEF\u53E3 {1}\u3002\n\u8FD9\u53EF\u80FD\u662F\u56E0\u4E3A\u670D\u52A1\u540D\u548C\u7AEF\u53E3\u540D\u4E0E WSDL \u7684 wsdl:service \u540D\u548C wsdl:port \u540D\u4E0D\u5339\u914D:\n1. \u670D\u52A1\u540D\u548C\u7AEF\u53E3\u540D\u6CA1\u6709\u4F4D\u4E8E\u90E8\u7F72\u63CF\u8FF0\u7B26\u4E2D, \u6216\u8005\n2. \u90E8\u7F72\u63CF\u8FF0\u7B26\u7684\u670D\u52A1\u540D\u548C\u7AEF\u53E3\u540D\u4E2D\u5B58\u5728\u62FC\u5199\u9519\u8BEF, \u6216\u8005\n3. \u4ECE @WebService \u8BA1\u7B97\u5F97\u51FA\u7684\u540D\u79F0\u4E0E wsdl:service \u540D\u548C wsdl:port \u540D\u4E0D\u5339\u914D\n\u5EFA\u8BAE\u6267\u884C\u4EE5\u4E0B\u64CD\u4F5C:\n1. \u5728\u90E8\u7F72\u63CF\u8FF0\u7B26\u4E2D\u6DFB\u52A0/\u66F4\u6B63\u670D\u52A1\u540D\u548C\u7AEF\u53E3\u540D\u7684\u6761\u76EE, \u6216\u8005\n2. \u5728\u7AEF\u70B9\u7C7B\u4E0A\u7684 @WebService \u4E2D\u6307\u5B9A targetNamespace, serviceName, portName
-
-stateful.cookie.header.required=\u8FD9\u662F\u6709\u72B6\u6001\u7684 Web \u670D\u52A1, \u9700\u8981{0}\u6807\u5934\u3002
-stateful.cookie.header.incorrect={0}\u6807\u5934\u503C\u65E0\u6548/\u5DF2\u8FC7\u671F: {1}
-stateful.invalid.webservice.context=\u4E0D\u662F\u6765\u81EA JAX-WS RI \u7684 WebServiceContext: {0}
-stateful.requres.addressing=\u6709\u72B6\u6001\u7684 Web \u670D\u52A1{0}\u9700\u8981\u542F\u7528 WS-Addressing \u652F\u6301\u3002\u53EF\u80FD\u7F3A\u5C11 @Addressing
-
-no.current.packet=\u6B64\u7EBF\u7A0B\u5F53\u524D\u672A\u5904\u7406\u4EFB\u4F55 Web \u670D\u52A1\u8BF7\u6C42\u3002
-
-# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2)
-failed.to.instantiate.instanceResolver=\u65E0\u6CD5\u5B9E\u4F8B\u5316{0} (\u5728{2}\u4E0A\u7684{1}\u4E2D\u6307\u5B9A)
-
-static.resource.injection.only=\u9759\u6001\u8D44\u6E90{0}\u65E0\u6CD5\u6CE8\u5165\u5230\u975E\u9759\u6001 "{1}"
-
-dd.mtom.conflict = \u90E8\u7F72\u63CF\u8FF0\u7B26\u4E2D\u51FA\u9519: \u7ED1\u5B9A{0}\u4E2D\u7684 MTOM \u914D\u7F6E\u4E0E enable-mtom \u5C5E\u6027\u503C{1}\u53D1\u751F\u51B2\u7A81
-
-# {0} - qname of an element
-dispatch.cannotFindMethod=\u627E\u4E0D\u5230{0}\u7684\u5206\u6D3E\u65B9\u6CD5
-non.unique.dispatch.qname=\u975E\u552F\u4E00\u4E3B\u4F53\u90E8\u5206! \u6839\u636E BP 1.1 R2710 \u89C4\u5B9A, \u5728\u7AEF\u53E3\u4E2D\u64CD\u4F5C\u5FC5\u987B\u5177\u6709\u552F\u4E00\u7684\u901A\u4FE1\u64CD\u4F5C\u7B7E\u540D\u624D\u80FD\u6210\u529F\u5206\u6D3E\u3002\u65B9\u6CD5{0}\u5177\u6709\u76F8\u540C\u7684\u8BF7\u6C42\u4E3B\u4F53\u5757{1}\u3002\u65B9\u6CD5\u5206\u6D3E\u53EF\u80FD\u5931\u8D25, \u8FD0\u884C\u65F6\u5C06\u5C1D\u8BD5\u4F7F\u7528 SOAPAction \u8FDB\u884C\u5206\u6D3E\u3002\u8FD8\u53EF\u4EE5\u542F\u7528 AddressingFeature \u4EE5\u5141\u8BB8\u8FD0\u884C\u65F6\u4F7F\u7528 wsa:Action \u6807\u5934\u552F\u4E00\u5730\u6807\u8BC6 WSDL \u64CD\u4F5C\u3002
-
-unsupported.contentType=\u4E0D\u652F\u6301\u7684 Content-Type: {0}, \u652F\u6301\u7684 Content-Type \u4E3A: {1}
-no.contentType=\u8BF7\u6C42\u6CA1\u6709 Content-Type
-unsupported.charset=\u6536\u5230\u7684\u6D88\u606F\u7684 Content-Type \u4E2D\u5305\u542B\u4E0D\u652F\u6301\u7684\u5B57\u7B26\u96C6 "{0}"
-duplicate.portKnownHeader=\u6536\u5230\u7684 SOAP \u6D88\u606F\u4E2D\u5305\u542B\u5BF9\u4E8E\u7ED1\u5B9A\u53C2\u6570\u91CD\u590D\u7684\u6807\u5934: {0}
-
-runtimemodeler.invalidannotationOnImpl=\u7AEF\u70B9\u5B9E\u73B0\u7C7B \"{1}\" \u4E0A\u7684\u6CE8\u91CA{0}\u65E0\u6548 - \u5C06\u5FFD\u7565\u6B64\u6CE8\u91CA\u3002\"{1}\" \u4F7F\u7528 @WebService(endpointInterface=\"{2}\"} \u8FDB\u884C\u6CE8\u91CA, \u5B83\u4E0D\u80FD\u4F7F\u7528{0}\u8FDB\u884C\u6CE8\u91CA, \u8981\u4FEE\u590D\u6B64\u95EE\u9898 - \u8BF7\u5C06\u6B64\u6CE8\u91CA\u653E\u5165 SEI {2}\u3002
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_TW.properties
deleted file mode 100644
index 674094ad..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_TW.properties
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soapdecoder.err=\u89E3\u78BC SOAP \u8A0A\u606F\u6642\u767C\u751F\u932F\u8AA4
-server.rt.err=\u4F3A\u670D\u5668\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u932F\u8AA4: {0}
-soapencoder.err=\u7DE8\u78BC SOAP \u8A0A\u606F\u6642\u767C\u751F\u932F\u8AA4
-
-annotation.only.once=\u50C5\u6709\u4E00\u500B\u65B9\u6CD5\u61C9\u5305\u542B\u8A3B\u89E3 \"{0}\"
-not.zero.parameters=\u65B9\u6CD5 \"{0}\" \u4E0D\u61C9\u5305\u542B\u4EFB\u4F55\u5F15\u6578
-
-wrong.field.type=\u6B04\u4F4D \"{0}\" \u7684\u985E\u578B\u4E0D\u6B63\u78BA
-wrong.no.parameters=\u65B9\u6CD5 \"{0}\" \u7684\u5F15\u6578\u6578\u76EE\u4E0D\u6B63\u78BA
-wrong.parameter.type=\u65B9\u6CD5 \"{0}\" \u7684\u5F15\u6578\u985E\u578B\u4E0D\u6B63\u78BA
-
-can.not.generate.wsdl=\u7121\u6CD5\u7522\u751F\u9023\u7D50 \"{0}\" \u7684 WSDL
-generate.non.standard.wsdl=\u6B63\u5728\u70BA\u6307\u5B9A\u7684\u9023\u7D50\u7522\u751F\u975E\u6A19\u6E96\u7684 WSDL
-null.implementor=\u5BE6\u4F5C\u9805\u4E0D\u53EF\u70BA\u7A7A\u503C
-
-runtime.wsdl.patcher=\u4FEE\u6B63 WSDL \u76F8\u95DC\u6587\u4EF6\u6642\u767C\u751F\u932F\u8AA4
-
-# {0} - class name
-not.implement.provider=\"{0}\" \u672A\u5BE6\u884C\u63D0\u4F9B\u8005
-# {0} - class name
-provider.not.parameterized=\"{0}\" \u5BE6\u884C\u4E86\u63D0\u4F9B\u8005, \u4F46\u672A\u6307\u5B9A\u985E\u578B\u53C3\u6578
-# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect
-provider.invalid.parameterType=\"{0}\" \u5BE6\u884C\u4E86\u63D0\u4F9B\u8005, \u4F46\u5176\u985E\u578B\u53C3\u6578 {1} \u4E0D\u6B63\u78BA
-
-wsdl.required=\u9700\u8981 WSDL
-service.name.required=\u627E\u4E0D\u5230\u670D\u52D9 QName
-port.name.required=\u627E\u4E0D\u5230\u9023\u63A5\u57E0 QName
-wrong.tns.for.port=\u9023\u63A5\u57E0\u547D\u540D\u7A7A\u9593 {0} \u8207\u670D\u52D9\u547D\u540D\u7A7A\u9593 {1} \u4E0D\u7B26
-
-# {0} - probably URL/port of a server
-already.http.server=\u4E0B\u5217\u4F4D\u7F6E\u5DF2\u7D93\u6709\u4E00\u500B HTTP \u4F3A\u670D\u5668: {0}# {0} - \u53EF\u80FD\u662F\u4F3A\u670D\u5668\u7684 URL/\u9023\u63A5\u57E0
-already.https.server=\u4E0B\u5217\u4F4D\u7F6E\u5DF2\u7D93\u6709\u4E00\u500B HTTPS \u4F3A\u670D\u5668: {0}
-#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0}
-
-not.know.HttpContext.type=\u4E0D\u652F\u63F4 Endpoint.publish({0}). \u5DF2\u77E5\u7684\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u985E\u578B\u70BA {1} \u8207 {2}
-
-duplicate.primary.wsdl=\u63CF\u8FF0\u8CC7\u6599\u6709\u4E00\u500B\u4EE5\u4E0A\u7684 WSDL \u64C1\u6709\u7AEF\u9EDE\u7684 Service \u5B9A\u7FA9. WSDL={0} \u662F\u5176\u4E2D\u4E00\u500B\u9019\u985E WSDL.
-duplicate.abstract.wsdl=\u63CF\u8FF0\u8CC7\u6599\u6709\u4E00\u500B\u4EE5\u4E0A\u7684 WSDL \u64C1\u6709\u7AEF\u9EDE\u7684 PortType \u5B9A\u7FA9. WSDL={0} \u662F\u5176\u4E2D\u4E00\u500B\u9019\u985E WSDL.
-
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.classNotFound=\u5728\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143\u4E2D\u627E\u4E0D\u5230\u985E\u5225: {0}
-# Wrapped into an Exception. Not concatenated with any other string.
-runtime.parser.xmlReader=\u5256\u6790\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143\u6642\u767C\u751F\u932F\u8AA4: {0}
-# Usage not found. TODO Remove
-#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0}
-runtime.parser.unexpectedContent=\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143\u4E2D\u6709\u672A\u9810\u671F\u7684\u5167\u5BB9 (\u884C {0})
-runtime.parser.invalidElement=\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143 (\u884C {0}) \u4E2D\u6709\u7121\u6548\u7684\u5143\u7D20 \"{1}\"
-runtime.parser.invalidAttributeValue=\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143 (\u884C {0}) \u4E2D\u5143\u7D20 \"{1}\" \u7684\u5C6C\u6027\u503C \"{2}\" \u7121\u6548
-runtime.parser.invalidVersionNumber=\u4E0D\u652F\u63F4\u7684\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143\u7248\u672C: {2}
-runtime.parser.missing.attribute=\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143 (\u884C {0}) \u7684\u5143\u7D20 \"{1}\" \u907A\u6F0F\u5C6C\u6027 \"{2}\"
-runtime.parser.invalid.attribute.value=\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143 (\u884C {0}) \u4E2D\u6709\u7121\u6548\u7684\u5C6C\u6027\u503C \"{1}\"
-runtime.parser.missing.attribute.no.line=\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143\u7684\u5143\u7D20 \"{1}\" \u907A\u6F0F\u5C6C\u6027 \"{2}\"
-runtime.parser.wrong.element=\u5728\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143 (\u884C {0}) \u4E2D\u767C\u73FE\u5143\u7D20 \"{1}\", \u9810\u671F\u70BA \"{2}\"
-runtime.parser.wsdl.not.found=\u5728 WAR \u6A94\u6848\u4E2D\u627E\u4E0D\u5230 {0}. \u8ACB\u5C07\u5176\u5C01\u88DD\u65BC WAR \u6A94\u6848\u4E2D, \u6216\u5728 sun-jaxws.xml \u4E2D\u66F4\u6B63\u5B83.
-runtime.parser.wsdl=\u5256\u6790 WSDL \u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1: {0}
-runtime.saxparser.exception={0}\n{1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1}
-# Usage not found. TODO Remove
-#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2}
-runtime.parser.wsdl.multiplebinding=\u767C\u73FE WSDL {2} \u4E2D\u4E4B\u670D\u52D9 {1} \u7684\u9023\u7D50 ID {0} \u6709\u591A\u500B\u9023\u7D50
-runtime.parser.wsdl.noservice.in.wsdlmodel=\u8655\u7406 WSDL {0} \u6642\u767C\u751F\u932F\u8AA4, \u627E\u4E0D\u5230\u6709\u6548\u7684\u670D\u52D9.
-runtime.parser.wsdl.incorrectservice=\u7121\u6CD5\u5F9E WSDL! \u670D\u52D9\u53D6\u5F97\u9023\u7D50: \u5728 WSDL {1} \u4E2D\u627E\u4E0D\u5230 {0}.\n\u53EF\u80FD\u662F\u56E0\u70BA\u670D\u52D9\u540D\u7A31\u8207 WSDL \u7684 wsdl:service \u540D\u7A31\u4E0D\u7B26:\n1. \u670D\u52D9\u540D\u7A31\u4E0D\u5728\u5EFA\u7F6E\u63CF\u8FF0\u5143\u4E2D, \u6216\n2. \u5EFA\u7F6E\u63CF\u8FF0\u5143\u7684\u670D\u52D9\u540D\u7A31\u53EF\u80FD\u8F38\u5165\u932F\u8AA4, \u6216\n3. \u5F9E @WebService \u8A08\u7B97\u7684\u540D\u7A31\u8207 wsdl:service \u540D\u7A31\u4E0D\u7B26\n\u6216\n4. \u5256\u6790 WSDL \u6642\u767C\u751F\u932F\u8AA4, \u800C\u4E14\u5728 WSDLModel \u4E2D\u627E\u4E0D\u5230\u540D\u7A31\u70BA {0} \u7684\u670D\u52D9.\n\u5EFA\u8B70\u57F7\u884C\u4E0B\u5217\u52D5\u4F5C:\n1. \u65B0\u589E/\u66F4\u6B63\u5EFA\u7F6E\u63CF\u8FF0\u5143\u4E2D\u7684\u670D\u52D9\u540D\u7A31\u9805\u76EE, \u6216 \n2. \u5728\u7AEF\u9EDE\u985E\u5225\u7684 @WebService \u4E2D\u6307\u5B9A targetNamespace\u3001serviceName
-
-runtime.parser.wsdl.incorrectserviceport=\u7121\u6CD5\u5F9E WSDL! \u670D\u52D9\u53D6\u5F97\u9023\u7D50: \u5728 WSDL {2} \u4E2D\u627E\u4E0D\u5230 {0} \u6216\u9023\u63A5\u57E0 {1}.\n\u53EF\u80FD\u662F\u56E0\u70BA\u670D\u52D9\u8207\u9023\u63A5\u57E0\u540D\u7A31\u8207 WSDL \u7684 wsdl:service \u548C wsdl:port \u540D\u7A31\u4E0D\u7B26:\n1. \u670D\u52D9\u8207\u9023\u63A5\u57E0\u540D\u7A31\u4E0D\u5728\u5EFA\u7F6E\u63CF\u8FF0\u5143\u4E2D, \u6216\n2. \u5EFA\u7F6E\u63CF\u8FF0\u5143\u7684\u670D\u52D9\u8207\u9023\u63A5\u57E0\u540D\u7A31\u53EF\u80FD\u8F38\u5165\u932F\u8AA4, \u6216\n3. \u5F9E @WebService \u8A08\u7B97\u7684\u540D\u7A31\u8207 wsdl:service \u548C wsdl:port \u540D\u7A31\u4E0D\u7B26\n\u5EFA\u8B70\u57F7\u884C\u4E0B\u5217\u52D5\u4F5C:\n1. \u65B0\u589E/\u66F4\u6B63\u5EFA\u7F6E\u63CF\u8FF0\u5143\u4E2D\u7684\u670D\u52D9\u8207\u9023\u63A5\u57E0\u540D\u7A31\u9805\u76EE, \u6216 \n2. \u5728\u7AEF\u9EDE\u985E\u5225\u7684 @WebService \u4E2D\u6307\u5B9A targetNamespace\u3001serviceName\u3001portName
-
-stateful.cookie.header.required=\u6B64\u70BA\u72C0\u614B\u6027 Web \u670D\u52D9, \u9700\u8981 {0} \u6A19\u982D.
-stateful.cookie.header.incorrect=\u7121\u6548/\u904E\u671F\u7684 {0} \u6A19\u982D\u503C: {1}
-stateful.invalid.webservice.context=\u4E0D\u662F JAX-WS RI \u4E2D\u7684 WebServiceContext: {0}
-stateful.requres.addressing=\u72C0\u614B\u6027 Web \u670D\u52D9 {0} \u5FC5\u9808\u555F\u7528 Web \u670D\u52D9\u5B9A\u5740\u652F\u63F4. \u4E5F\u8A31\u60A8\u907A\u6F0F\u4E86 @Addressing
-
-no.current.packet=\u6B64\u7E6B\u7DDA\u76EE\u524D\u672A\u8655\u7406\u4EFB\u4F55 Web \u670D\u52D9\u8981\u6C42.
-
-# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2)
-failed.to.instantiate.instanceResolver=\u7121\u6CD5\u5EFA\u7ACB {0} (\u5176\u6307\u5B9A\u65BC {2} \u7684 {1} \u4E2D)
-
-static.resource.injection.only=\u975C\u614B\u8CC7\u6E90 {0} \u7121\u6CD5\u5F15\u5165\u975E\u975C\u614B\u7684 "{1}"
-
-dd.mtom.conflict = \u5EFA\u7F6E\u63CF\u8FF0\u5143\u4E2D\u767C\u751F\u932F\u8AA4: \u9023\u7D50 {0} \u4E2D\u7684 MTOM \u7D44\u614B\u8207 enable-mtom \u5C6C\u6027\u503C {1} \u885D\u7A81
-
-# {0} - qname of an element
-dispatch.cannotFindMethod=\u627E\u4E0D\u5230 {0} \u7684\u5206\u914D\u65B9\u6CD5
-non.unique.dispatch.qname=\u975E\u552F\u4E00\u7684\u4E3B\u9AD4\u90E8\u5206! \u4F9D\u64DA BP 1.1 R2710, \u9023\u63A5\u57E0\u4E2D\u7684\u4F5C\u696D\u65BC\u7DDA\u4E0A\u5FC5\u9808\u6709\u552F\u4E00\u7684\u4F5C\u696D\u7C3D\u7AE0, \u624D\u80FD\u6210\u529F\u9032\u884C\u5206\u914D. \u65B9\u6CD5 {0} \u6709\u76F8\u540C\u7684\u8981\u6C42\u4E3B\u9AD4\u5340\u584A {1}. \u65B9\u6CD5\u5206\u914D\u53EF\u80FD\u6703\u5931\u6557, \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5C07\u5617\u8A66\u4F7F\u7528 SOAPAction \u9032\u884C\u5206\u914D. \u53E6\u4E00\u500B\u9078\u9805\u662F\u555F\u7528 AddressingFeature, \u4F7F\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u4F7F\u7528 wsa:Action \u6A19\u982D\u4F86\u552F\u4E00\u8B58\u5225 WSDL \u4F5C\u696D.
-
-unsupported.contentType=\u4E0D\u652F\u63F4\u7684 Content-Type: {0} \u652F\u63F4\u7684\u5167\u5BB9\u985E\u578B\u70BA: {1}
-no.contentType=\u8981\u6C42\u6C92\u6709 Content-Type
-unsupported.charset=\u5DF2\u63A5\u6536\u8A0A\u606F\u7684 Content-Type \u4E2D\u6709\u4E0D\u652F\u63F4\u7684\u5B57\u5143\u96C6 "{0}"
-duplicate.portKnownHeader=\u5DF2\u63A5\u6536 SOAP \u8A0A\u606F\u7684\u9023\u7D50\u53C3\u6578\u5305\u542B\u91CD\u8907\u7684\u6A19\u982D: {0}
-
-runtimemodeler.invalidannotationOnImpl=\u7AEF\u9EDE\u5BE6\u884C\u985E\u5225 \"{1}\" \u4E2D\u7684\u8A3B\u89E3: {0} \u7121\u6548 - \u5C07\u88AB\u5FFD\u7565. \"{1}\" \u662F\u4F7F\u7528 @WebService(endpointInterface=\"{2}\"} \u52A0\u8A3B, \u4E0D\u5F97\u4F7F\u7528 {0} \u52A0\u8A3B, \u82E5\u8981\u4FEE\u6B63 - \u8ACB\u5C07\u6B64\u8A3B\u89E3\u653E\u7F6E\u65BC SEI {2}.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap.properties
deleted file mode 100644
index 1a7fb12f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soap.msg.create.err=Couldn''t create SOAP message due to exception: {0}
-soap.msg.factory.create.err=Couldn''t create SOAP message factory due to exception: {0}
-soap.protocol.invalidFaultCode=Invalid fault code: {0}
-soap.factory.create.err=Couldn''t create SOAP factory due to exception: {0}
-soap.fault.create.err=Couldn''t create SOAP Fault due to exception: {0}
-soap.version.mismatch.err=Couldn''t create SOAP message. Expecting Envelope in namespace {0}, but got {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_de.properties
deleted file mode 100644
index 6b3ac65e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_de.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soap.msg.create.err=SOAP-Nachricht konnte wegen folgender Ausnahme nicht erstellt werden: {0}
-soap.msg.factory.create.err=SOAP-Nachrichten-Factory konnte wegen folgender Ausnahme nicht erstellt werden: {0}
-soap.protocol.invalidFaultCode=Ung\u00FCltiger Fault-Code: {0}
-soap.factory.create.err=SOAP-Factory konnte wegen folgender Ausnahme nicht erstellt werden: {0}
-soap.fault.create.err=SOAP-Fault konnte wegen folgender Ausnahme nicht erstellt werden: {0}
-soap.version.mismatch.err=SOAP-Nachricht konnte nicht erstellt werden. Envelope wird in Namespace {0} erwartet, es wurde jedoch {1} ermittelt
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_es.properties
deleted file mode 100644
index 7a04dff4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_es.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soap.msg.create.err=No se ha podido crear el mensaje SOAP debido a la excepci\u00F3n {0}
-soap.msg.factory.create.err=No se ha podido crear la f\u00E1brica de mensajes SOAP debido a la excepci\u00F3n {0}
-soap.protocol.invalidFaultCode=C\u00F3digo de fallo no v\u00E1lido: {0}
-soap.factory.create.err=No se ha podido crear la f\u00E1brica SOAP debido a la excepci\u00F3n {0}
-soap.fault.create.err=No se ha podido crear el fallo SOAP debido a la excepci\u00F3n {0}
-soap.version.mismatch.err=No se ha podido crear el mensaje SOAP. Se esperaba Envelope en el espacio de nombres {0}, pero se ha obtenido {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_fr.properties
deleted file mode 100644
index 855b4760..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_fr.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soap.msg.create.err=Impossible de cr\u00E9er le message SOAP en raison de l''exception : {0}
-soap.msg.factory.create.err=Impossible de cr\u00E9er une fabrique de messages SOAP en raison de l''exception : {0}
-soap.protocol.invalidFaultCode=Code d''erreur non valide : {0}
-soap.factory.create.err=Impossible de cr\u00E9er une fabrique SOAP en raison de l''exception {0}
-soap.fault.create.err=Impossible de cr\u00E9er l''erreur SOAP en raison de l''exception {0}
-soap.version.mismatch.err=Impossible de cr\u00E9er le message SOAP. Attente de Envelope dans l''espace de noms {0}, mais {1} obtenu
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_it.properties
deleted file mode 100644
index 0d013e92..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_it.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soap.msg.create.err=Impossibile creare il messaggio SOAP a causa dell''eccezione: {0}
-soap.msg.factory.create.err=Impossibile creare il message factory SOAP a causa dell''eccezione: {0}
-soap.protocol.invalidFaultCode=Codice di errore non valido: {0}
-soap.factory.create.err=Impossibile creare il factory SOAP a causa dell''eccezione: {0}
-soap.fault.create.err=Impossibile creare l''errore SOAP a causa dell''eccezione: {0}
-soap.version.mismatch.err=Impossibile creare il messaggio SOAP. Prevista envelope nello spazio di nomi {0} ma trovato {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ja.properties
deleted file mode 100644
index 31bb7b32..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ja.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soap.msg.create.err=\u4F8B\u5916\u306B\u3088\u308A\u3001SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: {0}
-soap.msg.factory.create.err=\u4F8B\u5916\u306B\u3088\u308A\u3001SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D5\u30A1\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: {0}
-soap.protocol.invalidFaultCode=\u7121\u52B9\u306A\u30D5\u30A9\u30EB\u30C8\u30FB\u30B3\u30FC\u30C9: {0}
-soap.factory.create.err=\u4F8B\u5916\u306B\u3088\u308A\u3001SOAP\u30D5\u30A1\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: {0}
-soap.fault.create.err=\u4F8B\u5916\u306B\u3088\u308A\u3001SOAP\u30D5\u30A9\u30EB\u30C8\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: {0}
-soap.version.mismatch.err=SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9{0}\u306B\u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u304C\u5FC5\u8981\u3067\u3059\u304C\u3001{1}\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ko.properties
deleted file mode 100644
index dd82777c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ko.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soap.msg.create.err=\uC608\uC678 \uC0AC\uD56D\uC73C\uB85C \uC778\uD574 SOAP \uBA54\uC2DC\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: {0}
-soap.msg.factory.create.err=\uC608\uC678 \uC0AC\uD56D\uC73C\uB85C \uC778\uD574 SOAP \uBA54\uC2DC\uC9C0 \uD329\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: {0}
-soap.protocol.invalidFaultCode=\uBD80\uC801\uD569\uD55C \uACB0\uD568 \uCF54\uB4DC: {0}
-soap.factory.create.err=\uC608\uC678 \uC0AC\uD56D\uC73C\uB85C \uC778\uD574 SOAP \uD329\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: {0}
-soap.fault.create.err=\uC608\uC678 \uC0AC\uD56D\uC73C\uB85C \uC778\uD574 SOAP \uACB0\uD568\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: {0}
-soap.version.mismatch.err=SOAP \uBA54\uC2DC\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. {0} \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 Envelope\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC {1}\uC744(\uB97C) \uAC00\uC838\uC654\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_pt_BR.properties
deleted file mode 100644
index 81b29b5d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_pt_BR.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soap.msg.create.err=N\u00E3o foi poss\u00EDvel criar a mensagem SOAP em decorr\u00EAncia da exce\u00E7\u00E3o: {0}
-soap.msg.factory.create.err=N\u00E3o foi poss\u00EDvel criar a factory da mensagem SOAP em decorr\u00EAncia da exce\u00E7\u00E3o: {0}
-soap.protocol.invalidFaultCode=C\u00F3digo de falha inv\u00E1lido: {0}
-soap.factory.create.err=N\u00E3o foi poss\u00EDvel criar a factory de SOAP em decorr\u00EAncia da exce\u00E7\u00E3o: {0}
-soap.fault.create.err=N\u00E3o foi poss\u00EDvel criar a Falha de SOAP em decorr\u00EAncia da exce\u00E7\u00E3o: {0}
-soap.version.mismatch.err=N\u00E3o foi poss\u00EDvel criar a mensagem SOAP. Esperando Envelope no namespace {0}, mas obteve {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_CN.properties
deleted file mode 100644
index f12299f9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_CN.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soap.msg.create.err=\u7531\u4E8E\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF, \u65E0\u6CD5\u521B\u5EFA SOAP \u6D88\u606F: {0}
-soap.msg.factory.create.err=\u7531\u4E8E\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF, \u65E0\u6CD5\u521B\u5EFA SOAP \u6D88\u606F\u5DE5\u5382: {0}
-soap.protocol.invalidFaultCode=\u6545\u969C\u4EE3\u7801\u65E0\u6548: {0}
-soap.factory.create.err=\u7531\u4E8E\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF, \u65E0\u6CD5\u521B\u5EFA SOAP \u5DE5\u5382: {0}
-soap.fault.create.err=\u7531\u4E8E\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF, \u65E0\u6CD5\u521B\u5EFA SOAP \u6545\u969C: {0}
-soap.version.mismatch.err=\u65E0\u6CD5\u521B\u5EFA SOAP \u6D88\u606F\u3002\u5E94\u4E3A\u540D\u79F0\u7A7A\u95F4{0}\u4E2D\u7684\u4FE1\u5C01, \u4F46\u5F97\u5230\u7684\u662F{1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_TW.properties
deleted file mode 100644
index d111e271..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_TW.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-soap.msg.create.err=\u56E0\u70BA\u7570\u5E38\u72C0\u6CC1, \u7121\u6CD5\u5EFA\u7ACB SOAP \u8A0A\u606F: {0}
-soap.msg.factory.create.err=\u56E0\u70BA\u7570\u5E38\u72C0\u6CC1, \u7121\u6CD5\u5EFA\u7ACB SOAP \u8A0A\u606F\u8655\u7406\u7AD9: {0}
-soap.protocol.invalidFaultCode=\u7121\u6548\u7684\u932F\u8AA4\u4EE3\u78BC: {0}
-soap.factory.create.err=\u56E0\u70BA\u7570\u5E38\u72C0\u6CC1, \u7121\u6CD5\u5EFA\u7ACB SOAP \u8655\u7406\u7AD9: {0}
-soap.fault.create.err=\u56E0\u70BA\u7570\u5E38\u72C0\u6CC1, \u7121\u6CD5\u5EFA\u7ACB SOAP \u932F\u8AA4: {0}
-soap.version.mismatch.err=\u7121\u6CD5\u5EFA\u7ACB SOAP \u8A0A\u606F. \u9810\u671F\u5728\u547D\u540D\u7A7A\u9593 {0} \u4E2D\u70BA Envelope, \u4F46\u6536\u5230\u7684\u662F {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming.properties
deleted file mode 100644
index 172554cb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming.properties
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-streaming.ioException=XML parsing error: {0}
-streaming.parseException=XML parsing error: {0}
-
-xmlreader.illegalStateEncountered=XML reader internal error: illegal state ({0})
-xmlreader.unexpectedCharacterContent=XML reader error: unexpected character content: \"{0}\"
-xmlreader.ioException=XML reader error: {0}
-xmlreader.parseException=XML parsing error: {0}
-xmlreader.nestedError=XML reader error: {0}
-
-xmlwriter.noPrefixForURI=XML writer error: no prefix for URI: \"{0}\"
-xmlwriter.ioException=XML writer error: {0}
-xmlwriter.nestedError=XML writer error: {0}
-xmlreader.unexpectedState=unexpected XML reader state. expected: {0} but found: {1}
-xmlreader.unexpectedState.message=unexpected XML reader state. expected: {0} but found: {1}. {2}
-xmlreader.unexpectedState.tag=unexpected XML tag. expected: {0} but found: {1}
-
-xmlrecorder.recording.ended=no more recorded elements available
-
-stax.cantCreate=Unable to create StAX reader or writer
-staxreader.xmlstreamexception=XML stream reader exception: {0}
-
-fastinfoset.decodingNotAccepted=Fast Infoset decoding is not accepted
-fastinfoset.noImplementation=Unable to locate compatible implementation of Fast Infoset in classpath
-
-sourcereader.invalidSource=Unable to create reader from source \"{0}\"
-
-woodstox.cant.load=Unable to load Woodstox class {0}
-
-invalid.property.value.integer=Ignoring system property \"{0}\" as value \"{1}\" is invalid, property value must be a valid integer. Using default value \"{2}\".
-invalid.property.value.long=Ignoring system property \"{0}\" as value \"{1}\" is invalid, property value must be a valid long. Using default value \"{2}\".
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_de.properties
deleted file mode 100644
index 8ac79fe6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_de.properties
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-streaming.ioException=Fehler beim XML-Parsen: {0}
-streaming.parseException=Fehler beim XML-Parsen: {0}
-
-xmlreader.illegalStateEncountered=Interner Fehler bei XML-Reader: Unzul\u00E4ssiger Status ({0})
-xmlreader.unexpectedCharacterContent=Fehler bei XML-Reader: Unerwarteter Zeicheninhalt: \"{0}\"
-xmlreader.ioException=Fehler bei XML-Reader: {0}
-xmlreader.parseException=Fehler beim XML-Parsen: {0}
-xmlreader.nestedError=Fehler bei XML-Reader: {0}
-
-xmlwriter.noPrefixForURI=Fehler bei XML-Writer: Kein Pr\u00E4fix f\u00FCr URI: \"{0}\"
-xmlwriter.ioException=Fehler bei XML-Writer: {0}
-xmlwriter.nestedError=Fehler bei XML-Writer: {0}
-xmlreader.unexpectedState=Unerwarteter XML-Reader-Status. Erwartet: {0}, gefunden: {1}
-xmlreader.unexpectedState.message=Unerwarteter XML-Reader-Status. Erwartet: {0}, gefunden: {1}. {2}
-xmlreader.unexpectedState.tag=Unerwartetes Tag. Erwartet: {0}, gefunden: {1}
-
-xmlrecorder.recording.ended=keine weiteren aufgezeichneten Elemente verf\u00FCgbar
-
-stax.cantCreate=StAX-Reader oder -Writer kann nicht erstellt werden
-staxreader.xmlstreamexception=Ausnahme bei XML-Stream Reader: {0}
-
-fastinfoset.decodingNotAccepted=Fast Infoset-Decodierung wird nicht akzeptiert
-fastinfoset.noImplementation=Kompatible Implementierung von Fast Infoset kann in Classpath nicht gefunden werden
-
-sourcereader.invalidSource=Reader kann nicht aus Quelle \"{0}\" erstellt werden
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_es.properties
deleted file mode 100644
index 2345978d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_es.properties
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-streaming.ioException=error de an\u00E1lisis XML: {0}
-streaming.parseException=error de an\u00E1lisis XML: {0}
-
-xmlreader.illegalStateEncountered=error interno del lector XML: Estado no v\u00E1lido ({0})
-xmlreader.unexpectedCharacterContent=error del lector XML: Contenido de caracteres inesperado: \"{0}\"
-xmlreader.ioException=error del lector XML: {0}
-xmlreader.parseException=error de an\u00E1lisis XML: {0}
-xmlreader.nestedError=error del lector XML: {0}
-
-xmlwriter.noPrefixForURI=error del escritor XML: No hay ning\u00FAn prefijo para el URI: \"{0}\"
-xmlwriter.ioException=error del escritor XML: {0}
-xmlwriter.nestedError=error del escritor XML: {0}
-xmlreader.unexpectedState=estado del lector XML inesperado. Se esperaba: {0}, pero se ha encontrado: {1}
-xmlreader.unexpectedState.message=estado del lector de XML inesperado. Se esperaba: {0}, pero se ha encontrado: {1}. {2}
-xmlreader.unexpectedState.tag=etiqueta XML inesperada. Se esperaba: {0}, pero se ha encontrado: {1}
-
-xmlrecorder.recording.ended=no hay disponibles m\u00E1s elementos registrados
-
-stax.cantCreate=No se ha podido crear el lector ni el escritor de StAX
-staxreader.xmlstreamexception=Excepci\u00F3n del lector de flujo XML: {0}
-
-fastinfoset.decodingNotAccepted=No se acepta la descodificaci\u00F3n del juego de informaci\u00F3n r\u00E1pido
-fastinfoset.noImplementation=No se ha encontrado la implantaci\u00F3n compatible del juego de informaci\u00F3n r\u00E1pido en la classpath
-
-sourcereader.invalidSource=No se ha podido crear el lector desde el origen \\"{0}\\"
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_fr.properties
deleted file mode 100644
index b0c02541..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_fr.properties
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-streaming.ioException=erreur d''analyse XML : {0}
-streaming.parseException=erreur d''analyse XML : {0}
-
-xmlreader.illegalStateEncountered=erreur interne du processus de lecture XML : \u00E9tat ({0}) non autoris\u00E9
-xmlreader.unexpectedCharacterContent=erreur interne du processus de lecture XML : contenu de caract\u00E8re inattendu : \"{0}\"
-xmlreader.ioException=erreur du processus de lecture XML : {0}
-xmlreader.parseException=erreur d''analyse XML : {0}
-xmlreader.nestedError=erreur du processus de lecture XML : {0}
-
-xmlwriter.noPrefixForURI=erreur du processus d''\u00E9criture XML : aucun pr\u00E9fixe pour l''URI : \"{0}\"
-xmlwriter.ioException=erreur du processus d''\u00E9criture XML : {0}
-xmlwriter.nestedError=erreur du processus d''\u00E9criture XML : {0}
-xmlreader.unexpectedState=\u00E9tat de processus de lecture XML inattendu ; attendu : {0}, obtenu : {1}
-xmlreader.unexpectedState.message=\u00E9tat de processus de lecture XML inattendu ; attendu : {0}, obtenu : {1}. {2}
-xmlreader.unexpectedState.tag=balise XML inattendue ; attendue : {0}, obtenue : {1}
-
-xmlrecorder.recording.ended=plus d'\u00E9l\u00E9ment enregistr\u00E9 disponible
-
-stax.cantCreate=Impossible de cr\u00E9er le processus de lecture ou le processus d'\u00E9criture StAX
-staxreader.xmlstreamexception=Exception du processus de lecture du flux XML : {0}
-
-fastinfoset.decodingNotAccepted=Le d\u00E9codage Fast Infoset n'est pas accept\u00E9
-fastinfoset.noImplementation=Impossible de localiser l'impl\u00E9mentation compatible de Fast Infoset dans le classpath
-
-sourcereader.invalidSource=Impossible de cr\u00E9er un processus de lecture \u00E0 partir de la source \"{0}\"
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_it.properties
deleted file mode 100644
index c3179d8e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_it.properties
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-streaming.ioException=errore di analisi XML: {0}
-streaming.parseException=errore di analisi XML: {0}
-
-xmlreader.illegalStateEncountered=errore interno del processo di lettura XML: stato non valido ({0})
-xmlreader.unexpectedCharacterContent=errore del processo di lettura XML: contenuto di caratteri imprevisto: \"{0}\"
-xmlreader.ioException=errore del processo di lettura XML: {0}
-xmlreader.parseException=errore di analisi XML: {0}
-xmlreader.nestedError=errore del processo di lettura XML: {0}
-
-xmlwriter.noPrefixForURI=errore del processo di scrittura XML: nessun prefisso per l''URI: \"{0}\"
-xmlwriter.ioException=errore del processo di scrittura XML: {0}
-xmlwriter.nestedError=errore del processo di scrittura XML: {0}
-xmlreader.unexpectedState=stato del processo di lettura XML imprevisto. Previsto: {0}, trovato: {1}
-xmlreader.unexpectedState.message=stato del processo di lettura XML imprevisto. Previsto: {0}, trovato: {1}. {2}
-xmlreader.unexpectedState.tag=tag XML imprevista. Prevista: {0}, trovata: {1}
-
-xmlrecorder.recording.ended=nessun altro elemento registrato disponibile
-
-stax.cantCreate=Impossibile creare il processo di lettura o di scrittura StAX
-staxreader.xmlstreamexception=eccezione del processo di lettura del flusso XML: {0}
-
-fastinfoset.decodingNotAccepted=Decodifica Fast Infoset non accettata
-fastinfoset.noImplementation=Impossibile individuare l'implementazione compatibile di Fast Infoset nel classpath
-
-sourcereader.invalidSource=Impossibile creare il processo di lettura dall''origine \"{0}\"
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ja.properties
deleted file mode 100644
index 9afd3276..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ja.properties
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-streaming.ioException=XML\u89E3\u6790\u30A8\u30E9\u30FC: {0}
-streaming.parseException=XML\u89E3\u6790\u30A8\u30E9\u30FC: {0}
-
-xmlreader.illegalStateEncountered=XML\u30EA\u30FC\u30C0\u30FC\u5185\u90E8\u30A8\u30E9\u30FC: \u4E0D\u6B63\u306A\u72B6\u614B({0})
-xmlreader.unexpectedCharacterContent=XML\u30EA\u30FC\u30C0\u30FC\u30FB\u30A8\u30E9\u30FC: \u4E88\u671F\u3057\u3066\u3044\u306A\u3044\u6587\u5B57\u30B3\u30F3\u30C6\u30F3\u30C4: \"{0}\"
-xmlreader.ioException=XML\u30EA\u30FC\u30C0\u30FC\u30FB\u30A8\u30E9\u30FC: {0}
-xmlreader.parseException=XML\u89E3\u6790\u30A8\u30E9\u30FC: {0}
-xmlreader.nestedError=XML\u30EA\u30FC\u30C0\u30FC\u30FB\u30A8\u30E9\u30FC: {0}
-
-xmlwriter.noPrefixForURI=XML\u30E9\u30A4\u30BF\u30FC\u30FB\u30A8\u30E9\u30FC: URI: \"{0}\"\u306E\u63A5\u982D\u8F9E\u304C\u3042\u308A\u307E\u305B\u3093
-xmlwriter.ioException=XML\u30E9\u30A4\u30BF\u30FC\u30FB\u30A8\u30E9\u30FC: {0}
-xmlwriter.nestedError=XML\u30E9\u30A4\u30BF\u30FC\u30FB\u30A8\u30E9\u30FC: {0}
-xmlreader.unexpectedState=\u4E88\u671F\u3057\u3066\u3044\u306A\u3044XML\u30EA\u30FC\u30C0\u30FC\u306E\u72B6\u614B\u3002{0}\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001{1}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-xmlreader.unexpectedState.message=\u4E88\u671F\u3057\u306A\u3044XML\u30EA\u30FC\u30C0\u30FC\u306E\u72B6\u614B\u3067\u3059\u3002{0}\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001{1}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002{2}
-xmlreader.unexpectedState.tag=\u4E88\u671F\u3057\u306A\u3044XML\u30BF\u30B0\u3067\u3059\u3002{0}\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001{1}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-
-xmlrecorder.recording.ended=\u8A18\u9332\u3055\u308C\u305F\u8981\u7D20\u306F\u3053\u308C\u4EE5\u4E0A\u3042\u308A\u307E\u305B\u3093
-
-stax.cantCreate=StAX\u30EA\u30FC\u30C0\u30FC\u307E\u305F\u306F\u30E9\u30A4\u30BF\u30FC\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-staxreader.xmlstreamexception=XML\u30B9\u30C8\u30EA\u30FC\u30E0\u30FB\u30EA\u30FC\u30C0\u30FC\u306E\u4F8B\u5916: {0}
-
-fastinfoset.decodingNotAccepted=Fast Infoset\u306B\u3088\u308B\u30C7\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u306F\u53D7\u3051\u5165\u308C\u3089\u308C\u307E\u305B\u3093
-fastinfoset.noImplementation=\u30AF\u30E9\u30B9\u30D1\u30B9\u306B\u3001Fast Infoset\u306E\u4E92\u63DB\u6027\u306E\u3042\u308B\u5B9F\u88C5\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-
-sourcereader.invalidSource=\u30BD\u30FC\u30B9\"{0}\"\u304B\u3089\u30EA\u30FC\u30C0\u30FC\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ko.properties
deleted file mode 100644
index 982706b6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ko.properties
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-streaming.ioException=XML \uAD6C\uBB38 \uBD84\uC11D \uC624\uB958: {0}
-streaming.parseException=XML \uAD6C\uBB38 \uBD84\uC11D \uC624\uB958: {0}
-
-xmlreader.illegalStateEncountered=XML \uC77D\uAE30 \uC7A5\uCE58 \uB0B4\uBD80 \uC624\uB958: \uC798\uBABB\uB41C \uC0C1\uD0DC({0})
-xmlreader.unexpectedCharacterContent=XML \uC77D\uAE30 \uC7A5\uCE58 \uC624\uB958: \uC608\uC0C1\uCE58 \uC54A\uC740 \uBB38\uC790 \uCF58\uD150\uCE20: \"{0}\"
-xmlreader.ioException=XML \uC77D\uAE30 \uC7A5\uCE58 \uC624\uB958: {0}
-xmlreader.parseException=XML \uAD6C\uBB38 \uBD84\uC11D \uC624\uB958: {0}
-xmlreader.nestedError=XML \uC77D\uAE30 \uC7A5\uCE58 \uC624\uB958: {0}
-
-xmlwriter.noPrefixForURI=XML \uC4F0\uAE30 \uC7A5\uCE58 \uC624\uB958: URI\uC5D0 \uB300\uD55C \uC811\uB450\uC5B4 \uC5C6\uC74C: \"{0}\"
-xmlwriter.ioException=XML \uC4F0\uAE30 \uC7A5\uCE58 \uC624\uB958: {0}
-xmlwriter.nestedError=XML \uC4F0\uAE30 \uC7A5\uCE58 \uC624\uB958: {0}
-xmlreader.unexpectedState=\uC608\uC0C1\uCE58 \uC54A\uC740 XML \uC77D\uAE30 \uC7A5\uCE58 \uC0C1\uD0DC\uC785\uB2C8\uB2E4. {0}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {1}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-xmlreader.unexpectedState.message=\uC608\uC0C1\uCE58 \uC54A\uC740 XML \uC77D\uAE30 \uC7A5\uCE58 \uC0C1\uD0DC\uC785\uB2C8\uB2E4. {0}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {1}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. {2}
-xmlreader.unexpectedState.tag=\uC608\uC0C1\uCE58 \uC54A\uC740 XML \uD0DC\uADF8\uC785\uB2C8\uB2E4. {0}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {1}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-xmlrecorder.recording.ended=\uB354 \uC774\uC0C1 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uAE30\uB85D\uB41C \uC694\uC18C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-stax.cantCreate=StAX \uC77D\uAE30 \uC7A5\uCE58 \uB610\uB294 \uC4F0\uAE30 \uC7A5\uCE58\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-staxreader.xmlstreamexception=XML \uC2A4\uD2B8\uB9BC \uC77D\uAE30 \uC7A5\uCE58 \uC608\uC678 \uC0AC\uD56D: {0}
-
-fastinfoset.decodingNotAccepted=\uBE60\uB978 \uC815\uBCF4 \uC9D1\uD569 \uB514\uCF54\uB529\uC740 \uC2B9\uC778\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-fastinfoset.noImplementation=\uD074\uB798\uC2A4 \uACBD\uB85C\uC5D0\uC11C \uBE60\uB978 \uC815\uBCF4 \uC9D1\uD569\uC758 \uD638\uD658\uB418\uB294 \uAD6C\uD604\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-sourcereader.invalidSource=\"{0}\" \uC18C\uC2A4\uC5D0\uC11C \uC77D\uAE30 \uC7A5\uCE58\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_pt_BR.properties
deleted file mode 100644
index 823fa73f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_pt_BR.properties
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-streaming.ioException=erro de parse XML: {0}
-streaming.parseException=erro de parse XML: {0}
-
-xmlreader.illegalStateEncountered=erro interno do leitor XML: estado inv\u00E1lido ({0})
-xmlreader.unexpectedCharacterContent=erro do leitor XML: conte\u00FAdo do caractere inesperado: \"{0}\"
-xmlreader.ioException=erro do leitor XML: {0}
-xmlreader.parseException=erro de parse XML: {0}
-xmlreader.nestedError=erro do leitor XML: {0}
-
-xmlwriter.noPrefixForURI=erro do gravador XML: nenhum prefixo para o URI: \"{0}\"
-xmlwriter.ioException=erro do gravador XML: {0}
-xmlwriter.nestedError=erro do gravador XML: {0}
-xmlreader.unexpectedState=estado do leitor XML inesperado: esperava {0} mas encontrou: {1}
-xmlreader.unexpectedState.message=estado do leitor XML inesperado: esperava {0}, mas encontrou: {1}. {2}
-xmlreader.unexpectedState.tag=tag XML inesperada: esperava {0}, mas encontrou: {1}
-
-xmlrecorder.recording.ended=n\u00E3o h\u00E1 mais elementos gravados dispon\u00EDveis
-
-stax.cantCreate=N\u00E3o \u00E9 poss\u00EDvel criar o leitor ou gravador StAX
-staxreader.xmlstreamexception=exce\u00E7\u00E3o do leitor de fluxo XML: {0}
-
-fastinfoset.decodingNotAccepted=Decodifica\u00E7\u00E3o do Conjunto de informa\u00E7\u00F5es r\u00E1pidas n\u00E3o aceita
-fastinfoset.noImplementation=N\u00E3o \u00E9 poss\u00EDvel localizar a implementa\u00E7\u00E3o compat\u00EDvel do Conjunto de informa\u00E7\u00F5es R\u00E1pidas no classpath
-
-sourcereader.invalidSource=N\u00E3o \u00E9 poss\u00EDvel criar o leitor de origem \"{0}\"
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_CN.properties
deleted file mode 100644
index a5578c55..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_CN.properties
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-streaming.ioException=XML \u89E3\u6790\u9519\u8BEF: {0}
-streaming.parseException=XML \u89E3\u6790\u9519\u8BEF: {0}
-
-xmlreader.illegalStateEncountered=XML \u8BFB\u8FDB\u7A0B\u5185\u90E8\u9519\u8BEF: \u975E\u6CD5\u7684\u72B6\u6001 ({0})
-xmlreader.unexpectedCharacterContent=XML \u8BFB\u8FDB\u7A0B\u9519\u8BEF: \u610F\u5916\u7684\u5B57\u7B26\u5185\u5BB9: \"{0}\"
-xmlreader.ioException=XML \u8BFB\u8FDB\u7A0B\u9519\u8BEF: {0}
-xmlreader.parseException=XML \u89E3\u6790\u9519\u8BEF: {0}
-xmlreader.nestedError=XML \u8BFB\u8FDB\u7A0B\u9519\u8BEF: {0}
-
-xmlwriter.noPrefixForURI=XML \u5199\u8FDB\u7A0B\u9519\u8BEF: URI \u6CA1\u6709\u524D\u7F00: \"{0}\"
-xmlwriter.ioException=XML \u5199\u8FDB\u7A0B\u9519\u8BEF: {0}
-xmlwriter.nestedError=XML \u5199\u8FDB\u7A0B\u9519\u8BEF: {0}
-xmlreader.unexpectedState=\u610F\u5916\u7684 XML \u8BFB\u8FDB\u7A0B\u72B6\u6001\u3002\u5E94\u4E3A: {0}, \u4F46\u627E\u5230\u7684\u662F: {1}
-xmlreader.unexpectedState.message=\u610F\u5916\u7684 XML \u8BFB\u8FDB\u7A0B\u72B6\u6001\u3002\u5E94\u4E3A: {0}, \u4F46\u627E\u5230\u7684\u662F: {1}\u3002{2}
-xmlreader.unexpectedState.tag=\u610F\u5916\u7684 XML \u6807\u8BB0\u3002\u5E94\u4E3A: {0}, \u4F46\u627E\u5230\u7684\u662F: {1}
-
-xmlrecorder.recording.ended=\u6CA1\u6709\u66F4\u591A\u7684\u8BB0\u5F55\u5143\u7D20\u53EF\u7528
-
-stax.cantCreate=\u65E0\u6CD5\u521B\u5EFA StAX \u8BFB\u8FDB\u7A0B\u6216\u5199\u8FDB\u7A0B
-staxreader.xmlstreamexception=XML \u6D41\u8BFB\u8FDB\u7A0B\u5F02\u5E38\u9519\u8BEF: {0}
-
-fastinfoset.decodingNotAccepted=\u4E0D\u63A5\u53D7\u5FEB\u901F\u4FE1\u606F\u96C6\u89E3\u7801
-fastinfoset.noImplementation=\u5728\u7C7B\u8DEF\u5F84\u4E2D\u627E\u4E0D\u5230\u5FEB\u901F\u4FE1\u606F\u96C6\u7684\u517C\u5BB9\u5B9E\u73B0
-
-sourcereader.invalidSource=\u65E0\u6CD5\u4ECE\u6E90 \"{0}\" \u521B\u5EFA\u8BFB\u8FDB\u7A0B
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_TW.properties
deleted file mode 100644
index 6702c2be..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_TW.properties
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-streaming.ioException=XML \u5256\u6790\u932F\u8AA4: {0}
-streaming.parseException=XML \u5256\u6790\u932F\u8AA4: {0}
-
-xmlreader.illegalStateEncountered=XML \u8B80\u53D6\u5668\u5167\u90E8\u932F\u8AA4: \u7121\u6548\u7684\u72C0\u614B ({0})
-xmlreader.unexpectedCharacterContent=XML \u8B80\u53D6\u5668\u932F\u8AA4: \u672A\u9810\u671F\u7684\u5B57\u5143\u5167\u5BB9: \"{0}\"
-xmlreader.ioException=XML \u8B80\u53D6\u5668\u932F\u8AA4: {0}
-xmlreader.parseException=XML \u5256\u6790\u932F\u8AA4: {0}
-xmlreader.nestedError=XML \u8B80\u53D6\u5668\u932F\u8AA4: {0}
-
-xmlwriter.noPrefixForURI=XML \u5BEB\u5165\u5668\u932F\u8AA4: URI \"{0}\" \u6C92\u6709\u524D\u7F6E\u78BC
-xmlwriter.ioException=XML \u5BEB\u5165\u5668\u932F\u8AA4: {0}
-xmlwriter.nestedError=XML \u5BEB\u5165\u5668\u932F\u8AA4: {0}
-xmlreader.unexpectedState=\u672A\u9810\u671F\u7684 XML \u8B80\u53D6\u5668\u72C0\u614B. \u9810\u671F: {0} \u4F46\u627E\u5230: {1}
-xmlreader.unexpectedState.message=\u672A\u9810\u671F\u7684 XML \u8B80\u53D6\u5668\u72C0\u614B. \u9810\u671F\u70BA: {0} \u4F46\u627E\u5230: {1}. {2}
-xmlreader.unexpectedState.tag=\u672A\u9810\u671F\u7684 XML \u6A19\u8A18. \u9810\u671F\u70BA: {0} \u4F46\u627E\u5230: {1}
-
-xmlrecorder.recording.ended=\u6C92\u6709\u66F4\u591A\u53EF\u7528\u7684\u8A18\u9304\u5143\u7D20
-
-stax.cantCreate=\u7121\u6CD5\u5EFA\u7ACB StAX \u8B80\u53D6\u5668\u6216\u5BEB\u5165\u5668
-staxreader.xmlstreamexception=XML \u4E32\u6D41\u8B80\u53D6\u5668\u7570\u5E38\u72C0\u6CC1: {0}
-
-fastinfoset.decodingNotAccepted=\u4E0D\u63A5\u53D7 Fast Infoset \u89E3\u78BC
-fastinfoset.noImplementation=\u5728\u985E\u5225\u8DEF\u5F91\u4E2D\u627E\u4E0D\u5230\u76F8\u5BB9\u7684 Fast Infoset \u5BE6\u884C
-
-sourcereader.invalidSource=\u7121\u6CD5\u5F9E\u4F86\u6E90 \"{0}\" \u5EFA\u7ACB\u8B80\u53D6\u5668
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/tubelineassembly.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/tubelineassembly.properties
deleted file mode 100644
index 8a0ca923..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/tubelineassembly.properties
+++ /dev/null
@@ -1,67 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# MASM00XX
-# TODO: parametrize config file (jaxws-tubes-default.xml) name!!!
-MASM0001_DEFAULT_CFG_FILE_NOT_FOUND = MASM0001: Default configuration file [ {0} ] was not found
-
-MASM0002_DEFAULT_CFG_FILE_LOCATED = MASM0002: Default [ {0} ] configuration file located at [ {1} ]
-
-MASM0003_DEFAULT_CFG_FILE_NOT_LOADED = MASM0003: Default [ {0} ] configuration file was not loaded
-
-MASM0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE = MASM0004: No <tubelines> section found in the default [ {0} ] configuration file
-
-MASM0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE = MASM0005: No default tubeline is defined in the default [ {0} ] configuration file
-
-MASM0006_APP_CFG_FILE_LOCATED = MASM0006: Application metro.xml configuration file located at [ {0} ]
-
-MASM0007_APP_CFG_FILE_NOT_FOUND = MASM0007: No application metro.xml configuration file found.
-
-MASM0008_INVALID_URI_REFERENCE = MASM0008: Invalid URI reference [ {0} ]
-
-MASM0009_CANNOT_FORM_VALID_URL = MASM0009: Cannot form a valid URL from the resource name "{0}". For more details see the nested exception.
-
-MASM0010_ERROR_READING_CFG_FILE_FROM_LOCATION = MASM0010: Unable to unmarshall metro config file from location [ {0} ]
-
-MASM0011_LOADING_RESOURCE = MASM0011: Trying to load [ {0} ] via parent resouce loader [ {1} ]
-
-MASM0012_LOADING_VIA_SERVLET_CONTEXT = MASM0012: Trying to load [ {0} ] via servlet context [ {1} ]
-
-MASM0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD = MASM0013: Unable to invoke {0} method on servlet context instance
-
-MASM0014_UNABLE_TO_LOAD_CLASS = MASM0014: Unable to load [ {0} ] class
-
-MASM0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE = MASM0015: Class [ {0} ] does not implement [ {1} ] interface
-
-MASM0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY = MASM0016: Unable to instantiate Tube factory class [ {0} ]
-
-MASM0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS = MASM0017: Unable to load Tube factory class [ {0} ]
-
-# {0} - system property name (e.g.: "com.sun.metro.soap.dump"/"com.sun.metro.soap.dump.level"), {1} - boolean value (true/false) / string value "SEVERE"/"WARNING"/"INFO"/"CONFIG"/"FINE"/"FINER"/"FINEST"
-MASM0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE = MASM0018: Message logging {0} system property detected to be set to value {1}
-
-MASM0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE = MASM0019: Illegal logging level value "{1}" stored in the {0} message logging system property. Using default logging level.
-
-MASM0020_ERROR_CREATING_URI_FROM_GENERATED_STRING = MASM0020: Unable to create a new URI instance for generated endpoint URI string [ {0} ]
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util.properties
deleted file mode 100644
index 58729b9f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-util.handler.no.webservice.annotation="A WebService annotation is not present on class: {0}"
-util.handler.endpoint.interface.no.webservice="The Endpoint Interface: {0} does not have WebService Annotation"
-util.handler.class.not.found="Class: {0} could not be found"
-util.handler.cannot.combine.soapmessagehandlers=You must use HanlderChain annotation, not SOAPMessageHandlers
-util.parser.wrong.element=found element \"{1}\", expected \"{2}\" in handler chain configuration (line {0})
-util.failed.to.find.handlerchain.file=Could not find handler chain file {1} for class {0}
-util.failed.to.parse.handlerchain.file=Could not parse handler chain file {1} for class {0}
-# Concatenated with qname/exception message (qname + util.location, exception message).
-util.location=at line {0} of {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_de.properties
deleted file mode 100644
index fecb833a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_de.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-util.handler.no.webservice.annotation=Eine WebService-Annotation ist in Klasse nicht vorhanden: {0}
-util.handler.endpoint.interface.no.webservice="Die End Point-Schnittstelle: {0} hat keine WebService-Annotation"
-util.handler.class.not.found="Klasse: {0} konnte nicht gefunden werden"
-util.handler.cannot.combine.soapmessagehandlers=Sie m\u00FCssen die HandlerChain-Annotation verwenden und nicht SOAPMessageHandlers
-util.parser.wrong.element=Element \\"{1}\\" ermittelt, \\"{2}\\" in Konfiguration der HandlerChain erwartet (Zeile {0})
-util.failed.to.find.handlerchain.file=HandlerChain-Datei {1} f\u00FCr Klasse {0} nicht gefunden
-util.failed.to.parse.handlerchain.file=HandlerChain-Datei {1} f\u00FCr Klasse {0} konnte nicht geparst werden
-# Concatenated with qname/exception message (qname + util.location, exception message).
-util.location=\ in Zeile {0} von {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_es.properties
deleted file mode 100644
index f7267016..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_es.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-util.handler.no.webservice.annotation="No existe una anotaci\u00F3n de WebService en la clase: {0}"
-util.handler.endpoint.interface.no.webservice="La interfaz de punto final: {0} no tiene una anotaci\u00F3n de WebService"
-util.handler.class.not.found="No se ha encontrado la clase: {0}"
-util.handler.cannot.combine.soapmessagehandlers=Debe utilizar la anotaci\u00F3n HandlerChain, no SOAPMessageHandlers
-util.parser.wrong.element=se ha encontrado el elemento \"{1}\", pero se esperaba \"{2}\" en la configuraci\u00F3n de la cadena del manejador (l\u00EDnea {0})
-util.failed.to.find.handlerchain.file=No se ha encontrado el archivo de la cadena del manejador {1} para la clase {0}
-util.failed.to.parse.handlerchain.file=No se ha podido analizar el archivo de la cadena del manejador {1} para la clase {0}
-# Concatenated with qname/exception message (qname + util.location, exception message).
-util.location=en la l\u00EDnea {0} de {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_fr.properties
deleted file mode 100644
index 3aba8841..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_fr.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-util.handler.no.webservice.annotation="Aucune annotation de service Web ne figure sur la classe {0}"
-util.handler.endpoint.interface.no.webservice="L''interface d''adresse {0} ne comporte aucune annotation WebService"
-util.handler.class.not.found="La classe {0} est introuvable"
-util.handler.cannot.combine.soapmessagehandlers=Vous devez utiliser l'annotation HanlderChain et non SOAPMessageHandlers
-util.parser.wrong.element=\u00E9l\u00E9ment \"{1}\" trouv\u00E9, \"{2}\" attendu dans la configuration de cha\u00EEne de gestionnaires (ligne {0})
-util.failed.to.find.handlerchain.file=Fichier de cha\u00EEne de gestionnaires {1} introuvable pour la classe {0}
-util.failed.to.parse.handlerchain.file=Impossible d''analyser le fichier de cha\u00EEne de gestionnaires {1} pour la classe {0}
-# Concatenated with qname/exception message (qname + util.location, exception message).
-util.location=\u00E0 la ligne {0} sur {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_it.properties
deleted file mode 100644
index a917984b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_it.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-util.handler.no.webservice.annotation="Annotazione WebService non presente sulla classe: {0}"
-util.handler.endpoint.interface.no.webservice="L''interfaccia Endpoint: {0} non dispone dell''annotazione WebService"
-util.handler.class.not.found="Impossibile trovare la classe: {0}"
-util.handler.cannot.combine.soapmessagehandlers=\u00C8 necessario usare l'annotazione HandlerChain, non SOAPMessageHandlers
-util.parser.wrong.element=trovato elemento \"{1}\", previsto \"{2}\", nella configurazione della catena di handler (riga {0})
-util.failed.to.find.handlerchain.file=Impossibile trovare il file della catena di handler {1} per la classe {0}
-util.failed.to.parse.handlerchain.file=Impossibile analizzare il file della catena di handler {1} per la classe {0}
-# Concatenated with qname/exception message (qname + util.location, exception message).
-util.location=alla riga {0} di {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ja.properties
deleted file mode 100644
index 5c9fb8c7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ja.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-util.handler.no.webservice.annotation="WebService\u6CE8\u91C8\u304C\u30AF\u30E9\u30B9: {0}\u306B\u5B58\u5728\u3057\u307E\u305B\u3093"
-util.handler.endpoint.interface.no.webservice="\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9: {0}\u306BWebService\u6CE8\u91C8\u304C\u3042\u308A\u307E\u305B\u3093"
-util.handler.class.not.found="\u30AF\u30E9\u30B9: {0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F"
-util.handler.cannot.combine.soapmessagehandlers=SOAPMessageHandlers\u3067\u306F\u306A\u304FHanlderChain\u6CE8\u91C8\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-util.parser.wrong.element=\u30CF\u30F3\u30C9\u30E9\u30FB\u30C1\u30A7\u30FC\u30F3\u69CB\u6210(\u884C{0})\u306B\u8981\u7D20\"{1}\"\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u304C\u3001\"{2}\"\u304C\u4E88\u671F\u3055\u308C\u307E\u3059
-util.failed.to.find.handlerchain.file=\u30AF\u30E9\u30B9{0}\u306E\u30CF\u30F3\u30C9\u30E9\u30FB\u30C1\u30A7\u30FC\u30F3\u30FB\u30D5\u30A1\u30A4\u30EB{1}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F
-util.failed.to.parse.handlerchain.file=\u30AF\u30E9\u30B9{0}\u306E\u30CF\u30F3\u30C9\u30E9\u30FB\u30C1\u30A7\u30FC\u30F3\u30FB\u30D5\u30A1\u30A4\u30EB{1}\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
-# Concatenated with qname/exception message (qname + util.location, exception message).
-util.location={1}\u306E\u884C{0}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ko.properties
deleted file mode 100644
index 3c4634ab..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ko.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-util.handler.no.webservice.annotation="WebService \uC8FC\uC11D\uC774 \uD074\uB798\uC2A4\uC5D0 \uC5C6\uC74C: {0}"
-util.handler.endpoint.interface.no.webservice="\uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4 {0}\uC5D0 WebService \uC8FC\uC11D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."
-util.handler.class.not.found="{0} \uD074\uB798\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."
-util.handler.cannot.combine.soapmessagehandlers=SOAPMessageHandlers\uAC00 \uC544\uB2CC HanlderChain \uC8FC\uC11D\uC744 \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4.
-util.parser.wrong.element=\"{1}\" \uC694\uC18C\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC9C0\uB9CC \uCC98\uB9AC\uAE30 \uCCB4\uC778 \uAD6C\uC131({0}\uD589)\uC5D0 \"{2}\"\uC774(\uAC00) \uD544\uC694\uD569\uB2C8\uB2E4.
-util.failed.to.find.handlerchain.file={0} \uD074\uB798\uC2A4\uC5D0 \uB300\uD55C \uCC98\uB9AC\uAE30 \uCCB4\uC778 \uD30C\uC77C {1}\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-util.failed.to.parse.handlerchain.file={0} \uD074\uB798\uC2A4\uC5D0 \uB300\uD55C \uCC98\uB9AC\uAE30 \uCCB4\uC778 \uD30C\uC77C {1}\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-# Concatenated with qname/exception message (qname + util.location, exception message).
-util.location={1}\uC758 {0}\uD589
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_pt_BR.properties
deleted file mode 100644
index fbaf5be6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_pt_BR.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-util.handler.no.webservice.annotation="Uma anota\u00E7\u00E3o do WebService n\u00E3o est\u00E1 presente na classe: {0}"
-util.handler.endpoint.interface.no.webservice="A Interface do Ponto Final: {0} n\u00E3o tem Anota\u00E7\u00E3o do WebService"
-util.handler.class.not.found="N\u00E3o foi poss\u00EDvel encontrar a Classe: {0}"
-util.handler.cannot.combine.soapmessagehandlers=Voc\u00EA de e usar a anota\u00E7\u00E3o HanlderChain, n\u00E3o a SOAPMessageHandlers
-util.parser.wrong.element=elemento encontrado \\"{1}\\", esperava \\"{2}\\" na configura\u00E7\u00E3o da cadeia de handler (linha {0})
-util.failed.to.find.handlerchain.file=N\u00E3o foi poss\u00EDvel localizar o arquivo da cadeia de handler {1} para a classe {0}
-util.failed.to.parse.handlerchain.file=N\u00E3o foi poss\u00EDvel fazer parse do arquivo da cadeia de handler {1} para a classe {0}
-# Concatenated with qname/exception message (qname + util.location, exception message).
-util.location=na linha {0} de {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_CN.properties
deleted file mode 100644
index 6b326aca..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_CN.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-util.handler.no.webservice.annotation="\u7C7B\u4E0A\u4E0D\u5B58\u5728 Web \u670D\u52A1\u6CE8\u91CA: {0}"
-util.handler.endpoint.interface.no.webservice="\u7AEF\u70B9\u63A5\u53E3{0}\u6CA1\u6709 Web \u670D\u52A1\u6CE8\u91CA"
-util.handler.class.not.found="\u627E\u4E0D\u5230\u7C7B{0}"
-util.handler.cannot.combine.soapmessagehandlers=\u5FC5\u987B\u4F7F\u7528 HanlderChain annotation, \u800C\u4E0D\u662F SOAPMessageHandlers
-util.parser.wrong.element=\u5728\u5904\u7406\u7A0B\u5E8F\u94FE\u914D\u7F6E\u4E2D\u627E\u5230\u7684\u662F\u5143\u7D20 \"{1}\", \u5E94\u4E3A \"{2}\" (\u7B2C {0} \u884C)
-util.failed.to.find.handlerchain.file=\u627E\u4E0D\u5230\u7C7B{0}\u7684\u5904\u7406\u7A0B\u5E8F\u94FE\u6587\u4EF6{1}
-util.failed.to.parse.handlerchain.file=\u65E0\u6CD5\u89E3\u6790\u7C7B{0}\u7684\u5904\u7406\u7A0B\u5E8F\u94FE\u6587\u4EF6{1}
-# Concatenated with qname/exception message (qname + util.location, exception message).
-util.location=\u4F4D\u4E8E{1}\u7684\u7B2C {0} \u884C
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_TW.properties
deleted file mode 100644
index baa82efb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_TW.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-util.handler.no.webservice.annotation="Web \u670D\u52D9\u8A3B\u89E3\u4E0D\u5B58\u5728\u4E0B\u5217\u985E\u5225\u4E2D: {0}"
-util.handler.endpoint.interface.no.webservice="\u7AEF\u9EDE\u4ECB\u9762: {0} \u672A\u5305\u542B Web \u670D\u52D9\u8A3B\u89E3"
-util.handler.class.not.found="\u627E\u4E0D\u5230\u985E\u5225: {0}"
-util.handler.cannot.combine.soapmessagehandlers=\u60A8\u5FC5\u9808\u4F7F\u7528 HanlderChain \u8A3B\u89E3, \u800C\u975E SOAPMessageHandlers
-util.parser.wrong.element=\u5728\u8655\u7406\u7A0B\u5F0F\u93C8\u7D44\u614B (\u884C {0}) \u4E2D\u767C\u73FE\u5143\u7D20 \"{1}\", \u9810\u671F\u70BA \"{2}\"
-util.failed.to.find.handlerchain.file=\u627E\u4E0D\u5230\u985E\u5225 {0} \u7684\u8655\u7406\u7A0B\u5F0F\u93C8\u6A94\u6848 {1}
-util.failed.to.parse.handlerchain.file=\u7121\u6CD5\u5256\u6790\u985E\u5225 {0} \u7684\u8655\u7406\u7A0B\u5F0F\u93C8\u6A94\u6848 {1}
-# Concatenated with qname/exception message (qname + util.location, exception message).
-util.location=\u5728 {1} \u7684\u7B2C {0} \u884C
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel.properties
deleted file mode 100644
index 323a3bcc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-Mex.metadata.systemid.null=MEX WSDL metadata can not be parsed, the systemId is of the MEX source is null.
-# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same.
-wsdl.import.should.be.wsdl=Import of {0} is violation of BP 1.1 R2001. Proceeding with a warning.\n\
- R2001 A DESCRIPTION must only use the WSDL \"import\" statement to import another WSDL description.
-wsdl.portaddress.epraddress.not.match= For Port: {0}, service location {1} does not match address {2} \
- in the EndpointReference
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_de.properties
deleted file mode 100644
index 496b0a33..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_de.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-Mex.metadata.systemid.null=MEX-WSDL-Metadaten k\u00F6nnen nicht geparst werden, die systemId der MEX-Quelle ist null.
-# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same.
-wsdl.import.should.be.wsdl=Import von {0} verletzt BP 1.1 R2001. Es wird mit einer Warnung fortgefahren.\nR2001 Eine DESCRIPTION darf nur die WSDL-Anweisung \\"import\\" verwenden, um eine andere WSDL-Beschreibung zu importieren.
-wsdl.portaddress.epraddress.not.match= Bei Port {0} stimmt das Serviceverzeichnis {1} nicht mit der Adresse {2} in der EndpointReference \u00FCberein
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_es.properties
deleted file mode 100644
index d67af02e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_es.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-Mex.metadata.systemid.null=Los metadatos de WSDL de MEX no se pueden analizar. El identificador del sistema del origen MEX es nulo.
-# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same.
-wsdl.import.should.be.wsdl=La importaci\u00F3n de {0} es una violaci\u00F3n de BP 1.1 R2001. Se contin\u00FAa con una advertencia.\nR2001 DESCRIPTION s\u00F3lo debe utilizar la sentencia \\"import\\" de WSDL para importar otra descripci\u00F3n de WSDL.
-wsdl.portaddress.epraddress.not.match= Para el puerto: {0}, la ubicaci\u00F3n del servicio {1} no coincide con la direcci\u00F3n {2} en la referencia del punto final
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_fr.properties
deleted file mode 100644
index fd31c26b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_fr.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-Mex.metadata.systemid.null=Les m\u00E9tadonn\u00E9es WSDL MEX ne peuvent pas \u00EAtre analys\u00E9es, l'\u00E9l\u00E9ment systemId est l'une des sources MEX NULL.
-# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same.
-wsdl.import.should.be.wsdl=L''import de {0} est une violation de BP 1.1 R2001. Poursuite de l''op\u00E9ration avec un avertissement. \nR2001 Une DESCRIPTION doit utiliser uniquement l''instruction \"import\" WSDL pour importer une autre description WSDL.
-wsdl.portaddress.epraddress.not.match= Pour le port {0}, l''emplacement du service {1} ne correspond pas \u00E0 l''adresse {2} dans l''\u00E9l\u00E9ment EndpointReference
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_it.properties
deleted file mode 100644
index 3af00fc1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_it.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-Mex.metadata.systemid.null=Impossibile analizzare i metadati WSDL MEX, l'ID sistema dell'origine MEX \u00E8 nullo.
-# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same.
-wsdl.import.should.be.wsdl=L''importazione di {0} \u00E8 una violazione di BP 1.1 R2001. Si continua con un''avvertenza.\nR2001 Una DESCRIPTION deve usare solo l''istruzione \"import\" WSDL per importare un''altra descrizione WSDL.
-wsdl.portaddress.epraddress.not.match= Per Port: {0}, la posizione del servizio {1} non corrisponde all''indirizzo {2} in EndpointReference
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ja.properties
deleted file mode 100644
index 1cac3d11..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ja.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-Mex.metadata.systemid.null=MEX WSDL\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093\u3002MEX\u30BD\u30FC\u30B9\u306EsystemId\u304Cnull\u3067\u3059\u3002
-# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same.
-wsdl.import.should.be.wsdl={0}\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u306F\u3001BP 1.1 R2001\u306B\u9055\u53CD\u3057\u3066\u3044\u307E\u3059\u3002\u8B66\u544A\u3042\u308A\u3067\u51E6\u7406\u3057\u3066\u3044\u307E\u3059\u3002\nR2001 \u5225\u306EWSDL\u8AAC\u660E\u3092\u30A4\u30F3\u30DD\u30FC\u30C8\u3059\u308B\u306B\u306F\u3001DESCRIPTION\u3067WSDL \"import\"\u6587\u306E\u307F\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-wsdl.portaddress.epraddress.not.match= \u30DD\u30FC\u30C8: {0}\u306B\u3064\u3044\u3066\u3001\u30B5\u30FC\u30D3\u30B9\u306E\u5834\u6240{1}\u304CEndpointReference\u306E\u30A2\u30C9\u30EC\u30B9{2}\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ko.properties
deleted file mode 100644
index 76836df7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ko.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-Mex.metadata.systemid.null=MEX WSDL \uBA54\uD0C0 \uB370\uC774\uD130\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. MEX \uC18C\uC2A4\uC758 systemId\uAC00 \uB110\uC785\uB2C8\uB2E4.
-# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same.
-wsdl.import.should.be.wsdl={0} \uC784\uD3EC\uD2B8\uB294 BP 1.1 R2001\uC744 \uC704\uBC18\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. \uACBD\uACE0 \uC0C1\uD0DC\uC5D0\uC11C \uC791\uC5C5\uC744 \uC9C4\uD589\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4.\nR2001 DESCRIPTION\uC740 WSDL \"import\" \uBB38\uC744 \uD1B5\uD574\uC11C\uB9CC \uB2E4\uB978 WSDL \uC124\uBA85\uC744 \uC784\uD3EC\uD2B8\uD574\uC57C \uD569\uB2C8\uB2E4.
-wsdl.portaddress.epraddress.not.match= {0} \uD3EC\uD2B8\uC758 \uACBD\uC6B0 \uC11C\uBE44\uC2A4 \uC704\uCE58 {1}\uC774(\uAC00) EndpointReference\uC758 {2} \uC8FC\uC18C\uC640 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_pt_BR.properties
deleted file mode 100644
index 1fea8cda..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_pt_BR.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-Mex.metadata.systemid.null=N\u00E3o \u00E9 poss\u00EDvel fazer parse dos metadados MEX WSDL; o systemId da origem MEX \u00E9 nulo.
-# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same.
-wsdl.import.should.be.wsdl=A importa\u00E7\u00E3o de {0} \u00E9 a viola\u00E7\u00E3o de BP 1.1 R2001. Continuando com a advert\u00EAncia.\nR2001 A DESCRIPTION s\u00F3 deve usar a instru\u00E7\u00E3o \\"import\\" do WSDL para importar outra descri\u00E7\u00E3o do WSDL.
-wsdl.portaddress.epraddress.not.match= Para a Porta: {0}, a localiza\u00E7\u00E3o de servi\u00E7o {1} n\u00E3o corresponde ao endere\u00E7o {2} na EndpointReference
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_CN.properties
deleted file mode 100644
index 968a18e3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_CN.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-Mex.metadata.systemid.null=\u65E0\u6CD5\u89E3\u6790 MEX WSDL \u5143\u6570\u636E, MEX \u6E90\u7684 systemId \u4E3A\u7A7A\u503C\u3002
-# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same.
-wsdl.import.should.be.wsdl=\u5BFC\u5165{0}\u8FDD\u53CD\u4E86 BP 1.1 R2001\u3002\u7EE7\u7EED\u64CD\u4F5C\u4F1A\u51FA\u73B0\u8B66\u544A\u3002\nR2001 DESCRIPTION \u53EA\u80FD\u4F7F\u7528 WSDL \"import\" \u8BED\u53E5\u5BFC\u5165\u5176\u4ED6 WSDL \u8BF4\u660E\u3002
-wsdl.portaddress.epraddress.not.match= \u5BF9\u4E8E\u7AEF\u53E3 {0}, \u670D\u52A1\u4F4D\u7F6E{1}\u4E0E EndpointReference \u4E2D\u7684\u5730\u5740 {2} \u4E0D\u5339\u914D
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_TW.properties
deleted file mode 100644
index bca0cd5a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_TW.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-Mex.metadata.systemid.null=\u7121\u6CD5\u5256\u6790 MEX WSDL \u63CF\u8FF0\u8CC7\u6599, MEX \u4F86\u6E90\u7684 systemId \u70BA\u7A7A\u503C.
-# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same.
-wsdl.import.should.be.wsdl=\u532F\u5165 {0} \u6703\u9055\u53CD BP 1.1 R2001 \u898F\u5B9A. \u7E7C\u7E8C\u9032\u884C, \u4F46\u767C\u51FA\u8B66\u544A.\nR2001 DESCRIPTION \u5FC5\u9808\u53EA\u80FD\u4F7F\u7528 WSDL \"import\" \u6558\u8FF0\u53E5\u4F86\u532F\u5165\u53E6\u4E00\u500B WSDL \u63CF\u8FF0.
-wsdl.portaddress.epraddress.not.match= \u5C0D\u65BC\u9023\u63A5\u57E0: {0}, \u670D\u52D9\u4F4D\u7F6E {1} \u8207 EndpointReference \u4E2D\u7684\u4F4D\u5740 {2} \u4E0D\u7B26
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet.properties
deleted file mode 100644
index fd981e71..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet.properties
+++ /dev/null
@@ -1,248 +0,0 @@
-#
-# Copyright (c) 2005, 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.
-#
-
-no.sunjaxws.xml=Runtime descriptor "{0}" is missing
-
-listener.parsingFailed=WSSERVLET11: failed to parse runtime descriptor: {0}
-JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser could not parse sun-jaxws.xml runtime descriptor
-WSSERVLET11.diag.check.1=Please check the sun-jaxws.xml file to make sure it is correct
-WSSERVLET11.diag.cause.2=The sun-jaxws.xml runtime deployment descriptor may be missing
-WSSERVLET11.diag.check.2=Please check the jaxrpc-ri.xml file to make sure it is present in the war file
-
-
-listener.info.initialize=WSSERVLET12: JAX-WS context listener initializing
-WSSERVLET12.diag.cause.1=Context listener starting
-WSSERVLET12.diag.check.1=Normal web service startup
-
-listener.info.destroy=WSSERVLET13: JAX-WS context listener destroyed
-WSSERVLET13.diag.cause.1=Context listener shutdown
-WSSERVLET13.diag.check.1=Normal web service shutdown
-
-servlet.info.initialize=WSSERVLET14: JAX-WS servlet initializing
-WSSERVLET14.diag.cause.1=Web Services servlet starting up.
-WSSERVLET14.diag.check.1=Normal Web Service deployment. Deployment of service complete.
-
-servlet.info.destroy=WSSERVLET15: JAX-WS servlet destroyed
-WSSERVLET15.diag.cause.1=Web Services servlet shutdown.
-WSSERVLET15.diag.check.1=Normal Web service undeployment. Undeployment complete.
-
-servlet.warning.missingContextInformation=WSSERVLET16: missing context information
-WSSERVLET16.diag.cause.1=The jaxrpc-ri.xml file may be missing from the war file
-WSSERVLET16.diag.check.1=Unjar the service war file; check to see that the jaxrpc-ri-runtime.xml file is present
-
-
-servlet.warning.duplicateEndpointName=WSSERVLET17: duplicate endpoint name
-WSSERVLET17.diag.cause.1=Two or more endpoints with the same name where found in the jaxrpc-ri.xml runtime descriptor
-WSSERVLET17.diag.check.1=Note that this may cause problems with service deployment
-
-
-servlet.info.emptyRequestMessage=WSSERVLET18: got empty request message
-WSSERVLET18.diag.cause.1=Message sent by client is empty
-WSSERVLET18.diag.check.1=This may or may not be intentional. If not examine client program for errors.
-
-servlet.trace.gotRequestForEndpoint=WSSERVLET19: got request for endpoint: {0}
-WSSERVLET19.diag.cause.1=Client request for this endpoint arrived
-WSSERVLET19.diag.check.1=Informational message only. Normal operation.
-
-servlet.error.noImplementorForEndpoint=WSSERVLET20: no implementor for endpoint: {0}
-WSSERVLET20.diag.cause.1=Implementation for this service can not be found
-WSSERVLET20.diag.check.1=Unzip the war, are the tie and serializer classes found?
-
-servlet.trace.invokingImplementor=WSSERVLET21: invoking implementor: {0}
-WSSERVLET21.diag.cause.1=The Web service is being invoked
-WSSERVLET21.diag.check.1=Normal web service invocation.
-
-servlet.error.noEndpointSpecified=WSSERVLET22: no endpoint specified
-WSSERVLET22.diag.cause.1=A request was invoked with no endpoint
-WSSERVLET22.diag.check.1=Set endpoint with stub.setTargetEndpoint property
-
-servlet.error.noResponseMessage=WSSERVLET23: no response message
-WSSERVLET23.diag.cause.1=The request generated no response from the service
-WSSERVLET23.diag.check.1=If a response was expected, check that a request message was actually sent
-WSSERVLET23.diag.check.2=The request may be malformed and be accepted by the service, yet did not generate a response
-
-servlet.trace.writingFaultResponse=WSSERVLET24: writing fault response
-WSSERVLET24.diag.cause.1=SOAPFault message is being returned to the client.
-WSSERVLET24.diag.check.1=Tracing message fault recorded.
-
-servlet.trace.writingSuccessResponse=WSSERVLET25: writing success response
-WSSERVLET25.diag.cause.1=SOAPMessage response is being returned to client
-WSSERVLET25.diag.check.1=Tracing message, normal response.
-
-servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: duplicate URL pattern in endpoint: {0}
-WSSERVLET26.diag.cause.1=The endpoint URL is a duplicate
-WSSERVLET26.diag.check.1=This may cause a problem, please remove duplicate endpoints
-
-servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: unsupported implicit URL pattern in endpoint: {0}
-WSSERVLET27.diag.cause.1=Implicit URLS are not supported in this release
-WSSERVLET27.diag.check.1=Remove the implicit URL
-
-servlet.faultstring.missingPort=WSSERVLET28: Missing port information
-WSSERVLET28.diag.cause.1=Target endpoint is null
-WSSERVLET28.diag.check.1=Set target endpoint with stub.setTargetEndpoint() property.
-
-servlet.faultstring.portNotFound=WSSERVLET29: Port not found ({0})
-WSSERVLET29.diag.cause.1=A port is specified, but a corresponding service implementation is not found
-WSSERVLET29.diag.check.1=Is the port valid? Unzip the war file and make sure the tie and serializers are present
-
-servlet.faultstring.internalServerError=WSSERVLET30: Internal server error ({0})
-WSSERVLET30.diag.cause.1=There was a server error processing the request
-WSSERVLET30.diag.check.1=This could be due to a number of causes. Check the server log file for exceptions.
-
-error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: caught throwable while recovering from a previous exception: {0}
-WSSERVLET51.diag.cause.1=Service processing of the request generated an exception; while attempting to return a SOAPPFaultMessage a throwable was again generated
-WSSERVLET51.diag.check.1=Check the server.xml log file for exception information
-
-error.servlet.caughtThrowable=WSSERVLET49: caught throwable: {0}
-WSSERVLET49.diag.cause.1=Service processing of the request generated an exception; while attempting to return a SOAPFaultMessage a throwable was again generated
-WSSERVLET49.diag.check.1=Check the server.xml log file for exception information
-
-error.servlet.caughtThrowableInInit=WSSERVLET50: caught throwable during servlet initialization: {0}
-WSSERVLET50.diag.cause.1=WS runtime sun-jaxws.xml or web.xml may be incorrect
-WSSERVLET50.diag.check.1=Verify that sun-jaxws.xml and web.xml are correct in the service war file
-WSSERVLET50.diag.cause.2=Application server deployment descriptors may be incorrect
-WSSERVLET50.diag.check.2=Verify that Application server deployment descriptors are correct in the service war file
-WSSERVLET50.diag.cause.3=There may some Application Server initialization problems
-WSSERVLET50.diag.check.3=Check the server.xml file in the domain directory for failures
-
-publisher.info.applyingTransformation=WSSERVLET31: applying transformation with actual address: {0}
-WSSERVLET31.diag.cause.1=Transformation being applied
-WSSERVLET31.diag.check.1=Normal operation
-
-publisher.info.generatingWSDL=WSSERVLET32: generating WSDL for endpoint: {0}
-WSSERVLET32.diag.cause.1=WSDL being generated
-WSSERVLET32.diag.check.1=Normal Operation.
-
-exception.cannotCreateTransformer=WSSERVLET33: cannot create transformer
-WSSERVLET33.diag.cause.1=When publishing the service wsdl, the http location is patched with the deployed location/endpoint using XSLT transformation. The transformer could not be created to do the transformation.
-WSSERVLET33.diag.check.1=There maybe a transformation engine being used that is not compatible. Make sure you are using the correct transformer and version.
-WSSERVLET33.diag.cause.2=When publishing the service wsdl, the http location is patched with the deployed location/endpoint using XSLT transformation. The transformer could not be created to do the transformation.
-WSSERVLET33.diag.check.2=There maybe a transformation engine may not be supported or compatible. Check the server.xml file for exceptions.
-
-
-exception.transformationFailed=WSSERVLET34: transformation failed : {0}
-WSSERVLET34.diag.cause.1=The location patching on the wsdl failed when attempting to transform.
-WSSERVLET34.diag.check.1=Check the log file(s) for more detailed errors/exceptions.
-
-exception.templateCreationFailed=WSSERVLET35: failed to create a template object
-WSSERVLET35.diag.cause.1=A XSLT stylesheet template is create for the wsdl location patching using transformation. Template create failed.
-WSSERVLET35.diag.check.1=An exception was thrown during creation of the template. View exception and stacktrace for more details.
-
-servlet.html.method=WSSERVLET63: must use Post for this type of request
-WSSERVLET63.diag.cause.1=Web service requests must use HTTP POST method: WSI BP 1.0
-WSSERVLET63.diag.check.1=Make sure that your HTTP client is using POST requests, not GET requests
-
-
-servlet.faultstring.invalidContentType=WSSERVLET64: Invalid Content-Type, text/xml required
-WSSERVLET64.diag.cause.1=Web service requests must be a content type text/xml: WSI BP 1.0
-WSSERVLET64.diag.check.1=Make sure the client request is using text/xml
-
-error.implementorFactory.newInstanceFailed=WSSERVLET43: failed to instantiate service implementor for port \"{0}\"
-WSSERVLET43.diag.cause.1=Instantiation of the web service failed.
-WSSERVLET43.diag.check.1=Make sure web service is available and public. Examine exception for more details
-
-error.implementorFactory.servantInitFailed=WSSERVLET44: failed to initialize the service implementor for port \"{0}\"
-WSSERVLET44.diag.cause.1=The web service was instantiated, however, it could not be initialized
-WSSERVLET44.diag.check.1=Check the exception for more details. Make sure all the configuration files are correct.
-
-#not used by anything currently
-servlet.faultstring.invalidSOAPAction=WSSERVLET65: Invalid Header SOAPAction required
-WSSERVLET65.diag.cause.1=SOAP Action is required
-WSSERVLET65.diag.check.1=Add SOAPAction and appropriate value
-
-# {0} - URI
-servlet.no.address.available=No address is available for {0}
-
-servlet.html.title= Web Services
-servlet.html.title2=<h1>Web Services</h1>
-servlet.html.noInfoAvailable=<p>No JAX-WS context information available.</p>
-servlet.html.columnHeader.portName=Endpoint
-servlet.html.columnHeader.status=Status
-servlet.html.columnHeader.information=Information
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-# Usage not found. TODO Remove
-#servlet.html.status.active=ACTIVE
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-# Usage not found. TODO Remove
-#servlet.html.status.error=ERROR
-servlet.html.endpoint.table=<table border=\"0\"><tr><td>Service Name\:</td><td>{0}</td></tr><tr><td>Port Name\:</td><td>{1}</td></tr></table>
-servlet.html.information.table=<table border=\"0\"><tr><td>Address\:</td><td>{0}</td></tr><tr><td>WSDL\:</td><td><a href\="{0}?wsdl">{0}?wsdl</a></td></tr><tr><td>Implementation class\:</td><td>{1}</td></tr></table>
-servlet.html.notFound=<h1>404 Not Found: {0}</h1>
-
-
-#
-#
-# all the following properties are used by the http/ea package
-# these properties are not longer used as http/ea is no longer used
-#
-error.implementorFactory.noConfiguration=WSSERVLET36: no configuration specified
-error.implementorFactory.noInputStream=WSSERVLET37: no configuration specified
-error.implementorRegistry.unknownName=WSSERVLET38: unknown port name: {0}
-error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: cannot read configuration
-error.implementorRegistry.classNotFound=WSSERVLET40: class not found: {0}
-error.implementorRegistry.incompleteInformation=WSSERVLET41: configuration information is incomplete
-error.implementorRegistry.duplicateName=WSSERVLET42: duplicate port name: {0}
-
-error.implementorRegistry.fileNotFound=WSSERVLET45: file not found: {0}
-error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: cannot read configuration
-error.servlet.init.config.parameter.missing=WSSERVLET47: cannot find configuration parameter: \"{0}\"
-error.servlet.init.config.fileNotFound=WSSERVLET48: config file: \"{0}\" not found
-#
-
-error.servlet.noImplementorForPort=WSSERVLET52: no implementor registered for port: {0}
-error.servlet.noPortSpecified=WSSERVLET53: no port specified in HTTP POST request URL
-error.servlet.noResponseWasProduced=WSSERVLET54: no response was produced (internal error)
-#
-info.servlet.gotEmptyRequestMessage=WSSERVLET55: got empty request message
-info.servlet.initializing=WSSERVLET56: JAX-WS servlet: init
-info.servlet.destroying=WSSERVLET57: JAX-WS servlet: destroy
-#
-trace.servlet.requestForPortNamed=WSSERVLET58: got request for port: {0}
-trace.servlet.handingRequestOverToImplementor=WSSERVLET59: handing request over to implementor: {0}
-trace.servlet.gotResponseFromImplementor=WSSERVLET60: got response from implementor: {0}
-trace.servlet.writingFaultResponse=WSSERVLET61: writing fault response
-trace.servlet.writingSuccessResponse=WSSERVLET62: writing success response
-#
-html.nonRootPage.title= Web Service
-html.nonRootPage.body1= <p>A Web Service is installed at this URL.</p>
-html.nonRootPage.body2= <p>Invalid request URI.</p><p>Please check your deployment information.</p>
-# Usage not found. TODO Remove
-#html.nonRootPage.body3a= <p>Please refer to <a href=\'
-# Concatenated with html.nonRootPage.body3a
-#html.nonRootPage.body3b= \'>this page</a> for information about the deployed services.</p>
-html.wsdlPage.title= Web Service
-html.wsdlPage.noWsdl=<p>No WSDL document available for publishing.</p><p>Please check your deployment information.</p>
-html.rootPage.title= Web Service
-html.rootPage.body1=<p>A Web Service is installed at this URL.</p>
-html.rootPage.body2a=<p>It supports the following ports:
-html.rootPage.body2b=</p>
-# Usage not found. TODO Remove
-#html.rootPage.body3a=<p>A WSDL description of these ports is available <a href='
-# Concatenated with html.rootPage.body3a
-#html.rootPage.body3b='>here.</a></p>
-html.rootPage.body4=<p>This endpoint is incorrectly configured. Please check the location and contents of the configuration file.</p>
-
-message.too.long=\nMessage has been truncated\n\
-use {0} property to increase the amount of printed part of the message
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_de.properties
deleted file mode 100644
index 5eb38f85..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_de.properties
+++ /dev/null
@@ -1,243 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-no.sunjaxws.xml=Laufzeitdeskriptor "{0}" fehlt
-
-listener.parsingFailed=WSSERVLET11: Laufzeitdeskriptor konnte nicht geparst werden: {0}
-JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser konnte sun-jaxws.xml-Laufzeitdeskriptor nicht parsen
-WSSERVLET11.diag.check.1=Pr\u00FCfen Sie die sun-jaxws.xml-Datei auf Richtigkeit
-WSSERVLET11.diag.cause.2=Der Laufzeit-Deployment-Deskriptor von sun-jaxws.xml fehlt m\u00F6glicherweise
-WSSERVLET11.diag.check.2=Pr\u00FCfen Sie, ob die jaxrpc-ri.xml-Datei in der .war-Datei vorhanden ist
-
-
-listener.info.initialize=WSSERVLET12: Initialisierung von JAX-WS-Kontext-Listener
-WSSERVLET12.diag.cause.1=Hochfahren von Kontext-Listener
-WSSERVLET12.diag.check.1=Normales Hochfahren des Webservice
-
-listener.info.destroy=WSSERVLET13: JAX-WS-Kontext-Listener endg\u00FCltig gel\u00F6scht
-WSSERVLET13.diag.cause.1=Herunterfahren von Kontext-Listener
-WSSERVLET13.diag.check.1=Normales Herunterfahren des Webservice
-
-servlet.info.initialize=WSSERVLET14: Initialisierung von JAX-WS-Servlet
-WSSERVLET14.diag.cause.1=Webservices-Servlet wird hochgefahren.
-WSSERVLET14.diag.check.1=Normales Webservice-Deployment. Deployment des Service abgeschlossen.
-
-servlet.info.destroy=WSSERVLET15: JAX-WS-Servlet endg\u00FCltig gel\u00F6scht
-WSSERVLET15.diag.cause.1=Herunterfahren des Webservices-Servlets.
-WSSERVLET15.diag.check.1=Normales Undeployment des Webservice. Undeployment abgeschlossen.
-
-servlet.warning.missingContextInformation=WSSERVLET16: Kontextinformationen fehlen
-WSSERVLET16.diag.cause.1=Die Datei jaxrpc-ri.xml fehlt m\u00F6glicherweise in der .war-Datei
-WSSERVLET16.diag.check.1=Extrahieren Sie die .war-Datei des Service; pr\u00FCfen Sie, ob die Datei jaxrpc-ri-runtime.xml vorhanden ist
-
-
-servlet.warning.duplicateEndpointName=WSSERVLET17: Doppelter End Point-Name
-WSSERVLET17.diag.cause.1=Es wurden mindestens zwei End Points mit demselben Namen im Laufzeitdeskriptor jaxrpc-ri.xml gefunden
-WSSERVLET17.diag.check.1=Beachten Sie, dass dies Probleme beim Deployment des Service verursachen kann
-
-
-servlet.info.emptyRequestMessage=WSSERVLET18: Leere Anforderungsnachricht erhalten
-WSSERVLET18.diag.cause.1=Die von diesem Client gesendete Nachricht ist leer
-WSSERVLET18.diag.check.1=Dies ist m\u00F6glicherweise Absicht. Wenn nicht, pr\u00FCfen Sie die Clientprogramme auf Fehler.
-
-servlet.trace.gotRequestForEndpoint=WSSERVLET19: Anforderung f\u00FCr End Point erhalten: {0}
-WSSERVLET19.diag.cause.1=Clientanforderung f\u00FCr diesen End Point ist eingegangen
-WSSERVLET19.diag.check.1=Nur Informationsmeldung. Normaler Betrieb.
-
-servlet.error.noImplementorForEndpoint=WSSERVLET20: Kein Implementor f\u00FCr End Point: {0}
-WSSERVLET20.diag.cause.1=Implementierung f\u00FCr diesen Service kann nicht gefunden werden
-WSSERVLET20.diag.check.1=Dekomprimieren Sie die .war-Datei. Werden Tie- und Serializer-Klassen gefunden?
-
-servlet.trace.invokingImplementor=WSSERVLET21: Implementor wird aufgerufen: {0}
-WSSERVLET21.diag.cause.1=Der Webservice wird aufgerufen
-WSSERVLET21.diag.check.1=Normaler Webserviceaufruf.
-
-servlet.error.noEndpointSpecified=WSSERVLET22: Kein End Point angegeben
-WSSERVLET22.diag.cause.1=Eine Anforderung wurde ohne End Point aufgerufen
-WSSERVLET22.diag.check.1=Legen Sie den End Point mit der Eigenschaft stub.setTargetEndpoint fest
-
-servlet.error.noResponseMessage=WSSERVLET23: Keine Antwortnachricht
-WSSERVLET23.diag.cause.1=Die Anforderung hat keine Antwort von dem Service generiert
-WSSERVLET23.diag.check.1=Wenn eine Antwort erwartet wurde, pr\u00FCfen Sie, ob wirklich eine Anforderungsnachricht gesendet wurde
-WSSERVLET23.diag.check.2=Die Anforderung hat m\u00F6glicherweise das falsche Format und wird vom Service akzeptiert, hat jedoch keine Antwort generiert
-
-servlet.trace.writingFaultResponse=WSSERVLET24: Fault-Antwort wird geschrieben
-WSSERVLET24.diag.cause.1=SOAPFault-Nachricht wird an den Client zur\u00FCckgegeben.
-WSSERVLET24.diag.check.1=Fault bei Tracing-Nachricht aufgezeichnet.
-
-servlet.trace.writingSuccessResponse=WSSERVLET25: Erfolgsantwort wird geschrieben
-WSSERVLET25.diag.cause.1=SOAPMessage-Antwort wird an Client zur\u00FCckgegeben
-WSSERVLET25.diag.check.1=Tracing-Nachricht, normale Antwort.
-
-servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: Doppeltes URL-Muster in End Point: {0}
-WSSERVLET26.diag.cause.1=Die End Point-URL ist ein Duplikat
-WSSERVLET26.diag.check.1=Dies kann zu einem Problem f\u00FChren, entfernen Sie die doppelten End Points
-
-servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: Nicht unterst\u00FCtztes implizites URL-Muster in End Point: {0}
-WSSERVLET27.diag.cause.1=Implizite URLs werden in diesem Release nicht unterst\u00FCtzt
-WSSERVLET27.diag.check.1=Entfernen Sie die implizite URL
-
-servlet.faultstring.missingPort=WSSERVLET28: Portinformationen fehlen
-WSSERVLET28.diag.cause.1=Ziel-End Point ist null
-WSSERVLET28.diag.check.1=Legen Sie den Ziel-End Point mit der Eigenschaft stub.setTargetEndpoint fest
-
-servlet.faultstring.portNotFound=WSSERVLET29: Port nicht gefunden ({0})
-WSSERVLET29.diag.cause.1=Ein Port ist angegeben, es wird jedoch keine entsprechende Serviceimplementierung gefunden
-WSSERVLET29.diag.check.1=Ist der Port g\u00FCltig? Dekomprimieren Sie die .war-Datei, und stellen Sie sicher, dass Tie und Serializer vorhanden sind
-
-servlet.faultstring.internalServerError=WSSERVLET30: Interner Serverfehler ({0})
-WSSERVLET30.diag.cause.1=Bei der Verarbeitung der Anforderung ist ein Serverfehler aufgetreten
-WSSERVLET30.diag.check.1=Dies kann eine Reihe von Ursachen haben. Pr\u00FCfen Sie die Serverlogdatei auf Ausnahmen.
-
-error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: Throwable beim Recovery einer fr\u00FCheren Ausnahme abgefangen: {0}
-WSSERVLET51.diag.cause.1=Die Serviceverarbeitung der Anforderung hat eine Ausnahme generiert; beim Versuch, eine SOAPFaultMessage zur\u00FCckzugeben, wurde erneut ein Throwable generiert
-WSSERVLET51.diag.check.1=Pr\u00FCfen Sie die server.xml-Logdatei auf Ausnahmeinformationen
-
-error.servlet.caughtThrowable=WSSERVLET49: Throwable abgefangen: {0}
-WSSERVLET49.diag.cause.1=Die Serviceverarbeitung der Anforderung hat eine Ausnahme generiert; beim Versuch, eine SOAPFaultMessage zur\u00FCckzugeben, wurde erneut ein Throwable generiert
-WSSERVLET49.diag.check.1=Pr\u00FCfen Sie die server.xml-Logdatei auf Ausnahmeinformationen
-
-error.servlet.caughtThrowableInInit=WSSERVLET50: Throwable bei Servlet-Initialisierung abgefangen: {0}
-WSSERVLET50.diag.cause.1=Sun-jaxws.xml oder web.xml von WS-Laufzeitumgebung sind m\u00F6glicherweise nicht korrekt
-WSSERVLET50.diag.check.1=Pr\u00FCfen Sie, ob sun-jaxws.xml und web.xml in der .war-Datei des Service korrekt sind
-WSSERVLET50.diag.cause.2=Deployment-Deskriptoren des Application Servers sind m\u00F6glicherweise falsch
-WSSERVLET50.diag.check.2=Pr\u00FCfen Sie, ob die Deployment-Deskriptoren des Application Servers in der .war-Datei des Service korrekt sind
-WSSERVLET50.diag.cause.3=M\u00F6glicherweise liegen einige Probleme bei der Application Server-Initialisierung vor
-WSSERVLET50.diag.check.3=Pr\u00FCfen Sie die server.xml-Datei im Domainverzeichnis auf Fehler
-
-publisher.info.applyingTransformation=WSSERVLET31: Transformation mit aktueller Adresse wird angewendet: {0}
-WSSERVLET31.diag.cause.1=Transformation wird angewendet
-WSSERVLET31.diag.check.1=Normaler Vorgang
-
-publisher.info.generatingWSDL=WSSERVLET32: WSDL f\u00FCr End Point wird generiert: {0}
-WSSERVLET32.diag.cause.1=WSDL wird generiert
-WSSERVLET32.diag.check.1=Normaler Vorgang.
-
-exception.cannotCreateTransformer=WSSERVLET33: Transformer kann nicht erstellt werden
-WSSERVLET33.diag.cause.1=Bei der Ver\u00F6ffentlichung der Service-WSDL wird das HTTP-Verzeichnis mit dem bereitgestellten Verzeichnis/End Point mit der XSLT-Transformation gepatcht. Der Transformer zur Durchf\u00FChrung der Transformation konnte nicht erstellt werden.
-WSSERVLET33.diag.check.1=M\u00F6glicherweise wird eine nicht kompatible Transformations-Engine verwendet. Stellen Sie sicher, dass Sie den richtigen Transformer und die richtige Version verwenden.
-WSSERVLET33.diag.cause.2=Bei der Ver\u00F6ffentlichung der Service-WSDL wird das HTTP-Verzeichnis mit dem bereitgestellten Verzeichnis/End Point mit der XSLT-Transformation gepatcht. Der Transformer zur Durchf\u00FChrung der Transformation konnte nicht erstellt werden.
-WSSERVLET33.diag.check.2=M\u00F6glicherweise wird die Transformations-Engine nicht unterst\u00FCtzt oder ist inkompatibel. Pr\u00FCfen Sie die Datei server.xml auf Ausnahmen.
-
-
-exception.transformationFailed=WSSERVLET34: Transformation nicht erfolgreich: {0}
-WSSERVLET34.diag.cause.1=Das Patching des Verzeichnisses in der WSDL war beim Transformationsversuch nicht erfolgreich.
-WSSERVLET34.diag.check.1=Pr\u00FCfen Sie die Logdateien auf detailliertere Fehler/Ausnahmen
-
-exception.templateCreationFailed=WSSERVLET35: Konnte kein Vorlagenobjekt erstellen
-WSSERVLET35.diag.cause.1=Eine XSLT-Stylesheet-Vorlage wird f\u00FCr das Patching des WSDL-Verzeichnisses mit der Transformation erstellt. Vorlage konnte nicht erstellt werden.
-WSSERVLET35.diag.check.1=Eine Ausnahme wurde bei der Erstellung der Vorlage ausgel\u00F6st. F\u00FCr weitere Einzelheiten zeigen Sie die Ausnahme und den Stack Trace an.
-
-servlet.html.method=WSSERVLET63: Sie m\u00FCssen Post f\u00FCr diesen Anforderungstyp verwenden
-WSSERVLET63.diag.cause.1=Webserviceanforderungen m\u00FCssen die HTTP-POST-Methode verwenden: WSI BP 1.0
-WSSERVLET63.diag.check.1=Stellen Sie sicher, dass der HTTP-Client POST-Anforderungen und keine GET-Anforderungen verwendet
-
-
-servlet.faultstring.invalidContentType=WSSERVLET64: Ung\u00FCltiger Content-Type, text/xml erforderlich
-WSSERVLET64.diag.cause.1=Webserviceanforderungen m\u00FCssen den Content-Type text/xml aufweisen: WSI BP 1.0
-WSSERVLET64.diag.check.1=Stellen Sie sicher, dass die Clientanforderung text/xml verwendet
-
-error.implementorFactory.newInstanceFailed=WSSERVLET43: Serviceimplementor f\u00FCr Port \\"{0}\\" konnte nicht instanziiert werden
-WSSERVLET43.diag.cause.1=Instanziierung des Webservice nicht erfolgreich.
-WSSERVLET43.diag.check.1=Stellen Sie sicher, dass der Webservice verf\u00FCgbar und \u00F6ffentlich ist. Pr\u00FCfen Sie die Ausnahme auf weitere Einzelheiten
-
-error.implementorFactory.servantInitFailed=WSSERVLET44: Serviceimplementor f\u00FCr Port \\"{0}\\" konnte nicht initialisiert werden
-WSSERVLET44.diag.cause.1=Der Webservice wurde instanziiert, konnte jedoch nicht initialisiert werden
-WSSERVLET44.diag.check.1=Pr\u00FCfen Sie die Ausnahme auf weitere Einzelheiten. Stellen Sie sicher, dass alle Konfigurationsdateien korrekt sind.
-
-#not used by anything currently
-servlet.faultstring.invalidSOAPAction=WSSERVLET65: Ung\u00FCltiger Header. SOAPAction erforderlich
-WSSERVLET65.diag.cause.1=SOAP-Aktion ist erforderlich
-WSSERVLET65.diag.check.1=F\u00FCgen Sie SOAPAction und den entsprechenden Wert hinzu
-
-# {0} - URI
-servlet.no.address.available=Es ist keine Adresse f\u00FCr {0} verf\u00FCgbar
-
-servlet.html.title= Webservices
-servlet.html.title2=<h1>Webservices</h1>
-servlet.html.noInfoAvailable=<p>Keine JAX-WS-Kontextinformationen verf\u00FCgbar.</p>
-servlet.html.columnHeader.portName=End Point
-servlet.html.columnHeader.status=Status
-servlet.html.columnHeader.information=Informationen
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.active=ACTIVE
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.error=ERROR
-servlet.html.endpoint.table=<table border=\\"0\\"><tr><td>Servicename\\:</td><td>{0}</td></tr><tr><td>Portname\\:</td><td>{1}</td></tr></table>
-servlet.html.information.table=<table border=\"0\"><tr><td>Adresse\:</td><td>{0}</td></tr><tr><td>WSDL\:</td><td><a href\="{0}?wsdl">{0}?wsdl</a></td></tr><tr><td>Implementierungsklasse\:</td><td>{1}</td></tr></table>
-servlet.html.notFound=<h1>404 Nicht gefunden: {0}</h1>
-
-
-#
-#
-# all the following properties are used by the http/ea package
-# these properties are not longer used as http/ea is no longer used
-#
-error.implementorFactory.noConfiguration=WSSERVLET36: Keine Konfiguration angegeben
-error.implementorFactory.noInputStream=WSSERVLET37: Keine Konfiguration angegeben
-error.implementorRegistry.unknownName=WSSERVLET38: Unbekannter Portname: {0}
-error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: Konfiguration kann nicht gelesen werden
-error.implementorRegistry.classNotFound=WSSERVLET40: Klasse nicht gefunden: {0}
-error.implementorRegistry.incompleteInformation=WSSERVLET41: Konfigurationsinformationen sind unvollst\u00E4ndig
-error.implementorRegistry.duplicateName=WSSERVLET42: Doppelter Portname: {0}
-
-error.implementorRegistry.fileNotFound=WSSERVLET45: Datei nicht gefunden: {0}
-error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: Konfiguration kann nicht gelesen werden
-error.servlet.init.config.parameter.missing=WSSERVLET47: Konfigurationsparameter kann nicht gefunden werden: \"{0}\"
-error.servlet.init.config.fileNotFound=WSSERVLET48: Konfigurationsdatei: \"{0}\" nicht gefunden
-#
-
-error.servlet.noImplementorForPort=WSSERVLET52: Kein Implementor f\u00FCr Port registriert: {0}
-error.servlet.noPortSpecified=WSSERVLET53: Kein Port in HTTP-POST-Anforderungs-URL angegeben
-error.servlet.noResponseWasProduced=WSSERVLET54: Es wurde keine Antwort erzeugt (interner Fehler)
-#
-info.servlet.gotEmptyRequestMessage=WSSERVLET55: Leere Anforderungsnachricht erhalten
-info.servlet.initializing=WSSERVLET56: JAX-WS-Servlet: init
-info.servlet.destroying=WSSERVLET57: JAX-WS-Servlet: destroy
-#
-trace.servlet.requestForPortNamed=WSSERVLET58: Anforderung f\u00FCr Port erhalten: {0}
-trace.servlet.handingRequestOverToImplementor=WSSERVLET59: Anforderung wird an Implementor \u00FCbergeben: {0}
-trace.servlet.gotResponseFromImplementor=WSSERVLET60: Antwort von Implementor erhalten: {0}
-trace.servlet.writingFaultResponse=WSSERVLET61: Fault-Antwort wird geschrieben
-trace.servlet.writingSuccessResponse=WSSERVLET62: Erfolgsantwort wird geschrieben
-#
-html.nonRootPage.title= Webservice
-html.nonRootPage.body1= <p>Ein Webservice ist bei dieser URL installiert.</p>
-html.nonRootPage.body2= <p>Ung\u00FCltiger Anforderungs-URI.</p><p>Pr\u00FCfen Sie die Deployment-Informationen.</p>
-# Usage not found. TODO Remove
-#html.nonRootPage.body3a= <p>Please refer to <a href=\'
-# Concatenated with html.nonRootPage.body3a
-#html.nonRootPage.body3b= \'>this page</a> for information about the deployed services.</p>
-html.wsdlPage.title= Webservice
-html.wsdlPage.noWsdl=<p>Es ist kein WSDL-Dokument zur Ver\u00F6ffentlichung verf\u00FCgbar.</p><p>Pr\u00FCfen Sie die Deployment-Informationen.</p>
-html.rootPage.title= Webservice
-html.rootPage.body1=<p>Ein Webservice ist bei dieser URL installiert.</p>
-html.rootPage.body2a=<p>Er unterst\u00FCtzt die folgenden Ports:
-html.rootPage.body2b=</p>
-# Usage not found. TODO Remove
-#html.rootPage.body3a=<p>A WSDL description of these ports is available <a href='
-# Concatenated with html.rootPage.body3a
-#html.rootPage.body3b='>here.</a></p>
-html.rootPage.body4=<p>Dieser End Point ist nicht richtig konfiguriert. Pr\u00FCfen Sie Verzeichnis und Content der Konfigurationsdatei.</p>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_es.properties
deleted file mode 100644
index 2bb7e80b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_es.properties
+++ /dev/null
@@ -1,243 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-no.sunjaxws.xml=Falta el descriptor en tiempo de ejecuci\u00F3n"{0}"
-
-listener.parsingFailed=WSSERVLET11: Fallo al analizar el descriptor en tiempo de ejecuci\u00F3n: {0}
-JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser no ha podido analizar el descriptor en tiempo de ejecuci\u00F3n sun-jaxws.xml
-WSSERVLET11.diag.check.1=Compruebe el archivo sun-jaxws.xml para asegurarse de que es correcto
-WSSERVLET11.diag.cause.2=Puede que falte el descriptor de despliegue en tiempo de ejecuci\u00F3n sun-jaxws.xml
-WSSERVLET11.diag.check.2=Compruebe el archivo jaxrpc-ri.xml para asegurarse de que se encuentra en el archivo war
-
-
-listener.info.initialize=WSSERVLET12: inicializando el listener de contexto de JAX-WS
-WSSERVLET12.diag.cause.1=Iniciando listener de contexto
-WSSERVLET12.diag.check.1=Inicio de servicio web normal
-
-listener.info.destroy=WSSERVLET13: el listener de contexto de JAX-WS se ha destruido
-WSSERVLET13.diag.cause.1=Cierre de listener de contexto
-WSSERVLET13.diag.check.1=Cierre de servicio web normal
-
-servlet.info.initialize=WSSERVLET14: inicializando el servlet de JAX-WS
-WSSERVLET14.diag.cause.1=Iniciando el servlet de servicios web.
-WSSERVLET14.diag.check.1=Despliegue de servicio web normal. Se ha completado el despliegue del servicio.
-
-servlet.info.destroy=WSSERVLET15: el servlet de JAX-WS se ha destruido
-WSSERVLET15.diag.cause.1=El servlet de servicios web se ha cerrado.
-WSSERVLET15.diag.check.1=Anulaci\u00F3n de despliegue normal del servicio web. Se ha completado la anulaci\u00F3n del despliegue.
-
-servlet.warning.missingContextInformation=WSSERVLET16: falta informaci\u00F3n de contexto
-WSSERVLET16.diag.cause.1=Puede que falte el archivo jaxrpc-ri.xml en el archivo war
-WSSERVLET16.diag.check.1=Extraiga el archivo jar del archivo war del servicio para comprobar si est\u00E1 el archivo jaxrpc-ri-runtime.xml
-
-
-servlet.warning.duplicateEndpointName=WSSERVLET17: nombre de punto final duplicado
-WSSERVLET17.diag.cause.1=Se han encontrado dos o m\u00E1s puntos finales con el mismo nombre en el descriptor de tiempo de ejecuci\u00F3n jaxrpc-ri.xml
-WSSERVLET17.diag.check.1=Tenga en cuenta que esto podr\u00EDa producir problemas con el despliegue del servicio
-
-
-servlet.info.emptyRequestMessage=WSSERVLET18: se ha obtenido un mensaje de solicitud vac\u00EDo
-WSSERVLET18.diag.cause.1=El mensaje que ha enviado el cliente est\u00E1 vac\u00EDo
-WSSERVLET18.diag.check.1=Podr\u00EDa ser o no intencionado. En caso de que no lo sea, examine el programa del cliente para buscar errores.
-
-servlet.trace.gotRequestForEndpoint=WSSERVLET19: Se ha obtenido la solicitud para el punto final: {0}
-WSSERVLET19.diag.cause.1=Ha llegado la solicitud del cliente para este punto final
-WSSERVLET19.diag.check.1=S\u00F3lo mensaje informativo. Funcionamiento normal.
-
-servlet.error.noImplementorForEndpoint=WSSERVLET20: No hay ning\u00FAn implantador para el punto final: {0}
-WSSERVLET20.diag.cause.1=No se ha encontrado la implantaci\u00F3n de este servicio
-WSSERVLET20.diag.check.1=Descomprima el archivo war. \u00BFEncuentra las clases del serializador y de uni\u00F3n?
-
-servlet.trace.invokingImplementor=WSSERVLET21: Llamando al implantador: {0}
-WSSERVLET21.diag.cause.1=Se est\u00E1 llamando al servicio web
-WSSERVLET21.diag.check.1=Llamada normal al servicio web.
-
-servlet.error.noEndpointSpecified=WSSERVLET22: no se ha especificado un punto final
-WSSERVLET22.diag.cause.1=Se ha llamado a una solicitud sin ning\u00FAn punto final
-WSSERVLET22.diag.check.1=Defina el punto final con la propiedad stub.setTargetEndpoint
-
-servlet.error.noResponseMessage=WSSERVLET23: no hay ning\u00FAn mensaje de respuesta
-WSSERVLET23.diag.cause.1=La solicitud no ha generado ninguna respuesta del servicio
-WSSERVLET23.diag.check.1=Si se esperaba una respuesta, compruebe si realmente se ha enviado un mensaje de solicitud
-WSSERVLET23.diag.check.2=Puede que la solicitud tenga un formato incorrecto y que la haya aceptado el servicio, pero no se haya generado una respuesta
-
-servlet.trace.writingFaultResponse=WSSERVLET24: escribiendo respuesta a fallo
-WSSERVLET24.diag.cause.1=Se est\u00E1 devolviendo al cliente el mensaje SOAPFault.
-WSSERVLET24.diag.check.1=Se ha registrado el fallo del mensaje de rastreo.
-
-servlet.trace.writingSuccessResponse=WSSERVLET25: escribiendo respuesta correcta
-WSSERVLET25.diag.cause.1=Se est\u00E1 devolviendo la respuesta SOAPMessage al cliente
-WSSERVLET25.diag.check.1=Rastreando mensaje; respuesta normal.
-
-servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: Patr\u00F3n de URL duplicado en punto final: {0}
-WSSERVLET26.diag.cause.1=La URL de punto final es un duplicado
-WSSERVLET26.diag.check.1=Podr\u00EDa producir un problema. Elimine los puntos finales duplicados
-
-servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: Patr\u00F3n de URL impl\u00EDcitas no soportado en el punto final: {0}
-WSSERVLET27.diag.cause.1=Las URL impl\u00EDcitas no est\u00E1n soportadas en esta versi\u00F3n
-WSSERVLET27.diag.check.1=Elimine la URL impl\u00EDcita
-
-servlet.faultstring.missingPort=WSSERVLET28: falta la informaci\u00F3n de puerto
-WSSERVLET28.diag.cause.1=El punto final de destino es nulo
-WSSERVLET28.diag.check.1=Defina el punto final de destino con la propiedad stub.setTargetEndpoint().
-
-servlet.faultstring.portNotFound=WSSERVLET29: no se ha encontrado el puerto ({0})
-WSSERVLET29.diag.cause.1=Se ha especificado un puerto, pero no se ha encontrado una implantaci\u00F3n del servicio correspondiente
-WSSERVLET29.diag.check.1=\u00BFEl puerto es v\u00E1lido? Descomprima el archivo war y aseg\u00FArese de que la uni\u00F3n y los serializadores se encuentran en \u00E9l
-
-servlet.faultstring.internalServerError=WSSERVLET30: error de servidor interno ({0})
-WSSERVLET30.diag.cause.1=Se ha producido un error del servidor al procesar la solicitud
-WSSERVLET30.diag.check.1=Se puede deber a varias causas. Compruebe si hay excepciones en el archivo log del servidor.
-
-error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: Devoluci\u00F3n resuelta al recuperarse de una excepci\u00F3n anterior: {0}
-WSSERVLET51.diag.cause.1=El procesamiento del servicio de la solicitud ha generado una excepci\u00F3n. Al intentar devolver un SOAPPFaultMessage, se ha generado de nuevo una devoluci\u00F3n
-WSSERVLET51.diag.check.1=Compruebe en el archivo log server.xml la informaci\u00F3n de la excepci\u00F3n
-
-error.servlet.caughtThrowable=WSSERVLET49: Devoluci\u00F3n resuelta: {0}
-WSSERVLET49.diag.cause.1=El procesamiento del servicio de la solicitud ha generado una excepci\u00F3n. Al intentar devolver un SOAPFaultMessage, se ha generado de nuevo una devoluci\u00F3n
-WSSERVLET49.diag.check.1=Compruebe en el archivo log server.xml la informaci\u00F3n de la excepci\u00F3n
-
-error.servlet.caughtThrowableInInit=WSSERVLET50: Devoluci\u00F3n resuelta durante la inicializaci\u00F3n del servlet: {0}
-WSSERVLET50.diag.cause.1=Puede que sun-jaxws.xml o web.xml en tiempo de ejecuci\u00F3n de WS sean incorrectos
-WSSERVLET50.diag.check.1=Verifique que sun-jaxws.xml y web.xml son correctos en el archivo war del servicio
-WSSERVLET50.diag.cause.2=Puede que los descriptores de despliegue del servidor de aplicaciones sean incorrectos
-WSSERVLET50.diag.check.2=Verifique que los descriptores de despliegue del servidor de aplicaciones sean correctos en el archivo war del servicio
-WSSERVLET50.diag.cause.3=Puede que haya algunos problemas de inicializaci\u00F3n del servidor de aplicaciones
-WSSERVLET50.diag.check.3=Compruebe el archivo server.xml en el directorio del dominio para ver si hay fallos
-
-publisher.info.applyingTransformation=WSSERVLET31: Aplicando la transformaci\u00F3n con la direcci\u00F3n real: {0}
-WSSERVLET31.diag.cause.1=Se est\u00E1 aplicando la transformaci\u00F3n
-WSSERVLET31.diag.check.1=Funcionamiento normal
-
-publisher.info.generatingWSDL=WSSERVLET32: Generando WSDL para punto final: {0}
-WSSERVLET32.diag.cause.1=Se est\u00E1 generando el WSDL
-WSSERVLET32.diag.check.1=Funcionamiento normal.
-
-exception.cannotCreateTransformer=WSSERVLET33: no se puede crear el transformador
-WSSERVLET33.diag.cause.1=Cuando se publica el WSDL de servicio, se aplica un parche a la ubicaci\u00F3n http con la ubicaci\u00F3n/punto final desplegados utilizando la transformaci\u00F3n XSLT. No se ha podido crear el transformador para realizar la transformaci\u00F3n.
-WSSERVLET33.diag.check.1=Puede que se est\u00E9 utilizando un motor de transformaci\u00F3n que no es compatible. Aseg\u00FArese de que est\u00E1 utilizando el transformador y la versi\u00F3n correctos.
-WSSERVLET33.diag.cause.2=Cuando se publica el WSDL de servicio, se aplica un parche a la ubicaci\u00F3n http con la ubicaci\u00F3n/punto final desplegados utilizando la transformaci\u00F3n XSLT. No se ha podido crear el transformador para realizar la transformaci\u00F3n.
-WSSERVLET33.diag.check.2=Puede que haya un motor de transformaci\u00F3n que no est\u00E1 soportado o es incompatible. Compruebe el archivo server.xml para ver si hay excepciones.
-
-
-exception.transformationFailed=WSSERVLET34: Fallo en la transformaci\u00F3n: {0}
-WSSERVLET34.diag.cause.1=Ha fallado la aplicaci\u00F3n de parches de ubicaci\u00F3n en el WSDL al intentar realizar la transformaci\u00F3n.
-WSSERVLET34.diag.check.1=Consulte el archivo log para obtener excepciones/errores m\u00E1s detallados.
-
-exception.templateCreationFailed=WSSERVLET35: fallo al crear un objeto de plantilla
-WSSERVLET35.diag.cause.1=Se ha creado una plantilla de hoja de estilo XSLT para la aplicaci\u00F3n de parches de ubicaci\u00F3n del WSDL utilizando la transformaci\u00F3n. Fallo de creaci\u00F3n de la plantilla.
-WSSERVLET35.diag.check.1=Se ha devuelto una excepci\u00F3n durante la creaci\u00F3n de la plantilla. Consulte la excepci\u00F3n y el rastreo de pila para obtener m\u00E1s detalles.
-
-servlet.html.method=WSSERVLET63: debe utilizar Post para este tipo de solicitud
-WSSERVLET63.diag.cause.1=Las solicitudes de servicios web deben utilizar el m\u00E9todo HTTP POST: WSI BP 1.0
-WSSERVLET63.diag.check.1=Aseg\u00FArese de que el cliente HTTP est\u00E1 utilizando solicitudes POST, no GET
-
-
-servlet.faultstring.invalidContentType=WSSERVLET64: tipo de contenido no v\u00E1lido; se necesita text/xml
-WSSERVLET64.diag.cause.1=Las solicitudes de servicios web deben tener el tipo de contenido text/xml: WSI BP 1.0
-WSSERVLET64.diag.check.1=Aseg\u00FArese de que la solicitud del cliente est\u00E1 utilizando text/xml
-
-error.implementorFactory.newInstanceFailed=WSSERVLET43: fallo al instanciar el implantador del servicio para el puerto \\"{0}\\"
-WSSERVLET43.diag.cause.1=Fallo en la instanciaci\u00F3n del servicio web.
-WSSERVLET43.diag.check.1=Aseg\u00FArese de que el servicio web est\u00E1 disponible y es p\u00FAblico. Examine la excepci\u00F3n para obtener m\u00E1s detalles.
-
-error.implementorFactory.servantInitFailed=WSSERVLET44: fallo al inicializar el implantador del servicio para el puerto \"{0}\"
-WSSERVLET44.diag.cause.1=El servicio web se ha instanciado, pero no se ha podido inicializar
-WSSERVLET44.diag.check.1=Revise la excepci\u00F3n para obtener m\u00E1s detalles. Aseg\u00FArese de que todos los archivos de configuraci\u00F3n son correctos.
-
-#not used by anything currently
-servlet.faultstring.invalidSOAPAction=WSSERVLET65: cabecera no v\u00E1lida. Se necesita una acci\u00F3n de SOAP
-WSSERVLET65.diag.cause.1=Se necesita una acci\u00F3n de SOAP
-WSSERVLET65.diag.check.1=Agregue una acci\u00F3n de SOAP y el valor adecuado
-
-# {0} - URI
-servlet.no.address.available=No hay disponible ninguna direcci\u00F3n para {0}
-
-servlet.html.title= Servicios Web
-servlet.html.title2=<h1>Servicios web</h1>
-servlet.html.noInfoAvailable=<p>No hay disponible ninguna informaci\u00F3n de contexto JAX-WS.</p>
-servlet.html.columnHeader.portName=Punto Final
-servlet.html.columnHeader.status=Estado
-servlet.html.columnHeader.information=Informaci\u00F3n
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.active=ACTIVE
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.error=ERROR
-servlet.html.endpoint.table=<table border=\\"0\\"><tr><td>Nombre de Servicio\\:</td><td>{0}</td></tr><tr><td>Nombre de Puerto\\:</td><td>{1}</td></tr></table>
-servlet.html.information.table=<table border=\\"0\\"><tr><td>Direcci\u00F3n\\:</td><td>{0}</td></tr><tr><td>WSDL\\:</td><td><a href\\="{0}?wsdl">{0}?wsdl</a></td></tr><tr><td>Clase de Implantaci\u00F3n\\:</td><td>{1}</td></tr></table>
-servlet.html.notFound=<h1>404 no se ha encontrado: {0}</h1>
-
-
-#
-#
-# all the following properties are used by the http/ea package
-# these properties are not longer used as http/ea is no longer used
-#
-error.implementorFactory.noConfiguration=WSSERVLET36: no se ha especificado ninguna configuraci\u00F3n
-error.implementorFactory.noInputStream=WSSERVLET37: no se ha especificado ninguna configuraci\u00F3n
-error.implementorRegistry.unknownName=WSSERVLET38: Nombre de puerto desconocido: {0}
-error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: no se puede leer la configuraci\u00F3n
-error.implementorRegistry.classNotFound=WSSERVLET40: No se ha encontrado la clase: {0}
-error.implementorRegistry.incompleteInformation=WSSERVLET41: la informaci\u00F3n de configuraci\u00F3n est\u00E1 incompleta
-error.implementorRegistry.duplicateName=WSSERVLET42: Nombre de puerto duplicado: {0}
-
-error.implementorRegistry.fileNotFound=WSSERVLET45: No se ha encontrado el archivo: {0}
-error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: no se puede leer la configuraci\u00F3n
-error.servlet.init.config.parameter.missing=WSSERVLET47: No se ha encontrado el par\u00E1metro de configuraci\u00F3n: \\"{0}\\"
-error.servlet.init.config.fileNotFound=WSSERVLET48: no se ha encontrado el archivo de configuraci\u00F3n \"{0}\"
-#
-
-error.servlet.noImplementorForPort=WSSERVLET52: No se ha registrado ning\u00FAn implantador para el puerto: {0}
-error.servlet.noPortSpecified=WSSERVLET53: no se ha especificado ning\u00FAn puerto en la URL de la solicitud POST de HTTP
-error.servlet.noResponseWasProduced=WSSERVLET54: no se ha producido ninguna respuesta (error interno)
-#
-info.servlet.gotEmptyRequestMessage=WSSERVLET55: se ha obtenido un mensaje de solicitud vac\u00EDo
-info.servlet.initializing=WSSERVLET56: Servlet JAX-WS: inicializar
-info.servlet.destroying=WSSERVLET57: Servlet JAX-WS: destruir
-#
-trace.servlet.requestForPortNamed=WSSERVLET58: se ha obtenido una solicitud para el puerto {0}
-trace.servlet.handingRequestOverToImplementor=WSSERVLET59: Entregando solicitud al implantador: {0}
-trace.servlet.gotResponseFromImplementor=WSSERVLET60: Se ha obtenido respuesta del implantador: {0}
-trace.servlet.writingFaultResponse=WSSERVLET61: escribiendo respuesta con fallos
-trace.servlet.writingSuccessResponse=WSSERVLET62: escribiendo respuesta correcta
-#
-html.nonRootPage.title= Servicio Web
-html.nonRootPage.body1= <p>Hay instalado un servicio web en esta URL.</p>
-html.nonRootPage.body2= <p>URI de solicitud no v\u00E1lido.</p><p>Revise su informaci\u00F3n de despliegue.</p>
-# Usage not found. TODO Remove
-#html.nonRootPage.body3a= <p>Please refer to <a href=\'
-# Concatenated with html.nonRootPage.body3a
-#html.nonRootPage.body3b= \'>this page</a> for information about the deployed services.</p>
-html.wsdlPage.title= Servicio Web
-html.wsdlPage.noWsdl=<p>No hay disponible ning\u00FAn documento WSDL para la publicaci\u00F3n.</p><p>Revise la informaci\u00F3n de despliegue.</p>
-html.rootPage.title= Servicio Web
-html.rootPage.body1=<p>Hay instalado un servicio web en esta URL.</p>
-html.rootPage.body2a=<p>Soporta los puertos siguientes:
-html.rootPage.body2b=</p>
-# Usage not found. TODO Remove
-#html.rootPage.body3a=<p>A WSDL description of these ports is available <a href='
-# Concatenated with html.rootPage.body3a
-#html.rootPage.body3b='>here.</a></p>
-html.rootPage.body4=<p>Este punto final est\u00E1 configurado de manera incorrecta. Compruebe la ubicaci\u00F3n y el contenido del archivo de configuraci\u00F3n.</p>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_fr.properties
deleted file mode 100644
index 8d6670eb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_fr.properties
+++ /dev/null
@@ -1,243 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-no.sunjaxws.xml=Le descripteur d''ex\u00E9cution "{0}" est manquant
-
-listener.parsingFailed=WSSERVLET11 : \u00E9chec de l''analyse du descripteur d''ex\u00E9cution : {0}
-JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser n'a pas pu analyser le descripteur d'ex\u00E9cution sun-jaxws.xml
-WSSERVLET11.diag.check.1=V\u00E9rifiez le fichier sun-jaxws.xml pour vous assurer qu'il est correct
-WSSERVLET11.diag.cause.2=Le descripteur de d\u00E9ploiement d'ex\u00E9cution sun-jaxws.xml est peut-\u00EAtre manquant
-WSSERVLET11.diag.check.2=V\u00E9rifiez le fichier jaxrpc-ri.xml pour vous assurer qu'il figure dans le fichier WAR
-
-
-listener.info.initialize=WSSERVLET12 : initialisation du processus d'\u00E9coute de contexte JAX-WS
-WSSERVLET12.diag.cause.1=D\u00E9marrage du processus d'\u00E9coute de contexte
-WSSERVLET12.diag.check.1=D\u00E9marrage de service Web normal
-
-listener.info.destroy=WSSERVLET13 : processus d'\u00E9coute de contexte JAX-WS d\u00E9truit
-WSSERVLET13.diag.cause.1=Arr\u00EAt du processus d'\u00E9coute de contexte
-WSSERVLET13.diag.check.1=Arr\u00EAt du service Web normal
-
-servlet.info.initialize=WSSERVLET14 : initialisation du servlet JAX-WS
-WSSERVLET14.diag.cause.1=D\u00E9marrage du servlet des services Web.
-WSSERVLET14.diag.check.1=D\u00E9ploiement du service Web normal. D\u00E9ploiement du service termin\u00E9.
-
-servlet.info.destroy=WSSERVLET15 : servlet AX-WS d\u00E9truit
-WSSERVLET15.diag.cause.1=Arr\u00EAt du servlet des services Web.
-WSSERVLET15.diag.check.1=Annulation du d\u00E9ploiement du service Web normal. Annulation du d\u00E9ploiement termin\u00E9e.
-
-servlet.warning.missingContextInformation=WSSERVLET16 : informations de contexte manquantes
-WSSERVLET16.diag.cause.1=Le fichier jaxrpc-ri.xml est peut-\u00EAtre manquant dans le fichier WAR
-WSSERVLET16.diag.check.1=D\u00E9compressez le fichier WAR de service ; v\u00E9rifiez que le fichier jaxrpc-ri-runtime.xml est pr\u00E9sent
-
-
-servlet.warning.duplicateEndpointName=WSSERVLET17 : nom d'adresse en double
-WSSERVLET17.diag.cause.1=Au moins deux adresses portant le m\u00EAme nom ont \u00E9t\u00E9 trouv\u00E9es dans le descripteur d'ex\u00E9cution jaxrpc-ri.xml
-WSSERVLET17.diag.check.1=Cela peut entra\u00EEner des probl\u00E8mes avec le d\u00E9ploiement de service
-
-
-servlet.info.emptyRequestMessage=WSSERVLET18 : message de demande vide obtenu
-WSSERVLET18.diag.cause.1=Le message envoy\u00E9 par le client est vide
-WSSERVLET18.diag.check.1=Cela peut \u00EAtre intentionnel ou non. Si cela ne l'est pas, recherchez les erreurs dans le programme client.
-
-servlet.trace.gotRequestForEndpoint=WSSERVLET19 : demande pour l''adresse {0} obtenue
-WSSERVLET19.diag.cause.1=La demande client pour cette adresse est arriv\u00E9e
-WSSERVLET19.diag.check.1=Message d'information uniquement. Fonctionnement normal.
-
-servlet.error.noImplementorForEndpoint=WSSERVLET20 : aucun impl\u00E9mentateur pour l''adresse : {0}
-WSSERVLET20.diag.cause.1=L'impl\u00E9mentation de ce service est introuvable
-WSSERVLET20.diag.check.1=D\u00E9compressez le fichier WAR, les classes de liaison et de serializer ont-elles \u00E9t\u00E9 trouv\u00E9es ?
-
-servlet.trace.invokingImplementor=WSSERVLET21 : appel de l''impl\u00E9mentateur : {0}
-WSSERVLET21.diag.cause.1=Le service Web est en cours d'appel
-WSSERVLET21.diag.check.1=Appel de service Web normal.
-
-servlet.error.noEndpointSpecified=WSSERVLET22 : aucune adresse indiqu\u00E9e
-WSSERVLET22.diag.cause.1=Une demande a \u00E9t\u00E9 appel\u00E9e sans adresse
-WSSERVLET22.diag.check.1=D\u00E9finir l'adresse avec la propri\u00E9t\u00E9 stub.setTargetEndpoint
-
-servlet.error.noResponseMessage=WSSERVLET23 : aucun message de r\u00E9ponse
-WSSERVLET23.diag.cause.1=La demande n'a g\u00E9n\u00E9r\u00E9 aucune r\u00E9ponse de la part du service
-WSSERVLET23.diag.check.1=Si une r\u00E9ponse \u00E9tait attendue, v\u00E9rifiez qu'un message de demande a bien \u00E9t\u00E9 envoy\u00E9
-WSSERVLET23.diag.check.2=La demande peut \u00EAtre incorrecte et avoir \u00E9t\u00E9 accept\u00E9e par le service, mais elle n'a g\u00E9n\u00E9r\u00E9 aucune r\u00E9ponse
-
-servlet.trace.writingFaultResponse=WSSERVLET24 : \u00E9criture d'une r\u00E9ponse d'erreur
-WSSERVLET24.diag.cause.1=Le message SOAPFault est en cours de renvoi au client.
-WSSERVLET24.diag.check.1=Erreur de message de trace enregistr\u00E9e.
-
-servlet.trace.writingSuccessResponse=WSSERVLET25 : \u00E9criture d'une r\u00E9ponse de succ\u00E8s
-WSSERVLET25.diag.cause.1=La r\u00E9ponse SOAPMessage est en cours de renvoi au client
-WSSERVLET25.diag.check.1=Message de trace, r\u00E9ponse normale.
-
-servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26 : mod\u00E8le d''URL en double dans l''adresse : {0}
-WSSERVLET26.diag.cause.1=L'URL endpoint est en double
-WSSERVLET26.diag.check.1=Cela peut poser probl\u00E8me, enlevez les adresses en double
-
-servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27 : mod\u00E8le d''URL implicite non pris en charge dans l''adresse : {0}
-WSSERVLET27.diag.cause.1=Les URL implicites ne sont pas prises en charge dans cette version
-WSSERVLET27.diag.check.1=Enlever l'URL implicite
-
-servlet.faultstring.missingPort=WSSERVLET28 : informations sur le port manquantes
-WSSERVLET28.diag.cause.1=L'adresse cible est NULL
-WSSERVLET28.diag.check.1=D\u00E9finissez l'adresse cible avec la propri\u00E9t\u00E9 stub.setTargetEndpoint().
-
-servlet.faultstring.portNotFound=WSSERVLET29 : port introuvable ({0})
-WSSERVLET29.diag.cause.1=Un port est indiqu\u00E9, mais une impl\u00E9mentation de service correspondante est introuvable
-WSSERVLET29.diag.check.1=Le port est-il valide ? D\u00E9compressez le fichier WAR et assurez-vous que la liaison et les serializers sont pr\u00E9sents
-
-servlet.faultstring.internalServerError=WSSERVLET30 : erreur de serveur interne ({0})
-WSSERVLET30.diag.cause.1=Une erreur de serveur s'est produite lors du traitement de la demande
-WSSERVLET30.diag.check.1=Cela peut avoir plusieurs causes. Pour conna\u00EEtre les exceptions, consultez le fichier journal du serveur.
-
-error.servlet.caughtThrowableWhileRecovering=WSSERVLET51 : objet Throwable d\u00E9tect\u00E9 lors de la r\u00E9cup\u00E9ration \u00E0 partir d''une exception pr\u00E9c\u00E9dente : {0}
-WSSERVLET51.diag.cause.1=Le traitement de service de la demande a g\u00E9n\u00E9r\u00E9 une exception ; lors de la tentative de renvoi d'un message SOAPPFaultMessage, un objet Throwable a encore \u00E9t\u00E9 g\u00E9n\u00E9r\u00E9
-WSSERVLET51.diag.check.1=Pour plus d'informations sur l'exception, consultez le fichier journal server.xml
-
-error.servlet.caughtThrowable=WSSERVLET49 : objet Throwable d\u00E9tect\u00E9 : {0}
-WSSERVLET49.diag.cause.1=Le traitement de service de la demande a g\u00E9n\u00E9r\u00E9 une exception ; lors de la tentative de renvoi d'un message SOAPFaultMessage, un objet Throwable a encore \u00E9t\u00E9 g\u00E9n\u00E9r\u00E9
-WSSERVLET49.diag.check.1=Pour plus d'informations sur l'exception, consultez le fichier journal server.xml
-
-error.servlet.caughtThrowableInInit=WSSERVLET50 : objet Throwable d\u00E9tect\u00E9 lors de l''initialisation du servlet : {0}
-WSSERVLET50.diag.cause.1=Le fichier sun-jaxws.xml ou web.xml d'ex\u00E9cution WS est peut-\u00EAtre incorrect
-WSSERVLET50.diag.check.1=V\u00E9rifiez que sun-jaxws.xml et web.xml sont corrects dans le fichier WAR de service
-WSSERVLET50.diag.cause.2=Les descripteurs de d\u00E9ploiement du serveur d'applications sont peut-\u00EAtre incorrects
-WSSERVLET50.diag.check.2=V\u00E9rifiez que les descripteurs de d\u00E9ploiement du serveur d'applications sont corrects dans le fichier WAR du service
-WSSERVLET50.diag.cause.3=Des probl\u00E8mes d'initialisation du serveur d'applications peuvent se produire
-WSSERVLET50.diag.check.3=Pour conna\u00EEtre les \u00E9checs, consultez le fichier server.xml dans le r\u00E9pertoire de domaines
-
-publisher.info.applyingTransformation=WSSERVLET31 : application de la transformation avec l''adresse r\u00E9elle : {0}
-WSSERVLET31.diag.cause.1=Transformation en cours d'application
-WSSERVLET31.diag.check.1=Fonctionnement normal
-
-publisher.info.generatingWSDL=WSSERVLET32 : g\u00E9n\u00E9ration du WSDL pour l''adresse : {0}
-WSSERVLET32.diag.cause.1=WSDL en cours de g\u00E9n\u00E9ration
-WSSERVLET32.diag.check.1=Fonctionnement normal.
-
-exception.cannotCreateTransformer=WSSERVLET33 : impossible de cr\u00E9er le transformateur
-WSSERVLET33.diag.cause.1=Lors de la publication du WSDL de service, des patches sont appliqu\u00E9s \u00E0 l'emplacement http avec l'emplacement/adresse d\u00E9ploy\u00E9 \u00E0 l'aide de la transformation XSLT. Le transformateur n'a pas pu \u00EAtre cr\u00E9\u00E9 pour effectuer la transformation.
-WSSERVLET33.diag.check.1=Un moteur de transformation non compatible est peut-\u00EAtre en cours d'utilisation. Assurez-vous que vous utilisez le transformateur et la version corrects.
-WSSERVLET33.diag.cause.2=Lors de la publication du WSDL de service, des patches sont appliqu\u00E9s \u00E0 l'emplacement http avec l'emplacement/adresse d\u00E9ploy\u00E9 \u00E0 l'aide de la transformation XSLT. Le transformateur n'a pas pu \u00EAtre cr\u00E9\u00E9 pour effectuer la transformation.
-WSSERVLET33.diag.check.2=Un moteur de transformation non pris en charge ou non compatible est peut-\u00EAtre utilis\u00E9. Pour conna\u00EEtre les exceptions, consultez le fichier server.xml.
-
-
-exception.transformationFailed=WSSERVLET34 : \u00E9chec de la transformation : {0}
-WSSERVLET34.diag.cause.1=L'application de patches \u00E0 l'emplacement sur le WSDL a \u00E9chou\u00E9 lors de la tentative de transformation.
-WSSERVLET34.diag.check.1=Pour plus de d\u00E9tails sur les erreurs/exceptions, consultez les fichiers journaux.
-
-exception.templateCreationFailed=WSSERVLET35 : \u00E9chec de la cr\u00E9ation d'un objet de mod\u00E8le
-WSSERVLET35.diag.cause.1=Un mod\u00E8le de feuille de style XSLT est cr\u00E9\u00E9 pour l'application de patches \u00E0 l'emplacement WSDL \u00E0 l'aide de la transformation. Echec de la cr\u00E9ation du mod\u00E8le.
-WSSERVLET35.diag.check.1=Une exception a \u00E9t\u00E9 g\u00E9n\u00E9r\u00E9e lors de la cr\u00E9ation du mod\u00E8le. Pour plus de d\u00E9tails, consultez l'exception et la trace de pile.
-
-servlet.html.method=WSSERVLET63 : vous devez utiliser POST pour ce type de demande
-WSSERVLET63.diag.cause.1=Les demandes de service Web doivent utiliser la m\u00E9thode HTTP POST : WSI BP 1.0
-WSSERVLET63.diag.check.1=Assurez-vous que le client HTTP utilise les demandes POST, et non les demandes GET
-
-
-servlet.faultstring.invalidContentType=WSSERVLET64 : Content-Type non valide, text/xml requis
-WSSERVLET64.diag.cause.1=Le type de contenu des demandes de service Web doit \u00EAtre text/xml : WSI BP 1.0
-WSSERVLET64.diag.check.1=Assurez-vous que la demande client utilise text/xml
-
-error.implementorFactory.newInstanceFailed=WSSERVLET43 : \u00E9chec de l''instanciation d''un impl\u00E9mentateur de service pour le port \"{0}\"
-WSSERVLET43.diag.cause.1=Echec de l'instanciation du service Web.
-WSSERVLET43.diag.check.1=Assurez-vous que le service Web est disponible et public. Pour plus de d\u00E9tails, examinez l'exception
-
-error.implementorFactory.servantInitFailed=WSSERVLET44 : \u00E9chec de l''initialisation de l''impl\u00E9mentateur de service pour le port \"{0}\"
-WSSERVLET44.diag.cause.1=Le service Web a \u00E9t\u00E9 instanci\u00E9 ; cependant, il n'a pas pu \u00EAtre initialis\u00E9
-WSSERVLET44.diag.check.1=Pour plus de d\u00E9tails, v\u00E9rifiez l'exception. Assurez-vous que tous les fichiers de configuration sont corrects.
-
-#not used by anything currently
-servlet.faultstring.invalidSOAPAction=WSSERVLET65 : en-t\u00EAte SOAPAction non valide requis
-WSSERVLET65.diag.cause.1=L'action SOAP est obligatoire
-WSSERVLET65.diag.check.1=Ajouter SOAPAction et la valeur appropri\u00E9e
-
-# {0} - URI
-servlet.no.address.available=Aucune adresse n''est disponible pour {0}
-
-servlet.html.title= Services Web
-servlet.html.title2=<h1>Services Web</h1>
-servlet.html.noInfoAvailable=<p>Aucune information de contexte JAX-WS disponible.</p>
-servlet.html.columnHeader.portName=Adresse
-servlet.html.columnHeader.status=Statut
-servlet.html.columnHeader.information=Informations
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.active=ACTIVE
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.error=ERROR
-servlet.html.endpoint.table=<table border=\"0\"><tr><td>Nom de service \:</td><td>{0}</td></tr><tr><td>Nom de port \:</td><td>{1}</td></tr></table>
-servlet.html.information.table=<table border=\"0\"><tr><td>Adresse \:</td><td>{0}</td></tr><tr><td>WSDL\:</td><td><a href\="{0}?wsdl">{0}?wsdl</a></td></tr><tr><td>Classe d''impl\u00E9mentation \:</td><td>{1}</td></tr></table>
-servlet.html.notFound=<h1>404 Introuvable : {0}</h1>
-
-
-#
-#
-# all the following properties are used by the http/ea package
-# these properties are not longer used as http/ea is no longer used
-#
-error.implementorFactory.noConfiguration=WSSERVLET36 : aucune configuration sp\u00E9cifi\u00E9e
-error.implementorFactory.noInputStream=WSSERVLET37 : aucune configuration sp\u00E9cifi\u00E9e
-error.implementorRegistry.unknownName=WSSERVLET38 : nom de port {0} inconnu
-error.implementorRegistry.cannotReadConfiguration=WSSERVLET39 : impossible de lire la configuration
-error.implementorRegistry.classNotFound=WSSERVLET40 : classe introuvable : {0}
-error.implementorRegistry.incompleteInformation=WSSERVLET41 : les informations de configuration sont incompl\u00E8tes
-error.implementorRegistry.duplicateName=WSSERVLET42 : nom de port en double : {0}
-
-error.implementorRegistry.fileNotFound=WSSERVLET45 : fichier introuvable : {0}
-error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46 : impossible de lire la configuration
-error.servlet.init.config.parameter.missing=WSSERVLET47 : param\u00E8tre de configuration \"{0}\" introuvable
-error.servlet.init.config.fileNotFound=WSSERVLET48 : fichier de configuration \"{0}\" introuvable
-#
-
-error.servlet.noImplementorForPort=WSSERVLET52 : aucun impl\u00E9mentateur inscrit pour le port : {0}
-error.servlet.noPortSpecified=WSSERVLET53 : aucun port indiqu\u00E9 dans l'URL de demande HTTP POST
-error.servlet.noResponseWasProduced=WSSERVLET54 : aucune r\u00E9ponse n'a \u00E9t\u00E9 produite (erreur interne)
-#
-info.servlet.gotEmptyRequestMessage=WSSERVLET55 : message de demande vide obtenu
-info.servlet.initializing=WSSERVLET56 : servlet JAX-WS : initialisation
-info.servlet.destroying=WSSERVLET57 : servlet JAX-WS : destruction
-#
-trace.servlet.requestForPortNamed=WSSERVLET58 : demande obtenue pour le port : {0}
-trace.servlet.handingRequestOverToImplementor=WSSERVLET59 : gestion de la demande sur l''impl\u00E9mentateur : {0}
-trace.servlet.gotResponseFromImplementor=WSSERVLET60 : r\u00E9ponse de l''impl\u00E9mentateur obtenue : {0}
-trace.servlet.writingFaultResponse=WSSERVLET61 : \u00E9criture de la r\u00E9ponse d'erreur
-trace.servlet.writingSuccessResponse=WSSERVLET62 : \u00E9criture de la r\u00E9ponse de succ\u00E8s
-#
-html.nonRootPage.title= Service Web
-html.nonRootPage.body1= <p>Un service Web est install\u00E9 \u00E0 cette URL.</p>
-html.nonRootPage.body2= <p>URI de demande non valide.</p><p>V\u00E9rifiez les informations de d\u00E9ploiement.</p>
-# Usage not found. TODO Remove
-#html.nonRootPage.body3a= <p>Please refer to <a href=\'
-# Concatenated with html.nonRootPage.body3a
-#html.nonRootPage.body3b= \'>this page</a> for information about the deployed services.</p>
-html.wsdlPage.title= Service Web
-html.wsdlPage.noWsdl=<p>Aucun document WSDL disponible pour publication.</p><p>V\u00E9rifiez les informations de d\u00E9ploiement.</p>
-html.rootPage.title= Service Web
-html.rootPage.body1=<p>Un service Web est install\u00E9 \u00E0 cette URL.</p>
-html.rootPage.body2a=<p>Il prend en charge les ports suivants :
-html.rootPage.body2b=</p>
-# Usage not found. TODO Remove
-#html.rootPage.body3a=<p>A WSDL description of these ports is available <a href='
-# Concatenated with html.rootPage.body3a
-#html.rootPage.body3b='>here.</a></p>
-html.rootPage.body4=<p>Cette adresse n'est pas configur\u00E9e correctement. V\u00E9rifiez l'emplacement et le contenu du fichier de configuration.</p>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_it.properties
deleted file mode 100644
index 9f834d0a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_it.properties
+++ /dev/null
@@ -1,243 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-no.sunjaxws.xml=Descrittore di runtime "{0}" mancante
-
-listener.parsingFailed=WSSERVLET11: analisi del descrittore di runtime non riuscita: {0}
-JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser non \u00E8 riuscito ad analizzare il descrittore di runtime sun-jaxws.xml runtime
-WSSERVLET11.diag.check.1=Controllare il file sun-jaxws.xml per assicurarsi che sia corretto
-WSSERVLET11.diag.cause.2=\u00C8 possibile che manchi il descrittore di distribuzione di runtime sun-jaxws.xml
-WSSERVLET11.diag.check.2=Controllare il file jaxrpc-ri.xml per assicurarsi che sia presente nel file war
-
-
-listener.info.initialize=WSSERVLET12: inizializzazione del listener del contesto JAX-WS
-WSSERVLET12.diag.cause.1=Avvio del listener del contesto
-WSSERVLET12.diag.check.1=Normale avvio del servizio Web
-
-listener.info.destroy=WSSERVLET13: listener del contesto JAX-WS eliminato
-WSSERVLET13.diag.cause.1=Chiusura del listener del contesto
-WSSERVLET13.diag.check.1=Normale chiusura del servizio Web
-
-servlet.info.initialize=WSSERVLET14: inizializzazione del servlet JAX-WS
-WSSERVLET14.diag.cause.1=Avvio del servlet dei servizi Web.
-WSSERVLET14.diag.check.1=Normale distribuzione del servizio Web. Distribuzione del servizio completata.
-
-servlet.info.destroy=WSSERVLET15: servlet JAX-WS eliminato
-WSSERVLET15.diag.cause.1=Chiusura del servlet dei servizi Web.
-WSSERVLET15.diag.check.1=Normale annullamento della distribuzione del servizio Web. Annullamento della distribuzione completata.
-
-servlet.warning.missingContextInformation=WSSERVLET16: informazioni mancanti sul contesto
-WSSERVLET16.diag.cause.1=\u00C8 possibile che nel file war manchi il file jaxrpc-ri.xml
-WSSERVLET16.diag.check.1=Estrarre il file war di servizio. Controllare che sia presente il file jaxrpc-ri-runtime.xml
-
-
-servlet.warning.duplicateEndpointName=WSSERVLET17: nome endpoint duplicato
-WSSERVLET17.diag.cause.1=Nel descrittore di runtime jaxrpc-ri.xml sono stati trovati due o pi\u00F9 endpoint con lo stesso nome
-WSSERVLET17.diag.check.1=Tenere presente che questo potrebbe causare problemi con la distribuzione del servizio
-
-
-servlet.info.emptyRequestMessage=WSSERVLET18: ricevuto messaggio di richiesta vuoto
-WSSERVLET18.diag.cause.1=Il messaggio inviato dal client \u00E8 vuoto
-WSSERVLET18.diag.check.1=Potrebbe essere intenzionale o meno. In quest'ultimo caso, esaminare il programma client per gli errori.
-
-servlet.trace.gotRequestForEndpoint=WSSERVLET19: ricevuta richiesta per l''endpoint: {0}
-WSSERVLET19.diag.cause.1=\u00C8 arrivata la richiesta del client per questo endpoint
-WSSERVLET19.diag.check.1=Messaggio solo informativo. Funzionamento normale.
-
-servlet.error.noImplementorForEndpoint=WSSERVLET20: nessun implementatore per l''endpoint: {0}
-WSSERVLET20.diag.cause.1=Impossibile trovare l'implementazione per questo servizio
-WSSERVLET20.diag.check.1=Estrarre il file war e controllare se sono presenti le classi di collegamento e del serializzatore.
-
-servlet.trace.invokingImplementor=WSSERVLET21: richiamo dell''implementatore: {0}
-WSSERVLET21.diag.cause.1=\u00C8 in corso il richiamo del servizio Web
-WSSERVLET21.diag.check.1=Normale richiamo del servizio Web.
-
-servlet.error.noEndpointSpecified=WSSERVLET22: nessun endpoint specificato
-WSSERVLET22.diag.cause.1=\u00C8 stata richiamata una richiesta senza endpoint
-WSSERVLET22.diag.check.1=Impostare l'endpoint con la propriet\u00E0 stub.setTargetEndpoint
-
-servlet.error.noResponseMessage=WSSERVLET23: nessun messaggio di risposta
-WSSERVLET23.diag.cause.1=La richiesta non ha generato alcuna risposta dal servizio
-WSSERVLET23.diag.check.1=Se era prevista una risposta, controllare che sia stato effettivamente inviato un messaggio di richiesta
-WSSERVLET23.diag.check.2=\u00C8 possibile che la richiesta abbia un formato non valido e che sia stata accettata dal servizio e che perci\u00F2 non sia stata generata una risposta
-
-servlet.trace.writingFaultResponse=WSSERVLET24: scrittura della risposta di errore
-WSSERVLET24.diag.cause.1=\u00C8 in corso la restituzione del messaggio SOAPFault al client.
-WSSERVLET24.diag.check.1=Trace dell'errore del messaggio registrato.
-
-servlet.trace.writingSuccessResponse=WSSERVLET24: scrittura della risposta di operazione riuscita
-WSSERVLET25.diag.cause.1=\u00C8 in corso la restituzione della risposta SOAPMessage al client
-WSSERVLET25.diag.check.1=Trace del messaggio, risposta normale.
-
-servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: pattern dell''URL duplicato nell''endpoint: {0}
-WSSERVLET26.diag.cause.1=L'URL dell'endpoint \u00E8 un duplicato
-WSSERVLET26.diag.check.1=Questo potrebbe causare problemi. Rimuovere gli endpoint duplicati.
-
-servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: pattern dell''URL implicito non supportato nell''endpoint: {0}
-WSSERVLET27.diag.cause.1=Gli URL impliciti non sono supportati in questa release
-WSSERVLET27.diag.check.1=Rimuovere l'URL implicito
-
-servlet.faultstring.missingPort=WSSERVLET28: Informazioni mancanti sulla porta
-WSSERVLET28.diag.cause.1=L'endpoint di destinazione \u00E8 nullo
-WSSERVLET28.diag.check.1=Impostare l'endpoint di destinazione con la propriet\u00E0 stub.setTargetEndpoint().
-
-servlet.faultstring.portNotFound=WSSERVLET29: Porta non trovata ({0})
-WSSERVLET29.diag.cause.1=\u00C8 specificata una porta ma non \u00E8 stata trovata un'implementazione del servizio corrispondente
-WSSERVLET29.diag.check.1=Verificare che la porta sia valida. Estrarre il file war e assicurarsi che siano presenti il collegamento e i serializzatori
-
-servlet.faultstring.internalServerError=WSSERVLET30: Errore interno del server ({0})
-WSSERVLET30.diag.cause.1=Si \u00E8 verificato un errore del server durante l'elaborazione della richiesta
-WSSERVLET30.diag.check.1=Ci\u00F2 potrebbe essere dovuto a numerosi motivi. Controllare il file di log del server per le eccezioni.
-
-error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: rilevato Throwable durante il recupero da un''eccezione precedente: {0}
-WSSERVLET51.diag.cause.1=L'elaborazione del servizio della richiesta ha generato un'eccezione. Durante il tentativo di restituzione di un SOAPPFaultMessage \u00E8 stato generato un nuovo Throwable.
-WSSERVLET51.diag.check.1=Controllare il file di log server.xml per informazioni sull'eccezione
-
-error.servlet.caughtThrowable=WSSERVLET49: rilevato Throwable: {0}
-WSSERVLET49.diag.cause.1=L'elaborazione del servizio della richiesta ha generato un'eccezione. Durante il tentativo di restituzione di un SOAPFaultMessage \u00E8 stato generato un nuovo Throwable.
-WSSERVLET49.diag.check.1=Controllare il file di log server.xml per informazioni sull'eccezione
-
-error.servlet.caughtThrowableInInit=WSSERVLET51: rilevato Throwable durante l''inizializzazione del servlet: {0}
-WSSERVLET50.diag.cause.1=\u00C8 possibile che sun-jaxws.xml o web.xml del runtime WS siano errati
-WSSERVLET50.diag.check.1=Verificare che sun-jaxws.xml e web.xml siano corretti nel file war del servizio
-WSSERVLET50.diag.cause.2=\u00C8 possibile che i descrittori di distribuzione dell'Application Server siano errati
-WSSERVLET50.diag.check.2=Verificare che i descrittori di distribuzione dell'Application Server siano corretti nel file war del servizio
-WSSERVLET50.diag.cause.3=Potrebbero esserci dei problemi di inizializzazione dell'Application Server
-WSSERVLET50.diag.check.3=Controllare il file server.xml nella directory del dominio per gli errori
-
-publisher.info.applyingTransformation=WSSERVLET31: la trasformazione viene applicata con l''indirizzo effettivo: {0}
-WSSERVLET31.diag.cause.1=\u00C8 in corso l'applicazione della trasformazione
-WSSERVLET31.diag.check.1=Funzionamento normale
-
-publisher.info.generatingWSDL=WSSERVLET32: generazione di WSDL per l''endpoint: {0}
-WSSERVLET32.diag.cause.1=\u00C8 in corso la generazione di WSDL
-WSSERVLET32.diag.check.1=Funzionamento normale.
-
-exception.cannotCreateTransformer=WSSERVLET33: impossibile creare il trasformatore
-WSSERVLET33.diag.cause.1=Durante la pubblicazione del WSDL del servizio, alla posizione http vengono applicate patch con la posizione/endpoint distribuiti usando la trasformazione XSLT. Impossibile creare il trasformatore per eseguire la trasformazione.
-WSSERVLET33.diag.check.1=\u00C8 possibile che sia in uso un motore di trasformazione non compatibile. Assicurarsi che vengano usati il trasformatore e la versione corretti.
-WSSERVLET33.diag.cause.2=Durante la pubblicazione del WSDL del servizio, alla posizione http vengono applicate patch con la posizione/endpoint distribuiti usando la trasformazione XSLT. Impossibile creare il trasformatore per eseguire la trasformazione.
-WSSERVLET33.diag.check.2=\u00C8 possibile che sia presente un motore di trasformazione non supportato o compatibile. Controllare il file server.xml per le eccezioni.
-
-
-exception.transformationFailed=WSSERVLET34: trasformazione non riuscita: {0}
-WSSERVLET34.diag.cause.1=L'applicazione di patch alla posizione sul WSDL non \u00E8 riuscita durante il tentativo di trasformazione.
-WSSERVLET34.diag.check.1=Per ulteriori dettagli sugli errori/eccezioni, consultare i file di log.
-
-exception.templateCreationFailed=WSSERVLET35: creazione di un oggetto modello non riuscita
-WSSERVLET35.diag.cause.1=Viene creato un modello di foglio di stile XSLT per l'applicazione di patch alla posizione WSDL usando la trasformazione. Creazione del modello non riuscita.
-WSSERVLET35.diag.check.1=\u00C8 stata restituita un'eccezione durante la creazione del modello. Visualizzare l'eccezione e lo stack trace per ulteriori dettagli.
-
-servlet.html.method=WSSERVLET63: per questo tipo di richiesta \u00E8 necessario usare POST
-WSSERVLET63.diag.cause.1=Le richieste del servizio Web devono usare il metodo HTTP POST: WSI BP 1.0
-WSSERVLET63.diag.check.1=Assicurarsi che il client HTTP stia usando le richieste POST e non le richieste GET
-
-
-servlet.faultstring.invalidContentType=WSSERVLET64: Content-Type non valido. \u00C8 richiesto text/xml
-WSSERVLET64.diag.cause.1=Le richieste del servizio Web devono essere un tipo di contenuto text/xml: WSI BP 1.0
-WSSERVLET64.diag.check.1=Accertarsi che la richiesta del client usi text/xml
-
-error.implementorFactory.newInstanceFailed=WSSERVLET43: creazione dell''istanza dell''implementatore del servizio per la porta \"{0}\" non riuscita
-WSSERVLET43.diag.cause.1=Creazione dell'istanza del servizio Web non riuscita.
-WSSERVLET43.diag.check.1=Assicurarsi che il servizio Web sia disponibile e pubblico. Esaminare l'eccezione per ulteriori dettagli.
-
-error.implementorFactory.servantInitFailed=WSSERVLET44: inizializzazione dell''implementatore del servizio per la porta \"{0}\" non riuscita
-WSSERVLET44.diag.cause.1=\u00C8 stata creata un'istanza del servizio ma non \u00E8 stato possibile inizializzarlo.
-WSSERVLET44.diag.check.1=Controllare l'eccezione per ulteriori dettagli. Assicurarsi che tutti i file di configurazione siano corretti.
-
-#not used by anything currently
-servlet.faultstring.invalidSOAPAction=WSSERVLET65: SOAPAction dell'intestazione non valida richiesta
-WSSERVLET65.diag.cause.1=SOAPAction richiesta
-WSSERVLET65.diag.check.1=Aggiungere SOAPAction e il valore appropriato
-
-# {0} - URI
-servlet.no.address.available=Nessun indirizzo disponibile per {0}
-
-servlet.html.title= Servizi Web
-servlet.html.title2=<h1>Servizi Web</h1>
-servlet.html.noInfoAvailable=<p>Non sono disponibili informazioni sul contesto JAX-WS.</p>
-servlet.html.columnHeader.portName=Endpoint
-servlet.html.columnHeader.status=Stato
-servlet.html.columnHeader.information=Informazioni
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.active=ACTIVE
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.error=ERROR
-servlet.html.endpoint.table=<table border=\"0\"><tr><td>Nome servizio\:</td><td>{0}</td></tr><tr><td>Nome porta\:</td><td>{1}</td></tr></table>
-servlet.html.information.table=<table border=\"0\"><tr><td>Indirizzo\:</td><td>{0}</td></tr><tr><td>WSDL\:</td><td><a href\="{0}?wsdl">{0}?wsdl</a></td></tr><tr><td>Classe di implementazione\:</td><td>{1}</td></tr></table>
-servlet.html.notFound=<h1>404 Non trovato: {0}</h1>
-
-
-#
-#
-# all the following properties are used by the http/ea package
-# these properties are not longer used as http/ea is no longer used
-#
-error.implementorFactory.noConfiguration=WSSERVLET36: nessuna configurazione specificata
-error.implementorFactory.noInputStream=WSSERVLET37: nessuna configurazione specificata
-error.implementorRegistry.unknownName=WSSERVLET38: nome porta sconosciuto: {0}
-error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: impossibile leggere la configurazione
-error.implementorRegistry.classNotFound=WSSERVLET40: classe non trovata: {0}
-error.implementorRegistry.incompleteInformation=WSSERVLET41: le informazioni di configurazione sono incomplete
-error.implementorRegistry.duplicateName=WSSERVLET42: nome porta duplicato: {0}
-
-error.implementorRegistry.fileNotFound=WSSERVLET45: file non trovato: {0}
-error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: impossibile leggere la configurazione
-error.servlet.init.config.parameter.missing=WSSERVLET47: impossibile trovare il parametro di configurazione: \"{0}\"
-error.servlet.init.config.fileNotFound=WSSERVLET48: file di configurazione: \"{0}\" non trovato
-#
-
-error.servlet.noImplementorForPort=WSSERVLET52: nessun implementatore registrato per la porta: {0}
-error.servlet.noPortSpecified=WSSERVLET53: nessuna porta specificata nell'URL della richiesta POST HTTP
-error.servlet.noResponseWasProduced=WSSERVLET54: nessuna risposta prodotta (errore interno)
-#
-info.servlet.gotEmptyRequestMessage=WSSERVLET55: ricevuto messaggio di richiesta vuoto
-info.servlet.initializing=WSSERVLET56: servlet JAX-WS: inizializzazione
-info.servlet.destroying=WSSERVLET57: servlet JAX-WS: eliminazione
-#
-trace.servlet.requestForPortNamed=WSSERVLET58: ricevuta richiesta per la porta: {0}
-trace.servlet.handingRequestOverToImplementor=WSSERVLET59: passaggio della richiesta all''implementatore: {0}
-trace.servlet.gotResponseFromImplementor=WSSERVLET60: ricevuta risposta dall''implementatore: {0}
-trace.servlet.writingFaultResponse=WSSERVLET61: scrittura della risposta di errore
-trace.servlet.writingSuccessResponse=WSSERVLET62: scrittura della risposta di operazione riuscita
-#
-html.nonRootPage.title= Servizio Web
-html.nonRootPage.body1= <p>In questo URL \u00E8 installato un servizio Web.</p>
-html.nonRootPage.body2= <p>URI richiesta non valido.</p><p>Controllare le informazioni sulla distribuzione.</p>
-# Usage not found. TODO Remove
-#html.nonRootPage.body3a= <p>Please refer to <a href=\'
-# Concatenated with html.nonRootPage.body3a
-#html.nonRootPage.body3b= \'>this page</a> for information about the deployed services.</p>
-html.wsdlPage.title= Servizio Web
-html.wsdlPage.noWsdl=<p>Nessun documento WSDL disponibile per la pubblicazione.</p><p>Controllare le informazioni sulla distribuzione.</p>
-html.rootPage.title= Servizio Web
-html.rootPage.body1=<p>In questo URL \u00E8 installato un servizio Web.</p>
-html.rootPage.body2a=<p>Supporta le seguenti porte:
-html.rootPage.body2b=</p>
-# Usage not found. TODO Remove
-#html.rootPage.body3a=<p>A WSDL description of these ports is available <a href='
-# Concatenated with html.rootPage.body3a
-#html.rootPage.body3b='>here.</a></p>
-html.rootPage.body4=<p>Questo endpoint \u00E8 configurato in modo errato. Controllare la posizione e il contenuto del file di configurazione.</p>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ja.properties
deleted file mode 100644
index e3ee6577..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ja.properties
+++ /dev/null
@@ -1,243 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-no.sunjaxws.xml=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF"{0}"\u304C\u3042\u308A\u307E\u305B\u3093
-
-listener.parsingFailed=WSSERVLET11: \u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF: {0}\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser\u306Fsun-jaxws.xml\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
-WSSERVLET11.diag.check.1=sun-jaxws.xml\u30D5\u30A1\u30A4\u30EB\u3092\u30C1\u30A7\u30C3\u30AF\u3057\u3001\u30D5\u30A1\u30A4\u30EB\u304C\u6B63\u3057\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
-WSSERVLET11.diag.cause.2=sun-jaxws.xml\u5B9F\u884C\u6642\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
-WSSERVLET11.diag.check.2=jaxrpc-ri.xml\u30D5\u30A1\u30A4\u30EB\u3092\u30C1\u30A7\u30C3\u30AF\u3057\u3001\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u304CWAR\u30D5\u30A1\u30A4\u30EB\u306B\u5B58\u5728\u3059\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
-
-
-listener.info.initialize=WSSERVLET12: JAX-WS\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30EA\u30B9\u30CA\u30FC\u3092\u521D\u671F\u5316\u3057\u3066\u3044\u307E\u3059
-WSSERVLET12.diag.cause.1=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30EA\u30B9\u30CA\u30FC\u3092\u8D77\u52D5\u3057\u3066\u3044\u307E\u3059
-WSSERVLET12.diag.check.1=\u901A\u5E38\u306EWeb\u30B5\u30FC\u30D3\u30B9\u3092\u8D77\u52D5\u3057\u3066\u3044\u307E\u3059
-
-listener.info.destroy=WSSERVLET13: JAX-WS\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30EA\u30B9\u30CA\u30FC\u3092\u7834\u68C4\u3057\u307E\u3057\u305F
-WSSERVLET13.diag.cause.1=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30EA\u30B9\u30CA\u30FC\u3092\u505C\u6B62\u3057\u307E\u3057\u305F
-WSSERVLET13.diag.check.1=\u901A\u5E38\u306EWeb\u30B5\u30FC\u30D3\u30B9\u3092\u505C\u6B62\u3057\u307E\u3057\u305F
-
-servlet.info.initialize=WSSERVLET14: JAX-WS\u30B5\u30FC\u30D6\u30EC\u30C3\u30C8\u3092\u521D\u671F\u5316\u3057\u3066\u3044\u307E\u3059
-WSSERVLET14.diag.cause.1=Web\u30B5\u30FC\u30D3\u30B9\u30FB\u30B5\u30FC\u30D6\u30EC\u30C3\u30C8\u3092\u8D77\u52D5\u3057\u3066\u3044\u307E\u3059\u3002
-WSSERVLET14.diag.check.1=\u901A\u5E38\u306EWeb\u30B5\u30FC\u30D3\u30B9\u306E\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u3067\u3059\u3002\u30B5\u30FC\u30D3\u30B9\u306E\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002
-
-servlet.info.destroy=WSSERVLET15: JAX-WS\u30B5\u30FC\u30D6\u30EC\u30C3\u30C8\u3092\u7834\u68C4\u3057\u307E\u3057\u305F
-WSSERVLET15.diag.cause.1=Web\u30B5\u30FC\u30D3\u30B9\u30FB\u30B5\u30FC\u30D6\u30EC\u30C3\u30C8\u3092\u505C\u6B62\u3057\u307E\u3057\u305F\u3002
-WSSERVLET15.diag.check.1=\u901A\u5E38\u306EWeb\u30B5\u30FC\u30D3\u30B9\u306E\u30A2\u30F3\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u3067\u3059\u3002\u30A2\u30F3\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002
-
-servlet.warning.missingContextInformation=WSSERVLET16: \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u60C5\u5831\u304C\u3042\u308A\u307E\u305B\u3093
-WSSERVLET16.diag.cause.1=WAR\u30D5\u30A1\u30A4\u30EB\u306Bjaxrpc-ri.xml\u30D5\u30A1\u30A4\u30EB\u304C\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
-WSSERVLET16.diag.check.1=\u30B5\u30FC\u30D3\u30B9WAR\u30D5\u30A1\u30A4\u30EB\u3092\u89E3\u51CD\u3057\u3001jaxrpc-ri-runtime.xml\u30D5\u30A1\u30A4\u30EB\u304C\u5B58\u5728\u3059\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
-
-
-servlet.warning.duplicateEndpointName=WSSERVLET17: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u540D\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059
-WSSERVLET17.diag.cause.1=\u540C\u3058\u540D\u524D\u306E2\u3064\u4EE5\u4E0A\u306E\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304Cjaxrpc-ri.xml\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306B\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-WSSERVLET17.diag.check.1=\u3053\u308C\u306B\u3088\u308A\u30B5\u30FC\u30D3\u30B9\u30FB\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u3067\u554F\u984C\u304C\u767A\u751F\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
-
-
-servlet.info.emptyRequestMessage=WSSERVLET18: \u7A7A\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F
-WSSERVLET18.diag.cause.1=\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306B\u3088\u308A\u9001\u4FE1\u3055\u308C\u305F\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u7A7A\u3067\u3059
-WSSERVLET18.diag.check.1=\u3053\u308C\u306F\u610F\u56F3\u7684\u306A\u5834\u5408\u3082\u3042\u308A\u307E\u3059\u3002\u610F\u56F3\u7684\u3067\u306A\u3044\u5834\u5408\u3001\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u30FB\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u30A8\u30E9\u30FC\u304C\u306A\u3044\u304B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-servlet.trace.gotRequestForEndpoint=WSSERVLET19: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8: {0}\u306B\u5BFE\u3059\u308B\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F
-WSSERVLET19.diag.cause.1=\u3053\u306E\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306B\u5BFE\u3059\u308B\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u304C\u5230\u7740\u3057\u307E\u3057\u305F
-WSSERVLET19.diag.check.1=\u5358\u306A\u308B\u60C5\u5831\u30E1\u30C3\u30BB\u30FC\u30B8\u3067\u3059\u3002\u901A\u5E38\u306E\u64CD\u4F5C\u3067\u3059\u3002
-
-servlet.error.noImplementorForEndpoint=WSSERVLET20: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8: {0}\u306E\u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF\u304C\u5B58\u5728\u3057\u307E\u305B\u3093
-WSSERVLET20.diag.cause.1=\u3053\u306E\u30B5\u30FC\u30D3\u30B9\u306E\u5B9F\u88C5\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-WSSERVLET20.diag.check.1=WAR\u3092\u89E3\u51CD\u3057\u307E\u3059\u3002tie\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30B7\u30EA\u30A2\u30E9\u30A4\u30B6\u30FB\u30AF\u30E9\u30B9\u306F\u898B\u3064\u304B\u308A\u307E\u3059\u304B\u3002
-
-servlet.trace.invokingImplementor=WSSERVLET21: \u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF\u3092\u547C\u3073\u51FA\u3057\u3066\u3044\u307E\u3059: {0}
-WSSERVLET21.diag.cause.1=Web\u30B5\u30FC\u30D3\u30B9\u3092\u547C\u3073\u51FA\u3057\u3066\u3044\u307E\u3059
-WSSERVLET21.diag.check.1=\u901A\u5E38\u306EWeb\u30B5\u30FC\u30D3\u30B9\u306E\u547C\u51FA\u3057\u3067\u3059\u3002
-
-servlet.error.noEndpointSpecified=WSSERVLET22: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-WSSERVLET22.diag.cause.1=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306A\u3057\u3067\u30EA\u30AF\u30A8\u30B9\u30C8\u304C\u547C\u3073\u51FA\u3055\u308C\u307E\u3057\u305F
-WSSERVLET22.diag.check.1=stub.setTargetEndpoint\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u3088\u308A\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044
-
-servlet.error.noResponseMessage=WSSERVLET23: \u30EC\u30B9\u30DD\u30F3\u30B9\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u3042\u308A\u307E\u305B\u3093
-WSSERVLET23.diag.cause.1=\u30EA\u30AF\u30A8\u30B9\u30C8\u306B\u3088\u308A\u30B5\u30FC\u30D3\u30B9\u304B\u3089\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u751F\u6210\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F
-WSSERVLET23.diag.check.1=\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u4E88\u671F\u3055\u308C\u305F\u5834\u5408\u3001\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u5B9F\u969B\u306B\u9001\u4FE1\u3055\u308C\u305F\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
-WSSERVLET23.diag.check.2=\u30EA\u30AF\u30A8\u30B9\u30C8\u304C\u6B63\u3057\u304F\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u30B5\u30FC\u30D3\u30B9\u306B\u3088\u308A\u53D7\u5165\u308C\u53EF\u80FD\u3067\u3059\u304C\u3001\u30EC\u30B9\u30DD\u30F3\u30B9\u306F\u751F\u6210\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F
-
-servlet.trace.writingFaultResponse=WSSERVLET24: \u30D5\u30A9\u30EB\u30C8\u30FB\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u66F8\u304D\u8FBC\u3093\u3067\u3044\u307E\u3059
-WSSERVLET24.diag.cause.1=SOAPFault\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306B\u8FD4\u3057\u3066\u3044\u307E\u3059\u3002
-WSSERVLET24.diag.check.1=\u30C8\u30EC\u30FC\u30B9\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D5\u30A9\u30EB\u30C8\u304C\u8A18\u9332\u3055\u308C\u307E\u3057\u305F\u3002
-
-servlet.trace.writingSuccessResponse=WSSERVLET25: \u6B63\u5E38\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u66F8\u304D\u8FBC\u3093\u3067\u3044\u307E\u3059
-WSSERVLET25.diag.cause.1=SOAPMessage\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306B\u8FD4\u3057\u3066\u3044\u307E\u3059
-WSSERVLET25.diag.check.1=\u30C8\u30EC\u30FC\u30B9\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3001\u901A\u5E38\u306E\u30EC\u30B9\u30DD\u30F3\u30B9\u3002
-
-servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306B\u91CD\u8907\u3057\u305FURL\u30D1\u30BF\u30FC\u30F3\u304C\u3042\u308A\u307E\u3059: {0}
-WSSERVLET26.diag.cause.1=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8URL\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059
-WSSERVLET26.diag.check.1=\u3053\u308C\u306B\u3088\u308A\u554F\u984C\u304C\u767A\u751F\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u91CD\u8907\u3057\u305F\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u3092\u524A\u9664\u3057\u3066\u304F\u3060\u3055\u3044
-
-servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8: {0}\u3067\u306F\u6697\u9ED9\u7684\u306AURL\u30D1\u30BF\u30FC\u30F3\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-WSSERVLET27.diag.cause.1=\u3053\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u306F\u6697\u9ED9\u7684\u306AURL\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-WSSERVLET27.diag.check.1=\u6697\u9ED9\u7684\u306AURL\u3092\u524A\u9664\u3057\u307E\u3059
-
-servlet.faultstring.missingPort=WSSERVLET28: \u30DD\u30FC\u30C8\u60C5\u5831\u304C\u3042\u308A\u307E\u305B\u3093
-WSSERVLET28.diag.cause.1=\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304Cnull\u3067\u3059
-WSSERVLET28.diag.check.1=stub.setTargetEndpoint()\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u3088\u308A\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-servlet.faultstring.portNotFound=WSSERVLET29: \u30DD\u30FC\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093({0})
-WSSERVLET29.diag.cause.1=\u30DD\u30FC\u30C8\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u5BFE\u5FDC\u3059\u308B\u30B5\u30FC\u30D3\u30B9\u5B9F\u88C5\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-WSSERVLET29.diag.check.1=\u30DD\u30FC\u30C8\u306F\u6709\u52B9\u3067\u3059\u304B\u3002WAR\u30D5\u30A1\u30A4\u30EB\u3092\u89E3\u51CD\u3057\u3001tie\u304A\u3088\u3073\u30B7\u30EA\u30A2\u30E9\u30A4\u30B6\u304C\u5B58\u5728\u3059\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
-
-servlet.faultstring.internalServerError=WSSERVLET30: \u5185\u90E8\u30B5\u30FC\u30D0\u30FC\u30FB\u30A8\u30E9\u30FC({0})
-WSSERVLET30.diag.cause.1=\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u51E6\u7406\u4E2D\u306B\u30B5\u30FC\u30D0\u30FC\u30FB\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-WSSERVLET30.diag.check.1=\u3053\u308C\u306B\u306F\u591A\u304F\u306E\u539F\u56E0\u304C\u8003\u3048\u3089\u308C\u307E\u3059\u3002\u30B5\u30FC\u30D0\u30FC\u30FB\u30ED\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u4F8B\u5916\u306E\u6709\u7121\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: \u524D\u306E\u4F8B\u5916\u304B\u3089\u306E\u56DE\u5FA9\u4E2D\u306Bthrowable\u3092\u6355\u6349\u3057\u307E\u3057\u305F: {0}
-WSSERVLET51.diag.cause.1=\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u30B5\u30FC\u30D3\u30B9\u51E6\u7406\u3067\u4F8B\u5916\u304C\u751F\u6210\u3055\u308C\u307E\u3057\u305F\u3002SOAPPFaultMessage\u3092\u8FD4\u3059\u51E6\u7406\u306E\u8A66\u884C\u4E2D\u306Bthrowable\u304C\u518D\u5EA6\u751F\u6210\u3055\u308C\u307E\u3057\u305F
-WSSERVLET51.diag.check.1=server.xml\u30ED\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u4F8B\u5916\u60C5\u5831\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
-
-error.servlet.caughtThrowable=WSSERVLET49: throwable\u3092\u6355\u6349\u3057\u307E\u3057\u305F: {0}
-WSSERVLET49.diag.cause.1=\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u30B5\u30FC\u30D3\u30B9\u51E6\u7406\u3067\u4F8B\u5916\u304C\u751F\u6210\u3055\u308C\u307E\u3057\u305F\u3002SOAPFaultMessage\u3092\u8FD4\u3059\u51E6\u7406\u306E\u8A66\u884C\u4E2D\u306Bthrowable\u304C\u518D\u5EA6\u751F\u6210\u3055\u308C\u307E\u3057\u305F
-WSSERVLET49.diag.check.1=server.xml\u30ED\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u4F8B\u5916\u60C5\u5831\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
-
-error.servlet.caughtThrowableInInit=WSSERVLET50: \u30B5\u30FC\u30D6\u30EC\u30C3\u30C8\u306E\u521D\u671F\u5316\u4E2D\u306Bthrowable\u3092\u6355\u6349\u3057\u307E\u3057\u305F: {0}
-WSSERVLET50.diag.cause.1=WS\u30E9\u30F3\u30BF\u30A4\u30E0sun-jaxws.xml\u307E\u305F\u306Fweb.xml\u304C\u6B63\u3057\u304F\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
-WSSERVLET50.diag.check.1=\u30B5\u30FC\u30D3\u30B9WAR\u30D5\u30A1\u30A4\u30EB\u3067sun-jaxws.xml\u304A\u3088\u3073web.xml\u304C\u6B63\u3057\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
-WSSERVLET50.diag.cause.2=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30B5\u30FC\u30D0\u30FC\u306E\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u6B63\u3057\u304F\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
-WSSERVLET50.diag.check.2=\u30B5\u30FC\u30D3\u30B9WAR\u30D5\u30A1\u30A4\u30EB\u3067\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30B5\u30FC\u30D0\u30FC\u306E\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u6B63\u3057\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
-WSSERVLET50.diag.cause.3=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30B5\u30FC\u30D0\u30FC\u306E\u521D\u671F\u5316\u306E\u554F\u984C\u304C\u767A\u751F\u3057\u305F\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
-WSSERVLET50.diag.check.3=\u30C9\u30E1\u30A4\u30F3\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Eserver.xml\u30D5\u30A1\u30A4\u30EB\u306B\u554F\u984C\u304C\u306A\u3044\u304B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
-
-publisher.info.applyingTransformation=WSSERVLET31: \u5B9F\u969B\u306E\u30A2\u30C9\u30EC\u30B9\u3067\u5909\u63DB\u3092\u9069\u7528\u3057\u3066\u3044\u307E\u3059: {0}
-WSSERVLET31.diag.cause.1=\u5909\u63DB\u3092\u9069\u7528\u3057\u3066\u3044\u307E\u3059
-WSSERVLET31.diag.check.1=\u901A\u5E38\u306E\u64CD\u4F5C
-
-publisher.info.generatingWSDL=WSSERVLET32: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8: {0}\u306B\u3064\u3044\u3066WSDL\u3092\u751F\u6210\u3057\u3066\u3044\u307E\u3059
-WSSERVLET32.diag.cause.1=WSDL\u3092\u751F\u6210\u3057\u3066\u3044\u307E\u3059
-WSSERVLET32.diag.check.1=\u901A\u5E38\u306E\u64CD\u4F5C\u3067\u3059\u3002
-
-exception.cannotCreateTransformer=WSSERVLET33: \u30C8\u30E9\u30F3\u30B9\u30D5\u30A9\u30FC\u30DE\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-WSSERVLET33.diag.cause.1=\u30B5\u30FC\u30D3\u30B9WSDL\u3092\u30D1\u30D6\u30EA\u30C3\u30B7\u30E5\u3059\u308B\u969B\u306B\u3001XSLT\u5909\u63DB\u3092\u4F7F\u7528\u3057\u3066HTTP\u306E\u5834\u6240\u306B\u30C7\u30D7\u30ED\u30A4\u6E08\u306E\u5834\u6240/\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304C\u30D1\u30C3\u30C1\u3055\u308C\u307E\u3059\u3002\u5909\u63DB\u3092\u884C\u3046\u305F\u3081\u306E\u30C8\u30E9\u30F3\u30B9\u30D5\u30A9\u30FC\u30DE\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002
-WSSERVLET33.diag.check.1=\u4E92\u63DB\u6027\u306E\u306A\u3044\u5909\u63DB\u30A8\u30F3\u30B8\u30F3\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u6B63\u3057\u3044\u30C8\u30E9\u30F3\u30B9\u30D5\u30A9\u30FC\u30DE\u304A\u3088\u3073\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-WSSERVLET33.diag.cause.2=\u30B5\u30FC\u30D3\u30B9WSDL\u3092\u30D1\u30D6\u30EA\u30C3\u30B7\u30E5\u3059\u308B\u969B\u306B\u3001XSLT\u5909\u63DB\u3092\u4F7F\u7528\u3057\u3066HTTP\u306E\u5834\u6240\u306B\u30C7\u30D7\u30ED\u30A4\u6E08\u306E\u5834\u6240/\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304C\u30D1\u30C3\u30C1\u3055\u308C\u307E\u3059\u3002\u5909\u63DB\u3092\u884C\u3046\u305F\u3081\u306E\u30C8\u30E9\u30F3\u30B9\u30D5\u30A9\u30FC\u30DE\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002
-WSSERVLET33.diag.check.2=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u304B\u4E92\u63DB\u6027\u306E\u306A\u3044\u5909\u63DB\u30A8\u30F3\u30B8\u30F3\u304C\u5B58\u5728\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002server.xml\u30D5\u30A1\u30A4\u30EB\u3067\u4F8B\u5916\u306E\u6709\u7121\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-
-exception.transformationFailed=WSSERVLET34: \u5909\u63DB\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}
-WSSERVLET34.diag.cause.1=\u5909\u63DB\u306E\u8A66\u884C\u4E2D\u306B\u3001WSDL\u3067\u306E\u5834\u6240\u306E\u30D1\u30C3\u30C1\u9069\u7528\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-WSSERVLET34.diag.check.1=\u30A8\u30E9\u30FC/\u4F8B\u5916\u306E\u8A73\u7D30\u306F\u3001\u30ED\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-exception.templateCreationFailed=WSSERVLET35: \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30FB\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u4F5C\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-WSSERVLET35.diag.cause.1=\u5909\u63DB\u3092\u4F7F\u7528\u3057\u305FWSDL\u306E\u5834\u6240\u306E\u30D1\u30C3\u30C1\u9069\u7528\u3067\u306F\u3001XSLT\u30B9\u30BF\u30A4\u30EB\u30B7\u30FC\u30C8\u30FB\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304C\u4F5C\u6210\u3055\u308C\u307E\u3059\u3002\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u4F5C\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-WSSERVLET35.diag.check.1=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u4F5C\u6210\u4E2D\u306B\u4F8B\u5916\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3057\u305F\u3002\u8A73\u7D30\u306F\u3001\u4F8B\u5916\u304A\u3088\u3073\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-servlet.html.method=WSSERVLET63: \u3053\u306E\u30BF\u30A4\u30D7\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306B\u306FPOST\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-WSSERVLET63.diag.cause.1=Web\u30B5\u30FC\u30D3\u30B9\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u3067\u306FHTTP POST\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: WSI BP 1.0
-WSSERVLET63.diag.check.1=HTTP\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u304C(GET\u30EA\u30AF\u30A8\u30B9\u30C8\u3067\u306F\u306A\u304F)POST\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
-
-
-servlet.faultstring.invalidContentType=WSSERVLET64: \u7121\u52B9\u306AContent-Type\u3067\u3059\u3002text/xml\u304C\u5FC5\u8981\u3067\u3059
-WSSERVLET64.diag.cause.1=Web\u30B5\u30FC\u30D3\u30B9\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30BF\u30A4\u30D7\u306Ftext/xml\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: WSI BP 1.0
-WSSERVLET64.diag.check.1=\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u3067text/xml\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044
-
-error.implementorFactory.newInstanceFailed=WSSERVLET43: \u30DD\u30FC\u30C8\"{0}\"\u306E\u30B5\u30FC\u30D3\u30B9\u30FB\u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-WSSERVLET43.diag.cause.1=Web\u30B5\u30FC\u30D3\u30B9\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-WSSERVLET43.diag.check.1=Web\u30B5\u30FC\u30D3\u30B9\u304C\u4F7F\u7528\u53EF\u80FD\u304B\u3064\u30D1\u30D6\u30EA\u30C3\u30AF\u3067\u3042\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u8A73\u7D30\u306F\u4F8B\u5916\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044
-
-error.implementorFactory.servantInitFailed=WSSERVLET44: \u30DD\u30FC\u30C8\"{0}\"\u306E\u30B5\u30FC\u30D3\u30B9\u30FB\u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF\u306E\u521D\u671F\u5316\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-WSSERVLET44.diag.cause.1=Web\u30B5\u30FC\u30D3\u30B9\u306F\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3055\u308C\u307E\u3057\u305F\u304C\u3001\u521D\u671F\u5316\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
-WSSERVLET44.diag.check.1=\u8A73\u7D30\u306F\u4F8B\u5916\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u69CB\u6210\u30D5\u30A1\u30A4\u30EB\u304C\u3059\u3079\u3066\u6B63\u3057\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-
-#not used by anything currently
-servlet.faultstring.invalidSOAPAction=WSSERVLET65: \u5FC5\u9808\u306E\u30D8\u30C3\u30C0\u30FCSOAPAction\u304C\u7121\u52B9\u3067\u3059
-WSSERVLET65.diag.cause.1=SOAP\u30A2\u30AF\u30B7\u30E7\u30F3\u306F\u5FC5\u9808\u3067\u3059
-WSSERVLET65.diag.check.1=SOAPAction\u304A\u3088\u3073\u9069\u5207\u306A\u5024\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044
-
-# {0} - URI
-servlet.no.address.available={0}\u306B\u4F7F\u7528\u3067\u304D\u308B\u30A2\u30C9\u30EC\u30B9\u304C\u3042\u308A\u307E\u305B\u3093
-
-servlet.html.title= Web\u30B5\u30FC\u30D3\u30B9
-servlet.html.title2=<h1>Web\u30B5\u30FC\u30D3\u30B9</h1>
-servlet.html.noInfoAvailable=<p>JAX-WS\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u60C5\u5831\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002</p>
-servlet.html.columnHeader.portName=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8
-servlet.html.columnHeader.status=\u30B9\u30C6\u30FC\u30BF\u30B9
-servlet.html.columnHeader.information=\u60C5\u5831
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.active=ACTIVE
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.error=ERROR
-servlet.html.endpoint.table=<table border=\"0\"><tr><td>\u30B5\u30FC\u30D3\u30B9\u540D\:</td><td>{0}</td></tr><tr><td>\u30DD\u30FC\u30C8\u540D\:</td><td>{1}</td></tr></table>
-servlet.html.information.table=<table border=\"0\"><tr><td>\u30A2\u30C9\u30EC\u30B9\:</td><td>{0}</td></tr><tr><td>WSDL\:</td><td><a href\="{0}?wsdl">{0}?wsdl</a></td></tr><tr><td>\u5B9F\u88C5\u30AF\u30E9\u30B9\:</td><td>{1}</td></tr></table>
-servlet.html.notFound=<h1>404\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}</h1>
-
-
-#
-#
-# all the following properties are used by the http/ea package
-# these properties are not longer used as http/ea is no longer used
-#
-error.implementorFactory.noConfiguration=WSSERVLET36: \u69CB\u6210\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-error.implementorFactory.noInputStream=WSSERVLET37: \u69CB\u6210\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-error.implementorRegistry.unknownName=WSSERVLET38: \u4E0D\u660E\u306A\u30DD\u30FC\u30C8\u540D: {0}
-error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: \u69CB\u6210\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093
-error.implementorRegistry.classNotFound=WSSERVLET40: \u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
-error.implementorRegistry.incompleteInformation=WSSERVLET41: \u69CB\u6210\u60C5\u5831\u304C\u4E0D\u5341\u5206\u3067\u3059
-error.implementorRegistry.duplicateName=WSSERVLET42: \u91CD\u8907\u3057\u305F\u30DD\u30FC\u30C8\u540D: {0}
-
-error.implementorRegistry.fileNotFound=WSSERVLET45: \u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
-error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: \u69CB\u6210\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093
-error.servlet.init.config.parameter.missing=WSSERVLET47: \u69CB\u6210\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: \"{0}\"
-error.servlet.init.config.fileNotFound=WSSERVLET48: \u69CB\u6210\u30D5\u30A1\u30A4\u30EB: \"{0}\"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-#
-
-error.servlet.noImplementorForPort=WSSERVLET52: \u30DD\u30FC\u30C8: {0}\u306B\u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF\u304C\u767B\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-error.servlet.noPortSpecified=WSSERVLET53: HTTP POST\u30EA\u30AF\u30A8\u30B9\u30C8URL\u306B\u30DD\u30FC\u30C8\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-error.servlet.noResponseWasProduced=WSSERVLET54: \u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u751F\u6210\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F(\u5185\u90E8\u30A8\u30E9\u30FC)
-#
-info.servlet.gotEmptyRequestMessage=WSSERVLET55: \u7A7A\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F
-info.servlet.initializing=WSSERVLET56: JAX-WS\u30B5\u30FC\u30D6\u30EC\u30C3\u30C8: \u521D\u671F\u5316
-info.servlet.destroying=WSSERVLET57: JAX-WS\u30B5\u30FC\u30D6\u30EC\u30C3\u30C8: \u7834\u68C4
-#
-trace.servlet.requestForPortNamed=WSSERVLET58: \u30DD\u30FC\u30C8: {0}\u306B\u5BFE\u3059\u308B\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F
-trace.servlet.handingRequestOverToImplementor=WSSERVLET59: \u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF: {0}\u306B\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u6E21\u3057\u3066\u3044\u307E\u3059
-trace.servlet.gotResponseFromImplementor=WSSERVLET60: \u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF: {0}\u304B\u3089\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F
-trace.servlet.writingFaultResponse=WSSERVLET61: \u30D5\u30A9\u30EB\u30C8\u30FB\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u66F8\u304D\u8FBC\u3093\u3067\u3044\u307E\u3059
-trace.servlet.writingSuccessResponse=WSSERVLET62: \u6B63\u5E38\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u66F8\u304D\u8FBC\u3093\u3067\u3044\u307E\u3059
-#
-html.nonRootPage.title= Web\u30B5\u30FC\u30D3\u30B9
-html.nonRootPage.body1= <p>Web\u30B5\u30FC\u30D3\u30B9\u306F\u3053\u306EURL\u3067\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u307E\u3059\u3002</p>
-html.nonRootPage.body2= <p>\u7121\u52B9\u306A\u30EA\u30AF\u30A8\u30B9\u30C8URI\u3067\u3059\u3002</p><p>\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u60C5\u5831\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002</p>
-# Usage not found. TODO Remove
-#html.nonRootPage.body3a= <p>Please refer to <a href=\'
-# Concatenated with html.nonRootPage.body3a
-#html.nonRootPage.body3b= \'>this page</a> for information about the deployed services.</p>
-html.wsdlPage.title= Web\u30B5\u30FC\u30D3\u30B9
-html.wsdlPage.noWsdl=<p>\u30D1\u30D6\u30EA\u30C3\u30B7\u30E5\u306B\u4F7F\u7528\u3067\u304D\u308BWSDL\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u304C\u3042\u308A\u307E\u305B\u3093\u3002</p><p>\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u60C5\u5831\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002</p>
-html.rootPage.title= Web\u30B5\u30FC\u30D3\u30B9
-html.rootPage.body1=<p>Web\u30B5\u30FC\u30D3\u30B9\u306F\u3053\u306EURL\u3067\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u307E\u3059\u3002</p>
-html.rootPage.body2a=<p>\u6B21\u306E\u30DD\u30FC\u30C8\u304C\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u3059:
-html.rootPage.body2b=</p>
-# Usage not found. TODO Remove
-#html.rootPage.body3a=<p>A WSDL description of these ports is available <a href='
-# Concatenated with html.rootPage.body3a
-#html.rootPage.body3b='>here.</a></p>
-html.rootPage.body4=<p>\u3053\u306E\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306F\u6B63\u3057\u304F\u69CB\u6210\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u69CB\u6210\u30D5\u30A1\u30A4\u30EB\u306E\u5834\u6240\u304A\u3088\u3073\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002</p>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ko.properties
deleted file mode 100644
index c46c0dc2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ko.properties
+++ /dev/null
@@ -1,243 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-no.sunjaxws.xml=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790 "{0}"\uC774(\uAC00) \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-listener.parsingFailed=WSSERVLET11: \uB7F0\uD0C0\uC784 \uAE30\uC220\uC790\uC758 \uAD6C\uBB38 \uBD84\uC11D \uC2E4\uD328: {0}
-JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser\uAC00 sun-jaxws.xml \uB7F0\uD0C0\uC784 \uAE30\uC220\uC790\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-WSSERVLET11.diag.check.1=sun-jaxws.xml \uD30C\uC77C\uC5D0\uC11C \uC62C\uBC14\uB978\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-WSSERVLET11.diag.cause.2=sun-jaxws.xml \uB7F0\uD0C0\uC784 \uBC30\uCE58 \uAE30\uC220\uC790\uAC00 \uB204\uB77D\uB41C \uAC83 \uAC19\uC2B5\uB2C8\uB2E4.
-WSSERVLET11.diag.check.2=jaxrpc-ri.xml \uD30C\uC77C\uC5D0\uC11C war \uD30C\uC77C\uC5D0 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-
-listener.info.initialize=WSSERVLET12: JAX-WS \uCEE8\uD14D\uC2A4\uD2B8 \uB9AC\uC2A4\uB108\uB97C \uCD08\uAE30\uD654\uD558\uB294 \uC911
-WSSERVLET12.diag.cause.1=\uCEE8\uD14D\uC2A4\uD2B8 \uB9AC\uC2A4\uB108\uB97C \uC2DC\uC791\uD558\uB294 \uC911
-WSSERVLET12.diag.check.1=\uC815\uC0C1\uC801\uC778 \uC6F9 \uC11C\uBE44\uC2A4 \uC2DC\uC791
-
-listener.info.destroy=WSSERVLET13: JAX-WS \uCEE8\uD14D\uC2A4\uD2B8 \uB9AC\uC2A4\uB108\uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-WSSERVLET13.diag.cause.1=\uCEE8\uD14D\uC2A4\uD2B8 \uB9AC\uC2A4\uB108 \uC885\uB8CC
-WSSERVLET13.diag.check.1=\uC815\uC0C1\uC801\uC778 \uC6F9 \uC11C\uBE44\uC2A4 \uC885\uB8CC
-
-servlet.info.initialize=WSSERVLET14: JAX-WS \uC11C\uBE14\uB9BF\uC744 \uCD08\uAE30\uD654\uD558\uB294 \uC911
-WSSERVLET14.diag.cause.1=\uC6F9 \uC11C\uBE44\uC2A4 \uC11C\uBE14\uB9BF\uC744 \uC2DC\uC791\uD558\uB294 \uC911\uC785\uB2C8\uB2E4.
-WSSERVLET14.diag.check.1=\uC815\uC0C1\uC801\uC778 \uC6F9 \uC11C\uBE44\uC2A4 \uBC30\uCE58\uC785\uB2C8\uB2E4. \uC11C\uBE44\uC2A4 \uBC30\uCE58\uAC00 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-servlet.info.destroy=WSSERVLET15: JAX-WS \uC11C\uBE14\uB9BF\uC774 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-WSSERVLET15.diag.cause.1=\uC6F9 \uC11C\uBE44\uC2A4 \uC11C\uBE14\uB9BF\uC774 \uC885\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-WSSERVLET15.diag.check.1=\uC815\uC0C1\uC801\uC778 \uC6F9 \uC11C\uBE44\uC2A4 \uBC30\uCE58 \uD574\uC81C\uC785\uB2C8\uB2E4. \uBC30\uCE58 \uD574\uC81C\uAC00 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-servlet.warning.missingContextInformation=WSSERVLET16: \uCEE8\uD14D\uC2A4\uD2B8 \uC815\uBCF4\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-WSSERVLET16.diag.cause.1=war \uD30C\uC77C\uC5D0 jaxrpc-ri.xml \uD30C\uC77C\uC774 \uB204\uB77D\uB41C \uAC83 \uAC19\uC2B5\uB2C8\uB2E4.
-WSSERVLET16.diag.check.1=\uC11C\uBE44\uC2A4 war \uD30C\uC77C\uC758 \uC555\uCD95\uC744 \uD478\uC2ED\uC2DC\uC624. jaxrpc-ri-runtime.xml \uD30C\uC77C\uC774 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-
-servlet.warning.duplicateEndpointName=WSSERVLET17: \uB05D\uC810 \uC774\uB984\uC774 \uC911\uBCF5\uB429\uB2C8\uB2E4.
-WSSERVLET17.diag.cause.1=\uB3D9\uC77C\uD55C \uC774\uB984\uC744 \uC0AC\uC6A9\uD558\uB294 \uB450 \uAC1C \uC774\uC0C1\uC758 \uB05D\uC810\uC774 jaxrpc-ri.xml \uB7F0\uD0C0\uC784 \uAE30\uC220\uC790\uC5D0\uC11C \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-WSSERVLET17.diag.check.1=\uC774\uB85C \uC778\uD574 \uC11C\uBE44\uC2A4 \uBC30\uCE58 \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-
-
-servlet.info.emptyRequestMessage=WSSERVLET18: \uBE48 \uC694\uCCAD \uBA54\uC2DC\uC9C0\uB97C \uAC00\uC838\uC654\uC2B5\uB2C8\uB2E4.
-WSSERVLET18.diag.cause.1=\uD074\uB77C\uC774\uC5B8\uD2B8\uAC00 \uC804\uC1A1\uD55C \uBA54\uC2DC\uC9C0\uAC00 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
-WSSERVLET18.diag.check.1=\uC758\uB3C4\uC801\uC778 \uAC83\uC77C \uC218\uB3C4 \uC788\uACE0, \uC758\uB3C4\uC801\uC778 \uAC83\uC774 \uC544\uB2D0 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC758\uB3C4\uC801\uC778 \uAC83\uC774 \uC544\uB2D0 \uACBD\uC6B0 \uD074\uB77C\uC774\uC5B8\uD2B8 \uD504\uB85C\uADF8\uB7A8\uC5D0\uC11C \uC624\uB958\uB97C \uAC80\uC0AC\uD558\uC2ED\uC2DC\uC624.
-
-servlet.trace.gotRequestForEndpoint=WSSERVLET19: \uB05D\uC810\uC5D0 \uB300\uD55C \uC694\uCCAD\uC744 \uAC00\uC838\uC634: {0}
-WSSERVLET19.diag.cause.1=\uC774 \uB05D\uC810\uC5D0 \uB300\uD55C \uD074\uB77C\uC774\uC5B8\uD2B8 \uC694\uCCAD\uC774 \uB3C4\uCC29\uD588\uC2B5\uB2C8\uB2E4.
-WSSERVLET19.diag.check.1=\uB2E8\uC21C\uD55C \uC815\uBCF4 \uBA54\uC2DC\uC9C0\uC785\uB2C8\uB2E4. \uC815\uC0C1\uC801\uC778 \uC791\uC5C5\uC785\uB2C8\uB2E4.
-
-servlet.error.noImplementorForEndpoint=WSSERVLET20: \uB05D\uC810\uC5D0 \uB300\uD55C \uAD6C\uD604\uC790\uAC00 \uC5C6\uC74C: {0}
-WSSERVLET20.diag.cause.1=\uC774 \uC11C\uBE44\uC2A4\uC5D0 \uB300\uD55C \uAD6C\uD604\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-WSSERVLET20.diag.check.1=war\uC758 \uC555\uCD95\uC744 \uD478\uC2ED\uC2DC\uC624. tie \uBC0F serializer \uD074\uB798\uC2A4\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uAE4C?
-
-servlet.trace.invokingImplementor=WSSERVLET21: \uAD6C\uD604\uC790\uB97C \uD638\uCD9C\uD558\uB294 \uC911: {0}
-WSSERVLET21.diag.cause.1=\uC6F9 \uC11C\uBE44\uC2A4\uB97C \uD638\uCD9C\uD558\uB294 \uC911\uC785\uB2C8\uB2E4.
-WSSERVLET21.diag.check.1=\uC815\uC0C1\uC801\uC778 \uC6F9 \uC11C\uBE44\uC2A4 \uD638\uCD9C\uC785\uB2C8\uB2E4.
-
-servlet.error.noEndpointSpecified=WSSERVLET22: \uC9C0\uC815\uB41C \uB05D\uC810\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-WSSERVLET22.diag.cause.1=\uC694\uCCAD\uC774 \uB05D\uC810 \uC5C6\uC774 \uD638\uCD9C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-WSSERVLET22.diag.check.1=stub.setTargetEndpoint \uC18D\uC131\uC73C\uB85C \uB05D\uC810\uC744 \uC124\uC815\uD558\uC2ED\uC2DC\uC624.
-
-servlet.error.noResponseMessage=WSSERVLET23: \uC751\uB2F5 \uBA54\uC2DC\uC9C0\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-WSSERVLET23.diag.cause.1=\uC694\uCCAD\uC774 \uC11C\uBE44\uC2A4\uB85C\uBD80\uD130 \uC751\uB2F5\uC744 \uC0DD\uC131\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-WSSERVLET23.diag.check.1=\uC751\uB2F5\uC774 \uD544\uC694\uD55C \uACBD\uC6B0 \uC694\uCCAD \uBA54\uC2DC\uC9C0\uAC00 \uC2E4\uC81C\uB85C \uC804\uC1A1\uB418\uC5C8\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-WSSERVLET23.diag.check.2=\uD615\uC2DD\uC774 \uC798\uBABB\uB418\uC5C8\uC744 \uC218 \uC788\uB294 \uC694\uCCAD\uC744 \uC11C\uBE44\uC2A4\uAC00 \uC2B9\uC778\uD588\uC73C\uBA70 \uC751\uB2F5\uC774 \uC0DD\uC131\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-
-servlet.trace.writingFaultResponse=WSSERVLET24: \uACB0\uD568 \uC751\uB2F5\uC744 \uC4F0\uB294 \uC911
-WSSERVLET24.diag.cause.1=SOAPFault \uBA54\uC2DC\uC9C0\uB97C \uD074\uB77C\uC774\uC5B8\uD2B8\uB85C \uBC18\uD658\uD558\uB294 \uC911\uC785\uB2C8\uB2E4.
-WSSERVLET24.diag.check.1=\uBA54\uC2DC\uC9C0 \uCD94\uC801 \uACB0\uD568\uC774 \uAE30\uB85D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-servlet.trace.writingSuccessResponse=WSSERVLET25: \uC131\uACF5 \uC751\uB2F5\uC744 \uC4F0\uB294 \uC911
-WSSERVLET25.diag.cause.1=SOAPMessage \uC751\uB2F5\uC744 \uD074\uB77C\uC774\uC5B8\uD2B8\uB85C \uBC18\uD658\uD558\uB294 \uC911\uC785\uB2C8\uB2E4.
-WSSERVLET25.diag.check.1=\uBA54\uC2DC\uC9C0\uB97C \uCD94\uC801\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \uC815\uC0C1\uC801\uC778 \uC751\uB2F5\uC785\uB2C8\uB2E4.
-
-servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: \uB05D\uC810\uC5D0 \uC911\uBCF5 URL \uD328\uD134\uC774 \uC788\uC74C: {0}
-WSSERVLET26.diag.cause.1=\uB05D\uC810 URL\uC774 \uC911\uBCF5\uB429\uB2C8\uB2E4.
-WSSERVLET26.diag.check.1=\uC774\uB85C \uC778\uD574 \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC911\uBCF5 \uB05D\uC810\uC744 \uC81C\uAC70\uD558\uC2ED\uC2DC\uC624.
-
-servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: \uB05D\uC810\uC5D0 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC554\uC2DC\uC801 URL \uD328\uD134\uC774 \uC788\uC74C: {0}
-WSSERVLET27.diag.cause.1=\uC774 \uB9B4\uB9AC\uC2A4\uC5D0\uC11C\uB294 \uC554\uC2DC\uC801 URL\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-WSSERVLET27.diag.check.1=\uC554\uC2DC\uC801 URL\uC744 \uC81C\uAC70\uD558\uC2ED\uC2DC\uC624.
-
-servlet.faultstring.missingPort=WSSERVLET28: \uD3EC\uD2B8 \uC815\uBCF4\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-WSSERVLET28.diag.cause.1=\uB300\uC0C1 \uB05D\uC810\uC774 \uB110\uC785\uB2C8\uB2E4.
-WSSERVLET28.diag.check.1=stub.setTargetEndpoint() \uC18D\uC131\uC73C\uB85C \uB300\uC0C1 \uB05D\uC810\uC744 \uC124\uC815\uD558\uC2ED\uC2DC\uC624.
-
-servlet.faultstring.portNotFound=WSSERVLET29: \uD3EC\uD2B8\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4({0}).
-WSSERVLET29.diag.cause.1=\uD3EC\uD2B8\uAC00 \uC9C0\uC815\uB418\uC5C8\uC9C0\uB9CC \uD574\uB2F9 \uC11C\uBE44\uC2A4 \uAD6C\uD604\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-WSSERVLET29.diag.check.1=\uD3EC\uD2B8\uAC00 \uC801\uD569\uD569\uB2C8\uAE4C? war \uD30C\uC77C\uC758 \uC555\uCD95\uC744 \uD480\uACE0 tie \uBC0F serializer\uAC00 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-servlet.faultstring.internalServerError=WSSERVLET30: \uB0B4\uBD80 \uC11C\uBC84 \uC624\uB958({0})
-WSSERVLET30.diag.cause.1=\uC694\uCCAD\uC744 \uCC98\uB9AC\uD558\uB294 \uC911 \uC11C\uBC84 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-WSSERVLET30.diag.check.1=\uC808 \uC218\uB85C \uC778\uD55C \uAC83\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC608\uC678 \uC0AC\uD56D\uC740 \uC11C\uBC84 \uB85C\uADF8 \uD30C\uC77C\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: \uC774\uC804 \uC608\uC678 \uC0AC\uD56D\uC5D0\uC11C \uBCF5\uAD6C\uD558\uB294 \uC911 throwable\uC744 \uAC10\uC9C0\uD568: {0}
-WSSERVLET51.diag.cause.1=\uC694\uCCAD\uC758 \uC11C\uBE44\uC2A4 \uCC98\uB9AC\uB85C \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. SOAPPFaultMessage\uB97C \uBC18\uD658\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 throwable\uC774 \uB2E4\uC2DC \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-WSSERVLET51.diag.check.1=\uC608\uC678 \uC0AC\uD56D \uC815\uBCF4\uB294 server.xml \uB85C\uADF8 \uD30C\uC77C\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-error.servlet.caughtThrowable=WSSERVLET49: throwable\uC744 \uAC10\uC9C0\uD568: {0}
-WSSERVLET49.diag.cause.1=\uC694\uCCAD\uC758 \uC11C\uBE44\uC2A4 \uCC98\uB9AC\uB85C \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. SOAPFaultMessage\uB97C \uBC18\uD658\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 throwable\uC774 \uB2E4\uC2DC \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-WSSERVLET49.diag.check.1=\uC608\uC678 \uC0AC\uD56D \uC815\uBCF4\uB294 server.xml \uB85C\uADF8 \uD30C\uC77C\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-error.servlet.caughtThrowableInInit=WSSERVLET50: \uC11C\uBE14\uB9BF \uCD08\uAE30\uD654 \uC911 throwable\uC744 \uAC10\uC9C0\uD568: {0}
-WSSERVLET50.diag.cause.1=WS \uB7F0\uD0C0\uC784 sun-jaxws.xml \uB610\uB294 web.xml\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 \uAC83 \uAC19\uC2B5\uB2C8\uB2E4.
-WSSERVLET50.diag.check.1=\uC11C\uBE44\uC2A4 war \uD30C\uC77C\uC5D0\uC11C sun-jaxws.xml \uBC0F web.xml\uC774 \uC62C\uBC14\uB978\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-WSSERVLET50.diag.cause.2=\uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uC11C\uBC84 \uBC30\uCE58 \uAE30\uC220\uC790\uAC00 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 \uAC83 \uAC19\uC2B5\uB2C8\uB2E4.
-WSSERVLET50.diag.check.2=\uC11C\uBE44\uC2A4 war \uD30C\uC77C\uC5D0\uC11C \uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uC11C\uBC84 \uBC30\uCE58 \uAE30\uC220\uC790\uAC00 \uC62C\uBC14\uB978\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-WSSERVLET50.diag.cause.3=\uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uC11C\uBC84 \uCD08\uAE30\uD654 \uBB38\uC81C\uAC00 \uC788\uB294 \uAC83 \uAC19\uC2B5\uB2C8\uB2E4.
-WSSERVLET50.diag.check.3=\uC624\uB958\uB294 \uB3C4\uBA54\uC778 \uB514\uB809\uD1A0\uB9AC\uC758 server.xml \uD30C\uC77C\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-publisher.info.applyingTransformation=WSSERVLET31: \uC2E4\uC81C \uC8FC\uC18C\uB85C \uBCC0\uD658\uC744 \uC801\uC6A9\uD558\uB294 \uC911: {0}
-WSSERVLET31.diag.cause.1=\uBCC0\uD658\uC744 \uC801\uC6A9\uD558\uB294 \uC911
-WSSERVLET31.diag.check.1=\uC815\uC0C1\uC801\uC778 \uC791\uC5C5
-
-publisher.info.generatingWSDL=WSSERVLET32: \uB05D\uC810\uC5D0 \uB300\uD55C WSDL\uC744 \uC0DD\uC131\uD558\uB294 \uC911: {0}
-WSSERVLET32.diag.cause.1=WSDL\uC744 \uC0DD\uC131\uD558\uB294 \uC911
-WSSERVLET32.diag.check.1=\uC815\uC0C1\uC801\uC778 \uC791\uC5C5\uC785\uB2C8\uB2E4.
-
-exception.cannotCreateTransformer=WSSERVLET33: \uBCC0\uD658\uAE30\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-WSSERVLET33.diag.cause.1=\uC11C\uBE44\uC2A4 WSDL\uC744 \uAC8C\uC2DC\uD560 \uB54C XSLT \uBCC0\uD658\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBC30\uCE58\uB41C \uC704\uCE58/\uB05D\uC810\uACFC \uD568\uAED8 HTTP \uC704\uCE58\uC5D0 \uD328\uCE58\uAC00 \uC801\uC6A9\uB429\uB2C8\uB2E4. \uBCC0\uD658 \uC218\uD589\uC5D0 \uD544\uC694\uD55C \uBCC0\uD658\uAE30\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-WSSERVLET33.diag.check.1=\uD638\uD658\uB418\uC9C0 \uC54A\uB294 \uBCC0\uD658 \uC5D4\uC9C4\uC744 \uC0AC\uC6A9\uD558\uACE0 \uC788\uB294 \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. \uC62C\uBC14\uB978 \uBCC0\uD658\uAE30\uC640 \uBC84\uC804\uC744 \uC0AC\uC6A9 \uC911\uC778\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-WSSERVLET33.diag.cause.2=\uC11C\uBE44\uC2A4 WSDL\uC744 \uAC8C\uC2DC\uD560 \uB54C XSLT \uBCC0\uD658\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBC30\uCE58\uB41C \uC704\uCE58/\uB05D\uC810\uACFC \uD568\uAED8 HTTP \uC704\uCE58\uC5D0 \uD328\uCE58\uAC00 \uC801\uC6A9\uB429\uB2C8\uB2E4. \uBCC0\uD658 \uC218\uD589\uC5D0 \uD544\uC694\uD55C \uBCC0\uD658\uAE30\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-WSSERVLET33.diag.check.2=\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uAC70\uB098 \uD638\uD658\uB418\uC9C0 \uC54A\uB294 \uBCC0\uD658 \uC5D4\uC9C4\uC774 \uC788\uB294 \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. \uC608\uC678 \uC0AC\uD56D\uC740 server.xml \uD30C\uC77C\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-
-exception.transformationFailed=WSSERVLET34: \uBCC0\uD658 \uC2E4\uD328: {0}
-WSSERVLET34.diag.cause.1=\uBCC0\uD658\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 WSDL\uC5D0\uC11C \uC704\uCE58 \uD328\uCE58 \uC801\uC6A9\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-WSSERVLET34.diag.check.1=\uC790\uC138\uD55C \uC624\uB958/\uC608\uC678 \uC0AC\uD56D\uC740 \uB85C\uADF8 \uD30C\uC77C\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-exception.templateCreationFailed=WSSERVLET35: \uD15C\uD50C\uB9AC\uD2B8 \uAC1D\uCCB4 \uC0DD\uC131\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-WSSERVLET35.diag.cause.1=\uBCC0\uD658\uC744 \uD1B5\uD55C WSDL \uC704\uCE58 \uD328\uCE58 \uC801\uC6A9\uC744 \uC704\uD574 XSLT \uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uD15C\uD50C\uB9AC\uD2B8\uAC00 \uC0DD\uC131\uB429\uB2C8\uB2E4. \uD15C\uD50C\uB9AC\uD2B8 \uC0DD\uC131\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-WSSERVLET35.diag.check.1=\uD15C\uD50C\uB9AC\uD2B8 \uC0DD\uC131 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uC608\uC678 \uC0AC\uD56D \uBC0F \uC2A4\uD0DD \uCD94\uC801\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-servlet.html.method=WSSERVLET63: \uC774 \uC720\uD615\uC758 \uC694\uCCAD\uC5D0 Post\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4.
-WSSERVLET63.diag.cause.1=\uC6F9 \uC11C\uBE44\uC2A4 \uC694\uCCAD\uC740 HTTP POST \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD574\uC57C \uD568: WSI BP 1.0
-WSSERVLET63.diag.check.1=HTTP \uD074\uB77C\uC774\uC5B8\uD2B8\uAC00 GET \uC694\uCCAD\uC774 \uC544\uB2CC POST \uC694\uCCAD\uC744 \uC0AC\uC6A9 \uC911\uC778\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-
-servlet.faultstring.invalidContentType=WSSERVLET64: Content-Type\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. text/xml\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-WSSERVLET64.diag.cause.1=\uC6F9 \uC11C\uBE44\uC2A4 \uC694\uCCAD\uC758 \uCF58\uD150\uCE20 \uC720\uD615\uC740 text/xml\uC774\uC5B4\uC57C \uD568: WSI BP 1.0
-WSSERVLET64.diag.check.1=\uD074\uB77C\uC774\uC5B8\uD2B8 \uC694\uCCAD\uC774 text/xml\uC744 \uC0AC\uC6A9 \uC911\uC778\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-error.implementorFactory.newInstanceFailed=WSSERVLET43: \"{0}\" \uD3EC\uD2B8\uC5D0 \uB300\uD55C \uC11C\uBE44\uC2A4 \uAD6C\uD604\uC790 \uC778\uC2A4\uD134\uC2A4\uD654\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-WSSERVLET43.diag.cause.1=\uC6F9 \uC11C\uBE44\uC2A4 \uC778\uC2A4\uD134\uC2A4\uD654\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-WSSERVLET43.diag.check.1=\uC6F9 \uC11C\uBE44\uC2A4\uAC00 \uC0AC\uC6A9 \uAC00\uB2A5\uD558\uBA70 \uACF5\uC6A9\uC778\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uC608\uC678 \uC0AC\uD56D\uC744 \uAC80\uC0AC\uD558\uC2ED\uC2DC\uC624.
-
-error.implementorFactory.servantInitFailed=WSSERVLET44: \"{0}\" \uD3EC\uD2B8\uC5D0 \uB300\uD55C \uC11C\uBE44\uC2A4 \uAD6C\uD604\uC790 \uCD08\uAE30\uD654\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-WSSERVLET44.diag.cause.1=\uC6F9 \uC11C\uBE44\uC2A4\uAC00 \uC778\uC2A4\uD134\uC2A4\uD654\uB418\uC5C8\uC9C0\uB9CC \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-WSSERVLET44.diag.check.1=\uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uC608\uC678 \uC0AC\uD56D\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. \uAD6C\uC131 \uD30C\uC77C\uC774 \uBAA8\uB450 \uC62C\uBC14\uB978\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624.
-
-#not used by anything currently
-servlet.faultstring.invalidSOAPAction=WSSERVLET65: \uD5E4\uB354\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. SOAPAction\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-WSSERVLET65.diag.cause.1=SOAP Action\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-WSSERVLET65.diag.check.1=SOAPAction \uBC0F \uC801\uD569\uD55C \uAC12\uC744 \uCD94\uAC00\uD558\uC2ED\uC2DC\uC624.
-
-# {0} - URI
-servlet.no.address.available={0}\uC5D0 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uC8FC\uC18C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-servlet.html.title= \uC6F9 \uC11C\uBE44\uC2A4
-servlet.html.title2=<h1>\uC6F9 \uC11C\uBE44\uC2A4</h1>
-servlet.html.noInfoAvailable=<p>\uC0AC\uC6A9 \uAC00\uB2A5\uD55C JAX-WS \uCEE8\uD14D\uC2A4\uD2B8 \uC815\uBCF4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.</p>
-servlet.html.columnHeader.portName=\uB05D\uC810
-servlet.html.columnHeader.status=\uC0C1\uD0DC
-servlet.html.columnHeader.information=\uC815\uBCF4
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.active=ACTIVE
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.error=ERROR
-servlet.html.endpoint.table=<table border=\"0\"><tr><td>\uC11C\uBE44\uC2A4 \uC774\uB984\:</td><td>{0}</td></tr><tr><td>\uD3EC\uD2B8 \uC774\uB984\:</td><td>{1}</td></tr></table>
-servlet.html.information.table=<table border=\"0\"><tr><td>\uC8FC\uC18C\:</td><td>{0}</td></tr><tr><td>WSDL\:</td><td><a href\="{0}?wsdl">{0}?wsdl</a></td></tr><tr><td>\uAD6C\uD604 \uD074\uB798\uC2A4\:</td><td>{1}</td></tr></table>
-servlet.html.notFound=<h1>404 \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}</h1>
-
-
-#
-#
-# all the following properties are used by the http/ea package
-# these properties are not longer used as http/ea is no longer used
-#
-error.implementorFactory.noConfiguration=WSSERVLET36: \uC9C0\uC815\uB41C \uAD6C\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-error.implementorFactory.noInputStream=WSSERVLET37: \uC9C0\uC815\uB41C \uAD6C\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-error.implementorRegistry.unknownName=WSSERVLET38: \uC54C \uC218 \uC5C6\uB294 \uD3EC\uD2B8 \uC774\uB984: {0}
-error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: \uAD6C\uC131\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-error.implementorRegistry.classNotFound=WSSERVLET40: \uD074\uB798\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}
-error.implementorRegistry.incompleteInformation=WSSERVLET41: \uAD6C\uC131 \uC815\uBCF4\uAC00 \uBD88\uC644\uC804\uD569\uB2C8\uB2E4.
-error.implementorRegistry.duplicateName=WSSERVLET42: \uC911\uBCF5 \uD3EC\uD2B8 \uC774\uB984: {0}
-
-error.implementorRegistry.fileNotFound=WSSERVLET45: \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}
-error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: \uAD6C\uC131\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-error.servlet.init.config.parameter.missing=WSSERVLET47: \uAD6C\uC131 \uB9E4\uAC1C\uBCC0\uC218\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: \"{0}\"
-error.servlet.init.config.fileNotFound=WSSERVLET48: \uAD6C\uC131 \uD30C\uC77C \"{0}\"\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-#
-
-error.servlet.noImplementorForPort=WSSERVLET52: \uD3EC\uD2B8\uC5D0 \uB300\uD574 \uB4F1\uB85D\uB41C \uAD6C\uD604\uC790\uAC00 \uC5C6\uC74C: {0}
-error.servlet.noPortSpecified=WSSERVLET53: HTTP POST \uC694\uCCAD URL\uC5D0 \uC9C0\uC815\uB41C \uD3EC\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-error.servlet.noResponseWasProduced=WSSERVLET54: \uC0DD\uC131\uB41C \uC751\uB2F5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4(\uB0B4\uBD80 \uC624\uB958).
-#
-info.servlet.gotEmptyRequestMessage=WSSERVLET55: \uBE48 \uC694\uCCAD \uBA54\uC2DC\uC9C0\uB97C \uAC00\uC838\uC654\uC2B5\uB2C8\uB2E4.
-info.servlet.initializing=WSSERVLET56: JAX-WS \uC11C\uBE14\uB9BF: \uCD08\uAE30\uD654
-info.servlet.destroying=WSSERVLET57: JAX-WS \uC11C\uBE14\uB9BF: \uC0AD\uC81C
-#
-trace.servlet.requestForPortNamed=WSSERVLET58: \uD3EC\uD2B8\uC5D0 \uB300\uD55C \uC694\uCCAD\uC744 \uAC00\uC838\uC634: {0}
-trace.servlet.handingRequestOverToImplementor=WSSERVLET59: \uAD6C\uD604\uC790\uB85C \uC694\uCCAD\uC744 \uC804\uC1A1\uD558\uB294 \uC911: {0}
-trace.servlet.gotResponseFromImplementor=WSSERVLET60: \uAD6C\uD604\uC790\uC5D0\uC11C \uC751\uB2F5\uC744 \uAC00\uC838\uC634: {0}
-trace.servlet.writingFaultResponse=WSSERVLET61: \uACB0\uD568 \uC751\uB2F5\uC744 \uC4F0\uB294 \uC911
-trace.servlet.writingSuccessResponse=WSSERVLET62: \uC131\uACF5 \uC751\uB2F5\uC744 \uC4F0\uB294 \uC911
-#
-html.nonRootPage.title= \uC6F9 \uC11C\uBE44\uC2A4
-html.nonRootPage.body1= <p>\uC774 URL\uC5D0 \uC6F9 \uC11C\uBE44\uC2A4\uAC00 \uC124\uCE58\uB418\uC5C8\uC2B5\uB2C8\uB2E4.</p>
-html.nonRootPage.body2= <p>\uC694\uCCAD URI\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.</p><p>\uBC30\uCE58 \uC815\uBCF4\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624.</p>
-# Usage not found. TODO Remove
-#html.nonRootPage.body3a= <p>Please refer to <a href=\'
-# Concatenated with html.nonRootPage.body3a
-#html.nonRootPage.body3b= \'>this page</a> for information about the deployed services.</p>
-html.wsdlPage.title= \uC6F9 \uC11C\uBE44\uC2A4
-html.wsdlPage.noWsdl=<p>\uAC8C\uC2DC\uC5D0 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C WSDL \uBB38\uC11C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.</p><p>\uBC30\uCE58 \uC815\uBCF4\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624.</p>
-html.rootPage.title= \uC6F9 \uC11C\uBE44\uC2A4
-html.rootPage.body1=<p>\uC774 URL\uC5D0 \uC6F9 \uC11C\uBE44\uC2A4\uAC00 \uC124\uCE58\uB418\uC5C8\uC2B5\uB2C8\uB2E4.</p>
-html.rootPage.body2a=<p>\uC9C0\uC6D0\uD558\uB294 \uD3EC\uD2B8:
-html.rootPage.body2b=</p>
-# Usage not found. TODO Remove
-#html.rootPage.body3a=<p>A WSDL description of these ports is available <a href='
-# Concatenated with html.rootPage.body3a
-#html.rootPage.body3b='>here.</a></p>
-html.rootPage.body4=<p>\uC774 \uB05D\uC810\uC740 \uC81C\uB300\uB85C \uAD6C\uC131\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uAD6C\uC131 \uD30C\uC77C\uC758 \uC704\uCE58 \uBC0F \uCF58\uD150\uCE20\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624.</p>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_pt_BR.properties
deleted file mode 100644
index 082e17ac..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_pt_BR.properties
+++ /dev/null
@@ -1,243 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-no.sunjaxws.xml=O descritor de runtime "{0}" n\u00E3o foi encontrado
-
-listener.parsingFailed=WSSERVLET11: falha ao fazer parse do descritor de runtime: {0}
-JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser n\u00E3o conseguiu fazer parse do descritor de runtime sun-jaxws.xml
-WSSERVLET11.diag.check.1=Verifique o arquivo sun-jaxws.xml para certificar-se de que ele est\u00E1 correto
-WSSERVLET11.diag.cause.2=Pode ser que o descritor de implanta\u00E7\u00E3o de runtime sun-jaxws.xml esteja faltando
-WSSERVLET11.diag.check.2=Verifique o arquivo jaxrpc-ri.xml para certificar-se de que ele est\u00E1 presente no arquivo war
-
-
-listener.info.initialize=WSSERVLET12: inicializa\u00E7\u00E3o do listener de contexto de JAX-WS
-WSSERVLET12.diag.cause.1=Iniciando listener de contexto
-WSSERVLET12.diag.check.1=Inicializa\u00E7\u00E3o do web service normal
-
-listener.info.destroy=WSSERVLET13: listener de contexto de JAX-WS destru\u00EDdo
-WSSERVLET13.diag.cause.1=Shutdown do listener de contexto
-WSSERVLET13.diag.check.1=Shutdown do web service normal
-
-servlet.info.initialize=WSSERVLET14: Inicializando servlet de JAX-WS
-WSSERVLET14.diag.cause.1=Inicializando servlet de Web Services.
-WSSERVLET14.diag.check.1=Implanta\u00E7\u00E3o de Web Service Normal. Implanta\u00E7\u00E3o do servi\u00E7o conclu\u00EDda.
-
-servlet.info.destroy=WSSERVLET15: servlet de JAX-WS destru\u00EDdo
-WSSERVLET15.diag.cause.1=Shutdown do servlet do Web Services.
-WSSERVLET15.diag.check.1=Cancelamento da implanta\u00E7\u00E3o do Web service normal. Cancelamento da implanta\u00E7\u00E3o conclu\u00EDdo.
-
-servlet.warning.missingContextInformation=WSSERVLET16: informa\u00E7\u00F5es de contexto n\u00E3o encontradas
-WSSERVLET16.diag.cause.1=O arquivo jaxrpc-ri.xml talvez n\u00E3o tenha sido encontrado no arquivo war
-WSSERVLET16.diag.check.1=Cancele o jar o arquivo war de servi\u00E7o; verifique se o arquivo jaxrpc-ri-runtime.xml est\u00E1 presente
-
-
-servlet.warning.duplicateEndpointName=WSSERVLET17: nome do ponto final duplicado
-WSSERVLET17.diag.cause.1=Dois ou mais pontos finais com o mesmo nome encontrados no descritor de runtime de jaxrpc-ri.xml
-WSSERVLET17.diag.check.1=Observe que isso pode causar problemas com a implanta\u00E7\u00E3o de servi\u00E7o
-
-
-servlet.info.emptyRequestMessage=WSSERVLET18: obteve mensagem de solicita\u00E7\u00E3o vazia
-WSSERVLET18.diag.cause.1=A mensagem enviada pelo cliente est\u00E1 vazia
-WSSERVLET18.diag.check.1=Isso pode ou n\u00E3o ser intencional. Se n\u00E3o for, examine o programa de cliente para obter erros.
-
-servlet.trace.gotRequestForEndpoint=WSSERVLET19: obteve solicita\u00E7\u00E3o para ponto final: {0}
-WSSERVLET19.diag.cause.1=Chegou a solicita\u00E7\u00E3o do cliente para este ponto final
-WSSERVLET19.diag.check.1=S\u00F3 mensagem informativa. Opera\u00E7\u00E3o normal.
-
-servlet.error.noImplementorForEndpoint=WSSERVLET20: nenhum implementador para o ponto final: {0}
-WSSERVLET20.diag.cause.1=A implementa\u00E7\u00E3o deste servi\u00E7o n\u00E3o pode ser encontrada
-WSSERVLET20.diag.check.1=Descompacte o war, as classes de liga\u00E7\u00E3o e do serializador foram encontradas?
-
-servlet.trace.invokingImplementor=WSSERVLET21: chamando o implementador: {0}
-WSSERVLET21.diag.cause.1=O Web service est\u00E1 sendo chamado
-WSSERVLET21.diag.check.1=Chamada de web service normal.
-
-servlet.error.noEndpointSpecified=WSSERVLET22: nenhum ponto final especificado
-WSSERVLET22.diag.cause.1=Uma solicita\u00E7\u00E3o foi chamada sem ponto final
-WSSERVLET22.diag.check.1=Definir ponto final com a propriedade stub.setTargetEndpoint
-
-servlet.error.noResponseMessage=WSSERVLET23: nenhuma mensagem de resposta
-WSSERVLET23.diag.cause.1=A solicita\u00E7\u00E3o foi gerada sem resposta do servi\u00E7o
-WSSERVLET23.diag.check.1=Se uma resposta era esperada, verifique se uma mensagem de solicita\u00E7\u00E3o foi realmente enviada
-WSSERVLET23.diag.check.2=A solicita\u00E7\u00E3o pode estar incorreta e pode ser aceita pelo servi\u00E7o. N\u00E3o foi gerada uma resposta.
-
-servlet.trace.writingFaultResponse=WSSERVLET24: gravando resposta com falha
-WSSERVLET24.diag.cause.1=A mensagem SOAPFault est\u00E1 sendo retornada ao cliente.
-WSSERVLET24.diag.check.1=Rastreando falha de mensagem gravada.
-
-servlet.trace.writingSuccessResponse=WSSERVLET25: gravando resposta com sucesso
-WSSERVLET25.diag.cause.1=A resposta de SOAPMessage est\u00E1 sendo retornada ao cliente
-WSSERVLET25.diag.check.1=Rastreando mensagem, resposta normal.
-
-servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: padr\u00E3o de URL duplicado no ponto final: {0}
-WSSERVLET26.diag.cause.1=O URL do ponto final \u00E9 duplicado
-WSSERVLET26.diag.check.1=Isso pode causar um problema. Remova pontos finais duplicados.
-
-servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: padr\u00E3o de URL impl\u00EDcito n\u00E3o suportado no ponto final: {0}
-WSSERVLET27.diag.cause.1=URLS impl\u00EDcito n\u00E3o suportado nesta release
-WSSERVLET27.diag.check.1=Remova o URL impl\u00EDcito
-
-servlet.faultstring.missingPort=WSSERVLET28: informa\u00E7\u00F5es de porta n\u00E3o encontradas
-WSSERVLET28.diag.cause.1=O ponto final do alvo \u00E9 nulo
-WSSERVLET28.diag.check.1=Defina o ponto final do alvo com a propriedade stub.setTargetEndpoint()
-
-servlet.faultstring.portNotFound=WSSERVLET29: Porta n\u00E3o encontrada ({0})
-WSSERVLET29.diag.cause.1=Uma porta foi especificada, mas uma implementa\u00E7\u00E3o de servi\u00E7o correspondente n\u00E3o foi encontrada
-WSSERVLET29.diag.check.1=A porta \u00E9 v\u00E1lida? Descompacte o arquivo war e certifique-se de que a liga\u00E7\u00E3o e os serializadores est\u00E3o presentes
-
-servlet.faultstring.internalServerError=WSSERVLET30: erro de servidor interno ({0})
-WSSERVLET30.diag.cause.1=Houve um erro do servidor ao processar a solicita\u00E7\u00E3o
-WSSERVLET30.diag.check.1=Isso pode ter ocorrido em decorr\u00EAncia de v\u00E1rias causas. Verifique o arquivo de log do servidor para obter exce\u00E7\u00F5es.
-
-error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: exce\u00E7\u00E3o detectada ao recuperar-se de uma exce\u00E7\u00E3o anterior: {0}
-WSSERVLET51.diag.cause.1=O processamento de servi\u00E7o da solicita\u00E7\u00E3o gerou uma exce\u00E7\u00E3o; ao tentar retornar um SOAPPFaultMessage uma exce\u00E7\u00E3o foi gerada novamente
-WSSERVLET51.diag.check.1=Verifique o arquivo de log server.xml para obter informa\u00E7\u00F5es de exce\u00E7\u00E3o
-
-error.servlet.caughtThrowable=WSSERVLET49: exce\u00E7\u00E3o detectada: {0}
-WSSERVLET49.diag.cause.1=O processamento de servi\u00E7o da solicita\u00E7\u00E3o gerou uma exce\u00E7\u00E3o; ao tentar retornar um SOAPFaultMessage uma exce\u00E7\u00E3o foi gerada novamente
-WSSERVLET49.diag.check.1=Verifique o arquivo de log server.xml para obter informa\u00E7\u00F5es de exce\u00E7\u00E3o
-
-error.servlet.caughtThrowableInInit=WSSERVLET50: exce\u00E7\u00E3o detectada durante a inicializa\u00E7\u00E3o do servlet: {0}
-WSSERVLET50.diag.cause.1=sun-jaxws.xml ou web.xml de runtime de WS podem estar incorretos
-WSSERVLET50.diag.check.1=Verifique se sun-jaxws.xml e web.xml est\u00E3o corretos no arquivo war de servi\u00E7o
-WSSERVLET50.diag.cause.2=Os descritores de implanta\u00E7\u00E3o do servidor de aplica\u00E7\u00F5es pode estar incorreto
-WSSERVLET50.diag.check.2=Verifique se os descritores de implanta\u00E7\u00E3o do servidor de Aplica\u00E7\u00F5es est\u00E3o corretos no arquivo war de servi\u00E7o
-WSSERVLET50.diag.cause.3=Podem haver alguns problemas na inicializa\u00E7\u00E3o do Servidor de Aplica\u00E7\u00F5es
-WSSERVLET50.diag.check.3=Verifique o arquivo server.xml no diret\u00F3rio de dom\u00EDnio para obter falhas
-
-publisher.info.applyingTransformation=WSSERVLET31: aplicando transforma\u00E7\u00E3o com o endere\u00E7o real: {0}
-WSSERVLET31.diag.cause.1=Transforma\u00E7\u00E3o sendo aplicada
-WSSERVLET31.diag.check.1=Opera\u00E7\u00E3o normal
-
-publisher.info.generatingWSDL=WSSERVLET32: gerando WSDL para ponto final: {0}
-WSSERVLET32.diag.cause.1=WSDL sendo gerado
-WSSERVLET32.diag.check.1=Opera\u00E7\u00E3o Normal.
-
-exception.cannotCreateTransformer=WSSERVLET33: n\u00E3o \u00E9 poss\u00EDvel criar o transformador
-WSSERVLET33.diag.cause.1=Ao publicar o wsdl de servi\u00E7o, a localiza\u00E7\u00E3o http \u00E9 submetida a patch com a localiza\u00E7\u00E3o/ponto final implantada usando a transforma\u00E7\u00E3o XSLT. O transformador n\u00E3o p\u00F4de ser criado para fazer a transforma\u00E7\u00E3o.
-WSSERVLET33.diag.check.1=Pode ser que um mecanismo de transforma\u00E7\u00E3o que est\u00E1 sendo usado n\u00E3o \u00E9 compat\u00EDvel. Certifique-se de que voc\u00EA est\u00E1 usando o transformador e a vers\u00E3o corretos.
-WSSERVLET33.diag.cause.2=Ao publicar o wsdl de servi\u00E7o, a localiza\u00E7\u00E3o http \u00E9 submetida a patch com a localiza\u00E7\u00E3o/ponto final implantada usando a transforma\u00E7\u00E3o XSLT. O transformador n\u00E3o p\u00F4de ser criado para fazer a transforma\u00E7\u00E3o.
-WSSERVLET33.diag.check.2=Pode ser que um mecanismo de transforma\u00E7\u00E3o n\u00E3o seja suportado ou n\u00E3o seja compat\u00EDvel. Verifique o arquivo xml do servidor para obter exce\u00E7\u00F5es.
-
-
-exception.transformationFailed=WSSERVLET34: falha na transforma\u00E7\u00E3o : {0}
-WSSERVLET34.diag.cause.1=O patch da localiza\u00E7\u00E3o no wsdl falhou ao tentar transformar.
-WSSERVLET34.diag.check.1=Verifique o(s) arquivo(s) de log para obter erros/exce\u00E7\u00F5es mais detalhados.
-
-exception.templateCreationFailed=WSSERVLET35: falha ao criar um objeto do modelo
-WSSERVLET35.diag.cause.1=Um modelo de planilha de estilo XSLT \u00E9 criado para o patch de local wsdl usando a transforma\u00E7\u00E3o. Falha na cria\u00E7\u00E3o do modelo.
-WSSERVLET35.diag.check.1=Uma exce\u00E7\u00E3o foi gerada durante a cria\u00E7\u00E3o do modelo. Exiba a exce\u00E7\u00E3o e o rastreamento de pilha para obter mais detalhes.
-
-servlet.html.method=WSSERVLET63: deve usar Post para este tipo de solicita\u00E7\u00E3o
-WSSERVLET63.diag.cause.1=As solicita\u00E7\u00F5es de web service devem usar o m\u00E9todo HTTP POST: WSI BP 1.0
-WSSERVLET63.diag.check.1=Certifique-se de que seu cliente HTTP est\u00E1 usando solicita\u00E7\u00F5es POST, n\u00E3o solicita\u00E7\u00F5es GET
-
-
-servlet.faultstring.invalidContentType=WSSERVLET64: Tipo de Conte\u00FAdo Inv\u00E1lido, texto/xml obrigat\u00F3rio
-WSSERVLET64.diag.cause.1=As solicita\u00E7\u00F5es de web service devem ser um tipo de conte\u00FAdo texto/xml: WSI BP 1.0
-WSSERVLET64.diag.check.1=Certifique-se de que a solicita\u00E7\u00E3o do cliente est\u00E1 usando texto/xml
-
-error.implementorFactory.newInstanceFailed=WSSERVLET43: falha ao instanciar o implementador de servi\u00E7o da porta \"{0}\"
-WSSERVLET43.diag.cause.1=Falha na instancia\u00E7\u00E3o do web service.
-WSSERVLET43.diag.check.1=Certifique-se de que o web service est\u00E1 dispon\u00EDvel e \u00E9 p\u00FAblico. Examine a exce\u00E7\u00E3o para obter mais detalhes
-
-error.implementorFactory.servantInitFailed=WSSERVLET44: falha ao inicializar o implementador de servi\u00E7o da porta \"{0}\"
-WSSERVLET44.diag.cause.1=O web service foi instanciado, no entanto, n\u00E3o p\u00F4de ser inicializado
-WSSERVLET44.diag.check.1=Verifique a exce\u00E7\u00E3o para obter mais detalhes. Certifique-se de que os arquivos de configura\u00E7\u00E3o est\u00E3o corretos.
-
-#not used by anything currently
-servlet.faultstring.invalidSOAPAction=WSSERVLET65: SOAPAction de Cabe\u00E7alho inv\u00E1lido obrigat\u00F3rio
-WSSERVLET65.diag.cause.1=A\u00E7\u00E3o SOAP obrigat\u00F3ria
-WSSERVLET65.diag.check.1=Adicione SOAPAction e o valor apropriado
-
-# {0} - URI
-servlet.no.address.available=Nenhum endere\u00E7o dispon\u00EDvel para {0}
-
-servlet.html.title= Web Services
-servlet.html.title2=<h1>Web Services</h1>
-servlet.html.noInfoAvailable=<p>Nenhuma informa\u00E7\u00E3o de contexto de JAX-WS dispon\u00EDvel.</p>
-servlet.html.columnHeader.portName=Ponto Final
-servlet.html.columnHeader.status=Status
-servlet.html.columnHeader.information=Informa\u00E7\u00F5es
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.active=ACTIVE
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.error=ERROR
-servlet.html.endpoint.table=<table border=\"0\"><tr><td>Nome do Servi\u00E7o\:</td><td>{0}</td></tr><tr><td>Port Name\:</td><td>{1}</td></tr></table>
-servlet.html.information.table=<table border=\"0\"><tr><td>Endere\u00E7o\:</td><td>{0}</td></tr><tr><td>WSDL\:</td><td><a href\="{0}?wsdl">{0}?wsdl</a></td></tr><tr><td>Classe de implementa\u00E7\u00E3o\:</td><td>{1}</td></tr></table>
-servlet.html.notFound=<h1>404 N\u00E3o Encontrado: {0}</h1>
-
-
-#
-#
-# all the following properties are used by the http/ea package
-# these properties are not longer used as http/ea is no longer used
-#
-error.implementorFactory.noConfiguration=WSSERVLET36: nenhuma configura\u00E7\u00E3o especificada
-error.implementorFactory.noInputStream=WSSERVLET37: nenhuma configura\u00E7\u00E3o especificada
-error.implementorRegistry.unknownName=WSSERVLET38: nome da porta desconhecido: {0}
-error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: n\u00E3o \u00E9 poss\u00EDvel ler a configura\u00E7\u00E3o
-error.implementorRegistry.classNotFound=WSSERVLET40: classe n\u00E3o encontrada: {0}
-error.implementorRegistry.incompleteInformation=WSSERVLET41: informa\u00E7\u00F5es de configura\u00E7\u00E3o incompletas
-error.implementorRegistry.duplicateName=WSSERVLET42: nome da porta duplicado: {0}
-
-error.implementorRegistry.fileNotFound=WSSERVLET45: arquivo n\u00E3o encontrado: {0}
-error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: n\u00E3o \u00E9 poss\u00EDvel ler a configura\u00E7\u00E3o
-error.servlet.init.config.parameter.missing=WSSERVLET47: n\u00E3o \u00E9 poss\u00EDvel localizar o par\u00E2metro de configura\u00E7\u00E3o: \"{0}\"
-error.servlet.init.config.fileNotFound=WSSERVLET48: arquivo de configura\u00E7\u00E3o: \"{0}\" n\u00E3o encontrado
-#
-
-error.servlet.noImplementorForPort=WSSERVLET52: nenhum implementador registrado para a porta: {0}
-error.servlet.noPortSpecified=WSSERVLET53: nenhuma porta especificada no URL de solicita\u00E7\u00E3o HTTP POST
-error.servlet.noResponseWasProduced=WSSERVLET54: nenhuma resposta produzida (erro interno)
-#
-info.servlet.gotEmptyRequestMessage=WSSERVLET55: obteve mensagem de solicita\u00E7\u00E3o vazia
-info.servlet.initializing=WSSERVLET56: servlet de JAX-WS: inicializar
-info.servlet.destroying=WSSERVLET57: servlet de JAX-WS: destruir
-#
-trace.servlet.requestForPortNamed=WSSERVLET58: obteve solicita\u00E7\u00E3o da porta: {0}
-trace.servlet.handingRequestOverToImplementor=WSSERVLET59: tratando solicita\u00E7\u00E3o para implementador: {0}
-trace.servlet.gotResponseFromImplementor=WSSERVLET60: obteve resposta do implementador: {0}
-trace.servlet.writingFaultResponse=WSSERVLET61: grava\u00E7\u00E3o de resposta com falha
-trace.servlet.writingSuccessResponse=WSSERVLET62: grava\u00E7\u00E3o de resposta com sucesso
-#
-html.nonRootPage.title= Web Service
-html.nonRootPage.body1= <p>Um Web Service foi instalado neste URL.</p>
-html.nonRootPage.body2= <p>URI de solicita\u00E7\u00E3o inv\u00E1lido.</p><p>Verifique suas informa\u00E7\u00F5es de implanta\u00E7\u00E3o.</p>
-# Usage not found. TODO Remove
-#html.nonRootPage.body3a= <p>Please refer to <a href=\'
-# Concatenated with html.nonRootPage.body3a
-#html.nonRootPage.body3b= \'>this page</a> for information about the deployed services.</p>
-html.wsdlPage.title= Web Service
-html.wsdlPage.noWsdl=<p>Nenhum documento do WSDL dispon\u00EDvel para publica\u00E7\u00E3o.</p><p>Verifique suas informa\u00E7\u00F5es de implanta\u00E7\u00E3o.</p>
-html.rootPage.title= Web Service
-html.rootPage.body1=<p>Um Web Service foi instalado neste URL.</p>
-html.rootPage.body2a=<p>Ele suporta as seguintes portas:
-html.rootPage.body2b=</p>
-# Usage not found. TODO Remove
-#html.rootPage.body3a=<p>A WSDL description of these ports is available <a href='
-# Concatenated with html.rootPage.body3a
-#html.rootPage.body3b='>here.</a></p>
-html.rootPage.body4=<p>Este ponto final foi configurado incorretamente. Verifique a localiza\u00E7\u00E3o e o conte\u00FAdo do arquivo de configura\u00E7\u00E3o.</p>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_CN.properties
deleted file mode 100644
index 9a769b5f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_CN.properties
+++ /dev/null
@@ -1,243 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-no.sunjaxws.xml=\u7F3A\u5C11\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26 "{0}"
-
-listener.parsingFailed=WSSERVLET11: \u65E0\u6CD5\u89E3\u6790\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26: {0}
-JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser \u65E0\u6CD5\u89E3\u6790 sun-jaxws.xml \u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26
-WSSERVLET11.diag.check.1=\u8BF7\u68C0\u67E5 sun-jaxws.xml \u6587\u4EF6\u4EE5\u786E\u4FDD\u5176\u6B63\u786E\u65E0\u8BEF
-WSSERVLET11.diag.cause.2=\u53EF\u80FD\u7F3A\u5C11 sun-jaxws.xml \u8FD0\u884C\u65F6\u90E8\u7F72\u63CF\u8FF0\u7B26
-WSSERVLET11.diag.check.2=\u8BF7\u68C0\u67E5 jaxrpc-ri.xml \u6587\u4EF6\u4EE5\u786E\u4FDD\u5B83\u5B58\u5728\u4E8E war \u6587\u4EF6\u4E2D
-
-
-listener.info.initialize=WSSERVLET12: JAX-WS \u4E0A\u4E0B\u6587\u76D1\u542C\u7A0B\u5E8F\u6B63\u5728\u521D\u59CB\u5316
-WSSERVLET12.diag.cause.1=\u4E0A\u4E0B\u6587\u76D1\u542C\u7A0B\u5E8F\u6B63\u5728\u542F\u52A8
-WSSERVLET12.diag.check.1=Web \u670D\u52A1\u6B63\u5E38\u542F\u52A8
-
-listener.info.destroy=WSSERVLET13: JAX-WS \u4E0A\u4E0B\u6587\u76D1\u542C\u7A0B\u5E8F\u5DF2\u9500\u6BC1
-WSSERVLET13.diag.cause.1=\u4E0A\u4E0B\u6587\u76D1\u542C\u7A0B\u5E8F\u5DF2\u5173\u95ED
-WSSERVLET13.diag.check.1=Web \u670D\u52A1\u6B63\u5E38\u5173\u95ED
-
-servlet.info.initialize=WSSERVLET14: JAX-WS servlet \u6B63\u5728\u521D\u59CB\u5316
-WSSERVLET14.diag.cause.1=Web \u670D\u52A1 servlet \u6B63\u5728\u542F\u52A8\u3002
-WSSERVLET14.diag.check.1=Web \u670D\u52A1\u6B63\u5E38\u90E8\u7F72\u3002\u670D\u52A1\u90E8\u7F72\u5B8C\u6210\u3002
-
-servlet.info.destroy=WSSERVLET15: JAX-WS servlet \u5DF2\u9500\u6BC1
-WSSERVLET15.diag.cause.1=Web \u670D\u52A1 servlet \u5DF2\u5173\u95ED\u3002
-WSSERVLET15.diag.check.1=Web \u670D\u52A1\u6B63\u5E38\u53D6\u6D88\u90E8\u7F72\u3002\u53D6\u6D88\u90E8\u7F72\u5B8C\u6210\u3002
-
-servlet.warning.missingContextInformation=WSSERVLET16: \u7F3A\u5C11\u4E0A\u4E0B\u6587\u4FE1\u606F
-WSSERVLET16.diag.cause.1=war \u6587\u4EF6\u4E2D\u53EF\u80FD\u7F3A\u5C11 jaxrpc-ri.xml \u6587\u4EF6
-WSSERVLET16.diag.check.1=\u89E3\u538B\u7F29\u670D\u52A1 war \u6587\u4EF6; \u68C0\u67E5 jaxrpc-ri-runtime.xml \u6587\u4EF6\u662F\u5426\u5B58\u5728
-
-
-servlet.warning.duplicateEndpointName=WSSERVLET17: \u7AEF\u70B9\u540D\u79F0\u91CD\u590D
-WSSERVLET17.diag.cause.1=\u5728 jaxrpc-ri.xml \u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u4E2D\u627E\u5230\u540C\u540D\u7684\u4E24\u4E2A\u6216\u66F4\u591A\u7AEF\u70B9
-WSSERVLET17.diag.check.1=\u8BF7\u6CE8\u610F, \u8FD9\u53EF\u80FD\u4F1A\u5BFC\u81F4\u670D\u52A1\u90E8\u7F72\u51FA\u73B0\u95EE\u9898
-
-
-servlet.info.emptyRequestMessage=WSSERVLET18: \u6536\u5230\u7A7A\u8BF7\u6C42\u6D88\u606F
-WSSERVLET18.diag.cause.1=\u5BA2\u6237\u673A\u53D1\u9001\u7684\u6D88\u606F\u4E3A\u7A7A
-WSSERVLET18.diag.check.1=\u8FD9\u53EF\u80FD\u662F\u4E5F\u53EF\u80FD\u4E0D\u662F\u6709\u610F\u7684\u3002\u5982\u679C\u4E0D\u662F\u6709\u610F\u7684, \u8BF7\u68C0\u67E5\u5BA2\u6237\u673A\u7A0B\u5E8F\u662F\u5426\u51FA\u9519\u3002
-
-servlet.trace.gotRequestForEndpoint=WSSERVLET19: \u6536\u5230\u7AEF\u70B9\u8BF7\u6C42: {0}
-WSSERVLET19.diag.cause.1=\u6B64\u7AEF\u70B9\u7684\u5BA2\u6237\u673A\u8BF7\u6C42\u5DF2\u5230\u8FBE
-WSSERVLET19.diag.check.1=\u4EC5\u4FE1\u606F\u6027\u6D88\u606F\u3002\u6B63\u5E38\u64CD\u4F5C\u3002
-
-servlet.error.noImplementorForEndpoint=WSSERVLET20: \u6CA1\u6709\u7AEF\u70B9\u7684\u5B9E\u73B0\u65B9: {0}
-WSSERVLET20.diag.cause.1=\u627E\u4E0D\u5230\u6B64\u670D\u52A1\u7684\u5B9E\u73B0
-WSSERVLET20.diag.check.1=\u89E3\u538B\u7F29 war, \u662F\u5426\u627E\u5230\u8054\u63A5\u548C\u4E32\u884C\u5668\u7C7B?
-
-servlet.trace.invokingImplementor=WSSERVLET21: \u8C03\u7528\u5B9E\u73B0\u65B9: {0}
-WSSERVLET21.diag.cause.1=\u6B63\u5728\u8C03\u7528 Web \u670D\u52A1
-WSSERVLET21.diag.check.1=Web \u670D\u52A1\u6B63\u5E38\u8C03\u7528\u3002
-
-servlet.error.noEndpointSpecified=WSSERVLET22: \u672A\u6307\u5B9A\u7AEF\u70B9
-WSSERVLET22.diag.cause.1=\u5728\u6CA1\u6709\u7AEF\u70B9\u7684\u60C5\u51B5\u4E0B\u8C03\u7528\u4E86\u8BF7\u6C42
-WSSERVLET22.diag.check.1=\u4F7F\u7528 stub.setTargetEndpoint \u5C5E\u6027\u8BBE\u7F6E\u7AEF\u70B9
-
-servlet.error.noResponseMessage=WSSERVLET23: \u65E0\u54CD\u5E94\u6D88\u606F
-WSSERVLET23.diag.cause.1=\u8BF7\u6C42\u672A\u4ECE\u670D\u52A1\u751F\u6210\u54CD\u5E94
-WSSERVLET23.diag.check.1=\u5982\u679C\u9700\u8981\u54CD\u5E94, \u8BF7\u68C0\u67E5\u662F\u5426\u786E\u5B9E\u53D1\u9001\u4E86\u8BF7\u6C42\u6D88\u606F
-WSSERVLET23.diag.check.2=\u8BE5\u8BF7\u6C42\u7684\u683C\u5F0F\u53EF\u80FD\u4E0D\u6B63\u786E, \u670D\u52A1\u5DF2\u63A5\u53D7\u8BE5\u8BF7\u6C42, \u4F46\u672A\u751F\u6210\u54CD\u5E94
-
-servlet.trace.writingFaultResponse=WSSERVLET24: \u5199\u5165\u6545\u969C\u54CD\u5E94
-WSSERVLET24.diag.cause.1=\u6B63\u5728\u5C06 SOAPFault \u6D88\u606F\u8FD4\u56DE\u7ED9\u5BA2\u6237\u673A\u3002
-WSSERVLET24.diag.check.1=\u5DF2\u8BB0\u5F55\u8DDF\u8E2A\u6D88\u606F\u6545\u969C\u3002
-
-servlet.trace.writingSuccessResponse=WSSERVLET25: \u5199\u5165\u6210\u529F\u54CD\u5E94
-WSSERVLET25.diag.cause.1=\u6B63\u5728\u5C06 SOAPMessage \u6D88\u606F\u8FD4\u56DE\u7ED9\u5BA2\u6237\u673A
-WSSERVLET25.diag.check.1=\u8DDF\u8E2A\u6D88\u606F, \u6B63\u5E38\u54CD\u5E94\u3002
-
-servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: \u7AEF\u70B9\u4E2D\u7684 URL \u6A21\u5F0F\u91CD\u590D: {0}
-WSSERVLET26.diag.cause.1=\u7AEF\u70B9 URL \u91CD\u590D
-WSSERVLET26.diag.check.1=\u8FD9\u53EF\u80FD\u4F1A\u4EA7\u751F\u95EE\u9898, \u8BF7\u5220\u9664\u91CD\u590D\u7684\u7AEF\u70B9
-
-servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: \u7AEF\u70B9\u4E2D\u5305\u542B\u4E0D\u652F\u6301\u7684\u9690\u5F0F URL \u6A21\u5F0F: {0}
-WSSERVLET27.diag.cause.1=\u6B64\u53D1\u884C\u7248\u4E2D\u4E0D\u652F\u6301\u9690\u5F0F URL
-WSSERVLET27.diag.check.1=\u5220\u9664\u9690\u5F0F URL
-
-servlet.faultstring.missingPort=WSSERVLET28: \u7F3A\u5C11\u7AEF\u53E3\u4FE1\u606F
-WSSERVLET28.diag.cause.1=\u76EE\u6807\u7AEF\u70B9\u4E3A\u7A7A\u503C
-WSSERVLET28.diag.check.1=\u4F7F\u7528 stub.setTargetEndpoint() \u5C5E\u6027\u8BBE\u7F6E\u76EE\u6807\u7AEF\u70B9\u3002
-
-servlet.faultstring.portNotFound=WSSERVLET29: \u672A\u627E\u5230\u7AEF\u53E3 ({0})
-WSSERVLET29.diag.cause.1=\u6307\u5B9A\u4E86\u7AEF\u53E3, \u4F46\u672A\u627E\u5230\u76F8\u5E94\u7684\u670D\u52A1\u5B9E\u73B0
-WSSERVLET29.diag.check.1=\u8BE5\u7AEF\u53E3\u662F\u5426\u6709\u6548? \u8BF7\u89E3\u538B\u7F29 war \u6587\u4EF6\u5E76\u786E\u4FDD\u8054\u63A5\u548C\u4E32\u884C\u5668\u5B58\u5728
-
-servlet.faultstring.internalServerError=WSSERVLET30: \u5185\u90E8\u670D\u52A1\u5668\u9519\u8BEF ({0})
-WSSERVLET30.diag.cause.1=\u5904\u7406\u8BF7\u6C42\u65F6\u51FA\u73B0\u670D\u52A1\u5668\u9519\u8BEF
-WSSERVLET30.diag.check.1=\u8FD9\u6709\u8BB8\u591A\u539F\u56E0\u3002\u6709\u5173\u5F02\u5E38\u9519\u8BEF, \u8BF7\u67E5\u770B\u670D\u52A1\u5668\u65E5\u5FD7\u6587\u4EF6\u3002
-
-error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: \u4ECE\u5148\u524D\u7684\u5F02\u5E38\u9519\u8BEF\u6062\u590D\u65F6\u6355\u83B7\u5230\u53EF\u629B\u51FA\u7684\u5F02\u5E38\u9519\u8BEF: {0}
-WSSERVLET51.diag.cause.1=\u8BF7\u6C42\u7684\u670D\u52A1\u5904\u7406\u4EA7\u751F\u4E86\u5F02\u5E38\u9519\u8BEF; \u5C1D\u8BD5\u8FD4\u56DE SOAPPFaultMessage \u65F6, \u518D\u6B21\u4EA7\u751F\u4E86\u53EF\u629B\u51FA\u7684\u5F02\u5E38\u9519\u8BEF
-WSSERVLET51.diag.check.1=\u6709\u5173\u5F02\u5E38\u9519\u8BEF\u4FE1\u606F, \u8BF7\u67E5\u770B server.xml \u65E5\u5FD7\u6587\u4EF6
-
-error.servlet.caughtThrowable=WSSERVLET49: \u6355\u83B7\u5230\u53EF\u629B\u51FA\u7684\u5F02\u5E38\u9519\u8BEF: {0}
-WSSERVLET49.diag.cause.1=\u8BF7\u6C42\u7684\u670D\u52A1\u5904\u7406\u4EA7\u751F\u4E86\u5F02\u5E38\u9519\u8BEF; \u5C1D\u8BD5\u8FD4\u56DE SOAPFaultMessage \u65F6, \u518D\u6B21\u4EA7\u751F\u4E86\u53EF\u629B\u51FA\u7684\u5F02\u5E38\u9519\u8BEF
-WSSERVLET49.diag.check.1=\u6709\u5173\u5F02\u5E38\u9519\u8BEF\u4FE1\u606F, \u8BF7\u67E5\u770B server.xml \u65E5\u5FD7\u6587\u4EF6
-
-error.servlet.caughtThrowableInInit=WSSERVLET50: servlet \u521D\u59CB\u5316\u671F\u95F4\u6355\u83B7\u5230\u53EF\u629B\u51FA\u7684\u5F02\u5E38\u9519\u8BEF: {0}
-WSSERVLET50.diag.cause.1=WS \u8FD0\u884C\u65F6 sun-jaxws.xml \u6216 web.xml \u53EF\u80FD\u4E0D\u6B63\u786E
-WSSERVLET50.diag.check.1=\u786E\u4FDD\u670D\u52A1 war \u6587\u4EF6\u4E2D\u7684 sun-jaxws.xml \u548C web.xml \u6B63\u786E
-WSSERVLET50.diag.cause.2=\u5E94\u7528\u7A0B\u5E8F\u670D\u52A1\u5668\u90E8\u7F72\u63CF\u8FF0\u7B26\u53EF\u80FD\u4E0D\u6B63\u786E
-WSSERVLET50.diag.check.2=\u786E\u4FDD\u670D\u52A1 war \u6587\u4EF6\u4E2D\u7684\u5E94\u7528\u7A0B\u5E8F\u670D\u52A1\u5668\u90E8\u7F72\u63CF\u8FF0\u7B26\u6B63\u786E
-WSSERVLET50.diag.cause.3=\u53EF\u80FD\u5B58\u5728\u67D0\u4E9B\u5E94\u7528\u7A0B\u5E8F\u670D\u52A1\u5668\u521D\u59CB\u5316\u95EE\u9898
-WSSERVLET50.diag.check.3=\u6709\u5173\u6545\u969C, \u8BF7\u67E5\u770B\u57DF\u76EE\u5F55\u4E2D\u7684 server.xml \u6587\u4EF6
-
-publisher.info.applyingTransformation=WSSERVLET31: \u4F7F\u7528\u5B9E\u9645\u5730\u5740\u5E94\u7528\u8F6C\u6362: {0}
-WSSERVLET31.diag.cause.1=\u6B63\u5728\u5E94\u7528\u8F6C\u6362
-WSSERVLET31.diag.check.1=\u6B63\u5E38\u64CD\u4F5C
-
-publisher.info.generatingWSDL=WSSERVLET32: \u4E3A\u7AEF\u70B9\u751F\u6210 WSDL: {0}
-WSSERVLET32.diag.cause.1=\u6B63\u5728\u751F\u6210 WSDL
-WSSERVLET32.diag.check.1=\u6B63\u5E38\u64CD\u4F5C\u3002
-
-exception.cannotCreateTransformer=WSSERVLET33: \u65E0\u6CD5\u521B\u5EFA\u8F6C\u6362\u5668
-WSSERVLET33.diag.cause.1=\u53D1\u5E03\u670D\u52A1 wsdl \u65F6, \u5C06\u5728 XSLT \u8F6C\u6362\u8FC7\u7A0B\u4E2D\u4F7F\u7528\u5DF2\u90E8\u7F72\u7684\u4F4D\u7F6E/\u7AEF\u70B9\u5BF9 http \u4F4D\u7F6E\u6253\u8865\u4E01\u3002\u65E0\u6CD5\u521B\u5EFA\u8F6C\u6362\u5668\u6765\u6267\u884C\u6B64\u8F6C\u6362\u3002
-WSSERVLET33.diag.check.1=\u6240\u4F7F\u7528\u7684\u8F6C\u6362\u5F15\u64CE\u53EF\u80FD\u4E0D\u517C\u5BB9\u3002\u8BF7\u786E\u4FDD\u4F7F\u7528\u7684\u662F\u6B63\u786E\u7684\u8F6C\u6362\u5668\u548C\u7248\u672C\u3002
-WSSERVLET33.diag.cause.2=\u53D1\u5E03\u670D\u52A1 wsdl \u65F6, \u5C06\u5728 XSLT \u8F6C\u6362\u8FC7\u7A0B\u4E2D\u4F7F\u7528\u5DF2\u90E8\u7F72\u7684\u4F4D\u7F6E/\u7AEF\u70B9\u5BF9 http \u4F4D\u7F6E\u6253\u8865\u4E01\u3002\u65E0\u6CD5\u521B\u5EFA\u8F6C\u6362\u5668\u6765\u6267\u884C\u6B64\u8F6C\u6362\u3002
-WSSERVLET33.diag.check.2=\u8F6C\u6362\u5F15\u64CE\u53EF\u80FD\u4E0D\u53D7\u652F\u6301\u6216\u4E0D\u517C\u5BB9\u3002\u6709\u5173\u5F02\u5E38\u9519\u8BEF, \u8BF7\u67E5\u770B server.xml \u6587\u4EF6\u3002
-
-
-exception.transformationFailed=WSSERVLET34: \u8F6C\u6362\u5931\u8D25: {0}
-WSSERVLET34.diag.cause.1=\u5728\u5C1D\u8BD5\u8F6C\u6362\u65F6, \u672A\u80FD\u5BF9 wsdl \u8FDB\u884C\u4F4D\u7F6E\u6253\u8865\u4E01\u3002
-WSSERVLET34.diag.check.1=\u6709\u5173\u8BE6\u7EC6\u9519\u8BEF/\u5F02\u5E38\u9519\u8BEF, \u8BF7\u67E5\u770B\u65E5\u5FD7\u6587\u4EF6\u3002
-
-exception.templateCreationFailed=WSSERVLET35: \u65E0\u6CD5\u521B\u5EFA\u6A21\u677F\u5BF9\u8C61
-WSSERVLET35.diag.cause.1=\u4F7F\u7528\u8F6C\u6362\u4E3A wsdl \u4F4D\u7F6E\u6253\u8865\u4E01\u521B\u5EFA XSLT \u6837\u5F0F\u8868\u6A21\u677F\u3002\u672A\u80FD\u521B\u5EFA\u6A21\u677F\u3002
-WSSERVLET35.diag.check.1=\u521B\u5EFA\u6A21\u677F\u671F\u95F4\u629B\u51FA\u5F02\u5E38\u9519\u8BEF\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u67E5\u770B\u5F02\u5E38\u9519\u8BEF\u548C\u5806\u6808\u8DDF\u8E2A\u3002
-
-servlet.html.method=WSSERVLET63: \u5FC5\u987B\u5BF9\u6B64\u7C7B\u578B\u7684\u8BF7\u6C42\u4F7F\u7528 Post
-WSSERVLET63.diag.cause.1=Web \u670D\u52A1\u8BF7\u6C42\u5FC5\u987B\u4F7F\u7528 HTTP POST \u65B9\u6CD5: WSI BP 1.0
-WSSERVLET63.diag.check.1=\u786E\u4FDD HTTP \u5BA2\u6237\u673A\u4F7F\u7528\u7684\u662F POST \u8BF7\u6C42, \u800C\u4E0D\u662F GET \u8BF7\u6C42
-
-
-servlet.faultstring.invalidContentType=WSSERVLET64: Content-Type \u65E0\u6548, \u9700\u8981 text/xml
-WSSERVLET64.diag.cause.1=Web \u670D\u52A1\u8BF7\u6C42\u5FC5\u987B\u662F\u5185\u5BB9\u7C7B\u578B text/xml: WSI BP 1.0
-WSSERVLET64.diag.check.1=\u786E\u4FDD\u5BA2\u6237\u673A\u8BF7\u6C42\u4F7F\u7528\u7684\u662F text/xml
-
-error.implementorFactory.newInstanceFailed=WSSERVLET43: \u65E0\u6CD5\u5B9E\u4F8B\u5316\u7AEF\u53E3 \"{0}\" \u7684\u670D\u52A1\u5B9E\u73B0\u65B9
-WSSERVLET43.diag.cause.1=Web \u670D\u52A1\u5B9E\u4F8B\u5316\u5931\u8D25\u3002
-WSSERVLET43.diag.check.1=\u786E\u4FDD Web \u670D\u52A1\u662F\u53EF\u7528\u548C\u516C\u5171\u7684\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u67E5\u770B\u5F02\u5E38\u9519\u8BEF
-
-error.implementorFactory.servantInitFailed=WSSERVLET44: \u65E0\u6CD5\u521D\u59CB\u5316\u7AEF\u53E3 \"{0}\" \u7684\u670D\u52A1\u5B9E\u73B0\u65B9
-WSSERVLET44.diag.cause.1=Web \u670D\u52A1\u5DF2\u5B9E\u4F8B\u5316, \u4F46\u65E0\u6CD5\u521D\u59CB\u5316
-WSSERVLET44.diag.check.1=\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u67E5\u770B\u5F02\u5E38\u9519\u8BEF\u3002\u786E\u4FDD\u6240\u6709\u914D\u7F6E\u6587\u4EF6\u90FD\u6B63\u786E\u3002
-
-#not used by anything currently
-servlet.faultstring.invalidSOAPAction=WSSERVLET65: \u6240\u9700\u7684\u6807\u5934 SOAPAction \u65E0\u6548
-WSSERVLET65.diag.cause.1=\u9700\u8981 SOAP \u64CD\u4F5C
-WSSERVLET65.diag.check.1=\u6DFB\u52A0 SOAPAction \u53CA\u9002\u5F53\u7684\u503C
-
-# {0} - URI
-servlet.no.address.available=\u6CA1\u6709\u53EF\u7528\u4E8E{0}\u7684\u5730\u5740
-
-servlet.html.title= Web \u670D\u52A1
-servlet.html.title2=<h1>Web \u670D\u52A1</h1>
-servlet.html.noInfoAvailable=<p>\u6CA1\u6709\u53EF\u7528\u7684 JAX-WS \u4E0A\u4E0B\u6587\u4FE1\u606F\u3002</p>
-servlet.html.columnHeader.portName=\u7AEF\u70B9
-servlet.html.columnHeader.status=\u72B6\u6001
-servlet.html.columnHeader.information=\u4FE1\u606F
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.active=ACTIVE
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.error=ERROR
-servlet.html.endpoint.table=<table border=\"0\"><tr><td>\u670D\u52A1\u540D\:</td><td>{0}</td></tr><tr><td>\u7AEF\u53E3\u540D\:</td><td>{1}</td></tr></table>
-servlet.html.information.table=<table border=\"0\"><tr><td>\u5730\u5740\:</td><td>{0}</td></tr><tr><td>WSDL\:</td><td><a href\="{0}?wsdl">{0}?wsdl</a></td></tr><tr><td>\u5B9E\u73B0\u7C7B\:</td><td>{1}</td></tr></table>
-servlet.html.notFound=<h1>404 \u672A\u627E\u5230: {0}</h1>
-
-
-#
-#
-# all the following properties are used by the http/ea package
-# these properties are not longer used as http/ea is no longer used
-#
-error.implementorFactory.noConfiguration=WSSERVLET36: \u672A\u6307\u5B9A\u914D\u7F6E
-error.implementorFactory.noInputStream=WSSERVLET37: \u672A\u6307\u5B9A\u914D\u7F6E
-error.implementorRegistry.unknownName=WSSERVLET38: \u672A\u77E5\u7AEF\u53E3\u540D: {0}
-error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: \u65E0\u6CD5\u8BFB\u53D6\u914D\u7F6E
-error.implementorRegistry.classNotFound=WSSERVLET40: \u672A\u627E\u5230\u7C7B: {0}
-error.implementorRegistry.incompleteInformation=WSSERVLET41: \u914D\u7F6E\u4FE1\u606F\u4E0D\u5B8C\u6574
-error.implementorRegistry.duplicateName=WSSERVLET42: \u7AEF\u53E3\u540D\u91CD\u590D: {0}
-
-error.implementorRegistry.fileNotFound=WSSERVLET45: \u672A\u627E\u5230\u6587\u4EF6: {0}
-error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: \u65E0\u6CD5\u8BFB\u53D6\u914D\u7F6E
-error.servlet.init.config.parameter.missing=WSSERVLET47: \u627E\u4E0D\u5230\u914D\u7F6E\u53C2\u6570: \"{0}\"
-error.servlet.init.config.fileNotFound=WSSERVLET48: \u672A\u627E\u5230\u914D\u7F6E\u6587\u4EF6: \"{0}\"
-#
-
-error.servlet.noImplementorForPort=WSSERVLET52: \u6CA1\u6709\u4E3A\u7AEF\u53E3\u6CE8\u518C\u5B9E\u73B0\u65B9: {0}
-error.servlet.noPortSpecified=WSSERVLET53: \u672A\u5728 HTTP POST \u8BF7\u6C42 URL \u4E2D\u6307\u5B9A\u7AEF\u53E3
-error.servlet.noResponseWasProduced=WSSERVLET54: \u672A\u751F\u6210\u54CD\u5E94 (\u5185\u90E8\u9519\u8BEF)
-#
-info.servlet.gotEmptyRequestMessage=WSSERVLET55: \u6536\u5230\u7A7A\u8BF7\u6C42\u6D88\u606F
-info.servlet.initializing=WSSERVLET56: JAX-WS servlet: \u521D\u59CB\u5316
-info.servlet.destroying=WSSERVLET57: JAX-WS servlet: \u9500\u6BC1
-#
-trace.servlet.requestForPortNamed=WSSERVLET58: \u6536\u5230\u7AEF\u53E3\u7684\u8BF7\u6C42: {0}
-trace.servlet.handingRequestOverToImplementor=WSSERVLET59: \u5C06\u8BF7\u6C42\u8F6C\u4EA4\u7ED9\u5B9E\u73B0\u65B9: {0}
-trace.servlet.gotResponseFromImplementor=WSSERVLET60: \u4ECE\u5B9E\u73B0\u65B9\u6536\u5230\u54CD\u5E94: {0}
-trace.servlet.writingFaultResponse=WSSERVLET61: \u5199\u5165\u6545\u969C\u54CD\u5E94
-trace.servlet.writingSuccessResponse=WSSERVLET62: \u5199\u5165\u6210\u529F\u54CD\u5E94
-#
-html.nonRootPage.title= Web \u670D\u52A1
-html.nonRootPage.body1= <p>Web \u670D\u52A1\u5B89\u88C5\u5728\u6B64 URL \u4E2D\u3002</p>
-html.nonRootPage.body2= <p>\u8BF7\u6C42 URI \u65E0\u6548\u3002</p><p>\u8BF7\u67E5\u770B\u90E8\u7F72\u4FE1\u606F\u3002</p>
-# Usage not found. TODO Remove
-#html.nonRootPage.body3a= <p>Please refer to <a href=\'
-# Concatenated with html.nonRootPage.body3a
-#html.nonRootPage.body3b= \'>this page</a> for information about the deployed services.</p>
-html.wsdlPage.title= Web \u670D\u52A1
-html.wsdlPage.noWsdl=<p>\u6CA1\u6709\u53EF\u4F9B\u53D1\u5E03\u7684 WSDL \u6587\u6863\u3002</p><p>\u8BF7\u67E5\u770B\u90E8\u7F72\u4FE1\u606F\u3002</p>
-html.rootPage.title= Web \u670D\u52A1
-html.rootPage.body1=<p>Web \u670D\u52A1\u5B89\u88C5\u5728\u6B64 URL \u4E2D\u3002</p>
-html.rootPage.body2a=<p>\u5B83\u652F\u6301\u4EE5\u4E0B\u7AEF\u53E3:
-html.rootPage.body2b=</p>
-# Usage not found. TODO Remove
-#html.rootPage.body3a=<p>A WSDL description of these ports is available <a href='
-# Concatenated with html.rootPage.body3a
-#html.rootPage.body3b='>here.</a></p>
-html.rootPage.body4=<p>\u6B64\u7AEF\u70B9\u7684\u914D\u7F6E\u4E0D\u6B63\u786E\u3002\u8BF7\u67E5\u770B\u914D\u7F6E\u6587\u4EF6\u7684\u4F4D\u7F6E\u548C\u5185\u5BB9\u3002</p>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_TW.properties
deleted file mode 100644
index 7f02495d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_TW.properties
+++ /dev/null
@@ -1,243 +0,0 @@
-#
-# Copyright (c) 2005, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-no.sunjaxws.xml=\u907A\u6F0F\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143 "{0}"
-
-listener.parsingFailed=WSSERVLET11: \u7121\u6CD5\u5256\u6790\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143: {0}
-JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser \u7121\u6CD5\u5256\u6790 sun-jaxws.xml \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143
-WSSERVLET11.diag.check.1=\u8ACB\u6AA2\u67E5 sun-jaxws.xml \u6A94\u6848, \u78BA\u5B9A\u8A72\u6A94\u6848\u6B63\u78BA
-WSSERVLET11.diag.cause.2=\u53EF\u80FD\u907A\u6F0F sun-jaxws.xml \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5EFA\u7F6E\u63CF\u8FF0\u5143
-WSSERVLET11.diag.check.2=\u8ACB\u6AA2\u67E5 jaxrpc-ri.xml \u6A94\u6848, \u78BA\u8A8D\u5176\u5B58\u5728 WAR \u6A94\u6848\u4E2D
-
-
-listener.info.initialize=WSSERVLET12: \u6B63\u5728\u8D77\u59CB JAX-WS \u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u76E3\u807D\u5668
-WSSERVLET12.diag.cause.1=\u6B63\u5728\u555F\u52D5\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u76E3\u807D\u5668
-WSSERVLET12.diag.check.1=\u4E00\u822C Web \u670D\u52D9\u555F\u52D5
-
-listener.info.destroy=WSSERVLET13: \u5DF2\u6BC0\u68C4 JAX-WS \u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u76E3\u807D\u5668
-WSSERVLET13.diag.cause.1=\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u76E3\u807D\u5668\u95DC\u9589
-WSSERVLET13.diag.check.1=\u4E00\u822C Web \u670D\u52D9\u95DC\u9589
-
-servlet.info.initialize=WSSERVLET14: \u6B63\u5728\u8D77\u59CB JAX-WS Servlet
-WSSERVLET14.diag.cause.1=Web \u670D\u52D9 Servlet \u6B63\u5728\u555F\u52D5.
-WSSERVLET14.diag.check.1=\u4E00\u822C Web \u670D\u52D9\u5EFA\u7F6E. \u670D\u52D9\u5EFA\u7F6E\u5B8C\u6210.
-
-servlet.info.destroy=WSSERVLET15: \u5DF2\u6BC0\u68C4 JAX-WS Servlet
-WSSERVLET15.diag.cause.1=Web \u670D\u52D9 Servlet \u95DC\u9589.
-WSSERVLET15.diag.check.1=\u4E00\u822C Web \u670D\u52D9\u53D6\u6D88\u5EFA\u7F6E. \u53D6\u6D88\u5EFA\u7F6E\u5B8C\u6210.
-
-servlet.warning.missingContextInformation=WSSERVLET16: \u907A\u6F0F\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u8CC7\u8A0A
-WSSERVLET16.diag.cause.1=WAR \u6A94\u6848\u4E2D\u53EF\u80FD\u907A\u6F0F jaxrpc-ri.xml \u6A94\u6848
-WSSERVLET16.diag.check.1=\u89E3\u58D3\u7E2E\u670D\u52D9 WAR \u6A94\u6848; \u67E5\u770B jaxrpc-ri-runtime.xml \u6A94\u6848\u662F\u5426\u5B58\u5728
-
-
-servlet.warning.duplicateEndpointName=WSSERVLET17: \u7AEF\u9EDE\u540D\u7A31\u91CD\u8907
-WSSERVLET17.diag.cause.1=\u5728 jaxrpc-ri.xml \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143\u4E2D\u767C\u73FE\u5169\u500B\u6216\u66F4\u591A\u7AEF\u9EDE\u5177\u6709\u76F8\u540C\u7684\u540D\u7A31
-WSSERVLET17.diag.check.1=\u8ACB\u6CE8\u610F, \u9019\u53EF\u80FD\u6703\u5C0E\u81F4\u670D\u52D9\u5EFA\u7F6E\u767C\u751F\u554F\u984C
-
-
-servlet.info.emptyRequestMessage=WSSERVLET18: \u6536\u5230\u7A7A\u767D\u7684\u8981\u6C42\u8A0A\u606F
-WSSERVLET18.diag.cause.1=\u5F9E\u5C6C\u7AEF\u50B3\u9001\u7684\u8A0A\u606F\u70BA\u7A7A\u767D
-WSSERVLET18.diag.check.1=\u9019\u53EF\u80FD\u6709\u7279\u5225\u76EE\u7684. \u82E5\u4E0D\u662F, \u8ACB\u6AA2\u67E5\u5F9E\u5C6C\u7AEF\u7A0B\u5F0F\u662F\u5426\u767C\u751F\u932F\u8AA4.
-
-servlet.trace.gotRequestForEndpoint=WSSERVLET19: \u6536\u5230\u7AEF\u9EDE: {0} \u7684\u8981\u6C42
-WSSERVLET19.diag.cause.1=\u6B64\u7AEF\u9EDE\u7684\u5F9E\u5C6C\u7AEF\u8981\u6C42\u5DF2\u5230\u9054
-WSSERVLET19.diag.check.1=\u50C5\u63D0\u4F9B\u8CC7\u8A0A\u8A0A\u606F. \u6B63\u5E38\u4F5C\u696D.
-
-servlet.error.noImplementorForEndpoint=WSSERVLET20: \u7AEF\u9EDE: {0} \u6C92\u6709\u5BE6\u4F5C\u9805
-WSSERVLET20.diag.cause.1=\u627E\u4E0D\u5230\u6B64\u670D\u52D9\u7684\u5BE6\u884C
-WSSERVLET20.diag.check.1=\u8ACB\u89E3\u58D3\u7E2E WAR, \u662F\u5426\u627E\u5230 Tie \u8207 Serializer \u985E\u5225?
-
-servlet.trace.invokingImplementor=WSSERVLET21: \u6B63\u5728\u547C\u53EB\u5BE6\u4F5C\u9805: {0}
-WSSERVLET21.diag.cause.1=\u6B63\u5728\u547C\u53EB\u6B64 Web \u670D\u52D9
-WSSERVLET21.diag.check.1=\u4E00\u822C Web \u670D\u52D9\u547C\u53EB.
-
-servlet.error.noEndpointSpecified=WSSERVLET22: \u672A\u6307\u5B9A\u7AEF\u9EDE
-WSSERVLET22.diag.cause.1=\u5DF2\u547C\u53EB\u8981\u6C42, \u4F46\u6C92\u6709\u7AEF\u9EDE
-WSSERVLET22.diag.check.1=\u8ACB\u4F7F\u7528 stub.setTargetEndpoint \u7279\u6027\u8A2D\u5B9A\u7AEF\u9EDE
-
-servlet.error.noResponseMessage=WSSERVLET23: \u6C92\u6709\u56DE\u61C9\u8A0A\u606F
-WSSERVLET23.diag.cause.1=\u8981\u6C42\u672A\u7522\u751F\u4F86\u81EA\u670D\u52D9\u7684\u56DE\u61C9
-WSSERVLET23.diag.check.1=\u82E5\u9810\u671F\u61C9\u6709\u56DE\u61C9, \u8ACB\u6AA2\u67E5\u662F\u5426\u771F\u7684\u50B3\u9001\u4E86\u8981\u6C42\u8A0A\u606F
-WSSERVLET23.diag.check.2=\u8981\u6C42\u7684\u683C\u5F0F\u53EF\u80FD\u932F\u8AA4, \u4E26\u4E14\u670D\u52D9\u5DF2\u63A5\u53D7\u8981\u6C42, \u4F46\u4E26\u672A\u7522\u751F\u56DE\u61C9
-
-servlet.trace.writingFaultResponse=WSSERVLET24: \u6B63\u5728\u5BEB\u5165\u932F\u8AA4\u56DE\u61C9
-WSSERVLET24.diag.cause.1=\u6B63\u5728\u5C07 SOAPFault \u8A0A\u606F\u50B3\u56DE\u5F9E\u5C6C\u7AEF.
-WSSERVLET24.diag.check.1=\u5DF2\u8A18\u9304\u8FFD\u8E64\u8A0A\u606F\u932F\u8AA4.
-
-servlet.trace.writingSuccessResponse=WSSERVLET25: \u6B63\u5728\u5BEB\u5165\u6210\u529F\u56DE\u61C9
-WSSERVLET25.diag.cause.1=\u6B63\u5728\u5C07 SOAPMessage \u56DE\u61C9\u50B3\u56DE\u5F9E\u5C6C\u7AEF
-WSSERVLET25.diag.check.1=\u8FFD\u8E64\u8A0A\u606F, \u4E00\u822C\u56DE\u61C9.
-
-servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: \u7AEF\u9EDE : {0} \u4E2D\u6709\u91CD\u8907\u7684 URL \u6A23\u5F0F
-WSSERVLET26.diag.cause.1=\u7AEF\u9EDE URL \u91CD\u8907
-WSSERVLET26.diag.check.1=\u9019\u6A23\u53EF\u80FD\u6703\u5C0E\u81F4\u554F\u984C, \u8ACB\u79FB\u9664\u91CD\u8907\u7684\u7AEF\u9EDE
-
-servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: \u7AEF\u9EDE: {0} \u4E2D\u6709\u4E0D\u652F\u63F4\u7684\u96B1\u542B URL \u6A23\u5F0F
-WSSERVLET27.diag.cause.1=\u6B64\u7248\u672C\u4E0D\u652F\u63F4\u96B1\u542B\u7684 URL
-WSSERVLET27.diag.check.1=\u8ACB\u79FB\u9664\u96B1\u542B\u7684 URL
-
-servlet.faultstring.missingPort=WSSERVLET28: \u907A\u6F0F\u9023\u63A5\u57E0\u8CC7\u8A0A
-WSSERVLET28.diag.cause.1=\u76EE\u6A19\u7AEF\u9EDE\u70BA\u7A7A\u503C
-WSSERVLET28.diag.check.1=\u8ACB\u4F7F\u7528 stub.setTargetEndpoint() \u7279\u6027\u8A2D\u5B9A\u76EE\u6A19\u7AEF\u9EDE
-
-servlet.faultstring.portNotFound=WSSERVLET29: \u627E\u4E0D\u5230\u9023\u63A5\u57E0 ({0})
-WSSERVLET29.diag.cause.1=\u5DF2\u6307\u5B9A\u9023\u63A5\u57E0, \u4F46\u627E\u4E0D\u5230\u5C0D\u61C9\u7684\u670D\u52D9\u5BE6\u884C
-WSSERVLET29.diag.check.1=\u9023\u63A5\u57E0\u662F\u5426\u6709\u6548? \u8ACB\u89E3\u58D3\u7E2E WAR \u6A94\u6848, \u4E26\u78BA\u8A8D Tie \u8207 Serializer \u5B58\u5728
-
-servlet.faultstring.internalServerError=WSSERVLET30: \u5167\u90E8\u4F3A\u670D\u5668\u932F\u8AA4 ({0})
-WSSERVLET30.diag.cause.1=\u8655\u7406\u8981\u6C42\u6642\u767C\u751F\u4F3A\u670D\u5668\u932F\u8AA4
-WSSERVLET30.diag.check.1=\u9019\u53EF\u80FD\u662F\u56E0\u70BA\u67D0\u4E9B\u539F\u56E0\u6240\u5C0E\u81F4. \u8ACB\u67E5\u770B\u4F3A\u670D\u5668\u65E5\u8A8C\u6A94\u662F\u5426\u6709\u7570\u5E38\u72C0\u6CC1.
-
-error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: \u5F9E\u5148\u524D\u7684\u7570\u5E38\u72C0\u6CC1: {0} \u5FA9\u539F\u6642\u767C\u51FA Throwable
-WSSERVLET51.diag.cause.1=\u8981\u6C42\u7684\u670D\u52D9\u8655\u7406\u7522\u751F\u7570\u5E38\u72C0\u6CC1; \u5617\u8A66\u50B3\u56DE SOAPPFaultMessage \u6642, \u53C8\u518D\u5EA6\u7522\u751F Throwable
-WSSERVLET51.diag.check.1=\u8ACB\u67E5\u770B server.xml \u65E5\u8A8C\u6A94\u662F\u5426\u6709\u7570\u5E38\u72C0\u6CC1\u8CC7\u8A0A
-
-error.servlet.caughtThrowable=WSSERVLET49: \u767C\u751F Throwable: {0}
-WSSERVLET49.diag.cause.1=\u8981\u6C42\u7684\u670D\u52D9\u8655\u7406\u7522\u751F\u7570\u5E38\u72C0\u6CC1; \u5617\u8A66\u50B3\u56DE SOAPFaultMessage \u6642, \u53C8\u518D\u5EA6\u7522\u751F Throwable
-WSSERVLET49.diag.check.1=\u8ACB\u67E5\u770B server.xml \u65E5\u8A8C\u6A94\u662F\u5426\u6709\u7570\u5E38\u72C0\u6CC1\u8CC7\u8A0A
-
-error.servlet.caughtThrowableInInit=WSSERVLET50: \u521D\u59CB\u5316 Servlet \u6642\u767C\u751F Throwable: {0}
-WSSERVLET50.diag.cause.1=WS \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C sun-jaxws.xml \u6216 web.xml \u53EF\u80FD\u4E0D\u6B63\u78BA
-WSSERVLET50.diag.check.1=\u8ACB\u78BA\u8A8D\u670D\u52D9 WAR \u6A94\u6848\u4E2D\u7684 sun-jaxws.xml \u53CA web.xml \u662F\u5426\u6B63\u78BA
-WSSERVLET50.diag.cause.2=\u61C9\u7528\u7A0B\u5F0F\u4F3A\u670D\u5668\u5EFA\u7F6E\u63CF\u8FF0\u5143\u53EF\u80FD\u4E0D\u6B63\u78BA
-WSSERVLET50.diag.check.2=\u8ACB\u78BA\u8A8D\u670D\u52D9 WAR \u6A94\u6848\u4E2D\u7684\u61C9\u7528\u7A0B\u5F0F\u4F3A\u670D\u5668\u5EFA\u7F6E\u63CF\u8FF0\u5143\u662F\u5426\u6B63\u78BA
-WSSERVLET50.diag.cause.3=\u53EF\u80FD\u767C\u751F\u67D0\u4E9B\u61C9\u7528\u7A0B\u5F0F\u4F3A\u670D\u5668\u521D\u59CB\u5316\u554F\u984C
-WSSERVLET50.diag.check.3=\u8ACB\u6AA2\u67E5\u7DB2\u57DF\u76EE\u9304\u4E2D\u7684 server.xml \u6A94\u6848\u662F\u5426\u767C\u751F\u932F\u8AA4
-
-publisher.info.applyingTransformation=WSSERVLET31: \u6B63\u5728\u4F7F\u7528\u5BE6\u969B\u4F4D\u5740: {0} \u5957\u7528\u8F49\u63DB
-WSSERVLET31.diag.cause.1=\u6B63\u5728\u5957\u7528\u8F49\u63DB
-WSSERVLET31.diag.check.1=\u6B63\u5E38\u4F5C\u696D
-
-publisher.info.generatingWSDL=WSSERVLET32: \u6B63\u5728\u7522\u751F\u7AEF\u9EDE: {0} \u7684 WSDL
-WSSERVLET32.diag.cause.1=\u6B63\u5728\u7522\u751F WSDL
-WSSERVLET32.diag.check.1=\u6B63\u5E38\u4F5C\u696D.
-
-exception.cannotCreateTransformer=WSSERVLET33: \u7121\u6CD5\u5EFA\u7ACB\u8F49\u63DB\u5668
-WSSERVLET33.diag.cause.1=\u767C\u4F48\u670D\u52D9 WSDL \u6642, \u6703\u4F7F\u7528 XSLT \u8F49\u63DB, \u4EE5\u5EFA\u7F6E\u7684\u4F4D\u7F6E/\u7AEF\u9EDE\u4F86\u4FEE\u6B63 http \u4F4D\u7F6E. \u7121\u6CD5\u5EFA\u7ACB\u8F49\u63DB\u5668\u4EE5\u9032\u884C\u8F49\u63DB.
-WSSERVLET33.diag.check.1=\u53EF\u80FD\u662F\u4F7F\u7528\u4E2D\u7684\u8F49\u63DB\u5F15\u64CE\u4E0D\u76F8\u5BB9. \u8ACB\u78BA\u5B9A\u60A8\u4F7F\u7528\u6B63\u78BA\u7684\u8F49\u63DB\u5668\u8207\u7248\u672C.
-WSSERVLET33.diag.cause.2=\u767C\u4F48\u670D\u52D9 WSDL \u6642, \u6703\u4F7F\u7528 XSLT \u8F49\u63DB, \u4EE5\u5EFA\u7F6E\u7684\u4F4D\u7F6E/\u7AEF\u9EDE\u4F86\u4FEE\u6B63 http \u4F4D\u7F6E. \u7121\u6CD5\u5EFA\u7ACB\u8F49\u63DB\u5668\u4EE5\u9032\u884C\u8F49\u63DB.
-WSSERVLET33.diag.check.2=\u8F49\u63DB\u5668\u5F15\u64CE\u53EF\u80FD\u4E0D\u652F\u63F4\u6216\u4E0D\u76F8\u5BB9. \u8ACB\u67E5\u770B server.xml \u6A94\u6848\u662F\u5426\u6709\u7570\u5E38\u72C0\u6CC1.
-
-
-exception.transformationFailed=WSSERVLET34: \u8F49\u63DB\u5931\u6557 : {0}
-WSSERVLET34.diag.cause.1=\u5617\u8A66\u8F49\u63DB\u6642, WSDL \u7684\u4F4D\u7F6E\u4FEE\u6B63\u5931\u6557.
-WSSERVLET34.diag.check.1=\u8ACB\u67E5\u770B\u65E5\u8A8C\u6A94, \u77AD\u89E3\u8A73\u7D30\u7684\u932F\u8AA4/\u7570\u5E38\u72C0\u6CC1.
-
-exception.templateCreationFailed=WSSERVLET35: \u7121\u6CD5\u5EFA\u7ACB\u6A23\u677F\u7269\u4EF6
-WSSERVLET35.diag.cause.1=\u4F7F\u7528\u8F49\u63DB\u6642, \u6703\u5EFA\u7ACB XSLT \u6A23\u5F0F\u8868\u6A23\u677F\u4EE5\u7528\u65BC WSDL \u4F4D\u7F6E\u4FEE\u6B63. \u6A23\u677F\u5EFA\u7ACB\u5931\u6557.
-WSSERVLET35.diag.check.1=\u5EFA\u7ACB\u6A23\u677F\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1. \u8ACB\u6AA2\u8996\u7570\u5E38\u72C0\u6CC1\u8207\u5806\u758A\u8FFD\u8E64\u4EE5\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A.
-
-servlet.html.method=WSSERVLET63: \u6B64\u985E\u578B\u7684\u8981\u6C42\u5FC5\u9808\u4F7F\u7528 Post
-WSSERVLET63.diag.cause.1=Web \u670D\u52D9\u8981\u6C42\u5FC5\u9808\u4F7F\u7528 HTTP POST \u65B9\u6CD5: WSI BP 1.0
-WSSERVLET63.diag.check.1=\u8ACB\u78BA\u5B9A\u60A8\u7684 HTTP \u5F9E\u5C6C\u7AEF\u4F7F\u7528 POST \u8981\u6C42, \u800C\u975E GET \u8981\u6C42
-
-
-servlet.faultstring.invalidContentType=WSSERVLET64: \u7121\u6548\u7684 Content-Type, \u9700\u8981 text/xml
-WSSERVLET64.diag.cause.1=Web \u670D\u52D9\u8981\u6C42\u5FC5\u9808\u662F\u5167\u5BB9\u985E\u578B text/xml: WSI BP 1.0
-WSSERVLET64.diag.check.1=\u8ACB\u78BA\u5B9A\u5F9E\u5C6C\u7AEF\u8981\u6C42\u4F7F\u7528\u7684\u662F text/xml
-
-error.implementorFactory.newInstanceFailed=WSSERVLET43: \u7121\u6CD5\u70BA\u9023\u63A5\u57E0 \"{0}\" \u5EFA\u7ACB\u670D\u52D9\u5BE6\u4F5C\u9805
-WSSERVLET43.diag.cause.1=Web \u670D\u52D9\u5EFA\u7ACB\u5931\u6557.
-WSSERVLET43.diag.check.1=\u8ACB\u78BA\u5B9A Web \u670D\u52D9\u53EF\u4EE5\u4F7F\u7528\u4E14\u70BA\u516C\u7528. \u8ACB\u6AA2\u67E5\u7570\u5E38\u72C0\u6CC1, \u4EE5\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A
-
-error.implementorFactory.servantInitFailed=WSSERVLET44: \u7121\u6CD5\u8D77\u59CB\u9023\u63A5\u57E0 \"{0}\" \u7684\u670D\u52D9\u5BE6\u4F5C\u9805
-WSSERVLET44.diag.cause.1=Web \u670D\u52D9\u5DF2\u5EFA\u7ACB, \u4F46\u7121\u6CD5\u8D77\u59CB
-WSSERVLET44.diag.check.1=\u8ACB\u6AA2\u67E5\u7570\u5E38\u72C0\u6CC1, \u4EE5\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A. \u8ACB\u78BA\u5B9A\u6240\u6709\u7D44\u614B\u6A94\u90FD\u6B63\u78BA.
-
-#not used by anything currently
-servlet.faultstring.invalidSOAPAction=WSSERVLET65: \u6A19\u982D\u7121\u6548. \u9700\u8981 SOAPAction
-WSSERVLET65.diag.cause.1=\u9700\u8981 SOAP \u52D5\u4F5C
-WSSERVLET65.diag.check.1=\u8ACB\u65B0\u589E SOAPAction \u8207\u9069\u7576\u7684\u503C
-
-# {0} - URI
-servlet.no.address.available={0} \u6C92\u6709\u53EF\u7528\u7684\u4F4D\u5740
-
-servlet.html.title= Web \u670D\u52D9
-servlet.html.title2=<h1>Web \u670D\u52D9</h1>
-servlet.html.noInfoAvailable=<p>\u6C92\u6709\u53EF\u7528\u7684 JAX-WS \u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u8CC7\u8A0A.</p>
-servlet.html.columnHeader.portName=\u7AEF\u9EDE
-servlet.html.columnHeader.status=\u72C0\u614B
-servlet.html.columnHeader.information=\u8CC7\u8A0A
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.active=ACTIVE
-# This is a status code and should not be translated (if you have to, translate it using capital letters).
-servlet.html.status.error=ERROR
-servlet.html.endpoint.table=<table border=\"0\"><tr><td>\u670D\u52D9\u540D\u7A31\:</td><td>{0}</td></tr><tr><td>\u9023\u63A5\u57E0\u540D\u7A31\:</td><td>{1}</td></tr></table>
-servlet.html.information.table=<table border=\"0\"><tr><td>\u4F4D\u5740\:</td><td>{0}</td></tr><tr><td>WSDL\:</td><td><a href\="{0}?wsdl">{0}?wsdl</a></td></tr><tr><td>\u5BE6\u884C\u985E\u5225\:</td><td>{1}</td></tr></table>
-servlet.html.notFound=<h1>404 \u627E\u4E0D\u5230: {0}</h1>
-
-
-#
-#
-# all the following properties are used by the http/ea package
-# these properties are not longer used as http/ea is no longer used
-#
-error.implementorFactory.noConfiguration=WSSERVLET36: \u672A\u6307\u5B9A\u7D44\u614B
-error.implementorFactory.noInputStream=WSSERVLET37: \u672A\u6307\u5B9A\u7D44\u614B
-error.implementorRegistry.unknownName=WSSERVLET38: \u4E0D\u660E\u7684\u9023\u63A5\u57E0\u540D\u7A31: {0}
-error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: \u7121\u6CD5\u8B80\u53D6\u7D44\u614B
-error.implementorRegistry.classNotFound=WSSERVLET40: \u627E\u4E0D\u5230\u985E\u5225: {0}
-error.implementorRegistry.incompleteInformation=WSSERVLET41: \u7D44\u614B\u8CC7\u8A0A\u4E0D\u5B8C\u6574
-error.implementorRegistry.duplicateName=WSSERVLET42: \u91CD\u8907\u7684\u9023\u63A5\u57E0\u540D\u7A31: {0}
-
-error.implementorRegistry.fileNotFound=WSSERVLET45: \u627E\u4E0D\u5230\u6A94\u6848: {0}
-error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: \u7121\u6CD5\u8B80\u53D6\u7D44\u614B
-error.servlet.init.config.parameter.missing=WSSERVLET47: \u627E\u4E0D\u5230\u7D44\u614B\u53C3\u6578: \"{0}\"
-error.servlet.init.config.fileNotFound=WSSERVLET48: \u627E\u4E0D\u5230\u7D44\u614B\u6A94: \"{0}\"
-#
-
-error.servlet.noImplementorForPort=WSSERVLET52: \u6C92\u6709\u70BA\u9023\u63A5\u57E0: {0} \u8A3B\u518A\u5BE6\u4F5C\u9805
-error.servlet.noPortSpecified=WSSERVLET53: \u672A\u5728 HTTP POST \u8981\u6C42 URL \u4E2D\u6307\u5B9A\u9023\u63A5\u57E0
-error.servlet.noResponseWasProduced=WSSERVLET54: \u672A\u7522\u751F\u56DE\u61C9 (\u5167\u90E8\u932F\u8AA4)
-#
-info.servlet.gotEmptyRequestMessage=WSSERVLET55: \u6536\u5230\u7A7A\u767D\u7684\u8981\u6C42\u8A0A\u606F
-info.servlet.initializing=WSSERVLET56: JAX-WS Servlet: \u8D77\u59CB
-info.servlet.destroying=WSSERVLET57: JAX-WS Servlet: \u6BC0\u68C4
-#
-trace.servlet.requestForPortNamed=WSSERVLET58: \u6536\u5230\u9023\u63A5\u57E0: {0} \u7684\u8981\u6C42
-trace.servlet.handingRequestOverToImplementor=WSSERVLET59: \u6B63\u5728\u5C07\u8981\u6C42\u79FB\u4EA4\u7D66\u5BE6\u4F5C\u9805: {0}
-trace.servlet.gotResponseFromImplementor=WSSERVLET60: \u6536\u5230\u5BE6\u4F5C\u9805: {0} \u7684\u56DE\u61C9
-trace.servlet.writingFaultResponse=WSSERVLET61: \u6B63\u5728\u5BEB\u5165\u932F\u8AA4\u56DE\u61C9
-trace.servlet.writingSuccessResponse=WSSERVLET62: \u6B63\u5728\u5BEB\u5165\u6210\u529F\u56DE\u61C9
-#
-html.nonRootPage.title= Web \u670D\u52D9
-html.nonRootPage.body1= <p>\u6B64 URL \u5DF2\u5B89\u88DD Web \u670D\u52D9.</p>
-html.nonRootPage.body2= <p>\u7121\u6548\u7684\u8981\u6C42 URI.</p><p>\u8ACB\u6AA2\u67E5\u60A8\u7684\u5EFA\u7F6E\u8CC7\u8A0A.</p>
-# Usage not found. TODO Remove
-#html.nonRootPage.body3a= <p>Please refer to <a href=\'
-# Concatenated with html.nonRootPage.body3a
-#html.nonRootPage.body3b= \'>this page</a> for information about the deployed services.</p>
-html.wsdlPage.title= Web \u670D\u52D9
-html.wsdlPage.noWsdl=<p>\u6C92\u6709\u53EF\u767C\u4F48\u7684 WSDL \u6587\u4EF6.</p><p>\u8ACB\u6AA2\u67E5\u60A8\u7684\u5EFA\u7F6E\u8CC7\u8A0A.</p>
-html.rootPage.title= Web \u670D\u52D9
-html.rootPage.body1=<p>\u6B64 URL \u5DF2\u5B89\u88DD Web \u670D\u52D9.</p>
-html.rootPage.body2a=<p>\u5B83\u652F\u63F4\u4E0B\u5217\u9023\u63A5\u57E0:
-html.rootPage.body2b=</p>
-# Usage not found. TODO Remove
-#html.rootPage.body3a=<p>A WSDL description of these ports is available <a href='
-# Concatenated with html.rootPage.body3a
-#html.rootPage.body3b='>here.</a></p>
-html.rootPage.body4=<p>\u6B64\u7AEF\u9EDE\u7684\u8A2D\u5B9A\u4E0D\u6B63\u78BA. \u8ACB\u6AA2\u67E5\u7D44\u614B\u6A94\u7684\u4F4D\u7F6E\u8207\u5167\u5BB9.</p>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage.properties
deleted file mode 100644
index 79ec8587..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-xml.null.headers=Invalid argument. MimeHeaders=null
-xml.no.Content-Type=MimeHeaders doesn't contain Content-Type header
-xml.unknown.Content-Type=Unrecognized Content-Type
-xml.cannot.internalize.message=Cannot create XMLMessage
-xml.root.part.invalid.Content-Type= Bad Content-Type for Root Part : {0}
-xml.get.source.err=Couldn't return Source
-xml.set.payload.err=Couldn't set Payload in XMLMessage
-xml.get.ds.err=Couldn't get DataSource
-xml.content-type.mustbe.multipart=Content-Type needs to be Multipart/Related and with type=text/xml
-xml.invalid.content-type=Invalid Content-Type: {0}
-xml.Content-Type.parse.err=Error while parsing MimeHeaders for Content-Type
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_de.properties
deleted file mode 100644
index 3bd71423..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_de.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-xml.null.headers=Ung\u00FCltiges Argument. MimeHeaders=null
-xml.no.Content-Type=MimeHeaders enth\u00E4lt Content-Type Header nicht
-xml.unknown.Content-Type=Nicht erkannter Content-Type
-xml.cannot.internalize.message=XMLMessage kann nicht erstellt werden
-xml.root.part.invalid.Content-Type= Ung\u00FCltiger Content-Type f\u00FCr Root-Teil: {0}
-xml.get.source.err=Quelle konnte nicht zur\u00FCckgegeben werden
-xml.set.payload.err=Payload konnte in XMLMessage nicht festgelegt werden
-xml.get.ds.err=DataSource konnte nicht abgerufen werden
-xml.content-type.mustbe.multipart=Content-Type muss Multipart/Related mit type=text/xml sein
-xml.invalid.content-type=Ung\u00FCltiger Content-Type: {0}
-xml.Content-Type.parse.err=Fehler beim Parsen von MimeHeaders f\u00FCr Content-Type
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_es.properties
deleted file mode 100644
index 39b4f55c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_es.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-xml.null.headers=Argumento no v\u00E1lido. MimeHeaders=null
-xml.no.Content-Type=MimeHeaders no contiene la cabecera Content-Type
-xml.unknown.Content-Type=Tipo de contenido no reconocido
-xml.cannot.internalize.message=No se puede crear el mensaje XML
-xml.root.part.invalid.Content-Type= Tipo de contenido err\u00F3neo para la parte ra\u00EDz: {0}
-xml.get.source.err=No se ha podido devolver el origen
-xml.set.payload.err=No se ha podido definir la carga \u00FAtil en el mensaje XML
-xml.get.ds.err=No se ha podido obtener el origen de datos
-xml.content-type.mustbe.multipart=Content-Type tiene que ser Multipart/Related y type=text/xml
-xml.invalid.content-type=Tipo de contenido no v\u00E1lido: {0}
-xml.Content-Type.parse.err=Error al analizar MimeHeaders para Content-Type
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_fr.properties
deleted file mode 100644
index c452fb66..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_fr.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-xml.null.headers=Argument non valide. MimeHeaders = NULL
-xml.no.Content-Type=MimeHeaders ne contient aucun en-t\u00EAte Content-Type
-xml.unknown.Content-Type=Content-Type non reconnu
-xml.cannot.internalize.message=Impossible de cr\u00E9er XMLMessage
-xml.root.part.invalid.Content-Type= Content-Type incorrect pour la partie racine : {0}
-xml.get.source.err=Impossible de renvoyer la source
-xml.set.payload.err=Impossible de d\u00E9finir les donn\u00E9es trait\u00E9es dans XMLMessage
-xml.get.ds.err=Impossible d'obtenir DataSource
-xml.content-type.mustbe.multipart=Content-Type doit \u00EAtre Multipart/Related et avec le type=text/xml
-xml.invalid.content-type=Content-Type non valide : {0}
-xml.Content-Type.parse.err=Erreur lors de l'analyse de MimeHeaders pour Content-Type
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_it.properties
deleted file mode 100644
index 28657b87..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_it.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-xml.null.headers=Argomento non valido. MimeHeaders=null
-xml.no.Content-Type=MimeHeaders non contiene l'intestazione Content-Type
-xml.unknown.Content-Type=Content-Type non riconosciuto
-xml.cannot.internalize.message=Impossibile creare XMLMessage
-xml.root.part.invalid.Content-Type= Content-Type non valido per Root Part: {0}
-xml.get.source.err=Impossibile restituire Source
-xml.set.payload.err=Impossibile impostare Payload in XMLMessage
-xml.get.ds.err=Impossibile ottenere DataSource
-xml.content-type.mustbe.multipart=Content-Type deve essere Multipart/Related e con type=text/xml
-xml.invalid.content-type=Content-Type non valido: {0}
-xml.Content-Type.parse.err=Errore durante l'analisi di MimeHeaders per Content-Type
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ja.properties
deleted file mode 100644
index c469c156..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ja.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-xml.null.headers=\u7121\u52B9\u306A\u5F15\u6570\u3067\u3059\u3002MimeHeaders=null
-xml.no.Content-Type=MimeHeaders\u306BContent-Type\u30D8\u30C3\u30C0\u30FC\u304C\u542B\u307E\u308C\u307E\u305B\u3093
-xml.unknown.Content-Type=\u8A8D\u8B58\u3067\u304D\u306A\u3044Content-Type
-xml.cannot.internalize.message=XMLMessage\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-xml.root.part.invalid.Content-Type= \u30EB\u30FC\u30C8\u30FB\u30D1\u30FC\u30C8: {0}\u306EContent-Type\u304C\u4E0D\u6B63\u3067\u3059
-xml.get.source.err=\u30BD\u30FC\u30B9\u3092\u8FD4\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
-xml.set.payload.err=XMLMessage\u3067\u30DA\u30A4\u30ED\u30FC\u30C9\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
-xml.get.ds.err=DataSource\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
-xml.content-type.mustbe.multipart=Content-Type\u306FMultipart/Related\u3067\u3042\u308A\u3001type=text/xml\u304C\u542B\u307E\u308C\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-xml.invalid.content-type=\u7121\u52B9\u306AContent-Type: {0}
-xml.Content-Type.parse.err=Content-Type\u306EMimeHeaders\u306E\u89E3\u6790\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ko.properties
deleted file mode 100644
index 3f87982b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ko.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-xml.null.headers=\uC778\uC218\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. MimeHeaders\uAC00 \uB110\uC785\uB2C8\uB2E4.
-xml.no.Content-Type=MimeHeaders\uC5D0 Content-Type \uD5E4\uB354\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-xml.unknown.Content-Type=\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 Content-Type
-xml.cannot.internalize.message=XMLMessage\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-xml.root.part.invalid.Content-Type= \uB8E8\uD2B8 \uBD80\uBD84\uC5D0 \uB300\uD574 \uC798\uBABB\uB41C Content-Type: {0}
-xml.get.source.err=\uC18C\uC2A4\uB97C \uBC18\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-xml.set.payload.err=XMLMessage\uC5D0\uC11C \uD398\uC774\uB85C\uB4DC\uB97C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-xml.get.ds.err=DataSource\uB97C \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-xml.content-type.mustbe.multipart=Content-Type\uC740 Multipart/Related\uC5EC\uC57C \uD558\uBA70 \uC720\uD615\uC774 text/xml\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-xml.invalid.content-type=\uBD80\uC801\uD569\uD55C Content-Type: {0}
-xml.Content-Type.parse.err=Content-Type\uC5D0 \uB300\uD55C MimeHeaders\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_pt_BR.properties
deleted file mode 100644
index 5254aedb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_pt_BR.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-xml.null.headers=Argumento inv\u00E1lido. MimeHeaders=nulo
-xml.no.Content-Type=MimeHeaders n\u00E3o cont\u00E9m o cabe\u00E7alho do Tipo do Cabe\u00E7alho
-xml.unknown.Content-Type=Tipo de Conte\u00FAdo N\u00E3o reconhecido
-xml.cannot.internalize.message=N\u00E3o \u00E9 poss\u00EDvel criar XMLMessage
-xml.root.part.invalid.Content-Type= Tipo de Conte\u00FAdo Inv\u00E1lido para a Parte da Raiz : {0}
-xml.get.source.err=N\u00E3o foi poss\u00EDvel retornar a Origem
-xml.set.payload.err=N\u00E3o foi poss\u00EDvel o Payload na XMLMessage
-xml.get.ds.err=N\u00E3o foi poss\u00EDvel obter DataSource
-xml.content-type.mustbe.multipart=O Tipo de Conte\u00FAdo precisa ser de V\u00E1rias Partes/Relacionado com tipo=texto/xml
-xml.invalid.content-type=Tipo de Conte\u00FAdo Inv\u00E1lido: {0}
-xml.Content-Type.parse.err=Erro ao fazer parse de MimeHeaders para o Tipo de Conte\u00FAdo
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_CN.properties
deleted file mode 100644
index ba360ee6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_CN.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-xml.null.headers=\u53C2\u6570\u65E0\u6548\u3002MimeHeaders=null
-xml.no.Content-Type=MimeHeaders \u4E0D\u5305\u542B Content-Type \u6807\u5934
-xml.unknown.Content-Type=\u65E0\u6CD5\u8BC6\u522B\u7684 Content-Type
-xml.cannot.internalize.message=\u65E0\u6CD5\u521B\u5EFA XMLMessage
-xml.root.part.invalid.Content-Type= \u6839\u90E8\u5206\u7684 Content-Type \u9519\u8BEF: {0}
-xml.get.source.err=\u65E0\u6CD5\u8FD4\u56DE\u6E90
-xml.set.payload.err=\u65E0\u6CD5\u5728 XMLMessage \u4E2D\u8BBE\u7F6E\u6709\u6548\u8D1F\u8F7D
-xml.get.ds.err=\u65E0\u6CD5\u83B7\u53D6\u6570\u636E\u6E90
-xml.content-type.mustbe.multipart=Content-Type \u5FC5\u987B\u662F\u201C\u591A\u90E8\u5206/\u76F8\u5173\u201D\u5E76\u5E26\u6709 type=text/xml
-xml.invalid.content-type=Content-Type \u65E0\u6548: {0}
-xml.Content-Type.parse.err=\u89E3\u6790 Content-Type \u7684 MimeHeaders \u65F6\u51FA\u9519
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_TW.properties
deleted file mode 100644
index d72e6b6f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_TW.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-xml.null.headers=\u5F15\u6578\u7121\u6548. MimeHeaders=null
-xml.no.Content-Type=MimeHeaders \u672A\u5305\u542B Content-Type \u6A19\u982D
-xml.unknown.Content-Type=\u7121\u6CD5\u8FA8\u8B58\u7684 Content-Type
-xml.cannot.internalize.message=\u7121\u6CD5\u5EFA\u7ACB XMLMessage
-xml.root.part.invalid.Content-Type= \u6839\u76EE\u9304\u90E8\u5206\u7684 Content-Type \u932F\u8AA4 : {0}
-xml.get.source.err=\u7121\u6CD5\u50B3\u56DE\u4F86\u6E90
-xml.set.payload.err=\u7121\u6CD5\u5728 XMLMessage \u4E2D\u8A2D\u5B9A\u6709\u6548\u8CA0\u8F09 (Payload)
-xml.get.ds.err=\u7121\u6CD5\u53D6\u5F97\u8CC7\u6599\u4F86\u6E90
-xml.content-type.mustbe.multipart=Content-Type \u5FC5\u9808\u662F Multipart/Related \u548C type=text/xml
-xml.invalid.content-type=Content-Type \u7121\u6548: {0}
-xml.Content-Type.parse.err=\u5256\u6790 Content-Type \u7684 MimeHeaders \u6642\u767C\u751F\u932F\u8AA4
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/MetroConfig.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/MetroConfig.java
deleted file mode 100644
index ad7c7e22..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/MetroConfig.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.11.17 at 11:49:55 AM CET
-//
-
-
-package com.sun.xml.internal.ws.runtime.config;
-
-import org.w3c.dom.Element;
-
-import javax.xml.bind.annotation.*;
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- *
- * The root element in Metro configuration file.
- *
- *
- * <p>Java class for metro element declaration.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;element name="metro">
- * &lt;complexType>
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element ref="{http://java.sun.com/xml/ns/metro/config}tubelines" minOccurs="0"/>
- * &lt;any/>
- * &lt;/sequence>
- * &lt;attribute name="version" use="required" type="{http://java.sun.com/xml/ns/metro/config}metroConfigVersionSType" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * &lt;/element>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
- "tubelines",
- "any"
-})
-@XmlRootElement(name = "metro")
-public class MetroConfig {
-
- protected Tubelines tubelines;
- @XmlAnyElement(lax = true)
- protected List<Object> any;
- @XmlAttribute(required = true)
- protected String version;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the tubelines property.
- *
- * @return
- * possible object is
- * {@link Tubelines }
- *
- */
- public Tubelines getTubelines() {
- return tubelines;
- }
-
- /**
- * Sets the value of the tubelines property.
- *
- * @param value
- * allowed object is
- * {@link Tubelines }
- *
- */
- public void setTubelines(Tubelines value) {
- this.tubelines = value;
- }
-
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Element }
- * {@link Object }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
- /**
- * Gets the value of the version property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getVersion() {
- return version;
- }
-
- /**
- * Sets the value of the version property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setVersion(String value) {
- this.version = value;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/ObjectFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/ObjectFactory.java
deleted file mode 100644
index 9f37adbd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/ObjectFactory.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.11.17 at 11:49:55 AM CET
-//
-
-
-package com.sun.xml.internal.ws.runtime.config;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElementDecl;
-import javax.xml.bind.annotation.XmlRegistry;
-import javax.xml.namespace.QName;
-
-
-/**
- * This object contains factory methods for each
- * Java content interface and Java element interface
- * generated in the com.sun.xml.internal.ws.runtime.config package.
- * <p>An ObjectFactory allows you to programatically
- * construct new instances of the Java representation
- * for XML content. The Java representation of XML
- * content can consist of schema derived interfaces
- * and classes representing the binding of schema
- * type definitions, element declarations and model
- * groups. Factory methods for each of these are
- * provided in this class.
- *
- */
-@XmlRegistry
-public class ObjectFactory {
-
- private final static QName _Tubelines_QNAME = new QName("http://java.sun.com/xml/ns/metro/config", "tubelines");
- private final static QName _TubelineMapping_QNAME = new QName("http://java.sun.com/xml/ns/metro/config", "tubeline-mapping");
- private final static QName _Tubeline_QNAME = new QName("http://java.sun.com/xml/ns/metro/config", "tubeline");
-
- /**
- * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.sun.xml.internal.ws.runtime.config
- *
- */
- public ObjectFactory() {
- }
-
- /**
- * Create an instance of {@link TubeFactoryConfig }
- *
- */
- public TubeFactoryConfig createTubeFactoryConfig() {
- return new TubeFactoryConfig();
- }
-
- /**
- * Create an instance of {@link TubeFactoryList }
- *
- */
- public TubeFactoryList createTubeFactoryList() {
- return new TubeFactoryList();
- }
-
- /**
- * Create an instance of {@link TubelineDefinition }
- *
- */
- public TubelineDefinition createTubelineDefinition() {
- return new TubelineDefinition();
- }
-
- /**
- * Create an instance of {@link Tubelines }
- *
- */
- public Tubelines createTubelines() {
- return new Tubelines();
- }
-
- /**
- * Create an instance of {@link MetroConfig }
- *
- */
- public MetroConfig createMetroConfig() {
- return new MetroConfig();
- }
-
- /**
- * Create an instance of {@link TubelineMapping }
- *
- */
- public TubelineMapping createTubelineMapping() {
- return new TubelineMapping();
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link Tubelines }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/metro/config", name = "tubelines")
- public JAXBElement<Tubelines> createTubelines(Tubelines value) {
- return new JAXBElement<Tubelines>(_Tubelines_QNAME, Tubelines.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link TubelineMapping }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/metro/config", name = "tubeline-mapping")
- public JAXBElement<TubelineMapping> createTubelineMapping(TubelineMapping value) {
- return new JAXBElement<TubelineMapping>(_TubelineMapping_QNAME, TubelineMapping.class, null, value);
- }
-
- /**
- * Create an instance of {@link JAXBElement }{@code <}{@link TubelineDefinition }{@code >}}
- *
- */
- @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/metro/config", name = "tubeline")
- public JAXBElement<TubelineDefinition> createTubeline(TubelineDefinition value) {
- return new JAXBElement<TubelineDefinition>(_Tubeline_QNAME, TubelineDefinition.class, null, value);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryConfig.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryConfig.java
deleted file mode 100644
index 960fbe46..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryConfig.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.11.17 at 11:49:55 AM CET
-//
-
-
-package com.sun.xml.internal.ws.runtime.config;
-
-import org.w3c.dom.Element;
-
-import javax.xml.bind.annotation.*;
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * <p>Java class for tubeFactoryCType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType name="tubeFactoryCType">
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;any/>
- * &lt;/sequence>
- * &lt;attribute name="className" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "tubeFactoryCType", propOrder = {
- "any"
-})
-public class TubeFactoryConfig {
-
- @XmlAnyElement(lax = true)
- protected List<Object> any;
- @XmlAttribute(required = true)
- protected String className;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Element }
- * {@link Object }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
- /**
- * Gets the value of the className property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getClassName() {
- return className;
- }
-
- /**
- * Sets the value of the className property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setClassName(String value) {
- this.className = value;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryList.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryList.java
deleted file mode 100644
index 8db7587d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryList.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.11.17 at 11:49:55 AM CET
-//
-
-
-package com.sun.xml.internal.ws.runtime.config;
-
-import org.w3c.dom.Element;
-
-import javax.xml.bind.annotation.*;
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * <p>Java class for tubeFactoryListCType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType name="tubeFactoryListCType">
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element name="tube-factory" type="{http://java.sun.com/xml/ns/metro/config}tubeFactoryCType" maxOccurs="unbounded"/>
- * &lt;any/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "tubeFactoryListCType", propOrder = {
- "tubeFactoryConfigs",
- "any"
-})
-public class TubeFactoryList {
-
- @XmlElement(name = "tube-factory", required = true)
- protected List<TubeFactoryConfig> tubeFactoryConfigs;
- @XmlAnyElement(lax = true)
- protected List<Object> any;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the tubeFactoryConfigs property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the tubeFactoryConfigs property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getTubeFactoryConfigs().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link TubeFactoryConfig }
- *
- *
- */
- public List<TubeFactoryConfig> getTubeFactoryConfigs() {
- if (tubeFactoryConfigs == null) {
- tubeFactoryConfigs = new ArrayList<TubeFactoryConfig>();
- }
- return this.tubeFactoryConfigs;
- }
-
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Element }
- * {@link Object }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineDefinition.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineDefinition.java
deleted file mode 100644
index 22367dd1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineDefinition.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.11.17 at 11:49:55 AM CET
-//
-
-
-package com.sun.xml.internal.ws.runtime.config;
-
-import org.w3c.dom.Element;
-
-import javax.xml.bind.annotation.*;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * <p>Java class for tubelineDefinitionCType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType name="tubelineDefinitionCType">
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element name="client-side" type="{http://java.sun.com/xml/ns/metro/config}tubeFactoryListCType" minOccurs="0"/>
- * &lt;element name="endpoint-side" type="{http://java.sun.com/xml/ns/metro/config}tubeFactoryListCType" minOccurs="0"/>
- * &lt;any/>
- * &lt;/sequence>
- * &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}ID" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "tubelineDefinitionCType", propOrder = {
- "clientSide",
- "endpointSide",
- "any"
-})
-public class TubelineDefinition {
-
- @XmlElement(name = "client-side")
- protected TubeFactoryList clientSide;
- @XmlElement(name = "endpoint-side")
- protected TubeFactoryList endpointSide;
- @XmlAnyElement(lax = true)
- protected List<Object> any;
- @XmlAttribute
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- @XmlID
- @XmlSchemaType(name = "ID")
- protected String name;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the clientSide property.
- *
- * @return
- * possible object is
- * {@link TubeFactoryList }
- *
- */
- public TubeFactoryList getClientSide() {
- return clientSide;
- }
-
- /**
- * Sets the value of the clientSide property.
- *
- * @param value
- * allowed object is
- * {@link TubeFactoryList }
- *
- */
- public void setClientSide(TubeFactoryList value) {
- this.clientSide = value;
- }
-
- /**
- * Gets the value of the endpointSide property.
- *
- * @return
- * possible object is
- * {@link TubeFactoryList }
- *
- */
- public TubeFactoryList getEndpointSide() {
- return endpointSide;
- }
-
- /**
- * Sets the value of the endpointSide property.
- *
- * @param value
- * allowed object is
- * {@link TubeFactoryList }
- *
- */
- public void setEndpointSide(TubeFactoryList value) {
- this.endpointSide = value;
- }
-
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Element }
- * {@link Object }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeature.java
deleted file mode 100644
index 4b551438..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeature.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.runtime.config;
-
-import com.sun.xml.internal.ws.api.FeatureConstructor;
-import com.sun.org.glassfish.gmbal.ManagedAttribute;
-import com.sun.org.glassfish.gmbal.ManagedData;
-
-import javax.xml.ws.WebServiceFeature;
-import java.util.List;
-
-/**
- * WebServiceFeature for the Tubeline {@link javax.xml.ws.WebServiceFeature}
- *
- * @author Fabian Ritzmann
- */
-@ManagedData
-public class TubelineFeature extends WebServiceFeature {
-
- public static final String ID = "com.sun.xml.internal.ws.runtime.config.TubelineFeature";
-
- @FeatureConstructor({
- "enabled"
- })
- public TubelineFeature(boolean enabled) {
- super.enabled = enabled;
- }
-
- @Override
- @ManagedAttribute
- public String getID() {
- return ID;
- }
-
- // TODO implement
- List<String> getTubeFactories() {
- return null;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeatureReader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeatureReader.java
deleted file mode 100644
index b142129b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeatureReader.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.runtime.config;
-
-import com.sun.istack.internal.logging.Logger;
-import com.sun.xml.internal.ws.config.metro.dev.FeatureReader;
-import com.sun.xml.internal.ws.config.metro.util.ParserUtil;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLEventReader;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.events.Attribute;
-import javax.xml.stream.events.EndElement;
-import javax.xml.stream.events.StartElement;
-import javax.xml.stream.events.XMLEvent;
-import javax.xml.ws.WebServiceException;
-import java.util.Iterator;
-
-/**
- *
- * @author Fabian Ritzmann
- */
-public class TubelineFeatureReader implements FeatureReader {
-
- private static final Logger LOGGER = Logger.getLogger(TubelineFeatureReader.class);
- private static final QName NAME_ATTRIBUTE_NAME = new QName("name");
-
- // TODO implement
- public TubelineFeature parse(XMLEventReader reader) throws WebServiceException {
- try {
- final StartElement element = reader.nextEvent().asStartElement();
- boolean attributeEnabled = true;
- final Iterator iterator = element.getAttributes();
- while (iterator.hasNext()) {
- final Attribute nextAttribute = (Attribute) iterator.next();
- final QName attributeName = nextAttribute.getName();
- if (ENABLED_ATTRIBUTE_NAME.equals(attributeName)) {
- attributeEnabled = ParserUtil.parseBooleanValue(nextAttribute.getValue());
- } else if (NAME_ATTRIBUTE_NAME.equals(attributeName)) {
- // TODO use name attribute
- } else {
- // TODO logging message
- throw LOGGER.logSevereException(new WebServiceException("Unexpected attribute"));
- }
- }
- return parseFactories(attributeEnabled, element, reader);
- } catch (XMLStreamException e) {
- throw LOGGER.logSevereException(new WebServiceException("Failed to unmarshal XML document", e));
- }
- }
-
- private TubelineFeature parseFactories(final boolean enabled, final StartElement element, final XMLEventReader reader)
- throws WebServiceException {
- int elementRead = 0;
- loop:
- while (reader.hasNext()) {
- try {
- final XMLEvent event = reader.nextEvent();
- switch (event.getEventType()) {
- case XMLStreamConstants.COMMENT:
- break; // skipping the comments and start document events
- case XMLStreamConstants.CHARACTERS:
- if (event.asCharacters().isWhiteSpace()) {
- break;
- }
- else {
- // TODO: logging message
- throw LOGGER.logSevereException(new WebServiceException("No character data allowed, was " + event.asCharacters()));
- }
- case XMLStreamConstants.START_ELEMENT:
- // TODO implement
- elementRead++;
- break;
- case XMLStreamConstants.END_ELEMENT:
- elementRead--;
- if (elementRead < 0) {
- final EndElement endElement = event.asEndElement();
- if (!element.getName().equals(endElement.getName())) {
- // TODO logging message
- throw LOGGER.logSevereException(new WebServiceException("End element does not match " + endElement));
- }
- break loop;
- }
- else {
- break;
- }
- default:
- // TODO logging message
- throw LOGGER.logSevereException(new WebServiceException("Unexpected event, was " + event));
- }
- } catch (XMLStreamException e) {
- // TODO logging message
- throw LOGGER.logSevereException(new WebServiceException("Failed to unmarshal XML document", e));
- }
- }
-
- // TODO implement
- return new TubelineFeature(enabled);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineMapping.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineMapping.java
deleted file mode 100644
index e59c825c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineMapping.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.11.17 at 11:49:55 AM CET
-//
-
-
-package com.sun.xml.internal.ws.runtime.config;
-
-import org.w3c.dom.Element;
-
-import javax.xml.bind.annotation.*;
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * <p>Java class for tubelineMappingCType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType name="tubelineMappingCType">
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element name="endpoint-ref" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
- * &lt;element name="tubeline-ref" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
- * &lt;any/>
- * &lt;/sequence>
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "tubelineMappingCType", propOrder = {
- "endpointRef",
- "tubelineRef",
- "any"
-})
-public class TubelineMapping {
-
- @XmlElement(name = "endpoint-ref", required = true)
- @XmlSchemaType(name = "anyURI")
- protected String endpointRef;
- @XmlElement(name = "tubeline-ref", required = true)
- @XmlSchemaType(name = "anyURI")
- protected String tubelineRef;
- @XmlAnyElement(lax = true)
- protected List<Object> any;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the endpointRef property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getEndpointRef() {
- return endpointRef;
- }
-
- /**
- * Sets the value of the endpointRef property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setEndpointRef(String value) {
- this.endpointRef = value;
- }
-
- /**
- * Gets the value of the tubelineRef property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getTubelineRef() {
- return tubelineRef;
- }
-
- /**
- * Sets the value of the tubelineRef property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setTubelineRef(String value) {
- this.tubelineRef = value;
- }
-
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Element }
- * {@link Object }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/Tubelines.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/Tubelines.java
deleted file mode 100644
index 93bd23e7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/Tubelines.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.11.17 at 11:49:55 AM CET
-//
-
-
-package com.sun.xml.internal.ws.runtime.config;
-
-import org.w3c.dom.Element;
-
-import javax.xml.bind.annotation.*;
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * <p>Java class for tubelinesConfigCType complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * &lt;complexType name="tubelinesConfigCType">
- * &lt;complexContent>
- * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * &lt;sequence>
- * &lt;element ref="{http://java.sun.com/xml/ns/metro/config}tubeline-mapping" maxOccurs="unbounded" minOccurs="0"/>
- * &lt;element ref="{http://java.sun.com/xml/ns/metro/config}tubeline" maxOccurs="unbounded" minOccurs="0"/>
- * &lt;any/>
- * &lt;/sequence>
- * &lt;attribute name="default" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- * &lt;/restriction>
- * &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- *
- *
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "tubelinesConfigCType", propOrder = {
- "tubelineMappings",
- "tubelineDefinitions",
- "any"
-})
-public class Tubelines {
-
- @XmlElement(name = "tubeline-mapping")
- protected List<TubelineMapping> tubelineMappings;
- @XmlElement(name = "tubeline")
- protected List<TubelineDefinition> tubelineDefinitions;
- @XmlAnyElement(lax = true)
- protected List<Object> any;
- @XmlAttribute(name = "default")
- @XmlSchemaType(name = "anyURI")
- protected String _default;
- @XmlAnyAttribute
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the tubelineMappings property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the tubelineMappings property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getTubelineMappings().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link TubelineMapping }
- *
- *
- */
- public List<TubelineMapping> getTubelineMappings() {
- if (tubelineMappings == null) {
- tubelineMappings = new ArrayList<TubelineMapping>();
- }
- return this.tubelineMappings;
- }
-
- /**
- * Gets the value of the tubelineDefinitions property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the tubelineDefinitions property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getTubelineDefinitions().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link TubelineDefinition }
- *
- *
- */
- public List<TubelineDefinition> getTubelineDefinitions() {
- if (tubelineDefinitions == null) {
- tubelineDefinitions = new ArrayList<TubelineDefinition>();
- }
- return this.tubelineDefinitions;
- }
-
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Element }
- * {@link Object }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
-
- /**
- * Gets the value of the default property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getDefault() {
- return _default;
- }
-
- /**
- * Sets the value of the default property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setDefault(String value) {
- this._default = value;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/package-info.java
deleted file mode 100644
index 76f50df4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/package-info.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2008.11.17 at 11:49:55 AM CET
-//
-
-@javax.xml.bind.annotation.XmlSchema(namespace = "http://java.sun.com/xml/ns/metro/config", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
-package com.sun.xml.internal.ws.runtime.config;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractMultiInstanceResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractMultiInstanceResolver.java
deleted file mode 100644
index 85b971d7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractMultiInstanceResolver.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.xml.internal.ws.api.server.AbstractInstanceResolver;
-import com.sun.xml.internal.ws.api.server.InstanceResolver;
-import com.sun.xml.internal.ws.api.server.ResourceInjector;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.server.WSWebServiceContext;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import java.lang.reflect.Method;
-
-/**
- * Partial implementation of {@link InstanceResolver} with code
- * to handle multiple instances per server.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class AbstractMultiInstanceResolver<T> extends AbstractInstanceResolver<T> {
- protected final Class<T> clazz;
-
- // fields for resource injection.
- private /*almost final*/ WSWebServiceContext webServiceContext;
- protected /*almost final*/ WSEndpoint owner;
- private final Method postConstructMethod;
- private final Method preDestroyMethod;
- private /*almost final*/ ResourceInjector resourceInjector;
-
- public AbstractMultiInstanceResolver(Class<T> clazz) {
- this.clazz = clazz;
-
- postConstructMethod = findAnnotatedMethod(clazz, PostConstruct.class);
- preDestroyMethod = findAnnotatedMethod(clazz, PreDestroy.class);
- }
-
- /**
- * Perform resource injection on the given instance.
- */
- protected final void prepare(T t) {
- // we can only start creating new instances after the start method is invoked.
- assert webServiceContext!=null;
-
- resourceInjector.inject(webServiceContext,t);
- invokeMethod(postConstructMethod,t);
- }
-
- /**
- * Creates a new instance via the default constructor.
- */
- protected final T create() {
- T t = createNewInstance(clazz);
- prepare(t);
- return t;
- }
-
- @Override
- public void start(WSWebServiceContext wsc, WSEndpoint endpoint) {
- resourceInjector = getResourceInjector(endpoint);
- this.webServiceContext = wsc;
- this.owner = endpoint;
- }
-
- protected final void dispose(T instance) {
- invokeMethod(preDestroyMethod,instance);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractWebServiceContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractWebServiceContext.java
deleted file mode 100644
index c0199f65..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractWebServiceContext.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.server.WSWebServiceContext;
-import com.sun.xml.internal.ws.server.provider.AsyncProviderInvokerTube;
-import com.sun.istack.internal.NotNull;
-import org.w3c.dom.Element;
-
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.security.Principal;
-
-/**
- * Partial {@link WSWebServiceContext} implementation. This implementation depends on
- * {@link Packet} and concrete implementations provide it via
- * {@link #getRequestPacket()}.
- *
- * @see InvokerTube,
- * @see AsyncProviderInvokerTube
- *
- * @author Jitendra Kotamraju
- */
-public abstract class AbstractWebServiceContext implements WSWebServiceContext {
-
- private final WSEndpoint endpoint;
-
- public AbstractWebServiceContext(@NotNull WSEndpoint endpoint) {
- this.endpoint = endpoint;
- }
-
- public MessageContext getMessageContext() {
- Packet packet = getRequestPacket();
- if (packet == null) {
- throw new IllegalStateException("getMessageContext() can only be called while servicing a request");
- }
- return new EndpointMessageContextImpl(packet);
- }
-
- public Principal getUserPrincipal() {
- Packet packet = getRequestPacket();
- if (packet == null) {
- throw new IllegalStateException("getUserPrincipal() can only be called while servicing a request");
- }
- return packet.webServiceContextDelegate.getUserPrincipal(packet);
- }
-
- public boolean isUserInRole(String role) {
- Packet packet = getRequestPacket();
- if (packet == null) {
- throw new IllegalStateException("isUserInRole() can only be called while servicing a request");
- }
- return packet.webServiceContextDelegate.isUserInRole(packet,role);
- }
-
- public EndpointReference getEndpointReference(Element...referenceParameters) {
- return getEndpointReference(W3CEndpointReference.class, referenceParameters);
- }
-
- public <T extends EndpointReference> T getEndpointReference(Class<T> clazz, Element...referenceParameters) {
- Packet packet = getRequestPacket();
- if (packet == null) {
- throw new IllegalStateException("getEndpointReference() can only be called while servicing a request");
- }
- String address = packet.webServiceContextDelegate.getEPRAddress(packet, endpoint);
- String wsdlAddress = null;
- if(endpoint.getServiceDefinition() != null) {
- wsdlAddress = packet.webServiceContextDelegate.getWSDLAddress(packet,endpoint);
- }
- return clazz.cast(endpoint.getEndpointReference(clazz,address,wsdlAddress, referenceParameters));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DefaultResourceInjector.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DefaultResourceInjector.java
deleted file mode 100644
index 6fde5753..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DefaultResourceInjector.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.server.ResourceInjector;
-import com.sun.xml.internal.ws.api.server.WSWebServiceContext;
-import com.sun.xml.internal.ws.util.InjectionPlan;
-
-import javax.xml.ws.WebServiceContext;
-
-/**
- * Default {@link ResourceInjector}.
- *
- * @see ResourceInjector#STANDALONE
- * @author Kohsuke Kawaguchi
- */
-public final class DefaultResourceInjector extends ResourceInjector {
- public void inject(@NotNull WSWebServiceContext context, @NotNull Object instance) {
- InjectionPlan.buildInjectionPlan(
- instance.getClass(),WebServiceContext.class,false).inject(instance,context);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DraconianValidationErrorHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DraconianValidationErrorHandler.java
deleted file mode 100644
index c95a780a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DraconianValidationErrorHandler.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.xml.internal.ws.developer.ValidationErrorHandler;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.SAXException;
-
-/**
- * Default {@link ValidationErrorHandler} that just rethrows SAXException
- * in case of errors.
- *
- * @author Jitendra Kotamraju
- */
-public class DraconianValidationErrorHandler extends ValidationErrorHandler {
-
- public void warning(SAXParseException e) throws SAXException {
- // noop
- }
-
- public void error(SAXParseException e) throws SAXException {
- throw e;
- }
-
- public void fatalError(SAXParseException e) throws SAXException {
- throw e;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointAwareTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointAwareTube.java
deleted file mode 100644
index cd460dcf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointAwareTube.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-
-/**
- * Tubes that implement this interface will receive notification of the WSEndpoint
- * holding the tubeline after successful endpoint creation.
- *
- * @since 2.2.6
- */
-public interface EndpointAwareTube extends Tube {
- /**
- * Setter for WSEndpoint holding this tube
- * @param endpoint WSEndpoint holding this tube
- */
- public void setEndpoint(WSEndpoint<?> endpoint);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java
deleted file mode 100644
index c78aef5f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java
+++ /dev/null
@@ -1,783 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-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.databinding.WSDLGenInfo;
-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.policy.PolicyResolver;
-import com.sun.xml.internal.ws.api.policy.PolicyResolverFactory;
-import com.sun.xml.internal.ws.api.server.AsyncProvider;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.ContainerResolver;
-import com.sun.xml.internal.ws.api.server.InstanceResolver;
-import com.sun.xml.internal.ws.api.server.Invoker;
-import com.sun.xml.internal.ws.api.server.SDDocument;
-import com.sun.xml.internal.ws.api.server.SDDocumentSource;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
-import com.sun.xml.internal.ws.api.wsdl.parser.XMLEntityResolver;
-import com.sun.xml.internal.ws.api.wsdl.parser.XMLEntityResolver.Parser;
-import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGeneratorExtension;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.binding.SOAPBindingImpl;
-import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
-import com.sun.xml.internal.ws.model.AbstractSEIModelImpl;
-import com.sun.xml.internal.ws.model.ReflectAnnotationReader;
-import com.sun.xml.internal.ws.model.RuntimeModeler;
-import com.sun.xml.internal.ws.model.SOAPSEIModel;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.policy.jaxws.PolicyUtil;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-import com.sun.xml.internal.ws.server.provider.ProviderInvokerTube;
-import com.sun.xml.internal.ws.server.sei.SEIInvokerTube;
-import com.sun.xml.internal.ws.util.HandlerAnnotationInfo;
-import com.sun.xml.internal.ws.util.HandlerAnnotationProcessor;
-import com.sun.xml.internal.ws.util.ServiceConfigurationError;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import javax.jws.WebService;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.Provider;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.WebServiceProvider;
-import javax.xml.ws.soap.SOAPBinding;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Logger;
-
-/**
- * Entry point to the JAX-WS RI server-side runtime.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public class EndpointFactory {
- private static final EndpointFactory instance = new EndpointFactory();
-
- public static EndpointFactory getInstance() {
- return instance;
- }
-
- /**
- * Implements {@link WSEndpoint#create}.
- *
- * No need to take WebServiceContext implementation. When InvokerPipe is
- * instantiated, it calls InstanceResolver to set up a WebServiceContext.
- * We shall only take delegate to getUserPrincipal and isUserInRole from adapter.
- *
- * <p>
- * Nobody else should be calling this method.
- */
- public static <T> WSEndpoint<T> createEndpoint(
- Class<T> implType, boolean processHandlerAnnotation, @Nullable Invoker invoker,
- @Nullable QName serviceName, @Nullable QName portName,
- @Nullable Container container, @Nullable WSBinding binding,
- @Nullable SDDocumentSource primaryWsdl,
- @Nullable Collection<? extends SDDocumentSource> metadata,
- EntityResolver resolver, boolean isTransportSynchronous) {
- return createEndpoint(implType, processHandlerAnnotation, invoker, serviceName,
- portName, container, binding, primaryWsdl, metadata, resolver, isTransportSynchronous, true);
- }
-
- public static <T> WSEndpoint<T> createEndpoint(
- Class<T> implType, boolean processHandlerAnnotation, @Nullable Invoker invoker,
- @Nullable QName serviceName, @Nullable QName portName,
- @Nullable Container container, @Nullable WSBinding binding,
- @Nullable SDDocumentSource primaryWsdl,
- @Nullable Collection<? extends SDDocumentSource> metadata,
- EntityResolver resolver, boolean isTransportSynchronous, boolean isStandard) {
- EndpointFactory factory = container != null ? container.getSPI(EndpointFactory.class) : null;
- if (factory == null)
- factory = EndpointFactory.getInstance();
-
- return factory.create(
- implType,processHandlerAnnotation, invoker,serviceName,portName,container,binding,primaryWsdl,metadata,resolver,isTransportSynchronous,isStandard);
- }
-
- /**
- * Implements {@link WSEndpoint#create}.
- *
- * No need to take WebServiceContext implementation. When InvokerPipe is
- * instantiated, it calls InstanceResolver to set up a WebServiceContext.
- * We shall only take delegate to getUserPrincipal and isUserInRole from adapter.
- *
- * <p>
- * Nobody else should be calling this method.
- */
- public <T> WSEndpoint<T> create(
- Class<T> implType, boolean processHandlerAnnotation, @Nullable Invoker invoker,
- @Nullable QName serviceName, @Nullable QName portName,
- @Nullable Container container, @Nullable WSBinding binding,
- @Nullable SDDocumentSource primaryWsdl,
- @Nullable Collection<? extends SDDocumentSource> metadata,
- EntityResolver resolver, boolean isTransportSynchronous) {
- return create(implType, processHandlerAnnotation, invoker, serviceName,
- portName, container, binding, primaryWsdl, metadata, resolver, isTransportSynchronous,
- true);
-
- }
-
- public <T> WSEndpoint<T> create(
- Class<T> implType, boolean processHandlerAnnotation, @Nullable Invoker invoker,
- @Nullable QName serviceName, @Nullable QName portName,
- @Nullable Container container, @Nullable WSBinding binding,
- @Nullable SDDocumentSource primaryWsdl,
- @Nullable Collection<? extends SDDocumentSource> metadata,
- EntityResolver resolver, boolean isTransportSynchronous, boolean isStandard) {
-
- if(implType ==null)
- throw new IllegalArgumentException();
-
- MetadataReader metadataReader = getExternalMetadatReader(implType, binding);
-
- if (isStandard) {
- verifyImplementorClass(implType, metadataReader);
- }
-
- if (invoker == null) {
- invoker = InstanceResolver.createDefault(implType).createInvoker();
- }
-
- List<SDDocumentSource> md = new ArrayList<SDDocumentSource>();
- if(metadata!=null)
- md.addAll(metadata);
-
- if(primaryWsdl!=null && !md.contains(primaryWsdl))
- md.add(primaryWsdl);
-
- if(container==null)
- container = ContainerResolver.getInstance().getContainer();
-
- if(serviceName==null)
- serviceName = getDefaultServiceName(implType, metadataReader);
-
- if(portName==null)
- portName = getDefaultPortName(serviceName,implType, metadataReader);
-
- {// error check
- String serviceNS = serviceName.getNamespaceURI();
- String portNS = portName.getNamespaceURI();
- if (!serviceNS.equals(portNS)) {
- throw new ServerRtException("wrong.tns.for.port",portNS, serviceNS);
- }
- }
-
- // setting a default binding
- if (binding == null)
- binding = BindingImpl.create(BindingID.parse(implType));
-
- if ( isStandard && primaryWsdl != null) {
- verifyPrimaryWSDL(primaryWsdl, serviceName);
- }
-
- QName portTypeName = null;
- if (isStandard && implType.getAnnotation(WebServiceProvider.class)==null) {
- portTypeName = RuntimeModeler.getPortTypeName(implType, metadataReader);
- }
-
- // Categorises the documents as WSDL, Schema etc
- List<SDDocumentImpl> docList = categoriseMetadata(md, serviceName, portTypeName);
- // Finds the primary WSDL and makes sure that metadata doesn't have
- // two concrete or abstract WSDLs
- SDDocumentImpl primaryDoc = primaryWsdl != null ? SDDocumentImpl.create(primaryWsdl,serviceName,portTypeName) : findPrimary(docList);
-
- EndpointAwareTube terminal;
- WSDLPort wsdlPort = null;
- AbstractSEIModelImpl seiModel = null;
- // create WSDL model
- if (primaryDoc != null) {
- wsdlPort = getWSDLPort(primaryDoc, docList, serviceName, portName, container, resolver);
- }
-
- WebServiceFeatureList features=((BindingImpl)binding).getFeatures();
- if (isStandard) {
- features.parseAnnotations(implType);
- }
- PolicyMap policyMap = null;
- // create terminal pipe that invokes the application
- if (isUseProviderTube(implType, isStandard)) {
- //TODO incase of Provider, provide a way to User for complete control of the message processing by giving
- // ability to turn off the WSDL/Policy based features and its associated tubes.
-
- //Even in case of Provider, merge all features configured via WSDL/Policy or deployment configuration
- Iterable<WebServiceFeature> configFtrs;
- if(wsdlPort != null) {
- policyMap = wsdlPort.getOwner().getParent().getPolicyMap();
- //Merge features from WSDL and other policy configuration
- configFtrs = wsdlPort.getFeatures();
- } else {
- //No WSDL, so try to merge features from Policy configuration
- policyMap = PolicyResolverFactory.create().resolve(
- new PolicyResolver.ServerContext(null, container, implType, false));
- configFtrs = PolicyUtil.getPortScopedFeatures(policyMap,serviceName,portName);
- }
- features.mergeFeatures(configFtrs, true);
- terminal = createProviderInvokerTube(implType, binding, invoker, container);
- } else {
- // Create runtime model for non Provider endpoints
- seiModel = createSEIModel(wsdlPort, implType, serviceName, portName, binding, primaryDoc);
- if(binding instanceof SOAPBindingImpl){
- //set portKnownHeaders on Binding, so that they can be used for MU processing
- ((SOAPBindingImpl)binding).setPortKnownHeaders(
- ((SOAPSEIModel)seiModel).getKnownHeaders());
- }
- // Generate WSDL for SEI endpoints(not for Provider endpoints)
- if (primaryDoc == null) {
- primaryDoc = generateWSDL(binding, seiModel, docList, container, implType);
- // create WSDL model
- wsdlPort = getWSDLPort(primaryDoc, docList, serviceName, portName, container, resolver);
- seiModel.freeze(wsdlPort);
- }
- policyMap = wsdlPort.getOwner().getParent().getPolicyMap();
- // New Features might have been added in WSDL through Policy.
- //Merge features from WSDL and other policy configuration
- // This sets only the wsdl features that are not already set(enabled/disabled)
- features.mergeFeatures(wsdlPort.getFeatures(), true);
- terminal = createSEIInvokerTube(seiModel,invoker,binding);
- }
-
- // Process @HandlerChain, if handler-chain is not set via Deployment Descriptor
- if (processHandlerAnnotation) {
- processHandlerAnnotation(binding, implType, serviceName, portName);
- }
- // Selects only required metadata for this endpoint from the passed-in metadata
- if (primaryDoc != null) {
- docList = findMetadataClosure(primaryDoc, docList, resolver);
- }
-
- ServiceDefinitionImpl serviceDefiniton = (primaryDoc != null) ? new ServiceDefinitionImpl(docList, primaryDoc) : null;
-
- return create(serviceName, portName, binding, container, seiModel, wsdlPort, implType, serviceDefiniton,
- terminal, isTransportSynchronous, policyMap);
- }
-
- protected <T> WSEndpoint<T> create(QName serviceName, QName portName, WSBinding binding, Container container, SEIModel seiModel, WSDLPort wsdlPort, Class<T> implType, ServiceDefinitionImpl serviceDefinition, EndpointAwareTube terminal, boolean isTransportSynchronous, PolicyMap policyMap) {
- return new WSEndpointImpl<T>(serviceName, portName, binding, container, seiModel,
- wsdlPort, implType, serviceDefinition, terminal, isTransportSynchronous, policyMap);
- }
-
- protected boolean isUseProviderTube(Class<?> implType, boolean isStandard) {
- return !isStandard || implType.getAnnotation(WebServiceProvider.class)!=null;
- }
-
- protected EndpointAwareTube createSEIInvokerTube(AbstractSEIModelImpl seiModel, Invoker invoker, WSBinding binding) {
- return new SEIInvokerTube(seiModel,invoker,binding);
- }
-
- protected <T> EndpointAwareTube createProviderInvokerTube(final Class<T> implType, final WSBinding binding,
- final Invoker invoker, final Container container) {
- return ProviderInvokerTube.create(implType, binding, invoker, container);
- }
- /**
- * Goes through the original metadata documents and collects the required ones.
- * This done traversing from primary WSDL and its imports until it builds a
- * complete set of documents(transitive closure) for the endpoint.
- *
- * @param primaryDoc primary WSDL doc
- * @param docList complete metadata
- * @return new metadata that doesn't contain extraneous documnets.
- */
- private static List<SDDocumentImpl> findMetadataClosure(SDDocumentImpl primaryDoc, List<SDDocumentImpl> docList, EntityResolver resolver) {
- // create a map for old metadata
- Map<String, SDDocumentImpl> oldMap = new HashMap<String, SDDocumentImpl>();
- for(SDDocumentImpl doc : docList) {
- oldMap.put(doc.getSystemId().toString(), doc);
- }
- // create a map for new metadata
- Map<String, SDDocumentImpl> newMap = new HashMap<String, SDDocumentImpl>();
- newMap.put(primaryDoc.getSystemId().toString(), primaryDoc);
-
- List<String> remaining = new ArrayList<String>();
- remaining.addAll(primaryDoc.getImports());
- while(!remaining.isEmpty()) {
- String url = remaining.remove(0);
- SDDocumentImpl doc = oldMap.get(url);
- if (doc == null) {
- // old metadata doesn't have this imported doc, may be external
- if (resolver != null) {
- try {
- InputSource source = resolver.resolveEntity(null, url);
- if (source != null) {
- MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer();
- XMLStreamReader reader = XmlUtil.newXMLInputFactory(true).createXMLStreamReader(source.getByteStream());
- xsb.createFromXMLStreamReader(reader);
-
- SDDocumentSource sdocSource = SDDocumentImpl.create(new URL(url), xsb);
- doc = SDDocumentImpl.create(sdocSource, null, null);
- }
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- }
- }
- // Check if new metadata already contains this doc
- if (doc != null && !newMap.containsKey(url)) {
- newMap.put(url, doc);
- remaining.addAll(doc.getImports());
- }
- }
- List<SDDocumentImpl> newMetadata = new ArrayList<SDDocumentImpl>();
- newMetadata.addAll(newMap.values());
- return newMetadata;
- }
-
- private static <T> void processHandlerAnnotation(WSBinding binding, Class<T> implType, QName serviceName, QName portName) {
- HandlerAnnotationInfo chainInfo =
- HandlerAnnotationProcessor.buildHandlerInfo(
- implType, serviceName, portName, binding);
- if (chainInfo != null) {
- binding.setHandlerChain(chainInfo.getHandlers());
- if (binding instanceof SOAPBinding) {
- ((SOAPBinding) binding).setRoles(chainInfo.getRoles());
- }
- }
-
- }
-
- /**
- * Verifies if the endpoint implementor class has @WebService or @WebServiceProvider
- * annotation
- *
- * @return
- * true if it is a Provider or AsyncProvider endpoint
- * false otherwise
- * @throws java.lang.IllegalArgumentException
- * If it doesn't have any one of @WebService or @WebServiceProvider
- * If it has both @WebService and @WebServiceProvider annotations
- */
- public static boolean verifyImplementorClass(Class<?> clz) {
- return verifyImplementorClass(clz, null);
- }
-
- /**
- * Verifies if the endpoint implementor class has @WebService or @WebServiceProvider
- * annotation; passing MetadataReader instance allows to read annotations from
- * xml descriptor instead of class's annotations
- *
- * @return
- * true if it is a Provider or AsyncProvider endpoint
- * false otherwise
- * @throws java.lang.IllegalArgumentException
- * If it doesn't have any one of @WebService or @WebServiceProvider
- * If it has both @WebService and @WebServiceProvider annotations
- */
- public static boolean verifyImplementorClass(Class<?> clz, MetadataReader metadataReader) {
-
- if (metadataReader == null) {
- metadataReader = new ReflectAnnotationReader();
- }
-
- WebServiceProvider wsProvider = metadataReader.getAnnotation(WebServiceProvider.class, clz);
- WebService ws = metadataReader.getAnnotation(WebService.class, clz);
- if (wsProvider == null && ws == null) {
- throw new IllegalArgumentException(clz +" has neither @WebService nor @WebServiceProvider annotation");
- }
- if (wsProvider != null && ws != null) {
- throw new IllegalArgumentException(clz +" has both @WebService and @WebServiceProvider annotations");
- }
- if (wsProvider != null) {
- if (Provider.class.isAssignableFrom(clz) || AsyncProvider.class.isAssignableFrom(clz)) {
- return true;
- }
- throw new IllegalArgumentException(clz +" doesn't implement Provider or AsyncProvider interface");
- }
- return false;
- }
-
-
- private static AbstractSEIModelImpl createSEIModel(WSDLPort wsdlPort,
- Class<?> implType, @NotNull QName serviceName, @NotNull QName portName, WSBinding binding,
- SDDocumentSource primaryWsdl) {
- DatabindingFactory fac = DatabindingFactory.newInstance();
- DatabindingConfig config = new DatabindingConfig();
- config.setEndpointClass(implType);
- config.getMappingInfo().setServiceName(serviceName);
- config.setWsdlPort(wsdlPort);
- config.setWSBinding(binding);
- config.setClassLoader(implType.getClassLoader());
- config.getMappingInfo().setPortName(portName);
- if (primaryWsdl != null) config.setWsdlURL(primaryWsdl.getSystemId());
- config.setMetadataReader(getExternalMetadatReader(implType, binding));
-
- com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);
- return (AbstractSEIModelImpl) rt.getModel();
- }
-
- public static MetadataReader getExternalMetadatReader(Class<?> implType, WSBinding binding) {
- com.oracle.webservices.internal.api.databinding.ExternalMetadataFeature ef = binding.getFeature(
- com.oracle.webservices.internal.api.databinding.ExternalMetadataFeature.class);
- // TODO-Miran: would it be necessary to disable secure xml processing?
- if (ef != null)
- return ef.getMetadataReader(implType.getClassLoader(), false);
- return null;
- }
-
- /**
- *Set the mtom enable setting from wsdl model (mtom policy assertion) on to @link WSBinding} if DD has
- * not already set it on BindingID. Also check conflicts.
- */
- /*
- private static void applyEffectiveMtomSetting(WSDLBoundPortType wsdlBinding, WSBinding binding){
- if(wsdlBinding.isMTOMEnabled()){
- BindingID bindingId = binding.getBindingId();
- if(bindingId.isMTOMEnabled() == null){
- binding.setMTOMEnabled(true);
- }else if (bindingId.isMTOMEnabled() != null && bindingId.isMTOMEnabled() == Boolean.FALSE){
- //TODO: i18N
- throw new ServerRtException("Deployment failed! Mtom policy assertion in WSDL is enabled whereas the deplyment descriptor setting wants to disable it!");
- }
- }
- }
- */
- /**
- * If service name is not already set via DD or programmatically, it uses
- * annotations {@link WebServiceProvider}, {@link WebService} on implementorClass to get PortName.
- *
- * @return non-null service name
- */
- public static @NotNull QName getDefaultServiceName(Class<?> implType) {
- return getDefaultServiceName(implType, null);
- }
-
- public static @NotNull QName getDefaultServiceName(Class<?> implType, MetadataReader metadataReader) {
- return getDefaultServiceName(implType, true, metadataReader);
- }
-
- public static @NotNull QName getDefaultServiceName(Class<?> implType, boolean isStandard) {
- return getDefaultServiceName(implType, isStandard, null);
- }
-
- public static @NotNull QName getDefaultServiceName(Class<?> implType, boolean isStandard, MetadataReader metadataReader) {
- if (metadataReader == null) {
- metadataReader = new ReflectAnnotationReader();
- }
- QName serviceName;
- WebServiceProvider wsProvider = metadataReader.getAnnotation(WebServiceProvider.class, implType);
- if (wsProvider!=null) {
- String tns = wsProvider.targetNamespace();
- String local = wsProvider.serviceName();
- serviceName = new QName(tns, local);
- } else {
- serviceName = RuntimeModeler.getServiceName(implType, metadataReader, isStandard);
- }
- assert serviceName != null;
- return serviceName;
- }
-
- /**
- * If portName is not already set via DD or programmatically, it uses
- * annotations on implementorClass to get PortName.
- *
- * @return non-null port name
- */
- public static @NotNull QName getDefaultPortName(QName serviceName, Class<?> implType) {
- return getDefaultPortName(serviceName, implType, null);
- }
-
- public static @NotNull QName getDefaultPortName(QName serviceName, Class<?> implType, MetadataReader metadataReader) {
- return getDefaultPortName(serviceName, implType, true, metadataReader);
- }
-
- public static @NotNull QName getDefaultPortName(QName serviceName, Class<?> implType, boolean isStandard) {
- return getDefaultPortName(serviceName, implType, isStandard, null);
- }
-
- public static @NotNull QName getDefaultPortName(QName serviceName, Class<?> implType, boolean isStandard, MetadataReader metadataReader) {
- if (metadataReader == null) {
- metadataReader = new ReflectAnnotationReader();
- }
- QName portName;
- WebServiceProvider wsProvider = metadataReader.getAnnotation(WebServiceProvider.class, implType);
- if (wsProvider!=null) {
- String tns = wsProvider.targetNamespace();
- String local = wsProvider.portName();
- portName = new QName(tns, local);
- } else {
- portName = RuntimeModeler.getPortName(implType, metadataReader, serviceName.getNamespaceURI(), isStandard);
- }
- assert portName != null;
- return portName;
- }
-
- /**
- * Returns the wsdl from @WebService, or @WebServiceProvider annotation using
- * wsdlLocation element.
- *
- * @param implType
- * endpoint implementation class
- * make sure that you called {@link #verifyImplementorClass} on it.
- * @return wsdl if there is wsdlLocation, else null
- */
- public static @Nullable String getWsdlLocation(Class<?> implType) {
- return getWsdlLocation(implType, new ReflectAnnotationReader());
- }
-
- /**
- * Returns the wsdl from @WebService, or @WebServiceProvider annotation using
- * wsdlLocation element.
- *
- * @param implType
- * endpoint implementation class
- * make sure that you called {@link #verifyImplementorClass} on it.
- * @return wsdl if there is wsdlLocation, else null
- */
- public static @Nullable String getWsdlLocation(Class<?> implType, MetadataReader metadataReader) {
-
- if (metadataReader == null) {
- metadataReader = new ReflectAnnotationReader();
- }
-
- WebService ws = metadataReader.getAnnotation(WebService.class, implType);
- if (ws != null) {
- return nullIfEmpty(ws.wsdlLocation());
- } else {
- WebServiceProvider wsProvider = implType.getAnnotation(WebServiceProvider.class);
- assert wsProvider != null;
- return nullIfEmpty(wsProvider.wsdlLocation());
- }
- }
-
- private static String nullIfEmpty(String string) {
- if (string.length() < 1) {
- string = null;
- }
- return string;
- }
-
- /**
- * Generates the WSDL and XML Schema for the endpoint if necessary
- * It generates WSDL only for SOAP1.1, and for XSOAP1.2 bindings
- */
- private static SDDocumentImpl generateWSDL(WSBinding binding, AbstractSEIModelImpl seiModel, List<SDDocumentImpl> docs,
- Container container, Class implType) {
- BindingID bindingId = binding.getBindingId();
- if (!bindingId.canGenerateWSDL()) {
- throw new ServerRtException("can.not.generate.wsdl", bindingId);
- }
-
- if (bindingId.toString().equals(SOAPBindingImpl.X_SOAP12HTTP_BINDING)) {
- String msg = ServerMessages.GENERATE_NON_STANDARD_WSDL();
- logger.warning(msg);
- }
-
- // Generate WSDL and schema documents using runtime model
- WSDLGenResolver wsdlResolver = new WSDLGenResolver(docs,seiModel.getServiceQName(),seiModel.getPortTypeName());
- WSDLGenInfo wsdlGenInfo = new WSDLGenInfo();
- wsdlGenInfo.setWsdlResolver(wsdlResolver);
- wsdlGenInfo.setContainer(container);
- wsdlGenInfo.setExtensions(ServiceFinder.find(WSDLGeneratorExtension.class).toArray());
- wsdlGenInfo.setInlineSchemas(false);
- wsdlGenInfo.setSecureXmlProcessingDisabled(isSecureXmlProcessingDisabled(binding.getFeatures()));
- seiModel.getDatabinding().generateWSDL(wsdlGenInfo);
-// WSDLGenerator wsdlGen = new WSDLGenerator(seiModel, wsdlResolver, binding, container, implType, false,
-// ServiceFinder.find(WSDLGeneratorExtension.class).toArray());
-// wsdlGen.doGeneration();
- return wsdlResolver.updateDocs();
- }
-
- private static boolean isSecureXmlProcessingDisabled(WSFeatureList featureList) {
- // TODO-Miran: would it be necessary to disable secure xml processing?
- return false;
- }
-
- /**
- * Builds {@link SDDocumentImpl} from {@link SDDocumentSource}.
- */
- private static List<SDDocumentImpl> categoriseMetadata(
- List<SDDocumentSource> src, QName serviceName, QName portTypeName) {
-
- List<SDDocumentImpl> r = new ArrayList<SDDocumentImpl>(src.size());
- for (SDDocumentSource doc : src) {
- r.add(SDDocumentImpl.create(doc,serviceName,portTypeName));
- }
- return r;
- }
-
- /**
- * Verifies whether the given primaryWsdl contains the given serviceName.
- * If the WSDL doesn't have the service, it throws an WebServiceException.
- */
- private static void verifyPrimaryWSDL(@NotNull SDDocumentSource primaryWsdl, @NotNull QName serviceName) {
- SDDocumentImpl primaryDoc = SDDocumentImpl.create(primaryWsdl,serviceName,null);
- if (!(primaryDoc instanceof SDDocument.WSDL)) {
- throw new WebServiceException(primaryWsdl.getSystemId()+
- " is not a WSDL. But it is passed as a primary WSDL");
- }
- SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)primaryDoc;
- if (!wsdlDoc.hasService()) {
- if(wsdlDoc.getAllServices().isEmpty())
- throw new WebServiceException("Not a primary WSDL="+primaryWsdl.getSystemId()+
- " since it doesn't have Service "+serviceName);
- else
- throw new WebServiceException("WSDL "+primaryDoc.getSystemId()
- +" has the following services "+wsdlDoc.getAllServices()
- +" but not "+serviceName+". Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?");
- }
- }
-
- /**
- * Finds the primary WSDL document from the list of metadata documents. If
- * there are two metadata documents that qualify for primary, it throws an
- * exception. If there are two metadata documents that qualify for porttype,
- * it throws an exception.
- *
- * @return primay wsdl document, null if is not there in the docList
- *
- */
- private static @Nullable SDDocumentImpl findPrimary(@NotNull List<SDDocumentImpl> docList) {
- SDDocumentImpl primaryDoc = null;
- boolean foundConcrete = false;
- boolean foundAbstract = false;
- for(SDDocumentImpl doc : docList) {
- if (doc instanceof SDDocument.WSDL) {
- SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)doc;
- if (wsdlDoc.hasService()) {
- primaryDoc = doc;
- if (foundConcrete) {
- throw new ServerRtException("duplicate.primary.wsdl", doc.getSystemId() );
- }
- foundConcrete = true;
- }
- if (wsdlDoc.hasPortType()) {
- if (foundAbstract) {
- throw new ServerRtException("duplicate.abstract.wsdl", doc.getSystemId());
- }
- foundAbstract = true;
- }
- }
- }
- return primaryDoc;
- }
-
- /**
- * Parses the primary WSDL and returns the {@link WSDLPort} for the given service and port names
- *
- * @param primaryWsdl Primary WSDL
- * @param metadata it may contain imported WSDL and schema documents
- * @param serviceName service name in wsdl
- * @param portName port name in WSDL
- * @param container container in which this service is running
- * @return non-null wsdl port object
- */
- private static @NotNull WSDLPort getWSDLPort(SDDocumentSource primaryWsdl, List<? extends SDDocumentSource> metadata,
- @NotNull QName serviceName, @NotNull QName portName, Container container,
- EntityResolver resolver) {
- URL wsdlUrl = primaryWsdl.getSystemId();
- try {
- // TODO: delegate to another entity resolver
- WSDLModel wsdlDoc = RuntimeWSDLParser.parse(
- new Parser(primaryWsdl), new EntityResolverImpl(metadata, resolver),
- false, container, ServiceFinder.find(WSDLParserExtension.class).toArray());
- if(wsdlDoc.getServices().size() == 0) {
- throw new ServerRtException(ServerMessages.localizableRUNTIME_PARSER_WSDL_NOSERVICE_IN_WSDLMODEL(wsdlUrl));
- }
- WSDLService wsdlService = wsdlDoc.getService(serviceName);
- if (wsdlService == null) {
- throw new ServerRtException(ServerMessages.localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICE(serviceName,wsdlUrl));
- }
- WSDLPort wsdlPort = wsdlService.get(portName);
- if (wsdlPort == null) {
- throw new ServerRtException(ServerMessages.localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICEPORT(serviceName, portName, wsdlUrl));
- }
- return wsdlPort;
- } catch (IOException e) {
- throw new ServerRtException("runtime.parser.wsdl", wsdlUrl,e);
- } catch (XMLStreamException e) {
- throw new ServerRtException("runtime.saxparser.exception", e.getMessage(), e.getLocation(), e);
- } catch (SAXException e) {
- throw new ServerRtException("runtime.parser.wsdl", wsdlUrl,e);
- } catch (ServiceConfigurationError e) {
- throw new ServerRtException("runtime.parser.wsdl", wsdlUrl,e);
- }
- }
-
- /**
- * {@link XMLEntityResolver} that can resolve to {@link SDDocumentSource}s.
- */
- private static final class EntityResolverImpl implements XMLEntityResolver {
- private Map<String,SDDocumentSource> metadata = new HashMap<String,SDDocumentSource>();
- private EntityResolver resolver;
-
- public EntityResolverImpl(List<? extends SDDocumentSource> metadata, EntityResolver resolver) {
- for (SDDocumentSource doc : metadata) {
- this.metadata.put(doc.getSystemId().toExternalForm(),doc);
- }
- this.resolver = resolver;
- }
-
- public Parser resolveEntity (String publicId, String systemId) throws IOException, XMLStreamException {
- if (systemId != null) {
- SDDocumentSource doc = metadata.get(systemId);
- if (doc != null)
- return new Parser(doc);
- }
- if (resolver != null) {
- try {
- InputSource source = resolver.resolveEntity(publicId, systemId);
- if (source != null) {
- Parser p = new Parser(null, XMLStreamReaderFactory.create(source, true));
- return p;
- }
- } catch (SAXException e) {
- throw new XMLStreamException(e);
- }
- }
- return null;
- }
-
- }
-
- private static final Logger logger = Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server.endpoint");
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointMessageContextImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointMessageContextImpl.java
deleted file mode 100644
index 0bbd2b3c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointMessageContextImpl.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Attachment;
-
-import java.util.*;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.WebServiceContext;
-import javax.activation.DataHandler;
-
-/**
- * Implements {@link WebServiceContext}'s {@link MessageContext} on top of {@link Packet}.
- *
- * <p>
- * This class creates a {@link Map} view for APPLICATION scoped properties that
- * gets exposed to endpoint implementations during the invocation
- * of web methods. The implementations access this map using
- * WebServiceContext.getMessageContext().
- *
- * <p>
- * Some of the {@link Map} methods requre this class to
- * build the complete {@link Set} of properties, but we
- * try to avoid that as much as possible.
- *
- *
- * @author Jitendra Kotamraju
- */
-public final class EndpointMessageContextImpl extends AbstractMap<String,Object> implements MessageContext {
-
- /**
- * Lazily computed.
- */
- private Set<Map.Entry<String,Object>> entrySet;
- private final Packet packet;
-
- /**
- * @param packet
- * The {@link Packet} to wrap.
- */
- public EndpointMessageContextImpl(Packet packet) {
- this.packet = packet;
- }
-
- @Override
- @SuppressWarnings("element-type-mismatch")
- public Object get(Object key) {
- if (packet.supports(key)) {
- return packet.get(key); // strongly typed
- }
- if (packet.getHandlerScopePropertyNames(true).contains(key)) {
- return null; // no such application-scope property
- }
- Object value = packet.invocationProperties.get(key);
-
- //add the attachments from the Message to the corresponding attachment property
- if(key.equals(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS) ||
- key.equals(MessageContext.INBOUND_MESSAGE_ATTACHMENTS)){
- Map<String, DataHandler> atts = (Map<String, DataHandler>) value;
- if(atts == null)
- atts = new HashMap<String, DataHandler>();
- AttachmentSet attSet = packet.getMessage().getAttachments();
- for(Attachment att : attSet){
- atts.put(att.getContentId(), att.asDataHandler());
- }
- return atts;
- }
- return value;
- }
-
- @Override
- public Object put(String key, Object value) {
- if (packet.supports(key)) {
- return packet.put(key, value); // strongly typed
- }
- Object old = packet.invocationProperties.get(key);
- if (old != null) {
- if (packet.getHandlerScopePropertyNames(true).contains(key)) {
- throw new IllegalArgumentException("Cannot overwrite property in HANDLER scope");
- }
- // Overwrite existing APPLICATION scoped property
- packet.invocationProperties.put(key, value);
- return old;
- }
- // No existing property. So Add a new property
- packet.invocationProperties.put(key, value);
- return null;
- }
-
- @Override
- @SuppressWarnings("element-type-mismatch")
- public Object remove(Object key) {
- if (packet.supports(key)) {
- return packet.remove(key);
- }
- Object old = packet.invocationProperties.get(key);
- if (old != null) {
- if (packet.getHandlerScopePropertyNames(true).contains(key)) {
- throw new IllegalArgumentException("Cannot remove property in HANDLER scope");
- }
- // Remove existing APPLICATION scoped property
- packet.invocationProperties.remove(key);
- return old;
- }
- // No existing property.
- return null;
- }
-
- public Set<Map.Entry<String, Object>> entrySet() {
- if (entrySet == null) {
- entrySet = new EntrySet();
- }
- return entrySet;
- }
-
- public void setScope(String name, MessageContext.Scope scope) {
- throw new UnsupportedOperationException(
- "All the properties in this context are in APPLICATION scope. Cannot do setScope().");
- }
-
- public MessageContext.Scope getScope(String name) {
- throw new UnsupportedOperationException(
- "All the properties in this context are in APPLICATION scope. Cannot do getScope().");
- }
-
- private class EntrySet extends AbstractSet<Map.Entry<String, Object>> {
-
- public Iterator<Map.Entry<String, Object>> iterator() {
- final Iterator<Map.Entry<String, Object>> it = createBackupMap().entrySet().iterator();
-
- return new Iterator<Map.Entry<String, Object>>() {
- Map.Entry<String, Object> cur;
-
- public boolean hasNext() {
- return it.hasNext();
- }
-
- public Map.Entry<String, Object> next() {
- cur = it.next();
- return cur;
- }
-
- public void remove() {
- it.remove();
- EndpointMessageContextImpl.this.remove(cur.getKey());
- }
- };
- }
-
- public int size() {
- return createBackupMap().size();
- }
-
- }
-
- private Map<String, Object> createBackupMap() {
- Map<String, Object> backupMap = new HashMap<String, Object>();
- backupMap.putAll(packet.createMapView());
- Set<String> handlerProps = packet.getHandlerScopePropertyNames(true);
- for(Map.Entry<String, Object> e : packet.invocationProperties.entrySet()) {
- if (!handlerProps.contains(e.getKey())) {
- backupMap.put(e.getKey(), e.getValue());
- }
- }
- return backupMap;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/InvokerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/InvokerTube.java
deleted file mode 100644
index 2ff8baf8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/InvokerTube.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractTubeImpl;
-import com.sun.xml.internal.ws.api.server.*;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-import com.sun.xml.internal.ws.server.provider.ProviderInvokerTube;
-import com.sun.xml.internal.ws.server.sei.SEIInvokerTube;
-
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-/**
- * Base code for {@link ProviderInvokerTube} and {@link SEIInvokerTube}.
- *
- * <p>
- * This hides {@link InstanceResolver} and performs a set up
- * necessary for {@link WebServiceContext} to correctly.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class InvokerTube<T> extends com.sun.xml.internal.ws.server.sei.InvokerTube<Invoker> implements EndpointAwareTube {
-
- private WSEndpoint endpoint;
-
- protected InvokerTube(Invoker invoker) {
- super(invoker);
- }
-
- public void setEndpoint(WSEndpoint endpoint) {
- this.endpoint = endpoint;
- WSWebServiceContext webServiceContext = new AbstractWebServiceContext(endpoint) {
- public @Nullable Packet getRequestPacket() {
- Packet p = packets.get();
- return p;
- }
- };
- invoker.start(webServiceContext,endpoint);
- }
-
- protected WSEndpoint getEndpoint() {
- return endpoint;
- }
-
- /**
- * Returns the application object that serves the request.
- *
- public final @NotNull T getServant(Packet request) {
- // this allows WebServiceContext to find this packet
- packets.set(request);
- return invoker.resolve(request);
- }
- */
-
- /**
- * Returns the {@link Invoker} object that serves the request.
- */
- public final @NotNull Invoker getInvoker(Packet request) {
- return wrapper;
- }
-
- /**
- * processRequest() and processResponse() do not share any instance variables
- * while processing the request. {@link InvokerTube} is stateless and terminal,
- * so no need to create copies.
- */
- public final AbstractTubeImpl copy(TubeCloner cloner) {
- cloner.add(this,this);
- return this;
- }
-
- public void preDestroy() {
- invoker.dispose();
- }
-
- /**
- * Heart of {@link WebServiceContext}.
- * Remembers which thread is serving which packet.
- */
- private static final ThreadLocal<Packet> packets = new ThreadLocal<Packet>();
-
- /**
- * This method can be called while the user service is servicing the request
- * synchronously, to obtain the current request packet.
- *
- * <p>
- * This is primarily designed for {@link StatefulInstanceResolver}. Use with care.
- */
- public static @NotNull Packet getCurrentPacket() {
- Packet packet = packets.get();
- if(packet==null)
- throw new WebServiceException(ServerMessages.NO_CURRENT_PACKET());
- return packet;
- }
-
- /**
- * {@link Invoker} filter that sets and restores the current packet.
- */
- private final Invoker wrapper = new Invoker() {
- @Override
- public Object invoke(Packet p, Method m, Object... args) throws InvocationTargetException, IllegalAccessException {
- Packet old = set(p);
- try {
- return invoker.invoke(p, m, args);
- } finally {
- set(old);
- }
- }
-
- @Override
- public <T>T invokeProvider(Packet p, T arg) throws IllegalAccessException, InvocationTargetException {
- Packet old = set(p);
- try {
- return invoker.invokeProvider(p, arg);
- } finally {
- set(old);
- }
- }
-
- @Override
- public <T>void invokeAsyncProvider(Packet p, T arg, AsyncProviderCallback cbak, WebServiceContext ctxt) throws IllegalAccessException, InvocationTargetException {
- Packet old = set(p);
- try {
- invoker.invokeAsyncProvider(p, arg, cbak, ctxt);
- } finally {
- set(old);
- }
- }
-
- private Packet set(Packet p) {
- Packet old = packets.get();
- packets.set(p);
- return old;
- }
- };
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorBase.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorBase.java
deleted file mode 100644
index 7d56bf3f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorBase.java
+++ /dev/null
@@ -1,412 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.config.management.policy.ManagedClientAssertion;
-import com.sun.xml.internal.ws.api.config.management.policy.ManagedServiceAssertion;
-import com.sun.xml.internal.ws.api.config.management.policy.ManagementAssertion.Setting;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.client.Stub;
-import com.sun.org.glassfish.external.amx.AMXGlassfish;
-import com.sun.org.glassfish.gmbal.Description;
-import com.sun.org.glassfish.gmbal.InheritedAttribute;
-import com.sun.org.glassfish.gmbal.InheritedAttributes;
-import com.sun.org.glassfish.gmbal.ManagedData;
-import com.sun.org.glassfish.gmbal.ManagedObjectManager;
-import com.sun.org.glassfish.gmbal.ManagedObjectManagerFactory;
-import java.io.IOException;
-import java.lang.reflect.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-// BEGIN IMPORTS FOR RewritingMOM
-import java.util.ResourceBundle ;
-import java.lang.reflect.AnnotatedElement ;
-import java.lang.annotation.Annotation ;
-import javax.management.ObjectName ;
-import javax.management.MBeanServer ;
-import com.sun.org.glassfish.gmbal.AMXClient;
-import com.sun.org.glassfish.gmbal.GmbalMBean;
-// END IMPORTS FOR RewritingMOM
-
-/**
- * @author Harold Carr
- */
-public abstract class MonitorBase {
-
- private static final Logger logger = Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".monitoring");
-
- /**
- * Endpoint monitoring is ON by default.
- *
- * prop | no assert | assert/no mon | assert/mon off | assert/mon on
- * -------------------------------------------------------------------
- * not set | on | on | off | on
- * false | off | off | off | off
- * true | on | on | off | on
- */
- @NotNull public ManagedObjectManager createManagedObjectManager(final WSEndpoint endpoint) {
- // serviceName + portName identifies the managed objects under it.
- // There can be multiple services in the container.
- // The same serviceName+portName can live in different apps at
- // different endpoint addresses.
- //
- // In general, monitoring will add -N, where N is unique integer,
- // in case of collisions.
- //
- // The endpoint address would be unique, but we do not know
- // the endpoint address until the first request comes in,
- // which is after monitoring is setup.
-
- String rootName =
- endpoint.getServiceName().getLocalPart()
- + "-"
- + endpoint.getPortName().getLocalPart();
-
- if (rootName.equals("-")) {
- rootName = "provider";
- }
-
- // contextPath is not always available
- final String contextPath = getContextPath(endpoint);
- if (contextPath != null) {
- rootName = contextPath + "-" + rootName;
- }
-
- final ManagedServiceAssertion assertion =
- ManagedServiceAssertion.getAssertion(endpoint);
- if (assertion != null) {
- final String id = assertion.getId();
- if (id != null) {
- rootName = id;
- }
- if (assertion.monitoringAttribute() == Setting.OFF) {
- return disabled("This endpoint", rootName);
- }
- }
-
- if (endpointMonitoring.equals(Setting.OFF)) {
- return disabled("Global endpoint", rootName);
- }
- return createMOMLoop(rootName, 0);
- }
-
- private String getContextPath(final WSEndpoint endpoint) {
- try {
- Container container = endpoint.getContainer();
- Method getSPI =
- container.getClass().getDeclaredMethod("getSPI", Class.class);
- getSPI.setAccessible(true);
- Class servletContextClass =
- Class.forName("javax.servlet.ServletContext");
- Object servletContext =
- getSPI.invoke(container, servletContextClass);
- if (servletContext != null) {
- Method getContextPath = servletContextClass.getDeclaredMethod("getContextPath");
- getContextPath.setAccessible(true);
- return (String) getContextPath.invoke(servletContext);
- }
- return null;
- } catch (Throwable t) {
- logger.log(Level.FINEST, "getContextPath", t);
- }
- return null;
- }
-
- /**
- * Client monitoring is OFF by default because there is
- * no standard stub.close() method. Therefore people do
- * not typically close a stub when they are done with it
- * (even though the RI does provide a .close).
- * <pre>
- * prop | no assert | assert/no mon | assert/mon off | assert/mon on
- * -------------------------------------------------------------------
- * not set | off | off | off | on
- * false | off | off | off | off
- * true | on | on | off | on
- * </pre>
- */
- @NotNull public ManagedObjectManager createManagedObjectManager(final Stub stub) {
- EndpointAddress ea = stub.requestContext.getEndpointAddress();
- if (ea == null) {
- return ManagedObjectManagerFactory.createNOOP();
- }
-
- String rootName = ea.toString();
-
- final ManagedClientAssertion assertion =
- ManagedClientAssertion.getAssertion(stub.getPortInfo());
- if (assertion != null) {
- final String id = assertion.getId();
- if (id != null) {
- rootName = id;
- }
- if (assertion.monitoringAttribute() == Setting.OFF) {
- return disabled("This client", rootName);
- } else if (assertion.monitoringAttribute() == Setting.ON &&
- clientMonitoring != Setting.OFF) {
- return createMOMLoop(rootName, 0);
- }
- }
-
- if (clientMonitoring == Setting.NOT_SET ||
- clientMonitoring == Setting.OFF)
- {
- return disabled("Global client", rootName);
- }
- return createMOMLoop(rootName, 0);
- }
-
- @NotNull private ManagedObjectManager disabled(final String x, final String rootName) {
- final String msg = x + " monitoring disabled. " + rootName + " will not be monitored";
- logger.log(Level.CONFIG, msg);
- return ManagedObjectManagerFactory.createNOOP();
- }
-
- private @NotNull ManagedObjectManager createMOMLoop(final String rootName, final int unique) {
- final boolean isFederated = AMXGlassfish.getGlassfishVersion() != null;
- ManagedObjectManager mom = createMOM(isFederated);
- mom = initMOM(mom);
- mom = createRoot(mom, rootName, unique);
- return mom;
- }
-
- private @NotNull ManagedObjectManager createMOM(final boolean isFederated) {
- try {
- return new RewritingMOM(isFederated ?
- ManagedObjectManagerFactory.createFederated(
- AMXGlassfish.DEFAULT.serverMon(AMXGlassfish.DEFAULT.dasName()))
- :
- ManagedObjectManagerFactory.createStandalone("com.sun.metro"));
- } catch (Throwable t) {
- if (isFederated) {
- logger.log(Level.CONFIG, "Problem while attempting to federate with GlassFish AMX monitoring. Trying standalone.", t);
- return createMOM(false);
- } else {
- logger.log(Level.WARNING, "Ignoring exception - starting up without monitoring", t);
- return ManagedObjectManagerFactory.createNOOP();
- }
- }
- }
-
- private @NotNull ManagedObjectManager initMOM(final ManagedObjectManager mom) {
- try {
- if (typelibDebug != -1) {
- mom.setTypelibDebug(typelibDebug);
- }
- if (registrationDebug.equals("FINE")) {
- mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.FINE);
- } else if (registrationDebug.equals("NORMAL")) {
- mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NORMAL);
- } else {
- mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NONE);
- }
-
- mom.setRuntimeDebug(runtimeDebug);
-
- // Instead of GMBAL throwing an exception and logging
- // duplicate name, just have it return null.
- mom.suppressDuplicateRootReport(true);
-
- mom.stripPrefix(
- "com.sun.xml.internal.ws.server",
- "com.sun.xml.internal.ws.rx.rm.runtime.sequence");
-
- // Add annotations to a standard class
- mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(ManagedData.class));
- mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(Description.class));
- mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(InheritedAttributes.class));
-
- // Defer so we can register "this" as root from
- // within constructor.
- mom.suspendJMXRegistration();
-
- } catch (Throwable t) {
- try {
- mom.close();
- } catch (IOException e) {
- logger.log(Level.CONFIG, "Ignoring exception caught when closing unused ManagedObjectManager", e);
- }
- logger.log(Level.WARNING, "Ignoring exception - starting up without monitoring", t);
- return ManagedObjectManagerFactory.createNOOP();
- }
- return mom;
- }
-
- private ManagedObjectManager createRoot(final ManagedObjectManager mom, final String rootName, int unique) {
- final String name = rootName + (unique == 0 ? "" : "-" + String.valueOf(unique));
- try {
- final Object ignored = mom.createRoot(this, name);
- if (ignored != null) {
- ObjectName ignoredName = mom.getObjectName(mom.getRoot());
- // The name is null when the MOM is a NOOP.
- if (ignoredName != null) {
- logger.log(Level.INFO, "Metro monitoring rootname successfully set to: {0}", ignoredName);
- }
- return mom;
- }
- try {
- mom.close();
- } catch (IOException e) {
- logger.log(Level.CONFIG, "Ignoring exception caught when closing unused ManagedObjectManager", e);
- }
- final String basemsg ="Duplicate Metro monitoring rootname: " + name + " : ";
- if (unique > maxUniqueEndpointRootNameRetries) {
- final String msg = basemsg + "Giving up.";
- logger.log(Level.INFO, msg);
- return ManagedObjectManagerFactory.createNOOP();
- }
- final String msg = basemsg + "Will try to make unique";
- logger.log(Level.CONFIG, msg);
- return createMOMLoop(rootName, ++unique);
- } catch (Throwable t) {
- logger.log(Level.WARNING, "Error while creating monitoring root with name: " + rootName, t);
- return ManagedObjectManagerFactory.createNOOP();
- }
- }
-
- private static Setting clientMonitoring = Setting.NOT_SET;
- private static Setting endpointMonitoring = Setting.NOT_SET;
- private static int typelibDebug = -1;
- private static String registrationDebug = "NONE";
- private static boolean runtimeDebug = false;
- private static int maxUniqueEndpointRootNameRetries = 100;
- private static final String monitorProperty = "com.sun.xml.internal.ws.monitoring.";
-
- private static Setting propertyToSetting(String propName) {
- String s = System.getProperty(propName);
- if (s == null) {
- return Setting.NOT_SET;
- }
- s = s.toLowerCase();
- if (s.equals("false") || s.equals("off")) {
- return Setting.OFF;
- } else if (s.equals("true") || s.equals("on")) {
- return Setting.ON;
- }
- return Setting.NOT_SET;
- }
-
- static {
- try {
- endpointMonitoring = propertyToSetting(monitorProperty + "endpoint");
-
- clientMonitoring = propertyToSetting(monitorProperty + "client");
-
- Integer i = Integer.getInteger(monitorProperty + "typelibDebug");
- if (i != null) {
- typelibDebug = i;
- }
-
- String s = System.getProperty(monitorProperty + "registrationDebug");
- if (s != null) {
- registrationDebug = s.toUpperCase();
- }
-
- s = System.getProperty(monitorProperty + "runtimeDebug");
- if (s != null && s.toLowerCase().equals("true")) {
- runtimeDebug = true;
- }
-
- i = Integer.getInteger(monitorProperty + "maxUniqueEndpointRootNameRetries");
- if (i != null) {
- maxUniqueEndpointRootNameRetries = i;
- }
- } catch (Exception e) {
- logger.log(Level.WARNING, "Error while reading monitoring properties", e);
- }
- }
-}
-
-
-// This enables us to annotate the WebServiceFeature class even thought
-// we can't explicitly put the annotations in the class itself.
-@ManagedData
-@Description("WebServiceFeature")
-@InheritedAttributes({
- @InheritedAttribute(methodName="getID", description="unique id for this feature"),
- @InheritedAttribute(methodName="isEnabled", description="true if this feature is enabled")
-})
-interface DummyWebServiceFeature {}
-
-class RewritingMOM implements ManagedObjectManager
-{
- private final ManagedObjectManager mom;
-
- private final static String gmbalQuotingCharsRegex = "\n|\\|\"|\\*|\\?|:|=|,";
- private final static String replacementChar = "-";
-
- RewritingMOM(final ManagedObjectManager mom) { this.mom = mom; }
-
- private String rewrite(final String x) {
- return x.replaceAll(gmbalQuotingCharsRegex, replacementChar);
- }
-
- // The interface
-
- @Override public void suspendJMXRegistration() { mom.suspendJMXRegistration(); }
- @Override public void resumeJMXRegistration() { mom.resumeJMXRegistration(); }
- @Override public GmbalMBean createRoot() { return mom.createRoot(); }
- @Override public GmbalMBean createRoot(Object root) { return mom.createRoot(root); }
- @Override public GmbalMBean createRoot(Object root, String name) {
- return mom.createRoot(root, rewrite(name));
- }
- @Override public Object getRoot() { return mom.getRoot(); }
- @Override public GmbalMBean register(Object parent, Object obj, String name) {
- return mom.register(parent, obj, rewrite(name));
- }
- @Override public GmbalMBean register(Object parent, Object obj) { return mom.register(parent, obj);}
- @Override public GmbalMBean registerAtRoot(Object obj, String name) {
- return mom.registerAtRoot(obj, rewrite(name));
- }
- @Override public GmbalMBean registerAtRoot(Object obj) { return mom.registerAtRoot(obj); }
- @Override public void unregister(Object obj) { mom.unregister(obj); }
- @Override public ObjectName getObjectName(Object obj) { return mom.getObjectName(obj); }
- @Override public AMXClient getAMXClient(Object obj) { return mom.getAMXClient(obj); }
- @Override public Object getObject(ObjectName oname) { return mom.getObject(oname); }
- @Override public void stripPrefix(String... str) { mom.stripPrefix(str); }
- @Override public void stripPackagePrefix() { mom.stripPackagePrefix(); }
- @Override public String getDomain() { return mom.getDomain(); }
- @Override public void setMBeanServer(MBeanServer server){mom.setMBeanServer(server); }
- @Override public MBeanServer getMBeanServer() { return mom.getMBeanServer(); }
- @Override public void setResourceBundle(ResourceBundle rb) { mom.setResourceBundle(rb); }
- @Override public ResourceBundle getResourceBundle() { return mom.getResourceBundle(); }
- @Override public void addAnnotation(AnnotatedElement element, Annotation annotation) { mom.addAnnotation(element, annotation); }
- @Override public void setRegistrationDebug(RegistrationDebugLevel level) { mom.setRegistrationDebug(level); }
- @Override public void setRuntimeDebug(boolean flag) { mom.setRuntimeDebug(flag); }
- @Override public void setTypelibDebug(int level) { mom.setTypelibDebug(level); }
- @Override public String dumpSkeleton(Object obj) { return mom.dumpSkeleton(obj); }
- @Override public void suppressDuplicateRootReport(boolean suppressReport) { mom.suppressDuplicateRootReport(suppressReport); }
- @Override public void close() throws IOException { mom.close(); }
- @Override public void setJMXRegistrationDebug(boolean x) { mom.setJMXRegistrationDebug(x); }
- @Override public boolean isManagedObject(Object x) { return mom.isManagedObject(x); }
-}
-
-// End of file.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorRootService.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorRootService.java
deleted file mode 100644
index 1972be8f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorRootService.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.WSFeatureList;
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.server.*;
-import com.sun.xml.internal.ws.transport.http.HttpAdapter;
-import com.sun.xml.internal.ws.util.RuntimeVersion;
-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;
-import javax.xml.namespace.QName;
-import java.util.*;
-
-/**
- * @author Harold Carr
- */
-@ManagedObject
-@Description("Metro Web Service endpoint")
-@AMXMetadata(type="WSEndpoint")
-public final class MonitorRootService extends MonitorBase {
-
- private final WSEndpoint endpoint;
-
- MonitorRootService(final WSEndpoint endpoint) {
- this.endpoint = endpoint;
- }
-
- //
- // Items from WSEndpoint
- //
-
- @ManagedAttribute
- @Description("Policy associated with Endpoint")
- public String policy() {
- return endpoint.getPolicyMap() != null ?
- endpoint.getPolicyMap().toString() : null;
- }
-
- @ManagedAttribute
- @Description("Container")
- public @NotNull Container container() {
- return endpoint.getContainer();
- }
-
-
- @ManagedAttribute
- @Description("Port name")
- public @NotNull QName portName() {
- return endpoint.getPortName();
- }
-
- @ManagedAttribute
- @Description("Service name")
- public @NotNull QName serviceName() {
- return endpoint.getServiceName();
- }
-
- //
- // Items from WSBinding
- //
-
- @ManagedAttribute
- @Description("Binding SOAP Version")
- public String soapVersionHttpBindingId() {
- return endpoint.getBinding().getSOAPVersion().httpBindingId;
- }
-
- @ManagedAttribute
- @Description("Binding Addressing Version")
- public AddressingVersion addressingVersion() {
- return endpoint.getBinding().getAddressingVersion();
- }
-
- @ManagedAttribute
- @Description("Binding Identifier")
- public @NotNull BindingID bindingID() {
- return endpoint.getBinding().getBindingId();
- }
-
- @ManagedAttribute
- @Description("Binding features")
- public @NotNull WSFeatureList features() {
- return endpoint.getBinding().getFeatures();
- }
-
- //
- // Items from WSDLPort
- //
-
- @ManagedAttribute
- @Description("WSDLPort bound port type")
- public QName wsdlPortTypeName() {
- return endpoint.getPort() != null ?
- endpoint.getPort().getBinding().getPortTypeName() : null;
- }
-
- @ManagedAttribute
- @Description("Endpoint address")
- public EndpointAddress wsdlEndpointAddress() {
- return endpoint.getPort() != null ?
- endpoint.getPort().getAddress() : null;
- }
-
- //
- // Items from ServiceDefinition
- //
-
- @ManagedAttribute
- @Description("Documents referenced")
- public Set<String> serviceDefinitionImports() {
- return endpoint.getServiceDefinition() != null ?
- endpoint.getServiceDefinition().getPrimary().getImports() : null;
- }
-
- @ManagedAttribute
- @Description("System ID where document is taken from")
- public URL serviceDefinitionURL() {
- return endpoint.getServiceDefinition() != null ?
- endpoint.getServiceDefinition().getPrimary().getURL() : null;
- }
-
- //
- // Items from SEIModel
- //
-
- @ManagedAttribute
- @Description("SEI model WSDL location")
- public String seiModelWSDLLocation() {
- return endpoint.getSEIModel() != null ?
- endpoint.getSEIModel().getWSDLLocation() : null;
- }
-
- //
- // Items from RuntimeVersion
- //
-
- @ManagedAttribute
- @Description("JAX-WS runtime version")
- public String jaxwsRuntimeVersion() {
- return RuntimeVersion.VERSION.toString();
- }
-
- //
- // Items from HttpAdapter
- //
-
- @ManagedAttribute
- @Description("If true: show what goes across HTTP transport")
- public boolean dumpHTTPMessages() { return HttpAdapter.dump; }
-
-
- @ManagedAttribute
- @Description("Show what goes across HTTP transport")
- public void dumpHTTPMessages(final boolean x) { HttpAdapter.setDump(x); }
-
-}
-
-// End of file.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SDDocumentImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SDDocumentImpl.java
deleted file mode 100644
index b7417af2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SDDocumentImpl.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.server;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.server.*;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.wsdl.SDDocumentResolver;
-import com.sun.xml.internal.ws.util.RuntimeVersion;
-import com.sun.xml.internal.ws.util.xml.XMLStreamReaderToXMLStreamWriter;
-import com.sun.xml.internal.ws.wsdl.parser.ParserUtil;
-import com.sun.xml.internal.ws.wsdl.parser.WSDLConstants;
-import com.sun.xml.internal.ws.wsdl.writer.DocumentLocationResolver;
-import com.sun.xml.internal.ws.wsdl.writer.WSDLPatcher;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.*;
-import javax.xml.ws.WebServiceException;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-/**
- * {@link SDDocument} implmentation.
- *
- * <p>
- * This extends from {@link SDDocumentSource} so that
- * JAX-WS server runtime code can use {@link SDDocument}
- * as {@link SDDocumentSource}.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public class SDDocumentImpl extends SDDocumentSource implements SDDocument {
-
- private static final String NS_XSD = "http://www.w3.org/2001/XMLSchema";
- private static final QName SCHEMA_INCLUDE_QNAME = new QName(NS_XSD, "include");
- private static final QName SCHEMA_IMPORT_QNAME = new QName(NS_XSD, "import");
- private static final QName SCHEMA_REDEFINE_QNAME = new QName(NS_XSD, "redefine");
- private static final String VERSION_COMMENT =
- " Published by JAX-WS RI (http://jax-ws.java.net). RI's version is "+RuntimeVersion.VERSION+". ";
-
- private final QName rootName;
- private final SDDocumentSource source;
-
- /**
- * Set when {@link ServiceDefinitionImpl} is constructed.
- */
- @Nullable List<SDDocumentFilter> filters;
- @Nullable SDDocumentResolver sddocResolver;
-
-
- /**
- * The original system ID of this document.
- *
- * When this document contains relative references to other resources,
- * this field is used to find which {@link com.sun.xml.internal.ws.server.SDDocumentImpl} it refers to.
- *
- * Must not be null.
- */
- private final URL url;
- private final Set<String> imports;
-
- /**
- * Creates {@link SDDocument} from {@link SDDocumentSource}.
- * @param src WSDL document infoset
- * @param serviceName wsdl:service name
- * @param portTypeName
- * The information about the port of {@link WSEndpoint} to which this document is built for.
- * These values are used to determine which document is the concrete and abstract WSDLs
- * for this endpoint.
- *
- * @return null
- * Always non-null.
- */
- public static SDDocumentImpl create(SDDocumentSource src, QName serviceName, QName portTypeName) {
- URL systemId = src.getSystemId();
-
- try {
- // RuntimeWSDLParser parser = new RuntimeWSDLParser(null);
- XMLStreamReader reader = src.read();
- try {
- XMLStreamReaderUtil.nextElementContent(reader);
-
- QName rootName = reader.getName();
- if(rootName.equals(WSDLConstants.QNAME_SCHEMA)) {
- String tns = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_TNS);
- Set<String> importedDocs = new HashSet<String>();
- while (XMLStreamReaderUtil.nextContent(reader) != XMLStreamConstants.END_DOCUMENT) {
- if (reader.getEventType() != XMLStreamConstants.START_ELEMENT)
- continue;
- QName name = reader.getName();
- if (SCHEMA_INCLUDE_QNAME.equals(name) || SCHEMA_IMPORT_QNAME.equals(name) ||
- SCHEMA_REDEFINE_QNAME.equals(name)) {
- String importedDoc = reader.getAttributeValue(null, "schemaLocation");
- if (importedDoc != null) {
- importedDocs.add(new URL(src.getSystemId(), importedDoc).toString());
- }
- }
- }
- return new SchemaImpl(rootName,systemId,src,tns,importedDocs);
- } else if (rootName.equals(WSDLConstants.QNAME_DEFINITIONS)) {
- String tns = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_TNS);
-
- boolean hasPortType = false;
- boolean hasService = false;
- Set<String> importedDocs = new HashSet<String>();
- Set<QName> allServices = new HashSet<QName>();
-
- // if WSDL, parse more
- while (XMLStreamReaderUtil.nextContent(reader) != XMLStreamConstants.END_DOCUMENT) {
- if(reader.getEventType() != XMLStreamConstants.START_ELEMENT)
- continue;
-
- QName name = reader.getName();
- if (WSDLConstants.QNAME_PORT_TYPE.equals(name)) {
- String pn = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_NAME);
- if (portTypeName != null) {
- if(portTypeName.getLocalPart().equals(pn)&&portTypeName.getNamespaceURI().equals(tns)) {
- hasPortType = true;
- }
- }
- } else if (WSDLConstants.QNAME_SERVICE.equals(name)) {
- String sn = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_NAME);
- QName sqn = new QName(tns,sn);
- allServices.add(sqn);
- if(serviceName.equals(sqn)) {
- hasService = true;
- }
- } else if (WSDLConstants.QNAME_IMPORT.equals(name)) {
- String importedDoc = reader.getAttributeValue(null, "location");
- if (importedDoc != null) {
- importedDocs.add(new URL(src.getSystemId(), importedDoc).toString());
- }
- } else if (SCHEMA_INCLUDE_QNAME.equals(name) || SCHEMA_IMPORT_QNAME.equals(name) ||
- SCHEMA_REDEFINE_QNAME.equals(name)) {
- String importedDoc = reader.getAttributeValue(null, "schemaLocation");
- if (importedDoc != null) {
- importedDocs.add(new URL(src.getSystemId(), importedDoc).toString());
- }
- }
- }
- return new WSDLImpl(
- rootName,systemId,src,tns,hasPortType,hasService,importedDocs,allServices);
- } else {
- return new SDDocumentImpl(rootName,systemId,src);
- }
- } finally {
- reader.close();
- }
- } catch (WebServiceException e) {
- throw new ServerRtException("runtime.parser.wsdl", systemId,e);
- } catch (IOException e) {
- throw new ServerRtException("runtime.parser.wsdl", systemId,e);
- } catch (XMLStreamException e) {
- throw new ServerRtException("runtime.parser.wsdl", systemId,e);
- }
- }
-
- protected SDDocumentImpl(QName rootName, URL url, SDDocumentSource source) {
- this(rootName, url, source, new HashSet<String>());
- }
-
- protected SDDocumentImpl(QName rootName, URL url, SDDocumentSource source, Set<String> imports) {
- if (url == null) {
- throw new IllegalArgumentException("Cannot construct SDDocument with null URL.");
- }
- this.rootName = rootName;
- this.source = source;
- this.url = url;
- this.imports = imports;
- }
-
- void setFilters(List<SDDocumentFilter> filters) {
- this.filters = filters;
- }
-
- void setResolver(SDDocumentResolver sddocResolver) {
- this.sddocResolver = sddocResolver;
- }
-
- public QName getRootName() {
- return rootName;
- }
-
- public boolean isWSDL() {
- return false;
- }
-
- public boolean isSchema() {
- return false;
- }
-
- public URL getURL() {
- return url;
- }
-
- public XMLStreamReader read(XMLInputFactory xif) throws IOException, XMLStreamException {
- return source.read(xif);
- }
-
- public XMLStreamReader read() throws IOException, XMLStreamException {
- return source.read();
- }
-
- public URL getSystemId() {
- return url;
- }
-
- public Set<String> getImports() {
- return imports;
- }
-
- public void writeTo(OutputStream os) throws IOException {
- XMLStreamWriter w = null;
- try {
- //generate the WSDL with utf-8 encoding and XML version 1.0
- w = XMLStreamWriterFactory.create(os, "UTF-8");
- w.writeStartDocument("UTF-8", "1.0");
- new XMLStreamReaderToXMLStreamWriter().bridge(source.read(), w);
- w.writeEndDocument();
- } catch (XMLStreamException e) {
- IOException ioe = new IOException(e.getMessage());
- ioe.initCause(e);
- throw ioe;
- } finally {
- try {
- if (w != null)
- w.close();
- } catch (XMLStreamException e) {
- IOException ioe = new IOException(e.getMessage());
- ioe.initCause(e);
- throw ioe;
- }
- }
- }
-
-
- public void writeTo(PortAddressResolver portAddressResolver, DocumentAddressResolver resolver, OutputStream os) throws IOException {
- XMLStreamWriter w = null;
- try {
- //generate the WSDL with utf-8 encoding and XML version 1.0
- w = XMLStreamWriterFactory.create(os, "UTF-8");
- w.writeStartDocument("UTF-8", "1.0");
- writeTo(portAddressResolver,resolver,w);
- w.writeEndDocument();
- } catch (XMLStreamException e) {
- IOException ioe = new IOException(e.getMessage());
- ioe.initCause(e);
- throw ioe;
- } finally {
- try {
- if (w != null)
- w.close();
- } catch (XMLStreamException e) {
- IOException ioe = new IOException(e.getMessage());
- ioe.initCause(e);
- throw ioe;
- }
- }
- }
-
- public void writeTo(PortAddressResolver portAddressResolver, DocumentAddressResolver resolver, XMLStreamWriter out) throws XMLStreamException, IOException {
- if (filters != null) {
- for (SDDocumentFilter f : filters) {
- out = f.filter(this,out);
- }
- }
-
- XMLStreamReader xsr = source.read();
- try {
- out.writeComment(VERSION_COMMENT);
- new WSDLPatcher(portAddressResolver, new DocumentLocationResolverImpl(resolver)).bridge(xsr,out);
- } finally {
- xsr.close();
- }
- }
-
-
- /**
- * {@link SDDocument.Schema} implementation.
- *
- * @author Kohsuke Kawaguchi
- */
- private static final class SchemaImpl extends SDDocumentImpl implements SDDocument.Schema {
- private final String targetNamespace;
-
- public SchemaImpl(QName rootName, URL url, SDDocumentSource source, String targetNamespace,
- Set<String> imports) {
- super(rootName, url, source, imports);
- this.targetNamespace = targetNamespace;
- }
-
- public String getTargetNamespace() {
- return targetNamespace;
- }
-
- public boolean isSchema() {
- return true;
- }
- }
-
-
- private static final class WSDLImpl extends SDDocumentImpl implements SDDocument.WSDL {
- private final String targetNamespace;
- private final boolean hasPortType;
- private final boolean hasService;
- private final Set<QName> allServices;
-
- public WSDLImpl(QName rootName, URL url, SDDocumentSource source, String targetNamespace, boolean hasPortType,
- boolean hasService, Set<String> imports,Set<QName> allServices) {
- super(rootName, url, source, imports);
- this.targetNamespace = targetNamespace;
- this.hasPortType = hasPortType;
- this.hasService = hasService;
- this.allServices = allServices;
- }
-
- public String getTargetNamespace() {
- return targetNamespace;
- }
-
- public boolean hasPortType() {
- return hasPortType;
- }
-
- public boolean hasService() {
- return hasService;
- }
-
- public Set<QName> getAllServices() {
- return allServices;
- }
-
- public boolean isWSDL() {
- return true;
- }
- }
-
- private class DocumentLocationResolverImpl implements DocumentLocationResolver {
- private DocumentAddressResolver delegate;
-
- DocumentLocationResolverImpl(DocumentAddressResolver delegate) {
- this.delegate = delegate;
- }
-
- public String getLocationFor(String namespaceURI, String systemId) {
- if (sddocResolver == null) {
- return systemId;
- }
- try {
- URL ref = new URL(getURL(), systemId);
- SDDocument refDoc = sddocResolver.resolve(ref.toExternalForm());
- if (refDoc == null)
- return systemId; // not something we know. just leave it as is.
-
- return delegate.getRelativeAddressFor(SDDocumentImpl.this, refDoc);
- } catch (MalformedURLException mue) {
- return null;
- }
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerPropertyConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerPropertyConstants.java
deleted file mode 100644
index bfc52906..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerPropertyConstants.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-/**
- * @author Vivek Pandey
- *
- * Defines server side constants
- *
- */
-public interface ServerPropertyConstants {
- /*public static final String ATTACHMENT_CONTEXT =
- "com.sun.xml.internal.ws.attachment.AttachmentContext";*/
- public static final String SET_ATTACHMENT_PROPERTY =
- "com.sun.xml.internal.ws.attachment.SetAttachmentContext";
- public static final String GET_ATTACHMENT_PROPERTY =
- "com.sun.xml.internal.ws.attachment.GetAttachmentContext";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerRtException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerRtException.java
deleted file mode 100644
index 7ce5b6eb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerRtException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-/**
- */
-public class ServerRtException extends JAXWSExceptionBase {
-
- public ServerRtException(String key, Object... args) {
- super(key, args);
- }
-
- public ServerRtException(Throwable throwable) {
- super(throwable);
- }
-
- public ServerRtException(Localizable arg) {
- super("server.rt.err", arg);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.server";
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerSchemaValidationTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerSchemaValidationTube.java
deleted file mode 100644
index 8319adf6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerSchemaValidationTube.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.NextAction;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractTubeImpl;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-import com.sun.xml.internal.ws.util.pipe.AbstractSchemaValidationTube;
-import org.xml.sax.SAXException;
-
-import javax.xml.transform.Source;
-import javax.xml.validation.Schema;
-import javax.xml.validation.Validator;
-import javax.xml.ws.WebServiceException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * {@link Tube} that does the schema validation on the server side.
- *
- * @author Jitendra Kotamraju
- */
-public class ServerSchemaValidationTube extends AbstractSchemaValidationTube {
-
- private static final Logger LOGGER = Logger.getLogger(ServerSchemaValidationTube.class.getName());
-
- private final Schema schema;
- private final Validator validator;
-
- private final boolean noValidation;
- private final SEIModel seiModel;
- private final WSDLPort wsdlPort;
-
- public ServerSchemaValidationTube(WSEndpoint endpoint, WSBinding binding,
- SEIModel seiModel, WSDLPort wsdlPort, Tube next) {
- super(binding, next);
- this.seiModel = seiModel;
- this.wsdlPort = wsdlPort;
-
- if (endpoint.getServiceDefinition() != null) {
- MetadataResolverImpl mdresolver = new MetadataResolverImpl(endpoint.getServiceDefinition());
- Source[] sources = getSchemaSources(endpoint.getServiceDefinition(), mdresolver);
- for(Source source : sources) {
- LOGGER.fine("Constructing service validation schema from = "+source.getSystemId());
- //printDOM((DOMSource)source);
- }
- if (sources.length != 0) {
- noValidation = false;
- sf.setResourceResolver(mdresolver);
- try {
- schema = sf.newSchema(sources);
- } catch(SAXException e) {
- throw new WebServiceException(e);
- }
- validator = schema.newValidator();
- return;
- }
- }
- noValidation = true;
- schema = null;
- validator = null;
- }
-
- protected Validator getValidator() {
- return validator;
- }
-
- protected boolean isNoValidation() {
- return noValidation;
- }
-
- @Override
- public NextAction processRequest(Packet request) {
- if (isNoValidation() || !feature.isInbound() || !request.getMessage().hasPayload() || request.getMessage().isFault()) {
- return super.processRequest(request);
- }
- try {
- doProcess(request);
- } catch(SAXException se) {
- LOGGER.log(Level.WARNING, "Client Request doesn't pass Service's Schema Validation", se);
- // Client request is invalid. So sending specific fault code
- // Also converting this to fault message so that handlers may get
- // to see the message.
- SOAPVersion soapVersion = binding.getSOAPVersion();
- Message faultMsg = SOAPFaultBuilder.createSOAPFaultMessage(
- soapVersion, null, se, soapVersion.faultCodeClient);
- return doReturnWith(request.createServerResponse(faultMsg,
- wsdlPort, seiModel, binding));
- }
- return super.processRequest(request);
- }
-
- @Override
- public NextAction processResponse(Packet response) {
- if (isNoValidation() || !feature.isOutbound() || response.getMessage() == null || !response.getMessage().hasPayload() || response.getMessage().isFault()) {
- return super.processResponse(response);
- }
- try {
- doProcess(response);
- } catch(SAXException se) {
- // TODO: Should we convert this to fault Message ??
- throw new WebServiceException(se);
- }
- return super.processResponse(response);
- }
-
- protected ServerSchemaValidationTube(ServerSchemaValidationTube that, TubeCloner cloner) {
- super(that,cloner);
- //this.docs = that.docs;
- this.schema = that.schema; // Schema is thread-safe
- this.validator = schema.newValidator();
- this.noValidation = that.noValidation;
- this.seiModel = that.seiModel;
- this.wsdlPort = that.wsdlPort;
- }
-
- public AbstractTubeImpl copy(TubeCloner cloner) {
- return new ServerSchemaValidationTube(this,cloner);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServiceDefinitionImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServiceDefinitionImpl.java
deleted file mode 100644
index 3a5f4ba2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServiceDefinitionImpl.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.server.SDDocument;
-import com.sun.xml.internal.ws.api.server.SDDocumentFilter;
-import com.sun.xml.internal.ws.api.server.ServiceDefinition;
-import com.sun.xml.internal.ws.wsdl.SDDocumentResolver;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * {@link ServiceDefinition} implementation.
- *
- * <p>
- * You construct a {@link ServiceDefinitionImpl} by first constructing
- * a list of {@link SDDocumentImpl}s.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class ServiceDefinitionImpl implements ServiceDefinition, SDDocumentResolver {
- private final List<SDDocumentImpl> docs;
-
- private final Map<String,SDDocumentImpl> bySystemId;
- private final @NotNull SDDocumentImpl primaryWsdl;
-
- /**
- * Set when {@link WSEndpointImpl} is created.
- */
- /*package*/ WSEndpointImpl<?> owner;
-
- /*package*/ final List<SDDocumentFilter> filters = new ArrayList<SDDocumentFilter>();
-
- /**
- * @param docs
- * List of {@link SDDocumentImpl}s to form the description.
- * There must be at least one entry.
- * The first document is considered {@link #getPrimary() primary}.
- */
- public ServiceDefinitionImpl(List<SDDocumentImpl> docs, @NotNull SDDocumentImpl primaryWsdl) {
- assert docs.contains(primaryWsdl);
- this.docs = docs;
- this.primaryWsdl = primaryWsdl;
-
- this.bySystemId = new HashMap<String, SDDocumentImpl>(docs.size());
- for (SDDocumentImpl doc : docs) {
- bySystemId.put(doc.getURL().toExternalForm(),doc);
- doc.setFilters(filters);
- doc.setResolver(this);
- }
- }
-
- /**
- * The owner is set when {@link WSEndpointImpl} is created.
- */
- /*package*/ void setOwner(WSEndpointImpl<?> owner) {
- assert owner!=null && this.owner==null;
- this.owner = owner;
- }
-
- public @NotNull SDDocument getPrimary() {
- return primaryWsdl;
- }
-
- public void addFilter(SDDocumentFilter filter) {
- filters.add(filter);
- }
-
- public Iterator<SDDocument> iterator() {
- return (Iterator)docs.iterator();
- }
-
- /**
- * Gets the {@link SDDocumentImpl} whose {@link SDDocumentImpl#getURL()}
- * returns the specified value.
- *
- * @return
- * null if none is found.
- */
- public SDDocument resolve(String systemId) {
- return bySystemId.get(systemId);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SingletonResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SingletonResolver.java
deleted file mode 100644
index f2645a89..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SingletonResolver.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.server.AbstractInstanceResolver;
-import com.sun.xml.internal.ws.api.server.InstanceResolver;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.server.WSWebServiceContext;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-
-/**
- * {@link InstanceResolver} that always returns a single instance.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class SingletonResolver<T> extends AbstractInstanceResolver<T> {
- private final @NotNull T singleton;
-
- public SingletonResolver(@NotNull T singleton) {
- this.singleton = singleton;
- }
-
- public @NotNull T resolve(Packet request) {
- return singleton;
- }
-
- public void start(WSWebServiceContext wsc, WSEndpoint endpoint) {
- getResourceInjector(endpoint).inject(wsc,singleton);
- // notify that we are ready to serve
- invokeMethod(findAnnotatedMethod(singleton.getClass(),PostConstruct.class),singleton);
- }
-
- public void dispose() {
- invokeMethod(findAnnotatedMethod(singleton.getClass(),PreDestroy.class),singleton);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/UnsupportedMediaException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/UnsupportedMediaException.java
deleted file mode 100644
index 7c915608..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/UnsupportedMediaException.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-
-import java.util.List;
-
-/**
- * {@link Codec} throws this exception when it doesn't understand request message's
- * Content-Type
- * @author Jitendra Kotamraju
- */
-public final class UnsupportedMediaException extends JAXWSExceptionBase {
-
- public UnsupportedMediaException( @NotNull String contentType, List<String> expectedContentTypes) {
- super(ServerMessages.localizableUNSUPPORTED_CONTENT_TYPE(contentType, expectedContentTypes));
- }
-
- public UnsupportedMediaException() {
- super(ServerMessages.localizableNO_CONTENT_TYPE());
- }
-
- public UnsupportedMediaException(String charset) {
- super(ServerMessages.localizableUNSUPPORTED_CHARSET(charset));
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.server";
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSDLGenResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSDLGenResolver.java
deleted file mode 100644
index 5b89c3e2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSDLGenResolver.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferResult;
-import com.sun.xml.internal.ws.api.server.SDDocument;
-import com.sun.xml.internal.ws.api.server.SDDocumentSource;
-
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-import javax.xml.ws.Holder;
-import javax.xml.ws.WebServiceException;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * WSDLGenerator uses WSDLResolver while creating WSDL artifacts. WSDLResolver
- * is used to control the file names and which artifact to be generated or not.
- *
- * @author Jitendra Kotamraju
- */
-final class WSDLGenResolver implements com.oracle.webservices.internal.api.databinding.WSDLResolver {
-
- private final List<SDDocumentImpl> docs;
- private final List<SDDocumentSource> newDocs = new ArrayList<SDDocumentSource>();
- private SDDocumentSource concreteWsdlSource;
-
- private SDDocumentImpl abstractWsdl;
- private SDDocumentImpl concreteWsdl;
-
- /**
- * targetNS -> schema documents.
- */
- private final Map<String, List<SDDocumentImpl>> nsMapping = new HashMap<String,List<SDDocumentImpl>>();
-
- private final QName serviceName;
- private final QName portTypeName;
-
- public WSDLGenResolver(@NotNull List<SDDocumentImpl> docs,QName serviceName,QName portTypeName) {
- this.docs = docs;
- this.serviceName = serviceName;
- this.portTypeName = portTypeName;
-
- for (SDDocumentImpl doc : docs) {
- if(doc.isWSDL()) {
- SDDocument.WSDL wsdl = (SDDocument.WSDL) doc;
- if(wsdl.hasPortType())
- abstractWsdl = doc;
- }
- if(doc.isSchema()) {
- SDDocument.Schema schema = (SDDocument.Schema) doc;
- List<SDDocumentImpl> sysIds = nsMapping.get(schema.getTargetNamespace());
- if (sysIds == null) {
- sysIds = new ArrayList<SDDocumentImpl>();
- nsMapping.put(schema.getTargetNamespace(), sysIds);
- }
- sysIds.add(doc);
- }
- }
- }
-
- /**
- * Generates the concrete WSDL that contains service element.
- *
- * @return Result the generated concrete WSDL
- */
- public Result getWSDL(String filename) {
- URL url = createURL(filename);
- MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer();
- xsb.setSystemId(url.toExternalForm());
- concreteWsdlSource = SDDocumentSource.create(url,xsb);
- newDocs.add(concreteWsdlSource);
- XMLStreamBufferResult r = new XMLStreamBufferResult(xsb);
- r.setSystemId(filename);
- return r;
- }
-
- /**
- * At present, it returns file URL scheme eventhough there is no resource
- * in the filesystem.
- *
- * @return URL of the generated document
- *
- */
- private URL createURL(String filename) {
- try {
- return new URL("file:///"+filename);
- } catch (MalformedURLException e) {
- // TODO: I really don't think this is the right way to handle this error,
- // WSDLResolver needs to be documented carefully.
- throw new WebServiceException(e);
- }
- }
-
- /**
- * Updates filename if the suggested filename need to be changed in
- * wsdl:import. If the metadata already contains abstract wsdl(i.e. a WSDL
- * which has the porttype), then the abstract wsdl shouldn't be generated
- *
- * return null if abstract WSDL need not be generated
- * Result the abstract WSDL
- */
- public Result getAbstractWSDL(Holder<String> filename) {
- if (abstractWsdl != null) {
- filename.value = abstractWsdl.getURL().toString();
- return null; // Don't generate abstract WSDL
- }
- URL url = createURL(filename.value);
- MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer();
- xsb.setSystemId(url.toExternalForm());
- SDDocumentSource abstractWsdlSource = SDDocumentSource.create(url,xsb);
- newDocs.add(abstractWsdlSource);
- XMLStreamBufferResult r = new XMLStreamBufferResult(xsb);
- r.setSystemId(filename.value);
- return r;
- }
-
- /**
- * Updates filename if the suggested filename need to be changed in
- * xsd:import. If there is already a schema document for the namespace
- * in the metadata, then it is not generated.
- *
- * return null if schema need not be generated
- * Result the generated schema document
- */
- public Result getSchemaOutput(String namespace, Holder<String> filename) {
- List<SDDocumentImpl> schemas = nsMapping.get(namespace);
- if (schemas != null) {
- if (schemas.size() > 1) {
- throw new ServerRtException("server.rt.err",
- "More than one schema for the target namespace "+namespace);
- }
- filename.value = schemas.get(0).getURL().toExternalForm();
- return null; // Don't generate schema
- }
-
- URL url = createURL(filename.value);
- MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer();
- xsb.setSystemId(url.toExternalForm());
- SDDocumentSource sd = SDDocumentSource.create(url,xsb);
- newDocs.add(sd);
-
- XMLStreamBufferResult r = new XMLStreamBufferResult(xsb);
- r.setSystemId(filename.value);
- return r;
- }
-
- /**
- * Converts SDDocumentSource to SDDocumentImpl and updates original docs. It
- * categories the generated documents into WSDL, Schema types.
- *
- * @return the primary WSDL
- * null if it is not there in the generated documents
- *
- */
- public SDDocumentImpl updateDocs() {
- for (SDDocumentSource doc : newDocs) {
- SDDocumentImpl docImpl = SDDocumentImpl.create(doc,serviceName,portTypeName);
- if (doc == concreteWsdlSource) {
- concreteWsdl = docImpl;
- }
- docs.add(docImpl);
- }
- return concreteWsdl;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointImpl.java
deleted file mode 100644
index f0afa411..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointImpl.java
+++ /dev/null
@@ -1,698 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.ws.addressing.EPRSDDocumentFilter;
-import com.sun.xml.internal.ws.addressing.WSEPRExtension;
-import com.sun.xml.internal.ws.api.Component;
-import com.sun.xml.internal.ws.api.ComponentFeature;
-import com.sun.xml.internal.ws.api.ComponentsFeature;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.*;
-import com.sun.xml.internal.ws.api.server.*;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-import com.sun.xml.internal.ws.model.wsdl.WSDLDirectProperties;
-import com.sun.xml.internal.ws.model.wsdl.WSDLPortProperties;
-import com.sun.xml.internal.ws.model.wsdl.WSDLProperties;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.resources.HandlerMessages;
-import com.sun.xml.internal.ws.util.Pool;
-import com.sun.xml.internal.ws.util.Pool.TubePool;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import com.sun.xml.internal.ws.wsdl.OperationDispatcher;
-import com.sun.org.glassfish.gmbal.ManagedObjectManager;
-import org.w3c.dom.Element;
-
-import javax.annotation.PreDestroy;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.Handler;
-import java.lang.reflect.Method;
-import java.util.*;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.Executor;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.management.ObjectName;
-
-/**
- * {@link WSEndpoint} implementation.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public /*final*/ class WSEndpointImpl<T> extends WSEndpoint<T> implements LazyMOMProvider.WSEndpointScopeChangeListener {
-
- private static final Logger logger = Logger.getLogger(com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server.endpoint");
-
- private final @NotNull QName serviceName;
- private final @NotNull QName portName;
- protected final WSBinding binding;
- private final SEIModel seiModel;
- private final @NotNull Container container;
- private final WSDLPort port;
-
- protected final Tube masterTubeline;
- private final ServiceDefinitionImpl serviceDef;
- private final SOAPVersion soapVersion;
- private final Engine engine;
- private final @NotNull Codec masterCodec;
- private final @NotNull PolicyMap endpointPolicy;
- private final Pool<Tube> tubePool;
- private final OperationDispatcher operationDispatcher;
- private @NotNull ManagedObjectManager managedObjectManager;
- private boolean managedObjectManagerClosed = false;
- private final Object managedObjectManagerLock = new Object();
- private LazyMOMProvider.Scope lazyMOMProviderScope = LazyMOMProvider.Scope.STANDALONE;
- private final @NotNull ServerTubeAssemblerContext context;
-
- private Map<QName, WSEndpointReference.EPRExtension> endpointReferenceExtensions = new HashMap<QName, WSEndpointReference.EPRExtension>();
- /**
- * Set to true once we start shutting down this endpoint. Used to avoid
- * running the clean up processing twice.
- *
- * @see #dispose()
- */
- private boolean disposed;
- private final Class<T> implementationClass;
- private final @NotNull
- WSDLProperties wsdlProperties;
- private final Set<Component> componentRegistry = new CopyOnWriteArraySet<Component>();
-
- protected WSEndpointImpl(@NotNull QName serviceName, @NotNull QName portName, WSBinding binding,
- Container container, SEIModel seiModel, WSDLPort port,
- Class<T> implementationClass,
- @Nullable ServiceDefinitionImpl serviceDef,
- EndpointAwareTube terminalTube, boolean isSynchronous,
- PolicyMap endpointPolicy) {
- this.serviceName = serviceName;
- this.portName = portName;
- this.binding = binding;
- this.soapVersion = binding.getSOAPVersion();
- this.container = container;
- this.port = port;
- this.implementationClass = implementationClass;
- this.serviceDef = serviceDef;
- this.seiModel = seiModel;
- this.endpointPolicy = endpointPolicy;
-
- LazyMOMProvider.INSTANCE.registerEndpoint(this);
- initManagedObjectManager();
-
- if (serviceDef != null) {
- serviceDef.setOwner(this);
- }
-
- ComponentFeature cf = binding.getFeature(ComponentFeature.class);
- if (cf != null) {
- switch (cf.getTarget()) {
- case ENDPOINT:
- componentRegistry.add(cf.getComponent());
- break;
- case CONTAINER:
- container.getComponents().add(cf.getComponent());
- break;
- default:
- throw new IllegalArgumentException();
- }
- }
- ComponentsFeature csf = binding.getFeature(ComponentsFeature.class);
- if (csf != null) {
- for (ComponentFeature cfi : csf.getComponentFeatures()) {
- switch (cfi.getTarget()) {
- case ENDPOINT:
- componentRegistry.add(cfi.getComponent());
- break;
- case CONTAINER:
- container.getComponents().add(cfi.getComponent());
- break;
- default:
- throw new IllegalArgumentException();
- }
- }
- }
-
- TubelineAssembler assembler = TubelineAssemblerFactory.create(
- Thread.currentThread().getContextClassLoader(), binding.getBindingId(), container);
- assert assembler != null;
-
- this.operationDispatcher = (port == null) ? null : new OperationDispatcher(port, binding, seiModel);
-
- context = createServerTubeAssemblerContext(terminalTube, isSynchronous);
- this.masterTubeline = assembler.createServer(context);
-
- Codec c = context.getCodec();
- if (c instanceof EndpointAwareCodec) {
- // create a copy to avoid sharing the codec between multiple endpoints
- c = c.copy();
- ((EndpointAwareCodec) c).setEndpoint(this);
- }
- this.masterCodec = c;
-
- tubePool = new TubePool(masterTubeline);
- terminalTube.setEndpoint(this);
- engine = new Engine(toString(), container);
- wsdlProperties = (port == null) ? new WSDLDirectProperties(serviceName, portName, seiModel) : new WSDLPortProperties(port, seiModel);
-
- Map<QName, WSEndpointReference.EPRExtension> eprExtensions = new HashMap<QName, WSEndpointReference.EPRExtension>();
- try {
- if (port != null) {
- //gather EPR extrensions from WSDL Model
- WSEndpointReference wsdlEpr = port.getEPR();
- if (wsdlEpr != null) {
- for (WSEndpointReference.EPRExtension extnEl : wsdlEpr.getEPRExtensions()) {
- eprExtensions.put(extnEl.getQName(), extnEl);
- }
- }
- }
-
- EndpointReferenceExtensionContributor[] eprExtnContributors = ServiceFinder.find(EndpointReferenceExtensionContributor.class).toArray();
- for(EndpointReferenceExtensionContributor eprExtnContributor :eprExtnContributors) {
- WSEndpointReference.EPRExtension wsdlEPRExtn = eprExtensions.remove(eprExtnContributor.getQName());
- WSEndpointReference.EPRExtension endpointEprExtn = eprExtnContributor.getEPRExtension(this,wsdlEPRExtn);
- if (endpointEprExtn != null) {
- eprExtensions.put(endpointEprExtn.getQName(), endpointEprExtn);
- }
- }
- for (WSEndpointReference.EPRExtension extn : eprExtensions.values()) {
- endpointReferenceExtensions.put(extn.getQName(), new WSEPRExtension(
- XMLStreamBuffer.createNewBufferFromXMLStreamReader(extn.readAsXMLStreamReader()),extn.getQName()));
- }
- } catch (XMLStreamException ex) {
- throw new WebServiceException(ex);
- }
- if(!eprExtensions.isEmpty()) {
- serviceDef.addFilter(new EPRSDDocumentFilter(this));
- }
- }
-
- protected ServerTubeAssemblerContext createServerTubeAssemblerContext(
- EndpointAwareTube terminalTube, boolean isSynchronous) {
- ServerTubeAssemblerContext ctx = new ServerPipeAssemblerContext(
- seiModel, port, this, terminalTube, isSynchronous);
- return ctx;
- }
-
- protected WSEndpointImpl(@NotNull QName serviceName, @NotNull QName portName, WSBinding binding, Container container,
- SEIModel seiModel, WSDLPort port,
- Tube masterTubeline) {
- this.serviceName = serviceName;
- this.portName = portName;
- this.binding = binding;
- this.soapVersion = binding.getSOAPVersion();
- this.container = container;
- this.endpointPolicy = null;
- this.port = port;
- this.seiModel = seiModel;
- this.serviceDef = null;
- this.implementationClass = null;
- this.masterTubeline = masterTubeline;
- this.masterCodec = ((BindingImpl) this.binding).createCodec();
-
- LazyMOMProvider.INSTANCE.registerEndpoint(this);
- initManagedObjectManager();
-
- this.operationDispatcher = (port == null) ? null : new OperationDispatcher(port, binding, seiModel);
- this.context = new ServerPipeAssemblerContext(
- seiModel, port, this, null /* not known */, false);
-
- tubePool = new TubePool(masterTubeline);
- engine = new Engine(toString(), container);
- wsdlProperties = (port == null) ? new WSDLDirectProperties(serviceName, portName, seiModel) : new WSDLPortProperties(port, seiModel);
- }
-
- public Collection<WSEndpointReference.EPRExtension> getEndpointReferenceExtensions() {
- return endpointReferenceExtensions.values();
- }
-
- /**
- * Nullable when there is no associated WSDL Model
- * @return
- */
- public @Nullable OperationDispatcher getOperationDispatcher() {
- return operationDispatcher;
- }
-
- public PolicyMap getPolicyMap() {
- return endpointPolicy;
- }
-
- public @NotNull Class<T> getImplementationClass() {
- return implementationClass;
- }
-
- public @NotNull WSBinding getBinding() {
- return binding;
- }
-
- public @NotNull Container getContainer() {
- return container;
- }
-
- public WSDLPort getPort() {
- return port;
- }
-
- @Override
- public @Nullable SEIModel getSEIModel() {
- return seiModel;
- }
-
- public void setExecutor(Executor exec) {
- engine.setExecutor(exec);
- }
-
- @Override
- public Engine getEngine() {
- return engine;
- }
-
- public void schedule(final Packet request, final CompletionCallback callback, FiberContextSwitchInterceptor interceptor) {
- processAsync(request, callback, interceptor, true);
- }
-
- private void processAsync(final Packet request,
- final CompletionCallback callback,
- FiberContextSwitchInterceptor interceptor, boolean schedule) {
- Container old = ContainerResolver.getDefault().enterContainer(container);
- try {
- request.endpoint = WSEndpointImpl.this;
- request.addSatellite(wsdlProperties);
-
- Fiber fiber = engine.createFiber();
- fiber.setDeliverThrowableInPacket(true);
- if (interceptor != null) {
- fiber.addInterceptor(interceptor);
- }
- final Tube tube = tubePool.take();
- Fiber.CompletionCallback cbak = new Fiber.CompletionCallback() {
- public void onCompletion(@NotNull Packet response) {
- ThrowableContainerPropertySet tc = response.getSatellite(ThrowableContainerPropertySet.class);
- if (tc == null) {
- // Only recycle tubes in non-exception path as some Tubes may be
- // in invalid state following exception
- tubePool.recycle(tube);
- }
-
- if (callback != null) {
- if (tc != null) {
- response = createServiceResponseForException(tc,
- response,
- soapVersion,
- request.endpoint.getPort(),
- null,
- request.endpoint.getBinding());
- }
- callback.onCompletion(response);
- }
- }
-
- public void onCompletion(@NotNull Throwable error) {
- // will never be called now that we are using
- // fiber.setDeliverThrowableInPacket(true);
- throw new IllegalStateException();
- }
- };
-
- fiber.start(tube, request, cbak,
- binding.isFeatureEnabled(SyncStartForAsyncFeature.class)
- || !schedule);
- } finally {
- ContainerResolver.getDefault().exitContainer(old);
- }
- }
-
- @Override
- public Packet createServiceResponseForException(final ThrowableContainerPropertySet tc,
- final Packet responsePacket,
- final SOAPVersion soapVersion,
- final WSDLPort wsdlPort,
- final SEIModel seiModel,
- final WSBinding binding)
- {
- // This will happen in addressing if it is enabled.
- if (tc.isFaultCreated()) return responsePacket;
-
- final Message faultMessage = SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, tc.getThrowable());
- final Packet result = responsePacket.createServerResponse(faultMessage, wsdlPort, seiModel, binding);
- // Pass info to upper layers
- tc.setFaultMessage(faultMessage);
- tc.setResponsePacket(responsePacket);
- tc.setFaultCreated(true);
- return result;
- }
-
- @Override
- public void process(final Packet request, final CompletionCallback callback, FiberContextSwitchInterceptor interceptor) {
- processAsync(request, callback, interceptor, false);
- }
-
- public @NotNull
- PipeHead createPipeHead() {
- return new PipeHead() {
- private final Tube tube = TubeCloner.clone(masterTubeline);
-
- public @NotNull
- Packet process(Packet request, WebServiceContextDelegate wscd,
- TransportBackChannel tbc) {
- Container old = ContainerResolver.getDefault().enterContainer(container);
- try {
- request.webServiceContextDelegate = wscd;
- request.transportBackChannel = tbc;
- request.endpoint = WSEndpointImpl.this;
- request.addSatellite(wsdlProperties);
-
- Fiber fiber = engine.createFiber();
- Packet response;
- try {
- response = fiber.runSync(tube, request);
- } catch (RuntimeException re) {
- // Catch all runtime exceptions so that transport
- // doesn't
- // have to worry about converting to wire message
- // TODO XML/HTTP binding
- Message faultMsg = SOAPFaultBuilder
- .createSOAPFaultMessage(soapVersion, null, re);
- response = request.createServerResponse(faultMsg,
- request.endpoint.getPort(), null,
- request.endpoint.getBinding());
- }
- return response;
- } finally {
- ContainerResolver.getDefault().exitContainer(old);
- }
- }
- };
- }
-
- public synchronized void dispose() {
- if (disposed) {
- return;
- }
- disposed = true;
-
- masterTubeline.preDestroy();
-
- for (Handler handler : binding.getHandlerChain()) {
- for (Method method : handler.getClass().getMethods()) {
- if (method.getAnnotation(PreDestroy.class) == null) {
- continue;
- }
- try {
- method.invoke(handler);
- } catch (Exception e) {
- logger.log(Level.WARNING, HandlerMessages.HANDLER_PREDESTROY_IGNORE(e.getMessage()), e);
- }
- break;
- }
- }
- closeManagedObjectManager();
- LazyMOMProvider.INSTANCE.unregisterEndpoint(this);
- }
-
- public ServiceDefinitionImpl getServiceDefinition() {
- return serviceDef;
- }
-
- public Set<EndpointComponent> getComponentRegistry() {
- Set<EndpointComponent> sec = new EndpointComponentSet();
- for (Component c : componentRegistry) {
- sec.add(c instanceof EndpointComponentWrapper ?
- ((EndpointComponentWrapper) c).component :
- new ComponentWrapper(c));
- }
- return sec;
- }
-
- private class EndpointComponentSet extends HashSet<EndpointComponent> {
-
- @Override
- public Iterator<EndpointComponent> iterator() {
- final Iterator<EndpointComponent> it = super.iterator();
- return new Iterator<EndpointComponent>() {
- private EndpointComponent last = null;
-
- public boolean hasNext() {
- return it.hasNext();
- }
-
- public EndpointComponent next() {
- last = it.next();
- return last;
- }
-
- public void remove() {
- it.remove();
- if (last != null) {
- componentRegistry.remove(last instanceof ComponentWrapper ?
- ((ComponentWrapper) last).component :
- new EndpointComponentWrapper(last));
- }
- last = null;
- }
- };
- }
-
- @Override
- public boolean add(EndpointComponent e) {
- boolean result = super.add(e);
- if (result) {
- componentRegistry.add(new EndpointComponentWrapper(e));
- }
- return result;
- }
-
- @Override
- public boolean remove(Object o) {
- boolean result = super.remove(o);
- if (result) {
- componentRegistry.remove(o instanceof ComponentWrapper ?
- ((ComponentWrapper) o).component :
- new EndpointComponentWrapper((EndpointComponent)o));
- }
- return result;
- }
-
- }
-
- private static class ComponentWrapper implements EndpointComponent {
- private final Component component;
-
- public ComponentWrapper(Component component) {
- this.component = component;
- }
-
- public <S> S getSPI(Class<S> spiType) {
- return component.getSPI(spiType);
- }
-
- @Override
- public int hashCode() {
- return component.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- return component.equals(obj);
- }
- }
-
- private static class EndpointComponentWrapper implements Component {
- private final EndpointComponent component;
-
- public EndpointComponentWrapper(EndpointComponent component) {
- this.component = component;
- }
-
- public <S> S getSPI(Class<S> spiType) {
- return component.getSPI(spiType);
- }
-
- @Override
- public int hashCode() {
- return component.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- return component.equals(obj);
- }
- }
-
- @Override
- public @NotNull Set<Component> getComponents() {
- return componentRegistry;
- }
-
- public <T extends EndpointReference> T getEndpointReference(Class<T> clazz, String address, String wsdlAddress, Element... referenceParameters) {
- List<Element> refParams = null;
- if (referenceParameters != null) {
- refParams = Arrays.asList(referenceParameters);
- }
- return getEndpointReference(clazz, address, wsdlAddress, null, refParams);
- }
-
- public <T extends EndpointReference> T getEndpointReference(Class<T> clazz,
- String address, String wsdlAddress, List<Element> metadata,
- List<Element> referenceParameters) {
- QName portType = null;
- if (port != null) {
- portType = port.getBinding().getPortTypeName();
- }
-
- AddressingVersion av = AddressingVersion.fromSpecClass(clazz);
- return new WSEndpointReference(
- av, address, serviceName, portName, portType, metadata, wsdlAddress, referenceParameters, endpointReferenceExtensions.values(), null).toSpec(clazz);
-
- }
-
- public @NotNull QName getPortName() {
- return portName;
- }
-
-
- public @NotNull Codec createCodec() {
- return masterCodec.copy();
- }
-
- public @NotNull QName getServiceName() {
- return serviceName;
- }
-
- private void initManagedObjectManager() {
- synchronized (managedObjectManagerLock) {
- if (managedObjectManager == null) {
- switch (this.lazyMOMProviderScope) {
- case GLASSFISH_NO_JMX:
- managedObjectManager = new WSEndpointMOMProxy(this);
- break;
- default:
- managedObjectManager = obtainManagedObjectManager();
- }
- }
- }
- }
-
- public @NotNull ManagedObjectManager getManagedObjectManager() {
- return managedObjectManager;
- }
-
- /**
- * Obtains a real instance of {@code ManagedObjectManager} class no matter what lazyMOMProviderScope is this endpoint in (or if the
- * Gmbal API calls should be deferred).
- *
- * @see com.sun.xml.internal.ws.api.server.LazyMOMProvider.Scope
- * @return an instance of {@code ManagedObjectManager}
- */
- @NotNull ManagedObjectManager obtainManagedObjectManager() {
- final MonitorRootService monitorRootService = new MonitorRootService(this);
- final ManagedObjectManager mOM = monitorRootService.createManagedObjectManager(this);
-
- // ManagedObjectManager was suspended due to root creation (see MonitorBase#initMOM)
- mOM.resumeJMXRegistration();
-
- return mOM;
- }
-
- public void scopeChanged(LazyMOMProvider.Scope scope) {
- synchronized (managedObjectManagerLock) {
- if (managedObjectManagerClosed) {
- return;
- }
-
- this.lazyMOMProviderScope = scope;
-
- // possible lazyMOMProviderScope change can be LazyMOMProvider.Scope.GLASSFISH_NO_JMX or LazyMOMProvider.Scope.GLASSFISH_JMX
- if (managedObjectManager == null) {
- if (scope != LazyMOMProvider.Scope.GLASSFISH_NO_JMX) {
- managedObjectManager = obtainManagedObjectManager();
- } else {
- managedObjectManager = new WSEndpointMOMProxy(this);
- }
- } else {
- // if ManagedObjectManager for this endpoint has already been created and is uninitialized proxy then
- // fill it with a real instance
- if (managedObjectManager instanceof WSEndpointMOMProxy
- && !((WSEndpointMOMProxy)managedObjectManager).isInitialized()) {
- ((WSEndpointMOMProxy)managedObjectManager).setManagedObjectManager(obtainManagedObjectManager());
- }
- }
- }
- }
-
- private static final Logger monitoringLogger = Logger.getLogger(com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".monitoring");
-
- // This can be called independently of WSEndpoint.dispose.
- // Example: the WSCM framework calls this before dispose.
- @Override
- public void closeManagedObjectManager() {
- synchronized (managedObjectManagerLock) {
- if (managedObjectManagerClosed == true) {
- return;
- }
- if (managedObjectManager != null) {
- boolean close = true;
-
- // ManagedObjectManager doesn't need to be closed because it exists only as a proxy
- if (managedObjectManager instanceof WSEndpointMOMProxy
- && !((WSEndpointMOMProxy)managedObjectManager).isInitialized()) {
- close = false;
- }
-
- if (close) {
- try {
- final ObjectName name = managedObjectManager.getObjectName(managedObjectManager.getRoot());
- // The name is null when the MOM is a NOOP.
- if (name != null) {
- monitoringLogger.log(Level.INFO, "Closing Metro monitoring root: {0}", name);
- }
- managedObjectManager.close();
- } catch (java.io.IOException e) {
- monitoringLogger.log(Level.WARNING, "Ignoring error when closing Managed Object Manager", e);
- }
- }
- }
- managedObjectManagerClosed = true;
- }
- }
-
- public @NotNull @Override ServerTubeAssemblerContext getAssemblerContext() {
- return context;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointMOMProxy.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointMOMProxy.java
deleted file mode 100644
index 65e7222f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointMOMProxy.java
+++ /dev/null
@@ -1,378 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.FiberContextSwitchInterceptor;
-import com.sun.xml.internal.ws.api.pipe.ServerTubeAssemblerContext;
-import com.sun.xml.internal.ws.api.pipe.ThrowableContainerPropertySet;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.ServiceDefinition;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.policy.PolicyMap;
-import com.sun.xml.internal.ws.wsdl.OperationDispatcher;
-import com.sun.org.glassfish.gmbal.AMXClient;
-import com.sun.org.glassfish.gmbal.GmbalMBean;
-import com.sun.org.glassfish.gmbal.ManagedObjectManager;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import java.io.IOException;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
-import java.util.List;
-import java.util.ResourceBundle;
-import java.util.Set;
-import java.util.concurrent.Executor;
-import javax.xml.namespace.QName;
-import javax.xml.ws.EndpointReference;
-import org.w3c.dom.Element;
-
-/**
- * {@link ManagedObjectManager} proxy class for {@link WSEndpointImpl} instances that could be used when Gmbal API calls
- * need to be deferred. The proxy tries to defer a need of a real ManagedObjectManager instance to the time when any
- * method from {@link ManagedObjectManager} is invoked on it. In this case a real instance of ManagedObjectManager is
- * obtained from WSEndpointImpl and the method is rather invoked on this object.
- */
-public class WSEndpointMOMProxy extends WSEndpoint implements ManagedObjectManager {
-
- private final @NotNull
- WSEndpointImpl wsEndpoint;
- private ManagedObjectManager managedObjectManager;
-
- WSEndpointMOMProxy(@NotNull WSEndpointImpl wsEndpoint) {
- this.wsEndpoint = wsEndpoint;
- }
-
- /**
- * Returns a real instance of {@link ManagedObjectManager}
- *
- * @return an ManagedObjectManager instance
- */
- @Override
- public ManagedObjectManager getManagedObjectManager() {
- if (managedObjectManager == null) {
- managedObjectManager = wsEndpoint.obtainManagedObjectManager();
- }
- return managedObjectManager;
- }
-
- void setManagedObjectManager(ManagedObjectManager managedObjectManager) {
- this.managedObjectManager = managedObjectManager;
- }
-
- /**
- * Returns {@code true} if this proxy contains a reference to real ManagedObjectManager instance, {@code false}
- * otherwise.
- *
- * @return {@code true} if ManagedObjectManager has been created, {@code false} otherwise.
- */
- public boolean isInitialized() {
- return this.managedObjectManager != null;
- }
-
- public WSEndpointImpl getWsEndpoint() {
- return wsEndpoint;
- }
-
- @Override
- public void suspendJMXRegistration() {
- getManagedObjectManager().suspendJMXRegistration();
- }
-
- @Override
- public void resumeJMXRegistration() {
- getManagedObjectManager().resumeJMXRegistration();
- }
-
- @Override
- public boolean isManagedObject(Object obj) {
- return getManagedObjectManager().isManagedObject(obj);
- }
-
- @Override
- public GmbalMBean createRoot() {
- return getManagedObjectManager().createRoot();
- }
-
- @Override
- public GmbalMBean createRoot(Object root) {
- return getManagedObjectManager().createRoot(root);
- }
-
- @Override
- public GmbalMBean createRoot(Object root, String name) {
- return getManagedObjectManager().createRoot(root, name);
- }
-
- @Override
- public Object getRoot() {
- return getManagedObjectManager().getRoot();
- }
-
- @Override
- public GmbalMBean register(Object parent, Object obj, String name) {
- return getManagedObjectManager().register(parent, obj, name);
- }
-
- @Override
- public GmbalMBean register(Object parent, Object obj) {
- return getManagedObjectManager().register(parent, obj);
- }
-
- @Override
- public GmbalMBean registerAtRoot(Object obj, String name) {
- return getManagedObjectManager().registerAtRoot(obj, name);
- }
-
- @Override
- public GmbalMBean registerAtRoot(Object obj) {
- return getManagedObjectManager().registerAtRoot(obj);
- }
-
- @Override
- public void unregister(Object obj) {
- getManagedObjectManager().unregister(obj);
- }
-
- @Override
- public ObjectName getObjectName(Object obj) {
- return getManagedObjectManager().getObjectName(obj);
- }
-
- @Override
- public AMXClient getAMXClient(Object obj) {
- return getManagedObjectManager().getAMXClient(obj);
- }
-
- @Override
- public Object getObject(ObjectName oname) {
- return getManagedObjectManager().getObject(oname);
- }
-
- @Override
- public void stripPrefix(String... str) {
- getManagedObjectManager().stripPrefix(str);
- }
-
- @Override
- public void stripPackagePrefix() {
- getManagedObjectManager().stripPackagePrefix();
- }
-
- @Override
- public String getDomain() {
- return getManagedObjectManager().getDomain();
- }
-
- @Override
- public void setMBeanServer(MBeanServer server) {
- getManagedObjectManager().setMBeanServer(server);
- }
-
- @Override
- public MBeanServer getMBeanServer() {
- return getManagedObjectManager().getMBeanServer();
- }
-
- @Override
- public void setResourceBundle(ResourceBundle rb) {
- getManagedObjectManager().setResourceBundle(rb);
- }
-
- @Override
- public ResourceBundle getResourceBundle() {
- return getManagedObjectManager().getResourceBundle();
- }
-
- @Override
- public void addAnnotation(AnnotatedElement element, Annotation annotation) {
- getManagedObjectManager().addAnnotation(element, annotation);
- }
-
- @Override
- public void setRegistrationDebug(RegistrationDebugLevel level) {
- getManagedObjectManager().setRegistrationDebug(level);
- }
-
- @Override
- public void setRuntimeDebug(boolean flag) {
- getManagedObjectManager().setRuntimeDebug(flag);
- }
-
- @Override
- public void setTypelibDebug(int level) {
- getManagedObjectManager().setTypelibDebug(level);
- }
-
- @Override
- public void setJMXRegistrationDebug(boolean flag) {
- getManagedObjectManager().setJMXRegistrationDebug(flag);
- }
-
- @Override
- public String dumpSkeleton(Object obj) {
- return getManagedObjectManager().dumpSkeleton(obj);
- }
-
- @Override
- public void suppressDuplicateRootReport(boolean suppressReport) {
- getManagedObjectManager().suppressDuplicateRootReport(suppressReport);
- }
-
- @Override
- public void close() throws IOException {
- getManagedObjectManager().close();
- }
-
- @Override
- public boolean equalsProxiedInstance(WSEndpoint endpoint) {
- if (wsEndpoint == null) {
- return (endpoint == null);
- }
- return wsEndpoint.equals(endpoint);
- }
-
- @Override
- public Codec createCodec() {
- return this.wsEndpoint.createCodec();
- }
-
- @Override
- public QName getServiceName() {
- return this.wsEndpoint.getServiceName();
- }
-
- @Override
- public QName getPortName() {
- return this.wsEndpoint.getPortName();
- }
-
- @Override
- public Class getImplementationClass() {
- return this.wsEndpoint.getImplementationClass();
- }
-
- @Override
- public WSBinding getBinding() {
- return this.wsEndpoint.getBinding();
- }
-
- @Override
- public Container getContainer() {
- return this.wsEndpoint.getContainer();
- }
-
- @Override
- public WSDLPort getPort() {
- return this.wsEndpoint.getPort();
- }
-
- @Override
- public void setExecutor(Executor exec) {
- this.wsEndpoint.setExecutor(exec);
- }
-
- @Override
- public void schedule(Packet request, CompletionCallback callback, FiberContextSwitchInterceptor interceptor) {
- this.wsEndpoint.schedule(request, callback, interceptor);
- }
-
- @Override
- public PipeHead createPipeHead() {
- return this.wsEndpoint.createPipeHead();
- }
-
- @Override
- public void dispose() {
- if (this.wsEndpoint != null) {
- this.wsEndpoint.dispose();
- }
- }
-
- @Override
- public ServiceDefinition getServiceDefinition() {
- return this.wsEndpoint.getServiceDefinition();
- }
-
- @Override
- public Set getComponentRegistry() {
- return this.wsEndpoint.getComponentRegistry();
- }
-
- @Override
- public SEIModel getSEIModel() {
- return this.wsEndpoint.getSEIModel();
- }
-
- @Override
- public PolicyMap getPolicyMap() {
- return this.wsEndpoint.getPolicyMap();
- }
-
- @Override
- public void closeManagedObjectManager() {
- this.wsEndpoint.closeManagedObjectManager();
- }
-
- @Override
- public ServerTubeAssemblerContext getAssemblerContext() {
- return this.wsEndpoint.getAssemblerContext();
- }
-
- @Override
- public EndpointReference getEndpointReference(Class clazz, String address, String wsdlAddress, Element... referenceParameters) {
- return wsEndpoint.getEndpointReference(clazz, address, wsdlAddress, referenceParameters);
- }
-
- @Override
- public EndpointReference getEndpointReference(Class clazz, String address, String wsdlAddress, List metadata, List referenceParameters) {
- return wsEndpoint.getEndpointReference(clazz, address, wsdlAddress, metadata, referenceParameters);
- }
-
- @Override
- public OperationDispatcher getOperationDispatcher() {
- return wsEndpoint.getOperationDispatcher();
- }
-
- @Override
- public Packet createServiceResponseForException(final ThrowableContainerPropertySet tc,
- final Packet responsePacket,
- final SOAPVersion soapVersion,
- final WSDLPort wsdlPort,
- final SEIModel seiModel,
- final WSBinding binding)
- {
- return wsEndpoint.createServiceResponseForException(tc, responsePacket, soapVersion,
- wsdlPort, seiModel, binding);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/package-info.java
deleted file mode 100644
index d43c44b8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/package-info.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * <h1>JAX-WS 2.0.1 Server Runtime</h1>
- * <P>This document describes the architecture of server side
- * JAX-WS 2.0.1 runtime. </p>
- *
- * <h3>JAX-WS 2.0.1 Server Runtime Sequence Diagram</h3>
-
- * <img src='../../../../../jaxws/basic-server.seq.png'>
-
- *
- *
- * <H3>Message Flow</H3>
- * <P>A Web Service invocation starts with either the
- * {@link com.sun.xml.internal.ws.transport.http.servlet.WSServletDelegate WSServletDelegate}
- * or the {@link com.sun.xml.internal.ws.transport.http.server.ServerConnectionImpl ServerConnectionImpl}.
- * Both of these classes find the appropriate {@link com.sun.xml.internal.ws.server.RuntimeEndpointInfo RuntimeEndpointInfo}
- * and invokes the {@link com.sun.xml.internal.ws.server.Tie#handle(com.sun.xml.internal.ws.api.server.WSConnection,
- * com.sun.xml.internal.ws.spi.runtime.RuntimeEndpointInfo) Tie.handle}
- * method. This method first creates a {@link com.sun.pept.ept.MessageInfo MessageInfo}
- * used to gather inforrmation about the message to be received. A
- * {@link com.sun.xml.internal.ws.server.RuntimeContext RuntimeContext}
- * is then created with the MessageInfo and the {@link com.sun.xml.internal.ws.api.model.SEIModel RuntimeModel}
- * retrieved from the RuntimeEndpointInfo. The RuntimeContext is then
- * stored in the MessageInfo. The {@link com.sun.pept.ept.EPTFactory EPTFactory}
- * is retrieved from the {@link com.sun.xml.internal.ws.server.EPTFactoryFactoryBase EPTFactoryFactoryBase}
- * and also placed in the MessagInfo. A {@link com.sun.pept.protocol.MessageDispatcher MessageDispatcher}
- * is then created and the receive method is invoked. There will be two
- * types of MessageDispatchers for JAX-WS 2.0.1, SOAPMessageDispatcher
- * (one for client and one for the server) and an XMLMessageDispatcher
- * (one for the client and one for the server).</P>
- * <P>The MessageDispatcher.receive method orchestrates the receiving of
- * a Message. The SOAPMessageDispatcher first converts the MessageInfo
- * to a SOAPMessage. The SOAPMessageDispatcher then does mustUnderstand
- * processing followed by an invocation of any handlers. The SOAPMessage
- * is then converted to an InternalMessage and stored in the
- * MessageInfo. The converting of the SOAPMessage to an InternalMessage
- * is done using the decoder retrieved from the EPTFactory that is
- * contained in the MessageInfo. Once the SOAPMessage has been converted
- * to an InternalMessage the endpoint implementation is invoked via
- * reflection from the Method stored in the MessageInfo. The return
- * value of the method call is then stored in the InternalMessage. An
- * internalMessage is then created from the MessageInfo. The SOAPEncoder
- * is retrieved from the EPTFactory stored in the MessageInfo. The
- * SOAPEncoder.toSOAPMessage is then invoked to create a SOAPMessage
- * from the InternalMessage. A WSConnection is then retrieved from the
- * MessageInfo and the SOAPMessage is returned over that WSConnection.</P>
- * <P><BR>
- * </P>
- * <H3>External Interactions</H3>
- * <H4>SAAJ API</H4>
- * <UL>
- * <LI><P>JAX-WS creates SAAJ javax.xml.soap.SOAPMessage
- * from the HttpServletRequest.
- * At present, JAX-WS reads all the bytes from the request stream and
- * then creates SOAPMessage along with the HTTP headers.</P>
- * </UL>
- * <P>javax.xml.soap.MessageFactory(binding).createMessage(MimeHeaders, InputStream)</P>
- * <UL>
- * <LI><P>SOAPMessage parses the content from the stream including MIME
- * data</P>
- * <LI><P>com.sun.xml.internal.ws.server.SOAPMessageDispatcher::checkHeadersPeekBody()</P>
- * <P>SOAPMessage.getSOAPHeader() is used for mustUnderstand processing
- * of headers. It further uses
- * javax.xml.soap.SOAPHeader.examineMustUnderstandHeaderElements(role)</P>
- * <P>SOAPMessage.getSOAPBody().getFistChild() is used for guessing the
- * MEP of the request</P>
- * <LI><P>com.sun.xml.internal.ws.handler.HandlerChainCaller:insertFaultMessage()</P>
- * <P>SOAPMessage.getSOAPPart().getEnvelope() and some other SAAJ calls
- * are made to create a fault in the SOAPMessage</P>
- * <LI><P>com.sun.xml.internal.ws.handler.LogicalMessageImpl::getPayload()
- * interacts with SAAJ to get body from SOAPMessage</P>
- * <LI><P>com.sun.xml.internal.ws.encoding.soap.SOAPEncoder.toSOAPMessage(com.sun.xml.internal.ws.encoding.soap.internal.InternalMessage,
- * SOAPMessage). There is a scenario where there is SOAPMessage and a
- * logical handler sets payload as Source. To write to the stream,
- * SOAPMessage.writeTo() is used but before that the body needs to be
- * updated with logical handler' Source. Need to verify if this
- * scenario is still happening since Handler.close() is changed to take
- * MessageContext.</P>
- * <LI><P>com.sun.xml.internal.ws.handlerSOAPMessageContextImpl.getHeaders()
- * uses SAAJ API to get headers.</P>
- * <LI><P>SOAPMessage.writeTo() is used to write response. At present,
- * it writes into byte[] and this byte[] is written to
- * HttpServletResponse.</P>
- * </UL>
- * <H4>JAXB API</H4>
- * <P>JAX-WS RI uses the JAXB API to marshall/unmarshall user created
- * JAXB objects with user created {@link javax.xml.bind.JAXBContext JAXBContext}.
- * Handler, Dispatch in JAX-WS API provide ways for the user to specify his/her own
- * JAXBContext. {@link com.sun.xml.internal.ws.encoding.jaxb.JAXBTypeSerializer JAXBTypeSerializer} class uses all these methods.</P>
- * <UL>
- * <LI><p>{@link javax.xml.bind.Marshaller#marshal(Object,XMLStreamWriter) Marshaller.marshal(Object,XMLStreamWriter)}</p>
- * <LI><P>{@link javax.xml.bind.Marshaller#marshal(Object,Result) Marshaller.marshal(Object, DomResult)}</P>
- * <LI><P>{@link javax.xml.bind.Unmarshaller#unmarshal(XMLStreamReader) Object Unmarshaller.unmarshal(XMLStreamReader)}</P>
- * <LI><P>{@link javax.xml.bind.Unmarshaller#unmarshal(Source) Object Unmarshaller.unmarshal(Source)}</P>
- * </UL>
- * The following two JAXB classes are implemented by JAX-WS to enable/implement MTOM and XOP
- * <UL>
- * <LI><P>{@link javax.xml.bind.attachment.AttachmentMarshaller AttachmentMarshaller}</P>
- * <LI><P>{@link javax.xml.bind.attachment.AttachmentUnmarshaller AttachmentUnmarshaller}</P>
- * </UL>
- * <H4>JAXB Runtime-API (private contract)</H4>
- * <P>JAX-WS RI uses these private API for serialization/deserialization
- * purposes. This private API is used to serialize/deserialize method
- * parameters at the time of JAXBTypeSerializer class uses all
- * these methods.</P>
- * <UL>
- * <LI><P>{@link com.sun.xml.internal.bind.api.Bridge#marshal(BridgeContext, Object, XMLStreamWriter) Bridge.marshal(BridgeContext, Object, XMLStreamWriter)}</P>
- * <LI><P>{@link com.sun.xml.internal.bind.api.Bridge#marshal(BridgeContext, Object, Node) Bridge.marshal(BridgeContext, Object, Node)}</P>
- * <LI><P>{@link com.sun.xml.internal.bind.api.Bridge#unmarshal(BridgeContext, XMLStreamReader) Object Bridge.unmarshal(BridgeContext, XMLStreamReader)}</P>
- * </UL>
- *
- * @ArchitectureDocument
- **/
-package com.sun.xml.internal.ws.server;
-
-import com.sun.xml.internal.bind.api.BridgeContext;
-
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Source;
-import javax.xml.transform.Result;
-
-import org.w3c.dom.Node;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/AsyncProviderInvokerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/AsyncProviderInvokerTube.java
deleted file mode 100644
index 48d4fe74..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/AsyncProviderInvokerTube.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.provider;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Fiber;
-import com.sun.xml.internal.ws.api.pipe.NextAction;
-import com.sun.xml.internal.ws.api.pipe.ThrowableContainerPropertySet;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.server.AsyncProvider;
-import com.sun.xml.internal.ws.api.server.AsyncProviderCallback;
-import com.sun.xml.internal.ws.api.server.Invoker;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.server.AbstractWebServiceContext;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This {@link Tube} is used to invoke the {@link AsyncProvider} endpoints.
- *
- * @author Jitendra Kotamraju
- */
-public // TODO needed by factory
-class AsyncProviderInvokerTube<T> extends ProviderInvokerTube<T> {
-
- private static final Logger LOGGER = Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server.AsyncProviderInvokerTube");
-
- public AsyncProviderInvokerTube(Invoker invoker, ProviderArgumentsBuilder<T> argsBuilder) {
- super(invoker, argsBuilder);
- }
-
- /*
- * This binds the parameter for Provider endpoints and invokes the
- * invoke() method of {@linke Provider} endpoint. The return value from
- * invoke() is used to create a new {@link Message} that traverses
- * through the Pipeline to transport.
- */
- public @NotNull NextAction processRequest(@NotNull Packet request) {
- T param = argsBuilder.getParameter(request);
- NoSuspendResumer resumer = new NoSuspendResumer();
- @SuppressWarnings({ "rawtypes", "unchecked" })
- AsyncProviderCallbackImpl callback = new AsyncProviderInvokerTube.AsyncProviderCallbackImpl(request, resumer);
- AsyncWebServiceContext ctxt = new AsyncWebServiceContext(getEndpoint(),request);
-
- AsyncProviderInvokerTube.LOGGER.fine("Invoking AsyncProvider Endpoint");
- try {
- getInvoker(request).invokeAsyncProvider(request, param, callback, ctxt);
- } catch(Throwable e) {
- LOGGER.log(Level.SEVERE, e.getMessage(), e);
- return doThrow(e);
- }
-
- synchronized(callback) {
- if (resumer.response != null) {
- // Only used by AsyncProvider<Packet>
- // Implementation may pass Packet containing throwable; use both
- ThrowableContainerPropertySet tc = resumer.response.getSatellite(ThrowableContainerPropertySet.class);
- Throwable t = (tc != null) ? tc.getThrowable() : null;
-
- return t != null ? doThrow(resumer.response, t) : doReturnWith(resumer.response);
- }
-
- // Suspend the Fiber. AsyncProviderCallback will resume the Fiber after
- // it receives response.
- callback.resumer = new FiberResumer();
- return doSuspend();
- }
- }
-
- private interface Resumer {
- public void onResume(Packet response);
- }
-
- /*private*/ public class FiberResumer implements Resumer { // TODO public for DISI
- private final Fiber fiber;
-
- public FiberResumer() {
- this.fiber = Fiber.current();
- }
-
- public void onResume(Packet response) {
- // Only used by AsyncProvider<Packet>
- // Implementation may pass Packet containing throwable; use both
- ThrowableContainerPropertySet tc = response.getSatellite(ThrowableContainerPropertySet.class);
- Throwable t = (tc != null) ? tc.getThrowable() : null;
- fiber.resume(t, response);
- }
- }
-
- private class NoSuspendResumer implements Resumer {
- protected Packet response = null;
-
- public void onResume(Packet response) {
- this.response = response;
- }
- }
-
- /*private*/ public class AsyncProviderCallbackImpl implements AsyncProviderCallback<T> { // TODO public for DISI
- private final Packet request;
- private Resumer resumer;
-
- public AsyncProviderCallbackImpl(Packet request, Resumer resumer) {
- this.request = request;
- this.resumer = resumer;
- }
-
- public void send(@Nullable T param) {
- if (param == null) {
- if (request.transportBackChannel != null) {
- request.transportBackChannel.close();
- }
- }
- Packet packet = argsBuilder.getResponse(request, param, getEndpoint().getPort(), getEndpoint().getBinding());
- synchronized(this) {
- resumer.onResume(packet);
- }
- }
-
- public void sendError(@NotNull Throwable t) {
- Exception e;
- if (t instanceof Exception) {
- e = (Exception) t;
- } else {
- e = new RuntimeException(t);
- }
- Packet packet = argsBuilder.getResponse(request, e, getEndpoint().getPort(), getEndpoint().getBinding());
- synchronized(this) {
- resumer.onResume(packet);
- }
- }
- }
-
- /**
- * The single {@link javax.xml.ws.WebServiceContext} instance injected into application.
- */
- /*private static final*/ public class AsyncWebServiceContext extends AbstractWebServiceContext { // TODO public for DISI
- final Packet packet;
-
- public AsyncWebServiceContext(WSEndpoint endpoint, Packet packet) { // TODO public for DISI
- super(endpoint);
- this.packet = packet;
- }
-
- public @NotNull Packet getRequestPacket() {
- return packet;
- }
- }
-
- public @NotNull NextAction processResponse(@NotNull Packet response) {
- return doReturnWith(response);
- }
-
- public @NotNull NextAction processException(@NotNull Throwable t) {
- return doThrow(t);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/MessageProviderArgumentBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/MessageProviderArgumentBuilder.java
deleted file mode 100644
index 3da26950..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/MessageProviderArgumentBuilder.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.provider;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-final class MessageProviderArgumentBuilder extends ProviderArgumentsBuilder<Message> {
- private final SOAPVersion soapVersion;
-
- public MessageProviderArgumentBuilder(SOAPVersion soapVersion) {
- this.soapVersion = soapVersion;
- }
-
- @Override
- /*protected*/ public Message getParameter(Packet packet) {
- return packet.getMessage();
- }
-
- @Override
- protected Message getResponseMessage(Message returnValue) {
- return returnValue;
- }
-
- @Override
- protected Message getResponseMessage(Exception e) {
- return SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, e);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderArgumentsBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderArgumentsBuilder.java
deleted file mode 100644
index 2de1fb53..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderArgumentsBuilder.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.provider;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-
-import javax.xml.ws.soap.SOAPBinding;
-
-/**
- * @author Jitendra Kotamraju
- */
-
-public // TODO need this in the factory
-abstract class ProviderArgumentsBuilder<T> {
-
- /**
- * Creates a fault {@link Message} from method invocation's exception
- */
- protected abstract Message getResponseMessage(Exception e);
-
- /**
- * Creates {@link Message} from method invocation's return value
- */
- protected Packet getResponse(Packet request, Exception e, WSDLPort port, WSBinding binding) {
- Message message = getResponseMessage(e);
- Packet response = request.createServerResponse(message,port,null,binding);
- return response;
- }
-
- /**
- * Binds {@link com.sun.xml.internal.ws.api.message.Message} to method invocation parameter
- * @param packet
- */
- /*protected*/ public abstract T getParameter(Packet packet); // TODO public for DISI pluggable Provider
-
- protected abstract Message getResponseMessage(T returnValue);
-
- /**
- * Creates {@link Packet} from method invocation's return value
- */
- protected Packet getResponse(Packet request, @Nullable T returnValue, WSDLPort port, WSBinding binding) {
- Message message = null;
- if (returnValue != null) {
- message = getResponseMessage(returnValue);
- }
- Packet response = request.createServerResponse(message,port,null,binding);
- return response;
- }
-
- public static ProviderArgumentsBuilder<?> create(ProviderEndpointModel model, WSBinding binding) {
- if (model.datatype == Packet.class)
- return new PacketProviderArgumentsBuilder(binding.getSOAPVersion());
- return (binding instanceof SOAPBinding) ? SOAPProviderArgumentBuilder.create(model, binding.getSOAPVersion())
- : XMLProviderArgumentBuilder.createBuilder(model, binding);
- }
-
- private static class PacketProviderArgumentsBuilder extends ProviderArgumentsBuilder<Packet> {
- private final SOAPVersion soapVersion;
-
- public PacketProviderArgumentsBuilder(SOAPVersion soapVersion) {
- this.soapVersion = soapVersion;
- }
-
- @Override
- protected Message getResponseMessage(Exception e) {
- // Will be called by AsyncProviderCallbackImpl.sendError
- return SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, e);
- }
-
- @Override
- /*protected*/ public Packet getParameter(Packet packet) {
- return packet;
- }
-
- @Override
- protected Message getResponseMessage(Packet returnValue) {
- // Should never be called
- throw new IllegalStateException();
- }
-
- @Override
- protected Packet getResponse(Packet request, @Nullable Packet returnValue, WSDLPort port, WSBinding binding) {
- return returnValue;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderEndpointModel.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderEndpointModel.java
deleted file mode 100644
index b60ae3ff..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderEndpointModel.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.provider;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.server.AsyncProvider;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-import com.sun.xml.internal.ws.spi.db.BindingHelper;
-
-import javax.activation.DataSource;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.Source;
-import javax.xml.ws.Provider;
-import javax.xml.ws.Service;
-import javax.xml.ws.ServiceMode;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.soap.SOAPBinding;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-
-
-/**
- * Keeps the runtime information like Service.Mode and erasure of Provider class
- * about Provider endpoint. It proccess annotations to find about Service.Mode
- * It also finds about parameterized type(e.g. Source, SOAPMessage, DataSource)
- * of endpoint class.
- *
- * @author Jitendra Kotamraju
- * @author Kohsuke Kawaguchi
- */
-final class ProviderEndpointModel<T> {
- /**
- * True if this is {@link AsyncProvider}.
- */
- final boolean isAsync;
-
- /**
- * In which mode does this provider operate?
- */
- @NotNull final Service.Mode mode;
- /**
- * T of {@link Provider}&lt;T>.
- */
- @NotNull final Class datatype;
- /**
- * User class that extends {@link Provider}.
- */
- @NotNull final Class implClass;
-
- ProviderEndpointModel(Class<T> implementorClass, WSBinding binding) {
- assert implementorClass != null;
- assert binding != null;
-
- implClass = implementorClass;
- mode = getServiceMode(implementorClass);
- Class otherClass = (binding instanceof SOAPBinding)
- ? SOAPMessage.class : DataSource.class;
- isAsync = AsyncProvider.class.isAssignableFrom(implementorClass);
-
-
- Class<? extends Object> baseType = isAsync ? AsyncProvider.class : Provider.class;
- Type baseParam = BindingHelper.getBaseType(implementorClass, baseType);
- if (baseParam==null)
- throw new WebServiceException(ServerMessages.NOT_IMPLEMENT_PROVIDER(implementorClass.getName()));
- if (!(baseParam instanceof ParameterizedType))
- throw new WebServiceException(ServerMessages.PROVIDER_NOT_PARAMETERIZED(implementorClass.getName()));
-
- ParameterizedType pt = (ParameterizedType)baseParam;
- Type[] types = pt.getActualTypeArguments();
- if(!(types[0] instanceof Class))
- throw new WebServiceException(ServerMessages.PROVIDER_INVALID_PARAMETER_TYPE(implementorClass.getName(),types[0]));
- datatype = (Class)types[0];
-
- if (mode == Service.Mode.PAYLOAD && datatype!=Source.class) {
- // Illegal to have PAYLOAD && SOAPMessage
- // Illegal to have PAYLOAD && DataSource
- throw new IllegalArgumentException(
- "Illeagal combination - Mode.PAYLOAD and Provider<"+otherClass.getName()+">");
- }
- }
-
- /**
- * Is it PAYLOAD or MESSAGE ??
- *
- * @param c endpoint class
- * @return Service.Mode.PAYLOAD or Service.Mode.MESSAGE
- */
- private static Service.Mode getServiceMode(Class<?> c) {
- ServiceMode mode = c.getAnnotation(ServiceMode.class);
- return (mode == null) ? Service.Mode.PAYLOAD : mode.value();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderInvokerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderInvokerTube.java
deleted file mode 100644
index 0f189263..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderInvokerTube.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.provider;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.server.AsyncProvider;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.Invoker;
-import com.sun.xml.internal.ws.api.server.ProviderInvokerTubeFactory;
-import com.sun.xml.internal.ws.binding.SOAPBindingImpl;
-import com.sun.xml.internal.ws.server.InvokerTube;
-
-import javax.xml.ws.Provider;
-
-/**
- * This {@link Tube} is used to invoke the {@link Provider} and {@link AsyncProvider} endpoints.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class ProviderInvokerTube<T> extends InvokerTube<Provider<T>> {
-
- protected ProviderArgumentsBuilder<T> argsBuilder;
-
- /*package*/ ProviderInvokerTube(Invoker invoker, ProviderArgumentsBuilder<T> argsBuilder) {
- super(invoker);
- this.argsBuilder = argsBuilder;
- }
-
- public static <T> ProviderInvokerTube<T>
- create(final Class<T> implType, final WSBinding binding, final Invoker invoker, final Container container) {
-
- final ProviderEndpointModel<T> model = new ProviderEndpointModel<T>(implType, binding);
- final ProviderArgumentsBuilder<?> argsBuilder = ProviderArgumentsBuilder.create(model, binding);
- if (binding instanceof SOAPBindingImpl) {
- //set portKnownHeaders on Binding, so that they can be used for MU processing
- ((SOAPBindingImpl) binding).setMode(model.mode);
- }
-
- return ProviderInvokerTubeFactory.create(null, container, implType, invoker, argsBuilder, model.isAsync);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/SOAPProviderArgumentBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/SOAPProviderArgumentBuilder.java
deleted file mode 100644
index 77abb6a2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/SOAPProviderArgumentBuilder.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.provider;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Messages;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-
-import javax.xml.soap.MimeHeader;
-import javax.xml.soap.MimeHeaders;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.Source;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author Jitendra Kotamraju
- */
-abstract class SOAPProviderArgumentBuilder<T> extends ProviderArgumentsBuilder<T> {
- protected final SOAPVersion soapVersion;
-
- private SOAPProviderArgumentBuilder(SOAPVersion soapVersion) {
- this.soapVersion = soapVersion;
- }
-
- static ProviderArgumentsBuilder create(ProviderEndpointModel model, SOAPVersion soapVersion) {
- if (model.mode == Service.Mode.PAYLOAD) {
- return new PayloadSource(soapVersion);
- } else {
- if(model.datatype==Source.class)
- return new MessageSource(soapVersion);
- if(model.datatype==SOAPMessage.class)
- return new SOAPMessageParameter(soapVersion);
- if(model.datatype==Message.class)
- return new MessageProviderArgumentBuilder(soapVersion);
- throw new WebServiceException(ServerMessages.PROVIDER_INVALID_PARAMETER_TYPE(model.implClass,model.datatype));
- }
- }
-
- private static final class PayloadSource extends SOAPProviderArgumentBuilder<Source> {
- PayloadSource(SOAPVersion soapVersion) {
- super(soapVersion);
- }
-
- /*protected*/ public Source getParameter(Packet packet) {
- return packet.getMessage().readPayloadAsSource();
- }
-
- protected Message getResponseMessage(Source source) {
- return Messages.createUsingPayload(source, soapVersion);
- }
-
- protected Message getResponseMessage(Exception e) {
- return SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, e);
- }
-
- }
-
- private static final class MessageSource extends SOAPProviderArgumentBuilder<Source> {
- MessageSource(SOAPVersion soapVersion) {
- super(soapVersion);
- }
-
- /*protected*/ public Source getParameter(Packet packet) {
- return packet.getMessage().readEnvelopeAsSource();
- }
-
- protected Message getResponseMessage(Source source) {
- return Messages.create(source, soapVersion);
- }
-
- protected Message getResponseMessage(Exception e) {
- return SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, e);
- }
- }
-
- private static final class SOAPMessageParameter extends SOAPProviderArgumentBuilder<SOAPMessage> {
- SOAPMessageParameter(SOAPVersion soapVersion) {
- super(soapVersion);
- }
-
- /*protected*/ public SOAPMessage getParameter(Packet packet) {
- try {
- return packet.getMessage().readAsSOAPMessage(packet, true);
- } catch (SOAPException se) {
- throw new WebServiceException(se);
- }
- }
-
- protected Message getResponseMessage(SOAPMessage soapMsg) {
- return Messages.create(soapMsg);
- }
-
- protected Message getResponseMessage(Exception e) {
- return SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, e);
- }
-
- @Override
- protected Packet getResponse(Packet request, @Nullable SOAPMessage returnValue, WSDLPort port, WSBinding binding) {
- Packet response = super.getResponse(request, returnValue, port, binding);
- // Populate SOAPMessage's transport headers
- if (returnValue != null && response.supports(Packet.OUTBOUND_TRANSPORT_HEADERS)) {
- MimeHeaders hdrs = returnValue.getMimeHeaders();
- Map<String, List<String>> headers = new HashMap<String, List<String>>();
- Iterator i = hdrs.getAllHeaders();
- while(i.hasNext()) {
- MimeHeader header = (MimeHeader)i.next();
- if(header.getName().equalsIgnoreCase("SOAPAction"))
- // SAAJ sets this header automatically, but it interferes with the correct operation of JAX-WS.
- // so ignore this header.
- continue;
-
- List<String> list = headers.get(header.getName());
- if (list == null) {
- list = new ArrayList<String>();
- headers.put(header.getName(), list);
- }
- list.add(header.getValue());
- }
- response.put(Packet.OUTBOUND_TRANSPORT_HEADERS, headers);
- }
- return response;
- }
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/SyncProviderInvokerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/SyncProviderInvokerTube.java
deleted file mode 100644
index 0986d10f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/SyncProviderInvokerTube.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.provider;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.pipe.NextAction;
-import com.sun.xml.internal.ws.api.pipe.ThrowableContainerPropertySet;
-import com.sun.xml.internal.ws.api.server.Invoker;
-
-import javax.xml.ws.Provider;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This tube is used to invoke the {@link Provider} endpoints.
- *
- * @author Jitendra Kotamraju
- */
-public // TODO needed by factory
-class SyncProviderInvokerTube<T> extends ProviderInvokerTube<T> {
-
- private static final Logger LOGGER = Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server.SyncProviderInvokerTube");
-
- public SyncProviderInvokerTube(Invoker invoker, ProviderArgumentsBuilder<T> argsBuilder) {
- super(invoker, argsBuilder);
- }
-
- /*
- * This binds the parameter for Provider endpoints and invokes the
- * invoke() method of {@linke Provider} endpoint. The return value from
- * invoke() is used to create a new {@link Message} that traverses
- * through the Pipeline to transport.
- */
- public NextAction processRequest(Packet request) {
- WSDLPort port = getEndpoint().getPort();
- WSBinding binding = getEndpoint().getBinding();
- T param = argsBuilder.getParameter(request);
-
- LOGGER.fine("Invoking Provider Endpoint");
-
- T returnValue;
- try {
- returnValue = getInvoker(request).invokeProvider(request, param);
- } catch(Exception e) {
- LOGGER.log(Level.SEVERE, e.getMessage(), e);
- Packet response = argsBuilder.getResponse(request,e,port,binding);
- return doReturnWith(response);
- }
- if (returnValue == null) {
- // Oneway. Send response code immediately for transports(like HTTP)
- // Don't do this above, since close() may generate some exceptions
- if (request.transportBackChannel != null) {
- request.transportBackChannel.close();
- }
- }
- Packet response = argsBuilder.getResponse(request,returnValue,port,binding);
-
- // Only used by Provider<Packet>
- // Implementation may pass Packet containing throwable; use both
- ThrowableContainerPropertySet tc = response.getSatellite(ThrowableContainerPropertySet.class);
- Throwable t = (tc != null) ? tc.getThrowable() : null;
-
- return t != null ? doThrow(response, t) : doReturnWith(response);
- }
-
- public @NotNull NextAction processResponse(@NotNull Packet response) {
- return doReturnWith(response);
- }
-
- public @NotNull NextAction processException(@NotNull Throwable t) {
- return doThrow(t);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/XMLProviderArgumentBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/XMLProviderArgumentBuilder.java
deleted file mode 100644
index 7a4cbc25..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/XMLProviderArgumentBuilder.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.provider;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Messages;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.encoding.xml.XMLMessage;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-
-import javax.activation.DataSource;
-import javax.xml.transform.Source;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.http.HTTPException;
-
-/**
- * @author Jitendra Kotamraju
- */
-abstract class XMLProviderArgumentBuilder<T> extends ProviderArgumentsBuilder<T> {
-
- @Override
- protected Packet getResponse(Packet request, Exception e, WSDLPort port, WSBinding binding) {
- Packet response = super.getResponse(request, e, port, binding);
- if (e instanceof HTTPException) {
- if (response.supports(MessageContext.HTTP_RESPONSE_CODE)) {
- response.put(MessageContext.HTTP_RESPONSE_CODE, ((HTTPException)e).getStatusCode());
- }
- }
- return response;
- }
-
- static XMLProviderArgumentBuilder createBuilder(ProviderEndpointModel model, WSBinding binding) {
- if (model.mode == Service.Mode.PAYLOAD) {
- return new PayloadSource();
- } else {
- if(model.datatype==Source.class)
- return new PayloadSource();
- if(model.datatype== DataSource.class)
- return new DataSourceParameter(binding);
- throw new WebServiceException(ServerMessages.PROVIDER_INVALID_PARAMETER_TYPE(model.implClass,model.datatype));
- }
- }
-
- private static final class PayloadSource extends XMLProviderArgumentBuilder<Source> {
- public Source getParameter(Packet packet) {
- return packet.getMessage().readPayloadAsSource();
- }
-
- public Message getResponseMessage(Source source) {
- return Messages.createUsingPayload(source, SOAPVersion.SOAP_11);
- }
-
- protected Message getResponseMessage(Exception e) {
- return XMLMessage.create(e);
- }
- }
-
- private static final class DataSourceParameter extends XMLProviderArgumentBuilder<DataSource> {
- private final WSBinding binding;
-
- DataSourceParameter(WSBinding binding) {
- this.binding = binding;
- }
- public DataSource getParameter(Packet packet) {
- Message msg = packet.getInternalMessage();
- return (msg instanceof XMLMessage.MessageDataSource)
- ? ((XMLMessage.MessageDataSource) msg).getDataSource()
- : XMLMessage.getDataSource(msg, binding.getFeatures());
- }
-
- public Message getResponseMessage(DataSource ds) {
- return XMLMessage.create(ds, binding.getFeatures());
- }
-
- protected Message getResponseMessage(Exception e) {
- return XMLMessage.create(e);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointArgumentsBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointArgumentsBuilder.java
deleted file mode 100644
index 3de2e67a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointArgumentsBuilder.java
+++ /dev/null
@@ -1,692 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.server.sei;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.Attachment;
-import com.sun.xml.internal.ws.api.message.AttachmentSet;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.model.ParameterBinding;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.message.AttachmentUnmarshallerImpl;
-import com.sun.xml.internal.ws.model.ParameterImpl;
-import com.sun.xml.internal.ws.model.WrapperParameter;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-import com.sun.xml.internal.ws.spi.db.RepeatedElementBridge;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.spi.db.DatabindingException;
-import com.sun.xml.internal.ws.spi.db.PropertyAccessor;
-import com.sun.xml.internal.ws.spi.db.WrapperComposite;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.encoding.StringDataContentHandler;
-import com.sun.xml.internal.ws.encoding.DataHandlerDataSource;
-
-import javax.activation.DataHandler;
-import javax.imageio.ImageIO;
-import javax.jws.WebParam.Mode;
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFault;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.transform.Source;
-import javax.xml.ws.Holder;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.soap.SOAPFaultException;
-import java.awt.Image;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Reads a request {@link Message}, disassembles it, and moves obtained Java values
- * to the expected places.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class EndpointArgumentsBuilder {
- /**
- * Reads a request {@link Message}, disassembles it, and moves obtained
- * Java values to the expected places.
- *
- * @param request
- * The request {@link Message} to be de-composed.
- * @param args
- * The Java arguments given to the SEI method invocation.
- * Some parts of the reply message may be set to {@link Holder}s in the arguments.
- * @throws JAXBException
- * if there's an error during unmarshalling the request message.
- * @throws XMLStreamException
- * if there's an error during unmarshalling the request message.
- */
- public abstract void readRequest(Message request, Object[] args)
- throws JAXBException, XMLStreamException;
-
- static final class None extends EndpointArgumentsBuilder {
- private None(){
- }
- @Override
- public void readRequest(Message msg, Object[] args) {
- msg.consume();
- }
- }
-
- /**
- * The singleton instance that produces null return value.
- * Used for operations that doesn't have any output.
- */
- public final static EndpointArgumentsBuilder NONE = new None();
-
- /**
- * Returns the 'uninitialized' value for the given type.
- *
- * <p>
- * For primitive types, it's '0', and for reference types, it's null.
- */
- @SuppressWarnings("element-type-mismatch")
- public static Object getVMUninitializedValue(Type type) {
- // if this map returns null, that means the 'type' is a reference type,
- // in which case 'null' is the correct null value, so this code is correct.
- return primitiveUninitializedValues.get(type);
- }
-
- private static final Map<Class,Object> primitiveUninitializedValues = new HashMap<Class, Object>();
-
- static {
- Map<Class, Object> m = primitiveUninitializedValues;
- m.put(int.class,(int)0);
- m.put(char.class,(char)0);
- m.put(byte.class,(byte)0);
- m.put(short.class,(short)0);
- m.put(long.class,(long)0);
- m.put(float.class,(float)0);
- m.put(double.class,(double)0);
- }
-
- protected QName wrapperName;
-
- static final class WrappedPartBuilder {
- private final XMLBridge bridge;
- private final EndpointValueSetter setter;
-
- /**
- * @param bridge
- * specifies how the part is unmarshalled.
- * @param setter
- * specifies how the obtained value is returned to the endpoint.
- */
- public WrappedPartBuilder(XMLBridge bridge, EndpointValueSetter setter) {
- this.bridge = bridge;
- this.setter = setter;
- }
-
- void readRequest( Object[] args, XMLStreamReader r, AttachmentSet att) throws JAXBException {
- Object obj = null;
- AttachmentUnmarshallerImpl au = (att != null)?new AttachmentUnmarshallerImpl(att):null;
- if (bridge instanceof RepeatedElementBridge) {
- RepeatedElementBridge rbridge = (RepeatedElementBridge)bridge;
- ArrayList list = new ArrayList();
- QName name = r.getName();
- while (r.getEventType()==XMLStreamReader.START_ELEMENT && name.equals(r.getName())) {
- list.add(rbridge.unmarshal(r, au));
- XMLStreamReaderUtil.toNextTag(r, name);
- }
- obj = rbridge.collectionHandler().convert(list);
- } else {
- obj = bridge.unmarshal(r, au);
- }
- setter.put(obj,args);
- }
- }
-
- protected Map<QName,WrappedPartBuilder> wrappedParts = null;
-
- protected void readWrappedRequest(Message msg, Object[] args) throws JAXBException, XMLStreamException {
- if (!msg.hasPayload()) {
- throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element");
- }
- XMLStreamReader reader = msg.readPayload();
- XMLStreamReaderUtil.verifyTag(reader,wrapperName);
- reader.nextTag();
- while(reader.getEventType()==XMLStreamReader.START_ELEMENT) {
- // TODO: QName has a performance issue
- QName name = reader.getName();
- WrappedPartBuilder part = wrappedParts.get(name);
- if(part==null) {
- // no corresponding part found. ignore
- XMLStreamReaderUtil.skipElement(reader);
- reader.nextTag();
- } else {
- part.readRequest(args,reader, msg.getAttachments());
- }
- XMLStreamReaderUtil.toNextTag(reader, name);
- }
-
- // we are done with the body
- reader.close();
- XMLStreamReaderFactory.recycle(reader);
- }
-
- /**
- * {@link EndpointArgumentsBuilder} that sets the VM uninitialized value to the type.
- */
- public static final class NullSetter extends EndpointArgumentsBuilder {
- private final EndpointValueSetter setter;
- private final Object nullValue;
-
- public NullSetter(EndpointValueSetter setter, Object nullValue){
- assert setter!=null;
- this.nullValue = nullValue;
- this.setter = setter;
- }
- public void readRequest(Message msg, Object[] args) {
- setter.put(nullValue, args);
- }
- }
-
- /**
- * {@link EndpointArgumentsBuilder} that is a composition of multiple
- * {@link EndpointArgumentsBuilder}s.
- *
- * <p>
- * Sometimes we need to look at multiple parts of the reply message
- * (say, two header params, one body param, and three attachments, etc.)
- * and that's when this object is used to combine multiple {@link EndpointArgumentsBuilder}s
- * (that each responsible for handling one part).
- *
- * <p>
- * The model guarantees that only at most one {@link EndpointArgumentsBuilder} will
- * return a value as a return value (and everything else has to go to
- * {@link Holder}s.)
- */
- public static final class Composite extends EndpointArgumentsBuilder {
- private final EndpointArgumentsBuilder[] builders;
-
- public Composite(EndpointArgumentsBuilder... builders) {
- this.builders = builders;
- }
-
- public Composite(Collection<? extends EndpointArgumentsBuilder> builders) {
- this(builders.toArray(new EndpointArgumentsBuilder[builders.size()]));
- }
-
- public void readRequest(Message msg, Object[] args) throws JAXBException, XMLStreamException {
- for (EndpointArgumentsBuilder builder : builders) {
- builder.readRequest(msg,args);
- }
- }
- }
-
-
- /**
- * Reads an Attachment into a Java parameter.
- */
- public static abstract class AttachmentBuilder extends EndpointArgumentsBuilder {
- protected final EndpointValueSetter setter;
- protected final ParameterImpl param;
- protected final String pname;
- protected final String pname1;
-
- AttachmentBuilder(ParameterImpl param, EndpointValueSetter setter) {
- this.setter = setter;
- this.param = param;
- this.pname = param.getPartName();
- this.pname1 = "<"+pname;
- }
-
- /**
- * Creates an AttachmentBuilder based on the parameter type
- *
- * @param param
- * runtime Parameter that abstracts the annotated java parameter
- * @param setter
- * specifies how the obtained value is set into the argument. Takes
- * care of Holder arguments.
- */
- public static EndpointArgumentsBuilder createAttachmentBuilder(ParameterImpl param, EndpointValueSetter setter) {
- Class type = (Class)param.getTypeInfo().type;
- if (DataHandler.class.isAssignableFrom(type)) {
- return new DataHandlerBuilder(param, setter);
- } else if (byte[].class==type) {
- return new ByteArrayBuilder(param, setter);
- } else if(Source.class.isAssignableFrom(type)) {
- return new SourceBuilder(param, setter);
- } else if(Image.class.isAssignableFrom(type)) {
- return new ImageBuilder(param, setter);
- } else if(InputStream.class==type) {
- return new InputStreamBuilder(param, setter);
- } else if(isXMLMimeType(param.getBinding().getMimeType())) {
- return new JAXBBuilder(param, setter);
- } else if(String.class.isAssignableFrom(type)) {
- return new StringBuilder(param, setter);
- } else {
- throw new UnsupportedOperationException("Unknown Type="+type+" Attachment is not mapped.");
- }
- }
-
- public void readRequest(Message msg, Object[] args) throws JAXBException, XMLStreamException {
- boolean foundAttachment = false;
- // TODO not to loop
- for (Attachment att : msg.getAttachments()) {
- String part = getWSDLPartName(att);
- if (part == null) {
- continue;
- }
- if(part.equals(pname) || part.equals(pname1)){
- foundAttachment = true;
- mapAttachment(att, args);
- break;
- }
- }
- if (!foundAttachment) {
- throw new WebServiceException("Missing Attachment for "+pname);
- }
- }
-
- abstract void mapAttachment(Attachment att, Object[] args) throws JAXBException;
- }
-
- private static final class DataHandlerBuilder extends AttachmentBuilder {
- DataHandlerBuilder(ParameterImpl param, EndpointValueSetter setter) {
- super(param, setter);
- }
-
- void mapAttachment(Attachment att, Object[] args) {
- setter.put(att.asDataHandler(), args);
- }
- }
-
- private static final class ByteArrayBuilder extends AttachmentBuilder {
- ByteArrayBuilder(ParameterImpl param, EndpointValueSetter setter) {
- super(param, setter);
- }
-
- void mapAttachment(Attachment att, Object[] args) {
- setter.put(att.asByteArray(), args);
- }
- }
-
- private static final class SourceBuilder extends AttachmentBuilder {
- SourceBuilder(ParameterImpl param, EndpointValueSetter setter) {
- super(param, setter);
- }
-
- void mapAttachment(Attachment att, Object[] args) {
- setter.put(att.asSource(), args);
- }
- }
-
- private static final class ImageBuilder extends AttachmentBuilder {
- ImageBuilder(ParameterImpl param, EndpointValueSetter setter) {
- super(param, setter);
- }
-
- void mapAttachment(Attachment att, Object[] args) {
- Image image;
- InputStream is = null;
- try {
- is = att.asInputStream();
- image = ImageIO.read(is);
- } catch(IOException ioe) {
- throw new WebServiceException(ioe);
- } finally {
- if (is != null) {
- try {
- is.close();
- } catch(IOException ioe) {
- throw new WebServiceException(ioe);
- }
- }
- }
- setter.put(image, args);
- }
- }
-
- private static final class InputStreamBuilder extends AttachmentBuilder {
- InputStreamBuilder(ParameterImpl param, EndpointValueSetter setter) {
- super(param, setter);
- }
-
- void mapAttachment(Attachment att, Object[] args) {
- setter.put(att.asInputStream(), args);
- }
- }
-
- private static final class JAXBBuilder extends AttachmentBuilder {
- JAXBBuilder(ParameterImpl param, EndpointValueSetter setter) {
- super(param, setter);
- }
-
- void mapAttachment(Attachment att, Object[] args) throws JAXBException {
- Object obj = param.getXMLBridge().unmarshal(att.asInputStream());
- setter.put(obj, args);
- }
- }
-
- private static final class StringBuilder extends AttachmentBuilder {
- StringBuilder(ParameterImpl param, EndpointValueSetter setter) {
- super(param, setter);
- }
-
- void mapAttachment(Attachment att, Object[] args) {
- att.getContentType();
- StringDataContentHandler sdh = new StringDataContentHandler();
- try {
- String str = (String)sdh.getContent(new DataHandlerDataSource(att.asDataHandler()));
- setter.put(str, args);
- } catch(Exception e) {
- throw new WebServiceException(e);
- }
- }
- }
-
- /**
- * Gets the WSDL part name of this attachment.
- *
- * <p>
- * According to WSI AP 1.0
- * <PRE>
- * 3.8 Value-space of Content-Id Header
- * Definition: content-id part encoding
- * The "content-id part encoding" consists of the concatenation of:
- * The value of the name attribute of the wsdl:part element referenced by the mime:content, in which characters disallowed in content-id headers (non-ASCII characters as represented by code points above 0x7F) are escaped as follows:
- * o Each disallowed character is converted to UTF-8 as one or more bytes.
- * o Any bytes corresponding to a disallowed character are escaped with the URI escaping mechanism (that is, converted to %HH, where HH is the hexadecimal notation of the byte value).
- * o The original character is replaced by the resulting character sequence.
- * The character '=' (0x3D).
- * A globally unique value such as a UUID.
- * The character '@' (0x40).
- * A valid domain name under the authority of the entity constructing the message.
- * </PRE>
- *
- * So a wsdl:part fooPart will be encoded as:
- * <fooPart=somereallybignumberlikeauuid@example.com>
- *
- * @return null
- * if the parsing fails.
- */
- public static final String getWSDLPartName(com.sun.xml.internal.ws.api.message.Attachment att){
- String cId = att.getContentId();
-
- int index = cId.lastIndexOf('@', cId.length());
- if(index == -1){
- return null;
- }
- String localPart = cId.substring(0, index);
- index = localPart.lastIndexOf('=', localPart.length());
- if(index == -1){
- return null;
- }
- try {
- return java.net.URLDecoder.decode(localPart.substring(0, index), "UTF-8");
- } catch (UnsupportedEncodingException e) {
- throw new WebServiceException(e);
- }
- }
-
-
-
-
- /**
- * Reads a header into a JAXB object.
- */
- public static final class Header extends EndpointArgumentsBuilder {
- private final XMLBridge<?> bridge;
- private final EndpointValueSetter setter;
- private final QName headerName;
- private final SOAPVersion soapVersion;
-
- /**
- * @param name
- * The name of the header element.
- * @param bridge
- * specifies how to unmarshal a header into a JAXB object.
- * @param setter
- * specifies how the obtained value is returned to the client.
- */
- public Header(SOAPVersion soapVersion, QName name, XMLBridge<?> bridge, EndpointValueSetter setter) {
- this.soapVersion = soapVersion;
- this.headerName = name;
- this.bridge = bridge;
- this.setter = setter;
- }
-
- public Header(SOAPVersion soapVersion, ParameterImpl param, EndpointValueSetter setter) {
- this(
- soapVersion,
- param.getTypeInfo().tagName,
- param.getXMLBridge(),
- setter);
- assert param.getOutBinding()== ParameterBinding.HEADER;
- }
-
- private SOAPFaultException createDuplicateHeaderException() {
- try {
- SOAPFault fault = soapVersion.getSOAPFactory().createFault();
- fault.setFaultCode(soapVersion.faultCodeClient);
- fault.setFaultString(ServerMessages.DUPLICATE_PORT_KNOWN_HEADER(headerName));
- return new SOAPFaultException(fault);
- } catch(SOAPException e) {
- throw new WebServiceException(e);
- }
- }
-
- public void readRequest(Message msg, Object[] args) throws JAXBException {
- com.sun.xml.internal.ws.api.message.Header header = null;
- Iterator<com.sun.xml.internal.ws.api.message.Header> it =
- msg.getHeaders().getHeaders(headerName,true);
- if (it.hasNext()) {
- header = it.next();
- if (it.hasNext()) {
- throw createDuplicateHeaderException();
- }
- }
-
- if(header!=null) {
- setter.put( header.readAsJAXB(bridge), args );
- } else {
- // header not found.
- }
- }
- }
-
- /**
- * Reads the whole payload into a single JAXB bean.
- */
- public static final class Body extends EndpointArgumentsBuilder {
- private final XMLBridge<?> bridge;
- private final EndpointValueSetter setter;
-
- /**
- * @param bridge
- * specifies how to unmarshal the payload into a JAXB object.
- * @param setter
- * specifies how the obtained value is returned to the client.
- */
- public Body(XMLBridge<?> bridge, EndpointValueSetter setter) {
- this.bridge = bridge;
- this.setter = setter;
- }
-
- public void readRequest(Message msg, Object[] args) throws JAXBException {
- setter.put( msg.readPayloadAsJAXB(bridge), args );
- }
- }
-
- /**
- * Treats a payload as multiple parts wrapped into one element,
- * and processes all such wrapped parts.
- */
- public static final class DocLit extends EndpointArgumentsBuilder {
- /**
- * {@link PartBuilder} keyed by the element name (inside the wrapper element.)
- */
- private final PartBuilder[] parts;
-
- private final XMLBridge wrapper;
- private boolean dynamicWrapper;
-
- public DocLit(WrapperParameter wp, Mode skipMode) {
- wrapperName = wp.getName();
- wrapper = wp.getXMLBridge();
- Class wrapperType = (Class) wrapper.getTypeInfo().type;
- dynamicWrapper = WrapperComposite.class.equals(wrapperType);
- List<PartBuilder> parts = new ArrayList<PartBuilder>();
- List<ParameterImpl> children = wp.getWrapperChildren();
- for (ParameterImpl p : children) {
- if (p.getMode() == skipMode) {
- continue;
- }
- /*
- if(p.isIN())
- continue;
- */
- QName name = p.getName();
- try {
- if (dynamicWrapper) {
- if (wrappedParts == null) wrappedParts = new HashMap<QName,WrappedPartBuilder>();
- XMLBridge xmlBridge = p.getInlinedRepeatedElementBridge();
- if (xmlBridge == null) xmlBridge = p.getXMLBridge();
- wrappedParts.put( p.getName(), new WrappedPartBuilder(xmlBridge, EndpointValueSetter.get(p)));
- } else {
- parts.add( new PartBuilder(
- wp.getOwner().getBindingContext().getElementPropertyAccessor(
- wrapperType,
- name.getNamespaceURI(),
- p.getName().getLocalPart()),
- EndpointValueSetter.get(p)
- ) );
- // wrapper parameter itself always bind to body, and
- // so do all its children
- assert p.getBinding()== ParameterBinding.BODY;
- }
- } catch (JAXBException e) {
- throw new WebServiceException( // TODO: i18n
- wrapperType+" do not have a property of the name "+name,e);
- }
- }
-
- this.parts = parts.toArray(new PartBuilder[parts.size()]);
- }
-
- public void readRequest(Message msg, Object[] args) throws JAXBException, XMLStreamException {
- if (dynamicWrapper) {
- readWrappedRequest(msg, args);
- } else {
- if (parts.length>0) {
- if (!msg.hasPayload()) {
- throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element");
- }
- XMLStreamReader reader = msg.readPayload();
- XMLStreamReaderUtil.verifyTag(reader, wrapperName);
- Object wrapperBean = wrapper.unmarshal(reader, (msg.getAttachments() != null) ?
- new AttachmentUnmarshallerImpl(msg.getAttachments()): null);
-
- try {
- for (PartBuilder part : parts) {
- part.readRequest(args,wrapperBean);
- }
- } catch (DatabindingException e) {
- // this can happen when the set method throw a checked exception or something like that
- throw new WebServiceException(e); // TODO:i18n
- }
-
- // we are done with the body
- reader.close();
- XMLStreamReaderFactory.recycle(reader);
- } else {
- msg.consume();
- }
- }
- }
-
- /**
- * Unmarshals each wrapped part into a JAXB object and moves it
- * to the expected place.
- */
- static final class PartBuilder {
- private final PropertyAccessor accessor;
- private final EndpointValueSetter setter;
-
- /**
- * @param accessor
- * specifies which portion of the wrapper bean to obtain the value from.
- * @param setter
- * specifies how the obtained value is returned to the client.
- */
- public PartBuilder(PropertyAccessor accessor, EndpointValueSetter setter) {
- this.accessor = accessor;
- this.setter = setter;
- assert accessor!=null && setter!=null;
- }
-
- final void readRequest( Object[] args, Object wrapperBean ) {
- Object obj = accessor.get(wrapperBean);
- setter.put(obj,args);
- }
-
-
- }
- }
-
- /**
- * Treats a payload as multiple parts wrapped into one element,
- * and processes all such wrapped parts.
- */
- public static final class RpcLit extends EndpointArgumentsBuilder {
- public RpcLit(WrapperParameter wp) {
- assert wp.getTypeInfo().type== WrapperComposite.class;
-
- wrapperName = wp.getName();
- wrappedParts = new HashMap<QName,WrappedPartBuilder>();
- List<ParameterImpl> children = wp.getWrapperChildren();
- for (ParameterImpl p : children) {
- wrappedParts.put( p.getName(), new WrappedPartBuilder(
- p.getXMLBridge(), EndpointValueSetter.get(p)
- ));
- // wrapper parameter itself always bind to body, and
- // so do all its children
- assert p.getBinding()== ParameterBinding.BODY;
- }
- }
-
- public void readRequest(Message msg, Object[] args) throws JAXBException, XMLStreamException {
- readWrappedRequest(msg, args);
- }
- }
-
- private static boolean isXMLMimeType(String mimeType){
- return mimeType.equals("text/xml") || mimeType.equals("application/xml");
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointResponseMessageBuilder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointResponseMessageBuilder.java
deleted file mode 100644
index ab652c8c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointResponseMessageBuilder.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.sei;
-
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Messages;
-import com.sun.xml.internal.ws.message.jaxb.JAXBMessage;
-import com.sun.xml.internal.ws.model.ParameterImpl;
-import com.sun.xml.internal.ws.model.WrapperParameter;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-import com.sun.xml.internal.ws.spi.db.PropertyAccessor;
-import com.sun.xml.internal.ws.spi.db.WrapperComposite;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Holder;
-import javax.xml.ws.WebServiceException;
-import java.util.List;
-
-/**
- * Builds a JAXB object that represents the payload.
- *
- * @see MessageFiller
- * @author Jitendra Kotamraju
- */
-public abstract class EndpointResponseMessageBuilder {
- public abstract Message createMessage(Object[] methodArgs, Object returnValue);
-
- public static final EndpointResponseMessageBuilder EMPTY_SOAP11 = new Empty(SOAPVersion.SOAP_11);
- public static final EndpointResponseMessageBuilder EMPTY_SOAP12 = new Empty(SOAPVersion.SOAP_12);
-
- private static final class Empty extends EndpointResponseMessageBuilder {
- private final SOAPVersion soapVersion;
-
- public Empty(SOAPVersion soapVersion) {
- this.soapVersion = soapVersion;
- }
-
- public Message createMessage(Object[] methodArgs, Object returnValue) {
- return Messages.createEmpty(soapVersion);
- }
- }
-
- /**
- * Base class for those {@link EndpointResponseMessageBuilder}s that build a {@link Message}
- * from JAXB objects.
- */
- private static abstract class JAXB extends EndpointResponseMessageBuilder {
- /**
- * This object determines the binding of the object returned
- * from {@link #createMessage(Object[], Object)}
- */
- private final XMLBridge bridge;
- private final SOAPVersion soapVersion;
-
- protected JAXB(XMLBridge bridge, SOAPVersion soapVersion) {
- assert bridge!=null;
- this.bridge = bridge;
- this.soapVersion = soapVersion;
- }
-
- public final Message createMessage(Object[] methodArgs, Object returnValue) {
- return JAXBMessage.create( bridge, build(methodArgs, returnValue), soapVersion );
- }
-
- /**
- * Builds a JAXB object that becomes the payload.
- */
- abstract Object build(Object[] methodArgs, Object returnValue);
- }
-
- /**
- * Used to create a payload JAXB object just by taking
- * one of the parameters.
- */
- public final static class Bare extends JAXB {
- /**
- * The index of the method invocation parameters that goes into the payload.
- */
- private final int methodPos;
-
- private final ValueGetter getter;
-
- /**
- * Creates a {@link EndpointResponseMessageBuilder} from a bare parameter.
- */
- public Bare(ParameterImpl p, SOAPVersion soapVersion) {
- super(p.getXMLBridge(), soapVersion);
- this.methodPos = p.getIndex();
- this.getter = ValueGetter.get(p);
- }
-
- /**
- * Picks up an object from the method arguments and uses it.
- */
- Object build(Object[] methodArgs, Object returnValue) {
- if (methodPos == -1) {
- return returnValue;
- }
- return getter.get(methodArgs[methodPos]);
- }
- }
-
-
- /**
- * Used to handle a 'wrapper' style request.
- * Common part of rpc/lit and doc/lit.
- */
- abstract static class Wrapped extends JAXB {
-
- /**
- * Where in the method argument list do they come from?
- */
- protected final int[] indices;
-
- /**
- * Abstracts away the {@link Holder} handling when touching method arguments.
- */
- protected final ValueGetter[] getters;
-
- /**
- * How does each wrapped parameter binds to XML?
- */
- protected XMLBridge[] parameterBridges;
-
- /**
- * Used for error diagnostics.
- */
- protected List<ParameterImpl> children;
-
- protected Wrapped(WrapperParameter wp, SOAPVersion soapVersion) {
- super(wp.getXMLBridge(), soapVersion);
-
- children = wp.getWrapperChildren();
-
- indices = new int[children.size()];
- getters = new ValueGetter[children.size()];
- for( int i=0; i<indices.length; i++ ) {
- ParameterImpl p = children.get(i);
- indices[i] = p.getIndex();
- getters[i] = ValueGetter.get(p);
- }
- }
-
- /**
- * Packs a bunch of arguments intoa {@link WrapperComposite}.
- */
- WrapperComposite buildWrapperComposite(Object[] methodArgs, Object returnValue) {
- WrapperComposite cs = new WrapperComposite();
- cs.bridges = parameterBridges;
- cs.values = new Object[parameterBridges.length];
-
- // fill in wrapped parameters from methodArgs
- for( int i=indices.length-1; i>=0; i-- ) {
- Object v;
- if (indices[i] == -1) {
- v = getters[i].get(returnValue);
- } else {
- v = getters[i].get(methodArgs[indices[i]]);
- }
- if(v==null) {
- throw new WebServiceException("Method Parameter: "+
- children.get(i).getName() +" cannot be null. This is BP 1.1 R2211 violation.");
- }
- cs.values[i] = v;
- }
-
- return cs;
- }
- }
-
- /**
- * Used to create a payload JAXB object by wrapping
- * multiple parameters into one "wrapper bean".
- */
- public final static class DocLit extends Wrapped {
- /**
- * How does each wrapped parameter binds to XML?
- */
- private final PropertyAccessor[] accessors;
-
- //private final RawAccessor retAccessor;
-
- /**
- * Wrapper bean.
- */
- private final Class wrapper;
- private boolean dynamicWrapper;
-
- /**
- * Needed to get wrapper instantiation method.
- */
- private BindingContext bindingContext;
-
- /**
- * Creates a {@link EndpointResponseMessageBuilder} from a {@link WrapperParameter}.
- */
- public DocLit(WrapperParameter wp, SOAPVersion soapVersion) {
- super(wp, soapVersion);
- bindingContext = wp.getOwner().getBindingContext();
- wrapper = (Class)wp.getXMLBridge().getTypeInfo().type;
- dynamicWrapper = WrapperComposite.class.equals(wrapper);
- children = wp.getWrapperChildren();
- parameterBridges = new XMLBridge[children.size()];
- accessors = new PropertyAccessor[children.size()];
- for( int i=0; i<accessors.length; i++ ) {
- ParameterImpl p = children.get(i);
- QName name = p.getName();
- if (dynamicWrapper) {
- parameterBridges[i] = children.get(i).getInlinedRepeatedElementBridge();
- if (parameterBridges[i] == null) parameterBridges[i] = children.get(i).getXMLBridge();
- } else {
- try {
- accessors[i] = (dynamicWrapper) ? null :
- p.getOwner().getBindingContext().getElementPropertyAccessor(
- wrapper, name.getNamespaceURI(), name.getLocalPart() );
- } catch (JAXBException e) {
- throw new WebServiceException( // TODO: i18n
- wrapper+" do not have a property of the name "+name,e);
- }
- }
- }
-
- }
-
- /**
- * Packs a bunch of arguments into a {@link WrapperComposite}.
- */
- Object build(Object[] methodArgs, Object returnValue) {
- if (dynamicWrapper) return buildWrapperComposite(methodArgs, returnValue);
- try {
- //Object bean = wrapper.newInstance();
- Object bean = bindingContext.newWrapperInstace(wrapper);
-
- // fill in wrapped parameters from methodArgs
- for( int i=indices.length-1; i>=0; i-- ) {
- if (indices[i] == -1) {
- accessors[i].set(bean, returnValue);
- } else {
- accessors[i].set(bean,getters[i].get(methodArgs[indices[i]]));
- }
- }
-
- return bean;
- } catch (InstantiationException e) {
- // this is irrecoverable
- Error x = new InstantiationError(e.getMessage());
- x.initCause(e);
- throw x;
- } catch (IllegalAccessException e) {
- // this is irrecoverable
- Error x = new IllegalAccessError(e.getMessage());
- x.initCause(e);
- throw x;
- } catch (com.sun.xml.internal.ws.spi.db.DatabindingException e) {
- // this can happen when the set method throw a checked exception or something like that
- throw new WebServiceException(e); // TODO:i18n
- }
- }
- }
-
-
- /**
- * Used to create a payload JAXB object by wrapping
- * multiple parameters into a {@link WrapperComposite}.
- *
- * <p>
- * This is used for rpc/lit, as we don't have a wrapper bean for it.
- * (TODO: Why don't we have a wrapper bean for this, when doc/lit does!?)
- */
- public final static class RpcLit extends Wrapped {
-
- /**
- * Creates a {@link EndpointResponseMessageBuilder} from a {@link WrapperParameter}.
- */
- public RpcLit(WrapperParameter wp, SOAPVersion soapVersion) {
- super(wp, soapVersion);
- // we'll use CompositeStructure to pack requests
- assert wp.getTypeInfo().type==WrapperComposite.class;
-
- parameterBridges = new XMLBridge[children.size()];
- for( int i=0; i<parameterBridges.length; i++ )
- parameterBridges[i] = children.get(i).getXMLBridge();
- }
-
- /**
- * Packs a bunch of arguments intoa {@link WrapperComposite}.
- */
- Object build(Object[] methodArgs, Object returnValue) {
- return buildWrapperComposite(methodArgs, returnValue);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointValueSetter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointValueSetter.java
deleted file mode 100644
index 4c91bb90..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointValueSetter.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.sei;
-
-import com.sun.xml.internal.ws.api.model.Parameter;
-import com.sun.xml.internal.ws.model.ParameterImpl;
-
-import javax.xml.ws.Holder;
-
-/**
- * Moves a Java value unmarshalled from a response message
- * to the right place.
- *
- * <p>
- * Sometimes values are returned as a return value, and
- * others are returned in the {@link Holder} value. Instances
- * of this interface abstracts this detail.
- *
- * <p>
- * {@link EndpointValueSetter} is a stateless behavior encapsulation.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class EndpointValueSetter {
- private EndpointValueSetter() {}
-
- /**
- * Moves the value to the expected place.
- *
- * @param obj
- * The unmarshalled object.
- * @param args
- * The arguments that need to be given to the Java method invocation. If <tt>obj</tt>
- * is supposed to be returned as a {@link Holder} value, a suitable
- * {@link Holder} is obtained from this argument list and <tt>obj</tt>
- * is set.
- *
- */
- abstract void put(Object obj, Object[] args);
-
- /**
- * {@link Param}s with small index numbers are used often,
- * so we pool them to reduce the footprint.
- */
- private static final EndpointValueSetter[] POOL = new EndpointValueSetter[16];
-
- static {
- for( int i=0; i<POOL.length; i++ )
- POOL[i] = new Param(i);
- }
-
- /**
- * Returns a {@link EndpointValueSetter} suitable for the given {@link Parameter}.
- */
- public static EndpointValueSetter get(ParameterImpl p) {
- int idx = p.getIndex();
- if (p.isIN()) {
- if (idx<POOL.length) {
- return POOL[idx];
- } else {
- return new Param(idx);
- }
- } else {
- return new HolderParam(idx);
- }
- }
-
- static class Param extends EndpointValueSetter {
- /**
- * Index of the argument to put the value to.
- */
- protected final int idx;
-
- public Param(int idx) {
- this.idx = idx;
- }
-
- void put(Object obj, Object[] args) {
- if (obj != null) {
- args[idx] = obj;
- }
- }
- }
-
- static final class HolderParam extends Param {
-
- public HolderParam(int idx) {
- super(idx);
- }
-
- @Override
- void put(Object obj, Object[] args) {
- Holder holder = new Holder();
- if (obj != null) {
- holder.value = obj;
- }
- args[idx] = holder;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/Invoker.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/Invoker.java
deleted file mode 100644
index a7d3a3ac..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/Invoker.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.sei;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Packet;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-/**
- * Hides the detail of calling into application implementations.
- *
- * @since 2.2.6
- */
-public abstract class Invoker {
- /**
- * Wrapper for reflection invoke that allows containers to adapt
- */
- public abstract Object invoke( @NotNull Packet p, @NotNull Method m, @NotNull Object... args ) throws InvocationTargetException, IllegalAccessException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerSource.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerSource.java
deleted file mode 100644
index d0d27229..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerSource.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.sei;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Packet;
-
-/**
- * Interface for determining Invoker for a given request
- *
- * @since 2.2.6
- */
-public interface InvokerSource<T extends Invoker> {
- /**
- * Returns Invoker for the given request
- * @param request Packet for request
- * @return Selected invoker
- */
- public @NotNull T getInvoker(Packet request);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerTube.java
deleted file mode 100644
index 1efeeab5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerTube.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.sei;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractTubeImpl;
-
-/**
- * Base class for {@link com.sun.xml.internal.ws.server.InvokerTube} restored
- * to allow for containers to specify alternate implementations of SEI-based
- * invoking.
- */
-public abstract class InvokerTube<T extends Invoker>
- extends AbstractTubeImpl implements InvokerSource<T> {
-
- protected final T invoker;
-
- protected InvokerTube(T invoker) {
- this.invoker = invoker;
- }
-
- /**
- * Copy constructor.
- */
- protected InvokerTube(InvokerTube<T> that, TubeCloner cloner) {
- cloner.add(that,this);
- this.invoker = that.invoker;
- }
-
- /**
- * Returns the {@link Invoker} object that serves the request.
- */
- public @NotNull T getInvoker(Packet request) {
- return invoker;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/MessageFiller.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/MessageFiller.java
deleted file mode 100644
index 74120cf5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/MessageFiller.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.server.sei;
-
-import com.sun.xml.internal.ws.api.message.Headers;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.message.ByteArrayAttachment;
-import com.sun.xml.internal.ws.message.DataHandlerAttachment;
-import com.sun.xml.internal.ws.message.JAXBAttachment;
-import com.sun.xml.internal.ws.model.ParameterImpl;
-import com.sun.xml.internal.ws.spi.db.XMLBridge;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.UUID;
-import javax.activation.DataHandler;
-import javax.xml.transform.Source;
-import javax.xml.ws.WebServiceException;
-import com.sun.xml.internal.ws.api.message.Attachment;
-
-/**
- * Puts a non-payload message parameter to {@link Message}.
- *
- * <p>
- * Instance of this class is used to handle header parameters and attachment parameters.
- * They add things to {@link Message}.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public abstract class MessageFiller {
-
- /**
- * The index of the method invocation parameters that this object looks for.
- */
- protected final int methodPos;
-
- protected MessageFiller( int methodPos) {
- this.methodPos = methodPos;
- }
-
- /**
- * Moves an argument of a method invocation into a {@link Message}.
- */
- public abstract void fillIn(Object[] methodArgs, Object returnValue, Message msg);
-
- /**
- * Adds a parameter as an MIME attachment to {@link Message}.
- */
- public static abstract class AttachmentFiller extends MessageFiller {
- protected final ParameterImpl param;
- protected final ValueGetter getter;
- protected final String mimeType;
- private final String contentIdPart;
-
- protected AttachmentFiller(ParameterImpl param, ValueGetter getter) {
- super(param.getIndex());
- this.param = param;
- this.getter = getter;
- mimeType = param.getBinding().getMimeType();
- try {
- contentIdPart = URLEncoder.encode(param.getPartName(), "UTF-8")+'=';
- } catch (UnsupportedEncodingException e) {
- throw new WebServiceException(e);
- }
- }
-
- /**
- * Creates an MessageFiller based on the parameter type
- *
- * @param param
- * runtime Parameter that abstracts the annotated java parameter
- * @param getter
- * Gets a value from an object that represents a parameter passed
- * as a method argument.
- */
- public static MessageFiller createAttachmentFiller(ParameterImpl param, ValueGetter getter) {
- Class type = (Class)param.getTypeInfo().type;
- if (DataHandler.class.isAssignableFrom(type) || Source.class.isAssignableFrom(type)) {
- return new DataHandlerFiller(param, getter);
- } else if (byte[].class==type) {
- return new ByteArrayFiller(param, getter);
- } else if(isXMLMimeType(param.getBinding().getMimeType())) {
- return new JAXBFiller(param, getter);
- } else {
- return new DataHandlerFiller(param, getter);
- }
- }
-
- String getContentId() {
- return contentIdPart+UUID.randomUUID()+"@jaxws.sun.com";
- }
- }
-
- private static class ByteArrayFiller extends AttachmentFiller {
- protected ByteArrayFiller(ParameterImpl param, ValueGetter getter) {
- super(param, getter);
- }
-
- public void fillIn(Object[] methodArgs, Object returnValue, Message msg) {
- String contentId = getContentId();
- Object obj = (methodPos == -1) ? returnValue : getter.get(methodArgs[methodPos]);
- if (obj != null) {
- Attachment att = new ByteArrayAttachment(contentId,(byte[])obj,mimeType);
- msg.getAttachments().add(att);
- }
- }
- }
-
- private static class DataHandlerFiller extends AttachmentFiller {
- protected DataHandlerFiller(ParameterImpl param, ValueGetter getter) {
- super(param, getter);
- }
-
- public void fillIn(Object[] methodArgs, Object returnValue, Message msg) {
- String contentId = getContentId();
- Object obj = (methodPos == -1) ? returnValue : getter.get(methodArgs[methodPos]);
- DataHandler dh = (obj instanceof DataHandler) ? (DataHandler)obj : new DataHandler(obj,mimeType);
- Attachment att = new DataHandlerAttachment(contentId, dh);
- msg.getAttachments().add(att);
- }
- }
-
- private static class JAXBFiller extends AttachmentFiller {
- protected JAXBFiller(ParameterImpl param, ValueGetter getter) {
- super(param, getter);
- }
-
- public void fillIn(Object[] methodArgs, Object returnValue, Message msg) {
- String contentId = getContentId();
- Object obj = (methodPos == -1) ? returnValue : getter.get(methodArgs[methodPos]);
- Attachment att = new JAXBAttachment(contentId, obj, param.getXMLBridge(), mimeType);
- msg.getAttachments().add(att);
- }
- }
-
- /**
- * Adds a parameter as an header.
- */
- public static final class Header extends MessageFiller {
- private final XMLBridge bridge;
- private final ValueGetter getter;
-
- public Header(int methodPos, XMLBridge bridge, ValueGetter getter) {
- super(methodPos);
- this.bridge = bridge;
- this.getter = getter;
- }
-
- public void fillIn(Object[] methodArgs, Object returnValue, Message msg) {
- Object value = (methodPos == -1) ? returnValue : getter.get(methodArgs[methodPos]);
- msg.getHeaders().add(Headers.create(bridge,value));
- }
- }
-
- private static boolean isXMLMimeType(String mimeType){
- return mimeType.equals("text/xml") || mimeType.equals("application/xml");
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/SEIInvokerTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/SEIInvokerTube.java
deleted file mode 100644
index 29762107..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/SEIInvokerTube.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.sei;
-
-import com.oracle.webservices.internal.api.databinding.JavaCallInfo;
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.NextAction;
-import com.sun.xml.internal.ws.api.server.Invoker;
-import com.sun.xml.internal.ws.client.sei.MethodHandler;
-import com.sun.xml.internal.ws.model.AbstractSEIModelImpl;
-import com.sun.xml.internal.ws.server.InvokerTube;
-import com.sun.xml.internal.ws.wsdl.DispatchException;
-import java.lang.reflect.InvocationTargetException;
-
-/**
- * This pipe is used to invoke SEI based endpoints.
- *
- * @author Jitendra Kotamraju
- */
-public class SEIInvokerTube extends InvokerTube {
-
- /**
- * For each method on the port interface we have
- * a {@link MethodHandler} that processes it.
- */
- private final WSBinding binding;
- private final AbstractSEIModelImpl model;
-
- public SEIInvokerTube(AbstractSEIModelImpl model,Invoker invoker, WSBinding binding) {
- super(invoker);
- this.binding = binding;
- this.model = model;
- }
-
- /**
- * This binds the parameters for SEI endpoints and invokes the endpoint method. The
- * return value, and response Holder arguments are used to create a new {@link Message}
- * that traverses through the Pipeline to transport.
- */
- public @NotNull NextAction processRequest(@NotNull Packet req) {
- JavaCallInfo call = model.getDatabinding().deserializeRequest(req);
- if (call.getException() == null) {
- try {
- if (req.getMessage().isOneWay(model.getPort()) && req.transportBackChannel != null) {
- req.transportBackChannel.close();
- }
- Object ret = getInvoker(req).invoke(req, call.getMethod(), call.getParameters());
- call.setReturnValue(ret);
- } catch (InvocationTargetException e) {
- call.setException(e);
- } catch (Exception e) {
- call.setException(e);
- }
- } else if (call.getException() instanceof DispatchException) {
- DispatchException e = (DispatchException)call.getException();
- return doReturnWith(req.createServerResponse(e.fault, model.getPort(), null, binding));
- }
- Packet res = (Packet) model.getDatabinding().serializeResponse(call);
- res = req.relateServerResponse(res, req.endpoint.getPort(), model, req.endpoint.getBinding());
- assert res != null;
- return doReturnWith(res);
- }
-
- public @NotNull NextAction processResponse(@NotNull Packet response) {
- return doReturnWith(response);
- }
-
- public @NotNull NextAction processException(@NotNull Throwable t) {
- return doThrow(t);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/TieHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/TieHandler.java
deleted file mode 100644
index 370075a0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/TieHandler.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.sei;
-
-import com.oracle.webservices.internal.api.databinding.JavaCallInfo;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.databinding.EndpointCallBridge;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageContextFactory;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-import com.sun.xml.internal.ws.message.jaxb.JAXBMessage;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import com.sun.xml.internal.ws.model.ParameterImpl;
-import com.sun.xml.internal.ws.model.WrapperParameter;
-import com.sun.xml.internal.ws.wsdl.DispatchException;
-
-import javax.jws.WebParam.Mode;
-import javax.xml.bind.JAXBException;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.ws.Holder;
-import javax.xml.ws.ProtocolException;
-import javax.xml.ws.WebServiceException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- *
- * <p>
- * This class mainly performs the following two tasks:
- * <ol>
- * <li>Takes a {@link Message} that represents a request,
- * and extracts the arguments (and updates {@link Holder}s.)
- * <li>Accepts return value and {@link Holder} arguments for a Java method,
- * and creates {@link JAXBMessage} that represents a response message.
- * </ol>
- *
- * <h2>Creating {@link JAXBMessage}</h2>
- * <p>
- * At the construction time, we prepare {@link EndpointArgumentsBuilder} that knows how to create endpoint {@link Method}
- * invocation arguments.
- * we also prepare {@link EndpointResponseMessageBuilder} and {@link MessageFiller}s
- * that know how to move arguments into a {@link Message}.
- * Some arguments go to the payload, some go to headers, still others go to attachments.
- *
- * @author Jitendra Kotamraju
- * @author shih-chang.chen@oracle.com
- * Refactored from EndpointMethodHandler
- */
-final public class TieHandler implements EndpointCallBridge {
-
- private final SOAPVersion soapVersion;
- private final Method method;
- private final int noOfArgs;
- private final JavaMethodImpl javaMethodModel;
-
- private final Boolean isOneWay;
-
- // Converts {@link Message} --> Object[]
- private final EndpointArgumentsBuilder argumentsBuilder;
-
- // these objects together create a response message from method parameters
- private final EndpointResponseMessageBuilder bodyBuilder;
- private final MessageFiller[] outFillers;
- protected MessageContextFactory packetFactory;
-
- public TieHandler(JavaMethodImpl method, WSBinding binding, MessageContextFactory mcf) {
- this.soapVersion = binding.getSOAPVersion();
- this.method = method.getMethod();
- this.javaMethodModel = method;
- argumentsBuilder = createArgumentsBuilder();
- List<MessageFiller> fillers = new ArrayList<MessageFiller>();
- bodyBuilder = createResponseMessageBuilder(fillers);
- this.outFillers = fillers.toArray(new MessageFiller[fillers.size()]);
- this.isOneWay = method.getMEP().isOneWay();
- this.noOfArgs = this.method.getParameterTypes().length;
- packetFactory = mcf;
- }
-
- /**
- * It builds EndpointArgumentsBuilder which converts request {@link Message} to endpoint method's invocation
- * arguments Object[]
- *
- * @return EndpointArgumentsBuilder
- */
- private EndpointArgumentsBuilder createArgumentsBuilder() {
- EndpointArgumentsBuilder argsBuilder;
- List<ParameterImpl> rp = javaMethodModel.getRequestParameters();
- List<EndpointArgumentsBuilder> builders = new ArrayList<EndpointArgumentsBuilder>();
-
- for( ParameterImpl param : rp ) {
- EndpointValueSetter setter = EndpointValueSetter.get(param);
- switch(param.getInBinding().kind) {
- case BODY:
- if(param.isWrapperStyle()) {
- if(param.getParent().getBinding().isRpcLit())
- builders.add(new EndpointArgumentsBuilder.RpcLit((WrapperParameter)param));
- else
- builders.add(new EndpointArgumentsBuilder.DocLit((WrapperParameter)param, Mode.OUT));
- } else {
- builders.add(new EndpointArgumentsBuilder.Body(param.getXMLBridge(),setter));
- }
- break;
- case HEADER:
- builders.add(new EndpointArgumentsBuilder.Header(soapVersion, param, setter));
- break;
- case ATTACHMENT:
- builders.add(EndpointArgumentsBuilder.AttachmentBuilder.createAttachmentBuilder(param, setter));
- break;
- case UNBOUND:
- builders.add(new EndpointArgumentsBuilder.NullSetter(setter,
- EndpointArgumentsBuilder.getVMUninitializedValue(param.getTypeInfo().type)));
- break;
- default:
- throw new AssertionError();
- }
- }
-
- // creates {@link Holder} arguments for OUT parameters
- List<ParameterImpl> resp = javaMethodModel.getResponseParameters();
- for( ParameterImpl param : resp ) {
- if (param.isWrapperStyle()) {
- WrapperParameter wp = (WrapperParameter)param;
- List<ParameterImpl> children = wp.getWrapperChildren();
- for (ParameterImpl p : children) {
- if (p.isOUT() && p.getIndex() != -1) {
- EndpointValueSetter setter = EndpointValueSetter.get(p);
- builders.add(new EndpointArgumentsBuilder.NullSetter(setter, null));
- }
- }
- } else if (param.isOUT() && param.getIndex() != -1) {
- EndpointValueSetter setter = EndpointValueSetter.get(param);
- builders.add(new EndpointArgumentsBuilder.NullSetter(setter, null));
- }
- }
-
- switch(builders.size()) {
- case 0:
- argsBuilder = EndpointArgumentsBuilder.NONE;
- break;
- case 1:
- argsBuilder = builders.get(0);
- break;
- default:
- argsBuilder = new EndpointArgumentsBuilder.Composite(builders);
- }
- return argsBuilder;
- }
-
- /**
- * prepare objects for creating response {@link Message}
- */
- private EndpointResponseMessageBuilder createResponseMessageBuilder(List<MessageFiller> fillers) {
-
- EndpointResponseMessageBuilder tmpBodyBuilder = null;
- List<ParameterImpl> rp = javaMethodModel.getResponseParameters();
-
- for (ParameterImpl param : rp) {
- ValueGetter getter = ValueGetter.get(param);
-
- switch(param.getOutBinding().kind) {
- case BODY:
- if(param.isWrapperStyle()) {
- if(param.getParent().getBinding().isRpcLit()) {
- tmpBodyBuilder = new EndpointResponseMessageBuilder.RpcLit((WrapperParameter)param,
- soapVersion);
- } else {
- tmpBodyBuilder = new EndpointResponseMessageBuilder.DocLit((WrapperParameter)param,
- soapVersion);
- }
- } else {
- tmpBodyBuilder = new EndpointResponseMessageBuilder.Bare(param, soapVersion);
- }
- break;
- case HEADER:
- fillers.add(new MessageFiller.Header(param.getIndex(), param.getXMLBridge(), getter ));
- break;
- case ATTACHMENT:
- fillers.add(MessageFiller.AttachmentFiller.createAttachmentFiller(param, getter));
- break;
- case UNBOUND:
- break;
- default:
- throw new AssertionError(); // impossible
- }
- }
-
- if (tmpBodyBuilder == null) {
- // no parameter binds to body. we create an empty message
- switch(soapVersion) {
- case SOAP_11:
- tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP11;
- break;
- case SOAP_12:
- tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP12;
- break;
- default:
- throw new AssertionError();
- }
- }
- return tmpBodyBuilder;
- }
-
- public Object[] readRequest(Message reqMsg) {
- Object[] args = new Object[noOfArgs];
- try {
- argumentsBuilder.readRequest(reqMsg,args);
- } catch (JAXBException e) {
- throw new WebServiceException(e);
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- return args;
- }
-
- public Message createResponse(JavaCallInfo call) {
- Message responseMessage;
- if (call.getException() == null) {
- responseMessage = isOneWay ? null : createResponseMessage(call.getParameters(), call.getReturnValue());
- } else {
- Throwable e = call.getException();
- Throwable serviceException = getServiceException(e);
- if (e instanceof InvocationTargetException || serviceException != null) {
-// Throwable cause = e.getCause();
- //if (!(cause instanceof RuntimeException) && cause instanceof Exception) {
- if (serviceException != null) {
- // Service specific exception
- LOGGER.log(Level.FINE, serviceException.getMessage(), serviceException);
- responseMessage = SOAPFaultBuilder.createSOAPFaultMessage(soapVersion,
- javaMethodModel.getCheckedException(serviceException.getClass()), serviceException);
- } else {
- Throwable cause = e.getCause();
- if (cause instanceof ProtocolException) {
- // Application code may be throwing it intentionally
- LOGGER.log(Level.FINE, cause.getMessage(), cause);
- } else {
- // Probably some bug in application code
- LOGGER.log(Level.SEVERE, cause.getMessage(), cause);
- }
- responseMessage = SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, cause);
- }
- } else if (e instanceof DispatchException) {
- responseMessage = ((DispatchException)e).fault;
- } else {
- LOGGER.log(Level.SEVERE, e.getMessage(), e);
- responseMessage = SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, e);
- }
- }
-// return req.createServerResponse(responseMessage, req.endpoint.getPort(), javaMethodModel.getOwner(), req.endpoint.getBinding());
-
- return responseMessage;
- }
-
- Throwable getServiceException(Throwable throwable) {
- if (javaMethodModel.getCheckedException(throwable.getClass()) != null) return throwable;
- if (throwable.getCause() != null) {
- Throwable cause = throwable.getCause();
-// if (!(cause instanceof RuntimeException) && cause instanceof Exception) {
- if (javaMethodModel.getCheckedException(cause.getClass()) != null) return cause;
-// }
-// if (javaMethodModel.getCheckedException(cause.getClass()) != null) return cause;
- }
- return null;
- }
-
- /**
- * Creates a response {@link JAXBMessage} from method arguments, return value
- *
- * @return response message
- */
- private Message createResponseMessage(Object[] args, Object returnValue) {
- Message msg = bodyBuilder.createMessage(args, returnValue);
-
- for (MessageFiller filler : outFillers)
- filler.fillIn(args, returnValue, msg);
-
- return msg;
- }
-
- public Method getMethod() {
- return method;
- }
-
- private static final Logger LOGGER = Logger.getLogger(TieHandler.class.getName());
-
- @Override
- public JavaCallInfo deserializeRequest(Packet req) {
- com.sun.xml.internal.ws.api.databinding.JavaCallInfo call = new com.sun.xml.internal.ws.api.databinding.JavaCallInfo();
- call.setMethod(this.getMethod());
- Object[] args = this.readRequest(req.getMessage());
- call.setParameters(args);
- return call;
- }
-
- @Override
- public Packet serializeResponse(JavaCallInfo call) {
- Message msg = this.createResponse(call);
- Packet p = (msg == null) ? (Packet)packetFactory.createContext() : (Packet)packetFactory.createContext(msg);
- p.setState(Packet.State.ServerResponse);
- return p;
- }
-
- @Override
- public JavaMethod getOperationModel() {
- return javaMethodModel;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/ValueGetter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/ValueGetter.java
deleted file mode 100644
index a3ed444c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/ValueGetter.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.server.sei;
-
-import com.sun.xml.internal.ws.model.ParameterImpl;
-import com.sun.xml.internal.ws.api.model.Parameter;
-
-import javax.jws.WebParam.Mode;
-import javax.xml.ws.Holder;
-
-/**
- * Gets a value from an object that represents a parameter passed
- * as a method argument.
- *
- * <p>
- * This abstraction hides the handling of {@link Holder}.
- *
- * <p>
- * {@link ValueGetter} is a stateless behavior encapsulation.
- *
- * @author Kohsuke Kawaguchi
- */
-public enum ValueGetter {
- /**
- * {@link ValueGetter} that works for {@link Mode#IN} parameter.
- *
- * <p>
- * Since it's the IN mode, the parameter is not a {@link Holder},
- * therefore the parameter itself is a value.
- */
- PLAIN() {
- public Object get(Object parameter) {
- return parameter;
- }
- },
- /**
- * Creates {@link ValueGetter} that works for {@link Holder},
- * which is {@link Mode#INOUT} or {@link Mode#OUT}.
- *
- * <p>
- * In those {@link Mode}s, the parameter is a {@link Holder},
- * so the value to be sent is obtained by getting the value of the holder.
- */
- HOLDER() {
- public Object get(Object parameter) {
- if(parameter==null)
- // the user is allowed to pass in null where a Holder is expected.
- return null;
- return ((Holder)parameter).value;
- }
- };
-
- /**
- * Gets the value to be sent, from a parameter given as a method argument.
- */
- public abstract Object get(Object parameter);
-
- /**
- * Returns a {@link ValueGetter} suitable for the given {@link Parameter}.
- */
- public static ValueGetter get(ParameterImpl p) {
- // return value is always PLAIN
- if(p.getMode() == Mode.IN || p.getIndex() == -1) {
- return PLAIN;
- } else {
- return HOLDER;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java
deleted file mode 100644
index ac0883a8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.spi;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-import java.util.WeakHashMap;
-
-/**
- * Simple utility ensuring that the value is cached only in case it is non-internal implementation
- */
-abstract class ContextClassloaderLocal<V> {
-
- private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
-
- private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<ClassLoader, V>();
-
- public V get() throws Error {
- ClassLoader tccl = getContextClassLoader();
- V instance = CACHE.get(tccl);
- if (instance == null) {
- instance = createNewInstance();
- CACHE.put(tccl, instance);
- }
- return instance;
- }
-
- public void set(V instance) {
- CACHE.put(getContextClassLoader(), instance);
- }
-
- protected abstract V initialValue() throws Exception;
-
- private V createNewInstance() {
- try {
- return initialValue();
- } catch (Exception e) {
- throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e);
- }
- }
-
- private static String format(String property, Object... args) {
- String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property);
- return MessageFormat.format(text, args);
- }
-
- private static ClassLoader getContextClassLoader() {
- return (ClassLoader)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- ClassLoader cl = null;
- try {
- cl = Thread.currentThread().getContextClassLoader();
- } catch (SecurityException ex) {
- }
- return cl;
- }
- });
- }
-}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties
deleted file mode 100644
index a15e12e0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ContextClassloaderLocal.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-# Error messages for StaticCache utility class
-FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java
deleted file mode 100644
index 1c897967..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.spi;
-
-
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.WSService;
-import com.sun.xml.internal.ws.api.ServiceSharedFeatureMarker;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-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.server.BoundEndpoint;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.ContainerResolver;
-import com.sun.xml.internal.ws.api.server.Module;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
-import com.sun.xml.internal.ws.client.WSServiceDelegate;
-import com.sun.xml.internal.ws.developer.MemberSubmissionEndpointReference;
-import com.sun.xml.internal.ws.resources.ProviderApiMessages;
-import com.sun.xml.internal.ws.transport.http.server.EndpointImpl;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser;
-
-import org.w3c.dom.Element;
-import org.xml.sax.EntityResolver;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.Endpoint;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.spi.Provider;
-import javax.xml.ws.spi.ServiceDelegate;
-import javax.xml.ws.spi.Invoker;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The entry point to the JAX-WS RI from the JAX-WS API.
- *
- * @author WS Development Team
- */
-public class ProviderImpl extends Provider {
-
- private final static ContextClassloaderLocal<JAXBContext> eprjc = new ContextClassloaderLocal<JAXBContext>() {
- @Override
- protected JAXBContext initialValue() throws Exception {
- return getEPRJaxbContext();
- }
- };
-
- /**
- * Convenient singleton instance.
- */
- public static final ProviderImpl INSTANCE = new ProviderImpl();
-
- @Override
- public Endpoint createEndpoint(String bindingId, Object implementor) {
- return new EndpointImpl(
- (bindingId != null) ? BindingID.parse(bindingId) : BindingID.parse(implementor.getClass()),
- implementor);
- }
-
- @Override
- public ServiceDelegate createServiceDelegate( URL wsdlDocumentLocation, QName serviceName, Class serviceClass) {
- return new WSServiceDelegate(wsdlDocumentLocation, serviceName, serviceClass);
- }
-
- public ServiceDelegate createServiceDelegate( URL wsdlDocumentLocation, QName serviceName, Class serviceClass,
- WebServiceFeature ... features) {
- for (WebServiceFeature feature : features) {
- if (!(feature instanceof ServiceSharedFeatureMarker))
- throw new WebServiceException("Doesn't support any Service specific features");
- }
- return new WSServiceDelegate(wsdlDocumentLocation, serviceName, serviceClass, features);
- }
-
- public ServiceDelegate createServiceDelegate( Source wsdlSource, QName serviceName, Class serviceClass) {
- return new WSServiceDelegate(wsdlSource, serviceName, serviceClass);
- }
-
- @Override
- public Endpoint createAndPublishEndpoint(String address,
- Object implementor) {
- Endpoint endpoint = new EndpointImpl(
- BindingID.parse(implementor.getClass()),
- implementor);
- endpoint.publish(address);
- return endpoint;
- }
-
- public Endpoint createEndpoint(String bindingId, Object implementor, WebServiceFeature... features) {
- return new EndpointImpl(
- (bindingId != null) ? BindingID.parse(bindingId) : BindingID.parse(implementor.getClass()),
- implementor, features);
- }
-
- public Endpoint createAndPublishEndpoint(String address, Object implementor, WebServiceFeature... features) {
- Endpoint endpoint = new EndpointImpl(
- BindingID.parse(implementor.getClass()), implementor, features);
- endpoint.publish(address);
- return endpoint;
- }
-
- public Endpoint createEndpoint(String bindingId, Class implementorClass, Invoker invoker, WebServiceFeature... features) {
- return new EndpointImpl(
- (bindingId != null) ? BindingID.parse(bindingId) : BindingID.parse(implementorClass),
- implementorClass, invoker, features);
- }
-
- public EndpointReference readEndpointReference(final Source eprInfoset) {
- try {
- Unmarshaller unmarshaller = eprjc.get().createUnmarshaller();
- return (EndpointReference) unmarshaller.unmarshal(eprInfoset);
- } catch (JAXBException e) {
- throw new WebServiceException("Error creating Marshaller or marshalling.", e);
- }
- }
-
- public <T> T getPort(EndpointReference endpointReference, Class<T> clazz, WebServiceFeature... webServiceFeatures) {
- /*
- final @NotNull MemberSubmissionEndpointReference msepr =
- EndpointReferenceUtil.transform(MemberSubmissionEndpointReference.class, endpointReference);
- WSService service = new WSServiceDelegate(msepr.toWSDLSource(), msepr.serviceName.name, Service.class);
- */
- if(endpointReference == null)
- throw new WebServiceException(ProviderApiMessages.NULL_EPR());
- WSEndpointReference wsepr = new WSEndpointReference(endpointReference);
- WSEndpointReference.Metadata metadata = wsepr.getMetaData();
- WSService service;
- if(metadata.getWsdlSource() != null)
- service = (WSService) createServiceDelegate(metadata.getWsdlSource(), metadata.getServiceName(), Service.class);
- else
- throw new WebServiceException("WSDL metadata is missing in EPR");
- return service.getPort(wsepr, clazz, webServiceFeatures);
- }
-
- public W3CEndpointReference createW3CEndpointReference(String address, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters) {
- return createW3CEndpointReference(address, null, serviceName, portName, metadata, wsdlDocumentLocation, referenceParameters, null, null);
- }
-
- public W3CEndpointReference createW3CEndpointReference(String address, QName interfaceName, QName serviceName, QName portName,
- List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters,
- List<Element> elements, Map<QName, String> attributes) {
- Container container = ContainerResolver.getInstance().getContainer();
- if (address == null) {
- if (serviceName == null || portName == null) {
- throw new IllegalStateException(ProviderApiMessages.NULL_ADDRESS_SERVICE_ENDPOINT());
- } else {
- //check if it is run in a Java EE Container and if so, get address using serviceName and portName
- Module module = container.getSPI(Module.class);
- if (module != null) {
- List<BoundEndpoint> beList = module.getBoundEndpoints();
- for (BoundEndpoint be : beList) {
- WSEndpoint wse = be.getEndpoint();
- if (wse.getServiceName().equals(serviceName) && wse.getPortName().equals(portName)) {
- try {
- address = be.getAddress().toString();
- } catch (WebServiceException e) {
- // May be the container does n't support this
- //just ignore the exception
- }
- break;
- }
- }
- }
- //address is still null? may be its not run in a JavaEE Container
- if (address == null)
- throw new IllegalStateException(ProviderApiMessages.NULL_ADDRESS());
- }
- }
- if((serviceName==null) && (portName != null)) {
- throw new IllegalStateException(ProviderApiMessages.NULL_SERVICE());
- }
- //Validate Service and Port in WSDL
- String wsdlTargetNamespace = null;
- if (wsdlDocumentLocation != null) {
- try {
- EntityResolver er = XmlUtil.createDefaultCatalogResolver();
-
- URL wsdlLoc = new URL(wsdlDocumentLocation);
- WSDLModel wsdlDoc = RuntimeWSDLParser.parse(wsdlLoc, new StreamSource(wsdlLoc.toExternalForm()), er,
- true, container, ServiceFinder.find(WSDLParserExtension.class).toArray());
- if (serviceName != null) {
- WSDLService wsdlService = wsdlDoc.getService(serviceName);
- if (wsdlService == null)
- throw new IllegalStateException(ProviderApiMessages.NOTFOUND_SERVICE_IN_WSDL(
- serviceName,wsdlDocumentLocation));
- if (portName != null) {
- WSDLPort wsdlPort = wsdlService.get(portName);
- if (wsdlPort == null)
- throw new IllegalStateException(ProviderApiMessages.NOTFOUND_PORT_IN_WSDL(
- portName,serviceName,wsdlDocumentLocation));
- }
- wsdlTargetNamespace = serviceName.getNamespaceURI();
- } else {
- QName firstService = wsdlDoc.getFirstServiceName();
- wsdlTargetNamespace = firstService.getNamespaceURI();
- }
- } catch (Exception e) {
- throw new IllegalStateException(ProviderApiMessages.ERROR_WSDL(wsdlDocumentLocation),e);
- }
- }
- //wcf3.0/3.5 rejected empty metadata element.
- if (metadata != null && metadata.size() == 0) {
- metadata = null;
- }
- return new WSEndpointReference(
- AddressingVersion.fromSpecClass(W3CEndpointReference.class),
- address, serviceName, portName, interfaceName, metadata, wsdlDocumentLocation, wsdlTargetNamespace,referenceParameters, elements, attributes).toSpec(W3CEndpointReference.class);
-
- }
-
- private static JAXBContext getEPRJaxbContext() {
- // EPRs have package and private fields, so we need privilege escalation.
- // this access only fixed, known set of classes, so doing that
- // shouldn't introduce security vulnerability.
- return AccessController.doPrivileged(new PrivilegedAction<JAXBContext>() {
- public JAXBContext run() {
- try {
- return JAXBContext.newInstance(MemberSubmissionEndpointReference.class, W3CEndpointReference.class);
- } catch (JAXBException e) {
- throw new WebServiceException("Error creating JAXBContext for W3CEndpointReference. ", e);
- }
- }
- });
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContext.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContext.java
deleted file mode 100644
index 94fcc032..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContext.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.spi.db;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.List;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.annotation.XmlAttachmentRef;
-import javax.xml.namespace.QName;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-/**
- * {@link JAXBContext} enhanced with JAXB RI specific functionalities.
- *
- * <p>
- * <b>Subject to change without notice</b>.
- *
- * @since 2.0 EA1
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- *
- * @author shih-chang.chen@oracle.com
- */
-public interface BindingContext {
-
- //following are found in JAXBContext used by jaxws
- abstract public Marshaller createMarshaller() throws JAXBException;
- abstract public Unmarshaller createUnmarshaller() throws JAXBException;
- abstract public JAXBContext getJAXBContext();
- abstract public Object newWrapperInstace(Class<?> wrapperType)
- throws InstantiationException, IllegalAccessException;
-
-
-
-
-
- /**
- * Returns true if this context includes a class
- * that has {@link XmlAttachmentRef}.
- *
- * @since 2.1
- */
- public abstract boolean hasSwaRef();
-
- /**
- * If the given object is bound to an element in XML by JAXB,
- * returns the element name.
- *
- * @return null
- * if the object is not bound to an element.
- * @throws JAXBException
- * if the object is not known to this context.
- *
- * @since 2.0 EA1
- */
- public abstract @Nullable QName getElementName(@NotNull Object o) throws JAXBException;
-
- /**
- * Allows to retrieve the element name based on Class.
- * @param o
- * @return
- * @throws javax.xml.bind.JAXBException
- * @since 2.1.10
- */
- public abstract @Nullable QName getElementName(@NotNull Class o) throws JAXBException;
-
- /**
- * Creates a mini-marshaller/unmarshaller that can process a {@link TypeInfo}.
- *
- * @return
- * null if the specified reference is not given to {@link BindingContext#newWrapperInstace(Class)}.
- *
- * @since 2.0 EA1
- */
- public abstract XMLBridge createBridge(@NotNull TypeInfo ref);
- public abstract XMLBridge createFragmentBridge();
-
- /**
- * Creates a new {@link BridgeContext} instance.
- *
- * @return
- * always a valid non-null instance.
- *
- * @since 2.0 EA1
- */
-// public abstract @NotNull BridgeContext createBridgeContext();
-
- /**
- * Gets a {@link PropertyAccessor} for the specified element property of the specified wrapper bean class.
- *
- * <p>
- * This method is designed to assist the JAX-RPC RI fill in a wrapper bean (in the doc/lit/wrap mode.)
- * In the said mode, a wrapper bean is supposed to only have properties that match elements,
- * and for each element that appear in the content model there's one property.
- *
- * <p>
- * Therefore, this method takes a wrapper bean and a tag name that identifies a property
- * on the given wrapper bean, then returns a {@link PropertyAccessor} that allows the caller
- * to set/get a value from the property of the bean.
- *
- * <p>
- * This method is not designed for a performance. The caller is expected to cache the result.
- *
- * @param <B>
- * type of the wrapper bean
- * @param <V>
- * type of the property of the bean
- * @return
- * always return non-null valid accessor object.
- * @throws JAXBException
- * if the specified wrapper bean is not bound by JAXB, or if it doesn't have an element property
- * of the given name.
- *
- * @since 2.0 EA1
- */
- public abstract <B,V> PropertyAccessor<B,V> getElementPropertyAccessor( Class<B> wrapperBean, String nsUri, String localName )
- throws JAXBException;
-
- /**
- * Gets the namespace URIs statically known to this {@link JAXBContext}.
- *
- * <p>
- * When JAXB is used to marshal into sub-trees, it declares
- * these namespace URIs at each top-level element that it marshals.
- *
- * To avoid repeated namespace declarations at sub-elements, the application
- * may declare those namespaces at a higher level.
- *
- * @return
- * always non-null.
- *
- * @since 2.0 EA2
- */
- public abstract @NotNull List<String> getKnownNamespaceURIs();
-
-
- /**
- * Generates the schema documents from the model.
- *
- * <p>
- * The caller can use the additionalElementDecls parameter to
- * add element declarations to the generate schema.
- * For example, if the JAX-RPC passes in the following entry:
- *
- * {foo}bar -> DeclaredType for java.lang.String
- *
- * then JAXB generates the following element declaration (in the schema
- * document for the namespace "foo")"
- *
- * &lt;xs:element name="bar" type="xs:string" />
- *
- * This can be used for generating schema components necessary for WSDL.
- *
- * @param outputResolver
- * this object controls the output to which schemas
- * will be sent.
- *
- * @throws IOException
- * if {@link SchemaOutputResolver} throws an {@link IOException}.
- */
- public abstract void generateSchema(@NotNull SchemaOutputResolver outputResolver) throws IOException;
-
- /**
- * Returns the name of the XML Type bound to the
- * specified Java type.
- *
- * @param tr
- * must not be null. This must be one of the {@link TypeInfo}s specified
- * in the {@link BindingContext#newInstance} method.
- *
- * @throws IllegalArgumentException
- * if the parameter is null or not a part of the {@link TypeInfo}s specified
- * in the {@link BindingContext#newWrapperInstace(Class)} method.
- *
- * @return null
- * if the referenced type is an anonymous and therefore doesn't have a name.
- */
- public abstract QName getTypeName(@NotNull TypeInfo tr);
-
- /**
- * Gets the build information of the JAXB runtime.
- *
- * @return
- * may be null, if the runtime is loaded by a class loader that doesn't support
- * the access to the manifest informatino.
- */
- public abstract @NotNull String getBuildId();
-
- /**
- * The property that you can specify to {@link JAXBContext#newInstance}
- * to reassign the default namespace URI to something else at the runtime.
- *
- * <p>
- * The value of the property is {@link String}, and it is used as the namespace URI
- * that succeeds the default namespace URI.
- *
- * @since 2.0 EA1
- */
- public static final String DEFAULT_NAMESPACE_REMAP = "com.sun.xml.internal.bind.defaultNamespaceRemap";
-
- /**
- * The property that you can specify to {@link JAXBContext#newInstance}
- * to put additional JAXB type references into the {@link JAXBContext}.
- *
- * <p>
- * The value of the property is {@link Collection}&lt;{@link TypeInfo}>.
- * Those {@link TypeInfo}s can then be used to create {@link XMLBridge}s.
- *
- * <p>
- * This mechanism allows additional element declarations that were not a part of
- * the schema into the created {@link JAXBContext}.
- *
- * @since 2.0 EA1
- */
- public static final String TYPE_REFERENCES = "com.sun.xml.internal.bind.typeReferences";
-
- /**
- * The property that you can specify to {@link JAXBContext#newInstance}
- * and {@link Marshaller#setProperty(String, Object)}
- * to enable the c14n marshalling support in the {@link JAXBContext}.
- *
- * @see C14nSupport_ArchitectureDocument
- * @since 2.0 EA2
- */
- public static final String CANONICALIZATION_SUPPORT = "com.sun.xml.internal.bind.c14n";
-
- /**
- * The property that you can specify to {@link JAXBContext#newInstance}
- * to allow unmarshaller to honor <tt>xsi:nil</tt> anywhere, even if they are
- * not specifically allowed by the schema.
- *
- * @since 2.1.3
- */
- public static final String TREAT_EVERYTHING_NILLABLE = "com.sun.xml.internal.bind.treatEverythingNillable";
-
- /**
- * The property that you can specify to {@link JAXBContext#newInstance}
- * to use alternative {@link RuntimeAnnotationReader} implementation.
- *
- * @since 2.1 EA2
- */
-// public static final String ANNOTATION_READER = RuntimeAnnotationReader.class.getName();
-
- /**
- * Marshaller/Unmarshaller property to enable XOP processing.
- *
- * @since 2.0 EA2
- */
- public static final String ENABLE_XOP = "com.sun.xml.internal.bind.XOP";
-
- /**
- * The property that you can specify to {@link JAXBContext#newInstance}
- * to specify specific classes that replace the reference to generic classes.
- *
- * <p>
- * See the release notes for more details about this feature.
- *
- * @since 2.1 EA2
- */
- public static final String SUBCLASS_REPLACEMENTS = "com.sun.xml.internal.bind.subclassReplacements";
-
- /**
- * The property that you can specify to {@link JAXBContext#newInstance}
- * enable support of XmlAccessorFactory annotation in the {@link JAXBContext}.
- *
- * @since 2.1 EA2
- */
- public static final String XMLACCESSORFACTORY_SUPPORT = "com.sun.xml.internal.bind.XmlAccessorFactory";
-
- /**
- * Retains references to PropertyInfos.
- *
- * @since 2.1.10
- */
- public static final String RETAIN_REFERENCE_TO_INFO = "retainReferenceToInfo";
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContextFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContextFactory.java
deleted file mode 100644
index ce095000..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContextFactory.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Marshaller;
-
-
-import com.oracle.webservices.internal.api.databinding.DatabindingModeFeature;
-import com.sun.xml.internal.ws.db.glassfish.JAXBRIContextFactory;
-import com.sun.xml.internal.ws.util.ServiceConfigurationError;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-
-/**
- * BindingContextFactory
- *
- * @author shih-chang.chen@oracle.com
- */
-abstract public class BindingContextFactory {
- public static final String DefaultDatabindingMode = DatabindingModeFeature.GLASSFISH_JAXB;
- public static final String JAXB_CONTEXT_FACTORY_PROPERTY = BindingContextFactory.class.getName();
- public static final Logger LOGGER = Logger.getLogger(BindingContextFactory.class.getName());
-
- // This iterator adds exception checking for proper logging.
- public static Iterator<BindingContextFactory> serviceIterator() {
- final ServiceFinder<BindingContextFactory> sf = ServiceFinder
- .find(BindingContextFactory.class);
- final Iterator<BindingContextFactory> ibcf = sf.iterator();
-
- return new Iterator<BindingContextFactory>() {
- private BindingContextFactory bcf;
-
- public boolean hasNext() {
- while (true) {
- try {
- if (ibcf.hasNext()) {
- bcf = ibcf.next();
- return true;
- } else
- return false;
- } catch (ServiceConfigurationError e) {
- LOGGER.warning("skipping factory: ServiceConfigurationError: "
- + e.getMessage());
- } catch (NoClassDefFoundError ncdfe) {
- LOGGER.fine("skipping factory: NoClassDefFoundError: "
- + ncdfe.getMessage());
- }
- }
- }
-
- public BindingContextFactory next() {
- if (LOGGER.isLoggable(Level.FINER))
- LOGGER.finer("SPI found provider: " +
- bcf.getClass().getName());
- return bcf;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
-
- static private List<BindingContextFactory> factories() {
- List<BindingContextFactory> factories = new java.util.ArrayList<BindingContextFactory>();
- Iterator<BindingContextFactory> ibcf = serviceIterator();
- while (ibcf.hasNext())
- factories.add(ibcf.next());
-
- // There should always be at least one factory available.
- if (factories.isEmpty()) {
- if (LOGGER.isLoggable(Level.FINER))
- LOGGER.log(Level.FINER, "No SPI providers for BindingContextFactory found, adding: "
- + JAXBRIContextFactory.class.getName());
- factories.add(new JAXBRIContextFactory());
- }
- return factories;
- }
-
- abstract protected BindingContext newContext(JAXBContext context);
-
- abstract protected BindingContext newContext(BindingInfo bi);
-
- /**
- * Check to see if the BindingContextFactory is for the databinding mode/flavor. The
- * String parameter can be the package name of the JAXBContext implementation as well.
- * @param databinding mode/flavor or the package name of the JAXBContext implementation.
- * @return
- */
- abstract protected boolean isFor(String databinding);
-
- /**
- * @deprecated - Does jaxws need this?
- */
- abstract protected BindingContext getContext(Marshaller m);
-
- static private BindingContextFactory getFactory(String mode) {
- for (BindingContextFactory f: factories()) {
- if (f.isFor(mode))
- return f;
- }
- return null;
- }
-
- static public BindingContext create(JAXBContext context) throws DatabindingException {
- return getJAXBFactory(context).newContext(context);
- }
-
- static public BindingContext create(BindingInfo bi) {
- // Any mode configured in AbstractSEIModelImpl trumps all.
- // System property comes next, then SPI-located.
- String mode = bi.getDatabindingMode();
- if (mode != null) {
- if (LOGGER.isLoggable(Level.FINE))
- LOGGER.log(Level.FINE, "Using SEI-configured databindng mode: "
- + mode);
- } else if ((mode = System.getProperty("BindingContextFactory")) != null) {
- // The following is left for backward compatibility and should
- // eventually be removed.
- bi.setDatabindingMode(mode);
- if (LOGGER.isLoggable(Level.FINE))
- LOGGER.log(Level.FINE, "Using databindng: " + mode
- + " based on 'BindingContextFactory' System property");
- } else if ((mode = System.getProperty(JAXB_CONTEXT_FACTORY_PROPERTY)) != null) {
- bi.setDatabindingMode(mode);
- if (LOGGER.isLoggable(Level.FINE))
- LOGGER.log(Level.FINE, "Using databindng: " + mode
- + " based on '" + JAXB_CONTEXT_FACTORY_PROPERTY
- + "' System property");
- } else {
- // Find a default provider. Note we always ensure the list
- // is always non-empty.
- for (BindingContextFactory factory : factories()) {
- if (LOGGER.isLoggable(Level.FINE))
- LOGGER.log(Level.FINE,
- "Using SPI-determined databindng mode: "
- + factory.getClass().getName());
- // Special case: no name lookup used.
- return factory.newContext(bi);
- }
-
- // Should never get here as the list is non-empty.
- LOGGER.log(Level.SEVERE, "No Binding Context Factories found.");
- throw new DatabindingException("No Binding Context Factories found.");
- }
- BindingContextFactory f = getFactory(mode);
- if (f != null)
- return f.newContext(bi);
- LOGGER.severe("Unknown Databinding mode: " + mode);
- throw new DatabindingException("Unknown Databinding mode: " + mode);
- }
-
- static public boolean isContextSupported(Object o) {
- if (o == null) return false;
- String pkgName = o.getClass().getPackage().getName();
- for (BindingContextFactory f: factories()) if (f.isFor(pkgName)) return true;
- return false;
- }
-
- static BindingContextFactory getJAXBFactory(Object o) {
- String pkgName = o.getClass().getPackage().getName();
- BindingContextFactory f = getFactory(pkgName);
- if (f != null) return f;
- throw new DatabindingException("Unknown JAXBContext implementation: " + o.getClass());
-
- }
-
- /**
- * @deprecated - Does jaxws need this?
- */
- static public BindingContext getBindingContext(Marshaller m) {
- return getJAXBFactory(m).getContext(m);
- }
-
- /**
- * Creates a new {@link BindingContext}.
- *
- * <p>
- * {@link JAXBContext#newInstance(Class[]) JAXBContext.newInstance()} methods may
- * return other JAXB providers that are not compatible with the JAX-RPC RI.
- * This method guarantees that the JAX-WS RI will finds the JAXB RI.
- *
- * @param classes
- * Classes to be bound. See {@link JAXBContext#newInstance(Class[])} for the meaning.
- * @param typeRefs
- * See {@link #TYPE_REFERENCES} for the meaning of this parameter.
- * Can be null.
- * @param subclassReplacements
- * See {@link #SUBCLASS_REPLACEMENTS} for the meaning of this parameter.
- * Can be null.
- * @param defaultNamespaceRemap
- * See {@link #DEFAULT_NAMESPACE_REMAP} for the meaning of this parameter.
- * Can be null (and should be null for ordinary use of JAXB.)
- * @param c14nSupport
- * See {@link #CANONICALIZATION_SUPPORT} for the meaning of this parameter.
- * @param ar
- * See {@link #ANNOTATION_READER} for the meaning of this parameter.
- * Can be null.
- * @since JAXB 2.1 EA2
- */
-// public static BindingContext newInstance(@NotNull Class[] classes,
-// @Nullable Collection<TypeInfo> typeRefs,
-// @Nullable Map<Class,Class> subclassReplacements,
-// @Nullable String defaultNamespaceRemap, boolean c14nSupport,
-// @Nullable RuntimeAnnotationReader ar) throws JAXBException {
-// return ContextFactory.createContext(classes, typeRefs, subclassReplacements,
-// defaultNamespaceRemap, c14nSupport, ar, false, false, false);
-// }
-//
-// /**
-// * @deprecated
-// * Compatibility with older versions.
-// */
-// public static BindingContext newInstance(@NotNull Class[] classes,
-// @Nullable Collection<TypeInfo> typeRefs,
-// @Nullable String defaultNamespaceRemap, boolean c14nSupport ) throws JAXBException {
-// return newInstance(classes,typeRefs, Collections.<Class,Class>emptyMap(),
-// defaultNamespaceRemap,c14nSupport,null);
-// }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java
deleted file mode 100644
index 29ee58c4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-import java.lang.reflect.Type;
-
-//TODO SOAPVersion WebServiceFeatureList
-import com.sun.xml.internal.bind.util.Which;
-
-//TODO Packet AbstractMessageImpl
-import com.sun.xml.internal.bind.marshaller.SAX2DOMEx;
-
-//TODO DOMHeader DOMMessage SAAJMessage StatefulInstanceResolver
-import com.sun.xml.internal.bind.unmarshaller.DOMScanner;
-
-//TODO MtomCodec
-import com.sun.xml.internal.bind.v2.runtime.output.Encoded;
-
-//TODO ExceptionBean
-import com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper;
-
-//TODO AbstractWrapperBeanGenerator
-import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
-import com.sun.xml.internal.bind.v2.model.annotation.RuntimeInlineAnnotationReader;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-//TODO WSDLGenerator
-import static com.sun.xml.internal.bind.v2.schemagen.Util.*;
-
-import com.sun.xml.internal.bind.api.impl.NameConverter;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-/**
- * BindingHelper
- *
- * @author shih-chang.chen@oracle.com
- */
-public class BindingHelper {
- /**
- * Computes a Java identifier from a local name.
- *
- * <p>
- * This method faithfully implements the name mangling rule as specified in the JAXB spec.
- *
- * <p>
- * In JAXB, a collision with a Java reserved word (such as "return") never happens.
- * Accordingly, this method may return an identifier that collides with reserved words.
- *
- * <p>
- * Use <tt>JJavaName.isJavaIdentifier(String)</tt> to check for such collision.
- *
- * @return
- * Typically, this method returns "nameLikeThis".
- */
- public static @NotNull String mangleNameToVariableName(@NotNull String localName) {
- return NameConverter.standard.toVariableName(localName);
- }
-
- /**
- * Computes a Java class name from a local name.
- *
- * <p>
- * This method faithfully implements the name mangling rule as specified in the JAXB spec.
- *
- * @return
- * Typically, this method returns "NameLikeThis".
- */
- public static @NotNull String mangleNameToClassName(@NotNull String localName) {
- return NameConverter.standard.toClassName(localName);
- }
-
- /**
- * Computes a Java class name from a local name.
- *
- * <p>
- * This method faithfully implements the name mangling rule as specified in the JAXB spec.
- * This method works like {@link #mangleNameToClassName(String)} except that it looks
- * for "getClass" and returns something else.
- *
- * @return
- * Typically, this method returns "NameLikeThis".
- */
- public static @NotNull String mangleNameToPropertyName(@NotNull String localName) {
- return NameConverter.standard.toPropertyName(localName);
- }
-
- /**
- * Gets the parameterization of the given base type.
- *
- * <p>
- * For example, given the following
- * <pre><xmp>
- * interface Foo<T> extends List<List<T>> {}
- * interface Bar extends Foo<String> {}
- * </xmp></pre>
- * This method works like this:
- * <pre><xmp>
- * getBaseClass( Bar, List ) = List<List<String>
- * getBaseClass( Bar, Foo ) = Foo<String>
- * getBaseClass( Foo<? extends Number>, Collection ) = Collection<List<? extends Number>>
- * getBaseClass( ArrayList<? extends BigInteger>, List ) = List<? extends BigInteger>
- * </xmp></pre>
- *
- * @param type
- * The type that derives from {@code baseType}
- * @param baseType
- * The class whose parameterization we are interested in.
- * @return
- * The use of {@code baseType} in {@code type}.
- * or null if the type is not assignable to the base type.
- * @since 2.0 FCS
- */
- public static @Nullable Type getBaseType(@NotNull Type type, @NotNull Class baseType) {
- return Utils.REFLECTION_NAVIGATOR.getBaseClass(type,baseType);
- }
-
- public static <T> Class<T> erasure(Type t) {
- return (Class<T>) Utils.REFLECTION_NAVIGATOR.erasure(t);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingInfo.java
deleted file mode 100644
index 22712aa7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingInfo.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.spi.db;
-
-import java.net.URL;
-import java.util.Collection;
-import java.util.Map;
-
-import com.sun.xml.internal.ws.api.model.SEIModel;
-
-/**
- * BindingInfo
- *
- * @author shih-chang.chen@oracle.com
- */
-public class BindingInfo {
-
- private String databindingMode;
- private String defaultNamespace;
-
- private Collection<Class> contentClasses = new java.util.ArrayList<Class>();
- private Collection<TypeInfo> typeInfos = new java.util.ArrayList<TypeInfo>();
- private Map<Class,Class> subclassReplacements = new java.util.HashMap<Class, Class>();
- private Map<String, Object> properties = new java.util.HashMap<String, Object>();
- protected ClassLoader classLoader;
-
- private SEIModel seiModel;
- private URL wsdlURL;
-
- public String getDatabindingMode() {
- return databindingMode;
- }
- public void setDatabindingMode(String databindingMode) {
- this.databindingMode = databindingMode;
- }
-
- public String getDefaultNamespace() {
- return defaultNamespace;
- }
- public void setDefaultNamespace(String defaultNamespace) {
- this.defaultNamespace = defaultNamespace;
- }
-
- public Collection<Class> contentClasses() {
- return contentClasses;
- }
- public Collection<TypeInfo> typeInfos() {
- return typeInfos;
- }
- public Map<Class, Class> subclassReplacements() {
- return subclassReplacements;
- }
- public Map<String, Object> properties() {
- return properties;
- }
-
- public SEIModel getSEIModel() {
- return seiModel;
- }
- public void setSEIModel(SEIModel seiModel) {
- this.seiModel = seiModel;
- }
- public ClassLoader getClassLoader() {
- return classLoader;
- }
- public void setClassLoader(ClassLoader classLoader) {
- this.classLoader = classLoader;
- }
- public URL getWsdlURL() {
- return wsdlURL;
- }
- public void setWsdlURL(URL wsdlURL) {
- this.wsdlURL = wsdlURL;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingException.java
deleted file mode 100644
index 558a11aa..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-/**
- * Signals an error in Databinding.
- *
- * @author shih-chang.chen@oracle.com
- */
-public class DatabindingException extends RuntimeException {
- public DatabindingException() {}
- public DatabindingException(String message) { super(message); }
- public DatabindingException(Throwable cause) { super(cause); }
- public DatabindingException(String message, Throwable cause) { super(message, cause); }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingProvider.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingProvider.java
deleted file mode 100644
index b851c220..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingProvider.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-import java.util.Map;
-
-import com.oracle.webservices.internal.api.databinding.Databinding;
-import com.oracle.webservices.internal.api.databinding.WSDLGenerator;
-
-import com.sun.xml.internal.ws.api.databinding.DatabindingConfig;
-
-public interface DatabindingProvider {
- //We will need this for ServiceFinder
- boolean isFor(String databindingMode);
- void init(Map<String, Object> properties);
- Databinding create(DatabindingConfig config);
- WSDLGenerator wsdlGen(DatabindingConfig config);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldGetter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldGetter.java
deleted file mode 100644
index d61b26c7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldGetter.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-import java.lang.reflect.Field;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-
-
-/**
- * FieldGetter gets the value of a field from an instance.
- *
- * @author shih-chang.chen@oracle.com
- * @exclude
- */
-public class FieldGetter extends PropertyGetterBase {
-
- protected Field field;
-
- public FieldGetter(Field f) {
- field = f;
- type = f.getType();
- }
-
- public Field getField() {
- return field;
- }
-
- static class PrivilegedGetter implements PrivilegedExceptionAction {
- private Object value;
- private Field field;
- private Object instance;
- public PrivilegedGetter(Field field, Object instance) {
- super();
- this.field = field;
- this.instance = instance;
- }
- public Object run() throws IllegalAccessException {
- if (!field.isAccessible()) {
- field.setAccessible(true);
- }
- value = field.get(instance);
- return null;
- }
- }
-
- public Object get(final Object instance) {
- if (field.isAccessible()) {
- try {
- return field.get(instance);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- } else {
- PrivilegedGetter privilegedGetter = new PrivilegedGetter(field, instance);
- try {
- AccessController.doPrivileged(privilegedGetter);
- } catch (PrivilegedActionException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return privilegedGetter.value;
- }
- return null;
- }
-
- public <A> A getAnnotation(Class<A> annotationType) {
- Class c = annotationType;
- return (A) field.getAnnotation(c);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldSetter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldSetter.java
deleted file mode 100644
index 31a6c72c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldSetter.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-import java.lang.reflect.Field;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-
-
-/**
- * FieldSetter
- * @author shih-chang.chen@oracle.com
- * @exclude
- */
-public class FieldSetter extends PropertySetterBase {
-
- protected Field field;
-
- public FieldSetter(Field f) {
- field = f;
- type = f.getType();
- }
-
- public Field getField() {
- return field;
- }
-
- public void set(final Object instance, final Object resource) {
- if (field.isAccessible()) {
- try {
- field.set(instance, resource);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- } else {
- try {
- AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
- public Object run() throws IllegalAccessException {
- if (!field.isAccessible()) {
- field.setAccessible(true);
- }
- field.set(instance, resource);
- return null;
- }
- });
- } catch (PrivilegedActionException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
-
- public <A> A getAnnotation(Class<A> annotationType) {
- Class c = annotationType;
- return (A) field.getAnnotation(c);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/JAXBWrapperAccessor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/JAXBWrapperAccessor.java
deleted file mode 100644
index 248c61c8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/JAXBWrapperAccessor.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.spi.db;
-
-import java.lang.reflect.Array;
-import java.lang.reflect.Field;
-import java.lang.reflect.GenericArrayType;
-import java.lang.reflect.Method;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.namespace.QName;
-
-/**
- * JAXBWrapperAccessor
- *
- * @author shih-chang.chen@oracle.com
- */
-@SuppressWarnings({ "unchecked", "rawtypes" })
-public class JAXBWrapperAccessor extends WrapperAccessor {
-
- protected Class<?> contentClass;
- protected HashMap<Object, Class> elementDeclaredTypes;
-
- public JAXBWrapperAccessor(Class<?> wrapperBean) {
- contentClass = (Class<?>) wrapperBean;
-
- HashMap<Object, PropertySetter> setByQName = new HashMap<Object, PropertySetter>();
- HashMap<Object, PropertySetter> setByLocalpart = new HashMap<Object, PropertySetter>();
- HashMap<String, Method> publicSetters = new HashMap<String, Method>();
-
- HashMap<Object, PropertyGetter> getByQName = new HashMap<Object, PropertyGetter>();
- HashMap<Object, PropertyGetter> getByLocalpart = new HashMap<Object, PropertyGetter>();
- HashMap<String, Method> publicGetters = new HashMap<String, Method>();
-
- HashMap<Object, Class> elementDeclaredTypesByQName = new HashMap<Object, Class>();
- HashMap<Object, Class> elementDeclaredTypesByLocalpart = new HashMap<Object, Class>();
-
- for (Method method : contentClass.getMethods()) {
- if (PropertySetterBase.setterPattern(method)) {
- String key = method.getName()
- .substring(3, method.getName().length()).toLowerCase();
- publicSetters.put(key, method);
- }
- if (PropertyGetterBase.getterPattern(method)) {
- String methodName = method.getName();
- String key = methodName.startsWith("is") ? methodName
- .substring(2, method.getName().length()).toLowerCase()
- : methodName.substring(3, method.getName().length())
- .toLowerCase();
- publicGetters.put(key, method);
- }
- }
- HashSet<String> elementLocalNames = new HashSet<String>();
- for (Field field : getAllFields(contentClass)) {
- XmlElementWrapper xmlElemWrapper = field.getAnnotation(XmlElementWrapper.class);
- XmlElement xmlElem = field.getAnnotation(XmlElement.class);
- XmlElementRef xmlElemRef = field.getAnnotation(XmlElementRef.class);
- String fieldName = field.getName().toLowerCase();
- String namespace = "";
- String localName = field.getName();
- if (xmlElemWrapper != null) {
- namespace = xmlElemWrapper.namespace();
- if (xmlElemWrapper.name() != null && !xmlElemWrapper.name().equals("")
- && !xmlElemWrapper.name().equals("##default")) {
- localName = xmlElemWrapper.name();
- }
- }else if (xmlElem != null) {
- namespace = xmlElem.namespace();
- if (xmlElem.name() != null && !xmlElem.name().equals("")
- && !xmlElem.name().equals("##default")) {
- localName = xmlElem.name();
- }
- } else if (xmlElemRef != null) {
- namespace = xmlElemRef.namespace();
- if (xmlElemRef.name() != null && !xmlElemRef.name().equals("")
- && !xmlElemRef.name().equals("##default")) {
- localName = xmlElemRef.name();
- }
- }
- if (elementLocalNames.contains(localName)) {
- this.elementLocalNameCollision = true;
- } else {
- elementLocalNames.add(localName);
- }
-
- QName qname = new QName(namespace, localName);
- if (field.getType().equals(JAXBElement.class)) {
- if (field.getGenericType() instanceof ParameterizedType) {
- Type arg = ((ParameterizedType) field.getGenericType())
- .getActualTypeArguments()[0];
- if (arg instanceof Class) {
- elementDeclaredTypesByQName.put(qname, (Class) arg);
- elementDeclaredTypesByLocalpart.put(localName,
- (Class) arg);
- } else if (arg instanceof GenericArrayType) {
- Type componentType = ((GenericArrayType) arg)
- .getGenericComponentType();
- if (componentType instanceof Class) {
- Class arrayClass = Array.newInstance(
- (Class) componentType, 0).getClass();
- elementDeclaredTypesByQName.put(qname, arrayClass);
- elementDeclaredTypesByLocalpart.put(localName,
- arrayClass);
- }
- }
- }
-
- }
- // _return
- if (fieldName.startsWith("_") && !localName.startsWith("_")) {
- fieldName = fieldName.substring(1);
- }
- Method setMethod = publicSetters.get(fieldName);
- Method getMethod = publicGetters.get(fieldName);
- PropertySetter setter = createPropertySetter(field, setMethod);
- PropertyGetter getter = createPropertyGetter(field, getMethod);
- setByQName.put(qname, setter);
- setByLocalpart.put(localName, setter);
- getByQName.put(qname, getter);
- getByLocalpart.put(localName, getter);
- }
- if (this.elementLocalNameCollision) {
- this.propertySetters = setByQName;
- this.propertyGetters = getByQName;
- elementDeclaredTypes = elementDeclaredTypesByQName;
- } else {
- this.propertySetters = setByLocalpart;
- this.propertyGetters = getByLocalpart;
- elementDeclaredTypes = elementDeclaredTypesByLocalpart;
- }
- }
-
- static protected List<Field> getAllFields(Class<?> clz) {
- List<Field> list = new ArrayList<Field>();
- while (!Object.class.equals(clz)) {
- list.addAll(Arrays.asList(getDeclaredFields(clz)));
- clz = clz.getSuperclass();
- }
- return list;
- }
-
- static protected Field[] getDeclaredFields(final Class<?> clz) {
- try {
- return (System.getSecurityManager() == null) ? clz .getDeclaredFields() :
- AccessController.doPrivileged(new PrivilegedExceptionAction<Field[]>() {
- @Override
- public Field[] run() throws IllegalAccessException {
- return clz.getDeclaredFields();
- }
- });
- } catch (PrivilegedActionException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- return null;
- }
- }
-
- static protected PropertyGetter createPropertyGetter(Field field, Method getMethod) {
- if (!field.isAccessible()) {
- if (getMethod != null) {
- MethodGetter methodGetter = new MethodGetter(getMethod);
- if (methodGetter.getType().toString().equals(field.getType().toString())) {
- return methodGetter;
- }
- }
- }
- return new FieldGetter(field);
- }
-
- static protected PropertySetter createPropertySetter(Field field,
- Method setter) {
- if (!field.isAccessible()) {
- if (setter != null) {
- MethodSetter injection = new MethodSetter(setter);
- if (injection.getType().toString().equals(field.getType().toString())) {
- return injection;
- }
- }
- }
- return new FieldSetter(field);
- }
-
- private Class getElementDeclaredType(QName name) {
- Object key = (this.elementLocalNameCollision) ? name : name
- .getLocalPart();
- return elementDeclaredTypes.get(key);
- }
-
- @Override
- public PropertyAccessor getPropertyAccessor(String ns, String name) {
- final QName n = new QName(ns, name);
- final PropertySetter setter = getPropertySetter(n);
- final PropertyGetter getter = getPropertyGetter(n);
- final boolean isJAXBElement = setter.getType()
- .equals(JAXBElement.class);
- final boolean isListType = java.util.List.class.isAssignableFrom(setter
- .getType());
- final Class elementDeclaredType = isJAXBElement ? getElementDeclaredType(n)
- : null;
- return new PropertyAccessor() {
- @Override
- public Object get(Object bean) throws DatabindingException {
- Object val;
- if (isJAXBElement) {
- JAXBElement<Object> jaxbElement = (JAXBElement<Object>) getter.get(bean);
- val = (jaxbElement == null) ? null : jaxbElement.getValue();
- } else {
- val = getter.get(bean);
- }
- if (val == null && isListType) {
- val = new java.util.ArrayList();
- set(bean, val);
- }
- return val;
- }
-
- @Override
- public void set(Object bean, Object value) throws DatabindingException {
- if (isJAXBElement) {
- JAXBElement<Object> jaxbElement = new JAXBElement<Object>(
- n, elementDeclaredType, contentClass, value);
- setter.set(bean, jaxbElement);
- } else {
- setter.set(bean, value);
- }
- }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodGetter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodGetter.java
deleted file mode 100644
index 1759ebbb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodGetter.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-
-
-/**
- * MethodGetter
- * @author shih-chang.chen@oracle.com
- * @exclude
- */
-public class MethodGetter extends PropertyGetterBase {
-
- private Method method;
-
- public MethodGetter(Method m) {
- method = m;
- type = m.getReturnType();
- }
-
- public Method getMethod() {
- return method;
- }
-
- public <A> A getAnnotation(Class<A> annotationType) {
- Class c = annotationType;
- return (A) method.getAnnotation(c);
- }
-
-
- static class PrivilegedGetter implements PrivilegedExceptionAction {
- private Object value;
- private Method method;
- private Object instance;
- public PrivilegedGetter(Method m, Object instance) {
- super();
- this.method = m;
- this.instance = instance;
- }
- public Object run() throws IllegalAccessException {
- if (!method.isAccessible()) {
- method.setAccessible(true);
- }
- try {
- value = method.invoke(instance, new Object[0]);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return null;
- }
- }
-
- public Object get(final Object instance) {
- final Object[] args = new Object[0];
- try {
- if (method.isAccessible()) {
- return method.invoke(instance, args);
- } else {
- PrivilegedGetter privilegedGetter = new PrivilegedGetter(method, instance);
- try {
- AccessController.doPrivileged(privilegedGetter);
- } catch (PrivilegedActionException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return privilegedGetter.value;
- }
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodSetter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodSetter.java
deleted file mode 100644
index f369143c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodSetter.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-
-
-/**
- * MethodInjection
- * @author shih-chang.chen@oracle.com
- * @exclude
- */
-public class MethodSetter extends PropertySetterBase {
-
- private Method method;
-
- public MethodSetter(Method m) {
- method = m;
- type = m.getParameterTypes()[0];
- }
-
- public Method getMethod() {
- return method;
- }
-
- public <A> A getAnnotation(Class<A> annotationType) {
- Class c = annotationType;
- return (A) method.getAnnotation(c);
- }
-
- public void set(final Object instance, Object resource) {
- final Object[] args = {resource};
- if (method.isAccessible()) {
- try {
- method.invoke(instance, args);
- } catch (Exception e) {
- e.printStackTrace();
- }
- } else {
- try {
- AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
- public Object run() throws IllegalAccessException {
- if (!method.isAccessible()) {
- method.setAccessible(true);
- }
- try {
- method.invoke(instance, args);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return null;
- }
- });
- } catch (PrivilegedActionException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/OldBridge.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/OldBridge.java
deleted file mode 100644
index e61660c0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/OldBridge.java
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.bind.api.BridgeContext;
-import com.sun.xml.internal.bind.v2.runtime.BridgeContextImpl;
-import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
-
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-
-/**
- * Mini-marshaller/unmarshaller that is specialized for a particular
- * element name and a type.
- *
- * <p>
- * Instances of this class is stateless and multi-thread safe.
- * They are reentrant.
- *
- * <p>
- * All the marshal operation generates fragments.
- *
- * <p>
- * <b>Subject to change without notice</b>.
- *
- * @since JAXB 2.0 EA1
- * @author Kohsuke Kawaguchi
- */
-public abstract class OldBridge<T> {
- protected OldBridge(JAXBContextImpl context) {
- this.context = context;
- }
-
- protected final JAXBContextImpl context;
-
- /**
- * Gets the {@link BindingContext} to which this object belongs.
- *
- * @since 2.1
- */
- public @NotNull BindingContext getContext() {
-// return context;
- return null;
- }
-
- /**
- *
- * @throws JAXBException
- * if there was an error while marshalling.
- *
- * @since 2.0 EA1
- */
- public final void marshal(T object,XMLStreamWriter output) throws JAXBException {
- marshal(object,output,null);
- }
- public final void marshal(T object,XMLStreamWriter output, AttachmentMarshaller am) throws JAXBException {
- Marshaller m = context.marshallerPool.take();
- m.setAttachmentMarshaller(am);
- marshal(m,object,output);
- m.setAttachmentMarshaller(null);
- context.marshallerPool.recycle(m);
- }
-
- public final void marshal(@NotNull BridgeContext context,T object,XMLStreamWriter output) throws JAXBException {
- marshal( ((BridgeContextImpl)context).marshaller, object, output );
- }
-
- public abstract void marshal(@NotNull Marshaller m,T object,XMLStreamWriter output) throws JAXBException;
-
-
- /**
- * Marshals the specified type object with the implicit element name
- * associated with this instance of {@link XMLBridge}.
- *
- * @param nsContext
- * if this marshalling is done to marshal a subelement, this {@link NamespaceContext}
- * represents in-scope namespace bindings available for that element. Can be null,
- * in which case JAXB assumes no in-scope namespaces.
- * @throws JAXBException
- * if there was an error while marshalling.
- *
- * @since 2.0 EA1
- */
- public void marshal(T object,OutputStream output, NamespaceContext nsContext) throws JAXBException {
- marshal(object,output,nsContext,null);
- }
- /**
- * @since 2.0.2
- */
- public void marshal(T object,OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException {
- Marshaller m = context.marshallerPool.take();
- m.setAttachmentMarshaller(am);
- marshal(m,object,output,nsContext);
- m.setAttachmentMarshaller(null);
- context.marshallerPool.recycle(m);
- }
-
- public final void marshal(@NotNull BridgeContext context,T object,OutputStream output, NamespaceContext nsContext) throws JAXBException {
- marshal( ((BridgeContextImpl)context).marshaller, object, output, nsContext );
- }
-
- public abstract void marshal(@NotNull Marshaller m,T object,OutputStream output, NamespaceContext nsContext) throws JAXBException;
-
-
- public final void marshal(T object,Node output) throws JAXBException {
- Marshaller m = context.marshallerPool.take();
- marshal(m,object,output);
- context.marshallerPool.recycle(m);
- }
-
- public final void marshal(@NotNull BridgeContext context,T object,Node output) throws JAXBException {
- marshal( ((BridgeContextImpl)context).marshaller, object, output );
- }
-
- public abstract void marshal(@NotNull Marshaller m,T object,Node output) throws JAXBException;
-
-
- /**
- * @since 2.0 EA4
- */
- public final void marshal(T object, ContentHandler contentHandler) throws JAXBException {
- marshal(object,contentHandler,null);
- }
- /**
- * @since 2.0.2
- */
- public final void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException {
- Marshaller m = context.marshallerPool.take();
- m.setAttachmentMarshaller(am);
- marshal(m,object,contentHandler);
- m.setAttachmentMarshaller(null);
- context.marshallerPool.recycle(m);
- }
- public final void marshal(@NotNull BridgeContext context,T object, ContentHandler contentHandler) throws JAXBException {
- marshal( ((BridgeContextImpl)context).marshaller, object, contentHandler );
- }
- public abstract void marshal(@NotNull Marshaller m,T object, ContentHandler contentHandler) throws JAXBException;
-
- /**
- * @since 2.0 EA4
- */
- public final void marshal(T object, Result result) throws JAXBException {
- Marshaller m = context.marshallerPool.take();
- marshal(m,object,result);
- context.marshallerPool.recycle(m);
- }
- public final void marshal(@NotNull BridgeContext context,T object, Result result) throws JAXBException {
- marshal( ((BridgeContextImpl)context).marshaller, object, result );
- }
- public abstract void marshal(@NotNull Marshaller m,T object, Result result) throws JAXBException;
-
-
-
- private T exit(T r, Unmarshaller u) {
- u.setAttachmentUnmarshaller(null);
- context.unmarshallerPool.recycle(u);
- return r;
- }
-
- /**
- * Unmarshals the specified type object.
- *
- * @param in
- * the parser must be pointing at a start tag
- * that encloses the XML type that this {@link XMLBridge} is
- * instanciated for.
- *
- * @return
- * never null.
- *
- * @throws JAXBException
- * if there was an error while unmarshalling.
- *
- * @since 2.0 EA1
- */
- public final @NotNull T unmarshal(@NotNull XMLStreamReader in) throws JAXBException {
- return unmarshal(in,null);
- }
- /**
- * @since 2.0.3
- */
- public final @NotNull T unmarshal(@NotNull XMLStreamReader in, @Nullable AttachmentUnmarshaller au) throws JAXBException {
- Unmarshaller u = context.unmarshallerPool.take();
- u.setAttachmentUnmarshaller(au);
- return exit(unmarshal(u,in),u);
- }
- public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull XMLStreamReader in) throws JAXBException {
- return unmarshal( ((BridgeContextImpl)context).unmarshaller, in );
- }
- public abstract @NotNull T unmarshal(@NotNull Unmarshaller u, @NotNull XMLStreamReader in) throws JAXBException;
-
- /**
- * Unmarshals the specified type object.
- *
- * @param in
- * the parser must be pointing at a start tag
- * that encloses the XML type that this {@link XMLBridge} is
- * instanciated for.
- *
- * @return
- * never null.
- *
- * @throws JAXBException
- * if there was an error while unmarshalling.
- *
- * @since 2.0 EA1
- */
- public final @NotNull T unmarshal(@NotNull Source in) throws JAXBException {
- return unmarshal(in,null);
- }
- /**
- * @since 2.0.3
- */
- public final @NotNull T unmarshal(@NotNull Source in, @Nullable AttachmentUnmarshaller au) throws JAXBException {
- Unmarshaller u = context.unmarshallerPool.take();
- u.setAttachmentUnmarshaller(au);
- return exit(unmarshal(u,in),u);
- }
- public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull Source in) throws JAXBException {
- return unmarshal( ((BridgeContextImpl)context).unmarshaller, in );
- }
- public abstract @NotNull T unmarshal(@NotNull Unmarshaller u, @NotNull Source in) throws JAXBException;
-
- /**
- * Unmarshals the specified type object.
- *
- * @param in
- * the parser must be pointing at a start tag
- * that encloses the XML type that this {@link XMLBridge} is
- * instanciated for.
- *
- * @return
- * never null.
- *
- * @throws JAXBException
- * if there was an error while unmarshalling.
- *
- * @since 2.0 EA1
- */
- public final @NotNull T unmarshal(@NotNull InputStream in) throws JAXBException {
- Unmarshaller u = context.unmarshallerPool.take();
- return exit(unmarshal(u,in),u);
- }
- public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull InputStream in) throws JAXBException {
- return unmarshal( ((BridgeContextImpl)context).unmarshaller, in );
- }
- public abstract @NotNull T unmarshal(@NotNull Unmarshaller u, @NotNull InputStream in) throws JAXBException;
-
- /**
- * Unmarshals the specified type object.
- *
- * @param n
- * Node to be unmarshalled.
- *
- * @return
- * never null.
- *
- * @throws JAXBException
- * if there was an error while unmarshalling.
- *
- * @since 2.0 FCS
- */
- public final @NotNull T unmarshal(@NotNull Node n) throws JAXBException {
- return unmarshal(n,null);
- }
- /**
- * @since 2.0.3
- */
- public final @NotNull T unmarshal(@NotNull Node n, @Nullable AttachmentUnmarshaller au) throws JAXBException {
- Unmarshaller u = context.unmarshallerPool.take();
- u.setAttachmentUnmarshaller(au);
- return exit(unmarshal(u,n),u);
- }
- public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull Node n) throws JAXBException {
- return unmarshal( ((BridgeContextImpl)context).unmarshaller, n );
- }
- public abstract @NotNull T unmarshal(@NotNull Unmarshaller context, @NotNull Node n) throws JAXBException;
-
- /**
- * Gets the {@link TypeInfo} from which this bridge was created.
- */
- public abstract TypeInfo getTypeReference();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyAccessor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyAccessor.java
deleted file mode 100644
index 1161c816..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyAccessor.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-
-
-/**
- * Accesses a particular property of a bean.
- *
- * <p>
- * This interface allows JAX-RPC to access an element property of a JAXB bean.
- *
- * <p>
- * <b>Subject to change without notice</b>.
- *
- * @author Kohsuke Kawaguchi
- *
- * @since 2.0 EA1
- */
-public interface PropertyAccessor<B,V> {
-
- /**
- * Gets the value of the property of the given bean object.
- *
- * @param bean
- * must not be null.
- * @throws AccessorException
- * if failed to set a value. For example, the getter method
- * may throw an exception.
- *
- * @since 2.0 EA1
- */
- public abstract V get(B bean) throws DatabindingException;
-
- /**
- * Sets the value of the property of the given bean object.
- *
- * @param bean
- * must not be null.
- * @param value
- * the value to be set. Setting value to null means resetting
- * to the VM default value (even for primitive properties.)
- * @throws AccessorException
- * if failed to set a value. For example, the setter method
- * may throw an exception.
- *
- * @since 2.0 EA1
- */
- public abstract void set(B bean,V value) throws DatabindingException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetter.java
deleted file mode 100644
index 4546e461..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-/**
- * PropertyGetter
- *
- * @author shih-chang.chen@oracle.com
- * @exclude
- */
-public interface PropertyGetter {
-
- public Class getType();
-
- public <A> A getAnnotation(Class<A> annotationType);
-
- public Object get(Object instance);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetterBase.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetterBase.java
deleted file mode 100644
index 8a23b27c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetterBase.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-/**
- * This is the Gtter of a bean property.
- *
- * @author shih-chang.chen@oracle.com
- * @exclude
- */
-public abstract class PropertyGetterBase implements PropertyGetter {
- protected Class type;
-
- public Class getType() {
- return type;
- }
-
- static public boolean getterPattern(java.lang.reflect.Method method) {
- if (!method.getReturnType().equals(void.class) &&
- (method.getParameterTypes() == null ||
- method.getParameterTypes().length == 0)) {
- if (method.getName().startsWith("get") &&
- method.getName().length() > 3) {
- return true;
- } else {
- if (method.getReturnType().equals(boolean.class) &&
- method.getName().startsWith("is") &&
- method.getName().length() > 2) {
- return true;
- }
- }
- }
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetter.java
deleted file mode 100644
index 320500cd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-/**
- * PropertySetter
- *
- * @author shih-chang.chen@oracle.com
- * @exclude
- */
-public interface PropertySetter {
-
- public Class getType();
-
- public <A> A getAnnotation(Class<A> annotationType);
-
- public void set(Object instance, Object resource);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetterBase.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetterBase.java
deleted file mode 100644
index 60351657..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetterBase.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-/**
- * This is the Setter of a bean property.
- * @author shih-chang.chen@oracle.com
- * @exclude
- */
-public abstract class PropertySetterBase implements PropertySetter {
- protected Class type;
-
- public Class getType() {
- return type;
- }
-
- static public boolean setterPattern(java.lang.reflect.Method method) {
- return (method.getName().startsWith("set") &&
- method.getName().length() > 3 &&
- method.getReturnType().equals(void.class) &&
- method.getParameterTypes() != null &&
- method.getParameterTypes().length == 1);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/RepeatedElementBridge.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/RepeatedElementBridge.java
deleted file mode 100644
index 4effdf61..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/RepeatedElementBridge.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Collection;
-import java.util.List;
-import java.util.Set;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.NoSuchElementException;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-
-/**
- * RepeatedElementBridge
- *
- * @author shih-chang.chen@oracle.com
- */
-@SuppressWarnings({"rawtypes", "unchecked"})
-public class RepeatedElementBridge<T> implements XMLBridge<T> {
-
- XMLBridge<T> delegate;
- CollectionHandler collectionHandler;
-
- public RepeatedElementBridge(TypeInfo typeInfo, XMLBridge xb) {
- delegate = xb;
- collectionHandler = create(typeInfo);
- }
-
- public CollectionHandler collectionHandler() {
- return collectionHandler;
- }
-
- @Override
- public BindingContext context() {
- return delegate.context();
- }
-
- @Override
- public void marshal(T object, XMLStreamWriter output, AttachmentMarshaller am) throws JAXBException {
- delegate.marshal(object, output, am);
- }
-
- @Override
- public void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException {
- delegate.marshal(object, output, nsContext, am);
- }
-
- @Override
- public void marshal(T object, Node output) throws JAXBException {
- delegate.marshal(object, output);
- }
-
- @Override
- public void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException {
- delegate.marshal(object, contentHandler, am);
- }
-
- @Override
- public void marshal(T object, Result result) throws JAXBException {
- delegate.marshal(object, result);
- }
-
- @Override
- public T unmarshal(XMLStreamReader in, AttachmentUnmarshaller au) throws JAXBException {
- return delegate.unmarshal(in, au);
- }
-
- @Override
- public T unmarshal(Source in, AttachmentUnmarshaller au) throws JAXBException {
- return delegate.unmarshal(in, au);
- }
-
- @Override
- public T unmarshal(InputStream in) throws JAXBException {
- return delegate.unmarshal(in);
- }
-
- @Override
- public T unmarshal(Node n, AttachmentUnmarshaller au) throws JAXBException {
- return delegate.unmarshal(n, au);
- }
-
- @Override
- public TypeInfo getTypeInfo() {
- return delegate.getTypeInfo();
- }
-
- @Override
- public boolean supportOutputStream() {
- return delegate.supportOutputStream();
- }
-
- static public interface CollectionHandler {
- int getSize(Object c);
- Iterator iterator(Object c);
- Object convert(List list);
- }
-
- static class BaseCollectionHandler implements CollectionHandler {
- Class type;
- BaseCollectionHandler(Class c) {type = c;}
- @Override
- public int getSize(Object c) { return ((Collection) c).size(); }
- @Override
- public Object convert(List list) {
- try {
- Object o = type.newInstance();
- ((Collection)o).addAll(list);
- return o;
- } catch (Exception e) {
- e.printStackTrace();
- }
- return list;
- }
- @Override
- public Iterator iterator(Object c) {return ((Collection)c).iterator();}
- }
-
- static final CollectionHandler ListHandler = new BaseCollectionHandler(List.class) {
- @Override
- public Object convert(List list) {return list;}
- };
-
- static final CollectionHandler HashSetHandler = new BaseCollectionHandler(HashSet.class) {
- @Override
- public Object convert(List list) { return new HashSet(list);}
- };
-
- static public CollectionHandler create(TypeInfo ti) {
- Class javaClass = (Class) ti.type;
- if (javaClass.isArray()) {
- return new ArrayHandler((Class) ti.getItemType().type);
- } else if (List.class.equals(javaClass) || Collection.class.equals(javaClass)) {
- return ListHandler;
- } else if (Set.class.equals(javaClass) || HashSet.class.equals(javaClass)) {
- return HashSetHandler;
- } else {
- return new BaseCollectionHandler(javaClass);
- }
- }
-
- static class ArrayHandler implements CollectionHandler {
- Class componentClass;
- public ArrayHandler(Class component) {
- componentClass = component;
- }
- @Override
- public int getSize(Object c) {
- return java.lang.reflect.Array.getLength(c);
- }
- @Override
- public Object convert(List list) {
- Object array = java.lang.reflect.Array.newInstance(componentClass, list.size());
- for (int i = 0; i < list.size(); i++) {
- java.lang.reflect.Array.set(array, i, list.get(i));
- }
- return array;
- }
- @Override
- public Iterator iterator(final Object c) {
- return new Iterator() {
- int index = 0;
- @Override
- public boolean hasNext() {
- if (c == null || java.lang.reflect.Array.getLength(c) == 0) {
- return false;
- }
- return (index != java.lang.reflect.Array.getLength(c));
- }
- @Override
- public Object next() throws NoSuchElementException {
- Object retVal = null;
- try {
- retVal = java.lang.reflect.Array.get(c, index++);
- } catch (ArrayIndexOutOfBoundsException ex) {
- throw new NoSuchElementException();
- }
- return retVal;
- }
- @Override
- public void remove() {}
- };
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java
deleted file mode 100644
index 03f0979f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.GenericArrayType;
-import java.lang.reflect.Type;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-/**
- * A reference to a JAXB-bound type.
- *
- * <p>
- * <b>Subject to change without notice</b>.
- *
- * @since 2.0 EA1
- * @author Kohsuke Kawaguchi
- * @author shih-chang.chen@oracle.com
- */
-public final class TypeInfo {
-
- /**
- * The associated XML element name that the JAX-RPC uses with this type reference.
- *
- * Always non-null. Strings are interned.
- */
- public final QName tagName;
-
- /**
- * The Java type that's being referenced.
- *
- * Always non-null.
- */
- public Type type;
-
- /**
- * The annotations associated with the reference of this type.
- *
- * Always non-null.
- */
- public final Annotation[] annotations;
-
- private Map<String, Object> properties = new HashMap<String, Object>();
-
- private boolean isGlobalElement = true;
-
- private TypeInfo parentCollectionType;
-
- private Type genericType;
-
- private boolean nillable = true;
-
- public TypeInfo(QName tagName, Type type, Annotation... annotations) {
- if(tagName==null || type==null || annotations==null) {
- String nullArgs = "";
-
- if(tagName == null) nullArgs = "tagName";
- if(type == null) nullArgs += (nullArgs.length() > 0 ? ", type" : "type");
- if(annotations == null) nullArgs += (nullArgs.length() > 0 ? ", annotations" : "annotations");
-
-// Messages.ARGUMENT_CANT_BE_NULL.format(nullArgs);
-
- throw new IllegalArgumentException( "Argument(s) \"" + nullArgs + "\" can''t be null.)");
- }
-
- this.tagName = new QName(tagName.getNamespaceURI().intern(), tagName.getLocalPart().intern(), tagName.getPrefix());
- this.type = type;
- if (type instanceof Class && ((Class<?>)type).isPrimitive()) nillable = false;
- this.annotations = annotations;
- }
-
- /**
- * Finds the specified annotation from the array and returns it.
- * Null if not found.
- */
- public <A extends Annotation> A get( Class<A> annotationType ) {
- for (Annotation a : annotations) {
- if(a.annotationType()==annotationType)
- return annotationType.cast(a);
- }
- return null;
- }
-
- /**
- * Creates a {@link TypeInfo} for the item type,
- * if this {@link TypeInfo} represents a collection type.
- * Otherwise returns an identical type.
- */
- public TypeInfo toItemType() {
- // if we are to reinstitute this check, check JAXB annotations only
- // assert annotations.length==0; // not designed to work with adapters.
- Type t = (genericType != null)? genericType : type;
- Type base = Utils.REFLECTION_NAVIGATOR.getBaseClass(t, Collection.class);
- if(base==null)
- return this; // not a collection
-
- return new TypeInfo(tagName, Utils.REFLECTION_NAVIGATOR.getTypeArgument(base,0));
- }
-
- public Map<String, Object> properties() {
- return properties;
- }
-
- public boolean isGlobalElement() {
- return isGlobalElement;
- }
-
- public void setGlobalElement(boolean isGlobalElement) {
- this.isGlobalElement = isGlobalElement;
- }
-
- public TypeInfo getParentCollectionType() {
- return parentCollectionType;
- }
-
- public void setParentCollectionType(TypeInfo parentCollectionType) {
- this.parentCollectionType = parentCollectionType;
- }
-
- public boolean isRepeatedElement() {
- return (parentCollectionType != null);
- }
-
- public Type getGenericType() {
- return genericType;
- }
-
- public void setGenericType(Type genericType) {
- this.genericType = genericType;
- }
-
- public boolean isNillable() {
- return nillable;
- }
-
- public void setNillable(boolean nillable) {
- this.nillable = nillable;
- }
-
- public String toString() {
- return new StringBuilder("TypeInfo: Type = ").append(type)
- .append(", tag = ").append(tagName).toString();
- }
-
- public TypeInfo getItemType() {
-// System.out.println("????? TypeInfo " + type);
- if (type instanceof Class && ((Class)type).isArray() && !byte[].class.equals(type)) {
- Type componentType = ((Class)type).getComponentType();
- Type genericComponentType = null;
- if (genericType!= null && genericType instanceof GenericArrayType) {
- GenericArrayType arrayType = (GenericArrayType) type;
- genericComponentType = arrayType.getGenericComponentType();
- componentType = arrayType.getGenericComponentType();
- }
- TypeInfo ti =new TypeInfo(tagName, componentType, annotations);
- if (genericComponentType != null) ti.setGenericType(genericComponentType);
- return ti;
- }
-// if (type instanceof Class && java.util.Collection.class.isAssignableFrom((Class)type)) {
- Type t = (genericType != null)? genericType : type;
- Type base = Utils.REFLECTION_NAVIGATOR.getBaseClass(t, Collection.class);
- if ( base != null) {
- return new TypeInfo(tagName, Utils.REFLECTION_NAVIGATOR.getTypeArgument(base,0), annotations);
- }
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java
deleted file mode 100644
index 4cdfc9b1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.spi.db;
-
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Utils class.
- *
- * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages.
- *
- * Has *package private* access to avoid inappropriate usage.
- */
-final class Utils {
-
- private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
-
- /**
- * static ReflectionNavigator field to avoid usage of reflection every time we use it.
- */
- static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
-
- static { // we statically initializing REFLECTION_NAVIGATOR property
- try {
- final Class refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
-
- // requires accessClassInPackage privilege
- final Method getInstance = AccessController.doPrivileged(
- new PrivilegedAction<Method>() {
- @Override
- public Method run() {
- try {
- Method getInstance = refNav.getDeclaredMethod("getInstance");
- getInstance.setAccessible(true);
- return getInstance;
- } catch (NoSuchMethodException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
- }
- }
- }
- );
-
- //noinspection unchecked
- REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
- } catch (ClassNotFoundException e) {
- throw new IllegalStateException("Can't find ReflectionNavigator class");
- } catch (InvocationTargetException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
- } catch (IllegalAccessException e) {
- throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
- } catch (SecurityException e) {
- LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
- throw e;
- }
- }
-
- /**
- * private constructor to avoid util class instantiating
- */
- private Utils() {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperAccessor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperAccessor.java
deleted file mode 100644
index 77a6f69f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperAccessor.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-/**
- * WrapperAccessor
- *
- * @author shih-chang.chen@oracle.com
- */
-public abstract class WrapperAccessor {
- protected Map<Object, PropertySetter> propertySetters;
- protected Map<Object, PropertyGetter> propertyGetters;
- protected boolean elementLocalNameCollision;
-
- protected PropertySetter getPropertySetter(QName name) {
- Object key = (elementLocalNameCollision) ? name : name.getLocalPart();
- return propertySetters.get(key);
- }
- protected PropertyGetter getPropertyGetter(QName name) {
- Object key = (elementLocalNameCollision) ? name : name.getLocalPart();
- return propertyGetters.get(key);
- }
-
- public PropertyAccessor getPropertyAccessor(String ns, String name) {
- QName n = new QName(ns, name);
- final PropertySetter setter = getPropertySetter(n);
- final PropertyGetter getter = getPropertyGetter(n);
- return new PropertyAccessor() {
- public Object get(Object bean) throws DatabindingException {
- return getter.get(bean);
- }
-
- public void set(Object bean, Object value) throws DatabindingException {
- setter.set(bean, value);
- }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperBridge.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperBridge.java
deleted file mode 100644
index 2392638a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperBridge.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Iterator;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-
-import org.w3c.dom.Node;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-//import com.sun.xml.internal.ws.spi.db.BindingContext;
-//import com.sun.xml.internal.ws.spi.db.RepeatedElementBridge;
-//import com.sun.xml.internal.ws.spi.db.XMLBridge;
-//import com.sun.xml.internal.ws.spi.db.DatabindingException;
-//import com.sun.xml.internal.ws.spi.db.TypeInfo;
-//import com.sun.xml.internal.ws.spi.db.WrapperComposite;
-
-/**
- * WrapperBridge handles RPC-Literal body and Document-Literal wrappers without static
- * wrapper classes.
- *
- * @author shih-chang.chen@oracle.com
- */
-public class WrapperBridge<T> implements XMLBridge<T> {
-
- BindingContext parent;
- TypeInfo typeInfo;
- static final String WrapperPrefix = "w";
- static final String WrapperPrefixColon = WrapperPrefix + ":";
-
- public WrapperBridge(BindingContext p, TypeInfo ti) {
- this.parent = p;
- this.typeInfo = ti;
- }
-
- @Override
- public BindingContext context() {
- return parent;
- }
-
- @Override
- public TypeInfo getTypeInfo() {
- return typeInfo;
- }
-
- @Override
- public final void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException {
- WrapperComposite w = (WrapperComposite) object;
- Attributes att = new Attributes() {
- @Override public int getLength() { return 0; }
- @Override public String getURI(int index) { return null; }
- @Override public String getLocalName(int index) { return null; }
- @Override public String getQName(int index) { return null; }
- @Override public String getType(int index) { return null; }
- @Override public String getValue(int index) { return null; }
- @Override public int getIndex(String uri, String localName) { return 0; }
- @Override public int getIndex(String qName) { return 0; }
- @Override public String getType(String uri, String localName) { return null; }
- @Override public String getType(String qName) { return null; }
- @Override public String getValue(String uri, String localName) { return null; }
- @Override public String getValue(String qName) { return null; }
- };
- try {
- contentHandler.startPrefixMapping(WrapperPrefix, typeInfo.tagName.getNamespaceURI());
- contentHandler.startElement(typeInfo.tagName.getNamespaceURI(), typeInfo.tagName.getLocalPart(), WrapperPrefixColon + typeInfo.tagName.getLocalPart(), att);
- } catch (SAXException e) {
- throw new JAXBException(e);
- }
- if (w.bridges != null) for (int i = 0; i < w.bridges.length; i++) {
- if (w.bridges[i] instanceof RepeatedElementBridge) {
- RepeatedElementBridge rbridge = (RepeatedElementBridge) w.bridges[i];
- for (Iterator itr = rbridge.collectionHandler().iterator(w.values[i]); itr.hasNext();) {
- rbridge.marshal(itr.next(), contentHandler, am);
- }
- } else {
- w.bridges[i].marshal(w.values[i], contentHandler, am);
- }
- }
- try {
- contentHandler.endElement(typeInfo.tagName.getNamespaceURI(), typeInfo.tagName.getLocalPart(), null);
- contentHandler.endPrefixMapping(WrapperPrefix);
- } catch (SAXException e) {
- throw new JAXBException(e);
- }
-// bridge.marshal(object, contentHandler, am);
- }
-
- @Override
- public void marshal(T object, Node output) throws JAXBException {
- throw new UnsupportedOperationException();
-// bridge.marshal(object, output);
-// bridge.marshal((T) convert(object), output);
- }
-
- @Override
- public void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException {
-// bridge.marshal((T) convert(object), output, nsContext, am);
- }
-
- @Override
- public final void marshal(T object, Result result) throws JAXBException {
- throw new UnsupportedOperationException();
-// bridge.marshal(object, result);
- }
-
- @Override
- public final void marshal(T object, XMLStreamWriter output, AttachmentMarshaller am) throws JAXBException {
- WrapperComposite w = (WrapperComposite) object;
- try {
-// output.writeStartElement(typeInfo.tagName.getNamespaceURI(), typeInfo.tagName.getLocalPart());
-// System.out.println(typeInfo.tagName.getNamespaceURI());
-
- //The prefix is to workaround an eclipselink bug
- String prefix = output.getPrefix(typeInfo.tagName.getNamespaceURI());
- if (prefix == null) prefix = WrapperPrefix;
- output.writeStartElement(prefix, typeInfo.tagName.getLocalPart(), typeInfo.tagName.getNamespaceURI());
- output.writeNamespace(prefix, typeInfo.tagName.getNamespaceURI());
-
-// output.writeStartElement("", typeInfo.tagName.getLocalPart(), typeInfo.tagName.getNamespaceURI());
-// output.writeDefaultNamespace(typeInfo.tagName.getNamespaceURI());
-// System.out.println("======== " + output.getPrefix(typeInfo.tagName.getNamespaceURI()));
-// System.out.println("======== " + output.getNamespaceContext().getPrefix(typeInfo.tagName.getNamespaceURI()));
-// System.out.println("======== " + output.getNamespaceContext().getNamespaceURI(""));
- } catch (XMLStreamException e) {
- e.printStackTrace();
- throw new DatabindingException(e);
- }
- if (w.bridges != null) for (int i = 0; i < w.bridges.length; i++) {
- if (w.bridges[i] instanceof RepeatedElementBridge) {
- RepeatedElementBridge rbridge = (RepeatedElementBridge) w.bridges[i];
- for (Iterator itr = rbridge.collectionHandler().iterator(w.values[i]); itr.hasNext();) {
- rbridge.marshal(itr.next(), output, am);
- }
- } else {
- w.bridges[i].marshal(w.values[i], output, am);
- }
- }
- try {
- output.writeEndElement();
- } catch (XMLStreamException e) {
- throw new DatabindingException(e);
- }
- }
-
- @Override
- public final T unmarshal(InputStream in) throws JAXBException {
- //EndpointArgumentsBuilder.RpcLit.readRequest
- throw new UnsupportedOperationException();
-// return bridge.unmarshal(in);
- }
-
- @Override
- public final T unmarshal(Node n, AttachmentUnmarshaller au) throws JAXBException {
- //EndpointArgumentsBuilder.RpcLit.readRequest
- throw new UnsupportedOperationException();
-// return bridge.unmarshal(n, au);
- }
-
- @Override
- public final T unmarshal(Source in, AttachmentUnmarshaller au) throws JAXBException {
- //EndpointArgumentsBuilder.RpcLit.readRequest
- throw new UnsupportedOperationException();
-// return bridge.unmarshal(in, au);
- }
-
- @Override
- public final T unmarshal(XMLStreamReader in, AttachmentUnmarshaller au) throws JAXBException {
- //EndpointArgumentsBuilder.RpcLit.readRequest
- throw new UnsupportedOperationException();
-// return bridge.unmarshal(in, au);
- }
-
- @Override
- public boolean supportOutputStream() {
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperComposite.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperComposite.java
deleted file mode 100644
index 5c876708..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperComposite.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-/**
- * A JAXB Bean that works like a DOM.
- *
- * <p>
- * This bean is bound to XML as a sequence of elements, where each
- * element[i] is from bridges[i] (which defines the tag name and the expected type)
- * and values[i] (which defines the actual value.)
- *
- * <p>
- * This object allows you to treat multiple unrelated JAXB beans as a single tree.
- * This in turn allows you to marshal this tree in one marshal method invocation,
- * which is faster than multiple invocations of the marshal method.
- *
- * <p>
- * The binding of this class is always known to {@link BindingContext}, so it can be
- * used without passing anything to {@link BindingContext#newWrapperInstace(Class)}.
- * This object can be only used for marshalling, not for unmarshalling.
- *
- * @author Kohsuke Kawaguchi
- */
-public class WrapperComposite {
- public XMLBridge[] bridges;
- public Object[] values;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/XMLBridge.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/XMLBridge.java
deleted file mode 100644
index b7066016..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/XMLBridge.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.spi.db;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-
-/**
- * The XMLBridge is a Glassfish JAXWS side of Glassfish JAXB Bridge.
- *
- * Mini-marshaller/unmarshaller that is specialized for a particular
- * element name and a type.
- *
- * <p>
- * Instances of this class is stateless and multi-thread safe.
- * They are reentrant.
- *
- * <p>
- * All the marshal operation generates fragments.
- *
- * <p>
- * <b>Subject to change without notice</b>.
- *
- * @since JAXB 2.0 EA1
- * @author Kohsuke Kawaguchi
- * @author shih-chang.chen@oracle.com
- */
-public interface XMLBridge<T> {
- /**
- * Gets the {@link BindingContext} to which this object belongs.
- *
- * @since 2.1
- */
- public @NotNull BindingContext context();
-
- /**
- *
- * @throws JAXBException
- * if there was an error while marshalling.
- *
- * @since 2.0 EA1
- */
-// public void marshal(T object,XMLStreamWriter output) throws JAXBException;
-
- public void marshal(T object,XMLStreamWriter output, AttachmentMarshaller am) throws JAXBException;
-
- /**
- * Marshals the specified type object with the implicit element name
- * associated with this instance of {@link Bond}.
- *
- * @param nsContext
- * if this marshalling is done to marshal a subelement, this {@link NamespaceContext}
- * represents in-scope namespace bindings available for that element. Can be null,
- * in which case JAXB assumes no in-scope namespaces.
- * @throws JAXBException
- * if there was an error while marshalling.
- *
- * @since 2.0 EA1
- */
-// public void marshal(T object,OutputStream output, NamespaceContext nsContext) throws JAXBException;
-
- /**
- * @since 2.0.2
- */
- public void marshal(T object,OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException ;
-//
-//// public void marshal(@NotNull BridgeContext context,T object,OutputStream output, NamespaceContext nsContext) throws JAXBException;
-//
-// public void marshal(@NotNull Marshaller m,T object,OutputStream output, NamespaceContext nsContext) throws JAXBException;
-
-
- public void marshal(T object,Node output) throws JAXBException ;
-//
-//// public void marshal(@NotNull BridgeContext context,T object,Node output) throws JAXBException ;
-//
-// public void marshal(@NotNull Marshaller m,T object,Node output) throws JAXBException;
-
-
- /**
- * @since 2.0 EA4
- */
-// public void marshal(T object, ContentHandler contentHandler) throws JAXBException;
- /**
- * @since 2.0.2
- */
- public void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException ;
-
-//// public void marshal(@NotNull BridgeContext context,T object, ContentHandler contentHandler) throws JAXBException;
-//
-// public void marshal(@NotNull Marshaller m,T object, ContentHandler contentHandler) throws JAXBException;
-
- /**
- * @since 2.0 EA4
- */
- public void marshal(T object, Result result) throws JAXBException;
-
-//// public void marshal(@NotNull BridgeContext context,T object, Result result) throws JAXBException;
-// public void marshal(@NotNull Marshaller m,T object, Result result) throws JAXBException;
-
-
-
- /**
- * Unmarshals the specified type object.
- *
- * @param in
- * the parser must be pointing at a start tag
- * that encloses the XML type that this {@link Bond} is
- * instanciated for.
- *
- * @return
- * never null.
- *
- * @throws JAXBException
- * if there was an error while unmarshalling.
- *
- * @since 2.0 EA1
- */
-// public @NotNull T unmarshal(@NotNull XMLStreamReader in) throws JAXBException ;
- /**
- * @since 2.0.3
- */
- public @NotNull T unmarshal(@NotNull XMLStreamReader in, @Nullable AttachmentUnmarshaller au) throws JAXBException;
-// public @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull XMLStreamReader in) throws JAXBException ;
-// public @NotNull T unmarshal(@NotNull Unmarshaller u, @NotNull XMLStreamReader in) throws JAXBException;
-
- /**
- * Unmarshals the specified type object.
- *
- * @param in
- * the parser must be pointing at a start tag
- * that encloses the XML type that this {@link Bond} is
- * instanciated for.
- *
- * @return
- * never null.
- *
- * @throws JAXBException
- * if there was an error while unmarshalling.
- *
- * @since 2.0 EA1
- */
-// public @NotNull T unmarshal(@NotNull Source in) throws JAXBException ;
- /**
- * @since 2.0.3
- */
- public @NotNull T unmarshal(@NotNull Source in, @Nullable AttachmentUnmarshaller au) throws JAXBException;
-// public @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull Source in) throws JAXBException;
-// public @NotNull T unmarshal(@NotNull Unmarshaller u, @NotNull Source in) throws JAXBException;
-
- /**
- * Unmarshals the specified type object.
- *
- * @param in
- * the parser must be pointing at a start tag
- * that encloses the XML type that this {@link XMLBridge} is
- * instanciated for.
- *
- * @return
- * never null.
- *
- * @throws JAXBException
- * if there was an error while unmarshalling.
- *
- * @since 2.0 EA1
- */
- public @NotNull T unmarshal(@NotNull InputStream in) throws JAXBException ;
-
-// public @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull InputStream in) throws JAXBException ;
-
-// public @NotNull T unmarshal(@NotNull Unmarshaller u, @NotNull InputStream in) throws JAXBException;
-
- /**
- * Unmarshals the specified type object.
- *
- * @param n
- * Node to be unmarshalled.
- *
- * @return
- * never null.
- *
- * @throws JAXBException
- * if there was an error while unmarshalling.
- *
- * @since 2.0 FCS
- */
-// public @NotNull T unmarshal(@NotNull Node n) throws JAXBException ;
- /**
- * @since 2.0.3
- */
- public @NotNull T unmarshal(@NotNull Node n, @Nullable AttachmentUnmarshaller au) throws JAXBException;
-// public @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull Node n) throws JAXBException;
-// public @NotNull T unmarshal(@NotNull Unmarshaller context, @NotNull Node n) throws JAXBException;
-
- /**
- * Gets the {@link TypeInfo} from which this bridge was created.
- */
- public TypeInfo getTypeInfo();
-
- /**
- * This can be used to determine whether XMLStreamWriter or OutputStream is
- * prefered by the implementation.
- *
- * @return true if marshall to OutputStream is supported in the
- * implementation.
- */
- public boolean supportOutputStream();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/Attributes.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/Attributes.java
deleted file mode 100644
index fddf4648..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/Attributes.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.streaming;
-
-import javax.xml.namespace.QName;
-
-/**
- * <p> The Attributes interface is essentially a version of the
- * org.xml.sax.Attributes interface modified to use the JAX-WS QName class.</p>
- *
- * <p> Although namespace declarations can appear in the attribute list, the
- * actual values of the local name and URI properties are
- * implementation-specific. </p>
- *
- * <p> Applications that need to iterate through all the attributes can use the
- * {@link #isNamespaceDeclaration} method to identify namespace declarations
- * and skip them. </p>
- *
- * <p> Also, the URI property of an attribute will never be null. The value
- * "" (empty string) is used for the URI of non-qualified attributes. </p>
- *
- * @author WS Development Team
- */
-public interface Attributes {
-
- /**
- * Return the number of attributes in the list.
- *
- */
- public int getLength();
-
- /**
- * Return true if the attribute at the given index is a namespace
- * declaration.
- *
- * <p> Implementations are encouraged to optimize this method by taking into
- * account their internal representations of attributes. </p>
- *
- */
- public boolean isNamespaceDeclaration(int index);
-
- /**
- * Look up an attribute's QName by index.
- *
- */
- public QName getName(int index);
-
- /**
- * Look up an attribute's URI by index.
- *
- */
- public String getURI(int index);
-
- /**
- * Look up an attribute's local name by index.
- * If attribute is a namespace declaration, result
- * is expected including "xmlns:".
- */
- public String getLocalName(int index);
-
- /**
- * Look up an attribute's prefix by index.
- *
- */
- public String getPrefix(int index);
-
- /**
- * Look up an attribute's value by index.
- *
- */
- public String getValue(int index);
-
- /**
- * Look up the index of an attribute by QName.
- *
- */
- public int getIndex(QName name);
-
- /**
- * Look up the index of an attribute by URI and local name.
- *
- */
- public int getIndex(String uri, String localName);
-
- /**
- * Look up the index of an attribute by local name.
- *
- */
- public int getIndex(String localName);
-
- /**
- * Look up the value of an attribute by QName.
- *
- */
- public String getValue(QName name);
-
- /**
- * Look up the value of an attribute by URI and local name.
- *
- */
- public String getValue(String uri, String localName);
-
- /**
- * Look up the value of an attribute by local name.
- *
- */
- public String getValue(String localName);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/DOMStreamReader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/DOMStreamReader.java
deleted file mode 100644
index 79f5ad7f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/DOMStreamReader.java
+++ /dev/null
@@ -1,904 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.streaming;
-
-import com.sun.istack.internal.FinalArrayList;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.XMLStreamException2;
-import com.sun.xml.internal.ws.util.xml.DummyLocation;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import static org.w3c.dom.Node.*;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.ProcessingInstruction;
-import org.w3c.dom.Text;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import java.util.Collections;
-import java.util.Iterator;
-
-/**
- * Create an {@link XMLStreamReader} on top of a DOM tree.
- *
- * <p>
- * Since various libraries as well as users often create "incorrect" DOM node,
- * this class spends a lot of efforts making sure that broken DOM trees are
- * nevertheless interpreted correctly.
- *
- * <p>
- * For example, if a DOM level
- * 1 tree is passed, each method will attempt to return the correct value
- * by using {@link Node#getNodeName()}.
- *
- * <p>
- * Similarly, if DOM is missing explicit namespace declarations,
- * this class attempts to emulate necessary declarations.
- *
- *
- * @author Santiago.PericasGeertsen@sun.com
- * @author Kohsuke Kawaguchi
- */
-public class DOMStreamReader implements XMLStreamReader, NamespaceContext {
-
- /**
- * Current DOM node being traversed.
- */
- protected Node _current;
-
- /**
- * Starting node of the subtree being traversed.
- */
- private Node _start;
-
- /**
- * Named mapping for attributes and NS decls for the current node.
- */
- private NamedNodeMap _namedNodeMap;
-
- /**
- * If the reader points at {@link #CHARACTERS the text node},
- * its whole value.
- *
- * <p>
- * This is simply a cache of {@link Text#getWholeText()} of {@link #_current},
- * but when a large binary data sent as base64 text, this could get very much
- * non-trivial.
- */
- protected String wholeText;
-
- /**
- * List of attributes extracted from <code>_namedNodeMap</code>.
- */
- private final FinalArrayList<Attr> _currentAttributes = new FinalArrayList<Attr>();
-
- /**
- * {@link Scope} buffer.
- */
- protected Scope[] scopes = new Scope[8];
-
- /**
- * Depth of the current element. The first element gets depth==0.
- * Also used as the index to {@link #scopes}.
- */
- protected int depth = 0;
-
- /**
- * State of this reader. Any of the valid states defined in StAX'
- * XMLStreamConstants class.
- */
- protected int _state;
-
- /**
- * Namespace declarations on one element.
- *
- * Instances are reused.
- */
- protected static final class Scope {
- /**
- * Scope for the parent element.
- */
- final Scope parent;
-
- /**
- * List of namespace declarations extracted from <code>_namedNodeMap</code>
- */
- final FinalArrayList<Attr> currentNamespaces = new FinalArrayList<Attr>();
-
- /**
- * Additional namespace declarations obtained as a result of "fixing" DOM tree,
- * which were not part of the original DOM tree.
- *
- * One entry occupies two spaces (prefix followed by URI.)
- */
- final FinalArrayList<String> additionalNamespaces = new FinalArrayList<String>();
-
- Scope(Scope parent) {
- this.parent = parent;
- }
-
- void reset() {
- currentNamespaces.clear();
- additionalNamespaces.clear();
- }
-
- int getNamespaceCount() {
- return currentNamespaces.size()+additionalNamespaces.size()/2;
- }
-
- String getNamespacePrefix(int index) {
- int sz = currentNamespaces.size();
- if(index< sz) {
- Attr attr = currentNamespaces.get(index);
- String result = attr.getLocalName();
- if (result == null) {
- result = QName.valueOf(attr.getNodeName()).getLocalPart();
- }
- return result.equals("xmlns") ? null : result;
- } else {
- return additionalNamespaces.get((index-sz)*2);
- }
- }
-
- String getNamespaceURI(int index) {
- int sz = currentNamespaces.size();
- if(index< sz) {
- return currentNamespaces.get(index).getValue();
- } else {
- return additionalNamespaces.get((index-sz)*2+1);
- }
- }
-
- /**
- * Returns the prefix bound to the given URI, or null.
- * This method recurses to the parent.
- */
- String getPrefix(String nsUri) {
- for( Scope sp=this; sp!=null; sp=sp.parent ) {
- for( int i=sp.currentNamespaces.size()-1; i>=0; i--) {
- String result = getPrefixForAttr(sp.currentNamespaces.get(i),nsUri);
- if(result!=null)
- return result;
- }
- for( int i=sp.additionalNamespaces.size()-2; i>=0; i-=2 )
- if(sp.additionalNamespaces.get(i+1).equals(nsUri))
- return sp.additionalNamespaces.get(i);
- }
- return null;
- }
-
- /**
- * Returns the namespace URI bound by the given prefix.
- *
- * @param prefix
- * Prefix to look up.
- */
- String getNamespaceURI(@NotNull String prefix) {
- String nsDeclName = prefix.length()==0 ? "xmlns" : "xmlns:"+prefix;
-
- for( Scope sp=this; sp!=null; sp=sp.parent ) {
- for( int i=sp.currentNamespaces.size()-1; i>=0; i--) {
- Attr a = sp.currentNamespaces.get(i);
- if(a.getNodeName().equals(nsDeclName))
- return a.getValue();
- }
- for( int i=sp.additionalNamespaces.size()-2; i>=0; i-=2 )
- if(sp.additionalNamespaces.get(i).equals(prefix))
- return sp.additionalNamespaces.get(i+1);
- }
- return null;
- }
- }
-
-
- public DOMStreamReader() {
- }
-
- public DOMStreamReader(Node node) {
- setCurrentNode(node);
- }
-
- public void setCurrentNode(Node node) {
- scopes[0] = new Scope(null);
- depth=0;
-
- _start = _current = node;
- _state = START_DOCUMENT;
- // verifyDOMIntegrity(node);
- // displayDOM(node, System.out);
- }
-
- public void close() throws XMLStreamException {
- }
-
- /**
- * Called when the current node is {@link Element} to look at attribute list
- * (which contains both ns decl and attributes in DOM) and split them
- * to attributes-proper and namespace decls.
- */
- protected void splitAttributes() {
- // Clear attribute and namespace lists
- _currentAttributes.clear();
-
- Scope scope = allocateScope();
-
- _namedNodeMap = _current.getAttributes();
- if (_namedNodeMap != null) {
- final int n = _namedNodeMap.getLength();
- for (int i = 0; i < n; i++) {
- final Attr attr = (Attr) _namedNodeMap.item(i);
- final String attrName = attr.getNodeName();
- if (attrName.startsWith("xmlns:") || attrName.equals("xmlns")) { // NS decl?
- scope.currentNamespaces.add(attr);
- }
- else {
- _currentAttributes.add(attr);
- }
- }
- }
-
- // verify that all the namespaces used in element and attributes are indeed available
- ensureNs(_current);
- for( int i=_currentAttributes.size()-1; i>=0; i-- ) {
- Attr a = _currentAttributes.get(i);
- if(fixNull(a.getNamespaceURI()).length()>0)
- ensureNs(a); // no need to declare "" for attributes in the default namespace
- }
- }
-
- /**
- * Sub-routine of {@link #splitAttributes()}.
- *
- * <p>
- * Makes sure that the namespace URI/prefix used in the given node is available,
- * and if not, declare it on the current scope to "fix" it.
- *
- * It's often common to create DOM trees without putting namespace declarations,
- * and this makes sure that such DOM tree will be properly marshalled.
- */
- private void ensureNs(Node n) {
- String prefix = fixNull(n.getPrefix());
- String uri = fixNull(n.getNamespaceURI());
-
- Scope scope = scopes[depth];
-
- String currentUri = scope.getNamespaceURI(prefix);
-
- if(prefix.length()==0) {
- currentUri = fixNull(currentUri);
- if(currentUri.equals(uri))
- return; // declared correctly
- } else {
- if(currentUri!=null && currentUri.equals(uri))
- return; // declared correctly
- }
-
- if(prefix.equals("xml") || prefix.equals("xmlns"))
- return; // implicitly declared namespaces
-
- // needs to be declared
- scope.additionalNamespaces.add(prefix);
- scope.additionalNamespaces.add(uri);
- }
-
- /**
- * Allocate new {@link Scope} for {@link #splitAttributes()}.
- */
- private Scope allocateScope() {
- if(scopes.length==++depth) {
- Scope[] newBuf = new Scope[scopes.length*2];
- System.arraycopy(scopes,0,newBuf,0,scopes.length);
- scopes = newBuf;
- }
- Scope scope = scopes[depth];
- if(scope==null) {
- scope = scopes[depth] = new Scope(scopes[depth-1]);
- } else {
- scope.reset();
- }
- return scope;
- }
-
- public int getAttributeCount() {
- if (_state == START_ELEMENT)
- return _currentAttributes.size();
- throw new IllegalStateException("DOMStreamReader: getAttributeCount() called in illegal state");
- }
-
- /**
- * Return an attribute's local name. Handle the case of DOM level 1 nodes.
- */
- public String getAttributeLocalName(int index) {
- if (_state == START_ELEMENT) {
- String localName = _currentAttributes.get(index).getLocalName();
- return (localName != null) ? localName :
- QName.valueOf(_currentAttributes.get(index).getNodeName()).getLocalPart();
- }
- throw new IllegalStateException("DOMStreamReader: getAttributeLocalName() called in illegal state");
- }
-
- /**
- * Return an attribute's qname. Handle the case of DOM level 1 nodes.
- */
- public QName getAttributeName(int index) {
- if (_state == START_ELEMENT) {
- Node attr = _currentAttributes.get(index);
- String localName = attr.getLocalName();
- if (localName != null) {
- String prefix = attr.getPrefix();
- String uri = attr.getNamespaceURI();
- return new QName(fixNull(uri), localName, fixNull(prefix));
- }
- else {
- return QName.valueOf(attr.getNodeName());
- }
- }
- throw new IllegalStateException("DOMStreamReader: getAttributeName() called in illegal state");
- }
-
- public String getAttributeNamespace(int index) {
- if (_state == START_ELEMENT) {
- String uri = _currentAttributes.get(index).getNamespaceURI();
- return fixNull(uri);
- }
- throw new IllegalStateException("DOMStreamReader: getAttributeNamespace() called in illegal state");
- }
-
- public String getAttributePrefix(int index) {
- if (_state == START_ELEMENT) {
- String prefix = _currentAttributes.get(index).getPrefix();
- return fixNull(prefix);
- }
- throw new IllegalStateException("DOMStreamReader: getAttributePrefix() called in illegal state");
- }
-
- public String getAttributeType(int index) {
- if (_state == START_ELEMENT) {
- return "CDATA";
- }
- throw new IllegalStateException("DOMStreamReader: getAttributeType() called in illegal state");
- }
-
- public String getAttributeValue(int index) {
- if (_state == START_ELEMENT) {
- return _currentAttributes.get(index).getNodeValue();
- }
- throw new IllegalStateException("DOMStreamReader: getAttributeValue() called in illegal state");
- }
-
- public String getAttributeValue(String namespaceURI, String localName) {
- if (_state == START_ELEMENT) {
- if (_namedNodeMap != null) {
- Node attr = _namedNodeMap.getNamedItemNS(namespaceURI, localName);
- return attr != null ? attr.getNodeValue() : null;
- }
- return null;
- }
- throw new IllegalStateException("DOMStreamReader: getAttributeValue() called in illegal state");
- }
-
- public String getCharacterEncodingScheme() {
- return null;
- }
-
- public String getElementText() throws javax.xml.stream.XMLStreamException {
- throw new RuntimeException("DOMStreamReader: getElementText() not implemented");
- }
-
- public String getEncoding() {
- return null;
- }
-
- public int getEventType() {
- return _state;
- }
-
- /**
- * Return an element's local name. Handle the case of DOM level 1 nodes.
- */
- public String getLocalName() {
- if (_state == START_ELEMENT || _state == END_ELEMENT) {
- String localName = _current.getLocalName();
- return localName != null ? localName :
- QName.valueOf(_current.getNodeName()).getLocalPart();
- }
- else if (_state == ENTITY_REFERENCE) {
- return _current.getNodeName();
- }
- throw new IllegalStateException("DOMStreamReader: getAttributeValue() called in illegal state");
- }
-
- public Location getLocation() {
- return DummyLocation.INSTANCE;
- }
-
- /**
- * Return an element's qname. Handle the case of DOM level 1 nodes.
- */
- public javax.xml.namespace.QName getName() {
- if (_state == START_ELEMENT || _state == END_ELEMENT) {
- String localName = _current.getLocalName();
- if (localName != null) {
- String prefix = _current.getPrefix();
- String uri = _current.getNamespaceURI();
- return new QName(fixNull(uri), localName, fixNull(prefix));
- }
- else {
- return QName.valueOf(_current.getNodeName());
- }
- }
- throw new IllegalStateException("DOMStreamReader: getName() called in illegal state");
- }
-
- public NamespaceContext getNamespaceContext() {
- return this;
- }
-
- /**
- * Verifies the current state to see if we can return the scope, and do so
- * if appropriate.
- *
- * Used to implement a bunch of StAX API methods that have the same usage restriction.
- */
- private Scope getCheckedScope() {
- if (_state == START_ELEMENT || _state == END_ELEMENT) {
- return scopes[depth];
- }
- throw new IllegalStateException("DOMStreamReader: neither on START_ELEMENT nor END_ELEMENT");
- }
-
- public int getNamespaceCount() {
- return getCheckedScope().getNamespaceCount();
- }
-
- public String getNamespacePrefix(int index) {
- return getCheckedScope().getNamespacePrefix(index);
- }
-
- public String getNamespaceURI(int index) {
- return getCheckedScope().getNamespaceURI(index);
- }
-
- public String getNamespaceURI() {
- if (_state == START_ELEMENT || _state == END_ELEMENT) {
- String uri = _current.getNamespaceURI();
- return fixNull(uri);
- }
- return null;
- }
-
- /**
- * This method is not particularly fast, but shouldn't be called very
- * often. If we start to use it more, we should keep track of the
- * NS declarations using a NamespaceContext implementation instead.
- */
- public String getNamespaceURI(String prefix) {
- if (prefix == null) {
- throw new IllegalArgumentException("DOMStreamReader: getNamespaceURI(String) call with a null prefix");
- }
- else if (prefix.equals("xml")) {
- return "http://www.w3.org/XML/1998/namespace";
- }
- else if (prefix.equals("xmlns")) {
- return "http://www.w3.org/2000/xmlns/";
- }
-
- // check scopes
- String nsUri = scopes[depth].getNamespaceURI(prefix);
- if(nsUri!=null) return nsUri;
-
- // then ancestors above start node
- Node node = findRootElement();
- String nsDeclName = prefix.length()==0 ? "xmlns" : "xmlns:"+prefix;
- while (node.getNodeType() != DOCUMENT_NODE) {
- // Is ns declaration on this element?
- NamedNodeMap namedNodeMap = node.getAttributes();
- Attr attr = (Attr) namedNodeMap.getNamedItem(nsDeclName);
- if (attr != null)
- return attr.getValue();
- node = node.getParentNode();
- }
- return null;
- }
-
- public String getPrefix(String nsUri) {
- if (nsUri == null) {
- throw new IllegalArgumentException("DOMStreamReader: getPrefix(String) call with a null namespace URI");
- }
- else if (nsUri.equals("http://www.w3.org/XML/1998/namespace")) {
- return "xml";
- }
- else if (nsUri.equals("http://www.w3.org/2000/xmlns/")) {
- return "xmlns";
- }
-
- // check scopes
- String prefix = scopes[depth].getPrefix(nsUri);
- if(prefix!=null) return prefix;
-
- // then ancestors above start node
- Node node = findRootElement();
-
- while (node.getNodeType() != DOCUMENT_NODE) {
- // Is ns declaration on this element?
- NamedNodeMap namedNodeMap = node.getAttributes();
- for( int i=namedNodeMap.getLength()-1; i>=0; i-- ) {
- Attr attr = (Attr)namedNodeMap.item(i);
- prefix = getPrefixForAttr(attr,nsUri);
- if(prefix!=null)
- return prefix;
- }
- node = node.getParentNode();
- }
- return null;
- }
-
- /**
- * Finds the root element node of the traversal.
- */
- private Node findRootElement() {
- int type;
-
- Node node = _start;
- while ((type = node.getNodeType()) != DOCUMENT_NODE
- && type != ELEMENT_NODE) {
- node = node.getParentNode();
- }
- return node;
- }
-
- /**
- * If the given attribute is a namespace declaration for the given namespace URI,
- * return its prefix. Otherwise null.
- */
- private static String getPrefixForAttr(Attr attr, String nsUri) {
- String attrName = attr.getNodeName();
- if (!attrName.startsWith("xmlns:") && !attrName.equals("xmlns"))
- return null; // not nsdecl
-
- if(attr.getValue().equals(nsUri)) {
- if(attrName.equals("xmlns"))
- return "";
- String localName = attr.getLocalName();
- return (localName != null) ? localName :
- QName.valueOf(attrName).getLocalPart();
- }
-
- return null;
- }
-
- public Iterator getPrefixes(String nsUri) {
- // This is an incorrect implementation,
- // but AFAIK it's not used in the JAX-WS runtime
- String prefix = getPrefix(nsUri);
- if(prefix==null) return Collections.emptyList().iterator();
- else return Collections.singletonList(prefix).iterator();
- }
-
- public String getPIData() {
- if (_state == PROCESSING_INSTRUCTION) {
- return ((ProcessingInstruction) _current).getData();
- }
- return null;
- }
-
- public String getPITarget() {
- if (_state == PROCESSING_INSTRUCTION) {
- return ((ProcessingInstruction) _current).getTarget();
- }
- return null;
- }
-
- public String getPrefix() {
- if (_state == START_ELEMENT || _state == END_ELEMENT) {
- String prefix = _current.getPrefix();
- return fixNull(prefix);
- }
- return null;
- }
-
- public Object getProperty(String str) throws IllegalArgumentException {
- return null;
- }
-
- public String getText() {
- if (_state == CHARACTERS)
- return wholeText;
- if(_state == CDATA || _state == COMMENT || _state == ENTITY_REFERENCE)
- return _current.getNodeValue();
- throw new IllegalStateException("DOMStreamReader: getTextLength() called in illegal state");
- }
-
- public char[] getTextCharacters() {
- return getText().toCharArray();
- }
-
- public int getTextCharacters(int sourceStart, char[] target, int targetStart,
- int targetLength) throws XMLStreamException {
- String text = getText();
- int copiedSize = Math.min(targetLength, text.length() - sourceStart);
- text.getChars(sourceStart, sourceStart + copiedSize, target, targetStart);
-
- return copiedSize;
- }
-
- public int getTextLength() {
- return getText().length();
- }
-
- public int getTextStart() {
- if (_state == CHARACTERS || _state == CDATA || _state == COMMENT || _state == ENTITY_REFERENCE) {
- return 0;
- }
- throw new IllegalStateException("DOMStreamReader: getTextStart() called in illegal state");
- }
-
- public String getVersion() {
- return null;
- }
-
- public boolean hasName() {
- return (_state == START_ELEMENT || _state == END_ELEMENT);
- }
-
- public boolean hasNext() throws javax.xml.stream.XMLStreamException {
- return (_state != END_DOCUMENT);
- }
-
- public boolean hasText() {
- if (_state == CHARACTERS || _state == CDATA || _state == COMMENT || _state == ENTITY_REFERENCE) {
- return getText().trim().length() > 0;
- }
- return false;
- }
-
- public boolean isAttributeSpecified(int param) {
- return false;
- }
-
- public boolean isCharacters() {
- return (_state == CHARACTERS);
- }
-
- public boolean isEndElement() {
- return (_state == END_ELEMENT);
- }
-
- public boolean isStandalone() {
- return true;
- }
-
- public boolean isStartElement() {
- return (_state == START_ELEMENT);
- }
-
- public boolean isWhiteSpace() {
- if (_state == CHARACTERS || _state == CDATA)
- return getText().trim().length()==0;
- return false;
- }
-
- private static int mapNodeTypeToState(int nodetype) {
- switch (nodetype) {
- case CDATA_SECTION_NODE:
- return CDATA;
- case COMMENT_NODE:
- return COMMENT;
- case ELEMENT_NODE:
- return START_ELEMENT;
- case ENTITY_NODE:
- return ENTITY_DECLARATION;
- case ENTITY_REFERENCE_NODE:
- return ENTITY_REFERENCE;
- case NOTATION_NODE:
- return NOTATION_DECLARATION;
- case PROCESSING_INSTRUCTION_NODE:
- return PROCESSING_INSTRUCTION;
- case TEXT_NODE:
- return CHARACTERS;
- default:
- throw new RuntimeException("DOMStreamReader: Unexpected node type");
- }
- }
-
- public int next() throws XMLStreamException {
- while(true) {
- int r = _next();
- switch (r) {
- case CHARACTERS:
- // if we are currently at text node, make sure that this is a meaningful text node.
- Node prev = _current.getPreviousSibling();
- if(prev!=null && prev.getNodeType()==Node.TEXT_NODE)
- continue; // nope. this is just a continuation of previous text that should be invisible
-
- Text t = (Text)_current;
- wholeText = t.getWholeText();
- if(wholeText.length()==0)
- continue; // nope. this is empty text.
- return CHARACTERS;
- case START_ELEMENT:
- splitAttributes();
- return START_ELEMENT;
- default:
- return r;
- }
- }
- }
-
- protected int _next() throws XMLStreamException {
- Node child;
-
- switch (_state) {
- case END_DOCUMENT:
- throw new IllegalStateException("DOMStreamReader: Calling next() at END_DOCUMENT");
- case START_DOCUMENT:
- // Don't skip document element if this is a fragment
- if (_current.getNodeType() == ELEMENT_NODE) {
- return (_state = START_ELEMENT);
- }
-
- child = _current.getFirstChild();
- if (child == null) {
- return (_state = END_DOCUMENT);
- }
- else {
- _current = child;
- return (_state = mapNodeTypeToState(_current.getNodeType()));
- }
- case START_ELEMENT:
- child = _current.getFirstChild();
- if (child == null) {
- return (_state = END_ELEMENT);
- }
- else {
- _current = child;
- return (_state = mapNodeTypeToState(_current.getNodeType()));
- }
- case END_ELEMENT:
- depth--;
- // fall through next
- case CHARACTERS:
- case COMMENT:
- case CDATA:
- case ENTITY_REFERENCE:
- case PROCESSING_INSTRUCTION:
- // If at the end of this fragment, then terminate traversal
- if (_current == _start) {
- return (_state = END_DOCUMENT);
- }
-
- Node sibling = _current.getNextSibling();
- if (sibling == null) {
- _current = _current.getParentNode();
- // getParentNode() returns null for fragments
- _state = (_current == null || _current.getNodeType() == DOCUMENT_NODE) ?
- END_DOCUMENT : END_ELEMENT;
- return _state;
- }
- else {
- _current = sibling;
- return (_state = mapNodeTypeToState(_current.getNodeType()));
- }
- case DTD:
- case ATTRIBUTE:
- case NAMESPACE:
- default:
- throw new RuntimeException("DOMStreamReader: Unexpected internal state");
- }
- }
-
- public int nextTag() throws javax.xml.stream.XMLStreamException {
- int eventType = next();
- while (eventType == CHARACTERS && isWhiteSpace()
- || eventType == CDATA && isWhiteSpace()
- || eventType == SPACE
- || eventType == PROCESSING_INSTRUCTION
- || eventType == COMMENT)
- {
- eventType = next();
- }
- if (eventType != START_ELEMENT && eventType != END_ELEMENT) {
- throw new XMLStreamException2("DOMStreamReader: Expected start or end tag");
- }
- return eventType;
- }
-
- public void require(int type, String namespaceURI, String localName)
- throws javax.xml.stream.XMLStreamException
- {
- if (type != _state) {
- throw new XMLStreamException2("DOMStreamReader: Required event type not found");
- }
- if (namespaceURI != null && !namespaceURI.equals(getNamespaceURI())) {
- throw new XMLStreamException2("DOMStreamReader: Required namespaceURI not found");
- }
- if (localName != null && !localName.equals(getLocalName())) {
- throw new XMLStreamException2("DOMStreamReader: Required localName not found");
- }
- }
-
- public boolean standaloneSet() {
- return true;
- }
-
-
-
- // -- Debugging ------------------------------------------------------
-
- private static void displayDOM(Node node, java.io.OutputStream ostream) {
- try {
- System.out.println("\n====\n");
- XmlUtil.newTransformer().transform(
- new DOMSource(node), new StreamResult(ostream));
- System.out.println("\n====\n");
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- private static void verifyDOMIntegrity(Node node) {
- switch (node.getNodeType()) {
- case ELEMENT_NODE:
- case ATTRIBUTE_NODE:
-
- // DOM level 1?
- if (node.getLocalName() == null) {
- System.out.println("WARNING: DOM level 1 node found");
- System.out.println(" -> node.getNodeName() = " + node.getNodeName());
- System.out.println(" -> node.getNamespaceURI() = " + node.getNamespaceURI());
- System.out.println(" -> node.getLocalName() = " + node.getLocalName());
- System.out.println(" -> node.getPrefix() = " + node.getPrefix());
- }
-
- if (node.getNodeType() == ATTRIBUTE_NODE) return;
-
- NamedNodeMap attrs = node.getAttributes();
- for (int i = 0; i < attrs.getLength(); i++) {
- verifyDOMIntegrity(attrs.item(i));
- }
- case DOCUMENT_NODE:
- NodeList children = node.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- verifyDOMIntegrity(children.item(i));
- }
- }
- }
-
-
- private static String fixNull(String s) {
- if(s==null) return "";
- else return s;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/MtomStreamWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/MtomStreamWriter.java
deleted file mode 100644
index 7625d9ae..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/MtomStreamWriter.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.streaming;
-
-import com.sun.xml.internal.ws.message.jaxb.JAXBMessage;
-import com.sun.xml.internal.ws.encoding.MtomCodec;
-
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * A {@link XMLStreamWriter} that used for MTOM encoding may provide its own
- * {@link AttachmentMarshaller}. The marshaller could do processing based on
- * MTOM threshold, and make decisions about inlining the attachment data or not.
- *
- * @author Jitendra Kotamraju
- * @see JAXBMessage
- * @see MtomCodec
- */
-public interface MtomStreamWriter {
- AttachmentMarshaller getAttachmentMarshaller();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactory.java
deleted file mode 100644
index 8b565e85..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.streaming;
-
-/**
- * <p> Interface for prefix factories. </p>
- *
- * <p> A prefix factory is able to create a new prefix for a URI that
- * was encountered for the first time when writing a document
- * using an XMLWriter. </p>
- *
- * @author WS Development Team
- */
-public interface PrefixFactory {
- /**
- * Return a brand new prefix for the given URI.
- */
- public String getPrefix(String uri);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactoryImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactoryImpl.java
deleted file mode 100644
index 5c4e387a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactoryImpl.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.streaming;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * <p> A prefix factory that caches the prefixes it creates. </p>
- *
- * @author WS Development Team
- */
-public class PrefixFactoryImpl implements PrefixFactory {
-
- public PrefixFactoryImpl(String base) {
- _base = base;
- _next = 1;
- }
-
- public String getPrefix(String uri) {
- String prefix = null;
-
- if (_cachedUriToPrefixMap == null) {
- _cachedUriToPrefixMap = new HashMap();
- } else {
- prefix = (String) _cachedUriToPrefixMap.get(uri);
- }
-
- if (prefix == null) {
- prefix = _base + Integer.toString(_next++);
- _cachedUriToPrefixMap.put(uri, prefix);
- }
-
- return prefix;
- }
-
- private String _base;
- private int _next;
- private Map _cachedUriToPrefixMap;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/SourceReaderFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/SourceReaderFactory.java
deleted file mode 100644
index 5dfdd848..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/SourceReaderFactory.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.streaming;
-
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.util.FastInfosetUtil;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.stream.StreamSource;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.lang.reflect.Method;
-import java.net.URL;
-
-/**
- * @author Santiago.PericasGeertsen@sun.com
- */
-public class SourceReaderFactory {
-
- /**
- * FI FastInfosetSource class.
- */
- static Class fastInfosetSourceClass;
-
- /**
- * FI <code>StAXDocumentSerializer.setEncoding()</code> method via reflection.
- */
- static Method fastInfosetSource_getInputStream;
-
- static {
- // Use reflection to avoid static dependency with FI jar
- try {
- fastInfosetSourceClass =
- Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSource");
- fastInfosetSource_getInputStream =
- fastInfosetSourceClass.getMethod("getInputStream");
- }
- catch (Exception e) {
- fastInfosetSourceClass = null;
- }
- }
-
- public static XMLStreamReader createSourceReader(Source source, boolean rejectDTDs) {
- return createSourceReader(source, rejectDTDs, null);
- }
-
- public static XMLStreamReader createSourceReader(Source source, boolean rejectDTDs, String charsetName) {
- try {
- if (source instanceof StreamSource) {
- StreamSource streamSource = (StreamSource) source;
- InputStream is = streamSource.getInputStream();
-
- if (is != null) {
- // Wrap input stream in Reader if charset is specified
- if (charsetName != null) {
- return XMLStreamReaderFactory.create(
- source.getSystemId(), new InputStreamReader(is, charsetName), rejectDTDs);
- }
- else {
- return XMLStreamReaderFactory.create(
- source.getSystemId(), is, rejectDTDs);
- }
- }
- else {
- Reader reader = streamSource.getReader();
- if (reader != null) {
- return XMLStreamReaderFactory.create(
- source.getSystemId(), reader, rejectDTDs);
- }
- else {
- return XMLStreamReaderFactory.create(
- source.getSystemId(), new URL(source.getSystemId()).openStream(), rejectDTDs );
- }
- }
- }
- else if (source.getClass() == fastInfosetSourceClass) {
- return FastInfosetUtil.createFIStreamReader((InputStream)
- fastInfosetSource_getInputStream.invoke(source));
- }
- else if (source instanceof DOMSource) {
- DOMStreamReader dsr = new DOMStreamReader();
- dsr.setCurrentNode(((DOMSource) source).getNode());
- return dsr;
- }
- else if (source instanceof SAXSource) {
- // TODO: need SAX to StAX adapter here -- Use transformer for now
- Transformer tx = XmlUtil.newTransformer();
- DOMResult domResult = new DOMResult();
- tx.transform(source, domResult);
- return createSourceReader(
- new DOMSource(domResult.getNode()),
- rejectDTDs);
- }
- else {
- throw new XMLReaderException("sourceReader.invalidSource",
- source.getClass().getName());
- }
- }
- catch (Exception e) {
- throw new XMLReaderException(e);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/TidyXMLStreamReader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/TidyXMLStreamReader.java
deleted file mode 100644
index 4e36ea81..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/TidyXMLStreamReader.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.streaming;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.util.xml.XMLStreamReaderFilter;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.WebServiceException;
-import java.io.Closeable;
-import java.io.IOException;
-
-/**
- * Wrapper over XMLStreamReader. It will be used primarily to
- * clean up the resources such as closure on InputStream/Reader.
- *
- * @author Vivek Pandey
- */
-public class TidyXMLStreamReader extends XMLStreamReaderFilter {
- private final Closeable closeableSource;
-
- public TidyXMLStreamReader(@NotNull XMLStreamReader reader, @Nullable Closeable closeableSource) {
- super(reader);
- this.closeableSource = closeableSource;
- }
-
- public void close() throws XMLStreamException {
- super.close();
- try {
- if(closeableSource != null)
- closeableSource.close();
- } catch (IOException e) {
- throw new WebServiceException(e);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLReaderException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLReaderException.java
deleted file mode 100644
index 1340d83d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLReaderException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.streaming;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-/**
- * <p> XMLReaderException represents an exception that occurred while reading an
- * XML document. </p>
- *
- * @see JAXWSExceptionBase
- *
- * @author WS Development Team
- */
-public class XMLReaderException extends JAXWSExceptionBase {
-
- public XMLReaderException(String key, Object... args) {
- super(key, args);
- }
-
- public XMLReaderException(Throwable throwable) {
- super(throwable);
- }
-
- public XMLReaderException(Localizable arg) {
- super("xmlreader.nestedError", arg);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.streaming";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderException.java
deleted file mode 100644
index 51aaa502..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.streaming;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-/**
- * <p> XMLStream ReaderException represents an exception that occurred while reading an
- * XML document. </p>
- *
- * @see JAXWSExceptionBase
- *
- * @author WS Development Team
- */
-public class XMLStreamReaderException extends JAXWSExceptionBase {
-
- public XMLStreamReaderException(String key, Object... args) {
- super(key, args);
- }
-
- public XMLStreamReaderException(Throwable throwable) {
- super(throwable);
- }
-
- public XMLStreamReaderException(Localizable arg) {
- super("xmlreader.nestedError", arg);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.streaming";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderUtil.java
deleted file mode 100644
index 95a85be3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderUtil.java
+++ /dev/null
@@ -1,507 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.streaming;
-
-import javax.xml.namespace.QName;
-import static javax.xml.stream.XMLStreamConstants.*;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamConstants;
-
-/**
- * <p> XMLStreamReaderUtil provides some utility methods intended to be used
- * in conjunction with a StAX XMLStreamReader. </p>
- *
- * @author WS Development Team
- */
-public class XMLStreamReaderUtil {
-
- private XMLStreamReaderUtil() {
- }
-
- public static void close(XMLStreamReader reader) {
- try {
- reader.close();
- } catch (XMLStreamException e) {
- throw wrapException(e);
- }
- }
-
- public static void readRest(XMLStreamReader reader) {
- try {
- while(reader.getEventType() != XMLStreamConstants.END_DOCUMENT) {
- reader.next();
- }
- } catch (XMLStreamException e) {
- throw wrapException(e);
- }
- }
-
- public static int next(XMLStreamReader reader) {
- try {
- int readerEvent = reader.next();
-
- while (readerEvent != END_DOCUMENT) {
- switch (readerEvent) {
- case START_ELEMENT:
- case END_ELEMENT:
- case CDATA:
- case CHARACTERS:
- case PROCESSING_INSTRUCTION:
- return readerEvent;
- default:
- // falls through ignoring event
- }
- readerEvent = reader.next();
- }
-
- return readerEvent;
- }
- catch (XMLStreamException e) {
- throw wrapException(e);
- }
- }
-
- public static int nextElementContent(XMLStreamReader reader) {
- int state = nextContent(reader);
- if (state == CHARACTERS) {
- throw new XMLStreamReaderException(
- "xmlreader.unexpectedCharacterContent", reader.getText());
- }
- return state;
- }
-
- public static void toNextTag(XMLStreamReader reader, QName name) {
- // skip any whitespace
- if (reader.getEventType() != XMLStreamConstants.START_ELEMENT &&
- reader.getEventType() != XMLStreamConstants.END_ELEMENT) {
- XMLStreamReaderUtil.nextElementContent(reader);
- }
- if(reader.getEventType() == XMLStreamConstants.END_ELEMENT && name.equals(reader.getName())) {
- XMLStreamReaderUtil.nextElementContent(reader);
- }
- }
-
- /**
- * Moves next and read spaces from the reader as long as to the next element.
- * Comments are ignored
- * @param reader
- * @return
- */
- public static String nextWhiteSpaceContent(XMLStreamReader reader) {
- next(reader);
- return currentWhiteSpaceContent(reader);
- }
-
- /**
- * Read spaces from the reader as long as to the next element, starting from
- * current position. Comments are ignored.
- * @param reader
- * @return
- */
- public static String currentWhiteSpaceContent(XMLStreamReader reader) {
-
- // since the there might be several valid chunks (spaces/comment/spaces)
- // StringBuilder must be used; it's initialized lazily, only when needed
- StringBuilder whiteSpaces = null;
-
- for (;;) {
- switch (reader.getEventType()) {
- case START_ELEMENT:
- case END_ELEMENT:
- case END_DOCUMENT:
- return whiteSpaces == null ? null : whiteSpaces.toString();
- case CHARACTERS:
- if (reader.isWhiteSpace()) {
- if (whiteSpaces == null) {
- whiteSpaces = new StringBuilder();
- }
- whiteSpaces.append(reader.getText());
- } else {
- throw new XMLStreamReaderException(
- "xmlreader.unexpectedCharacterContent", reader.getText());
- }
- }
- next(reader);
- }
- }
-
- public static int nextContent(XMLStreamReader reader) {
- for (;;) {
- int state = next(reader);
- switch (state) {
- case START_ELEMENT:
- case END_ELEMENT:
- case END_DOCUMENT:
- return state;
- case CHARACTERS:
- if (!reader.isWhiteSpace()) {
- return CHARACTERS;
- }
- }
- }
- }
-
- /**
- * Skip current element, leaving the cursor at END_ELEMENT of
- * current element.
- */
- public static void skipElement(XMLStreamReader reader) {
- assert reader.getEventType() == START_ELEMENT;
- skipTags(reader, true);
- assert reader.getEventType() == END_ELEMENT;
- }
-
- /**
- * Skip following siblings, leaving cursor at END_ELEMENT of
- * parent element.
- */
- public static void skipSiblings(XMLStreamReader reader, QName parent) {
- skipTags(reader, reader.getName().equals(parent));
- assert reader.getEventType() == END_ELEMENT;
- }
-
- private static void skipTags(XMLStreamReader reader, boolean exitCondition) {
- try {
- int state, tags = 0;
- while ((state = reader.next()) != END_DOCUMENT) {
- if (state == START_ELEMENT) {
- tags++;
- }
- else if (state == END_ELEMENT) {
- if (tags == 0 && exitCondition) return;
- tags--;
- }
- }
- }
- catch (XMLStreamException e) {
- throw wrapException(e);
- }
- }
-
- /*
- * Get the text of an element
- */
- public static String getElementText(XMLStreamReader reader) {
- try {
- return reader.getElementText();
- } catch (XMLStreamException e) {
- throw wrapException(e);
- }
- }
-
- /*
- * Get a QName with 'someUri' and 'localname' from an
- * element of qname type:
- * <xyz xmlns:ns1="someUri">ns1:localname</xyz>
- */
- public static QName getElementQName(XMLStreamReader reader) {
- try {
- String text = reader.getElementText().trim();
- String prefix = text.substring(0,text.indexOf(':'));
- String namespaceURI = reader.getNamespaceContext().getNamespaceURI(prefix);
- if (namespaceURI == null) {
- namespaceURI = "";
- }
- String localPart = text.substring(
- text.indexOf(':') + 1, text.length());
- return new QName(namespaceURI, localPart);
- } catch (XMLStreamException e) {
- throw wrapException(e);
- }
- }
-
- /**
- * Read all attributes into an data structure. Note that this method cannot
- * be called multiple times to get the same list of attributes.
- */
- public static Attributes getAttributes(XMLStreamReader reader) {
- return (reader.getEventType() == START_ELEMENT ||
- reader.getEventType() == ATTRIBUTE) ?
- new AttributesImpl(reader) : null;
- }
-
- public static void verifyReaderState(XMLStreamReader reader, int expectedState) {
- int state = reader.getEventType();
- if (state != expectedState) {
- throw new XMLStreamReaderException(
- "xmlreader.unexpectedState",
- getStateName(expectedState), getStateName(state));
- }
- }
-
- public static void verifyTag(XMLStreamReader reader, String namespaceURI, String localName) {
- if (!localName.equals(reader.getLocalName()) || !namespaceURI.equals(reader.getNamespaceURI())) {
- throw new XMLStreamReaderException(
- "xmlreader.unexpectedState.tag",
- "{" + namespaceURI + "}" + localName,
- "{" + reader.getNamespaceURI() + "}" + reader.getLocalName());
- }
- }
-
- public static void verifyTag(XMLStreamReader reader, QName name) {
- verifyTag(reader, name.getNamespaceURI(), name.getLocalPart());
- }
-
- public static String getStateName(XMLStreamReader reader) {
- return getStateName(reader.getEventType());
- }
-
- public static String getStateName(int state) {
- switch (state) {
- case ATTRIBUTE:
- return "ATTRIBUTE";
- case CDATA:
- return "CDATA";
- case CHARACTERS:
- return "CHARACTERS";
- case COMMENT:
- return "COMMENT";
- case DTD:
- return "DTD";
- case END_DOCUMENT:
- return "END_DOCUMENT";
- case END_ELEMENT:
- return "END_ELEMENT";
- case ENTITY_DECLARATION:
- return "ENTITY_DECLARATION";
- case ENTITY_REFERENCE:
- return "ENTITY_REFERENCE";
- case NAMESPACE:
- return "NAMESPACE";
- case NOTATION_DECLARATION:
- return "NOTATION_DECLARATION";
- case PROCESSING_INSTRUCTION:
- return "PROCESSING_INSTRUCTION";
- case SPACE:
- return "SPACE";
- case START_DOCUMENT:
- return "START_DOCUMENT";
- case START_ELEMENT:
- return "START_ELEMENT";
- default :
- return "UNKNOWN";
- }
- }
-
- private static XMLStreamReaderException wrapException(XMLStreamException e) {
- return new XMLStreamReaderException("xmlreader.ioException",e);
- }
-
- // -- Auxiliary classes ----------------------------------------------
-
- /**
- * AttributesImpl class copied from old StAXReader. This class is used to implement
- * getAttributes() on a StAX Reader.
- */
- public static class AttributesImpl implements Attributes {
-
- static final String XMLNS_NAMESPACE_URI = "http://www.w3.org/2000/xmlns/";
-
- static class AttributeInfo {
-
- private QName name;
- private String value;
-
- public AttributeInfo(QName name, String value) {
- this.name = name;
- if (value == null) {
- // e.g., <return xmlns=""> -- stax returns null
- this.value = "";
- } else {
- this.value = value;
- }
- }
-
- QName getName() {
- return name;
- }
-
- String getValue() {
- return value;
- }
-
- /*
- * Return "xmlns:" as part of name if namespace.
- */
- String getLocalName() {
- if (isNamespaceDeclaration()) {
- if (name.getLocalPart().equals("")) {
- return "xmlns";
- }
- return "xmlns:" + name.getLocalPart();
- }
- return name.getLocalPart();
- }
-
- boolean isNamespaceDeclaration() {
- return (name.getNamespaceURI() == XMLNS_NAMESPACE_URI);
- }
- }
-
- // stores qname and value for each attribute
- AttributeInfo [] atInfos;
-
- /*
- * Will create a list that contains the namespace declarations
- * as well as the other attributes.
- */
- public AttributesImpl(XMLStreamReader reader) {
- if (reader == null) {
-
- // this is the case when we call getAttributes() on the
- // reader when it is not on a start tag
- atInfos = new AttributeInfo[0];
- } else {
-
- // this is the normal case
- int index = 0;
- int namespaceCount = reader.getNamespaceCount();
- int attributeCount = reader.getAttributeCount();
- atInfos = new AttributeInfo[namespaceCount + attributeCount];
- for (int i=0; i<namespaceCount; i++) {
- String namespacePrefix = reader.getNamespacePrefix(i);
-
- // will be null if default prefix. QName can't take null
- if (namespacePrefix == null) {
- namespacePrefix = "";
- }
- atInfos[index++] = new AttributeInfo(
- new QName(XMLNS_NAMESPACE_URI,
- namespacePrefix,
- "xmlns"),
- reader.getNamespaceURI(i));
- }
- for (int i=0; i<attributeCount; i++) {
- atInfos[index++] = new AttributeInfo(
- reader.getAttributeName(i),
- reader.getAttributeValue(i));
- }
- }
- }
-
- public int getLength() {
- return atInfos.length;
- }
-
- public String getLocalName(int index) {
- if (index >= 0 && index < atInfos.length) {
- return atInfos[index].getLocalName();
- }
- return null;
- }
-
- public QName getName(int index) {
- if (index >= 0 && index < atInfos.length) {
- return atInfos[index].getName();
- }
- return null;
- }
-
- public String getPrefix(int index) {
- if (index >= 0 && index < atInfos.length) {
- return atInfos[index].getName().getPrefix();
- }
- return null;
- }
-
- public String getURI(int index) {
- if (index >= 0 && index < atInfos.length) {
- return atInfos[index].getName().getNamespaceURI();
- }
- return null;
- }
-
- public String getValue(int index) {
- if (index >= 0 && index < atInfos.length) {
- return atInfos[index].getValue();
- }
- return null;
- }
-
- public String getValue(QName name) {
- int index = getIndex(name);
- if (index != -1) {
- return atInfos[index].getValue();
- }
- return null;
- }
-
- public String getValue(String localName) {
- int index = getIndex(localName);
- if (index != -1) {
- return atInfos[index].getValue();
- }
- return null;
- }
-
- public String getValue(String uri, String localName) {
- int index = getIndex(uri, localName);
- if (index != -1) {
- return atInfos[index].getValue();
- }
- return null;
- }
-
- public boolean isNamespaceDeclaration(int index) {
- if (index >= 0 && index < atInfos.length) {
- return atInfos[index].isNamespaceDeclaration();
- }
- return false;
- }
-
- public int getIndex(QName name) {
- for (int i=0; i<atInfos.length; i++) {
- if (atInfos[i].getName().equals(name)) {
- return i;
- }
- }
- return -1;
- }
-
- public int getIndex(String localName) {
- for (int i=0; i<atInfos.length; i++) {
- if (atInfos[i].getName().getLocalPart().equals(localName)) {
- return i;
- }
- }
- return -1;
- }
-
- public int getIndex(String uri, String localName) {
- QName qName;
- for (int i=0; i<atInfos.length; i++) {
- qName = atInfos[i].getName();
- if (qName.getNamespaceURI().equals(uri) &&
- qName.getLocalPart().equals(localName)) {
-
- return i;
- }
- }
- return -1;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterException.java
deleted file mode 100644
index 7c880d99..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.streaming;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-/**
- * <p> XMLWriterException represents an exception that occurred while writing
- * an XML document. </p>
- *
- * @see JAXWSExceptionBase
- *
- * @author WS Development Team
- */
-public class XMLStreamWriterException extends JAXWSExceptionBase {
-
- public XMLStreamWriterException(String key, Object... args) {
- super(key, args);
- }
-
- public XMLStreamWriterException(Throwable throwable) {
- super(throwable);
- }
-
- public XMLStreamWriterException(Localizable arg) {
- super("xmlwriter.nestedError", arg);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.streaming";
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterUtil.java
deleted file mode 100644
index b72cb73d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterUtil.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.streaming;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.encoding.HasEncoding;
-import com.sun.xml.internal.ws.encoding.SOAPBindingCodec;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.stream.XMLStreamException;
-import java.util.Map;
-import java.io.OutputStream;
-
-/**
- * <p>XMLStreamWriterUtil provides some utility methods intended to be used
- * in conjunction with a StAX XMLStreamWriter. </p>
- *
- * @author Santiago.PericasGeertsen@sun.com
- */
-public class XMLStreamWriterUtil {
-
- private XMLStreamWriterUtil() {
- }
-
- /**
- * Gives the underlying stream for XMLStreamWriter. It closes any start elements, and returns the stream so
- * that JAXB can write infoset directly to the stream.
- *
- * @param writer XMLStreamWriter for which stream is required
- * @return underlying OutputStream, null if writer doesn't provide a way to get it
- * @throws XMLStreamException if any of writer operations throw the exception
- */
- public static @Nullable OutputStream getOutputStream(XMLStreamWriter writer) throws XMLStreamException {
- Object obj = null;
-
- // Hack for JDK6's SJSXP
- if (writer instanceof Map) {
- obj = ((Map) writer).get("sjsxp-outputstream");
- }
-
- // woodstox
- if (obj == null) {
- try {
- obj = writer.getProperty("com.ctc.wstx.outputUnderlyingStream");
- } catch(Exception ie) {
- // Catch all exceptions. SJSXP in JDK throws NPE
- // nothing to do here
- }
- }
-
- // SJSXP
- if (obj == null) {
- try {
- obj = writer.getProperty("http://java.sun.com/xml/stream/properties/outputstream");
- } catch(Exception ie) {
- // Catch all exceptions. SJSXP in JDK throws NPE
- // nothing to do here
- }
- }
-
-
- if (obj != null) {
- writer.writeCharacters(""); // Force completion of open elems
- writer.flush();
- return (OutputStream)obj;
- }
- return null;
- }
-
- /**
- * Gives the encoding with which XMLStreamWriter is created.
- *
- * @param writer XMLStreamWriter for which encoding is required
- * @return null if cannot be found, else the encoding
- */
- public static @Nullable String getEncoding(XMLStreamWriter writer) {
- /*
- * TODO Add reflection logic to handle woodstox writer
- * as it implements XMLStreamWriter2#getEncoding()
- * It's not that important since woodstox writer is typically wrapped
- * in a writer with HasEncoding
- */
- return (writer instanceof HasEncoding)
- ? ((HasEncoding)writer).getEncoding()
- : null;
- }
-
- public static String encodeQName(XMLStreamWriter writer, QName qname,
- PrefixFactory prefixFactory)
- {
- // NOTE: Here it is assumed that we do not serialize using default
- // namespace declarations and therefore that writer.getPrefix will
- // never return ""
-
- try {
- String namespaceURI = qname.getNamespaceURI();
- String localPart = qname.getLocalPart();
-
- if (namespaceURI == null || namespaceURI.equals("")) {
- return localPart;
- }
- else {
- String prefix = writer.getPrefix(namespaceURI);
- if (prefix == null) {
- prefix = prefixFactory.getPrefix(namespaceURI);
- writer.writeNamespace(prefix, namespaceURI);
- }
- return prefix + ":" + localPart;
- }
- }
- catch (XMLStreamException e) {
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/DeferredTransportPipe.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/DeferredTransportPipe.java
deleted file mode 100644
index 21b37185..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/DeferredTransportPipe.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport;
-
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.*;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractTubeImpl;
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.developer.HttpConfigFeature;
-
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * Proxy transport {@link Tube} and {@link Pipe} that lazily determines the
- * actual transport pipe by looking at {@link Packet#endpointAddress}.
- *
- * <p>
- * This pseudo transport is used when there's no statically known endpoint address,
- * and thus it's expected that the application will configure {@link BindingProvider}
- * at runtime before making invocation.
- *
- * <p>
- * Since a typical application makes multiple invocations with the same endpoint
- * address, this class implements a simple cache strategy to avoid re-creating
- * transport pipes excessively.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class DeferredTransportPipe extends AbstractTubeImpl {
-
- private Tube transport;
- private EndpointAddress address;
-
- // parameter to TransportPipeFactory
- private final ClassLoader classLoader;
- private final ClientTubeAssemblerContext context;
-
- public DeferredTransportPipe(ClassLoader classLoader, ClientTubeAssemblerContext context) {
- this.classLoader = classLoader;
- this.context = context;
- if (context.getBinding().getFeature(HttpConfigFeature.class) == null) {
- context.getBinding().getFeatures().mergeFeatures(
- new WebServiceFeature[] { new HttpConfigFeature() }, false);
- }
- //See if we can create the transport pipe from the available information.
- try {
- this.transport = TransportTubeFactory.create(classLoader, context);
- this.address = context.getAddress();
- } catch(Exception e) {
- //No problem, transport will be initialized while processing the requests
- }
- }
-
- public DeferredTransportPipe(DeferredTransportPipe that, TubeCloner cloner) {
- super(that,cloner);
- this.classLoader = that.classLoader;
- this.context = that.context;
- if(that.transport!=null) {
- this.transport = cloner.copy(that.transport);
- this.address = that.address;
- }
- }
- public NextAction processException(@NotNull Throwable t) {
- return transport.processException(t);
- }
-
- public NextAction processRequest(@NotNull Packet request) {
- if(request.endpointAddress==address)
- // cache hit
- return transport.processRequest(request);
-
- // cache miss
-
- if(transport!=null) {
- // delete the current entry
- transport.preDestroy();
- transport = null;
- address = null;
- }
-
- // otherwise find out what transport will process this.
-
- ClientTubeAssemblerContext newContext = new ClientTubeAssemblerContext(
- request.endpointAddress,
- context.getWsdlModel(),
- context.getBindingProvider(),
- context.getBinding(),
- context.getContainer(),
- context.getCodec().copy(),
- context.getSEIModel(),
- context.getSEI()
- );
-
- address = request.endpointAddress;
- transport = TransportTubeFactory.create(classLoader, newContext);
- // successful return from the above method indicates a successful pipe creation
- assert transport!=null;
-
- return transport.processRequest(request);
- }
-
- public NextAction processResponse(@NotNull Packet response) {
- if (transport != null)
- return transport.processResponse(response);
- return doReturnWith(response);
- }
-
- public void preDestroy() {
- if(transport!=null) {
- transport.preDestroy();
- transport = null;
- address = null;
- }
- }
-
- public DeferredTransportPipe copy(TubeCloner cloner) {
- return new DeferredTransportPipe(this,cloner);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/Headers.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/Headers.java
deleted file mode 100644
index b6044e69..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/Headers.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport;
-
-import java.io.Serializable;
-import java.util.Comparator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-/**
- * HTTP request and response headers are represented by this class which implements
- * the interface {@link java.util.Map}&lt;{@link String},
- * {@link List}&lt;{@link String}&gt;&gt;.
- * The keys are case-insensitive Strings representing the header names and
- * the value associated with each key is a {@link List}&lt;{@link String}&gt; with one
- * element for each occurrence of the header name in the request or response.
- * <p>
- * For example, if the request has the the following headers:
- * <blockquote><pre>
- * HeaderName: value1
- * HeadernaMe: value2
- * </blockquote></pre>
- * Then get("hEaDeRnAmE") would give both "value1", and "value2" values in a list
- * <p>
- * All the normal {@link Map} methods are provided, but the following
- * additional convenience methods are most likely to be used:
- * <ul>
- * <li>{@link #getFirst(String)} returns a single valued header or the first
- * value of a multi-valued header.</li>
- * <li>{@link #add(String,String)} adds the given header value to the list
- * for the given key</li>
- * <li>{@link #set(String,String)} sets the given header field to the single
- * value given overwriting any existing values in the value list.
- * </ul><p>
- * All methods in this class accept <code>null</code> values for keys and values.
- * However, null keys will never will be present in HTTP request headers, and
- * will not be output/sent in response headers. Null values can be represented
- * as either a null entry for the key (i.e. the list is null) or where the key
- * has a list, but one (or more) of the list's values is null. Null values are
- * output as a header line containing the key but no associated value.
- *
- * @author Jitendra Kotamraju
- */
-public class Headers extends TreeMap<String,List<String>> {
-
- public Headers() {
- super(INSTANCE);
- }
-
- private static final InsensitiveComparator INSTANCE = new InsensitiveComparator();
-
- // case-insensitive string comparison of HTTP header names.
- private static final class InsensitiveComparator implements Comparator<String>, Serializable {
- public int compare(String o1, String o2) {
- if (o1 == null && o2 == null)
- return 0;
- if (o1 == null)
- return -1;
- if (o2 == null)
- return 1;
- return o1.compareToIgnoreCase(o2);
- }
- }
-
- /**
- * Adds the given value to the list of headers for the given key. If the
- * mapping does not already exist, then it is created.
- *
- * @param key the header name
- * @param value the header value to add to the header
- */
- public void add (String key, String value) {
- List<String> list = this.get(key);
- if (list == null) {
- list = new LinkedList<String>();
- put(key,list);
- }
- list.add (value);
- }
-
- /**
- * Returns the first value from the List of String values for the given key
- * (if at least one exists).
- *
- * @param key the key to search for
- * @return the first string value associated with the key
- */
- public String getFirst (String key) {
- List<String> l = get(key);
- return (l == null) ? null : l.get(0);
- }
-
- /**
- * Sets the given value as the sole header value for the given key. If the
- * mapping does not already exist, then it is created.
- *
- * @param key the header name
- * @param value the header value to set.
- */
- public void set (String key, String value) {
- LinkedList<String> l = new LinkedList<String>();
- l.add (value);
- put(key, l);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/DeploymentDescriptorParser.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/DeploymentDescriptorParser.java
deleted file mode 100644
index f6f85a46..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/DeploymentDescriptorParser.java
+++ /dev/null
@@ -1,608 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.transport.http;
-
-import com.oracle.webservices.internal.api.databinding.DatabindingModeFeature;
-import com.oracle.webservices.internal.api.databinding.ExternalMetadataFeature;
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.databinding.MetadataReader;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.SDDocumentSource;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
-
-import com.sun.xml.internal.ws.handler.HandlerChainsModel;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-import com.sun.xml.internal.ws.resources.WsservletMessages;
-import com.sun.xml.internal.ws.server.EndpointFactory;
-import com.sun.xml.internal.ws.server.ServerRtException;
-import com.sun.xml.internal.ws.streaming.Attributes;
-import com.sun.xml.internal.ws.streaming.TidyXMLStreamReader;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.util.HandlerAnnotationInfo;
-import com.sun.xml.internal.ws.util.exception.LocatableWebServiceException;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import org.xml.sax.EntityResolver;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.http.HTTPBinding;
-import javax.xml.ws.soap.MTOMFeature;
-import javax.xml.ws.soap.SOAPBinding;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Parses {@code sun-jaxws.xml} into {@link WSEndpoint}.
- * <p/>
- * <p/>
- * Since {@code sun-jaxws.xml} captures more information than what {@link WSEndpoint}
- * represents (in particular URL pattern and name), this class
- * takes a parameterization 'A' so that the user of this parser can choose to
- * create another type that wraps {@link WSEndpoint}.
- * <p/>
- * {@link HttpAdapter} and its derived type is used for this often,
- * but it can be anything.
- *
- * @author WS Development Team
- * @author Kohsuke Kawaguchi
- */
-public class DeploymentDescriptorParser<A> {
-
- public static final String NS_RUNTIME = "http://java.sun.com/xml/ns/jax-ws/ri/runtime";
- public static final String JAXWS_WSDL_DD_DIR = "WEB-INF/wsdl";
-
- public static final QName QNAME_ENDPOINTS = new QName(NS_RUNTIME, "endpoints");
- public static final QName QNAME_ENDPOINT = new QName(NS_RUNTIME, "endpoint");
- public static final QName QNAME_EXT_METADA = new QName(NS_RUNTIME, "external-metadata");
-
- public static final String ATTR_FILE = "file";
- public static final String ATTR_RESOURCE = "resource";
-
- public static final String ATTR_VERSION = "version";
- public static final String ATTR_NAME = "name";
- public static final String ATTR_IMPLEMENTATION = "implementation";
- public static final String ATTR_WSDL = "wsdl";
- public static final String ATTR_SERVICE = "service";
- public static final String ATTR_PORT = "port";
- public static final String ATTR_URL_PATTERN = "url-pattern";
- public static final String ATTR_ENABLE_MTOM = "enable-mtom";
- public static final String ATTR_MTOM_THRESHOLD_VALUE = "mtom-threshold-value";
- public static final String ATTR_BINDING = "binding";
- public static final String ATTR_DATABINDING = "databinding";
-
- public static final List<String> ATTRVALUE_SUPPORTED_VERSIONS = Arrays.asList("2.0", "2.1");
-
- private static final Logger logger = Logger.getLogger(com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server.http");
-
- private final Container container;
- private final ClassLoader classLoader;
- private final ResourceLoader loader;
- private final AdapterFactory<A> adapterFactory;
-
- /**
- * Endpoint names that are declared.
- * Used to catch double definitions.
- */
- private final Set<String> names = new HashSet<String>();
-
- /**
- * WSDL/schema documents collected from /WEB-INF/wsdl. Keyed by the system ID.
- */
- private final Map<String, SDDocumentSource> docs = new HashMap<String, SDDocumentSource>();
-
- /**
- * @param cl Used to load service implementations.
- * @param loader Used to locate resources, in particular WSDL.
- * @param container Optional {@link Container} that {@link WSEndpoint}s receive.
- * @param adapterFactory Creates {@link HttpAdapter} (or its derived class.)
- */
- public DeploymentDescriptorParser(ClassLoader cl, ResourceLoader loader, Container container,
- AdapterFactory<A> adapterFactory) throws MalformedURLException {
- classLoader = cl;
- this.loader = loader;
- this.container = container;
- this.adapterFactory = adapterFactory;
-
- collectDocs("/WEB-INF/wsdl/");
- logger.log(Level.FINE, "war metadata={0}", docs);
- }
-
- /**
- * Parses the {@code sun-jaxws.xml} file and configures
- * a set of {@link HttpAdapter}s.
- */
- public @NotNull List<A> parse(String systemId, InputStream is) {
- XMLStreamReader reader = null;
- try {
- reader = new TidyXMLStreamReader(
- XMLStreamReaderFactory.create(systemId, is, true), is);
- XMLStreamReaderUtil.nextElementContent(reader);
- return parseAdapters(reader);
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (XMLStreamException e) {
- throw new ServerRtException("runtime.parser.xmlReader", e);
- }
- }
- try {
- is.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- /**
- * Parses the {@code sun-jaxws.xml} file and configures
- * a set of {@link HttpAdapter}s.
- */
- public @NotNull List<A> parse(File f) throws IOException {
- FileInputStream in = new FileInputStream(f);
- try {
- return parse(f.getPath(), in);
- } finally {
- in.close();
- }
- }
-
- /**
- * Get all the WSDL & schema documents recursively.
- */
- private void collectDocs(String dirPath) throws MalformedURLException {
- Set<String> paths = loader.getResourcePaths(dirPath);
- if (paths != null) {
- for (String path : paths) {
- if (path.endsWith("/")) {
- if (path.endsWith("/CVS/") || path.endsWith("/.svn/")) {
- continue;
- }
- collectDocs(path);
- } else {
- URL res = loader.getResource(path);
- docs.put(res.toString(), SDDocumentSource.create(res));
- }
- }
- }
- }
-
-
- private List<A> parseAdapters(XMLStreamReader reader) {
- if (!reader.getName().equals(QNAME_ENDPOINTS)) {
- failWithFullName("runtime.parser.invalidElement", reader);
- }
-
- List<A> adapters = new ArrayList<A>();
-
- Attributes attrs = XMLStreamReaderUtil.getAttributes(reader);
- String version = getMandatoryNonEmptyAttribute(reader, attrs, ATTR_VERSION);
- if (!ATTRVALUE_SUPPORTED_VERSIONS.contains(version)) {
- failWithLocalName("runtime.parser.invalidVersionNumber", reader, version);
- }
-
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
-
- if (reader.getName().equals(QNAME_ENDPOINT)) {
- attrs = XMLStreamReaderUtil.getAttributes(reader);
-
- String name = getMandatoryNonEmptyAttribute(reader, attrs, ATTR_NAME);
- if (!names.add(name)) {
- logger.warning(
- WsservletMessages.SERVLET_WARNING_DUPLICATE_ENDPOINT_NAME(/*name*/));
- }
-
- String implementationName =
- getMandatoryNonEmptyAttribute(reader, attrs, ATTR_IMPLEMENTATION);
- Class<?> implementorClass = getImplementorClass(implementationName, reader);
-
- MetadataReader metadataReader = null;
- ExternalMetadataFeature externalMetadataFeature = null;
-
- // parse subelements to instantiate externalMetadataReader, if necessary ...
- XMLStreamReaderUtil.nextElementContent(reader);
- if (reader.getEventType() != XMLStreamConstants.END_ELEMENT) {
- externalMetadataFeature = configureExternalMetadataReader(reader);
- if (externalMetadataFeature != null) {
- metadataReader = externalMetadataFeature.getMetadataReader(implementorClass.getClassLoader(), false);
- }
- }
-
- QName serviceName = getQNameAttribute(attrs, ATTR_SERVICE);
- if (serviceName == null) {
- serviceName = EndpointFactory.getDefaultServiceName(implementorClass, metadataReader);
- }
-
- QName portName = getQNameAttribute(attrs, ATTR_PORT);
- if (portName == null) {
- portName = EndpointFactory.getDefaultPortName(serviceName, implementorClass, metadataReader);
- }
-
- //get enable-mtom attribute value
- String enable_mtom = getAttribute(attrs, ATTR_ENABLE_MTOM);
- String mtomThreshold = getAttribute(attrs, ATTR_MTOM_THRESHOLD_VALUE);
- String dbMode = getAttribute(attrs, ATTR_DATABINDING);
- String bindingId = getAttribute(attrs, ATTR_BINDING);
- if (bindingId != null) {
- // Convert short-form tokens to API's binding ids
- bindingId = getBindingIdForToken(bindingId);
- }
- WSBinding binding = createBinding(bindingId, implementorClass, enable_mtom, mtomThreshold, dbMode);
- if (externalMetadataFeature != null) {
- binding.getFeatures().mergeFeatures(new WebServiceFeature[]{externalMetadataFeature},
- true);
- }
-
- String urlPattern = getMandatoryNonEmptyAttribute(reader, attrs, ATTR_URL_PATTERN);
-
- // TODO use 'docs' as the metadata. If wsdl is non-null it's the primary.
- boolean handlersSetInDD = setHandlersAndRoles(binding, reader, serviceName, portName);
-
- EndpointFactory.verifyImplementorClass(implementorClass, metadataReader);
- SDDocumentSource primaryWSDL = getPrimaryWSDL(reader, attrs, implementorClass, metadataReader);
-
- WSEndpoint<?> endpoint = WSEndpoint.create(
- implementorClass, !handlersSetInDD,
- null,
- serviceName, portName, container, binding,
- primaryWSDL, docs.values(), createEntityResolver(), false
- );
- adapters.add(adapterFactory.createAdapter(name, urlPattern, endpoint));
- } else {
- failWithLocalName("runtime.parser.invalidElement", reader);
- }
- }
- return adapters;
- }
-
- /**
- * @param ddBindingId binding id explicitlyspecified in the DeploymentDescriptor or parameter
- * @param implClass Endpoint Implementation class
- * @param mtomEnabled represents mtom-enabled attribute in DD
- * @param mtomThreshold threshold value specified in DD
- * @return is returned with only MTOMFeature set resolving the various precendece rules
- */
- private static WSBinding createBinding(String ddBindingId, Class implClass,
- String mtomEnabled, String mtomThreshold, String dataBindingMode) {
- // Features specified through DD
- WebServiceFeatureList features;
-
- MTOMFeature mtomfeature = null;
- if (mtomEnabled != null) {
- if (mtomThreshold != null) {
- mtomfeature = new MTOMFeature(Boolean.valueOf(mtomEnabled),
- Integer.valueOf(mtomThreshold));
- } else {
- mtomfeature = new MTOMFeature(Boolean.valueOf(mtomEnabled));
- }
- }
-
- BindingID bindingID;
- if (ddBindingId != null) {
- bindingID = BindingID.parse(ddBindingId);
- features = bindingID.createBuiltinFeatureList();
-
- if (checkMtomConflict(features.get(MTOMFeature.class), mtomfeature)) {
- throw new ServerRtException(ServerMessages.DD_MTOM_CONFLICT(ddBindingId, mtomEnabled));
- }
- } else {
- bindingID = BindingID.parse(implClass);
- // Since bindingID is coming from implclass,
- // mtom through Feature annotation or DD takes precendece
-
- features = new WebServiceFeatureList();
- if (mtomfeature != null) { // this wins over MTOM setting in bindingID
- features.add(mtomfeature);
- }
- features.addAll(bindingID.createBuiltinFeatureList());
- }
-
- if (dataBindingMode != null) {
- features.add(new DatabindingModeFeature(dataBindingMode));
- }
-
- return bindingID.createBinding(features.toArray());
- }
-
- private static boolean checkMtomConflict(MTOMFeature lhs, MTOMFeature rhs) {
- if (lhs == null || rhs == null) {
- return false;
- }
- return lhs.isEnabled() ^ rhs.isEnabled();
- }
-
- /**
- * JSR-109 defines short-form tokens for standard binding Ids. These are
- * used only in DD. So stand alone deployment descirptor should also honor
- * these tokens. This method converts the tokens to API's standard
- * binding ids
- *
- * @param lexical binding attribute value from DD. Always not null
- * @return returns corresponding API's binding ID or the same lexical
- */
- public static @NotNull String getBindingIdForToken(@NotNull String lexical) {
- if (lexical.equals("##SOAP11_HTTP")) {
- return SOAPBinding.SOAP11HTTP_BINDING;
- } else if (lexical.equals("##SOAP11_HTTP_MTOM")) {
- return SOAPBinding.SOAP11HTTP_MTOM_BINDING;
- } else if (lexical.equals("##SOAP12_HTTP")) {
- return SOAPBinding.SOAP12HTTP_BINDING;
- } else if (lexical.equals("##SOAP12_HTTP_MTOM")) {
- return SOAPBinding.SOAP12HTTP_MTOM_BINDING;
- } else if (lexical.equals("##XML_HTTP")) {
- return HTTPBinding.HTTP_BINDING;
- }
- return lexical;
- }
-
- /**
- * Creates a new "Adapter".
- * <p/>
- * Normally 'A' would be {@link HttpAdapter} or some derived class.
- * But the parser doesn't require that to be of any particular type.
- */
- public static interface AdapterFactory<A> {
- A createAdapter(String name, String urlPattern, WSEndpoint<?> endpoint);
- }
-
- /**
- * Checks the deployment descriptor or {@link @WebServiceProvider} annotation
- * to see if it points to any WSDL. If so, returns the {@link SDDocumentSource}.
- *
- * @return The pointed WSDL, if any. Otherwise null.
- */
- private SDDocumentSource getPrimaryWSDL(XMLStreamReader xsr, Attributes attrs, Class<?> implementorClass, MetadataReader metadataReader) {
-
- String wsdlFile = getAttribute(attrs, ATTR_WSDL);
- if (wsdlFile == null) {
- wsdlFile = EndpointFactory.getWsdlLocation(implementorClass, metadataReader);
- }
-
- if (wsdlFile != null) {
- if (!wsdlFile.startsWith(JAXWS_WSDL_DD_DIR)) {
- logger.log(Level.WARNING, "Ignoring wrong wsdl={0}. It should start with {1}. Going to generate and publish a new WSDL.", new Object[]{wsdlFile, JAXWS_WSDL_DD_DIR});
- return null;
- }
-
- URL wsdl;
- try {
- wsdl = loader.getResource('/' + wsdlFile);
- } catch (MalformedURLException e) {
- throw new LocatableWebServiceException(
- ServerMessages.RUNTIME_PARSER_WSDL_NOT_FOUND(wsdlFile), e, xsr);
- }
- if (wsdl == null) {
- throw new LocatableWebServiceException(
- ServerMessages.RUNTIME_PARSER_WSDL_NOT_FOUND(wsdlFile), xsr);
- }
- SDDocumentSource docInfo = docs.get(wsdl.toExternalForm());
- assert docInfo != null;
- return docInfo;
- }
-
- return null;
- }
-
- /**
- * Creates an {@link EntityResolver} that consults {@code /WEB-INF/jax-ws-catalog.xml}.
- */
- private EntityResolver createEntityResolver() {
- try {
- return XmlUtil.createEntityResolver(loader.getCatalogFile());
- } catch (MalformedURLException e) {
- throw new WebServiceException(e);
- }
- }
-
- protected String getAttribute(Attributes attrs, String name) {
- String value = attrs.getValue(name);
- if (value != null) {
- value = value.trim();
- }
- return value;
- }
-
- protected QName getQNameAttribute(Attributes attrs, String name) {
- String value = getAttribute(attrs, name);
- if (value == null || value.equals("")) {
- return null;
- } else {
- return QName.valueOf(value);
- }
- }
-
- protected String getNonEmptyAttribute(XMLStreamReader reader, Attributes attrs, String name) {
- String value = getAttribute(attrs, name);
- if (value != null && value.equals("")) {
- failWithLocalName(
- "runtime.parser.invalidAttributeValue",
- reader,
- name);
- }
- return value;
- }
-
- protected String getMandatoryAttribute(XMLStreamReader reader, Attributes attrs, String name) {
- String value = getAttribute(attrs, name);
- if (value == null) {
- failWithLocalName("runtime.parser.missing.attribute", reader, name);
- }
- return value;
- }
-
- protected String getMandatoryNonEmptyAttribute(XMLStreamReader reader, Attributes attributes,
- String name) {
- String value = getAttribute(attributes, name);
- if (value == null) {
- failWithLocalName("runtime.parser.missing.attribute", reader, name);
- } else if (value.equals("")) {
- failWithLocalName(
- "runtime.parser.invalidAttributeValue",
- reader,
- name);
- }
- return value;
- }
-
- /**
- * Parses the handler and role information and sets it
- * on the {@link WSBinding}.
- *
- * @return true if <handler-chains> element present in DD
- * false otherwise.
- */
- protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) {
-
- if (reader.getEventType() == XMLStreamConstants.END_ELEMENT ||
- !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) {
- return false;
- }
-
- HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile(
- reader, classLoader, serviceName, portName, binding);
-
- binding.setHandlerChain(handlerInfo.getHandlers());
- if (binding instanceof SOAPBinding) {
- ((SOAPBinding) binding).setRoles(handlerInfo.getRoles());
- }
-
- // move past </handler-chains>
- XMLStreamReaderUtil.nextContent(reader);
- return true;
- }
-
- protected ExternalMetadataFeature configureExternalMetadataReader(XMLStreamReader reader) {
-
- ExternalMetadataFeature.Builder featureBuilder = null;
- while (QNAME_EXT_METADA.equals(reader.getName())) {
-
- if (reader.getEventType() == XMLStreamConstants.START_ELEMENT) {
- Attributes attrs = XMLStreamReaderUtil.getAttributes(reader);
- String file = getAttribute(attrs, ATTR_FILE);
- if (file != null) {
- if (featureBuilder == null) {
- featureBuilder = ExternalMetadataFeature.builder();
- }
- featureBuilder.addFiles(new File(file));
- }
-
- String res = getAttribute(attrs, ATTR_RESOURCE);
- if (res != null) {
- if (featureBuilder == null) {
- featureBuilder = ExternalMetadataFeature.builder();
- }
- featureBuilder.addResources(res);
- }
- }
-
- XMLStreamReaderUtil.nextElementContent(reader);
- }
-
- return buildFeature(featureBuilder);
- }
-
- private ExternalMetadataFeature buildFeature(ExternalMetadataFeature.Builder builder) {
- return builder != null ? builder.build() : null;
- }
-
- protected static void fail(String key, XMLStreamReader reader) {
- logger.log(Level.SEVERE, "{0}{1}", new Object[]{key, reader.getLocation().getLineNumber()});
- throw new ServerRtException(
- key,
- Integer.toString(reader.getLocation().getLineNumber()));
- }
-
- protected static void failWithFullName(String key, XMLStreamReader reader) {
- throw new ServerRtException(
- key,
- reader.getLocation().getLineNumber(),
- reader.getName());
- }
-
- protected static void failWithLocalName(String key, XMLStreamReader reader) {
- throw new ServerRtException(
- key,
- reader.getLocation().getLineNumber(),
- reader.getLocalName());
- }
-
- protected static void failWithLocalName(String key, XMLStreamReader reader, String arg) {
- throw new ServerRtException(
- key,
- reader.getLocation().getLineNumber(),
- reader.getLocalName(),
- arg);
- }
-
- protected Class loadClass(String name) {
- try {
- return Class.forName(name, true, classLoader);
- } catch (ClassNotFoundException e) {
- logger.log(Level.SEVERE, e.getMessage(), e);
- throw new ServerRtException(
- "runtime.parser.classNotFound",
- name);
- }
- }
-
-
- /**
- * Loads the class of the given name.
- *
- * @param xsr Used to report the source location information if there's any error.
- */
- private Class getImplementorClass(String name, XMLStreamReader xsr) {
- try {
- return Class.forName(name, true, classLoader);
- } catch (ClassNotFoundException e) {
- logger.log(Level.SEVERE, e.getMessage(), e);
- throw new LocatableWebServiceException(
- ServerMessages.RUNTIME_PARSER_CLASS_NOT_FOUND(name), e, xsr);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapter.java
deleted file mode 100644
index 452eb985..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapter.java
+++ /dev/null
@@ -1,996 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.transport.http;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.net.HttpURLConnection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.TreeMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.ws.Binding;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.http.HTTPBinding;
-
-import com.oracle.webservices.internal.api.message.PropertySet;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.Component;
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.addressing.NonAnonymousResponseProcessor;
-import com.sun.xml.internal.ws.api.ha.HaInfo;
-import com.sun.xml.internal.ws.api.message.ExceptionHasMessage;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Codec;
-import com.sun.xml.internal.ws.api.pipe.ContentType;
-import com.sun.xml.internal.ws.api.server.AbstractServerAsyncTransport;
-import com.sun.xml.internal.ws.api.server.Adapter;
-import com.sun.xml.internal.ws.api.server.BoundEndpoint;
-import com.sun.xml.internal.ws.api.server.DocumentAddressResolver;
-import com.sun.xml.internal.ws.api.server.Module;
-import com.sun.xml.internal.ws.api.server.PortAddressResolver;
-import com.sun.xml.internal.ws.api.server.SDDocument;
-import com.sun.xml.internal.ws.api.server.ServiceDefinition;
-import com.sun.xml.internal.ws.api.server.TransportBackChannel;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.server.WebServiceContextDelegate;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-import com.sun.xml.internal.ws.resources.WsservletMessages;
-import com.sun.xml.internal.ws.server.UnsupportedMediaException;
-import com.sun.xml.internal.ws.util.ByteArrayBuffer;
-import com.sun.xml.internal.ws.util.Pool;
-
-
-/**
- * {@link com.sun.xml.internal.ws.api.server.Adapter} that receives messages in HTTP.
- *
- * <p>
- * This object also assigns unique query string (such as "xsd=1") to
- * each {@link com.sun.xml.internal.ws.api.server.SDDocument} so that they can be served by HTTP GET requests.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public class HttpAdapter extends Adapter<HttpAdapter.HttpToolkit> {
-
- private static final Logger LOGGER = Logger.getLogger(HttpAdapter.class.getName());
-
- /**
- * {@link com.sun.xml.internal.ws.api.server.SDDocument}s keyed by the query string like "?abc".
- * Used for serving documents via HTTP GET.
- *
- * Empty if the endpoint doesn't have {@link com.sun.xml.internal.ws.api.server.ServiceDefinition}.
- * Read-only.
- */
- protected Map<String,SDDocument> wsdls;
-
- /**
- * Reverse map of {@link #wsdls}. Read-only.
- */
- private Map<SDDocument,String> revWsdls;
-
- /**
- * A reference to the service definition from which the map of wsdls/revWsdls
- * was created. This allows us to establish if the service definition documents
- * have changed in the meantime.
- */
- private ServiceDefinition serviceDefinition = null;
-
- public final HttpAdapterList<? extends HttpAdapter> owner;
-
- /**
- * Servlet URL pattern with which this {@link com.sun.xml.internal.ws.transport.http.HttpAdapter} is associated.
- */
- public final String urlPattern;
-
- protected boolean stickyCookie;
-
- protected boolean disableJreplicaCookie = false;
-
- /**
- * Creates a lone {@link com.sun.xml.internal.ws.transport.http.HttpAdapter} that does not know of any other
- * {@link com.sun.xml.internal.ws.transport.http.HttpAdapter}s.
- *
- * This is convenient for creating an {@link com.sun.xml.internal.ws.transport.http.HttpAdapter} for an environment
- * where they don't know each other (such as JavaSE deployment.)
- *
- * @param endpoint web service endpoint
- * @return singe adapter to process HTTP messages
- */
- public static HttpAdapter createAlone(WSEndpoint endpoint) {
- return new DummyList().createAdapter("","",endpoint);
- }
-
- /**
- * @deprecated
- * remove as soon as we can update the test util.
- * @param endpoint web service endpoint
- * @param owner list of related adapters
- */
- protected HttpAdapter(WSEndpoint endpoint,
- HttpAdapterList<? extends HttpAdapter> owner) {
- this(endpoint,owner,null);
- }
-
- protected HttpAdapter(WSEndpoint endpoint,
- HttpAdapterList<? extends HttpAdapter> owner,
- String urlPattern) {
- super(endpoint);
- this.owner = owner;
- this.urlPattern = urlPattern;
-
- initWSDLMap(endpoint.getServiceDefinition());
- }
-
- /**
- * Return the last known service definition of the endpoint.
- *
- * @return The service definition of the endpoint
- */
- public ServiceDefinition getServiceDefinition() {
- return this.serviceDefinition;
- }
-
- /**
- * Fill in WSDL map.
- *
- * @param sdef service definition
- */
- public final void initWSDLMap(ServiceDefinition sdef) {
- this.serviceDefinition = sdef;
- if(sdef==null) {
- wsdls = Collections.emptyMap();
- revWsdls = Collections.emptyMap();
- } else {
- wsdls = new HashMap<String, SDDocument>(); // wsdl=1 --> Doc
- // Sort WSDL, Schema documents based on SystemId so that the same
- // document gets wsdl=x mapping
- Map<String, SDDocument> systemIds = new TreeMap<String, SDDocument>();
- for (SDDocument sdd : sdef) {
- if (sdd == sdef.getPrimary()) { // No sorting for Primary WSDL
- wsdls.put("wsdl", sdd);
- wsdls.put("WSDL", sdd);
- } else {
- systemIds.put(sdd.getURL().toString(), sdd);
- }
- }
-
- int wsdlnum = 1;
- int xsdnum = 1;
- for (Entry<String, SDDocument> e : systemIds.entrySet()) {
- SDDocument sdd = e.getValue();
- if (sdd.isWSDL()) {
- wsdls.put("wsdl="+(wsdlnum++),sdd);
- }
- if (sdd.isSchema()) {
- wsdls.put("xsd="+(xsdnum++),sdd);
- }
- }
-
- revWsdls = new HashMap<SDDocument,String>(); // Doc --> wsdl=1
- for (Entry<String,SDDocument> e : wsdls.entrySet()) {
- if (!e.getKey().equals("WSDL")) { // map Doc --> wsdl, not WSDL
- revWsdls.put(e.getValue(),e.getKey());
- }
- }
- }
- }
-
- /**
- * Returns the "/abc/def/ghi" portion if
- * the URL pattern is "/abc/def/ghi/*".
- */
- public String getValidPath() {
- if (urlPattern.endsWith("/*")) {
- return urlPattern.substring(0, urlPattern.length() - 2);
- } else {
- return urlPattern;
- }
- }
-
- @Override
- protected HttpToolkit createToolkit() {
- return new HttpToolkit();
- }
-
- /**
- * Receives the incoming HTTP connection and dispatches
- * it to JAX-WS. This method returns when JAX-WS completes
- * processing the request and the whole reply is written
- * to {@link WSHTTPConnection}.
- *
- * <p>
- * This method is invoked by the lower-level HTTP stack,
- * and "connection" here is an HTTP connection.
- *
- * <p>
- * To populate a request {@link com.sun.xml.internal.ws.api.message.Packet} with more info,
- * define {@link com.oracle.webservices.internal.api.message.PropertySet.Property properties} on
- * {@link WSHTTPConnection}.
- *
- * @param connection to receive/send HTTP messages for web service endpoints
- * @throws java.io.IOException when I/O errors happen
- */
- public void handle(@NotNull WSHTTPConnection connection) throws IOException {
- if (handleGet(connection)) {
- return;
- }
-
- // Make sure the Toolkit is recycled by the same pool instance from which it was taken
- final Pool<HttpToolkit> currentPool = getPool();
- // normal request handling
- final HttpToolkit tk = currentPool.take();
- try {
- tk.handle(connection);
- } finally {
- currentPool.recycle(tk);
- }
- }
-
- public boolean handleGet(@NotNull WSHTTPConnection connection) throws IOException {
- if (connection.getRequestMethod().equals("GET")) {
- // metadata query. let the interceptor run
- for (Component c : endpoint.getComponents()) {
- HttpMetadataPublisher spi = c.getSPI(HttpMetadataPublisher.class);
- if (spi != null && spi.handleMetadataRequest(this, connection)) {
- return true;
- } // handled
- }
-
- if (isMetadataQuery(connection.getQueryString())) {
- // Sends published WSDL and schema documents as the default action.
- publishWSDL(connection);
- return true;
- }
-
- Binding binding = getEndpoint().getBinding();
- if (!(binding instanceof HTTPBinding)) {
- // Writes HTML page with all the endpoint descriptions
- writeWebServicesHtmlPage(connection);
- return true;
- }
- } else if (connection.getRequestMethod().equals("HEAD")) {
- connection.getInput().close();
- Binding binding = getEndpoint().getBinding();
- if (isMetadataQuery(connection.getQueryString())) {
- SDDocument doc = wsdls.get(connection.getQueryString());
- connection.setStatus(doc != null
- ? HttpURLConnection.HTTP_OK
- : HttpURLConnection.HTTP_NOT_FOUND);
- connection.getOutput().close();
- connection.close();
- return true;
- } else if (!(binding instanceof HTTPBinding)) {
- connection.setStatus(HttpURLConnection.HTTP_NOT_FOUND);
- connection.getOutput().close();
- connection.close();
- return true;
- }
- // Let the endpoint handle for HTTPBinding
- }
-
- return false;
-
- }
- /*
- *
- * @param con
- * @param codec
- * @return
- * @throws IOException
- * ExceptionHasMessage exception that contains particular fault message
- * UnsupportedMediaException to indicate to send 415 error code
- */
- private Packet decodePacket(@NotNull WSHTTPConnection con, @NotNull Codec codec) throws IOException {
- String ct = con.getRequestHeader("Content-Type");
- InputStream in = con.getInput();
- Packet packet = new Packet();
- packet.soapAction = fixQuotesAroundSoapAction(con.getRequestHeader("SOAPAction"));
- packet.wasTransportSecure = con.isSecure();
- packet.acceptableMimeTypes = con.getRequestHeader("Accept");
- packet.addSatellite(con);
- addSatellites(packet);
- packet.isAdapterDeliversNonAnonymousResponse = true;
- packet.component = this;
- packet.transportBackChannel = new Oneway(con);
- packet.webServiceContextDelegate = con.getWebServiceContextDelegate();
- packet.setState(Packet.State.ServerRequest);
- if (dump || LOGGER.isLoggable(Level.FINER)) {
- ByteArrayBuffer buf = new ByteArrayBuffer();
- buf.write(in);
- in.close();
- dump(buf, "HTTP request", con.getRequestHeaders());
- in = buf.newInputStream();
- }
- codec.decode(in, ct, packet);
- return packet;
- }
-
- protected void addSatellites(Packet packet) {
- }
-
- /**
- * Some stacks may send non WS-I BP 1.2 conforming SoapAction.
- * Make sure SOAPAction is quoted as {@link com.sun.xml.internal.ws.api.message.Packet#soapAction} expects quoted soapAction value.
- *
- * @param soapAction SoapAction HTTP Header
- * @return quoted SOAPAction value
- */
- static public String fixQuotesAroundSoapAction(String soapAction) {
- if(soapAction != null && (!soapAction.startsWith("\"") || !soapAction.endsWith("\"")) ) {
- if (LOGGER.isLoggable(Level.INFO)) {
- LOGGER.log(Level.INFO, "Received WS-I BP non-conformant Unquoted SoapAction HTTP header: {0}", soapAction);
- }
- String fixedSoapAction = soapAction;
- if(!soapAction.startsWith("\"")) {
- fixedSoapAction = "\"" + fixedSoapAction;
- }
- if(!soapAction.endsWith("\"")) {
- fixedSoapAction = fixedSoapAction + "\"";
- }
- return fixedSoapAction;
- }
- return soapAction;
- }
-
- protected NonAnonymousResponseProcessor getNonAnonymousResponseProcessor() {
- return NonAnonymousResponseProcessor.getDefault();
- }
-
- /**
- * This method is added for the case of the sub-class wants to override the method to
- * print details. E.g. convert soapfault as HTML msg for 403 error connstatus.
- * @param os
- */
- protected void writeClientError(int connStatus, @NotNull OutputStream os, @NotNull Packet packet) throws IOException {
- //do nothing
- }
-
- private boolean isClientErrorStatus(int connStatus)
- {
- return (connStatus == HttpURLConnection.HTTP_FORBIDDEN); // add more for future.
- }
-
- private boolean isNonAnonymousUri(EndpointAddress addr){
- return (addr != null) && !addr.toString().equals(AddressingVersion.W3C.anonymousUri) &&
- !addr.toString().equals(AddressingVersion.MEMBER.anonymousUri);
- }
-
- private void encodePacket(@NotNull Packet packet, @NotNull WSHTTPConnection con, @NotNull Codec codec) throws IOException {
- if (isNonAnonymousUri(packet.endpointAddress) && packet.getMessage() != null) {
- try {
- // Message is targeted to non-anonymous response endpoint.
- // After call to non-anonymous processor, typically, packet.getMessage() will be null
- // however, processors could use this pattern to modify the response sent on the back-channel,
- // e.g. send custom HTTP headers with the HTTP 202
- packet = getNonAnonymousResponseProcessor().process(packet);
- } catch (RuntimeException re) {
- // if processing by NonAnonymousResponseProcessor fails, new SOAPFaultMessage is created to be sent
- // to back-channel client
- SOAPVersion soapVersion = packet.getBinding().getSOAPVersion();
- Message faultMsg = SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, re);
- packet = packet.createServerResponse(faultMsg, packet.endpoint.getPort(), null, packet.endpoint.getBinding());
- }
- }
-
- if (con.isClosed()) {
- return; // Connection is already closed
- }
- Message responseMessage = packet.getMessage();
- addStickyCookie(con);
- addReplicaCookie(con, packet);
- if (responseMessage == null) {
- if (!con.isClosed()) {
- // set the response code if not already set
- // for example, 415 may have been set earlier for Unsupported Content-Type
- if (con.getStatus() == 0) {
- con.setStatus(WSHTTPConnection.ONEWAY);
- }
- OutputStream os = con.getProtocol().contains("1.1") ? con.getOutput() : new Http10OutputStream(con);
- if (dump || LOGGER.isLoggable(Level.FINER)) {
- ByteArrayBuffer buf = new ByteArrayBuffer();
- codec.encode(packet, buf);
- dump(buf, "HTTP response " + con.getStatus(), con.getResponseHeaders());
- buf.writeTo(os);
- } else {
- codec.encode(packet, os);
- }
- // close the response channel now
- try {
- os.close(); // no payload
- } catch (IOException e) {
- throw new WebServiceException(e);
- }
- }
- } else {
- if (con.getStatus() == 0) {
- // if the appliation didn't set the status code,
- // set the default one.
- con.setStatus(responseMessage.isFault()
- ? HttpURLConnection.HTTP_INTERNAL_ERROR
- : HttpURLConnection.HTTP_OK);
- }
-
- if (isClientErrorStatus(con.getStatus())) {
- OutputStream os = con.getOutput();
- if (dump || LOGGER.isLoggable(Level.FINER)) {
- ByteArrayBuffer buf = new ByteArrayBuffer();
- writeClientError(con.getStatus(), buf, packet);
- dump(buf, "HTTP response " + con.getStatus(), con.getResponseHeaders());
- buf.writeTo(os);
- } else {
- writeClientError(con.getStatus(), os, packet);
- }
- os.close();
- return;
- }
-
- ContentType contentType = codec.getStaticContentType(packet);
- if (contentType != null) {
- con.setContentTypeResponseHeader(contentType.getContentType());
- OutputStream os = con.getProtocol().contains("1.1") ? con.getOutput() : new Http10OutputStream(con);
- if (dump || LOGGER.isLoggable(Level.FINER)) {
- ByteArrayBuffer buf = new ByteArrayBuffer();
- codec.encode(packet, buf);
- dump(buf, "HTTP response " + con.getStatus(), con.getResponseHeaders());
- buf.writeTo(os);
- } else {
- codec.encode(packet, os);
- }
- os.close();
- } else {
-
- ByteArrayBuffer buf = new ByteArrayBuffer();
- contentType = codec.encode(packet, buf);
- con.setContentTypeResponseHeader(contentType.getContentType());
- if (dump || LOGGER.isLoggable(Level.FINER)) {
- dump(buf, "HTTP response " + con.getStatus(), con.getResponseHeaders());
- }
- OutputStream os = con.getOutput();
- buf.writeTo(os);
- os.close();
- }
- }
- }
-
- /*
- * GlassFish Load-balancer plugin always add a header proxy-jroute on
- * request being send from load-balancer plugin to server
- *
- * JROUTE cookie need to be stamped in two cases
- * 1 : At the time of session creation. In this case, request will not have
- * any JROUTE cookie.
- * 2 : At the time of fail-over. In this case, value of proxy-jroute
- * header(will point to current instance) and JROUTE cookie(will point to
- * previous failed instance) will be different. This logic can be used
- * to determine fail-over scenario.
- */
- private void addStickyCookie(WSHTTPConnection con) {
- if (stickyCookie) {
- String proxyJroute = con.getRequestHeader("proxy-jroute");
- if (proxyJroute == null) {
- // Load-balancer plugin is not front-ending this instance
- return;
- }
-
- String jrouteId = con.getCookie("JROUTE");
- if (jrouteId == null || !jrouteId.equals(proxyJroute)) {
- // Initial request or failover
- con.setCookie("JROUTE", proxyJroute);
- }
- }
- }
-
- private void addReplicaCookie(WSHTTPConnection con, Packet packet) {
- if (stickyCookie) {
- HaInfo haInfo = null;
- if (packet.supports(Packet.HA_INFO)) {
- haInfo = (HaInfo)packet.get(Packet.HA_INFO);
- }
- if (haInfo != null) {
- con.setCookie("METRO_KEY", haInfo.getKey());
- if (!disableJreplicaCookie) {
- con.setCookie("JREPLICA", haInfo.getReplicaInstance());
- }
- }
- }
- }
-
- public void invokeAsync(final WSHTTPConnection con) throws IOException {
- invokeAsync(con, NO_OP_COMPLETION_CALLBACK);
- }
-
- public void invokeAsync(final WSHTTPConnection con, final CompletionCallback callback) throws IOException {
-
- if (handleGet(con)) {
- callback.onCompletion();
- return;
- }
- final Pool<HttpToolkit> currentPool = getPool();
- final HttpToolkit tk = currentPool.take();
- final Packet request;
-
- try {
-
- request = decodePacket(con, tk.codec);
- } catch (ExceptionHasMessage e) {
- LOGGER.log(Level.SEVERE, e.getMessage(), e);
- Packet response = new Packet();
- response.setMessage(e.getFaultMessage());
- encodePacket(response, con, tk.codec);
- currentPool.recycle(tk);
- con.close();
- callback.onCompletion();
- return;
- } catch (UnsupportedMediaException e) {
- LOGGER.log(Level.SEVERE, e.getMessage(), e);
- Packet response = new Packet();
- con.setStatus(WSHTTPConnection.UNSUPPORTED_MEDIA);
- encodePacket(response, con, tk.codec);
- currentPool.recycle(tk);
- con.close();
- callback.onCompletion();
- return;
- }
-
- endpoint.process(request, new WSEndpoint.CompletionCallback() {
- @Override
- public void onCompletion(@NotNull Packet response) {
- try {
- try {
- encodePacket(response, con, tk.codec);
- } catch (IOException ioe) {
- LOGGER.log(Level.SEVERE, ioe.getMessage(), ioe);
- }
- currentPool.recycle(tk);
- } finally {
- con.close();
- callback.onCompletion();
-
- }
- }
- },null);
-
- }
-
- public static final CompletionCallback NO_OP_COMPLETION_CALLBACK = new CompletionCallback() {
-
- @Override
- public void onCompletion() {
- //NO-OP
- }
- };
-
- public interface CompletionCallback{
- void onCompletion();
- }
-
- final class AsyncTransport extends AbstractServerAsyncTransport<WSHTTPConnection> {
-
- public AsyncTransport() {
- super(endpoint);
- }
-
- public void handleAsync(WSHTTPConnection con) throws IOException {
- super.handle(con);
- }
-
- @Override
- protected void encodePacket(WSHTTPConnection con, @NotNull Packet packet, @NotNull Codec codec) throws IOException {
- HttpAdapter.this.encodePacket(packet, con, codec);
- }
-
- protected @Override @Nullable String getAcceptableMimeTypes(WSHTTPConnection con) {
- return null;
- }
-
- protected @Override @Nullable TransportBackChannel getTransportBackChannel(WSHTTPConnection con) {
- return new Oneway(con);
- }
-
- protected @Override @NotNull
- PropertySet getPropertySet(WSHTTPConnection con) {
- return con;
- }
-
- protected @Override @NotNull WebServiceContextDelegate getWebServiceContextDelegate(WSHTTPConnection con) {
- return con.getWebServiceContextDelegate();
- }
- }
-
- static final class Oneway implements TransportBackChannel {
- WSHTTPConnection con;
- boolean closed;
-
- Oneway(WSHTTPConnection con) {
- this.con = con;
- }
- @Override
- public void close() {
- if (!closed) {
- closed = true;
- // close the response channel now
- if (con.getStatus() == 0) {
- // if the appliation didn't set the status code,
- // set the default one.
- con.setStatus(WSHTTPConnection.ONEWAY);
- }
-
- OutputStream output = null;
- try {
- output = con.getOutput();
- } catch (IOException e) {
- // no-op
- }
-
- if (dump || LOGGER.isLoggable(Level.FINER)) {
- try {
- ByteArrayBuffer buf = new ByteArrayBuffer();
- dump(buf, "HTTP response " + con.getStatus(), con.getResponseHeaders());
- } catch (Exception e) {
- throw new WebServiceException(e.toString(), e);
- }
- }
-
- if (output != null) {
- try {
- output.close(); // no payload
- } catch (IOException e) {
- throw new WebServiceException(e);
- }
- }
- con.close();
- }
- }
- }
-
- final class HttpToolkit extends Adapter.Toolkit {
- public void handle(WSHTTPConnection con) throws IOException {
- try {
- boolean invoke = false;
- Packet packet;
- try {
- packet = decodePacket(con, codec);
- invoke = true;
- } catch(Exception e) {
- packet = new Packet();
- if (e instanceof ExceptionHasMessage) {
- LOGGER.log(Level.SEVERE, e.getMessage(), e);
- packet.setMessage(((ExceptionHasMessage)e).getFaultMessage());
- } else if (e instanceof UnsupportedMediaException) {
- LOGGER.log(Level.SEVERE, e.getMessage(), e);
- con.setStatus(WSHTTPConnection.UNSUPPORTED_MEDIA);
- } else {
- LOGGER.log(Level.SEVERE, e.getMessage(), e);
- con.setStatus(HttpURLConnection.HTTP_INTERNAL_ERROR);
- }
- }
- if (invoke) {
- try {
- packet = head.process(packet, con.getWebServiceContextDelegate(),
- packet.transportBackChannel);
- } catch(Throwable e) {
- LOGGER.log(Level.SEVERE, e.getMessage(), e);
- if (!con.isClosed()) {
- writeInternalServerError(con);
- }
- return;
- }
- }
- encodePacket(packet, con, codec);
- } finally {
- if (!con.isClosed()) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Closing HTTP Connection with status: {0}", con.getStatus());
- }
- con.close();
- }
- }
- }
- }
-
- /**
- * Returns true if the given query string is for metadata request.
- *
- * @param query
- * String like "xsd=1" or "perhaps=some&amp;unrelated=query".
- * Can be null.
- * @return true for metadata requests
- * false for web service requests
- */
- private boolean isMetadataQuery(String query) {
- // we intentionally return true even if documents don't exist,
- // so that they get 404.
- return query != null && (query.equals("WSDL") || query.startsWith("wsdl") || query.startsWith("xsd="));
- }
-
- /**
- * Sends out the WSDL (and other referenced documents)
- * in response to the GET requests to URLs like "?wsdl" or "?xsd=2".
- *
- * @param con
- * The connection to which the data will be sent.
- *
- * @throws java.io.IOException when I/O errors happen
- */
- public void publishWSDL(@NotNull WSHTTPConnection con) throws IOException {
- con.getInput().close();
-
- SDDocument doc = wsdls.get(con.getQueryString());
- if (doc == null) {
- writeNotFoundErrorPage(con,"Invalid Request");
- return;
- }
-
- con.setStatus(HttpURLConnection.HTTP_OK);
- con.setContentTypeResponseHeader("text/xml;charset=utf-8");
-
- OutputStream os = con.getProtocol().contains("1.1") ? con.getOutput() : new Http10OutputStream(con);
-
- PortAddressResolver portAddressResolver = getPortAddressResolver(con.getBaseAddress());
- DocumentAddressResolver resolver = getDocumentAddressResolver(portAddressResolver);
-
- doc.writeTo(portAddressResolver, resolver, os);
- os.close();
- }
-
- public PortAddressResolver getPortAddressResolver(String baseAddress) {
- return owner.createPortAddressResolver(baseAddress, endpoint.getImplementationClass());
- }
-
- public DocumentAddressResolver getDocumentAddressResolver(
- PortAddressResolver portAddressResolver) {
- final String address = portAddressResolver.getAddressFor(endpoint.getServiceName(), endpoint.getPortName().getLocalPart());
- assert address != null;
- return new DocumentAddressResolver() {
- @Override
- public String getRelativeAddressFor(@NotNull SDDocument current, @NotNull SDDocument referenced) {
- // the map on endpoint should account for all SDDocument
- assert revWsdls.containsKey(referenced);
- return address+'?'+ revWsdls.get(referenced);
- }
- };
- }
-
- /**
- * HTTP/1.0 connections require Content-Length. So just buffer to find out
- * the length.
- */
- private final static class Http10OutputStream extends ByteArrayBuffer {
- private final WSHTTPConnection con;
-
- Http10OutputStream(WSHTTPConnection con) {
- this.con = con;
- }
-
- @Override
- public void close() throws IOException {
- super.close();
- con.setContentLengthResponseHeader(size());
- OutputStream os = con.getOutput();
- writeTo(os);
- os.close();
- }
- }
-
- private void writeNotFoundErrorPage(WSHTTPConnection con, String message) throws IOException {
- con.setStatus(HttpURLConnection.HTTP_NOT_FOUND);
- con.setContentTypeResponseHeader("text/html; charset=utf-8");
-
- PrintWriter out = new PrintWriter(new OutputStreamWriter(con.getOutput(),"UTF-8"));
- out.println("<html>");
- out.println("<head><title>");
- out.println(WsservletMessages.SERVLET_HTML_TITLE());
- out.println("</title></head>");
- out.println("<body>");
- out.println(WsservletMessages.SERVLET_HTML_NOT_FOUND(message));
- out.println("</body>");
- out.println("</html>");
- out.close();
- }
-
- private void writeInternalServerError(WSHTTPConnection con) throws IOException {
- con.setStatus(HttpURLConnection.HTTP_INTERNAL_ERROR);
- con.getOutput().close(); // Sets the status code
- }
-
- private static final class DummyList extends HttpAdapterList<HttpAdapter> {
- @Override
- protected HttpAdapter createHttpAdapter(String name, String urlPattern, WSEndpoint<?> endpoint) {
- return new HttpAdapter(endpoint,this,urlPattern);
- }
- }
-
- private static void dump(ByteArrayBuffer buf, String caption, Map<String, List<String>> headers) throws IOException {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- PrintWriter pw = new PrintWriter(baos, true);
- pw.println("---["+caption +"]---");
- if (headers != null) {
- for (Entry<String, List<String>> header : headers.entrySet()) {
- if (header.getValue().isEmpty()) {
- // I don't think this is legal, but let's just dump it,
- // as the point of the dump is to uncover problems.
- pw.println(header.getValue());
- } else {
- for (String value : header.getValue()) {
- pw.println(header.getKey() + ": " + value);
- }
- }
- }
- }
- if (buf.size() > dump_threshold) {
- byte[] b = buf.getRawData();
- baos.write(b, 0, dump_threshold);
- pw.println();
- pw.println(WsservletMessages.MESSAGE_TOO_LONG(HttpAdapter.class.getName() + ".dumpTreshold"));
- } else {
- buf.writeTo(baos);
- }
- pw.println("--------------------");
-
- String msg = baos.toString();
- if (dump) {
- System.out.println(msg);
- }
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.log(Level.FINER, msg);
- }
- }
-
- /*
- * Generates the listing of all services.
- */
- private void writeWebServicesHtmlPage(WSHTTPConnection con) throws IOException {
- if (!publishStatusPage) {
- return;
- }
-
- // TODO: resurrect the ability to localize according to the current request.
-
- con.getInput().close();
-
- // standard browsable page
- con.setStatus(WSHTTPConnection.OK);
- con.setContentTypeResponseHeader("text/html; charset=utf-8");
-
- PrintWriter out = new PrintWriter(new OutputStreamWriter(con.getOutput(),"UTF-8"));
- out.println("<html>");
- out.println("<head><title>");
- // out.println("Web Services");
- out.println(WsservletMessages.SERVLET_HTML_TITLE());
- out.println("</title></head>");
- out.println("<body>");
- // out.println("<h1>Web Services</h1>");
- out.println(WsservletMessages.SERVLET_HTML_TITLE_2());
-
- // what endpoints do we have in this system?
- Module module = getEndpoint().getContainer().getSPI(Module.class);
- List<BoundEndpoint> endpoints = Collections.emptyList();
- if(module!=null) {
- endpoints = module.getBoundEndpoints();
- }
-
- if (endpoints.isEmpty()) {
- // out.println("<p>No JAX-WS context information available.</p>");
- out.println(WsservletMessages.SERVLET_HTML_NO_INFO_AVAILABLE());
- } else {
- out.println("<table width='100%' border='1'>");
- out.println("<tr>");
- out.println("<td>");
- // out.println("Endpoint");
- out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_PORT_NAME());
- out.println("</td>");
-
- out.println("<td>");
- // out.println("Information");
- out.println(WsservletMessages.SERVLET_HTML_COLUMN_HEADER_INFORMATION());
- out.println("</td>");
- out.println("</tr>");
-
- for (BoundEndpoint a : endpoints) {
- String endpointAddress = a.getAddress(con.getBaseAddress()).toString();
- out.println("<tr>");
-
- out.println("<td>");
- out.println(WsservletMessages.SERVLET_HTML_ENDPOINT_TABLE(
- a.getEndpoint().getServiceName(),
- a.getEndpoint().getPortName()
- ));
- out.println("</td>");
-
- out.println("<td>");
- out.println(WsservletMessages.SERVLET_HTML_INFORMATION_TABLE(
- endpointAddress,
- a.getEndpoint().getImplementationClass().getName()
- ));
- out.println("</td>");
-
- out.println("</tr>");
- }
- out.println("</table>");
- }
- out.println("</body>");
- out.println("</html>");
- out.close();
- }
-
- /**
- * Dumps what goes across HTTP transport.
- */
- public static volatile boolean dump = false;
-
- public static volatile int dump_threshold = 4096;
-
- public static volatile boolean publishStatusPage = true;
-
- public static synchronized void setPublishStatus(boolean publish) {
- publishStatusPage = publish;
- }
-
- static {
- try {
- dump = Boolean.getBoolean(HttpAdapter.class.getName() + ".dump");
- } catch (SecurityException se) {
- if (LOGGER.isLoggable(Level.CONFIG)) {
- LOGGER.log(Level.CONFIG, "Cannot read ''{0}'' property, using defaults.",
- new Object[] {HttpAdapter.class.getName() + ".dump"});
- }
- }
- try {
- dump_threshold = Integer.getInteger(HttpAdapter.class.getName() + ".dumpTreshold", 4096);
- } catch (SecurityException se) {
- if (LOGGER.isLoggable(Level.CONFIG)) {
- LOGGER.log(Level.CONFIG, "Cannot read ''{0}'' property, using defaults.",
- new Object[] {HttpAdapter.class.getName() + ".dumpTreshold"});
- }
- }
- try {
- setPublishStatus(Boolean.getBoolean(HttpAdapter.class.getName() + ".publishStatusPage"));
- } catch (SecurityException se) {
- if (LOGGER.isLoggable(Level.CONFIG)) {
- LOGGER.log(Level.CONFIG, "Cannot read ''{0}'' property, using defaults.",
- new Object[] {HttpAdapter.class.getName() + ".publishStatusPage"});
- }
- }
- }
-
- public static void setDump(boolean dumpMessages) {
- HttpAdapter.dump = dumpMessages;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapterList.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapterList.java
deleted file mode 100644
index e7c05d5a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapterList.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport.http;
-
-import com.sun.xml.internal.ws.transport.http.DeploymentDescriptorParser.AdapterFactory;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.server.PortAddressResolver;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.istack.internal.NotNull;
-
-import javax.xml.namespace.QName;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.AbstractList;
-import java.util.Map.Entry;
-
-/**
- * List of {@link HttpAdapter}s created together.
- *
- * <p>
- * Some cases WAR file may contain multiple endpoints for ports in a WSDL.
- * If the runtime knows these ports, their port addresses can be patched.
- * This class keeps a list of {@link HttpAdapter}s and use that information to patch
- * multiple port addresses.
- *
- * <p>
- * Concrete implementations of this class need to override {@link #createHttpAdapter}
- * method to create implementations of {@link HttpAdapter}.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class HttpAdapterList<T extends HttpAdapter> extends AbstractList<T> implements AdapterFactory<T> {
- private final List<T> adapters = new ArrayList<T>();
- private final Map<PortInfo, String> addressMap = new HashMap<PortInfo, String>();
-
- // TODO: documented because it's used by AS
- @Override
- public T createAdapter(String name, String urlPattern, WSEndpoint<?> endpoint) {
- T t = createHttpAdapter(name, urlPattern, endpoint);
- adapters.add(t);
- WSDLPort port = endpoint.getPort();
- if (port != null) {
- PortInfo portInfo = new PortInfo(port.getOwner().getName(),port.getName().getLocalPart(), endpoint.getImplementationClass());
- addressMap.put(portInfo, getValidPath(urlPattern));
- }
- return t;
- }
-
- /**
- * Implementations need to override this one to create a concrete class
- * of HttpAdapter
- */
- protected abstract T createHttpAdapter(String name, String urlPattern, WSEndpoint<?> endpoint);
-
- /**
- * @return urlPattern without "/*"
- */
- private String getValidPath(@NotNull String urlPattern) {
- if (urlPattern.endsWith("/*")) {
- return urlPattern.substring(0, urlPattern.length() - 2);
- } else {
- return urlPattern;
- }
- }
-
- /**
- * Creates a PortAddressResolver that maps portname to its address
- *
- * @param endpointImpl application endpoint Class that eventually serves the request.
- */
- public PortAddressResolver createPortAddressResolver(final String baseAddress, final Class<?> endpointImpl) {
- return new PortAddressResolver() {
- @Override
- public String getAddressFor(@NotNull QName serviceName, @NotNull String portName) {
- String urlPattern = addressMap.get(new PortInfo(serviceName,portName, endpointImpl));
- if (urlPattern == null) {
- //if a WSDL defines more ports, urlpattern is null (portName does not match endpointImpl)
- //so fallback to the default behaviour where only serviceName/portName is checked
- for (Entry<PortInfo, String> e : addressMap.entrySet()) {
- if (serviceName.equals(e.getKey().serviceName) && portName.equals(e.getKey().portName)) {
- urlPattern = e.getValue();
- break;
- }
- }
- }
- return (urlPattern == null) ? null : baseAddress+urlPattern;
- }
- };
- }
-
-
- @Override
- public T get(int index) {
- return adapters.get(index);
- }
-
- @Override
- public int size() {
- return adapters.size();
- }
-
- private static class PortInfo {
- private final QName serviceName;
- private final String portName;
- private final Class<?> implClass;
-
- PortInfo(@NotNull QName serviceName, @NotNull String portName, Class<?> implClass) {
- this.serviceName = serviceName;
- this.portName = portName;
- this.implClass = implClass;
- }
-
- @Override
- public boolean equals(Object portInfo) {
- if (portInfo instanceof PortInfo) {
- PortInfo that = (PortInfo)portInfo;
- if (this.implClass == null) {
- return this.serviceName.equals(that.serviceName) && this.portName.equals(that.portName) && that.implClass == null;
- }
- return this.serviceName.equals(that.serviceName) && this.portName.equals(that.portName) && this.implClass.equals(that.implClass);
- }
- return false;
- }
-
- @Override
- public int hashCode() {
- int retVal = serviceName.hashCode()+portName.hashCode();
- return implClass != null ? retVal + implClass.hashCode() : retVal;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpMetadataPublisher.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpMetadataPublisher.java
deleted file mode 100644
index cb527220..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpMetadataPublisher.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport.http;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.Component;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-
-import java.io.IOException;
-
-/**
- * Intercepts GET HTTP requests to process the requests.
- *
- * <p>
- * {@link HttpAdapter} looks for this SPI in {@link WSEndpoint#getComponents()}
- * to allow components to expose additional information through HTTP.
- *
- * @author Kohsuke Kawaguchi
- * @see Component#getSPI(Class)
- * @since 2.1.2
- */
-public abstract class HttpMetadataPublisher {
- /**
- * When {@link HttpAdapter} receives a GET request with a query string
- * (which is a convention for metadata requests, such as '?wsdl' or '?xsd=...'),
- * then this method is invoked to allow components to intercept the request.
- *
- * @param adapter
- * Adapter that accepted the connection.
- * @param connection
- * Represents the current connection.
- * @return
- * true if the request is processed. If false is returned the default processing kicks in.
- */
- public abstract boolean handleMetadataRequest(@NotNull HttpAdapter adapter, @NotNull WSHTTPConnection connection) throws IOException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/ResourceLoader.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/ResourceLoader.java
deleted file mode 100644
index ec47f3a3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/ResourceLoader.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport.http;
-
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.util.Set;
-
-/**
- * Used to locate resources for {@link DeploymentDescriptorParser}.
- *
- * <p>
- * This allows {@link DeploymentDescriptorParser} to be used outside a servlet container,
- * but it still needs to work with a layout similar to the web application.
- * If this can be abstracted away better, that would be nice.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface ResourceLoader {
- /**
- * Returns the actual location of the resource from the 'path'
- * that represents a virtual locaion of a file inside a web application.
- *
- * @param path
- * Desiganates an absolute path within an web application, such as:
- * '/WEB-INF/web.xml' or some such.
- *
- * @return
- * the actual location, if found, or null if not found.
- */
- URL getResource(String path) throws MalformedURLException;
-
- /**
- * Gets the catalog XML file that should be consulted when
- * loading resources from this {@link ResourceLoader}.
- */
- URL getCatalogFile() throws MalformedURLException;
-
- /**
- * Returns the list of files in the given directory.
- *
- * @return
- * null if the path is invalid. empty if the path didn't contain
- * any entry in it.
- *
- * @see javax.servlet.ServletContext#getResourcePaths(String)
- */
- Set<String> getResourcePaths(String path);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/WSHTTPConnection.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/WSHTTPConnection.java
deleted file mode 100644
index 55ded5c7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/WSHTTPConnection.java
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport.http;
-
-import com.oracle.webservices.internal.api.message.BasePropertySet;
-import com.oracle.webservices.internal.api.message.PropertySet;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.server.WebServiceContextDelegate;
-
-import javax.xml.ws.WebServiceContext;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-import java.security.Principal;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-
-/**
- * The view of an HTTP exchange from the point of view of JAX-WS.
- *
- * <p>
- * Different HTTP server layer uses different implementations of this class
- * so that JAX-WS can be shielded from individuality of such layers.
- * This is an interface implemented as an abstract class, so that
- * future versions of the JAX-WS RI can add new methods.
- *
- * <p>
- * This class extends {@link PropertySet} so that a transport can
- * expose its properties to the application and pipes. (This object
- * will be added to {@link Packet#addSatellite(PropertySet)}.)
- *
- * @author Jitendra Kotamraju
- */
-public abstract class WSHTTPConnection extends BasePropertySet {
-
- public static final int OK=200;
- public static final int ONEWAY=202;
- public static final int UNSUPPORTED_MEDIA=415;
- public static final int MALFORMED_XML=400;
- public static final int INTERNAL_ERR=500;
-
- /**
- * Overwrites all the HTTP response headers written thus far.
- *
- * <p>
- * The implementation should copy the contents of the {@link Map},
- * rather than retaining a reference. The {@link Map} passed as a
- * parameter may change after this method is invoked.
- *
- * <p>
- * This method may be called repeatedly, although in normal use
- * case that's rare (so the implementation is encourage to take
- * advantage of this usage pattern to improve performance, if possible.)
- *
- * <p>
- * Initially, no header is set.
- *
- * <p>
- * This parameter is usually exposed to {@link WebServiceContext}
- * as {@link Packet#OUTBOUND_TRANSPORT_HEADERS}, and thus it
- * should ignore <tt>Content-Type</tt> and <tt>Content-Length</tt> headers.
- *
- * @param headers
- * See {@link HttpURLConnection#getHeaderFields()} for the format.
- * This parameter may not be null, but since the user application
- * code may invoke this method, a graceful error checking with
- * an helpful error message should be provided if it's actually null.
- * @see #setContentTypeResponseHeader(String)
- */
- public abstract void setResponseHeaders(@NotNull Map<String,List<String>> headers);
-
- public void setResponseHeader(String key, String value) {
- setResponseHeader(key, Collections.singletonList(value));
- }
-
- public abstract void setResponseHeader(String key, List<String> value);
-
- /**
- * Sets the <tt>"Content-Type"</tt> header.
- *
- * <p>
- * If the Content-Type header has already been set, this method will overwrite
- * the previously set value. If not, this method adds it.
- *
- * <p>
- * Note that this method and {@link #setResponseHeaders(java.util.Map)}
- * may be invoked in any arbitrary order.
- *
- * @param value
- * strings like <tt>"application/xml; charset=UTF-8"</tt> or
- * <tt>"image/jpeg"</tt>.
- */
- public abstract void setContentTypeResponseHeader(@NotNull String value);
-
- /**
- * Sets the HTTP response code like {@link #OK}.
- *
- * <p>
- * While JAX-WS processes a {@link WSHTTPConnection}, it
- * will at least call this method once to set a valid HTTP response code.
- * Note that this method may be invoked multiple times (from user code),
- * so do not consider the value to be final until {@link #getOutput()}
- * is invoked.
- */
-
- public abstract void setStatus(int status);
-
- /**
- * Gets the last value set by {@link #setStatus(int)}.
- *
- * @return
- * if {@link #setStatus(int)} has not been invoked yet,
- * return 0.
- */
- // I know this is ugly method!
- public abstract int getStatus();
-
- /**
- * Transport's underlying input stream.
- *
- * <p>
- * This method will be invoked at most once by the JAX-WS RI to
- * read the request body. If there's no request body, this method
- * should return an empty {@link InputStream}.
- *
- * @return
- * the stream from which the request body will be read.
- */
- public abstract @NotNull InputStream getInput() throws IOException;
-
- /**
- * Transport's underlying output stream
- *
- * <p>
- * This method will be invoked exactly once by the JAX-WS RI
- * to start writing the response body (unless the processing aborts abnormally.)
- * Even if there's no response body to write, this method will
- * still be invoked only to be closed immediately.
- *
- * <p>
- * Once this method is called, the status code and response
- * headers will never change (IOW {@link #setStatus(int)},
- * {@link #setResponseHeaders}, and {@link #setContentTypeResponseHeader(String)}
- * will never be invoked.
- */
- public abstract @NotNull OutputStream getOutput() throws IOException;
-
- /**
- * Returns the {@link WebServiceContextDelegate} for this connection.
- */
- public abstract @NotNull WebServiceContextDelegate getWebServiceContextDelegate();
-
- /**
- * HTTP request method, such as "GET" or "POST".
- */
- public abstract @NotNull String getRequestMethod();
-
- /**
- * HTTP request headers.
- *
- * @deprecated
- * This is a potentially expensive operation.
- * Programs that want to access HTTP headers should consider using
- * other methods such as {@link #getRequestHeader(String)}.
- *
- * @return
- * can be empty but never null.
- */
- public abstract @NotNull Map<String,List<String>> getRequestHeaders();
-
- /**
- * HTTP request header names.
- *
- * @deprecated
- * This is a potentially expensive operation.
- * Programs that want to access HTTP headers should consider using
- * other methods such as {@link #getRequestHeader(String)}.
- *
- * @return
- * can be empty but never null.
- */
- public abstract @NotNull Set<String> getRequestHeaderNames();
-
- /**
- * @return
- * HTTP response headers.
- */
- public abstract Map<String,List<String>> getResponseHeaders();
-
- /**
- * Gets an HTTP request header.
- *
- * <p>
- * if multiple headers are present, this method returns one of them.
- * (The implementation is free to choose which one it returns.)
- *
- * @return
- * null if no header exists.
- */
- public abstract @Nullable String getRequestHeader(@NotNull String headerName);
-
- /**
- * Gets an HTTP request header.
- *
- * @return
- * null if no header exists.
- */
- public abstract @Nullable List<String> getRequestHeaderValues(@NotNull String headerName);
-
- /**
- * HTTP Query string, such as "foo=bar", or null if none exists.
- */
- public abstract @Nullable String getQueryString();
-
- /**
- * Extra portion of the request URI after the end of the expected address of the service
- * but before the query string
- */
- public abstract @Nullable String getPathInfo();
-
- /**
- * Requested path. A string like "/foo/bar/baz"
- */
- public abstract @NotNull String getRequestURI();
-
- /**
- * Requested scheme, e.g. "http" or "https"
- */
- public abstract @NotNull String getRequestScheme();
-
- /**
- * Server name
- */
- public abstract @NotNull String getServerName();
-
- /**
- * Server port
- */
- public abstract int getServerPort();
-
- /**
- * Portion of the request URI that groups related service addresses. The value, if non-empty, will
- * always begin with '/', but will never end with '/'. Environments that do not support
- * context paths must return an empty string.
- */
- public @NotNull String getContextPath() {
- return "";
- }
-
- /**
- * Environment specific context , if available
- */
- public Object getContext() {
- return null;
- }
-
- /**
- * Gets the absolute URL up to the context path.
- * @return
- * String like "http://myhost/myapp"
- * @since 2.1.2
- */
- public @NotNull String getBaseAddress() {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Whether connection is HTTPS or not
- *
- * @return if the received request is on HTTPS, return true
- * else false
- */
- public abstract boolean isSecure();
-
- /**
- * User principal associated with the request
- *
- * @return user principal
- */
- public Principal getUserPrincipal() {
- return null;
- }
-
- /**
- * Whether user associated with the request holds the given role
- *
- * @param role Role to check
- * @return if the caller holds the role
- */
- public boolean isUserInRole(String role) {
- return false;
- }
-
- /**
- * Gets request metadata attribute
- * @param key Request metadata key
- * @return Value of metadata attribute or null, if no value present
- */
- public Object getRequestAttribute(String key) {
- return null;
- }
-
- private volatile boolean closed;
-
- /**
- * Close the connection
- */
- public void close() {
- this.closed = true;
- }
-
- /**
- * Retuns whether connection is closed or not.
- */
- public boolean isClosed() {
- return closed;
- }
-
- /**
- * Subclasses are expected to override
- *
- * @return a {@link String} containing the protocol name and version number
- */
- public String getProtocol() {
- return "HTTP/1.1";
- }
-
- /**
- * Subclasses are expected to override
- *
- * @since JAX-WS RI 2.2.2
- * @return value of given cookie
- */
- public String getCookie(String name) {
- return null;
- }
-
- /**
- * Subclasses are expected to override
- *
- *
- * @since JAX-WS RI 2.2.2
- */
- public void setCookie(String name, String value) {
- }
-
- /**
- * Subclasses are expected to override
- */
- public void setContentLengthResponseHeader(int value) {
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java
deleted file mode 100644
index 813335c1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport.http.client;
-
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.client.BindingProviderProperties;
-import static com.sun.xml.internal.ws.client.BindingProviderProperties.*;
-import com.sun.xml.internal.ws.client.ClientTransportException;
-import com.sun.xml.internal.ws.resources.ClientMessages;
-import com.sun.xml.internal.ws.transport.Headers;
-import com.sun.xml.internal.ws.developer.JAXWSProperties;
-import com.sun.istack.internal.Nullable;
-import com.sun.istack.internal.NotNull;
-
-import javax.net.ssl.SSLSocketFactory;
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.SSLSession;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.MessageContext;
-import java.io.FilterInputStream;
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-import java.util.List;
-import java.util.Map;
-import java.util.zip.GZIPOutputStream;
-import java.util.zip.GZIPInputStream;
-
-/**
- *
- * @author WS Development Team
- */
-public class HttpClientTransport {
-
- private static final byte[] THROW_AWAY_BUFFER = new byte[8192];
-
- // Need to use JAXB first to register DatatypeConverter
- static {
- try {
- JAXBContext.newInstance().createUnmarshaller();
- } catch(JAXBException je) {
- // Nothing much can be done. Intentionally left empty
- }
- }
-
- /*package*/ int statusCode;
- /*package*/ String statusMessage;
- /*package*/ int contentLength;
- private final Map<String, List<String>> reqHeaders;
- private Map<String, List<String>> respHeaders = null;
-
- private OutputStream outputStream;
- private boolean https;
- private HttpURLConnection httpConnection = null;
- private final EndpointAddress endpoint;
- private final Packet context;
- private final Integer chunkSize;
-
-
- public HttpClientTransport(@NotNull Packet packet, @NotNull Map<String,List<String>> reqHeaders) {
- endpoint = packet.endpointAddress;
- context = packet;
- this.reqHeaders = reqHeaders;
- chunkSize = (Integer)context.invocationProperties.get(JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE);
- }
-
- /*
- * Prepare the stream for HTTP request
- */
- OutputStream getOutput() {
- try {
- createHttpConnection();
- // for "GET" request no need to get outputStream
- if (requiresOutputStream()) {
- outputStream = httpConnection.getOutputStream();
- if (chunkSize != null) {
- outputStream = new WSChunkedOuputStream(outputStream, chunkSize);
- }
- List<String> contentEncoding = reqHeaders.get("Content-Encoding");
- // TODO need to find out correct encoding based on q value - RFC 2616
- if (contentEncoding != null && contentEncoding.get(0).contains("gzip")) {
- outputStream = new GZIPOutputStream(outputStream);
- }
- }
- httpConnection.connect();
- } catch (Exception ex) {
- throw new ClientTransportException(
- ClientMessages.localizableHTTP_CLIENT_FAILED(ex),ex);
- }
-
- return outputStream;
- }
-
- void closeOutput() throws IOException {
- if (outputStream != null) {
- outputStream.close();
- outputStream = null;
- }
- }
-
- /*
- * Get the response from HTTP connection and prepare the input stream for response
- */
- @Nullable InputStream getInput() {
- // response processing
-
- InputStream in;
- try {
- in = readResponse();
- if (in != null) {
- String contentEncoding = httpConnection.getContentEncoding();
- if (contentEncoding != null && contentEncoding.contains("gzip")) {
- in = new GZIPInputStream(in);
- }
- }
- } catch (IOException e) {
- throw new ClientTransportException(ClientMessages.localizableHTTP_STATUS_CODE(statusCode, statusMessage), e);
- }
- return in;
- }
-
- public Map<String, List<String>> getHeaders() {
- if (respHeaders != null) {
- return respHeaders;
- }
- respHeaders = new Headers();
- respHeaders.putAll(httpConnection.getHeaderFields());
- return respHeaders;
- }
-
- protected @Nullable InputStream readResponse() {
- InputStream is;
- try {
- is = httpConnection.getInputStream();
- } catch(IOException ioe) {
- is = httpConnection.getErrorStream();
- }
- if (is == null) {
- return is;
- }
- // Since StreamMessage doesn't read </s:Body></s:Envelope>, there
- // are some bytes left in the InputStream. This confuses JDK and may
- // not reuse underlying sockets. Hopefully JDK fixes it in its code !
- final InputStream temp = is;
- return new FilterInputStream(temp) {
- // Workaround for "SJSXP XMLStreamReader.next() closes stream".
- // So it doesn't read from the closed stream
- boolean closed;
- @Override
- public void close() throws IOException {
- if (!closed) {
- closed = true;
- while(temp.read(THROW_AWAY_BUFFER) != -1);
- super.close();
- }
- }
- };
- }
-
- protected void readResponseCodeAndMessage() {
- try {
- statusCode = httpConnection.getResponseCode();
- statusMessage = httpConnection.getResponseMessage();
- contentLength = httpConnection.getContentLength();
- } catch(IOException ioe) {
- throw new WebServiceException(ioe);
- }
- }
-
- protected HttpURLConnection openConnection(Packet packet) {
- // default do nothing
- return null;
- }
-
- protected boolean checkHTTPS(HttpURLConnection connection) {
- if (connection instanceof HttpsURLConnection) {
-
- // TODO The above property needs to be removed in future version as the semantics of this property are not preoperly defined.
- // One should use JAXWSProperties.HOSTNAME_VERIFIER to control the behavior
-
- // does the client want client hostname verification by the service
- String verificationProperty =
- (String) context.invocationProperties.get(HOSTNAME_VERIFICATION_PROPERTY);
- if (verificationProperty != null) {
- if (verificationProperty.equalsIgnoreCase("true")) {
- ((HttpsURLConnection) connection).setHostnameVerifier(new HttpClientVerifier());
- }
- }
-
- // Set application's HostNameVerifier for this connection
- HostnameVerifier verifier =
- (HostnameVerifier) context.invocationProperties.get(JAXWSProperties.HOSTNAME_VERIFIER);
- if (verifier != null) {
- ((HttpsURLConnection) connection).setHostnameVerifier(verifier);
- }
-
- // Set application's SocketFactory for this connection
- SSLSocketFactory sslSocketFactory =
- (SSLSocketFactory) context.invocationProperties.get(JAXWSProperties.SSL_SOCKET_FACTORY);
- if (sslSocketFactory != null) {
- ((HttpsURLConnection) connection).setSSLSocketFactory(sslSocketFactory);
- }
-
- return true;
- }
- return false;
- }
-
- private void createHttpConnection() throws IOException {
- httpConnection = openConnection(context);
-
- if (httpConnection == null)
- httpConnection = (HttpURLConnection) endpoint.openConnection();
-
- String scheme = endpoint.getURI().getScheme();
- if (scheme.equals("https")) {
- https = true;
- }
- if (checkHTTPS(httpConnection))
- https = true;
-
- // allow interaction with the web page - user may have to supply
- // username, password id web page is accessed from web browser
- httpConnection.setAllowUserInteraction(true);
-
- // enable input, output streams
- httpConnection.setDoOutput(true);
- httpConnection.setDoInput(true);
-
- String requestMethod = (String) context.invocationProperties.get(MessageContext.HTTP_REQUEST_METHOD);
- String method = (requestMethod != null) ? requestMethod : "POST";
- httpConnection.setRequestMethod(method);
-
- //this code or something similiar needs t be moved elsewhere for error checking
- /*if (context.invocationProperties.get(BindingProviderProperties.BINDING_ID_PROPERTY).equals(HTTPBinding.HTTP_BINDING)){
- method = (requestMethod != null)?requestMethod:method;
- } else if
- (context.invocationProperties.get(BindingProviderProperties.BINDING_ID_PROPERTY).equals(SOAPBinding.SOAP12HTTP_BINDING) &&
- "GET".equalsIgnoreCase(requestMethod)) {
- }
- */
-
- Integer reqTimeout = (Integer)context.invocationProperties.get(BindingProviderProperties.REQUEST_TIMEOUT);
- if (reqTimeout != null) {
- httpConnection.setReadTimeout(reqTimeout);
- }
-
- Integer connectTimeout = (Integer)context.invocationProperties.get(JAXWSProperties.CONNECT_TIMEOUT);
- if (connectTimeout != null) {
- httpConnection.setConnectTimeout(connectTimeout);
- }
-
- Integer chunkSize = (Integer)context.invocationProperties.get(JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE);
- if (chunkSize != null) {
- httpConnection.setChunkedStreamingMode(chunkSize);
- }
-
- // set the properties on HttpURLConnection
- for (Map.Entry<String, List<String>> entry : reqHeaders.entrySet()) {
- if ("Content-Length".equals(entry.getKey())) continue;
- for(String value : entry.getValue()) {
- httpConnection.addRequestProperty(entry.getKey(), value);
- }
- }
- }
-
- boolean isSecure() {
- return https;
- }
-
- protected void setStatusCode(int statusCode) {
- this.statusCode = statusCode;
- }
-
- private boolean requiresOutputStream() {
- return !(httpConnection.getRequestMethod().equalsIgnoreCase("GET") ||
- httpConnection.getRequestMethod().equalsIgnoreCase("HEAD") ||
- httpConnection.getRequestMethod().equalsIgnoreCase("DELETE"));
- }
-
- @Nullable String getContentType() {
- return httpConnection.getContentType();
- }
-
- public int getContentLength() {
- return httpConnection.getContentLength();
- }
-
- // overide default SSL HttpClientVerifier to always return true
- // effectively overiding Hostname client verification when using SSL
- private static class HttpClientVerifier implements HostnameVerifier {
- public boolean verify(String s, SSLSession sslSession) {
- return true;
- }
- }
-
- private static class LocalhostHttpClientVerifier implements HostnameVerifier {
- public boolean verify(String s, SSLSession sslSession) {
- return "localhost".equalsIgnoreCase(s) || "127.0.0.1".equals(s);
- }
- }
-
- /**
- * HttpURLConnection.getOuputStream() returns sun.net.www.http.ChunkedOuputStream in chunked
- * streaming mode. If you call ChunkedOuputStream.write(byte[20MB], int, int), then the whole data
- * is kept in memory. This wraps the ChunkedOuputStream so that it writes only small
- * chunks.
- */
- private static final class WSChunkedOuputStream extends FilterOutputStream {
- final int chunkSize;
-
- WSChunkedOuputStream(OutputStream actual, int chunkSize) {
- super(actual);
- this.chunkSize = chunkSize;
- }
-
- @Override
- public void write(byte b[], int off, int len) throws IOException {
- while(len > 0) {
- int sent = (len > chunkSize) ? chunkSize : len;
- out.write(b, off, sent); // don't use super.write() as it writes byte-by-byte
- len -= sent;
- off += sent;
- }
- }
-
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpResponseProperties.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpResponseProperties.java
deleted file mode 100644
index 318ba7a0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpResponseProperties.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport.http.client;
-
-import com.oracle.webservices.internal.api.message.BasePropertySet;
-import com.oracle.webservices.internal.api.message.PropertySet;
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.client.ResponseContext;
-
-import javax.xml.ws.handler.MessageContext;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * Properties exposed from {@link HttpTransportPipe} for {@link ResponseContext}.
- *
- * @author Kohsuke Kawaguchi
- */
-final class HttpResponseProperties extends BasePropertySet {
-
- private final HttpClientTransport deferedCon;
-
- public HttpResponseProperties(@NotNull HttpClientTransport con) {
- this.deferedCon = con;
- }
-
- @Property(MessageContext.HTTP_RESPONSE_HEADERS)
- public Map<String, List<String>> getResponseHeaders() {
- return deferedCon.getHeaders();
- }
-
- @Property(MessageContext.HTTP_RESPONSE_CODE)
- public int getResponseCode() {
- return deferedCon.statusCode;
- }
-
- @Override
- protected PropertyMap getPropertyMap() {
- return model;
- }
-
- private static final PropertyMap model;
-
- static {
- model = parse(HttpResponseProperties.class);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpTransportPipe.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpTransportPipe.java
deleted file mode 100644
index f8633d18..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpTransportPipe.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.transport.http.client;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.ha.StickyFeature;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.*;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractTubeImpl;
-import com.sun.xml.internal.ws.client.ClientTransportException;
-import com.sun.xml.internal.ws.developer.HttpConfigFeature;
-import com.sun.xml.internal.ws.resources.ClientMessages;
-import com.sun.xml.internal.ws.resources.WsservletMessages;
-import com.sun.xml.internal.ws.transport.Headers;
-import com.sun.xml.internal.ws.transport.http.HttpAdapter;
-import com.sun.xml.internal.ws.util.ByteArrayBuffer;
-import com.sun.xml.internal.ws.util.RuntimeVersion;
-import com.sun.xml.internal.ws.util.StreamUtils;
-
-import javax.xml.bind.DatatypeConverter;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.soap.SOAPBinding;
-import java.io.*;
-import java.net.CookieHandler;
-import java.net.HttpURLConnection;
-import java.util.*;
-import java.util.Map.Entry;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * {@link Tube} that sends a request to a remote HTTP server.
- *
- * TODO: need to create separate HTTP transport pipes for binding. SOAP1.1, SOAP1.2,
- * TODO: XML/HTTP differ in handling status codes.
- *
- * @author Jitendra Kotamraju
- */
-public class HttpTransportPipe extends AbstractTubeImpl {
-
- private static final List<String> USER_AGENT = Collections.singletonList(RuntimeVersion.VERSION.toString());
- private static final Logger LOGGER = Logger.getLogger(HttpTransportPipe.class.getName());
-
- /**
- * Dumps what goes across HTTP transport.
- */
- public static boolean dump;
-
- private final Codec codec;
- private final WSBinding binding;
- private final CookieHandler cookieJar; // shared object among the tubes
- private final boolean sticky;
-
- static {
- boolean b;
- try {
- b = Boolean.getBoolean(HttpTransportPipe.class.getName()+".dump");
- } catch( Throwable t ) {
- b = false;
- }
- dump = b;
- }
-
- public HttpTransportPipe(Codec codec, WSBinding binding) {
- this.codec = codec;
- this.binding = binding;
- this.sticky = isSticky(binding);
- HttpConfigFeature configFeature = binding.getFeature(HttpConfigFeature.class);
- if (configFeature == null) {
- configFeature = new HttpConfigFeature();
- }
- this.cookieJar = configFeature.getCookieHandler();
- }
-
- private static boolean isSticky(WSBinding binding) {
- boolean tSticky = false;
- WebServiceFeature[] features = binding.getFeatures().toArray();
- for(WebServiceFeature f : features) {
- if (f instanceof StickyFeature) {
- tSticky = true;
- break;
- }
- }
- return tSticky;
- }
-
- /*
- * Copy constructor for {@link Tube#copy(TubeCloner)}.
- */
- private HttpTransportPipe(HttpTransportPipe that, TubeCloner cloner) {
- this(that.codec.copy(), that.binding);
- cloner.add(that,this);
- }
-
- @Override
- public NextAction processException(@NotNull Throwable t) {
- return doThrow(t);
- }
-
- @Override
- public NextAction processRequest(@NotNull Packet request) {
- return doReturnWith(process(request));
- }
-
- @Override
- public NextAction processResponse(@NotNull Packet response) {
- return doReturnWith(response);
- }
-
- protected HttpClientTransport getTransport(Packet request, Map<String, List<String>> reqHeaders) {
- return new HttpClientTransport(request, reqHeaders);
- }
-
- @Override
- public Packet process(Packet request) {
- HttpClientTransport con;
- try {
- // get transport headers from message
- Map<String, List<String>> reqHeaders = new Headers();
- @SuppressWarnings("unchecked")
- Map<String, List<String>> userHeaders = (Map<String, List<String>>) request.invocationProperties.get(MessageContext.HTTP_REQUEST_HEADERS);
- boolean addUserAgent = true;
- if (userHeaders != null) {
- // userHeaders may not be modifiable like SingletonMap, just copy them
- reqHeaders.putAll(userHeaders);
- // application wants to use its own User-Agent header
- if (userHeaders.get("User-Agent") != null) {
- addUserAgent = false;
- }
- }
- if (addUserAgent) {
- reqHeaders.put("User-Agent", USER_AGENT);
- }
-
- addBasicAuth(request, reqHeaders);
- addCookies(request, reqHeaders);
-
- con = getTransport(request, reqHeaders);
- request.addSatellite(new HttpResponseProperties(con));
-
- ContentType ct = codec.getStaticContentType(request);
- if (ct == null) {
- ByteArrayBuffer buf = new ByteArrayBuffer();
-
- ct = codec.encode(request, buf);
- // data size is available, set it as Content-Length
- reqHeaders.put("Content-Length", Collections.singletonList(Integer.toString(buf.size())));
- reqHeaders.put("Content-Type", Collections.singletonList(ct.getContentType()));
- if (ct.getAcceptHeader() != null) {
- reqHeaders.put("Accept", Collections.singletonList(ct.getAcceptHeader()));
- }
- if (binding instanceof SOAPBinding) {
- writeSOAPAction(reqHeaders, ct.getSOAPActionHeader());
- }
-
- if (dump || LOGGER.isLoggable(Level.FINER)) {
- dump(buf, "HTTP request", reqHeaders);
- }
-
- buf.writeTo(con.getOutput());
- } else {
- // Set static Content-Type
- reqHeaders.put("Content-Type", Collections.singletonList(ct.getContentType()));
- if (ct.getAcceptHeader() != null) {
- reqHeaders.put("Accept", Collections.singletonList(ct.getAcceptHeader()));
- }
- if (binding instanceof SOAPBinding) {
- writeSOAPAction(reqHeaders, ct.getSOAPActionHeader());
- }
-
- if(dump || LOGGER.isLoggable(Level.FINER)) {
- ByteArrayBuffer buf = new ByteArrayBuffer();
- codec.encode(request, buf);
- dump(buf, "HTTP request - "+request.endpointAddress, reqHeaders);
- OutputStream out = con.getOutput();
- if (out != null) {
- buf.writeTo(out);
- }
- } else {
- OutputStream os = con.getOutput();
- if (os != null) {
- codec.encode(request, os);
- }
- }
- }
-
- con.closeOutput();
-
- return createResponsePacket(request, con);
- } catch(WebServiceException wex) {
- throw wex;
- } catch(Exception ex) {
- throw new WebServiceException(ex);
- }
- }
-
- private Packet createResponsePacket(Packet request, HttpClientTransport con) throws IOException {
- con.readResponseCodeAndMessage(); // throws IOE
- recordCookies(request, con);
-
- InputStream responseStream = con.getInput();
- if (dump || LOGGER.isLoggable(Level.FINER)) {
- ByteArrayBuffer buf = new ByteArrayBuffer();
- if (responseStream != null) {
- buf.write(responseStream);
- responseStream.close();
- }
- dump(buf,"HTTP response - "+request.endpointAddress+" - "+con.statusCode, con.getHeaders());
- responseStream = buf.newInputStream();
- }
-
- // Check if stream contains any data
- int cl = con.contentLength;
- InputStream tempIn = null;
- if (cl == -1) { // No Content-Length header
- tempIn = StreamUtils.hasSomeData(responseStream);
- if (tempIn != null) {
- responseStream = tempIn;
- }
- }
- if (cl == 0 || (cl == -1 && tempIn == null)) {
- if(responseStream != null) {
- responseStream.close(); // No data, so close the stream
- responseStream = null;
- }
-
- }
-
- // Allows only certain http status codes for a binding. For all
- // other status codes, throws exception
- checkStatusCode(responseStream, con); // throws ClientTransportException
-
- Packet reply = request.createClientResponse(null);
- reply.wasTransportSecure = con.isSecure();
- if (responseStream != null) {
- String contentType = con.getContentType();
- if (contentType != null && contentType.contains("text/html") && binding instanceof SOAPBinding) {
- throw new ClientTransportException(ClientMessages.localizableHTTP_STATUS_CODE(con.statusCode, con.statusMessage));
- }
- codec.decode(responseStream, contentType, reply);
- }
- return reply;
- }
-
- /*
- * Allows the following HTTP status codes.
- * SOAP 1.1/HTTP - 200, 202, 500
- * SOAP 1.2/HTTP - 200, 202, 400, 500
- * XML/HTTP - all
- *
- * For all other status codes, it throws an exception
- */
- private void checkStatusCode(InputStream in, HttpClientTransport con) throws IOException {
- int statusCode = con.statusCode;
- String statusMessage = con.statusMessage;
- // SOAP1.1 and SOAP1.2 differ here
- if (binding instanceof SOAPBinding) {
- if (binding.getSOAPVersion() == SOAPVersion.SOAP_12) {
- //In SOAP 1.2, Fault messages can be sent with 4xx and 5xx error codes
- if (statusCode == HttpURLConnection.HTTP_OK || statusCode == HttpURLConnection.HTTP_ACCEPTED || isErrorCode(statusCode)) {
- // acceptable status codes for SOAP 1.2
- if (isErrorCode(statusCode) && in == null) {
- // No envelope for the error, so throw an exception with http error details
- throw new ClientTransportException(ClientMessages.localizableHTTP_STATUS_CODE(statusCode, statusMessage));
- }
- return;
- }
- } else {
- // SOAP 1.1
- if (statusCode == HttpURLConnection.HTTP_OK || statusCode == HttpURLConnection.HTTP_ACCEPTED || statusCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
- // acceptable status codes for SOAP 1.1
- if (statusCode == HttpURLConnection.HTTP_INTERNAL_ERROR && in == null) {
- // No envelope for the error, so throw an exception with http error details
- throw new ClientTransportException(ClientMessages.localizableHTTP_STATUS_CODE(statusCode, statusMessage));
- }
- return;
- }
- }
- if (in != null) {
- in.close();
- }
- throw new ClientTransportException(ClientMessages.localizableHTTP_STATUS_CODE(statusCode, statusMessage));
- }
- // Every status code is OK for XML/HTTP
- }
-
- private boolean isErrorCode(int code) {
- //if(code/100 == 5/*Server-side error*/ || code/100 == 4 /*client error*/ ) {
- return code == 500 || code == 400;
- }
-
- private void addCookies(Packet context, Map<String, List<String>> reqHeaders) throws IOException {
- Boolean shouldMaintainSessionProperty =
- (Boolean) context.invocationProperties.get(BindingProvider.SESSION_MAINTAIN_PROPERTY);
- if (shouldMaintainSessionProperty != null && !shouldMaintainSessionProperty) {
- return; // explicitly turned off
- }
- if (sticky || (shouldMaintainSessionProperty != null && shouldMaintainSessionProperty)) {
- Map<String, List<String>> rememberedCookies = cookieJar.get(context.endpointAddress.getURI(), reqHeaders);
- processCookieHeaders(reqHeaders, rememberedCookies, "Cookie");
- processCookieHeaders(reqHeaders, rememberedCookies, "Cookie2");
- }
- }
-
- private void processCookieHeaders(Map<String, List<String>> requestHeaders, Map<String, List<String>> rememberedCookies, String cookieHeader) {
- List<String> jarCookies = rememberedCookies.get(cookieHeader);
- if (jarCookies != null && !jarCookies.isEmpty()) {
- List<String> resultCookies = mergeUserCookies(jarCookies, requestHeaders.get(cookieHeader));
- requestHeaders.put(cookieHeader, resultCookies);
- }
- }
-
- private List<String> mergeUserCookies(List<String> rememberedCookies, List<String> userCookies) {
-
- // nothing to merge
- if (userCookies == null || userCookies.isEmpty()) {
- return rememberedCookies;
- }
-
- Map<String, String> map = new HashMap<String, String>();
- cookieListToMap(rememberedCookies, map);
- cookieListToMap(userCookies, map);
-
- return new ArrayList<String>(map.values());
- }
-
- private void cookieListToMap(List<String> cookieList, Map<String, String> targetMap) {
- for(String cookie : cookieList) {
- int index = cookie.indexOf("=");
- String cookieName = cookie.substring(0, index);
- targetMap.put(cookieName, cookie);
- }
- }
-
- private void recordCookies(Packet context, HttpClientTransport con) throws IOException {
- Boolean shouldMaintainSessionProperty =
- (Boolean) context.invocationProperties.get(BindingProvider.SESSION_MAINTAIN_PROPERTY);
- if (shouldMaintainSessionProperty != null && !shouldMaintainSessionProperty) {
- return; // explicitly turned off
- }
- if (sticky || (shouldMaintainSessionProperty != null && shouldMaintainSessionProperty)) {
- cookieJar.put(context.endpointAddress.getURI(), con.getHeaders());
- }
- }
-
- private void addBasicAuth(Packet context, Map<String, List<String>> reqHeaders) {
- String user = (String) context.invocationProperties.get(BindingProvider.USERNAME_PROPERTY);
- if (user != null) {
- String pw = (String) context.invocationProperties.get(BindingProvider.PASSWORD_PROPERTY);
- if (pw != null) {
- StringBuilder buf = new StringBuilder(user);
- buf.append(":");
- buf.append(pw);
- String creds = DatatypeConverter.printBase64Binary(buf.toString().getBytes());
- reqHeaders.put("Authorization", Collections.singletonList("Basic "+creds));
- }
- }
- }
-
- /*
- * write SOAPAction header if the soapAction parameter is non-null or BindingProvider properties set.
- * BindingProvider properties take precedence.
- */
- private void writeSOAPAction(Map<String, List<String>> reqHeaders, String soapAction) {
- //dont write SOAPAction HTTP header for SOAP 1.2 messages.
- if(SOAPVersion.SOAP_12.equals(binding.getSOAPVersion())) {
- return;
- }
- if (soapAction != null) {
- reqHeaders.put("SOAPAction", Collections.singletonList(soapAction));
- } else {
- reqHeaders.put("SOAPAction", Collections.singletonList("\"\""));
- }
- }
-
- @Override
- public void preDestroy() {
- // nothing to do. Intentionally left empty.
- }
-
- @Override
- public HttpTransportPipe copy(TubeCloner cloner) {
- return new HttpTransportPipe(this,cloner);
- }
-
-
- private void dump(ByteArrayBuffer buf, String caption, Map<String, List<String>> headers) throws IOException {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- PrintWriter pw = new PrintWriter(baos, true);
- pw.println("---["+caption +"]---");
- for (Entry<String,List<String>> header : headers.entrySet()) {
- if(header.getValue().isEmpty()) {
- // I don't think this is legal, but let's just dump it,
- // as the point of the dump is to uncover problems.
- pw.println(header.getValue());
- } else {
- for (String value : header.getValue()) {
- pw.println(header.getKey()+": "+value);
- }
- }
- }
-
- if (buf.size() > HttpAdapter.dump_threshold) {
- byte[] b = buf.getRawData();
- baos.write(b, 0, HttpAdapter.dump_threshold);
- pw.println();
- pw.println(WsservletMessages.MESSAGE_TOO_LONG(HttpAdapter.class.getName() + ".dumpTreshold"));
- } else {
- buf.writeTo(baos);
- }
- pw.println("--------------------");
-
- String msg = baos.toString();
- if (dump) {
- System.out.println(msg);
- }
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.log(Level.FINER, msg);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java
deleted file mode 100644
index dea289c8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java
+++ /dev/null
@@ -1,472 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport.http.server;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferResult;
-import com.sun.xml.internal.ws.api.Component;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.databinding.MetadataReader;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.binding.BindingImpl;
-import com.sun.xml.internal.ws.api.server.*;
-import com.sun.xml.internal.ws.server.EndpointFactory;
-import com.sun.xml.internal.ws.server.ServerRtException;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import com.sun.xml.internal.ws.transport.http.HttpAdapterList;
-import com.sun.xml.internal.ws.transport.http.HttpAdapter;
-import com.sun.istack.internal.NotNull;
-
-import java.net.MalformedURLException;
-
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-import javax.xml.transform.TransformerException;
-import javax.xml.ws.*;
-import javax.xml.ws.spi.http.HttpContext;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.parsers.ParserConfigurationException;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Executor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.SAXException;
-import org.w3c.dom.Element;
-
-
-/**
- * Implements {@link Endpoint}.
- * <p/>
- * <p/>
- * This class accumulates the information necessary to create
- * {@link WSEndpoint}, and then when {@link #publish} method
- * is called it will be created.
- * <p/>
- * <p/>
- * This object also allows accumulated information to be retrieved.
- *
- * @author Jitendra Kotamraju
- */
-public class EndpointImpl extends Endpoint {
-
- private static final WebServicePermission ENDPOINT_PUBLISH_PERMISSION =
- new WebServicePermission("publishEndpoint");
-
- /**
- * Once the service is published, this field will
- * be set to the {@link HttpEndpoint} instance.
- * <p/>
- * But don't declare the type as {@link HttpEndpoint}
- * to avoid static type dependency that cause the class loading to
- * fail if the LW HTTP server doesn't exist.
- */
- private Object actualEndpoint;
-
- // information accumulated for creating WSEndpoint
- private final WSBinding binding;
- private @Nullable final Object implementor;
- private List<Source> metadata;
- private Executor executor;
- private Map<String, Object> properties = Collections.emptyMap(); // always non-null
- private boolean stopped;
- private @Nullable EndpointContext endpointContext;
- private @NotNull final Class<?> implClass;
- private final Invoker invoker;
- private Container container;
-
-
- public EndpointImpl(@NotNull BindingID bindingId, @NotNull Object impl,
- WebServiceFeature ... features) {
- this(bindingId, impl, impl.getClass(),
- InstanceResolver.createSingleton(impl).createInvoker(), features);
- }
-
- public EndpointImpl(@NotNull BindingID bindingId, @NotNull Class implClass,
- javax.xml.ws.spi.Invoker invoker,
- WebServiceFeature ... features) {
- this(bindingId, null, implClass, new InvokerImpl(invoker), features);
- }
-
- private EndpointImpl(@NotNull BindingID bindingId, Object impl, @NotNull Class implClass,
- Invoker invoker, WebServiceFeature ... features) {
- binding = BindingImpl.create(bindingId, features);
- this.implClass = implClass;
- this.invoker = invoker;
- this.implementor = impl;
- }
-
-
- /**
- * Wraps an already created {@link WSEndpoint} into an {@link EndpointImpl},
- * and immediately publishes it with the given context.
- *
- * @param wse created endpoint
- * @param serverContext supported http context
- * @deprecated This is a backdoor method. Don't use it unless you know what you are doing.
- */
- public EndpointImpl(WSEndpoint wse, Object serverContext) {
- this(wse, serverContext, null);
- }
-
- /**
- * Wraps an already created {@link WSEndpoint} into an {@link EndpointImpl},
- * and immediately publishes it with the given context.
- *
- * @param wse created endpoint
- * @param serverContext supported http context
- * @param ctxt endpoint context
- * @deprecated This is a backdoor method. Don't use it unless you know what you are doing.
- */
- public EndpointImpl(WSEndpoint wse, Object serverContext, EndpointContext ctxt) {
- endpointContext = ctxt;
- actualEndpoint = new HttpEndpoint(null, getAdapter(wse, ""));
- ((HttpEndpoint) actualEndpoint).publish(serverContext);
- binding = wse.getBinding();
- implementor = null; // this violates the semantics, but hey, this is a backdoor.
- implClass = null;
- invoker = null;
- }
-
- /**
- * Wraps an already created {@link WSEndpoint} into an {@link EndpointImpl},
- * and immediately publishes it with the given context.
- *
- * @param wse created endpoint
- * @param address endpoint address
- * @deprecated This is a backdoor method. Don't use it unless you know what you are doing.
- */
- public EndpointImpl(WSEndpoint wse, String address) {
- this(wse, address, null);
- }
-
-
- /**
- * Wraps an already created {@link WSEndpoint} into an {@link EndpointImpl},
- * and immediately publishes it with the given context.
- *
- * @param wse created endpoint
- * @param address endpoint address
- * @param ctxt endpoint context
- * @deprecated This is a backdoor method. Don't use it unless you know what you are doing.
- */
- public EndpointImpl(WSEndpoint wse, String address, EndpointContext ctxt) {
- URL url;
- try {
- url = new URL(address);
- } catch (MalformedURLException ex) {
- throw new IllegalArgumentException("Cannot create URL for this address " + address);
- }
- if (!url.getProtocol().equals("http")) {
- throw new IllegalArgumentException(url.getProtocol() + " protocol based address is not supported");
- }
- if (!url.getPath().startsWith("/")) {
- throw new IllegalArgumentException("Incorrect WebService address=" + address +
- ". The address's path should start with /");
- }
- endpointContext = ctxt;
- actualEndpoint = new HttpEndpoint(null, getAdapter(wse, url.getPath()));
- ((HttpEndpoint) actualEndpoint).publish(address);
- binding = wse.getBinding();
- implementor = null; // this violates the semantics, but hey, this is a backdoor.
- implClass = null;
- invoker = null;
- }
-
- public Binding getBinding() {
- return binding;
- }
-
- public Object getImplementor() {
- return implementor;
- }
-
- public void publish(String address) {
- canPublish();
- URL url;
- try {
- url = new URL(address);
- } catch (MalformedURLException ex) {
- throw new IllegalArgumentException("Cannot create URL for this address " + address);
- }
- if (!url.getProtocol().equals("http")) {
- throw new IllegalArgumentException(url.getProtocol() + " protocol based address is not supported");
- }
- if (!url.getPath().startsWith("/")) {
- throw new IllegalArgumentException("Incorrect WebService address=" + address +
- ". The address's path should start with /");
- }
- createEndpoint(url.getPath());
- ((HttpEndpoint) actualEndpoint).publish(address);
- }
-
- public void publish(Object serverContext) {
- canPublish();
- if (!com.sun.net.httpserver.HttpContext.class.isAssignableFrom(serverContext.getClass())) {
- throw new IllegalArgumentException(serverContext.getClass() + " is not a supported context.");
- }
- createEndpoint(((com.sun.net.httpserver.HttpContext)serverContext).getPath());
- ((HttpEndpoint) actualEndpoint).publish(serverContext);
- }
-
- public void publish(HttpContext serverContext) {
- canPublish();
- createEndpoint(serverContext.getPath());
- ((HttpEndpoint) actualEndpoint).publish(serverContext);
- }
-
- public void stop() {
- if (isPublished()) {
- ((HttpEndpoint) actualEndpoint).stop();
- actualEndpoint = null;
- stopped = true;
- }
- }
-
- public boolean isPublished() {
- return actualEndpoint != null;
- }
-
- public List<Source> getMetadata() {
- return metadata;
- }
-
- public void setMetadata(java.util.List<Source> metadata) {
- if (isPublished()) {
- throw new IllegalStateException("Cannot set Metadata. Endpoint is already published");
- }
- this.metadata = metadata;
- }
-
- public Executor getExecutor() {
- return executor;
- }
-
- public void setExecutor(Executor executor) {
- this.executor = executor;
- }
-
- public Map<String, Object> getProperties() {
- return new HashMap<String, Object>(properties);
- }
-
- public void setProperties(Map<String, Object> map) {
- this.properties = new HashMap<String, Object>(map);
- }
-
- /*
- * Checks the permission of "publishEndpoint" before accessing HTTP classes.
- * Also it checks if there is an available HTTP server implementation.
- */
- private void createEndpoint(String urlPattern) {
- // Checks permission for "publishEndpoint"
- SecurityManager sm = System.getSecurityManager();
- if (sm != null) {
- sm.checkPermission(ENDPOINT_PUBLISH_PERMISSION);
- }
-
- // See if HttpServer implementation is available
- try {
- Class.forName("com.sun.net.httpserver.HttpServer");
- } catch (Exception e) {
- throw new UnsupportedOperationException("Couldn't load light weight http server", e);
- }
- container = getContainer();
- MetadataReader metadataReader = EndpointFactory.getExternalMetadatReader(implClass, binding);
- WSEndpoint wse = WSEndpoint.create(
- implClass, true,
- invoker,
- getProperty(QName.class, Endpoint.WSDL_SERVICE),
- getProperty(QName.class, Endpoint.WSDL_PORT),
- container,
- binding,
- getPrimaryWsdl(metadataReader),
- buildDocList(),
- (EntityResolver) null,
- false
- );
- // Don't load HttpEndpoint class before as it may load HttpServer classes
- actualEndpoint = new HttpEndpoint(executor, getAdapter(wse, urlPattern));
- }
-
- private <T> T getProperty(Class<T> type, String key) {
- Object o = properties.get(key);
- if (o == null) return null;
- if (type.isInstance(o))
- return type.cast(o);
- else
- throw new IllegalArgumentException("Property " + key + " has to be of type " + type); // i18n
- }
-
- /**
- * Convert metadata sources using identity transform. So that we can
- * reuse the Source object multiple times.
- */
- private List<SDDocumentSource> buildDocList() {
- List<SDDocumentSource> r = new ArrayList<SDDocumentSource>();
-
- if (metadata != null) {
- for (Source source : metadata) {
- try {
- XMLStreamBufferResult xsbr = XmlUtil.identityTransform(source, new XMLStreamBufferResult());
- String systemId = source.getSystemId();
-
- r.add(SDDocumentSource.create(new URL(systemId), xsbr.getXMLStreamBuffer()));
- } catch (TransformerException te) {
- throw new ServerRtException("server.rt.err", te);
- } catch (IOException te) {
- throw new ServerRtException("server.rt.err", te);
- } catch (SAXException e) {
- throw new ServerRtException("server.rt.err", e);
- } catch (ParserConfigurationException e) {
- throw new ServerRtException("server.rt.err", e);
- }
- }
- }
-
- return r;
- }
-
- /**
- * Gets wsdl from @WebService or @WebServiceProvider
- */
- private @Nullable SDDocumentSource getPrimaryWsdl(MetadataReader metadataReader) {
- // Takes care of @WebService, @WebServiceProvider's wsdlLocation
- EndpointFactory.verifyImplementorClass(implClass, metadataReader);
- String wsdlLocation = EndpointFactory.getWsdlLocation(implClass, metadataReader);
- if (wsdlLocation != null) {
- ClassLoader cl = implClass.getClassLoader();
- URL url = cl.getResource(wsdlLocation);
- if (url != null) {
- return SDDocumentSource.create(url);
- }
- throw new ServerRtException("cannot.load.wsdl", wsdlLocation);
- }
- return null;
- }
-
- private void canPublish() {
- if (isPublished()) {
- throw new IllegalStateException(
- "Cannot publish this endpoint. Endpoint has been already published.");
- }
- if (stopped) {
- throw new IllegalStateException(
- "Cannot publish this endpoint. Endpoint has been already stopped.");
- }
- }
-
- public EndpointReference getEndpointReference(Element...referenceParameters) {
- return getEndpointReference(W3CEndpointReference.class, referenceParameters);
- }
-
- public <T extends EndpointReference> T getEndpointReference(Class<T> clazz, Element...referenceParameters) {
- if (!isPublished()) {
- throw new WebServiceException("Endpoint is not published yet");
- }
- return ((HttpEndpoint)actualEndpoint).getEndpointReference(clazz,referenceParameters);
- }
-
- @Override
- public void setEndpointContext(EndpointContext ctxt) {
- this.endpointContext = ctxt;
- }
-
- private HttpAdapter getAdapter(WSEndpoint endpoint, String urlPattern) {
- HttpAdapterList adapterList = null;
- if (endpointContext != null) {
- if (endpointContext instanceof Component) {
- adapterList = ((Component) endpointContext).getSPI(HttpAdapterList.class);
- }
-
- if (adapterList == null) {
- for(Endpoint e : endpointContext.getEndpoints()) {
- if (e.isPublished() && e != this) {
- adapterList = ((HttpEndpoint)(((EndpointImpl)e).actualEndpoint)).getAdapterOwner();
- assert adapterList != null;
- break;
- }
- }
- }
- }
- if (adapterList == null) {
- adapterList = new ServerAdapterList();
- }
- return adapterList.createAdapter("", urlPattern, endpoint);
- }
-
- /**
- * Endpoints within a EndpointContext get the same container.
- */
- private Container getContainer() {
- if (endpointContext != null) {
- if (endpointContext instanceof Component) {
- Container c = ((Component) endpointContext).getSPI(Container.class);
- if (c != null)
- return c;
- }
-
- for(Endpoint e : endpointContext.getEndpoints()) {
- if (e.isPublished() && e != this) {
- return ((EndpointImpl)e).container;
- }
- }
- }
- return new ServerContainer();
- }
-
- private static class InvokerImpl extends Invoker {
- private javax.xml.ws.spi.Invoker spiInvoker;
-
- InvokerImpl(javax.xml.ws.spi.Invoker spiInvoker) {
- this.spiInvoker = spiInvoker;
- }
-
- @Override
- public void start(@NotNull WSWebServiceContext wsc, @NotNull WSEndpoint endpoint) {
- try {
- spiInvoker.inject(wsc);
- } catch (IllegalAccessException e) {
- throw new WebServiceException(e);
- } catch (InvocationTargetException e) {
- throw new WebServiceException(e);
- }
- }
-
- public Object invoke(@NotNull Packet p, @NotNull Method m, @NotNull Object... args) throws InvocationTargetException, IllegalAccessException {
- return spiInvoker.invoke(m, args);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/HttpEndpoint.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/HttpEndpoint.java
deleted file mode 100644
index 585970b9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/HttpEndpoint.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport.http.server;
-
-import com.sun.net.httpserver.HttpContext;
-import com.sun.xml.internal.ws.transport.http.HttpAdapter;
-import com.sun.xml.internal.ws.transport.http.HttpAdapterList;
-import com.sun.xml.internal.ws.server.ServerRtException;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-
-import javax.xml.ws.EndpointReference;
-import java.util.concurrent.Executor;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.w3c.dom.Element;
-
-/**
- * Hides {@link HttpContext} so that {@link EndpointImpl}
- * may load even without {@link HttpContext}.
- *
- * TODO: But what's the point? If Light-weight HTTP server isn't present,
- * all the publish operations will fail way. Why is it better to defer
- * the failure, as opposed to cause the failure as earyl as possible? -KK
- *
- * @author Jitendra Kotamraju
- */
-public final class HttpEndpoint extends com.sun.xml.internal.ws.api.server.HttpEndpoint {
- private String address;
- private HttpContext httpContext;
- private final HttpAdapter adapter;
- private final Executor executor;
-
- public HttpEndpoint(Executor executor, HttpAdapter adapter) {
- this.executor = executor;
- this.adapter = adapter;
- }
-
- public void publish(String address) {
- this.address = address;
- httpContext = ServerMgr.getInstance().createContext(address);
- publish(httpContext);
- }
-
- public void publish(Object serverContext) {
- if (serverContext instanceof javax.xml.ws.spi.http.HttpContext) {
- setHandler((javax.xml.ws.spi.http.HttpContext)serverContext);
- return;
- }
- if (serverContext instanceof HttpContext) {
- this.httpContext = (HttpContext)serverContext;
- setHandler(httpContext);
- return;
- }
- throw new ServerRtException(ServerMessages.NOT_KNOW_HTTP_CONTEXT_TYPE(
- serverContext.getClass(), HttpContext.class,
- javax.xml.ws.spi.http.HttpContext.class));
- }
-
- HttpAdapterList getAdapterOwner() {
- return adapter.owner;
- }
-
- /**
- * This can be called only after publish
- * @return address of the Endpoint
- */
- private String getEPRAddress() {
- if (address == null)
- return httpContext.getServer().getAddress().toString();
- try {
- URL u = new URL(address);
- if (u.getPort() == 0) {
- return new URL(u.getProtocol(),u.getHost(),
- httpContext.getServer().getAddress().getPort(),u.getFile()).toString();
- }
- } catch (MalformedURLException murl) {}
- return address;
- }
-
- public void stop() {
- if (httpContext != null) {
- if (address == null) {
- // Application created its own HttpContext
- // httpContext.setHandler(null);
- httpContext.getServer().removeContext(httpContext);
- } else {
- // Remove HttpContext created by JAXWS runtime
- ServerMgr.getInstance().removeContext(httpContext);
- }
- }
-
- // Invoke WebService Life cycle method
- adapter.getEndpoint().dispose();
- }
-
- private void setHandler(HttpContext context) {
- context.setHandler(new WSHttpHandler(adapter, executor));
- }
-
- private void setHandler(javax.xml.ws.spi.http.HttpContext context) {
- context.setHandler(new PortableHttpHandler(adapter, executor));
- }
-
- public <T extends EndpointReference> T getEndpointReference(Class<T> clazz, Element...referenceParameters) {
- String eprAddress = getEPRAddress();
- return clazz.cast(adapter.getEndpoint().getEndpointReference(clazz, eprAddress,eprAddress+"?wsdl", referenceParameters));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableConnectionImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableConnectionImpl.java
deleted file mode 100644
index 6d65294e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableConnectionImpl.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport.http.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.server.WebServiceContextDelegate;
-import com.sun.xml.internal.ws.api.server.PortAddressResolver;
-import com.sun.xml.internal.ws.transport.http.HttpAdapter;
-import com.sun.xml.internal.ws.transport.http.WSHTTPConnection;
-import com.sun.xml.internal.ws.developer.JAXWSProperties;
-import com.sun.xml.internal.ws.resources.WsservletMessages;
-
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.spi.http.HttpExchange;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * {@link WSHTTPConnection} used with Java SE endpoints. It provides connection
- * implementation using {@link HttpExchange} object.
- *
- * @author Jitendra Kotamraju
- */
-final class PortableConnectionImpl extends WSHTTPConnection implements WebServiceContextDelegate {
-
- private final HttpExchange httpExchange;
- private int status;
- private final HttpAdapter adapter;
- private boolean outputWritten;
-
- public PortableConnectionImpl(@NotNull HttpAdapter adapter, @NotNull HttpExchange httpExchange) {
- this.adapter = adapter;
- this.httpExchange = httpExchange;
- }
-
- @Override
- @Property(value = {MessageContext.HTTP_REQUEST_HEADERS, Packet.INBOUND_TRANSPORT_HEADERS})
- public @NotNull Map<String,List<String>> getRequestHeaders() {
- return httpExchange.getRequestHeaders();
- }
-
- @Override
- public String getRequestHeader(String headerName) {
- return httpExchange.getRequestHeader(headerName);
- }
-
- @Override
- public void setResponseHeaders(Map<String,List<String>> headers) {
- Map<String, List<String>> r = httpExchange.getResponseHeaders();
- r.clear();
- for(Map.Entry <String, List<String>> entry : headers.entrySet()) {
- String name = entry.getKey();
- List<String> values = entry.getValue();
- // ignore headers that interfere with our correct operations
- if (!name.equalsIgnoreCase("Content-Length") && !name.equalsIgnoreCase("Content-Type")) {
- r.put(name,new ArrayList<String>(values));
- }
- }
- }
-
- @Override
- public void setResponseHeader(String key, List<String> value) {
- httpExchange.getResponseHeaders().put(key, value);
- }
-
- @Override
- public Set<String> getRequestHeaderNames() {
- return httpExchange.getRequestHeaders().keySet();
- }
-
- @Override
- public List<String> getRequestHeaderValues(String headerName) {
- return httpExchange.getRequestHeaders().get(headerName);
- }
-
- @Override
- @Property({MessageContext.HTTP_RESPONSE_HEADERS,Packet.OUTBOUND_TRANSPORT_HEADERS})
- public Map<String,List<String>> getResponseHeaders() {
- return httpExchange.getResponseHeaders();
- }
-
- @Override
- public void setContentTypeResponseHeader(@NotNull String value) {
- httpExchange.addResponseHeader("Content-Type", value);
- }
-
- @Override
- public void setStatus(int status) {
- this.status = status;
- }
-
- @Override
- @Property(MessageContext.HTTP_RESPONSE_CODE)
- public int getStatus() {
- return status;
- }
-
- public @Override @NotNull InputStream getInput() throws IOException {
- return httpExchange.getRequestBody();
- }
-
- public @Override @NotNull OutputStream getOutput() throws IOException {
- assert !outputWritten;
- outputWritten = true;
-
- httpExchange.setStatus(getStatus());
- return httpExchange.getResponseBody();
- }
-
- public @Override @NotNull WebServiceContextDelegate getWebServiceContextDelegate() {
- return this;
- }
-
- @Override
- public Principal getUserPrincipal(Packet request) {
- return httpExchange.getUserPrincipal();
- }
-
- @Override
- public boolean isUserInRole(Packet request, String role) {
- return httpExchange.isUserInRole(role);
- }
-
- public @Override @NotNull String getEPRAddress(Packet request, WSEndpoint endpoint) {
- PortAddressResolver resolver = adapter.owner.createPortAddressResolver(getBaseAddress(), endpoint.getImplementationClass());
- String address = resolver.getAddressFor(endpoint.getServiceName(), endpoint.getPortName().getLocalPart());
- if(address==null) {
- throw new WebServiceException(WsservletMessages.SERVLET_NO_ADDRESS_AVAILABLE(endpoint.getPortName()));
- }
- return address;
- }
-
- @Property(MessageContext.SERVLET_CONTEXT)
- public Object getServletContext() {
- return httpExchange.getAttribute(MessageContext.SERVLET_CONTEXT);
- }
-
- @Property(MessageContext.SERVLET_RESPONSE)
- public Object getServletResponse() {
- return httpExchange.getAttribute(MessageContext.SERVLET_RESPONSE);
- }
-
- @Property(MessageContext.SERVLET_REQUEST)
- public Object getServletRequest() {
- return httpExchange.getAttribute(MessageContext.SERVLET_REQUEST);
- }
-
- @Override
- public String getWSDLAddress(@NotNull Packet request, @NotNull WSEndpoint endpoint) {
- String eprAddress = getEPRAddress(request,endpoint);
- if(adapter.getEndpoint().getPort() != null) {
- return eprAddress+"?wsdl";
- } else {
- return null;
- }
- }
-
- @Override
- public boolean isSecure() {
- return httpExchange.getScheme().equals("https");
- }
-
- @Override
- @Property(MessageContext.HTTP_REQUEST_METHOD)
- public @NotNull String getRequestMethod() {
- return httpExchange.getRequestMethod();
- }
-
- @Override
- @Property(MessageContext.QUERY_STRING)
- public String getQueryString() {
- return httpExchange.getQueryString();
- }
-
- @Override
- @Property(MessageContext.PATH_INFO)
- public String getPathInfo() {
- return httpExchange.getPathInfo();
- }
-
- @Property(JAXWSProperties.HTTP_EXCHANGE)
- public HttpExchange getExchange() {
- return httpExchange;
- }
-
- @Override @NotNull
- public String getBaseAddress() {
- StringBuilder sb = new StringBuilder();
- sb.append(httpExchange.getScheme());
- sb.append("://");
- sb.append(httpExchange.getLocalAddress().getHostName());
- sb.append(":");
- sb.append(httpExchange.getLocalAddress().getPort());
- sb.append(httpExchange.getContextPath());
- return sb.toString();
- }
-
- @Override
- public String getProtocol() {
- return httpExchange.getProtocol();
- }
-
- @Override
- public void setContentLengthResponseHeader(int value) {
- httpExchange.addResponseHeader("Content-Length", ""+value);
- }
-
- @Override
- public String getRequestURI() {
- return httpExchange.getRequestURI().toString();
- }
-
- @Override
- public String getRequestScheme() {
- return httpExchange.getScheme();
- }
-
- @Override
- public String getServerName() {
- return httpExchange.getLocalAddress().getHostName();
- }
-
- @Override
- public int getServerPort() {
- return httpExchange.getLocalAddress().getPort();
- }
-
- @Override
- protected PropertyMap getPropertyMap() {
- return model;
- }
-
- private static final PropertyMap model;
-
- static {
- model = parse(PortableConnectionImpl.class);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableHttpHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableHttpHandler.java
deleted file mode 100644
index 000ac1da..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableHttpHandler.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.transport.http.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.resources.HttpserverMessages;
-import com.sun.xml.internal.ws.transport.http.HttpAdapter;
-import com.sun.xml.internal.ws.transport.http.WSHTTPConnection;
-
-import javax.xml.ws.spi.http.HttpHandler;
-import javax.xml.ws.spi.http.HttpExchange;
-import java.io.IOException;
-import java.util.concurrent.Executor;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * {@link HttpHandler} implementation that serves the actual request.
- *
- * @author Jitendra Kotamraju
- */
-final class PortableHttpHandler extends HttpHandler {
-
- private static final String GET_METHOD = "GET";
- private static final String POST_METHOD = "POST";
- private static final String HEAD_METHOD = "HEAD";
- private static final String PUT_METHOD = "PUT";
- private static final String DELETE_METHOD = "DELETE";
-
- private static final Logger logger =
- Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server.http");
-
- private final HttpAdapter adapter;
- private final Executor executor;
-
- public PortableHttpHandler(@NotNull HttpAdapter adapter, @Nullable Executor executor) {
- assert adapter!=null;
- this.adapter = adapter;
- this.executor = executor;
- }
-
- /**
- * Called by HttpServer when there is a matching request for the context
- */
- @Override
- public void handle(HttpExchange msg) {
- try {
- if (logger.isLoggable(Level.FINE)) {
- logger.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI());
- }
- if (executor != null) {
- // Use application's Executor to handle request. Application may
- // have set an executor using Endpoint.setExecutor().
- executor.execute(new HttpHandlerRunnable(msg));
- } else {
- handleExchange(msg);
- }
- } catch (Throwable e) {
- // Dont't propagate the exception otherwise it kills the httpserver
- logger.log(Level.SEVERE, null, e);
- }
- }
-
- public void handleExchange(HttpExchange msg) throws IOException {
- WSHTTPConnection con = new PortableConnectionImpl(adapter,msg);
- try {
- if (logger.isLoggable(Level.FINE)) {
- logger.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI());
- }
- String method = msg.getRequestMethod();
- if(method.equals(GET_METHOD) || method.equals(POST_METHOD) || method.equals(HEAD_METHOD)
- || method.equals(PUT_METHOD) || method.equals(DELETE_METHOD)) {
- adapter.handle(con);
- } else {
- logger.warning(HttpserverMessages.UNEXPECTED_HTTP_METHOD(method));
- }
- } finally {
- msg.close();
- }
- }
-
- /**
- * Wrapping the processing of request in a Runnable so that it can be
- * executed in Executor.
- */
- class HttpHandlerRunnable implements Runnable {
- final HttpExchange msg;
-
- HttpHandlerRunnable(HttpExchange msg) {
- this.msg = msg;
- }
-
- @Override
- @SuppressWarnings("CallToThreadDumpStack")
- public void run() {
- try {
- handleExchange(msg);
- } catch (Throwable e) {
- // Does application's executor handle this exception ?
- e.printStackTrace();
- }
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapter.java
deleted file mode 100644
index fec08192..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapter.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.transport.http.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.server.BoundEndpoint;
-import com.sun.xml.internal.ws.api.server.Module;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.server.WebModule;
-import com.sun.xml.internal.ws.transport.http.HttpAdapter;
-
-import javax.xml.ws.WebServiceException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * {@link HttpAdapter} for Endpoint API.
- *
- * <p>
- * This is a thin wrapper around {@link HttpAdapter}
- * with some description specified in the deployment (in particular those
- * information are related to how a request is routed to a {@link ServerAdapter}.
- *
- * <p>
- * This class implements {@link BoundEndpoint} and represent the
- * server-{@link WSEndpoint} association for Endpoint API's transport
- *
- * @author Jitendra Kotamraju
- */
-public final class ServerAdapter extends HttpAdapter implements BoundEndpoint {
- final String name;
-
- protected ServerAdapter(String name, String urlPattern, WSEndpoint endpoint, ServerAdapterList owner) {
- super(endpoint, owner, urlPattern);
- this.name = name;
- // registers itself with the container
- Module module = endpoint.getContainer().getSPI(Module.class);
- if(module==null)
- LOGGER.log(Level.WARNING, "Container {0} doesn''t support {1}",
- new Object[]{endpoint.getContainer(), Module.class});
- else {
- module.getBoundEndpoints().add(this);
- }
- }
-
- /**
- * Gets the name of the endpoint as given in the <tt>sun-jaxws.xml</tt>
- * deployment descriptor.
- */
- public String getName() {
- return name;
- }
-
-
- @Override
- public @NotNull URI getAddress() {
- WebModule webModule = endpoint.getContainer().getSPI(WebModule.class);
- if(webModule==null)
- // this is really a bug in the container implementation
- throw new WebServiceException("Container "+endpoint.getContainer()+" doesn't support "+WebModule.class);
-
- return getAddress(webModule.getContextPath());
- }
-
- @Override
- public @NotNull URI getAddress(String baseAddress) {
- String adrs = baseAddress+getValidPath();
- try {
- return new URI(adrs);
- } catch (URISyntaxException e) {
- // this is really a bug in the container implementation
- throw new WebServiceException("Unable to compute address for "+endpoint,e);
- }
- }
-
- public void dispose() {
- endpoint.dispose();
- }
-
- public String getUrlPattern() {
- return urlPattern;
- }
-
- @Override
- public String toString() {
- return super.toString()+"[name="+name+']';
- }
-
- private static final Logger LOGGER = Logger.getLogger(ServerAdapter.class.getName());
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapterList.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapterList.java
deleted file mode 100644
index 79e313e7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapterList.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2009, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport.http.server;
-
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.transport.http.HttpAdapterList;
-
-public class ServerAdapterList extends HttpAdapterList<ServerAdapter> {
- @Override
- protected ServerAdapter createHttpAdapter(String name, String urlPattern, WSEndpoint<?> endpoint) {
- return new ServerAdapter(name, urlPattern, endpoint, this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerConnectionImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerConnectionImpl.java
deleted file mode 100644
index 0f90cda1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerConnectionImpl.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport.http.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.net.httpserver.Headers;
-import com.sun.net.httpserver.HttpExchange;
-import com.sun.net.httpserver.HttpsExchange;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.server.WSEndpoint;
-import com.sun.xml.internal.ws.api.server.WebServiceContextDelegate;
-import com.sun.xml.internal.ws.api.server.PortAddressResolver;
-import com.sun.xml.internal.ws.transport.http.HttpAdapter;
-import com.sun.xml.internal.ws.transport.http.WSHTTPConnection;
-import com.sun.xml.internal.ws.developer.JAXWSProperties;
-import com.sun.xml.internal.ws.resources.WsservletMessages;
-import com.sun.xml.internal.ws.util.ReadAllStream;
-
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.WebServiceException;
-import java.io.FilterInputStream;
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-
-/**
- * {@link WSHTTPConnection} used with Java SE endpoints. It provides connection
- * implementation using {@link HttpExchange} object.
- *
- * @author Jitendra Kotamraju
- */
-final class ServerConnectionImpl extends WSHTTPConnection implements WebServiceContextDelegate {
-
- private final HttpExchange httpExchange;
- private int status;
- private final HttpAdapter adapter;
- private LWHSInputStream in;
- private OutputStream out;
-
-
- public ServerConnectionImpl(@NotNull HttpAdapter adapter, @NotNull HttpExchange httpExchange) {
- this.adapter = adapter;
- this.httpExchange = httpExchange;
- }
-
- @Override
- @Property(value = {MessageContext.HTTP_REQUEST_HEADERS, Packet.INBOUND_TRANSPORT_HEADERS})
- public @NotNull Map<String,List<String>> getRequestHeaders() {
- return httpExchange.getRequestHeaders();
- }
-
- @Override
- public String getRequestHeader(String headerName) {
- return httpExchange.getRequestHeaders().getFirst(headerName);
- }
-
- @Override
- public void setResponseHeaders(Map<String,List<String>> headers) {
- Headers r = httpExchange.getResponseHeaders();
- r.clear();
- for(Map.Entry <String, List<String>> entry : headers.entrySet()) {
- String name = entry.getKey();
- List<String> values = entry.getValue();
- // ignore headers that interfere with our correct operations
- if (!"Content-Length".equalsIgnoreCase(name) && !"Content-Type".equalsIgnoreCase(name)) {
- r.put(name,new ArrayList<String>(values));
- }
- }
- }
-
- @Override
- public void setResponseHeader(String key, List<String> value) {
- httpExchange.getResponseHeaders().put(key, value);
- }
-
- @Override
- public Set<String> getRequestHeaderNames() {
- return httpExchange.getRequestHeaders().keySet();
- }
-
- @Override
- public List<String> getRequestHeaderValues(String headerName) {
- return httpExchange.getRequestHeaders().get(headerName);
- }
-
- @Override
- @Property({MessageContext.HTTP_RESPONSE_HEADERS,Packet.OUTBOUND_TRANSPORT_HEADERS})
- public Map<String,List<String>> getResponseHeaders() {
- return httpExchange.getResponseHeaders();
- }
-
- @Override
- public void setContentTypeResponseHeader(@NotNull String value) {
- httpExchange.getResponseHeaders().set("Content-Type",value);
- }
-
- @Override
- public void setStatus(int status) {
- this.status = status;
- }
-
- @Override
- @Property(MessageContext.HTTP_RESPONSE_CODE)
- public int getStatus() {
- return status;
- }
-
- public @NotNull InputStream getInput() {
- if (in == null) {
- in = new LWHSInputStream(httpExchange.getRequestBody());
- }
- return in;
- }
-
- // Light weight http server's InputStream.close() throws exception if
- // all the bytes are not read. Work around until it is fixed.
- private static class LWHSInputStream extends FilterInputStream {
- // Workaround for "SJSXP XMLStreamReader.next() closes stream".
- boolean closed;
- boolean readAll;
-
- LWHSInputStream(InputStream in) {
- super(in);
- }
-
- void readAll() throws IOException {
- if (!closed && !readAll) {
- ReadAllStream all = new ReadAllStream();
- all.readAll(in, 4000000);
- in.close();
- in = all;
- readAll = true;
- }
- }
-
- @Override
- public void close() throws IOException {
- if (!closed) {
- readAll();
- super.close();
- closed = true;
- }
- }
-
- }
-
-
- public @NotNull OutputStream getOutput() throws IOException {
- if (out == null) {
- String lenHeader = httpExchange.getResponseHeaders().getFirst("Content-Length");
- int length = (lenHeader != null) ? Integer.parseInt(lenHeader) : 0;
- httpExchange.sendResponseHeaders(getStatus(), length);
-
- // Light weight http server's OutputStream.close() throws exception if
- // all the bytes are not read on the client side(StreamMessage on the client
- // side doesn't read all bytes.
- out = new FilterOutputStream(httpExchange.getResponseBody()) {
- boolean closed;
- @Override
- public void close() throws IOException {
- if (!closed) {
- closed = true;
- // lwhs closes input stream, when you close the output stream
- // This causes problems for streaming in one-way cases
- in.readAll();
- try {
- super.close();
- } catch(IOException ioe) {
- // Ignoring purposefully.
- }
- }
- }
-
- // Otherwise, FilterOutpuStream writes byte by byte
- @Override
- public void write(byte[] buf, int start, int len) throws IOException {
- out.write(buf, start, len);
- }
- };
- }
- return out;
- }
-
- public @NotNull WebServiceContextDelegate getWebServiceContextDelegate() {
- return this;
- }
-
- public Principal getUserPrincipal(Packet request) {
- return httpExchange.getPrincipal();
- }
-
- public boolean isUserInRole(Packet request, String role) {
- return false;
- }
-
- public @NotNull String getEPRAddress(Packet request, WSEndpoint endpoint) {
- //return WSHttpHandler.getRequestAddress(httpExchange);
-
- PortAddressResolver resolver = adapter.owner.createPortAddressResolver(getBaseAddress(), endpoint.getImplementationClass());
- String address = resolver.getAddressFor(endpoint.getServiceName(), endpoint.getPortName().getLocalPart());
- if(address==null)
- throw new WebServiceException(WsservletMessages.SERVLET_NO_ADDRESS_AVAILABLE(endpoint.getPortName()));
- return address;
-
- }
-
- public String getWSDLAddress(@NotNull Packet request, @NotNull WSEndpoint endpoint) {
- String eprAddress = getEPRAddress(request,endpoint);
- if(adapter.getEndpoint().getPort() != null)
- return eprAddress+"?wsdl";
- else
- return null;
- }
-
- @Override
- public boolean isSecure() {
- return (httpExchange instanceof HttpsExchange);
- }
-
- @Override
- @Property(MessageContext.HTTP_REQUEST_METHOD)
- public @NotNull String getRequestMethod() {
- return httpExchange.getRequestMethod();
- }
-
- @Override
- @Property(MessageContext.QUERY_STRING)
- public String getQueryString() {
- URI requestUri = httpExchange.getRequestURI();
- String query = requestUri.getQuery();
- if (query != null)
- return query;
- return null;
- }
-
- @Override
- @Property(MessageContext.PATH_INFO)
- public String getPathInfo() {
- URI requestUri = httpExchange.getRequestURI();
- String reqPath = requestUri.getPath();
- String ctxtPath = httpExchange.getHttpContext().getPath();
- if (reqPath.length() > ctxtPath.length()) {
- return reqPath.substring(ctxtPath.length());
- }
- return null;
- }
-
- @Property(JAXWSProperties.HTTP_EXCHANGE)
- public HttpExchange getExchange() {
- return httpExchange;
- }
-
- @Override @NotNull
- public String getBaseAddress() {
- /*
- * Computes the Endpoint's address from the request. Use "Host" header
- * so that it has correct address(IP address or someother hostname)
- * through which the application reached the endpoint.
- *
- */
- StringBuilder strBuf = new StringBuilder();
- strBuf.append((httpExchange instanceof HttpsExchange) ? "https" : "http");
- strBuf.append("://");
-
- String hostHeader = httpExchange.getRequestHeaders().getFirst("Host");
- if (hostHeader != null) {
- strBuf.append(hostHeader); // Uses Host header
- } else {
- strBuf.append(httpExchange.getLocalAddress().getHostName());
- strBuf.append(":");
- strBuf.append(httpExchange.getLocalAddress().getPort());
- }
- //Do not include URL pattern here
- //strBuf.append(httpExchange.getRequestURI().getPath());
-
- return strBuf.toString();
- }
-
- @Override
- public String getProtocol() {
- return httpExchange.getProtocol();
- }
-
- @Override
- public void setContentLengthResponseHeader(int value) {
- httpExchange.getResponseHeaders().set("Content-Length", ""+value);
- }
-
- @Override
- public String getRequestURI() {
- return httpExchange.getRequestURI().toString();
- }
-
- @Override
- public String getRequestScheme() {
- return (httpExchange instanceof HttpsExchange) ? "https" : "http";
- }
-
- @Override
- public String getServerName() {
- return httpExchange.getLocalAddress().getHostName();
- }
-
- @Override
- public int getServerPort() {
- return httpExchange.getLocalAddress().getPort();
- }
-
- protected PropertyMap getPropertyMap() {
- return model;
- }
-
- private static final PropertyMap model;
-
- static {
- model = parse(ServerConnectionImpl.class);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerContainer.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerContainer.java
deleted file mode 100644
index 80c7dc9b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerContainer.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport.http.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.server.BoundEndpoint;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.server.Module;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- *
- * @author Jitendra Kotamraju
- */
-class ServerContainer extends Container {
-
- private final Module module = new Module() {
- private final List<BoundEndpoint> endpoints = new ArrayList<BoundEndpoint>();
-
- public @NotNull List<BoundEndpoint> getBoundEndpoints() {
- return endpoints;
- }
- };
-
- public <T> T getSPI(Class<T> spiType) {
- T t = super.getSPI(spiType);
- if (t != null)
- return t;
- if (spiType == Module.class) {
- return spiType.cast(module);
- }
- return null;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java
deleted file mode 100644
index a579a3c7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.transport.http.server;
-
-import com.sun.net.httpserver.HttpContext;
-import com.sun.net.httpserver.HttpServer;
-import com.sun.xml.internal.ws.server.ServerRtException;
-
-import java.net.InetSocketAddress;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.logging.Logger;
-
-/**
- * Manages all the WebService HTTP servers created by JAXWS runtime.
- *
- * @author Jitendra Kotamraju
- */
-final class ServerMgr {
-
- private static final ServerMgr serverMgr = new ServerMgr();
- private static final Logger logger =
- Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server.http");
- private final Map<InetSocketAddress,ServerState> servers = new HashMap<InetSocketAddress,ServerState>();
-
- private ServerMgr() {}
-
- /**
- * Gets the singleton instance.
- * @return manager instance
- */
- static ServerMgr getInstance() {
- return serverMgr;
- }
-
- /*
- * Creates a HttpContext at the given address. If there is already a server
- * it uses that server to create a context. Otherwise, it creates a new
- * HTTP server. This sever is added to servers Map.
- */
- /*package*/ HttpContext createContext(String address) {
- try {
- HttpServer server;
- ServerState state;
- URL url = new URL(address);
- int port = url.getPort();
- if (port == -1) {
- port = url.getDefaultPort();
- }
- InetSocketAddress inetAddress = new InetSocketAddress(url.getHost(),
- port);
- synchronized(servers) {
- state = servers.get(inetAddress);
- if (state == null) {
- final int finalPortNum = port;
- for (ServerState s: servers.values()) {
- if (s.getServer()
- .getAddress()
- .getPort() == finalPortNum) {
- state = s;
- break;
- }
- }
-
- if (!inetAddress.getAddress().isAnyLocalAddress() ||
- state == null) {
- logger.fine("Creating new HTTP Server at "+inetAddress);
- // Creates server with default socket backlog
- server = HttpServer.create(inetAddress, 0);
- server.setExecutor(Executors.newCachedThreadPool());
- String path = url.toURI().getPath();
- logger.fine("Creating HTTP Context at = "+path);
- HttpContext context = server.createContext(path);
- server.start();
-
- // we have to get actual inetAddress from server, which can differ from the original in some cases.
- // e.g. A port number of zero will let the system pick up an ephemeral port in a bind operation,
- // or IP: 0.0.0.0 - which is used to monitor network traffic from any valid IP address
- inetAddress = server.getAddress();
-
- logger.fine("HTTP server started = "+inetAddress);
- state = new ServerState(server, path);
- servers.put(inetAddress, state);
- return context;
- }
- }
- }
- server = state.getServer();
-
- if (state.getPaths().contains(url.getPath())) {
- String err = "Context with URL path "+url.getPath()+ " already exists on the server "+server.getAddress();
- logger.fine(err);
- throw new IllegalArgumentException(err);
- }
-
- logger.fine("Creating HTTP Context at = "+url.getPath());
- HttpContext context = server.createContext(url.getPath());
- state.oneMoreContext(url.getPath());
- return context;
- } catch(Exception e) {
- throw new ServerRtException("server.rt.err",e );
- }
- }
-
- /*
- * Removes a context. If the server doesn't have anymore contexts, it
- * would stop the server and server is removed from servers Map.
- */
- /*package*/ void removeContext(HttpContext context) {
- InetSocketAddress inetAddress = context.getServer().getAddress();
- synchronized(servers) {
- ServerState state = servers.get(inetAddress);
- int instances = state.noOfContexts();
- if (instances < 2) {
- ((ExecutorService)state.getServer().getExecutor()).shutdown();
- state.getServer().stop(0);
- servers.remove(inetAddress);
- } else {
- state.getServer().removeContext(context);
- state.oneLessContext(context.getPath());
- }
- }
- }
-
- private static final class ServerState {
- private final HttpServer server;
- private int instances;
- private Set<String> paths = new HashSet<String>();
-
- ServerState(HttpServer server, String path) {
- this.server = server;
- this.instances = 1;
- paths.add(path);
- }
-
- public HttpServer getServer() {
- return server;
- }
-
- public void oneMoreContext(String path) {
- ++instances;
- paths.add(path);
- }
-
- public void oneLessContext(String path) {
- --instances;
- paths.remove(path);
- }
-
- public int noOfContexts() {
- return instances;
- }
-
- public Set<String> getPaths() {
- return paths;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/WSHttpHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/WSHttpHandler.java
deleted file mode 100644
index 4653b237..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/WSHttpHandler.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.transport.http.server;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.net.httpserver.HttpExchange;
-import com.sun.net.httpserver.HttpHandler;
-import com.sun.xml.internal.ws.resources.HttpserverMessages;
-import com.sun.xml.internal.ws.transport.http.HttpAdapter;
-import com.sun.xml.internal.ws.transport.http.WSHTTPConnection;
-
-import java.io.IOException;
-import java.util.concurrent.Executor;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * {@link HttpHandler} implementation that serves the actual request.
- *
- * @author Jitendra Kotamraju
- * @author Kohsuke Kawaguhi
- */
-final class WSHttpHandler implements HttpHandler {
-
- private static final String GET_METHOD = "GET";
- private static final String POST_METHOD = "POST";
- private static final String HEAD_METHOD = "HEAD";
- private static final String PUT_METHOD = "PUT";
- private static final String DELETE_METHOD = "DELETE";
-
- private static final Logger LOGGER =
- Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server.http");
- private static final boolean fineTraceEnabled = LOGGER.isLoggable(Level.FINE);
-
- private final HttpAdapter adapter;
- private final Executor executor;
-
- public WSHttpHandler(@NotNull HttpAdapter adapter, @Nullable Executor executor) {
- assert adapter!=null;
- this.adapter = adapter;
- this.executor = executor;
- }
-
- /**
- * Called by HttpServer when there is a matching request for the context
- */
- public void handle(HttpExchange msg) {
- try {
- if (fineTraceEnabled) {
- LOGGER.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI());
- }
- if (executor != null) {
- // Use application's Executor to handle request. Application may
- // have set an executor using Endpoint.setExecutor().
- executor.execute(new HttpHandlerRunnable(msg));
- } else {
- handleExchange(msg);
- }
- } catch(Throwable e) {
- // Dont't propagate the exception otherwise it kills the httpserver
- }
- }
-
- private void handleExchange(HttpExchange msg) throws IOException {
- WSHTTPConnection con = new ServerConnectionImpl(adapter,msg);
- try {
- if (fineTraceEnabled) {
- LOGGER.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI());
- }
- String method = msg.getRequestMethod();
- if(method.equals(GET_METHOD) || method.equals(POST_METHOD) || method.equals(HEAD_METHOD)
- || method.equals(PUT_METHOD) || method.equals(DELETE_METHOD)) {
- adapter.handle(con);
- } else {
- if (LOGGER.isLoggable(Level.WARNING)) {
- LOGGER.warning(HttpserverMessages.UNEXPECTED_HTTP_METHOD(method));
- }
- }
- } finally {
- msg.close();
- }
- }
-
- /**
- * Wrapping the processing of request in a Runnable so that it can be
- * executed in Executor.
- */
- class HttpHandlerRunnable implements Runnable {
- final HttpExchange msg;
-
- HttpHandlerRunnable(HttpExchange msg) {
- this.msg = msg;
- }
-
- public void run() {
- try {
- handleExchange(msg);
- } catch (Throwable e) {
- // Does application's executor handle this exception ?
- e.printStackTrace();
- }
- }
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ASCIIUtility.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ASCIIUtility.java
deleted file mode 100644
index 18ee0389..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ASCIIUtility.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * Copied from mail.jar.
- */
-public class ASCIIUtility {
- // Private constructor so that this class is not instantiated
- private ASCIIUtility() { }
-
-
- /**
- * Convert the bytes within the specified range of the given byte
- * array into a signed integer in the given radix . The range extends
- * from <code>start</code> till, but not including <code>end</code>. <p>
- *
- * Based on java.lang.Integer.parseInt()
- */
- public static int parseInt(byte[] b, int start, int end, int radix)
- throws NumberFormatException {
- if (b == null)
- throw new NumberFormatException("null");
-
- int result = 0;
- boolean negative = false;
- int i = start;
- int limit;
- int multmin;
- int digit;
-
- if (end > start) {
- if (b[i] == '-') {
- negative = true;
- limit = Integer.MIN_VALUE;
- i++;
- } else {
- limit = -Integer.MAX_VALUE;
- }
- multmin = limit / radix;
- if (i < end) {
- digit = Character.digit((char)b[i++], radix);
- if (digit < 0) {
- throw new NumberFormatException(
- "illegal number: " + toString(b, start, end)
- );
- } else {
- result = -digit;
- }
- }
- while (i < end) {
- // Accumulating negatively avoids surprises near MAX_VALUE
- digit = Character.digit((char)b[i++], radix);
- if (digit < 0) {
- throw new NumberFormatException("illegal number");
- }
- if (result < multmin) {
- throw new NumberFormatException("illegal number");
- }
- result *= radix;
- if (result < limit + digit) {
- throw new NumberFormatException("illegal number");
- }
- result -= digit;
- }
- } else {
- throw new NumberFormatException("illegal number");
- }
- if (negative) {
- if (i > start + 1) {
- return result;
- } else { /* Only got "-" */
- throw new NumberFormatException("illegal number");
- }
- } else {
- return -result;
- }
- }
-
- /**
- * Convert the bytes within the specified range of the given byte
- * array into a String. The range extends from <code>start</code>
- * till, but not including <code>end</code>. <p>
- */
- public static String toString(byte[] b, int start, int end) {
- int size = end - start;
- char[] theChars = new char[size];
-
- for (int i = 0, j = start; i < size; )
- theChars[i++] = (char)(b[j++]&0xff);
-
- return new String(theChars);
- }
-
- public static void copyStream(InputStream is, OutputStream out) throws IOException {
- int size = 1024;
- byte[] buf = new byte[size];
- int len;
-
- while ((len = is.read(buf, 0, size)) != -1)
- out.write(buf, 0, len);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayBuffer.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayBuffer.java
deleted file mode 100644
index e85a23d9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayBuffer.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-/**
- * Read/write buffer that stores a sequence of bytes.
- *
- * <p>
- * It works in a way similar to {@link ByteArrayOutputStream} but
- * this class works better in the following ways:
- *
- * <ol>
- * <li>no synchronization
- * <li>offers a {@link #newInputStream()} that creates a new {@link InputStream}
- * that won't cause buffer reallocation.
- * <li>less parameter correctness checking
- * <li>offers a {@link #write(InputStream)} method that reads the entirety of the
- * given {@link InputStream} without using a temporary buffer.
- * </ol>
- *
- * @author Kohsuke Kawaguchi
- */
-public class ByteArrayBuffer extends OutputStream {
- /**
- * The buffer where data is stored.
- */
- protected byte[] buf;
-
- /**
- * The number of valid bytes in the buffer.
- */
- private int count;
-
- private static final int CHUNK_SIZE = 4096;
-
- /**
- * Creates a new byte array output stream. The buffer capacity is
- * initially 32 bytes, though its size increases if necessary.
- */
- public ByteArrayBuffer() {
- this(32);
- }
-
- /**
- * Creates a new byte array output stream, with a buffer capacity of
- * the specified size, in bytes.
- *
- * @param size the initial size.
- * @throws IllegalArgumentException if size is negative.
- */
- public ByteArrayBuffer(int size) {
- if (size <= 0)
- throw new IllegalArgumentException();
- buf = new byte[size];
- }
-
- public ByteArrayBuffer(byte[] data) {
- this(data,data.length);
- }
-
- public ByteArrayBuffer(byte[] data, int length) {
- this.buf = data;
- this.count = length;
- }
-
- /**
- * Reads all the data of the given {@link InputStream} and appends them
- * into this buffer.
- *
- * @throws IOException
- * if the read operation fails with an {@link IOException}.
- */
- public final void write(InputStream in) throws IOException {
- while(true) {
- int cap = buf.length-count; // the remaining buffer space
- int sz = in.read(buf,count,cap);
- if(sz<0) return; // hit EOS
- count += sz;
-
-
- if(cap==sz)
- ensureCapacity(buf.length*2); // buffer filled up.
- }
- }
-
- public final void write(int b) {
- int newcount = count + 1;
- ensureCapacity(newcount);
- buf[count] = (byte) b;
- count = newcount;
- }
-
- public final void write(byte b[], int off, int len) {
- int newcount = count + len;
- ensureCapacity(newcount);
- System.arraycopy(b, off, buf, count, len);
- count = newcount;
- }
-
- private void ensureCapacity(int newcount) {
- if (newcount > buf.length) {
- byte newbuf[] = new byte[Math.max(buf.length << 1, newcount)];
- System.arraycopy(buf, 0, newbuf, 0, count);
- buf = newbuf;
- }
- }
-
- public final void writeTo(OutputStream out) throws IOException {
- // Instead of writing out.write(buf, 0, count)
- // Writing it in chunks that would help larger payloads
- // Also if out is System.out on windows, it doesn't show on the console
- // for larger data.
- int remaining = count;
- int off = 0;
- while(remaining > 0) {
- int chunk = (remaining > CHUNK_SIZE) ? CHUNK_SIZE : remaining;
- out.write(buf, off, chunk);
- remaining -= chunk;
- off += chunk;
- }
- }
-
- public final void reset() {
- count = 0;
- }
-
- /**
- * Gets the <b>copy</b> of exact-size byte[] that represents the written data.
- *
- * <p>
- * Since this method needs to allocate a new byte[], this method will be costly.
- *
- * @deprecated
- * this method causes a buffer reallocation. Use it only when
- * you have to.
- */
- public final byte[] toByteArray() {
- byte newbuf[] = new byte[count];
- System.arraycopy(buf, 0, newbuf, 0, count);
- return newbuf;
- }
-
- public final int size() {
- return count;
- }
-
- /**
- * Gets the underlying buffer that this {@link ByteArrayBuffer} uses.
- * It's never small than its {@link #size()}.
- *
- * Use with caution.
- */
- public final byte[] getRawData() {
- return buf;
- }
-
- public void close() throws IOException {
- }
-
- /**
- * Creates a new {@link InputStream} that reads from this buffer.
- */
- public final InputStream newInputStream() {
- return new ByteArrayInputStream(buf,0,count);
- }
-
- /**
- * Creates a new {@link InputStream} that reads a part of this bfufer.
- */
- public final InputStream newInputStream(int start, int length) {
- return new ByteArrayInputStream(buf,start,length);
- }
-
- /**
- * Decodes the contents of this buffer by the default encoding
- * and returns it as a string.
- *
- * <p>
- * Meant to aid debugging, but no more.
- */
- public String toString() {
- return new String(buf, 0, count);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayDataSource.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayDataSource.java
deleted file mode 100644
index 0aa23ee0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayDataSource.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import javax.activation.DataSource;
-
-/**
- * {@link DataSource} backed by a byte buffer.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class ByteArrayDataSource implements DataSource {
-
- private final String contentType;
- private final byte[] buf;
- private final int start;
- private final int len;
-
- public ByteArrayDataSource(byte[] buf, String contentType) {
- this(buf,0,buf.length,contentType);
- }
- public ByteArrayDataSource(byte[] buf, int length, String contentType) {
- this(buf,0,length,contentType);
- }
- public ByteArrayDataSource(byte[] buf, int start, int length, String contentType) {
- this.buf = buf;
- this.start = start;
- this.len = length;
- this.contentType = contentType;
- }
-
- public String getContentType() {
- if(contentType==null)
- return "application/octet-stream";
- return contentType;
- }
-
- public InputStream getInputStream() {
- return new ByteArrayInputStream(buf,start,len);
- }
-
- public String getName() {
- return null;
- }
-
- public OutputStream getOutputStream() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/CompletedFuture.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/CompletedFuture.java
deleted file mode 100644
index 376bcea5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/CompletedFuture.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-
-/**
- * {@link Future} implementation that obtains an already available value.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public class CompletedFuture<T> implements Future<T> {
- private final T v;
- private final Throwable re;
-
- public CompletedFuture(T v, Throwable re) {
- this.v = v;
- this.re = re;
- }
-
- public boolean cancel(boolean mayInterruptIfRunning) {
- return false;
- }
-
- public boolean isCancelled() {
- return false;
- }
-
- public boolean isDone() {
- return true;
- }
-
- public T get() throws ExecutionException {
- if (re != null) {
- throw new ExecutionException(re);
- }
- return v;
- }
-
- public T get(long timeout, TimeUnit unit) throws ExecutionException {
- return get();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Constants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Constants.java
deleted file mode 100644
index 7432a12e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Constants.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-/**
- * This holds generic constants information for the whole JAX-WS SI.
- *
- * @author WS Development Team
- */
-
-public class Constants {
- /**
- * WS SI Logging Domain
- */
- public static final String LoggingDomain = "com.sun.xml.internal.ws";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/DOMUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/DOMUtil.java
deleted file mode 100644
index e5f8cb7c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/DOMUtil.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.util;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import org.w3c.dom.*;
-
-import javax.xml.XMLConstants;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * @author JAXWS Development Team
- */
-public class DOMUtil {
-
- private static DocumentBuilder db;
-
- /**
- * Creates a new DOM document.
- */
- public static Document createDom() {
- synchronized (DOMUtil.class) {
- if (db == null) {
- try {
- DocumentBuilderFactory dbf = XmlUtil.newDocumentBuilderFactory();
- dbf.setNamespaceAware(true);
- db = dbf.newDocumentBuilder();
- } catch (ParserConfigurationException e) {
- throw new FactoryConfigurationError(e);
- }
- }
- return db.newDocument();
- }
- }
-
- /**
- * Traverses a DOM node and writes out on a streaming writer.
- *
- * @param node
- * @param writer
- */
- public static void serializeNode(Element node, XMLStreamWriter writer) throws XMLStreamException {
- writeTagWithAttributes(node, writer);
-
- if (node.hasChildNodes()) {
- NodeList children = node.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- switch (child.getNodeType()) {
- case Node.PROCESSING_INSTRUCTION_NODE:
- writer.writeProcessingInstruction(child.getNodeValue());
- break;
- case Node.DOCUMENT_TYPE_NODE:
- break;
- case Node.CDATA_SECTION_NODE:
- writer.writeCData(child.getNodeValue());
- break;
- case Node.COMMENT_NODE:
- writer.writeComment(child.getNodeValue());
- break;
- case Node.TEXT_NODE:
- writer.writeCharacters(child.getNodeValue());
- break;
- case Node.ELEMENT_NODE:
- serializeNode((Element) child, writer);
- break;
- default: break;
- }
- }
- }
- writer.writeEndElement();
- }
-
- public static void writeTagWithAttributes(Element node, XMLStreamWriter writer) throws XMLStreamException {
- String nodePrefix = fixNull(node.getPrefix());
- String nodeNS = fixNull(node.getNamespaceURI());
- //fix to work with DOM level 1 nodes.
- String nodeLocalName = node.getLocalName()== null?node.getNodeName():node.getLocalName();
-
- // See if nodePrefix:nodeNS is declared in writer's NamespaceContext before writing start element
- // Writing start element puts nodeNS in NamespaceContext even though namespace declaration not written
- boolean prefixDecl = isPrefixDeclared(writer, nodeNS, nodePrefix);
- writer.writeStartElement(nodePrefix, nodeLocalName, nodeNS);
-
- if (node.hasAttributes()) {
- NamedNodeMap attrs = node.getAttributes();
- int numOfAttributes = attrs.getLength();
- // write namespace declarations first.
- // if we interleave this with attribue writing,
- // Zephyr will try to fix it and we end up getting inconsistent namespace bindings.
- for (int i = 0; i < numOfAttributes; i++) {
- Node attr = attrs.item(i);
- String nsUri = fixNull(attr.getNamespaceURI());
- if (nsUri.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
- // handle default ns declarations
- String local = attr.getLocalName().equals(XMLConstants.XMLNS_ATTRIBUTE) ? "" : attr.getLocalName();
- if (local.equals(nodePrefix) && attr.getNodeValue().equals(nodeNS)) {
- prefixDecl = true;
- }
- if (local.equals("")) {
- writer.writeDefaultNamespace(attr.getNodeValue());
- } else {
- // this is a namespace declaration, not an attribute
- writer.setPrefix(attr.getLocalName(), attr.getNodeValue());
- writer.writeNamespace(attr.getLocalName(), attr.getNodeValue());
- }
- }
- }
- }
- // node's namespace is not declared as attribute, but declared on ancestor
- if (!prefixDecl) {
- writer.writeNamespace(nodePrefix, nodeNS);
- }
-
- // Write all other attributes which are not namespace decl.
- if (node.hasAttributes()) {
- NamedNodeMap attrs = node.getAttributes();
- int numOfAttributes = attrs.getLength();
-
- for (int i = 0; i < numOfAttributes; i++) {
- Node attr = attrs.item(i);
- String attrPrefix = fixNull(attr.getPrefix());
- String attrNS = fixNull(attr.getNamespaceURI());
- if (!attrNS.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
- String localName = attr.getLocalName();
- if (localName == null) {
- // TODO: this is really a bug in the caller for not creating proper DOM tree.
- // will remove this workaround after plugfest
- localName = attr.getNodeName();
- }
- boolean attrPrefixDecl = isPrefixDeclared(writer, attrNS, attrPrefix);
- if (!attrPrefix.equals("") && !attrPrefixDecl) {
- // attr has namespace but namespace decl is there in ancestor node
- // So write the namespace decl before writing the attr
- writer.setPrefix(attr.getLocalName(), attr.getNodeValue());
- writer.writeNamespace(attrPrefix, attrNS);
- }
- writer.writeAttribute(attrPrefix, attrNS, localName, attr.getNodeValue());
- }
- }
- }
- }
-
- private static boolean isPrefixDeclared(XMLStreamWriter writer, String nsUri, String prefix) {
- boolean prefixDecl = false;
- NamespaceContext nscontext = writer.getNamespaceContext();
- Iterator prefixItr = nscontext.getPrefixes(nsUri);
- while (prefixItr.hasNext()) {
- if (prefix.equals(prefixItr.next())) {
- prefixDecl = true;
- break;
- }
- }
- return prefixDecl;
- }
-
- /**
- * Gets the first child of the given name, or null.
- */
- public static Element getFirstChild(Element e, String nsUri, String local) {
- for (Node n = e.getFirstChild(); n != null; n = n.getNextSibling()) {
- if (n.getNodeType() == Node.ELEMENT_NODE) {
- Element c = (Element) n;
- if (c.getLocalName().equals(local) && c.getNamespaceURI().equals(nsUri)) {
- return c;
- }
- }
- }
- return null;
- }
-
- private static
- @NotNull
- String fixNull(@Nullable String s) {
- if (s == null) {
- return "";
- } else {
- return s;
- }
- }
-
- /**
- * Gets the first element child.
- */
- public static
- @Nullable
- Element getFirstElementChild(Node parent) {
- for (Node n = parent.getFirstChild(); n != null; n = n.getNextSibling()) {
- if (n.getNodeType() == Node.ELEMENT_NODE) {
- return (Element) n;
- }
- }
- return null;
- }
-
- public static @NotNull
- List<Element> getChildElements(Node parent){
- List<Element> elements = new ArrayList<Element>();
- for (Node n = parent.getFirstChild(); n != null; n = n.getNextSibling()) {
- if (n.getNodeType() == Node.ELEMENT_NODE) {
- elements.add((Element)n);
- }
- }
- return elements;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetReflection.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetReflection.java
deleted file mode 100644
index 8745d549..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetReflection.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-
-
-/**
- *
- * @author Santiago.PericasGeertsen@sun.com
- * @author Paul.Sandoz@sun.com
- */
-public class FastInfosetReflection {
- /**
- * FI StAXDocumentParser constructor using reflection.
- */
- public static final Constructor fiStAXDocumentParser_new;
-
- /**
- * FI <code>StAXDocumentParser.setInputStream()</code> method via reflection.
- */
- public static final Method fiStAXDocumentParser_setInputStream;
-
- /**
- * FI <code>StAXDocumentParser.setStringInterning()</code> method via reflection.
- */
- public static final Method fiStAXDocumentParser_setStringInterning;
-
- static {
- Constructor tmp_new = null;
- Method tmp_setInputStream = null;
- Method tmp_setStringInterning = null;
-
- // Use reflection to avoid static dependency with FI jar
- try {
- Class clazz = Class.forName("com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser");
- tmp_new = clazz.getConstructor();
- tmp_setInputStream =
- clazz.getMethod("setInputStream", java.io.InputStream.class);
- tmp_setStringInterning =
- clazz.getMethod("setStringInterning", boolean.class);
- }
- catch (Exception e) {
- // falls through
- }
- fiStAXDocumentParser_new = tmp_new;
- fiStAXDocumentParser_setInputStream = tmp_setInputStream;
- fiStAXDocumentParser_setStringInterning = tmp_setStringInterning;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetUtil.java
deleted file mode 100644
index 2c971e14..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetUtil.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import com.sun.xml.internal.ws.streaming.XMLReaderException;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderException;
-
-import javax.xml.stream.XMLStreamReader;
-import java.io.InputStream;
-
-public class FastInfosetUtil {
-
- /**
- * Returns the FI parser allocated for this thread.
- */
- public static XMLStreamReader createFIStreamReader(InputStream in) {
- // Check if compatible implementation of FI was found
- if (FastInfosetReflection.fiStAXDocumentParser_new == null) {
- throw new XMLReaderException("fastinfoset.noImplementation");
- }
-
- try {
- // Do not use StAX pluggable layer for FI
- Object sdp = FastInfosetReflection.fiStAXDocumentParser_new.newInstance();
- FastInfosetReflection.fiStAXDocumentParser_setStringInterning.invoke(sdp, Boolean.TRUE);
- FastInfosetReflection.fiStAXDocumentParser_setInputStream.invoke(sdp, in);
- return (XMLStreamReader) sdp;
- } catch (Exception e) {
- throw new XMLStreamReaderException(e);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationInfo.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationInfo.java
deleted file mode 100644
index 16ba6cae..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationInfo.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.ws.handler.Handler;
-
-/**
- * Used to hold a list of handlers and a set of roles from an
- * annotated endpoint. At runtime, these are created by the
- * HandlerAnnotationProcessor at the request of client and
- * server code to create the handler chains.
- *
- * @see com.sun.xml.internal.ws.util.HandlerAnnotationProcessor
- *
- * @author JAX-WS Development Team
- */
-public class HandlerAnnotationInfo {
-
- private List<Handler> handlers;
- private Set<String> roles;
-
- /**
- * Return the handlers specified by the handler chain descriptor.
- *
- * @return A list of jax-ws handler objects.
- */
- public List<Handler> getHandlers() {
- return handlers;
- }
-
- /**
- * This method should only be called by HandlerAnnotationProcessor.
- *
- * @param handlers The handlers specified by the handler chain descriptor.
- */
- public void setHandlers(List<Handler> handlers) {
- this.handlers = handlers;
- }
-
- /**
- * Return the roles contained in the handler chain descriptor.
- *
- * @return A set of roles.
- */
- public Set<String> getRoles() {
- return roles;
- }
-
- /**
- * This method should only be called by HandlerAnnotationProcessor.
- *
- * @param roles The roles contained in the handler chain descriptor.
- */
- public void setRoles(Set<String> roles) {
- this.roles = roles;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java
deleted file mode 100644
index c777feae..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.databinding.MetadataReader;
-import com.sun.xml.internal.ws.api.server.AsyncProvider;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.handler.HandlerChainsModel;
-import com.sun.xml.internal.ws.model.ReflectAnnotationReader;
-import com.sun.xml.internal.ws.server.EndpointFactory;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.istack.internal.NotNull;
-
-import javax.jws.HandlerChain;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPMessageHandlers;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.Provider;
-import javax.xml.ws.Service;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.logging.Logger;
-
-/**
- * <p>Used by client and server side to create handler information
- * from annotated class. The public methods all return a
- * HandlerChainInfo that contains the handlers and role information
- * needed at runtime.
- *
- * <p>All of the handler chain descriptors follow the same schema,
- * whether they are wsdl customizations, handler files specified
- * by an annotation, or are included in the sun-jaxws.xml file.
- * So this class is used for all handler xml information. The
- * two public entry points are
- * {@link HandlerAnnotationProcessor#buildHandlerInfo}, called
- * when you have an annotated class that points to a file.
- *
- * <p>The methods in the class are static so that it may called
- * from the runtime statically.
- *
- * @see com.sun.xml.internal.ws.util.HandlerAnnotationInfo
- *
- * @author JAX-WS Development Team
- */
-public class HandlerAnnotationProcessor {
-
- private static final Logger logger = Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".util");
-
- /**
- * <p>This method is called by
- * {@link EndpointFactory} when
- * they have an annotated class.
- *
- * <p>If there is no handler chain annotation on the class,
- * this method will return null. Otherwise it will load the
- * class and call the parseHandlerFile method to read the
- * information.
- *
- * @return A HandlerAnnotationInfo object that stores the
- * handlers and roles. Will return null if the class passed
- * in has no handler chain annotation.
- */
- public static HandlerAnnotationInfo buildHandlerInfo(@NotNull
- Class<?> clazz, QName serviceName, QName portName, WSBinding binding) {
-
- MetadataReader metadataReader = EndpointFactory.getExternalMetadatReader(clazz, binding);
- if (metadataReader == null) {
- metadataReader = new ReflectAnnotationReader();
- }
-
-// clazz = checkClass(clazz);
- HandlerChain handlerChain = metadataReader.getAnnotation(HandlerChain.class, clazz);
- if (handlerChain == null) {
- clazz = getSEI(clazz, metadataReader);
- if (clazz != null)
- handlerChain = metadataReader.getAnnotation(HandlerChain.class, clazz);
- if (handlerChain == null)
- return null;
- }
-
- if (clazz.getAnnotation(SOAPMessageHandlers.class) != null) {
- throw new UtilException(
- "util.handler.cannot.combine.soapmessagehandlers");
- }
- InputStream iStream = getFileAsStream(clazz, handlerChain);
- XMLStreamReader reader =
- XMLStreamReaderFactory.create(null,iStream, true);
- XMLStreamReaderUtil.nextElementContent(reader);
- HandlerAnnotationInfo handlerAnnInfo = HandlerChainsModel.parseHandlerFile(reader, clazz.getClassLoader(),
- serviceName, portName, binding);
- try {
- reader.close();
- iStream.close();
- } catch (XMLStreamException e) {
- e.printStackTrace();
- throw new UtilException(e.getMessage());
- } catch (IOException e) {
- e.printStackTrace();
- throw new UtilException(e.getMessage());
- }
- return handlerAnnInfo;
- }
-
- public static HandlerChainsModel buildHandlerChainsModel(final Class<?> clazz) {
- if(clazz == null) {
- return null;
- }
- HandlerChain handlerChain =
- clazz.getAnnotation(HandlerChain.class);
- if(handlerChain == null)
- return null;
- InputStream iStream = getFileAsStream(clazz, handlerChain);
- XMLStreamReader reader =
- XMLStreamReaderFactory.create(null,iStream, true);
- XMLStreamReaderUtil.nextElementContent(reader);
- HandlerChainsModel handlerChainsModel = HandlerChainsModel.parseHandlerConfigFile(clazz, reader);
- try {
- reader.close();
- iStream.close();
- } catch (XMLStreamException e) {
- e.printStackTrace();
- throw new UtilException(e.getMessage());
- } catch (IOException e) {
- e.printStackTrace();
- throw new UtilException(e.getMessage());
- }
- return handlerChainsModel;
- }
-
- static Class getClass(String className) {
- try {
- return Thread.currentThread().getContextClassLoader().loadClass(
- className);
- } catch (ClassNotFoundException e) {
- throw new UtilException("util.handler.class.not.found",
- className);
- }
- }
-
- static Class getSEI(Class<?> clazz, MetadataReader metadataReader) {
- if (metadataReader == null) {
- metadataReader = new ReflectAnnotationReader();
- }
-
- if (Provider.class.isAssignableFrom(clazz) || AsyncProvider.class.isAssignableFrom(clazz)) {
- //No SEI for Provider Implementation
- return null;
- }
- if (Service.class.isAssignableFrom(clazz)) {
- //No SEI for Service class
- return null;
- }
-
- WebService webService = metadataReader.getAnnotation(WebService.class, clazz);
- if (webService == null) {
- throw new UtilException("util.handler.no.webservice.annotation", clazz.getCanonicalName());
- }
-
- String ei = webService.endpointInterface();
- if (ei.length() > 0) {
- clazz = getClass(webService.endpointInterface());
- WebService ws = metadataReader.getAnnotation(WebService.class, clazz);
- if (ws == null) {
- throw new UtilException("util.handler.endpoint.interface.no.webservice",
- webService.endpointInterface());
- }
- return clazz;
- }
- return null;
- }
-
- static InputStream getFileAsStream(Class clazz, HandlerChain chain) {
- URL url = clazz.getResource(chain.file());
- if (url == null) {
- url = Thread.currentThread().getContextClassLoader().
- getResource(chain.file());
- }
- if (url == null) {
- String tmp = clazz.getPackage().getName();
- tmp = tmp.replace('.', '/');
- tmp += "/" + chain.file();
- url =
- Thread.currentThread().getContextClassLoader().getResource(tmp);
- }
- if (url == null) {
- throw new UtilException("util.failed.to.find.handlerchain.file",
- clazz.getName(), chain.file());
- }
- try {
- return url.openStream();
- } catch (IOException e) {
- throw new UtilException("util.failed.to.parse.handlerchain.file",
- clazz.getName(), chain.file());
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/InjectionPlan.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/InjectionPlan.java
deleted file mode 100644
index 3e055d2b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/InjectionPlan.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.concurrent.Callable;
-
-import javax.annotation.Resource;
-import javax.xml.ws.WebServiceException;
-
-/**
- * Encapsulates which field/method the injection is done, and performs the
- * injection.
- */
-public abstract class InjectionPlan<T, R> {
- /**
- * Perform injection
- *
- * @param instance
- * Instance
- * @param resource
- * Resource
- */
- public abstract void inject(T instance, R resource);
-
- /**
- * Perform injection, but resource is only generated if injection is
- * necessary.
- *
- * @param instance
- * @param resource
- */
- public void inject(T instance, Callable<R> resource) {
- try {
- inject(instance, resource.call());
- } catch(Exception e) {
- throw new WebServiceException(e);
- }
- }
-
- /*
- * Injects to a field.
- */
- public static class FieldInjectionPlan<T, R> extends
- InjectionPlan<T, R> {
- private final Field field;
-
- public FieldInjectionPlan(Field field) {
- this.field = field;
- }
-
- public void inject(final T instance, final R resource) {
- AccessController.doPrivileged(new PrivilegedAction<Object>() {
- public Object run() {
- try {
- if (!field.isAccessible()) {
- field.setAccessible(true);
- }
- field.set(instance, resource);
- return null;
- } catch (IllegalAccessException e) {
- throw new WebServiceException(e);
- }
- }
- });
- }
- }
-
- /*
- * Injects to a method.
- */
- public static class MethodInjectionPlan<T, R> extends
- InjectionPlan<T, R> {
- private final Method method;
-
- public MethodInjectionPlan(Method method) {
- this.method = method;
- }
-
- public void inject(T instance, R resource) {
- invokeMethod(method, instance, resource);
- }
- }
-
- /*
- * Helper for invoking a method with elevated privilege.
- */
- private static void invokeMethod(final Method method, final Object instance, final Object... args) {
- if(method==null) return;
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
- public Void run() {
- try {
- if (!method.isAccessible()) {
- method.setAccessible(true);
- }
- method.invoke(instance,args);
- } catch (IllegalAccessException e) {
- throw new WebServiceException(e);
- } catch (InvocationTargetException e) {
- throw new WebServiceException(e);
- }
- return null;
- }
- });
- }
-
- /*
- * Combines multiple {@link InjectionPlan}s into one.
- */
- private static class Compositor<T, R> extends InjectionPlan<T, R> {
- private final Collection<InjectionPlan<T, R>> children;
-
- public Compositor(Collection<InjectionPlan<T, R>> children) {
- this.children = children;
- }
-
- public void inject(T instance, R res) {
- for (InjectionPlan<T, R> plan : children)
- plan.inject(instance, res);
- }
-
- public void inject(T instance, Callable<R> resource) {
- if (!children.isEmpty()) {
- super.inject(instance, resource);
- }
- }
- }
-
- /*
- * Creates an {@link InjectionPlan} that injects the given resource type to the given class.
- *
- * @param isStatic
- * Only look for static field/method
- *
- */
- public static <T,R>
- InjectionPlan<T,R> buildInjectionPlan(Class<? extends T> clazz, Class<R> resourceType, boolean isStatic) {
- List<InjectionPlan<T,R>> plan = new ArrayList<InjectionPlan<T,R>>();
-
- Class<?> cl = clazz;
- while(cl != Object.class) {
- for(Field field: cl.getDeclaredFields()) {
- Resource resource = field.getAnnotation(Resource.class);
- if (resource != null) {
- if(isInjectionPoint(resource, field.getType(),
- "Incorrect type for field"+field.getName(),
- resourceType)) {
-
- if(isStatic && !Modifier.isStatic(field.getModifiers()))
- throw new WebServiceException("Static resource "+resourceType+" cannot be injected to non-static "+field);
-
- plan.add(new FieldInjectionPlan<T,R>(field));
- }
- }
- }
- cl = cl.getSuperclass();
- }
-
- cl = clazz;
- while(cl != Object.class) {
- for(Method method : cl.getDeclaredMethods()) {
- Resource resource = method.getAnnotation(Resource.class);
- if (resource != null) {
- Class[] paramTypes = method.getParameterTypes();
- if (paramTypes.length != 1)
- throw new WebServiceException("Incorrect no of arguments for method "+method);
- if(isInjectionPoint(resource,paramTypes[0],
- "Incorrect argument types for method"+method.getName(),
- resourceType)) {
-
- if(isStatic && !Modifier.isStatic(method.getModifiers()))
- throw new WebServiceException("Static resource "+resourceType+" cannot be injected to non-static "+method);
-
- plan.add(new MethodInjectionPlan<T,R>(method));
- }
- }
- }
- cl = cl.getSuperclass();
- }
-
- return new Compositor<T,R>(plan);
- }
-
- /*
- * Returns true if the combination of {@link Resource} and the field/method type
- * are consistent for {@link WebServiceContext} injection.
- */
- private static boolean isInjectionPoint(Resource resource, Class fieldType, String errorMessage, Class resourceType ) {
- Class t = resource.type();
- if (t.equals(Object.class)) {
- return fieldType.equals(resourceType);
- } else if (t.equals(resourceType)) {
- if (fieldType.isAssignableFrom(resourceType)) {
- return true;
- } else {
- // type compatibility error
- throw new WebServiceException(errorMessage);
- }
- }
- return false;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/JAXWSUtils.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/JAXWSUtils.java
deleted file mode 100644
index 5505cf63..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/JAXWSUtils.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.util;
-
-import java.util.UUID;
-import java.util.regex.Pattern;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.io.File;
-import java.io.IOException;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author Vivek Pandey
- *
- * Wrapper utility class to be used from the generated code or run time.
- */
-public final class JAXWSUtils {
- public static String getUUID(){
- return UUID.randomUUID().toString();
- }
-
-
-
- public static String getFileOrURLName(String fileOrURL) {
- try{
- try {
- return escapeSpace(new URL(fileOrURL).toExternalForm());
- } catch (MalformedURLException e) {
- return new File(fileOrURL).getCanonicalFile().toURL().toExternalForm();
- }
- } catch (Exception e) {
- // try it as an URL
- return fileOrURL;
- }
- }
-
- public static URL getFileOrURL(String fileOrURL) throws IOException {
- try {
- URL url = new URL(fileOrURL);
- String scheme = String.valueOf(url.getProtocol()).toLowerCase();
- if (scheme.equals("http") || scheme.equals("https"))
- return new URL(url.toURI().toASCIIString());
- return url;
- } catch (URISyntaxException e) {
- return new File(fileOrURL).toURL();
- } catch (MalformedURLException e) {
- return new File(fileOrURL).toURL();
- }
- }
-
- public static URL getEncodedURL(String urlStr) throws MalformedURLException {
- URL url = new URL(urlStr);
- String scheme = String.valueOf(url.getProtocol()).toLowerCase();
- if (scheme.equals("http") || scheme.equals("https")) {
- try {
- return new URL(url.toURI().toASCIIString());
- } catch (URISyntaxException e) {
- MalformedURLException malformedURLException = new MalformedURLException(e.getMessage());
- malformedURLException.initCause(e);
- throw malformedURLException;
- }
- }
- return url;
- }
-
- private static String escapeSpace( String url ) {
- // URLEncoder didn't work.
- StringBuilder buf = new StringBuilder();
- for (int i = 0; i < url.length(); i++) {
- // TODO: not sure if this is the only character that needs to be escaped.
- if (url.charAt(i) == ' ')
- buf.append("%20");
- else
- buf.append(url.charAt(i));
- }
- return buf.toString();
- }
-
- public static String absolutize(String name) {
- // absolutize all the system IDs in the input,
- // so that we can map system IDs to DOM trees.
- try {
- URL baseURL = new File(".").getCanonicalFile().toURL();
- return new URL(baseURL, name).toExternalForm();
- } catch( IOException e) {
- //ignore
- }
- return name;
- }
-
- /**
- * Checks if the system ID is absolute.
- */
- @SuppressWarnings("ResultOfObjectAllocationIgnored")
- public static void checkAbsoluteness(String systemId) {
- // we need to be able to handle system IDs like "urn:foo", which java.net.URL can't process,
- // but OTOH we also need to be able to process system IDs like "file://a b c/def.xsd",
- // which java.net.URI can't process. So for now, let's fail only if both of them fail.
- // eventually we need a proper URI class that works for us.
- try {
- new URL(systemId);
- } catch( MalformedURLException mue) {
- try {
- new URI(systemId);
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("system ID '"+systemId+"' isn't absolute",e);
- }
- }
- }
-
- /*
- * To match, both QNames must have the same namespace and the local
- * part of the target must match the local part of the 'pattern'
- * QName, which may contain wildcard characters.
- */
- public static boolean matchQNames(QName target, QName pattern) {
- if ((target == null) || (pattern == null)) {
- // if no service or port is in descriptor
- return false;
- }
- if (pattern.getNamespaceURI().equals(target.getNamespaceURI())) {
- String regex = pattern.getLocalPart().replaceAll("\\*", ".*");
- return Pattern.matches(regex, target.getLocalPart());
- }
- return false;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/MetadataUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/MetadataUtil.java
deleted file mode 100644
index 00d223a9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/MetadataUtil.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.server.SDDocument;
-import com.sun.xml.internal.ws.wsdl.SDDocumentResolver;
-
-import java.util.*;
-
-/**
- * WSDL, schema document metadata utility class.
- *
- * @author Jitendra Kotamraju
- */
-public class MetadataUtil {
-
- /**
- * Gets closure of all the referenced documents from the primary document(typically
- * the service WSDL). It traverses the WSDL and schema imports and builds a closure
- * set of documents.
- *
- * @param systemId primary wsdl or the any root document
- * @param resolver used to get SDDocumentImpl for a document
- * @param onlyTopLevelSchemas if true, the imported schemas from a schema would be ignored
- * @return all the documents
- */
- public static Map<String, SDDocument> getMetadataClosure(@NotNull String systemId,
- @NotNull SDDocumentResolver resolver, boolean onlyTopLevelSchemas) {
- Map <String, SDDocument> closureDocs = new HashMap<String, SDDocument>();
- Set<String> remaining = new HashSet<String>();
- remaining.add(systemId);
-
- while(!remaining.isEmpty()) {
- Iterator<String> it = remaining.iterator();
- String current = it.next();
- remaining.remove(current);
-
- SDDocument currentDoc = resolver.resolve(current);
- SDDocument old = closureDocs.put(currentDoc.getURL().toExternalForm(), currentDoc);
- assert old == null;
-
- Set<String> imports = currentDoc.getImports();
- if (!currentDoc.isSchema() || !onlyTopLevelSchemas) {
- for(String importedDoc : imports) {
- if (closureDocs.get(importedDoc) == null) {
- remaining.add(importedDoc);
- }
- }
- }
- }
-
- return closureDocs;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NamespaceSupport.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NamespaceSupport.java
deleted file mode 100644
index 5b45480b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NamespaceSupport.java
+++ /dev/null
@@ -1,746 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import java.util.ArrayList;
-import java.util.EmptyStackException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import com.sun.xml.internal.ws.encoding.soap.streaming.SOAPNamespaceConstants;
-
-/**
- * Encapsulate Namespace logic for use by SAX drivers.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This class encapsulates the logic of Namespace processing:
- * it tracks the declarations currently in force for each context
- * and automatically processes qualified XML 1.0 names into their
- * Namespace parts; it can also be used in reverse for generating
- * XML 1.0 from Namespaces.</p>
- *
- * <p>Namespace support objects are reusable, but the reset method
- * must be invoked between each session.</p>
- *
- * <p>Here is a simple session:</p>
- *
- * <pre>
- * String parts[] = new String[3];
- * NamespaceSupport support = new NamespaceSupport();
- *
- * support.pushContext();
- * support.declarePrefix("", "http://www.w3.org/1999/xhtml");
- * support.declarePrefix("dc", "http://www.purl.org/dc#");
- *
- * String parts[] = support.processName("p", parts, false);
- * System.out.println("Namespace URI: " + parts[0]);
- * System.out.println("Local name: " + parts[1]);
- * System.out.println("Raw name: " + parts[2]);
-
- * String parts[] = support.processName("dc:title", parts, false);
- * System.out.println("Namespace URI: " + parts[0]);
- * System.out.println("Local name: " + parts[1]);
- * System.out.println("Raw name: " + parts[2]);
-
- * support.popContext();
- * </pre>
- *
- * <p>Note that this class is optimized for the use case where most
- * elements do not contain Namespace declarations: if the same
- * prefix/URI mapping is repeated for each context (for example), this
- * class will be somewhat less efficient.</p>
- *
- * @author David Megginson
- * @author WS Development Team
- */
-public final class NamespaceSupport {
-
- /* added two new methods, slideContextUp() and slideContextDown()
- * needed to implement the revised streaming parser class (Parser2)
- */
-
- ////////////////////////////////////////////////////////////////////
- // Constants.
- ////////////////////////////////////////////////////////////////////
-
- /**
- * The XML Namespace as a constant.
- *
- * <p>This is the Namespace URI that is automatically mapped
- * to the "xml" prefix.</p>
- */
- public final static String XMLNS = "http://www.w3.org/XML/1998/namespace";
-
- /**
- * An empty enumeration.
- */
- private final static Iterable<String> EMPTY_ENUMERATION =
- new ArrayList<String>();
-
- ////////////////////////////////////////////////////////////////////
- // Constructor.
- ////////////////////////////////////////////////////////////////////
-
- /**
- * Create a new Namespace support object.
- */
- public NamespaceSupport() {
- reset();
- }
-
- // PBG May 6 2002 added a copy constructor to support recording
- public NamespaceSupport(NamespaceSupport that) {
- contexts = new Context[that.contexts.length];
- currentContext = null;
- contextPos = that.contextPos;
-
- Context currentParent = null;
-
- for (int i = 0; i < that.contexts.length; i++) {
- Context thatContext = that.contexts[i];
-
- if (thatContext == null) {
- contexts[i] = null;
- continue;
- }
-
- Context thisContext = new Context(thatContext, currentParent);
- contexts[i] = thisContext;
- if (that.currentContext == thatContext) {
- currentContext = thisContext;
- }
-
- currentParent = thisContext;
- }
- }
-
- ////////////////////////////////////////////////////////////////////
- // Context management.
- ////////////////////////////////////////////////////////////////////
-
- /**
- * Reset this Namespace support object for reuse.
- *
- * <p>It is necessary to invoke this method before reusing the
- * Namespace support object for a new session.</p>
- */
- public void reset() {
- contexts = new Context[32];
- contextPos = 0;
- contexts[contextPos] = currentContext = new Context();
- currentContext.declarePrefix("xml", XMLNS);
- }
-
- /**
- * Start a new Namespace context.
- *
- * <p>Normally, you should push a new context at the beginning
- * of each XML element: the new context will automatically inherit
- * the declarations of its parent context, but it will also keep
- * track of which declarations were made within this context.</p>
- *
- * <p>The Namespace support object always starts with a base context
- * already in force: in this context, only the "xml" prefix is
- * declared.</p>
- *
- * @see #popContext
- */
- public void pushContext() {
- int max = contexts.length;
- contextPos++;
-
- // Extend the array if necessary
- if (contextPos >= max) {
- Context newContexts[] = new Context[max * 2];
- System.arraycopy(contexts, 0, newContexts, 0, max);
- contexts = newContexts;
- }
-
- // Allocate the context if necessary.
- currentContext = contexts[contextPos];
- if (currentContext == null) {
- contexts[contextPos] = currentContext = new Context();
- }
-
- // Set the parent, if any.
- if (contextPos > 0) {
- currentContext.setParent(contexts[contextPos - 1]);
- }
- }
-
- /**
- * Revert to the previous Namespace context.
- *
- * <p>Normally, you should pop the context at the end of each
- * XML element. After popping the context, all Namespace prefix
- * mappings that were previously in force are restored.</p>
- *
- * <p>You must not attempt to declare additional Namespace
- * prefixes after popping a context, unless you push another
- * context first.</p>
- *
- * @see #pushContext
- */
- public void popContext() {
- contextPos--;
- if (contextPos < 0) {
- throw new EmptyStackException();
- }
- currentContext = contexts[contextPos];
- }
-
- /*
- * added for the revised streaming parser class (Parser2)
- * Move the context artificially up one level (i.e. contracting it).
- */
- public void slideContextUp() {
- contextPos--;
- currentContext = contexts[contextPos];
- }
-
- /*
- * added for the revised streaming parser class (Parser2)
- * Move the context artificially down one level (i.e. expanding it).
- */
- public void slideContextDown() {
- contextPos++;
-
- if (contexts[contextPos] == null) {
- // trying to slide to a context that was never created
- contexts[contextPos] = contexts[contextPos - 1];
- }
-
- currentContext = contexts[contextPos];
- }
-
- ////////////////////////////////////////////////////////////////////
- // Operations within a context.
- ////////////////////////////////////////////////////////////////////
-
- /**
- * Declare a Namespace prefix.
- *
- * <p>This method declares a prefix in the current Namespace
- * context; the prefix will remain in force until this context
- * is popped, unless it is shadowed in a descendant context.</p>
- *
- * <p>To declare a default Namespace, use the empty string. The
- * prefix must not be "xml" or "xmlns".</p>
- *
- * <p>Note that you must <em>not</em> declare a prefix after
- * you've pushed and popped another Namespace.</p>
- *
- * <p>Note that there is an asymmetry in this library: while {@link
- * #getPrefix getPrefix} will not return the default "" prefix,
- * even if you have declared one; to check for a default prefix,
- * you have to look it up explicitly using {@link #getURI getURI}.
- * This asymmetry exists to make it easier to look up prefixes
- * for attribute names, where the default prefix is not allowed.</p>
- *
- * @param prefix The prefix to declare, or null for the empty
- * string.
- * @param uri The Namespace URI to associate with the prefix.
- * @return true if the prefix was legal, false otherwise
- * @see #processName
- * @see #getURI
- * @see #getPrefix
- */
- public boolean declarePrefix(String prefix, String uri) {
- // bugfix#: 4989753
- if ((prefix.equals("xml") && !uri.equals(SOAPNamespaceConstants.XMLNS))
- || prefix.equals("xmlns")) {
- return false;
- } else {
- currentContext.declarePrefix(prefix, uri);
- return true;
- }
- }
-
- /**
- * Process a raw XML 1.0 name.
- *
- * <p>This method processes a raw XML 1.0 name in the current
- * context by removing the prefix and looking it up among the
- * prefixes currently declared. The return value will be the
- * array supplied by the caller, filled in as follows:</p>
- *
- * <dl>
- * <dt>parts[0]</dt>
- * <dd>The Namespace URI, or an empty string if none is
- * in use.</dd>
- * <dt>parts[1]</dt>
- * <dd>The local name (without prefix).</dd>
- * <dt>parts[2]</dt>
- * <dd>The original raw name.</dd>
- * </dl>
- *
- * <p>All of the strings in the array will be internalized. If
- * the raw name has a prefix that has not been declared, then
- * the return value will be null.</p>
- *
- * <p>Note that attribute names are processed differently than
- * element names: an unprefixed element name will received the
- * default Namespace (if any), while an unprefixed element name
- * will not.</p>
- *
- * @param qName The raw XML 1.0 name to be processed.
- * @param parts An array supplied by the caller, capable of
- * holding at least three members.
- * @param isAttribute A flag indicating whether this is an
- * attribute name (true) or an element name (false).
- * @return The supplied array holding three internalized strings
- * representing the Namespace URI (or empty string), the
- * local name, and the raw XML 1.0 name; or null if there
- * is an undeclared prefix.
- * @see #declarePrefix
- * @see java.lang.String#intern */
- public String[] processName(
- String qName,
- String parts[],
- boolean isAttribute) {
- String myParts[] = currentContext.processName(qName, isAttribute);
- if (myParts == null) {
- return null;
- } else {
- parts[0] = myParts[0];
- parts[1] = myParts[1];
- parts[2] = myParts[2];
- return parts;
- }
- }
-
- /**
- * Look up a prefix and get the currently-mapped Namespace URI.
- *
- * <p>This method looks up the prefix in the current context.
- * Use the empty string ("") for the default Namespace.</p>
- *
- * @param prefix The prefix to look up.
- * @return The associated Namespace URI, or null if the prefix
- * is undeclared in this context.
- * @see #getPrefix
- * @see #getPrefixes
- */
- public String getURI(String prefix) {
- return currentContext.getURI(prefix);
- }
-
- /**
- * Return an enumeration of all prefixes currently declared.
- *
- * <p><strong>Note:</strong> if there is a default prefix, it will not be
- * returned in this enumeration; check for the default prefix
- * using the {@link #getURI getURI} with an argument of "".</p>
- *
- * @return An enumeration of all prefixes declared in the
- * current context except for the empty (default)
- * prefix.
- * @see #getDeclaredPrefixes
- * @see #getURI
- */
- public Iterable<String> getPrefixes() {
- return currentContext.getPrefixes();
- }
-
- /**
- * Return one of the prefixes mapped to a Namespace URI.
- *
- * <p>If more than one prefix is currently mapped to the same
- * URI, this method will make an arbitrary selection; if you
- * want all of the prefixes, use the {@link #getPrefixes}
- * method instead.</p>
- *
- * <p><strong>Note:</strong> this will never return the empty (default) prefix;
- * to check for a default prefix, use the {@link #getURI getURI}
- * method with an argument of "".</p>
- *
- * @param uri The Namespace URI.
- * @return One of the prefixes currently mapped to the URI supplied,
- * or null if none is mapped or if the URI is assigned to
- * the default Namespace.
- * @see #getPrefixes(java.lang.String)
- * @see #getURI
- */
- public String getPrefix(String uri) {
- return currentContext.getPrefix(uri);
- }
-
- /**
- * Return an enumeration of all prefixes currently declared for a URI.
- *
- * <p>This method returns prefixes mapped to a specific Namespace
- * URI. The xml: prefix will be included. If you want only one
- * prefix that's mapped to the Namespace URI, and you don't care
- * which one you get, use the {@link #getPrefix getPrefix}
- * method instead.</p>
- *
- * <p><strong>Note:</strong> the empty (default) prefix is <em>never</em> included
- * in this enumeration; to check for the presence of a default
- * Namespace, use the {@link #getURI getURI} method with an
- * argument of "".</p>
- *
- * @param uri The Namespace URI.
- * @return An enumeration of all prefixes declared in the
- * current context.
- * @see #getPrefix
- * @see #getDeclaredPrefixes
- * @see #getURI
- */
- public Iterator getPrefixes(String uri) {
- List prefixes = new ArrayList();
- for (String prefix: getPrefixes()) {
- if (uri.equals(getURI(prefix))) {
- prefixes.add(prefix);
- }
- }
- return prefixes.iterator();
- }
-
- /**
- * Return an enumeration of all prefixes declared in this context.
- *
- * <p>The empty (default) prefix will be included in this
- * enumeration; note that this behaviour differs from that of
- * {@link #getPrefix} and {@link #getPrefixes}.</p>
- *
- * @return An enumeration of all prefixes declared in this
- * context.
- * @see #getPrefixes
- * @see #getURI
- */
- public Iterable<String> getDeclaredPrefixes() {
- return currentContext.getDeclaredPrefixes();
- }
-
- ////////////////////////////////////////////////////////////////////
- // Internal state.
- ////////////////////////////////////////////////////////////////////
-
- private Context contexts[];
- private Context currentContext;
- private int contextPos;
-
- ////////////////////////////////////////////////////////////////////
- // Internal classes.
- ////////////////////////////////////////////////////////////////////
-
- /**
- * Internal class for a single Namespace context.
- *
- * <p>This module caches and reuses Namespace contexts, so the number
- * allocated will be equal to the element depth of the document, not to the
- * total number of elements (i.e. 5-10 rather than tens of thousands).</p>
- */
- final static class Context {
-
- /**
- * Create the root-level Namespace context.
- */
- Context() {
- copyTables();
- }
- // PGB May 6 2002 added copy constructor
- Context(Context that, Context newParent) {
- if (that == null) {
- copyTables();
- return;
- }
-
- if (newParent != null && !that.tablesDirty) {
- prefixTable =
- that.prefixTable == that.parent.prefixTable
- ? newParent.prefixTable
- : (HashMap) that.prefixTable.clone();
-
- uriTable =
- that.uriTable == that.parent.uriTable
- ? newParent.uriTable
- : (HashMap) that.uriTable.clone();
- elementNameTable =
- that.elementNameTable == that.parent.elementNameTable
- ? newParent.elementNameTable
- : (HashMap) that.elementNameTable.clone();
- attributeNameTable =
- that.attributeNameTable == that.parent.attributeNameTable
- ? newParent.attributeNameTable
- : (HashMap) that.attributeNameTable.clone();
- defaultNS =
- that.defaultNS == that.parent.defaultNS
- ? newParent.defaultNS
- : that.defaultNS;
- } else {
- prefixTable = (HashMap) that.prefixTable.clone();
- uriTable = (HashMap) that.uriTable.clone();
- elementNameTable = (HashMap) that.elementNameTable.clone();
- attributeNameTable = (HashMap) that.attributeNameTable.clone();
- defaultNS = that.defaultNS;
- }
-
- tablesDirty = that.tablesDirty;
- parent = newParent;
- declarations =
- that.declarations == null
- ? null
- : (ArrayList) that.declarations.clone();
- }
-
- /**
- * (Re)set the parent of this Namespace context.
- *
- * @param parent The parent Namespace context object.
- */
- void setParent(Context parent) {
- this.parent = parent;
- declarations = null;
- prefixTable = parent.prefixTable;
- uriTable = parent.uriTable;
- elementNameTable = parent.elementNameTable;
- attributeNameTable = parent.attributeNameTable;
- defaultNS = parent.defaultNS;
- tablesDirty = false;
- }
-
- /**
- * Declare a Namespace prefix for this context.
- *
- * @param prefix The prefix to declare.
- * @param uri The associated Namespace URI.
- * @see org.xml.sax.helpers.NamespaceSupport#declarePrefix
- */
- void declarePrefix(String prefix, String uri) {
- // Lazy processing...
- if (!tablesDirty) {
- copyTables();
- }
- if (declarations == null) {
- declarations = new ArrayList();
- }
-
- prefix = prefix.intern();
- uri = uri.intern();
- if ("".equals(prefix)) {
- if ("".equals(uri)) {
- defaultNS = null;
- } else {
- defaultNS = uri;
- }
- } else {
- prefixTable.put(prefix, uri);
- uriTable.put(uri, prefix); // may wipe out another prefix
- }
- declarations.add(prefix);
- }
-
- /**
- * Process a raw XML 1.0 name in this context.
- *
- * @param qName The raw XML 1.0 name.
- * @param isAttribute true if this is an attribute name.
- * @return An array of three strings containing the
- * URI part (or empty string), the local part,
- * and the raw name, all internalized, or null
- * if there is an undeclared prefix.
- * @see org.xml.sax.helpers.NamespaceSupport#processName
- */
- String[] processName(String qName, boolean isAttribute) {
- String name[];
- Map table;
-
- // Select the appropriate table.
- if (isAttribute) {
- table = elementNameTable;
- } else {
- table = attributeNameTable;
- }
-
- // Start by looking in the cache, and
- // return immediately if the name
- // is already known in this content
- name = (String[]) table.get(qName);
- if (name != null) {
- return name;
- }
-
- // We haven't seen this name in this
- // context before.
- name = new String[3];
- int index = qName.indexOf(':');
-
- // No prefix.
- if (index == -1) {
- if (isAttribute || defaultNS == null) {
- name[0] = "";
- } else {
- name[0] = defaultNS;
- }
- name[1] = qName.intern();
- name[2] = name[1];
- }
-
- // Prefix
- else {
- String prefix = qName.substring(0, index);
- String local = qName.substring(index + 1);
- String uri;
- if ("".equals(prefix)) {
- uri = defaultNS;
- } else {
- uri = (String) prefixTable.get(prefix);
- }
- if (uri == null) {
- return null;
- }
- name[0] = uri;
- name[1] = local.intern();
- name[2] = qName.intern();
- }
-
- // Save in the cache for future use.
- table.put(name[2], name);
- tablesDirty = true;
- return name;
- }
-
- /**
- * Look up the URI associated with a prefix in this context.
- *
- * @param prefix The prefix to look up.
- * @return The associated Namespace URI, or null if none is
- * declared.
- * @see org.xml.sax.helpers.NamespaceSupport#getURI
- */
- String getURI(String prefix) {
- if ("".equals(prefix)) {
- return defaultNS;
- } else if (prefixTable == null) {
- return null;
- } else {
- return (String) prefixTable.get(prefix);
- }
- }
-
- /**
- * Look up one of the prefixes associated with a URI in this context.
- *
- * <p>Since many prefixes may be mapped to the same URI,
- * the return value may be unreliable.</p>
- *
- * @param uri The URI to look up.
- * @return The associated prefix, or null if none is declared.
- * @see org.xml.sax.helpers.NamespaceSupport#getPrefix
- */
- String getPrefix(String uri) {
- if (uriTable == null) {
- return null;
- } else {
- return (String) uriTable.get(uri);
- }
- }
-
- /**
- * Return an enumeration of prefixes declared in this context.
- *
- * @return An enumeration of prefixes (possibly empty).
- * @see org.xml.sax.helpers.NamespaceSupport#getDeclaredPrefixes
- */
- Iterable<String> getDeclaredPrefixes() {
- if (declarations == null) {
- return EMPTY_ENUMERATION;
- } else {
- return declarations;
- }
- }
-
- /**
- * Return an enumeration of all prefixes currently in force.
- *
- * <p>The default prefix, if in force, is <em>not</em>
- * returned, and will have to be checked for separately.</p>
- *
- * @return An enumeration of prefixes (never empty).
- * @see org.xml.sax.helpers.NamespaceSupport#getPrefixes
- */
- Iterable<String> getPrefixes() {
- if (prefixTable == null) {
- return EMPTY_ENUMERATION;
- } else {
- return prefixTable.keySet();
- }
- }
-
- ////////////////////////////////////////////////////////////////
- // Internal methods.
- ////////////////////////////////////////////////////////////////
-
- /**
- * Copy on write for the internal tables in this context.
- *
- * <p>This class is optimized for the normal case where most
- * elements do not contain Namespace declarations.</p>
- */
- private void copyTables() {
- if (prefixTable != null) {
- prefixTable = (HashMap) prefixTable.clone();
- } else {
- prefixTable = new HashMap();
- }
- if (uriTable != null) {
- uriTable = (HashMap) uriTable.clone();
- } else {
- uriTable = new HashMap();
- }
- elementNameTable = new HashMap();
- attributeNameTable = new HashMap();
- tablesDirty = true;
- }
-
- ////////////////////////////////////////////////////////////////
- // Protected state.
- ////////////////////////////////////////////////////////////////
-
- HashMap prefixTable;
- HashMap uriTable;
- // PBG May 6 2002 changed these two from Map to HashMap
- HashMap elementNameTable;
- HashMap attributeNameTable;
- String defaultNS = null;
-
- ////////////////////////////////////////////////////////////////
- // Internal state.
- ////////////////////////////////////////////////////////////////
-
- // PBG May 6 2002 changed this from List to ArrayList
- private ArrayList declarations = null;
- private boolean tablesDirty = false;
- private Context parent = null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseInputStream.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseInputStream.java
deleted file mode 100644
index 406f1af4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseInputStream.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * {@link InputStream} that cannot be closed.
- *
- * @author Kohsuke Kawaguchi
- */
-public class NoCloseInputStream extends FilterInputStream {
- public NoCloseInputStream(InputStream is) {
- super(is);
- }
-
- @Override
- public void close() throws IOException {
- // Intentionally left empty. use closeInput() to close
- }
-
- public void doClose() throws IOException {
- super.close();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseOutputStream.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseOutputStream.java
deleted file mode 100644
index 46d7fd24..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseOutputStream.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import java.io.FilterOutputStream;
-import java.io.OutputStream;
-import java.io.IOException;
-
-/**
- * {@link OutputStream} that cannot be closed.
- *
- * @author Kohsuke Kawaguchi
- */
-public class NoCloseOutputStream extends FilterOutputStream {
- public NoCloseOutputStream(OutputStream out) {
- super(out);
- }
-
- @Override
- public void close() throws IOException {
- // Intentionally left empty. use closeOutput() to close
- }
-
- public void doClose() throws IOException {
- super.close();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Pool.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Pool.java
deleted file mode 100644
index 3c6e5441..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Pool.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.util;
-
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.lang.ref.WeakReference;
-
-/**
- * General-purpose object pool.
- *
- * <p>
- * In many parts of the runtime, we need to pool instances of objects that
- * are expensive to create (such as JAXB objects, StAX parsers, {@link Tube} instances.)
- *
- * <p>
- * This class provides a default implementation of such a pool.
- *
- * TODO: improve the implementation
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class Pool<T> {
-
- // volatile since multiple threads may access queue reference
- private volatile WeakReference<ConcurrentLinkedQueue<T>> queue;
-
- /**
- * Gets a new object from the pool.
- *
- * <p>
- * If no object is available in the pool, this method creates a new one.
- *
- * @return
- * always non-null.
- */
- public final T take() {
- T t = getQueue().poll();
- if(t==null)
- return create();
- return t;
- }
-
- private ConcurrentLinkedQueue<T> getQueue() {
- WeakReference<ConcurrentLinkedQueue<T>> q = queue;
- if (q != null) {
- ConcurrentLinkedQueue<T> d = q.get();
- if (d != null)
- return d;
- }
-
- // overwrite the queue
- ConcurrentLinkedQueue<T> d = new ConcurrentLinkedQueue<T>();
- queue = new WeakReference<ConcurrentLinkedQueue<T>>(d);
-
- return d;
- }
-
- /**
- * Returns an object back to the pool.
- */
- public final void recycle(T t) {
- getQueue().offer(t);
- }
-
- /**
- * Creates a new instance of object.
- *
- * <p>
- * This method is used when someone wants to
- * {@link #take() take} an object from an empty pool.
- *
- * <p>
- * Also note that multiple threads may call this method
- * concurrently.
- */
- protected abstract T create();
-
-
- /**
- * JAXB {@link javax.xml.bind.Marshaller} pool.
- */
- public static final class Marshaller extends Pool<javax.xml.bind.Marshaller> {
- private final JAXBContext context;
-
- public Marshaller(JAXBContext context) {
- this.context = context;
- }
-
- @Override
- protected javax.xml.bind.Marshaller create() {
- try {
- return context.createMarshaller();
- } catch (JAXBException e) {
- // impossible
- throw new AssertionError(e);
- }
- }
- }
-
- /**
- * JAXB {@link javax.xml.bind.Marshaller} pool.
- */
- public static final class Unmarshaller extends Pool<javax.xml.bind.Unmarshaller> {
- private final JAXBContext context;
-
- public Unmarshaller(JAXBContext context) {
- this.context = context;
- }
-
- @Override
- protected javax.xml.bind.Unmarshaller create() {
- try {
- return context.createUnmarshaller();
- } catch (JAXBException e) {
- // impossible
- throw new AssertionError(e);
- }
- }
- }
-
- /**
- * {@link Tube} pool.
- */
- public static final class TubePool extends Pool<Tube> {
- private final Tube master;
-
- public TubePool(Tube master) {
- this.master = master;
- recycle(master); // we'll use master as a part of the pool, too.
- }
-
- @Override
- protected Tube create() {
- return TubeCloner.clone(master);
- }
-
- /**
- *
- * @return master tubeline from pool
- * @deprecated Expected to be used in rare cases where access to master
- * tubeline is required and safe, such as Stub.close()."
- */
- @Deprecated()
- public final Tube takeMaster() {
- return master;
- }
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/QNameMap.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/QNameMap.java
deleted file mode 100644
index 42a62e1d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/QNameMap.java
+++ /dev/null
@@ -1,487 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import com.sun.istack.internal.NotNull;
-
-import javax.xml.namespace.QName;
-import java.util.AbstractSet;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Set;
-
-/**
- * Map keyed by {@link QName}.
- *
- * This specialized map allows a look up operation without constructing
- * a new QName instance, for a performance reason. This {@link Map} assumes
- * that both namespace URI and local name are {@link String#intern() intern}ed.
- *
- * @since JAXB 2.0
- */
-public final class QNameMap<V> {
- /**
- * The default initial capacity - MUST be a power of two.
- */
- private static final int DEFAULT_INITIAL_CAPACITY = 16;
-
- /**
- * The maximum capacity, used if a higher value is implicitly specified
- * by either of the constructors with arguments.
- * MUST be a power of two <= 1<<30.
- */
- private static final int MAXIMUM_CAPACITY = 1 << 30;
-
- /**
- * The table, resized as necessary. Length MUST Always be a power of two.
- */
- transient Entry<V>[] table = new Entry[DEFAULT_INITIAL_CAPACITY];
-
- /**
- * The number of key-value mappings contained in this identity hash map.
- */
- transient int size;
-
- /**
- * The next size value at which to resize . Taking it as
- * MAXIMUM_CAPACITY
- * @serial
- */
- private int threshold;
-
- /**
- * The load factor used when none specified in constructor.
- **/
- private static final float DEFAULT_LOAD_FACTOR = 0.75f;
-
-
-
- /**
- * Gives an entrySet view of this map
- */
- private Set<Entry<V>> entrySet = null;
-
- public QNameMap() {
- threshold = (int)(DEFAULT_INITIAL_CAPACITY * DEFAULT_LOAD_FACTOR);
- table = new Entry[DEFAULT_INITIAL_CAPACITY];
-
- }
-
- /**
- * Associates the specified value with the specified keys in this map.
- * If the map previously contained a mapping for this key, the old
- * value is replaced.
- *
- * @param namespaceUri First key with which the specified value is to be associated.
- * @param localname Second key with which the specified value is to be associated.
- * @param value value to be associated with the specified key.
- *
- */
- public void put(String namespaceUri,String localname, V value ) {
- //keys cannot be null
- assert localname !=null;
- assert namespaceUri !=null;
-
- int hash = hash(localname);
- int i = indexFor(hash, table.length);
-
- for (Entry<V> e = table[i]; e != null; e = e.next) {
- if (e.hash == hash && localname.equals(e.localName) && namespaceUri.equals(e.nsUri)) {
- e.value = value;
- return;
- }
- }
-
- addEntry(hash, namespaceUri,localname, value, i);
-
- }
-
- public void put(QName name, V value ) {
- put(name.getNamespaceURI(),name.getLocalPart(),value);
- }
-
- /**
- * Returns the value to which the specified keys are mapped in this QNameMap,
- * or <tt>null</tt> if the map contains no mapping for this key.
- *
- * @param nsUri the namespaceUri key whose associated value is to be returned.
- * @param localPart the localPart key whose associated value is to be returned.
- * @return the value to which this map maps the specified set of keya, or
- * <tt>null</tt> if the map contains no mapping for this set of keys.
- * @see #put(String,String, Object)
- */
- public V get( @NotNull String nsUri, String localPart ) {
- Entry<V> e = getEntry(nsUri,localPart);
- if(e==null) return null;
- else return e.value;
- }
-
- public V get( QName name ) {
- return get(name.getNamespaceURI(),name.getLocalPart());
- }
-
- /**
- * Returns the number of keys-value mappings in this map.
- *
- * @return the number of keys-value mappings in this map.
- */
- public int size() {
- return size;
- }
-
- /**
- * Copies all of the mappings from the specified map to this map
- * These mappings will replace any mappings that
- * this map had for any of the keys currently in the specified map.
- *
- * @param map mappings to be stored in this map.
- *
- */
- public QNameMap<V> putAll(QNameMap<? extends V> map) {
- int numKeysToBeAdded = map.size();
- if (numKeysToBeAdded == 0)
- return this;
-
-
- if (numKeysToBeAdded > threshold) {
- int targetCapacity = numKeysToBeAdded;
- if (targetCapacity > MAXIMUM_CAPACITY)
- targetCapacity = MAXIMUM_CAPACITY;
- int newCapacity = table.length;
- while (newCapacity < targetCapacity)
- newCapacity <<= 1;
- if (newCapacity > table.length)
- resize(newCapacity);
- }
-
- for( Entry<? extends V> e : map.entrySet() )
- put(e.nsUri,e.localName,e.getValue());
- return this;
- }
-
- public QNameMap<V> putAll(Map<QName,? extends V> map) {
- for (Map.Entry<QName, ? extends V> e : map.entrySet()) {
- QName qn = e.getKey();
- put(qn.getNamespaceURI(),qn.getLocalPart(),e.getValue());
- }
- return this;
- }
-
-
- /**
- * Returns a hash value for the specified object.The hash value is computed
- * for the localName.
- */
- private static int hash(String x) {
- int h = x.hashCode();
-
- h += ~(h << 9);
- h ^= (h >>> 14);
- h += (h << 4);
- h ^= (h >>> 10);
- return h;
- }
-
- /**
- * Returns index for hash code h.
- */
- private static int indexFor(int h, int length) {
- return h & (length-1);
- }
-
- /**
- * Add a new entry with the specified keys, value and hash code to
- * the specified bucket. It is the responsibility of this
- * method to resize the table if appropriate.
- *
- */
- private void addEntry(int hash, String nsUri, String localName, V value, int bucketIndex) {
- Entry<V> e = table[bucketIndex];
- table[bucketIndex] = new Entry<V>(hash, nsUri, localName, value, e);
- if (size++ >= threshold)
- resize(2 * table.length);
- }
-
-
- /**
- * Rehashes the contents of this map into a new array with a
- * larger capacity. This method is called automatically when the
- * number of keys in this map reaches its threshold.
- */
- private void resize(int newCapacity) {
- Entry[] oldTable = table;
- int oldCapacity = oldTable.length;
- if (oldCapacity == MAXIMUM_CAPACITY) {
- threshold = Integer.MAX_VALUE;
- return;
- }
-
- Entry[] newTable = new Entry[newCapacity];
- transfer(newTable);
- table = newTable;
- threshold = newCapacity;
- }
-
- /**
- * Transfer all entries from current table to newTable.
- */
- private void transfer(Entry<V>[] newTable) {
- Entry<V>[] src = table;
- int newCapacity = newTable.length;
- for (int j = 0; j < src.length; j++) {
- Entry<V> e = src[j];
- if (e != null) {
- src[j] = null;
- do {
- Entry<V> next = e.next;
- int i = indexFor(e.hash, newCapacity);
- e.next = newTable[i];
- newTable[i] = e;
- e = next;
- } while (e != null);
- }
- }
- }
-
- /**
- * Returns one random item in the map.
- * If this map is empty, return null.
- *
- * <p>
- * This method is useful to obtain the value from a map that only contains one element.
- */
- public Entry<V> getOne() {
- for( Entry<V> e : table ) {
- if(e!=null)
- return e;
- }
- return null;
- }
-
- public Collection<QName> keySet() {
- Set<QName> r = new HashSet<QName>();
- for (Entry<V> e : entrySet()) {
- r.add(e.createQName());
- }
- return r;
- }
-
- public Iterable<V> values() {
- return views;
- }
-
- private transient Iterable<V> views = new Iterable<V>() {
- public Iterator<V> iterator() {
- return new ValueIterator();
- }
- };
-
- private abstract class HashIterator<E> implements Iterator<E> {
- Entry<V> next; // next entry to return
- int index; // current slot
-
- HashIterator() {
- Entry<V>[] t = table;
- int i = t.length;
- Entry<V> n = null;
- if (size != 0) { // advance to first entry
- while (i > 0 && (n = t[--i]) == null)
- ;
- }
- next = n;
- index = i;
- }
-
- public boolean hasNext() {
- return next != null;
- }
-
- Entry<V> nextEntry() {
- Entry<V> e = next;
- if (e == null)
- throw new NoSuchElementException();
-
- Entry<V> n = e.next;
- Entry<V>[] t = table;
- int i = index;
- while (n == null && i > 0)
- n = t[--i];
- index = i;
- next = n;
- return e;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- private class ValueIterator extends HashIterator<V> {
- public V next() {
- return nextEntry().value;
- }
- }
-
- public boolean containsKey(@NotNull String nsUri,String localName) {
- return getEntry(nsUri,localName)!=null;
- }
-
-
- /**
- * Returns true if this map is empty.
- */
- public boolean isEmpty() {
- return size == 0;
- }
-
-
- public static final class Entry<V> {
- /** The namespace URI. */
- public final String nsUri;
-
- /** The localPart. */
- public final String localName;
-
- V value;
- final int hash;
- Entry<V> next;
-
- /**
- * Create new entry.
- */
- Entry(int h, String nsUri, String localName, V v, Entry<V> n) {
- value = v;
- next = n;
- this.nsUri = nsUri;
- this.localName = localName;
- hash = h;
- }
-
- /**
- * Creates a new QName object from {@link #nsUri} and {@link #localName}.
- */
- public QName createQName() {
- return new QName(nsUri,localName);
- }
-
- public V getValue() {
- return value;
- }
-
- public V setValue(V newValue) {
- V oldValue = value;
- value = newValue;
- return oldValue;
- }
-
- public boolean equals(Object o) {
- if (!(o instanceof Entry))
- return false;
- Entry e = (Entry)o;
- String k1 = nsUri;
- String k2 = e.nsUri;
- String k3 = localName;
- String k4 = e.localName;
- if (k1.equals(k2) && k3.equals(k4)) {
- Object v1 = getValue();
- Object v2 = e.getValue();
- if (v1 == v2 || (v1 != null && v1.equals(v2)))
- return true;
- }
- return false;
- }
-
- public int hashCode() {
- return ( localName.hashCode()) ^
- (value==null ? 0 : value.hashCode());
- }
-
- public String toString() {
- return '"'+nsUri +"\",\"" +localName + "\"=" + getValue();
- }
- }
-
- public Set<Entry<V>> entrySet() {
- Set<Entry<V>> es = entrySet;
- return es != null ? es : (entrySet = new EntrySet());
- }
-
- private Iterator<Entry<V>> newEntryIterator() {
- return new EntryIterator();
- }
-
- private class EntryIterator extends HashIterator<Entry<V>> {
- public Entry<V> next() {
- return nextEntry();
- }
- }
- private class EntrySet extends AbstractSet<Entry<V>> {
- public Iterator<Entry<V>> iterator() {
- return newEntryIterator();
- }
- public boolean contains(Object o) {
- if (!(o instanceof Entry))
- return false;
- Entry<V> e = (Entry<V>) o;
- Entry<V> candidate = getEntry(e.nsUri,e.localName);
- return candidate != null && candidate.equals(e);
- }
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
- public int size() {
- return size;
- }
- }
-
- private Entry<V> getEntry(@NotNull String nsUri,String localName) {
- int hash = hash(localName);
- int i = indexFor(hash, table.length);
- Entry<V> e = table[i];
- while (e != null && !(localName.equals(e.localName) && nsUri.equals(e.nsUri)))
- e = e.next;
- return e;
- }
-
- public String toString() {
- StringBuilder buf = new StringBuilder();
- buf.append('{');
-
- for( Entry<V> e : entrySet() ) {
- if(buf.length()>1)
- buf.append(',');
- buf.append('[');
- buf.append(e);
- buf.append(']');
- }
-
- buf.append('}');
- return buf.toString();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ReadAllStream.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ReadAllStream.java
deleted file mode 100644
index 2e1b7a1f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ReadAllStream.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Copyright (c) 2009, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Reads a input stream completely and creates a new stream
- * by keeping some data in memory and the rest on the file system.
- *
- * @author Jitendra Kotamraju
- */
-public class ReadAllStream extends InputStream {
-
- private final @NotNull MemoryStream memStream;
- private final @NotNull FileStream fileStream;
-
- private boolean readAll;
- private boolean closed;
-
- private static final Logger LOGGER = Logger.getLogger(ReadAllStream.class.getName());
-
- public ReadAllStream() {
- memStream = new MemoryStream();
- fileStream = new FileStream();
- }
-
- /**
- * Reads the data from input stream completely. It keeps
- * inMemory size in the memory, and the rest on the file
- * system.
- *
- * Caller's responsibility to close the InputStream. This
- * method can be called only once.
- *
- * @param in from which to be read
- * @param inMemory this much data is kept in the memory
- * @throws IOException in case of exception
- */
- public void readAll(InputStream in, long inMemory) throws IOException {
- assert !readAll;
- readAll = true;
-
- boolean eof = memStream.readAll(in, inMemory);
- if (!eof) {
- fileStream.readAll(in);
- }
- }
-
- @Override
- public int read() throws IOException {
- int ch = memStream.read();
- if (ch == -1) {
- ch = fileStream.read();
- }
- return ch;
- }
-
- @Override
- public int read(byte b[], int off, int sz) throws IOException {
- int len = memStream.read(b, off, sz);
- if (len == -1) {
- len = fileStream.read(b, off, sz);
- }
- return len;
- }
-
- @Override
- public void close() throws IOException {
- if (!closed) {
- memStream.close();
- fileStream.close();
- closed = true;
- }
- }
-
- // Keeps the rest of the data on the file system
- private static class FileStream extends InputStream {
- private @Nullable File tempFile;
- private @Nullable FileInputStream fin;
-
- void readAll(InputStream in) throws IOException {
- tempFile = File.createTempFile("jaxws",".bin");
- FileOutputStream fileOut = new FileOutputStream(tempFile);
- try {
- byte[] buf = new byte[8192];
- int len;
- while((len=in.read(buf)) != -1) {
- fileOut.write(buf, 0, len);
- }
- } finally {
- fileOut.close();
- }
- fin = new FileInputStream(tempFile);
- }
-
- @Override
- public int read() throws IOException {
- return (fin != null) ? fin.read() : -1;
- }
-
- @Override
- public int read(byte b[], int off, int sz) throws IOException {
- return (fin != null) ? fin.read(b, off, sz) : -1;
- }
-
- @Override
- public void close() throws IOException {
- if (fin != null) {
- fin.close();
- }
- if (tempFile != null) {
- boolean success = tempFile.delete();
- if (!success) {
- LOGGER.log(Level.INFO, "File {0} could not be deleted", tempFile);
- }
- }
- }
- }
-
- // Keeps data in memory until certain size
- private static class MemoryStream extends InputStream {
- private Chunk head, tail;
- private int curOff;
-
- private void add(byte[] buf, int len) {
- if (tail != null) {
- tail = tail.createNext(buf, 0, len);
- } else {
- head = tail = new Chunk(buf, 0, len);
- }
- }
-
- /**
- * Reads until the size specified
- *
- * @param in stream from which to be read
- * @param inMemory reads until this size
- * @return true if eof
- * false otherwise
- * @throws IOException in case of exception
- */
- boolean readAll(InputStream in, long inMemory) throws IOException {
- long total = 0;
- while(true) {
- byte[] buf = new byte[8192];
- int read = fill(in, buf);
- total += read;
- if (read != 0) {
- add(buf, read);
- }
- if (read != buf.length) {
- return true;
- } // EOF
- if (total > inMemory) {
- return false; // Reached in-memory size
- }
- }
- }
-
- private int fill(InputStream in, byte[] buf) throws IOException {
- int read;
- int total = 0;
- while(total < buf.length && (read=in.read(buf, total, buf.length-total)) != -1) {
- total += read;
- }
- return total;
- }
-
- @Override
- public int read() throws IOException {
- if (!fetch()) {
- return -1;
- }
- return (head.buf[curOff++] & 0xff);
- }
-
- @Override
- public int read(byte b[], int off, int sz) throws IOException {
- if (!fetch()) {
- return -1;
- }
- sz = Math.min(sz, head.len-(curOff-head.off));
- System.arraycopy(head.buf,curOff,b,off,sz);
- curOff += sz;
- return sz;
- }
-
- // if eof, return false else true
- private boolean fetch() {
- if (head == null) {
- return false;
- }
- if (curOff == head.off+head.len) {
- head = head.next;
- if (head == null) {
- return false;
- }
- curOff = head.off;
- }
- return true;
- }
-
- private static final class Chunk {
- Chunk next;
- final byte[] buf;
- final int off;
- final int len;
-
- public Chunk(byte[] buf, int off, int len) {
- this.buf = buf;
- this.off = off;
- this.len = len;
- }
-
- public Chunk createNext(byte[] buf, int off, int len) {
- return next = new Chunk(buf, off, len);
- }
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/RuntimeVersion.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/RuntimeVersion.java
deleted file mode 100644
index 4a7848bd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/RuntimeVersion.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * Obtains the version number of the JAX-WS runtime.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public final class RuntimeVersion {
-
- public static final Version VERSION;
-
- static {
- Version version = null;
- InputStream in = RuntimeVersion.class.getResourceAsStream("version.properties");
- try {
- version = Version.create(in);
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch(IOException ioe) {
- // Nothing to do
- }
- }
- }
- VERSION = version == null ? Version.create(null) : version;
- }
-
- /**
- * Get JAX-WS version
- */
- public String getVersion() {
- return VERSION.toString();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceConfigurationError.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceConfigurationError.java
deleted file mode 100644
index 70d63c2b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceConfigurationError.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-/**
- * Error thrown when something goes wrong while looking up service providers.
- * In particular, this error will be thrown in the following situations:
- *
- * <ul>
- * <li> A concrete provider class cannot be found,
- * <li> A concrete provider class cannot be instantiated,
- * <li> The format of a provider-configuration file is illegal, or
- * <li> An IOException occurs while reading a provider-configuration file.
- * </ul>
- *
- * @author Mark Reinhold
- * @version 1.7, 03/12/19
- * @since 1.3
- */
-public class ServiceConfigurationError extends Error {
-
- /**
- * Constructs a new instance with the specified detail string.
- */
- public ServiceConfigurationError(String msg) {
- super(msg);
- }
-
- /**
- * Constructs a new instance that wraps the specified throwable.
- */
- public ServiceConfigurationError(Throwable x) {
- super(x);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceFinder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceFinder.java
deleted file mode 100644
index 519d8df5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceFinder.java
+++ /dev/null
@@ -1,523 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.util;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.Component;
-import com.sun.xml.internal.ws.api.ComponentEx;
-import com.sun.xml.internal.ws.api.server.ContainerResolver;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.lang.reflect.Array;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.WeakHashMap;
-import java.util.concurrent.ConcurrentHashMap;
-
-
-/**
- * A simple service-provider lookup mechanism. A <i>service</i> is a
- * well-known set of interfaces and (usually abstract) classes. A <i>service
- * provider</i> is a specific implementation of a service. The classes in a
- * provider typically implement the interfaces and subclass the classes defined
- * in the service itself. Service providers may be installed in an
- * implementation of the Java platform in the form of extensions, that is, jar
- * files placed into any of the usual extension directories. Providers may
- * also be made available by adding them to the applet or application class
- * path or by some other platform-specific means.
- * <p/>
- * <p> In this lookup mechanism a service is represented by an interface or an
- * abstract class. (A concrete class may be used, but this is not
- * recommended.) A provider of a given service contains one or more concrete
- * classes that extend this <i>service class</i> with data and code specific to
- * the provider. This <i>provider class</i> will typically not be the entire
- * provider itself but rather a proxy that contains enough information to
- * decide whether the provider is able to satisfy a particular request together
- * with code that can create the actual provider on demand. The details of
- * provider classes tend to be highly service-specific; no single class or
- * interface could possibly unify them, so no such class has been defined. The
- * only requirement enforced here is that provider classes must have a
- * zero-argument constructor so that they may be instantiated during lookup.
- * <p/>
- * <p> A service provider identifies itself by placing a provider-configuration
- * file in the resource directory <tt>META-INF/services</tt>. The file's name
- * should consist of the fully-qualified name of the abstract service class.
- * The file should contain a list of fully-qualified concrete provider-class
- * names, one per line. Space and tab characters surrounding each name, as
- * well as blank lines, are ignored. The comment character is <tt>'#'</tt>
- * (<tt>0x23</tt>); on each line all characters following the first comment
- * character are ignored. The file must be encoded in UTF-8.
- * <p/>
- * <p> If a particular concrete provider class is named in more than one
- * configuration file, or is named in the same configuration file more than
- * once, then the duplicates will be ignored. The configuration file naming a
- * particular provider need not be in the same jar file or other distribution
- * unit as the provider itself. The provider must be accessible from the same
- * class loader that was initially queried to locate the configuration file;
- * note that this is not necessarily the class loader that found the file.
- * <p/>
- * <p> <b>Example:</b> Suppose we have a service class named
- * <tt>java.io.spi.CharCodec</tt>. It has two abstract methods:
- * <p/>
- * <pre>
- * public abstract CharEncoder getEncoder(String encodingName);
- * public abstract CharDecoder getDecoder(String encodingName);
- * </pre>
- * <p/>
- * Each method returns an appropriate object or <tt>null</tt> if it cannot
- * translate the given encoding. Typical <tt>CharCodec</tt> providers will
- * support more than one encoding.
- * <p/>
- * <p> If <tt>sun.io.StandardCodec</tt> is a provider of the <tt>CharCodec</tt>
- * service then its jar file would contain the file
- * <tt>META-INF/services/java.io.spi.CharCodec</tt>. This file would contain
- * the single line:
- * <p/>
- * <pre>
- * sun.io.StandardCodec # Standard codecs for the platform
- * </pre>
- * <p/>
- * To locate an codec for a given encoding name, the internal I/O code would
- * do something like this:
- * <p/>
- * <pre>
- * CharEncoder getEncoder(String encodingName) {
- * for( CharCodec cc : ServiceFinder.find(CharCodec.class) ) {
- * CharEncoder ce = cc.getEncoder(encodingName);
- * if (ce != null)
- * return ce;
- * }
- * return null;
- * }
- * </pre>
- * <p/>
- * The provider-lookup mechanism always executes in the security context of the
- * caller. Trusted system code should typically invoke the methods in this
- * class from within a privileged security context.
- *
- * @author Mark Reinhold
- * @version 1.11, 03/12/19
- * @since 1.3
- */
-public final class ServiceFinder<T> implements Iterable<T> {
-
- private static final String prefix = "META-INF/services/";
-
- private static WeakHashMap<ClassLoader, ConcurrentHashMap<String, ServiceName[]>> serviceNameCache
- = new WeakHashMap<ClassLoader, ConcurrentHashMap<String, ServiceName[]>>();
-
- private final Class<T> serviceClass;
- private final @Nullable ClassLoader classLoader;
- private final @Nullable ComponentEx component;
-
- private static class ServiceName {
- final String className;
- final URL config;
- public ServiceName(String className, URL config) {
- this.className = className;
- this.config = config;
- }
- }
-
- public static <T> ServiceFinder<T> find(@NotNull Class<T> service, @Nullable ClassLoader loader, Component component) {
- return new ServiceFinder<T>(service, loader, component);
- }
-
- public static <T> ServiceFinder<T> find(@NotNull Class<T> service, Component component) {
- return find(service,Thread.currentThread().getContextClassLoader(),component);
- }
-
- /**
- * Locates and incrementally instantiates the available providers of a
- * given service using the given class loader.
- * <p/>
- * <p> This method transforms the name of the given service class into a
- * provider-configuration filename as described above and then uses the
- * <tt>getResources</tt> method of the given class loader to find all
- * available files with that name. These files are then read and parsed to
- * produce a list of provider-class names. The iterator that is returned
- * uses the given class loader to lookup and then instantiate each element
- * of the list.
- * <p/>
- * <p> Because it is possible for extensions to be installed into a running
- * Java virtual machine, this method may return different results each time
- * it is invoked. <p>
- *
- * @param service The service's abstract service class
- * @param loader The class loader to be used to load provider-configuration files
- * and instantiate provider classes, or <tt>null</tt> if the system
- * class loader (or, failing that the bootstrap class loader) is to
- * be used
- * @throws ServiceConfigurationError If a provider-configuration file violates the specified format
- * or names a provider class that cannot be found and instantiated
- * @see #find(Class)
- */
- public static <T> ServiceFinder<T> find(@NotNull Class<T> service, @Nullable ClassLoader loader) {
- return find(service, loader, ContainerResolver.getInstance().getContainer());
- }
-
- /**
- * Locates and incrementally instantiates the available providers of a
- * given service using the context class loader. This convenience method
- * is equivalent to
- * <p/>
- * <pre>
- * ClassLoader cl = Thread.currentThread().getContextClassLoader();
- * return Service.providers(service, cl);
- * </pre>
- *
- * @param service The service's abstract service class
- *
- * @throws ServiceConfigurationError If a provider-configuration file violates the specified format
- * or names a provider class that cannot be found and instantiated
- * @see #find(Class, ClassLoader)
- */
- public static <T> ServiceFinder<T> find(Class<T> service) {
- return find(service,Thread.currentThread().getContextClassLoader());
- }
-
- private ServiceFinder(Class<T> service, ClassLoader loader, Component component) {
- this.serviceClass = service;
- this.classLoader = loader;
- this.component = getComponentEx(component);
- }
-
- private static ServiceName[] serviceClassNames(Class serviceClass, ClassLoader classLoader) {
- ArrayList<ServiceName> l = new ArrayList<ServiceName>();
- for (Iterator<ServiceName> it = new ServiceNameIterator(serviceClass,classLoader);it.hasNext();) l.add(it.next());
- return l.toArray(new ServiceName[l.size()]);
- }
-
- /**
- * Returns discovered objects incrementally.
- *
- * @return An <tt>Iterator</tt> that yields provider objects for the given
- * service, in some arbitrary order. The iterator will throw a
- * <tt>ServiceConfigurationError</tt> if a provider-configuration
- * file violates the specified format or if a provider class cannot
- * be found and instantiated.
- */
- @SuppressWarnings("unchecked")
- public Iterator<T> iterator() {
- Iterator<T> it = new LazyIterator<T>(serviceClass,classLoader);
- return component != null ?
- new CompositeIterator<T>(
- component.getIterableSPI(serviceClass).iterator(),it) :
- it;
- }
-
- /**
- * Returns discovered objects all at once.
- *
- * @return
- * can be empty but never null.
- *
- * @throws ServiceConfigurationError
- */
- public T[] toArray() {
- List<T> result = new ArrayList<T>();
- for (T t : this) {
- result.add(t);
- }
- return result.toArray((T[])Array.newInstance(serviceClass,result.size()));
- }
-
- private static void fail(Class service, String msg, Throwable cause)
- throws ServiceConfigurationError {
- ServiceConfigurationError sce
- = new ServiceConfigurationError(service.getName() + ": " + msg);
- sce.initCause(cause);
- throw sce;
- }
-
- private static void fail(Class service, String msg)
- throws ServiceConfigurationError {
- throw new ServiceConfigurationError(service.getName() + ": " + msg);
- }
-
- private static void fail(Class service, URL u, int line, String msg)
- throws ServiceConfigurationError {
- fail(service, u + ":" + line + ": " + msg);
- }
-
- /**
- * Parse a single line from the given configuration file, adding the name
- * on the line to both the names list and the returned set iff the name is
- * not already a member of the returned set.
- */
- private static int parseLine(Class service, URL u, BufferedReader r, int lc,
- List<String> names, Set<String> returned)
- throws IOException, ServiceConfigurationError {
- String ln = r.readLine();
- if (ln == null) {
- return -1;
- }
- int ci = ln.indexOf('#');
- if (ci >= 0) ln = ln.substring(0, ci);
- ln = ln.trim();
- int n = ln.length();
- if (n != 0) {
- if ((ln.indexOf(' ') >= 0) || (ln.indexOf('\t') >= 0))
- fail(service, u, lc, "Illegal configuration-file syntax");
- int cp = ln.codePointAt(0);
- if (!Character.isJavaIdentifierStart(cp))
- fail(service, u, lc, "Illegal provider-class name: " + ln);
- for (int i = Character.charCount(cp); i < n; i += Character.charCount(cp)) {
- cp = ln.codePointAt(i);
- if (!Character.isJavaIdentifierPart(cp) && (cp != '.'))
- fail(service, u, lc, "Illegal provider-class name: " + ln);
- }
- if (!returned.contains(ln)) {
- names.add(ln);
- returned.add(ln);
- }
- }
- return lc + 1;
- }
-
- /**
- * Parse the content of the given URL as a provider-configuration file.
- *
- * @param service The service class for which providers are being sought;
- * used to construct error detail strings
- * @param u The URL naming the configuration file to be parsed
- * @param returned A Set containing the names of provider classes that have already
- * been returned. This set will be updated to contain the names
- * that will be yielded from the returned <tt>Iterator</tt>.
- * @return A (possibly empty) <tt>Iterator</tt> that will yield the
- * provider-class names in the given configuration file that are
- * not yet members of the returned set
- * @throws ServiceConfigurationError If an I/O error occurs while reading from the given URL, or
- * if a configuration-file format error is detected
- */
- @SuppressWarnings({"StatementWithEmptyBody"})
- private static Iterator<String> parse(Class service, URL u, Set<String> returned)
- throws ServiceConfigurationError {
- InputStream in = null;
- BufferedReader r = null;
- ArrayList<String> names = new ArrayList<String>();
- try {
- in = u.openStream();
- r = new BufferedReader(new InputStreamReader(in, "utf-8"));
- int lc = 1;
- while ((lc = parseLine(service, u, r, lc, names, returned)) >= 0) ;
- } catch (IOException x) {
- fail(service, ": " + x);
- } finally {
- try {
- if (r != null) r.close();
- if (in != null) in.close();
- } catch (IOException y) {
- fail(service, ": " + y);
- }
- }
- return names.iterator();
- }
-
- private static ComponentEx getComponentEx(Component component) {
- if (component instanceof ComponentEx)
- return (ComponentEx) component;
-
- return component != null ? new ComponentExWrapper(component) : null;
- }
-
- private static class ComponentExWrapper implements ComponentEx {
- private final Component component;
-
- public ComponentExWrapper(Component component) {
- this.component = component;
- }
-
- public <S> S getSPI(Class<S> spiType) {
- return component.getSPI(spiType);
- }
-
- public <S> Iterable<S> getIterableSPI(Class<S> spiType) {
- S item = getSPI(spiType);
- if (item != null) {
- Collection<S> c = Collections.singletonList(item);
- return c;
- }
- return Collections.emptySet();
- }
- }
-
- private static class CompositeIterator<T> implements Iterator<T> {
- private final Iterator<Iterator<T>> it;
- private Iterator<T> current = null;
-
- public CompositeIterator(Iterator<T>... iterators) {
- it = Arrays.asList(iterators).iterator();
- }
-
- public boolean hasNext() {
- if (current != null && current.hasNext())
- return true;
-
- while (it.hasNext()) {
- current = it.next();
- if (current.hasNext())
- return true;
-
- }
-
- return false;
- }
-
- public T next() {
- if (!hasNext())
- throw new NoSuchElementException();
-
- return current.next();
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- /**
- * Private inner class implementing fully-lazy provider lookup
- */
- private static class ServiceNameIterator implements Iterator<ServiceName> {
- Class service;
- @Nullable ClassLoader loader;
- Enumeration<URL> configs = null;
- Iterator<String> pending = null;
- Set<String> returned = new TreeSet<String>();
- String nextName = null;
- URL currentConfig = null;
-
- private ServiceNameIterator(Class service, ClassLoader loader) {
- this.service = service;
- this.loader = loader;
- }
-
- public boolean hasNext() throws ServiceConfigurationError {
- if (nextName != null) {
- return true;
- }
- if (configs == null) {
- try {
- String fullName = prefix + service.getName();
- if (loader == null)
- configs = ClassLoader.getSystemResources(fullName);
- else
- configs = loader.getResources(fullName);
- } catch (IOException x) {
- fail(service, ": " + x);
- }
- }
- while ((pending == null) || !pending.hasNext()) {
- if (!configs.hasMoreElements()) {
- return false;
- }
- currentConfig = configs.nextElement();
- pending = parse(service, currentConfig, returned);
- }
- nextName = pending.next();
- return true;
- }
-
- public ServiceName next() throws ServiceConfigurationError {
- if (!hasNext()) {
- throw new NoSuchElementException();
- }
- String cn = nextName;
- nextName = null;
- return new ServiceName(cn, currentConfig);
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- private static class LazyIterator<T> implements Iterator<T> {
- Class<T> service;
- @Nullable ClassLoader loader;
- ServiceName[] names;
- int index;
-
- private LazyIterator(Class<T> service, ClassLoader loader) {
- this.service = service;
- this.loader = loader;
- this.names = null;
- index = 0;
- }
-
- @Override
- public boolean hasNext() {
- if (names == null) {
- ConcurrentHashMap<String, ServiceName[]> nameMap = null;
- synchronized(serviceNameCache){ nameMap = serviceNameCache.get(loader); }
- names = (nameMap != null)? nameMap.get(service.getName()) : null;
- if (names == null) {
- names = serviceClassNames(service, loader);
- if (nameMap == null) nameMap = new ConcurrentHashMap<String, ServiceName[]>();
- nameMap.put(service.getName(), names);
- synchronized(serviceNameCache){ serviceNameCache.put(loader,nameMap); }
- }
- }
- return (index < names.length);
- }
-
- @Override
- public T next() {
- if (!hasNext()) throw new NoSuchElementException();
- ServiceName sn = names[index++];
- String cn = sn.className;
- URL currentConfig = sn.config;
- try {
- return service.cast(Class.forName(cn, true, loader).newInstance());
- } catch (ClassNotFoundException x) {
- fail(service, "Provider " + cn + " is specified in "+currentConfig+" but not found");
- } catch (Exception x) {
- fail(service, "Provider " + cn + " is specified in "+currentConfig+"but could not be instantiated: " + x, x);
- }
- return null; /* This cannot happen */
- }
-
- @Override
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/StreamUtils.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/StreamUtils.java
deleted file mode 100644
index 42e10a98..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/StreamUtils.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * @author Jitendra Kotamraju
- */
-public class StreamUtils {
-
- /*
- * Finds if the stream has some content or not
- *
- * @return null if there is no data
- * else stream to be used
- */
- public static InputStream hasSomeData(InputStream in) {
- if (in != null) {
- try {
- if (in.available() < 1) {
- if (!in.markSupported()) {
- in = new BufferedInputStream(in);
- }
- in.mark(1);
- if (in.read() != -1) {
- in.reset();
- } else {
- in = null; // No data
- }
- }
- } catch(IOException ioe) {
- in = null;
- }
- }
- return in;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/StringUtils.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/StringUtils.java
deleted file mode 100644
index 5b0f5b69..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/StringUtils.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-/**
- *
- * @author WS Development Team
- */
-public class StringUtils {
-
- /**
- * Utility method to take a string and convert it to normal Java variable
- * name capitalization. This normally means converting the first
- * character from upper case to lower case, but in the (unusual) special
- * case when there is more than one character and both the first and
- * second characters are upper case, we leave it alone.
- * <p>
- * Thus "FooBah" becomes "fooBah" and "X" becomes "x", but "URL" stays
- * as "URL".
- *
- * @param name The string to be decapitalized.
- * @return The decapitalized version of the string.
- */
- public static String decapitalize(String name) {
- if (name == null || name.length() == 0) {
- return name;
- }
- if (name.length() > 1 &&
- Character.isUpperCase(name.charAt(1)) &&
- Character.isUpperCase(name.charAt(0))) {
-
- return name;
- }
- char chars[] = name.toCharArray();
- chars[0] = Character.toLowerCase(chars[0]);
- return new String(chars);
- }
-
- /**
- * Utility method to take a string and convert it to normal a string
- * with the first character in upper case.
- * <p>
- * Thus "fooBah" becomes "FooBah" and "x" becomes "X".\
- *
- * @param name The string to be capitalized.
- * @return The capitalized version of the string.
- */
- public static String capitalize(String name) {
- if (name == null || name.length() == 0) {
- return name;
- }
- char chars[] = name.toCharArray();
- chars[0] = Character.toUpperCase(chars[0]);
- return new String(chars);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/UtilException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/UtilException.java
deleted file mode 100644
index af80942c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/UtilException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase;
-
-/**
- * UtilException represents an exception that occurred while
- * one of the util classes is operating.
- *
- * @see JAXWSExceptionBase
- *
- * @author JAX-WS Development Team
- */
-public class UtilException extends JAXWSExceptionBase {
- public UtilException(String key, Object... args) {
- super(key, args);
- }
-
- public UtilException(Throwable throwable) {
- super(throwable);
- }
-
- public UtilException(Localizable arg) {
- super("nestedUtilError", arg);
- }
-
- public String getDefaultResourceBundleName() {
- return "com.sun.xml.internal.ws.resources.util";
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Version.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Version.java
deleted file mode 100644
index 2c7f4497..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Version.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.util.Properties;
-
-/**
- * Represents the version information.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class Version {
- /**
- * Represents the build id, which is a string like "b13" or "hudson-250".
- */
- public final String BUILD_ID;
- /**
- * Represents the complete version string, such as "JAX-WS RI 2.0-b19"
- */
- public final String BUILD_VERSION;
- /**
- * Represents the major JAX-WS version, such as "2.0".
- */
- public final String MAJOR_VERSION;
-
- /**
- * Represents the latest Subversion Reversion number.
- */
- public final String SVN_REVISION;
-
- /**
- * The Runtime Version.
- */
- public static final Version RUNTIME_VERSION = Version.create(Version.class.getResourceAsStream("version.properties"));
-
- private Version(String buildId, String buildVersion, String majorVersion, String svnRev) {
- this.BUILD_ID = fixNull(buildId);
- this.BUILD_VERSION = fixNull(buildVersion);
- this.MAJOR_VERSION = fixNull(majorVersion);
- this.SVN_REVISION = fixNull(svnRev);
- }
-
- public static Version create(InputStream is) {
- Properties props = new Properties();
- try {
- props.load(is);
- } catch (IOException e) {
- // ignore even if the property was not found. we'll treat everything as unknown
- } catch (Exception e) {
- //ignore even if property not found
- }
-
- return new Version(
- props.getProperty("build-id"),
- props.getProperty("build-version"),
- props.getProperty("major-version"),
- props.getProperty("svn-revision"));
- }
-
- private String fixNull(String v) {
- if(v==null) return "unknown";
- return v;
- }
-
- public String toString() {
- return BUILD_VERSION + " svn-revision#" + SVN_REVISION;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/VersionUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/VersionUtil.java
deleted file mode 100644
index 61e60ea7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/VersionUtil.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util;
-
-import java.util.StringTokenizer;
-
-
-/**
- * Provides some version utilities.
- *
- * @author JAX-WS Development Team
- */
-
-public final class VersionUtil {
-
- public static boolean isVersion20(String version) {
- return JAXWS_VERSION_20.equals(version);
- }
-
- /**
- * @param version
- * @return true if version is a 2.0 version
- */
- public static boolean isValidVersion(String version) {
- return isVersion20(version);
- }
-
- public static String getValidVersionString() {
- return JAXWS_VERSION_20;
- }
-
- /**
- * BugFix# 4948171
- * Method getCanonicalVersion.
- *
- * Converts a given version to the format "a.b.c.d"
- * a - major version
- * b - minor version
- * c - minor minor version
- * d - patch version
- *
- * @return int[] Canonical version number
- */
- public static int[] getCanonicalVersion(String version) {
- int[] canonicalVersion = new int[4];
-
- // initialize the default version numbers
- canonicalVersion[0] = 1;
- canonicalVersion[1] = 1;
- canonicalVersion[2] = 0;
- canonicalVersion[3] = 0;
-
- final String DASH_DELIM = "_";
- final String DOT_DELIM = ".";
-
- StringTokenizer tokenizer =
- new StringTokenizer(version, DOT_DELIM);
- String token = tokenizer.nextToken();
-
- // first token is major version and must not have "_"
- canonicalVersion[0] = Integer.parseInt(token);
-
- // resolve the minor version
- token = tokenizer.nextToken();
- if (token.indexOf(DASH_DELIM) == -1) {
- // a.b
- canonicalVersion[1] = Integer.parseInt(token);
- } else {
- // a.b_c
- StringTokenizer subTokenizer =
- new StringTokenizer(token, DASH_DELIM);
- canonicalVersion[1] = Integer.parseInt(subTokenizer.nextToken());
- // leave minorMinor default
-
- canonicalVersion[3] = Integer.parseInt(subTokenizer.nextToken());
- }
-
- // resolve the minorMinor and patch version, if any
- if (tokenizer.hasMoreTokens()) {
- token = tokenizer.nextToken();
- if (token.indexOf(DASH_DELIM) == -1) {
- // minorMinor
- canonicalVersion[2] = Integer.parseInt(token);
-
- // resolve patch, if any
- if (tokenizer.hasMoreTokens())
- canonicalVersion[3] = Integer.parseInt(tokenizer.nextToken());
- } else {
- // a.b.c_d
- StringTokenizer subTokenizer =
- new StringTokenizer(token, DASH_DELIM);
- // minorMinor
- canonicalVersion[2] = Integer.parseInt(subTokenizer.nextToken());
-
- // patch
- canonicalVersion[3] = Integer.parseInt(subTokenizer.nextToken());
- }
- }
-
- return canonicalVersion;
- }
-
- /**
- *
- * @param version1
- * @param version2
- * @return -1, 0 or 1 based upon the comparison results
- * -1 if version1 is less than version2
- * 0 if version1 is equal to version2
- * 1 if version1 is greater than version2
- */
- public static int compare(String version1, String version2) {
- int[] canonicalVersion1 = getCanonicalVersion(version1);
- int[] canonicalVersion2 = getCanonicalVersion(version2);
-
- if (canonicalVersion1[0] < canonicalVersion2[0]) {
- return -1;
- } else if (canonicalVersion1[0] > canonicalVersion2[0]) {
- return 1;
- } else {
- if (canonicalVersion1[1] < canonicalVersion2[1]) {
- return -1;
- } else if (canonicalVersion1[1] > canonicalVersion2[1]) {
- return 1;
- } else {
- if (canonicalVersion1[2] < canonicalVersion2[2]) {
- return -1;
- } else if (canonicalVersion1[2] > canonicalVersion2[2]) {
- return 1;
- } else {
- if (canonicalVersion1[3] < canonicalVersion2[3]) {
- return -1;
- } else if (canonicalVersion1[3] > canonicalVersion2[3]) {
- return 1;
- } else
- return 0;
- }
- }
- }
- }
-
- public static final String JAXWS_VERSION_20 = "2.0";
- // the latest version is default
- public static final String JAXWS_VERSION_DEFAULT = JAXWS_VERSION_20;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java
deleted file mode 100644
index dd6e5e79..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util.exception;
-
-import com.sun.istack.internal.localization.Localizable;
-import com.sun.istack.internal.localization.LocalizableMessage;
-import com.sun.istack.internal.localization.LocalizableMessageFactory;
-import com.sun.istack.internal.localization.Localizer;
-import com.sun.istack.internal.localization.NullLocalizable;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import javax.xml.ws.WebServiceException;
-
-/**
- * Represents a {@link WebServiceException} with
- * localizable message.
- *
- * @author WS Development Team
- */
-public abstract class JAXWSExceptionBase
- extends WebServiceException implements Localizable {
-
- //Don't worry about previous serialVersionUID = 4818235090198755494L;, this class was not serializable before.
- private static final long serialVersionUID = 1L;
-
- private transient Localizable msg;
-
- /**
- * @deprecated
- * Should use the localizable constructor instead.
- */
- protected JAXWSExceptionBase(String key, Object... args) {
- super(findNestedException(args));
- this.msg = new LocalizableMessage(getDefaultResourceBundleName(), key, args);
- }
-
-
- protected JAXWSExceptionBase(String message) {
- this(new NullLocalizable(message));
- }
-
- /**
- * Creates a new exception that wraps the specified exception.
- */
- protected JAXWSExceptionBase(Throwable throwable) {
- this(new NullLocalizable(throwable.toString()),throwable);
- }
-
- protected JAXWSExceptionBase(Localizable msg) {
- this.msg = msg;
- }
-
- protected JAXWSExceptionBase(Localizable msg, Throwable cause) {
- super(cause);
- this.msg = msg;
- }
-
- /**
- * @serialData Default fields, followed by information in Localizable which comprises of.
- * ResourceBundle name, then key and followed by arguments array.
- * If there is no arguments array, then -1 is written. If there is a argument array (possible of zero
- * length) then the array length is written as an integer, followed by each argument (Object).
- * If the Object is serializable, the argument is written. Otherwise the output of Object.toString()
- * is written.
- */
- private void writeObject(ObjectOutputStream out) throws IOException {
- // We have to call defaultWriteObject first.
- out.defaultWriteObject();
-
- out.writeObject(msg.getResourceBundleName());
- out.writeObject(msg.getKey());
- Object[] args = msg.getArguments();
- if (args == null) {
- out.writeInt(-1);
- return;
- }
- out.writeInt(args.length);
- // Write Object values for the parameters, if it is serializable otherwise write String form of it..
- for (int i = 0; i < args.length; i++) {
- if (args[i] == null || args[i] instanceof Serializable) {
- out.writeObject(args[i]);
- } else {
- out.writeObject(args[i].toString());
- }
- }
- }
-
- private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
- // We have to call defaultReadObject first.
- in.defaultReadObject();
- Object[] args;
- String resourceBundleName = (String) in.readObject();
- String key = (String) in.readObject();
- int len = in.readInt();
- if (len == -1) {
- args = null;
- } else {
- args = new Object[len];
- for (int i = 0; i < args.length; i++) {
- args[i] = in.readObject();
- }
- }
- msg = new LocalizableMessageFactory(resourceBundleName).getMessage(key,args);
- }
-
- private static Throwable findNestedException(Object[] args) {
- if (args == null)
- return null;
-
- for( Object o : args )
- if(o instanceof Throwable)
- return (Throwable)o;
- return null;
- }
-
- public String getMessage() {
- Localizer localizer = new Localizer();
- return localizer.localize(this);
- }
-
- /**
- * Gets the default resource bundle name for this kind of exception.
- * Used for {@link #JAXWSExceptionBase(String, Object[])}.
- */
- protected abstract String getDefaultResourceBundleName();
-
-//
-// Localizable delegation
-//
- public final String getKey() {
- return msg.getKey();
- }
-
- public final Object[] getArguments() {
- return msg.getArguments();
- }
-
- public final String getResourceBundleName() {
- return msg.getResourceBundleName();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/LocatableWebServiceException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/LocatableWebServiceException.java
deleted file mode 100644
index e0063b8b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/LocatableWebServiceException.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util.exception;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.resources.UtilMessages;
-import org.xml.sax.Locator;
-import org.xml.sax.helpers.LocatorImpl;
-
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.WebServiceException;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * {@link WebServiceException} with source location informaiton.
- *
- * <p>
- * This exception should be used wherever the location information is available,
- * so that the location information is carried forward to users (to assist
- * error diagnostics.)
- *
- * @author Kohsuke Kawaguchi
- */
-public class LocatableWebServiceException extends WebServiceException {
- /**
- * Locations related to error.
- */
- private final Locator[] location;
-
- public LocatableWebServiceException(String message, Locator... location) {
- this(message,null,location);
- }
-
- public LocatableWebServiceException(String message, Throwable cause, Locator... location) {
- super(appendLocationInfo(message,location), cause);
- this.location = location;
- }
-
- public LocatableWebServiceException(Throwable cause, Locator... location) {
- this(cause.toString(),cause,location);
- }
-
- public LocatableWebServiceException(String message, XMLStreamReader locationSource) {
- this(message,toLocation(locationSource));
- }
-
- public LocatableWebServiceException(String message, Throwable cause, XMLStreamReader locationSource) {
- this(message,cause,toLocation(locationSource));
- }
-
- public LocatableWebServiceException(Throwable cause, XMLStreamReader locationSource) {
- this(cause,toLocation(locationSource));
- }
-
- /**
- * Locations related to this exception.
- *
- * @return
- * Can be empty but never null.
- */
- public @NotNull List<Locator> getLocation() {
- return Arrays.asList(location);
- }
-
- private static String appendLocationInfo(String message, Locator[] location) {
- StringBuilder buf = new StringBuilder(message);
- for( Locator loc : location )
- buf.append('\n').append(UtilMessages.UTIL_LOCATION( loc.getLineNumber(), loc.getSystemId() ));
- return buf.toString();
- }
-
- private static Locator toLocation(XMLStreamReader xsr) {
- LocatorImpl loc = new LocatorImpl();
- Location in = xsr.getLocation();
- loc.setSystemId(in.getSystemId());
- loc.setPublicId(in.getPublicId());
- loc.setLineNumber(in.getLineNumber());
- loc.setColumnNumber(in.getColumnNumber());
- return loc;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java
deleted file mode 100644
index 12d1507d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java
+++ /dev/null
@@ -1,583 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.util.pipe;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferResult;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-import com.sun.xml.internal.ws.api.server.DocumentAddressResolver;
-import com.sun.xml.internal.ws.api.server.SDDocument;
-import com.sun.xml.internal.ws.api.server.SDDocumentSource;
-import com.sun.xml.internal.ws.developer.SchemaValidationFeature;
-import com.sun.xml.internal.ws.developer.ValidationErrorHandler;
-import com.sun.xml.internal.ws.server.SDDocumentImpl;
-import com.sun.xml.internal.ws.util.ByteArrayBuffer;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import com.sun.xml.internal.ws.wsdl.SDDocumentResolver;
-import com.sun.xml.internal.ws.wsdl.parser.WSDLConstants;
-import org.w3c.dom.*;
-import org.w3c.dom.ls.LSInput;
-import org.w3c.dom.ls.LSResourceResolver;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.NamespaceSupport;
-
-import javax.xml.XMLConstants;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.SchemaFactory;
-import javax.xml.validation.Validator;
-import javax.xml.ws.WebServiceException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.StringReader;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.util.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import static com.sun.xml.internal.ws.util.xml.XmlUtil.allowExternalAccess;
-
-/**
- * {@link Tube} that does the schema validation.
- *
- * @author Jitendra Kotamraju
- */
-public abstract class AbstractSchemaValidationTube extends AbstractFilterTubeImpl {
-
- private static final Logger LOGGER = Logger.getLogger(AbstractSchemaValidationTube.class.getName());
-
- protected final WSBinding binding;
- protected final SchemaValidationFeature feature;
- protected final DocumentAddressResolver resolver = new ValidationDocumentAddressResolver();
- protected final SchemaFactory sf;
-
- public AbstractSchemaValidationTube(WSBinding binding, Tube next) {
- super(next);
- this.binding = binding;
- feature = binding.getFeature(SchemaValidationFeature.class);
- sf = allowExternalAccess(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI), "file", false);
- }
-
- protected AbstractSchemaValidationTube(AbstractSchemaValidationTube that, TubeCloner cloner) {
- super(that, cloner);
- this.binding = that.binding;
- this.feature = that.feature;
- this.sf = that.sf;
- }
-
- protected abstract Validator getValidator();
-
- protected abstract boolean isNoValidation();
-
- private static class ValidationDocumentAddressResolver implements DocumentAddressResolver {
-
- @Nullable
- @Override
- public String getRelativeAddressFor(@NotNull SDDocument current, @NotNull SDDocument referenced) {
- LOGGER.log(Level.FINE, "Current = {0} resolved relative={1}", new Object[]{current.getURL(), referenced.getURL()});
- return referenced.getURL().toExternalForm();
- }
- }
-
- private Document createDOM(SDDocument doc) {
- // Get infoset
- ByteArrayBuffer bab = new ByteArrayBuffer();
- try {
- doc.writeTo(null, resolver, bab);
- } catch (IOException ioe) {
- throw new WebServiceException(ioe);
- }
-
- // Convert infoset to DOM
- Transformer trans = XmlUtil.newTransformer();
- Source source = new StreamSource(bab.newInputStream(), null); //doc.getURL().toExternalForm());
- DOMResult result = new DOMResult();
- try {
- trans.transform(source, result);
- } catch(TransformerException te) {
- throw new WebServiceException(te);
- }
- return (Document)result.getNode();
- }
-
- protected class MetadataResolverImpl implements SDDocumentResolver, LSResourceResolver {
-
- // systemID --> SDDocument
- final Map<String, SDDocument> docs = new HashMap<String, SDDocument>();
-
- // targetnamespace --> SDDocument
- final Map<String, SDDocument> nsMapping = new HashMap<String, SDDocument>();
-
- public MetadataResolverImpl() {
- }
-
- public MetadataResolverImpl(Iterable<SDDocument> it) {
- for(SDDocument doc : it) {
- if (doc.isSchema()) {
- docs.put(doc.getURL().toExternalForm(), doc);
- nsMapping.put(((SDDocument.Schema)doc).getTargetNamespace(), doc);
- }
- }
- }
-
- void addSchema(Source schema) {
- assert schema.getSystemId() != null;
-
- String systemId = schema.getSystemId();
- try {
- XMLStreamBufferResult xsbr = XmlUtil.identityTransform(schema, new XMLStreamBufferResult());
- SDDocumentSource sds = SDDocumentSource.create(new URL(systemId), xsbr.getXMLStreamBuffer());
- SDDocument sdoc = SDDocumentImpl.create(sds, new QName(""), new QName(""));
- docs.put(systemId, sdoc);
- nsMapping.put(((SDDocument.Schema)sdoc).getTargetNamespace(), sdoc);
- } catch(Exception ex) {
- LOGGER.log(Level.WARNING, "Exception in adding schemas to resolver", ex);
- }
- }
-
- void addSchemas(Collection<? extends Source> schemas) {
- for(Source src : schemas) {
- addSchema(src);
- }
- }
-
- @Override
- public SDDocument resolve(String systemId) {
- SDDocument sdi = docs.get(systemId);
- if (sdi == null) {
- SDDocumentSource sds;
- try {
- sds = SDDocumentSource.create(new URL(systemId));
- } catch(MalformedURLException e) {
- throw new WebServiceException(e);
- }
- sdi = SDDocumentImpl.create(sds, new QName(""), new QName(""));
- docs.put(systemId, sdi);
- }
- return sdi;
- }
-
- @Override
- public LSInput resolveResource(String type, String namespaceURI, String publicId, final String systemId, final String baseURI) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "type={0} namespaceURI={1} publicId={2} systemId={3} baseURI={4}", new Object[]{type, namespaceURI, publicId, systemId, baseURI});
- }
- try {
- final SDDocument doc;
- if (systemId == null) {
- doc = nsMapping.get(namespaceURI);
- } else {
- URI rel = (baseURI != null)
- ? new URI(baseURI).resolve(systemId)
- : new URI(systemId);
- doc = docs.get(rel.toString());
- }
- if (doc != null) {
- return new LSInput() {
-
- @Override
- public Reader getCharacterStream() {
- return null;
- }
-
- @Override
- public void setCharacterStream(Reader characterStream) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public InputStream getByteStream() {
- ByteArrayBuffer bab = new ByteArrayBuffer();
- try {
- doc.writeTo(null, resolver, bab);
- } catch (IOException ioe) {
- throw new WebServiceException(ioe);
- }
- return bab.newInputStream();
- }
-
- @Override
- public void setByteStream(InputStream byteStream) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String getStringData() {
- return null;
- }
-
- @Override
- public void setStringData(String stringData) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String getSystemId() {
- return doc.getURL().toExternalForm();
- }
-
- @Override
- public void setSystemId(String systemId) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String getPublicId() {
- return null;
- }
-
- @Override
- public void setPublicId(String publicId) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String getBaseURI() {
- return doc.getURL().toExternalForm();
- }
-
- @Override
- public void setBaseURI(String baseURI) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String getEncoding() {
- return null;
- }
-
- @Override
- public void setEncoding(String encoding) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean getCertifiedText() {
- return false;
- }
-
- @Override
- public void setCertifiedText(boolean certifiedText) {
- throw new UnsupportedOperationException();
- }
- };
- }
- } catch(Exception e) {
- LOGGER.log(Level.WARNING, "Exception in LSResourceResolver impl", e);
- }
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Don''t know about systemId={0} baseURI={1}", new Object[]{systemId, baseURI});
- }
- return null;
- }
-
- }
-
- private void updateMultiSchemaForTns(String tns, String systemId, Map<String, List<String>> schemas) {
- List<String> docIdList = schemas.get(tns);
- if (docIdList == null) {
- docIdList = new ArrayList<String>();
- schemas.put(tns, docIdList);
- }
- docIdList.add(systemId);
- }
-
- /*
- * Using the following algorithm described in the xerces discussion thread:
- *
- * "If you're synthesizing schema documents to glue together the ones in
- * the WSDL then you may not even need to use "honour-all-schemaLocations".
- * Create a schema document for each namespace with <xs:include>s
- * (for each schema document in the WSDL with that target namespace)
- * and then combine those together with <xs:import>s for each of those
- * namespaces in a "master" schema document.
- *
- * That should work with any schema processor, not just those which
- * honour multiple imports for the same namespace."
- */
- protected Source[] getSchemaSources(Iterable<SDDocument> docs, MetadataResolverImpl mdresolver) {
- // All schema fragments in WSDLs are put inlinedSchemas
- // systemID --> DOMSource
- Map<String, DOMSource> inlinedSchemas = new HashMap<String, DOMSource>();
-
- // Consolidates all the schemas(inlined and external) for a tns
- // tns --> list of systemId
- Map<String, List<String>> multiSchemaForTns = new HashMap<String, List<String>>();
-
- for(SDDocument sdoc: docs) {
- if (sdoc.isWSDL()) {
- Document dom = createDOM(sdoc);
- // Get xsd:schema node from WSDL's DOM
- addSchemaFragmentSource(dom, sdoc.getURL().toExternalForm(), inlinedSchemas);
- } else if (sdoc.isSchema()) {
- updateMultiSchemaForTns(((SDDocument.Schema)sdoc).getTargetNamespace(), sdoc.getURL().toExternalForm(), multiSchemaForTns);
- }
- }
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "WSDL inlined schema fragment documents(these are used to create a pseudo schema) = {0}", inlinedSchemas.keySet());
- }
- for(DOMSource src: inlinedSchemas.values()) {
- String tns = getTargetNamespace(src);
- updateMultiSchemaForTns(tns, src.getSystemId(), multiSchemaForTns);
- }
-
- if (multiSchemaForTns.isEmpty()) {
- return new Source[0]; // WSDL doesn't have any schema fragments
- } else if (multiSchemaForTns.size() == 1 && multiSchemaForTns.values().iterator().next().size() == 1) {
- // It must be a inlined schema, otherwise there would be at least two schemas
- String systemId = multiSchemaForTns.values().iterator().next().get(0);
- return new Source[] {inlinedSchemas.get(systemId)};
- }
-
- // need to resolve these inlined schema fragments
- mdresolver.addSchemas(inlinedSchemas.values());
-
- // If there are multiple schema fragments for the same tns, create a
- // pseudo schema for that tns by using <xsd:include> of those.
- // tns --> systemId of a pseudo schema document (consolidated for that tns)
- Map<String, String> oneSchemaForTns = new HashMap<String, String>();
- int i = 0;
- for(Map.Entry<String, List<String>> e: multiSchemaForTns.entrySet()) {
- String systemId;
- List<String> sameTnsSchemas = e.getValue();
- if (sameTnsSchemas.size() > 1) {
- // SDDocumentSource should be changed to take String systemId
- // String pseudoSystemId = "urn:x-jax-ws-include-"+i++;
- systemId = "file:x-jax-ws-include-"+i++;
- Source src = createSameTnsPseudoSchema(e.getKey(), sameTnsSchemas, systemId);
- mdresolver.addSchema(src);
- } else {
- systemId = sameTnsSchemas.get(0);
- }
- oneSchemaForTns.put(e.getKey(), systemId);
- }
-
- // create a master pseudo schema with all the different tns
- Source pseudoSchema = createMasterPseudoSchema(oneSchemaForTns);
- return new Source[] { pseudoSchema };
- }
-
- private @Nullable void addSchemaFragmentSource(Document doc, String systemId, Map<String, DOMSource> map) {
- Element e = doc.getDocumentElement();
- assert e.getNamespaceURI().equals(WSDLConstants.NS_WSDL);
- assert e.getLocalName().equals("definitions");
-
- NodeList typesList = e.getElementsByTagNameNS(WSDLConstants.NS_WSDL, "types");
- for(int i=0; i < typesList.getLength(); i++) {
- NodeList schemaList = ((Element)typesList.item(i)).getElementsByTagNameNS(WSDLConstants.NS_XMLNS, "schema");
- for(int j=0; j < schemaList.getLength(); j++) {
- Element elem = (Element)schemaList.item(j);
- NamespaceSupport nss = new NamespaceSupport();
- // Doing this because transformer is not picking up inscope namespaces
- // why doesn't transformer pickup the inscope namespaces ??
- buildNamespaceSupport(nss, elem);
- patchDOMFragment(nss, elem);
- String docId = systemId+"#schema"+j;
- map.put(docId, new DOMSource(elem, docId));
- }
- }
- }
-
-
- /*
- * Recursively visit ancestors and build up {@link org.xml.sax.helpers.NamespaceSupport} object.
- */
- private void buildNamespaceSupport(NamespaceSupport nss, Node node) {
- if (node==null || node.getNodeType()!=Node.ELEMENT_NODE) {
- return;
- }
-
- buildNamespaceSupport( nss, node.getParentNode() );
-
- nss.pushContext();
- NamedNodeMap atts = node.getAttributes();
- for( int i=0; i<atts.getLength(); i++ ) {
- Attr a = (Attr)atts.item(i);
- if( "xmlns".equals(a.getPrefix()) ) {
- nss.declarePrefix( a.getLocalName(), a.getValue() );
- continue;
- }
- if( "xmlns".equals(a.getName()) ) {
- nss.declarePrefix( "", a.getValue() );
- //continue;
- }
- }
- }
-
- /**
- * Adds inscope namespaces as attributes to <xsd:schema> fragment nodes.
- *
- * @param nss namespace context info
- * @param elem that is patched with inscope namespaces
- */
- private @Nullable void patchDOMFragment(NamespaceSupport nss, Element elem) {
- NamedNodeMap atts = elem.getAttributes();
- for( Enumeration en = nss.getPrefixes(); en.hasMoreElements(); ) {
- String prefix = (String)en.nextElement();
-
- for( int i=0; i<atts.getLength(); i++ ) {
- Attr a = (Attr)atts.item(i);
- if (!"xmlns".equals(a.getPrefix()) || !a.getLocalName().equals(prefix)) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Patching with xmlns:{0}={1}", new Object[]{prefix, nss.getURI(prefix)});
- }
- elem.setAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "xmlns:"+prefix, nss.getURI(prefix));
- }
- }
- }
- }
-
- /*
- * Creates a pseudo schema for the WSDL schema fragments that have the same
- * targetNamespace.
- *
- * <xsd:schema targetNamespace="X">
- * <xsd:include schemaLocation="Y1"/>
- * <xsd:include schemaLocation="Y2"/>
- * </xsd:schema>
- *
- * @param tns targetNamespace of the the schema documents
- * @param docs collection of systemId for the schema documents that have the
- * same tns, the collection must have more than one document
- * @param psuedoSystemId for the created pseudo schema
- * @return Source of pseudo schema that can be used multiple times
- */
- private @Nullable Source createSameTnsPseudoSchema(String tns, Collection<String> docs, String pseudoSystemId) {
- assert docs.size() > 1;
-
- final StringBuilder sb = new StringBuilder("<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'");
- if (!tns.equals("")) {
- sb.append(" targetNamespace='").append(tns).append("'");
- }
- sb.append(">\n");
- for(String systemId : docs) {
- sb.append("<xsd:include schemaLocation='").append(systemId).append("'/>\n");
- }
- sb.append("</xsd:schema>\n");
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Pseudo Schema for the same tns={0}is {1}", new Object[]{tns, sb});
- }
-
- // override getReader() so that the same source can be used multiple times
- return new StreamSource(pseudoSystemId) {
- @Override
- public Reader getReader() {
- return new StringReader(sb.toString());
- }
- };
- }
-
- /*
- * Creates a master pseudo schema importing all WSDL schema fragments with
- * different tns+pseudo schema for same tns.
- * <xsd:schema targetNamespace="urn:x-jax-ws-master">
- * <xsd:import schemaLocation="Y1" namespace="X1"/>
- * <xsd:import schemaLocation="Y2" namespace="X2"/>
- * </xsd:schema>
- *
- * @param pseudo a map(tns-->systemId) of schema documents
- * @return Source of pseudo schema that can be used multiple times
- */
- private Source createMasterPseudoSchema(Map<String, String> docs) {
- final StringBuilder sb = new StringBuilder("<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema' targetNamespace='urn:x-jax-ws-master'>\n");
- for(Map.Entry<String, String> e : docs.entrySet()) {
- String systemId = e.getValue();
- String ns = e.getKey();
- sb.append("<xsd:import schemaLocation='").append(systemId).append("'");
- if (!ns.equals("")) {
- sb.append(" namespace='").append(ns).append("'");
- }
- sb.append("/>\n");
- }
- sb.append("</xsd:schema>");
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Master Pseudo Schema = {0}", sb);
- }
-
- // override getReader() so that the same source can be used multiple times
- return new StreamSource("file:x-jax-ws-master-doc") {
- @Override
- public Reader getReader() {
- return new StringReader(sb.toString());
- }
- };
- }
-
- protected void doProcess(Packet packet) throws SAXException {
- getValidator().reset();
- Class<? extends ValidationErrorHandler> handlerClass = feature.getErrorHandler();
- ValidationErrorHandler handler;
- try {
- handler = handlerClass.newInstance();
- } catch(Exception e) {
- throw new WebServiceException(e);
- }
- handler.setPacket(packet);
- getValidator().setErrorHandler(handler);
- Message msg = packet.getMessage().copy();
- Source source = msg.readPayloadAsSource();
- try {
- // Validator javadoc allows ONLY SAX, and DOM Sources
- // But the impl seems to handle all kinds.
- getValidator().validate(source);
- } catch(IOException e) {
- throw new WebServiceException(e);
- }
- }
-
- private String getTargetNamespace(DOMSource src) {
- Element elem = (Element)src.getNode();
- return elem.getAttribute("targetNamespace");
- }
-
-// protected static void printSource(Source src) {
-// try {
-// ByteArrayBuffer bos = new ByteArrayBuffer();
-// StreamResult sr = new StreamResult(bos );
-// Transformer trans = TransformerFactory.newInstance().newTransformer();
-// trans.transform(src, sr);
-// LOGGER.info("**** src ******"+bos.toString());
-// bos.close();
-// } catch(Exception e) {
-// e.printStackTrace();
-// }
-// }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/DumpTube.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/DumpTube.java
deleted file mode 100644
index d3a31d71..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/DumpTube.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util.pipe;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.pipe.NextAction;
-import com.sun.xml.internal.ws.api.pipe.Pipe;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubeCloner;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl;
-import com.sun.xml.internal.ws.api.pipe.helper.AbstractTubeImpl;
-
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import java.io.PrintStream;
-import java.lang.reflect.Constructor;
-
-/**
- * {@link Pipe} that dumps messages that pass through.
- *
- * @author Kohsuke Kawaguchi
- */
-public class DumpTube extends AbstractFilterTubeImpl {
-
- private final String name;
-
- private final PrintStream out;
-
- private final XMLOutputFactory staxOut;
-
- /**
- * @param name
- * Specify the name that identifies this {@link DumpTube}
- * instance. This string will be printed when this pipe
- * dumps messages, and allows people to distinguish which
- * pipe instance is dumping a message when multiple
- * {@link DumpTube}s print messages out.
- * @param out
- * The output to send dumps to.
- * @param next
- * The next {@link Tube} in the pipeline.
- */
- public DumpTube(String name, PrintStream out, Tube next) {
- super(next);
- this.name = name;
- this.out = out;
- this.staxOut = XMLOutputFactory.newInstance();
- //staxOut.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES,true);
- }
-
- /**
- * Copy constructor.
- */
- protected DumpTube(DumpTube that, TubeCloner cloner) {
- super(that,cloner);
- this.name = that.name;
- this.out = that.out;
- this.staxOut = that.staxOut;
- }
-
- @Override
- public NextAction processRequest(Packet request) {
- dump("request",request);
- return super.processRequest(request);
- }
-
- @Override
- public NextAction processResponse(Packet response) {
- dump("response",response);
- return super.processResponse(response);
- }
-
- protected void dump(String header, Packet packet) {
- out.println("====["+name+":"+header+"]====");
- if(packet.getMessage()==null)
- out.println("(none)");
- else
- try {
- XMLStreamWriter writer = staxOut.createXMLStreamWriter(new PrintStream(out) {
- @Override
- public void close() {
- // noop
- }
- });
- writer = createIndenter(writer);
- packet.getMessage().copy().writeTo(writer);
- writer.close();
- } catch (XMLStreamException e) {
- e.printStackTrace(out);
- }
- out.println("============");
- }
-
- /**
- * Wraps {@link XMLStreamWriter} by an indentation engine if possible.
- *
- * <p>
- * We can do this only when we have <tt>stax-utils.jar</tt> in the classpath.
- */
- private XMLStreamWriter createIndenter(XMLStreamWriter writer) {
- try {
- Class clazz = getClass().getClassLoader().loadClass("javanet.staxutils.IndentingXMLStreamWriter");
- Constructor c = clazz.getConstructor(XMLStreamWriter.class);
- writer = (XMLStreamWriter)c.newInstance(writer);
- } catch (Exception e) {
- // if stax-utils.jar is not in the classpath, this will fail
- // so, we'll just have to do without indentation
- if(!warnStaxUtils) {
- warnStaxUtils = true;
- out.println("WARNING: put stax-utils.jar to the classpath to indent the dump output");
- }
- }
- return writer;
- }
-
-
- public AbstractTubeImpl copy(TubeCloner cloner) {
- return new DumpTube(this,cloner);
- }
-
- private static boolean warnStaxUtils;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandalonePipeAssembler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandalonePipeAssembler.java
deleted file mode 100644
index 78b21981..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandalonePipeAssembler.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util.pipe;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.pipe.ClientPipeAssemblerContext;
-import com.sun.xml.internal.ws.api.pipe.Pipe;
-import com.sun.xml.internal.ws.api.pipe.PipelineAssembler;
-import com.sun.xml.internal.ws.api.pipe.ServerPipeAssemblerContext;
-
-/**
- * Default Pipeline assembler for JAX-WS client and server side runtimes. It
- * assembles various pipes into a pipeline that a message needs to be passed
- * through.
- *
- * @author Kohsuke Kawaguchi
- * @author Jitendra Kotamraju
- */
-public class StandalonePipeAssembler implements PipelineAssembler {
-
- @NotNull
- public Pipe createClient(ClientPipeAssemblerContext context) {
- Pipe head = context.createTransportPipe();
- head = context.createSecurityPipe(head);
-
- if (dump) {
- // for debugging inject a dump pipe. this is left in the production code,
- // as it would be very handy for a trouble-shooting at the production site.
- head = context.createDumpPipe("client", System.out, head);
- }
- head = context.createWsaPipe(head);
- head = context.createClientMUPipe(head);
- return context.createHandlerPipe(head);
- }
-
- /**
- * On Server-side, HandlerChains cannot be changed after it is deployed.
- * During assembling the Pipelines, we can decide if we really need a
- * SOAPHandlerPipe and LogicalHandlerPipe for a particular Endpoint.
- */
- public Pipe createServer(ServerPipeAssemblerContext context) {
- Pipe head = context.getTerminalPipe();
- head = context.createHandlerPipe(head);
- head = context.createMonitoringPipe(head);
- head = context.createServerMUPipe(head);
- head = context.createWsaPipe(head);
- head = context.createSecurityPipe(head);
- return head;
- }
-
- /**
- * Are we going to dump the message to System.out?
- */
- private static final boolean dump;
-
- static {
- boolean b = false;
- try {
- b = Boolean.getBoolean(StandalonePipeAssembler.class.getName()+".dump");
- } catch (Throwable t) {
- // treat it as false
- }
- dump = b;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandaloneTubeAssembler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandaloneTubeAssembler.java
deleted file mode 100644
index 3e18097d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandaloneTubeAssembler.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util.pipe;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext;
-import com.sun.xml.internal.ws.api.pipe.ServerTubeAssemblerContext;
-import com.sun.xml.internal.ws.api.pipe.Tube;
-import com.sun.xml.internal.ws.api.pipe.TubelineAssembler;
-
-/**
- * Default Pipeline assembler for JAX-WS client and server side runtimes. It
- * assembles various pipes into a pipeline that a message needs to be passed
- * through.
- *
- * @author Jitendra Kotamraju
- */
-public class StandaloneTubeAssembler implements TubelineAssembler {
-
- @NotNull
- public Tube createClient(ClientTubeAssemblerContext context) {
- Tube head = context.createTransportTube();
- head = context.createSecurityTube(head);
- if (dump) {
- // for debugging inject a dump pipe. this is left in the production code,
- // as it would be very handy for a trouble-shooting at the production site.
- head = context.createDumpTube("client", System.out, head);
- }
- head = context.createWsaTube(head);
- head = context.createClientMUTube(head);
- head = context.createValidationTube(head);
- return context.createHandlerTube(head);
- }
-
- /**
- * On Server-side, HandlerChains cannot be changed after it is deployed.
- * During assembling the Pipelines, we can decide if we really need a
- * SOAPHandlerPipe and LogicalHandlerPipe for a particular Endpoint.
- */
- public Tube createServer(ServerTubeAssemblerContext context) {
- Tube head = context.getTerminalTube();
- head = context.createValidationTube(head);
- head = context.createHandlerTube(head);
- head = context.createMonitoringTube(head);
- head = context.createServerMUTube(head);
- head = context.createWsaTube(head);
- if (dump) {
- // for debugging inject a dump pipe. this is left in the production code,
- // as it would be very handy for a trouble-shooting at the production site.
- head = context.createDumpTube("server", System.out, head);
- }
- head = context.createSecurityTube(head);
- return head;
- }
-
- /**
- * Are we going to dump the message to System.out?
- */
- public static final boolean dump;
-
- static {
- boolean b = false;
- try {
- b = Boolean.getBoolean(StandaloneTubeAssembler.class.getName()+".dump");
- } catch (Throwable t) {
- // treat it as false
- }
- dump = b;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en.properties
deleted file mode 100644
index 8bbfcd87..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en.properties
+++ /dev/null
@@ -1,289 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# English diagnostic messages (and fragments) for Sun's XML parser.
-#
-# P-NNN ... parser messages
-# F-NNN ... message fragments (sometimes associated with more
-# than one message, but usually just with one)
-# V-NNN ... validation related messages
-#
-# Most messages can be produced in only one way.
-#
-
-
-#
-# Generic parsing messages, not specific to validation
-#
-P-000 = No parser input source!
-P-001 = Illegal character at end of document, &#x{0};
-P-002 = Expansion of entity "&{0};" is not well formed
-P-003 = Premature end of input
-# {0} - F000-F009, F011, F021.
-P-004 = Missing whitespace {0}
-P-005 = Only whitespace allowed {0}
-
- #
- # unadorned "missing whitespace", with P-004 only
- #
- # Concatenated with P-004 (P-004 + F000)
- F-000 = after element name declaration
- # Concatenated with P-004 (P-004 + F001)
- F-001 = between attribute name and type
- # Concatenated with P-004 (P-004 + F002)
- F-002 = after NOTATION type name
- # Concatenated with P-004 (P-004 + F003)
- F-003 = between attribute type and default value
- # Concatenated with P-004 (P-004 + F004)
- F-004 = after #FIXED
- # Concatenated with P-004 (P-004 + F005)
- F-005 = after <!ENTITY declaration
- # Concatenated with P-004 (P-004 + F006)
- F-006 = after % in parameter entity declaration
- # Concatenated with P-004 (P-004 + F007)
- F-007 = after entity name
- # Concatenated with P-004 (P-004 + F008)
- F-008 = before SYSTEM literal URI
- # Concatenated with P-004 (P-004 + F009)
- F-009 = after PUBLIC keyword
- # F-010 ... identifier can be reused
- # Concatenated with P-004 (P-004 + F011)
- F-011 = after notation name
- # F-012 ... identifier can be reused
- # F-013 ... identifier can be reused
-
- #
- # in declaration, in "S Name", with P-004 and P-005
- #
- F-014 = before name in <!DOCTYPE declaration
- # Concatenated with P-005 (P-005 + F015)
- F-015 = before name in <!ELEMENT declaration
- # Concatenated with P-005 (P-005 + F016)
- F-016 = before name in <!ATTLIST declaration
- # Concatenated with P-005 (P-005 + F017)
- F-017 = before name in <!ENTITY declaration
- # Concatenated with P-005 (P-005 + F018)
- F-018 = before NDATA notation name in <!ENTITY declaration
- # Concatenated with P-005 (P-005 + F019)
- F-019 = before name in <!NOTATION declaration
-
-# {0} - character
-P-006 = Name tokens must not start with "{0}" characters
-P-007 = Value must be quoted
-# {0} - character, {1} - F020-F023, F028-F032, {2} - xml entity name e.g.: Next character must be ">" terminating <!ENTITY...> declaration "%HTML.Version"
-P-008 = Next character must be "{0}" {1} {2}
-
- # Concatenated with P-008 (P-008 + F020)
- F-020 = terminating reference to entity
- # Concatenated with P-008 (P-008 + F021)
- F-021 = terminating reference to parameter entity
- # Concatenated with P-008 (P-008 + F022)
- F-022 = terminating comment
- # Concatenated with P-008 (P-008 + F023)
- F-023 = in XML Declaration
- # Concatenated with P-008 (P-008 + F024)
- F-024 = terminating internal DTD subset
- # Concatenated with P-008 (P-008 + F025)
- F-025 = terminating <!DOCTYPE ...> declaration
- # Concatenated with P-008 (P-008 + F026)
- F-026 = after attribute name
- # Concatenated with P-008 (P-008 + F027)
- F-027 = terminating element
- # Concatenated with P-008 (P-008 + F028)
- F-028 = starting content model for element
- # Concatenated with P-008 (P-008 + F029)
- F-029 = starting list of attribute NOTATIONS
- # Concatenated with P-008 (P-008 + F030)
- F-030 = beginning condition DTD subset
- # Concatenated with P-008 (P-008 + F031)
- F-031 = terminating <!ENTITY ...> declaration
- # Concatenated with P-008 (P-008 + F032)
- F-032 = terminating <!NOTATION ...> declaration
-
-P-009 = Illegal character or entity reference syntax
-
-P-010 = Only external parameter entities may use "%{0};" in entity values
-P-011 = Illegal parameter entity reference syntax
-P-012 = Use "&lt;" for "<" in attribute values
-P-013 = Illegal reference to external entity "&{0};" in attribute
-P-014 = Reference to undefined entity "&{0};"
-# {0} - F033-F035
-P-015 = Expecting quoted value for {0}
-
- # Concatenated with P-015 (P-015 + F033)
- F-033 = PUBLIC identifier
- # Concatenated with P-015 (P-015 + F034)
- F-034 = SYSTEM identifier
- # {0} - attribute name. Concatenated with P-015 (P-015 + F033)
- F-035 = attribute value {0}
-
-P-016 = Illegal character in PUBLIC identifier: "{0}"
-P-017 = End of entity while processing comment
-P-018 = Processing instruction target is missing
-P-019 = XML declaration may only begin entities
-
-P-020 = Illegal processing instruction target: "{0}"
-P-021 = End of input inside processing instruction
-P-022 = Illegal processing instruction name, or missing whitespace
-P-023 = Illegal character "&#x{0};" ({1}) at end of XML Declaration
-P-024 = Expected "{0}=..."
-P-025 = XML version "{0}" should be declared
-P-026 = Illegal XML version string "{0}"
-P-027 = XML version "{0}" is recognized, but not "{1}"
-P-028 = Internal DTD subset must not have "<![..." constructs
-P-029 = Standalone declaration must be "yes" or "no", not "{0}"
-
-P-030 = Whitespace required before attributes
-P-031 = Attribute names must not start with "{0}" characters
-P-032 = Attribute "{0}" already appeared in this tag
-P-033 = Illegal xml:lang value "{0}"
-P-034 = Expected "</{0}>" to terminate element starting on line {1}
-P-035 = End of entity not allowed; an end tag is missing
-P-036 = ">" must terminate <!ELEMENT {0} ...> declaration, not "{1}"
-P-037 = Sequence content model must not contain "{0}"
-P-038 = Choice content model must not contain "{0}"
-P-039 = No content model may contain "{0}"
-
-P-040 = Need right parenthesis or "{1}" in content model, not "{0}"
-P-041 = Need right parenthesis, ",", or "|" in content model, not "{0}"
-# {0} - element name, {1} - character as a hex number
-P-042 = Illegal mixed content model for "{0}", next char = &#x{1};
-# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*".
-P-043 = Mixed content model for "{0}" must end with ")*", not "{1}"
-P-044 = Either an attribute declaration or ">" is expected, not "{0}"
-# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space"
-P-045 = Illegal type (starts with "{1}") for attribute "{0}"
-P-046 = Need keyword in conditional DTD section
-P-047 = Unterminated conditional DTD section
-P-048 = Only INCLUDE and IGNORE are allowed, not "{0}"
-P-049 = Illegal decimal character reference
-
-P-050 = Illegal hexadecimal character reference
-P-051 = Illegal XML character &#x{0};
-P-052 = Internal entity "&{0};" has characters after content
-P-053 = Unparsed entities such as "&{0};" must not be included
-P-054 = Using original entity definition for "&{0};"
-P-055 = Relative URI "{0}"; can not be resolved without a document URI
-P-056 = URI "{0}" has a fragment ID
-P-057 = Need "?>" to terminate XML declaration
-P-058 = External entity "&{0};" has characters after content
-P-059 = External parameter entity "%{0};" has characters after markup
-
-P-060 = Illegal character "{0}" in encoding name
-P-061 = Declared encoding "{0}" does not match actual one "{1}"; \
- this might not be an error
-P-062 = Notation must be PUBLIC or SYSTEM
-P-063 = Using first definition of notation "{0}"
-P-064 = Premature end of parameter entity "%{0};"
-P-065 = Entity Resolver did not provide SYSTEM id; may affect relative URIs
-# P-066 ... ID available
-P-067 = Document root element is missing
-P-068 = Notation name is required
-P-069 = Expansion of entity "{0}" is recursive
-
-P-070 = Malformed second part of surrogate pair: &#x{0};
-P-071 = Illegal XML character: &#x{0};
-P-072 = Character data cannot have "]]>"
-# Character data section starts with "<![CDATA[" and is terminated with "]]>" with text in between. No change needed.
-P-073 = EOF while parsing <![CDATA[ section
-P-074 = Illegal Unicode surrogate pair: &#x{0}; &#x{1};
-P-075 = Unsupported encoding: "{0}" (line number may be too low)
-P-076 = Character conversion error: "{0}" (line number may be too low)
-P-077 = Maximum symbol length ({0} characters) exceeded
-P-078 = No messages for locale "{0}" are available
-P-079 = The content beginning "<{1}" is not legal markup \
- Perhaps the "{1}" (&#{0};) character should be a letter
-
-P-080 = Parameter entity references must not appear within \
- markup declarations in the internal DTD subset
-P-081 = Incomplete Unicode surrogate pair: &#x{0}
-
-P-082 = Trying to access null attributes
-P-083 = Illegal stack state
-P-084 = Undeclared namespace prefix of element "{0}"
-P-085 = DTD detected
-P-086 = Illegal namespace prefix "{0}"; prefix "xml" cannot be bound to any namespace other than its usual namespace
-
-#
-# Validation messages, won't normally show up unless validation is
-# being performed. Note that V-022 relates to a spec bug: there
-# are both a WFC and VC on undefined PEs. If that's a WVC violation
-# there's no need for the VC, ever; and "standalone" would then affect
-# WF-ness. For the moment this assumes it's to be a VC not a WFC
-#
-V-000 = Validation is disabled
-V-001 = Valid documents must have a <!DOCTYPE declaration
-V-002 = This document is standalone, so it must not refer to "&{0};"
-V-003 = Undeclared notation "{0}" is used by an <!ENTITY...> declaration
-V-004 = Undeclared notation "{0}" is used by an <!ATTLIST...> declaration
-V-005 = Element type "{0}" is not declared
-V-006 = Root element type is "{0}", but was declared to be "{1}"
-V-007 = Attribute "{0}" is not declared for element "{1}"
-V-008 = Attribute "{0}" of element "{1}" must only have value "{2}"
-# {0} - probably attribute name.
-V-009 = Attribute value for "{0}" is #REQUIRED
-
-V-010 = This document is standalone, \
- so attribute "{0}" must not be defaulted
-V-011 = This document is standalone, \
- so element "{0}" must not have ignorable whitespace
-V-012 = Element "{0}" was already declared
-V-013 = Parameter entities must not contain partial declarations
-# {0} - element name
-V-014 = Parameter entity nesting error in content model for "{0}"
-V-015 = Mixed content model repeats element "{0}"
-V-016 = This element already has an ID attribute, "{0}"
-V-017 = ID attribute "{0}" must not be #FIXED
-V-018 = ID attribute "{0}" must not be defaulted
-V-019 = This document is standalone; this attribute needs to be pre-normalized
-
-V-020 = Parameter entities must not contain partial conditional DTD sections
-V-021 = Parameter entities must not contain partial comments
-V-022 = Reference to undefined parameter entity "%{0};"
-V-023 = This document is standalone; this ignorable CDATA whitespace is forbidden
-V-024 = No element has an ID attribute with value "{0}"
-V-025 = ID values must be XML names; "{0}" is not a name
-V-026 = Another element already has an ID attribute with value "{0}"
-V-027 = IDREF/IDREFS values must be XML names; "{0}" is not a name
-V-028 = NMTOKEN/NMTOKENS values must be XML name tokens; "{0}" is not one
-V-029 = Value "{0}" is not one of the enumerated values for this attribute
-
-V-030 = Attribute value "{0}" does not name a notation
-V-031 = Attribute value "{0}" does not name an unparsed entity
-V-032 = NMTOKENS attributes must have at least one value
-# Empty content model is a special type of XML element. I�d leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated.
-V-033 = Empty content models must have no content
-# Usage not found. TODO Remove
-#V-034 = Element "{0}" does not allow "{1}" -- {2}
-# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed.
-V-035 = Element "{0}" allows no further input; "{1}" is not allowed
-# Usage not found. TODO Remove
-#V-036 = Element "{0}" does not allow "{1}" here
-V-037 = Element "{0}" does not allow text
-V-038 = Element "{0}" requires additional elements
-V-039 = IDREFS attributes must have at least one value
-
-V-040 = ENTITIES attributes must have at least one value
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_de.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_de.properties
deleted file mode 100644
index fa39a7e6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_de.properties
+++ /dev/null
@@ -1,284 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# English diagnostic messages (and fragments) for Sun's XML parser.
-#
-# P-NNN ... parser messages
-# F-NNN ... message fragments (sometimes associated with more
-# than one message, but usually just with one)
-# V-NNN ... validation related messages
-#
-# Most messages can be produced in only one way.
-#
-
-
-#
-# Generic parsing messages, not specific to validation
-#
-P-000 = Keine Parser-Eingabequelle.
-P-001 = Ung\u00FCltiges Zeichen am Ende des Dokuments, &#x{0};
-P-002 = Einblendung der Entity "&{0};" ist nicht wohlgeformt
-P-003 = Vorzeitiges Ende der Eingabe
-# {0} - F000-F009, F011, F021.
-P-004 = Fehlende Leerstelle {0}
-P-005 = Nur Leerstelle zul\u00E4ssig {0}
-
- #
- # unadorned "missing whitespace", with P-004 only
- #
- # Concatenated with P-004 (P-004 + F000)
- F-000 = nach der Deklaration des Elementnamens
- # Concatenated with P-004 (P-004 + F001)
- F-001 = zwischen Attributname und Typ
- # Concatenated with P-004 (P-004 + F002)
- F-002 = nach dem Namen des NOTATION-Typs
- # Concatenated with P-004 (P-004 + F003)
- F-003 = zwischen Attributtyp und Standardwert
- # Concatenated with P-004 (P-004 + F004)
- F-004 = nach #FIXED
- # Concatenated with P-004 (P-004 + F005)
- F-005 = nach der <!ENTITY-Deklaration
- # Concatenated with P-004 (P-004 + F006)
- F-006 = nach % in der Parameter-Entity-Deklaration
- # Concatenated with P-004 (P-004 + F007)
- F-007 = nach dem Entity-Namen
- # Concatenated with P-004 (P-004 + F008)
- F-008 = vor SYSTEM-Literal-URI
- # Concatenated with P-004 (P-004 + F009)
- F-009 = nach dem Schl\u00FCsselwort PUBLIC
- # F-010 ... identifier can be reused
- # Concatenated with P-004 (P-004 + F011)
- F-011 = nach dem Notationsnamen
- # F-012 ... identifier can be reused
- # F-013 ... identifier can be reused
-
- #
- # in declaration, in "S Name", with P-004 and P-005
- #
- F-014 = vor dem Namen in der <!DOCTYPE-Deklaration
- # Concatenated with P-005 (P-005 + F015)
- F-015 = vor dem Namen in der <!ELEMENT-Deklaration
- # Concatenated with P-005 (P-005 + F016)
- F-016 = vor dem Namen in der <!ATTLIST-Deklaration
- # Concatenated with P-005 (P-005 + F017)
- F-017 = vor dem Namen in der <!ENTITY-Deklaration
- # Concatenated with P-005 (P-005 + F018)
- F-018 = vor dem NDATA-Notationsnamen in der <!ENTITY-Deklaration
- # Concatenated with P-005 (P-005 + F019)
- F-019 = vor dem Namen in der <!NOTATION-Deklaration
-
-# {0} - character
-P-006 = Namenstoken d\u00FCrfen nicht mit "{0}"-Zeichen beginnen
-P-007 = Wert muss in Anf\u00FChrungszeichen gesetzt werden
-# {0} - character, {1} - F020-F023, F028-F032, {2} - xml entity name e.g.: Next character must be ">" terminating <!ENTITY...> declaration "%HTML.Version"
-P-008 = Das n\u00E4chste Zeichen muss "{0}" {1} {2} sein
-
- # Concatenated with P-008 (P-008 + F020)
- F-020 = als Abschlusszeichen f\u00FCr die Referenz auf die Entity
- # Concatenated with P-008 (P-008 + F021)
- F-021 = als Abschlusszeichen f\u00FCr die Referenz auf die Parameter-Entity
- # Concatenated with P-008 (P-008 + F022)
- F-022 = als Abschlusszeichen f\u00FCr den Kommentar
- # Concatenated with P-008 (P-008 + F023)
- F-023 = in der XML-Deklaration
- # Concatenated with P-008 (P-008 + F024)
- F-024 = als Abschlusszeichen f\u00FCr die interne DTD-Teilmenge
- # Concatenated with P-008 (P-008 + F025)
- F-025 = als Abschlusszeichen f\u00FCr die <!DOCTYPE ...>-Deklaration
- # Concatenated with P-008 (P-008 + F026)
- F-026 = nach dem Attributnamen
- # Concatenated with P-008 (P-008 + F027)
- F-027 = als Abschlusszeichen f\u00FCr das Element
- # Concatenated with P-008 (P-008 + F028)
- F-028 = als Anfangszeichen des Contentmodells f\u00FCr das Element
- # Concatenated with P-008 (P-008 + F029)
- F-029 = als Anfangszeichen f\u00FCr die Liste der Attribut-NOTATIONEN
- # Concatenated with P-008 (P-008 + F030)
- F-030 = als Anfangszeichen f\u00FCr die DTD-Teilmenge der Bedingung
- # Concatenated with P-008 (P-008 + F031)
- F-031 = als Abschlusszeichen f\u00FCr die <!ENTITY ...>-Deklaration
- # Concatenated with P-008 (P-008 + F032)
- F-032 = als Abschlusszeichen f\u00FCr die <!NOTATION ...>-Deklaration
-
-P-009 = Ung\u00FCltiges Zeichen oder ung\u00FCltige Entity-Referenzsyntax
-
-P-010 = Nur externe Parameter-Entitys d\u00FCrfen "%{0};" in Entity-Werten verwenden
-P-011 = Ung\u00FCltige Syntax f\u00FCr Parameter-Entity-Referenz
-P-012 = Verwenden Sie in Attributwerten "&lt;" f\u00FCr "<"
-P-013 = Ung\u00FCltige Referenz auf externe Entity "&{0};" im Attribut
-P-014 = Referenz auf nicht definierte Entity "&{0};"
-# {0} - F033-F035
-P-015 = F\u00FCr {0} wird ein Wert in Anf\u00FChrungszeichen erwartet
-
- # Concatenated with P-015 (P-015 + F033)
- F-033 = PUBLIC-ID
- # Concatenated with P-015 (P-015 + F034)
- F-034 = SYSTEM-ID
- # {0} - attribute name. Concatenated with P-015 (P-015 + F033)
- F-035 = Attributwert {0}
-
-P-016 = Ung\u00FCltiges Zeichen in PUBLIC-ID: "{0}"
-P-017 = Entity-Ende beim Verarbeiten des Kommentars
-P-018 = Ziel der Verarbeitungsanweisung fehlt
-P-019 = XML-Deklaration darf nur am Anfang von Entitys stehen
-
-P-020 = Ung\u00FCltiges Ziel f\u00FCr Verarbeitungsanweisung: "{0}"
-P-021 = Eingabeende in Verarbeitungsanweisung
-P-022 = Ung\u00FCltiger Name f\u00FCr Verarbeitungsanweisung oder fehlende Leerstelle
-P-023 = Ung\u00FCltiges Zeichen "&#x{0};" ({1}) am Ende der XML-Deklaration
-P-024 = "{0}=..." erwartet
-P-025 = XML-Version "{0}" muss deklariert werden
-P-026 = Ung\u00FCltige XML-Versionszeichenfolge "{0}"
-P-027 = XML-Version "{0}" wird erkannt, aber nicht "{1}"
-P-028 = Interne DTD-Teilmenge darf keine "<![..."-Konstrukte aufweisen
-P-029 = Standalone-Deklaration muss "yes" oder "no" und nicht "{0}" sein
-
-P-030 = Leerstelle vor Attributen erforderlich
-P-031 = Attributnamen d\u00FCrfen nicht mit "{0}"-Zeichen beginnen
-P-032 = Attribut "{0}" war bereits in diesem Tag enthalten
-P-033 = Ung\u00FCltiger xml:lang-Wert "{0}"
-P-034 = "</{0}>" als Abschluss f\u00FCr das auf Zeile {1} beginnende Element erwartet
-P-035 = Entity-Ende nicht zul\u00E4ssig, ein End-Tag fehlt
-P-036 = ">" muss <!ELEMENT {0} ...>-Deklaration abschlie\u00DFen und nicht "{1}"
-P-037 = Sequence-Contentmodell darf nicht "{0}" enthalten
-P-038 = Choice-Contentmodell darf nicht "{0}" enthalten
-P-039 = Kein Contentmodell darf "{0}" enthalten
-
-P-040 = Rechte Klammer oder "{1}" in Contentmodell erforderlich und nicht "{0}"
-P-041 = Rechte Klammer, "," oder "|" in Contentmodell erforderlich und nicht "{0}"
-# {0} - element name, {1} - character as a hex number
-P-042 = Ung\u00FCltiges Modell mit gemischtem Content f\u00FCr "{0}", n\u00E4chstes Zeichen = &#x{1};
-# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*".
-P-043 = Modell mit gemischtem Content f\u00FCr "{0}" muss mit ")*" und nicht mit "{1}" enden
-P-044 = Eine Attributdeklaration oder ">" wird erwartet und nicht "{0}"
-# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space"
-P-045 = Ung\u00FCltiger Typ (beginnt mit "{1}") f\u00FCr das Attribut "{0}"
-P-046 = Schl\u00FCsselwort in bedingtem DTD-Abschnitt erforderlich
-P-047 = Nicht abgeschlossener bedingter DTD-Abschnitt
-P-048 = Nur INCLUDE und IGNORE sind zul\u00E4ssig und nicht "{0}"
-P-049 = Ung\u00FCltige Dezimalzeichenreferenz
-
-P-050 = Ung\u00FCltige Hexadezimalzeichen-Referenz
-P-051 = Ung\u00FCltiges XML-Zeichen &#x{0};
-P-052 = Interne Entity "&{0};" weist Zeichen nach dem Content auf
-P-053 = Nicht geparste Entitys, wie "&{0};", d\u00FCrfen nicht einbezogen werden
-P-054 = Urspr\u00FCngliche Entity-Definition f\u00FCr "&{0};" wird verwendet
-P-055 = Relativer URI "{0}" kann nicht ohne einen Dokument-URI aufgel\u00F6st werden
-P-056 = URI "{0}" hat eine Fragment-ID
-P-057 = "?>" zum Abschluss der XML-Deklaration erforderlich
-P-058 = Externe Entity "&{0};" weist Zeichen nach dem Content auf
-P-059 = Externe Parameter-Entity "%{0};" weist Zeichen nach dem Markup auf
-
-P-060 = Ung\u00FCltiges Zeichen "{0}" im Codierungsnamen
-P-061 = Deklarierte Codierung "{0}" stimmt nicht mit der tats\u00E4chlichen Codierung "{1}" \u00FCberein. Dies ist m\u00F6glicherweise kein Fehler
-P-062 = Notation muss PUBLIC oder SYSTEM sein
-P-063 = Erste Definition der Notation "{0}" wird verwendet
-P-064 = Vorzeitiges Ende der Parameter-Entity "%{0};"
-P-065 = Entity Resolver hat keine SYSTEM-ID angegeben. Dies kann sich auf relative URIs auswirken
-# P-066 ... ID available
-P-067 = Document Root-Element fehlt
-P-068 = Notationsname ist erforderlich
-P-069 = Einblendung der Entity "{0}" ist rekursiv
-
-P-070 = Fehlerhaftes Format des zweiten Teils des Surrogatpaares: &#x{0};
-P-071 = Ung\u00FCltiges XML-Zeichen: &#x{0};
-P-072 = Zeichendaten d\u00FCrfen nicht "]]>" enthalten
-# Character data section starts with "<![CDATA[" and is terminated with "]]>" with text in between. No change needed.
-P-073 = Dateiende (EOF) beim Parsen des <![CDATA[-Abschnitts
-P-074 = Ung\u00FCltiges Unicode-Surrogatpaar: &#x{0}; &#x{1};
-P-075 = Nicht unterst\u00FCtzte Codierung: "{0}" (Zeilenanzahl m\u00F6glicherweise zu niedrig)
-P-076 = Zeichenkonvertierungsfehler: "{0}" (Zeilenanzahl m\u00F6glicherweise zu niedrig)
-P-077 = Maximale Symboll\u00E4nge ({0} Zeichen) \u00FCberschritten
-P-078 = F\u00FCr das Gebietsschema "{0}" sind keine Meldungen verf\u00FCgbar
-P-079 = Der mit "<{1}" beginnende Content ist kein g\u00FCltiges Markup. M\u00F6glicherweise muss das Zeichen "{1}" (&#{0};) ein Buchstabe sein
-
-P-080 = Parameter-Entity-Referenzen d\u00FCrfen nicht in Markup-Deklarationen in der internen DTD-Teilmenge enthalten sein
-P-081 = Unvollst\u00E4ndiges Unicode-Surrogatpaar: &#x{0}.
-
-P-082 = Es wird versucht, auf Nullattribute zuzugreifen
-P-083 = Ung\u00FCltiger Stack-Status
-P-084 = Nicht deklariertes Namespace-Pr\u00E4fix von Element "{0}"
-P-085 = DTD ermittelt
-P-086 = Unzul\u00E4ssiges Namespace-Pr\u00E4fix "{0}"; Pr\u00E4fix "xml" kann nicht an einen anderen Namespace als den \u00DCblichen Namespace gebunden werden
-
-#
-# Validation messages, won't normally show up unless validation is
-# being performed. Note that V-022 relates to a spec bug: there
-# are both a WFC and VC on undefined PEs. If that's a WVC violation
-# there's no need for the VC, ever; and "standalone" would then affect
-# WF-ness. For the moment this assumes it's to be a VC not a WFC
-#
-V-000 = Validierung ist deaktiviert
-V-001 = G\u00FCltige Dokumente m\u00FCssen eine <!DOCTYPE-Deklaration aufweisen
-V-002 = Dies ist ein Standalone-Dokument. Daher darf es nicht "&{0};" referenzieren
-V-003 = Nicht deklarierte Notation "{0}" wird von einer <!ENTITY...>-Deklaration verwendet
-V-004 = Nicht deklarierte Notation "{0}" wird von einer <!ATTLIST...>-Deklaration verwendet
-V-005 = Elementtyp "{0}" ist nicht deklariert
-V-006 = Root-Elementtyp ist "{0}", wurde jedoch als "{1}" deklariert
-V-007 = Attribut "{0}" ist f\u00FCr das Element "{1}" nicht deklariert
-V-008 = Attribut "{0}" des Elements "{1}" darf nur den Wert "{2}" aufweisen
-# {0} - probably attribute name.
-V-009 = Attributwert f\u00FCr "{0}" ist #REQUIRED
-
-V-010 = Dies ist ein Standalone-Dokument. Daher darf das Attribut "{0}" keinen Standardwert aufweisen
-V-011 = Dies ist ein Standalone-Dokument. Daher darf das Element "{0}" keine ignorierbaren Leerstellen aufweisen
-V-012 = Element "{0}" wurde bereits deklariert
-V-013 = Parameter-Entitys d\u00FCrfen keine partiellen Deklarationen enthalten
-# {0} - element name
-V-014 = Fehler bei der Parameter-Entity-Verschachtelung im Contentmodell f\u00FCr "{0}"
-V-015 = Modell mit gemischtem Content wiederholt das Element "{0}"
-V-016 = Dieses Element verf\u00FCgt bereits \u00FCber ein ID-Attribut, "{0}"
-V-017 = ID-Attribut "{0}" darf nicht #FIXED sein
-V-018 = ID-Attribut "{0}" darf keinen Standardwert aufweisen
-V-019 = Dies ist ein Standalone-Dokument. Daher muss dieses Attribut vornormalisiert werden
-
-V-020 = Parameter-Entitys d\u00FCrfen keine partiellen bedingten DTD-Abschnitte enthalten
-V-021 = Parameter-Entitys d\u00FCrfen keine partiellen Kommentare enthalten
-V-022 = Referenz auf nicht definierte Parameter-Entity "%{0};"
-V-023 = Dies ist ein Standalone-Dokument. Daher ist diese ignorierbare CDATA-Leerstelle nicht zul\u00E4ssig
-V-024 = Kein Element hat ein ID-Attribut mit dem Wert "{0}"
-V-025 = ID-Werte m\u00FCssen XML-Namen sein. "{0}" ist kein Name
-V-026 = Ein anderes Element weist bereits ein ID-Attribut mit dem Wert "{0}" auf
-V-027 = IDREF/IDREFS-Werte m\u00FCssen XML-Namen sein. "{0}" ist kein Name
-V-028 = NMTOKEN/NMTOKENS-Werte m\u00FCssen XML-Namenstoken sein. "{0}" ist kein Namenstoken
-V-029 = Der Wert "{0}" ist keiner der aufgez\u00E4hlten Werte f\u00FCr dieses Attribut
-
-V-030 = Attributwert "{0}" benennt keine Notation
-V-031 = Attributwert "{0}" benennt keine nicht geparste Entity
-V-032 = NMTOKENS-Attribute m\u00FCssen mindestens einen Wert aufweisen
-# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated.
-V-033 = EMPTY-Contentmodelle d\u00FCrfen keinen Content aufweisen
-# Usage not found. TODO Remove
-#V-034 = Element "{0}" does not allow "{1}" -- {2}
-# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed.
-V-035 = Element "{0}" l\u00E4sst keine weitere Eingabe zu. "{1}" ist nicht zul\u00E4ssig
-# Usage not found. TODO Remove
-#V-036 = Element "{0}" does not allow "{1}" here
-V-037 = Element "{0}" l\u00E4sst keinen Text zu
-V-038 = Element "{0}" erfordert zus\u00E4tzliche Elemente
-V-039 = IDREFS-Attribute m\u00FCssen mindestens einen Wert aufweisen
-
-V-040 = ENTITIES-Attribute m\u00FCssen mindestens einen Wert aufweisen
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_es.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_es.properties
deleted file mode 100644
index b9d7e0ac..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_es.properties
+++ /dev/null
@@ -1,284 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# English diagnostic messages (and fragments) for Sun's XML parser.
-#
-# P-NNN ... parser messages
-# F-NNN ... message fragments (sometimes associated with more
-# than one message, but usually just with one)
-# V-NNN ... validation related messages
-#
-# Most messages can be produced in only one way.
-#
-
-
-#
-# Generic parsing messages, not specific to validation
-#
-P-000 = No hay ning\u00FAn origen de entrada de analizador.
-P-001 = Car\u00E1cter no v\u00E1lido al final del documento, &#x{0};
-P-002 = La expansi\u00F3n de la entidad "&{0};" no tiene un formato correcto
-P-003 = Fin de entrada anticipado
-# {0} - F000-F009, F011, F021.
-P-004 = Falta espacio en blanco {0}
-P-005 = S\u00F3lo se permite un espacio en blanco {0}
-
- #
- # unadorned "missing whitespace", with P-004 only
- #
- # Concatenated with P-004 (P-004 + F000)
- F-000 = despu\u00E9s de la declaraci\u00F3n de nombre del elemento
- # Concatenated with P-004 (P-004 + F001)
- F-001 = entre el nombre de atributo y el tipo
- # Concatenated with P-004 (P-004 + F002)
- F-002 = despu\u00E9s del nombre de tipo NOTATION
- # Concatenated with P-004 (P-004 + F003)
- F-003 = entre el tipo de atributo y el valor por defecto
- # Concatenated with P-004 (P-004 + F004)
- F-004 = despu\u00E9s de #FIXED
- # Concatenated with P-004 (P-004 + F005)
- F-005 = despu\u00E9s de la declaraci\u00F3n <!ENTITY
- # Concatenated with P-004 (P-004 + F006)
- F-006 = despu\u00E9s de % en la declaraci\u00F3n de entidad del par\u00E1metro
- # Concatenated with P-004 (P-004 + F007)
- F-007 = despu\u00E9s del nombre de entidad
- # Concatenated with P-004 (P-004 + F008)
- F-008 = antes del URI literal SYSTEM
- # Concatenated with P-004 (P-004 + F009)
- F-009 = despu\u00E9s de la palabra clave PUBLIC
- # F-010 ... identifier can be reused
- # Concatenated with P-004 (P-004 + F011)
- F-011 = despu\u00E9s del nombre de anotaci\u00F3n
- # F-012 ... identifier can be reused
- # F-013 ... identifier can be reused
-
- #
- # in declaration, in "S Name", with P-004 and P-005
- #
- F-014 = antes del nombre en la declaraci\u00F3n <!DOCTYPE
- # Concatenated with P-005 (P-005 + F015)
- F-015 = antes del nombre en la declaraci\u00F3n <!ELEMENT
- # Concatenated with P-005 (P-005 + F016)
- F-016 = antes del nombre en la declaraci\u00F3n <!ATTLIST
- # Concatenated with P-005 (P-005 + F017)
- F-017 = antes del nombre en la declaraci\u00F3n <!ENTITY
- # Concatenated with P-005 (P-005 + F018)
- F-018 = antes del nombre de anotaci\u00F3n NDATA en la declaraci\u00F3n <!ENTITY
- # Concatenated with P-005 (P-005 + F019)
- F-019 = antes del nombre en la declaraci\u00F3n <!NOTATION
-
-# {0} - character
-P-006 = Los tokens de nombre no deben empezar con caracteres "{0}"
-P-007 = El valor debe estar entrecomillado
-# {0} - character, {1} - F020-F023, F028-F032, {2} - xml entity name e.g.: Next character must be ">" terminating <!ENTITY...> declaration "%HTML.Version"
-P-008 = El car\u00E1cter siguiente debe ser "{0}" {1} {2}
-
- # Concatenated with P-008 (P-008 + F020)
- F-020 = terminando referencia a la entidad
- # Concatenated with P-008 (P-008 + F021)
- F-021 = terminando referencia a la entidad de par\u00E1metro
- # Concatenated with P-008 (P-008 + F022)
- F-022 = terminando comentario
- # Concatenated with P-008 (P-008 + F023)
- F-023 = en declaraci\u00F3n XML
- # Concatenated with P-008 (P-008 + F024)
- F-024 = terminando subjuego DTD interno
- # Concatenated with P-008 (P-008 + F025)
- F-025 = terminando declaraci\u00F3n <!DOCTYPE...>
- # Concatenated with P-008 (P-008 + F026)
- F-026 = despu\u00E9s del nombre de atributo
- # Concatenated with P-008 (P-008 + F027)
- F-027 = terminando elemento
- # Concatenated with P-008 (P-008 + F028)
- F-028 = iniciando modelo de contenido para elemento
- # Concatenated with P-008 (P-008 + F029)
- F-029 = iniciando lista de atributos NOTATIONS
- # Concatenated with P-008 (P-008 + F030)
- F-030 = iniciando subjuego DTD de condiciones
- # Concatenated with P-008 (P-008 + F031)
- F-031 = terminando declaraci\u00F3n <!ENTITY...>
- # Concatenated with P-008 (P-008 + F032)
- F-032 = terminando declaraci\u00F3n <!NOTATION...>
-
-P-009 = Car\u00E1cter o sintaxis de referencia a entidad no v\u00E1lidos
-
-P-010 = S\u00F3lo las entidades de par\u00E1metros externos pueden utilizar "%{0};" en los valores de entidad
-P-011 = Sintaxis de referencia de entidad del par\u00E1metro no v\u00E1lida
-P-012 = Utilice "&lt;" para "<" en valores de atributo
-P-013 = Referencia no v\u00E1lida a la entidad externa "&{0};" en el atributo
-P-014 = Referencia a una entidad no definida "&{0};"
-# {0} - F033-F035
-P-015 = Se esperaba un valor entrecomillado para {0}
-
- # Concatenated with P-015 (P-015 + F033)
- F-033 = Identificador PUBLIC
- # Concatenated with P-015 (P-015 + F034)
- F-034 = Identificador SYSTEM
- # {0} - attribute name. Concatenated with P-015 (P-015 + F033)
- F-035 = valor de atributo {0}
-
-P-016 = Car\u00E1cter no v\u00E1lido en el identificador PUBLIC: "{0}"
-P-017 = Fin de entidad al procesar el comentario
-P-018 = Falta el destino de la instrucci\u00F3n de procesamiento
-P-019 = La declaraci\u00F3n XML s\u00F3lo puede iniciar entidades
-
-P-020 = Destino de instrucci\u00F3n de procesamiento no v\u00E1lido: "{0}"
-P-021 = Fin de entrada dentro de una instrucci\u00F3n de procesamiento
-P-022 = Nombre de instrucci\u00F3n de procesamiento no v\u00E1lido o falta un espacio en blanco
-P-023 = Car\u00E1cter no v\u00E1lido "&#x{0};" ({1}) al final de la declaraci\u00F3n XML
-P-024 = Se esperaba "{0}=..."
-P-025 = Se debe declarar la versi\u00F3n XML "{0}"
-P-026 = Cadena de versi\u00F3n XML no v\u00E1lida "{0}".
-P-027 = Se reconoce la versi\u00F3n XML "{0}", pero no "{1}"
-P-028 = El subjuego DTD interno no debe tener construcciones "<![..."
-P-029 = La declaraci\u00F3n aut\u00F3noma debe ser "yes" o "no", pero no "{0}"
-
-P-030 = Se necesita un espacio en blanco antes de los atributos
-P-031 = Los nombres de atributo no deben empezar con caracteres "{0}"
-P-032 = El atributo "{0}" ya ha aparecido en esta etiqueta
-P-033 = Valor xml:lang no v\u00E1lido "{0}"
-P-034 = Se esperaba "</{0}>" para terminar el elemento que comienza en la l\u00EDnea {1}
-P-035 = Fin de entidad no permitido; falta una etiqueta final
-P-036 = La declaraci\u00F3n <!ELEMENT {0}...> debe terminar con ">", no con "{1}"
-P-037 = El modelo de contenido de secuencia no debe contener "{0}"
-P-038 = El modelo de contenido de opciones no debe contener "{0}"
-P-039 = Ning\u00FAn modelo de contenido puede contener "{0}"
-
-P-040 = Es necesario un par\u00E9ntesis derecho o "{1}" en el modelo de contenido, no "{0}"
-P-041 = Es necesario un par\u00E9ntesis derecho, "," o "|" en el modelo de contenido, no "{0}"
-# {0} - element name, {1} - character as a hex number
-P-042 = Modelo de contenido mixto no v\u00E1lido para "{0}"; siguiente car\u00E1cter = &#x{1};
-# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*".
-P-043 = El modelo de contenido mixto para "{0}" debe terminar por ")*", no por "{1}"
-P-044 = Se esperaba una declaraci\u00F3n de atributo o ">", no "{0}"
-# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space"
-P-045 = Tipo no v\u00E1lido (empieza por "{1}") para el atributo "{0}"
-P-046 = Se necesita una palabra clave en la secci\u00F3n DTD condicional
-P-047 = Secci\u00F3n DTD condicional no terminada
-P-048 = S\u00F3lo se permiten INCLUDE e IGNORE, pero no "{0}"
-P-049 = Referencia de car\u00E1cter decimal no v\u00E1lida
-
-P-050 = Referencia de car\u00E1cter hexadecimal no v\u00E1lida
-P-051 = Car\u00E1cter XML no v\u00E1lido &#x{0};
-P-052 = La entidad interna "&{0};" tiene caracteres despu\u00E9s del contenido
-P-053 = No se deben incluir entidades no analizadas como "&{0};"
-P-054 = Utilizando la definici\u00F3n de entidad original para "&{0};"
-P-055 = URI relativo "{0}"; no se puede resolver sin un URI de documento
-P-056 = El URI "{0}" tiene un identificador de fragmento
-P-057 = Es necesario "?>" para terminar la declaraci\u00F3n XML
-P-058 = La entidad externa "&{0};" tiene caracteres despu\u00E9s del contenido
-P-059 = La entidad del par\u00E1metro externo "%{0};" tiene caracteres despu\u00E9s de la marca
-
-P-060 = Car\u00E1cter no v\u00E1lido "{0}" en el nombre de codificaci\u00F3n
-P-061 = La codificaci\u00F3n declarada "{0}" no coincide con la real "{1}"; puede que no se trate de un error
-P-062 = La notaci\u00F3n debe ser PUBLIC o SYSTEM
-P-063 = Utilizando la primera definici\u00F3n de la notaci\u00F3n "{0}"
-P-064 = Fin anticipado de la entidad del par\u00E1metro "%{0};"
-P-065 = El sistema de resoluci\u00F3n de entidades no ha proporcionado el identificador SYSTEM; puede afectar a los URI relativos
-# P-066 ... ID available
-P-067 = Falta el elemento ra\u00EDz del documento
-P-068 = Es necesario el nombre de la notaci\u00F3n
-P-069 = La expansi\u00F3n de la entidad "{0}" es recursiva
-
-P-070 = Segunda parte con formato incorrecto en el par de sustituci\u00F3n: &#x{0};
-P-071 = Car\u00E1cter XML no v\u00E1lido: &#x{0};
-P-072 = Los datos de car\u00E1cter no pueden tener "]]>"
-# Character data section starts with "<![CDATA[" and is terminated with "]]>" with text in between. No change needed.
-P-073 = EOF al analizar la secci\u00F3n <![CDATA[
-P-074 = Par de sustituci\u00F3n Unicode no v\u00E1lido: &#x{0}; &#x{1};
-P-075 = Codificaci\u00F3n no soportada: "{0}" (puede que el n\u00FAmero de l\u00EDnea sea demasiado bajo)
-P-076 = Error de conversi\u00F3n de caracteres: "{0}" (puede que el n\u00FAmero de l\u00EDnea sea demasiado bajo)
-P-077 = Se ha excedido la longitud m\u00E1xima de s\u00EDmbolo ({0} caracteres)
-P-078 = No hay mensajes disponibles para la configuraci\u00F3n regional "{0}"
-P-079 = El inicio de contenido "<{1}" no es una marca v\u00E1lida. Puede que el car\u00E1cter "{1}" (&#{0};) deba ser una letra
-
-P-080 = No deben aparecer referencias de entidad del par\u00E1metro en las declaraciones de marcado en el subjuego DTD interno
-P-081 = Par de sustituci\u00F3n Unicode incompleto: &#x{0}
-
-P-082 = Intentando acceder a los atributos nulos
-P-083 = Estado de pila no v\u00E1lido
-P-084 = Prefijo de espacio de nombres no declarado del elemento "{0}"
-P-085 = DTD detectado
-P-086 = Prefijo de espacio de nombres no v\u00E1lido "{0}"; el prefijo "xml" no se puede enlazar a ning\u00FAn espacio de nombres que no sea su espacio de nombres habitual
-
-#
-# Validation messages, won't normally show up unless validation is
-# being performed. Note that V-022 relates to a spec bug: there
-# are both a WFC and VC on undefined PEs. If that's a WVC violation
-# there's no need for the VC, ever; and "standalone" would then affect
-# WF-ness. For the moment this assumes it's to be a VC not a WFC
-#
-V-000 = La validaci\u00F3n est\u00E1 desactivada
-V-001 = Los documentos v\u00E1lidos deben tener una declaraci\u00F3n <!DOCTYPE
-V-002 = Este documento es aut\u00F3nomo, por lo que no debe hacer referencia a "&{0};"
-V-003 = La declaraci\u00F3n <!ENTITY...> utiliza la notaci\u00F3n no declarada "{0}"
-V-004 = La declaraci\u00F3n <!ATTLIST...> utiliza la notaci\u00F3n no declarada "{0}"
-V-005 = El tipo de elemento "{0}" no est\u00E1 declarado
-V-006 = El tipo de elemento ra\u00EDz es "{0}", pero se ha declarado como "{1}"
-V-007 = El atributo "{0}" no est\u00E1 declarado para el elemento "{1}"
-V-008 = El atributo "{0}" del elemento "{1}" s\u00F3lo debe tener el valor "{2}"
-# {0} - probably attribute name.
-V-009 = El valor de atributo para "{0}" es #REQUIRED
-
-V-010 = Este documento es aut\u00F3nomo, por lo que el atributo "{0}" no se debe definir por defecto
-V-011 = Este documento es aut\u00F3nomo, por lo que el elemento "{0}" no debe tener un espacio en blanco que se pueda ignorar
-V-012 = El elemento "{0}" ya estaba declarado
-V-013 = Las entidades de par\u00E1metro no deben contener declaraciones parciales
-# {0} - element name
-V-014 = Error de anidaci\u00F3n de entidad de par\u00E1metro en el modelo de contenido para "{0}"
-V-015 = El modelo de contenido mixto repite el elemento "{0}"
-V-016 = Este elemento ya tiene un atributo de identificador "{0}"
-V-017 = El atributo de identificador "{0}" no debe ser #FIXED
-V-018 = El atributo de identificador "{0}" no se debe definir por defecto
-V-019 = Este documento es aut\u00F3nomo; este atributo debe estar previamente normalizado
-
-V-020 = Las entidades de par\u00E1metro no deben contener secciones DTD condicionales parciales
-V-021 = Las entidades de par\u00E1metro no deben contener comentarios parciales
-V-022 = Referencia a una entidad de par\u00E1metro no definida "%{0};"
-V-023 = Este documento es aut\u00F3nomo; est\u00E1 prohibido este espacio en blanco CDATA que se puede ignorar
-V-024 = Ning\u00FAn elemento tiene un atributo de identificador con el valor "{0}"
-V-025 = Los valores de identificador deben ser nombres XML; "{0}" no es un nombre
-V-026 = Ya hay otro elemento con un atributo de identificador con el valor "{0}"
-V-027 = Los valores de IDREF/IDREFS deben ser nombres XML; "{0}" no es un nombre
-V-028 = Los valores de NMTOKEN/NMTOKENS deben ser tokens de nombre XML; "{0}" no lo es
-V-029 = El valor "{0}" no es uno de los valores enumerados para este atributo
-
-V-030 = El valor de atributo "{0}" no especifica una notaci\u00F3n
-V-031 = El valor de atributo "{0}" no especifica una entidad no analizada
-V-032 = Los atributos de NMTOKENS deben tener al menos un valor
-# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated.
-V-033 = Los modelos de contenido vac\u00EDos no deben tener contenido
-# Usage not found. TODO Remove
-#V-034 = Element "{0}" does not allow "{1}" -- {2}
-# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed.
-V-035 = El elemento "{0}" no permite m\u00E1s entradas; "{1}" no est\u00E1 permitido
-# Usage not found. TODO Remove
-#V-036 = Element "{0}" does not allow "{1}" here
-V-037 = El elemento "{0}" no permite texto
-V-038 = El elemento "{0}" necesita elementos adicionales
-V-039 = Los atributos de IDREFS deben tener al menos un valor
-
-V-040 = Los atributos de ENTITIES deben tener al menos un valor
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_fr.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_fr.properties
deleted file mode 100644
index dcb016a7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_fr.properties
+++ /dev/null
@@ -1,284 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# English diagnostic messages (and fragments) for Sun's XML parser.
-#
-# P-NNN ... parser messages
-# F-NNN ... message fragments (sometimes associated with more
-# than one message, but usually just with one)
-# V-NNN ... validation related messages
-#
-# Most messages can be produced in only one way.
-#
-
-
-#
-# Generic parsing messages, not specific to validation
-#
-P-000 = Aucune source d'entr\u00E9e d'analyseur.
-P-001 = Caract\u00E8re interdit \u00E0 la fin du document, &#x{0};
-P-002 = Le d\u00E9veloppement de l''entit\u00E9 "&{0};" est incorrect
-P-003 = Fin d'entr\u00E9e pr\u00E9matur\u00E9e
-# {0} - F000-F009, F011, F021.
-P-004 = Caract\u00E8re non imprimable manquant {0}
-P-005 = Un seul caract\u00E8re non imprimable autoris\u00E9 {0}
-
- #
- # unadorned "missing whitespace", with P-004 only
- #
- # Concatenated with P-004 (P-004 + F000)
- F-000 = apr\u00E8s la d\u00E9claration de nom d'\u00E9l\u00E9ment
- # Concatenated with P-004 (P-004 + F001)
- F-001 = entre les nom et type d'attribut
- # Concatenated with P-004 (P-004 + F002)
- F-002 = apr\u00E8s le nom de type de NOTATION
- # Concatenated with P-004 (P-004 + F003)
- F-003 = entre le type d'attribut et la valeur par d\u00E9faut
- # Concatenated with P-004 (P-004 + F004)
- F-004 = apr\u00E8s #FIXED
- # Concatenated with P-004 (P-004 + F005)
- F-005 = apr\u00E8s la d\u00E9claration <!ENTITY
- # Concatenated with P-004 (P-004 + F006)
- F-006 = apr\u00E8s % dans une d\u00E9claration d'entit\u00E9 de param\u00E8tre
- # Concatenated with P-004 (P-004 + F007)
- F-007 = apr\u00E8s le nom d'entit\u00E9
- # Concatenated with P-004 (P-004 + F008)
- F-008 = avant l'URI de litt\u00E9ral SYSTEM
- # Concatenated with P-004 (P-004 + F009)
- F-009 = apr\u00E8s le mot-cl\u00E9 PUBLIC
- # F-010 ... identifier can be reused
- # Concatenated with P-004 (P-004 + F011)
- F-011 = apr\u00E8s le nom de notation
- # F-012 ... identifier can be reused
- # F-013 ... identifier can be reused
-
- #
- # in declaration, in "S Name", with P-004 and P-005
- #
- F-014 = avant le nom dans la d\u00E9claration <!DOCTYPE
- # Concatenated with P-005 (P-005 + F015)
- F-015 = avant le nom dans la d\u00E9claration <!ELEMENT
- # Concatenated with P-005 (P-005 + F016)
- F-016 = avant le nom dans la d\u00E9claration <!ATTLIST
- # Concatenated with P-005 (P-005 + F017)
- F-017 = avant le nom dans la d\u00E9claration <!ENTITY
- # Concatenated with P-005 (P-005 + F018)
- F-018 = avant le nom de notation NDATA dans la d\u00E9claration <!ENTITY
- # Concatenated with P-005 (P-005 + F019)
- F-019 = avant le nom dans la d\u00E9claration <!NOTATION
-
-# {0} - character
-P-006 = Les jetons de nom ne doivent pas commencer par les caract\u00E8res "{0}"
-P-007 = La valeur doit \u00EAtre entre guillemets
-# {0} - character, {1} - F020-F023, F028-F032, {2} - xml entity name e.g.: Next character must be ">" terminating <!ENTITY...> declaration "%HTML.Version"
-P-008 = Le caract\u00E8re suivant doit \u00EAtre "{0}" {1} {2}
-
- # Concatenated with P-008 (P-008 + F020)
- F-020 = fin de la r\u00E9f\u00E9rence \u00E0 l'entit\u00E9
- # Concatenated with P-008 (P-008 + F021)
- F-021 = fin de la r\u00E9f\u00E9rence \u00E0 l'entit\u00E9 de param\u00E8tre
- # Concatenated with P-008 (P-008 + F022)
- F-022 = fin du commentaire
- # Concatenated with P-008 (P-008 + F023)
- F-023 = dans la d\u00E9claration XML
- # Concatenated with P-008 (P-008 + F024)
- F-024 = fin du sous-ensemble DTD interne
- # Concatenated with P-008 (P-008 + F025)
- F-025 = fin de la d\u00E9claration <!DOCTYPE ...>
- # Concatenated with P-008 (P-008 + F026)
- F-026 = apr\u00E8s le nom d'attribut
- # Concatenated with P-008 (P-008 + F027)
- F-027 = fin de l'\u00E9l\u00E9ment
- # Concatenated with P-008 (P-008 + F028)
- F-028 = d\u00E9marrage du mod\u00E8le de contenu pour l'\u00E9l\u00E9ment
- # Concatenated with P-008 (P-008 + F029)
- F-029 = d\u00E9but de la liste d'attributs NOTATIONS
- # Concatenated with P-008 (P-008 + F030)
- F-030 = d\u00E9but du sous-ensemble DTD de condition
- # Concatenated with P-008 (P-008 + F031)
- F-031 = fin de la d\u00E9claration <!ENTITY ...>
- # Concatenated with P-008 (P-008 + F032)
- F-032 = fin de la d\u00E9claration <!NOTATION ...>
-
-P-009 = Syntaxe de r\u00E9f\u00E9rence d'entit\u00E9 ou de caract\u00E8re interdite
-
-P-010 = Seules les entit\u00E9s de param\u00E8tre externes peuvent utiliser "%{0};" dans les valeurs d''entit\u00E9
-P-011 = Syntaxe de r\u00E9f\u00E9rence d'entit\u00E9 de param\u00E8tre interdite
-P-012 = Utiliser "&lt;" pour "<" dans les valeurs d'attribut
-P-013 = R\u00E9f\u00E9rence \u00E0 l''entit\u00E9 externe "&{0};" dans l''attribut interdite
-P-014 = R\u00E9f\u00E9rence \u00E0 l''entit\u00E9 non d\u00E9finie "&{0};"
-# {0} - F033-F035
-P-015 = Valeur entre guillemets attendue pour {0}
-
- # Concatenated with P-015 (P-015 + F033)
- F-033 = Identificateur PUBLIC
- # Concatenated with P-015 (P-015 + F034)
- F-034 = Identificateur SYSTEM
- # {0} - attribute name. Concatenated with P-015 (P-015 + F033)
- F-035 = valeur d''attribut {0}
-
-P-016 = Caract\u00E8re interdit dans l''identificateur PUBLIC : "{0}"
-P-017 = Fin de l'entit\u00E9 lors du traitement du commentaire
-P-018 = La cible d'instruction de traitement est manquante
-P-019 = Seules les entit\u00E9s peuvent commencer par une d\u00E9claration XML
-
-P-020 = Cible d''instruction de traitement interdite : "{0}"
-P-021 = Fin d'entr\u00E9e dans l'instruction de traitement
-P-022 = Nom d'instruction de traitement interdit ou caract\u00E8re non imprimable manquant
-P-023 = Caract\u00E8re interdit "&#x{0};" ({1}) \u00E0 la fin de la d\u00E9claration XML
-P-024 = Attendu : "{0}=..."
-P-025 = La version XML "{0}" doit \u00EAtre d\u00E9clar\u00E9e
-P-026 = Cha\u00EEne de version XML interdite "{0}"
-P-027 = La version XML "{0}" est reconnue, mais pas "{1}"
-P-028 = Un sous-ensemble DTD interne ne doit pas avoir de structures de code PL/SQL "<![..."
-P-029 = La d\u00E9claration autonome doit \u00EAtre d\u00E9finie sur "oui" ou "non", mais pas "{0}"
-
-P-030 = Caract\u00E8re non imprimable obligatoire avant les attributs
-P-031 = Les noms d''attribut ne doivent pas commencer par les caract\u00E8res "{0}"
-P-032 = L''attribut "{0}" figurait d\u00E9j\u00E0 dans cette balise
-P-033 = Valeur xml:lang "{0}" interdite
-P-034 = "</{0}>" attendu pour terminer l''\u00E9l\u00E9ment commen\u00E7ant \u00E0 la ligne {1}
-P-035 = Fin de l'entit\u00E9 non autoris\u00E9e ; une balise de fin est manquante
-P-036 = ">" doit terminer la d\u00E9claration <!ELEMENT {0} ...>, mais pas "{1}"
-P-037 = Le mod\u00E8le de contenu de s\u00E9quence ne doit pas contenir "{0}"
-P-038 = Le mod\u00E8le de contenu d''option ne doit pas contenir "{0}"
-P-039 = Aucun mod\u00E8le de contenu ne peut contenir "{0}"
-
-P-040 = Parenth\u00E8se fermante ou "{1}" requis dans le mod\u00E8le de contenu, mais pas "{0}"
-P-041 = Parenth\u00E8se fermante, "," ou "|" requis dans le mod\u00E8le de contenu, mais pas "{0}"
-# {0} - element name, {1} - character as a hex number
-P-042 = Mod\u00E8le de contenu mixte interdit pour "{0}", caract\u00E8re suivant = &#x{1};
-# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*".
-P-043 = Le mod\u00E8le de contenu mixte pour "{0}" doit finir par ")*", mais pas "{1}"
-P-044 = Une d\u00E9claration d''attribut ou le caract\u00E8re ">" est attendu, mais pas "{0}"
-# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space"
-P-045 = Type interdit (commence par "{1}") pour l''attribut "{0}"
-P-046 = Mot-cl\u00E9 requis dans la section DTD conditionnelle
-P-047 = Section DTD conditionnelle non termin\u00E9e
-P-048 = Seuls INCLUDE et IGNORE sont autoris\u00E9s, mais pas "{0}"
-P-049 = R\u00E9f\u00E9rence de caract\u00E8re d\u00E9cimal interdite
-
-P-050 = R\u00E9f\u00E9rence de caract\u00E8re hexad\u00E9cimal interdite
-P-051 = Caract\u00E8re XML &#x{0}; interdit
-P-052 = L''entit\u00E9 interne "&{0};" inclut des caract\u00E8res apr\u00E8s le contenu
-P-053 = Aucune entit\u00E9 non analys\u00E9e ("&{0};") ne doit \u00EAtre incluse
-P-054 = Utilisation de la d\u00E9finition d''entit\u00E9 d''origine pour "&{0};"
-P-055 = URI relatif "{0}" ; impossible de le r\u00E9soudre sans URI de document
-P-056 = L''URI "{0}" a un ID de fragment
-P-057 = "?>" requis pour terminer la d\u00E9claration XML
-P-058 = L''entit\u00E9 externe "&{0};" inclut des caract\u00E8res apr\u00E8s le contenu
-P-059 = L''entit\u00E9 de param\u00E8tre externe "%{0};" inclut des caract\u00E8res apr\u00E8s le balisage
-
-P-060 = Caract\u00E8re interdit "{0}" dans le nom d''encodage
-P-061 = L''encodage d\u00E9clar\u00E9 "{0}" ne concorde pas avec l''encodage r\u00E9el "{1}"; il ne s''agit peut-\u00EAtre pas d''une erreur
-P-062 = La notation doit \u00EAtre PUBLIC ou SYSTEM
-P-063 = Utilisation de la premi\u00E8re d\u00E9finition de la notation "{0}"
-P-064 = Fin pr\u00E9matur\u00E9e de l''entit\u00E9 de param\u00E8tre "%{0};"
-P-065 = Le r\u00E9solveur d'entit\u00E9 n'a fourni aucun ID SYSTEM ; cela peut affecter les URI relatifs
-# P-066 ... ID available
-P-067 = L'\u00E9l\u00E9ment racine de document est manquant
-P-068 = Le nom de notation est obligatoire
-P-069 = Le d\u00E9veloppement de l''entit\u00E9 "{0}" est r\u00E9cursif
-
-P-070 = La deuxi\u00E8me partie de la paire de substitution est incorrecte : &#x{0};
-P-071 = Caract\u00E8re XML : &#x{0}; interdit
-P-072 = Les donn\u00E9es de caract\u00E8re ne peuvent pas avoir "]]>"
-# Character data section starts with "<![CDATA[" and is terminated with "]]>" with text in between. No change needed.
-P-073 = EOF lors de l'analyse de la section <![CDATA[
-P-074 = Paire de substitution Unicode interdite : &#x{0}; &#x{1};
-P-075 = Encodage non pris en charge : "{0}" (le nombre de lignes est peut-\u00EAtre insuffisant)
-P-076 = Erreur de conversion de caract\u00E8re : "{0}" (le nombre de lignes est peut-\u00EAtre insuffisant)
-P-077 = Longueur de symbole maximale ({0} caract\u00E8res) d\u00E9pass\u00E9e
-P-078 = Aucun message n''est disponible pour l''environnement local "{0}"
-P-079 = Le d\u00E9but du contenu "<{1}" n''est pas un balisage autoris\u00E9. Le caract\u00E8re "{1}" (&#{0};) doit peut-\u00EAtre consister en une lettre
-
-P-080 = Les r\u00E9f\u00E9rences d'entit\u00E9 de param\u00E8tre ne doivent pas appara\u00EEtre dans les d\u00E9clarations de balisage du sous-ensemble DTD interne
-P-081 = Paire de substitution Unicode incompl\u00E8te : &#x{0}
-
-P-082 = Tentative d'acc\u00E8s \u00E0 des attributs NULL
-P-083 = Etat de pile interdit
-P-084 = Pr\u00E9fixe d''espace de noms non d\u00E9clar\u00E9 de l''\u00E9l\u00E9ment "{0}"
-P-085 = DTD d\u00E9tect\u00E9e
-P-086 = Pr\u00E9fixe d''espace de noms "{0}" interdit ; le pr\u00E9fixe "xml" ne peut \u00EAtre li\u00E9 \u00E0 aucun espace de noms autre que son espace de noms habituel
-
-#
-# Validation messages, won't normally show up unless validation is
-# being performed. Note that V-022 relates to a spec bug: there
-# are both a WFC and VC on undefined PEs. If that's a WVC violation
-# there's no need for the VC, ever; and "standalone" would then affect
-# WF-ness. For the moment this assumes it's to be a VC not a WFC
-#
-V-000 = La validation est d\u00E9sactiv\u00E9e
-V-001 = Les documents valides doivent avoir une d\u00E9claration <!DOCTYPE
-V-002 = Ce document est autonome, il ne doit donc pas faire r\u00E9f\u00E9rence \u00E0 "&{0};"
-V-003 = La notation non d\u00E9clar\u00E9e "{0}" est utilis\u00E9e par une d\u00E9claration <!ENTITY...>
-V-004 = La notation non d\u00E9clar\u00E9e "{0}" est utilis\u00E9e par une d\u00E9claration <!ATTLIST...>
-V-005 = Le type d''\u00E9l\u00E9ment "{0}" n''est pas d\u00E9clar\u00E9
-V-006 = Le type d''\u00E9l\u00E9ment racine est "{0}", mais a \u00E9t\u00E9 d\u00E9clar\u00E9 comme \u00E9tant "{1}"
-V-007 = L''attribut "{0}" n''est pas d\u00E9clar\u00E9 pour l''\u00E9l\u00E9ment "{1}"
-V-008 = L''attribut "{0}" de l''\u00E9l\u00E9ment "{1}" doit avoir la valeur "{2}" uniquement
-# {0} - probably attribute name.
-V-009 = La valeur d''attribut pour "{0}" est #REQUIRED
-
-V-010 = Ce document est autonome ; l''attribut "{0}" ne doit donc pas \u00EAtre utilis\u00E9 par d\u00E9faut
-V-011 = Ce document est autonome, l''\u00E9l\u00E9ment "{0}" ne doit donc pas avoir de caract\u00E8re non imprimable pouvant \u00EAtre ignor\u00E9
-V-012 = L''\u00E9l\u00E9ment ''{0}'' est d\u00E9j\u00E0 d\u00E9clar\u00E9
-V-013 = Les entit\u00E9s de param\u00E8tre ne doivent pas contenir de d\u00E9clarations partielles
-# {0} - element name
-V-014 = Erreur d''imbrication d''entit\u00E9 de param\u00E8tre dans le mod\u00E8le de contenu pour "{0}"
-V-015 = Le mod\u00E8le de contenu mixte r\u00E9p\u00E8te l''\u00E9l\u00E9ment "{0}"
-V-016 = Cet \u00E9l\u00E9ment a d\u00E9j\u00E0 un attribut d''ID, "{0}"
-V-017 = L''attribut d''ID "{0}" ne doit pas \u00EAtre #FIXED
-V-018 = L''attribut d''ID "{0}" ne doit pas \u00EAtre utilis\u00E9 par d\u00E9faut
-V-019 = Ce document est autonome ; cet attribut doit \u00EAtre pr\u00E9normalis\u00E9
-
-V-020 = Les entit\u00E9s de param\u00E8tre ne doivent pas contenir de sections DTD conditionnelles partielles
-V-021 = Les entit\u00E9s de param\u00E8tre ne doivent pas contenir de commentaires partiels
-V-022 = R\u00E9f\u00E9rence \u00E0 l''entit\u00E9 de param\u00E8tre non d\u00E9finie "%{0};"
-V-023 = Ce document est autonome ; ce caract\u00E8re non imprimable CDATA pouvant \u00EAtre ignor\u00E9 est interdit
-V-024 = Aucun \u00E9l\u00E9ment ne dispose d''un attribut d''ID dot\u00E9 de la valeur "{0}"
-V-025 = Les valeurs d''ID doivent \u00EAtre des noms XML ; "{0}" n''en est pas un
-V-026 = Un autre \u00E9l\u00E9ment a d\u00E9j\u00E0 un attribut d''ID dot\u00E9 de la valeur "{0}"
-V-027 = Les valeurs IDREF/IDREFS doivent \u00EAtre des noms XML ; "{0}" n''en est pas un
-V-028 = Les valeurs NMTOKEN/NMTOKENS doivent \u00EAtre des jetons de nom XML ; "{0}" n''en est pas un
-V-029 = La valeur "{0}" n''est pas l''une des valeurs \u00E9num\u00E9r\u00E9es pour cet attribut
-
-V-030 = La valeur d''attribut "{0}" ne nomme pas une notation
-V-031 = La valeur d''attribut "{0}" ne nomme pas une entit\u00E9 non analys\u00E9e
-V-032 = Les attributs NMTOKENS doivent poss\u00E9der au moins une valeur
-# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated.
-V-033 = Les mod\u00E8les de contenu vides ne doivent pas poss\u00E9der de contenu
-# Usage not found. TODO Remove
-#V-034 = Element "{0}" does not allow "{1}" -- {2}
-# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed.
-V-035 = L''\u00E9l\u00E9ment "{0}" n''autorise aucune autre entr\u00E9e ; "{1}" n''est pas autoris\u00E9
-# Usage not found. TODO Remove
-#V-036 = Element "{0}" does not allow "{1}" here
-V-037 = L''\u00E9l\u00E9ment "{0}" n''autorise aucun texte
-V-038 = L''\u00E9l\u00E9ment "{0}" exige des \u00E9l\u00E9ments suppl\u00E9mentaires
-V-039 = Les attributs IDREFS doivent poss\u00E9der au moins une valeur
-
-V-040 = Les attributs ENTITIES doivent poss\u00E9der au moins une valeur
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_it.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_it.properties
deleted file mode 100644
index e741ae4d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_it.properties
+++ /dev/null
@@ -1,284 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# English diagnostic messages (and fragments) for Sun's XML parser.
-#
-# P-NNN ... parser messages
-# F-NNN ... message fragments (sometimes associated with more
-# than one message, but usually just with one)
-# V-NNN ... validation related messages
-#
-# Most messages can be produced in only one way.
-#
-
-
-#
-# Generic parsing messages, not specific to validation
-#
-P-000 = Nessuna origine di input del parser.
-P-001 = Carattere non valido alla fine del documento, &#x{0};
-P-002 = Formato dell''espansione dell''entit\u00E0 "&{0};" non valido
-P-003 = Fine prematura dell'input
-# {0} - F000-F009, F011, F021.
-P-004 = Spazio vuoto {0} mancante
-P-005 = Solo spazio vuoto {0} consentito
-
- #
- # unadorned "missing whitespace", with P-004 only
- #
- # Concatenated with P-004 (P-004 + F000)
- F-000 = dopo la dichiarazione del nome dell'elemento
- # Concatenated with P-004 (P-004 + F001)
- F-001 = tra il nome e il tipo di attributo
- # Concatenated with P-004 (P-004 + F002)
- F-002 = dopo il nome del tipo NOTATION
- # Concatenated with P-004 (P-004 + F003)
- F-003 = tra il tipo di attributo e il valore predefinito
- # Concatenated with P-004 (P-004 + F004)
- F-004 = dopo #FIXED
- # Concatenated with P-004 (P-004 + F005)
- F-005 = dopo la dichiarazione <!ENTITY
- # Concatenated with P-004 (P-004 + F006)
- F-006 = dopo % nella dichiarazione dell'entit\u00E0 parametrica
- # Concatenated with P-004 (P-004 + F007)
- F-007 = dopo il nome dell'entit\u00E0
- # Concatenated with P-004 (P-004 + F008)
- F-008 = prima del valore URI SYSTEM
- # Concatenated with P-004 (P-004 + F009)
- F-009 = dopo la parola chiave PUBLIC
- # F-010 ... identifier can be reused
- # Concatenated with P-004 (P-004 + F011)
- F-011 = dopo il nome della notazione
- # F-012 ... identifier can be reused
- # F-013 ... identifier can be reused
-
- #
- # in declaration, in "S Name", with P-004 and P-005
- #
- F-014 = prima del nome nella dichiarazione <!DOCTYPE
- # Concatenated with P-005 (P-005 + F015)
- F-015 = prima del nome nella dichiarazione <!ELEMENT
- # Concatenated with P-005 (P-005 + F016)
- F-016 = prima del nome nella dichiarazione <!ATTLIST
- # Concatenated with P-005 (P-005 + F017)
- F-017 = prima del nome nella dichiarazione <!ENTITY
- # Concatenated with P-005 (P-005 + F018)
- F-018 = prima del nome della notazione NDATA nella dichiarazione <!ENTITY
- # Concatenated with P-005 (P-005 + F019)
- F-019 = prima del nome nella dichiarazione <!NOTATION
-
-# {0} - character
-P-006 = I token dei nomi devono iniziare con i caratteri "{0}"
-P-007 = Il valore deve essere racchiuso tra virgolette
-# {0} - character, {1} - F020-F023, F028-F032, {2} - xml entity name e.g.: Next character must be ">" terminating <!ENTITY...> declaration "%HTML.Version"
-P-008 = Il carattere successivo deve essere "{0}" {1} {2}
-
- # Concatenated with P-008 (P-008 + F020)
- F-020 = termine del riferimento all'entit\u00E0
- # Concatenated with P-008 (P-008 + F021)
- F-021 = termine del riferimento all'entit\u00E0 parametrica
- # Concatenated with P-008 (P-008 + F022)
- F-022 = termine del commento
- # Concatenated with P-008 (P-008 + F023)
- F-023 = nella dichiarazione XML
- # Concatenated with P-008 (P-008 + F024)
- F-024 = termine del subset DTD interno
- # Concatenated with P-008 (P-008 + F025)
- F-025 = termine della dichiarazione <!DOCTYPE ...>
- # Concatenated with P-008 (P-008 + F026)
- F-026 = dopo il nome dell'attributo
- # Concatenated with P-008 (P-008 + F027)
- F-027 = termine dell'elemento
- # Concatenated with P-008 (P-008 + F028)
- F-028 = avvio del modello di contenuto per l'elemento
- # Concatenated with P-008 (P-008 + F029)
- F-029 = avvio dell'elenco dell'attributo NOTATIONS
- # Concatenated with P-008 (P-008 + F030)
- F-030 = avvio del DTD della condizione
- # Concatenated with P-008 (P-008 + F031)
- F-031 = termine della dichiarazione <!ENTITY ...>
- # Concatenated with P-008 (P-008 + F032)
- F-032 = termine della dichiarazione <!NOTATION ...>
-
-P-009 = Sintassi del riferimento entit\u00E0 o del carattere non valida
-
-P-010 = Solo le entit\u00E0 parametriche esterne possono usare "%{0};" nei valori delle entit\u00E0
-P-011 = Sintassi del riferimento entit\u00E0 parametrica non valida
-P-012 = Usare "&lt;" per "<" nei valori degli attributi
-P-013 = Riferimento non valido all''entit\u00E0 esterna "&{0};" nell''attributo
-P-014 = Riferimento all''entit\u00E0 non definita "&{0};"
-# {0} - F033-F035
-P-015 = Previsto valore tra virgolette per {0}
-
- # Concatenated with P-015 (P-015 + F033)
- F-033 = Identificativo PUBLIC
- # Concatenated with P-015 (P-015 + F034)
- F-034 = Identificativo SYSTEM
- # {0} - attribute name. Concatenated with P-015 (P-015 + F033)
- F-035 = valore attributo {0}
-
-P-016 = Carattere non valido nell''identificativo PUBLIC: "{0}"
-P-017 = Fine dell'entit\u00E0 durante l'elaborazione del commento
-P-018 = La destinazione delle istruzioni di elaborazione risulta mancante
-P-019 = La dichiarazione XML pu\u00F2 solo iniziare le entit\u00E0
-
-P-020 = Destinazione delle istruzioni di elaborazione non valida: "{0}"
-P-021 = Fine dell'input all'interno dell'istruzione di elaborazione
-P-022 = Nome dell'istruzione di elaborazione non valido oppure spazio vuoto mancante
-P-023 = Carattere non valido "&#x{0};" ({1}) alla fine della dichiarazione XML
-P-024 = Previsto "{0}=..."
-P-025 = \u00C8 necessario dichiarare la versione XML "{0}"
-P-026 = Stringa "{0}" della versione XML non valida
-P-027 = La versione XML "{0}" \u00E8 riconosciuta, ma non "{1}"
-P-028 = Il subset DTD interno non deve includere costrutti "<![..."
-P-029 = La dichiarazione autonoma deve essere "yes" o "no", non "{0}"
-
-P-030 = Spazio vuoto richiesto prima degli attributi
-P-031 = I nomi degli attributi non devono iniziare con i caratteri "{0}"
-P-032 = L''attributo "{0}" \u00E8 gi\u00E0 presente in questa tag
-P-033 = Valore xml:lang "{0}" non valido
-P-034 = Previsto "</{0}>" per terminare l''elemento che inizia alla riga {1}
-P-035 = Fine dell'entit\u00E0 non consentita. Tag finale mancante
-P-036 = ">" deve terminare la dichiarazione <!ELEMENT {0} ...>, non "{1}"
-P-037 = Il modello di contenuto di sequenza non deve contenere "{0}"
-P-038 = Il modello di contenuto di scelta non deve contenere "{0}"
-P-039 = Nessun modello di contenuto pu\u00F2 contenere "{0}"
-
-P-040 = \u00C8 richiesta la parentesi di chiusura o "{1}" nel modello di contenuto, non "{0}"
-P-041 = \u00C8 richiesta la parentesi di chiusura, "," o "|" nel modello di contenuto, non "{0}"
-# {0} - element name, {1} - character as a hex number
-P-042 = Modello di contenuto misto non valido per "{0}", carattere successivo = &#x{1};
-# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*".
-P-043 = Il modello di contenuto misto per "{0}" deve terminare con ")*", non con "{1}"
-P-044 = \u00C8 prevista una dichiarazione di attributo o ">", ma non "{0}"
-# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space"
-P-045 = Tipo non valido (inizia con "{1}") per l''attributo "{0}"
-P-046 = Parola chiave richiesta nella sezione DTD condizionale
-P-047 = Sezione DTD condizionale non completa
-P-048 = Sono consentiti solo INCLUDE e IGNORE, non "{0}"
-P-049 = Riferimento del carattere decimale non valido
-
-P-050 = Riferimento del carattere esadecimale non valido
-P-051 = Carattere XML non valido &#x{0};
-P-052 = L''entit\u00E0 interna "&{0};" include caratteri dopo il contenuto
-P-053 = Le entit\u00E0 non analizzate, ad esempio "&{0};", non devono essere incluse
-P-054 = Uso della definizione di entit\u00E0 originale per "&{0};"
-P-055 = Impossibile risolvere l''URI relativo "{0}" senza l''URI di un documento
-P-056 = L''URI "{0}" include un ID frammento
-P-057 = Richiesto "?>" per terminare la dichiarazione XML
-P-058 = L''entit\u00E0 esterna "&{0};" include caratteri dopo il contenuto
-P-059 = L''entit\u00E0 parametrica esterna "%{0};" include caratteri dopo il markup
-
-P-060 = Carattere "{0}" non valido nel nome di codifica
-P-061 = La codifica dichiarata "{0}" non corrisponde a quella effettiva "{1}". Potrebbe non trattarsi di un errore
-P-062 = La notazione deve essere PUBLIC o SYSTEM
-P-063 = Viene usata la prima definizione della notazione "{0}"
-P-064 = Fine prematura dell''entit\u00E0 parametrica "%{0};"
-P-065 = Il resolver entit\u00E0 non ha fornito l'ID di sistema. Ci\u00F2 potrebbe interessare gli URI relativi.
-# P-066 ... ID available
-P-067 = Elemento radice documento mancante
-P-068 = Nome notazione obbligatorio
-P-069 = L''espansione dell''entit\u00E0 "{0}" \u00E8 ricorsiva
-
-P-070 = Formato non valido della seconda parte della coppia alternativa: &#x{0};
-P-071 = Carattere XML non valido: &#x{0};
-P-072 = I dati carattere non possono includere "]]>"
-# Character data section starts with "<![CDATA[" and is terminated with "]]>" with text in between. No change needed.
-P-073 = EOF durante l'analisi della sezione <![CDATA[
-P-074 = Coppia alternativa Unicode non valida: &#x{0}; &#x{1};
-P-075 = Codifica non supportata: "{0}" (\u00E8 possibile che il numero di riga sia troppo basso)
-P-076 = Errore di conversione del carattere: "{0}" (\u00E8 possibile che il numero di riga sia troppo basso)
-P-077 = \u00C8 stata superata la lunghezza massima del simbolo ({0} caratteri)
-P-078 = Nessun messaggio disponibile per le impostazioni nazionali "{0}"
-P-079 = L''inizio del contenuto "<{1}" non \u00E8 un markup valido. Il carattere "{1}" (&#{0};) dovrebbe essere una lettera.
-
-P-080 = I riferimenti alle entit\u00E0 parametriche non devono essere inclusi nelle dichiarazioni di markup nel subset DTD interno
-P-081 = Coppia alternativa Unicode incompleta: &#x{0}
-
-P-082 = Tentativo di accedere agli attributi nulli
-P-083 = Stato dello stack non valido
-P-084 = Prefisso di spazio di nomi non dichiarato dell''elemento "{0}"
-P-085 = Rilevato DTD
-P-086 = Prefisso dello spazio di nomi "{0}" non valido. Il prefisso "xml" non pu\u00F2 essere associato a uno spazio di nomi diverso da quello al quale appartiene.
-
-#
-# Validation messages, won't normally show up unless validation is
-# being performed. Note that V-022 relates to a spec bug: there
-# are both a WFC and VC on undefined PEs. If that's a WVC violation
-# there's no need for the VC, ever; and "standalone" would then affect
-# WF-ness. For the moment this assumes it's to be a VC not a WFC
-#
-V-000 = Convalida disabilitata
-V-001 = I documenti validi devono includere una dichiarazione <!DOCTYPE
-V-002 = Questo documento \u00E8 autonomo e pertanto non deve fare riferimento a "&{0};"
-V-003 = La notazione non dichiarata "{0}" \u00E8 usata da una dichiarazione <!ENTITY...>
-V-004 = La notazione non dichiarata "{0}" \u00E8 usata da una dichiarazione <!ATTLIST...>
-V-005 = Il tipo di elemento "{0}" non \u00E8 dichiarato
-V-006 = Il tipo di elemento radice \u00E8 "{0}", ma \u00E8 stato dichiarato "{1}"
-V-007 = L''attributo "{0}" non \u00E8 stato dichiarato per l''elemento "{1}"
-V-008 = L''attributo "{0}" dell''elemento "{1}" deve solo includere il valore "{2}"
-# {0} - probably attribute name.
-V-009 = Il valore dell''attributo per "{0}" \u00E8 #REQUIRED
-
-V-010 = Il documento \u00E8 autonomo. L''attributo "{0}" non deve essere pertanto impostato su un valore predefinito.
-V-011 = Il documento \u00E8 autonomo. L''elemento "{0}" non deve includere spazi vuoti ignorabili.
-V-012 = L''elemento "{0}" \u00E8 gi\u00E0 stato dichiarato
-V-013 = Le entit\u00E0 parametriche non devono contenere dichiarazioni parziali
-# {0} - element name
-V-014 = Errore di nidificazione delle entit\u00E0 parametriche nel modello di contenuto per "{0}"
-V-015 = Il modello di contenuto misto ripete l''elemento "{0}"
-V-016 = Questo elemento include gi\u00E0 un attributo ID "{0}"
-V-017 = L''attributo ID "{0}" non deve essere #FIXED
-V-018 = L''attributo ID "{0}" non deve essere impostato su un valore predefinito
-V-019 = Questo documento \u00E8 autonomo. Questo attributo deve essere prenormalizzato.
-
-V-020 = Le entit\u00E0 parametriche non devono contenere sezioni DTD condizionali parziali
-V-021 = Le entit\u00E0 parametriche non devono contenere commenti parziali
-V-022 = Riferimento all''entit\u00E0 parametrica non definita "%{0};"
-V-023 = Questo documento \u00E8 autonomo. Questo spazio vuoto CDATA ignorabile non \u00E8 consentito.
-V-024 = Nessun elemento include un attributo ID con valore "{0}"
-V-025 = I valori ID devono essere nomi XML. "{0}" non \u00E8 un nome.
-V-026 = Un altro elemento include gi\u00E0 un attributo ID con valore "{0}"
-V-027 = I valori IDREF/IDREFS devono essere nomi XML. "{0}" non \u00E8 un nome
-V-028 = I valori NMTOKEN/NMTOKENS devono essere token nomi XML. "{0}" non \u00E8 tale.
-V-029 = Il valore "{0}" \u00E8 uno dei valori enumerati per questo attributo
-
-V-030 = Il valore di attributo "{0}" non fa riferimento a una notazione
-V-031 = Il valore di attributo "{0}" non fa riferimento a un''entit\u00E0 non analizzata
-V-032 = Gli attributi NMTOKENS devono includere almeno un valore
-# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated.
-V-033 = I modelli di contenuto EMPTY non devono includere contenuti
-# Usage not found. TODO Remove
-#V-034 = Element "{0}" does not allow "{1}" -- {2}
-# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed.
-V-035 = L''elemento "{0}" non consente ulteriori input. "{1}" non \u00E8 consentito.
-# Usage not found. TODO Remove
-#V-036 = Element "{0}" does not allow "{1}" here
-V-037 = L''elemento "{0}" non consente l''inserimento di testo
-V-038 = L''elemento "{0}" richiede elementi aggiuntivi
-V-039 = Gli attributi IDREFS devono includere almeno un valore
-
-V-040 = Gli attributi ENTITIES devono includere almeno un valore
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ja.properties
deleted file mode 100644
index bf3efc42..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ja.properties
+++ /dev/null
@@ -1,284 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# English diagnostic messages (and fragments) for Sun's XML parser.
-#
-# P-NNN ... parser messages
-# F-NNN ... message fragments (sometimes associated with more
-# than one message, but usually just with one)
-# V-NNN ... validation related messages
-#
-# Most messages can be produced in only one way.
-#
-
-
-#
-# Generic parsing messages, not specific to validation
-#
-P-000 = \u30D1\u30FC\u30B5\u30FC\u306E\u5165\u529B\u30BD\u30FC\u30B9\u304C\u3042\u308A\u307E\u305B\u3093\u3002
-P-001 = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u7D42\u308F\u308A\u306B\u4E0D\u6B63\u306A\u6587\u5B57\u3001&#x{0};\u304C\u3042\u308A\u307E\u3059
-P-002 = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"&{0};"\u306E\u62E1\u5F35\u304C\u9069\u5207\u306A\u5F62\u5F0F\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-P-003 = \u5165\u529B\u306E\u6700\u5F8C\u304C\u672A\u5B8C\u4E86\u3067\u3059
-# {0} - F000-F009, F011, F021.
-P-004 = \u7A7A\u767D{0}\u304C\u3042\u308A\u307E\u305B\u3093
-P-005 = \u7A7A\u767D\u306E\u307F\u8A31\u53EF\u3055\u308C\u307E\u3059{0}
-
- #
- # unadorned "missing whitespace", with P-004 only
- #
- # Concatenated with P-004 (P-004 + F000)
- F-000 = \u8981\u7D20\u540D\u306E\u5BA3\u8A00\u306E\u5F8C
- # Concatenated with P-004 (P-004 + F001)
- F-001 = \u5C5E\u6027\u540D\u3068\u30BF\u30A4\u30D7\u306E\u9593
- # Concatenated with P-004 (P-004 + F002)
- F-002 = NOTATION\u30BF\u30A4\u30D7\u540D\u306E\u5F8C
- # Concatenated with P-004 (P-004 + F003)
- F-003 = \u5C5E\u6027\u306E\u30BF\u30A4\u30D7\u3068\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u306E\u9593
- # Concatenated with P-004 (P-004 + F004)
- F-004 = #FIXED\u306E\u5F8C
- # Concatenated with P-004 (P-004 + F005)
- F-005 = <!ENTITY\u5BA3\u8A00\u306E\u5F8C
- # Concatenated with P-004 (P-004 + F006)
- F-006 = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5BA3\u8A00\u306E%\u306E\u5F8C
- # Concatenated with P-004 (P-004 + F007)
- F-007 = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u540D\u306E\u5F8C
- # Concatenated with P-004 (P-004 + F008)
- F-008 = SYSTEM\u30EA\u30C6\u30E9\u30EBURI\u306E\u524D
- # Concatenated with P-004 (P-004 + F009)
- F-009 = PUBLIC\u30AD\u30FC\u30EF\u30FC\u30C9\u306E\u5F8C
- # F-010 ... identifier can be reused
- # Concatenated with P-004 (P-004 + F011)
- F-011 = \u8868\u8A18\u540D\u306E\u5F8C
- # F-012 ... identifier can be reused
- # F-013 ... identifier can be reused
-
- #
- # in declaration, in "S Name", with P-004 and P-005
- #
- F-014 = <!DOCTYPE\u5BA3\u8A00\u306E\u540D\u524D\u306E\u524D
- # Concatenated with P-005 (P-005 + F015)
- F-015 = <!ELEMENT\u5BA3\u8A00\u306E\u540D\u524D\u306E\u524D
- # Concatenated with P-005 (P-005 + F016)
- F-016 = <!ATTLIST\u5BA3\u8A00\u306E\u540D\u524D\u306E\u524D
- # Concatenated with P-005 (P-005 + F017)
- F-017 = <!ENTITY\u5BA3\u8A00\u306E\u540D\u524D\u306E\u524D
- # Concatenated with P-005 (P-005 + F018)
- F-018 = <!ENTITY\u5BA3\u8A00\u306ENDATA\u8868\u8A18\u540D\u306E\u524D
- # Concatenated with P-005 (P-005 + F019)
- F-019 = <!NOTATION\u5BA3\u8A00\u306E\u540D\u524D\u306E\u524D
-
-# {0} - character
-P-006 = \u540D\u524D\u30C8\u30FC\u30AF\u30F3\u3092"{0}"\u6587\u5B57\u3067\u958B\u59CB\u3067\u304D\u307E\u305B\u3093
-P-007 = \u5024\u306F\u5F15\u7528\u7B26\u3067\u56F2\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-# {0} - character, {1} - F020-F023, F028-F032, {2} - xml entity name e.g.: Next character must be ">" terminating <!ENTITY...> declaration "%HTML.Version"
-P-008 = \u6B21\u306E\u6587\u5B57\u306F"{0}" {1} {2}\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
- # Concatenated with P-008 (P-008 + F020)
- F-020 = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3078\u306E\u53C2\u7167\u306E\u7D42\u4E86
- # Concatenated with P-008 (P-008 + F021)
- F-021 = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3078\u306E\u53C2\u7167\u306E\u7D42\u4E86
- # Concatenated with P-008 (P-008 + F022)
- F-022 = \u30B3\u30E1\u30F3\u30C8\u306E\u7D42\u4E86
- # Concatenated with P-008 (P-008 + F023)
- F-023 = XML\u5BA3\u8A00\u5185
- # Concatenated with P-008 (P-008 + F024)
- F-024 = \u5185\u90E8DTD\u30B5\u30D6\u30BB\u30C3\u30C8\u306E\u7D42\u4E86
- # Concatenated with P-008 (P-008 + F025)
- F-025 = <!DOCTYPE ...>\u5BA3\u8A00\u306E\u7D42\u4E86
- # Concatenated with P-008 (P-008 + F026)
- F-026 = \u5C5E\u6027\u540D\u306E\u5F8C
- # Concatenated with P-008 (P-008 + F027)
- F-027 = \u8981\u7D20\u306E\u7D42\u4E86
- # Concatenated with P-008 (P-008 + F028)
- F-028 = \u8981\u7D20\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306E\u958B\u59CB
- # Concatenated with P-008 (P-008 + F029)
- F-029 = \u5C5E\u6027NOTATIONS\u306E\u30EA\u30B9\u30C8\u306E\u958B\u59CB
- # Concatenated with P-008 (P-008 + F030)
- F-030 = \u6761\u4EF6DTD\u30B5\u30D6\u30BB\u30C3\u30C8\u306E\u958B\u59CB
- # Concatenated with P-008 (P-008 + F031)
- F-031 = <!ENTITY ...>\u5BA3\u8A00\u306E\u7D42\u4E86
- # Concatenated with P-008 (P-008 + F032)
- F-032 = <!NOTATION ...>\u5BA3\u8A00\u306E\u7D42\u4E86
-
-P-009 = \u6587\u5B57\u307E\u305F\u306F\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u53C2\u7167\u306E\u69CB\u6587\u304C\u4E0D\u6B63\u3067\u3059
-
-P-010 = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5024\u306B"%{0};"\u3092\u4F7F\u7528\u3067\u304D\u308B\u306E\u306F\u3001\u5916\u90E8\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u307F\u3067\u3059
-P-011 = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u53C2\u7167\u306E\u69CB\u6587\u304C\u4E0D\u6B63\u3067\u3059
-P-012 = \u5C5E\u6027\u5024\u3067\u306F"<"\u3068\u3057\u3066"&lt;"\u3092\u4F7F\u7528\u3057\u307E\u3059
-P-013 = \u5C5E\u6027\u306E\u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"&{0};"\u3078\u306E\u53C2\u7167\u304C\u4E0D\u6B63\u3067\u3059
-P-014 = \u672A\u5B9A\u7FA9\u306E\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"&{0};"\u3078\u306E\u53C2\u7167
-# {0} - F033-F035
-P-015 = {0}\u306B\u306F\u3001\u5F15\u7528\u7B26\u3067\u56F2\u307E\u308C\u305F\u5024\u304C\u4E88\u671F\u3055\u308C\u307E\u3059
-
- # Concatenated with P-015 (P-015 + F033)
- F-033 = PUBLIC\u8B58\u5225\u5B50
- # Concatenated with P-015 (P-015 + F034)
- F-034 = SYSTEM\u8B58\u5225\u5B50
- # {0} - attribute name. Concatenated with P-015 (P-015 + F033)
- F-035 = \u5C5E\u6027\u5024{0}
-
-P-016 = PUBLIC\u8B58\u5225\u5B50\u306B\u4E0D\u6B63\u306A\u6587\u5B57\u304C\u3042\u308A\u307E\u3059: "{0}"
-P-017 = \u30B3\u30E1\u30F3\u30C8\u306E\u51E6\u7406\u4E2D\u306B\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u7D42\u7AEF\u306B\u5230\u9054\u3057\u307E\u3057\u305F
-P-018 = \u51E6\u7406\u547D\u4EE4\u30BF\u30FC\u30B2\u30C3\u30C8\u304C\u3042\u308A\u307E\u305B\u3093
-P-019 = XML\u5BA3\u8A00\u3067\u306F\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u958B\u59CB\u306E\u307F\u53EF\u80FD\u3067\u3059
-
-P-020 = \u51E6\u7406\u547D\u4EE4\u30BF\u30FC\u30B2\u30C3\u30C8\u304C\u4E0D\u6B63\u3067\u3059: "{0}"
-P-021 = \u51E6\u7406\u547D\u4EE4\u5185\u306E\u5165\u529B\u306E\u6700\u5F8C
-P-022 = \u51E6\u7406\u547D\u4EE4\u540D\u304C\u4E0D\u6B63\u3067\u3042\u308B\u304B\u3001\u7A7A\u767D\u304C\u6B20\u843D\u3057\u3066\u3044\u307E\u3059
-P-023 = XML\u5BA3\u8A00\u306E\u7D42\u308F\u308A\u306B\u4E0D\u6B63\u306A\u6587\u5B57"&#x{0};"({1})\u304C\u3042\u308A\u307E\u3059
-P-024 = "{0}=..."\u304C\u4E88\u671F\u3055\u308C\u307E\u3059
-P-025 = XML\u30D0\u30FC\u30B8\u30E7\u30F3"{0}"\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-P-026 = XML\u30D0\u30FC\u30B8\u30E7\u30F3\u6587\u5B57\u5217"{0}"\u304C\u4E0D\u6B63\u3067\u3059
-P-027 = XML\u30D0\u30FC\u30B8\u30E7\u30F3"{0}"\u306F\u8A8D\u8B58\u3055\u308C\u307E\u3059\u304C\u3001"{1}"\u306F\u8A8D\u8B58\u3055\u308C\u307E\u305B\u3093
-P-028 = \u5185\u90E8DTD\u30B5\u30D6\u30BB\u30C3\u30C8\u306B\u306F"<![..."\u69CB\u9020\u4F53\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
-P-029 = \u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u306E\u5BA3\u8A00\u306F"{0}"\u3067\u306F\u306A\u304F\u3001"yes"\u307E\u305F\u306F"no"\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-P-030 = \u5C5E\u6027\u306E\u524D\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059
-P-031 = \u5C5E\u6027\u540D\u306F"{0}"\u6587\u5B57\u3067\u958B\u59CB\u3067\u304D\u307E\u305B\u3093
-P-032 = \u5C5E\u6027"{0}"\u306F\u3001\u3053\u306E\u30BF\u30B0\u306B\u3059\u3067\u306B\u51FA\u73FE\u3057\u3066\u3044\u307E\u3059
-P-033 = xml:lang\u5024"{0}"\u306F\u4E0D\u6B63\u3067\u3059
-P-034 = \u884C{1}\u3067\u958B\u59CB\u3057\u305F\u8981\u7D20\u3092\u7D42\u4E86\u3059\u308B\u305F\u3081\u306E"</{0}>"\u304C\u4E88\u671F\u3055\u308C\u307E\u3059
-P-035 = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3092\u7D42\u4E86\u3067\u304D\u307E\u305B\u3093\u3002\u7D42\u4E86\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093
-P-036 = <!ELEMENT {0} ...>\u5BA3\u8A00\u306F\u3001"{1}"\u3067\u306F\u306A\u304F\u3001">"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-P-037 = \u9806\u5E8F\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B"{0}"\u3092\u542B\u3081\u3089\u308C\u307E\u305B\u3093
-P-038 = \u9078\u629E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B"{0}"\u3092\u542B\u3081\u3089\u308C\u307E\u305B\u3093
-P-039 = \u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B"{0}"\u3092\u542B\u3081\u3089\u308C\u307E\u305B\u3093
-
-P-040 = \u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B\u306F\u3001"{0}"\u3067\u306F\u306A\u304F\u3001\u53F3\u30AB\u30C3\u30B3\u307E\u305F\u306F"{1}"\u304C\u5FC5\u8981\u3067\u3059
-P-041 = \u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B\u306F\u3001"{0}"\u3067\u306F\u306A\u304F\u3001\u53F3\u30AB\u30C3\u30B3\u3001","\u3001\u307E\u305F\u306F"|"\u304C\u5FC5\u8981\u3067\u3059
-# {0} - element name, {1} - character as a hex number
-P-042 = "{0}"\u306E\u8907\u5408\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u304C\u4E0D\u6B63\u3067\u3059\u3002\u6B21\u306E\u6587\u5B57= &#x{1};
-# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*".
-P-043 = "{0}"\u306E\u8907\u5408\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306F\u3001"{1}"\u3067\u306F\u306A\u304F\u3001")*"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-P-044 = "{0}"\u3067\u306F\u306A\u304F\u3001\u5C5E\u6027\u306E\u5BA3\u8A00\u307E\u305F\u306F">"\u304C\u4E88\u671F\u3055\u308C\u307E\u3059
-# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space"
-P-045 = \u5C5E\u6027"{0}"\u306E\u30BF\u30A4\u30D7("{1}"\u3067\u59CB\u307E\u308B)\u304C\u4E0D\u6B63\u3067\u3059
-P-046 = \u6761\u4EF6\u4ED8\u304DDTD\u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u306F\u30AD\u30FC\u30EF\u30FC\u30C9\u304C\u5FC5\u8981\u3067\u3059
-P-047 = \u6761\u4EF6\u4ED8\u304DDTD\u30BB\u30AF\u30B7\u30E7\u30F3\u304C\u7D42\u4E86\u3057\u3066\u3044\u307E\u305B\u3093
-P-048 = INCLUDE\u304A\u3088\u3073IGNORE\u306E\u307F\u304C\u8A31\u53EF\u3055\u308C\u3001"{0}"\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
-P-049 = \u4E0D\u6B63\u306A10\u9032\u6570\u306E\u53C2\u7167\u3067\u3059
-
-P-050 = \u4E0D\u6B63\u306A16\u9032\u6570\u306E\u53C2\u7167\u3067\u3059
-P-051 = \u4E0D\u6B63\u306AXML\u6587\u5B57&#x{0};
-P-052 = \u5185\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"&{0};"\u306B\u306F\u3001\u30B3\u30F3\u30C6\u30F3\u30C4\u306E\u5F8C\u306B\u6587\u5B57\u304C\u3042\u308A\u307E\u3059
-P-053 = "&{0};"\u306A\u3069\u306E\u672A\u89E3\u6790\u306E\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-P-054 = "&{0};"\u306E\u5143\u306E\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5B9A\u7FA9\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059
-P-055 = \u76F8\u5BFEURI "{0}"\u306F\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8URI\u306A\u3057\u3067\u306F\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093
-P-056 = URI "{0}"\u306B\u306F\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8ID\u304C\u3042\u308A\u307E\u3059
-P-057 = XML\u5BA3\u8A00\u3092\u7D42\u4E86\u3059\u308B\u306B\u306F"?>"\u304C\u5FC5\u8981\u3067\u3059
-P-058 = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"&{0};"\u306B\u306F\u3001\u30B3\u30F3\u30C6\u30F3\u30C4\u306E\u5F8C\u306B\u6587\u5B57\u304C\u3042\u308A\u307E\u3059
-P-059 = \u5916\u90E8\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"%{0};"\u306B\u306F\u3001\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u306E\u5F8C\u306B\u6587\u5B57\u304C\u3042\u308A\u307E\u3059
-
-P-060 = \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u540D\u306B\u4E0D\u6B63\u306A\u6587\u5B57"{0}"\u304C\u3042\u308A\u307E\u3059
-P-061 = \u5BA3\u8A00\u3055\u308C\u305F\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0"{0}"\u306F\u3001\u5B9F\u969B\u306E\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0"{1}"\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002\u3053\u308C\u306F\u30A8\u30E9\u30FC\u3067\u306F\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
-P-062 = \u8868\u8A18\u6CD5\u306F\u3001PUBLIC\u307E\u305F\u306FSYSTEM\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-P-063 = \u8868\u8A18\u6CD5"{0}"\u306E\u6700\u521D\u306E\u5B9A\u7FA9\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059
-P-064 = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"%{0};"\u306E\u7D42\u7AEF\u304C\u672A\u5B8C\u4E86\u3067\u3059
-P-065 = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u30FB\u30EA\u30BE\u30EB\u30D0\u304CSYSTEM ID\u3092\u63D0\u4F9B\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u76F8\u5BFEURI\u306B\u5F71\u97FF\u3092\u4E0E\u3048\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
-# P-066 ... ID available
-P-067 = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30EB\u30FC\u30C8\u8981\u7D20\u304C\u3042\u308A\u307E\u305B\u3093
-P-068 = \u8868\u8A18\u540D\u306F\u5FC5\u9808\u3067\u3059
-P-069 = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u62E1\u5F35\u304C\u518D\u5E30\u7684\u3067\u3059
-
-P-070 = \u30B5\u30ED\u30B2\u30FC\u30C8\u30FB\u30DA\u30A2\u306E\u5F8C\u90E8\u306E\u5F62\u5F0F\u304C\u4E0D\u6B63\u3067\u3059: &#x{0};
-P-071 = \u4E0D\u6B63\u306AXML\u6587\u5B57: &#x{0};
-P-072 = \u6587\u5B57\u30C7\u30FC\u30BF\u3067\u306F"]]>"\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
-# Character data section starts with "<![CDATA[" and is terminated with "]]>" with text in between. No change needed.
-P-073 = <![CDATA[\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u89E3\u6790\u4E2D\u306BEOF\u306B\u5230\u9054\u3057\u307E\u3057\u305F
-P-074 = \u4E0D\u6B63\u306AUnicode\u30B5\u30ED\u30B2\u30FC\u30C8\u30FB\u30DA\u30A2: &#x{0};&#x{1};
-P-075 = \u30B5\u30DD\u30FC\u30C8\u3055\u308C\u306A\u3044\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0: "{0}"(\u884C\u756A\u53F7\u304C\u5C0F\u3055\u3059\u304E\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059)
-P-076 = \u6587\u5B57\u5909\u63DB\u30A8\u30E9\u30FC: "{0}"(\u884C\u756A\u53F7\u304C\u5C0F\u3055\u3059\u304E\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059)
-P-077 = \u30B7\u30F3\u30DC\u30EB\u306E\u6700\u5927\u9577({0}\u6587\u5B57)\u3092\u8D85\u904E\u3057\u3066\u3044\u307E\u3059
-P-078 = \u30ED\u30B1\u30FC\u30EB"{0}"\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u3042\u308A\u307E\u305B\u3093
-P-079 = \u30B3\u30F3\u30C6\u30F3\u30C4\u306E\u5148\u982D\u306E"<{1}"\u306F\u3001\u6709\u52B9\u306A\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002"{1}"(&#{0};)\u6587\u5B57\u306F\u3001\u82F1\u6587\u5B57\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-P-080 = \u5185\u90E8DTD\u30B5\u30D6\u30BB\u30C3\u30C8\u306E\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u5BA3\u8A00\u5185\u306B\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u53C2\u7167\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093
-P-081 = \u4E0D\u5B8C\u5168\u306AUnicode\u30B5\u30ED\u30B2\u30FC\u30C8\u30FB\u30DA\u30A2: &#x{0}
-
-P-082 = null\u5C5E\u6027\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u3092\u8A66\u884C\u3057\u3066\u3044\u307E\u3059
-P-083 = \u4E0D\u6B63\u306A\u30B9\u30BF\u30C3\u30AF\u72B6\u614B
-P-084 = \u8981\u7D20"{0}"\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u63A5\u982D\u8F9E\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-P-085 = DTD\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F
-P-086 = \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u63A5\u982D\u8F9E"{0}"\u304C\u4E0D\u6B63\u3067\u3059\u3002\u63A5\u982D\u8F9E"xml"\u306F\u3001\u901A\u5E38\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u4EE5\u5916\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306B\u30D0\u30A4\u30F3\u30C9\u3067\u304D\u307E\u305B\u3093
-
-#
-# Validation messages, won't normally show up unless validation is
-# being performed. Note that V-022 relates to a spec bug: there
-# are both a WFC and VC on undefined PEs. If that's a WVC violation
-# there's no need for the VC, ever; and "standalone" would then affect
-# WF-ness. For the moment this assumes it's to be a VC not a WFC
-#
-V-000 = \u691C\u8A3C\u306F\u7121\u52B9\u3067\u3059
-V-001 = \u6709\u52B9\u306A\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306F\u3001<!DOCTYPE\u5BA3\u8A00\u304C\u5FC5\u8981\u3067\u3059
-V-002 = \u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u3067\u3042\u308B\u305F\u3081\u3001"&{0};"\u3092\u53C2\u7167\u3067\u304D\u307E\u305B\u3093
-V-003 = \u5BA3\u8A00\u3055\u308C\u3066\u3044\u306A\u3044\u8868\u8A18\u6CD5"{0}"\u304C<!ENTITY...>\u5BA3\u8A00\u3067\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059
-V-004 = \u5BA3\u8A00\u3055\u308C\u3066\u3044\u306A\u3044\u8868\u8A18\u6CD5"{0}"\u304C<!ATTLIST...>\u5BA3\u8A00\u3067\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059
-V-005 = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306F\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-V-006 = \u30EB\u30FC\u30C8\u8981\u7D20\u30BF\u30A4\u30D7\u306F"{0}"\u3067\u3059\u304C\u3001"{1}"\u3068\u3057\u3066\u5BA3\u8A00\u3055\u308C\u307E\u3057\u305F
-V-007 = \u8981\u7D20"{1}"\u306E\u5C5E\u6027"{0}"\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-V-008 = \u8981\u7D20"{1}"\u306E\u5C5E\u6027"{0}"\u306E\u5024\u306F"{2}"\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-# {0} - probably attribute name.
-V-009 = "{0}"\u306E\u5C5E\u6027\u5024\u306F#REQUIRED\u3067\u3059
-
-V-010 = \u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u3067\u3042\u308B\u305F\u3081\u3001\u5C5E\u6027"{0}"\u3092\u30C7\u30D5\u30A9\u30EB\u30C8\u306B\u3067\u304D\u307E\u305B\u3093
-V-011 = \u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u3067\u3042\u308B\u305F\u3081\u3001\u8981\u7D20"{0}"\u306B\u306F\u7121\u8996\u3067\u304D\u308B\u7A7A\u767D\u3092\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093
-V-012 = \u8981\u7D20"{0}"\u306F\u3059\u3067\u306B\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059
-V-013 = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306B\u5BA3\u8A00\u306E\u4E00\u90E8\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-# {0} - element name
-V-014 = "{0}"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u30CD\u30B9\u30C8\u30FB\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3059
-V-015 = \u8907\u5408\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B\u8981\u7D20"{0}"\u306E\u7E70\u8FD4\u3057\u304C\u3042\u308A\u307E\u3059
-V-016 = \u3053\u306E\u8981\u7D20\u306B\u306F\u3001ID\u5C5E\u6027"{0}"\u304C\u3059\u3067\u306B\u3042\u308A\u307E\u3059
-V-017 = ID\u5C5E\u6027"{0}"\u306F#FIXED\u306B\u3067\u304D\u307E\u305B\u3093
-V-018 = ID\u5C5E\u6027"{0}"\u306F\u30C7\u30D5\u30A9\u30EB\u30C8\u306B\u3067\u304D\u307E\u305B\u3093
-V-019 = \u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u3067\u3059\u3002\u3053\u306E\u5C5E\u6027\u306F\u3001\u4E8B\u524D\u306B\u6B63\u898F\u5316\u3057\u3066\u304A\u304F\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-V-020 = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306B\u6761\u4EF6\u4ED8\u304DDTD\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u4E00\u90E8\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-V-021 = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306B\u30B3\u30E1\u30F3\u30C8\u306E\u4E00\u90E8\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-V-022 = \u672A\u5B9A\u7FA9\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"%{0};"\u3078\u306E\u53C2\u7167
-V-023 = \u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u3067\u3059\u3002\u3053\u306E\u7121\u8996\u3067\u304D\u308BCDATA\u7A7A\u767D\u306F\u7981\u6B62\u3055\u308C\u3066\u3044\u307E\u3059
-V-024 = \u5024"{0}"\u306EID\u5C5E\u6027\u3092\u6301\u3064\u8981\u7D20\u304C\u3042\u308A\u307E\u305B\u3093
-V-025 = ID\u5024\u306F\u3001XML\u540D\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"{0}"\u306F\u540D\u524D\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-V-026 = \u5024"{0}"\u306EID\u5C5E\u6027\u3092\u6301\u3064\u5225\u306E\u8981\u7D20\u304C\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
-V-027 = IDREF/IDREFS\u5024\u306F\u3001XML\u540D\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"{0}"\u306F\u540D\u524D\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-V-028 = NMTOKEN/NMTOKENS\u5024\u306F\u3001XML\u540D\u524D\u30C8\u30FC\u30AF\u30F3\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"{0}"\u306F\u540D\u524D\u30C8\u30FC\u30AF\u30F3\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-V-029 = \u5024"{0}"\u306F\u3001\u3053\u306E\u5C5E\u6027\u306E\u5217\u6319\u5024\u306E1\u3064\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-
-V-030 = \u5C5E\u6027\u5024"{0}"\u306F\u3001\u8868\u8A18\u6CD5\u540D\u3092\u6307\u5B9A\u3057\u307E\u305B\u3093
-V-031 = \u5C5E\u6027\u5024"{0}"\u306F\u3001\u672A\u89E3\u6790\u306E\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u540D\u3092\u6307\u5B9A\u3057\u307E\u305B\u3093
-V-032 = NMTOKENS\u5C5E\u6027\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u5024\u304C\u5FC5\u8981\u3067\u3059
-# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated.
-V-033 = \u7A7A\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B\u306F\u3001\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093
-# Usage not found. TODO Remove
-#V-034 = Element "{0}" does not allow "{1}" -- {2}
-# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed.
-V-035 = \u8981\u7D20"{0}"\u306F\u3001\u3053\u308C\u4EE5\u4E0A\u5165\u529B\u3067\u304D\u307E\u305B\u3093\u3002"{1}"\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
-# Usage not found. TODO Remove
-#V-036 = Element "{0}" does not allow "{1}" here
-V-037 = \u8981\u7D20"{0}"\u306F\u3001\u30C6\u30AD\u30B9\u30C8\u3092\u8A31\u53EF\u3057\u307E\u305B\u3093
-V-038 = \u8981\u7D20"{0}"\u306B\u306F\u3001\u8FFD\u52A0\u306E\u8981\u7D20\u304C\u5FC5\u8981\u3067\u3059
-V-039 = IDREFS\u5C5E\u6027\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u5024\u304C\u5FC5\u8981\u3067\u3059
-
-V-040 = ENTITIES\u5C5E\u6027\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u5024\u304C\u5FC5\u8981\u3067\u3059
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ko.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ko.properties
deleted file mode 100644
index 740ab576..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ko.properties
+++ /dev/null
@@ -1,284 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# English diagnostic messages (and fragments) for Sun's XML parser.
-#
-# P-NNN ... parser messages
-# F-NNN ... message fragments (sometimes associated with more
-# than one message, but usually just with one)
-# V-NNN ... validation related messages
-#
-# Most messages can be produced in only one way.
-#
-
-
-#
-# Generic parsing messages, not specific to validation
-#
-P-000 = \uAD6C\uBB38 \uBD84\uC11D\uAE30 \uC785\uB825 \uC18C\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4!
-P-001 = \uBB38\uC11C \uB05D\uC5D0 \uC798\uBABB\uB41C \uBB38\uC790 &#x{0};\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.
-P-002 = "&{0};" \uC5D4\uD2F0\uD2F0 \uD655\uC7A5\uC758 \uD615\uC2DD\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-P-003 = \uC608\uC0C1\uCE58 \uC54A\uC740 \uC785\uB825\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4.
-# {0} - F000-F009, F011, F021.
-P-004 = {0} \uACF5\uBC31\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-P-005 = \uACF5\uBC31\uB9CC {0}\uC744(\uB97C) \uD5C8\uC6A9\uD569\uB2C8\uB2E4.
-
- #
- # unadorned "missing whitespace", with P-004 only
- #
- # Concatenated with P-004 (P-004 + F000)
- F-000 = \uC694\uC18C \uC774\uB984 \uC120\uC5B8 \uB2E4\uC74C
- # Concatenated with P-004 (P-004 + F001)
- F-001 = \uC18D\uC131 \uC774\uB984\uACFC \uC720\uD615 \uC0AC\uC774
- # Concatenated with P-004 (P-004 + F002)
- F-002 = NOTATION \uC720\uD615 \uC774\uB984 \uB2E4\uC74C
- # Concatenated with P-004 (P-004 + F003)
- F-003 = \uC18D\uC131 \uC720\uD615\uACFC \uAE30\uBCF8\uAC12 \uC0AC\uC774
- # Concatenated with P-004 (P-004 + F004)
- F-004 = #FIXED \uB2E4\uC74C
- # Concatenated with P-004 (P-004 + F005)
- F-005 = <!ENTITY \uC120\uC5B8 \uB2E4\uC74C
- # Concatenated with P-004 (P-004 + F006)
- F-006 = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uC120\uC5B8\uC758 % \uB2E4\uC74C
- # Concatenated with P-004 (P-004 + F007)
- F-007 = \uC5D4\uD2F0\uD2F0 \uC774\uB984 \uB2E4\uC74C
- # Concatenated with P-004 (P-004 + F008)
- F-008 = SYSTEM \uB9AC\uD130\uB7F4 URI \uC55E
- # Concatenated with P-004 (P-004 + F009)
- F-009 = PUBLIC \uD0A4\uC6CC\uB4DC \uB2E4\uC74C
- # F-010 ... identifier can be reused
- # Concatenated with P-004 (P-004 + F011)
- F-011 = \uD45C\uAE30\uBC95 \uC774\uB984 \uB2E4\uC74C
- # F-012 ... identifier can be reused
- # F-013 ... identifier can be reused
-
- #
- # in declaration, in "S Name", with P-004 and P-005
- #
- F-014 = <!DOCTYPE \uC120\uC5B8\uC758 \uC774\uB984 \uC55E
- # Concatenated with P-005 (P-005 + F015)
- F-015 = <!ELEMENT \uC120\uC5B8\uC758 \uC774\uB984 \uC55E
- # Concatenated with P-005 (P-005 + F016)
- F-016 = <!ATTLIST \uC120\uC5B8\uC758 \uC774\uB984 \uC55E
- # Concatenated with P-005 (P-005 + F017)
- F-017 = <!ENTITY \uC120\uC5B8\uC758 \uC774\uB984 \uC55E
- # Concatenated with P-005 (P-005 + F018)
- F-018 = <!ENTITY \uC120\uC5B8\uC758 NDATA \uD45C\uAE30\uBC95 \uC774\uB984 \uC55E
- # Concatenated with P-005 (P-005 + F019)
- F-019 = <!NOTATION \uC120\uC5B8\uC758 \uC774\uB984 \uC55E
-
-# {0} - character
-P-006 = \uC774\uB984 \uD1A0\uD070\uC740 "{0}" \uBB38\uC790\uB85C \uC2DC\uC791\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-P-007 = \uAC12\uC5D0\uB294 \uB530\uC634\uD45C\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4.
-# {0} - character, {1} - F020-F023, F028-F032, {2} - xml entity name e.g.: Next character must be ">" terminating <!ENTITY...> declaration "%HTML.Version"
-P-008 = \uB2E4\uC74C \uBB38\uC790\uB294 "{0}" {1} {2}\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
- # Concatenated with P-008 (P-008 + F020)
- F-020 = \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uCC38\uC870\uB97C \uC885\uB8CC\uD558\uB294 \uC911
- # Concatenated with P-008 (P-008 + F021)
- F-021 = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uCC38\uC870\uB97C \uC885\uB8CC\uD558\uB294 \uC911
- # Concatenated with P-008 (P-008 + F022)
- F-022 = \uC8FC\uC11D\uC744 \uC885\uB8CC\uD558\uB294 \uC911
- # Concatenated with P-008 (P-008 + F023)
- F-023 = XML \uC120\uC5B8\uC5D0\uC11C
- # Concatenated with P-008 (P-008 + F024)
- F-024 = \uB0B4\uBD80 DTD \uBD80\uBD84 \uC9D1\uD569\uC744 \uC885\uB8CC\uD558\uB294 \uC911
- # Concatenated with P-008 (P-008 + F025)
- F-025 = <!DOCTYPE ...> \uC120\uC5B8\uC744 \uC885\uB8CC\uD558\uB294 \uC911
- # Concatenated with P-008 (P-008 + F026)
- F-026 = \uC18D\uC131 \uC774\uB984 \uB2E4\uC74C
- # Concatenated with P-008 (P-008 + F027)
- F-027 = \uC694\uC18C\uB97C \uC885\uB8CC\uD558\uB294 \uC911
- # Concatenated with P-008 (P-008 + F028)
- F-028 = \uC694\uC18C\uC5D0 \uB300\uD55C \uCF58\uD150\uCE20 \uBAA8\uB378\uC744 \uC2DC\uC791\uD558\uB294 \uC911
- # Concatenated with P-008 (P-008 + F029)
- F-029 = \uC18D\uC131 NOTATION \uBAA9\uB85D\uC744 \uC2DC\uC791\uD558\uB294 \uC911
- # Concatenated with P-008 (P-008 + F030)
- F-030 = \uC870\uAC74 DTD \uBD80\uBD84 \uC9D1\uD569\uC744 \uC2DC\uC791\uD558\uB294 \uC911
- # Concatenated with P-008 (P-008 + F031)
- F-031 = <!ENTITY ...> \uC120\uC5B8\uC744 \uC885\uB8CC\uD558\uB294 \uC911
- # Concatenated with P-008 (P-008 + F032)
- F-032 = <!NOTATION ...> \uC120\uC5B8\uC744 \uC885\uB8CC\uD558\uB294 \uC911
-
-P-009 = \uBB38\uC790 \uB610\uB294 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 \uAD6C\uBB38\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-P-010 = \uC678\uBD80 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0\uB9CC \uC5D4\uD2F0\uD2F0 \uAC12\uC5D0 "%{0};"\uC744(\uB97C) \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-P-011 = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 \uAD6C\uBB38\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-P-012 = \uC18D\uC131\uAC12\uC5D0\uC11C "<"\uC5D0 \uB300\uD574 "&lt;"\uB97C \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624.
-P-013 = \uC18D\uC131\uC5D0 \uC678\uBD80 \uC5D4\uD2F0\uD2F0 "&{0};"\uC5D0 \uB300\uD55C \uC798\uBABB\uB41C \uCC38\uC870\uAC00 \uC788\uC2B5\uB2C8\uB2E4.
-P-014 = \uC815\uC758\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0 "&{0};"\uC5D0 \uB300\uD55C \uCC38\uC870\uC785\uB2C8\uB2E4.
-# {0} - F033-F035
-P-015 = {0}\uC5D0 \uB530\uC634\uD45C\uB97C \uC0AC\uC6A9\uD55C \uAC12\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-
- # Concatenated with P-015 (P-015 + F033)
- F-033 = PUBLIC \uC2DD\uBCC4\uC790
- # Concatenated with P-015 (P-015 + F034)
- F-034 = SYSTEM \uC2DD\uBCC4\uC790
- # {0} - attribute name. Concatenated with P-015 (P-015 + F033)
- F-035 = \uC18D\uC131\uAC12 {0}
-
-P-016 = PUBLIC \uC2DD\uBCC4\uC790\uC5D0 \uC798\uBABB\uB41C \uBB38\uC790\uAC00 \uC788\uC74C: "{0}"
-P-017 = \uC8FC\uC11D\uC744 \uCC98\uB9AC\uD558\uB294 \uB3D9\uC548 \uC5D4\uD2F0\uD2F0\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4.
-P-018 = \uC9C0\uCE68 \uCC98\uB9AC \uB300\uC0C1\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-P-019 = XML \uC120\uC5B8\uB9CC \uC5D4\uD2F0\uD2F0\uB97C \uC2DC\uC791\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-
-P-020 = \uC798\uBABB\uB41C \uC9C0\uCE68 \uCC98\uB9AC \uB300\uC0C1: "{0}"
-P-021 = \uC9C0\uCE68 \uCC98\uB9AC \uC911 \uB0B4\uBD80 \uC785\uB825\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4.
-P-022 = \uC9C0\uCE68 \uCC98\uB9AC \uC774\uB984\uC744 \uC798\uBABB\uB418\uC5C8\uAC70\uB098 \uACF5\uBC31\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-P-023 = XML \uC120\uC5B8\uC758 \uB05D\uC5D0 \uC798\uBABB\uB41C \uBB38\uC790 "&#x{0};"({1})\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.
-P-024 = "{0}=..."\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
-P-025 = XML \uBC84\uC804 "{0}"\uC774(\uAC00) \uC120\uC5B8\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-P-026 = XML \uBC84\uC804 \uBB38\uC790\uC5F4 "{0}"\uC774(\uAC00) \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-P-027 = XML \uBC84\uC804 "{0}"\uC740(\uB294) \uC778\uC2DD\uB418\uC5C8\uC9C0\uB9CC "{1}"\uC740(\uB294) \uC778\uC2DD\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-P-028 = \uB0B4\uBD80 DTD \uBD80\uBD84 \uC9D1\uD569\uC5D0\uB294 "<![..." \uAD6C\uBB38\uC774 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-P-029 = \uB3C5\uB9BD\uD615 \uC120\uC5B8\uC740 "{0}"\uC774(\uAC00) \uC544\uB2CC "yes" \uB610\uB294 "no"\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-
-P-030 = \uC18D\uC131 \uC55E\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-P-031 = \uC18D\uC131 \uC774\uB984\uC740 "{0}" \uBB38\uC790\uB85C \uC2DC\uC791\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-P-032 = "{0}" \uC18D\uC131\uC774 \uC774\uBBF8 \uC774 \uD0DC\uADF8\uC5D0 \uC788\uC2B5\uB2C8\uB2E4.
-P-033 = "{0}"\uC740(\uB294) \uC798\uBABB\uB41C xml:lang \uAC12\uC785\uB2C8\uB2E4.
-P-034 = {1}\uD589\uC5D0\uC11C \uC2DC\uC791\uD558\uB294 \uC694\uC18C\uB97C \uC885\uB8CC\uD558\uB824\uBA74 "</{0}>"\uC774(\uAC00) \uD544\uC694\uD569\uB2C8\uB2E4.
-P-035 = \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0\uC758 \uB05D\uC785\uB2C8\uB2E4. \uC885\uB8CC \uD0DC\uADF8\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-P-036 = ">"\uB294 "{1}"\uC774(\uAC00) \uC544\uB2CC <!ELEMENT {0} ...> \uC120\uC5B8\uC744 \uC885\uB8CC\uD574\uC57C \uD569\uB2C8\uB2E4.
-P-037 = \uC2DC\uD000\uC2A4 \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0\uB294 "{0}"\uC774(\uAC00) \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-P-038 = \uC120\uD0DD \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0\uB294 "{0}"\uC774(\uAC00) \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-P-039 = "{0}"\uC744(\uB97C) \uD3EC\uD568\uD558\uB294 \uCF58\uD150\uCE20 \uBAA8\uB378\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-P-040 = \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0\uB294 "{0}"\uC774(\uAC00) \uC544\uB2CC \uC624\uB978\uCABD \uAD04\uD638 \uB610\uB294 "{1}"\uC774(\uAC00) \uD544\uC694\uD569\uB2C8\uB2E4.
-P-041 = \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0\uB294 "{0}"\uC774(\uAC00) \uC544\uB2CC \uC624\uB978\uCABD \uAD04\uD638, "," \uB610\uB294 "|"\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
-# {0} - element name, {1} - character as a hex number
-P-042 = "{0}"\uC5D0 \uB300\uD55C \uD63C\uD569 \uCF58\uD150\uCE20 \uBAA8\uB378\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uB2E4\uC74C \uBB38\uC790 = &#x{1};
-# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*".
-P-043 = "{0}"\uC5D0 \uB300\uD55C \uD63C\uD569 \uCF58\uD150\uCE20 \uBAA8\uB378\uC740 "{1}"\uC774(\uAC00) \uC544\uB2CC ")*"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
-P-044 = "{0}"\uC774(\uAC00) \uC544\uB2CC \uC18D\uC131 \uC120\uC5B8 \uB610\uB294 ">"\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
-# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space"
-P-045 = "{0}" \uC18D\uC131\uC5D0 \uB300\uD55C \uC720\uD615("{1}"(\uC73C)\uB85C \uC2DC\uC791)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-P-046 = \uC870\uAC74 DTD \uC139\uC158\uC5D0 \uD0A4\uC6CC\uB4DC\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
-P-047 = \uC885\uB8CC\uB418\uC9C0 \uC54A\uC740 \uC870\uAC74 DTD \uC139\uC158\uC785\uB2C8\uB2E4.
-P-048 = "{0}"\uC774(\uAC00) \uC544\uB2CC INCLUDE \uBC0F IGNORE\uB9CC \uD5C8\uC6A9\uB429\uB2C8\uB2E4.
-P-049 = \uC2ED\uC9C4 \uBB38\uC790 \uCC38\uC870\uAC00 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-
-P-050 = 16\uC9C4 \uBB38\uC790 \uCC38\uC870\uAC00 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-P-051 = \uC798\uBABB\uB41C XML \uBB38\uC790 &#x{0};
-P-052 = \uB0B4\uBD80 \uC5D4\uD2F0\uD2F0 "&{0};"\uC5D0\uC11C \uCF58\uD150\uCE20 \uB2E4\uC74C\uC5D0 \uBB38\uC790\uAC00 \uC788\uC2B5\uB2C8\uB2E4.
-P-053 = "&{0};"\uACFC(\uC640) \uAC19\uC774 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0\uB294 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-P-054 = "&{0};"\uC5D0 \uB300\uD55C \uC6D0\uB798 \uC5D4\uD2F0\uD2F0 \uC815\uC758\uB97C \uC0AC\uC6A9\uD558\uB294 \uC911
-P-055 = \uC0C1\uB300 URI "{0}"\uC740(\uB294) \uBB38\uC11C URI \uC5C6\uC774 \uBD84\uC11D\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-P-056 = URI "{0}"\uC5D0 \uB2E8\uD3B8 ID\uAC00 \uC788\uC2B5\uB2C8\uB2E4.
-P-057 = XML \uC120\uC5B8\uC744 \uC885\uB8CC\uD558\uB824\uBA74 "?>"\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
-P-058 = \uC678\uBD80 \uC5D4\uD2F0\uD2F0 "&{0};"\uC5D0\uC11C \uCF58\uD150\uCE20 \uB2E4\uC74C\uC5D0 \uBB38\uC790\uAC00 \uC788\uC2B5\uB2C8\uB2E4.
-P-059 = \uC678\uBD80 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 "%{0};"\uC5D0\uC11C \uB9C8\uD06C\uC5C5 \uB2E4\uC74C\uC5D0 \uBB38\uC790\uAC00 \uC788\uC2B5\uB2C8\uB2E4.
-
-P-060 = \uC778\uCF54\uB529 \uC774\uB984\uC5D0 \uC798\uBABB\uB41C \uBB38\uC790 "{0}"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.
-P-061 = \uC120\uC5B8\uB41C \uC778\uCF54\uB529 "{0}"\uC774(\uAC00) \uC2E4\uC81C \uC778\uCF54\uB529 "{1}"\uACFC(\uC640) \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC774\uB294 \uC624\uB958\uAC00 \uC544\uB2D0 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-P-062 = \uD45C\uAE30\uBC95\uC740 PUBLIC \uB610\uB294 SYSTEM\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-P-063 = "{0}" \uD45C\uAE30\uBC95\uC758 \uCCAB\uBC88\uC9F8 \uC815\uC758\uB97C \uC0AC\uC6A9\uD558\uB294 \uC911
-P-064 = \uC608\uC0C1\uCE58 \uC54A\uC740 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 "%{0};"\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4.
-P-065 = \uC5D4\uD2F0\uD2F0 \uBD84\uC11D\uAE30\uAC00 SYSTEM ID\uB97C \uC81C\uACF5\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uC0C1\uB300 URI\uC5D0 \uC601\uD5A5\uC744 \uC904 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-# P-066 ... ID available
-P-067 = \uBB38\uC11C \uB8E8\uD2B8 \uC694\uC18C\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-P-068 = \uD45C\uAE30\uBC95 \uC774\uB984\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
-P-069 = "{0}" \uC5D4\uD2F0\uD2F0\uC758 \uD655\uC7A5\uC740 \uC21C\uD658\uC801\uC785\uB2C8\uB2E4.
-
-P-070 = \uB300\uB9AC \uC30D\uC758 \uB450\uBC88\uC9F8 \uBD80\uBD84 \uD615\uC2DD\uC774 \uC798\uBABB\uB428: &#x{0};
-P-071 = \uC798\uBABB\uB41C XML \uBB38\uC790: &#x{0};
-P-072 = \uBB38\uC790 \uB370\uC774\uD130\uB294 "]]>"\uB97C \uD3EC\uD568\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-# Character data section starts with "<![CDATA[" and is terminated with "]]>" with text in between. No change needed.
-P-073 = <![CDATA[ \uC139\uC158\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD558\uB294 \uB3D9\uC548 \uD30C\uC77C\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4.
-P-074 = \uC798\uBABB\uB41C \uC720\uB2C8\uCF54\uB4DC \uB300\uB9AC \uC30D: &#x{0}; &#x{1};
-P-075 = \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC778\uCF54\uB529: "{0}"(\uD589 \uC218\uAC00 \uB108\uBB34 \uC791\uC740 \uAC83\uC77C \uC218 \uC788\uC74C)
-P-076 = \uBB38\uC790 \uBCC0\uD658 \uC624\uB958: "{0}"(\uD589 \uC218\uAC00 \uB108\uBB34 \uC791\uC740 \uAC83\uC77C \uC218 \uC788\uC74C)
-P-077 = \uCD5C\uB300 \uAE30\uD638 \uAE38\uC774({0}\uC790)\uB97C \uCD08\uACFC\uD588\uC2B5\uB2C8\uB2E4.
-P-078 = "{0}" \uB85C\uCF00\uC77C\uC5D0 \uB300\uD55C \uBA54\uC2DC\uC9C0\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-P-079 = "<{1}"(\uC73C)\uB85C \uC2DC\uC791\uD558\uB294 \uCF58\uD150\uCE20\uB294 \uC798\uBABB\uB41C \uB9C8\uD06C\uC5C5\uC785\uB2C8\uB2E4. "{1}"(&#{0};) \uBB38\uC790\uAC00 \uAE00\uC790\uC5EC\uC57C \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-
-P-080 = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uB294 \uB0B4\uBD80 DTD \uBD80\uBD84 \uC9D1\uD569\uC758 \uB9C8\uD06C\uC5C5 \uC120\uC5B8 \uB0B4\uC5D0 \uB098\uD0C0\uB098\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-P-081 = \uC644\uB8CC\uB418\uC9C0 \uC54A\uC740 \uC720\uB2C8\uCF54\uB4DC \uB300\uB9AC \uC30D: &#x{0}
-
-P-082 = \uB110 \uC18D\uC131\uC5D0 \uC561\uC138\uC2A4\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911
-P-083 = \uC2A4\uD0DD \uC0C1\uD0DC\uAC00 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-P-084 = "{0}" \uC694\uC18C\uC758 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC740 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC811\uB450\uC5B4
-P-085 = DTD\uAC00 \uAC10\uC9C0\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-P-086 = "{0}"\uC740(\uB294) \uC798\uBABB\uB41C \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC811\uB450\uC5B4\uC785\uB2C8\uB2E4. "xml" \uC811\uB450\uC5B4\uB294 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC774\uC678\uC758 \uB2E4\uB978 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uBC14\uC778\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-#
-# Validation messages, won't normally show up unless validation is
-# being performed. Note that V-022 relates to a spec bug: there
-# are both a WFC and VC on undefined PEs. If that's a WVC violation
-# there's no need for the VC, ever; and "standalone" would then affect
-# WF-ness. For the moment this assumes it's to be a VC not a WFC
-#
-V-000 = \uAC80\uC99D\uC774 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
-V-001 = \uC801\uD569\uD55C \uBB38\uC11C\uC5D0\uB294 <!DOCTYPE \uC120\uC5B8\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-V-002 = \uC774 \uBB38\uC11C\uB294 \uB3C5\uB9BD\uD615\uC774\uBBC0\uB85C "&{0};"\uC744(\uB97C) \uCC38\uC870\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-V-003 = \uC120\uC5B8\uB418\uC9C0 \uC54A\uC740 \uD45C\uAE30\uBC95 "{0}"\uC774(\uAC00) <!ENTITY...> \uC120\uC5B8\uC5D0 \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-V-004 = \uC120\uC5B8\uB418\uC9C0 \uC54A\uC740 \uD45C\uAE30\uBC95 "{0}"\uC774(\uAC00) <!ATTLIST...> \uC120\uC5B8\uC5D0 \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-V-005 = \uC694\uC18C \uC720\uD615 "{0}"\uC774(\uAC00) \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-V-006 = \uB8E8\uD2B8 \uC694\uC18C \uC720\uD615\uC774 "{0}"\uC774\uC9C0\uB9CC, "{1}"(\uC73C)\uB85C \uC120\uC5B8\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-V-007 = "{0}" \uC18D\uC131\uC774 "{1}" \uC694\uC18C\uC5D0 \uB300\uD574 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-V-008 = "{1}" \uC694\uC18C\uC758 "{0}" \uC18D\uC131\uC5D0\uB294 "{2}" \uAC12\uB9CC \uC0AC\uC6A9\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-# {0} - probably attribute name.
-V-009 = "{0}"\uC5D0 \uB300\uD55C \uC18D\uC131\uAC12\uC740 #REQUIRED\uC785\uB2C8\uB2E4.
-
-V-010 = \uC774 \uBB38\uC11C\uB294 \uB3C5\uB9BD\uD615\uC774\uBBC0\uB85C "{0}" \uC18D\uC131\uC740 \uAE30\uBCF8\uAC12\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-V-011 = \uC774 \uBB38\uC11C\uB294 \uB3C5\uB9BD\uD615\uC774\uBBC0\uB85C "{0}" \uC694\uC18C\uB294 \uBB34\uC2DC\uD560 \uC218 \uC788\uB294 \uACF5\uBC31\uC744 \uD3EC\uD568\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-V-012 = "{0}" \uC694\uC18C\uB294 \uC774\uBBF8 \uC120\uC5B8\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-V-013 = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0\uC5D0\uB294 \uBD80\uBD84 \uC120\uC5B8\uC774 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-# {0} - element name
-V-014 = "{0}"\uC5D0 \uB300\uD55C \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0\uC11C \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uC911\uCCA9 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-V-015 = \uD63C\uD569 \uCF58\uD150\uCE20 \uBAA8\uB378\uC774 "{0}" \uC694\uC18C\uB97C \uBC18\uBCF5\uD569\uB2C8\uB2E4.
-V-016 = \uC774 \uC694\uC18C\uC5D0 \uC774\uBBF8 ID \uC18D\uC131 "{0}"\uC774(\uAC00) \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.
-V-017 = ID \uC18D\uC131 "{0}"\uC740(\uB294) #FIXED\uAC00 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-V-018 = ID \uC18D\uC131 "{0}"\uC740(\uB294) \uAE30\uBCF8\uAC12\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-V-019 = \uC774 \uBB38\uC11C\uB294 \uB3C5\uB9BD\uD615\uC774\uBBC0\uB85C \uC774 \uC18D\uC131\uC740 \uBBF8\uB9AC \uC815\uADDC\uD654\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-V-020 = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0\uC5D0\uB294 \uBD80\uBD84 \uC870\uAC74 DTD \uC139\uC158\uC774 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-V-021 = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0\uC5D0\uB294 \uBD80\uBD84 \uC8FC\uC11D\uC774 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.
-V-022 = \uC815\uC758\uB418\uC9C0 \uC54A\uC740 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 "%{0};"\uC5D0 \uB300\uD55C \uCC38\uC870
-V-023 = \uC774 \uBB38\uC11C\uB294 \uB3C5\uB9BD\uD615\uC774\uBBC0\uB85C \uBB34\uC2DC\uD560 \uC218 \uC788\uB294 \uC774 CDATA \uACF5\uBC31\uC740 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-V-024 = \uAC12\uC774 "{0}"\uC778 ID \uC18D\uC131\uC774 \uC788\uB294 \uC694\uC18C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-V-025 = ID \uAC12\uC740 XML \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. "{0}"\uC740(\uB294) \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-V-026 = \uB2E4\uB978 \uC694\uC18C\uC5D0 \uAC12\uC774 "{0}"\uC778 ID \uC18D\uC131\uC774 \uC774\uBBF8 \uC788\uC2B5\uB2C8\uB2E4.
-V-027 = IDREF/IDREFS \uAC12\uC740 XML \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. "{0}"\uC740(\uB294) \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-V-028 = NMTOKEN/NMTOKENS \uAC12\uC740 XML \uC774\uB984 \uD1A0\uD070\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. "{0}"\uC740(\uB294) \uC774\uB984 \uD1A0\uD070\uC774 \uC544\uB2D9\uB2C8\uB2E4.
-V-029 = "{0}" \uAC12\uC740 \uC774 \uC18D\uC131\uC5D0 \uB300\uD574 \uC5F4\uAC70\uB41C \uAC12 \uC911 \uD558\uB098\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
-
-V-030 = \uC18D\uC131\uAC12 "{0}"\uC774(\uAC00) \uD45C\uAE30\uBC95\uC744 \uBA85\uBA85\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-V-031 = \uC18D\uC131\uAC12 "{0}"\uC774(\uAC00) \uAD6C\uBB38 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0\uB97C \uBA85\uBA85\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-V-032 = NMTOKENS \uC18D\uC131\uC5D0\uB294 \uD558\uB098 \uC774\uC0C1\uC758 \uAC12\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated.
-V-033 = EMPTY \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0\uB294 \uCF58\uD150\uCE20\uAC00 \uC5C6\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-# Usage not found. TODO Remove
-#V-034 = Element "{0}" does not allow "{1}" -- {2}
-# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed.
-V-035 = "{0}" \uC694\uC18C\uB294 \uB354 \uC774\uC0C1\uC758 \uC785\uB825\uC744 \uD5C8\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. "{1}"\uC740(\uB294) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-# Usage not found. TODO Remove
-#V-036 = Element "{0}" does not allow "{1}" here
-V-037 = "{0}" \uC694\uC18C\uB294 \uD14D\uC2A4\uD2B8\uB97C \uD5C8\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-V-038 = "{0}" \uC694\uC18C\uC5D0\uB294 \uCD94\uAC00 \uC694\uC18C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
-V-039 = IDREFS \uC18D\uC131\uC5D0\uB294 \uD558\uB098 \uC774\uC0C1\uC758 \uAC12\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-
-V-040 = ENTITIES \uC18D\uC131\uC5D0\uB294 \uD558\uB098 \uC774\uC0C1\uC758 \uAC12\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_pt_BR.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_pt_BR.properties
deleted file mode 100644
index 05e9f498..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_pt_BR.properties
+++ /dev/null
@@ -1,284 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# English diagnostic messages (and fragments) for Sun's XML parser.
-#
-# P-NNN ... parser messages
-# F-NNN ... message fragments (sometimes associated with more
-# than one message, but usually just with one)
-# V-NNN ... validation related messages
-#
-# Most messages can be produced in only one way.
-#
-
-
-#
-# Generic parsing messages, not specific to validation
-#
-P-000 = N\u00E3o h\u00E1 origem da entrada do parser!
-P-001 = Caractere inv\u00E1lido no final do documento, &#x{0};
-P-002 = A expans\u00E3o da entidade "&{0};" n\u00E3o est\u00E1 formatada corretamente
-P-003 = Fim de entrada prematuro
-# {0} - F000-F009, F011, F021.
-P-004 = Espa\u00E7o em branco {0} n\u00E3o encontrado
-P-005 = Somente espa\u00E7o em branco permitido {0}
-
- #
- # unadorned "missing whitespace", with P-004 only
- #
- # Concatenated with P-004 (P-004 + F000)
- F-000 = ap\u00F3s a declara\u00E7\u00E3o do nome do elemento
- # Concatenated with P-004 (P-004 + F001)
- F-001 = entre o nome e o tipo do atributo
- # Concatenated with P-004 (P-004 + F002)
- F-002 = ap\u00F3s o nome do tipo de NOTATION
- # Concatenated with P-004 (P-004 + F003)
- F-003 = entre o tipo do atributo e o valor default
- # Concatenated with P-004 (P-004 + F004)
- F-004 = ap\u00F3s #FIXED
- # Concatenated with P-004 (P-004 + F005)
- F-005 = ap\u00F3s a declara\u00E7\u00E3o de <!ENTITY
- # Concatenated with P-004 (P-004 + F006)
- F-006 = ap\u00F3s % na declara\u00E7\u00E3o de entidade do par\u00E2metro
- # Concatenated with P-004 (P-004 + F007)
- F-007 = ap\u00F3s o nome da entidade
- # Concatenated with P-004 (P-004 + F008)
- F-008 = antes do URI literal de SYSTEM
- # Concatenated with P-004 (P-004 + F009)
- F-009 = ap\u00F3s a palavra-chave PUBLIC
- # F-010 ... identifier can be reused
- # Concatenated with P-004 (P-004 + F011)
- F-011 = ap\u00F3s o nome da nota\u00E7\u00E3o
- # F-012 ... identifier can be reused
- # F-013 ... identifier can be reused
-
- #
- # in declaration, in "S Name", with P-004 and P-005
- #
- F-014 = antes do nome na declara\u00E7\u00E3o <!DOCTYPE
- # Concatenated with P-005 (P-005 + F015)
- F-015 = antes do nome na declara\u00E7\u00E3o <!ELEMENT
- # Concatenated with P-005 (P-005 + F016)
- F-016 = antes do nome na declara\u00E7\u00E3o <!ATTLIST
- # Concatenated with P-005 (P-005 + F017)
- F-017 = antes do nome da declara\u00E7\u00E3o <!ENTITY
- # Concatenated with P-005 (P-005 + F018)
- F-018 = ates do nome de nota\u00E7\u00E3o NDATA na declara\u00E7\u00E3o <!ENTITY
- # Concatenated with P-005 (P-005 + F019)
- F-019 = antes do nome na declara\u00E7\u00E3o <!NOTATION
-
-# {0} - character
-P-006 = Os tokens de nome n\u00E3o devem come\u00E7ar com caracteres "{0}"
-P-007 = O valor n\u00E3o deve estar entre aspas
-# {0} - character, {1} - F020-F023, F028-F032, {2} - xml entity name e.g.: Next character must be ">" terminating <!ENTITY...> declaration "%HTML.Version"
-P-008 = O pr\u00F3ximo caractere deve ser "{0}" {1} {2}
-
- # Concatenated with P-008 (P-008 + F020)
- F-020 = refer\u00EAncia final \u00E0 entidade
- # Concatenated with P-008 (P-008 + F021)
- F-021 = refer\u00EAncia final \u00E0 entidade do par\u00E2metro
- # Concatenated with P-008 (P-008 + F022)
- F-022 = coment\u00E1rio final
- # Concatenated with P-008 (P-008 + F023)
- F-023 = na Declara\u00E7\u00E3o XML
- # Concatenated with P-008 (P-008 + F024)
- F-024 = subconjunto DTD interno final
- # Concatenated with P-008 (P-008 + F025)
- F-025 = declara\u00E7\u00E3o <!DOCTYPE ...> final
- # Concatenated with P-008 (P-008 + F026)
- F-026 = ap\u00F3s o nome do atributo
- # Concatenated with P-008 (P-008 + F027)
- F-027 = elemento final
- # Concatenated with P-008 (P-008 + F028)
- F-028 = iniciando modelo de conte\u00FAdo para o elemento
- # Concatenated with P-008 (P-008 + F029)
- F-029 = iniciando lista de atributo NOTATIONS
- # Concatenated with P-008 (P-008 + F030)
- F-030 = subconjunto DTD de condi\u00E7\u00E3o inicial
- # Concatenated with P-008 (P-008 + F031)
- F-031 = declara\u00E7\u00E3o <!ENTITY ...> final
- # Concatenated with P-008 (P-008 + F032)
- F-032 = declara\u00E7\u00E3o <!NOTATION ...> final
-
-P-009 = Caractere ilegal ou sintaxe de refer\u00EAncia da entidade
-
-P-010 = Somente entidades do par\u00E2metro externo podem usar "%{0};" nos valores da entidade
-P-011 = Sintaxe inv\u00E1lida de refer\u00EAncia da entidade do par\u00E2metro
-P-012 = Use "&lt;" para "<" nos valores de atributos
-P-013 = Refer\u00EAncia inv\u00E1lida para a entidade externa "&{0};" no atributo
-P-014 = Refer\u00EAncia \u00E0 entidade indefinida "&{0};"
-# {0} - F033-F035
-P-015 = Esperando valor entre aspas para {0}
-
- # Concatenated with P-015 (P-015 + F033)
- F-033 = Identificador PUBLIC
- # Concatenated with P-015 (P-015 + F034)
- F-034 = Identificador SYSTEM
- # {0} - attribute name. Concatenated with P-015 (P-015 + F033)
- F-035 = valor do atributo {0}
-
-P-016 = Caractere inv\u00E1lido no identificador PUBLIC: "{0}"
-P-017 = Final da entidade ao processar o coment\u00E1rio
-P-018 = O destino da instru\u00E7\u00E3o de processamento n\u00E3o foi encontrado
-P-019 = A declara\u00E7\u00E3o XML s\u00F3 pode come\u00E7ar entidades
-
-P-020 = Destino inv\u00E1lido da instru\u00E7\u00E3o de processamento: "{0}"
-P-021 = Final da instru\u00E7\u00E3o de processamento de entrada interna
-P-022 = Nome inv\u00E1lido da instru\u00E7\u00E3o de processamento ou espa\u00E7o em branco n\u00E3o encontrado
-P-023 = Caractere inv\u00E1lido "&#x{0};" ({1}) no final da Declara\u00E7\u00E3o XML
-P-024 = Esperava "{0}=..."
-P-025 = A vers\u00E3o XML "{0}" deve ser declarada
-P-026 = String inv\u00E1lida da vers\u00E3o XML "{0}"
-P-027 = A vers\u00E3o XML "{0}" \u00E9 reconhecida, mas n\u00E3o "{1}"
-P-028 = O subconjunto DTD interno n\u00E3o deve ter constru\u00E7\u00F5es "<![..."
-P-029 = A declara\u00E7\u00E3o independente deve ser "sim" ou "n\u00E3o", e n\u00E3o "{0}"
-
-P-030 = Espa\u00E7o em branco obrigat\u00F3rio antes dos atributos
-P-031 = Os nomes de atributos n\u00E3o devem come\u00E7ar com "{0}" caracteres
-P-032 = O atributo "{0}" j\u00E1 apareceu nesta tag
-P-033 = Valor inv\u00E1lido de xml:lang "{0}"
-P-034 = "</{0}>" esperado para encerrar o elemento que come\u00E7a na linha {1}
-P-035 = Final da entidade n\u00E3o permitido; uma tag final n\u00E3o foi encontrada
-P-036 = ">" deve encerrar a declara\u00E7\u00E3o <!ELEMENT {0} ...>, e n\u00E3o "{1}"
-P-037 = O modelo de conte\u00FAdo da sequ\u00EAncia n\u00E3o deve conter "{0}"
-P-038 = O modelo de conte\u00FAdo da op\u00E7\u00E3o n\u00E3o deve conter "{0}"
-P-039 = Nenhum modelo de conte\u00FAdo deve conter "{0}"
-
-P-040 = \u00C9 necess\u00E1rio o par\u00EAntese direito ou "{1}" no modelo de conte\u00FAdo, e n\u00E3o "{0}"
-P-041 = \u00C9 necess\u00E1rio o par\u00EAntese direito, "," ou "|" no modelo de conte\u00FAdo, e n\u00E3o "{0}"
-# {0} - element name, {1} - character as a hex number
-P-042 = Modelo de conte\u00FAdo misto inv\u00E1lido para "{0}", o pr\u00F3ximo caractere = &#x{1};
-# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*".
-P-043 = O modelo de conte\u00FAdo misto para "{0}" deve terminar com ")*", e n\u00E3o "{1}"
-P-044 = Uma declara\u00E7\u00E3o de atributos ou ">" \u00E9 esperada, e n\u00E3o "{0}"
-# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space"
-P-045 = Tipo inv\u00E1lido (come\u00E7a com "{1}") para o atributo "{0}"
-P-046 = \u00C9 necess\u00E1rio a palavra-chave na se\u00E7\u00E3o DTD condicional
-P-047 = Se\u00E7\u00E3o DTD condicional n\u00E3o encerrada
-P-048 = Somente INCLUDE e IGNORE s\u00E3o permitidos, e n\u00E3o "{0}"
-P-049 = Refer\u00EAncia inv\u00E1lida do caractere decimal
-
-P-050 = Refer\u00EAncia inv\u00E1lida do caractere hexadecimal
-P-051 = Caractere XML inv\u00E1lido &#x{0};
-P-052 = A entidade interna "&{0};" tem caracteres ap\u00F3s o conte\u00FAdo
-P-053 = Entidades sem parse como "&{0};" n\u00E3o devem ser inclu\u00EDdas
-P-054 = Usando defini\u00E7\u00E3o de entidade original para "&{0};"
-P-055 = O URI relativo "{0}"; n\u00E3o pode ser resolvido sem um URI do documento
-P-056 = O URI "{0}" tem um ID de fragmento
-P-057 = \u00C9 necess\u00E1rio "?>" para encerrar a declara\u00E7\u00E3o XML
-P-058 = A entidade externa "&{0};" tem caracteres ap\u00F3s o conte\u00FAdo
-P-059 = A entidade do par\u00E2metro externo "%{0};" tem caracteres ap\u00F3s a marca\u00E7\u00E3o
-
-P-060 = Caractere inv\u00E1lido "{0}" no nome da codifica\u00E7\u00E3o
-P-061 = A codifica\u00E7\u00E3o declarada "{0}" n\u00E3o corresponde ao "{1}" real; isso pode n\u00E3o ser um erro
-P-062 = A nota\u00E7\u00E3o deve ser PUBLIC ou SYSTEM
-P-063 = Usando a primeira defini\u00E7\u00E3o da nota\u00E7\u00E3o "{0}"
-P-064 = Final prematuro da entidade do par\u00E2metro "%{0};"
-P-065 = O Resolvedor da Entidade n\u00E3o forneceu o id do SYSTEM; pode afetar URIs relativos
-# P-066 ... ID available
-P-067 = O elemento raiz do documento n\u00E3o foi encontrado
-P-068 = Nome da nota\u00E7\u00E3o obrigat\u00F3rio
-P-069 = A expans\u00E3o da entidade "{0}" \u00E9 recursiva
-
-P-070 = Segunda parte incorreta do par substituto: &#x{0};
-P-071 = Caractere XML inv\u00E1lido: &#x{0};
-P-072 = Os dados do caractere n\u00E3o podem ter "]]>"
-# Character data section starts with "<![CDATA[" and is terminated with "]]>" with text in between. No change needed.
-P-073 = EOF ao fazer parse da se\u00E7\u00E3o <![CDATA[
-P-074 = Par substituto do Unicode inv\u00E1lido: &#x{0}; &#x{1};
-P-075 = Codifica\u00E7\u00E3o n\u00E3o suportada: "{0}" (o n\u00FAmero da linha pode ser muito baixo)
-P-076 = Erro de convers\u00E3o do caractere: "{0}" (o n\u00FAmero da linha pode ser muito baixo)
-P-077 = O tamanho m\u00E1ximo do s\u00EDmbolo ({0} caracteres) foi excedido
-P-078 = N\u00E3o h\u00E1 mensagens dispon\u00EDveis para a configura\u00E7\u00E3o regional "{0}"
-P-079 = O in\u00EDcio do conte\u00FAdo "<{1}" n\u00E3o \u00E9 uma marca\u00E7\u00E3o legal. Talvez, o caractere "{1}" (&#{0};) deva ser uma letra
-
-P-080 = As refer\u00EAncias da entidade do par\u00E2metro n\u00E3o devem aparecer nas declara\u00E7\u00F5es de marca\u00E7\u00E3o no subconjunto DTD interno
-P-081 = Par substituto de Unicode incompleto: &#x{0}.
-
-P-082 = Tentando acessar atributos nulos
-P-083 = Estado da pilha inv\u00E1lido
-P-084 = Prefixo do elemento "{0}" de namespace n\u00E3o declarado
-P-085 = DTD detectado
-P-086 = prefixo de namespace inv\u00E1lido "{0}"; o prefixo "xml" n\u00E3o pode ser vinculado a um namespace diferente do namespace comum
-
-#
-# Validation messages, won't normally show up unless validation is
-# being performed. Note that V-022 relates to a spec bug: there
-# are both a WFC and VC on undefined PEs. If that's a WVC violation
-# there's no need for the VC, ever; and "standalone" would then affect
-# WF-ness. For the moment this assumes it's to be a VC not a WFC
-#
-V-000 = Valida\u00E7\u00E3o desativada
-V-001 = Os documentos v\u00E1lidos devem ter uma declara\u00E7\u00E3o <!DOCTYPE
-V-002 = Este documento \u00E9 independente, portanto, n\u00E3o deve se referir a "&{0};"
-V-003 = A nota\u00E7\u00E3o n\u00E3o declarada "{0}" \u00E9 usada por uma declara\u00E7\u00E3o <!ENTITY...>
-V-004 = A nota\u00E7\u00E3o n\u00E3o declarada "{0}" \u00E9 usada por uma declara\u00E7\u00E3o <!ATTLIST...>
-V-005 = O tipo do elemento "{0}" n\u00E3o \u00E9 declarado
-V-006 = O tipo do elemento raiz \u00E9 "{0}", mas foi declarado como "{1}"
-V-007 = O atributo "{0}" n\u00E3o \u00E9 declarado para o elemento "{1}"
-V-008 = O atributo "{0}" do elemento "{1}" s\u00F3 pode ter o valor "{2}"
-# {0} - probably attribute name.
-V-009 = O valor do atributo de "{0}" \u00E9 #REQUIRED
-
-V-010 = Este documento \u00E9 independente, portanto, o atributo "{0}" n\u00E3o deve ser definido como default
-V-011 = Este documento \u00E9 independente, portanto, o elemento "{0}" n\u00E3o deve ter espa\u00E7o em branco ignor\u00E1vel
-V-012 = O elemento "{0}" j\u00E1 foi declarado
-V-013 = As entidades do par\u00E2metro n\u00E3o devem conter declara\u00E7\u00F5es parciais
-# {0} - element name
-V-014 = Erro de aninhamento da entidade do par\u00E2metro no modelo de conte\u00FAdo para "{0}"
-V-015 = O modelo de conte\u00FAdo misto repete o elemento "{0}"
-V-016 = Este elemento j\u00E1 tem um atributo de ID, "{0}"
-V-017 = O atributo de ID "{0}" n\u00E3o deve ser #FIXED
-V-018 = O atributo de ID "{0}" n\u00E3o deve ser definido como default
-V-019 = Este documento \u00E9 independente; este atributo precisa ser pr\u00E9-normalizado
-
-V-020 = As entidades do par\u00E2metro n\u00E3o devem conter se\u00E7\u00F5es DTD condicionais parciais
-V-021 = As entidades do par\u00E2metro n\u00E3o devem conter coment\u00E1rios parciais
-V-022 = Refer\u00EAncia \u00E0 entidade do par\u00E2metro indefinido "%{0};"
-V-023 = Este documento \u00E9 independente; este espa\u00E7o em branco CDATA ignor\u00E1vel \u00E9 proibido
-V-024 = Nenhum elemento tem um atributo de ID com o valor "{0}"
-V-025 = Os valores do ID devem ser nomes XML; "{0}" n\u00E3o \u00E9 um nome
-V-026 = Outro elemento j\u00E1 tem um atributo de ID com o valor "{0}"
-V-027 = Os valores IDREF/IDREFS devem ser nomes XML; "{0}" n\u00E3o \u00E9 um nome
-V-028 = Os valores NMTOKEN/NMTOKENS devem ser tokens de nomes XML; "{0}" n\u00E3o \u00E9 um token de nome
-V-029 = O valor "{0}" n\u00E3o \u00E9 um dos valores enumerados para este atributo
-
-V-030 = O valor do atributo "{0}" n\u00E3o nomeia uma nota\u00E7\u00E3o
-V-031 = O valor do atributo "{0}" n\u00E3o nomeia uma entidade sem parse
-V-032 = Os atributos NMTOKENS devem ter pelo menos um valor
-# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated.
-V-033 = Os modelos de conte\u00FAdo vazios n\u00E3o devem ter conte\u00FAdo
-# Usage not found. TODO Remove
-#V-034 = Element "{0}" does not allow "{1}" -- {2}
-# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed.
-V-035 = O elemento "{0}" n\u00E3o permite mais inser\u00E7\u00F5es; "{1}" n\u00E3o \u00E9 permitido
-# Usage not found. TODO Remove
-#V-036 = Element "{0}" does not allow "{1}" here
-V-037 = O elemento "{0}" n\u00E3o permite texto
-V-038 = O elemento "{0}" requer elementos adicionais
-V-039 = Os atributos IDREFS devem ter pelo menos um valor
-
-V-040 = Os atributos ENTITIES devem ter pelo menos um valor
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_CN.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_CN.properties
deleted file mode 100644
index eec09adc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_CN.properties
+++ /dev/null
@@ -1,284 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# English diagnostic messages (and fragments) for Sun's XML parser.
-#
-# P-NNN ... parser messages
-# F-NNN ... message fragments (sometimes associated with more
-# than one message, but usually just with one)
-# V-NNN ... validation related messages
-#
-# Most messages can be produced in only one way.
-#
-
-
-#
-# Generic parsing messages, not specific to validation
-#
-P-000 = \u65E0\u89E3\u6790\u5668\u8F93\u5165\u6E90!
-P-001 = \u5728\u6587\u6863\u7ED3\u5C3E\u5B58\u5728\u975E\u6CD5\u5B57\u7B26, &#x{0};
-P-002 = \u5B9E\u4F53 "&{0};" \u7684\u6269\u5C55\u683C\u5F0F\u4E0D\u6B63\u786E
-P-003 = \u8F93\u5165\u63D0\u524D\u7ED3\u675F
-# {0} - F000-F009, F011, F021.
-P-004 = \u7F3A\u5C11\u7A7A\u683C {0}
-P-005 = \u4EC5\u5141\u8BB8\u7A7A\u683C{0}
-
- #
- # unadorned "missing whitespace", with P-004 only
- #
- # Concatenated with P-004 (P-004 + F000)
- F-000 = \u5143\u7D20\u540D\u79F0\u58F0\u660E\u4E4B\u540E
- # Concatenated with P-004 (P-004 + F001)
- F-001 = \u4ECB\u4E8E\u5C5E\u6027\u540D\u79F0\u548C\u7C7B\u578B\u4E4B\u95F4
- # Concatenated with P-004 (P-004 + F002)
- F-002 = NOTATION \u7C7B\u578B\u540D\u79F0\u4E4B\u540E
- # Concatenated with P-004 (P-004 + F003)
- F-003 = \u4ECB\u4E8E\u5C5E\u6027\u7C7B\u578B\u548C\u9ED8\u8BA4\u503C\u4E4B\u95F4
- # Concatenated with P-004 (P-004 + F004)
- F-004 = \u5728 #FIXED \u4E4B\u540E
- # Concatenated with P-004 (P-004 + F005)
- F-005 = <!ENTITY \u58F0\u660E\u4E4B\u540E
- # Concatenated with P-004 (P-004 + F006)
- F-006 = \u53C2\u6570\u5B9E\u4F53\u58F0\u660E\u4E2D\u7684 % \u4E4B\u540E
- # Concatenated with P-004 (P-004 + F007)
- F-007 = \u5B9E\u4F53\u540D\u79F0\u4E4B\u540E
- # Concatenated with P-004 (P-004 + F008)
- F-008 = SYSTEM \u6587\u5B57 URI \u4E4B\u524D
- # Concatenated with P-004 (P-004 + F009)
- F-009 = PUBLIC \u5173\u952E\u5B57\u4E4B\u540E
- # F-010 ... identifier can be reused
- # Concatenated with P-004 (P-004 + F011)
- F-011 = \u6CE8\u91CA\u540D\u79F0\u4E4B\u540E
- # F-012 ... identifier can be reused
- # F-013 ... identifier can be reused
-
- #
- # in declaration, in "S Name", with P-004 and P-005
- #
- F-014 = <!DOCTYPE \u58F0\u660E\u4E2D\u7684\u540D\u79F0\u4E4B\u524D
- # Concatenated with P-005 (P-005 + F015)
- F-015 = <!ELEMENT \u58F0\u660E\u4E2D\u7684\u540D\u79F0\u4E4B\u524D
- # Concatenated with P-005 (P-005 + F016)
- F-016 = <!ATTLIST \u58F0\u660E\u4E2D\u7684\u540D\u79F0\u4E4B\u524D
- # Concatenated with P-005 (P-005 + F017)
- F-017 = <!ENTITY \u58F0\u660E\u4E2D\u7684\u540D\u79F0\u4E4B\u524D
- # Concatenated with P-005 (P-005 + F018)
- F-018 = <!ENTITY \u58F0\u660E\u4E2D\u7684 NDATA \u6CE8\u91CA\u540D\u79F0\u4E4B\u524D
- # Concatenated with P-005 (P-005 + F019)
- F-019 = <!NOTATION \u58F0\u660E\u4E2D\u7684\u540D\u79F0\u4E4B\u524D
-
-# {0} - character
-P-006 = \u540D\u79F0\u6807\u8BB0\u4E0D\u80FD\u4EE5 "{0}" \u5B57\u7B26\u5F00\u5934
-P-007 = \u503C\u5FC5\u987B\u4F7F\u7528\u5F15\u53F7\u62EC\u8D77\u6765
-# {0} - character, {1} - F020-F023, F028-F032, {2} - xml entity name e.g.: Next character must be ">" terminating <!ENTITY...> declaration "%HTML.Version"
-P-008 = \u4E0B\u4E00\u4E2A\u5B57\u7B26\u5FC5\u987B\u4E3A "{0}" {1} {2}
-
- # Concatenated with P-008 (P-008 + F020)
- F-020 = \u7EC8\u6B62\u5BF9\u5B9E\u4F53\u7684\u5F15\u7528
- # Concatenated with P-008 (P-008 + F021)
- F-021 = \u7EC8\u6B62\u5BF9\u53C2\u6570\u5B9E\u4F53\u7684\u5F15\u7528
- # Concatenated with P-008 (P-008 + F022)
- F-022 = \u7EC8\u6B62\u6CE8\u91CA
- # Concatenated with P-008 (P-008 + F023)
- F-023 = \u5728 XML \u58F0\u660E\u4E2D
- # Concatenated with P-008 (P-008 + F024)
- F-024 = \u7EC8\u6B62\u5185\u90E8 DTD \u5B50\u96C6
- # Concatenated with P-008 (P-008 + F025)
- F-025 = \u7EC8\u6B62 <!DOCTYPE ...> \u58F0\u660E
- # Concatenated with P-008 (P-008 + F026)
- F-026 = \u5C5E\u6027\u540D\u79F0\u4E4B\u540E
- # Concatenated with P-008 (P-008 + F027)
- F-027 = \u7EC8\u6B62\u5143\u7D20
- # Concatenated with P-008 (P-008 + F028)
- F-028 = \u542F\u52A8\u5143\u7D20\u7684\u5185\u5BB9\u6A21\u578B
- # Concatenated with P-008 (P-008 + F029)
- F-029 = \u542F\u52A8\u5C5E\u6027 NOTATIONS \u5217\u8868
- # Concatenated with P-008 (P-008 + F030)
- F-030 = \u5F00\u59CB\u6761\u4EF6 DTD \u5B50\u96C6
- # Concatenated with P-008 (P-008 + F031)
- F-031 = \u7EC8\u6B62 <!ENTITY ...> \u58F0\u660E
- # Concatenated with P-008 (P-008 + F032)
- F-032 = \u7EC8\u6B62 <!NOTATION ...> \u58F0\u660E
-
-P-009 = \u975E\u6CD5\u5B57\u7B26\u6216\u5B9E\u4F53\u5F15\u7528\u8BED\u6CD5
-
-P-010 = \u53EA\u6709\u5916\u90E8\u53C2\u6570\u5B9E\u4F53\u624D\u80FD\u5728\u5B9E\u4F53\u503C\u4E2D\u4F7F\u7528 "%{0};"
-P-011 = \u975E\u6CD5\u53C2\u6570\u5B9E\u4F53\u5F15\u7528\u8BED\u6CD5
-P-012 = \u5BF9\u4E8E\u5C5E\u6027\u503C\u4E2D\u7684 "<", \u8BF7\u4F7F\u7528 "&lt;"
-P-013 = \u975E\u6CD5\u5F15\u7528\u5C5E\u6027\u4E2D\u7684\u5916\u90E8\u5B9E\u4F53 "&{0};"
-P-014 = \u5F15\u7528\u672A\u5B9A\u4E49\u7684\u5B9E\u4F53 "&{0};"
-# {0} - F033-F035
-P-015 = \u5BF9\u4E8E{0}\u7684\u503C, \u5E94\u4F7F\u7528\u5F15\u53F7\u62EC\u8D77\u6765
-
- # Concatenated with P-015 (P-015 + F033)
- F-033 = PUBLIC \u6807\u8BC6\u7B26
- # Concatenated with P-015 (P-015 + F034)
- F-034 = SYSTEM \u6807\u8BC6\u7B26
- # {0} - attribute name. Concatenated with P-015 (P-015 + F033)
- F-035 = \u5C5E\u6027\u503C{0}
-
-P-016 = PUBLIC \u6807\u8BC6\u7B26\u4E2D\u5B58\u5728\u975E\u6CD5\u5B57\u7B26: "{0}"
-P-017 = \u5904\u7406\u6CE8\u91CA\u65F6\u9047\u5230\u5B9E\u4F53\u7ED3\u5C3E
-P-018 = \u7F3A\u5C11\u5904\u7406\u6307\u4EE4\u76EE\u6807
-P-019 = XML \u58F0\u660E\u53EA\u80FD\u5F00\u59CB\u5B9E\u4F53
-
-P-020 = \u975E\u6CD5\u5904\u7406\u6307\u4EE4\u76EE\u6807: "{0}"
-P-021 = \u8F93\u5165\u7ED3\u5C3E\u5904\u4E8E\u5904\u7406\u6307\u4EE4\u5185
-P-022 = \u975E\u6CD5\u5904\u7406\u6307\u4EE4\u540D\u79F0, \u6216\u7F3A\u5C11\u7A7A\u683C
-P-023 = \u5728 XML \u58F0\u660E\u7ED3\u5C3E\u5B58\u5728\u975E\u6CD5\u5B57\u7B26 "&#x{0};" ({1})
-P-024 = \u5E94\u4E3A "{0}=..."
-P-025 = \u5E94\u58F0\u660E XML \u7248\u672C "{0}"
-P-026 = \u975E\u6CD5 XML \u7248\u672C\u5B57\u7B26\u4E32 "{0}"
-P-027 = \u5DF2\u8BC6\u522B XML \u7248\u672C "{0}", \u4F46\u65E0\u6CD5\u8BC6\u522B "{1}"
-P-028 = \u5185\u90E8 DTD \u5B50\u96C6\u4E0D\u80FD\u62E5\u6709 "<![..." \u6784\u9020
-P-029 = \u72EC\u7ACB\u58F0\u660E\u5FC5\u987B\u4E3A "yes" \u6216 "no", \u800C\u4E0D\u662F "{0}"
-
-P-030 = \u5C5E\u6027\u4E4B\u524D\u9700\u8981\u7A7A\u683C
-P-031 = \u5C5E\u6027\u540D\u4E0D\u80FD\u4EE5 "{0}" \u5B57\u7B26\u5F00\u5934
-P-032 = \u5C5E\u6027 "{0}" \u5DF2\u5728\u6B64\u6807\u8BB0\u4E2D\u51FA\u73B0
-P-033 = \u975E\u6CD5 xml:lang \u503C "{0}"
-P-034 = \u8981\u6C42\u4F7F\u7528 "</{0}>" \u6765\u7EC8\u6B62\u5728\u884C {1} \u5904\u5F00\u59CB\u7684\u5143\u7D20
-P-035 = \u4E0D\u5141\u8BB8\u5B9E\u4F53\u7ED3\u5C3E; \u7F3A\u5C11\u7ED3\u675F\u6807\u8BB0
-P-036 = ">" \u5FC5\u987B\u7EC8\u6B62 <!ELEMENT {0} ...> \u58F0\u660E, \u800C\u4E0D\u662F "{1}"
-P-037 = \u5E8F\u5217\u5185\u5BB9\u6A21\u578B\u4E0D\u80FD\u5305\u542B "{0}"
-P-038 = \u9009\u9879\u5185\u5BB9\u6A21\u578B\u4E0D\u80FD\u5305\u542B "{0}"
-P-039 = \u4EFB\u4F55\u5185\u5BB9\u6A21\u578B\u4E0D\u80FD\u5305\u542B "{0}"
-
-P-040 = \u5728\u5185\u5BB9\u6A21\u578B\u4E2D\u9700\u8981\u53F3\u62EC\u53F7\u6216 "{1}", \u800C\u4E0D\u662F "{0}"
-P-041 = \u5728\u5185\u5BB9\u6A21\u578B\u4E2D\u9700\u8981\u53F3\u62EC\u53F7, "," \u6216 "|", \u800C\u4E0D\u662F "{0}"
-# {0} - element name, {1} - character as a hex number
-P-042 = "{0}" \u975E\u6CD5\u6DF7\u5408\u7684\u5185\u5BB9\u6A21\u578B, \u4E0B\u4E00\u4E2A\u5B57\u7B26 = &#x{1};
-# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*".
-P-043 = "{0}" \u6DF7\u5408\u7684\u5185\u5BB9\u6A21\u578B\u5FC5\u987B\u4EE5 ")*" \u7ED3\u675F, \u800C\u4E0D\u4EE5 "{1}" \u7ED3\u675F
-P-044 = \u9700\u8981\u5C5E\u6027\u58F0\u660E\u6216 ">", \u800C\u4E0D\u662F "{0}"
-# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space"
-P-045 = \u5C5E\u6027 "{0}" \u7684\u7C7B\u578B (\u4EE5 "{1}" \u5F00\u5934) \u975E\u6CD5
-P-046 = \u5728\u6761\u4EF6 DTD \u90E8\u5206\u9700\u8981\u5173\u952E\u5B57
-P-047 = \u672A\u7EC8\u6B62\u7684\u6761\u4EF6 DTD \u90E8\u5206
-P-048 = \u4EC5\u5141\u8BB8 INCLUDE \u548C IGNORE, \u4E0D\u5141\u8BB8 "{0}"
-P-049 = \u975E\u6CD5\u5341\u8FDB\u5236\u5B57\u7B26\u5F15\u7528
-
-P-050 = \u975E\u6CD5\u5341\u516D\u8FDB\u5236\u5B57\u7B26\u5F15\u7528
-P-051 = \u975E\u6CD5 XML \u5B57\u7B26 &#x{0};
-P-052 = \u5185\u90E8\u5B9E\u4F53 "&{0};" \u5728\u5185\u5BB9\u540E\u62E5\u6709\u5B57\u7B26
-P-053 = \u4E0D\u80FD\u5305\u542B\u672A\u89E3\u6790\u7684\u5B9E\u4F53, \u4F8B\u5982 "&{0};"
-P-054 = \u4F7F\u7528 "&{0};" \u7684\u539F\u59CB\u5B9E\u4F53\u5B9A\u4E49
-P-055 = \u53EA\u6709\u7528\u6587\u6863 URI \u624D\u80FD\u89E3\u6790\u76F8\u5BF9 URI "{0}"
-P-056 = URI "{0}" \u62E5\u6709\u4E00\u4E2A\u7247\u6BB5 ID
-P-057 = \u9700\u8981 "?>" \u6765\u7EC8\u6B62 XML \u58F0\u660E
-P-058 = \u5916\u90E8\u5B9E\u4F53 "&{0};" \u5728\u5185\u5BB9\u540E\u62E5\u6709\u5B57\u7B26
-P-059 = \u5916\u90E8\u53C2\u6570\u5B9E\u4F53 "%{0};" \u5728\u6807\u8BB0\u540E\u62E5\u6709\u5B57\u7B26
-
-P-060 = \u7F16\u7801\u540D\u79F0\u4E2D\u5305\u542B\u975E\u6CD5\u5B57\u7B26 "{0}"
-P-061 = \u58F0\u660E\u7684\u7F16\u7801 "{0}" \u4E0D\u4E0E\u5B9E\u9645\u7684\u7F16\u7801 "{1}" \u5339\u914D; \u8FD9\u53EF\u80FD\u4E0D\u662F\u9519\u8BEF
-P-062 = \u6CE8\u91CA\u5FC5\u987B\u4E3A PUBLIC \u6216 SYSTEM
-P-063 = \u6B63\u5728\u4F7F\u7528\u6CE8\u91CA "{0}" \u7684\u7B2C\u4E00\u4E2A\u5B9A\u4E49
-P-064 = \u53C2\u6570\u5B9E\u4F53 "%{0};" \u63D0\u524D\u7ED3\u675F
-P-065 = \u5B9E\u4F53\u89E3\u6790\u5668\u6CA1\u6709\u63D0\u4F9B SYSTEM ID; \u53EF\u80FD\u4F1A\u5F71\u54CD\u76F8\u5BF9 URI
-# P-066 ... ID available
-P-067 = \u7F3A\u5C11\u6587\u6863\u6839\u5143\u7D20
-P-068 = \u9700\u8981\u6CE8\u91CA\u540D\u79F0
-P-069 = \u5B9E\u4F53 "{0}" \u7684\u6269\u5C55\u662F\u9012\u5F52\u7684
-
-P-070 = \u4EE3\u7406\u5BF9\u7684\u7B2C\u4E8C\u90E8\u5206\u7684\u683C\u5F0F\u4E0D\u6B63\u786E: &#x{0};
-P-071 = \u975E\u6CD5 XML \u5B57\u7B26: &#x{0};
-P-072 = \u5B57\u7B26\u6570\u636E\u4E0D\u80FD\u62E5\u6709 "]]>"
-# Character data section starts with "<![CDATA[" and is terminated with "]]>" with text in between. No change needed.
-P-073 = \u89E3\u6790 <![CDATA[ \u90E8\u5206\u65F6\u9047\u5230 EOF
-P-074 = \u975E\u6CD5 Unicode \u4EE3\u7406\u5BF9: &#x{0}; &#x{1};
-P-075 = \u4E0D\u652F\u6301\u7684\u7F16\u7801: "{0}" (\u884C\u53F7\u53EF\u80FD\u592A\u5C0F)
-P-076 = \u5B57\u7B26\u8F6C\u6362\u9519\u8BEF: "{0}" (\u884C\u53F7\u53EF\u80FD\u592A\u5C0F)
-P-077 = \u8D85\u8FC7\u4E86\u7B26\u53F7\u7684\u6700\u5927\u957F\u5EA6 ({0} \u4E2A\u5B57\u7B26)
-P-078 = \u533A\u57DF\u8BBE\u7F6E "{0}" \u7684\u4EFB\u4F55\u6D88\u606F\u90FD\u4E0D\u53EF\u7528
-P-079 = \u4F4D\u4E8E\u5185\u5BB9\u5F00\u5934\u7684 "<{1}" \u4E0D\u662F\u5408\u6CD5\u6807\u8BB0\u3002\u4E5F\u8BB8 "{1}" (&#{0};) \u5B57\u7B26\u5E94\u8BE5\u662F\u4E2A\u5B57\u6BCD
-
-P-080 = \u5728\u5185\u90E8 DTD \u5B50\u96C6\u4E2D\u7684\u6807\u8BB0\u58F0\u660E\u5185, \u4E00\u5B9A\u4E0D\u8981\u51FA\u73B0\u53C2\u6570\u5B9E\u4F53\u5F15\u7528
-P-081 = \u4E0D\u5B8C\u6574\u7684 Unicode \u4EE3\u7406\u5BF9: &#x{0}
-
-P-082 = \u5C1D\u8BD5\u8BBF\u95EE\u7A7A\u5C5E\u6027
-P-083 = \u975E\u6CD5\u5806\u6808\u72B6\u6001
-P-084 = \u672A\u58F0\u660E\u5143\u7D20 "{0}" \u7684\u540D\u79F0\u7A7A\u95F4\u524D\u7F00
-P-085 = \u68C0\u6D4B\u5230 DTD
-P-086 = \u975E\u6CD5\u540D\u79F0\u7A7A\u95F4\u524D\u7F00 "{0}"; \u524D\u7F00 "xml" \u4E0D\u80FD\u7ED1\u5B9A\u5230\u9664\u5E38\u89C4\u540D\u79F0\u7A7A\u95F4\u4EE5\u5916\u7684\u4EFB\u4F55\u540D\u79F0\u7A7A\u95F4
-
-#
-# Validation messages, won't normally show up unless validation is
-# being performed. Note that V-022 relates to a spec bug: there
-# are both a WFC and VC on undefined PEs. If that's a WVC violation
-# there's no need for the VC, ever; and "standalone" would then affect
-# WF-ness. For the moment this assumes it's to be a VC not a WFC
-#
-V-000 = \u9A8C\u8BC1\u5DF2\u7981\u7528
-V-001 = \u6709\u6548\u6587\u6863\u5FC5\u987B\u62E5\u6709\u4E00\u4E2A <!DOCTYPE \u58F0\u660E
-V-002 = \u8BE5\u6587\u6863\u662F\u72EC\u7ACB\u7684, \u56E0\u6B64\u5B83\u4E0D\u80FD\u5F15\u7528 "&{0};"
-V-003 = \u672A\u58F0\u660E\u7684\u6CE8\u91CA "{0}" \u7531 <!ENTITY...> \u58F0\u660E\u4F7F\u7528
-V-004 = \u672A\u58F0\u660E\u7684\u6CE8\u91CA "{0}" \u7531 <!ATTLIST...> \u58F0\u660E\u4F7F\u7528
-V-005 = \u5143\u7D20\u7C7B\u578B "{0}" \u672A\u58F0\u660E
-V-006 = \u6839\u5143\u7D20\u7C7B\u578B\u4E3A "{0}", \u4F46\u58F0\u660E\u4E3A "{1}"
-V-007 = \u4E0D\u4E3A\u5143\u7D20 "{1}" \u58F0\u660E\u5C5E\u6027 "{0}"
-V-008 = \u5143\u7D20 "{1}" \u7684\u5C5E\u6027 "{0}" \u5FC5\u987B\u53EA\u62E5\u6709\u503C "{2}"
-# {0} - probably attribute name.
-V-009 = "{0}" \u7684\u5C5E\u6027\u503C\u4E3A #REQUIRED
-
-V-010 = \u6B64\u6587\u6863\u662F\u72EC\u7ACB\u7684, \u56E0\u6B64\u5C5E\u6027 "{0}" \u4E00\u5B9A\u4E0D\u8981\u8BBE\u7F6E\u4E3A\u9ED8\u8BA4\u503C
-V-011 = \u6B64\u6587\u6863\u662F\u72EC\u7ACB\u7684, \u56E0\u6B64\u5143\u7D20 "{0}" \u4E00\u5B9A\u4E0D\u8981\u6709\u53EF\u5FFD\u7565\u7684\u7A7A\u683C
-V-012 = \u5143\u7D20 "{0}" \u5DF2\u58F0\u660E
-V-013 = \u53C2\u6570\u5B9E\u4F53\u4E0D\u80FD\u5305\u542B\u90E8\u5206\u58F0\u660E
-# {0} - element name
-V-014 = "{0}" \u7684\u5185\u5BB9\u6A21\u578B\u4E2D\u7684\u53C2\u6570\u5B9E\u4F53\u5D4C\u5957\u9519\u8BEF
-V-015 = \u6DF7\u5408\u5185\u5BB9\u6A21\u578B\u91CD\u590D\u5143\u7D20 "{0}"
-V-016 = \u8BE5\u5143\u7D20\u5DF2\u62E5\u6709\u4E00\u4E2A ID \u5C5E\u6027 "{0}"
-V-017 = ID \u5C5E\u6027 "{0}" \u4E0D\u80FD\u4E3A #FIXED
-V-018 = ID \u5C5E\u6027 "{0}" \u4E0D\u80FD\u4E3A\u9ED8\u8BA4\u503C
-V-019 = \u8BE5\u6587\u6863\u662F\u72EC\u7ACB\u7684; \u8BE5\u5C5E\u6027\u5FC5\u987B\u9884\u89C4\u8303\u5316
-
-V-020 = \u53C2\u6570\u5B9E\u4F53\u4E0D\u80FD\u5305\u542B\u90E8\u5206\u6761\u4EF6 DTD \u90E8\u5206
-V-021 = \u53C2\u6570\u5B9E\u4F53\u4E0D\u80FD\u5305\u542B\u90E8\u5206\u6CE8\u91CA
-V-022 = \u5F15\u7528\u672A\u5B9A\u4E49\u7684\u53C2\u6570\u5B9E\u4F53 "%{0};"
-V-023 = \u8BE5\u6587\u6863\u662F\u72EC\u7ACB\u7684; \u7981\u6B62\u53EF\u5FFD\u7565\u7684 CDATA \u7A7A\u683C
-V-024 = \u4EFB\u4F55\u5143\u7D20\u90FD\u4E0D\u62E5\u6709\u503C\u4E3A "{0}" \u7684 ID \u5C5E\u6027
-V-025 = ID \u503C\u5FC5\u987B\u4E3A XML \u540D\u79F0; "{0}" \u4E0D\u662F\u4E00\u4E2A\u540D\u79F0
-V-026 = \u53E6\u4E00\u5143\u7D20\u5DF2\u62E5\u6709\u503C\u4E3A "{0}" \u7684 ID \u5C5E\u6027
-V-027 = IDREF/IDREFS \u503C\u5FC5\u987B\u4E3A XML \u540D\u79F0; "{0}" \u4E0D\u662F\u4E00\u4E2A\u540D\u79F0
-V-028 = NMTOKEN/NMTOKENS \u503C\u5FC5\u987B\u4E3A XML \u540D\u79F0\u6807\u8BB0; "{0}" \u4E0D\u662F\u540D\u79F0\u6807\u8BB0
-V-029 = \u503C "{0}" \u4E0D\u662F\u8BE5\u5C5E\u6027\u7684\u5176\u4E2D\u4E00\u4E2A\u679A\u4E3E\u503C
-
-V-030 = \u5C5E\u6027\u503C "{0}" \u4E0D\u547D\u540D\u6CE8\u91CA
-V-031 = \u5C5E\u6027\u503C "{0}" \u4E0D\u547D\u540D\u672A\u89E3\u6790\u7684\u5B9E\u4F53
-V-032 = NMTOKENS \u5C5E\u6027\u5FC5\u987B\u62E5\u6709\u81F3\u5C11\u4E00\u4E2A\u503C
-# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated.
-V-033 = EMPTY \u5185\u5BB9\u6A21\u578B\u4E0D\u80FD\u62E5\u6709\u5185\u5BB9
-# Usage not found. TODO Remove
-#V-034 = Element "{0}" does not allow "{1}" -- {2}
-# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed.
-V-035 = \u5143\u7D20 "{0}" \u4E0D\u5141\u8BB8\u8FDB\u4E00\u6B65\u8F93\u5165; \u4E0D\u5141\u8BB8 "{1}"
-# Usage not found. TODO Remove
-#V-036 = Element "{0}" does not allow "{1}" here
-V-037 = \u5143\u7D20 "{0}" \u4E0D\u5141\u8BB8\u6587\u672C
-V-038 = \u5143\u7D20 "{0}" \u9700\u8981\u9644\u52A0\u5143\u7D20
-V-039 = IDREFS \u5C5E\u6027\u5FC5\u987B\u62E5\u6709\u81F3\u5C11\u4E00\u4E2A\u503C
-
-V-040 = ENTITIES \u5C5E\u6027\u5FC5\u987B\u62E5\u6709\u81F3\u5C11\u4E00\u4E2A\u503C
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_TW.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_TW.properties
deleted file mode 100644
index 66c36d5e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_TW.properties
+++ /dev/null
@@ -1,284 +0,0 @@
-#
-# 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# English diagnostic messages (and fragments) for Sun's XML parser.
-#
-# P-NNN ... parser messages
-# F-NNN ... message fragments (sometimes associated with more
-# than one message, but usually just with one)
-# V-NNN ... validation related messages
-#
-# Most messages can be produced in only one way.
-#
-
-
-#
-# Generic parsing messages, not specific to validation
-#
-P-000 = \u7121\u5256\u6790\u5668\u8F38\u5165\u4F86\u6E90!
-P-001 = \u6587\u4EF6\u7D50\u5C3E\u7684\u5B57\u5143\u7121\u6548, &#x{0};
-P-002 = \u5BE6\u9AD4 "&{0};" \u64F4\u5145\u7684\u683C\u5F0F\u4E0D\u6B63\u78BA
-P-003 = \u8F38\u5165\u63D0\u524D\u7D50\u675F
-# {0} - F000-F009, F011, F021.
-P-004 = \u907A\u6F0F\u7A7A\u767D\u5B57\u5143 {0}
-P-005 = \u53EA\u5141\u8A31\u7A7A\u767D\u5B57\u5143 {0}
-
- #
- # unadorned "missing whitespace", with P-004 only
- #
- # Concatenated with P-004 (P-004 + F000)
- F-000 = \u5143\u7D20\u540D\u7A31\u5BA3\u544A\u4E4B\u5F8C
- # Concatenated with P-004 (P-004 + F001)
- F-001 = \u5C6C\u6027\u540D\u7A31\u8207\u985E\u578B\u4E4B\u9593
- # Concatenated with P-004 (P-004 + F002)
- F-002 = NOTATION \u985E\u578B\u540D\u7A31\u4E4B\u5F8C
- # Concatenated with P-004 (P-004 + F003)
- F-003 = \u5C6C\u6027\u985E\u578B\u8207\u9810\u8A2D\u503C\u4E4B\u9593
- # Concatenated with P-004 (P-004 + F004)
- F-004 = #FIXED \u4E4B\u5F8C
- # Concatenated with P-004 (P-004 + F005)
- F-005 = <!ENTITY \u5BA3\u544A\u4E4B\u5F8C
- # Concatenated with P-004 (P-004 + F006)
- F-006 = \u53C3\u6578\u5BE6\u9AD4\u5BA3\u544A\u4E2D\u7684 % \u4E4B\u5F8C
- # Concatenated with P-004 (P-004 + F007)
- F-007 = \u5BE6\u9AD4\u540D\u7A31\u4E4B\u5F8C
- # Concatenated with P-004 (P-004 + F008)
- F-008 = SYSTEM \u5E38\u503C URI \u4E4B\u524D
- # Concatenated with P-004 (P-004 + F009)
- F-009 = PUBLIC \u95DC\u9375\u5B57\u4E4B\u5F8C
- # F-010 ... identifier can be reused
- # Concatenated with P-004 (P-004 + F011)
- F-011 = \u6A19\u8A18\u540D\u7A31\u4E4B\u5F8C
- # F-012 ... identifier can be reused
- # F-013 ... identifier can be reused
-
- #
- # in declaration, in "S Name", with P-004 and P-005
- #
- F-014 = <!DOCTYPE \u5BA3\u544A\u4E2D\u7684\u540D\u7A31\u4E4B\u524D
- # Concatenated with P-005 (P-005 + F015)
- F-015 = <!ELEMENT \u5BA3\u544A\u4E2D\u7684\u540D\u7A31\u4E4B\u524D
- # Concatenated with P-005 (P-005 + F016)
- F-016 = <!ATTLIST \u5BA3\u544A\u4E2D\u7684\u540D\u7A31\u4E4B\u524D
- # Concatenated with P-005 (P-005 + F017)
- F-017 = <!ENTITY \u5BA3\u544A\u4E2D\u7684\u540D\u7A31\u4E4B\u524D
- # Concatenated with P-005 (P-005 + F018)
- F-018 = <!ENTITY \u5BA3\u544A\u4E2D\u7684 NDATA \u6A19\u8A18\u540D\u7A31\u4E4B\u524D
- # Concatenated with P-005 (P-005 + F019)
- F-019 = <!NOTATION \u5BA3\u544A\u4E2D\u7684\u540D\u7A31\u4E4B\u524D
-
-# {0} - character
-P-006 = \u540D\u7A31\u8A18\u865F\u4E0D\u5F97\u4EE5 "{0}" \u5B57\u5143\u958B\u982D
-P-007 = \u5FC5\u9808\u62EC\u4F4F\u503C
-# {0} - character, {1} - F020-F023, F028-F032, {2} - xml entity name e.g.: Next character must be ">" terminating <!ENTITY...> declaration "%HTML.Version"
-P-008 = \u4E0B\u4E00\u500B\u5B57\u5143\u5FC5\u9808\u70BA "{0}" {1} {2}
-
- # Concatenated with P-008 (P-008 + F020)
- F-020 = \u6B63\u5728\u7D42\u6B62\u5BE6\u9AD4\u7684\u53C3\u7167
- # Concatenated with P-008 (P-008 + F021)
- F-021 = \u6B63\u5728\u7D42\u6B62\u53C3\u6578\u5BE6\u9AD4\u7684\u53C3\u7167
- # Concatenated with P-008 (P-008 + F022)
- F-022 = \u6B63\u5728\u7D42\u6B62\u8A3B\u89E3
- # Concatenated with P-008 (P-008 + F023)
- F-023 = \u5728 XML \u5BA3\u544A\u4E2D
- # Concatenated with P-008 (P-008 + F024)
- F-024 = \u6B63\u5728\u7D42\u6B62\u5167\u90E8 DTD \u5B50\u96C6
- # Concatenated with P-008 (P-008 + F025)
- F-025 = \u6B63\u5728\u7D42\u6B62 <!DOCTYPE ...> \u5BA3\u544A
- # Concatenated with P-008 (P-008 + F026)
- F-026 = \u5C6C\u6027\u540D\u7A31\u4E4B\u5F8C
- # Concatenated with P-008 (P-008 + F027)
- F-027 = \u6B63\u5728\u7D42\u6B62\u5143\u7D20
- # Concatenated with P-008 (P-008 + F028)
- F-028 = \u6B63\u5728\u555F\u52D5\u5143\u7D20\u7684\u5167\u5BB9\u6A21\u578B
- # Concatenated with P-008 (P-008 + F029)
- F-029 = \u6B63\u5728\u555F\u52D5\u5C6C\u6027 NOTATIONS \u7684\u6E05\u55AE
- # Concatenated with P-008 (P-008 + F030)
- F-030 = \u6B63\u5728\u958B\u59CB\u689D\u4EF6 DTD \u5B50\u96C6
- # Concatenated with P-008 (P-008 + F031)
- F-031 = \u6B63\u5728\u7D42\u6B62 <!ENTITY ...> \u5BA3\u544A
- # Concatenated with P-008 (P-008 + F032)
- F-032 = \u6B63\u5728\u7D42\u6B62 <!NOTATION ...> \u5BA3\u544A
-
-P-009 = \u7121\u6548\u7684\u5B57\u5143\u6216\u5BE6\u9AD4\u53C3\u7167\u8A9E\u6CD5
-
-P-010 = \u53EA\u6709\u5916\u90E8\u53C3\u6578\u5BE6\u9AD4\u53EF\u5728\u5BE6\u9AD4\u503C\u4E2D\u4F7F\u7528 "%{0};"
-P-011 = \u7121\u6548\u7684\u53C3\u6578\u5BE6\u9AD4\u53C3\u7167\u8A9E\u6CD5
-P-012 = \u5C6C\u6027\u503C\u4E2D\u8981\u4F7F\u7528 "&lt;" \u505A\u70BA "<"
-P-013 = \u5C6C\u6027\u4E2D\u5916\u90E8\u5BE6\u9AD4 "&{0};" \u7684\u53C3\u7167\u7121\u6548
-P-014 = \u672A\u5B9A\u7FA9\u5BE6\u9AD4 "&{0};" \u7684\u53C3\u7167
-# {0} - F033-F035
-P-015 = \u62EC\u4F4F\u7684\u503C\u61C9\u70BA {0}
-
- # Concatenated with P-015 (P-015 + F033)
- F-033 = PUBLIC ID
- # Concatenated with P-015 (P-015 + F034)
- F-034 = SYSTEM ID
- # {0} - attribute name. Concatenated with P-015 (P-015 + F033)
- F-035 = \u5C6C\u6027\u503C {0}
-
-P-016 = PUBLIC ID "{0}" \u4E2D\u7684\u5B57\u5143\u7121\u6548
-P-017 = \u8655\u7406\u8A3B\u89E3\u6642\u5BE6\u9AD4\u7D50\u675F
-P-018 = \u907A\u6F0F\u8655\u7406\u6307\u793A\u76EE\u6A19
-P-019 = XML \u5BA3\u544A\u53EF\u80FD\u53EA\u6703\u958B\u59CB\u5BE6\u9AD4
-
-P-020 = \u7121\u6548\u7684\u8655\u7406\u6307\u793A\u76EE\u6A19: "{0}"
-P-021 = \u8F38\u5165\u5728\u8655\u7406\u6307\u793A\u5167\u7D50\u675F
-P-022 = \u8655\u7406\u6307\u793A\u540D\u7A31\u7121\u6548, \u6216\u907A\u6F0F\u7A7A\u767D\u5B57\u5143
-P-023 = XML \u5BA3\u544A\u7D50\u5C3E\u7684\u5B57\u5143 "&#x{0};" ({1}) \u7121\u6548
-P-024 = \u9810\u671F\u70BA "{0}=..."
-P-025 = \u61C9\u5BA3\u544A XML \u7248\u672C "{0}"
-P-026 = \u7121\u6548\u7684 XML \u7248\u672C\u5B57\u4E32 "{0}"
-P-027 = \u8B58\u5225\u70BA XML \u7248\u672C "{0}", \u800C\u4E0D\u662F "{1}"
-P-028 = \u5167\u90E8 DTD \u5B50\u96C6\u4E0D\u5F97\u6709 "<![..." \u7684\u5EFA\u69CB
-P-029 = \u7368\u7ACB\u5BA3\u544A\u5FC5\u9808\u70BA "yes" \u6216 "no", \u800C\u4E0D\u662F "{0}"
-
-P-030 = \u5C6C\u6027\u4E4B\u524D\u9700\u8981\u6709\u7A7A\u767D\u5B57\u5143
-P-031 = \u5C6C\u6027\u540D\u7A31\u4E0D\u5F97\u4EE5 "{0}" \u5B57\u5143\u958B\u982D
-P-032 = \u6B64\u6A19\u8A18\u4E2D\u5DF2\u51FA\u73FE\u5C6C\u6027 "{0}"
-P-033 = \u7121\u6548\u7684 xml:lang \u503C "{0}"
-P-034 = \u61C9\u70BA "</{0}>" \u624D\u80FD\u7D42\u6B62\u7B2C {1} \u884C\u4E0A\u555F\u52D5\u7684\u5143\u7D20
-P-035 = \u4E0D\u5141\u8A31\u7D50\u675F\u5BE6\u9AD4; \u907A\u6F0F\u7D50\u675F\u6A19\u8A18
-P-036 = ">" \u5FC5\u9808\u7D42\u6B62 <!ELEMENT {0} ...> \u5BA3\u544A, \u800C\u4E0D\u662F "{1}"
-P-037 = \u9806\u5E8F\u5167\u5BB9\u6A21\u578B\u4E0D\u5F97\u5305\u542B "{0}"
-P-038 = \u9078\u64C7\u5167\u5BB9\u6A21\u578B\u4E0D\u5F97\u5305\u542B "{0}"
-P-039 = \u5167\u5BB9\u6A21\u578B\u4E0D\u5F97\u5305\u542B "{0}"
-
-P-040 = \u5167\u5BB9\u6A21\u578B\u4E2D\u9700\u8981\u53F3\u62EC\u865F\u6216 "{1}", \u800C\u4E0D\u662F "{0}"
-P-041 = \u5167\u5BB9\u6A21\u578B\u4E2D\u9700\u8981\u53F3\u62EC\u865F\u3001"," \u6216 "|", \u800C\u4E0D\u662F "{0}"
-# {0} - element name, {1} - character as a hex number
-P-042 = "{0}" \u7684\u6DF7\u5408\u5167\u5BB9\u6A21\u578B\u7121\u6548, \u4E0B\u4E00\u500B\u5B57\u5143\u70BA &#x{1};
-# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*".
-P-043 = "{0}" \u7684\u6DF7\u5408\u5167\u5BB9\u6A21\u578B\u5FC5\u9808\u4EE5 ")*" \u7D50\u675F, \u800C\u4E0D\u662F "{1}"
-P-044 = \u61C9\u70BA\u5C6C\u6027\u5BA3\u544A\u6216 ">", \u800C\u4E0D\u662F "{0}"
-# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space"
-P-045 = \u5C6C\u6027 "{0}" \u7684\u985E\u578B (\u4EE5 "{1}" \u958B\u982D) \u7121\u6548
-P-046 = \u689D\u4EF6 DTD \u5340\u6BB5\u9700\u8981\u95DC\u9375\u5B57
-P-047 = \u672A\u7D42\u6B62\u7684\u689D\u4EF6 DTD \u5340\u6BB5
-P-048 = \u53EA\u5141\u8A31 INCLUDE \u8207 IGNORE, \u800C\u4E0D\u662F "{0}"
-P-049 = \u7121\u6548\u7684\u5341\u9032\u4F4D\u5B57\u5143\u53C3\u7167
-
-P-050 = \u7121\u6548\u7684\u5341\u516D\u9032\u4F4D\u5B57\u5143\u53C3\u7167
-P-051 = \u4E0D\u5408\u6CD5\u7684 XML \u5B57\u5143 &#x{0};
-P-052 = \u5167\u90E8\u5BE6\u9AD4 "&{0};" \u6709\u5B57\u5143\u5728\u5167\u5BB9\u4E4B\u5F8C
-P-053 = \u4E0D\u5F97\u5305\u542B\u5982 "&{0};" \u7B49\u7684\u672A\u5256\u6790\u5BE6\u9AD4
-P-054 = \u4F7F\u7528 "&{0};" \u7684\u539F\u59CB\u5BE6\u9AD4\u5B9A\u7FA9
-P-055 = \u6C92\u6709\u6587\u4EF6 URI \u7121\u6CD5\u89E3\u6790\u76F8\u5C0D URI "{0}";
-P-056 = URI "{0}" \u6709\u7247\u6BB5 ID
-P-057 = \u9700\u8981 "?>" \u4EE5\u7D42\u6B62 XML \u5BA3\u544A
-P-058 = \u5916\u90E8\u5BE6\u9AD4 "&{0};" \u6709\u5B57\u5143\u5728\u5167\u5BB9\u4E4B\u5F8C
-P-059 = \u5916\u90E8\u53C3\u6578\u5BE6\u9AD4 "%{0};" \u6709\u5B57\u5143\u5728\u6A19\u8A18\u4E4B\u5F8C
-
-P-060 = \u7DE8\u78BC\u540D\u7A31\u4E2D\u7684\u5B57\u5143 "{0}" \u7121\u6548
-P-061 = \u5BA3\u544A\u7684\u7DE8\u78BC "{0}" \u8207\u5BE6\u969B\u7684\u4E00\u500B\u7DE8\u78BC\u4E0D\u76F8\u7B26 "{1}"; \u9019\u53EF\u80FD\u4E0D\u662F\u4E00\u500B\u932F\u8AA4
-P-062 = \u6A19\u8A18\u5FC5\u9808\u70BA PUBLIC \u6216 SYSTEM
-P-063 = \u4F7F\u7528\u6A19\u8A18\u7684 "{0}" \u7684\u7B2C\u4E00\u500B\u5B9A\u7FA9
-P-064 = \u53C3\u6578\u5BE6\u9AD4 "%{0};" \u63D0\u524D\u7D50\u675F
-P-065 = \u5BE6\u9AD4\u89E3\u6790\u7A0B\u5F0F\u672A\u63D0\u4F9B SYSTEM ID; \u53EF\u80FD\u6703\u5F71\u97FF\u76F8\u5C0D URI
-# P-066 ... ID available
-P-067 = \u907A\u6F0F\u6587\u4EF6\u6839\u5143\u7D20
-P-068 = \u9700\u8981\u6A19\u8A18\u540D\u7A31
-P-069 = \u5BE6\u9AD4 "{0}" \u7684\u64F4\u5145\u70BA\u905E\u8FF4\u5F0F
-
-P-070 = \u4EE3\u7406\u5B57\u7D44 &#x{0}; \u7B2C\u4E8C\u90E8\u4EFD\u7684\u683C\u5F0F\u4E0D\u6B63\u78BA
-P-071 = \u7121\u6548\u7684 XML \u5B57\u5143: &#x{0};
-P-072 = \u5B57\u5143\u8CC7\u6599\u4E0D\u5F97\u6709 "]]>"
-# Character data section starts with "<![CDATA[" and is terminated with "]]>" with text in between. No change needed.
-P-073 = \u5256\u6790 <![CDATA[ \u5340\u6BB5\u6642\u767C\u751F EOF
-P-074 = \u4E0D\u5408\u6CD5\u7684 Unicode \u4EE3\u7406\u5B57\u7D44: &#x{0}; &#x{1};
-P-075 = \u4E0D\u652F\u63F4\u7684\u7DE8\u78BC: "{0}" (\u884C\u865F\u53EF\u80FD\u592A\u4F4E)
-P-076 = \u5B57\u5143\u8F49\u63DB\u932F\u8AA4: "{0}" (\u884C\u865F\u53EF\u80FD\u592A\u4F4E)
-P-077 = \u8D85\u904E\u6700\u5927\u7B26\u865F\u9577\u5EA6 ({0} \u500B\u5B57\u5143)
-P-078 = \u5340\u57DF\u8A2D\u5B9A "{0}" \u6C92\u6709\u53EF\u7528\u7684\u8A0A\u606F
-P-079 = \u5167\u5BB9\u958B\u982D "<{1}" \u4E0D\u662F\u5408\u6CD5\u6A19\u8A18. \u4E5F\u8A31 "{1}" (&#{0};) \u5B57\u5143\u61C9\u8A72\u70BA\u5B57\u6BCD
-
-P-080 = \u53C3\u6578\u5BE6\u9AD4\u53C3\u7167\u4E0D\u5F97\u51FA\u73FE\u5728\u5167\u90E8 DTD \u5B50\u96C6\u7684\u6A19\u8A18\u5BA3\u544A\u4E2D
-P-081 = \u4E0D\u5B8C\u6574\u7684 Unicode \u4EE3\u7406\u5B57\u7D44: &#x{0}
-
-P-082 = \u6B63\u5728\u5617\u8A66\u5B58\u53D6\u7A7A\u503C\u7684\u5C6C\u6027
-P-083 = \u7121\u6548\u7684\u5806\u758A\u72C0\u614B
-P-084 = \u672A\u5BA3\u544A\u5143\u7D20 "{0}" \u7684\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC
-P-085 = \u5075\u6E2C\u5230 DTD
-P-086 = \u7121\u6548\u7684\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC "{0}"; \u524D\u7F6E\u78BC "xml" \u4E0D\u53EF\u9023\u7D50\u81F3\u5176\u4E00\u822C\u547D\u540D\u7A7A\u9593\u4EE5\u5916\u7684\u4EFB\u4F55\u547D\u540D\u7A7A\u9593
-
-#
-# Validation messages, won't normally show up unless validation is
-# being performed. Note that V-022 relates to a spec bug: there
-# are both a WFC and VC on undefined PEs. If that's a WVC violation
-# there's no need for the VC, ever; and "standalone" would then affect
-# WF-ness. For the moment this assumes it's to be a VC not a WFC
-#
-V-000 = \u9A57\u8B49\u5DF2\u505C\u7528
-V-001 = \u6709\u6548\u7684\u6587\u4EF6\u5FC5\u9808\u6709 <!DOCTYPE \u5BA3\u544A
-V-002 = \u6B64\u70BA\u7368\u7ACB\u6587\u4EF6, \u56E0\u6B64\u4E0D\u5F97\u53C3\u7167 "&{0};"
-V-003 = \u672A\u5BA3\u544A\u7684\u6A19\u8A18 "{0}" \u662F\u7531 <!ENTITY...> \u5BA3\u544A\u4F7F\u7528
-V-004 = \u672A\u5BA3\u544A\u7684\u6A19\u8A18 "{0}" \u662F\u7531 <!ATTLIST...> \u5BA3\u544A\u4F7F\u7528
-V-005 = \u672A\u5BA3\u544A\u5143\u7D20\u985E\u578B "{0}"
-V-006 = \u6839\u5143\u7D20\u985E\u578B\u70BA "{0}", \u4F46\u5BA3\u544A\u70BA "{1}"
-V-007 = \u672A\u5BA3\u544A\u5143\u7D20 "{1}" \u7684\u5C6C\u6027 "{0}"
-V-008 = \u5143\u7D20 "{1}" \u7684\u5C6C\u6027 "{0}" \u5FC5\u9808\u53EA\u6709\u503C "{2}"
-# {0} - probably attribute name.
-V-009 = "{0}" \u7684\u5C6C\u6027\u503C\u70BA #REQUIRED
-
-V-010 = \u6B64\u6587\u4EF6\u662F\u7368\u7ACB\u7684, \u56E0\u6B64\u4E0D\u80FD\u9810\u8A2D\u5C6C\u6027 "{0}"
-V-011 = \u6B64\u6587\u4EF6\u662F\u7368\u7ACB\u7684, \u56E0\u6B64\u5143\u7D20 "{0}" \u4E0D\u5F97\u5305\u542B\u53EF\u5FFD\u7565\u7684\u7A7A\u767D\u5B57\u5143
-V-012 = \u5DF2\u5BA3\u544A\u5143\u7D20 "{0}"
-V-013 = \u53C3\u6578\u5BE6\u9AD4\u4E0D\u5F97\u5305\u542B\u90E8\u4EFD\u5BA3\u544A
-# {0} - element name
-V-014 = "{0}" \u7684\u5167\u5BB9\u6A21\u578B\u4E2D\u6709\u53C3\u6578\u5BE6\u9AD4\u5DE2\u72C0\u932F\u8AA4
-V-015 = \u6DF7\u5408\u5167\u5BB9\u6A21\u578B\u91CD\u8907\u4E86\u5143\u7D20 "{0}"
-V-016 = \u6B64\u5143\u7D20\u5DF2\u6709 ID \u5C6C\u6027 "{0}"
-V-017 = ID \u5C6C\u6027 "{0}" \u4E0D\u5F97\u70BA #FIXED
-V-018 = ID \u5C6C\u6027 "{0}" \u4E0D\u5F97\u8A2D\u5B9A\u9810\u8A2D\u503C
-V-019 = \u6B64\u70BA\u7368\u7ACB\u6587\u4EF6; \u6B64\u5C6C\u6027\u9700\u8981\u9810\u5148\u6A19\u6E96\u5316
-
-V-020 = \u53C3\u6578\u5BE6\u9AD4\u4E0D\u5F97\u5305\u542B\u90E8\u4EFD\u689D\u4EF6 DTD \u5340\u6BB5
-V-021 = \u53C3\u6578\u5BE6\u9AD4\u4E0D\u5F97\u5305\u542B\u90E8\u4EFD\u8A3B\u89E3
-V-022 = \u672A\u5B9A\u7FA9\u53C3\u6578\u5BE6\u9AD4 "%{0};" \u7684\u53C3\u7167
-V-023 = \u6B64\u70BA\u7368\u7ACB\u6587\u4EF6; \u7981\u6B62\u6B64\u7A2E\u53EF\u5FFD\u7565\u7684 CDATA \u7A7A\u767D\u5B57\u5143
-V-024 = \u6C92\u6709 ID \u5C6C\u6027\u503C\u70BA "{0}" \u7684\u5143\u7D20
-V-025 = ID \u503C\u5FC5\u9808\u70BA XML \u540D\u7A31; "{0}" \u4E0D\u662F\u540D\u7A31
-V-026 = \u5DF2\u6709\u5176\u4ED6\u5143\u7D20\u7684 ID \u5C6C\u6027\u503C\u70BA "{0}"
-V-027 = IDREF/IDREFS \u503C\u5FC5\u9808\u70BA XML \u540D\u7A31; "{0}" \u4E0D\u662F\u540D\u7A31
-V-028 = NMTOKEN/NMTOKENS \u503C\u5FC5\u9808\u70BA XML \u540D\u7A31\u8A18\u865F; "{0}" \u4E0D\u662F\u8A18\u865F
-V-029 = \u503C "{0}" \u4E0D\u662F\u6B64\u5C6C\u6027\u7684\u5176\u4E2D\u4E00\u500B\u5217\u8209\u503C
-
-V-030 = \u5C6C\u6027\u503C "{0}" \u4E0D\u6703\u547D\u540D\u6A19\u8A18
-V-031 = \u5C6C\u6027\u503C "{0}" \u4E0D\u6703\u547D\u540D\u672A\u5256\u6790\u7684\u5BE6\u9AD4
-V-032 = NMTOKENS \u5C6C\u6027\u5FC5\u9808\u81F3\u5C11\u6709\u4E00\u500B\u503C
-# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated.
-V-033 = EMPTY \u5167\u5BB9\u6A21\u578B\u4E0D\u5F97\u6709\u4EFB\u4F55\u5167\u5BB9
-# Usage not found. TODO Remove
-#V-034 = Element "{0}" does not allow "{1}" -- {2}
-# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed.
-V-035 = \u5143\u7D20 "{0}" \u4E0D\u5141\u8A31\u5176\u4ED6\u8F38\u5165; \u4E0D\u5141\u8A31 "{1}"
-# Usage not found. TODO Remove
-#V-036 = Element "{0}" does not allow "{1}" here
-V-037 = \u5143\u7D20 "{0}" \u4E0D\u5141\u8A31\u6587\u5B57
-V-038 = \u5143\u7D20 "{0}" \u9700\u8981\u5176\u4ED6\u5143\u7D20
-V-039 = IDREFS \u5C6C\u6027\u5FC5\u9808\u81F3\u5C11\u6709\u4E00\u500B\u503C
-
-V-040 = ENTITIES \u5C6C\u6027\u5FC5\u9808\u81F3\u5C11\u6709\u4E00\u500B\u503C
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties
deleted file mode 100644
index bcf70bfe..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright (c) 2012, 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.
-#
-
-build-id=2.2.9-b130926.1035
-build-version=JAX-WS RI 2.2.9-b130926.1035
-major-version=2.2.9
-svn-revision=5f6196f2b90e9460065a4c2f4e30e065b245e51e
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/CDATA.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/CDATA.java
deleted file mode 100644
index 37b52c01..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/CDATA.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util.xml;
-
-/**
- * @author WS Development Team
- */
-public final class CDATA {
-
- public CDATA(String text) {
- _text = text;
- }
-
- public String getText() {
- return _text;
- }
-
- public boolean equals(Object obj) {
- if (obj == null)
- return false;
-
- if (!(obj instanceof CDATA))
- return false;
-
- CDATA cdata = (CDATA) obj;
-
- return this._text.equals(cdata._text);
- }
-
- public int hashCode() {
- return _text.hashCode();
- }
-
- private String _text;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContentHandlerToXMLStreamWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContentHandlerToXMLStreamWriter.java
deleted file mode 100644
index 85a72218..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContentHandlerToXMLStreamWriter.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util.xml;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import java.util.Stack;
-
-/**
- * This is a simple utility class that adapts SAX events into StAX
- * {@link XMLStreamWriter} events, bridging between
- * the two parser technologies.
- *
- * This ContentHandler does not own the XMLStreamWriter. Therefore, it will
- * not close or flush the writer at any point.
- *
- * @author Ryan.Shoemaker@Sun.COM
- * @version 1.0
- */
-public class ContentHandlerToXMLStreamWriter extends DefaultHandler {
-
- // SAX events will be sent to this XMLStreamWriter
- private final XMLStreamWriter staxWriter;
-
- // storage for prefix bindings
- private final Stack prefixBindings;
-
- public ContentHandlerToXMLStreamWriter(XMLStreamWriter staxCore) {
- this.staxWriter = staxCore;
- prefixBindings = new Stack(); // default of 10 seems reasonable
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ContentHandler#endDocument()
- */
- public void endDocument() throws SAXException {
- try {
- staxWriter.writeEndDocument();
- staxWriter.flush();
- } catch (XMLStreamException e) {
- throw new SAXException(e);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ContentHandler#startDocument()
- */
- public void startDocument() throws SAXException {
- try {
- staxWriter.writeStartDocument();
- } catch (XMLStreamException e) {
- throw new SAXException(e);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ContentHandler#characters(char[], int, int)
- */
- public void characters(char[] ch, int start, int length)
- throws SAXException {
-
- try {
- staxWriter.writeCharacters(ch, start, length);
- } catch (XMLStreamException e) {
- throw new SAXException(e);
- }
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
- */
- public void ignorableWhitespace(char[] ch, int start, int length)
- throws SAXException {
-
- characters(ch,start,length);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ContentHandler#endPrefixMapping(java.lang.String)
- */
- public void endPrefixMapping(String prefix) throws SAXException {
- // TODO: no-op?
-
- // I think we can ignore these SAX events because StAX
- // automatically scopes the prefix bindings.
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ContentHandler#skippedEntity(java.lang.String)
- */
- public void skippedEntity(String name) throws SAXException {
- try {
- staxWriter.writeEntityRef(name);
- } catch (XMLStreamException e) {
- throw new SAXException(e);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ContentHandler#setDocumentLocator(org.xml.sax.Locator)
- */
- public void setDocumentLocator(Locator locator) {
- // TODO: no-op?
- // there doesn't seem to be any way to pass location info
- // along to the XMLStreamWriter. On the XMLEventWriter side, you
- // can set the location info on the event objects.
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ContentHandler#processingInstruction(java.lang.String,
- * java.lang.String)
- */
- public void processingInstruction(String target, String data)
- throws SAXException {
-
- try {
- staxWriter.writeProcessingInstruction(target, data);
- } catch (XMLStreamException e) {
- throw new SAXException(e);
- }
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ContentHandler#startPrefixMapping(java.lang.String,
- * java.lang.String)
- */
- public void startPrefixMapping(String prefix, String uri)
- throws SAXException {
-
- // defend against parsers that pass null in for "xmlns" prefix
- if (prefix == null) {
- prefix = "";
- }
-
- if (prefix.equals("xml")) {
- return;
- }
-
- prefixBindings.add(prefix);
- prefixBindings.add(uri);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ContentHandler#endElement(java.lang.String,
- * java.lang.String, java.lang.String)
- */
- public void endElement(String namespaceURI, String localName, String qName)
- throws SAXException {
-
- try {
- // TODO: is this all we have to do?
- staxWriter.writeEndElement();
- } catch (XMLStreamException e) {
- throw new SAXException(e);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ContentHandler#startElement(java.lang.String,
- * java.lang.String, java.lang.String, org.xml.sax.Attributes)
- */
- public void startElement(
- String namespaceURI,
- String localName,
- String qName,
- Attributes atts)
- throws SAXException {
-
- try {
- staxWriter.writeStartElement(
- getPrefix(qName),
- localName,
- namespaceURI);
-
- String uri, prefix;
- while (prefixBindings.size() != 0) {
- uri = (String)prefixBindings.pop();
- prefix = (String)prefixBindings.pop();
- if (prefix.length() == 0) {
- staxWriter.setDefaultNamespace(uri);
- } else {
- staxWriter.setPrefix(prefix, uri);
- }
-
- // this method handles "", null, and "xmlns" prefixes properly
- staxWriter.writeNamespace(prefix, uri);
- }
-
- writeAttributes(atts);
- } catch (XMLStreamException e) {
- throw new SAXException(e);
- }
-
- }
-
- /**
- * Generate a StAX writeAttribute event for each attribute
- *
- * @param atts
- * attributes from the SAX event
- */
- private void writeAttributes(Attributes atts) throws XMLStreamException {
- for (int i = 0; i < atts.getLength(); i++) {
- final String prefix = getPrefix(atts.getQName(i));
- if(!prefix.equals("xmlns")) { // defend againts broken transformers that report xmlns decls as attrs
- staxWriter.writeAttribute(
- prefix,
- atts.getURI(i),
- atts.getLocalName(i),
- atts.getValue(i));
- }
- }
- }
-
- /**
- * Pull the prefix off of the specified QName.
- *
- * @param qName
- * the QName
- * @return the prefix or the empty string if it doesn't exist.
- */
- private String getPrefix(String qName) {
- int idx = qName.indexOf(':');
- if (idx == -1) {
- return "";
- } else {
- return qName.substring(0, idx);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java
deleted file mode 100644
index 38f246b2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.util.xml;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-import java.util.WeakHashMap;
-
-/**
- * Simple utility ensuring that the value is cached only in case it is non-internal implementation
- */
-abstract class ContextClassloaderLocal<V> {
-
- private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
-
- private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<ClassLoader, V>();
-
- public V get() throws Error {
- ClassLoader tccl = getContextClassLoader();
- V instance = CACHE.get(tccl);
- if (instance == null) {
- instance = createNewInstance();
- CACHE.put(tccl, instance);
- }
- return instance;
- }
-
- public void set(V instance) {
- CACHE.put(getContextClassLoader(), instance);
- }
-
- protected abstract V initialValue() throws Exception;
-
- private V createNewInstance() {
- try {
- return initialValue();
- } catch (Exception e) {
- throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e);
- }
- }
-
- private static String format(String property, Object... args) {
- String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property);
- return MessageFormat.format(text, args);
- }
-
- private static ClassLoader getContextClassLoader() {
- return (ClassLoader)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- ClassLoader cl = null;
- try {
- cl = Thread.currentThread().getContextClassLoader();
- } catch (SecurityException ex) {
- }
- return cl;
- }
- });
- }
-}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties
deleted file mode 100644
index a15e12e0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContextClassloaderLocal.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-# Error messages for StaticCache utility class
-FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/DummyLocation.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/DummyLocation.java
deleted file mode 100644
index fe14ae23..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/DummyLocation.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util.xml;
-
-import javax.xml.stream.Location;
-
-/**
- * {@link Location} that returns no info.
- *
- * @author Santiago.PericasGeertsen@sun.com
- */
-public final class DummyLocation implements Location {
- private DummyLocation() {}
-
- public static final Location INSTANCE = new DummyLocation();
-
- public int getCharacterOffset() {
- return -1;
- }
- public int getColumnNumber() {
- return -1;
- }
- public int getLineNumber() {
- return -1;
- }
- public String getPublicId() {
- return null;
- }
- public String getSystemId() {
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NamedNodeMapIterator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NamedNodeMapIterator.java
deleted file mode 100644
index d39b6180..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NamedNodeMapIterator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util.xml;
-
-import java.util.Iterator;
-
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * @author WS Development Team
- */
-public class NamedNodeMapIterator implements Iterator {
-
- protected NamedNodeMap _map;
- protected int _index;
-
- public NamedNodeMapIterator(NamedNodeMap map) {
- _map = map;
- _index = 0;
- }
-
- public boolean hasNext() {
- if (_map == null)
- return false;
- return _index < _map.getLength();
- }
-
- public Object next() {
- Object obj = _map.item(_index);
- if (obj != null)
- ++_index;
- return obj;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NamespaceContextExAdaper.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NamespaceContextExAdaper.java
deleted file mode 100644
index b3c18f8e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NamespaceContextExAdaper.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.util.xml;
-
-import java.util.Iterator;
-
-import javax.xml.namespace.NamespaceContext;
-
-import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx;
-
-public class NamespaceContextExAdaper implements NamespaceContextEx {
-
- private final NamespaceContext nsContext;
-
- public NamespaceContextExAdaper(NamespaceContext nsContext) {
- this.nsContext = nsContext;
- }
-
- @Override //Who wants this?
- public Iterator<Binding> iterator() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String getNamespaceURI(String prefix) {
- return nsContext.getNamespaceURI(prefix);
- }
-
- @Override
- public String getPrefix(String namespaceURI) {
- return nsContext.getPrefix(namespaceURI);
- }
-
- @Override
- public Iterator getPrefixes(String namespaceURI) {
- return nsContext.getPrefixes(namespaceURI);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NodeListIterator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NodeListIterator.java
deleted file mode 100644
index 4d816dec..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NodeListIterator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util.xml;
-
-import java.util.Iterator;
-
-import org.w3c.dom.NodeList;
-
-/**
- * @author WS Development Team
- */
-public class NodeListIterator implements Iterator {
-
- protected NodeList _list;
- protected int _index;
-
- public NodeListIterator(NodeList list) {
- _list = list;
- _index = 0;
- }
-
- public boolean hasNext() {
- if (_list == null)
- return false;
- return _index < _list.getLength();
- }
-
- public Object next() {
- Object obj = _list.item(_index);
- if (obj != null)
- ++_index;
- return obj;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXResult.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXResult.java
deleted file mode 100644
index a7e6a31d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXResult.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util.xml;
-
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.sax.SAXResult;
-
-/**
- * A JAXP {@link javax.xml.transform.Result} implementation that produces
- * a result on the specified {@link javax.xml.stream.XMLStreamWriter} or
- * {@link javax.xml.stream.XMLEventWriter}.
- *
- * <p>
- * Please note that you may need to call flush() on the underlying
- * XMLStreamWriter or XMLEventWriter after the transform is complete.
- * <p>
- *
- * The fact that JAXBResult derives from SAXResult is an implementation
- * detail. Thus in general applications are strongly discouraged from
- * accessing methods defined on SAXResult.
- *
- * <p>
- * In particular it shall never attempt to call the following methods:
- *
- * <ul>
- * <li>setHandler</li>
- * <li>setLexicalHandler</li>
- * <li>setSystemId</li>
- * </ul>
- *
- * <p>
- * Example:
- *
- * <pre>
- // create a DOMSource
- Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(...);
- Source domSource = new DOMSource(doc);
-
- // create a StAXResult
- XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
- Result staxResult = new StAXResult(writer);
-
- // run the transform
- TransformerFactory.newInstance().newTransformer().transform(domSource, staxResult);
- * </pre>
- *
- * @author Ryan.Shoemaker@Sun.COM
- * @version 1.0
- */
-public class StAXResult extends SAXResult {
-
- /**
- * Create a new {@link javax.xml.transform.Result} that produces
- * a result on the specified {@link javax.xml.stream.XMLStreamWriter}
- *
- * @param writer the XMLStreamWriter
- * @throws IllegalArgumentException iff the writer is null
- */
- public StAXResult(XMLStreamWriter writer) {
- if( writer == null ) {
- throw new IllegalArgumentException();
- }
-
- super.setHandler(new ContentHandlerToXMLStreamWriter( writer ));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXSource.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXSource.java
deleted file mode 100644
index d3a3293c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXSource.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.util.xml;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.SAXParseException2;
-import com.sun.istack.internal.XMLStreamReaderToContentHandler;
-import org.xml.sax.*;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.transform.sax.SAXSource;
-
-/**
- * A JAXP {@link javax.xml.transform.Source} implementation that wraps
- * the specified {@link javax.xml.stream.XMLStreamReader} or
- * {@link javax.xml.stream.XMLEventReader} for use by applications that
- * expect a {@link javax.xml.transform.Source}.
- *
- * <p>
- * The fact that StAXSource derives from SAXSource is an implementation
- * detail. Thus in general applications are strongly discouraged from
- * accessing methods defined on SAXSource. In particular:
- *
- * <ul>
- * <li> The setXMLReader and setInputSource methods shall never be called.</li>
- * <li> The XMLReader object obtained by the getXMLReader method shall
- * be used only for parsing the InputSource object returned by
- * the getInputSource method.</li>
- * <li> The InputSource object obtained by the getInputSource method shall
- * be used only for being parsed by the XMLReader object returned by
- * the getXMLReader method.</li>
- * </ul>
- *
- * <p>
- * Example:
- *
- * <pre>
- // create a StAXSource
- XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(args[0]));
- Source staxSource = new StAXSource(reader);
-
- // create a StreamResult
- Result streamResult = new StreamResult(System.out);
-
- // run the transform
- TransformerFactory.newInstance().newTransformer().transform(staxSource, streamResult);
- * </pre>
- *
- * @author Ryan.Shoemaker@Sun.COM
- * @version 1.0
- */
-public class StAXSource extends SAXSource {
-
- // StAX to SAX converter that will read from StAX and produce SAX
- // this object will be wrapped by the XMLReader exposed to the client
- private final XMLStreamReaderToContentHandler reader;
-
- private final XMLStreamReader staxReader;
-
- // SAX allows ContentHandler to be changed during the parsing,
- // but JAXB doesn't. So this repeater will sit between those
- // two components.
- private final XMLFilterImpl repeater = new XMLFilterImpl();
-
- // this object will pretend as an XMLReader.
- // no matter what parameter is specified to the parse method,
- // it will just read from the StAX reader.
- private final XMLReader pseudoParser = new XMLReader() {
-
- @Override
- public boolean getFeature(String name) throws SAXNotRecognizedException {
- throw new SAXNotRecognizedException(name);
- }
-
- @Override
- public void setFeature(String name, boolean value) throws SAXNotRecognizedException {
- // Should support these two features according to XMLReader javadoc.
- if (name.equals("http://xml.org/sax/features/namespaces") && value) {
- // Ignore for now
- } else if (name.equals("http://xml.org/sax/features/namespace-prefixes") && !value) {
- // Ignore for now
- } else {
- throw new SAXNotRecognizedException(name);
- }
- }
-
- @Override
- public Object getProperty(String name) throws SAXNotRecognizedException {
- if( "http://xml.org/sax/properties/lexical-handler".equals(name) ) {
- return lexicalHandler;
- }
- throw new SAXNotRecognizedException(name);
- }
-
- @Override
- public void setProperty(String name, Object value) throws SAXNotRecognizedException {
- if( "http://xml.org/sax/properties/lexical-handler".equals(name) ) {
- this.lexicalHandler = (LexicalHandler)value;
- return;
- }
- throw new SAXNotRecognizedException(name);
- }
-
- private LexicalHandler lexicalHandler;
-
- // we will store this value but never use it by ourselves.
- private EntityResolver entityResolver;
-
- @Override
- public void setEntityResolver(EntityResolver resolver) {
- this.entityResolver = resolver;
- }
-
- @Override
- public EntityResolver getEntityResolver() {
- return entityResolver;
- }
-
- private DTDHandler dtdHandler;
-
- @Override
- public void setDTDHandler(DTDHandler handler) {
- this.dtdHandler = handler;
- }
- @Override
- public DTDHandler getDTDHandler() {
- return dtdHandler;
- }
-
- @Override
- public void setContentHandler(ContentHandler handler) {
- repeater.setContentHandler(handler);
- }
-
- @Override
- public ContentHandler getContentHandler() {
- return repeater.getContentHandler();
- }
-
- private ErrorHandler errorHandler;
-
- @Override
- public void setErrorHandler(ErrorHandler handler) {
- this.errorHandler = handler;
- }
- @Override
- public ErrorHandler getErrorHandler() {
- return errorHandler;
- }
-
- @Override
- public void parse(InputSource input) throws SAXException {
- parse();
- }
-
- @Override
- public void parse(String systemId) throws SAXException {
- parse();
- }
-
- public void parse() throws SAXException {
- // parses from a StAX reader and generates SAX events which
- // go through the repeater and are forwarded to the appropriate
- // component
- try {
- reader.bridge();
- } catch( XMLStreamException e ) {
- // wrap it in a SAXException
- SAXParseException se =
- new SAXParseException2(
- e.getMessage(),
- null,
- null,
- e.getLocation() == null ? -1 : e.getLocation().getLineNumber(),
- e.getLocation() == null ? -1 : e.getLocation().getColumnNumber(),
- e);
-
- // if the consumer sets an error handler, it is our responsibility
- // to notify it.
- if(errorHandler!=null)
- errorHandler.fatalError(se);
-
- // this is a fatal error. Even if the error handler
- // returns, we will abort anyway.
- throw se;
-
- } finally {
- try {
- staxReader.close();
- } catch(XMLStreamException xe) {
- //falls through. Not much can be done.
- }
- }
- }
- };
-
- /**
- * Creates a new {@link javax.xml.transform.Source} for the given
- * {@link XMLStreamReader}.
- *
- * @param reader XMLStreamReader that will be exposed as a Source
- * @param eagerQuit if true, when the conversion is completed, leave the cursor to the last
- * event that was fired (such as end element)
- * @see #StAXSource(XMLStreamReader, boolean, String[])
- */
- public StAXSource(XMLStreamReader reader, boolean eagerQuit) {
- this(reader, eagerQuit, new String[0]);
- }
-
- /**
- * Creates a new {@link javax.xml.transform.Source} for the given
- * {@link XMLStreamReader}.
- *
- * The XMLStreamReader must be pointing at either a
- * {@link javax.xml.stream.XMLStreamConstants#START_DOCUMENT} or
- * {@link javax.xml.stream.XMLStreamConstants#START_ELEMENT} event.
- *
- * @param reader XMLStreamReader that will be exposed as a Source
- * @param eagerQuit if true, when the conversion is completed, leave the cursor to the last
- * event that was fired (such as end element)
- * @param inscope inscope Namespaces
- * array of the even length of the form { prefix0, uri0, prefix1, uri1, ... }
- * @throws IllegalArgumentException iff the reader is null
- * @throws IllegalStateException iff the reader is not pointing at either a
- * START_DOCUMENT or START_ELEMENT event
- */
- public StAXSource(XMLStreamReader reader, boolean eagerQuit, @NotNull String[] inscope) {
- if( reader == null )
- throw new IllegalArgumentException();
- this.staxReader = reader;
-
- int eventType = reader.getEventType();
- if (!(eventType == XMLStreamConstants.START_DOCUMENT)
- && !(eventType == XMLStreamConstants.START_ELEMENT)) {
- throw new IllegalStateException();
- }
-
- this.reader = new XMLStreamReaderToContentHandler(reader,repeater,eagerQuit,false,inscope);
-
- super.setXMLReader(pseudoParser);
- // pass a dummy InputSource. We don't care
- super.setInputSource(new InputSource());
- }
-
-// /**
-// * Creates a new {@link javax.xml.transform.Source} for the given
-// * {@link XMLEventReader}.
-// *
-// * The XMLEventReader must be pointing at either a
-// * {@link javax.xml.stream.XMLStreamConstants#START_DOCUMENT} or
-// * {@link javax.xml.stream.XMLStreamConstants#START_ELEMENT} event.
-// *
-// * @param reader XMLEventReader that will be exposed as a Source
-// * @throws IllegalArgumentException iff the reader is null
-// * @throws IllegalStateException iff the reader is not pointing at either a
-// * START_DOCUEMENT or START_ELEMENT event
-// */
-// public StAXSource(XMLEventReader reader) {
-// if( reader == null )
-// throw new IllegalArgumentException();
-//
-// // TODO: detect IllegalStateException for START_ELEMENT|DOCUMENT
-// // bugid 5046340 - peek not implemented
-// // XMLEvent event = staxEventReader.peek();
-//
-// this.reader =
-// new XMLEventReaderToContentHandler(
-// reader,
-// repeater);
-//
-// super.setXMLReader(pseudoParser);
-// // pass a dummy InputSource. We don't care
-// super.setInputSource(new InputSource());
-// }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLReaderComposite.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLReaderComposite.java
deleted file mode 100644
index 8d5ef1d4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLReaderComposite.java
+++ /dev/null
@@ -1,662 +0,0 @@
-/*
- * 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.util.xml;
-
-import java.util.Iterator;
-import java.util.List;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx;
-import com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx;
-
-import com.sun.xml.internal.ws.encoding.TagInfoset;
-
-/**
- * XMLReaderComposite
- *
- * @author shih-chang.chen@oracle.com
- */
-public class XMLReaderComposite implements XMLStreamReaderEx {
-
- static public enum State { StartTag, Payload, EndTag }
-
- protected State state = State.StartTag;
- protected ElemInfo elemInfo;
- protected TagInfoset tagInfo;
- protected XMLStreamReader[] children;
- protected int payloadIndex = -1;
- protected XMLStreamReader payloadReader;
-
- static public class ElemInfo implements NamespaceContext {
- ElemInfo ancestor;
- TagInfoset tagInfo;
- public ElemInfo(TagInfoset tag, ElemInfo parent) { tagInfo = tag; ancestor = parent; }
- public String getNamespaceURI(String prefix) {
- String n = tagInfo.getNamespaceURI(prefix);
- return (n != null) ? n : (ancestor != null) ? ancestor.getNamespaceURI(prefix) : null;
- }
- public String getPrefix(String uri) {
- String p = tagInfo.getPrefix(uri);
- return (p != null) ? p : (ancestor != null) ? ancestor.getPrefix(uri) : null;
- }
- //Who wants this?
- public List<String> allPrefixes(String namespaceURI) {
- List<String> l = tagInfo.allPrefixes(namespaceURI);
- if (ancestor != null) {
- List<String> p = ancestor.allPrefixes(namespaceURI);
- p.addAll(l);
- return p;
- }
- return l;
- }
- public Iterator<String> getPrefixes(String namespaceURI) {
- return allPrefixes(namespaceURI).iterator();
- }
- }
-
- public XMLReaderComposite(final ElemInfo elem, XMLStreamReader[] wrapees) {
- elemInfo = elem;
- tagInfo = elem.tagInfo;
- children = wrapees;
- if (children != null && children.length > 0) {
- payloadIndex = 0;
- payloadReader = children[payloadIndex];
- }
- }
-
-
- @Override
- public int next() throws XMLStreamException {
- switch (state) {
- case StartTag:
- if (payloadReader != null) {
- state = State.Payload;
- return payloadReader.getEventType();
- } else {
- state = State.EndTag;
- return XMLStreamReader.END_ELEMENT;
- }
- case EndTag: return XMLStreamReader.END_DOCUMENT;
- case Payload:
- default:
- int next = XMLStreamReader.END_DOCUMENT;
- if (payloadReader != null && payloadReader.hasNext()) {
- next = payloadReader.next();
- }
- if (next != XMLStreamReader.END_DOCUMENT) return next;
- else {
- if (payloadIndex+1 < children.length ) {
- payloadIndex++;
- payloadReader = children[payloadIndex];
- return payloadReader.getEventType();
- } else {
- state = State.EndTag;
- return XMLStreamReader.END_ELEMENT;
- }
- }
- }
- }
-
- @Override
- public boolean hasNext() throws XMLStreamException {
- switch (state) {
- case EndTag: return false;
- case StartTag:
- case Payload:
- default: return true;
- }
- }
-
- @Override
- public String getElementText() throws XMLStreamException {
- switch (state) {
- case StartTag:
- if (payloadReader.isCharacters()) return payloadReader.getText();
- return "";
- case Payload:
- default:
- return payloadReader.getElementText();
- }
- }
-
- @Override
- public int nextTag() throws XMLStreamException {
- int e = next();
- if (e == XMLStreamReader.END_DOCUMENT) return e;
- while (e != XMLStreamReader.END_DOCUMENT) {
- if (e == XMLStreamReader.START_ELEMENT) return e;
- if (e == XMLStreamReader.END_ELEMENT) return e;
- e = next();
- }
- return e;
- }
-
- @Override
- public Object getProperty(String name) throws IllegalArgumentException {
- return (payloadReader != null) ? payloadReader.getProperty(name) : null;
- }
-
- @Override
- public void require(int type, String namespaceURI, String localName) throws XMLStreamException {
- if (payloadReader!=null) payloadReader.require(type, namespaceURI, localName);
- }
-
- @Override
- public void close() throws XMLStreamException {
- if (payloadReader!=null) payloadReader.close();
- }
-
- @Override
- public String getNamespaceURI(String prefix) {
- switch (state) {
- case StartTag:
- case EndTag:
- return elemInfo.getNamespaceURI(prefix);
- case Payload:
- default:
- return payloadReader.getNamespaceURI(prefix);
- }
- }
-
- @Override
- public boolean isStartElement() {
- switch (state) {
- case StartTag: return true;
- case EndTag: return false;
- case Payload:
- default:
- return payloadReader.isStartElement();
- }
- }
-
- @Override
- public boolean isEndElement() {
- switch (state) {
- case StartTag: return false;
- case EndTag: return true;
- case Payload:
- default:
- return payloadReader.isEndElement();
- }
- }
-
- @Override
- public boolean isCharacters() {
- switch (state) {
- case StartTag:
- case EndTag: return false;
- case Payload:
- default:
- return payloadReader.isCharacters();
- }
- }
-
- @Override
- public boolean isWhiteSpace() {
- switch (state) {
- case StartTag:
- case EndTag: return false;
- case Payload:
- default:
- return payloadReader.isWhiteSpace();
- }
- }
-
- @Override
- public String getAttributeValue(String uri, String localName) {
- switch (state) {
- case StartTag:
- case EndTag: return tagInfo.atts.getValue(uri, localName);
- case Payload:
- default:
- return payloadReader.getAttributeValue(uri, localName);
- }
- }
-
- @Override
- public int getAttributeCount() {
- switch (state) {
- case StartTag:
- case EndTag: return tagInfo.atts.getLength();
- case Payload:
- default:
- return payloadReader.getAttributeCount();
- }
- }
-
- @Override
- public QName getAttributeName(int i) {
- switch (state) {
- case StartTag:
- case EndTag: return new QName(tagInfo.atts.getURI(i),tagInfo.atts.getLocalName(i),getPrfix(tagInfo.atts.getQName(i)));
- case Payload:
- default:
- return payloadReader.getAttributeName(i);
- }
- }
-
- @Override
- public String getAttributeNamespace(int index) {
- switch (state) {
- case StartTag:
- case EndTag: return tagInfo.atts.getURI(index);
- case Payload:
- default:
- return payloadReader.getAttributeNamespace(index);
- }
- }
-
- @Override
- public String getAttributeLocalName(int index) {
- switch (state) {
- case StartTag:
- case EndTag: return tagInfo.atts.getLocalName(index);
- case Payload:
- default:
- return payloadReader.getAttributeLocalName(index);
- }
- }
-
- @Override
- public String getAttributePrefix(int index) {
- switch (state) {
- case StartTag:
- case EndTag: return getPrfix(tagInfo.atts.getQName(index));
- case Payload:
- default:
- return payloadReader.getAttributePrefix(index);
- }
- }
-
- static private String getPrfix(String qName) {
- if (qName == null) return null;
- int i = qName.indexOf(":");
- return (i > 0)? qName.substring(0, i) : "";
- }
-
-
- @Override
- public String getAttributeType(int index) {
- switch (state) {
- case StartTag:
- case EndTag: return tagInfo.atts.getType(index);
- case Payload:
- default:
- return payloadReader.getAttributeType(index);
- }
- }
-
- @Override
- public String getAttributeValue(int index) {
- switch (state) {
- case StartTag:
- case EndTag: return tagInfo.atts.getValue(index);
- case Payload:
- default:
- return payloadReader.getAttributeValue(index);
- }
- }
-
- @Override
- public boolean isAttributeSpecified(int index) {
- switch (state) {
- case StartTag:
- case EndTag: return (index < tagInfo.atts.getLength()) ? tagInfo.atts.getLocalName(index) != null : false;
- case Payload:
- default:
- return payloadReader.isAttributeSpecified(index);
- }
- }
-
- @Override
- public int getNamespaceCount() {
- switch (state) {
- case StartTag:
- case EndTag: return (tagInfo.ns.length/2);
- case Payload:
- default:
- return payloadReader.getNamespaceCount();
- }
- }
-
- @Override
- public String getNamespacePrefix(int index) {
- switch (state) {
- case StartTag:
- case EndTag: return tagInfo.ns[2*index];
- case Payload:
- default:
- return payloadReader.getNamespacePrefix(index);
- }
- }
-
- @Override
- public String getNamespaceURI(int index) {
- switch (state) {
- case StartTag:
- case EndTag: return tagInfo.ns[2*index+1];
- case Payload:
- default:
- return payloadReader.getNamespaceURI(index);
- }
- }
-
- @Override
- public NamespaceContextEx getNamespaceContext() {
- switch (state) {
- case StartTag:
- case EndTag: return new NamespaceContextExAdaper(elemInfo);
- case Payload:
- default:
- return isPayloadReaderEx()?
- payloadReaderEx().getNamespaceContext() :
- new NamespaceContextExAdaper(payloadReader.getNamespaceContext());
- }
- }
-
- private boolean isPayloadReaderEx() { return (payloadReader instanceof XMLStreamReaderEx); }
-
- private XMLStreamReaderEx payloadReaderEx() { return (XMLStreamReaderEx)payloadReader; }
-
- @Override
- public int getEventType() {
- switch (state) {
- case StartTag: return XMLStreamReader.START_ELEMENT;
- case EndTag: return XMLStreamReader.END_ELEMENT;
- case Payload:
- default:
- return payloadReader.getEventType();
- }
- }
-
- @Override
- public String getText() {
- switch (state) {
- case StartTag:
- case EndTag: return null;
- case Payload:
- default:
- return payloadReader.getText();
- }
- }
-
- @Override
- public char[] getTextCharacters() {
- switch (state) {
- case StartTag:
- case EndTag: return null;
- case Payload:
- default:
- return payloadReader.getTextCharacters();
- }
- }
-
- @Override
- public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException {
- switch (state) {
- case StartTag:
- case EndTag: return -1;
- case Payload:
- default:
- return payloadReader.getTextCharacters(sourceStart, target, targetStart, length);
- }
- }
-
- @Override
- public int getTextStart() {
- switch (state) {
- case StartTag:
- case EndTag: return 0;
- case Payload:
- default:
- return payloadReader.getTextStart();
- }
- }
-
- @Override
- public int getTextLength() {
- switch (state) {
- case StartTag:
- case EndTag: return 0;
- case Payload:
- default:
- return payloadReader.getTextLength();
- }
- }
-
- @Override
- public String getEncoding() {
- switch (state) {
- case StartTag:
- case EndTag: return null;
- case Payload:
- default:
- return payloadReader.getEncoding();
- }
- }
-
- @Override
- public boolean hasText() {
- switch (state) {
- case StartTag:
- case EndTag: return false;
- case Payload:
- default:
- return payloadReader.hasText();
- }
- }
-
- @Override
- public Location getLocation() {
- switch (state) {
- case StartTag:
- case EndTag: return new Location() {
-
- @Override
- public int getLineNumber() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- @Override
- public int getColumnNumber() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- @Override
- public int getCharacterOffset() {
- // TODO Auto-generated method stub
- return 0;
- }
-
- @Override
- public String getPublicId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public String getSystemId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- };
- case Payload:
- default:
- return payloadReader.getLocation();
- }
- }
-
- @Override
- public QName getName() {
- switch (state) {
- case StartTag:
- case EndTag: return new QName(tagInfo.nsUri, tagInfo.localName, tagInfo.prefix);
- case Payload:
- default:
- return payloadReader.getName();
- }
- }
-
- @Override
- public String getLocalName() {
- switch (state) {
- case StartTag:
- case EndTag: return tagInfo.localName;
- case Payload:
- default:
- return payloadReader.getLocalName();
- }
- }
-
- @Override
- public boolean hasName() {
- switch (state) {
- case StartTag:
- case EndTag: return true;
- case Payload:
- default:
- return payloadReader.hasName();
- }
- }
-
- @Override
- public String getNamespaceURI() {
- switch (state) {
- case StartTag:
- case EndTag: return tagInfo.nsUri;
- case Payload:
- default:
- return payloadReader.getNamespaceURI();
- }
- }
-
- @Override
- public String getPrefix() {
- switch (state) {
- case StartTag:
- case EndTag: return tagInfo.prefix;
- case Payload:
- default:
- return payloadReader.getPrefix();
- }
- }
-
- @Override
- public String getVersion() {
- switch (state) {
- case StartTag:
- case EndTag: return null;
- case Payload:
- default:
- return payloadReader.getVersion();
- }
- }
-
- @Override
- public boolean isStandalone() {
- switch (state) {
- case StartTag:
- case EndTag: return true;
- case Payload:
- default:
- return payloadReader.isStandalone();
- }
- }
-
- @Override
- public boolean standaloneSet() {
- switch (state) {
- case StartTag:
- case EndTag: return true;
- case Payload:
- default:
- return payloadReader.standaloneSet();
- }
- }
-
- @Override
- public String getCharacterEncodingScheme() {
- switch (state) {
- case StartTag:
- case EndTag: return null;
- case Payload:
- default:
- return payloadReader.getCharacterEncodingScheme();
- }
- }
-
- @Override
- public String getPITarget() {
- switch (state) {
- case StartTag:
- case EndTag: return null;
- case Payload:
- default:
- return payloadReader.getPITarget();
- }
- }
-
- @Override
- public String getPIData() {
- switch (state) {
- case StartTag:
- case EndTag: return null;
- case Payload:
- default:
- return payloadReader.getPIData();
- }
- }
-
- @Override
- public String getElementTextTrim() throws XMLStreamException {
- switch (state) {
- case StartTag:
- case EndTag: return null;
- case Payload:
- default:
- return isPayloadReaderEx()? payloadReaderEx().getElementTextTrim() : payloadReader.getElementText().trim();
- }
- }
-
- @Override
- public CharSequence getPCDATA() throws XMLStreamException {
- switch (state) {
- case StartTag:
- case EndTag: return null;
- case Payload:
- default:
- return isPayloadReaderEx()? payloadReaderEx().getPCDATA() : payloadReader.getElementText();
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderFilter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderFilter.java
deleted file mode 100644
index af55800c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderFilter.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util.xml;
-
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import javax.xml.stream.Location;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * {@link XMLStreamReader} that delegates to another {@link XMLStreamReader}.
- *
- * <p>
- * This class isn't very useful by itself, but works as a base class
- * for {@link XMLStreamReader} filtering.
- *
- * @author Kohsuke Kawaguchi
- */
-public class XMLStreamReaderFilter implements XMLStreamReaderFactory.RecycleAware, XMLStreamReader {
- /**
- * The underlying {@link XMLStreamReader} that does the parsing of the root part.
- */
- protected XMLStreamReader reader;
-
- public XMLStreamReaderFilter(XMLStreamReader core) {
- this.reader = core;
- }
-
- public void onRecycled() {
- XMLStreamReaderFactory.recycle(reader);
- reader = null;
- }
-
- public int getAttributeCount() {
- return reader.getAttributeCount();
- }
-
- public int getEventType() {
- return reader.getEventType();
- }
-
- public int getNamespaceCount() {
- return reader.getNamespaceCount();
- }
-
- public int getTextLength() {
- return reader.getTextLength();
- }
-
- public int getTextStart() {
- return reader.getTextStart();
- }
-
- public int next() throws XMLStreamException {
- return reader.next();
- }
-
- public int nextTag() throws XMLStreamException {
- return reader.nextTag();
- }
-
- public void close() throws XMLStreamException {
- reader.close();
- }
-
- public boolean hasName() {
- return reader.hasName();
- }
-
- public boolean hasNext() throws XMLStreamException {
- return reader.hasNext();
- }
-
- public boolean hasText() {
- return reader.hasText();
- }
-
- public boolean isCharacters() {
- return reader.isCharacters();
- }
-
- public boolean isEndElement() {
- return reader.isEndElement();
- }
-
- public boolean isStandalone() {
- return reader.isStandalone();
- }
-
- public boolean isStartElement() {
- return reader.isStartElement();
- }
-
- public boolean isWhiteSpace() {
- return reader.isWhiteSpace();
- }
-
- public boolean standaloneSet() {
- return reader.standaloneSet();
- }
-
- public char[] getTextCharacters() {
- return reader.getTextCharacters();
- }
-
- public boolean isAttributeSpecified(int index) {
- return reader.isAttributeSpecified(index);
- }
-
- public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException {
- return reader.getTextCharacters(sourceStart, target, targetStart, length);
- }
-
- public String getCharacterEncodingScheme() {
- return reader.getCharacterEncodingScheme();
- }
-
- public String getElementText() throws XMLStreamException {
- return reader.getElementText();
- }
-
- public String getEncoding() {
- return reader.getEncoding();
- }
-
- public String getLocalName() {
- return reader.getLocalName();
- }
-
- public String getNamespaceURI() {
- return reader.getNamespaceURI();
- }
-
- public String getPIData() {
- return reader.getPIData();
- }
-
- public String getPITarget() {
- return reader.getPITarget();
- }
-
- public String getPrefix() {
- return reader.getPrefix();
- }
-
- public String getText() {
- return reader.getText();
- }
-
- public String getVersion() {
- return reader.getVersion();
- }
-
- public String getAttributeLocalName(int index) {
- return reader.getAttributeLocalName(index);
- }
-
- public String getAttributeNamespace(int index) {
- return reader.getAttributeNamespace(index);
- }
-
- public String getAttributePrefix(int index) {
- return reader.getAttributePrefix(index);
- }
-
- public String getAttributeType(int index) {
- return reader.getAttributeType(index);
- }
-
- public String getAttributeValue(int index) {
- return reader.getAttributeValue(index);
- }
-
- public String getNamespacePrefix(int index) {
- return reader.getNamespacePrefix(index);
- }
-
- public String getNamespaceURI(int index) {
- return reader.getNamespaceURI(index);
- }
-
- public NamespaceContext getNamespaceContext() {
- return reader.getNamespaceContext();
- }
-
- public QName getName() {
- return reader.getName();
- }
-
- public QName getAttributeName(int index) {
- return reader.getAttributeName(index);
- }
-
- public Location getLocation() {
- return reader.getLocation();
- }
-
- public Object getProperty(String name) throws IllegalArgumentException {
- return reader.getProperty(name);
- }
-
- public void require(int type, String namespaceURI, String localName) throws XMLStreamException {
- reader.require(type, namespaceURI, localName);
- }
-
- public String getNamespaceURI(String prefix) {
- return reader.getNamespaceURI(prefix);
- }
-
- public String getAttributeValue(String namespaceURI, String localName) {
- return reader.getAttributeValue(namespaceURI, localName);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderToXMLStreamWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderToXMLStreamWriter.java
deleted file mode 100644
index 7a2abce1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderToXMLStreamWriter.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.util.xml;
-
-import java.io.IOException;
-
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.XMLConstants;
-
-import com.sun.xml.internal.ws.streaming.MtomStreamWriter;
-import com.sun.xml.internal.org.jvnet.staxex.Base64Data;
-import com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx;
-import com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx;
-
-/**
- * Reads a sub-tree from {@link XMLStreamReader} and writes to {@link XMLStreamWriter}
- * as-is.
- *
- * <p>
- * This class can be sub-classed to implement a simple transformation logic.
- *
- * @author Kohsuke Kawaguchi
- * @author Ryan Shoemaker
- */
-public class XMLStreamReaderToXMLStreamWriter {
-
- private static final int BUF_SIZE = 4096;
-
- protected XMLStreamReader in;
- protected XMLStreamWriter out;
-
- private char[] buf;
-
- boolean optimizeBase64Data = false;
-
- AttachmentMarshaller mtomAttachmentMarshaller;
-
- /**
- * Reads one subtree and writes it out.
- *
- * <p>
- * The {@link XMLStreamWriter} never receives a start/end document event.
- * Those need to be written separately by the caller.
- */
- public void bridge(XMLStreamReader in, XMLStreamWriter out) throws XMLStreamException {
- assert in!=null && out!=null;
- this.in = in;
- this.out = out;
-
- optimizeBase64Data = (in instanceof XMLStreamReaderEx);
-
- if (out instanceof XMLStreamWriterEx && out instanceof MtomStreamWriter) {
- mtomAttachmentMarshaller = ((MtomStreamWriter) out).getAttachmentMarshaller();
- }
- // remembers the nest level of elements to know when we are done.
- int depth=0;
-
- buf = new char[BUF_SIZE];
-
- // if the parser is at the start tag, proceed to the first element
- int event = in.getEventType();
- if(event == XMLStreamConstants.START_DOCUMENT) {
- // nextTag doesn't correctly handle DTDs
- while( !in.isStartElement() ) {
- event = in.next();
- if (event == XMLStreamConstants.COMMENT)
- handleComment();
- }
- }
-
-
- if( event!=XMLStreamConstants.START_ELEMENT)
- throw new IllegalStateException("The current event is not START_ELEMENT\n but " + event);
-
- do {
- // These are all of the events listed in the javadoc for
- // XMLEvent.
- // The spec only really describes 11 of them.
- switch (event) {
- case XMLStreamConstants.START_ELEMENT :
- depth++;
- handleStartElement();
- break;
- case XMLStreamConstants.END_ELEMENT :
- handleEndElement();
- depth--;
- if(depth==0)
- return;
- break;
- case XMLStreamConstants.CHARACTERS :
- handleCharacters();
- break;
- case XMLStreamConstants.ENTITY_REFERENCE :
- handleEntityReference();
- break;
- case XMLStreamConstants.PROCESSING_INSTRUCTION :
- handlePI();
- break;
- case XMLStreamConstants.COMMENT :
- handleComment();
- break;
- case XMLStreamConstants.DTD :
- handleDTD();
- break;
- case XMLStreamConstants.CDATA :
- handleCDATA();
- break;
- case XMLStreamConstants.SPACE :
- handleSpace();
- break;
- case XMLStreamConstants.END_DOCUMENT:
- throw new XMLStreamException("Malformed XML at depth="+depth+", Reached EOF. Event="+event);
- default :
- throw new XMLStreamException("Cannot process event: " + event);
- }
-
- event=in.next();
- } while (depth!=0);
- }
-
- protected void handlePI() throws XMLStreamException {
- out.writeProcessingInstruction(
- in.getPITarget(),
- in.getPIData());
- }
-
-
- protected void handleCharacters() throws XMLStreamException {
-
- CharSequence c = null;
-
- if (optimizeBase64Data) {
- c = ((XMLStreamReaderEx)in).getPCDATA();
- }
-
- if ((c != null) && (c instanceof Base64Data)) {
- if (mtomAttachmentMarshaller != null) {
- Base64Data b64d = (Base64Data) c;
- ((XMLStreamWriterEx)out).writeBinary(b64d.getDataHandler());
- } else {
- try {
- ((Base64Data)c).writeTo(out);
- } catch (IOException e) {
- throw new XMLStreamException(e);
- }
- }
- } else {
- for (int start=0,read=buf.length; read == buf.length; start+=buf.length) {
- read = in.getTextCharacters(start, buf, 0, buf.length);
- out.writeCharacters(buf, 0, read);
- }
- }
- }
-
- protected void handleEndElement() throws XMLStreamException {
- out.writeEndElement();
- }
-
- protected void handleStartElement() throws XMLStreamException {
- String nsUri = in.getNamespaceURI();
- if(nsUri==null)
- out.writeStartElement(in.getLocalName());
- else
- out.writeStartElement(
- fixNull(in.getPrefix()),
- in.getLocalName(),
- nsUri
- );
-
- // start namespace bindings
- int nsCount = in.getNamespaceCount();
- for (int i = 0; i < nsCount; i++) {
- out.writeNamespace(
- in.getNamespacePrefix(i),
- fixNull(in.getNamespaceURI(i))); // zephyr doesn't like null, I don't know what is correct, so just fix null to "" for now
- }
-
- // write attributes
- int attCount = in.getAttributeCount();
- for (int i = 0; i < attCount; i++) {
- handleAttribute(i);
- }
- }
-
- /**
- * Writes out the {@code i}-th attribute of the current element.
- *
- * <p>
- * Used from {@link #handleStartElement()}.
- */
- protected void handleAttribute(int i) throws XMLStreamException {
- String nsUri = in.getAttributeNamespace(i);
- String prefix = in.getAttributePrefix(i);
- if (fixNull(nsUri).equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
- //Its a namespace decl, ignore as it is already written.
- return;
- }
-
- if(nsUri==null || prefix == null || prefix.equals("")) {
- out.writeAttribute(
- in.getAttributeLocalName(i),
- in.getAttributeValue(i)
- );
- } else {
- out.writeAttribute(
- prefix,
- nsUri,
- in.getAttributeLocalName(i),
- in.getAttributeValue(i)
- );
- }
- }
-
- protected void handleDTD() throws XMLStreamException {
- out.writeDTD(in.getText());
- }
-
- protected void handleComment() throws XMLStreamException {
- out.writeComment(in.getText());
- }
-
- protected void handleEntityReference() throws XMLStreamException {
- out.writeEntityRef(in.getText());
- }
-
- protected void handleSpace() throws XMLStreamException {
- handleCharacters();
- }
-
- protected void handleCDATA() throws XMLStreamException {
- out.writeCData(in.getText());
- }
-
- private static String fixNull(String s) {
- if(s==null) return "";
- else return s;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamWriterFilter.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamWriterFilter.java
deleted file mode 100644
index f4c7b6c2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamWriterFilter.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.util.xml;
-
-import com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory.RecycleAware;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * {@link XMLStreamWriter} that delegates to another {@link XMLStreamWriter}.
- *
- * <p>
- * This class isn't very useful by itself, but works as a base class
- * for {@link XMLStreamWriter} filtering.
- *
- * @author Kohsuke Kawaguchi
- */
-public class XMLStreamWriterFilter implements XMLStreamWriter, RecycleAware {
- protected XMLStreamWriter writer;
-
- public XMLStreamWriterFilter(XMLStreamWriter writer) {
- this.writer = writer;
- }
-
- public void close() throws XMLStreamException {
- writer.close();
- }
-
- public void flush() throws XMLStreamException {
- writer.flush();
- }
-
- public void writeEndDocument() throws XMLStreamException {
- writer.writeEndDocument();
- }
-
- public void writeEndElement() throws XMLStreamException {
- writer.writeEndElement();
- }
-
- public void writeStartDocument() throws XMLStreamException {
- writer.writeStartDocument();
- }
-
- public void writeCharacters(char[] text, int start, int len) throws XMLStreamException {
- writer.writeCharacters(text, start, len);
- }
-
- public void setDefaultNamespace(String uri) throws XMLStreamException {
- writer.setDefaultNamespace(uri);
- }
-
- public void writeCData(String data) throws XMLStreamException {
- writer.writeCData(data);
- }
-
- public void writeCharacters(String text) throws XMLStreamException {
- writer.writeCharacters(text);
- }
-
- public void writeComment(String data) throws XMLStreamException {
- writer.writeComment(data);
- }
-
- public void writeDTD(String dtd) throws XMLStreamException {
- writer.writeDTD(dtd);
- }
-
- public void writeDefaultNamespace(String namespaceURI) throws XMLStreamException {
- writer.writeDefaultNamespace(namespaceURI);
- }
-
- public void writeEmptyElement(String localName) throws XMLStreamException {
- writer.writeEmptyElement(localName);
- }
-
- public void writeEntityRef(String name) throws XMLStreamException {
- writer.writeEntityRef(name);
- }
-
- public void writeProcessingInstruction(String target) throws XMLStreamException {
- writer.writeProcessingInstruction(target);
- }
-
- public void writeStartDocument(String version) throws XMLStreamException {
- writer.writeStartDocument(version);
- }
-
- public void writeStartElement(String localName) throws XMLStreamException {
- writer.writeStartElement(localName);
- }
-
- public NamespaceContext getNamespaceContext() {
- return writer.getNamespaceContext();
- }
-
- public void setNamespaceContext(NamespaceContext context) throws XMLStreamException {
- writer.setNamespaceContext(context);
- }
-
- public Object getProperty(String name) throws IllegalArgumentException {
- return writer.getProperty(name);
- }
-
- public String getPrefix(String uri) throws XMLStreamException {
- return writer.getPrefix(uri);
- }
-
- public void setPrefix(String prefix, String uri) throws XMLStreamException {
- writer.setPrefix(prefix, uri);
- }
-
- public void writeAttribute(String localName, String value) throws XMLStreamException {
- writer.writeAttribute(localName, value);
- }
-
- public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException {
- writer.writeEmptyElement(namespaceURI, localName);
- }
-
- public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException {
- writer.writeNamespace(prefix, namespaceURI);
- }
-
- public void writeProcessingInstruction(String target, String data) throws XMLStreamException {
- writer.writeProcessingInstruction(target, data);
- }
-
- public void writeStartDocument(String encoding, String version) throws XMLStreamException {
- writer.writeStartDocument(encoding, version);
- }
-
- public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException {
- writer.writeStartElement(namespaceURI, localName);
- }
-
- public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException {
- writer.writeAttribute(namespaceURI, localName, value);
- }
-
- public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
- writer.writeEmptyElement(prefix, localName, namespaceURI);
- }
-
- public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
- writer.writeStartElement(prefix, localName, namespaceURI);
- }
-
- public void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException {
- writer.writeAttribute(prefix, namespaceURI, localName, value);
- }
-
- public void onRecycled() {
- XMLStreamWriterFactory.recycle(writer);
- writer = null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java
deleted file mode 100644
index 10ad6086..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java
+++ /dev/null
@@ -1,467 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.util.xml;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import com.sun.org.apache.xml.internal.resolver.CatalogManager;
-import com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver;
-import com.sun.xml.internal.ws.server.ServerRtException;
-import com.sun.xml.internal.ws.util.ByteArrayBuffer;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-import org.xml.sax.*;
-
-import javax.xml.XMLConstants;
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.sax.SAXTransformerFactory;
-import javax.xml.transform.sax.TransformerHandler;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.SchemaFactory;
-import javax.xml.ws.WebServiceException;
-import javax.xml.xpath.XPathFactory;
-import javax.xml.xpath.XPathFactoryConfigurationException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.StringTokenizer;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * @author WS Development Team
- */
-public class XmlUtil {
-
- // not in older JDK, so must be duplicated here, otherwise javax.xml.XMLConstants should be used
- private static final String ACCESS_EXTERNAL_SCHEMA = "http://javax.xml.XMLConstants/property/accessExternalSchema";
-
- private final static String LEXICAL_HANDLER_PROPERTY =
- "http://xml.org/sax/properties/lexical-handler";
-
- private static final Logger LOGGER = Logger.getLogger(XmlUtil.class.getName());
-
- private static final String DISABLE_XML_SECURITY = "com.sun.xml.internal.ws.disableXmlSecurity";
-
- private static boolean XML_SECURITY_DISABLED = AccessController.doPrivileged(
- new PrivilegedAction<Boolean>() {
- @Override
- public Boolean run() {
- return Boolean.getBoolean(DISABLE_XML_SECURITY);
- }
- }
- );
-
- public static String getPrefix(String s) {
- int i = s.indexOf(':');
- if (i == -1)
- return null;
- return s.substring(0, i);
- }
-
- public static String getLocalPart(String s) {
- int i = s.indexOf(':');
- if (i == -1)
- return s;
- return s.substring(i + 1);
- }
-
-
-
- public static String getAttributeOrNull(Element e, String name) {
- Attr a = e.getAttributeNode(name);
- if (a == null)
- return null;
- return a.getValue();
- }
-
- public static String getAttributeNSOrNull(
- Element e,
- String name,
- String nsURI) {
- Attr a = e.getAttributeNodeNS(nsURI, name);
- if (a == null)
- return null;
- return a.getValue();
- }
-
- public static String getAttributeNSOrNull(
- Element e,
- QName name) {
- Attr a = e.getAttributeNodeNS(name.getNamespaceURI(), name.getLocalPart());
- if (a == null)
- return null;
- return a.getValue();
- }
-
-/* public static boolean matchesTagNS(Element e, String tag, String nsURI) {
- try {
- return e.getLocalName().equals(tag)
- && e.getNamespaceURI().equals(nsURI);
- } catch (NullPointerException npe) {
-
- // localname not null since parsing would fail before here
- throw new WSDLParseException(
- "null.namespace.found",
- e.getLocalName());
- }
- }
-
- public static boolean matchesTagNS(
- Element e,
- javax.xml.namespace.QName name) {
- try {
- return e.getLocalName().equals(name.getLocalPart())
- && e.getNamespaceURI().equals(name.getNamespaceURI());
- } catch (NullPointerException npe) {
-
- // localname not null since parsing would fail before here
- throw new WSDLParseException(
- "null.namespace.found",
- e.getLocalName());
- }
- }*/
-
- public static Iterator getAllChildren(Element element) {
- return new NodeListIterator(element.getChildNodes());
- }
-
- public static Iterator getAllAttributes(Element element) {
- return new NamedNodeMapIterator(element.getAttributes());
- }
-
- public static List<String> parseTokenList(String tokenList) {
- List<String> result = new ArrayList<String>();
- StringTokenizer tokenizer = new StringTokenizer(tokenList, " ");
- while (tokenizer.hasMoreTokens()) {
- result.add(tokenizer.nextToken());
- }
- return result;
- }
-
- public static String getTextForNode(Node node) {
- StringBuilder sb = new StringBuilder();
-
- NodeList children = node.getChildNodes();
- if (children.getLength() == 0)
- return null;
-
- for (int i = 0; i < children.getLength(); ++i) {
- Node n = children.item(i);
-
- if (n instanceof Text)
- sb.append(n.getNodeValue());
- else if (n instanceof EntityReference) {
- String s = getTextForNode(n);
- if (s == null)
- return null;
- else
- sb.append(s);
- } else
- return null;
- }
-
- return sb.toString();
- }
-
- public static InputStream getUTF8Stream(String s) {
- try {
- ByteArrayBuffer bab = new ByteArrayBuffer();
- Writer w = new OutputStreamWriter(bab, "utf-8");
- w.write(s);
- w.close();
- return bab.newInputStream();
- } catch (IOException e) {
- throw new RuntimeException("should not happen");
- }
- }
-
- static final ContextClassloaderLocal<TransformerFactory> transformerFactory = new ContextClassloaderLocal<TransformerFactory>() {
- @Override
- protected TransformerFactory initialValue() throws Exception {
- return TransformerFactory.newInstance();
- }
- };
-
- static final ContextClassloaderLocal<SAXParserFactory> saxParserFactory = new ContextClassloaderLocal<SAXParserFactory>() {
- @Override
- protected SAXParserFactory initialValue() throws Exception {
- SAXParserFactory factory = SAXParserFactory.newInstance();
- factory.setNamespaceAware(true);
- return factory;
- }
- };
-
- /**
- * Creates a new identity transformer.
- */
- public static Transformer newTransformer() {
- try {
- return transformerFactory.get().newTransformer();
- } catch (TransformerConfigurationException tex) {
- throw new IllegalStateException("Unable to create a JAXP transformer");
- }
- }
-
- /**
- * Performs identity transformation.
- */
- public static <T extends Result>
- T identityTransform(Source src, T result) throws TransformerException, SAXException, ParserConfigurationException, IOException {
- if (src instanceof StreamSource) {
- // work around a bug in JAXP in JDK6u4 and earlier where the namespace processing
- // is not turned on by default
- StreamSource ssrc = (StreamSource) src;
- TransformerHandler th = ((SAXTransformerFactory) transformerFactory.get()).newTransformerHandler();
- th.setResult(result);
- XMLReader reader = saxParserFactory.get().newSAXParser().getXMLReader();
- reader.setContentHandler(th);
- reader.setProperty(LEXICAL_HANDLER_PROPERTY, th);
- reader.parse(toInputSource(ssrc));
- } else {
- newTransformer().transform(src, result);
- }
- return result;
- }
-
- private static InputSource toInputSource(StreamSource src) {
- InputSource is = new InputSource();
- is.setByteStream(src.getInputStream());
- is.setCharacterStream(src.getReader());
- is.setPublicId(src.getPublicId());
- is.setSystemId(src.getSystemId());
- return is;
- }
-
- /*
- * Gets an EntityResolver using XML catalog
- */
- public static EntityResolver createEntityResolver(@Nullable URL catalogUrl) {
- // set up a manager
- CatalogManager manager = new CatalogManager();
- manager.setIgnoreMissingProperties(true);
- // Using static catalog may result in to sharing of the catalog by multiple apps running in a container
- manager.setUseStaticCatalog(false);
- Catalog catalog = manager.getCatalog();
- try {
- if (catalogUrl != null) {
- catalog.parseCatalog(catalogUrl);
- }
- } catch (IOException e) {
- throw new ServerRtException("server.rt.err",e);
- }
- return workaroundCatalogResolver(catalog);
- }
-
- /**
- * Gets a default EntityResolver for catalog at META-INF/jaxws-catalog.xml
- */
- public static EntityResolver createDefaultCatalogResolver() {
-
- // set up a manager
- CatalogManager manager = new CatalogManager();
- manager.setIgnoreMissingProperties(true);
- // Using static catalog may result in to sharing of the catalog by multiple apps running in a container
- manager.setUseStaticCatalog(false);
- // parse the catalog
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- Enumeration<URL> catalogEnum;
- Catalog catalog = manager.getCatalog();
- try {
- if (cl == null) {
- catalogEnum = ClassLoader.getSystemResources("META-INF/jax-ws-catalog.xml");
- } else {
- catalogEnum = cl.getResources("META-INF/jax-ws-catalog.xml");
- }
-
- while(catalogEnum.hasMoreElements()) {
- URL url = catalogEnum.nextElement();
- catalog.parseCatalog(url);
- }
- } catch (IOException e) {
- throw new WebServiceException(e);
- }
-
- return workaroundCatalogResolver(catalog);
- }
-
- /**
- * Default CatalogResolver implementation is broken as it depends on CatalogManager.getCatalog() which will always create a new one when
- * useStaticCatalog is false.
- * This returns a CatalogResolver that uses the catalog passed as parameter.
- * @param catalog
- * @return CatalogResolver
- */
- private static CatalogResolver workaroundCatalogResolver(final Catalog catalog) {
- // set up a manager
- CatalogManager manager = new CatalogManager() {
- @Override
- public Catalog getCatalog() {
- return catalog;
- }
- };
- manager.setIgnoreMissingProperties(true);
- // Using static catalog may result in to sharing of the catalog by multiple apps running in a container
- manager.setUseStaticCatalog(false);
-
- return new CatalogResolver(manager);
- }
-
- /**
- * {@link ErrorHandler} that always treat the error as fatal.
- */
- public static final ErrorHandler DRACONIAN_ERROR_HANDLER = new ErrorHandler() {
- @Override
- public void warning(SAXParseException exception) {
- }
-
- @Override
- public void error(SAXParseException exception) throws SAXException {
- throw exception;
- }
-
- @Override
- public void fatalError(SAXParseException exception) throws SAXException {
- throw exception;
- }
- };
-
- public static DocumentBuilderFactory newDocumentBuilderFactory() {
- return newDocumentBuilderFactory(true);
- }
-
- public static DocumentBuilderFactory newDocumentBuilderFactory(boolean secureXmlProcessing) {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- try {
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, isXMLSecurityDisabled(secureXmlProcessing));
- } catch (ParserConfigurationException e) {
- LOGGER.log(Level.WARNING, "Factory [{0}] doesn't support secure xml processing!", new Object[] { factory.getClass().getName() } );
- }
- return factory;
- }
-
- public static TransformerFactory newTransformerFactory(boolean secureXmlProcessingEnabled) {
- TransformerFactory factory = TransformerFactory.newInstance();
- try {
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, isXMLSecurityDisabled(secureXmlProcessingEnabled));
- } catch (TransformerConfigurationException e) {
- LOGGER.log(Level.WARNING, "Factory [{0}] doesn't support secure xml processing!", new Object[]{factory.getClass().getName()});
- }
- return factory;
- }
-
- public static TransformerFactory newTransformerFactory() {
- return newTransformerFactory(true);
- }
-
- public static SAXParserFactory newSAXParserFactory(boolean secureXmlProcessingEnabled) {
- SAXParserFactory factory = SAXParserFactory.newInstance();
- try {
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, isXMLSecurityDisabled(secureXmlProcessingEnabled));
- } catch (Exception e) {
- LOGGER.log(Level.WARNING, "Factory [{0}] doesn't support secure xml processing!", new Object[]{factory.getClass().getName()});
- }
- return factory;
- }
-
- public static XPathFactory newXPathFactory(boolean secureXmlProcessingEnabled) {
- XPathFactory factory = XPathFactory.newInstance();
- try {
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, isXMLSecurityDisabled(secureXmlProcessingEnabled));
- } catch (XPathFactoryConfigurationException e) {
- LOGGER.log(Level.WARNING, "Factory [{0}] doesn't support secure xml processing!", new Object[] { factory.getClass().getName() } );
- }
- return factory;
- }
-
- public static XMLInputFactory newXMLInputFactory(boolean secureXmlProcessingEnabled) {
- XMLInputFactory factory = XMLInputFactory.newInstance();
- if (isXMLSecurityDisabled(secureXmlProcessingEnabled)) {
- // TODO-Miran: are those apppropriate defaults?
- factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
- factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
- }
- return factory;
- }
-
- private static boolean isXMLSecurityDisabled(boolean runtimeDisabled) {
- return XML_SECURITY_DISABLED || runtimeDisabled;
- }
-
- public static SchemaFactory allowExternalAccess(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, "Xml Security disabled, no JAXP xsd external access configuration necessary.");
- }
- return sf;
- }
-
- if (System.getProperty("javax.xml.accessExternalSchema") != null) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Detected explicitly JAXP configuration, no JAXP xsd external access configuration necessary.");
- }
- return sf;
- }
-
- try {
- sf.setProperty(ACCESS_EXTERNAL_SCHEMA, value);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, "Property \"{0}\" is supported and has been successfully set by used JAXP implementation.", new Object[]{ACCESS_EXTERNAL_SCHEMA});
- }
- } catch (SAXException ignored) {
- // nothing to do; support depends on version JDK or SAX implementation
- if (LOGGER.isLoggable(Level.CONFIG)) {
- LOGGER.log(Level.CONFIG, "Property \"{0}\" is not supported by used JAXP implementation.", new Object[]{ACCESS_EXTERNAL_SCHEMA});
- }
- }
- return sf;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationFinder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationFinder.java
deleted file mode 100644
index f9e75777..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationFinder.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.wsdl;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.WSDLOperationMapping;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.message.AddressingUtils;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.MessageHeaders;
-import com.sun.xml.internal.ws.api.message.Messages;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.model.AbstractSEIModelImpl;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import static com.sun.xml.internal.ws.wsdl.PayloadQNameBasedOperationFinder.*;
-import com.sun.xml.internal.ws.resources.AddressingMessages;
-
-import javax.xml.namespace.QName;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Logger;
-
-/**
- * An {@link WSDLOperationFinder} implementation that uses
- * WS-Addressing Action Message Addressing Property, <code>wsa:Action</code> and SOAP Payload QName,
- * as the key for dispatching.
- * <p/>
- * This should be used only when AddressingFeature is enabled.
- * A map of all {@link ActionBasedOperationSignature}s in the port and the corresponding and the WSDL Operation QNames
- * is maintained.
- * <p/>
- *
- * @author Rama Pulavarthi
- */
-final class ActionBasedOperationFinder extends WSDLOperationFinder {
-
- private static final Logger LOGGER = Logger.getLogger(ActionBasedOperationFinder.class.getName());
- private final Map<ActionBasedOperationSignature, WSDLOperationMapping> uniqueOpSignatureMap;
- private final Map<String, WSDLOperationMapping> actionMap;
-
- private final @NotNull AddressingVersion av;
-
- public ActionBasedOperationFinder(WSDLPort wsdlModel, WSBinding binding, @Nullable SEIModel seiModel) {
- super(wsdlModel, binding, seiModel);
-
- assert binding.getAddressingVersion() != null; // this dispatcher can be only used when addressing is on.
- av = binding.getAddressingVersion();
- uniqueOpSignatureMap = new HashMap<ActionBasedOperationSignature, WSDLOperationMapping>();
- actionMap = new HashMap<String,WSDLOperationMapping>();
-
- if (seiModel != null) {
- for (JavaMethodImpl m : ((AbstractSEIModelImpl) seiModel).getJavaMethods()) {
- if(m.getMEP().isAsync)
- continue;
-
- String action = m.getInputAction();
- QName payloadName = m.getRequestPayloadName();
- if (payloadName == null)
- payloadName = EMPTY_PAYLOAD;
- //first look at annotations and then in wsdlmodel
- if (action == null || action.equals("")) {
- if (m.getOperation() != null) action = m.getOperation().getOperation().getInput().getAction();
-// action = m.getInputAction();
- }
- if (action != null) {
- ActionBasedOperationSignature opSignature = new ActionBasedOperationSignature(action, payloadName);
- if(uniqueOpSignatureMap.get(opSignature) != null) {
- LOGGER.warning(AddressingMessages.NON_UNIQUE_OPERATION_SIGNATURE(
- uniqueOpSignatureMap.get(opSignature),m.getOperationQName(),action,payloadName));
- }
- uniqueOpSignatureMap.put(opSignature, wsdlOperationMapping(m));
- actionMap.put(action,wsdlOperationMapping(m));
- }
- }
- } else {
- for (WSDLBoundOperation wsdlOp : wsdlModel.getBinding().getBindingOperations()) {
- QName payloadName = wsdlOp.getRequestPayloadName();
- if (payloadName == null)
- payloadName = EMPTY_PAYLOAD;
- String action = wsdlOp.getOperation().getInput().getAction();
- ActionBasedOperationSignature opSignature = new ActionBasedOperationSignature(
- action, payloadName);
- if(uniqueOpSignatureMap.get(opSignature) != null) {
- LOGGER.warning(AddressingMessages.NON_UNIQUE_OPERATION_SIGNATURE(
- uniqueOpSignatureMap.get(opSignature),wsdlOp.getName(),action,payloadName));
-
- }
- uniqueOpSignatureMap.put(opSignature, wsdlOperationMapping(wsdlOp));
- actionMap.put(action,wsdlOperationMapping(wsdlOp));
- }
- }
- }
-
-// /**
-// *
-// * @param request Request Packet that is used to find the associated WSDLOperation
-// * @return WSDL operation Qname.
-// * return null if WS-Addressing is not engaged.
-// * @throws DispatchException with WSA defined fault message when it cannot find an associated WSDL operation.
-// *
-// */
-// @Override
-// public QName getWSDLOperationQName(Packet request) throws DispatchException {
-// return getWSDLOperationMapping(request).getWSDLBoundOperation().getName();
-// }
-
- public WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException {
- MessageHeaders hl = request.getMessage().getHeaders();
- String action = AddressingUtils.getAction(hl, av, binding.getSOAPVersion());
-
- if (action == null)
- // Addressing is not enagaged, return null to use other ways to dispatch.
- return null;
-
- Message message = request.getMessage();
- QName payloadName;
- String localPart = message.getPayloadLocalPart();
- if (localPart == null) {
- payloadName = EMPTY_PAYLOAD;
- } else {
- String nsUri = message.getPayloadNamespaceURI();
- if (nsUri == null)
- nsUri = EMPTY_PAYLOAD_NSURI;
- payloadName = new QName(nsUri, localPart);
- }
-
- WSDLOperationMapping opMapping = uniqueOpSignatureMap.get(new ActionBasedOperationSignature(action, payloadName));
- if (opMapping != null)
- return opMapping;
-
- //Seems like in Wstrust STS wsdls, the payload does not match what is specified in the wsdl leading to incorrect
- // wsdl operation resolution. Use just wsa:Action to dispatch as a last resort.
- //try just with wsa:Action
- opMapping = actionMap.get(action);
- if (opMapping != null)
- return opMapping;
-
- // invalid action header
- Message result = Messages.create(action, av, binding.getSOAPVersion());
-
- throw new DispatchException(result);
-
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationSignature.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationSignature.java
deleted file mode 100644
index 3647911c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationSignature.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl;
-
-import com.sun.istack.internal.NotNull;
-
-import javax.xml.namespace.QName;
-
-/**
- * This class models the Operation Signature as defined by WS-I BP ( 1.2 or 2.0) to use wsa:Action and payload QName to
- * identify the corresponding wsdl operation from a request SOAP Message.
- *
- * @author Rama Pulavarthi
- */
-public class ActionBasedOperationSignature {
- private final String action;
- private final QName payloadQName;
- public ActionBasedOperationSignature(@NotNull String action, @NotNull QName payloadQName) {
- this.action = action;
- this.payloadQName = payloadQName;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- ActionBasedOperationSignature that = (ActionBasedOperationSignature) o;
-
- if (!action.equals(that.action)) return false;
- if (!payloadQName.equals(that.payloadQName)) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = action.hashCode();
- result = 31 * result + payloadQName.hashCode();
- return result;
- }
-
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/DispatchException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/DispatchException.java
deleted file mode 100644
index d5a9101d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/DispatchException.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl;
-
-import com.sun.xml.internal.ws.api.message.Message;
-
-/**
- * {@link Exception} that demands a specific fault message to be sent back.
- *
- * TODO: think about a way to generalize it, as it seems to be useful
- * in other places.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class DispatchException extends Exception {
- public final Message fault;
-
- public DispatchException(Message fault) {
- this.fault = fault;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/OperationDispatcher.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/OperationDispatcher.java
deleted file mode 100644
index ac34abbd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/OperationDispatcher.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-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.WSDLOperationMapping;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-
-import javax.xml.namespace.QName;
-import java.util.List;
-import java.util.ArrayList;
-import java.text.MessageFormat;
-
-/**
- * This class abstracts the process of identifying the wsdl operation from a SOAP Message request.
- * This is primarily for dispatching the request messages to an endpoint method.
- *
- * Different implementations of {@link WSDLOperationFinder} are used underneath to identify the wsdl operation based on
- * if AddressingFeature is enabled or not.
- *
- * @author Rama Pulavarthi
- */
-public class OperationDispatcher {
- private List<WSDLOperationFinder> opFinders;
- private WSBinding binding;
-
- public OperationDispatcher(@NotNull WSDLPort wsdlModel, @NotNull WSBinding binding, @Nullable SEIModel seiModel) {
- this.binding = binding;
- opFinders = new ArrayList<WSDLOperationFinder>();
- if (binding.getAddressingVersion() != null) {
- opFinders.add(new ActionBasedOperationFinder(wsdlModel, binding, seiModel));
- }
- opFinders.add(new PayloadQNameBasedOperationFinder(wsdlModel, binding, seiModel));
- opFinders.add(new SOAPActionBasedOperationFinder(wsdlModel, binding, seiModel));
-
- }
-
- /**
- * @deprecated use getWSDLOperationMapping(Packet request)
- * @param request Packet
- * @return QName of the wsdl operation.
- * @throws DispatchException if a unique operartion cannot be associated with this packet.
- */
- public @NotNull QName getWSDLOperationQName(Packet request) throws DispatchException {
- WSDLOperationMapping m = getWSDLOperationMapping(request);
- return m != null ? m.getOperationName() : null;
- }
-
- public @NotNull WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException {
- WSDLOperationMapping opName;
- for(WSDLOperationFinder finder: opFinders) {
- opName = finder.getWSDLOperationMapping(request);
- if(opName != null)
- return opName;
- }
- //No way to dispatch this request
- String err = MessageFormat.format("Request=[SOAPAction={0},Payload='{'{1}'}'{2}]",
- request.soapAction, request.getMessage().getPayloadNamespaceURI(),
- request.getMessage().getPayloadLocalPart());
- String faultString = ServerMessages.DISPATCH_CANNOT_FIND_METHOD(err);
- Message faultMsg = SOAPFaultBuilder.createSOAPFaultMessage(
- binding.getSOAPVersion(), faultString, binding.getSOAPVersion().faultCodeClient);
- throw new DispatchException(faultMsg);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/PayloadQNameBasedOperationFinder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/PayloadQNameBasedOperationFinder.java
deleted file mode 100644
index 172d5cd1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/PayloadQNameBasedOperationFinder.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.wsdl;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.WSDLOperationMapping;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.api.message.Message;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.fault.SOAPFaultBuilder;
-import com.sun.xml.internal.ws.model.AbstractSEIModelImpl;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import com.sun.xml.internal.ws.resources.ServerMessages;
-import com.sun.xml.internal.ws.util.QNameMap;
-import com.sun.xml.internal.ws.wsdl.DispatchException;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.Logger;
-
-/**
- * An {@link WSDLOperationFinder} that uses SOAP payload first child's QName as the key for dispatching.
- * <p/>
- * A map of all payload QNames that the operations in the port allow and the corresponding QName of the wsdl operation
- * is initialized in the constructor. The payload QName is extracted from the
- * request {@link com.sun.xml.internal.ws.api.message.Packet} and used to identify the wsdl operation.
- *
- * @author Rama Pulavarthi
- * @author Arun Gupta
- * @author Jitendra Kotamraju
- */
-final class PayloadQNameBasedOperationFinder extends WSDLOperationFinder {
- private static final Logger LOGGER = Logger.getLogger(PayloadQNameBasedOperationFinder.class.getName());
-
- public static final String EMPTY_PAYLOAD_LOCAL = "";
- public static final String EMPTY_PAYLOAD_NSURI = "";
- public static final QName EMPTY_PAYLOAD = new QName(EMPTY_PAYLOAD_NSURI, EMPTY_PAYLOAD_LOCAL);
-
- private final QNameMap<WSDLOperationMapping> methodHandlers = new QNameMap<WSDLOperationMapping>();
- private final QNameMap<List<String>> unique = new QNameMap<List<String>>();
-
-
- public PayloadQNameBasedOperationFinder(WSDLPort wsdlModel, WSBinding binding, @Nullable SEIModel seiModel) {
- super(wsdlModel,binding,seiModel);
- if (seiModel != null) {
- // Find if any payload QNames repeat for operations
- for (JavaMethodImpl m : ((AbstractSEIModelImpl) seiModel).getJavaMethods()) {
- if(m.getMEP().isAsync)
- continue;
- QName name = m.getRequestPayloadName();
- if (name == null)
- name = EMPTY_PAYLOAD;
- List<String> methods = unique.get(name);
- if (methods == null) {
- methods = new ArrayList<String>();
- unique.put(name, methods);
- }
- methods.add(m.getMethod().getName());
- }
-
- // Log warnings about non unique payload QNames
- for (QNameMap.Entry<List<String>> e : unique.entrySet()) {
- if (e.getValue().size() > 1) {
- LOGGER.warning(ServerMessages.NON_UNIQUE_DISPATCH_QNAME(e.getValue(), e.createQName()));
- }
- }
-
- for (JavaMethodImpl m : ((AbstractSEIModelImpl) seiModel).getJavaMethods()) {
- QName name = m.getRequestPayloadName();
- if (name == null)
- name = EMPTY_PAYLOAD;
- // Set up method handlers only for unique QNames. So that dispatching
- // happens consistently for a method
- if (unique.get(name).size() == 1) {
- methodHandlers.put(name, wsdlOperationMapping(m));
- }
- }
- } else {
- for (WSDLBoundOperation wsdlOp : wsdlModel.getBinding().getBindingOperations()) {
- QName name = wsdlOp.getRequestPayloadName();
- if (name == null)
- name = EMPTY_PAYLOAD;
- methodHandlers.put(name, wsdlOperationMapping(wsdlOp));
- }
- }
- }
-
- /**
- *
- * @return not null if it finds a unique handler for the request
- * null if it cannot idenitify a unique wsdl operation from the Payload QName.
- *
- * @throws DispatchException if the payload itself is incorrect, this happens when the payload is not accepted by
- * any operation in the port.
- */
-// public QName getWSDLOperationQName(Packet request) throws DispatchException{
-
- public WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException {
- Message message = request.getMessage();
- String localPart = message.getPayloadLocalPart();
- String nsUri;
- if (localPart == null) {
- localPart = EMPTY_PAYLOAD_LOCAL;
- nsUri = EMPTY_PAYLOAD_NSURI;
- } else {
- nsUri = message.getPayloadNamespaceURI();
- if(nsUri == null)
- nsUri = EMPTY_PAYLOAD_NSURI;
- }
- WSDLOperationMapping op = methodHandlers.get(nsUri, localPart);
-
- // Check if payload itself is correct. Usually it is, so let us check last
- if (op == null && !unique.containsKey(nsUri,localPart)) {
- String dispatchKey = "{" + nsUri + "}" + localPart;
- String faultString = ServerMessages.DISPATCH_CANNOT_FIND_METHOD(dispatchKey);
- throw new DispatchException(SOAPFaultBuilder.createSOAPFaultMessage(
- binding.getSOAPVersion(), faultString, binding.getSOAPVersion().faultCodeClient));
- }
- return op;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SDDocumentResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SDDocumentResolver.java
deleted file mode 100644
index 5008a52a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SDDocumentResolver.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.server.SDDocument;
-
-/**
- * Resolves a systemId to {@link SDDocument}
- *
- * @author Jitendra Kotamraju
- */
-public interface SDDocumentResolver {
- /**
- * returns {@link SDDocument} for the give systemId.
- *
- * @param systemId document's systemId
- * @return document for the systemId, null if it cannot resolve.
- */
- @Nullable SDDocument resolve(String systemId);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SOAPActionBasedOperationFinder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SOAPActionBasedOperationFinder.java
deleted file mode 100644
index 8a4082fd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SOAPActionBasedOperationFinder.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2007, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.WSDLOperationMapping;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.model.AbstractSEIModelImpl;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-
-import javax.xml.namespace.QName;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * An {@link WSDLOperationFinder} that uses SOAPAction as the key for dispatching.
- * <p/>
- * A map of all SOAPAction on the port and the corresponding WSDL operation QName
- * is initialized in the constructor. The SOAPAction from the
- * request {@link com.sun.xml.internal.ws.api.message.Packet} is used as the key to identify the associated wsdl operation.
- *
- * @author Jitendra Kotamraju
- */
-final class SOAPActionBasedOperationFinder extends WSDLOperationFinder {
- private final Map<String, WSDLOperationMapping> methodHandlers;
-
- public SOAPActionBasedOperationFinder(WSDLPort wsdlModel, WSBinding binding, @Nullable SEIModel seiModel) {
- super(wsdlModel,binding,seiModel);
- methodHandlers = new HashMap<String, WSDLOperationMapping>();
-
- // Find if any SOAPAction repeat for operations
- Map<String, Integer> unique = new HashMap<String, Integer>();
- if (seiModel != null) {
- for (JavaMethodImpl m : ((AbstractSEIModelImpl) seiModel).getJavaMethods()) {
- String soapAction = m.getSOAPAction();
- Integer count = unique.get(soapAction);
- if (count == null) {
- unique.put(soapAction, 1);
- } else {
- unique.put(soapAction, ++count);
- }
- }
-
- for (JavaMethodImpl m : ((AbstractSEIModelImpl) seiModel).getJavaMethods()) {
- String soapAction = m.getSOAPAction();
- // Set up method handlers only for unique SOAPAction values so
- // that dispatching happens consistently for a method
- if (unique.get(soapAction) == 1) {
- methodHandlers.put('"' + soapAction + '"', wsdlOperationMapping(m));
- }
- }
- } else {
- for(WSDLBoundOperation wsdlOp: wsdlModel.getBinding().getBindingOperations()) {
- methodHandlers.put(wsdlOp.getSOAPAction(), wsdlOperationMapping(wsdlOp));
- }
- }
-
- }
-
-// public QName getWSDLOperationQName(Packet request) {
- public WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException {
- return request.soapAction == null ? null : methodHandlers.get(request.soapAction);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/WSDLOperationFinder.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/WSDLOperationFinder.java
deleted file mode 100644
index 16677c73..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/WSDLOperationFinder.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl;
-
-import com.sun.xml.internal.ws.api.message.Packet;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.WSDLOperationMapping;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.namespace.QName;
-
-/**
- * Extensions if this class will be used for dispatching the request message to the correct endpoint method by
- * identifying the wsdl operation associated with the request.
- *
- * @see OperationDispatcher
- *
- * @author Rama Pulavarthi
- */
-public abstract class WSDLOperationFinder {
- protected final WSDLPort wsdlModel;
- protected final WSBinding binding;
- protected final SEIModel seiModel;
-
- public WSDLOperationFinder(@NotNull WSDLPort wsdlModel, @NotNull WSBinding binding, @Nullable SEIModel seiModel) {
- this.wsdlModel = wsdlModel;
- this.binding = binding;
- this.seiModel= seiModel;
- }
-
- /**
- * This methods returns the QName of the WSDL operation correponding to a request Packet.
- * An implementation should return null when it cannot dispatch to a unique method based on the information it processes.
- * In such case, other OperationFinders are queried to resolve a WSDL operation.
- * It should throw an instance of DispatchException if it finds incorrect information in the packet.
- *
- * @deprecated use getWSDLOperationMapping(Packet request)
- *
- * @param request Request Packet that is used to find the associated WSDLOperation
- * @return QName of the WSDL Operation that this request correponds to.
- * null when it cannot find a unique operation to dispatch to.
- * @throws DispatchException When the information in the Packet is invalid
- */
- public QName getWSDLOperationQName(Packet request) throws DispatchException {
- WSDLOperationMapping m = getWSDLOperationMapping(request);
- return m != null ? m.getOperationName() : null;
- }
-
- public WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException {
- return null;
- }
-
- protected WSDLOperationMapping wsdlOperationMapping(JavaMethodImpl j) {
- return new WSDLOperationMappingImpl(j.getOperation(), j);
- }
-
- protected WSDLOperationMapping wsdlOperationMapping(WSDLBoundOperation o) {
- return new WSDLOperationMappingImpl(o, null);
- }
-
- static class WSDLOperationMappingImpl implements WSDLOperationMapping {
- private WSDLBoundOperation wsdlOperation;
- private JavaMethod javaMethod;
- private QName operationName;
-
- WSDLOperationMappingImpl(WSDLBoundOperation wsdlOperation, JavaMethodImpl javaMethod) {
- this.wsdlOperation = wsdlOperation;
- this.javaMethod = javaMethod;
- operationName = (javaMethod != null) ? javaMethod.getOperationQName() : wsdlOperation.getName();
- }
-
- public WSDLBoundOperation getWSDLBoundOperation() {
- return wsdlOperation;
- }
-
- public JavaMethod getJavaMethod() {
- return javaMethod;
- }
-
- public QName getOperationName() {
- return operationName;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/DelegatingParserExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/DelegatingParserExtension.java
deleted file mode 100644
index d02d9c4f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/DelegatingParserExtension.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.wsdl.parser;
-
-import com.sun.xml.internal.ws.api.model.wsdl.editable.*;
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtensionContext;
-
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * Delegate to another {@link WSDLParserExtension}
- * useful for the base class for filtering.
- *
- * @author Kohsuke Kawaguchi
- */
-class DelegatingParserExtension extends WSDLParserExtension {
- protected final WSDLParserExtension core;
-
- public DelegatingParserExtension(WSDLParserExtension core) {
- this.core = core;
- }
-
- public void start(WSDLParserExtensionContext context) {
- core.start(context);
- }
-
- public void serviceAttributes(EditableWSDLService service, XMLStreamReader reader) {
- core.serviceAttributes(service, reader);
- }
-
- public boolean serviceElements(EditableWSDLService service, XMLStreamReader reader) {
- return core.serviceElements(service, reader);
- }
-
- public void portAttributes(EditableWSDLPort port, XMLStreamReader reader) {
- core.portAttributes(port, reader);
- }
-
- public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
- return core.portElements(port, reader);
- }
-
- public boolean portTypeOperationInput(EditableWSDLOperation op, XMLStreamReader reader) {
- return core.portTypeOperationInput(op, reader);
- }
-
- public boolean portTypeOperationOutput(EditableWSDLOperation op, XMLStreamReader reader) {
- return core.portTypeOperationOutput(op, reader);
- }
-
- public boolean portTypeOperationFault(EditableWSDLOperation op, XMLStreamReader reader) {
- return core.portTypeOperationFault(op, reader);
- }
-
- public boolean definitionsElements(XMLStreamReader reader) {
- return core.definitionsElements(reader);
- }
-
- public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
- return core.bindingElements(binding, reader);
- }
-
- public void bindingAttributes(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
- core.bindingAttributes(binding, reader);
- }
-
- public boolean portTypeElements(EditableWSDLPortType portType, XMLStreamReader reader) {
- return core.portTypeElements(portType, reader);
- }
-
- public void portTypeAttributes(EditableWSDLPortType portType, XMLStreamReader reader) {
- core.portTypeAttributes(portType, reader);
- }
-
- public boolean portTypeOperationElements(EditableWSDLOperation operation, XMLStreamReader reader) {
- return core.portTypeOperationElements(operation, reader);
- }
-
- public void portTypeOperationAttributes(EditableWSDLOperation operation, XMLStreamReader reader) {
- core.portTypeOperationAttributes(operation, reader);
- }
-
- public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- return core.bindingOperationElements(operation, reader);
- }
-
- public void bindingOperationAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- core.bindingOperationAttributes(operation, reader);
- }
-
- public boolean messageElements(EditableWSDLMessage msg, XMLStreamReader reader) {
- return core.messageElements(msg, reader);
- }
-
- public void messageAttributes(EditableWSDLMessage msg, XMLStreamReader reader) {
- core.messageAttributes(msg, reader);
- }
-
- public boolean portTypeOperationInputElements(EditableWSDLInput input, XMLStreamReader reader) {
- return core.portTypeOperationInputElements(input, reader);
- }
-
- public void portTypeOperationInputAttributes(EditableWSDLInput input, XMLStreamReader reader) {
- core.portTypeOperationInputAttributes(input, reader);
- }
-
- public boolean portTypeOperationOutputElements(EditableWSDLOutput output, XMLStreamReader reader) {
- return core.portTypeOperationOutputElements(output, reader);
- }
-
- public void portTypeOperationOutputAttributes(EditableWSDLOutput output, XMLStreamReader reader) {
- core.portTypeOperationOutputAttributes(output, reader);
- }
-
- public boolean portTypeOperationFaultElements(EditableWSDLFault fault, XMLStreamReader reader) {
- return core.portTypeOperationFaultElements(fault, reader);
- }
-
- public void portTypeOperationFaultAttributes(EditableWSDLFault fault, XMLStreamReader reader) {
- core.portTypeOperationFaultAttributes(fault, reader);
- }
-
- public boolean bindingOperationInputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- return core.bindingOperationInputElements(operation, reader);
- }
-
- public void bindingOperationInputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- core.bindingOperationInputAttributes(operation, reader);
- }
-
- public boolean bindingOperationOutputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- return core.bindingOperationOutputElements(operation, reader);
- }
-
- public void bindingOperationOutputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- core.bindingOperationOutputAttributes(operation, reader);
- }
-
- public boolean bindingOperationFaultElements(EditableWSDLBoundFault fault, XMLStreamReader reader) {
- return core.bindingOperationFaultElements(fault, reader);
- }
-
- public void bindingOperationFaultAttributes(EditableWSDLBoundFault fault, XMLStreamReader reader) {
- core.bindingOperationFaultAttributes(fault, reader);
- }
-
- public void finished(WSDLParserExtensionContext context) {
- core.finished(context);
- }
-
- public void postFinished(WSDLParserExtensionContext context) {
- core.postFinished(context);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/EntityResolverWrapper.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/EntityResolverWrapper.java
deleted file mode 100644
index e762275f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/EntityResolverWrapper.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.parser;
-
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.api.wsdl.parser.XMLEntityResolver;
-import com.sun.xml.internal.ws.streaming.TidyXMLStreamReader;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-/**
- * Wraps {@link EntityResolver} into {@link com.sun.xml.internal.ws.api.wsdl.parser.XMLEntityResolver}.
- *
- * @author Kohsuke Kawaguchi
- */
-final class EntityResolverWrapper implements XMLEntityResolver {
- private final EntityResolver core;
- private boolean useStreamFromEntityResolver = false;
-
- public EntityResolverWrapper(EntityResolver core) {
- this.core = core;
- }
-
- public EntityResolverWrapper(EntityResolver core, boolean useStreamFromEntityResolver) {
- this.core = core;
- this.useStreamFromEntityResolver = useStreamFromEntityResolver;
- }
-
- public Parser resolveEntity(String publicId, String systemId) throws SAXException, IOException {
- InputSource source = core.resolveEntity(publicId,systemId);
- if(source==null)
- return null; // default
-
- // ideally entity resolvers should be giving us the system ID for the resource
- // (or otherwise we won't be able to resolve references within this imported WSDL correctly),
- // but if none is given, the system ID before the entity resolution is better than nothing.
- if(source.getSystemId()!=null)
- systemId = source.getSystemId();
-
- URL url = new URL(systemId);
- InputStream stream;
- if (useStreamFromEntityResolver) {
- stream = source.getByteStream();
- } else {
- stream = url.openStream();
- }
- return new Parser(url,
- new TidyXMLStreamReader(XMLStreamReaderFactory.create(url.toExternalForm(), stream, true), stream));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ErrorHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ErrorHandler.java
deleted file mode 100644
index b9d4ee0f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ErrorHandler.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.parser;
-
-import javax.xml.ws.WebServiceException;
-
-
-/**
- * listen to static errors found during building a the WSDL Model.
- *
- * @author Vivek Pandey
- */
-public interface ErrorHandler {
- /**
- * Receives a notification for an error in the annotated code.
- */
- void error( Throwable e );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/FoolProofParserExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/FoolProofParserExtension.java
deleted file mode 100644
index 414ccc9d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/FoolProofParserExtension.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.wsdl.parser;
-
-
-import com.sun.xml.internal.ws.api.model.wsdl.editable.*;
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * {@link WSDLParserExtension} filter that checks if
- * another {@link WSDLParserExtension} is following the contract.
- *
- * <p>
- * This code protects the JAX-WS RI from broken extensions.
- *
- * <p>
- * For now it just checks if {@link XMLStreamReader} is placed
- * at the expected start/end element.
- *
- * @author Kohsuke Kawaguchi
- */
-final class FoolProofParserExtension extends DelegatingParserExtension {
-
- public FoolProofParserExtension(WSDLParserExtension core) {
- super(core);
- }
-
- private QName pre(XMLStreamReader xsr) {
- return xsr.getName();
- }
-
- private boolean post(QName tagName, XMLStreamReader xsr, boolean result) {
- if(!tagName.equals(xsr.getName()))
- return foundFool();
- if(result) {
- if(xsr.getEventType()!=XMLStreamConstants.END_ELEMENT)
- foundFool();
- } else {
- if(xsr.getEventType()!=XMLStreamConstants.START_ELEMENT)
- foundFool();
- }
- return result;
- }
-
- private boolean foundFool() {
- throw new AssertionError("XMLStreamReader is placed at the wrong place after invoking "+core);
- }
-
- public boolean serviceElements(EditableWSDLService service, XMLStreamReader reader) {
- return post(pre(reader),reader,super.serviceElements(service, reader));
- }
-
- public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
- return post(pre(reader),reader,super.portElements(port, reader));
- }
-
- public boolean definitionsElements(XMLStreamReader reader) {
- return post(pre(reader),reader,super.definitionsElements(reader));
- }
-
- public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
- return post(pre(reader),reader,super.bindingElements(binding, reader));
- }
-
- public boolean portTypeElements(EditableWSDLPortType portType, XMLStreamReader reader) {
- return post(pre(reader),reader,super.portTypeElements(portType, reader));
- }
-
- public boolean portTypeOperationElements(EditableWSDLOperation operation, XMLStreamReader reader) {
- return post(pre(reader),reader,super.portTypeOperationElements(operation, reader));
- }
-
- public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- return post(pre(reader),reader,super.bindingOperationElements(operation, reader));
- }
-
- public boolean messageElements(EditableWSDLMessage msg, XMLStreamReader reader) {
- return post(pre(reader),reader,super.messageElements(msg, reader));
- }
-
- public boolean portTypeOperationInputElements(EditableWSDLInput input, XMLStreamReader reader) {
- return post(pre(reader),reader,super.portTypeOperationInputElements(input, reader));
- }
-
- public boolean portTypeOperationOutputElements(EditableWSDLOutput output, XMLStreamReader reader) {
- return post(pre(reader),reader,super.portTypeOperationOutputElements(output, reader));
- }
-
- public boolean portTypeOperationFaultElements(EditableWSDLFault fault, XMLStreamReader reader) {
- return post(pre(reader),reader,super.portTypeOperationFaultElements(fault, reader));
- }
-
- public boolean bindingOperationInputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- return super.bindingOperationInputElements(operation, reader);
- }
-
- public boolean bindingOperationOutputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- return post(pre(reader),reader,super.bindingOperationOutputElements(operation, reader));
- }
-
- public boolean bindingOperationFaultElements(EditableWSDLBoundFault fault, XMLStreamReader reader) {
- return post(pre(reader),reader,super.bindingOperationFaultElements(fault, reader));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/InaccessibleWSDLException.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/InaccessibleWSDLException.java
deleted file mode 100644
index 17bb0e1c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/InaccessibleWSDLException.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.parser;
-
-import javax.xml.ws.WebServiceException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * A list of {@link InaccessibleWSDLException} wrapped in one exception.
- *
- * <p>
- * This exception is used to report all the errors during WSDL parsing from {@link RuntimeWSDLParser#parse(java.net.URL, javax.xml.transform.Source, org.xml.sax.EntityResolver, boolean, com.sun.xml.internal.ws.api.server.Container, com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension[])}
- *
- * @author Vivek Pandey
- */
-public class InaccessibleWSDLException extends WebServiceException {
-
- private final List<Throwable> errors;
-
- private static final long serialVersionUID = 1L;
-
- public InaccessibleWSDLException(List<Throwable> errors) {
- super(errors.size()+" counts of InaccessibleWSDLException.\n");
- assert !errors.isEmpty() : "there must be at least one error";
- this.errors = Collections.unmodifiableList(new ArrayList<Throwable>(errors));
- }
-
- public String toString() {
- StringBuilder sb = new StringBuilder(super.toString());
- sb.append('\n');
-
- for( Throwable error : errors )
- sb.append(error.toString()).append('\n');
-
- return sb.toString();
- }
-
- /**
- * Returns a read-only list of {@link InaccessibleWSDLException}s
- * wrapped in this exception.
- *
- * @return
- * a non-null list.
- */
- public List<Throwable> getErrors() {
- return errors;
- }
-
- public static class Builder implements ErrorHandler {
- private final List<Throwable> list = new ArrayList<Throwable>();
- public void error(Throwable e) {
- list.add(e);
- }
- /**
- * If an error was reported, throw the exception.
- * Otherwise exit normally.
- */
- public void check() throws InaccessibleWSDLException {
- if(list.isEmpty())
- return;
- throw new InaccessibleWSDLException(list);
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MIMEConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MIMEConstants.java
deleted file mode 100644
index 474934d5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MIMEConstants.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.parser;
-
-import javax.xml.namespace.QName;
-
-
-interface MIMEConstants {
-
- // namespace URIs
- static final String NS_WSDL_MIME = "http://schemas.xmlsoap.org/wsdl/mime/";
-
- // QNames
- static final QName QNAME_CONTENT = new QName(NS_WSDL_MIME, "content");
- static final QName QNAME_MULTIPART_RELATED = new QName(NS_WSDL_MIME, "multipartRelated");
- static final QName QNAME_PART = new QName(NS_WSDL_MIME, "part");
- static final QName QNAME_MIME_XML = new QName(NS_WSDL_MIME, "mimeXml");
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MemberSubmissionAddressingWSDLParserExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MemberSubmissionAddressingWSDLParserExtension.java
deleted file mode 100644
index e259b3a6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MemberSubmissionAddressingWSDLParserExtension.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.wsdl.parser;
-
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLFeaturedObject;
-import com.sun.xml.internal.ws.api.model.wsdl.editable.*;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * Member Submission WS-Addressing Runtime WSDL parser extension
- *
- * @author Arun Gupta
- */
-public class MemberSubmissionAddressingWSDLParserExtension extends W3CAddressingWSDLParserExtension {
- @Override
- public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
- return addressibleElement(reader, binding);
- }
-
- @Override
- public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
- return addressibleElement(reader, port);
- }
-
- private boolean addressibleElement(XMLStreamReader reader, WSDLFeaturedObject binding) {
- QName ua = reader.getName();
- if (ua.equals(AddressingVersion.MEMBER.wsdlExtensionTag)) {
- String required = reader.getAttributeValue(WSDLConstants.NS_WSDL, "required");
- binding.addFeature(new MemberSubmissionAddressingFeature(Boolean.parseBoolean(required)));
- XMLStreamReaderUtil.skipElement(reader);
- return true; // UsingAddressing is consumed
- }
-
- return false;
- }
-
- @Override
- public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- return false;
- }
-
- @Override
- protected void patchAnonymousDefault(EditableWSDLBoundPortType binding) {
- }
-
- @Override
- protected String getNamespaceURI() {
- return AddressingVersion.MEMBER.wsdlNsUri;
- }
-
- @Override
- protected QName getWsdlActionTag() {
- return AddressingVersion.MEMBER.wsdlActionTag;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MexEntityResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MexEntityResolver.java
deleted file mode 100644
index bcc4065b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MexEntityResolver.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.parser;
-
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferResult;
-import com.sun.xml.internal.ws.api.server.SDDocumentSource;
-import com.sun.xml.internal.ws.api.wsdl.parser.XMLEntityResolver;
-import com.sun.xml.internal.ws.util.JAXWSUtils;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import org.xml.sax.SAXException;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.ws.WebServiceException;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Entity resolver that works on MEX Metadata
- *
- * @author Vivek Pandey
- */
-public final class MexEntityResolver implements XMLEntityResolver {
- private final Map<String, SDDocumentSource> wsdls = new HashMap<String, SDDocumentSource>();
-
- public MexEntityResolver(List<? extends Source> wsdls) throws IOException {
- Transformer transformer = XmlUtil.newTransformer();
- for (Source source : wsdls) {
- XMLStreamBufferResult xsbr = new XMLStreamBufferResult();
- try {
- transformer.transform(source, xsbr);
- } catch (TransformerException e) {
- throw new WebServiceException(e);
- }
- String systemId = source.getSystemId();
-
- //TODO: can we do anything if the given mex Source has no systemId?
- if(systemId != null){
- SDDocumentSource doc = SDDocumentSource.create(JAXWSUtils.getFileOrURL(systemId), xsbr.getXMLStreamBuffer());
- this.wsdls.put(systemId, doc);
- }
- }
- }
-
- public Parser resolveEntity(String publicId, String systemId) throws SAXException, IOException, XMLStreamException {
- if (systemId != null) {
- SDDocumentSource src = wsdls.get(systemId);
- if (src != null)
- return new Parser(src);
- }
- return null;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ParserUtil.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ParserUtil.java
deleted file mode 100644
index d5dcc755..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ParserUtil.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.parser;
-
-
-import com.sun.xml.internal.ws.streaming.Attributes;
-import com.sun.xml.internal.ws.streaming.XMLReaderException;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-
-
-/**
- *
- * TODO: made public just for now
- * @author WS Development Team
- */
-public class ParserUtil {
- public static String getAttribute(XMLStreamReader reader, String name) {
- return reader.getAttributeValue(null, name);
- }
-
- public static String getAttribute(XMLStreamReader reader, String nsUri, String name) {
- return reader.getAttributeValue(nsUri, name);
- }
-
- public static String getAttribute(XMLStreamReader reader, QName name) {
- return reader.getAttributeValue(name.getNamespaceURI(), name.getLocalPart());
- }
-
- public static QName getQName(XMLStreamReader reader, String tag){
- String localName = XmlUtil.getLocalPart(tag);
- String pfix = XmlUtil.getPrefix(tag);
- String uri = reader.getNamespaceURI(fixNull(pfix));
- return new QName(uri, localName);
- }
-
- public static String getMandatoryNonEmptyAttribute(XMLStreamReader reader,
- String name) {
-// String value = getAttribute(reader, name);
- String value = reader.getAttributeValue(null, name);
-
- if (value == null) {
- failWithLocalName("client.missing.attribute", reader, name);
- } else if (value.equals("")) {
- failWithLocalName("client.invalidAttributeValue", reader, name);
- }
-
- return value;
- }
-
- public static void failWithFullName(String key, XMLStreamReader reader) {
-// throw new WebServicesClientException(key,
-// new Object[]{
-// Integer.toString(reader.getLineNumber()),
-// reader.getName().toString()});
- }
-
- public static void failWithLocalName(String key, XMLStreamReader reader) {
- //throw new WebServicesClientException(key,
- // new Object[]{
- // Integer.toString(reader.getLineNumber()),
- // reader.getLocalName()});
- }
-
- public static void failWithLocalName(String key, XMLStreamReader reader,
- String arg) {
- //throw new WebServicesClientException(key,
- // new Object[]{
- // Integer.toString(reader.getLineNumber()),
- // reader.getLocalName(),
- // arg});
- }
-
- private static @NotNull String fixNull(@Nullable String s) {
- if (s == null) return "";
- else return s;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/RuntimeWSDLParser.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/RuntimeWSDLParser.java
deleted file mode 100644
index 2fb01c79..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/RuntimeWSDLParser.java
+++ /dev/null
@@ -1,1047 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.wsdl.parser;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBuffer;
-import com.sun.xml.internal.stream.buffer.XMLStreamBufferMark;
-import com.sun.xml.internal.stream.buffer.stax.StreamReaderBufferCreator;
-import com.sun.xml.internal.ws.api.BindingID;
-import com.sun.xml.internal.ws.api.BindingIDFactory;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.EndpointAddress;
-import com.sun.xml.internal.ws.api.WSDLLocator;
-import com.sun.xml.internal.ws.api.policy.PolicyResolver;
-import com.sun.xml.internal.ws.api.policy.PolicyResolverFactory;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
-import com.sun.xml.internal.ws.api.model.ParameterBinding;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLDescriptorKind;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
-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.EditableWSDLModel;
-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.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.api.server.Container;
-import com.sun.xml.internal.ws.api.server.ContainerResolver;
-import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory;
-import com.sun.xml.internal.ws.api.wsdl.parser.MetaDataResolver;
-import com.sun.xml.internal.ws.api.wsdl.parser.MetadataResolverFactory;
-import com.sun.xml.internal.ws.api.wsdl.parser.ServiceDescriptor;
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
-import com.sun.xml.internal.ws.api.wsdl.parser.XMLEntityResolver;
-import com.sun.xml.internal.ws.api.wsdl.parser.XMLEntityResolver.Parser;
-import com.sun.xml.internal.ws.model.wsdl.*;
-import com.sun.xml.internal.ws.resources.ClientMessages;
-import com.sun.xml.internal.ws.resources.WsdlmodelMessages;
-import com.sun.xml.internal.ws.streaming.SourceReaderFactory;
-import com.sun.xml.internal.ws.streaming.TidyXMLStreamReader;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-import com.sun.xml.internal.ws.util.ServiceFinder;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import com.sun.xml.internal.ws.policy.jaxws.PolicyWSDLParserExtension;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.SAXException;
-
-import javax.jws.soap.SOAPBinding.Style;
-import javax.xml.namespace.QName;
-import javax.xml.stream.*;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.FilterInputStream;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.*;
-import java.util.logging.Logger;
-
-/**
- * Parses WSDL and builds {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLModel}.
- *
- * @author Vivek Pandey
- * @author Rama Pulavarthi
- */
-public class RuntimeWSDLParser {
-
- private final EditableWSDLModel wsdlDoc;
- /**
- * Target namespace URI of the WSDL that we are currently parsing.
- */
- private String targetNamespace;
- /**
- * System IDs of WSDLs that are already read.
- */
- private final Set<String> importedWSDLs = new HashSet<String>();
- /**
- * Must not be null.
- */
- private final XMLEntityResolver resolver;
-
- private final PolicyResolver policyResolver;
-
- /**
- * The {@link WSDLParserExtension}. Always non-null.
- */
- private final WSDLParserExtension extensionFacade;
-
- private final WSDLParserExtensionContextImpl context;
-
- List<WSDLParserExtension> extensions;
-
- //Capture namespaces declared on the ancestors of wsa:EndpointReference, so that valid XmlStreamBuffer is created
- // from the EndpointReference fragment.
- Map<String, String> wsdldef_nsdecl = new HashMap<String, String>();
- Map<String, String> service_nsdecl = new HashMap<String, String>();
- Map<String, String> port_nsdecl = new HashMap<String, String>();
-
- /**
- * Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL
- * document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found
- * then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'.
- *
- * @param wsdlLoc
- * 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,
- */
- public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
- boolean isClientSide, Container container,
- WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
- return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, Service.class, PolicyResolverFactory.create(),extensions);
- }
-
- /**
- * Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL
- * document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found
- * then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'.
- *
- * @param wsdlLoc
- * 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,
- */
- public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
- boolean isClientSide, Container container, Class serviceClass,
- WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
- return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, serviceClass, PolicyResolverFactory.create(),extensions);
- }
-
- /**
- * Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL
- * document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found
- * then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'.
- *
- * @param wsdlLoc
- * 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,
- */
- public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
- boolean isClientSide, Container container, @NotNull PolicyResolver policyResolver,
- WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
- return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, Service.class, policyResolver, extensions);
- }
-
- /**
- * Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL
- * document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found
- * then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'.
- *
- * @param wsdlLoc
- * 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,
- */
- public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
- boolean isClientSide, Container container, Class serviceClass,
- @NotNull PolicyResolver policyResolver,
- WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
- return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, serviceClass, policyResolver, false, extensions);
- }
-
- /**
- * Parses the WSDL and gives WSDLModel. If wsdl parameter is null, then wsdlLoc is used to get the WSDL. If the WSDL
- * document could not be obtained then {@link MetadataResolverFactory} is tried to get the WSDL document, if not found
- * then as last option, if the wsdlLoc has no '?wsdl' as query parameter then it is tried by appending '?wsdl'.
- *
- * @param wsdlLoc
- * 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,
- */
- public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver,
- boolean isClientSide, Container container, Class serviceClass,
- @NotNull PolicyResolver policyResolver,
- boolean isUseStreamFromEntityResolverWrapper,
- WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
- assert resolver != null;
-
- RuntimeWSDLParser wsdlParser = new RuntimeWSDLParser(wsdlSource.getSystemId(), new EntityResolverWrapper(resolver, isUseStreamFromEntityResolverWrapper), isClientSide, container, policyResolver, extensions);
- Parser parser;
- try{
- parser = wsdlParser.resolveWSDL(wsdlLoc, wsdlSource, serviceClass);
- if(!hasWSDLDefinitions(parser.parser)){
- throw new XMLStreamException(ClientMessages.RUNTIME_WSDLPARSER_INVALID_WSDL(parser.systemId,
- WSDLConstants.QNAME_DEFINITIONS, parser.parser.getName(), parser.parser.getLocation()));
- }
- }catch(XMLStreamException e){
- //Try MEX if there is WSDLLoc available
- if(wsdlLoc == null)
- throw e;
- return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions);
-
- }catch(IOException e){
- //Try MEX if there is WSDLLoc available
- if(wsdlLoc == null)
- throw e;
- return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, serviceClass, policyResolver, extensions);
- }
- wsdlParser.extensionFacade.start(wsdlParser.context);
- wsdlParser.parseWSDL(parser, false);
- wsdlParser.wsdlDoc.freeze();
- wsdlParser.extensionFacade.finished(wsdlParser.context);
- wsdlParser.extensionFacade.postFinished(wsdlParser.context);
-
- if(wsdlParser.wsdlDoc.getServices().isEmpty())
- throw new WebServiceException(ClientMessages.WSDL_CONTAINS_NO_SERVICE(wsdlLoc));
-
- return wsdlParser.wsdlDoc;
- }
-
- private static WSDLModel tryWithMex(@NotNull RuntimeWSDLParser wsdlParser, @NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Throwable e, Class serviceClass, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws SAXException, XMLStreamException {
- ArrayList<Throwable> exceptions = new ArrayList<Throwable>();
- try {
- WSDLModel wsdlModel = wsdlParser.parseUsingMex(wsdlLoc, resolver, isClientSide, container, serviceClass, policyResolver,extensions);
- if(wsdlModel == null){
- throw new WebServiceException(ClientMessages.FAILED_TO_PARSE(wsdlLoc.toExternalForm(), e.getMessage()), e);
- }
- return wsdlModel;
- } catch (URISyntaxException e1) {
- exceptions.add(e);
- exceptions.add(e1);
- } catch(IOException e1){
- exceptions.add(e);
- exceptions.add(e1);
- }
- throw new InaccessibleWSDLException(exceptions);
- }
-
- private WSDLModel parseUsingMex(@NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Class serviceClass, PolicyResolver policyResolver, WSDLParserExtension[] extensions) throws IOException, SAXException, XMLStreamException, URISyntaxException {
- //try MEX
- MetaDataResolver mdResolver = null;
- ServiceDescriptor serviceDescriptor = null;
- RuntimeWSDLParser wsdlParser = null;
-
- //Currently we try the first available MetadataResolverFactory that gives us a WSDL document
- for (MetadataResolverFactory resolverFactory : ServiceFinder.find(MetadataResolverFactory.class)) {
- mdResolver = resolverFactory.metadataResolver(resolver);
- serviceDescriptor = mdResolver.resolve(wsdlLoc.toURI());
- //we got the ServiceDescriptor, now break
- if (serviceDescriptor != null)
- break;
- }
- if (serviceDescriptor != null) {
- List<? extends Source> wsdls = serviceDescriptor.getWSDLs();
- wsdlParser = new RuntimeWSDLParser(wsdlLoc.toExternalForm(), new MexEntityResolver(wsdls), isClientSide, container, policyResolver, extensions);
- wsdlParser.extensionFacade.start(wsdlParser.context);
-
- for(Source src: wsdls ) {
- String systemId = src.getSystemId();
- Parser parser = wsdlParser.resolver.resolveEntity(null, systemId);
- wsdlParser.parseWSDL(parser, false);
- }
- }
- //Incase that mex is not present or it couldn't get the metadata, try by appending ?wsdl and give
- // it a last shot else fail
- if ((mdResolver == null || serviceDescriptor == null) && (wsdlLoc.getProtocol().equals("http") || wsdlLoc.getProtocol().equals("https")) && (wsdlLoc.getQuery() == null)) {
- String urlString = wsdlLoc.toExternalForm();
- urlString += "?wsdl";
- wsdlLoc = new URL(urlString);
- wsdlParser = new RuntimeWSDLParser(wsdlLoc.toExternalForm(),new EntityResolverWrapper(resolver), isClientSide, container, policyResolver, extensions);
- wsdlParser.extensionFacade.start(wsdlParser.context);
- Parser parser = resolveWSDL(wsdlLoc, new StreamSource(wsdlLoc.toExternalForm()), serviceClass);
- wsdlParser.parseWSDL(parser, false);
- }
-
- if(wsdlParser == null)
- return null;
-
- wsdlParser.wsdlDoc.freeze();
- wsdlParser.extensionFacade.finished(wsdlParser.context);
- wsdlParser.extensionFacade.postFinished(wsdlParser.context);
- return wsdlParser.wsdlDoc;
- }
-
- private static boolean hasWSDLDefinitions(XMLStreamReader reader) {
- XMLStreamReaderUtil.nextElementContent(reader);
- return reader.getName().equals(WSDLConstants.QNAME_DEFINITIONS);
- }
-
- public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
- assert resolver != null;
- RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, policyResolver, extensions);
- parser.extensionFacade.start(parser.context);
- parser.parseWSDL(wsdl, false);
- parser.wsdlDoc.freeze();
- parser.extensionFacade.finished(parser.context);
- parser.extensionFacade.postFinished(parser.context);
- return parser.wsdlDoc;
- }
-
- public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
- assert resolver != null;
- RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, PolicyResolverFactory.create(), extensions);
- parser.extensionFacade.start(parser.context);
- parser.parseWSDL(wsdl, false);
- parser.wsdlDoc.freeze();
- parser.extensionFacade.finished(parser.context);
- parser.extensionFacade.postFinished(parser.context);
- return parser.wsdlDoc;
- }
-
- private RuntimeWSDLParser(@NotNull String sourceLocation, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) {
- this.wsdlDoc = sourceLocation!=null ? new WSDLModelImpl(sourceLocation) : new WSDLModelImpl();
- this.resolver = resolver;
- this.policyResolver = policyResolver;
- this.extensions = new ArrayList<WSDLParserExtension>();
- this.context = new WSDLParserExtensionContextImpl(wsdlDoc, isClientSide, container, policyResolver);
-
- boolean isPolicyExtensionFound = false;
- for (WSDLParserExtension e : extensions) {
- if (e instanceof com.sun.xml.internal.ws.api.wsdl.parser.PolicyWSDLParserExtension)
- isPolicyExtensionFound = true;
- register(e);
- }
-
- // register handlers for default extensions
- if (!isPolicyExtensionFound)
- register(new PolicyWSDLParserExtension());
- register(new MemberSubmissionAddressingWSDLParserExtension());
- register(new W3CAddressingWSDLParserExtension());
- register(new W3CAddressingMetadataWSDLParserExtension());
-
- this.extensionFacade = new WSDLParserExtensionFacade(this.extensions.toArray(new WSDLParserExtension[0]));
- }
-
- private Parser resolveWSDL(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, Class serviceClass) throws IOException, SAXException, XMLStreamException {
- String systemId = wsdlSource.getSystemId();
-
- XMLEntityResolver.Parser parser = resolver.resolveEntity(null, systemId);
- if (parser == null && wsdlLoc != null) {
- String exForm = wsdlLoc.toExternalForm();
- parser = resolver.resolveEntity(null, exForm);
-
- if (parser == null && serviceClass != null) {
- URL ru = serviceClass.getResource(".");
- if (ru != null) {
- String ruExForm = ru.toExternalForm();
- if (exForm.startsWith(ruExForm)) {
- parser = resolver.resolveEntity(null, exForm.substring(ruExForm.length()));
- }
- }
- }
- }
- if (parser == null) {
- //If a WSDL source is provided that is known to be readable, then
- //prioritize that over the URL - this avoids going over the network
- //an additional time if a valid WSDL Source is provided - Deva Sagar 09/20/2011
- if (isKnownReadableSource(wsdlSource)) {
- parser = new Parser(wsdlLoc, createReader(wsdlSource));
- } else if (wsdlLoc != null) {
- parser = new Parser(wsdlLoc, createReader(wsdlLoc, serviceClass));
- }
-
- //parser could still be null if isKnownReadableSource returns
- //false and wsdlLoc is also null. Fall back to using Source based
- //parser since Source is not null
- if (parser == null) {
- parser = new Parser(wsdlLoc, createReader(wsdlSource));
- }
- }
- return parser;
- }
-
- private boolean isKnownReadableSource(Source wsdlSource) {
- if (wsdlSource instanceof StreamSource) {
- return (((StreamSource) wsdlSource).getInputStream() != null ||
- ((StreamSource) wsdlSource).getReader() != null);
- } else {
- return false;
- }
- }
-
- private XMLStreamReader createReader(@NotNull Source src) throws XMLStreamException {
- return new TidyXMLStreamReader(SourceReaderFactory.createSourceReader(src, true), null);
- }
-
- private void parseImport(@NotNull URL wsdlLoc) throws XMLStreamException, IOException, SAXException {
- String systemId = wsdlLoc.toExternalForm();
- XMLEntityResolver.Parser parser = resolver.resolveEntity(null, systemId);
- if (parser == null) {
- parser = new Parser(wsdlLoc, createReader(wsdlLoc));
- }
- parseWSDL(parser, true);
- }
-
- private void parseWSDL(Parser parser, boolean imported) throws XMLStreamException, IOException, SAXException {
- XMLStreamReader reader = parser.parser;
- try {
- // avoid processing the same WSDL twice.
- // if no system ID is given, the check won't work
- if (parser.systemId != null && !importedWSDLs.add(parser.systemId.toExternalForm()))
- return;
-
- if(reader.getEventType() == XMLStreamConstants.START_DOCUMENT)
- XMLStreamReaderUtil.nextElementContent(reader);
- if (WSDLConstants.QNAME_DEFINITIONS.equals(reader.getName())) {
- readNSDecl(wsdldef_nsdecl, reader);
- }
- if (reader.getEventType()!= XMLStreamConstants.END_DOCUMENT && reader.getName().equals(WSDLConstants.QNAME_SCHEMA)) {
- if (imported) {
- // wsdl:import could be a schema. Relaxing BP R2001 requirement.
- LOGGER.warning(WsdlmodelMessages.WSDL_IMPORT_SHOULD_BE_WSDL(parser.systemId));
- return;
- }
- }
-
- //get the targetNamespace of the service
- String tns = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_TNS);
-
- final String oldTargetNamespace = targetNamespace;
- targetNamespace = tns;
-
- while (XMLStreamReaderUtil.nextElementContent(reader) !=
- XMLStreamConstants.END_ELEMENT) {
- if (reader.getEventType() == XMLStreamConstants.END_DOCUMENT)
- break;
-
- QName name = reader.getName();
- if (WSDLConstants.QNAME_IMPORT.equals(name)) {
- parseImport(parser.systemId, reader);
- } else if (WSDLConstants.QNAME_MESSAGE.equals(name)) {
- parseMessage(reader);
- } else if (WSDLConstants.QNAME_PORT_TYPE.equals(name)) {
- parsePortType(reader);
- } else if (WSDLConstants.QNAME_BINDING.equals(name)) {
- parseBinding(reader);
- } else if (WSDLConstants.QNAME_SERVICE.equals(name)) {
- parseService(reader);
- } else {
- extensionFacade.definitionsElements(reader);
- }
- }
- targetNamespace = oldTargetNamespace;
- } finally {
- this.wsdldef_nsdecl = new HashMap<String,String>();
- reader.close();
- }
- }
-
- private void parseService(XMLStreamReader reader) {
- service_nsdecl.putAll(wsdldef_nsdecl);
- readNSDecl(service_nsdecl,reader);
-
- String serviceName = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_NAME);
- EditableWSDLService service = new WSDLServiceImpl(reader,wsdlDoc,new QName(targetNamespace, serviceName));
- extensionFacade.serviceAttributes(service, reader);
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- QName name = reader.getName();
- if (WSDLConstants.QNAME_PORT.equals(name)) {
- parsePort(reader, service);
- if (reader.getEventType() != XMLStreamConstants.END_ELEMENT) {
- XMLStreamReaderUtil.next(reader);
- }
- } else {
- extensionFacade.serviceElements(service, reader);
- }
- }
- wsdlDoc.addService(service);
- service_nsdecl = new HashMap<String, String>();
- }
-
- private void parsePort(XMLStreamReader reader, EditableWSDLService service) {
- port_nsdecl.putAll(service_nsdecl);
- readNSDecl(port_nsdecl,reader);
-
- String portName = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_NAME);
- String binding = ParserUtil.getMandatoryNonEmptyAttribute(reader, "binding");
-
- QName bindingName = ParserUtil.getQName(reader, binding);
- QName portQName = new QName(service.getName().getNamespaceURI(), portName);
- EditableWSDLPort port = new WSDLPortImpl(reader,service, portQName, bindingName);
-
- extensionFacade.portAttributes(port, reader);
-
- String location;
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- QName name = reader.getName();
- if (SOAPConstants.QNAME_ADDRESS.equals(name) || SOAPConstants.QNAME_SOAP12ADDRESS.equals(name)) {
- location = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_LOCATION);
- if (location != null) {
- try {
- port.setAddress(new EndpointAddress(location));
- } catch (URISyntaxException e) {
- //Lets not throw any exception, latter on it should be thrown when invocation happens. At this
- // time user has option to set the endopint address using request contexxt property.
- }
- }
- XMLStreamReaderUtil.next(reader);
- } else if (AddressingVersion.W3C.nsUri.equals(name.getNamespaceURI()) &&
- "EndpointReference".equals(name.getLocalPart())) {
- try {
- StreamReaderBufferCreator creator = new StreamReaderBufferCreator(new MutableXMLStreamBuffer());
- XMLStreamBuffer eprbuffer = new XMLStreamBufferMark(port_nsdecl, creator);
- creator.createElementFragment(reader, false);
-
- WSEndpointReference wsepr = new WSEndpointReference(eprbuffer, AddressingVersion.W3C);
- //wsepr.toSpec().writeTo(new StreamResult(System.out));
- port.setEPR(wsepr);
- /** XMLStreamBuffer.createNewBufferFromXMLStreamReader(reader) called from inside WSEndpointReference()
- * consumes the complete EPR infoset and moves to the next element. This breaks the normal wsdl parser
- * processing where it expects anyone reading the infoset to move to the end of the element that its reading
- * and not to the next element.
- */
- if(reader.getEventType() == XMLStreamConstants.END_ELEMENT && reader.getName().equals(WSDLConstants.QNAME_PORT))
- break;
- } catch (XMLStreamException e) {
- throw new WebServiceException(e);
- }
- } else {
-
- extensionFacade.portElements(port, reader);
- }
- }
- if (port.getAddress() == null) {
- try {
- port.setAddress(new EndpointAddress(""));
- } catch (URISyntaxException e) {
- //Lets not throw any exception, latter on it should be thrown when invocation happens. At this
- //time user has option to set the endopint address using request contexxt property.
- }
- }
- service.put(portQName, port);
- port_nsdecl =new HashMap<String, String>();
- }
-
- private void parseBinding(XMLStreamReader reader) {
- String bindingName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
- String portTypeName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "type");
- if ((bindingName == null) || (portTypeName == null)) {
- //TODO: throw exception?
- //
- // wsdl:binding element for now
- XMLStreamReaderUtil.skipElement(reader);
- return;
- }
- EditableWSDLBoundPortType binding = new WSDLBoundPortTypeImpl(reader,wsdlDoc, new QName(targetNamespace, bindingName),
- ParserUtil.getQName(reader, portTypeName));
- extensionFacade.bindingAttributes(binding, reader);
-
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- QName name = reader.getName();
- if (WSDLConstants.NS_SOAP_BINDING.equals(name)) {
- String transport = reader.getAttributeValue(null, WSDLConstants.ATTR_TRANSPORT);
- binding.setBindingId(createBindingId(transport, SOAPVersion.SOAP_11));
-
- String style = reader.getAttributeValue(null, "style");
-
- if ((style != null) && (style.equals("rpc"))) {
- binding.setStyle(Style.RPC);
- } else {
- binding.setStyle(Style.DOCUMENT);
- }
- goToEnd(reader);
- } else if (WSDLConstants.NS_SOAP12_BINDING.equals(name)) {
- String transport = reader.getAttributeValue(null, WSDLConstants.ATTR_TRANSPORT);
- binding.setBindingId(createBindingId(transport, SOAPVersion.SOAP_12));
-
- String style = reader.getAttributeValue(null, "style");
- if ((style != null) && (style.equals("rpc"))) {
- binding.setStyle(Style.RPC);
- } else {
- binding.setStyle(Style.DOCUMENT);
- }
- goToEnd(reader);
- } else if (WSDLConstants.QNAME_OPERATION.equals(name)) {
- parseBindingOperation(reader, binding);
- } else {
- extensionFacade.bindingElements(binding, reader);
- }
- }
- }
-
- private static BindingID createBindingId(String transport, SOAPVersion soapVersion) {
- if (!transport.equals(SOAPConstants.URI_SOAP_TRANSPORT_HTTP)) {
- for( BindingIDFactory f : ServiceFinder.find(BindingIDFactory.class) ) {
- BindingID bindingId = f.create(transport, soapVersion);
- if(bindingId!=null) {
- return bindingId;
- }
- }
- }
- return soapVersion.equals(SOAPVersion.SOAP_11)?BindingID.SOAP11_HTTP:BindingID.SOAP12_HTTP;
- }
-
-
- private void parseBindingOperation(XMLStreamReader reader, EditableWSDLBoundPortType binding) {
- String bindingOpName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
- if (bindingOpName == null) {
- //TODO: throw exception?
- //skip wsdl:binding element for now
- XMLStreamReaderUtil.skipElement(reader);
- return;
- }
-
- QName opName = new QName(binding.getPortTypeName().getNamespaceURI(), bindingOpName);
- EditableWSDLBoundOperation bindingOp = new WSDLBoundOperationImpl(reader,binding, opName);
- binding.put(opName, bindingOp);
- extensionFacade.bindingOperationAttributes(bindingOp, reader);
-
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- QName name = reader.getName();
- String style = null;
- if (WSDLConstants.QNAME_INPUT.equals(name)) {
- parseInputBinding(reader, bindingOp);
- } else if (WSDLConstants.QNAME_OUTPUT.equals(name)) {
- parseOutputBinding(reader, bindingOp);
- } else if (WSDLConstants.QNAME_FAULT.equals(name)) {
- parseFaultBinding(reader, bindingOp);
- } else if (SOAPConstants.QNAME_OPERATION.equals(name) ||
- SOAPConstants.QNAME_SOAP12OPERATION.equals(name)) {
- style = reader.getAttributeValue(null, "style");
- String soapAction = reader.getAttributeValue(null, "soapAction");
-
- if (soapAction != null)
- bindingOp.setSoapAction(soapAction);
-
- goToEnd(reader);
- } else {
- extensionFacade.bindingOperationElements(bindingOp, reader);
- }
- /**
- * If style attribute is present set it otherwise set the style as defined
- * on the <soap:binding> element
- */
- if (style != null) {
- if (style.equals("rpc"))
- bindingOp.setStyle(Style.RPC);
- else
- bindingOp.setStyle(Style.DOCUMENT);
- } else {
- bindingOp.setStyle(binding.getStyle());
- }
- }
- }
-
- private void parseInputBinding(XMLStreamReader reader, EditableWSDLBoundOperation bindingOp) {
- boolean bodyFound = false;
- extensionFacade.bindingOperationInputAttributes(bindingOp, reader);
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- QName name = reader.getName();
- if ((SOAPConstants.QNAME_BODY.equals(name) || SOAPConstants.QNAME_SOAP12BODY.equals(name)) && !bodyFound) {
- bodyFound = true;
- bindingOp.setInputExplicitBodyParts(parseSOAPBodyBinding(reader, bindingOp, BindingMode.INPUT));
- goToEnd(reader);
- } else if ((SOAPConstants.QNAME_HEADER.equals(name) || SOAPConstants.QNAME_SOAP12HEADER.equals(name))) {
- parseSOAPHeaderBinding(reader, bindingOp.getInputParts());
- } else if (MIMEConstants.QNAME_MULTIPART_RELATED.equals(name)) {
- parseMimeMultipartBinding(reader, bindingOp, BindingMode.INPUT);
- } else {
- extensionFacade.bindingOperationInputElements(bindingOp, reader);
- }
- }
- }
-
- private void parseOutputBinding(XMLStreamReader reader, EditableWSDLBoundOperation bindingOp) {
- boolean bodyFound = false;
- extensionFacade.bindingOperationOutputAttributes(bindingOp, reader);
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- QName name = reader.getName();
- if ((SOAPConstants.QNAME_BODY.equals(name) || SOAPConstants.QNAME_SOAP12BODY.equals(name)) && !bodyFound) {
- bodyFound = true;
- bindingOp.setOutputExplicitBodyParts(parseSOAPBodyBinding(reader, bindingOp, BindingMode.OUTPUT));
- goToEnd(reader);
- } else if ((SOAPConstants.QNAME_HEADER.equals(name) || SOAPConstants.QNAME_SOAP12HEADER.equals(name))) {
- parseSOAPHeaderBinding(reader, bindingOp.getOutputParts());
- } else if (MIMEConstants.QNAME_MULTIPART_RELATED.equals(name)) {
- parseMimeMultipartBinding(reader, bindingOp, BindingMode.OUTPUT);
- } else {
- extensionFacade.bindingOperationOutputElements(bindingOp, reader);
- }
- }
- }
-
- private void parseFaultBinding(XMLStreamReader reader, EditableWSDLBoundOperation bindingOp) {
- String faultName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
- EditableWSDLBoundFault wsdlBoundFault = new WSDLBoundFaultImpl(reader, faultName, bindingOp);
- bindingOp.addFault(wsdlBoundFault);
-
- extensionFacade.bindingOperationFaultAttributes(wsdlBoundFault, reader);
-
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- extensionFacade.bindingOperationFaultElements(wsdlBoundFault, reader);
- }
- }
-
- private enum BindingMode {
- INPUT, OUTPUT, FAULT}
-
- private static boolean parseSOAPBodyBinding(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) {
- String namespace = reader.getAttributeValue(null, "namespace");
- if (mode == BindingMode.INPUT) {
- op.setRequestNamespace(namespace);
- return parseSOAPBodyBinding(reader, op.getInputParts());
- }
- //resp
- op.setResponseNamespace(namespace);
- return parseSOAPBodyBinding(reader, op.getOutputParts());
- }
-
- /**
- * Returns true if body has explicit parts declaration
- */
- private static boolean parseSOAPBodyBinding(XMLStreamReader reader, Map<String, ParameterBinding> parts) {
- String partsString = reader.getAttributeValue(null, "parts");
- if (partsString != null) {
- List<String> partsList = XmlUtil.parseTokenList(partsString);
- if (partsList.isEmpty()) {
- parts.put(" ", ParameterBinding.BODY);
- } else {
- for (String part : partsList) {
- parts.put(part, ParameterBinding.BODY);
- }
- }
- return true;
- }
- return false;
- }
-
- private static void parseSOAPHeaderBinding(XMLStreamReader reader, Map<String, ParameterBinding> parts) {
- String part = reader.getAttributeValue(null, "part");
- //if(part == null| part.equals("")||message == null || message.equals("")){
- if (part == null || part.equals("")) {
- return;
- }
-
- //lets not worry about message attribute for now, probably additional headers wont be there
- //String message = reader.getAttributeValue(null, "message");
- //QName msgName = ParserUtil.getQName(reader, message);
- parts.put(part, ParameterBinding.HEADER);
- goToEnd(reader);
- }
-
-
- private static void parseMimeMultipartBinding(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) {
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- QName name = reader.getName();
- if (MIMEConstants.QNAME_PART.equals(name)) {
- parseMIMEPart(reader, op, mode);
- } else {
- XMLStreamReaderUtil.skipElement(reader);
- }
- }
- }
-
- private static void parseMIMEPart(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) {
- boolean bodyFound = false;
- Map<String, ParameterBinding> parts = null;
- if (mode == BindingMode.INPUT) {
- parts = op.getInputParts();
- } else if (mode == BindingMode.OUTPUT) {
- parts = op.getOutputParts();
- } else if (mode == BindingMode.FAULT) {
- parts = op.getFaultParts();
- }
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- QName name = reader.getName();
- if (SOAPConstants.QNAME_BODY.equals(name) && !bodyFound) {
- bodyFound = true;
- parseSOAPBodyBinding(reader, op, mode);
- XMLStreamReaderUtil.next(reader);
- } else if (SOAPConstants.QNAME_HEADER.equals(name)) {
- bodyFound = true;
- parseSOAPHeaderBinding(reader, parts);
- XMLStreamReaderUtil.next(reader);
- } else if (MIMEConstants.QNAME_CONTENT.equals(name)) {
- String part = reader.getAttributeValue(null, "part");
- String type = reader.getAttributeValue(null, "type");
- if ((part == null) || (type == null)) {
- XMLStreamReaderUtil.skipElement(reader);
- continue;
- }
- ParameterBinding sb = ParameterBinding.createAttachment(type);
- if (parts != null && sb != null && part != null)
- parts.put(part, sb);
- XMLStreamReaderUtil.next(reader);
- } else {
- XMLStreamReaderUtil.skipElement(reader);
- }
- }
- }
-
- protected void parseImport(@Nullable URL baseURL, XMLStreamReader reader) throws IOException, SAXException, XMLStreamException {
- // expand to the absolute URL of the imported WSDL.
- String importLocation =
- ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_LOCATION);
- URL importURL;
- if(baseURL!=null)
- importURL = new URL(baseURL, importLocation);
- else // no base URL. this better be absolute
- importURL = new URL(importLocation);
- parseImport(importURL);
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- XMLStreamReaderUtil.skipElement(reader);
- }
- }
-
- private void parsePortType(XMLStreamReader reader) {
- String portTypeName = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_NAME);
- if (portTypeName == null) {
- //TODO: throw exception?
- //skip wsdl:portType element for now
- XMLStreamReaderUtil.skipElement(reader);
- return;
- }
- EditableWSDLPortType portType = new WSDLPortTypeImpl(reader,wsdlDoc, new QName(targetNamespace, portTypeName));
- extensionFacade.portTypeAttributes(portType, reader);
- wsdlDoc.addPortType(portType);
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- QName name = reader.getName();
- if (WSDLConstants.QNAME_OPERATION.equals(name)) {
- parsePortTypeOperation(reader, portType);
- } else {
- extensionFacade.portTypeElements(portType, reader);
- }
- }
- }
-
-
- private void parsePortTypeOperation(XMLStreamReader reader, EditableWSDLPortType portType) {
- String operationName = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_NAME);
- if (operationName == null) {
- //TODO: throw exception?
- //skip wsdl:portType element for now
- XMLStreamReaderUtil.skipElement(reader);
- return;
- }
-
- QName operationQName = new QName(portType.getName().getNamespaceURI(), operationName);
- EditableWSDLOperation operation = new WSDLOperationImpl(reader,portType, operationQName);
- extensionFacade.portTypeOperationAttributes(operation, reader);
- String parameterOrder = ParserUtil.getAttribute(reader, "parameterOrder");
- operation.setParameterOrder(parameterOrder);
- portType.put(operationName, operation);
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- QName name = reader.getName();
- if (name.equals(WSDLConstants.QNAME_INPUT)) {
- parsePortTypeOperationInput(reader, operation);
- } else if (name.equals(WSDLConstants.QNAME_OUTPUT)) {
- parsePortTypeOperationOutput(reader, operation);
- } else if (name.equals(WSDLConstants.QNAME_FAULT)) {
- parsePortTypeOperationFault(reader, operation);
- } else {
- extensionFacade.portTypeOperationElements(operation, reader);
- }
- }
- }
-
-
- private void parsePortTypeOperationFault(XMLStreamReader reader, EditableWSDLOperation operation) {
- String msg = ParserUtil.getMandatoryNonEmptyAttribute(reader, "message");
- QName msgName = ParserUtil.getQName(reader, msg);
- String name = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name");
- EditableWSDLFault fault = new WSDLFaultImpl(reader,name, msgName, operation);
- operation.addFault(fault);
- extensionFacade.portTypeOperationFaultAttributes(fault, reader);
- extensionFacade.portTypeOperationFault(operation, reader);
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- extensionFacade.portTypeOperationFaultElements(fault, reader);
- }
- }
-
- private void parsePortTypeOperationInput(XMLStreamReader reader, EditableWSDLOperation operation) {
- String msg = ParserUtil.getMandatoryNonEmptyAttribute(reader, "message");
- QName msgName = ParserUtil.getQName(reader, msg);
- String name = ParserUtil.getAttribute(reader, "name");
- EditableWSDLInput input = new WSDLInputImpl(reader, name, msgName, operation);
- operation.setInput(input);
- extensionFacade.portTypeOperationInputAttributes(input, reader);
- extensionFacade.portTypeOperationInput(operation, reader);
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- extensionFacade.portTypeOperationInputElements(input, reader);
- }
- }
-
- private void parsePortTypeOperationOutput(XMLStreamReader reader, EditableWSDLOperation operation) {
- String msg = ParserUtil.getAttribute(reader, "message");
- QName msgName = ParserUtil.getQName(reader, msg);
- String name = ParserUtil.getAttribute(reader, "name");
- EditableWSDLOutput output = new WSDLOutputImpl(reader,name, msgName, operation);
- operation.setOutput(output);
- extensionFacade.portTypeOperationOutputAttributes(output, reader);
- extensionFacade.portTypeOperationOutput(operation, reader);
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- extensionFacade.portTypeOperationOutputElements(output, reader);
- }
- }
-
- private void parseMessage(XMLStreamReader reader) {
- String msgName = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_NAME);
- EditableWSDLMessage msg = new WSDLMessageImpl(reader,new QName(targetNamespace, msgName));
- extensionFacade.messageAttributes(msg, reader);
- int partIndex = 0;
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- QName name = reader.getName();
- if (WSDLConstants.QNAME_PART.equals(name)) {
- String part = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_NAME);
- String desc = null;
- int index = reader.getAttributeCount();
- WSDLDescriptorKind kind = WSDLDescriptorKind.ELEMENT;
- for (int i = 0; i < index; i++) {
- QName descName = reader.getAttributeName(i);
- if (descName.getLocalPart().equals("element"))
- kind = WSDLDescriptorKind.ELEMENT;
- else if (descName.getLocalPart().equals("type"))
- kind = WSDLDescriptorKind.TYPE;
-
- if (descName.getLocalPart().equals("element") || descName.getLocalPart().equals("type")) {
- desc = reader.getAttributeValue(i);
- break;
- }
- }
- if (desc != null) {
- EditableWSDLPart wsdlPart = new WSDLPartImpl(reader, part, partIndex, new WSDLPartDescriptorImpl(reader,ParserUtil.getQName(reader, desc), kind));
- msg.add(wsdlPart);
- }
- if (reader.getEventType() != XMLStreamConstants.END_ELEMENT)
- goToEnd(reader);
- } else {
- extensionFacade.messageElements(msg, reader);
- }
- }
- wsdlDoc.addMessage(msg);
- if (reader.getEventType() != XMLStreamConstants.END_ELEMENT)
- goToEnd(reader);
- }
-
- private static void goToEnd(XMLStreamReader reader) {
- while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) {
- XMLStreamReaderUtil.skipElement(reader);
- }
- }
-
- /**
- * Make sure to return a "fresh" reader each time it is called because
- * more than one active reader may be needed within a single thread
- * to parse a WSDL file.
- */
- private static XMLStreamReader createReader(URL wsdlLoc) throws IOException, XMLStreamException {
- return createReader(wsdlLoc, null);
- }
-
- /**
- * Make sure to return a "fresh" reader each time it is called because
- * more than one active reader may be needed within a single thread
- * to parse a WSDL file.
- */
- private static XMLStreamReader createReader(URL wsdlLoc, Class<Service> serviceClass) throws IOException, XMLStreamException {
- InputStream stream;
- try {
- stream = wsdlLoc.openStream();
- } catch (IOException io) {
- out:
- do {
- if (serviceClass != null) {
- WSDLLocator locator = ContainerResolver.getInstance().getContainer().getSPI(WSDLLocator.class);
- if (locator != null) {
- String exForm = wsdlLoc.toExternalForm();
- URL ru = serviceClass.getResource(".");
- String loc = wsdlLoc.getPath();
- if (ru != null) {
- String ruExForm = ru.toExternalForm();
- if (exForm.startsWith(ruExForm)) {
- loc = exForm.substring(ruExForm.length());
- }
- }
- wsdlLoc = locator.locateWSDL(serviceClass, loc);
- if (wsdlLoc != null) {
- stream = new FilterInputStream(wsdlLoc.openStream()) {
- boolean closed;
-
- @Override
- public void close() throws IOException {
- if (!closed) {
- closed = true;
- byte[] buf = new byte[8192];
- while(read(buf) != -1);
- super.close();
- }
- }
- };
- break out;
- }
- }
- }
- throw io;
- } while(true);
- }
-
- return new TidyXMLStreamReader(XMLStreamReaderFactory.create(wsdlLoc.toExternalForm(), stream, false), stream);
- }
-
- private void register(WSDLParserExtension e) {
- // protect JAX-WS RI from broken parser extension
- extensions.add(new FoolProofParserExtension(e));
- }
-
- /**
- * Reads the namespace declarations from the reader's current position in to the map. The reader is expected to be
- * on the start element.
- *
- * @param ns_map
- * @param reader
- */
- private static void readNSDecl(Map<String, String> ns_map, XMLStreamReader reader) {
- if (reader.getNamespaceCount() > 0) {
- for (int i = 0; i < reader.getNamespaceCount(); i++) {
- ns_map.put(reader.getNamespacePrefix(i), reader.getNamespaceURI(i));
- }
- }
- }
-
- private static final Logger LOGGER = Logger.getLogger(RuntimeWSDLParser.class.getName());
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/SOAPConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/SOAPConstants.java
deleted file mode 100644
index 9451d8e1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/SOAPConstants.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.parser;
-
-import com.sun.xml.internal.ws.encoding.soap.streaming.SOAPNamespaceConstants;
-import com.sun.xml.internal.ws.encoding.soap.streaming.SOAP12NamespaceConstants;
-
-import javax.xml.namespace.QName;
-
-public interface SOAPConstants {
-
- // namespace URIs
- public static final String URI_ENVELOPE = SOAPNamespaceConstants.ENVELOPE;
- public static final String URI_ENVELOPE12 = SOAP12NamespaceConstants.ENVELOPE;
-
- public static final String NS_WSDL_SOAP =
- "http://schemas.xmlsoap.org/wsdl/soap/";
-
- public static final String NS_WSDL_SOAP12 =
- "http://schemas.xmlsoap.org/wsdl/soap12/";
-
- public static final String NS_SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
-
- // other URIs
- public final String URI_SOAP_TRANSPORT_HTTP =
- "http://schemas.xmlsoap.org/soap/http";
-
- // QNames
- public static final QName QNAME_ADDRESS =
- new QName(NS_WSDL_SOAP, "address");
- public static final QName QNAME_SOAP12ADDRESS =
- new QName(NS_WSDL_SOAP12, "address");
- public static final QName QNAME_BINDING =
- new QName(NS_WSDL_SOAP, "binding");
- public static final QName QNAME_BODY = new QName(NS_WSDL_SOAP, "body");
- public static final QName QNAME_SOAP12BODY = new QName(NS_WSDL_SOAP12, "body");
- public static final QName QNAME_FAULT = new QName(NS_WSDL_SOAP, "fault");
- public static final QName QNAME_HEADER = new QName(NS_WSDL_SOAP, "header");
- public static final QName QNAME_SOAP12HEADER = new QName(NS_WSDL_SOAP12, "header");
- public static final QName QNAME_HEADERFAULT =
- new QName(NS_WSDL_SOAP, "headerfault");
- public static final QName QNAME_OPERATION =
- new QName(NS_WSDL_SOAP, "operation");
- public static final QName QNAME_SOAP12OPERATION =
- new QName(NS_WSDL_SOAP12, "operation");
- public static final QName QNAME_MUSTUNDERSTAND =
- new QName(URI_ENVELOPE, "mustUnderstand");
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java
deleted file mode 100644
index e995a371..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.wsdl.parser;
-
-import com.sun.xml.internal.ws.api.model.wsdl.editable.*;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.namespace.QName;
-
-/**
- * W3C WS-Addressing Runtime WSDL parser extension that parses
- * WS-Addressing Metadata wsdl extensibility elements
- * This mainly reads wsam:Action element on input/output/fault messages in wsdl.
- *
- * @author Rama Pulavarthi
- */
-public class W3CAddressingMetadataWSDLParserExtension extends W3CAddressingWSDLParserExtension {
-
- String METADATA_WSDL_EXTN_NS = "http://www.w3.org/2007/05/addressing/metadata";
- QName METADATA_WSDL_ACTION_TAG = new QName(METADATA_WSDL_EXTN_NS, "Action", "wsam");
- @Override
- public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
- return false;
- }
-
- @Override
- public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
- return false;
- }
-
- @Override
- public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- return false;
- }
-
- @Override
- protected void patchAnonymousDefault(EditableWSDLBoundPortType binding) {
- }
-
- @Override
- protected String getNamespaceURI() {
- return METADATA_WSDL_EXTN_NS;
- }
-
- @Override
- protected QName getWsdlActionTag() {
- return METADATA_WSDL_ACTION_TAG;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingWSDLParserExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingWSDLParserExtension.java
deleted file mode 100644
index 0d2de0af..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingWSDLParserExtension.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.wsdl.parser;
-
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.model.wsdl.WSDLFeaturedObject;
-import static com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation.ANONYMOUS;
-import com.sun.xml.internal.ws.api.model.wsdl.editable.*;
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtensionContext;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.soap.AddressingFeature;
-
-/**
- * W3C WS-Addressing Runtime WSDL parser extension
- *
- * @author Arun Gupta
- */
-public class W3CAddressingWSDLParserExtension extends WSDLParserExtension {
- @Override
- public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
- return addressibleElement(reader, binding);
- }
-
- @Override
- public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
- return addressibleElement(reader, port);
- }
-
- private boolean addressibleElement(XMLStreamReader reader, WSDLFeaturedObject binding) {
- QName ua = reader.getName();
- if (ua.equals(AddressingVersion.W3C.wsdlExtensionTag)) {
- String required = reader.getAttributeValue(WSDLConstants.NS_WSDL, "required");
- binding.addFeature(new AddressingFeature(true, Boolean.parseBoolean(required)));
- XMLStreamReaderUtil.skipElement(reader);
- return true; // UsingAddressing is consumed
- }
-
- return false;
- }
-
- @Override
- public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- EditableWSDLBoundOperation edit = (EditableWSDLBoundOperation) operation;
-
- QName anon = reader.getName();
- if (anon.equals(AddressingVersion.W3C.wsdlAnonymousTag)) {
- try {
- String value = reader.getElementText();
- if (value == null || value.trim().equals("")) {
- throw new WebServiceException("Null values not permitted in wsaw:Anonymous.");
- // TODO: throw exception only if wsdl:required=true
- // TODO: is this the right exception ?
- } else if (value.equals("optional")) {
- edit.setAnonymous(ANONYMOUS.optional);
- } else if (value.equals("required")) {
- edit.setAnonymous(ANONYMOUS.required);
- } else if (value.equals("prohibited")) {
- edit.setAnonymous(ANONYMOUS.prohibited);
- } else {
- throw new WebServiceException("wsaw:Anonymous value \"" + value + "\" not understood.");
- // TODO: throw exception only if wsdl:required=true
- // TODO: is this the right exception ?
- }
- } catch (XMLStreamException e) {
- throw new WebServiceException(e); // TODO: is this the correct behavior ?
- }
-
- return true; // consumed the element
- }
-
- return false;
- }
-
- public void portTypeOperationInputAttributes(EditableWSDLInput input, XMLStreamReader reader) {
- String action = ParserUtil.getAttribute(reader, getWsdlActionTag());
- if (action != null) {
- input.setAction(action);
- input.setDefaultAction(false);
- }
- }
-
-
- public void portTypeOperationOutputAttributes(EditableWSDLOutput output, XMLStreamReader reader) {
- String action = ParserUtil.getAttribute(reader, getWsdlActionTag());
- if (action != null) {
- output.setAction(action);
- output.setDefaultAction(false);
- }
- }
-
-
- public void portTypeOperationFaultAttributes(EditableWSDLFault fault, XMLStreamReader reader) {
- String action = ParserUtil.getAttribute(reader, getWsdlActionTag());
- if (action != null) {
- fault.setAction(action);
- fault.setDefaultAction(false);
- }
- }
-
- /**
- * Process wsdl:portType operation after the entire WSDL model has been populated.
- * The task list includes: <p>
- * <ul>
- * <li>Patch the value of UsingAddressing in wsdl:port and wsdl:binding</li>
- * <li>Populate actions for the messages that do not have an explicit wsaw:Action</li>
- * <li>Patch the default value of wsaw:Anonymous=optional if none is specified</li>
- * </ul>
- * @param context
- */
- @Override
- public void finished(WSDLParserExtensionContext context) {
- EditableWSDLModel model = context.getWSDLModel();
- for (EditableWSDLService service : model.getServices().values()) {
- for (EditableWSDLPort port : service.getPorts()) {
- EditableWSDLBoundPortType binding = port.getBinding();
-
- // populate actions for the messages that do not have an explicit wsaw:Action
- populateActions(binding);
-
- // patch the default value of wsaw:Anonymous=optional if none is specified
- patchAnonymousDefault(binding);
- }
- }
- }
-
- protected String getNamespaceURI() {
- return AddressingVersion.W3C.wsdlNsUri;
- }
-
- protected QName getWsdlActionTag() {
- return AddressingVersion.W3C.wsdlActionTag;
- }
- /**
- * Populate all the Actions
- *
- * @param binding soapbinding:operation
- */
- private void populateActions(EditableWSDLBoundPortType binding) {
- EditableWSDLPortType porttype = binding.getPortType();
- for (EditableWSDLOperation o : porttype.getOperations()) {
- // TODO: this may be performance intensive. Alternatively default action
- // TODO: can be calculated when the operation is actually invoked.
- EditableWSDLBoundOperation wboi = binding.get(o.getName());
-
- if (wboi == null) {
- //If this operation is unbound set the action to default
- o.getInput().setAction(defaultInputAction(o));
- continue;
- }
- String soapAction = wboi.getSOAPAction();
- if (o.getInput().getAction() == null || o.getInput().getAction().equals("")) {
- // explicit wsaw:Action is not specified
-
- if (soapAction != null && !soapAction.equals("")) {
- // if soapAction is non-empty, use that
- o.getInput().setAction(soapAction);
- } else {
- // otherwise generate default Action
- o.getInput().setAction(defaultInputAction(o));
- }
- }
-
- // skip output and fault processing for one-way methods
- if (o.getOutput() == null)
- continue;
-
- if (o.getOutput().getAction() == null || o.getOutput().getAction().equals("")) {
- o.getOutput().setAction(defaultOutputAction(o));
- }
-
- if (o.getFaults() == null || !o.getFaults().iterator().hasNext())
- continue;
-
- for (EditableWSDLFault f : o.getFaults()) {
- if (f.getAction() == null || f.getAction().equals("")) {
- f.setAction(defaultFaultAction(f.getName(), o));
- }
-
- }
- }
- }
-
- /**
- * Patch the default value of wsaw:Anonymous=optional if none is specified
- *
- * @param binding WSDLBoundPortTypeImpl
- */
- protected void patchAnonymousDefault(EditableWSDLBoundPortType binding) {
- for (EditableWSDLBoundOperation wbo : binding.getBindingOperations()) {
- if (wbo.getAnonymous() == null)
- wbo.setAnonymous(ANONYMOUS.optional);
- }
- }
-
- private String defaultInputAction(EditableWSDLOperation o) {
- return buildAction(o.getInput().getName(), o, false);
- }
-
- private String defaultOutputAction(EditableWSDLOperation o) {
- return buildAction(o.getOutput().getName(), o, false);
- }
-
- private String defaultFaultAction(String name, EditableWSDLOperation o) {
- return buildAction(name, o, true);
- }
-
- protected static final String buildAction(String name, EditableWSDLOperation o, boolean isFault) {
- String tns = o.getName().getNamespaceURI();
-
- String delim = SLASH_DELIMITER;
-
- // TODO: is this the correct way to find the separator ?
- if (!tns.startsWith("http"))
- delim = COLON_DELIMITER;
-
- if (tns.endsWith(delim))
- tns = tns.substring(0, tns.length()-1);
-
- if (o.getPortTypeName() == null)
- throw new WebServiceException("\"" + o.getName() + "\" operation's owning portType name is null.");
-
- return tns +
- delim +
- o.getPortTypeName().getLocalPart() +
- delim +
- (isFault ? o.getName().getLocalPart() + delim + "Fault" + delim : "") +
- name;
- }
-
- protected static final String COLON_DELIMITER = ":";
- protected static final String SLASH_DELIMITER = "/";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLConstants.java
deleted file mode 100644
index 89149c49..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLConstants.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.parser;
-
-import javax.xml.namespace.QName;
-
-
-/**
- * Interface defining WSDL-related constants.
- *
- * @author WS Development Team
- */
-public interface WSDLConstants {
- // namespace URIs
- static final String PREFIX_NS_WSDL = "wsdl";
- static final String NS_XMLNS = "http://www.w3.org/2001/XMLSchema";
- static final String NS_WSDL = "http://schemas.xmlsoap.org/wsdl/";
- static final String NS_SOAP11_HTTP_BINDING = "http://schemas.xmlsoap.org/soap/http";
-
- static final QName QNAME_SCHEMA = new QName(NS_XMLNS, "schema");
-
- // QNames
- static final QName QNAME_BINDING = new QName(NS_WSDL, "binding");
- static final QName QNAME_DEFINITIONS = new QName(NS_WSDL, "definitions");
- static final QName QNAME_DOCUMENTATION = new QName(NS_WSDL, "documentation");
- static final QName NS_SOAP_BINDING_ADDRESS = new QName("http://schemas.xmlsoap.org/wsdl/soap/", "address");
- static final QName NS_SOAP_BINDING = new QName("http://schemas.xmlsoap.org/wsdl/soap/", "binding");
- static final QName NS_SOAP12_BINDING = new QName("http://schemas.xmlsoap.org/wsdl/soap12/", "binding");
- static final QName NS_SOAP12_BINDING_ADDRESS = new QName("http://schemas.xmlsoap.org/wsdl/soap12/", "address");
-
- //static final QName QNAME_FAULT = new QName(NS_WSDL, "fault");
- static final QName QNAME_IMPORT = new QName(NS_WSDL, "import");
-
- //static final QName QNAME_INPUT = new QName(NS_WSDL, "input");
- static final QName QNAME_MESSAGE = new QName(NS_WSDL, "message");
- static final QName QNAME_PART = new QName(NS_WSDL, "part");
- static final QName QNAME_OPERATION = new QName(NS_WSDL, "operation");
- static final QName QNAME_INPUT = new QName(NS_WSDL, "input");
- static final QName QNAME_OUTPUT = new QName(NS_WSDL, "output");
-
- //static final QName QNAME_OUTPUT = new QName(NS_WSDL, "output");
- //static final QName QNAME_PART = new QName(NS_WSDL, "part");
- static final QName QNAME_PORT = new QName(NS_WSDL, "port");
- static final QName QNAME_ADDRESS = new QName(NS_WSDL, "address");
- static final QName QNAME_PORT_TYPE = new QName(NS_WSDL, "portType");
- static final QName QNAME_FAULT = new QName(NS_WSDL, "fault");
- static final QName QNAME_SERVICE = new QName(NS_WSDL, "service");
- static final QName QNAME_TYPES = new QName(NS_WSDL, "types");
-
- static final String ATTR_TRANSPORT = "transport";
- static final String ATTR_LOCATION = "location";
- static final String ATTR_NAME = "name";
- static final String ATTR_TNS = "targetNamespace";
-
- //static final QName QNAME_ATTR_ARRAY_TYPE = new QName(NS_WSDL, "arrayType");
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionContextImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionContextImpl.java
deleted file mode 100644
index 57a84db8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionContextImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.wsdl.parser;
-
-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.wsdl.parser.WSDLParserExtensionContext;
-import com.sun.xml.internal.ws.api.policy.PolicyResolver;
-
-/**
- * Provides implementation of {@link WSDLParserExtensionContext}
- *
- * @author Vivek Pandey
- * @author Fabian Ritzmann
- */
-final class WSDLParserExtensionContextImpl implements WSDLParserExtensionContext {
- private final boolean isClientSide;
- private final EditableWSDLModel wsdlModel;
- private final Container container;
- private final PolicyResolver policyResolver;
-
- /**
- * Construct {@link WSDLParserExtensionContextImpl} with information that whether its on client side
- * or server side.
- */
- protected WSDLParserExtensionContextImpl(EditableWSDLModel model, boolean isClientSide, Container container, PolicyResolver policyResolver) {
- this.wsdlModel = model;
- this.isClientSide = isClientSide;
- this.container = container;
- this.policyResolver = policyResolver;
- }
-
- public boolean isClientSide() {
- return isClientSide;
- }
-
- public EditableWSDLModel getWSDLModel() {
- return wsdlModel;
- }
-
- public Container getContainer() {
- return this.container;
- }
-
- public PolicyResolver getPolicyResolver() {
- return policyResolver;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionFacade.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionFacade.java
deleted file mode 100644
index a3e453bb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionFacade.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.wsdl.parser;
-
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
-import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtensionContext;
-import com.sun.xml.internal.ws.api.model.wsdl.editable.*;
-import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil;
-
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.Location;
-
-import org.xml.sax.Locator;
-import org.xml.sax.helpers.LocatorImpl;
-
-/**
- * {@link WSDLParserExtension} that delegates to
- * multiple {@link WSDLParserExtension}s.
- *
- * <p>
- * This simplifies {@link RuntimeWSDLParser} since it now
- * only needs to work with one {@link WSDLParserExtension}.
- *
- * <p>
- * This class is guaranteed to return true from
- * all the extension callback methods.
- *
- * @author Kohsuke Kawaguchi
- */
-final class WSDLParserExtensionFacade extends WSDLParserExtension {
- private final WSDLParserExtension[] extensions;
-
- WSDLParserExtensionFacade(WSDLParserExtension... extensions) {
- assert extensions!=null;
- this.extensions = extensions;
- }
-
- public void start(WSDLParserExtensionContext context) {
- for (WSDLParserExtension e : extensions) {
- e.start(context);
- }
- }
-
- public boolean serviceElements(EditableWSDLService service, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- if(e.serviceElements(service,reader))
- return true;
- }
- XMLStreamReaderUtil.skipElement(reader);
- return true;
- }
-
- public void serviceAttributes(EditableWSDLService service, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions)
- e.serviceAttributes(service,reader);
- }
-
- public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- if(e.portElements(port,reader))
- return true;
- }
- //extension is not understood by any WSDlParserExtension
- //Check if it must be understood.
- if(isRequiredExtension(reader)) {
- port.addNotUnderstoodExtension(reader.getName(),getLocator(reader));
- }
- XMLStreamReaderUtil.skipElement(reader);
- return true;
- }
-
- public boolean portTypeOperationInput(EditableWSDLOperation op, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions)
- e.portTypeOperationInput(op,reader);
-
- return false;
- }
-
- public boolean portTypeOperationOutput(EditableWSDLOperation op, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions)
- e.portTypeOperationOutput(op,reader);
-
- return false;
- }
-
- public boolean portTypeOperationFault(EditableWSDLOperation op, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions)
- e.portTypeOperationFault(op,reader);
-
- return false;
- }
-
- public void portAttributes(EditableWSDLPort port, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions)
- e.portAttributes(port,reader);
- }
-
- public boolean definitionsElements(XMLStreamReader reader){
- for (WSDLParserExtension e : extensions) {
- if (e.definitionsElements(reader)) {
- return true;
- }
- }
- XMLStreamReaderUtil.skipElement(reader);
- return true;
- }
-
- public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader){
- for (WSDLParserExtension e : extensions) {
- if (e.bindingElements(binding, reader)) {
- return true;
- }
- }
- //extension is not understood by any WSDlParserExtension
- //Check if it must be understood.
- if (isRequiredExtension(reader)) {
- binding.addNotUnderstoodExtension(
- reader.getName(), getLocator(reader));
- }
- XMLStreamReaderUtil.skipElement(reader);
- return true;
- }
-
- public void bindingAttributes(EditableWSDLBoundPortType binding, XMLStreamReader reader){
- for (WSDLParserExtension e : extensions) {
- e.bindingAttributes(binding, reader);
- }
- }
-
- public boolean portTypeElements(EditableWSDLPortType portType, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- if (e.portTypeElements(portType, reader)) {
- return true;
- }
- }
- XMLStreamReaderUtil.skipElement(reader);
- return true;
- }
-
- public void portTypeAttributes(EditableWSDLPortType portType, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- e.portTypeAttributes(portType, reader);
- }
- }
-
- public boolean portTypeOperationElements(EditableWSDLOperation operation, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- if (e.portTypeOperationElements(operation, reader)) {
- return true;
- }
- }
- XMLStreamReaderUtil.skipElement(reader);
- return true;
- }
-
- public void portTypeOperationAttributes(EditableWSDLOperation operation, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- e.portTypeOperationAttributes(operation, reader);
- }
- }
-
- public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- if (e.bindingOperationElements(operation, reader)) {
- return true;
- }
- }
- XMLStreamReaderUtil.skipElement(reader);
- return true;
- }
-
- public void bindingOperationAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- e.bindingOperationAttributes(operation, reader);
- }
- }
-
- public boolean messageElements(EditableWSDLMessage msg, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- if (e.messageElements(msg, reader)) {
- return true;
- }
- }
- XMLStreamReaderUtil.skipElement(reader);
- return true;
- }
-
- public void messageAttributes(EditableWSDLMessage msg, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- e.messageAttributes(msg, reader);
- }
- }
-
- public boolean portTypeOperationInputElements(EditableWSDLInput input, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- if (e.portTypeOperationInputElements(input, reader)) {
- return true;
- }
- }
- XMLStreamReaderUtil.skipElement(reader);
- return true;
- }
-
- public void portTypeOperationInputAttributes(EditableWSDLInput input, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- e.portTypeOperationInputAttributes(input, reader);
- }
- }
-
- public boolean portTypeOperationOutputElements(EditableWSDLOutput output, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- if (e.portTypeOperationOutputElements(output, reader)) {
- return true;
- }
- }
- XMLStreamReaderUtil.skipElement(reader);
- return true;
- }
-
- public void portTypeOperationOutputAttributes(EditableWSDLOutput output, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- e.portTypeOperationOutputAttributes(output, reader);
- }
- }
-
- public boolean portTypeOperationFaultElements(EditableWSDLFault fault, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- if (e.portTypeOperationFaultElements(fault, reader)) {
- return true;
- }
- }
- XMLStreamReaderUtil.skipElement(reader);
- return true;
- }
-
- public void portTypeOperationFaultAttributes(EditableWSDLFault fault, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- e.portTypeOperationFaultAttributes(fault, reader);
- }
- }
-
- public boolean bindingOperationInputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- if (e.bindingOperationInputElements(operation, reader)) {
- return true;
- }
- }
- XMLStreamReaderUtil.skipElement(reader);
- return true;
- }
-
- public void bindingOperationInputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- e.bindingOperationInputAttributes(operation, reader);
- }
- }
-
- public boolean bindingOperationOutputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- if (e.bindingOperationOutputElements(operation, reader)) {
- return true;
- }
- }
- XMLStreamReaderUtil.skipElement(reader);
- return true;
- }
-
- public void bindingOperationOutputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- e.bindingOperationOutputAttributes(operation, reader);
- }
- }
-
- public boolean bindingOperationFaultElements(EditableWSDLBoundFault fault, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- if (e.bindingOperationFaultElements(fault, reader)) {
- return true;
- }
- }
- XMLStreamReaderUtil.skipElement(reader);
- return true;
- }
-
- public void bindingOperationFaultAttributes(EditableWSDLBoundFault fault, XMLStreamReader reader) {
- for (WSDLParserExtension e : extensions) {
- e.bindingOperationFaultAttributes(fault, reader);
- }
- }
-
- public void finished(WSDLParserExtensionContext context) {
- for (WSDLParserExtension e : extensions) {
- e.finished(context);
- }
- }
-
- public void postFinished(WSDLParserExtensionContext context) {
- for (WSDLParserExtension e : extensions) {
- e.postFinished(context);
- }
- }
- /**
- *
- * @param reader
- * @return If the element has wsdl:required attribute set to true
- */
-
- private boolean isRequiredExtension(XMLStreamReader reader) {
- String required = reader.getAttributeValue(WSDLConstants.NS_WSDL, "required");
- if(required != null)
- return Boolean.parseBoolean(required);
- return false;
- }
-
- private Locator getLocator(XMLStreamReader reader) {
- Location location = reader.getLocation();
- LocatorImpl loc = new LocatorImpl();
- loc.setSystemId(location.getSystemId());
- loc.setLineNumber(location.getLineNumber());
- return loc;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/DocumentLocationResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/DocumentLocationResolver.java
deleted file mode 100644
index 7c65dca1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/DocumentLocationResolver.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer;
-
-import com.sun.istack.internal.Nullable;
-import com.sun.xml.internal.ws.api.server.SDDocument;
-
-/**
- * Resolves relative references among the metadata(WSDL, schema)
- * documents.
- *
- * <p>
- * This interface is implemented by the caller of
- * {@link SDDocument#writeTo} method so that the {@link SDDocument} can
- * correctly produce references to other documents.
- *
- * <h2>Usage Example 1</h2>
- * <p>
- * Say: http://localhost/hello?wsdl has reference to
- * <p>
- * &lt;xsd:import namespace="urn:test:types" schemaLocation="http://localhost/hello?xsd=1"/>
- *
- * <p>
- * Using this class, it is possible to write A.wsdl to a local filesystem with
- * a local file schema import.
- * <p>
- * &lt;xsd:import namespace="urn:test:types" schemaLocation="hello.xsd"/>
- *
- * @author Jitendra Kotamraju
- */
-public interface DocumentLocationResolver {
- /**
- * Produces a relative reference from one document to another.
- *
- * @param namespaceURI
- * The namespace urI for the referenced document.
- * for e.g. wsdl:import/@namespace, xsd:import/@namespace
- * @param systemId
- * The location value for the referenced document.
- * for e.g. wsdl:import/@location, xsd:import/@schemaLocation
- * @return
- * The reference to be put inside {@code current} to refer to
- * {@code referenced}. This can be a relative URL as well as
- * an absolute. If null is returned, then the document
- * will produce a "implicit reference" (for example, &lt;xs:import>
- * without the @schemaLocation attribute, etc).
- */
- @Nullable String getLocationFor(String namespaceURI, String systemId);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/TXWContentHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/TXWContentHandler.java
deleted file mode 100644
index bad5a681..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/TXWContentHandler.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer;
-
-import java.util.Stack;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-
-public class TXWContentHandler implements ContentHandler {
- Stack<TypedXmlWriter> stack;
-
- public TXWContentHandler(TypedXmlWriter txw) {
- stack = new Stack<TypedXmlWriter>();
- stack.push(txw);
- }
-
- public void setDocumentLocator(Locator locator) {
- }
-
- public void startDocument() throws SAXException {
- }
-
- public void endDocument() throws SAXException {
- }
-
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
- }
-
- public void endPrefixMapping(String prefix) throws SAXException {
- }
-
- public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
- TypedXmlWriter txw = stack.peek()._element(uri, localName, TypedXmlWriter.class);
- stack.push(txw);
- if (atts != null) {
- for(int i = 0; i < atts.getLength(); i++) {
- String auri = atts.getURI(i);
- if ("http://www.w3.org/2000/xmlns/".equals(auri)) {
- if ("xmlns".equals(atts.getLocalName(i)))
- txw._namespace(atts.getValue(i), "");
- else
- txw._namespace(atts.getValue(i),atts.getLocalName(i));
- } else {
- if ("schemaLocation".equals(atts.getLocalName(i))
- && "".equals(atts.getValue(i)))
- continue;
- txw._attribute(auri, atts.getLocalName(i), atts.getValue(i));
- }
- }
- }
- }
-
- public void endElement(String uri, String localName, String qName) throws SAXException {
- stack.pop();
- }
-
- public void characters(char[] ch, int start, int length) throws SAXException {
- }
-
- public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
- }
-
- public void processingInstruction(String target, String data) throws SAXException {
- }
-
- public void skippedEntity(String name) throws SAXException {
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/UsingAddressing.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/UsingAddressing.java
deleted file mode 100644
index 2ca83677..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/UsingAddressing.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.addressing.W3CAddressingConstants;
-import com.sun.xml.internal.ws.wsdl.writer.document.StartWithExtensionsType;
-
-/**
- * @author Arun Gupta
- */
-@XmlElement(value = W3CAddressingConstants.WSA_NAMESPACE_WSDL_NAME,
- ns = W3CAddressingConstants.WSAW_USING_ADDRESSING_NAME)
-public interface UsingAddressing extends TypedXmlWriter, StartWithExtensionsType {
- @XmlAttribute(value = "required", ns = "http://schemas.xmlsoap.org/wsdl/")
- public void required(boolean b);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingMetadataWSDLGeneratorExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingMetadataWSDLGeneratorExtension.java
deleted file mode 100644
index 43d495bb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingMetadataWSDLGeneratorExtension.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer;
-
-import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGeneratorExtension;
-import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGenExtnContext;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.api.model.CheckedException;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import static com.sun.xml.internal.ws.addressing.W3CAddressingMetadataConstants.*;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import com.sun.xml.internal.ws.model.CheckedExceptionImpl;
-import com.sun.xml.internal.ws.addressing.WsaActionUtil;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.logging.Logger;
-
-/**
- * This extension class generates wsam:Action values for input, output and faults in the generated wsdl.
- *
- * @author Rama Pulavarthi
- */
-public class W3CAddressingMetadataWSDLGeneratorExtension extends
- WSDLGeneratorExtension {
-
- @Override
- public void start(WSDLGenExtnContext ctxt) {
- TypedXmlWriter root = ctxt.getRoot();
- root._namespace(WSAM_NAMESPACE_NAME, WSAM_PREFIX_NAME);
- }
-
- @Override
- public void addOperationInputExtension(TypedXmlWriter input,
- JavaMethod method) {
- input._attribute(WSAM_ACTION_QNAME, getInputAction(method));
- }
-
- @Override
- public void addOperationOutputExtension(TypedXmlWriter output,
- JavaMethod method) {
- output._attribute(WSAM_ACTION_QNAME, getOutputAction(method));
- }
-
- @Override
- public void addOperationFaultExtension(TypedXmlWriter fault,
- JavaMethod method, CheckedException ce) {
- fault._attribute(WSAM_ACTION_QNAME, getFaultAction(method, ce));
- }
-
-
- private static final String getInputAction(JavaMethod method) {
- String inputaction = ((JavaMethodImpl)method).getInputAction();
- if (inputaction.equals("")) {
- // Calculate default action
- inputaction = getDefaultInputAction(method);
- }
- return inputaction;
- }
-
- protected static final String getDefaultInputAction(JavaMethod method) {
- String tns = method.getOwner().getTargetNamespace();
- String delim = getDelimiter(tns);
- if (tns.endsWith(delim))
- tns = tns.substring(0, tns.length() - 1);
- //this assumes that fromjava case there won't be input name.
- // if there is input name in future, then here name=inputName
- //else use operation name as follows.
- String name = (method.getMEP().isOneWay()) ?
- method.getOperationName() : method.getOperationName() + "Request";
-
- return new StringBuilder(tns).append(delim).append(
- method.getOwner().getPortTypeName().getLocalPart()).append(
- delim).append(name).toString();
- }
-
- private static final String getOutputAction(JavaMethod method) {
- String outputaction = ((JavaMethodImpl)method).getOutputAction();
- if(outputaction.equals(""))
- outputaction = getDefaultOutputAction(method);
- return outputaction;
- }
-
- protected static final String getDefaultOutputAction(JavaMethod method) {
- String tns = method.getOwner().getTargetNamespace();
- String delim = getDelimiter(tns);
- if (tns.endsWith(delim))
- tns = tns.substring(0, tns.length() - 1);
- //this assumes that fromjava case there won't be output name.
- // if there is input name in future, then here name=outputName
- //else use operation name as follows.
- String name = method.getOperationName() + "Response";
-
- return new StringBuilder(tns).append(delim).append(
- method.getOwner().getPortTypeName().getLocalPart()).append(
- delim).append(name).toString();
- }
-
-
- private static final String getDelimiter(String tns) {
- String delim = "/";
- // TODO: is this the correct way to find the separator ?
- try {
- URI uri = new URI(tns);
- if ((uri.getScheme() != null) && uri.getScheme().equalsIgnoreCase("urn"))
- delim = ":";
- } catch (URISyntaxException e) {
- LOGGER.warning("TargetNamespace of WebService is not a valid URI");
- }
- return delim;
-
- }
-
- private static final String getFaultAction(JavaMethod method,
- CheckedException ce) {
- String faultaction = ((CheckedExceptionImpl)ce).getFaultAction();
- if (faultaction.equals("")) {
- faultaction = getDefaultFaultAction(method,ce);
- }
- return faultaction;
- }
-
- protected static final String getDefaultFaultAction(JavaMethod method, CheckedException ce) {
- return WsaActionUtil.getDefaultFaultAction(method,ce);
- }
-
- private static final Logger LOGGER =
- Logger.getLogger(W3CAddressingMetadataWSDLGeneratorExtension.class.getName());
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingWSDLGeneratorExtension.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingWSDLGeneratorExtension.java
deleted file mode 100644
index f57ec72b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingWSDLGeneratorExtension.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.addressing.AddressingVersion;
-import com.sun.xml.internal.ws.api.model.CheckedException;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGenExtnContext;
-import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGeneratorExtension;
-
-import javax.xml.ws.Action;
-import javax.xml.ws.FaultAction;
-import javax.xml.ws.soap.AddressingFeature;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.logging.Logger;
-
-/**
- * @author Arun Gupta
- * @author Rama Pulavarthi
- */
-public class W3CAddressingWSDLGeneratorExtension extends WSDLGeneratorExtension {
- private boolean enabled;
- private boolean required = false;
-
- @Override
- public void start(WSDLGenExtnContext ctxt) {
- WSBinding binding = ctxt.getBinding();
- TypedXmlWriter root = ctxt.getRoot();
- enabled = binding.isFeatureEnabled(AddressingFeature.class);
- if (!enabled)
- return;
- AddressingFeature ftr = binding.getFeature(AddressingFeature.class);
- required = ftr.isRequired();
- root._namespace(AddressingVersion.W3C.wsdlNsUri, AddressingVersion.W3C.getWsdlPrefix());
- }
-
- @Override
- public void addOperationInputExtension(TypedXmlWriter input, JavaMethod method) {
- if (!enabled)
- return;
-
- Action a = method.getSEIMethod().getAnnotation(Action.class);
- if (a != null && !a.input().equals("")) {
- addAttribute(input, a.input());
- } else {
-
- String soapAction = method.getBinding().getSOAPAction();
- // in SOAP 1.2 soapAction is optional ...
- if (soapAction == null || soapAction.equals("")) {
- //hack: generate default action for interop with .Net3.0 when soapAction is non-empty
- String defaultAction = getDefaultAction(method);
- addAttribute(input, defaultAction);
- }
- }
- }
-
- protected static final String getDefaultAction(JavaMethod method) {
- String tns = method.getOwner().getTargetNamespace();
- String delim = "/";
- // TODO: is this the correct way to find the separator ?
- try {
- URI uri = new URI(tns);
- if(uri.getScheme().equalsIgnoreCase("urn"))
- delim = ":";
- } catch (URISyntaxException e) {
- LOGGER.warning("TargetNamespace of WebService is not a valid URI");
- }
- if (tns.endsWith(delim))
- tns = tns.substring(0, tns.length() - 1);
- //this assumes that fromjava case there won't be input name.
- // if there is input name in future, then here name=inputName
- //else use operation name as follows.
- String name = (method.getMEP().isOneWay())?method.getOperationName():method.getOperationName()+"Request";
-
- return new StringBuilder(tns).append(delim).append(
- method.getOwner().getPortTypeName().getLocalPart()).append(
- delim).append(name).toString();
- }
-
- @Override
- public void addOperationOutputExtension(TypedXmlWriter output, JavaMethod method) {
- if (!enabled)
- return;
-
- Action a = method.getSEIMethod().getAnnotation(Action.class);
- if (a != null && !a.output().equals("")) {
- addAttribute(output, a.output());
- }
- }
-
- @Override
- public void addOperationFaultExtension(TypedXmlWriter fault, JavaMethod method, CheckedException ce) {
- if (!enabled)
- return;
-
- Action a = method.getSEIMethod().getAnnotation(Action.class);
- Class[] exs = method.getSEIMethod().getExceptionTypes();
-
- if (exs == null)
- return;
-
- if (a != null && a.fault() != null) {
- for (FaultAction fa : a.fault()) {
- if (fa.className().getName().equals(ce.getExceptionClass().getName())) {
- if (fa.value().equals(""))
- return;
-
- addAttribute(fault, fa.value());
- return;
- }
- }
- }
- }
-
- private void addAttribute(TypedXmlWriter writer, String attrValue) {
- writer._attribute(AddressingVersion.W3C.wsdlActionTag, attrValue);
- }
-
- @Override
- public void addBindingExtension(TypedXmlWriter binding) {
- if (!enabled)
- return;
- binding._element(AddressingVersion.W3C.wsdlExtensionTag, UsingAddressing.class);
- /*
- Do not generate wsdl:required=true
- if(required) {
- ua.required(true);
- }
- */
- }
- private static final Logger LOGGER = Logger.getLogger(W3CAddressingWSDLGeneratorExtension.class.getName());
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java
deleted file mode 100644
index c954b6fc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java
+++ /dev/null
@@ -1,1282 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.wsdl.writer;
-
-
-import static com.sun.xml.internal.bind.v2.schemagen.Util.*;
-
-import com.oracle.webservices.internal.api.databinding.WSDLResolver;
-
-import com.sun.xml.internal.txw2.TXW;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.output.ResultFactory;
-import com.sun.xml.internal.txw2.output.XmlSerializer;
-import com.sun.xml.internal.txw2.output.TXWResult;
-import com.sun.xml.internal.ws.api.SOAPVersion;
-import com.sun.xml.internal.ws.api.WSBinding;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.api.model.MEP;
-import com.sun.xml.internal.ws.api.model.ParameterBinding;
-import com.sun.xml.internal.ws.api.model.SEIModel;
-import com.sun.xml.internal.ws.api.model.soap.SOAPBinding;
-import com.sun.xml.internal.ws.api.server.Container;
-import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGeneratorExtension;
-import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGenExtnContext;
-import com.sun.xml.internal.ws.model.AbstractSEIModelImpl;
-import com.sun.xml.internal.ws.model.CheckedExceptionImpl;
-import com.sun.xml.internal.ws.model.JavaMethodImpl;
-import com.sun.xml.internal.ws.model.ParameterImpl;
-import com.sun.xml.internal.ws.model.WrapperParameter;
-import com.sun.xml.internal.ws.util.xml.XmlUtil;
-import com.sun.xml.internal.ws.wsdl.parser.SOAPConstants;
-import com.sun.xml.internal.ws.wsdl.parser.WSDLConstants;
-import com.sun.xml.internal.ws.wsdl.writer.document.Binding;
-import com.sun.xml.internal.ws.wsdl.writer.document.BindingOperationType;
-import com.sun.xml.internal.ws.wsdl.writer.document.Definitions;
-import com.sun.xml.internal.ws.wsdl.writer.document.Fault;
-import com.sun.xml.internal.ws.wsdl.writer.document.FaultType;
-import com.sun.xml.internal.ws.wsdl.writer.document.Import;
-import com.sun.xml.internal.ws.wsdl.writer.document.Message;
-import com.sun.xml.internal.ws.wsdl.writer.document.Operation;
-import com.sun.xml.internal.ws.wsdl.writer.document.ParamType;
-import com.sun.xml.internal.ws.wsdl.writer.document.Port;
-import com.sun.xml.internal.ws.wsdl.writer.document.PortType;
-import com.sun.xml.internal.ws.wsdl.writer.document.Service;
-import com.sun.xml.internal.ws.wsdl.writer.document.Types;
-import com.sun.xml.internal.ws.wsdl.writer.document.soap.Body;
-import com.sun.xml.internal.ws.wsdl.writer.document.soap.BodyType;
-import com.sun.xml.internal.ws.wsdl.writer.document.soap.Header;
-import com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPAddress;
-import com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPFault;
-import com.sun.xml.internal.ws.wsdl.writer.document.xsd.Schema;
-import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.BindingHelper;
-import com.sun.xml.internal.ws.spi.db.TypeInfo;
-import com.sun.xml.internal.ws.spi.db.WrapperComposite;
-import com.sun.xml.internal.ws.util.RuntimeVersion;
-import com.sun.xml.internal.ws.policy.jaxws.PolicyWSDLGeneratorExtension;
-import com.sun.xml.internal.ws.encoding.soap.streaming.SOAPNamespaceConstants;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.Element;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.ComplexType;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.ExplicitGroup;
-import com.sun.xml.internal.bind.v2.schemagen.xmlschema.LocalElement;
-
-import javax.jws.soap.SOAPBinding.Style;
-import javax.jws.soap.SOAPBinding.Use;
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.sax.SAXResult;
-import javax.xml.ws.Holder;
-import javax.xml.ws.WebServiceException;
-
-import org.w3c.dom.Document;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-
-/**
- * Class used to generate WSDLs from a {@link SEIModel}.
- *
- * @author WS Development Team
- */
-public class WSDLGenerator {
- private JAXWSOutputSchemaResolver resolver;
- private WSDLResolver wsdlResolver = null;
- private AbstractSEIModelImpl model;
- private Definitions serviceDefinitions;
- private Definitions portDefinitions;
- private Types types;
- /**
- * Constant String for ".wsdl"
- */
- private static final String DOT_WSDL = ".wsdl";
- /**
- * Constant String appended to response message names
- */
- private static final String RESPONSE = "Response";
- /**
- * constant String used for part name for wrapped request messages
- */
- private static final String PARAMETERS = "parameters";
- /**
- * the part name for unwrappable response messages
- */
- private static final String RESULT = "parameters";
- /**
- * the part name for response messages that are not unwrappable
- */
- private static final String UNWRAPPABLE_RESULT = "result";
- /**
- * The WSDL namespace
- */
- private static final String WSDL_NAMESPACE = WSDLConstants.NS_WSDL;
-
- /**
- * the XSD namespace
- */
- private static final String XSD_NAMESPACE = SOAPNamespaceConstants.XSD;
- /**
- * the namespace prefix to use for the XSD namespace
- */
- private static final String XSD_PREFIX = "xsd";
- /**
- * The SOAP 1.1 namespace
- */
- private static final String SOAP11_NAMESPACE = SOAPConstants.NS_WSDL_SOAP;
- /**
- * The SOAP 1.2 namespace
- */
- private static final String SOAP12_NAMESPACE = SOAPConstants.NS_WSDL_SOAP12;
- /**
- * The namespace prefix to use for the SOAP 1.1 namespace
- */
- private static final String SOAP_PREFIX = "soap";
- /**
- * The namespace prefix to use for the SOAP 1.2 namespace
- */
- private static final String SOAP12_PREFIX = "soap12";
- /**
- * The namespace prefix to use for the targetNamespace
- */
- private static final String TNS_PREFIX = "tns";
-
- /**
- * Constant String "document" used to specify <code>document</code> style
- * soapBindings
- */
- private static final String DOCUMENT = "document";
- /**
- * Constant String "rpc" used to specify <code>rpc</code> style
- * soapBindings
- */
- private static final String RPC = "rpc";
- /**
- * Constant String "literal" used to create <code>literal</code> use binddings
- */
- private static final String LITERAL = "literal";
- /**
- * Constant String to flag the URL to replace at runtime for the endpoint
- */
- private static final String REPLACE_WITH_ACTUAL_URL = "REPLACE_WITH_ACTUAL_URL";
- private Set<QName> processedExceptions = new HashSet<QName>();
- private WSBinding binding;
- private String wsdlLocation;
- private String portWSDLID;
- private String schemaPrefix;
- private WSDLGeneratorExtension extension;
- List<WSDLGeneratorExtension> extensionHandlers;
-
- private String endpointAddress = REPLACE_WITH_ACTUAL_URL;
- private Container container;
- private final Class implType;
-
- private boolean inlineSchemas; // TODO
- private final boolean disableXmlSecurity;
-
- /**
- * Creates the WSDLGenerator
- * @param model The {@link AbstractSEIModelImpl} used to generate the WSDL
- * @param wsdlResolver The {@link WSDLResolver} to use resovle names while generating the WSDL
- * @param binding specifies which {@link javax.xml.ws.BindingType} to generate
- * @param extensions an array {@link WSDLGeneratorExtension} that will
- * be invoked to generate WSDL extensions
- */
- public WSDLGenerator(AbstractSEIModelImpl model, WSDLResolver wsdlResolver, WSBinding binding, Container container,
- Class implType, boolean inlineSchemas, WSDLGeneratorExtension... extensions) {
- this(model, wsdlResolver, binding, container, implType, inlineSchemas, false, extensions);
- }
-
- /**
- * Creates the WSDLGenerator
- * @param model The {@link AbstractSEIModelImpl} used to generate the WSDL
- * @param wsdlResolver The {@link WSDLResolver} to use resovle names while generating the WSDL
- * @param binding specifies which {@link javax.xml.ws.BindingType} to generate
- * @param disableXmlSecurity specifies whether to disable the secure xml processing feature
- * @param extensions an array {@link WSDLGeneratorExtension} that will
- * be invoked to generate WSDL extensions
- */
- public WSDLGenerator(AbstractSEIModelImpl model, WSDLResolver wsdlResolver, WSBinding binding, Container container,
- Class implType, boolean inlineSchemas, boolean disableXmlSecurity,
- WSDLGeneratorExtension... extensions) {
-
- this.model = model;
- resolver = new JAXWSOutputSchemaResolver();
- this.wsdlResolver = wsdlResolver;
- this.binding = binding;
- this.container = container;
- this.implType = implType;
- extensionHandlers = new ArrayList<WSDLGeneratorExtension>();
- this.inlineSchemas = inlineSchemas;
- this.disableXmlSecurity = disableXmlSecurity;
-
- // register handlers for default extensions
- register(new W3CAddressingWSDLGeneratorExtension());
- register(new W3CAddressingMetadataWSDLGeneratorExtension());
- register(new PolicyWSDLGeneratorExtension());
-
- if (container != null) { // on server
- WSDLGeneratorExtension[] wsdlGeneratorExtensions = container.getSPI(WSDLGeneratorExtension[].class);
- if (wsdlGeneratorExtensions != null) {
- for (WSDLGeneratorExtension wsdlGeneratorExtension : wsdlGeneratorExtensions) {
- register(wsdlGeneratorExtension);
- }
- }
- }
-
- for (WSDLGeneratorExtension w : extensions)
- register(w);
-
- this.extension = new WSDLGeneratorExtensionFacade(extensionHandlers.toArray(new WSDLGeneratorExtension[0]));
- }
-
- /**
- * Sets the endpoint address string to be written.
- * Defaults to {@link #REPLACE_WITH_ACTUAL_URL}.
- *
- * @param address wsdl:port/soap:address/[@location] value
- */
- public void setEndpointAddress(String address) {
- this.endpointAddress = address;
- }
-
- protected String mangleName(String name) {
- return BindingHelper.mangleNameToClassName(name);
- }
-
- /**
- * Performes the actual WSDL generation
- */
- public void doGeneration() {
- XmlSerializer serviceWriter;
- XmlSerializer portWriter = null;
- String fileName = mangleName(model.getServiceQName().getLocalPart());
- Result result = wsdlResolver.getWSDL(fileName + DOT_WSDL);
- wsdlLocation = result.getSystemId();
- serviceWriter = new CommentFilter(ResultFactory.createSerializer(result));
- if (model.getServiceQName().getNamespaceURI().equals(model.getTargetNamespace())) {
- portWriter = serviceWriter;
- schemaPrefix = fileName + "_";
- } else {
- String wsdlName = mangleName(model.getPortTypeName().getLocalPart());
- if (wsdlName.equals(fileName))
- wsdlName += "PortType";
- Holder<String> absWSDLName = new Holder<String>();
- absWSDLName.value = wsdlName + DOT_WSDL;
- result = wsdlResolver.getAbstractWSDL(absWSDLName);
-
- if (result != null) {
- portWSDLID = result.getSystemId();
- if (portWSDLID.equals(wsdlLocation)) {
- portWriter = serviceWriter;
- } else {
- portWriter = new CommentFilter(ResultFactory.createSerializer(result));
- }
- } else {
- portWSDLID = absWSDLName.value;
- }
- schemaPrefix = new java.io.File(portWSDLID).getName();
- int idx = schemaPrefix.lastIndexOf('.');
- if (idx > 0)
- schemaPrefix = schemaPrefix.substring(0, idx);
- schemaPrefix = mangleName(schemaPrefix) + "_";
- }
- generateDocument(serviceWriter, portWriter);
- }
-
- /**
- * Writing directly to XmlSerializer is a problem, since it doesn't suppress
- * xml declaration. Creating filter so that comment is written before TXW writes
- * anything in the WSDL.
- */
- private static class CommentFilter implements XmlSerializer {
- final XmlSerializer serializer;
- private static final String VERSION_COMMENT =
- " Generated by JAX-WS RI (http://jax-ws.java.net). RI's version is " + RuntimeVersion.VERSION + ". ";
-
- CommentFilter(XmlSerializer serializer) {
- this.serializer = serializer;
- }
-
- @Override
- public void startDocument() {
- serializer.startDocument();
- comment(new StringBuilder(VERSION_COMMENT));
- text(new StringBuilder("\n"));
- }
-
- @Override
- public void beginStartTag(String uri, String localName, String prefix) {
- serializer.beginStartTag(uri, localName, prefix);
- }
-
- @Override
- public void writeAttribute(String uri, String localName, String prefix, StringBuilder value) {
- serializer.writeAttribute(uri, localName, prefix, value);
- }
-
- @Override
- public void writeXmlns(String prefix, String uri) {
- serializer.writeXmlns(prefix, uri);
- }
-
- @Override
- public void endStartTag(String uri, String localName, String prefix) {
- serializer.endStartTag(uri, localName, prefix);
- }
-
- @Override
- public void endTag() {
- serializer.endTag();
- }
-
- @Override
- public void text(StringBuilder text) {
- serializer.text(text);
- }
-
- @Override
- public void cdata(StringBuilder text) {
- serializer.cdata(text);
- }
-
- @Override
- public void comment(StringBuilder comment) {
- serializer.comment(comment);
- }
-
- @Override
- public void endDocument() {
- serializer.endDocument();
- }
-
- @Override
- public void flush() {
- serializer.flush();
- }
-
- }
-
- private void generateDocument(XmlSerializer serviceStream, XmlSerializer portStream) {
- serviceDefinitions = TXW.create(Definitions.class, serviceStream);
- serviceDefinitions._namespace(WSDL_NAMESPACE, "");//WSDL_PREFIX);
- serviceDefinitions._namespace(XSD_NAMESPACE, XSD_PREFIX);
- serviceDefinitions.targetNamespace(model.getServiceQName().getNamespaceURI());
- serviceDefinitions._namespace(model.getServiceQName().getNamespaceURI(), TNS_PREFIX);
- if (binding.getSOAPVersion() == SOAPVersion.SOAP_12)
- serviceDefinitions._namespace(SOAP12_NAMESPACE, SOAP12_PREFIX);
- else
- serviceDefinitions._namespace(SOAP11_NAMESPACE, SOAP_PREFIX);
- serviceDefinitions.name(model.getServiceQName().getLocalPart());
- WSDLGenExtnContext serviceCtx = new WSDLGenExtnContext(serviceDefinitions, model, binding, container, implType);
- extension.start(serviceCtx);
- if (serviceStream != portStream && portStream != null) {
- // generate an abstract and concrete wsdl
- portDefinitions = TXW.create(Definitions.class, portStream);
- portDefinitions._namespace(WSDL_NAMESPACE, "");//WSDL_PREFIX);
- portDefinitions._namespace(XSD_NAMESPACE, XSD_PREFIX);
- if (model.getTargetNamespace() != null) {
- portDefinitions.targetNamespace(model.getTargetNamespace());
- portDefinitions._namespace(model.getTargetNamespace(), TNS_PREFIX);
- }
-
- String schemaLoc = relativize(portWSDLID, wsdlLocation);
- Import _import = serviceDefinitions._import().namespace(model.getTargetNamespace());
- _import.location(schemaLoc);
- } else if (portStream != null) {
- // abstract and concrete are the same
- portDefinitions = serviceDefinitions;
- } else {
- // import a provided abstract wsdl
- String schemaLoc = relativize(portWSDLID, wsdlLocation);
- Import _import = serviceDefinitions._import().namespace(model.getTargetNamespace());
- _import.location(schemaLoc);
- }
- extension.addDefinitionsExtension(serviceDefinitions);
-
- if (portDefinitions != null) {
- generateTypes();
- generateMessages();
- generatePortType();
- }
- generateBinding();
- generateService();
- //Give a chance to WSDLGeneratorExtensions to write stuff before closing </wsdl:defintions>
- extension.end(serviceCtx);
- serviceDefinitions.commit();
- if (portDefinitions != null && portDefinitions != serviceDefinitions)
- portDefinitions.commit();
- }
-
-
- /**
- * Generates the types section of the WSDL
- */
- protected void generateTypes() {
- types = portDefinitions.types();
- if (model.getBindingContext() != null) {
- if (inlineSchemas && model.getBindingContext().getClass().getName().indexOf("glassfish") == -1) {
- resolver.nonGlassfishSchemas = new ArrayList<DOMResult>();
- }
- try {
- model.getBindingContext().generateSchema(resolver);
- } catch (IOException e) {
- // TODO locallize and wrap this
- throw new WebServiceException(e.getMessage());
- }
- }
- if (resolver.nonGlassfishSchemas != null) {
- TransformerFactory tf = XmlUtil.newTransformerFactory(!disableXmlSecurity);
- try {
- Transformer t = tf.newTransformer();
- for (DOMResult xsd : resolver.nonGlassfishSchemas) {
- Document doc = (Document) xsd.getNode();
- SAXResult sax = new SAXResult(new TXWContentHandler(types));
- t.transform(new DOMSource(doc.getDocumentElement()), sax);
- }
- } catch (TransformerConfigurationException e) {
- throw new WebServiceException(e.getMessage(), e);
- } catch (TransformerException e) {
- throw new WebServiceException(e.getMessage(), e);
- }
- }
- generateWrappers();
- }
-
- void generateWrappers() {
- List<WrapperParameter> wrappers = new ArrayList<WrapperParameter>();
- for (JavaMethodImpl method : model.getJavaMethods()) {
- if(method.getBinding().isRpcLit()) continue;
- for (ParameterImpl p : method.getRequestParameters()) {
- if (p instanceof WrapperParameter) {
- if (WrapperComposite.class.equals((((WrapperParameter)p).getTypeInfo().type))) {
- wrappers.add((WrapperParameter)p);
- }
- }
- }
- for (ParameterImpl p : method.getResponseParameters()) {
- if (p instanceof WrapperParameter) {
- if (WrapperComposite.class.equals((((WrapperParameter)p).getTypeInfo().type))) {
- wrappers.add((WrapperParameter)p);
- }
- }
- }
- }
- if (wrappers.isEmpty()) return;
- HashMap<String, Schema> xsds = new HashMap<String, Schema>();
- for(WrapperParameter wp : wrappers) {
- String tns = wp.getName().getNamespaceURI();
- Schema xsd = xsds.get(tns);
- if (xsd == null) {
- xsd = types.schema();
- xsd.targetNamespace(tns);
- xsds.put(tns, xsd);
- }
- Element e = xsd._element(Element.class);
- e._attribute("name", wp.getName().getLocalPart());
- e.type(wp.getName());
- ComplexType ct = xsd._element(ComplexType.class);
- ct._attribute("name", wp.getName().getLocalPart());
- ExplicitGroup sq = ct.sequence();
- for (ParameterImpl p : wp.getWrapperChildren() ) {
- if (p.getBinding().isBody()) {
- LocalElement le = sq.element();
- le._attribute("name", p.getName().getLocalPart());
- TypeInfo typeInfo = p.getItemType();
- boolean repeatedElement = false;
- if (typeInfo == null) {
- typeInfo = p.getTypeInfo();
- } else {
- repeatedElement = true;
- }
- QName type = model.getBindingContext().getTypeName(typeInfo);
- le.type(type);
- if (repeatedElement) {
- le.minOccurs(0);
- le.maxOccurs("unbounded");
- }
- }
- }
- }
- }
-
- /**
- * Generates the WSDL messages
- */
- protected void generateMessages() {
- for (JavaMethodImpl method : model.getJavaMethods()) {
- generateSOAPMessages(method, method.getBinding());
- }
- }
-
- /**
- * Generates messages for a SOAPBinding
- * @param method The {@link JavaMethod} to generate messages for
- * @param binding The {@link com.sun.xml.internal.ws.api.model.soap.SOAPBinding} to add the generated messages to
- */
- protected void generateSOAPMessages(JavaMethodImpl method, com.sun.xml.internal.ws.api.model.soap.SOAPBinding binding) {
- boolean isDoclit = binding.isDocLit();
-// Message message = portDefinitions.message().name(method.getOperation().getName().getLocalPart());
- Message message = portDefinitions.message().name(method.getRequestMessageName());
- extension.addInputMessageExtension(message, method);
- com.sun.xml.internal.ws.wsdl.writer.document.Part part;
- BindingContext jaxbContext = model.getBindingContext();
- boolean unwrappable = true;
- for (ParameterImpl param : method.getRequestParameters()) {
- if (isDoclit) {
- if (isHeaderParameter(param))
- unwrappable = false;
-
- part = message.part().name(param.getPartName());
- part.element(param.getName());
- } else {
- if (param.isWrapperStyle()) {
- for (ParameterImpl childParam : ((WrapperParameter) param).getWrapperChildren()) {
- part = message.part().name(childParam.getPartName());
- part.type(jaxbContext.getTypeName(childParam.getXMLBridge().getTypeInfo()));
- }
- } else {
- part = message.part().name(param.getPartName());
- part.element(param.getName());
- }
- }
- }
- if (method.getMEP() != MEP.ONE_WAY) {
- message = portDefinitions.message().name(method.getResponseMessageName());
- extension.addOutputMessageExtension(message, method);
-
- for (ParameterImpl param : method.getResponseParameters()) {
- if (isDoclit) {
- part = message.part().name(param.getPartName());
- part.element(param.getName());
-
- } else {
- if (param.isWrapperStyle()) {
- for (ParameterImpl childParam : ((WrapperParameter) param).getWrapperChildren()) {
- part = message.part().name(childParam.getPartName());
- part.type(jaxbContext.getTypeName(childParam.getXMLBridge().getTypeInfo()));
- }
- } else {
- part = message.part().name(param.getPartName());
- part.element(param.getName());
- }
- }
- }
- }
- for (CheckedExceptionImpl exception : method.getCheckedExceptions()) {
- QName tagName = exception.getDetailType().tagName;
- String messageName = exception.getMessageName();
- QName messageQName = new QName(model.getTargetNamespace(), messageName);
- if (processedExceptions.contains(messageQName))
- continue;
- message = portDefinitions.message().name(messageName);
-
- extension.addFaultMessageExtension(message, method, exception);
- part = message.part().name("fault");//tagName.getLocalPart());
- part.element(tagName);
- processedExceptions.add(messageQName);
- }
- }
-
- /**
- * Generates the WSDL portType
- */
- protected void generatePortType() {
-
- PortType portType = portDefinitions.portType().name(model.getPortTypeName().getLocalPart());
- extension.addPortTypeExtension(portType);
- for (JavaMethodImpl method : model.getJavaMethods()) {
- Operation operation = portType.operation().name(method.getOperationName());
- generateParameterOrder(operation, method);
- extension.addOperationExtension(operation, method);
- switch (method.getMEP()) {
- case REQUEST_RESPONSE:
- // input message
- generateInputMessage(operation, method);
- // output message
- generateOutputMessage(operation, method);
- break;
- case ONE_WAY:
- generateInputMessage(operation, method);
- break;
- default:
- break;
- }
- // faults
- for (CheckedExceptionImpl exception : method.getCheckedExceptions()) {
- QName messageName = new QName(model.getTargetNamespace(), exception.getMessageName());
- FaultType paramType = operation.fault().message(messageName).name(exception.getMessageName());
- extension.addOperationFaultExtension(paramType, method, exception);
- }
- }
- }
-
- /**
- * Determines if the <CODE>method</CODE> is wrapper style
- * @param method The {@link JavaMethod} to check if it is wrapper style
- * @return true if the method is wrapper style, otherwise, false.
- */
- protected boolean isWrapperStyle(JavaMethodImpl method) {
- if (method.getRequestParameters().size() > 0) {
- ParameterImpl param = method.getRequestParameters().iterator().next();
- return param.isWrapperStyle();
- }
- return false;
- }
-
- /**
- * Determines if a {@link JavaMethod} is rpc/literal
- * @param method The method to check
- * @return true if method is rpc/literal, otherwise, false
- */
- protected boolean isRpcLit(JavaMethodImpl method) {
- return method.getBinding().getStyle() == Style.RPC;
- }
-
- /**
- * Generates the parameterOrder for a PortType operation
- * @param operation The operation to generate the parameterOrder for
- * @param method The {@link JavaMethod} to generate the parameterOrder from
- */
- protected void generateParameterOrder(Operation operation, JavaMethodImpl method) {
- if (method.getMEP() == MEP.ONE_WAY)
- return;
- if (isRpcLit(method))
- generateRpcParameterOrder(operation, method);
- else
- generateDocumentParameterOrder(operation, method);
- }
-
- /**
- * Generates the parameterOrder for a PortType operation
- * @param operation the operation to generate the parameterOrder for
- * @param method the {@link JavaMethod} to generate the parameterOrder from
- */
- protected void generateRpcParameterOrder(Operation operation, JavaMethodImpl method) {
- String partName;
- StringBuilder paramOrder = new StringBuilder();
- Set<String> partNames = new HashSet<String>();
- List<ParameterImpl> sortedParams = sortMethodParameters(method);
- int i = 0;
- for (ParameterImpl parameter : sortedParams) {
- if (parameter.getIndex() >= 0) {
- partName = parameter.getPartName();
- if (!partNames.contains(partName)) {
- if (i++ > 0)
- paramOrder.append(' ');
- paramOrder.append(partName);
- partNames.add(partName);
- }
- }
- }
- if (i > 1) {
- operation.parameterOrder(paramOrder.toString());
- }
- }
-
-
- /**
- * Generates the parameterOrder for a PortType operation
- * @param operation the operation to generate the parameterOrder for
- * @param method the {@link JavaMethod} to generate the parameterOrder from
- */
- protected void generateDocumentParameterOrder(Operation operation, JavaMethodImpl method) {
- String partName;
- StringBuilder paramOrder = new StringBuilder();
- Set<String> partNames = new HashSet<String>();
- List<ParameterImpl> sortedParams = sortMethodParameters(method);
-// boolean isWrapperStyle = isWrapperStyle(method);
- int i = 0;
- for (ParameterImpl parameter : sortedParams) {
-// System.out.println("param: "+parameter.getIndex()+" name: "+parameter.getName().getLocalPart());
- if (parameter.getIndex() < 0)
- continue;
-
- // This should be safe change. if it affects compatibility,
- // remove the following single statement and uncomment the code in block below.
- partName = parameter.getPartName();
- /*
- if (isWrapperStyle && isBodyParameter(parameter)) {
- System.out.println("isWrapper and is body");
- if (method.getRequestParameters().contains(parameter))
- partName = PARAMETERS;
- else {
- //Rama: don't understand this logic "Response" below,
-
- // really make sure this is a wrapper style wsdl we are creating
- partName = RESPONSE;
- }
- } else {
- partName = parameter.getPartName();
- }*/
-
- if (!partNames.contains(partName)) {
- if (i++ > 0)
- paramOrder.append(' ');
- paramOrder.append(partName);
- partNames.add(partName);
- }
- }
- if (i > 1) {
- operation.parameterOrder(paramOrder.toString());
- }
- }
-
- /**
- * Sorts the parameters for the method by their position
- * @param method the {@link JavaMethod} used to sort the parameters
- * @return the sorted {@link List} of parameters
- */
- protected List<ParameterImpl> sortMethodParameters(JavaMethodImpl method) {
- Set<ParameterImpl> paramSet = new HashSet<ParameterImpl>();
- List<ParameterImpl> sortedParams = new ArrayList<ParameterImpl>();
- if (isRpcLit(method)) {
- for (ParameterImpl param : method.getRequestParameters()) {
- if (param instanceof WrapperParameter) {
- paramSet.addAll(((WrapperParameter) param).getWrapperChildren());
- } else {
- paramSet.add(param);
- }
- }
- for (ParameterImpl param : method.getResponseParameters()) {
- if (param instanceof WrapperParameter) {
- paramSet.addAll(((WrapperParameter) param).getWrapperChildren());
- } else {
- paramSet.add(param);
- }
- }
- } else {
- paramSet.addAll(method.getRequestParameters());
- paramSet.addAll(method.getResponseParameters());
- }
- Iterator<ParameterImpl> params = paramSet.iterator();
- if (paramSet.isEmpty())
- return sortedParams;
- ParameterImpl param = params.next();
- sortedParams.add(param);
- ParameterImpl sortedParam;
- int pos;
- for (int i = 1; i < paramSet.size(); i++) {
- param = params.next();
- for (pos = 0; pos < i; pos++) {
- sortedParam = sortedParams.get(pos);
- if (param.getIndex() == sortedParam.getIndex() &&
- param instanceof WrapperParameter)
- break;
- if (param.getIndex() < sortedParam.getIndex()) {
- break;
- }
- }
- sortedParams.add(pos, param);
- }
- return sortedParams;
- }
-
- /**
- * Determines if a parameter is associated with the message Body
- * @param parameter the parameter to check
- * @return true if the parameter is a <code>body</code> parameter
- */
- protected boolean isBodyParameter(ParameterImpl parameter) {
- ParameterBinding paramBinding = parameter.getBinding();
- return paramBinding.isBody();
- }
-
- protected boolean isHeaderParameter(ParameterImpl parameter) {
- ParameterBinding paramBinding = parameter.getBinding();
- return paramBinding.isHeader();
- }
-
- protected boolean isAttachmentParameter(ParameterImpl parameter) {
- ParameterBinding paramBinding = parameter.getBinding();
- return paramBinding.isAttachment();
- }
-
-
- /**
- * Generates the Binding section of the WSDL
- */
- protected void generateBinding() {
- Binding newBinding = serviceDefinitions.binding().name(model.getBoundPortTypeName().getLocalPart());
- extension.addBindingExtension(newBinding);
- newBinding.type(model.getPortTypeName());
- boolean first = true;
- for (JavaMethodImpl method : model.getJavaMethods()) {
- if (first) {
- SOAPBinding sBinding = method.getBinding();
- SOAPVersion soapVersion = sBinding.getSOAPVersion();
- if (soapVersion == SOAPVersion.SOAP_12) {
- com.sun.xml.internal.ws.wsdl.writer.document.soap12.SOAPBinding soapBinding = newBinding.soap12Binding();
- soapBinding.transport(this.binding.getBindingId().getTransport());
- if (sBinding.getStyle().equals(Style.DOCUMENT))
- soapBinding.style(DOCUMENT);
- else
- soapBinding.style(RPC);
- } else {
- com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPBinding soapBinding = newBinding.soapBinding();
- soapBinding.transport(this.binding.getBindingId().getTransport());
- if (sBinding.getStyle().equals(Style.DOCUMENT))
- soapBinding.style(DOCUMENT);
- else
- soapBinding.style(RPC);
- }
- first = false;
- }
- if (this.binding.getBindingId().getSOAPVersion() == SOAPVersion.SOAP_12)
- generateSOAP12BindingOperation(method, newBinding);
- else
- generateBindingOperation(method, newBinding);
- }
- }
-
- protected void generateBindingOperation(JavaMethodImpl method, Binding binding) {
- BindingOperationType operation = binding.operation().name(method.getOperationName());
- extension.addBindingOperationExtension(operation, method);
- String targetNamespace = model.getTargetNamespace();
- QName requestMessage = new QName(targetNamespace, method.getOperationName());
- List<ParameterImpl> bodyParams = new ArrayList<ParameterImpl>();
- List<ParameterImpl> headerParams = new ArrayList<ParameterImpl>();
- splitParameters(bodyParams, headerParams, method.getRequestParameters());
- SOAPBinding soapBinding = method.getBinding();
- operation.soapOperation().soapAction(soapBinding.getSOAPAction());
-
- // input
- TypedXmlWriter input = operation.input();
- extension.addBindingOperationInputExtension(input, method);
- BodyType body = input._element(Body.class);
- boolean isRpc = soapBinding.getStyle().equals(Style.RPC);
- if (soapBinding.getUse() == Use.LITERAL) {
- body.use(LITERAL);
- if (headerParams.size() > 0) {
- if (bodyParams.size() > 0) {
- ParameterImpl param = bodyParams.iterator().next();
- if (isRpc) {
- StringBuilder parts = new StringBuilder();
- int i = 0;
- for (ParameterImpl parameter : ((WrapperParameter) param).getWrapperChildren()) {
- if (i++ > 0)
- parts.append(' ');
- parts.append(parameter.getPartName());
- }
- body.parts(parts.toString());
- } else {
- body.parts(param.getPartName());
- }
- } else {
- body.parts("");
- }
- generateSOAPHeaders(input, headerParams, requestMessage);
- }
- if (isRpc) {
- body.namespace(method.getRequestParameters().iterator().next().getName().getNamespaceURI());
- }
- } else {
- // TODO localize this
- throw new WebServiceException("encoded use is not supported");
- }
-
- if (method.getMEP() != MEP.ONE_WAY) {
- // output
- bodyParams.clear();
- headerParams.clear();
- splitParameters(bodyParams, headerParams, method.getResponseParameters());
- TypedXmlWriter output = operation.output();
- extension.addBindingOperationOutputExtension(output, method);
- body = output._element(Body.class);
- body.use(LITERAL);
- if (headerParams.size() > 0) {
- StringBuilder parts = new StringBuilder();
- if (bodyParams.size() > 0) {
- ParameterImpl param = bodyParams.iterator().hasNext() ? bodyParams.iterator().next() : null;
- if (param != null) {
- if (isRpc) {
- int i = 0;
- for (ParameterImpl parameter : ((WrapperParameter) param).getWrapperChildren()) {
- if (i++ > 0) {
- parts.append(" ");
- }
- parts.append(parameter.getPartName());
- }
- } else {
- parts = new StringBuilder(param.getPartName());
- }
- }
- }
- body.parts(parts.toString());
- QName responseMessage = new QName(targetNamespace, method.getResponseMessageName());
- generateSOAPHeaders(output, headerParams, responseMessage);
- }
- if (isRpc) {
- body.namespace(method.getRequestParameters().iterator().next().getName().getNamespaceURI());
- }
- }
- for (CheckedExceptionImpl exception : method.getCheckedExceptions()) {
- Fault fault = operation.fault().name(exception.getMessageName());
- extension.addBindingOperationFaultExtension(fault, method, exception);
- SOAPFault soapFault = fault._element(SOAPFault.class).name(exception.getMessageName());
- soapFault.use(LITERAL);
- }
- }
-
- protected void generateSOAP12BindingOperation(JavaMethodImpl method, Binding binding) {
- BindingOperationType operation = binding.operation().name(method.getOperationName());
- extension.addBindingOperationExtension(operation, method);
- String targetNamespace = model.getTargetNamespace();
- QName requestMessage = new QName(targetNamespace, method.getOperationName());
- ArrayList<ParameterImpl> bodyParams = new ArrayList<ParameterImpl>();
- ArrayList<ParameterImpl> headerParams = new ArrayList<ParameterImpl>();
- splitParameters(bodyParams, headerParams, method.getRequestParameters());
- SOAPBinding soapBinding = method.getBinding();
-
- String soapAction = soapBinding.getSOAPAction();
- if (soapAction != null) {
- operation.soap12Operation().soapAction(soapAction);
- }
-
- // input
- TypedXmlWriter input = operation.input();
- extension.addBindingOperationInputExtension(input, method);
- com.sun.xml.internal.ws.wsdl.writer.document.soap12.BodyType body = input._element(com.sun.xml.internal.ws.wsdl.writer.document.soap12.Body.class);
- boolean isRpc = soapBinding.getStyle().equals(Style.RPC);
- if (soapBinding.getUse().equals(Use.LITERAL)) {
- body.use(LITERAL);
- if (headerParams.size() > 0) {
- if (bodyParams.size() > 0) {
- ParameterImpl param = bodyParams.iterator().next();
- if (isRpc) {
- StringBuilder parts = new StringBuilder();
- int i = 0;
- for (ParameterImpl parameter : ((WrapperParameter) param).getWrapperChildren()) {
- if (i++ > 0)
- parts.append(' ');
- parts.append(parameter.getPartName());
- }
- body.parts(parts.toString());
- } else {
- body.parts(param.getPartName());
- }
- } else {
- body.parts("");
- }
- generateSOAP12Headers(input, headerParams, requestMessage);
- }
- if (isRpc) {
- body.namespace(method.getRequestParameters().iterator().next().getName().getNamespaceURI());
- }
- } else {
- // TODO localize this
- throw new WebServiceException("encoded use is not supported");
- }
-
- if (method.getMEP() != MEP.ONE_WAY) {
- // output
- bodyParams.clear();
- headerParams.clear();
- splitParameters(bodyParams, headerParams, method.getResponseParameters());
- TypedXmlWriter output = operation.output();
- extension.addBindingOperationOutputExtension(output, method);
- body = output._element(com.sun.xml.internal.ws.wsdl.writer.document.soap12.Body.class);
- body.use(LITERAL);
- if (headerParams.size() > 0) {
- if (bodyParams.size() > 0) {
- ParameterImpl param = bodyParams.iterator().next();
- if (isRpc) {
- StringBuilder parts = new StringBuilder();
- int i = 0;
- for (ParameterImpl parameter : ((WrapperParameter) param).getWrapperChildren()) {
- if (i++ > 0) {
- parts.append(" ");
- }
- parts.append(parameter.getPartName());
- }
- body.parts(parts.toString());
- } else {
- body.parts(param.getPartName());
- }
- } else {
- body.parts("");
- }
- QName responseMessage = new QName(targetNamespace, method.getResponseMessageName());
- generateSOAP12Headers(output, headerParams, responseMessage);
- }
- if (isRpc) {
- body.namespace(method.getRequestParameters().iterator().next().getName().getNamespaceURI());
- }
- }
- for (CheckedExceptionImpl exception : method.getCheckedExceptions()) {
- Fault fault = operation.fault().name(exception.getMessageName());
- extension.addBindingOperationFaultExtension(fault, method, exception);
- com.sun.xml.internal.ws.wsdl.writer.document.soap12.SOAPFault soapFault = fault._element(com.sun.xml.internal.ws.wsdl.writer.document.soap12.SOAPFault.class).name(exception.getMessageName());
- soapFault.use(LITERAL);
- }
- }
-
- protected void splitParameters(List<ParameterImpl> bodyParams, List<ParameterImpl> headerParams, List<ParameterImpl> params) {
- for (ParameterImpl parameter : params) {
- if (isBodyParameter(parameter)) {
- bodyParams.add(parameter);
- } else {
- headerParams.add(parameter);
- }
- }
- }
-
- protected void generateSOAPHeaders(TypedXmlWriter writer, List<ParameterImpl> parameters, QName message) {
-
- for (ParameterImpl headerParam : parameters) {
- Header header = writer._element(Header.class);
- header.message(message);
- header.part(headerParam.getPartName());
- header.use(LITERAL);
- }
- }
-
- protected void generateSOAP12Headers(TypedXmlWriter writer, List<ParameterImpl> parameters, QName message) {
-
- for (ParameterImpl headerParam : parameters) {
- com.sun.xml.internal.ws.wsdl.writer.document.soap12.Header header = writer._element(com.sun.xml.internal.ws.wsdl.writer.document.soap12.Header.class);
- header.message(message);
-
-
- header.part(headerParam.getPartName());
- header.use(LITERAL);
- }
- }
-
- /**
- * Generates the Service section of the WSDL
- */
- protected void generateService() {
- QName portQName = model.getPortName();
- QName serviceQName = model.getServiceQName();
- Service service = serviceDefinitions.service().name(serviceQName.getLocalPart());
- extension.addServiceExtension(service);
- Port port = service.port().name(portQName.getLocalPart());
- port.binding(model.getBoundPortTypeName());
- extension.addPortExtension(port);
- if (model.getJavaMethods().isEmpty())
- return;
-
- if (this.binding.getBindingId().getSOAPVersion() == SOAPVersion.SOAP_12) {
- com.sun.xml.internal.ws.wsdl.writer.document.soap12.SOAPAddress address = port._element(com.sun.xml.internal.ws.wsdl.writer.document.soap12.SOAPAddress.class);
- address.location(endpointAddress);
- } else {
- SOAPAddress address = port._element(SOAPAddress.class);
- address.location(endpointAddress);
- }
- }
-
- protected void generateInputMessage(Operation operation, JavaMethodImpl method) {
- ParamType paramType = operation.input();
- extension.addOperationInputExtension(paramType, method);
-// paramType.message(method.getOperation().getName());
- paramType.message(new QName(model.getTargetNamespace(), method.getRequestMessageName()));
- }
-
- protected void generateOutputMessage(Operation operation, JavaMethodImpl method) {
- ParamType paramType = operation.output();
- extension.addOperationOutputExtension(paramType, method);
-// paramType.message(new QName(model.getTargetNamespace(), method.getOperation().getLocalName()+RESPONSE));
- paramType.message(new QName(model.getTargetNamespace(), method.getResponseMessageName()));
- }
-
- /**
- * Creates the {@link Result} object used by JAXB to generate a schema for the
- * namesapceUri namespace.
- * @param namespaceUri The namespace for the schema being generated
- * @param suggestedFileName the JAXB suggested file name for the schema file
- * @return the {@link Result} for JAXB to generate the schema into
- * @throws java.io.IOException thrown if on IO error occurs
- */
- public Result createOutputFile(String namespaceUri, String suggestedFileName) throws IOException {
- Result result;
- if (namespaceUri == null) {
- return null;
- }
-
- Holder<String> fileNameHolder = new Holder<String>();
- fileNameHolder.value = schemaPrefix + suggestedFileName;
- result = wsdlResolver.getSchemaOutput(namespaceUri, fileNameHolder);
-// System.out.println("schema file: "+fileNameHolder.value);
-// System.out.println("result: "+result);
- String schemaLoc;
- if (result == null)
- schemaLoc = fileNameHolder.value;
- else
- schemaLoc = relativize(result.getSystemId(), wsdlLocation);
- boolean isEmptyNs = namespaceUri.trim().equals("");
- if (!isEmptyNs) {
- com.sun.xml.internal.ws.wsdl.writer.document.xsd.Import _import = types.schema()._import();
- _import.namespace(namespaceUri);
- _import.schemaLocation(schemaLoc);
- }
- return result;
- }
-
- private Result createInlineSchema(String namespaceUri, String suggestedFileName) throws IOException {
- Result result;
- if (namespaceUri.equals("")) {
- return null;
- }
-
-// Holder<String> fileNameHolder = new Holder<String>();
-// fileNameHolder.value = schemaPrefix+suggestedFileName;
-// result = wsdlResolver.getSchemaOutput(namespaceUri, fileNameHolder);
-// if (result == null) {
-// // JAXB doesn't have to generate it, a schema is already available
-// com.sun.xml.internal.ws.wsdl.writer.document.xsd.Import _import = types.schema()._import().namespace(namespaceUri);
-// _import.schemaLocation(fileNameHolder.value);
-// } else {
- // Let JAXB write the schema directly into wsdl's TypedXmlWriter
- result = new TXWResult(types);
- result.setSystemId("");
-// }
- return result;
- }
-
- /**
- * Relativizes a URI by using another URI (base URI.)
- *
- * <p>
- * For example, {@code relative("http://www.sun.com/abc/def","http://www.sun.com/pqr/stu") => "../abc/def"}
- *
- * <p>
- * This method only works on hierarchical URI's, not opaque URI's (refer to the
- * <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/URI.html">java.net.URI</a>
- * javadoc for complete definitions of these terms.
- *
- * <p>
- * This method will not normalize the relative URI.
- * @param uri the URI to relativize
- *
- *
- * @param baseUri the base URI to use for the relativization
- * @return the relative URI or the original URI if a relative one could not be computed
- */
- protected static String relativize(String uri, String baseUri) {
- try {
- assert uri != null;
-
- if (baseUri == null) return uri;
-
- URI theUri = new URI(escapeURI(uri));
- URI theBaseUri = new URI(escapeURI(baseUri));
-
- if (theUri.isOpaque() || theBaseUri.isOpaque())
- return uri;
-
- if (!equalsIgnoreCase(theUri.getScheme(), theBaseUri.getScheme()) ||
- !equal(theUri.getAuthority(), theBaseUri.getAuthority()))
- return uri;
-
- String uriPath = theUri.getPath();
- String basePath = theBaseUri.getPath();
-
- // normalize base path
- if (!basePath.endsWith("/")) {
- basePath = normalizeUriPath(basePath);
- }
-
- if (uriPath.equals(basePath))
- return ".";
-
- String relPath = calculateRelativePath(uriPath, basePath);
-
- if (relPath == null)
- return uri; // recursion found no commonality in the two uris at all
- StringBuilder relUri = new StringBuilder();
- relUri.append(relPath);
- if (theUri.getQuery() != null)
- relUri.append('?').append(theUri.getQuery());
- if (theUri.getFragment() != null)
- relUri.append('#').append(theUri.getFragment());
-
- return relUri.toString();
- } catch (URISyntaxException e) {
- throw new InternalError("Error escaping one of these uris:\n\t" + uri + "\n\t" + baseUri);
- }
- }
-
- private static String calculateRelativePath(String uri, String base) {
- if (base == null) {
- return null;
- }
- if (uri.startsWith(base)) {
- return uri.substring(base.length());
- } else {
- return "../" + calculateRelativePath(uri, getParentUriPath(base));
- }
- }
-
-
- /**
- * Implements the SchemaOutputResolver used by JAXB to
- */
- protected class JAXWSOutputSchemaResolver extends SchemaOutputResolver {
- ArrayList<DOMResult> nonGlassfishSchemas = null;
-
- /**
- * Creates the {@link Result} object used by JAXB to generate a schema for the
- * namesapceUri namespace.
- * @param namespaceUri The namespace for the schema being generated
- * @param suggestedFileName the JAXB suggested file name for the schema file
- * @return the {@link Result} for JAXB to generate the schema into
- * @throws java.io.IOException thrown if on IO error occurs
- */
- @Override
- public Result createOutput(String namespaceUri, String suggestedFileName) throws IOException {
- return inlineSchemas
- ? ((nonGlassfishSchemas != null) ? nonGlassfishSchemaResult(namespaceUri, suggestedFileName) : createInlineSchema(namespaceUri, suggestedFileName))
-// ? createInlineSchema(namespaceUri, suggestedFileName)
- : createOutputFile(namespaceUri, suggestedFileName);
- }
-
- private Result nonGlassfishSchemaResult(String namespaceUri, String suggestedFileName) throws IOException {
- DOMResult result = new DOMResult();
- result.setSystemId("");
- nonGlassfishSchemas.add(result);
- return result;
- }
- }
-
- private void register(WSDLGeneratorExtension h) {
- extensionHandlers.add(h);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGeneratorExtensionFacade.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGeneratorExtensionFacade.java
deleted file mode 100644
index ce6a1c49..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGeneratorExtensionFacade.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.ws.api.model.CheckedException;
-import com.sun.xml.internal.ws.api.model.JavaMethod;
-import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGenExtnContext;
-import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGeneratorExtension;
-
-/**
- * {@link WSDLGeneratorExtension} that delegates to
- * multiple {@link WSDLGeneratorExtension}s.
- *
- * <p>
- * This simplifies {@link WSDLGenerator} since it now
- * only needs to work with one {@link WSDLGeneratorExtension}.
- *
- *
- * @author Doug Kohlert
- */
-final class WSDLGeneratorExtensionFacade extends WSDLGeneratorExtension {
- private final WSDLGeneratorExtension[] extensions;
-
- WSDLGeneratorExtensionFacade(WSDLGeneratorExtension... extensions) {
- assert extensions!=null;
- this.extensions = extensions;
- }
-
- public void start(WSDLGenExtnContext ctxt) {
- for (WSDLGeneratorExtension e : extensions)
- e.start(ctxt);
- }
-
- public void end(@NotNull WSDLGenExtnContext ctxt) {
- for (WSDLGeneratorExtension e : extensions)
- e.end(ctxt);
- }
-
- public void addDefinitionsExtension(TypedXmlWriter definitions) {
- for (WSDLGeneratorExtension e : extensions)
- e.addDefinitionsExtension(definitions);
- }
-
- public void addServiceExtension(TypedXmlWriter service) {
- for (WSDLGeneratorExtension e : extensions)
- e.addServiceExtension(service);
- }
-
- public void addPortExtension(TypedXmlWriter port) {
- for (WSDLGeneratorExtension e : extensions)
- e.addPortExtension(port);
- }
-
- public void addPortTypeExtension(TypedXmlWriter portType) {
- for (WSDLGeneratorExtension e : extensions)
- e.addPortTypeExtension(portType);
- }
-
- public void addBindingExtension(TypedXmlWriter binding) {
- for (WSDLGeneratorExtension e : extensions)
- e.addBindingExtension(binding);
- }
-
- public void addOperationExtension(TypedXmlWriter operation, JavaMethod method) {
- for (WSDLGeneratorExtension e : extensions)
- e.addOperationExtension(operation, method);
- }
-
- public void addBindingOperationExtension(TypedXmlWriter operation, JavaMethod method) {
- for (WSDLGeneratorExtension e : extensions)
- e.addBindingOperationExtension(operation, method);
- }
-
- public void addInputMessageExtension(TypedXmlWriter message, JavaMethod method) {
- for (WSDLGeneratorExtension e : extensions)
- e.addInputMessageExtension(message, method);
- }
-
- public void addOutputMessageExtension(TypedXmlWriter message, JavaMethod method) {
- for (WSDLGeneratorExtension e : extensions)
- e.addOutputMessageExtension(message, method);
- }
-
- public void addOperationInputExtension(TypedXmlWriter input, JavaMethod method) {
- for (WSDLGeneratorExtension e : extensions)
- e.addOperationInputExtension(input, method);
- }
-
- public void addOperationOutputExtension(TypedXmlWriter output, JavaMethod method) {
- for (WSDLGeneratorExtension e : extensions)
- e.addOperationOutputExtension(output, method);
- }
-
- public void addBindingOperationInputExtension(TypedXmlWriter input, JavaMethod method) {
- for (WSDLGeneratorExtension e : extensions)
- e.addBindingOperationInputExtension(input, method);
- }
-
- public void addBindingOperationOutputExtension(TypedXmlWriter output, JavaMethod method) {
- for (WSDLGeneratorExtension e : extensions)
- e.addBindingOperationOutputExtension(output, method);
- }
-
- public void addBindingOperationFaultExtension(TypedXmlWriter fault, JavaMethod method, CheckedException ce) {
- for (WSDLGeneratorExtension e : extensions)
- e.addBindingOperationFaultExtension(fault, method, ce);
- }
-
- public void addFaultMessageExtension(TypedXmlWriter message, JavaMethod method, CheckedException ce) {
- for (WSDLGeneratorExtension e : extensions)
- e.addFaultMessageExtension(message, method, ce);
- }
-
- public void addOperationFaultExtension(TypedXmlWriter fault, JavaMethod method, CheckedException ce) {
- for (WSDLGeneratorExtension e : extensions)
- e.addOperationFaultExtension(fault, method, ce);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLPatcher.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLPatcher.java
deleted file mode 100644
index 8e3e5f2f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLPatcher.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer;
-
-import com.sun.istack.internal.NotNull;
-import com.sun.xml.internal.ws.api.server.PortAddressResolver;
-import com.sun.xml.internal.ws.util.xml.XMLStreamReaderToXMLStreamWriter;
-import com.sun.xml.internal.ws.wsdl.parser.WSDLConstants;
-import com.sun.xml.internal.ws.addressing.W3CAddressingConstants;
-import com.sun.xml.internal.ws.addressing.v200408.MemberSubmissionAddressingConstants;
-import com.sun.istack.internal.Nullable;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import java.util.logging.Logger;
-
-/**
- * Patches WSDL with the correct endpoint address and the relative paths
- * to other documents.
- *
- * @author Jitendra Kotamraju
- * @author Kohsuke Kawaguchi
- */
-public final class WSDLPatcher extends XMLStreamReaderToXMLStreamWriter {
-
- private static final String NS_XSD = "http://www.w3.org/2001/XMLSchema";
- private static final QName SCHEMA_INCLUDE_QNAME = new QName(NS_XSD, "include");
- private static final QName SCHEMA_IMPORT_QNAME = new QName(NS_XSD, "import");
- private static final QName SCHEMA_REDEFINE_QNAME = new QName(NS_XSD, "redefine");
-
- private static final Logger logger = Logger.getLogger(
- com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".wsdl.patcher");
-
- private final DocumentLocationResolver docResolver;
- private final PortAddressResolver portAddressResolver;
-
- //
- // fields accumulated as we parse through documents
- //
- private String targetNamespace;
- private QName serviceName;
- private QName portName;
- private String portAddress;
-
- // true inside <wsdl:service>/<wsdl:part>/<wsa:EndpointReference>
- private boolean inEpr;
- // true inside <wsdl:service>/<wsdl:part>/<wsa:EndpointReference>/<wsa:Address>
- private boolean inEprAddress;
-
- /**
- * Creates a {@link WSDLPatcher} for patching WSDL.
- *
- * @param portAddressResolver
- * address of the endpoint is resolved using this docResolver.
- * @param docResolver
- * Consulted to get the import/include document locations.
- * Must not be null.
- */
- public WSDLPatcher(@NotNull PortAddressResolver portAddressResolver,
- @NotNull DocumentLocationResolver docResolver) {
- this.portAddressResolver = portAddressResolver;
- this.docResolver = docResolver;
- }
-
- @Override
- protected void handleAttribute(int i) throws XMLStreamException {
- QName name = in.getName();
- String attLocalName = in.getAttributeLocalName(i);
-
- if((name.equals(SCHEMA_INCLUDE_QNAME) && attLocalName.equals("schemaLocation"))
- || (name.equals(SCHEMA_IMPORT_QNAME) && attLocalName.equals("schemaLocation"))
- || (name.equals(SCHEMA_REDEFINE_QNAME) && attLocalName.equals("schemaLocation"))
- || (name.equals(WSDLConstants.QNAME_IMPORT) && attLocalName.equals("location"))) {
- // patch this attribute value.
-
- String relPath = in.getAttributeValue(i);
- String actualPath = getPatchedImportLocation(relPath);
- if (actualPath == null) {
- return; // skip this attribute to leave it up to "implicit reference".
- }
-
- logger.fine("Fixing the relative location:"+relPath
- +" with absolute location:"+actualPath);
- writeAttribute(i, actualPath);
- return;
- }
-
- if (name.equals(WSDLConstants.NS_SOAP_BINDING_ADDRESS) ||
- name.equals(WSDLConstants.NS_SOAP12_BINDING_ADDRESS)) {
-
- if(attLocalName.equals("location")) {
- portAddress = in.getAttributeValue(i);
- String value = getAddressLocation();
- if (value != null) {
- logger.fine("Service:"+serviceName+ " port:"+portName
- + " current address "+portAddress+" Patching it with "+value);
- writeAttribute(i, value);
- return;
- }
- }
- }
-
- super.handleAttribute(i);
- }
-
- /**
- * Writes out an {@code i}-th attribute but with a different value.
- * @param i attribute index
- * @param value attribute value
- * @throws XMLStreamException when an error encountered while writing attribute
- */
- private void writeAttribute(int i, String value) throws XMLStreamException {
- String nsUri = in.getAttributeNamespace(i);
- if(nsUri!=null)
- out.writeAttribute( in.getAttributePrefix(i), nsUri, in.getAttributeLocalName(i), value );
- else
- out.writeAttribute( in.getAttributeLocalName(i), value );
- }
-
- @Override
- protected void handleStartElement() throws XMLStreamException {
- QName name = in.getName();
-
- if (name.equals(WSDLConstants.QNAME_DEFINITIONS)) {
- String value = in.getAttributeValue(null,"targetNamespace");
- if (value != null) {
- targetNamespace = value;
- }
- } else if (name.equals(WSDLConstants.QNAME_SERVICE)) {
- String value = in.getAttributeValue(null,"name");
- if (value != null) {
- serviceName = new QName(targetNamespace, value);
- }
- } else if (name.equals(WSDLConstants.QNAME_PORT)) {
- String value = in.getAttributeValue(null,"name");
- if (value != null) {
- portName = new QName(targetNamespace,value);
- }
- } else if (name.equals(W3CAddressingConstants.WSA_EPR_QNAME)
- || name.equals(MemberSubmissionAddressingConstants.WSA_EPR_QNAME)) {
- if (serviceName != null && portName != null) {
- inEpr = true;
- }
- } else if (name.equals(W3CAddressingConstants.WSA_ADDRESS_QNAME)
- || name.equals(MemberSubmissionAddressingConstants.WSA_ADDRESS_QNAME)) {
- if (inEpr) {
- inEprAddress = true;
- }
- }
- super.handleStartElement();
- }
-
- @Override
- protected void handleEndElement() throws XMLStreamException {
- QName name = in.getName();
- if (name.equals(WSDLConstants.QNAME_SERVICE)) {
- serviceName = null;
- } else if (name.equals(WSDLConstants.QNAME_PORT)) {
- portName = null;
- } else if (name.equals(W3CAddressingConstants.WSA_EPR_QNAME)
- || name.equals(MemberSubmissionAddressingConstants.WSA_EPR_QNAME)) {
- if (inEpr) {
- inEpr = false;
- }
- } else if (name.equals(W3CAddressingConstants.WSA_ADDRESS_QNAME)
- || name.equals(MemberSubmissionAddressingConstants.WSA_ADDRESS_QNAME)) {
- if (inEprAddress) {
- String value = getAddressLocation();
- if (value != null) {
- logger.fine("Fixing EPR Address for service:"+serviceName+ " port:"+portName
- + " address with "+value);
- out.writeCharacters(value);
- }
- inEprAddress = false;
- }
- }
- super.handleEndElement();
- }
-
- @Override
- protected void handleCharacters() throws XMLStreamException {
- // handleCharacters() may be called multiple times.
- if (inEprAddress) {
- String value = getAddressLocation();
- if (value != null) {
- // will write the address with <wsa:Address> end element
- return;
- }
- }
- super.handleCharacters();
- }
-
- /**
- * Returns the location to be placed into the generated document.
- *
- * @param relPath relative URI to be resolved
- * @return
- * null to leave it to the "implicit reference".
- */
- private @Nullable String getPatchedImportLocation(String relPath) {
- return docResolver.getLocationFor(null, relPath);
- }
-
- /**
- * For the given service, port names it matches the correct endpoint and
- * reutrns its endpoint address
- *
- * @return returns the resolved endpoint address
- */
- private String getAddressLocation() {
- return (portAddressResolver == null || portName == null)
- ? null : portAddressResolver.getAddressFor(serviceName, portName.getLocalPart(), portAddress);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLResolver.java
deleted file mode 100644
index 843681c7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLResolver.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.ws.wsdl.writer;
-
-/**
- * @deprecated Use com.oracle.webservices.internal.api.databinding.WSDLResolver directly
- *
- */
-public interface WSDLResolver extends com.oracle.webservices.internal.api.databinding.WSDLResolver {
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Binding.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Binding.java
deleted file mode 100644
index ca9a4e1b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Binding.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPBinding;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("binding")
-public interface Binding
- extends TypedXmlWriter, StartWithExtensionsType
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Binding type(QName value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Binding name(String value);
-
- @XmlElement
- public BindingOperationType operation();
-
- @XmlElement(value="binding",ns="http://schemas.xmlsoap.org/wsdl/soap/")
- public SOAPBinding soapBinding();
-
- @XmlElement(value="binding",ns="http://schemas.xmlsoap.org/wsdl/soap12/")
- public com.sun.xml.internal.ws.wsdl.writer.document.soap12.SOAPBinding soap12Binding();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/BindingOperationType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/BindingOperationType.java
deleted file mode 100644
index 97080a36..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/BindingOperationType.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.Fault;
-import com.sun.xml.internal.ws.wsdl.writer.document.StartWithExtensionsType;
-import com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPOperation;
-
-/**
- *
- * @author WS Development Team
- */
-public interface BindingOperationType
- extends TypedXmlWriter, StartWithExtensionsType
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.BindingOperationType name(String value);
-
- @XmlElement(value="operation",ns="http://schemas.xmlsoap.org/wsdl/soap/")
- public SOAPOperation soapOperation();
-
- @XmlElement(value="operation",ns="http://schemas.xmlsoap.org/wsdl/soap12/")
- public com.sun.xml.internal.ws.wsdl.writer.document.soap12.SOAPOperation soap12Operation();
-
- @XmlElement
- public Fault fault();
-
- @XmlElement
- public StartWithExtensionsType output();
-
- @XmlElement
- public StartWithExtensionsType input();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Definitions.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Definitions.java
deleted file mode 100644
index 1487158e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Definitions.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("definitions")
-public interface Definitions
- extends TypedXmlWriter, Documented
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Definitions name(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Definitions targetNamespace(String value);
-
- @XmlElement
- public Service service();
-
- @XmlElement
- public Binding binding();
-
- @XmlElement
- public PortType portType();
-
- @XmlElement
- public Message message();
-
- @XmlElement
- public Types types();
-
- @XmlElement("import")
- public Import _import();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Documented.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Documented.java
deleted file mode 100644
index b4b979f9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Documented.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-public interface Documented
- extends TypedXmlWriter
-{
-
-
- @XmlElement
- public com.sun.xml.internal.ws.wsdl.writer.document.Documented documentation(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Fault.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Fault.java
deleted file mode 100644
index 173d675b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Fault.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.StartWithExtensionsType;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("fault")
-public interface Fault
- extends TypedXmlWriter, StartWithExtensionsType
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Fault name(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/FaultType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/FaultType.java
deleted file mode 100644
index 3be28e55..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/FaultType.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.ws.wsdl.writer.document.Documented;
-
-public interface FaultType
- extends TypedXmlWriter, Documented
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.FaultType message(QName value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.FaultType name(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Import.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Import.java
deleted file mode 100644
index 6ba1199e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Import.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.Documented;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("import")
-public interface Import
- extends TypedXmlWriter, Documented
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Import location(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Import namespace(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Message.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Message.java
deleted file mode 100644
index 09dfa260..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Message.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("message")
-public interface Message
- extends TypedXmlWriter, Documented
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Message name(String value);
-
- @XmlElement
- public Part part();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/OpenAtts.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/OpenAtts.java
deleted file mode 100644
index 239712d3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/OpenAtts.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.ws.wsdl.writer.document.Documented;
-
-/**
- *
- * @author WS Development Team
- */
-public interface OpenAtts extends TypedXmlWriter, Documented {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Operation.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Operation.java
deleted file mode 100644
index a3a13739..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Operation.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.Documented;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("operation")
-public interface Operation
- extends TypedXmlWriter, Documented
-{
-
-/*
- @XmlElement("notification-operation")
- public NotificationOperation notificationOperation();
-
- @XmlElement("solicit-response-operation")
- public SolicitResponseOperation solicitResponseOperation();
-
- @XmlElement("request-response-operation")
- public RequestResponseOperation requestResponseOperation();
-
- @XmlElement("one-way-operation")
- public OneWayOperation oneWayOperation();
-*/
- @XmlElement
- public ParamType input();
-
- @XmlElement
- public ParamType output();
-
- @XmlElement
- public FaultType fault();
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Operation name(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Operation parameterOrder(String value);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/ParamType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/ParamType.java
deleted file mode 100644
index ed1f2e5a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/ParamType.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.ws.wsdl.writer.document.Documented;
-
-/**
- *
- * @author WS Development Team
- */
-public interface ParamType
- extends TypedXmlWriter, Documented
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.ParamType message(QName value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.ParamType name(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Part.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Part.java
deleted file mode 100644
index d3db2c5b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Part.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.OpenAtts;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("part")
-public interface Part
- extends TypedXmlWriter, OpenAtts
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Part element(QName value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Part type(QName value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Part name(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Port.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Port.java
deleted file mode 100644
index 0792cfb1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Port.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.Documented;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("port")
-public interface Port
- extends TypedXmlWriter, Documented
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Port name(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Port arrayType(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Port binding(QName value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/PortType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/PortType.java
deleted file mode 100644
index 270fe2df..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/PortType.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.Documented;
-import com.sun.xml.internal.ws.wsdl.writer.document.Operation;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("portType")
-public interface PortType
- extends TypedXmlWriter, Documented
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.PortType name(String value);
-
- @XmlElement
- public Operation operation();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Service.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Service.java
deleted file mode 100644
index fb649c1c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Service.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.Documented;
-import com.sun.xml.internal.ws.wsdl.writer.document.Port;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("service")
-public interface Service
- extends TypedXmlWriter, Documented
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.Service name(String value);
-
- @XmlElement
- public Port port();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/StartWithExtensionsType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/StartWithExtensionsType.java
deleted file mode 100644
index 5460a921..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/StartWithExtensionsType.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.ws.wsdl.writer.document.Documented;
-
-
-/**
- *
- * @author WS Development Team
- */
-public interface StartWithExtensionsType extends TypedXmlWriter, Documented {
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Types.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Types.java
deleted file mode 100644
index 7e311ac6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Types.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.Documented;
-import com.sun.xml.internal.ws.wsdl.writer.document.xsd.Schema;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("types")
-public interface Types
- extends TypedXmlWriter, Documented
-{
- @XmlElement(value="schema",ns="http://www.w3.org/2001/XMLSchema")
- public Schema schema();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Address.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Address.java
deleted file mode 100644
index ed650fdd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Address.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.http;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("address")
-public interface Address
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.http.Address location(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Binding.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Binding.java
deleted file mode 100644
index 3c7a12ad..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Binding.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.http;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("binding")
-public interface Binding
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.http.Binding verb(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Operation.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Operation.java
deleted file mode 100644
index 19644956..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Operation.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.http;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("operation")
-public interface Operation
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.http.Operation location(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/package-info.java
deleted file mode 100644
index cb7a3f0c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- *
- * @author WS Development Team
- */
-@com.sun.xml.internal.txw2.annotation.XmlNamespace("http://schemas.xmlsoap.org/wsdl/http/")
-package com.sun.xml.internal.ws.wsdl.writer.document.http;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/package-info.java
deleted file mode 100644
index 51daf4ba..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- *
- * @author WS Development Team
- */
-@com.sun.xml.internal.txw2.annotation.XmlNamespace("http://schemas.xmlsoap.org/wsdl/")
-package com.sun.xml.internal.ws.wsdl.writer.document;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Body.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Body.java
deleted file mode 100644
index f6c1a023..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Body.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.soap.BodyType;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("body")
-public interface Body
- extends TypedXmlWriter, BodyType
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/BodyType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/BodyType.java
deleted file mode 100644
index 5f96b50b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/BodyType.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-
-/**
- *
- * @author WS Development Team
- */
-public interface BodyType
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap.BodyType encodingStyle(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap.BodyType namespace(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap.BodyType use(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap.BodyType parts(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Header.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Header.java
deleted file mode 100644
index dfebcc2c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Header.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.soap.BodyType;
-import com.sun.xml.internal.ws.wsdl.writer.document.soap.HeaderFault;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("header")
-public interface Header
- extends TypedXmlWriter, BodyType
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap.Header message(QName value);
-
- @XmlElement
- public HeaderFault headerFault();
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap.BodyType part(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/HeaderFault.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/HeaderFault.java
deleted file mode 100644
index 5d0a1d0e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/HeaderFault.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.soap.BodyType;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("headerFault")
-public interface HeaderFault
- extends TypedXmlWriter, BodyType
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap.HeaderFault message(QName value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPAddress.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPAddress.java
deleted file mode 100644
index a1fbb78c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPAddress.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("address")
-public interface SOAPAddress
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPAddress location(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPBinding.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPBinding.java
deleted file mode 100644
index 55540263..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPBinding.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("binding")
-public interface SOAPBinding
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPBinding transport(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPBinding style(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPFault.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPFault.java
deleted file mode 100644
index 434f8f89..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPFault.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.soap.BodyType;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("fault")
-public interface SOAPFault
- extends TypedXmlWriter, BodyType
-{
- @XmlAttribute
- public SOAPFault name(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPOperation.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPOperation.java
deleted file mode 100644
index a0ce1b22..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPOperation.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("operation")
-public interface SOAPOperation
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPOperation soapAction(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPOperation style(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/package-info.java
deleted file mode 100644
index d837c383..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- *
- * @author WS Development Team
- */
-@com.sun.xml.internal.txw2.annotation.XmlNamespace("http://schemas.xmlsoap.org/wsdl/soap/")
-package com.sun.xml.internal.ws.wsdl.writer.document.soap;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Body.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Body.java
deleted file mode 100644
index 47f71756..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Body.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap12;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("body")
-public interface Body
- extends TypedXmlWriter, BodyType
-{
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/BodyType.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/BodyType.java
deleted file mode 100644
index 3be46479..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/BodyType.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap12;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-
-/**
- *
- * @author WS Development Team
- */
-public interface BodyType
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap12.BodyType encodingStyle(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap12.BodyType namespace(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap12.BodyType use(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap12.BodyType parts(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Header.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Header.java
deleted file mode 100644
index fd03ced5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Header.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap12;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("header")
-public interface Header
- extends TypedXmlWriter, BodyType
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap12.Header message(QName value);
-
- @XmlElement
- public HeaderFault headerFault();
-
- @XmlAttribute
- public BodyType part(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/HeaderFault.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/HeaderFault.java
deleted file mode 100644
index 2e64b708..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/HeaderFault.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap12;
-
-import javax.xml.namespace.QName;
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("headerFault")
-public interface HeaderFault
- extends TypedXmlWriter, BodyType
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap12.HeaderFault message(QName value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPAddress.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPAddress.java
deleted file mode 100644
index ab80acc5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPAddress.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap12;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("address")
-public interface SOAPAddress
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap12.SOAPAddress location(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPBinding.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPBinding.java
deleted file mode 100644
index 3ad8bc72..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPBinding.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap12;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("binding")
-public interface SOAPBinding
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap12.SOAPBinding transport(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap12.SOAPBinding style(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPFault.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPFault.java
deleted file mode 100644
index da3f0377..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPFault.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap12;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("fault")
-public interface SOAPFault
- extends TypedXmlWriter, BodyType
-{
- @XmlAttribute
- public SOAPFault name(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPOperation.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPOperation.java
deleted file mode 100644
index 717bb76c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPOperation.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.soap12;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("operation")
-public interface SOAPOperation
- extends TypedXmlWriter
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap12.SOAPOperation soapAction(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.soap12.SOAPOperation style(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/package-info.java
deleted file mode 100644
index b6d5c936..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- *
- * @author WS Development Team
- */
-@com.sun.xml.internal.txw2.annotation.XmlNamespace("http://schemas.xmlsoap.org/wsdl/soap12/")
-package com.sun.xml.internal.ws.wsdl.writer.document.soap12;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Import.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Import.java
deleted file mode 100644
index 5e8db221..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Import.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.xsd;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.Documented;
-import com.sun.xml.internal.ws.wsdl.writer.document.*;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("import")
-public interface Import
- extends TypedXmlWriter, Documented
-{
-
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.xsd.Import schemaLocation(String value);
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.xsd.Import namespace(String value);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Schema.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Schema.java
deleted file mode 100644
index 739ffc28..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Schema.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.wsdl.writer.document.xsd;
-
-import com.sun.xml.internal.txw2.TypedXmlWriter;
-import com.sun.xml.internal.txw2.annotation.XmlAttribute;
-import com.sun.xml.internal.txw2.annotation.XmlElement;
-import com.sun.xml.internal.ws.wsdl.writer.document.*;
-
-/**
- *
- * @author WS Development Team
- */
-@XmlElement("schema")
-public interface Schema
- extends TypedXmlWriter, Documented
-{
-
-
- @XmlElement("import")
- public Import _import();
-
- @XmlAttribute
- public com.sun.xml.internal.ws.wsdl.writer.document.xsd.Schema targetNamespace(String value);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/package-info.java b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/package-info.java
deleted file mode 100644
index a804e8d5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/package-info.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- *
- * @author WS Development Team
- */
-@com.sun.xml.internal.txw2.annotation.XmlNamespace("http://www.w3.org/2001/XMLSchema")
-package com.sun.xml.internal.ws.wsdl.writer.document.xsd;
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/ForeignAttributes.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/ForeignAttributes.java
deleted file mode 100644
index 0a120ecb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/ForeignAttributes.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-import org.relaxng.datatype.ValidationContext;
-
-/**
- * Foreign attributes on schema elements.
- *
- * <p>
- * This is not a schema component as defined in the spec,
- * but this is often useful for a schema processing application.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface ForeignAttributes extends Attributes {
- /**
- * Returns context information of the element to which foreign attributes
- * are attached.
- *
- * <p>
- * For example, this can be used to resolve relative references to other resources
- * (by using {@link ValidationContext#getBaseUri()}) or to resolve
- * namespace prefixes in the attribute values (by using {@link ValidationContext#resolveNamespacePrefix(String)}.
- *
- * @return
- * always non-null.
- */
- ValidationContext getContext();
-
- /**
- * Returns the location of the element to which foreign attributes
- * are attached.
- */
- Locator getLocator();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/SCD.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/SCD.java
deleted file mode 100644
index 6a0ad020..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/SCD.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import com.sun.xml.internal.xsom.impl.scd.Iterators;
-import com.sun.xml.internal.xsom.impl.scd.ParseException;
-import com.sun.xml.internal.xsom.impl.scd.SCDImpl;
-import com.sun.xml.internal.xsom.impl.scd.SCDParser;
-import com.sun.xml.internal.xsom.impl.scd.Step;
-import com.sun.xml.internal.xsom.impl.scd.TokenMgrError;
-import com.sun.xml.internal.xsom.util.DeferedCollection;
-
-import javax.xml.namespace.NamespaceContext;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Schema Component Designator (SCD).
- *
- * <p>
- * SCD for schema is what XPath is for XML. SCD allows you to select a schema component(s)
- * from a schema component(s).
- *
- * <p>
- * See <a href="http://www.w3.org/TR/2005/WD-xmlschema-ref-20050329/">XML Schema: Component Designators</a>.
- * This implementation is based on 03/29/2005 working draft.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class SCD {
-
- /**
- * Parses the string representation of SCD.
- *
- * <p>
- * This method involves parsing the path expression and preparing the in-memory
- * structure, so this is useful when you plan to use the same SCD against
- * different context node multiple times.
- *
- * <p>
- * If you want to evaluate SCD just once, use {@link XSComponent#select} methods.
- *
- * @param path
- * the string representation of SCD, such as "/foo/bar".
- * @param nsContext
- * Its {@link NamespaceContext#getNamespaceURI(String)} is used
- * to resolve prefixes in the SCD to the namespace URI.
- */
- public static SCD create(String path, NamespaceContext nsContext) throws java.text.ParseException {
- try {
- SCDParser p = new SCDParser(path,nsContext);
- List<?> list = p.RelativeSchemaComponentPath();
- return new SCDImpl(path,list.toArray(new Step[list.size()]));
- } catch (TokenMgrError e) {
- throw setCause(new java.text.ParseException(e.getMessage(), -1 ),e);
- } catch (ParseException e) {
- throw setCause(new java.text.ParseException(e.getMessage(), e.currentToken.beginColumn ),e);
- }
- }
-
- private static java.text.ParseException setCause(java.text.ParseException e, Throwable x) {
- e.initCause(x);
- return e;
- }
-
- /**
- * Evaluates the SCD against the given context node and
- * returns the matched nodes.
- *
- * @return
- * could be empty but never be null.
- */
- public final Collection<XSComponent> select(XSComponent contextNode) {
- return new DeferedCollection<XSComponent>(select(Iterators.singleton(contextNode)));
- }
-
- /**
- * Evaluates the SCD against the whole schema and
- * returns the matched nodes.
- *
- * <p>
- * This method is here because {@link XSSchemaSet}
- * doesn't implement {@link XSComponent}.
- *
- * @return
- * could be empty but never be null.
- */
- public final Collection<XSComponent> select(XSSchemaSet contextNode) {
- return select(contextNode.getSchemas());
- }
-
- /**
- * Evaluates the SCD against the given context node and
- * returns the matched node.
- *
- * @return
- * null if the SCD didn't match anything. If the SCD matched more than one node,
- * the first one will be returned.
- */
- public final XSComponent selectSingle(XSComponent contextNode) {
- Iterator<XSComponent> r = select(Iterators.singleton(contextNode));
- if(r.hasNext()) return r.next();
- return null;
- }
-
- /**
- * Evaluates the SCD against the whole schema set and
- * returns the matched node.
- *
- * @return
- * null if the SCD didn't match anything. If the SCD matched more than one node,
- * the first one will be returned.
- */
- public final XSComponent selectSingle(XSSchemaSet contextNode) {
- Iterator<XSComponent> r = select(contextNode.iterateSchema());
- if(r.hasNext()) return r.next();
- return null;
- }
-
- /**
- * Evaluates the SCD against the given set of context nodes and
- * returns the matched nodes.
- *
- * @param contextNodes
- * {@link XSComponent}s that represent the context node against
- * which {@link SCD} is evaluated.
- *
- * @return
- * could be empty but never be null.
- */
- public abstract Iterator<XSComponent> select(Iterator<? extends XSComponent> contextNodes);
-
- /**
- * Evaluates the SCD against the given set of context nodes and
- * returns the matched nodes.
- *
- * @param contextNodes
- * {@link XSComponent}s that represent the context node against
- * which {@link SCD} is evaluated.
- *
- * @return
- * could be empty but never be null.
- */
- public final Collection<XSComponent> select(Collection<? extends XSComponent> contextNodes) {
- return new DeferedCollection<XSComponent>(select(contextNodes.iterator()));
- }
-
- /**
- * Returns the textual SCD representation as given to {@link SCD#create(String, NamespaceContext)}.
- */
- public abstract String toString();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAnnotation.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAnnotation.java
deleted file mode 100644
index c979ff05..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAnnotation.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import org.xml.sax.Locator;
-import com.sun.xml.internal.xsom.parser.AnnotationParser;
-
-/**
- * <a href="http://www.w3.org/TR/xmlschema-1/#Annotation_details">
- * XML Schema annotation</a>.
- *
- *
- */
-public interface XSAnnotation
-{
- /**
- * Obtains the application-parsed annotation.
- * <p>
- * annotations are parsed by the user-specified
- * {@link AnnotationParser}.
- *
- * @return may return null
- */
- Object getAnnotation();
-
- /**
- * Sets the value to be returned by {@link #getAnnotation()}.
- *
- * @param o
- * can be null.
- * @return
- * old value that was replaced by the <tt>o</tt>.
- */
- Object setAnnotation(Object o);
-
- /**
- * Returns a location information of the annotation.
- */
- Locator getLocator();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttContainer.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttContainer.java
deleted file mode 100644
index 83c88332..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttContainer.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import java.util.Iterator;
-import java.util.Collection;
-
-/**
- * Common aspect of {@link XSComplexType} and {@link XSAttGroupDecl}
- * as the container of attribute uses/attribute groups.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSAttContainer extends XSDeclaration {
- XSWildcard getAttributeWildcard();
-
- /**
- * Looks for the attribute use with the specified name from
- * all the attribute uses that are directly/indirectly
- * referenced from this component.
- *
- * <p>
- * This is the exact implementation of the "attribute use"
- * schema component.
- */
- XSAttributeUse getAttributeUse( String nsURI, String localName );
-
- /**
- * Lists all the attribute uses that are directly/indirectly
- * referenced from this component.
- *
- * <p>
- * This is the exact implementation of the "attribute use"
- * schema component.
- */
- Iterator<? extends XSAttributeUse> iterateAttributeUses();
-
- /**
- * Gets all the attribute uses.
- */
- Collection<? extends XSAttributeUse> getAttributeUses();
-
- /**
- * Looks for the attribute use with the specified name from
- * the attribute uses which are declared in this complex type.
- *
- * This does not include att uses declared in att groups that
- * are referenced from this complex type, nor does include
- * att uses declared in base types.
- */
- XSAttributeUse getDeclaredAttributeUse( String nsURI, String localName );
-
- /**
- * Lists all the attribute uses that are declared in this complex type.
- */
- Iterator<? extends XSAttributeUse> iterateDeclaredAttributeUses();
-
- /**
- * Lists all the attribute uses that are declared in this complex type.
- */
- Collection<? extends XSAttributeUse> getDeclaredAttributeUses();
-
-
- /**
- * Iterates all AttGroups which are directly referenced from
- * this component.
- */
- Iterator<? extends XSAttGroupDecl> iterateAttGroups();
-
- /**
- * Iterates all AttGroups which are directly referenced from
- * this component.
- */
- Collection<? extends XSAttGroupDecl> getAttGroups();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttGroupDecl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttGroupDecl.java
deleted file mode 100644
index 38d19c55..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttGroupDecl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-/**
- * Attribute group declaration.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSAttGroupDecl extends XSAttContainer {
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttributeDecl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttributeDecl.java
deleted file mode 100644
index 98504979..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttributeDecl.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-/**
- * Attribute declaration.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSAttributeDecl extends XSDeclaration
-{
- XSSimpleType getType();
-
- XmlString getDefaultValue();
- XmlString getFixedValue();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttributeUse.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttributeUse.java
deleted file mode 100644
index 3ab3f96f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSAttributeUse.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-/**
- * Attribute use.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSAttributeUse extends XSComponent
-{
- boolean isRequired();
- XSAttributeDecl getDecl();
-
- /**
- * Gets the default value of this attribute use, if one is specified.
- *
- * Note that if a default value is specified in the attribute
- * declaration, this method returns that value.
- */
- XmlString getDefaultValue();
-
- /**
- * Gets the fixed value of this attribute use, if one is specified.
- *
- * Note that if a fixed value is specified in the attribute
- * declaration, this method returns that value.
- */
- XmlString getFixedValue();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSComplexType.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSComplexType.java
deleted file mode 100644
index febdc312..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSComplexType.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import java.util.List;
-
-
-/**
- * Complex type.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSComplexType extends XSType, XSAttContainer
-{
- /**
- * Checks if this complex type is declared as an abstract type.
- */
- boolean isAbstract();
-
- boolean isFinal(int derivationMethod);
- /**
- * Roughly corresponds to the block attribute. But see the spec
- * for gory detail.
- */
- boolean isSubstitutionProhibited(int method);
-
- /**
- * Gets the scope of this complex type.
- * This is not a property defined in the schema spec.
- *
- * @return
- * null if this complex type is global. Otherwise
- * return the element declaration that contains this anonymous
- * complex type.
- */
- XSElementDecl getScope();
-
- /**
- * The content of this complex type.
- *
- * @return
- * always non-null.
- */
- XSContentType getContentType();
-
- /**
- * Gets the explicit content of a complex type with a complex content
- * that was derived by extension.
- *
- * <p>
- * Informally, the "explicit content" is the portion of the
- * content model added in this derivation. IOW, it's a delta between
- * the base complex type and this complex type.
- *
- * <p>
- * For example, when a complex type T2 derives fom T1, then:
- * <pre>
- * content type of T2 = SEQUENCE( content type of T1, explicit content of T2 )
- * </pre>
- *
- * @return
- * If this complex type is derived by restriction or has a
- * simple content, this method returns null.
- * IOW, this method only works for a complex type with
- * a complex content derived by extension from another complex type.
- */
- XSContentType getExplicitContent();
-
- // meaningful only if getContentType returns particles
- boolean isMixed();
-
- /**
- * If this {@link XSComplexType} is redefined by another complex type,
- * return that component.
- *
- * @return null
- * if this component has not been redefined.
- */
- public XSComplexType getRedefinedBy();
-
- /**
- * Returns a list of direct subtypes of this complex type. If the type is not subtyped, returns empty list.
- * Doesn't return null.
- * Note that the complex type may be extended outside of the scope of the schemaset known to XSOM.
- * @return
- */
- public List<XSComplexType> getSubtypes();
-
- /**
- * Returns a list of element declarations of this type.
- * @return
- */
- public List<XSElementDecl> getElementDecls();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSComponent.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSComponent.java
deleted file mode 100644
index dee3294c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSComponent.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import com.sun.xml.internal.xsom.parser.SchemaDocument;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.NamespaceContext;
-import java.util.List;
-import java.util.Collection;
-
-/**
- * Base interface for all the schema components.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSComponent
-{
- /** Gets the annotation associated to this component, if any. */
- XSAnnotation getAnnotation();
-
- /**
- * Works like {@link #getAnnotation()}, but allow a new empty {@link XSAnnotation} to be created
- * if not exist.
- *
- * @param createIfNotExist
- * true to create a new {@link XSAnnotation} if it doesn't exist already.
- * false to make this method behavel like {@link #getAnnotation()}.
- *
- * @return
- * null if <tt>createIfNotExist==false</tt> and annotation didn't exist.
- * Otherwise non-null.
- */
- XSAnnotation getAnnotation(boolean createIfNotExist);
-
- /**
- * Gets the foreign attributes on this schema component.
- *
- * <p>
- * In general, a schema component may match multiple elements
- * in a schema document, and those elements can individually
- * carry foreign attributes.
- *
- * <p>
- * This method returns a list of {@link ForeignAttributes}, where
- * each {@link ForeignAttributes} object represent foreign attributes
- * on one element.
- *
- * @return
- * can be an empty list but never be null.
- */
- List<? extends ForeignAttributes> getForeignAttributes();
-
- /**
- * Gets the foreign attribute of the given name, or null if not found.
- *
- * <p>
- * If multiple occurences of the same attribute is found,
- * this method returns the first one.
- *
- * @see #getForeignAttributes()
- */
- String getForeignAttribute(String nsUri, String localName);
-
- /**
- * Gets the locator that indicates the source location where
- * this component is created from, or null if no information is
- * available.
- */
- Locator getLocator();
-
- /**
- * Gets a reference to the {@link XSSchema} object to which this component
- * belongs.
- * <p>
- * In case of <code>XSEmpty</code> component, this method
- * returns null since there is no owner component.
- */
- XSSchema getOwnerSchema();
-
- /**
- * Gets the root schema set that includes this component.
- *
- * <p>
- * In case of <code>XSEmpty</code> component, this method
- * returns null since there is no owner component.
- */
- XSSchemaSet getRoot();
-
- /**
- * Gets the {@link SchemaDocument} that indicates which document this component
- * was defined in.
- *
- * @return
- * null for components that are built-in to XML Schema, such
- * as anyType, or "empty" {@link XSContentType}. This method also
- * returns null for {@link XSSchema}.
- * For all other user-defined
- * components this method returns non-null, even if they are local.
- */
- SchemaDocument getSourceDocument();
-
- /**
- * Evaluates a schema component designator against this schema component
- * and returns the resulting schema components.
- *
- * @throws IllegalArgumentException
- * if SCD is syntactically incorrect.
- *
- * @param scd
- * Schema component designator. See {@link SCD} for more details.
- * @param nsContext
- * The namespace context in which SCD is evaluated. Cannot be null.
- * @return
- * Can be empty but never null.
- */
- Collection<XSComponent> select(String scd, NamespaceContext nsContext);
-
- /**
- * Evaluates a schema component designator against this schema component
- * and returns the first resulting schema component.
- *
- * @throws IllegalArgumentException
- * if SCD is syntactically incorrect.
- *
- * @param scd
- * Schema component designator. See {@link SCD} for more details.
- * @param nsContext
- * The namespace context in which SCD is evaluated. Cannot be null.
- * @return
- * null if the SCD didn't match anything. If the SCD matched more than one node,
- * the first one will be returned.
- */
- XSComponent selectSingle(String scd, NamespaceContext nsContext);
-
- /**
- * Accepts a visitor.
- */
- void visit( XSVisitor visitor );
- /**
- * Accepts a functor.
- */
- <T> T apply( XSFunction<T> function );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSContentType.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSContentType.java
deleted file mode 100644
index 853dd1fb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSContentType.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import com.sun.xml.internal.xsom.visitor.XSContentTypeFunction;
-import com.sun.xml.internal.xsom.visitor.XSContentTypeVisitor;
-
-/**
- * Content of a complex type.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSContentType extends XSComponent
-{
- /**
- * Equivalent of <code>(this instanceof XSSimpleType)?this:null</code>
- */
- XSSimpleType asSimpleType();
- /**
- * Equivalent of <code>(this instanceof XSParticle)?this:null</code>
- */
- XSParticle asParticle();
- /**
- * If this content type represents the empty content, return <code>this</code>,
- * otherwise null.
- */
- XSContentType asEmpty();
-
- <T> T apply( XSContentTypeFunction<T> function );
- void visit( XSContentTypeVisitor visitor );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSDeclaration.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSDeclaration.java
deleted file mode 100644
index b3718807..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSDeclaration.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-/**
- * Base interface of all "declarations".
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSDeclaration extends XSComponent
-{
- /**
- * Target namespace to which this component belongs.
- * <code>""</code> is used to represent the default no namespace.
- */
- String getTargetNamespace();
-
- /**
- * Gets the (local) name of the declaration.
- *
- * @return null if this component is anonymous.
- */
- String getName();
-
- /**
- * @deprecated use the isGlobal method, which always returns
- * the opposite of this function. Or the isLocal method.
- */
- boolean isAnonymous();
-
- /**
- * Returns true if this declaration is a global declaration.
- *
- * Global declarations are those declaration that can be enumerated
- * through the schema object.
- */
- boolean isGlobal();
-
- /**
- * Returns true if this declaration is a local declaration.
- * Equivalent of <code>!isGlobal()</code>
- */
- boolean isLocal();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSElementDecl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSElementDecl.java
deleted file mode 100644
index 6a48198b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSElementDecl.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import java.util.List;
-import java.util.Set;
-
-/**
- * Element declaration.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSElementDecl extends XSDeclaration, XSTerm
-{
- /**
- * Gets the type of this element declaration.
- * @return
- * always non-null.
- */
- XSType getType();
-
- boolean isNillable();
-
- /**
- * Gets the substitution head of this element, if any.
- * Otherwise null.
- */
- XSElementDecl getSubstAffiliation();
-
- /**
- * Returns all the {@link XSIdentityConstraint}s in this element decl.
- *
- * @return
- * never null, but can be empty.
- */
- List<XSIdentityConstraint> getIdentityConstraints();
-
- /**
- * Checks the substitution excluded property of the schema component.
- *
- * IOW, this checks the value of the <code>final</code> attribute
- * (plus <code>finalDefault</code>).
- *
- * @param method
- * Possible values are {@link XSType#EXTENSION} or
- * <code>XSType.RESTRICTION</code>.
- */
- boolean isSubstitutionExcluded(int method);
-
- /**
- * Checks the diallowed substitution property of the schema component.
- *
- * IOW, this checks the value of the <code>block</code> attribute
- * (plus <code>blockDefault</code>).
- *
- * @param method
- * Possible values are {@link XSType#EXTENSION},
- * <code>XSType.RESTRICTION</code>, or <code>XSType.SUBSTITUTION</code>
- */
- boolean isSubstitutionDisallowed(int method);
-
- boolean isAbstract();
-
- /**
- * Returns the element declarations that can substitute
- * this element.
- *
- * <p>
- * IOW, this set returns all the element decls that satisfies
- * <a href="http://www.w3.org/TR/xmlschema-1/#cos-equiv-derived-ok-rec">
- * the "Substitution Group OK" constraint.
- * </a>
- *
- * @return
- * nun-null valid array. The return value always contains this element
- * decl itself.
- *
- * @deprecated
- * this method allocates a new array every time, so it could be
- * inefficient when working with a large schema. Use
- * {@link #getSubstitutables()} instead.
- */
- XSElementDecl[] listSubstitutables();
-
- /**
- * Returns the element declarations that can substitute
- * this element.
- *
- * <p>
- * IOW, this set returns all the element decls that satisfies
- * <a href="http://www.w3.org/TR/xmlschema-1/#cos-equiv-derived-ok-rec">
- * the "Substitution Group OK" constraint.
- * </a>
- *
- * <p>
- * Note that the above clause does <em>NOT</em> check for
- * abstract elements. So abstract elements may still show up
- * in the returned set.
- *
- * @return
- * nun-null unmodifiable list.
- * The returned list always contains this element decl itself.
- */
- Set<? extends XSElementDecl> getSubstitutables();
-
- /**
- * Returns true if this element declaration can be validly substituted
- * by the given declaration.
- *
- * <p>
- * Just a short cut of <tt>getSubstitutables().contain(e);</tt>
- */
- boolean canBeSubstitutedBy(XSElementDecl e);
-
- // TODO: identitiy constraints
- // TODO: scope
-
- XmlString getDefaultValue();
- XmlString getFixedValue();
-
- /**
- * Used for javadoc schema generation
- *
- * @return
- * null if form attribute not present,
- * true if form attribute present and set to qualified,
- * false if form attribute present and set to unqualified.
- */
-
- Boolean getForm();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSFacet.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSFacet.java
deleted file mode 100644
index 983c47ea..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSFacet.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-/**
- * Facet for a simple type.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSFacet extends XSComponent
-{
- /** Gets the name of the facet, such as "length". */
- String getName();
-
- /** Gets the value of the facet. */
- XmlString getValue();
-
- /** Returns true if this facet is "fixed". */
- boolean isFixed();
-
-
- // well-known facet name constants
- final static String FACET_LENGTH = "length";
- final static String FACET_MINLENGTH = "minLength";
- final static String FACET_MAXLENGTH = "maxLength";
- final static String FACET_PATTERN = "pattern";
- final static String FACET_ENUMERATION = "enumeration";
- final static String FACET_TOTALDIGITS = "totalDigits";
- final static String FACET_FRACTIONDIGITS = "fractionDigits";
- final static String FACET_MININCLUSIVE = "minInclusive";
- final static String FACET_MAXINCLUSIVE = "maxInclusive";
- final static String FACET_MINEXCLUSIVE = "minExclusive";
- final static String FACET_MAXEXCLUSIVE = "maxExclusive";
- final static String FACET_WHITESPACE = "whiteSpace";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSIdentityConstraint.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSIdentityConstraint.java
deleted file mode 100644
index 674618a8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSIdentityConstraint.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import java.util.List;
-
-/**
- * Identity constraint.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface XSIdentityConstraint extends XSComponent {
-
- /**
- * Gets the {@link XSElementDecl} that owns this identity constraint.
- *
- * @return
- * never null.
- */
- XSElementDecl getParent();
-
- /**
- * Name of the identity constraint.
- *
- * A name uniquely identifies this {@link XSIdentityConstraint} within
- * the namespace.
- *
- * @return
- * never null.
- */
- String getName();
-
- /**
- * Target namespace of the identity constraint.
- *
- * Just short for <code>getParent().getTargetNamespace()</code>.
- */
- String getTargetNamespace();
-
- /**
- * Returns the type of the identity constraint.
- *
- * @return
- * either {@link #KEY},{@link #KEYREF}, or {@link #UNIQUE}.
- */
- short getCategory();
-
- final short KEY = 0;
- final short KEYREF = 1;
- final short UNIQUE = 2;
-
- /**
- * Returns the selector XPath expression as string.
- *
- * @return
- * never null.
- */
- XSXPath getSelector();
-
- /**
- * Returns the list of field XPaths.
- *
- * @return
- * a non-empty read-only list of {@link String}s,
- * each representing the XPath.
- */
- List<XSXPath> getFields();
-
- /**
- * If this is {@link #KEYREF}, returns the key {@link XSIdentityConstraint}
- * being referenced.
- *
- * @return
- * always non-null (when {@link #getCategory()}=={@link #KEYREF}).
- * @throws IllegalStateException
- * if {@link #getCategory()}!={@link #KEYREF}
- */
- XSIdentityConstraint getReferencedKey();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSListSimpleType.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSListSimpleType.java
deleted file mode 100644
index c990144e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSListSimpleType.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-/**
- * List simple type.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSListSimpleType extends XSSimpleType
-{
- XSSimpleType getItemType();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSModelGroup.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSModelGroup.java
deleted file mode 100644
index 6d40ddfc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSModelGroup.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-/**
- * Model group.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSModelGroup extends XSComponent, XSTerm, Iterable<XSParticle>
-{
- /**
- * Type-safe enumeration for kind of model groups.
- * Constants are defined in the {@link XSModelGroup} interface.
- */
- public static enum Compositor {
- ALL("all"),CHOICE("choice"),SEQUENCE("sequence");
-
- private Compositor(String _value) {
- this.value = _value;
- }
-
- private final String value;
- /**
- * Returns the human-readable compositor name.
- *
- * @return
- * Either "all", "sequence", or "choice".
- */
- public String toString() {
- return value;
- }
- }
- /**
- * A constant that represents "all" compositor.
- */
- static final Compositor ALL = Compositor.ALL;
- /**
- * A constant that represents "sequence" compositor.
- */
- static final Compositor SEQUENCE = Compositor.SEQUENCE;
- /**
- * A constant that represents "choice" compositor.
- */
- static final Compositor CHOICE = Compositor.CHOICE;
-
- Compositor getCompositor();
-
- /**
- * Gets <i>i</i>-ith child.
- */
- XSParticle getChild(int idx);
- /**
- * Gets the number of children.
- */
- int getSize();
-
- /**
- * Gets all the children in one array.
- */
- XSParticle[] getChildren();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSModelGroupDecl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSModelGroupDecl.java
deleted file mode 100644
index ea31f3ba..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSModelGroupDecl.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-
-/**
- * Named model group declaration.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSModelGroupDecl extends XSDeclaration, XSTerm
-{
- /**
- * Gets the body of this declaration.
- */
- XSModelGroup getModelGroup();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSNotation.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSNotation.java
deleted file mode 100644
index 16d4f7e3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSNotation.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-/**
- * Notation declaration.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSNotation extends XSDeclaration {
- String getPublicId();
- String getSystemId();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSParticle.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSParticle.java
deleted file mode 100644
index 5d78e451..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSParticle.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import java.math.*;
-
-/**
- * Particle schema component.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSParticle extends XSContentType
-{
- BigInteger getMinOccurs();
- /**
- * Gets the max occurs property.
- *
- * @return
- * {@link UNBOUNDED} will be returned if the value
- * is "unbounded".
- */
- BigInteger getMaxOccurs();
-
- /**
- * True if the maxOccurs is neither 0 or 1.
- */
- boolean isRepeated();
-
- public static final int UNBOUNDED = -1;
-
- XSTerm getTerm();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSRestrictionSimpleType.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSRestrictionSimpleType.java
deleted file mode 100644
index d790e6f3..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSRestrictionSimpleType.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import java.util.Iterator;
-import java.util.Collection;
-import java.util.List;
-
-/**
- * Restriction simple type.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSRestrictionSimpleType extends XSSimpleType {
- // TODO
-
- /** Iterates facets that are specified in this step of derivation. */
- public Iterator<XSFacet> iterateDeclaredFacets();
-
- /**
- * Gets all the facets that are declared on this restriction.
- *
- * @return
- * Can be empty but always non-null.
- */
- public Collection<? extends XSFacet> getDeclaredFacets();
-
- /**
- * Gets the declared facet object of the given name.
- *
- * <p>
- * This method returns a facet object that is added in this
- * type and does not recursively check the ancestors.
- *
- * <p>
- * For those facets that can have multiple values
- * (pattern facets and enumeration facets), this method
- * will return only the first one.
- *
- * @return
- * Null if the facet is not specified in the last step
- * of derivation.
- */
- XSFacet getDeclaredFacet( String name );
-
- /**
- * Gets the declared facets of the given name.
- *
- * This method is for those facets (such as 'pattern') that
- * can be specified multiple times on a simple type.
- *
- * @return
- * can be empty but never be null.
- */
- List<XSFacet> getDeclaredFacets( String name );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSSchema.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSSchema.java
deleted file mode 100644
index 5dcf46bf..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSSchema.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import com.sun.xml.internal.xsom.parser.SchemaDocument;
-
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * Schema.
- *
- * Container of declarations that belong to the same target namespace.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSSchema extends XSComponent
-{
- /**
- * Gets the target namespace of the schema.
- *
- * @return
- * can be empty, but never be null.
- */
- String getTargetNamespace();
-
- /**
- * Gets all the {@link XSAttributeDecl}s in this schema
- * keyed by their local names.
- */
- Map<String,XSAttributeDecl> getAttributeDecls();
- Iterator<XSAttributeDecl> iterateAttributeDecls();
- XSAttributeDecl getAttributeDecl(String localName);
-
- /**
- * Gets all the {@link XSElementDecl}s in this schema.
- */
- Map<String,XSElementDecl> getElementDecls();
- Iterator<XSElementDecl> iterateElementDecls();
- XSElementDecl getElementDecl(String localName);
-
- /**
- * Gets all the {@link XSAttGroupDecl}s in this schema.
- */
- Map<String,XSAttGroupDecl> getAttGroupDecls();
- Iterator<XSAttGroupDecl> iterateAttGroupDecls();
- XSAttGroupDecl getAttGroupDecl(String localName);
-
- /**
- * Gets all the {@link XSModelGroupDecl}s in this schema.
- */
- Map<String,XSModelGroupDecl> getModelGroupDecls();
- Iterator<XSModelGroupDecl> iterateModelGroupDecls();
- XSModelGroupDecl getModelGroupDecl(String localName);
-
- /**
- * Gets all the {@link XSType}s in this schema (union of
- * {@link #getSimpleTypes()} and {@link #getComplexTypes()}
- */
- Map<String,XSType> getTypes();
- Iterator<XSType> iterateTypes();
- XSType getType(String localName);
-
- /**
- * Gets all the {@link XSSimpleType}s in this schema.
- */
- Map<String,XSSimpleType> getSimpleTypes();
- Iterator<XSSimpleType> iterateSimpleTypes();
- XSSimpleType getSimpleType(String localName);
-
- /**
- * Gets all the {@link XSComplexType}s in this schema.
- */
- Map<String,XSComplexType> getComplexTypes();
- Iterator<XSComplexType> iterateComplexTypes();
- XSComplexType getComplexType(String localName);
-
- /**
- * Gets all the {@link XSNotation}s in this schema.
- */
- Map<String,XSNotation> getNotations();
- Iterator<XSNotation> iterateNotations();
- XSNotation getNotation(String localName);
-
- /**
- * Gets all the {@link XSIdentityConstraint}s in this schema,
- * keyed by their names.
- */
- Map<String,XSIdentityConstraint> getIdentityConstraints();
-
- /**
- * Gets the identity constraint of the given name, or null if not found.
- */
- XSIdentityConstraint getIdentityConstraint(String localName);
-
- /**
- * Sine an {@link XSSchema} is not necessarily defined in
- * one schema document (for example one schema can span across
- * many documents through &lt;xs:include>s.),
- * so this method always returns null.
- *
- * @deprecated
- * Since this method always returns null, if you are calling
- * this method from {@link XSSchema} and not from {@link XSComponent},
- * there's something wrong with your code.
- */
- SchemaDocument getSourceDocument();
-
- /**
- * Gets the root schema set that includes this schema.
- *
- * @return never null.
- */
- XSSchemaSet getRoot();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSSchemaSet.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSSchemaSet.java
deleted file mode 100644
index 4ae5f277..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSSchemaSet.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import javax.xml.namespace.NamespaceContext;
-import java.util.Iterator;
-import java.util.Collection;
-
-/**
- * Set of {@link XSSchema} objects.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSSchemaSet
-{
- XSSchema getSchema(String targetNamespace);
- XSSchema getSchema(int idx);
- int getSchemaSize();
- Iterator<XSSchema> iterateSchema();
-
- /**
- * Gets all {@link XSSchema}s in a single collection.
- */
- Collection<XSSchema> getSchemas();
-
- XSType getType(String namespaceURI, String localName);
- XSSimpleType getSimpleType(String namespaceURI, String localName);
- XSAttributeDecl getAttributeDecl(String namespaceURI, String localName);
- XSElementDecl getElementDecl(String namespaceURI, String localName);
- XSModelGroupDecl getModelGroupDecl(String namespaceURI, String localName);
- XSAttGroupDecl getAttGroupDecl(String namespaceURI, String localName);
- XSComplexType getComplexType(String namespaceURI, String localName);
- XSIdentityConstraint getIdentityConstraint(String namespaceURI, String localName);
-
- /** Iterates all element declarations in all the schemas. */
- Iterator<XSElementDecl> iterateElementDecls();
- /** Iterates all type definitions in all the schemas. */
- Iterator<XSType> iterateTypes();
- /** Iterates all atribute declarations in all the schemas. */
- Iterator<XSAttributeDecl> iterateAttributeDecls();
- /** Iterates all attribute group declarations in all the schemas. */
- Iterator<XSAttGroupDecl> iterateAttGroupDecls();
- /** Iterates all model group declarations in all the schemas. */
- Iterator<XSModelGroupDecl> iterateModelGroupDecls();
- /** Iterates all simple type definitions in all the schemas. */
- Iterator<XSSimpleType> iterateSimpleTypes();
- /** Iterates all complex type definitions in all the schemas. */
- Iterator<XSComplexType> iterateComplexTypes();
- /** Iterates all notation declarations in all the schemas. */
- Iterator<XSNotation> iterateNotations();
- /**
- * Iterates all identity constraints in all the schemas.
- */
- Iterator<XSIdentityConstraint> iterateIdentityConstraints();
-
- // conceptually static methods
- XSComplexType getAnyType();
- XSSimpleType getAnySimpleType();
- XSContentType getEmpty();
-
- /**
- * Evaluates a schema component designator against this schema component
- * and returns the resulting schema components.
- *
- * @throws IllegalArgumentException
- * if SCD is syntactically incorrect.
- * @param scd
- * Schema component designator. See {@link SCD} for more details.
- * @param nsContext
- * The namespace context in which SCD is evaluated. Cannot be null.
- * @return
- * Can be empty but never null.
- */
- Collection<XSComponent> select(String scd, NamespaceContext nsContext);
-
- /**
- * Evaluates a schema component designator against this schema component
- * and returns the first resulting schema component.
- *
- * @throws IllegalArgumentException
- * if SCD is syntactically incorrect.
- * @param scd
- * Schema component designator. See {@link SCD} for more details.
- * @param nsContext
- * The namespace context in which SCD is evaluated. Cannot be null.
- * @return
- * null if the SCD didn't match anything. If the SCD matched more than one node,
- * the first one will be returned.
- */
- XSComponent selectSingle(String scd, NamespaceContext nsContext);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSSimpleType.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSSimpleType.java
deleted file mode 100644
index 615aa818..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSSimpleType.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import com.sun.xml.internal.xsom.visitor.XSSimpleTypeFunction;
-import com.sun.xml.internal.xsom.visitor.XSSimpleTypeVisitor;
-
-import java.util.List;
-
-/**
- * Simple type.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSSimpleType extends XSType, XSContentType
-{
- /**
- * Gets the base type as XSSimpleType.
- *
- * Equivalent to
- * <code>
- * (XSSimpleType)getBaseType()
- * </code>
- * Since this is a simple type, we know that the base type
- * is also a simple type.
- *
- * The only exception is xs:anySimpleType, which has xs:anyType
- * as the base type.
- *
- * @return
- * null if this is xs:anySimpleType. Otherwise non-null.
- */
- XSSimpleType getSimpleBaseType();
-
- /**
- * Gets the variety of this simple type.
- */
- XSVariety getVariety();
-
- /**
- * Gets the ancestor primitive {@link XSSimpleType} if
- * this type is {@link XSVariety#ATOMIC atomic}.
- *
- * @return
- * null otherwise.
- */
- XSSimpleType getPrimitiveType();
-
- /**
- * Returns true if this is a primitive built-in simple type
- * (that directly derives from xs:anySimpleType, by definition.)
- */
- boolean isPrimitive();
-
- /**
- * Gets the nearest ancestor {@link XSListSimpleType} (including itself)
- * if the variety of this type is {@link XSVariety#LIST list}.
- *
- * @return otherwise return null
- */
- XSListSimpleType getBaseListType();
-
- /**
- * Gets the nearest ancestor {@link XSUnionSimpleType} (including itself)
- * if the variety of this type is {@link XSVariety#UNION union}.
- *
- * @return otherwise return null
- */
- XSUnionSimpleType getBaseUnionType();
-
- /**
- * Returns true if this type definition is marked as 'final'
- * with respect to the given {@link XSVariety}.
- *
- * @return
- * true if the type is marked final.
- */
- boolean isFinal(XSVariety v);
-
- /**
- * If this {@link XSSimpleType} is redefined by another simple type,
- * return that component.
- *
- * @return null
- * if this component has not been redefined.
- */
- public XSSimpleType getRedefinedBy();
-
- /**
- * Gets the effective facet object of the given name.
- *
- * <p>
- * For example, if a simple type "foo" is derived from
- * xs:string by restriction with the "maxLength" facet and
- * another simple type "bar" is derived from "foo" by
- * restriction with another "maxLength" facet, this method
- * will return the latter one, because that is the most
- * restrictive, effective facet.
- *
- * <p>
- * For those facets that can have multiple values
- * (pattern facets and enumeration facets), this method
- * will return only the first one.
- * TODO: allow clients to access all of them by some means.
- *
- * @return
- * If this datatype has a facet of the given name,
- * return that object. If the facet is not specified
- * anywhere in its derivation chain, null will be returned.
- */
- XSFacet getFacet( String name );
-
- /**
- * For multi-valued facets (enumeration and pattern), obtain all values.
- *
- * @see #getFacet(String)
- *
- * @return
- * can be empty but never null.
- */
- List<XSFacet> getFacets( String name );
-
-
-
- void visit( XSSimpleTypeVisitor visitor );
- <T> T apply( XSSimpleTypeFunction<T> function );
-
- /** Returns true if <code>this instanceof XSRestrictionSimpleType</code>. */
- boolean isRestriction();
- /** Returns true if <code>this instanceof XSListSimpleType</code>. */
- boolean isList();
- /** Returns true if <code>this instanceof XSUnionSimpleType</code>. */
- boolean isUnion();
-
- XSRestrictionSimpleType asRestriction();
- XSListSimpleType asList();
- XSUnionSimpleType asUnion();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSTerm.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSTerm.java
deleted file mode 100644
index 0e6f4101..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSTerm.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import com.sun.xml.internal.xsom.visitor.XSTermFunction;
-import com.sun.xml.internal.xsom.visitor.XSTermVisitor;
-import com.sun.xml.internal.xsom.visitor.XSTermFunctionWithParam;
-
-/**
- * A component that can be referenced from {@link XSParticle}
- *
- * This interface provides a set of type check functions (<code>isXXX</code>),
- * which are essentially:
- *
- * <pre>
- * boolean isXXX() {
- * return this instanceof XXX;
- * }
- * <pre>
- *
- * and a set of cast functions (<code>asXXX</code>), which are
- * essentially:
- *
- * <pre>
- * XXX asXXX() {
- * if(isXXX()) return (XXX)this;
- * else return null;
- * }
- * </pre>
- */
-public interface XSTerm extends XSComponent
-{
- void visit( XSTermVisitor visitor );
- <T> T apply( XSTermFunction<T> function );
- <T,P> T apply( XSTermFunctionWithParam<T,P> function, P param );
-
- // cast functions
- boolean isWildcard();
- boolean isModelGroupDecl();
- boolean isModelGroup();
- boolean isElementDecl();
-
- XSWildcard asWildcard();
- XSModelGroupDecl asModelGroupDecl();
- XSModelGroup asModelGroup();
- XSElementDecl asElementDecl();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSType.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSType.java
deleted file mode 100644
index 103fd94f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSType.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-/**
- * Base interface for {@link XSComplexType} and {@link XSSimpleType}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSType extends XSDeclaration {
- /**
- * Returns the base type of this type.
- *
- * Note that if this type represents <tt>xs:anyType</tt>, this method returns itself.
- * This is awkward as an API, but it follows the schema specification.
- *
- * @return always non-null.
- */
- XSType getBaseType();
-
- final static int EXTENSION = 1;
- final static int RESTRICTION = 2;
- final static int SUBSTITUTION = 4;
-
- int getDerivationMethod();
-
- /** Returns true if <code>this instanceof XSSimpleType</code>. */
- boolean isSimpleType();
- /** Returns true if <code>this instanceof XSComplexType</code>. */
- boolean isComplexType();
-
- /**
- * Lists up types that can substitute this type by using xsi:type.
- * Includes this type itself.
- * <p>
- * This method honors the block flag.
- */
- XSType[] listSubstitutables();
-
- /**
- * If this {@link XSType} is redefined by another type,
- * return that component.
- *
- * @return null
- * if this component has not been redefined.
- */
- XSType getRedefinedBy();
-
- /**
- * Returns the number of complex types that redefine this component.
- *
- * <p>
- * For example, if A is redefined by B and B is redefined by C,
- * A.getRedefinedCount()==2, B.getRedefinedCount()==1, and
- * C.getRedefinedCount()==0.
- */
- int getRedefinedCount();
-
-
- /** Casts this object to XSSimpleType if possible, otherwise returns null. */
- XSSimpleType asSimpleType();
- /** Casts this object to XSComplexType if possible, otherwise returns null. */
- XSComplexType asComplexType();
-
- /**
- * Returns true if this type is derived from the specified type.
- *
- * <p>
- * Note that <tt>t.isDerivedFrom(t)</tt> returns true.
- */
- boolean isDerivedFrom( XSType t );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSUnionSimpleType.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSUnionSimpleType.java
deleted file mode 100644
index 7a11904f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSUnionSimpleType.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-/**
- * Union simple type.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSUnionSimpleType extends XSSimpleType, Iterable<XSSimpleType>
-{
- XSSimpleType getMember(int idx);
- int getMemberSize();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSVariety.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSVariety.java
deleted file mode 100644
index c65323a4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSVariety.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-/**
- * Constants that represent variety of simple types.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke,kawaguchi@sun.com)
- */
-public final class XSVariety {
- public static final XSVariety ATOMIC = new XSVariety("atomic");
- public static final XSVariety UNION = new XSVariety("union");
- public static final XSVariety LIST = new XSVariety("list");
-
- private XSVariety(String _name) { this.name=_name; }
- private final String name;
- public String toString() { return name; }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSWildcard.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSWildcard.java
deleted file mode 100644
index 22a21799..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSWildcard.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import java.util.Iterator;
-import java.util.Collection;
-
-import com.sun.xml.internal.xsom.visitor.XSWildcardFunction;
-import com.sun.xml.internal.xsom.visitor.XSWildcardVisitor;
-
-/**
- * Wildcard schema component (used for both attribute wildcard
- * and element wildcard.)
- *
- * XSWildcard interface can always be downcasted to either
- * Any, Other, or Union.
- */
-public interface XSWildcard extends XSComponent, XSTerm
-{
- static final int LAX = 1;
- static final int STRTICT = 2;
- static final int SKIP = 3;
- /**
- * Gets the processing mode.
- *
- * @return
- * Either LAX, STRICT, or SKIP.
- */
- int getMode();
-
- /**
- * Returns true if the specified namespace URI is valid
- * wrt this wildcard.
- *
- * @param namespaceURI
- * Use the empty string to test the default no-namespace.
- */
- boolean acceptsNamespace(String namespaceURI);
-
- /** Visitor support. */
- void visit(XSWildcardVisitor visitor);
- <T> T apply(XSWildcardFunction<T> function);
-
- /**
- * <code>##any</code> wildcard.
- */
- interface Any extends XSWildcard {
- }
- /**
- * <code>##other</code> wildcard.
- */
- interface Other extends XSWildcard {
- /**
- * Gets the namespace URI excluded from this wildcard.
- */
- String getOtherNamespace();
- }
- /**
- * Wildcard of a set of namespace URIs.
- */
- interface Union extends XSWildcard {
- /**
- * Short for <code>getNamespaces().iterator()</code>
- */
- Iterator<String> iterateNamespaces();
-
- /**
- * Read-only list of namespace URIs.
- */
- Collection<String> getNamespaces();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSXPath.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSXPath.java
deleted file mode 100644
index d573ef1f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSXPath.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-/**
- * Selector or field of {@link XSIdentityConstraint}.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface XSXPath extends XSComponent {
-
- /**
- * Returns the {@link XSIdentityConstraint} to which
- * this XPath belongs to.
- *
- * @return
- * never null.
- */
- XSIdentityConstraint getParent();
-
- /**
- * Gets the XPath as a string.
- *
- * @return
- * never null.
- */
- XmlString getXPath();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XmlString.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XmlString.java
deleted file mode 100644
index c23394b5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/XmlString.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom;
-
-import org.relaxng.datatype.ValidationContext;
-
-/**
- * String with in-scope namespace binding information.
- *
- * <p>
- * In a general case, text (PCDATA/attributes) that appear in XML schema
- * cannot be correctly interpreted unless you also have in-scope namespace
- * binding (a case in point is QName.) Therefore, it's convenient to
- * handle the lexical representation and the in-scope namespace binding
- * in a pair.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class XmlString {
- /**
- * Textual value. AKA lexical representation.
- */
- public final String value;
-
- /**
- * Used to resole in-scope namespace bindings.
- */
- public final ValidationContext context;
-
- /**
- * Creates a new {@link XmlString} from a lexical representation and in-scope namespaces.
- */
- public XmlString(String value, ValidationContext context) {
- this.value = value;
- this.context = context;
- if(context==null)
- throw new IllegalArgumentException();
- }
-
- /**
- * Creates a new {@link XmlString} with empty in-scope namespace bindings.
- */
- public XmlString(String value) {
- this(value,NULL_CONTEXT);
- }
-
- /**
- * Resolves a namespace prefix to the corresponding namespace URI.
- *
- * This method is used for resolving prefixes in the {@link #value}
- * (such as when {@link #value} represents a QName type.)
- *
- * <p>
- * If the prefix is "" (empty string), the method
- * returns the default namespace URI.
- *
- * <p>
- * If the prefix is "xml", then the method returns
- * "http://www.w3.org/XML/1998/namespace",
- * as defined in the XML Namespaces Recommendation.
- *
- * @return
- * namespace URI of this prefix.
- * If the specified prefix is not declared,
- * the implementation returns null.
- */
- public final String resolvePrefix(String prefix) {
- return context.resolveNamespacePrefix(prefix);
- }
-
- public String toString() {
- return value;
- }
-
- private static final ValidationContext NULL_CONTEXT = new ValidationContext() {
- public String resolveNamespacePrefix(String s) {
- if(s.length()==0) return "";
- if(s.equals("xml")) return "http://www.w3.org/XML/1998/namespace";
- return null;
- }
-
- public String getBaseUri() {
- return null;
- }
-
- public boolean isUnparsedEntity(String s) {
- return false;
- }
-
- public boolean isNotation(String s) {
- return false;
- }
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AnnotationImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AnnotationImpl.java
deleted file mode 100644
index 9e9d2dc6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AnnotationImpl.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSAnnotation;
-import org.xml.sax.Locator;
-import org.xml.sax.helpers.LocatorImpl;
-
-public class AnnotationImpl implements XSAnnotation
-{
- private Object annotation;
- public Object getAnnotation() { return annotation; }
-
- public Object setAnnotation(Object o) {
- Object r = this.annotation;
- this.annotation = o;
- return r;
- }
-
- private final Locator locator;
- public Locator getLocator() { return locator; }
-
- public AnnotationImpl( Object o, Locator _loc ) {
- this.annotation = o;
- this.locator = _loc;
- }
-
- public AnnotationImpl() {
- locator = NULL_LOCATION;
- }
-
- private static class LocatorImplUnmodifiable extends LocatorImpl {
-
- @Override
- public void setColumnNumber(int columnNumber) {
- return;
- }
-
- @Override
- public void setPublicId(String publicId) {
- return;
- }
-
- @Override
- public void setSystemId(String systemId) {
- return;
- }
-
- @Override
- public void setLineNumber(int lineNumber) {
- return;
- }
- };
-
- private static final LocatorImplUnmodifiable NULL_LOCATION = new LocatorImplUnmodifiable();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttGroupDeclImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttGroupDeclImpl.java
deleted file mode 100644
index 68e1dd90..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttGroupDeclImpl.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.impl.parser.DelayedRef;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-import java.util.Iterator;
-
-public class AttGroupDeclImpl extends AttributesHolder implements XSAttGroupDecl
-{
- public AttGroupDeclImpl( SchemaDocumentImpl _parent, AnnotationImpl _annon,
- Locator _loc, ForeignAttributesImpl _fa, String _name, WildcardImpl _wildcard ) {
-
- this(_parent,_annon,_loc,_fa,_name);
- setWildcard(_wildcard);
- }
-
- public AttGroupDeclImpl( SchemaDocumentImpl _parent, AnnotationImpl _annon,
- Locator _loc, ForeignAttributesImpl _fa, String _name ) {
-
- super(_parent,_annon,_loc,_fa,_name,false);
- }
-
-
- private WildcardImpl wildcard;
- public void setWildcard( WildcardImpl wc ) { wildcard=wc; }
- public XSWildcard getAttributeWildcard() { return wildcard; }
-
- public XSAttributeUse getAttributeUse( String nsURI, String localName ) {
- UName name = new UName(nsURI,localName);
- XSAttributeUse o=null;
-
- Iterator itr = iterateAttGroups();
- while(itr.hasNext() && o==null)
- o = ((XSAttGroupDecl)itr.next()).getAttributeUse(nsURI,localName);
-
- if(o==null) o = attributes.get(name);
-
- return o;
- }
-
- public void redefine( AttGroupDeclImpl ag ) {
- for (Iterator itr = attGroups.iterator(); itr.hasNext();) {
- DelayedRef.AttGroup r = (DelayedRef.AttGroup) itr.next();
- r.redefine(ag);
- }
- }
-
- public void visit( XSVisitor visitor ) {
- visitor.attGroupDecl(this);
- }
- public Object apply( XSFunction function ) {
- return function.attGroupDecl(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttributeDeclImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttributeDeclImpl.java
deleted file mode 100644
index 2f0db9ca..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttributeDeclImpl.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XmlString;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-public class AttributeDeclImpl extends DeclarationImpl implements XSAttributeDecl, Ref.Attribute
-{
- public AttributeDeclImpl( SchemaDocumentImpl owner,
- String _targetNamespace, String _name,
- AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, boolean _anonymous,
- XmlString _defValue, XmlString _fixedValue,
- Ref.SimpleType _type ) {
-
- super(owner,_annon,_loc,_fa,_targetNamespace,_name,_anonymous);
-
- if(_name==null) // assertion failed.
- throw new IllegalArgumentException();
-
- this.defaultValue = _defValue;
- this.fixedValue = _fixedValue;
- this.type = _type;
- }
-
- private final Ref.SimpleType type;
- public XSSimpleType getType() { return type.getType(); }
-
- private final XmlString defaultValue;
- public XmlString getDefaultValue() { return defaultValue; }
-
- private final XmlString fixedValue;
- public XmlString getFixedValue() { return fixedValue; }
-
- public void visit( XSVisitor visitor ) {
- visitor.attributeDecl(this);
- }
- public Object apply( XSFunction function ) {
- return function.attributeDecl(this);
- }
-
-
- // Ref.Attribute implementation
- public XSAttributeDecl getAttribute() { return this; }
- }
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttributeUseImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttributeUseImpl.java
deleted file mode 100644
index 30879840..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttributeUseImpl.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XmlString;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-public class AttributeUseImpl extends ComponentImpl implements XSAttributeUse
-{
- public AttributeUseImpl( SchemaDocumentImpl owner, AnnotationImpl ann, Locator loc, ForeignAttributesImpl fa, Ref.Attribute _decl,
- XmlString def, XmlString fixed, boolean req ) {
-
- super(owner,ann,loc,fa);
-
- this.att = _decl;
- this.defaultValue = def;
- this.fixedValue = fixed;
- this.required = req;
- }
-
- private final Ref.Attribute att;
- public XSAttributeDecl getDecl() { return att.getAttribute(); }
-
- private final XmlString defaultValue;
- public XmlString getDefaultValue() {
- if( defaultValue!=null ) return defaultValue;
- else return getDecl().getDefaultValue();
- }
-
- private final XmlString fixedValue;
- public XmlString getFixedValue() {
- if( fixedValue!=null ) return fixedValue;
- else return getDecl().getFixedValue();
- }
-
- private final boolean required;
- public boolean isRequired() { return required; }
-
- public Object apply( XSFunction f ) {
- return f.attributeUse(this);
- }
- public void visit( XSVisitor v ) {
- v.attributeUse(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttributesHolder.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttributesHolder.java
deleted file mode 100644
index 10c2b282..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/AttributesHolder.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.impl.scd.Iterators;
-import com.sun.xml.internal.xsom.impl.Ref.AttGroup;
-import org.xml.sax.Locator;
-
-import java.util.AbstractSet;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.LinkedHashMap;
-
-public abstract class AttributesHolder extends DeclarationImpl {
-
- protected AttributesHolder( SchemaDocumentImpl _parent, AnnotationImpl _annon,
- Locator loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous ) {
-
- super(_parent,_annon,loc,_fa,_parent.getTargetNamespace(),_name,_anonymous);
- }
-
- /** set the local wildcard. */
- public abstract void setWildcard(WildcardImpl wc);
-
- /**
- * Local attribute use.
- * Use linked hash map to guarantee the iteration order, and make it close to
- * what was in the schema document.
- */
- protected final Map<UName,AttributeUseImpl> attributes = new LinkedHashMap<UName,AttributeUseImpl>();
- public void addAttributeUse( UName name, AttributeUseImpl a ) {
- attributes.put( name, a );
- }
- /** prohibited attributes. */
- protected final Set<UName> prohibitedAtts = new HashSet<UName>();
- public void addProhibitedAttribute( UName name ) {
- prohibitedAtts.add(name);
- }
-
- /**
- * Returns the attribute uses by looking at attribute groups and etc.
- * Searching for the base type is done in {@link ComplexTypeImpl}.
- */
- public Collection<XSAttributeUse> getAttributeUses() {
- // TODO: this is fairly inefficient
- List<XSAttributeUse> v = new ArrayList<XSAttributeUse>();
- v.addAll(attributes.values());
- for( XSAttGroupDecl agd : getAttGroups() )
- v.addAll(agd.getAttributeUses());
- return v;
- }
- public Iterator<XSAttributeUse> iterateAttributeUses() {
- return getAttributeUses().iterator();
- }
-
-
-
- public XSAttributeUse getDeclaredAttributeUse( String nsURI, String localName ) {
- return attributes.get(new UName(nsURI,localName));
- }
-
- public Iterator<AttributeUseImpl> iterateDeclaredAttributeUses() {
- return attributes.values().iterator();
- }
-
- public Collection<AttributeUseImpl> getDeclaredAttributeUses() {
- return attributes.values();
- }
-
-
- /** {@link Ref.AttGroup}s that are directly refered from this. */
- protected final Set<Ref.AttGroup> attGroups = new HashSet<Ref.AttGroup>();
-
- public void addAttGroup( Ref.AttGroup a ) { attGroups.add(a); }
-
- // Iterates all AttGroups which are directly referenced from this component
- // this does not iterate att groups referenced from the base type
- public Iterator<XSAttGroupDecl> iterateAttGroups() {
- return new Iterators.Adapter<XSAttGroupDecl,Ref.AttGroup>(attGroups.iterator()) {
- protected XSAttGroupDecl filter(AttGroup u) {
- return u.get();
- }
- };
- }
-
- public Set<XSAttGroupDecl> getAttGroups() {
- return new AbstractSet<XSAttGroupDecl>() {
- public Iterator<XSAttGroupDecl> iterator() {
- return iterateAttGroups();
- }
-
- public int size() {
- return attGroups.size();
- }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ComplexTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ComplexTypeImpl.java
deleted file mode 100644
index 85a24de5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ComplexTypeImpl.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.impl.parser.DelayedRef;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.impl.scd.Iterators;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import java.util.ArrayList;
-import java.util.List;
-import org.xml.sax.Locator;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-public class ComplexTypeImpl extends AttributesHolder implements XSComplexType, Ref.ComplexType
-{
- public ComplexTypeImpl( SchemaDocumentImpl _parent,
- AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa,
- String _name, boolean _anonymous,
-
- boolean _abstract, int _derivationMethod,
- Ref.Type _base, int _final, int _block, boolean _mixed ) {
-
- super(_parent,_annon,_loc,_fa,_name,_anonymous);
-
- if(_base==null)
- throw new IllegalArgumentException();
-
- this._abstract = _abstract;
- this.derivationMethod = _derivationMethod;
- this.baseType = _base;
- this.finalValue = _final;
- this.blockValue = _block;
- this.mixed = _mixed;
- }
-
- public XSComplexType asComplexType(){ return this; }
-
- public boolean isDerivedFrom(XSType t) {
- XSType x = this;
- while(true) {
- if(t==x)
- return true;
- XSType s = x.getBaseType();
- if(s==x)
- return false;
- x = s;
- }
- }
-
- public XSSimpleType asSimpleType() { return null; }
- public final boolean isSimpleType() { return false; }
- public final boolean isComplexType(){ return true; }
-
- private int derivationMethod;
- public int getDerivationMethod() { return derivationMethod; }
-
- private Ref.Type baseType;
- public XSType getBaseType() { return baseType.getType(); }
-
- /**
- * Called when this complex type redefines the specified complex type.
- */
- public void redefine( ComplexTypeImpl ct ) {
- if( baseType instanceof DelayedRef )
- ((DelayedRef)baseType).redefine(ct);
- else
- this.baseType = ct;
- ct.redefinedBy = this;
- redefiningCount = (short)(ct.redefiningCount+1);
- }
-
- /**
- * Number of times this component redefines other components.
- */
- private short redefiningCount = 0;
-
- private ComplexTypeImpl redefinedBy = null;
-
- public XSComplexType getRedefinedBy() {
- return redefinedBy;
- }
-
- public int getRedefinedCount() {
- int i=0;
- for( ComplexTypeImpl ct=this.redefinedBy; ct!=null; ct=ct.redefinedBy)
- i++;
- return i;
- }
-
-
- private XSElementDecl scope;
- public XSElementDecl getScope() { return scope; }
- public void setScope( XSElementDecl _scope ) { this.scope=_scope; }
-
- private final boolean _abstract;
- public boolean isAbstract() { return _abstract; }
-
- private WildcardImpl localAttWildcard;
- /**
- * Set the local attribute wildcard.
- */
- public void setWildcard( WildcardImpl wc ) {
- this.localAttWildcard = wc;
- }
- public XSWildcard getAttributeWildcard() {
- WildcardImpl complete = localAttWildcard;
-
- Iterator itr = iterateAttGroups();
- while( itr.hasNext() ) {
- WildcardImpl w = (WildcardImpl)((XSAttGroupDecl)itr.next()).getAttributeWildcard();
-
- if(w==null) continue;
-
- if(complete==null)
- complete = w;
- else
- // TODO: the spec says it's intersection,
- // but I think it has to be union.
- complete = complete.union(ownerDocument,w);
- }
-
- if( getDerivationMethod()==RESTRICTION ) return complete;
-
- WildcardImpl base=null;
- XSType baseType = getBaseType();
- if(baseType.asComplexType()!=null)
- base = (WildcardImpl)baseType.asComplexType().getAttributeWildcard();
-
- if(complete==null) return base;
- if(base==null) return complete;
-
- return complete.union(ownerDocument,base);
- }
-
- private final int finalValue;
- public boolean isFinal( int derivationMethod ) {
- return (finalValue&derivationMethod)!=0;
- }
-
- private final int blockValue;
- public boolean isSubstitutionProhibited( int method ) {
- return (blockValue&method)!=0;
- }
-
-
- private Ref.ContentType contentType;
- public void setContentType( Ref.ContentType v ) { contentType = v; }
- public XSContentType getContentType() { return contentType.getContentType(); }
-
- private XSContentType explicitContent;
- public void setExplicitContent( XSContentType v ) {
- this.explicitContent = v;
- }
- public XSContentType getExplicitContent() { return explicitContent; }
-
- private final boolean mixed;
- public boolean isMixed() { return mixed; }
-
-
-
-
- public XSAttributeUse getAttributeUse( String nsURI, String localName ) {
- UName name = new UName(nsURI,localName);
-
- if(prohibitedAtts.contains(name)) return null;
-
- XSAttributeUse o = attributes.get(name);
-
-
- if(o==null) {
- Iterator itr = iterateAttGroups();
- while(itr.hasNext() && o==null)
- o = ((XSAttGroupDecl)itr.next()).getAttributeUse(nsURI,localName);
- }
-
- if(o==null) {
- XSType base = getBaseType();
- if(base.asComplexType()!=null)
- o = base.asComplexType().getAttributeUse(nsURI,localName);
- }
-
- return o;
- }
-
- public Iterator<XSAttributeUse> iterateAttributeUses() {
-
- XSComplexType baseType = getBaseType().asComplexType();
-
- if( baseType==null ) return super.iterateAttributeUses();
-
- return new Iterators.Union<XSAttributeUse>(
- new Iterators.Filter<XSAttributeUse>(baseType.iterateAttributeUses()) {
- protected boolean matches(XSAttributeUse value) {
- XSAttributeDecl u = value.getDecl();
- UName n = new UName(u.getTargetNamespace(),u.getName());
- return !prohibitedAtts.contains(n);
- }
- },
- super.iterateAttributeUses() );
- }
-
- public Collection<XSAttributeUse> getAttributeUses() {
- XSComplexType baseType = getBaseType().asComplexType();
-
- if( baseType==null ) return super.getAttributeUses();
-
- // TODO: this is fairly inefficient
- Map<UName,XSAttributeUse> uses = new HashMap<UName, XSAttributeUse>();
- for( XSAttributeUse a : baseType.getAttributeUses())
- uses.put(new UName(a.getDecl()),a);
-
- uses.keySet().removeAll(prohibitedAtts);
-
- for( XSAttributeUse a : super.getAttributeUses())
- uses.put(new UName(a.getDecl()),a);
-
- return uses.values();
- }
-
-
- public XSType[] listSubstitutables() {
- return Util.listSubstitutables(this);
- }
-
- public void visit( XSVisitor visitor ) {
- visitor.complexType(this);
- }
- public <T> T apply( XSFunction<T> function ) {
- return function.complexType(this);
- }
-
- // Ref.ComplexType implementation
- public XSComplexType getType() { return this; }
-
- public List<XSComplexType> getSubtypes() {
- ArrayList subtypeList = new ArrayList();
- Iterator<XSComplexType> cTypes = getRoot().iterateComplexTypes();
- while (cTypes.hasNext()) {
- XSComplexType cType= cTypes.next();
- XSType base = cType.getBaseType();
- if ((base != null) && (base.equals(this))) {
- subtypeList.add(cType);
- }
- }
- return subtypeList;
- }
-
- public List<XSElementDecl> getElementDecls() {
- ArrayList declList = new ArrayList();
- XSSchemaSet schemaSet = getRoot();
- for (XSSchema sch : schemaSet.getSchemas()) {
- for (XSElementDecl decl : sch.getElementDecls().values()) {
- if (decl.getType().equals(this)) {
- declList.add(decl);
- }
- }
- }
- return declList;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ComponentImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ComponentImpl.java
deleted file mode 100644
index f960ae27..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ComponentImpl.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.SCD;
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.util.ComponentNameFunction;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.parser.SchemaDocument;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.NamespaceContext;
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-public abstract class ComponentImpl implements XSComponent
-{
- protected ComponentImpl( SchemaDocumentImpl _owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl fa ) {
- this.ownerDocument = _owner;
- this.annotation = _annon;
- this.locator = _loc;
- this.foreignAttributes = fa;
- }
-
- protected final SchemaDocumentImpl ownerDocument;
- public SchemaImpl getOwnerSchema() {
- if(ownerDocument==null)
- return null;
- else
- return ownerDocument.getSchema();
- }
-
- public XSSchemaSet getRoot() {
- if(ownerDocument==null)
- return null;
- else
- return getOwnerSchema().getRoot();
- }
-
- public SchemaDocument getSourceDocument() {
- return ownerDocument;
- }
-
- private AnnotationImpl annotation;
- public final XSAnnotation getAnnotation() { return annotation; }
-
- public XSAnnotation getAnnotation(boolean createIfNotExist) {
- if(createIfNotExist && annotation==null) {
- annotation = new AnnotationImpl();
- }
- return annotation;
- }
-
- private final Locator locator;
- public final Locator getLocator() { return locator; }
-
- /**
- * Either {@link ForeignAttributesImpl} or {@link List}.
- *
- * Initially it's {@link ForeignAttributesImpl}, but it's lazily turned into
- * a list when necessary.
- */
- private Object foreignAttributes;
-
- public List<ForeignAttributesImpl> getForeignAttributes() {
- Object t = foreignAttributes;
-
- if(t==null)
- return Collections.EMPTY_LIST;
-
- if(t instanceof List)
- return (List)t;
-
- t = foreignAttributes = convertToList((ForeignAttributesImpl)t);
- return (List)t;
- }
-
- public String getForeignAttribute(String nsUri, String localName) {
- for( ForeignAttributesImpl fa : getForeignAttributes() ) {
- String v = fa.getValue(nsUri,localName);
- if(v!=null) return v;
- }
- return null;
- }
-
- private List<ForeignAttributesImpl> convertToList(ForeignAttributesImpl fa) {
- List<ForeignAttributesImpl> lst = new ArrayList<ForeignAttributesImpl>();
- while(fa!=null) {
- lst.add(fa);
- fa = fa.next;
- }
- return Collections.unmodifiableList(lst);
- }
-
- public Collection<XSComponent> select(String scd, NamespaceContext nsContext) {
- try {
- return SCD.create(scd,nsContext).select(this);
- } catch (ParseException e) {
- throw new IllegalArgumentException(e);
- }
- }
-
- public XSComponent selectSingle(String scd, NamespaceContext nsContext) {
- try {
- return SCD.create(scd,nsContext).selectSingle(this);
- } catch (ParseException e) {
- throw new IllegalArgumentException(e);
- }
- }
-
- @Override
- public String toString() {
- return apply(new ComponentNameFunction());
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/Const.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/Const.java
deleted file mode 100644
index 894ca960..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/Const.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-public class Const
-{
- /** Namespace URI of XML Schema. */
- public static final String schemaNamespace = "http://www.w3.org/2001/XMLSchema";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ContentTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ContentTypeImpl.java
deleted file mode 100644
index 57b4677c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ContentTypeImpl.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSContentType;
-
-/**
- * Marker interface that says this implementation
- * implements XSContentType.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface ContentTypeImpl extends Ref.ContentType, XSContentType {
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/DeclarationImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/DeclarationImpl.java
deleted file mode 100644
index 914e2ab6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/DeclarationImpl.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSDeclaration;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.util.NameGetter;
-import org.xml.sax.Locator;
-
-abstract class DeclarationImpl extends ComponentImpl implements XSDeclaration
-{
- DeclarationImpl( SchemaDocumentImpl owner,
- AnnotationImpl _annon, Locator loc, ForeignAttributesImpl fa,
- String _targetNamespace, String _name, boolean _anonymous ) {
-
- super(owner,_annon,loc,fa);
- this.targetNamespace = _targetNamespace;
- this.name = _name;
- this.anonymous = _anonymous;
- }
-
- private final String name;
- public String getName() { return name; }
-
- private final String targetNamespace;
- public String getTargetNamespace() { return targetNamespace; }
-
- private final boolean anonymous;
- /** @deprecated */
- public boolean isAnonymous() { return anonymous; }
-
- public final boolean isGlobal() { return !isAnonymous(); }
- public final boolean isLocal() { return isAnonymous(); }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ElementDecl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ElementDecl.java
deleted file mode 100644
index f0168076..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ElementDecl.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSTerm;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XmlString;
-import com.sun.xml.internal.xsom.impl.parser.PatcherManager;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSTermFunction;
-import com.sun.xml.internal.xsom.visitor.XSTermFunctionWithParam;
-import com.sun.xml.internal.xsom.visitor.XSTermVisitor;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-public class ElementDecl extends DeclarationImpl implements XSElementDecl, Ref.Term
-{
- public ElementDecl( PatcherManager reader, SchemaDocumentImpl owner,
- AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl fa,
- String _tns, String _name, boolean _anonymous,
-
- XmlString _defv, XmlString _fixedv,
- boolean _nillable, boolean _abstract, Boolean _form,
- Ref.Type _type, Ref.Element _substHead,
- int _substDisallowed, int _substExcluded,
- List<IdentityConstraintImpl> idConstraints) {
-
- super(owner,_annon,_loc,fa,_tns,_name,_anonymous);
-
- this.defaultValue = _defv;
- this.fixedValue = _fixedv;
- this.nillable = _nillable;
- this._abstract = _abstract;
- this.form = _form;
- this.type = _type;
- this.substHead = _substHead;
- this.substDisallowed = _substDisallowed;
- this.substExcluded = _substExcluded;
- this.idConstraints = Collections.unmodifiableList((List<? extends XSIdentityConstraint>)idConstraints);
-
- for (IdentityConstraintImpl idc : idConstraints)
- idc.setParent(this);
-
- if(type==null)
- throw new IllegalArgumentException();
- }
-
- private XmlString defaultValue;
- public XmlString getDefaultValue() { return defaultValue; }
-
- private XmlString fixedValue;
- public XmlString getFixedValue() { return fixedValue; }
-
- private boolean nillable;
- public boolean isNillable() { return nillable; }
-
- private boolean _abstract;
- public boolean isAbstract() { return _abstract; }
-
- private Ref.Type type;
- public XSType getType() { return type.getType(); }
-
- private Ref.Element substHead;
- public XSElementDecl getSubstAffiliation() {
- if(substHead==null) return null;
- return substHead.get();
- }
-
- private int substDisallowed;
- public boolean isSubstitutionDisallowed( int method ) {
- return (substDisallowed&method)!=0;
- }
-
- private int substExcluded;
- public boolean isSubstitutionExcluded( int method ) {
- return (substExcluded&method)!=0;
- }
-
- private final List<XSIdentityConstraint> idConstraints;
- public List<XSIdentityConstraint> getIdentityConstraints() {
- return idConstraints;
- }
-
- private Boolean form;
- public Boolean getForm() {
- return form;
- }
-
-
- /**
- * @deprecated
- */
- public XSElementDecl[] listSubstitutables() {
- Set<? extends XSElementDecl> s = getSubstitutables();
- return s.toArray(new XSElementDecl[s.size()]);
- }
-
- /** Set that represents element decls that can substitute this element. */
- private Set<XSElementDecl> substitutables = null;
-
- /** Unmodifieable view of {@link #substitutables}. */
- private Set<XSElementDecl> substitutablesView = null;
-
- public Set<? extends XSElementDecl> getSubstitutables() {
- if( substitutables==null ) {
- // if the field is null by the time this method
- // is called, it means this element is substitutable by itself only.
- substitutables = substitutablesView = Collections.singleton((XSElementDecl)this);
- }
- return substitutablesView;
- }
-
- protected void addSubstitutable( ElementDecl decl ) {
- if( substitutables==null ) {
- substitutables = new HashSet<XSElementDecl>();
- substitutables.add(this);
- substitutablesView = Collections.unmodifiableSet(substitutables);
- }
- substitutables.add(decl);
- }
-
-
- public void updateSubstitutabilityMap() {
- ElementDecl parent = this;
- XSType type = this.getType();
-
- boolean rused = false;
- boolean eused = false;
-
- while( (parent=(ElementDecl)parent.getSubstAffiliation())!=null ) {
-
- if(parent.isSubstitutionDisallowed(XSType.SUBSTITUTION))
- continue;
-
- boolean rd = parent.isSubstitutionDisallowed(XSType.RESTRICTION);
- boolean ed = parent.isSubstitutionDisallowed(XSType.EXTENSION);
-
- if( (rd && rused) || ( ed && eused ) ) continue;
-
- XSType parentType = parent.getType();
- while (type!=parentType) {
- if(type.getDerivationMethod()==XSType.RESTRICTION) rused = true;
- else eused = true;
-
- type = type.getBaseType();
- if(type==null) // parentType and type doesn't share the common base type. a bug in the schema.
- break;
-
- if( type.isComplexType() ) {
- rd |= type.asComplexType().isSubstitutionProhibited(XSType.RESTRICTION);
- ed |= type.asComplexType().isSubstitutionProhibited(XSType.EXTENSION);
- }
- if (getRoot().getAnyType().equals(type)) break;
- }
-
- if( (rd && rused) || ( ed && eused ) ) continue;
-
- // this element can substitute "parent"
- parent.addSubstitutable(this);
- }
- }
-
- public boolean canBeSubstitutedBy(XSElementDecl e) {
- return getSubstitutables().contains(e);
- }
-
- public boolean isWildcard() { return false; }
- public boolean isModelGroupDecl() { return false; }
- public boolean isModelGroup() { return false; }
- public boolean isElementDecl() { return true; }
-
- public XSWildcard asWildcard() { return null; }
- public XSModelGroupDecl asModelGroupDecl() { return null; }
- public XSModelGroup asModelGroup() { return null; }
- public XSElementDecl asElementDecl() { return this; }
-
-
-
-
- public void visit( XSVisitor visitor ) {
- visitor.elementDecl(this);
- }
- public void visit( XSTermVisitor visitor ) {
- visitor.elementDecl(this);
- }
- public Object apply( XSTermFunction function ) {
- return function.elementDecl(this);
- }
-
- public <T,P> T apply(XSTermFunctionWithParam<T, P> function, P param) {
- return function.elementDecl(this,param);
- }
-
- public Object apply( XSFunction function ) {
- return function.elementDecl(this);
- }
-
-
- // Ref.Term implementation
- public XSTerm getTerm() { return this; }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/EmptyImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/EmptyImpl.java
deleted file mode 100644
index 97342cd5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/EmptyImpl.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.visitor.XSContentTypeFunction;
-import com.sun.xml.internal.xsom.visitor.XSContentTypeVisitor;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class EmptyImpl extends ComponentImpl implements ContentTypeImpl {
- public EmptyImpl() { super(null,null,null,null); }
-
- public XSSimpleType asSimpleType() { return null; }
- public XSParticle asParticle() { return null; }
- public XSContentType asEmpty() { return this; }
-
- public Object apply( XSContentTypeFunction function ) {
- return function.empty(this);
- }
- public Object apply( XSFunction function ) {
- return function.empty(this);
- }
- public void visit( XSVisitor visitor ) {
- visitor.empty(this);
- }
- public void visit( XSContentTypeVisitor visitor ) {
- visitor.empty(this);
- }
-
- public XSContentType getContentType() { return this; }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/FacetImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/FacetImpl.java
deleted file mode 100644
index a7330e2c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/FacetImpl.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XmlString;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-public class FacetImpl extends ComponentImpl implements XSFacet {
- public FacetImpl( SchemaDocumentImpl owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa,
- String _name, XmlString _value, boolean _fixed ) {
-
- super(owner,_annon,_loc,_fa);
-
- this.name = _name;
- this.value = _value;
- this.fixed = _fixed;
- }
-
- private final String name;
- public String getName() { return name; }
-
- private final XmlString value;
- public XmlString getValue() { return value; }
-
- private boolean fixed;
- public boolean isFixed() { return fixed; }
-
-
- public void visit( XSVisitor visitor ) {
- visitor.facet(this);
- }
- public Object apply( XSFunction function ) {
- return function.facet(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ForeignAttributesImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ForeignAttributesImpl.java
deleted file mode 100644
index e38e46a5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ForeignAttributesImpl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.ForeignAttributes;
-import org.relaxng.datatype.ValidationContext;
-import org.xml.sax.Locator;
-import org.xml.sax.helpers.AttributesImpl;
-
-/**
- * Remembers foreign attributes.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class ForeignAttributesImpl extends AttributesImpl implements ForeignAttributes {
- private final ValidationContext context;
- private final Locator locator;
- /**
- * {@link ForeignAttributes} forms a linked list.
- */
- final ForeignAttributesImpl next;
-
- public ForeignAttributesImpl(ValidationContext context, Locator locator, ForeignAttributesImpl next) {
- this.context = context;
- this.locator = locator;
- this.next = next;
- }
-
- public ValidationContext getContext() {
- return context;
- }
-
- public Locator getLocator() {
- return locator;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/IdentityConstraintImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/IdentityConstraintImpl.java
deleted file mode 100644
index 6ccc996e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/IdentityConstraintImpl.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-import java.util.Collections;
-import java.util.List;
-
-/**
- * {@link XSIdentityConstraint} implementation.
- *
- * @author Kohsuke Kawaguchi
- */
-public class IdentityConstraintImpl extends ComponentImpl implements XSIdentityConstraint, Ref.IdentityConstraint {
-
- private XSElementDecl parent;
- private final short category;
- private final String name;
- private final XSXPath selector;
- private final List<XSXPath> fields;
- private final Ref.IdentityConstraint refer;
-
- public IdentityConstraintImpl(SchemaDocumentImpl _owner, AnnotationImpl _annon, Locator _loc,
- ForeignAttributesImpl fa, short category, String name, XPathImpl selector,
- List<XPathImpl> fields, Ref.IdentityConstraint refer) {
-
- super(_owner, _annon, _loc, fa);
- this.category = category;
- this.name = name;
- this.selector = selector;
- selector.setParent(this);
- this.fields = Collections.unmodifiableList((List<? extends XSXPath>)fields);
- for( XPathImpl xp : fields )
- xp.setParent(this);
- this.refer = refer;
- }
-
-
- public void visit(XSVisitor visitor) {
- visitor.identityConstraint(this);
- }
-
- public <T> T apply(XSFunction<T> function) {
- return function.identityConstraint(this);
- }
-
- public void setParent(ElementDecl parent) {
- this.parent = parent;
- parent.getOwnerSchema().addIdentityConstraint(this);
- }
-
- public XSElementDecl getParent() {
- return parent;
- }
-
- public String getName() {
- return name;
- }
-
- public String getTargetNamespace() {
- return getParent().getTargetNamespace();
- }
-
- public short getCategory() {
- return category;
- }
-
- public XSXPath getSelector() {
- return selector;
- }
-
- public List<XSXPath> getFields() {
- return fields;
- }
-
- public XSIdentityConstraint getReferencedKey() {
- if(category==KEYREF)
- return refer.get();
- else
- throw new IllegalStateException("not a keyref");
- }
-
- public XSIdentityConstraint get() {
- return this;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ListSimpleTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ListSimpleTypeImpl.java
deleted file mode 100644
index 155697ea..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ListSimpleTypeImpl.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSListSimpleType;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSVariety;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSSimpleTypeFunction;
-import com.sun.xml.internal.xsom.visitor.XSSimpleTypeVisitor;
-import org.xml.sax.Locator;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-
-public class ListSimpleTypeImpl extends SimpleTypeImpl implements XSListSimpleType
-{
- public ListSimpleTypeImpl( SchemaDocumentImpl _parent,
- AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa,
- String _name, boolean _anonymous, Set<XSVariety> finalSet,
- Ref.SimpleType _itemType ) {
-
- super(_parent,_annon,_loc,_fa,_name,_anonymous, finalSet,
- _parent.getSchema().parent.anySimpleType);
-
- this.itemType = _itemType;
- }
-
- private final Ref.SimpleType itemType;
- public XSSimpleType getItemType() { return itemType.getType(); }
-
- public void visit( XSSimpleTypeVisitor visitor ) {
- visitor.listSimpleType(this);
- }
- public Object apply( XSSimpleTypeFunction function ) {
- return function.listSimpleType(this);
- }
-
- // list type by itself doesn't have any facet. */
- public XSFacet getFacet( String name ) { return null; }
- public List<XSFacet> getFacets( String name ) { return Collections.EMPTY_LIST; }
-
- public XSVariety getVariety() { return XSVariety.LIST; }
-
- public XSSimpleType getPrimitiveType() { return null; }
-
- public XSListSimpleType getBaseListType() {return this;}
-
- public boolean isList() { return true; }
- public XSListSimpleType asList() { return this; }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ModelGroupDeclImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ModelGroupDeclImpl.java
deleted file mode 100644
index 890385e2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ModelGroupDeclImpl.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSTerm;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSTermFunction;
-import com.sun.xml.internal.xsom.visitor.XSTermFunctionWithParam;
-import com.sun.xml.internal.xsom.visitor.XSTermVisitor;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-public class ModelGroupDeclImpl extends DeclarationImpl implements XSModelGroupDecl, Ref.Term
-{
- public ModelGroupDeclImpl( SchemaDocumentImpl owner,
- AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa,
- String _targetNamespace, String _name,
- ModelGroupImpl _modelGroup ) {
-
- super(owner,_annon,_loc,_fa,_targetNamespace,_name,false);
- this.modelGroup = _modelGroup;
-
- if(modelGroup==null)
- throw new IllegalArgumentException();
- }
-
- private final ModelGroupImpl modelGroup;
- public XSModelGroup getModelGroup() { return modelGroup; }
-
- /**
- * This component is a redefinition of "oldMG". Fix up the internal state
- * as such.
- */
- public void redefine( ModelGroupDeclImpl oldMG ) {
- modelGroup.redefine(oldMG);
- }
-
-
- public void visit( XSVisitor visitor ) {
- visitor.modelGroupDecl(this);
- }
- public void visit( XSTermVisitor visitor ) {
- visitor.modelGroupDecl(this);
- }
- public Object apply( XSTermFunction function ) {
- return function.modelGroupDecl(this);
- }
-
- public <T,P> T apply(XSTermFunctionWithParam<T, P> function, P param) {
- return function.modelGroupDecl(this,param);
- }
-
- public Object apply( XSFunction function ) {
- return function.modelGroupDecl(this);
- }
-
-
- public boolean isWildcard() { return false; }
- public boolean isModelGroupDecl() { return true; }
- public boolean isModelGroup() { return false; }
- public boolean isElementDecl() { return false; }
-
- public XSWildcard asWildcard() { return null; }
- public XSModelGroupDecl asModelGroupDecl() { return this; }
- public XSModelGroup asModelGroup() { return null; }
- public XSElementDecl asElementDecl() { return null; }
-
-
- // Ref.Term implementation
- public XSTerm getTerm() { return this; }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ModelGroupImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ModelGroupImpl.java
deleted file mode 100644
index 1eec0997..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ModelGroupImpl.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSTerm;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSTermFunction;
-import com.sun.xml.internal.xsom.visitor.XSTermFunctionWithParam;
-import com.sun.xml.internal.xsom.visitor.XSTermVisitor;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-import java.util.Arrays;
-import java.util.Iterator;
-
-public class ModelGroupImpl extends ComponentImpl implements XSModelGroup, Ref.Term
-{
- public ModelGroupImpl( SchemaDocumentImpl owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa,
- Compositor _compositor, ParticleImpl[] _children ) {
-
- super(owner,_annon,_loc,_fa);
- this.compositor = _compositor;
- this.children = _children;
-
- if(compositor==null)
- throw new IllegalArgumentException();
- for( int i=children.length-1; i>=0; i-- )
- if(children[i]==null)
- throw new IllegalArgumentException();
- }
-
- private final ParticleImpl[] children;
- public ParticleImpl getChild( int idx ) { return children[idx]; }
- public int getSize() { return children.length; }
-
- public ParticleImpl[] getChildren() { return children; }
-
-
- private final Compositor compositor;
- public Compositor getCompositor() { return compositor; }
-
-
- public void redefine(ModelGroupDeclImpl oldMG) {
- for (ParticleImpl p : children)
- p.redefine(oldMG);
- }
-
- public Iterator<XSParticle> iterator() {
- return Arrays.asList((XSParticle[])children).iterator();
- }
-
-
- public boolean isWildcard() { return false; }
- public boolean isModelGroupDecl() { return false; }
- public boolean isModelGroup() { return true; }
- public boolean isElementDecl() { return false; }
-
- public XSWildcard asWildcard() { return null; }
- public XSModelGroupDecl asModelGroupDecl() { return null; }
- public XSModelGroup asModelGroup() { return this; }
- public XSElementDecl asElementDecl() { return null; }
-
-
-
- public void visit( XSVisitor visitor ) {
- visitor.modelGroup(this);
- }
- public void visit( XSTermVisitor visitor ) {
- visitor.modelGroup(this);
- }
- public Object apply( XSTermFunction function ) {
- return function.modelGroup(this);
- }
-
- public <T,P> T apply(XSTermFunctionWithParam<T, P> function, P param) {
- return function.modelGroup(this,param);
- }
-
- public Object apply( XSFunction function ) {
- return function.modelGroup(this);
- }
-
- // Ref.Term implementation
- public XSTerm getTerm() { return this; }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/NotationImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/NotationImpl.java
deleted file mode 100644
index fad8089c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/NotationImpl.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-/**
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class NotationImpl extends DeclarationImpl implements XSNotation {
-
- public NotationImpl( SchemaDocumentImpl owner, AnnotationImpl _annon,
- Locator _loc, ForeignAttributesImpl _fa, String _name,
- String _publicId, String _systemId ) {
- super(owner,_annon,_loc,_fa,owner.getTargetNamespace(),_name,false);
-
- this.publicId = _publicId;
- this.systemId = _systemId;
- }
-
- private final String publicId;
- private final String systemId;
-
- public String getPublicId() { return publicId; }
- public String getSystemId() { return systemId; }
-
- public void visit(XSVisitor visitor) {
- visitor.notation(this);
- }
-
- public Object apply(XSFunction function) {
- return function.notation(this);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ParticleImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ParticleImpl.java
deleted file mode 100644
index 04326300..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/ParticleImpl.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSTerm;
-import com.sun.xml.internal.xsom.impl.parser.DelayedRef;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSContentTypeFunction;
-import com.sun.xml.internal.xsom.visitor.XSContentTypeVisitor;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import java.math.BigInteger;
-import org.xml.sax.Locator;
-
-import java.util.List;
-
-public class ParticleImpl extends ComponentImpl implements XSParticle, ContentTypeImpl
-{
- public ParticleImpl( SchemaDocumentImpl owner, AnnotationImpl _ann,
- Ref.Term _term, Locator _loc, BigInteger _maxOccurs, BigInteger _minOccurs ) {
-
- super(owner,_ann,_loc,null);
- this.term = _term;
- this.maxOccurs = _maxOccurs;
- this.minOccurs = _minOccurs;
- }
- public ParticleImpl( SchemaDocumentImpl owner, AnnotationImpl _ann,
- Ref.Term _term, Locator _loc, int _maxOccurs, int _minOccurs ) {
-
- super(owner,_ann,_loc,null);
- this.term = _term;
- this.maxOccurs = BigInteger.valueOf(_maxOccurs);
- this.minOccurs = BigInteger.valueOf(_minOccurs);
- }
- public ParticleImpl( SchemaDocumentImpl owner, AnnotationImpl _ann, Ref.Term _term, Locator _loc ) {
- this(owner,_ann,_term,_loc,1,1);
- }
-
- private Ref.Term term;
- public XSTerm getTerm() { return term.getTerm(); }
-
- private BigInteger maxOccurs;
- public BigInteger getMaxOccurs() { return maxOccurs; }
-
- public boolean isRepeated() {
- return !maxOccurs.equals(BigInteger.ZERO) && !maxOccurs.equals(BigInteger.ONE);
- }
-
- private BigInteger minOccurs;
- public BigInteger getMinOccurs() { return minOccurs; }
-
-
- public void redefine(ModelGroupDeclImpl oldMG) {
- if( term instanceof ModelGroupImpl ) {
- ((ModelGroupImpl)term).redefine(oldMG);
- return;
- }
- if( term instanceof DelayedRef.ModelGroup ) {
- ((DelayedRef)term).redefine(oldMG);
- }
- }
-
-
- public XSSimpleType asSimpleType() { return null; }
- public XSParticle asParticle() { return this; }
- public XSContentType asEmpty() { return null; }
-
-
- public final Object apply( XSFunction function ) {
- return function.particle(this);
- }
- public final Object apply( XSContentTypeFunction function ) {
- return function.particle(this);
- }
- public final void visit( XSVisitor visitor ) {
- visitor.particle(this);
- }
- public final void visit( XSContentTypeVisitor visitor ) {
- visitor.particle(this);
- }
-
- // Ref.ContentType implementation
- public XSContentType getContentType() { return this; }
-
- /**
- * Foreign attribuets are considered to be on terms.
- *
- * REVISIT: is this a good design?
- */
- public List getForeignAttributes() {
- return getTerm().getForeignAttributes();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/Ref.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/Ref.java
deleted file mode 100644
index 41811521..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/Ref.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSTerm;
-import com.sun.xml.internal.xsom.XSType;
-
-/**
- * Reference to other schema components.
- *
- * <p>
- * There are mainly two different types of references. One is
- * the direct reference, which is only possible when schema components
- * are already available when references are made.
- * The other is the lazy reference, which keeps references by names
- * and later look for the component by name.
- *
- * <p>
- * This class defines interfaces that define the behavior of such
- * references and classes that implement direct reference semantics.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class Ref {
-
- public static interface Term {
- /** Obtains a reference as a term. */
- XSTerm getTerm();
- }
-
- public static interface Type {
- /** Obtains a reference as a type. */
- XSType getType();
- }
-
- public static interface ContentType {
- XSContentType getContentType();
- }
-
- public static interface SimpleType extends Ref.Type {
- public XSSimpleType getType();
- }
-
- public static interface ComplexType extends Ref.Type {
- public XSComplexType getType();
- }
-
- public static interface Attribute {
- XSAttributeDecl getAttribute();
- }
-
- public static interface AttGroup {
- XSAttGroupDecl get();
- }
-
- public static interface Element extends Term {
- XSElementDecl get();
- }
-
- public static interface IdentityConstraint {
- XSIdentityConstraint get();
- }
-//
-//
-// private static void _assert( boolean b ) {
-// if(!b)
-// throw new InternalError("assertion failed");
-// }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/RestrictionSimpleTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/RestrictionSimpleTypeImpl.java
deleted file mode 100644
index eff6d96e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/RestrictionSimpleTypeImpl.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSRestrictionSimpleType;
-import com.sun.xml.internal.xsom.XSVariety;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSSimpleTypeFunction;
-import com.sun.xml.internal.xsom.visitor.XSSimpleTypeVisitor;
-import org.xml.sax.Locator;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-public class RestrictionSimpleTypeImpl extends SimpleTypeImpl implements XSRestrictionSimpleType {
-
- public RestrictionSimpleTypeImpl( SchemaDocumentImpl _parent,
- AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa,
- String _name, boolean _anonymous, Set<XSVariety> finalSet,
- Ref.SimpleType _baseType ) {
-
- super( _parent, _annon, _loc, _fa, _name, _anonymous, finalSet, _baseType );
- }
-
-
- private final List<XSFacet> facets = new ArrayList<XSFacet>();
- public void addFacet( XSFacet facet ) {
- facets.add(facet);
- }
- public Iterator<XSFacet> iterateDeclaredFacets() {
- return facets.iterator();
- }
-
- public Collection<? extends XSFacet> getDeclaredFacets() {
- return facets;
- }
-
- public XSFacet getDeclaredFacet( String name ) {
- int len = facets.size();
- for( int i=0; i<len; i++ ) {
- XSFacet f = facets.get(i);
- if(f.getName().equals(name))
- return f;
- }
- return null;
- }
-
- public List<XSFacet> getDeclaredFacets(String name) {
- List<XSFacet> r = new ArrayList<XSFacet>();
- for( XSFacet f : facets )
- if(f.getName().equals(name))
- r.add(f);
- return r;
- }
-
- public XSFacet getFacet( String name ) {
- XSFacet f = getDeclaredFacet(name);
- if(f!=null) return f;
-
- // none was found on this datatype. check the base type.
- return getSimpleBaseType().getFacet(name);
- }
-
- public List<XSFacet> getFacets( String name ) {
- List<XSFacet> f = getDeclaredFacets(name);
- if(!f.isEmpty()) return f;
-
- // none was found on this datatype. check the base type.
- return getSimpleBaseType().getFacets(name);
- }
-
- public XSVariety getVariety() { return getSimpleBaseType().getVariety(); }
-
- public XSSimpleType getPrimitiveType() {
- if(isPrimitive()) return this;
- return getSimpleBaseType().getPrimitiveType();
- }
-
- public boolean isPrimitive() {
- return getSimpleBaseType()==getOwnerSchema().getRoot().anySimpleType;
- }
-
- public void visit( XSSimpleTypeVisitor visitor ) {
- visitor.restrictionSimpleType(this);
- }
- public Object apply( XSSimpleTypeFunction function ) {
- return function.restrictionSimpleType(this);
- }
-
- public boolean isRestriction() { return true; }
- public XSRestrictionSimpleType asRestriction() { return this; }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/SchemaImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/SchemaImpl.java
deleted file mode 100644
index ee179d9d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/SchemaImpl.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.ForeignAttributes;
-import com.sun.xml.internal.xsom.SCD;
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.parser.SchemaDocument;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.NamespaceContext;
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-public class SchemaImpl implements XSSchema
-{
- public SchemaImpl(SchemaSetImpl _parent, Locator loc, String tns) {
- if (tns == null)
- // the empty string must be used.
- throw new IllegalArgumentException();
- this.targetNamespace = tns;
- this.parent = _parent;
- this.locator = loc;
- }
-
- public SchemaDocument getSourceDocument() {
- return null;
- }
-
- public SchemaSetImpl getRoot() {
- return parent;
- }
-
- protected final SchemaSetImpl parent;
-
- private final String targetNamespace;
- public String getTargetNamespace() {
- return targetNamespace;
- }
-
- public XSSchema getOwnerSchema() {
- return this;
- }
-
- private XSAnnotation annotation;
- public void setAnnotation(XSAnnotation a) {
- annotation = a;
- }
- public XSAnnotation getAnnotation() {
- return annotation;
- }
-
- public XSAnnotation getAnnotation(boolean createIfNotExist) {
- if(createIfNotExist && annotation==null)
- annotation = new AnnotationImpl();
- return annotation;
- }
-
- // it's difficult to determine the source location for the schema
- // component as one schema can be defined across multiple files.
- // so this locator might not correctly reflect all the locations
- // where the schema is defined.
- // but partial information would be better than nothing.
-
- private final Locator locator;
- public Locator getLocator() {
- return locator;
- }
-
-
- private final Map<String,XSAttributeDecl> atts = new HashMap<String,XSAttributeDecl>();
- private final Map<String,XSAttributeDecl> attsView = Collections.unmodifiableMap(atts);
- public void addAttributeDecl(XSAttributeDecl newDecl) {
- atts.put(newDecl.getName(), newDecl);
- }
- public Map<String,XSAttributeDecl> getAttributeDecls() {
- return attsView;
- }
- public XSAttributeDecl getAttributeDecl(String name) {
- return atts.get(name);
- }
- public Iterator<XSAttributeDecl> iterateAttributeDecls() {
- return atts.values().iterator();
- }
-
- private final Map<String,XSElementDecl> elems = new HashMap<String,XSElementDecl>();
- private final Map<String,XSElementDecl> elemsView = Collections.unmodifiableMap(elems);
- public void addElementDecl(XSElementDecl newDecl) {
- elems.put(newDecl.getName(), newDecl);
- }
- public Map<String,XSElementDecl> getElementDecls() {
- return elemsView;
- }
- public XSElementDecl getElementDecl(String name) {
- return elems.get(name);
- }
- public Iterator<XSElementDecl> iterateElementDecls() {
- return elems.values().iterator();
- }
-
- private final Map<String,XSAttGroupDecl> attGroups = new HashMap<String,XSAttGroupDecl>();
- private final Map<String,XSAttGroupDecl> attGroupsView = Collections.unmodifiableMap(attGroups);
- public void addAttGroupDecl(XSAttGroupDecl newDecl, boolean overwrite) {
- if(overwrite || !attGroups.containsKey(newDecl.getName()))
- attGroups.put(newDecl.getName(), newDecl);
- }
- public Map<String,XSAttGroupDecl> getAttGroupDecls() {
- return attGroupsView;
- }
- public XSAttGroupDecl getAttGroupDecl(String name) {
- return attGroups.get(name);
- }
- public Iterator<XSAttGroupDecl> iterateAttGroupDecls() {
- return attGroups.values().iterator();
- }
-
-
- private final Map<String,XSNotation> notations = new HashMap<String,XSNotation>();
- private final Map<String,XSNotation> notationsView = Collections.unmodifiableMap(notations);
- public void addNotation( XSNotation newDecl ) {
- notations.put( newDecl.getName(), newDecl );
- }
- public Map<String,XSNotation> getNotations() {
- return notationsView;
- }
- public XSNotation getNotation( String name ) {
- return notations.get(name);
- }
- public Iterator<XSNotation> iterateNotations() {
- return notations.values().iterator();
- }
-
- private final Map<String,XSModelGroupDecl> modelGroups = new HashMap<String,XSModelGroupDecl>();
- private final Map<String,XSModelGroupDecl> modelGroupsView = Collections.unmodifiableMap(modelGroups);
- public void addModelGroupDecl(XSModelGroupDecl newDecl, boolean overwrite) {
- if(overwrite || !modelGroups.containsKey(newDecl.getName()))
- modelGroups.put(newDecl.getName(), newDecl);
- }
- public Map<String,XSModelGroupDecl> getModelGroupDecls() {
- return modelGroupsView;
- }
- public XSModelGroupDecl getModelGroupDecl(String name) {
- return modelGroups.get(name);
- }
- public Iterator<XSModelGroupDecl> iterateModelGroupDecls() {
- return modelGroups.values().iterator();
- }
-
-
- private final Map<String,XSIdentityConstraint> idConstraints = new HashMap<String,XSIdentityConstraint>();
- private final Map<String,XSIdentityConstraint> idConstraintsView = Collections.unmodifiableMap(idConstraints);
-
- protected void addIdentityConstraint(IdentityConstraintImpl c) {
- idConstraints.put(c.getName(),c);
- }
-
- public Map<String, XSIdentityConstraint> getIdentityConstraints() {
- return idConstraintsView;
- }
-
- public XSIdentityConstraint getIdentityConstraint(String localName) {
- return idConstraints.get(localName);
- }
-
- private final Map<String,XSType> allTypes = new HashMap<String,XSType>();
- private final Map<String,XSType> allTypesView = Collections.unmodifiableMap(allTypes);
-
- private final Map<String,XSSimpleType> simpleTypes = new HashMap<String,XSSimpleType>();
- private final Map<String,XSSimpleType> simpleTypesView = Collections.unmodifiableMap(simpleTypes);
- public void addSimpleType(XSSimpleType newDecl, boolean overwrite) {
- if(overwrite || !simpleTypes.containsKey(newDecl.getName())) {
- simpleTypes.put(newDecl.getName(), newDecl);
- allTypes.put(newDecl.getName(), newDecl);
- }
- }
- public Map<String,XSSimpleType> getSimpleTypes() {
- return simpleTypesView;
- }
- public XSSimpleType getSimpleType(String name) {
- return simpleTypes.get(name);
- }
- public Iterator<XSSimpleType> iterateSimpleTypes() {
- return simpleTypes.values().iterator();
- }
-
- private final Map<String,XSComplexType> complexTypes = new HashMap<String,XSComplexType>();
- private final Map<String,XSComplexType> complexTypesView = Collections.unmodifiableMap(complexTypes);
- public void addComplexType(XSComplexType newDecl, boolean overwrite) {
- if(overwrite || !complexTypes.containsKey(newDecl.getName())) {
- complexTypes.put(newDecl.getName(), newDecl);
- allTypes.put(newDecl.getName(), newDecl);
- }
- }
- public Map<String,XSComplexType> getComplexTypes() {
- return complexTypesView;
- }
- public XSComplexType getComplexType(String name) {
- return complexTypes.get(name);
- }
- public Iterator<XSComplexType> iterateComplexTypes() {
- return complexTypes.values().iterator();
- }
-
- public Map<String,XSType> getTypes() {
- return allTypesView;
- }
- public XSType getType(String name) {
- return allTypes.get(name);
- }
- public Iterator<XSType> iterateTypes() {
- return allTypes.values().iterator();
- }
-
- public void visit(XSVisitor visitor) {
- visitor.schema(this);
- }
-
- public Object apply(XSFunction function) {
- return function.schema(this);
- }
-
- /**
- * Lazily created list of {@link ForeignAttributesImpl}s.
- */
- private List<ForeignAttributes> foreignAttributes = null;
- private List<ForeignAttributes> readOnlyForeignAttributes = null;
-
- public void addForeignAttributes(ForeignAttributesImpl fa) {
- if(foreignAttributes==null)
- foreignAttributes = new ArrayList<ForeignAttributes>();
- foreignAttributes.add(fa);
- }
-
- public List<ForeignAttributes> getForeignAttributes() {
- if(readOnlyForeignAttributes==null) {
- if(foreignAttributes==null)
- readOnlyForeignAttributes = Collections.EMPTY_LIST;
- else
- readOnlyForeignAttributes = Collections.unmodifiableList(foreignAttributes);
- }
- return readOnlyForeignAttributes;
- }
-
- public String getForeignAttribute(String nsUri, String localName) {
- for( ForeignAttributes fa : getForeignAttributes() ) {
- String v = fa.getValue(nsUri,localName);
- if(v!=null) return v;
- }
- return null;
- }
-
- public Collection<XSComponent> select(String scd, NamespaceContext nsContext) {
- try {
- return SCD.create(scd,nsContext).select(this);
- } catch (ParseException e) {
- throw new IllegalArgumentException(e);
- }
- }
-
- public XSComponent selectSingle(String scd, NamespaceContext nsContext) {
- try {
- return SCD.create(scd,nsContext).selectSingle(this);
- } catch (ParseException e) {
- throw new IllegalArgumentException(e);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/SchemaSetImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/SchemaSetImpl.java
deleted file mode 100644
index 0d1782bd..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/SchemaSetImpl.java
+++ /dev/null
@@ -1,394 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.SCD;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSListSimpleType;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSRestrictionSimpleType;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.XSUnionSimpleType;
-import com.sun.xml.internal.xsom.XSVariety;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.impl.scd.Iterators;
-import com.sun.xml.internal.xsom.visitor.XSContentTypeFunction;
-import com.sun.xml.internal.xsom.visitor.XSContentTypeVisitor;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSSimpleTypeFunction;
-import com.sun.xml.internal.xsom.visitor.XSSimpleTypeVisitor;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-import javax.xml.namespace.NamespaceContext;
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-public class SchemaSetImpl implements XSSchemaSet
-{
- private final Map<String,XSSchema> schemas = new HashMap<String,XSSchema>();
- private final Vector<XSSchema> schemas2 = new Vector<XSSchema>();
- private final List<XSSchema> readonlySchemaList = Collections.unmodifiableList(schemas2);
-
- /**
- * Gets a reference to the existing schema or creates a new one
- * if none exists yet.
- */
- public SchemaImpl createSchema(String targetNamespace, Locator location) {
- SchemaImpl obj = (SchemaImpl)schemas.get(targetNamespace);
- if (obj == null) {
- obj = new SchemaImpl(this, location, targetNamespace);
- schemas.put(targetNamespace, obj);
- schemas2.add(obj);
- }
- return obj;
- }
-
- public int getSchemaSize() {
- return schemas.size();
- }
- public XSSchema getSchema(String targetNamespace) {
- return schemas.get(targetNamespace);
- }
- public XSSchema getSchema(int idx) {
- return schemas2.get(idx);
- }
- public Iterator<XSSchema> iterateSchema() {
- return schemas2.iterator();
- }
-
- public final Collection<XSSchema> getSchemas() {
- return readonlySchemaList;
- }
-
- public XSType getType(String ns, String localName) {
- XSSchema schema = getSchema(ns);
- if(schema==null) return null;
-
- return schema.getType(localName);
- }
-
- public XSSimpleType getSimpleType( String ns, String localName ) {
- XSSchema schema = getSchema(ns);
- if(schema==null) return null;
-
- return schema.getSimpleType(localName);
- }
-
- public XSElementDecl getElementDecl( String ns, String localName ) {
- XSSchema schema = getSchema(ns);
- if(schema==null) return null;
-
- return schema.getElementDecl(localName);
- }
-
- public XSAttributeDecl getAttributeDecl( String ns, String localName ) {
- XSSchema schema = getSchema(ns);
- if(schema==null) return null;
-
- return schema.getAttributeDecl(localName);
- }
-
- public XSModelGroupDecl getModelGroupDecl( String ns, String localName ) {
- XSSchema schema = getSchema(ns);
- if(schema==null) return null;
-
- return schema.getModelGroupDecl(localName);
- }
-
- public XSAttGroupDecl getAttGroupDecl( String ns, String localName ) {
- XSSchema schema = getSchema(ns);
- if(schema==null) return null;
-
- return schema.getAttGroupDecl(localName);
- }
-
- public XSComplexType getComplexType( String ns, String localName ) {
- XSSchema schema = getSchema(ns);
- if(schema==null) return null;
-
- return schema.getComplexType(localName);
- }
-
- public XSIdentityConstraint getIdentityConstraint(String ns, String localName) {
- XSSchema schema = getSchema(ns);
- if(schema==null) return null;
-
- return schema.getIdentityConstraint(localName);
- }
-
- public Iterator<XSElementDecl> iterateElementDecls() {
- return new Iterators.Map<XSElementDecl,XSSchema>(iterateSchema()) {
- protected Iterator<XSElementDecl> apply(XSSchema u) {
- return u.iterateElementDecls();
- }
- };
- }
-
- public Iterator<XSType> iterateTypes() {
- return new Iterators.Map<XSType,XSSchema>(iterateSchema()) {
- protected Iterator<XSType> apply(XSSchema u) {
- return u.iterateTypes();
- }
- };
- }
-
- public Iterator<XSAttributeDecl> iterateAttributeDecls() {
- return new Iterators.Map<XSAttributeDecl,XSSchema>(iterateSchema()) {
- protected Iterator<XSAttributeDecl> apply(XSSchema u) {
- return u.iterateAttributeDecls();
- }
- };
- }
- public Iterator<XSAttGroupDecl> iterateAttGroupDecls() {
- return new Iterators.Map<XSAttGroupDecl,XSSchema>(iterateSchema()) {
- protected Iterator<XSAttGroupDecl> apply(XSSchema u) {
- return u.iterateAttGroupDecls();
- }
- };
- }
- public Iterator<XSModelGroupDecl> iterateModelGroupDecls() {
- return new Iterators.Map<XSModelGroupDecl,XSSchema>(iterateSchema()) {
- protected Iterator<XSModelGroupDecl> apply(XSSchema u) {
- return u.iterateModelGroupDecls();
- }
- };
- }
- public Iterator<XSSimpleType> iterateSimpleTypes() {
- return new Iterators.Map<XSSimpleType,XSSchema>(iterateSchema()) {
- protected Iterator<XSSimpleType> apply(XSSchema u) {
- return u.iterateSimpleTypes();
- }
- };
- }
- public Iterator<XSComplexType> iterateComplexTypes() {
- return new Iterators.Map<XSComplexType,XSSchema>(iterateSchema()) {
- protected Iterator<XSComplexType> apply(XSSchema u) {
- return u.iterateComplexTypes();
- }
- };
- }
- public Iterator<XSNotation> iterateNotations() {
- return new Iterators.Map<XSNotation,XSSchema>(iterateSchema()) {
- protected Iterator<XSNotation> apply(XSSchema u) {
- return u.iterateNotations();
- }
- };
- }
-
- public Iterator<XSIdentityConstraint> iterateIdentityConstraints() {
- return new Iterators.Map<XSIdentityConstraint,XSSchema>(iterateSchema()) {
- protected Iterator<XSIdentityConstraint> apply(XSSchema u) {
- return u.getIdentityConstraints().values().iterator();
- }
- };
- }
-
- public Collection<XSComponent> select(String scd, NamespaceContext nsContext) {
- try {
- return SCD.create(scd,nsContext).select(this);
- } catch (ParseException e) {
- throw new IllegalArgumentException(e);
- }
- }
-
- public XSComponent selectSingle(String scd, NamespaceContext nsContext) {
- try {
- return SCD.create(scd,nsContext).selectSingle(this);
- } catch (ParseException e) {
- throw new IllegalArgumentException(e);
- }
- }
-
-
- public final EmptyImpl empty = new EmptyImpl();
- public XSContentType getEmpty() { return empty; }
-
- public XSSimpleType getAnySimpleType() { return anySimpleType; }
- public final AnySimpleType anySimpleType = new AnySimpleType();
- private class AnySimpleType extends DeclarationImpl
- implements XSRestrictionSimpleType, Ref.SimpleType {
-
- AnySimpleType() {
- super(null,null,null,null,"http://www.w3.org/2001/XMLSchema","anySimpleType",false);
- }
- public SchemaImpl getOwnerSchema() {
- return createSchema("http://www.w3.org/2001/XMLSchema",null);
- }
- public XSSimpleType asSimpleType() { return this; }
- public XSComplexType asComplexType() { return null; }
-
- public boolean isDerivedFrom(XSType t) {
- return t==this || t==anyType;
- }
-
- public boolean isSimpleType() { return true; }
- public boolean isComplexType() { return false; }
- public XSContentType asEmpty() { return null; }
- public XSParticle asParticle() { return null; }
- public XSType getBaseType() { return anyType; }
- public XSSimpleType getSimpleBaseType() { return null; }
- public int getDerivationMethod() { return RESTRICTION; }
- public Iterator<XSFacet> iterateDeclaredFacets() { return Iterators.empty(); }
- public Collection<? extends XSFacet> getDeclaredFacets() { return Collections.EMPTY_LIST; }
- public void visit( XSSimpleTypeVisitor visitor ) {visitor.restrictionSimpleType(this); }
- public void visit( XSContentTypeVisitor visitor ) {visitor.simpleType(this); }
- public void visit( XSVisitor visitor ) {visitor.simpleType(this); }
- public <T> T apply( XSSimpleTypeFunction<T> f ) {return f.restrictionSimpleType(this); }
- public <T> T apply( XSContentTypeFunction<T> f ) { return f.simpleType(this); }
- public <T> T apply( XSFunction<T> f ) { return f.simpleType(this); }
- public XSVariety getVariety() { return XSVariety.ATOMIC; }
- public XSSimpleType getPrimitiveType() {return this;}
- public boolean isPrimitive() {return true;}
- public XSListSimpleType getBaseListType() {return null;}
- public XSUnionSimpleType getBaseUnionType() {return null;}
- public XSFacet getFacet(String name) { return null; }
- public List<XSFacet> getFacets( String name ) { return Collections.EMPTY_LIST; }
- public XSFacet getDeclaredFacet(String name) { return null; }
- public List<XSFacet> getDeclaredFacets(String name) { return Collections.EMPTY_LIST; }
-
- public boolean isRestriction() { return true; }
- public boolean isList() { return false; }
- public boolean isUnion() { return false; }
- public boolean isFinal(XSVariety v) { return false; }
- public XSRestrictionSimpleType asRestriction() { return this; }
- public XSListSimpleType asList() { return null; }
- public XSUnionSimpleType asUnion() { return null; }
- public XSSimpleType getType() { return this; } // Ref.SimpleType implementation
- public XSSimpleType getRedefinedBy() { return null; }
- public int getRedefinedCount() { return 0; }
-
- public XSType[] listSubstitutables() {
- return Util.listSubstitutables(this);
- }
- }
-
- public XSComplexType getAnyType() { return anyType; }
- public final AnyType anyType = new AnyType();
- private class AnyType extends DeclarationImpl implements XSComplexType, Ref.Type {
- AnyType() {
- super(null,null,null,null,"http://www.w3.org/2001/XMLSchema","anyType",false);
- }
- public SchemaImpl getOwnerSchema() {
- return createSchema("http://www.w3.org/2001/XMLSchema",null);
- }
- public boolean isAbstract() { return false; }
- public XSWildcard getAttributeWildcard() { return anyWildcard; }
- public XSAttributeUse getAttributeUse( String nsURI, String localName ) { return null; }
- public Iterator<XSAttributeUse> iterateAttributeUses() { return Iterators.empty(); }
- public XSAttributeUse getDeclaredAttributeUse( String nsURI, String localName ) { return null; }
- public Iterator<XSAttributeUse> iterateDeclaredAttributeUses() { return Iterators.empty(); }
- public Iterator<XSAttGroupDecl> iterateAttGroups() { return Iterators.empty(); }
- public Collection<XSAttributeUse> getAttributeUses() { return Collections.EMPTY_LIST; }
- public Collection<? extends XSAttributeUse> getDeclaredAttributeUses() { return Collections.EMPTY_LIST; }
- public Collection<? extends XSAttGroupDecl> getAttGroups() { return Collections.EMPTY_LIST; }
- public boolean isFinal( int i ) { return false; }
- public boolean isSubstitutionProhibited( int i ) { return false; }
- public boolean isMixed() { return true; }
- public XSContentType getContentType() { return contentType; }
- public XSContentType getExplicitContent() { return null; }
- public XSType getBaseType() { return this; }
- public XSSimpleType asSimpleType() { return null; }
- public XSComplexType asComplexType() { return this; }
-
- public boolean isDerivedFrom(XSType t) {
- return t==this;
- }
-
- public boolean isSimpleType() { return false; }
- public boolean isComplexType() { return true; }
- public XSContentType asEmpty() { return null; }
- public int getDerivationMethod() { return XSType.RESTRICTION; }
-
- public XSElementDecl getScope() { return null; }
- public void visit( XSVisitor visitor ) { visitor.complexType(this); }
- public <T> T apply( XSFunction<T> f ) { return f.complexType(this); }
-
- public XSType getType() { return this; } // Ref.Type implementation
-
- public XSComplexType getRedefinedBy() { return null; }
- public int getRedefinedCount() { return 0; }
-
- public XSType[] listSubstitutables() {
- return Util.listSubstitutables(this);
- }
-
- private final WildcardImpl anyWildcard = new WildcardImpl.Any(null,null,null,null,XSWildcard.SKIP);
- private final XSContentType contentType = new ParticleImpl( null, null,
- new ModelGroupImpl(null, null, null, null,XSModelGroup.SEQUENCE, new ParticleImpl[]{
- new ParticleImpl( null, null,
- anyWildcard, null,
- XSParticle.UNBOUNDED, 0 )
- })
- ,null,1,1);
- public List<XSComplexType> getSubtypes() {
- ArrayList subtypeList = new ArrayList();
- Iterator<XSComplexType> cTypes = getRoot().iterateComplexTypes();
- while (cTypes.hasNext()) {
- XSComplexType cType= cTypes.next();
- XSType base = cType.getBaseType();
- if ((base != null) && (base.equals(this))) {
- subtypeList.add(cType);
- }
- }
- return subtypeList;
- }
-
- public List<XSElementDecl> getElementDecls() {
- ArrayList declList = new ArrayList();
- XSSchemaSet schemaSet = getRoot();
- for (XSSchema sch : schemaSet.getSchemas()) {
- for (XSElementDecl decl : sch.getElementDecls().values()) {
- if (decl.getType().equals(this)) {
- declList.add(decl);
- }
- }
- }
- return declList;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/SimpleTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/SimpleTypeImpl.java
deleted file mode 100644
index d15e6ada..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/SimpleTypeImpl.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSListSimpleType;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSRestrictionSimpleType;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.XSUnionSimpleType;
-import com.sun.xml.internal.xsom.XSVariety;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSContentTypeFunction;
-import com.sun.xml.internal.xsom.visitor.XSContentTypeVisitor;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-import java.util.Set;
-
-public abstract class SimpleTypeImpl extends DeclarationImpl
- implements XSSimpleType, ContentTypeImpl, Ref.SimpleType
-{
- SimpleTypeImpl(
- SchemaDocumentImpl _parent,
- AnnotationImpl _annon,
- Locator _loc,
- ForeignAttributesImpl _fa,
- String _name,
- boolean _anonymous,
- Set<XSVariety> finalSet,
- Ref.SimpleType _baseType) {
-
- super(_parent, _annon, _loc, _fa, _parent.getTargetNamespace(), _name, _anonymous);
-
- this.baseType = _baseType;
- this.finalSet = finalSet;
- }
-
- private Ref.SimpleType baseType;
-
- public XSType[] listSubstitutables() {
- return Util.listSubstitutables(this);
- }
-
- public void redefine( SimpleTypeImpl st ) {
- baseType = st;
- st.redefinedBy = this;
- redefiningCount = (short)(st.redefiningCount+1);
- }
-
- /**
- * Number of times this component redefines other components.
- */
- private short redefiningCount = 0;
-
- private SimpleTypeImpl redefinedBy = null;
-
- public XSSimpleType getRedefinedBy() {
- return redefinedBy;
- }
-
- public int getRedefinedCount() {
- int i=0;
- for( SimpleTypeImpl st =this.redefinedBy; st !=null; st =st.redefinedBy)
- i++;
- return i;
- }
-
- public XSType getBaseType() { return baseType.getType(); }
- public XSSimpleType getSimpleBaseType() { return baseType.getType(); }
- public boolean isPrimitive() { return false; }
-
- public XSListSimpleType getBaseListType() {
- return getSimpleBaseType().getBaseListType();
- }
-
- public XSUnionSimpleType getBaseUnionType() {
- return getSimpleBaseType().getBaseUnionType();
- }
-
- private final Set<XSVariety> finalSet;
-
- public boolean isFinal(XSVariety v) {
- return finalSet.contains(v);
- }
-
-
- public final int getDerivationMethod() { return XSType.RESTRICTION; }
-
-
- public final XSSimpleType asSimpleType() { return this; }
- public final XSComplexType asComplexType(){ return null; }
-
- public boolean isDerivedFrom(XSType t) {
- XSType x = this;
- while(true) {
- if(t==x)
- return true;
- XSType s = x.getBaseType();
- if(s==x)
- return false;
- x = s;
- }
- }
-
- public final boolean isSimpleType() { return true; }
- public final boolean isComplexType() { return false; }
- public final XSParticle asParticle() { return null; }
- public final XSContentType asEmpty() { return null; }
-
-
- public boolean isRestriction() { return false; }
- public boolean isList() { return false; }
- public boolean isUnion() { return false; }
- public XSRestrictionSimpleType asRestriction() { return null; }
- public XSListSimpleType asList() { return null; }
- public XSUnionSimpleType asUnion() { return null; }
-
-
-
-
- public final void visit( XSVisitor visitor ) {
- visitor.simpleType(this);
- }
- public final void visit( XSContentTypeVisitor visitor ) {
- visitor.simpleType(this);
- }
- public final Object apply( XSFunction function ) {
- return function.simpleType(this);
- }
- public final Object apply( XSContentTypeFunction function ) {
- return function.simpleType(this);
- }
-
- // Ref.ContentType implementation
- public XSContentType getContentType() { return this; }
- // Ref.SimpleType implementation
- public XSSimpleType getType() { return this; }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/UName.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/UName.java
deleted file mode 100644
index f9be8887..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/UName.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSDeclaration;
-
-import java.util.Comparator;
-
-/**
- * UName.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public final class UName {
- /**
- * @param _nsUri
- * Use "" to indicate the no namespace.
- */
- public UName( String _nsUri, String _localName, String _qname ) {
- if(_nsUri==null || _localName==null || _qname==null) {
- throw new NullPointerException(_nsUri+" "+_localName+" "+_qname);
- }
- this.nsUri = _nsUri.intern();
- this.localName = _localName.intern();
- this.qname = _qname.intern();
- }
-
- public UName( String nsUri, String localName ) {
- this(nsUri,localName,localName);
- }
-
- public UName(XSDeclaration decl) {
- this(decl.getTargetNamespace(),decl.getName());
- }
-
- private final String nsUri;
- private final String localName;
- private final String qname;
-
- public String getName() { return localName; }
- public String getNamespaceURI() { return nsUri; }
- public String getQualifiedName() { return qname; }
-
-
- // Issue 540; XSComplexType.getAttributeUse(String,String) always return null
- // UName was used in HashMap without overriden equals and hashCode methods.
-
- @Override
- public boolean equals(Object obj) {
- if(obj instanceof UName) {
- UName u = (UName)obj;
-
- return ((this.getName().compareTo(u.getName()) == 0) &&
- (this.getNamespaceURI().compareTo(u.getNamespaceURI()) == 0) &&
- (this.getQualifiedName().compareTo(u.getQualifiedName()) == 0));
- } else {
- return false;
- }
- }
-
- @Override
- public int hashCode() {
- int hash = 7;
- hash = 13 * hash + (this.nsUri != null ? this.nsUri.hashCode() : 0);
- hash = 13 * hash + (this.localName != null ? this.localName.hashCode() : 0);
- hash = 13 * hash + (this.qname != null ? this.qname.hashCode() : 0);
- return hash;
- }
-
- /**
- * Compares {@link UName}s by their names.
- */
- public static final Comparator comparator = new Comparator() {
- public int compare(Object o1, Object o2) {
- UName lhs = (UName)o1;
- UName rhs = (UName)o2;
- int r = lhs.nsUri.compareTo(rhs.nsUri);
- if(r!=0) return r;
- return lhs.localName.compareTo(rhs.localName);
- }
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/UnionSimpleTypeImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/UnionSimpleTypeImpl.java
deleted file mode 100644
index 879d1a86..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/UnionSimpleTypeImpl.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSUnionSimpleType;
-import com.sun.xml.internal.xsom.XSVariety;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSSimpleTypeFunction;
-import com.sun.xml.internal.xsom.visitor.XSSimpleTypeVisitor;
-import org.xml.sax.Locator;
-
-import java.util.Iterator;
-import java.util.Set;
-import java.util.List;
-import java.util.Collections;
-
-public class UnionSimpleTypeImpl extends SimpleTypeImpl implements XSUnionSimpleType
-{
- public UnionSimpleTypeImpl( SchemaDocumentImpl _parent,
- AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa,
- String _name, boolean _anonymous, Set<XSVariety> finalSet,
- Ref.SimpleType[] _members ) {
-
- super(_parent,_annon,_loc,_fa,_name,_anonymous, finalSet,
- _parent.getSchema().parent.anySimpleType);
-
- this.memberTypes = _members;
- }
-
- private final Ref.SimpleType[] memberTypes;
- public XSSimpleType getMember( int idx ) { return memberTypes[idx].getType(); }
- public int getMemberSize() { return memberTypes.length; }
-
- public Iterator<XSSimpleType> iterator() {
- return new Iterator<XSSimpleType>() {
- int idx=0;
- public boolean hasNext() {
- return idx<memberTypes.length;
- }
-
- public XSSimpleType next() {
- return memberTypes[idx++].getType();
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- };
- }
-
- public void visit( XSSimpleTypeVisitor visitor ) {
- visitor.unionSimpleType(this);
- }
- public Object apply( XSSimpleTypeFunction function ) {
- return function.unionSimpleType(this);
- }
-
- public XSUnionSimpleType getBaseUnionType() {
- return this;
- }
-
- // union type by itself doesn't have any facet. */
- public XSFacet getFacet( String name ) { return null; }
- public List<XSFacet> getFacets( String name ) { return Collections.EMPTY_LIST; }
-
- public XSVariety getVariety() { return XSVariety.UNION; }
-
- public XSSimpleType getPrimitiveType() { return null; }
-
- public boolean isUnion() { return true; }
- public XSUnionSimpleType asUnion() { return this; }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/Util.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/Util.java
deleted file mode 100644
index 6c2861d6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/Util.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSType;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- *
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-class Util {
- private static XSType[] listDirectSubstitutables( XSType _this ) {
- ArrayList r = new ArrayList();
-
- // TODO: handle @block
- Iterator itr = ((SchemaImpl)_this.getOwnerSchema()).parent.iterateTypes();
- while( itr.hasNext() ) {
- XSType t = (XSType)itr.next();
- if( t.getBaseType()==_this )
- r.add(t);
- }
- return (XSType[]) r.toArray(new XSType[r.size()]);
- }
-
- public static XSType[] listSubstitutables( XSType _this ) {
- Set substitables = new HashSet();
- buildSubstitutables( _this, substitables );
- return (XSType[]) substitables.toArray(new XSType[substitables.size()]);
- }
-
- public static void buildSubstitutables( XSType _this, Set substitutables ) {
- if( _this.isLocal() ) return;
- buildSubstitutables( _this, _this, substitutables );
- }
-
- private static void buildSubstitutables( XSType head, XSType _this, Set substitutables ) {
- if(!isSubstitutable(head,_this))
- return; // no derived type of _this can substitute head.
-
- if(substitutables.add(_this)) {
- XSType[] child = listDirectSubstitutables(_this);
- for( int i=0; i<child.length; i++ )
- buildSubstitutables( head, child[i], substitutables );
- }
- }
-
- /**
- * Implements
- * <code>Validation Rule: Schema-Validity Assessment (Element) 1.2.1.2.4</code>
- */
- private static boolean isSubstitutable( XSType _base, XSType derived ) {
- // too ugly to the point that it's almost unbearable.
- // I mean, it's not even transitive. Thus we end up calling this method
- // for each candidate
- if( _base.isComplexType() ) {
- XSComplexType base = _base.asComplexType();
-
- for( ; base!=derived; derived=derived.getBaseType() ) {
- if( base.isSubstitutionProhibited( derived.getDerivationMethod() ) )
- return false; // Type Derivation OK (Complex)-1
- }
- return true;
- } else {
- // simple type don't have any @block
- return true;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/WildcardImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/WildcardImpl.java
deleted file mode 100644
index ea317608..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/WildcardImpl.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSTerm;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSTermFunction;
-import com.sun.xml.internal.xsom.visitor.XSTermFunctionWithParam;
-import com.sun.xml.internal.xsom.visitor.XSTermVisitor;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import com.sun.xml.internal.xsom.visitor.XSWildcardFunction;
-import com.sun.xml.internal.xsom.visitor.XSWildcardVisitor;
-import org.xml.sax.Locator;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-public abstract class WildcardImpl extends ComponentImpl implements XSWildcard, Ref.Term
-{
- protected WildcardImpl( SchemaDocumentImpl owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, int _mode ) {
- super(owner,_annon,_loc,_fa);
- this.mode = _mode;
- }
-
- private final int mode;
- public int getMode() { return mode; }
-
- // compute the union
- public WildcardImpl union( SchemaDocumentImpl owner, WildcardImpl rhs ) {
- if(this instanceof Any || rhs instanceof Any)
- return new Any(owner,null,null,null,mode);
-
- if(this instanceof Finite && rhs instanceof Finite) {
- Set<String> values = new HashSet<String>();
- values.addAll( ((Finite)this).names );
- values.addAll( ((Finite)rhs ).names );
- return new Finite(owner,null,null,null,values,mode);
- }
-
- if(this instanceof Other && rhs instanceof Other) {
- if( ((Other)this).otherNamespace.equals(
- ((Other)rhs).otherNamespace) )
- return new Other(owner,null,null,null, ((Other)this).otherNamespace, mode );
- else
- // this somewhat strange rule is indeed in the spec
- return new Other(owner,null,null,null, "", mode );
- }
-
- Other o;
- Finite f;
-
- if( this instanceof Other ) {
- o=(Other)this; f=(Finite)rhs;
- } else {
- o=(Other)rhs; f=(Finite)this;
- }
-
- if(f.names.contains(o.otherNamespace))
- return new Any(owner,null,null,null,mode);
- else
- return new Other(owner,null,null,null,o.otherNamespace,mode);
- }
-
-
-
- public final static class Any extends WildcardImpl implements XSWildcard.Any {
- public Any( SchemaDocumentImpl owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, int _mode ) {
- super(owner,_annon,_loc,_fa,_mode);
- }
-
- public boolean acceptsNamespace( String namespaceURI ) {
- return true;
- }
- public void visit( XSWildcardVisitor visitor ) {
- visitor.any(this);
- }
- public Object apply( XSWildcardFunction function ) {
- return function.any(this);
- }
- }
-
- public final static class Other extends WildcardImpl implements XSWildcard.Other {
- public Other( SchemaDocumentImpl owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa,
- String otherNamespace, int _mode ) {
- super(owner,_annon,_loc,_fa,_mode);
- this.otherNamespace = otherNamespace;
- }
-
- private final String otherNamespace;
-
- public String getOtherNamespace() { return otherNamespace; }
-
- public boolean acceptsNamespace( String namespaceURI ) {
- return !namespaceURI.equals(otherNamespace);
- }
-
- public void visit( XSWildcardVisitor visitor ) {
- visitor.other(this);
- }
- public Object apply( XSWildcardFunction function ) {
- return function.other(this);
- }
- }
-
- public final static class Finite extends WildcardImpl implements XSWildcard.Union {
- public Finite( SchemaDocumentImpl owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa,
- Set<String> ns, int _mode ) {
- super(owner,_annon,_loc,_fa,_mode);
- names = ns;
- namesView = Collections.unmodifiableSet(names);
- }
-
- private final Set<String> names;
- private final Set<String> namesView;
-
- public Iterator<String> iterateNamespaces() {
- return names.iterator();
- }
-
- public Collection<String> getNamespaces() {
- return namesView;
- }
-
- public boolean acceptsNamespace( String namespaceURI ) {
- return names.contains(namespaceURI);
- }
-
- public void visit( XSWildcardVisitor visitor ) {
- visitor.union(this);
- }
- public Object apply( XSWildcardFunction function ) {
- return function.union(this);
- }
- }
-
- public final void visit( XSVisitor visitor ) {
- visitor.wildcard(this);
- }
- public final void visit( XSTermVisitor visitor ) {
- visitor.wildcard(this);
- }
- public Object apply( XSTermFunction function ) {
- return function.wildcard(this);
- }
-
- public <T,P> T apply(XSTermFunctionWithParam<T, P> function, P param) {
- return function.wildcard(this,param);
- }
-
- public Object apply( XSFunction function ) {
- return function.wildcard(this);
- }
-
-
- public boolean isWildcard() { return true; }
- public boolean isModelGroupDecl() { return false; }
- public boolean isModelGroup() { return false; }
- public boolean isElementDecl() { return false; }
-
- public XSWildcard asWildcard() { return this; }
- public XSModelGroupDecl asModelGroupDecl() { return null; }
- public XSModelGroup asModelGroup() { return null; }
- public XSElementDecl asElementDecl() { return null; }
-
-
- // Ref.Term implementation
- public XSTerm getTerm() { return this; }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/XPathImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/XPathImpl.java
deleted file mode 100644
index 7371973d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/XPathImpl.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl;
-
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.XmlString;
-import com.sun.xml.internal.xsom.impl.parser.SchemaDocumentImpl;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public class XPathImpl extends ComponentImpl implements XSXPath {
- private XSIdentityConstraint parent;
- private final XmlString xpath;
-
- public XPathImpl(SchemaDocumentImpl _owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl fa, XmlString xpath) {
- super(_owner, _annon, _loc, fa);
- this.xpath = xpath;
- }
-
- public void setParent(XSIdentityConstraint parent) {
- this.parent = parent;
- }
-
- public XSIdentityConstraint getParent() {
- return parent;
- }
-
- public XmlString getXPath() {
- return xpath;
- }
-
- public void visit(XSVisitor visitor) {
- visitor.xpath(this);
- }
-
- public <T> T apply(XSFunction<T> function) {
- return function.xpath(this);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/package.html b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/package.html
deleted file mode 100644
index c920beb6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
-Implementation of the <code>com.sun.xml.internal.xsom</code> package.
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/BaseContentRef.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/BaseContentRef.java
deleted file mode 100644
index 23301046..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/BaseContentRef.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser;
-
-import com.sun.xml.internal.xsom.impl.Ref;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSType;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-public final class BaseContentRef implements Ref.ContentType, Patch {
- private final Ref.Type baseType;
- private final Locator loc;
-
- public BaseContentRef(final NGCCRuntimeEx $runtime, Ref.Type _baseType) {
- this.baseType = _baseType;
- $runtime.addPatcher(this);
- $runtime.addErrorChecker(new Patch() {
- public void run() throws SAXException {
- XSType t = baseType.getType();
- if (t.isComplexType() && t.asComplexType().getContentType().asParticle()!=null) {
- $runtime.reportError(
- Messages.format(Messages.ERR_SIMPLE_CONTENT_EXPECTED,
- t.getTargetNamespace(), t.getName()), loc);
- }
- }
- });
- this.loc = $runtime.copyLocator();
- }
-
- public XSContentType getContentType() {
- XSType t = baseType.getType();
- if(t.asComplexType()!=null)
- return t.asComplexType().getContentType();
- else
- return t.asSimpleType();
- }
-
- public void run() throws SAXException {
- if (baseType instanceof Patch)
- ((Patch) baseType).run();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/DefaultAnnotationParser.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/DefaultAnnotationParser.java
deleted file mode 100644
index 555de9e0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/DefaultAnnotationParser.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser;
-
-import com.sun.xml.internal.xsom.parser.AnnotationContext;
-import com.sun.xml.internal.xsom.parser.AnnotationParser;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * AnnotationParser that just ignores annotation.
- *
- * <p>
- * This class doesn't have any state. So it should be used as a singleton.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-class DefaultAnnotationParser extends AnnotationParser {
-
- private DefaultAnnotationParser() {}
-
- public static final AnnotationParser theInstance = new DefaultAnnotationParser();
-
- public ContentHandler getContentHandler(
- AnnotationContext contest, String elementName,
- ErrorHandler errorHandler, EntityResolver entityResolver ) {
- return new DefaultHandler();
- }
-
- public Object getResult( Object existing ) {
- return null;
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/DelayedRef.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/DelayedRef.java
deleted file mode 100644
index 5269fec2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/DelayedRef.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser;
-
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSDeclaration;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSTerm;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.impl.Ref;
-import com.sun.xml.internal.xsom.impl.SchemaImpl;
-import com.sun.xml.internal.xsom.impl.UName;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-/**
- * Reference by name.
- *
- * UName will be later resolved to a target object,
- * after all the schemas are parsed.
- */
-public abstract class DelayedRef implements Patch {
- DelayedRef( PatcherManager _manager, Locator _source, SchemaImpl _schema, UName _name ) {
-
- this.schema = _schema.getRoot();
- this.manager = _manager;
- this.name = _name;
- this.source = _source;
-
- if(name==null) throw new InternalError();
-
- manager.addPatcher(this);
- }
-
- /**
- * Patch implementation. Makes sure that the name resolves
- * to a schema component.
- */
- public void run() throws SAXException {
- if(ref==null) // redefinition can set ref without actually resolving the reference
- resolve();
- manager = null; // avoid keeping the reference too long
- name = null;
- source = null;
- }
-
-
- protected final XSSchemaSet schema;
- private PatcherManager manager;
- private UName name;
- /** location in the source file where this reference was made. */
- private Locator source;
-
- protected abstract Object resolveReference( UName name );
- protected abstract String getErrorProperty();
-
- private Object ref=null;
- protected final Object _get() {
- if(ref==null) throw new InternalError("unresolved reference");
- return ref;
- }
-
- private void resolve() throws SAXException {
- ref = resolveReference(name);
- if(ref==null)
- manager.reportError(
- Messages.format(getErrorProperty(),name.getQualifiedName()),
- source );
- }
-
- /**
- * If this reference refers to the given declaration,
- * resolve the reference now. This is used to implement redefinition.
- */
- public void redefine(XSDeclaration d) {
- if( !d.getTargetNamespace().equals(name.getNamespaceURI())
- || !d.getName().equals(name.getName()) )
- return;
-
- ref = d;
- manager = null;
- name = null;
- source = null;
- }
-
-
- public static class Type extends DelayedRef implements Ref.Type {
- public Type( PatcherManager manager, Locator loc, SchemaImpl schema, UName name ) {
- super(manager,loc,schema,name);
- }
- protected Object resolveReference( UName name ) {
- Object o = super.schema.getSimpleType(
- name.getNamespaceURI(), name.getName() );
- if(o!=null) return o;
-
- return super.schema.getComplexType(
- name.getNamespaceURI(),
- name.getName());
- }
- protected String getErrorProperty() {
- return Messages.ERR_UNDEFINED_TYPE;
- }
-
- public XSType getType() { return (XSType)super._get(); }
- }
-
- public static class SimpleType extends DelayedRef implements Ref.SimpleType {
- public SimpleType( PatcherManager manager, Locator loc, SchemaImpl schema, UName name ) {
- super(manager,loc,schema,name);
- }
- public XSSimpleType getType() { return (XSSimpleType)_get(); }
-
- protected Object resolveReference( UName name ) {
- return super.schema.getSimpleType(
- name.getNamespaceURI(),
- name.getName());
- }
-
- protected String getErrorProperty() {
- return Messages.ERR_UNDEFINED_SIMPLETYPE;
- }
- }
-
- public static class ComplexType extends DelayedRef implements Ref.ComplexType {
- public ComplexType( PatcherManager manager, Locator loc, SchemaImpl schema, UName name ) {
- super(manager,loc,schema,name);
- }
- protected Object resolveReference( UName name ) {
- return super.schema.getComplexType(
- name.getNamespaceURI(),
- name.getName());
- }
-
- protected String getErrorProperty() {
- return Messages.ERR_UNDEFINED_COMPLEXTYPE;
- }
-
- public XSComplexType getType() { return (XSComplexType)super._get(); }
- }
-
- public static class Element extends DelayedRef implements Ref.Element {
- public Element( PatcherManager manager, Locator loc, SchemaImpl schema, UName name ) {
- super(manager,loc,schema,name);
- }
- protected Object resolveReference( UName name ) {
- return super.schema.getElementDecl(
- name.getNamespaceURI(),
- name.getName());
- }
-
- protected String getErrorProperty() {
- return Messages.ERR_UNDEFINED_ELEMENT;
- }
-
- public XSElementDecl get() { return (XSElementDecl)super._get(); }
- public XSTerm getTerm() { return get(); }
- }
-
- public static class ModelGroup extends DelayedRef implements Ref.Term {
- public ModelGroup( PatcherManager manager, Locator loc, SchemaImpl schema, UName name ) {
- super(manager,loc,schema,name);
- }
- protected Object resolveReference( UName name ) {
- return super.schema.getModelGroupDecl(
- name.getNamespaceURI(),
- name.getName());
- }
-
- protected String getErrorProperty() {
- return Messages.ERR_UNDEFINED_MODELGROUP;
- }
-
- public XSModelGroupDecl get() { return (XSModelGroupDecl)super._get(); }
- public XSTerm getTerm() { return get(); }
- }
-
- public static class AttGroup extends DelayedRef implements Ref.AttGroup {
- public AttGroup( PatcherManager manager, Locator loc, SchemaImpl schema, UName name ) {
- super(manager,loc,schema,name);
- }
- protected Object resolveReference( UName name ) {
- return super.schema.getAttGroupDecl(
- name.getNamespaceURI(),
- name.getName());
- }
-
- protected String getErrorProperty() {
- return Messages.ERR_UNDEFINED_ATTRIBUTEGROUP;
- }
-
- public XSAttGroupDecl get() { return (XSAttGroupDecl)super._get(); }
- }
-
- public static class Attribute extends DelayedRef implements Ref.Attribute {
- public Attribute( PatcherManager manager, Locator loc, SchemaImpl schema, UName name ) {
- super(manager,loc,schema,name);
- }
- protected Object resolveReference( UName name ) {
- return super.schema.getAttributeDecl(
- name.getNamespaceURI(),
- name.getName());
- }
-
- protected String getErrorProperty() {
- return Messages.ERR_UNDEFINED_ATTRIBUTE;
- }
-
- public XSAttributeDecl getAttribute() { return (XSAttributeDecl)super._get(); }
- }
-
- public static class IdentityConstraint extends DelayedRef implements Ref.IdentityConstraint {
- public IdentityConstraint( PatcherManager manager, Locator loc, SchemaImpl schema, UName name ) {
- super(manager,loc,schema,name);
- }
- protected Object resolveReference( UName name ) {
- return super.schema.getIdentityConstraint(
- name.getNamespaceURI(),
- name.getName());
- }
-
- protected String getErrorProperty() {
- return Messages.ERR_UNDEFINED_IDENTITY_CONSTRAINT;
- }
-
- public XSIdentityConstraint get() { return (XSIdentityConstraint)super._get(); }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages.java
deleted file mode 100644
index 662d5cf4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.xsom.impl.parser;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-public class Messages
-{
- /** Loads a string resource and formats it with specified arguments. */
- public static String format( String property, Object... args ) {
- String text = ResourceBundle.getBundle(
- Messages.class.getName()).getString(property);
- return MessageFormat.format(text,args);
- }
-
-//
-//
-// Message resources
-//
-//
- public static final String ERR_UNDEFINED_SIMPLETYPE =
- "UndefinedSimpleType"; // arg:1
- public static final String ERR_UNDEFINED_COMPLEXTYPE =
- "UndefinedCompplexType"; // arg:1
- public static final String ERR_UNDEFINED_TYPE =
- "UndefinedType"; // arg:1
- public static final String ERR_UNDEFINED_ELEMENT =
- "UndefinedElement"; // arg:1
- public static final String ERR_UNDEFINED_MODELGROUP =
- "UndefinedModelGroup"; // arg:1
- public static final String ERR_UNDEFINED_ATTRIBUTE =
- "UndefinedAttribute"; // arg:1
- public static final String ERR_UNDEFINED_ATTRIBUTEGROUP =
- "UndefinedAttributeGroup"; // arg:1
- public static final String ERR_UNDEFINED_IDENTITY_CONSTRAINT =
- "UndefinedIdentityConstraint"; // arg:1
- public static final String ERR_UNDEFINED_PREFIX =
- "UndefinedPrefix"; // arg:1
-
- public static final String ERR_DOUBLE_DEFINITION =
- "DoubleDefinition"; // arg:1
- public static final String ERR_DOUBLE_DEFINITION_ORIGINAL =
- "DoubleDefinition.Original"; // arg:0
-
- public static final String ERR_MISSING_SCHEMALOCATION =
- "MissingSchemaLocation"; // arg:0
-
- public static final String ERR_ENTITY_RESOLUTION_FAILURE =
- "EntityResolutionFailure"; // arg:2
-
- public static final String ERR_SIMPLE_CONTENT_EXPECTED =
- "SimpleContentExpected"; // arg:2
-
- public static final String JAXP_UNSUPPORTED_PROPERTY =
- "JAXPUnsupportedProperty"; // arg:1
-
- public static final String JAXP_SUPPORTED_PROPERTY =
- "JAXPSupportedProperty"; // arg:1
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages.properties b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages.properties
deleted file mode 100644
index ed0a876f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages.properties
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-UndefinedSimpleType = \
- undefined simple type ''{0}''
-
-UndefinedCompplexType = \
- undefined complex type ''{0}''
-
-UndefinedType = \
- undefined simple or complex type ''{0}''
-
-UndefinedElement = \
- undefined element declaration ''{0}''
-
-UndefinedModelGroup = \
- undefined model group ''{0}''
-
-UndefinedAttribute = \
- undefined attribute ''{0}''
-
-UndefinedAttributeGroup = \
- undefined attribute group ''{0}''
-
-UndefinedIdentityConstraint = \
- undefined identity constraint ''{0}''
-
-UndefinedPrefix = \
- unbounded prefix ''{0}''
-
-UnexpectedTargetnamespace.Include = \
- the target namespace of the included schema "{0}" doesn''t agree with the expected value "{1}"
-
-UnexpectedTargetnamespace.Import = \
- the target namespace of the imported schema "{0}" doesn''t agree with the expected value "{1}"
-
-DoubleDefinition = \
- ''{0}'' is already defined
-
-DoubleDefinition.Original = \
- (related to above error) the first definition appears here
-
-MissingSchemaLocation = \
- a "schemaLocation" attribute is required
-
-EntityResolutionFailure = \
- failed to retrieve ''{0}'': {1}
-
-SimpleContentExpected = \
- A complex type with a simple content or a simple type is expected but found ''{0}'':{1}
-
-JAXPUnsupportedProperty = \
- Property "{0}" is not supported by used JAXP implementation.
-
-JAXPSupportedProperty = \
- Property "{0}" is supported and has been successfuly set by used JAXP implementation.
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages_ja.properties b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages_ja.properties
deleted file mode 100644
index 3ea6ecc7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Messages_ja.properties
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-UndefinedSimpleType = \
- \u672a\u5b9a\u7fa9\u306e\u30b7\u30f3\u30d7\u30eb\u30bf\u30a4\u30d7''{0}''\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059
-
-UndefinedCompplexType = \
- \u672a\u5b9a\u7fa9\u306e\u30b3\u30f3\u30d7\u30ec\u30c3\u30af\u30b9\u30bf\u30a4\u30d7''{0}''\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059
-
-UndefinedType = \
- \u672a\u5b9a\u7fa9\u306e\u578b''{0}''\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059
-
-UndefinedElement = \
- \u672a\u5b9a\u7fa9\u306e\u8981\u7d20''{0}''\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059
-
-UndefinedModelGroup = \
- \u672a\u5b9a\u7fa9\u306e\u30e2\u30c7\u30eb\u30b0\u30eb\u30fc\u30d7''{0}''\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059
-
-UndefinedAttribute = \
- \u672a\u5b9a\u7fa9\u306e\u5c5e\u6027''{0}''\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059
-
-UndefinedAttributeGroup = \
- \u672a\u5b9a\u7fa9\u306e\u5c5e\u6027\u30b0\u30eb\u30fc\u30d7''{0}''\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059
-
-UndefinedIdentityConstraint = \
- \u672a\u5b9a\u7fa9\u306e\u4e00\u610f\u6027\u5236\u7d04''{0}''\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059
-
-UndefinedPrefix = \
- xmlns\u5ba3\u8a00\u306e\u3055\u308c\u3066\u3044\u306a\u3044\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9''{0}''\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059
-
-UnexpectedTargetnamespace.Include = \
- include\u3057\u305f\u5074\u3068\u3055\u308c\u305f\u5074\u306etargetNamespace\u5c5e\u6027\u306e\u5024\u304c\u98df\u3044\u9055\u3063\u3066\u3044\u307e\u3059({0}\u3068{1})
-
-UnexpectedTargetnamespace.Import = \
- import\u3057\u305f\u5074\u3068\u3055\u308c\u305f\u5074\u306etargetNamespace\u5c5e\u6027\u306e\u5024\u304c\u98df\u3044\u9055\u3063\u3066\u3044\u307e\u3059({0}\u3068{1})
-
-DoubleDefinition = \
- ''{0}''\u306f\u65e2\u306b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059
-
-DoubleDefinition.Original = \
- \uff08\u4e0a\u306e\u30a8\u30e9\u30fc\u306b\u95a2\u9023\uff09\u5143\u3005\u306e\u5b9a\u7fa9\u306f\u3053\u3053\u3067\u884c\u308f\u308c\u3066\u3044\u307e\u3059
-
-MissingSchemaLocation = \
- schemaLocation\u5c5e\u6027\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-
-EntityResolutionFailure = \
- ''{0}''\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093: {1}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java
deleted file mode 100644
index 41f64cee..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser;
-
-import com.sun.xml.internal.xsom.XSDeclaration;
-import com.sun.xml.internal.xsom.XmlString;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.impl.ForeignAttributesImpl;
-import com.sun.xml.internal.xsom.impl.SchemaImpl;
-import com.sun.xml.internal.xsom.impl.UName;
-import com.sun.xml.internal.xsom.impl.Const;
-import com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime;
-import com.sun.xml.internal.xsom.impl.parser.state.Schema;
-import com.sun.xml.internal.xsom.impl.util.Uri;
-import com.sun.xml.internal.xsom.parser.AnnotationParser;
-import org.relaxng.datatype.ValidationContext;
-import org.xml.sax.Attributes;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.LocatorImpl;
-
-import java.io.IOException;
-import java.net.URI;
-import java.text.MessageFormat;
-import java.util.Stack;
-
-/**
- * NGCCRuntime extended with various utility methods for
- * parsing XML Schema.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class NGCCRuntimeEx extends NGCCRuntime implements PatcherManager {
-
- /** coordinator. */
- public final ParserContext parser;
-
- /** The schema currently being parsed. */
- public SchemaImpl currentSchema;
-
- /** The @finalDefault value of the current schema. */
- public int finalDefault = 0;
- /** The @blockDefault value of the current schema. */
- public int blockDefault = 0;
-
- /**
- * The @elementFormDefault value of the current schema.
- * True if local elements are qualified by default.
- */
- public boolean elementFormDefault = false;
-
- /**
- * The @attributeFormDefault value of the current schema.
- * True if local attributes are qualified by default.
- */
- public boolean attributeFormDefault = false;
-
- /**
- * True if the current schema is in a chameleon mode.
- * This changes the way QNames are interpreted.
- *
- * Life is very miserable with XML Schema, as you see.
- */
- public boolean chameleonMode = false;
-
- /**
- * URI that identifies the schema document.
- * Maybe null if the system ID is not available.
- */
- private String documentSystemId;
-
- /**
- * Keep the local name of elements encountered so far.
- * This information is passed to AnnotationParser as
- * context information
- */
- private final Stack<String> elementNames = new Stack<String>();
-
- /**
- * Points to the schema document (the parser of it) that included/imported
- * this schema.
- */
- private final NGCCRuntimeEx referer;
-
- /**
- * Points to the {@link SchemaDocumentImpl} that represents the
- * schema document being parsed.
- */
- public SchemaDocumentImpl document;
-
- NGCCRuntimeEx( ParserContext _parser ) {
- this(_parser,false,null);
- }
-
- private NGCCRuntimeEx( ParserContext _parser, boolean chameleonMode, NGCCRuntimeEx referer ) {
- this.parser = _parser;
- this.chameleonMode = chameleonMode;
- this.referer = referer;
-
- // set up the default namespace binding
- currentContext = new Context("","",null);
- currentContext = new Context("xml","http://www.w3.org/XML/1998/namespace",currentContext);
- }
-
- public void checkDoubleDefError( XSDeclaration c ) throws SAXException {
- if(c==null || ignorableDuplicateComponent(c)) return;
-
- reportError( Messages.format(Messages.ERR_DOUBLE_DEFINITION,c.getName()) );
- reportError( Messages.format(Messages.ERR_DOUBLE_DEFINITION_ORIGINAL), c.getLocator() );
- }
-
- public static boolean ignorableDuplicateComponent(XSDeclaration c) {
- if(c.getTargetNamespace().equals(Const.schemaNamespace)) {
- if(c instanceof XSSimpleType)
- // hide artificial "double definitions" on simple types
- return true;
- if(c.isGlobal() && c.getName().equals("anyType"))
- return true; // ditto for anyType
- }
- return false;
- }
-
-
-
- /* registers a patcher that will run after all the parsing has finished. */
- public void addPatcher( Patch patcher ) {
- parser.patcherManager.addPatcher(patcher);
- }
- public void addErrorChecker( Patch patcher ) {
- parser.patcherManager.addErrorChecker(patcher);
- }
- public void reportError( String msg, Locator loc ) throws SAXException {
- parser.patcherManager.reportError(msg,loc);
- }
- public void reportError( String msg ) throws SAXException {
- reportError(msg,getLocator());
- }
-
-
- /**
- * Resolves relative URI found in the document.
- *
- * @param namespaceURI
- * passed to the entity resolver.
- * @param relativeUri
- * value of the schemaLocation attribute. Can be null.
- *
- * @return
- * non-null if {@link EntityResolver} returned an {@link InputSource},
- * or if the relativeUri parameter seems to be pointing to something.
- * Otherwise it returns null, in which case import/include should be abandoned.
- */
- private InputSource resolveRelativeURL( String namespaceURI, String relativeUri ) throws SAXException {
- try {
- String baseUri = getLocator().getSystemId();
- if(baseUri==null)
- // if the base URI is not available, the document system ID is
- // better than nothing.
- baseUri=documentSystemId;
-
- EntityResolver er = parser.getEntityResolver();
- String systemId = null;
-
- if (relativeUri!=null)
- systemId = Uri.resolve(baseUri,relativeUri);
-
- if (er!=null) {
- InputSource is = er.resolveEntity(namespaceURI,systemId);
- if (is == null) {
- try {
- String normalizedSystemId = URI.create(systemId).normalize().toASCIIString();
- is = er.resolveEntity(namespaceURI,normalizedSystemId);
- } catch (Exception e) {
- // just ignore, this is a second try, return the fallback if this breaks
- }
- }
- if (is != null) {
- return is;
- }
- }
-
- if (systemId!=null)
- return new InputSource(systemId);
- else
- return null;
- } catch (IOException e) {
- SAXParseException se = new SAXParseException(e.getMessage(),getLocator(),e);
- parser.errorHandler.error(se);
- return null;
- }
- }
-
- /** Includes the specified schema. */
- public void includeSchema( String schemaLocation ) throws SAXException {
- NGCCRuntimeEx runtime = new NGCCRuntimeEx(parser,chameleonMode,this);
- runtime.currentSchema = this.currentSchema;
- runtime.blockDefault = this.blockDefault;
- runtime.finalDefault = this.finalDefault;
-
- if( schemaLocation==null ) {
- SAXParseException e = new SAXParseException(
- Messages.format( Messages.ERR_MISSING_SCHEMALOCATION ), getLocator() );
- parser.errorHandler.fatalError(e);
- throw e;
- }
-
- runtime.parseEntity( resolveRelativeURL(null,schemaLocation),
- true, currentSchema.getTargetNamespace(), getLocator() );
- }
-
- /** Imports the specified schema. */
- public void importSchema( String ns, String schemaLocation ) throws SAXException {
- NGCCRuntimeEx newRuntime = new NGCCRuntimeEx(parser,false,this);
- InputSource source = resolveRelativeURL(ns,schemaLocation);
- if(source!=null)
- newRuntime.parseEntity( source, false, ns, getLocator() );
- // if source == null,
- // we can't locate this document. Let's just hope that
- // we already have the schema components for this schema
- // or we will receive them in the future.
- }
-
- /**
- * Called when a new document is being parsed and checks
- * if the document has already been parsed before.
- *
- * <p>
- * Used to avoid recursive inclusion. Note that the same
- * document will be parsed multiple times if they are for different
- * target namespaces.
- *
- * <h2>Document Graph Model</h2>
- * <p>
- * The challenge we are facing here is that you have a graph of
- * documents that reference each other. Each document has an unique
- * URI to identify themselves, and references are done by using those.
- * The graph may contain cycles.
- *
- * <p>
- * Our goal here is to parse all the documents in the graph, without
- * parsing the same document twice. This method implements this check.
- *
- * <p>
- * One complication is the chameleon schema; a document can be parsed
- * multiple times if they are under different target namespaces.
- *
- * <p>
- * Also, note that when you resolve relative URIs in the @schemaLocation,
- * their base URI is *NOT* the URI of the document.
- *
- * @return true if the document has already been processed and thus
- * needs to be skipped.
- */
- public boolean hasAlreadyBeenRead() {
- if( documentSystemId!=null ) {
- if( documentSystemId.startsWith("file:///") )
- // change file:///abc to file:/abc
- // JDK File.toURL method produces the latter, but according to RFC
- // I don't think that's a valid URL. Since two different ways of
- // producing URLs could produce those two different forms,
- // we need to canonicalize one to the other.
- documentSystemId = "file:/"+documentSystemId.substring(8);
- } else {
- // if the system Id is not provided, we can't test the identity,
- // so we have no choice but to read it.
- // the newly created SchemaDocumentImpl will be unique one
- }
-
- assert document ==null;
- document = new SchemaDocumentImpl( currentSchema, documentSystemId );
-
- SchemaDocumentImpl existing = parser.parsedDocuments.get(document);
- if(existing==null) {
- parser.parsedDocuments.put(document,document);
- } else {
- document = existing;
- }
-
- assert document !=null;
-
- if(referer!=null) {
- assert referer.document !=null : "referer "+referer.documentSystemId+" has docIdentity==null";
- referer.document.references.add(this.document);
- this.document.referers.add(referer.document);
- }
-
- return existing!=null;
- }
-
- /**
- * Parses the specified entity.
- *
- * @param importLocation
- * The source location of the import/include statement.
- * Used for reporting errors.
- */
- public void parseEntity( InputSource source, boolean includeMode, String expectedNamespace, Locator importLocation )
- throws SAXException {
-
- documentSystemId = source.getSystemId();
- try {
- Schema s = new Schema(this,includeMode,expectedNamespace);
- setRootHandler(s);
- try {
- parser.parser.parse(source,this, getErrorHandler(), parser.getEntityResolver());
- } catch( IOException fnfe ) {
- SAXParseException se = new SAXParseException(fnfe.toString(), importLocation, fnfe);
- parser.errorHandler.warning(se);
- }
- } catch( SAXException e ) {
- parser.setErrorFlag();
- throw e;
- }
- }
-
- /**
- * Creates a new instance of annotation parser.
- */
- public AnnotationParser createAnnotationParser() {
- if(parser.getAnnotationParserFactory()==null)
- return DefaultAnnotationParser.theInstance;
- else
- return parser.getAnnotationParserFactory().create();
- }
-
- /**
- * Gets the element name that contains the annotation element.
- * This method works correctly only when called by the annotation handler.
- */
- public String getAnnotationContextElementName() {
- return elementNames.get( elementNames.size()-2 );
- }
-
- /** Creates a copy of the current locator object. */
- public Locator copyLocator() {
- return new LocatorImpl(getLocator());
- }
-
- public ErrorHandler getErrorHandler() {
- return parser.errorHandler;
- }
-
- @Override
- public void onEnterElementConsumed(String uri, String localName, String qname, Attributes atts)
- throws SAXException {
- super.onEnterElementConsumed(uri, localName, qname, atts);
- elementNames.push(localName);
- }
-
- @Override
- public void onLeaveElementConsumed(String uri, String localName, String qname) throws SAXException {
- super.onLeaveElementConsumed(uri, localName, qname);
- elementNames.pop();
- }
-
-
-
-//
-//
-// ValidationContext implementation
-//
-//
- // this object lives longer than the parser itself,
- // so it's important for this object not to have any reference
- // to the parser.
- private static class Context implements ValidationContext {
- Context( String _prefix, String _uri, Context _context ) {
- this.previous = _context;
- this.prefix = _prefix;
- this.uri = _uri;
- }
-
- public String resolveNamespacePrefix(String p) {
- if(p.equals(prefix)) return uri;
- if(previous==null) return null;
- else return previous.resolveNamespacePrefix(p);
- }
-
- private final String prefix;
- private final String uri;
- private final Context previous;
-
- // XSDLib don't use those methods, so we cut a corner here.
- public String getBaseUri() { return null; }
- public boolean isNotation(String arg0) { return false; }
- public boolean isUnparsedEntity(String arg0) { return false; }
- }
-
- private Context currentContext=null;
-
- /** Returns an immutable snapshot of the current context. */
- public ValidationContext createValidationContext() {
- return currentContext;
- }
-
- public XmlString createXmlString(String value) {
- if(value==null) return null;
- else return new XmlString(value,createValidationContext());
- }
-
- @Override
- public void startPrefixMapping( String prefix, String uri ) throws SAXException {
- super.startPrefixMapping(prefix,uri);
- currentContext = new Context(prefix,uri,currentContext);
- }
- @Override
- public void endPrefixMapping( String prefix ) throws SAXException {
- super.endPrefixMapping(prefix);
- currentContext = currentContext.previous;
- }
-
-
-
-
-
-//
-//
-// Utility functions
-//
-//
-
-
- /** Parses UName under the given context. */
- public UName parseUName( String qname ) throws SAXException {
- int idx = qname.indexOf(':');
- if(idx<0) {
- String uri = resolveNamespacePrefix("");
-
- // chamelon behavior. ugly...
- if( uri.equals("") && chameleonMode )
- uri = currentSchema.getTargetNamespace();
-
- // this is guaranteed to resolve
- return new UName(uri,qname,qname);
- } else {
- String prefix = qname.substring(0,idx);
- String uri = currentContext.resolveNamespacePrefix(prefix);
- if(uri==null) {
- // prefix failed to resolve.
- reportError(Messages.format(
- Messages.ERR_UNDEFINED_PREFIX,prefix));
- uri="undefined"; // replace with a dummy
- }
- return new UName( uri, qname.substring(idx+1), qname );
- }
- }
-
- public boolean parseBoolean(String v) {
- if(v==null) return false;
- v=v.trim();
- return v.equals("true") || v.equals("1");
- }
-
-
- @Override
- protected void unexpectedX(String token) throws SAXException {
- SAXParseException e = new SAXParseException(MessageFormat.format(
- "Unexpected {0} appears at line {1} column {2}",
- token,
- getLocator().getLineNumber(),
- getLocator().getColumnNumber()),
- getLocator());
-
- parser.errorHandler.fatalError(e);
- throw e; // we will abort anyway
- }
-
- public ForeignAttributesImpl parseForeignAttributes( ForeignAttributesImpl next ) {
- ForeignAttributesImpl impl = new ForeignAttributesImpl(createValidationContext(),copyLocator(),next);
-
- Attributes atts = getCurrentAttributes();
- for( int i=0; i<atts.getLength(); i++ ) {
- if(atts.getURI(i).length()>0) {
- impl.addAttribute(
- atts.getURI(i),
- atts.getLocalName(i),
- atts.getQName(i),
- atts.getType(i),
- atts.getValue(i)
- );
- }
- }
-
- return impl;
- }
-
-
- public static final String XMLSchemaNSURI = "http://www.w3.org/2001/XMLSchema";
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/ParserContext.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/ParserContext.java
deleted file mode 100644
index 6eec5c54..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/ParserContext.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser;
-
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.impl.ElementDecl;
-import com.sun.xml.internal.xsom.impl.SchemaImpl;
-import com.sun.xml.internal.xsom.impl.SchemaSetImpl;
-import com.sun.xml.internal.xsom.parser.AnnotationParserFactory;
-import com.sun.xml.internal.xsom.parser.XMLParser;
-import com.sun.xml.internal.xsom.parser.XSOMParser;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Vector;
-
-/**
- * Provides context information to be used by {@link NGCCRuntimeEx}s.
- *
- * <p>
- * This class does the actual processing for {@link XSOMParser},
- * but to hide the details from the public API, this class in
- * a different package.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class ParserContext {
-
- /** SchemaSet to which a newly parsed schema is put in. */
- public final SchemaSetImpl schemaSet = new SchemaSetImpl();
-
- private final XSOMParser owner;
-
- final XMLParser parser;
-
-
- private final Vector<Patch> patchers = new Vector<Patch>();
- private final Vector<Patch> errorCheckers = new Vector<Patch>();
-
- /**
- * Documents that are parsed already. Used to avoid cyclic inclusion/double
- * inclusion of schemas. Set of {@link SchemaDocumentImpl}s.
- *
- * The actual data structure is map from {@link SchemaDocumentImpl} to itself,
- * so that we can access the {@link SchemaDocumentImpl} itself.
- */
- public final Map<SchemaDocumentImpl, SchemaDocumentImpl> parsedDocuments = new HashMap<SchemaDocumentImpl, SchemaDocumentImpl>();
-
-
- public ParserContext( XSOMParser owner, XMLParser parser ) {
- this.owner = owner;
- this.parser = parser;
-
- try {
- parse(new InputSource(ParserContext.class.getResource("datatypes.xsd").toExternalForm()));
-
- SchemaImpl xs = (SchemaImpl)
- schemaSet.getSchema("http://www.w3.org/2001/XMLSchema");
- xs.addSimpleType(schemaSet.anySimpleType,true);
- xs.addComplexType(schemaSet.anyType,true);
- } catch( SAXException e ) {
- // this must be a bug of XSOM
- if(e.getException()!=null)
- e.getException().printStackTrace();
- else
- e.printStackTrace();
- throw new InternalError();
- }
- }
-
- public EntityResolver getEntityResolver() {
- return owner.getEntityResolver();
- }
-
- public AnnotationParserFactory getAnnotationParserFactory() {
- return owner.getAnnotationParserFactory();
- }
-
- /**
- * Parses a new XML Schema document.
- */
- public void parse( InputSource source ) throws SAXException {
- newNGCCRuntime().parseEntity(source,false,null,null);
- }
-
-
- public XSSchemaSet getResult() throws SAXException {
- // run all the patchers
- for (Patch patcher : patchers)
- patcher.run();
- patchers.clear();
-
- // build the element substitutability map
- Iterator itr = schemaSet.iterateElementDecls();
- while(itr.hasNext())
- ((ElementDecl)itr.next()).updateSubstitutabilityMap();
-
- // run all the error checkers
- for (Patch patcher : errorCheckers)
- patcher.run();
- errorCheckers.clear();
-
-
- if(hadError) return null;
- else return schemaSet;
- }
-
- public NGCCRuntimeEx newNGCCRuntime() {
- return new NGCCRuntimeEx(this);
- }
-
-
-
- /** Once an error is detected, this flag is set to true. */
- private boolean hadError = false;
-
- /** Turns on the error flag. */
- void setErrorFlag() { hadError=true; }
-
- /**
- * PatchManager implementation, which is accessible only from
- * NGCCRuntimEx.
- */
- final PatcherManager patcherManager = new PatcherManager() {
- public void addPatcher( Patch patch ) {
- patchers.add(patch);
- }
- public void addErrorChecker( Patch patch ) {
- errorCheckers.add(patch);
- }
- public void reportError( String msg, Locator src ) throws SAXException {
- // set a flag to true to avoid returning a corrupted object.
- setErrorFlag();
-
- SAXParseException e = new SAXParseException(msg,src);
- if(errorHandler==null)
- throw e;
- else
- errorHandler.error(e);
- }
- };
-
- /**
- * ErrorHandler proxy to turn on the hadError flag when an error
- * is found.
- */
- final ErrorHandler errorHandler = new ErrorHandler() {
- private ErrorHandler getErrorHandler() {
- if( owner.getErrorHandler()==null )
- return noopHandler;
- else
- return owner.getErrorHandler();
- }
-
- public void warning(SAXParseException e) throws SAXException {
- getErrorHandler().warning(e);
- }
-
- public void error(SAXParseException e) throws SAXException {
- setErrorFlag();
- getErrorHandler().error(e);
- }
-
- public void fatalError(SAXParseException e) throws SAXException {
- setErrorFlag();
- getErrorHandler().fatalError(e);
- }
- };
-
- /**
- * {@link ErrorHandler} that does nothing.
- */
- final ErrorHandler noopHandler = new ErrorHandler() {
- public void warning(SAXParseException e) {
- }
- public void error(SAXParseException e) {
- }
- public void fatalError(SAXParseException e) {
- setErrorFlag();
- }
- };
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Patch.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Patch.java
deleted file mode 100644
index 75728b82..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/Patch.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser;
-
-import org.xml.sax.SAXException;
-
-/**
- * Patch program that runs later to "fix" references among components.
- *
- * The only difference from the Runnable interface is that this interface
- * allows the program to throw a SAXException.
- */
-public interface Patch {
- void run() throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/PatcherManager.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/PatcherManager.java
deleted file mode 100644
index dfb4d8e4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/PatcherManager.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser;
-
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-
-/**
- * Manages patchers.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public interface PatcherManager {
- void addPatcher( Patch p );
- void addErrorChecker( Patch p );
- /**
- * Reports an error during the parsing.
- *
- * @param source
- * location of the error in the source file, or null if
- * it's unavailable.
- */
- void reportError( String message, Locator source ) throws SAXException;
-
-
- public interface Patcher {
- void run() throws SAXException;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/SAXParserFactoryAdaptor.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/SAXParserFactoryAdaptor.java
deleted file mode 100644
index 7f36e45d..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/SAXParserFactoryAdaptor.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser;
-
-import com.sun.xml.internal.xsom.parser.XMLParser;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLFilterImpl;
-import org.xml.sax.helpers.XMLReaderAdapter;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import java.io.IOException;
-
-
-/**
- * {@link SAXParserFactory} implementation that ultimately
- * uses {@link XMLParser} to parse documents.
- *
- * @deprecated
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class SAXParserFactoryAdaptor extends SAXParserFactory {
-
- private final XMLParser parser;
-
- public SAXParserFactoryAdaptor( XMLParser _parser ) {
- this.parser = _parser;
- }
-
- public SAXParser newSAXParser() throws ParserConfigurationException, SAXException {
- return new SAXParserImpl();
- }
-
- public void setFeature(String name, boolean value) {
- throw new UnsupportedOperationException("XSOM parser does not support JAXP features.");
- }
-
- public boolean getFeature(String name) {
- return false;
- }
-
- private class SAXParserImpl extends SAXParser
- {
- private final XMLReaderImpl reader = new XMLReaderImpl();
-
- /**
- * @deprecated
- */
- public org.xml.sax.Parser getParser() throws SAXException {
- return new XMLReaderAdapter(reader);
- }
-
- public XMLReader getXMLReader() throws SAXException {
- return reader;
- }
-
- public boolean isNamespaceAware() {
- return true;
- }
-
- public boolean isValidating() {
- return false;
- }
-
- public void setProperty(String name, Object value) {
- }
-
- public Object getProperty(String name) {
- return null;
- }
- }
-
- private class XMLReaderImpl extends XMLFilterImpl
- {
- public void parse(InputSource input) throws IOException, SAXException {
- parser.parse(input,this,this,this);
- }
-
- public void parse(String systemId) throws IOException, SAXException {
- parser.parse(new InputSource(systemId),this,this,this);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/SchemaDocumentImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/SchemaDocumentImpl.java
deleted file mode 100644
index 8e0aa8e8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/SchemaDocumentImpl.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser;
-
-import com.sun.xml.internal.xsom.impl.SchemaImpl;
-import com.sun.xml.internal.xsom.parser.SchemaDocument;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * {@link SchemaDocument} implementation.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class SchemaDocumentImpl implements SchemaDocument
-{
- private final SchemaImpl schema;
-
- /**
- * URI of the schema document to be parsed. Can be null.
- */
- private final String schemaDocumentURI;
-
- /**
- * {@link SchemaDocumentImpl}s that are referenced from this document.
- */
- final Set<SchemaDocumentImpl> references = new HashSet<SchemaDocumentImpl>();
-
- /**
- * {@link SchemaDocumentImpl}s that are referencing this document.
- */
- final Set<SchemaDocumentImpl> referers = new HashSet<SchemaDocumentImpl>();
-
- protected SchemaDocumentImpl(SchemaImpl schema, String _schemaDocumentURI) {
- this.schema = schema;
- this.schemaDocumentURI = _schemaDocumentURI;
- }
-
- public String getSystemId() {
- return schemaDocumentURI;
- }
-
- public String getTargetNamespace() {
- return schema.getTargetNamespace();
- }
-
- public SchemaImpl getSchema() {
- return schema;
- }
-
- public Set<SchemaDocument> getReferencedDocuments() {
- return Collections.<SchemaDocument>unmodifiableSet(references);
- }
-
- public Set<SchemaDocument> getIncludedDocuments() {
- return getImportedDocuments(this.getTargetNamespace());
- }
-
- public Set<SchemaDocument> getImportedDocuments(String targetNamespace) {
- if(targetNamespace==null)
- throw new IllegalArgumentException();
- Set<SchemaDocument> r = new HashSet<SchemaDocument>();
- for (SchemaDocumentImpl doc : references) {
- if(doc.getTargetNamespace().equals(targetNamespace))
- r.add(doc);
- }
- return Collections.unmodifiableSet(r);
- }
-
- public boolean includes(SchemaDocument doc) {
- if(!references.contains(doc))
- return false;
- return doc.getSchema()==schema;
- }
-
- public boolean imports(SchemaDocument doc) {
- if(!references.contains(doc))
- return false;
- return doc.getSchema()!=schema;
- }
-
- public Set<SchemaDocument> getReferers() {
- return Collections.<SchemaDocument>unmodifiableSet(referers);
- }
-
- @Override
- public boolean equals(Object o) {
- SchemaDocumentImpl rhs = (SchemaDocumentImpl) o;
-
- if( this.schemaDocumentURI==null || rhs.schemaDocumentURI==null)
- return this==rhs;
- if(!schemaDocumentURI.equals(rhs.schemaDocumentURI) )
- return false;
- return this.schema==rhs.schema;
- }
-
- @Override
- public int hashCode() {
- if (schemaDocumentURI==null)
- return super.hashCode();
- if (schema == null) {
- return schemaDocumentURI.hashCode();
- }
- return schemaDocumentURI.hashCode()^this.schema.hashCode();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/SubstGroupBaseTypeRef.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/SubstGroupBaseTypeRef.java
deleted file mode 100644
index c304e728..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/SubstGroupBaseTypeRef.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser;
-
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.impl.Ref;
-
-/**
- *
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class SubstGroupBaseTypeRef implements Ref.Type {
- private final Ref.Element e;
-
- public SubstGroupBaseTypeRef( Ref.Element _e ) {
- this.e = _e;
- }
-
- public XSType getType() {
- return e.get().getType();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/datatypes.xsd b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/datatypes.xsd
deleted file mode 100644
index f4024c58..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/datatypes.xsd
+++ /dev/null
@@ -1,364 +0,0 @@
-<?xml version='1.0'?>
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<!-- XML Schema schema for XML Schemas: Part 2: Datatypes -->
-<!--
- This file is fed to XSOM to build schema components for built-in datatypes.
- This file is *NOT* for validating the source schema files.
--->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.w3.org/2001/XMLSchema"
- version="Id: datatypes.xsd,v 1.52 2001/04/27 11:49:21 ht Exp "
- elementFormDefault="qualified"
- blockDefault="#all"
- xml:lang="en">
-
- <xs:simpleType name="string" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="preserve" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="boolean" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="float" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="double" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="decimal" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="duration" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="dateTime" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="time" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="date" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="gYearMonth" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="gYear" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="gMonthDay" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="gDay" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="gMonth" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="hexBinary" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="base64Binary" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="anyURI" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="QName" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="NOTATION" >
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace value="collapse" fixed="true"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="normalizedString" >
- <xs:restriction base="xs:string">
- <xs:whiteSpace value="replace"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="token" >
- <xs:restriction base="xs:normalizedString">
- <xs:whiteSpace value="collapse" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="language" >
- <xs:restriction base="xs:token">
- <xs:pattern
- value="([a-zA-Z]{2}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*"
- >
- <xs:annotation>
- <xs:documentation
- source="http://www.w3.org/TR/REC-xml#NT-LanguageID">
- pattern specifies the content of section 2.12 of XML 1.0e2
- and RFC 1766
- </xs:documentation>
- </xs:annotation>
- </xs:pattern>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="IDREFS" >
- <xs:restriction>
- <xs:simpleType>
- <xs:list itemType="xs:IDREF"/>
- </xs:simpleType>
- <xs:minLength value="1" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="ENTITIES" >
- <xs:restriction>
- <xs:simpleType>
- <xs:list itemType="xs:ENTITY"/>
- </xs:simpleType>
- <xs:minLength value="1" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="NMTOKEN" >
- <xs:restriction base="xs:token">
- <xs:pattern value="\c+" >
- <xs:annotation>
- <xs:documentation
- source="http://www.w3.org/TR/REC-xml#NT-Nmtoken">
- pattern matches production 7 from the XML spec
- </xs:documentation>
- </xs:annotation>
- </xs:pattern>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="NMTOKENS" >
- <xs:restriction>
- <xs:simpleType>
- <xs:list itemType="xs:NMTOKEN"/>
- </xs:simpleType>
- <xs:minLength value="1" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="Name" >
- <xs:restriction base="xs:token">
- <xs:pattern value="\i\c*" >
- <xs:annotation>
- <xs:documentation
- source="http://www.w3.org/TR/REC-xml#NT-Name">
- pattern matches production 5 from the XML spec
- </xs:documentation>
- </xs:annotation>
- </xs:pattern>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="NCName" >
- <xs:restriction base="xs:Name">
- <xs:pattern value="[\i-[:]][\c-[:]]*" >
- <xs:annotation>
- <xs:documentation
- source="http://www.w3.org/TR/REC-xml-names/#NT-NCName">
- pattern matches production 4 from the Namespaces in XML spec
- </xs:documentation>
- </xs:annotation>
- </xs:pattern>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="ID" >
- <xs:restriction base="xs:NCName"/>
- </xs:simpleType>
-
- <xs:simpleType name="IDREF" >
- <xs:restriction base="xs:NCName"/>
- </xs:simpleType>
-
- <xs:simpleType name="ENTITY" >
- <xs:restriction base="xs:NCName"/>
- </xs:simpleType>
-
- <xs:simpleType name="integer" >
- <xs:restriction base="xs:decimal">
- <xs:fractionDigits value="0" fixed="true" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="nonPositiveInteger" >
- <xs:restriction base="xs:integer">
- <xs:maxInclusive value="0" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="negativeInteger" >
- <xs:restriction base="xs:nonPositiveInteger">
- <xs:maxInclusive value="-1" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="long" >
- <xs:restriction base="xs:integer">
- <xs:minInclusive value="-9223372036854775808" />
- <xs:maxInclusive value="9223372036854775807" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="int" >
- <xs:restriction base="xs:long">
- <xs:minInclusive value="-2147483648" />
- <xs:maxInclusive value="2147483647" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="short" >
- <xs:restriction base="xs:int">
- <xs:minInclusive value="-32768" />
- <xs:maxInclusive value="32767" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="byte" >
- <xs:restriction base="xs:short">
- <xs:minInclusive value="-128" />
- <xs:maxInclusive value="127" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="nonNegativeInteger" >
- <xs:restriction base="xs:integer">
- <xs:minInclusive value="0" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="unsignedLong" >
- <xs:restriction base="xs:nonNegativeInteger">
- <xs:maxInclusive value="18446744073709551615"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="unsignedInt" >
- <xs:restriction base="xs:unsignedLong">
- <xs:maxInclusive value="4294967295"
- />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="unsignedShort" >
- <xs:restriction base="xs:unsignedInt">
- <xs:maxInclusive value="65535" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="unsignedByte" >
- <xs:restriction base="xs:unsignedShort">
- <xs:maxInclusive value="255" />
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="positiveInteger" >
- <xs:restriction base="xs:nonNegativeInteger">
- <xs:minInclusive value="1" />
- </xs:restriction>
- </xs:simpleType>
-
-
-</xs:schema>
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/package.html b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/package.html
deleted file mode 100644
index 689915da..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
-Parser that reads XML Schema documents and builds an <code>XSSchemaSet</code> object.
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/AttributesImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/AttributesImpl.java
deleted file mode 100644
index 81ab5a4b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/AttributesImpl.java
+++ /dev/null
@@ -1,626 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// AttributesImpl.java - default implementation of Attributes.
-// Written by David Megginson, sax@megginson.com
-// NO WARRANTY! This class is in the public domain.
-
-// $Id: AttributesImpl.java,v 1.4 2002/09/29 02:55:48 okajima Exp $
-
-//fixed bug at removeAttribute!! by Daisuke OKAJIMA 2002.4.21
-
-package com.sun.xml.internal.xsom.impl.parser.state;
-
-import org.xml.sax.Attributes;
-
-
-/**
- * Default implementation of the Attributes interface.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This class provides a default implementation of the SAX2
- * {@link org.xml.sax.Attributes Attributes} interface, with the
- * addition of manipulators so that the list can be modified or
- * reused.</p>
- *
- * <p>There are two typical uses of this class:</p>
- *
- * <ol>
- * <li>to take a persistent snapshot of an Attributes object
- * in a {@link org.xml.sax.ContentHandler#startElement startElement} event; or</li>
- * <li>to construct or modify an Attributes object in a SAX2 driver or filter.</li>
- * </ol>
- *
- * <p>This class replaces the now-deprecated SAX1 {@link
- * org.xml.sax.helpers.AttributeListImpl AttributeListImpl}
- * class; in addition to supporting the updated Attributes
- * interface rather than the deprecated {@link org.xml.sax.AttributeList
- * AttributeList} interface, it also includes a much more efficient
- * implementation using a single array rather than a set of Vectors.</p>
- *
- * @since SAX 2.0
- * @author David Megginson,
- * <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- */
-public class AttributesImpl implements Attributes
-{
-
-
- ////////////////////////////////////////////////////////////////////
- // Constructors.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Construct a new, empty AttributesImpl object.
- */
- public AttributesImpl ()
- {
- length = 0;
- data = null;
- }
-
-
- /**
- * Copy an existing Attributes object.
- *
- * <p>This constructor is especially useful inside a
- * {@link org.xml.sax.ContentHandler#startElement startElement} event.</p>
- *
- * @param atts The existing Attributes object.
- */
- public AttributesImpl (Attributes atts)
- {
- setAttributes(atts);
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Implementation of org.xml.sax.Attributes.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Return the number of attributes in the list.
- *
- * @return The number of attributes in the list.
- * @see org.xml.sax.Attributes#getLength
- */
- public int getLength ()
- {
- return length;
- }
-
-
- /**
- * Return an attribute's Namespace URI.
- *
- * @param index The attribute's index (zero-based).
- * @return The Namespace URI, the empty string if none is
- * available, or null if the index is out of range.
- * @see org.xml.sax.Attributes#getURI
- */
- public String getURI (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5];
- } else {
- return null;
- }
- }
-
-
- /**
- * Return an attribute's local name.
- *
- * @param index The attribute's index (zero-based).
- * @return The attribute's local name, the empty string if
- * none is available, or null if the index if out of range.
- * @see org.xml.sax.Attributes#getLocalName
- */
- public String getLocalName (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5+1];
- } else {
- return null;
- }
- }
-
-
- /**
- * Return an attribute's qualified (prefixed) name.
- *
- * @param index The attribute's index (zero-based).
- * @return The attribute's qualified name, the empty string if
- * none is available, or null if the index is out of bounds.
- * @see org.xml.sax.Attributes#getQName
- */
- public String getQName (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5+2];
- } else {
- return null;
- }
- }
-
-
- /**
- * Return an attribute's type by index.
- *
- * @param index The attribute's index (zero-based).
- * @return The attribute's type, "CDATA" if the type is unknown, or null
- * if the index is out of bounds.
- * @see org.xml.sax.Attributes#getType(int)
- */
- public String getType (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5+3];
- } else {
- return null;
- }
- }
-
-
- /**
- * Return an attribute's value by index.
- *
- * @param index The attribute's index (zero-based).
- * @return The attribute's value or null if the index is out of bounds.
- * @see org.xml.sax.Attributes#getValue(int)
- */
- public String getValue (int index)
- {
- if (index >= 0 && index < length) {
- return data[index*5+4];
- } else {
- return null;
- }
- }
-
-
- /**
- * Look up an attribute's index by Namespace name.
- *
- * <p>In many cases, it will be more efficient to look up the name once and
- * use the index query methods rather than using the name query methods
- * repeatedly.</p>
- *
- * @param uri The attribute's Namespace URI, or the empty
- * string if none is available.
- * @param localName The attribute's local name.
- * @return The attribute's index, or -1 if none matches.
- * @see org.xml.sax.Attributes#getIndex(java.lang.String,java.lang.String)
- */
- public int getIndex (String uri, String localName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i].equals(uri) && data[i+1].equals(localName)) {
- return i / 5;
- }
- }
- return -1;
- }
-
-
- /**
- * Look up an attribute's index by qualified (prefixed) name.
- *
- * @param qName The qualified name.
- * @return The attribute's index, or -1 if none matches.
- * @see org.xml.sax.Attributes#getIndex(java.lang.String)
- */
- public int getIndex (String qName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i+2].equals(qName)) {
- return i / 5;
- }
- }
- return -1;
- }
-
-
- /**
- * Look up an attribute's type by Namespace-qualified name.
- *
- * @param uri The Namespace URI, or the empty string for a name
- * with no explicit Namespace URI.
- * @param localName The local name.
- * @return The attribute's type, or null if there is no
- * matching attribute.
- * @see org.xml.sax.Attributes#getType(java.lang.String,java.lang.String)
- */
- public String getType (String uri, String localName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i].equals(uri) && data[i+1].equals(localName)) {
- return data[i+3];
- }
- }
- return null;
- }
-
-
- /**
- * Look up an attribute's type by qualified (prefixed) name.
- *
- * @param qName The qualified name.
- * @return The attribute's type, or null if there is no
- * matching attribute.
- * @see org.xml.sax.Attributes#getType(java.lang.String)
- */
- public String getType (String qName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i+2].equals(qName)) {
- return data[i+3];
- }
- }
- return null;
- }
-
-
- /**
- * Look up an attribute's value by Namespace-qualified name.
- *
- * @param uri The Namespace URI, or the empty string for a name
- * with no explicit Namespace URI.
- * @param localName The local name.
- * @return The attribute's value, or null if there is no
- * matching attribute.
- * @see org.xml.sax.Attributes#getValue(java.lang.String,java.lang.String)
- */
- public String getValue (String uri, String localName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i].equals(uri) && data[i+1].equals(localName)) {
- return data[i+4];
- }
- }
- return null;
- }
-
-
- /**
- * Look up an attribute's value by qualified (prefixed) name.
- *
- * @param qName The qualified name.
- * @return The attribute's value, or null if there is no
- * matching attribute.
- * @see org.xml.sax.Attributes#getValue(java.lang.String)
- */
- public String getValue (String qName)
- {
- int max = length * 5;
- for (int i = 0; i < max; i += 5) {
- if (data[i+2].equals(qName)) {
- return data[i+4];
- }
- }
- return null;
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Manipulators.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Clear the attribute list for reuse.
- *
- * <p>Note that no memory is actually freed by this call:
- * the current arrays are kept so that they can be
- * reused.</p>
- */
- public void clear ()
- {
- length = 0;
- }
-
-
- /**
- * Copy an entire Attributes object.
- *
- * <p>It may be more efficient to reuse an existing object
- * rather than constantly allocating new ones.</p>
- *
- * @param atts The attributes to copy.
- */
- public void setAttributes (Attributes atts)
- {
- clear();
- length = atts.getLength();
- data = new String[length*5];
- for (int i = 0; i < length; i++) {
- data[i*5] = atts.getURI(i);
- data[i*5+1] = atts.getLocalName(i);
- data[i*5+2] = atts.getQName(i);
- data[i*5+3] = atts.getType(i);
- data[i*5+4] = atts.getValue(i);
- }
- }
-
-
- /**
- * Add an attribute to the end of the list.
- *
- * <p>For the sake of speed, this method does no checking
- * to see if the attribute is already in the list: that is
- * the responsibility of the application.</p>
- *
- * @param uri The Namespace URI, or the empty string if
- * none is available or Namespace processing is not
- * being performed.
- * @param localName The local name, or the empty string if
- * Namespace processing is not being performed.
- * @param qName The qualified (prefixed) name, or the empty string
- * if qualified names are not available.
- * @param type The attribute type as a string.
- * @param value The attribute value.
- */
- public void addAttribute (String uri, String localName, String qName,
- String type, String value)
- {
- ensureCapacity(length+1);
- data[length*5] = uri;
- data[length*5+1] = localName;
- data[length*5+2] = qName;
- data[length*5+3] = type;
- data[length*5+4] = value;
- length++;
- }
-
-
- /**
- * Set an attribute in the list.
- *
- * <p>For the sake of speed, this method does no checking
- * for name conflicts or well-formedness: such checks are the
- * responsibility of the application.</p>
- *
- * @param index The index of the attribute (zero-based).
- * @param uri The Namespace URI, or the empty string if
- * none is available or Namespace processing is not
- * being performed.
- * @param localName The local name, or the empty string if
- * Namespace processing is not being performed.
- * @param qName The qualified name, or the empty string
- * if qualified names are not available.
- * @param type The attribute type as a string.
- * @param value The attribute value.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setAttribute (int index, String uri, String localName,
- String qName, String type, String value)
- {
- if (index >= 0 && index < length) {
- data[index*5] = uri;
- data[index*5+1] = localName;
- data[index*5+2] = qName;
- data[index*5+3] = type;
- data[index*5+4] = value;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Remove an attribute from the list.
- *
- * @param index The index of the attribute (zero-based).
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void removeAttribute (int index)
- {
- if (index >= 0 && index < length) {
- if (index < length - 1) {
- System.arraycopy(data, (index+1)*5, data, index*5,
- (length-index-1)*5);
- }
- length--;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the Namespace URI of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param uri The attribute's Namespace URI, or the empty
- * string for none.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setURI (int index, String uri)
- {
- if (index >= 0 && index < length) {
- data[index*5] = uri;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the local name of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param localName The attribute's local name, or the empty
- * string for none.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setLocalName (int index, String localName)
- {
- if (index >= 0 && index < length) {
- data[index*5+1] = localName;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the qualified name of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param qName The attribute's qualified name, or the empty
- * string for none.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setQName (int index, String qName)
- {
- if (index >= 0 && index < length) {
- data[index*5+2] = qName;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the type of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param type The attribute's type.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setType (int index, String type)
- {
- if (index >= 0 && index < length) {
- data[index*5+3] = type;
- } else {
- badIndex(index);
- }
- }
-
-
- /**
- * Set the value of a specific attribute.
- *
- * @param index The index of the attribute (zero-based).
- * @param value The attribute's value.
- * @exception java.lang.ArrayIndexOutOfBoundsException When the
- * supplied index does not point to an attribute
- * in the list.
- */
- public void setValue (int index, String value)
- {
- if (index >= 0 && index < length) {
- data[index*5+4] = value;
- } else {
- badIndex(index);
- }
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal methods.
- ////////////////////////////////////////////////////////////////////
-
-
- /**
- * Ensure the internal array's capacity.
- *
- * @param n The minimum number of attributes that the array must
- * be able to hold.
- */
- private void ensureCapacity (int n)
- {
- if (n > 0 && (data == null || data.length==0)) {
- data = new String[25];
- }
-
- int max = data.length;
- if (max >= n * 5) {
- return;
- }
-
-
- while (max < n * 5) {
- max *= 2;
- }
- String newData[] = new String[max];
- System.arraycopy(data, 0, newData, 0, length*5);
- data = newData;
- }
-
-
- /**
- * Report a bad array index in a manipulator.
- *
- * @param index The index to report.
- * @exception java.lang.ArrayIndexOutOfBoundsException Always.
- */
- private void badIndex (int index)
- throws ArrayIndexOutOfBoundsException
- {
- String msg =
- "Attempt to modify attribute at illegal index: " + index;
- throw new ArrayIndexOutOfBoundsException(msg);
- }
-
-
-
- ////////////////////////////////////////////////////////////////////
- // Internal state.
- ////////////////////////////////////////////////////////////////////
-
- int length;
- String data [];
-
-}
-
-// end of AttributesImpl.java
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCEventReceiver.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCEventReceiver.java
deleted file mode 100644
index d3463f05..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCEventReceiver.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser.state;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- *
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public interface NGCCEventReceiver {
- void enterElement(String uri, String localName, String qname,Attributes atts) throws SAXException;
- void leaveElement(String uri, String localName, String qname) throws SAXException;
- void text(String value) throws SAXException;
- void enterAttribute(String uri, String localName, String qname) throws SAXException;
- void leaveAttribute(String uri, String localName, String qname) throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCEventSource.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCEventSource.java
deleted file mode 100644
index 5da41a20..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCEventSource.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser.state;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- *
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public interface NGCCEventSource {
- /**
- * Replaces an old handler with a new handler, and returns
- * ID of the EventReceiver thread.
- */
- int replace( NGCCEventReceiver _old, NGCCEventReceiver _new );
-
- /** Sends an enter element event to the specified EventReceiver thread. */
- void sendEnterElement( int receiverThreadId, String uri, String local, String qname, Attributes atts ) throws SAXException;
-
- void sendLeaveElement( int receiverThreadId, String uri, String local, String qname ) throws SAXException;
- void sendEnterAttribute( int receiverThreadId, String uri, String local, String qname ) throws SAXException;
- void sendLeaveAttribute( int receiverThreadId, String uri, String local, String qname ) throws SAXException;
- void sendText( int receiverThreadId, String value ) throws SAXException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCHandler.java
deleted file mode 100644
index 781d9a16..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCHandler.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser.state;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- *
- *
- * @version $Id: NGCCHandler.java,v 1.9 2002/09/29 02:55:48 okajima Exp $
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public abstract class NGCCHandler implements NGCCEventReceiver {
- protected NGCCHandler( NGCCEventSource source, NGCCHandler parent, int parentCookie ) {
-
- _parent = parent;
- _source = source;
- _cookie = parentCookie;
- }
-
- /**
- * Parent NGCCHandler, if any.
- * If this is the root handler, this field will be null.
- */
- protected final NGCCHandler _parent;
-
- /**
- * Event source.
- */
- protected final NGCCEventSource _source;
-
- /**
- * This method will be implemented by the generated code
- * and returns a reference to the current runtime.
- */
- protected abstract NGCCRuntime getRuntime();
-
- /**
- * Cookie assigned by the parent.
- *
- * This value will be passed to the onChildCompleted handler
- * of the parent.
- */
- protected final int _cookie;
-
- // used to copy parameters to (enter|leave)(Element|Attribute) events.
- //protected String localName,uri,qname;
-
-
- /**
- * Notifies the completion of a child object.
- *
- * @param result
- * The parsing result of the child state.
- * @param cookie
- * The cookie value passed to the child object
- * when it is created.
- * @param needAttCheck
- * This flag is true when the callee needs to call the
- * processAttribute method to check attribute transitions.
- * This flag is set to false when this method is triggered by
- * attribute transition.
- */
- protected abstract void onChildCompleted( Object result, int cookie, boolean needAttCheck ) throws SAXException;
-
-//
-//
-// spawns a new child object from event handlers.
-//
-//
- public void spawnChildFromEnterElement( NGCCEventReceiver child,
- String uri, String localname, String qname, Attributes atts) throws SAXException {
-
- int id = _source.replace(this,child);
- _source.sendEnterElement(id,uri,localname,qname,atts);
- }
- public void spawnChildFromEnterAttribute( NGCCEventReceiver child,
- String uri, String localname, String qname) throws SAXException {
-
- int id = _source.replace(this,child);
- _source.sendEnterAttribute(id,uri,localname,qname);
- }
- public void spawnChildFromLeaveElement( NGCCEventReceiver child,
- String uri, String localname, String qname) throws SAXException {
-
- int id = _source.replace(this,child);
- _source.sendLeaveElement(id,uri,localname,qname);
- }
- public void spawnChildFromLeaveAttribute( NGCCEventReceiver child,
- String uri, String localname, String qname) throws SAXException {
-
- int id = _source.replace(this,child);
- _source.sendLeaveAttribute(id,uri,localname,qname);
- }
- public void spawnChildFromText( NGCCEventReceiver child,
- String value) throws SAXException {
-
- int id = _source.replace(this,child);
- _source.sendText(id,value);
- }
-
-//
-//
-// reverts to the parent object from the child handler
-//
-//
- public void revertToParentFromEnterElement( Object result, int cookie,
- String uri,String local,String qname, Attributes atts ) throws SAXException {
-
- int id = _source.replace(this,_parent);
- _parent.onChildCompleted(result,cookie,true);
- _source.sendEnterElement(id,uri,local,qname,atts);
- }
- public void revertToParentFromLeaveElement( Object result, int cookie,
- String uri,String local,String qname ) throws SAXException {
-
- if(uri==NGCCRuntime.IMPOSSIBLE && uri==local && uri==qname && _parent==null )
- // all the handlers are properly finalized.
- // quit now, because we don't have any more NGCCHandler.
- // see the endDocument handler for detail
- return;
-
- int id = _source.replace(this,_parent);
- _parent.onChildCompleted(result,cookie,true);
- _source.sendLeaveElement(id,uri,local,qname);
- }
- public void revertToParentFromEnterAttribute( Object result, int cookie,
- String uri,String local,String qname ) throws SAXException {
-
- int id = _source.replace(this,_parent);
- _parent.onChildCompleted(result,cookie,true);
- _source.sendEnterAttribute(id,uri,local,qname);
- }
- public void revertToParentFromLeaveAttribute( Object result, int cookie,
- String uri,String local,String qname ) throws SAXException {
-
- int id = _source.replace(this,_parent);
- _parent.onChildCompleted(result,cookie,true);
- _source.sendLeaveAttribute(id,uri,local,qname);
- }
- public void revertToParentFromText( Object result, int cookie,
- String text ) throws SAXException {
-
- int id = _source.replace(this,_parent);
- _parent.onChildCompleted(result,cookie,true);
- _source.sendText(id,text);
- }
-
-
-//
-//
-// error handler
-//
-//
- public void unexpectedEnterElement(String qname) throws SAXException {
- getRuntime().unexpectedX('<'+qname+'>');
- }
- public void unexpectedLeaveElement(String qname) throws SAXException {
- getRuntime().unexpectedX("</"+qname+'>');
- }
- public void unexpectedEnterAttribute(String qname) throws SAXException {
- getRuntime().unexpectedX('@'+qname);
- }
- public void unexpectedLeaveAttribute(String qname) throws SAXException {
- getRuntime().unexpectedX("/@"+qname);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCInterleaveFilter.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCInterleaveFilter.java
deleted file mode 100644
index 4828e831..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCInterleaveFilter.java
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser.state;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- * Dispatches incoming events into sub handlers appropriately
- * so that the interleaving semantics will be correctly realized.
- *
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public abstract class NGCCInterleaveFilter implements NGCCEventSource, NGCCEventReceiver {
- protected NGCCInterleaveFilter( NGCCHandler parent, int cookie ) {
- this._parent = parent;
- this._cookie = cookie;
- }
-
- protected void setHandlers( NGCCEventReceiver[] receivers ) {
- this._receivers = receivers;
- }
-
- /** event receiverse. */
- protected NGCCEventReceiver[] _receivers;
-
- public int replace(NGCCEventReceiver oldHandler, NGCCEventReceiver newHandler) {
- for( int i=0; i<_receivers.length; i++ )
- if( _receivers[i]==oldHandler ) {
- _receivers[i]=newHandler;
- return i;
- }
- throw new InternalError(); // a bug in RelaxNGCC.
- }
-
-
- /** Parent handler. */
- private final NGCCHandler _parent;
- /** Cookie given by the parent. */
- private final int _cookie;
-
-
-
-//
-//
-// event handler
-//
-//
- /**
- * Receiver that is being locked and therefore receives all the events.
- * <pre><xmp>
- * <interleave>
- * <element name="foo"/>
- * <element name="bar">
- * <element name="foo"/>
- * </element>
- * </interlaeve>
- * </xmp></pre>
- * When processing inside the bar element, this receiver is
- * "locked" so that it can correctly receive its child foo element.
- */
- private int lockedReceiver;
- /**
- * Nest level. Lock will be release when the lockCount becomes 0.
- */
- private int lockCount=0;
-
- public void enterElement(
- String uri, String localName, String qname,Attributes atts) throws SAXException {
-
- if(isJoining) return; // ignore any token if we are joining. See joinByXXXX.
-
- if(lockCount++==0) {
- lockedReceiver = findReceiverOfElement(uri,localName);
- if(lockedReceiver==-1) {
- // we can't process this token. join.
- joinByEnterElement(null,uri,localName,qname,atts);
- return;
- }
- }
-
- _receivers[lockedReceiver].enterElement(uri,localName,qname,atts);
- }
- public void leaveElement(String uri, String localName, String qname) throws SAXException {
- if(isJoining) return; // ignore any token if we are joining. See joinByXXXX.
-
- if( lockCount-- == 0 )
- joinByLeaveElement(null,uri,localName,qname);
- else
- _receivers[lockedReceiver].leaveElement(uri,localName,qname);
- }
- public void enterAttribute(String uri, String localName, String qname) throws SAXException {
- if(isJoining) return; // ignore any token if we are joining. See joinByXXXX.
-
- if(lockCount++==0) {
- lockedReceiver = findReceiverOfAttribute(uri,localName);
- if(lockedReceiver==-1) {
- // we can't process this token. join.
- joinByEnterAttribute(null,uri,localName,qname);
- return;
- }
- }
-
- _receivers[lockedReceiver].enterAttribute(uri,localName,qname);
- }
- public void leaveAttribute(String uri, String localName, String qname) throws SAXException {
- if(isJoining) return; // ignore any token if we are joining. See joinByXXXX.
-
- if( lockCount-- == 0 )
- joinByLeaveAttribute(null,uri,localName,qname);
- else
- _receivers[lockedReceiver].leaveAttribute(uri,localName,qname);
- }
- public void text(String value) throws SAXException {
- if(isJoining) return; // ignore any token if we are joining. See joinByXXXX.
-
- if(lockCount!=0)
- _receivers[lockedReceiver].text(value);
- else {
- int receiver = findReceiverOfText();
- if(receiver!=-1) _receivers[receiver].text(value);
- else joinByText(null,value);
- }
- }
-
-
-
- /**
- * Implemented by the generated code to determine the handler
- * that can receive the given element.
- *
- * @return
- * Thread ID of the receiver that can handle this event,
- * or -1 if none.
- */
- protected abstract int findReceiverOfElement( String uri, String local );
-
- /**
- * Returns the handler that can receive the given attribute, or null.
- */
- protected abstract int findReceiverOfAttribute( String uri, String local );
-
- /**
- * Returns the handler that can receive text events, or null.
- */
- protected abstract int findReceiverOfText();
-
-
-
-
-//
-//
-// join method
-//
-//
-
-
- /**
- * Set to true when this handler is in the process of
- * joining all branches.
- */
- private boolean isJoining = false;
-
- /**
- * Joins all the child receivers.
- *
- * <p>
- * This method is called by a child receiver when it sees
- * something that it cannot handle, or by this object itself
- * when it sees an event that it can't process.
- *
- * <p>
- * This method forces children to move to its final state,
- * then revert to the parent.
- *
- * @param source
- * If this method is called by one of the child receivers,
- * the receiver object. If this method is called by itself,
- * null.
- */
- public void joinByEnterElement( NGCCEventReceiver source,
- String uri, String local, String qname, Attributes atts ) throws SAXException {
-
- if(isJoining) return; // we are already in the process of joining. ignore.
- isJoining = true;
-
- // send special token to the rest of the branches.
- // these branches don't understand this token, so they will
- // try to move to a final state and send the token back to us,
- // which this object will ignore (because isJoining==true)
- // Otherwise branches will find an error.
- for( int i=0; i<_receivers.length; i++ )
- if( _receivers[i]!=source )
- _receivers[i].enterElement(uri,local,qname,atts);
-
- // revert to the parent
- _parent._source.replace(this,_parent);
- _parent.onChildCompleted(null,_cookie,true);
- // send this event to the parent
- _parent.enterElement(uri,local,qname,atts);
- }
-
- public void joinByLeaveElement( NGCCEventReceiver source,
- String uri, String local, String qname ) throws SAXException {
-
- if(isJoining) return; // we are already in the process of joining. ignore.
- isJoining = true;
-
- // send special token to the rest of the branches.
- // these branches don't understand this token, so they will
- // try to move to a final state and send the token back to us,
- // which this object will ignore (because isJoining==true)
- // Otherwise branches will find an error.
- for( int i=0; i<_receivers.length; i++ )
- if( _receivers[i]!=source )
- _receivers[i].leaveElement(uri,local,qname);
-
- // revert to the parent
- _parent._source.replace(this,_parent);
- _parent.onChildCompleted(null,_cookie,true);
- // send this event to the parent
- _parent.leaveElement(uri,local,qname);
- }
-
- public void joinByEnterAttribute( NGCCEventReceiver source,
- String uri, String local, String qname ) throws SAXException {
-
- if(isJoining) return; // we are already in the process of joining. ignore.
- isJoining = true;
-
- // send special token to the rest of the branches.
- // these branches don't understand this token, so they will
- // try to move to a final state and send the token back to us,
- // which this object will ignore (because isJoining==true)
- // Otherwise branches will find an error.
- for( int i=0; i<_receivers.length; i++ )
- if( _receivers[i]!=source )
- _receivers[i].enterAttribute(uri,local,qname);
-
- // revert to the parent
- _parent._source.replace(this,_parent);
- _parent.onChildCompleted(null,_cookie,true);
- // send this event to the parent
- _parent.enterAttribute(uri,local,qname);
- }
-
- public void joinByLeaveAttribute( NGCCEventReceiver source,
- String uri, String local, String qname ) throws SAXException {
-
- if(isJoining) return; // we are already in the process of joining. ignore.
- isJoining = true;
-
- // send special token to the rest of the branches.
- // these branches don't understand this token, so they will
- // try to move to a final state and send the token back to us,
- // which this object will ignore (because isJoining==true)
- // Otherwise branches will find an error.
- for( int i=0; i<_receivers.length; i++ )
- if( _receivers[i]!=source )
- _receivers[i].leaveAttribute(uri,local,qname);
-
- // revert to the parent
- _parent._source.replace(this,_parent);
- _parent.onChildCompleted(null,_cookie,true);
- // send this event to the parent
- _parent.leaveAttribute(uri,local,qname);
- }
-
- public void joinByText( NGCCEventReceiver source,
- String value ) throws SAXException {
-
- if(isJoining) return; // we are already in the process of joining. ignore.
- isJoining = true;
-
- // send special token to the rest of the branches.
- // these branches don't understand this token, so they will
- // try to move to a final state and send the token back to us,
- // which this object will ignore (because isJoining==true)
- // Otherwise branches will find an error.
- for( int i=0; i<_receivers.length; i++ )
- if( _receivers[i]!=source )
- _receivers[i].text(value);
-
- // revert to the parent
- _parent._source.replace(this,_parent);
- _parent.onChildCompleted(null,_cookie,true);
- // send this event to the parent
- _parent.text(value);
- }
-
-
-
-//
-//
-// event dispatching methods
-//
-//
-
- public void sendEnterAttribute( int threadId,
- String uri, String local, String qname) throws SAXException {
-
- _receivers[threadId].enterAttribute(uri,local,qname);
- }
-
- public void sendEnterElement( int threadId,
- String uri, String local, String qname, Attributes atts) throws SAXException {
-
- _receivers[threadId].enterElement(uri,local,qname,atts);
- }
-
- public void sendLeaveAttribute( int threadId,
- String uri, String local, String qname) throws SAXException {
-
- _receivers[threadId].leaveAttribute(uri,local,qname);
- }
-
- public void sendLeaveElement( int threadId,
- String uri, String local, String qname) throws SAXException {
-
- _receivers[threadId].leaveElement(uri,local,qname);
- }
-
- public void sendText(int threadId, String value) throws SAXException {
- _receivers[threadId].text(value);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCRuntime.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCRuntime.java
deleted file mode 100644
index c489c44b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/NGCCRuntime.java
+++ /dev/null
@@ -1,555 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.parser.state;
-
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Stack;
-import java.util.StringTokenizer;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * Runtime Engine for RELAXNGCC execution.
- *
- * This class has the following functionalities:
- *
- * <ol>
- * <li>Managing a stack of NGCCHandler objects and
- * switching between them appropriately.
- *
- * <li>Keep track of all Attributes.
- *
- * <li>manage mapping between namespace URIs and prefixes.
- *
- * <li>TODO: provide support for interleaving.
- *
- * @version $Id: NGCCRuntime.java,v 1.15 2002/09/29 02:55:48 okajima Exp $
- * @author Kohsuke Kawaguchi (kk@kohsuke.org)
- */
-public class NGCCRuntime implements ContentHandler, NGCCEventSource {
-
- public NGCCRuntime() {
- reset();
- }
-
- /**
- * Sets the root handler, which will be used to parse the
- * root element.
- * <p>
- * This method can be called right after the object is created
- * or the reset method is called. You can't replace the root
- * handler while parsing is in progress.
- * <p>
- * Usually a generated class that corresponds to the &lt;start>
- * pattern will be used as the root handler, but any NGCCHandler
- * can be a root handler.
- *
- * @exception IllegalStateException
- * If this method is called but it doesn't satisfy the
- * pre-condition stated above.
- */
- public void setRootHandler( NGCCHandler rootHandler ) {
- if(currentHandler!=null)
- throw new IllegalStateException();
- currentHandler = rootHandler;
- }
-
-
- /**
- * Cleans up all the data structure so that the object can be reused later.
- * Normally, applications do not need to call this method directly,
- *
- * as the runtime resets itself after the endDocument method.
- */
- public void reset() {
- attStack.clear();
- currentAtts = null;
- currentHandler = null;
- indent=0;
- locator = null;
- namespaces.clear();
- needIndent = true;
- redirect = null;
- redirectionDepth = 0;
- text = new StringBuffer();
-
- // add a dummy attributes at the bottom as a "centinel."
- attStack.push(new AttributesImpl());
- }
-
- // current content handler can be acccessed via set/getContentHandler.
-
- private Locator locator;
- public void setDocumentLocator( Locator _loc ) { this.locator=_loc; }
- /**
- * Gets the source location of the current event.
- *
- * <p>
- * One can call this method from RelaxNGCC handlers to access
- * the line number information. Note that to
- */
- public Locator getLocator() { return locator; }
-
-
- /** stack of {@link Attributes}. */
- private final Stack attStack = new Stack();
- /** current attributes set. always equal to attStack.peek() */
- private AttributesImpl currentAtts;
-
- /**
- * Attributes that belong to the current element.
- * <p>
- * It's generally not recommended for applications to use
- * this method. RelaxNGCC internally removes processed attributes,
- * so this doesn't correctly reflect all the attributes an element
- * carries.
- */
- public Attributes getCurrentAttributes() {
- return currentAtts;
- }
-
- /** accumulated text. */
- private StringBuffer text = new StringBuffer();
-
-
-
-
- /** The current NGCCHandler. Always equals to handlerStack.peek() */
- private NGCCEventReceiver currentHandler;
-
- public int replace( NGCCEventReceiver o, NGCCEventReceiver n ) {
- if(o!=currentHandler)
- throw new IllegalStateException(); // bug of RelaxNGCC
- currentHandler = n;
-
- return 0; // we only have one thread.
- }
-
- /**
- * Processes buffered text.
- *
- * This method will be called by the start/endElement event to process
- * buffered text as a text event.
- *
- * <p>
- * Whitespace handling is a tricky business. Consider the following
- * schema fragment:
- *
- * <xmp>
- * <element name="foo">
- * <choice>
- * <element name="bar"><empty/></element>
- * <text/>
- * </choice>
- * </element>
- * </xmp>
- *
- * Assume we hit the following instance:
- * <xmp>
- * <foo> <bar/></foo>
- * </xmp>
- *
- * Then this first space needs to be ignored (for otherwise, we will
- * end up treating this space as the match to &lt;text/> and won't
- * be able to process &lt;bar>.)
- *
- * Now assume the following instance:
- * <xmp>
- * <foo/>
- * </xmp>
- *
- * This time, we need to treat this empty string as a text, for
- * otherwise we won't be able to accept this instance.
- *
- * <p>
- * This is very difficult to solve in general, but one seemingly
- * easy solution is to use the type of next event. If a text is
- * followed by a start tag, it follows from the constraint on
- * RELAX NG that that text must be either whitespaces or a match
- * to &lt;text/>.
- *
- * <p>
- * On the contrary, if a text is followed by a end tag, then it
- * cannot be whitespace unless the content model can accept empty,
- * in which case sending a text event will be harmlessly ignored
- * by the NGCCHandler.
- *
- * <p>
- * Thus this method take one parameter, which controls the
- * behavior of this method.
- *
- * <p>
- * TODO: according to the constraint of RELAX NG, if characters
- * follow an end tag, then they must be either whitespaces or
- * must match to &lt;text/>.
- *
- * @param possiblyWhitespace
- * True if the buffered character can be ignorabale. False if
- * it needs to be consumed.
- */
- private void processPendingText(boolean ignorable) throws SAXException {
- if(ignorable && text.toString().trim().length()==0)
- ; // ignore. See the above javadoc comment for the description
- else
- currentHandler.text(text.toString()); // otherwise consume this token
-
- // truncate StringBuffer, but avoid excessive allocation.
- if(text.length()>1024) text = new StringBuffer();
- else text.setLength(0);
- }
-
- public void processList( String str ) throws SAXException {
- StringTokenizer t = new StringTokenizer(str, " \t\r\n");
- while(t.hasMoreTokens())
- currentHandler.text(t.nextToken());
- }
-
- public void startElement(String uri, String localname, String qname, Attributes atts)
- throws SAXException {
-
- if(redirect!=null) {
- redirect.startElement(uri,localname,qname,atts);
- redirectionDepth++;
- } else {
- processPendingText(true);
- // System.out.println("startElement:"+localname+"->"+_attrStack.size());
- currentHandler.enterElement(uri, localname, qname, atts);
- }
- }
-
- /**
- * Called by the generated handler code when an enter element
- * event is consumed.
- *
- * <p>
- * Pushes a new attribute set.
- *
- * <p>
- * Note that attributes are NOT pushed at the startElement method,
- * because the processing of the enterElement event can trigger
- * other attribute events and etc.
- * <p>
- * This method will be called from one of handlers when it truely
- * consumes the enterElement event.
- */
- public void onEnterElementConsumed(
- String uri, String localName, String qname,Attributes atts) throws SAXException {
- attStack.push(currentAtts=new AttributesImpl(atts));
- nsEffectiveStack.push( new Integer(nsEffectivePtr) );
- nsEffectivePtr = namespaces.size();
- }
-
- public void onLeaveElementConsumed(String uri, String localName, String qname) throws SAXException {
- attStack.pop();
- if(attStack.isEmpty())
- currentAtts = null;
- else
- currentAtts = (AttributesImpl)attStack.peek();
- nsEffectivePtr = ((Integer)nsEffectiveStack.pop()).intValue();
- }
-
- public void endElement(String uri, String localname, String qname)
- throws SAXException {
-
- if(redirect!=null) {
- redirect.endElement(uri,localname,qname);
- redirectionDepth--;
-
- if(redirectionDepth!=0)
- return;
-
- // finished redirection.
- for( int i=0; i<namespaces.size(); i+=2 )
- redirect.endPrefixMapping((String)namespaces.get(i));
- redirect.endDocument();
-
- redirect = null;
- // then process this element normally
- }
-
- processPendingText(false);
-
- currentHandler.leaveElement(uri, localname, qname);
-// System.out.println("endElement:"+localname);
- }
-
- public void characters(char[] ch, int start, int length) throws SAXException {
- if(redirect!=null)
- redirect.characters(ch,start,length);
- else
- text.append(ch,start,length);
- }
- public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
- if(redirect!=null)
- redirect.ignorableWhitespace(ch,start,length);
- else
- text.append(ch,start,length);
- }
-
- public int getAttributeIndex(String uri, String localname) {
- return currentAtts.getIndex(uri, localname);
- }
- public void consumeAttribute(int index) throws SAXException {
- final String uri = currentAtts.getURI(index);
- final String local = currentAtts.getLocalName(index);
- final String qname = currentAtts.getQName(index);
- final String value = currentAtts.getValue(index);
- currentAtts.removeAttribute(index);
-
- currentHandler.enterAttribute(uri,local,qname);
- currentHandler.text(value);
- currentHandler.leaveAttribute(uri,local,qname);
- }
-
-
- public void startPrefixMapping( String prefix, String uri ) throws SAXException {
- if(redirect!=null)
- redirect.startPrefixMapping(prefix,uri);
- else {
- namespaces.add(prefix);
- namespaces.add(uri);
- }
- }
-
- public void endPrefixMapping( String prefix ) throws SAXException {
- if(redirect!=null)
- redirect.endPrefixMapping(prefix);
- else {
- namespaces.remove(namespaces.size()-1);
- namespaces.remove(namespaces.size()-1);
- }
- }
-
- public void skippedEntity( String name ) throws SAXException {
- if(redirect!=null)
- redirect.skippedEntity(name);
- }
-
- public void processingInstruction( String target, String data ) throws SAXException {
- if(redirect!=null)
- redirect.processingInstruction(target,data);
- }
-
- /** Impossible token. This value can never be a valid XML name. */
- static final String IMPOSSIBLE = "\u0000";
-
- public void endDocument() throws SAXException {
- // consume the special "end document" token so that all the handlers
- // currently at the stack will revert to their respective parents.
- //
- // this is necessary to handle a grammar like
- // <start><ref name="X"/></start>
- // <define name="X">
- // <element name="root"><empty/></element>
- // </define>
- //
- // With this grammar, when the endElement event is consumed, two handlers
- // are on the stack (because a child object won't revert to its parent
- // unless it sees a next event.)
-
- // pass around an "impossible" token.
- currentHandler.leaveElement(IMPOSSIBLE,IMPOSSIBLE,IMPOSSIBLE);
-
- reset();
- }
- public void startDocument() {}
-
-
-
-
-//
-//
-// event dispatching methods
-//
-//
-
- public void sendEnterAttribute( int threadId,
- String uri, String local, String qname) throws SAXException {
-
- currentHandler.enterAttribute(uri,local,qname);
- }
-
- public void sendEnterElement( int threadId,
- String uri, String local, String qname, Attributes atts) throws SAXException {
-
- currentHandler.enterElement(uri,local,qname,atts);
- }
-
- public void sendLeaveAttribute( int threadId,
- String uri, String local, String qname) throws SAXException {
-
- currentHandler.leaveAttribute(uri,local,qname);
- }
-
- public void sendLeaveElement( int threadId,
- String uri, String local, String qname) throws SAXException {
-
- currentHandler.leaveElement(uri,local,qname);
- }
-
- public void sendText(int threadId, String value) throws SAXException {
- currentHandler.text(value);
- }
-
-
-//
-//
-// redirection of SAX2 events.
-//
-//
- /** When redirecting a sub-tree, this value will be non-null. */
- private ContentHandler redirect = null;
-
- /**
- * Counts the depth of the elements when we are re-directing
- * a sub-tree to another ContentHandler.
- */
- private int redirectionDepth = 0;
-
- /**
- * This method can be called only from the enterElement handler.
- * The sub-tree rooted at the new element will be redirected
- * to the specified ContentHandler.
- *
- * <p>
- * Currently active NGCCHandler will only receive the leaveElement
- * event of the newly started element.
- *
- * @param uri,local,qname
- * Parameters passed to the enter element event. Used to
- * simulate the startElement event for the new ContentHandler.
- */
- public void redirectSubtree( ContentHandler child,
- String uri, String local, String qname ) throws SAXException {
-
- redirect = child;
- redirect.setDocumentLocator(locator);
- redirect.startDocument();
-
- // TODO: when a prefix is re-bound to something else,
- // the following code is potentially dangerous. It should be
- // modified to report active bindings only.
- for( int i=0; i<namespaces.size(); i+=2 )
- redirect.startPrefixMapping(
- (String)namespaces.get(i),
- (String)namespaces.get(i+1)
- );
-
- redirect.startElement(uri,local,qname,currentAtts);
- redirectionDepth=1;
- }
-
-//
-//
-// validation context implementation
-//
-//
- /** in-scope namespace mapping.
- * namespaces[2n ] := prefix
- * namespaces[2n+1] := namespace URI */
- private final ArrayList namespaces = new ArrayList();
- /**
- * Index on the namespaces array, which points to
- * the top of the effective bindings. Because of the
- * timing difference between the startPrefixMapping method
- * and the execution of the corresponding actions,
- * this value can be different from <code>namespaces.size()</code>.
- * <p>
- * For example, consider the following schema:
- * <pre><xmp>
- * <oneOrMore>
- * <element name="foo"><empty/></element>
- * </oneOrMore>
- * code fragment X
- * <element name="bob"/>
- * </xmp></pre>
- * Code fragment X is executed after we see a startElement event,
- * but at this time the namespaces variable already include new
- * namespace bindings declared on "bob".
- */
- private int nsEffectivePtr=0;
-
- /**
- * Stack to preserve old nsEffectivePtr values.
- */
- private final Stack nsEffectiveStack = new Stack();
-
- public String resolveNamespacePrefix( String prefix ) {
- for( int i = nsEffectivePtr-2; i>=0; i-=2 )
- if( namespaces.get(i).equals(prefix) )
- return (String)namespaces.get(i+1);
-
- // no binding was found.
- if(prefix.equals("")) return ""; // return the default no-namespace
- if(prefix.equals("xml")) // pre-defined xml prefix
- return "http://www.w3.org/XML/1998/namespace";
- else return null; // prefix undefined
- }
-
-
-// error reporting
- protected void unexpectedX(String token) throws SAXException {
- throw new SAXParseException(MessageFormat.format(
- "Unexpected {0} appears at line {1} column {2}",
- new Object[]{
- token,
- new Integer(getLocator().getLineNumber()),
- new Integer(getLocator().getColumnNumber()) }),
- getLocator());
- }
-
-
-
-
-//
-//
-// trace functions
-//
-//
- private int indent=0;
- private boolean needIndent=true;
- private void printIndent() {
- for( int i=0; i<indent; i++ )
- System.out.print(" ");
- }
- public void trace( String s ) {
- if(needIndent) {
- needIndent=false;
- printIndent();
- }
- System.out.print(s);
- }
- public void traceln( String s ) {
- trace(s);
- trace("\n");
- needIndent=true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/Schema.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/Schema.java
deleted file mode 100644
index 63ba36b2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/Schema.java
+++ /dev/null
@@ -1,1315 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.XMLReader;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-public class Schema extends NGCCHandler {
- private Integer finalDefault;
- private boolean efd;
- private boolean afd;
- private Integer blockDefault;
- private ForeignAttributesImpl fa;
- private boolean includeMode;
- private AnnotationImpl anno;
- private ComplexTypeImpl ct;
- private ElementDecl e;
- private String defaultValue;
- private XSNotation notation;
- private AttGroupDeclImpl ag;
- private String fixedValue;
- private ModelGroupDeclImpl group;
- private AttributeDeclImpl ad;
- private SimpleTypeImpl st;
- private String expectedNamespace;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public Schema(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, boolean _includeMode, String _expectedNamespace) {
- super(source, parent, cookie);
- $runtime = runtime;
- this.includeMode = _includeMode;
- this.expectedNamespace = _expectedNamespace;
- $_ngcc_current_state = 57;
- }
-
- public Schema(NGCCRuntimeEx runtime, boolean _includeMode, String _expectedNamespace) {
- this(null, runtime, runtime, -1, _includeMode, _expectedNamespace);
- }
-
- private void action0()throws SAXException {
- $runtime.checkDoubleDefError( $runtime.currentSchema.getAttGroupDecl(ag.getName()) );
- $runtime.currentSchema.addAttGroupDecl(ag,false);
-}
-
- private void action1()throws SAXException {
- $runtime.currentSchema.addNotation(notation);
-}
-
- private void action2()throws SAXException {
- $runtime.checkDoubleDefError( $runtime.currentSchema.getModelGroupDecl(group.getName()) );
- $runtime.currentSchema.addModelGroupDecl(group,false);
-}
-
- private void action3()throws SAXException {
- $runtime.checkDoubleDefError( $runtime.currentSchema.getAttributeDecl(ad.getName()) );
- $runtime.currentSchema.addAttributeDecl(ad);
-}
-
- private void action4()throws SAXException {
- locator = $runtime.copyLocator();
- defaultValue = null;
- fixedValue = null;
-}
-
- private void action5()throws SAXException {
- $runtime.checkDoubleDefError( $runtime.currentSchema.getType(ct.getName()) );
- $runtime.currentSchema.addComplexType(ct,false);
-}
-
- private void action6()throws SAXException {
- $runtime.checkDoubleDefError( $runtime.currentSchema.getType(st.getName()) );
- $runtime.currentSchema.addSimpleType(st,false);
-}
-
- private void action7()throws SAXException {
- $runtime.checkDoubleDefError( $runtime.currentSchema.getElementDecl(e.getName()) );
- $runtime.currentSchema.addElementDecl(e);
-}
-
- private void action8()throws SAXException {
- locator = $runtime.copyLocator();
-}
-
- private void action9()throws SAXException {
- $runtime.currentSchema.setAnnotation(anno);
-}
-
- private void action10()throws SAXException {
- $runtime.currentSchema.addForeignAttributes(fa);
-}
-
- private void action11()throws SAXException {
- $runtime.finalDefault=this.finalDefault.intValue();
-}
-
- private void action12()throws SAXException {
- $runtime.blockDefault=this.blockDefault.intValue();
-}
-
- private void action13()throws SAXException {
- $runtime.elementFormDefault = efd;
-}
-
- private void action14()throws SAXException {
- $runtime.attributeFormDefault = afd;
-}
-
- private void action15()throws SAXException {
- Attributes test = $runtime.getCurrentAttributes();
- String tns = test.getValue("targetNamespace");
-
- if(!includeMode) {
- // importing
- if(tns==null) tns=""; // if not present, then the empty namespace
- $runtime.currentSchema = $runtime.parser.schemaSet.createSchema(tns,$runtime.copyLocator());
- if(expectedNamespace!=null && !expectedNamespace.equals(tns)) {
- $runtime.reportError(
- Messages.format("UnexpectedTargetnamespace.Import", tns, expectedNamespace, tns ),
- $runtime.getLocator());
- }
- } else {
- // including
-
- // check the consistency of @targetNamespace.
- // @targetNamespace must be null or equal to the target namespace of the schema
- if(tns!=null && expectedNamespace!=null && !expectedNamespace.equals(tns)) {
- $runtime.reportError(
- Messages.format("UnexpectedTargetnamespace.Include", tns, expectedNamespace, tns ) );
- }
- $runtime.chameleonMode = true;
- }
-
- // multiple inclusion test.
- if( $runtime.hasAlreadyBeenRead() ) {
- // skip this document
- $runtime.redirectSubtree(new DefaultHandler(),"","","" );
- return;
- }
-
- anno = (AnnotationImpl)$runtime.currentSchema.getAnnotation();
- $runtime.blockDefault = 0;
- $runtime.finalDefault = 0;
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 49:
- {
- if(($ai = $runtime.getAttributeIndex("","attributeFormDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 45;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 36:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("redefine")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("import"))))))))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 527, null);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 16:
- {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 12;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 53:
- {
- if(($ai = $runtime.getAttributeIndex("","targetNamespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 49;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 37:
- {
- if(($ai = $runtime.getAttributeIndex("","finalDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 36;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 12:
- {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 45:
- {
- if(($ai = $runtime.getAttributeIndex("","elementFormDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 41;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 41:
- {
- if(($ai = $runtime.getAttributeIndex("","blockDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 37;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 515, anno,AnnotationContext.SCHEMA);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include"))) {
- NGCCHandler h = new includeDecl(this, super._source, $runtime, 516);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("import"))) {
- NGCCHandler h = new importDecl(this, super._source, $runtime, 517);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("redefine"))) {
- NGCCHandler h = new redefine(this, super._source, $runtime, 518);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action8();
- $_ngcc_current_state = 27;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 520);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- NGCCHandler h = new complexType(this, super._source, $runtime, 521);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action4();
- $_ngcc_current_state = 16;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
- NGCCHandler h = new group(this, super._source, $runtime, 523);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) {
- NGCCHandler h = new notation(this, super._source, $runtime, 524);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- NGCCHandler h = new attributeGroupDecl(this, super._source, $runtime, 525);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- break;
- case 27:
- {
- if((($ai = $runtime.getAttributeIndex("","default"))>=0 || (($ai = $runtime.getAttributeIndex("","fixed"))>=0 || (($ai = $runtime.getAttributeIndex("","form"))>=0 || (($ai = $runtime.getAttributeIndex("","final"))>=0 || (($ai = $runtime.getAttributeIndex("","block"))>=0 || (($ai = $runtime.getAttributeIndex("","name"))>=0 || ($ai = $runtime.getAttributeIndex("","abstract"))>=0))))))) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 57:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("schema"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action15();
- $_ngcc_current_state = 53;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 11:
- {
- if((($ai = $runtime.getAttributeIndex("","name"))>=0 || ($ai = $runtime.getAttributeIndex("","form"))>=0)) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 421, locator,false,defaultValue,fixedValue);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 504, anno,AnnotationContext.SCHEMA);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include"))) {
- NGCCHandler h = new includeDecl(this, super._source, $runtime, 505);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("import"))) {
- NGCCHandler h = new importDecl(this, super._source, $runtime, 506);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("redefine"))) {
- NGCCHandler h = new redefine(this, super._source, $runtime, 507);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action8();
- $_ngcc_current_state = 27;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 509);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- NGCCHandler h = new complexType(this, super._source, $runtime, 510);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action4();
- $_ngcc_current_state = 16;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
- NGCCHandler h = new group(this, super._source, $runtime, 512);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) {
- NGCCHandler h = new notation(this, super._source, $runtime, 513);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- NGCCHandler h = new attributeGroupDecl(this, super._source, $runtime, 514);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 49:
- {
- if(($ai = $runtime.getAttributeIndex("","attributeFormDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 45;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 36:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("schema"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 527, null);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 10:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 16:
- {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 12;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 53:
- {
- if(($ai = $runtime.getAttributeIndex("","targetNamespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 49;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 26:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 37:
- {
- if(($ai = $runtime.getAttributeIndex("","finalDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 36;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 12:
- {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 45:
- {
- if(($ai = $runtime.getAttributeIndex("","elementFormDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 41;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 41:
- {
- if(($ai = $runtime.getAttributeIndex("","blockDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 37;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 27:
- {
- if(((($ai = $runtime.getAttributeIndex("","default"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","final"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || (($ai = $runtime.getAttributeIndex("","abstract"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")))))))))) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 11:
- {
- if(((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) || (($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 421, locator,false,defaultValue,fixedValue);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("schema"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 49:
- {
- if(($__uri.equals("") && $__local.equals("attributeFormDefault"))) {
- $_ngcc_current_state = 51;
- }
- else {
- $_ngcc_current_state = 45;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 45:
- {
- if(($__uri.equals("") && $__local.equals("elementFormDefault"))) {
- $_ngcc_current_state = 47;
- }
- else {
- $_ngcc_current_state = 41;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 41:
- {
- if(($__uri.equals("") && $__local.equals("blockDefault"))) {
- $_ngcc_current_state = 43;
- }
- else {
- $_ngcc_current_state = 37;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 27:
- {
- if((($__uri.equals("") && $__local.equals("default")) || (($__uri.equals("") && $__local.equals("fixed")) || (($__uri.equals("") && $__local.equals("form")) || (($__uri.equals("") && $__local.equals("final")) || (($__uri.equals("") && $__local.equals("block")) || (($__uri.equals("") && $__local.equals("name")) || ($__uri.equals("") && $__local.equals("abstract"))))))))) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 16:
- {
- if(($__uri.equals("") && $__local.equals("default"))) {
- $_ngcc_current_state = 18;
- }
- else {
- $_ngcc_current_state = 12;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 37:
- {
- if(($__uri.equals("") && $__local.equals("finalDefault"))) {
- $_ngcc_current_state = 39;
- }
- else {
- $_ngcc_current_state = 36;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 53:
- {
- if(($__uri.equals("") && $__local.equals("targetNamespace"))) {
- $_ngcc_current_state = 55;
- }
- else {
- $_ngcc_current_state = 49;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 11:
- {
- if((($__uri.equals("") && $__local.equals("name")) || ($__uri.equals("") && $__local.equals("form")))) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 421, locator,false,defaultValue,fixedValue);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 12:
- {
- if(($__uri.equals("") && $__local.equals("fixed"))) {
- $_ngcc_current_state = 14;
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 49:
- {
- $_ngcc_current_state = 45;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 38:
- {
- if(($__uri.equals("") && $__local.equals("finalDefault"))) {
- $_ngcc_current_state = 36;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 16:
- {
- $_ngcc_current_state = 12;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 13:
- {
- if(($__uri.equals("") && $__local.equals("fixed"))) {
- $_ngcc_current_state = 11;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 53:
- {
- $_ngcc_current_state = 49;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 37:
- {
- $_ngcc_current_state = 36;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 17:
- {
- if(($__uri.equals("") && $__local.equals("default"))) {
- $_ngcc_current_state = 12;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 12:
- {
- $_ngcc_current_state = 11;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 50:
- {
- if(($__uri.equals("") && $__local.equals("attributeFormDefault"))) {
- $_ngcc_current_state = 45;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 42:
- {
- if(($__uri.equals("") && $__local.equals("blockDefault"))) {
- $_ngcc_current_state = 37;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 45:
- {
- $_ngcc_current_state = 41;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 41:
- {
- $_ngcc_current_state = 37;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 54:
- {
- if(($__uri.equals("") && $__local.equals("targetNamespace"))) {
- $_ngcc_current_state = 49;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 46:
- {
- if(($__uri.equals("") && $__local.equals("elementFormDefault"))) {
- $_ngcc_current_state = 41;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 49:
- {
- if(($ai = $runtime.getAttributeIndex("","attributeFormDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 45;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 0:
- {
- revertToParentFromText(this, super._cookie, $value);
- }
- break;
- case 47:
- {
- if($value.equals("unqualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 539);
- spawnChildFromText(h, $value);
- }
- else {
- if($value.equals("qualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 539);
- spawnChildFromText(h, $value);
- }
- }
- }
- break;
- case 43:
- {
- NGCCHandler h = new ersSet(this, super._source, $runtime, 534);
- spawnChildFromText(h, $value);
- }
- break;
- case 16:
- {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 12;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 53:
- {
- if(($ai = $runtime.getAttributeIndex("","targetNamespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 49;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 37:
- {
- if(($ai = $runtime.getAttributeIndex("","finalDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 36;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 12:
- {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 14:
- {
- fixedValue = $value;
- $_ngcc_current_state = 13;
- }
- break;
- case 45:
- {
- if(($ai = $runtime.getAttributeIndex("","elementFormDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 41;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 41:
- {
- if(($ai = $runtime.getAttributeIndex("","blockDefault"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 37;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 55:
- {
- $_ngcc_current_state = 54;
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 27:
- {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 439, locator,true);
- spawnChildFromText(h, $value);
- }
- }
- }
- }
- }
- }
- }
- }
- break;
- case 39:
- {
- NGCCHandler h = new erSet(this, super._source, $runtime, 529);
- spawnChildFromText(h, $value);
- }
- break;
- case 51:
- {
- if($value.equals("unqualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 544);
- spawnChildFromText(h, $value);
- }
- else {
- if($value.equals("qualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 544);
- spawnChildFromText(h, $value);
- }
- }
- }
- break;
- case 18:
- {
- defaultValue = $value;
- $_ngcc_current_state = 17;
- }
- break;
- case 11:
- {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 421, locator,false,defaultValue,fixedValue);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 421, locator,false,defaultValue,fixedValue);
- spawnChildFromText(h, $value);
- }
- }
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 527:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- action10();
- $_ngcc_current_state = 2;
- }
- break;
- case 534:
- {
- blockDefault = ((Integer)$__result__);
- action12();
- $_ngcc_current_state = 42;
- }
- break;
- case 439:
- {
- e = ((ElementDecl)$__result__);
- action7();
- $_ngcc_current_state = 26;
- }
- break;
- case 544:
- {
- afd = ((Boolean)$__result__).booleanValue();
- action14();
- $_ngcc_current_state = 50;
- }
- break;
- case 421:
- {
- ad = ((AttributeDeclImpl)$__result__);
- action3();
- $_ngcc_current_state = 10;
- }
- break;
- case 504:
- {
- anno = ((AnnotationImpl)$__result__);
- action9();
- $_ngcc_current_state = 1;
- }
- break;
- case 505:
- {
- $_ngcc_current_state = 1;
- }
- break;
- case 506:
- {
- $_ngcc_current_state = 1;
- }
- break;
- case 507:
- {
- $_ngcc_current_state = 1;
- }
- break;
- case 509:
- {
- st = ((SimpleTypeImpl)$__result__);
- action6();
- $_ngcc_current_state = 1;
- }
- break;
- case 510:
- {
- ct = ((ComplexTypeImpl)$__result__);
- action5();
- $_ngcc_current_state = 1;
- }
- break;
- case 512:
- {
- group = ((ModelGroupDeclImpl)$__result__);
- action2();
- $_ngcc_current_state = 1;
- }
- break;
- case 513:
- {
- notation = ((XSNotation)$__result__);
- action1();
- $_ngcc_current_state = 1;
- }
- break;
- case 514:
- {
- ag = ((AttGroupDeclImpl)$__result__);
- action0();
- $_ngcc_current_state = 1;
- }
- break;
- case 539:
- {
- efd = ((Boolean)$__result__).booleanValue();
- action13();
- $_ngcc_current_state = 46;
- }
- break;
- case 515:
- {
- anno = ((AnnotationImpl)$__result__);
- action9();
- $_ngcc_current_state = 1;
- }
- break;
- case 516:
- {
- $_ngcc_current_state = 1;
- }
- break;
- case 517:
- {
- $_ngcc_current_state = 1;
- }
- break;
- case 518:
- {
- $_ngcc_current_state = 1;
- }
- break;
- case 520:
- {
- st = ((SimpleTypeImpl)$__result__);
- action6();
- $_ngcc_current_state = 1;
- }
- break;
- case 521:
- {
- ct = ((ComplexTypeImpl)$__result__);
- action5();
- $_ngcc_current_state = 1;
- }
- break;
- case 523:
- {
- group = ((ModelGroupDeclImpl)$__result__);
- action2();
- $_ngcc_current_state = 1;
- }
- break;
- case 524:
- {
- notation = ((XSNotation)$__result__);
- action1();
- $_ngcc_current_state = 1;
- }
- break;
- case 525:
- {
- ag = ((AttGroupDeclImpl)$__result__);
- action0();
- $_ngcc_current_state = 1;
- }
- break;
- case 529:
- {
- finalDefault = ((Integer)$__result__);
- action11();
- $_ngcc_current_state = 38;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private String tns=null; // it defaults to the no namespace.
- private Locator locator;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_List.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_List.java
deleted file mode 100644
index 50506cf4..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_List.java
+++ /dev/null
@@ -1,390 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class SimpleType_List extends NGCCHandler {
- private Locator locator;
- private AnnotationImpl annotation;
- private String name;
- private UName itemTypeName;
- private Set finalSet;
- private ForeignAttributesImpl fa;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public SimpleType_List(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, AnnotationImpl _annotation, Locator _locator, ForeignAttributesImpl _fa, String _name, Set _finalSet) {
- super(source, parent, cookie);
- $runtime = runtime;
- this.annotation = _annotation;
- this.locator = _locator;
- this.fa = _fa;
- this.name = _name;
- this.finalSet = _finalSet;
- $_ngcc_current_state = 10;
- }
-
- public SimpleType_List(NGCCRuntimeEx runtime, AnnotationImpl _annotation, Locator _locator, ForeignAttributesImpl _fa, String _name, Set _finalSet) {
- this(null, runtime, runtime, -1, _annotation, _locator, _fa, _name, _finalSet);
- }
-
- private void action0()throws SAXException {
-
- result = new ListSimpleTypeImpl(
- $runtime.document, annotation, locator, fa,
- name, name==null, finalSet, itemType );
-
-}
-
- private void action1()throws SAXException {
-
- itemType = new DelayedRef.SimpleType(
- $runtime, lloc, $runtime.currentSchema, itemTypeName);
-
-}
-
- private void action2()throws SAXException {
- lloc=$runtime.copyLocator();
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 9:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ((($ai = $runtime.getAttributeIndex("","itemType"))>=0 && (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 266, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 7:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 264, annotation,AnnotationContext.SIMPLETYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 10:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action2();
- $_ngcc_current_state = 9;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 2:
- {
- if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 258);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 9:
- {
- if((($ai = $runtime.getAttributeIndex("","itemType"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 266, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 7:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- action0();
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 9:
- {
- if(($__uri.equals("") && $__local.equals("itemType"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 266, fa);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 7:
- {
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- if(($__uri.equals("") && $__local.equals("itemType"))) {
- $_ngcc_current_state = 5;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 7:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- if(($__uri.equals("") && $__local.equals("itemType"))) {
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 9:
- {
- if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 266, fa);
- spawnChildFromText(h, $value);
- }
- }
- break;
- case 7:
- {
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 2:
- {
- if(($ai = $runtime.getAttributeIndex("","itemType"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 0:
- {
- revertToParentFromText(result, super._cookie, $value);
- }
- break;
- case 5:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 260);
- spawnChildFromText(h, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 266:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 7;
- }
- break;
- case 264:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 2;
- }
- break;
- case 258:
- {
- itemType = ((SimpleTypeImpl)$__result__);
- $_ngcc_current_state = 1;
- }
- break;
- case 260:
- {
- itemTypeName = ((UName)$__result__);
- action1();
- $_ngcc_current_state = 4;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- /** computed simple type object */
- private ListSimpleTypeImpl result;
-
- // reference to the base type
- private Ref.SimpleType itemType;
-
- // locator of <list>
- private Locator lloc;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_Restriction.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_Restriction.java
deleted file mode 100644
index ddd1fd8b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_Restriction.java
+++ /dev/null
@@ -1,491 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class SimpleType_Restriction extends NGCCHandler {
- private Locator locator;
- private AnnotationImpl annotation;
- private String name;
- private UName baseTypeName;
- private Set finalSet;
- private ForeignAttributesImpl fa;
- private XSFacet facet;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public SimpleType_Restriction(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, AnnotationImpl _annotation, Locator _locator, ForeignAttributesImpl _fa, String _name, Set _finalSet) {
- super(source, parent, cookie);
- $runtime = runtime;
- this.annotation = _annotation;
- this.locator = _locator;
- this.fa = _fa;
- this.name = _name;
- this.finalSet = _finalSet;
- $_ngcc_current_state = 13;
- }
-
- public SimpleType_Restriction(NGCCRuntimeEx runtime, AnnotationImpl _annotation, Locator _locator, ForeignAttributesImpl _fa, String _name, Set _finalSet) {
- this(null, runtime, runtime, -1, _annotation, _locator, _fa, _name, _finalSet);
- }
-
- private void action0()throws SAXException {
-
- result.addFacet(facet);
-
-}
-
- private void action1()throws SAXException {
-
- result = new RestrictionSimpleTypeImpl(
- $runtime.document, annotation, locator, fa, name, name==null, finalSet, baseType );
-
-}
-
- private void action2()throws SAXException {
-
- baseType = new DelayedRef.SimpleType(
- $runtime, rloc, $runtime.currentSchema, baseTypeName );
-
-}
-
- private void action3()throws SAXException {
- rloc=$runtime.copyLocator();
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 12:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ((($ai = $runtime.getAttributeIndex("","base"))>=0 && ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || (((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 166, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 10:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 164, annotation,AnnotationContext.SIMPLETYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 5;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 4:
- {
- action1();
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 158);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- break;
- case 1:
- {
- if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
- NGCCHandler h = new facet(this, super._source, $runtime, 153);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 2:
- {
- if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
- NGCCHandler h = new facet(this, super._source, $runtime, 154);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 13:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action3();
- $_ngcc_current_state = 12;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 12:
- {
- if((($ai = $runtime.getAttributeIndex("","base"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 166, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 5;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- action1();
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 12:
- {
- if(($__uri.equals("") && $__local.equals("base"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 166, fa);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 5;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- action1();
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- if(($__uri.equals("") && $__local.equals("base"))) {
- $_ngcc_current_state = 8;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 7:
- {
- if(($__uri.equals("") && $__local.equals("base"))) {
- $_ngcc_current_state = 4;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 5;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- action1();
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 8:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 160);
- spawnChildFromText(h, $value);
- }
- break;
- case 12:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 166, fa);
- spawnChildFromText(h, $value);
- }
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 5;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 4:
- {
- action1();
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 0:
- {
- revertToParentFromText(result, super._cookie, $value);
- }
- break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 160:
- {
- baseTypeName = ((UName)$__result__);
- action2();
- $_ngcc_current_state = 7;
- }
- break;
- case 164:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 5;
- }
- break;
- case 154:
- {
- facet = ((XSFacet)$__result__);
- action0();
- $_ngcc_current_state = 1;
- }
- break;
- case 166:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 10;
- }
- break;
- case 158:
- {
- baseType = ((SimpleTypeImpl)$__result__);
- $_ngcc_current_state = 4;
- }
- break;
- case 153:
- {
- facet = ((XSFacet)$__result__);
- action0();
- $_ngcc_current_state = 1;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- /** computed simple type object */
- private RestrictionSimpleTypeImpl result;
-
- // reference to the base type
- private Ref.SimpleType baseType;
-
- // location of restriction
- private Locator rloc;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_Union.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_Union.java
deleted file mode 100644
index 12adef59..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/SimpleType_Union.java
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-import java.util.Vector;
-
-
-class SimpleType_Union extends NGCCHandler {
- private Locator locator;
- private AnnotationImpl annotation;
- private String __text;
- private UName memberTypeName;
- private String name;
- private Set finalSet;
- private ForeignAttributesImpl fa;
- private SimpleTypeImpl anonymousMemberType;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public SimpleType_Union(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, AnnotationImpl _annotation, Locator _locator, ForeignAttributesImpl _fa, String _name, Set _finalSet) {
- super(source, parent, cookie);
- $runtime = runtime;
- this.annotation = _annotation;
- this.locator = _locator;
- this.fa = _fa;
- this.name = _name;
- this.finalSet = _finalSet;
- $_ngcc_current_state = 12;
- }
-
- public SimpleType_Union(NGCCRuntimeEx runtime, AnnotationImpl _annotation, Locator _locator, ForeignAttributesImpl _fa, String _name, Set _finalSet) {
- this(null, runtime, runtime, -1, _annotation, _locator, _fa, _name, _finalSet);
- }
-
- private void action0()throws SAXException {
-
- result = new UnionSimpleTypeImpl(
- $runtime.document, annotation, locator, fa, name, name==null, finalSet,
- (Ref.SimpleType[])members.toArray(new Ref.SimpleType[members.size()]) );
-
-}
-
- private void action1()throws SAXException {
-
- members.add(anonymousMemberType);
-
-}
-
- private void action2()throws SAXException {
-
- members.add( new DelayedRef.SimpleType(
- $runtime, uloc, $runtime.currentSchema, memberTypeName));
-
-}
-
- private void action3()throws SAXException {
- $runtime.processList(__text);}
-
- private void action4()throws SAXException {
- uloc=$runtime.copyLocator();
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 4:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 183, annotation,AnnotationContext.SIMPLETYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 179);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 7:
- {
- if(($ai = $runtime.getAttributeIndex("","memberTypes"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 6;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 12:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("union"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action4();
- $_ngcc_current_state = 7;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 180);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 6:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 185, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("union"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- action0();
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 7:
- {
- if(($ai = $runtime.getAttributeIndex("","memberTypes"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 6;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 6:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("union"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 185, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 7:
- {
- if(($__uri.equals("") && $__local.equals("memberTypes"))) {
- $_ngcc_current_state = 10;
- }
- else {
- $_ngcc_current_state = 6;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 7:
- {
- $_ngcc_current_state = 6;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 8:
- {
- if(($__uri.equals("") && $__local.equals("memberTypes"))) {
- $_ngcc_current_state = 6;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 9:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 187);
- spawnChildFromText(h, $value);
- }
- break;
- case 10:
- {
- __text = $value;
- $_ngcc_current_state = 9;
- action3();
- }
- break;
- case 0:
- {
- revertToParentFromText(result, super._cookie, $value);
- }
- break;
- case 7:
- {
- if(($ai = $runtime.getAttributeIndex("","memberTypes"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 6;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 8:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 188);
- spawnChildFromText(h, $value);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 183:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 2;
- }
- break;
- case 187:
- {
- memberTypeName = ((UName)$__result__);
- action2();
- $_ngcc_current_state = 8;
- }
- break;
- case 179:
- {
- anonymousMemberType = ((SimpleTypeImpl)$__result__);
- action1();
- $_ngcc_current_state = 1;
- }
- break;
- case 188:
- {
- memberTypeName = ((UName)$__result__);
- action2();
- $_ngcc_current_state = 8;
- }
- break;
- case 185:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 4;
- }
- break;
- case 180:
- {
- anonymousMemberType = ((SimpleTypeImpl)$__result__);
- action1();
- $_ngcc_current_state = 1;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- /** computed simple type object */
- private UnionSimpleTypeImpl result;
-
- // Vector of Ref.SimpleType
- private final Vector members = new Vector();
-
- // locator of <union>
- private Locator uloc;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/annotation.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/annotation.java
deleted file mode 100644
index 6446644f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/annotation.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-import com.sun.xml.internal.xsom.parser.AnnotationParser;
-
-
-class annotation extends NGCCHandler {
- private AnnotationContext context;
- private AnnotationImpl existing;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public annotation(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, AnnotationImpl _existing, AnnotationContext _context) {
- super(source, parent, cookie);
- $runtime = runtime;
- this.existing = _existing;
- this.context = _context;
- $_ngcc_current_state = 2;
- }
-
- public annotation(NGCCRuntimeEx runtime, AnnotationImpl _existing, AnnotationContext _context) {
- this(null, runtime, runtime, -1, _existing, _context);
- }
-
- private void action0()throws SAXException {
-
- locator = $runtime.copyLocator();
- parser = $runtime.createAnnotationParser();
- $runtime.redirectSubtree(parser.getContentHandler(
- context,
- $runtime.getAnnotationContextElementName(),
- $runtime.getErrorHandler(),
- $runtime.parser.getEntityResolver()
- ), $uri, $localName, $qname );
-
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action0();
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private AnnotationParser parser;
- private Locator locator;
-
- public AnnotationImpl makeResult() {
- Object e = null;
- if(existing!=null) e=existing.getAnnotation();
-
- return new AnnotationImpl( parser.getResult(e),locator);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeDeclBody.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeDeclBody.java
deleted file mode 100644
index fbd2d5e2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeDeclBody.java
+++ /dev/null
@@ -1,542 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class attributeDeclBody extends NGCCHandler {
- private String name;
- private ForeignAttributesImpl fa;
- private AnnotationImpl annotation;
- private Locator locator;
- private boolean isLocal;
- private String defaultValue;
- private UName typeName;
- private String fixedValue;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public attributeDeclBody(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, Locator _locator, boolean _isLocal, String _defaultValue, String _fixedValue) {
- super(source, parent, cookie);
- $runtime = runtime;
- this.locator = _locator;
- this.isLocal = _isLocal;
- this.defaultValue = _defaultValue;
- this.fixedValue = _fixedValue;
- $_ngcc_current_state = 13;
- }
-
- public attributeDeclBody(NGCCRuntimeEx runtime, Locator _locator, boolean _isLocal, String _defaultValue, String _fixedValue) {
- this(null, runtime, runtime, -1, _locator, _isLocal, _defaultValue, _fixedValue);
- }
-
- private void action0()throws SAXException {
-
- type = new DelayedRef.SimpleType(
- $runtime, locator, $runtime.currentSchema, typeName );
-
-}
-
- private void action1()throws SAXException {
- formSpecified = true;
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 12:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 7:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 388, null,AnnotationContext.ATTRIBUTE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 9:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ((($ai = $runtime.getAttributeIndex("","type"))>=0 && (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 12;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 1:
- {
- if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 379);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 12:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 7:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 9:
- {
- if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 12;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 1:
- {
- if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 12:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 11;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 7:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 9:
- {
- if(($__uri.equals("") && $__local.equals("type"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- }
- break;
- case 13:
- {
- if(($__uri.equals("") && $__local.equals("form"))) {
- $_ngcc_current_state = 15;
- }
- else {
- $_ngcc_current_state = 12;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 1:
- {
- if(($__uri.equals("") && $__local.equals("type"))) {
- $_ngcc_current_state = 5;
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 14:
- {
- if(($__uri.equals("") && $__local.equals("form"))) {
- $_ngcc_current_state = 12;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 7:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 10:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 9;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 9:
- {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
- spawnChildFromLeaveAttribute(h, $__uri, $__local, $__qname);
- }
- break;
- case 13:
- {
- $_ngcc_current_state = 12;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- if(($__uri.equals("") && $__local.equals("type"))) {
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
- }
- break;
- case 12:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 7:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 9:
- {
- if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
- spawnChildFromText(h, $value);
- }
- else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 390, fa);
- spawnChildFromText(h, $value);
- }
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 12;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 15:
- {
- if($value.equals("unqualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 395);
- spawnChildFromText(h, $value);
- }
- else {
- if($value.equals("qualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 395);
- spawnChildFromText(h, $value);
- }
- }
- }
- break;
- case 1:
- {
- if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 11:
- {
- name = $value;
- $_ngcc_current_state = 10;
- }
- break;
- case 5:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 381);
- spawnChildFromText(h, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 388:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 1;
- }
- break;
- case 379:
- {
- type = ((SimpleTypeImpl)$__result__);
- $_ngcc_current_state = 0;
- }
- break;
- case 390:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 7;
- }
- break;
- case 395:
- {
- form = ((Boolean)$__result__).booleanValue();
- action1();
- $_ngcc_current_state = 14;
- }
- break;
- case 381:
- {
- typeName = ((UName)$__result__);
- action0();
- $_ngcc_current_state = 4;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return((($_ngcc_current_state == 0) || (($_ngcc_current_state == 1) || ($_ngcc_current_state == 7))));
- }
-
-
- private boolean form;
- private boolean formSpecified = false;
-
- private AttributeDeclImpl makeResult() {
-
- if(type==null)
- // type defaults to anySimpleType
- type = $runtime.parser.schemaSet.anySimpleType;
-
- if(!formSpecified) form = $runtime.attributeFormDefault;
- // global attributes are always qualified
- if(!isLocal) form = true;
-
- String tns;
- if(form==true) tns = $runtime.currentSchema.getTargetNamespace();
- else tns = "";
-
- // proper handling of anonymous types
- return new AttributeDeclImpl( $runtime.document, tns, name,
- annotation, locator, fa, isLocal,
- $runtime.createXmlString(defaultValue),
- $runtime.createXmlString(fixedValue),
- type );
- }
- private Ref.SimpleType type;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeGroupDecl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeGroupDecl.java
deleted file mode 100644
index 88dfb6bc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeGroupDecl.java
+++ /dev/null
@@ -1,459 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class attributeGroupDecl extends NGCCHandler {
- private AnnotationImpl annotation;
- private String name;
- private ForeignAttributesImpl fa;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public attributeGroupDecl(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 14;
- }
-
- public attributeGroupDecl(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- private void action0()throws SAXException {
-
- result = new AttGroupDeclImpl(
- $runtime.document, annotation, locator, fa, name );
-
-}
-
- private void action1()throws SAXException {
- locator=$runtime.copyLocator();
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 6:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 246, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 7:
- {
- if(($ai = $runtime.getAttributeIndex("","id"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 6;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 3:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 2:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 241, result);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 14:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action1();
- $_ngcc_current_state = 13;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 4:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 244, null,AnnotationContext.ATTRIBUTE_GROUP);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 3;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 6:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 246, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 7:
- {
- if(($ai = $runtime.getAttributeIndex("","id"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 6;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 3:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 241, result);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 3;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 13:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 12;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 7:
- {
- if(($__uri.equals("") && $__local.equals("id"))) {
- $_ngcc_current_state = 9;
- }
- else {
- $_ngcc_current_state = 6;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 3:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 3;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 7:
- {
- $_ngcc_current_state = 6;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 3:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 8:
- {
- if(($__uri.equals("") && $__local.equals("id"))) {
- $_ngcc_current_state = 6;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 11:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 7;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 3;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 0:
- {
- revertToParentFromText(result, super._cookie, $value);
- }
- break;
- case 7:
- {
- if(($ai = $runtime.getAttributeIndex("","id"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 6;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 12:
- {
- name = $value;
- $_ngcc_current_state = 11;
- }
- break;
- case 9:
- {
- $_ngcc_current_state = 8;
- }
- break;
- case 3:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 3;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 241:
- {
- $_ngcc_current_state = 1;
- }
- break;
- case 246:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 4;
- }
- break;
- case 244:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 3;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private AttGroupDeclImpl result;
- private Locator locator;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeUses.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeUses.java
deleted file mode 100644
index 9a9c41de..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/attributeUses.java
+++ /dev/null
@@ -1,962 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class attributeUses extends NGCCHandler {
- private String use;
- private AttributesHolder owner;
- private ForeignAttributesImpl fa;
- private WildcardImpl wildcard;
- private AnnotationImpl annotation;
- private UName attDeclName;
- private AttributeDeclImpl anonymousDecl;
- private String defaultValue;
- private String fixedValue;
- private UName groupName;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public attributeUses(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, AttributesHolder _owner) {
- super(source, parent, cookie);
- $runtime = runtime;
- this.owner = _owner;
- $_ngcc_current_state = 5;
- }
-
- public attributeUses(NGCCRuntimeEx runtime, AttributesHolder _owner) {
- this(null, runtime, runtime, -1, _owner);
- }
-
- private void action0()throws SAXException {
-
- owner.setWildcard(wildcard);
-
-}
-
- private void action1()throws SAXException {
- wloc = $runtime.copyLocator();
-}
-
- private void action2()throws SAXException {
-
- owner.addAttGroup(new DelayedRef.AttGroup(
- $runtime, locator, $runtime.currentSchema, groupName ));
-
-}
-
- private void action3()throws SAXException {
- locator=$runtime.copyLocator();
-}
-
- private void action4()throws SAXException {
-
- if("prohibited".equals(use))
- owner.addProhibitedAttribute(attDeclName);
- else
- owner.addAttributeUse(attDeclName,
- new AttributeUseImpl( $runtime.document, annotation,locator,fa,decl,
- $runtime.createXmlString(defaultValue),
- $runtime.createXmlString(fixedValue),
- "required".equals(use)));
-
-}
-
- private void action5()throws SAXException {
-
- decl = new DelayedRef.Attribute(
- $runtime, locator, $runtime.currentSchema, attDeclName );
-
-}
-
- private void action6()throws SAXException {
-
- decl = anonymousDecl;
- attDeclName = new UName(
- anonymousDecl.getTargetNamespace(),
- anonymousDecl.getName());
- defaultValue = null;
- fixedValue = null;
-
-}
-
- private void action7()throws SAXException {
-
- locator=$runtime.copyLocator();
- use=null;
- defaultValue=null;
- fixedValue=null;
- decl=null;
- annotation=null;
-
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action7();
- $_ngcc_current_state = 33;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action3();
- $_ngcc_current_state = 13;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action1();
- $_ngcc_current_state = 3;
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- }
- }
- break;
- case 8:
- {
- action2();
- $_ngcc_current_state = 7;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 3:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($ai = $runtime.getAttributeIndex("","namespace"))>=0 || ($ai = $runtime.getAttributeIndex("","processContents"))>=0))) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 290, wloc);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 17:
- {
- if((($ai = $runtime.getAttributeIndex("","name"))>=0 || ($ai = $runtime.getAttributeIndex("","form"))>=0)) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 315, locator,true,defaultValue,fixedValue);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- break;
- case 33:
- {
- if(($ai = $runtime.getAttributeIndex("","use"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 29;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 25:
- {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 17;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 29:
- {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 25;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 9:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 297, null,AnnotationContext.ATTRIBUTE_USE);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 8;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 16:
- {
- action4();
- $_ngcc_current_state = 15;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 5:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action7();
- $_ngcc_current_state = 33;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action3();
- $_ngcc_current_state = 13;
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 19:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 308, null,AnnotationContext.ATTRIBUTE_USE);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 18;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 8:
- {
- action2();
- $_ngcc_current_state = 7;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 3:
- {
- if(((($ai = $runtime.getAttributeIndex("","namespace"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute"))) || ((($ai = $runtime.getAttributeIndex("","processContents"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute"))))) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 290, wloc);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 17:
- {
- if(((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) || (($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 315, locator,true,defaultValue,fixedValue);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- }
- break;
- case 33:
- {
- if(($ai = $runtime.getAttributeIndex("","use"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 29;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 15:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 25:
- {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 17;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 29:
- {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 25;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 9:
- {
- $_ngcc_current_state = 8;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 16:
- {
- action4();
- $_ngcc_current_state = 15;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 7:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 19:
- {
- $_ngcc_current_state = 18;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 18:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 306, null);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 8:
- {
- action2();
- $_ngcc_current_state = 7;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 3:
- {
- if((($__uri.equals("") && $__local.equals("namespace")) || ($__uri.equals("") && $__local.equals("processContents")))) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 290, wloc);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 17:
- {
- if((($__uri.equals("") && $__local.equals("name")) || ($__uri.equals("") && $__local.equals("form")))) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 315, locator,true,defaultValue,fixedValue);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- if(($__uri.equals("") && $__local.equals("ref"))) {
- $_ngcc_current_state = 22;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- }
- break;
- case 33:
- {
- if(($__uri.equals("") && $__local.equals("use"))) {
- $_ngcc_current_state = 35;
- }
- else {
- $_ngcc_current_state = 29;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 25:
- {
- if(($__uri.equals("") && $__local.equals("fixed"))) {
- $_ngcc_current_state = 27;
- }
- else {
- $_ngcc_current_state = 17;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 29:
- {
- if(($__uri.equals("") && $__local.equals("default"))) {
- $_ngcc_current_state = 31;
- }
- else {
- $_ngcc_current_state = 25;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 9:
- {
- $_ngcc_current_state = 8;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 16:
- {
- action4();
- $_ngcc_current_state = 15;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 13:
- {
- if(($__uri.equals("") && $__local.equals("ref"))) {
- $_ngcc_current_state = 12;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 19:
- {
- $_ngcc_current_state = 18;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 8:
- {
- action2();
- $_ngcc_current_state = 7;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 34:
- {
- if(($__uri.equals("") && $__local.equals("use"))) {
- $_ngcc_current_state = 29;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 26:
- {
- if(($__uri.equals("") && $__local.equals("fixed"))) {
- $_ngcc_current_state = 17;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 11:
- {
- if(($__uri.equals("") && $__local.equals("ref"))) {
- $_ngcc_current_state = 9;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 33:
- {
- $_ngcc_current_state = 29;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 21:
- {
- if(($__uri.equals("") && $__local.equals("ref"))) {
- $_ngcc_current_state = 19;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 25:
- {
- $_ngcc_current_state = 17;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 30:
- {
- if(($__uri.equals("") && $__local.equals("default"))) {
- $_ngcc_current_state = 25;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 29:
- {
- $_ngcc_current_state = 25;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 9:
- {
- $_ngcc_current_state = 8;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 16:
- {
- action4();
- $_ngcc_current_state = 15;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 19:
- {
- $_ngcc_current_state = 18;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 31:
- {
- defaultValue = $value;
- $_ngcc_current_state = 30;
- }
- break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 8:
- {
- action2();
- $_ngcc_current_state = 7;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 3:
- {
- if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 290, wloc);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 290, wloc);
- spawnChildFromText(h, $value);
- }
- }
- }
- break;
- case 17:
- {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 315, locator,true,defaultValue,fixedValue);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new attributeDeclBody(this, super._source, $runtime, 315, locator,true,defaultValue,fixedValue);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- }
- }
- break;
- case 33:
- {
- if(($ai = $runtime.getAttributeIndex("","use"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 29;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 25:
- {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 17;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 22:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 311);
- spawnChildFromText(h, $value);
- }
- break;
- case 29:
- {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 25;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 12:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 300);
- spawnChildFromText(h, $value);
- }
- break;
- case 35:
- {
- use = $value;
- $_ngcc_current_state = 34;
- }
- break;
- case 27:
- {
- fixedValue = $value;
- $_ngcc_current_state = 26;
- }
- break;
- case 9:
- {
- $_ngcc_current_state = 8;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 16:
- {
- action4();
- $_ngcc_current_state = 15;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 5:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 19:
- {
- $_ngcc_current_state = 18;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 0:
- {
- revertToParentFromText(this, super._cookie, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 300:
- {
- groupName = ((UName)$__result__);
- $_ngcc_current_state = 11;
- }
- break;
- case 297:
- {
- $_ngcc_current_state = 8;
- }
- break;
- case 306:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 16;
- }
- break;
- case 290:
- {
- wildcard = ((WildcardImpl)$__result__);
- action0();
- $_ngcc_current_state = 2;
- }
- break;
- case 315:
- {
- anonymousDecl = ((AttributeDeclImpl)$__result__);
- action6();
- $_ngcc_current_state = 16;
- }
- break;
- case 311:
- {
- attDeclName = ((UName)$__result__);
- action5();
- $_ngcc_current_state = 21;
- }
- break;
- case 308:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 18;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return((($_ngcc_current_state == 0) || (($_ngcc_current_state == 1) || ($_ngcc_current_state == 5))));
- }
-
-
- private Ref.Attribute decl;
- private Locator wloc; // locator for wildcards
- private Locator locator;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType.java
deleted file mode 100644
index c9eae4e6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType.java
+++ /dev/null
@@ -1,2003 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class complexType extends NGCCHandler {
- private Integer finalValue;
- private String name;
- private String abstractValue;
- private Integer blockValue;
- private XSFacet facet;
- private ForeignAttributesImpl fa;
- private AnnotationImpl annotation;
- private ContentTypeImpl explicitContent;
- private UName baseTypeName;
- private String mixedValue;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public complexType(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 88;
- }
-
- public complexType(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- private void action0()throws SAXException {
-
- result.setContentType(explicitContent);
-
-}
-
- private void action1()throws SAXException {
-
- baseType = $runtime.parser.schemaSet.anyType;
- makeResult(XSType.RESTRICTION);
-
-}
-
- private void action2()throws SAXException {
-
- result.setExplicitContent(explicitContent);
- result.setContentType(
- buildComplexExtensionContentModel(explicitContent));
-
-}
-
- private void action3()throws SAXException {
-
- baseType = new DelayedRef.Type(
- $runtime, locator2, $runtime.currentSchema, baseTypeName );
- makeResult(XSType.EXTENSION);
-
-}
-
- private void action4()throws SAXException {
- locator2 = $runtime.copyLocator();
-}
-
- private void action5()throws SAXException {
-
- result.setContentType(explicitContent);
-
-}
-
- private void action6()throws SAXException {
-
- baseType = new DelayedRef.Type(
- $runtime, locator2, $runtime.currentSchema, baseTypeName );
- makeResult(XSType.RESTRICTION);
-
-}
-
- private void action7()throws SAXException {
- locator2 = $runtime.copyLocator();
-}
-
- private void action8()throws SAXException {
-
- contentType = new BaseContentRef($runtime,baseType);
- makeResult(XSType.EXTENSION);
- result.setContentType(contentType);
-
-}
-
- private void action9()throws SAXException {
-
- baseType = new DelayedRef.Type(
- $runtime, locator2, $runtime.currentSchema, baseTypeName );
-
-}
-
- private void action10()throws SAXException {
- locator2 = $runtime.copyLocator();
-}
-
- private void action11()throws SAXException {
-
- makeResult(XSType.RESTRICTION);
- result.setContentType(contentType);
-
-}
-
- private void action12()throws SAXException {
- contentSimpleType.addFacet(facet);
-}
-
- private void action13()throws SAXException {
-
- if(baseContentType==null) {
- // contentType of the base type, which must be a complex type
- baseContentType = new BaseContentSimpleTypeRef(baseType);
- }
-
- contentSimpleType = new RestrictionSimpleTypeImpl(
- $runtime.document, null/*?*/, locator2, null,
- null, true, Collections.EMPTY_SET, baseContentType );
- contentType = contentSimpleType;
-
-}
-
- private void action14()throws SAXException {
-
- baseType = new DelayedRef.Type(
- $runtime, locator2, $runtime.currentSchema, baseTypeName );
-
-}
-
- private void action15()throws SAXException {
- locator2 = $runtime.copyLocator();
-}
-
- private void action16()throws SAXException {
- locator = $runtime.copyLocator();
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 54:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 617, annotation,AnnotationContext.COMPLEXTYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 52;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 76:
- {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 72;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 49:
- {
- if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
- NGCCHandler h = new facet(this, super._source, $runtime, 610);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 48;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 7:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action7();
- $_ngcc_current_state = 24;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action4();
- $_ngcc_current_state = 15;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- break;
- case 61:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 626, annotation,AnnotationContext.COMPLEXTYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 35;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 18:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))))))) {
- NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 571, result);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 12:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")))))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 564, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 26:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 582, annotation,AnnotationContext.COMPLEXTYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 7;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 38:
- {
- action8();
- $_ngcc_current_state = 37;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 44:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 68:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 67;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 35:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action15();
- $_ngcc_current_state = 59;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action10();
- $_ngcc_current_state = 44;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- break;
- case 80:
- {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 76;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 63:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 628, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 88:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action16();
- $_ngcc_current_state = 84;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 84:
- {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 80;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 37:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 594, result);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 9:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))))))) {
- NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 560, result);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 19:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 573, annotation,AnnotationContext.COMPLEXTYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 18;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 15:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 48:
- {
- if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
- NGCCHandler h = new facet(this, super._source, $runtime, 609);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- action11();
- $_ngcc_current_state = 47;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 47:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 606, result);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 24:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 28:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 584, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 29:
- {
- if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 28;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 67:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleContent")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexContent")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")))))))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 636, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 10:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 562, annotation,AnnotationContext.COMPLEXTYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 9;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 41:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 599, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleContent"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 63;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexContent"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 29;
- }
- else {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))))))) {
- action1();
- NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 557, result);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- }
- break;
- case 21:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")))))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 575, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 72:
- {
- if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 68;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 56:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || ((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern"))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute")))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 619, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 39:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 597, annotation,AnnotationContext.COMPLEXTYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 38;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 59:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 52:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 614);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 51;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 51:
- {
- action13();
- $_ngcc_current_state = 49;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 65:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 634, null,AnnotationContext.COMPLEXTYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 54:
- {
- $_ngcc_current_state = 52;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 76:
- {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 72;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 49:
- {
- $_ngcc_current_state = 48;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 6:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexContent"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 61:
- {
- $_ngcc_current_state = 35;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 46:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 34;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 36:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 34;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 18:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 571, result);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 12:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 564, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 26:
- {
- $_ngcc_current_state = 7;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 34:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleContent"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 38:
- {
- action8();
- $_ngcc_current_state = 37;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 44:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 68:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 67;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 80:
- {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 76;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 37:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 594, result);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 84:
- {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 80;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 9:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
- NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 560, result);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 19:
- {
- $_ngcc_current_state = 18;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 15:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 48:
- {
- action11();
- $_ngcc_current_state = 47;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 47:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 606, result);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 8:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 6;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 24:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 29:
- {
- if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 28;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 67:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 636, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 9;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 41:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("extension"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 599, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- action1();
- NGCCHandler h = new complexType_complexContent_body(this, super._source, $runtime, 557, result);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 21:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 575, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 72:
- {
- if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 68;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 56:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 619, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 39:
- {
- $_ngcc_current_state = 38;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 59:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 52:
- {
- $_ngcc_current_state = 51;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 17:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 6;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 51:
- {
- action13();
- $_ngcc_current_state = 49;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 65:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 29:
- {
- if(($__uri.equals("") && $__local.equals("mixed"))) {
- $_ngcc_current_state = 31;
- }
- else {
- $_ngcc_current_state = 28;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 54:
- {
- $_ngcc_current_state = 52;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 9;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 76:
- {
- if(($__uri.equals("") && $__local.equals("final"))) {
- $_ngcc_current_state = 78;
- }
- else {
- $_ngcc_current_state = 72;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 49:
- {
- $_ngcc_current_state = 48;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 61:
- {
- $_ngcc_current_state = 35;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 72:
- {
- if(($__uri.equals("") && $__local.equals("mixed"))) {
- $_ngcc_current_state = 74;
- }
- else {
- $_ngcc_current_state = 68;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 39:
- {
- $_ngcc_current_state = 38;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 59:
- {
- if(($__uri.equals("") && $__local.equals("base"))) {
- $_ngcc_current_state = 58;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 26:
- {
- $_ngcc_current_state = 7;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 38:
- {
- action8();
- $_ngcc_current_state = 37;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 44:
- {
- if(($__uri.equals("") && $__local.equals("base"))) {
- $_ngcc_current_state = 43;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 68:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 70;
- }
- else {
- $_ngcc_current_state = 67;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 52:
- {
- $_ngcc_current_state = 51;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 51:
- {
- action13();
- $_ngcc_current_state = 49;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 80:
- {
- if(($__uri.equals("") && $__local.equals("block"))) {
- $_ngcc_current_state = 82;
- }
- else {
- $_ngcc_current_state = 76;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 84:
- {
- if(($__uri.equals("") && $__local.equals("abstract"))) {
- $_ngcc_current_state = 86;
- }
- else {
- $_ngcc_current_state = 80;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 19:
- {
- $_ngcc_current_state = 18;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 15:
- {
- if(($__uri.equals("") && $__local.equals("base"))) {
- $_ngcc_current_state = 14;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 65:
- {
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 48:
- {
- action11();
- $_ngcc_current_state = 47;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 24:
- {
- if(($__uri.equals("") && $__local.equals("base"))) {
- $_ngcc_current_state = 23;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 54:
- {
- $_ngcc_current_state = 52;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 76:
- {
- $_ngcc_current_state = 72;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 49:
- {
- $_ngcc_current_state = 48;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 30:
- {
- if(($__uri.equals("") && $__local.equals("mixed"))) {
- $_ngcc_current_state = 28;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 73:
- {
- if(($__uri.equals("") && $__local.equals("mixed"))) {
- $_ngcc_current_state = 68;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 61:
- {
- $_ngcc_current_state = 35;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 26:
- {
- $_ngcc_current_state = 7;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 38:
- {
- action8();
- $_ngcc_current_state = 37;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 68:
- {
- $_ngcc_current_state = 67;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 13:
- {
- if(($__uri.equals("") && $__local.equals("base"))) {
- $_ngcc_current_state = 12;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 85:
- {
- if(($__uri.equals("") && $__local.equals("abstract"))) {
- $_ngcc_current_state = 80;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 80:
- {
- $_ngcc_current_state = 76;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 84:
- {
- $_ngcc_current_state = 80;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 19:
- {
- $_ngcc_current_state = 18;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 48:
- {
- action11();
- $_ngcc_current_state = 47;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 29:
- {
- $_ngcc_current_state = 28;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 9;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 77:
- {
- if(($__uri.equals("") && $__local.equals("final"))) {
- $_ngcc_current_state = 72;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 72:
- {
- $_ngcc_current_state = 68;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 69:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 67;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 39:
- {
- $_ngcc_current_state = 38;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 22:
- {
- if(($__uri.equals("") && $__local.equals("base"))) {
- $_ngcc_current_state = 21;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 81:
- {
- if(($__uri.equals("") && $__local.equals("block"))) {
- $_ngcc_current_state = 76;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 42:
- {
- if(($__uri.equals("") && $__local.equals("base"))) {
- $_ngcc_current_state = 41;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 52:
- {
- $_ngcc_current_state = 51;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 51:
- {
- action13();
- $_ngcc_current_state = 49;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 57:
- {
- if(($__uri.equals("") && $__local.equals("base"))) {
- $_ngcc_current_state = 56;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 65:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 58:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 621);
- spawnChildFromText(h, $value);
- }
- break;
- case 54:
- {
- $_ngcc_current_state = 52;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 31:
- {
- mixedValue = $value;
- $_ngcc_current_state = 30;
- }
- break;
- case 76:
- {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 72;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 49:
- {
- $_ngcc_current_state = 48;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 61:
- {
- $_ngcc_current_state = 35;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 26:
- {
- $_ngcc_current_state = 7;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 38:
- {
- action8();
- $_ngcc_current_state = 37;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 44:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 68:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 67;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 80:
- {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 76;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 84:
- {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 80;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 19:
- {
- $_ngcc_current_state = 18;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 15:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 86:
- {
- abstractValue = $value;
- $_ngcc_current_state = 85;
- }
- break;
- case 48:
- {
- action11();
- $_ngcc_current_state = 47;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 24:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 29:
- {
- if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 28;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 9;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 72:
- {
- if(($ai = $runtime.getAttributeIndex("","mixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 68;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 43:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 601);
- spawnChildFromText(h, $value);
- }
- break;
- case 39:
- {
- $_ngcc_current_state = 38;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 59:
- {
- if(($ai = $runtime.getAttributeIndex("","base"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 23:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 577);
- spawnChildFromText(h, $value);
- }
- break;
- case 52:
- {
- $_ngcc_current_state = 51;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 78:
- {
- NGCCHandler h = new erSet(this, super._source, $runtime, 648);
- spawnChildFromText(h, $value);
- }
- break;
- case 70:
- {
- name = $value;
- $_ngcc_current_state = 69;
- }
- break;
- case 82:
- {
- NGCCHandler h = new erSet(this, super._source, $runtime, 653);
- spawnChildFromText(h, $value);
- }
- break;
- case 0:
- {
- revertToParentFromText(result, super._cookie, $value);
- }
- break;
- case 51:
- {
- action13();
- $_ngcc_current_state = 49;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 65:
- {
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 74:
- {
- mixedValue = $value;
- $_ngcc_current_state = 73;
- }
- break;
- case 14:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 566);
- spawnChildFromText(h, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 573:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 18;
- }
- break;
- case 636:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 65;
- }
- break;
- case 562:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 9;
- }
- break;
- case 577:
- {
- baseTypeName = ((UName)$__result__);
- action6();
- $_ngcc_current_state = 22;
- }
- break;
- case 648:
- {
- finalValue = ((Integer)$__result__);
- $_ngcc_current_state = 77;
- }
- break;
- case 614:
- {
- baseContentType = ((SimpleTypeImpl)$__result__);
- $_ngcc_current_state = 51;
- }
- break;
- case 653:
- {
- blockValue = ((Integer)$__result__);
- $_ngcc_current_state = 81;
- }
- break;
- case 566:
- {
- baseTypeName = ((UName)$__result__);
- action3();
- $_ngcc_current_state = 13;
- }
- break;
- case 621:
- {
- baseTypeName = ((UName)$__result__);
- action14();
- $_ngcc_current_state = 57;
- }
- break;
- case 617:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 52;
- }
- break;
- case 610:
- {
- facet = ((XSFacet)$__result__);
- action12();
- $_ngcc_current_state = 48;
- }
- break;
- case 626:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 35;
- }
- break;
- case 571:
- {
- explicitContent = ((ContentTypeImpl)$__result__);
- action5();
- $_ngcc_current_state = 17;
- }
- break;
- case 564:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 10;
- }
- break;
- case 582:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 7;
- }
- break;
- case 628:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 61;
- }
- break;
- case 594:
- {
- $_ngcc_current_state = 36;
- }
- break;
- case 560:
- {
- explicitContent = ((ContentTypeImpl)$__result__);
- action2();
- $_ngcc_current_state = 8;
- }
- break;
- case 606:
- {
- $_ngcc_current_state = 46;
- }
- break;
- case 609:
- {
- facet = ((XSFacet)$__result__);
- action12();
- $_ngcc_current_state = 48;
- }
- break;
- case 584:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 26;
- }
- break;
- case 599:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 39;
- }
- break;
- case 557:
- {
- explicitContent = ((ContentTypeImpl)$__result__);
- action0();
- $_ngcc_current_state = 1;
- }
- break;
- case 575:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 19;
- }
- break;
- case 601:
- {
- baseTypeName = ((UName)$__result__);
- action9();
- $_ngcc_current_state = 42;
- }
- break;
- case 619:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 54;
- }
- break;
- case 597:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 38;
- }
- break;
- case 634:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 2;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private ComplexTypeImpl result;
- private Ref.Type baseType;
- private Ref.ContentType contentType;
-
- // local variables for simpleContent/restriction
- private Ref.SimpleType baseContentType;
- private RestrictionSimpleTypeImpl contentSimpleType;
-
- private Locator locator,locator2;
-
- private static class BaseContentSimpleTypeRef implements Ref.SimpleType {
- private final Ref.Type baseType;
- private BaseContentSimpleTypeRef(Ref.Type _baseType ) { this.baseType = _baseType; }
- public XSSimpleType getType() {
- return (XSSimpleType)((XSComplexType)baseType.getType()).getContentType();
- }
- }
-
-
- // baseType and contentType must be computed before calling this method.
- private void makeResult( int derivationMethod ) {
-
- if(finalValue==null)
- finalValue = $runtime.finalDefault;
- if(blockValue==null)
- blockValue = $runtime.blockDefault;
-
- result = new ComplexTypeImpl(
- $runtime.document,
- annotation,
- locator,
- fa,
- name,
- name==null,
- $runtime.parseBoolean(abstractValue),
- derivationMethod,
- baseType,
- finalValue,
- blockValue,
- $runtime.parseBoolean(mixedValue)
- );
- }
-
- // I had to make them static inner classes (as opposed to anonymous ones),
- // so that they will not keep references to parser.
-
- private static class BaseComplexTypeContentRef implements Ref.ContentType {
- private final Ref.Type baseType;
- private BaseComplexTypeContentRef(Ref.Type _baseType) { this.baseType = _baseType; }
- public XSContentType getContentType() {
- return ((XSComplexType)baseType.getType()).getContentType();
- }
- }
- private static class InheritBaseContentTypeRef implements Ref.ContentType {
- private final Ref.Type baseType;
- private final XSContentType empty;
- private final XSContentType expContent;
- private final SchemaDocumentImpl currentDocument;
- private InheritBaseContentTypeRef(
- Ref.Type _baseType,XSContentType _explicitContent,NGCCRuntimeEx $runtime) {
-
- this.baseType = _baseType;
- this.currentDocument = $runtime.document;
- expContent = _explicitContent;
- this.empty = $runtime.parser.schemaSet.empty;
- }
- public XSContentType getContentType() {
- XSContentType baseContentType =
- ((XSComplexType)baseType.getType()).getContentType();
- if(baseContentType==empty)
- return expContent;
- else
- return new ParticleImpl( currentDocument, null, new ModelGroupImpl(
- currentDocument,
- null, null, null, XSModelGroup.SEQUENCE,
- new ParticleImpl[]{
- (ParticleImpl)baseContentType,
- (ParticleImpl)expContent}), null );
- }
- };
-
- private Ref.ContentType buildComplexExtensionContentModel( XSContentType explicitContent ) {
-
- if(explicitContent==$runtime.parser.schemaSet.empty)
- return new BaseComplexTypeContentRef(baseType);
- else
- return new InheritBaseContentTypeRef(baseType,explicitContent,$runtime);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType_complexContent_body.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType_complexContent_body.java
deleted file mode 100644
index 80fe03be..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/complexType_complexContent_body.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class complexType_complexContent_body extends NGCCHandler {
- private AttributesHolder owner;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public complexType_complexContent_body(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, AttributesHolder _owner) {
- super(source, parent, cookie);
- $runtime = runtime;
- this.owner = _owner;
- $_ngcc_current_state = 2;
- }
-
- public complexType_complexContent_body(NGCCRuntimeEx runtime, AttributesHolder _owner) {
- this(null, runtime, runtime, -1, _owner);
- }
-
- private void action0()throws SAXException {
- if(particle==null)
- particle = $runtime.parser.schemaSet.empty;
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(particle, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 2:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")))))) {
- NGCCHandler h = new particle(this, super._source, $runtime, 3);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(particle, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(particle, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
- spawnChildFromLeaveAttribute(h, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(particle, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 1:
- {
- NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
- spawnChildFromText(h, $value);
- }
- break;
- case 0:
- {
- revertToParentFromText(particle, super._cookie, $value);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 1:
- {
- action0();
- $_ngcc_current_state = 0;
- }
- break;
- case 3:
- {
- particle = ((ParticleImpl)$__result__);
- $_ngcc_current_state = 1;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private ContentTypeImpl particle;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/elementDeclBody.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/elementDeclBody.java
deleted file mode 100644
index b8f30114..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/elementDeclBody.java
+++ /dev/null
@@ -1,1179 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class elementDeclBody extends NGCCHandler {
- private Integer finalValue;
- private String name;
- private String nillable;
- private String abstractValue;
- private Integer blockValue;
- private ForeignAttributesImpl fa;
- private AnnotationImpl annotation;
- private Locator locator;
- private String defaultValue;
- private IdentityConstraintImpl idc;
- private boolean isGlobal;
- private String fixedValue;
- private UName typeName;
- private UName substRef;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public elementDeclBody(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, Locator _locator, boolean _isGlobal) {
- super(source, parent, cookie);
- $runtime = runtime;
- this.locator = _locator;
- this.isGlobal = _isGlobal;
- $_ngcc_current_state = 48;
- }
-
- public elementDeclBody(NGCCRuntimeEx runtime, Locator _locator, boolean _isGlobal) {
- this(null, runtime, runtime, -1, _locator, _isGlobal);
- }
-
- private void action0()throws SAXException {
- idcs.add(idc);
-}
-
- private void action1()throws SAXException {
-
- type = new DelayedRef.Type(
- $runtime, locator, $runtime.currentSchema, typeName );
-
-}
-
- private void action2()throws SAXException {
-
- substHeadRef = new DelayedRef.Element(
- $runtime, locator, $runtime.currentSchema, substRef );
-
-}
-
- private void action3()throws SAXException {
- formSpecified = true;
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 17:
- {
- if(($ai = $runtime.getAttributeIndex("","nillable"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 13;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 28:
- {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 24;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 0:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) {
- NGCCHandler h = new identityConstraint(this, super._source, $runtime, 6);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 32:
- {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 28;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 24:
- {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 23;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 11:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 24, null,AnnotationContext.ELEMENT_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 3;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 23:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 44:
- {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 40;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 40:
- {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 36;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 48:
- {
- if(((($ai = $runtime.getAttributeIndex("","default"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","final"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || (($ai = $runtime.getAttributeIndex("","abstract"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))))))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 1:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) {
- NGCCHandler h = new identityConstraint(this, super._source, $runtime, 7);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 3:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 19);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- NGCCHandler h = new complexType(this, super._source, $runtime, 20);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- }
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","substitutionGroup"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 36:
- {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 32;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 17:
- {
- if(($ai = $runtime.getAttributeIndex("","nillable"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 13;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 28:
- {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 24;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 32:
- {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 28;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 24:
- {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 23;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 11:
- {
- $_ngcc_current_state = 3;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 23:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 44:
- {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 40;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 40:
- {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 36;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 48:
- {
- if((($ai = $runtime.getAttributeIndex("","default"))>=0 || (($ai = $runtime.getAttributeIndex("","fixed"))>=0 || (($ai = $runtime.getAttributeIndex("","form"))>=0 || (($ai = $runtime.getAttributeIndex("","block"))>=0 || (($ai = $runtime.getAttributeIndex("","final"))>=0 || (($ai = $runtime.getAttributeIndex("","name"))>=0 || ($ai = $runtime.getAttributeIndex("","abstract"))>=0))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 3:
- {
- if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","substitutionGroup"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 36:
- {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 32;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 17:
- {
- if(($__uri.equals("") && $__local.equals("nillable"))) {
- $_ngcc_current_state = 19;
- }
- else {
- $_ngcc_current_state = 13;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 28:
- {
- if(($__uri.equals("") && $__local.equals("fixed"))) {
- $_ngcc_current_state = 30;
- }
- else {
- $_ngcc_current_state = 24;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 32:
- {
- if(($__uri.equals("") && $__local.equals("default"))) {
- $_ngcc_current_state = 34;
- }
- else {
- $_ngcc_current_state = 28;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 24:
- {
- if(($__uri.equals("") && $__local.equals("form"))) {
- $_ngcc_current_state = 26;
- }
- else {
- $_ngcc_current_state = 23;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 11:
- {
- $_ngcc_current_state = 3;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 23:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 22;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 44:
- {
- if(($__uri.equals("") && $__local.equals("abstract"))) {
- $_ngcc_current_state = 46;
- }
- else {
- $_ngcc_current_state = 40;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 40:
- {
- if(($__uri.equals("") && $__local.equals("block"))) {
- $_ngcc_current_state = 42;
- }
- else {
- $_ngcc_current_state = 36;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 48:
- {
- if((($__uri.equals("") && $__local.equals("default")) || (($__uri.equals("") && $__local.equals("fixed")) || (($__uri.equals("") && $__local.equals("form")) || (($__uri.equals("") && $__local.equals("block")) || (($__uri.equals("") && $__local.equals("final")) || (($__uri.equals("") && $__local.equals("name")) || ($__uri.equals("") && $__local.equals("abstract"))))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 3:
- {
- if(($__uri.equals("") && $__local.equals("type"))) {
- $_ngcc_current_state = 6;
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 13:
- {
- if(($__uri.equals("") && $__local.equals("substitutionGroup"))) {
- $_ngcc_current_state = 15;
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 36:
- {
- if(($__uri.equals("") && $__local.equals("final"))) {
- $_ngcc_current_state = 38;
- }
- else {
- $_ngcc_current_state = 32;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 21:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 17;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 17:
- {
- $_ngcc_current_state = 13;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 18:
- {
- if(($__uri.equals("") && $__local.equals("nillable"))) {
- $_ngcc_current_state = 13;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 25:
- {
- if(($__uri.equals("") && $__local.equals("form"))) {
- $_ngcc_current_state = 23;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 41:
- {
- if(($__uri.equals("") && $__local.equals("block"))) {
- $_ngcc_current_state = 36;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 28:
- {
- $_ngcc_current_state = 24;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 32:
- {
- $_ngcc_current_state = 28;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 24:
- {
- $_ngcc_current_state = 23;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 11:
- {
- $_ngcc_current_state = 3;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 33:
- {
- if(($__uri.equals("") && $__local.equals("default"))) {
- $_ngcc_current_state = 28;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 37:
- {
- if(($__uri.equals("") && $__local.equals("final"))) {
- $_ngcc_current_state = 32;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 44:
- {
- $_ngcc_current_state = 40;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 14:
- {
- if(($__uri.equals("") && $__local.equals("substitutionGroup"))) {
- $_ngcc_current_state = 11;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 40:
- {
- $_ngcc_current_state = 36;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 45:
- {
- if(($__uri.equals("") && $__local.equals("abstract"))) {
- $_ngcc_current_state = 40;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 3:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 13:
- {
- $_ngcc_current_state = 11;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 36:
- {
- $_ngcc_current_state = 32;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- if(($__uri.equals("") && $__local.equals("type"))) {
- $_ngcc_current_state = 1;
- action1();
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 29:
- {
- if(($__uri.equals("") && $__local.equals("fixed"))) {
- $_ngcc_current_state = 24;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 17:
- {
- if(($ai = $runtime.getAttributeIndex("","nillable"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 13;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 34:
- {
- defaultValue = $value;
- $_ngcc_current_state = 33;
- }
- break;
- case 22:
- {
- name = $value;
- $_ngcc_current_state = 21;
- }
- break;
- case 28:
- {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 24;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 32:
- {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 28;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
- }
- break;
- case 6:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 10);
- spawnChildFromText(h, $value);
- }
- break;
- case 24:
- {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 23;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 11:
- {
- $_ngcc_current_state = 3;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 23:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 44:
- {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 40;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 46:
- {
- abstractValue = $value;
- $_ngcc_current_state = 45;
- }
- break;
- case 19:
- {
- nillable = $value;
- $_ngcc_current_state = 18;
- }
- break;
- case 40:
- {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 36;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 48:
- {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 69, fa);
- spawnChildFromText(h, $value);
- }
- }
- }
- }
- }
- }
- }
- }
- break;
- case 30:
- {
- fixedValue = $value;
- $_ngcc_current_state = 29;
- }
- break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 3:
- {
- if(($ai = $runtime.getAttributeIndex("","type"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 13:
- {
- if(($ai = $runtime.getAttributeIndex("","substitutionGroup"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 38:
- {
- NGCCHandler h = new erSet(this, super._source, $runtime, 55);
- spawnChildFromText(h, $value);
- }
- break;
- case 15:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 27);
- spawnChildFromText(h, $value);
- }
- break;
- case 26:
- {
- if($value.equals("unqualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 40);
- spawnChildFromText(h, $value);
- }
- else {
- if($value.equals("qualified")) {
- NGCCHandler h = new qualification(this, super._source, $runtime, 40);
- spawnChildFromText(h, $value);
- }
- }
- }
- break;
- case 36:
- {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 32;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 42:
- {
- NGCCHandler h = new ersSet(this, super._source, $runtime, 60);
- spawnChildFromText(h, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 24:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 3;
- }
- break;
- case 27:
- {
- substRef = ((UName)$__result__);
- action2();
- $_ngcc_current_state = 14;
- }
- break;
- case 10:
- {
- typeName = ((UName)$__result__);
- $_ngcc_current_state = 5;
- }
- break;
- case 60:
- {
- blockValue = ((Integer)$__result__);
- $_ngcc_current_state = 41;
- }
- break;
- case 69:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 44;
- }
- break;
- case 19:
- {
- type = ((SimpleTypeImpl)$__result__);
- $_ngcc_current_state = 1;
- }
- break;
- case 20:
- {
- type = ((ComplexTypeImpl)$__result__);
- $_ngcc_current_state = 1;
- }
- break;
- case 40:
- {
- form = ((Boolean)$__result__).booleanValue();
- action3();
- $_ngcc_current_state = 25;
- }
- break;
- case 6:
- {
- idc = ((IdentityConstraintImpl)$__result__);
- action0();
- $_ngcc_current_state = 0;
- }
- break;
- case 7:
- {
- idc = ((IdentityConstraintImpl)$__result__);
- action0();
- $_ngcc_current_state = 0;
- }
- break;
- case 55:
- {
- finalValue = ((Integer)$__result__);
- $_ngcc_current_state = 37;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return((($_ngcc_current_state == 1) || (($_ngcc_current_state == 0) || (($_ngcc_current_state == 3) || (($_ngcc_current_state == 17) || (($_ngcc_current_state == 13) || ($_ngcc_current_state == 11)))))));
- }
-
-
- private boolean form;
- private boolean formSpecified;
- private Ref.Type type;
- private List idcs = new ArrayList(); // identity constraints
-
- private DelayedRef.Element substHeadRef;
-
- private ElementDecl makeResult() {
- if(finalValue==null)
- finalValue = new Integer($runtime.finalDefault);
- if(blockValue==null)
- blockValue = new Integer($runtime.blockDefault);
-
- if(!formSpecified)
- form = $runtime.elementFormDefault;
- if(isGlobal) // global elements are always qualified
- form = true;
-
- String tns;
- if(form) tns = $runtime.currentSchema.getTargetNamespace();
- else tns = "";
-
- if( type==null ) {
- if( substHeadRef!=null )
- type = new SubstGroupBaseTypeRef(substHeadRef);
- else
- type = $runtime.parser.schemaSet.anyType;
- }
-
- ElementDecl ed = new ElementDecl(
- $runtime,
- $runtime.document,
- annotation,
- locator,
- fa,
- tns,
- name,
- !isGlobal,
- $runtime.createXmlString(defaultValue),
- $runtime.createXmlString(fixedValue),
- $runtime.parseBoolean(nillable),
- $runtime.parseBoolean(abstractValue),
- (java.lang.Boolean)(formSpecified ? form : null),
- type,
- substHeadRef,
- blockValue.intValue(),
- finalValue.intValue(),
- idcs);
-
- // if this element has anonymous complex type, it will be set here.
- if(type instanceof ComplexTypeImpl)
- ((ComplexTypeImpl)type).setScope(ed);
- return ed;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/erSet.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/erSet.java
deleted file mode 100644
index cb7e8e0b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/erSet.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class erSet extends NGCCHandler {
- private String v;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public erSet(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 1;
- }
-
- public erSet(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
- }
- break;
- case 1:
- {
- v = $value;
- $_ngcc_current_state = 0;
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private Integer makeResult() {
- if(v==null) return new Integer($runtime.finalDefault);
-
- if(v.indexOf("#all")!=-1)
- return new Integer(XSType.EXTENSION|XSType.RESTRICTION);
-
- int r = 0;
-
- if(v.indexOf("extension")!=-1) r|=XSType.EXTENSION;
- if(v.indexOf("restriction")!=-1) r|=XSType.RESTRICTION;
-
- return new Integer(r);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/ersSet.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/ersSet.java
deleted file mode 100644
index 7a4efcf2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/ersSet.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class ersSet extends NGCCHandler {
- private String v;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public ersSet(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 1;
- }
-
- public ersSet(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
- }
- break;
- case 1:
- {
- v = $value;
- $_ngcc_current_state = 0;
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private Integer makeResult() {
- if(v==null) return new Integer($runtime.blockDefault);
-
- if(v.indexOf("#all")!=-1)
- return new Integer(
- XSType.EXTENSION|XSType.RESTRICTION|XSType.SUBSTITUTION);
-
- int r = 0;
-
- if(v.indexOf("extension")!=-1) r|=XSType.EXTENSION;
- if(v.indexOf("restriction")!=-1) r|=XSType.RESTRICTION;
- if(v.indexOf("substitution")!=-1) r|=XSType.SUBSTITUTION;
-
- return new Integer(r);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/facet.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/facet.java
deleted file mode 100644
index 81fc9b06..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/facet.java
+++ /dev/null
@@ -1,401 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class facet extends NGCCHandler {
- private AnnotationImpl annotation;
- private String fixed;
- private String value;
- private ForeignAttributesImpl fa;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public facet(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 12;
- }
-
- public facet(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- private void action0()throws SAXException {
-
- result = new FacetImpl( $runtime.document,
- annotation, locator, fa, $localName/*name of the facet*/,
- $runtime.createXmlString(value), $runtime.parseBoolean(fixed) );
-
-}
-
- private void action1()throws SAXException {
- locator=$runtime.copyLocator();
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 12:
- {
- if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action1();
- $_ngcc_current_state = 11;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 4:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 230, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 11:
- {
- if(($ai = $runtime.getAttributeIndex("","value"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 228, null,AnnotationContext.SIMPLETYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 4:
- {
- if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 230, fa);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 1:
- {
- if((((((((((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minExclusive")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxExclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxInclusive"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("totalDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("fractionDigits"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("length"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("maxLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("minLength"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("enumeration"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("whiteSpace"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("pattern")))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- action0();
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 11:
- {
- if(($ai = $runtime.getAttributeIndex("","value"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 5:
- {
- if(($__uri.equals("") && $__local.equals("fixed"))) {
- $_ngcc_current_state = 7;
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 11:
- {
- if(($__uri.equals("") && $__local.equals("value"))) {
- $_ngcc_current_state = 10;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 5:
- {
- $_ngcc_current_state = 4;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 9:
- {
- if(($__uri.equals("") && $__local.equals("value"))) {
- $_ngcc_current_state = 5;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 6:
- {
- if(($__uri.equals("") && $__local.equals("fixed"))) {
- $_ngcc_current_state = 4;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 7:
- {
- fixed = $value;
- $_ngcc_current_state = 6;
- }
- break;
- case 11:
- {
- if(($ai = $runtime.getAttributeIndex("","value"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 10:
- {
- value = $value;
- $_ngcc_current_state = 9;
- }
- break;
- case 0:
- {
- revertToParentFromText(result, super._cookie, $value);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 230:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 2;
- }
- break;
- case 228:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 1;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private FacetImpl result;
- private Locator locator;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/foreignAttributes.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/foreignAttributes.java
deleted file mode 100644
index 1f362bc5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/foreignAttributes.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class foreignAttributes extends NGCCHandler {
- private ForeignAttributesImpl current;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public foreignAttributes(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, ForeignAttributesImpl _current) {
- super(source, parent, cookie);
- $runtime = runtime;
- this.current = _current;
- $_ngcc_current_state = 0;
- }
-
- public foreignAttributes(NGCCRuntimeEx runtime, ForeignAttributesImpl _current) {
- this(null, runtime, runtime, -1, _current);
- }
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- ForeignAttributesImpl makeResult() {
- return $runtime.parseForeignAttributes(current);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/group.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/group.java
deleted file mode 100644
index 3afa0b9a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/group.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class group extends NGCCHandler {
- private AnnotationImpl annotation;
- private String name;
- private ModelGroupImpl term;
- private ForeignAttributesImpl fa;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public group(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 15;
- }
-
- public group(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- private void action0()throws SAXException {
-
- result = new ModelGroupDeclImpl( $runtime.document,
- annotation, loc, fa,
- $runtime.currentSchema.getTargetNamespace(),
- name,
- term
- );
-
-}
-
- private void action1()throws SAXException {
-
- mloc = $runtime.copyLocator();
- compositorName = $localName;
-
-}
-
- private void action2()throws SAXException {
- loc = $runtime.copyLocator();
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 10:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 5:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 357, null);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 11:
- {
- if(($ai = $runtime.getAttributeIndex("","ID"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 10;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 6:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 359, null,AnnotationContext.MODELGROUP_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 5;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 4:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 3;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 15:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action2();
- $_ngcc_current_state = 11;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 3:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))))))) {
- NGCCHandler h = new modelGroupBody(this, super._source, $runtime, 355, mloc,compositorName);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 10:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 11:
- {
- if(($ai = $runtime.getAttributeIndex("","ID"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 10;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- action0();
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 6:
- {
- $_ngcc_current_state = 5;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 3:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
- NGCCHandler h = new modelGroupBody(this, super._source, $runtime, 355, mloc,compositorName);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 10:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 9;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 11:
- {
- if(($__uri.equals("") && $__local.equals("ID"))) {
- $_ngcc_current_state = 13;
- }
- else {
- $_ngcc_current_state = 10;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 6:
- {
- $_ngcc_current_state = 5;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 11:
- {
- $_ngcc_current_state = 10;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 6:
- {
- $_ngcc_current_state = 5;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 12:
- {
- if(($__uri.equals("") && $__local.equals("ID"))) {
- $_ngcc_current_state = 10;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 8:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 6;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 10:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 11:
- {
- if(($ai = $runtime.getAttributeIndex("","ID"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 10;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 6:
- {
- $_ngcc_current_state = 5;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 0:
- {
- revertToParentFromText(result, super._cookie, $value);
- }
- break;
- case 9:
- {
- name = $value;
- $_ngcc_current_state = 8;
- }
- break;
- case 13:
- {
- $_ngcc_current_state = 12;
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 357:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- action1();
- $_ngcc_current_state = 4;
- }
- break;
- case 359:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 5;
- }
- break;
- case 355:
- {
- term = ((ModelGroupImpl)$__result__);
- $_ngcc_current_state = 2;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private ModelGroupDeclImpl result;
- private Locator loc,mloc;
- private String compositorName;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/identityConstraint.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/identityConstraint.java
deleted file mode 100644
index 4acbf50c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/identityConstraint.java
+++ /dev/null
@@ -1,594 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class identityConstraint extends NGCCHandler {
- private String name;
- private UName ref;
- private ForeignAttributesImpl fa;
- private AnnotationImpl ann;
- private XPathImpl field;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public identityConstraint(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 18;
- }
-
- public identityConstraint(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- private void action0()throws SAXException {
- fields.add(field);
-}
-
- private void action1()throws SAXException {
-
- refer = new DelayedRef.IdentityConstraint(
- $runtime, $runtime.copyLocator(), $runtime.currentSchema, ref );
-
-}
-
- private void action2()throws SAXException {
- if($localName.equals("key"))
- category = XSIdentityConstraint.KEY;
- else
- if($localName.equals("keyref"))
- category = XSIdentityConstraint.KEYREF;
- else
- if($localName.equals("unique"))
- category = XSIdentityConstraint.UNIQUE;
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 16:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("field"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 3;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 17:
- {
- if((($ai = $runtime.getAttributeIndex("","name"))>=0 && (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("selector")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 287, null);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 7:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("selector"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 6;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 18:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action2();
- $_ngcc_current_state = 17;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 3:
- {
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 270);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 4:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("field"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 3;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 8:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 277, null,AnnotationContext.IDENTITY_CONSTRAINT);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 7;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 10:
- {
- if(($ai = $runtime.getAttributeIndex("","refer"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 8;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 274);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 5:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("selector"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 4;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 16:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 1:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("field"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 17:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 287, null);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 3:
- {
- if((($ai = $runtime.getAttributeIndex("","xpath"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("field")))) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 270);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 7;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 10:
- {
- if(($ai = $runtime.getAttributeIndex("","refer"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 8;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 6:
- {
- if((($ai = $runtime.getAttributeIndex("","xpath"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("selector")))) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 274);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 16:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 15;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 17:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 287, null);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 3:
- {
- if(($__uri.equals("") && $__local.equals("xpath"))) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 270);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 7;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 10:
- {
- if(($__uri.equals("") && $__local.equals("refer"))) {
- $_ngcc_current_state = 12;
- }
- else {
- $_ngcc_current_state = 8;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 6:
- {
- if(($__uri.equals("") && $__local.equals("xpath"))) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 274);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 14:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 10;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 7;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 8;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 11:
- {
- if(($__uri.equals("") && $__local.equals("refer"))) {
- $_ngcc_current_state = 8;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 15:
- {
- name = $value;
- $_ngcc_current_state = 14;
- }
- break;
- case 16:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
- }
- break;
- case 12:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 280);
- spawnChildFromText(h, $value);
- }
- break;
- case 17:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 287, null);
- spawnChildFromText(h, $value);
- }
- }
- break;
- case 3:
- {
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 270);
- spawnChildFromText(h, $value);
- }
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 7;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 10:
- {
- if(($ai = $runtime.getAttributeIndex("","refer"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 8;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- NGCCHandler h = new xpath(this, super._source, $runtime, 274);
- spawnChildFromText(h, $value);
- }
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 270:
- {
- field = ((XPathImpl)$__result__);
- action0();
- $_ngcc_current_state = 2;
- }
- break;
- case 287:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 16;
- }
- break;
- case 280:
- {
- ref = ((UName)$__result__);
- action1();
- $_ngcc_current_state = 11;
- }
- break;
- case 277:
- {
- ann = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 7;
- }
- break;
- case 274:
- {
- selector = ((XPathImpl)$__result__);
- $_ngcc_current_state = 5;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private short category;
- private List fields = new ArrayList();
- private XPathImpl selector;
- private DelayedRef.IdentityConstraint refer = null;
-
- private IdentityConstraintImpl makeResult() {
- return new IdentityConstraintImpl($runtime.document,ann,$runtime.copyLocator(),fa,
- category,name,selector,fields,refer);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/importDecl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/importDecl.java
deleted file mode 100644
index 6695620e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/importDecl.java
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class importDecl extends NGCCHandler {
- private String ns;
- private String schemaLocation;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public importDecl(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 12;
- }
-
- public importDecl(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- private void action0()throws SAXException {
-
- if(ns==null) ns="";
- $runtime.importSchema( ns,schemaLocation );
-
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 4:
- {
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 8:
- {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 12:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("import"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 8;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 340, null,AnnotationContext.SCHEMA);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 4:
- {
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 8:
- {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("import"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- action0();
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 4:
- {
- if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
- $_ngcc_current_state = 6;
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 8:
- {
- if(($__uri.equals("") && $__local.equals("namespace"))) {
- $_ngcc_current_state = 10;
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 9:
- {
- if(($__uri.equals("") && $__local.equals("namespace"))) {
- $_ngcc_current_state = 4;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 4;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
- $_ngcc_current_state = 2;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 4:
- {
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 8:
- {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 10:
- {
- ns = $value;
- $_ngcc_current_state = 9;
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 0:
- {
- revertToParentFromText(this, super._cookie, $value);
- }
- break;
- case 6:
- {
- schemaLocation = $value;
- $_ngcc_current_state = 5;
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 340:
- {
- $_ngcc_current_state = 1;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/includeDecl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/includeDecl.java
deleted file mode 100644
index 1052ef2f..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/includeDecl.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class includeDecl extends NGCCHandler {
- private String schemaLocation;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public includeDecl(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 7;
- }
-
- public includeDecl(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- private void action0()throws SAXException {
- $runtime.includeSchema( schemaLocation );
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 372, null,AnnotationContext.SCHEMA);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 7:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 6;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- action0();
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 6:
- {
- if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
- $_ngcc_current_state = 5;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
- $_ngcc_current_state = 2;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 0:
- {
- revertToParentFromText(this, super._cookie, $value);
- }
- break;
- case 5:
- {
- schemaLocation = $value;
- $_ngcc_current_state = 4;
- }
- break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 372:
- {
- $_ngcc_current_state = 1;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/modelGroupBody.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/modelGroupBody.java
deleted file mode 100644
index 54f0ee6e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/modelGroupBody.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-import java.util.Vector;
-
-
-class modelGroupBody extends NGCCHandler {
- private AnnotationImpl annotation;
- private String compositorName;
- private Locator locator;
- private ParticleImpl childParticle;
- private ForeignAttributesImpl fa;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public modelGroupBody(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, Locator _locator, String _compositorName) {
- super(source, parent, cookie);
- $runtime = runtime;
- this.locator = _locator;
- this.compositorName = _compositorName;
- $_ngcc_current_state = 6;
- }
-
- public modelGroupBody(NGCCRuntimeEx runtime, Locator _locator, String _compositorName) {
- this(null, runtime, runtime, -1, _locator, _compositorName);
- }
-
- private void action0()throws SAXException {
-
- XSModelGroup.Compositor compositor = null;
- if(compositorName.equals("all")) compositor = XSModelGroup.ALL;
- if(compositorName.equals("sequence")) compositor = XSModelGroup.SEQUENCE;
- if(compositorName.equals("choice")) compositor = XSModelGroup.CHOICE;
- if(compositor==null)
- throw new InternalError("unable to process "+compositorName);
-
- result = new ModelGroupImpl( $runtime.document, annotation, locator, fa, compositor,
- (ParticleImpl[])particles.toArray(new ParticleImpl[0]));
-
-}
-
- private void action1()throws SAXException {
-
- particles.add(childParticle);
-
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 4:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 174, null,AnnotationContext.MODELGROUP);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 2:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")))))) {
- NGCCHandler h = new particle(this, super._source, $runtime, 171);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 6:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 176, null);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 176, null);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 1:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")))))) {
- NGCCHandler h = new particle(this, super._source, $runtime, 170);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- action0();
- $_ngcc_current_state = 0;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 6:
- {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 176, null);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- action0();
- $_ngcc_current_state = 0;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 6:
- {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 176, null);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- action0();
- $_ngcc_current_state = 0;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 6:
- {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 176, null);
- spawnChildFromLeaveAttribute(h, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- action0();
- $_ngcc_current_state = 0;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromText(result, super._cookie, $value);
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 6:
- {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 176, null);
- spawnChildFromText(h, $value);
- }
- break;
- case 1:
- {
- action0();
- $_ngcc_current_state = 0;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 174:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 2;
- }
- break;
- case 176:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 4;
- }
- break;
- case 171:
- {
- childParticle = ((ParticleImpl)$__result__);
- action1();
- $_ngcc_current_state = 1;
- }
- break;
- case 170:
- {
- childParticle = ((ParticleImpl)$__result__);
- action1();
- $_ngcc_current_state = 1;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return((($_ngcc_current_state == 1) || (($_ngcc_current_state == 2) || (($_ngcc_current_state == 4) || ($_ngcc_current_state == 0)))));
- }
-
-
- private ModelGroupImpl result;
-
- private final List particles = new ArrayList();
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/notation.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/notation.java
deleted file mode 100644
index 6bcb4e8c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/notation.java
+++ /dev/null
@@ -1,483 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class notation extends NGCCHandler {
- private String name;
- private String pub;
- private ForeignAttributesImpl fa;
- private String sys;
- private AnnotationImpl ann;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public notation(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 16;
- }
-
- public notation(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- private void action0()throws SAXException {
- loc = $runtime.copyLocator();
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 209, null,AnnotationContext.NOTATION);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 16:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action0();
- $_ngcc_current_state = 15;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 14:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 15:
- {
- if((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 4:
- {
- if(($ai = $runtime.getAttributeIndex("","system"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 8:
- {
- if(($ai = $runtime.getAttributeIndex("","public"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 14:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 15:
- {
- if((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 4:
- {
- if(($ai = $runtime.getAttributeIndex("","system"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 8:
- {
- if(($ai = $runtime.getAttributeIndex("","public"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 14:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 13;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 15:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 4:
- {
- if(($__uri.equals("") && $__local.equals("system"))) {
- $_ngcc_current_state = 6;
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 8:
- {
- if(($__uri.equals("") && $__local.equals("public"))) {
- $_ngcc_current_state = 10;
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 9:
- {
- if(($__uri.equals("") && $__local.equals("public"))) {
- $_ngcc_current_state = 4;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 12:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 8;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 5:
- {
- if(($__uri.equals("") && $__local.equals("system"))) {
- $_ngcc_current_state = 2;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 4:
- {
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 4;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 10:
- {
- pub = $value;
- $_ngcc_current_state = 9;
- }
- break;
- case 14:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 15:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null);
- spawnChildFromText(h, $value);
- }
- }
- break;
- case 4:
- {
- if(($ai = $runtime.getAttributeIndex("","system"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 8:
- {
- if(($ai = $runtime.getAttributeIndex("","public"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 4;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 13:
- {
- name = $value;
- $_ngcc_current_state = 12;
- }
- break;
- case 6:
- {
- sys = $value;
- $_ngcc_current_state = 5;
- }
- break;
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 209:
- {
- ann = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 1;
- }
- break;
- case 224:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 14;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private Locator loc;
- private XSNotation makeResult() {
- return new NotationImpl( $runtime.document,ann,loc,fa,name,pub,sys);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/occurs.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/occurs.java
deleted file mode 100644
index 8b384318..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/occurs.java
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-import java.math.BigInteger;
-
-
-class occurs extends NGCCHandler {
- private String v;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public occurs(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 5;
- }
-
- public occurs(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- private void action0()throws SAXException {
- min = new BigInteger(v);
-}
-
- private void action1()throws SAXException {
- max=BigInteger.valueOf(-1);
-}
-
- private void action2()throws SAXException {
- max = new BigInteger(v);
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- if(($__uri.equals("") && $__local.equals("minOccurs"))) {
- $_ngcc_current_state = 3;
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- if(($__uri.equals("") && $__local.equals("maxOccurs"))) {
- $_ngcc_current_state = 7;
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- if(($__uri.equals("") && $__local.equals("minOccurs"))) {
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 5:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 6:
- {
- if(($__uri.equals("") && $__local.equals("maxOccurs"))) {
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 1:
- {
- if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 0:
- {
- revertToParentFromText(this, super._cookie, $value);
- }
- break;
- case 3:
- {
- v = $value;
- $_ngcc_current_state = 2;
- action0();
- }
- break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 7:
- {
- if($value.equals("unbounded")) {
- $_ngcc_current_state = 6;
- action1();
- }
- else {
- v = $value;
- $_ngcc_current_state = 6;
- action2();
- }
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- }
- }
-
- public boolean accepted() {
- return((($_ngcc_current_state == 5) || (($_ngcc_current_state == 0) || ($_ngcc_current_state == 1))));
- }
-
-
- BigInteger max = BigInteger.valueOf(1);
- BigInteger min = BigInteger.valueOf(1);
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/particle.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/particle.java
deleted file mode 100644
index 63bbafa8..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/particle.java
+++ /dev/null
@@ -1,1013 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class particle extends NGCCHandler {
- private AnnotationImpl annotation;
- private ElementDecl anonymousElementDecl;
- private WildcardImpl wcBody;
- private ModelGroupImpl term;
- private UName elementTypeName;
- private occurs occurs;
- private UName groupName;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public particle(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 1;
- }
-
- public particle(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- private void action0()throws SAXException {
-
- result = new ParticleImpl( $runtime.document, null, wcBody, wloc, occurs.max, occurs.min );
-
-}
-
- private void action1()throws SAXException {
- wloc = $runtime.copyLocator();
-}
-
- private void action2()throws SAXException {
-
- result = new ParticleImpl( $runtime.document, null,
- anonymousElementDecl,
- loc, occurs.max, occurs.min );
-
-}
-
- private void action3()throws SAXException {
-
- result = new ParticleImpl( $runtime.document, annotation, new DelayedRef.Element(
- $runtime, loc, $runtime.currentSchema, elementTypeName ),
- loc, occurs.max, occurs.min );
-
-}
-
- private void action4()throws SAXException {
- loc = $runtime.copyLocator();
-}
-
- private void action5()throws SAXException {
-
- result = new ParticleImpl( $runtime.document, annotation, new DelayedRef.ModelGroup(
- $runtime, loc, $runtime.currentSchema, groupName ),
- loc, occurs.max, occurs.min );
-
-}
-
- private void action6()throws SAXException {
- loc = $runtime.copyLocator();
-}
-
- private void action7()throws SAXException {
-
- result = new ParticleImpl( $runtime.document, null, term, loc, occurs.max, occurs.min );
-
-}
-
- private void action8()throws SAXException {
-
- compositorName = $localName;
- loc = $runtime.copyLocator();
-
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 29:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))))))) {
- NGCCHandler h = new modelGroupBody(this, super._source, $runtime, 136, loc,compositorName);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 4:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || ((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || ((($ai = $runtime.getAttributeIndex("","namespace"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || (($ai = $runtime.getAttributeIndex("","processContents"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 107);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 26:
- {
- if(((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || ((($ai = $runtime.getAttributeIndex("","ref"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) || (($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 132);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 1:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action8();
- $_ngcc_current_state = 30;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action6();
- $_ngcc_current_state = 26;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action4();
- $_ngcc_current_state = 16;
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action1();
- $_ngcc_current_state = 4;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 20:
- {
- action5();
- $_ngcc_current_state = 19;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 8:
- {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if((($ai = $runtime.getAttributeIndex("","default"))>=0 || (($ai = $runtime.getAttributeIndex("","fixed"))>=0 || (($ai = $runtime.getAttributeIndex("","form"))>=0 || (($ai = $runtime.getAttributeIndex("","final"))>=0 || (($ai = $runtime.getAttributeIndex("","block"))>=0 || (($ai = $runtime.getAttributeIndex("","name"))>=0 || ($ai = $runtime.getAttributeIndex("","abstract"))>=0))))))) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- break;
- case 11:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 115, null,AnnotationContext.PARTICLE);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 10;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 25:
- {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 10:
- {
- action3();
- $_ngcc_current_state = 7;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 3:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($ai = $runtime.getAttributeIndex("","namespace"))>=0 || ($ai = $runtime.getAttributeIndex("","processContents"))>=0))) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 106, wloc);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 16:
- {
- if(((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","default"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","final"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","ref"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || (($ai = $runtime.getAttributeIndex("","abstract"))>=0 && (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("key")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("keyref"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("unique")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))))))))))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 121);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 21:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 127, null,AnnotationContext.PARTICLE);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 20;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 30:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || ((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || ((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ((((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))))))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 137);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 29:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
- NGCCHandler h = new modelGroupBody(this, super._source, $runtime, 136, loc,compositorName);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 4:
- {
- if(((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ((($ai = $runtime.getAttributeIndex("","namespace"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ((($ai = $runtime.getAttributeIndex("","processContents"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 107);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 26:
- {
- if(((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) || ((($ai = $runtime.getAttributeIndex("","ref"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) || (($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 132);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 8:
- {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- if(((($ai = $runtime.getAttributeIndex("","default"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","final"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || (($ai = $runtime.getAttributeIndex("","abstract"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")))))))))) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- }
- break;
- case 20:
- {
- action5();
- $_ngcc_current_state = 19;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 11:
- {
- $_ngcc_current_state = 10;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 25:
- {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 19:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 10:
- {
- action3();
- $_ngcc_current_state = 7;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 7:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 3:
- {
- if(((($ai = $runtime.getAttributeIndex("","namespace"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ((($ai = $runtime.getAttributeIndex("","processContents"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any"))))) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 106, wloc);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 16:
- {
- if(((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","default"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","fixed"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","form"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","final"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","block"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","ref"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || ((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))) || (($ai = $runtime.getAttributeIndex("","abstract"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))))))))))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 121);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 21:
- {
- $_ngcc_current_state = 20;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 30:
- {
- if(((($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0 && ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) || ((($ai = $runtime.getAttributeIndex("","minOccurs"))>=0 && ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) || ((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 137);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 28:
- {
- if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 8:
- {
- if(($__uri.equals("") && $__local.equals("ref"))) {
- $_ngcc_current_state = 14;
- }
- else {
- if((($__uri.equals("") && $__local.equals("default")) || (($__uri.equals("") && $__local.equals("fixed")) || (($__uri.equals("") && $__local.equals("form")) || (($__uri.equals("") && $__local.equals("final")) || (($__uri.equals("") && $__local.equals("block")) || (($__uri.equals("") && $__local.equals("name")) || ($__uri.equals("") && $__local.equals("abstract"))))))))) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- }
- break;
- case 20:
- {
- action5();
- $_ngcc_current_state = 19;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 11:
- {
- $_ngcc_current_state = 10;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 25:
- {
- if(($__uri.equals("") && $__local.equals("ref"))) {
- $_ngcc_current_state = 24;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 4:
- {
- if((($__uri.equals("") && $__local.equals("maxOccurs")) || (($__uri.equals("") && $__local.equals("minOccurs")) || (($__uri.equals("") && $__local.equals("namespace")) || ($__uri.equals("") && $__local.equals("processContents")))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 107);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 10:
- {
- action3();
- $_ngcc_current_state = 7;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 26:
- {
- if((($__uri.equals("") && $__local.equals("maxOccurs")) || (($__uri.equals("") && $__local.equals("ref")) || ($__uri.equals("") && $__local.equals("minOccurs"))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 132);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 3:
- {
- if((($__uri.equals("") && $__local.equals("namespace")) || ($__uri.equals("") && $__local.equals("processContents")))) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 106, wloc);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 16:
- {
- if((($__uri.equals("") && $__local.equals("maxOccurs")) || (($__uri.equals("") && $__local.equals("default")) || (($__uri.equals("") && $__local.equals("fixed")) || (($__uri.equals("") && $__local.equals("form")) || (($__uri.equals("") && $__local.equals("final")) || (($__uri.equals("") && $__local.equals("block")) || (($__uri.equals("") && $__local.equals("ref")) || (($__uri.equals("") && $__local.equals("minOccurs")) || (($__uri.equals("") && $__local.equals("name")) || ($__uri.equals("") && $__local.equals("abstract")))))))))))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 121);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 21:
- {
- $_ngcc_current_state = 20;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 30:
- {
- if((($__uri.equals("") && $__local.equals("maxOccurs")) || ($__uri.equals("") && $__local.equals("minOccurs")))) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 137);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 23:
- {
- if(($__uri.equals("") && $__local.equals("ref"))) {
- $_ngcc_current_state = 21;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 20:
- {
- action5();
- $_ngcc_current_state = 19;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 11:
- {
- $_ngcc_current_state = 10;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 10:
- {
- action3();
- $_ngcc_current_state = 7;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 21:
- {
- $_ngcc_current_state = 20;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 13:
- {
- if(($__uri.equals("") && $__local.equals("ref"))) {
- $_ngcc_current_state = 11;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 4:
- {
- if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 107);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 107);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 107);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 107);
- spawnChildFromText(h, $value);
- }
- }
- }
- }
- }
- break;
- case 26:
- {
- if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 132);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 132);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 132);
- spawnChildFromText(h, $value);
- }
- }
- }
- }
- break;
- case 14:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 118);
- spawnChildFromText(h, $value);
- }
- break;
- case 24:
- {
- NGCCHandler h = new qname(this, super._source, $runtime, 130);
- spawnChildFromText(h, $value);
- }
- break;
- case 0:
- {
- revertToParentFromText(result, super._cookie, $value);
- }
- break;
- case 20:
- {
- action5();
- $_ngcc_current_state = 19;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 8:
- {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- NGCCHandler h = new elementDeclBody(this, super._source, $runtime, 112, loc,false);
- spawnChildFromText(h, $value);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- break;
- case 11:
- {
- $_ngcc_current_state = 10;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 25:
- {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 10:
- {
- action3();
- $_ngcc_current_state = 7;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 3:
- {
- if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 106, wloc);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- NGCCHandler h = new wildcardBody(this, super._source, $runtime, 106, wloc);
- spawnChildFromText(h, $value);
- }
- }
- }
- break;
- case 16:
- {
- if(($ai = $runtime.getAttributeIndex("","abstract"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 121);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 121);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 121);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","ref"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 121);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","block"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 121);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 121);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","form"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 121);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","fixed"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 121);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","default"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 121);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 121);
- spawnChildFromText(h, $value);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- break;
- case 21:
- {
- $_ngcc_current_state = 20;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 30:
- {
- if(($ai = $runtime.getAttributeIndex("","minOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 137);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","maxOccurs"))>=0) {
- NGCCHandler h = new occurs(this, super._source, $runtime, 137);
- spawnChildFromText(h, $value);
- }
- }
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 136:
- {
- term = ((ModelGroupImpl)$__result__);
- action7();
- $_ngcc_current_state = 28;
- }
- break;
- case 107:
- {
- occurs = ((occurs)$__result__);
- $_ngcc_current_state = 3;
- }
- break;
- case 106:
- {
- wcBody = ((WildcardImpl)$__result__);
- action0();
- $_ngcc_current_state = 2;
- }
- break;
- case 121:
- {
- occurs = ((occurs)$__result__);
- $_ngcc_current_state = 8;
- }
- break;
- case 127:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 20;
- }
- break;
- case 137:
- {
- occurs = ((occurs)$__result__);
- $_ngcc_current_state = 29;
- }
- break;
- case 132:
- {
- occurs = ((occurs)$__result__);
- $_ngcc_current_state = 25;
- }
- break;
- case 118:
- {
- elementTypeName = ((UName)$__result__);
- $_ngcc_current_state = 13;
- }
- break;
- case 130:
- {
- groupName = ((UName)$__result__);
- $_ngcc_current_state = 23;
- }
- break;
- case 112:
- {
- anonymousElementDecl = ((ElementDecl)$__result__);
- action2();
- $_ngcc_current_state = 7;
- }
- break;
- case 115:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 10;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- private Locator wloc;
- private Locator loc;
- private ParticleImpl result;
- private String compositorName;
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/qname.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/qname.java
deleted file mode 100644
index 160d0640..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/qname.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class qname extends NGCCHandler {
- private String qvalue;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public qname(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 1;
- }
-
- public qname(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterElement($runtime.parseUName(qvalue), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveElement($runtime.parseUName(qvalue), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterAttribute($runtime.parseUName(qvalue), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute($runtime.parseUName(qvalue), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromText($runtime.parseUName(qvalue), super._cookie, $value);
- }
- break;
- case 1:
- {
- qvalue = $value;
- $_ngcc_current_state = 0;
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/qualification.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/qualification.java
deleted file mode 100644
index 0298b549..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/qualification.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class qualification extends NGCCHandler {
- private String text;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public qualification(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 1;
- }
-
- public qualification(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterElement(new Boolean(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveElement(new Boolean(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterAttribute(new Boolean(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute(new Boolean(text.trim().equals("qualified")), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromText(new Boolean(text.trim().equals("qualified")), super._cookie, $value);
- }
- break;
- case 1:
- {
- if($value.equals("qualified")) {
- text = $value;
- $_ngcc_current_state = 0;
- }
- else {
- if($value.equals("unqualified")) {
- text = $value;
- $_ngcc_current_state = 0;
- }
- }
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/redefine.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/redefine.java
deleted file mode 100644
index 4f443201..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/redefine.java
+++ /dev/null
@@ -1,452 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class redefine extends NGCCHandler {
- private String schemaLocation;
- private ModelGroupDeclImpl newGrp;
- private AttGroupDeclImpl newAg;
- private SimpleTypeImpl newSt;
- private ComplexTypeImpl newCt;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public redefine(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 15;
- }
-
- public redefine(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- private void action0()throws SAXException {
- XSAttGroupDecl oldAg = $runtime.currentSchema.getAttGroupDecl(newAg.getName());
- if(oldAg==null) {
- $runtime.reportError( Messages.format(Messages.ERR_UNDEFINED_ATTRIBUTEGROUP,newAg.getName()) );
- } else {
- newAg.redefine((AttGroupDeclImpl)oldAg);
- $runtime.currentSchema.addAttGroupDecl(newAg,true);
- }
-}
-
- private void action1()throws SAXException {
- XSModelGroupDecl oldGrp = $runtime.currentSchema.getModelGroupDecl(newGrp.getName());
- if(oldGrp==null) {
- $runtime.reportError( Messages.format(Messages.ERR_UNDEFINED_MODELGROUP,newGrp.getName()) );
- } else {
- newGrp.redefine((ModelGroupDeclImpl)oldGrp);
- $runtime.currentSchema.addModelGroupDecl(newGrp,true);
- }
-}
-
- private void action2()throws SAXException {
- XSComplexType oldCt = $runtime.currentSchema.getComplexType(newCt.getName());
- if(oldCt==null) {
- $runtime.reportError( Messages.format(Messages.ERR_UNDEFINED_COMPLEXTYPE,newCt.getName()) );
- } else {
- newCt.redefine((ComplexTypeImpl)oldCt);
- $runtime.currentSchema.addComplexType(newCt,true);
- }
-}
-
- private void action3()throws SAXException {
- XSSimpleType oldSt = $runtime.currentSchema.getSimpleType(newSt.getName());
- if(oldSt==null) {
- $runtime.reportError( Messages.format(Messages.ERR_UNDEFINED_SIMPLETYPE,newSt.getName()) );
- } else {
- newSt.redefine((SimpleTypeImpl)oldSt);
- $runtime.currentSchema.addSimpleType(newSt,true);
- }
-}
-
- private void action4()throws SAXException {
- $runtime.includeSchema( schemaLocation );
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 684, null,AnnotationContext.SCHEMA);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 685);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- NGCCHandler h = new complexType(this, super._source, $runtime, 686);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
- NGCCHandler h = new group(this, super._source, $runtime, 687);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- NGCCHandler h = new attributeGroupDecl(this, super._source, $runtime, 688);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- }
- }
- }
- break;
- case 14:
- {
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 689, null,AnnotationContext.SCHEMA);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- NGCCHandler h = new simpleType(this, super._source, $runtime, 690);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
- NGCCHandler h = new complexType(this, super._source, $runtime, 691);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
- NGCCHandler h = new group(this, super._source, $runtime, 692);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
- NGCCHandler h = new attributeGroupDecl(this, super._source, $runtime, 693);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- }
- }
- }
- }
- break;
- case 15:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("redefine"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- $_ngcc_current_state = 14;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("redefine"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 14:
- {
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 14:
- {
- if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
- $_ngcc_current_state = 13;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 12:
- {
- if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
- $_ngcc_current_state = 2;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromText(this, super._cookie, $value);
- }
- break;
- case 14:
- {
- if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 2:
- {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 13:
- {
- schemaLocation = $value;
- $_ngcc_current_state = 12;
- action4();
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 689:
- {
- $_ngcc_current_state = 1;
- }
- break;
- case 690:
- {
- newSt = ((SimpleTypeImpl)$__result__);
- action3();
- $_ngcc_current_state = 1;
- }
- break;
- case 691:
- {
- newCt = ((ComplexTypeImpl)$__result__);
- action2();
- $_ngcc_current_state = 1;
- }
- break;
- case 692:
- {
- newGrp = ((ModelGroupDeclImpl)$__result__);
- action1();
- $_ngcc_current_state = 1;
- }
- break;
- case 693:
- {
- newAg = ((AttGroupDeclImpl)$__result__);
- action0();
- $_ngcc_current_state = 1;
- }
- break;
- case 684:
- {
- $_ngcc_current_state = 1;
- }
- break;
- case 685:
- {
- newSt = ((SimpleTypeImpl)$__result__);
- action3();
- $_ngcc_current_state = 1;
- }
- break;
- case 686:
- {
- newCt = ((ComplexTypeImpl)$__result__);
- action2();
- $_ngcc_current_state = 1;
- }
- break;
- case 687:
- {
- newGrp = ((ModelGroupDeclImpl)$__result__);
- action1();
- $_ngcc_current_state = 1;
- }
- break;
- case 688:
- {
- newAg = ((AttGroupDeclImpl)$__result__);
- action0();
- $_ngcc_current_state = 1;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/simpleType.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/simpleType.java
deleted file mode 100644
index 3f966ca5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/simpleType.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class simpleType extends NGCCHandler {
- private AnnotationImpl annotation;
- private String name;
- private ForeignAttributesImpl fa;
- private String finalValue;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public simpleType(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 19;
- }
-
- public simpleType(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- private void action0()throws SAXException {
- finalSet = makeFinalSet(finalValue);
-}
-
- private void action1()throws SAXException {
- locator=$runtime.copyLocator();
-}
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 15:
- {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 11:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 10;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 19:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
- action1();
- $_ngcc_current_state = 15;
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 8:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 89, null,AnnotationContext.SIMPLETYPE_DECL);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 7;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 10:
- {
- if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("union")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list")))))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 91, fa);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 7:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 2:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("restriction"))) {
- NGCCHandler h = new SimpleType_Restriction(this, super._source, $runtime, 85, annotation,locator,fa,name,finalSet);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("list"))) {
- NGCCHandler h = new SimpleType_List(this, super._source, $runtime, 86, annotation,locator,fa,name,finalSet);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("union"))) {
- NGCCHandler h = new SimpleType_Union(this, super._source, $runtime, 80, annotation,locator,fa,name,finalSet);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 15:
- {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 11:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 10;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 7;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 7:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
- $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 15:
- {
- if(($__uri.equals("") && $__local.equals("final"))) {
- $_ngcc_current_state = 17;
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 11:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 13;
- }
- else {
- $_ngcc_current_state = 10;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 7;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 7:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 15:
- {
- $_ngcc_current_state = 11;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 11:
- {
- $_ngcc_current_state = 10;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 7;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 7:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 12:
- {
- if(($__uri.equals("") && $__local.equals("name"))) {
- $_ngcc_current_state = 10;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 16:
- {
- if(($__uri.equals("") && $__local.equals("final"))) {
- $_ngcc_current_state = 11;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 13:
- {
- name = $value;
- $_ngcc_current_state = 12;
- }
- break;
- case 15:
- {
- if(($ai = $runtime.getAttributeIndex("","final"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 11;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 11:
- {
- if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 10;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 8:
- {
- $_ngcc_current_state = 7;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 7:
- {
- action0();
- $_ngcc_current_state = 2;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 17:
- {
- finalValue = $value;
- $_ngcc_current_state = 16;
- }
- break;
- case 0:
- {
- revertToParentFromText(result, super._cookie, $value);
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 89:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 7;
- }
- break;
- case 91:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 8;
- }
- break;
- case 85:
- {
- result = ((RestrictionSimpleTypeImpl)$__result__);
- $_ngcc_current_state = 1;
- }
- break;
- case 86:
- {
- result = ((ListSimpleTypeImpl)$__result__);
- $_ngcc_current_state = 1;
- }
- break;
- case 80:
- {
- result = ((UnionSimpleTypeImpl)$__result__);
- $_ngcc_current_state = 1;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return(($_ngcc_current_state == 0));
- }
-
-
- /** computed simple type object */
- private SimpleTypeImpl result;
-
- private Locator locator;
-
- private Set finalSet;
-
- private Set makeFinalSet(String finalValue) {
- if(finalValue==null)
- return Collections.EMPTY_SET;
-
- Set s = new HashSet();
- StringTokenizer tokens = new StringTokenizer(finalValue);
- while(tokens.hasMoreTokens()) {
- String token = tokens.nextToken();
- if(token.equals("#all")) {
- s.add(XSVariety.ATOMIC);
- s.add(XSVariety.UNION);
- s.add(XSVariety.LIST);
- }
- if(token.equals("list")) {
- s.add(XSVariety.LIST);
- }
- if(token.equals("union")) {
- s.add(XSVariety.UNION);
- }
- if(token.equals("restriction")) {
- s.add(XSVariety.ATOMIC);
- }
- }
- return s;
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/wildcardBody.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/wildcardBody.java
deleted file mode 100644
index b4ee9c06..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/wildcardBody.java
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-import java.util.StringTokenizer;
- import java.util.HashSet;
-
-
-class wildcardBody extends NGCCHandler {
- private AnnotationImpl annotation;
- private Locator locator;
- private String modeValue;
- private String ns;
- private ForeignAttributesImpl fa;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public wildcardBody(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, Locator _locator) {
- super(source, parent, cookie);
- $runtime = runtime;
- this.locator = _locator;
- $_ngcc_current_state = 10;
- }
-
- public wildcardBody(NGCCRuntimeEx runtime, Locator _locator) {
- this(null, runtime, runtime, -1, _locator);
- }
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 9:
- {
- if((($ai = $runtime.getAttributeIndex("","namespace"))>=0 || ($ai = $runtime.getAttributeIndex("","processContents"))>=0)) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 10:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 411, null,AnnotationContext.WILDCARD);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 9;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 0:
- {
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 9:
- {
- if((($ai = $runtime.getAttributeIndex("","namespace"))>=0 || ($ai = $runtime.getAttributeIndex("","processContents"))>=0)) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 9;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- if(($__uri.equals("") && $__local.equals("namespace"))) {
- $_ngcc_current_state = 3;
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 5:
- {
- if(($__uri.equals("") && $__local.equals("processContents"))) {
- $_ngcc_current_state = 7;
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- }
- break;
- case 9:
- {
- if((($__uri.equals("") && $__local.equals("namespace")) || ($__uri.equals("") && $__local.equals("processContents")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 9;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- $_ngcc_current_state = 1;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 6:
- {
- if(($__uri.equals("") && $__local.equals("processContents"))) {
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- case 9:
- {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
- spawnChildFromLeaveAttribute(h, $__uri, $__local, $__qname);
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 9;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 0:
- {
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 2:
- {
- if(($__uri.equals("") && $__local.equals("namespace"))) {
- $_ngcc_current_state = 0;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 1:
- {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 3:
- {
- ns = $value;
- $_ngcc_current_state = 2;
- }
- break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- else {
- $_ngcc_current_state = 1;
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- case 9:
- {
- if(($ai = $runtime.getAttributeIndex("","processContents"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
- spawnChildFromText(h, $value);
- }
- else {
- if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
- spawnChildFromText(h, $value);
- }
- else {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 409, null);
- spawnChildFromText(h, $value);
- }
- }
- }
- break;
- case 10:
- {
- $_ngcc_current_state = 9;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
- }
- break;
- case 7:
- {
- modeValue = $value;
- $_ngcc_current_state = 6;
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 409:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 5;
- }
- break;
- case 411:
- {
- annotation = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 9;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return((($_ngcc_current_state == 0) || (($_ngcc_current_state == 5) || ($_ngcc_current_state == 1))));
- }
-
-
- private WildcardImpl makeResult() {
- if(modeValue==null) modeValue="strict";
-
- int mode=-1;
- if(modeValue.equals("strict")) mode = XSWildcard.STRTICT;
- if(modeValue.equals("lax")) mode = XSWildcard.LAX;
- if(modeValue.equals("skip")) mode = XSWildcard.SKIP;
- if(mode==-1) throw new InternalError();
-
- if(ns==null || ns.equals("##any"))
- return new WildcardImpl.Any( $runtime.document, annotation,locator,fa,mode);
-
- if(ns.equals("##other"))
- return new WildcardImpl.Other( $runtime.document,
- annotation,locator,fa,
- $runtime.currentSchema.getTargetNamespace(),mode);
-
- StringTokenizer tokens = new StringTokenizer(ns);
- HashSet s = new HashSet();
- while(tokens.hasMoreTokens()) {
- String ns = tokens.nextToken();
- if(ns.equals("##local")) ns="";
- if(ns.equals("##targetNamespace")) ns=$runtime.currentSchema.getTargetNamespace();
- s.add(ns);
- }
-
- return new WildcardImpl.Finite( $runtime.document, annotation,locator,fa,s,mode);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/xpath.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/xpath.java
deleted file mode 100644
index 5b245596..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/xpath.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* this file is generated by RelaxNGCC */
-package com.sun.xml.internal.xsom.impl.parser.state;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-
- import com.sun.xml.internal.xsom.*;
- import com.sun.xml.internal.xsom.parser.*;
- import com.sun.xml.internal.xsom.impl.*;
- import com.sun.xml.internal.xsom.impl.parser.*;
- import org.xml.sax.Locator;
- import org.xml.sax.ContentHandler;
- import org.xml.sax.helpers.*;
- import java.util.*;
- import java.math.BigInteger;
-
-
-
-class xpath extends NGCCHandler {
- private String xpath;
- private ForeignAttributesImpl fa;
- private AnnotationImpl ann;
- protected final NGCCRuntimeEx $runtime;
- private int $_ngcc_current_state;
- protected String $uri;
- protected String $localName;
- protected String $qname;
-
- public final NGCCRuntime getRuntime() {
- return($runtime);
- }
-
- public xpath(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
- super(source, parent, cookie);
- $runtime = runtime;
- $_ngcc_current_state = 6;
- }
-
- public xpath(NGCCRuntimeEx runtime) {
- this(null, runtime, runtime, -1);
- }
-
- public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- break;
- case 6:
- {
- if((($ai = $runtime.getAttributeIndex("","xpath"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 77, null);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- case 1:
- {
- if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
- NGCCHandler h = new annotation(this, super._source, $runtime, 72, null,AnnotationContext.XPATH);
- spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
- }
- else {
- $_ngcc_current_state = 0;
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- }
- break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
- }
- else {
- unexpectedEnterElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterElement($__qname);
- }
- break;
- }
- }
-
- public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 77, null);
- spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
- }
- else {
- unexpectedLeaveElement($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveElement($__qname);
- }
- break;
- }
- }
-
- public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 6:
- {
- if(($__uri.equals("") && $__local.equals("xpath"))) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 77, null);
- spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 5:
- {
- if(($__uri.equals("") && $__local.equals("xpath"))) {
- $_ngcc_current_state = 4;
- }
- else {
- unexpectedEnterAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedEnterAttribute($__qname);
- }
- break;
- }
- }
-
- public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
- int $ai;
- $uri = $__uri;
- $localName = $__local;
- $qname = $__qname;
- switch($_ngcc_current_state) {
- case 0:
- {
- revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
- }
- break;
- case 3:
- {
- if(($__uri.equals("") && $__local.equals("xpath"))) {
- $_ngcc_current_state = 1;
- }
- else {
- unexpectedLeaveAttribute($__qname);
- }
- }
- break;
- default:
- {
- unexpectedLeaveAttribute($__qname);
- }
- break;
- }
- }
-
- public void text(String $value) throws SAXException {
- int $ai;
- switch($_ngcc_current_state) {
- case 4:
- {
- xpath = $value;
- $_ngcc_current_state = 3;
- }
- break;
- case 0:
- {
- revertToParentFromText(makeResult(), super._cookie, $value);
- }
- break;
- case 6:
- {
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 77, null);
- spawnChildFromText(h, $value);
- }
- }
- break;
- case 1:
- {
- $_ngcc_current_state = 0;
- $runtime.sendText(super._cookie, $value);
- }
- break;
- case 5:
- {
- if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) {
- $runtime.consumeAttribute($ai);
- $runtime.sendText(super._cookie, $value);
- }
- }
- break;
- }
- }
-
- public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
- switch($__cookie__) {
- case 77:
- {
- fa = ((ForeignAttributesImpl)$__result__);
- $_ngcc_current_state = 5;
- }
- break;
- case 72:
- {
- ann = ((AnnotationImpl)$__result__);
- $_ngcc_current_state = 0;
- }
- break;
- }
- }
-
- public boolean accepted() {
- return((($_ngcc_current_state == 1) || ($_ngcc_current_state == 0)));
- }
-
-
- private XPathImpl makeResult() {
- return new XPathImpl($runtime.document,ann,$runtime.copyLocator(),fa,
- $runtime.createXmlString(xpath));
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/AbstractAxisImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/AbstractAxisImpl.java
deleted file mode 100644
index 51f22533..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/AbstractAxisImpl.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.scd;
-
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-
-import java.util.Iterator;
-
-/**
- * Partial default implementation of {@link Axis}.
- *
- * <p>
- * {@link XSParticle}s are skipped in SCD, so this class compensates that.
- * For example, when we are considering a path from {@link XSComplexType},
- * we need to also consider a path from its content type particle (if any.)
- *
- * @author Kohsuke Kawaguchi
- */
-abstract class AbstractAxisImpl<T extends XSComponent> implements Axis<T>, XSFunction<Iterator<T>> {
- /**
- * Creates a singleton list.
- */
- protected final Iterator<T> singleton(T t) {
- return Iterators.singleton(t);
- }
-
- protected final Iterator<T> union(T... items) {
- return new Iterators.Array<T>(items);
- }
-
- protected final Iterator<T> union(Iterator<? extends T> first, Iterator<? extends T> second) {
- return new Iterators.Union<T>(first,second);
- }
-
- public Iterator<T> iterator(XSComponent contextNode) {
- return contextNode.apply(this);
- }
-
- /**
- * Gets the prefix of the axis, like "foo::".
- */
- public String getName() {
- return toString();
- }
-
- /**
- * Default implementation that simply delegate sto {@link #iterator(XSComponent)}
- */
- public Iterator<T> iterator(Iterator<? extends XSComponent> contextNodes) {
- return new Iterators.Map<T,XSComponent>(contextNodes) {
- protected Iterator<? extends T> apply(XSComponent u) {
- return iterator(u);
- }
- };
- }
-
- public boolean isModelGroup() {
- return false;
- }
-
- public Iterator<T> annotation(XSAnnotation ann) {
- return empty();
- }
-
- public Iterator<T> attGroupDecl(XSAttGroupDecl decl) {
- return empty();
- }
-
- public Iterator<T> attributeDecl(XSAttributeDecl decl) {
- return empty();
- }
-
- public Iterator<T> attributeUse(XSAttributeUse use) {
- return empty();
- }
-
- public Iterator<T> complexType(XSComplexType type) {
- // compensate particle
- XSParticle p = type.getContentType().asParticle();
- if(p!=null)
- return particle(p);
- else
- return empty();
- }
-
- public Iterator<T> schema(XSSchema schema) {
- return empty();
- }
-
- public Iterator<T> facet(XSFacet facet) {
- return empty();
- }
-
- public Iterator<T> notation(XSNotation notation) {
- return empty();
- }
-
- public Iterator<T> identityConstraint(XSIdentityConstraint decl) {
- return empty();
- }
-
- public Iterator<T> xpath(XSXPath xpath) {
- return empty();
- }
-
- public Iterator<T> simpleType(XSSimpleType simpleType) {
- return empty();
- }
-
- public Iterator<T> particle(XSParticle particle) {
- return empty();
- }
-
- public Iterator<T> empty(XSContentType empty) {
- return empty();
- }
-
- public Iterator<T> wildcard(XSWildcard wc) {
- return empty();
- }
-
- public Iterator<T> modelGroupDecl(XSModelGroupDecl decl) {
- return empty();
- }
-
- public Iterator<T> modelGroup(XSModelGroup group) {
- // compensate for particles that are ignored in SCD
- return new Iterators.Map<T,XSParticle>(group.iterator()) {
- protected Iterator<? extends T> apply(XSParticle p) {
- return particle(p);
- }
- };
- }
-
- public Iterator<T> elementDecl(XSElementDecl decl) {
- return empty();
- }
-
- /**
- * Returns an empty list.
- */
- protected final Iterator<T> empty() {
- return Iterators.empty();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Axis.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Axis.java
deleted file mode 100644
index f46a6dee..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Axis.java
+++ /dev/null
@@ -1,579 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.scd;
-
-import com.sun.xml.internal.xsom.XSAttContainer;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSListSimpleType;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroup.Compositor;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSRestrictionSimpleType;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.XSUnionSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Axis of traversal.
- *
- * @param <T>
- * The kind of components that this axis may return.
- *
- * @author Kohsuke Kawaguchi
- */
-public interface Axis<T extends XSComponent> {
- Iterator<T> iterator(XSComponent contextNode);
-
- Iterator<T> iterator(Iterator<? extends XSComponent> contextNodes);
-
- /**
- * Returns true if this is one of the model group axis.
- */
- boolean isModelGroup();
-
-
- /**
- * Pseudo-axis that selects all the {@link XSSchema}s in the current set.
- * Used to implement the absolute path expression
- */
- public static final Axis<XSSchema> ROOT = new Axis<XSSchema>() {
- public Iterator<XSSchema> iterator(XSComponent contextNode) {
- return contextNode.getRoot().iterateSchema();
- }
-
- public Iterator<XSSchema> iterator(Iterator<? extends XSComponent> contextNodes) {
- if(!contextNodes.hasNext())
- return Iterators.empty();
- else
- // this assumes that all current nodes belong to the same owner.
- return iterator(contextNodes.next());
- }
-
- public boolean isModelGroup() {
- return false;
- }
-
- public String toString() {
- return "root::";
- }
- };
-
- /**
- * Pseudo-axis that visits all skipped intermediate steps.
- * Those are:
- * <ol>
- * <li>complex type reachable from element
- * <li>model groups
- * <li>combination of above.
- * </ol>
- */
- public static final Axis<XSComponent> INTERMEDIATE_SKIP = new AbstractAxisImpl<XSComponent>() {
- public Iterator<XSComponent> elementDecl(XSElementDecl decl) {
- XSComplexType ct = decl.getType().asComplexType();
- if(ct==null)
- return empty();
- else {
- // also pick up model groups inside this complex type
- return new Iterators.Union<XSComponent>(singleton(ct),complexType(ct));
- }
- }
-
- public Iterator<XSComponent> modelGroupDecl(XSModelGroupDecl decl) {
- return descendants(decl.getModelGroup());
- }
-
- public Iterator<XSComponent> particle(XSParticle particle) {
- return descendants(particle.getTerm().asModelGroup());
- }
-
- /**
- * Iterate all descendant model groups of the given model group, including itself.
- */
- private Iterator<XSComponent> descendants(XSModelGroup mg) {
- // TODO: write a tree iterator
- // for now, we do it eagerly because I'm lazy
- List<XSComponent> r = new ArrayList<XSComponent>();
- visit(mg,r);
- return r.iterator();
- }
-
- private void visit(XSModelGroup mg, List<XSComponent> r) {
- // since model groups never form a cycle, no cycle check is needed
- r.add(mg);
- for (XSParticle p : mg) {
- XSModelGroup child = p.getTerm().asModelGroup();
- if(child!=null)
- visit(child,r);
- }
- }
-
- public String toString() {
- return "(intermediateSkip)";
- }
- };
-
- /**
- * All descendants reachable via default axes. Used to implement the "//" semantics.
- *
- * So far the default axes together are guaranteed not to cause any cycle, so
- * no cycle check is needed (if it's needed, the life would be much harder!)
- */
- public static final Axis<XSComponent> DESCENDANTS = new Axis<XSComponent>() {
- public Iterator<XSComponent> iterator(XSComponent contextNode) {
- return new Visitor().iterator(contextNode);
- }
- public Iterator<XSComponent> iterator(Iterator<? extends XSComponent> contextNodes) {
- return new Visitor().iterator(contextNodes);
- }
-
- public boolean isModelGroup() {
- return false;
- }
-
- /**
- * Stateful visitor that remembers what's already traversed, to reduce the search space.
- */
- final class Visitor extends AbstractAxisImpl<XSComponent> {
- private final Set<XSComponent> visited = new HashSet<XSComponent>();
-
- /**
- * Recursively apply the {@link Axis#DESCENDANTS} axis.
- */
- final class Recursion extends Iterators.Map<XSComponent,XSComponent> {
- public Recursion(Iterator<? extends XSComponent> core) {
- super(core);
- }
-
- protected Iterator<XSComponent> apply(XSComponent u) {
- return DESCENDANTS.iterator(u);
- }
- }
- public Iterator<XSComponent> schema(XSSchema schema) {
- if(visited.add(schema))
- return ret( schema, new Recursion(schema.iterateElementDecls()));
- else
- return empty();
- }
-
- public Iterator<XSComponent> elementDecl(XSElementDecl decl) {
- if(visited.add(decl))
- return ret(decl, iterator(decl.getType()) );
- else
- return empty();
- }
-
- public Iterator<XSComponent> simpleType(XSSimpleType type) {
- if(visited.add(type))
- return ret(type, FACET.iterator(type));
- else
- return empty();
- }
-
- public Iterator<XSComponent> complexType(XSComplexType type) {
- if(visited.add(type))
- return ret(type, iterator(type.getContentType()));
- else
- return empty();
- }
-
- public Iterator<XSComponent> particle(XSParticle particle) {
- if(visited.add(particle))
- return ret(particle, iterator(particle.getTerm()));
- else
- return empty();
- }
-
- public Iterator<XSComponent> modelGroupDecl(XSModelGroupDecl decl) {
- if(visited.add(decl))
- return ret(decl, iterator(decl.getModelGroup()));
- else
- return empty();
- }
-
- public Iterator<XSComponent> modelGroup(XSModelGroup group) {
- if(visited.add(group))
- return ret(group, new Recursion(group.iterator()));
- else
- return empty();
- }
-
- public Iterator<XSComponent> attGroupDecl(XSAttGroupDecl decl) {
- if(visited.add(decl))
- return ret(decl, new Recursion(decl.iterateAttributeUses()));
- else
- return empty();
- }
-
- public Iterator<XSComponent> attributeUse(XSAttributeUse use) {
- if(visited.add(use))
- return ret(use, iterator(use.getDecl()));
- else
- return empty();
- }
-
- public Iterator<XSComponent> attributeDecl(XSAttributeDecl decl) {
- if(visited.add(decl))
- return ret(decl, iterator(decl.getType()));
- else
- return empty();
- }
-
- private Iterator<XSComponent> ret( XSComponent one, Iterator<? extends XSComponent> rest ) {
- return union(singleton(one),rest);
- }
- }
-
- public String toString() {
- return "/";
- }
- };
-
- public static final Axis<XSSchema> X_SCHEMA = new Axis<XSSchema>() {
- public Iterator<XSSchema> iterator(XSComponent contextNode) {
- return Iterators.singleton(contextNode.getOwnerSchema());
- }
-
- public Iterator<XSSchema> iterator(Iterator<? extends XSComponent> contextNodes) {
- return new Iterators.Adapter<XSSchema,XSComponent>(contextNodes) {
- protected XSSchema filter(XSComponent u) {
- return u.getOwnerSchema();
- }
- };
- }
-
- public boolean isModelGroup() {
- return false;
- }
-
- public String toString() {
- return "x-schema::";
- }
- };
-
- public static final Axis<XSElementDecl> SUBSTITUTION_GROUP = new AbstractAxisImpl<XSElementDecl>() {
- public Iterator<XSElementDecl> elementDecl(XSElementDecl decl) {
- return singleton(decl.getSubstAffiliation());
- }
-
- public String toString() {
- return "substitutionGroup::";
- }
- };
-
- public static final Axis<XSAttributeDecl> ATTRIBUTE = new AbstractAxisImpl<XSAttributeDecl>() {
- public Iterator<XSAttributeDecl> complexType(XSComplexType type) {
- return attributeHolder(type);
- }
-
- public Iterator<XSAttributeDecl> attGroupDecl(XSAttGroupDecl decl) {
- return attributeHolder(decl);
- }
-
- private Iterator<XSAttributeDecl> attributeHolder(final XSAttContainer atts) {
- // TODO: check spec. is this correct?
- return new Iterators.Adapter<XSAttributeDecl,XSAttributeUse>(atts.iterateAttributeUses()) {
- protected XSAttributeDecl filter(XSAttributeUse u) {
- return u.getDecl();
- }
- };
- }
-
- public Iterator<XSAttributeDecl> schema(XSSchema schema) {
- return schema.iterateAttributeDecls();
- }
-
- public String toString() {
- return "@";
- }
- };
-
- public static final Axis<XSElementDecl> ELEMENT = new AbstractAxisImpl<XSElementDecl>() {
- public Iterator<XSElementDecl> particle(XSParticle particle) {
- return singleton(particle.getTerm().asElementDecl());
- }
-
- public Iterator<XSElementDecl> schema(XSSchema schema) {
- return schema.iterateElementDecls();
- }
-
- public Iterator<XSElementDecl> modelGroupDecl(XSModelGroupDecl decl) {
- return modelGroup(decl.getModelGroup());
- }
-
- //public Iterator<XSElementDecl> modelGroup(XSModelGroup group) {
- // return new Iterators.Map<XSElementDecl,XSParticle>(group.iterator()) {
- // protected Iterator<XSElementDecl> apply(XSParticle p) {
- // return particle(p);
- // }
- // };
- //}
-
- @Override
- public String getName() {
- return "";
- }
-
- public String toString() {
- return "element::";
- }
- };
-
-
- public static final Axis<XSType> TYPE_DEFINITION = new AbstractAxisImpl<XSType>() {
- public Iterator<XSType> schema(XSSchema schema) {
- return schema.iterateTypes();
- }
-
- public Iterator<XSType> attributeDecl(XSAttributeDecl decl) {
- return singleton(decl.getType());
- }
-
- public Iterator<XSType> elementDecl(XSElementDecl decl) {
- return singleton(decl.getType());
- }
-
- public String toString() {
- return "~";
- }
- };
-
- public static final Axis<XSType> BASETYPE = new AbstractAxisImpl<XSType>() {
- public Iterator<XSType> simpleType(XSSimpleType type) {
- return singleton(type.getBaseType());
- }
-
- public Iterator<XSType> complexType(XSComplexType type) {
- return singleton(type.getBaseType());
- }
-
- public String toString() {
- return "baseType::";
- }
- };
-
- public static final Axis<XSSimpleType> PRIMITIVE_TYPE = new AbstractAxisImpl<XSSimpleType>() {
- public Iterator<XSSimpleType> simpleType(XSSimpleType type) {
- return singleton(type.getPrimitiveType());
- }
-
- public String toString() {
- return "primitiveType::";
- }
- };
-
- public static final Axis<XSSimpleType> ITEM_TYPE = new AbstractAxisImpl<XSSimpleType>() {
- public Iterator<XSSimpleType> simpleType(XSSimpleType type) {
- XSListSimpleType baseList = type.getBaseListType();
- if(baseList==null) return empty();
- return singleton(baseList.getItemType());
- }
-
- public String toString() {
- return "itemType::";
- }
- };
-
- public static final Axis<XSSimpleType> MEMBER_TYPE = new AbstractAxisImpl<XSSimpleType>() {
- public Iterator<XSSimpleType> simpleType(XSSimpleType type) {
- XSUnionSimpleType baseUnion = type.getBaseUnionType();
- if(baseUnion ==null) return empty();
- return baseUnion.iterator();
- }
-
- public String toString() {
- return "memberType::";
- }
- };
-
- public static final Axis<XSComponent> SCOPE = new AbstractAxisImpl<XSComponent>() {
- public Iterator<XSComponent> complexType(XSComplexType type) {
- return singleton(type.getScope());
- }
- // TODO: attribute declaration has a scope, too.
- // TODO: element declaration has a scope
-
- public String toString() {
- return "scope::";
- }
- };
-
- public static final Axis<XSAttGroupDecl> ATTRIBUTE_GROUP = new AbstractAxisImpl<XSAttGroupDecl>() {
- public Iterator<XSAttGroupDecl> schema(XSSchema schema) {
- return schema.iterateAttGroupDecls();
- }
-
- public String toString() {
- return "attributeGroup::";
- }
- };
-
- public static final Axis<XSModelGroupDecl> MODEL_GROUP_DECL = new AbstractAxisImpl<XSModelGroupDecl>() {
- public Iterator<XSModelGroupDecl> schema(XSSchema schema) {
- return schema.iterateModelGroupDecls();
- }
-
- public Iterator<XSModelGroupDecl> particle(XSParticle particle) {
- return singleton(particle.getTerm().asModelGroupDecl());
- }
-
- public String toString() {
- return "group::";
- }
- };
-
- public static final Axis<XSIdentityConstraint> IDENTITY_CONSTRAINT = new AbstractAxisImpl<XSIdentityConstraint>() {
- public Iterator<XSIdentityConstraint> elementDecl(XSElementDecl decl) {
- return decl.getIdentityConstraints().iterator();
- }
-
- public Iterator<XSIdentityConstraint> schema(XSSchema schema) {
- // TODO: iterate all elements in this schema (local or global!) and its identity constraints
- return super.schema(schema);
- }
-
- public String toString() {
- return "identityConstraint::";
- }
- };
-
- public static final Axis<XSIdentityConstraint> REFERENCED_KEY = new AbstractAxisImpl<XSIdentityConstraint>() {
- public Iterator<XSIdentityConstraint> identityConstraint(XSIdentityConstraint decl) {
- return singleton(decl.getReferencedKey());
- }
-
- public String toString() {
- return "key::";
- }
- };
-
- public static final Axis<XSNotation> NOTATION = new AbstractAxisImpl<XSNotation>() {
- public Iterator<XSNotation> schema(XSSchema schema) {
- return schema.iterateNotations();
- }
-
- public String toString() {
- return "notation::";
- }
- };
-
- public static final Axis<XSWildcard> WILDCARD = new AbstractAxisImpl<XSWildcard>() {
- public Iterator<XSWildcard> particle(XSParticle particle) {
- return singleton(particle.getTerm().asWildcard());
- }
-
- public String toString() {
- return "any::";
- }
- };
-
- public static final Axis<XSWildcard> ATTRIBUTE_WILDCARD = new AbstractAxisImpl<XSWildcard>() {
- public Iterator<XSWildcard> complexType(XSComplexType type) {
- return singleton(type.getAttributeWildcard());
- }
-
- public Iterator<XSWildcard> attGroupDecl(XSAttGroupDecl decl) {
- return singleton(decl.getAttributeWildcard());
- }
-
- public String toString() {
- return "anyAttribute::";
- }
- };
-
- public static final Axis<XSFacet> FACET = new AbstractAxisImpl<XSFacet>() {
- public Iterator<XSFacet> simpleType(XSSimpleType type) {
- // TODO: it's not clear if "facets" mean all inherited facets or just declared facets
- XSRestrictionSimpleType r = type.asRestriction();
- if(r!=null)
- return r.iterateDeclaredFacets();
- else
- return empty();
- }
-
- public String toString() {
- return "facet::";
- }
- };
-
- public static final Axis<XSModelGroup> MODELGROUP_ALL = new ModelGroupAxis(Compositor.ALL);
- public static final Axis<XSModelGroup> MODELGROUP_CHOICE = new ModelGroupAxis(Compositor.CHOICE);
- public static final Axis<XSModelGroup> MODELGROUP_SEQUENCE = new ModelGroupAxis(Compositor.SEQUENCE);
- public static final Axis<XSModelGroup> MODELGROUP_ANY = new ModelGroupAxis(null);
-
- static final class ModelGroupAxis extends AbstractAxisImpl<XSModelGroup> {
- private final XSModelGroup.Compositor compositor;
-
- ModelGroupAxis(Compositor compositor) {
- this.compositor = compositor;
- }
-
- @Override
- public boolean isModelGroup() {
- return true;
- }
-
- public Iterator<XSModelGroup> particle(XSParticle particle) {
- return filter(particle.getTerm().asModelGroup());
- }
-
- public Iterator<XSModelGroup> modelGroupDecl(XSModelGroupDecl decl) {
- return filter(decl.getModelGroup());
- }
-
- private Iterator<XSModelGroup> filter(XSModelGroup mg) {
- if(mg==null)
- return empty();
- if(mg.getCompositor() == compositor || compositor == null)
- return singleton(mg);
- else
- return empty();
- }
-
- public String toString() {
- if(compositor==null)
- return "model::*";
- else
- return "model::"+compositor;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Iterators.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Iterators.java
deleted file mode 100644
index b600c506..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Iterators.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.scd;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Collections;
-
-/**
- * Various convenient {@link Iterator} implementations.
- * @author Kohsuke Kawaguchi
- */
-public class Iterators {
-
- static abstract class ReadOnly<T> implements Iterator<T> {
- public final void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- // we need to run on JDK 1.4
- private static final Iterator EMPTY = Collections.EMPTY_LIST.iterator();
-
- public static <T> Iterator<T> empty() {
- return EMPTY;
- }
-
- public static <T> Iterator<T> singleton(T value) {
- return new Singleton<T>(value);
- }
-
- /**
- * {@link Iterator} that returns a single (or no) value.
- */
- static final class Singleton<T> extends ReadOnly<T> {
- private T next;
-
- Singleton(T next) {
- this.next = next;
- }
-
- public boolean hasNext() {
- return next!=null;
- }
-
- public T next() {
- T r = next;
- next = null;
- return r;
- }
- }
-
- /**
- * {@link Iterator} that wraps another {@link Iterator} and changes its type.
- */
- public static abstract class Adapter<T,U> extends ReadOnly<T> {
- private final Iterator<? extends U> core;
-
- public Adapter(Iterator<? extends U> core) {
- this.core = core;
- }
-
- public boolean hasNext() {
- return core.hasNext();
- }
-
- public T next() {
- return filter(core.next());
- }
-
- protected abstract T filter(U u);
- }
-
- /**
- * For each U, apply U->Iterator&lt;T> function and then iterate all
- * the resulting T.
- */
- public static abstract class Map<T,U> extends ReadOnly<T> {
- private final Iterator<? extends U> core;
-
- private Iterator<? extends T> current;
-
- protected Map(Iterator<? extends U> core) {
- this.core = core;
- }
-
- public boolean hasNext() {
- while(current==null || !current.hasNext()) {
- if(!core.hasNext())
- return false; // nothing more to enumerate
- current = apply(core.next());
- }
- return true;
- }
-
- public T next() {
- return current.next();
- }
-
- protected abstract Iterator<? extends T> apply(U u);
- }
-
- /**
- * Filter out objects from another iterator.
- */
- public static abstract class Filter<T> extends ReadOnly<T> {
- private final Iterator<? extends T> core;
- private T next;
-
- protected Filter(Iterator<? extends T> core) {
- this.core = core;
- }
-
- /**
- * Return true to retain the value.
- */
- protected abstract boolean matches(T value);
-
- public boolean hasNext() {
- while(core.hasNext() && next==null) {
- next = core.next();
- if(!matches(next))
- next = null;
- }
-
- return next!=null;
- }
-
- public T next() {
- if(next==null) throw new NoSuchElementException();
- T r = next;
- next = null;
- return r;
- }
- }
-
- /**
- * Only return unique items.
- */
- static final class Unique<T> extends Filter<T> {
- private Set<T> values = new HashSet<T>();
- public Unique(Iterator<? extends T> core) {
- super(core);
- }
-
- protected boolean matches(T value) {
- return values.add(value);
- }
- }
-
- /**
- * Union of two iterators.
- */
- public static final class Union<T> extends ReadOnly<T> {
- private final Iterator<? extends T> first,second;
-
- public Union(Iterator<? extends T> first, Iterator<? extends T> second) {
- this.first = first;
- this.second = second;
- }
-
- public boolean hasNext() {
- return first.hasNext() || second.hasNext();
- }
-
- public T next() {
- if(first.hasNext()) return first.next();
- else return second.next();
- }
- }
-
- /**
- * Array iterator.
- */
- public static final class Array<T> extends ReadOnly<T> {
- private final T[] items;
- private int index=0;
- public Array(T[] items) {
- this.items = items;
- }
-
- public boolean hasNext() {
- return index<items.length;
- }
-
- public T next() {
- return items[index++];
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/ParseException.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/ParseException.java
deleted file mode 100644
index a911e2a7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/ParseException.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */
-package com.sun.xml.internal.xsom.impl.scd;
-
-import java.util.List;
-
-/**
- * This exception is thrown when parse errors are encountered.
- * You can explicitly create objects of this exception type by
- * calling the method generateParseException in the generated
- * parser.
- *
- * You can modify this class to customize your error reporting
- * mechanisms so long as you retain the public fields.
- */
-public class ParseException extends Exception {
-
- /**
- * This constructor is used by the method "generateParseException"
- * in the generated parser. Calling this constructor generates
- * a new object of this type with the fields "currentToken",
- * "expectedTokenSequences", and "tokenImage" set. The boolean
- * flag "specialConstructor" is also set to true to indicate that
- * this constructor was used to create this object.
- * This constructor calls its super class with the empty string
- * to force the "toString" method of parent class "Throwable" to
- * print the error message in the form:
- * ParseException: <result of getMessage>
- */
- public ParseException(Token currentTokenVal,
- int[][] expectedTokenSequencesVal,
- List<String> tokenImageVal
- )
- {
- super("");
- specialConstructor = true;
- currentToken = currentTokenVal;
- expectedTokenSequences = expectedTokenSequencesVal;
- tokenImage = tokenImageVal;
- }
-
- /**
- * The following constructors are for use by you for whatever
- * purpose you can think of. Constructing the exception in this
- * manner makes the exception behave in the normal way - i.e., as
- * documented in the class "Throwable". The fields "errorToken",
- * "expectedTokenSequences", and "tokenImage" do not contain
- * relevant information. The JavaCC generated code does not use
- * these constructors.
- */
-
- public ParseException() {
- super();
- specialConstructor = false;
- }
-
- public ParseException(String message) {
- super(message);
- specialConstructor = false;
- }
-
- /**
- * This variable determines which constructor was used to create
- * this object and thereby affects the semantics of the
- * "getMessage" method (see below).
- */
- protected boolean specialConstructor;
-
- /**
- * This is the last token that has been consumed successfully. If
- * this object has been created due to a parse error, the token
- * followng this token will (therefore) be the first error token.
- */
- public Token currentToken;
-
- /**
- * Each entry in this array is an array of integers. Each array
- * of integers represents a sequence of tokens (by their ordinal
- * values) that is expected at this point of the parse.
- */
- public int[][] expectedTokenSequences;
-
- /**
- * This is a reference to the "tokenImage" array of the generated
- * parser within which the parse error occurred. This array is
- * defined in the generated ...Constants interface.
- */
- public List<String> tokenImage;
-
- /**
- * This method has the standard behavior when this object has been
- * created using the standard constructors. Otherwise, it uses
- * "currentToken" and "expectedTokenSequences" to generate a parse
- * error message and returns it. If this object has been created
- * due to a parse error, and you do not catch it (it gets thrown
- * from the parser), then this method is called during the printing
- * of the final stack trace, and hence the correct error message
- * gets displayed.
- */
- public String getMessage() {
- if (!specialConstructor) {
- return super.getMessage();
- }
- StringBuffer expected = new StringBuffer();
- int maxSize = 0;
- for (int i = 0; i < expectedTokenSequences.length; i++) {
- if (maxSize < expectedTokenSequences[i].length) {
- maxSize = expectedTokenSequences[i].length;
- }
- for (int j = 0; j < expectedTokenSequences[i].length; j++) {
- expected.append(tokenImage.get(expectedTokenSequences[i][j])).append(" ");
- }
- if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
- expected.append("...");
- }
- expected.append(eol).append(" ");
- }
- String retval = "Encountered \"";
- Token tok = currentToken.next;
- for (int i = 0; i < maxSize; i++) {
- if (i != 0) retval += " ";
- if (tok.kind == 0) {
- retval += tokenImage.get(0);
- break;
- }
- retval += add_escapes(tok.image);
- tok = tok.next;
- }
- retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
- retval += "." + eol;
- if (expectedTokenSequences.length == 1) {
- retval += "Was expecting:" + eol + " ";
- } else {
- retval += "Was expecting one of:" + eol + " ";
- }
- retval += expected.toString();
- return retval;
- }
-
- /**
- * The end of line string for this machine.
- */
- protected String eol = System.getProperty("line.separator", "\n");
-
- /**
- * Used to convert raw characters to their escaped version
- * when these raw version cannot be used as part of an ASCII
- * string literal.
- */
- protected String add_escapes(String str) {
- StringBuffer retval = new StringBuffer();
- char ch;
- for (int i = 0; i < str.length(); i++) {
- switch (str.charAt(i))
- {
- case 0 :
- continue;
- case '\b':
- retval.append("\\b");
- continue;
- case '\t':
- retval.append("\\t");
- continue;
- case '\n':
- retval.append("\\n");
- continue;
- case '\f':
- retval.append("\\f");
- continue;
- case '\r':
- retval.append("\\r");
- continue;
- case '\"':
- retval.append("\\\"");
- continue;
- case '\'':
- retval.append("\\\'");
- continue;
- case '\\':
- retval.append("\\\\");
- continue;
- default:
- if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
- String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
- } else {
- retval.append(ch);
- }
- continue;
- }
- }
- return retval.toString();
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDImpl.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDImpl.java
deleted file mode 100644
index 83f83657..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDImpl.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.scd;
-
-import com.sun.xml.internal.xsom.SCD;
-import com.sun.xml.internal.xsom.XSComponent;
-
-import java.util.Iterator;
-
-/**
- * Schema component designator.
- *
- * @author Kohsuke Kawaguchi
- */
-public final class SCDImpl extends SCD {
- /**
- * SCD is fundamentally a list of steps.
- */
- private final Step[] steps;
-
- /**
- * The original textual SCD representation.
- */
- private final String text;
-
- public SCDImpl(String text, Step[] steps) {
- this.text = text;
- this.steps = steps;
- }
-
- public Iterator<XSComponent> select(Iterator<? extends XSComponent> contextNode) {
- Iterator<XSComponent> nodeSet = (Iterator)contextNode;
-
- int len = steps.length;
- for( int i=0; i<len; i++ ) {
- if(i!=0 && i!=len-1 && !steps[i-1].axis.isModelGroup() && steps[i].axis.isModelGroup()) {
- // expand the current nodeset by adding abbreviatable complex type and model groups.
- // note that such expansion is not allowed to occure in in between model group axes.
-
- // TODO: this step is not needed if the next step is known not to react to
- // complex type nor model groups, such as, say Axis.FACET
- nodeSet = new Iterators.Unique<XSComponent>(
- new Iterators.Map<XSComponent,XSComponent>(nodeSet) {
- protected Iterator<XSComponent> apply(XSComponent u) {
- return new Iterators.Union<XSComponent>(
- Iterators.singleton(u),
- Axis.INTERMEDIATE_SKIP.iterator(u) );
- }
- }
- );
- }
- nodeSet = steps[i].evaluate(nodeSet);
- }
-
- return nodeSet;
- }
-
- public String toString() {
- return text;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDParser.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDParser.java
deleted file mode 100644
index 58f2f7f0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDParser.java
+++ /dev/null
@@ -1,562 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JavaCC: Do not edit this line. SCDParser.java */
-package com.sun.xml.internal.xsom.impl.scd;
-
-import java.util.*;
-import java.io.*;
-import com.sun.xml.internal.xsom.impl.UName;
-import javax.xml.namespace.*;
-
-public class SCDParser implements SCDParserConstants {
- private NamespaceContext nsc;
- public SCDParser(String text,NamespaceContext nsc) {
- this(new StringReader(text));
- this.nsc = nsc;
- }
- private String trim(String s) {
- return s.substring(1,s.length()-1);
- }
- private String resolvePrefix(String prefix) throws ParseException {
- try {
- String r=nsc.getNamespaceURI(prefix);
- // grrr!!
- if(prefix.equals(""))
- return r;
- if(!r.equals(""))
- return r;
- } catch( IllegalArgumentException e ) {
- ; // report an error
- }
- throw new ParseException("Unbound prefix: "+prefix);
- }
-
- // "[^:]+"
- final public UName QName() throws ParseException {
- Token p,l=null;
- p = jj_consume_token(NCNAME);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 15:
- jj_consume_token(15);
- l = jj_consume_token(NCNAME);
- break;
- default:
- jj_la1[0] = jj_gen;
- ;
- }
- if(l==null)
- {if (true) return new UName(resolvePrefix(""),p.image);}
- else
- {if (true) return new UName(resolvePrefix(p.image),l.image);}
- throw new Error("Missing return statement in function");
- }
-
- final public String Prefix() throws ParseException {
- Token p;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NCNAME:
- p = jj_consume_token(NCNAME);
- {if (true) return resolvePrefix(p.image);}
- break;
- default:
- jj_la1[1] = jj_gen;
- {if (true) return resolvePrefix("");}
- }
- throw new Error("Missing return statement in function");
- }
-
- final public List RelativeSchemaComponentPath() throws ParseException {
- List steps = new ArrayList();
- Step s;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 16:
- case 17:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 16:
- jj_consume_token(16);
- steps.add(new Step.Any(Axis.ROOT));
- break;
- case 17:
- jj_consume_token(17);
- steps.add(new Step.Any(Axis.DESCENDANTS));
- break;
- default:
- jj_la1[2] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- break;
- default:
- jj_la1[3] = jj_gen;
- ;
- }
- s = Step();
- steps.add(s);
- label_1:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 16:
- case 17:
- ;
- break;
- default:
- jj_la1[4] = jj_gen;
- break label_1;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 16:
- jj_consume_token(16);
- break;
- case 17:
- jj_consume_token(17);
- steps.add(new Step.Any(Axis.DESCENDANTS));
- break;
- default:
- jj_la1[5] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- s = Step();
- steps.add(s);
- }
- {if (true) return steps;}
- throw new Error("Missing return statement in function");
- }
-
- final public Step Step() throws ParseException {
- Step s; String p; Token n;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 18:
- case 19:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 18:
- jj_consume_token(18);
- break;
- case 19:
- jj_consume_token(19);
- break;
- default:
- jj_la1[6] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- s = NameOrWildcard(Axis.ATTRIBUTE);
- break;
- case NCNAME:
- case 20:
- case 45:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 20:
- jj_consume_token(20);
- break;
- default:
- jj_la1[7] = jj_gen;
- ;
- }
- s = NameOrWildcard(Axis.ELEMENT);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NUMBER:
- Predicate(s);
- break;
- default:
- jj_la1[8] = jj_gen;
- ;
- }
- break;
- case 21:
- jj_consume_token(21);
- s = NameOrWildcard(Axis.SUBSTITUTION_GROUP);
- break;
- case 22:
- case 23:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case 22:
- jj_consume_token(22);
- break;
- case 23:
- jj_consume_token(23);
- break;
- default:
- jj_la1[9] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- s = NameOrWildcardOrAnonymous(Axis.TYPE_DEFINITION);
- break;
- case 24:
- jj_consume_token(24);
- s = NameOrWildcard(Axis.BASETYPE);
- break;
- case 25:
- jj_consume_token(25);
- s = NameOrWildcard(Axis.PRIMITIVE_TYPE);
- break;
- case 26:
- jj_consume_token(26);
- s = NameOrWildcardOrAnonymous(Axis.ITEM_TYPE);
- break;
- case 27:
- jj_consume_token(27);
- s = NameOrWildcardOrAnonymous(Axis.MEMBER_TYPE);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NUMBER:
- Predicate(s);
- break;
- default:
- jj_la1[10] = jj_gen;
- ;
- }
- break;
- case 28:
- jj_consume_token(28);
- s = NameOrWildcardOrAnonymous(Axis.SCOPE);
- break;
- case 29:
- jj_consume_token(29);
- s = NameOrWildcard(Axis.ATTRIBUTE_GROUP);
- break;
- case 30:
- jj_consume_token(30);
- s = NameOrWildcard(Axis.MODEL_GROUP_DECL);
- break;
- case 31:
- jj_consume_token(31);
- s = NameOrWildcard(Axis.IDENTITY_CONSTRAINT);
- break;
- case 32:
- jj_consume_token(32);
- s = NameOrWildcard(Axis.REFERENCED_KEY);
- break;
- case 33:
- jj_consume_token(33);
- s = NameOrWildcard(Axis.NOTATION);
- break;
- case 34:
- jj_consume_token(34);
- s=new Step.Any(Axis.MODELGROUP_SEQUENCE);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NUMBER:
- Predicate(s);
- break;
- default:
- jj_la1[11] = jj_gen;
- ;
- }
- break;
- case 35:
- jj_consume_token(35);
- s=new Step.Any(Axis.MODELGROUP_CHOICE);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NUMBER:
- Predicate(s);
- break;
- default:
- jj_la1[12] = jj_gen;
- ;
- }
- break;
- case 36:
- jj_consume_token(36);
- s=new Step.Any(Axis.MODELGROUP_ALL);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NUMBER:
- Predicate(s);
- break;
- default:
- jj_la1[13] = jj_gen;
- ;
- }
- break;
- case 37:
- jj_consume_token(37);
- s=new Step.Any(Axis.MODELGROUP_ANY);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NUMBER:
- Predicate(s);
- break;
- default:
- jj_la1[14] = jj_gen;
- ;
- }
- break;
- case 38:
- jj_consume_token(38);
- s=new Step.Any(Axis.WILDCARD);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NUMBER:
- Predicate(s);
- break;
- default:
- jj_la1[15] = jj_gen;
- ;
- }
- break;
- case 39:
- jj_consume_token(39);
- s=new Step.Any(Axis.ATTRIBUTE_WILDCARD);
- break;
- case 40:
- jj_consume_token(40);
- s=new Step.Any(Axis.FACET);
- break;
- case 41:
- jj_consume_token(41);
- n = jj_consume_token(FACETNAME);
- s=new Step.Facet(Axis.FACET,n.image);
- break;
- case 42:
- jj_consume_token(42);
- s=new Step.Any(Axis.DESCENDANTS);
- break;
- case 43:
- jj_consume_token(43);
- p = Prefix();
- s=new Step.Schema(Axis.X_SCHEMA,p);
- break;
- case 44:
- jj_consume_token(44);
- s=new Step.Any(Axis.X_SCHEMA);
- break;
- default:
- jj_la1[16] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return s;}
- throw new Error("Missing return statement in function");
- }
-
- final public Step NameOrWildcard(Axis a) throws ParseException {
- UName un;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NCNAME:
- un = QName();
- {if (true) return new Step.Named(a,un);}
- break;
- case 45:
- jj_consume_token(45);
- {if (true) return new Step.Any(a);}
- break;
- default:
- jj_la1[17] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
- final public Step NameOrWildcardOrAnonymous(Axis a) throws ParseException {
- UName un;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NCNAME:
- un = QName();
- {if (true) return new Step.Named(a,un);}
- break;
- case 45:
- jj_consume_token(45);
- {if (true) return new Step.Any(a);}
- break;
- case 46:
- jj_consume_token(46);
- {if (true) return new Step.AnonymousType(a);}
- break;
- default:
- jj_la1[18] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
- final public int Predicate(Step s) throws ParseException {
- Token t;
- t = jj_consume_token(NUMBER);
- {if (true) return s.predicate=Integer.parseInt(trim(t.image));}
- throw new Error("Missing return statement in function");
- }
-
- public SCDParserTokenManager token_source;
- SimpleCharStream jj_input_stream;
- public Token token, jj_nt;
- private int jj_ntk;
- private int jj_gen;
- final private int[] jj_la1 = new int[19];
- static private int[] jj_la1_0;
- static private int[] jj_la1_1;
- static {
- jj_la1_0();
- jj_la1_1();
- }
- private static void jj_la1_0() {
- jj_la1_0 = new int[] {0x8000,0x1000,0x30000,0x30000,0x30000,0x30000,0xc0000,0x100000,0x2000,0xc00000,0x2000,0x2000,0x2000,0x2000,0x2000,0x2000,0xfffc1000,0x1000,0x1000,};
- }
- private static void jj_la1_1() {
- jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3fff,0x2000,0x6000,};
- }
-
- public SCDParser(java.io.InputStream stream) {
- this(stream, null);
- }
- public SCDParser(java.io.InputStream stream, String encoding) {
- try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
- token_source = new SCDParserTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 19; i++) jj_la1[i] = -1;
- }
-
- public void ReInit(java.io.InputStream stream) {
- ReInit(stream, null);
- }
- public void ReInit(java.io.InputStream stream, String encoding) {
- try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 19; i++) jj_la1[i] = -1;
- }
-
- public SCDParser(java.io.Reader stream) {
- jj_input_stream = new SimpleCharStream(stream, 1, 1);
- token_source = new SCDParserTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 19; i++) jj_la1[i] = -1;
- }
-
- public void ReInit(java.io.Reader stream) {
- jj_input_stream.ReInit(stream, 1, 1);
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 19; i++) jj_la1[i] = -1;
- }
-
- public SCDParser(SCDParserTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 19; i++) jj_la1[i] = -1;
- }
-
- public void ReInit(SCDParserTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 19; i++) jj_la1[i] = -1;
- }
-
- final private Token jj_consume_token(int kind) throws ParseException {
- Token oldToken;
- if ((oldToken = token).next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- if (token.kind == kind) {
- jj_gen++;
- return token;
- }
- token = oldToken;
- jj_kind = kind;
- throw generateParseException();
- }
-
- final public Token getNextToken() {
- if (token.next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- jj_gen++;
- return token;
- }
-
- final public Token getToken(int index) {
- Token t = token;
- for (int i = 0; i < index; i++) {
- if (t.next != null) t = t.next;
- else t = t.next = token_source.getNextToken();
- }
- return t;
- }
-
- final private int jj_ntk() {
- if ((jj_nt=token.next) == null)
- return (jj_ntk = (token.next=token_source.getNextToken()).kind);
- else
- return (jj_ntk = jj_nt.kind);
- }
-
- private java.util.Vector jj_expentries = new java.util.Vector();
- private int[] jj_expentry;
- private int jj_kind = -1;
-
- public ParseException generateParseException() {
- jj_expentries.removeAllElements();
- boolean[] la1tokens = new boolean[47];
- for (int i = 0; i < 47; i++) {
- la1tokens[i] = false;
- }
- if (jj_kind >= 0) {
- la1tokens[jj_kind] = true;
- jj_kind = -1;
- }
- for (int i = 0; i < 19; i++) {
- if (jj_la1[i] == jj_gen) {
- for (int j = 0; j < 32; j++) {
- if ((jj_la1_0[i] & (1<<j)) != 0) {
- la1tokens[j] = true;
- }
- if ((jj_la1_1[i] & (1<<j)) != 0) {
- la1tokens[32+j] = true;
- }
- }
- }
- }
- for (int i = 0; i < 47; i++) {
- if (la1tokens[i]) {
- jj_expentry = new int[1];
- jj_expentry[0] = i;
- jj_expentries.addElement(jj_expentry);
- }
- }
- int[][] exptokseq = new int[jj_expentries.size()][];
- for (int i = 0; i < jj_expentries.size(); i++) {
- exptokseq[i] = (int[])jj_expentries.elementAt(i);
- }
- return new ParseException(token, exptokseq, tokenImage);
- }
-
- final public void enable_tracing() {
- }
-
- final public void disable_tracing() {
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDParserConstants.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDParserConstants.java
deleted file mode 100644
index 3e309597..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDParserConstants.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JavaCC: Do not edit this line. SCDParserConstants.java */
-package com.sun.xml.internal.xsom.impl.scd;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-public interface SCDParserConstants {
-
- int EOF = 0;
- int Letter = 6;
- int BaseChar = 7;
- int Ideographic = 8;
- int CombiningChar = 9;
- int UnicodeDigit = 10;
- int Extender = 11;
- int NCNAME = 12;
- int NUMBER = 13;
- int FACETNAME = 14;
-
- int DEFAULT = 0;
-
-static final List<String> tokenImage = Collections.unmodifiableList(Arrays.asList(
- new String[] {
- "<EOF>",
- "\" \"",
- "\"\\t\"",
- "\"\\n\"",
- "\"\\r\"",
- "\"\\f\"",
- "<Letter>",
- "<BaseChar>",
- "<Ideographic>",
- "<CombiningChar>",
- "<UnicodeDigit>",
- "<Extender>",
- "<NCNAME>",
- "<NUMBER>",
- "<FACETNAME>",
- "\":\"",
- "\"/\"",
- "\"//\"",
- "\"attribute::\"",
- "\"@\"",
- "\"element::\"",
- "\"substitutionGroup::\"",
- "\"type::\"",
- "\"~\"",
- "\"baseType::\"",
- "\"primitiveType::\"",
- "\"itemType::\"",
- "\"memberType::\"",
- "\"scope::\"",
- "\"attributeGroup::\"",
- "\"group::\"",
- "\"identityContraint::\"",
- "\"key::\"",
- "\"notation::\"",
- "\"model::sequence\"",
- "\"model::choice\"",
- "\"model::all\"",
- "\"model::*\"",
- "\"any::*\"",
- "\"anyAttribute::*\"",
- "\"facet::*\"",
- "\"facet::\"",
- "\"component::*\"",
- "\"x-schema::\"",
- "\"x-schema::*\"",
- "\"*\"",
- "\"0\"",
- }));
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDParserTokenManager.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDParserTokenManager.java
deleted file mode 100644
index 43fc3e35..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SCDParserTokenManager.java
+++ /dev/null
@@ -1,2458 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JavaCC: Do not edit this line. SCDParserTokenManager.java */
-package com.sun.xml.internal.xsom.impl.scd;
-import java.util.*;
-import java.io.*;
-import com.sun.xml.internal.xsom.impl.UName;
-import javax.xml.namespace.*;
-
-public class SCDParserTokenManager implements SCDParserConstants
-{
- public java.io.PrintStream debugStream = System.out;
- public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private final int jjStopStringLiteralDfa_0(int pos, long active0)
-{
- switch (pos)
- {
- case 0:
- if ((active0 & 0x3c08000000L) != 0L)
- {
- jjmatchedKind = 12;
- return 103;
- }
- if ((active0 & 0x400000L) != 0L)
- {
- jjmatchedKind = 12;
- return 55;
- }
- if ((active0 & 0x30000000000L) != 0L)
- {
- jjmatchedKind = 12;
- return 68;
- }
- if ((active0 & 0x2000000L) != 0L)
- {
- jjmatchedKind = 12;
- return 81;
- }
- if ((active0 & 0x200000000L) != 0L)
- {
- jjmatchedKind = 12;
- return 23;
- }
- if ((active0 & 0x40000000000L) != 0L)
- {
- jjmatchedKind = 12;
- return 34;
- }
- if ((active0 & 0x100000L) != 0L)
- {
- jjmatchedKind = 12;
- return 91;
- }
- if ((active0 & 0x18c1f4240000L) != 0L)
- {
- jjmatchedKind = 12;
- return 1;
- }
- if ((active0 & 0x1000000L) != 0L)
- {
- jjmatchedKind = 12;
- return 16;
- }
- return -1;
- case 1:
- if ((active0 & 0x1fffff740000L) != 0L)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 1;
- return 1;
- }
- return -1;
- case 2:
- if ((active0 & 0x1fffff740000L) != 0L)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 2;
- return 1;
- }
- return -1;
- case 3:
- if ((active0 & 0x4100000000L) != 0L)
- {
- if (jjmatchedPos < 2)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 2;
- }
- return -1;
- }
- if ((active0 & 0x1fbeff740000L) != 0L)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 3;
- return 1;
- }
- return -1;
- case 4:
- if ((active0 & 0x4100000000L) != 0L)
- {
- if (jjmatchedPos < 2)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 2;
- }
- return -1;
- }
- if ((active0 & 0x400000L) != 0L)
- {
- if (jjmatchedPos < 3)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 3;
- }
- return -1;
- }
- if ((active0 & 0x1fbeff340000L) != 0L)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 4;
- return 1;
- }
- return -1;
- case 5:
- if ((active0 & 0x4000000000L) != 0L)
- {
- if (jjmatchedPos < 2)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 2;
- }
- return -1;
- }
- if ((active0 & 0x33c50000000L) != 0L)
- {
- if (jjmatchedPos < 4)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 4;
- }
- return -1;
- }
- if ((active0 & 0x400000L) != 0L)
- {
- if (jjmatchedPos < 3)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 3;
- }
- return -1;
- }
- if ((active0 & 0x1c82af340000L) != 0L)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 5;
- return 1;
- }
- return -1;
- case 6:
- if ((active0 & 0x33c50000000L) != 0L)
- {
- if (jjmatchedPos < 4)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 4;
- }
- return -1;
- }
- if ((active0 & 0x1c82af340000L) != 0L)
- {
- if (jjmatchedPos != 6)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 6;
- }
- return 1;
- }
- return -1;
- case 7:
- if ((active0 & 0x100000L) != 0L)
- {
- if (jjmatchedPos < 6)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 6;
- }
- return -1;
- }
- if ((active0 & 0x13c00000000L) != 0L)
- {
- if (jjmatchedPos < 4)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 4;
- }
- return -1;
- }
- if ((active0 & 0x1c82af240000L) != 0L)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 7;
- return 1;
- }
- return -1;
- case 8:
- if ((active0 & 0x480aa240000L) != 0L)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 8;
- return 1;
- }
- if ((active0 & 0x180205000000L) != 0L)
- {
- if (jjmatchedPos < 7)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 7;
- }
- return -1;
- }
- if ((active0 & 0x100000L) != 0L)
- {
- if (jjmatchedPos < 6)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 6;
- }
- return -1;
- }
- if ((active0 & 0x1c00000000L) != 0L)
- {
- if (jjmatchedPos < 4)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 4;
- }
- return -1;
- }
- return -1;
- case 9:
- if ((active0 & 0x80aa200000L) != 0L)
- {
- if (jjmatchedPos != 9)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 9;
- }
- return 1;
- }
- if ((active0 & 0x180205000000L) != 0L)
- {
- if (jjmatchedPos < 7)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 7;
- }
- return -1;
- }
- if ((active0 & 0x40000040000L) != 0L)
- {
- if (jjmatchedPos < 8)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 8;
- }
- return -1;
- }
- if ((active0 & 0x1c00000000L) != 0L)
- {
- if (jjmatchedPos < 4)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 4;
- }
- return -1;
- }
- return -1;
- case 10:
- if ((active0 & 0x100000000000L) != 0L)
- {
- if (jjmatchedPos < 7)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 7;
- }
- return -1;
- }
- if ((active0 & 0x8000000L) != 0L)
- {
- if (jjmatchedPos < 9)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 9;
- }
- return -1;
- }
- if ((active0 & 0x40000040000L) != 0L)
- {
- if (jjmatchedPos < 8)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 8;
- }
- return -1;
- }
- if ((active0 & 0x80a2200000L) != 0L)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 10;
- return 1;
- }
- if ((active0 & 0xc00000000L) != 0L)
- {
- if (jjmatchedPos < 4)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 4;
- }
- return -1;
- }
- return -1;
- case 11:
- if ((active0 & 0x40000000000L) != 0L)
- {
- if (jjmatchedPos < 8)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 8;
- }
- return -1;
- }
- if ((active0 & 0x8000000L) != 0L)
- {
- if (jjmatchedPos < 9)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 9;
- }
- return -1;
- }
- if ((active0 & 0xc00000000L) != 0L)
- {
- if (jjmatchedPos < 4)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 4;
- }
- return -1;
- }
- if ((active0 & 0x80a2200000L) != 0L)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 11;
- return 1;
- }
- return -1;
- case 12:
- if ((active0 & 0x8000000000L) != 0L)
- {
- if (jjmatchedPos < 11)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 11;
- }
- return -1;
- }
- if ((active0 & 0xc00000000L) != 0L)
- {
- if (jjmatchedPos < 4)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 4;
- }
- return -1;
- }
- if ((active0 & 0xa2200000L) != 0L)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 12;
- return 1;
- }
- return -1;
- case 13:
- if ((active0 & 0x8000000000L) != 0L)
- {
- if (jjmatchedPos < 11)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 11;
- }
- return -1;
- }
- if ((active0 & 0x2000000L) != 0L)
- {
- if (jjmatchedPos < 12)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 12;
- }
- return -1;
- }
- if ((active0 & 0x400000000L) != 0L)
- {
- if (jjmatchedPos < 4)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 4;
- }
- return -1;
- }
- if ((active0 & 0xa0200000L) != 0L)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 13;
- return 1;
- }
- return -1;
- case 14:
- if ((active0 & 0x8000000000L) != 0L)
- {
- if (jjmatchedPos < 11)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 11;
- }
- return -1;
- }
- if ((active0 & 0x20000000L) != 0L)
- {
- if (jjmatchedPos < 13)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 13;
- }
- return -1;
- }
- if ((active0 & 0x2000000L) != 0L)
- {
- if (jjmatchedPos < 12)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 12;
- }
- return -1;
- }
- if ((active0 & 0x400000000L) != 0L)
- {
- if (jjmatchedPos < 4)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 4;
- }
- return -1;
- }
- if ((active0 & 0x80200000L) != 0L)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 14;
- return 1;
- }
- return -1;
- case 15:
- if ((active0 & 0x20000000L) != 0L)
- {
- if (jjmatchedPos < 13)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 13;
- }
- return -1;
- }
- if ((active0 & 0x80200000L) != 0L)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 15;
- return 1;
- }
- return -1;
- case 16:
- if ((active0 & 0x80200000L) != 0L)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 16;
- return 1;
- }
- return -1;
- case 17:
- if ((active0 & 0x80200000L) != 0L)
- {
- if (jjmatchedPos < 16)
- {
- jjmatchedKind = 12;
- jjmatchedPos = 16;
- }
- return -1;
- }
- return -1;
- default :
- return -1;
- }
-}
-private final int jjStartNfa_0(int pos, long active0)
-{
- return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
-}
-private final int jjStopAtPos(int pos, int kind)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- return pos + 1;
-}
-private final int jjStartNfaWithStates_0(int pos, int kind, int state)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return pos + 1; }
- return jjMoveNfa_0(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_0()
-{
- switch(curChar)
- {
- case 42:
- return jjStopAtPos(0, 45);
- case 47:
- jjmatchedKind = 16;
- return jjMoveStringLiteralDfa1_0(0x20000L);
- case 48:
- return jjStopAtPos(0, 46);
- case 58:
- return jjStopAtPos(0, 15);
- case 64:
- return jjStopAtPos(0, 19);
- case 97:
- return jjMoveStringLiteralDfa1_0(0xc020040000L);
- case 98:
- return jjMoveStringLiteralDfa1_0(0x1000000L);
- case 99:
- return jjMoveStringLiteralDfa1_0(0x40000000000L);
- case 101:
- return jjMoveStringLiteralDfa1_0(0x100000L);
- case 102:
- return jjMoveStringLiteralDfa1_0(0x30000000000L);
- case 103:
- return jjMoveStringLiteralDfa1_0(0x40000000L);
- case 105:
- return jjMoveStringLiteralDfa1_0(0x84000000L);
- case 107:
- return jjMoveStringLiteralDfa1_0(0x100000000L);
- case 109:
- return jjMoveStringLiteralDfa1_0(0x3c08000000L);
- case 110:
- return jjMoveStringLiteralDfa1_0(0x200000000L);
- case 112:
- return jjMoveStringLiteralDfa1_0(0x2000000L);
- case 115:
- return jjMoveStringLiteralDfa1_0(0x10200000L);
- case 116:
- return jjMoveStringLiteralDfa1_0(0x400000L);
- case 120:
- return jjMoveStringLiteralDfa1_0(0x180000000000L);
- case 126:
- return jjStopAtPos(0, 23);
- default :
- return jjMoveNfa_0(0, 0);
- }
-}
-private final int jjMoveStringLiteralDfa1_0(long active0)
-{
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(0, active0);
- return 1;
- }
- switch(curChar)
- {
- case 45:
- return jjMoveStringLiteralDfa2_0(active0, 0x180000000000L);
- case 47:
- if ((active0 & 0x20000L) != 0L)
- return jjStopAtPos(1, 17);
- break;
- case 97:
- return jjMoveStringLiteralDfa2_0(active0, 0x30001000000L);
- case 99:
- return jjMoveStringLiteralDfa2_0(active0, 0x10000000L);
- case 100:
- return jjMoveStringLiteralDfa2_0(active0, 0x80000000L);
- case 101:
- return jjMoveStringLiteralDfa2_0(active0, 0x108000000L);
- case 108:
- return jjMoveStringLiteralDfa2_0(active0, 0x100000L);
- case 110:
- return jjMoveStringLiteralDfa2_0(active0, 0xc000000000L);
- case 111:
- return jjMoveStringLiteralDfa2_0(active0, 0x43e00000000L);
- case 114:
- return jjMoveStringLiteralDfa2_0(active0, 0x42000000L);
- case 116:
- return jjMoveStringLiteralDfa2_0(active0, 0x24040000L);
- case 117:
- return jjMoveStringLiteralDfa2_0(active0, 0x200000L);
- case 121:
- return jjMoveStringLiteralDfa2_0(active0, 0x400000L);
- default :
- break;
- }
- return jjStartNfa_0(0, active0);
-}
-private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(0, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(1, active0);
- return 2;
- }
- switch(curChar)
- {
- case 98:
- return jjMoveStringLiteralDfa3_0(active0, 0x200000L);
- case 99:
- return jjMoveStringLiteralDfa3_0(active0, 0x30000000000L);
- case 100:
- return jjMoveStringLiteralDfa3_0(active0, 0x3c00000000L);
- case 101:
- return jjMoveStringLiteralDfa3_0(active0, 0x84100000L);
- case 105:
- return jjMoveStringLiteralDfa3_0(active0, 0x2000000L);
- case 109:
- return jjMoveStringLiteralDfa3_0(active0, 0x40008000000L);
- case 111:
- return jjMoveStringLiteralDfa3_0(active0, 0x50000000L);
- case 112:
- return jjMoveStringLiteralDfa3_0(active0, 0x400000L);
- case 115:
- return jjMoveStringLiteralDfa3_0(active0, 0x180001000000L);
- case 116:
- return jjMoveStringLiteralDfa3_0(active0, 0x220040000L);
- case 121:
- return jjMoveStringLiteralDfa3_0(active0, 0xc100000000L);
- default :
- break;
- }
- return jjStartNfa_0(1, active0);
-}
-private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(1, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(2, active0);
- return 3;
- }
- switch(curChar)
- {
- case 58:
- return jjMoveStringLiteralDfa4_0(active0, 0x4100000000L);
- case 65:
- return jjMoveStringLiteralDfa4_0(active0, 0x8000000000L);
- case 97:
- return jjMoveStringLiteralDfa4_0(active0, 0x200000000L);
- case 98:
- return jjMoveStringLiteralDfa4_0(active0, 0x8000000L);
- case 99:
- return jjMoveStringLiteralDfa4_0(active0, 0x180000000000L);
- case 101:
- return jjMoveStringLiteralDfa4_0(active0, 0x33c01400000L);
- case 109:
- return jjMoveStringLiteralDfa4_0(active0, 0x6100000L);
- case 110:
- return jjMoveStringLiteralDfa4_0(active0, 0x80000000L);
- case 112:
- return jjMoveStringLiteralDfa4_0(active0, 0x40010000000L);
- case 114:
- return jjMoveStringLiteralDfa4_0(active0, 0x20040000L);
- case 115:
- return jjMoveStringLiteralDfa4_0(active0, 0x200000L);
- case 117:
- return jjMoveStringLiteralDfa4_0(active0, 0x40000000L);
- default :
- break;
- }
- return jjStartNfa_0(2, active0);
-}
-private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(2, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(3, active0);
- return 4;
- }
- switch(curChar)
- {
- case 58:
- if ((active0 & 0x100000000L) != 0L)
- return jjStopAtPos(4, 32);
- return jjMoveStringLiteralDfa5_0(active0, 0x4000400000L);
- case 84:
- return jjMoveStringLiteralDfa5_0(active0, 0x5000000L);
- case 101:
- return jjMoveStringLiteralDfa5_0(active0, 0x18100000L);
- case 104:
- return jjMoveStringLiteralDfa5_0(active0, 0x180000000000L);
- case 105:
- return jjMoveStringLiteralDfa5_0(active0, 0x22040000L);
- case 108:
- return jjMoveStringLiteralDfa5_0(active0, 0x3c00000000L);
- case 111:
- return jjMoveStringLiteralDfa5_0(active0, 0x40000000000L);
- case 112:
- return jjMoveStringLiteralDfa5_0(active0, 0x40000000L);
- case 116:
- return jjMoveStringLiteralDfa5_0(active0, 0x38280200000L);
- default :
- break;
- }
- return jjStartNfa_0(3, active0);
-}
-private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(3, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(4, active0);
- return 5;
- }
- switch(curChar)
- {
- case 42:
- if ((active0 & 0x4000000000L) != 0L)
- return jjStopAtPos(5, 38);
- break;
- case 58:
- if ((active0 & 0x400000L) != 0L)
- return jjStopAtPos(5, 22);
- return jjMoveStringLiteralDfa6_0(active0, 0x33c50000000L);
- case 98:
- return jjMoveStringLiteralDfa6_0(active0, 0x20040000L);
- case 101:
- return jjMoveStringLiteralDfa6_0(active0, 0x180000000000L);
- case 105:
- return jjMoveStringLiteralDfa6_0(active0, 0x280200000L);
- case 110:
- return jjMoveStringLiteralDfa6_0(active0, 0x40000100000L);
- case 114:
- return jjMoveStringLiteralDfa6_0(active0, 0x8000000L);
- case 116:
- return jjMoveStringLiteralDfa6_0(active0, 0x8002000000L);
- case 121:
- return jjMoveStringLiteralDfa6_0(active0, 0x5000000L);
- default :
- break;
- }
- return jjStartNfa_0(4, active0);
-}
-private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(4, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(5, active0);
- return 6;
- }
- switch(curChar)
- {
- case 58:
- if ((active0 & 0x10000000L) != 0L)
- return jjStopAtPos(6, 28);
- else if ((active0 & 0x40000000L) != 0L)
- return jjStopAtPos(6, 30);
- else if ((active0 & 0x20000000000L) != 0L)
- {
- jjmatchedKind = 41;
- jjmatchedPos = 6;
- }
- return jjMoveStringLiteralDfa7_0(active0, 0x13c00000000L);
- case 84:
- return jjMoveStringLiteralDfa7_0(active0, 0x8000000L);
- case 101:
- return jjMoveStringLiteralDfa7_0(active0, 0x40000000000L);
- case 105:
- return jjMoveStringLiteralDfa7_0(active0, 0x2000000L);
- case 109:
- return jjMoveStringLiteralDfa7_0(active0, 0x180000000000L);
- case 111:
- return jjMoveStringLiteralDfa7_0(active0, 0x200000000L);
- case 112:
- return jjMoveStringLiteralDfa7_0(active0, 0x5000000L);
- case 114:
- return jjMoveStringLiteralDfa7_0(active0, 0x8000000000L);
- case 116:
- return jjMoveStringLiteralDfa7_0(active0, 0x80300000L);
- case 117:
- return jjMoveStringLiteralDfa7_0(active0, 0x20040000L);
- default :
- break;
- }
- return jjStartNfa_0(5, active0);
-}
-private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(5, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(6, active0);
- return 7;
- }
- switch(curChar)
- {
- case 42:
- if ((active0 & 0x2000000000L) != 0L)
- return jjStopAtPos(7, 37);
- else if ((active0 & 0x10000000000L) != 0L)
- return jjStopAtPos(7, 40);
- break;
- case 58:
- return jjMoveStringLiteralDfa8_0(active0, 0x100000L);
- case 97:
- return jjMoveStringLiteralDfa8_0(active0, 0x181000000000L);
- case 99:
- return jjMoveStringLiteralDfa8_0(active0, 0x800000000L);
- case 101:
- return jjMoveStringLiteralDfa8_0(active0, 0x5000000L);
- case 105:
- return jjMoveStringLiteralDfa8_0(active0, 0x8000000000L);
- case 110:
- return jjMoveStringLiteralDfa8_0(active0, 0x40200000000L);
- case 115:
- return jjMoveStringLiteralDfa8_0(active0, 0x400000000L);
- case 116:
- return jjMoveStringLiteralDfa8_0(active0, 0x20040000L);
- case 117:
- return jjMoveStringLiteralDfa8_0(active0, 0x200000L);
- case 118:
- return jjMoveStringLiteralDfa8_0(active0, 0x2000000L);
- case 121:
- return jjMoveStringLiteralDfa8_0(active0, 0x88000000L);
- default :
- break;
- }
- return jjStartNfa_0(6, active0);
-}
-private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(6, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(7, active0);
- return 8;
- }
- switch(curChar)
- {
- case 58:
- if ((active0 & 0x100000L) != 0L)
- return jjStopAtPos(8, 20);
- return jjMoveStringLiteralDfa9_0(active0, 0x180205000000L);
- case 67:
- return jjMoveStringLiteralDfa9_0(active0, 0x80000000L);
- case 98:
- return jjMoveStringLiteralDfa9_0(active0, 0x8000000000L);
- case 101:
- return jjMoveStringLiteralDfa9_0(active0, 0x422040000L);
- case 104:
- return jjMoveStringLiteralDfa9_0(active0, 0x800000000L);
- case 108:
- return jjMoveStringLiteralDfa9_0(active0, 0x1000000000L);
- case 112:
- return jjMoveStringLiteralDfa9_0(active0, 0x8000000L);
- case 116:
- return jjMoveStringLiteralDfa9_0(active0, 0x40000200000L);
- default :
- break;
- }
- return jjStartNfa_0(7, active0);
-}
-private final int jjMoveStringLiteralDfa9_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(7, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(8, active0);
- return 9;
- }
- switch(curChar)
- {
- case 58:
- if ((active0 & 0x1000000L) != 0L)
- return jjStopAtPos(9, 24);
- else if ((active0 & 0x4000000L) != 0L)
- return jjStopAtPos(9, 26);
- else if ((active0 & 0x200000000L) != 0L)
- return jjStopAtPos(9, 33);
- else if ((active0 & 0x80000000000L) != 0L)
- {
- jjmatchedKind = 43;
- jjmatchedPos = 9;
- }
- return jjMoveStringLiteralDfa10_0(active0, 0x140000040000L);
- case 71:
- return jjMoveStringLiteralDfa10_0(active0, 0x20000000L);
- case 84:
- return jjMoveStringLiteralDfa10_0(active0, 0x2000000L);
- case 101:
- return jjMoveStringLiteralDfa10_0(active0, 0x8000000L);
- case 105:
- return jjMoveStringLiteralDfa10_0(active0, 0x200000L);
- case 108:
- if ((active0 & 0x1000000000L) != 0L)
- return jjStopAtPos(9, 36);
- break;
- case 111:
- return jjMoveStringLiteralDfa10_0(active0, 0x880000000L);
- case 113:
- return jjMoveStringLiteralDfa10_0(active0, 0x400000000L);
- case 117:
- return jjMoveStringLiteralDfa10_0(active0, 0x8000000000L);
- default :
- break;
- }
- return jjStartNfa_0(8, active0);
-}
-private final int jjMoveStringLiteralDfa10_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(8, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(9, active0);
- return 10;
- }
- switch(curChar)
- {
- case 42:
- if ((active0 & 0x100000000000L) != 0L)
- return jjStopAtPos(10, 44);
- break;
- case 58:
- if ((active0 & 0x40000L) != 0L)
- return jjStopAtPos(10, 18);
- return jjMoveStringLiteralDfa11_0(active0, 0x40008000000L);
- case 105:
- return jjMoveStringLiteralDfa11_0(active0, 0x800000000L);
- case 110:
- return jjMoveStringLiteralDfa11_0(active0, 0x80000000L);
- case 111:
- return jjMoveStringLiteralDfa11_0(active0, 0x200000L);
- case 114:
- return jjMoveStringLiteralDfa11_0(active0, 0x20000000L);
- case 116:
- return jjMoveStringLiteralDfa11_0(active0, 0x8000000000L);
- case 117:
- return jjMoveStringLiteralDfa11_0(active0, 0x400000000L);
- case 121:
- return jjMoveStringLiteralDfa11_0(active0, 0x2000000L);
- default :
- break;
- }
- return jjStartNfa_0(9, active0);
-}
-private final int jjMoveStringLiteralDfa11_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(9, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(10, active0);
- return 11;
- }
- switch(curChar)
- {
- case 42:
- if ((active0 & 0x40000000000L) != 0L)
- return jjStopAtPos(11, 42);
- break;
- case 58:
- if ((active0 & 0x8000000L) != 0L)
- return jjStopAtPos(11, 27);
- break;
- case 99:
- return jjMoveStringLiteralDfa12_0(active0, 0x800000000L);
- case 101:
- return jjMoveStringLiteralDfa12_0(active0, 0x8400000000L);
- case 110:
- return jjMoveStringLiteralDfa12_0(active0, 0x200000L);
- case 111:
- return jjMoveStringLiteralDfa12_0(active0, 0x20000000L);
- case 112:
- return jjMoveStringLiteralDfa12_0(active0, 0x2000000L);
- case 116:
- return jjMoveStringLiteralDfa12_0(active0, 0x80000000L);
- default :
- break;
- }
- return jjStartNfa_0(10, active0);
-}
-private final int jjMoveStringLiteralDfa12_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(10, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(11, active0);
- return 12;
- }
- switch(curChar)
- {
- case 58:
- return jjMoveStringLiteralDfa13_0(active0, 0x8000000000L);
- case 71:
- return jjMoveStringLiteralDfa13_0(active0, 0x200000L);
- case 101:
- if ((active0 & 0x800000000L) != 0L)
- return jjStopAtPos(12, 35);
- return jjMoveStringLiteralDfa13_0(active0, 0x2000000L);
- case 110:
- return jjMoveStringLiteralDfa13_0(active0, 0x400000000L);
- case 114:
- return jjMoveStringLiteralDfa13_0(active0, 0x80000000L);
- case 117:
- return jjMoveStringLiteralDfa13_0(active0, 0x20000000L);
- default :
- break;
- }
- return jjStartNfa_0(11, active0);
-}
-private final int jjMoveStringLiteralDfa13_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(11, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(12, active0);
- return 13;
- }
- switch(curChar)
- {
- case 58:
- return jjMoveStringLiteralDfa14_0(active0, 0x8002000000L);
- case 97:
- return jjMoveStringLiteralDfa14_0(active0, 0x80000000L);
- case 99:
- return jjMoveStringLiteralDfa14_0(active0, 0x400000000L);
- case 112:
- return jjMoveStringLiteralDfa14_0(active0, 0x20000000L);
- case 114:
- return jjMoveStringLiteralDfa14_0(active0, 0x200000L);
- default :
- break;
- }
- return jjStartNfa_0(12, active0);
-}
-private final int jjMoveStringLiteralDfa14_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(12, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(13, active0);
- return 14;
- }
- switch(curChar)
- {
- case 42:
- if ((active0 & 0x8000000000L) != 0L)
- return jjStopAtPos(14, 39);
- break;
- case 58:
- if ((active0 & 0x2000000L) != 0L)
- return jjStopAtPos(14, 25);
- return jjMoveStringLiteralDfa15_0(active0, 0x20000000L);
- case 101:
- if ((active0 & 0x400000000L) != 0L)
- return jjStopAtPos(14, 34);
- break;
- case 105:
- return jjMoveStringLiteralDfa15_0(active0, 0x80000000L);
- case 111:
- return jjMoveStringLiteralDfa15_0(active0, 0x200000L);
- default :
- break;
- }
- return jjStartNfa_0(13, active0);
-}
-private final int jjMoveStringLiteralDfa15_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(13, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(14, active0);
- return 15;
- }
- switch(curChar)
- {
- case 58:
- if ((active0 & 0x20000000L) != 0L)
- return jjStopAtPos(15, 29);
- break;
- case 110:
- return jjMoveStringLiteralDfa16_0(active0, 0x80000000L);
- case 117:
- return jjMoveStringLiteralDfa16_0(active0, 0x200000L);
- default :
- break;
- }
- return jjStartNfa_0(14, active0);
-}
-private final int jjMoveStringLiteralDfa16_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(14, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(15, active0);
- return 16;
- }
- switch(curChar)
- {
- case 112:
- return jjMoveStringLiteralDfa17_0(active0, 0x200000L);
- case 116:
- return jjMoveStringLiteralDfa17_0(active0, 0x80000000L);
- default :
- break;
- }
- return jjStartNfa_0(15, active0);
-}
-private final int jjMoveStringLiteralDfa17_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(15, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(16, active0);
- return 17;
- }
- switch(curChar)
- {
- case 58:
- return jjMoveStringLiteralDfa18_0(active0, 0x80200000L);
- default :
- break;
- }
- return jjStartNfa_0(16, active0);
-}
-private final int jjMoveStringLiteralDfa18_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(16, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(17, active0);
- return 18;
- }
- switch(curChar)
- {
- case 58:
- if ((active0 & 0x200000L) != 0L)
- return jjStopAtPos(18, 21);
- else if ((active0 & 0x80000000L) != 0L)
- return jjStopAtPos(18, 31);
- break;
- default :
- break;
- }
- return jjStartNfa_0(17, active0);
-}
-private final void jjCheckNAdd(int state)
-{
- if (jjrounds[state] != jjround)
- {
- jjstateSet[jjnewStateCnt++] = state;
- jjrounds[state] = jjround;
- }
-}
-private final void jjAddStates(int start, int end)
-{
- do {
- jjstateSet[jjnewStateCnt++] = jjnextStates[start];
- } while (start++ != end);
-}
-private final void jjCheckNAddTwoStates(int state1, int state2)
-{
- jjCheckNAdd(state1);
- jjCheckNAdd(state2);
-}
-private final void jjCheckNAddStates(int start, int end)
-{
- do {
- jjCheckNAdd(jjnextStates[start]);
- } while (start++ != end);
-}
-private final void jjCheckNAddStates(int start)
-{
- jjCheckNAdd(jjnextStates[start]);
- jjCheckNAdd(jjnextStates[start + 1]);
-}
-static final long[] jjbitVec0 = {
- 0x0L, 0xffffffffffffc000L, 0xfffff0007fffffffL, 0x7fffffL
-};
-static final long[] jjbitVec2 = {
- 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL
-};
-static final long[] jjbitVec3 = {
- 0x7ff3ffffffffffffL, 0x7ffffffffffffdfeL, 0xffffffffffffffffL, 0xfc31ffffffffe00fL
-};
-static final long[] jjbitVec4 = {
- 0xffffffL, 0xffffffffffff0000L, 0xf80001ffffffffffL, 0x3L
-};
-static final long[] jjbitVec5 = {
- 0x0L, 0x0L, 0xfffffffbffffd740L, 0xffffd547f7fffL
-};
-static final long[] jjbitVec6 = {
- 0xffffffffffffdffeL, 0xffffffffdffeffffL, 0xffffffffffff0003L, 0x33fcfffffff199fL
-};
-static final long[] jjbitVec7 = {
- 0xfffe000000000000L, 0xfffffffe027fffffL, 0x7fL, 0x707ffffff0000L
-};
-static final long[] jjbitVec8 = {
- 0x7fffffe00000000L, 0xfffe0000000007feL, 0x7cffffffffffffffL, 0x60002f7fffL
-};
-static final long[] jjbitVec9 = {
- 0x23ffffffffffffe0L, 0x3ff000000L, 0x3c5fdfffff99fe0L, 0x30003b0000000L
-};
-static final long[] jjbitVec10 = {
- 0x36dfdfffff987e0L, 0x1c00005e000000L, 0x23edfdfffffbafe0L, 0x100000000L
-};
-static final long[] jjbitVec11 = {
- 0x23cdfdfffff99fe0L, 0x3b0000000L, 0x3bfc718d63dc7e0L, 0x0L
-};
-static final long[] jjbitVec12 = {
- 0x3effdfffffddfe0L, 0x300000000L, 0x3effdfffffddfe0L, 0x340000000L
-};
-static final long[] jjbitVec13 = {
- 0x3fffdfffffddfe0L, 0x300000000L, 0x0L, 0x0L
-};
-static final long[] jjbitVec14 = {
- 0xd7ffffffffffeL, 0x3fL, 0x200d6caefef02596L, 0x1fL
-};
-static final long[] jjbitVec15 = {
- 0x0L, 0x3fffffffeffL, 0x0L, 0x0L
-};
-static final long[] jjbitVec16 = {
- 0x0L, 0x0L, 0xffffffff00000000L, 0x7fffffffff003fL
-};
-static final long[] jjbitVec17 = {
- 0x500000000007daedL, 0x2c62ab82315001L, 0xf580c90040000000L, 0x201080000000007L
-};
-static final long[] jjbitVec18 = {
- 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffff0fffffffL, 0x3ffffffffffffffL
-};
-static final long[] jjbitVec19 = {
- 0xffffffff3f3fffffL, 0x3fffffffaaff3f3fL, 0x5fdfffffffffffffL, 0x1fdc1fff0fcf1fdcL
-};
-static final long[] jjbitVec20 = {
- 0x4c4000000000L, 0x0L, 0x7L, 0x0L
-};
-static final long[] jjbitVec21 = {
- 0x3fe00000080L, 0xfffffffffffffffeL, 0xfffffffe001fffffL, 0x7ffffffffffffffL
-};
-static final long[] jjbitVec22 = {
- 0x1fffffffffe0L, 0x0L, 0x0L, 0x0L
-};
-static final long[] jjbitVec23 = {
- 0xffffffffffffffffL, 0xffffffffffffffffL, 0x3fffffffffL, 0x0L
-};
-static final long[] jjbitVec24 = {
- 0xffffffffffffffffL, 0xffffffffffffffffL, 0xfffffffffL, 0x0L
-};
-static final long[] jjbitVec25 = {
- 0x0L, 0x0L, 0x80000000000000L, 0xff7fffffff7fffffL
-};
-static final long[] jjbitVec26 = {
- 0xffffffL, 0xffffffffffff0000L, 0xf80001ffffffffffL, 0x30003L
-};
-static final long[] jjbitVec27 = {
- 0xffffffffffffffffL, 0x30000003fL, 0xfffffffbffffd7c0L, 0xffffd547f7fffL
-};
-static final long[] jjbitVec28 = {
- 0xffffffffffffdffeL, 0xffffffffdffeffffL, 0xffffffffffff007bL, 0x33fcfffffff199fL
-};
-static final long[] jjbitVec29 = {
- 0xfffe000000000000L, 0xfffffffe027fffffL, 0xbbfffffbfffe007fL, 0x707ffffff0016L
-};
-static final long[] jjbitVec30 = {
- 0x7fffffe00000000L, 0xffff03ff0007ffffL, 0x7cffffffffffffffL, 0x3ff3dffffef7fffL
-};
-static final long[] jjbitVec31 = {
- 0xf3ffffffffffffeeL, 0xffcfff1e3fffL, 0xd3c5fdfffff99feeL, 0x3ffcfb080399fL
-};
-static final long[] jjbitVec32 = {
- 0xd36dfdfffff987e4L, 0x1fffc05e003987L, 0xf3edfdfffffbafeeL, 0xffc100003bbfL
-};
-static final long[] jjbitVec33 = {
- 0xf3cdfdfffff99feeL, 0xffc3b0c0398fL, 0xc3bfc718d63dc7ecL, 0xff8000803dc7L
-};
-static final long[] jjbitVec34 = {
- 0xc3effdfffffddfeeL, 0xffc300603ddfL, 0xc3effdfffffddfecL, 0xffc340603ddfL
-};
-static final long[] jjbitVec35 = {
- 0xc3fffdfffffddfecL, 0xffc300803dcfL, 0x0L, 0x0L
-};
-static final long[] jjbitVec36 = {
- 0x7ff7ffffffffffeL, 0x3ff7fffL, 0x3bff6caefef02596L, 0x3ff3f5fL
-};
-static final long[] jjbitVec37 = {
- 0xc2a003ff03000000L, 0xfffe03fffffffeffL, 0x2fe3ffffebf0fdfL, 0x0L
-};
-static final long[] jjbitVec38 = {
- 0x0L, 0x0L, 0x0L, 0x21fff0000L
-};
-static final long[] jjbitVec39 = {
- 0x3efffe000000a0L, 0xfffffffffffffffeL, 0xfffffffe661fffffL, 0x77ffffffffffffffL
-};
-private final int jjMoveNfa_0(int startState, int curPos)
-{
- int[] nextStates;
- int startsAt = 0;
- jjnewStateCnt = 148;
- int i = 1;
- jjstateSet[0] = startState;
- int j, kind = 0x7fffffff;
- for (;;)
- {
- if (++jjround == 0x7fffffff)
- ReInitRounds();
- if (curChar < 64)
- {
- long l = 1L << curChar;
- MatchLoop: do
- {
- switch(jjstateSet[--i])
- {
- case 34:
- case 1:
- if ((0x3ff600000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 91:
- if ((0x3ff600000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 16:
- if ((0x3ff600000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 55:
- if ((0x3ff600000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 68:
- if ((0x3ff600000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 103:
- if ((0x3ff600000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 81:
- if ((0x3ff600000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 23:
- if ((0x3ff600000000000L & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 3:
- if ((0x3ff000000000000L & l) != 0L)
- jjAddStates(0, 1);
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else if (curChar < 128)
- {
- long l = 1L << (curChar & 077);
- MatchLoop: do
- {
- switch(jjstateSet[--i])
- {
- case 34:
- if ((0x7fffffe87fffffeL & l) != 0L)
- {
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- }
- if (curChar == 97)
- jjstateSet[jjnewStateCnt++] = 33;
- break;
- case 91:
- if ((0x7fffffe87fffffeL & l) != 0L)
- {
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- }
- if (curChar == 110)
- jjstateSet[jjnewStateCnt++] = 90;
- break;
- case 16:
- if ((0x7fffffe87fffffeL & l) != 0L)
- {
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- }
- if (curChar == 111)
- jjstateSet[jjnewStateCnt++] = 15;
- break;
- case 55:
- if ((0x7fffffe87fffffeL & l) != 0L)
- {
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- }
- if (curChar == 111)
- jjstateSet[jjnewStateCnt++] = 54;
- break;
- case 68:
- if ((0x7fffffe87fffffeL & l) != 0L)
- {
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- }
- if (curChar == 114)
- jjstateSet[jjnewStateCnt++] = 67;
- break;
- case 103:
- if ((0x7fffffe87fffffeL & l) != 0L)
- {
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- }
- if (curChar == 97)
- jjstateSet[jjnewStateCnt++] = 146;
- else if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 139;
- if (curChar == 97)
- jjstateSet[jjnewStateCnt++] = 132;
- else if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 122;
- if (curChar == 97)
- jjstateSet[jjnewStateCnt++] = 112;
- else if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 102;
- break;
- case 0:
- if ((0x7fffffe87fffffeL & l) != 0L)
- {
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- }
- else if (curChar == 91)
- jjstateSet[jjnewStateCnt++] = 3;
- if (curChar == 109)
- jjAddStates(2, 7);
- else if (curChar == 101)
- jjstateSet[jjnewStateCnt++] = 91;
- else if (curChar == 112)
- jjstateSet[jjnewStateCnt++] = 81;
- else if (curChar == 108)
- jjstateSet[jjnewStateCnt++] = 74;
- else if (curChar == 102)
- jjstateSet[jjnewStateCnt++] = 68;
- else if (curChar == 116)
- jjstateSet[jjnewStateCnt++] = 55;
- else if (curChar == 119)
- jjstateSet[jjnewStateCnt++] = 44;
- else if (curChar == 99)
- jjstateSet[jjnewStateCnt++] = 34;
- else if (curChar == 110)
- jjstateSet[jjnewStateCnt++] = 23;
- else if (curChar == 98)
- jjstateSet[jjnewStateCnt++] = 16;
- else if (curChar == 111)
- jjstateSet[jjnewStateCnt++] = 10;
- break;
- case 81:
- if ((0x7fffffe87fffffeL & l) != 0L)
- {
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- }
- if (curChar == 97)
- jjstateSet[jjnewStateCnt++] = 80;
- break;
- case 23:
- if ((0x7fffffe87fffffeL & l) != 0L)
- {
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- }
- if (curChar == 117)
- jjstateSet[jjnewStateCnt++] = 22;
- break;
- case 1:
- if ((0x7fffffe87fffffeL & l) == 0L)
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 2:
- if (curChar == 91)
- jjstateSet[jjnewStateCnt++] = 3;
- break;
- case 4:
- if (curChar == 93)
- kind = 13;
- break;
- case 5:
- if (curChar == 100 && kind > 14)
- kind = 14;
- break;
- case 6:
- case 12:
- if (curChar == 101)
- jjCheckNAdd(5);
- break;
- case 7:
- if (curChar == 114)
- jjstateSet[jjnewStateCnt++] = 6;
- break;
- case 8:
- if (curChar == 101)
- jjstateSet[jjnewStateCnt++] = 7;
- break;
- case 9:
- if (curChar == 100)
- jjstateSet[jjnewStateCnt++] = 8;
- break;
- case 10:
- if (curChar == 114)
- jjstateSet[jjnewStateCnt++] = 9;
- break;
- case 11:
- if (curChar == 111)
- jjstateSet[jjnewStateCnt++] = 10;
- break;
- case 13:
- if (curChar == 100)
- jjstateSet[jjnewStateCnt++] = 12;
- break;
- case 14:
- if (curChar == 110)
- jjstateSet[jjnewStateCnt++] = 13;
- break;
- case 15:
- if (curChar == 117)
- jjstateSet[jjnewStateCnt++] = 14;
- break;
- case 17:
- if (curChar == 98)
- jjstateSet[jjnewStateCnt++] = 16;
- break;
- case 18:
- if (curChar == 99 && kind > 14)
- kind = 14;
- break;
- case 19:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 18;
- break;
- case 20:
- if (curChar == 114)
- jjstateSet[jjnewStateCnt++] = 19;
- break;
- case 21:
- if (curChar == 101)
- jjstateSet[jjnewStateCnt++] = 20;
- break;
- case 22:
- if (curChar == 109)
- jjstateSet[jjnewStateCnt++] = 21;
- break;
- case 24:
- if (curChar == 110)
- jjstateSet[jjnewStateCnt++] = 23;
- break;
- case 25:
- if (curChar == 121 && kind > 14)
- kind = 14;
- break;
- case 26:
- if (curChar == 116)
- jjstateSet[jjnewStateCnt++] = 25;
- break;
- case 27:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 26;
- break;
- case 28:
- if (curChar == 108)
- jjstateSet[jjnewStateCnt++] = 27;
- break;
- case 29:
- if (curChar == 97)
- jjstateSet[jjnewStateCnt++] = 28;
- break;
- case 30:
- if (curChar == 110)
- jjstateSet[jjnewStateCnt++] = 29;
- break;
- case 31:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 30;
- break;
- case 32:
- if (curChar == 100)
- jjstateSet[jjnewStateCnt++] = 31;
- break;
- case 33:
- if (curChar == 114)
- jjstateSet[jjnewStateCnt++] = 32;
- break;
- case 35:
- if (curChar == 99)
- jjstateSet[jjnewStateCnt++] = 34;
- break;
- case 36:
- if (curChar == 101 && kind > 14)
- kind = 14;
- break;
- case 37:
- if (curChar == 99)
- jjCheckNAdd(36);
- break;
- case 38:
- if (curChar == 97)
- jjstateSet[jjnewStateCnt++] = 37;
- break;
- case 39:
- if (curChar == 112)
- jjstateSet[jjnewStateCnt++] = 38;
- break;
- case 40:
- if (curChar == 83)
- jjstateSet[jjnewStateCnt++] = 39;
- break;
- case 41:
- if (curChar == 101)
- jjstateSet[jjnewStateCnt++] = 40;
- break;
- case 42:
- if (curChar == 116)
- jjstateSet[jjnewStateCnt++] = 41;
- break;
- case 43:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 42;
- break;
- case 44:
- if (curChar == 104)
- jjstateSet[jjnewStateCnt++] = 43;
- break;
- case 45:
- if (curChar == 119)
- jjstateSet[jjnewStateCnt++] = 44;
- break;
- case 46:
- if (curChar == 115 && kind > 14)
- kind = 14;
- break;
- case 47:
- case 57:
- if (curChar == 116)
- jjCheckNAdd(46);
- break;
- case 48:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 47;
- break;
- case 49:
- if (curChar == 103)
- jjstateSet[jjnewStateCnt++] = 48;
- break;
- case 50:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 49;
- break;
- case 51:
- if (curChar == 68)
- jjstateSet[jjnewStateCnt++] = 50;
- break;
- case 52:
- if (curChar == 108)
- jjstateSet[jjnewStateCnt++] = 51;
- break;
- case 53:
- if (curChar == 97)
- jjstateSet[jjnewStateCnt++] = 52;
- break;
- case 54:
- if (curChar == 116)
- jjstateSet[jjnewStateCnt++] = 53;
- break;
- case 56:
- if (curChar == 116)
- jjstateSet[jjnewStateCnt++] = 55;
- break;
- case 58:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 57;
- break;
- case 59:
- if (curChar == 103)
- jjstateSet[jjnewStateCnt++] = 58;
- break;
- case 60:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 59;
- break;
- case 61:
- if (curChar == 68)
- jjstateSet[jjnewStateCnt++] = 60;
- break;
- case 62:
- if (curChar == 110)
- jjstateSet[jjnewStateCnt++] = 61;
- break;
- case 63:
- if (curChar == 111)
- jjstateSet[jjnewStateCnt++] = 62;
- break;
- case 64:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 63;
- break;
- case 65:
- if (curChar == 116)
- jjstateSet[jjnewStateCnt++] = 64;
- break;
- case 66:
- if (curChar == 99)
- jjstateSet[jjnewStateCnt++] = 65;
- break;
- case 67:
- if (curChar == 97)
- jjstateSet[jjnewStateCnt++] = 66;
- break;
- case 69:
- if (curChar == 102)
- jjstateSet[jjnewStateCnt++] = 68;
- break;
- case 70:
- if (curChar == 104 && kind > 14)
- kind = 14;
- break;
- case 71:
- case 134:
- case 141:
- if (curChar == 116)
- jjCheckNAdd(70);
- break;
- case 72:
- if (curChar == 103)
- jjstateSet[jjnewStateCnt++] = 71;
- break;
- case 73:
- if (curChar == 110)
- jjstateSet[jjnewStateCnt++] = 72;
- break;
- case 74:
- if (curChar == 101)
- jjstateSet[jjnewStateCnt++] = 73;
- break;
- case 75:
- if (curChar == 108)
- jjstateSet[jjnewStateCnt++] = 74;
- break;
- case 76:
- if (curChar == 110 && kind > 14)
- kind = 14;
- break;
- case 77:
- if (curChar == 114)
- jjCheckNAdd(76);
- break;
- case 78:
- if (curChar == 101)
- jjstateSet[jjnewStateCnt++] = 77;
- break;
- case 79:
- if (curChar == 116)
- jjstateSet[jjnewStateCnt++] = 78;
- break;
- case 80:
- if (curChar == 116)
- jjstateSet[jjnewStateCnt++] = 79;
- break;
- case 82:
- if (curChar == 112)
- jjstateSet[jjnewStateCnt++] = 81;
- break;
- case 83:
- if (curChar == 111)
- jjCheckNAdd(76);
- break;
- case 84:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 83;
- break;
- case 85:
- if (curChar == 116)
- jjstateSet[jjnewStateCnt++] = 84;
- break;
- case 86:
- if (curChar == 97)
- jjstateSet[jjnewStateCnt++] = 85;
- break;
- case 87:
- if (curChar == 114)
- jjstateSet[jjnewStateCnt++] = 86;
- break;
- case 88:
- if (curChar == 101)
- jjstateSet[jjnewStateCnt++] = 87;
- break;
- case 89:
- if (curChar == 109)
- jjstateSet[jjnewStateCnt++] = 88;
- break;
- case 90:
- if (curChar == 117)
- jjstateSet[jjnewStateCnt++] = 89;
- break;
- case 92:
- if (curChar == 101)
- jjstateSet[jjnewStateCnt++] = 91;
- break;
- case 93:
- if (curChar == 109)
- jjAddStates(2, 7);
- break;
- case 94:
- case 104:
- case 114:
- case 124:
- if (curChar == 118)
- jjCheckNAdd(36);
- break;
- case 95:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 94;
- break;
- case 96:
- if (curChar == 115)
- jjstateSet[jjnewStateCnt++] = 95;
- break;
- case 97:
- if (curChar == 117)
- jjstateSet[jjnewStateCnt++] = 96;
- break;
- case 98:
- if (curChar == 108)
- jjstateSet[jjnewStateCnt++] = 97;
- break;
- case 99:
- if (curChar == 99)
- jjstateSet[jjnewStateCnt++] = 98;
- break;
- case 100:
- if (curChar == 110)
- jjstateSet[jjnewStateCnt++] = 99;
- break;
- case 101:
- if (curChar == 73)
- jjstateSet[jjnewStateCnt++] = 100;
- break;
- case 102:
- if (curChar == 110)
- jjstateSet[jjnewStateCnt++] = 101;
- break;
- case 105:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 104;
- break;
- case 106:
- if (curChar == 115)
- jjstateSet[jjnewStateCnt++] = 105;
- break;
- case 107:
- if (curChar == 117)
- jjstateSet[jjnewStateCnt++] = 106;
- break;
- case 108:
- if (curChar == 108)
- jjstateSet[jjnewStateCnt++] = 107;
- break;
- case 109:
- if (curChar == 99)
- jjstateSet[jjnewStateCnt++] = 108;
- break;
- case 110:
- if (curChar == 110)
- jjstateSet[jjnewStateCnt++] = 109;
- break;
- case 111:
- if (curChar == 73)
- jjstateSet[jjnewStateCnt++] = 110;
- break;
- case 112:
- if (curChar == 120)
- jjstateSet[jjnewStateCnt++] = 111;
- break;
- case 113:
- if (curChar == 97)
- jjstateSet[jjnewStateCnt++] = 112;
- break;
- case 115:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 114;
- break;
- case 116:
- if (curChar == 115)
- jjstateSet[jjnewStateCnt++] = 115;
- break;
- case 117:
- if (curChar == 117)
- jjstateSet[jjnewStateCnt++] = 116;
- break;
- case 118:
- if (curChar == 108)
- jjstateSet[jjnewStateCnt++] = 117;
- break;
- case 119:
- if (curChar == 99)
- jjstateSet[jjnewStateCnt++] = 118;
- break;
- case 120:
- if (curChar == 120)
- jjstateSet[jjnewStateCnt++] = 119;
- break;
- case 121:
- if (curChar == 69)
- jjstateSet[jjnewStateCnt++] = 120;
- break;
- case 122:
- if (curChar == 110)
- jjstateSet[jjnewStateCnt++] = 121;
- break;
- case 123:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 122;
- break;
- case 125:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 124;
- break;
- case 126:
- if (curChar == 115)
- jjstateSet[jjnewStateCnt++] = 125;
- break;
- case 127:
- if (curChar == 117)
- jjstateSet[jjnewStateCnt++] = 126;
- break;
- case 128:
- if (curChar == 108)
- jjstateSet[jjnewStateCnt++] = 127;
- break;
- case 129:
- if (curChar == 99)
- jjstateSet[jjnewStateCnt++] = 128;
- break;
- case 130:
- if (curChar == 120)
- jjstateSet[jjnewStateCnt++] = 129;
- break;
- case 131:
- if (curChar == 69)
- jjstateSet[jjnewStateCnt++] = 130;
- break;
- case 132:
- if (curChar == 120)
- jjstateSet[jjnewStateCnt++] = 131;
- break;
- case 133:
- if (curChar == 97)
- jjstateSet[jjnewStateCnt++] = 132;
- break;
- case 135:
- if (curChar == 103)
- jjstateSet[jjnewStateCnt++] = 134;
- break;
- case 136:
- if (curChar == 110)
- jjstateSet[jjnewStateCnt++] = 135;
- break;
- case 137:
- if (curChar == 101)
- jjstateSet[jjnewStateCnt++] = 136;
- break;
- case 138:
- if (curChar == 76)
- jjstateSet[jjnewStateCnt++] = 137;
- break;
- case 139:
- if (curChar == 110)
- jjstateSet[jjnewStateCnt++] = 138;
- break;
- case 140:
- if (curChar == 105)
- jjstateSet[jjnewStateCnt++] = 139;
- break;
- case 142:
- if (curChar == 103)
- jjstateSet[jjnewStateCnt++] = 141;
- break;
- case 143:
- if (curChar == 110)
- jjstateSet[jjnewStateCnt++] = 142;
- break;
- case 144:
- if (curChar == 101)
- jjstateSet[jjnewStateCnt++] = 143;
- break;
- case 145:
- if (curChar == 76)
- jjstateSet[jjnewStateCnt++] = 144;
- break;
- case 146:
- if (curChar == 120)
- jjstateSet[jjnewStateCnt++] = 145;
- break;
- case 147:
- if (curChar == 97)
- jjstateSet[jjnewStateCnt++] = 146;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else
- {
- int hiByte = (int)(curChar >> 8);
- int i1 = hiByte >> 6;
- long l1 = 1L << (hiByte & 077);
- int i2 = (curChar & 0xff) >> 6;
- long l2 = 1L << (curChar & 077);
- MatchLoop: do
- {
- switch(jjstateSet[--i])
- {
- case 34:
- case 1:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 91:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 16:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 55:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 68:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 103:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 0:
- if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 81:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- case 23:
- if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 12)
- kind = 12;
- jjCheckNAdd(1);
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- if (kind != 0x7fffffff)
- {
- jjmatchedKind = kind;
- jjmatchedPos = curPos;
- kind = 0x7fffffff;
- }
- ++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 148 - (jjnewStateCnt = startsAt)))
- return curPos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return curPos; }
- }
-}
-static final int[] jjnextStates = {
- 3, 4, 103, 113, 123, 133, 140, 147,
-};
-private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
-{
- switch(hiByte)
- {
- case 0:
- return ((jjbitVec2[i2] & l2) != 0L);
- case 1:
- return ((jjbitVec3[i2] & l2) != 0L);
- case 2:
- return ((jjbitVec4[i2] & l2) != 0L);
- case 3:
- return ((jjbitVec5[i2] & l2) != 0L);
- case 4:
- return ((jjbitVec6[i2] & l2) != 0L);
- case 5:
- return ((jjbitVec7[i2] & l2) != 0L);
- case 6:
- return ((jjbitVec8[i2] & l2) != 0L);
- case 9:
- return ((jjbitVec9[i2] & l2) != 0L);
- case 10:
- return ((jjbitVec10[i2] & l2) != 0L);
- case 11:
- return ((jjbitVec11[i2] & l2) != 0L);
- case 12:
- return ((jjbitVec12[i2] & l2) != 0L);
- case 13:
- return ((jjbitVec13[i2] & l2) != 0L);
- case 14:
- return ((jjbitVec14[i2] & l2) != 0L);
- case 15:
- return ((jjbitVec15[i2] & l2) != 0L);
- case 16:
- return ((jjbitVec16[i2] & l2) != 0L);
- case 17:
- return ((jjbitVec17[i2] & l2) != 0L);
- case 30:
- return ((jjbitVec18[i2] & l2) != 0L);
- case 31:
- return ((jjbitVec19[i2] & l2) != 0L);
- case 33:
- return ((jjbitVec20[i2] & l2) != 0L);
- case 48:
- return ((jjbitVec21[i2] & l2) != 0L);
- case 49:
- return ((jjbitVec22[i2] & l2) != 0L);
- case 159:
- return ((jjbitVec23[i2] & l2) != 0L);
- case 215:
- return ((jjbitVec24[i2] & l2) != 0L);
- default :
- if ((jjbitVec0[i1] & l1) != 0L)
- return true;
- return false;
- }
-}
-private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
-{
- switch(hiByte)
- {
- case 0:
- return ((jjbitVec25[i2] & l2) != 0L);
- case 1:
- return ((jjbitVec3[i2] & l2) != 0L);
- case 2:
- return ((jjbitVec26[i2] & l2) != 0L);
- case 3:
- return ((jjbitVec27[i2] & l2) != 0L);
- case 4:
- return ((jjbitVec28[i2] & l2) != 0L);
- case 5:
- return ((jjbitVec29[i2] & l2) != 0L);
- case 6:
- return ((jjbitVec30[i2] & l2) != 0L);
- case 9:
- return ((jjbitVec31[i2] & l2) != 0L);
- case 10:
- return ((jjbitVec32[i2] & l2) != 0L);
- case 11:
- return ((jjbitVec33[i2] & l2) != 0L);
- case 12:
- return ((jjbitVec34[i2] & l2) != 0L);
- case 13:
- return ((jjbitVec35[i2] & l2) != 0L);
- case 14:
- return ((jjbitVec36[i2] & l2) != 0L);
- case 15:
- return ((jjbitVec37[i2] & l2) != 0L);
- case 16:
- return ((jjbitVec16[i2] & l2) != 0L);
- case 17:
- return ((jjbitVec17[i2] & l2) != 0L);
- case 30:
- return ((jjbitVec18[i2] & l2) != 0L);
- case 31:
- return ((jjbitVec19[i2] & l2) != 0L);
- case 32:
- return ((jjbitVec38[i2] & l2) != 0L);
- case 33:
- return ((jjbitVec20[i2] & l2) != 0L);
- case 48:
- return ((jjbitVec39[i2] & l2) != 0L);
- case 49:
- return ((jjbitVec22[i2] & l2) != 0L);
- case 159:
- return ((jjbitVec23[i2] & l2) != 0L);
- case 215:
- return ((jjbitVec24[i2] & l2) != 0L);
- default :
- if ((jjbitVec0[i1] & l1) != 0L)
- return true;
- return false;
- }
-}
-public static final String[] jjstrLiteralImages = {
-"", null, null, null, null, null, null, null, null, null, null, null, null,
-null, null, "\72", "\57", "\57\57", "\141\164\164\162\151\142\165\164\145\72\72",
-"\100", "\145\154\145\155\145\156\164\72\72",
-"\163\165\142\163\164\151\164\165\164\151\157\156\107\162\157\165\160\72\72", "\164\171\160\145\72\72", "\176", "\142\141\163\145\124\171\160\145\72\72",
-"\160\162\151\155\151\164\151\166\145\124\171\160\145\72\72", "\151\164\145\155\124\171\160\145\72\72",
-"\155\145\155\142\145\162\124\171\160\145\72\72", "\163\143\157\160\145\72\72",
-"\141\164\164\162\151\142\165\164\145\107\162\157\165\160\72\72", "\147\162\157\165\160\72\72",
-"\151\144\145\156\164\151\164\171\103\157\156\164\162\141\151\156\164\72\72", "\153\145\171\72\72", "\156\157\164\141\164\151\157\156\72\72",
-"\155\157\144\145\154\72\72\163\145\161\165\145\156\143\145", "\155\157\144\145\154\72\72\143\150\157\151\143\145",
-"\155\157\144\145\154\72\72\141\154\154", "\155\157\144\145\154\72\72\52", "\141\156\171\72\72\52",
-"\141\156\171\101\164\164\162\151\142\165\164\145\72\72\52", "\146\141\143\145\164\72\72\52", "\146\141\143\145\164\72\72",
-"\143\157\155\160\157\156\145\156\164\72\72\52", "\170\55\163\143\150\145\155\141\72\72",
-"\170\55\163\143\150\145\155\141\72\72\52", "\52", "\60", };
-public static final String[] lexStateNames = {
- "DEFAULT",
-};
-static final long[] jjtoToken = {
- 0x7ffffffff001L,
-};
-static final long[] jjtoSkip = {
- 0x3eL,
-};
-protected SimpleCharStream input_stream;
-private final int[] jjrounds = new int[148];
-private final int[] jjstateSet = new int[296];
-protected char curChar;
-public SCDParserTokenManager(SimpleCharStream stream){
- if (SimpleCharStream.staticFlag)
- throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
- input_stream = stream;
-}
-public SCDParserTokenManager(SimpleCharStream stream, int lexState){
- this(stream);
- SwitchTo(lexState);
-}
-public void ReInit(SimpleCharStream stream)
-{
- jjmatchedPos = jjnewStateCnt = 0;
- curLexState = defaultLexState;
- input_stream = stream;
- ReInitRounds();
-}
-private final void ReInitRounds()
-{
- int i;
- jjround = 0x80000001;
- for (i = 148; i-- > 0;)
- jjrounds[i] = 0x80000000;
-}
-public void ReInit(SimpleCharStream stream, int lexState)
-{
- ReInit(stream);
- SwitchTo(lexState);
-}
-public void SwitchTo(int lexState)
-{
- if (lexState >= 1 || lexState < 0)
- throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
- else
- curLexState = lexState;
-}
-
-protected Token jjFillToken()
-{
- Token t = Token.newToken(jjmatchedKind);
- t.kind = jjmatchedKind;
- String im = jjstrLiteralImages[jjmatchedKind];
- t.image = (im == null) ? input_stream.GetImage() : im;
- t.beginLine = input_stream.getBeginLine();
- t.beginColumn = input_stream.getBeginColumn();
- t.endLine = input_stream.getEndLine();
- t.endColumn = input_stream.getEndColumn();
- return t;
-}
-
-int curLexState = 0;
-int defaultLexState = 0;
-int jjnewStateCnt;
-int jjround;
-int jjmatchedPos;
-int jjmatchedKind;
-
-public Token getNextToken()
-{
- int kind;
- Token specialToken = null;
- Token matchedToken;
- int curPos = 0;
-
- EOFLoop :
- for (;;)
- {
- try
- {
- curChar = input_stream.BeginToken();
- }
- catch(java.io.IOException e)
- {
- jjmatchedKind = 0;
- matchedToken = jjFillToken();
- return matchedToken;
- }
-
- try { input_stream.backup(0);
- while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L)
- curChar = input_stream.BeginToken();
- }
- catch (java.io.IOException e1) { continue EOFLoop; }
- jjmatchedKind = 0x7fffffff;
- jjmatchedPos = 0;
- curPos = jjMoveStringLiteralDfa0_0();
- if (jjmatchedKind != 0x7fffffff)
- {
- if (jjmatchedPos + 1 < curPos)
- input_stream.backup(curPos - jjmatchedPos - 1);
- if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
- {
- matchedToken = jjFillToken();
- return matchedToken;
- }
- else
- {
- continue EOFLoop;
- }
- }
- int error_line = input_stream.getEndLine();
- int error_column = input_stream.getEndColumn();
- String error_after = null;
- boolean EOFSeen = false;
- try { input_stream.readChar(); input_stream.backup(1); }
- catch (java.io.IOException e1) {
- EOFSeen = true;
- error_after = curPos <= 1 ? "" : input_stream.GetImage();
- if (curChar == '\n' || curChar == '\r') {
- error_line++;
- error_column = 0;
- }
- else
- error_column++;
- }
- if (!EOFSeen) {
- input_stream.backup(1);
- error_after = curPos <= 1 ? "" : input_stream.GetImage();
- }
- throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
- }
-}
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SimpleCharStream.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SimpleCharStream.java
deleted file mode 100644
index 7a4f1093..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/SimpleCharStream.java
+++ /dev/null
@@ -1,464 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.0 */
-package com.sun.xml.internal.xsom.impl.scd;
-
-/**
- * An implementation of interface CharStream, where the stream is assumed to
- * contain only ASCII characters (without unicode processing).
- */
-
-public class SimpleCharStream
-{
- public static final boolean staticFlag = false;
- int bufsize;
- int available;
- int tokenBegin;
- public int bufpos = -1;
- protected int bufline[];
- protected int bufcolumn[];
-
- protected int column = 0;
- protected int line = 1;
-
- protected boolean prevCharIsCR = false;
- protected boolean prevCharIsLF = false;
-
- protected java.io.Reader inputStream;
-
- protected char[] buffer;
- protected int maxNextCharInd = 0;
- protected int inBuf = 0;
- protected int tabSize = 8;
-
- protected void setTabSize(int i) { tabSize = i; }
- protected int getTabSize(int i) { return tabSize; }
-
-
- protected void ExpandBuff(boolean wrapAround)
- {
- char[] newbuffer = new char[bufsize + 2048];
- int newbufline[] = new int[bufsize + 2048];
- int newbufcolumn[] = new int[bufsize + 2048];
-
- try
- {
- if (wrapAround)
- {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- System.arraycopy(buffer, 0, newbuffer,
- bufsize - tokenBegin, bufpos);
- buffer = newbuffer;
-
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
- bufline = newbufline;
-
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
- System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
- bufcolumn = newbufcolumn;
-
- maxNextCharInd = (bufpos += (bufsize - tokenBegin));
- }
- else
- {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- buffer = newbuffer;
-
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- bufline = newbufline;
-
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
- bufcolumn = newbufcolumn;
-
- maxNextCharInd = (bufpos -= tokenBegin);
- }
- }
- catch (Throwable t)
- {
- throw new Error(t.getMessage());
- }
-
-
- bufsize += 2048;
- available = bufsize;
- tokenBegin = 0;
- }
-
- protected void FillBuff() throws java.io.IOException
- {
- if (maxNextCharInd == available)
- {
- if (available == bufsize)
- {
- if (tokenBegin > 2048)
- {
- bufpos = maxNextCharInd = 0;
- available = tokenBegin;
- }
- else if (tokenBegin < 0)
- bufpos = maxNextCharInd = 0;
- else
- ExpandBuff(false);
- }
- else if (available > tokenBegin)
- available = bufsize;
- else if ((tokenBegin - available) < 2048)
- ExpandBuff(true);
- else
- available = tokenBegin;
- }
-
- int i;
- try {
- if ((i = inputStream.read(buffer, maxNextCharInd,
- available - maxNextCharInd)) == -1)
- {
- inputStream.close();
- throw new java.io.IOException();
- }
- else
- maxNextCharInd += i;
- return;
- }
- catch(java.io.IOException e) {
- --bufpos;
- backup(0);
- if (tokenBegin == -1)
- tokenBegin = bufpos;
- throw e;
- }
- }
-
- public char BeginToken() throws java.io.IOException
- {
- tokenBegin = -1;
- char c = readChar();
- tokenBegin = bufpos;
-
- return c;
- }
-
- protected void UpdateLineColumn(char c)
- {
- column++;
-
- if (prevCharIsLF)
- {
- prevCharIsLF = false;
- line += (column = 1);
- }
- else if (prevCharIsCR)
- {
- prevCharIsCR = false;
- if (c == '\n')
- {
- prevCharIsLF = true;
- }
- else
- line += (column = 1);
- }
-
- switch (c)
- {
- case '\r' :
- prevCharIsCR = true;
- break;
- case '\n' :
- prevCharIsLF = true;
- break;
- case '\t' :
- column--;
- column += (tabSize - (column % tabSize));
- break;
- default :
- break;
- }
-
- bufline[bufpos] = line;
- bufcolumn[bufpos] = column;
- }
-
- public char readChar() throws java.io.IOException
- {
- if (inBuf > 0)
- {
- --inBuf;
-
- if (++bufpos == bufsize)
- bufpos = 0;
-
- return buffer[bufpos];
- }
-
- if (++bufpos >= maxNextCharInd)
- FillBuff();
-
- char c = buffer[bufpos];
-
- UpdateLineColumn(c);
- return (c);
- }
-
- /**
- * @deprecated
- * @see #getEndColumn
- */
-
- public int getColumn() {
- return bufcolumn[bufpos];
- }
-
- /**
- * @deprecated
- * @see #getEndLine
- */
-
- public int getLine() {
- return bufline[bufpos];
- }
-
- public int getEndColumn() {
- return bufcolumn[bufpos];
- }
-
- public int getEndLine() {
- return bufline[bufpos];
- }
-
- public int getBeginColumn() {
- return bufcolumn[tokenBegin];
- }
-
- public int getBeginLine() {
- return bufline[tokenBegin];
- }
-
- public void backup(int amount) {
-
- inBuf += amount;
- if ((bufpos -= amount) < 0)
- bufpos += bufsize;
- }
-
- public SimpleCharStream(java.io.Reader dstream, int startline,
- int startcolumn, int buffersize)
- {
- inputStream = dstream;
- line = startline;
- column = startcolumn - 1;
-
- available = bufsize = buffersize;
- buffer = new char[buffersize];
- bufline = new int[buffersize];
- bufcolumn = new int[buffersize];
- }
-
- public SimpleCharStream(java.io.Reader dstream, int startline,
- int startcolumn)
- {
- this(dstream, startline, startcolumn, 4096);
- }
-
- public SimpleCharStream(java.io.Reader dstream)
- {
- this(dstream, 1, 1, 4096);
- }
- public void ReInit(java.io.Reader dstream, int startline,
- int startcolumn, int buffersize)
- {
- inputStream = dstream;
- line = startline;
- column = startcolumn - 1;
-
- if (buffer == null || buffersize != buffer.length)
- {
- available = bufsize = buffersize;
- buffer = new char[buffersize];
- bufline = new int[buffersize];
- bufcolumn = new int[buffersize];
- }
- prevCharIsLF = prevCharIsCR = false;
- tokenBegin = inBuf = maxNextCharInd = 0;
- bufpos = -1;
- }
-
- public void ReInit(java.io.Reader dstream, int startline,
- int startcolumn)
- {
- ReInit(dstream, startline, startcolumn, 4096);
- }
-
- public void ReInit(java.io.Reader dstream)
- {
- ReInit(dstream, 1, 1, 4096);
- }
- public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
- {
- this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
- }
-
- public SimpleCharStream(java.io.InputStream dstream, int startline,
- int startcolumn, int buffersize)
- {
- this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
- }
-
- public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn) throws java.io.UnsupportedEncodingException
- {
- this(dstream, encoding, startline, startcolumn, 4096);
- }
-
- public SimpleCharStream(java.io.InputStream dstream, int startline,
- int startcolumn)
- {
- this(dstream, startline, startcolumn, 4096);
- }
-
- public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
- {
- this(dstream, encoding, 1, 1, 4096);
- }
-
- public SimpleCharStream(java.io.InputStream dstream)
- {
- this(dstream, 1, 1, 4096);
- }
-
- public void ReInit(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
- {
- ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
- }
-
- public void ReInit(java.io.InputStream dstream, int startline,
- int startcolumn, int buffersize)
- {
- ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
- }
-
- public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
- {
- ReInit(dstream, encoding, 1, 1, 4096);
- }
-
- public void ReInit(java.io.InputStream dstream)
- {
- ReInit(dstream, 1, 1, 4096);
- }
- public void ReInit(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn) throws java.io.UnsupportedEncodingException
- {
- ReInit(dstream, encoding, startline, startcolumn, 4096);
- }
- public void ReInit(java.io.InputStream dstream, int startline,
- int startcolumn)
- {
- ReInit(dstream, startline, startcolumn, 4096);
- }
- public String GetImage()
- {
- if (bufpos >= tokenBegin)
- return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
- else
- return new String(buffer, tokenBegin, bufsize - tokenBegin) +
- new String(buffer, 0, bufpos + 1);
- }
-
- public char[] GetSuffix(int len)
- {
- char[] ret = new char[len];
-
- if ((bufpos + 1) >= len)
- System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
- else
- {
- System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
- len - bufpos - 1);
- System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
- }
-
- return ret;
- }
-
- public void Done()
- {
- buffer = null;
- bufline = null;
- bufcolumn = null;
- }
-
- /**
- * Method to adjust line and column numbers for the start of a token.
- */
- public void adjustBeginLineColumn(int newLine, int newCol)
- {
- int start = tokenBegin;
- int len;
-
- if (bufpos >= tokenBegin)
- {
- len = bufpos - tokenBegin + inBuf + 1;
- }
- else
- {
- len = bufsize - tokenBegin + bufpos + 1 + inBuf;
- }
-
- int i = 0, j = 0, k = 0;
- int nextColDiff = 0, columnDiff = 0;
-
- while (i < len &&
- bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
- {
- bufline[j] = newLine;
- nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
- bufcolumn[j] = newCol + columnDiff;
- columnDiff = nextColDiff;
- i++;
- }
-
- if (i < len)
- {
- bufline[j] = newLine++;
- bufcolumn[j] = newCol + columnDiff;
-
- while (i++ < len)
- {
- if (bufline[j = start % bufsize] != bufline[++start % bufsize])
- bufline[j] = newLine++;
- else
- bufline[j] = newLine;
- }
- }
-
- line = bufline[j];
- column = bufcolumn[j];
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Step.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Step.java
deleted file mode 100644
index d8bddc1e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Step.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.scd;
-
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSDeclaration;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.SCD;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.impl.UName;
-
-import java.util.Iterator;
-
-/**
- * Building block of {@link SCD}.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class Step<T extends XSComponent> {
- public final Axis<? extends T> axis;
-
- /**
- * 'Predicate' in SCD designates the index of the item. -1 if there's no predicate.
- * Predicate starts from 1.
- *
- * <p>
- * Because of the parsing order this parameter cannot be marked
- * final, even though it's immutable once it's parsed.
- */
- int predicate = -1;
-
- protected Step(Axis<? extends T> axis) {
- this.axis = axis;
- }
-
- /**
- * Perform filtering (which is different depending on the kind of step.)
- */
- protected abstract Iterator<? extends T> filter( Iterator<? extends T> base );
-
- /**
- * Evaluate this step against the current node set
- * and returns matched nodes.
- */
- public final Iterator<T> evaluate(Iterator<XSComponent> nodeSet) {
- // list up the whole thing
- Iterator<T> r = new Iterators.Map<T,XSComponent>(nodeSet) {
- protected Iterator<? extends T> apply(XSComponent contextNode) {
- return filter(axis.iterator(contextNode));
- }
- };
-
- // avoid duplicates
- r = new Iterators.Unique<T>(r);
-
- if(predicate>=0) {
- T item=null;
- for( int i=predicate; i>0; i-- ) {
- if(!r.hasNext())
- return Iterators.empty();
- item = r.next();
- }
- return new Iterators.Singleton<T>(item);
- }
-
- return r;
- }
-
- /**
- * Matches any name.
- */
- static final class Any extends Step<XSComponent> {
- public Any(Axis<? extends XSComponent> axis) {
- super(axis);
- }
-
- // no filtering.
- protected Iterator<? extends XSComponent> filter(Iterator<? extends XSComponent> base) {
- return base;
- }
- }
-
- private static abstract class Filtered<T extends XSComponent> extends Step<T> {
- protected Filtered(Axis<? extends T> axis) {
- super(axis);
- }
-
- protected Iterator<T> filter(Iterator<? extends T> base) {
- return new Iterators.Filter<T>(base) {
- protected boolean matches(T d) {
- return match(d);
- }
- };
- }
-
- protected abstract boolean match(T d);
- }
-
- /**
- * Matches a particular name.
- */
- static final class Named extends Filtered<XSDeclaration> {
- private final String nsUri;
- private final String localName;
-
- public Named(Axis<? extends XSDeclaration> axis, UName n) {
- this(axis,n.getNamespaceURI(),n.getName());
- }
-
- public Named(Axis<? extends XSDeclaration> axis, String nsUri, String localName) {
- super(axis);
- this.nsUri = nsUri;
- this.localName = localName;
- }
-
- protected boolean match(XSDeclaration d) {
- return d.getName().equals(localName) && d.getTargetNamespace().equals(nsUri);
- }
- }
-
- /**
- * Matches anonymous types.
- */
- static final class AnonymousType extends Filtered<XSType> {
- public AnonymousType(Axis<? extends XSType> axis) {
- super(axis);
- }
-
- protected boolean match(XSType node) {
- return node.isLocal();
- }
- }
-
- /**
- * Matches a particular kind of facets.
- */
- static final class Facet extends Filtered<XSFacet> {
- private final String name;
- public Facet(Axis<XSFacet> axis, String facetName) {
- super(axis);
- this.name = facetName;
- }
-
- protected boolean match(XSFacet f) {
- return f.getName().equals(name);
- }
- }
-
- /**
- * Matches a schema in a particular namespace.
- */
- static final class Schema extends Filtered<XSSchema> {
- private final String uri;
- public Schema(Axis<XSSchema> axis, String uri) {
- super(axis);
- this.uri = uri;
- }
-
- protected boolean match(XSSchema d) {
- return d.getTargetNamespace().equals(uri);
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Token.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Token.java
deleted file mode 100644
index 9606cdf5..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/Token.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */
-package com.sun.xml.internal.xsom.impl.scd;
-
-/**
- * Describes the input token stream.
- */
-
-public class Token {
-
- /**
- * An integer that describes the kind of this token. This numbering
- * system is determined by JavaCCParser, and a table of these numbers is
- * stored in the file ...Constants.java.
- */
- public int kind;
-
- /**
- * beginLine and beginColumn describe the position of the first character
- * of this token; endLine and endColumn describe the position of the
- * last character of this token.
- */
- public int beginLine, beginColumn, endLine, endColumn;
-
- /**
- * The string image of the token.
- */
- public String image;
-
- /**
- * A reference to the next regular (non-special) token from the input
- * stream. If this is the last token from the input stream, or if the
- * token manager has not read tokens beyond this one, this field is
- * set to null. This is true only if this token is also a regular
- * token. Otherwise, see below for a description of the contents of
- * this field.
- */
- public Token next;
-
- /**
- * This field is used to access special tokens that occur prior to this
- * token, but after the immediately preceding regular (non-special) token.
- * If there are no such special tokens, this field is set to null.
- * When there are more than one such special token, this field refers
- * to the last of these special tokens, which in turn refers to the next
- * previous special token through its specialToken field, and so on
- * until the first special token (whose specialToken field is null).
- * The next fields of special tokens refer to other special tokens that
- * immediately follow it (without an intervening regular token). If there
- * is no such token, this field is null.
- */
- public Token specialToken;
-
- /**
- * Returns the image.
- */
- public String toString()
- {
- return image;
- }
-
- /**
- * Returns a new Token object, by default. However, if you want, you
- * can create and return subclass objects based on the value of ofKind.
- * Simply add the cases to the switch for all those special cases.
- * For example, if you have a subclass of Token called IDToken that
- * you want to create if ofKind is ID, simlpy add something like :
- *
- * case MyParserConstants.ID : return new IDToken();
- *
- * to the following switch statement. Then you can cast matchedToken
- * variable to the appropriate type and use it in your lexical actions.
- */
- public static final Token newToken(int ofKind)
- {
- switch(ofKind)
- {
- default : return new Token();
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/TokenMgrError.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/TokenMgrError.java
deleted file mode 100644
index 090e98bb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/scd/TokenMgrError.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */
-package com.sun.xml.internal.xsom.impl.scd;
-
-public class TokenMgrError extends Error
-{
- /*
- * Ordinals for various reasons why an Error of this type can be thrown.
- */
-
- /**
- * Lexical error occured.
- */
- static final int LEXICAL_ERROR = 0;
-
- /**
- * An attempt wass made to create a second instance of a static token manager.
- */
- static final int STATIC_LEXER_ERROR = 1;
-
- /**
- * Tried to change to an invalid lexical state.
- */
- static final int INVALID_LEXICAL_STATE = 2;
-
- /**
- * Detected (and bailed out of) an infinite loop in the token manager.
- */
- static final int LOOP_DETECTED = 3;
-
- /**
- * Indicates the reason why the exception is thrown. It will have
- * one of the above 4 values.
- */
- int errorCode;
-
- /**
- * Replaces unprintable characters by their espaced (or unicode escaped)
- * equivalents in the given string
- */
- protected static final String addEscapes(String str) {
- StringBuffer retval = new StringBuffer();
- char ch;
- for (int i = 0; i < str.length(); i++) {
- switch (str.charAt(i))
- {
- case 0 :
- continue;
- case '\b':
- retval.append("\\b");
- continue;
- case '\t':
- retval.append("\\t");
- continue;
- case '\n':
- retval.append("\\n");
- continue;
- case '\f':
- retval.append("\\f");
- continue;
- case '\r':
- retval.append("\\r");
- continue;
- case '\"':
- retval.append("\\\"");
- continue;
- case '\'':
- retval.append("\\\'");
- continue;
- case '\\':
- retval.append("\\\\");
- continue;
- default:
- if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
- String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
- } else {
- retval.append(ch);
- }
- continue;
- }
- }
- return retval.toString();
- }
-
- /**
- * Returns a detailed message for the Error when it is thrown by the
- * token manager to indicate a lexical error.
- * Parameters :
- * EOFSeen : indicates if EOF caused the lexicl error
- * curLexState : lexical state in which this error occured
- * errorLine : line number when the error occured
- * errorColumn : column number when the error occured
- * errorAfter : prefix that was seen before this error occured
- * curchar : the offending character
- * Note: You can customize the lexical error message by modifying this method.
- */
- protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
- return("Lexical error at line " +
- errorLine + ", column " +
- errorColumn + ". Encountered: " +
- (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
- "after : \"" + addEscapes(errorAfter) + "\"");
- }
-
- /**
- * You can also modify the body of this method to customize your error messages.
- * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
- * of end-users concern, so you can return something like :
- *
- * "Internal Error : Please file a bug report .... "
- *
- * from this method for such cases in the release version of your parser.
- */
- public String getMessage() {
- return super.getMessage();
- }
-
- /*
- * Constructors of various flavors follow.
- */
-
- public TokenMgrError() {
- }
-
- public TokenMgrError(String message, int reason) {
- super(message);
- errorCode = reason;
- }
-
- public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
- this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/DraconianErrorHandler.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/DraconianErrorHandler.java
deleted file mode 100644
index 9f128a5e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/DraconianErrorHandler.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.util;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * Aborts on the first error.
- */
-public class DraconianErrorHandler implements ErrorHandler {
- public void error( SAXParseException e ) throws SAXException {
- throw e;
- }
- public void fatalError( SAXParseException e ) throws SAXException {
- throw e;
- }
- public void warning( SAXParseException e ) {}
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/ResourceEntityResolver.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/ResourceEntityResolver.java
deleted file mode 100644
index 3e329d53..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/ResourceEntityResolver.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.util;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-
-public class ResourceEntityResolver implements EntityResolver {
- public ResourceEntityResolver( Class _base ) {
- this.base = _base;
- }
-
- private final Class base;
-
- public InputSource resolveEntity( String publicId, String systemId ) {
- return new InputSource(base.getResourceAsStream(systemId));
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/SchemaTreeTraverser.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/SchemaTreeTraverser.java
deleted file mode 100644
index 219cdde0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/SchemaTreeTraverser.java
+++ /dev/null
@@ -1,1007 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.util;
-
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSListSimpleType;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSRestrictionSimpleType;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.XSUnionSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.impl.Const;
-import com.sun.xml.internal.xsom.visitor.XSSimpleTypeVisitor;
-import com.sun.xml.internal.xsom.visitor.XSTermVisitor;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import org.xml.sax.Locator;
-
-import javax.swing.Box;
-import javax.swing.Icon;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTree;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeCellRenderer;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.FlowLayout;
-import java.awt.Font;
-import java.awt.Graphics;
-import java.math.BigInteger;
-import java.text.MessageFormat;
-import java.util.Iterator;
-
-/**
- * Generates approximated tree model for XML from a schema component. This is
- * not intended to be a fully-fledged round-trippable tree model.
- *
- * <h2>Usage of this class</h2>
- *
- * <ol> <li>Create a new instance.</li> <li>Call {@link
- * #visit(com.sun.xml.internal.xsom.XSSchemaSet)} function on your schema set.>/li>
- * <li>Retrieve the model using {@link #getModel()}. </li></ol>
- *
- * Every node in the resulting tree is a {@link SchemaTreeTraverser.SchemaTreeNode},
- * and the model itself is {@link SchemaTreeTraverser.SchemaTreeModel}. You can
- * use {@link SchemaTreeTraverser.SchemaTreeCellRenderer} as a cell renderer for
- * your tree.
- *
- * @author Kirill Grouchnikov (kirillcool@yahoo.com)
- */
-public class SchemaTreeTraverser implements XSVisitor, XSSimpleTypeVisitor {
- /**
- * The associated tree model.
- */
- private SchemaTreeModel model;
-
- /**
- * The current node in the tree.
- */
- private SchemaTreeNode currNode;
-
- /**
- * Tree model for schema hierarchy tree.
- *
- * @author Kirill Grouchnikov
- */
- public static final class SchemaTreeModel extends DefaultTreeModel {
- /**
- * A simple constructor. Is made private to allow creating the root node
- * first.
- *
- * @param root The root node.
- */
- private SchemaTreeModel(SchemaRootNode root) {
- super(root);
- }
-
- /**
- * A factory method for creating a new empty tree.
- *
- * @return New empty tree model.
- */
- public static SchemaTreeModel getInstance() {
- SchemaRootNode root = new SchemaRootNode();
- return new SchemaTreeModel(root);
- }
-
- public void addSchemaNode(SchemaTreeNode node) {
- ((SchemaRootNode) this.root).add(node);
- }
- }
-
- /**
- * The node of the schema hierarchy tree.
- *
- * @author Kirill Grouchnikov
- */
- public static class SchemaTreeNode extends DefaultMutableTreeNode {
- /**
- * File name of the corresponding schema artifact.
- */
- private String fileName;
-
- /**
- * Line number of the corresponding schema artifact.
- */
- private int lineNumber;
-
- /**
- * The caption of the corresponding artifact.
- */
- private String artifactName;
-
- /**
- * Simple constructor.
- *
- * @param artifactName Artifact name.
- * @param locator Artifact locator.
- */
- public SchemaTreeNode(String artifactName, Locator locator) {
- this.artifactName = artifactName;
- if (locator == null) {
- this.fileName = null;
- }
- else {
- String filename = locator.getSystemId();
- filename = filename.replaceAll("\u002520", " ");
- // strip leading protocol
- if (filename.startsWith("file:/")) {
- filename = filename.substring(6);
- }
-
- this.fileName = filename;
- this.lineNumber = locator.getLineNumber() - 1;
- }
- }
-
- /**
- * Returns the caption for <code>this</code> node.
- *
- * @return The caption for <code>this</code> node.
- */
- public String getCaption() {
- return this.artifactName;
- }
-
- /**
- * @return Returns the file name of the corresponding schema artifact.
- */
- public String getFileName() {
- return fileName;
- }
-
- /**
- * @param fileName The file name of the corresponding schema artifact to
- * set.
- */
- public void setFileName(String fileName) {
- this.fileName = fileName;
- }
-
- /**
- * @return Returns the line number of the corresponding schema
- * artifact.
- */
- public int getLineNumber() {
- return lineNumber;
- }
-
- /**
- * @param lineNumber The line number of the corresponding schema
- * artifact to set.
- */
- public void setLineNumber(int lineNumber) {
- this.lineNumber = lineNumber;
- }
- }
-
- /**
- * The root node of the schema hierarchy tree.
- *
- * @author Kirill Grouchnikov
- */
- public static class SchemaRootNode extends SchemaTreeNode {
- /**
- * A simple constructor.
- */
- public SchemaRootNode() {
- super("Schema set", null);
- }
- }
-
-
- /**
- * Sample cell renderer for the schema tree.
- *
- * @author Kirill Grouchnikov
- */
- public static class SchemaTreeCellRenderer extends JPanel implements
- TreeCellRenderer {
- /**
- * The icon label.
- */
- protected final JLabel iconLabel;
-
- /**
- * The text label
- */
- protected final JLabel nameLabel;
-
- /**
- * The selection indicator.
- */
- private boolean isSelected;
-
- /**
- * Background color for selected cells (light brown).
- */
- public final Color selectedBackground = new Color(255, 244, 232);
-
-
- /**
- * Foreground color for selected cells, both text and border (dark
- * brown).
- */
- public final Color selectedForeground = new Color(64, 32, 0);
-
- /**
- * Default font for the text label.
- */
- public final Font nameFont = new Font("Arial", Font.BOLD, 12);
-
-
- /**
- * Simple constructor.
- */
- public SchemaTreeCellRenderer() {
- FlowLayout fl = new FlowLayout(FlowLayout.LEFT, 1, 1);
- this.setLayout(fl);
- this.iconLabel = new JLabel();
- this.iconLabel.setOpaque(false);
- this.iconLabel.setBorder(null);
- this.add(this.iconLabel);
-
- // add some space
- this.add(Box.createHorizontalStrut(5));
-
- this.nameLabel = new JLabel();
- this.nameLabel.setOpaque(false);
- this.nameLabel.setBorder(null);
- this.nameLabel.setFont(nameFont);
- this.add(this.nameLabel);
-
- this.isSelected = false;
-
- this.setOpaque(false);
- this.setBorder(null);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.swing.JComponent#paintComponent(java.awt.Graphics)
- */
- public final void paintComponent(Graphics g) {
- int width = this.getWidth();
- int height = this.getHeight();
- if (this.isSelected) {
- g.setColor(selectedBackground);
- g.fillRect(0, 0, width - 1, height - 1);
- g.setColor(selectedForeground);
- g.drawRect(0, 0, width - 1, height - 1);
- }
- super.paintComponent(g);
- }
-
- /**
- * Sets values for the icon and text of <code>this</code> renderer.
- *
- * @param icon Icon to show.
- * @param caption Text to show.
- * @param selected Selection indicator. If <code>true</code>, the
- * renderer will be shown with different background and
- * border settings.
- */
- protected final void setValues(Icon icon, String caption,
- boolean selected) {
-
- this.iconLabel.setIcon(icon);
- this.nameLabel.setText(caption);
-
- this.isSelected = selected;
- if (selected) {
- this.nameLabel.setForeground(selectedForeground);
- }
- else {
- this.nameLabel.setForeground(Color.black);
- }
- }
-
- /* (non-Javadoc)
- * @see javax.swing.tree.TreeCellRenderer#getTreeCellRendererComponent(javax.swing.JTree, java.lang.Object, boolean, boolean, boolean, int, boolean)
- */
- public final Component getTreeCellRendererComponent(JTree tree, Object value,
- boolean selected, boolean expanded, boolean leaf, int row,
- boolean hasFocus) {
- if (value instanceof SchemaTreeNode) {
- SchemaTreeNode stn = (SchemaTreeNode) value;
-
- this.setValues(null, stn.getCaption(), selected);
- return this;
- }
- throw new IllegalStateException("Unknown node");
- }
- }
-
-
- /**
- * Simple constructor.
- */
- public SchemaTreeTraverser() {
- this.model = SchemaTreeModel.getInstance();
- this.currNode = (SchemaTreeNode) this.model.getRoot();
- }
-
- /**
- * Retrieves the tree model of <code>this</code> traverser.
- *
- * @return Tree model of <code>this</code> traverser.
- */
- public SchemaTreeModel getModel() {
- return model;
- }
-
- /**
- * Visits the root schema set.
- *
- * @param s Root schema set.
- */
- public void visit(XSSchemaSet s) {
- for (XSSchema schema : s.getSchemas()) {
- schema(schema);
- }
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSVisitor#schema(com.sun.xml.internal.xsom.XSSchema)
- */
- public void schema(XSSchema s) {
- // QUICK HACK: don't print the built-in components
- if (s.getTargetNamespace().equals(Const.schemaNamespace)) {
- return;
- }
-
- SchemaTreeNode newNode = new SchemaTreeNode("Schema "
- + s.getLocator().getSystemId(), s.getLocator());
- this.currNode = newNode;
- this.model.addSchemaNode(newNode);
-
- for (XSAttGroupDecl groupDecl : s.getAttGroupDecls().values()) {
- attGroupDecl(groupDecl);
- }
-
- for (XSAttributeDecl attrDecl : s.getAttributeDecls().values()) {
- attributeDecl(attrDecl);
- }
-
- for (XSComplexType complexType : s.getComplexTypes().values()) {
- complexType(complexType);
- }
-
- for (XSElementDecl elementDecl : s.getElementDecls().values()) {
- elementDecl(elementDecl);
- }
-
- for (XSModelGroupDecl modelGroupDecl : s.getModelGroupDecls().values()) {
- modelGroupDecl(modelGroupDecl);
- }
-
- for (XSSimpleType simpleType : s.getSimpleTypes().values()) {
- simpleType(simpleType);
- }
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSVisitor#attGroupDecl(com.sun.xml.internal.xsom.XSAttGroupDecl)
- */
- public void attGroupDecl(XSAttGroupDecl decl) {
- SchemaTreeNode newNode = new SchemaTreeNode("Attribute group \""
- + decl.getName() + "\"", decl.getLocator());
- this.currNode.add(newNode);
- this.currNode = newNode;
-
- Iterator itr;
-
- itr = decl.iterateAttGroups();
- while (itr.hasNext()) {
- dumpRef((XSAttGroupDecl) itr.next());
- }
-
- itr = decl.iterateDeclaredAttributeUses();
- while (itr.hasNext()) {
- attributeUse((XSAttributeUse) itr.next());
- }
-
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
-
- /**
- * Creates node of attribute group decalration reference.
- *
- * @param decl Attribute group decalration reference.
- */
- public void dumpRef(XSAttGroupDecl decl) {
- SchemaTreeNode newNode = new SchemaTreeNode("Attribute group ref \"{"
- + decl.getTargetNamespace() + "}" + decl.getName() + "\"", decl
- .getLocator());
- this.currNode.add(newNode);
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSVisitor#attributeUse(com.sun.xml.internal.xsom.XSAttributeUse)
- */
- public void attributeUse(XSAttributeUse use) {
- XSAttributeDecl decl = use.getDecl();
-
- String additionalAtts = "";
-
- if (use.isRequired()) {
- additionalAtts += " use=\"required\"";
- }
- if (use.getFixedValue() != null
- && use.getDecl().getFixedValue() == null) {
- additionalAtts += " fixed=\"" + use.getFixedValue() + "\"";
- }
- if (use.getDefaultValue() != null
- && use.getDecl().getDefaultValue() == null) {
- additionalAtts += " default=\"" + use.getDefaultValue() + "\"";
- }
-
- if (decl.isLocal()) {
- // this is anonymous attribute use
- dump(decl, additionalAtts);
- }
- else {
- // reference to a global one
- String str = MessageFormat.format(
- "Attribute ref \"'{'{0}'}'{1}{2}\"", new Object[]{
- decl.getTargetNamespace(), decl.getName(),
- additionalAtts});
- SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator());
- this.currNode.add(newNode);
- }
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSVisitor#attributeDecl(com.sun.xml.internal.xsom.XSAttributeDecl)
- */
- public void attributeDecl(XSAttributeDecl decl) {
- dump(decl, "");
- }
-
- /**
- * Creates node for attribute declaration with additional attributes.
- *
- * @param decl Attribute declaration.
- * @param additionalAtts Additional attributes.
- */
- private void dump(XSAttributeDecl decl, String additionalAtts) {
- XSSimpleType type = decl.getType();
-
- String str = MessageFormat.format("Attribute \"{0}\"{1}{2}{3}{4}",
- new Object[]{
- decl.getName(),
- additionalAtts,
- type.isLocal() ? "" : MessageFormat.format(
- " type=\"'{'{0}'}'{1}\"", new Object[]{
- type.getTargetNamespace(),
- type.getName()}),
- decl.getFixedValue() == null ? "" : " fixed=\""
- + decl.getFixedValue() + "\"",
- decl.getDefaultValue() == null ? "" : " default=\""
- + decl.getDefaultValue() + "\""});
-
- SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator());
- this.currNode.add(newNode);
- this.currNode = newNode;
-
- if (type.isLocal()) {
- simpleType(type);
- }
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSContentTypeVisitor#simpleType(com.sun.xml.internal.xsom.XSSimpleType)
- */
- public void simpleType(XSSimpleType type) {
-
- String str = MessageFormat.format("Simple type {0}",
- new Object[]{type.isLocal() ? "" : " name=\""
- + type.getName() + "\""});
-
- SchemaTreeNode newNode = new SchemaTreeNode(str, type.getLocator());
- this.currNode.add(newNode);
- this.currNode = newNode;
-
- type.visit((XSSimpleTypeVisitor) this);
-
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSSimpleTypeVisitor#listSimpleType(com.sun.xml.internal.xsom.XSListSimpleType)
- */
- public void listSimpleType(XSListSimpleType type) {
- XSSimpleType itemType = type.getItemType();
-
- if (itemType.isLocal()) {
- SchemaTreeNode newNode = new SchemaTreeNode("List", type
- .getLocator());
- this.currNode.add(newNode);
- this.currNode = newNode;
- simpleType(itemType);
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
- else {
- // global type
- String str = MessageFormat.format("List itemType=\"'{'{0}'}'{1}\"",
- new Object[]{itemType.getTargetNamespace(),
- itemType.getName()});
- SchemaTreeNode newNode = new SchemaTreeNode(str, itemType
- .getLocator());
- this.currNode.add(newNode);
- }
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSSimpleTypeVisitor#unionSimpleType(com.sun.xml.internal.xsom.XSUnionSimpleType)
- */
- public void unionSimpleType(XSUnionSimpleType type) {
- final int len = type.getMemberSize();
- StringBuffer ref = new StringBuffer();
-
- for (int i = 0; i < len; i++) {
- XSSimpleType member = type.getMember(i);
- if (member.isGlobal()) {
- ref.append(MessageFormat.format(" '{'{0}'}'{1}",
- new Object[]{
- member.getTargetNamespace(),
- member.getName()}));
- }
- }
-
- String name = (ref.length() == 0) ? "Union" : ("Union memberTypes=\""
- + ref + "\"");
- SchemaTreeNode newNode = new SchemaTreeNode(name, type.getLocator());
- this.currNode.add(newNode);
- this.currNode = newNode;
-
- for (int i = 0; i < len; i++) {
- XSSimpleType member = type.getMember(i);
- if (member.isLocal()) {
- simpleType(member);
- }
- }
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSSimpleTypeVisitor#restrictionSimpleType(com.sun.xml.internal.xsom.XSRestrictionSimpleType)
- */
- public void restrictionSimpleType(XSRestrictionSimpleType type) {
-
- if (type.getBaseType() == null) {
- // don't print anySimpleType
- if (!type.getName().equals("anySimpleType")) {
- throw new InternalError();
- }
- if (!Const.schemaNamespace.equals(type.getTargetNamespace())) {
- throw new InternalError();
- }
- return;
- }
-
- XSSimpleType baseType = type.getSimpleBaseType();
-
- String str = MessageFormat.format("Restriction {0}",
- new Object[]{baseType.isLocal() ? "" : " base=\"{"
- + baseType.getTargetNamespace() + "}"
- + baseType.getName() + "\""});
-
- SchemaTreeNode newNode = new SchemaTreeNode(str, baseType.getLocator());
- this.currNode.add(newNode);
- this.currNode = newNode;
-
- if (baseType.isLocal()) {
- simpleType(baseType);
- }
-
- Iterator itr = type.iterateDeclaredFacets();
- while (itr.hasNext()) {
- facet((XSFacet) itr.next());
- }
-
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSVisitor#facet(com.sun.xml.internal.xsom.XSFacet)
- */
- public void facet(XSFacet facet) {
- SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
- "{0} value=\"{1}\"", new Object[]{facet.getName(),
- facet.getValue(), }),
- facet.getLocator());
- this.currNode.add(newNode);
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSVisitor#notation(com.sun.xml.internal.xsom.XSNotation)
- */
- public void notation(XSNotation notation) {
- SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
- "Notation name='\"0}\" public =\"{1}\" system=\"{2}\"",
- new Object[]{notation.getName(), notation.getPublicId(),
- notation.getSystemId()}), notation.getLocator());
- this.currNode.add(newNode);
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSVisitor#complexType(com.sun.xml.internal.xsom.XSComplexType)
- */
- public void complexType(XSComplexType type) {
- SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
- "ComplexType {0}", new Object[]{type.isLocal() ? ""
- : " name=\"" + type.getName() + "\""}), type
- .getLocator());
- this.currNode.add(newNode);
- this.currNode = newNode;
-
- // TODO: wildcard
-
- if (type.getContentType().asSimpleType() != null) {
- // simple content
- SchemaTreeNode newNode2 = new SchemaTreeNode("Simple content", type
- .getContentType().getLocator());
- this.currNode.add(newNode2);
- this.currNode = newNode2;
-
- XSType baseType = type.getBaseType();
-
- if (type.getDerivationMethod() == XSType.RESTRICTION) {
- // restriction
- String str = MessageFormat.format(
- "Restriction base=\"<{0}>{1}\"", new Object[]{
- baseType.getTargetNamespace(),
- baseType.getName()});
- SchemaTreeNode newNode3 = new SchemaTreeNode(str, baseType
- .getLocator());
- this.currNode.add(newNode3);
- this.currNode = newNode3;
-
- dumpComplexTypeAttribute(type);
-
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
- else {
- // extension
- String str = MessageFormat.format(
- "Extension base=\"<{0}>{1}\"", new Object[]{
- baseType.getTargetNamespace(),
- baseType.getName()});
- SchemaTreeNode newNode3 = new SchemaTreeNode(str, baseType
- .getLocator());
- this.currNode.add(newNode3);
- this.currNode = newNode3;
-
- // check if have redefine tag
- if ((type.getTargetNamespace().compareTo(
- baseType.getTargetNamespace()) ==
- 0)
- && (type.getName().compareTo(baseType.getName()) == 0)) {
- SchemaTreeNode newNodeRedefine = new SchemaTreeNode(
- "redefine", type
- .getLocator());
- this.currNode.add(newNodeRedefine);
- this.currNode = newNodeRedefine;
- baseType.visit(this);
- this.currNode =
- (SchemaTreeNode) newNodeRedefine.getParent();
- }
-
- dumpComplexTypeAttribute(type);
-
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
-
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
- else {
- // complex content
- SchemaTreeNode newNode2 = new SchemaTreeNode("Complex content",
- type.getContentType().getLocator());
- this.currNode.add(newNode2);
- this.currNode = newNode2;
-
- XSComplexType baseType = type.getBaseType().asComplexType();
-
- if (type.getDerivationMethod() == XSType.RESTRICTION) {
- // restriction
- String str = MessageFormat.format(
- "Restriction base=\"<{0}>{1}\"", new Object[]{
- baseType.getTargetNamespace(),
- baseType.getName()});
- SchemaTreeNode newNode3 = new SchemaTreeNode(str,
- baseType.getLocator());
- this.currNode.add(newNode3);
- this.currNode = newNode3;
-
- type.getContentType().visit(this);
- dumpComplexTypeAttribute(type);
-
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
- else {
- // extension
- String str = MessageFormat.format(
- "Extension base=\"'{'{0}'}'{1}\"", new Object[]{
- baseType.getTargetNamespace(),
- baseType.getName()});
- SchemaTreeNode newNode3 = new SchemaTreeNode(str,
- baseType.getLocator());
- this.currNode.add(newNode3);
- this.currNode = newNode3;
-
- // check if have redefine tag
- if ((type.getTargetNamespace().compareTo(
- baseType.getTargetNamespace()) ==
- 0)
- && (type.getName().compareTo(baseType.getName()) == 0)) {
- SchemaTreeNode newNodeRedefine = new SchemaTreeNode(
- "redefine", type
- .getLocator());
- this.currNode.add(newNodeRedefine);
- this.currNode = newNodeRedefine;
- baseType.visit(this);
- this.currNode =
- (SchemaTreeNode) newNodeRedefine.getParent();
- }
-
- type.getExplicitContent().visit(this);
- dumpComplexTypeAttribute(type);
-
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
-
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
-
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
-
- /**
- * Creates node for complex type.
- *
- * @param type Complex type.
- */
- private void dumpComplexTypeAttribute(XSComplexType type) {
- Iterator itr;
-
- itr = type.iterateAttGroups();
- while (itr.hasNext()) {
- dumpRef((XSAttGroupDecl) itr.next());
- }
-
- itr = type.iterateDeclaredAttributeUses();
- while (itr.hasNext()) {
- attributeUse((XSAttributeUse) itr.next());
- }
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSTermVisitor#elementDecl(com.sun.xml.internal.xsom.XSElementDecl)
- */
- public void elementDecl(XSElementDecl decl) {
- elementDecl(decl, "");
- }
-
- /**
- * Creates node for element declaration with additional attributes.
- *
- * @param decl Element declaration.
- * @param extraAtts Additional attributes.
- */
- private void elementDecl(XSElementDecl decl, String extraAtts) {
- XSType type = decl.getType();
-
- // TODO: various other attributes
-
- String str = MessageFormat.format("Element name=\"{0}\"{1}{2}",
- new Object[]{
- decl.getName(),
- type.isLocal() ? "" : " type=\"{"
- + type.getTargetNamespace() + "}"
- + type.getName() + "\"", extraAtts});
-
- SchemaTreeNode newNode = new SchemaTreeNode(str, decl.getLocator());
- this.currNode.add(newNode);
- this.currNode = newNode;
-
- if (type.isLocal()) {
- if (type.isLocal()) {
- type.visit(this);
- }
- }
-
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSTermVisitor#modelGroupDecl(com.sun.xml.internal.xsom.XSModelGroupDecl)
- */
- public void modelGroupDecl(XSModelGroupDecl decl) {
- SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
- "Group name=\"{0}\"", new Object[]{decl.getName()}),
- decl.getLocator());
- this.currNode.add(newNode);
- this.currNode = newNode;
-
- modelGroup(decl.getModelGroup());
-
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSTermVisitor#modelGroup(com.sun.xml.internal.xsom.XSModelGroup)
- */
- public void modelGroup(XSModelGroup group) {
- modelGroup(group, "");
- }
-
- /**
- * Creates node for model group with additional attributes.
- *
- * @param group Model group.
- * @param extraAtts Additional attributes.
- */
- private void modelGroup(XSModelGroup group, String extraAtts) {
- SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
- "{0}{1}", new Object[]{group.getCompositor(), extraAtts}),
- group.getLocator());
- this.currNode.add(newNode);
- this.currNode = newNode;
-
- final int len = group.getSize();
- for (int i = 0; i < len; i++) {
- particle(group.getChild(i));
- }
-
- this.currNode = (SchemaTreeNode) this.currNode.getParent();
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSContentTypeVisitor#particle(com.sun.xml.internal.xsom.XSParticle)
- */
- public void particle(XSParticle part) {
- BigInteger i;
-
- StringBuffer buf = new StringBuffer();
-
- i = part.getMaxOccurs();
- if (i.equals(BigInteger.valueOf(XSParticle.UNBOUNDED))) {
- buf.append(" maxOccurs=\"unbounded\"");
- }
- else {
- if (!i.equals(BigInteger.ONE)) {
- buf.append(" maxOccurs=\"" + i + "\"");
- }
- }
-
- i = part.getMinOccurs();
- if (!i.equals(BigInteger.ONE)) {
- buf.append(" minOccurs=\"" + i + "\"");
- }
-
- final String extraAtts = buf.toString();
-
- part.getTerm().visit(new XSTermVisitor() {
- public void elementDecl(XSElementDecl decl) {
- if (decl.isLocal()) {
- SchemaTreeTraverser.this.elementDecl(decl, extraAtts);
- }
- else {
- // reference
- SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat
- .format("Element ref=\"'{'{0}'}'{1}\"{2}",
- new Object[]{decl.getTargetNamespace(),
- decl.getName(), extraAtts}),
- decl.getLocator());
- currNode.add(newNode);
- }
- }
-
- public void modelGroupDecl(XSModelGroupDecl decl) {
- // reference
- SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat
- .format("Group ref=\"'{'{0}'}'{1}\"{2}", new Object[]{
- decl.getTargetNamespace(), decl.getName(),
- extraAtts}), decl.getLocator());
- currNode.add(newNode);
- }
-
- public void modelGroup(XSModelGroup group) {
- SchemaTreeTraverser.this.modelGroup(group, extraAtts);
- }
-
- public void wildcard(XSWildcard wc) {
- SchemaTreeTraverser.this.wildcard(wc, extraAtts);
- }
- });
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSTermVisitor#wildcard(com.sun.xml.internal.xsom.XSWildcard)
- */
- public void wildcard(XSWildcard wc) {
- wildcard(wc, "");
- }
-
- /**
- * Creates node for wild card with additional attributes.
- *
- * @param wc Wild card.
- * @param extraAtts Additional attributes.
- */
- private void wildcard(XSWildcard wc, String extraAtts) {
- // TODO
- SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
- "Any ", new Object[]{extraAtts}), wc.getLocator());
- currNode.add(newNode);
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSVisitor#annotation(com.sun.xml.internal.xsom.XSAnnotation)
- */
- public void annotation(XSAnnotation ann) {
- // TODO: it would be nice even if we just put <xs:documentation>
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSContentTypeVisitor#empty(com.sun.xml.internal.xsom.XSContentType)
- */
- public void empty(XSContentType t) {
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSVisitor#identityConstraint(com.sun.xml.internal.xsom.XSIdentityConstraint)
- */
- public void identityConstraint(XSIdentityConstraint ic) {
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.visitor.XSVisitor#xpath(com.sun.xml.internal.xsom.XSXPath)
- */
- public void xpath(XSXPath xp) {
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/SchemaWriter.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/SchemaWriter.java
deleted file mode 100644
index f0ea3e30..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/SchemaWriter.java
+++ /dev/null
@@ -1,607 +0,0 @@
-/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.impl.util;
-
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSListSimpleType;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSRestrictionSimpleType;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSType;
-import com.sun.xml.internal.xsom.XSUnionSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.XSWildcard.Any;
-import com.sun.xml.internal.xsom.XSWildcard.Other;
-import com.sun.xml.internal.xsom.XSWildcard.Union;
-import com.sun.xml.internal.xsom.impl.Const;
-import com.sun.xml.internal.xsom.visitor.XSSimpleTypeVisitor;
-import com.sun.xml.internal.xsom.visitor.XSTermVisitor;
-import com.sun.xml.internal.xsom.visitor.XSVisitor;
-import com.sun.xml.internal.xsom.visitor.XSWildcardFunction;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.math.BigInteger;
-import java.text.MessageFormat;
-import java.util.Iterator;
-
-/**
- * Generates approximated XML Schema representation from
- * a schema component. This is not intended to be a fully-fledged
- * round-trippable schema writer.
- *
- * <h2>Usage of this class</h2>
- * <ol>
- * <li>Create a new instance with whatever Writer
- * you'd like to send the output to.
- * <li>Call one of the overloaded dump methods.
- * You can repeat this process as many times as you want.
- * </ol>
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- * @author Kirill Grouchnikov (kirillcool@yahoo.com)
- */
-public class SchemaWriter implements XSVisitor, XSSimpleTypeVisitor {
- public SchemaWriter( Writer _out ) {
- this.out=_out;
- }
-
- /** output is sent to this object. */
- private final Writer out;
-
- /** indentation. */
- private int indent;
-
- private void println(String s) {
- try {
- for( int i=0; i<indent; i++) out.write(" ");
- out.write(s);
- out.write('\n');
- // flush stream to make the output appear immediately
- out.flush();
- } catch( IOException e ) {
- // ignore IOException.
- hadError = true;
- }
- }
- private void println() { println(""); }
-
- /** If IOException is encountered, this flag is set to true. */
- private boolean hadError =false;
-
- /** Flush the stream and check its error state. */
- public boolean checkError() {
- try {
- out.flush();
- } catch( IOException e ) {
- hadError=true;
- }
- return hadError;
- }
-
- public void visit( XSSchemaSet s ) {
- Iterator itr = s.iterateSchema();
- while(itr.hasNext()) {
- schema((XSSchema)itr.next());
- println();
- }
- }
-
- public void schema( XSSchema s ) {
-
- // QUICK HACK: don't print the built-in components
- if(s.getTargetNamespace().equals(Const.schemaNamespace))
- return;
-
- println(MessageFormat.format("<schema targetNamespace=\"{0}\">", s.getTargetNamespace()));
- indent++;
-
- Iterator itr;
-
- itr = s.iterateAttGroupDecls();
- while(itr.hasNext())
- attGroupDecl( (XSAttGroupDecl)itr.next() );
-
- itr = s.iterateAttributeDecls();
- while(itr.hasNext())
- attributeDecl( (XSAttributeDecl)itr.next() );
-
- itr = s.iterateComplexTypes();
- while(itr.hasNext())
- complexType( (XSComplexType)itr.next() );
-
- itr = s.iterateElementDecls();
- while(itr.hasNext())
- elementDecl( (XSElementDecl)itr.next() );
-
- itr = s.iterateModelGroupDecls();
- while(itr.hasNext())
- modelGroupDecl( (XSModelGroupDecl)itr.next() );
-
- itr = s.iterateSimpleTypes();
- while(itr.hasNext())
- simpleType( (XSSimpleType)itr.next() );
-
- indent--;
- println("</schema>");
- }
-
- public void attGroupDecl( XSAttGroupDecl decl ) {
- Iterator itr;
-
- println(MessageFormat.format("<attGroup name=\"{0}\">", decl.getName()));
- indent++;
-
- // TODO: wildcard
-
- itr = decl.iterateAttGroups();
- while(itr.hasNext())
- dumpRef( (XSAttGroupDecl)itr.next() );
-
- itr = decl.iterateDeclaredAttributeUses();
- while(itr.hasNext())
- attributeUse( (XSAttributeUse)itr.next() );
-
- indent--;
- println("</attGroup>");
- }
-
- public void dumpRef( XSAttGroupDecl decl ) {
- println(MessageFormat.format("<attGroup ref=\"'{'{0}'}'{1}\"/>", decl.getTargetNamespace(), decl.getName()));
- }
-
- public void attributeUse( XSAttributeUse use ) {
- XSAttributeDecl decl = use.getDecl();
-
- String additionalAtts="";
-
- if(use.isRequired())
- additionalAtts += " use=\"required\"";
- if(use.getFixedValue()!=null && use.getDecl().getFixedValue()==null)
- additionalAtts += " fixed=\""+use.getFixedValue()+'\"';
- if(use.getDefaultValue()!=null && use.getDecl().getDefaultValue()==null)
- additionalAtts += " default=\""+use.getDefaultValue()+'\"';
-
- if(decl.isLocal()) {
- // this is anonymous attribute use
- dump(decl,additionalAtts);
- } else {
- // reference to a global one
- println(MessageFormat.format("<attribute ref=\"'{'{0}'}'{1}{2}\"/>",
- decl.getTargetNamespace(), decl.getName(), additionalAtts));
- }
- }
-
- public void attributeDecl( XSAttributeDecl decl ) {
- dump(decl,"");
- }
-
- private void dump( XSAttributeDecl decl, String additionalAtts ) {
- XSSimpleType type=decl.getType();
-
- println(MessageFormat.format("<attribute name=\"{0}\"{1}{2}{3}{4}{5}>",
- decl.getName(),
- additionalAtts,
- type.isLocal()?"":
- MessageFormat.format(" type=\"'{'{0}'}'{1}\"", type.getTargetNamespace(), type.getName()),
- decl.getFixedValue()==null ?
- "":" fixed=\""+decl.getFixedValue()+'\"',
- decl.getDefaultValue()==null ?
- "":" default=\""+decl.getDefaultValue()+'\"',
- type.isLocal()?"":" /"));
-
- if(type.isLocal()) {
- indent++;
- simpleType(type);
- indent--;
- println("</attribute>");
- }
- }
-
- public void simpleType( XSSimpleType type ) {
- println(MessageFormat.format("<simpleType{0}>", type.isLocal()?"":" name=\""+type.getName()+'\"'));
- indent++;
-
- type.visit((XSSimpleTypeVisitor)this);
-
- indent--;
- println("</simpleType>");
- }
-
- public void listSimpleType( XSListSimpleType type ) {
- XSSimpleType itemType = type.getItemType();
-
- if(itemType.isLocal()) {
- println("<list>");
- indent++;
- simpleType(itemType);
- indent--;
- println("</list>");
- } else {
- // global type
- println(MessageFormat.format("<list itemType=\"'{'{0}'}'{1}\" />",
- itemType.getTargetNamespace(), itemType.getName()));
- }
- }
-
- public void unionSimpleType( XSUnionSimpleType type ) {
- final int len = type.getMemberSize();
- StringBuffer ref = new StringBuffer();
-
- for( int i=0; i<len; i++ ) {
- XSSimpleType member = type.getMember(i);
- if(member.isGlobal())
- ref.append(MessageFormat.format(" '{'{0}'}'{1}", member.getTargetNamespace(),member.getName()));
- }
-
- if(ref.length()==0)
- println("<union>");
- else
- println("<union memberTypes=\""+ref+"\">");
- indent++;
-
- for( int i=0; i<len; i++ ) {
- XSSimpleType member = type.getMember(i);
- if(member.isLocal())
- simpleType(member);
- }
- indent--;
- println("</union>");
- }
-
- public void restrictionSimpleType( XSRestrictionSimpleType type ) {
-
- if(type.getBaseType()==null) {
- // don't print anySimpleType
- if(!type.getName().equals("anySimpleType"))
- throw new InternalError();
- if(!Const.schemaNamespace.equals(type.getTargetNamespace()))
- throw new InternalError();
- return;
- }
-
- XSSimpleType baseType = type.getSimpleBaseType();
-
- println(MessageFormat.format("<restriction{0}>",
- baseType.isLocal()?"":" base=\"{"+
- baseType.getTargetNamespace()+'}'+
- baseType.getName()+'\"'));
- indent++;
-
- if(baseType.isLocal())
- simpleType(baseType);
-
- Iterator itr = type.iterateDeclaredFacets();
- while(itr.hasNext())
- facet( (XSFacet)itr.next() );
-
- indent--;
- println("</restriction>");
- }
-
- public void facet( XSFacet facet ) {
- println(MessageFormat.format("<{0} value=\"{1}\"/>",
- facet.getName(), facet.getValue()));
- }
-
- public void notation( XSNotation notation ) {
- println(MessageFormat.format("<notation name='\"0}\" public =\"{1}\" system=\"{2}\" />",
- notation.getName(), notation.getPublicId(), notation.getSystemId()));
- }
-
-
-
- public void complexType( XSComplexType type ) {
- println(MessageFormat.format("<complexType{0}>",
- type.isLocal()?"":" name=\""+type.getName()+'\"'));
- indent++;
-
- // TODO: wildcard
-
- if(type.getContentType().asSimpleType()!=null) {
- // simple content
- println("<simpleContent>");
- indent++;
-
- XSType baseType = type.getBaseType();
-
- if(type.getDerivationMethod()==XSType.RESTRICTION) {
- // restriction
- println(MessageFormat.format("<restriction base=\"<{0}>{1}\">",
- baseType.getTargetNamespace(), baseType.getName()));
- indent++;
-
- dumpComplexTypeAttribute(type);
-
- indent--;
- println("</restriction>");
- } else {
- // extension
- println(MessageFormat.format("<extension base=\"<{0}>{1}\">",
- baseType.getTargetNamespace(), baseType.getName()));
-
- // check if have redefine tag - Kirill
- if( type.isGlobal()
- && type.getTargetNamespace().equals(baseType.getTargetNamespace())
- && type.getName().equals(baseType.getName())) {
- indent++;
- println("<redefine>");
- indent++;
- baseType.visit(this);
- indent--;
- println("</redefine>");
- indent--;
- }
-
- indent++;
-
- dumpComplexTypeAttribute(type);
-
- indent--;
- println("</extension>");
- }
-
- indent--;
- println("</simpleContent>");
- } else {
- // complex content
- println("<complexContent>");
- indent++;
-
- XSComplexType baseType = type.getBaseType().asComplexType();
-
- if(type.getDerivationMethod()==XSType.RESTRICTION) {
- // restriction
- println(MessageFormat.format("<restriction base=\"'{'{0}'}'{1}\">",
- baseType.getTargetNamespace(), baseType.getName()));
- indent++;
-
- type.getContentType().visit(this);
- dumpComplexTypeAttribute(type);
-
- indent--;
- println("</restriction>");
- } else {
- // extension
- println(MessageFormat.format("<extension base=\"'{'{0}'}'{1}\">",
- baseType.getTargetNamespace(), baseType.getName()));
-
- // check if have redefine - Kirill
- if( type.isGlobal()
- && type.getTargetNamespace().equals(baseType.getTargetNamespace())
- && type.getName().equals(baseType.getName())) {
- indent++;
- println("<redefine>");
- indent++;
- baseType.visit(this);
- indent--;
- println("</redefine>");
- indent--;
- }
-
- indent++;
-
- type.getExplicitContent().visit(this);
- dumpComplexTypeAttribute(type);
-
- indent--;
- println("</extension>");
- }
-
- indent--;
- println("</complexContent>");
- }
-
- indent--;
- println("</complexType>");
- }
-
- private void dumpComplexTypeAttribute( XSComplexType type ) {
- Iterator itr;
-
- itr = type.iterateAttGroups();
- while(itr.hasNext())
- dumpRef( (XSAttGroupDecl)itr.next() );
-
- itr = type.iterateDeclaredAttributeUses();
- while(itr.hasNext())
- attributeUse( (XSAttributeUse)itr.next() );
-
- XSWildcard awc = type.getAttributeWildcard();
- if(awc!=null)
- wildcard("anyAttribute",awc,"");
- }
-
- public void elementDecl( XSElementDecl decl ) {
- elementDecl(decl,"");
- }
- private void elementDecl( XSElementDecl decl, String extraAtts ) {
- XSType type = decl.getType();
-
- // TODO: various other attributes
-
- // qualified attr; Issue
- if(decl.getForm() != null) {
- extraAtts += " form=\"" + (decl.getForm() ? "qualified" : "unqualified" ) + "\"";
- }
-
- println(MessageFormat.format("<element name=\"{0}\"{1}{2}{3}>",
- decl.getName(),
- type.isLocal()?"":" type=\"{"+
- type.getTargetNamespace()+'}'+
- type.getName()+'\"',
- extraAtts,
- type.isLocal()?"":"/"));
-
- if(type.isLocal()) {
- indent++;
-
- if(type.isLocal()) type.visit(this);
-
- indent--;
- println("</element>");
- }
- }
-
- public void modelGroupDecl( XSModelGroupDecl decl ) {
- println(MessageFormat.format("<group name=\"{0}\">", decl.getName()));
- indent++;
-
- modelGroup(decl.getModelGroup());
-
- indent--;
- println("</group>");
- }
-
- public void modelGroup( XSModelGroup group ) {
- modelGroup(group,"");
- }
- private void modelGroup( XSModelGroup group, String extraAtts ) {
- println(MessageFormat.format("<{0}{1}>", group.getCompositor(), extraAtts));
- indent++;
-
- final int len = group.getSize();
- for( int i=0; i<len; i++ )
- particle(group.getChild(i));
-
- indent--;
- println(MessageFormat.format("</{0}>", group.getCompositor()));
- }
-
- public void particle( XSParticle part ) {
- BigInteger i;
-
- StringBuilder buf = new StringBuilder();
-
- i = part.getMaxOccurs();
- if(i.equals(BigInteger.valueOf(XSParticle.UNBOUNDED)))
- buf.append(" maxOccurs=\"unbounded\"");
- else if(!i.equals(BigInteger.ONE))
- buf.append(" maxOccurs=\"").append(i).append('\"');
-
- i = part.getMinOccurs();
- if(!i.equals(BigInteger.ONE))
- buf.append(" minOccurs=\"").append(i).append('\"');
-
- final String extraAtts = buf.toString();
-
- part.getTerm().visit(new XSTermVisitor(){
- public void elementDecl( XSElementDecl decl ) {
- if(decl.isLocal())
- SchemaWriter.this.elementDecl(decl,extraAtts);
- else {
- // reference
- println(MessageFormat.format("<element ref=\"'{'{0}'}'{1}\"{2}/>",
- decl.getTargetNamespace(),
- decl.getName(),
- extraAtts));
- }
- }
- public void modelGroupDecl( XSModelGroupDecl decl ) {
- // reference
- println(MessageFormat.format("<group ref=\"'{'{0}'}'{1}\"{2}/>",
- decl.getTargetNamespace(),
- decl.getName(),
- extraAtts));
- }
- public void modelGroup( XSModelGroup group ) {
- SchemaWriter.this.modelGroup(group,extraAtts);
- }
- public void wildcard( XSWildcard wc ) {
- SchemaWriter.this.wildcard("any",wc,extraAtts);
- }
- });
- }
-
- public void wildcard( XSWildcard wc ) {
- wildcard("any",wc,"");
- }
-
- private void wildcard( String tagName, XSWildcard wc, String extraAtts ) {
- final String proessContents;
- switch(wc.getMode()) {
- case XSWildcard.LAX:
- proessContents = " processContents='lax'";break;
- case XSWildcard.STRTICT:
- proessContents = "";break;
- case XSWildcard.SKIP:
- proessContents = " processContents='skip'";break;
- default:
- throw new AssertionError();
- }
-
- println(MessageFormat.format("<{0}{1}{2}{3}/>",tagName, proessContents, wc.apply(WILDCARD_NS), extraAtts));
- }
-
- private static final XSWildcardFunction<String> WILDCARD_NS = new XSWildcardFunction<String>() {
- public String any(Any wc) {
- return ""; // default
- }
-
- public String other(Other wc) {
- return " namespace='##other'";
- }
-
- public String union(Union wc) {
- StringBuilder buf = new StringBuilder(" namespace='");
- boolean first = true;
- for (String s : wc.getNamespaces()) {
- if(first) first=false;
- else buf.append(' ');
- buf.append(s);
- }
- return buf.append('\'').toString();
- }
- };
-
- public void annotation( XSAnnotation ann ) {
- // TODO: it would be nice even if we just put <xs:documentation>
- }
-
- public void identityConstraint(XSIdentityConstraint decl) {
- // TODO
- }
-
- public void xpath(XSXPath xp) {
- // TODO
- }
-
- public void empty( XSContentType t ) {}
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/Uri.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/Uri.java
deleted file mode 100644
index d6cddc75..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/util/Uri.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
-Copyright (c) 2001, 2002 Thai Open Source Software Center Ltd
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- Neither the name of the Thai Open Source Software Center Ltd nor
- the names of its contributors may be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-// @@3RD PARTY CODE@@
-
-package com.sun.xml.internal.xsom.impl.util;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URL;
-
-public class Uri {
- private static String utf8 = "UTF-8";
-
- public static boolean isValid(String s) {
- return isValidPercent(s) && isValidFragment(s) && isValidScheme(s);
- }
-
- private static final String HEX_DIGITS = "0123456789abcdef";
-
- public static String escapeDisallowedChars(String s) {
- StringBuffer buf = null;
- int len = s.length();
- int done = 0;
- for (;;) {
- int i = done;
- for (;;) {
- if (i == len) {
- if (done == 0)
- return s;
- break;
- }
- if (isExcluded(s.charAt(i)))
- break;
- i++;
- }
- if (buf == null)
- buf = new StringBuffer();
- if (i > done) {
- buf.append(s.substring(done, i));
- done = i;
- }
- if (i == len)
- break;
- for (i++; i < len && isExcluded(s.charAt(i)); i++)
- ;
- String tem = s.substring(done, i);
- byte[] bytes;
- try {
- bytes = tem.getBytes(utf8);
- }
- catch (UnsupportedEncodingException e) {
- utf8 = "UTF8";
- try {
- bytes = tem.getBytes(utf8);
- }
- catch (UnsupportedEncodingException e2) {
- // Give up
- return s;
- }
- }
- for (int j = 0; j < bytes.length; j++) {
- buf.append('%');
- buf.append(HEX_DIGITS.charAt((bytes[j] & 0xFF) >> 4));
- buf.append(HEX_DIGITS.charAt(bytes[j] & 0xF));
- }
- done = i;
- }
- return buf.toString();
- }
-
- private static String excluded = "<>\"{}|\\^`";
-
- private static boolean isExcluded(char c) {
- return c <= 0x20 || c >= 0x7F || excluded.indexOf(c) >= 0;
- }
-
- private static boolean isAlpha(char c) {
- return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z');
- }
-
- private static boolean isHexDigit(char c) {
- return ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F') || isDigit(c);
- }
-
- private static boolean isDigit(char c) {
- return '0' <= c && c <= '9';
- }
-
- private static boolean isSchemeChar(char c) {
- return isAlpha(c) || isDigit(c) || c == '+' || c == '-' || c =='.';
- }
-
- private static boolean isValidPercent(String s) {
- int len = s.length();
- for (int i = 0; i < len; i++)
- if (s.charAt(i) == '%') {
- if (i + 2 >= len)
- return false;
- else if (!isHexDigit(s.charAt(i + 1))
- || !isHexDigit(s.charAt(i + 2)))
- return false;
- }
- return true;
- }
-
- private static boolean isValidFragment(String s) {
- int i = s.indexOf('#');
- return i < 0 || s.indexOf('#', i + 1) < 0;
- }
-
- private static boolean isValidScheme(String s) {
- if (!isAbsolute(s))
- return true;
- int i = s.indexOf(':');
- if (i == 0
- || i + 1 == s.length()
- || !isAlpha(s.charAt(0)))
- return false;
- while (--i > 0)
- if (!isSchemeChar(s.charAt(i)))
- return false;
- return true;
- }
-
- public static String resolve(String baseUri, String uriReference) throws IOException {
- if (isAbsolute(uriReference))
- return uriReference;
-
- if(baseUri==null)
- throw new IOException("Unable to resolve relative URI "+uriReference+" without a base URI");
-
- if(!isAbsolute(baseUri))
- throw new IOException("Unable to resolve relative URI "+uriReference+" because base URI is not absolute: "+baseUri);
-
- return new URL(new URL(baseUri), uriReference).toString();
- }
-
- public static boolean hasFragmentId(String uri) {
- return uri.indexOf('#') >= 0;
- }
-
- public static boolean isAbsolute(String uri) {
- int i = uri.indexOf(':');
- if (i < 0)
- return false;
- while (--i >= 0) {
- switch (uri.charAt(i)) {
- case '#':
- case '/':
- case '?':
- return false;
- }
- }
- return true;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/package.html b/src/share/jaxws_classes/com/sun/xml/internal/xsom/package.html
deleted file mode 100644
index 16888dae..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
-Interfaces that the client should use to access schema information.
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/AnnotationContext.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/AnnotationContext.java
deleted file mode 100644
index 09305030..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/AnnotationContext.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.parser;
-
-/**
- * Enumeration used to represent the type of the schema component
- * that is being parsed when the AnnotationParser is called.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-final public class AnnotationContext {
-
- /** Display name of the context. */
- private final String name;
-
- private AnnotationContext( String _name ) {
- this.name = _name;
- }
-
- public String toString() { return name; }
-
-
-
- public static final AnnotationContext SCHEMA
- = new AnnotationContext("schema");
- public static final AnnotationContext NOTATION
- = new AnnotationContext("notation");
- public static final AnnotationContext ELEMENT_DECL
- = new AnnotationContext("element");
- public static final AnnotationContext IDENTITY_CONSTRAINT
- = new AnnotationContext("identityConstraint");
- public static final AnnotationContext XPATH
- = new AnnotationContext("xpath");
- public static final AnnotationContext MODELGROUP_DECL
- = new AnnotationContext("modelGroupDecl");
- public static final AnnotationContext SIMPLETYPE_DECL
- = new AnnotationContext("simpleTypeDecl");
- public static final AnnotationContext COMPLEXTYPE_DECL
- = new AnnotationContext("complexTypeDecl");
- public static final AnnotationContext PARTICLE
- = new AnnotationContext("particle");
- public static final AnnotationContext MODELGROUP
- = new AnnotationContext("modelGroup");
- public static final AnnotationContext ATTRIBUTE_USE
- = new AnnotationContext("attributeUse");
- public static final AnnotationContext WILDCARD
- = new AnnotationContext("wildcard");
- public static final AnnotationContext ATTRIBUTE_GROUP
- = new AnnotationContext("attributeGroup");
- public static final AnnotationContext ATTRIBUTE_DECL
- = new AnnotationContext("attributeDecl");
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/AnnotationParser.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/AnnotationParser.java
deleted file mode 100644
index 39fb71b7..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/AnnotationParser.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.parser;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-
-/**
- * Used to parse &lt;xs:annotation>.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class AnnotationParser {
- /**
- * Called every time a new &lt;xs:annotation> element
- * is found.
- *
- * The sub-tree rooted at &lt;xs:annotation> will be
- * sent to this ContentHandler as if it is a whole document.
- *
- * @param context
- * indicates the schema component that owns this annotation.
- * Always non-null.
- * @param parentElementName
- * local name of the element that contains &lt;xs:annotation>.
- * (e.g., "element", "attribute", ... )
- * @param errorHandler
- * The error handler that the client application specifies.
- * The returned content handler can send its errors to this
- * object.
- * @param entityResolver
- * The entity resolver that is currently in use. Again,
- * The returned content handler can use this object
- * if it needs to resolve entities.
- */
- public abstract ContentHandler getContentHandler(
- AnnotationContext context,
- String parentElementName,
- ErrorHandler errorHandler,
- EntityResolver entityResolver );
-
- /**
- * Once the SAX events are fed to the ContentHandler,
- * this method will be called to retrieve the parsed result.
- *
- * @param existing
- * An annotation object which was returned from another
- * AnnotationParser before. Sometimes, one schema component
- * can have multiple &lt:xs:annotation> elements and
- * this parameter is used to merge all those annotations
- * together. If there is no existing object, null will be
- * passed.
- * @return
- * Any object, including null.
- */
- public abstract Object getResult( Object existing );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/AnnotationParserFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/AnnotationParserFactory.java
deleted file mode 100644
index 6b830c63..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/AnnotationParserFactory.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.parser;
-
-/**
- * Factory for {@link AnnotationParser}.
- *
- * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface AnnotationParserFactory {
- AnnotationParser create();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/JAXPParser.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/JAXPParser.java
deleted file mode 100644
index 13401ba9..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/JAXPParser.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.xsom.parser;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.xml.sax.*;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import com.sun.xml.internal.xsom.impl.parser.Messages;
-
-/**
- * Standard XMLParser implemented by using JAXP.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class JAXPParser implements XMLParser {
-
- // not in older JDK, so must be duplicated here, otherwise javax.xml.XMLConstants should be used
- private static final String ACCESS_EXTERNAL_SCHEMA = "http://javax.xml.XMLConstants/property/accessExternalSchema";
-
- private static final Logger LOGGER = Logger.getLogger(JAXPParser.class.getName());
-
- private final SAXParserFactory factory;
-
- public JAXPParser( SAXParserFactory factory ) {
- factory.setNamespaceAware(true); // just in case
- this.factory = factory;
- }
-
- /**
- * @deprecated Unsafe, use JAXPParser(factory) instead with
- * security features initialized by setting
- * XMLConstants.FEATURE_SECURE_PROCESSING feature.
- */
- public JAXPParser() {
- this( SAXParserFactory.newInstance());
- }
-
- public void parse( InputSource source, ContentHandler handler,
- ErrorHandler errorHandler, EntityResolver entityResolver )
-
- throws SAXException, IOException {
-
- try {
- SAXParser saxParser = allowFileAccess(factory.newSAXParser(), false);
- XMLReader reader = new XMLReaderEx(saxParser.getXMLReader());
-
- reader.setContentHandler(handler);
- if(errorHandler!=null)
- reader.setErrorHandler(errorHandler);
- if(entityResolver!=null)
- reader.setEntityResolver(entityResolver);
- reader.parse(source);
- } catch( ParserConfigurationException e ) {
- // in practice this won't happen
- SAXParseException spe = new SAXParseException(e.getMessage(),null,e);
- errorHandler.fatalError(spe);
- throw spe;
- }
- }
-
- private static SAXParser allowFileAccess(SAXParser saxParser, boolean disableSecureProcessing) throws SAXException {
-
- // if feature secure processing enabled, nothing to do, file is allowed,
- // or user is able to control access by standard JAXP mechanisms
- if (disableSecureProcessing) {
- return saxParser;
- }
-
- try {
- saxParser.setProperty(ACCESS_EXTERNAL_SCHEMA, "file");
- LOGGER.log(Level.FINE, Messages.format(Messages.JAXP_SUPPORTED_PROPERTY, ACCESS_EXTERNAL_SCHEMA));
- } catch (SAXException ignored) {
- // nothing to do; support depends on version JDK or SAX implementation
- LOGGER.log(Level.CONFIG, Messages.format(Messages.JAXP_UNSUPPORTED_PROPERTY, ACCESS_EXTERNAL_SCHEMA), ignored);
- }
- return saxParser;
- }
-
- /**
- * XMLReader with improved error message for entity resolution failure.
- *
- * TODO: this class is completely stand-alone, so it shouldn't be
- * an inner class.
- */
- private static class XMLReaderEx extends XMLFilterImpl {
-
- private Locator locator;
-
- XMLReaderEx( XMLReader parent ) {
- this.setParent(parent);
- }
-
- /**
- * Resolves entities and reports user-friendly error messages.
- *
- * <p>
- * Some XML parser (at least Xerces) does not report much information
- * when it fails to resolve an entity, which is often quite
- * frustrating. For example, if you are behind a firewall and the
- * schema contains a reference to www.w3.org, and there is no
- * entity resolver, the parser will just throw an IOException
- * that doesn't contain any information about where that reference
- * occurs nor what it is accessing.
- *
- * <p>
- * By implementing an EntityResolver and resolving the reference
- * by ourselves, we can report an error message with all the
- * necessary information to fix the problem.
- *
- * <p>
- * Note that we still need to the client-specified entity resolver
- * to let the application handle entity resolution. Here we just catch
- * an IOException and add more information.
- */
- @Override
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
- try {
- InputSource is=null;
-
- // ask the client-specified entity resolver first
- if( this.getEntityResolver()!=null)
- is = this.getEntityResolver().resolveEntity(publicId,systemId);
- if( is!=null ) return is; // if that succeeds, fine.
-
- // rather than returning null, resolve it now
- // so that we can detect errors.
- is = new InputSource( new URL(systemId).openStream() );
- is.setSystemId(systemId);
- is.setPublicId(publicId);
- return is;
- } catch( IOException e ) {
- // catch this error and provide a nice error message, rather than
- // just throwing this IOException.
- SAXParseException spe = new SAXParseException(
- Messages.format(Messages.ERR_ENTITY_RESOLUTION_FAILURE,
- systemId, e.toString()), // use the toString method to get the class name
- locator, e );
- if(this.getErrorHandler()!=null)
- this.getErrorHandler().fatalError(spe);
- throw spe;
- }
- }
-
- @Override
- public void setDocumentLocator(Locator locator) {
- super.setDocumentLocator(locator);
- this.locator = locator;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/SchemaDocument.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/SchemaDocument.java
deleted file mode 100644
index 9c1b8f37..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/SchemaDocument.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.parser;
-
-import com.sun.xml.internal.xsom.XSSchema;
-
-import java.util.Set;
-
-/**
- * Represents a parsed XML schema document.
- *
- * <p>
- * Unlike schema components defined in <tt>XS****</tt> interfaces,
- * which are inherently de-coupled from where it was loaded from,
- * {@link SchemaDocument} represents a single XML infoset that
- * is a schema document.
- *
- * <p>
- * This concept is often useful in tracking down the reference
- * relationship among schema documents.
- *
- * @see XSOMParser#getDocuments()
- * @author Kohsuke Kawaguchi
- */
-public interface SchemaDocument {
- /**
- * Gets the system ID of the schema document.
- *
- * @return
- * null if {@link XSOMParser} was not given the system Id.
- */
- String getSystemId();
-
- /**
- * The namespace that this schema defines.
- *
- * <p>
- * More precisely, this method simply returns the <tt>targetNamespace</tt> attribute
- * of the schema document. When schemas are referenced in certain ways
- * (AKA chameleon schema), schema components in this schema document
- * may end up defining components in other namespaces.
- *
- * @return
- * can be "" but never null.
- */
- String getTargetNamespace();
-
- /**
- * Gets {@link XSSchema} component that contains all the schema
- * components defined in this namespace.
- *
- * <p>
- * The returned {@link XSSchema} contains not just components
- * defined in this {@link SchemaDocument} but all the other components
- * defined in all the schemas that collectively define this namespace.
- *
- * @return
- * never null.
- */
- XSSchema getSchema();
-
- /**
- * Set of {@link SchemaDocument}s that are included/imported from this document.
- *
- * @return
- * can be empty but never null. read-only.
- */
- Set<SchemaDocument> getReferencedDocuments();
-
- /**
- * Gets the {@link SchemaDocument}s that are included from this document.
- *
- * @return
- * can be empty but never null. read-only.
- * this set is always a subset of {@link #getReferencedDocuments()}.
- */
- Set<SchemaDocument> getIncludedDocuments();
-
- /**
- * Gets the {@link SchemaDocument}s that are imported from this document.
- *
- * @param targetNamespace
- * The namespace URI of the import that you want to
- * get {@link SchemaDocument}s for.
- * @return
- * can be empty but never null. read-only.
- * this set is always a subset of {@link #getReferencedDocuments()}.
- */
- Set<SchemaDocument> getImportedDocuments(String targetNamespace);
-
- /**
- * Returns true if this document includes the given document.
- *
- * <p>
- * Note that this method returns false if this document
- * imports the given document.
- */
- boolean includes(SchemaDocument doc);
-
- /**
- * Returns true if this document imports the given document.
- *
- * <p>
- * Note that this method returns false if this document
- * includes the given document.
- */
- boolean imports(SchemaDocument doc);
-
- /**
- * Set of {@link SchemaDocument}s that include/import this document.
- *
- * <p>
- * This works as the opposite of {@link #getReferencedDocuments()}.
- *
- * @return
- * can be empty but never null. read-only.
- */
- Set<SchemaDocument> getReferers();
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/XMLParser.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/XMLParser.java
deleted file mode 100644
index f5cb3889..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/XMLParser.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.parser;
-
-import java.io.IOException;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * Interface that hides the detail of parsing mechanism.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XMLParser {
- /**
- * Parses the document identified by the given input source
- * and sends SAX events to the given content handler.
- *
- * <p>
- * This method must be re-entrant.
- *
- * @param errorHandler
- * Errors found during the parsing must be reported to
- * this handler so that XSOM can recognize that something went wrong.
- * Always a non-null valid object
- * @param entityResolver
- * Entity resolution should be done through this interface.
- * Can be null.
- *
- * @exception SAXException
- * If ErrorHandler throws a SAXException, this method
- * will tunnel it to the caller. All the other errors
- * must be reported to the error handler.
- */
- void parse( InputSource source, ContentHandler handler,
- ErrorHandler errorHandler, EntityResolver entityResolver )
-
- throws SAXException, IOException;
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/XSOMParser.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/XSOMParser.java
deleted file mode 100644
index a877f002..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/XSOMParser.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.parser;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.net.URL;
-import java.util.Set;
-import java.util.HashSet;
-
-import javax.xml.parsers.SAXParserFactory;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import com.sun.xml.internal.xsom.XSSchemaSet;
-import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
-import com.sun.xml.internal.xsom.impl.parser.ParserContext;
-import com.sun.xml.internal.xsom.impl.parser.state.Schema;
-
-/**
- * Parses possibly multiple W3C XML Schema files and compose
- * them into one grammar.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public final class XSOMParser {
-
- private EntityResolver entityResolver;
- private ErrorHandler userErrorHandler;
-
- private AnnotationParserFactory apFactory;
-
- private final ParserContext context;
-
- /**
- * Creates a new XSOMParser by using a SAX parser from JAXP.
- * @deprecated Unsafe, use XSOMParser(factory) instead with
- * security features initialized by setting
- * XMLConstants.FEATURE_SECURE_PROCESSING feature.
- */
- public XSOMParser() {
- this(new JAXPParser());
- }
-
- /**
- * Creates a new XSOMParser that uses the given SAXParserFactory
- * for creating new SAX parsers.
- *
- * The caller needs to configure
- * it properly. Don't forget to call <code>setNamespaceAware(true)</code>
- * or you'll see some strange errors.
- */
- public XSOMParser( SAXParserFactory factory ) {
- this( new JAXPParser(factory) );
- }
-
- /**
- * Creates a new XSOMParser that reads XML Schema from non-standard
- * inputs.
- *
- * By implementing the {@link XMLParser} interface, XML Schema
- * can be read from something other than XML.
- *
- * @param parser
- * This parser will be called to parse XML Schema documents.
- */
- public XSOMParser(XMLParser parser) {
- context = new ParserContext(this,parser);
- }
-
- /**
- * Parses a new XML Schema document.
- *
- * <p>
- * When using this method, XSOM does not know the system ID of
- * this document, therefore, when this stream contains relative
- * references to other schemas, XSOM will fail to resolve them.
- * To specify an system ID with a stream, use {@link InputSource}
- */
- public void parse( InputStream is ) throws SAXException {
- parse(new InputSource(is));
- }
-
- /**
- * Parses a new XML Schema document.
- *
- * <p>
- * When using this method, XSOM does not know the system ID of
- * this document, therefore, when this reader contains relative
- * references to other schemas, XSOM will fail to resolve them.
- * To specify an system ID with a reader, use {@link InputSource}
- */
- public void parse( Reader reader ) throws SAXException {
- parse(new InputSource(reader));
- }
-
- /**
- * Parses a new XML Schema document.
- */
- public void parse( File schema ) throws SAXException, IOException {
- parse(schema.toURL());
- }
-
- /**
- * Parses a new XML Schema document.
- */
- public void parse( URL url ) throws SAXException {
- parse( url.toExternalForm() );
- }
-
- /**
- * Parses a new XML Schema document.
- */
- public void parse( String systemId ) throws SAXException {
- parse(new InputSource(systemId));
- }
-
- /**
- * Parses a new XML Schema document.
- *
- * <p>
- * Note that if the {@link InputSource} does not have a system ID,
- * XSOM will fail to resolve them.
- */
- public void parse( InputSource source ) throws SAXException {
- context.parse(source);
- }
-
-
-
- /**
- * Gets the parser implemented as a ContentHandler.
- *
- * One can feed XML Schema as SAX events to this interface to
- * parse a schema. To parse multiple schema files, feed multiple
- * sets of events.
- *
- * <p>
- * If you don't send a complete event sequence from a startDocument
- * event to an endDocument event, the state of XSOMParser can become
- * unstable. This sometimes happen when you encounter an error while
- * generating SAX events. Don't call the getResult method in that case.
- *
- * <p>
- * This way of reading XML Schema can be useful when XML Schema is
- * not available as a stand-alone XML document.
- * For example, one can feed XML Schema inside a WSDL document.
- */
- public ContentHandler getParserHandler() {
- NGCCRuntimeEx runtime = context.newNGCCRuntime();
- Schema s = new Schema(runtime,false,null);
- runtime.setRootHandler(s);
- return runtime;
- }
-
- /**
- * Gets the parsed result. Don't call this method until
- * you parse all the schemas.
- *
- * @return
- * If there was any parse error, this method returns null.
- * To receive error information, specify your error handler
- * through the setErrorHandler method.
- * @exception SAXException
- * This exception will never be thrown unless it is thrown
- * by an error handler.
- */
- public XSSchemaSet getResult() throws SAXException {
- return context.getResult();
- }
-
- /**
- * Gets the set of {@link SchemaDocument} that represents
- * parsed documents so far.
- *
- * @return
- * can be empty but never null.
- */
- public Set<SchemaDocument> getDocuments() {
- return new HashSet<SchemaDocument>(context.parsedDocuments.keySet());
- }
-
- public EntityResolver getEntityResolver() {
- return entityResolver;
- }
- /**
- * Set an entity resolver that is used to resolve things
- * like &lt;xsd:import> and &lt;xsd:include>.
- */
- public void setEntityResolver( EntityResolver resolver ) {
- this.entityResolver = resolver;
- }
- public ErrorHandler getErrorHandler() {
- return userErrorHandler;
- }
- /**
- * Set an error handler that receives all the errors encountered
- * during the parsing.
- */
- public void setErrorHandler(ErrorHandler errorHandler) {
- this.userErrorHandler = errorHandler;
- }
-
- /**
- * Sets the annotation parser.
- *
- * Annotation parser can be used to parse application-specific
- * annotations inside a schema.
- *
- * <p>
- * For each annotation, new instance of this class will be
- * created and used to parse &lt;xs:annotation>.
- */
- public void setAnnotationParser( final Class annParser ) {
- setAnnotationParser( new AnnotationParserFactory() {
- public AnnotationParser create() {
- try {
- return (AnnotationParser)annParser.newInstance();
- } catch( InstantiationException e ) {
- throw new InstantiationError(e.getMessage());
- } catch( IllegalAccessException e ) {
- throw new IllegalAccessError(e.getMessage());
- }
- }
- });
- }
-
- /**
- * Sets the annotation parser factory.
- *
- * <p>
- * The specified factory will be used to create AnnotationParsers.
- */
- public void setAnnotationParser( AnnotationParserFactory factory ) {
- this.apFactory = factory;
- }
-
- public AnnotationParserFactory getAnnotationParserFactory() {
- return apFactory;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/package.html b/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/package.html
deleted file mode 100644
index b7fb5ab2..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/parser/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
-Classes to parse XML Schema documents into objects of <code>com.sun.xml.internal.xsom</code> package.
-</body></html>
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ComponentNameFunction.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ComponentNameFunction.java
deleted file mode 100644
index 8c9237f1..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ComponentNameFunction.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.util;
-
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-
-/**
- * Extract the name of the components.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
- */
-public class ComponentNameFunction implements XSFunction<String> {
-
- // delegate to this object to get the localized name of the component type
- private NameGetter nameGetter = new NameGetter(null);
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#annotation(XSAnnotation)
- */
- public String annotation(XSAnnotation ann) {
- // unnamed component
- return nameGetter.annotation( ann );
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#attGroupDecl(XSAttGroupDecl)
- */
- public String attGroupDecl(XSAttGroupDecl decl) {
- String name = decl.getName();
- if( name == null ) name = "";
- return name + " " + nameGetter.attGroupDecl( decl );
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#attributeDecl(XSAttributeDecl)
- */
- public String attributeDecl(XSAttributeDecl decl) {
- String name = decl.getName();
- if( name == null ) name = "";
- return name + " " + nameGetter.attributeDecl( decl );
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#attributeUse(XSAttributeUse)
- */
- public String attributeUse(XSAttributeUse use) {
- // unnamed component
- return nameGetter.attributeUse( use );
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#complexType(XSComplexType)
- */
- public String complexType(XSComplexType type) {
- String name = type.getName();
- if( name == null ) name = "anonymous";
- return name + " " + nameGetter.complexType( type );
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#schema(XSSchema)
- */
- public String schema(XSSchema schema) {
- return nameGetter.schema( schema ) + " \"" + schema.getTargetNamespace()+"\"";
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#facet(XSFacet)
- */
- public String facet(XSFacet facet) {
- String name = facet.getName();
- if( name == null ) name = "";
- return name + " " + nameGetter.facet( facet );
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#notation(XSNotation)
- */
- public String notation(XSNotation notation) {
- String name = notation.getName();
- if( name == null ) name = "";
- return name + " " + nameGetter.notation( notation );
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSContentTypeFunction#simpleType(XSSimpleType)
- */
- public String simpleType(XSSimpleType simpleType) {
- String name = simpleType.getName();
- if( name == null ) name = "anonymous";
- return name + " " + nameGetter.simpleType( simpleType );
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSContentTypeFunction#particle(XSParticle)
- */
- public String particle(XSParticle particle) {
- // unnamed component
- return nameGetter.particle( particle );
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSContentTypeFunction#empty(XSContentType)
- */
- public String empty(XSContentType empty) {
- // unnamed component
- return nameGetter.empty( empty );
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSTermFunction#wildcard(XSWildcard)
- */
- public String wildcard(XSWildcard wc) {
- // unnamed component
- return nameGetter.wildcard( wc );
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSTermFunction#modelGroupDecl(XSModelGroupDecl)
- */
- public String modelGroupDecl(XSModelGroupDecl decl) {
- String name = decl.getName();
- if( name == null ) name = "";
- return name + " " + nameGetter.modelGroupDecl( decl );
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSTermFunction#modelGroup(XSModelGroup)
- */
- public String modelGroup(XSModelGroup group) {
- // unnamed component
- return nameGetter.modelGroup( group );
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSTermFunction#elementDecl(XSElementDecl)
- */
- public String elementDecl(XSElementDecl decl) {
- String name = decl.getName();
- if( name == null ) name = "";
- return name + " " + nameGetter.elementDecl( decl );
- }
-
- public String identityConstraint(XSIdentityConstraint decl) {
- return decl.getName()+" "+nameGetter.identityConstraint(decl);
- }
-
- public String xpath(XSXPath xpath) {
- return nameGetter.xpath(xpath);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.java
deleted file mode 100644
index 9bfd0b05..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.xsom.util;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-import java.util.WeakHashMap;
-
-/**
- * Simple utility ensuring that the value is cached only in case it is non-internal implementation
- */
-abstract class ContextClassloaderLocal<V> {
-
- private static final String FAILED_TO_CREATE_NEW_INSTANCE = "FAILED_TO_CREATE_NEW_INSTANCE";
-
- private WeakHashMap<ClassLoader, V> CACHE = new WeakHashMap<ClassLoader, V>();
-
- public V get() throws Error {
- ClassLoader tccl = getContextClassLoader();
- V instance = CACHE.get(tccl);
- if (instance == null) {
- instance = createNewInstance();
- CACHE.put(tccl, instance);
- }
- return instance;
- }
-
- public void set(V instance) {
- CACHE.put(getContextClassLoader(), instance);
- }
-
- protected abstract V initialValue() throws Exception;
-
- private V createNewInstance() {
- try {
- return initialValue();
- } catch (Exception e) {
- throw new Error(format(FAILED_TO_CREATE_NEW_INSTANCE, getClass().getName()), e);
- }
- }
-
- private static String format(String property, Object... args) {
- String text = ResourceBundle.getBundle(ContextClassloaderLocal.class.getName()).getString(property);
- return MessageFormat.format(text, args);
- }
-
- private static ClassLoader getContextClassLoader() {
- return (ClassLoader)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- ClassLoader cl = null;
- try {
- cl = Thread.currentThread().getContextClassLoader();
- } catch (SecurityException ex) {
- }
- return cl;
- }
- });
- }
-}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.properties b/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.properties
deleted file mode 100644
index 1a8fc17a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/ContextClassloaderLocal.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-# Error messages for ContextClassloaderLocal utility class
-FAILED_TO_CREATE_NEW_INSTANCE=Failed to create new instance of {0}
-
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DeferedCollection.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DeferedCollection.java
deleted file mode 100644
index 09c38051..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DeferedCollection.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-
-/**
- * {@link Collection} that returns the view of objects which are actually fetched
- * lazily from an {@link Iterator}.
- *
- * @author Kohsuke Kawaguchi
- */
-public class DeferedCollection<T> implements Collection<T> {
- /**
- * The iterator that lazily evaluates SCD query.
- */
- private final Iterator<T> result;
-
- /**
- * Stores values that are already fetched from {@link #result}.
- */
- private final List<T> archive = new ArrayList<T>();
-
- public DeferedCollection(Iterator<T> result) {
- this.result = result;
- }
-
- public boolean isEmpty() {
- if(archive.isEmpty())
- fetch();
- return archive.isEmpty();
- }
-
- public int size() {
- fetchAll();
- return archive.size();
- }
-
- public boolean contains(Object o) {
- if(archive.contains(o))
- return true;
- while(result.hasNext()) {
- T value = result.next();
- archive.add(value);
- if(value.equals(o))
- return true;
- }
- return false;
- }
-
- public boolean containsAll(Collection<?> c) {
- for (Object o : c) {
- if(!contains(o))
- return false;
- }
- return true;
- }
-
- public Iterator<T> iterator() {
- return new Iterator<T>() {
- int idx=0;
- public boolean hasNext() {
- if(idx<archive.size())
- return true;
- return result.hasNext();
- }
-
- public T next() {
- if(idx==archive.size())
- fetch();
- if(idx==archive.size())
- throw new NoSuchElementException();
- return archive.get(idx++);
- }
-
- public void remove() {
- // TODO
- }
- };
- }
-
- public Object[] toArray() {
- fetchAll();
- return archive.toArray();
- }
-
- public <T>T[] toArray(T[] a) {
- fetchAll();
- return archive.toArray(a);
- }
-
-
-
- private void fetchAll() {
- while(result.hasNext())
- archive.add(result.next());
- }
-
- /**
- * Fetches another item from {@link
- */
- private void fetch() {
- if(result.hasNext())
- archive.add(result.next());
- }
-
-// mutation methods are unsupported
- public boolean add(T o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
-
- public boolean addAll(Collection<? extends T> c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean removeAll(Collection<?> c) {
- throw new UnsupportedOperationException();
- }
-
- public boolean retainAll(Collection<?> c) {
- throw new UnsupportedOperationException();
- }
-
- public void clear() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DomAnnotationParserFactory.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DomAnnotationParserFactory.java
deleted file mode 100644
index ed2a0522..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/DomAnnotationParserFactory.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.xsom.util;
-
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.parser.AnnotationContext;
-import com.sun.xml.internal.xsom.parser.AnnotationParser;
-import com.sun.xml.internal.xsom.parser.AnnotationParserFactory;
-import javax.xml.XMLConstants;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.sax.SAXTransformerFactory;
-import javax.xml.transform.sax.TransformerHandler;
-
-/**
- * {@link AnnotationParserFactory} that parses annotations into a W3C DOM.
- *
- * <p>
- * If you use this parser factory, you'll get {@link Element} that represents
- * &lt;xs:annotation> from {@link XSAnnotation#getAnnotation()}.
- *
- * <p>
- * When multiple &lt;xs:annotation>s are found for the given schema component,
- * you'll see all &lt;xs:appinfo>s and &lt;xs:documentation>s combined under
- * one &lt;xs:annotation> element.
- *
- * @author Kohsuke Kawaguchi
- */
-public class DomAnnotationParserFactory implements AnnotationParserFactory {
-
- public AnnotationParser create() {
- return new AnnotationParserImpl();
- }
-
- public AnnotationParser create(boolean disableSecureProcessing) {
- return new AnnotationParserImpl(disableSecureProcessing);
- }
-
- private static final ContextClassloaderLocal<SAXTransformerFactory> stf = new ContextClassloaderLocal<SAXTransformerFactory>() {
- @Override
- protected SAXTransformerFactory initialValue() throws Exception {
- return (SAXTransformerFactory) SAXTransformerFactory.newInstance();
- }
- };
-
- private static class AnnotationParserImpl extends AnnotationParser {
-
- /**
- * Identity transformer used to parse SAX into DOM.
- */
- private final TransformerHandler transformer;
- private DOMResult result;
-
- AnnotationParserImpl() {
- this(false);
- }
-
- AnnotationParserImpl(boolean disableSecureProcessing) {
- try {
- SAXTransformerFactory factory = stf.get();
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, disableSecureProcessing);
- transformer = factory.newTransformerHandler();
- } catch (TransformerConfigurationException e) {
- throw new Error(e); // impossible
- }
- }
-
- public ContentHandler getContentHandler(AnnotationContext context, String parentElementName, ErrorHandler errorHandler, EntityResolver entityResolver) {
- result = new DOMResult();
- transformer.setResult(result);
- return transformer;
- }
-
- public Object getResult(Object existing) {
- Document dom = (Document)result.getNode();
- Element e = dom.getDocumentElement();
- if(existing instanceof Element) {
- // merge all the children
- Element prev = (Element) existing;
- Node anchor = e.getFirstChild();
- while(prev.getFirstChild()!=null) {
- Node move = prev.getFirstChild();
- e.insertBefore(e.getOwnerDocument().adoptNode(move), anchor );
- }
- }
- return e;
- }
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/NameGetter.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/NameGetter.java
deleted file mode 100644
index 6d88cf88..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/NameGetter.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.util;
-
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-
-/**
- * Gets the human-readable name of a schema component.
- *
- * <p>
- * This is a function object that returns {@link String}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class NameGetter implements XSFunction<String> {
- /**
- * Initializes a NameGetter so that it will return
- * messages in the specified locale.
- */
- public NameGetter( Locale _locale ) {
- this.locale = _locale;
- }
-
- private final Locale locale;
-
- /**
- * An instance that gets names in the default locale.
- * This instance is provided just for convenience.
- */
- public final static XSFunction theInstance = new NameGetter(null);
-
- /**
- * Gets the name of the specified component in the default locale.
- * This method is just a wrapper.
- */
- public static String get( XSComponent comp ) {
- return (String)comp.apply(theInstance);
- }
-
-
- public String annotation(XSAnnotation ann) {
- return localize("annotation");
- }
-
- public String attGroupDecl(XSAttGroupDecl decl) {
- return localize("attGroupDecl");
- }
-
- public String attributeUse(XSAttributeUse use) {
- return localize("attributeUse");
- }
-
- public String attributeDecl(XSAttributeDecl decl) {
- return localize("attributeDecl");
- }
-
- public String complexType(XSComplexType type) {
- return localize("complexType");
- }
-
- public String schema(XSSchema schema) {
- return localize("schema");
- }
-
- public String facet(XSFacet facet) {
- return localize("facet");
- }
-
- public String simpleType(XSSimpleType simpleType) {
- return localize("simpleType");
- }
-
- public String particle(XSParticle particle) {
- return localize("particle");
- }
-
- public String empty(XSContentType empty) {
- return localize("empty");
- }
-
- public String wildcard(XSWildcard wc) {
- return localize("wildcard");
- }
-
- public String modelGroupDecl(XSModelGroupDecl decl) {
- return localize("modelGroupDecl");
- }
-
- public String modelGroup(XSModelGroup group) {
- return localize("modelGroup");
- }
-
- public String elementDecl(XSElementDecl decl) {
- return localize("elementDecl");
- }
-
- public String notation( XSNotation n ) {
- return localize("notation");
- }
-
- public String identityConstraint(XSIdentityConstraint decl) {
- return localize("idConstraint");
- }
-
- public String xpath(XSXPath xpath) {
- return localize("xpath");
- }
-
- private String localize( String key ) {
- ResourceBundle rb;
-
- if(locale==null)
- rb = ResourceBundle.getBundle(NameGetter.class.getName());
- else
- rb = ResourceBundle.getBundle(NameGetter.class.getName(),locale);
-
- return rb.getString(key);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/NameGetter.properties b/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/NameGetter.properties
deleted file mode 100644
index 8a8f996c..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/NameGetter.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-annotation = annotation
-attGroupDecl = attribute group declaration
-attributeDecl = attribute declaration
-attributeUse = attribute use
-complexType = complex type
-schema = schema
-facet = facet
-simpleType = simple type
-particle = particle
-empty = empty content model
-wildcard = wildcard
-modelGroupDecl = model group declaration
-modelGroup = model group
-elementDecl = element declaration
-notation = notation declaration
-idConstraint = identity constraint
-xpath = xpath
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/SimpleTypeSet.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/SimpleTypeSet.java
deleted file mode 100644
index c059bf25..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/SimpleTypeSet.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.util;
-
-import java.util.Set;
-
-import com.sun.xml.internal.xsom.XSType;
-
-/**
- * A very simple TypeSet.
- *
- * The contains method returns true if the set explicitly contains an
- * instance of the specified XSType.
- *
- * @author <a href="mailto:Ryan.Shoemaker@Sun.COM">Ryan Shoemaker</a>, Sun Microsystems, Inc.
- */
-public class SimpleTypeSet extends TypeSet {
-
- private final Set typeSet;
-
- public SimpleTypeSet(Set s) {
- typeSet = s;
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.util.TypeSet#contains(com.sun.xml.internal.xsom.XSDeclaration)
- */
- public boolean contains(XSType type) {
- return typeSet.contains(type);
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/TypeClosure.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/TypeClosure.java
deleted file mode 100644
index 22c59ccc..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/TypeClosure.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.util;
-
-import com.sun.xml.internal.xsom.XSType;
-
-/**
- * Perform a transitive closure operation on a type to determine if it
- * belongs to this set.
- *
- * The contains method returns true if the TypeSet contains an instance
- * of the specified XSType or any of the base types of the XSType.
- *
- * @author <a href="mailto:Ryan.Shoemaker@Sun.COM">Ryan Shoemaker</a>, Sun Microsystems, Inc.
- */
-public class TypeClosure extends TypeSet {
-
- private final TypeSet typeSet;
-
- public TypeClosure(TypeSet typeSet) {
- this.typeSet = typeSet;
- }
-
- /* (non-Javadoc)
- * @see com.sun.xml.internal.xsom.util.TypeSet#contains(com.sun.xml.internal.xsom.XSDeclaration)
- *
- * transitive closure variation on the contains method.
- */
- public boolean contains(XSType type) {
- if( typeSet.contains(type) ) {
- return true;
- } else {
- XSType baseType = type.getBaseType();
- if( baseType == null ) {
- return false;
- } else {
- // climb the super type hierarchy
- return contains(baseType);
- }
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/TypeSet.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/TypeSet.java
deleted file mode 100644
index b3df8c37..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/TypeSet.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.util;
-
-import com.sun.xml.internal.xsom.XSType;
-
-/**
- * A simple abstraction for a set of Types that defines containment functions.
- *
- * @author <a href="mailto:Ryan.Shoemaker@Sun.COM">Ryan Shoemaker</a>, Sun Microsystems, Inc.
- */
-public abstract class TypeSet {
-
- /**
- * Return true if this TypeSet contains the specified type.
- *
- * Concrete implementations of this method determine what it
- * means for the TypeSet to "contain" a type.
- *
- * @param type the type
- * @return true iff this TypeSet contains the specified type
- */
- public abstract boolean contains(XSType type);
-
- /**
- * Calculate the TypeSet formed by the intersection of two
- * other TypeSet objects.
- *
- * @param a a TypeSet
- * @param b another TypeSet
- * @return the intersection of a and b
- */
- public static TypeSet intersection(final TypeSet a, final TypeSet b) {
- return new TypeSet(){
- public boolean contains(XSType type) {
- return a.contains(type) && b.contains(type);
- }
- };
- }
-
- /**
- * Calculate the TypeSet formed by the union of two
- * other TypeSet objects.
- *
- * @param a a TypeSet
- * @param b another TypeSet
- * @return the union of a and b
- */
- public static TypeSet union(final TypeSet a, final TypeSet b) {
- return new TypeSet(){
- public boolean contains(XSType type) {
- return a.contains(type) || b.contains(type);
- }
- };
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/XSFinder.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/XSFinder.java
deleted file mode 100644
index 7deb0e97..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/XSFinder.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.util;
-
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSComponent;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-
-/**
- * Utility implementation of {@link XSFunction} that returns
- * {@link Boolean} to find something from schema objects.
- *
- * <p>
- * This implementation returns <code>Boolean.FALSE</code> from
- * all of the methods. The derived class is expected to override
- * some of the methods to actually look for something.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class XSFinder implements XSFunction<Boolean> {
-
- /**
- * Invokes this object as a visitor with the specified component.
- */
- public final boolean find( XSComponent c ) {
- return c.apply(this);
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#annotation(com.sun.xml.internal.xsom.XSAnnotation)
- */
- public Boolean annotation(XSAnnotation ann) {
- return Boolean.FALSE;
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#attGroupDecl(com.sun.xml.internal.xsom.XSAttGroupDecl)
- */
- public Boolean attGroupDecl(XSAttGroupDecl decl) {
- return Boolean.FALSE;
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#attributeDecl(com.sun.xml.internal.xsom.XSAttributeDecl)
- */
- public Boolean attributeDecl(XSAttributeDecl decl) {
- return Boolean.FALSE;
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#attributeUse(com.sun.xml.internal.xsom.XSAttributeUse)
- */
- public Boolean attributeUse(XSAttributeUse use) {
- return Boolean.FALSE;
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#complexType(com.sun.xml.internal.xsom.XSComplexType)
- */
- public Boolean complexType(XSComplexType type) {
- return Boolean.FALSE;
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#schema(com.sun.xml.internal.xsom.XSSchema)
- */
- public Boolean schema(XSSchema schema) {
- return Boolean.FALSE;
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#facet(com.sun.xml.internal.xsom.XSFacet)
- */
- public Boolean facet(XSFacet facet) {
- return Boolean.FALSE;
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSFunction#notation(com.sun.xml.internal.xsom.XSNotation)
- */
- public Boolean notation(XSNotation notation) {
- return Boolean.FALSE;
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSContentTypeFunction#simpleType(com.sun.xml.internal.xsom.XSSimpleType)
- */
- public Boolean simpleType(XSSimpleType simpleType) {
- return Boolean.FALSE;
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSContentTypeFunction#particle(com.sun.xml.internal.xsom.XSParticle)
- */
- public Boolean particle(XSParticle particle) {
- return Boolean.FALSE;
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSContentTypeFunction#empty(com.sun.xml.internal.xsom.XSContentType)
- */
- public Boolean empty(XSContentType empty) {
- return Boolean.FALSE;
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSTermFunction#wildcard(com.sun.xml.internal.xsom.XSWildcard)
- */
- public Boolean wildcard(XSWildcard wc) {
- return Boolean.FALSE;
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSTermFunction#modelGroupDecl(com.sun.xml.internal.xsom.XSModelGroupDecl)
- */
- public Boolean modelGroupDecl(XSModelGroupDecl decl) {
- return Boolean.FALSE;
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSTermFunction#modelGroup(com.sun.xml.internal.xsom.XSModelGroup)
- */
- public Boolean modelGroup(XSModelGroup group) {
- return Boolean.FALSE;
- }
-
- /**
- * @see com.sun.xml.internal.xsom.visitor.XSTermFunction#elementDecl(com.sun.xml.internal.xsom.XSElementDecl)
- */
- public Boolean elementDecl(XSElementDecl decl) {
- return Boolean.FALSE;
- }
-
- public Boolean identityConstraint(XSIdentityConstraint decl) {
- return Boolean.FALSE;
- }
-
- public Boolean xpath(XSXPath xpath) {
- return Boolean.FALSE;
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/XSFunctionFilter.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/XSFunctionFilter.java
deleted file mode 100644
index 8f32455a..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/util/XSFunctionFilter.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.util;
-
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSSimpleType;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.visitor.XSFunction;
-
-/**
- * Filter implementation of XSFilter.
- * This class forwards all the method calls to another XSFunction.
- *
- * <p>
- * This class is intended to be derived by client application
- * to add some meaningful behavior.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class XSFunctionFilter<T> implements XSFunction<T> {
-
- /** This object will receive all forwarded calls. */
- protected XSFunction<T> core;
-
- public XSFunctionFilter( XSFunction<T> _core ) {
- this.core = _core;
- }
-
- public XSFunctionFilter() {}
-
- public T annotation(XSAnnotation ann) {
- return core.annotation(ann);
- }
-
- public T attGroupDecl(XSAttGroupDecl decl) {
- return core.attGroupDecl(decl);
- }
-
- public T attributeDecl(XSAttributeDecl decl) {
- return core.attributeDecl(decl);
- }
-
- public T attributeUse(XSAttributeUse use) {
- return core.attributeUse(use);
- }
-
- public T complexType(XSComplexType type) {
- return core.complexType(type);
- }
-
- public T schema(XSSchema schema) {
- return core.schema(schema);
- }
-
- public T facet(XSFacet facet) {
- return core.facet(facet);
- }
-
- public T notation(XSNotation notation) {
- return core.notation(notation);
- }
-
- public T simpleType(XSSimpleType simpleType) {
- return core.simpleType(simpleType);
- }
-
- public T particle(XSParticle particle) {
- return core.particle(particle);
- }
-
- public T empty(XSContentType empty) {
- return core.empty(empty);
- }
-
- public T wildcard(XSWildcard wc) {
- return core.wildcard(wc);
- }
-
- public T modelGroupDecl(XSModelGroupDecl decl) {
- return core.modelGroupDecl(decl);
- }
-
- public T modelGroup(XSModelGroup group) {
- return core.modelGroup(group);
- }
-
- public T elementDecl(XSElementDecl decl) {
- return core.elementDecl(decl);
- }
-
- public T identityConstraint(XSIdentityConstraint decl) {
- return core.identityConstraint(decl);
- }
-
- public T xpath(XSXPath xpath) {
- return core.xpath(xpath);
- }
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSContentTypeFunction.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSContentTypeFunction.java
deleted file mode 100644
index c7704489..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSContentTypeFunction.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.visitor;
-
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSimpleType;
-
-/**
- * Function object that works on {@link XSContentType}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSContentTypeFunction<T> {
- T simpleType( XSSimpleType simpleType );
- T particle( XSParticle particle );
- T empty( XSContentType empty );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSContentTypeVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSContentTypeVisitor.java
deleted file mode 100644
index 7ab27014..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSContentTypeVisitor.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.visitor;
-
-import com.sun.xml.internal.xsom.XSContentType;
-import com.sun.xml.internal.xsom.XSParticle;
-import com.sun.xml.internal.xsom.XSSimpleType;
-
-/**
- * Visitor that works on {@link XSContentType}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSContentTypeVisitor {
- void simpleType( XSSimpleType simpleType );
- void particle( XSParticle particle );
- void empty( XSContentType empty );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSFunction.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSFunction.java
deleted file mode 100644
index ba26ea8e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSFunction.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.visitor;
-
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.impl.IdentityConstraintImpl;
-import com.sun.xml.internal.xsom.impl.XPathImpl;
-
-/**
- * Function object that works on the entire XML Schema components.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSFunction<T> extends XSContentTypeFunction<T>, XSTermFunction<T> {
-
- T annotation( XSAnnotation ann );
- T attGroupDecl( XSAttGroupDecl decl );
- T attributeDecl( XSAttributeDecl decl );
- T attributeUse( XSAttributeUse use );
- T complexType( XSComplexType type );
- T schema( XSSchema schema );
-// T schemaSet( XSSchemaSet schema );
- T facet( XSFacet facet );
- T notation( XSNotation notation );
- T identityConstraint(XSIdentityConstraint decl);
- T xpath(XSXPath xpath);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSSimpleTypeFunction.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSSimpleTypeFunction.java
deleted file mode 100644
index 215bb3db..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSSimpleTypeFunction.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.visitor;
-
-import com.sun.xml.internal.xsom.XSListSimpleType;
-import com.sun.xml.internal.xsom.XSRestrictionSimpleType;
-import com.sun.xml.internal.xsom.XSUnionSimpleType;
-
-/**
- * Function object that works on {@link com.sun.xml.internal.xsom.XSSimpleType}
- * and its derived interfaces.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke,kawaguchi@sun.com)
- */
-public interface XSSimpleTypeFunction<T> {
- T listSimpleType( XSListSimpleType type );
- T unionSimpleType( XSUnionSimpleType type );
- T restrictionSimpleType( XSRestrictionSimpleType type );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSSimpleTypeVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSSimpleTypeVisitor.java
deleted file mode 100644
index 97f36b93..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSSimpleTypeVisitor.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.visitor;
-
-import com.sun.xml.internal.xsom.XSListSimpleType;
-import com.sun.xml.internal.xsom.XSRestrictionSimpleType;
-import com.sun.xml.internal.xsom.XSUnionSimpleType;
-
-/**
- * Visitor that works on {@link com.sun.xml.internal.xsom.XSSimpleType}
- * and its derived interfaces.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke,kawaguchi@sun.com)
- */
-public interface XSSimpleTypeVisitor {
- void listSimpleType( XSListSimpleType type );
- void unionSimpleType( XSUnionSimpleType type );
- void restrictionSimpleType( XSRestrictionSimpleType type );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSTermFunction.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSTermFunction.java
deleted file mode 100644
index cbf83e38..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSTermFunction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.visitor;
-
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSTerm;
-
-/**
- * Function object that works on {@link XSTerm}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSTermFunction<T> {
- T wildcard( XSWildcard wc );
- T modelGroupDecl( XSModelGroupDecl decl );
- T modelGroup( XSModelGroup group );
- T elementDecl( XSElementDecl decl );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSTermFunctionWithParam.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSTermFunctionWithParam.java
deleted file mode 100644
index 5fcf06fb..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSTermFunctionWithParam.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.visitor;
-
-import com.sun.xml.internal.xsom.XSWildcard;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSTerm;
-
-/**
- * Function object that works on {@link XSTerm}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSTermFunctionWithParam<T,P> {
- T wildcard( XSWildcard wc, P param );
- T modelGroupDecl( XSModelGroupDecl decl, P param );
- T modelGroup( XSModelGroup group, P param );
- T elementDecl( XSElementDecl decl, P param );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSTermVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSTermVisitor.java
deleted file mode 100644
index 4ef6991e..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSTermVisitor.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.visitor;
-
-import com.sun.xml.internal.xsom.XSElementDecl;
-import com.sun.xml.internal.xsom.XSModelGroup;
-import com.sun.xml.internal.xsom.XSModelGroupDecl;
-import com.sun.xml.internal.xsom.XSWildcard;
-
-/**
- * Visitor that works on {@link com.sun.xml.internal.xsom.XSTerm}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSTermVisitor {
- void wildcard( XSWildcard wc );
- void modelGroupDecl( XSModelGroupDecl decl );
- void modelGroup( XSModelGroup group );
- void elementDecl( XSElementDecl decl );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSVisitor.java
deleted file mode 100644
index 362eb5c0..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSVisitor.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.visitor;
-
-import com.sun.xml.internal.xsom.XSAnnotation;
-import com.sun.xml.internal.xsom.XSAttGroupDecl;
-import com.sun.xml.internal.xsom.XSAttributeDecl;
-import com.sun.xml.internal.xsom.XSAttributeUse;
-import com.sun.xml.internal.xsom.XSComplexType;
-import com.sun.xml.internal.xsom.XSFacet;
-import com.sun.xml.internal.xsom.XSNotation;
-import com.sun.xml.internal.xsom.XSSchema;
-import com.sun.xml.internal.xsom.XSIdentityConstraint;
-import com.sun.xml.internal.xsom.XSXPath;
-import com.sun.xml.internal.xsom.impl.IdentityConstraintImpl;
-import com.sun.xml.internal.xsom.impl.XPathImpl;
-
-/**
- * Visitor for {@link com.sun.xml.internal.xsom.XSComponent}
- */
-public interface XSVisitor extends XSTermVisitor, XSContentTypeVisitor {
- void annotation( XSAnnotation ann );
- void attGroupDecl( XSAttGroupDecl decl );
- void attributeDecl( XSAttributeDecl decl );
- void attributeUse( XSAttributeUse use );
- void complexType( XSComplexType type );
- void schema( XSSchema schema );
-// void schemaSet( XSSchemaSet schema );
- void facet( XSFacet facet );
- void notation( XSNotation notation );
- void identityConstraint( XSIdentityConstraint decl);
- void xpath(XSXPath xp);
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSWildcardFunction.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSWildcardFunction.java
deleted file mode 100644
index 36a11ea6..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSWildcardFunction.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.visitor;
-
-import com.sun.xml.internal.xsom.XSWildcard;
-
-/**
- * Visits three kinds of {@link XSWildcard}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSWildcardFunction<T> {
- T any( XSWildcard.Any wc );
- T other( XSWildcard.Other wc );
- T union( XSWildcard.Union wc );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSWildcardVisitor.java b/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSWildcardVisitor.java
deleted file mode 100644
index c7dd4c99..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/XSWildcardVisitor.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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.xsom.visitor;
-
-import com.sun.xml.internal.xsom.XSWildcard;
-
-/**
- * Visits three kinds of {@link XSWildcard}.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public interface XSWildcardVisitor {
- void any( XSWildcard.Any wc );
- void other( XSWildcard.Other wc );
- void union( XSWildcard.Union wc );
-}
diff --git a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/package.html b/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/package.html
deleted file mode 100644
index 403b1e5b..00000000
--- a/src/share/jaxws_classes/com/sun/xml/internal/xsom/visitor/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html><body>
-
-
-Visitor pattern support for the <code>com.sun.xml.internal.xsom</code> interfaces.
-</body></html>
diff --git a/src/share/jaxws_classes/javax/annotation/Generated.java b/src/share/jaxws_classes/javax/annotation/Generated.java
deleted file mode 100644
index f9d34e4a..00000000
--- a/src/share/jaxws_classes/javax/annotation/Generated.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.annotation;
-import java.lang.annotation.*;
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * The Generated annotation is used to mark source code that has been generated.
- * It can also be used to differentiate user written code from generated code
- * in a single file. When used, the value element must have the name of the
- * code generator. The recommended convention is to use the fully qualified
- * name of the code generator in the value field .
- * <p>For example: com.company.package.classname.
- * The date element is used to indicate the date the source was generated.
- * The date element must follow the ISO 8601 standard. For example the date
- * element would have the following value 2001-07-04T12:08:56.235-0700
- * which represents 2001-07-04 12:08:56 local time in the U.S. Pacific
- * Time time zone.</p>
- * <p>The comment element is a place holder for any comments that the code
- * generator may want to include in the generated code.</p>
- *
- * @since Common Annotations 1.0
- */
-
-@Documented
-@Retention(SOURCE)
-@Target({PACKAGE, TYPE, ANNOTATION_TYPE, METHOD, CONSTRUCTOR, FIELD,
- LOCAL_VARIABLE, PARAMETER})
-public @interface Generated {
- /**
- * The value element MUST have the name of the code generator.
- * The recommended convention is to use the fully qualified name of the
- * code generator. For example: com.acme.generator.CodeGen.
- */
- String[] value();
-
- /**
- * Date when the source was generated.
- */
- String date() default "";
-
- /**
- * A place holder for any comments that the code generator may want to
- * include in the generated code.
- */
- String comments() default "";
-}
diff --git a/src/share/jaxws_classes/javax/annotation/PostConstruct.java b/src/share/jaxws_classes/javax/annotation/PostConstruct.java
deleted file mode 100644
index 4f2976ca..00000000
--- a/src/share/jaxws_classes/javax/annotation/PostConstruct.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.annotation;
-
-import java.lang.annotation.*;
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * The PostConstruct annotation is used on a method that needs to be executed
- * after dependency injection is done to perform any initialization. This
- * method MUST be invoked before the class is put into service. This
- * annotation MUST be supported on all classes that support dependency
- * injection. The method annotated with PostConstruct MUST be invoked even
- * if the class does not request any resources to be injected. Only one
- * method can be annotated with this annotation. The method on which the
- * PostConstruct annotation is applied MUST fulfill all of the following
- * criteria:
- * <p>
- * <ul>
- * <li>The method MUST NOT have any parameters except in the case of
- * interceptors in which case it takes an InvocationContext object as
- * defined by the Interceptors specification.</li>
- * <li>The method defined on an interceptor class MUST HAVE one of the
- * following signatures:
- * <p>
- * void &#060;METHOD&#062;(InvocationContext)
- * <p>
- * Object &#060;METHOD&#062;(InvocationContext) throws Exception
- * <p>
- * <i>Note: A PostConstruct interceptor method must not throw application
- * exceptions, but it may be declared to throw checked exceptions including
- * the java.lang.Exception if the same interceptor method interposes on
- * business or timeout methods in addition to lifecycle events. If a
- * PostConstruct interceptor method returns a value, it is ignored by
- * the container.</i>
- * </li>
- * <li>The method defined on a non-interceptor class MUST HAVE the
- * following signature:
- * <p>
- * void &#060;METHOD&#062;()
- * </li>
- * <li>The method on which PostConstruct is applied MAY be public, protected,
- * package private or private.</li>
- * <li>The method MUST NOT be static except for the application client.</li>
- * <li>The method MAY be final.</li>
- * <li>If the method throws an unchecked exception the class MUST NOT be put into
- * service except in the case of EJBs where the EJB can handle exceptions and
- * even recover from them.</li></ul>
- * @since Common Annotations 1.0
- * @see javax.annotation.PreDestroy
- * @see javax.annotation.Resource
- */
-@Documented
-@Retention (RUNTIME)
-@Target(METHOD)
-public @interface PostConstruct {
-}
diff --git a/src/share/jaxws_classes/javax/annotation/PreDestroy.java b/src/share/jaxws_classes/javax/annotation/PreDestroy.java
deleted file mode 100644
index d24cd3f7..00000000
--- a/src/share/jaxws_classes/javax/annotation/PreDestroy.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.annotation;
-
-import java.lang.annotation.*;
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * The PreDestroy annotation is used on methods as a callback notification to
- * signal that the instance is in the process of being removed by the
- * container. The method annotated with PreDestroy is typically used to
- * release resources that it has been holding. This annotation MUST be
- * supported by all container managed objects that support PostConstruct
- * except the application client container in Java EE 5. The method on which
- * the PreDestroy annotation is applied MUST fulfill all of the following
- * criteria:
- * <p>
- * <ul>
- * <li>The method MUST NOT have any parameters except in the case of
- * interceptors in which case it takes an InvocationContext object as
- * defined by the Interceptors specification.</li>
- * <li>The method defined on an interceptor class MUST HAVE one of the
- * following signatures:
- * <p>
- * void &#060;METHOD&#062;(InvocationContext)
- * <p>
- * Object &#060;METHOD&#062;(InvocationContext) throws Exception
- * <p>
- * <i>Note: A PreDestroy interceptor method must not throw application
- * exceptions, but it may be declared to throw checked exceptions including
- * the java.lang.Exception if the same interceptor method interposes on
- * business or timeout methods in addition to lifecycle events. If a
- * PreDestroy interceptor method returns a value, it is ignored by
- * the container.</i>
- * </li>
- * <li>The method defined on a non-interceptor class MUST HAVE the
- * following signature:
- * <p>
- * void &#060;METHOD&#062;()
- * </li>
- * <li>The method on which PreDestroy is applied MAY be public, protected,
- * package private or private.</li>
- * <li>The method MUST NOT be static.</li>
- * <li>The method MAY be final.</li>
- * <li>If the method throws an unchecked exception it is ignored except in the
- * case of EJBs where the EJB can handle exceptions.</li>
- * </ul>
- *
- * @see javax.annotation.PostConstruct
- * @see javax.annotation.Resource
- * @since Common Annotations 1.0
- */
-
-@Documented
-@Retention (RUNTIME)
-@Target(METHOD)
-public @interface PreDestroy {
-}
diff --git a/src/share/jaxws_classes/javax/annotation/Resource.java b/src/share/jaxws_classes/javax/annotation/Resource.java
deleted file mode 100644
index 3b8963bc..00000000
--- a/src/share/jaxws_classes/javax/annotation/Resource.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.annotation;
-
-import java.lang.annotation.*;
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * The Resource annotation marks a resource that is needed
- * by the application. This annotation may be applied to an
- * application component class, or to fields or methods of the
- * component class. When the annotation is applied to a
- * field or method, the container will inject an instance
- * of the requested resource into the application component
- * when the component is initialized. If the annotation is
- * applied to the component class, the annotation declares a
- * resource that the application will look up at runtime. <p>
- *
- * Even though this annotation is not marked Inherited, deployment
- * tools are required to examine all superclasses of any component
- * class to discover all uses of this annotation in all superclasses.
- * All such annotation instances specify resources that are needed
- * by the application component. Note that this annotation may
- * appear on private fields and methods of superclasses; the container
- * is required to perform injection in these cases as well.
- *
- * @since Common Annotations 1.0
- */
-@Target({TYPE, FIELD, METHOD})
-@Retention(RUNTIME)
-public @interface Resource {
- /**
- * The JNDI name of the resource. For field annotations,
- * the default is the field name. For method annotations,
- * the default is the JavaBeans property name corresponding
- * to the method. For class annotations, there is no default
- * and this must be specified.
- */
- String name() default "";
-
- /**
- * The name of the resource that the reference points to. It can
- * link to any compatible resource using the global JNDI names.
- *
- * @since Common Annotations 1.1
- */
-
- String lookup() default "";
-
- /**
- * The Java type of the resource. For field annotations,
- * the default is the type of the field. For method annotations,
- * the default is the type of the JavaBeans property.
- * For class annotations, there is no default and this must be
- * specified.
- */
- Class<?> type() default java.lang.Object.class;
-
- /**
- * The two possible authentication types for a resource.
- */
- enum AuthenticationType {
- CONTAINER,
- APPLICATION
- }
-
- /**
- * The authentication type to use for this resource.
- * This may be specified for resources representing a
- * connection factory of any supported type, and must
- * not be specified for resources of other types.
- */
- AuthenticationType authenticationType() default AuthenticationType.CONTAINER;
-
- /**
- * Indicates whether this resource can be shared between
- * this component and other components.
- * This may be specified for resources representing a
- * connection factory of any supported type, and must
- * not be specified for resources of other types.
- */
- boolean shareable() default true;
-
- /**
- * A product specific name that this resource should be mapped to.
- * The name of this resource, as defined by the <code>name</code>
- * element or defaulted, is a name that is local to the application
- * component using the resource. (It's a name in the JNDI
- * <code>java:comp/env</code> namespace.) Many application servers
- * provide a way to map these local names to names of resources
- * known to the application server. This mapped name is often a
- * <i>global</i> JNDI name, but may be a name of any form. <p>
- *
- * Application servers are not required to support any particular
- * form or type of mapped name, nor the ability to use mapped names.
- * The mapped name is product-dependent and often installation-dependent.
- * No use of a mapped name is portable.
- */
- String mappedName() default "";
-
- /**
- * Description of this resource. The description is expected
- * to be in the default language of the system on which the
- * application is deployed. The description can be presented
- * to the Deployer to help in choosing the correct resource.
- */
- String description() default "";
-}
diff --git a/src/share/jaxws_classes/javax/annotation/Resources.java b/src/share/jaxws_classes/javax/annotation/Resources.java
deleted file mode 100644
index 192cbe5c..00000000
--- a/src/share/jaxws_classes/javax/annotation/Resources.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.annotation;
-import java.lang.annotation.*;
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * This class is used to allow multiple resources declarations.
- *
- * @see javax.annotation.Resource
- * @since Common Annotations 1.0
- */
-
-@Documented
-@Retention(RUNTIME)
-@Target(TYPE)
-public @interface Resources {
- /**
- * Array used for multiple resource declarations.
- */
- Resource[] value();
-}
diff --git a/src/share/jaxws_classes/javax/jws/HandlerChain.java b/src/share/jaxws_classes/javax/jws/HandlerChain.java
deleted file mode 100644
index 536f40e7..00000000
--- a/src/share/jaxws_classes/javax/jws/HandlerChain.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.jws;
-
-import java.lang.annotation.*;
-import static java.lang.annotation.ElementType.*;
-
-@Retention(value=RetentionPolicy.RUNTIME)
-@Target({TYPE, METHOD, FIELD})
-public @interface HandlerChain {
- String file();
- @Deprecated String name() default "";
-}
diff --git a/src/share/jaxws_classes/javax/jws/Oneway.java b/src/share/jaxws_classes/javax/jws/Oneway.java
deleted file mode 100644
index 332d859b..00000000
--- a/src/share/jaxws_classes/javax/jws/Oneway.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.jws;
-import java.lang.annotation.*;
-import static java.lang.annotation.ElementType.*;
-
-@Retention(value=RetentionPolicy.RUNTIME)
-@Target({METHOD})
-public @interface Oneway {
-}
diff --git a/src/share/jaxws_classes/javax/jws/WebMethod.java b/src/share/jaxws_classes/javax/jws/WebMethod.java
deleted file mode 100644
index 01bf9fd4..00000000
--- a/src/share/jaxws_classes/javax/jws/WebMethod.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.jws;
-import java.lang.annotation.*;
-import static java.lang.annotation.ElementType.*;
-
-@Retention(value=RetentionPolicy.RUNTIME)
-@Target({METHOD})
-public @interface WebMethod {
- String operationName() default "";
- String action() default "";
- boolean exclude() default false;
-}
diff --git a/src/share/jaxws_classes/javax/jws/WebParam.java b/src/share/jaxws_classes/javax/jws/WebParam.java
deleted file mode 100644
index c328d109..00000000
--- a/src/share/jaxws_classes/javax/jws/WebParam.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.jws;
-import java.lang.annotation.*;
-import static java.lang.annotation.ElementType.*;
-
-@Retention(value=RetentionPolicy.RUNTIME)
-@Target({PARAMETER})
-public @interface WebParam {
-
- public enum Mode {
- IN,
- OUT,
- INOUT
- };
-
- String name() default "";
- String partName() default "";
- String targetNamespace() default "";
- Mode mode() default Mode.IN;
- boolean header() default false;
-}
diff --git a/src/share/jaxws_classes/javax/jws/WebResult.java b/src/share/jaxws_classes/javax/jws/WebResult.java
deleted file mode 100644
index f52ce6a8..00000000
--- a/src/share/jaxws_classes/javax/jws/WebResult.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.jws;
-import java.lang.annotation.*;
-import static java.lang.annotation.ElementType.*;
-
-@Retention(value=RetentionPolicy.RUNTIME)
-@Target({METHOD})
-public @interface WebResult {
-
- String name() default "";
- String partName() default "";
- String targetNamespace() default "";
- boolean header() default false;
-}
diff --git a/src/share/jaxws_classes/javax/jws/WebService.java b/src/share/jaxws_classes/javax/jws/WebService.java
deleted file mode 100644
index 044373de..00000000
--- a/src/share/jaxws_classes/javax/jws/WebService.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.jws;
-import java.lang.annotation.*;
-import static java.lang.annotation.ElementType.*;
-
-@Retention(value=RetentionPolicy.RUNTIME)
-@Target({TYPE})
-public @interface WebService {
- String name() default "";
- String targetNamespace() default "";
- String serviceName() default "";
- String portName() default "";
- String wsdlLocation() default "";
- String endpointInterface() default "";
-}
diff --git a/src/share/jaxws_classes/javax/jws/soap/InitParam.java b/src/share/jaxws_classes/javax/jws/soap/InitParam.java
deleted file mode 100644
index 4883ffd9..00000000
--- a/src/share/jaxws_classes/javax/jws/soap/InitParam.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.jws.soap;
-
-/*
- * @Deprecated
- */
-@Deprecated public @interface InitParam {
- String name();
- String value();
-}
diff --git a/src/share/jaxws_classes/javax/jws/soap/SOAPBinding.java b/src/share/jaxws_classes/javax/jws/soap/SOAPBinding.java
deleted file mode 100644
index b4a3c207..00000000
--- a/src/share/jaxws_classes/javax/jws/soap/SOAPBinding.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.jws.soap;
-import java.lang.annotation.*;
-import static java.lang.annotation.ElementType.*;
-
-@Retention(value=RetentionPolicy.RUNTIME)
-@Target({TYPE,METHOD})
-public @interface SOAPBinding {
-
- public enum Style {
- DOCUMENT,
- RPC
- };
-
- public enum Use {
- LITERAL,
- ENCODED
- };
-
- public enum ParameterStyle {
- BARE,
- WRAPPED
- };
-
- Style style() default Style.DOCUMENT;
- Use use() default Use.LITERAL;
- ParameterStyle parameterStyle() default ParameterStyle.WRAPPED;
-}
diff --git a/src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandler.java b/src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandler.java
deleted file mode 100644
index 426b7926..00000000
--- a/src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandler.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.jws.soap;
-
-/*
- * @Deprecated
- */
-@Deprecated public @interface SOAPMessageHandler {
- String name() default "";
- String className();
- InitParam[] initParams() default {};
- String[] roles() default {};
- String[] headers() default {};
-}
diff --git a/src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandlers.java b/src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandlers.java
deleted file mode 100644
index 659987e7..00000000
--- a/src/share/jaxws_classes/javax/jws/soap/SOAPMessageHandlers.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.jws.soap;
-import java.lang.annotation.*;
-import static java.lang.annotation.ElementType.*;
-
-/*
- * @Deprecated
- */
-@Retention(value=RetentionPolicy.RUNTIME)
-@Target({TYPE})
-@Deprecated public @interface SOAPMessageHandlers {
- SOAPMessageHandler[] value();
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/Binder.java b/src/share/jaxws_classes/javax/xml/bind/Binder.java
deleted file mode 100644
index a243aaaa..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/Binder.java
+++ /dev/null
@@ -1,421 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import org.w3c.dom.Node;
-
-import javax.xml.validation.Schema;
-
-/**
- * Enable synchronization between XML infoset nodes and JAXB objects
- * representing same XML document.
- *
- * <p>
- * An instance of this class maintains the association between XML nodes of
- * an infoset preserving view and a JAXB representation of an XML document.
- * Navigation between the two views is provided by the methods
- * {@link #getXMLNode(Object)} and {@link #getJAXBNode(Object)}.
- *
- * <p>
- * Modifications can be made to either the infoset preserving view or the
- * JAXB representation of the document while the other view remains
- * unmodified. The binder is able to synchronize the changes made in the
- * modified view back into the other view using the appropriate
- * Binder update methods, {@link #updateXML(Object, Object)} or
- * {@link #updateJAXB(Object)}.
- *
- * <p>
- * A typical usage scenario is the following:
- * <ul>
- * <li>load XML document into an XML infoset representation</li>
- * <li>{@link #unmarshal(Object)} XML infoset view to JAXB view.
- * (Note to conserve resources, it is possible to only unmarshal a
- * subtree of the XML infoset view to the JAXB view.)</li>
- * <li>application access/updates JAXB view of XML document.</li>
- * <li>{@link #updateXML(Object)} synchronizes modifications to JAXB view
- * back into the XML infoset view. Update operation preserves as
- * much of original XML infoset as possible (i.e. comments, PI, ...)</li>
- * </ul>
- *
- * <p>
- * A Binder instance is created using the factory method
- * {@link JAXBContext#createBinder()} or {@link JAXBContext#createBinder(Class)}.
- *
- * <p>
- * The template parameter, <code>XmlNode</code>, is the
- * root interface/class for the XML infoset preserving representation.
- * A Binder implementation is required to minimally support
- * an <code>XmlNode</code> value of <code>org.w3c.dom.Node.class</code>.
- * A Binder implementation can support alternative XML infoset
- * preserving representations.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- * Joseph Fialli
- *
- * @since JAXB 2.0
- */
-public abstract class Binder<XmlNode> {
- /**
- * Unmarshal XML infoset view to a JAXB object tree.
- *
- * <p>
- * This method is similar to {@link Unmarshaller#unmarshal(Node)}
- * with the addition of maintaining the association between XML nodes
- * and the produced JAXB objects, enabling future update operations,
- * {@link #updateXML(Object, Object)} or {@link #updateJAXB(Object)}.
- *
- * <p>
- * When {@link #getSchema()} is non-null, <code>xmlNode</code>
- * and its descendants is validated during this operation.
- *
- * <p>
- * This method throws {@link UnmarshalException} when the Binder's
- * {@link JAXBContext} does not have a mapping for the XML element name
- * or the type, specifiable via <tt>@xsi:type</tt>, of <tt>xmlNode</tt>
- * to a JAXB mapped class. The method {@link #unmarshal(Object, Class)}
- * enables an application to specify the JAXB mapped class that
- * the <tt>xmlNode</tt> should be mapped to.
- *
- * @param xmlNode
- * the document/element to unmarshal XML data from.
- *
- * @return
- * the newly created root object of the JAXB object tree.
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Binder</tt> is unable to perform the XML to Java
- * binding.
- * @throws IllegalArgumentException
- * If the node parameter is null
- */
- public abstract Object unmarshal( XmlNode xmlNode ) throws JAXBException;
-
- /**
- * Unmarshal XML root element by provided <tt>declaredType</tt>
- * to a JAXB object tree.
- *
- * <p>
- * Implements <a href="Unmarshaller.html#unmarshalByDeclaredType">Unmarshal by Declared Type</a>
- *
- * <p>
- * This method is similar to {@link Unmarshaller#unmarshal(Node, Class)}
- * with the addition of maintaining the association between XML nodes
- * and the produced JAXB objects, enabling future update operations,
- * {@link #updateXML(Object, Object)} or {@link #updateJAXB(Object)}.
- *
- * <p>
- * When {@link #getSchema()} is non-null, <code>xmlNode</code>
- * and its descendants is validated during this operation.
- *
- * @param xmlNode
- * the document/element to unmarshal XML data from.
- * @param declaredType
- * appropriate JAXB mapped class to hold <tt>node</tt>'s XML data.
- *
- * @return
- * <a href="JAXBElement.html">JAXB Element</a> representation
- * of <tt>node</tt>
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Binder</tt> is unable to perform the XML to Java
- * binding.
- * @throws IllegalArgumentException
- * If any of the input parameters are null
- * @since JAXB2.0
- */
- public abstract <T> JAXBElement<T>
- unmarshal( XmlNode xmlNode, Class<T> declaredType )
- throws JAXBException;
-
- /**
- * Marshal a JAXB object tree to a new XML document.
- *
- * <p>
- * This method is similar to {@link Marshaller#marshal(Object, Node)}
- * with the addition of maintaining the association between JAXB objects
- * and the produced XML nodes,
- * enabling future update operations such as
- * {@link #updateXML(Object, Object)} or {@link #updateJAXB(Object)}.
- *
- * <p>
- * When {@link #getSchema()} is non-null, the marshalled
- * xml content is validated during this operation.
- *
- * @param jaxbObject
- * The content tree to be marshalled.
- * @param xmlNode
- * The parameter must be a Node that accepts children.
- *
- * @throws JAXBException
- * If any unexpected problem occurs during the marshalling.
- * @throws MarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Binder</tt> is unable to marshal <tt>jaxbObject</tt> (or any
- * object reachable from <tt>jaxbObject</tt>).
- *
- * @throws IllegalArgumentException
- * If any of the method parameters are null
- */
- public abstract void marshal( Object jaxbObject, XmlNode xmlNode ) throws JAXBException;
-
- /**
- * Gets the XML element associated with the given JAXB object.
- *
- * <p>
- * Once a JAXB object tree is associated with an XML fragment,
- * this method enables navigation between the two trees.
- *
- * <p>
- * An association between an XML element and a JAXB object is
- * established by the bind methods and the update methods.
- * Note that this association is partial; not all XML elements
- * have associated JAXB objects, and not all JAXB objects have
- * associated XML elements.
- *
- * @param jaxbObject An instance that is reachable from a prior
- * call to a bind or update method that returned
- * a JAXB object tree.
- *
- * @return
- * null if the specified JAXB object is not known to this
- * {@link Binder}, or if it is not associated with an
- * XML element.
- *
- * @throws IllegalArgumentException
- * If the jaxbObject parameter is null
- */
- public abstract XmlNode getXMLNode( Object jaxbObject );
-
- /**
- * Gets the JAXB object associated with the given XML element.
- *
- * <p>
- * Once a JAXB object tree is associated with an XML fragment,
- * this method enables navigation between the two trees.
- *
- * <p>
- * An association between an XML element and a JAXB object is
- * established by the unmarshal, marshal and update methods.
- * Note that this association is partial; not all XML elements
- * have associated JAXB objects, and not all JAXB objects have
- * associated XML elements.
- *
- * @return
- * null if the specified XML node is not known to this
- * {@link Binder}, or if it is not associated with a
- * JAXB object.
- *
- * @throws IllegalArgumentException
- * If the node parameter is null
- */
- public abstract Object getJAXBNode( XmlNode xmlNode );
-
- /**
- * Takes an JAXB object and updates
- * its associated XML node and its descendants.
- *
- * <p>
- * This is a convenience method of:
- * <pre>
- * updateXML( jaxbObject, getXMLNode(jaxbObject));
- * </pre>
- *
- * @throws JAXBException
- * If any unexpected problem occurs updating corresponding XML content.
- * @throws IllegalArgumentException
- * If the jaxbObject parameter is null
- */
- public abstract XmlNode updateXML( Object jaxbObject ) throws JAXBException;
-
- /**
- * Changes in JAXB object tree are updated in its associated XML parse tree.
- *
- * <p>
- * This operation can be thought of as an "in-place" marshalling.
- * The difference is that instead of creating a whole new XML tree,
- * this operation updates an existing tree while trying to preserve
- * the XML as much as possible.
- *
- * <p>
- * For example, unknown elements/attributes in XML that were not bound
- * to JAXB will be left untouched (whereas a marshalling operation
- * would create a new tree that doesn't contain any of those.)
- *
- * <p>
- * As a side-effect, this operation updates the association between
- * XML nodes and JAXB objects.
- *
- * @param jaxbObject root of potentially modified JAXB object tree
- * @param xmlNode root of update target XML parse tree
- *
- * @return
- * Returns the updated XML node. Typically, this is the same
- * node you passed in as <i>xmlNode</i>, but it maybe
- * a different object, for example when the tag name of the object
- * has changed.
- *
- * @throws JAXBException
- * If any unexpected problem occurs updating corresponding XML content.
- * @throws IllegalArgumentException
- * If any of the input parameters are null
- */
- public abstract XmlNode updateXML( Object jaxbObject, XmlNode xmlNode ) throws JAXBException;
-
- /**
- * Takes an XML node and updates its associated JAXB object and its descendants.
- *
- * <p>
- * This operation can be thought of as an "in-place" unmarshalling.
- * The difference is that instead of creating a whole new JAXB tree,
- * this operation updates an existing tree, reusing as much JAXB objects
- * as possible.
- *
- * <p>
- * As a side-effect, this operation updates the association between
- * XML nodes and JAXB objects.
- *
- * @return
- * Returns the updated JAXB object. Typically, this is the same
- * object that was returned from earlier
- * {@link #marshal(Object,Object)} or
- * {@link #updateJAXB(Object)} method invocation,
- * but it maybe
- * a different object, for example when the name of the XML
- * element has changed.
- *
- * @throws JAXBException
- * If any unexpected problem occurs updating corresponding JAXB mapped content.
- * @throws IllegalArgumentException
- * If node parameter is null
- */
- public abstract Object updateJAXB( XmlNode xmlNode ) throws JAXBException;
-
-
- /**
- * Specifies whether marshal, unmarshal and update methods
- * performs validation on their XML content.
- *
- * @param schema set to null to disable validation.
- *
- * @see Unmarshaller#setSchema(Schema)
- */
- public abstract void setSchema( Schema schema );
-
- /**
- * Gets the last {@link Schema} object (including null) set by the
- * {@link #setSchema(Schema)} method.
- *
- * @return the Schema object for validation or null if not present
- */
- public abstract Schema getSchema();
-
- /**
- * Allow an application to register a <tt>ValidationEventHandler</tt>.
- * <p>
- * The <tt>ValidationEventHandler</tt> will be called by the JAXB Provider
- * if any validation errors are encountered during calls to any of the
- * Binder unmarshal, marshal and update methods.
- *
- * <p>
- * Calling this method with a null parameter will cause the Binder
- * to revert back to the default default event handler.
- *
- * @param handler the validation event handler
- * @throws JAXBException if an error was encountered while setting the
- * event handler
- */
- public abstract void setEventHandler( ValidationEventHandler handler ) throws JAXBException;
-
- /**
- * Return the current event handler or the default event handler if one
- * hasn't been set.
- *
- * @return the current ValidationEventHandler or the default event handler
- * if it hasn't been set
- * @throws JAXBException if an error was encountered while getting the
- * current event handler
- */
- public abstract ValidationEventHandler getEventHandler() throws JAXBException;
-
- /**
- *
- * Set the particular property in the underlying implementation of
- * <tt>Binder</tt>. This method can only be used to set one of
- * the standard JAXB defined unmarshal/marshal properties
- * or a provider specific property for binder, unmarshal or marshal.
- * Attempting to set an undefined property will result in
- * a PropertyException being thrown. See
- * <a href="Unmarshaller.html#supportedProps">Supported Unmarshal Properties</a>
- * and
- * <a href="Marshaller.html#supportedProps">Supported Marshal Properties</a>.
- *
- * @param name the name of the property to be set. This value can either
- * be specified using one of the constant fields or a user
- * supplied string.
- * @param value the value of the property to be set
- *
- * @throws PropertyException when there is an error processing the given
- * property or value
- * @throws IllegalArgumentException
- * If the name parameter is null
- */
- abstract public void setProperty( String name, Object value ) throws PropertyException;
-
-
- /**
- * Get the particular property in the underlying implementation of
- * <tt>Binder</tt>. This method can only
- * be used to get one of
- * the standard JAXB defined unmarshal/marshal properties
- * or a provider specific property for binder, unmarshal or marshal.
- * Attempting to get an undefined property will result in
- * a PropertyException being thrown. See
- * <a href="Unmarshaller.html#supportedProps">Supported Unmarshal Properties</a>
- * and
- * <a href="Marshaller.html#supportedProps">Supported Marshal Properties</a>.
- *
- * @param name the name of the property to retrieve
- * @return the value of the requested property
- *
- * @throws PropertyException
- * when there is an error retrieving the given property or value
- * property name
- * @throws IllegalArgumentException
- * If the name parameter is null
- */
- abstract public Object getProperty( String name ) throws PropertyException;
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/ContextFinder.java b/src/share/jaxws_classes/javax/xml/bind/ContextFinder.java
deleted file mode 100644
index 78dd65de..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/ContextFinder.java
+++ /dev/null
@@ -1,629 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import java.util.Iterator;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.util.Map;
-import java.util.Properties;
-import java.util.StringTokenizer;
-import java.util.logging.ConsoleHandler;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.security.AccessController;
-
-import static javax.xml.bind.JAXBContext.JAXB_CONTEXT_FACTORY;
-
-
-/**
- * This class is package private and therefore is not exposed as part of the
- * JAXB API.
- *
- * This code is designed to implement the JAXB 1.0 spec pluggability feature
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
- * @see JAXBContext
- */
-class ContextFinder {
- private static final Logger logger;
- static {
- logger = Logger.getLogger("javax.xml.bind");
- try {
- if (AccessController.doPrivileged(new GetPropertyAction("jaxb.debug")) != null) {
- // disconnect the logger from a bigger framework (if any)
- // and take the matters into our own hands
- logger.setUseParentHandlers(false);
- logger.setLevel(Level.ALL);
- ConsoleHandler handler = new ConsoleHandler();
- handler.setLevel(Level.ALL);
- logger.addHandler(handler);
- } else {
- // don't change the setting of this logger
- // to honor what other frameworks
- // have done on configurations.
- }
- } catch(Throwable t) {
- // just to be extra safe. in particular System.getProperty may throw
- // SecurityException.
- }
- }
-
- /**
- * If the {@link InvocationTargetException} wraps an exception that shouldn't be wrapped,
- * throw the wrapped exception.
- */
- private static void handleInvocationTargetException(InvocationTargetException x) throws JAXBException {
- Throwable t = x.getTargetException();
- if( t != null ) {
- if( t instanceof JAXBException )
- // one of our exceptions, just re-throw
- throw (JAXBException)t;
- if( t instanceof RuntimeException )
- // avoid wrapping exceptions unnecessarily
- throw (RuntimeException)t;
- if( t instanceof Error )
- throw (Error)t;
- }
- }
-
-
- /**
- * Determine if two types (JAXBContext in this case) will generate a ClassCastException.
- *
- * For example, (targetType)originalType
- *
- * @param originalType
- * The Class object of the type being cast
- * @param targetType
- * The Class object of the type that is being cast to
- * @return JAXBException to be thrown.
- */
- private static JAXBException handleClassCastException(Class originalType, Class targetType) {
- final URL targetTypeURL = which(targetType);
-
- return new JAXBException(Messages.format(Messages.ILLEGAL_CAST,
- // we don't care where the impl class is, we want to know where JAXBContext lives in the impl
- // class' ClassLoader
- getClassClassLoader(originalType).getResource("javax/xml/bind/JAXBContext.class"),
- targetTypeURL));
- }
-
- /**
- * Create an instance of a class using the specified ClassLoader
- */
- static JAXBContext newInstance( String contextPath,
- String className,
- ClassLoader classLoader,
- Map properties )
- throws JAXBException {
- try {
- Class spFactory = safeLoadClass(className,classLoader);
- return newInstance(contextPath, spFactory, classLoader, properties);
- } catch (ClassNotFoundException x) {
- throw new JAXBException(
- Messages.format( Messages.PROVIDER_NOT_FOUND, className ),
- x);
- } catch (RuntimeException x) {
- // avoid wrapping RuntimeException to JAXBException,
- // because it indicates a bug in this code.
- throw x;
- } catch (Exception x) {
- // can't catch JAXBException because the method is hidden behind
- // reflection. Root element collisions detected in the call to
- // createContext() are reported as JAXBExceptions - just re-throw it
- // some other type of exception - just wrap it
- throw new JAXBException(
- Messages.format( Messages.COULD_NOT_INSTANTIATE, className, x ),
- x);
- }
- }
-
- static JAXBContext newInstance( String contextPath,
- Class spFactory,
- ClassLoader classLoader,
- Map properties )
- throws JAXBException
- {
- try {
- /*
- * javax.xml.bind.context.factory points to a class which has a
- * static method called 'createContext' that
- * returns a javax.xml.JAXBContext.
- */
-
- Object context = null;
-
- // first check the method that takes Map as the third parameter.
- // this is added in 2.0.
- try {
- Method m = spFactory.getMethod("createContext",String.class,ClassLoader.class,Map.class);
- // any failure in invoking this method would be considered fatal
- context = m.invoke(null,contextPath,classLoader,properties);
- } catch (NoSuchMethodException e) {
- // it's not an error for the provider not to have this method.
- }
-
- if(context==null) {
- // try the old method that doesn't take properties. compatible with 1.0.
- // it is an error for an implementation not to have both forms of the createContext method.
- Method m = spFactory.getMethod("createContext",String.class,ClassLoader.class);
- // any failure in invoking this method would be considered fatal
- context = m.invoke(null,contextPath,classLoader);
- }
-
- if(!(context instanceof JAXBContext)) {
- // the cast would fail, so generate an exception with a nice message
- throw handleClassCastException(context.getClass(), JAXBContext.class);
- }
- return (JAXBContext)context;
- } catch (InvocationTargetException x) {
- handleInvocationTargetException(x);
- // for other exceptions, wrap the internal target exception
- // with a JAXBException
- Throwable e = x;
- if(x.getTargetException()!=null)
- e = x.getTargetException();
-
- throw new JAXBException( Messages.format( Messages.COULD_NOT_INSTANTIATE, spFactory, e ), e );
- } catch (RuntimeException x) {
- // avoid wrapping RuntimeException to JAXBException,
- // because it indicates a bug in this code.
- throw x;
- } catch (Exception x) {
- // can't catch JAXBException because the method is hidden behind
- // reflection. Root element collisions detected in the call to
- // createContext() are reported as JAXBExceptions - just re-throw it
- // some other type of exception - just wrap it
- throw new JAXBException(
- Messages.format( Messages.COULD_NOT_INSTANTIATE, spFactory, x ),
- x);
- }
- }
-
-
- /**
- * Create an instance of a class using the thread context ClassLoader
- */
- static JAXBContext newInstance(
- Class[] classes,
- Map properties,
- String className) throws JAXBException {
- ClassLoader cl = getContextClassLoader();
- Class spi;
- try {
- spi = safeLoadClass(className,cl);
- } catch (ClassNotFoundException e) {
- throw new JAXBException(e);
- }
-
- if(logger.isLoggable(Level.FINE)) {
- // extra check to avoid costly which operation if not logged
- logger.log(Level.FINE, "loaded {0} from {1}", new Object[]{className, which(spi)});
- }
-
- return newInstance(classes, properties, spi);
- }
-
- static JAXBContext newInstance(Class[] classes,
- Map properties,
- Class spFactory) throws JAXBException {
- Method m;
- try {
- m = spFactory.getMethod("createContext", Class[].class, Map.class);
- } catch (NoSuchMethodException e) {
- throw new JAXBException(e);
- }
- try {
- Object context = m.invoke(null, classes, properties);
- if(!(context instanceof JAXBContext)) {
- // the cast would fail, so generate an exception with a nice message
- throw handleClassCastException(context.getClass(), JAXBContext.class);
- }
- return (JAXBContext)context;
- } catch (IllegalAccessException e) {
- throw new JAXBException(e);
- } catch (InvocationTargetException e) {
- handleInvocationTargetException(e);
-
- Throwable x = e;
- if (e.getTargetException() != null)
- x = e.getTargetException();
-
- throw new JAXBException(x);
- }
- }
-
- static JAXBContext find(String factoryId, String contextPath, ClassLoader classLoader, Map properties ) throws JAXBException {
-
- // TODO: do we want/need another layer of searching in $java.home/lib/jaxb.properties like JAXP?
-
- final String jaxbContextFQCN = JAXBContext.class.getName();
-
- // search context path for jaxb.properties first
- StringBuilder propFileName;
- StringTokenizer packages = new StringTokenizer( contextPath, ":" );
- String factoryClassName;
-
- if(!packages.hasMoreTokens())
- // no context is specified
- throw new JAXBException(Messages.format(Messages.NO_PACKAGE_IN_CONTEXTPATH));
-
-
- logger.fine("Searching jaxb.properties");
-
- while( packages.hasMoreTokens() ) {
- String packageName = packages.nextToken(":").replace('.','/');
- // com.acme.foo - > com/acme/foo/jaxb.properties
- propFileName = new StringBuilder().append(packageName).append("/jaxb.properties");
-
- Properties props = loadJAXBProperties( classLoader, propFileName.toString() );
- if (props != null) {
- if (props.containsKey(factoryId)) {
- factoryClassName = props.getProperty(factoryId);
- return newInstance( contextPath, factoryClassName, classLoader, properties );
- } else {
- throw new JAXBException(Messages.format(Messages.MISSING_PROPERTY, packageName, factoryId));
- }
- }
- }
-
- logger.fine("Searching the system property");
-
- // search for a system property second (javax.xml.bind.JAXBContext)
- factoryClassName = AccessController.doPrivileged(new GetPropertyAction(JAXBContext.JAXB_CONTEXT_FACTORY));
- if( factoryClassName != null ) {
- return newInstance( contextPath, factoryClassName, classLoader, properties );
- } else { // leave this here to assure compatibility
- factoryClassName = AccessController.doPrivileged(new GetPropertyAction(jaxbContextFQCN));
- if( factoryClassName != null ) {
- return newInstance( contextPath, factoryClassName, classLoader, properties );
- }
- }
-
- // OSGi search
- Class jaxbContext = lookupJaxbContextUsingOsgiServiceLoader();
- if (jaxbContext != null) {
- logger.fine("OSGi environment detected");
- return newInstance(contextPath, jaxbContext, classLoader, properties);
- }
-
- logger.fine("Searching META-INF/services");
- // search META-INF services next
- BufferedReader r = null;
- try {
- final StringBuilder resource = new StringBuilder().append("META-INF/services/").append(jaxbContextFQCN);
- final InputStream resourceStream =
- classLoader.getResourceAsStream(resource.toString());
-
- if (resourceStream != null) {
- r = new BufferedReader(new InputStreamReader(resourceStream, "UTF-8"));
- factoryClassName = r.readLine();
- if (factoryClassName != null) {
- factoryClassName = factoryClassName.trim();
- }
- r.close();
- return newInstance(contextPath, factoryClassName, classLoader, properties);
- } else {
- logger.log(Level.FINE, "Unable to load:{0}", resource.toString());
- }
- } catch (UnsupportedEncodingException e) {
- // should never happen
- throw new JAXBException(e);
- } catch (IOException e) {
- throw new JAXBException(e);
- } finally {
- try {
- if (r != null) {
- r.close();
- }
- } catch (IOException ex) {
- Logger.getLogger(ContextFinder.class.getName()).log(Level.SEVERE, null, ex);
- }
- }
-
- // else no provider found
- logger.fine("Trying to create the platform default provider");
- return newInstance(contextPath, PLATFORM_DEFAULT_FACTORY_CLASS, classLoader, properties);
- }
-
- static JAXBContext find( Class[] classes, Map properties ) throws JAXBException {
-
- final String jaxbContextFQCN = JAXBContext.class.getName();
- String factoryClassName;
-
- // search for jaxb.properties in the class loader of each class first
- for (final Class c : classes) {
- // this classloader is used only to load jaxb.properties, so doing this should be safe.
- ClassLoader classLoader = getClassClassLoader(c);
- Package pkg = c.getPackage();
- if(pkg==null)
- continue; // this is possible for primitives, arrays, and classes that are loaded by poorly implemented ClassLoaders
- String packageName = pkg.getName().replace('.', '/');
-
- // TODO: do we want to optimize away searching the same package? org.Foo, org.Bar, com.Baz
- // classes from the same package might come from different class loades, so it might be a bad idea
-
- // TODO: it's easier to look things up from the class
- // c.getResourceAsStream("jaxb.properties");
-
- // build the resource name and use the property loader code
- String resourceName = packageName+"/jaxb.properties";
- logger.log(Level.FINE, "Trying to locate {0}", resourceName);
- Properties props = loadJAXBProperties(classLoader, resourceName);
- if (props == null) {
- logger.fine(" not found");
- } else {
- logger.fine(" found");
- if (props.containsKey(JAXB_CONTEXT_FACTORY)) {
- // trim() seems redundant, but adding to satisfy customer complaint
- factoryClassName = props.getProperty(JAXB_CONTEXT_FACTORY).trim();
- return newInstance(classes, properties, factoryClassName);
- } else {
- throw new JAXBException(Messages.format(Messages.MISSING_PROPERTY, packageName, JAXB_CONTEXT_FACTORY));
- }
- }
- }
-
- // search for a system property second (javax.xml.bind.JAXBContext)
- logger.log(Level.FINE, "Checking system property {0}", JAXBContext.JAXB_CONTEXT_FACTORY);
- factoryClassName = AccessController.doPrivileged(new GetPropertyAction(JAXBContext.JAXB_CONTEXT_FACTORY));
- if (factoryClassName != null) {
- logger.log(Level.FINE, " found {0}", factoryClassName);
- return newInstance( classes, properties, factoryClassName );
- } else { // leave it here for compatibility reasons
- logger.fine(" not found");
- logger.log(Level.FINE, "Checking system property {0}", jaxbContextFQCN);
- factoryClassName = AccessController.doPrivileged(new GetPropertyAction(jaxbContextFQCN));
- if (factoryClassName != null) {
- logger.log(Level.FINE, " found {0}", factoryClassName);
- return newInstance( classes, properties, factoryClassName );
- } else {
- logger.fine(" not found");
- }
- }
-
- // OSGi search
- Class jaxbContext = lookupJaxbContextUsingOsgiServiceLoader();
- if (jaxbContext != null) {
- logger.fine("OSGi environment detected");
- return newInstance(classes, properties, jaxbContext);
- }
-
- // search META-INF services next
- logger.fine("Checking META-INF/services");
- BufferedReader r = null;
- try {
- final String resource = new StringBuilder("META-INF/services/").append(jaxbContextFQCN).toString();
- ClassLoader classLoader = getContextClassLoader();
- URL resourceURL;
- if(classLoader==null)
- resourceURL = ClassLoader.getSystemResource(resource);
- else
- resourceURL = classLoader.getResource(resource);
-
- if (resourceURL != null) {
- logger.log(Level.FINE, "Reading {0}", resourceURL);
- r = new BufferedReader(new InputStreamReader(resourceURL.openStream(), "UTF-8"));
- factoryClassName = r.readLine();
- if (factoryClassName != null) {
- factoryClassName = factoryClassName.trim();
- }
- return newInstance(classes, properties, factoryClassName);
- } else {
- logger.log(Level.FINE, "Unable to find: {0}", resource);
- }
- } catch (UnsupportedEncodingException e) {
- // should never happen
- throw new JAXBException(e);
- } catch (IOException e) {
- throw new JAXBException(e);
- } finally {
- if (r != null) {
- try {
- r.close();
- } catch (IOException ex) {
- logger.log(Level.FINE, "Unable to close stream", ex);
- }
- }
- }
-
- // else no provider found
- logger.fine("Trying to create the platform default provider");
- return newInstance(classes, properties, PLATFORM_DEFAULT_FACTORY_CLASS);
- }
-
- private static Class lookupJaxbContextUsingOsgiServiceLoader() {
- try {
- // Use reflection to avoid having any dependency on ServiceLoader class
- Class target = Class.forName("com.sun.org.glassfish.hk2.osgiresourcelocator.ServiceLoader");
- Method m = target.getMethod("lookupProviderClasses", Class.class);
- Iterator iter = ((Iterable) m.invoke(null, JAXBContext.class)).iterator();
- return iter.hasNext() ? (Class)iter.next() : null;
- } catch(Exception e) {
- logger.log(Level.FINE, "Unable to find from OSGi: javax.xml.bind.JAXBContext");
- return null;
- }
- }
-
- private static Properties loadJAXBProperties( ClassLoader classLoader,
- String propFileName )
- throws JAXBException {
-
- Properties props = null;
-
- try {
- URL url;
- if(classLoader==null)
- url = ClassLoader.getSystemResource(propFileName);
- else
- url = classLoader.getResource( propFileName );
-
- if( url != null ) {
- logger.log(Level.FINE, "loading props from {0}", url);
- props = new Properties();
- InputStream is = url.openStream();
- props.load( is );
- is.close();
- }
- } catch( IOException ioe ) {
- logger.log(Level.FINE,"Unable to load "+propFileName,ioe);
- throw new JAXBException( ioe.toString(), ioe );
- }
-
- return props;
- }
-
-
- /**
- * Search the given ClassLoader for an instance of the specified class and
- * return a string representation of the URL that points to the resource.
- *
- * @param clazz
- * The class to search for
- * @param loader
- * The ClassLoader to search. If this parameter is null, then the
- * system class loader will be searched
- * @return
- * the URL for the class or null if it wasn't found
- */
- static URL which(Class clazz, ClassLoader loader) {
-
- String classnameAsResource = clazz.getName().replace('.', '/') + ".class";
-
- if(loader == null) {
- loader = getSystemClassLoader();
- }
-
- return loader.getResource(classnameAsResource);
- }
-
- /**
- * Get the URL for the Class from it's ClassLoader.
- *
- * Convenience method for {@link #which(Class, ClassLoader)}.
- *
- * Equivalent to calling: which(clazz, clazz.getClassLoader())
- *
- * @param clazz
- * The class to search for
- * @return
- * the URL for the class or null if it wasn't found
- */
- static URL which(Class clazz) {
- return which(clazz, getClassClassLoader(clazz));
- }
-
- /**
- * When JAXB is in J2SE, rt.jar has to have a JAXB implementation.
- * However, rt.jar cannot have META-INF/services/javax.xml.bind.JAXBContext
- * because if it has, it will take precedence over any file that applications have
- * in their jar files.
- *
- * <p>
- * When the user bundles his own JAXB implementation, we'd like to use it, and we
- * want the platform default to be used only when there's no other JAXB provider.
- *
- * <p>
- * For this reason, we have to hard-code the class name into the API.
- */
- private static final String PLATFORM_DEFAULT_FACTORY_CLASS = "com.sun.xml.internal.bind.v2.ContextFactory";
-
- /**
- * Loads the class, provided that the calling thread has an access to the class being loaded.
- */
- private static Class safeLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException {
- logger.log(Level.FINE, "Trying to load {0}", className);
- try {
- // make sure that the current thread has an access to the package of the given name.
- SecurityManager s = System.getSecurityManager();
- if (s != null) {
- int i = className.lastIndexOf('.');
- if (i != -1) {
- s.checkPackageAccess(className.substring(0,i));
- }
- }
-
- if (classLoader == null) {
- return Class.forName(className);
- } else {
- return classLoader.loadClass(className);
- }
- } catch (SecurityException se) {
- // anyone can access the platform default factory class without permission
- if (PLATFORM_DEFAULT_FACTORY_CLASS.equals(className)) {
- return Class.forName(className);
- }
- throw se;
- }
- }
-
- private static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- private static ClassLoader getClassClassLoader(final Class c) {
- if (System.getSecurityManager() == null) {
- return c.getClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return c.getClassLoader();
- }
- });
- }
- }
-
- private static ClassLoader getSystemClassLoader() {
- if (System.getSecurityManager() == null) {
- return ClassLoader.getSystemClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return ClassLoader.getSystemClassLoader();
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/DataBindingException.java b/src/share/jaxws_classes/javax/xml/bind/DataBindingException.java
deleted file mode 100644
index 2d0461ef..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/DataBindingException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * Exception that represents a failure in a JAXB operation.
- *
- * <p>
- * This exception differs from {@link JAXBException} in that
- * this is an unchecked exception, while <tt>JAXBException</tt>
- * is a checked exception.
- *
- * @see JAXB
- * @since JAXB2.1
- */
-public class DataBindingException extends RuntimeException {
- public DataBindingException(String message, Throwable cause) {
- super(message, cause);
- }
-
- public DataBindingException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/DatatypeConverter.java b/src/share/jaxws_classes/javax/xml/bind/DatatypeConverter.java
deleted file mode 100644
index c7cc5094..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/DatatypeConverter.java
+++ /dev/null
@@ -1,695 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import javax.xml.namespace.NamespaceContext;
-
-/**
- * <p>
- * The javaType binding declaration can be used to customize the binding of
- * an XML schema datatype to a Java datatype. Customizations can involve
- * writing a parse and print method for parsing and printing lexical
- * representations of a XML schema datatype respectively. However, writing
- * parse and print methods requires knowledge of the lexical representations (
- * <a href="http://www.w3.org/TR/xmlschema-2/"> XML Schema Part2: Datatypes
- * specification </a>) and hence may be difficult to write.
- * </p>
- * <p>
- * This class makes it easier to write parse and print methods. It defines
- * static parse and print methods that provide access to a JAXB provider's
- * implementation of parse and print methods. These methods are invoked by
- * custom parse and print methods. For example, the binding of xsd:dateTime
- * to a long can be customized using parse and print methods as follows:
- * <blockquote>
- * <pre>
- * // Customized parse method
- * public long myParseCal( String dateTimeString ) {
- * java.util.Calendar cal = DatatypeConverter.parseDateTime(dateTimeString);
- * long longval = convert_calendar_to_long(cal); //application specific
- * return longval;
- * }
- *
- * // Customized print method
- * public String myPrintCal( Long longval ) {
- * java.util.Calendar cal = convert_long_to_calendar(longval) ; //application specific
- * String dateTimeString = DatatypeConverter.printDateTime(cal);
- * return dateTimeString;
- * }
- * </pre>
- * </blockquote>
- * <p>
- * There is a static parse and print method corresponding to each parse and
- * print method respectively in the {@link DatatypeConverterInterface
- * DatatypeConverterInterface}.
- * <p>
- * The static methods defined in the class can also be used to specify
- * a parse or a print method in a javaType binding declaration.
- * </p>
- * <p>
- * JAXB Providers are required to call the
- * {@link #setDatatypeConverter(DatatypeConverterInterface)
- * setDatatypeConverter} api at some point before the first marshal or unmarshal
- * operation (perhaps during the call to JAXBContext.newInstance). This step is
- * necessary to configure the converter that should be used to perform the
- * print and parse functionality.
- * </p>
- *
- * <p>
- * A print method for a XML schema datatype can output any lexical
- * representation that is valid with respect to the XML schema datatype.
- * If an error is encountered during conversion, then an IllegalArgumentException,
- * or a subclass of IllegalArgumentException must be thrown by the method.
- * </p>
- *
- * @author <ul><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Ryan Shoemaker,Sun Microsystems Inc.</li></ul>
- * @see DatatypeConverterInterface
- * @see ParseConversionEvent
- * @see PrintConversionEvent
- * @since JAXB1.0
- */
-
-final public class DatatypeConverter {
-
- // delegate to this instance of DatatypeConverter
- private static volatile DatatypeConverterInterface theConverter = null;
-
- private final static JAXBPermission SET_DATATYPE_CONVERTER_PERMISSION =
- new JAXBPermission("setDatatypeConverter");
-
- private DatatypeConverter() {
- // private constructor
- }
-
- /**
- * This method is for JAXB provider use only.
- * <p>
- * JAXB Providers are required to call this method at some point before
- * allowing any of the JAXB client marshal or unmarshal operations to
- * occur. This is necessary to configure the datatype converter that
- * should be used to perform the print and parse conversions.
- *
- * <p>
- * Calling this api repeatedly will have no effect - the
- * DatatypeConverterInterface instance passed into the first invocation is
- * the one that will be used from then on.
- *
- * @param converter an instance of a class that implements the
- * DatatypeConverterInterface class - this parameter must not be null.
- * @throws IllegalArgumentException if the parameter is null
- * @throws SecurityException
- * If the {@link SecurityManager} in charge denies the access to
- * set the datatype converter.
- * @see JAXBPermission
- */
- public static void setDatatypeConverter( DatatypeConverterInterface converter ) {
- if( converter == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.CONVERTER_MUST_NOT_BE_NULL ) );
- } else if( theConverter == null ) {
- SecurityManager sm = System.getSecurityManager();
- if (sm != null)
- sm.checkPermission(SET_DATATYPE_CONVERTER_PERMISSION);
- theConverter = converter;
- }
- }
-
- private static synchronized void initConverter() {
- theConverter = new DatatypeConverterImpl();
- }
-
- /**
- * <p>
- * Convert the lexical XSD string argument into a String value.
- * @param lexicalXSDString
- * A string containing a lexical representation of
- * xsd:string.
- * @return
- * A String value represented by the string argument.
- */
- public static String parseString( String lexicalXSDString ) {
- if (theConverter == null) initConverter();
- return theConverter.parseString( lexicalXSDString );
- }
-
- /**
- * <p>
- * Convert the string argument into a BigInteger value.
- * @param lexicalXSDInteger
- * A string containing a lexical representation of
- * xsd:integer.
- * @return
- * A BigInteger value represented by the string argument.
- * @throws NumberFormatException <code>lexicalXSDInteger</code> is not a valid string representation of a {@link java.math.BigInteger} value.
- */
- public static java.math.BigInteger parseInteger( String lexicalXSDInteger ) {
- if (theConverter == null) initConverter();
- return theConverter.parseInteger( lexicalXSDInteger );
- }
-
- /**
- * <p>
- * Convert the string argument into an int value.
- * @param lexicalXSDInt
- * A string containing a lexical representation of
- * xsd:int.
- * @return
- * A int value represented by the string argument.
- * @throws NumberFormatException <code>lexicalXSDInt</code> is not a valid string representation of an <code>int</code> value.
- */
- public static int parseInt( String lexicalXSDInt ) {
- if (theConverter == null) initConverter();
- return theConverter.parseInt( lexicalXSDInt );
- }
-
- /**
- * <p>
- * Converts the string argument into a long value.
- * @param lexicalXSDLong
- * A string containing lexical representation of
- * xsd:long.
- * @return
- * A long value represented by the string argument.
- * @throws NumberFormatException <code>lexicalXSDLong</code> is not a valid string representation of a <code>long</code> value.
- */
- public static long parseLong( String lexicalXSDLong ) {
- if (theConverter == null) initConverter();
- return theConverter.parseLong( lexicalXSDLong );
- }
-
- /**
- * <p>
- * Converts the string argument into a short value.
- * @param lexicalXSDShort
- * A string containing lexical representation of
- * xsd:short.
- * @return
- * A short value represented by the string argument.
- * @throws NumberFormatException <code>lexicalXSDShort</code> is not a valid string representation of a <code>short</code> value.
- */
- public static short parseShort( String lexicalXSDShort ) {
- if (theConverter == null) initConverter();
- return theConverter.parseShort( lexicalXSDShort );
- }
-
- /**
- * <p>
- * Converts the string argument into a BigDecimal value.
- * @param lexicalXSDDecimal
- * A string containing lexical representation of
- * xsd:decimal.
- * @return
- * A BigDecimal value represented by the string argument.
- * @throws NumberFormatException <code>lexicalXSDDecimal</code> is not a valid string representation of {@link java.math.BigDecimal}.
- */
- public static java.math.BigDecimal parseDecimal( String lexicalXSDDecimal ) {
- if (theConverter == null) initConverter();
- return theConverter.parseDecimal( lexicalXSDDecimal );
- }
-
- /**
- * <p>
- * Converts the string argument into a float value.
- * @param lexicalXSDFloat
- * A string containing lexical representation of
- * xsd:float.
- * @return
- * A float value represented by the string argument.
- * @throws NumberFormatException <code>lexicalXSDFloat</code> is not a valid string representation of a <code>float</code> value.
- */
- public static float parseFloat( String lexicalXSDFloat ) {
- if (theConverter == null) initConverter();
- return theConverter.parseFloat( lexicalXSDFloat );
- }
-
- /**
- * <p>
- * Converts the string argument into a double value.
- * @param lexicalXSDDouble
- * A string containing lexical representation of
- * xsd:double.
- * @return
- * A double value represented by the string argument.
- * @throws NumberFormatException <code>lexicalXSDDouble</code> is not a valid string representation of a <code>double</code> value.
- */
- public static double parseDouble( String lexicalXSDDouble ) {
- if (theConverter == null) initConverter();
- return theConverter.parseDouble( lexicalXSDDouble );
- }
-
- /**
- * <p>
- * Converts the string argument into a boolean value.
- * @param lexicalXSDBoolean
- * A string containing lexical representation of
- * xsd:boolean.
- * @return
- * A boolean value represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:boolean.
- */
- public static boolean parseBoolean( String lexicalXSDBoolean ) {
- if (theConverter == null) initConverter();
- return theConverter.parseBoolean( lexicalXSDBoolean );
- }
-
- /**
- * <p>
- * Converts the string argument into a byte value.
- * @param lexicalXSDByte
- * A string containing lexical representation of
- * xsd:byte.
- * @return
- * A byte value represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:byte.
- */
- public static byte parseByte( String lexicalXSDByte ) {
- if (theConverter == null) initConverter();
- return theConverter.parseByte( lexicalXSDByte );
- }
-
- /**
- * <p>
- * Converts the string argument into a byte value.
- *
- * <p>
- * String parameter <tt>lexicalXSDQname</tt> must conform to lexical value space specifed at
- * <a href="http://www.w3.org/TR/xmlschema-2/#QName">XML Schema Part 2:Datatypes specification:QNames</a>
- *
- * @param lexicalXSDQName
- * A string containing lexical representation of xsd:QName.
- * @param nsc
- * A namespace context for interpreting a prefix within a QName.
- * @return
- * A QName value represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to XML Schema Part 2 specification or
- * if namespace prefix of <tt>lexicalXSDQname</tt> is not bound to a URI in NamespaceContext <tt>nsc</tt>.
- */
- public static javax.xml.namespace.QName parseQName( String lexicalXSDQName,
- NamespaceContext nsc) {
- if (theConverter == null) initConverter();
- return theConverter.parseQName( lexicalXSDQName, nsc );
- }
-
- /**
- * <p>
- * Converts the string argument into a Calendar value.
- * @param lexicalXSDDateTime
- * A string containing lexical representation of
- * xsd:datetime.
- * @return
- * A Calendar object represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:dateTime.
- */
- public static java.util.Calendar parseDateTime( String lexicalXSDDateTime ) {
- if (theConverter == null) initConverter();
- return theConverter.parseDateTime( lexicalXSDDateTime );
- }
-
- /**
- * <p>
- * Converts the string argument into an array of bytes.
- * @param lexicalXSDBase64Binary
- * A string containing lexical representation
- * of xsd:base64Binary.
- * @return
- * An array of bytes represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:base64Binary
- */
- public static byte[] parseBase64Binary( String lexicalXSDBase64Binary ) {
- if (theConverter == null) initConverter();
- return theConverter.parseBase64Binary( lexicalXSDBase64Binary );
- }
-
- /**
- * <p>
- * Converts the string argument into an array of bytes.
- * @param lexicalXSDHexBinary
- * A string containing lexical representation of
- * xsd:hexBinary.
- * @return
- * An array of bytes represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:hexBinary.
- */
- public static byte[] parseHexBinary( String lexicalXSDHexBinary ) {
- if (theConverter == null) initConverter();
- return theConverter.parseHexBinary( lexicalXSDHexBinary );
- }
-
- /**
- * <p>
- * Converts the string argument into a long value.
- * @param lexicalXSDUnsignedInt
- * A string containing lexical representation
- * of xsd:unsignedInt.
- * @return
- * A long value represented by the string argument.
- * @throws NumberFormatException if string parameter can not be parsed into a <tt>long</tt> value.
- */
- public static long parseUnsignedInt( String lexicalXSDUnsignedInt ) {
- if (theConverter == null) initConverter();
- return theConverter.parseUnsignedInt( lexicalXSDUnsignedInt );
- }
-
- /**
- * <p>
- * Converts the string argument into an int value.
- * @param lexicalXSDUnsignedShort
- * A string containing lexical
- * representation of xsd:unsignedShort.
- * @return
- * An int value represented by the string argument.
- * @throws NumberFormatException if string parameter can not be parsed into an <tt>int</tt> value.
- */
- public static int parseUnsignedShort( String lexicalXSDUnsignedShort ) {
- if (theConverter == null) initConverter();
- return theConverter.parseUnsignedShort( lexicalXSDUnsignedShort );
- }
-
- /**
- * <p>
- * Converts the string argument into a Calendar value.
- * @param lexicalXSDTime
- * A string containing lexical representation of
- * xsd:time.
- * @return
- * A Calendar value represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:Time.
- */
- public static java.util.Calendar parseTime( String lexicalXSDTime ) {
- if (theConverter == null) initConverter();
- return theConverter.parseTime( lexicalXSDTime );
- }
- /**
- * <p>
- * Converts the string argument into a Calendar value.
- * @param lexicalXSDDate
- * A string containing lexical representation of
- * xsd:Date.
- * @return
- * A Calendar value represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:Date.
- */
- public static java.util.Calendar parseDate( String lexicalXSDDate ) {
- if (theConverter == null) initConverter();
- return theConverter.parseDate( lexicalXSDDate );
- }
-
- /**
- * <p>
- * Return a string containing the lexical representation of the
- * simple type.
- * @param lexicalXSDAnySimpleType
- * A string containing lexical
- * representation of the simple type.
- * @return
- * A string containing the lexical representation of the
- * simple type.
- */
- public static String parseAnySimpleType( String lexicalXSDAnySimpleType ) {
- if (theConverter == null) initConverter();
- return theConverter.parseAnySimpleType( lexicalXSDAnySimpleType );
- }
- /**
- * <p>
- * Converts the string argument into a string.
- * @param val
- * A string value.
- * @return
- * A string containing a lexical representation of xsd:string.
- */
- // also indicate the print methods produce a lexical
- // representation for given Java datatypes.
-
- public static String printString( String val ) {
- if (theConverter == null) initConverter();
- return theConverter.printString( val );
- }
-
- /**
- * <p>
- * Converts a BigInteger value into a string.
- * @param val
- * A BigInteger value
- * @return
- * A string containing a lexical representation of xsd:integer
- * @throws IllegalArgumentException <tt>val</tt> is null.
- */
- public static String printInteger( java.math.BigInteger val ) {
- if (theConverter == null) initConverter();
- return theConverter.printInteger( val );
- }
-
- /**
- * <p>
- * Converts an int value into a string.
- * @param val
- * An int value
- * @return
- * A string containing a lexical representation of xsd:int
- */
- public static String printInt( int val ) {
- if (theConverter == null) initConverter();
- return theConverter.printInt( val );
- }
-
- /**
- * <p>
- * Converts A long value into a string.
- * @param val
- * A long value
- * @return
- * A string containing a lexical representation of xsd:long
- */
- public static String printLong( long val ) {
- if (theConverter == null) initConverter();
- return theConverter.printLong( val );
- }
-
- /**
- * <p>
- * Converts a short value into a string.
- * @param val
- * A short value
- * @return
- * A string containing a lexical representation of xsd:short
- */
- public static String printShort( short val ) {
- if (theConverter == null) initConverter();
- return theConverter.printShort( val );
- }
-
- /**
- * <p>
- * Converts a BigDecimal value into a string.
- * @param val
- * A BigDecimal value
- * @return
- * A string containing a lexical representation of xsd:decimal
- * @throws IllegalArgumentException <tt>val</tt> is null.
- */
- public static String printDecimal( java.math.BigDecimal val ) {
- if (theConverter == null) initConverter();
- return theConverter.printDecimal( val );
- }
-
- /**
- * <p>
- * Converts a float value into a string.
- * @param val
- * A float value
- * @return
- * A string containing a lexical representation of xsd:float
- */
- public static String printFloat( float val ) {
- if (theConverter == null) initConverter();
- return theConverter.printFloat( val );
- }
-
- /**
- * <p>
- * Converts a double value into a string.
- * @param val
- * A double value
- * @return
- * A string containing a lexical representation of xsd:double
- */
- public static String printDouble( double val ) {
- if (theConverter == null) initConverter();
- return theConverter.printDouble( val );
- }
-
- /**
- * <p>
- * Converts a boolean value into a string.
- * @param val
- * A boolean value
- * @return
- * A string containing a lexical representation of xsd:boolean
- */
- public static String printBoolean( boolean val ) {
- if (theConverter == null) initConverter();
- return theConverter.printBoolean( val );
- }
-
- /**
- * <p>
- * Converts a byte value into a string.
- * @param val
- * A byte value
- * @return
- * A string containing a lexical representation of xsd:byte
- */
- public static String printByte( byte val ) {
- if (theConverter == null) initConverter();
- return theConverter.printByte( val );
- }
-
- /**
- * <p>
- * Converts a QName instance into a string.
- * @param val
- * A QName value
- * @param nsc
- * A namespace context for interpreting a prefix within a QName.
- * @return
- * A string containing a lexical representation of QName
- * @throws IllegalArgumentException if <tt>val</tt> is null or
- * if <tt>nsc</tt> is non-null or <tt>nsc.getPrefix(nsprefixFromVal)</tt> is null.
- */
- public static String printQName( javax.xml.namespace.QName val,
- NamespaceContext nsc ) {
- if (theConverter == null) initConverter();
- return theConverter.printQName( val, nsc );
- }
-
- /**
- * <p>
- * Converts a Calendar value into a string.
- * @param val
- * A Calendar value
- * @return
- * A string containing a lexical representation of xsd:dateTime
- * @throws IllegalArgumentException if <tt>val</tt> is null.
- */
- public static String printDateTime( java.util.Calendar val ) {
- if (theConverter == null) initConverter();
- return theConverter.printDateTime( val );
- }
-
- /**
- * <p>
- * Converts an array of bytes into a string.
- * @param val
- * An array of bytes
- * @return
- * A string containing a lexical representation of xsd:base64Binary
- * @throws IllegalArgumentException if <tt>val</tt> is null.
- */
- public static String printBase64Binary( byte[] val ) {
- if (theConverter == null) initConverter();
- return theConverter.printBase64Binary( val );
- }
-
- /**
- * <p>
- * Converts an array of bytes into a string.
- * @param val
- * An array of bytes
- * @return
- * A string containing a lexical representation of xsd:hexBinary
- * @throws IllegalArgumentException if <tt>val</tt> is null.
- */
- public static String printHexBinary( byte[] val ) {
- if (theConverter == null) initConverter();
- return theConverter.printHexBinary( val );
- }
-
- /**
- * <p>
- * Converts a long value into a string.
- * @param val
- * A long value
- * @return
- * A string containing a lexical representation of xsd:unsignedInt
- */
- public static String printUnsignedInt( long val ) {
- if (theConverter == null) initConverter();
- return theConverter.printUnsignedInt( val );
- }
-
- /**
- * <p>
- * Converts an int value into a string.
- * @param val
- * An int value
- * @return
- * A string containing a lexical representation of xsd:unsignedShort
- */
- public static String printUnsignedShort( int val ) {
- if (theConverter == null) initConverter();
- return theConverter.printUnsignedShort( val );
- }
-
- /**
- * <p>
- * Converts a Calendar value into a string.
- * @param val
- * A Calendar value
- * @return
- * A string containing a lexical representation of xsd:time
- * @throws IllegalArgumentException if <tt>val</tt> is null.
- */
- public static String printTime( java.util.Calendar val ) {
- if (theConverter == null) initConverter();
- return theConverter.printTime( val );
- }
-
- /**
- * <p>
- * Converts a Calendar value into a string.
- * @param val
- * A Calendar value
- * @return
- * A string containing a lexical representation of xsd:date
- * @throws IllegalArgumentException if <tt>val</tt> is null.
- */
- public static String printDate( java.util.Calendar val ) {
- if (theConverter == null) initConverter();
- return theConverter.printDate( val );
- }
-
- /**
- * <p>
- * Converts a string value into a string.
- * @param val
- * A string value
- * @return
- * A string containing a lexical representation of xsd:AnySimpleType
- */
- public static String printAnySimpleType( String val ) {
- if (theConverter == null) initConverter();
- return theConverter.printAnySimpleType( val );
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterImpl.java b/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterImpl.java
deleted file mode 100644
index a2358500..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterImpl.java
+++ /dev/null
@@ -1,1042 +0,0 @@
-/*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.TimeZone;
-
-import javax.xml.namespace.QName;
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.DatatypeConfigurationException;
-
-/**
- * This class is the JAXB RI's default implementation of the
- * {@link DatatypeConverterInterface}.
- *
- * <p>
- * When client applications specify the use of the static print/parse
- * methods in {@link DatatypeConverter}, it will delegate
- * to this class.
- *
- * <p>
- * This class is responsible for whitespace normalization.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
- * @since JAXB2.1
- */
-final class DatatypeConverterImpl implements DatatypeConverterInterface {
-
- /**
- * To avoid re-creating instances, we cache one instance.
- */
- public static final DatatypeConverterInterface theInstance = new DatatypeConverterImpl();
-
- protected DatatypeConverterImpl() {
- }
-
- public String parseString(String lexicalXSDString) {
- return lexicalXSDString;
- }
-
- public BigInteger parseInteger(String lexicalXSDInteger) {
- return _parseInteger(lexicalXSDInteger);
- }
-
- public static BigInteger _parseInteger(CharSequence s) {
- return new BigInteger(removeOptionalPlus(WhiteSpaceProcessor.trim(s)).toString());
- }
-
- public String printInteger(BigInteger val) {
- return _printInteger(val);
- }
-
- public static String _printInteger(BigInteger val) {
- return val.toString();
- }
-
- public int parseInt(String s) {
- return _parseInt(s);
- }
-
- /**
- * Faster but less robust String->int conversion.
- *
- * Note that:
- * <ol>
- * <li>XML Schema allows '+', but {@link Integer#valueOf(String)} is not.
- * <li>XML Schema allows leading and trailing (but not in-between) whitespaces.
- * {@link Integer#valueOf(String)} doesn't allow any.
- * </ol>
- */
- public static int _parseInt(CharSequence s) {
- int len = s.length();
- int sign = 1;
-
- int r = 0;
-
- for (int i = 0; i < len; i++) {
- char ch = s.charAt(i);
- if (WhiteSpaceProcessor.isWhiteSpace(ch)) {
- // skip whitespace
- } else if ('0' <= ch && ch <= '9') {
- r = r * 10 + (ch - '0');
- } else if (ch == '-') {
- sign = -1;
- } else if (ch == '+') {
- // noop
- } else {
- throw new NumberFormatException("Not a number: " + s);
- }
- }
-
- return r * sign;
- }
-
- public long parseLong(String lexicalXSLong) {
- return _parseLong(lexicalXSLong);
- }
-
- public static long _parseLong(CharSequence s) {
- return Long.valueOf(removeOptionalPlus(WhiteSpaceProcessor.trim(s)).toString());
- }
-
- public short parseShort(String lexicalXSDShort) {
- return _parseShort(lexicalXSDShort);
- }
-
- public static short _parseShort(CharSequence s) {
- return (short) _parseInt(s);
- }
-
- public String printShort(short val) {
- return _printShort(val);
- }
-
- public static String _printShort(short val) {
- return String.valueOf(val);
- }
-
- public BigDecimal parseDecimal(String content) {
- return _parseDecimal(content);
- }
-
- public static BigDecimal _parseDecimal(CharSequence content) {
- content = WhiteSpaceProcessor.trim(content);
-
- if (content.length() <= 0) {
- return null;
- }
-
- return new BigDecimal(content.toString());
-
- // from purely XML Schema perspective,
- // this implementation has a problem, since
- // in xs:decimal "1.0" and "1" is equal whereas the above
- // code will return different values for those two forms.
- //
- // the code was originally using com.sun.msv.datatype.xsd.NumberType.load,
- // but a profiling showed that the process of normalizing "1.0" into "1"
- // could take non-trivial time.
- //
- // also, from the user's point of view, one might be surprised if
- // 1 (not 1.0) is returned from "1.000"
- }
-
- public float parseFloat(String lexicalXSDFloat) {
- return _parseFloat(lexicalXSDFloat);
- }
-
- public static float _parseFloat(CharSequence _val) {
- String s = WhiteSpaceProcessor.trim(_val).toString();
- /* Incompatibilities of XML Schema's float "xfloat" and Java's float "jfloat"
-
- * jfloat.valueOf ignores leading and trailing whitespaces,
- whereas this is not allowed in xfloat.
- * jfloat.valueOf allows "float type suffix" (f, F) to be
- appended after float literal (e.g., 1.52e-2f), whereare
- this is not the case of xfloat.
-
- gray zone
- ---------
- * jfloat allows ".523". And there is no clear statement that mentions
- this case in xfloat. Although probably this is allowed.
- *
- */
-
- if (s.equals("NaN")) {
- return Float.NaN;
- }
- if (s.equals("INF")) {
- return Float.POSITIVE_INFINITY;
- }
- if (s.equals("-INF")) {
- return Float.NEGATIVE_INFINITY;
- }
-
- if (s.length() == 0
- || !isDigitOrPeriodOrSign(s.charAt(0))
- || !isDigitOrPeriodOrSign(s.charAt(s.length() - 1))) {
- throw new NumberFormatException();
- }
-
- // these screening process is necessary due to the wobble of Float.valueOf method
- return Float.parseFloat(s);
- }
-
- public String printFloat(float v) {
- return _printFloat(v);
- }
-
- public static String _printFloat(float v) {
- if (Float.isNaN(v)) {
- return "NaN";
- }
- if (v == Float.POSITIVE_INFINITY) {
- return "INF";
- }
- if (v == Float.NEGATIVE_INFINITY) {
- return "-INF";
- }
- return String.valueOf(v);
- }
-
- public double parseDouble(String lexicalXSDDouble) {
- return _parseDouble(lexicalXSDDouble);
- }
-
- public static double _parseDouble(CharSequence _val) {
- String val = WhiteSpaceProcessor.trim(_val).toString();
-
- if (val.equals("NaN")) {
- return Double.NaN;
- }
- if (val.equals("INF")) {
- return Double.POSITIVE_INFINITY;
- }
- if (val.equals("-INF")) {
- return Double.NEGATIVE_INFINITY;
- }
-
- if (val.length() == 0
- || !isDigitOrPeriodOrSign(val.charAt(0))
- || !isDigitOrPeriodOrSign(val.charAt(val.length() - 1))) {
- throw new NumberFormatException(val);
- }
-
-
- // these screening process is necessary due to the wobble of Float.valueOf method
- return Double.parseDouble(val);
- }
-
- public boolean parseBoolean(String lexicalXSDBoolean) {
- Boolean b = _parseBoolean(lexicalXSDBoolean);
- return (b == null) ? false : b.booleanValue();
- }
-
- public static Boolean _parseBoolean(CharSequence literal) {
- if (literal == null) {
- return null;
- }
-
- int i = 0;
- int len = literal.length();
- char ch;
- boolean value = false;
-
- if (literal.length() <= 0) {
- return null;
- }
-
- do {
- ch = literal.charAt(i++);
- } while (WhiteSpaceProcessor.isWhiteSpace(ch) && i < len);
-
- int strIndex = 0;
-
- switch (ch) {
- case '1':
- value = true;
- break;
- case '0':
- value = false;
- break;
- case 't':
- String strTrue = "rue";
- do {
- ch = literal.charAt(i++);
- } while ((strTrue.charAt(strIndex++) == ch) && i < len && strIndex < 3);
-
- if (strIndex == 3) {
- value = true;
- } else {
- return false;
- }
-// throw new IllegalArgumentException("String \"" + literal + "\" is not valid boolean value.");
-
- break;
- case 'f':
- String strFalse = "alse";
- do {
- ch = literal.charAt(i++);
- } while ((strFalse.charAt(strIndex++) == ch) && i < len && strIndex < 4);
-
-
- if (strIndex == 4) {
- value = false;
- } else {
- return false;
- }
-// throw new IllegalArgumentException("String \"" + literal + "\" is not valid boolean value.");
-
- break;
- }
-
- if (i < len) {
- do {
- ch = literal.charAt(i++);
- } while (WhiteSpaceProcessor.isWhiteSpace(ch) && i < len);
- }
-
- if (i == len) {
- return value;
- } else {
- return null;
- }
-// throw new IllegalArgumentException("String \"" + literal + "\" is not valid boolean value.");
- }
-
- public String printBoolean(boolean val) {
- return val ? "true" : "false";
- }
-
- public static String _printBoolean(boolean val) {
- return val ? "true" : "false";
- }
-
- public byte parseByte(String lexicalXSDByte) {
- return _parseByte(lexicalXSDByte);
- }
-
- public static byte _parseByte(CharSequence literal) {
- return (byte) _parseInt(literal);
- }
-
- public String printByte(byte val) {
- return _printByte(val);
- }
-
- public static String _printByte(byte val) {
- return String.valueOf(val);
- }
-
- public QName parseQName(String lexicalXSDQName, NamespaceContext nsc) {
- return _parseQName(lexicalXSDQName, nsc);
- }
-
- /**
- * @return null if fails to convert.
- */
- public static QName _parseQName(CharSequence text, NamespaceContext nsc) {
- int length = text.length();
-
- // trim whitespace
- int start = 0;
- while (start < length && WhiteSpaceProcessor.isWhiteSpace(text.charAt(start))) {
- start++;
- }
-
- int end = length;
- while (end > start && WhiteSpaceProcessor.isWhiteSpace(text.charAt(end - 1))) {
- end--;
- }
-
- if (end == start) {
- throw new IllegalArgumentException("input is empty");
- }
-
-
- String uri;
- String localPart;
- String prefix;
-
- // search ':'
- int idx = start + 1; // no point in searching the first char. that's not valid.
- while (idx < end && text.charAt(idx) != ':') {
- idx++;
- }
-
- if (idx == end) {
- uri = nsc.getNamespaceURI("");
- localPart = text.subSequence(start, end).toString();
- prefix = "";
- } else {
- // Prefix exists, check everything
- prefix = text.subSequence(start, idx).toString();
- localPart = text.subSequence(idx + 1, end).toString();
- uri = nsc.getNamespaceURI(prefix);
- // uri can never be null according to javadoc,
- // but some users reported that there are implementations that return null.
- if (uri == null || uri.length() == 0) // crap. the NamespaceContext interface is broken.
- // error: unbound prefix
- {
- throw new IllegalArgumentException("prefix " + prefix + " is not bound to a namespace");
- }
- }
-
- return new QName(uri, localPart, prefix);
- }
-
- public Calendar parseDateTime(String lexicalXSDDateTime) {
- return _parseDateTime(lexicalXSDDateTime);
- }
-
- public static GregorianCalendar _parseDateTime(CharSequence s) {
- String val = WhiteSpaceProcessor.trim(s).toString();
- return datatypeFactory.newXMLGregorianCalendar(val).toGregorianCalendar();
- }
-
- public String printDateTime(Calendar val) {
- return _printDateTime(val);
- }
-
- public static String _printDateTime(Calendar val) {
- return CalendarFormatter.doFormat("%Y-%M-%DT%h:%m:%s%z", val);
- }
-
- public byte[] parseBase64Binary(String lexicalXSDBase64Binary) {
- return _parseBase64Binary(lexicalXSDBase64Binary);
- }
-
- public byte[] parseHexBinary(String s) {
- final int len = s.length();
-
- // "111" is not a valid hex encoding.
- if (len % 2 != 0) {
- throw new IllegalArgumentException("hexBinary needs to be even-length: " + s);
- }
-
- byte[] out = new byte[len / 2];
-
- for (int i = 0; i < len; i += 2) {
- int h = hexToBin(s.charAt(i));
- int l = hexToBin(s.charAt(i + 1));
- if (h == -1 || l == -1) {
- throw new IllegalArgumentException("contains illegal character for hexBinary: " + s);
- }
-
- out[i / 2] = (byte) (h * 16 + l);
- }
-
- return out;
- }
-
- private static int hexToBin(char ch) {
- if ('0' <= ch && ch <= '9') {
- return ch - '0';
- }
- if ('A' <= ch && ch <= 'F') {
- return ch - 'A' + 10;
- }
- if ('a' <= ch && ch <= 'f') {
- return ch - 'a' + 10;
- }
- return -1;
- }
- private static final char[] hexCode = "0123456789ABCDEF".toCharArray();
-
- public String printHexBinary(byte[] data) {
- StringBuilder r = new StringBuilder(data.length * 2);
- for (byte b : data) {
- r.append(hexCode[(b >> 4) & 0xF]);
- r.append(hexCode[(b & 0xF)]);
- }
- return r.toString();
- }
-
- public long parseUnsignedInt(String lexicalXSDUnsignedInt) {
- return _parseLong(lexicalXSDUnsignedInt);
- }
-
- public String printUnsignedInt(long val) {
- return _printLong(val);
- }
-
- public int parseUnsignedShort(String lexicalXSDUnsignedShort) {
- return _parseInt(lexicalXSDUnsignedShort);
- }
-
- public Calendar parseTime(String lexicalXSDTime) {
- return datatypeFactory.newXMLGregorianCalendar(lexicalXSDTime).toGregorianCalendar();
- }
-
- public String printTime(Calendar val) {
- return CalendarFormatter.doFormat("%h:%m:%s%z", val);
- }
-
- public Calendar parseDate(String lexicalXSDDate) {
- return datatypeFactory.newXMLGregorianCalendar(lexicalXSDDate).toGregorianCalendar();
- }
-
- public String printDate(Calendar val) {
- return _printDate(val);
- }
-
- public static String _printDate(Calendar val) {
- return CalendarFormatter.doFormat((new StringBuilder("%Y-%M-%D").append("%z")).toString(),val);
- }
-
- public String parseAnySimpleType(String lexicalXSDAnySimpleType) {
- return lexicalXSDAnySimpleType;
-// return (String)SimpleURType.theInstance._createValue( lexicalXSDAnySimpleType, null );
- }
-
- public String printString(String val) {
-// return StringType.theInstance.convertToLexicalValue( val, null );
- return val;
- }
-
- public String printInt(int val) {
- return _printInt(val);
- }
-
- public static String _printInt(int val) {
- return String.valueOf(val);
- }
-
- public String printLong(long val) {
- return _printLong(val);
- }
-
- public static String _printLong(long val) {
- return String.valueOf(val);
- }
-
- public String printDecimal(BigDecimal val) {
- return _printDecimal(val);
- }
-
- public static String _printDecimal(BigDecimal val) {
- return val.toPlainString();
- }
-
- public String printDouble(double v) {
- return _printDouble(v);
- }
-
- public static String _printDouble(double v) {
- if (Double.isNaN(v)) {
- return "NaN";
- }
- if (v == Double.POSITIVE_INFINITY) {
- return "INF";
- }
- if (v == Double.NEGATIVE_INFINITY) {
- return "-INF";
- }
- return String.valueOf(v);
- }
-
- public String printQName(QName val, NamespaceContext nsc) {
- return _printQName(val, nsc);
- }
-
- public static String _printQName(QName val, NamespaceContext nsc) {
- // Double-check
- String qname;
- String prefix = nsc.getPrefix(val.getNamespaceURI());
- String localPart = val.getLocalPart();
-
- if (prefix == null || prefix.length() == 0) { // be defensive
- qname = localPart;
- } else {
- qname = prefix + ':' + localPart;
- }
-
- return qname;
- }
-
- public String printBase64Binary(byte[] val) {
- return _printBase64Binary(val);
- }
-
- public String printUnsignedShort(int val) {
- return String.valueOf(val);
- }
-
- public String printAnySimpleType(String val) {
- return val;
- }
-
- /**
- * Just return the string passed as a parameter but
- * installs an instance of this class as the DatatypeConverter
- * implementation. Used from static fixed value initializers.
- */
- public static String installHook(String s) {
- DatatypeConverter.setDatatypeConverter(theInstance);
- return s;
- }
-// base64 decoder
- private static final byte[] decodeMap = initDecodeMap();
- private static final byte PADDING = 127;
-
- private static byte[] initDecodeMap() {
- byte[] map = new byte[128];
- int i;
- for (i = 0; i < 128; i++) {
- map[i] = -1;
- }
-
- for (i = 'A'; i <= 'Z'; i++) {
- map[i] = (byte) (i - 'A');
- }
- for (i = 'a'; i <= 'z'; i++) {
- map[i] = (byte) (i - 'a' + 26);
- }
- for (i = '0'; i <= '9'; i++) {
- map[i] = (byte) (i - '0' + 52);
- }
- map['+'] = 62;
- map['/'] = 63;
- map['='] = PADDING;
-
- return map;
- }
-
- /**
- * computes the length of binary data speculatively.
- *
- * <p>
- * Our requirement is to create byte[] of the exact length to store the binary data.
- * If we do this in a straight-forward way, it takes two passes over the data.
- * Experiments show that this is a non-trivial overhead (35% or so is spent on
- * the first pass in calculating the length.)
- *
- * <p>
- * So the approach here is that we compute the length speculatively, without looking
- * at the whole contents. The obtained speculative value is never less than the
- * actual length of the binary data, but it may be bigger. So if the speculation
- * goes wrong, we'll pay the cost of reallocation and buffer copying.
- *
- * <p>
- * If the base64 text is tightly packed with no indentation nor illegal char
- * (like what most web services produce), then the speculation of this method
- * will be correct, so we get the performance benefit.
- */
- private static int guessLength(String text) {
- final int len = text.length();
-
- // compute the tail '=' chars
- int j = len - 1;
- for (; j >= 0; j--) {
- byte code = decodeMap[text.charAt(j)];
- if (code == PADDING) {
- continue;
- }
- if (code == -1) // most likely this base64 text is indented. go with the upper bound
- {
- return text.length() / 4 * 3;
- }
- break;
- }
-
- j++; // text.charAt(j) is now at some base64 char, so +1 to make it the size
- int padSize = len - j;
- if (padSize > 2) // something is wrong with base64. be safe and go with the upper bound
- {
- return text.length() / 4 * 3;
- }
-
- // so far this base64 looks like it's unindented tightly packed base64.
- // take a chance and create an array with the expected size
- return text.length() / 4 * 3 - padSize;
- }
-
- /**
- * @param text
- * base64Binary data is likely to be long, and decoding requires
- * each character to be accessed twice (once for counting length, another
- * for decoding.)
- *
- * A benchmark showed that taking {@link String} is faster, presumably
- * because JIT can inline a lot of string access (with data of 1K chars, it was twice as fast)
- */
- public static byte[] _parseBase64Binary(String text) {
- final int buflen = guessLength(text);
- final byte[] out = new byte[buflen];
- int o = 0;
-
- final int len = text.length();
- int i;
-
- final byte[] quadruplet = new byte[4];
- int q = 0;
-
- // convert each quadruplet to three bytes.
- for (i = 0; i < len; i++) {
- char ch = text.charAt(i);
- byte v = decodeMap[ch];
-
- if (v != -1) {
- quadruplet[q++] = v;
- }
-
- if (q == 4) {
- // quadruplet is now filled.
- out[o++] = (byte) ((quadruplet[0] << 2) | (quadruplet[1] >> 4));
- if (quadruplet[2] != PADDING) {
- out[o++] = (byte) ((quadruplet[1] << 4) | (quadruplet[2] >> 2));
- }
- if (quadruplet[3] != PADDING) {
- out[o++] = (byte) ((quadruplet[2] << 6) | (quadruplet[3]));
- }
- q = 0;
- }
- }
-
- if (buflen == o) // speculation worked out to be OK
- {
- return out;
- }
-
- // we overestimated, so need to create a new buffer
- byte[] nb = new byte[o];
- System.arraycopy(out, 0, nb, 0, o);
- return nb;
- }
- private static final char[] encodeMap = initEncodeMap();
-
- private static char[] initEncodeMap() {
- char[] map = new char[64];
- int i;
- for (i = 0; i < 26; i++) {
- map[i] = (char) ('A' + i);
- }
- for (i = 26; i < 52; i++) {
- map[i] = (char) ('a' + (i - 26));
- }
- for (i = 52; i < 62; i++) {
- map[i] = (char) ('0' + (i - 52));
- }
- map[62] = '+';
- map[63] = '/';
-
- return map;
- }
-
- public static char encode(int i) {
- return encodeMap[i & 0x3F];
- }
-
- public static byte encodeByte(int i) {
- return (byte) encodeMap[i & 0x3F];
- }
-
- public static String _printBase64Binary(byte[] input) {
- return _printBase64Binary(input, 0, input.length);
- }
-
- public static String _printBase64Binary(byte[] input, int offset, int len) {
- char[] buf = new char[((len + 2) / 3) * 4];
- int ptr = _printBase64Binary(input, offset, len, buf, 0);
- assert ptr == buf.length;
- return new String(buf);
- }
-
- /**
- * Encodes a byte array into a char array by doing base64 encoding.
- *
- * The caller must supply a big enough buffer.
- *
- * @return
- * the value of {@code ptr+((len+2)/3)*4}, which is the new offset
- * in the output buffer where the further bytes should be placed.
- */
- public static int _printBase64Binary(byte[] input, int offset, int len, char[] buf, int ptr) {
- // encode elements until only 1 or 2 elements are left to encode
- int remaining = len;
- int i;
- for (i = offset;remaining >= 3; remaining -= 3, i += 3) {
- buf[ptr++] = encode(input[i] >> 2);
- buf[ptr++] = encode(
- ((input[i] & 0x3) << 4)
- | ((input[i + 1] >> 4) & 0xF));
- buf[ptr++] = encode(
- ((input[i + 1] & 0xF) << 2)
- | ((input[i + 2] >> 6) & 0x3));
- buf[ptr++] = encode(input[i + 2] & 0x3F);
- }
- // encode when exactly 1 element (left) to encode
- if (remaining == 1) {
- buf[ptr++] = encode(input[i] >> 2);
- buf[ptr++] = encode(((input[i]) & 0x3) << 4);
- buf[ptr++] = '=';
- buf[ptr++] = '=';
- }
- // encode when exactly 2 elements (left) to encode
- if (remaining == 2) {
- buf[ptr++] = encode(input[i] >> 2);
- buf[ptr++] = encode(((input[i] & 0x3) << 4)
- | ((input[i + 1] >> 4) & 0xF));
- buf[ptr++] = encode((input[i + 1] & 0xF) << 2);
- buf[ptr++] = '=';
- }
- return ptr;
- }
-
- /**
- * Encodes a byte array into another byte array by first doing base64 encoding
- * then encoding the result in ASCII.
- *
- * The caller must supply a big enough buffer.
- *
- * @return
- * the value of {@code ptr+((len+2)/3)*4}, which is the new offset
- * in the output buffer where the further bytes should be placed.
- */
- public static int _printBase64Binary(byte[] input, int offset, int len, byte[] out, int ptr) {
- byte[] buf = out;
- int remaining = len;
- int i;
- for (i=offset; remaining >= 3; remaining -= 3, i += 3 ) {
- buf[ptr++] = encodeByte(input[i]>>2);
- buf[ptr++] = encodeByte(
- ((input[i]&0x3)<<4) |
- ((input[i+1]>>4)&0xF));
- buf[ptr++] = encodeByte(
- ((input[i+1]&0xF)<<2)|
- ((input[i+2]>>6)&0x3));
- buf[ptr++] = encodeByte(input[i+2]&0x3F);
- }
- // encode when exactly 1 element (left) to encode
- if (remaining == 1) {
- buf[ptr++] = encodeByte(input[i]>>2);
- buf[ptr++] = encodeByte(((input[i])&0x3)<<4);
- buf[ptr++] = '=';
- buf[ptr++] = '=';
- }
- // encode when exactly 2 elements (left) to encode
- if (remaining == 2) {
- buf[ptr++] = encodeByte(input[i]>>2);
- buf[ptr++] = encodeByte(
- ((input[i]&0x3)<<4) |
- ((input[i+1]>>4)&0xF));
- buf[ptr++] = encodeByte((input[i+1]&0xF)<<2);
- buf[ptr++] = '=';
- }
-
- return ptr;
- }
-
- private static CharSequence removeOptionalPlus(CharSequence s) {
- int len = s.length();
-
- if (len <= 1 || s.charAt(0) != '+') {
- return s;
- }
-
- s = s.subSequence(1, len);
- char ch = s.charAt(0);
- if ('0' <= ch && ch <= '9') {
- return s;
- }
- if ('.' == ch) {
- return s;
- }
-
- throw new NumberFormatException();
- }
-
- private static boolean isDigitOrPeriodOrSign(char ch) {
- if ('0' <= ch && ch <= '9') {
- return true;
- }
- if (ch == '+' || ch == '-' || ch == '.') {
- return true;
- }
- return false;
- }
- private static final DatatypeFactory datatypeFactory;
-
- static {
- try {
- datatypeFactory = DatatypeFactory.newInstance();
- } catch (DatatypeConfigurationException e) {
- throw new Error(e);
- }
- }
-
- private static final class CalendarFormatter {
-
- public static String doFormat(String format, Calendar cal) throws IllegalArgumentException {
- int fidx = 0;
- int flen = format.length();
- StringBuilder buf = new StringBuilder();
-
- while (fidx < flen) {
- char fch = format.charAt(fidx++);
-
- if (fch != '%') { // not a meta character
- buf.append(fch);
- continue;
- }
-
- // seen meta character. we don't do error check against the format
- switch (format.charAt(fidx++)) {
- case 'Y': // year
- formatYear(cal, buf);
- break;
-
- case 'M': // month
- formatMonth(cal, buf);
- break;
-
- case 'D': // days
- formatDays(cal, buf);
- break;
-
- case 'h': // hours
- formatHours(cal, buf);
- break;
-
- case 'm': // minutes
- formatMinutes(cal, buf);
- break;
-
- case 's': // parse seconds.
- formatSeconds(cal, buf);
- break;
-
- case 'z': // time zone
- formatTimeZone(cal, buf);
- break;
-
- default:
- // illegal meta character. impossible.
- throw new InternalError();
- }
- }
-
- return buf.toString();
- }
-
- private static void formatYear(Calendar cal, StringBuilder buf) {
- int year = cal.get(Calendar.YEAR);
-
- String s;
- if (year <= 0) // negative value
- {
- s = Integer.toString(1 - year);
- } else // positive value
- {
- s = Integer.toString(year);
- }
-
- while (s.length() < 4) {
- s = '0' + s;
- }
- if (year <= 0) {
- s = '-' + s;
- }
-
- buf.append(s);
- }
-
- private static void formatMonth(Calendar cal, StringBuilder buf) {
- formatTwoDigits(cal.get(Calendar.MONTH) + 1, buf);
- }
-
- private static void formatDays(Calendar cal, StringBuilder buf) {
- formatTwoDigits(cal.get(Calendar.DAY_OF_MONTH), buf);
- }
-
- private static void formatHours(Calendar cal, StringBuilder buf) {
- formatTwoDigits(cal.get(Calendar.HOUR_OF_DAY), buf);
- }
-
- private static void formatMinutes(Calendar cal, StringBuilder buf) {
- formatTwoDigits(cal.get(Calendar.MINUTE), buf);
- }
-
- private static void formatSeconds(Calendar cal, StringBuilder buf) {
- formatTwoDigits(cal.get(Calendar.SECOND), buf);
- if (cal.isSet(Calendar.MILLISECOND)) { // milliseconds
- int n = cal.get(Calendar.MILLISECOND);
- if (n != 0) {
- String ms = Integer.toString(n);
- while (ms.length() < 3) {
- ms = '0' + ms; // left 0 paddings.
- }
- buf.append('.');
- buf.append(ms);
- }
- }
- }
-
- /** formats time zone specifier. */
- private static void formatTimeZone(Calendar cal, StringBuilder buf) {
- TimeZone tz = cal.getTimeZone();
-
- if (tz == null) {
- return;
- }
-
- // otherwise print out normally.
- int offset = tz.getOffset(cal.getTime().getTime());
-
- if (offset == 0) {
- buf.append('Z');
- return;
- }
-
- if (offset >= 0) {
- buf.append('+');
- } else {
- buf.append('-');
- offset *= -1;
- }
-
- offset /= 60 * 1000; // offset is in milli-seconds
-
- formatTwoDigits(offset / 60, buf);
- buf.append(':');
- formatTwoDigits(offset % 60, buf);
- }
-
- /** formats Integer into two-character-wide string. */
- private static void formatTwoDigits(int n, StringBuilder buf) {
- // n is always non-negative.
- if (n < 10) {
- buf.append('0');
- }
- buf.append(n);
- }
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterInterface.java b/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterInterface.java
deleted file mode 100644
index 228673bc..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/DatatypeConverterInterface.java
+++ /dev/null
@@ -1,523 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * <p>
- * The DatatypeConverterInterface is for JAXB provider use only. A
- * JAXB provider must supply a class that implements this interface.
- * JAXB Providers are required to call the
- * {@link DatatypeConverter#setDatatypeConverter(DatatypeConverterInterface)
- * DatatypeConverter.setDatatypeConverter} api at
- * some point before the first marshal or unmarshal operation (perhaps during
- * the call to JAXBContext.newInstance). This step is necessary to configure
- * the converter that should be used to perform the print and parse
- * functionality. Calling this api repeatedly will have no effect - the
- * DatatypeConverter instance passed into the first invocation is the one that
- * will be used from then on.
- * </p>
- *
- * <p>
- * This interface defines the parse and print methods. There is one
- * parse and print method for each XML schema datatype specified in the
- * the default binding Table 5-1 in the JAXB specification.
- * </p>
- *
- * <p>
- * The parse and print methods defined here are invoked by the static parse
- * and print methods defined in the {@link DatatypeConverter DatatypeConverter}
- * class.
- * </p>
- *
- * <p>
- * A parse method for a XML schema datatype must be capable of converting any
- * lexical representation of the XML schema datatype ( specified by the
- * <a href="http://www.w3.org/TR/xmlschema-2/"> XML Schema Part2: Datatypes
- * specification</a> into a value in the value space of the XML schema datatype.
- * If an error is encountered during conversion, then an IllegalArgumentException
- * or a subclass of IllegalArgumentException must be thrown by the method.
- *
- * </p>
- *
- * <p>
- * A print method for a XML schema datatype can output any lexical
- * representation that is valid with respect to the XML schema datatype.
- * If an error is encountered during conversion, then an IllegalArgumentException,
- * or a subclass of IllegalArgumentException must be thrown by the method.
- * </p>
- *
- * The prefix xsd: is used to refer to XML schema datatypes
- * <a href="http://www.w3.org/TR/xmlschema-2/"> XML Schema Part2: Datatypes
- * specification.</a>
- *
- * <p>
- * @author <ul><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Ryan Shoemaker,Sun Microsystems Inc.</li></ul>
- * @see DatatypeConverter
- * @see ParseConversionEvent
- * @see PrintConversionEvent
- * @since JAXB1.0
- */
-
-public interface DatatypeConverterInterface {
- /**
- * <p>
- * Convert the string argument into a string.
- * @param lexicalXSDString
- * A lexical representation of the XML Schema datatype xsd:string
- * @return
- * A string that is the same as the input string.
- */
- public String parseString( String lexicalXSDString );
-
- /**
- * <p>
- * Convert the string argument into a BigInteger value.
- * @param lexicalXSDInteger
- * A string containing a lexical representation of
- * xsd:integer.
- * @return
- * A BigInteger value represented by the string argument.
- * @throws NumberFormatException <code>lexicalXSDInteger</code> is not a valid string representation of a {@link java.math.BigInteger} value.
- */
- public java.math.BigInteger parseInteger( String lexicalXSDInteger );
-
- /**
- * <p>
- * Convert the string argument into an int value.
- * @param lexicalXSDInt
- * A string containing a lexical representation of
- * xsd:int.
- * @return
- * An int value represented byte the string argument.
- * @throws NumberFormatException <code>lexicalXSDInt</code> is not a valid string representation of an <code>int</code> value.
- */
- public int parseInt( String lexicalXSDInt );
-
- /**
- * <p>
- * Converts the string argument into a long value.
- * @param lexicalXSDLong
- * A string containing lexical representation of
- * xsd:long.
- * @return
- * A long value represented by the string argument.
- * @throws NumberFormatException <code>lexicalXSDLong</code> is not a valid string representation of a <code>long</code> value.
- */
- public long parseLong( String lexicalXSDLong );
-
- /**
- * <p>
- * Converts the string argument into a short value.
- * @param lexicalXSDShort
- * A string containing lexical representation of
- * xsd:short.
- * @return
- * A short value represented by the string argument.
- * @throws NumberFormatException <code>lexicalXSDShort</code> is not a valid string representation of a <code>short</code> value.
- */
- public short parseShort( String lexicalXSDShort );
-
- /**
- * <p>
- * Converts the string argument into a BigDecimal value.
- * @param lexicalXSDDecimal
- * A string containing lexical representation of
- * xsd:decimal.
- * @return
- * A BigDecimal value represented by the string argument.
- * @throws NumberFormatException <code>lexicalXSDDecimal</code> is not a valid string representation of {@link java.math.BigDecimal}.
- */
- public java.math.BigDecimal parseDecimal( String lexicalXSDDecimal );
-
- /**
- * <p>
- * Converts the string argument into a float value.
- * @param lexicalXSDFloat
- * A string containing lexical representation of
- * xsd:float.
- * @return
- * A float value represented by the string argument.
- * @throws NumberFormatException <code>lexicalXSDFloat</code> is not a valid string representation of a <code>float</code> value.
- */
- public float parseFloat( String lexicalXSDFloat );
-
- /**
- * <p>
- * Converts the string argument into a double value.
- * @param lexicalXSDDouble
- * A string containing lexical representation of
- * xsd:double.
- * @return
- * A double value represented by the string argument.
- * @throws NumberFormatException <code>lexicalXSDDouble</code> is not a valid string representation of a <code>double</code> value.
- */
- public double parseDouble( String lexicalXSDDouble );
-
- /**
- * <p>
- * Converts the string argument into a boolean value.
- * @param lexicalXSDBoolean
- * A string containing lexical representation of
- * xsd:boolean.
- * @return
- * A boolean value represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:boolean.
- */
- public boolean parseBoolean( String lexicalXSDBoolean );
-
- /**
- * <p>
- * Converts the string argument into a byte value.
- * @param lexicalXSDByte
- * A string containing lexical representation of
- * xsd:byte.
- * @return
- * A byte value represented by the string argument.
- * @throws NumberFormatException <code>lexicalXSDByte</code> does not contain a parseable byte.
- * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:byte.
- */
- public byte parseByte( String lexicalXSDByte );
-
- /**
- * <p>
- * Converts the string argument into a QName value.
- *
- * <p>
- * String parameter <tt>lexicalXSDQname</tt> must conform to lexical value space specifed at
- * <a href="http://www.w3.org/TR/xmlschema-2/#QName">XML Schema Part 2:Datatypes specification:QNames</a>
- *
- * @param lexicalXSDQName
- * A string containing lexical representation of xsd:QName.
- * @param nsc
- * A namespace context for interpreting a prefix within a QName.
- * @return
- * A QName value represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to XML Schema Part 2 specification or
- * if namespace prefix of <tt>lexicalXSDQname</tt> is not bound to a URI in NamespaceContext <tt>nsc</tt>.
- */
- public javax.xml.namespace.QName parseQName( String lexicalXSDQName,
- javax.xml.namespace.NamespaceContext nsc);
-
- /**
- * <p>
- * Converts the string argument into a Calendar value.
- * @param lexicalXSDDateTime
- * A string containing lexical representation of
- * xsd:datetime.
- * @return
- * A Calendar object represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:dateTime.
- */
- public java.util.Calendar parseDateTime( String lexicalXSDDateTime );
-
- /**
- * <p>
- * Converts the string argument into an array of bytes.
- * @param lexicalXSDBase64Binary
- * A string containing lexical representation
- * of xsd:base64Binary.
- * @return
- * An array of bytes represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:base64Binary
- */
- public byte[] parseBase64Binary( String lexicalXSDBase64Binary );
-
- /**
- * <p>
- * Converts the string argument into an array of bytes.
- * @param lexicalXSDHexBinary
- * A string containing lexical representation of
- * xsd:hexBinary.
- * @return
- * An array of bytes represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:hexBinary.
- */
- public byte[] parseHexBinary( String lexicalXSDHexBinary );
-
- /**
- * <p>
- * Converts the string argument into a long value.
- * @param lexicalXSDUnsignedInt
- * A string containing lexical representation
- * of xsd:unsignedInt.
- * @return
- * A long value represented by the string argument.
- * @throws NumberFormatException if string parameter can not be parsed into a <tt>long</tt> value.
- */
- public long parseUnsignedInt( String lexicalXSDUnsignedInt );
-
- /**
- * <p>
- * Converts the string argument into an int value.
- * @param lexicalXSDUnsignedShort
- * A string containing lexical
- * representation of xsd:unsignedShort.
- * @return
- * An int value represented by the string argument.
- * @throws NumberFormatException if string parameter can not be parsed into an <tt>int</tt> value.
- */
- public int parseUnsignedShort( String lexicalXSDUnsignedShort );
-
- /**
- * <p>
- * Converts the string argument into a Calendar value.
- * @param lexicalXSDTime
- * A string containing lexical representation of
- * xsd:Time.
- * @return
- * A Calendar value represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:Time.
- */
- public java.util.Calendar parseTime( String lexicalXSDTime );
-
- /**
- * <p>
- * Converts the string argument into a Calendar value.
- * @param lexicalXSDDate
- * A string containing lexical representation of
- * xsd:Date.
- * @return
- * A Calendar value represented by the string argument.
- * @throws IllegalArgumentException if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:Date.
- */
- public java.util.Calendar parseDate( String lexicalXSDDate );
-
- /**
- * <p>
- * Return a string containing the lexical representation of the
- * simple type.
- * @param lexicalXSDAnySimpleType
- * A string containing lexical
- * representation of the simple type.
- * @return
- * A string containing the lexical representation of the
- * simple type.
- */
- public String parseAnySimpleType( String lexicalXSDAnySimpleType );
-
- /**
- * <p>
- * Converts the string argument into a string.
- * @param val
- * A string value.
- * @return
- * A string containing a lexical representation of xsd:string
- */
- public String printString( String val );
-
- /**
- * <p>
- * Converts a BigInteger value into a string.
- * @param val
- * A BigInteger value
- * @return
- * A string containing a lexical representation of xsd:integer
- * @throws IllegalArgumentException <tt>val</tt> is null.
- */
- public String printInteger( java.math.BigInteger val );
-
- /**
- * <p>
- * Converts an int value into a string.
- * @param val
- * An int value
- * @return
- * A string containing a lexical representation of xsd:int
- */
- public String printInt( int val );
-
-
- /**
- * <p>
- * Converts a long value into a string.
- * @param val
- * A long value
- * @return
- * A string containing a lexical representation of xsd:long
- */
- public String printLong( long val );
-
- /**
- * <p>
- * Converts a short value into a string.
- * @param val
- * A short value
- * @return
- * A string containing a lexical representation of xsd:short
- */
- public String printShort( short val );
-
- /**
- * <p>
- * Converts a BigDecimal value into a string.
- * @param val
- * A BigDecimal value
- * @return
- * A string containing a lexical representation of xsd:decimal
- * @throws IllegalArgumentException <tt>val</tt> is null.
- */
- public String printDecimal( java.math.BigDecimal val );
-
- /**
- * <p>
- * Converts a float value into a string.
- * @param val
- * A float value
- * @return
- * A string containing a lexical representation of xsd:float
- */
- public String printFloat( float val );
-
- /**
- * <p>
- * Converts a double value into a string.
- * @param val
- * A double value
- * @return
- * A string containing a lexical representation of xsd:double
- */
- public String printDouble( double val );
-
- /**
- * <p>
- * Converts a boolean value into a string.
- * @param val
- * A boolean value
- * @return
- * A string containing a lexical representation of xsd:boolean
- */
- public String printBoolean( boolean val );
-
- /**
- * <p>
- * Converts a byte value into a string.
- * @param val
- * A byte value
- * @return
- * A string containing a lexical representation of xsd:byte
- */
- public String printByte( byte val );
-
- /**
- * <p>
- * Converts a QName instance into a string.
- * @param val
- * A QName value
- * @param nsc
- * A namespace context for interpreting a prefix within a QName.
- * @return
- * A string containing a lexical representation of QName
- * @throws IllegalArgumentException if <tt>val</tt> is null or
- * if <tt>nsc</tt> is non-null or <tt>nsc.getPrefix(nsprefixFromVal)</tt> is null.
- */
- public String printQName( javax.xml.namespace.QName val,
- javax.xml.namespace.NamespaceContext nsc );
-
- /**
- * <p>
- * Converts a Calendar value into a string.
- * @param val
- * A Calendar value
- * @return
- * A string containing a lexical representation of xsd:dateTime
- * @throws IllegalArgumentException if <tt>val</tt> is null.
- */
- public String printDateTime( java.util.Calendar val );
-
- /**
- * <p>
- * Converts an array of bytes into a string.
- * @param val
- * an array of bytes
- * @return
- * A string containing a lexical representation of xsd:base64Binary
- * @throws IllegalArgumentException if <tt>val</tt> is null.
- */
- public String printBase64Binary( byte[] val );
-
- /**
- * <p>
- * Converts an array of bytes into a string.
- * @param val
- * an array of bytes
- * @return
- * A string containing a lexical representation of xsd:hexBinary
- * @throws IllegalArgumentException if <tt>val</tt> is null.
- */
- public String printHexBinary( byte[] val );
-
- /**
- * <p>
- * Converts a long value into a string.
- * @param val
- * A long value
- * @return
- * A string containing a lexical representation of xsd:unsignedInt
- */
- public String printUnsignedInt( long val );
-
- /**
- * <p>
- * Converts an int value into a string.
- * @param val
- * An int value
- * @return
- * A string containing a lexical representation of xsd:unsignedShort
- */
- public String printUnsignedShort( int val );
-
- /**
- * <p>
- * Converts a Calendar value into a string.
- * @param val
- * A Calendar value
- * @return
- * A string containing a lexical representation of xsd:time
- * @throws IllegalArgumentException if <tt>val</tt> is null.
- */
- public String printTime( java.util.Calendar val );
-
- /**
- * <p>
- * Converts a Calendar value into a string.
- * @param val
- * A Calendar value
- * @return
- * A string containing a lexical representation of xsd:date
- * @throws IllegalArgumentException if <tt>val</tt> is null.
- */
- public String printDate( java.util.Calendar val );
-
- /**
- * <p>
- * Converts a string value into a string.
- * @param val
- * A string value
- * @return
- * A string containing a lexical representation of xsd:AnySimpleType
- */
- public String printAnySimpleType( String val );
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/Element.java b/src/share/jaxws_classes/javax/xml/bind/Element.java
deleted file mode 100644
index 6e576d05..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/Element.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * This is an element marker interface.
- *
- * Under certain circumstances, it is necessary for the binding compiler to
- * generate derived java content classes that implement this interface. In
- * those cases, client applications must supply element instances rather than
- * types of elements. For more detail, see section 5.7 "Element Declaration"
- * and 5.7.1 "Bind to Java Element Interface" of the specification.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @since JAXB1.0
- */
-
-public interface Element {
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/GetPropertyAction.java b/src/share/jaxws_classes/javax/xml/bind/GetPropertyAction.java
deleted file mode 100644
index 45867c17..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/GetPropertyAction.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import java.security.PrivilegedAction;
-
-/**
- * {@link PrivilegedAction} that gets the system property value.
- * @author Kohsuke Kawaguchi
- */
-final class GetPropertyAction implements PrivilegedAction<String> {
- private final String propertyName;
-
- public GetPropertyAction(String propertyName) {
- this.propertyName = propertyName;
- }
-
- public String run() {
- return System.getProperty(propertyName);
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/JAXB.java b/src/share/jaxws_classes/javax/xml/bind/JAXB.java
deleted file mode 100644
index 3c164546..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/JAXB.java
+++ /dev/null
@@ -1,629 +0,0 @@
-/*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-import java.beans.Introspector;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.Writer;
-import java.lang.ref.WeakReference;
-import java.net.HttpURLConnection;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLConnection;
-
-/**
- * Class that defines convenience methods for common, simple use of JAXB.
- *
- * <p>
- * Methods defined in this class are convenience methods that combine several basic operations
- * in the {@link JAXBContext}, {@link Unmarshaller}, and {@link Marshaller}.
- *
- * They are designed
- * to be the prefered methods for developers new to JAXB. They have
- * the following characterstics:
- *
- * <ol>
- * <li>Generally speaking, the performance is not necessarily optimal.
- * It is expected that people who need to write performance
- * critical code will use the rest of the JAXB API directly.
- * <li>Errors that happen during the processing is wrapped into
- * {@link DataBindingException} (which will have {@link JAXBException}
- * as its {@link Throwable#getCause() cause}. It is expected that
- * people who prefer the checked exception would use
- * the rest of the JAXB API directly.
- * </ol>
- *
- * <p>
- * In addition, the <tt>unmarshal</tt> methods have the following characteristic:
- *
- * <ol>
- * <li>Schema validation is not performed on the input XML.
- * The processing will try to continue even if there
- * are errors in the XML, as much as possible. Only as
- * the last resort, this method fails with {@link DataBindingException}.
- * </ol>
- *
- * <p>
- * Similarly, the <tt>marshal</tt> methods have the following characteristic:
- * <ol>
- * <li>The processing will try to continue even if the Java object tree
- * does not meet the validity requirement. Only as
- * the last resort, this method fails with {@link DataBindingException}.
- * </ol>
- *
- *
- * <p>
- * All the methods on this class require non-null arguments to all parameters.
- * The <tt>unmarshal</tt> methods either fail with an exception or return
- * a non-null value.
- *
- * @author Kohsuke Kawaguchi
- * @since 2.1
- */
-public final class JAXB {
- /**
- * No instanciation is allowed.
- */
- private JAXB() {}
-
- /**
- * To improve the performance, we'll cache the last {@link JAXBContext} used.
- */
- private static final class Cache {
- final Class type;
- final JAXBContext context;
-
- public Cache(Class type) throws JAXBException {
- this.type = type;
- this.context = JAXBContext.newInstance(type);
- }
- }
-
- /**
- * Cache. We don't want to prevent the {@link Cache#type} from GC-ed,
- * hence {@link WeakReference}.
- */
- private static volatile WeakReference<Cache> cache;
-
- /**
- * Obtains the {@link JAXBContext} from the given type,
- * by using the cache if possible.
- *
- * <p>
- * We don't use locks to control access to {@link #cache}, but this code
- * should be thread-safe thanks to the immutable {@link Cache} and {@code volatile}.
- */
- private static <T> JAXBContext getContext(Class<T> type) throws JAXBException {
- WeakReference<Cache> c = cache;
- if(c!=null) {
- Cache d = c.get();
- if(d!=null && d.type==type)
- return d.context;
- }
-
- // overwrite the cache
- Cache d = new Cache(type);
- cache = new WeakReference<Cache>(d);
-
- return d.context;
- }
-
- /**
- * Reads in a Java object tree from the given XML input.
- *
- * @param xml
- * Reads the entire file as XML.
- */
- public static <T> T unmarshal( File xml, Class<T> type ) {
- try {
- JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(new StreamSource(xml), type);
- return item.getValue();
- } catch (JAXBException e) {
- throw new DataBindingException(e);
- }
- }
-
- /**
- * Reads in a Java object tree from the given XML input.
- *
- * @param xml
- * The resource pointed by the URL is read in its entirety.
- */
- public static <T> T unmarshal( URL xml, Class<T> type ) {
- try {
- JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(toSource(xml), type);
- return item.getValue();
- } catch (JAXBException e) {
- throw new DataBindingException(e);
- } catch (IOException e) {
- throw new DataBindingException(e);
- }
- }
-
- /**
- * Reads in a Java object tree from the given XML input.
- *
- * @param xml
- * The URI is {@link URI#toURL() turned into URL} and then
- * follows the handling of <tt>URL</tt>.
- */
- public static <T> T unmarshal( URI xml, Class<T> type ) {
- try {
- JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(toSource(xml), type);
- return item.getValue();
- } catch (JAXBException e) {
- throw new DataBindingException(e);
- } catch (IOException e) {
- throw new DataBindingException(e);
- }
- }
-
- /**
- * Reads in a Java object tree from the given XML input.
- *
- * @param xml
- * The string is first interpreted as an absolute <tt>URI</tt>.
- * If it's not {@link URI#isAbsolute() a valid absolute URI},
- * then it's interpreted as a <tt>File</tt>
- */
- public static <T> T unmarshal( String xml, Class<T> type ) {
- try {
- JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(toSource(xml), type);
- return item.getValue();
- } catch (JAXBException e) {
- throw new DataBindingException(e);
- } catch (IOException e) {
- throw new DataBindingException(e);
- }
- }
-
- /**
- * Reads in a Java object tree from the given XML input.
- *
- * @param xml
- * The entire stream is read as an XML infoset.
- * Upon a successful completion, the stream will be closed by this method.
- */
- public static <T> T unmarshal( InputStream xml, Class<T> type ) {
- try {
- JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(toSource(xml), type);
- return item.getValue();
- } catch (JAXBException e) {
- throw new DataBindingException(e);
- } catch (IOException e) {
- throw new DataBindingException(e);
- }
- }
-
- /**
- * Reads in a Java object tree from the given XML input.
- *
- * @param xml
- * The character stream is read as an XML infoset.
- * The encoding declaration in the XML will be ignored.
- * Upon a successful completion, the stream will be closed by this method.
- */
- public static <T> T unmarshal( Reader xml, Class<T> type ) {
- try {
- JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(toSource(xml), type);
- return item.getValue();
- } catch (JAXBException e) {
- throw new DataBindingException(e);
- } catch (IOException e) {
- throw new DataBindingException(e);
- }
- }
-
- /**
- * Reads in a Java object tree from the given XML input.
- *
- * @param xml
- * The XML infoset that the {@link Source} represents is read.
- */
- public static <T> T unmarshal( Source xml, Class<T> type ) {
- try {
- JAXBElement<T> item = getContext(type).createUnmarshaller().unmarshal(toSource(xml), type);
- return item.getValue();
- } catch (JAXBException e) {
- throw new DataBindingException(e);
- } catch (IOException e) {
- throw new DataBindingException(e);
- }
- }
-
-
-
- /**
- * Creates {@link Source} from various XML representation.
- * See {@link #unmarshal} for the conversion rules.
- */
- private static Source toSource(Object xml) throws IOException {
- if(xml==null)
- throw new IllegalArgumentException("no XML is given");
-
- if (xml instanceof String) {
- try {
- xml=new URI((String)xml);
- } catch (URISyntaxException e) {
- xml=new File((String)xml);
- }
- }
- if (xml instanceof File) {
- File file = (File) xml;
- return new StreamSource(file);
- }
- if (xml instanceof URI) {
- URI uri = (URI) xml;
- xml=uri.toURL();
- }
- if (xml instanceof URL) {
- URL url = (URL) xml;
- return new StreamSource(url.toExternalForm());
- }
- if (xml instanceof InputStream) {
- InputStream in = (InputStream) xml;
- return new StreamSource(in);
- }
- if (xml instanceof Reader) {
- Reader r = (Reader) xml;
- return new StreamSource(r);
- }
- if (xml instanceof Source) {
- return (Source) xml;
- }
- throw new IllegalArgumentException("I don't understand how to handle "+xml.getClass());
- }
-
- /**
- * Writes a Java object tree to XML and store it to the specified location.
- *
- * @param jaxbObject
- * The Java object to be marshalled into XML. If this object is
- * a {@link JAXBElement}, it will provide the root tag name and
- * the body. If this object has {@link XmlRootElement}
- * on its class definition, that will be used as the root tag name
- * and the given object will provide the body. Otherwise,
- * the root tag name is {@link Introspector#decapitalize(String) infered} from
- * {@link Class#getSimpleName() the short class name}.
- * This parameter must not be null.
- *
- * @param xml
- * XML will be written to this file. If it already exists,
- * it will be overwritten.
- *
- * @throws DataBindingException
- * If the operation fails, such as due to I/O error, unbindable classes.
- */
- public static void marshal( Object jaxbObject, File xml ) {
- _marshal(jaxbObject,xml);
- }
-
- /**
- * Writes a Java object tree to XML and store it to the specified location.
- *
- * @param jaxbObject
- * The Java object to be marshalled into XML. If this object is
- * a {@link JAXBElement}, it will provide the root tag name and
- * the body. If this object has {@link XmlRootElement}
- * on its class definition, that will be used as the root tag name
- * and the given object will provide the body. Otherwise,
- * the root tag name is {@link Introspector#decapitalize(String) infered} from
- * {@link Class#getSimpleName() the short class name}.
- * This parameter must not be null.
- *
- * @param xml
- * The XML will be {@link URLConnection#getOutputStream() sent} to the
- * resource pointed by this URL. Note that not all <tt>URL</tt>s support
- * such operation, and exact semantics depends on the <tt>URL</tt>
- * implementations. In case of {@link HttpURLConnection HTTP URLs},
- * this will perform HTTP POST.
- *
- * @throws DataBindingException
- * If the operation fails, such as due to I/O error, unbindable classes.
- */
- public static void marshal( Object jaxbObject, URL xml ) {
- _marshal(jaxbObject,xml);
- }
-
- /**
- * Writes a Java object tree to XML and store it to the specified location.
- *
- * @param jaxbObject
- * The Java object to be marshalled into XML. If this object is
- * a {@link JAXBElement}, it will provide the root tag name and
- * the body. If this object has {@link XmlRootElement}
- * on its class definition, that will be used as the root tag name
- * and the given object will provide the body. Otherwise,
- * the root tag name is {@link Introspector#decapitalize(String) infered} from
- * {@link Class#getSimpleName() the short class name}.
- * This parameter must not be null.
- *
- * @param xml
- * The URI is {@link URI#toURL() turned into URL} and then
- * follows the handling of <tt>URL</tt>. See above.
- *
- * @throws DataBindingException
- * If the operation fails, such as due to I/O error, unbindable classes.
- */
- public static void marshal( Object jaxbObject, URI xml ) {
- _marshal(jaxbObject,xml);
- }
-
- /**
- * Writes a Java object tree to XML and store it to the specified location.
- *
- * @param jaxbObject
- * The Java object to be marshalled into XML. If this object is
- * a {@link JAXBElement}, it will provide the root tag name and
- * the body. If this object has {@link XmlRootElement}
- * on its class definition, that will be used as the root tag name
- * and the given object will provide the body. Otherwise,
- * the root tag name is {@link Introspector#decapitalize(String) infered} from
- * {@link Class#getSimpleName() the short class name}.
- * This parameter must not be null.
- *
- * @param xml
- * The string is first interpreted as an absolute <tt>URI</tt>.
- * If it's not {@link URI#isAbsolute() a valid absolute URI},
- * then it's interpreted as a <tt>File</tt>
- *
- * @throws DataBindingException
- * If the operation fails, such as due to I/O error, unbindable classes.
- */
- public static void marshal( Object jaxbObject, String xml ) {
- _marshal(jaxbObject,xml);
- }
-
- /**
- * Writes a Java object tree to XML and store it to the specified location.
- *
- * @param jaxbObject
- * The Java object to be marshalled into XML. If this object is
- * a {@link JAXBElement}, it will provide the root tag name and
- * the body. If this object has {@link XmlRootElement}
- * on its class definition, that will be used as the root tag name
- * and the given object will provide the body. Otherwise,
- * the root tag name is {@link Introspector#decapitalize(String) infered} from
- * {@link Class#getSimpleName() the short class name}.
- * This parameter must not be null.
- *
- * @param xml
- * The XML will be sent to the given {@link OutputStream}.
- * Upon a successful completion, the stream will be closed by this method.
- *
- * @throws DataBindingException
- * If the operation fails, such as due to I/O error, unbindable classes.
- */
- public static void marshal( Object jaxbObject, OutputStream xml ) {
- _marshal(jaxbObject,xml);
- }
-
- /**
- * Writes a Java object tree to XML and store it to the specified location.
- *
- * @param jaxbObject
- * The Java object to be marshalled into XML. If this object is
- * a {@link JAXBElement}, it will provide the root tag name and
- * the body. If this object has {@link XmlRootElement}
- * on its class definition, that will be used as the root tag name
- * and the given object will provide the body. Otherwise,
- * the root tag name is {@link Introspector#decapitalize(String) infered} from
- * {@link Class#getSimpleName() the short class name}.
- * This parameter must not be null.
- *
- * @param xml
- * The XML will be sent as a character stream to the given {@link Writer}.
- * Upon a successful completion, the stream will be closed by this method.
- *
- * @throws DataBindingException
- * If the operation fails, such as due to I/O error, unbindable classes.
- */
- public static void marshal( Object jaxbObject, Writer xml ) {
- _marshal(jaxbObject,xml);
- }
-
- /**
- * Writes a Java object tree to XML and store it to the specified location.
- *
- * @param jaxbObject
- * The Java object to be marshalled into XML. If this object is
- * a {@link JAXBElement}, it will provide the root tag name and
- * the body. If this object has {@link XmlRootElement}
- * on its class definition, that will be used as the root tag name
- * and the given object will provide the body. Otherwise,
- * the root tag name is {@link Introspector#decapitalize(String) infered} from
- * {@link Class#getSimpleName() the short class name}.
- * This parameter must not be null.
- *
- * @param xml
- * The XML will be sent to the {@link Result} object.
- *
- * @throws DataBindingException
- * If the operation fails, such as due to I/O error, unbindable classes.
- */
- public static void marshal( Object jaxbObject, Result xml ) {
- _marshal(jaxbObject,xml);
- }
-
- /**
- * Writes a Java object tree to XML and store it to the specified location.
- *
- * <p>
- * This method is a convenience method that combines several basic operations
- * in the {@link JAXBContext} and {@link Marshaller}. This method is designed
- * to be the prefered method for developers new to JAXB. This method
- * has the following characterstics:
- *
- * <ol>
- * <li>Generally speaking, the performance is not necessarily optimal.
- * It is expected that those people who need to write performance
- * critical code will use the rest of the JAXB API directly.
- * <li>Errors that happen during the processing is wrapped into
- * {@link DataBindingException} (which will have {@link JAXBException}
- * as its {@link Throwable#getCause() cause}. It is expected that
- * those people who prefer the checked exception would use
- * the rest of the JAXB API directly.
- * </ol>
- *
- * @param jaxbObject
- * The Java object to be marshalled into XML. If this object is
- * a {@link JAXBElement}, it will provide the root tag name and
- * the body. If this object has {@link XmlRootElement}
- * on its class definition, that will be used as the root tag name
- * and the given object will provide the body. Otherwise,
- * the root tag name is {@link Introspector#decapitalize(String) infered} from
- * {@link Class#getSimpleName() the short class name}.
- * This parameter must not be null.
- *
- * @param xml
- * Represents the receiver of XML. Objects of the following types are allowed.
- *
- * <table><tr>
- * <th>Type</th>
- * <th>Operation</th>
- * </tr><tr>
- * <td>{@link File}</td>
- * <td>XML will be written to this file. If it already exists,
- * it will be overwritten.</td>
- * </tr><tr>
- * <td>{@link URL}</td>
- * <td>The XML will be {@link URLConnection#getOutputStream() sent} to the
- * resource pointed by this URL. Note that not all <tt>URL</tt>s support
- * such operation, and exact semantics depends on the <tt>URL</tt>
- * implementations. In case of {@link HttpURLConnection HTTP URLs},
- * this will perform HTTP POST.</td>
- * </tr><tr>
- * <td>{@link URI}</td>
- * <td>The URI is {@link URI#toURL() turned into URL} and then
- * follows the handling of <tt>URL</tt>. See above.</td>
- * </tr><tr>
- * <td>{@link String}</td>
- * <td>The string is first interpreted as an absolute <tt>URI</tt>.
- * If it's not {@link URI#isAbsolute() a valid absolute URI},
- * then it's interpreted as a <tt>File</tt></td>
- * </tr><tr>
- * <td>{@link OutputStream}</td>
- * <td>The XML will be sent to the given {@link OutputStream}.
- * Upon a successful completion, the stream will be closed by this method.</td>
- * </tr><tr>
- * <td>{@link Writer}</td>
- * <td>The XML will be sent as a character stream to the given {@link Writer}.
- * Upon a successful completion, the stream will be closed by this method.</td>
- * </tr><tr>
- * <td>{@link Result}</td>
- * <td>The XML will be sent to the {@link Result} object.</td>
- * </tr></table>
- *
- * @throws DataBindingException
- * If the operation fails, such as due to I/O error, unbindable classes.
- */
- private static void _marshal( Object jaxbObject, Object xml ) {
- try {
- JAXBContext context;
-
- if(jaxbObject instanceof JAXBElement) {
- context = getContext(((JAXBElement<?>)jaxbObject).getDeclaredType());
- } else {
- Class<?> clazz = jaxbObject.getClass();
- XmlRootElement r = clazz.getAnnotation(XmlRootElement.class);
- context = getContext(clazz);
- if(r==null) {
- // we need to infer the name
- jaxbObject = new JAXBElement(new QName(inferName(clazz)),clazz,jaxbObject);
- }
- }
-
- Marshaller m = context.createMarshaller();
- m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,true);
- m.marshal(jaxbObject, toResult(xml));
- } catch (JAXBException e) {
- throw new DataBindingException(e);
- } catch (IOException e) {
- throw new DataBindingException(e);
- }
- }
-
- private static String inferName(Class clazz) {
- return Introspector.decapitalize(clazz.getSimpleName());
- }
-
- /**
- * Creates {@link Result} from various XML representation.
- * See {@link #_marshal(Object,Object)} for the conversion rules.
- */
- private static Result toResult(Object xml) throws IOException {
- if(xml==null)
- throw new IllegalArgumentException("no XML is given");
-
- if (xml instanceof String) {
- try {
- xml=new URI((String)xml);
- } catch (URISyntaxException e) {
- xml=new File((String)xml);
- }
- }
- if (xml instanceof File) {
- File file = (File) xml;
- return new StreamResult(file);
- }
- if (xml instanceof URI) {
- URI uri = (URI) xml;
- xml=uri.toURL();
- }
- if (xml instanceof URL) {
- URL url = (URL) xml;
- URLConnection con = url.openConnection();
- con.setDoOutput(true);
- con.setDoInput(false);
- con.connect();
- return new StreamResult(con.getOutputStream());
- }
- if (xml instanceof OutputStream) {
- OutputStream os = (OutputStream) xml;
- return new StreamResult(os);
- }
- if (xml instanceof Writer) {
- Writer w = (Writer)xml;
- return new StreamResult(w);
- }
- if (xml instanceof Result) {
- return (Result) xml;
- }
- throw new IllegalArgumentException("I don't understand how to handle "+xml.getClass());
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/JAXBContext.java b/src/share/jaxws_classes/javax/xml/bind/JAXBContext.java
deleted file mode 100644
index 2d3c1255..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/JAXBContext.java
+++ /dev/null
@@ -1,768 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import org.w3c.dom.Node;
-
-import java.util.Collections;
-import java.util.Map;
-import java.util.Properties;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * <p>
- * The <tt>JAXBContext</tt> class provides the client's entry point to the
- * JAXB API. It provides an abstraction for managing the XML/Java binding
- * information necessary to implement the JAXB binding framework operations:
- * unmarshal, marshal and validate.
- *
- * <p>A client application normally obtains new instances of this class using
- * one of these two styles for newInstance methods, although there are other
- * specialized forms of the method available:
- *
- * <ul>
- * <li>{@link #newInstance(String,ClassLoader) JAXBContext.newInstance( "com.acme.foo:com.acme.bar" )} <br/>
- * The JAXBContext instance is initialized from a list of colon
- * separated Java package names. Each java package contains
- * JAXB mapped classes, schema-derived classes and/or user annotated
- * classes. Additionally, the java package may contain JAXB package annotations
- * that must be processed. (see JLS, Section 7.4.1 "Named Packages").
- * </li>
- * <li>{@link #newInstance(Class...) JAXBContext.newInstance( com.acme.foo.Foo.class )} <br/>
- * The JAXBContext instance is initialized with class(es)
- * passed as parameter(s) and classes that are statically reachable from
- * these class(es). See {@link #newInstance(Class...)} for details.
- * </li>
- * </ul>
- *
- * <p>
- * <i><B>SPEC REQUIREMENT:</B> the provider must supply an implementation
- * class containing the following method signatures:</i>
- *
- * <pre>
- * public static JAXBContext createContext( String contextPath, ClassLoader classLoader, Map&lt;String,Object> properties ) throws JAXBException
- * public static JAXBContext createContext( Class[] classes, Map&lt;String,Object> properties ) throws JAXBException
- * </pre>
- *
- * <p><i>
- * The following JAXB 1.0 requirement is only required for schema to
- * java interface/implementation binding. It does not apply to JAXB annotated
- * classes. JAXB Providers must generate a <tt>jaxb.properties</tt> file in
- * each package containing schema derived classes. The property file must
- * contain a property named <tt>javax.xml.bind.context.factory</tt> whose
- * value is the name of the class that implements the <tt>createContext</tt>
- * APIs.</i>
- *
- * <p><i>
- * The class supplied by the provider does not have to be assignable to
- * <tt>javax.xml.bind.JAXBContext</tt>, it simply has to provide a class that
- * implements the <tt>createContext</tt> APIs.</i>
- *
- * <p><i>
- * In addition, the provider must call the
- * {@link DatatypeConverter#setDatatypeConverter(DatatypeConverterInterface)
- * DatatypeConverter.setDatatypeConverter} api prior to any client
- * invocations of the marshal and unmarshal methods. This is necessary to
- * configure the datatype converter that will be used during these operations.</i>
- *
- * <a name="Unmarshalling"></a>
- * <h3>Unmarshalling</h3>
- * <p>
- * The {@link Unmarshaller} class provides the client application the ability
- * to convert XML data into a tree of Java content objects.
- * The unmarshal method allows for
- * any global XML element declared in the schema to be unmarshalled as
- * the root of an instance document.
- * Additionally, the unmarshal method allows for an unrecognized root element that
- * has an xsi:type attribute's value that references a type definition declared in
- * the schema to be unmarshalled as the root of an instance document.
- * The <tt>JAXBContext</tt> object
- * allows the merging of global elements and type definitions across a set of schemas (listed
- * in the <tt>contextPath</tt>). Since each schema in the schema set can belong
- * to distinct namespaces, the unification of schemas to an unmarshalling
- * context should be namespace independent. This means that a client
- * application is able to unmarshal XML documents that are instances of
- * any of the schemas listed in the <tt>contextPath</tt>. For example:
- *
- * <pre>
- * JAXBContext jc = JAXBContext.newInstance( "com.acme.foo:com.acme.bar" );
- * Unmarshaller u = jc.createUnmarshaller();
- * FooObject fooObj = (FooObject)u.unmarshal( new File( "foo.xml" ) ); // ok
- * BarObject barObj = (BarObject)u.unmarshal( new File( "bar.xml" ) ); // ok
- * BazObject bazObj = (BazObject)u.unmarshal( new File( "baz.xml" ) ); // error, "com.acme.baz" not in contextPath
- * </pre>
- *
- * <p>
- * The client application may also generate Java content trees explicitly rather
- * than unmarshalling existing XML data. For all JAXB-annotated value classes,
- * an application can create content using constructors.
- * For schema-derived interface/implementation classes and for the
- * creation of elements that are not bound to a JAXB-annotated
- * class, an application needs to have access and knowledge about each of
- * the schema derived <tt> ObjectFactory</tt> classes that exist in each of
- * java packages contained in the <tt>contextPath</tt>. For each schema
- * derived java class, there is a static factory method that produces objects
- * of that type. For example,
- * assume that after compiling a schema, you have a package <tt>com.acme.foo</tt>
- * that contains a schema derived interface named <tt>PurchaseOrder</tt>. In
- * order to create objects of that type, the client application would use the
- * factory method like this:
- *
- * <pre>
- * com.acme.foo.PurchaseOrder po =
- * com.acme.foo.ObjectFactory.createPurchaseOrder();
- * </pre>
- *
- * <p>
- * Once the client application has an instance of the the schema derived object,
- * it can use the mutator methods to set content on it.
- *
- * <p>
- * For more information on the generated <tt>ObjectFactory</tt> classes, see
- * Section 4.2 <i>Java Package</i> of the specification.
- *
- * <p>
- * <i><B>SPEC REQUIREMENT:</B> the provider must generate a class in each
- * package that contains all of the necessary object factory methods for that
- * package named ObjectFactory as well as the static
- * <tt>newInstance( javaContentInterface )</tt> method</i>
- *
- * <h3>Marshalling</h3>
- * <p>
- * The {@link Marshaller} class provides the client application the ability
- * to convert a Java content tree back into XML data. There is no difference
- * between marshalling a content tree that is created manually using the factory
- * methods and marshalling a content tree that is the result an <tt>unmarshal
- * </tt> operation. Clients can marshal a java content tree back to XML data
- * to a <tt>java.io.OutputStream</tt> or a <tt>java.io.Writer</tt>. The
- * marshalling process can alternatively produce SAX2 event streams to a
- * registered <tt>ContentHandler</tt> or produce a DOM Node object.
- * Client applications have control over the output encoding as well as
- * whether or not to marshal the XML data as a complete document or
- * as a fragment.
- *
- * <p>
- * Here is a simple example that unmarshals an XML document and then marshals
- * it back out:
- *
- * <pre>
- * JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
- *
- * // unmarshal from foo.xml
- * Unmarshaller u = jc.createUnmarshaller();
- * FooObject fooObj = (FooObject)u.unmarshal( new File( "foo.xml" ) );
- *
- * // marshal to System.out
- * Marshaller m = jc.createMarshaller();
- * m.marshal( fooObj, System.out );
- * </pre>
- *
- *
- * <h3>Validation</h3>
- * <p>
- * Validation has been changed significantly since JAXB 1.0. The {@link Validator}
- * class has been deprecated and made optional. This means that you are advised
- * not to use this class and, in fact, it may not even be available depending on
- * your JAXB provider. JAXB 1.0 client applications that rely on <tt>Validator</tt>
- * will still work properly when deployed with the JAXB 1.0 runtime system.
- *
- * In JAXB 2.0, the {@link Unmarshaller} has included convenince methods that expose
- * the JAXP 1.3 {@link javax.xml.validation} framework. Please refer to the
- * {@link Unmarshaller#setSchema(javax.xml.validation.Schema)} API for more
- * information.
- *
- *
- * <h3>JAXB Runtime Binding Framework Compatibility</h3>
- * <p>
- * The following JAXB 1.0 restriction only applies to binding schema to
- * interfaces/implementation classes.
- * Since this binding does not require a common runtime system, a JAXB
- * client application must not attempt to mix runtime objects (<tt>JAXBContext,
- * Marshaller</tt>, etc. ) from different providers. This does not
- * mean that the client application isn't portable, it simply means that a
- * client has to use a runtime system provided by the same provider that was
- * used to compile the schema.
- *
- *
- * <h3>Discovery of JAXB implementation</h3>
- * <p>
- * When one of the <tt>newInstance</tt> methods is called, a JAXB implementation is discovered
- * by the following steps.
- *
- * <ol>
- * <li>
- * For each package/class explicitly passed in to the {@link #newInstance} method, in the order they are specified,
- * <tt>jaxb.properties</tt> file is looked up in its package, by using the associated classloader &mdash;
- * this is {@link Class#getClassLoader() the owner class loader} for a {@link Class} argument, and for a package
- * the specified {@link ClassLoader}.
- *
- * <p>
- * If such a file is discovered, it is {@link Properties#load(InputStream) loaded} as a property file, and
- * the value of the {@link #JAXB_CONTEXT_FACTORY} key will be assumed to be the provider factory class.
- * This class is then loaded by the associated classloader discussed above.
- *
- * <p>
- * This phase of the look up allows some packages to force the use of a certain JAXB implementation.
- * (For example, perhaps the schema compiler has generated some vendor extension in the code.)
- *
- * <li>
- * If the system property {@link #JAXB_CONTEXT_FACTORY} exists, then its value is assumed to be the provider
- * factory class. This phase of the look up enables per-JVM override of the JAXB implementation.
- *
- * <li>
- * Look for <tt>/META-INF/services/javax.xml.bind.JAXBContext</tt> file in the associated classloader.
- * This file follows the standard service descriptor convention, and if such a file exists, its content
- * is assumed to be the provider factory class. This phase of the look up is for automatic discovery.
- * It allows users to just put a JAXB implementation in a classpath and use it without any furhter configuration.
- *
- * <li>
- * Finally, if all the steps above fail, then the rest of the look up is unspecified. That said,
- * the recommended behavior is to simply look for some hard-coded platform default JAXB implementation.
- * This phase of the look up is so that JavaSE can have its own JAXB implementation as the last resort.
- * </ol>
- *
- * <p>
- * Once the provider factory class is discovered, its
- * <tt>public static JAXBContext createContext(String,ClassLoader,Map)</tt> method
- * (see {@link #newInstance(String, ClassLoader, Map)} for the parameter semantics.)
- * or <tt>public static JAXBContext createContet(Class[],Map)</tt> method
- * (see {@link #newInstance(Class[], Map)} for the parameter semantics) are invoked
- * to create a {@link JAXBContext}.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @see Marshaller
- * @see Unmarshaller
- * @see S 7.4.1 "Named Packages" in Java Language Specification</a>
- * @since JAXB1.0
- */
-public abstract class JAXBContext {
-
- /**
- * The name of the property that contains the name of the class capable
- * of creating new <tt>JAXBContext</tt> objects.
- */
- public static final String JAXB_CONTEXT_FACTORY =
- "javax.xml.bind.context.factory";
-
-
- protected JAXBContext() {
- }
-
-
- /**
- * <p>
- * Obtain a new instance of a <tt>JAXBContext</tt> class.
- *
- * <p>
- * This is a convenience method to invoke the
- * {@link #newInstance(String,ClassLoader)} method with
- * the context class loader of the current thread.
- *
- * @throws JAXBException if an error was encountered while creating the
- * <tt>JAXBContext</tt> such as
- * <ol>
- * <li>failure to locate either ObjectFactory.class or jaxb.index in the packages</li>
- * <li>an ambiguity among global elements contained in the contextPath</li>
- * <li>failure to locate a value for the context factory provider property</li>
- * <li>mixing schema derived packages from different providers on the same contextPath</li>
- * </ol>
- */
- public static JAXBContext newInstance( String contextPath )
- throws JAXBException {
-
- //return newInstance( contextPath, JAXBContext.class.getClassLoader() );
- return newInstance( contextPath, getContextClassLoader());
- }
-
- /**
- * <p>
- * Obtain a new instance of a <tt>JAXBContext</tt> class.
- *
- * <p>
- * The client application must supply a context path which is a list of
- * colon (':', \u005Cu003A) separated java package names that contain
- * schema-derived classes and/or fully qualified JAXB-annotated classes.
- * Schema-derived
- * code is registered with the JAXBContext by the
- * ObjectFactory.class generated per package.
- * Alternatively than being listed in the context path, programmer
- * annotated JAXB mapped classes can be listed in a
- * <tt>jaxb.index</tt> resource file, format described below.
- * Note that a java package can contain both schema-derived classes and
- * user annotated JAXB classes. Additionally, the java package may
- * contain JAXB package annotations that must be processed. (see JLS,
- * Section 7.4.1 "Named Packages").
- * </p>
- *
- * <p>
- * Every package listed on the contextPath must meet <b>one or both</b> of the
- * following conditions otherwise a <tt>JAXBException</tt> will be thrown:
- * </p>
- * <ol>
- * <li>it must contain ObjectFactory.class</li>
- * <li>it must contain jaxb.index</li>
- * </ol>
- *
- * <p>
- * <b>Format for jaxb.index</b>
- * <p>
- * The file contains a newline-separated list of class names.
- * Space and tab characters, as well as blank
- * lines, are ignored. The comment character
- * is '#' (0x23); on each line all characters following the first comment
- * character are ignored. The file must be encoded in UTF-8. Classes that
- * are reachable, as defined in {@link #newInstance(Class...)}, from the
- * listed classes are also registered with JAXBContext.
- * <p>
- * Constraints on class name occuring in a <tt>jaxb.index</tt> file are:
- * <ul>
- * <li>Must not end with ".class".</li>
- * <li>Class names are resolved relative to package containing
- * <tt>jaxb.index</tt> file. Only classes occuring directly in package
- * containing <tt>jaxb.index</tt> file are allowed.</li>
- * <li>Fully qualified class names are not allowed.
- * A qualified class name,relative to current package,
- * is only allowed to specify a nested or inner class.</li>
- * </ul>
- *
- * <p>
- * To maintain compatibility with JAXB 1.0 schema to java
- * interface/implementation binding, enabled by schema customization
- * <tt>&lt;jaxb:globalBindings valueClass="false"></tt>,
- * the JAXB provider will ensure that each package on the context path
- * has a <tt>jaxb.properties</tt> file which contains a value for the
- * <tt>javax.xml.bind.context.factory</tt> property and that all values
- * resolve to the same provider. This requirement does not apply to
- * JAXB annotated classes.
- *
- * <p>
- * If there are any global XML element name collisions across the various
- * packages listed on the <tt>contextPath</tt>, a <tt>JAXBException</tt>
- * will be thrown.
- *
- * <p>
- * Mixing generated interface/impl bindings from multiple JAXB Providers
- * in the same context path may result in a <tt>JAXBException</tt>
- * being thrown.
- *
- * <p>
- * The steps involved in discovering the JAXB implementation is discussed in the class javadoc.
- *
- * @param contextPath list of java package names that contain schema
- * derived class and/or java to schema (JAXB-annotated)
- * mapped classes
- * @param classLoader
- * This class loader will be used to locate the implementation
- * classes.
- *
- * @return a new instance of a <tt>JAXBContext</tt>
- * @throws JAXBException if an error was encountered while creating the
- * <tt>JAXBContext</tt> such as
- * <ol>
- * <li>failure to locate either ObjectFactory.class or jaxb.index in the packages</li>
- * <li>an ambiguity among global elements contained in the contextPath</li>
- * <li>failure to locate a value for the context factory provider property</li>
- * <li>mixing schema derived packages from different providers on the same contextPath</li>
- * </ol>
- */
- public static JAXBContext newInstance( String contextPath, ClassLoader classLoader ) throws JAXBException {
-
- return newInstance(contextPath,classLoader,Collections.<String,Object>emptyMap());
- }
-
- /**
- * <p>
- * Obtain a new instance of a <tt>JAXBContext</tt> class.
- *
- * <p>
- * This is mostly the same as {@link JAXBContext#newInstance(String, ClassLoader)},
- * but this version allows you to pass in provider-specific properties to configure
- * the instantiation of {@link JAXBContext}.
- *
- * <p>
- * The interpretation of properties is up to implementations. Implementations should
- * throw <tt>JAXBException</tt> if it finds properties that it doesn't understand.
- *
- * @param contextPath list of java package names that contain schema derived classes
- * @param classLoader
- * This class loader will be used to locate the implementation classes.
- * @param properties
- * provider-specific properties. Can be null, which means the same thing as passing
- * in an empty map.
- *
- * @return a new instance of a <tt>JAXBContext</tt>
- * @throws JAXBException if an error was encountered while creating the
- * <tt>JAXBContext</tt> such as
- * <ol>
- * <li>failure to locate either ObjectFactory.class or jaxb.index in the packages</li>
- * <li>an ambiguity among global elements contained in the contextPath</li>
- * <li>failure to locate a value for the context factory provider property</li>
- * <li>mixing schema derived packages from different providers on the same contextPath</li>
- * </ol>
- * @since JAXB2.0
- */
- public static JAXBContext newInstance( String contextPath, ClassLoader classLoader, Map<String,?> properties )
- throws JAXBException {
-
- return ContextFinder.find(
- /* The default property name according to the JAXB spec */
- JAXB_CONTEXT_FACTORY,
-
- /* the context path supplied by the client app */
- contextPath,
-
- /* class loader to be used */
- classLoader,
- properties );
- }
-
-// TODO: resurrect this once we introduce external annotations
-// /**
-// * <p>
-// * Obtain a new instance of a <tt>JAXBContext</tt> class.
-// *
-// * <p>
-// * The client application must supply a list of classes that the new
-// * context object needs to recognize.
-// *
-// * Not only the new context will recognize all the classes specified,
-// * but it will also recognize any classes that are directly/indirectly
-// * referenced statically from the specified classes.
-// *
-// * For example, in the following Java code, if you do
-// * <tt>newInstance(Foo.class)</tt>, the newly created {@link JAXBContext}
-// * will recognize both <tt>Foo</tt> and <tt>Bar</tt>, but not <tt>Zot</tt>:
-// * <pre>
-// * class Foo {
-// * Bar b;
-// * }
-// * class Bar { int x; }
-// * class Zot extends Bar { int y; }
-// * </pre>
-// *
-// * Therefore, a typical client application only needs to specify the
-// * top-level classes, but it needs to be careful.
-// *
-// * TODO: if we are to define other mechanisms, refer to them.
-// *
-// * @param externalBindings
-// * list of external binding files. Can be null or empty if none is used.
-// * when specified, those files determine how the classes are bound.
-// *
-// * @param classesToBeBound
-// * list of java classes to be recognized by the new {@link JAXBContext}.
-// * Can be empty, in which case a {@link JAXBContext} that only knows about
-// * spec-defined classes will be returned.
-// *
-// * @return
-// * A new instance of a <tt>JAXBContext</tt>. Always non-null valid object.
-// *
-// * @throws JAXBException
-// * if an error was encountered while creating the
-// * <tt>JAXBContext</tt>, such as (but not limited to):
-// * <ol>
-// * <li>No JAXB implementation was discovered
-// * <li>Classes use JAXB annotations incorrectly
-// * <li>Classes have colliding annotations (i.e., two classes with the same type name)
-// * <li>Specified external bindings are incorrect
-// * <li>The JAXB implementation was unable to locate
-// * provider-specific out-of-band information (such as additional
-// * files generated at the development time.)
-// * </ol>
-// *
-// * @throws IllegalArgumentException
-// * if the parameter contains {@code null} (i.e., {@code newInstance(null);})
-// *
-// * @since JAXB2.0
-// */
-// public static JAXBContext newInstance( Source[] externalBindings, Class... classesToBeBound )
-// throws JAXBException {
-//
-// // empty class list is not an error, because the context will still include
-// // spec-specified classes like String and Integer.
-// // if(classesToBeBound.length==0)
-// // throw new IllegalArgumentException();
-//
-// // but it is an error to have nulls in it.
-// for( int i=classesToBeBound.length-1; i>=0; i-- )
-// if(classesToBeBound[i]==null)
-// throw new IllegalArgumentException();
-//
-// return ContextFinder.find(externalBindings,classesToBeBound);
-// }
-
- /**
- * <p>
- * Obtain a new instance of a <tt>JAXBContext</tt> class.
- *
- * <p>
- * The client application must supply a list of classes that the new
- * context object needs to recognize.
- *
- * Not only the new context will recognize all the classes specified,
- * but it will also recognize any classes that are directly/indirectly
- * referenced statically from the specified classes. Subclasses of
- * referenced classes nor <tt>&#64;XmlTransient</tt> referenced classes
- * are not registered with JAXBContext.
- *
- * For example, in the following Java code, if you do
- * <tt>newInstance(Foo.class)</tt>, the newly created {@link JAXBContext}
- * will recognize both <tt>Foo</tt> and <tt>Bar</tt>, but not <tt>Zot</tt> or <tt>FooBar</tt>:
- * <pre>
- * class Foo {
- * &#64;XmlTransient FooBar c;
- * Bar b;
- * }
- * class Bar { int x; }
- * class Zot extends Bar { int y; }
- * class FooBar { }
- * </pre>
- *
- * Therefore, a typical client application only needs to specify the
- * top-level classes, but it needs to be careful.
- *
- * <p>
- * Note that for each java package registered with JAXBContext,
- * when the optional package annotations exist, they must be processed.
- * (see JLS, Section 7.4.1 "Named Packages").
- *
- * <p>
- * The steps involved in discovering the JAXB implementation is discussed in the class javadoc.
- *
- * @param classesToBeBound
- * list of java classes to be recognized by the new {@link JAXBContext}.
- * Can be empty, in which case a {@link JAXBContext} that only knows about
- * spec-defined classes will be returned.
- *
- * @return
- * A new instance of a <tt>JAXBContext</tt>. Always non-null valid object.
- *
- * @throws JAXBException
- * if an error was encountered while creating the
- * <tt>JAXBContext</tt>, such as (but not limited to):
- * <ol>
- * <li>No JAXB implementation was discovered
- * <li>Classes use JAXB annotations incorrectly
- * <li>Classes have colliding annotations (i.e., two classes with the same type name)
- * <li>The JAXB implementation was unable to locate
- * provider-specific out-of-band information (such as additional
- * files generated at the development time.)
- * </ol>
- *
- * @throws IllegalArgumentException
- * if the parameter contains {@code null} (i.e., {@code newInstance(null);})
- *
- * @since JAXB2.0
- */
- public static JAXBContext newInstance( Class... classesToBeBound )
- throws JAXBException {
-
- return newInstance(classesToBeBound,Collections.<String,Object>emptyMap());
- }
-
- /**
- * <p>
- * Obtain a new instance of a <tt>JAXBContext</tt> class.
- *
- * <p>
- * An overloading of {@link JAXBContext#newInstance(Class...)}
- * to configure 'properties' for this instantiation of {@link JAXBContext}.
- *
- * <p>
- * The interpretation of properties is up to implementations. Implementations should
- * throw <tt>JAXBException</tt> if it finds properties that it doesn't understand.
- *
- * @param classesToBeBound
- * list of java classes to be recognized by the new {@link JAXBContext}.
- * Can be empty, in which case a {@link JAXBContext} that only knows about
- * spec-defined classes will be returned.
- * @param properties
- * provider-specific properties. Can be null, which means the same thing as passing
- * in an empty map.
- *
- * @return
- * A new instance of a <tt>JAXBContext</tt>. Always non-null valid object.
- *
- * @throws JAXBException
- * if an error was encountered while creating the
- * <tt>JAXBContext</tt>, such as (but not limited to):
- * <ol>
- * <li>No JAXB implementation was discovered
- * <li>Classes use JAXB annotations incorrectly
- * <li>Classes have colliding annotations (i.e., two classes with the same type name)
- * <li>The JAXB implementation was unable to locate
- * provider-specific out-of-band information (such as additional
- * files generated at the development time.)
- * </ol>
- *
- * @throws IllegalArgumentException
- * if the parameter contains {@code null} (i.e., {@code newInstance(null,someMap);})
- *
- * @since JAXB2.0
- */
- public static JAXBContext newInstance( Class[] classesToBeBound, Map<String,?> properties )
- throws JAXBException {
-
- if (classesToBeBound == null) {
- throw new IllegalArgumentException();
- }
-
- // but it is an error to have nulls in it.
- for (int i = classesToBeBound.length - 1; i >= 0; i--) {
- if (classesToBeBound[i] == null) {
- throw new IllegalArgumentException();
- }
- }
-
- return ContextFinder.find(classesToBeBound,properties);
- }
-
- /**
- * Create an <tt>Unmarshaller</tt> object that can be used to convert XML
- * data into a java content tree.
- *
- * @return an <tt>Unmarshaller</tt> object
- *
- * @throws JAXBException if an error was encountered while creating the
- * <tt>Unmarshaller</tt> object
- */
- public abstract Unmarshaller createUnmarshaller() throws JAXBException;
-
-
- /**
- * Create a <tt>Marshaller</tt> object that can be used to convert a
- * java content tree into XML data.
- *
- * @return a <tt>Marshaller</tt> object
- *
- * @throws JAXBException if an error was encountered while creating the
- * <tt>Marshaller</tt> object
- */
- public abstract Marshaller createMarshaller() throws JAXBException;
-
-
- /**
- * {@link Validator} has been made optional and deprecated in JAXB 2.0. Please
- * refer to the javadoc for {@link Validator} for more detail.
- * <p>
- * Create a <tt>Validator</tt> object that can be used to validate a
- * java content tree against its source schema.
- *
- * @return a <tt>Validator</tt> object
- *
- * @throws JAXBException if an error was encountered while creating the
- * <tt>Validator</tt> object
- * @deprecated since JAXB2.0
- */
- public abstract Validator createValidator() throws JAXBException;
-
- /**
- * Creates a <tt>Binder</tt> object that can be used for
- * associative/in-place unmarshalling/marshalling.
- *
- * @param domType select the DOM API to use by passing in its DOM Node class.
- *
- * @return always a new valid <tt>Binder</tt> object.
- *
- * @throws UnsupportedOperationException
- * if DOM API corresponding to <tt>domType</tt> is not supported by
- * the implementation.
- *
- * @since JAXB2.0
- */
- public <T> Binder<T> createBinder(Class<T> domType) {
- // to make JAXB 1.0 implementations work, this method must not be
- // abstract
- throw new UnsupportedOperationException();
- }
-
- /**
- * Creates a <tt>Binder</tt> for W3C DOM.
- *
- * @return always a new valid <tt>Binder</tt> object.
- *
- * @since JAXB2.0
- */
- public Binder<Node> createBinder() {
- return createBinder(Node.class);
- }
-
- /**
- * Creates a <tt>JAXBIntrospector</tt> object that can be used to
- * introspect JAXB objects.
- *
- * @return
- * always return a non-null valid <tt>JAXBIntrospector</tt> object.
- *
- * @throws UnsupportedOperationException
- * Calling this method on JAXB 1.0 implementations will throw
- * an UnsupportedOperationException.
- *
- * @since JAXB2.0
- */
- public JAXBIntrospector createJAXBIntrospector() {
- // to make JAXB 1.0 implementations work, this method must not be
- // abstract
- throw new UnsupportedOperationException();
- }
-
- /**
- * Generates the schema documents for this context.
- *
- * @param outputResolver
- * this object controls the output to which schemas
- * will be sent.
- *
- * @throws IOException
- * if {@link SchemaOutputResolver} throws an {@link IOException}.
- *
- * @throws UnsupportedOperationException
- * Calling this method on JAXB 1.0 implementations will throw
- * an UnsupportedOperationException.
- *
- * @since JAXB 2.0
- */
- public void generateSchema(SchemaOutputResolver outputResolver) throws IOException {
- // to make JAXB 1.0 implementations work, this method must not be
- // abstract
- throw new UnsupportedOperationException();
- }
-
- private static ClassLoader getContextClassLoader() {
- if (System.getSecurityManager() == null) {
- return Thread.currentThread().getContextClassLoader();
- } else {
- return (ClassLoader) java.security.AccessController.doPrivileged(
- new java.security.PrivilegedAction() {
- public java.lang.Object run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/JAXBElement.java b/src/share/jaxws_classes/javax/xml/bind/JAXBElement.java
deleted file mode 100644
index fa240af7..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/JAXBElement.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import javax.xml.namespace.QName;
-import java.io.Serializable;
-
-/**
- * <p>JAXB representation of an Xml Element.</p>
- *
- * <p>This class represents information about an Xml Element from both the element
- * declaration within a schema and the element instance value within an xml document
- * with the following properties
- * <ul>
- * <li>element's xml tag <b><tt>name</tt></b></li>
- * <li><b><tt>value</tt></b> represents the element instance's atttribute(s) and content model</li>
- * <li>element declaration's <b><tt>declaredType</tt></b> (<tt>xs:element @type</tt> attribute)</li>
- * <li><b><tt>scope</tt></b> of element declaration</li>
- * <li>boolean <b><tt>nil</tt></b> property. (element instance's <tt><b>xsi:nil</b></tt> attribute)</li>
- * </ul>
- *
- * <p>The <tt>declaredType</tt> and <tt>scope</tt> property are the
- * JAXB class binding for the xml type definition.
- * </p>
- *
- * <p><b><tt>Scope</tt></b> is either {@link GlobalScope} or the Java class representing the
- * complex type definition containing the schema element declaration.
- * </p>
- *
- * <p>There is a property constraint that if <b><tt>value</tt></b> is <tt>null</tt>,
- * then <tt>nil</tt> must be <tt>true</tt>. The converse is not true to enable
- * representing a nil element with attribute(s). If <tt>nil</tt> is true, it is possible
- * that <tt>value</tt> is non-null so it can hold the value of the attributes
- * associated with a nil element.
- * </p>
- *
- * @author Kohsuke Kawaguchi, Joe Fialli
- * @since JAXB 2.0
- */
-
-public class JAXBElement<T> implements Serializable {
-
- /** xml element tag name */
- final protected QName name;
-
- /** Java datatype binding for xml element declaration's type. */
- final protected Class<T> declaredType;
-
- /** Scope of xml element declaration representing this xml element instance.
- * Can be one of the following values:
- * - {@link GlobalScope} for global xml element declaration.
- * - local element declaration has a scope set to the Java class
- * representation of complex type defintion containing
- * xml element declaration.
- */
- final protected Class scope;
-
- /** xml element value.
- Represents content model and attributes of an xml element instance. */
- protected T value;
-
- /** true iff the xml element instance has xsi:nil="true". */
- protected boolean nil = false;
-
- /**
- * Designates global scope for an xml element.
- */
- public static final class GlobalScope {}
-
- /**
- * <p>Construct an xml element instance.</p>
- *
- * @param name Java binding of xml element tag name
- * @param declaredType Java binding of xml element declaration's type
- * @param scope
- * Java binding of scope of xml element declaration.
- * Passing null is the same as passing <tt>GlobalScope.class</tt>
- * @param value
- * Java instance representing xml element's value.
- * @see #getScope()
- * @see #isTypeSubstituted()
- */
- public JAXBElement(QName name,
- Class<T> declaredType,
- Class scope,
- T value) {
- if(declaredType==null || name==null)
- throw new IllegalArgumentException();
- this.declaredType = declaredType;
- if(scope==null) scope = GlobalScope.class;
- this.scope = scope;
- this.name = name;
- setValue(value);
- }
-
- /**
- * Construct an xml element instance.
- *
- * This is just a convenience method for <tt>new JAXBElement(name,declaredType,GlobalScope.class,value)</tt>
- */
- public JAXBElement(QName name, Class<T> declaredType, T value ) {
- this(name,declaredType,GlobalScope.class,value);
- }
-
- /**
- * Returns the Java binding of the xml element declaration's type attribute.
- */
- public Class<T> getDeclaredType() {
- return declaredType;
- }
-
- /**
- * Returns the xml element tag name.
- */
- public QName getName() {
- return name;
- }
-
- /**
- * <p>Set the content model and attributes of this xml element.</p>
- *
- * <p>When this property is set to <tt>null</tt>, <tt>isNil()</tt> must by <tt>true</tt>.
- * Details of constraint are described at {@link #isNil()}.</p>
- *
- * @see #isTypeSubstituted()
- */
- public void setValue(T t) {
- this.value = t;
- }
-
- /**
- * <p>Return the content model and attribute values for this element.</p>
- *
- * <p>See {@link #isNil()} for a description of a property constraint when
- * this value is <tt>null</tt></p>
- */
- public T getValue() {
- return value;
- }
-
- /**
- * Returns scope of xml element declaration.
- *
- * @see #isGlobalScope()
- * @return <tt>GlobalScope.class</tt> if this element is of global scope.
- */
- public Class getScope() {
- return scope;
- }
-
- /**
- * <p>Returns <tt>true</tt> iff this element instance content model
- * is nil.</p>
- *
- * <p>This property always returns <tt>true</tt> when {@link #getValue()} is null.
- * Note that the converse is not true, when this property is <tt>true</tt>,
- * {@link #getValue()} can contain a non-null value for attribute(s). It is
- * valid for a nil xml element to have attribute(s).</p>
- */
- public boolean isNil() {
- return (value == null) || nil;
- }
-
- /**
- * <p>Set whether this element has nil content.</p>
- *
- * @see #isNil()
- */
- public void setNil(boolean value) {
- this.nil = value;
- }
-
- /* Convenience methods
- * (Not necessary but they do unambiguously conceptualize
- * the rationale behind this class' fields.)
- */
-
- /**
- * Returns true iff this xml element declaration is global.
- */
- public boolean isGlobalScope() {
- return this.scope == GlobalScope.class;
- }
-
- /**
- * Returns true iff this xml element instance's value has a different
- * type than xml element declaration's declared type.
- */
- public boolean isTypeSubstituted() {
- if(value==null) return false;
- return value.getClass() != declaredType;
- }
-
- private static final long serialVersionUID = 1L;
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/JAXBException.java b/src/share/jaxws_classes/javax/xml/bind/JAXBException.java
deleted file mode 100644
index c6b94d64..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/JAXBException.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import java.io.PrintWriter;
-
-/**
- * This is the root exception class for all JAXB exceptions.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
- * @see JAXBContext
- * @see Marshaller
- * @see Unmarshaller
- * @since JAXB1.0
- */
-public class JAXBException extends Exception {
-
- /**
- * Vendor specific error code
- *
- */
- private String errorCode;
-
- /**
- * Exception reference
- *
- */
- private volatile Throwable linkedException;
-
- static final long serialVersionUID = -5621384651494307979L;
-
- /**
- * Construct a JAXBException with the specified detail message. The
- * errorCode and linkedException will default to null.
- *
- * @param message a description of the exception
- */
- public JAXBException(String message) {
- this( message, null, null );
- }
-
- /**
- * Construct a JAXBException with the specified detail message and vendor
- * specific errorCode. The linkedException will default to null.
- *
- * @param message a description of the exception
- * @param errorCode a string specifying the vendor specific error code
- */
- public JAXBException(String message, String errorCode) {
- this( message, errorCode, null );
- }
-
- /**
- * Construct a JAXBException with a linkedException. The detail message and
- * vendor specific errorCode will default to null.
- *
- * @param exception the linked exception
- */
- public JAXBException(Throwable exception) {
- this( null, null, exception );
- }
-
- /**
- * Construct a JAXBException with the specified detail message and
- * linkedException. The errorCode will default to null.
- *
- * @param message a description of the exception
- * @param exception the linked exception
- */
- public JAXBException(String message, Throwable exception) {
- this( message, null, exception );
- }
-
- /**
- * Construct a JAXBException with the specified detail message, vendor
- * specific errorCode, and linkedException.
- *
- * @param message a description of the exception
- * @param errorCode a string specifying the vendor specific error code
- * @param exception the linked exception
- */
- public JAXBException(String message, String errorCode, Throwable exception) {
- super( message );
- this.errorCode = errorCode;
- this.linkedException = exception;
- }
-
- /**
- * Get the vendor specific error code
- *
- * @return a string specifying the vendor specific error code
- */
- public String getErrorCode() {
- return this.errorCode;
- }
-
- /**
- * Get the linked exception
- *
- * @return the linked Exception, null if none exists
- */
- public Throwable getLinkedException() {
- return linkedException;
- }
-
- /**
- * Add a linked Exception.
- *
- * @param exception the linked Exception (A null value is permitted and
- * indicates that the linked exception does not exist or
- * is unknown).
- */
- public void setLinkedException( Throwable exception ) {
- this.linkedException = exception;
- }
-
- /**
- * Returns a short description of this JAXBException.
- *
- */
- public String toString() {
- return linkedException == null ?
- super.toString() :
- super.toString() + "\n - with linked exception:\n[" +
- linkedException.toString()+ "]";
- }
-
- /**
- * Prints this JAXBException and its stack trace (including the stack trace
- * of the linkedException if it is non-null) to the PrintStream.
- *
- * @param s PrintStream to use for output
- */
- public void printStackTrace( java.io.PrintStream s ) {
- super.printStackTrace(s);
- }
-
- /**
- * Prints this JAXBException and its stack trace (including the stack trace
- * of the linkedException if it is non-null) to <tt>System.err</tt>.
- *
- */
- public void printStackTrace() {
- super.printStackTrace();
- }
-
- /**
- * Prints this JAXBException and its stack trace (including the stack trace
- * of the linkedException if it is non-null) to the PrintWriter.
- *
- * @param s PrintWriter to use for output
- */
- public void printStackTrace(PrintWriter s) {
- super.printStackTrace(s);
- }
-
- @Override
- public Throwable getCause() {
- return linkedException;
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/JAXBIntrospector.java b/src/share/jaxws_classes/javax/xml/bind/JAXBIntrospector.java
deleted file mode 100644
index 18a70ff6..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/JAXBIntrospector.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-import javax.xml.namespace.QName;
-
-/**
- * Provide access to JAXB xml binding data for a JAXB object.
- *
- * <p>
- * Intially, the intent of this class is to just conceptualize how
- * a JAXB application developer can access xml binding information,
- * independent if binding model is java to schema or schema to java.
- * Since accessing the XML element name related to a JAXB element is
- * a highly requested feature, demonstrate access to this
- * binding information.
- *
- * The factory method to get a <code>JAXBIntrospector</code> instance is
- * {@link JAXBContext#createJAXBIntrospector()}.
- *
- * @see JAXBContext#createJAXBIntrospector()
- * @since JAXB2.0
- */
-public abstract class JAXBIntrospector {
-
- /**
- * <p>Return true if <code>object</code> represents a JAXB element.</p>
- * <p>Parameter <code>object</code> is a JAXB element for following cases:
- * <ol>
- * <li>It is an instance of <code>javax.xml.bind.JAXBElement</code>.</li>
- * <li>The class of <code>object</code> is annotated with
- * <code>&#64XmlRootElement</code>.
- * </li>
- * </ol>
- *
- * @see #getElementName(Object)
- */
- public abstract boolean isElement(Object object);
-
- /**
- * <p>Get xml element qname for <code>jaxbElement</code>.</p>
- *
- * @param jaxbElement is an object that {@link #isElement(Object)} returned true.
- *
- * @return xml element qname associated with jaxbElement;
- * null if <code>jaxbElement</code> is not a JAXB Element.
- */
- public abstract QName getElementName(Object jaxbElement);
-
- /**
- * <p>Get the element value of a JAXB element.</p>
- *
- * <p>Convenience method to abstract whether working with either
- * a javax.xml.bind.JAXBElement instance or an instance of
- * <tt>&#64XmlRootElement</tt> annotated Java class.</p>
- *
- * @param jaxbElement object that #isElement(Object) returns true.
- *
- * @return The element value of the <code>jaxbElement</code>.
- */
- public static Object getValue(Object jaxbElement) {
- if (jaxbElement instanceof JAXBElement) {
- return ((JAXBElement)jaxbElement).getValue();
- } else {
- // assume that class of this instance is
- // annotated with @XmlRootElement.
- return jaxbElement;
- }
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/JAXBPermission.java b/src/share/jaxws_classes/javax/xml/bind/JAXBPermission.java
deleted file mode 100644
index 05b83450..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/JAXBPermission.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import java.security.BasicPermission;
-
-/**
- * This class is for JAXB permissions. A {@code JAXBPermission}
- * contains a name (also referred to as a "target name") but
- * no actions list; you either have the named permission
- * or you don't.
- *
- * <P>
- * The target name is the name of the JAXB permission (see below).
- *
- * <P>
- * The following table lists all the possible {@code JAXBPermission} target names,
- * and for each provides a description of what the permission allows
- * and a discussion of the risks of granting code the permission.
- * <P>
- *
- * <table border=1 cellpadding=5 summary="Permission target name, what the permission allows, and associated risks">
- * <tr>
- * <th>Permission Target Name</th>
- * <th>What the Permission Allows</th>
- * <th>Risks of Allowing this Permission</th>
- * </tr>
- *
- * <tr>
- * <td>setDatatypeConverter</td>
- * <td>
- * Allows the code to set VM-wide {@link DatatypeConverterInterface}
- * via {@link DatatypeConverter#setDatatypeConverter(DatatypeConverterInterface) the setDatatypeConverter method}
- * that all the methods on {@link DatatypeConverter} uses.
- * </td>
- * <td>
- * Malicious code can set {@link DatatypeConverterInterface}, which has
- * VM-wide singleton semantics, before a genuine JAXB implementation sets one.
- * This allows malicious code to gain access to objects that it may otherwise
- * not have access to, such as {@link java.awt.Frame#getFrames()} that belongs to
- * another application running in the same JVM.
- * </td>
- * </tr>
- * </table>
- *
- * @see java.security.BasicPermission
- * @see java.security.Permission
- * @see java.security.Permissions
- * @see java.security.PermissionCollection
- * @see java.lang.SecurityManager
- *
- * @author Joe Fialli
- * @since JAXB 2.2
- */
-
-/* code was borrowed originally from java.lang.RuntimePermission. */
-public final class JAXBPermission extends BasicPermission {
- /**
- * Creates a new JAXBPermission with the specified name.
- *
- * @param name
- * The name of the JAXBPermission. As of 2.2 only "setDatatypeConverter"
- * is defined.
- */
- public JAXBPermission(String name) {
- super(name);
- }
-
- private static final long serialVersionUID = 1L;
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/MarshalException.java b/src/share/jaxws_classes/javax/xml/bind/MarshalException.java
deleted file mode 100644
index f944d1d0..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/MarshalException.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * This exception indicates that an error has occurred while performing
- * a marshal operation that the provider is unable to recover from.
- *
- * <p>
- * The <tt>ValidationEventHandler</tt> can cause this exception to be thrown
- * during the marshal operations. See
- * {@link ValidationEventHandler#handleEvent(ValidationEvent)
- * ValidationEventHandler.handleEvent(ValidationEvent)}.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
- * @see JAXBException
- * @see Marshaller
- * @since JAXB1.0
- */
-public class MarshalException extends JAXBException {
-
- /**
- * Construct a MarshalException with the specified detail message. The
- * errorCode and linkedException will default to null.
- *
- * @param message a description of the exception
- */
- public MarshalException( String message ) {
- this( message, null, null );
- }
-
- /**
- * Construct a MarshalException with the specified detail message and vendor
- * specific errorCode. The linkedException will default to null.
- *
- * @param message a description of the exception
- * @param errorCode a string specifying the vendor specific error code
- */
- public MarshalException( String message, String errorCode ) {
- this( message, errorCode, null );
- }
-
- /**
- * Construct a MarshalException with a linkedException. The detail message and
- * vendor specific errorCode will default to null.
- *
- * @param exception the linked exception
- */
- public MarshalException( Throwable exception ) {
- this( null, null, exception );
- }
-
- /**
- * Construct a MarshalException with the specified detail message and
- * linkedException. The errorCode will default to null.
- *
- * @param message a description of the exception
- * @param exception the linked exception
- */
- public MarshalException( String message, Throwable exception ) {
- this( message, null, exception );
- }
-
- /**
- * Construct a MarshalException with the specified detail message, vendor
- * specific errorCode, and linkedException.
- *
- * @param message a description of the exception
- * @param errorCode a string specifying the vendor specific error code
- * @param exception the linked exception
- */
- public MarshalException( String message, String errorCode, Throwable exception ) {
- super( message, errorCode, exception );
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/Marshaller.java b/src/share/jaxws_classes/javax/xml/bind/Marshaller.java
deleted file mode 100644
index 6a469039..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/Marshaller.java
+++ /dev/null
@@ -1,821 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.validation.Schema;
-import java.io.File;
-
-/**
- * <p>
- * The <tt>Marshaller</tt> class is responsible for governing the process
- * of serializing Java content trees back into XML data. It provides the basic
- * marshalling methods:
- *
- * <p>
- * <i>Assume the following setup code for all following code fragments:</i>
- * <blockquote>
- * <pre>
- * JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
- * Unmarshaller u = jc.createUnmarshaller();
- * Object element = u.unmarshal( new File( "foo.xml" ) );
- * Marshaller m = jc.createMarshaller();
- * </pre>
- * </blockquote>
- *
- * <p>
- * Marshalling to a File:
- * <blockquote>
- * <pre>
- * OutputStream os = new FileOutputStream( "nosferatu.xml" );
- * m.marshal( element, os );
- * </pre>
- * </blockquote>
- *
- * <p>
- * Marshalling to a SAX ContentHandler:
- * <blockquote>
- * <pre>
- * // assume MyContentHandler instanceof ContentHandler
- * m.marshal( element, new MyContentHandler() );
- * </pre>
- * </blockquote>
- *
- * <p>
- * Marshalling to a DOM Node:
- * <blockquote>
- * <pre>
- * DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- * dbf.setNamespaceAware(true);
- * DocumentBuilder db = dbf.newDocumentBuilder();
- * Document doc = db.newDocument();
- *
- * m.marshal( element, doc );
- * </pre>
- * </blockquote>
- *
- * <p>
- * Marshalling to a java.io.OutputStream:
- * <blockquote>
- * <pre>
- * m.marshal( element, System.out );
- * </pre>
- * </blockquote>
- *
- * <p>
- * Marshalling to a java.io.Writer:
- * <blockquote>
- * <pre>
- * m.marshal( element, new PrintWriter( System.out ) );
- * </pre>
- * </blockquote>
- *
- * <p>
- * Marshalling to a javax.xml.transform.SAXResult:
- * <blockquote>
- * <pre>
- * // assume MyContentHandler instanceof ContentHandler
- * SAXResult result = new SAXResult( new MyContentHandler() );
- *
- * m.marshal( element, result );
- * </pre>
- * </blockquote>
- *
- * <p>
- * Marshalling to a javax.xml.transform.DOMResult:
- * <blockquote>
- * <pre>
- * DOMResult result = new DOMResult();
- *
- * m.marshal( element, result );
- * </pre>
- * </blockquote>
- *
- * <p>
- * Marshalling to a javax.xml.transform.StreamResult:
- * <blockquote>
- * <pre>
- * StreamResult result = new StreamResult( System.out );
- *
- * m.marshal( element, result );
- * </pre>
- * </blockquote>
- *
- * <p>
- * Marshalling to a javax.xml.stream.XMLStreamWriter:
- * <blockquote>
- * <pre>
- * XMLStreamWriter xmlStreamWriter =
- * XMLOutputFactory.newInstance().createXMLStreamWriter( ... );
- *
- * m.marshal( element, xmlStreamWriter );
- * </pre>
- * </blockquote>
- *
- * <p>
- * Marshalling to a javax.xml.stream.XMLEventWriter:
- * <blockquote>
- * <pre>
- * XMLEventWriter xmlEventWriter =
- * XMLOutputFactory.newInstance().createXMLEventWriter( ... );
- *
- * m.marshal( element, xmlEventWriter );
- * </pre>
- * </blockquote>
- *
- * <p>
- * <a name="elementMarshalling"></a>
- * <b>Marshalling content tree rooted by a JAXB element</b><br>
- * <blockquote>
- * The first parameter of the overloaded
- * <tt>Marshaller.marshal(java.lang.Object, ...)</tt> methods must be a
- * JAXB element as computed by
- * {@link JAXBIntrospector#isElement(java.lang.Object)};
- * otherwise, a <tt>Marshaller.marshal</tt> method must throw a
- * {@link MarshalException}. There exist two mechanisms
- * to enable marshalling an instance that is not a JAXB element.
- * One method is to wrap the instance as a value of a {@link JAXBElement},
- * and pass the wrapper element as the first parameter to
- * a <tt>Marshaller.marshal</tt> method. For java to schema binding, it
- * is also possible to simply annotate the instance's class with
- * &#64;{@link XmlRootElement}.
- * </blockquote>
- *
- * <p>
- * <b>Encoding</b><br>
- * <blockquote>
- * By default, the Marshaller will use UTF-8 encoding when generating XML data
- * to a <tt>java.io.OutputStream</tt>, or a <tt>java.io.Writer</tt>. Use the
- * {@link #setProperty(String,Object) setProperty} API to change the output
- * encoding used during these marshal operations. Client applications are
- * expected to supply a valid character encoding name as defined in the
- * <a href="http://www.w3.org/TR/2000/REC-xml-20001006#charencoding">W3C XML 1.0
- * Recommendation</a> and supported by your Java Platform</a>.
- * </blockquote>
- *
- * <p>
- * <b>Validation and Well-Formedness</b><br>
- * <blockquote>
- * <p>
- * Client applications are not required to validate the Java content tree prior
- * to calling any of the marshal API's. Furthermore, there is no requirement
- * that the Java content tree be valid with respect to its original schema in
- * order to marshal it back into XML data. Different JAXB Providers will
- * support marshalling invalid Java content trees at varying levels, however
- * all JAXB Providers must be able to marshal a valid content tree back to
- * XML data. A JAXB Provider must throw a <tt>MarshalException</tt> when it
- * is unable to complete the marshal operation due to invalid content. Some
- * JAXB Providers will fully allow marshalling invalid content, others will fail
- * on the first validation error.
- * <p>
- * Even when schema validation is not explictly enabled for the marshal operation,
- * it is possible that certain types of validation events will be detected
- * during the operation. Validation events will be reported to the registered
- * event handler. If the client application has not registered an event handler
- * prior to invoking one of the marshal API's, then events will be delivered to
- * a default event handler which will terminate the marshal operation after
- * encountering the first error or fatal error. Note that for JAXB 2.0 and
- * later versions, {@link javax.xml.bind.helpers.DefaultValidationEventHandler} is
- * no longer used.
- *
- * </blockquote>
- *
- * <p>
- * <a name="supportedProps"></a>
- * <b>Supported Properties</b><br>
- * <blockquote>
- * <p>
- * All JAXB Providers are required to support the following set of properties.
- * Some providers may support additional properties.
- * <dl>
- * <dt><tt>jaxb.encoding</tt> - value must be a java.lang.String</dt>
- * <dd>The output encoding to use when marshalling the XML data. The
- * Marshaller will use "UTF-8" by default if this property is not
- * specified.</dd>
- * <dt><tt>jaxb.formatted.output</tt> - value must be a java.lang.Boolean</dt>
- * <dd>This property controls whether or not the Marshaller will format
- * the resulting XML data with line breaks and indentation. A
- * true value for this property indicates human readable indented
- * xml data, while a false value indicates unformatted xml data.
- * The Marshaller will default to false (unformatted) if this
- * property is not specified.</dd>
- * <dt><tt>jaxb.schemaLocation</tt> - value must be a java.lang.String</dt>
- * <dd>This property allows the client application to specify an
- * xsi:schemaLocation attribute in the generated XML data. The format of
- * the schemaLocation attribute value is discussed in an easy to
- * understand, non-normative form in
- * <a href="http://www.w3.org/TR/xmlschema-0/#schemaLocation">Section 5.6
- * of the W3C XML Schema Part 0: Primer</a> and specified in
- * <a href="http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions">
- * Section 2.6 of the W3C XML Schema Part 1: Structures</a>.</dd>
- * <dt><tt>jaxb.noNamespaceSchemaLocation</tt> - value must be a java.lang.String</dt>
- * <dd>This property allows the client application to specify an
- * xsi:noNamespaceSchemaLocation attribute in the generated XML
- * data. The format of the schemaLocation attribute value is discussed in
- * an easy to understand, non-normative form in
- * <a href="http://www.w3.org/TR/xmlschema-0/#schemaLocation">Section 5.6
- * of the W3C XML Schema Part 0: Primer</a> and specified in
- * <a href="http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions">
- * Section 2.6 of the W3C XML Schema Part 1: Structures</a>.</dd>
- * <dt><tt>jaxb.fragment</tt> - value must be a java.lang.Boolean</dt>
- * <dd>This property determines whether or not document level events will be
- * generated by the Marshaller. If the property is not specified, the
- * default is <tt>false</tt>. This property has different implications depending
- * on which marshal api you are using - when this property is set to true:<br>
- * <ul>
- * <li>{@link #marshal(Object,org.xml.sax.ContentHandler) marshal(Object,ContentHandler)} - the Marshaller won't
- * invoke {@link org.xml.sax.ContentHandler#startDocument()} and
- * {@link org.xml.sax.ContentHandler#endDocument()}.</li>
- * <li>{@link #marshal(Object,org.w3c.dom.Node) marshal(Object,Node)} - the property has no effect on this
- * API.</li>
- * <li>{@link #marshal(Object,java.io.OutputStream) marshal(Object,OutputStream)} - the Marshaller won't
- * generate an xml declaration.</li>
- * <li>{@link #marshal(Object,java.io.Writer) marshal(Object,Writer)} - the Marshaller won't
- * generate an xml declaration.</li>
- * <li>{@link #marshal(Object,javax.xml.transform.Result) marshal(Object,Result)} - depends on the kind of
- * Result object, see semantics for Node, ContentHandler, and Stream APIs</li>
- * <li>{@link #marshal(Object,javax.xml.stream.XMLEventWriter) marshal(Object,XMLEventWriter)} - the
- * Marshaller will not generate {@link javax.xml.stream.events.XMLEvent#START_DOCUMENT} and
- * {@link javax.xml.stream.events.XMLEvent#END_DOCUMENT} events.</li>
- * <li>{@link #marshal(Object,javax.xml.stream.XMLStreamWriter) marshal(Object,XMLStreamWriter)} - the
- * Marshaller will not generate {@link javax.xml.stream.events.XMLEvent#START_DOCUMENT} and
- * {@link javax.xml.stream.events.XMLEvent#END_DOCUMENT} events.</li>
- * </ul>
- * </dd>
- * </dl>
- * </blockquote>
- *
- * <p>
- * <a name="marshalEventCallback"></a>
- * <b>Marshal Event Callbacks</b><br>
- * <blockquote>
- * "The {@link Marshaller} provides two styles of callback mechanisms
- * that allow application specific processing during key points in the
- * unmarshalling process. In 'class defined' event callbacks, application
- * specific code placed in JAXB mapped classes is triggered during
- * marshalling. 'External listeners' allow for centralized processing
- * of marshal events in one callback method rather than by type event callbacks.
- *
- * <p>
- * Class defined event callback methods allow any JAXB mapped class to specify
- * its own specific callback methods by defining methods with the following method signatures:
- * <blockquote>
- * <pre>
- * // Invoked by Marshaller after it has created an instance of this object.
- * boolean beforeMarshal(Marshaller);
- *
- * // Invoked by Marshaller after it has marshalled all properties of this object.
- * void afterMarshal(Marshaller);
- * </pre>
- * </blockquote>
- * The class defined event callback methods should be used when the callback method requires
- * access to non-public methods and/or fields of the class.
- * <p>
- * The external listener callback mechanism enables the registration of a {@link Listener}
- * instance with a {@link Marshaller#setListener(Listener)}. The external listener receives all callback events,
- * allowing for more centralized processing than per class defined callback methods.
- * <p>
- * The 'class defined' and external listener event callback methods are independent of each other,
- * both can be called for one event. The invocation ordering when both listener callback methods exist is
- * defined in {@link Listener#beforeMarshal(Object)} and {@link Listener#afterMarshal(Object)}.
- * <p>
- * An event callback method throwing an exception terminates the current marshal process.
- * </blockquote>
- *
- * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @see JAXBContext
- * @see Validator
- * @see Unmarshaller
- * @since JAXB1.0
- */
-public interface Marshaller {
-
- /**
- * The name of the property used to specify the output encoding in
- * the marshalled XML data.
- */
- public static final String JAXB_ENCODING =
- "jaxb.encoding";
-
- /**
- * The name of the property used to specify whether or not the marshalled
- * XML data is formatted with linefeeds and indentation.
- */
- public static final String JAXB_FORMATTED_OUTPUT =
- "jaxb.formatted.output";
-
- /**
- * The name of the property used to specify the xsi:schemaLocation
- * attribute value to place in the marshalled XML output.
- */
- public static final String JAXB_SCHEMA_LOCATION =
- "jaxb.schemaLocation";
-
- /**
- * The name of the property used to specify the
- * xsi:noNamespaceSchemaLocation attribute value to place in the marshalled
- * XML output.
- */
- public static final String JAXB_NO_NAMESPACE_SCHEMA_LOCATION =
- "jaxb.noNamespaceSchemaLocation";
-
- /**
- * The name of the property used to specify whether or not the marshaller
- * will generate document level events (ie calling startDocument or endDocument).
- */
- public static final String JAXB_FRAGMENT =
- "jaxb.fragment";
-
- /**
- * Marshal the content tree rooted at <tt>jaxbElement</tt> into the specified
- * <tt>javax.xml.transform.Result</tt>.
- *
- * <p>
- * All JAXB Providers must at least support
- * {@link javax.xml.transform.dom.DOMResult},
- * {@link javax.xml.transform.sax.SAXResult}, and
- * {@link javax.xml.transform.stream.StreamResult}. It can
- * support other derived classes of <tt>Result</tt> as well.
- *
- * @param jaxbElement
- * The root of content tree to be marshalled.
- * @param result
- * XML will be sent to this Result
- *
- * @throws JAXBException
- * If any unexpected problem occurs during the marshalling.
- * @throws MarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Marshaller</tt> is unable to marshal <tt>obj</tt> (or any
- * object reachable from <tt>obj</tt>). See <a href="#elementMarshalling">
- * Marshalling a JAXB element</a>.
- * @throws IllegalArgumentException
- * If any of the method parameters are null
- */
- public void marshal( Object jaxbElement, javax.xml.transform.Result result )
- throws JAXBException;
-
- /**
- * Marshal the content tree rooted at <tt>jaxbElement</tt> into an output stream.
- *
- * @param jaxbElement
- * The root of content tree to be marshalled.
- * @param os
- * XML will be added to this stream.
- *
- * @throws JAXBException
- * If any unexpected problem occurs during the marshalling.
- * @throws MarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Marshaller</tt> is unable to marshal <tt>obj</tt> (or any
- * object reachable from <tt>obj</tt>). See <a href="#elementMarshalling">
- * Marshalling a JAXB element</a>.
- * @throws IllegalArgumentException
- * If any of the method parameters are null
- */
- public void marshal( Object jaxbElement, java.io.OutputStream os )
- throws JAXBException;
-
- /**
- * Marshal the content tree rooted at <tt>jaxbElement</tt> into a file.
- *
- * @param jaxbElement
- * The root of content tree to be marshalled.
- * @param output
- * File to be written. If this file already exists, it will be overwritten.
- *
- * @throws JAXBException
- * If any unexpected problem occurs during the marshalling.
- * @throws MarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Marshaller</tt> is unable to marshal <tt>obj</tt> (or any
- * object reachable from <tt>obj</tt>). See <a href="#elementMarshalling">
- * Marshalling a JAXB element</a>.
- * @throws IllegalArgumentException
- * If any of the method parameters are null
- * @since JAXB2.1
- */
- public void marshal( Object jaxbElement, File output )
- throws JAXBException;
-
- /**
- * Marshal the content tree rooted at <tt>jaxbElement</tt> into a Writer.
- *
- * @param jaxbElement
- * The root of content tree to be marshalled.
- * @param writer
- * XML will be sent to this writer.
- *
- * @throws JAXBException
- * If any unexpected problem occurs during the marshalling.
- * @throws MarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Marshaller</tt> is unable to marshal <tt>obj</tt> (or any
- * object reachable from <tt>obj</tt>). See <a href="#elementMarshalling">
- * Marshalling a JAXB element</a>.
- * @throws IllegalArgumentException
- * If any of the method parameters are null
- */
- public void marshal( Object jaxbElement, java.io.Writer writer )
- throws JAXBException;
-
- /**
- * Marshal the content tree rooted at <tt>jaxbElement</tt> into SAX2 events.
- *
- * @param jaxbElement
- * The root of content tree to be marshalled.
- * @param handler
- * XML will be sent to this handler as SAX2 events.
- *
- * @throws JAXBException
- * If any unexpected problem occurs during the marshalling.
- * @throws MarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Marshaller</tt> is unable to marshal <tt>obj</tt> (or any
- * object reachable from <tt>obj</tt>). See <a href="#elementMarshalling">
- * Marshalling a JAXB element</a>.
- * @throws IllegalArgumentException
- * If any of the method parameters are null
- */
- public void marshal( Object jaxbElement, org.xml.sax.ContentHandler handler )
- throws JAXBException;
-
- /**
- * Marshal the content tree rooted at <tt>jaxbElement</tt> into a DOM tree.
- *
- * @param jaxbElement
- * The content tree to be marshalled.
- * @param node
- * DOM nodes will be added as children of this node.
- * This parameter must be a Node that accepts children
- * ({@link org.w3c.dom.Document},
- * {@link org.w3c.dom.DocumentFragment}, or
- * {@link org.w3c.dom.Element})
- *
- * @throws JAXBException
- * If any unexpected problem occurs during the marshalling.
- * @throws MarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Marshaller</tt> is unable to marshal <tt>jaxbElement</tt> (or any
- * object reachable from <tt>jaxbElement</tt>). See <a href="#elementMarshalling">
- * Marshalling a JAXB element</a>.
- * @throws IllegalArgumentException
- * If any of the method parameters are null
- */
- public void marshal( Object jaxbElement, org.w3c.dom.Node node )
- throws JAXBException;
-
- /**
- * Marshal the content tree rooted at <tt>jaxbElement</tt> into a
- * {@link javax.xml.stream.XMLStreamWriter}.
- *
- * @param jaxbElement
- * The content tree to be marshalled.
- * @param writer
- * XML will be sent to this writer.
- *
- * @throws JAXBException
- * If any unexpected problem occurs during the marshalling.
- * @throws MarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Marshaller</tt> is unable to marshal <tt>obj</tt> (or any
- * object reachable from <tt>obj</tt>). See <a href="#elementMarshalling">
- * Marshalling a JAXB element</a>.
- * @throws IllegalArgumentException
- * If any of the method parameters are null
- * @since JAXB 2.0
- */
- public void marshal( Object jaxbElement, javax.xml.stream.XMLStreamWriter writer )
- throws JAXBException;
-
- /**
- * Marshal the content tree rooted at <tt>jaxbElement</tt> into a
- * {@link javax.xml.stream.XMLEventWriter}.
- *
- * @param jaxbElement
- * The content tree rooted at jaxbElement to be marshalled.
- * @param writer
- * XML will be sent to this writer.
- *
- * @throws JAXBException
- * If any unexpected problem occurs during the marshalling.
- * @throws MarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Marshaller</tt> is unable to marshal <tt>obj</tt> (or any
- * object reachable from <tt>obj</tt>). See <a href="#elementMarshalling">
- * Marshalling a JAXB element</a>.
- * @throws IllegalArgumentException
- * If any of the method parameters are null
- * @since JAXB 2.0
- */
- public void marshal( Object jaxbElement, javax.xml.stream.XMLEventWriter writer )
- throws JAXBException;
-
- /**
- * Get a DOM tree view of the content tree(Optional).
- *
- * If the returned DOM tree is updated, these changes are also
- * visible in the content tree.
- * Use {@link #marshal(Object, org.w3c.dom.Node)} to force
- * a deep copy of the content tree to a DOM representation.
- *
- * @param contentTree - JAXB Java representation of XML content
- *
- * @return the DOM tree view of the contentTree
- *
- * @throws UnsupportedOperationException
- * If the JAXB provider implementation does not support a
- * DOM view of the content tree
- *
- * @throws IllegalArgumentException
- * If any of the method parameters are null
- *
- * @throws JAXBException
- * If any unexpected problem occurs
- *
- */
- public org.w3c.dom.Node getNode( java.lang.Object contentTree )
- throws JAXBException;
-
- /**
- * Set the particular property in the underlying implementation of
- * <tt>Marshaller</tt>. This method can only be used to set one of
- * the standard JAXB defined properties above or a provider specific
- * property. Attempting to set an undefined property will result in
- * a PropertyException being thrown. See <a href="#supportedProps">
- * Supported Properties</a>.
- *
- * @param name the name of the property to be set. This value can either
- * be specified using one of the constant fields or a user
- * supplied string.
- * @param value the value of the property to be set
- *
- * @throws PropertyException when there is an error processing the given
- * property or value
- * @throws IllegalArgumentException
- * If the name parameter is null
- */
- public void setProperty( String name, Object value )
- throws PropertyException;
-
- /**
- * Get the particular property in the underlying implementation of
- * <tt>Marshaller</tt>. This method can only be used to get one of
- * the standard JAXB defined properties above or a provider specific
- * property. Attempting to get an undefined property will result in
- * a PropertyException being thrown. See <a href="#supportedProps">
- * Supported Properties</a>.
- *
- * @param name the name of the property to retrieve
- * @return the value of the requested property
- *
- * @throws PropertyException
- * when there is an error retrieving the given property or value
- * property name
- * @throws IllegalArgumentException
- * If the name parameter is null
- */
- public Object getProperty( String name ) throws PropertyException;
-
- /**
- * Allow an application to register a validation event handler.
- * <p>
- * The validation event handler will be called by the JAXB Provider if any
- * validation errors are encountered during calls to any of the marshal
- * API's. If the client application does not register a validation event
- * handler before invoking one of the marshal methods, then validation
- * events will be handled by the default event handler which will terminate
- * the marshal operation after the first error or fatal error is encountered.
- * <p>
- * Calling this method with a null parameter will cause the Marshaller
- * to revert back to the default default event handler.
- *
- * @param handler the validation event handler
- * @throws JAXBException if an error was encountered while setting the
- * event handler
- */
- public void setEventHandler( ValidationEventHandler handler )
- throws JAXBException;
-
- /**
- * Return the current event handler or the default event handler if one
- * hasn't been set.
- *
- * @return the current ValidationEventHandler or the default event handler
- * if it hasn't been set
- * @throws JAXBException if an error was encountered while getting the
- * current event handler
- */
- public ValidationEventHandler getEventHandler()
- throws JAXBException;
-
-
-
- /**
- * Associates a configured instance of {@link XmlAdapter} with this marshaller.
- *
- * <p>
- * This is a convenience method that invokes <code>setAdapter(adapter.getClass(),adapter);</code>.
- *
- * @see #setAdapter(Class,XmlAdapter)
- * @throws IllegalArgumentException
- * if the adapter parameter is null.
- * @throws UnsupportedOperationException
- * if invoked agains a JAXB 1.0 implementation.
- * @since JAXB 2.0
- */
- public void setAdapter( XmlAdapter adapter );
-
- /**
- * Associates a configured instance of {@link XmlAdapter} with this marshaller.
- *
- * <p>
- * Every marshaller internally maintains a
- * {@link java.util.Map}&lt;{@link Class},{@link XmlAdapter}>,
- * which it uses for marshalling classes whose fields/methods are annotated
- * with {@link javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter}.
- *
- * <p>
- * This method allows applications to use a configured instance of {@link XmlAdapter}.
- * When an instance of an adapter is not given, a marshaller will create
- * one by invoking its default constructor.
- *
- * @param type
- * The type of the adapter. The specified instance will be used when
- * {@link javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter#value()}
- * refers to this type.
- * @param adapter
- * The instance of the adapter to be used. If null, it will un-register
- * the current adapter set for this type.
- * @throws IllegalArgumentException
- * if the type parameter is null.
- * @throws UnsupportedOperationException
- * if invoked agains a JAXB 1.0 implementation.
- * @since JAXB 2.0
- */
- public <A extends XmlAdapter> void setAdapter( Class<A> type, A adapter );
-
- /**
- * Gets the adapter associated with the specified type.
- *
- * This is the reverse operation of the {@link #setAdapter} method.
- *
- * @throws IllegalArgumentException
- * if the type parameter is null.
- * @throws UnsupportedOperationException
- * if invoked agains a JAXB 1.0 implementation.
- * @since JAXB 2.0
- */
- public <A extends XmlAdapter> A getAdapter( Class<A> type );
-
-
- /**
- * <p>Associate a context that enables binary data within an XML document
- * to be transmitted as XML-binary optimized attachment.
- * The attachment is referenced from the XML document content model
- * by content-id URIs(cid) references stored within the xml document.
- *
- * @throws IllegalStateException if attempt to concurrently call this
- * method during a marshal operation.
- */
- void setAttachmentMarshaller(AttachmentMarshaller am);
-
- AttachmentMarshaller getAttachmentMarshaller();
-
- /**
- * Specify the JAXP 1.3 {@link javax.xml.validation.Schema Schema}
- * object that should be used to validate subsequent marshal operations
- * against. Passing null into this method will disable validation.
- *
- * <p>
- * This method allows the caller to validate the marshalled XML as it's marshalled.
- *
- * <p>
- * Initially this property is set to <tt>null</tt>.
- *
- * @param schema Schema object to validate marshal operations against or null to disable validation
- * @throws UnsupportedOperationException could be thrown if this method is
- * invoked on an Marshaller created from a JAXBContext referencing
- * JAXB 1.0 mapped classes
- * @since JAXB2.0
- */
- public void setSchema( Schema schema );
-
- /**
- * Get the JAXP 1.3 {@link javax.xml.validation.Schema Schema} object
- * being used to perform marshal-time validation. If there is no
- * Schema set on the marshaller, then this method will return null
- * indicating that marshal-time validation will not be performed.
- *
- * @return the Schema object being used to perform marshal-time
- * validation or null if not present.
- * @throws UnsupportedOperationException could be thrown if this method is
- * invoked on an Marshaller created from a JAXBContext referencing
- * JAXB 1.0 mapped classes
- * @since JAXB2.0
- */
- public Schema getSchema();
-
- /**
- * <p/>
- * Register an instance of an implementation of this class with a {@link Marshaller} to externally listen
- * for marshal events.
- * <p/>
- * <p/>
- * This class enables pre and post processing of each marshalled object.
- * The event callbacks are called when marshalling from an instance that maps to an xml element or
- * complex type definition. The event callbacks are not called when marshalling from an instance of a
- * Java datatype that represents a simple type definition.
- * <p/>
- * <p/>
- * External listener is one of two different mechanisms for defining marshal event callbacks.
- * See <a href="Marshaller.html#marshalEventCallback">Marshal Event Callbacks</a> for an overview.
- *
- * @see Marshaller#setListener(Listener)
- * @see Marshaller#getListener()
- * @since JAXB2.0
- */
- public static abstract class Listener {
- /**
- * <p/>
- * Callback method invoked before marshalling from <tt>source</tt> to XML.
- * <p/>
- * <p/>
- * This method is invoked just before marshalling process starts to marshal <tt>source</tt>.
- * Note that if the class of <tt>source</tt> defines its own <tt>beforeMarshal</tt> method,
- * the class specific callback method is invoked just before this method is invoked.
- *
- * @param source instance of JAXB mapped class prior to marshalling from it.
- */
- public void beforeMarshal(Object source) {
- }
-
- /**
- * <p/>
- * Callback method invoked after marshalling <tt>source</tt> to XML.
- * <p/>
- * <p/>
- * This method is invoked after <tt>source</tt> and all its descendants have been marshalled.
- * Note that if the class of <tt>source</tt> defines its own <tt>afterMarshal</tt> method,
- * the class specific callback method is invoked just before this method is invoked.
- *
- * @param source instance of JAXB mapped class after marshalling it.
- */
- public void afterMarshal(Object source) {
- }
- }
-
- /**
- * <p>
- * Register marshal event callback {@link Listener} with this {@link Marshaller}.
- *
- * <p>
- * There is only one Listener per Marshaller. Setting a Listener replaces the previous set Listener.
- * One can unregister current Listener by setting listener to <tt>null</tt>.
- *
- * @param listener an instance of a class that implements {@link Listener}
- * @since JAXB2.0
- */
- public void setListener(Listener listener);
-
- /**
- * <p>Return {@link Listener} registered with this {@link Marshaller}.
- *
- * @return registered {@link Listener} or <code>null</code> if no Listener is registered with this Marshaller.
- * @since JAXB2.0
- */
- public Listener getListener();
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/Messages.java b/src/share/jaxws_classes/javax/xml/bind/Messages.java
deleted file mode 100644
index a1ebb81f..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/Messages.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-class Messages
-{
- static String format( String property ) {
- return format( property, null );
- }
-
- static String format( String property, Object arg1 ) {
- return format( property, new Object[]{arg1} );
- }
-
- static String format( String property, Object arg1, Object arg2 ) {
- return format( property, new Object[]{arg1,arg2} );
- }
-
- static String format( String property, Object arg1, Object arg2, Object arg3 ) {
- return format( property, new Object[]{arg1,arg2,arg3} );
- }
-
- // add more if necessary.
-
- /** Loads a string resource and formats it with specified arguments. */
- static String format( String property, Object[] args ) {
- String text = ResourceBundle.getBundle(Messages.class.getName()).getString(property);
- return MessageFormat.format(text,args);
- }
-
-//
-//
-// Message resources
-//
-//
- static final String PROVIDER_NOT_FOUND = // 1 arg
- "ContextFinder.ProviderNotFound";
-
- static final String COULD_NOT_INSTANTIATE = // 2 args
- "ContextFinder.CouldNotInstantiate";
-
- static final String CANT_FIND_PROPERTIES_FILE = // 1 arg
- "ContextFinder.CantFindPropertiesFile";
-
- static final String CANT_MIX_PROVIDERS = // 0 args
- "ContextFinder.CantMixProviders";
-
- static final String MISSING_PROPERTY = // 2 args
- "ContextFinder.MissingProperty";
-
- static final String NO_PACKAGE_IN_CONTEXTPATH = // 0 args
- "ContextFinder.NoPackageInContextPath";
-
- static final String NAME_VALUE = // 2 args
- "PropertyException.NameValue";
-
- static final String CONVERTER_MUST_NOT_BE_NULL = // 0 args
- "DatatypeConverter.ConverterMustNotBeNull";
-
- static final String ILLEGAL_CAST = // 2 args
- "JAXBContext.IllegalCast";
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/Messages.properties b/src/share/jaxws_classes/javax/xml/bind/Messages.properties
deleted file mode 100644
index e6a930d6..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/Messages.properties
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Copyright (c) 2003, 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.
-#
-
-ContextFinder.ProviderNotFound = \
- Provider {0} not found
-
-ContextFinder.CouldNotInstantiate = \
- Provider {0} could not be instantiated: {1}
-
-ContextFinder.CantFindPropertiesFile = \
- Unable to locate jaxb.properties for package {0}
-
-ContextFinder.CantMixProviders = \
- You may not mix JAXB Providers on the context path
-
-ContextFinder.MissingProperty = \
- jaxb.properties in package {0} does not contain the {1} property.
-
-ContextFinder.NoPackageInContextPath = \
- No package name is given
-
-PropertyException.NameValue = \
- name: {0} value: {1}
-
-DatatypeConverter.ConverterMustNotBeNull = \
- The DatatypeConverterInterface parameter must not be null
-
-JAXBContext.IllegalCast = \
- ClassCastException: attempting to cast {0} to {1}. Please make sure that you are specifying the proper ClassLoader.
diff --git a/src/share/jaxws_classes/javax/xml/bind/NotIdentifiableEvent.java b/src/share/jaxws_classes/javax/xml/bind/NotIdentifiableEvent.java
deleted file mode 100644
index f4820c96..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/NotIdentifiableEvent.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * This event indicates that a problem was encountered resolving an ID/IDREF.
- *
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @see Validator
- * @see ValidationEventHandler
- * @since JAXB1.0
- */
-public interface NotIdentifiableEvent extends ValidationEvent {
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/ParseConversionEvent.java b/src/share/jaxws_classes/javax/xml/bind/ParseConversionEvent.java
deleted file mode 100644
index b6ee5e69..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/ParseConversionEvent.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * This event indicates that a problem was encountered while converting a
- * string from the XML data into a value of the target Java data type.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @see ValidationEvent
- * @see ValidationEventHandler
- * @see Unmarshaller
- * @since JAXB1.0
- */
-public interface ParseConversionEvent extends ValidationEvent {
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/PrintConversionEvent.java b/src/share/jaxws_classes/javax/xml/bind/PrintConversionEvent.java
deleted file mode 100644
index c630cf62..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/PrintConversionEvent.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * This event indicates that a problem was encountered while converting data
- * from the Java content tree into its lexical representation.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @see ValidationEvent
- * @see ValidationEventHandler
- * @see Marshaller
- * @since JAXB1.0
- */
-public interface PrintConversionEvent extends ValidationEvent {
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/PropertyException.java b/src/share/jaxws_classes/javax/xml/bind/PropertyException.java
deleted file mode 100644
index 65613b84..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/PropertyException.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-
-
-/**
- * This exception indicates that an error was encountered while getting or
- * setting a property.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @see JAXBContext
- * @see Validator
- * @see Unmarshaller
- * @since JAXB1.0
- */
-public class PropertyException extends JAXBException {
-
- /**
- * Construct a PropertyException with the specified detail message. The
- * errorCode and linkedException will default to null.
- *
- * @param message a description of the exception
- */
- public PropertyException(String message) {
- super(message);
- }
-
- /**
- * Construct a PropertyException with the specified detail message and
- * vendor specific errorCode. The linkedException will default to null.
- *
- * @param message a description of the exception
- * @param errorCode a string specifying the vendor specific error code
- */
- public PropertyException(String message, String errorCode) {
- super(message, errorCode);
- }
-
- /**
- * Construct a PropertyException with a linkedException. The detail
- * message and vendor specific errorCode will default to null.
- *
- * @param exception the linked exception
- */
- public PropertyException(Throwable exception) {
- super(exception);
- }
-
- /**
- * Construct a PropertyException with the specified detail message and
- * linkedException. The errorCode will default to null.
- *
- * @param message a description of the exception
- * @param exception the linked exception
- */
- public PropertyException(String message, Throwable exception) {
- super(message, exception);
- }
-
- /**
- * Construct a PropertyException with the specified detail message, vendor
- * specific errorCode, and linkedException.
- *
- * @param message a description of the exception
- * @param errorCode a string specifying the vendor specific error code
- * @param exception the linked exception
- */
- public PropertyException(
- String message,
- String errorCode,
- Throwable exception) {
- super(message, errorCode, exception);
- }
-
- /**
- * Construct a PropertyException whose message field is set based on the
- * name of the property and value.toString().
- *
- * @param name the name of the property related to this exception
- * @param value the value of the property related to this exception
- */
- public PropertyException(String name, Object value) {
- super( Messages.format( Messages.NAME_VALUE,
- name,
- value.toString() ) );
- }
-
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/SchemaOutputResolver.java b/src/share/jaxws_classes/javax/xml/bind/SchemaOutputResolver.java
deleted file mode 100644
index f911107b..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/SchemaOutputResolver.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import javax.xml.transform.Result;
-import java.io.IOException;
-
-/**
- * Controls where a JAXB implementation puts the generates
- * schema files.
- *
- * <p>
- * An implementation of this abstract class has to be provided by the calling
- * application to generate schemas.
- *
- * <p>
- * This is a class, not an interface so as to allow future versions to evolve
- * without breaking the compatibility.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public abstract class SchemaOutputResolver {
- /**
- * Decides where the schema file (of the given namespace URI)
- * will be written, and return it as a {@link Result} object.
- *
- * <p>
- * This method is called only once for any given namespace.
- * IOW, all the components in one namespace is always written
- * into the same schema document.
- *
- * @param namespaceUri
- * The namespace URI that the schema declares.
- * Can be the empty string, but never be null.
- * @param suggestedFileName
- * A JAXB implementation generates an unique file name (like "schema1.xsd")
- * for the convenience of the callee. This name can be
- * used for the file name of the schema, or the callee can just
- * ignore this name and come up with its own name.
- * This is just a hint.
- *
- * @return
- * a {@link Result} object that encapsulates the actual destination
- * of the schema.
- *
- * If the {@link Result} object has a system ID, it must be an
- * absolute system ID. Those system IDs are relativized by the caller and used
- * for &lt;xs:import> statements.
- *
- * If the {@link Result} object does not have a system ID, a schema
- * for the namespace URI is generated but it won't be explicitly
- * &lt;xs:import>ed from other schemas.
- *
- * If {@code null} is returned, the schema generation for this
- * namespace URI will be skipped.
- */
- public abstract Result createOutput( String namespaceUri, String suggestedFileName ) throws IOException;
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java b/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java
deleted file mode 100644
index 9189d211..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * This exception indicates that a violation of a dynamically checked type
- * constraint was detected.
- *
- * <p>
- * This exception can be thrown by the generated setter methods of the schema
- * derived Java content classes. However, since fail-fast validation is
- * an optional feature for JAXB Providers to support, not all setter methods
- * will throw this exception when a type constraint is violated.
- *
- * <p>
- * If this exception is throw while invoking a fail-fast setter, the value of
- * the property is guaranteed to remain unchanged, as if the setter were never
- * called.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @see ValidationEvent
- * @since JAXB1.0
- */
-
-public class TypeConstraintException extends java.lang.RuntimeException {
-
- /**
- * Vendor specific error code
- *
- */
- private String errorCode;
-
- /**
- * Exception reference
- *
- */
- private volatile Throwable linkedException;
-
- static final long serialVersionUID = -3059799699420143848L;
-
- /**
- * Construct a TypeConstraintException with the specified detail message. The
- * errorCode and linkedException will default to null.
- *
- * @param message a description of the exception
- */
- public TypeConstraintException(String message) {
- this( message, null, null );
- }
-
- /**
- * Construct a TypeConstraintException with the specified detail message and vendor
- * specific errorCode. The linkedException will default to null.
- *
- * @param message a description of the exception
- * @param errorCode a string specifying the vendor specific error code
- */
- public TypeConstraintException(String message, String errorCode) {
- this( message, errorCode, null );
- }
-
- /**
- * Construct a TypeConstraintException with a linkedException. The detail message and
- * vendor specific errorCode will default to null.
- *
- * @param exception the linked exception
- */
- public TypeConstraintException(Throwable exception) {
- this( null, null, exception );
- }
-
- /**
- * Construct a TypeConstraintException with the specified detail message and
- * linkedException. The errorCode will default to null.
- *
- * @param message a description of the exception
- * @param exception the linked exception
- */
- public TypeConstraintException(String message, Throwable exception) {
- this( message, null, exception );
- }
-
- /**
- * Construct a TypeConstraintException with the specified detail message,
- * vendor specific errorCode, and linkedException.
- *
- * @param message a description of the exception
- * @param errorCode a string specifying the vendor specific error code
- * @param exception the linked exception
- */
- public TypeConstraintException(String message, String errorCode, Throwable exception) {
- super( message );
- this.errorCode = errorCode;
- this.linkedException = exception;
- }
-
- /**
- * Get the vendor specific error code
- *
- * @return a string specifying the vendor specific error code
- */
- public String getErrorCode() {
- return this.errorCode;
- }
-
- /**
- * Get the linked exception
- *
- * @return the linked Exception, null if none exists
- */
- public Throwable getLinkedException() {
- return linkedException;
- }
-
- /**
- * Add a linked Exception.
- *
- * @param exception the linked Exception (A null value is permitted and
- * indicates that the linked exception does not exist or
- * is unknown).
- */
- public void setLinkedException( Throwable exception ) {
- this.linkedException = exception;
- }
-
- /**
- * Returns a short description of this TypeConstraintException.
- *
- */
- public String toString() {
- return linkedException == null ?
- super.toString() :
- super.toString() + "\n - with linked exception:\n[" +
- linkedException.toString()+ "]";
- }
-
- /**
- * Prints this TypeConstraintException and its stack trace (including the stack trace
- * of the linkedException if it is non-null) to the PrintStream.
- *
- * @param s PrintStream to use for output
- */
- public void printStackTrace( java.io.PrintStream s ) {
- if( linkedException != null ) {
- linkedException.printStackTrace(s);
- s.println("--------------- linked to ------------------");
- }
-
- super.printStackTrace(s);
- }
-
- /**
- * Prints this TypeConstraintException and its stack trace (including the stack trace
- * of the linkedException if it is non-null) to <tt>System.err</tt>.
- *
- */
- public void printStackTrace() {
- printStackTrace(System.err);
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/UnmarshalException.java b/src/share/jaxws_classes/javax/xml/bind/UnmarshalException.java
deleted file mode 100644
index 88746597..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/UnmarshalException.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * This exception indicates that an error has occurred while performing
- * an unmarshal operation that prevents the JAXB Provider from completing
- * the operation.
- *
- * <p>
- * The <tt>ValidationEventHandler</tt> can cause this exception to be thrown
- * during the unmarshal operations. See
- * {@link ValidationEventHandler#handleEvent(ValidationEvent)
- * ValidationEventHandler.handleEvent(ValidationEvent)}.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
- * @see JAXBException
- * @see Unmarshaller
- * @see ValidationEventHandler
- * @since JAXB1.0
- */
-public class UnmarshalException extends JAXBException {
-
- /**
- * Construct an UnmarshalException with the specified detail message. The
- * errorCode and linkedException will default to null.
- *
- * @param message a description of the exception
- */
- public UnmarshalException( String message ) {
- this( message, null, null );
- }
-
- /**
- * Construct an UnmarshalException with the specified detail message and vendor
- * specific errorCode. The linkedException will default to null.
- *
- * @param message a description of the exception
- * @param errorCode a string specifying the vendor specific error code
- */
- public UnmarshalException( String message, String errorCode ) {
- this( message, errorCode, null );
- }
-
- /**
- * Construct an UnmarshalException with a linkedException. The detail message and
- * vendor specific errorCode will default to null.
- *
- * @param exception the linked exception
- */
- public UnmarshalException( Throwable exception ) {
- this( null, null, exception );
- }
-
- /**
- * Construct an UnmarshalException with the specified detail message and
- * linkedException. The errorCode will default to null.
- *
- * @param message a description of the exception
- * @param exception the linked exception
- */
- public UnmarshalException( String message, Throwable exception ) {
- this( message, null, exception );
- }
-
- /**
- * Construct an UnmarshalException with the specified detail message, vendor
- * specific errorCode, and linkedException.
- *
- * @param message a description of the exception
- * @param errorCode a string specifying the vendor specific error code
- * @param exception the linked exception
- */
- public UnmarshalException( String message, String errorCode, Throwable exception ) {
- super( message, errorCode, exception );
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/Unmarshaller.java b/src/share/jaxws_classes/javax/xml/bind/Unmarshaller.java
deleted file mode 100644
index eb3090ab..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/Unmarshaller.java
+++ /dev/null
@@ -1,1142 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-import javax.xml.validation.Schema;
-import java.io.Reader;
-
-/**
- * The <tt>Unmarshaller</tt> class governs the process of deserializing XML
- * data into newly created Java content trees, optionally validating the XML
- * data as it is unmarshalled. It provides an overloading of unmarshal methods
- * for many different input kinds.
- *
- * <p>
- * Unmarshalling from a File:
- * <blockquote>
- * <pre>
- * JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
- * Unmarshaller u = jc.createUnmarshaller();
- * Object o = u.unmarshal( new File( "nosferatu.xml" ) );
- * </pre>
- * </blockquote>
- *
- *
- * <p>
- * Unmarshalling from an InputStream:
- * <blockquote>
- * <pre>
- * InputStream is = new FileInputStream( "nosferatu.xml" );
- * JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
- * Unmarshaller u = jc.createUnmarshaller();
- * Object o = u.unmarshal( is );
- * </pre>
- * </blockquote>
- *
- * <p>
- * Unmarshalling from a URL:
- * <blockquote>
- * <pre>
- * JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
- * Unmarshaller u = jc.createUnmarshaller();
- * URL url = new URL( "http://beaker.east/nosferatu.xml" );
- * Object o = u.unmarshal( url );
- * </pre>
- * </blockquote>
- *
- * <p>
- * Unmarshalling from a StringBuffer using a
- * <tt>javax.xml.transform.stream.StreamSource</tt>:
- * <blockquote>
- * <pre>
- * JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
- * Unmarshaller u = jc.createUnmarshaller();
- * StringBuffer xmlStr = new StringBuffer( "&lt;?xml version=&quot;1.0&quot;?&gt;..." );
- * Object o = u.unmarshal( new StreamSource( new StringReader( xmlStr.toString() ) ) );
- * </pre>
- * </blockquote>
- *
- * <p>
- * Unmarshalling from a <tt>org.w3c.dom.Node</tt>:
- * <blockquote>
- * <pre>
- * JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
- * Unmarshaller u = jc.createUnmarshaller();
- *
- * DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- * dbf.setNamespaceAware(true);
- * DocumentBuilder db = dbf.newDocumentBuilder();
- * Document doc = db.parse(new File( "nosferatu.xml"));
-
- * Object o = u.unmarshal( doc );
- * </pre>
- * </blockquote>
- *
- * <p>
- * Unmarshalling from a <tt>javax.xml.transform.sax.SAXSource</tt> using a
- * client specified validating SAX2.0 parser:
- * <blockquote>
- * <pre>
- * // configure a validating SAX2.0 parser (Xerces2)
- * static final String JAXP_SCHEMA_LANGUAGE =
- * "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
- * static final String JAXP_SCHEMA_LOCATION =
- * "http://java.sun.com/xml/jaxp/properties/schemaSource";
- * static final String W3C_XML_SCHEMA =
- * "http://www.w3.org/2001/XMLSchema";
- *
- * System.setProperty( "javax.xml.parsers.SAXParserFactory",
- * "org.apache.xerces.jaxp.SAXParserFactoryImpl" );
- *
- * SAXParserFactory spf = SAXParserFactory.newInstance();
- * spf.setNamespaceAware(true);
- * spf.setValidating(true);
- * SAXParser saxParser = spf.newSAXParser();
- *
- * try {
- * saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
- * saxParser.setProperty(JAXP_SCHEMA_LOCATION, "http://....");
- * } catch (SAXNotRecognizedException x) {
- * // exception handling omitted
- * }
- *
- * XMLReader xmlReader = saxParser.getXMLReader();
- * SAXSource source =
- * new SAXSource( xmlReader, new InputSource( "http://..." ) );
- *
- * // Setup JAXB to unmarshal
- * JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
- * Unmarshaller u = jc.createUnmarshaller();
- * ValidationEventCollector vec = new ValidationEventCollector();
- * u.setEventHandler( vec );
- *
- * // turn off the JAXB provider's default validation mechanism to
- * // avoid duplicate validation
- * u.setValidating( false )
- *
- * // unmarshal
- * Object o = u.unmarshal( source );
- *
- * // check for events
- * if( vec.hasEvents() ) {
- * // iterate over events
- * }
- * </pre>
- * </blockquote>
- *
- * <p>
- * Unmarshalling from a StAX XMLStreamReader:
- * <blockquote>
- * <pre>
- * JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
- * Unmarshaller u = jc.createUnmarshaller();
- *
- * javax.xml.stream.XMLStreamReader xmlStreamReader =
- * javax.xml.stream.XMLInputFactory().newInstance().createXMLStreamReader( ... );
- *
- * Object o = u.unmarshal( xmlStreamReader );
- * </pre>
- * </blockquote>
- *
- * <p>
- * Unmarshalling from a StAX XMLEventReader:
- * <blockquote>
- * <pre>
- * JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
- * Unmarshaller u = jc.createUnmarshaller();
- *
- * javax.xml.stream.XMLEventReader xmlEventReader =
- * javax.xml.stream.XMLInputFactory().newInstance().createXMLEventReader( ... );
- *
- * Object o = u.unmarshal( xmlEventReader );
- * </pre>
- * </blockquote>
- *
- * <p>
- * <a name="unmarshalEx"></a>
- * <b>Unmarshalling XML Data</b><br>
- * <blockquote>
- * Unmarshalling can deserialize XML data that represents either an entire XML document
- * or a subtree of an XML document. Typically, it is sufficient to use the
- * unmarshalling methods described by
- * <a href="#unmarshalGlobal">Unmarshal root element that is declared globally</a>.
- * These unmarshal methods utilize {@link JAXBContext}'s mapping of global XML element
- * declarations and type definitions to JAXB mapped classes to initiate the
- * unmarshalling of the root element of XML data. When the {@link JAXBContext}'s
- * mappings are not sufficient to unmarshal the root element of XML data,
- * the application can assist the unmarshalling process by using the
- * <a href="#unmarshalByDeclaredType">unmarshal by declaredType methods</a>.
- * These methods are useful for unmarshalling XML data where
- * the root element corresponds to a local element declaration in the schema.
- * </blockquote>
- *
- * <blockquote>
- * An unmarshal method never returns null. If the unmarshal process is unable to unmarshal
- * the root of XML content to a JAXB mapped object, a fatal error is reported that
- * terminates processing by throwing JAXBException.
- * </blockquote>
- *
- * <p>
- * <a name="unmarshalGlobal"></a>
- * <b>Unmarshal a root element that is globally declared</b><br>
- * <blockquote>
- * The unmarshal methods that do not have an <tt>declaredType</tt> parameter use
- * {@link JAXBContext} to unmarshal the root element of an XML data. The {@link JAXBContext}
- * instance is the one that was used to create this <tt>Unmarshaller</tt>. The {@link JAXBContext}
- * instance maintains a mapping of globally declared XML element and type definition names to
- * JAXB mapped classes. The unmarshal method checks if {@link JAXBContext} has a mapping
- * from the root element's XML name and/or <tt>@xsi:type</tt> to a JAXB mapped class. If it does, it umarshalls the
- * XML data using the appropriate JAXB mapped class. Note that when the root element name is unknown and the root
- * element has an <tt>@xsi:type</tt>, the XML data is unmarshalled
- * using that JAXB mapped class as the value of a {@link JAXBElement}.
- * When the {@link JAXBContext} object does not have a mapping for the root element's name
- * nor its <tt>@xsi:type</tt>, if it exists,
- * then the unmarshal operation will abort immediately by throwing a {@link UnmarshalException
- * UnmarshalException}. This exception scenario can be worked around by using the unmarshal by
- * declaredType methods described in the next subsection.
- * </blockquote>
- *
- * <p>
- * <a name="unmarshalByDeclaredType"></a>
- * <b>Unmarshal by Declared Type</b><br>
- * <blockquote>
- * The unmarshal methods with a <code>declaredType</code> parameter enable an
- * application to deserialize a root element of XML data, even when
- * there is no mapping in {@link JAXBContext} of the root element's XML name.
- * The unmarshaller unmarshals the root element using the application provided
- * mapping specified as the <tt>declaredType</tt> parameter.
- * Note that even when the root element's element name is mapped by {@link JAXBContext},
- * the <code>declaredType</code> parameter overrides that mapping for
- * deserializing the root element when using these unmarshal methods.
- * Additionally, when the root element of XML data has an <tt>xsi:type</tt> attribute and
- * that attribute's value references a type definition that is mapped
- * to a JAXB mapped class by {@link JAXBContext}, that the root
- * element's <tt>xsi:type</tt> attribute takes
- * precedence over the unmarshal methods <tt>declaredType</tt> parameter.
- * These methods always return a <tt>JAXBElement&lt;declaredType></tt>
- * instance. The table below shows how the properties of the returned JAXBElement
- * instance are set.
- *
- * <a name="unmarshalDeclaredTypeReturn"></a>
- * <p>
- * <table border="2" rules="all" cellpadding="4">
- * <thead>
- * <tr>
- * <th align="center" colspan="2">
- * Unmarshal By Declared Type returned JAXBElement
- * </tr>
- * <tr>
- * <th>JAXBElement Property</th>
- * <th>Value</th>
- * </tr>
- * <tr>
- * <td>name</td>
- * <td><code>xml element name</code></td>
- * </tr>
- * </thead>
- * <tbody>
- * <tr>
- * <td>value</td>
- * <td><code>instanceof declaredType</code></td>
- * </tr>
- * <tr>
- * <td>declaredType</td>
- * <td>unmarshal method <code>declaredType</code> parameter</td>
- * </tr>
- * <tr>
- * <td>scope</td>
- * <td><code>null</code> <i>(actual scope is unknown)</i></td>
- * </tr>
- * </tbody>
- * </table>
- * </blockquote>
- *
- * <p>
- * The following is an example of
- * <a href="#unmarshalByDeclaredType">unmarshal by declaredType method</a>.
- * <p>
- * Unmarshal by declaredType from a <tt>org.w3c.dom.Node</tt>:
- * <blockquote>
- * <pre>
- * Schema fragment for example
- * &lt;xs:schema>
- * &lt;xs:complexType name="FooType">...&lt;\xs:complexType>
- * &lt;!-- global element declaration "PurchaseOrder" -->
- * &lt;xs:element name="PurchaseOrder">
- * &lt;xs:complexType>
- * &lt;xs:sequence>
- * &lt;!-- local element declaration "foo" -->
- * &lt;xs:element name="foo" type="FooType"/>
- * ...
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * &lt;/xs:element>
- * &lt;/xs:schema>
- *
- * JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
- * Unmarshaller u = jc.createUnmarshaller();
- *
- * DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- * dbf.setNamespaceAware(true);
- * DocumentBuilder db = dbf.newDocumentBuilder();
- * Document doc = db.parse(new File( "nosferatu.xml"));
- * Element fooSubtree = ...; // traverse DOM till reach xml element foo, constrained by a
- * // local element declaration in schema.
- *
- * // FooType is the JAXB mapping of the type of local element declaration foo.
- * JAXBElement&lt;FooType> foo = u.unmarshal( fooSubtree, FooType.class);
- * </pre>
- * </blockquote>
- *
- * <p>
- * <b>Support for SAX2.0 Compliant Parsers</b><br>
- * <blockquote>
- * A client application has the ability to select the SAX2.0 compliant parser
- * of their choice. If a SAX parser is not selected, then the JAXB Provider's
- * default parser will be used. Even though the JAXB Provider's default parser
- * is not required to be SAX2.0 compliant, all providers are required to allow
- * a client application to specify their own SAX2.0 parser. Some providers may
- * require the client application to specify the SAX2.0 parser at schema compile
- * time. See {@link #unmarshal(javax.xml.transform.Source) unmarshal(Source)}
- * for more detail.
- * </blockquote>
- *
- * <p>
- * <b>Validation and Well-Formedness</b><br>
- * <blockquote>
- * <p>
- * A client application can enable or disable JAXP 1.3 validation
- * mechanism via the <tt>setSchema(javax.xml.validation.Schema)</tt> API.
- * Sophisticated clients can specify their own validating SAX 2.0 compliant
- * parser and bypass the JAXP 1.3 validation mechanism using the
- * {@link #unmarshal(javax.xml.transform.Source) unmarshal(Source)} API.
- *
- * <p>
- * Since unmarshalling invalid XML content is defined in JAXB 2.0,
- * the Unmarshaller default validation event handler was made more lenient
- * than in JAXB 1.0. When schema-derived code generated
- * by JAXB 1.0 binding compiler is registered with {@link JAXBContext},
- * the default unmarshal validation handler is
- * {@link javax.xml.bind.helpers.DefaultValidationEventHandler} and it
- * terminates the marshal operation after encountering either a fatal error or an error.
- * For a JAXB 2.0 client application, there is no explicitly defined default
- * validation handler and the default event handling only
- * terminates the unmarshal operation after encountering a fatal error.
- *
- * </blockquote>
- *
- * <p>
- * <a name="supportedProps"></a>
- * <b>Supported Properties</b><br>
- * <blockquote>
- * <p>
- * There currently are not any properties required to be supported by all
- * JAXB Providers on Unmarshaller. However, some providers may support
- * their own set of provider specific properties.
- * </blockquote>
- *
- * <p>
- * <a name="unmarshalEventCallback"></a>
- * <b>Unmarshal Event Callbacks</b><br>
- * <blockquote>
- * The {@link Unmarshaller} provides two styles of callback mechanisms
- * that allow application specific processing during key points in the
- * unmarshalling process. In 'class defined' event callbacks, application
- * specific code placed in JAXB mapped classes is triggered during
- * unmarshalling. 'External listeners' allow for centralized processing
- * of unmarshal events in one callback method rather than by type event callbacks.
- * <p>
- * 'Class defined' event callback methods allow any JAXB mapped class to specify
- * its own specific callback methods by defining methods with the following method signature:
- * <blockquote>
- * <pre>
- * // This method is called immediately after the object is created and before the unmarshalling of this
- * // object begins. The callback provides an opportunity to initialize JavaBean properties prior to unmarshalling.
- * void beforeUnmarshal(Unmarshaller, Object parent);
- *
- * //This method is called after all the properties (except IDREF) are unmarshalled for this object,
- * //but before this object is set to the parent object.
- * void afterUnmarshal(Unmarshaller, Object parent);
- * </pre>
- * </blockquote>
- * The class defined callback methods should be used when the callback method requires
- * access to non-public methods and/or fields of the class.
- * <p>
- * The external listener callback mechanism enables the registration of a {@link Listener}
- * instance with an {@link Unmarshaller#setListener(Listener)}. The external listener receives all callback events,
- * allowing for more centralized processing than per class defined callback methods. The external listener
- * receives events when unmarshalling proces is marshalling to a JAXB element or to JAXB mapped class.
- * <p>
- * The 'class defined' and external listener event callback methods are independent of each other,
- * both can be called for one event. The invocation ordering when both listener callback methods exist is
- * defined in {@link Listener#beforeUnmarshal(Object, Object)} and {@link Listener#afterUnmarshal(Object, Object)}.
-* <p>
- * An event callback method throwing an exception terminates the current unmarshal process.
- *
- * </blockquote>
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @see JAXBContext
- * @see Marshaller
- * @see Validator
- * @since JAXB1.0
- */
-public interface Unmarshaller {
-
- /**
- * Unmarshal XML data from the specified file and return the resulting
- * content tree.
- *
- * <p>
- * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
- *
- * @param f the file to unmarshal XML data from
- * @return the newly created root object of the java content tree
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Unmarshaller</tt> is unable to perform the XML to Java
- * binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a>
- * @throws IllegalArgumentException
- * If the file parameter is null
- */
- public Object unmarshal( java.io.File f ) throws JAXBException;
-
- /**
- * Unmarshal XML data from the specified InputStream and return the
- * resulting content tree. Validation event location information may
- * be incomplete when using this form of the unmarshal API.
- *
- * <p>
- * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
- *
- * @param is the InputStream to unmarshal XML data from
- * @return the newly created root object of the java content tree
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Unmarshaller</tt> is unable to perform the XML to Java
- * binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a>
- * @throws IllegalArgumentException
- * If the InputStream parameter is null
- */
- public Object unmarshal( java.io.InputStream is ) throws JAXBException;
-
- /**
- * Unmarshal XML data from the specified Reader and return the
- * resulting content tree. Validation event location information may
- * be incomplete when using this form of the unmarshal API,
- * because a Reader does not provide the system ID.
- *
- * <p>
- * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
- *
- * @param reader the Reader to unmarshal XML data from
- * @return the newly created root object of the java content tree
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Unmarshaller</tt> is unable to perform the XML to Java
- * binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a>
- * @throws IllegalArgumentException
- * If the InputStream parameter is null
- * @since JAXB2.0
- */
- public Object unmarshal( Reader reader ) throws JAXBException;
-
- /**
- * Unmarshal XML data from the specified URL and return the resulting
- * content tree.
- *
- * <p>
- * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
- *
- * @param url the url to unmarshal XML data from
- * @return the newly created root object of the java content tree
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Unmarshaller</tt> is unable to perform the XML to Java
- * binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a>
- * @throws IllegalArgumentException
- * If the URL parameter is null
- */
- public Object unmarshal( java.net.URL url ) throws JAXBException;
-
- /**
- * Unmarshal XML data from the specified SAX InputSource and return the
- * resulting content tree.
- *
- * <p>
- * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
- *
- * @param source the input source to unmarshal XML data from
- * @return the newly created root object of the java content tree
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Unmarshaller</tt> is unable to perform the XML to Java
- * binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a>
- * @throws IllegalArgumentException
- * If the InputSource parameter is null
- */
- public Object unmarshal( org.xml.sax.InputSource source ) throws JAXBException;
-
- /**
- * Unmarshal global XML data from the specified DOM tree and return the resulting
- * content tree.
- *
- * <p>
- * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
- *
- * @param node
- * the document/element to unmarshal XML data from.
- * The caller must support at least Document and Element.
- * @return the newly created root object of the java content tree
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Unmarshaller</tt> is unable to perform the XML to Java
- * binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a>
- * @throws IllegalArgumentException
- * If the Node parameter is null
- * @see #unmarshal(org.w3c.dom.Node, Class)
- */
- public Object unmarshal( org.w3c.dom.Node node ) throws JAXBException;
-
- /**
- * Unmarshal XML data by JAXB mapped <tt>declaredType</tt>
- * and return the resulting content tree.
- *
- * <p>
- * Implements <a href="#unmarshalByDeclaredType">Unmarshal by Declared Type</a>
- *
- * @param node
- * the document/element to unmarshal XML data from.
- * The caller must support at least Document and Element.
- * @param declaredType
- * appropriate JAXB mapped class to hold <tt>node</tt>'s XML data.
- *
- * @return <a href="#unmarshalDeclaredTypeReturn">JAXB Element</a> representation of <tt>node</tt>
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Unmarshaller</tt> is unable to perform the XML to Java
- * binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a>
- * @throws IllegalArgumentException
- * If any parameter is null
- * @since JAXB2.0
- */
- public <T> JAXBElement<T> unmarshal( org.w3c.dom.Node node, Class<T> declaredType ) throws JAXBException;
-
- /**
- * Unmarshal XML data from the specified XML Source and return the
- * resulting content tree.
- *
- * <p>
- * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
- *
- * <p>
- * <a name="saxParserPlugable"></a>
- * <b>SAX 2.0 Parser Pluggability</b>
- * <p>
- * A client application can choose not to use the default parser mechanism
- * supplied with their JAXB provider. Any SAX 2.0 compliant parser can be
- * substituted for the JAXB provider's default mechanism. To do so, the
- * client application must properly configure a <tt>SAXSource</tt> containing
- * an <tt>XMLReader</tt> implemented by the SAX 2.0 parser provider. If the
- * <tt>XMLReader</tt> has an <tt>org.xml.sax.ErrorHandler</tt> registered
- * on it, it will be replaced by the JAXB Provider so that validation errors
- * can be reported via the <tt>ValidationEventHandler</tt> mechanism of
- * JAXB. If the <tt>SAXSource</tt> does not contain an <tt>XMLReader</tt>,
- * then the JAXB provider's default parser mechanism will be used.
- * <p>
- * This parser replacement mechanism can also be used to replace the JAXB
- * provider's unmarshal-time validation engine. The client application
- * must properly configure their SAX 2.0 compliant parser to perform
- * validation (as shown in the example above). Any <tt>SAXParserExceptions
- * </tt> encountered by the parser during the unmarshal operation will be
- * processed by the JAXB provider and converted into JAXB
- * <tt>ValidationEvent</tt> objects which will be reported back to the
- * client via the <tt>ValidationEventHandler</tt> registered with the
- * <tt>Unmarshaller</tt>. <i>Note:</i> specifying a substitute validating
- * SAX 2.0 parser for unmarshalling does not necessarily replace the
- * validation engine used by the JAXB provider for performing on-demand
- * validation.
- * <p>
- * The only way for a client application to specify an alternate parser
- * mechanism to be used during unmarshal is via the
- * <tt>unmarshal(SAXSource)</tt> API. All other forms of the unmarshal
- * method (File, URL, Node, etc) will use the JAXB provider's default
- * parser and validator mechanisms.
- *
- * @param source the XML Source to unmarshal XML data from (providers are
- * only required to support SAXSource, DOMSource, and StreamSource)
- * @return the newly created root object of the java content tree
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Unmarshaller</tt> is unable to perform the XML to Java
- * binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a>
- * @throws IllegalArgumentException
- * If the Source parameter is null
- * @see #unmarshal(javax.xml.transform.Source, Class)
- */
- public Object unmarshal( javax.xml.transform.Source source )
- throws JAXBException;
-
-
- /**
- * Unmarshal XML data from the specified XML Source by <tt>declaredType</tt> and return the
- * resulting content tree.
- *
- * <p>
- * Implements <a href="#unmarshalByDeclaredType">Unmarshal by Declared Type</a>
- *
- * <p>
- * See <a href="#saxParserPlugable">SAX 2.0 Parser Pluggability</a>
- *
- * @param source the XML Source to unmarshal XML data from (providers are
- * only required to support SAXSource, DOMSource, and StreamSource)
- * @param declaredType
- * appropriate JAXB mapped class to hold <tt>source</tt>'s xml root element
- * @return Java content rooted by <a href="#unmarshalDeclaredTypeReturn">JAXB Element</a>
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Unmarshaller</tt> is unable to perform the XML to Java
- * binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a>
- * @throws IllegalArgumentException
- * If any parameter is null
- * @since JAXB2.0
- */
- public <T> JAXBElement<T> unmarshal( javax.xml.transform.Source source, Class<T> declaredType )
- throws JAXBException;
-
- /**
- * Unmarshal XML data from the specified pull parser and return the
- * resulting content tree.
- *
- * <p>
- * Implements <a href="#unmarshalGlobal">Unmarshal Global Root Element</a>.
- *
- * <p>
- * This method assumes that the parser is on a START_DOCUMENT or
- * START_ELEMENT event. Unmarshalling will be done from this
- * start event to the corresponding end event. If this method
- * returns successfully, the <tt>reader</tt> will be pointing at
- * the token right after the end event.
- *
- * @param reader
- * The parser to be read.
- * @return
- * the newly created root object of the java content tree.
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Unmarshaller</tt> is unable to perform the XML to Java
- * binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a>
- * @throws IllegalArgumentException
- * If the <tt>reader</tt> parameter is null
- * @throws IllegalStateException
- * If <tt>reader</tt> is not pointing to a START_DOCUMENT or
- * START_ELEMENT event.
- * @since JAXB2.0
- * @see #unmarshal(javax.xml.stream.XMLStreamReader, Class)
- */
- public Object unmarshal( javax.xml.stream.XMLStreamReader reader )
- throws JAXBException;
-
- /**
- * Unmarshal root element to JAXB mapped <tt>declaredType</tt>
- * and return the resulting content tree.
- *
- * <p>
- * This method implements <a href="#unmarshalByDeclaredType">unmarshal by declaredType</a>.
- * <p>
- * This method assumes that the parser is on a START_DOCUMENT or
- * START_ELEMENT event. Unmarshalling will be done from this
- * start event to the corresponding end event. If this method
- * returns successfully, the <tt>reader</tt> will be pointing at
- * the token right after the end event.
- *
- * @param reader
- * The parser to be read.
- * @param declaredType
- * appropriate JAXB mapped class to hold <tt>reader</tt>'s START_ELEMENT XML data.
- *
- * @return content tree rooted by <a href="#unmarshalDeclaredTypeReturn">JAXB Element representation</a>
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Unmarshaller</tt> is unable to perform the XML to Java
- * binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a>
- * @throws IllegalArgumentException
- * If any parameter is null
- * @since JAXB2.0
- */
- public <T> JAXBElement<T> unmarshal( javax.xml.stream.XMLStreamReader reader, Class<T> declaredType ) throws JAXBException;
-
- /**
- * Unmarshal XML data from the specified pull parser and return the
- * resulting content tree.
- *
- * <p>
- * This method is an <a href="#unmarshalGlobal">Unmarshal Global Root method</a>.
- *
- * <p>
- * This method assumes that the parser is on a START_DOCUMENT or
- * START_ELEMENT event. Unmarshalling will be done from this
- * start event to the corresponding end event. If this method
- * returns successfully, the <tt>reader</tt> will be pointing at
- * the token right after the end event.
- *
- * @param reader
- * The parser to be read.
- * @return
- * the newly created root object of the java content tree.
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Unmarshaller</tt> is unable to perform the XML to Java
- * binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a>
- * @throws IllegalArgumentException
- * If the <tt>reader</tt> parameter is null
- * @throws IllegalStateException
- * If <tt>reader</tt> is not pointing to a START_DOCUMENT or
- * START_ELEMENT event.
- * @since JAXB2.0
- * @see #unmarshal(javax.xml.stream.XMLEventReader, Class)
- */
- public Object unmarshal( javax.xml.stream.XMLEventReader reader )
- throws JAXBException;
-
- /**
- * Unmarshal root element to JAXB mapped <tt>declaredType</tt>
- * and return the resulting content tree.
- *
- * <p>
- * This method implements <a href="#unmarshalByDeclaredType">unmarshal by declaredType</a>.
- *
- * <p>
- * This method assumes that the parser is on a START_DOCUMENT or
- * START_ELEMENT event. Unmarshalling will be done from this
- * start event to the corresponding end event. If this method
- * returns successfully, the <tt>reader</tt> will be pointing at
- * the token right after the end event.
- *
- * @param reader
- * The parser to be read.
- * @param declaredType
- * appropriate JAXB mapped class to hold <tt>reader</tt>'s START_ELEMENT XML data.
- *
- * @return content tree rooted by <a href="#unmarshalDeclaredTypeReturn">JAXB Element representation</a>
- *
- * @throws JAXBException
- * If any unexpected errors occur while unmarshalling
- * @throws UnmarshalException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Unmarshaller</tt> is unable to perform the XML to Java
- * binding. See <a href="#unmarshalEx">Unmarshalling XML Data</a>
- * @throws IllegalArgumentException
- * If any parameter is null
- * @since JAXB2.0
- */
- public <T> JAXBElement<T> unmarshal( javax.xml.stream.XMLEventReader reader, Class<T> declaredType ) throws JAXBException;
-
- /**
- * Get an unmarshaller handler object that can be used as a component in
- * an XML pipeline.
- *
- * <p>
- * The JAXB Provider can return the same handler object for multiple
- * invocations of this method. In other words, this method does not
- * necessarily create a new instance of <tt>UnmarshallerHandler</tt>. If the
- * application needs to use more than one <tt>UnmarshallerHandler</tt>, it
- * should create more than one <tt>Unmarshaller</tt>.
- *
- * @return the unmarshaller handler object
- * @see UnmarshallerHandler
- */
- public UnmarshallerHandler getUnmarshallerHandler();
-
- /**
- * Specifies whether or not the default validation mechanism of the
- * <tt>Unmarshaller</tt> should validate during unmarshal operations.
- * By default, the <tt>Unmarshaller</tt> does not validate.
- * <p>
- * This method may only be invoked before or after calling one of the
- * unmarshal methods.
- * <p>
- * This method only controls the JAXB Provider's default unmarshal-time
- * validation mechanism - it has no impact on clients that specify their
- * own validating SAX 2.0 compliant parser. Clients that specify their
- * own unmarshal-time validation mechanism may wish to turn off the JAXB
- * Provider's default validation mechanism via this API to avoid "double
- * validation".
- * <p>
- * This method is deprecated as of JAXB 2.0 - please use the new
- * {@link #setSchema(javax.xml.validation.Schema)} API.
- *
- * @param validating true if the Unmarshaller should validate during
- * unmarshal, false otherwise
- * @throws JAXBException if an error occurred while enabling or disabling
- * validation at unmarshal time
- * @throws UnsupportedOperationException could be thrown if this method is
- * invoked on an Unmarshaller created from a JAXBContext referencing
- * JAXB 2.0 mapped classes
- * @deprecated since JAXB2.0, please see {@link #setSchema(javax.xml.validation.Schema)}
- */
- public void setValidating( boolean validating )
- throws JAXBException;
-
- /**
- * Indicates whether or not the <tt>Unmarshaller</tt> is configured to
- * validate during unmarshal operations.
- * <p>
- * This API returns the state of the JAXB Provider's default unmarshal-time
- * validation mechanism.
- * <p>
- * This method is deprecated as of JAXB 2.0 - please use the new
- * {@link #getSchema()} API.
- *
- * @return true if the Unmarshaller is configured to validate during
- * unmarshal operations, false otherwise
- * @throws JAXBException if an error occurs while retrieving the validating
- * flag
- * @throws UnsupportedOperationException could be thrown if this method is
- * invoked on an Unmarshaller created from a JAXBContext referencing
- * JAXB 2.0 mapped classes
- * @deprecated since JAXB2.0, please see {@link #getSchema()}
- */
- public boolean isValidating()
- throws JAXBException;
-
- /**
- * Allow an application to register a <tt>ValidationEventHandler</tt>.
- * <p>
- * The <tt>ValidationEventHandler</tt> will be called by the JAXB Provider
- * if any validation errors are encountered during calls to any of the
- * unmarshal methods. If the client application does not register a
- * <tt>ValidationEventHandler</tt> before invoking the unmarshal methods,
- * then <tt>ValidationEvents</tt> will be handled by the default event
- * handler which will terminate the unmarshal operation after the first
- * error or fatal error is encountered.
- * <p>
- * Calling this method with a null parameter will cause the Unmarshaller
- * to revert back to the default event handler.
- *
- * @param handler the validation event handler
- * @throws JAXBException if an error was encountered while setting the
- * event handler
- */
- public void setEventHandler( ValidationEventHandler handler )
- throws JAXBException;
-
- /**
- * Return the current event handler or the default event handler if one
- * hasn't been set.
- *
- * @return the current ValidationEventHandler or the default event handler
- * if it hasn't been set
- * @throws JAXBException if an error was encountered while getting the
- * current event handler
- */
- public ValidationEventHandler getEventHandler()
- throws JAXBException;
-
- /**
- * Set the particular property in the underlying implementation of
- * <tt>Unmarshaller</tt>. This method can only be used to set one of
- * the standard JAXB defined properties above or a provider specific
- * property. Attempting to set an undefined property will result in
- * a PropertyException being thrown. See <a href="#supportedProps">
- * Supported Properties</a>.
- *
- * @param name the name of the property to be set. This value can either
- * be specified using one of the constant fields or a user
- * supplied string.
- * @param value the value of the property to be set
- *
- * @throws PropertyException when there is an error processing the given
- * property or value
- * @throws IllegalArgumentException
- * If the name parameter is null
- */
- public void setProperty( String name, Object value )
- throws PropertyException;
-
- /**
- * Get the particular property in the underlying implementation of
- * <tt>Unmarshaller</tt>. This method can only be used to get one of
- * the standard JAXB defined properties above or a provider specific
- * property. Attempting to get an undefined property will result in
- * a PropertyException being thrown. See <a href="#supportedProps">
- * Supported Properties</a>.
- *
- * @param name the name of the property to retrieve
- * @return the value of the requested property
- *
- * @throws PropertyException
- * when there is an error retrieving the given property or value
- * property name
- * @throws IllegalArgumentException
- * If the name parameter is null
- */
- public Object getProperty( String name ) throws PropertyException;
-
- /**
- * Specify the JAXP 1.3 {@link javax.xml.validation.Schema Schema}
- * object that should be used to validate subsequent unmarshal operations
- * against. Passing null into this method will disable validation.
- * <p>
- * This method replaces the deprecated {@link #setValidating(boolean) setValidating(boolean)}
- * API.
- *
- * <p>
- * Initially this property is set to <tt>null</tt>.
- *
- * @param schema Schema object to validate unmarshal operations against or null to disable validation
- * @throws UnsupportedOperationException could be thrown if this method is
- * invoked on an Unmarshaller created from a JAXBContext referencing
- * JAXB 1.0 mapped classes
- * @since JAXB2.0
- */
- public void setSchema( javax.xml.validation.Schema schema );
-
- /**
- * Get the JAXP 1.3 {@link javax.xml.validation.Schema Schema} object
- * being used to perform unmarshal-time validation. If there is no
- * Schema set on the unmarshaller, then this method will return null
- * indicating that unmarshal-time validation will not be performed.
- * <p>
- * This method provides replacement functionality for the deprecated
- * {@link #isValidating()} API as well as access to the Schema object.
- * To determine if the Unmarshaller has validation enabled, simply
- * test the return type for null:
- * <p>
- * <code>
- * boolean isValidating = u.getSchema()!=null;
- * </code>
- *
- * @return the Schema object being used to perform unmarshal-time
- * validation or null if not present
- * @throws UnsupportedOperationException could be thrown if this method is
- * invoked on an Unmarshaller created from a JAXBContext referencing
- * JAXB 1.0 mapped classes
- * @since JAXB2.0
- */
- public javax.xml.validation.Schema getSchema();
-
- /**
- * Associates a configured instance of {@link XmlAdapter} with this unmarshaller.
- *
- * <p>
- * This is a convenience method that invokes <code>setAdapter(adapter.getClass(),adapter);</code>.
- *
- * @see #setAdapter(Class,XmlAdapter)
- * @throws IllegalArgumentException
- * if the adapter parameter is null.
- * @throws UnsupportedOperationException
- * if invoked agains a JAXB 1.0 implementation.
- * @since JAXB2.0
- */
- public void setAdapter( XmlAdapter adapter );
-
- /**
- * Associates a configured instance of {@link XmlAdapter} with this unmarshaller.
- *
- * <p>
- * Every unmarshaller internally maintains a
- * {@link java.util.Map}&lt;{@link Class},{@link XmlAdapter}>,
- * which it uses for unmarshalling classes whose fields/methods are annotated
- * with {@link javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter}.
- *
- * <p>
- * This method allows applications to use a configured instance of {@link XmlAdapter}.
- * When an instance of an adapter is not given, an unmarshaller will create
- * one by invoking its default constructor.
- *
- * @param type
- * The type of the adapter. The specified instance will be used when
- * {@link javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter#value()}
- * refers to this type.
- * @param adapter
- * The instance of the adapter to be used. If null, it will un-register
- * the current adapter set for this type.
- * @throws IllegalArgumentException
- * if the type parameter is null.
- * @throws UnsupportedOperationException
- * if invoked agains a JAXB 1.0 implementation.
- * @since JAXB2.0
- */
- public <A extends XmlAdapter> void setAdapter( Class<A> type, A adapter );
-
- /**
- * Gets the adapter associated with the specified type.
- *
- * This is the reverse operation of the {@link #setAdapter} method.
- *
- * @throws IllegalArgumentException
- * if the type parameter is null.
- * @throws UnsupportedOperationException
- * if invoked agains a JAXB 1.0 implementation.
- * @since JAXB2.0
- */
- public <A extends XmlAdapter> A getAdapter( Class<A> type );
-
- /**
- * <p>Associate a context that resolves cid's, content-id URIs, to
- * binary data passed as attachments.</p>
- * <p/>
- * <p>Unmarshal time validation, enabled via {@link #setSchema(Schema)},
- * must be supported even when unmarshaller is performing XOP processing.
- * </p>
- *
- * @throws IllegalStateException if attempt to concurrently call this
- * method during a unmarshal operation.
- */
- void setAttachmentUnmarshaller(AttachmentUnmarshaller au);
-
- AttachmentUnmarshaller getAttachmentUnmarshaller();
-
- /**
- * <p/>
- * Register an instance of an implementation of this class with {@link Unmarshaller} to externally listen
- * for unmarshal events.
- * <p/>
- * <p/>
- * This class enables pre and post processing of an instance of a JAXB mapped class
- * as XML data is unmarshalled into it. The event callbacks are called when unmarshalling
- * XML content into a JAXBElement instance or a JAXB mapped class that represents a complex type definition.
- * The event callbacks are not called when unmarshalling to an instance of a
- * Java datatype that represents a simple type definition.
- * <p/>
- * <p/>
- * External listener is one of two different mechanisms for defining unmarshal event callbacks.
- * See <a href="Unmarshaller.html#unmarshalEventCallback">Unmarshal Event Callbacks</a> for an overview.
- * <p/>
- * (@link #setListener(Listener)}
- * (@link #getListener()}
- *
- * @since JAXB2.0
- */
- public static abstract class Listener {
- /**
- * <p/>
- * Callback method invoked before unmarshalling into <tt>target</tt>.
- * <p/>
- * <p/>
- * This method is invoked immediately after <tt>target</tt> was created and
- * before the unmarshalling of this object begins. Note that
- * if the class of <tt>target</tt> defines its own <tt>beforeUnmarshal</tt> method,
- * the class specific callback method is invoked before this method is invoked.
- *
- * @param target non-null instance of JAXB mapped class prior to unmarshalling into it.
- * @param parent instance of JAXB mapped class that will eventually reference <tt>target</tt>.
- * <tt>null</tt> when <tt>target</tt> is root element.
- */
- public void beforeUnmarshal(Object target, Object parent) {
- }
-
- /**
- * <p/>
- * Callback method invoked after unmarshalling XML data into <tt>target</tt>.
- * <p/>
- * <p/>
- * This method is invoked after all the properties (except IDREF) are unmarshalled into <tt>target</tt>,
- * but before <tt>target</tt> is set into its <tt>parent</tt> object.
- * Note that if the class of <tt>target</tt> defines its own <tt>afterUnmarshal</tt> method,
- * the class specific callback method is invoked before this method is invoked.
- *
- * @param target non-null instance of JAXB mapped class prior to unmarshalling into it.
- * @param parent instance of JAXB mapped class that will reference <tt>target</tt>.
- * <tt>null</tt> when <tt>target</tt> is root element.
- */
- public void afterUnmarshal(Object target, Object parent) {
- }
- }
-
- /**
- * <p>
- * Register unmarshal event callback {@link Listener} with this {@link Unmarshaller}.
- *
- * <p>
- * There is only one Listener per Unmarshaller. Setting a Listener replaces the previous set Listener.
- * One can unregister current Listener by setting listener to <tt>null</tt>.
- *
- * @param listener provides unmarshal event callbacks for this {@link Unmarshaller}
- * @since JAXB2.0
- */
- public void setListener(Listener listener);
-
- /**
- * <p>Return {@link Listener} registered with this {@link Unmarshaller}.
- *
- * @return registered {@link Listener} or <code>null</code> if no Listener is registered with this Unmarshaller.
- * @since JAXB2.0
- */
- public Listener getListener();
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/UnmarshallerHandler.java b/src/share/jaxws_classes/javax/xml/bind/UnmarshallerHandler.java
deleted file mode 100644
index 0f2c7954..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/UnmarshallerHandler.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-import org.xml.sax.ContentHandler;
-
-/**
- * Unmarshaller implemented as SAX ContentHandler.
- *
- * <p>
- * Applications can use this interface to use their JAXB provider as a component
- * in an XML pipeline. For example:
- *
- * <pre>
- * JAXBContext context = JAXBContext.newInstance( "org.acme.foo" );
- *
- * Unmarshaller unmarshaller = context.createUnmarshaller();
- *
- * UnmarshallerHandler unmarshallerHandler = unmarshaller.getUnmarshallerHandler();
- *
- * SAXParserFactory spf = SAXParserFactory.newInstance();
- * spf.setNamespaceAware( true );
- *
- * XMLReader xmlReader = spf.newSAXParser().getXMLReader();
- * xmlReader.setContentHandler( unmarshallerHandler );
- * xmlReader.parse(new InputSource( new FileInputStream( XML_FILE ) ) );
- *
- * MyObject myObject= (MyObject)unmarshallerHandler.getResult();
- * </pre>
- *
- * <p>
- * This interface is reusable: even if the user fails to unmarshal
- * an object, s/he can still start a new round of unmarshalling.
- *
- * @author <ul><li>Kohsuke KAWAGUCHI, Sun Microsystems, Inc.</li></ul>
- * @see Unmarshaller#getUnmarshallerHandler()
- * @since JAXB1.0
- */
-public interface UnmarshallerHandler extends ContentHandler
-{
- /**
- * Obtains the unmarshalled result.
- *
- * This method can be called only after this handler
- * receives the endDocument SAX event.
- *
- * @exception IllegalStateException
- * if this method is called before this handler
- * receives the endDocument event.
- *
- * @exception JAXBException
- * if there is any unmarshalling error.
- * Note that the implementation is allowed to throw SAXException
- * during the parsing when it finds an error.
- *
- * @return
- * always return a non-null valid object which was unmarshalled.
- */
- Object getResult() throws JAXBException, IllegalStateException;
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/ValidationEvent.java b/src/share/jaxws_classes/javax/xml/bind/ValidationEvent.java
deleted file mode 100644
index 5395904c..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/ValidationEvent.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * This event indicates that a problem was encountered while validating the
- * incoming XML data during an unmarshal operation, while performing
- * on-demand validation of the Java content tree, or while marshalling the
- * Java content tree back to XML data.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @see Validator
- * @see ValidationEventHandler
- * @since JAXB1.0
- */
-public interface ValidationEvent {
-
- /**
- * Conditions that are not errors or fatal errors as defined by the
- * XML 1.0 recommendation
- */
- public static final int WARNING = 0;
-
- /**
- * Conditions that correspond to the definition of "error" in section
- * 1.2 of the W3C XML 1.0 Recommendation
- */
- public static final int ERROR = 1;
-
- /**
- * Conditions that correspond to the definition of "fatal error" in section
- * 1.2 of the W3C XML 1.0 Recommendation
- */
- public static final int FATAL_ERROR = 2;
-
- /**
- * Retrieve the severity code for this warning/error.
- *
- * <p>
- * Must be one of <tt>ValidationError.WARNING</tt>,
- * <tt>ValidationError.ERROR</tt>, or <tt>ValidationError.FATAL_ERROR</tt>.
- *
- * @return the severity code for this warning/error
- */
- public int getSeverity();
-
- /**
- * Retrieve the text message for this warning/error.
- *
- * @return the text message for this warning/error or null if one wasn't set
- */
- public String getMessage();
-
- /**
- * Retrieve the linked exception for this warning/error.
- *
- * @return the linked exception for this warning/error or null if one
- * wasn't set
- */
- public Throwable getLinkedException();
-
- /**
- * Retrieve the locator for this warning/error.
- *
- * @return the locator that indicates where the warning/error occurred
- */
- public ValidationEventLocator getLocator();
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/ValidationEventHandler.java b/src/share/jaxws_classes/javax/xml/bind/ValidationEventHandler.java
deleted file mode 100644
index 76ed5842..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/ValidationEventHandler.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * A basic event handler interface for validation errors.
- *
- * <p>
- * If an application needs to implement customized event handling, it must
- * implement this interface and then register it with either the
- * {@link Unmarshaller#setEventHandler(ValidationEventHandler) Unmarshaller},
- * the {@link Validator#setEventHandler(ValidationEventHandler) Validator}, or
- * the {@link Marshaller#setEventHandler(ValidationEventHandler) Marshaller}.
- * The JAXB Provider will then report validation errors and warnings encountered
- * during the unmarshal, marshal, and validate operations to these event
- * handlers.
- *
- * <p>
- * If the <tt>handleEvent</tt> method throws an unchecked runtime exception,
- * the JAXB Provider must treat that as if the method returned false, effectively
- * terminating whatever operation was in progress at the time (unmarshal,
- * validate, or marshal).
- *
- * <p>
- * Modifying the Java content tree within your event handler is undefined
- * by the specification and may result in unexpected behaviour.
- *
- * <p>
- * Failing to return false from the <tt>handleEvent</tt> method after
- * encountering a fatal error is undefined by the specification and may result
- * in unexpected behavior.
- *
- * <p>
- * <b>Default Event Handler</b>
- * <blockquote>
- * See: <a href="Validator.html#defaulthandler">Validator javadocs</a>
- * </blockquote>
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @see Unmarshaller
- * @see Validator
- * @see Marshaller
- * @see ValidationEvent
- * @see javax.xml.bind.util.ValidationEventCollector
- * @since JAXB1.0
- */
-public interface ValidationEventHandler {
- /**
- * Receive notification of a validation warning or error.
- *
- * The ValidationEvent will have a
- * {@link ValidationEventLocator ValidationEventLocator} embedded in it that
- * indicates where the error or warning occurred.
- *
- * <p>
- * If an unchecked runtime exception is thrown from this method, the JAXB
- * provider will treat it as if the method returned false and interrupt
- * the current unmarshal, validate, or marshal operation.
- *
- * @param event the encapsulated validation event information. It is a
- * provider error if this parameter is null.
- * @return true if the JAXB Provider should attempt to continue the current
- * unmarshal, validate, or marshal operation after handling this
- * warning/error, false if the provider should terminate the current
- * operation with the appropriate <tt>UnmarshalException</tt>,
- * <tt>ValidationException</tt>, or <tt>MarshalException</tt>.
- * @throws IllegalArgumentException if the event object is null.
- */
- public boolean handleEvent( ValidationEvent event );
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/ValidationEventLocator.java b/src/share/jaxws_classes/javax/xml/bind/ValidationEventLocator.java
deleted file mode 100644
index c45327ea..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/ValidationEventLocator.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * Encapsulate the location of a ValidationEvent.
- *
- * <p>
- * The <tt>ValidationEventLocator</tt> indicates where the <tt>ValidationEvent
- * </tt> occurred. Different fields will be set depending on the type of
- * validation that was being performed when the error or warning was detected.
- * For example, on-demand validation would produce locators that contained
- * references to objects in the Java content tree while unmarshal-time
- * validation would produce locators containing information appropriate to the
- * source of the XML data (file, url, Node, etc).
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @see Validator
- * @see ValidationEvent
- * @since JAXB1.0
- */
-public interface ValidationEventLocator {
-
- /**
- * Return the name of the XML source as a URL if available
- *
- * @return the name of the XML source as a URL or null if unavailable
- */
- public java.net.URL getURL();
-
- /**
- * Return the byte offset if available
- *
- * @return the byte offset into the input source or -1 if unavailable
- */
- public int getOffset();
-
- /**
- * Return the line number if available
- *
- * @return the line number or -1 if unavailable
- */
- public int getLineNumber();
-
- /**
- * Return the column number if available
- *
- * @return the column number or -1 if unavailable
- */
- public int getColumnNumber();
-
- /**
- * Return a reference to the object in the Java content tree if available
- *
- * @return a reference to the object in the Java content tree or null if
- * unavailable
- */
- public java.lang.Object getObject();
-
- /**
- * Return a reference to the DOM Node if available
- *
- * @return a reference to the DOM Node or null if unavailable
- */
- public org.w3c.dom.Node getNode();
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/ValidationException.java b/src/share/jaxws_classes/javax/xml/bind/ValidationException.java
deleted file mode 100644
index 32f2223b..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/ValidationException.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * This exception indicates that an error has occurred while performing
- * a validate operation.
- *
- * <p>
- * The <tt>ValidationEventHandler</tt> can cause this exception to be thrown
- * during the validate operations. See
- * {@link ValidationEventHandler#handleEvent(ValidationEvent)
- * ValidationEventHandler.handleEvent(ValidationEvent)}.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
- * @see JAXBException
- * @see Validator
- * @since JAXB1.0
- */
-public class ValidationException extends JAXBException {
-
- /**
- * Construct an ValidationException with the specified detail message. The
- * errorCode and linkedException will default to null.
- *
- * @param message a description of the exception
- */
- public ValidationException(String message) {
- this( message, null, null );
- }
-
- /**
- * Construct an ValidationException with the specified detail message and vendor
- * specific errorCode. The linkedException will default to null.
- *
- * @param message a description of the exception
- * @param errorCode a string specifying the vendor specific error code
- */
- public ValidationException(String message, String errorCode) {
- this( message, errorCode, null );
- }
-
- /**
- * Construct an ValidationException with a linkedException. The detail message and
- * vendor specific errorCode will default to null.
- *
- * @param exception the linked exception
- */
- public ValidationException(Throwable exception) {
- this( null, null, exception );
- }
-
- /**
- * Construct an ValidationException with the specified detail message and
- * linkedException. The errorCode will default to null.
- *
- * @param message a description of the exception
- * @param exception the linked exception
- */
- public ValidationException(String message, Throwable exception) {
- this( message, null, exception );
- }
-
- /**
- * Construct an ValidationException with the specified detail message, vendor
- * specific errorCode, and linkedException.
- *
- * @param message a description of the exception
- * @param errorCode a string specifying the vendor specific error code
- * @param exception the linked exception
- */
- public ValidationException(String message, String errorCode, Throwable exception) {
- super( message, errorCode, exception );
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/Validator.java b/src/share/jaxws_classes/javax/xml/bind/Validator.java
deleted file mode 100644
index 830c30ae..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/Validator.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * As of JAXB 2.0, this class is deprecated and optional.
- * <p>
- * The <tt>Validator</tt> class is responsible for controlling the validation
- * of content trees during runtime.
- *
- * <p>
- * <a name="validationtypes"></a>
- * <b>Three Forms of Validation</b><br>
- * <blockquote>
- * <dl>
- * <dt><b>Unmarshal-Time Validation</b></dt>
- * <dd>This form of validation enables a client application to receive
- * information about validation errors and warnings detected while
- * unmarshalling XML data into a Java content tree and is completely
- * orthogonal to the other types of validation. To enable or disable
- * it, see the javadoc for
- * {@link Unmarshaller#setValidating(boolean) Unmarshaller.setValidating}.
- * All JAXB 1.0 Providers are required to support this operation.
- * </dd>
- *
- * <dt><b>On-Demand Validation</b></dt>
- * <dd> This form of validation enables a client application to receive
- * information about validation errors and warnings detected in the
- * Java content tree. At any point, client applications can call
- * the {@link Validator#validate(Object) Validator.validate} method
- * on the Java content tree (or any sub-tree of it). All JAXB 1.0
- * Providers are required to support this operation.
- * </dd>
- *
- * <dt><b>Fail-Fast Validation</b></dt>
- * <dd> This form of validation enables a client application to receive
- * immediate feedback about modifications to the Java content tree
- * that violate type constraints on Java Properties as defined in
- * the specification. JAXB Providers are not required support
- * this type of validation. Of the JAXB Providers that do support
- * this type of validation, some may require you to decide at schema
- * compile time whether or not a client application will be allowed
- * to request fail-fast validation at runtime.
- * </dd>
- * </dl>
- * </blockquote>
- *
- * <p>
- * The <tt>Validator</tt> class is responsible for managing On-Demand Validation.
- * The <tt>Unmarshaller</tt> class is responsible for managing Unmarshal-Time
- * Validation during the unmarshal operations. Although there is no formal
- * method of enabling validation during the marshal operations, the
- * <tt>Marshaller</tt> may detect errors, which will be reported to the
- * <tt>ValidationEventHandler</tt> registered on it.
- *
- * <p>
- * <a name="defaulthandler"></a>
- * <b>Using the Default EventHandler</b><br>
- * <blockquote>
- * If the client application does not set an event handler on their
- * <tt>Validator</tt>, <tt>Unmarshaller</tt>, or <tt>Marshaller</tt> prior to
- * calling the validate, unmarshal, or marshal methods, then a default event
- * handler will receive notification of any errors or warnings encountered.
- * The default event handler will cause the current operation to halt after
- * encountering the first error or fatal error (but will attempt to continue
- * after receiving warnings).
- * </blockquote>
- *
- * <p>
- * <a name="handlingevents"></a>
- * <b>Handling Validation Events</b><br>
- * <blockquote>
- * There are three ways to handle events encountered during the unmarshal,
- * validate, and marshal operations:
- * <dl>
- * <dt>Use the default event handler</dt>
- * <dd>The default event handler will be used if you do not specify one
- * via the <tt>setEventHandler</tt> API's on <tt>Validator</tt>,
- * <tt>Unmarshaller</tt>, or <tt>Marshaller</tt>.
- * </dd>
- *
- * <dt>Implement and register a custom event handler</dt>
- * <dd>Client applications that require sophisticated event processing
- * can implement the <tt>ValidationEventHandler</tt> interface and
- * register it with the <tt>Unmarshaller</tt> and/or
- * <tt>Validator</tt>.
- * </dd>
- *
- * <dt>Use the {@link javax.xml.bind.util.ValidationEventCollector ValidationEventCollector}
- * utility</dt>
- * <dd>For convenience, a specialized event handler is provided that
- * simply collects any <tt>ValidationEvent</tt> objects created
- * during the unmarshal, validate, and marshal operations and
- * returns them to the client application as a
- * <tt>java.util.Collection</tt>.
- * </dd>
- * </dl>
- * </blockquote>
- *
- * <p>
- * <b>Validation and Well-Formedness</b><br>
- * <blockquote>
- * <p>
- * Validation events are handled differently depending on how the client
- * application is configured to process them as described in the previous
- * section. However, there are certain cases where a JAXB Provider indicates
- * that it is no longer able to reliably detect and report errors. In these
- * cases, the JAXB Provider will set the severity of the ValidationEvent to
- * FATAL_ERROR to indicate that the unmarshal, validate, or marshal operations
- * should be terminated. The default event handler and
- * <tt>ValidationEventCollector</tt> utility class must terminate processing
- * after being notified of a fatal error. Client applications that supply their
- * own <tt>ValidationEventHandler</tt> should also terminate processing after
- * being notified of a fatal error. If not, unexpected behaviour may occur.
- * </blockquote>
- *
- * <p>
- * <a name="supportedProps"></a>
- * <b>Supported Properties</b><br>
- * <blockquote>
- * <p>
- * There currently are not any properties required to be supported by all
- * JAXB Providers on Validator. However, some providers may support
- * their own set of provider specific properties.
- * </blockquote>
- *
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @see JAXBContext
- * @see Unmarshaller
- * @see ValidationEventHandler
- * @see ValidationEvent
- * @see javax.xml.bind.util.ValidationEventCollector
- * @since JAXB1.0
- * @deprecated since JAXB 2.0
- */
-public interface Validator {
-
- /**
- * Allow an application to register a validation event handler.
- * <p>
- * The validation event handler will be called by the JAXB Provider if any
- * validation errors are encountered during calls to
- * {@link #validate(Object) validate}. If the client application does not
- * register a validation event handler before invoking the validate method,
- * then validation events will be handled by the default event handler which
- * will terminate the validate operation after the first error or fatal error
- * is encountered.
- * <p>
- * Calling this method with a null parameter will cause the Validator
- * to revert back to the default default event handler.
- *
- * @param handler the validation event handler
- * @throws JAXBException if an error was encountered while setting the
- * event handler
- * @deprecated since JAXB2.0
- */
- public void setEventHandler( ValidationEventHandler handler )
- throws JAXBException;
-
- /**
- * Return the current event handler or the default event handler if one
- * hasn't been set.
- *
- * @return the current ValidationEventHandler or the default event handler
- * if it hasn't been set
- * @throws JAXBException if an error was encountered while getting the
- * current event handler
- * @deprecated since JAXB2.0
- */
- public ValidationEventHandler getEventHandler()
- throws JAXBException;
-
- /**
- * Validate the Java content tree starting at <tt>subrootObj</tt>.
- * <p>
- * Client applications can use this method to validate Java content trees
- * on-demand at runtime. This method can be used to validate any arbitrary
- * subtree of the Java content tree. Global constraint checking <b>will not
- * </b> be performed as part of this operation (i.e. ID/IDREF constraints).
- *
- * @param subrootObj the obj to begin validation at
- * @throws JAXBException if any unexpected problem occurs during validation
- * @throws ValidationException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Validator</tt> is unable to validate the content tree rooted
- * at <tt>subrootObj</tt>
- * @throws IllegalArgumentException
- * If the subrootObj parameter is null
- * @return true if the subtree rooted at <tt>subrootObj</tt> is valid, false
- * otherwise
- * @deprecated since JAXB2.0
- */
- public boolean validate( Object subrootObj ) throws JAXBException;
-
- /**
- * Validate the Java content tree rooted at <tt>rootObj</tt>.
- * <p>
- * Client applications can use this method to validate Java content trees
- * on-demand at runtime. This method is used to validate an entire Java
- * content tree. Global constraint checking <b>will</b> be performed as
- * part of this operation (i.e. ID/IDREF constraints).
- *
- * @param rootObj the root obj to begin validation at
- * @throws JAXBException if any unexpected problem occurs during validation
- * @throws ValidationException
- * If the {@link ValidationEventHandler ValidationEventHandler}
- * returns false from its <tt>handleEvent</tt> method or the
- * <tt>Validator</tt> is unable to validate the content tree rooted
- * at <tt>rootObj</tt>
- * @throws IllegalArgumentException
- * If the rootObj parameter is null
- * @return true if the tree rooted at <tt>rootObj</tt> is valid, false
- * otherwise
- * @deprecated since JAXB2.0
- */
- public boolean validateRoot( Object rootObj ) throws JAXBException;
-
- /**
- * Set the particular property in the underlying implementation of
- * <tt>Validator</tt>. This method can only be used to set one of
- * the standard JAXB defined properties above or a provider specific
- * property. Attempting to set an undefined property will result in
- * a PropertyException being thrown. See <a href="#supportedProps">
- * Supported Properties</a>.
- *
- * @param name the name of the property to be set. This value can either
- * be specified using one of the constant fields or a user
- * supplied string.
- * @param value the value of the property to be set
- *
- * @throws PropertyException when there is an error processing the given
- * property or value
- * @throws IllegalArgumentException
- * If the name parameter is null
- * @deprecated since JAXB2.0
- */
- public void setProperty( String name, Object value )
- throws PropertyException;
-
- /**
- * Get the particular property in the underlying implementation of
- * <tt>Validator</tt>. This method can only be used to get one of
- * the standard JAXB defined properties above or a provider specific
- * property. Attempting to get an undefined property will result in
- * a PropertyException being thrown. See <a href="#supportedProps">
- * Supported Properties</a>.
- *
- * @param name the name of the property to retrieve
- * @return the value of the requested property
- *
- * @throws PropertyException
- * when there is an error retrieving the given property or value
- * property name
- * @throws IllegalArgumentException
- * If the name parameter is null
- * @deprecated since JAXB2.0
- */
- public Object getProperty( String name ) throws PropertyException;
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/WhiteSpaceProcessor.java b/src/share/jaxws_classes/javax/xml/bind/WhiteSpaceProcessor.java
deleted file mode 100644
index 9bf23293..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/WhiteSpaceProcessor.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind;
-
-/**
- * Processes white space normalization.
- *
- * @since 1.0
- */
-abstract class WhiteSpaceProcessor {
-
-// benchmarking (see test/src/ReplaceTest.java in the CVS Attic)
-// showed that this code is slower than the current code.
-//
-// public static String replace(String text) {
-// final int len = text.length();
-// StringBuffer result = new StringBuffer(len);
-//
-// for (int i = 0; i < len; i++) {
-// char ch = text.charAt(i);
-// if (isWhiteSpace(ch))
-// result.append(' ');
-// else
-// result.append(ch);
-// }
-//
-// return result.toString();
-// }
-
- public static String replace(String text) {
- return replace( (CharSequence)text ).toString();
- }
-
- /**
- * @since 2.0
- */
- public static CharSequence replace(CharSequence text) {
- int i=text.length()-1;
-
- // look for the first whitespace char.
- while( i>=0 && !isWhiteSpaceExceptSpace(text.charAt(i)) )
- i--;
-
- if( i<0 )
- // no such whitespace. replace(text)==text.
- return text;
-
- // we now know that we need to modify the text.
- // allocate a char array to do it.
- StringBuilder buf = new StringBuilder(text);
-
- buf.setCharAt(i--,' ');
- for( ; i>=0; i-- )
- if( isWhiteSpaceExceptSpace(buf.charAt(i)))
- buf.setCharAt(i,' ');
-
- return new String(buf);
- }
-
- /**
- * Equivalent of {@link String#trim()}.
- * @since 2.0
- */
- public static CharSequence trim(CharSequence text) {
- int len = text.length();
- int start = 0;
-
- while( start<len && isWhiteSpace(text.charAt(start)) )
- start++;
-
- int end = len-1;
-
- while( end>start && isWhiteSpace(text.charAt(end)) )
- end--;
-
- if(start==0 && end==len-1)
- return text; // no change
- else
- return text.subSequence(start,end+1);
- }
-
- public static String collapse(String text) {
- return collapse( (CharSequence)text ).toString();
- }
-
- /**
- * This is usually the biggest processing bottleneck.
- *
- * @since 2.0
- */
- public static CharSequence collapse(CharSequence text) {
- int len = text.length();
-
- // most of the texts are already in the collapsed form.
- // so look for the first whitespace in the hope that we will
- // never see it.
- int s=0;
- while(s<len) {
- if(isWhiteSpace(text.charAt(s)))
- break;
- s++;
- }
- if(s==len)
- // the input happens to be already collapsed.
- return text;
-
- // we now know that the input contains spaces.
- // let's sit down and do the collapsing normally.
-
- StringBuilder result = new StringBuilder(len /*allocate enough size to avoid re-allocation*/ );
-
- if(s!=0) {
- for( int i=0; i<s; i++ )
- result.append(text.charAt(i));
- result.append(' ');
- }
-
- boolean inStripMode = true;
- for (int i = s+1; i < len; i++) {
- char ch = text.charAt(i);
- boolean b = isWhiteSpace(ch);
- if (inStripMode && b)
- continue; // skip this character
-
- inStripMode = b;
- if (inStripMode)
- result.append(' ');
- else
- result.append(ch);
- }
-
- // remove trailing whitespaces
- len = result.length();
- if (len > 0 && result.charAt(len - 1) == ' ')
- result.setLength(len - 1);
- // whitespaces are already collapsed,
- // so all we have to do is to remove the last one character
- // if it's a whitespace.
-
- return result;
- }
-
- /**
- * Returns true if the specified string is all whitespace.
- */
- public static final boolean isWhiteSpace(CharSequence s) {
- for( int i=s.length()-1; i>=0; i-- )
- if(!isWhiteSpace(s.charAt(i)))
- return false;
- return true;
- }
-
- /** returns true if the specified char is a white space character. */
- public static final boolean isWhiteSpace(char ch) {
- // most of the characters are non-control characters.
- // so check that first to quickly return false for most of the cases.
- if( ch>0x20 ) return false;
-
- // other than we have to do four comparisons.
- return ch == 0x9 || ch == 0xA || ch == 0xD || ch == 0x20;
- }
-
- /**
- * Returns true if the specified char is a white space character
- * but not 0x20.
- */
- protected static final boolean isWhiteSpaceExceptSpace(char ch) {
- // most of the characters are non-control characters.
- // so check that first to quickly return false for most of the cases.
- if( ch>=0x20 ) return false;
-
- // other than we have to do four comparisons.
- return ch == 0x9 || ch == 0xA || ch == 0xD;
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/DomHandler.java b/src/share/jaxws_classes/javax/xml/bind/annotation/DomHandler.java
deleted file mode 100644
index e9ab3311..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/DomHandler.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-
-/**
- * Converts an element (and its descendants)
- * from/to DOM (or similar) representation.
- *
- * <p>
- * Implementations of this interface will be used in conjunction with
- * {@link XmlAnyElement} annotation to map an element of XML into a representation
- * of infoset such as W3C DOM.
- *
- * <p>
- * Implementations hide how a portion of XML is converted into/from such
- * DOM-like representation, allowing JAXB providers to work with arbitrary
- * such library.
- *
- * <P>
- * This interface is intended to be implemented by library writers
- * and consumed by JAXB providers. None of those methods are intended to
- * be called from applications.
- *
- * @author Kohsuke Kawaguchi
- * @since JAXB2.0
- */
-public interface DomHandler<ElementT,ResultT extends Result> {
- /**
- * When a JAXB provider needs to unmarshal a part of a document into an
- * infoset representation, it first calls this method to create a
- * {@link Result} object.
- *
- * <p>
- * A JAXB provider will then send a portion of the XML
- * into the given result. Such a portion always form a subtree
- * of the whole XML document rooted at an element.
- *
- * @param errorHandler
- * if any error happens between the invocation of this method
- * and the invocation of {@link #getElement(Result)}, they
- * must be reported to this handler.
- *
- * The caller must provide a non-null error handler.
- *
- * The {@link Result} object created from this method
- * may hold a reference to this error handler.
- *
- * @return
- * null if the operation fails. The error must have been reported
- * to the error handler.
- */
- ResultT createUnmarshaller( ValidationEventHandler errorHandler );
-
- /**
- * Once the portion is sent to the {@link Result}. This method is called
- * by a JAXB provider to obtain the unmarshalled element representation.
- *
- * <p>
- * Multiple invocations of this method may return different objects.
- * This method can be invoked only when the whole sub-tree are fed
- * to the {@link Result} object.
- *
- * @param rt
- * The {@link Result} object created by {@link #createUnmarshaller(ValidationEventHandler)}.
- *
- * @return
- * null if the operation fails. The error must have been reported
- * to the error handler.
- */
- ElementT getElement(ResultT rt);
-
- /**
- * This method is called when a JAXB provider needs to marshal an element
- * to XML.
- *
- * <p>
- * If non-null, the returned {@link Source} must contain a whole document
- * rooted at one element, which will then be weaved into a bigger document
- * that the JAXB provider is marshalling.
- *
- * @param errorHandler
- * Receives any errors happened during the process of converting
- * an element into a {@link Source}.
- *
- * The caller must provide a non-null error handler.
- *
- * @return
- * null if there was an error. The error should have been reported
- * to the handler.
- */
- Source marshal( ElementT n, ValidationEventHandler errorHandler );
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/W3CDomHandler.java b/src/share/jaxws_classes/javax/xml/bind/annotation/W3CDomHandler.java
deleted file mode 100644
index 113780e2..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/W3CDomHandler.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentFragment;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.dom.DOMSource;
-
-/**
- * {@link DomHandler} implementation for W3C DOM (<code>org.w3c.dom</code> package.)
- *
- * @author Kohsuke Kawaguchi
- * @since JAXB2.0
- */
-public class W3CDomHandler implements DomHandler<Element,DOMResult> {
-
- private DocumentBuilder builder;
-
- /**
- * Default constructor.
- *
- * It is up to a JAXB provider to decide which DOM implementation
- * to use or how that is configured.
- */
- public W3CDomHandler() {
- this.builder = null;
- }
-
- /**
- * Constructor that allows applications to specify which DOM implementation
- * to be used.
- *
- * @param builder
- * must not be null. JAXB uses this {@link DocumentBuilder} to create
- * a new element.
- */
- public W3CDomHandler(DocumentBuilder builder) {
- if(builder==null)
- throw new IllegalArgumentException();
- this.builder = builder;
- }
-
- public DocumentBuilder getBuilder() {
- return builder;
- }
-
- public void setBuilder(DocumentBuilder builder) {
- this.builder = builder;
- }
-
- public DOMResult createUnmarshaller(ValidationEventHandler errorHandler) {
- if(builder==null)
- return new DOMResult();
- else
- return new DOMResult(builder.newDocument());
- }
-
- public Element getElement(DOMResult r) {
- // JAXP spec is ambiguous about what really happens in this case,
- // so work defensively
- Node n = r.getNode();
- if( n instanceof Document ) {
- return ((Document)n).getDocumentElement();
- }
- if( n instanceof Element )
- return (Element)n;
- if( n instanceof DocumentFragment )
- return (Element)n.getChildNodes().item(0);
-
- // if the result object contains something strange,
- // it is not a user problem, but it is a JAXB provider's problem.
- // That's why we throw a runtime exception.
- throw new IllegalStateException(n.toString());
- }
-
- public Source marshal(Element element, ValidationEventHandler errorHandler) {
- return new DOMSource(element);
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessOrder.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessOrder.java
deleted file mode 100644
index 2235678a..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessOrder.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-/**
- * Used by XmlAccessorOrder to control the ordering of properties and
- * fields in a JAXB bound class.
- *
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
- * @see XmlAccessorOrder
- */
-
-public enum XmlAccessOrder {
- /**
- * The ordering of fields and properties in a class is undefined.
- */
- UNDEFINED,
- /**
- * The ordering of fields and properties in a class is in
- * alphabetical order as determined by the
- * method java.lang.String.compareTo(String anotherString).
- */
- ALPHABETICAL
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessType.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessType.java
deleted file mode 100644
index c53213a4..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessType.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-
-
-/**
- * Used by XmlAccessorType to control serialization of fields or
- * properties.
- *
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
- * @see XmlAccessorType
- */
-
-public enum XmlAccessType {
- /**
- * Every getter/setter pair in a JAXB-bound class will be automatically
- * bound to XML, unless annotated by {@link XmlTransient}.
- *
- * Fields are bound to XML only when they are explicitly annotated
- * by some of the JAXB annotations.
- */
- PROPERTY,
- /**
- * Every non static, non transient field in a JAXB-bound class will be automatically
- * bound to XML, unless annotated by {@link XmlTransient}.
- *
- * Getter/setter pairs are bound to XML only when they are explicitly annotated
- * by some of the JAXB annotations.
- */
- FIELD,
- /**
- * Every public getter/setter pair and every public field will be
- * automatically bound to XML, unless annotated by {@link XmlTransient}.
- *
- * Fields or getter/setter pairs that are private, protected, or
- * defaulted to package-only access are bound to XML only when they are
- * explicitly annotated by the appropriate JAXB annotations.
- */
- PUBLIC_MEMBER,
- /**
- * None of the fields or properties is bound to XML unless they
- * are specifically annotated with some of the JAXB annotations.
- */
- NONE
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorOrder.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorOrder.java
deleted file mode 100644
index a72a9d2a..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorOrder.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Inherited;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * <p> Controls the ordering of fields and properties in a class. </p>
- *
- * <h3>Usage </h3>
- *
- * <p> <tt> @XmlAccessorOrder </tt> annotation can be used with the following
- * program elements:</p>
- *
- * <ul>
- * <li> package</li>
- * <li> a top level class </li>
- * </ul>
- *
- * <p> See "Package Specification" in <tt>javax.xml.bind</tt> package javadoc for
- * additional common information.</p>
- *
- * <p>The effective {@link XmlAccessOrder} on a class is determined
- * as follows:
- *
- * <ul>
- * <li> If there is a <tt>@XmlAccessorOrder</tt> on a class, then
- * it is used. </li>
- * <li> Otherwise, if a <tt>@XmlAccessorOrder </tt> exists on one of
- * its super classes, then it is inherited (by the virtue of
- * {@link Inherited})
- * <li> Otherwise, the <tt>@XmlAccessorOrder</tt> on the package
- * of the class is used, if it's there.
- * <li> Otherwise {@link XmlAccessOrder#UNDEFINED}.
- * </ul>
- *
- * <p>This annotation can be used with the following annotations:
- * {@link XmlType}, {@link XmlRootElement}, {@link XmlAccessorType},
- * {@link XmlSchema}, {@link XmlSchemaType}, {@link XmlSchemaTypes},
- * , {@link XmlJavaTypeAdapter}. It can also be used with the
- * following annotations at the package level: {@link XmlJavaTypeAdapter}.
- *
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
- * @see XmlAccessOrder
- */
-
-@Inherited @Retention(RUNTIME) @Target({PACKAGE, TYPE})
-public @interface XmlAccessorOrder {
- XmlAccessOrder value() default XmlAccessOrder.UNDEFINED;
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorType.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorType.java
deleted file mode 100644
index e8f044f9..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAccessorType.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Inherited;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * <p> Controls whether fields or Javabean properties are serialized by default. </p>
- *
- * <p> <b> Usage </b> </p>
- *
- * <p> <tt>@XmlAccessorType</tt> annotation can be used with the following program elements:</p>
- *
- * <ul>
- * <li> package</li>
- * <li> a top level class </li>
- * </ul>
- *
- * <p> See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * <p>This annotation provides control over the default serialization
- * of properties and fields in a class.
- *
- * <p>The annotation <tt> @XmlAccessorType </tt> on a package applies to
- * all classes in the package. The following inheritance
- * semantics apply:
- *
- * <ul>
- * <li> If there is a <tt>@XmlAccessorType</tt> on a class, then it
- * is used. </li>
- * <li> Otherwise, if a <tt>@XmlAccessorType</tt> exists on one of
- * its super classes, then it is inherited.
- * <li> Otherwise, the <tt>@XmlAccessorType </tt> on a package is
- * inherited.
- * </ul>
- * <p> <b> Defaulting Rules: </b> </p>
- *
- * <p>By default, if <tt>@XmlAccessorType </tt> on a package is absent,
- * then the following package level annotation is assumed.</p>
- * <pre>
- * &#64;XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)
- * </pre>
- * <p> By default, if <tt>@XmlAccessorType</tt> on a class is absent,
- * and none of its super classes is annotated with
- * <tt>@XmlAccessorType</tt>, then the following default on the class
- * is assumed: </p>
- * <pre>
- * &#64;XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)
- * </pre>
- * <p>This annotation can be used with the following annotations:
- * {@link XmlType}, {@link XmlRootElement}, {@link XmlAccessorOrder},
- * {@link XmlSchema}, {@link XmlSchemaType}, {@link XmlSchemaTypes},
- * , {@link XmlJavaTypeAdapter}. It can also be used with the
- * following annotations at the package level: {@link XmlJavaTypeAdapter}.
- *
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
- * @see XmlAccessType
- */
-
-@Inherited @Retention(RUNTIME) @Target({PACKAGE, TYPE})
-public @interface XmlAccessorType {
-
- /**
- * Specifies whether fields or properties are serialized.
- *
- * @see XmlAccessType
- */
- XmlAccessType value() default XmlAccessType.PUBLIC_MEMBER;
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyAttribute.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyAttribute.java
deleted file mode 100644
index bf1a6ad2..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyAttribute.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import javax.xml.namespace.QName;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import java.util.Map;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-
-/**
- * <p>
- * Maps a JavaBean property to a map of wildcard attributes.
- *
- * <p> <b>Usage</b> </p>
- * <p>
- * The <tt>&#64;XmlAnyAttribute</tt> annotation can be used with the
- * following program elements:
- * <ul>
- * <li> JavaBean property </li>
- * <li> non static, non transient field </li>
- * </ul>
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * The usage is subject to the following constraints:
- * <ul>
- * <li> At most one field or property in a class can be annotated
- * with <tt>&#64;XmlAnyAttribute</tt>. </li>
- * <li> The type of the property or the field must <tt>java.util.Map</tt> </li>
- * </ul>
- *
- * <p>
- * While processing attributes to be unmarshalled into a value class,
- * each attribute that is not statically associated with another
- * JavaBean property, via {@link XmlAttribute}, is entered into the
- * wildcard attribute map represented by
- * {@link Map}&lt;{@link QName},{@link Object}>. The attribute QName is the
- * map's key. The key's value is the String value of the attribute.
- *
- * @author Kohsuke Kawaguchi, Sun Microsystems, Inc.
- * @since JAXB2.0
- */
-@Retention(RUNTIME)
-@Target({FIELD,METHOD})
-public @interface XmlAnyAttribute {
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyElement.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyElement.java
deleted file mode 100644
index 9613547c..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAnyElement.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import org.w3c.dom.Element;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import java.util.List;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * Maps a JavaBean property to XML infoset representation and/or JAXB element.
- *
- * <p>
- * This annotation serves as a "catch-all" property while unmarshalling
- * xml content into a instance of a JAXB annotated class. It typically
- * annotates a multi-valued JavaBean property, but it can occur on
- * single value JavaBean property. During unmarshalling, each xml element
- * that does not match a static &#64;XmlElement or &#64;XmlElementRef
- * annotation for the other JavaBean properties on the class, is added to this
- * "catch-all" property.
- *
- * <p>
- * <h2>Usages:</h2>
- * <pre>
- * &#64;XmlAnyElement
- * public {@link Element}[] others;
- *
- * // Collection of {@link Element} or JAXB elements.
- * &#64;XmlAnyElement(lax="true")
- * public {@link Object}[] others;
- *
- * &#64;XmlAnyElement
- * private List&lt;{@link Element}> nodes;
- *
- * &#64;XmlAnyElement
- * private {@link Element} node;
- * </pre>
- *
- * <h2>Restriction usage constraints</h2>
- * <p>
- * This annotation is mutually exclusive with
- * {@link XmlElement}, {@link XmlAttribute}, {@link XmlValue},
- * {@link XmlElements}, {@link XmlID}, and {@link XmlIDREF}.
- *
- * <p>
- * There can be only one {@link XmlAnyElement} annotated JavaBean property
- * in a class and its super classes.
- *
- * <h2>Relationship to other annotations</h2>
- * <p>
- * This annotation can be used with {@link XmlJavaTypeAdapter}, so that users
- * can map their own data structure to DOM, which in turn can be composed
- * into XML.
- *
- * <p>
- * This annotation can be used with {@link XmlMixed} like this:
- * <pre>
- * // List of java.lang.String or DOM nodes.
- * &#64;XmlAnyElement &#64;XmlMixed
- * List&lt;Object> others;
- * </pre>
- *
- *
- * <h2>Schema To Java example</h2>
- *
- * The following schema would produce the following Java class:
- * <pre>
- * &lt;xs:complexType name="foo">
- * &lt;xs:sequence>
- * &lt;xs:element name="a" type="xs:int" />
- * &lt;xs:element name="b" type="xs:int" />
- * &lt;xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- * <pre>
- * class Foo {
- * int a;
- * int b;
- * &#64;{@link XmlAnyElement}
- * List&lt;Element> any;
- * }
- * </pre>
- *
- * It can unmarshal instances like
- *
- * <pre>
- * &lt;foo xmlns:e="extra">
- * &lt;a>1</a>
- * &lt;e:other /> // this will be bound to DOM, because unmarshalling is orderless
- * &lt;b>3</b>
- * &lt;e:other />
- * &lt;c>5</c> // this will be bound to DOM, because the annotation doesn't remember namespaces.
- * &lt;/foo>
- * </pre>
- *
- *
- *
- * The following schema would produce the following Java class:
- * <pre>
- * &lt;xs:complexType name="bar">
- * &lt;xs:complexContent>
- * &lt;xs:extension base="foo">
- * &lt;xs:sequence>
- * &lt;xs:element name="c" type="xs:int" />
- * &lt;xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
- * &lt;/xs:sequence>
- * &lt;/xs:extension>
- * &lt;/xs:complexType>
- * </pre>
- *
- * <pre>
- * class Bar extends Foo {
- * int c;
- * // Foo.getAny() also represents wildcard content for type definition bar.
- * }
- * </pre>
- *
- *
- * It can unmarshal instances like
- *
- * <pre>
- * &lt;bar xmlns:e="extra">
- * &lt;a>1</a>
- * &lt;e:other /> // this will be bound to DOM, because unmarshalling is orderless
- * &lt;b>3</b>
- * &lt;e:other />
- * &lt;c>5</c> // this now goes to Bar.c
- * &lt;e:other /> // this will go to Foo.any
- * &lt;/bar>
- * </pre>
- *
- *
- *
- *
- * <h2>Using {@link XmlAnyElement} with {@link XmlElementRef}</h2>
- * <p>
- * The {@link XmlAnyElement} annotation can be used with {@link XmlElementRef}s to
- * designate additional elements that can participate in the content tree.
- *
- * <p>
- * The following schema would produce the following Java class:
- * <pre>
- * &lt;xs:complexType name="foo">
- * &lt;xs:choice maxOccurs="unbounded" minOccurs="0">
- * &lt;xs:element name="a" type="xs:int" />
- * &lt;xs:element name="b" type="xs:int" />
- * &lt;xs:any namespace="##other" processContents="lax" />
- * &lt;/xs:choice>
- * &lt;/xs:complexType>
- * </pre>
- *
- * <pre>
- * class Foo {
- * &#64;{@link XmlAnyElement}(lax="true")
- * &#64;{@link XmlElementRefs}({
- * &#64;{@link XmlElementRef}(name="a", type="JAXBElement.class")
- * &#64;{@link XmlElementRef}(name="b", type="JAXBElement.class")
- * })
- * {@link List}&lt;{@link Object}> others;
- * }
- *
- * &#64;XmlRegistry
- * class ObjectFactory {
- * ...
- * &#64;XmlElementDecl(name = "a", namespace = "", scope = Foo.class)
- * {@link JAXBElement}&lt;Integer> createFooA( Integer i ) { ... }
- *
- * &#64;XmlElementDecl(name = "b", namespace = "", scope = Foo.class)
- * {@link JAXBElement}&lt;Integer> createFooB( Integer i ) { ... }
- * </pre>
- *
- * It can unmarshal instances like
- *
- * <pre>
- * &lt;foo xmlns:e="extra">
- * &lt;a>1</a> // this will unmarshal to a {@link JAXBElement} instance whose value is 1.
- * &lt;e:other /> // this will unmarshal to a DOM {@link Element}.
- * &lt;b>3</b> // this will unmarshal to a {@link JAXBElement} instance whose value is 1.
- * &lt;/foo>
- * </pre>
- *
- *
- *
- *
- * <h2>W3C XML Schema "lax" wildcard emulation</h2>
- * The lax element of the annotation enables the emulation of the "lax" wildcard semantics.
- * For example, when the Java source code is annotated like this:
- * <pre>
- * &#64;{@link XmlRootElement}
- * class Foo {
- * &#64;XmlAnyElement(lax=true)
- * public {@link Object}[] others;
- * }
- * </pre>
- * then the following document will unmarshal like this:
- * <pre>
- * &lt;foo>
- * &lt;unknown />
- * &lt;foo />
- * &lt;/foo>
- *
- * Foo foo = unmarshal();
- * // 1 for 'unknown', another for 'foo'
- * assert foo.others.length==2;
- * // 'unknown' unmarshals to a DOM element
- * assert foo.others[0] instanceof Element;
- * // because of lax=true, the 'foo' element eagerly
- * // unmarshals to a Foo object.
- * assert foo.others[1] instanceof Foo;
- * </pre>
- *
- * @author Kohsuke Kawaguchi
- * @since JAXB2.0
- */
-@Retention(RUNTIME)
-@Target({FIELD,METHOD})
-public @interface XmlAnyElement {
-
- /**
- * Controls the unmarshaller behavior when it sees elements
- * known to the current {@link JAXBContext}.
- *
- * <h3>When false</h3>
- * <p>
- * If false, all the elements that match the property will be unmarshalled
- * to DOM, and the property will only contain DOM elements.
- *
- * <h3>When true</h3>
- * <p>
- * If true, when an element matches a property marked with {@link XmlAnyElement}
- * is known to {@link JAXBContext} (for example, there's a class with
- * {@link XmlRootElement} that has the same tag name, or there's
- * {@link XmlElementDecl} that has the same tag name),
- * the unmarshaller will eagerly unmarshal this element to the JAXB object,
- * instead of unmarshalling it to DOM. Additionally, if the element is
- * unknown but it has a known xsi:type, the unmarshaller eagerly unmarshals
- * the element to a {@link JAXBElement}, with the unknown element name and
- * the JAXBElement value is set to an instance of the JAXB mapping of the
- * known xsi:type.
- *
- * <p>
- * As a result, after the unmarshalling, the property can become heterogeneous;
- * it can have both DOM nodes and some JAXB objects at the same time.
- *
- * <p>
- * This can be used to emulate the "lax" wildcard semantics of the W3C XML Schema.
- */
- boolean lax() default false;
-
- /**
- * Specifies the {@link DomHandler} which is responsible for actually
- * converting XML from/to a DOM-like data structure.
- */
- Class<? extends DomHandler> value() default W3CDomHandler.class;
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttachmentRef.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttachmentRef.java
deleted file mode 100644
index d15dc369..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttachmentRef.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import javax.activation.DataHandler;
-import static java.lang.annotation.ElementType.*;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * Marks a field/property that its XML form is a uri reference to mime content.
- * The mime content is optimally stored out-of-line as an attachment.
- *
- * A field/property must always map to the {@link DataHandler} class.
- *
- * <h2>Usage</h2>
- * <pre>
- * &#64;{@link XmlRootElement}
- * class Foo {
- * &#64;{@link XmlAttachmentRef}
- * &#64;{@link XmlAttribute}
- * {@link DataHandler} data;
- *
- * &#64;{@link XmlAttachmentRef}
- * &#64;{@link XmlElement}
- * {@link DataHandler} body;
- * }
- * </pre>
- * The above code maps to the following XML:
- * <pre>
- * &lt;xs:element name="foo" xmlns:ref="http://ws-i.org/profiles/basic/1.1/xsd">
- * &lt;xs:complexType>
- * &lt;xs:sequence>
- * &lt;xs:element name="body" type="ref:swaRef" minOccurs="0" />
- * &lt;/xs:sequence>
- * &lt;xs:attribute name="data" type="ref:swaRef" use="optional" />
- * &lt;/xs:complexType>
- * &lt;/xs:element>
- * </pre>
- *
- * <p>
- * The above binding supports WS-I AP 1.0 <a href="http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24.html#Referencing_Attachments_from_the_SOAP_Envelope">WS-I Attachments Profile Version 1.0.</a>
- *
- * @author Kohsuke Kawaguchi
- * @since JAXB2.0
- */
-@Retention(RUNTIME)
-@Target({FIELD,METHOD,PARAMETER})
-public @interface XmlAttachmentRef {
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttribute.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttribute.java
deleted file mode 100644
index 13f52547..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlAttribute.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * <p>
- * Maps a JavaBean property to a XML attribute.
- *
- * <p> <b>Usage</b> </p>
- * <p>
- * The <tt>@XmlAttribute</tt> annotation can be used with the
- * following program elements:
- * <ul>
- * <li> JavaBean property </li>
- * <li> field </li>
- * </ul>
- *
- * <p> A static final field is mapped to a XML fixed attribute.
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * The usage is subject to the following constraints:
- * <ul>
- * <li> If type of the field or the property is a collection
- * type, then the collection item type must be mapped to schema
- * simple type.
- * <pre>
- * // Examples
- * &#64;XmlAttribute List&lt;Integer> items; //legal
- * &#64;XmlAttribute List&lt;Bar> foo; // illegal if Bar does not map to a schema simple type
- * </pre>
- * </li>
- * <li> If the type of the field or the property is a non
- * collection type, then the type of the property or field
- * must map to a simple schema type.
- * <pre>
- * // Examples
- * &#64;XmlAttribute int foo; // legal
- * &#64;XmlAttribute Foo foo; // illegal if Foo does not map to a schema simple type
- * </pre>
- * </li>
- * <li> This annotation can be used with the following annotations:
- * {@link XmlID},
- * {@link XmlIDREF},
- * {@link XmlList},
- * {@link XmlSchemaType},
- * {@link XmlValue},
- * {@link XmlAttachmentRef},
- * {@link XmlMimeType},
- * {@link XmlInlineBinaryData},
- * {@link javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter}.</li>
- * </ul>
- * </p>
- *
- * <p> <b>Example 1: </b>Map a JavaBean property to an XML attribute.</p>
- * <pre>
- * //Example: Code fragment
- * public class USPrice {
- * &#64;XmlAttribute
- * public java.math.BigDecimal getPrice() {...} ;
- * public void setPrice(java.math.BigDecimal ) {...};
- * }
- *
- * &lt;!-- Example: XML Schema fragment -->
- * &lt;xs:complexType name="USPrice">
- * &lt;xs:sequence>
- * &lt;/xs:sequence>
- * &lt;xs:attribute name="price" type="xs:decimal"/>
- * &lt;/xs:complexType>
- * </pre>
- *
- * <p> <b>Example 2: </b>Map a JavaBean property to an XML attribute with anonymous type.</p>
- * See Example 7 in @{@link XmlType}.
- *
- * <p> <b>Example 3: </b>Map a JavaBean collection property to an XML attribute.</p>
- * <pre>
- * // Example: Code fragment
- * class Foo {
- * ...
- * &#64;XmlAttribute List&lt;Integer> items;
- * }
- *
- * &lt;!-- Example: XML Schema fragment -->
- * &lt;xs:complexType name="foo">
- * ...
- * &lt;xs:attribute name="items">
- * &lt;xs:simpleType>
- * &lt;xs:list itemType="xs:int"/>
- * &lt;/xs:simpleType>
- * &lt;/xs:complexType>
- *
- * </pre>
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @see XmlType
- * @since JAXB2.0
- */
-
-@Retention(RUNTIME) @Target({FIELD, METHOD})
-public @interface XmlAttribute {
- /**
- * Name of the XML Schema attribute. By default, the XML Schema
- * attribute name is derived from the JavaBean property name.
- *
- */
- String name() default "##default";
-
- /**
- * Specifies if the XML Schema attribute is optional or
- * required. If true, then the JavaBean property is mapped to a
- * XML Schema attribute that is required. Otherwise it is mapped
- * to a XML Schema attribute that is optional.
- *
- */
- boolean required() default false;
-
- /**
- * Specifies the XML target namespace of the XML Schema
- * attribute.
- *
- */
- String namespace() default "##default" ;
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElement.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElement.java
deleted file mode 100644
index 6f2c7e5a..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElement.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * Maps a JavaBean property to a XML element derived from property name.
- *
- * <p> <b>Usage</b> </p>
- * <p>
- * <tt>@XmlElement</tt> annotation can be used with the following program
- * elements:
- * <ul>
- * <li> a JavaBean property </li>
- * <li> non static, non transient field </li>
- * <li> within {@link XmlElements}
- * <p>
- *
- * </ul>
- *
- * The usage is subject to the following constraints:
- * <ul>
- * <li> This annotation can be used with following annotations:
- * {@link XmlID},
- * {@link XmlIDREF},
- * {@link XmlList},
- * {@link XmlSchemaType},
- * {@link XmlValue},
- * {@link XmlAttachmentRef},
- * {@link XmlMimeType},
- * {@link XmlInlineBinaryData},
- * {@link XmlElementWrapper},
- * {@link XmlJavaTypeAdapter}</li>
- * <li> if the type of JavaBean property is a collection type of
- * array, an indexed property, or a parameterized list, and
- * this annotation is used with {@link XmlElements} then,
- * <tt>@XmlElement.type()</tt> must be DEFAULT.class since the
- * collection item type is already known. </li>
- * </ul>
- *
- * <p>
- * A JavaBean property, when annotated with @XmlElement annotation
- * is mapped to a local element in the XML Schema complex type to
- * which the containing class is mapped.
- *
- * <p>
- * <b>Example 1: </b> Map a public non static non final field to local
- * element
- * <pre>
- * //Example: Code fragment
- * public class USPrice {
- * &#64;XmlElement(name="itemprice")
- * public java.math.BigDecimal price;
- * }
- *
- * &lt;!-- Example: Local XML Schema element -->
- * &lt;xs:complexType name="USPrice"/>
- * &lt;xs:sequence>
- * &lt;xs:element name="itemprice" type="xs:decimal" minOccurs="0"/>
- * &lt;/sequence>
- * &lt;/xs:complexType>
- * </pre>
- * <p>
- *
- * <b> Example 2: </b> Map a field to a nillable element.
- * <pre>
- *
- * //Example: Code fragment
- * public class USPrice {
- * &#64;XmlElement(nillable=true)
- * public java.math.BigDecimal price;
- * }
- *
- * &lt;!-- Example: Local XML Schema element -->
- * &lt;xs:complexType name="USPrice">
- * &lt;xs:sequence>
- * &lt;xs:element name="price" type="xs:decimal" nillable="true" minOccurs="0"/>
- * &lt;/sequence>
- * &lt;/xs:complexType>
- * </pre>
- * <p>
- * <b> Example 3: </b> Map a field to a nillable, required element.
- * <pre>
- *
- * //Example: Code fragment
- * public class USPrice {
- * &#64;XmlElement(nillable=true, required=true)
- * public java.math.BigDecimal price;
- * }
- *
- * &lt;!-- Example: Local XML Schema element -->
- * &lt;xs:complexType name="USPrice">
- * &lt;xs:sequence>
- * &lt;xs:element name="price" type="xs:decimal" nillable="true" minOccurs="1"/>
- * &lt;/sequence>
- * &lt;/xs:complexType>
- * </pre>
- * <p>
- *
- * <p> <b>Example 4: </b>Map a JavaBean property to an XML element
- * with anonymous type.</p>
- * <p>
- * See Example 6 in @{@link XmlType}.
- *
- * <p>
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
- */
-
-@Retention(RUNTIME) @Target({FIELD, METHOD, PARAMETER})
-public @interface XmlElement {
- /**
- * Name of the XML Schema element.
- * <p> If the value is "##default", then element name is derived from the
- * JavaBean property name.
- */
- String name() default "##default";
-
- /**
- * Customize the element declaration to be nillable.
- * <p>If nillable() is true, then the JavaBean property is
- * mapped to a XML Schema nillable element declaration.
- */
- boolean nillable() default false;
-
- /**
- * Customize the element declaration to be required.
- * <p>If required() is true, then Javabean property is mapped to
- * an XML schema element declaration with minOccurs="1".
- * maxOccurs is "1" for a single valued property and "unbounded"
- * for a multivalued property.
- * <p>If required() is false, then the Javabean property is mapped
- * to XML Schema element declaration with minOccurs="0".
- * maxOccurs is "1" for a single valued property and "unbounded"
- * for a multivalued property.
- */
-
- boolean required() default false;
-
- /**
- * XML target namespace of the XML Schema element.
- * <p>
- * If the value is "##default", then the namespace is determined
- * as follows:
- * <ol>
- * <li>
- * If the enclosing package has {@link XmlSchema} annotation,
- * and its {@link XmlSchema#elementFormDefault() elementFormDefault}
- * is {@link XmlNsForm#QUALIFIED QUALIFIED}, then the namespace of
- * the enclosing class.
- *
- * <li>
- * Otherwise &#39;&#39; (which produces unqualified element in the default
- * namespace.
- * </ol>
- */
- String namespace() default "##default";
-
- /**
- * Default value of this element.
- *
- * <p>
- * The <pre>'\u0000'</pre> value specified as a default of this annotation element
- * is used as a poor-man's substitute for null to allow implementations
- * to recognize the 'no default value' state.
- */
- String defaultValue() default "\u0000";
-
- /**
- * The Java class being referenced.
- */
- Class type() default DEFAULT.class;
-
- /**
- * Used in {@link XmlElement#type()} to
- * signal that the type be inferred from the signature
- * of the property.
- */
- static final class DEFAULT {}
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementDecl.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementDecl.java
deleted file mode 100644
index d5c558de..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementDecl.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.METHOD;
-
-/**
- * Maps a factory method to a XML element.
- *
- * <p> <b>Usage</b> </p>
- *
- * The annotation creates a mapping between an XML schema element
- * declaration and a <i> element factory method </i> that returns a
- * JAXBElement instance representing the element
- * declaration. Typically, the element factory method is generated
- * (and annotated) from a schema into the ObjectFactory class in a
- * Java package that represents the binding of the element
- * declaration's target namespace. Thus, while the annotation syntax
- * allows &#64;XmlElementDecl to be used on any method, semantically
- * its use is restricted to annotation of element factory method.
- *
- * The usage is subject to the following constraints:
- *
- * <ul>
- * <li> The class containing the element factory method annotated
- * with &#64;XmlElementDecl must be marked with {@link
- * XmlRegistry}. </li>
- * <li> The element factory method must take one parameter
- * assignable to {@link Object}.</li>
- * </ul>
- *
- * <p><b>Example 1: </b>Annotation on a factory method
- * <pre>
- * // Example: code fragment
- * &#64;XmlRegistry
- * class ObjectFactory {
- * &#64;XmlElementDecl(name="foo")
- * JAXBElement&lt;String> createFoo(String s) { ... }
- * }
- * </pre>
- * <pre>
- * &lt;!-- XML input -->
- * &lt;foo>string</foo>
- *
- * // Example: code fragment corresponding to XML input
- * JAXBElement<String> o =
- * (JAXBElement<String>)unmarshaller.unmarshal(aboveDocument);
- * // print JAXBElement instance to show values
- * System.out.println(o.getName()); // prints "{}foo"
- * System.out.println(o.getValue()); // prints "string"
- * System.out.println(o.getValue().getClass()); // prints "java.lang.String"
- *
- * &lt;!-- Example: XML schema definition -->
- * &lt;xs:element name="foo" type="xs:string"/>
- * </pre>
- *
- * <p><b>Example 2: </b> Element declaration with non local scope
- * <p>
- * The following example illustrates the use of scope annotation
- * parameter in binding of element declaration in schema derived
- * code.
- * <p>
- * The following example may be replaced in a future revision of
- * this javadoc.
- *
- * <pre>
- * &lt;!-- Example: XML schema definition -->
- * &lt;xs:schema>
- * &lt;xs:complexType name="pea">
- * &lt;xs:choice maxOccurs="unbounded">
- * &lt;xs:element name="foo" type="xs:string"/>
- * &lt;xs:element name="bar" type="xs:string"/>
- * &lt;/xs:choice>
- * &lt;/xs:complexType>
- * &lt;xs:element name="foo" type="xs:int"/>
- * &lt;/xs:schema>
- * </pre>
- * <pre>
- * // Example: expected default binding
- * class Pea {
- * &#64;XmlElementRefs({
- * &#64;XmlElementRef(name="foo",type=JAXBElement.class)
- * &#64;XmlElementRef(name="bar",type=JAXBElement.class)
- * })
- * List&lt;JAXBElement&lt;String>> fooOrBar;
- * }
- *
- * &#64;XmlRegistry
- * class ObjectFactory {
- * &#64;XmlElementDecl(scope=Pea.class,name="foo")
- * JAXBElement<String> createPeaFoo(String s);
- *
- * &#64;XmlElementDecl(scope=Pea.class,name="bar")
- * JAXBElement<String> createPeaBar(String s);
- *
- * &#64;XmlElementDecl(name="foo")
- * JAXBElement<Integer> createFoo(Integer i);
- * }
- *
- * </pre>
- * Without scope createFoo and createPeaFoo would become ambiguous
- * since both of them map to a XML schema element with the same local
- * name "foo".
- *
- * @see XmlRegistry
- * @since JAXB 2.0
- */
-@Retention(RUNTIME)
-@Target({METHOD})
-public @interface XmlElementDecl {
- /**
- * scope of the mapping.
- *
- * <p>
- * If this is not {@link XmlElementDecl.GLOBAL}, then this element
- * declaration mapping is only active within the specified class.
- */
- Class scope() default GLOBAL.class;
-
- /**
- * namespace name of the XML element.
- * <p>
- * If the value is "##default", then the value is the namespace
- * name for the package of the class containing this factory method.
- *
- * @see #name()
- */
- String namespace() default "##default";
-
- /**
- * local name of the XML element.
- *
- * <p>
- * <b> Note to reviewers: </b> There is no default name; since
- * the annotation is on a factory method, it is not clear that the
- * method name can be derived from the factory method name.
- * @see #namespace()
- */
- String name();
-
- /**
- * namespace name of a substitution group's head XML element.
- * <p>
- * This specifies the namespace name of the XML element whose local
- * name is specified by <tt>substitutionHeadName()</tt>.
- * <p>
- * If <tt>susbtitutionHeadName()</tt> is "", then this
- * value can only be "##default". But the value is ignored since
- * since this element is not part of susbtitution group when the
- * value of <tt>susbstitutionHeadName()</tt> is "".
- * <p>
- * If <tt>susbtitutionHeadName()</tt> is not "" and the value is
- * "##default", then the namespace name is the namespace name to
- * which the package of the containing class, marked with {@link
- * XmlRegistry }, is mapped.
- * <p>
- * If <tt>susbtitutionHeadName()</tt> is not "" and the value is
- * not "##default", then the value is the namespace name.
- *
- * @see #substitutionHeadName()
- */
- String substitutionHeadNamespace() default "##default";
-
- /**
- * XML local name of a substitution group's head element.
- * <p>
- * If the value is "", then this element is not part of any
- * substitution group.
- *
- * @see #substitutionHeadNamespace()
- */
- String substitutionHeadName() default "";
-
- /**
- * Default value of this element.
- *
- * <p>
- * The <pre>'\u0000'</pre> value specified as a default of this annotation element
- * is used as a poor-man's substitute for null to allow implementations
- * to recognize the 'no default value' state.
- */
- String defaultValue() default "\u0000";
-
- /**
- * Used in {@link XmlElementDecl#scope()} to
- * signal that the declaration is in the global scope.
- */
- public final class GLOBAL {}
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRef.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRef.java
deleted file mode 100644
index 0f5c7219..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRef.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-
-/**
- * <p>
- * Maps a JavaBean property to a XML element derived from property's type.
- * <p>
- * <b>Usage</b>
- * <p>
- * <tt>&#64;XmlElementRef</tt> annotation can be used with a
- * JavaBean property or from within {@link XmlElementRefs}
- * <p>
- * This annotation dynamically associates an XML element name with the JavaBean
- * property. When a JavaBean property is annotated with {@link
- * XmlElement}, the XML element name is statically derived from the
- * JavaBean property name. However, when this annotation is used, the
- * XML element name is derived from the instance of the type of the
- * JavaBean property at runtime.
- *
- * <h3> XML Schema substitution group support </h3>
- * XML Schema allows a XML document author to use XML element names
- * that were not statically specified in the content model of a
- * schema using substitution groups. Schema derived code provides
- * support for substitution groups using an <i>element property</i>,
- * (section 5.5.5, "Element Property" of JAXB 2.0 specification). An
- * element property method signature is of the form:
- * <pre>
- * public void setTerm(JAXBElement<? extends Operator>);
- * public JAXBElement<? extends Operator> getTerm();
- * </pre>
- * <p>
- * An element factory method annotated with {@link XmlElementDecl} is
- * used to create a <tt>JAXBElement</tt> instance, containing an XML
- * element name. The presence of &#64;XmlElementRef annotation on an
- * element property indicates that the element name from <tt>JAXBElement</tt>
- * instance be used instead of deriving an XML element name from the
- * JavaBean property name.
- *
- * <p>
- * The usage is subject to the following constraints:
- * <ul>
- * <li> If the collection item type (for collection property) or
- * property type (for single valued property) is
- * {@link javax.xml.bind.JAXBElement}, then
- * <tt>&#64;XmlElementRef}.name()</tt> and <tt>&#64;XmlElementRef.namespace()</tt> must
- * point an element factory method with an @XmlElementDecl
- * annotation in a class annotated with @XmlRegistry (usually
- * ObjectFactory class generated by the schema compiler) :
- * <ul>
- * <li> @XmlElementDecl.name() must equal @XmlElementRef.name() </li>
- * <li> @XmlElementDecl.namespace() must equal @XmlElementRef.namespace(). </li>
- * </ul>
- * </li>
- * <li> If the collection item type (for collection property) or
- * property type (for single valued property) is not
- * {@link javax.xml.bind.JAXBElement}, then the type referenced by the
- * property or field must be annotated with {@link XmlRootElement}. </li>
- * <li> This annotation can be used with the following annotations:
- * {@link XmlElementWrapper}, {@link XmlJavaTypeAdapter}.
- * </ul>
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * <p><b>Example 1: Ant Task Example</b></p>
- * The following Java class hierarchy models an Ant build
- * script. An Ant task corresponds to a class in the class
- * hierarchy. The XML element name of an Ant task is indicated by the
- * &#64;XmlRootElement annotation on its corresponding class.
- * <pre>
- * &#64;XmlRootElement(name="target")
- * class Target {
- * // The presence of &#64;XmlElementRef indicates that the XML
- * // element name will be derived from the &#64;XmlRootElement
- * // annotation on the type (for e.g. "jar" for JarTask).
- * &#64;XmlElementRef
- * List&lt;Task> tasks;
- * }
- *
- * abstract class Task {
- * }
- *
- * &#64;XmlRootElement(name="jar")
- * class JarTask extends Task {
- * ...
- * }
- *
- * &#64;XmlRootElement(name="javac")
- * class JavacTask extends Task {
- * ...
- * }
- *
- * &lt;!-- XML Schema fragment -->
- * &lt;xs:element name="target" type="Target">
- * &lt;xs:complexType name="Target">
- * &lt;xs:sequence>
- * &lt;xs:choice maxOccurs="unbounded">
- * &lt;xs:element ref="jar">
- * &lt;xs:element ref="javac">
- * &lt;/xs:choice>
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- *
- * </pre>
- * <p>
- * Thus the following code fragment:
- * <pre>
- * Target target = new Target();
- * target.tasks.add(new JarTask());
- * target.tasks.add(new JavacTask());
- * marshal(target);
- * </pre>
- * will produce the following XML output:
- * <pre>
- * &lt;target>
- * &lt;jar>
- * ....
- * &lt;/jar>
- * &lt;javac>
- * ....
- * &lt;/javac>
- * &lt;/target>
- * </pre>
- * <p>
- * It is not an error to have a class that extends <tt>Task</tt>
- * that doesn't have {@link XmlRootElement}. But they can't show up in an
- * XML instance (because they don't have XML element names).
- *
- * <p><b>Example 2: XML Schema Susbstitution group support</b>
- * <p> The following example shows the annotations for XML Schema
- * substitution groups. The annotations and the ObjectFactory are
- * derived from the schema.
- *
- * <pre>
- * &#64;XmlElement
- * class Math {
- * // The value of {@link #type()}is
- * // JAXBElement.class , which indicates the XML
- * // element name ObjectFactory - in general a class marked
- * // with &#64;XmlRegistry. (See ObjectFactory below)
- * //
- * // The {@link #name()} is "operator", a pointer to a
- * // factory method annotated with a
- * // {@link XmlElementDecl} with the name "operator". Since
- * // "operator" is the head of a substitution group that
- * // contains elements "add" and "sub" elements, "operator"
- * // element can be substituted in an instance document by
- * // elements "add" or "sub". At runtime, JAXBElement
- * // instance contains the element name that has been
- * // substituted in the XML document.
- * //
- * &#64;XmlElementRef(type=JAXBElement.class,name="operator")
- * JAXBElement&lt;? extends Operator> term;
- * }
- *
- * &#64;XmlRegistry
- * class ObjectFactory {
- * &#64;XmlElementDecl(name="operator")
- * JAXBElement&lt;Operator> createOperator(Operator o) {...}
- * &#64;XmlElementDecl(name="add",substitutionHeadName="operator")
- * JAXBElement&lt;Operator> createAdd(Operator o) {...}
- * &#64;XmlElementDecl(name="sub",substitutionHeadName="operator")
- * JAXBElement&lt;Operator> createSub(Operator o) {...}
- * }
- *
- * class Operator {
- * ...
- * }
- * </pre>
- * <p>
- * Thus, the following code fragment
- * <pre>
- * Math m = new Math();
- * m.term = new ObjectFactory().createAdd(new Operator());
- * marshal(m);
- * </pre>
- * will produce the following XML output:
- * <pre>
- * &lt;math>
- * &lt;add>...&lt;/add>
- * &lt;/math>
- * </pre>
- *
- *
- * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems,Inc. </li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
- * @see XmlElementRefs
- * @since JAXB2.0
- */
-@Retention(RUNTIME)
-@Target({FIELD,METHOD})
-public @interface XmlElementRef {
- /**
- * The Java type being referenced.
- * <p>
- * If the value is DEFAULT.class, the type is inferred from the
- * the type of the JavaBean property.
- */
- Class type() default DEFAULT.class;
-
- /**
- * This parameter and {@link #name()} are used to determine the
- * XML element for the JavaBean property.
- *
- * <p> If <tt>type()</tt> is <tt>JAXBElement.class</tt> , then
- * <tt>namespace()</tt> and <tt>name()</tt>
- * point to a factory method with {@link XmlElementDecl}. The XML
- * element name is the element name from the factory method's
- * {@link XmlElementDecl} annotation or if an element from its
- * substitution group (of which it is a head element) has been
- * substituted in the XML document, then the element name is from the
- * {@link XmlElementDecl} on the substituted element.
- *
- * <p> If {@link #type()} is not <tt>JAXBElement.class</tt>, then
- * the XML element name is the XML element name statically
- * associated with the type using the annotation {@link
- * XmlRootElement} on the type. If the type is not annotated with
- * an {@link XmlElementDecl}, then it is an error.
- *
- * <p> If <tt>type()</tt> is not <tt>JAXBElement.class</tt>, then
- * this value must be "".
- *
- */
- String namespace() default "";
- /**
- *
- * @see #namespace()
- */
- String name() default "##default";
-
- /**
- * Used in {@link XmlElementRef#type()} to
- * signal that the type be inferred from the signature
- * of the property.
- */
- static final class DEFAULT {}
-
- /**
- * Customize the element declaration to be required.
- * <p>
- * If required() is true, then Javabean property is mapped to
- * an XML schema element declaration with minOccurs="1".
- * maxOccurs is "1" for a single valued property and "unbounded"
- * for a multivalued property.
- *
- * <p>
- * If required() is false, then the Javabean property is mapped
- * to XML Schema element declaration with minOccurs="0".
- * maxOccurs is "1" for a single valued property and "unbounded"
- * for a multivalued property.
- *
- * <p>
- * For compatibility with JAXB 2.1, this property defaults to <tt>true</tt>,
- * despite the fact that {@link XmlElement#required()} defaults to false.
- *
- * @since 2.2
- */
- boolean required() default true;
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRefs.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRefs.java
deleted file mode 100644
index bb3633ed..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementRefs.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * Marks a property that refers to classes with {@link XmlElement}
- * or JAXBElement.
- *
- * <p>
- * Compared to an element property (property with {@link XmlElement}
- * annotation), a reference property has a different substitution semantics.
- * When a sub-class is assigned to a property, an element property produces
- * the same tag name with @xsi:type, whereas a reference property produces
- * a different tag name (the tag name that's on the the sub-class.)
- *
- * <p> This annotation can be used with the following annotations:
- * {@link XmlJavaTypeAdapter}, {@link XmlElementWrapper}.
- *
- * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
- *
- * @see XmlElementWrapper
- * @see XmlElementRef
- * @since JAXB2.0
- */
-@Retention(RUNTIME)
-@Target({FIELD,METHOD})
-public @interface XmlElementRefs {
- XmlElementRef[] value();
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementWrapper.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementWrapper.java
deleted file mode 100644
index c6bebb27..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElementWrapper.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Generates a wrapper element around XML representation.
- *
- * This is primarily intended to be used to produce a wrapper
- * XML element around collections. The annotation therefore supports
- * two forms of serialization shown below.
- *
- * <pre>
- * //Example: code fragment
- * int[] names;
- *
- * // XML Serialization Form 1 (Unwrapped collection)
- * &lt;names> ... &lt;/names>
- * &lt;names> ... &lt;/names>
- *
- * // XML Serialization Form 2 ( Wrapped collection )
- * &lt;wrapperElement>
- * &lt;names> value-of-item &lt;/names>
- * &lt;names> value-of-item &lt;/names>
- * ....
- * &lt;/wrapperElement>
- * </pre>
- *
- * <p> The two serialized XML forms allow a null collection to be
- * represented either by absence or presence of an element with a
- * nillable attribute.
- *
- * <p> <b>Usage</b> </p>
- * <p>
- * The <tt>@XmlElementWrapper</tt> annotation can be used with the
- * following program elements:
- * <ul>
- * <li> JavaBean property </li>
- * <li> non static, non transient field </li>
- * </ul>
- *
- * <p>The usage is subject to the following constraints:
- * <ul>
- * <li> The property must be a collection property </li>
- * <li> This annotation can be used with the following annotations:
- * {@link XmlElement},
- * {@link XmlElements},
- * {@link XmlElementRef},
- * {@link XmlElementRefs},
- * {@link XmlJavaTypeAdapter}.</li>
- * </ul>
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
- * @see XmlElement
- * @see XmlElements
- * @see XmlElementRef
- * @see XmlElementRefs
- * @since JAXB2.0
- *
- */
-
-@Retention(RUNTIME) @Target({FIELD, METHOD})
-public @interface XmlElementWrapper {
- /**
- * Name of the XML wrapper element. By default, the XML wrapper
- * element name is derived from the JavaBean property name.
- */
- String name() default "##default";
-
- /**
- * XML target namespace of the XML wrapper element.
- * <p>
- * If the value is "##default", then the namespace is determined
- * as follows:
- * <ol>
- * <li>
- * If the enclosing package has {@link XmlSchema} annotation,
- * and its {@link XmlSchema#elementFormDefault() elementFormDefault}
- * is {@link XmlNsForm#QUALIFIED QUALIFIED}, then the namespace of
- * the enclosing class.
- *
- * <li>
- * Otherwise "" (which produces unqualified element in the default
- * namespace.
- * </ol>
- */
- String namespace() default "##default";
-
- /**
- * If true, the absence of the collection is represented by
- * using <tt>xsi:nil='true'</tt>. Otherwise, it is represented by
- * the absence of the element.
- */
- boolean nillable() default false;
-
- /**
- * Customize the wrapper element declaration to be required.
- *
- * <p>
- * If required() is true, then the corresponding generated
- * XML schema element declaration will have <tt>minOccurs="1"</tt>,
- * to indicate that the wrapper element is always expected.
- *
- * <p>
- * Note that this only affects the schema generation, and
- * not the unmarshalling or marshalling capability. This is
- * simply a mechanism to let users express their application constraints
- * better.
- *
- * @since JAXB 2.1
- */
- boolean required() default false;
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElements.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElements.java
deleted file mode 100644
index 2e538460..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlElements.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * <p>
- * A container for multiple @{@link XmlElement} annotations.
- *
- * Multiple annotations of the same type are not allowed on a program
- * element. This annotation therefore serves as a container annotation
- * for multiple &#64;XmlElements as follows:
- *
- * <pre>
- * &#64;XmlElements({ @XmlElement(...),@XmlElement(...) })
- * </pre>
- *
- * <p>The <tt>@XmlElements</tt> annnotation can be used with the
- * following program elements: </p>
- * <ul>
- * <li> a JavaBean property </li>
- * <li> non static, non transient field </li>
- * </ul>
- *
- * This annotation is intended for annotation a JavaBean collection
- * property (e.g. List).
- *
- * <p><b>Usage</b></p>
- *
- * <p>The usage is subject to the following constraints:
- * <ul>
- * <li> This annotation can be used with the following
- * annotations: @{@link XmlIDREF}, @{@link XmlElementWrapper}. </li>
- * <li> If @XmlIDREF is also specified on the JavaBean property,
- * then each &#64;XmlElement.type() must contain a JavaBean
- * property annotated with <tt>&#64;XmlID</tt>.</li>
- * </ul>
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * <hr>
- *
- * <p><b>Example 1:</b> Map to a list of elements</p>
- * <pre>
- *
- * // Mapped code fragment
- * public class Foo {
- * &#64;XmlElements(
- * &#64;XmlElement(name="A", type=Integer.class),
- * &#64;XmlElement(name="B", type=Float.class)
- * }
- * public List items;
- * }
- *
- * &lt;!-- XML Representation for a List of {1,2.5}
- * XML output is not wrapped using another element -->
- * ...
- * &lt;A> 1 &lt;/A>
- * &lt;B> 2.5 &lt;/B>
- * ...
- *
- * &lt;!-- XML Schema fragment -->
- * &lt;xs:complexType name="Foo">
- * &lt;xs:sequence>
- * &lt;xs:choice minOccurs="0" maxOccurs="unbounded">
- * &lt;xs:element name="A" type="xs:int"/>
- * &lt;xs:element name="B" type="xs:float"/>
- * &lt;xs:choice>
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- *
- * </pre>
- *
- * <p><b>Example 2:</b> Map to a list of elements wrapped with another element
- * </p>
- * <pre>
- *
- * // Mapped code fragment
- * public class Foo {
- * &#64;XmlElementWrapper(name="bar")
- * &#64;XmlElements(
- * &#64;XmlElement(name="A", type=Integer.class),
- * &#64;XmlElement(name="B", type=Float.class)
- * }
- * public List items;
- * }
- *
- * &lt;!-- XML Schema fragment -->
- * &lt;xs:complexType name="Foo">
- * &lt;xs:sequence>
- * &lt;xs:element name="bar">
- * &lt;xs:complexType>
- * &lt;xs:choice minOccurs="0" maxOccurs="unbounded">
- * &lt;xs:element name="A" type="xs:int"/>
- * &lt;xs:element name="B" type="xs:float"/>
- * &lt;/xs:choice>
- * &lt;/xs:complexType>
- * &lt;/xs:element>
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- * <p><b>Example 3:</b> Change element name based on type using an adapter.
- * </p>
- * <pre>
- * class Foo {
- * &#64;XmlJavaTypeAdapter(QtoPAdapter.class)
- * &#64;XmlElements({
- * &#64;XmlElement(name="A",type=PX.class),
- * &#64;XmlElement(name="B",type=PY.class)
- * })
- * Q bar;
- * }
- *
- * &#64;XmlType abstract class P {...}
- * &#64;XmlType(name="PX") class PX extends P {...}
- * &#64;XmlType(name="PY") class PY extends P {...}
- *
- * &lt;!-- XML Schema fragment -->
- * &lt;xs:complexType name="Foo">
- * &lt;xs:sequence>
- * &lt;xs:element name="bar">
- * &lt;xs:complexType>
- * &lt;xs:choice minOccurs="0" maxOccurs="unbounded">
- * &lt;xs:element name="A" type="PX"/>
- * &lt;xs:element name="B" type="PY"/>
- * &lt;/xs:choice>
- * &lt;/xs:complexType>
- * &lt;/xs:element>
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
- * @see XmlElement
- * @see XmlElementRef
- * @see XmlElementRefs
- * @see XmlJavaTypeAdapter
- * @since JAXB2.0
- */
-@Retention(RUNTIME) @Target({FIELD,METHOD})
-public @interface XmlElements {
- /**
- * Collection of @{@link XmlElement} annotations
- */
- XmlElement[] value();
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnum.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnum.java
deleted file mode 100644
index 544a21e1..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnum.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import static java.lang.annotation.ElementType.TYPE;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * <p>
- * Maps an enum type {@link Enum} to XML representation.
- *
- * <p>This annotation, together with {@link XmlEnumValue} provides a
- * mapping of enum type to XML representation.
- *
- * <p> <b>Usage</b> </p>
- * <p>
- * The <tt>@XmlEnum</tt> annotation can be used with the
- * following program elements:
- * <ul>
- * <li>enum type</li>
- * </ul>
- *
- * <p> The usage is subject to the following constraints:
- * <ul>
- * <li> This annotation can be used the following other annotations:
- * {@link XmlType},
- * {@link XmlRootElement} </li>
- * </ul>
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information </p>
- *
- * <p>An enum type is mapped to a schema simple type with enumeration
- * facets. The schema type is derived from the Java type to which
- * <tt>@XmlEnum.value()</tt>. Each enum constant <tt>@XmlEnumValue</tt>
- * must have a valid lexical representation for the type
- * <tt>@XmlEnum.value()</tt> .
- *
- * <p><b>Examples:</b> See examples in {@link XmlEnumValue}
- *
- * @since JAXB2.0
- */
-
-@Retention(RUNTIME) @Target({TYPE})
-public @interface XmlEnum {
- /**
- * Java type that is mapped to a XML simple type.
- *
- */
- Class<?> value() default String.class;
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnumValue.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnumValue.java
deleted file mode 100644
index ea656abd..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlEnumValue.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.FIELD;
-
-/**
- * Maps an enum constant in {@link Enum} type to XML representation.
- *
- * <p> <b>Usage</b> </p>
- *
- * <p> The <tt>@XmlEnumValue</tt> annotation can be used with the
- * following program elements:
- * <ul>
- * <li>enum constant</li>
- * </ul>
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * <p>This annotation, together with {@link XmlEnum} provides a
- * mapping of enum type to XML representation.
- *
- * <p>An enum type is mapped to a schema simple type with enumeration
- * facets. The schema type is derived from the Java type specified in
- * <tt>@XmlEnum.value()</tt>. Each enum constant <tt>@XmlEnumValue</tt>
- * must have a valid lexical representation for the type
- * <tt>@XmlEnum.value()</tt>
- *
- * <p> In the absence of this annotation, {@link Enum#name()} is used
- * as the XML representation.
- *
- * <p> <b>Example 1: </b>Map enum constant name -> enumeration facet</p>
- * <pre>
- * //Example: Code fragment
- * &#64;XmlEnum(String.class)
- * public enum Card { CLUBS, DIAMONDS, HEARTS, SPADES }
- *
- * &lt;!-- Example: XML Schema fragment -->
- * &lt;xs:simpleType name="Card">
- * &lt;xs:restriction base="xs:string"/>
- * &lt;xs:enumeration value="CLUBS"/>
- * &lt;xs:enumeration value="DIAMONDS"/>
- * &lt;xs:enumeration value="HEARTS"/>
- * &lt;xs:enumeration value="SPADES"/>
- * &lt;/xs:simpleType>
- * </pre>
- *
- * <p><b>Example 2: </b>Map enum constant name(value) -> enumeration facet </p>
- * <pre>
- * //Example: code fragment
- * &#64;XmlType
- * &#64;XmlEnum(Integer.class)
- * public enum Coin {
- * &#64;XmlEnumValue("1") PENNY(1),
- * &#64;XmlEnumValue("5") NICKEL(5),
- * &#64;XmlEnumValue("10") DIME(10),
- * &#64;XmlEnumValue("25") QUARTER(25) }
- *
- * &lt;!-- Example: XML Schema fragment -->
- * &lt;xs:simpleType name="Coin">
- * &lt;xs:restriction base="xs:int">
- * &lt;xs:enumeration value="1"/>
- * &lt;xs:enumeration value="5"/>
- * &lt;xs:enumeration value="10"/>
- * &lt;xs:enumeration value="25"/>
- * &lt;/xs:restriction>
- * &lt;/xs:simpleType>
- * </pre>
- *
- * <p><b>Example 3: </b>Map enum constant name -> enumeration facet </p>
- *
- * <pre>
- * //Code fragment
- * &#64;XmlType
- * &#64;XmlEnum(Integer.class)
- * public enum Code {
- * &#64;XmlEnumValue("1") ONE,
- * &#64;XmlEnumValue("2") TWO;
- * }
- *
- * &lt;!-- Example: XML Schema fragment -->
- * &lt;xs:simpleType name="Code">
- * &lt;xs:restriction base="xs:int">
- * &lt;xs:enumeration value="1"/>
- * &lt;xs:enumeration value="2"/>
- * &lt;/xs:restriction>
- * &lt;/xs:simpleType>
- * </pre>
- *
- * @since JAXB 2.0
- */
-@Retention(RUNTIME)
-@Target({FIELD})
-public @interface XmlEnumValue {
- String value();
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlID.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlID.java
deleted file mode 100644
index 13ce41d5..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlID.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * <p>
- * Maps a JavaBean property to XML ID.
- *
- * <p>
- * To preserve referential integrity of an object graph across XML
- * serialization followed by a XML deserialization, requires an object
- * reference to be marshalled by reference or containment
- * appropriately. Annotations <tt>&#64;XmlID</tt> and <tt>&#64;XmlIDREF</tt>
- * together allow a customized mapping of a JavaBean property's
- * type by containment or reference.
- *
- * <p><b>Usage</b> </p>
- * The <tt>&#64;XmlID</tt> annotation can be used with the following
- * program elements:
- * <ul>
- * <li> a JavaBean property </li>
- * <li> non static, non transient field </li>
- * </ul>
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * The usage is subject to the following constraints:
- * <ul>
- * <li> At most one field or property in a class can be annotated
- * with <tt>&#64;XmlID</tt>. </li>
- * <li> The JavaBean property's type must be <tt>java.lang.String</tt>.</li>
- * <li> The only other mapping annotations that can be used
- * with <tt>&#64;XmlID</tt>
- * are:<tt>&#64;XmlElement</tt> and <tt>&#64;XmlAttribute</tt>.</li>
- * </ul>
- *
- * <p><b>Example</b>: Map a JavaBean property's type to <tt>xs:ID</tt></p>
- * <pre>
- * // Example: code fragment
- * public class Customer {
- * &#64;XmlAttribute
- * &#64;XmlID
- * public String getCustomerID();
- * public void setCustomerID(String id);
- * .... other properties not shown
- * }
- *
- * &lt;!-- Example: XML Schema fragment -->
- * &lt;xs:complexType name="Customer">
- * &lt;xs:complexContent>
- * &lt;xs:sequence>
- * ....
- * &lt;/xs:sequence>
- * &lt;xs:attribute name="customerID" type="xs:ID"/>
- * &lt;/xs:complexContent>
- * &lt;/xs:complexType>
- * </pre>
- *
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @see XmlIDREF
- * @since JAXB2.0
- */
-
-@Retention(RUNTIME) @Target({FIELD, METHOD})
-public @interface XmlID { }
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlIDREF.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlIDREF.java
deleted file mode 100644
index ef9e2c6b..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlIDREF.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * <p>
- * Maps a JavaBean property to XML IDREF.
- *
- * <p>
- * To preserve referential integrity of an object graph across XML
- * serialization followed by a XML deserialization, requires an object
- * reference to be marshalled by reference or containment
- * appropriately. Annotations <tt>&#64;XmlID</tt> and <tt>&#64;XmlIDREF</tt>
- * together allow a customized mapping of a JavaBean property's
- * type by containment or reference.
- *
- * <p><b>Usage</b> </p>
- * The <tt>&#64;XmlIDREF</tt> annotation can be used with the following
- * program elements:
- * <ul>
- * <li> a JavaBean property </li>
- * <li> non static, non transient field </li>
- * </ul>
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * <p> The usage is subject to the following constraints:
- * <ul>
- *
- * <li> If the type of the field or property is a collection type,
- * then the collection item type must contain a property or
- * field annotated with <tt>&#64;XmlID</tt>. </li>
- * <li> If the field or property is single valued, then the type of
- * the property or field must contain a property or field
- * annotated with <tt>&#64;XmlID</tt>.
- * <p>Note: If the collection item type or the type of the
- * property (for non collection type) is java.lang.Object, then
- * the instance must contain a property/field annotated with
- * <tt>&#64;XmlID</tt> attribute.
- * </li>
- * <li> This annotation can be used with the following annotations:
- * {@link XmlElement}, {@link XmlAttribute}, {@link XmlList},
- * and {@link XmlElements}.</li>
- *
- * </ul>
- * <p><b>Example:</b> Map a JavaBean property to <tt>xs:IDREF</tt>
- * (i.e. by reference rather than by containment)</p>
- * <pre>
- *
- * //EXAMPLE: Code fragment
- * public class Shipping {
- * &#64;XmlIDREF public Customer getCustomer();
- * public void setCustomer(Customer customer);
- * ....
- * }
- *
- * &lt;!-- Example: XML Schema fragment -->
- * &lt;xs:complexType name="Shipping">
- * &lt;xs:complexContent>
- * &lt;xs:sequence>
- * &lt;xs:element name="customer" type="xs:IDREF"/>
- * ....
- * &lt;/xs:sequence>
- * &lt;/xs:complexContent>
- * &lt;/xs:complexType>
- *
- * </pre>
- *
- *
- * <p><b>Example 2: </b> The following is a complete example of
- * containment versus reference.
- *
- * <pre>
- * // By default, Customer maps to complex type <tt>xs:Customer</tt>
- * public class Customer {
- *
- * // map JavaBean property type to <tt>xs:ID</tt>
- * &#64;XmlID public String getCustomerID();
- * public void setCustomerID(String id);
- *
- * // .... other properties not shown
- * }
- *
- *
- * // By default, Invoice maps to a complex type <tt>xs:Invoice</tt>
- * public class Invoice {
- *
- * // map by reference
- * &#64;XmlIDREF public Customer getCustomer();
- * public void setCustomer(Customer customer);
- *
- * // .... other properties not shown here
- * }
- *
- * // By default, Shipping maps to complex type <tt>xs:Shipping</tt>
- * public class Shipping {
- *
- * // map by reference
- * &#64;XmlIDREF public Customer getCustomer();
- * public void setCustomer(Customer customer);
- * }
- *
- * // at least one class must reference Customer by containment;
- * // Customer instances won't be marshalled.
- * &#64;XmlElement(name="CustomerData")
- * public class CustomerData {
- * // map reference to Customer by containment by default.
- * public Customer getCustomer();
- *
- * // maps reference to Shipping by containment by default.
- * public Shipping getShipping();
- *
- * // maps reference to Invoice by containment by default.
- * public Invoice getInvoice();
- * }
- *
- * &lt;!-- XML Schema mapping for above code frament -->
- *
- * &lt;xs:complexType name="Invoice">
- * &lt;xs:complexContent>
- * &lt;xs:sequence>
- * &lt;xs:element name="customer" type="xs:IDREF"/>
- * ....
- * &lt;/xs:sequence>
- * &lt;/xs:complexContent>
- * &lt;/xs:complexType>
- *
- * &lt;xs:complexType name="Shipping">
- * &lt;xs:complexContent>
- * &lt;xs:sequence>
- * &lt;xs:element name="customer" type="xs:IDREF"/>
- * ....
- * &lt;/xs:sequence>
- * &lt;/xs:complexContent>
- * &lt;/xs:complexType>
- *
- * &lt;xs:complexType name="Customer">
- * &lt;xs:complexContent>
- * &lt;xs:sequence>
- * ....
- * &lt;/xs:sequence>
- * &lt;xs:attribute name="CustomerID" type="xs:ID"/>
- * &lt;/xs:complexContent>
- * &lt;/xs:complexType>
- *
- * &lt;xs:complexType name="CustomerData">
- * &lt;xs:complexContent>
- * &lt;xs:sequence>
- * &lt;xs:element name="customer" type="xs:Customer"/>
- * &lt;xs:element name="shipping" type="xs:Shipping"/>
- * &lt;xs:element name="invoice" type="xs:Invoice"/>
- * &lt;/xs:sequence>
- * &lt;/xs:complexContent>
- * &lt;/xs:complexType>
- *
- * &lt;xs:element name"customerData" type="xs:CustomerData"/>
- *
- * &lt;!-- Instance document conforming to the above XML Schema -->
- * &lt;customerData>
- * &lt;customer customerID="Alice">
- * ....
- * &lt;/customer>
- *
- * &lt;shipping customer="Alice">
- * ....
- * &lt;/shipping>
- *
- * &lt;invoice customer="Alice">
- * ....
- * &lt;/invoice>
- * &lt;/customerData>
- *
- * </pre>
- *
- * <p><b>Example 3: </b> Mapping List to repeating element of type IDREF
- * <pre>
- * // Code fragment
- * public class Shipping {
- * &#64;XmlIDREF
- * &#64;XmlElement(name="Alice")
- * public List customers;
- * }
- *
- * &lt;!-- XML schema fragment -->
- * &lt;xs:complexType name="Shipping">
- * &lt;xs:sequence>
- * &lt;xs:choice minOccurs="0" maxOccurs="unbounded">
- * &lt;xs:element name="Alice" type="xs:IDREF"/>
- * &lt;/xs:choice>
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- * <p><b>Example 4: </b> Mapping a List to a list of elements of type IDREF.
- * <pre>
- * //Code fragment
- * public class Shipping {
- * &#64;XmlIDREF
- * &#64;XmlElements(
- * &#64;XmlElement(name="Alice", type="Customer.class")
- * &#64;XmlElement(name="John", type="InternationalCustomer.class")
- * public List customers;
- * }
- *
- * &lt;!-- XML Schema fragment -->
- * &lt;xs:complexType name="Shipping">
- * &lt;xs:sequence>
- * &lt;xs:choice minOccurs="0" maxOccurs="unbounded">
- * &lt;xs:element name="Alice" type="xs:IDREF"/>
- * &lt;xs:element name="John" type="xs:IDREF"/>
- * &lt;/xs:choice>
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @see XmlID
- * @since JAXB2.0
- */
-
-@Retention(RUNTIME) @Target({FIELD, METHOD})
-public @interface XmlIDREF {}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlInlineBinaryData.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlInlineBinaryData.java
deleted file mode 100644
index 9390b0e3..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlInlineBinaryData.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-
-import javax.xml.transform.Source;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.activation.DataHandler;
-
-/**
- * Disable consideration of XOP encoding for datatypes that are bound to
- * base64-encoded binary data in XML.
- *
- * <p>
- * When XOP encoding is enabled as described in {@link AttachmentMarshaller#isXOPPackage()}, this annotation disables datatypes such as {@link java.awt.Image} or {@link Source} or <tt>byte[]</tt> that are bound to base64-encoded binary from being considered for
- * XOP encoding. If a JAXB property is annotated with this annotation or if
- * the JAXB property's base type is annotated with this annotation,
- * neither
- * {@link AttachmentMarshaller#addMtomAttachment(DataHandler, String, String)}
- * nor
- * {@link AttachmentMarshaller#addMtomAttachment(byte[], int, int, String, String, String)} is
- * ever called for the property. The binary data will always be inlined.
- *
- * @author Joseph Fialli
- * @since JAXB2.0
- */
-@Retention(RUNTIME)
-@Target({FIELD,METHOD,TYPE})
-public @interface XmlInlineBinaryData {
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlList.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlList.java
deleted file mode 100644
index ef11b5b1..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlList.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-
-/**
- * Used to map a property to a list simple type.
- *
- * <p><b>Usage</b> </p>
- * <p>
- * The <tt>@XmlList</tt> annotation can be used with the
- * following program elements:
- * <ul>
- * <li> JavaBean property </li>
- * <li> field </li>
- * </ul>
- *
- * <p>
- * When a collection property is annotated just with @XmlElement,
- * each item in the collection will be wrapped by an element.
- * For example,
- *
- * <pre>
- * &#64;XmlRootElement
- * class Foo {
- * &#64;XmlElement
- * List&lt;String> data;
- * }
- * </pre>
- *
- * would produce XML like this:
- *
- * <pre>
- * &lt;foo>
- * &lt;data>abc</data>
- * &lt;data>def</data>
- * &lt;/foo>
- * </pre>
- *
- * &#64;XmlList annotation, on the other hand, allows multiple values to be
- * represented as whitespace-separated tokens in a single element. For example,
- *
- * <pre>
- * &#64;XmlRootElement
- * class Foo {
- * &#64;XmlElement
- * &#64;XmlList
- * List&lt;String> data;
- * }
- * </pre>
- *
- * the above code will produce XML like this:
- *
- * <pre>
- * &lt;foo>
- * &lt;data>abc def</data>
- * &lt;/foo>
- * </pre>
- *
- * <p>This annotation can be used with the following annotations:
- * {@link XmlElement},
- * {@link XmlAttribute},
- * {@link XmlValue},
- * {@link XmlIDREF}.
- * <ul>
- * <li> The use of <tt>@XmlList</tt> with {@link XmlValue} while
- * allowed, is redundant since {@link XmlList} maps a
- * collection type to a simple schema type that derives by
- * list just as {@link XmlValue} would. </li>
- *
- * <li> The use of <tt>@XmlList</tt> with {@link XmlAttribute} while
- * allowed, is redundant since {@link XmlList} maps a
- * collection type to a simple schema type that derives by
- * list just as {@link XmlAttribute} would. </li>
- * </ul>
- *
- * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
- * @since JAXB2.0
- */
-@Retention(RUNTIME) @Target({FIELD,METHOD,PARAMETER})
-public @interface XmlList {
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMimeType.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMimeType.java
deleted file mode 100644
index 09506aae..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMimeType.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-
-import javax.xml.transform.Source;
-
-/**
- * Associates the MIME type that controls the XML representation of the property.
- *
- * <p>
- * This annotation is used in conjunction with datatypes such as
- * {@link java.awt.Image} or {@link Source} that are bound to base64-encoded binary in XML.
- *
- * <p>
- * If a property that has this annotation has a sibling property bound to
- * the xmime:contentType attribute, and if in the instance the property has a value,
- * the value of the attribute takes precedence and that will control the marshalling.
- *
- * @author Kohsuke Kawaguchi
- * @since JAXB2.0
- */
-@Retention(RUNTIME)
-@Target({FIELD,METHOD,PARAMETER})
-public @interface XmlMimeType {
- /**
- * The textual representation of the MIME type,
- * such as "image/jpeg" "image/*", "text/xml; charset=iso-8859-1" and so on.
- */
- String value();
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMixed.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMixed.java
deleted file mode 100644
index 7b0462e6..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlMixed.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-
-import org.w3c.dom.Element;
-import javax.xml.bind.JAXBElement;
-
-/**
- * <p>
- * Annotate a JavaBean multi-valued property to support mixed content.
- *
- * <p>
- * The usage is subject to the following constraints:
- * <ul>
- * <li> can be used with &#64;XmlElementRef, &#64;XmlElementRefs or &#64;XmlAnyElement</li>
- * </ul>
- * <p>
- * The following can be inserted into &#64;XmlMixed annotated multi-valued property
- * <ul>
- * <li>XML text information items are added as values of java.lang.String.</li>
- * <li>Children element information items are added as instances of
- * {@link JAXBElement} or instances with a class that is annotated with
- * &#64;XmlRootElement.</li>
- * <li>Unknown content that is not be bound to a JAXB mapped class is inserted
- * as {@link Element}. (Assumes property annotated with &#64;XmlAnyElement)</li>
- * </ul>
- *
- * Below is an example of binding and creation of mixed content.
- * <pre>
- * &lt;!-- schema fragment having mixed content -->
- * &lt;xs:complexType name="letterBody" mixed="true">
- * &lt;xs:sequence>
- * &lt;xs:element name="name" type="xs:string"/>
- * &lt;xs:element name="quantity" type="xs:positiveInteger"/>
- * &lt;xs:element name="productName" type="xs:string"/>
- * &lt;!-- etc. -->
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * &lt;xs:element name="letterBody" type="letterBody"/>
- *
- * // Schema-derived Java code:
- * // (Only annotations relevant to mixed content are shown below,
- * // others are ommitted.)
- * import java.math.BigInteger;
- * public class ObjectFactory {
- * // element instance factories
- * JAXBElement&lt;LetterBody> createLetterBody(LetterBody value);
- * JAXBElement&lt;String> createLetterBodyName(String value);
- * JAXBElement&lt;BigInteger> createLetterBodyQuantity(BigInteger value);
- * JAXBElement&lt;String> createLetterBodyProductName(String value);
- * // type instance factory
- * LetterBody> createLetterBody();
- * }
- * </pre>
- * <pre>
- * public class LetterBody {
- * // Mixed content can contain instances of Element classes
- * // Name, Quantity and ProductName. Text data is represented as
- * // java.util.String for text.
- * &#64;XmlMixed
- * &#64;XmlElementRefs({
- * &#64;XmlElementRef(name="productName", type=JAXBElement.class),
- * &#64;XmlElementRef(name="quantity", type=JAXBElement.class),
- * &#64;XmlElementRef(name="name", type=JAXBElement.class)})
- * List getContent(){...}
- * }
- * </pre>
- * The following is an XML instance document with mixed content
- * <pre>
- * &lt;letterBody>
- * Dear Mr.&lt;name>Robert Smith&lt;/name>
- * Your order of &lt;quantity>1&lt;/quantity> &lt;productName>Baby
- * Monitor&lt;/productName> shipped from our warehouse. ....
- * &lt;/letterBody>
- * </pre>
- * that can be constructed using following JAXB API calls.
- * <pre>
- * LetterBody lb = ObjectFactory.createLetterBody();
- * JAXBElement&lt;LetterBody> lbe = ObjectFactory.createLetterBody(lb);
- * List gcl = lb.getContent(); //add mixed content to general content property.
- * gcl.add("Dear Mr."); // add text information item as a String.
- *
- * // add child element information item
- * gcl.add(ObjectFactory.createLetterBodyName("Robert Smith"));
- * gcl.add("Your order of "); // add text information item as a String
- *
- * // add children element information items
- * gcl.add(ObjectFactory.
- * createLetterBodyQuantity(new BigInteger("1")));
- * gcl.add(ObjectFactory.createLetterBodyProductName("Baby Monitor"));
- * gcl.add("shipped from our warehouse"); // add text information item
- * </pre>
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- * @author Kohsuke Kawaguchi
- * @since JAXB2.0
- */
-@Retention(RUNTIME)
-@Target({FIELD,METHOD})
-public @interface XmlMixed {
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNs.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNs.java
deleted file mode 100644
index dc92cc55..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNs.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * <p>
- * Associates a namespace prefix with a XML namespace URI.
- *
- * <p><b>Usage</b></p>
- * <p><tt>@XmlNs</tt> annotation is intended for use from other
- * program annotations.
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * <p><b>Example:</b>See <tt>XmlSchema</tt> annotation type for an example.
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
- */
-
-@Retention(RUNTIME) @Target({})
-public @interface XmlNs {
- /**
- * Namespace prefix
- */
- String prefix();
-
- /**
- * Namespace URI
- */
- String namespaceURI();
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNsForm.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNsForm.java
deleted file mode 100644
index 68670a9c..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlNsForm.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-/**
- * Enumeration of XML Schema namespace qualifications.
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * <p><b>Usage</b>
- * <p>
- * The namespace qualification values are used in the annotations
- * defined in this packge. The enumeration values are mapped as follows:
- *
- * <p>
- * <table border="1" cellpadding="4" cellspacing="3">
- * <tbody>
- * <tr>
- * <td><b>Enum Value</b></td>
- * <td><b>XML Schema Value</b></td>
- * </tr>
- *
- * <tr valign="top">
- * <td>UNQUALIFIED</td>
- * <td>unqualified</td>
- * </tr>
- * <tr valign="top">
- * <td>QUALIFIED</td>
- * <td>qualified</td>
- * </tr>
- * <tr valign="top">
- * <td>UNSET</td>
- * <td>namespace qualification attribute is absent from the
- * XML Schema fragment</td>
- * </tr>
- * </tbody>
- * </table>
- *
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
- */
-public enum XmlNsForm {UNQUALIFIED, QUALIFIED, UNSET}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRegistry.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRegistry.java
deleted file mode 100644
index 1218061c..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRegistry.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * Marks a class that has {@link XmlElementDecl}s.
- *
- * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
- * @since JAXB 2.0
- * @see XmlElementDecl
- */
-@Retention(RUNTIME)
-@Target({TYPE})
-public @interface XmlRegistry {
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRootElement.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRootElement.java
deleted file mode 100644
index 4216d4a8..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlRootElement.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.TYPE;
-
-/**
- * Maps a class or an enum type to an XML element.
- *
- * <p> <b>Usage</b> </p>
- * <p>
- * The &#64;XmlRootElement annotation can be used with the following program
- * elements:
- * <ul>
- * <li> a top level class </li>
- * <li> an enum type </li>
- * </ul>
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * <p>
- * When a top level class or an enum type is annotated with the
- * &#64;XmlRootElement annotation, then its value is represented
- * as XML element in an XML document.
- *
- * <p> This annotation can be used with the following annotations:
- * {@link XmlType}, {@link XmlEnum}, {@link XmlAccessorType},
- * {@link XmlAccessorOrder}.
- * <p>
-
- * <p>
- * <b>Example 1: </b> Associate an element with XML Schema type
- * <pre>
- * // Example: Code fragment
- * &#64;XmlRootElement
- * class Point {
- * int x;
- * int y;
- * Point(int _x,int _y) {x=_x;y=_y;}
- * }
- * </pre>
- *
- * <pre>
- * //Example: Code fragment corresponding to XML output
- * marshal( new Point(3,5), System.out);
- * </pre>
- *
- * <pre>
- * &lt;!-- Example: XML output -->
- * &lt;point>
- * &lt;x> 3 </x>
- * &lt;y> 5 </y>
- * &lt;/point>
- * </pre>
- *
- * The annotation causes an global element declaration to be produced
- * in the schema. The global element declaration is associated with
- * the XML schema type to which the class is mapped.
- *
- * <pre>
- * &lt;!-- Example: XML schema definition -->
- * &lt;xs:element name="point" type="point"/>
- * &lt;xs:complexType name="point">
- * &lt;xs:sequence>
- * &lt;xs:element name="x" type="xs:int"/>
- * &lt;xs:element name="y" type="xs:int"/>
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- * <p>
- *
- * <b>Example 2: Orthogonality to type inheritance </b>
- *
- * <p>
- * An element declaration annotated on a type is not inherited by its
- * derived types. The following example shows this.
- * <pre>
- * // Example: Code fragment
- * &#64;XmlRootElement
- * class Point3D extends Point {
- * int z;
- * Point3D(int _x,int _y,int _z) {super(_x,_y);z=_z;}
- * }
- *
- * //Example: Code fragment corresponding to XML output *
- * marshal( new Point3D(3,5,0), System.out );
- *
- * &lt;!-- Example: XML output -->
- * &lt;!-- The element name is point3D not point -->
- * &lt;point3D>
- * &lt;x>3&lt;/x>
- * &lt;y>5&lt;/y>
- * &lt;z>0&lt;/z>
- * &lt;/point3D>
- *
- * &lt;!-- Example: XML schema definition -->
- * &lt;xs:element name="point3D" type="point3D"/>
- * &lt;xs:complexType name="point3D">
- * &lt;xs:complexContent>
- * &lt;xs:extension base="point">
- * &lt;xs:sequence>
- * &lt;xs:element name="z" type="xs:int"/>
- * &lt;/xs:sequence>
- * &lt;/xs:extension>
- * &lt;/xs:complexContent>
- * &lt;/xs:complexType>
- * </pre>
- *
- * <b>Example 3: </b> Associate a global element with XML Schema type
- * to which the class is mapped.
- * <pre>
- * //Example: Code fragment
- * &#64;XmlRootElement(name="PriceElement")
- * public class USPrice {
- * &#64;XmlElement
- * public java.math.BigDecimal price;
- * }
- *
- * &lt;!-- Example: XML schema definition -->
- * &lt;xs:element name="PriceElement" type="USPrice"/>
- * &lt;xs:complexType name="USPrice">
- * &lt;xs:sequence>
- * &lt;xs:element name="price" type="xs:decimal"/>
- * &lt;/sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
- */
-@Retention(RUNTIME)
-@Target({TYPE})
-public @interface XmlRootElement {
- /**
- * namespace name of the XML element.
- * <p>
- * If the value is "##default", then the XML namespace name is derived
- * from the package of the class ( {@link XmlSchema} ). If the
- * package is unnamed, then the XML namespace is the default empty
- * namespace.
- */
- String namespace() default "##default";
-
- /**
- * local name of the XML element.
- * <p>
- * If the value is "##default", then the name is derived from the
- * class name.
- *
- */
- String name() default "##default";
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchema.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchema.java
deleted file mode 100644
index 80756f38..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchema.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * <p> Maps a package name to a XML namespace. </p>
- *
- * <h3>Usage</h3>
- * <p>
- * The XmlSchema annotation can be used with the following program
- * elements:
- * <ul>
- * <li>package</li>
- * </ul>
- *
- * <p>
- * This is a package level annotation and follows the recommendations
- * and restrictions contained in JSR 175, section III, "Annotations".
- * Thus the usage is subject to the following constraints and
- * recommendations.
- * <ul>
- * <li> There can only be one package declaration as noted in JSR
- * 175, section III, "Annotations". </li>
- * <li> JSR 175 recommends package-info.java for package level
- * annotations. JAXB Providers that follow this recommendation
- * will allow the package level annotations to be defined in
- * package-info.java.
- * </ul>
- * <p>
- *
- * <p><b>Example 1:</b> Customize name of XML namespace to which
- * package is mapped.</p>
- *
- * <pre>
- * &#64;javax.xml.bind.annotation.XmlSchema (
- * namespace = "http://www.example.com/MYPO1"
- * )
- *
- * &lt;!-- XML Schema fragment -->
- * &lt;schema
- * xmlns=...
- * xmlns:po=....
- * targetNamespace="http://www.example.com/MYPO1"
- * >
- * &lt;!-- prefixes generated by default are implementation
- * depedenent -->
- * </pre>
- *
- * <p><b>Example 2:</b> Customize namespace prefix, namespace URI
- * mapping</p>
- *
- * <pre>
- * // Package level annotation
- * &#64;javax.xml.bind.annotation.XmlSchema (
- * xmlns = {
- * &#64;javax.xml.bind.annotation.XmlNs(prefix = "po",
- * namespaceURI="http://www.example.com/myPO1"),
- *
- * &#64;javax.xml.bind.annotation.XmlNs(prefix="xs",
- * namespaceURI="http://www.w3.org/2001/XMLSchema")
- * )
- * )
- *
- * &lt;!-- XML Schema fragment -->
- * &lt;schema
- * xmlns:xs="http://www.w3.org/2001/XMLSchema"
- * xmlns:po="http://www.example.com/PO1"
- * targetNamespace="http://www.example.com/PO1">
- *
- * </pre>
- *
- * <p><b>Example 3:</b> Customize elementFormDefault</p>
- * <pre>
- * &#64;javax.xml.bind.annotation.XmlSchema (
- * elementFormDefault=XmlNsForm.UNQUALIFIED
- * ...
- * )
- *
- * &lt;!-- XML Schema fragment -->
- * &lt;schema
- * xmlns="http://www.w3.org/2001/XMLSchema"
- * xmlns:po="http://www.example.com/PO1"
- * elementFormDefault="unqualified">
- *
- * </pre>
-
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
- */
-
-@Retention(RUNTIME) @Target(PACKAGE)
-public @interface XmlSchema {
-
- /**
- * Customize the namespace URI, prefix associations. By default,
- * the namespace prefixes for a XML namespace are generated by a
- * JAXB Provider in an implementation dependent way.
- */
- XmlNs[] xmlns() default {};
-
- /**
- * Name of the XML namespace.
- */
- String namespace() default "";
-
- /**
- * Namespace qualification for elements. By default, element
- * default attribute will be absent from the XML Schema fragment.
- */
- XmlNsForm elementFormDefault() default XmlNsForm.UNSET;
-
- /**
- * Namespace qualification for attributes. By default,
- * attributesFormDefault will be absent from the XML Schema fragment.
- */
- XmlNsForm attributeFormDefault() default XmlNsForm.UNSET;
-
- /**
- * Indicates that this namespace (specified by {@link #namespace()})
- * has a schema already available exeternally, available at this location.
- *
- * <p>
- * This instructs the JAXB schema generators to simply refer to
- * the pointed schema, as opposed to generating components into the schema.
- * This schema is assumed to match what would be otherwise produced
- * by the schema generator (same element names, same type names...)
- *
- * <p>
- * This feature is intended to be used when a set of the Java classes
- * is originally generated from an existing schema, hand-written to
- * match externally defined schema, or the generated schema is modified
- * manually.
- *
- * <p>
- * Value could be any absolute URI, like <tt>http://example.org/some.xsd</tt>.
- * It is also possible to specify the empty string, to indicate
- * that the schema is externally available but the location is
- * unspecified (and thus it's the responsibility of the reader of the generate
- * schema to locate it.) Finally, the default value of this property
- * <tt>"##generate"</tt> indicates that the schema generator is going
- * to generate components for this namespace (as it did in JAXB 2.0.)
- *
- * <p>
- * Multiple {@link XmlSchema} annotations on multiple packages are allowed
- * to govern the same {@link #namespace()}. In such case, all of them
- * must have the same {@link #location()} values.
- *
- *
- * <h3>Note to implementor</h3>
- * <p>
- * More precisely, the value must be either <tt>""</tt>, <tt>"##generate"</tt>, or
- * <a href="http://www.w3.org/TR/xmlschema-2/#anyURI">
- * a valid lexical representation of <tt>xs:anyURI</tt></a> that begins
- * with <tt>&lt;scheme>:</tt>.
- *
- * <p>
- * A schema generator is expected to generate a corresponding
- * <tt>&lt;xs:import namespace="..." schemaLocation="..."/></tt> (or
- * no <tt>schemaLocation</tt> attribute at all if the empty string is specified.)
- * However, the schema generator is allowed to use a different value in
- * the <tt>schemaLocation</tt> attribute (including not generating
- * such attribute), for example so that the user can specify a local
- * copy of the resource through the command line interface.
- *
- * @since JAXB2.1
- */
- String location() default NO_LOCATION;
-
- /**
- * The default value of the {@link #location()} attribute,
- * which indicates that the schema generator will generate
- * components in this namespace.
- */
- // the actual value is chosen because ## is not a valid
- // sequence in xs:anyURI.
- static final String NO_LOCATION = "##generate";
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaType.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaType.java
deleted file mode 100644
index 7484cc1c..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaType.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PACKAGE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * Maps a Java type to a simple schema built-in type.
- *
- * <p> <b>Usage</b> </p>
- * <p>
- * <tt>@XmlSchemaType</tt> annotation can be used with the following program
- * elements:
- * <ul>
- * <li> a JavaBean property </li>
- * <li> field </li>
- * <li> package</li>
- * </ul>
- *
- * <p> <tt>@XmlSchemaType</tt> annotation defined for Java type
- * applies to all references to the Java type from a property/field.
- * A <tt>@XmlSchemaType</tt> annotation specified on the
- * property/field overrides the <tt>@XmlSchemaType</tt> annotation
- * specified at the package level.
- *
- * <p> This annotation can be used with the following annotations:
- * {@link XmlElement}, {@link XmlAttribute}.
- * <p>
- * <b>Example 1: </b> Customize mapping of XMLGregorianCalendar on the
- * field.
- *
- * <pre>
- * //Example: Code fragment
- * public class USPrice {
- * &#64;XmlElement
- * &#64;XmlSchemaType(name="date")
- * public XMLGregorianCalendar date;
- * }
- *
- * &lt;!-- Example: Local XML Schema element -->
- * &lt;xs:complexType name="USPrice"/>
- * &lt;xs:sequence>
- * &lt;xs:element name="date" type="xs:date"/>
- * &lt;/sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- * <p> <b> Example 2: </b> Customize mapping of XMLGregorianCalendar at package
- * level </p>
- * <pre>
- * package foo;
- * &#64;javax.xml.bind.annotation.XmlSchemaType(
- * name="date", type=javax.xml.datatype.XMLGregorianCalendar.class)
- * }
- * </pre>
- *
- * @since JAXB2.0
- */
-
-@Retention(RUNTIME) @Target({FIELD,METHOD,PACKAGE})
-public @interface XmlSchemaType {
- String name();
- String namespace() default "http://www.w3.org/2001/XMLSchema";
- /**
- * If this annotation is used at the package level, then value of
- * the type() must be specified.
- */
-
- Class type() default DEFAULT.class;
-
- /**
- * Used in {@link XmlSchemaType#type()} to
- * signal that the type be inferred from the signature
- * of the property.
- */
-
- static final class DEFAULT {}
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaTypes.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaTypes.java
deleted file mode 100644
index d32a6218..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSchemaTypes.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.PACKAGE;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * <p>
- * A container for multiple @{@link XmlSchemaType} annotations.
- *
- * <p> Multiple annotations of the same type are not allowed on a program
- * element. This annotation therefore serves as a container annotation
- * for multiple &#64;XmlSchemaType annotations as follows:
- *
- * <pre>
- * &#64;XmlSchemaTypes({ @XmlSchemaType(...), @XmlSchemaType(...) })
- * </pre>
- * <p>The <tt>@XmlSchemaTypes</tt> annnotation can be used to
- * define {@link XmlSchemaType} for different types at the
- * package level.
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * @author <ul><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
- * @see XmlSchemaType
- * @since JAXB2.0
- */
-@Retention(RUNTIME) @Target({PACKAGE})
-public @interface XmlSchemaTypes {
- /**
- * Collection of @{@link XmlSchemaType} annotations
- */
- XmlSchemaType[] value();
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSeeAlso.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSeeAlso.java
deleted file mode 100644
index 41bf41e3..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlSeeAlso.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import javax.xml.bind.JAXBContext;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * Instructs JAXB to also bind other classes when binding this class.
- *
- * <p>
- * Java makes it impractical/impossible to list all sub-classes of
- * a given class. This often gets in a way of JAXB users, as it JAXB
- * cannot automatically list up the classes that need to be known
- * to {@link JAXBContext}.
- *
- * <p>
- * For example, with the following class definitions:
- *
- * <pre>
- * class Animal {}
- * class Dog extends Animal {}
- * class Cat extends Animal {}
- * </pre>
- *
- * <p>
- * The user would be required to create {@link JAXBContext} as
- * <tt>JAXBContext.newInstance(Dog.class,Cat.class)</tt>
- * (<tt>Animal</tt> will be automatically picked up since <tt>Dog</tt>
- * and <tt>Cat</tt> refers to it.)
- *
- * <p>
- * {@link XmlSeeAlso} annotation would allow you to write:
- * <pre>
- * &#64;XmlSeeAlso({Dog.class,Cat.class})
- * class Animal {}
- * class Dog extends Animal {}
- * class Cat extends Animal {}
- * </pre>
- *
- * <p>
- * This would allow you to do <tt>JAXBContext.newInstance(Animal.class)</tt>.
- * By the help of this annotation, JAXB implementations will be able to
- * correctly bind <tt>Dog</tt> and <tt>Cat</tt>.
- *
- * @author Kohsuke Kawaguchi
- * @since JAXB2.1
- */
-@Target({ElementType.TYPE})
-@Retention(RUNTIME)
-public @interface XmlSeeAlso {
- Class[] value();
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlTransient.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlTransient.java
deleted file mode 100644
index 730dea19..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlTransient.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * <p>
- * Prevents the mapping of a JavaBean property/type to XML representation.
- * <p>
- * The <tt>@XmlTransient</tt> annotation is useful for resolving name
- * collisions between a JavaBean property name and a field name or
- * preventing the mapping of a field/property. A name collision can
- * occur when the decapitalized JavaBean property name and a field
- * name are the same. If the JavaBean property refers to the field,
- * then the name collision can be resolved by preventing the
- * mapping of either the field or the JavaBean property using the
- * <tt>@XmlTransient</tt> annotation.
- *
- * <p>
- * When placed on a class, it indicates that the class shouldn't be mapped
- * to XML by itself. Properties on such class will be mapped to XML along
- * with its derived classes, as if the class is inlined.
- *
- * <p><b>Usage</b></p>
- * <p> The <tt>@XmlTransient</tt> annotation can be used with the following
- * program elements:
- * <ul>
- * <li> a JavaBean property </li>
- * <li> field </li>
- * <li> class </li>
- * </ul>
- *
- * <p><tt>@XmlTransient</tt>is mutually exclusive with all other
- * JAXB defined annotations. </p>
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * <p><b>Example:</b> Resolve name collision between JavaBean property and
- * field name </p>
- *
- * <pre>
- * // Example: Code fragment
- * public class USAddress {
- *
- * // The field name "name" collides with the property name
- * // obtained by bean decapitalization of getName() below
- * &#64;XmlTransient public String name;
- *
- * String getName() {..};
- * String setName() {..};
- * }
- *
- *
- * &lt;!-- Example: XML Schema fragment -->
- * &lt;xs:complexType name="USAddress">
- * &lt;xs:sequence>
- * &lt;xs:element name="name" type="xs:string"/>
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @since JAXB2.0
- */
-
-@Retention(RUNTIME) @Target({FIELD, METHOD, TYPE})
-public @interface XmlTransient {}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlType.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlType.java
deleted file mode 100644
index 3802f978..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlType.java
+++ /dev/null
@@ -1,452 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import static java.lang.annotation.ElementType.TYPE;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * <p>
- * Maps a class or an enum type to a XML Schema type.
- *
- * <p><b>Usage</b></p>
- * <p> The <tt>@XmlType</tt> annnotation can be used with the following program
- * elements:
- * <ul>
- * <li> a top level class </li>
- * <li> an enum type </li>
- * </ul>
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * <h3> Mapping a Class </h3>
- * <p>
- * A class maps to a XML Schema type. A class is a data container for
- * values represented by properties and fields. A schema type is a
- * data container for values represented by schema components within a
- * schema type's content model (e.g. model groups, attributes etc).
- * <p> To be mapped, a class must either have a public no-arg
- * constructor or a static no-arg factory method. The static factory
- * method can be specified in <tt>factoryMethod()</tt> and
- * <tt>factoryClass()</tt> annotation elements. The static factory
- * method or the no-arg constructor is used during unmarshalling to
- * create an instance of this class. If both are present, the static
- * factory method overrides the no-arg constructor.
- * <p>
- * A class maps to either a XML Schema complex type or a XML Schema simple
- * type. The XML Schema type is derived based on the
- * mapping of JavaBean properties and fields contained within the
- * class. The schema type to which the class is mapped can either be
- * named or anonymous. A class can be mapped to an anonymous schema
- * type by annotating the class with <tt>&#64XmlType(name="")</tt>.
- * <p>
- * Either a global element, local element or a local attribute can be
- * associated with an anonymous type as follows:
- * <ul>
- * <li><b>global element: </b> A global element of an anonymous
- * type can be derived by annotating the class with @{@link
- * XmlRootElement}. See Example 3 below. </li>
- *
- * <li><b>local element: </b> A JavaBean property that references
- * a class annotated with @XmlType(name="") and is mapped to the
- * element associated with the anonymous type. See Example 4
- * below.</li>
- *
- * <li><b>attribute: </b> A JavaBean property that references
- * a class annotated with @XmlType(name="") and is mapped to the
- * attribute associated with the anonymous type. See Example 5 below. </li>
- * </ul>
- * <b> Mapping to XML Schema Complex Type </b>
- * <ul>
- * <li>If class is annotated with <tt>@XmlType(name="") </tt>, it
- * is mapped to an anonymous type otherwise, the class name maps
- * to a complex type name. The <tt>XmlName()</tt> annotation element
- * can be used to customize the name.</li>
- *
- * <li> Properties and fields that are mapped to elements are mapped to a
- * content model within a complex type. The annotation element
- * <tt>propOrder()</tt> can be used to customize the content model to be
- * <tt>xs:all</tt> or <tt>xs:sequence</tt>. It is used for specifying
- * the order of XML elements in <tt>xs:sequence</tt>. </li>
- *
- * <li> Properties and fields can be mapped to attributes within the
- * complex type. </li>
- *
- * <li> The targetnamespace of the XML Schema type can be customized
- * using the annotation element <tt>namespace()</tt>. </li>
- * </ul>
- *
- * <p>
- * <b> Mapping class to XML Schema simple type </b>
- * <p>
- * A class can be mapped to a XML Schema simple type using the
- * <tt>@XmlValue</tt> annotation. For additional details and examples,
- * see @{@link XmlValue} annotation type.
- * <p>
- * The following table shows the mapping of the class to a XML Schema
- * complex type or simple type. The notational symbols used in the table are:
- * <ul>
- * <li> -> : represents a mapping </li>
- * <li> [x]+ : one or more occurances of x </li>
- * <li> [ <tt>@XmlValue</tt> property ]: JavaBean property annotated with
- * <tt>@XmlValue</tt></li>
- * <li> X : don't care
- * </ul>
- * <blockquote>
- * <table border="1" cellpadding="4" cellspacing="3">
- * <tbody>
- * <tr>
- * <td><b>Target</b></td>
- * <td><b>propOrder</b></td>
- * <td><b>ClassBody</b></td>
- * <td><b>ComplexType</b></td>
- * <td><b>SimpleType</b></td>
- * </tr>
- *
- * <tr valign="top">
- * <td>Class</td>
- * <td>{}</td>
- * <td>[property]+ -> elements</td>
- * <td>complexcontent<br>xs:all</td>
- * <td> </td>
- * </tr>
- *
- * <tr valign="top">
- * <td>Class</td>
- * <td>non empty</td>
- * <td>[property]+ -> elements</td>
- * <td>complexcontent<br>xs:sequence</td>
- * <td> </td>
- * </tr>
- *
- * <tr valign="top">
- * <td>Class</td>
- * <td>X</td>
- * <td>no property -> element</td>
- * <td>complexcontent<br>empty sequence</td>
- * <td> </td>
- * </tr>
- *
- * <tr valign="top">
- * <td>Class</td>
- * <td>X</td>
- * <td>1 [ <tt>@XmlValue</tt> property] && <br> [property]+
- * ->attributes</td>
- * <td>simplecontent</td>
- * <td> </td>
- * </tr>
- *
- * <tr valign="top">
- * <td>Class</td>
- * <td>X</td>
- * <td>1 [ <tt>@XmlValue</tt> property ]&& <br> no properties
- * -> attribute</td>
- * <td> </td>
- * <td>simpletype</td>
- * <td> </td>
- * </tr>
- * </tbody>
- * </table>
- * </blockquote>
- *
- * <h3> Mapping an enum type </h3>
- *
- * An enum type maps to a XML schema simple type with enumeration
- * facets. The following annotation elements are ignored since they
- * are not meaningful: <tt>propOrder()</tt> , <tt>factoryMethod()</tt> ,
- * <tt>factoryClass()</tt> .
- *
- * <h3> Usage with other annotations </h3>
- * <p> This annotation can be used with the following annotations:
- * {@link XmlRootElement}, {@link XmlAccessorOrder}, {@link XmlAccessorType},
- * {@link XmlEnum}. However, {@link
- * XmlAccessorOrder} and {@link XmlAccessorType} are ignored when this
- * annotation is used on an enum type.
- *
- * <p> <b> Example 1: </b> Map a class to a complex type with
- * xs:sequence with a customized ordering of JavaBean properties.
- * </p>
- *
- * <pre>
- * &#64;XmlType(propOrder={"street", "city" , "state", "zip", "name" })
- * public class USAddress {
- * String getName() {..};
- * void setName(String) {..};
- *
- * String getStreet() {..};
- * void setStreet(String) {..};
- *
- * String getCity() {..};
- * void setCity(String) {..};
- *
- * String getState() {..};
- * void setState(String) {..};
- *
- * java.math.BigDecimal getZip() {..};
- * void setZip(java.math.BigDecimal) {..};
- * }
- *
- * &lt;!-- XML Schema mapping for USAddress -->
- * &lt;xs:complexType name="USAddress">
- * &lt;xs:sequence>
- * &lt;xs:element name="street" type="xs:string"/>
- * &lt;xs:element name="city" type="xs:string"/>
- * &lt;xs:element name="state" type="xs:string"/>
- * &lt;xs:element name="zip" type="xs:decimal"/>
- * &lt;xs:element name="name" type="xs:string"/>
- * &lt;/xs:all>
- * &lt;/xs:complexType>
- * </pre>
- * <p> <b> Example 2: </b> Map a class to a complex type with
- * xs:all </p>
- * <pre>
- * &#64;XmlType(propOrder={})
- * public class USAddress { ...}
- *
- * &lt;!-- XML Schema mapping for USAddress -->
- * &lt;xs:complexType name="USAddress">
- * &lt;xs:all>
- * &lt;xs:element name="name" type="xs:string"/>
- * &lt;xs:element name="street" type="xs:string"/>
- * &lt;xs:element name="city" type="xs:string"/>
- * &lt;xs:element name="state" type="xs:string"/>
- * &lt;xs:element name="zip" type="xs:decimal"/>
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- *</pre>
- * <p> <b> Example 3: </b> Map a class to a global element with an
- * anonymous type.
- * </p>
- * <pre>
- * &#64;XmlRootElement
- * &#64;XmlType(name="")
- * public class USAddress { ...}
- *
- * &lt;!-- XML Schema mapping for USAddress -->
- * &lt;xs:element name="USAddress">
- * &lt;xs:complexType>
- * &lt;xs:sequence>
- * &lt;xs:element name="name" type="xs:string"/>
- * &lt;xs:element name="street" type="xs:string"/>
- * &lt;xs:element name="city" type="xs:string"/>
- * &lt;xs:element name="state" type="xs:string"/>
- * &lt;xs:element name="zip" type="xs:decimal"/>
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * &lt;/xs:element>
- * </pre>
- *
- * <p> <b> Example 4: </b> Map a property to a local element with
- * anonmyous type.
- * <pre>
- * //Example: Code fragment
- * public class Invoice {
- * USAddress addr;
- * ...
- * }
- *
- * &#64;XmlType(name="")
- * public class USAddress { ... }
- * }
- *
- * &lt;!-- XML Schema mapping for USAddress -->
- * &lt;xs:complexType name="Invoice">
- * &lt;xs:sequence>
- * &lt;xs:element name="addr">
- * &lt;xs:complexType>
- * &lt;xs:element name="name", type="xs:string"/>
- * &lt;xs:element name="city", type="xs:string"/>
- * &lt;xs:element name="city" type="xs:string"/>
- * &lt;xs:element name="state" type="xs:string"/>
- * &lt;xs:element name="zip" type="xs:decimal"/>
- * &lt;/xs:complexType>
- * ...
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- * <p> <b> Example 5: </b> Map a property to an attribute with
- * anonymous type.
- *
- * <pre>
- *
- * //Example: Code fragment
- * public class Item {
- * public String name;
- * &#64;XmlAttribute
- * public USPrice price;
- * }
- *
- * // map class to anonymous simple type.
- * &#64;XmlType(name="")
- * public class USPrice {
- * &#64;XmlValue
- * public java.math.BigDecimal price;
- * }
- *
- * &lt;!-- Example: XML Schema fragment -->
- * &lt;xs:complexType name="Item">
- * &lt;xs:sequence>
- * &lt;xs:element name="name" type="xs:string"/>
- * &lt;xs:attribute name="price">
- * &lt;xs:simpleType>
- * &lt;xs:restriction base="xs:decimal"/>
- * &lt;/xs:simpleType>
- * &lt;/xs:attribute>
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- * <p> <b> Example 6: </b> Define a factoryClass and factoryMethod
- *
- * <pre>
- * &#64;XmlType(name="USAddressType", factoryClass=USAddressFactory.class,
- * factoryMethod="getUSAddress")
- * public class USAddress {
- *
- * private String city;
- * private String name;
- * private String state;
- * private String street;
- * private int zip;
- *
- * public USAddress(String name, String street, String city,
- * String state, int zip) {
- * this.name = name;
- * this.street = street;
- * this.city = city;
- * this.state = state;
- * this.zip = zip;
- * }
- * }
- *
- * public class USAddressFactory {
- * public static USAddress getUSAddress(){
- * return new USAddress("Mark Baker", "23 Elm St",
- * "Dayton", "OH", 90952);
- * }
- *
- * </pre>
- *
- * <p> <b> Example 7: </b> Define factoryMethod and use the default factoryClass
- *
- * <pre>
- * &#64;XmlType(name="USAddressType", factoryMethod="getNewInstance")
- * public class USAddress {
- *
- * private String city;
- * private String name;
- * private String state;
- * private String street;
- * private int zip;
- *
- * private USAddress() {}
- *
- * public static USAddress getNewInstance(){
- * return new USAddress();
- * }
- * }
- * </pre>
- *
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @see XmlElement
- * @see XmlAttribute
- * @see XmlValue
- * @see XmlSchema
- * @since JAXB2.0
- */
-
-@Retention(RUNTIME) @Target({TYPE})
-public @interface XmlType {
- /**
- * Name of the XML Schema type which the class is mapped.
- */
- String name() default "##default" ;
-
- /**
- * Specifies the order for XML Schema elements when class is
- * mapped to a XML Schema complex type.
- *
- * <p> Refer to the table for how the propOrder affects the
- * mapping of class </p>
- *
- * <p> The propOrder is a list of names of JavaBean properties in
- * the class. Each name in the list is the name of a Java
- * identifier of the JavaBean property. The order in which
- * JavaBean properties are listed is the order of XML Schema
- * elements to which the JavaBean properties are mapped. </p>
- * <p> All of the JavaBean properties being mapped to XML Schema elements
- * must be listed.
- * <p> A JavaBean property or field listed in propOrder must not
- * be transient or annotated with <tt>@XmlTransient</tt>.
- * <p> The default ordering of JavaBean properties is determined
- * by @{@link XmlAccessorOrder}.
- */
- String[] propOrder() default {""};
-
- /**
- * Name of the target namespace of the XML Schema type. By
- * default, this is the target namespace to which the package
- * containing the class is mapped.
- */
- String namespace() default "##default" ;
-
- /**
- * Class containing a no-arg factory method for creating an
- * instance of this class. The default is this class.
- *
- * <p>If <tt>factoryClass</tt> is DEFAULT.class and
- * <tt>factoryMethod</tt> is "", then there is no static factory
- * method.
- *
- * <p>If <tt>factoryClass</tt> is DEFAULT.class and
- * <tt>factoryMethod</tt> is not "", then
- * <tt>factoryMethod</tt> is the name of a static factory method
- * in this class.
- *
- * <p>If <tt>factoryClass</tt> is not DEFAULT.class, then
- * <tt>factoryMethod</tt> must not be "" and must be the name of
- * a static factory method specified in <tt>factoryClass</tt>.
- */
- Class factoryClass() default DEFAULT.class;
-
- /**
- * Used in {@link XmlType#factoryClass()} to
- * signal that either factory mehod is not used or
- * that it's in the class with this {@link XmlType} itself.
- */
- static final class DEFAULT {}
-
- /**
- * Name of a no-arg factory method in the class specified in
- * <tt>factoryClass</tt> factoryClass().
- *
- */
- String factoryMethod() default "";
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlValue.java b/src/share/jaxws_classes/javax/xml/bind/annotation/XmlValue.java
deleted file mode 100644
index dc18c2fc..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/XmlValue.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * <p>
- * Enables mapping a class to a XML Schema complex type with a
- * simpleContent or a XML Schema simple type.
- * </p>
- *
- * <p>
- * <b> Usage: </b>
- * <p>
- * The <tt>@XmlValue</tt> annotation can be used with the following program
- * elements:
- * <ul>
- * <li> a JavaBean property.</li>
- * <li> non static, non transient field.</li>
- * </ul>
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * The usage is subject to the following usage constraints:
- * <ul>
- * <li>At most one field or property can be annotated with the
- * <tt>@XmlValue</tt> annotation. </li>
- *
- * <li><tt>@XmlValue</tt> can be used with the following
- * annotations: {@link XmlList}. However this is redundant since
- * {@link XmlList} maps a type to a simple schema type that derives by
- * list just as {@link XmlValue} would. </li>
- *
- * <li>If the type of the field or property is a collection type,
- * then the collection item type must map to a simple schema
- * type. </li>
- *
- * <li>If the type of the field or property is not a collection
- * type, then the type must map to a XML Schema simple type. </li>
- *
- * </ul>
- * </p>
- * <p>
- * If the annotated JavaBean property is the sole class member being
- * mapped to XML Schema construct, then the class is mapped to a
- * simple type.
- *
- * If there are additional JavaBean properties (other than the
- * JavaBean property annotated with <tt>@XmlValue</tt> annotation)
- * that are mapped to XML attributes, then the class is mapped to a
- * complex type with simpleContent.
- * </p>
- *
- * <p> <b> Example 1: </b> Map a class to XML Schema simpleType</p>
- *
- * <pre>
- *
- * // Example 1: Code fragment
- * public class USPrice {
- * &#64;XmlValue
- * public java.math.BigDecimal price;
- * }
- *
- * &lt;!-- Example 1: XML Schema fragment -->
- * &lt;xs:simpleType name="USPrice">
- * &lt;xs:restriction base="xs:decimal"/>
- * &lt;/xs:simpleType>
- *
- * </pre>
- *
- * <p><b> Example 2: </b> Map a class to XML Schema complexType with
- * with simpleContent.</p>
- *
- * <pre>
- *
- * // Example 2: Code fragment
- * public class InternationalPrice {
- * &#64;XmlValue
- * public java.math.BigDecimal price;
- *
- * &#64;XmlAttribute
- * public String currency;
- * }
- *
- * &lt;!-- Example 2: XML Schema fragment -->
- * &lt;xs:complexType name="InternationalPrice">
- * &lt;xs:simpleContent>
- * &lt;xs:extension base="xs:decimal">
- * &lt;xs:attribute name="currency" type="xs:string"/>
- * &lt;/xs:extension>
- * &lt;/xs:simpleContent>
- * &lt;/xs:complexType>
- *
- * </pre>
- * </p>
- *
- * @author Sekhar Vajjhala, Sun Microsystems, Inc.
- * @see XmlType
- * @since JAXB2.0
- */
-
-@Retention(RUNTIME) @Target({FIELD, METHOD})
-public @interface XmlValue {}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java b/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java
deleted file mode 100644
index b9c1b7d3..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/CollapsedStringAdapter.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation.adapters;
-
-
-
-/**
- * Built-in {@link XmlAdapter} to handle <tt>xs:token</tt> and its derived types.
- *
- * <p>
- * This adapter removes leading and trailing whitespaces, then truncate any
- * sequnce of tab, CR, LF, and SP by a single whitespace character ' '.
- *
- * @author Kohsuke Kawaguchi
- * @since JAXB 2.0
- */
-public class CollapsedStringAdapter extends XmlAdapter<String,String> {
- /**
- * Removes leading and trailing whitespaces of the string
- * given as the parameter, then truncate any
- * sequnce of tab, CR, LF, and SP by a single whitespace character ' '.
- */
- public String unmarshal(String text) {
- if(text==null) return null; // be defensive
-
- int len = text.length();
-
- // most of the texts are already in the collapsed form.
- // so look for the first whitespace in the hope that we will
- // never see it.
- int s=0;
- while(s<len) {
- if(isWhiteSpace(text.charAt(s)))
- break;
- s++;
- }
- if(s==len)
- // the input happens to be already collapsed.
- return text;
-
- // we now know that the input contains spaces.
- // let's sit down and do the collapsing normally.
-
- StringBuilder result = new StringBuilder(len /*allocate enough size to avoid re-allocation*/ );
-
- if(s!=0) {
- for( int i=0; i<s; i++ )
- result.append(text.charAt(i));
- result.append(' ');
- }
-
- boolean inStripMode = true;
- for (int i = s+1; i < len; i++) {
- char ch = text.charAt(i);
- boolean b = isWhiteSpace(ch);
- if (inStripMode && b)
- continue; // skip this character
-
- inStripMode = b;
- if (inStripMode)
- result.append(' ');
- else
- result.append(ch);
- }
-
- // remove trailing whitespaces
- len = result.length();
- if (len > 0 && result.charAt(len - 1) == ' ')
- result.setLength(len - 1);
- // whitespaces are already collapsed,
- // so all we have to do is to remove the last one character
- // if it's a whitespace.
-
- return result.toString();
- }
-
- /**
- * No-op.
- *
- * Just return the same string given as the parameter.
- */
- public String marshal(String s) {
- return s;
- }
-
-
- /** returns true if the specified char is a white space character. */
- protected static boolean isWhiteSpace(char ch) {
- // most of the characters are non-control characters.
- // so check that first to quickly return false for most of the cases.
- if( ch>0x20 ) return false;
-
- // other than we have to do four comparisons.
- return ch == 0x9 || ch == 0xA || ch == 0xD || ch == 0x20;
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java b/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java
deleted file mode 100644
index 84704a68..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/HexBinaryAdapter.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation.adapters;
-
-import javax.xml.bind.DatatypeConverter;
-
-/**
- * {@link XmlAdapter} for <tt>xs:hexBinary</tt>.
- *
- * <p>
- * This {@link XmlAdapter} binds <tt>byte[]</tt> to the hexBinary representation in XML.
- *
- * @author Kohsuke Kawaguchi
- * @since JAXB 2.0
- */
-public final class HexBinaryAdapter extends XmlAdapter<String,byte[]> {
- public byte[] unmarshal(String s) {
- if(s==null) return null;
- return DatatypeConverter.parseHexBinary(s);
- }
-
- public String marshal(byte[] bytes) {
- if(bytes==null) return null;
- return DatatypeConverter.printHexBinary(bytes);
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java b/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java
deleted file mode 100644
index 1ec0b11c..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/NormalizedStringAdapter.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation.adapters;
-
-
-
-/**
- * {@link XmlAdapter} to handle <tt>xs:normalizedString</tt>.
- *
- * <p>
- * Replaces any tab, CR, and LF by a whitespace character ' ',
- * as specified in <a href="http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace">the whitespace facet 'replace'</a>
- *
- * @author Kohsuke Kawaguchi, Martin Grebac
- * @since JAXB 2.0
- */
-public final class NormalizedStringAdapter extends XmlAdapter<String,String> {
- /**
- * Replace any tab, CR, and LF by a whitespace character ' ',
- * as specified in <a href="http://www.w3.org/TR/xmlschema-2/#rf-whiteSpace">the whitespace facet 'replace'</a>
- */
- public String unmarshal(String text) {
- if(text==null) return null; // be defensive
-
- int i=text.length()-1;
-
- // look for the first whitespace char.
- while( i>=0 && !isWhiteSpaceExceptSpace(text.charAt(i)) )
- i--;
-
- if( i<0 )
- // no such whitespace. replace(text)==text.
- return text;
-
- // we now know that we need to modify the text.
- // allocate a char array to do it.
- char[] buf = text.toCharArray();
-
- buf[i--] = ' ';
- for( ; i>=0; i-- )
- if( isWhiteSpaceExceptSpace(buf[i]))
- buf[i] = ' ';
-
- return new String(buf);
- }
-
- /**
- * No-op.
- *
- * Just return the same string given as the parameter.
- */
- public String marshal(String s) {
- return s;
- }
-
-
- /**
- * Returns true if the specified char is a white space character
- * but not 0x20.
- */
- protected static boolean isWhiteSpaceExceptSpace(char ch) {
- // most of the characters are non-control characters.
- // so check that first to quickly return false for most of the cases.
- if( ch>=0x20 ) return false;
-
- // other than we have to do four comparisons.
- return ch == 0x9 || ch == 0xA || ch == 0xD;
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlAdapter.java b/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlAdapter.java
deleted file mode 100644
index 8a047de8..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlAdapter.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation.adapters;
-
-/**
- * Adapts a Java type for custom marshaling.
- *
- * <p> <b> Usage: </b> </p>
- *
- * <p>
- * Some Java types do not map naturally to a XML representation, for
- * example <tt>HashMap</tt> or other non JavaBean classes. Conversely,
- * a XML repsentation may map to a Java type but an application may
- * choose to accesss the XML representation using another Java
- * type. For example, the schema to Java binding rules bind
- * xs:DateTime by default to XmlGregorianCalendar. But an application
- * may desire to bind xs:DateTime to a custom type,
- * MyXmlGregorianCalendar, for example. In both cases, there is a
- * mismatch between <i> bound type </i>, used by an application to
- * access XML content and the <i> value type</i>, that is mapped to an
- * XML representation.
- *
- * <p>
- * This abstract class defines methods for adapting a bound type to a value
- * type or vice versa. The methods are invoked by the JAXB binding
- * framework during marshaling and unmarshalling:
- *
- * <ul>
- * <li> <b> XmlAdapter.marshal(...): </b> During marshalling, JAXB
- * binding framework invokes XmlAdapter.marshal(..) to adapt a
- * bound type to value type, which is then marshaled to XML
- * representation. </li>
- *
- * <li> <b> XmlAdapter.unmarshal(...): </b> During unmarshalling,
- * JAXB binding framework first unmarshals XML representation
- * to a value type and then invokes XmlAdapter.unmarshal(..) to
- * adapt the value type to a bound type. </li>
- * </ul>
- *
- * Writing an adapter therefore involves the following steps:
- *
- * <ul>
- * <li> Write an adapter that implements this abstract class. </li>
- * <li> Install the adapter using the annotation {@link
- * XmlJavaTypeAdapter} </li>
- * </ul>
- *
- * <p><b>Example:</b> Customized mapping of <tt>HashMap</tt></p>
- * <p> The following example illustrates the use of
- * <tt>&#64;XmlAdapter</tt> and <tt>&#64;XmlJavaTypeAdapter</tt> to
- * customize the mapping of a <tt>HashMap</tt>.
- *
- * <p> <b> Step 1: </b> Determine the desired XML representation for HashMap.
- *
- * <pre>
- * &lt;hashmap>
- * &lt;entry key="id123">this is a value&lt;/entry>
- * &lt;entry key="id312">this is another value&lt;/entry>
- * ...
- * &lt;/hashmap>
- * </pre>
- *
- * <p> <b> Step 2: </b> Determine the schema definition that the
- * desired XML representation shown above should follow.
- *
- * <pre>
- *
- * &lt;xs:complexType name="myHashMapType">
- * &lt;xs:sequence>
- * &lt;xs:element name="entry" type="myHashMapEntryType"
- * minOccurs = "0" maxOccurs="unbounded"/>
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- *
- * &lt;xs:complexType name="myHashMapEntryType">
- * &lt;xs:simpleContent>
- * &lt;xs:extension base="xs:string">
- * &lt;xs:attribute name="key" type="xs:int"/>
- * &lt;/xs:extension>
- * &lt;/xs:simpleContent>
- * &lt;/xs:complexType>
- *
- * </pre>
- *
- * <p> <b> Step 3: </b> Write value types that can generate the above
- * schema definition.
- *
- * <pre>
- * public class MyHashMapType {
- * List&lt;MyHashMapEntryType> entry;
- * }
- *
- * public class MyHashMapEntryType {
- * &#64;XmlAttribute
- * public Integer key;
- *
- * &#64;XmlValue
- * public String value;
- * }
- * </pre>
- *
- * <p> <b> Step 4: </b> Write the adapter that adapts the value type,
- * MyHashMapType to a bound type, HashMap, used by the application.
- *
- * <pre>
- * public final class MyHashMapAdapter extends
- * XmlAdapter&lt;MyHashMapType,HashMap> { ... }
- *
- * </pre>
- *
- * <p> <b> Step 5: </b> Use the adapter.
- *
- * <pre>
- * public class Foo {
- * &#64;XmlJavaTypeAdapter(MyHashMapAdapter.class)
- * HashMap hashmap;
- * ...
- * }
- * </pre>
- *
- * The above code fragment will map to the following schema:
- *
- * <pre>
- * &lt;xs:complexType name="Foo">
- * &lt;xs:sequence>
- * &lt;xs:element name="hashmap" type="myHashMapType"
- * &lt;/xs:sequence>
- * &lt;/xs:complexType>
- * </pre>
- *
- * @param <BoundType>
- * The type that JAXB doesn't know how to handle. An adapter is written
- * to allow this type to be used as an in-memory representation through
- * the <tt>ValueType</tt>.
- * @param <ValueType>
- * The type that JAXB knows how to handle out of the box.
- *
- * @author <ul><li>Sekhar Vajjhala, Sun Microsystems Inc.</li> <li> Kohsuke Kawaguchi, Sun Microsystems Inc.</li></ul>
- * @see XmlJavaTypeAdapter
- * @since JAXB 2.0
- */
-public abstract class XmlAdapter<ValueType,BoundType> {
-
- /**
- * Do-nothing constructor for the derived classes.
- */
- protected XmlAdapter() {}
-
- /**
- * Convert a value type to a bound type.
- *
- * @param v
- * The value to be converted. Can be null.
- * @throws Exception
- * if there's an error during the conversion. The caller is responsible for
- * reporting the error to the user through {@link javax.xml.bind.ValidationEventHandler}.
- */
- public abstract BoundType unmarshal(ValueType v) throws Exception;
-
- /**
- * Convert a bound type to a value type.
- *
- * @param v
- * The value to be convereted. Can be null.
- * @throws Exception
- * if there's an error during the conversion. The caller is responsible for
- * reporting the error to the user through {@link javax.xml.bind.ValidationEventHandler}.
- */
- public abstract ValueType marshal(BoundType v) throws Exception;
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java b/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java
deleted file mode 100644
index ab0cf949..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation.adapters;
-
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlElementRefs;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlSchema;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlSchemaTypes;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.PACKAGE;
-
-
-/**
- * Use an adapter that implements {@link XmlAdapter} for custom marshaling.
- *
- * <p> <b> Usage: </b> </p>
- *
- * <p> The <tt>@XmlJavaTypeAdapter</tt> annotation can be used with the
- * following program elements:
- * <ul>
- * <li> a JavaBean property </li>
- * <li> field </li>
- * <li> parameter </li>
- * <li> package </li>
- * <li> from within {@link XmlJavaTypeAdapters} </li>
- * </ul>
- *
- * <p> When <tt>@XmlJavaTypeAdapter</tt> annotation is defined on a
- * class, it applies to all references to the class.
- * <p> When <tt>@XmlJavaTypeAdapter</tt> annotation is defined at the
- * package level it applies to all references from within the package
- * to <tt>@XmlJavaTypeAdapter.type()</tt>.
- * <p> When <tt>@XmlJavaTypeAdapter</tt> annotation is defined on the
- * field, property or parameter, then the annotation applies to the
- * field, property or the parameter only.
- * <p> A <tt>@XmlJavaTypeAdapter</tt> annotation on a field, property
- * or parameter overrides the <tt>@XmlJavaTypeAdapter</tt> annotation
- * associated with the class being referenced by the field, property
- * or parameter.
- * <p> A <tt>@XmlJavaTypeAdapter</tt> annotation on a class overrides
- * the <tt>@XmlJavaTypeAdapter</tt> annotation specified at the
- * package level for that class.
- *
- * <p>This annotation can be used with the following other annotations:
- * {@link XmlElement}, {@link XmlAttribute}, {@link XmlElementRef},
- * {@link XmlElementRefs}, {@link XmlAnyElement}. This can also be
- * used at the package level with the following annotations:
- * {@link XmlAccessorType}, {@link XmlSchema}, {@link XmlSchemaType},
- * {@link XmlSchemaTypes}.
- *
- * <p><b> Example: </b> See example in {@link XmlAdapter}
- *
- * @author <ul><li>Sekhar Vajjhala, Sun Microsystems Inc.</li> <li> Kohsuke Kawaguchi, Sun Microsystems Inc.</li></ul>
- * @since JAXB2.0
- * @see XmlAdapter
- */
-
-@Retention(RUNTIME) @Target({PACKAGE,FIELD,METHOD,TYPE,PARAMETER})
-public @interface XmlJavaTypeAdapter {
- /**
- * Points to the class that converts a value type to a bound type or vice versa.
- * See {@link XmlAdapter} for more details.
- */
- Class<? extends XmlAdapter> value();
-
- /**
- * If this annotation is used at the package level, then value of
- * the type() must be specified.
- */
-
- Class type() default DEFAULT.class;
-
- /**
- * Used in {@link XmlJavaTypeAdapter#type()} to
- * signal that the type be inferred from the signature
- * of the field, property, parameter or the class.
- */
-
- static final class DEFAULT {}
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java b/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java
deleted file mode 100644
index c29493b4..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.annotation.adapters;
-
-import static java.lang.annotation.ElementType.PACKAGE;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import java.lang.annotation.Target;
-
-/**
- * <p>
- * A container for multiple @{@link XmlJavaTypeAdapter} annotations.
- *
- * <p> Multiple annotations of the same type are not allowed on a program
- * element. This annotation therefore serves as a container annotation
- * for multiple &#64;XmlJavaTypeAdapter as follows:
- *
- * <pre>
- * &#64;XmlJavaTypeAdapters ({ @XmlJavaTypeAdapter(...),@XmlJavaTypeAdapter(...) })
- * </pre>
- *
- * <p>The <tt>@XmlJavaTypeAdapters</tt> annnotation is useful for
- * defining {@link XmlJavaTypeAdapter} annotations for different types
- * at the package level.
- *
- * <p>See "Package Specification" in javax.xml.bind.package javadoc for
- * additional common information.</p>
- *
- * @author <ul><li>Sekhar Vajjhala, Sun Microsystems, Inc.</li></ul>
- * @see XmlJavaTypeAdapter
- * @since JAXB2.0
- */
-@Retention(RUNTIME) @Target({PACKAGE})
-public @interface XmlJavaTypeAdapters {
- /**
- * Collection of @{@link XmlJavaTypeAdapter} annotations
- */
- XmlJavaTypeAdapter[] value();
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/package.html b/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/package.html
deleted file mode 100644
index 02dbd936..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/package.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!--
- Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
- <head>
-
-
- </head>
-
- <body>
- <p>
- {@link javax.xml.bind.annotation.adapters.XmlAdapter} and its spec-defined
- sub-classes to allow arbitrary Java classes to be used with JAXB.
-
- <h2>Package Specification</h2>
-
- <ul>
- <li><a href="http://jcp.org/en/jsr/detail?id=222">JAXB Specification</a>
- </ul>
-
- <h2>Related Documentation</h2>
-
- For overviews, tutorials, examples, guides, and tool documentation,
- please see:
- <ul>
- <li>The <a href="http://jaxb.java.net">JAXB Website</a>
- </ul>
-
- <!-- Put @see and @since tags down here. -->
-
- </body>
-</html>
-
-
diff --git a/src/share/jaxws_classes/javax/xml/bind/annotation/package.html b/src/share/jaxws_classes/javax/xml/bind/annotation/package.html
deleted file mode 100644
index 5e6a2a3d..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/annotation/package.html
+++ /dev/null
@@ -1,286 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!--
- Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
- <head>
-
-
- </head>
-
- <body bgcolor="white">
-
- <p>
- Defines annotations for customizing Java program elements to XML Schema mapping.
-
- <h2>Package Specification</h2>
- <p>The following table shows the JAXB mapping annotations
- that can be associated with each program element. </p>
-
- <table border="1" cellpadding="4" cellspacing="3">
- <tbody>
- <tr>
- <td><b>Program Element</b></td>
- <td><b>JAXB annotation</b></td>
- </tr>
- <tr valign="top">
- <td><b>Package</b></td>
- <td>
- <table>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAccessorOrder.html">XmlAccessorOrder</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAccessorType.html">XmlAccessorType</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlSchema.html">XmlSchema</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlSchemaType.html">XmlSchemaType</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlSchemaTypes.html">XmlSchemaTypes</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html">XmlJavaTypeAdapter</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/adapters/XmlJavaTypeAdapters.html">XmlJavaTypeAdapters</a></b></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr valign="top">
- <td><b>Class</b></td>
- <td>
- <table>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAccessorOrder.html">XmlAccessorOrder</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAccessorType.html">XmlAccessorType</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlInlineBinaryData.html">XmlInlineBinaryData</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlRootElement.html">XmlRootElement</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlType.html">XmlType</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html">XmlJavaTypeAdapter</a></b></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr valign="top">
- <td><b>Enum type</b></td>
- <td>
- <table>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlEnum.html">XmlEnum</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlEnumValue.html">XmlEnumValue (enum constant only)</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlRootElement.html">XmlRootElement</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlType.html">XmlType</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html">XmlJavaTypeAdapter</a></b></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr valign="top">
- <td><b>JavaBean Property/field</b></td>
- <td>
- <table>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlElement.html">XmlElement</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlElements.html">XmlElements</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlElementRef.html">XmlElementRef</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlElementRefs.html">XmlElementRefs</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlElementWrapper.html">XmlElementWrapper</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAnyElement.html">XmlAnyElement</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAttribute.html">XmlAttribute</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAnyAttribute.html">XmlAnyAttribute</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlTransient.html">XmlTransient</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlValue.html">XmlValue</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlID.html">XmlID</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlIDREF.html">XmlIDREF</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlList.html">XmlList</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlMixed.html">XmlMixed</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlMimeType.html">XmlMimeType</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAttachmentRef.html">XmlAttachmentRef</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlInlineBinaryData.html">XmlInlineBinaryData</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlElementDecl.html">XmlElementDecl (only on method)</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html">XmlJavaTypeAdapter</a></b></td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr valign="top">
- <td><b>Parameter</b></td>
- <td>
- <table>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlList.html">XmlList</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlAttachmentRef.html">XmlAttachmentRef</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/XmlMimeType.html">XmlMimeType</a></b></td>
- </tr>
- <tr valign="top">
- <td><b><a HREF="../../../../javax/xml/bind/annotation/adapters/XmlJavaTypeAdapter.html">XmlJavaTypeAdapter</a></b></td>
- </tr>
- </table>
- </td>
- </tr>
-
- </tbody>
- </table>
- <h3>Terminology</h3>
- <p>
- <b>JavaBean property and field:</b> For the purposes of
- mapping, there is no semantic difference between a field and
- a JavaBean property. Thus, an annotation that can be applied
- to a JavaBean property can always be applied to a
- field. Hence in the Javadoc documentation, for brevity, the
- term JavaBean property or property is used to mean either JavaBean
- property or a field. Where required, both are explicitly
- mentioned.
- <p>
- <b>top level class:</b> For the purpose of mapping, there is
- no semantic difference between a top level class and a
- static nested class. Thus, an annotation that can be applied
- to a top level class, can always be applied to a nested
- static class. Hence in the Javadoc documentation, for
- brevity, the term "top level class" or just class is used to
- mean either a top level class or a nested static
- class.
- <p>
- <b>mapping annotation:</b>A JAXB 2.0 defined program
- annotation based on the JSR 175 programming annotation
- facility.
- <h3>Common Usage Constraints</h3>
- <p>The following usage constraints are defined here since
- they apply to more than annotation:
- <ul>
- <li> For a property, a given annotation can be applied to
- either read or write property but not both. </li>
-
- <li> A property name must be different from any other
- property name in any of the super classes of the
- class being mapped. </li>
-
- <li> A mapped field name or the decapitalized name of a
- mapped property must be unique within a class. </li>
- </ul>
- <h3>Notations</h3>
- <b>Namespace prefixes</b>
- <p>The following namespace prefixes are used in the XML Schema
- fragments in this package.<p>
-
- <table border="1" cellpadding="4" cellspacing="3">
- <tbody>
- <tr>
- <td><b>Prefix</b></td>
- <td><b>Namespace</b></td>
- <td><b>Notes</b></td>
- </tr>
-
- <tr valign="top">
- <td>xs</td>
- <td>http://www.w3.org/2001/XMLSchema</td>
- <td>Namespace of XML Schema namespace</td>
- </tr>
- <tr valign="top">
- <td>ref</td>
- <td>http://ws-i.org/profiles/basic/1.1/xsd</td>
- <td>Namespace for swaref schema component</td>
- </tr>
- <tr valign="top">
- <td>xsi</td>
- <td>http://www.w3.org/2001/XMLSchema-instance</td>
- <td>XML Schema namespace for instances</td>
- </tr>
- </tbody>
- </table>
-
- <!-- Put @see and @since tags down here. -->
- @since JAXB 2.0
- </body>
-</html>
-
-
diff --git a/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentMarshaller.java b/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentMarshaller.java
deleted file mode 100644
index 8d4892b6..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentMarshaller.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.attachment;
-
-import javax.activation.DataHandler;
-import javax.xml.bind.Marshaller;
-
-/**
- * <p>Enable JAXB marshalling to optimize storage of binary data.</p>
- *
- * <p>This API enables an efficient cooperative creation of optimized
- * binary data formats between a JAXB marshalling process and a MIME-based package
- * processor. A JAXB implementation marshals the root body of a MIME-based package,
- * delegating the creation of referenceable MIME parts to
- * the MIME-based package processor that implements this abstraction.</p>
- *
- * <p>XOP processing is enabled when {@link #isXOPPackage()} is true.
- * See {@link #addMtomAttachment(DataHandler, String, String)} for details.
- * </p>
- *
- * <p>WS-I Attachment Profile 1.0 is supported by
- * {@link #addSwaRefAttachment(DataHandler)} being called by the
- * marshaller for each JAXB property related to
- * {http://ws-i.org/profiles/basic/1.1/xsd}swaRef.</p>
- *
- *
- * @author Marc Hadley
- * @author Kohsuke Kawaguchi
- * @author Joseph Fialli
- * @since JAXB 2.0
- *
- * @see Marshaller#setAttachmentMarshaller(AttachmentMarshaller)
- *
- * @see <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/">XML-binary Optimized Packaging</a>
- * @see <a href="http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24.html">WS-I Attachments Profile Version 1.0.</a>
- */
-public abstract class AttachmentMarshaller {
-
- /**
- * <p>Consider MIME content <code>data</code> for optimized binary storage as an attachment.
- *
- * <p>
- * This method is called by JAXB marshal process when {@link #isXOPPackage()} is
- * <code>true</code>, for each element whose datatype is "base64Binary", as described in
- * Step 3 in
- * <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#creating_xop_packages">Creating XOP Packages</a>.
- *
- * <p>
- * The method implementor determines whether <code>data</code> shall be attached separately
- * or inlined as base64Binary data. If the implementation chooses to optimize the storage
- * of the binary data as a MIME part, it is responsible for attaching <code>data</code> to the
- * MIME-based package, and then assigning an unique content-id, cid, that identifies
- * the MIME part within the MIME message. This method returns the cid,
- * which enables the JAXB marshaller to marshal a XOP element that refers to that cid in place
- * of marshalling the binary data. When the method returns null, the JAXB marshaller
- * inlines <code>data</code> as base64binary data.
- *
- * <p>
- * The caller of this method is required to meet the following constraint.
- * If the element infoset item containing <code>data</code> has the attribute
- * <code>xmime:contentType</code> or if the JAXB property/field representing
- * <code>data</code>is annotated with a known MIME type,
- * <code>data.getContentType()</code> should be set to that MIME type.
- *
- * <p>
- * The <code>elementNamespace</code> and <code>elementLocalName</code>
- * parameters provide the
- * context that contains the binary data. This information could
- * be used by the MIME-based package processor to determine if the
- * binary data should be inlined or optimized as an attachment.
- *
- * @param data
- * represents the data to be attached. Must be non-null.
- * @param elementNamespace
- * the namespace URI of the element that encloses the base64Binary data.
- * Can be empty but never null.
- * @param elementLocalName
- * The local name of the element. Always a non-null valid string.
- *
- * @return
- * a valid content-id URI (see <a href="http://www.w3.org/TR/xop10/#RFC2387">RFC 2387</a>) that identifies the attachment containing <code>data</code>.
- * Otherwise, null if the attachment was not added and should instead be inlined in the message.
- *
- * @see <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/">XML-binary Optimized Packaging</a>
- * @see <a href="http://www.w3.org/TR/xml-media-types/">Describing Media Content of Binary Data in XML</a>
- */
- public abstract String addMtomAttachment(DataHandler data, String elementNamespace, String elementLocalName);
-
- /**
- * <p>Consider binary <code>data</code> for optimized binary storage as an attachment.
- *
- * <p>Since content type is not known, the attachment's MIME content type must be set to "application/octet-stream".</p>
- *
- * <p>
- * The <code>elementNamespace</code> and <code>elementLocalName</code>
- * parameters provide the
- * context that contains the binary data. This information could
- * be used by the MIME-based package processor to determine if the
- * binary data should be inlined or optimized as an attachment.
- *
- * @param data
- * represents the data to be attached. Must be non-null. The actual data region is
- * specified by <tt>(data,offset,length)</tt> tuple.
- *
- * @param offset
- * The offset within the array of the first byte to be read;
- * must be non-negative and no larger than array.length
- *
- * @param length
- * The number of bytes to be read from the given array;
- * must be non-negative and no larger than array.length
- *
- * @param mimeType
- * If the data has an associated MIME type known to JAXB, that is passed
- * as this parameter. If none is known, "application/octet-stream".
- * This parameter may never be null.
- *
- * @param elementNamespace
- * the namespace URI of the element that encloses the base64Binary data.
- * Can be empty but never null.
- *
- * @param elementLocalName
- * The local name of the element. Always a non-null valid string.
- *
- * @return content-id URI, cid, to the attachment containing
- * <code>data</code> or null if data should be inlined.
- *
- * @see #addMtomAttachment(DataHandler, String, String)
- */
- public abstract String addMtomAttachment(byte[] data, int offset, int length, String mimeType, String elementNamespace, String elementLocalName);
-
- /**
- * <p>Read-only property that returns true if JAXB marshaller should enable XOP creation.</p>
- *
- * <p>This value must not change during the marshalling process. When this
- * value is true, the <code>addMtomAttachment(...)</code> method
- * is invoked when the appropriate binary datatypes are encountered by
- * the marshal process.</p>
- *
- * <p>Marshaller.marshal() must throw IllegalStateException if this value is <code>true</code>
- * and the XML content to be marshalled violates Step 1 in
- * <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#creating_xop_packages">Creating XOP Pacakges</a>
- * http://www.w3.org/TR/2005/REC-xop10-20050125/#creating_xop_packages.
- * <i>"Ensure the Original XML Infoset contains no element information item with a
- * [namespace name] of "http://www.w3.org/2004/08/xop/include" and a [local name] of Include"</i>
- *
- * <p>When this method returns true and during the marshal process
- * at least one call to <code>addMtomAttachment(...)</code> returns
- * a content-id, the MIME-based package processor must label the
- * root part with the application/xop+xml media type as described in
- * Step 5 of
- * <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#creating_xop_packages">Creating XOP Pacakges</a>.<p>
- *
- * @return true when MIME context is a XOP Package.
- */
- public boolean isXOPPackage() { return false; }
-
- /**
- * <p>Add MIME <code>data</code> as an attachment and return attachment's content-id, cid.</p>
- *
- * <p>
- * This method is called by JAXB marshal process for each element/attribute typed as
- * {http://ws-i.org/profiles/basic/1.1/xsd}swaRef. The MIME-based package processor
- * implementing this method is responsible for attaching the specified data to a
- * MIME attachment, and generating a content-id, cid, that uniquely identifies the attachment
- * within the MIME-based package.
- *
- * <p>Caller inserts the returned content-id, cid, into the XML content being marshalled.</p>
- *
- * @param data
- * represents the data to be attached. Must be non-null.
- * @return
- * must be a valid URI used as cid. Must satisfy Conformance Requirement R2928 from
- * <a href="http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24.html#Referencing_Attachments_from_the_SOAP_Envelope">WS-I Attachments Profile Version 1.0.</a>
- */
- public abstract String addSwaRefAttachment(DataHandler data);
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentUnmarshaller.java b/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentUnmarshaller.java
deleted file mode 100644
index 23d87215..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/attachment/AttachmentUnmarshaller.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.attachment;
-
-import javax.activation.DataHandler;
-
-/**
- * <p>Enables JAXB unmarshalling of a root document containing optimized binary data formats.</p>
- *
- * <p>This API enables an efficient cooperative processing of optimized
- * binary data formats between a JAXB 2.0 implementation and MIME-based package
- * processor (MTOM/XOP and WS-I AP 1.0). JAXB unmarshals the body of a package, delegating the
- * understanding of the packaging format being used to a MIME-based
- * package processor that implements this abstract class.</p>
- *
- * <p>This abstract class identifies if a package requires XOP processing, {@link #isXOPPackage()} and provides retrieval of binary content stored as attachments by content-id.</p>
- *
- * <h2>Identifying the content-id, cid, to pass to <code>getAttachment*(String cid)</code></h2>
- * <ul>
- * <li>
- * For XOP processing, the infoset representation of the cid is described
- * in step 2a in
- * <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#interpreting_xop_packages">Section 3.2 Interpreting XOP Packages</a>
- * </li>
- * <li>
- * For WS-I AP 1.0, the cid is identified as an element or attribute of
- * type <code>ref:swaRef </code> specified in
- * <a href="http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24.html#Referencing_Attachments_from_the_SOAP_Envelope">Section 4.4 Referencing Attachments from the SOAP Envelope</a>
- * </li>
- * </ul>
- *
- * @author Marc Hadley
- * @author Kohsuke Kawaguchi
- * @author Joseph Fialli
- *
- * @since JAXB 2.0
- *
- * @see javax.xml.bind.Unmarshaller#setAttachmentUnmarshaller(AttachmentUnmarshaller)
- *
- * @see <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/">XML-binary Optimized Packaging</a>
- * @see <a href="http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24.html">WS-I Attachments Profile Version 1.0.</a>
- * @see <a href="http://www.w3.org/TR/xml-media-types/">Describing Media Content of Binary Data in XML</a>
- */
-public abstract class AttachmentUnmarshaller {
- /**
- * <p>Lookup MIME content by content-id, <code>cid</code>, and return as a {@link DataHandler}.</p>
- *
- * <p>The returned <code>DataHandler</code> instance must be configured
- * to meet the following required mapping constaint.
- * <table border="2" rules="all" cellpadding="4">
- * <thead>
- * <tr>
- * <th align="center" colspan="2">
- * Required Mappings between MIME and Java Types
- * </tr>
- * <tr>
- * <th>MIME Type</th>
- * <th>Java Type</th>
- * </tr>
- * <tr>
- * <th><code>DataHandler.getContentType()</code></th>
- * <th><code>instanceof DataHandler.getContent()</code></th>
- * </tr>
- * </thead>
- * <tbody>
- * <tr>
- * <td>image/gif</td>
- * <td>java.awt.Image</td>
- * </tr>
- * <tr>
- * <td>image/jpeg</td>
- * <td>java.awt.Image</td>
- * </tr>
- * <tr>
- * <td>text/xml or application/xml</td>
- * <td>javax.xml.transform.Source</td>
- * </tr>
- * </tbody>
- * </table>
- * Note that it is allowable to support additional mappings.</p>
- *
- * @param cid It is expected to be a valid lexical form of the XML Schema
- * <code>xs:anyURI</code> datatype. If <code>{@link #isXOPPackage()}
- * ==true</code>, it must be a valid URI per the <code>cid:</code> URI scheme (see <a href="http://www.ietf.org/rfc/rfc2387.txt">RFC 2387</a>)
- *
- * @return
- * a {@link DataHandler} that represents the MIME attachment.
- *
- * @throws IllegalArgumentException if the attachment for the given cid is not found.
- */
- public abstract DataHandler getAttachmentAsDataHandler(String cid);
-
- /**
- * <p>Retrieve the attachment identified by content-id, <code>cid</code>, as a <tt>byte[]</tt></p>.
- *
- * @param cid It is expected to be a valid lexical form of the XML Schema
- * <code>xs:anyURI</code> datatype. If <code>{@link #isXOPPackage()}
- * ==true</code>, it must be a valid URI per the <code>cid:</code> URI scheme (see <a href="http://www.ietf.org/rfc/rfc2387.txt">RFC 2387</a>)
- *
- * @return byte[] representation of attachment identified by cid.
- *
- * @throws IllegalArgumentException if the attachment for the given cid is not found.
- */
- public abstract byte[] getAttachmentAsByteArray(String cid);
-
- /**
- * <p>Read-only property that returns true if JAXB unmarshaller needs to perform XOP processing.</p>
- *
- * <p>This method returns <code>true</code> when the constraints specified
- * in <a href="http://www.w3.org/TR/2005/REC-xop10-20050125/#identifying_xop_documents">Identifying XOP Documents</a> are met.
- * This value must not change during the unmarshalling process.</p>
- *
- * @return true when MIME context is a XOP Document.
- */
- public boolean isXOPPackage() { return false; }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/attachment/package.html b/src/share/jaxws_classes/javax/xml/bind/attachment/package.html
deleted file mode 100644
index 5dca81db..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/attachment/package.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!--
- Copyright (c) 2005, 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.
--->
-
-<html>
- <head>
-
-
- </head>
-
- <body bgcolor="white">
-
- <p>
- This package is implemented by a MIME-based package processor that
- enables the interpretation and creation of optimized binary data
- within an MIME-based package format.
-
- <p>
- Soap MTOM[1], XOP([2][3]) and WS-I AP[4] standardize approaches to
- optimized transmission of binary datatypes as an attachment.
- To optimally support these standards within a message passing
- environment, this package enables an integrated solution between
- a MIME-based package processor and JAXB unmarshall/marshal processes.
-
- <h2>Package Specification</h2>
-
- <ul>
- <li><a href="http://java.sun.com/xml/downloads/jaxb.html">JAXB
- Specification</a>
- </ul>
-
- <h2>Related Standards</h2>
-
- <ul>
- <li><a href="http://www.w3.org/TR/2004/WD-soap12-mtom-20040608/">[1]SOAP Message Transmission Optimization Mechanism</a> </li>
- <li><a href="http://www.w3.org/TR/2005/REC-xop10-20050125/">[2]XML-binary Optimized Packaging</a></li>
- <li><a href="http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24.html">[3]WS-I Attachments Profile Version 1.0.</a></li>
- <li><a href="http://www.w3.org/TR/xml-media-types/">[4]Describing Media Content of Binary Data in XML</a></li>
- </ul>
-
- <!-- Put @see and @since tags down here. -->
- @since JAXB 2.0
- </body>
-</html>
-
-
diff --git a/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractMarshallerImpl.java b/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractMarshallerImpl.java
deleted file mode 100644
index c2506d23..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractMarshallerImpl.java
+++ /dev/null
@@ -1,495 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.helpers;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.PropertyException;
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.bind.attachment.AttachmentMarshaller;
-import javax.xml.stream.XMLEventWriter;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.sax.SAXResult;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.validation.Schema;
-import java.io.UnsupportedEncodingException;
-import java.io.File;
-import java.io.OutputStream;
-import java.io.FileOutputStream;
-import java.io.BufferedOutputStream;
-import java.io.IOException;
-// J2SE1.4 feature
-// import java.nio.charset.Charset;
-// import java.nio.charset.UnsupportedCharsetException;
-
-/**
- * Partial default <tt>Marshaller</tt> implementation.
- *
- * <p>
- * This class provides a partial default implementation for the
- * {@link javax.xml.bind.Marshaller} interface.
- *
- * <p>
- * The only methods that a JAXB Provider has to implement are
- * {@link Marshaller#marshal(Object, javax.xml.transform.Result) marshal(Object, javax.xml.transform.Result)},
- * {@link Marshaller#marshal(Object, javax.xml.transform.Result) marshal(Object, javax.xml.stream.XMLStreamWriter)}, and
- * {@link Marshaller#marshal(Object, javax.xml.transform.Result) marshal(Object, javax.xml.stream.XMLEventWriter)}.
- *
- * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li></ul>
- * @see javax.xml.bind.Marshaller
- * @since JAXB1.0
- */
-public abstract class AbstractMarshallerImpl implements Marshaller
-{
- /** handler that will be used to process errors and warnings during marshal */
- private ValidationEventHandler eventHandler =
- new DefaultValidationEventHandler();
-
- //J2SE1.4 feature
- //private Charset encoding = null;
-
- /** store the value of the encoding property. */
- private String encoding = "UTF-8";
-
- /** store the value of the schemaLocation property. */
- private String schemaLocation = null;
-
- /** store the value of the noNamespaceSchemaLocation property. */
- private String noNSSchemaLocation = null;
-
- /** store the value of the formattedOutput property. */
- private boolean formattedOutput = false;
-
- /** store the value of the fragment property. */
- private boolean fragment = false;
-
- public final void marshal( Object obj, java.io.OutputStream os )
- throws JAXBException {
-
- checkNotNull( obj, "obj", os, "os" );
- marshal( obj, new StreamResult(os) );
- }
-
- public void marshal(Object jaxbElement, File output) throws JAXBException {
- checkNotNull(jaxbElement, "jaxbElement", output, "output" );
- try {
- OutputStream os = new BufferedOutputStream(new FileOutputStream(output));
- try {
- marshal( jaxbElement, new StreamResult(os) );
- } finally {
- os.close();
- }
- } catch (IOException e) {
- throw new JAXBException(e);
- }
- }
-
- public final void marshal( Object obj, java.io.Writer w )
- throws JAXBException {
-
- checkNotNull( obj, "obj", w, "writer" );
- marshal( obj, new StreamResult(w) );
- }
-
- public final void marshal( Object obj, org.xml.sax.ContentHandler handler )
- throws JAXBException {
-
- checkNotNull( obj, "obj", handler, "handler" );
- marshal( obj, new SAXResult(handler) );
- }
-
- public final void marshal( Object obj, org.w3c.dom.Node node )
- throws JAXBException {
-
- checkNotNull( obj, "obj", node, "node" );
- marshal( obj, new DOMResult(node) );
- }
-
- /**
- * By default, the getNode method is unsupported and throw
- * an {@link java.lang.UnsupportedOperationException}.
- *
- * Implementations that choose to support this method must
- * override this method.
- */
- public org.w3c.dom.Node getNode( Object obj ) throws JAXBException {
-
- checkNotNull( obj, "obj", Boolean.TRUE, "foo" );
-
- throw new UnsupportedOperationException();
- }
-
- /**
- * Convenience method for getting the current output encoding.
- *
- * @return the current encoding or "UTF-8" if it hasn't been set.
- */
- protected String getEncoding() {
- return encoding;
- }
-
- /**
- * Convenience method for setting the output encoding.
- *
- * @param encoding a valid encoding as specified in the Marshaller class
- * documentation
- */
- protected void setEncoding( String encoding ) {
- this.encoding = encoding;
- }
-
- /**
- * Convenience method for getting the current schemaLocation.
- *
- * @return the current schemaLocation or null if it hasn't been set
- */
- protected String getSchemaLocation() {
- return schemaLocation;
- }
-
- /**
- * Convenience method for setting the schemaLocation.
- *
- * @param location the schemaLocation value
- */
- protected void setSchemaLocation( String location ) {
- schemaLocation = location;
- }
-
- /**
- * Convenience method for getting the current noNamespaceSchemaLocation.
- *
- * @return the current noNamespaceSchemaLocation or null if it hasn't
- * been set
- */
- protected String getNoNSSchemaLocation() {
- return noNSSchemaLocation;
- }
-
- /**
- * Convenience method for setting the noNamespaceSchemaLocation.
- *
- * @param location the noNamespaceSchemaLocation value
- */
- protected void setNoNSSchemaLocation( String location ) {
- noNSSchemaLocation = location;
- }
-
- /**
- * Convenience method for getting the formatted output flag.
- *
- * @return the current value of the formatted output flag or false if
- * it hasn't been set.
- */
- protected boolean isFormattedOutput() {
- return formattedOutput;
- }
-
- /**
- * Convenience method for setting the formatted output flag.
- *
- * @param v value of the formatted output flag.
- */
- protected void setFormattedOutput( boolean v ) {
- formattedOutput = v;
- }
-
-
- /**
- * Convenience method for getting the fragment flag.
- *
- * @return the current value of the fragment flag or false if
- * it hasn't been set.
- */
- protected boolean isFragment() {
- return fragment;
- }
-
- /**
- * Convenience method for setting the fragment flag.
- *
- * @param v value of the fragment flag.
- */
- protected void setFragment( boolean v ) {
- fragment = v;
- }
-
-
- static String[] aliases = {
- "UTF-8", "UTF8",
- "UTF-16", "Unicode",
- "UTF-16BE", "UnicodeBigUnmarked",
- "UTF-16LE", "UnicodeLittleUnmarked",
- "US-ASCII", "ASCII",
- "TIS-620", "TIS620",
-
- // taken from the project-X parser
- "ISO-10646-UCS-2", "Unicode",
-
- "EBCDIC-CP-US", "cp037",
- "EBCDIC-CP-CA", "cp037",
- "EBCDIC-CP-NL", "cp037",
- "EBCDIC-CP-WT", "cp037",
-
- "EBCDIC-CP-DK", "cp277",
- "EBCDIC-CP-NO", "cp277",
- "EBCDIC-CP-FI", "cp278",
- "EBCDIC-CP-SE", "cp278",
-
- "EBCDIC-CP-IT", "cp280",
- "EBCDIC-CP-ES", "cp284",
- "EBCDIC-CP-GB", "cp285",
- "EBCDIC-CP-FR", "cp297",
-
- "EBCDIC-CP-AR1", "cp420",
- "EBCDIC-CP-HE", "cp424",
- "EBCDIC-CP-BE", "cp500",
- "EBCDIC-CP-CH", "cp500",
-
- "EBCDIC-CP-ROECE", "cp870",
- "EBCDIC-CP-YU", "cp870",
- "EBCDIC-CP-IS", "cp871",
- "EBCDIC-CP-AR2", "cp918",
-
- // IANA also defines two that JDK 1.2 doesn't handle:
- // EBCDIC-CP-GR --> CP423
- // EBCDIC-CP-TR --> CP905
- };
-
- /**
- * Gets the corresponding Java encoding name from an IANA name.
- *
- * This method is a helper method for the derived class to convert
- * encoding names.
- *
- * @exception UnsupportedEncodingException
- * If this implementation couldn't find the Java encoding name.
- */
- protected String getJavaEncoding( String encoding ) throws UnsupportedEncodingException {
- try {
- "1".getBytes(encoding);
- return encoding;
- } catch( UnsupportedEncodingException e ) {
- // try known alias
- for( int i=0; i<aliases.length; i+=2 ) {
- if(encoding.equals(aliases[i])) {
- "1".getBytes(aliases[i+1]);
- return aliases[i+1];
- }
- }
-
- throw new UnsupportedEncodingException(encoding);
- }
- /* J2SE1.4 feature
- try {
- this.encoding = Charset.forName( _encoding );
- } catch( UnsupportedCharsetException uce ) {
- throw new JAXBException( uce );
- }
- */
- }
-
- /**
- * Default implementation of the setProperty method handles
- * the four defined properties in Marshaller. If a provider
- * needs to handle additional properties, it should override
- * this method in a derived class.
- */
- public void setProperty( String name, Object value )
- throws PropertyException {
-
- if( name == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, "name" ) );
- }
-
- // recognize and handle four pre-defined properties.
- if( JAXB_ENCODING.equals(name) ) {
- checkString( name, value );
- setEncoding( (String)value );
- return;
- }
- if( JAXB_FORMATTED_OUTPUT.equals(name) ) {
- checkBoolean( name, value );
- setFormattedOutput((Boolean) value );
- return;
- }
- if( JAXB_NO_NAMESPACE_SCHEMA_LOCATION.equals(name) ) {
- checkString( name, value );
- setNoNSSchemaLocation( (String)value );
- return;
- }
- if( JAXB_SCHEMA_LOCATION.equals(name) ) {
- checkString( name, value );
- setSchemaLocation( (String)value );
- return;
- }
- if( JAXB_FRAGMENT.equals(name) ) {
- checkBoolean(name, value);
- setFragment((Boolean) value );
- return;
- }
-
- throw new PropertyException(name, value);
- }
-
- /**
- * Default implementation of the getProperty method handles
- * the four defined properties in Marshaller. If a provider
- * needs to support additional provider specific properties,
- * it should override this method in a derived class.
- */
- public Object getProperty( String name )
- throws PropertyException {
-
- if( name == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, "name" ) );
- }
-
- // recognize and handle four pre-defined properties.
- if( JAXB_ENCODING.equals(name) )
- return getEncoding();
- if( JAXB_FORMATTED_OUTPUT.equals(name) )
- return isFormattedOutput()?Boolean.TRUE:Boolean.FALSE;
- if( JAXB_NO_NAMESPACE_SCHEMA_LOCATION.equals(name) )
- return getNoNSSchemaLocation();
- if( JAXB_SCHEMA_LOCATION.equals(name) )
- return getSchemaLocation();
- if( JAXB_FRAGMENT.equals(name) )
- return isFragment()?Boolean.TRUE:Boolean.FALSE;
-
- throw new PropertyException(name);
- }
- /**
- * @see javax.xml.bind.Marshaller#getEventHandler()
- */
- public ValidationEventHandler getEventHandler() throws JAXBException {
- return eventHandler;
- }
-
- /**
- * @see javax.xml.bind.Marshaller#setEventHandler(ValidationEventHandler)
- */
- public void setEventHandler(ValidationEventHandler handler)
- throws JAXBException {
-
- if( handler == null ) {
- eventHandler = new DefaultValidationEventHandler();
- } else {
- eventHandler = handler;
- }
- }
-
-
-
-
- /*
- * assert that the given object is a Boolean
- */
- private void checkBoolean( String name, Object value ) throws PropertyException {
- if(!(value instanceof Boolean))
- throw new PropertyException(
- Messages.format( Messages.MUST_BE_BOOLEAN, name ) );
- }
-
- /*
- * assert that the given object is a String
- */
- private void checkString( String name, Object value ) throws PropertyException {
- if(!(value instanceof String))
- throw new PropertyException(
- Messages.format( Messages.MUST_BE_STRING, name ) );
- }
-
- /*
- * assert that the parameters are not null
- */
- private void checkNotNull( Object o1, String o1Name,
- Object o2, String o2Name ) {
-
- if( o1 == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, o1Name ) );
- }
- if( o2 == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, o2Name ) );
- }
- }
-
- public void marshal(Object obj, XMLEventWriter writer)
- throws JAXBException {
-
- throw new UnsupportedOperationException();
- }
-
- public void marshal(Object obj, XMLStreamWriter writer)
- throws JAXBException {
-
- throw new UnsupportedOperationException();
- }
-
- public void setSchema(Schema schema) {
- throw new UnsupportedOperationException();
- }
-
- public Schema getSchema() {
- throw new UnsupportedOperationException();
- }
-
- public void setAdapter(XmlAdapter adapter) {
- if(adapter==null)
- throw new IllegalArgumentException();
- setAdapter((Class)adapter.getClass(),adapter);
- }
-
- public <A extends XmlAdapter> void setAdapter(Class<A> type, A adapter) {
- throw new UnsupportedOperationException();
- }
-
- public <A extends XmlAdapter> A getAdapter(Class<A> type) {
- throw new UnsupportedOperationException();
- }
-
- public void setAttachmentMarshaller(AttachmentMarshaller am) {
- throw new UnsupportedOperationException();
- }
-
- public AttachmentMarshaller getAttachmentMarshaller() {
- throw new UnsupportedOperationException();
- }
-
- public void setListener(Listener listener) {
- throw new UnsupportedOperationException();
- }
-
- public Listener getListener() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java b/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java
deleted file mode 100644
index 37e04088..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/helpers/AbstractUnmarshallerImpl.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.helpers;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.w3c.dom.Node;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.PropertyException;
-import javax.xml.bind.UnmarshalException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.bind.attachment.AttachmentUnmarshaller;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.stream.XMLEventReader;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.Schema;
-import java.io.File;
-import java.io.Reader;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-/**
- * Partial default <tt>Unmarshaller</tt> implementation.
- *
- * <p>
- * This class provides a partial default implementation for the
- * {@link javax.xml.bind.Unmarshaller}interface.
- *
- * <p>
- * A JAXB Provider has to implement five methods (getUnmarshallerHandler,
- * unmarshal(Node), unmarshal(XMLReader,InputSource),
- * unmarshal(XMLStreamReader), and unmarshal(XMLEventReader).
- *
- * @author <ul>
- * <li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li>
- * </ul>
- * @see javax.xml.bind.Unmarshaller
- * @since JAXB1.0
- */
-public abstract class AbstractUnmarshallerImpl implements Unmarshaller
-{
- /** handler that will be used to process errors and warnings during unmarshal */
- private ValidationEventHandler eventHandler =
- new DefaultValidationEventHandler();
-
- /** whether or not the unmarshaller will validate */
- protected boolean validating = false;
-
- /**
- * XMLReader that will be used to parse a document.
- */
- private XMLReader reader = null;
-
- /**
- * Obtains a configured XMLReader.
- *
- * This method is used when the client-specified
- * {@link SAXSource} object doesn't have XMLReader.
- *
- * {@link Unmarshaller} is not re-entrant, so we will
- * only use one instance of XMLReader.
- */
- protected XMLReader getXMLReader() throws JAXBException {
- if(reader==null) {
- try {
- SAXParserFactory parserFactory;
- parserFactory = SAXParserFactory.newInstance();
- parserFactory.setNamespaceAware(true);
- // there is no point in asking a validation because
- // there is no guarantee that the document will come with
- // a proper schemaLocation.
- parserFactory.setValidating(false);
- reader = parserFactory.newSAXParser().getXMLReader();
- } catch( ParserConfigurationException e ) {
- throw new JAXBException(e);
- } catch( SAXException e ) {
- throw new JAXBException(e);
- }
- }
- return reader;
- }
-
- public Object unmarshal( Source source ) throws JAXBException {
- if( source == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, "source" ) );
- }
-
- if(source instanceof SAXSource)
- return unmarshal( (SAXSource)source );
- if(source instanceof StreamSource)
- return unmarshal( streamSourceToInputSource((StreamSource)source));
- if(source instanceof DOMSource)
- return unmarshal( ((DOMSource)source).getNode() );
-
- // we don't handle other types of Source
- throw new IllegalArgumentException();
- }
-
- // use the client specified XMLReader contained in the SAXSource.
- private Object unmarshal( SAXSource source ) throws JAXBException {
-
- XMLReader r = source.getXMLReader();
- if( r == null )
- r = getXMLReader();
-
- return unmarshal( r, source.getInputSource() );
- }
-
- /**
- * Unmarshals an object by using the specified XMLReader and the InputSource.
- *
- * The callee should call the setErrorHandler method of the XMLReader
- * so that errors are passed to the client-specified ValidationEventHandler.
- */
- protected abstract Object unmarshal( XMLReader reader, InputSource source ) throws JAXBException;
-
- public final Object unmarshal( InputSource source ) throws JAXBException {
- if( source == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, "source" ) );
- }
-
- return unmarshal( getXMLReader(), source );
- }
-
-
- private Object unmarshal( String url ) throws JAXBException {
- return unmarshal( new InputSource(url) );
- }
-
- public final Object unmarshal( URL url ) throws JAXBException {
- if( url == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, "url" ) );
- }
-
- return unmarshal( url.toExternalForm() );
- }
-
- public final Object unmarshal( File f ) throws JAXBException {
- if( f == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, "file" ) );
- }
-
- try {
- // copied from JAXP
- String path = f.getAbsolutePath();
- if (File.separatorChar != '/')
- path = path.replace(File.separatorChar, '/');
- if (!path.startsWith("/"))
- path = "/" + path;
- if (!path.endsWith("/") && f.isDirectory())
- path = path + "/";
- return unmarshal(new URL("file", "", path));
- } catch( MalformedURLException e ) {
- throw new IllegalArgumentException(e.getMessage());
- }
- }
-
- public final Object unmarshal( java.io.InputStream is )
- throws JAXBException {
-
- if( is == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, "is" ) );
- }
-
- InputSource isrc = new InputSource( is );
- return unmarshal( isrc );
- }
-
- public final Object unmarshal( Reader reader ) throws JAXBException {
- if( reader == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, "reader" ) );
- }
-
- InputSource isrc = new InputSource( reader );
- return unmarshal( isrc );
- }
-
-
- private static InputSource streamSourceToInputSource( StreamSource ss ) {
- InputSource is = new InputSource();
- is.setSystemId( ss.getSystemId() );
- is.setByteStream( ss.getInputStream() );
- is.setCharacterStream( ss.getReader() );
-
- return is;
- }
-
-
- /**
- * Indicates whether or not the Unmarshaller is configured to validate
- * during unmarshal operations.
- * <p>
- * <i><b>Note:</b> I named this method isValidating() to stay in-line
- * with JAXP, as opposed to naming it getValidating(). </i>
- *
- * @return true if the Unmarshaller is configured to validate during
- * unmarshal operations, false otherwise
- * @throws JAXBException if an error occurs while retrieving the validating
- * flag
- */
- public boolean isValidating() throws JAXBException {
- return validating;
- }
-
- /**
- * Allow an application to register a validation event handler.
- * <p>
- * The validation event handler will be called by the JAXB Provider if any
- * validation errors are encountered during calls to any of the
- * <tt>unmarshal</tt> methods. If the client application does not register
- * a validation event handler before invoking the unmarshal methods, then
- * all validation events will be silently ignored and may result in
- * unexpected behaviour.
- *
- * @param handler the validation event handler
- * @throws JAXBException if an error was encountered while setting the
- * event handler
- */
- public void setEventHandler(ValidationEventHandler handler)
- throws JAXBException {
-
- if( handler == null ) {
- eventHandler = new DefaultValidationEventHandler();
- } else {
- eventHandler = handler;
- }
- }
-
- /**
- * Specifies whether or not the Unmarshaller should validate during
- * unmarshal operations. By default, the <tt>Unmarshaller</tt> does
- * not validate.
- * <p>
- * This method may only be invoked before or after calling one of the
- * unmarshal methods.
- *
- * @param validating true if the Unmarshaller should validate during
- * unmarshal, false otherwise
- * @throws JAXBException if an error occurred while enabling or disabling
- * validation at unmarshal time
- */
- public void setValidating(boolean validating) throws JAXBException {
- this.validating = validating;
- }
-
- /**
- * Return the current event handler or the default event handler if one
- * hasn't been set.
- *
- * @return the current ValidationEventHandler or the default event handler
- * if it hasn't been set
- * @throws JAXBException if an error was encountered while getting the
- * current event handler
- */
- public ValidationEventHandler getEventHandler() throws JAXBException {
- return eventHandler;
- }
-
-
- /**
- * Creates an UnmarshalException from a SAXException.
- *
- * This is an utility method provided for the derived classes.
- *
- * <p>
- * When a provider-implemented ContentHandler wants to throw a
- * JAXBException, it needs to wrap the exception by a SAXException.
- * If the unmarshaller implementation blindly wrap SAXException
- * by JAXBException, such an exception will be a JAXBException
- * wrapped by a SAXException wrapped by another JAXBException.
- * This is silly.
- *
- * <p>
- * This method checks the nested exception of SAXException
- * and reduce those excessive wrapping.
- *
- * @return the resulting UnmarshalException
- */
- protected UnmarshalException createUnmarshalException( SAXException e ) {
- // check the nested exception to see if it's an UnmarshalException
- Exception nested = e.getException();
- if(nested instanceof UnmarshalException)
- return (UnmarshalException)nested;
-
- if(nested instanceof RuntimeException)
- // typically this is an unexpected exception,
- // just throw it rather than wrap it, so that the full stack
- // trace can be displayed.
- throw (RuntimeException)nested;
-
-
- // otherwise simply wrap it
- if(nested!=null)
- return new UnmarshalException(nested);
- else
- return new UnmarshalException(e);
- }
-
- /**
- * Default implementation of the setProperty method always
- * throws PropertyException since there are no required
- * properties. If a provider needs to handle additional
- * properties, it should override this method in a derived class.
- */
- public void setProperty( String name, Object value )
- throws PropertyException {
-
- if( name == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, "name" ) );
- }
-
- throw new PropertyException(name, value);
- }
-
- /**
- * Default implementation of the getProperty method always
- * throws PropertyException since there are no required
- * properties. If a provider needs to handle additional
- * properties, it should override this method in a derived class.
- */
- public Object getProperty( String name )
- throws PropertyException {
-
- if( name == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, "name" ) );
- }
-
- throw new PropertyException(name);
- }
-
- public Object unmarshal(XMLEventReader reader) throws JAXBException {
-
- throw new UnsupportedOperationException();
- }
-
- public Object unmarshal(XMLStreamReader reader) throws JAXBException {
-
- throw new UnsupportedOperationException();
- }
-
- public <T> JAXBElement<T> unmarshal(Node node, Class<T> expectedType) throws JAXBException {
- throw new UnsupportedOperationException();
- }
-
- public <T> JAXBElement<T> unmarshal(Source source, Class<T> expectedType) throws JAXBException {
- throw new UnsupportedOperationException();
- }
-
- public <T> JAXBElement<T> unmarshal(XMLStreamReader reader, Class<T> expectedType) throws JAXBException {
- throw new UnsupportedOperationException();
- }
-
- public <T> JAXBElement<T> unmarshal(XMLEventReader reader, Class<T> expectedType) throws JAXBException {
- throw new UnsupportedOperationException();
- }
-
- public void setSchema(Schema schema) {
- throw new UnsupportedOperationException();
- }
-
- public Schema getSchema() {
- throw new UnsupportedOperationException();
- }
-
- public void setAdapter(XmlAdapter adapter) {
- if(adapter==null)
- throw new IllegalArgumentException();
- setAdapter((Class)adapter.getClass(),adapter);
- }
-
- public <A extends XmlAdapter> void setAdapter(Class<A> type, A adapter) {
- throw new UnsupportedOperationException();
- }
-
- public <A extends XmlAdapter> A getAdapter(Class<A> type) {
- throw new UnsupportedOperationException();
- }
-
- public void setAttachmentUnmarshaller(AttachmentUnmarshaller au) {
- throw new UnsupportedOperationException();
- }
-
- public AttachmentUnmarshaller getAttachmentUnmarshaller() {
- throw new UnsupportedOperationException();
- }
-
- public void setListener(Listener listener) {
- throw new UnsupportedOperationException();
- }
-
- public Listener getListener() {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/helpers/DefaultValidationEventHandler.java b/src/share/jaxws_classes/javax/xml/bind/helpers/DefaultValidationEventHandler.java
deleted file mode 100644
index 7fe68ef8..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/helpers/DefaultValidationEventHandler.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.helpers;
-
-import org.w3c.dom.Node;
-
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.ValidationEventLocator;
-import java.net.URL;
-
-/**
- * <p>
- * JAXB 1.0 only default validation event handler. This is the default
- * handler for all objects created from a JAXBContext that is managing
- * schema-derived code generated by a JAXB 1.0 binding compiler.
- *
- * <p>
- * This handler causes the unmarshal and validate operations to fail on the first
- * error or fatal error.
- *
- * <p>
- * This handler is not the default handler for JAXB mapped classes following
- * JAXB 2.0 or later versions. Default validation event handling has changed
- * and is specified in {@link javax.xml.bind.Unmarshaller} and
- * {@link javax.xml.bind.Marshaller}.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
- * @see javax.xml.bind.Unmarshaller
- * @see javax.xml.bind.Validator
- * @see javax.xml.bind.ValidationEventHandler
- * @since JAXB1.0
- */
-public class DefaultValidationEventHandler implements ValidationEventHandler {
-
- public boolean handleEvent( ValidationEvent event ) {
-
- if( event == null ) {
- throw new IllegalArgumentException();
- }
-
- // calculate the severity prefix and return value
- String severity = null;
- boolean retVal = false;
- switch ( event.getSeverity() ) {
- case ValidationEvent.WARNING:
- severity = Messages.format( Messages.WARNING );
- retVal = true; // continue after warnings
- break;
- case ValidationEvent.ERROR:
- severity = Messages.format( Messages.ERROR );
- retVal = false; // terminate after errors
- break;
- case ValidationEvent.FATAL_ERROR:
- severity = Messages.format( Messages.FATAL_ERROR );
- retVal = false; // terminate after fatal errors
- break;
- default:
- assert false :
- Messages.format( Messages.UNRECOGNIZED_SEVERITY,
- event.getSeverity() );
- }
-
- // calculate the location message
- String location = getLocation( event );
-
- System.out.println(
- Messages.format( Messages.SEVERITY_MESSAGE,
- severity,
- event.getMessage(),
- location ) );
-
- // fail on the first error or fatal error
- return retVal;
- }
-
- /**
- * Calculate a location message for the event
- *
- */
- private String getLocation(ValidationEvent event) {
- StringBuffer msg = new StringBuffer();
-
- ValidationEventLocator locator = event.getLocator();
-
- if( locator != null ) {
-
- URL url = locator.getURL();
- Object obj = locator.getObject();
- Node node = locator.getNode();
- int line = locator.getLineNumber();
-
- if( url!=null || line!=-1 ) {
- msg.append( "line " + line );
- if( url!=null )
- msg.append( " of " + url );
- } else if( obj != null ) {
- msg.append( " obj: " + obj.toString() );
- } else if( node != null ) {
- msg.append( " node: " + node.toString() );
- }
- } else {
- msg.append( Messages.format( Messages.LOCATION_UNAVAILABLE ) );
- }
-
- return msg.toString();
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/helpers/Messages.java b/src/share/jaxws_classes/javax/xml/bind/helpers/Messages.java
deleted file mode 100644
index bebce5ab..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/helpers/Messages.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.helpers;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-class Messages
-{
- static String format( String property ) {
- return format( property, null );
- }
-
- static String format( String property, Object arg1 ) {
- return format( property, new Object[]{arg1} );
- }
-
- static String format( String property, Object arg1, Object arg2 ) {
- return format( property, new Object[]{arg1,arg2} );
- }
-
- static String format( String property, Object arg1, Object arg2, Object arg3 ) {
- return format( property, new Object[]{arg1,arg2,arg3} );
- }
-
- // add more if necessary.
-
- /** Loads a string resource and formats it with specified arguments. */
- static String format( String property, Object[] args ) {
- String text = ResourceBundle.getBundle(Messages.class.getName()).getString(property);
- return MessageFormat.format(text,args);
- }
-
-//
-//
-// Message resources
-//
-//
- static final String INPUTSTREAM_NOT_NULL = // 0 args
- "AbstractUnmarshallerImpl.ISNotNull";
-
- static final String MUST_BE_BOOLEAN = // 1 arg
- "AbstractMarshallerImpl.MustBeBoolean";
-
- static final String MUST_BE_STRING = // 1 arg
- "AbstractMarshallerImpl.MustBeString";
-
- static final String SEVERITY_MESSAGE = // 3 args
- "DefaultValidationEventHandler.SeverityMessage";
-
- static final String LOCATION_UNAVAILABLE = // 0 args
- "DefaultValidationEventHandler.LocationUnavailable";
-
- static final String UNRECOGNIZED_SEVERITY = // 1 arg
- "DefaultValidationEventHandler.UnrecognizedSeverity";
-
- static final String WARNING = // 0 args
- "DefaultValidationEventHandler.Warning";
-
- static final String ERROR = // 0 args
- "DefaultValidationEventHandler.Error";
-
- static final String FATAL_ERROR = // 0 args
- "DefaultValidationEventHandler.FatalError";
-
- static final String ILLEGAL_SEVERITY = // 0 args
- "ValidationEventImpl.IllegalSeverity";
-
- static final String MUST_NOT_BE_NULL = // 1 arg
- "Shared.MustNotBeNull";
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/helpers/Messages.properties b/src/share/jaxws_classes/javax/xml/bind/helpers/Messages.properties
deleted file mode 100644
index f08d677a..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/helpers/Messages.properties
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Copyright (c) 2003, 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.
-#
-
-AbstractUnmarshallerImpl.ISNotNull = \
- InputStream can not be null
-
-AbstractMarshallerImpl.MustBeBoolean = \
- {0} must be boolean
-
-AbstractMarshallerImpl.MustBeString = \
- {0} must be a String
-
-
-DefaultValidationEventHandler.SeverityMessage = \
- DefaultValidationEventHandler: {0} {1} \n\
-\ \ \ \ \ Location: {2}
-
-DefaultValidationEventHandler.LocationUnavailable = \
- unavailable
-
-DefaultValidationEventHandler.UnrecognizedSeverity = \
- Unrecognized event severity field "{0}"
-
-DefaultValidationEventHandler.Warning = \
- [WARNING]:
-
-DefaultValidationEventHandler.Error = \
- [ERROR]:
-
-DefaultValidationEventHandler.FatalError = \
- [FATAL_ERROR]:
-
-ValidationEventImpl.IllegalSeverity = \
- Illegal severity
-
-Shared.MustNotBeNull = \
- {0} parameter must not be null
diff --git a/src/share/jaxws_classes/javax/xml/bind/helpers/NotIdentifiableEventImpl.java b/src/share/jaxws_classes/javax/xml/bind/helpers/NotIdentifiableEventImpl.java
deleted file mode 100644
index e34c7889..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/helpers/NotIdentifiableEventImpl.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.helpers;
-
-import javax.xml.bind.ValidationEventLocator;
-
-/**
- * Default implementation of the NotIdentifiableEvent interface.
- *
- * <p>
- * JAXB providers are allowed to use whatever class that implements
- * the ValidationEvent interface. This class is just provided for a
- * convenience.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
- * @see javax.xml.bind.NotIdentifiableEvent
- * @see javax.xml.bind.Validator
- * @see javax.xml.bind.ValidationEventHandler
- * @see javax.xml.bind.ValidationEvent
- * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
- */
-public class NotIdentifiableEventImpl
- extends ValidationEventImpl
- implements javax.xml.bind.NotIdentifiableEvent {
-
- /**
- * Create a new NotIdentifiableEventImpl.
- *
- * @param _severity The severity value for this event. Must be one of
- * ValidationEvent.WARNING, ValidationEvent.ERROR, or
- * ValidationEvent.FATAL_ERROR
- * @param _message The text message for this event - may be null.
- * @param _locator The locator object for this event - may be null.
- * @throws IllegalArgumentException if an illegal severity field is supplied
- */
- public NotIdentifiableEventImpl( int _severity, String _message,
- ValidationEventLocator _locator) {
-
- super(_severity, _message, _locator);
- }
-
- /**
- * Create a new NotIdentifiableEventImpl.
- *
- * @param _severity The severity value for this event. Must be one of
- * ValidationEvent.WARNING, ValidationEvent.ERROR, or
- * ValidationEvent.FATAL_ERROR
- * @param _message The text message for this event - may be null.
- * @param _locator The locator object for this event - may be null.
- * @param _linkedException An optional linked exception that may provide
- * additional information about the event - may be null.
- * @throws IllegalArgumentException if an illegal severity field is supplied
- */
- public NotIdentifiableEventImpl( int _severity, String _message,
- ValidationEventLocator _locator,
- Throwable _linkedException) {
-
- super(_severity, _message, _locator, _linkedException);
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/helpers/ParseConversionEventImpl.java b/src/share/jaxws_classes/javax/xml/bind/helpers/ParseConversionEventImpl.java
deleted file mode 100644
index 92b50484..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/helpers/ParseConversionEventImpl.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.helpers;
-
-import javax.xml.bind.ParseConversionEvent;
-import javax.xml.bind.ValidationEventLocator;
-
-/**
- * Default implementation of the ParseConversionEvent interface.
- *
- * <p>
- * JAXB providers are allowed to use whatever class that implements
- * the ValidationEvent interface. This class is just provided for a
- * convenience.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
- * @see javax.xml.bind.ParseConversionEvent
- * @see javax.xml.bind.Validator
- * @see javax.xml.bind.ValidationEventHandler
- * @see javax.xml.bind.ValidationEvent
- * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
- */
-public class ParseConversionEventImpl
- extends ValidationEventImpl
- implements ParseConversionEvent {
-
- /**
- * Create a new ParseConversionEventImpl.
- *
- * @param _severity The severity value for this event. Must be one of
- * ValidationEvent.WARNING, ValidationEvent.ERROR, or
- * ValidationEvent.FATAL_ERROR
- * @param _message The text message for this event - may be null.
- * @param _locator The locator object for this event - may be null.
- * @throws IllegalArgumentException if an illegal severity field is supplied
- */
- public ParseConversionEventImpl( int _severity, String _message,
- ValidationEventLocator _locator) {
-
- super(_severity, _message, _locator);
- }
-
- /**
- * Create a new ParseConversionEventImpl.
- *
- * @param _severity The severity value for this event. Must be one of
- * ValidationEvent.WARNING, ValidationEvent.ERROR, or
- * ValidationEvent.FATAL_ERROR
- * @param _message The text message for this event - may be null.
- * @param _locator The locator object for this event - may be null.
- * @param _linkedException An optional linked exception that may provide
- * additional information about the event - may be null.
- * @throws IllegalArgumentException if an illegal severity field is supplied
- */
- public ParseConversionEventImpl( int _severity, String _message,
- ValidationEventLocator _locator,
- Throwable _linkedException) {
-
- super(_severity, _message, _locator, _linkedException);
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/helpers/PrintConversionEventImpl.java b/src/share/jaxws_classes/javax/xml/bind/helpers/PrintConversionEventImpl.java
deleted file mode 100644
index 00de3b15..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/helpers/PrintConversionEventImpl.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.helpers;
-
-import javax.xml.bind.PrintConversionEvent;
-import javax.xml.bind.ValidationEventLocator;
-
-/**
- * Default implementation of the PrintConversionEvent interface.
- *
- * <p>
- * JAXB providers are allowed to use whatever class that implements
- * the ValidationEvent interface. This class is just provided for a
- * convenience.
- *
- * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
- * @see javax.xml.bind.PrintConversionEvent
- * @see javax.xml.bind.Validator
- * @see javax.xml.bind.ValidationEventHandler
- * @see javax.xml.bind.ValidationEvent
- * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
- */
-public class PrintConversionEventImpl
- extends ValidationEventImpl
- implements PrintConversionEvent {
-
- /**
- * Create a new PrintConversionEventImpl.
- *
- * @param _severity The severity value for this event. Must be one of
- * ValidationEvent.WARNING, ValidationEvent.ERROR, or
- * ValidationEvent.FATAL_ERROR
- * @param _message The text message for this event - may be null.
- * @param _locator The locator object for this event - may be null.
- * @throws IllegalArgumentException if an illegal severity field is supplied
- */
- public PrintConversionEventImpl( int _severity, String _message,
- ValidationEventLocator _locator) {
-
- super(_severity, _message, _locator);
- }
-
- /**
- * Create a new PrintConversionEventImpl.
- *
- * @param _severity The severity value for this event. Must be one of
- * ValidationEvent.WARNING, ValidationEvent.ERROR, or
- * ValidationEvent.FATAL_ERROR
- * @param _message The text message for this event - may be null.
- * @param _locator The locator object for this event - may be null.
- * @param _linkedException An optional linked exception that may provide
- * additional information about the event - may be null.
- * @throws IllegalArgumentException if an illegal severity field is supplied
- */
- public PrintConversionEventImpl( int _severity, String _message,
- ValidationEventLocator _locator,
- Throwable _linkedException) {
-
- super(_severity, _message, _locator, _linkedException);
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventImpl.java b/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventImpl.java
deleted file mode 100644
index c3570006..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventImpl.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.helpers;
-
-import java.text.MessageFormat;
-
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.ValidationEventLocator;
-
-/**
- * Default implementation of the ValidationEvent interface.
- *
- * <p>
- * JAXB providers are allowed to use whatever class that implements
- * the ValidationEvent interface. This class is just provided for a
- * convenience.
- *
- * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li></ul>
- * @see javax.xml.bind.Validator
- * @see javax.xml.bind.ValidationEventHandler
- * @see javax.xml.bind.ValidationEvent
- * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
- */
-public class ValidationEventImpl implements ValidationEvent
-{
-
- /**
- * Create a new ValidationEventImpl.
- *
- * @param _severity The severity value for this event. Must be one of
- * ValidationEvent.WARNING, ValidationEvent.ERROR, or
- * ValidationEvent.FATAL_ERROR
- * @param _message The text message for this event - may be null.
- * @param _locator The locator object for this event - may be null.
- * @throws IllegalArgumentException if an illegal severity field is supplied
- */
- public ValidationEventImpl( int _severity, String _message,
- ValidationEventLocator _locator ) {
-
- this(_severity,_message,_locator,null);
- }
-
- /**
- * Create a new ValidationEventImpl.
- *
- * @param _severity The severity value for this event. Must be one of
- * ValidationEvent.WARNING, ValidationEvent.ERROR, or
- * ValidationEvent.FATAL_ERROR
- * @param _message The text message for this event - may be null.
- * @param _locator The locator object for this event - may be null.
- * @param _linkedException An optional linked exception that may provide
- * additional information about the event - may be null.
- * @throws IllegalArgumentException if an illegal severity field is supplied
- */
- public ValidationEventImpl( int _severity, String _message,
- ValidationEventLocator _locator,
- Throwable _linkedException ) {
-
- setSeverity( _severity );
- this.message = _message;
- this.locator = _locator;
- this.linkedException = _linkedException;
- }
-
- private int severity;
- private String message;
- private Throwable linkedException;
- private ValidationEventLocator locator;
-
- public int getSeverity() {
- return severity;
- }
-
-
- /**
- * Set the severity field of this event.
- *
- * @param _severity Must be one of ValidationEvent.WARNING,
- * ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR.
- * @throws IllegalArgumentException if an illegal severity field is supplied
- */
- public void setSeverity( int _severity ) {
-
- if( _severity != ValidationEvent.WARNING &&
- _severity != ValidationEvent.ERROR &&
- _severity != ValidationEvent.FATAL_ERROR ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.ILLEGAL_SEVERITY ) );
- }
-
- this.severity = _severity;
- }
-
- public String getMessage() {
- return message;
- }
- /**
- * Set the message field of this event.
- *
- * @param _message String message - may be null.
- */
- public void setMessage( String _message ) {
- this.message = _message;
- }
-
- public Throwable getLinkedException() {
- return linkedException;
- }
- /**
- * Set the linked exception field of this event.
- *
- * @param _linkedException Optional linked exception - may be null.
- */
- public void setLinkedException( Throwable _linkedException ) {
- this.linkedException = _linkedException;
- }
-
- public ValidationEventLocator getLocator() {
- return locator;
- }
- /**
- * Set the locator object for this event.
- *
- * @param _locator The locator - may be null.
- */
- public void setLocator( ValidationEventLocator _locator ) {
- this.locator = _locator;
- }
-
- /**
- * Returns a string representation of this object in a format
- * helpful to debugging.
- *
- * @see Object#equals(Object)
- */
- public String toString() {
- String s;
- switch(getSeverity()) {
- case WARNING: s="WARNING";break;
- case ERROR: s="ERROR";break;
- case FATAL_ERROR: s="FATAL_ERROR";break;
- default: s=String.valueOf(getSeverity());break;
- }
- return MessageFormat.format("[severity={0},message={1},locator={2}]",
- new Object[]{
- s,
- getMessage(),
- getLocator()
- });
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventLocatorImpl.java b/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventLocatorImpl.java
deleted file mode 100644
index 36da7265..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/helpers/ValidationEventLocatorImpl.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.helpers;
-
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.text.MessageFormat;
-
-import javax.xml.bind.ValidationEventLocator;
-import org.w3c.dom.Node;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXParseException;
-
-/**
- * Default implementation of the ValidationEventLocator interface.
- *
- * <p>
- * JAXB providers are allowed to use whatever class that implements
- * the ValidationEventLocator interface. This class is just provided for a
- * convenience.
- *
- * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li></ul>
- * @see javax.xml.bind.Validator
- * @see javax.xml.bind.ValidationEventHandler
- * @see javax.xml.bind.ValidationEvent
- * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
- */
-public class ValidationEventLocatorImpl implements ValidationEventLocator
-{
- /**
- * Creates an object with all fields unavailable.
- */
- public ValidationEventLocatorImpl() {
- }
-
- /**
- * Constructs an object from an org.xml.sax.Locator.
- *
- * The object's ColumnNumber, LineNumber, and URL become available from the
- * values returned by the locator's getColumnNumber(), getLineNumber(), and
- * getSystemId() methods respectively. Node, Object, and Offset are not
- * available.
- *
- * @param loc the SAX Locator object that will be used to populate this
- * event locator.
- * @throws IllegalArgumentException if the Locator is null
- */
- public ValidationEventLocatorImpl( Locator loc ) {
- if( loc == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, "loc" ) );
- }
-
- this.url = toURL(loc.getSystemId());
- this.columnNumber = loc.getColumnNumber();
- this.lineNumber = loc.getLineNumber();
- }
-
- /**
- * Constructs an object from the location information of a SAXParseException.
- *
- * The object's ColumnNumber, LineNumber, and URL become available from the
- * values returned by the locator's getColumnNumber(), getLineNumber(), and
- * getSystemId() methods respectively. Node, Object, and Offset are not
- * available.
- *
- * @param e the SAXParseException object that will be used to populate this
- * event locator.
- * @throws IllegalArgumentException if the SAXParseException is null
- */
- public ValidationEventLocatorImpl( SAXParseException e ) {
- if( e == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, "e" ) );
- }
-
- this.url = toURL(e.getSystemId());
- this.columnNumber = e.getColumnNumber();
- this.lineNumber = e.getLineNumber();
- }
-
- /**
- * Constructs an object that points to a DOM Node.
- *
- * The object's Node becomes available. ColumnNumber, LineNumber, Object,
- * Offset, and URL are not available.
- *
- * @param _node the DOM Node object that will be used to populate this
- * event locator.
- * @throws IllegalArgumentException if the Node is null
- */
- public ValidationEventLocatorImpl(Node _node) {
- if( _node == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, "_node" ) );
- }
-
- this.node = _node;
- }
-
- /**
- * Constructs an object that points to a JAXB content object.
- *
- * The object's Object becomes available. ColumnNumber, LineNumber, Node,
- * Offset, and URL are not available.
- *
- * @param _object the Object that will be used to populate this
- * event locator.
- * @throws IllegalArgumentException if the Object is null
- */
- public ValidationEventLocatorImpl(Object _object) {
- if( _object == null ) {
- throw new IllegalArgumentException(
- Messages.format( Messages.MUST_NOT_BE_NULL, "_object" ) );
- }
-
- this.object = _object;
- }
-
- /** Converts a system ID to an URL object. */
- private static URL toURL( String systemId ) {
- try {
- return new URL(systemId);
- } catch( MalformedURLException e ) {
- // TODO: how should we handle system id here?
- return null; // for now
- }
- }
-
- private URL url = null;
- private int offset = -1;
- private int lineNumber = -1;
- private int columnNumber = -1;
- private Object object = null;
- private Node node = null;
-
-
- /**
- * @see javax.xml.bind.ValidationEventLocator#getURL()
- */
- public URL getURL() {
- return url;
- }
-
- /**
- * Set the URL field on this event locator. Null values are allowed.
- *
- * @param _url the url
- */
- public void setURL( URL _url ) {
- this.url = _url;
- }
-
- /**
- * @see javax.xml.bind.ValidationEventLocator#getOffset()
- */
- public int getOffset() {
- return offset;
- }
-
- /**
- * Set the offset field on this event locator.
- *
- * @param _offset the offset
- */
- public void setOffset( int _offset ) {
- this.offset = _offset;
- }
-
- /**
- * @see javax.xml.bind.ValidationEventLocator#getLineNumber()
- */
- public int getLineNumber() {
- return lineNumber;
- }
-
- /**
- * Set the lineNumber field on this event locator.
- *
- * @param _lineNumber the line number
- */
- public void setLineNumber( int _lineNumber ) {
- this.lineNumber = _lineNumber;
- }
-
- /**
- * @see javax.xml.bind.ValidationEventLocator#getColumnNumber()
- */
- public int getColumnNumber() {
- return columnNumber;
- }
-
- /**
- * Set the columnNumber field on this event locator.
- *
- * @param _columnNumber the column number
- */
- public void setColumnNumber( int _columnNumber ) {
- this.columnNumber = _columnNumber;
- }
-
- /**
- * @see javax.xml.bind.ValidationEventLocator#getObject()
- */
- public Object getObject() {
- return object;
- }
-
- /**
- * Set the Object field on this event locator. Null values are allowed.
- *
- * @param _object the java content object
- */
- public void setObject( Object _object ) {
- this.object = _object;
- }
-
- /**
- * @see javax.xml.bind.ValidationEventLocator#getNode()
- */
- public Node getNode() {
- return node;
- }
-
- /**
- * Set the Node field on this event locator. Null values are allowed.
- *
- * @param _node the Node
- */
- public void setNode( Node _node ) {
- this.node = _node;
- }
-
- /**
- * Returns a string representation of this object in a format
- * helpful to debugging.
- *
- * @see Object#equals(Object)
- */
- public String toString() {
- return MessageFormat.format("[node={0},object={1},url={2},line={3},col={4},offset={5}]",
- getNode(),
- getObject(),
- getURL(),
- String.valueOf(getLineNumber()),
- String.valueOf(getColumnNumber()),
- String.valueOf(getOffset()));
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/helpers/package.html b/src/share/jaxws_classes/javax/xml/bind/helpers/package.html
deleted file mode 100644
index 31a91a6d..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/helpers/package.html
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!--
- Copyright (c) 2003, 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.
--->
-
-<html>
- <head>
-
-
- </head>
-
- <body bgcolor="white">
-
- <p>
- <B>JAXB Provider Use Only:</b> Provides partial default implementations for
- some of the <tt>javax.xml.bind</tt> interfaces.
-
- <p>
- JAXB Providers can extend these classes and implement the abstract
- methods.
-
- <h2>Package Specification</h2>
-
- <ul>
- <li><a href="http://java.sun.com/xml/downloads/jaxb.html">JAXB
- Specification</a>
- </ul>
-
- <h2>Related Documentation</h2>
-
- For overviews, tutorials, examples, guides, and tool documentation,
- please see:
- <ul>
- <li>The <a href="http://java.sun.com/xml/jaxb/index.html">JAXB
- Website</a>
- </ul>
-
- <!-- Put @see and @since tags down here. -->
-
- </body>
-</html>
-
-
diff --git a/src/share/jaxws_classes/javax/xml/bind/package.html b/src/share/jaxws_classes/javax/xml/bind/package.html
deleted file mode 100644
index 524ae643..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/package.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!--
- Copyright (c) 2003, 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.
--->
-
-<html>
- <head>
-
-
- </head>
-
- <body bgcolor="white">
-
- <p>
- Provides a runtime binding framework for client applications including
- unmarshalling, marshalling, and validation capabilities.
-
- <p>
- <tt>JAXBContext</tt> is the client-entry point to the runtime binding
- framework.
-
-
- <h2>Package Specification</h2>
-
- <ul>
- <li><a href="http://java.sun.com/xml/downloads/jaxb.html">JAXB
- Specification</a>
- </ul>
-
- <h2>Related Documentation</h2>
-
- For overviews, tutorials, examples, guides, and tool documentation,
- please see:
- <ul>
- <li>The <a href="http://java.sun.com/xml/jaxb/index.html">JAXB
- Website</a>
- </ul>
-
- <!-- Put @see and @since tags down here. -->
-
- </body>
-</html>
-
-
diff --git a/src/share/jaxws_classes/javax/xml/bind/util/JAXBResult.java b/src/share/jaxws_classes/javax/xml/bind/util/JAXBResult.java
deleted file mode 100644
index fbf7caac..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/util/JAXBResult.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.util;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.UnmarshallerHandler;
-import javax.xml.transform.sax.SAXResult;
-
-/**
- * JAXP {@link javax.xml.transform.Result} implementation
- * that unmarshals a JAXB object.
- *
- * <p>
- * This utility class is useful to combine JAXB with
- * other Java/XML technologies.
- *
- * <p>
- * The following example shows how to use JAXB to unmarshal a document
- * resulting from an XSLT transformation.
- *
- * <blockquote>
- * <pre>
- * JAXBResult result = new JAXBResult(
- * JAXBContext.newInstance("org.acme.foo") );
- *
- * // set up XSLT transformation
- * TransformerFactory tf = TransformerFactory.newInstance();
- * Transformer t = tf.newTransformer(new StreamSource("test.xsl"));
- *
- * // run transformation
- * t.transform(new StreamSource("document.xml"),result);
- *
- * // obtain the unmarshalled content tree
- * Object o = result.getResult();
- * </pre>
- * </blockquote>
- *
- * <p>
- * The fact that JAXBResult derives from SAXResult is an implementation
- * detail. Thus in general applications are strongly discouraged from
- * accessing methods defined on SAXResult.
- *
- * <p>
- * In particular it shall never attempt to call the setHandler,
- * setLexicalHandler, and setSystemId methods.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class JAXBResult extends SAXResult {
-
- /**
- * Creates a new instance that uses the specified
- * JAXBContext to unmarshal.
- *
- * @param context The JAXBContext that will be used to create the
- * necessary Unmarshaller. This parameter must not be null.
- * @exception JAXBException if an error is encountered while creating the
- * JAXBResult or if the context parameter is null.
- */
- public JAXBResult( JAXBContext context ) throws JAXBException {
- this( ( context == null ) ? assertionFailed() : context.createUnmarshaller() );
- }
-
- /**
- * Creates a new instance that uses the specified
- * Unmarshaller to unmarshal an object.
- *
- * <p>
- * This JAXBResult object will use the specified Unmarshaller
- * instance. It is the caller's responsibility not to use the
- * same Unmarshaller for other purposes while it is being
- * used by this object.
- *
- * <p>
- * The primary purpose of this method is to allow the client
- * to configure Unmarshaller. Unless you know what you are doing,
- * it's easier and safer to pass a JAXBContext.
- *
- * @param _unmarshaller the unmarshaller. This parameter must not be null.
- * @throws JAXBException if an error is encountered while creating the
- * JAXBResult or the Unmarshaller parameter is null.
- */
- public JAXBResult( Unmarshaller _unmarshaller ) throws JAXBException {
- if( _unmarshaller == null )
- throw new JAXBException(
- Messages.format( Messages.RESULT_NULL_UNMARSHALLER ) );
-
- this.unmarshallerHandler = _unmarshaller.getUnmarshallerHandler();
-
- super.setHandler(unmarshallerHandler);
- }
-
- /**
- * Unmarshaller that will be used to unmarshal
- * the input documents.
- */
- private final UnmarshallerHandler unmarshallerHandler;
-
- /**
- * Gets the unmarshalled object created by the transformation.
- *
- * @return
- * Always return a non-null object.
- *
- * @exception IllegalStateException
- * if this method is called before an object is unmarshalled.
- *
- * @exception JAXBException
- * if there is any unmarshalling error.
- * Note that the implementation is allowed to throw SAXException
- * during the parsing when it finds an error.
- */
- public Object getResult() throws JAXBException {
- return unmarshallerHandler.getResult();
- }
-
- /**
- * Hook to throw exception from the middle of a contructor chained call
- * to this
- */
- private static Unmarshaller assertionFailed() throws JAXBException {
- throw new JAXBException( Messages.format( Messages.RESULT_NULL_CONTEXT ) );
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/util/JAXBSource.java b/src/share/jaxws_classes/javax/xml/bind/util/JAXBSource.java
deleted file mode 100644
index 51589461..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/util/JAXBSource.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.util;
-
-import org.xml.sax.ContentHandler;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.transform.sax.SAXSource;
-import org.xml.sax.XMLFilter;
-
-/**
- * JAXP {@link javax.xml.transform.Source} implementation
- * that marshals a JAXB-generated object.
- *
- * <p>
- * This utility class is useful to combine JAXB with
- * other Java/XML technologies.
- *
- * <p>
- * The following example shows how to use JAXB to marshal a document
- * for transformation by XSLT.
- *
- * <blockquote>
- * <pre>
- * MyObject o = // get JAXB content tree
- *
- * // jaxbContext is a JAXBContext object from which 'o' is created.
- * JAXBSource source = new JAXBSource( jaxbContext, o );
- *
- * // set up XSLT transformation
- * TransformerFactory tf = TransformerFactory.newInstance();
- * Transformer t = tf.newTransformer(new StreamSource("test.xsl"));
- *
- * // run transformation
- * t.transform(source,new StreamResult(System.out));
- * </pre>
- * </blockquote>
- *
- * <p>
- * The fact that JAXBSource derives from SAXSource is an implementation
- * detail. Thus in general applications are strongly discouraged from
- * accessing methods defined on SAXSource. In particular,
- * the setXMLReader and setInputSource methods shall never be called.
- * The XMLReader object obtained by the getXMLReader method shall
- * be used only for parsing the InputSource object returned by
- * the getInputSource method.
- *
- * <p>
- * Similarly the InputSource object obtained by the getInputSource
- * method shall be used only for being parsed by the XMLReader object
- * returned by the getXMLReader.
- *
- * @author
- * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
- */
-public class JAXBSource extends SAXSource {
-
- /**
- * Creates a new {@link javax.xml.transform.Source} for the given content object.
- *
- * @param context
- * JAXBContext that was used to create
- * <code>contentObject</code>. This context is used
- * to create a new instance of marshaller and must not be null.
- * @param contentObject
- * An instance of a JAXB-generated class, which will be
- * used as a {@link javax.xml.transform.Source} (by marshalling it into XML). It must
- * not be null.
- * @throws JAXBException if an error is encountered while creating the
- * JAXBSource or if either of the parameters are null.
- */
- public JAXBSource( JAXBContext context, Object contentObject )
- throws JAXBException {
-
- this(
- ( context == null ) ?
- assertionFailed( Messages.format( Messages.SOURCE_NULL_CONTEXT ) ) :
- context.createMarshaller(),
-
- ( contentObject == null ) ?
- assertionFailed( Messages.format( Messages.SOURCE_NULL_CONTENT ) ) :
- contentObject);
- }
-
- /**
- * Creates a new {@link javax.xml.transform.Source} for the given content object.
- *
- * @param marshaller
- * A marshaller instance that will be used to marshal
- * <code>contentObject</code> into XML. This must be
- * created from a JAXBContext that was used to build
- * <code>contentObject</code> and must not be null.
- * @param contentObject
- * An instance of a JAXB-generated class, which will be
- * used as a {@link javax.xml.transform.Source} (by marshalling it into XML). It must
- * not be null.
- * @throws JAXBException if an error is encountered while creating the
- * JAXBSource or if either of the parameters are null.
- */
- public JAXBSource( Marshaller marshaller, Object contentObject )
- throws JAXBException {
-
- if( marshaller == null )
- throw new JAXBException(
- Messages.format( Messages.SOURCE_NULL_MARSHALLER ) );
-
- if( contentObject == null )
- throw new JAXBException(
- Messages.format( Messages.SOURCE_NULL_CONTENT ) );
-
- this.marshaller = marshaller;
- this.contentObject = contentObject;
-
- super.setXMLReader(pseudoParser);
- // pass a dummy InputSource. We don't care
- super.setInputSource(new InputSource());
- }
-
- private final Marshaller marshaller;
- private final Object contentObject;
-
- // this object will pretend as an XMLReader.
- // no matter what parameter is specified to the parse method,
- // it just parse the contentObject.
- private final XMLReader pseudoParser = new XMLReader() {
- public boolean getFeature(String name) throws SAXNotRecognizedException {
- if(name.equals("http://xml.org/sax/features/namespaces"))
- return true;
- if(name.equals("http://xml.org/sax/features/namespace-prefixes"))
- return false;
- throw new SAXNotRecognizedException(name);
- }
-
- public void setFeature(String name, boolean value) throws SAXNotRecognizedException {
- if(name.equals("http://xml.org/sax/features/namespaces") && value)
- return;
- if(name.equals("http://xml.org/sax/features/namespace-prefixes") && !value)
- return;
- throw new SAXNotRecognizedException(name);
- }
-
- public Object getProperty(String name) throws SAXNotRecognizedException {
- if( "http://xml.org/sax/properties/lexical-handler".equals(name) ) {
- return lexicalHandler;
- }
- throw new SAXNotRecognizedException(name);
- }
-
- public void setProperty(String name, Object value) throws SAXNotRecognizedException {
- if( "http://xml.org/sax/properties/lexical-handler".equals(name) ) {
- this.lexicalHandler = (LexicalHandler)value;
- return;
- }
- throw new SAXNotRecognizedException(name);
- }
-
- private LexicalHandler lexicalHandler;
-
- // we will store this value but never use it by ourselves.
- private EntityResolver entityResolver;
- public void setEntityResolver(EntityResolver resolver) {
- this.entityResolver = resolver;
- }
- public EntityResolver getEntityResolver() {
- return entityResolver;
- }
-
- private DTDHandler dtdHandler;
- public void setDTDHandler(DTDHandler handler) {
- this.dtdHandler = handler;
- }
- public DTDHandler getDTDHandler() {
- return dtdHandler;
- }
-
- // SAX allows ContentHandler to be changed during the parsing,
- // but JAXB doesn't. So this repeater will sit between those
- // two components.
- private XMLFilter repeater = new XMLFilterImpl();
-
- public void setContentHandler(ContentHandler handler) {
- repeater.setContentHandler(handler);
- }
- public ContentHandler getContentHandler() {
- return repeater.getContentHandler();
- }
-
- private ErrorHandler errorHandler;
- public void setErrorHandler(ErrorHandler handler) {
- this.errorHandler = handler;
- }
- public ErrorHandler getErrorHandler() {
- return errorHandler;
- }
-
- public void parse(InputSource input) throws SAXException {
- parse();
- }
-
- public void parse(String systemId) throws SAXException {
- parse();
- }
-
- public void parse() throws SAXException {
- // parses a content object by using the given marshaller
- // SAX events will be sent to the repeater, and the repeater
- // will further forward it to an appropriate component.
- try {
- marshaller.marshal( contentObject, (XMLFilterImpl)repeater );
- } catch( JAXBException e ) {
- // wrap it to a SAXException
- SAXParseException se =
- new SAXParseException( e.getMessage(),
- null, null, -1, -1, e );
-
- // if the consumer sets an error handler, it is our responsibility
- // to notify it.
- if(errorHandler!=null)
- errorHandler.fatalError(se);
-
- // this is a fatal error. Even if the error handler
- // returns, we will abort anyway.
- throw se;
- }
- }
- };
-
- /**
- * Hook to throw exception from the middle of a contructor chained call
- * to this
- */
- private static Marshaller assertionFailed( String message )
- throws JAXBException {
-
- throw new JAXBException( message );
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/util/Messages.java b/src/share/jaxws_classes/javax/xml/bind/util/Messages.java
deleted file mode 100644
index 4a61d882..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/util/Messages.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.util;
-
-import java.text.MessageFormat;
-import java.util.ResourceBundle;
-
-/**
- * Formats error messages.
- */
-class Messages
-{
- static String format( String property ) {
- return format( property, null );
- }
-
- static String format( String property, Object arg1 ) {
- return format( property, new Object[]{arg1} );
- }
-
- static String format( String property, Object arg1, Object arg2 ) {
- return format( property, new Object[]{arg1,arg2} );
- }
-
- static String format( String property, Object arg1, Object arg2, Object arg3 ) {
- return format( property, new Object[]{arg1,arg2,arg3} );
- }
-
- // add more if necessary.
-
- /** Loads a string resource and formats it with specified arguments. */
- static String format( String property, Object[] args ) {
- String text = ResourceBundle.getBundle(Messages.class.getName()).getString(property);
- return MessageFormat.format(text,args);
- }
-
-//
-//
-// Message resources
-//
-//
- static final String UNRECOGNIZED_SEVERITY = // 1 arg
- "ValidationEventCollector.UnrecognizedSeverity";
-
- static final String RESULT_NULL_CONTEXT = // 0 args
- "JAXBResult.NullContext";
-
- static final String RESULT_NULL_UNMARSHALLER = // 0 arg
- "JAXBResult.NullUnmarshaller";
-
- static final String SOURCE_NULL_CONTEXT = // 0 args
- "JAXBSource.NullContext";
-
- static final String SOURCE_NULL_CONTENT = // 0 arg
- "JAXBSource.NullContent";
-
- static final String SOURCE_NULL_MARSHALLER = // 0 arg
- "JAXBSource.NullMarshaller";
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/util/Messages.properties b/src/share/jaxws_classes/javax/xml/bind/util/Messages.properties
deleted file mode 100644
index 6f140af5..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/util/Messages.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 2003, 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.
-#
-
-ValidationEventCollector.UnrecognizedSeverity = \
- Unrecognized event severity field "{0}"
-
-JAXBResult.NullContext = \
- JAXBContext can not be null
-
-JAXBResult.NullUnmarshaller = \
- Unmarshaller can not be null
-
-JAXBSource.NullContext = \
- JAXBContext can not be null
-
-JAXBSource.NullContent = \
- Content object can not be null
-
-JAXBSource.NullMarshaller = \
- Marshaller can not be null
diff --git a/src/share/jaxws_classes/javax/xml/bind/util/ValidationEventCollector.java b/src/share/jaxws_classes/javax/xml/bind/util/ValidationEventCollector.java
deleted file mode 100644
index 9cfd2abb..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/util/ValidationEventCollector.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.bind.util;
-
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.ValidationEventHandler;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * {@link javax.xml.bind.ValidationEventHandler ValidationEventHandler}
- * implementation that collects all events.
- *
- * <p>
- * To use this class, create a new instance and pass it to the setEventHandler
- * method of the Validator, Unmarshaller, Marshaller class. After the call to
- * validate or unmarshal completes, call the getEvents method to retrieve all
- * the reported errors and warnings.
- *
- * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
- * @see javax.xml.bind.Validator
- * @see javax.xml.bind.ValidationEventHandler
- * @see javax.xml.bind.ValidationEvent
- * @see javax.xml.bind.ValidationEventLocator
- * @since JAXB1.0
- */
-public class ValidationEventCollector implements ValidationEventHandler
-{
- private final List<ValidationEvent> events = new ArrayList<ValidationEvent>();
-
- /**
- * Return an array of ValidationEvent objects containing a copy of each of
- * the collected errors and warnings.
- *
- * @return
- * a copy of all the collected errors and warnings or an empty array
- * if there weren't any
- */
- public ValidationEvent[] getEvents() {
- return events.toArray(new ValidationEvent[events.size()]);
- }
-
- /**
- * Clear all collected errors and warnings.
- */
- public void reset() {
- events.clear();
- }
-
- /**
- * Returns true if this event collector contains at least one
- * ValidationEvent.
- *
- * @return true if this event collector contains at least one
- * ValidationEvent, false otherwise
- */
- public boolean hasEvents() {
- return !events.isEmpty();
- }
-
- public boolean handleEvent( ValidationEvent event ) {
- events.add(event);
-
- boolean retVal = true;
- switch( event.getSeverity() ) {
- case ValidationEvent.WARNING:
- retVal = true; // continue validation
- break;
- case ValidationEvent.ERROR:
- retVal = true; // continue validation
- break;
- case ValidationEvent.FATAL_ERROR:
- retVal = false; // halt validation
- break;
- default:
- _assert( false,
- Messages.format( Messages.UNRECOGNIZED_SEVERITY,
- event.getSeverity() ) );
- break;
- }
-
- return retVal;
- }
-
- private static void _assert( boolean b, String msg ) {
- if( !b ) {
- throw new InternalError( msg );
- }
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/bind/util/package.html b/src/share/jaxws_classes/javax/xml/bind/util/package.html
deleted file mode 100644
index 551f4f1f..00000000
--- a/src/share/jaxws_classes/javax/xml/bind/util/package.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!--
- Copyright (c) 2003, 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.
--->
-
-<html>
- <head>
-
-
- </head>
-
- <body bgcolor="white">
-
- <p>
- Useful client utility classes.
-
- <h2>Package Specification</h2>
-
- <ul>
- <li><a href="http://java.sun.com/xml/downloads/jaxb.html">JAXB
- Specification</a>
- </ul>
-
- <h2>Related Documentation</h2>
-
- For overviews, tutorials, examples, guides, and tool documentation,
- please see:
- <ul>
- <li>The <a href="http://java.sun.com/xml/jaxb/index.html">JAXB
- Website</a>
- </ul>
-
- <!-- Put @see and @since tags down here. -->
-
- </body>
-</html>
-
-
diff --git a/src/share/jaxws_classes/javax/xml/soap/AttachmentPart.java b/src/share/jaxws_classes/javax/xml/soap/AttachmentPart.java
deleted file mode 100644
index b1fabb0f..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/AttachmentPart.java
+++ /dev/null
@@ -1,526 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.util.Iterator;
-
-import javax.activation.DataHandler;
-
-/**
- * A single attachment to a <code>SOAPMessage</code> object. A <code>SOAPMessage</code>
- * object may contain zero, one, or many <code>AttachmentPart</code> objects.
- * Each <code>AttachmentPart</code> object consists of two parts,
- * application-specific content and associated MIME headers. The
- * MIME headers consists of name/value pairs that can be used to
- * identify and describe the content.
- * <p>
- * An <code>AttachmentPart</code> object must conform to certain standards.
- * <OL>
- * <LI>It must conform to <a href="http://www.ietf.org/rfc/rfc2045.txt">
- * MIME [RFC2045] standards</a>
- * <LI>It MUST contain content
- * <LI>The header portion MUST include the following header:
- * <UL>
- * <LI><code>Content-Type</code><br>
- * This header identifies the type of data in the content of an
- * <code>AttachmentPart</code> object and MUST conform to [RFC2045].
- * The following is an example of a Content-Type header:
- * <PRE>
- * Content-Type: application/xml
- * </PRE>
- * The following line of code, in which <code>ap</code> is an
- * <code>AttachmentPart</code> object, sets the header shown in
- * the previous example.
- * <PRE>
- * ap.setMimeHeader("Content-Type", "application/xml");
- * </PRE>
- * <p>
- * </UL>
- * </OL>
- * <p>
- * There are no restrictions on the content portion of an <code>
- * AttachmentPart</code> object. The content may be anything from a
- * simple plain text object to a complex XML document or image file.
- *
- * <p>
- * An <code>AttachmentPart</code> object is created with the method
- * <code>SOAPMessage.createAttachmentPart</code>. After setting its MIME headers,
- * the <code>AttachmentPart</code> object is added to the message
- * that created it with the method <code>SOAPMessage.addAttachmentPart</code>.
- *
- * <p>
- * The following code fragment, in which <code>m</code> is a
- * <code>SOAPMessage</code> object and <code>contentStringl</code> is a
- * <code>String</code>, creates an instance of <code>AttachmentPart</code>,
- * sets the <code>AttachmentPart</code> object with some content and
- * header information, and adds the <code>AttachmentPart</code> object to
- * the <code>SOAPMessage</code> object.
- * <PRE>
- * AttachmentPart ap1 = m.createAttachmentPart();
- * ap1.setContent(contentString1, "text/plain");
- * m.addAttachmentPart(ap1);
- * </PRE>
- *
- *
- * <p>
- * The following code fragment creates and adds a second
- * <code>AttachmentPart</code> instance to the same message. <code>jpegData</code>
- * is a binary byte buffer representing the jpeg file.
- * <PRE>
- * AttachmentPart ap2 = m.createAttachmentPart();
- * byte[] jpegData = ...;
- * ap2.setContent(new ByteArrayInputStream(jpegData), "image/jpeg");
- * m.addAttachmentPart(ap2);
- * </PRE>
- * <p>
- * The <code>getContent</code> method retrieves the contents and header from
- * an <code>AttachmentPart</code> object. Depending on the
- * <code>DataContentHandler</code> objects present, the returned
- * <code>Object</code> can either be a typed Java object corresponding
- * to the MIME type or an <code>InputStream</code> object that contains the
- * content as bytes.
- * <PRE>
- * String content1 = ap1.getContent();
- * java.io.InputStream content2 = ap2.getContent();
- * </PRE>
- *
- * The method <code>clearContent</code> removes all the content from an
- * <code>AttachmentPart</code> object but does not affect its header information.
- * <PRE>
- * ap1.clearContent();
- * </PRE>
- */
-
-public abstract class AttachmentPart {
- /**
- * Returns the number of bytes in this <code>AttachmentPart</code>
- * object.
- *
- * @return the size of this <code>AttachmentPart</code> object in bytes
- * or -1 if the size cannot be determined
- * @exception SOAPException if the content of this attachment is
- * corrupted of if there was an exception while trying
- * to determine the size.
- */
- public abstract int getSize() throws SOAPException;
-
- /**
- * Clears out the content of this <code>AttachmentPart</code> object.
- * The MIME header portion is left untouched.
- */
- public abstract void clearContent();
-
- /**
- * Gets the content of this <code>AttachmentPart</code> object as a Java
- * object. The type of the returned Java object depends on (1) the
- * <code>DataContentHandler</code> object that is used to interpret the bytes
- * and (2) the <code>Content-Type</code> given in the header.
- * <p>
- * For the MIME content types "text/plain", "text/html" and "text/xml", the
- * <code>DataContentHandler</code> object does the conversions to and
- * from the Java types corresponding to the MIME types.
- * For other MIME types,the <code>DataContentHandler</code> object
- * can return an <code>InputStream</code> object that contains the content data
- * as raw bytes.
- * <p>
- * A SAAJ-compliant implementation must, as a minimum, return a
- * <code>java.lang.String</code> object corresponding to any content
- * stream with a <code>Content-Type</code> value of
- * <code>text/plain</code>, a
- * <code>javax.xml.transform.stream.StreamSource</code> object corresponding to a
- * content stream with a <code>Content-Type</code> value of
- * <code>text/xml</code>, a <code>java.awt.Image</code> object
- * corresponding to a content stream with a
- * <code>Content-Type</code> value of <code>image/gif</code> or
- * <code>image/jpeg</code>. For those content types that an
- * installed <code>DataContentHandler</code> object does not understand, the
- * <code>DataContentHandler</code> object is required to return a
- * <code>java.io.InputStream</code> object with the raw bytes.
- *
- * @return a Java object with the content of this <code>AttachmentPart</code>
- * object
- *
- * @exception SOAPException if there is no content set into this
- * <code>AttachmentPart</code> object or if there was a data
- * transformation error
- */
- public abstract Object getContent() throws SOAPException;
-
- /**
- * Gets the content of this <code>AttachmentPart</code> object as an
- * InputStream as if a call had been made to <code>getContent</code> and no
- * <code>DataContentHandler</code> had been registered for the
- * <code>content-type</code> of this <code>AttachmentPart</code>.
- *<p>
- * Note that reading from the returned InputStream would result in consuming
- * the data in the stream. It is the responsibility of the caller to reset
- * the InputStream appropriately before calling a Subsequent API. If a copy
- * of the raw attachment content is required then the {@link #getRawContentBytes} API
- * should be used instead.
- *
- * @return an <code>InputStream</code> from which the raw data contained by
- * the <code>AttachmentPart</code> can be accessed.
- *
- * @throws SOAPException if there is no content set into this
- * <code>AttachmentPart</code> object or if there was a data
- * transformation error.
- *
- * @since SAAJ 1.3
- * @see #getRawContentBytes
- */
- public abstract InputStream getRawContent() throws SOAPException;
-
- /**
- * Gets the content of this <code>AttachmentPart</code> object as a
- * byte[] array as if a call had been made to <code>getContent</code> and no
- * <code>DataContentHandler</code> had been registered for the
- * <code>content-type</code> of this <code>AttachmentPart</code>.
- *
- * @return a <code>byte[]</code> array containing the raw data of the
- * <code>AttachmentPart</code>.
- *
- * @throws SOAPException if there is no content set into this
- * <code>AttachmentPart</code> object or if there was a data
- * transformation error.
- *
- * @since SAAJ 1.3
- */
- public abstract byte[] getRawContentBytes() throws SOAPException;
-
- /**
- * Returns an <code>InputStream</code> which can be used to obtain the
- * content of <code>AttachmentPart</code> as Base64 encoded
- * character data, this method would base64 encode the raw bytes
- * of the attachment and return.
- *
- * @return an <code>InputStream</code> from which the Base64 encoded
- * <code>AttachmentPart</code> can be read.
- *
- * @throws SOAPException if there is no content set into this
- * <code>AttachmentPart</code> object or if there was a data
- * transformation error.
- *
- * @since SAAJ 1.3
- */
- public abstract InputStream getBase64Content() throws SOAPException;
-
- /**
- * Sets the content of this attachment part to that of the given
- * <code>Object</code> and sets the value of the <code>Content-Type</code>
- * header to the given type. The type of the
- * <code>Object</code> should correspond to the value given for the
- * <code>Content-Type</code>. This depends on the particular
- * set of <code>DataContentHandler</code> objects in use.
- *
- *
- * @param object the Java object that makes up the content for
- * this attachment part
- * @param contentType the MIME string that specifies the type of
- * the content
- *
- * @exception IllegalArgumentException may be thrown if the contentType
- * does not match the type of the content object, or if there
- * was no <code>DataContentHandler</code> object for this
- * content object
- *
- * @see #getContent
- */
- public abstract void setContent(Object object, String contentType);
-
- /**
- * Sets the content of this attachment part to that contained by the
- * <code>InputStream</code> <code>content</code> and sets the value of the
- * <code>Content-Type</code> header to the value contained in
- * <code>contentType</code>.
- * <P>
- * A subsequent call to getSize() may not be an exact measure
- * of the content size.
- *
- * @param content the raw data to add to the attachment part
- * @param contentType the value to set into the <code>Content-Type</code>
- * header
- *
- * @exception SOAPException if an there is an error in setting the content
- * @exception NullPointerException if <code>content</code> is null
- * @since SAAJ 1.3
- */
- public abstract void setRawContent(InputStream content, String contentType) throws SOAPException;
-
- /**
- * Sets the content of this attachment part to that contained by the
- * <code>byte[]</code> array <code>content</code> and sets the value of the
- * <code>Content-Type</code> header to the value contained in
- * <code>contentType</code>.
- *
- * @param content the raw data to add to the attachment part
- * @param contentType the value to set into the <code>Content-Type</code>
- * header
- * @param offset the offset in the byte array of the content
- * @param len the number of bytes that form the content
- *
- * @exception SOAPException if an there is an error in setting the content
- * or content is null
- * @since SAAJ 1.3
- */
- public abstract void setRawContentBytes(
- byte[] content, int offset, int len, String contentType)
- throws SOAPException;
-
-
- /**
- * Sets the content of this attachment part from the Base64 source
- * <code>InputStream</code> and sets the value of the
- * <code>Content-Type</code> header to the value contained in
- * <code>contentType</code>, This method would first decode the base64
- * input and write the resulting raw bytes to the attachment.
- * <P>
- * A subsequent call to getSize() may not be an exact measure
- * of the content size.
- *
- * @param content the base64 encoded data to add to the attachment part
- * @param contentType the value to set into the <code>Content-Type</code>
- * header
- *
- * @exception SOAPException if an there is an error in setting the content
- * @exception NullPointerException if <code>content</code> is null
- *
- * @since SAAJ 1.3
- */
- public abstract void setBase64Content(
- InputStream content, String contentType) throws SOAPException;
-
-
- /**
- * Gets the <code>DataHandler</code> object for this <code>AttachmentPart</code>
- * object.
- *
- * @return the <code>DataHandler</code> object associated with this
- * <code>AttachmentPart</code> object
- *
- * @exception SOAPException if there is no data in
- * this <code>AttachmentPart</code> object
- */
- public abstract DataHandler getDataHandler()
- throws SOAPException;
-
- /**
- * Sets the given <code>DataHandler</code> object as the data handler
- * for this <code>AttachmentPart</code> object. Typically, on an incoming
- * message, the data handler is automatically set. When
- * a message is being created and populated with content, the
- * <code>setDataHandler</code> method can be used to get data from
- * various data sources into the message.
- *
- * @param dataHandler the <code>DataHandler</code> object to be set
- *
- * @exception IllegalArgumentException if there was a problem with
- * the specified <code>DataHandler</code> object
- */
- public abstract void setDataHandler(DataHandler dataHandler);
-
-
- /**
- * Gets the value of the MIME header whose name is "Content-ID".
- *
- * @return a <code>String</code> giving the value of the
- * "Content-ID" header or <code>null</code> if there
- * is none
- * @see #setContentId
- */
- public String getContentId() {
- String[] values = getMimeHeader("Content-ID");
- if (values != null && values.length > 0)
- return values[0];
- return null;
- }
-
- /**
- * Gets the value of the MIME header whose name is "Content-Location".
- *
- * @return a <code>String</code> giving the value of the
- * "Content-Location" header or <code>null</code> if there
- * is none
- */
- public String getContentLocation() {
- String[] values = getMimeHeader("Content-Location");
- if (values != null && values.length > 0)
- return values[0];
- return null;
- }
-
- /**
- * Gets the value of the MIME header whose name is "Content-Type".
- *
- * @return a <code>String</code> giving the value of the
- * "Content-Type" header or <code>null</code> if there
- * is none
- */
- public String getContentType() {
- String[] values = getMimeHeader("Content-Type");
- if (values != null && values.length > 0)
- return values[0];
- return null;
- }
-
- /**
- * Sets the MIME header whose name is "Content-ID" with the given value.
- *
- * @param contentId a <code>String</code> giving the value of the
- * "Content-ID" header
- *
- * @exception IllegalArgumentException if there was a problem with
- * the specified <code>contentId</code> value
- * @see #getContentId
- */
- public void setContentId(String contentId)
- {
- setMimeHeader("Content-ID", contentId);
- }
-
-
- /**
- * Sets the MIME header whose name is "Content-Location" with the given value.
- *
- *
- * @param contentLocation a <code>String</code> giving the value of the
- * "Content-Location" header
- * @exception IllegalArgumentException if there was a problem with
- * the specified content location
- */
- public void setContentLocation(String contentLocation)
- {
- setMimeHeader("Content-Location", contentLocation);
- }
-
- /**
- * Sets the MIME header whose name is "Content-Type" with the given value.
- *
- * @param contentType a <code>String</code> giving the value of the
- * "Content-Type" header
- *
- * @exception IllegalArgumentException if there was a problem with
- * the specified content type
- */
- public void setContentType(String contentType)
- {
- setMimeHeader("Content-Type", contentType);
- }
-
- /**
- * Removes all MIME headers that match the given name.
- *
- * @param header the string name of the MIME header/s to
- * be removed
- */
- public abstract void removeMimeHeader(String header);
-
- /**
- * Removes all the MIME header entries.
- */
- public abstract void removeAllMimeHeaders();
-
-
- /**
- * Gets all the values of the header identified by the given
- * <code>String</code>.
- *
- * @param name the name of the header; example: "Content-Type"
- * @return a <code>String</code> array giving the value for the
- * specified header
- * @see #setMimeHeader
- */
- public abstract String[] getMimeHeader(String name);
-
-
- /**
- * Changes the first header entry that matches the given name
- * to the given value, adding a new header if no existing header
- * matches. This method also removes all matching headers but the first. <p>
- *
- * Note that RFC822 headers can only contain US-ASCII characters.
- *
- * @param name a <code>String</code> giving the name of the header
- * for which to search
- * @param value a <code>String</code> giving the value to be set for
- * the header whose name matches the given name
- *
- * @exception IllegalArgumentException if there was a problem with
- * the specified mime header name or value
- */
- public abstract void setMimeHeader(String name, String value);
-
-
- /**
- * Adds a MIME header with the specified name and value to this
- * <code>AttachmentPart</code> object.
- * <p>
- * Note that RFC822 headers can contain only US-ASCII characters.
- *
- * @param name a <code>String</code> giving the name of the header
- * to be added
- * @param value a <code>String</code> giving the value of the header
- * to be added
- *
- * @exception IllegalArgumentException if there was a problem with
- * the specified mime header name or value
- */
- public abstract void addMimeHeader(String name, String value);
-
- /**
- * Retrieves all the headers for this <code>AttachmentPart</code> object
- * as an iterator over the <code>MimeHeader</code> objects.
- *
- * @return an <code>Iterator</code> object with all of the Mime
- * headers for this <code>AttachmentPart</code> object
- */
- public abstract Iterator getAllMimeHeaders();
-
- /**
- * Retrieves all <code>MimeHeader</code> objects that match a name in
- * the given array.
- *
- * @param names a <code>String</code> array with the name(s) of the
- * MIME headers to be returned
- * @return all of the MIME headers that match one of the names in the
- * given array as an <code>Iterator</code> object
- */
- public abstract Iterator getMatchingMimeHeaders(String[] names);
-
- /**
- * Retrieves all <code>MimeHeader</code> objects whose name does
- * not match a name in the given array.
- *
- * @param names a <code>String</code> array with the name(s) of the
- * MIME headers not to be returned
- * @return all of the MIME headers in this <code>AttachmentPart</code> object
- * except those that match one of the names in the
- * given array. The nonmatching MIME headers are returned as an
- * <code>Iterator</code> object.
- */
- public abstract Iterator getNonMatchingMimeHeaders(String[] names);
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/Detail.java b/src/share/jaxws_classes/javax/xml/soap/Detail.java
deleted file mode 100644
index 8746ef92..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/Detail.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A container for <code>DetailEntry</code> objects. <code>DetailEntry</code>
- * objects give detailed error information that is application-specific and
- * related to the <code>SOAPBody</code> object that contains it.
- *<P>
- * A <code>Detail</code> object, which is part of a <code>SOAPFault</code>
- * object, can be retrieved using the method <code>SOAPFault.getDetail</code>.
- * The <code>Detail</code> interface provides two methods. One creates a new
- * <code>DetailEntry</code> object and also automatically adds it to
- * the <code>Detail</code> object. The second method gets a list of the
- * <code>DetailEntry</code> objects contained in a <code>Detail</code>
- * object.
- * <P>
- * The following code fragment, in which <i>sf</i> is a <code>SOAPFault</code>
- * object, gets its <code>Detail</code> object (<i>d</i>), adds a new
- * <code>DetailEntry</code> object to <i>d</i>, and then gets a list of all the
- * <code>DetailEntry</code> objects in <i>d</i>. The code also creates a
- * <code>Name</code> object to pass to the method <code>addDetailEntry</code>.
- * The variable <i>se</i>, used to create the <code>Name</code> object,
- * is a <code>SOAPEnvelope</code> object.
- * <PRE>
- * Detail d = sf.getDetail();
- * Name name = se.createName("GetLastTradePrice", "WOMBAT",
- * "http://www.wombat.org/trader");
- * d.addDetailEntry(name);
- * Iterator it = d.getDetailEntries();
- * </PRE>
- */
-public interface Detail extends SOAPFaultElement {
-
- /**
- * Creates a new <code>DetailEntry</code> object with the given
- * name and adds it to this <code>Detail</code> object.
- *
- * @param name a <code>Name</code> object identifying the
- * new <code>DetailEntry</code> object
- *
- * @exception SOAPException thrown when there is a problem in adding a
- * DetailEntry object to this Detail object.
- *
- * @see Detail#addDetailEntry(QName qname)
- */
- public DetailEntry addDetailEntry(Name name) throws SOAPException;
-
- /**
- * Creates a new <code>DetailEntry</code> object with the given
- * QName and adds it to this <code>Detail</code> object. This method
- * is the preferred over the one using Name.
- *
- * @param qname a <code>QName</code> object identifying the
- * new <code>DetailEntry</code> object
- *
- * @exception SOAPException thrown when there is a problem in adding a
- * DetailEntry object to this Detail object.
- *
- * @see Detail#addDetailEntry(Name name)
- * @since SAAJ 1.3
- */
- public DetailEntry addDetailEntry(QName qname) throws SOAPException;
-
- /**
- * Gets an Iterator over all of the <code>DetailEntry</code>s in this <code>Detail</code> object.
- *
- * @return an <code>Iterator</code> object over the <code>DetailEntry</code>
- * objects in this <code>Detail</code> object
- */
- public Iterator getDetailEntries();
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/DetailEntry.java b/src/share/jaxws_classes/javax/xml/soap/DetailEntry.java
deleted file mode 100644
index b353cf65..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/DetailEntry.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * The content for a <code>Detail</code> object, giving details for
- * a <code>SOAPFault</code> object. A <code>DetailEntry</code> object,
- * which carries information about errors related to the <code>SOAPBody</code>
- * object that contains it, is application-specific.
- */
-public interface DetailEntry extends SOAPElement {
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/FactoryFinder.java b/src/share/jaxws_classes/javax/xml/soap/FactoryFinder.java
deleted file mode 100644
index 391c1eea..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/FactoryFinder.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.io.*;
-import java.util.Properties;
-
-
-class FactoryFinder {
-
- /**
- * Creates an instance of the specified class using the specified
- * <code>ClassLoader</code> object.
- *
- * @exception SOAPException if the given class could not be found
- * or could not be instantiated
- */
- private static Object newInstance(String className,
- ClassLoader classLoader)
- throws SOAPException
- {
- try {
- Class spiClass = safeLoadClass(className, classLoader);
- return spiClass.newInstance();
-
- } catch (ClassNotFoundException x) {
- throw new SOAPException("Provider " + className + " not found", x);
- } catch (Exception x) {
- throw new SOAPException("Provider " + className + " could not be instantiated: " + x, x);
- }
- }
-
- /**
- * Finds the implementation <code>Class</code> object for the given
- * factory name, or null if that fails.
- * <P>
- * This method is package private so that this code can be shared.
- *
- * @return the <code>Class</code> object of the specified message factory;
- * or <code>null</code>
- *
- * @param factoryId the name of the factory to find, which is
- * a system property
- * @exception SOAPException if there is a SOAP error
- */
- static Object find(String factoryId)
- throws SOAPException
- {
- return find(factoryId, null, false);
- }
-
- /**
- * Finds the implementation <code>Class</code> object for the given
- * factory name, or if that fails, finds the <code>Class</code> object
- * for the given fallback class name. The arguments supplied must be
- * used in order. If using the first argument is successful, the second
- * one will not be used.
- * <P>
- * This method is package private so that this code can be shared.
- *
- * @return the <code>Class</code> object of the specified message factory;
- * may be <code>null</code>
- *
- * @param factoryId the name of the factory to find, which is
- * a system property
- * @param fallbackClassName the implementation class name, which is
- * to be used only if nothing else
- * is found; <code>null</code> to indicate that
- * there is no fallback class name
- * @exception SOAPException if there is a SOAP error
- */
- static Object find(String factoryId, String fallbackClassName)
- throws SOAPException
- {
- return find(factoryId, fallbackClassName, true);
- }
-
- /**
- * Finds the implementation <code>Class</code> object for the given
- * factory name, or if that fails, finds the <code>Class</code> object
- * for the given default class name, but only if <code>tryFallback</code>
- * is <code>true</code>. The arguments supplied must be used in order
- * If using the first argument is successful, the second one will not
- * be used. Note the default class name may be needed even if fallback
- * is not to be attempted, so certain error conditions can be handled.
- * <P>
- * This method is package private so that this code can be shared.
- *
- * @return the <code>Class</code> object of the specified message factory;
- * may not be <code>null</code>
- *
- * @param factoryId the name of the factory to find, which is
- * a system property
- * @param defaultClassName the implementation class name, which is
- * to be used only if nothing else
- * is found; <code>null</code> to indicate
- * that there is no default class name
- * @param tryFallback whether to try the default class as a
- * fallback
- * @exception SOAPException if there is a SOAP error
- */
- static Object find(String factoryId, String defaultClassName,
- boolean tryFallback) throws SOAPException {
- ClassLoader classLoader;
- try {
- classLoader = Thread.currentThread().getContextClassLoader();
- } catch (Exception x) {
- throw new SOAPException(x.toString(), x);
- }
-
- // Use the system property first
- try {
- String systemProp =
- System.getProperty( factoryId );
- if( systemProp!=null) {
- return newInstance(systemProp, classLoader);
- }
- } catch (SecurityException se) {
- }
-
- // try to read from $java.home/lib/jaxm.properties
- try {
- String javah=System.getProperty( "java.home" );
- String configFile = javah + File.separator +
- "lib" + File.separator + "jaxm.properties";
- File f=new File( configFile );
- if( f.exists()) {
- Properties props=new Properties();
- props.load( new FileInputStream(f));
- String factoryClassName = props.getProperty(factoryId);
- return newInstance(factoryClassName, classLoader);
- }
- } catch(Exception ex ) {
- }
-
- String serviceId = "META-INF/services/" + factoryId;
- // try to find services in CLASSPATH
- try {
- InputStream is=null;
- if (classLoader == null) {
- is=ClassLoader.getSystemResourceAsStream(serviceId);
- } else {
- is=classLoader.getResourceAsStream(serviceId);
- }
-
- if( is!=null ) {
- BufferedReader rd =
- new BufferedReader(new InputStreamReader(is, "UTF-8"));
-
- String factoryClassName = rd.readLine();
- rd.close();
-
- if (factoryClassName != null &&
- ! "".equals(factoryClassName)) {
- return newInstance(factoryClassName, classLoader);
- }
- }
- } catch( Exception ex ) {
- }
-
- // If not found and fallback should not be tried, return a null result.
- if (!tryFallback)
- return null;
-
- // We didn't find the class through the usual means so try the default
- // (built in) factory if specified.
- if (defaultClassName == null) {
- throw new SOAPException(
- "Provider for " + factoryId + " cannot be found", null);
- }
- return newInstance(defaultClassName, classLoader);
- }
-
- /**
- * Loads the class, provided that the calling thread has an access to the
- * class being loaded. If this is the specified default factory class and it
- * is restricted by package.access we get a SecurityException and can do a
- * Class.forName() on it so it will be loaded by the bootstrap class loader.
- */
- private static Class safeLoadClass(String className,
- ClassLoader classLoader)
- throws ClassNotFoundException {
- try {
- // make sure that the current thread has an access to the package of the given name.
- SecurityManager s = System.getSecurityManager();
- if (s != null) {
- int i = className.lastIndexOf('.');
- if (i != -1) {
- s.checkPackageAccess(className.substring(0, i));
- }
- }
-
- if (classLoader == null)
- return Class.forName(className);
- else
- return classLoader.loadClass(className);
- } catch (SecurityException se) {
- // (only) default implementation can be loaded
- // using bootstrap class loader:
- if (isDefaultImplementation(className))
- return Class.forName(className);
-
- throw se;
- }
- }
-
- private static boolean isDefaultImplementation(String className) {
- return MessageFactory.DEFAULT_MESSAGE_FACTORY.equals(className) ||
- SOAPFactory.DEFAULT_SOAP_FACTORY.equals(className) ||
- SOAPConnectionFactory.DEFAULT_SOAP_CONNECTION_FACTORY.equals(className) ||
- SAAJMetaFactory.DEFAULT_META_FACTORY_CLASS.equals(className);
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java b/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java
deleted file mode 100644
index 8501297f..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * A factory for creating <code>SOAPMessage</code> objects.
- * <P>
- * A SAAJ client can create a <code>MessageFactory</code> object
- * using the method <code>newInstance</code>, as shown in the following
- * lines of code.
- * <PRE>
- * MessageFactory mf = MessageFactory.newInstance();
- * MessageFactory mf12 = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
- * </PRE>
- * <P>
- * All <code>MessageFactory</code> objects, regardless of how they are
- * created, will produce <code>SOAPMessage</code> objects that
- * have the following elements by default:
- * <UL>
- * <LI>A <code>SOAPPart</code> object
- * <LI>A <code>SOAPEnvelope</code> object
- * <LI>A <code>SOAPBody</code> object
- * <LI>A <code>SOAPHeader</code> object
- * </UL>
- * In some cases, specialized MessageFactory objects may be obtained that produce messages
- * prepopulated with additional entries in the <code>SOAPHeader</code> object and the
- * <code>SOAPBody</code> object.
- * The content of a new <code>SOAPMessage</code> object depends on which of the two
- * <code>MessageFactory</code> methods is used to create it.
- * <UL>
- * <LI><code>createMessage()</code> <BR>
- * This is the method clients would normally use to create a request message.
- * <LI><code>createMessage(MimeHeaders, java.io.InputStream)</code> -- message has
- * content from the <code>InputStream</code> object and headers from the
- * <code>MimeHeaders</code> object <BR>
- * This method can be used internally by a service implementation to
- * create a message that is a response to a request.
- * </UL>
- */
-public abstract class MessageFactory {
-
- static final String DEFAULT_MESSAGE_FACTORY
- = "com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl";
-
- static private final String MESSAGE_FACTORY_PROPERTY
- = "javax.xml.soap.MessageFactory";
-
- /**
- * Creates a new <code>MessageFactory</code> object that is an instance
- * of the default implementation (SOAP 1.1),
- *
- * This method uses the following ordered lookup procedure to determine the MessageFactory implementation class to load:
- * <UL>
- * <LI> Use the javax.xml.soap.MessageFactory system property.
- * <LI> Use the properties file "lib/jaxm.properties" in the JRE directory. This configuration file is in standard
- * java.util.Properties format and contains the fully qualified name of the implementation class with the key being the
- * system property defined above.
- * <LI> Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API
- * will look for a classname in the file META-INF/services/javax.xml.soap.MessageFactory in jars available to the runtime.
- * <LI> Use the SAAJMetaFactory instance to locate the MessageFactory implementation class.
- * </UL>
-
- *
- * @return a new instance of a <code>MessageFactory</code>
- *
- * @exception SOAPException if there was an error in creating the
- * default implementation of the
- * <code>MessageFactory</code>.
- * @see SAAJMetaFactory
- */
-
- public static MessageFactory newInstance() throws SOAPException {
-
-
- try {
- MessageFactory factory = (MessageFactory) FactoryFinder.find(
- MESSAGE_FACTORY_PROPERTY,
- DEFAULT_MESSAGE_FACTORY,
- false);
-
- if (factory != null) {
- return factory;
- }
- return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
-
- } catch (Exception ex) {
- throw new SOAPException(
- "Unable to create message factory for SOAP: "
- +ex.getMessage());
- }
-
- }
-
- /**
- * Creates a new <code>MessageFactory</code> object that is an instance
- * of the specified implementation. May be a dynamic message factory,
- * a SOAP 1.1 message factory, or a SOAP 1.2 message factory. A dynamic
- * message factory creates messages based on the MIME headers specified
- * as arguments to the <code>createMessage</code> method.
- *
- * This method uses the SAAJMetaFactory to locate the implementation class
- * and create the MessageFactory instance.
- *
- * @return a new instance of a <code>MessageFactory</code>
- *
- * @param protocol a string constant representing the class of the
- * specified message factory implementation. May be
- * either <code>DYNAMIC_SOAP_PROTOCOL</code>,
- * <code>DEFAULT_SOAP_PROTOCOL</code> (which is the same
- * as) <code>SOAP_1_1_PROTOCOL</code>, or
- * <code>SOAP_1_2_PROTOCOL</code>.
- *
- * @exception SOAPException if there was an error in creating the
- * specified implementation of <code>MessageFactory</code>.
- * @see SAAJMetaFactory
- * @since SAAJ 1.3
- */
- public static MessageFactory newInstance(String protocol) throws SOAPException {
- return SAAJMetaFactory.getInstance().newMessageFactory(protocol);
- }
-
- /**
- * Creates a new <code>SOAPMessage</code> object with the default
- * <code>SOAPPart</code>, <code>SOAPEnvelope</code>, <code>SOAPBody</code>,
- * and <code>SOAPHeader</code> objects. Profile-specific message factories
- * can choose to prepopulate the <code>SOAPMessage</code> object with
- * profile-specific headers.
- * <P>
- * Content can be added to this message's <code>SOAPPart</code> object, and
- * the message can be sent "as is" when a message containing only a SOAP part
- * is sufficient. Otherwise, the <code>SOAPMessage</code> object needs
- * to create one or more <code>AttachmentPart</code> objects and
- * add them to itself. Any content that is not in XML format must be
- * in an <code>AttachmentPart</code> object.
- *
- * @return a new <code>SOAPMessage</code> object
- * @exception SOAPException if a SOAP error occurs
- * @exception UnsupportedOperationException if the protocol of this
- * <code>MessageFactory</code> instance is <code>DYNAMIC_SOAP_PROTOCOL</code>
- */
- public abstract SOAPMessage createMessage()
- throws SOAPException;
-
- /**
- * Internalizes the contents of the given <code>InputStream</code> object into a
- * new <code>SOAPMessage</code> object and returns the <code>SOAPMessage</code>
- * object.
- *
- * @param in the <code>InputStream</code> object that contains the data
- * for a message
- * @param headers the transport-specific headers passed to the
- * message in a transport-independent fashion for creation of the
- * message
- * @return a new <code>SOAPMessage</code> object containing the data from
- * the given <code>InputStream</code> object
- *
- * @exception IOException if there is a problem in reading data from
- * the input stream
- *
- * @exception SOAPException may be thrown if the message is invalid
- *
- * @exception IllegalArgumentException if the <code>MessageFactory</code>
- * requires one or more MIME headers to be present in the
- * <code>headers</code> parameter and they are missing.
- * <code>MessageFactory</code> implementations for
- * <code>SOAP_1_1_PROTOCOL</code> or
- * <code>SOAP_1_2_PROTOCOL</code> must not throw
- * <code>IllegalArgumentException</code> for this reason.
- */
- public abstract SOAPMessage createMessage(MimeHeaders headers,
- InputStream in)
- throws IOException, SOAPException;
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/MimeHeader.java b/src/share/jaxws_classes/javax/xml/soap/MimeHeader.java
deleted file mode 100644
index 5f98f1e2..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/MimeHeader.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-
-/**
- * An object that stores a MIME header name and its value. One or more
- * <code>MimeHeader</code> objects may be contained in a <code>MimeHeaders</code>
- * object.
- *
- * @see MimeHeaders
- */
-public class MimeHeader {
-
- private String name;
- private String value;
-
- /**
- * Constructs a <code>MimeHeader</code> object initialized with the given
- * name and value.
- *
- * @param name a <code>String</code> giving the name of the header
- * @param value a <code>String</code> giving the value of the header
- */
- public MimeHeader(String name, String value) {
- this.name = name;
- this.value = value;
- }
-
- /**
- * Returns the name of this <code>MimeHeader</code> object.
- *
- * @return the name of the header as a <code>String</code>
- */
- public String getName() {
- return name;
- }
-
- /**
- * Returns the value of this <code>MimeHeader</code> object.
- *
- * @return the value of the header as a <code>String</code>
- */
- public String getValue() {
- return value;
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/MimeHeaders.java b/src/share/jaxws_classes/javax/xml/soap/MimeHeaders.java
deleted file mode 100644
index 9dc5780a..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/MimeHeaders.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.util.Iterator;
-import java.util.Vector;
-
-/**
- * A container for <code>MimeHeader</code> objects, which represent
- * the MIME headers present in a MIME part of a message.
- *
- * <p>This class is used primarily when an application wants to
- * retrieve specific attachments based on certain MIME headers and
- * values. This class will most likely be used by implementations of
- * <code>AttachmentPart</code> and other MIME dependent parts of the SAAJ
- * API.
- * @see SOAPMessage#getAttachments
- * @see AttachmentPart
- */
-public class MimeHeaders {
- private Vector headers;
-
- /**
- * Constructs a default <code>MimeHeaders</code> object initialized with
- * an empty <code>Vector</code> object.
- */
- public MimeHeaders() {
- headers = new Vector();
- }
-
- /**
- * Returns all of the values for the specified header as an array of
- * <code>String</code> objects.
- *
- * @param name the name of the header for which values will be returned
- * @return a <code>String</code> array with all of the values for the
- * specified header
- * @see #setHeader
- */
- public String[] getHeader(String name) {
- Vector values = new Vector();
-
- for(int i = 0; i < headers.size(); i++) {
- MimeHeader hdr = (MimeHeader) headers.elementAt(i);
- if (hdr.getName().equalsIgnoreCase(name)
- && hdr.getValue() != null)
- values.addElement(hdr.getValue());
- }
-
- if (values.size() == 0)
- return null;
-
- String r[] = new String[values.size()];
- values.copyInto(r);
- return r;
- }
-
- /**
- * Replaces the current value of the first header entry whose name matches
- * the given name with the given value, adding a new header if no existing header
- * name matches. This method also removes all matching headers after the first one.
- * <P>
- * Note that RFC822 headers can contain only US-ASCII characters.
- *
- * @param name a <code>String</code> with the name of the header for
- * which to search
- * @param value a <code>String</code> with the value that will replace the
- * current value of the specified header
- *
- * @exception IllegalArgumentException if there was a problem in the
- * mime header name or the value being set
- * @see #getHeader
- */
- public void setHeader(String name, String value)
- {
- boolean found = false;
-
- if ((name == null) || name.equals(""))
- throw new IllegalArgumentException("Illegal MimeHeader name");
-
- for(int i = 0; i < headers.size(); i++) {
- MimeHeader hdr = (MimeHeader) headers.elementAt(i);
- if (hdr.getName().equalsIgnoreCase(name)) {
- if (!found) {
- headers.setElementAt(new MimeHeader(hdr.getName(),
- value), i);
- found = true;
- }
- else
- headers.removeElementAt(i--);
- }
- }
-
- if (!found)
- addHeader(name, value);
- }
-
- /**
- * Adds a <code>MimeHeader</code> object with the specified name and value
- * to this <code>MimeHeaders</code> object's list of headers.
- * <P>
- * Note that RFC822 headers can contain only US-ASCII characters.
- *
- * @param name a <code>String</code> with the name of the header to
- * be added
- * @param value a <code>String</code> with the value of the header to
- * be added
- *
- * @exception IllegalArgumentException if there was a problem in the
- * mime header name or value being added
- */
- public void addHeader(String name, String value)
- {
- if ((name == null) || name.equals(""))
- throw new IllegalArgumentException("Illegal MimeHeader name");
-
- int pos = headers.size();
-
- for(int i = pos - 1 ; i >= 0; i--) {
- MimeHeader hdr = (MimeHeader) headers.elementAt(i);
- if (hdr.getName().equalsIgnoreCase(name)) {
- headers.insertElementAt(new MimeHeader(name, value),
- i+1);
- return;
- }
- }
- headers.addElement(new MimeHeader(name, value));
- }
-
- /**
- * Remove all <code>MimeHeader</code> objects whose name matches the
- * given name.
- *
- * @param name a <code>String</code> with the name of the header for
- * which to search
- */
- public void removeHeader(String name) {
- for(int i = 0; i < headers.size(); i++) {
- MimeHeader hdr = (MimeHeader) headers.elementAt(i);
- if (hdr.getName().equalsIgnoreCase(name))
- headers.removeElementAt(i--);
- }
- }
-
- /**
- * Removes all the header entries from this <code>MimeHeaders</code> object.
- */
- public void removeAllHeaders() {
- headers.removeAllElements();
- }
-
-
- /**
- * Returns all the <code>MimeHeader</code>s in this <code>MimeHeaders</code> object.
- *
- * @return an <code>Iterator</code> object over this <code>MimeHeaders</code>
- * object's list of <code>MimeHeader</code> objects
- */
- public Iterator getAllHeaders() {
- return headers.iterator();
- }
-
- class MatchingIterator implements Iterator {
- private boolean match;
- private Iterator iterator;
- private String[] names;
- private Object nextHeader;
-
- MatchingIterator(String[] names, boolean match) {
- this.match = match;
- this.names = names;
- this.iterator = headers.iterator();
- }
-
- private Object nextMatch() {
- next:
- while (iterator.hasNext()) {
- MimeHeader hdr = (MimeHeader) iterator.next();
-
- if (names == null)
- return match ? null : hdr;
-
- for(int i = 0; i < names.length; i++)
- if (hdr.getName().equalsIgnoreCase(names[i]))
- if (match)
- return hdr;
- else
- continue next;
- if (!match)
- return hdr;
- }
- return null;
- }
-
-
- public boolean hasNext() {
- if (nextHeader == null)
- nextHeader = nextMatch();
- return nextHeader != null;
- }
-
- public Object next() {
- // hasNext should've prefetched the header for us,
- // return it.
- if (nextHeader != null) {
- Object ret = nextHeader;
- nextHeader = null;
- return ret;
- }
- if (hasNext())
- return nextHeader;
- return null;
- }
-
- public void remove() {
- iterator.remove();
- }
- }
-
-
- /**
- * Returns all the <code>MimeHeader</code> objects whose name matches
- * a name in the given array of names.
- *
- * @param names an array of <code>String</code> objects with the names
- * for which to search
- * @return an <code>Iterator</code> object over the <code>MimeHeader</code>
- * objects whose name matches one of the names in the given list
- */
- public Iterator getMatchingHeaders(String[] names) {
- return new MatchingIterator(names, true);
- }
-
- /**
- * Returns all of the <code>MimeHeader</code> objects whose name does not
- * match a name in the given array of names.
- *
- * @param names an array of <code>String</code> objects with the names
- * for which to search
- * @return an <code>Iterator</code> object over the <code>MimeHeader</code>
- * objects whose name does not match one of the names in the given list
- */
- public Iterator getNonMatchingHeaders(String[] names) {
- return new MatchingIterator(names, false);
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/Name.java b/src/share/jaxws_classes/javax/xml/soap/Name.java
deleted file mode 100644
index e4665144..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/Name.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * A representation of an XML name. This interface provides methods for
- * getting the local and namespace-qualified names and also for getting the
- * prefix associated with the namespace for the name. It is also possible
- * to get the URI of the namespace.
- * <P>
- * The following is an example of a namespace declaration in an element.
- * <PRE>
- * &lt;wombat:GetLastTradePrice xmlns:wombat="http://www.wombat.org/trader"&gt;
- * </PRE>
- * ("xmlns" stands for "XML namespace".)
- * The following
- * shows what the methods in the <code>Name</code> interface will return.
- * <UL>
- * <LI><code>getQualifiedName</code> will return "prefix:LocalName" =
- * "WOMBAT:GetLastTradePrice"
- * <LI><code>getURI</code> will return "http://www.wombat.org/trader"
- * <LI><code>getLocalName</code> will return "GetLastTracePrice"
- * <LI><code>getPrefix</code> will return "WOMBAT"
- * </UL>
- * <P>
- * XML namespaces are used to disambiguate SOAP identifiers from
- * application-specific identifiers.
- * <P>
- * <code>Name</code> objects are created using the method
- * <code>SOAPEnvelope.createName</code>, which has two versions.
- * One method creates <code>Name</code> objects with
- * a local name, a namespace prefix, and a namespace URI.
- * and the second creates <code>Name</code> objects with just a local name.
- * The following line of
- * code, in which <i>se</i> is a <code>SOAPEnvelope</code> object, creates a new
- * <code>Name</code> object with all three.
- * <PRE>
- * Name name = se.createName("GetLastTradePrice", "WOMBAT",
- * "http://www.wombat.org/trader");
- * </PRE>
- * The following line of code gives an example of how a <code>Name</code> object
- * can be used. The variable <i>element</i> is a <code>SOAPElement</code> object.
- * This code creates a new <code>SOAPElement</code> object with the given name and
- * adds it to <i>element</i>.
- * <PRE>
- * element.addChildElement(name);
- * </PRE>
- * <P>
- * The <code>Name</code> interface may be deprecated in a future release of SAAJ
- * in favor of <code>javax.xml.namespace.QName<code>
- * @see SOAPEnvelope#createName(String, String, String) SOAPEnvelope.createName
- * @see SOAPFactory#createName(String, String, String) SOAPFactory.createName
- */
-public interface Name {
- /**
- * Gets the local name part of the XML name that this <code>Name</code>
- * object represents.
- *
- * @return a string giving the local name
- */
- String getLocalName();
-
- /**
- * Gets the namespace-qualified name of the XML name that this
- * <code>Name</code> object represents.
- *
- * @return the namespace-qualified name as a string
- */
- String getQualifiedName();
-
- /**
- * Returns the prefix that was specified when this <code>Name</code> object
- * was initialized. This prefix is associated with the namespace for the XML
- * name that this <code>Name</code> object represents.
- *
- * @return the prefix as a string
- */
- String getPrefix();
-
- /**
- * Returns the URI of the namespace for the XML
- * name that this <code>Name</code> object represents.
- *
- * @return the URI as a string
- */
- String getURI();
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/Node.java b/src/share/jaxws_classes/javax/xml/soap/Node.java
deleted file mode 100644
index de17f34a..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/Node.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * A representation of a node (element) in an XML document.
- * This interface extnends the standard DOM Node interface with methods for
- * getting and setting the value of a node, for
- * getting and setting the parent of a node, and for removing a node.
- */
-public interface Node extends org.w3c.dom.Node {
- /**
- * Returns the value of this node if this is a <code>Text</code> node or the
- * value of the immediate child of this node otherwise.
- * If there is an immediate child of this <code>Node</code> that it is a
- * <code>Text</code> node then it's value will be returned. If there is
- * more than one <code>Text</code> node then the value of the first
- * <code>Text</code> Node will be returned.
- * Otherwise <code>null</code> is returned.
- *
- * @return a <code>String</code> with the text of this node if this is a
- * <code>Text</code> node or the text contained by the first
- * immediate child of this <code>Node</code> object that is a
- * <code>Text</code> object if such a child exists;
- * <code>null</code> otherwise.
- */
- public String getValue();
-
- /**
- * If this is a Text node then this method will set its value,
- * otherwise it sets the value of the immediate (Text) child of this node.
- * The value of the immediate child of this node can be set only if, there is
- * one child node and that node is a <code>Text</code> node, or if
- * there are no children in which case a child <code>Text</code> node will be
- * created.
- *
- * @exception IllegalStateException if the node is not a <code>Text</code>
- * node and either has more than one child node or has a child
- * node that is not a <code>Text</code> node.
- *
- * @since SAAJ 1.2
- */
- public void setValue(String value);
-
- /**
- * Sets the parent of this <code>Node</code> object to the given
- * <code>SOAPElement</code> object.
- *
- * @param parent the <code>SOAPElement</code> object to be set as
- * the parent of this <code>Node</code> object
- *
- * @exception SOAPException if there is a problem in setting the
- * parent to the given element
- * @see #getParentElement
- */
- public void setParentElement(SOAPElement parent) throws SOAPException;
-
- /**
- * Returns the parent element of this <code>Node</code> object.
- * This method can throw an <code>UnsupportedOperationException</code>
- * if the tree is not kept in memory.
- *
- * @return the <code>SOAPElement</code> object that is the parent of
- * this <code>Node</code> object or <code>null</code> if this
- * <code>Node</code> object is root
- *
- * @exception UnsupportedOperationException if the whole tree is not
- * kept in memory
- * @see #setParentElement
- */
- public SOAPElement getParentElement();
-
- /**
- * Removes this <code>Node</code> object from the tree.
- */
- public void detachNode();
-
- /**
- * Notifies the implementation that this <code>Node</code>
- * object is no longer being used by the application and that the
- * implementation is free to reuse this object for nodes that may
- * be created later.
- * <P>
- * Calling the method <code>recycleNode</code> implies that the method
- * <code>detachNode</code> has been called previously.
- */
- public void recycleNode();
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SAAJMetaFactory.java b/src/share/jaxws_classes/javax/xml/soap/SAAJMetaFactory.java
deleted file mode 100644
index e7fcf813..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SAAJMetaFactory.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
-* The access point for the implementation classes of the factories defined in the
-* SAAJ API. All of the <code>newInstance</code> methods defined on factories in
-* SAAJ 1.3 defer to instances of this class to do the actual object creation.
-* The implementations of <code>newInstance()</code> methods (in SOAPFactory and MessageFactory)
-* that existed in SAAJ 1.2 have been updated to also delegate to the SAAJMetaFactory when the SAAJ 1.2
-* defined lookup fails to locate the Factory implementation class name.
-*
-* <p>
-* SAAJMetaFactory is a service provider interface. There are no public methods on this
-* class.
-*
-* @author SAAJ RI Development Team
-* @since SAAJ 1.3
-*/
-
-public abstract class SAAJMetaFactory {
- static private final String META_FACTORY_CLASS_PROPERTY =
- "javax.xml.soap.MetaFactory";
- static final String DEFAULT_META_FACTORY_CLASS =
- "com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl";
-
- /**
- * Creates a new instance of a concrete <code>SAAJMetaFactory</code> object.
- * The SAAJMetaFactory is an SPI, it pulls the creation of the other factories together into a
- * single place. Changing out the SAAJMetaFactory has the effect of changing out the entire SAAJ
- * implementation. Service providers provide the name of their <code>SAAJMetaFactory</code>
- * implementation.
- *
- * This method uses the following ordered lookup procedure to determine the SAAJMetaFactory implementation class to load:
- * <UL>
- * <LI> Use the javax.xml.soap.MetaFactory system property.
- * <LI> Use the properties file "lib/jaxm.properties" in the JRE directory. This configuration file is in standard
- * java.util.Properties format and contains the fully qualified name of the implementation class with the key being the
- * system property defined above.
- * <LI> Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API
- * will look for a classname in the file META-INF/services/javax.xml.soap.MetaFactory in jars available to the runtime.
- * <LI> Default to com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl.
- * </UL>
- *
- * @return a concrete <code>SAAJMetaFactory</code> object
- * @exception SOAPException if there is an error in creating the <code>SAAJMetaFactory</code>
- */
- static SAAJMetaFactory getInstance() throws SOAPException {
- try {
- SAAJMetaFactory instance =
- (SAAJMetaFactory) FactoryFinder.find(
- META_FACTORY_CLASS_PROPERTY,
- DEFAULT_META_FACTORY_CLASS);
- return instance;
- } catch (Exception e) {
- throw new SOAPException(
- "Unable to create SAAJ meta-factory" + e.getMessage());
- }
- }
-
- protected SAAJMetaFactory() { }
-
- /**
- * Creates a <code>MessageFactory</code> object for
- * the given <code>String</code> protocol.
- *
- * @param protocol a <code>String</code> indicating the protocol
- * @exception SOAPException if there is an error in creating the
- * MessageFactory
- * @see SOAPConstants#SOAP_1_1_PROTOCOL
- * @see SOAPConstants#SOAP_1_2_PROTOCOL
- * @see SOAPConstants#DYNAMIC_SOAP_PROTOCOL
- */
- protected abstract MessageFactory newMessageFactory(String protocol)
- throws SOAPException;
-
- /**
- * Creates a <code>SOAPFactory</code> object for
- * the given <code>String</code> protocol.
- *
- * @param protocol a <code>String</code> indicating the protocol
- * @exception SOAPException if there is an error in creating the
- * SOAPFactory
- * @see SOAPConstants#SOAP_1_1_PROTOCOL
- * @see SOAPConstants#SOAP_1_2_PROTOCOL
- * @see SOAPConstants#DYNAMIC_SOAP_PROTOCOL
- */
- protected abstract SOAPFactory newSOAPFactory(String protocol)
- throws SOAPException;
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SAAJResult.java b/src/share/jaxws_classes/javax/xml/soap/SAAJResult.java
deleted file mode 100644
index 880db540..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SAAJResult.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import javax.xml.transform.dom.DOMResult;
-
-/**
- * Acts as a holder for the results of a JAXP transformation or a JAXB
- * marshalling, in the form of a SAAJ tree. These results should be accessed
- * by using the {@link #getResult()} method. The {@link DOMResult#getNode()}
- * method should be avoided in almost all cases.
- *
- * @author XWS-Security Development Team
- *
- * @since SAAJ 1.3
- */
-public class SAAJResult extends DOMResult {
-
- /**
- * Creates a <code>SAAJResult</code> that will present results in the form
- * of a SAAJ tree that supports the default (SOAP 1.1) protocol.
- * <p>
- * This kind of <code>SAAJResult</code> is meant for use in situations where the
- * results will be used as a parameter to a method that takes a parameter
- * whose type, such as <code>SOAPElement</code>, is drawn from the SAAJ
- * API. When used in a transformation, the results are populated into the
- * <code>SOAPPart</code> of a <code>SOAPMessage</code> that is created internally.
- * The <code>SOAPPart</code> returned by {@link DOMResult#getNode()}
- * is not guaranteed to be well-formed.
- *
- * @throws SOAPException if there is a problem creating a <code>SOAPMessage</code>
- *
- * @since SAAJ 1.3
- */
- public SAAJResult() throws SOAPException {
- this(MessageFactory.newInstance().createMessage());
- }
-
- /**
- * Creates a <code>SAAJResult</code> that will present results in the form
- * of a SAAJ tree that supports the specified protocol. The
- * <code>DYNAMIC_SOAP_PROTOCOL</code> is ambiguous in this context and will
- * cause this constructor to throw an <code>UnsupportedOperationException</code>.
- * <p>
- * This kind of <code>SAAJResult</code> is meant for use in situations where the
- * results will be used as a parameter to a method that takes a parameter
- * whose type, such as <code>SOAPElement</code>, is drawn from the SAAJ
- * API. When used in a transformation the results are populated into the
- * <code>SOAPPart</code> of a <code>SOAPMessage</code> that is created
- * internally. The <code>SOAPPart</code> returned by {@link DOMResult#getNode()}
- * is not guaranteed to be well-formed.
- *
- * @param protocol - the name of the SOAP protocol that the resulting SAAJ
- * tree should support
- *
- * @throws SOAPException if a <code>SOAPMessage</code> supporting the
- * specified protocol cannot be created
- *
- * @since SAAJ 1.3
- */
- public SAAJResult(String protocol) throws SOAPException {
- this(MessageFactory.newInstance(protocol).createMessage());
- }
-
- /**
- * Creates a <code>SAAJResult</code> that will write the results into the
- * <code>SOAPPart</code> of the supplied <code>SOAPMessage</code>.
- * In the normal case these results will be written using DOM APIs and,
- * as a result, the finished <code>SOAPPart</code> will not be guaranteed
- * to be well-formed unless the data used to create it is also well formed.
- * When used in a transformation the validity of the <code>SOAPMessage</code>
- * after the transformation can be guaranteed only by means outside SAAJ
- * specification.
- *
- * @param message - the message whose <code>SOAPPart</code> will be
- * populated as a result of some transformation or
- * marshalling operation
- *
- * @since SAAJ 1.3
- */
- public SAAJResult(SOAPMessage message) {
- super(message.getSOAPPart());
- }
-
- /**
- * Creates a <code>SAAJResult</code> that will write the results as a
- * child node of the <code>SOAPElement</code> specified. In the normal
- * case these results will be written using DOM APIs and as a result may
- * invalidate the structure of the SAAJ tree. This kind of
- * <code>SAAJResult</code> should only be used when the validity of the
- * incoming data can be guaranteed by means outside of the SAAJ
- * specification.
- *
- * @param rootNode - the root to which the results will be appended
- *
- * @since SAAJ 1.3
- */
- public SAAJResult(SOAPElement rootNode) {
- super(rootNode);
- }
-
-
- /**
- * @return the resulting Tree that was created under the specified root Node.
- * @since SAAJ 1.3
- */
- public javax.xml.soap.Node getResult() {
- return (javax.xml.soap.Node)super.getNode().getFirstChild();
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPBody.java b/src/share/jaxws_classes/javax/xml/soap/SOAPBody.java
deleted file mode 100644
index fba0b0c4..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPBody.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.util.Locale;
-
-import org.w3c.dom.Document;
-
-import javax.xml.namespace.QName;
-
-/**
- * An object that represents the contents of the SOAP body
- * element in a SOAP message. A SOAP body element consists of XML data
- * that affects the way the application-specific content is processed.
- * <P>
- * A <code>SOAPBody</code> object contains <code>SOAPBodyElement</code>
- * objects, which have the content for the SOAP body.
- * A <code>SOAPFault</code> object, which carries status and/or
- * error information, is an example of a <code>SOAPBodyElement</code> object.
- *
- * @see SOAPFault
- */
-public interface SOAPBody extends SOAPElement {
-
- /**
- * Creates a new <code>SOAPFault</code> object and adds it to
- * this <code>SOAPBody</code> object. The new <code>SOAPFault</code> will
- * have default values set for the mandatory child elements. The type of
- * the <code>SOAPFault</code> will be a SOAP 1.1 or a SOAP 1.2 <code>SOAPFault</code>
- * depending on the <code>protocol</code> specified while creating the
- * <code>MessageFactory</code> instance.
- * <p>
- * A <code>SOAPBody</code> may contain at most one <code>SOAPFault</code>
- * child element.
- *
- * @return the new <code>SOAPFault</code> object
- * @exception SOAPException if there is a SOAP error
- */
- public SOAPFault addFault() throws SOAPException;
-
-
- /**
- * Creates a new <code>SOAPFault</code> object and adds it to
- * this <code>SOAPBody</code> object. The type of the
- * <code>SOAPFault</code> will be a SOAP 1.1 or a SOAP 1.2
- * <code>SOAPFault</code> depending on the <code>protocol</code>
- * specified while creating the <code>MessageFactory</code> instance.
- * <p>
- * For SOAP 1.2 the <code>faultCode</code> parameter is the value of the
- * <i>Fault/Code/Value</i> element and the <code>faultString</code> parameter
- * is the value of the <i>Fault/Reason/Text</i> element. For SOAP 1.1
- * the <code>faultCode</code> parameter is the value of the <code>faultcode</code>
- * element and the <code>faultString</code> parameter is the value of the <code>faultstring</code>
- * element.
- * <p>
- * A <code>SOAPBody</code> may contain at most one <code>SOAPFault</code>
- * child element.
- *
- * @param faultCode a <code>Name</code> object giving the fault
- * code to be set; must be one of the fault codes defined in the Version
- * of SOAP specification in use
- * @param faultString a <code>String</code> giving an explanation of
- * the fault
- * @param locale a {@link java.util.Locale} object indicating
- * the native language of the <code>faultString</code>
- * @return the new <code>SOAPFault</code> object
- * @exception SOAPException if there is a SOAP error
- * @see SOAPFault#setFaultCode
- * @see SOAPFault#setFaultString
- * @since SAAJ 1.2
- */
- public SOAPFault addFault(Name faultCode, String faultString, Locale locale) throws SOAPException;
-
- /**
- * Creates a new <code>SOAPFault</code> object and adds it to this
- * <code>SOAPBody</code> object. The type of the <code>SOAPFault</code>
- * will be a SOAP 1.1 or a SOAP 1.2 <code>SOAPFault</code> depending on
- * the <code>protocol</code> specified while creating the <code>MessageFactory</code>
- * instance.
- * <p>
- * For SOAP 1.2 the <code>faultCode</code> parameter is the value of the
- * <i>Fault/Code/Value</i> element and the <code>faultString</code> parameter
- * is the value of the <i>Fault/Reason/Text</i> element. For SOAP 1.1
- * the <code>faultCode</code> parameter is the value of the <code>faultcode</code>
- * element and the <code>faultString</code> parameter is the value of the <code>faultstring</code>
- * element.
- * <p>
- * A <code>SOAPBody</code> may contain at most one <code>SOAPFault</code>
- * child element.
- *
- * @param faultCode
- * a <code>QName</code> object giving the fault code to be
- * set; must be one of the fault codes defined in the version
- * of SOAP specification in use.
- * @param faultString
- * a <code>String</code> giving an explanation of the fault
- * @param locale
- * a {@link java.util.Locale Locale} object indicating the
- * native language of the <code>faultString</code>
- * @return the new <code>SOAPFault</code> object
- * @exception SOAPException
- * if there is a SOAP error
- * @see SOAPFault#setFaultCode
- * @see SOAPFault#setFaultString
- * @see SOAPBody#addFault(Name faultCode, String faultString, Locale locale)
- *
- * @since SAAJ 1.3
- */
- public SOAPFault addFault(QName faultCode, String faultString, Locale locale)
- throws SOAPException;
-
- /**
- * Creates a new <code>SOAPFault</code> object and adds it to this
- * <code>SOAPBody</code> object. The type of the <code>SOAPFault</code>
- * will be a SOAP 1.1 or a SOAP 1.2 <code>SOAPFault</code> depending on
- * the <code>protocol</code> specified while creating the <code>MessageFactory</code>
- * instance.
- * <p>
- * For SOAP 1.2 the <code>faultCode</code> parameter is the value of the
- * <i>Fault/Code/Value</i> element and the <code>faultString</code> parameter
- * is the value of the <i>Fault/Reason/Text</i> element. For SOAP 1.1
- * the <code>faultCode</code> parameter is the value of the <i>faultcode</i>
- * element and the <code>faultString</code> parameter is the value of the <i>faultstring</i>
- * element.
- * <p>
- * In case of a SOAP 1.2 fault, the default value for the mandatory <code>xml:lang</code>
- * attribute on the <i>Fault/Reason/Text</i> element will be set to
- * <code>java.util.Locale.getDefault()</code>
- * <p>
- * A <code>SOAPBody</code> may contain at most one <code>SOAPFault</code>
- * child element.
- *
- * @param faultCode
- * a <code>Name</code> object giving the fault code to be set;
- * must be one of the fault codes defined in the version of SOAP
- * specification in use
- * @param faultString
- * a <code>String</code> giving an explanation of the fault
- * @return the new <code>SOAPFault</code> object
- * @exception SOAPException
- * if there is a SOAP error
- * @see SOAPFault#setFaultCode
- * @see SOAPFault#setFaultString
- * @since SAAJ 1.2
- */
- public SOAPFault addFault(Name faultCode, String faultString)
- throws SOAPException;
-
- /**
- * Creates a new <code>SOAPFault</code> object and adds it to this <code>SOAPBody</code>
- * object. The type of the <code>SOAPFault</code>
- * will be a SOAP 1.1 or a SOAP 1.2 <code>SOAPFault</code> depending on
- * the <code>protocol</code> specified while creating the <code>MessageFactory</code>
- * instance.
- * <p>
- * For SOAP 1.2 the <code>faultCode</code> parameter is the value of the
- * <i>Fault/Code/Value</i> element and the <code>faultString</code> parameter
- * is the value of the <i>Fault/Reason/Text</i> element. For SOAP 1.1
- * the <code>faultCode</code> parameter is the value of the <i>faultcode</i>
- * element and the <code>faultString</code> parameter is the value of the <i>faultstring</i>
- * element.
- * <p>
- * In case of a SOAP 1.2 fault, the default value for the mandatory <code>xml:lang</code>
- * attribute on the <i>Fault/Reason/Text</i> element will be set to
- * <code>java.util.Locale.getDefault()</code>
- * <p>
- * A <code>SOAPBody</code> may contain at most one <code>SOAPFault</code>
- * child element
- *
- * @param faultCode
- * a <code>QName</code> object giving the fault code to be
- * set; must be one of the fault codes defined in the version
- * of SOAP specification in use
- * @param faultString
- * a <code>String</code> giving an explanation of the fault
- * @return the new <code>SOAPFault</code> object
- * @exception SOAPException
- * if there is a SOAP error
- * @see SOAPFault#setFaultCode
- * @see SOAPFault#setFaultString
- * @see SOAPBody#addFault(Name faultCode, String faultString)
- * @since SAAJ 1.3
- */
- public SOAPFault addFault(QName faultCode, String faultString)
- throws SOAPException;
-
- /**
- * Indicates whether a <code>SOAPFault</code> object exists in this
- * <code>SOAPBody</code> object.
- *
- * @return <code>true</code> if a <code>SOAPFault</code> object exists
- * in this <code>SOAPBody</code> object; <code>false</code>
- * otherwise
- */
- public boolean hasFault();
-
- /**
- * Returns the <code>SOAPFault</code> object in this <code>SOAPBody</code>
- * object.
- *
- * @return the <code>SOAPFault</code> object in this <code>SOAPBody</code>
- * object if present, null otherwise.
- */
- public SOAPFault getFault();
-
- /**
- * Creates a new <code>SOAPBodyElement</code> object with the specified
- * name and adds it to this <code>SOAPBody</code> object.
- *
- * @param name
- * a <code>Name</code> object with the name for the new <code>SOAPBodyElement</code>
- * object
- * @return the new <code>SOAPBodyElement</code> object
- * @exception SOAPException
- * if a SOAP error occurs
- * @see SOAPBody#addBodyElement(javax.xml.namespace.QName)
- */
- public SOAPBodyElement addBodyElement(Name name) throws SOAPException;
-
-
- /**
- * Creates a new <code>SOAPBodyElement</code> object with the specified
- * QName and adds it to this <code>SOAPBody</code> object.
- *
- * @param qname
- * a <code>QName</code> object with the qname for the new
- * <code>SOAPBodyElement</code> object
- * @return the new <code>SOAPBodyElement</code> object
- * @exception SOAPException
- * if a SOAP error occurs
- * @see SOAPBody#addBodyElement(Name)
- * @since SAAJ 1.3
- */
- public SOAPBodyElement addBodyElement(QName qname) throws SOAPException;
-
- /**
- * Adds the root node of the DOM <code>{@link org.w3c.dom.Document}</code>
- * to this <code>SOAPBody</code> object.
- * <p>
- * Calling this method invalidates the <code>document</code> parameter.
- * The client application should discard all references to this <code>Document</code>
- * and its contents upon calling <code>addDocument</code>. The behavior
- * of an application that continues to use such references is undefined.
- *
- * @param document
- * the <code>Document</code> object whose root node will be
- * added to this <code>SOAPBody</code>.
- * @return the <code>SOAPBodyElement</code> that represents the root node
- * that was added.
- * @exception SOAPException
- * if the <code>Document</code> cannot be added
- * @since SAAJ 1.2
- */
- public SOAPBodyElement addDocument(org.w3c.dom.Document document)
- throws SOAPException;
-
- /**
- * Creates a new DOM <code>{@link org.w3c.dom.Document}</code> and sets
- * the first child of this <code>SOAPBody</code> as it's document
- * element. The child <code>SOAPElement</code> is removed as part of the
- * process.
- *
- * @return the <code>{@link org.w3c.dom.Document}</code> representation
- * of the <code>SOAPBody</code> content.
- *
- * @exception SOAPException
- * if there is not exactly one child <code>SOAPElement</code> of the <code>
- * <code>SOAPBody</code>.
- *
- * @since SAAJ 1.3
- */
- public org.w3c.dom.Document extractContentAsDocument()
- throws SOAPException;
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPBodyElement.java b/src/share/jaxws_classes/javax/xml/soap/SOAPBodyElement.java
deleted file mode 100644
index b310962d..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPBodyElement.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * A <code>SOAPBodyElement</code> object represents the contents in
- * a <code>SOAPBody</code> object. The <code>SOAPFault</code> interface
- * is a <code>SOAPBodyElement</code> object that has been defined.
- * <P>
- * A new <code>SOAPBodyElement</code> object can be created and added
- * to a <code>SOAPBody</code> object with the <code>SOAPBody</code>
- * method <code>addBodyElement</code>. In the following line of code,
- * <code>sb</code> is a <code>SOAPBody</code> object, and
- * <code>myName</code> is a <code>Name</code> object.
- * <PRE>
- * SOAPBodyElement sbe = sb.addBodyElement(myName);
- * </PRE>
- */
-public interface SOAPBodyElement extends SOAPElement {
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPConnection.java b/src/share/jaxws_classes/javax/xml/soap/SOAPConnection.java
deleted file mode 100644
index f33bb3ca..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPConnection.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-
-/**
- * A point-to-point connection that a client can use for sending messages
- * directly to a remote party (represented by a URL, for instance).
- * <p>
- * The SOAPConnection class is optional. Some implementations may
- * not implement this interface in which case the call to
- * <code>SOAPConnectionFactory.newInstance()</code> (see below) will
- * throw an <code>UnsupportedOperationException</code>.
- * <p>
- * A client can obtain a <code>SOAPConnection</code> object using a
- * {@link SOAPConnectionFactory} object as in the following example:
- * <PRE>
- * SOAPConnectionFactory factory = SOAPConnectionFactory.newInstance();
- * SOAPConnection con = factory.createConnection();
- * </PRE>
- * A <code>SOAPConnection</code> object can be used to send messages
- * directly to a URL following the request/response paradigm. That is,
- * messages are sent using the method <code>call</code>, which sends the
- * message and then waits until it gets a reply.
- */
-public abstract class SOAPConnection {
-
- /**
- * Sends the given message to the specified endpoint and blocks until
- * it has returned the response.
- *
- * @param request the <code>SOAPMessage</code> object to be sent
- * @param to an <code>Object</code> that identifies
- * where the message should be sent. It is required to
- * support Objects of type
- * <code>java.lang.String</code>,
- * <code>java.net.URL</code>, and when JAXM is present
- * <code>javax.xml.messaging.URLEndpoint</code>
- *
- * @return the <code>SOAPMessage</code> object that is the response to the
- * message that was sent
- * @throws SOAPException if there is a SOAP error
- */
- public abstract SOAPMessage call(SOAPMessage request,
- Object to) throws SOAPException;
-
- /**
- * Gets a message from a specific endpoint and blocks until it receives,
- *
- * @param to an <code>Object</code> that identifies where
- * the request should be sent. Objects of type
- * <code>java.lang.String</code> and
- * <code>java.net.URL</code> must be supported.
- *
- * @return the <code>SOAPMessage</code> object that is the response to the
- * get message request
- * @throws SOAPException if there is a SOAP error
- * @since SAAJ 1.3
- */
- public SOAPMessage get(Object to)
- throws SOAPException {
- throw new UnsupportedOperationException("All subclasses of SOAPConnection must override get()");
- }
-
- /**
- * Closes this <code>SOAPConnection</code> object.
- *
- * @throws SOAPException if there is a SOAP error
- */
- public abstract void close()
- throws SOAPException;
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPConnectionFactory.java b/src/share/jaxws_classes/javax/xml/soap/SOAPConnectionFactory.java
deleted file mode 100644
index c1e51f09..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPConnectionFactory.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * A factory for creating <code>SOAPConnection</code> objects. Implementation of this class
- * is optional. If <code>SOAPConnectionFactory.newInstance()</code> throws an
- * UnsupportedOperationException then the implementation does not support the
- * SAAJ communication infrastructure. Otherwise {@link SOAPConnection} objects
- * can be created by calling <code>createConnection()</code> on the newly
- * created <code>SOAPConnectionFactory</code> object.
- */
-public abstract class SOAPConnectionFactory {
- /**
- * A constant representing the default value for a <code>SOAPConnection</code>
- * object. The default is the point-to-point SOAP connection.
- */
- static final String DEFAULT_SOAP_CONNECTION_FACTORY
- = "com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnectionFactory";
-
- /**
- * A constant representing the <code>SOAPConnection</code> class.
- */
- static private final String SF_PROPERTY
- = "javax.xml.soap.SOAPConnectionFactory";
-
- /**
- * Creates an instance of the default
- * <code>SOAPConnectionFactory</code> object.
- *
- * @return a new instance of a default
- * <code>SOAPConnectionFactory</code> object
- *
- * @exception SOAPException if there was an error creating the
- * <code>SOAPConnectionFactory</code>
- *
- * @exception UnsupportedOperationException if newInstance is not
- * supported.
- */
- public static SOAPConnectionFactory newInstance()
- throws SOAPException, UnsupportedOperationException
- {
- try {
- return (SOAPConnectionFactory)
- FactoryFinder.find(SF_PROPERTY,
- DEFAULT_SOAP_CONNECTION_FACTORY);
- } catch (Exception ex) {
- throw new SOAPException("Unable to create SOAP connection factory: "
- +ex.getMessage());
- }
- }
-
- /**
- * Create a new <code>SOAPConnection</code>.
- *
- * @return the new <code>SOAPConnection</code> object.
- *
- * @exception SOAPException if there was an exception creating the
- * <code>SOAPConnection</code> object.
- */
- public abstract SOAPConnection createConnection()
- throws SOAPException;
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPConstants.java b/src/share/jaxws_classes/javax/xml/soap/SOAPConstants.java
deleted file mode 100644
index 453bf005..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPConstants.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import javax.xml.namespace.QName;
-
-/**
- * The definition of constants pertaining to the SOAP protocol.
- */
-public interface SOAPConstants {
- /**
- * Used to create <code>MessageFactory</code> instances that create
- * <code>SOAPMessages</code> whose concrete type is based on the
- * <code>Content-Type</code> MIME header passed to the
- * <code>createMessage</code> method. If no <code>Content-Type</code>
- * header is passed then the <code>createMessage</code> may throw an
- * <code>IllegalArgumentException</code> or, in the case of the no
- * argument version of <code>createMessage</code>, an
- * <code>UnsupportedOperationException</code>.
- *
- * @since SAAJ 1.3
- */
- public static final String DYNAMIC_SOAP_PROTOCOL = "Dynamic Protocol";
-
- /**
- * Used to create <code>MessageFactory</code> instances that create
- * <code>SOAPMessages</code> whose behavior supports the SOAP 1.1 specification.
- *
- * @since SAAJ 1.3
- */
- public static final String SOAP_1_1_PROTOCOL = "SOAP 1.1 Protocol";
-
- /**
- * Used to create <code>MessageFactory</code> instances that create
- * <code>SOAPMessages</code> whose behavior supports the SOAP 1.2
- * specification
- *
- * @since SAAJ 1.3
- */
- public static final String SOAP_1_2_PROTOCOL = "SOAP 1.2 Protocol";
-
- /**
- * The default protocol: SOAP 1.1 for backwards compatibility.
- *
- * @since SAAJ 1.3
- */
- public static final String DEFAULT_SOAP_PROTOCOL = SOAP_1_1_PROTOCOL;
-
- /**
- * The namespace identifier for the SOAP 1.1 envelope.
- * @since SAAJ 1.3
- */
- public static final String
- URI_NS_SOAP_1_1_ENVELOPE = "http://schemas.xmlsoap.org/soap/envelope/";
- /**
- * The namespace identifier for the SOAP 1.2 envelope.
- * @since SAAJ 1.3
- */
- public static final String
- URI_NS_SOAP_1_2_ENVELOPE = "http://www.w3.org/2003/05/soap-envelope";
-
- /**
- * The namespace identifier for the SOAP 1.1 envelope, All SOAPElements in this
- * namespace are defined by the SOAP 1.1 specification.
- */
- public static final String
- URI_NS_SOAP_ENVELOPE = URI_NS_SOAP_1_1_ENVELOPE;
-
- /**
- * The namespace identifier for the SOAP 1.1 encoding.
- * An attribute named <code>encodingStyle</code> in the
- * <code>URI_NS_SOAP_ENVELOPE</code> namespace and set to the value
- * <code>URI_NS_SOAP_ENCODING</code> can be added to an element to indicate
- * that it is encoded using the rules in section 5 of the SOAP 1.1
- * specification.
- */
- public static final String
- URI_NS_SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
-
- /**
- * The namespace identifier for the SOAP 1.2 encoding.
- * @since SAAJ 1.3
- */
- public static final String
- URI_NS_SOAP_1_2_ENCODING = "http://www.w3.org/2003/05/soap-encoding";
-
- /**
- * The media type of the <code>Content-Type</code> MIME header in SOAP 1.1.
- * @since SAAJ 1.3
- */
- public static final String
- SOAP_1_1_CONTENT_TYPE = "text/xml";
-
- /**
- * The media type of the <code>Content-Type</code> MIME header in SOAP 1.2.
- * @since SAAJ 1.3
- */
- public static final String
- SOAP_1_2_CONTENT_TYPE = "application/soap+xml";
-
- /**
- * The URI identifying the next application processing a SOAP request as the intended
- * actor for a SOAP 1.1 header entry (see section 4.2.2 of the SOAP 1.1 specification).
- * <p>
- * This value can be passed to
- * {@link SOAPHeader#examineMustUnderstandHeaderElements(String)},
- * {@link SOAPHeader#examineHeaderElements(String)} and
- * {@link SOAPHeader#extractHeaderElements(String)}
- */
- public static final String
- URI_SOAP_ACTOR_NEXT = "http://schemas.xmlsoap.org/soap/actor/next";
-
- /**
- * The URI identifying the next application processing a SOAP request as the intended
- * role for a SOAP 1.2 header entry (see section 2.2 of part 1 of the SOAP 1.2
- * specification).
- * @since SAAJ 1.3
- */
- public static final String
- URI_SOAP_1_2_ROLE_NEXT = URI_NS_SOAP_1_2_ENVELOPE + "/role/next";
-
- /**
- * The URI specifying the role None in SOAP 1.2.
- * @since SAAJ 1.3
- */
- public static final String
- URI_SOAP_1_2_ROLE_NONE = URI_NS_SOAP_1_2_ENVELOPE + "/role/none";
-
- /**
- * The URI identifying the ultimate receiver of the SOAP 1.2 message.
- * @since SAAJ 1.3
- */
- public static final String
- URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER =
- URI_NS_SOAP_1_2_ENVELOPE + "/role/ultimateReceiver";
-
- /**
- * The default namespace prefix for http://www.w3.org/2003/05/soap-envelope
- * @since SAAJ 1.3
- */
- public static final String SOAP_ENV_PREFIX = "env";
-
- /**
- * SOAP 1.2 VersionMismatch Fault
- * @since SAAJ 1.3
- */
- public static final QName SOAP_VERSIONMISMATCH_FAULT =
- new QName(URI_NS_SOAP_1_2_ENVELOPE, "VersionMismatch", SOAP_ENV_PREFIX);
-
- /**
- * SOAP 1.2 MustUnderstand Fault
- * @since SAAJ 1.3
- */
- public static final QName SOAP_MUSTUNDERSTAND_FAULT =
- new QName(URI_NS_SOAP_1_2_ENVELOPE, "MustUnderstand", SOAP_ENV_PREFIX);
-
- /**
- * SOAP 1.2 DataEncodingUnknown Fault
- * @since SAAJ 1.3
- */
- public static final QName SOAP_DATAENCODINGUNKNOWN_FAULT =
- new QName(URI_NS_SOAP_1_2_ENVELOPE, "DataEncodingUnknown", SOAP_ENV_PREFIX);
-
- /**
- * SOAP 1.2 Sender Fault
- * @since SAAJ 1.3
- */
- public static final QName SOAP_SENDER_FAULT =
- new QName(URI_NS_SOAP_1_2_ENVELOPE, "Sender", SOAP_ENV_PREFIX);
-
- /**
- * SOAP 1.2 Receiver Fault
- * @since SAAJ 1.3
- */
- public static final QName SOAP_RECEIVER_FAULT =
- new QName(URI_NS_SOAP_1_2_ENVELOPE, "Receiver", SOAP_ENV_PREFIX);
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPElement.java b/src/share/jaxws_classes/javax/xml/soap/SOAPElement.java
deleted file mode 100644
index 211d237f..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPElement.java
+++ /dev/null
@@ -1,524 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-
-/**
- * An object representing an element of a SOAP message that is allowed but not
- * specifically prescribed by a SOAP specification. This interface serves as the
- * base interface for those objects that are specifically prescribed by a SOAP
- * specification.
- * <p>
- * Methods in this interface that are required to return SAAJ specific objects
- * may "silently" replace nodes in the tree as required to successfully return
- * objects of the correct type. See {@link #getChildElements()} and
- * {@link <a HREF="package-summary.html#package_description">javax.xml.soap<a>}
- * for details.
- */
-public interface SOAPElement extends Node, org.w3c.dom.Element {
-
- /**
- * Creates a new <code>SOAPElement</code> object initialized with the
- * given <code>Name</code> object and adds the new element to this
- * <code>SOAPElement</code> object.
- * <P>
- * This method may be deprecated in a future release of SAAJ in favor of
- * addChildElement(javax.xml.namespace.QName)
- *
- * @param name a <code>Name</code> object with the XML name for the
- * new element
- *
- * @return the new <code>SOAPElement</code> object that was created
- * @exception SOAPException if there is an error in creating the
- * <code>SOAPElement</code> object
- * @see SOAPElement#addChildElement(javax.xml.namespace.QName)
- */
- public SOAPElement addChildElement(Name name) throws SOAPException;
-
- /**
- * Creates a new <code>SOAPElement</code> object initialized with the given
- * <code>QName</code> object and adds the new element to this <code>SOAPElement</code>
- * object. The <i>namespace</i>, <i>localname</i> and <i>prefix</i> of the new
- * <code>SOAPElement</code> are all taken from the <code>qname</code> argument.
- *
- * @param qname a <code>QName</code> object with the XML name for the
- * new element
- *
- * @return the new <code>SOAPElement</code> object that was created
- * @exception SOAPException if there is an error in creating the
- * <code>SOAPElement</code> object
- * @see SOAPElement#addChildElement(Name)
- * @since SAAJ 1.3
- */
- public SOAPElement addChildElement(QName qname) throws SOAPException;
-
- /**
- * Creates a new <code>SOAPElement</code> object initialized with the
- * specified local name and adds the new element to this
- * <code>SOAPElement</code> object.
- * The new <code>SOAPElement</code> inherits any in-scope default namespace.
- *
- * @param localName a <code>String</code> giving the local name for
- * the element
- * @return the new <code>SOAPElement</code> object that was created
- * @exception SOAPException if there is an error in creating the
- * <code>SOAPElement</code> object
- */
- public SOAPElement addChildElement(String localName) throws SOAPException;
-
- /**
- * Creates a new <code>SOAPElement</code> object initialized with the
- * specified local name and prefix and adds the new element to this
- * <code>SOAPElement</code> object.
- *
- * @param localName a <code>String</code> giving the local name for
- * the new element
- * @param prefix a <code>String</code> giving the namespace prefix for
- * the new element
- *
- * @return the new <code>SOAPElement</code> object that was created
- * @exception SOAPException if the <code>prefix</code> is not valid in the
- * context of this <code>SOAPElement</code> or if there is an error in creating the
- * <code>SOAPElement</code> object
- */
- public SOAPElement addChildElement(String localName, String prefix)
- throws SOAPException;
-
- /**
- * Creates a new <code>SOAPElement</code> object initialized with the
- * specified local name, prefix, and URI and adds the new element to this
- * <code>SOAPElement</code> object.
- *
- * @param localName a <code>String</code> giving the local name for
- * the new element
- * @param prefix a <code>String</code> giving the namespace prefix for
- * the new element
- * @param uri a <code>String</code> giving the URI of the namespace
- * to which the new element belongs
- *
- * @return the new <code>SOAPElement</code> object that was created
- * @exception SOAPException if there is an error in creating the
- * <code>SOAPElement</code> object
- */
- public SOAPElement addChildElement(String localName, String prefix,
- String uri)
- throws SOAPException;
-
- /**
- * Add a <code>SOAPElement</code> as a child of this
- * <code>SOAPElement</code> instance. The <code>SOAPElement</code>
- * is expected to be created by a
- * <code>SOAPFactory</code>. Callers should not rely on the
- * element instance being added as is into the XML
- * tree. Implementations could end up copying the content
- * of the <code>SOAPElement</code> passed into an instance of
- * a different <code>SOAPElement</code> implementation. For
- * instance if <code>addChildElement()</code> is called on a
- * <code>SOAPHeader</code>, <code>element</code> will be copied
- * into an instance of a <code>SOAPHeaderElement</code>.
- *
- * <P>The fragment rooted in <code>element</code> is either added
- * as a whole or not at all, if there was an error.
- *
- * <P>The fragment rooted in <code>element</code> cannot contain
- * elements named "Envelope", "Header" or "Body" and in the SOAP
- * namespace. Any namespace prefixes present in the fragment
- * should be fully resolved using appropriate namespace
- * declarations within the fragment itself.
- *
- * @param element the <code>SOAPElement</code> to be added as a
- * new child
- *
- * @exception SOAPException if there was an error in adding this
- * element as a child
- *
- * @return an instance representing the new SOAP element that was
- * actually added to the tree.
- */
- public SOAPElement addChildElement(SOAPElement element)
- throws SOAPException;
-
- /**
- * Detaches all children of this <code>SOAPElement</code>.
- * <p>
- * This method is useful for rolling back the construction of partially
- * completed <code>SOAPHeaders</code> and <code>SOAPBodys</code> in
- * preparation for sending a fault when an error condition is detected. It
- * is also useful for recycling portions of a document within a SOAP
- * message.
- *
- * @since SAAJ 1.2
- */
- public abstract void removeContents();
-
- /**
- * Creates a new <code>Text</code> object initialized with the given
- * <code>String</code> and adds it to this <code>SOAPElement</code> object.
- *
- * @param text a <code>String</code> object with the textual content to be added
- *
- * @return the <code>SOAPElement</code> object into which
- * the new <code>Text</code> object was inserted
- * @exception SOAPException if there is an error in creating the
- * new <code>Text</code> object or if it is not legal to
- * attach it as a child to this
- * <code>SOAPElement</code>
- */
- public SOAPElement addTextNode(String text) throws SOAPException;
-
- /**
- * Adds an attribute with the specified name and value to this
- * <code>SOAPElement</code> object.
- *
- * @param name a <code>Name</code> object with the name of the attribute
- * @param value a <code>String</code> giving the value of the attribute
- * @return the <code>SOAPElement</code> object into which the attribute was
- * inserted
- *
- * @exception SOAPException if there is an error in creating the
- * Attribute, or it is invalid to set
- an attribute with <code>Name</code>
- <code>name</code> on this SOAPElement.
- * @see SOAPElement#addAttribute(javax.xml.namespace.QName, String)
- */
- public SOAPElement addAttribute(Name name, String value)
- throws SOAPException;
-
- /**
- * Adds an attribute with the specified name and value to this
- * <code>SOAPElement</code> object.
- *
- * @param qname a <code>QName</code> object with the name of the attribute
- * @param value a <code>String</code> giving the value of the attribute
- * @return the <code>SOAPElement</code> object into which the attribute was
- * inserted
- *
- * @exception SOAPException if there is an error in creating the
- * Attribute, or it is invalid to set
- an attribute with <code>QName</code>
- <code>qname</code> on this SOAPElement.
- * @see SOAPElement#addAttribute(Name, String)
- * @since SAAJ 1.3
- */
- public SOAPElement addAttribute(QName qname, String value)
- throws SOAPException;
-
- /**
- * Adds a namespace declaration with the specified prefix and URI to this
- * <code>SOAPElement</code> object.
- *
- * @param prefix a <code>String</code> giving the prefix of the namespace
- * @param uri a <code>String</code> giving the uri of the namespace
- * @return the <code>SOAPElement</code> object into which this
- * namespace declaration was inserted.
- *
- * @exception SOAPException if there is an error in creating the
- * namespace
- */
- public SOAPElement addNamespaceDeclaration(String prefix, String uri)
- throws SOAPException;
-
- /**
- * Returns the value of the attribute with the specified name.
- *
- * @param name a <code>Name</code> object with the name of the attribute
- * @return a <code>String</code> giving the value of the specified
- * attribute, Null if there is no such attribute
- * @see SOAPElement#getAttributeValue(javax.xml.namespace.QName)
- */
- public String getAttributeValue(Name name);
-
- /**
- * Returns the value of the attribute with the specified qname.
- *
- * @param qname a <code>QName</code> object with the qname of the attribute
- * @return a <code>String</code> giving the value of the specified
- * attribute, Null if there is no such attribute
- * @see SOAPElement#getAttributeValue(Name)
- * @since SAAJ 1.3
- */
- public String getAttributeValue(QName qname);
-
- /**
- * Returns an <code>Iterator</code> over all of the attribute
- * <code>Name</code> objects in this
- * <code>SOAPElement</code> object. The iterator can be used to get
- * the attribute names, which can then be passed to the method
- * <code>getAttributeValue</code> to retrieve the value of each
- * attribute.
- *
- * @see SOAPElement#getAllAttributesAsQNames()
- * @return an iterator over the names of the attributes
- */
- public Iterator getAllAttributes();
-
- /**
- * Returns an <code>Iterator</code> over all of the attributes
- * in this <code>SOAPElement</code> as <code>QName</code> objects.
- * The iterator can be used to get the attribute QName, which can then
- * be passed to the method <code>getAttributeValue</code> to retrieve
- * the value of each attribute.
- *
- * @return an iterator over the QNames of the attributes
- * @see SOAPElement#getAllAttributes()
- * @since SAAJ 1.3
- */
- public Iterator getAllAttributesAsQNames();
-
-
- /**
- * Returns the URI of the namespace that has the given prefix.
- *
- * @param prefix a <code>String</code> giving the prefix of the namespace
- * for which to search
- * @return a <code>String</code> with the uri of the namespace that has
- * the given prefix
- */
- public String getNamespaceURI(String prefix);
-
- /**
- * Returns an <code>Iterator</code> over the namespace prefix
- * <code>String</code>s declared by this element. The prefixes returned by
- * this iterator can be passed to the method
- * <code>getNamespaceURI</code> to retrieve the URI of each namespace.
- *
- * @return an iterator over the namespace prefixes in this
- * <code>SOAPElement</code> object
- */
- public Iterator getNamespacePrefixes();
-
- /**
- * Returns an <code>Iterator</code> over the namespace prefix
- * <code>String</code>s visible to this element. The prefixes returned by
- * this iterator can be passed to the method
- * <code>getNamespaceURI</code> to retrieve the URI of each namespace.
- *
- * @return an iterator over the namespace prefixes are within scope of this
- * <code>SOAPElement</code> object
- *
- * @since SAAJ 1.2
- */
- public Iterator getVisibleNamespacePrefixes();
-
- /**
- * Creates a <code>QName</code> whose namespace URI is the one associated
- * with the parameter, <code>prefix</code>, in the context of this
- * <code>SOAPElement</code>. The remaining elements of the new
- * <code>QName</code> are taken directly from the parameters,
- * <code>localName</code> and <code>prefix</code>.
- *
- * @param localName
- * a <code>String</code> containing the local part of the name.
- * @param prefix
- * a <code>String</code> containing the prefix for the name.
- *
- * @return a <code>QName</code> with the specified <code>localName</code>
- * and <code>prefix</code>, and with a namespace that is associated
- * with the <code>prefix</code> in the context of this
- * <code>SOAPElement</code>. This namespace will be the same as
- * the one that would be returned by
- * <code>{@link #getNamespaceURI(String)}</code> if it were given
- * <code>prefix</code> as it's parameter.
- *
- * @exception SOAPException if the <code>QName</code> cannot be created.
- *
- * @since SAAJ 1.3
- */
- public QName createQName(String localName, String prefix)
- throws SOAPException;
- /**
- * Returns the name of this <code>SOAPElement</code> object.
- *
- * @return a <code>Name</code> object with the name of this
- * <code>SOAPElement</code> object
- */
- public Name getElementName();
-
- /**
- * Returns the qname of this <code>SOAPElement</code> object.
- *
- * @return a <code>QName</code> object with the qname of this
- * <code>SOAPElement</code> object
- * @see SOAPElement#getElementName()
- * @since SAAJ 1.3
- */
- public QName getElementQName();
-
- /**
- * Changes the name of this <code>Element</code> to <code>newName</code> if
- * possible. SOAP Defined elements such as SOAPEnvelope, SOAPHeader, SOAPBody
- * etc. cannot have their names changed using this method. Any attempt to do
- * so will result in a SOAPException being thrown.
- *<P>
- * Callers should not rely on the element instance being renamed as is.
- * Implementations could end up copying the content of the
- * <code>SOAPElement</code> to a renamed instance.
- *
- * @param newName the new name for the <code>Element</code>.
- *
- * @exception SOAPException if changing the name of this <code>Element</code>
- * is not allowed.
- * @return The renamed Node
- *
- * @since SAAJ 1.3
- */
- public SOAPElement setElementQName(QName newName) throws SOAPException;
-
- /**
- * Removes the attribute with the specified name.
- *
- * @param name the <code>Name</code> object with the name of the
- * attribute to be removed
- * @return <code>true</code> if the attribute was
- * removed successfully; <code>false</code> if it was not
- * @see SOAPElement#removeAttribute(javax.xml.namespace.QName)
- */
- public boolean removeAttribute(Name name);
-
- /**
- * Removes the attribute with the specified qname.
- *
- * @param qname the <code>QName</code> object with the qname of the
- * attribute to be removed
- * @return <code>true</code> if the attribute was
- * removed successfully; <code>false</code> if it was not
- * @see SOAPElement#removeAttribute(Name)
- * @since SAAJ 1.3
- */
- public boolean removeAttribute(QName qname);
-
- /**
- * Removes the namespace declaration corresponding to the given prefix.
- *
- * @param prefix a <code>String</code> giving the prefix for which
- * to search
- * @return <code>true</code> if the namespace declaration was
- * removed successfully; <code>false</code> if it was not
- */
- public boolean removeNamespaceDeclaration(String prefix);
-
- /**
- * Returns an <code>Iterator</code> over all the immediate child
- * {@link Node}s of this element. This includes <code>javax.xml.soap.Text</code>
- * objects as well as <code>SOAPElement</code> objects.
- * <p>
- * Calling this method may cause child <code>Element</code>,
- * <code>SOAPElement</code> and <code>org.w3c.dom.Text</code> nodes to be
- * replaced by <code>SOAPElement</code>, <code>SOAPHeaderElement</code>,
- * <code>SOAPBodyElement</code> or <code>javax.xml.soap.Text</code> nodes as
- * appropriate for the type of this parent node. As a result the calling
- * application must treat any existing references to these child nodes that
- * have been obtained through DOM APIs as invalid and either discard them or
- * refresh them with the values returned by this <code>Iterator</code>. This
- * behavior can be avoided by calling the equivalent DOM APIs. See
- * {@link <a HREF="package-summary.html#package_description">javax.xml.soap<a>}
- * for more details.
- *
- * @return an iterator with the content of this <code>SOAPElement</code>
- * object
- */
- public Iterator getChildElements();
-
- /**
- * Returns an <code>Iterator</code> over all the immediate child
- * {@link Node}s of this element with the specified name. All of these
- * children will be <code>SOAPElement</code> nodes.
- * <p>
- * Calling this method may cause child <code>Element</code>,
- * <code>SOAPElement</code> and <code>org.w3c.dom.Text</code> nodes to be
- * replaced by <code>SOAPElement</code>, <code>SOAPHeaderElement</code>,
- * <code>SOAPBodyElement</code> or <code>javax.xml.soap.Text</code> nodes as
- * appropriate for the type of this parent node. As a result the calling
- * application must treat any existing references to these child nodes that
- * have been obtained through DOM APIs as invalid and either discard them or
- * refresh them with the values returned by this <code>Iterator</code>. This
- * behavior can be avoided by calling the equivalent DOM APIs. See
- * {@link <a HREF="package-summary.html#package_description">javax.xml.soap<a>}
- * for more details.
- *
- * @param name a <code>Name</code> object with the name of the child
- * elements to be returned
- *
- * @return an <code>Iterator</code> object over all the elements
- * in this <code>SOAPElement</code> object with the
- * specified name
- * @see SOAPElement#getChildElements(javax.xml.namespace.QName)
- */
- public Iterator getChildElements(Name name);
-
- /**
- * Returns an <code>Iterator</code> over all the immediate child
- * {@link Node}s of this element with the specified qname. All of these
- * children will be <code>SOAPElement</code> nodes.
- * <p>
- * Calling this method may cause child <code>Element</code>,
- * <code>SOAPElement</code> and <code>org.w3c.dom.Text</code> nodes to be
- * replaced by <code>SOAPElement</code>, <code>SOAPHeaderElement</code>,
- * <code>SOAPBodyElement</code> or <code>javax.xml.soap.Text</code> nodes as
- * appropriate for the type of this parent node. As a result the calling
- * application must treat any existing references to these child nodes that
- * have been obtained through DOM APIs as invalid and either discard them or
- * refresh them with the values returned by this <code>Iterator</code>. This
- * behavior can be avoided by calling the equivalent DOM APIs. See
- * {@link <a HREF="package-summary.html#package_description">javax.xml.soap<a>}
- * for more details.
- *
- * @param qname a <code>QName</code> object with the qname of the child
- * elements to be returned
- *
- * @return an <code>Iterator</code> object over all the elements
- * in this <code>SOAPElement</code> object with the
- * specified qname
- * @see SOAPElement#getChildElements(Name)
- * @since SAAJ 1.3
- */
- public Iterator getChildElements(QName qname);
-
- /**
- * Sets the encoding style for this <code>SOAPElement</code> object
- * to one specified.
- *
- * @param encodingStyle a <code>String</code> giving the encoding style
- *
- * @exception IllegalArgumentException if there was a problem in the
- * encoding style being set.
- * @exception SOAPException if setting the encodingStyle is invalid for this SOAPElement.
- * @see #getEncodingStyle
- */
- public void setEncodingStyle(String encodingStyle)
- throws SOAPException;
- /**
- * Returns the encoding style for this <code>SOAPElement</code> object.
- *
- * @return a <code>String</code> giving the encoding style
- *
- * @see #setEncodingStyle
- */
- public String getEncodingStyle();
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPElementFactory.java b/src/share/jaxws_classes/javax/xml/soap/SOAPElementFactory.java
deleted file mode 100644
index 85315836..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPElementFactory.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * <code>SOAPElementFactory</code> is a factory for XML fragments that
- * will eventually end up in the SOAP part. These fragments
- * can be inserted as children of the <code>SOAPHeader</code> or
- * <code>SOAPBody</code> or <code>SOAPEnvelope</code>.
- *
- * <p>Elements created using this factory do not have the properties
- * of an element that lives inside a SOAP header document. These
- * elements are copied into the XML document tree when they are
- * inserted.
- * @deprecated - Use <code>javax.xml.soap.SOAPFactory</code> for creating SOAPElements.
- * @see javax.xml.soap.SOAPFactory
- */
-public class SOAPElementFactory {
-
- private SOAPFactory soapFactory;
-
- private SOAPElementFactory(SOAPFactory soapFactory) {
- this.soapFactory = soapFactory;
- }
-
- /**
- * Create a <code>SOAPElement</code> object initialized with the
- * given <code>Name</code> object.
- *
- * @param name a <code>Name</code> object with the XML name for
- * the new element
- *
- * @return the new <code>SOAPElement</code> object that was
- * created
- *
- * @exception SOAPException if there is an error in creating the
- * <code>SOAPElement</code> object
- *
- * @deprecated Use
- * javax.xml.soap.SOAPFactory.createElement(javax.xml.soap.Name)
- * instead
- *
- * @see javax.xml.soap.SOAPFactory#createElement(javax.xml.soap.Name)
- * @see javax.xml.soap.SOAPFactory#createElement(javax.xml.namespace.QName)
- */
- public SOAPElement create(Name name) throws SOAPException {
- return soapFactory.createElement(name);
- }
-
- /**
- * Create a <code>SOAPElement</code> object initialized with the
- * given local name.
- *
- * @param localName a <code>String</code> giving the local name for
- * the new element
- *
- * @return the new <code>SOAPElement</code> object that was
- * created
- *
- * @exception SOAPException if there is an error in creating the
- * <code>SOAPElement</code> object
- *
- * @deprecated Use
- * javax.xml.soap.SOAPFactory.createElement(String localName) instead
- *
- * @see javax.xml.soap.SOAPFactory#createElement(java.lang.String)
- */
- public SOAPElement create(String localName) throws SOAPException {
- return soapFactory.createElement(localName);
- }
-
- /**
- * Create a new <code>SOAPElement</code> object with the given
- * local name, prefix and uri.
- *
- * @param localName a <code>String</code> giving the local name
- * for the new element
- * @param prefix the prefix for this <code>SOAPElement</code>
- * @param uri a <code>String</code> giving the URI of the
- * namespace to which the new element belongs
- *
- * @exception SOAPException if there is an error in creating the
- * <code>SOAPElement</code> object
- *
- * @deprecated Use
- * javax.xml.soap.SOAPFactory.createElement(String localName,
- * String prefix,
- * String uri)
- * instead
- *
- * @see javax.xml.soap.SOAPFactory#createElement(java.lang.String, java.lang.String, java.lang.String)
- */
- public SOAPElement create(String localName, String prefix, String uri)
- throws SOAPException {
- return soapFactory.createElement(localName, prefix, uri);
- }
-
- /**
- * Creates a new instance of <code>SOAPElementFactory</code>.
- *
- * @return a new instance of a <code>SOAPElementFactory</code>
- *
- * @exception SOAPException if there was an error creating the
- * default <code>SOAPElementFactory</code>
- */
- public static SOAPElementFactory newInstance() throws SOAPException {
- try {
- return new SOAPElementFactory(SOAPFactory.newInstance());
- } catch (Exception ex) {
- throw new SOAPException(
- "Unable to create SOAP Element Factory: " + ex.getMessage());
- }
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPEnvelope.java b/src/share/jaxws_classes/javax/xml/soap/SOAPEnvelope.java
deleted file mode 100644
index 2013000c..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPEnvelope.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-
-/**
- * The container for the SOAPHeader and SOAPBody portions of a
- * <code>SOAPPart</code> object. By default, a <code>SOAPMessage</code>
- * object is created with a <code>SOAPPart</code> object that has a
- * <code>SOAPEnvelope</code> object. The <code>SOAPEnvelope</code> object
- * by default has an empty <code>SOAPBody</code> object and an empty
- * <code>SOAPHeader</code> object. The <code>SOAPBody</code> object is
- * required, and the <code>SOAPHeader</code> object, though
- * optional, is used in the majority of cases. If the
- * <code>SOAPHeader</code> object is not needed, it can be deleted,
- * which is shown later.
- * <P>
- * A client can access the <code>SOAPHeader</code> and <code>SOAPBody</code>
- * objects by calling the methods <code>SOAPEnvelope.getHeader</code> and
- * <code>SOAPEnvelope.getBody</code>. The
- * following lines of code use these two methods after starting with
- * the <code>SOAPMessage</code>
- * object <i>message</i> to get the <code>SOAPPart</code> object <i>sp</i>,
- * which is then used to get the <code>SOAPEnvelope</code> object <i>se</i>.
- *
- * <PRE>
- * SOAPPart sp = message.getSOAPPart();
- * SOAPEnvelope se = sp.getEnvelope();
- * SOAPHeader sh = se.getHeader();
- * SOAPBody sb = se.getBody();
- * </PRE>
- * <P>
- * It is possible to change the body or header of a <code>SOAPEnvelope</code>
- * object by retrieving the current one, deleting it, and then adding
- * a new body or header. The <code>javax.xml.soap.Node</code> method
- * <code>deleteNode</code> deletes the XML element (node) on which it is
- * called. For example, the following line of code deletes the
- * <code>SOAPBody</code> object that is retrieved by the method <code>getBody</code>.
- * <PRE>
- * se.getBody().detachNode();
- * </PRE>
- * To create a <code>SOAPHeader</code> object to replace the one that was removed,
- * a client uses
- * the method <code>SOAPEnvelope.addHeader</code>, which creates a new header and
- * adds it to the <code>SOAPEnvelope</code> object. Similarly, the method
- * <code>addBody</code> creates a new <code>SOAPBody</code> object and adds
- * it to the <code>SOAPEnvelope</code> object. The following code fragment
- * retrieves the current header, removes it, and adds a new one. Then
- * it retrieves the current body, removes it, and adds a new one.
- *
- * <PRE>
- * SOAPPart sp = message.getSOAPPart();
- * SOAPEnvelope se = sp.getEnvelope();
- * se.getHeader().detachNode();
- * SOAPHeader sh = se.addHeader();
- * se.getBody().detachNode();
- * SOAPBody sb = se.addBody();
- * </PRE>
- * It is an error to add a <code>SOAPBody</code> or <code>SOAPHeader</code>
- * object if one already exists.
- * <P>
- * The <code>SOAPEnvelope</code> interface provides three methods for creating
- * <code>Name</code> objects. One method creates <code>Name</code> objects with
- * a local name, a namespace prefix, and a namesapce URI. The second method creates
- * <code>Name</code> objects with a local name and a namespace prefix, and the third
- * creates <code>Name</code> objects with just a local name. The following line of
- * code, in which <i>se</i> is a <code>SOAPEnvelope</code> object, creates a new
- * <code>Name</code> object with all three.
- * <PRE>
- * Name name = se.createName("GetLastTradePrice", "WOMBAT",
- * "http://www.wombat.org/trader");
- * </PRE>
- */
-public interface SOAPEnvelope extends SOAPElement {
-
- /**
- * Creates a new <code>Name</code> object initialized with the
- * given local name, namespace prefix, and namespace URI.
- * <P>
- * This factory method creates <code>Name</code> objects for use in
- * the SOAP/XML document.
- *
- * @param localName a <code>String</code> giving the local name
- * @param prefix a <code>String</code> giving the prefix of the namespace
- * @param uri a <code>String</code> giving the URI of the namespace
- * @return a <code>Name</code> object initialized with the given
- * local name, namespace prefix, and namespace URI
- * @throws SOAPException if there is a SOAP error
- */
- public abstract Name createName(String localName, String prefix,
- String uri)
- throws SOAPException;
-
- /**
- * Creates a new <code>Name</code> object initialized with the
- * given local name.
- * <P>
- * This factory method creates <code>Name</code> objects for use in
- * the SOAP/XML document.
- *
- * @param localName a <code>String</code> giving the local name
- * @return a <code>Name</code> object initialized with the given
- * local name
- * @throws SOAPException if there is a SOAP error
- */
- public abstract Name createName(String localName)
- throws SOAPException;
-
- /**
- * Returns the <code>SOAPHeader</code> object for
- * this <code>SOAPEnvelope</code> object.
- * <P>
- * A new <code>SOAPMessage</code> object is by default created with a
- * <code>SOAPEnvelope</code> object that contains an empty
- * <code>SOAPHeader</code> object. As a result, the method
- * <code>getHeader</code> will always return a <code>SOAPHeader</code>
- * object unless the header has been removed and a new one has not
- * been added.
- *
- * @return the <code>SOAPHeader</code> object or <code>null</code> if
- * there is none
- * @exception SOAPException if there is a problem obtaining the
- * <code>SOAPHeader</code> object
- */
- public SOAPHeader getHeader() throws SOAPException;
-
- /**
- * Returns the <code>SOAPBody</code> object associated with this
- * <code>SOAPEnvelope</code> object.
- * <P>
- * A new <code>SOAPMessage</code> object is by default created with a
- * <code>SOAPEnvelope</code> object that contains an empty
- * <code>SOAPBody</code> object. As a result, the method
- * <code>getBody</code> will always return a <code>SOAPBody</code>
- * object unless the body has been removed and a new one has not
- * been added.
- *
- * @return the <code>SOAPBody</code> object for this
- * <code>SOAPEnvelope</code> object or <code>null</code>
- * if there is none
- * @exception SOAPException if there is a problem obtaining the
- * <code>SOAPBody</code> object
- */
- public SOAPBody getBody() throws SOAPException;
- /**
- * Creates a <code>SOAPHeader</code> object and sets it as the
- * <code>SOAPHeader</code> object for this <code>SOAPEnvelope</code>
- * object.
- * <P>
- * It is illegal to add a header when the envelope already
- * contains a header. Therefore, this method should be called
- * only after the existing header has been removed.
- *
- * @return the new <code>SOAPHeader</code> object
- *
- * @exception SOAPException if this
- * <code>SOAPEnvelope</code> object already contains a
- * valid <code>SOAPHeader</code> object
- */
- public SOAPHeader addHeader() throws SOAPException;
- /**
- * Creates a <code>SOAPBody</code> object and sets it as the
- * <code>SOAPBody</code> object for this <code>SOAPEnvelope</code>
- * object.
- * <P>
- * It is illegal to add a body when the envelope already
- * contains a body. Therefore, this method should be called
- * only after the existing body has been removed.
- *
- * @return the new <code>SOAPBody</code> object
- *
- * @exception SOAPException if this
- * <code>SOAPEnvelope</code> object already contains a
- * valid <code>SOAPBody</code> object
- */
- public SOAPBody addBody() throws SOAPException;
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPException.java b/src/share/jaxws_classes/javax/xml/soap/SOAPException.java
deleted file mode 100644
index 9f4351b7..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPException.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * An exception that signals that a SOAP exception has occurred. A
- * <code>SOAPException</code> object may contain a <code>String</code>
- * that gives the reason for the exception, an embedded
- * <code>Throwable</code> object, or both. This class provides methods
- * for retrieving reason messages and for retrieving the embedded
- * <code>Throwable</code> object.
- *
- * <P> Typical reasons for throwing a <code>SOAPException</code>
- * object are problems such as difficulty setting a header, not being
- * able to send a message, and not being able to get a connection with
- * the provider. Reasons for embedding a <code>Throwable</code>
- * object include problems such as input/output errors or a parsing
- * problem, such as an error in parsing a header.
- */
-public class SOAPException extends Exception {
- private Throwable cause;
-
- /**
- * Constructs a <code>SOAPException</code> object with no
- * reason or embedded <code>Throwable</code> object.
- */
- public SOAPException() {
- super();
- this.cause = null;
- }
-
- /**
- * Constructs a <code>SOAPException</code> object with the given
- * <code>String</code> as the reason for the exception being thrown.
- *
- * @param reason a description of what caused the exception
- */
- public SOAPException(String reason) {
- super(reason);
- this.cause = null;
- }
-
- /**
- * Constructs a <code>SOAPException</code> object with the given
- * <code>String</code> as the reason for the exception being thrown
- * and the given <code>Throwable</code> object as an embedded
- * exception.
- *
- * @param reason a description of what caused the exception
- * @param cause a <code>Throwable</code> object that is to
- * be embedded in this <code>SOAPException</code> object
- */
- public SOAPException(String reason, Throwable cause) {
- super(reason);
- initCause(cause);
- }
-
- /**
- * Constructs a <code>SOAPException</code> object initialized
- * with the given <code>Throwable</code> object.
- */
- public SOAPException(Throwable cause) {
- super(cause.toString());
- initCause(cause);
- }
-
- /**
- * Returns the detail message for this <code>SOAPException</code>
- * object.
- * <P>
- * If there is an embedded <code>Throwable</code> object, and if the
- * <code>SOAPException</code> object has no detail message of its
- * own, this method will return the detail message from the embedded
- * <code>Throwable</code> object.
- *
- * @return the error or warning message for this
- * <code>SOAPException</code> or, if it has none, the
- * message of the embedded <code>Throwable</code> object,
- * if there is one
- */
- public String getMessage() {
- String message = super.getMessage();
- if (message == null && cause != null) {
- return cause.getMessage();
- } else {
- return message;
- }
- }
-
- /**
- * Returns the <code>Throwable</code> object embedded in this
- * <code>SOAPException</code> if there is one. Otherwise, this method
- * returns <code>null</code>.
- *
- * @return the embedded <code>Throwable</code> object or <code>null</code>
- * if there is none
- */
-
- public Throwable getCause() {
- return cause;
- }
-
- /**
- * Initializes the <code>cause</code> field of this <code>SOAPException</code>
- * object with the given <code>Throwable</code> object.
- * <P>
- * This method can be called at most once. It is generally called from
- * within the constructor or immediately after the constructor has
- * returned a new <code>SOAPException</code> object.
- * If this <code>SOAPException</code> object was created with the
- * constructor {@link #SOAPException(Throwable)} or
- * {@link #SOAPException(String,Throwable)}, meaning that its
- * <code>cause</code> field already has a value, this method cannot be
- * called even once.
- *
- * @param cause the <code>Throwable</code> object that caused this
- * <code>SOAPException</code> object to be thrown. The value of this
- * parameter is saved for later retrieval by the
- * {@link #getCause()} method. A <tt>null</tt> value is
- * permitted and indicates that the cause is nonexistent or
- * unknown.
- * @return a reference to this <code>SOAPException</code> instance
- * @throws IllegalArgumentException if <code>cause</code> is this
- * <code>Throwable</code> object. (A <code>Throwable</code> object
- * cannot be its own cause.)
- * @throws IllegalStateException if the cause for this <code>SOAPException</code> object
- * has already been initialized
- */
- public synchronized Throwable initCause(Throwable cause) {
- if (this.cause != null) {
- throw new IllegalStateException("Can't override cause");
- }
- if (cause == this) {
- throw new IllegalArgumentException("Self-causation not permitted");
- }
- this.cause = cause;
-
- return this;
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPFactory.java b/src/share/jaxws_classes/javax/xml/soap/SOAPFactory.java
deleted file mode 100644
index 5f8778e7..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPFactory.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-/**
- * <code>SOAPFactory</code> is a factory for creating various objects
- * that exist in the SOAP XML tree.
-
- * <code>SOAPFactory</code> can be
- * used to create XML fragments that will eventually end up in the
- * SOAP part. These fragments can be inserted as children of the
- * {@link SOAPHeaderElement} or {@link SOAPBodyElement} or
- * {@link SOAPEnvelope} or other {@link SOAPElement} objects.
- *
- * <code>SOAPFactory</code> also has methods to create
- * <code>javax.xml.soap.Detail</code> objects as well as
- * <code>java.xml.soap.Name</code> objects.
- *
- */
-public abstract class SOAPFactory {
-
- /**
- * A constant representing the property used to lookup the name of
- * a <code>SOAPFactory</code> implementation class.
- */
- static private final String SOAP_FACTORY_PROPERTY =
- "javax.xml.soap.SOAPFactory";
-
- /**
- * Class name of default <code>SOAPFactory</code> implementation.
- */
- static final String DEFAULT_SOAP_FACTORY
- = "com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl";
-
- /**
- * Creates a <code>SOAPElement</code> object from an existing DOM
- * <code>Element</code>. If the DOM <code>Element</code> that is passed in
- * as an argument is already a <code>SOAPElement</code> then this method
- * must return it unmodified without any further work. Otherwise, a new
- * <code>SOAPElement</code> is created and a deep copy is made of the
- * <code>domElement</code> argument. The concrete type of the return value
- * will depend on the name of the <code>domElement</code> argument. If any
- * part of the tree rooted in <code>domElement</code> violates SOAP rules, a
- * <code>SOAPException</code> will be thrown.
- *
- * @param domElement - the <code>Element</code> to be copied.
- *
- * @return a new <code>SOAPElement</code> that is a copy of <code>domElement</code>.
- *
- * @exception SOAPException if there is an error in creating the
- * <code>SOAPElement</code> object
- *
- * @since SAAJ 1.3
- */
- public SOAPElement createElement(Element domElement) throws SOAPException {
- throw new UnsupportedOperationException("createElement(org.w3c.dom.Element) must be overridden by all subclasses of SOAPFactory.");
- }
-
- /**
- * Creates a <code>SOAPElement</code> object initialized with the
- * given <code>Name</code> object. The concrete type of the return value
- * will depend on the name given to the new <code>SOAPElement</code>. For
- * instance, a new <code>SOAPElement</code> with the name
- * "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a
- * <code>SOAPEnvelope</code> that supports SOAP 1.2 behavior to be created.
- *
- * @param name a <code>Name</code> object with the XML name for
- * the new element
- *
- * @return the new <code>SOAPElement</code> object that was
- * created
- *
- * @exception SOAPException if there is an error in creating the
- * <code>SOAPElement</code> object
- * @see SOAPFactory#createElement(javax.xml.namespace.QName)
- */
- public abstract SOAPElement createElement(Name name) throws SOAPException;
-
- /**
- * Creates a <code>SOAPElement</code> object initialized with the
- * given <code>QName</code> object. The concrete type of the return value
- * will depend on the name given to the new <code>SOAPElement</code>. For
- * instance, a new <code>SOAPElement</code> with the name
- * "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a
- * <code>SOAPEnvelope</code> that supports SOAP 1.2 behavior to be created.
- *
- * @param qname a <code>QName</code> object with the XML name for
- * the new element
- *
- * @return the new <code>SOAPElement</code> object that was
- * created
- *
- * @exception SOAPException if there is an error in creating the
- * <code>SOAPElement</code> object
- * @see SOAPFactory#createElement(Name)
- * @since SAAJ 1.3
- */
- public SOAPElement createElement(QName qname) throws SOAPException {
- throw new UnsupportedOperationException("createElement(QName) must be overridden by all subclasses of SOAPFactory.");
- }
-
- /**
- * Creates a <code>SOAPElement</code> object initialized with the
- * given local name.
- *
- * @param localName a <code>String</code> giving the local name for
- * the new element
- *
- * @return the new <code>SOAPElement</code> object that was
- * created
- *
- * @exception SOAPException if there is an error in creating the
- * <code>SOAPElement</code> object
- */
- public abstract SOAPElement createElement(String localName)
- throws SOAPException;
-
-
- /**
- * Creates a new <code>SOAPElement</code> object with the given
- * local name, prefix and uri. The concrete type of the return value
- * will depend on the name given to the new <code>SOAPElement</code>. For
- * instance, a new <code>SOAPElement</code> with the name
- * "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a
- * <code>SOAPEnvelope</code> that supports SOAP 1.2 behavior to be created.
- *
- * @param localName a <code>String</code> giving the local name
- * for the new element
- * @param prefix the prefix for this <code>SOAPElement</code>
- * @param uri a <code>String</code> giving the URI of the
- * namespace to which the new element belongs
- *
- * @exception SOAPException if there is an error in creating the
- * <code>SOAPElement</code> object
- */
- public abstract SOAPElement createElement(
- String localName,
- String prefix,
- String uri)
- throws SOAPException;
-
- /**
- * Creates a new <code>Detail</code> object which serves as a container
- * for <code>DetailEntry</code> objects.
- * <P>
- * This factory method creates <code>Detail</code> objects for use in
- * situations where it is not practical to use the <code>SOAPFault</code>
- * abstraction.
- *
- * @return a <code>Detail</code> object
- * @throws SOAPException if there is a SOAP error
- * @throws UnsupportedOperationException if the protocol specified
- * for the SOAPFactory was <code>DYNAMIC_SOAP_PROTOCOL</code>
- */
- public abstract Detail createDetail() throws SOAPException;
-
- /**
- *Creates a new <code>SOAPFault</code> object initialized with the given <code>reasonText</code>
- * and <code>faultCode</code>
- *@param reasonText the ReasonText/FaultString for the fault
- *@param faultCode the FaultCode for the fault
- *@return a <code>SOAPFault</code> object
- *@throws SOAPException if there is a SOAP error
- *@since SAAJ 1.3
- */
- public abstract SOAPFault createFault(String reasonText, QName faultCode) throws SOAPException;
-
- /**
- *Creates a new default <code>SOAPFault</code> object
- *@return a <code>SOAPFault</code> object
- *@throws SOAPException if there is a SOAP error
- *@since SAAJ 1.3
- */
- public abstract SOAPFault createFault() throws SOAPException;
-
- /**
- * Creates a new <code>Name</code> object initialized with the
- * given local name, namespace prefix, and namespace URI.
- * <P>
- * This factory method creates <code>Name</code> objects for use in
- * situations where it is not practical to use the <code>SOAPEnvelope</code>
- * abstraction.
- *
- * @param localName a <code>String</code> giving the local name
- * @param prefix a <code>String</code> giving the prefix of the namespace
- * @param uri a <code>String</code> giving the URI of the namespace
- * @return a <code>Name</code> object initialized with the given
- * local name, namespace prefix, and namespace URI
- * @throws SOAPException if there is a SOAP error
- */
- public abstract Name createName(
- String localName,
- String prefix,
- String uri)
- throws SOAPException;
-
- /**
- * Creates a new <code>Name</code> object initialized with the
- * given local name.
- * <P>
- * This factory method creates <code>Name</code> objects for use in
- * situations where it is not practical to use the <code>SOAPEnvelope</code>
- * abstraction.
- *
- * @param localName a <code>String</code> giving the local name
- * @return a <code>Name</code> object initialized with the given
- * local name
- * @throws SOAPException if there is a SOAP error
- */
- public abstract Name createName(String localName) throws SOAPException;
-
- /**
- * Creates a new <code>SOAPFactory</code> object that is an instance of
- * the default implementation (SOAP 1.1),
- *
- * This method uses the following ordered lookup procedure to determine the SOAPFactory implementation class to load:
- * <UL>
- * <LI> Use the javax.xml.soap.SOAPFactory system property.
- * <LI> Use the properties file "lib/jaxm.properties" in the JRE directory. This configuration file is in standard
- * java.util.Properties format and contains the fully qualified name of the implementation class with the key being the
- * system property defined above.
- * <LI> Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API
- * will look for a classname in the file META-INF/services/javax.xml.soap.SOAPFactory in jars available to the runtime.
- * <LI> Use the SAAJMetaFactory instance to locate the SOAPFactory implementation class.
- * </UL>
- *
- * @return a new instance of a <code>SOAPFactory</code>
- *
- * @exception SOAPException if there was an error creating the
- * default <code>SOAPFactory</code>
- * @see SAAJMetaFactory
- */
- public static SOAPFactory newInstance()
- throws SOAPException
- {
- try {
- SOAPFactory factory = (SOAPFactory) FactoryFinder.find(
- SOAP_FACTORY_PROPERTY, DEFAULT_SOAP_FACTORY, false);
- if (factory != null)
- return factory;
- return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
- } catch (Exception ex) {
- throw new SOAPException(
- "Unable to create SOAP Factory: " + ex.getMessage());
- }
-
- }
-
- /**
- * Creates a new <code>SOAPFactory</code> object that is an instance of
- * the specified implementation, this method uses the SAAJMetaFactory to
- * locate the implementation class and create the SOAPFactory instance.
- *
- * @return a new instance of a <code>SOAPFactory</code>
- *
- * @param protocol a string constant representing the protocol of the
- * specified SOAP factory implementation. May be
- * either <code>DYNAMIC_SOAP_PROTOCOL</code>,
- * <code>DEFAULT_SOAP_PROTOCOL</code> (which is the same
- * as) <code>SOAP_1_1_PROTOCOL</code>, or
- * <code>SOAP_1_2_PROTOCOL</code>.
- *
- * @exception SOAPException if there was an error creating the
- * specified <code>SOAPFactory</code>
- * @see SAAJMetaFactory
- * @since SAAJ 1.3
- */
- public static SOAPFactory newInstance(String protocol)
- throws SOAPException {
- return SAAJMetaFactory.getInstance().newSOAPFactory(protocol);
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPFault.java b/src/share/jaxws_classes/javax/xml/soap/SOAPFault.java
deleted file mode 100644
index 249af8c4..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPFault.java
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.util.Iterator;
-import java.util.Locale;
-
-import javax.xml.namespace.QName;
-
-/**
- * An element in the <code>SOAPBody</code> object that contains
- * error and/or status information. This information may relate to
- * errors in the <code>SOAPMessage</code> object or to problems
- * that are not related to the content in the message itself. Problems
- * not related to the message itself are generally errors in
- * processing, such as the inability to communicate with an upstream
- * server.
- * <P>
- * Depending on the <code>protocol</code> specified while creating the
- * <code>MessageFactory</code> instance, a <code>SOAPFault</code> has
- * sub-elements as defined in the SOAP 1.1/SOAP 1.2 specification.
- */
-public interface SOAPFault extends SOAPBodyElement {
-
- /**
- * Sets this <code>SOAPFault</code> object with the given fault code.
- *
- * <P> Fault codes, which give information about the fault, are defined
- * in the SOAP 1.1 specification. A fault code is mandatory and must
- * be of type <code>Name</code>. This method provides a convenient
- * way to set a fault code. For example,
- *
- * <PRE>
- * SOAPEnvelope se = ...;
- * // Create a qualified name in the SOAP namespace with a localName
- * // of "Client". Note that prefix parameter is optional and is null
- * // here which causes the implementation to use an appropriate prefix.
- * Name qname = se.createName("Client", null,
- * SOAPConstants.URI_NS_SOAP_ENVELOPE);
- * SOAPFault fault = ...;
- * fault.setFaultCode(qname);
- * </PRE>
- * It is preferable to use this method over {@link #setFaultCode(String)}.
- *
- * @param faultCodeQName a <code>Name</code> object giving the fault
- * code to be set. It must be namespace qualified.
- * @see #getFaultCodeAsName
- *
- * @exception SOAPException if there was an error in adding the
- * <i>faultcode</i> element to the underlying XML tree.
- *
- * @since SAAJ 1.2
- */
- public void setFaultCode(Name faultCodeQName) throws SOAPException;
-
- /**
- * Sets this <code>SOAPFault</code> object with the given fault code.
- *
- * It is preferable to use this method over {@link #setFaultCode(Name)}.
- *
- * @param faultCodeQName a <code>QName</code> object giving the fault
- * code to be set. It must be namespace qualified.
- * @see #getFaultCodeAsQName
- *
- * @exception SOAPException if there was an error in adding the
- * <code>faultcode</code> element to the underlying XML tree.
- *
- * @see #setFaultCode(Name)
- * @see #getFaultCodeAsQName()
- *
- * @since SAAJ 1.3
- */
- public void setFaultCode(QName faultCodeQName) throws SOAPException;
-
- /**
- * Sets this <code>SOAPFault</code> object with the give fault code.
- * <P>
- * Fault codes, which given information about the fault, are defined in
- * the SOAP 1.1 specification. This element is mandatory in SOAP 1.1.
- * Because the fault code is required to be a QName it is preferable to
- * use the {@link #setFaultCode(Name)} form of this method.
- *
- * @param faultCode a <code>String</code> giving the fault code to be set.
- * It must be of the form "prefix:localName" where the prefix has
- * been defined in a namespace declaration.
- * @see #setFaultCode(Name)
- * @see #getFaultCode
- * @see SOAPElement#addNamespaceDeclaration
- *
- * @exception SOAPException if there was an error in adding the
- * <code>faultCode</code> to the underlying XML tree.
- */
- public void setFaultCode(String faultCode) throws SOAPException;
-
- /**
- * Gets the mandatory SOAP 1.1 fault code for this
- * <code>SOAPFault</code> object as a SAAJ <code>Name</code> object.
- * The SOAP 1.1 specification requires the value of the "faultcode"
- * element to be of type QName. This method returns the content of the
- * element as a QName in the form of a SAAJ Name object. This method
- * should be used instead of the <code>getFaultCode</code> method since
- * it allows applications to easily access the namespace name without
- * additional parsing.
- *
- * @return a <code>Name</code> representing the faultcode
- * @see #setFaultCode(Name)
- *
- * @since SAAJ 1.2
- */
- public Name getFaultCodeAsName();
-
-
- /**
- * Gets the fault code for this
- * <code>SOAPFault</code> object as a <code>QName</code> object.
- *
- * @return a <code>QName</code> representing the faultcode
- *
- * @see #setFaultCode(QName)
- *
- * @since SAAJ 1.3
- */
- public QName getFaultCodeAsQName();
-
- /**
- * Gets the Subcodes for this <code>SOAPFault</code> as an iterator over
- * <code>QNames</code>.
- *
- * @return an <code>Iterator</code> that accesses a sequence of
- * <code>QNames</code>. This <code>Iterator</code> should not support
- * the optional <code>remove</code> method. The order in which the
- * Subcodes are returned reflects the hierarchy of Subcodes present
- * in the fault from top to bottom.
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Subcode.
- *
- * @since SAAJ 1.3
- */
- public Iterator getFaultSubcodes();
-
- /**
- * Removes any Subcodes that may be contained by this
- * <code>SOAPFault</code>. Subsequent calls to
- * <code>getFaultSubcodes</code> will return an empty iterator until a call
- * to <code>appendFaultSubcode</code> is made.
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Subcode.
- *
- * @since SAAJ 1.3
- */
- public void removeAllFaultSubcodes();
-
- /**
- * Adds a Subcode to the end of the sequence of Subcodes contained by this
- * <code>SOAPFault</code>. Subcodes, which were introduced in SOAP 1.2, are
- * represented by a recursive sequence of subelements rooted in the
- * mandatory Code subelement of a SOAP Fault.
- *
- * @param subcode a QName containing the Value of the Subcode.
- *
- * @exception SOAPException if there was an error in setting the Subcode
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Subcode.
- *
- * @since SAAJ 1.3
- */
- public void appendFaultSubcode(QName subcode) throws SOAPException;
-
- /**
- * Gets the fault code for this <code>SOAPFault</code> object.
- *
- * @return a <code>String</code> with the fault code
- * @see #getFaultCodeAsName
- * @see #setFaultCode
- */
- public String getFaultCode();
-
- /**
- * Sets this <code>SOAPFault</code> object with the given fault actor.
- * <P>
- * The fault actor is the recipient in the message path who caused the
- * fault to happen.
- * <P>
- * If this <code>SOAPFault</code> supports SOAP 1.2 then this call is
- * equivalent to {@link #setFaultRole(String)}
- *
- * @param faultActor a <code>String</code> identifying the actor that
- * caused this <code>SOAPFault</code> object
- * @see #getFaultActor
- *
- * @exception SOAPException if there was an error in adding the
- * <code>faultActor</code> to the underlying XML tree.
- */
- public void setFaultActor(String faultActor) throws SOAPException;
-
- /**
- * Gets the fault actor for this <code>SOAPFault</code> object.
- * <P>
- * If this <code>SOAPFault</code> supports SOAP 1.2 then this call is
- * equivalent to {@link #getFaultRole()}
- *
- * @return a <code>String</code> giving the actor in the message path
- * that caused this <code>SOAPFault</code> object
- * @see #setFaultActor
- */
- public String getFaultActor();
-
- /**
- * Sets the fault string for this <code>SOAPFault</code> object
- * to the given string.
- * <P>
- * If this
- * <code>SOAPFault</code> is part of a message that supports SOAP 1.2 then
- * this call is equivalent to:
- * <pre>
- * addFaultReasonText(faultString, Locale.getDefault());
- * </pre>
- *
- * @param faultString a <code>String</code> giving an explanation of
- * the fault
- * @see #getFaultString
- *
- * @exception SOAPException if there was an error in adding the
- * <code>faultString</code> to the underlying XML tree.
- */
- public void setFaultString(String faultString) throws SOAPException;
-
- /**
- * Sets the fault string for this <code>SOAPFault</code> object
- * to the given string and localized to the given locale.
- * <P>
- * If this
- * <code>SOAPFault</code> is part of a message that supports SOAP 1.2 then
- * this call is equivalent to:
- * <pre>
- * addFaultReasonText(faultString, locale);
- * </pre>
- *
- * @param faultString a <code>String</code> giving an explanation of
- * the fault
- * @param locale a {@link java.util.Locale Locale} object indicating
- * the native language of the <code>faultString</code>
- * @see #getFaultString
- *
- * @exception SOAPException if there was an error in adding the
- * <code>faultString</code> to the underlying XML tree.
- *
- * @since SAAJ 1.2
- */
- public void setFaultString(String faultString, Locale locale)
- throws SOAPException;
-
- /**
- * Gets the fault string for this <code>SOAPFault</code> object.
- * <P>
- * If this
- * <code>SOAPFault</code> is part of a message that supports SOAP 1.2 then
- * this call is equivalent to:
- * <pre>
- * String reason = null;
- * try {
- * reason = (String) getFaultReasonTexts().next();
- * } catch (SOAPException e) {}
- * return reason;
- * </pre>
- *
- * @return a <code>String</code> giving an explanation of
- * the fault
- * @see #setFaultString(String)
- * @see #setFaultString(String, Locale)
- */
- public String getFaultString();
-
- /**
- * Gets the locale of the fault string for this <code>SOAPFault</code>
- * object.
- * <P>
- * If this
- * <code>SOAPFault</code> is part of a message that supports SOAP 1.2 then
- * this call is equivalent to:
- * <pre>
- * Locale locale = null;
- * try {
- * locale = (Locale) getFaultReasonLocales().next();
- * } catch (SOAPException e) {}
- * return locale;
- * </pre>
- *
- * @return a <code>Locale</code> object indicating the native language of
- * the fault string or <code>null</code> if no locale was specified
- * @see #setFaultString(String, Locale)
- *
- * @since SAAJ 1.2
- */
- public Locale getFaultStringLocale();
-
- /**
- * Returns true if this <code>SOAPFault</code> has a <code>Detail</code>
- * subelement and false otherwise. Equivalent to
- * <code>(getDetail()!=null)</code>.
- *
- * @return true if this <code>SOAPFault</code> has a <code>Detail</code>
- * subelement and false otherwise.
- *
- * @since SAAJ 1.3
- */
- public boolean hasDetail();
-
- /**
- * Returns the optional detail element for this <code>SOAPFault</code>
- * object.
- * <P>
- * A <code>Detail</code> object carries application-specific error
- * information, the scope of the error information is restricted to
- * faults in the <code>SOAPBodyElement</code> objects if this is a
- * SOAP 1.1 Fault.
- *
- * @return a <code>Detail</code> object with application-specific
- * error information if present, null otherwise
- */
- public Detail getDetail();
-
- /**
- * Creates an optional <code>Detail</code> object and sets it as the
- * <code>Detail</code> object for this <code>SOAPFault</code>
- * object.
- * <P>
- * It is illegal to add a detail when the fault already
- * contains a detail. Therefore, this method should be called
- * only after the existing detail has been removed.
- *
- * @return the new <code>Detail</code> object
- *
- * @exception SOAPException if this
- * <code>SOAPFault</code> object already contains a
- * valid <code>Detail</code> object
- */
- public Detail addDetail() throws SOAPException;
-
- /**
- * Returns an <code>Iterator</code> over a distinct sequence of
- * <code>Locale</code>s for which there are associated Reason Text items.
- * Any of these <code>Locale</code>s can be used in a call to
- * <code>getFaultReasonText</code> in order to obtain a localized version
- * of the Reason Text string.
- *
- * @return an <code>Iterator</code> over a sequence of <code>Locale</code>
- * objects for which there are associated Reason Text items.
- *
- * @exception SOAPException if there was an error in retrieving
- * the fault Reason locales.
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Reason.
- *
- * @since SAAJ 1.3
- */
- public Iterator getFaultReasonLocales() throws SOAPException;
-
- /**
- * Returns an <code>Iterator</code> over a sequence of
- * <code>String</code> objects containing all of the Reason Text items for
- * this <code>SOAPFault</code>.
- *
- * @return an <code>Iterator</code> over env:Fault/env:Reason/env:Text items.
- *
- * @exception SOAPException if there was an error in retrieving
- * the fault Reason texts.
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Reason.
- *
- * @since SAAJ 1.3
- */
- public Iterator getFaultReasonTexts() throws SOAPException;
-
- /**
- * Returns the Reason Text associated with the given <code>Locale</code>.
- * If more than one such Reason Text exists the first matching Text is
- * returned
- *
- * @param locale -- the <code>Locale</code> for which a localized
- * Reason Text is desired
- *
- * @return the Reason Text associated with <code>locale</code>
- *
- * @see #getFaultString
- *
- * @exception SOAPException if there was an error in retrieving
- * the fault Reason text for the specified locale .
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Reason.
- *
- * @since SAAJ 1.3
- */
- public String getFaultReasonText(Locale locale) throws SOAPException;
-
- /**
- * Appends or replaces a Reason Text item containing the specified
- * text message and an <i>xml:lang</i> derived from
- * <code>locale</code>. If a Reason Text item with this
- * <i>xml:lang</i> already exists its text value will be replaced
- * with <code>text</code>.
- * The <code>locale</code> parameter should not be <code>null</code>
- * <P>
- * Code sample:
- *
- * <PRE>
- * SOAPFault fault = ...;
- * fault.addFaultReasonText("Version Mismatch", Locale.ENGLISH);
- * </PRE>
- *
- * @param text -- reason message string
- * @param locale -- Locale object representing the locale of the message
- *
- * @exception SOAPException if there was an error in adding the Reason text
- * or the <code>locale</code> passed was <code>null</code>.
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Reason.
- *
- * @since SAAJ 1.3
- */
- public void addFaultReasonText(String text, java.util.Locale locale)
- throws SOAPException;
-
- /**
- * Returns the optional Node element value for this
- * <code>SOAPFault</code> object. The Node element is
- * optional in SOAP 1.2.
- *
- * @return Content of the env:Fault/env:Node element as a String
- * or <code>null</code> if none
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Node.
- *
- * @since SAAJ 1.3
- */
- public String getFaultNode();
-
- /**
- * Creates or replaces any existing Node element value for
- * this <code>SOAPFault</code> object. The Node element
- * is optional in SOAP 1.2.
- *
- * @exception SOAPException if there was an error in setting the
- * Node for this <code>SOAPFault</code> object.
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Node.
- *
- *
- * @since SAAJ 1.3
- */
- public void setFaultNode(String uri) throws SOAPException;
-
- /**
- * Returns the optional Role element value for this
- * <code>SOAPFault</code> object. The Role element is
- * optional in SOAP 1.2.
- *
- * @return Content of the env:Fault/env:Role element as a String
- * or <code>null</code> if none
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Role.
- *
- * @since SAAJ 1.3
- */
- public String getFaultRole();
-
- /**
- * Creates or replaces any existing Role element value for
- * this <code>SOAPFault</code> object. The Role element
- * is optional in SOAP 1.2.
- *
- * @param uri - the URI of the Role
- *
- * @exception SOAPException if there was an error in setting the
- * Role for this <code>SOAPFault</code> object.
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Role.
- *
- * @since SAAJ 1.3
- */
- public void setFaultRole(String uri) throws SOAPException;
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPFaultElement.java b/src/share/jaxws_classes/javax/xml/soap/SOAPFaultElement.java
deleted file mode 100644
index 47df6f42..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPFaultElement.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * A representation of the contents in
- * a <code>SOAPFault</code> object. The <code>Detail</code> interface
- * is a <code>SOAPFaultElement</code>.
- * <P>
- * Content is added to a <code>SOAPFaultElement</code> using the
- * <code>SOAPElement</code> method <code>addTextNode</code>.
- */
-public interface SOAPFaultElement extends SOAPElement {
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPHeader.java b/src/share/jaxws_classes/javax/xml/soap/SOAPHeader.java
deleted file mode 100644
index 525969af..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPHeader.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A representation of the SOAP header
- * element. A SOAP header element consists of XML data that affects
- * the way the application-specific content is processed by the message
- * provider. For example, transaction semantics, authentication information,
- * and so on, can be specified as the content of a <code>SOAPHeader</code>
- * object.
- * <P>
- * A <code>SOAPEnvelope</code> object contains an empty
- * <code>SOAPHeader</code> object by default. If the <code>SOAPHeader</code>
- * object, which is optional, is not needed, it can be retrieved and deleted
- * with the following line of code. The variable <i>se</i> is a
- * <code>SOAPEnvelope</code> object.
- * <PRE>
- * se.getHeader().detachNode();
- * </PRE>
- *
- * A <code>SOAPHeader</code> object is created with the <code>SOAPEnvelope</code>
- * method <code>addHeader</code>. This method, which creates a new header and adds it
- * to the envelope, may be called only after the existing header has been removed.
- *
- * <PRE>
- * se.getHeader().detachNode();
- * SOAPHeader sh = se.addHeader();
- * </PRE>
- * <P>
- * A <code>SOAPHeader</code> object can have only <code>SOAPHeaderElement</code>
- * objects as its immediate children. The method <code>addHeaderElement</code>
- * creates a new <code>HeaderElement</code> object and adds it to the
- * <code>SOAPHeader</code> object. In the following line of code, the
- * argument to the method <code>addHeaderElement</code> is a <code>Name</code>
- * object that is the name for the new <code>HeaderElement</code> object.
- * <PRE>
- * SOAPHeaderElement shElement = sh.addHeaderElement(name);
- * </PRE>
- *
- * @see SOAPHeaderElement
- */
-public interface SOAPHeader extends SOAPElement {
- /**
- * Creates a new <code>SOAPHeaderElement</code> object initialized with the
- * specified name and adds it to this <code>SOAPHeader</code> object.
- *
- * @param name a <code>Name</code> object with the name of the new
- * <code>SOAPHeaderElement</code> object
- * @return the new <code>SOAPHeaderElement</code> object that was
- * inserted into this <code>SOAPHeader</code> object
- * @exception SOAPException if a SOAP error occurs
- * @see SOAPHeader#addHeaderElement(javax.xml.namespace.QName)
- */
- public SOAPHeaderElement addHeaderElement(Name name)
- throws SOAPException;
-
- /**
- * Creates a new <code>SOAPHeaderElement</code> object initialized with the
- * specified qname and adds it to this <code>SOAPHeader</code> object.
- *
- * @param qname a <code>QName</code> object with the qname of the new
- * <code>SOAPHeaderElement</code> object
- * @return the new <code>SOAPHeaderElement</code> object that was
- * inserted into this <code>SOAPHeader</code> object
- * @exception SOAPException if a SOAP error occurs
- * @see SOAPHeader#addHeaderElement(Name)
- * @since SAAJ 1.3
- */
- public SOAPHeaderElement addHeaderElement(QName qname)
- throws SOAPException;
-
- /**
- * Returns an <code>Iterator</code> over all the <code>SOAPHeaderElement</code> objects
- * in this <code>SOAPHeader</code> object
- * that have the specified <i>actor</i> and that have a MustUnderstand attribute
- * whose value is equivalent to <code>true</code>.
- * <p>
- * In SOAP 1.2 the <i>env:actor</i> attribute is replaced by the <i>env:role</i>
- * attribute, but with essentially the same semantics.
- *
- * @param actor a <code>String</code> giving the URI of the <code>actor</code> / <code>role</code>
- * for which to search
- * @return an <code>Iterator</code> object over all the
- * <code>SOAPHeaderElement</code> objects that contain the specified
- * <code>actor</code> / <code>role</code> and are marked as MustUnderstand
- * @see #examineHeaderElements
- * @see #extractHeaderElements
- * @see SOAPConstants#URI_SOAP_ACTOR_NEXT
- *
- * @since SAAJ 1.2
- */
- public Iterator examineMustUnderstandHeaderElements(String actor);
-
- /**
- * Returns an <code>Iterator</code> over all the <code>SOAPHeaderElement</code> objects
- * in this <code>SOAPHeader</code> object
- * that have the specified <i>actor</i>.
- *
- * An <i>actor</i> is a global attribute that indicates the intermediate
- * parties that should process a message before it reaches its ultimate
- * receiver. An actor receives the message and processes it before sending
- * it on to the next actor. The default actor is the ultimate intended
- * recipient for the message, so if no actor attribute is included in a
- * <code>SOAPHeader</code> object, it is sent to the ultimate receiver
- * along with the message body.
- * <p>
- * In SOAP 1.2 the <i>env:actor</i> attribute is replaced by the <i>env:role</i>
- * attribute, but with essentially the same semantics.
- *
- * @param actor a <code>String</code> giving the URI of the <code>actor</code> / <code>role</code>
- * for which to search
- * @return an <code>Iterator</code> object over all the
- * <code>SOAPHeaderElement</code> objects that contain the specified
- * <code>actor</code> / <code>role</code>
- * @see #extractHeaderElements
- * @see SOAPConstants#URI_SOAP_ACTOR_NEXT
- */
- public Iterator examineHeaderElements(String actor);
-
- /**
- * Returns an <code>Iterator</code> over all the <code>SOAPHeaderElement</code> objects
- * in this <code>SOAPHeader</code> object
- * that have the specified <i>actor</i> and detaches them
- * from this <code>SOAPHeader</code> object.
- * <P>
- * This method allows an actor to process the parts of the
- * <code>SOAPHeader</code> object that apply to it and to remove
- * them before passing the message on to the next actor.
- * <p>
- * In SOAP 1.2 the <i>env:actor</i> attribute is replaced by the <i>env:role</i>
- * attribute, but with essentially the same semantics.
- *
- * @param actor a <code>String</code> giving the URI of the <code>actor</code> / <code>role</code>
- * for which to search
- * @return an <code>Iterator</code> object over all the
- * <code>SOAPHeaderElement</code> objects that contain the specified
- * <code>actor</code> / <code>role</code>
- *
- * @see #examineHeaderElements
- * @see SOAPConstants#URI_SOAP_ACTOR_NEXT
- */
- public Iterator extractHeaderElements(String actor);
-
- /**
- * Creates a new NotUnderstood <code>SOAPHeaderElement</code> object initialized
- * with the specified name and adds it to this <code>SOAPHeader</code> object.
- * This operation is supported only by SOAP 1.2.
- *
- * @param name a <code>QName</code> object with the name of the
- * <code>SOAPHeaderElement</code> object that was not understood.
- * @return the new <code>SOAPHeaderElement</code> object that was
- * inserted into this <code>SOAPHeader</code> object
- * @exception SOAPException if a SOAP error occurs.
- * @exception UnsupportedOperationException if this is a SOAP 1.1 Header.
- * @since SAAJ 1.3
- */
- public SOAPHeaderElement addNotUnderstoodHeaderElement(QName name)
- throws SOAPException;
-
- /**
- * Creates a new Upgrade <code>SOAPHeaderElement</code> object initialized
- * with the specified List of supported SOAP URIs and adds it to this
- * <code>SOAPHeader</code> object.
- * This operation is supported on both SOAP 1.1 and SOAP 1.2 header.
- *
- * @param supportedSOAPURIs an <code>Iterator</code> object with the URIs of SOAP
- * versions supported.
- * @return the new <code>SOAPHeaderElement</code> object that was
- * inserted into this <code>SOAPHeader</code> object
- * @exception SOAPException if a SOAP error occurs.
- * @since SAAJ 1.3
- */
- public SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSOAPURIs)
- throws SOAPException;
-
- /**
- * Creates a new Upgrade <code>SOAPHeaderElement</code> object initialized
- * with the specified array of supported SOAP URIs and adds it to this
- * <code>SOAPHeader</code> object.
- * This operation is supported on both SOAP 1.1 and SOAP 1.2 header.
- *
- * @param supportedSoapUris an array of the URIs of SOAP versions supported.
- * @return the new <code>SOAPHeaderElement</code> object that was
- * inserted into this <code>SOAPHeader</code> object
- * @exception SOAPException if a SOAP error occurs.
- * @since SAAJ 1.3
- */
- public SOAPHeaderElement addUpgradeHeaderElement(String[] supportedSoapUris)
- throws SOAPException;
-
- /**
- * Creates a new Upgrade <code>SOAPHeaderElement</code> object initialized
- * with the specified supported SOAP URI and adds it to this
- * <code>SOAPHeader</code> object.
- * This operation is supported on both SOAP 1.1 and SOAP 1.2 header.
- *
- * @param supportedSoapUri the URI of SOAP the version that is supported.
- * @return the new <code>SOAPHeaderElement</code> object that was
- * inserted into this <code>SOAPHeader</code> object
- * @exception SOAPException if a SOAP error occurs.
- * @since SAAJ 1.3
- */
- public SOAPHeaderElement addUpgradeHeaderElement(String supportedSoapUri)
- throws SOAPException;
-
- /**
- * Returns an <code>Iterator</code> over all the <code>SOAPHeaderElement</code> objects
- * in this <code>SOAPHeader</code> object.
- *
- * @return an <code>Iterator</code> object over all the
- * <code>SOAPHeaderElement</code> objects contained by this
- * <code>SOAPHeader</code>
- * @see #extractAllHeaderElements
- *
- * @since SAAJ 1.2
- */
- public Iterator examineAllHeaderElements();
-
- /**
- * Returns an <code>Iterator</code> over all the <code>SOAPHeaderElement</code> objects
- * in this <code>SOAPHeader</code> object and detaches them
- * from this <code>SOAPHeader</code> object.
- *
- * @return an <code>Iterator</code> object over all the
- * <code>SOAPHeaderElement</code> objects contained by this
- * <code>SOAPHeader</code>
- *
- * @see #examineAllHeaderElements
- *
- * @since SAAJ 1.2
- */
- public Iterator extractAllHeaderElements();
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPHeaderElement.java b/src/share/jaxws_classes/javax/xml/soap/SOAPHeaderElement.java
deleted file mode 100644
index a14ff078..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPHeaderElement.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * An object representing the contents in the SOAP header part of the
- * SOAP envelope.
- * The immediate children of a <code>SOAPHeader</code> object can
- * be represented only as <code>SOAPHeaderElement</code> objects.
- * <P>
- * A <code>SOAPHeaderElement</code> object can have other
- * <code>SOAPElement</code> objects as its children.
- */
-public interface SOAPHeaderElement extends SOAPElement {
-
- /**
- * Sets the actor associated with this <code>SOAPHeaderElement</code>
- * object to the specified actor. The default value of an actor is:
- * <code>SOAPConstants.URI_SOAP_ACTOR_NEXT</code>
- * <P>
- * If this <code>SOAPHeaderElement</code> supports SOAP 1.2 then this call is
- * equivalent to {@link #setRole(String)}
- *
- * @param actorURI a <code>String</code> giving the URI of the actor
- * to set
- *
- * @exception IllegalArgumentException if there is a problem in
- * setting the actor.
- *
- * @see #getActor
- */
- public void setActor(String actorURI);
-
- /**
- * Sets the <code>Role</code> associated with this <code>SOAPHeaderElement</code>
- * object to the specified <code>Role</code>.
- *
- * @param uri - the URI of the <code>Role</code>
- *
- * @throws SOAPException if there is an error in setting the role
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Role.
- *
- * @since SAAJ 1.3
- */
- public void setRole(String uri) throws SOAPException;
-
- /**
- * Returns the uri of the <i>actor</i> attribute of this
- * <code>SOAPHeaderElement</code>.
- *<P>
- * If this <code>SOAPHeaderElement</code> supports SOAP 1.2 then this call is
- * equivalent to {@link #getRole()}
- * @return a <code>String</code> giving the URI of the actor
- * @see #setActor
- */
- public String getActor();
-
- /**
- * Returns the value of the <i>Role</i> attribute of this
- * <code>SOAPHeaderElement</code>.
- *
- * @return a <code>String</code> giving the URI of the <code>Role</code>
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Role.
- *
- * @since SAAJ 1.3
- */
- public String getRole();
-
- /**
- * Sets the mustUnderstand attribute for this <code>SOAPHeaderElement</code>
- * object to be either true or false.
- * <P>
- * If the mustUnderstand attribute is on, the actor who receives the
- * <code>SOAPHeaderElement</code> must process it correctly. This
- * ensures, for example, that if the <code>SOAPHeaderElement</code>
- * object modifies the message, that the message is being modified correctly.
- *
- * @param mustUnderstand <code>true</code> to set the mustUnderstand
- * attribute to true; <code>false</code> to set it to false
- *
- * @exception IllegalArgumentException if there is a problem in
- * setting the mustUnderstand attribute
- * @see #getMustUnderstand
- * @see #setRelay
- */
- public void setMustUnderstand(boolean mustUnderstand);
-
- /**
- * Returns the boolean value of the mustUnderstand attribute for this
- * <code>SOAPHeaderElement</code>.
- *
- * @return <code>true</code> if the mustUnderstand attribute of this
- * <code>SOAPHeaderElement</code> object is turned on; <code>false</code>
- * otherwise
- */
- public boolean getMustUnderstand();
-
- /**
- * Sets the <i>relay</i> attribute for this <code>SOAPHeaderElement</code> to be
- * either true or false.
- * <P>
- * The SOAP relay attribute is set to true to indicate that the SOAP header
- * block must be relayed by any node that is targeted by the header block
- * but not actually process it. This attribute is ignored on header blocks
- * whose mustUnderstand attribute is set to true or that are targeted at
- * the ultimate reciever (which is the default). The default value of this
- * attribute is <code>false</code>.
- *
- * @param relay the new value of the <i>relay</i> attribute
- *
- * @exception SOAPException if there is a problem in setting the
- * relay attribute.
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Relay attribute.
- *
- * @see #setMustUnderstand
- * @see #getRelay
- *
- * @since SAAJ 1.3
- */
- public void setRelay(boolean relay) throws SOAPException;
-
- /**
- * Returns the boolean value of the <i>relay</i> attribute for this
- * <code>SOAPHeaderElement</code>
- *
- * @return <code>true</code> if the relay attribute is turned on;
- * <code>false</code> otherwise
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Relay attribute.
- *
- * @see #getMustUnderstand
- * @see #setRelay
- *
- * @since SAAJ 1.3
- */
- public boolean getRelay();
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPMessage.java b/src/share/jaxws_classes/javax/xml/soap/SOAPMessage.java
deleted file mode 100644
index ef7719d5..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPMessage.java
+++ /dev/null
@@ -1,456 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-import java.io.OutputStream;
-import java.io.IOException;
-
-import java.util.Iterator;
-
-import javax.activation.DataHandler;
-
-/**
- * The root class for all SOAP messages. As transmitted on the "wire", a SOAP
- * message is an XML document or a MIME message whose first body part is an
- * XML/SOAP document.
- * <P>
- * A <code>SOAPMessage</code> object consists of a SOAP part and optionally
- * one or more attachment parts. The SOAP part for a <code>SOAPMessage</code>
- * object is a <code>SOAPPart</code> object, which contains information used
- * for message routing and identification, and which can contain
- * application-specific content. All data in the SOAP Part of a message must be
- * in XML format.
- * <P>
- * A new <code>SOAPMessage</code> object contains the following by default:
- * <UL>
- * <LI>A <code>SOAPPart</code> object
- * <LI>A <code>SOAPEnvelope</code> object
- * <LI>A <code>SOAPBody</code> object
- * <LI>A <code>SOAPHeader</code> object
- * </UL>
- * The SOAP part of a message can be retrieved by calling the method <code>SOAPMessage.getSOAPPart()</code>.
- * The <code>SOAPEnvelope</code> object is retrieved from the <code>SOAPPart</code>
- * object, and the <code>SOAPEnvelope</code> object is used to retrieve the
- * <code>SOAPBody</code> and <code>SOAPHeader</code> objects.
- *
- * <PRE>
- * SOAPPart sp = message.getSOAPPart();
- * SOAPEnvelope se = sp.getEnvelope();
- * SOAPBody sb = se.getBody();
- * SOAPHeader sh = se.getHeader();
- * </PRE>
- *
- * <P>
- * In addition to the mandatory <code>SOAPPart</code> object, a <code>SOAPMessage</code>
- * object may contain zero or more <code>AttachmentPart</code> objects, each
- * of which contains application-specific data. The <code>SOAPMessage</code>
- * interface provides methods for creating <code>AttachmentPart</code>
- * objects and also for adding them to a <code>SOAPMessage</code> object. A
- * party that has received a <code>SOAPMessage</code> object can examine its
- * contents by retrieving individual attachment parts.
- * <P>
- * Unlike the rest of a SOAP message, an attachment is not required to be in
- * XML format and can therefore be anything from simple text to an image file.
- * Consequently, any message content that is not in XML format must be in an
- * <code>AttachmentPart</code> object.
- * <P>
- * A <code>MessageFactory</code> object may create <code>SOAPMessage</code>
- * objects with behavior that is specialized to a particular implementation or
- * application of SAAJ. For instance, a <code>MessageFactory</code> object
- * may produce <code>SOAPMessage</code> objects that conform to a particular
- * Profile such as ebXML. In this case a <code>MessageFactory</code> object
- * might produce <code>SOAPMessage</code> objects that are initialized with
- * ebXML headers.
- * <P>
- * In order to ensure backward source compatibility, methods that are added to
- * this class after version 1.1 of the SAAJ specification are all concrete
- * instead of abstract and they all have default implementations. Unless
- * otherwise noted in the JavaDocs for those methods the default
- * implementations simply throw an <code>UnsupportedOperationException</code>
- * and the SAAJ implementation code must override them with methods that
- * provide the specified behavior. Legacy client code does not have this
- * restriction, however, so long as there is no claim made that it conforms to
- * some later version of the specification than it was originally written for.
- * A legacy class that extends the SOAPMessage class can be compiled and/or run
- * against succeeding versions of the SAAJ API without modification. If such a
- * class was correctly implemented then it will continue to behave correctly
- * relative to the version of the specification against which it was written.
- *
- * @see MessageFactory
- * @see AttachmentPart
- */
-public abstract class SOAPMessage {
- /**
- * Specifies the character type encoding for the SOAP Message. Valid values
- * include "utf-8" and "utf-16". See vendor documentation for additional
- * supported values. The default is "utf-8".
- *
- * @see SOAPMessage#setProperty(String, Object) SOAPMessage.setProperty
- * @since SAAJ 1.2
- */
- public static final String CHARACTER_SET_ENCODING =
- "javax.xml.soap.character-set-encoding";
-
- /**
- * Specifies whether the SOAP Message will contain an XML declaration when
- * it is sent. The only valid values are "true" and "false". The default is
- * "false".
- *
- * @see SOAPMessage#setProperty(String, Object) SOAPMessage.setProperty
- * @since SAAJ 1.2
- */
- public static final String WRITE_XML_DECLARATION =
- "javax.xml.soap.write-xml-declaration";
-
- /**
- * Sets the description of this <code>SOAPMessage</code> object's
- * content with the given description.
- *
- * @param description a <code>String</code> describing the content of this
- * message
- * @see #getContentDescription
- */
- public abstract void setContentDescription(String description);
-
- /**
- * Retrieves a description of this <code>SOAPMessage</code> object's
- * content.
- *
- * @return a <code>String</code> describing the content of this
- * message or <code>null</code> if no description has been set
- * @see #setContentDescription
- */
- public abstract String getContentDescription();
-
- /**
- * Gets the SOAP part of this <code>SOAPMessage</code> object.
- * <P>
- * <code>SOAPMessage</code> object contains one or more attachments, the
- * SOAP Part must be the first MIME body part in the message.
- *
- * @return the <code>SOAPPart</code> object for this <code>SOAPMessage</code>
- * object
- */
- public abstract SOAPPart getSOAPPart();
-
- /**
- * Gets the SOAP Body contained in this <code>SOAPMessage</code> object.
- * <p>
- *
- * @return the <code>SOAPBody</code> object contained by this <code>SOAPMessage</code>
- * object
- * @exception SOAPException
- * if the SOAP Body does not exist or cannot be retrieved
- * @since SAAJ 1.2
- */
- public SOAPBody getSOAPBody() throws SOAPException {
- throw new UnsupportedOperationException("getSOAPBody must be overridden by all subclasses of SOAPMessage");
- }
-
- /**
- * Gets the SOAP Header contained in this <code>SOAPMessage</code>
- * object.
- * <p>
- *
- * @return the <code>SOAPHeader</code> object contained by this <code>SOAPMessage</code>
- * object
- * @exception SOAPException
- * if the SOAP Header does not exist or cannot be retrieved
- * @since SAAJ 1.2
- */
- public SOAPHeader getSOAPHeader() throws SOAPException {
- throw new UnsupportedOperationException("getSOAPHeader must be overridden by all subclasses of SOAPMessage");
- }
-
- /**
- * Removes all <code>AttachmentPart</code> objects that have been added
- * to this <code>SOAPMessage</code> object.
- * <P>
- * This method does not touch the SOAP part.
- */
- public abstract void removeAllAttachments();
-
- /**
- * Gets a count of the number of attachments in this message. This count
- * does not include the SOAP part.
- *
- * @return the number of <code>AttachmentPart</code> objects that are
- * part of this <code>SOAPMessage</code> object
- */
- public abstract int countAttachments();
-
- /**
- * Retrieves all the <code>AttachmentPart</code> objects that are part of
- * this <code>SOAPMessage</code> object.
- *
- * @return an iterator over all the attachments in this message
- */
- public abstract Iterator getAttachments();
-
- /**
- * Retrieves all the <code>AttachmentPart</code> objects that have header
- * entries that match the specified headers. Note that a returned
- * attachment could have headers in addition to those specified.
- *
- * @param headers
- * a <code>MimeHeaders</code> object containing the MIME
- * headers for which to search
- * @return an iterator over all attachments that have a header that matches
- * one of the given headers
- */
- public abstract Iterator getAttachments(MimeHeaders headers);
-
- /**
- * Removes all the <code>AttachmentPart</code> objects that have header
- * entries that match the specified headers. Note that the removed
- * attachment could have headers in addition to those specified.
- *
- * @param headers
- * a <code>MimeHeaders</code> object containing the MIME
- * headers for which to search
- * @since SAAJ 1.3
- */
- public abstract void removeAttachments(MimeHeaders headers);
-
-
- /**
- * Returns an <code>AttachmentPart</code> object that is associated with an
- * attachment that is referenced by this <code>SOAPElement</code> or
- * <code>null</code> if no such attachment exists. References can be made
- * via an <code>href</code> attribute as described in
- * {@link <a href="http://www.w3.org/TR/SOAP-attachments#SOAPReferenceToAttachements">SOAP Messages with Attachments</a>},
- * or via a single <code>Text</code> child node containing a URI as
- * described in the WS-I Attachments Profile 1.0 for elements of schema
- * type {@link <a href="http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24.html">ref:swaRef</a>}. These two mechanisms must be supported.
- * The support for references via <code>href</code> attribute also implies that
- * this method should also be supported on an element that is an
- * <i>xop:Include</i> element (
- * {@link <a href="http://www.w3.org/2000/xp/Group/3/06/Attachments/XOP.html">XOP</a>}).
- * other reference mechanisms may be supported by individual
- * implementations of this standard. Contact your vendor for details.
- *
- * @param element The <code>SOAPElement</code> containing the reference to an Attachment
- * @return the referenced <code>AttachmentPart</code> or null if no such
- * <code>AttachmentPart</code> exists or no reference can be
- * found in this <code>SOAPElement</code>.
- * @throws SOAPException if there is an error in the attempt to access the
- * attachment
- *
- * @since SAAJ 1.3
- */
- public abstract AttachmentPart getAttachment(SOAPElement element) throws SOAPException;
-
-
- /**
- * Adds the given <code>AttachmentPart</code> object to this <code>SOAPMessage</code>
- * object. An <code>AttachmentPart</code> object must be created before
- * it can be added to a message.
- *
- * @param AttachmentPart
- * an <code>AttachmentPart</code> object that is to become part
- * of this <code>SOAPMessage</code> object
- * @exception IllegalArgumentException
- */
- public abstract void addAttachmentPart(AttachmentPart AttachmentPart);
-
- /**
- * Creates a new empty <code>AttachmentPart</code> object. Note that the
- * method <code>addAttachmentPart</code> must be called with this new
- * <code>AttachmentPart</code> object as the parameter in order for it to
- * become an attachment to this <code>SOAPMessage</code> object.
- *
- * @return a new <code>AttachmentPart</code> object that can be populated
- * and added to this <code>SOAPMessage</code> object
- */
- public abstract AttachmentPart createAttachmentPart();
-
- /**
- * Creates an <code>AttachmentPart</code> object and populates it using
- * the given <code>DataHandler</code> object.
- *
- * @param dataHandler
- * the <code>javax.activation.DataHandler</code> object that
- * will generate the content for this <code>SOAPMessage</code>
- * object
- * @return a new <code>AttachmentPart</code> object that contains data
- * generated by the given <code>DataHandler</code> object
- * @exception IllegalArgumentException
- * if there was a problem with the specified <code>DataHandler</code>
- * object
- * @see javax.activation.DataHandler
- * @see javax.activation.DataContentHandler
- */
- public AttachmentPart createAttachmentPart(DataHandler dataHandler) {
- AttachmentPart attachment = createAttachmentPart();
- attachment.setDataHandler(dataHandler);
- return attachment;
- }
-
- /**
- * Returns all the transport-specific MIME headers for this <code>SOAPMessage</code>
- * object in a transport-independent fashion.
- *
- * @return a <code>MimeHeaders</code> object containing the <code>MimeHeader</code>
- * objects
- */
- public abstract MimeHeaders getMimeHeaders();
-
- /**
- * Creates an <code>AttachmentPart</code> object and populates it with
- * the specified data of the specified content type. The type of the
- * <code>Object</code> should correspond to the value given for the
- * <code>Content-Type</code>.
- *
- * @param content
- * an <code>Object</code> containing the content for the
- * <code>AttachmentPart</code> object to be created
- * @param contentType
- * a <code>String</code> object giving the type of content;
- * examples are "text/xml", "text/plain", and "image/jpeg"
- * @return a new <code>AttachmentPart</code> object that contains the
- * given data
- * @exception IllegalArgumentException
- * may be thrown if the contentType does not match the type
- * of the content object, or if there was no
- * <code>DataContentHandler</code> object for the given
- * content object
- * @see javax.activation.DataHandler
- * @see javax.activation.DataContentHandler
- */
- public AttachmentPart createAttachmentPart(
- Object content,
- String contentType) {
- AttachmentPart attachment = createAttachmentPart();
- attachment.setContent(content, contentType);
- return attachment;
- }
-
- /**
- * Updates this <code>SOAPMessage</code> object with all the changes that
- * have been made to it. This method is called automatically when
- * {@link SOAPMessage#writeTo(OutputStream)} is called. However, if
- * changes are made to a message that was received or to one that has
- * already been sent, the method <code>saveChanges</code> needs to be
- * called explicitly in order to save the changes. The method <code>saveChanges</code>
- * also generates any changes that can be read back (for example, a
- * MessageId in profiles that support a message id). All MIME headers in a
- * message that is created for sending purposes are guaranteed to have
- * valid values only after <code>saveChanges</code> has been called.
- * <P>
- * In addition, this method marks the point at which the data from all
- * constituent <code>AttachmentPart</code> objects are pulled into the
- * message.
- * <P>
- *
- * @exception <code>SOAPException</code> if there was a problem saving
- * changes to this message.
- */
- public abstract void saveChanges() throws SOAPException;
-
- /**
- * Indicates whether this <code>SOAPMessage</code> object needs to have
- * the method <code>saveChanges</code> called on it.
- *
- * @return <code>true</code> if <code>saveChanges</code> needs to be
- * called; <code>false</code> otherwise.
- */
- public abstract boolean saveRequired();
-
- /**
- * Writes this <code>SOAPMessage</code> object to the given output
- * stream. The externalization format is as defined by the SOAP 1.1 with
- * Attachments specification.
- * <P>
- * If there are no attachments, just an XML stream is written out. For
- * those messages that have attachments, <code>writeTo</code> writes a
- * MIME-encoded byte stream.
- * <P>
- * Note that this method does not write the transport-specific MIME Headers
- * of the Message
- *
- * @param out
- * the <code>OutputStream</code> object to which this <code>SOAPMessage</code>
- * object will be written
- * @exception IOException
- * if an I/O error occurs
- * @exception SOAPException
- * if there was a problem in externalizing this SOAP message
- */
- public abstract void writeTo(OutputStream out)
- throws SOAPException, IOException;
-
- /**
- * Associates the specified value with the specified property. If there was
- * already a value associated with this property, the old value is
- * replaced.
- * <p>
- * The valid property names include
- * {@link SOAPMessage#WRITE_XML_DECLARATION} and
- * {@link SOAPMessage#CHARACTER_SET_ENCODING}. All of these standard SAAJ
- * properties are prefixed by "javax.xml.soap". Vendors may also add
- * implementation specific properties. These properties must be prefixed
- * with package names that are unique to the vendor.
- * <p>
- * Setting the property <code>WRITE_XML_DECLARATION</code> to <code>"true"</code>
- * will cause an XML Declaration to be written out at the start of the SOAP
- * message. The default value of "false" suppresses this declaration.
- * <p>
- * The property <code>CHARACTER_SET_ENCODING</code> defaults to the value
- * <code>"utf-8"</code> which causes the SOAP message to be encoded using
- * UTF-8. Setting <code>CHARACTER_SET_ENCODING</code> to <code>"utf-16"</code>
- * causes the SOAP message to be encoded using UTF-16.
- * <p>
- * Some implementations may allow encodings in addition to UTF-8 and
- * UTF-16. Refer to your vendor's documentation for details.
- *
- * @param property
- * the property with which the specified value is to be
- * associated.
- * @param value
- * the value to be associated with the specified property
- * @exception SOAPException
- * if the property name is not recognized.
- * @since SAAJ 1.2
- */
- public void setProperty(String property, Object value)
- throws SOAPException {
- throw new UnsupportedOperationException("setProperty must be overridden by all subclasses of SOAPMessage");
- }
-
- /**
- * Retrieves value of the specified property.
- *
- * @param property
- * the name of the property to retrieve
- * @return the value associated with the named property or <code>null</code>
- * if no such property exists.
- * @exception SOAPException
- * if the property name is not recognized.
- * @since SAAJ 1.2
- */
- public Object getProperty(String property) throws SOAPException {
- throw new UnsupportedOperationException("getProperty must be overridden by all subclasses of SOAPMessage");
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/SOAPPart.java b/src/share/jaxws_classes/javax/xml/soap/SOAPPart.java
deleted file mode 100644
index 9a9a46bf..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/SOAPPart.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.util.Iterator;
-
-import javax.xml.transform.Source;
-
-/**
- * The container for the SOAP-specific portion of a <code>SOAPMessage</code>
- * object. All messages are required to have a SOAP part, so when a
- * <code>SOAPMessage</code> object is created, it will automatically
- * have a <code>SOAPPart</code> object.
- *<P>
- * A <code>SOAPPart</code> object is a MIME part and has the MIME headers
- * Content-Id, Content-Location, and Content-Type. Because the value of
- * Content-Type must be "text/xml", a <code>SOAPPart</code> object automatically
- * has a MIME header of Content-Type with its value set to "text/xml".
- * The value must be "text/xml" because content in the SOAP part of a
- * message must be in XML format. Content that is not of type "text/xml"
- * must be in an <code>AttachmentPart</code> object rather than in the
- * <code>SOAPPart</code> object.
- * <P>
- * When a message is sent, its SOAP part must have the MIME header Content-Type
- * set to "text/xml". Or, from the other perspective, the SOAP part of any
- * message that is received must have the MIME header Content-Type with a
- * value of "text/xml".
- * <P>
- * A client can access the <code>SOAPPart</code> object of a
- * <code>SOAPMessage</code> object by
- * calling the method <code>SOAPMessage.getSOAPPart</code>. The
- * following line of code, in which <code>message</code> is a
- * <code>SOAPMessage</code> object, retrieves the SOAP part of a message.
- * <PRE>
- * SOAPPart soapPart = message.getSOAPPart();
- * </PRE>
- * <P>
- * A <code>SOAPPart</code> object contains a <code>SOAPEnvelope</code> object,
- * which in turn contains a <code>SOAPBody</code> object and a
- * <code>SOAPHeader</code> object.
- * The <code>SOAPPart</code> method <code>getEnvelope</code> can be used
- * to retrieve the <code>SOAPEnvelope</code> object.
- * <P>
- */
-public abstract class SOAPPart implements org.w3c.dom.Document, Node {
-
- /**
- * Gets the <code>SOAPEnvelope</code> object associated with this
- * <code>SOAPPart</code> object. Once the SOAP envelope is obtained, it
- * can be used to get its contents.
- *
- * @return the <code>SOAPEnvelope</code> object for this
- * <code>SOAPPart</code> object
- * @exception SOAPException if there is a SOAP error
- */
- public abstract SOAPEnvelope getEnvelope() throws SOAPException;
-
- /**
- * Retrieves the value of the MIME header whose name is "Content-Id".
- *
- * @return a <code>String</code> giving the value of the MIME header
- * named "Content-Id"
- * @see #setContentId
- */
- public String getContentId() {
- String[] values = getMimeHeader("Content-Id");
- if (values != null && values.length > 0)
- return values[0];
- return null;
- }
-
- /**
- * Retrieves the value of the MIME header whose name is "Content-Location".
- *
- * @return a <code>String</code> giving the value of the MIME header whose
- * name is "Content-Location"
- * @see #setContentLocation
- */
- public String getContentLocation() {
- String[] values = getMimeHeader("Content-Location");
- if (values != null && values.length > 0)
- return values[0];
- return null;
- }
-
- /**
- * Sets the value of the MIME header named "Content-Id"
- * to the given <code>String</code>.
- *
- * @param contentId a <code>String</code> giving the value of the MIME
- * header "Content-Id"
- *
- * @exception IllegalArgumentException if there is a problem in
- * setting the content id
- * @see #getContentId
- */
- public void setContentId(String contentId)
- {
- setMimeHeader("Content-Id", contentId);
- }
- /**
- * Sets the value of the MIME header "Content-Location"
- * to the given <code>String</code>.
- *
- * @param contentLocation a <code>String</code> giving the value
- * of the MIME
- * header "Content-Location"
- * @exception IllegalArgumentException if there is a problem in
- * setting the content location.
- * @see #getContentLocation
- */
- public void setContentLocation(String contentLocation)
- {
- setMimeHeader("Content-Location", contentLocation);
- }
- /**
- * Removes all MIME headers that match the given name.
- *
- * @param header a <code>String</code> giving the name of the MIME header(s) to
- * be removed
- */
- public abstract void removeMimeHeader(String header);
-
- /**
- * Removes all the <code>MimeHeader</code> objects for this
- * <code>SOAPEnvelope</code> object.
- */
- public abstract void removeAllMimeHeaders();
-
- /**
- * Gets all the values of the <code>MimeHeader</code> object
- * in this <code>SOAPPart</code> object that
- * is identified by the given <code>String</code>.
- *
- * @param name the name of the header; example: "Content-Type"
- * @return a <code>String</code> array giving all the values for the
- * specified header
- * @see #setMimeHeader
- */
- public abstract String[] getMimeHeader(String name);
-
- /**
- * Changes the first header entry that matches the given header name
- * so that its value is the given value, adding a new header with the
- * given name and value if no
- * existing header is a match. If there is a match, this method clears
- * all existing values for the first header that matches and sets the
- * given value instead. If more than one header has
- * the given name, this method removes all of the matching headers after
- * the first one.
- * <P>
- * Note that RFC822 headers can contain only US-ASCII characters.
- *
- * @param name a <code>String</code> giving the header name
- * for which to search
- * @param value a <code>String</code> giving the value to be set.
- * This value will be substituted for the current value(s)
- * of the first header that is a match if there is one.
- * If there is no match, this value will be the value for
- * a new <code>MimeHeader</code> object.
- *
- * @exception IllegalArgumentException if there was a problem with
- * the specified mime header name or value
- * @see #getMimeHeader
- */
- public abstract void setMimeHeader(String name, String value);
-
- /**
- * Creates a <code>MimeHeader</code> object with the specified
- * name and value and adds it to this <code>SOAPPart</code> object.
- * If a <code>MimeHeader</code> with the specified name already
- * exists, this method adds the specified value to the already
- * existing value(s).
- * <P>
- * Note that RFC822 headers can contain only US-ASCII characters.
- *
- * @param name a <code>String</code> giving the header name
- * @param value a <code>String</code> giving the value to be set
- * or added
- * @exception IllegalArgumentException if there was a problem with
- * the specified mime header name or value
- */
- public abstract void addMimeHeader(String name, String value);
-
- /**
- * Retrieves all the headers for this <code>SOAPPart</code> object
- * as an iterator over the <code>MimeHeader</code> objects.
- *
- * @return an <code>Iterator</code> object with all of the Mime
- * headers for this <code>SOAPPart</code> object
- */
- public abstract Iterator getAllMimeHeaders();
-
- /**
- * Retrieves all <code>MimeHeader</code> objects that match a name in
- * the given array.
- *
- * @param names a <code>String</code> array with the name(s) of the
- * MIME headers to be returned
- * @return all of the MIME headers that match one of the names in the
- * given array, returned as an <code>Iterator</code> object
- */
- public abstract Iterator getMatchingMimeHeaders(String[] names);
-
- /**
- * Retrieves all <code>MimeHeader</code> objects whose name does
- * not match a name in the given array.
- *
- * @param names a <code>String</code> array with the name(s) of the
- * MIME headers not to be returned
- * @return all of the MIME headers in this <code>SOAPPart</code> object
- * except those that match one of the names in the
- * given array. The nonmatching MIME headers are returned as an
- * <code>Iterator</code> object.
- */
- public abstract Iterator getNonMatchingMimeHeaders(String[] names);
-
- /**
- * Sets the content of the <code>SOAPEnvelope</code> object with the data
- * from the given <code>Source</code> object. This <code>Source</code>
- * must contain a valid SOAP document.
- *
- * @param source the <code>javax.xml.transform.Source</code> object with the
- * data to be set
- *
- * @exception SOAPException if there is a problem in setting the source
- * @see #getContent
- */
- public abstract void setContent(Source source) throws SOAPException;
-
- /**
- * Returns the content of the SOAPEnvelope as a JAXP <code>Source</code>
- * object.
- *
- * @return the content as a <code>javax.xml.transform.Source</code> object
- *
- * @exception SOAPException if the implementation cannot convert
- * the specified <code>Source</code> object
- * @see #setContent
- */
- public abstract Source getContent() throws SOAPException;
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/Text.java b/src/share/jaxws_classes/javax/xml/soap/Text.java
deleted file mode 100644
index 6bc418b2..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/Text.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2004, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * A representation of a node whose value is text. A <code>Text</code> object
- * may represent text that is content or text that is a comment.
- *
- */
-public interface Text extends Node, org.w3c.dom.Text {
-
- /**
- * Retrieves whether this <code>Text</code> object represents a comment.
- *
- * @return <code>true</code> if this <code>Text</code> object is a
- * comment; <code>false</code> otherwise
- */
- public boolean isComment();
-}
diff --git a/src/share/jaxws_classes/javax/xml/soap/package.html b/src/share/jaxws_classes/javax/xml/soap/package.html
deleted file mode 100644
index 10b5b4b6..00000000
--- a/src/share/jaxws_classes/javax/xml/soap/package.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!--
- Copyright (c) 1993, 2002, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-<head>
-
- <title></title>
-
-</head>
- <body bgcolor="white">
- Provides the API for creating and building SOAP messages. This package
- is defined in the <i>SOAP with Attachments API for Java<sup><font
- size="-2">TM</font></sup> (SAAJ) 1.3</i> specification.
-<p> The API in the <code>javax.xml.soap</code> package allows you to do the
- following: </p>
-
-<ul>
- <li>create a point-to-point connection to a specified endpoint </li>
- <li>create a SOAP message </li>
- <li>create an XML fragment </li>
- <li>add content to the header of a SOAP message </li>
- <li>add content to the body of a SOAP message </li>
- <li>create attachment parts and add content to them </li>
- <li>access/add/modify parts of a SOAP message </li>
- <li>create/add/modify SOAP fault information </li>
- <li>extract content from a SOAP message </li>
- <li>send a SOAP request-response message </li>
-
-</ul>
-
-<p> <!-- <h2>Package Specification</h2> --> <!-- The SAAJ 1.1 specification gives an overview of the -->
- <!-- <code>javax.xml.soap</code> package and --> <!-- explains how its classes and interfaces work. -->
- <!-- <ul> --> <!-- <li><a href="http://java.sun.com/xml/downloads/jaxm.html"> -->
- <!-- SAAJ 1.1 Specification</a> --> <!-- </ul> --> <!-- <h2>Related Documentation</h2> -->
- <!-- For overviews, tutorials, examples, guides, and tool documentation, please see: -->
- <!-- <ul> --> <!-- <li><a href="../../../../tutorial/doc/JAXM.html">JAXM Tutorial</a> -->
- <!-- <li><a href="../../../../jaxm/index.html">JAXM Reference Implementation (RI) -->
- <!-- Documentation</a> --> <!-- </ul> --> </p>
-In addition the APIs in the <code>javax.xml.soap</code> package extend
-their counterparts in the <code>org.w3c.dom</code> package. This means that
-the <code>SOAPPart</code> of a <code>SOAPMessage</code> is also a DOM Level
-2 <code>Document</code>, and can be manipulated as such by applications,
-tools and libraries that use DOM (see http://www.w3.org/DOM/ for more information).
-It is important to note that, while it is possible to use DOM APIs to add
-ordinary DOM nodes to a SAAJ tree, the SAAJ APIs are still required to return
-SAAJ types when examining or manipulating the tree. In order to accomplish
-this the SAAJ APIs (specifically {@link javax.xml.soap.SOAPElement#getChildElements()})
-are allowed to silently replace objects that are incorrectly typed relative
-to SAAJ requirements with equivalent objects of the required type. These
-replacements must never cause the logical structure of the tree to change,
-so from the perspective of the DOM APIs the tree will remain unchanged. However,
-the physical composition of the tree will have changed so that references
-to the nodes that were replaced will refer to nodes that are no longer a
-part of the tree. The SAAJ APIs are not allowed to make these replacements
-if they are not required so the replacement objects will never subsequently
-be silently replaced by future calls to the SAAJ API.
-<p>
-What this means in
-practical terms is that an application that starts to use SAAJ APIs on a
-tree after manipulating it using DOM APIs must assume that the tree has been
-translated into an all SAAJ tree and that any references to objects within
-the tree that were obtained using DOM APIs are no longer valid. Switching
-from SAAJ APIs to DOM APIs is not allowed to cause invalid references and
-neither is using SAAJ APIs exclusively. It is only switching from using DOM
-APIs on a particular SAAJ tree to using SAAJ APIs that causes the risk of
-invalid references.<br>
-
-</body>
-</html>
diff --git a/src/share/jaxws_classes/javax/xml/ws/Action.java b/src/share/jaxws_classes/javax/xml/ws/Action.java
deleted file mode 100644
index e06fc04d..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/Action.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * The <code>Action</code> annotation allows explicit association of a
- * WS-Addressing <code>Action</code> message addressing property with
- * <code>input</code>, <code>output</code>, and
- * <code>fault</code> messages of the mapped WSDL operation.
- * <p>
- * This annotation can be specified on each method of a service endpoint interface.
- * For such a method, the mapped operation in the generated WSDL's
- * <code>wsam:Action</code> attribute on the WSDL <code>input</code>,
- * <code>output</code> and <code>fault</code> messages of the WSDL <code>operation</code>
- * is based upon which attributes of the <code>Action</code> annotation have been specified.
- * For the exact computation of <code>wsam:Action</code> values for the messages, refer
- * to the algorithm in the JAX-WS specification.
- * <p>
- * <b>Example 1</b>: Specify explicit values for <code>Action</code> message addressing property
- * for <code>input</code> and <code>output</code> messages.
- *
- * <pre>
- * &#64;WebService(targetNamespace="http://example.com/numbers")
- * public class AddNumbersImpl {
- * <b>&#64;Action(
- * input="http://example.com/inputAction",
- * output="http://example.com/outputAction")</b>
- * public int addNumbers(int number1, int number2) {
- * return number1 + number2;
- * }
- * }
- * </pre>
- *
- * The generated WSDL looks like:
- * <pre>
- * &lt;definitions targetNamespace="http://example.com/numbers" ...>
- * ...
- * &lt;portType name="AddNumbersPortType">
- * &lt;operation name="AddNumbers">
- * &lt;input message="tns:AddNumbersInput" name="foo"
- * <b>wsam:Action="http://example.com/inputAction"</b>/>
- * &lt;output message="tns:AddNumbersOutput" name="bar"
- * <b>wsam:Action="http://example.com/outputAction"</b>/>
- * &lt;/operation>
- * &lt;/portType>
- * ...
- * &lt;/definitions>
- * </pre>
- *
- * <p>
- * <b>Example 2</b>: Specify explicit value for <code>Action</code> message addressing property
- * for only the <code>input</code> message. The <code>wsam:Action</code> values for the
- * WSDL <code>output</code> message are computed using the algorithm in the JAX-WS specification.
- *
- * <pre>
- * &#64;WebService(targetNamespace="http://example.com/numbers")
- * public class AddNumbersImpl {
- * <b>&#64;Action(input="http://example.com/inputAction")</b>
- * public int addNumbers(int number1, int number2) {
- * return number1 + number2;
- * }
- * }
- * </pre>
- *
- * The generated WSDL looks like:
- * <pre>
- * &lt;definitions targetNamespace="http://example.com/numbers" ...>
- * ...
- * &lt;portType name="AddNumbersPortType">
- * &lt;operation name="AddNumbers">
- * &lt;input message="tns:AddNumbersInput" name="foo"
- * <b>wsam:Action="http://example.com/inputAction"</b> />
- * &lt;output message="tns:AddNumbersOutput" name="bar"
- * <b>wsam:Action="http://example.com/numbers/AddNumbersPortType/AddNumbersResponse"</b>/>
- * &lt;/operation>
- * &lt;/portType>
- * ...
- * &lt;/definitions>
- * </pre>
- *
- * It is legitimate to specify an explicit value for <code>Action</code> message addressing property for
- * <code>output</code> message only. In this case, <code>wsam:Action</code> value for the
- * WSDL <code>input</code> message is computed using the algorithm in the JAX-WS specification.
- *
- * <p>
- * <b>Example 3</b>: See {@link FaultAction} annotation for an example of
- * how to specify an explicit value for <code>Action</code> message addressing property for the
- * <code>fault</code> message.
- *
- * @see FaultAction
- *
- * @since JAX-WS 2.1
- */
-
-@Documented
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.METHOD)
-public @interface Action {
- /**
- * Explicit value of the WS-Addressing <code>Action</code> message addressing property for the <code>input</code>
- * message of the operation.
- */
- String input() default "";
-
- /**
- * Explicit value of the WS-Addressing <code>Action</code> message addressing property for the <code>output</code>
- * message of the operation.
- */
- String output() default "";
-
- /**
- * Explicit value of the WS-Addressing <code>Action</code> message addressing property for the <code>fault</code>
- * message(s) of the operation. Each exception that is mapped to a fault and requires an explicit WS-Addressing
- * <code>Action</code> message addressing property, needs to be specified as a value in this property
- * using {@link FaultAction} annotation.
- */
- FaultAction[] fault() default { };
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/AsyncHandler.java b/src/share/jaxws_classes/javax/xml/ws/AsyncHandler.java
deleted file mode 100644
index 6a2ac101..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/AsyncHandler.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-/** The <code>AsyncHandler</code> interface is implemented by
- * clients that wish to receive callback notification of the completion of
- * service endpoint operations invoked asynchronously.
- *
- * @since JAX-WS 2.0
-**/
-public interface AsyncHandler<T> {
-
- /** Called when the response to an asynchronous operation is available.
- *
- * @param res The response to the operation invocation.
- *
- **/
- void handleResponse(Response<T> res);
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/Binding.java b/src/share/jaxws_classes/javax/xml/ws/Binding.java
deleted file mode 100644
index 53ad67c4..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/Binding.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-
-/** The <code>Binding</code> interface is the base interface
- * for JAX-WS protocol bindings.
- *
- * @since JAX-WS 2.0
-**/
-public interface Binding {
-
- /**
- * Gets a copy of the handler chain for a protocol binding instance.
- * If the returned chain is modified a call to <code>setHandlerChain</code>
- * is required to configure the binding instance with the new chain.
- *
- * @return java.util.List&lt;Handler> Handler chain
- */
- public java.util.List<javax.xml.ws.handler.Handler> getHandlerChain();
-
- /**
- * Sets the handler chain for the protocol binding instance.
- *
- * @param chain A List of handler configuration entries
- * @throws WebServiceException On an error in the configuration of
- * the handler chain
- * @throws java.lang.UnsupportedOperationException If this
- * operation is not supported. This may be done to
- * avoid any overriding of a pre-configured handler
- * chain.
- */
- public void setHandlerChain(java.util.List<javax.xml.ws.handler.Handler> chain);
-
- /**
- * Get the URI for this binding instance.
- *
- * @return String The binding identifier for the port.
- * Never returns <code>null</code>
- *
- * @since JAX-WS 2.1
- */
- String getBindingID();
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/BindingProvider.java b/src/share/jaxws_classes/javax/xml/ws/BindingProvider.java
deleted file mode 100644
index 6440e420..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/BindingProvider.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.util.Map;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-/**
- * The <code>BindingProvider</code> interface provides access to the
- * protocol binding and associated context objects for request and
- * response message processing.
- *
- * @since JAX-WS 2.0
- *
- * @see javax.xml.ws.Binding
- **/
-public interface BindingProvider {
- /**
- * Standard property: User name for authentication.
- * <p>Type: <code>java.lang.String</code>
- **/
- public static final String USERNAME_PROPERTY =
- "javax.xml.ws.security.auth.username";
-
- /**
- * Standard property: Password for authentication.
- * <p>Type: <code>java.lang.String</code>
- **/
- public static final String PASSWORD_PROPERTY =
- "javax.xml.ws.security.auth.password";
-
- /**
- * Standard property: Target service endpoint address. The
- * URI scheme for the endpoint address specification MUST
- * correspond to the protocol/transport binding for the
- * binding in use.
- * <p>Type: <code>java.lang.String</code>
- **/
- public static final String ENDPOINT_ADDRESS_PROPERTY =
- "javax.xml.ws.service.endpoint.address";
-
- /**
- * Standard property: This boolean property is used by a service
- * client to indicate whether or not it wants to participate in
- * a session with a service endpoint. If this property is set to
- * <code>true</code>, the service client indicates that it wants the session
- * to be maintained. If set to <code>false</code>, the session is not maintained.
- * The default value for this property is <code>false</code>.
- * <p>Type: <code>java.lang.Boolean</code>
- **/
- public static final String SESSION_MAINTAIN_PROPERTY =
- "javax.xml.ws.session.maintain";
-
- /**
- * Standard property for SOAPAction. This boolean property
- * indicates whether or not the value of the
- * <code>javax.xml.ws.soap.http.soapaction.uri</code> property
- * is used for the value of the SOAPAction. The
- * default value of this property is <code>false</code> indicating
- * that the
- * <code>javax.xml.ws.soap.http.soapaction.uri</code> property
- * is not used for the value of the SOAPAction, however,
- * if WS-Addressing is enabled, the default value is
- * <code>true</code>.
- *
- * <p>Type: <code>java.lang.Boolean</code>
- **/
- public static final String SOAPACTION_USE_PROPERTY =
- "javax.xml.ws.soap.http.soapaction.use";
-
- /**
- * Standard property for SOAPAction. Indicates the SOAPAction
- * URI if the <code>javax.xml.ws.soap.http.soapaction.use</code>
- * property is set to <code>true</code>. If WS-Addressing
- * is enabled, this value will also be used for the value of the
- * WS-Addressing Action header. If this property is not set,
- * the default SOAPAction and WS-Addressing Action will be sent.
- *
- * <p>Type: <code>java.lang.String</code>
- **/
- public static final String SOAPACTION_URI_PROPERTY =
- "javax.xml.ws.soap.http.soapaction.uri";
-
- /**
- * Get the context that is used to initialize the message context
- * for request messages.
- *
- * Modifications to the request context do not affect the message context of
- * either synchronous or asynchronous operations that have already been
- * started.
- *
- * @return The context that is used in processing request messages.
- **/
- Map<String, Object> getRequestContext();
-
- /**
- * Get the context that resulted from processing a response message.
- *
- * The returned context is for the most recently completed synchronous
- * operation. Subsequent synchronous operation invocations overwrite the
- * response context. Asynchronous operations return their response context
- * via the Response interface.
- *
- * @return The context that resulted from processing the latest
- * response messages.
- **/
- Map<String, Object> getResponseContext();
-
- /**
- * Get the Binding for this binding provider.
- *
- * @return The Binding for this binding provider.
- **/
- Binding getBinding();
-
-
-
- /**
- * Returns the <code>EndpointReference</code> associated with
- * this <code>BindingProvider</code> instance.
- * <p>
- * If the Binding for this <code>bindingProvider</code> is
- * either SOAP1.1/HTTP or SOAP1.2/HTTP, then a
- * <code>W3CEndpointReference</code> MUST be returned.
- *
- * @return EndpointReference of the target endpoint associated with this
- * <code>BindingProvider</code> instance.
- *
- * @throws java.lang.UnsupportedOperationException If this
- * <code>BindingProvider</code> uses the XML/HTTP binding.
- *
- * @see W3CEndpointReference
- *
- * @since JAX-WS 2.1
- */
- public EndpointReference getEndpointReference();
-
-
- /**
- * Returns the <code>EndpointReference</code> associated with
- * this <code>BindingProvider</code> instance. The instance
- * returned will be of type <code>clazz</code>.
- *
- * @param clazz Specifies the type of <code>EndpointReference</code>
- * that MUST be returned.
-
- * @return EndpointReference of the target endpoint associated with this
- * <code>BindingProvider</code> instance. MUST be of type
- * <code>clazz</code>.
-
- * @throws WebServiceException If the Class <code>clazz</code>
- * is not supported by this implementation.
- * @throws java.lang.UnsupportedOperationException If this
- * <code>BindingProvider</code> uses the XML/HTTP binding.
- *
- * @since JAX-WS 2.1
- */
- public <T extends EndpointReference> T getEndpointReference(Class<T> clazz);
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/BindingType.java b/src/share/jaxws_classes/javax/xml/ws/BindingType.java
deleted file mode 100644
index 2f95ad30..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/BindingType.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * The <code>BindingType</code> annotation is used to
- * specify the binding to use for a web service
- * endpoint implementation class.
- * <p>
- * This annotation may be overriden programmatically or via
- * deployment descriptors, depending on the platform in use.
- *
- * @since JAX-WS 2.0
- *
- **/
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface BindingType {
- /**
- * A binding identifier (a URI).
- * If not specified, the default is the SOAP 1.1 / HTTP binding.
- * <p>
- * See the <code>SOAPBinding</code> and <code>HTTPBinding</code>
- * for the definition of the standard binding identifiers.
- *
- * @see javax.xml.ws.Binding
- * @see javax.xml.ws.soap.SOAPBinding#SOAP11HTTP_BINDING
- * @see javax.xml.ws.soap.SOAPBinding#SOAP12HTTP_BINDING
- * @see javax.xml.ws.http.HTTPBinding#HTTP_BINDING
- */
- String value() default "" ;
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/Dispatch.java b/src/share/jaxws_classes/javax/xml/ws/Dispatch.java
deleted file mode 100644
index e5b77937..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/Dispatch.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.util.concurrent.Future;
-
-/** The <code>Dispatch</code> interface provides support
- * for the dynamic invocation of a service endpoint operations. The
- * <code>javax.xml.ws.Service</code>
- * class acts as a factory for the creation of <code>Dispatch</code>
- * instances.
- *
- * @since JAX-WS 2.0
-**/
-public interface Dispatch<T> extends BindingProvider {
-
- /** Invoke a service operation synchronously.
- *
- * The client is responsible for ensuring that the <code>msg</code> object
- * when marshalled is formed according to the requirements of the protocol
- * binding in use.
- *
- * @param msg An object that will form the message or payload of
- * the message used to invoke the operation.
- * @return The response message or message payload to the
- * operation invocation.
- * @throws WebServiceException If a fault occurs during communication with
- * the service
- * @throws WebServiceException If there is any error in the configuration of
- * the <code>Dispatch</code> instance
- **/
- public T invoke(T msg);
-
- /** Invoke a service operation asynchronously. The
- * method returns without waiting for the response to the operation
- * invocation, the results of the operation are obtained by polling the
- * returned <code>Response</code>.
- * <p>
- * The client is responsible for ensuring that the <code>msg</code> object
- * when marshalled is formed according to the requirements of the protocol
- * binding in use.
- *
- * @param msg An object that will form the message or payload of
- * the message used to invoke the operation.
- * @return The response message or message payload to the
- * operation invocation.
- * @throws WebServiceException If there is any error in the configuration of
- * the <code>Dispatch</code> instance
- **/
- public Response<T> invokeAsync(T msg);
-
- /** Invoke a service operation asynchronously. The
- * method returns without waiting for the response to the operation
- * invocation, the results of the operation are communicated to the client
- * via the passed in <code>handler</code>.
- * <p>
- * The client is responsible for ensuring that the <code>msg</code> object
- * when marshalled is formed according to the requirements of the protocol
- * binding in use.
- *
- * @param msg An object that will form the message or payload of
- * the message used to invoke the operation.
- * @param handler The handler object that will receive the
- * response to the operation invocation.
- * @return A <code>Future</code> object that may be used to check the status
- * of the operation invocation. This object MUST NOT be used to try to
- * obtain the results of the operation - the object returned from
- * <code>Future&lt;?>.get()</code> is implementation dependent
- * and any use of it will result in non-portable behaviour.
- * @throws WebServiceException If there is any error in the configuration of
- * the <code>Dispatch</code> instance
- **/
- public Future<?> invokeAsync(T msg, AsyncHandler<T> handler);
-
- /** Invokes a service operation using the one-way
- * interaction mode. The operation invocation is logically non-blocking,
- * subject to the capabilities of the underlying protocol, no results
- * are returned. When
- * the protocol in use is SOAP/HTTP, this method MUST block until
- * an HTTP response code has been received or an error occurs.
- * <p>
- * The client is responsible for ensuring that the <code>msg</code> object
- * when marshalled is formed according to the requirements of the protocol
- * binding in use.
- *
- * @param msg An object that will form the message or payload of
- * the message used to invoke the operation.
- * @throws WebServiceException If there is any error in the configuration of
- * the <code>Dispatch</code> instance or if an error occurs during the
- * invocation.
- **/
- public void invokeOneWay(T msg);
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/Endpoint.java b/src/share/jaxws_classes/javax/xml/ws/Endpoint.java
deleted file mode 100644
index 4e8b79e8..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/Endpoint.java
+++ /dev/null
@@ -1,498 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.util.List;
-import java.util.Map;
-import javax.xml.ws.spi.Provider;
-import javax.xml.ws.spi.http.HttpContext;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import org.w3c.dom.Element;
-
-
-/**
- * A Web service endpoint.
- *
- * <p>Endpoints are created using the static methods defined in this
- * class. An endpoint is always tied to one <code>Binding</code>
- * and one implementor, both set at endpoint creation time.
- *
- * <p>An endpoint is either in a published or an unpublished state.
- * The <code>publish</code> methods can be used to start publishing
- * an endpoint, at which point it starts accepting incoming requests.
- * Conversely, the <code>stop</code> method can be used to stop
- * accepting incoming requests and take the endpoint down.
- * Once stopped, an endpoint cannot be published again.
- *
- * <p>An <code>Executor</code> may be set on the endpoint in order
- * to gain better control over the threads used to dispatch incoming
- * requests. For instance, thread pooling with certain parameters
- * can be enabled by creating a <code>ThreadPoolExecutor</code> and
- * registering it with the endpoint.
- *
- * <p>Handler chains can be set using the contained <code>Binding</code>.
- *
- * <p>An endpoint may have a list of metadata documents, such as WSDL
- * and XMLSchema documents, bound to it. At publishing time, the
- * JAX-WS implementation will try to reuse as much of that metadata
- * as possible instead of generating new ones based on the annotations
- * present on the implementor.
- *
- * @since JAX-WS 2.0
- *
- * @see javax.xml.ws.Binding
- * @see javax.xml.ws.BindingType
- * @see javax.xml.ws.soap.SOAPBinding
- * @see java.util.concurrent.Executor
- *
- **/
-public abstract class Endpoint {
-
- /** Standard property: name of WSDL service.
- * <p>Type: javax.xml.namespace.QName
- **/
- public static final String WSDL_SERVICE = "javax.xml.ws.wsdl.service";
-
- /** Standard property: name of WSDL port.
- * <p>Type: javax.xml.namespace.QName
- **/
- public static final String WSDL_PORT = "javax.xml.ws.wsdl.port";
-
-
- /**
- * Creates an endpoint with the specified implementor object. If there is
- * a binding specified via a BindingType annotation then it MUST be used else
- * a default of SOAP 1.1 / HTTP binding MUST be used.
- * <p>
- * The newly created endpoint may be published by calling
- * one of the {@link javax.xml.ws.Endpoint#publish(String)} and
- * {@link javax.xml.ws.Endpoint#publish(Object)} methods.
- *
- *
- * @param implementor The endpoint implementor.
- *
- * @return The newly created endpoint.
- *
- **/
- public static Endpoint create(Object implementor) {
- return create(null, implementor);
- }
-
- /**
- * Creates an endpoint with the specified implementor object and web
- * service features. If there is a binding specified via a BindingType
- * annotation then it MUST be used else a default of SOAP 1.1 / HTTP
- * binding MUST be used.
- * <p>
- * The newly created endpoint may be published by calling
- * one of the {@link javax.xml.ws.Endpoint#publish(String)} and
- * {@link javax.xml.ws.Endpoint#publish(Object)} methods.
- *
- *
- * @param implementor The endpoint implementor.
- * @param features A list of WebServiceFeature to configure on the
- * endpoint. Supported features not in the <code>features
- * </code> parameter will have their default values.
- *
- *
- * @return The newly created endpoint.
- * @since JAX-WS 2.2
- *
- */
- public static Endpoint create(Object implementor, WebServiceFeature ... features) {
- return create(null, implementor, features);
- }
-
- /**
- * Creates an endpoint with the specified binding type and
- * implementor object.
- * <p>
- * The newly created endpoint may be published by calling
- * one of the {@link javax.xml.ws.Endpoint#publish(String)} and
- * {@link javax.xml.ws.Endpoint#publish(Object)} methods.
- *
- * @param bindingId A URI specifying the binding to use. If the bindingID is
- * <code>null</code> and no binding is specified via a BindingType
- * annotation then a default SOAP 1.1 / HTTP binding MUST be used.
- *
- * @param implementor The endpoint implementor.
- *
- * @return The newly created endpoint.
- *
- **/
- public static Endpoint create(String bindingId, Object implementor) {
- return Provider.provider().createEndpoint(bindingId, implementor);
- }
-
- /**
- * Creates an endpoint with the specified binding type,
- * implementor object, and web service features.
- * <p>
- * The newly created endpoint may be published by calling
- * one of the {@link javax.xml.ws.Endpoint#publish(String)} and
- * {@link javax.xml.ws.Endpoint#publish(Object)} methods.
- *
- * @param bindingId A URI specifying the binding to use. If the bindingID is
- * <code>null</code> and no binding is specified via a BindingType
- * annotation then a default SOAP 1.1 / HTTP binding MUST be used.
- *
- * @param implementor The endpoint implementor.
- *
- * @param features A list of WebServiceFeature to configure on the
- * endpoint. Supported features not in the <code>features
- * </code> parameter will have their default values.
- *
- * @return The newly created endpoint.
- * @since JAX-WS 2.2
- */
- public static Endpoint create(String bindingId, Object implementor, WebServiceFeature ... features) {
- return Provider.provider().createEndpoint(bindingId, implementor, features);
- }
-
- /**
- * Returns the binding for this endpoint.
- *
- * @return The binding for this endpoint
- **/
- public abstract Binding getBinding();
-
- /**
- * Returns the implementation object for this endpoint.
- *
- * @return The implementor for this endpoint
- **/
- public abstract Object getImplementor();
-
- /**
- * Publishes this endpoint at the given address.
- * The necessary server infrastructure will be created and
- * configured by the JAX-WS implementation using some default configuration.
- * In order to get more control over the server configuration, please
- * use the {@link javax.xml.ws.Endpoint#publish(Object)} method instead.
- *
- * @param address A URI specifying the address to use. The address
- * MUST be compatible with the binding specified at the
- * time the endpoint was created.
- *
- * @throws java.lang.IllegalArgumentException
- * If the provided address URI is not usable
- * in conjunction with the endpoint's binding.
- *
- * @throws java.lang.IllegalStateException
- * If the endpoint has been published already or it has been stopped.
- *
- * @throws java.lang.SecurityException
- * If a <code>java.lang.SecurityManger</code>
- * is being used and the application doesn't have the
- * <code>WebServicePermission("publishEndpoint")</code> permission.
- **/
- public abstract void publish(String address);
-
- /**
- * Creates and publishes an endpoint for the specified implementor
- * object at the given address.
- * <p>
- * The necessary server infrastructure will be created and
- * configured by the JAX-WS implementation using some default configuration.
- *
- * In order to get more control over the server configuration, please
- * use the {@link javax.xml.ws.Endpoint#create(String,Object)} and
- * {@link javax.xml.ws.Endpoint#publish(Object)} methods instead.
- *
- * @param address A URI specifying the address and transport/protocol
- * to use. A http: URI MUST result in the SOAP 1.1/HTTP
- * binding being used. Implementations may support other
- * URI schemes.
- * @param implementor The endpoint implementor.
- *
- * @return The newly created endpoint.
- *
- * @throws java.lang.SecurityException
- * If a <code>java.lang.SecurityManger</code>
- * is being used and the application doesn't have the
- * <code>WebServicePermission("publishEndpoint")</code> permission.
- *
- **/
- public static Endpoint publish(String address, Object implementor) {
- return Provider.provider().createAndPublishEndpoint(address, implementor);
- }
-
- /**
- * Creates and publishes an endpoint for the specified implementor
- * object at the given address. The created endpoint is configured
- * with the web service features.
- * <p>
- * The necessary server infrastructure will be created and
- * configured by the JAX-WS implementation using some default configuration.
- *
- * In order to get more control over the server configuration, please
- * use the {@link javax.xml.ws.Endpoint#create(String,Object)} and
- * {@link javax.xml.ws.Endpoint#publish(Object)} methods instead.
- *
- * @param address A URI specifying the address and transport/protocol
- * to use. A http: URI MUST result in the SOAP 1.1/HTTP
- * binding being used. Implementations may support other
- * URI schemes.
- * @param implementor The endpoint implementor.
- * @param features A list of WebServiceFeature to configure on the
- * endpoint. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return The newly created endpoint.
- *
- * @throws java.lang.SecurityException
- * If a <code>java.lang.SecurityManger</code>
- * is being used and the application doesn't have the
- * <code>WebServicePermission("publishEndpoint")</code> permission.
- * @since JAX-WS 2.2
- */
- public static Endpoint publish(String address, Object implementor, WebServiceFeature ... features) {
- return Provider.provider().createAndPublishEndpoint(address, implementor, features);
- }
-
-
- /**
- * Publishes this endpoint at the provided server context.
- * A server context encapsulates the server infrastructure
- * and addressing information for a particular transport.
- * For a call to this method to succeed, the server context
- * passed as an argument to it MUST be compatible with the
- * endpoint's binding.
- *
- * @param serverContext An object representing a server
- * context to be used for publishing the endpoint.
- *
- * @throws java.lang.IllegalArgumentException
- * If the provided server context is not
- * supported by the implementation or turns
- * out to be unusable in conjunction with the
- * endpoint's binding.
- *
- * @throws java.lang.IllegalStateException
- * If the endpoint has been published already or it has been stopped.
- *
- * @throws java.lang.SecurityException
- * If a <code>java.lang.SecurityManger</code>
- * is being used and the application doesn't have the
- * <code>WebServicePermission("publishEndpoint")</code> permission.
- **/
- public abstract void publish(Object serverContext);
-
- /**
- * Publishes this endpoint at the provided server context.
- * A server context encapsulates the server infrastructure
- * and addressing information for a particular transport.
- * For a call to this method to succeed, the server context
- * passed as an argument to it MUST be compatible with the
- * endpoint's binding.
- *
- * <p>
- * This is meant for container developers to publish the
- * the endpoints portably and not intended for the end
- * developers.
- *
- *
- * @param serverContext An object representing a server
- * context to be used for publishing the endpoint.
- *
- * @throws java.lang.IllegalArgumentException
- * If the provided server context is not
- * supported by the implementation or turns
- * out to be unusable in conjunction with the
- * endpoint's binding.
- *
- * @throws java.lang.IllegalStateException
- * If the endpoint has been published already or it has been stopped.
- *
- * @throws java.lang.SecurityException
- * If a <code>java.lang.SecurityManger</code>
- * is being used and the application doesn't have the
- * <code>WebServicePermission("publishEndpoint")</code> permission.
- * @since JAX-WS 2.2
- */
- public void publish(HttpContext serverContext) {
- throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
- }
-
- /**
- * Stops publishing this endpoint.
- *
- * If the endpoint is not in a published state, this method
- * has no effect.
- *
- **/
- public abstract void stop();
-
- /**
- * Returns true if the endpoint is in the published state.
- *
- * @return <code>true</code> if the endpoint is in the published state.
- **/
- public abstract boolean isPublished();
-
- /**
- * Returns a list of metadata documents for the service.
- *
- * @return <code>List&lt;javax.xml.transform.Source&gt;</code> A list of metadata documents for the service
- **/
- public abstract List<javax.xml.transform.Source> getMetadata();
-
- /**
- * Sets the metadata for this endpoint.
- *
- * @param metadata A list of XML document sources containing
- * metadata information for the endpoint (e.g.
- * WSDL or XML Schema documents)
- *
- * @throws java.lang.IllegalStateException If the endpoint
- * has already been published.
- **/
- public abstract void setMetadata(List<javax.xml.transform.Source> metadata);
-
- /**
- * Returns the executor for this <code>Endpoint</code>instance.
- *
- * The executor is used to dispatch an incoming request to
- * the implementor object.
- *
- * @return The <code>java.util.concurrent.Executor</code> to be
- * used to dispatch a request.
- *
- * @see java.util.concurrent.Executor
- **/
- public abstract java.util.concurrent.Executor getExecutor();
-
- /**
- * Sets the executor for this <code>Endpoint</code> instance.
- *
- * The executor is used to dispatch an incoming request to
- * the implementor object.
- *
- * If this <code>Endpoint</code> is published using the
- * <code>publish(Object)</code> method and the specified server
- * context defines its own threading behavior, the executor
- * may be ignored.
- *
- * @param executor The <code>java.util.concurrent.Executor</code>
- * to be used to dispatch a request.
- *
- * @throws SecurityException If the instance does not support
- * setting an executor for security reasons (e.g. the
- * necessary permissions are missing).
- *
- * @see java.util.concurrent.Executor
- **/
- public abstract void setExecutor(java.util.concurrent.Executor executor);
-
-
- /**
- * Returns the property bag for this <code>Endpoint</code> instance.
- *
- * @return Map&lt;String,Object&gt; The property bag
- * associated with this instance.
- **/
- public abstract Map<String,Object> getProperties();
-
- /**
- * Sets the property bag for this <code>Endpoint</code> instance.
- *
- * @param properties The property bag associated with
- * this instance.
- **/
- public abstract void setProperties(Map<String,Object> properties);
-
- /**
- * Returns the <code>EndpointReference</code> associated with
- * this <code>Endpoint</code> instance.
- * <p>
- * If the Binding for this <code>bindingProvider</code> is
- * either SOAP1.1/HTTP or SOAP1.2/HTTP, then a
- * <code>W3CEndpointReference</code> MUST be returned.
- *
- * @param referenceParameters Reference parameters to be associated with the
- * returned <code>EndpointReference</code> instance.
- * @return EndpointReference of this <code>Endpoint</code> instance.
- * If the returned <code>EndpointReference</code> is of type
- * <code>W3CEndpointReference</code> then it MUST contain the
- * the specified <code>referenceParameters</code>.
-
- * @throws WebServiceException If any error in the creation of
- * the <code>EndpointReference</code> or if the <code>Endpoint</code> is
- * not in the published state.
- * @throws UnsupportedOperationException If this <code>BindingProvider</code>
- * uses the XML/HTTP binding.
- *
- * @see W3CEndpointReference
- *
- * @since JAX-WS 2.1
- **/
- public abstract EndpointReference getEndpointReference(Element... referenceParameters);
-
-
- /**
- * Returns the <code>EndpointReference</code> associated with
- * this <code>Endpoint</code> instance.
- *
- * @param clazz Specifies the type of EndpointReference that MUST be returned.
- * @param referenceParameters Reference parameters to be associated with the
- * returned <code>EndpointReference</code> instance.
- * @return EndpointReference of type <code>clazz</code> of this
- * <code>Endpoint</code> instance.
- * If the returned <code>EndpointReference</code> is of type
- * <code>W3CEndpointReference</code> then it MUST contain the
- * the specified <code>referenceParameters</code>.
-
- * @throws WebServiceException If any error in the creation of
- * the <code>EndpointReference</code> or if the <code>Endpoint</code> is
- * not in the published state or if the <code>clazz</code> is not a supported
- * <code>EndpointReference</code> type.
- * @throws UnsupportedOperationException If this <code>BindingProvider</code>
- * uses the XML/HTTP binding.
- *
- *
- * @since JAX-WS 2.1
- **/
- public abstract <T extends EndpointReference> T getEndpointReference(Class<T> clazz,
- Element... referenceParameters);
-
- /**
- * By settng a <code>EndpointContext</code>, JAX-WS runtime knows about
- * addresses of other endpoints in an application. If multiple endpoints
- * share different ports of a WSDL, then the multiple port addresses
- * are patched when the WSDL is accessed.
- *
- * <p>
- * This needs to be set before publishing the endpoints.
- *
- * @param ctxt that is shared for multiple endpoints
- * @throws java.lang.IllegalStateException
- * If the endpoint has been published already or it has been stopped.
- *
- * @since JAX-WS 2.2
- */
- public void setEndpointContext(EndpointContext ctxt) {
- throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/EndpointContext.java b/src/share/jaxws_classes/javax/xml/ws/EndpointContext.java
deleted file mode 100644
index dcc50799..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/EndpointContext.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import javax.xml.ws.Endpoint;
-import java.util.Set;
-
-/**
- * <code>EndpointContext</code> allows multiple endpoints in an application
- * to share any information. For example, servlet application's war may
- * contain multiple endpoints and these endpoints can get addresses of each
- * other by sharing this context. If multiple endpoints share different
- * ports of a WSDL, then the multiple port addresses can be patched
- * when the WSDL is accessed. It also allows all endpoints to share any
- * other runtime information.
- *
- * <p>
- * This needs to be set by using {@link Endpoint#setEndpointContext}
- * before {@link Endpoint#publish} methods.
- *
- * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
- */
-public abstract class EndpointContext {
-
- /**
- * This gives list of endpoints in an application. For e.g in
- * servlet container, a war file may contain multiple endpoints.
- * In case of http, these endpoints are hosted on the same http
- * server.
- *
- * @return list of all endpoints in an application
- */
- public abstract Set<Endpoint> getEndpoints();
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/EndpointReference.java b/src/share/jaxws_classes/javax/xml/ws/EndpointReference.java
deleted file mode 100644
index b9605a79..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/EndpointReference.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.ws.spi.Provider;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import java.io.StringWriter;
-
-/**
- * This class represents an WS-Addressing EndpointReference
- * which is a remote reference to a web service endpoint.
- * See <a href="http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/">
- * Web Services Addressing 1.0 - Core</a>
- * for more information on WS-Addressing EndpointReferences.
- * <p>
- * This class is immutable as the typical web service developer
- * need not be concerned with its contents. The web service
- * developer should use this class strictly as a mechanism to
- * reference a remote web service endpoint. See the {@link Service} APIs
- * that clients can use to that utilize an <code>EndpointReference</code>.
- * See the {@link javax.xml.ws.Endpoint}, and
- * {@link javax.xml.ws.BindingProvider} APIs on how
- * <code>EndpointReferences</code> can be created for published
- * endpoints.
- * <p>
- * Concrete implementations of this class will represent
- * an <code>EndpointReference</code> for a particular version of Addressing.
- * For example the {@link W3CEndpointReference} is for use
- * with W3C Web Services Addressing 1.0 - Core Recommendation.
- * If JAX-WS implementors need to support different versions
- * of addressing, they should write their own
- * <code>EndpointReference</code> subclass for that version.
- * This will allow a JAX-WS implementation to create
- * a vendor specific <code>EndpointReferences</code> that the
- * vendor can use to flag a different version of
- * addressing.
- * <p>
- * Web service developers that wish to pass or return
- * <code>EndpointReference</code> in Java methods in an
- * SEI should use
- * concrete instances of an <code>EndpointReference</code> such
- * as the <code>W3CEndpointReference</code>. This way the
- * schema mapped from the SEI will be more descriptive of the
- * type of endpoint reference being passed.
- * <p>
- * JAX-WS implementors are expected to extract the XML infoset
- * from an <CODE>EndpointReferece</CODE> using the
- * <code>{@link EndpointReference#writeTo}</code>
- * method.
- * <p>
- * JAXB will bind this class to xs:anyType. If a better binding
- * is desired, web services developers should use a concrete
- * subclass such as {@link W3CEndpointReference}.
- *
- * @see W3CEndpointReference
- * @see Service
- * @since JAX-WS 2.1
- */
-@XmlTransient // to treat this class like Object as far as databinding is concerned (proposed JAXB 2.1 feature)
-public abstract class EndpointReference {
- //
- //Default constructor to be only called by derived types.
- //
- protected EndpointReference(){}
-
- /**
- * Factory method to read an EndpointReference from the infoset contained in
- * <code>eprInfoset</code>. This method delegates to the vendor specific
- * implementation of the {@link javax.xml.ws.spi.Provider#readEndpointReference} method.
- *
- * @param eprInfoset The <code>EndpointReference</code> infoset to be unmarshalled
- *
- * @return the EndpointReference unmarshalled from <code>eprInfoset</code>
- * never <code>null</code>
- * @throws WebServiceException
- * if an error occurs while creating the
- * <code>EndpointReference</code> from the <CODE>eprInfoset</CODE>
- * @throws java.lang.IllegalArgumentException
- * if the <code>null</code> <code>eprInfoset</code> value is given.
- */
- public static EndpointReference readFrom(Source eprInfoset) {
- return Provider.provider().readEndpointReference(eprInfoset);
- }
-
- /**
- * write this <code>EndpointReference</code> to the specified infoset format
- *
- * @param result for writing infoset
- * @throws WebServiceException
- * if there is an error writing the
- * <code>EndpointReference</code> to the specified <code>result</code>.
- *
- * @throws java.lang.IllegalArgumentException
- * If the <code>null</code> <code>result</code> value is given.
- */
- public abstract void writeTo(Result result);
-
-
- /**
- * The <code>getPort</code> method returns a proxy. If there
- * are any reference parameters in the
- * <code>EndpointReference</code> instance, then those reference
- * parameters MUST appear as SOAP headers, indicating them to be
- * reference parameters, on all messages sent to the endpoint.
- * The parameter <code>serviceEndpointInterface</code> specifies
- * the service endpoint interface that is supported by the
- * returned proxy.
- * The <code>EndpointReference</code> instance specifies the
- * endpoint that will be invoked by the returned proxy.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the proxy accordingly from
- * the WSDL Metadata from this <code>EndpointReference</code> or from
- * annotations on the <code>serviceEndpointInterface</code>. For this method
- * to successfully return a proxy, WSDL metadata MUST be available and the
- * <code>EndpointReference</code> instance MUST contain an implementation understood
- * <code>serviceName</code> metadata.
- * <p>
- * Because this port is not created from a <code>Service</code> object, handlers
- * will not automatically be configured, and the <code>HandlerResolver</code>
- * and <code>Executor</code> cannot be get or set for this port. The
- * <code>BindingProvider().getBinding().setHandlerChain()</code>
- * method can be used to manually configure handlers for this port.
- *
- *
- * @param serviceEndpointInterface Service endpoint interface
- * @param features An array of <code>WebServiceFeatures</code> to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return Object Proxy instance that supports the
- * specified service endpoint interface
- * @throws WebServiceException
- * <UL>
- * <LI>If there is an error during creation
- * of the proxy
- * <LI>If there is any missing WSDL metadata
- * as required by this method
- * <LI>If this
- * <code>endpointReference</code>
- * is invalid
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * is specified
- * <LI>If a feature is enabled that is not compatible with
- * this port or is unsupported.
- * </UL>
- *
- * @see java.lang.reflect.Proxy
- * @see WebServiceFeature
- **/
- public <T> T getPort(Class<T> serviceEndpointInterface,
- WebServiceFeature... features) {
- return Provider.provider().getPort(this, serviceEndpointInterface,
- features);
- }
-
- /**
- * Displays EPR infoset for debugging convenience.
- */
- public String toString() {
- StringWriter w = new StringWriter();
- writeTo(new StreamResult(w));
- return w.toString();
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/FaultAction.java b/src/share/jaxws_classes/javax/xml/ws/FaultAction.java
deleted file mode 100644
index 242cef3a..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/FaultAction.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * The <code>FaultAction</code> annotation is used inside an {@link Action}
- * annotation to allow an explicit association of a WS-Addressing
- * <code>Action</code> message addressing property with the <code>fault</code>
- * messages of the WSDL operation mapped from the exception class.
- * <p>
- * The <code>wsam:Action</code> attribute value in the <code>fault</code>
- * message in the generated WSDL operation mapped for <code>className</code>
- * class is equal to the corresponding value in the <code>FaultAction</code>.
- * For the exact computation of <code>wsam:Action</code> values for the
- * fault messages, refer to the algorithm in the JAX-WS specification.
- *
- * <p>
- * <b>Example 1</b>: Specify explicit values for <code>Action</code> message addressing
- * property for the <code>input</code>, <code>output</code> and <code>fault</code> message
- * if the Java method throws only one service specific exception.
- *
- * <pre>
- * &#64;WebService(targetNamespace="http://example.com/numbers")
- * public class AddNumbersImpl {
- * &#64;Action(
- * fault = {
- * <b>&#64;FaultAction(className=AddNumbersException.class, value="http://example.com/faultAction")</b>
- * })
- * public int addNumbers(int number1, int number2)
- * throws AddNumbersException {
- * return number1 + number2;
- * }
- * }
- * </pre>
- *
- * The generated WSDL looks like:
- *
- * <pre>
- * &lt;definitions targetNamespace="http://example.com/numbers" ...>
- * ...
- * &lt;portType name="AddNumbersPortType">
- * &lt;operation name="AddNumbers">
- * ...
- * &lt;fault message="tns:AddNumbersException" name="AddNumbersException"
- * <b>wsam:Action="http://example.com/faultAction"</b>/>
- * &lt;/operation>
- * &lt;/portType>
- * ...
- * &lt;/definitions>
- * </pre>
- *
- * <p>
- * Example 2: Here is an example that shows if the explicit value for <code>Action</code>
- * message addressing property for the service specific exception is not present.
- *
- * <pre>
- * &#64;WebService(targetNamespace="http://example.com/numbers")
- * public class AddNumbersImpl {
- * public int addNumbers(int number1, int number2)
- * throws AddNumbersException {
- * return number1 + number2;
- * }
- * }
- * </pre>
- *
- * The generated WSDL looks like:
- *
- * <pre>
- * &lt;definitions targetNamespace="http://example.com/numbers" ...>
- * ...
- * &lt;portType name="AddNumbersPortType">
- * &lt;operation name="AddNumbers">
- * ...
- * &lt;fault message="tns:addNumbersFault" name="InvalidNumbers"
- * <b>wsam:Action="http://example.com/numbers/AddNumbersPortType/AddNumbers/Fault/AddNumbersException"</b>/>
- * &lt;/operation>
- * &lt;/portType>
- * ...
- * &lt;/definitions>
- * </pre>
- *
- * <p>
- * Example 3: Here is an example that shows how to specify explicit values for <code>Action</code>
- * message addressing property if the Java method throws more than one service specific exception.
- *
- * <pre>
- * &#64;WebService(targetNamespace="http://example.com/numbers")
- * public class AddNumbersImpl {
- * &#64;Action(
- * fault = {
- * <b>&#64;FaultAction(className=AddNumbersException.class, value="http://example.com/addFaultAction"),
- * &#64;FaultAction(className=TooBigNumbersException.class, value="http://example.com/toobigFaultAction")</b>
- * })
- * public int addNumbers(int number1, int number2)
- * throws AddNumbersException, TooBigNumbersException {
- * return number1 + number2;
- * }
- * }
- * </pre>
- *
- * The generated WSDL looks like:
- *
- * <pre>
- * &lt;definitions targetNamespace="http://example.com/numbers" ...>
- * ...
- * &lt;portType name="AddNumbersPortType">
- * &lt;operation name="AddNumbers">
- * ...
- * &lt;fault message="tns:addNumbersFault" name="AddNumbersException"
- * <b>wsam:Action="http://example.com/addFaultAction"</b>/>
- * &lt;fault message="tns:tooBigNumbersFault" name="TooBigNumbersException"
- * <b>wsam:Action="http://example.com/toobigFaultAction"</b>/>
- * &lt;/operation>
- * &lt;/portType>
- * ...
- * &lt;/definitions>
- * </pre>
- *
- * @since JAX-WS 2.1
- */
-
-@Documented
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.METHOD)
-public @interface FaultAction {
- /**
- * Name of the exception class
- */
- Class<? extends Exception> className();
-
- /**
- * Value of WS-Addressing <code>Action</code> message addressing property for the exception
- */
- String value() default "";
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/Holder.java b/src/share/jaxws_classes/javax/xml/ws/Holder.java
deleted file mode 100644
index 44344d83..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/Holder.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.io.Serializable;
-
-/**
- * Holds a value of type <code>T</code>.
- *
- * @since JAX-WS 2.0
- */
-public final class Holder<T> implements Serializable {
-
- private static final long serialVersionUID = 2623699057546497185L;
-
- /**
- * The value contained in the holder.
- */
- public T value;
-
- /**
- * Creates a new holder with a <code>null</code> value.
- */
- public Holder() {
- }
-
- /**
- * Create a new holder with the specified value.
- *
- * @param value The value to be stored in the holder.
- */
- public Holder(T value) {
- this.value = value;
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/LogicalMessage.java b/src/share/jaxws_classes/javax/xml/ws/LogicalMessage.java
deleted file mode 100644
index fc2ef767..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/LogicalMessage.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import javax.xml.transform.Source;
-import javax.xml.bind.JAXBContext;
-
-/** The <code>LogicalMessage</code> interface represents a
- * protocol agnostic XML message and contains methods that
- * provide access to the payload of the message.
- *
- * @since JAX-WS 2.0
-**/
-public interface LogicalMessage {
-
- /** Gets the message payload as an XML source, may be called
- * multiple times on the same LogicalMessage instance, always
- * returns a new <code>Source</code> that may be used to retrieve the entire
- * message payload.
- *
- * <p>If the returned <code>Source</code> is an instance of
- * <code>DOMSource</code>, then
- * modifications to the encapsulated DOM tree change the message
- * payload in-place, there is no need to susequently call
- * <code>setPayload</code>. Other types of <code>Source</code> provide only
- * read access to the message payload.
- *
- * @return The contained message payload; returns <code>null</code> if no
- * payload is present in this message.
- **/
- public Source getPayload();
-
- /** Sets the message payload
- *
- * @param payload message payload
- * @throws WebServiceException If any error during the setting
- * of the payload in this message
- * @throws java.lang.UnsupportedOperationException If this
- * operation is not supported
- **/
- public void setPayload(Source payload);
-
- /** Gets the message payload as a JAXB object. Note that there is no
- * connection between the returned object and the message payload,
- * changes to the payload require calling <code>setPayload</code>.
- *
- * @param context The JAXBContext that should be used to unmarshall
- * the message payload
- * @return The contained message payload; returns <code>null</code> if no
- * payload is present in this message
- * @throws WebServiceException If an error occurs when using a supplied
- * JAXBContext to unmarshall the payload. The cause of
- * the WebServiceException is the original JAXBException.
- **/
- public Object getPayload(JAXBContext context);
-
- /** Sets the message payload
- *
- * @param payload message payload
- * @param context The JAXBContext that should be used to marshall
- * the payload
- * @throws java.lang.UnsupportedOperationException If this
- * operation is not supported
- * @throws WebServiceException If an error occurs when using the supplied
- * JAXBContext to marshall the payload. The cause of
- * the WebServiceException is the original JAXBException.
- **/
- public void setPayload(Object payload, JAXBContext context);
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/ProtocolException.java b/src/share/jaxws_classes/javax/xml/ws/ProtocolException.java
deleted file mode 100644
index a8180616..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/ProtocolException.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-/** The <code>ProtocolException</code> class is a
- * base class for exceptions related to a specific protocol binding. Subclasses
- * are used to communicate protocol level fault information to clients and may
- * be used on the server to control the protocol specific fault representation.
- *
- * @since JAX-WS 2.0
-**/
-public class ProtocolException extends WebServiceException {
- /**
- * Constructs a new protocol exception with <code>null</code> as its detail message. The
- * cause is not initialized, and may subsequently be initialized by a call
- * to <code>Throwable.initCause(java.lang.Throwable)</code>.
- */
- public ProtocolException() {
- super();
- }
-
- /**
- * Constructs a new protocol exception with the specified detail message.
- * The cause is not initialized, and may subsequently be initialized by a
- * call to <code>Throwable.initCause(java.lang.Throwable)</code>.
- *
- * @param message the detail message. The detail message is saved for later
- * retrieval by the Throwable.getMessage() method.
- */
- public ProtocolException(String message) {
- super(message);
- }
-
- /**
- * Constructs a new runtime exception with the specified detail message and
- * cause.
- *
- * Note that the detail message associated with cause is not automatically
- * incorporated in this runtime exception's detail message.
- *
- * @param message the detail message (which is saved for later retrieval by
- * the Throwable.getMessage() method).
- * @param cause the cause (which is saved for later retrieval by the
- * <code>Throwable.getCause()</code> method). (A <code>null</code> value is permitted, and indicates
- * that the cause is nonexistent or unknown.)
- */
- public ProtocolException(String message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * Constructs a new runtime exception with the specified cause and a detail
- * message of <code>(cause==null ? null : cause.toString())</code> (which typically
- * contains the class and detail message of cause). This constructor is
- * useful for runtime exceptions that are little more than wrappers for
- * other throwables.
- *
- * @param cause the cause (which is saved for later retrieval by the
- * <code>Throwable.getCause()</code> method). (A <code>null</code> value is permitted, and indicates
- * that the cause is nonexistent or unknown.)
- */
- public ProtocolException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/Provider.java b/src/share/jaxws_classes/javax/xml/ws/Provider.java
deleted file mode 100644
index 1929eeb1..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/Provider.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-/**
- * <p>Service endpoints may implement the <code>Provider</code>
- * interface as a dynamic alternative to an SEI.
- *
- * <p>Implementations are required to support <code>Provider&lt;Source&gt;</code>,
- * <code>Provider&lt;SOAPMessage&gt;</code> and
- * <code>Provider&lt;DataSource&gt;</code>, depending on the binding
- * in use and the service mode.
- *
- * <p>The <code>ServiceMode</code> annotation can be used to control whether
- * the <code>Provider</code> instance will receive entire protocol messages
- * or just message payloads.
- *
- * @since JAX-WS 2.0
- *
- * @see javax.xml.transform.Source
- * @see javax.xml.soap.SOAPMessage
- * @see javax.xml.ws.ServiceMode
-**/
-public interface Provider<T> {
-
- /** Invokes an operation occording to the contents of the request
- * message.
- *
- * @param request The request message or message payload.
- * @return The response message or message payload. May be <code>null</code> if
- there is no response.
- * @throws WebServiceException If there is an error processing request.
- * The cause of the <code>WebServiceException</code> may be set to a subclass
- * of <code>ProtocolException</code> to control the protocol level
- * representation of the exception.
- * @see javax.xml.ws.handler.MessageContext
- * @see javax.xml.ws.ProtocolException
- **/
- public T invoke(T request);
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/RequestWrapper.java b/src/share/jaxws_classes/javax/xml/ws/RequestWrapper.java
deleted file mode 100644
index b83a33dd..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/RequestWrapper.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Used to annotate methods in the Service Endpoint Interface with the request
- * wrapper bean to be used at runtime. The default value of the <code>localName</code> is
- * the <code>operationName</code>, as defined in <code>WebMethod</code> annotation and the
- * <code>targetNamespace</code> is the target namespace of the SEI.
- * <p> When starting from Java this annotation is used resolve
- * overloading conflicts in document literal mode. Only the <code>className</code>
- * is required in this case.
- *
- * @since JAX-WS 2.0
- **/
-
-@Target(ElementType.METHOD)
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface RequestWrapper {
- /**
- * Element's local name.
- */
- public String localName() default "";
-
- /**
- * Element's namespace name.
- */
- public String targetNamespace() default "";
-
- /**
- * Request wrapper bean name.
- */
- public String className() default "";
-
- /**
- * wsdl:part name for the wrapper part
- *
- * @since JAX-WS 2.2
- */
- public String partName() default "";
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/RespectBinding.java b/src/share/jaxws_classes/javax/xml/ws/RespectBinding.java
deleted file mode 100644
index deacebd2..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/RespectBinding.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import javax.xml.ws.spi.WebServiceFeatureAnnotation;
-
-
-/**
- * This feature clarifies the use of the <code>wsdl:binding</code>
- * in a JAX-WS runtime.
- * <p>
- * This annotation MUST only be used in conjunction the
- * <code>javax.jws.WebService</code>, {@link WebServiceProvider},
- * {@link WebServiceRef} annotations.
- * When used with the <code>javax.jws.WebService</code> annotation this
- * annotation MUST only be used on the service endpoint implementation
- * class.
- * When used with a <code>WebServiceRef</code> annotation, this annotation
- * MUST only be used when a proxy instance is created. The injected SEI
- * proxy, and endpoint MUST honor the values of the <code>RespectBinding</code>
- * annotation.
- * <p>
- *
- * This annotation's behaviour is defined by the corresponding feature
- * {@link RespectBindingFeature}.
- *
- * @see RespectBindingFeature
- *
- * @since JAX-WS 2.1
- */
-@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-@WebServiceFeatureAnnotation(id=RespectBindingFeature.ID,bean=RespectBindingFeature.class)
-public @interface RespectBinding {
- /**
- * Specifies if this feature is enabled or disabled.
- */
- boolean enabled() default true;
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/RespectBindingFeature.java b/src/share/jaxws_classes/javax/xml/ws/RespectBindingFeature.java
deleted file mode 100644
index 2dc03760..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/RespectBindingFeature.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import javax.xml.ws.soap.AddressingFeature;
-
-/**
- * This feature clarifies the use of the <code>wsdl:binding</code>
- * in a JAX-WS runtime.
- *
- * This feature can be used during the creation of SEI proxy, and
- * {@link Dispatch} instances on the client side and {@link Endpoint}
- * instances on the server side. This feature cannot be used for {@link Service}
- * instance creation on the client side.
- * <p>
- * This feature is only useful with web services that have an
- * associated WSDL. Enabling this feature requires that a JAX-WS
- * implementation inspect the <code>wsdl:binding</code> for an
- * endpoint at runtime to make sure that all <code>wsdl:extensions</code>
- * that have the <code>required</code> attribute set to <code>true</code>
- * are understood and are being used.
- * <p>
- * The following describes the affects of this feature with respect
- * to be enabled or disabled:
- * <ul>
- * <li> ENABLED: In this Mode, a JAX-WS runtime MUST assure that all
- * required <code>wsdl:binding</code> extensions(including policies) are
- * either understood and used by the runtime, or explicitly disabled by the
- * web service application. A web service can disable a particular
- * extension if there is a corresponding {@link WebServiceFeature} or annotation.
- * Similarly, a web service client can disable
- * particular extension using the corresponding <code>WebServiceFeature</code> while
- * creating a proxy or Dispatch instance.
- * The runtime MUST also make sure that binding of
- * SEI parameters/return values respect the <code>wsdl:binding</code>.
- * With this feature enabled, if a required (<code>wsdl:required="true"</code>)
- * <code>wsdl:binding</code> extension is in the WSDL and it is not
- * supported by a JAX-WS runtime and it has not
- * been explicitly turned off by the web service developer, then
- * that JAX-WS runtime MUST behave appropriately based on whether it is
- * on the client or server:
- * <UL>
- * <li>Client: runtime MUST throw a
- * {@link WebServiceException} no sooner than when one of the methods
- * above is invoked but no later than the first invocation of an endpoint
- * operation.
- * <li>Server: throw a {@link WebServiceException} and the endpoint MUST fail to deploy
- * </ul>
- *
- * <li> DISABLED: In this Mode, an implementation may choose whether
- * to inspect the <code>wsdl:binding</code> or not and to what degree
- * the <code>wsdl:binding</code> will be inspected. For example,
- * one implementation may choose to behave as if this feature is enabled,
- * another implementation may only choose to verify the SEI's
- * parameter/return type bindings.
- * </ul>
- *
- * @see AddressingFeature
- *
- * @since JAX-WS 2.1
- */
-public final class RespectBindingFeature extends WebServiceFeature {
- /**
- *
- * Constant value identifying the RespectBindingFeature
- */
- public static final String ID = "javax.xml.ws.RespectBindingFeature";
-
-
- /**
- * Creates an <code>RespectBindingFeature</code>.
- * The instance created will be enabled.
- */
- public RespectBindingFeature() {
- this.enabled = true;
- }
-
- /**
- * Creates an RespectBindingFeature
- *
- * @param enabled specifies whether this feature should
- * be enabled or not.
- */
- public RespectBindingFeature(boolean enabled) {
- this.enabled = enabled;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getID() {
- return ID;
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/Response.java b/src/share/jaxws_classes/javax/xml/ws/Response.java
deleted file mode 100644
index 5a06f469..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/Response.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.util.Map;
-import java.util.concurrent.Future;
-
-/** The <code>Response</code> interface provides methods used to obtain the
- * payload and context of a message sent in response to an operation
- * invocation.
- *
- * <p>For asynchronous operation invocations it provides additional methods
- * to check the status of the request. The <code>get(...)</code> methods may
- * throw the standard
- * set of exceptions and their cause may be a <code>RemoteException</code> or a
- * {@link WebServiceException} that represents the error that occured during the
- * asynchronous method invocation.</p>
- *
- * @since JAX-WS 2.0
-**/
-public interface Response<T> extends Future<T> {
- /** Gets the contained response context.
- *
- * @return The contained response context. May be <code>null</code> if a
- * response is not yet available.
- *
- **/
- Map<String,Object> getContext();
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/ResponseWrapper.java b/src/share/jaxws_classes/javax/xml/ws/ResponseWrapper.java
deleted file mode 100644
index 394f0fa0..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/ResponseWrapper.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.RetentionPolicy;
-/**
- * Used to annotate methods in the Service Endpoint Interface with the response
- * wrapper bean to be used at runtime. The default value of the <code>localName</code> is
- * the <code>operationName</code> as defined in <code>WebMethod</code> annotation appended with
- * <code>Response</code> and the <code>targetNamespace</code> is the target namespace of the SEI.
- * <p> When starting from Java this annotation is used resolve
- * overloading conflicts in document literal mode. Only the <code>className</code>
- * is required in this case.
- *
- * @since JAX-WS 2.0
-**/
-
-@Target(ElementType.METHOD)
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface ResponseWrapper {
-
- /**
- * Element's local name.
- */
- public String localName() default "";
-
- /**
- * Element's namespace name.
- */
- public String targetNamespace() default "";
-
- /**
- * Response wrapper bean name.
- */
- public String className() default "";
-
- /**
- * wsdl:part name for the wrapper part
- *
- * @since JAX-WS 2.2
- */
- public String partName() default "";
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/Service.java b/src/share/jaxws_classes/javax/xml/ws/Service.java
deleted file mode 100644
index 8182e776..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/Service.java
+++ /dev/null
@@ -1,760 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import javax.xml.namespace.QName;
-import java.util.Iterator;
-import javax.xml.ws.handler.HandlerResolver;
-import javax.xml.bind.JAXBContext;
-import javax.xml.ws.spi.ServiceDelegate;
-import javax.xml.ws.spi.Provider;
-
-/**
- * <code>Service</code> objects provide the client view of a Web service.
- * <p><code>Service</code> acts as a factory of the following:
- * <ul>
- * <li>Proxies for a target service endpoint.</li>
- * <li>Instances of {@link javax.xml.ws.Dispatch} for
- * dynamic message-oriented invocation of a remote
- * operation.
- * </li>
- * </ul>
- *
- * <p>The ports available on a service can be enumerated using the
- * <code>getPorts</code> method. Alternatively, you can pass a
- * service endpoint interface to the unary <code>getPort</code> method
- * and let the runtime select a compatible port.
- *
- * <p>Handler chains for all the objects created by a <code>Service</code>
- * can be set by means of a <code>HandlerResolver</code>.
- *
- * <p>An <code>Executor</code> may be set on the service in order
- * to gain better control over the threads used to dispatch asynchronous
- * callbacks. For instance, thread pooling with certain parameters
- * can be enabled by creating a <code>ThreadPoolExecutor</code> and
- * registering it with the service.
- *
- * @since JAX-WS 2.0
- *
- * @see javax.xml.ws.spi.Provider
- * @see javax.xml.ws.handler.HandlerResolver
- * @see java.util.concurrent.Executor
- **/
-public class Service {
-
- private ServiceDelegate delegate;
- /**
- * The orientation of a dynamic client or service. <code>MESSAGE</code> provides
- * access to entire protocol message, <code>PAYLOAD</code> to protocol message
- * payload only.
- **/
- public enum Mode { MESSAGE, PAYLOAD }
-
- protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) {
- delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,
- serviceName,
- this.getClass());
- }
-
- protected Service(java.net.URL wsdlDocumentLocation, QName serviceName, WebServiceFeature ... features) {
- delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,
- serviceName,
- this.getClass(), features);
- }
-
-
- /**
- * The <code>getPort</code> method returns a proxy. A service client
- * uses this proxy to invoke operations on the target
- * service endpoint. The <code>serviceEndpointInterface</code>
- * specifies the service endpoint interface that is supported by
- * the created dynamic proxy instance.
- *
- * @param portName Qualified name of the service endpoint in
- * the WSDL service description.
- * @param serviceEndpointInterface Service endpoint interface
- * supported by the dynamic proxy instance.
- * @return Object Proxy instance that
- * supports the specified service endpoint
- * interface.
- * @throws WebServiceException This exception is thrown in the
- * following cases:
- * <UL>
- * <LI>If there is an error in creation of
- * the proxy.
- * <LI>If there is any missing WSDL metadata
- * as required by this method.
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * or <code>portName</code> is specified.
- * </UL>
- * @see java.lang.reflect.Proxy
- * @see java.lang.reflect.InvocationHandler
- **/
- public <T> T getPort(QName portName,
- Class<T> serviceEndpointInterface) {
- return delegate.getPort(portName, serviceEndpointInterface);
- }
-
- /**
- * The <code>getPort</code> method returns a proxy. A service client
- * uses this proxy to invoke operations on the target
- * service endpoint. The <code>serviceEndpointInterface</code>
- * specifies the service endpoint interface that is supported by
- * the created dynamic proxy instance.
- *
- * @param portName Qualified name of the service endpoint in
- * the WSDL service description.
- * @param serviceEndpointInterface Service endpoint interface
- * supported by the dynamic proxy instance.
- * @param features A list of WebServiceFeatures to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return Object Proxy instance that
- * supports the specified service endpoint
- * interface.
- * @throws WebServiceException This exception is thrown in the
- * following cases:
- * <UL>
- * <LI>If there is an error in creation of
- * the proxy.
- * <LI>If there is any missing WSDL metadata
- * as required by this method.
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * or <code>portName</code> is specified.
- * <LI>If a feature is enabled that is not compatible
- * with this port or is unsupported.
- * </UL>
- * @see java.lang.reflect.Proxy
- * @see java.lang.reflect.InvocationHandler
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public <T> T getPort(QName portName,
- Class<T> serviceEndpointInterface, WebServiceFeature... features) {
- return delegate.getPort(portName, serviceEndpointInterface, features);
- }
-
-
- /**
- * The <code>getPort</code> method returns a proxy. The parameter
- * <code>serviceEndpointInterface</code> specifies the service
- * endpoint interface that is supported by the returned proxy.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the proxy accordingly.
- * The returned proxy should not be reconfigured by the client.
- *
- * @param serviceEndpointInterface Service endpoint interface.
- * @return Object instance that supports the
- * specified service endpoint interface.
- * @throws WebServiceException
- * <UL>
- * <LI>If there is an error during creation
- * of the proxy.
- * <LI>If there is any missing WSDL metadata
- * as required by this method.
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * is specified.
- * </UL>
- **/
- public <T> T getPort(Class<T> serviceEndpointInterface) {
- return delegate.getPort(serviceEndpointInterface);
- }
-
-
- /**
- * The <code>getPort</code> method returns a proxy. The parameter
- * <code>serviceEndpointInterface</code> specifies the service
- * endpoint interface that is supported by the returned proxy.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the proxy accordingly.
- * The returned proxy should not be reconfigured by the client.
- *
- * @param serviceEndpointInterface Service endpoint interface.
- * @param features A list of WebServiceFeatures to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return Object instance that supports the
- * specified service endpoint interface.
- * @throws WebServiceException
- * <UL>
- * <LI>If there is an error during creation
- * of the proxy.
- * <LI>If there is any missing WSDL metadata
- * as required by this method.
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * is specified.
- * <LI>If a feature is enabled that is not compatible
- * with this port or is unsupported.
- * </UL>
- *
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public <T> T getPort(Class<T> serviceEndpointInterface,
- WebServiceFeature... features) {
- return delegate.getPort(serviceEndpointInterface, features);
- }
-
-
- /**
- * The <code>getPort</code> method returns a proxy.
- * The parameter <code>endpointReference</code> specifies the
- * endpoint that will be invoked by the returned proxy. If there
- * are any reference parameters in the
- * <code>endpointReference</code>, then those reference
- * parameters MUST appear as SOAP headers, indicating them to be
- * reference parameters, on all messages sent to the endpoint.
- * The <code>endpointReference's</code> address MUST be used
- * for invocations on the endpoint.
- * The parameter <code>serviceEndpointInterface</code> specifies
- * the service endpoint interface that is supported by the
- * returned proxy.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the proxy accordingly from
- * the WSDL associated with this <code>Service</code> instance or
- * from the metadata from the <code>endpointReference</code>.
- * If this <code>Service</code> instance has a WSDL and
- * the <code>endpointReference</code> metadata
- * also has a WSDL, then the WSDL from this instance MUST be used.
- * If this <code>Service</code> instance does not have a WSDL and
- * the <code>endpointReference</code> does have a WSDL, then the
- * WSDL from the <code>endpointReference</code> MAY be used.
- * The returned proxy should not be reconfigured by the client.
- * If this <code>Service</code> instance has a known proxy
- * port that matches the information contained in
- * the WSDL,
- * then that proxy is returned, otherwise a WebServiceException
- * is thrown.
- * <p>
- * Calling this method has the same behavior as the following
- * <pre>
- * <code>port = service.getPort(portName, serviceEndpointInterface);</code>
- * </pre>
- * where the <code>portName</code> is retrieved from the
- * metadata of the <code>endpointReference</code> or from the
- * <code>serviceEndpointInterface</code> and the WSDL
- * associated with this <code>Service</code> instance.
- *
- * @param endpointReference The <code>EndpointReference</code>
- * for the target service endpoint that will be invoked by the
- * returned proxy.
- * @param serviceEndpointInterface Service endpoint interface.
- * @param features A list of <code>WebServiceFeatures</code> to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return Object Proxy instance that supports the
- * specified service endpoint interface.
- * @throws WebServiceException
- * <UL>
- * <LI>If there is an error during creation
- * of the proxy.
- * <LI>If there is any missing WSDL metadata
- * as required by this method.
- * <LI>If the <code>endpointReference</code> metadata does
- * not match the <code>serviceName</code> of this
- * <code>Service</code> instance.
- * <LI>If a <code>portName</code> cannot be extracted
- * from the WSDL or <code>endpointReference</code> metadata.
- * <LI>If an invalid
- * <code>endpointReference</code>
- * is specified.
- * <LI>If an invalid
- * <code>serviceEndpointInterface</code>
- * is specified.
- * <LI>If a feature is enabled that is not compatible
- * with this port or is unsupported.
- * </UL>
- *
- * @since JAX-WS 2.1
- **/
- public <T> T getPort(EndpointReference endpointReference,
- Class<T> serviceEndpointInterface, WebServiceFeature... features) {
- return delegate.getPort(endpointReference, serviceEndpointInterface, features);
- }
-
- /**
- * Creates a new port for the service. Ports created in this way contain
- * no WSDL port type information and can only be used for creating
- * <code>Dispatch</code>instances.
- *
- * @param portName Qualified name for the target service endpoint.
- * @param bindingId A String identifier of a binding.
- * @param endpointAddress Address of the target service endpoint as a URI.
- * @throws WebServiceException If any error in the creation of
- * the port.
- *
- * @see javax.xml.ws.soap.SOAPBinding#SOAP11HTTP_BINDING
- * @see javax.xml.ws.soap.SOAPBinding#SOAP12HTTP_BINDING
- * @see javax.xml.ws.http.HTTPBinding#HTTP_BINDING
- **/
- public void addPort(QName portName, String bindingId, String endpointAddress) {
- delegate.addPort(portName, bindingId, endpointAddress);
- }
-
-
- /**
- * Creates a <code>Dispatch</code> instance for use with objects of
- * the client's choosing.
- *
- * @param portName Qualified name for the target service endpoint
- * @param type The class of object used for messages or message
- * payloads. Implementations are required to support
- * <code>javax.xml.transform.Source</code>, <code>javax.xml.soap.SOAPMessage</code>
- * and <code>javax.activation.DataSource</code>, depending on
- * the binding in use.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the client will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the client will work with
- * SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE
- * when type is SOAPMessage.
- *
- * @return Dispatch instance.
- * @throws WebServiceException If any error in the creation of
- * the <code>Dispatch</code> object.
- *
- * @see javax.xml.transform.Source
- * @see javax.xml.soap.SOAPMessage
- **/
- public <T> Dispatch<T> createDispatch(QName portName, Class<T> type, Mode mode) {
- return delegate.createDispatch(portName, type, mode);
- }
-
-
- /**
- * Creates a <code>Dispatch</code> instance for use with objects of
- * the client's choosing.
- *
- * @param portName Qualified name for the target service endpoint
- * @param type The class of object used for messages or message
- * payloads. Implementations are required to support
- * <code>javax.xml.transform.Source</code> and <code>javax.xml.soap.SOAPMessage</code>.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the client will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the client will work with
- * SOAP messages or the contents of a SOAP body. Mode MUST be <code>MESSAGE</code>
- * when type is <code>SOAPMessage</code>.
- * @param features A list of <code>WebServiceFeatures</code> to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- *
- * @return Dispatch instance.
- * @throws WebServiceException If any error in the creation of
- * the <code>Dispatch</code> object or if a
- * feature is enabled that is not compatible with
- * this port or is unsupported.
- *
- * @see javax.xml.transform.Source
- * @see javax.xml.soap.SOAPMessage
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public <T> Dispatch<T> createDispatch(QName portName, Class<T> type,
- Service.Mode mode, WebServiceFeature... features) {
- return delegate.createDispatch(portName, type, mode, features);
- }
-
-
- /**
- * Creates a <code>Dispatch</code> instance for use with objects of
- * the client's choosing. If there
- * are any reference parameters in the
- * <code>endpointReference</code>, then those reference
- * parameters MUST appear as SOAP headers, indicating them to be
- * reference parameters, on all messages sent to the endpoint.
- * The <code>endpointReference's</code> address MUST be used
- * for invocations on the endpoint.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the dispatch accordingly from
- * the WSDL associated with this <code>Service</code> instance or
- * from the metadata from the <code>endpointReference</code>.
- * If this <code>Service</code> instance has a WSDL and
- * the <code>endpointReference</code>
- * also has a WSDL in its metadata, then the WSDL from this instance MUST be used.
- * If this <code>Service</code> instance does not have a WSDL and
- * the <code>endpointReference</code> does have a WSDL, then the
- * WSDL from the <code>endpointReference</code> MAY be used.
- * An implementation MUST be able to retrieve the <code>portName</code> from the
- * <code>endpointReference</code> metadata.
- * <p>
- * This method behaves the same as calling
- * <pre>
- * <code>dispatch = service.createDispatch(portName, type, mode, features);</code>
- * </pre>
- * where the <code>portName</code> is retrieved from the
- * WSDL or <code>EndpointReference</code> metadata.
- *
- * @param endpointReference The <code>EndpointReference</code>
- * for the target service endpoint that will be invoked by the
- * returned <code>Dispatch</code> object.
- * @param type The class of object used to messages or message
- * payloads. Implementations are required to support
- * <code>javax.xml.transform.Source</code> and <code>javax.xml.soap.SOAPMessage</code>.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the client will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the client will work with
- * SOAP messages or the contents of a SOAP body. Mode MUST be <code>MESSAGE</code>
- * when type is <code>SOAPMessage</code>.
- * @param features An array of <code>WebServiceFeatures</code> to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- *
- * @return Dispatch instance
- * @throws WebServiceException
- * <UL>
- * <LI>If there is any missing WSDL metadata
- * as required by this method.
- * <li>If the <code>endpointReference</code> metadata does
- * not match the <code>serviceName</code> or <code>portName</code>
- * of a WSDL associated
- * with this <code>Service</code> instance.
- * <li>If the <code>portName</code> cannot be determined
- * from the <code>EndpointReference</code> metadata.
- * <li>If any error in the creation of
- * the <code>Dispatch</code> object.
- * <li>If a feature is enabled that is not
- * compatible with this port or is unsupported.
- * </UL>
- *
- * @see javax.xml.transform.Source
- * @see javax.xml.soap.SOAPMessage
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public <T> Dispatch<T> createDispatch(EndpointReference endpointReference,
- Class<T> type, Service.Mode mode,
- WebServiceFeature... features) {
- return delegate.createDispatch(endpointReference, type, mode, features);
- }
-
- /**
- * Creates a <code>Dispatch</code> instance for use with JAXB
- * generated objects.
- *
- * @param portName Qualified name for the target service endpoint
- * @param context The JAXB context used to marshall and unmarshall
- * messages or message payloads.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the client will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the client will work with
- * SOAP messages or the contents of a SOAP body.
- *
- * @return Dispatch instance.
- * @throws WebServiceException If any error in the creation of
- * the <code>Dispatch</code> object.
- *
- * @see javax.xml.bind.JAXBContext
- **/
- public Dispatch<Object> createDispatch(QName portName, JAXBContext context,
- Mode mode) {
- return delegate.createDispatch(portName, context, mode);
- }
-
-
- /**
- * Creates a <code>Dispatch</code> instance for use with JAXB
- * generated objects.
- *
- * @param portName Qualified name for the target service endpoint
- * @param context The JAXB context used to marshall and unmarshall
- * messages or message payloads.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the client will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the client will work with
- * SOAP messages or the contents of a SOAP body.
- * @param features A list of <code>WebServiceFeatures</code> to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- *
- * @return Dispatch instance.
- * @throws WebServiceException If any error in the creation of
- * the <code>Dispatch</code> object or if a
- * feature is enabled that is not compatible with
- * this port or is unsupported.
- *
- * @see javax.xml.bind.JAXBContext
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public Dispatch<Object> createDispatch(QName portName,
- JAXBContext context, Service.Mode mode, WebServiceFeature... features) {
- return delegate.createDispatch(portName, context, mode, features);
- }
-
-
- /**
- * Creates a <code>Dispatch</code> instance for use with JAXB
- * generated objects. If there
- * are any reference parameters in the
- * <code>endpointReference</code>, then those reference
- * parameters MUST appear as SOAP headers, indicating them to be
- * reference parameters, on all messages sent to the endpoint.
- * The <code>endpointReference's</code> address MUST be used
- * for invocations on the endpoint.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the dispatch accordingly from
- * the WSDL associated with this <code>Service</code> instance or
- * from the metadata from the <code>endpointReference</code>.
- * If this <code>Service</code> instance has a WSDL and
- * the <code>endpointReference</code>
- * also has a WSDL in its metadata, then the WSDL from this instance
- * MUST be used.
- * If this <code>Service</code> instance does not have a WSDL and
- * the <code>endpointReference</code> does have a WSDL, then the
- * WSDL from the <code>endpointReference</code> MAY be used.
- * An implementation MUST be able to retrieve the <code>portName</code> from the
- * <code>endpointReference</code> metadata.
- * <p>
- * This method behavies the same as calling
- * <pre>
- * <code>dispatch = service.createDispatch(portName, context, mode, features);</code>
- * </pre>
- * where the <code>portName</code> is retrieved from the
- * WSDL or <code>endpointReference</code> metadata.
- *
- * @param endpointReference The <code>EndpointReference</code>
- * for the target service endpoint that will be invoked by the
- * returned <code>Dispatch</code> object.
- * @param context The JAXB context used to marshall and unmarshall
- * messages or message payloads.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the client will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the client will work with
- * SOAP messages or the contents of a SOAP body.
- * @param features An array of <code>WebServiceFeatures</code> to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- *
- * @return Dispatch instance
- * @throws WebServiceException
- * <UL>
- * <li>If there is any missing WSDL metadata
- * as required by this method.
- * <li>If the <code>endpointReference</code> metadata does
- * not match the <code>serviceName</code> or <code>portName</code>
- * of a WSDL associated
- * with this <code>Service</code> instance.
- * <li>If the <code>portName</code> cannot be determined
- * from the <code>EndpointReference</code> metadata.
- * <li>If any error in the creation of
- * the <code>Dispatch</code> object.
- * <li>if a feature is enabled that is not
- * compatible with this port or is unsupported.
- * </UL>
- *
- * @see javax.xml.bind.JAXBContext
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public Dispatch<Object> createDispatch(EndpointReference endpointReference,
- JAXBContext context, Service.Mode mode,
- WebServiceFeature... features) {
- return delegate.createDispatch(endpointReference, context, mode, features);
- }
-
- /**
- * Gets the name of this service.
- * @return Qualified name of this service
- **/
- public QName getServiceName() {
- return delegate.getServiceName();
- }
-
- /**
- * Returns an <code>Iterator</code> for the list of
- * <code>QName</code>s of service endpoints grouped by this
- * service
- *
- * @return Returns <code>java.util.Iterator</code> with elements
- * of type <code>javax.xml.namespace.QName</code>.
- * @throws WebServiceException If this Service class does not
- * have access to the required WSDL metadata.
- **/
- public Iterator<javax.xml.namespace.QName> getPorts() {
- return delegate.getPorts();
- }
-
- /**
- * Gets the location of the WSDL document for this Service.
- *
- * @return URL for the location of the WSDL document for
- * this service.
- **/
- public java.net.URL getWSDLDocumentLocation() {
- return delegate.getWSDLDocumentLocation();
- }
-
- /**
- * Returns the configured handler resolver.
- *
- * @return HandlerResolver The <code>HandlerResolver</code> being
- * used by this <code>Service</code> instance, or <code>null</code>
- * if there isn't one.
- **/
- public HandlerResolver getHandlerResolver() {
- return delegate.getHandlerResolver();
- }
-
- /**
- * Sets the <code>HandlerResolver</code> for this <code>Service</code>
- * instance.
- * <p>
- * The handler resolver, if present, will be called once for each
- * proxy or dispatch instance that is created, and the handler chain
- * returned by the resolver will be set on the instance.
- *
- * @param handlerResolver The <code>HandlerResolver</code> to use
- * for all subsequently created proxy/dispatch objects.
- *
- * @see javax.xml.ws.handler.HandlerResolver
- **/
- public void setHandlerResolver(HandlerResolver handlerResolver) {
- delegate.setHandlerResolver(handlerResolver);
- }
-
- /**
- * Returns the executor for this <code>Service</code>instance.
- *
- * The executor is used for all asynchronous invocations that
- * require callbacks.
- *
- * @return The <code>java.util.concurrent.Executor</code> to be
- * used to invoke a callback.
- *
- * @see java.util.concurrent.Executor
- **/
- public java.util.concurrent.Executor getExecutor() {
- return delegate.getExecutor();
- }
-
- /**
- * Sets the executor for this <code>Service</code> instance.
- *
- * The executor is used for all asynchronous invocations that
- * require callbacks.
- *
- * @param executor The <code>java.util.concurrent.Executor</code>
- * to be used to invoke a callback.
- *
- * @throws SecurityException If the instance does not support
- * setting an executor for security reasons (e.g. the
- * necessary permissions are missing).
- *
- * @see java.util.concurrent.Executor
- **/
- public void setExecutor(java.util.concurrent.Executor executor) {
- delegate.setExecutor(executor);
- }
-
- /**
- * Creates a <code>Service</code> instance.
- *
- * The specified WSDL document location and service qualified name MUST
- * uniquely identify a <code>wsdl:service</code> element.
- *
- * @param wsdlDocumentLocation <code>URL</code> for the WSDL document location
- * for the service
- * @param serviceName <code>QName</code> for the service
- * @throws WebServiceException If any error in creation of the
- * specified service.
- **/
- public static Service create(
- java.net.URL wsdlDocumentLocation,
- QName serviceName) {
- return new Service(wsdlDocumentLocation, serviceName);
- }
-
- /**
- * Creates a <code>Service</code> instance. The created instance is
- * configured with the web service features.
- *
- * The specified WSDL document location and service qualified name MUST
- * uniquely identify a <code>wsdl:service</code> element.
- *
- * @param wsdlDocumentLocation <code>URL</code> for the WSDL document location
- * for the service
- * @param serviceName <code>QName</code> for the service
- * @param features Web Service features that must be configured on
- * the service. If the provider doesn't understand a feature,
- * it must throw a WebServiceException.
- * @throws WebServiceException If any error in creation of the
- * specified service.
- * @since JAX-WS 2.2
- **/
- public static Service create(
- java.net.URL wsdlDocumentLocation,
- QName serviceName, WebServiceFeature ... features) {
- return new Service(wsdlDocumentLocation, serviceName, features);
- }
-
- /**
- * Creates a <code>Service</code> instance.
- *
- * @param serviceName <code>QName</code> for the service
- * @throws WebServiceException If any error in creation of the
- * specified service
- */
- public static Service create(QName serviceName) {
- return new Service(null, serviceName);
- }
-
- /**
- * Creates a <code>Service</code> instance. The created instance is
- * configured with the web service features.
- *
- * @param serviceName <code>QName</code> for the service
- * @param features Web Service features that must be configured on
- * the service. If the provider doesn't understand a feature,
- * it must throw a WebServiceException.
- * @throws WebServiceException If any error in creation of the
- * specified service
- *
- * @since JAX-WS 2.2
- */
- public static Service create(QName serviceName, WebServiceFeature ... features) {
- return new Service(null, serviceName, features);
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/ServiceMode.java b/src/share/jaxws_classes/javax/xml/ws/ServiceMode.java
deleted file mode 100644
index b03b4909..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/ServiceMode.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Inherited;
-
-/**
- * Used to indicate whether a {@link Provider} implementation wishes to work
- * with entire protocol messages or just with protocol message payloads.
- *
- * @since JAX-WS 2.0
-**/
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-@Inherited
-@Documented
-public @interface ServiceMode {
- /**
- * Service mode. <code>PAYLOAD</code> indicates that the <code>Provider</code> implementation
- * wishes to work with protocol message payloads only. <code>MESSAGE</code> indicates
- * that the <code>Provider</code> implementation wishes to work with entire protocol
- * messages.
- **/
- public Service.Mode value() default Service.Mode.PAYLOAD;
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/WebEndpoint.java b/src/share/jaxws_classes/javax/xml/ws/WebEndpoint.java
deleted file mode 100644
index 0eb5e6b3..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/WebEndpoint.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Used to annotate the <code>get<em>PortName</em>()</code>
- * methods of a generated service interface.
- *
- * <p>The information specified in this annotation is sufficient
- * to uniquely identify a <code>wsdl:port</code> element
- * inside a <code>wsdl:service</code>. The latter is
- * determined based on the value of the <code>WebServiceClient</code>
- * annotation on the generated service interface itself.
- *
- * @since JAX-WS 2.0
- *
- * @see javax.xml.ws.WebServiceClient
-**/
-@Target({ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface WebEndpoint {
- /**
- * The local name of the endpoint.
- **/
- String name() default "";
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/WebFault.java b/src/share/jaxws_classes/javax/xml/ws/WebFault.java
deleted file mode 100644
index 36d276c2..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/WebFault.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Used to annotate service specific exception classes to customize
- * to the local and namespace name of the fault element and the name
- * of the fault bean.
- *
- * @since JAX-WS 2.0
-**/
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface WebFault {
- /**
- * Element's local name.
- **/
- public String name() default "";
-
- /**
- * Element's namespace name.
- **/
- public String targetNamespace() default "";
-
- /**
- * Fault bean name.
- **/
- public String faultBean() default "";
-
-
- /**
- * wsdl:Message's name. Default name is the exception's class name.
- * @since JAX-WS 2.2
- */
- public String messageName() default "";
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/WebServiceClient.java b/src/share/jaxws_classes/javax/xml/ws/WebServiceClient.java
deleted file mode 100644
index 00821ce4..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/WebServiceClient.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Used to annotate a generated service interface.
- *
- * <p>The information specified in this annotation is sufficient
- * to uniquely identify a <code>wsdl:service</code>
- * element inside a WSDL document. This <code>wsdl:service</code>
- * element represents the Web service for which the generated
- * service interface provides a client view.
- *
- * @since JAX-WS 2.0
-**/
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface WebServiceClient {
- /**
- * The local name of the Web service.
- **/
- String name() default "";
-
- /**
- * The namespace for the Web service.
- **/
- String targetNamespace() default "";
-
- /**
- * The location of the WSDL document for the service (a URL).
- **/
- String wsdlLocation() default "";
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/WebServiceContext.java b/src/share/jaxws_classes/javax/xml/ws/WebServiceContext.java
deleted file mode 100644
index b2b9314b..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/WebServiceContext.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.security.Principal;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import org.w3c.dom.Element;
-
-
-/**
- * A <code>WebServiceContext</code> makes it possible for
- * a web service endpoint implementation class to access
- * message context and security information relative to
- * a request being served.
- *
- * Typically a <code>WebServiceContext</code> is injected
- * into an endpoint implementation class using the
- * <code>Resource</code> annotation.
- *
- * @since JAX-WS 2.0
- *
- * @see javax.annotation.Resource
- **/
-public interface WebServiceContext {
-
- /**
- * Returns the <code>MessageContext</code> for the request being served
- * at the time this method is called. Only properties with
- * APPLICATION scope will be visible to the application.
- *
- * @return MessageContext The message context.
- *
- * @throws IllegalStateException This exception is thrown
- * if the method is called while no request is
- * being serviced.
- *
- * @see javax.xml.ws.handler.MessageContext
- * @see javax.xml.ws.handler.MessageContext.Scope
- * @see java.lang.IllegalStateException
- **/
- public MessageContext getMessageContext();
-
- /**
- * Returns the Principal that identifies the sender
- * of the request currently being serviced. If the
- * sender has not been authenticated, the method
- * returns <code>null</code>.
- *
- * @return Principal The principal object.
- *
- * @throws IllegalStateException This exception is thrown
- * if the method is called while no request is
- * being serviced.
- *
- * @see java.security.Principal
- * @see java.lang.IllegalStateException
- **/
- public Principal getUserPrincipal();
-
- /**
- * Returns a boolean indicating whether the
- * authenticated user is included in the specified
- * logical role. If the user has not been
- * authenticated, the method returns <code>false</code>.
- *
- * @param role A <code>String</code> specifying the name of the role
- *
- * @return a <code>boolean</code> indicating whether
- * the sender of the request belongs to a given role
- *
- * @throws IllegalStateException This exception is thrown
- * if the method is called while no request is
- * being serviced.
- **/
- public boolean isUserInRole(String role);
-
- /**
- * Returns the <code>EndpointReference</code> for this
- * endpoint.
- * <p>
- * If the {@link Binding} for this <code>bindingProvider</code> is
- * either SOAP1.1/HTTP or SOAP1.2/HTTP, then a
- * <code>W3CEndpointReference</code> MUST be returned.
- *
- * @param referenceParameters Reference parameters to be associated with the
- * returned <code>EndpointReference</code> instance.
- * @return EndpointReference of the endpoint associated with this
- * <code>WebServiceContext</code>.
- * If the returned <code>EndpointReference</code> is of type
- * <code>W3CEndpointReference</code> then it MUST contain the
- * the specified <code>referenceParameters</code>.
- *
- * @throws IllegalStateException This exception is thrown
- * if the method is called while no request is
- * being serviced.
- *
- * @see W3CEndpointReference
- *
- * @since JAX-WS 2.1
- */
- public EndpointReference getEndpointReference(Element... referenceParameters);
-
- /**
- * Returns the <code>EndpointReference</code> associated with
- * this endpoint.
- *
- * @param clazz The type of <code>EndpointReference</code> that
- * MUST be returned.
- * @param referenceParameters Reference parameters to be associated with the
- * returned <code>EndpointReference</code> instance.
- * @return EndpointReference of type <code>clazz</code> of the endpoint
- * associated with this <code>WebServiceContext</code> instance.
- * If the returned <code>EndpointReference</code> is of type
- * <code>W3CEndpointReference</code> then it MUST contain the
- * the specified <code>referenceParameters</code>.
- *
- * @throws IllegalStateException This exception is thrown
- * if the method is called while no request is
- * being serviced.
- * @throws WebServiceException If the <code>clazz</code> type of
- * <code>EndpointReference</code> is not supported.
- *
- * @since JAX-WS 2.1
- **/
- public <T extends EndpointReference> T getEndpointReference(Class<T> clazz,
- Element... referenceParameters);
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/WebServiceException.java b/src/share/jaxws_classes/javax/xml/ws/WebServiceException.java
deleted file mode 100644
index 6b3d05a4..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/WebServiceException.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-/** The <code>WebServiceException</code> class is the base
- * exception class for all JAX-WS API runtime exceptions.
- *
- * @since JAX-WS 2.0
-**/
-
-public class WebServiceException extends java.lang.RuntimeException {
-
- /** Constructs a new exception with <code>null</code> as its
- * detail message. The cause is not initialized.
- **/
- public WebServiceException() {
- super();
- }
-
- /** Constructs a new exception with the specified detail
- * message. The cause is not initialized.
- * @param message The detail message which is later
- * retrieved using the getMessage method
- **/
- public WebServiceException(String message) {
- super(message);
- }
-
- /** Constructs a new exception with the specified detail
- * message and cause.
- *
- * @param message The detail message which is later retrieved
- * using the getMessage method
- * @param cause The cause which is saved for the later
- * retrieval throw by the getCause method
- **/
- public WebServiceException(String message, Throwable cause) {
- super(message,cause);
- }
-
- /** Constructs a new WebServiceException with the specified cause
- * and a detail message of <tt>(cause==null ? null :
- * cause.toString())</tt> (which typically contains the
- * class and detail message of <tt>cause</tt>).
- *
- * @param cause The cause which is saved for the later
- * retrieval throw by the getCause method.
- * (A <tt>null</tt> value is permitted, and
- * indicates that the cause is nonexistent or
- * unknown.)
- **/
- public WebServiceException(Throwable cause) {
- super(cause);
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/WebServiceFeature.java b/src/share/jaxws_classes/javax/xml/ws/WebServiceFeature.java
deleted file mode 100644
index 979627b8..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/WebServiceFeature.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-
-/**
- * A WebServiceFeature is used to represent a feature that can be
- * enabled or disabled for a web service.
- * <p>
- * The JAX-WS specification will define some standard features and
- * JAX-WS implementors are free to define additional features if
- * necessary. Vendor specific features may not be portable so
- * caution should be used when using them. Each Feature definition
- * MUST define a <code>public static final String ID</code>
- * that can be used in the Feature annotation to refer
- * to the feature. This ID MUST be unique across all features
- * of all vendors. When defining a vendor specific feature ID,
- * use a vendor specific namespace in the ID string.
- *
- * @see javax.xml.ws.RespectBindingFeature
- * @see javax.xml.ws.soap.AddressingFeature
- * @see javax.xml.ws.soap.MTOMFeature
- *
- * @since 2.1
- */
-public abstract class WebServiceFeature {
- /**
- * Each Feature definition MUST define a public static final
- * String ID that can be used in the Feature annotation to refer
- * to the feature.
- */
- // public static final String ID = "some unique feature Identifier";
-
- /**
- * Get the unique identifier for this WebServiceFeature.
- *
- * @return the unique identifier for this feature.
- */
- public abstract String getID();
-
- /**
- * Specifies if the feature is enabled or disabled
- */
- protected boolean enabled = false;
-
-
- protected WebServiceFeature(){}
-
-
- /**
- * Returns <code>true</code> if this feature is enabled.
- *
- * @return <code>true</code> if and only if the feature is enabled .
- */
- public boolean isEnabled() {
- return enabled;
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/WebServicePermission.java b/src/share/jaxws_classes/javax/xml/ws/WebServicePermission.java
deleted file mode 100644
index 4613a786..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/WebServicePermission.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.security.BasicPermission;
-
-/**
- * This class defines web service permissions.
- * <p>
- * Web service Permissions are identified by name (also referred to as
- * a "target name") alone. There are no actions associated
- * with them.
- * <p>
- * The following permission target name is defined:
- * <p>
- * <dl>
- * <dt>publishEndpoint
- * </dl>
- * <p>
- * The <code>publishEndpoint</code> permission allows publishing a
- * web service endpoint using the <code>publish</code> methods
- * defined by the <code>javax.xml.ws.Endpoint</code> class.
- * <p>
- * Granting <code>publishEndpoint</code> allows the application to be
- * exposed as a network service. Depending on the security of the runtime and
- * the security of the application, this may introduce a security hole that
- * is remotely exploitable.
- *
- * @see javax.xml.ws.Endpoint
- * @see java.security.BasicPermission
- * @see java.security.Permission
- * @see java.security.Permissions
- * @see java.lang.SecurityManager
- * @see java.net.SocketPermission
- */
-public final class WebServicePermission extends BasicPermission {
-
- private static final long serialVersionUID = -146474640053770988L;
-
- /**
- * Creates a new permission with the specified name.
- *
- * @param name the name of the <code>WebServicePermission</code>
- */
- public WebServicePermission(String name) {
- super(name);
- }
-
- /**
- * Creates a new permission with the specified name and actions.
- *
- * The <code>actions</code> parameter is currently unused and
- * it should be <code>null</code>.
- *
- * @param name the name of the <code>WebServicePermission</code>
- * @param actions should be <code>null</code>
- */
- public WebServicePermission(String name, String actions) {
- super(name, actions);
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/WebServiceProvider.java b/src/share/jaxws_classes/javax/xml/ws/WebServiceProvider.java
deleted file mode 100644
index b99a3ec0..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/WebServiceProvider.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.RetentionPolicy;
-/**
- * Used to annotate a Provider implementation class.
- *
- * @since JAX-WS 2.0
- * @see javax.xml.ws.Provider
- */
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface WebServiceProvider {
- /**
- * Location of the WSDL description for the service.
- */
- String wsdlLocation() default "";
-
- /**
- * Service name.
- */
- String serviceName() default "";
-
- /**
- * Target namespace for the service
- */
- String targetNamespace() default "";
-
- /**
- * Port name.
- */
- String portName() default "";
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/WebServiceRef.java b/src/share/jaxws_classes/javax/xml/ws/WebServiceRef.java
deleted file mode 100644
index 59bf654d..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/WebServiceRef.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import javax.xml.ws.soap.Addressing;
-import javax.xml.ws.spi.WebServiceFeatureAnnotation;
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * The <code>WebServiceRef</code> annotation is used to
- * define a reference to a web service and
- * (optionally) an injection target for it.
- * It can be used to inject both service and proxy
- * instances. These injected references are not thread safe.
- * If the references are accessed by multiple threads,
- * usual synchronization techinques can be used to
- * support multiple threads.
- *
- * <p>
- * Web service references are resources in the Java EE 5 sense.
- * The annotations (for example, {@link Addressing}) annotated with
- * meta-annotation {@link WebServiceFeatureAnnotation}
- * can be used in conjunction with <code>WebServiceRef</code>.
- * The created reference MUST be configured with annotation's web service
- * feature.
- *
- * <p>
- * For example, in the code below, the injected
- * <code>StockQuoteProvider</code> proxy MUST
- * have WS-Addressing enabled as specifed by the
- * {@link Addressing}
- * annotation.
- *
- * <pre><code>
- * public class MyClient {
- * &#64;Addressing
- * &#64;WebServiceRef(StockQuoteService.class)
- * private StockQuoteProvider stockQuoteProvider;
- * ...
- * }
- * </code></pre>
- *
- * <p>
- * If a JAX-WS implementation encounters an unsupported or unrecognized
- * annotation annotated with the <code>WebServiceFeatureAnnotation</code>
- * that is specified with <code>WebServiceRef</code>, an ERROR MUST be given.
- *
- * @see javax.annotation.Resource
- * @see WebServiceFeatureAnnotation
- *
- * @since JAX-WS 2.0
- *
-**/
-
-@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface WebServiceRef {
- /**
- * The JNDI name of the resource. For field annotations,
- * the default is the field name. For method annotations,
- * the default is the JavaBeans property name corresponding
- * to the method. For class annotations, there is no default
- * and this MUST be specified.
- *
- * The JNDI name can be absolute(with any logical namespace) or relative
- * to JNDI <code>java:comp/env</code> namespace.
- */
- String name() default "";
-
- /**
- * The Java type of the resource. For field annotations,
- * the default is the type of the field. For method annotations,
- * the default is the type of the JavaBeans property.
- * For class annotations, there is no default and this MUST be
- * specified.
- */
- Class<?> type() default Object.class;
-
- /**
- * A product specific name that this resource should be mapped to.
- * The name of this resource, as defined by the <code>name</code>
- * element or defaulted, is a name that is local to the application
- * component using the resource. (When a relative JNDI name
- * is specified, then it's a name in the JNDI
- * <code>java:comp/env</code> namespace.) Many application servers
- * provide a way to map these local names to names of resources
- * known to the application server. This mapped name is often a
- * <i>global</i> JNDI name, but may be a name of any form.
- * <p>
- * Application servers are not required to support any particular
- * form or type of mapped name, nor the ability to use mapped names.
- * The mapped name is product-dependent and often installation-dependent.
- * No use of a mapped name is portable.
- */
- String mappedName() default "";
-
- /**
- * The service class, alwiays a type extending
- * <code>javax.xml.ws.Service</code>. This element MUST be specified
- * whenever the type of the reference is a service endpoint interface.
- */
- // 2.1 has Class value() default Object.class;
- // Fixing this raw Class type correctly in 2.2 API. This shouldn't cause
- // any compatibility issues for applications.
- Class<? extends Service> value() default Service.class;
-
- /**
- * A URL pointing to the WSDL document for the web service.
- * If not specified, the WSDL location specified by annotations
- * on the resource type is used instead.
- */
- String wsdlLocation() default "";
-
- /**
- * A portable JNDI lookup name that resolves to the target
- * web service reference.
- *
- * @since JAX-WS 2.2
- */
- String lookup() default "";
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/WebServiceRefs.java b/src/share/jaxws_classes/javax/xml/ws/WebServiceRefs.java
deleted file mode 100644
index c77749bb..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/WebServiceRefs.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-/**
- * The <code>WebServiceRefs</code> annotation allows
- * multiple web service references to be declared at the
- * class level.
- *
- * <p>
- * It can be used to inject both service and proxy
- * instances. These injected references are not thread safe.
- * If the references are accessed by multiple threads,
- * usual synchronization techniques can be used to
- * support multiple threads.
- *
- * <p>
- * There is no way to associate web service features with
- * the injected instances. If an instance needs to be
- * configured with web service features, use @WebServiceRef
- * to inject the resource along with its features.
- *
- * <p>
- * <b>Example</b>: The <code>StockQuoteProvider</code>
- * proxy instance, and the <code>StockQuoteService</code> service
- * instance are injected using @WebServiceRefs.
- *
- * <pre><code>
- * &#64;WebServiceRefs({&#64;WebServiceRef(name="service/stockquoteservice", value=StockQuoteService.class),
- * &#64;WebServiceRef(name="service/stockquoteprovider", type=StockQuoteProvider.class, value=StockQuoteService.class})
- * public class MyClient {
- * void init() {
- * Context ic = new InitialContext();
- * StockQuoteService service = (StockQuoteService) ic.lookup("java:comp/env/service/stockquoteservice");
- * StockQuoteProvider port = (StockQuoteProvider) ic.lookup("java:comp/env/service/stockquoteprovider");
- * ...
- * }
- * ...
- * }
- * </code></pre>
- *
- * @see WebServiceRef
- * @since 2.0
- */
-
-@Documented
-@Retention(RUNTIME)
-@Target(TYPE)
-public @interface WebServiceRefs {
- /**
- * Array used for multiple web service reference declarations.
- */
- WebServiceRef[] value();
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/handler/Handler.java b/src/share/jaxws_classes/javax/xml/ws/handler/Handler.java
deleted file mode 100644
index ec278114..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/handler/Handler.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.handler;
-
-import javax.xml.ws.ProtocolException;
-import javax.xml.ws.handler.MessageContext;
-
-/** The <code>Handler</code> interface
- * is the base interface for JAX-WS handlers.
- *
- * @since JAX-WS 2.0
-**/
-public interface Handler<C extends MessageContext> {
-
- /** The <code>handleMessage</code> method is invoked for normal processing
- * of inbound and outbound messages. Refer to the description of the handler
- * framework in the JAX-WS specification for full details.
- *
- * @param context the message context.
- * @return An indication of whether handler processing should continue for
- * the current message
- * <ul>
- * <li>Return <code>true</code> to continue
- * processing.</li>
- * <li>Return <code>false</code> to block
- * processing.</li>
- * </ul>
- * @throws RuntimeException Causes the JAX-WS runtime to cease
- * handler processing and generate a fault.
- * @throws ProtocolException Causes the JAX-WS runtime to switch to
- * fault message processing.
- **/
- public boolean handleMessage(C context);
-
- /** The <code>handleFault</code> method is invoked for fault message
- * processing. Refer to the description of the handler
- * framework in the JAX-WS specification for full details.
- *
- * @param context the message context
- * @return An indication of whether handler fault processing should continue
- * for the current message
- * <ul>
- * <li>Return <code>true</code> to continue
- * processing.</li>
- * <li>Return <code>false</code> to block
- * processing.</li>
- * </ul>
- * @throws RuntimeException Causes the JAX-WS runtime to cease
- * handler fault processing and dispatch the fault.
- * @throws ProtocolException Causes the JAX-WS runtime to cease
- * handler fault processing and dispatch the fault.
- **/
- public boolean handleFault(C context);
-
- /**
- * Called at the conclusion of a message exchange pattern just prior to
- * the JAX-WS runtime dispatching a message, fault or exception. Refer to
- * the description of the handler
- * framework in the JAX-WS specification for full details.
- *
- * @param context the message context
- **/
- public void close(MessageContext context);
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/handler/HandlerResolver.java b/src/share/jaxws_classes/javax/xml/ws/handler/HandlerResolver.java
deleted file mode 100644
index a810262c..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/handler/HandlerResolver.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.handler;
-
-/**
- * <code>HandlerResolver</code> is an interface implemented
- * by an application to get control over the handler chain
- * set on proxy/dispatch objects at the time of their creation.
- * <p>
- * A <code>HandlerResolver</code> may be set on a <code>Service</code>
- * using the <code>setHandlerResolver</code> method.
- * <p>
- * When the runtime invokes a <code>HandlerResolver</code>, it will
- * pass it a <code>PortInfo</code> object containing information
- * about the port that the proxy/dispatch object will be accessing.
- *
- * @see javax.xml.ws.Service#setHandlerResolver
- *
- * @since JAX-WS 2.0
-**/
-public interface HandlerResolver {
-
- /**
- * Gets the handler chain for the specified port.
- *
- * @param portInfo Contains information about the port being accessed.
- * @return java.util.List&lt;Handler> chain
- **/
- public java.util.List<Handler> getHandlerChain(PortInfo portInfo);
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/handler/LogicalHandler.java b/src/share/jaxws_classes/javax/xml/ws/handler/LogicalHandler.java
deleted file mode 100644
index a0083be4..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/handler/LogicalHandler.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.handler;
-
-/** The <code>LogicalHandler</code> extends
- * Handler to provide typesafety for the message context parameter.
- *
- * @since JAX-WS 2.0
-**/
-public interface LogicalHandler<C extends LogicalMessageContext> extends Handler<C> {
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/handler/LogicalMessageContext.java b/src/share/jaxws_classes/javax/xml/ws/handler/LogicalMessageContext.java
deleted file mode 100644
index 4837e30d..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/handler/LogicalMessageContext.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.handler;
-
-import javax.xml.ws.LogicalMessage;
-
-/** The <code>LogicalMessageContext</code> interface extends
- * <code>MessageContext</code> to
- * provide access to a the contained message as a protocol neutral
- * LogicalMessage
- *
- * @since JAX-WS 2.0
-**/
-public interface LogicalMessageContext
- extends MessageContext {
-
- /** Gets the message from this message context
- *
- * @return The contained message; returns <code>null</code> if no
- * message is present in this message context
- **/
- public LogicalMessage getMessage();
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/handler/MessageContext.java b/src/share/jaxws_classes/javax/xml/ws/handler/MessageContext.java
deleted file mode 100644
index 2cac467a..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/handler/MessageContext.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.handler;
-import java.util.Map;
-
-/**
- * The interface <code>MessageContext</code> abstracts the message
- * context that is processed by a handler in the <code>handle</code>
- * method.
- *
- * <p>The <code>MessageContext</code> interface provides methods to
- * manage a property set. <code>MessageContext</code> properties
- * enable handlers in a handler chain to share processing related
- * state.
- *
- * @since JAX-WS 2.0
- */
-public interface MessageContext extends Map<String, Object> {
-
- /**
- * Standard property: message direction, <code>true</code> for
- * outbound messages, <code>false</code> for inbound.
- * <p>Type: boolean
- */
- public static final String MESSAGE_OUTBOUND_PROPERTY =
- "javax.xml.ws.handler.message.outbound";
-
- /**
- * Standard property: Map of attachments to a message for the inbound
- * message, key is the MIME Content-ID, value is a DataHandler.
- * <p>Type: java.util.Map&lt;String,DataHandler>
- */
- public static final String INBOUND_MESSAGE_ATTACHMENTS =
- "javax.xml.ws.binding.attachments.inbound";
-
- /**
- * Standard property: Map of attachments to a message for the outbound
- * message, key is the MIME Content-ID, value is a DataHandler.
- * <p>Type: java.util.Map&lt;String,DataHandler>
- */
- public static final String OUTBOUND_MESSAGE_ATTACHMENTS =
- "javax.xml.ws.binding.attachments.outbound";
-
- /**
- * Standard property: input source for WSDL document.
- * <p>Type: org.xml.sax.InputSource
- */
- public static final String WSDL_DESCRIPTION =
- "javax.xml.ws.wsdl.description";
-
- /**
- * Standard property: name of WSDL service.
- * <p>Type: javax.xml.namespace.QName
- */
- public static final String WSDL_SERVICE =
- "javax.xml.ws.wsdl.service";
-
- /**
- * Standard property: name of WSDL port.
- * <p>Type: javax.xml.namespace.QName
- */
- public static final String WSDL_PORT =
- "javax.xml.ws.wsdl.port";
-
- /**
- * Standard property: name of wsdl interface (2.0) or port type (1.1).
- * <p>Type: javax.xml.namespace.QName
- */
- public static final String WSDL_INTERFACE =
- "javax.xml.ws.wsdl.interface";
-
- /**
- * Standard property: name of WSDL operation.
- * <p>Type: javax.xml.namespace.QName
- */
- public static final String WSDL_OPERATION =
- "javax.xml.ws.wsdl.operation";
-
- /**
- * Standard property: HTTP response status code.
- * <p>Type: java.lang.Integer
- */
- public static final String HTTP_RESPONSE_CODE =
- "javax.xml.ws.http.response.code";
-
- /**
- * Standard property: HTTP request headers.
- * <p>Type: java.util.Map&lt;java.lang.String, java.util.List&lt;java.lang.String>>
- */
- public static final String HTTP_REQUEST_HEADERS =
- "javax.xml.ws.http.request.headers";
-
- /**
- * Standard property: HTTP response headers.
- * <p>Type: java.util.Map&lt;java.lang.String, java.util.List&lt;java.lang.String>>
- */
- public static final String HTTP_RESPONSE_HEADERS =
- "javax.xml.ws.http.response.headers";
-
- /**
- * Standard property: HTTP request method.
- * <p>Type: java.lang.String
- */
- public static final String HTTP_REQUEST_METHOD =
- "javax.xml.ws.http.request.method";
-
- /**
- * Standard property: servlet request object.
- * <p>Type: javax.servlet.http.HttpServletRequest
- */
- public static final String SERVLET_REQUEST =
- "javax.xml.ws.servlet.request";
-
- /**
- * Standard property: servlet response object.
- * <p>Type: javax.servlet.http.HttpServletResponse
- */
- public static final String SERVLET_RESPONSE =
- "javax.xml.ws.servlet.response";
-
- /**
- * Standard property: servlet context object.
- * <p>Type: javax.servlet.ServletContext
- */
- public static final String SERVLET_CONTEXT =
- "javax.xml.ws.servlet.context";
-
- /**
- * Standard property: Query string for request.
- * <p>Type: String
- **/
- public static final String QUERY_STRING =
- "javax.xml.ws.http.request.querystring";
-
- /**
- * Standard property: Request Path Info
- * <p>Type: String
- */
- public static final String PATH_INFO =
- "javax.xml.ws.http.request.pathinfo";
-
- /**
- * Standard property: WS Addressing Reference Parameters.
- * The list MUST include all SOAP headers marked with the
- * wsa:IsReferenceParameter="true" attribute.
- * <p>Type: List&lt;Element>
- *
- * @since JAX-WS 2.1
- */
- public static final String REFERENCE_PARAMETERS =
- "javax.xml.ws.reference.parameters";
-
- /**
- * Property scope. Properties scoped as <code>APPLICATION</code> are
- * visible to handlers,
- * client applications and service endpoints; properties scoped as
- * <code>HANDLER</code>
- * are only normally visible to handlers.
- */
- public enum Scope {APPLICATION, HANDLER};
-
- /**
- * Sets the scope of a property.
- *
- * @param name Name of the property associated with the
- * <code>MessageContext</code>
- * @param scope Desired scope of the property
- * @throws java.lang.IllegalArgumentException if an illegal
- * property name is specified
- */
- public void setScope(String name, Scope scope);
-
- /**
- * Gets the scope of a property.
- *
- * @param name Name of the property
- * @return Scope of the property
- * @throws java.lang.IllegalArgumentException if a non-existant
- * property name is specified
- */
- public Scope getScope(String name);
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/handler/PortInfo.java b/src/share/jaxws_classes/javax/xml/ws/handler/PortInfo.java
deleted file mode 100644
index c417aa82..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/handler/PortInfo.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.handler;
-
-import javax.xml.namespace.QName;
-
-/**
- * The <code>PortInfo</code> interface is used by a
- * <code>HandlerResolver</code> to query information about
- * the port it is being asked to create a handler chain for.
- * <p>
- * This interface is never implemented by an application,
- * only by a JAX-WS implementation.
- *
- * @since JAX-WS 2.0
-**/
-public interface PortInfo {
-
- /**
- * Gets the qualified name of the WSDL service name containing
- * the port being accessed.
- *
- * @return javax.xml.namespace.QName The qualified name of the WSDL service.
- **/
- public QName getServiceName();
-
- /**
- * Gets the qualified name of the WSDL port being accessed.
- *
- * @return javax.xml.namespace.QName The qualified name of the WSDL port.
- **/
- public QName getPortName();
-
- /**
- * Gets the URI identifying the binding used by the port being accessed.
- *
- * @return String The binding identifier for the port.
- *
- * @see javax.xml.ws.Binding
- **/
- public String getBindingID();
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/handler/package.html b/src/share/jaxws_classes/javax/xml/ws/handler/package.html
deleted file mode 100644
index f08bf8ef..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/handler/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-<body>
-This package defines APIs for message handlers.
-</body>
-</html>
diff --git a/src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPHandler.java b/src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPHandler.java
deleted file mode 100644
index 90fabc7f..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPHandler.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.handler.soap;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.handler.Handler;
-import java.util.Set;
-
-/** The <code>SOAPHandler</code> class extends <code>Handler</code>
- * to provide typesafety for the message context parameter and add a method
- * to obtain access to the headers that may be processed by the handler.
- *
- * @since JAX-WS 2.0
-**/
-public interface SOAPHandler<T extends SOAPMessageContext>
- extends Handler<T> {
-
- /** Gets the header blocks that can be processed by this Handler
- * instance.
- *
- * @return Set of <code>QNames</code> of header blocks processed by this
- * handler instance. <code>QName</code> is the qualified
- * name of the outermost element of the Header block.
- **/
- Set<QName> getHeaders();
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPMessageContext.java b/src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPMessageContext.java
deleted file mode 100644
index 35c41792..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/handler/soap/SOAPMessageContext.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.handler.soap;
-
-import javax.xml.soap.SOAPMessage;
-import javax.xml.bind.JAXBContext;
-import javax.xml.namespace.QName;
-import java.util.Set;
-
-/** The interface <code>SOAPMessageContext</code>
- * provides access to the SOAP message for either RPC request or
- * response. The <code>javax.xml.soap.SOAPMessage</code> specifies
- * the standard Java API for the representation of a SOAP 1.1 message
- * with attachments.
- *
- * @see javax.xml.soap.SOAPMessage
- *
- * @since JAX-WS 2.0
-**/
-public interface SOAPMessageContext
- extends javax.xml.ws.handler.MessageContext {
-
- /** Gets the <code>SOAPMessage</code> from this message context. Modifications
- * to the returned <code>SOAPMessage</code> change the message in-place, there
- * is no need to subsequently call <code>setMessage</code>.
- *
- * @return Returns the <code>SOAPMessage</code>; returns <code>null</code> if no
- * <code>SOAPMessage</code> is present in this message context
- **/
- public SOAPMessage getMessage();
-
- /** Sets the SOAPMessage in this message context
- *
- * @param message SOAP message
- * @throws WebServiceException If any error during the setting
- * of the <code>SOAPMessage</code> in this message context
- * @throws java.lang.UnsupportedOperationException If this
- * operation is not supported
- **/
- public void setMessage(SOAPMessage message);
-
- /** Gets headers that have a particular qualified name from the message in the
- * message context. Note that a SOAP message can contain multiple headers
- * with the same qualified name.
- *
- * @param header The XML qualified name of the SOAP header(s).
- * @param context The JAXBContext that should be used to unmarshall the
- * header
- * @param allRoles If <code>true</code> then returns headers for all SOAP
- * roles, if <code>false</code> then only returns headers targetted
- * at the roles currently being played by this SOAP node, see
- * <code>getRoles</code>.
- * @return An array of unmarshalled headers; returns an empty array if no
- * message is present in this message context or no headers match
- * the supplied qualified name.
- * @throws WebServiceException If an error occurs when using the supplied
- * <code>JAXBContext</code> to unmarshall. The cause of
- * the <code>WebServiceException</code> is the original <code>JAXBException</code>.
- **/
- public Object[] getHeaders(QName header, JAXBContext context,
- boolean allRoles);
-
- /** Gets the SOAP actor roles associated with an execution
- * of the handler chain.
- * Note that SOAP actor roles apply to the SOAP node and
- * are managed using {@link javax.xml.ws.soap.SOAPBinding#setRoles} and
- * {@link javax.xml.ws.soap.SOAPBinding#getRoles}. <code>Handler</code> instances in
- * the handler chain use this information about the SOAP actor
- * roles to process the SOAP header blocks. Note that the
- * SOAP actor roles are invariant during the processing of
- * SOAP message through the handler chain.
- *
- * @return Array of <code>String</code> for SOAP actor roles
- **/
- public Set<String> getRoles();
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/handler/soap/package.html b/src/share/jaxws_classes/javax/xml/ws/handler/soap/package.html
deleted file mode 100644
index 9dd4fec1..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/handler/soap/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-<body>
-This package defines APIs for SOAP message handlers.
-</body>
-</html>
diff --git a/src/share/jaxws_classes/javax/xml/ws/http/HTTPBinding.java b/src/share/jaxws_classes/javax/xml/ws/http/HTTPBinding.java
deleted file mode 100644
index 553738ee..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/http/HTTPBinding.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.http;
-
-
-import javax.xml.ws.Binding;
-
-/** The <code>HTTPBinding</code> interface is an
- * abstraction for the XML/HTTP binding.
- *
- * @since JAX-WS 2.0
-**/
-public interface HTTPBinding extends Binding {
-
- /**
- * A constant representing the identity of the XML/HTTP binding.
- */
- public static final String HTTP_BINDING = "http://www.w3.org/2004/08/wsdl/http";
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/http/HTTPException.java b/src/share/jaxws_classes/javax/xml/ws/http/HTTPException.java
deleted file mode 100644
index d3cb4b74..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/http/HTTPException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.http;
-
-
-/** The <code>HTTPException</code> exception represents a
- * XML/HTTP fault.
- *
- * <p>Since there is no standard format for faults or exceptions
- * in XML/HTTP messaging, only the HTTP status code is captured.
- *
- * @since JAX-WS 2.0
-**/
-public class HTTPException extends javax.xml.ws.ProtocolException {
-
- private int statusCode;
-
- /** Constructor for the HTTPException
- * @param statusCode <code>int</code> for the HTTP status code
- **/
- public HTTPException(int statusCode) {
- super();
- this.statusCode = statusCode;
- }
-
- /** Gets the HTTP status code.
- *
- * @return HTTP status code
- **/
- public int getStatusCode() {
- return statusCode;
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/http/package.html b/src/share/jaxws_classes/javax/xml/ws/http/package.html
deleted file mode 100644
index 4fd32bd4..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/http/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-<body>
-This package defines APIs specific to the HTTP binding.
-</body>
-</html>
diff --git a/src/share/jaxws_classes/javax/xml/ws/package.html b/src/share/jaxws_classes/javax/xml/ws/package.html
deleted file mode 100644
index 95a91074..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-<body>
-This package contains the core JAX-WS APIs.
-</body>
-</html>
diff --git a/src/share/jaxws_classes/javax/xml/ws/soap/Addressing.java b/src/share/jaxws_classes/javax/xml/ws/soap/Addressing.java
deleted file mode 100644
index 26540061..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/soap/Addressing.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.soap;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.WebServiceRef;
-import javax.xml.ws.WebServiceRefs;
-import javax.xml.ws.WebServiceProvider;
-import javax.xml.ws.soap.AddressingFeature.Responses;
-import javax.xml.ws.spi.WebServiceFeatureAnnotation;
-
-/**
- * This annotation represents the use of WS-Addressing with either
- * the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding. Using this annotation
- * with any other binding is undefined.
- * <p>
- * This annotation MUST only be used in conjunction with the
- * {@link javax.jws.WebService}, {@link WebServiceProvider},
- * and {@link WebServiceRef} annotations.
- * When used with a <code>javax.jws.WebService</code> annotation, this
- * annotation MUST only be used on the service endpoint implementation
- * class.
- * When used with a <code>WebServiceRef</code> annotation, this annotation
- * MUST only be used when a proxy instance is created. The injected SEI
- * proxy, and endpoint MUST honor the values of the <code>Addressing</code>
- * annotation.
- * <p>
- * This annotation's behaviour is defined by the corresponding feature
- * {@link AddressingFeature}.
- *
- * @since JAX-WS 2.1
- */
-@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-@WebServiceFeatureAnnotation(id=AddressingFeature.ID,bean=AddressingFeature.class)
-public @interface Addressing {
- /**
- * Specifies if this feature is enabled or disabled. If enabled, it means
- * the endpoint supports WS-Addressing but does not require its use.
- * Corresponding
- * <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicyaddressing">
- * 3.1.1 Addressing Assertion</a> must be generated in the generated WSDL.
- */
- boolean enabled() default true;
-
- /**
- * If addressing is enabled, this property determines whether the endpoint
- * requires WS-Addressing. If required is true, the endpoint requires
- * WS-Addressing and WS-Addressing headers MUST
- * be present on incoming messages. A corresponding
- * <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicyaddressing">
- * 3.1.1 Addressing Assertion</a> must be generated in the WSDL.
- */
- boolean required() default false;
-
- /**
- * If addressing is enabled, this property determines whether endpoint
- * requires the use of anonymous responses, or non-anonymous responses,
- * or all.
- *
- * <p>
- * {@link Responses#ALL} supports all response types and this is the
- * default value.
- *
- * <p>
- * {@link Responses#ANONYMOUS} requires the use of only anonymous
- * responses. It will result into wsam:AnonymousResponses nested assertion
- * as specified in
- * <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicyanonresponses">
- * 3.1.2 AnonymousResponses Assertion</a> in the generated WSDL.
- *
- * <p>
- * {@link Responses#NON_ANONYMOUS} requires the use of only non-anonymous
- * responses. It will result into
- * wsam:NonAnonymousResponses nested assertion as specified in
- * <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicynonanonresponses">
- * 3.1.3 NonAnonymousResponses Assertion</a> in the generated WSDL.
- *
- * @since JAX-WS 2.2
- */
- Responses responses() default Responses.ALL;
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/soap/AddressingFeature.java b/src/share/jaxws_classes/javax/xml/ws/soap/AddressingFeature.java
deleted file mode 100644
index dfd95c73..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/soap/AddressingFeature.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.soap;
-
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.Endpoint;
-import javax.xml.ws.Service;
-
-/**
- * AddressingFeature represents the use of WS-Addressing with either
- * the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding. Using this feature
- * with any other binding is undefined.
- * <p>
- * This feature can be used during the creation of SEI proxy, and
- * {@link javax.xml.ws.Dispatch} instances on the client side and {@link Endpoint}
- * instances on the server side. This feature cannot be used for {@link Service}
- * instance creation on the client side.
- * <p>
- * The following describes the effects of this feature with respect
- * to be enabled or disabled:
- * <ul>
- * <li> ENABLED: In this Mode, WS-Addressing will be enabled. It means
- * the endpoint supports WS-Addressing but does not require its use.
- * A sender could send messages with WS-Addressing headers or without
- * WS-Addressing headers. But a receiver MUST consume both types of
- * messages.
- * <li> DISABLED: In this Mode, WS-Addressing will be disabled.
- * At runtime, WS-Addressing headers MUST NOT be used by a sender or
- * receiver.
- * </ul>
- * <p>
- * If the feature is enabled, the <code>required</code> property determines
- * whether the endpoint requires WS-Addressing. If it is set true,
- * WS-Addressing headers MUST be present on incoming and outgoing messages.
- * By default the <code>required</code> property is <code>false</code>.
- *
- * <p>
- * If the web service developer has not explicitly enabled this feature,
- * WSDL's wsam:Addressing policy assertion is used to find
- * the use of WS-Addressing. By using the feature explicitly, an application
- * overrides WSDL's indication of the use of WS-Addressing. In some cases,
- * this is really required. For example, if an application has implemented
- * WS-Addressing itself, it can use this feature to disable addressing. That
- * means a JAX-WS implementation doesn't consume or produce WS-Addressing
- * headers.
- *
- * <p>
- * If addressing is enabled, a corresponding wsam:Addressing policy assertion
- * must be generated in the WSDL as per
- * <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicyassertions">
- * 3.1 WS-Policy Assertions</a>
- *
- * <p>
- * <b>Example 1: </b>Possible Policy Assertion in the generated WSDL for
- * <code>&#64;Addressing</code>
- * <pre>
- * &lt;wsam:Addressing wsp:Optional="true">
- * &lt;wsp:Policy/>
- * &lt;/wsam:Addressing>
- * </pre>
- *
- * <p>
- * <b>Example 2: </b>Possible Policy Assertion in the generated WSDL for
- * <code>&#64;Addressing(required=true)</code>
- * <pre>
- * &lt;wsam:Addressing>
- * &lt;wsp:Policy/>
- * &lt;/wsam:Addressing>
- * </pre>
- *
- * <p>
- * <b>Example 3: </b>Possible Policy Assertion in the generated WSDL for
- * <code>&#64;Addressing(required=true, responses=Responses.ANONYMOUS)</code>
- * <pre>
- * &lt;wsam:Addressing>
- * &lt;wsp:Policy>
- * &lt;wsam:AnonymousResponses/>
- * &lt;/wsp:Policy>
- * &lt;/wsam:Addressing>
- * </pre>
- *
- * <p>
- * See <a href="http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/">
- * Web Services Addressing - Core</a>,
- * <a href="http://www.w3.org/TR/2006/REC-ws-addr-soap-20060509/">
- * Web Services Addressing 1.0 - SOAP Binding</a>,
- * and <a href="http://www.w3.org/TR/ws-addr-metadata/">
- * Web Services Addressing 1.0 - Metadata</a>
- * for more information on WS-Addressing.
- *
- * @see Addressing
- * @since JAX-WS 2.1
- */
-
-public final class AddressingFeature extends WebServiceFeature {
- /**
- * Constant value identifying the AddressingFeature
- */
- public static final String ID = "http://www.w3.org/2005/08/addressing/module";
-
- /**
- * If addressing is enabled, this property determines whether the endpoint
- * requires WS-Addressing. If required is true, WS-Addressing headers MUST
- * be present on incoming and outgoing messages.
- */
- // should be private final, keeping original modifier due to backwards compatibility
- protected boolean required;
-
- /**
- * If addressing is enabled, this property determines if endpoint requires
- * the use of only anonymous responses, or only non-anonymous responses, or all.
- *
- * <p>
- * {@link Responses#ALL} supports all response types and this is the default
- * value.
- *
- * <p>
- * {@link Responses#ANONYMOUS} requires the use of only anonymous
- * responses. It will result into wsam:AnonymousResponses nested assertion
- * as specified in
- * <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicyanonresponses">
- * 3.1.2 AnonymousResponses Assertion</a> in the generated WSDL.
- *
- * <p>
- * {@link Responses#NON_ANONYMOUS} requires the use of only non-anonymous
- * responses. It will result into
- * wsam:NonAnonymousResponses nested assertion as specified in
- * <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicynonanonresponses">
- * 3.1.3 NonAnonymousResponses Assertion</a> in the generated WSDL.
- *
- * @since JAX-WS 2.2
- */
- public enum Responses {
- /**
- * Specifies the use of only anonymous
- * responses. It will result into wsam:AnonymousResponses nested assertion
- * as specified in
- * <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicyanonresponses">
- * 3.1.2 AnonymousResponses Assertion</a> in the generated WSDL.
- */
- ANONYMOUS,
-
- /**
- * Specifies the use of only non-anonymous
- * responses. It will result into
- * wsam:NonAnonymousResponses nested assertion as specified in
- * <a href="http://www.w3.org/TR/ws-addr-metadata/#wspolicynonanonresponses">
- * 3.1.3 NonAnonymousResponses Assertion</a> in the generated WSDL.
- */
- NON_ANONYMOUS,
-
- /**
- * Supports all response types and this is the default
- */
- ALL
- }
-
- private final Responses responses;
-
- /**
- * Creates and configures an <code>AddressingFeature</code> with the
- * use of addressing requirements. The created feature enables
- * ws-addressing i.e. supports ws-addressing but doesn't require
- * its use. It is also configured to accept all the response types.
- */
- public AddressingFeature() {
- this(true, false, Responses.ALL);
- }
-
- /**
- * Creates and configures an <code>AddressingFeature</code> with the
- * use of addressing requirements. If <code>enabled</code> is true,
- * it enables ws-addressing i.e. supports ws-addressing but doesn't
- * require its use. It also configures to accept all the response types.
- *
- * @param enabled true enables ws-addressing i.e.ws-addressing
- * is supported but doesn't require its use
- */
- public AddressingFeature(boolean enabled) {
- this(enabled, false, Responses.ALL);
- }
-
- /**
- * Creates and configures an <code>AddressingFeature</code> with the
- * use of addressing requirements. If <code>enabled</code> and
- * <code>required</code> are true, it enables ws-addressing and
- * requires its use. It also configures to accept all the response types.
- *
- * @param enabled true enables ws-addressing i.e.ws-addressing
- * is supported but doesn't require its use
- * @param required true means requires the use of ws-addressing .
- */
- public AddressingFeature(boolean enabled, boolean required) {
- this(enabled, required, Responses.ALL);
- }
-
- /**
- * Creates and configures an <code>AddressingFeature</code> with the
- * use of addressing requirements. If <code>enabled</code> and
- * <code>required</code> are true, it enables ws-addressing and
- * requires its use. Also, the response types can be configured using
- * <code>responses</code> parameter.
- *
- * @param enabled true enables ws-addressing i.e.ws-addressing
- * is supported but doesn't require its use
- * @param required true means requires the use of ws-addressing .
- * @param responses specifies what type of responses are required
- *
- * @since JAX-WS 2.2
- */
- public AddressingFeature(boolean enabled, boolean required, Responses responses) {
- this.enabled = enabled;
- this.required = required;
- this.responses = responses;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getID() {
- return ID;
- }
-
- /**
- * If addressing is enabled, this property determines whether the endpoint
- * requires WS-Addressing. If required is true, WS-Addressing headers MUST
- * be present on incoming and outgoing messages.
- *
- * @return the current required value
- */
- public boolean isRequired() {
- return required;
- }
-
- /**
- * If addressing is enabled, this property determines whether endpoint
- * requires the use of anonymous responses, or non-anonymous responses,
- * or all responses.
- *
- * <p>
- * @return {@link Responses#ALL} when endpoint supports all types of
- * responses,
- * {@link Responses#ANONYMOUS} when endpoint requires the use of
- * only anonymous responses,
- * {@link Responses#NON_ANONYMOUS} when endpoint requires the use
- * of only non-anonymous responses
- *
- * @since JAX-WS 2.2
- */
- public Responses getResponses() {
- return responses;
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/soap/MTOM.java b/src/share/jaxws_classes/javax/xml/ws/soap/MTOM.java
deleted file mode 100644
index bf3e7b89..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/soap/MTOM.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.soap;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-import javax.xml.ws.spi.WebServiceFeatureAnnotation;
-import javax.xml.ws.WebServiceRef;
-import javax.xml.ws.WebServiceProvider;
-
-/**
- * This feature represents the use of MTOM with a
- * web service.
- * <p>
- * This annotation MUST only be used in conjunction the
- * <code>javax.jws.WebService</code>, {@link WebServiceProvider},
- * {@link WebServiceRef} annotations.
- * When used with the <code>javax.jws.WebService</code> annotation this
- * annotation MUST only be used on the service endpoint implementation
- * class.
- * When used with a <code>WebServiceRef</code> annotation, this annotation
- * MUST only be used when a proxy instance is created. The injected SEI
- * proxy, and endpoint MUST honor the values of the <code>MTOM</code>
- * annotation.
- * <p>
- *
- * This annotation's behaviour is defined by the corresponding feature
- * {@link MTOMFeature}.
- *
- * @since JAX-WS 2.1
- */
-@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-@WebServiceFeatureAnnotation(id=MTOMFeature.ID,bean=MTOMFeature.class)
-public @interface MTOM {
- /**
- * Specifies if this feature is enabled or disabled.
- */
- boolean enabled() default true;
-
- /**
- * Property for MTOM threshold value. When MTOM is enabled, binary data above this
- * size in bytes will be XOP encoded or sent as attachment. The value of this property
- * MUST always be >= 0. Default value is 0.
- */
- int threshold() default 0;
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/soap/MTOMFeature.java b/src/share/jaxws_classes/javax/xml/ws/soap/MTOMFeature.java
deleted file mode 100644
index a9581070..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/soap/MTOMFeature.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.soap;
-
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.Endpoint;
-import javax.xml.ws.Service;
-
-/**
- * This feature represents the use of MTOM with a
- * web service.
- *
- * This feature can be used during the creation of SEI proxy, and
- * {@link javax.xml.ws.Dispatch} instances on the client side and {@link Endpoint}
- * instances on the server side. This feature cannot be used for {@link Service}
- * instance creation on the client side.
- *
- * <p>
- * The following describes the affects of this feature with respect
- * to being enabled or disabled:
- * <ul>
- * <li> ENABLED: In this Mode, MTOM will be enabled. A receiver MUST accept
- * both a non-optimized and an optimized message, and a sender MAY send an
- * optimized message, or a non-optimized message. The heuristics used by a
- * sender to determine whether to use optimization or not are
- * implementation-specific.
- * <li> DISABLED: In this Mode, MTOM will be disabled
- * </ul>
- * <p>
- * The {@link #threshold} property can be used to set the threshold
- * value used to determine when binary data should be XOP encoded.
- *
- * @since JAX-WS 2.1
- */
-public final class MTOMFeature extends WebServiceFeature {
- /**
- * Constant value identifying the MTOMFeature
- */
- public static final String ID = "http://www.w3.org/2004/08/soap/features/http-optimization";
-
-
- /**
- * Property for MTOM threshold value. This property serves as a hint when
- * MTOM is enabled, binary data above this size in bytes SHOULD be sent
- * as attachment.
- * The value of this property MUST always be >= 0. Default value is 0.
- */
- // should be changed to private final, keeping original modifier to keep backwards compatibility
- protected int threshold;
-
-
- /**
- * Create an <code>MTOMFeature</code>.
- * The instance created will be enabled.
- */
- public MTOMFeature() {
- this.enabled = true;
- this.threshold = 0;
- }
-
- /**
- * Creates an <code>MTOMFeature</code>.
- *
- * @param enabled specifies if this feature should be enabled or not
- */
- public MTOMFeature(boolean enabled) {
- this.enabled = enabled;
- this.threshold = 0;
- }
-
-
- /**
- * Creates an <code>MTOMFeature</code>.
- * The instance created will be enabled.
- *
- * @param threshold the size in bytes that binary data SHOULD be before
- * being sent as an attachment.
- *
- * @throws WebServiceException if threshold is < 0
- */
- public MTOMFeature(int threshold) {
- if (threshold < 0)
- throw new WebServiceException("MTOMFeature.threshold must be >= 0, actual value: "+threshold);
- this.enabled = true;
- this.threshold = threshold;
- }
-
- /**
- * Creates an <code>MTOMFeature</code>.
- *
- * @param enabled specifies if this feature should be enabled or not
- * @param threshold the size in bytes that binary data SHOULD be before
- * being sent as an attachment.
- *
- * @throws WebServiceException if threshold is < 0
- */
- public MTOMFeature(boolean enabled, int threshold) {
- if (threshold < 0)
- throw new WebServiceException("MTOMFeature.threshold must be >= 0, actual value: "+threshold);
- this.enabled = enabled;
- this.threshold = threshold;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getID() {
- return ID;
- }
-
- /**
- * Gets the threshold value used to determine when binary data
- * should be sent as an attachment.
- *
- * @return the current threshold size in bytes
- */
- public int getThreshold() {
- return threshold;
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/soap/SOAPBinding.java b/src/share/jaxws_classes/javax/xml/ws/soap/SOAPBinding.java
deleted file mode 100644
index cba59c8c..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/soap/SOAPBinding.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.soap;
-
-
-import java.util.Set;
-import javax.xml.ws.Binding;
-import javax.xml.soap.SOAPFactory;
-import javax.xml.soap.MessageFactory;
-
-/** The <code>SOAPBinding</code> interface is an abstraction for
- * the SOAP binding.
- *
- * @since JAX-WS 2.0
-**/
-public interface SOAPBinding extends Binding {
-
- /**
- * A constant representing the identity of the SOAP 1.1 over HTTP binding.
- */
- public static final String SOAP11HTTP_BINDING = "http://schemas.xmlsoap.org/wsdl/soap/http";
-
- /**
- * A constant representing the identity of the SOAP 1.2 over HTTP binding.
- */
- public static final String SOAP12HTTP_BINDING = "http://www.w3.org/2003/05/soap/bindings/HTTP/";
-
- /**
- * A constant representing the identity of the SOAP 1.1 over HTTP binding
- * with MTOM enabled by default.
- */
- public static final String SOAP11HTTP_MTOM_BINDING = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true";
-
- /**
- * A constant representing the identity of the SOAP 1.2 over HTTP binding
- * with MTOM enabled by default.
- */
- public static final String SOAP12HTTP_MTOM_BINDING = "http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true";
-
-
- /** Gets the roles played by the SOAP binding instance.
- *
- * @return Set&lt;String> The set of roles played by the binding instance.
- **/
- public Set<String> getRoles();
-
- /** Sets the roles played by the SOAP binding instance.
- *
- * @param roles The set of roles played by the binding instance.
- * @throws WebServiceException On an error in the configuration of
- * the list of roles.
- **/
- public void setRoles(Set<String> roles);
-
- /**
- * Returns <code>true</code> if the use of MTOM is enabled.
- *
- * @return <code>true</code> if and only if the use of MTOM is enabled.
- **/
-
- public boolean isMTOMEnabled();
-
- /**
- * Enables or disables use of MTOM.
- *
- * @param flag A <code>boolean</code> specifying whether the use of MTOM should
- * be enabled or disabled.
- * @throws WebServiceException If the specified setting is not supported
- * by this binding instance.
- *
- **/
- public void setMTOMEnabled(boolean flag);
-
- /**
- * Gets the SAAJ <code>SOAPFactory</code> instance used by this SOAP binding.
- *
- * @return SOAPFactory instance used by this SOAP binding.
- **/
- public SOAPFactory getSOAPFactory();
-
- /**
- * Gets the SAAJ <code>MessageFactory</code> instance used by this SOAP binding.
- *
- * @return MessageFactory instance used by this SOAP binding.
- **/
- public MessageFactory getMessageFactory();
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/soap/SOAPFaultException.java b/src/share/jaxws_classes/javax/xml/ws/soap/SOAPFaultException.java
deleted file mode 100644
index 3c25c37c..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/soap/SOAPFaultException.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.soap;
-
-import javax.xml.soap.SOAPFault;
-
-/** The <code>SOAPFaultException</code> exception represents a
- * SOAP 1.1 or 1.2 fault.
- *
- * <p>A <code>SOAPFaultException</code> wraps a SAAJ <code>SOAPFault</code>
- * that manages the SOAP-specific representation of faults.
- * The <code>createFault</code> method of
- * <code>javax.xml.soap.SOAPFactory</code> may be used to create an instance
- * of <code>javax.xml.soap.SOAPFault</code> for use with the
- * constructor. <code>SOAPBinding</code> contains an accessor for the
- * <code>SOAPFactory</code> used by the binding instance.
- *
- * <p>Note that the value of <code>getFault</code> is the only part of the
- * exception used when searializing a SOAP fault.
- *
- * <p>Refer to the SOAP specification for a complete
- * description of SOAP faults.
- *
- * @see javax.xml.soap.SOAPFault
- * @see javax.xml.ws.soap.SOAPBinding#getSOAPFactory
- * @see javax.xml.ws.ProtocolException
- *
- * @since JAX-WS 2.0
- **/
-public class SOAPFaultException extends javax.xml.ws.ProtocolException {
-
- private SOAPFault fault;
-
- /** Constructor for SOAPFaultException
- * @param fault <code>SOAPFault</code> representing the fault
- *
- * @see javax.xml.soap.SOAPFactory#createFault
- **/
- public SOAPFaultException(SOAPFault fault) {
- super(fault.getFaultString());
- this.fault = fault;
- }
-
- /** Gets the embedded <code>SOAPFault</code> instance.
- *
- * @return <code>javax.xml.soap.SOAPFault</code> SOAP
- * fault element
- **/
- public javax.xml.soap.SOAPFault getFault() {
- return this.fault;
- }
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/soap/package.html b/src/share/jaxws_classes/javax/xml/ws/soap/package.html
deleted file mode 100644
index d486cdf4..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/soap/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-<body>
-This package defines APIs specific to the SOAP binding.
-</body>
-</html>
diff --git a/src/share/jaxws_classes/javax/xml/ws/spi/FactoryFinder.java b/src/share/jaxws_classes/javax/xml/ws/spi/FactoryFinder.java
deleted file mode 100644
index e4fb5e67..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/spi/FactoryFinder.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.spi;
-
-import java.io.*;
-
-import java.util.Properties;
-import javax.xml.ws.WebServiceException;
-
-class FactoryFinder {
-
- /**
- * Creates an instance of the specified class using the specified
- * <code>ClassLoader</code> object.
- *
- * @exception WebServiceException if the given class could not be found
- * or could not be instantiated
- */
- private static Object newInstance(String className,
- ClassLoader classLoader)
- {
- try {
- Class spiClass = safeLoadClass(className, classLoader);
- return spiClass.newInstance();
- } catch (ClassNotFoundException x) {
- throw new WebServiceException(
- "Provider " + className + " not found", x);
- } catch (Exception x) {
- throw new WebServiceException(
- "Provider " + className + " could not be instantiated: " + x,
- x);
- }
- }
-
- /**
- * Finds the implementation <code>Class</code> object for the given
- * factory name, or if that fails, finds the <code>Class</code> object
- * for the given fallback class name. The arguments supplied MUST be
- * used in order. If using the first argument is successful, the second
- * one will not be used.
- * <P>
- * This method is package private so that this code can be shared.
- *
- * @return the <code>Class</code> object of the specified message factory;
- * may not be <code>null</code>
- *
- * @param factoryId the name of the factory to find, which is
- * a system property
- * @param fallbackClassName the implementation class name, which is
- * to be used only if nothing else
- * is found; <code>null</code> to indicate that
- * there is no fallback class name
- * @exception WebServiceException if there is an error
- */
- static Object find(String factoryId, String fallbackClassName)
- {
- if (isOsgi()) {
- return lookupUsingOSGiServiceLoader(factoryId);
- }
- ClassLoader classLoader;
- try {
- classLoader = Thread.currentThread().getContextClassLoader();
- } catch (Exception x) {
- throw new WebServiceException(x.toString(), x);
- }
-
- String serviceId = "META-INF/services/" + factoryId;
- // try to find services in CLASSPATH
- BufferedReader rd = null;
- try {
- InputStream is;
- if (classLoader == null) {
- is=ClassLoader.getSystemResourceAsStream(serviceId);
- } else {
- is=classLoader.getResourceAsStream(serviceId);
- }
-
- if( is!=null ) {
- rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));
-
- String factoryClassName = rd.readLine();
-
- if (factoryClassName != null &&
- ! "".equals(factoryClassName)) {
- return newInstance(factoryClassName, classLoader);
- }
- }
- } catch( Exception ignored) {
- } finally {
- close(rd);
- }
-
-
- // try to read from $java.home/lib/jaxws.properties
- FileInputStream inStream = null;
- try {
- String javah=System.getProperty( "java.home" );
- String configFile = javah + File.separator +
- "lib" + File.separator + "jaxws.properties";
- File f=new File( configFile );
- if( f.exists()) {
- Properties props=new Properties();
- inStream = new FileInputStream(f);
- props.load(inStream);
- String factoryClassName = props.getProperty(factoryId);
- return newInstance(factoryClassName, classLoader);
- }
- } catch(Exception ignored) {
- } finally {
- close(inStream);
- }
-
- // Use the system property
- try {
- String systemProp =
- System.getProperty( factoryId );
- if( systemProp!=null) {
- return newInstance(systemProp, classLoader);
- }
- } catch (SecurityException ignored) {
- }
-
- if (fallbackClassName == null) {
- throw new WebServiceException(
- "Provider for " + factoryId + " cannot be found", null);
- }
-
- return newInstance(fallbackClassName, classLoader);
- }
-
- private static void close(Closeable closeable) {
- if (closeable != null) {
- try {
- closeable.close();
- } catch (IOException ignored) {
- }
- }
- }
-
-
- /**
- * Loads the class, provided that the calling thread has an access to the class being loaded.
- */
- private static Class safeLoadClass(String className, ClassLoader classLoader) throws ClassNotFoundException {
- try {
- // make sure that the current thread has an access to the package of the given name.
- SecurityManager s = System.getSecurityManager();
- if (s != null) {
- int i = className.lastIndexOf('.');
- if (i != -1) {
- s.checkPackageAccess(className.substring(0, i));
- }
- }
-
- if (classLoader == null)
- return Class.forName(className);
- else
- return classLoader.loadClass(className);
- } catch (SecurityException se) {
- // anyone can access the platform default factory class without permission
- if (Provider.DEFAULT_JAXWSPROVIDER.equals(className))
- return Class.forName(className);
- throw se;
- }
- }
-
- private static final String OSGI_SERVICE_LOADER_CLASS_NAME = "com.sun.org.glassfish.hk2.osgiresourcelocator.ServiceLoader";
-
- private static boolean isOsgi() {
- try {
- Class.forName(OSGI_SERVICE_LOADER_CLASS_NAME);
- return true;
- } catch (ClassNotFoundException ignored) {
- }
- return false;
- }
-
- private static Object lookupUsingOSGiServiceLoader(String factoryId) {
- try {
- // Use reflection to avoid having any dependendcy on ServiceLoader class
- Class serviceClass = Class.forName(factoryId);
- Class[] args = new Class[]{serviceClass};
- Class target = Class.forName(OSGI_SERVICE_LOADER_CLASS_NAME);
- java.lang.reflect.Method m = target.getMethod("lookupProviderInstances", Class.class);
- java.util.Iterator iter = ((Iterable) m.invoke(null, (Object[]) args)).iterator();
- return iter.hasNext() ? iter.next() : null;
- } catch (Exception ignored) {
- // log and continue
- return null;
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/spi/Invoker.java b/src/share/jaxws_classes/javax/xml/ws/spi/Invoker.java
deleted file mode 100644
index f2ee97db..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/spi/Invoker.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.spi;
-
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceFeature;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-
-/**
- * Invoker hides the detail of calling into application endpoint
- * implementation. Container hands over an implementation of Invoker
- * to JAX-WS runtime, and jax-ws runtime calls {@link #invoke}
- * for a web service invocation. Finally, Invoker does the actual
- * invocation of web service on endpoint instance.
- *
- * Container also injects the provided <code>WebServiceContext</code> and takes
- * care of invoking <code>javax.annotation.PostConstruct</code> methods,
- * if present, on the endpoint implementation.
- *
- * @see Provider#createEndpoint(String, Class, Invoker, WebServiceFeature...)
- * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
- */
-
-public abstract class Invoker {
-
- /**
- * JAX-WS runtimes calls this method to ask container to inject
- * WebServiceContext on the endpoint instance. The
- * <code>WebServiceContext</code> object uses thread-local information
- * to return the correct information during the actual endpoint invocation
- * regardless of how many threads are concurrently being used to serve
- * requests.
- *
- * @param webServiceContext a holder for MessageContext
- * @throws IllegalAccessException if the injection done
- * by reflection API throws this exception
- * @throws IllegalArgumentException if the injection done
- * by reflection API throws this exception
- * @throws InvocationTargetException if the injection done
- * by reflection API throws this exception
- */
- public abstract void inject(WebServiceContext webServiceContext)
- throws IllegalAccessException, IllegalArgumentException, InvocationTargetException;
-
- /**
- * JAX-WS runtime calls this method to do the actual web service
- * invocation on endpoint instance. The injected
- * <code>WebServiceContext.getMessageContext()</code> gives the correct
- * information for this invocation.
- *
- * @param m Method to be invoked on the service
- * @param args Method arguments
- * @return return value of the method
- * @throws IllegalAccessException if the invocation done
- * by reflection API throws this exception
- * @throws IllegalArgumentException if the invocation done
- * by reflection API throws this exception
- * @throws InvocationTargetException if the invocation done
- * by reflection API throws this exception
-
- * @see Method#invoke
- */
- public abstract Object invoke(Method m, Object... args)
- throws IllegalAccessException, IllegalArgumentException, InvocationTargetException;
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/spi/Provider.java b/src/share/jaxws_classes/javax/xml/ws/spi/Provider.java
deleted file mode 100644
index 0333c65c..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/spi/Provider.java
+++ /dev/null
@@ -1,521 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.spi;
-
-import java.net.URL;
-import java.util.List;
-import java.util.Iterator;
-import java.util.Map;
-import java.lang.reflect.Method;
-import javax.xml.namespace.QName;
-import javax.xml.ws.*;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-import org.w3c.dom.Element;
-
-/**
- * Service provider for <code>ServiceDelegate</code> and
- * <code>Endpoint</code> objects.
- * <p>
- *
- * @since JAX-WS 2.0
- */
-public abstract class Provider {
-
- /**
- * A constant representing the property used to lookup the
- * name of a <code>Provider</code> implementation
- * class.
- */
- static public final String JAXWSPROVIDER_PROPERTY
- = "javax.xml.ws.spi.Provider";
-
- /**
- * A constant representing the name of the default
- * <code>Provider</code> implementation class.
- **/
- // Using two strings so that package renaming doesn't change it
- static final String DEFAULT_JAXWSPROVIDER
- = "com.sun"+".xml.internal.ws.spi.ProviderImpl";
-
- /**
- * Take advantage of Java SE 6's java.util.ServiceLoader API.
- * Using reflection so that there is no compile-time dependency on SE 6.
- */
- static private final Method loadMethod;
- static private final Method iteratorMethod;
- static {
- Method tLoadMethod = null;
- Method tIteratorMethod = null;
- try {
- Class<?> clazz = Class.forName("java.util.ServiceLoader");
- tLoadMethod = clazz.getMethod("load", Class.class);
- tIteratorMethod = clazz.getMethod("iterator");
- } catch(ClassNotFoundException ce) {
- // Running on Java SE 5
- } catch(NoSuchMethodException ne) {
- // Shouldn't happen
- }
- loadMethod = tLoadMethod;
- iteratorMethod = tIteratorMethod;
- }
-
-
- /**
- * Creates a new instance of Provider
- */
- protected Provider() {
- }
-
- /**
- *
- * Creates a new provider object.
- * <p>
- * The algorithm used to locate the provider subclass to use consists
- * of the following steps:
- * <p>
- * <ul>
- * <li>
- * If a resource with the name of
- * <code>META-INF/services/javax.xml.ws.spi.Provider</code>
- * exists, then its first line, if present, is used as the UTF-8 encoded
- * name of the implementation class.
- * </li>
- * <li>
- * If the $java.home/lib/jaxws.properties file exists and it is readable by
- * the <code>java.util.Properties.load(InputStream)</code> method and it contains
- * an entry whose key is <code>javax.xml.ws.spi.Provider</code>, then the value of
- * that entry is used as the name of the implementation class.
- * </li>
- * <li>
- * If a system property with the name <code>javax.xml.ws.spi.Provider</code>
- * is defined, then its value is used as the name of the implementation class.
- * </li>
- * <li>
- * Finally, a default implementation class name is used.
- * </li>
- * </ul>
- *
- */
- public static Provider provider() {
- try {
- Object provider = getProviderUsingServiceLoader();
- if (provider == null) {
- provider = FactoryFinder.find(JAXWSPROVIDER_PROPERTY, DEFAULT_JAXWSPROVIDER);
- }
- if (!(provider instanceof Provider)) {
- Class pClass = Provider.class;
- String classnameAsResource = pClass.getName().replace('.', '/') + ".class";
- ClassLoader loader = pClass.getClassLoader();
- if(loader == null) {
- loader = ClassLoader.getSystemClassLoader();
- }
- URL targetTypeURL = loader.getResource(classnameAsResource);
- throw new LinkageError("ClassCastException: attempting to cast" +
- provider.getClass().getClassLoader().getResource(classnameAsResource) +
- "to" + targetTypeURL.toString() );
- }
- return (Provider) provider;
- } catch (WebServiceException ex) {
- throw ex;
- } catch (Exception ex) {
- throw new WebServiceException("Unable to createEndpointReference Provider", ex);
- }
- }
-
-
- private static Provider getProviderUsingServiceLoader() {
- if (loadMethod != null) {
- Object loader;
- try {
- loader = loadMethod.invoke(null, Provider.class);
- } catch (Exception e) {
- throw new WebServiceException("Cannot invoke java.util.ServiceLoader#load()", e);
- }
-
- Iterator<Provider> it;
- try {
- it = (Iterator<Provider>)iteratorMethod.invoke(loader);
- } catch(Exception e) {
- throw new WebServiceException("Cannot invoke java.util.ServiceLoader#iterator()", e);
- }
- return it.hasNext() ? it.next() : null;
- }
- return null;
- }
-
- /**
- * Creates a service delegate object.
- * <p>
- * @param wsdlDocumentLocation A URL pointing to the WSDL document
- * for the service, or <code>null</code> if there isn't one.
- * @param serviceName The qualified name of the service.
- * @param serviceClass The service class, which MUST be either
- * <code>javax.xml.ws.Service</code> or a subclass thereof.
- * @return The newly created service delegate.
- */
- public abstract ServiceDelegate createServiceDelegate(
- java.net.URL wsdlDocumentLocation,
- QName serviceName, Class<? extends Service> serviceClass);
-
- /**
- * Creates a service delegate object.
- * <p>
- * @param wsdlDocumentLocation A URL pointing to the WSDL document
- * for the service, or <code>null</code> if there isn't one.
- * @param serviceName The qualified name of the service.
- * @param serviceClass The service class, which MUST be either
- * <code>javax.xml.ws.Service</code> or a subclass thereof.
- * @param features Web Service features that must be configured on
- * the service. If the provider doesn't understand a feature,
- * it must throw a WebServiceException.
- * @return The newly created service delegate.
- *
- * @since JAX-WS 2.2
- */
- public ServiceDelegate createServiceDelegate(
- java.net.URL wsdlDocumentLocation,
- QName serviceName, Class<? extends Service> serviceClass, WebServiceFeature ... features) {
- throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
- }
-
-
- /**
- *
- * Creates an endpoint object with the provided binding and implementation
- * object.
- *
- * @param bindingId A URI specifying the desired binding (e.g. SOAP/HTTP)
- * @param implementor A service implementation object to which
- * incoming requests will be dispatched. The corresponding
- * class MUST be annotated with all the necessary Web service
- * annotations.
- * @return The newly created endpoint.
- */
- public abstract Endpoint createEndpoint(String bindingId,
- Object implementor);
-
-
- /**
- * Creates and publishes an endpoint object with the specified
- * address and implementation object.
- *
- * @param address A URI specifying the address and transport/protocol
- * to use. A http: URI MUST result in the SOAP 1.1/HTTP
- * binding being used. Implementations may support other
- * URI schemes.
- * @param implementor A service implementation object to which
- * incoming requests will be dispatched. The corresponding
- * class MUST be annotated with all the necessary Web service
- * annotations.
- * @return The newly created endpoint.
- */
- public abstract Endpoint createAndPublishEndpoint(String address,
- Object implementor);
-
- /**
- * read an EndpointReference from the infoset contained in
- * <code>eprInfoset</code>.
- *
- * @param eprInfoset infoset for EndpointReference
- *
- * @return the <code>EndpointReference</code> unmarshalled from
- * <code>eprInfoset</code>. This method never returns <code>null</code>.
- *
- * @throws WebServiceException If there is an error creating the
- * <code>EndpointReference</code> from the specified <code>eprInfoset</code>.
- *
- * @throws NullPointerException If the <code>null</code>
- * <code>eprInfoset</code> value is given.
- *
- * @since JAX-WS 2.1
- **/
- public abstract EndpointReference readEndpointReference(javax.xml.transform.Source eprInfoset);
-
-
- /**
- * The getPort method returns a proxy. If there
- * are any reference parameters in the
- * <code>endpointReference</code>, then those reference
- * parameters MUST appear as SOAP headers, indicating them to be
- * reference parameters, on all messages sent to the endpoint.
- * The parameter <code>serviceEndpointInterface</code> specifies
- * the service endpoint interface that is supported by the
- * returned proxy.
- * The parameter <code>endpointReference</code> specifies the
- * endpoint that will be invoked by the returned proxy.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the proxy accordingly from
- * the WSDL metadata of the
- * <code>serviceEndpointInterface</code> and the <code>EndpointReference</code>.
- * For this method
- * to successfully return a proxy, WSDL metadata MUST be available and the
- * <code>endpointReference</code> MUST contain an implementation understood
- * <code>serviceName</code> metadata.
- *
- *
- * @param endpointReference the EndpointReference that will
- * be invoked by the returned proxy.
- * @param serviceEndpointInterface Service endpoint interface
- * @param features A list of WebServiceFeatures to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return Object Proxy instance that supports the
- * specified service endpoint interface
- * @throws WebServiceException
- * <UL>
- * <LI>If there is an error during creation
- * of the proxy
- * <LI>If there is any missing WSDL metadata
- * as required by this method}
- * <LI>If this
- * <code>endpointReference</code>
- * is illegal
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * is specified
- * <LI>If a feature is enabled that is not compatible with
- * this port or is unsupported.
- * </UL>
- *
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public abstract <T> T getPort(EndpointReference endpointReference,
- Class<T> serviceEndpointInterface,
- WebServiceFeature... features);
-
- /**
- * Factory method to create a <code>W3CEndpointReference</code>.
- *
- * <p>
- * This method can be used to create a <code>W3CEndpointReference</code>
- * for any endpoint by specifying the <code>address</code> property along
- * with any other desired properties. This method
- * can also be used to create a <code>W3CEndpointReference</code> for
- * an endpoint that is published by the same Java EE application.
- * To do so the <code>address</code> property can be provided or this
- * method can automatically determine the <code>address</code> of
- * an endpoint that is published by the same Java EE application and is
- * identified by the <code>serviceName</code> and
- * <code>portName</code> propeties. If the <code>address</code> is
- * <code>null</code> and the <code>serviceName</code> and
- * <code>portName</code> do not identify an endpoint published by the
- * same Java EE application, a
- * <code>javax.lang.IllegalStateException</code> MUST be thrown.
- *
- * @param address Specifies the address of the target endpoint
- * @param serviceName Qualified name of the service in the WSDL.
- * @param portName Qualified name of the endpoint in the WSDL.
- * @param metadata A list of elements that should be added to the
- * <code>W3CEndpointReference</code> instances <code>wsa:metadata</code>
- * element.
- * @param wsdlDocumentLocation URL for the WSDL document location for
- * the service.
- * @param referenceParameters Reference parameters to be associated
- * with the returned <code>EndpointReference</code> instance.
- *
- * @return the <code>W3CEndpointReference</code> created from
- * <code>serviceName</code>, <code>portName</code>,
- * <code>metadata</code>, <code>wsdlDocumentLocation</code>
- * and <code>referenceParameters</code>. This method
- * never returns <code>null</code>.
- *
- * @throws java.lang.IllegalStateException
- * <ul>
- * <li>If the <code>address</code>, <code>serviceName</code> and
- * <code>portName</code> are all <code>null</code>.
- * <li>If the <code>serviceName</code> service is <code>null</code> and the
- * <code>portName</code> is NOT <code>null</code>.
- * <li>If the <code>address</code> property is <code>null</code> and
- * the <code>serviceName</code> and <code>portName</code> do not
- * specify a valid endpoint published by the same Java EE
- * application.
- * <li>If the <code>serviceName</code>is NOT <code>null</code>
- * and is not present in the specified WSDL.
- * <li>If the <code>portName</code> port is not <code>null</code> and it
- * is not present in <code>serviceName</code> service in the WSDL.
- * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code>
- * and does not represent a valid WSDL.
- * </ul>
- * @throws WebServiceException If an error occurs while creating the
- * <code>W3CEndpointReference</code>.
- *
- * @since JAX-WS 2.1
- */
- public abstract W3CEndpointReference createW3CEndpointReference(String address, QName serviceName, QName portName,
- List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters);
-
-
- /**
- * Factory method to create a <code>W3CEndpointReference</code>.
- * Using this method, a <code>W3CEndpointReference</code> instance
- * can be created with extension elements, and attributes.
- * <code>Provider</code> implementations must override the default
- * implementation.
- *
- * <p>
- * This method can be used to create a <code>W3CEndpointReference</code>
- * for any endpoint by specifying the <code>address</code> property along
- * with any other desired properties. This method
- * can also be used to create a <code>W3CEndpointReference</code> for
- * an endpoint that is published by the same Java EE application.
- * To do so the <code>address</code> property can be provided or this
- * method can automatically determine the <code>address</code> of
- * an endpoint that is published by the same Java EE application and is
- * identified by the <code>serviceName</code> and
- * <code>portName</code> propeties. If the <code>address</code> is
- * <code>null</code> and the <code>serviceName</code> and
- * <code>portName</code> do not identify an endpoint published by the
- * same Java EE application, a
- * <code>javax.lang.IllegalStateException</code> MUST be thrown.
- *
- * @param address Specifies the address of the target endpoint
- * @param interfaceName the <code>wsam:InterfaceName</code> element in the
- * <code>wsa:Metadata</code> element.
- * @param serviceName Qualified name of the service in the WSDL.
- * @param portName Qualified name of the endpoint in the WSDL.
- * @param metadata A list of elements that should be added to the
- * <code>W3CEndpointReference</code> instances <code>wsa:metadata</code>
- * element.
- * @param wsdlDocumentLocation URL for the WSDL document location for
- * the service.
- * @param referenceParameters Reference parameters to be associated
- * with the returned <code>EndpointReference</code> instance.
- * @param elements extension elements to be associated
- * with the returned <code>EndpointReference</code> instance.
- * @param attributes extension attributes to be associated
- * with the returned <code>EndpointReference</code> instance.
- *
- * @return the <code>W3CEndpointReference</code> created from
- * <code>serviceName</code>, <code>portName</code>,
- * <code>metadata</code>, <code>wsdlDocumentLocation</code>
- * and <code>referenceParameters</code>. This method
- * never returns <code>null</code>.
- *
- * @throws java.lang.IllegalStateException
- * <ul>
- * <li>If the <code>address</code>, <code>serviceName</code> and
- * <code>portName</code> are all <code>null</code>.
- * <li>If the <code>serviceName</code> service is <code>null</code> and the
- * <code>portName</code> is NOT <code>null</code>.
- * <li>If the <code>address</code> property is <code>null</code> and
- * the <code>serviceName</code> and <code>portName</code> do not
- * specify a valid endpoint published by the same Java EE
- * application.
- * <li>If the <code>serviceName</code>is NOT <code>null</code>
- * and is not present in the specified WSDL.
- * <li>If the <code>portName</code> port is not <code>null</code> and it
- * is not present in <code>serviceName</code> service in the WSDL.
- * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code>
- * and does not represent a valid WSDL.
- * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> but
- * wsdli:wsdlLocation's namespace name cannot be got from the available
- * metadata.
- * </ul>
- * @throws WebServiceException If an error occurs while creating the
- * <code>W3CEndpointReference</code>.
- * @since JAX-WS 2.2
- */
- public W3CEndpointReference createW3CEndpointReference(String address,
- QName interfaceName, QName serviceName, QName portName,
- List<Element> metadata, String wsdlDocumentLocation, List<Element> referenceParameters,
- List<Element> elements, Map<QName, String> attributes) {
- throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
- }
-
- /**
- * Creates and publishes an endpoint object with the specified
- * address, implementation object and web service features.
- * <code>Provider</code> implementations must override the
- * default implementation.
- *
- * @param address A URI specifying the address and transport/protocol
- * to use. A http: URI MUST result in the SOAP 1.1/HTTP
- * binding being used. Implementations may support other
- * URI schemes.
- * @param implementor A service implementation object to which
- * incoming requests will be dispatched. The corresponding
- * class MUST be annotated with all the necessary Web service
- * annotations.
- * @param features A list of WebServiceFeatures to configure on the
- * endpoint. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return The newly created endpoint.
- * @since JAX-WS 2.2
- */
- public Endpoint createAndPublishEndpoint(String address,
- Object implementor, WebServiceFeature ... features) {
- throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
- }
-
- /**
- * Creates an endpoint object with the provided binding, implementation
- * object and web service features. <code>Provider</code> implementations
- * must override the default implementation.
- *
- * @param bindingId A URI specifying the desired binding (e.g. SOAP/HTTP)
- * @param implementor A service implementation object to which
- * incoming requests will be dispatched. The corresponding
- * class MUST be annotated with all the necessary Web service
- * annotations.
- * @param features A list of WebServiceFeatures to configure on the
- * endpoint. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return The newly created endpoint.
- * @since JAX-WS 2.2
- */
- public Endpoint createEndpoint(String bindingId, Object implementor,
- WebServiceFeature ... features) {
- throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
- }
-
- /**
- * Creates an endpoint object with the provided binding, implementation
- * class, invoker and web service features. Containers typically use
- * this to create Endpoint objects. <code>Provider</code>
- * implementations must override the default implementation.
- *
- * @param bindingId A URI specifying the desired binding (e.g. SOAP/HTTP).
- * Can be null.
- * @param implementorClass A service implementation class that
- * MUST be annotated with all the necessary Web service
- * annotations.
- * @param invoker that does the actual invocation on the service instance.
- * @param features A list of WebServiceFeatures to configure on the
- * endpoint. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return The newly created endpoint.
- * @since JAX-WS 2.2
- */
- public Endpoint createEndpoint(String bindingId, Class<?> implementorClass,
- Invoker invoker, WebServiceFeature ... features) {
- throw new UnsupportedOperationException("JAX-WS 2.2 implementation must override this default behaviour.");
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/spi/ServiceDelegate.java b/src/share/jaxws_classes/javax/xml/ws/spi/ServiceDelegate.java
deleted file mode 100644
index 57c602b0..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/spi/ServiceDelegate.java
+++ /dev/null
@@ -1,622 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.spi;
-
-import java.util.Iterator;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.Service;
-import javax.xml.ws.handler.HandlerResolver;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.bind.JAXBContext;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceException;
-
-
-/**
- * Service delegates are used internally by <code>Service</code> objects
- * to allow pluggability of JAX-WS implementations.
- * <p>
- * Every <code>Service</code> object has its own delegate, created using
- * the {@link javax.xml.ws.spi.Provider#createServiceDelegate} method. A <code>Service</code>
- * object delegates all of its instance methods to its delegate.
- *
- * @see javax.xml.ws.Service
- * @see javax.xml.ws.spi.Provider
- *
- * @since JAX-WS 2.0
- */
-public abstract class ServiceDelegate {
-
- protected ServiceDelegate() {
- }
-
- /**
- * The <code>getPort</code> method returns a proxy. A service client
- * uses this proxy to invoke operations on the target
- * service endpoint. The <code>serviceEndpointInterface</code>
- * specifies the service endpoint interface that is supported by
- * the created dynamic proxy instance.
- *
- * @param portName Qualified name of the service endpoint in
- * the WSDL service description
- * @param serviceEndpointInterface Service endpoint interface
- * supported by the dynamic proxy
- * @return Object Proxy instance that
- * supports the specified service endpoint
- * interface
- * @throws WebServiceException This exception is thrown in the
- * following cases:
- * <UL>
- * <LI>If there is an error in creation of
- * the proxy
- * <LI>If there is any missing WSDL metadata
- * as required by this method
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * or <code>portName</code> is specified
- * </UL>
- * @see java.lang.reflect.Proxy
- * @see java.lang.reflect.InvocationHandler
- **/
- public abstract <T> T getPort(QName portName,
- Class<T> serviceEndpointInterface);
-
- /**
- * The <code>getPort</code> method returns a proxy. A service client
- * uses this proxy to invoke operations on the target
- * service endpoint. The <code>serviceEndpointInterface</code>
- * specifies the service endpoint interface that is supported by
- * the created dynamic proxy instance.
- *
- * @param portName Qualified name of the service endpoint in
- * the WSDL service description
- * @param serviceEndpointInterface Service endpoint interface
- * supported by the dynamic proxy or instance
- * @param features A list of WebServiceFeatures to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return Object Proxy instance that
- * supports the specified service endpoint
- * interface
- * @throws WebServiceException This exception is thrown in the
- * following cases:
- * <UL>
- * <LI>If there is an error in creation of
- * the proxy
- * <LI>If there is any missing WSDL metadata
- * as required by this method
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * or <code>portName</code> is specified
- * <LI>If a feature is enabled that is not compatible
- * with this port or is unsupported.
- * </UL>
- * @see java.lang.reflect.Proxy
- * @see java.lang.reflect.InvocationHandler
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public abstract <T> T getPort(QName portName,
- Class<T> serviceEndpointInterface, WebServiceFeature... features);
-
- /**
- * The <code>getPort</code> method returns a proxy.
- * The parameter <code>endpointReference</code> specifies the
- * endpoint that will be invoked by the returned proxy. If there
- * are any reference parameters in the
- * <code>endpointReference</code>, then those reference
- * parameters MUST appear as SOAP headers, indicating them to be
- * reference parameters, on all messages sent to the endpoint.
- * The <code>endpointReference's</code> address MUST be used
- * for invocations on the endpoint.
- * The parameter <code>serviceEndpointInterface</code> specifies
- * the service endpoint interface that is supported by the
- * returned proxy.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the proxy accordingly from
- * the WSDL associated with this <code>Service</code> instance or
- * from the metadata from the <code>endpointReference</code>.
- * If this <code>Service</code> instance has a WSDL and
- * the <code>endpointReference</code> metadata
- * also has a WSDL, then the WSDL from this instance MUST be used.
- * If this <code>Service</code> instance does not have a WSDL and
- * the <code>endpointReference</code> does have a WSDL, then the
- * WSDL from the <code>endpointReference</code> MAY be used.
- * The returned proxy should not be reconfigured by the client.
- * If this <code>Service</code> instance has a known proxy
- * port that matches the information contained in
- * the WSDL,
- * then that proxy is returned, otherwise a WebServiceException
- * is thrown.
- * <p>
- * Calling this method has the same behavior as the following
- * <pre>
- * <code>port = service.getPort(portName, serviceEndpointInterface);</code>
- * </pre>
- * where the <code>portName</code> is retrieved from the
- * metadata of the <code>endpointReference</code> or from the
- * <code>serviceEndpointInterface</code> and the WSDL
- * associated with this <code>Service</code> instance.
- *
- * @param endpointReference The <code>EndpointReference</code>
- * for the target service endpoint that will be invoked by the
- * returned proxy.
- * @param serviceEndpointInterface Service endpoint interface.
- * @param features A list of <code>WebServiceFeatures</code> to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return Object Proxy instance that supports the
- * specified service endpoint interface.
- * @throws WebServiceException
- * <UL>
- * <LI>If there is an error during creation
- * of the proxy.
- * <LI>If there is any missing WSDL metadata
- * as required by this method.
- * <LI>If the <code>endpointReference</code> metadata does
- * not match the <code>serviceName</code> of this
- * <code>Service</code> instance.
- * <LI>If a <code>portName</code> cannot be extracted
- * from the WSDL or <code>endpointReference</code> metadata.
- * <LI>If an invalid
- * <code>endpointReference</code>
- * is specified.
- * <LI>If an invalid
- * <code>serviceEndpointInterface</code>
- * is specified.
- * <LI>If a feature is enabled that is not compatible
- * with this port or is unsupported.
- * </UL>
- *
- * @since JAX-WS 2.1
- **/
- public abstract <T> T getPort(EndpointReference endpointReference,
- Class<T> serviceEndpointInterface, WebServiceFeature... features);
-
-
- /**
- * The <code>getPort</code> method returns a proxy. The parameter
- * <code>serviceEndpointInterface</code> specifies the service
- * endpoint interface that is supported by the returned proxy.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the proxy accordingly.
- * The returned proxy should not be reconfigured by the client.
- *
- * @param serviceEndpointInterface Service endpoint interface
- * @return Object instance that supports the
- * specified service endpoint interface
- * @throws WebServiceException
- * <UL>
- * <LI>If there is an error during creation
- * of the proxy
- * <LI>If there is any missing WSDL metadata
- * as required by this method
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * is specified
- * </UL>
- **/
- public abstract <T> T getPort(Class<T> serviceEndpointInterface);
-
-
- /**
- * The <code>getPort</code> method returns a proxy. The parameter
- * <code>serviceEndpointInterface</code> specifies the service
- * endpoint interface that is supported by the returned proxy.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the proxy accordingly.
- * The returned proxy should not be reconfigured by the client.
- *
- * @param serviceEndpointInterface Service endpoint interface
- * @param features An array of <code>WebServiceFeatures</code> to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return Object instance that supports the
- * specified service endpoint interface
- * @throws WebServiceException
- * <UL>
- * <LI>If there is an error during creation
- * of the proxy
- * <LI>If there is any missing WSDL metadata
- * as required by this method
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * is specified
- * <LI>If a feature is enabled that is not compatible
- * with this port or is unsupported.
- * </UL>
- *
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public abstract <T> T getPort(Class<T> serviceEndpointInterface,
- WebServiceFeature... features);
-
-
- /**
- * Creates a new port for the service. Ports created in this way contain
- * no WSDL port type information and can only be used for creating
- * <code>Dispatch</code>instances.
- *
- * @param portName Qualified name for the target service endpoint
- * @param bindingId A URI identifier of a binding.
- * @param endpointAddress Address of the target service endpoint as a URI
- * @throws WebServiceException If any error in the creation of
- * the port
- *
- * @see javax.xml.ws.soap.SOAPBinding#SOAP11HTTP_BINDING
- * @see javax.xml.ws.soap.SOAPBinding#SOAP12HTTP_BINDING
- * @see javax.xml.ws.http.HTTPBinding#HTTP_BINDING
- **/
- public abstract void addPort(QName portName, String bindingId,
- String endpointAddress);
-
-
-
- /**
- * Creates a <code>Dispatch</code> instance for use with objects of
- * the user's choosing.
- *
- * @param portName Qualified name for the target service endpoint
- * @param type The class of object used for messages or message
- * payloads. Implementations are required to support
- * <code>javax.xml.transform.Source</code> and <code>javax.xml.soap.SOAPMessage</code>.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the user will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the user will work with
- * SOAP messages or the contents of a SOAP body. Mode MUST be <code>MESSAGE</code>
- * when type is <code>SOAPMessage</code>.
- *
- * @return Dispatch instance
- * @throws WebServiceException If any error in the creation of
- * the <code>Dispatch</code> object
- * @see javax.xml.transform.Source
- * @see javax.xml.soap.SOAPMessage
- **/
- public abstract <T> Dispatch<T> createDispatch(QName portName, Class<T> type,
- Service.Mode mode);
-
- /**
- * Creates a <code>Dispatch</code> instance for use with objects of
- * the user's choosing.
- *
- * @param portName Qualified name for the target service endpoint
- * @param type The class of object used for messages or message
- * payloads. Implementations are required to support
- * <code>javax.xml.transform.Source</code> and <code>javax.xml.soap.SOAPMessage</code>.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the user will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the user will work with
- * SOAP messages or the contents of a SOAP body. Mode MUST be <code>MESSAGE</code>
- * when type is <code>SOAPMessage</code>.
- * @param features A list of <code>WebServiceFeatures</code> to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- *
- * @return Dispatch instance
- * @throws WebServiceException If any error in the creation of
- * the <code>Dispatch</code> object or if a
- * feature is enabled that is not compatible with
- * this port or is unsupported.
- *
- * @see javax.xml.transform.Source
- * @see javax.xml.soap.SOAPMessage
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public abstract <T> Dispatch<T> createDispatch(QName portName, Class<T> type,
- Service.Mode mode, WebServiceFeature... features);
-
- /**
- * Creates a <code>Dispatch</code> instance for use with objects of
- * the user's choosing. If there
- * are any reference parameters in the
- * <code>endpointReference</code>, then those reference
- * parameters MUST appear as SOAP headers, indicating them to be
- * reference parameters, on all messages sent to the endpoint.
- * The <code>endpointReference's</code> address MUST be used
- * for invocations on the endpoint.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the dispatch accordingly from
- * the WSDL associated with this <code>Service</code> instance or
- * from the metadata from the <code>endpointReference</code>.
- * If this <code>Service</code> instance has a WSDL and
- * the <code>endpointReference</code>
- * also has a WSDL in its metadata, then the WSDL from this instance MUST be used.
- * If this <code>Service</code> instance does not have a WSDL and
- * the <code>endpointReference</code> does have a WSDL, then the
- * WSDL from the <code>endpointReference</code> MAY be used.
- * An implementation MUST be able to retrieve the <code>portName</code> from the
- * <code>endpointReference</code> metadata.
- * <p>
- * This method behaves the same as calling
- * <pre>
- * <code>dispatch = service.createDispatch(portName, type, mode, features);</code>
- * </pre>
- * where the <code>portName</code> is retrieved from the
- * WSDL or <code>EndpointReference</code> metadata.
- *
- * @param endpointReference The <code>EndpointReference</code>
- * for the target service endpoint that will be invoked by the
- * returned <code>Dispatch</code> object.
- * @param type The class of object used to messages or message
- * payloads. Implementations are required to support
- * <code>javax.xml.transform.Source</code> and <code>javax.xml.soap.SOAPMessage</code>.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the user will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the user will work with
- * SOAP messages or the contents of a SOAP body. Mode MUST be <code>MESSAGE</code>
- * when type is <code>SOAPMessage</code>.
- * @param features An array of <code>WebServiceFeatures</code> to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- *
- * @return Dispatch instance
- * @throws WebServiceException
- * <UL>
- * <LI>If there is any missing WSDL metadata
- * as required by this method.
- * <li>If the <code>endpointReference</code> metadata does
- * not match the <code>serviceName</code> or <code>portName</code>
- * of a WSDL associated
- * with this <code>Service</code> instance.
- * <li>If the <code>portName</code> cannot be determined
- * from the <code>EndpointReference</code> metadata.
- * <li>If any error in the creation of
- * the <code>Dispatch</code> object.
- * <li>If a feature is enabled that is not
- * compatible with this port or is unsupported.
- * </UL>
- *
- * @see javax.xml.transform.Source
- * @see javax.xml.soap.SOAPMessage
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public abstract <T> Dispatch<T> createDispatch(EndpointReference endpointReference,
- Class<T> type, Service.Mode mode,
- WebServiceFeature... features);
-
-
-
- /**
- * Creates a <code>Dispatch</code> instance for use with JAXB
- * generated objects.
- *
- * @param portName Qualified name for the target service endpoint
- * @param context The JAXB context used to marshall and unmarshall
- * messages or message payloads.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the user will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the user will work with
- * SOAP messages or the contents of a SOAP body.
- *
- * @return Dispatch instance
- * @throws WebServiceException If any error in the creation of
- * the <code>Dispatch</code> object
- *
- * @see javax.xml.bind.JAXBContext
- **/
- public abstract Dispatch<Object> createDispatch(QName portName,
- JAXBContext context, Service.Mode mode);
-
-
- /**
- * Creates a <code>Dispatch</code> instance for use with JAXB
- * generated objects.
- *
- * @param portName Qualified name for the target service endpoint
- * @param context The JAXB context used to marshall and unmarshall
- * messages or message payloads.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the user will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the user will work with
- * SOAP messages or the contents of a SOAP body.
- * @param features A list of <code>WebServiceFeatures</code> to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- *
- * @return Dispatch instance
- * @throws WebServiceException If any error in the creation of
- * the <code>Dispatch</code> object or if a
- * feature is enabled that is not compatible with
- * this port or is unsupported.
- *
- * @see javax.xml.bind.JAXBContext
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public abstract Dispatch<Object> createDispatch(QName portName,
- JAXBContext context, Service.Mode mode, WebServiceFeature... features);
-
- /**
- * Creates a <code>Dispatch</code> instance for use with JAXB
- * generated objects. If there
- * are any reference parameters in the
- * <code>endpointReference</code>, then those reference
- * parameters MUST appear as SOAP headers, indicating them to be
- * reference parameters, on all messages sent to the endpoint.
- * The <code>endpointReference's</code> address MUST be used
- * for invocations on the endpoint.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the dispatch accordingly from
- * the WSDL associated with this <code>Service</code> instance or
- * from the metadata from the <code>endpointReference</code>.
- * If this <code>Service</code> instance has a WSDL and
- * the <code>endpointReference</code>
- * also has a WSDL in its metadata, then the WSDL from this instance
- * MUST be used.
- * If this <code>Service</code> instance does not have a WSDL and
- * the <code>endpointReference</code> does have a WSDL, then the
- * WSDL from the <code>endpointReference</code> MAY be used.
- * An implementation MUST be able to retrieve the <code>portName</code> from the
- * <code>endpointReference</code> metadata.
- * <p>
- * This method behavies the same as calling
- * <pre>
- * <code>dispatch = service.createDispatch(portName, context, mode, features);</code>
- * </pre>
- * where the <code>portName</code> is retrieved from the
- * WSDL or <code>endpointReference</code> metadata.
- *
- * @param endpointReference The <code>EndpointReference</code>
- * for the target service endpoint that will be invoked by the
- * returned <code>Dispatch</code> object.
- * @param context The JAXB context used to marshall and unmarshall
- * messages or message payloads.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the user will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the user will work with
- * SOAP messages or the contents of a SOAP body.
- * @param features An array of <code>WebServiceFeatures</code> to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- *
- * @return Dispatch instance
- * @throws WebServiceException
- * <UL>
- * <li>If there is any missing WSDL metadata
- * as required by this method.
- * <li>If the <code>endpointReference</code> metadata does
- * not match the <code>serviceName</code> or <code>portName</code>
- * of a WSDL associated
- * with this <code>Service</code> instance.
- * <li>If the <code>portName</code> cannot be determined
- * from the <code>EndpointReference</code> metadata.
- * <li>If any error in the creation of
- * the <code>Dispatch</code> object.
- * <li>if a feature is enabled that is not
- * compatible with this port or is unsupported.
- * </UL>
- *
- * @see javax.xml.bind.JAXBContext
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public abstract Dispatch<Object> createDispatch(EndpointReference endpointReference,
- JAXBContext context, Service.Mode mode,
- WebServiceFeature... features);
-
-
- /**
- * Gets the name of this service.
- * @return Qualified name of this service
- **/
- public abstract QName getServiceName();
-
- /**
- * Returns an <code>Iterator</code> for the list of
- * <code>QName</code>s of service endpoints grouped by this
- * service
- *
- * @return Returns <code>java.util.Iterator</code> with elements
- * of type <code>javax.xml.namespace.QName</code>
- * @throws WebServiceException If this Service class does not
- * have access to the required WSDL metadata
- **/
- public abstract Iterator<javax.xml.namespace.QName> getPorts();
-
- /**
- * Gets the location of the WSDL document for this Service.
- *
- * @return URL for the location of the WSDL document for
- * this service
- **/
- public abstract java.net.URL getWSDLDocumentLocation();
-
- /**
- * Returns the configured handler resolver.
- *
- * @return HandlerResolver The <code>HandlerResolver</code> being
- * used by this <code>Service</code> instance, or <code>null</code>
- * if there isn't one.
- **/
- public abstract HandlerResolver getHandlerResolver();
-
- /**
- * Sets the <code>HandlerResolver</code> for this <code>Service</code>
- * instance.
- * <p>
- * The handler resolver, if present, will be called once for each
- * proxy or dispatch instance that is created, and the handler chain
- * returned by the resolver will be set on the instance.
- *
- * @param handlerResolver The <code>HandlerResolver</code> to use
- * for all subsequently created proxy/dispatch objects.
- *
- * @see javax.xml.ws.handler.HandlerResolver
- **/
- public abstract void setHandlerResolver(HandlerResolver handlerResolver);
-
- /**
- * Returns the executor for this <code>Service</code>instance.
- *
- * The executor is used for all asynchronous invocations that
- * require callbacks.
- *
- * @return The <code>java.util.concurrent.Executor</code> to be
- * used to invoke a callback.
- *
- * @see java.util.concurrent.Executor
- **/
- public abstract java.util.concurrent.Executor getExecutor();
-
- /**
- * Sets the executor for this <code>Service</code> instance.
- *
- * The executor is used for all asynchronous invocations that
- * require callbacks.
- *
- * @param executor The <code>java.util.concurrent.Executor</code>
- * to be used to invoke a callback.
- *
- * @throws SecurityException If the instance does not support
- * setting an executor for security reasons (e.g. the
- * necessary permissions are missing).
- *
- * @see java.util.concurrent.Executor
- **/
- public abstract void setExecutor(java.util.concurrent.Executor executor);
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/spi/WebServiceFeatureAnnotation.java b/src/share/jaxws_classes/javax/xml/ws/spi/WebServiceFeatureAnnotation.java
deleted file mode 100644
index c11cc248..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/spi/WebServiceFeatureAnnotation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.spi;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.WebServiceRef;
-import javax.xml.ws.WebServiceRefs;
-import javax.xml.ws.RespectBinding;
-import javax.xml.ws.soap.Addressing;
-import javax.xml.ws.soap.MTOM;
-
-/**
- * Annotation used to identify other annotations
- * as a <code>WebServiceFeature</code>.
- * <p>
- * Each <code>WebServiceFeature</code> annotation annotated with
- * this annotation MUST contain an
- * <code>enabled</code> property of type
- * <code>boolean</code> with a default value of <code>true</code>.
- * <p>
- * JAX-WS defines the following
- * <code>WebServiceFeature</code> annotations (<code>Addressing</code>,
- * <code>MTOM</code>, <code>RespectBinding</code>), however, an implementation
- * may define vendors specific annotations for other features.
- * <p>
- * Annotations annotated with <code>WebServiceFeatureAnnotation</code> MUST
- * have the same @Target of {@link WebServiceRef} annotation, so that the resulting
- * feature annotation can be used in conjunction with the {@link WebServiceRef}
- * annotation if necessary.
- * <p>
- * If a JAX-WS implementation encounters an annotation annotated
- * with the <code>WebServiceFeatureAnnotation</code> that it does not
- * recognize/support an error MUST be given.
- * <p>
- *
- * @see Addressing
- * @see MTOM
- * @see RespectBinding
- *
- * @since JAX-WS 2.1
- */
-@Target(ElementType.ANNOTATION_TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface WebServiceFeatureAnnotation {
- /**
- * Unique identifier for the WebServiceFeature. This
- * identifier MUST be unique across all implementations
- * of JAX-WS.
- */
- String id();
-
- /**
- * The <code>WebServiceFeature</code> bean that is associated
- * with the <code>WebServiceFeature</code> annotation
- */
- Class<? extends WebServiceFeature> bean();
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpContext.java b/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpContext.java
deleted file mode 100644
index a1f3e65e..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpContext.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.spi.http;
-
-import javax.xml.ws.Endpoint;
-import java.util.Set;
-
-/**
- * HttpContext represents a mapping between the root URI path of a web
- * service to a {@link HttpHandler} which is invoked to handle requests
- * destined for that path on the associated container.
- * <p>
- * Container provides the implementation for this and it matches
- * web service requests to corresponding HttpContext objects.
- *
- * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
- */
-public abstract class HttpContext {
-
- protected HttpHandler handler;
-
- /**
- * JAX-WS runtime sets its handler during
- * {@link Endpoint#publish(HttpContext)} to handle
- * HTTP requests for this context. Container or its extensions
- * use this handler to process the requests.
- *
- * @param handler the handler to set for this context
- */
- public void setHandler(HttpHandler handler) {
- this.handler = handler;
- }
-
- /**
- * Returns the path for this context. This path uniquely identifies
- * an endpoint inside an application and the path is relative to
- * application's context path. Container should give this
- * path based on how it matches request URIs to this HttpContext object.
- *
- * <p>
- * For servlet container, this is typically a url-pattern for an endpoint.
- *
- * <p>
- * Endpoint's address for this context can be computed as follows:
- * <pre>
- * HttpExchange exch = ...;
- * String endpointAddress =
- * exch.getScheme() + "://"
- * + exch.getLocalAddress().getHostName()
- * + ":" + exch.getLocalAddress().getPort()
- * + exch.getContextPath() + getPath();
- * </pre>
- *
- * @return this context's path
- */
- public abstract String getPath();
-
- /**
- * Returns an attribute value for container's configuration
- * and other data that can be used by jax-ws runtime.
- *
- * @param name attribute name
- * @return attribute value
- */
- public abstract Object getAttribute(String name);
-
- /**
- * Returns all attribute names for container's configuration
- * and other data that can be used by jax-ws runtime.
- *
- * @return set of all attribute names
- */
- public abstract Set<String> getAttributeNames();
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpExchange.java b/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpExchange.java
deleted file mode 100644
index 2789e96a..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpExchange.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.spi.http;
-
-import javax.xml.ws.handler.MessageContext;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.security.Principal;
-
-/**
- * This class encapsulates a HTTP request received and a
- * response to be generated in one exchange. It provides methods
- * for examining the request from the client, and for building and
- * sending the response.
- * <p>
- * A <code>HttpExchange</code> must be closed to free or reuse
- * underlying resources. The effect of failing to close an exchange
- * is undefined.
- *
- * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
- */
-public abstract class HttpExchange {
-
- /**
- * Standard property: cipher suite value when the request is received
- * over HTTPS
- * <p>Type: String
- */
- public static final String REQUEST_CIPHER_SUITE =
- "javax.xml.ws.spi.http.request.cipher.suite";
-
- /**
- * Standard property: bit size of the algorithm when the request is
- * received over HTTPS
- * <p>Type: Integer
- */
- public static final String REQUEST_KEY_SIZE =
- "javax.xml.ws.spi.http.request.key.size";
-
- /**
- * Standard property: A SSL certificate, if any, associated with the request
- *
- * <p>Type: java.security.cert.X509Certificate[]
- * The order of this array is defined as being in ascending order of trust.
- * The first certificate in the chain is the one set by the client, the next
- * is the one used to authenticate the first, and so on.
- */
- public static final String REQUEST_X509CERTIFICATE =
- "javax.xml.ws.spi.http.request.cert.X509Certificate";
-
- /**
- * Returns an immutable Map containing the HTTP headers that were
- * included with this request. The keys in this Map will be the header
- * names, while the values will be a List of Strings containing each value
- * that was included (either for a header that was listed several times,
- * or one that accepts a comma-delimited list of values on a single line).
- * In either of these cases, the values for the header name will be
- * presented in the order that they were included in the request.
- * <p>
- * The keys in Map are case-insensitive.
- *
- * @return an immutable Map which can be used to access request headers
- */
- public abstract Map<String, List<String>> getRequestHeaders();
-
- /**
- * Returns the value of the specified request header. If the request
- * did not include a header of the specified name, this method returns
- * null. If there are multiple headers with the same name, this method
- * returns the first header in the request. The header name is
- * case-insensitive. This is a convienence method to get a header
- * (instead of using the {@link #getRequestHeaders}).
- *
- * @param name the name of the request header
- * @return returns the value of the requested header,
- * or null if the request does not have a header of that name
- */
- public abstract String getRequestHeader(String name);
-
- /**
- * Returns a mutable Map into which the HTTP response headers can be stored
- * and which will be transmitted as part of this response. The keys in the
- * Map will be the header names, while the values must be a List of Strings
- * containing each value that should be included multiple times
- * (in the order that they should be included).
- * <p>
- * The keys in Map are case-insensitive.
- *
- * @return a mutable Map which can be used to set response headers.
- */
- public abstract Map<String, List<String>> getResponseHeaders();
-
- /**
- * Adds a response header with the given name and value. This method
- * allows a response header to have multiple values. This is a
- * convenience method to add a response header(instead of using the
- * {@link #getResponseHeaders()}).
- *
- * @param name the name of the header
- * @param value the additional header value. If it contains octet string,
- * it should be encoded according to
- * RFC 2047 (http://www.ietf.org/rfc/rfc2047.txt)
- *
- * @see #getResponseHeaders
- */
- public abstract void addResponseHeader(String name, String value);
-
- /**
- * Returns the part of the request's URI from the protocol
- * name up to the query string in the first line of the HTTP request.
- * Container doesn't decode this string.
- *
- * @return the request URI
- */
- public abstract String getRequestURI();
-
- /**
- * Returns the context path of all the endpoints in an application.
- * This path is the portion of the request URI that indicates the
- * context of the request. The context path always comes first in a
- * request URI. The path starts with a "/" character but does not
- * end with a "/" character. If this method returns "", the request
- * is for default context. The container does not decode this string.
- *
- * <p>
- * Context path is used in computing the endpoint address. See
- * {@link HttpContext#getPath}
- *
- * @return context path of all the endpoints in an application
- * @see HttpContext#getPath
- */
- public abstract String getContextPath();
-
- /**
- * Get the HTTP request method
- *
- * @return the request method
- */
- public abstract String getRequestMethod();
-
- /**
- * Returns a {@link HttpContext} for this exchange.
- * Container matches the request with the associated Endpoint's HttpContext
- *
- * @return the HttpContext for this exchange
- */
- public abstract HttpContext getHttpContext();
-
- /**
- * This must be called to end an exchange. Container takes care of
- * closing request and response streams. This must be called so that
- * the container can free or reuse underlying resources.
- *
- * @throws IOException if any i/o error
- */
- public abstract void close() throws IOException;
-
- /**
- * Returns a stream from which the request body can be read.
- * Multiple calls to this method will return the same stream.
- *
- * @return the stream from which the request body can be read.
- * @throws IOException if any i/o error during request processing
- */
- public abstract InputStream getRequestBody() throws IOException;
-
- /**
- * Returns a stream to which the response body must be
- * written. {@link #setStatus}) must be called prior to calling
- * this method. Multiple calls to this method (for the same exchange)
- * will return the same stream.
- *
- * @return the stream to which the response body is written
- * @throws IOException if any i/o error during response processing
- */
- public abstract OutputStream getResponseBody() throws IOException;
-
- /**
- * Sets the HTTP status code for the response.
- *
- * <p>
- * This method must be called prior to calling {@link #getResponseBody}.
- *
- * @param status the response code to send
- * @see #getResponseBody
- */
- public abstract void setStatus(int status);
-
- /**
- * Returns the unresolved address of the remote entity invoking
- * this request.
- *
- * @return the InetSocketAddress of the caller
- */
- public abstract InetSocketAddress getRemoteAddress();
-
- /**
- * Returns the unresolved local address on which the request was received.
- *
- * @return the InetSocketAddress of the local interface
- */
- public abstract InetSocketAddress getLocalAddress();
-
- /**
- * Returns the protocol string from the request in the form
- * <i>protocol/majorVersion.minorVersion</i>. For example,
- * "HTTP/1.1"
- *
- * @return the protocol string from the request
- */
- public abstract String getProtocol();
-
- /**
- * Returns the name of the scheme used to make this request,
- * for example: http, or https.
- *
- * @return name of the scheme used to make this request
- */
- public abstract String getScheme();
-
- /**
- * Returns the extra path information that follows the web service
- * path but precedes the query string in the request URI and will start
- * with a "/" character.
- *
- * <p>
- * This can be used for {@link MessageContext#PATH_INFO}
- *
- * @return decoded extra path information of web service.
- * It is the path that comes
- * after the web service path but before the query string in the
- * request URI
- * <tt>null</tt> if there is no extra path in the request URI
- */
- public abstract String getPathInfo();
-
- /**
- * Returns the query string that is contained in the request URI
- * after the path.
- *
- * <p>
- * This can be used for {@link MessageContext#QUERY_STRING}
- *
- * @return undecoded query string of request URI, or
- * <tt>null</tt> if the request URI doesn't have one
- */
- public abstract String getQueryString();
-
- /**
- * Returns an attribute that is associated with this
- * <code>HttpExchange</code>. JAX-WS handlers and endpoints may then
- * access the attribute via {@link MessageContext}.
- * <p>
- * Servlet containers must expose {@link MessageContext#SERVLET_CONTEXT},
- * {@link MessageContext#SERVLET_REQUEST}, and
- * {@link MessageContext#SERVLET_RESPONSE}
- * as attributes.
- *
- * <p>If the request has been received by the container using HTTPS, the
- * following information must be exposed as attributes. These attributes
- * are {@link #REQUEST_CIPHER_SUITE}, and {@link #REQUEST_KEY_SIZE}.
- * If there is a SSL certificate associated with the request, it must
- * be exposed using {@link #REQUEST_X509CERTIFICATE}
- *
- * @param name attribute name
- * @return the attribute value, or <tt>null</tt> if the attribute doesn't
- * exist
- */
- public abstract Object getAttribute(String name);
-
- /**
- * Gives all the attribute names that are associated with
- * this <code>HttpExchange</code>.
- *
- * @return set of all attribute names
- * @see #getAttribute(String)
- */
- public abstract Set<String> getAttributeNames();
-
- /**
- * Returns the {@link Principal} that represents the authenticated
- * user for this <code>HttpExchange</code>.
- *
- * @return Principal for an authenticated user, or
- * <tt>null</tt> if not authenticated
- */
- public abstract Principal getUserPrincipal();
-
- /**
- * Indicates whether an authenticated user is included in the specified
- * logical "role".
- *
- * @param role specifies the name of the role
- * @return <tt>true</tt> if the user making this request belongs to a
- * given role
- */
- public abstract boolean isUserInRole(String role);
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpHandler.java b/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpHandler.java
deleted file mode 100644
index 8729a6c3..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/spi/http/HttpHandler.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.spi.http;
-
-import javax.xml.ws.Endpoint;
-import java.io.IOException;
-
-/**
- * A handler which is invoked to process HTTP requests.
- * <p>
- * JAX-WS runtime provides the implementation for this and sets
- * it using {@link HttpContext#setHandler(HttpHandler)} during
- * {@link Endpoint#publish(HttpContext) }
- *
- * @author Jitendra Kotamraju
- * @since JAX-WS 2.2
- */
-public abstract class HttpHandler {
- /**
- * Handles a given request and generates an appropriate response.
- * See {@link HttpExchange} for a description of the steps
- * involved in handling an exchange. Container invokes this method
- * when it receives an incoming request.
- *
- * @param exchange the exchange containing the request from the
- * client and used to send the response
- * @throws IOException when an I/O error happens during request
- * handling
- */
- public abstract void handle(HttpExchange exchange) throws IOException;
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/spi/http/package-info.java b/src/share/jaxws_classes/javax/xml/ws/spi/http/package-info.java
deleted file mode 100644
index 89fed0ab..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/spi/http/package-info.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- Provides HTTP SPI that is used for portable deployment of JAX-WS
- web services in containers(for e.g. servlet containers). This SPI
- is not for end developers but provides a way for the container
- developers to deploy JAX-WS services portably.
-
- <p>
- The portable deployment is done as below:
- <ol>
- <li>Container creates {@link javax.xml.ws.Endpoint} objects for an
- application. The necessary information to create Endpoint objects
- may be got from web service deployment descriptor files.</li>
- <li>Container needs to create {@link javax.xml.ws.spi.http.HttpContext}
- objects for the deployment. For example, a HttpContext could be
- created using servlet configuration(for e.g url-pattern) for the
- web service in servlet container case.</li>
- <li>Then publishes all the endpoints using
- {@link javax.xml.ws.Endpoint#publish(HttpContext)}. During publish(),
- JAX-WS runtime registers a {@link javax.xml.ws.spi.http.HttpHandler}
- callback to handle incoming requests or
- {@link javax.xml.ws.spi.http.HttpExchange} objects. The HttpExchange
- object encapsulates a HTTP request and a response.
- </ol>
-
- <pre>
- Container JAX-WS runtime
- --------- --------------
- 1. Creates Invoker1, ... InvokerN
- 2. Provider.createEndpoint(...) --> 3. creates Endpoint1
- configures Endpoint1
- ...
- 4. Provider.createEndpoint(...) --> 5. creates EndpointN
- configures EndpointN
- 6. Creates ApplicationContext
- 7. creates HttpContext1, ... HttpContextN
- 8. Endpoint1.publish(HttpContext1) --> 9. creates HttpHandler1
- HttpContext1.setHandler(HttpHandler1)
- ...
- 10. EndpointN.publish(HttpContextN) --> 11. creates HttpHandlerN
- HttpContextN.setHandler(HttpHandlerN)
-
- </pre>
-
- The request processing is done as below(for every request):
- <pre>
- Container JAX-WS runtime
- --------- --------------
- 1. Creates a HttpExchange
- 2. Gets handler from HttpContext
- 3. HttpHandler.handle(HttpExchange) --> 4. reads request from HttpExchange
- <-- 5. Calls Invoker
- 6. Invokes the actual instance
- 7. Writes the response to HttpExchange
- </pre>
-
- <p>
- The portable undeployment is done as below:
- <pre>
- Container
- ---------
- 1. @preDestroy on instances
- 2. Endpoint1.stop()
- ...
- 3. EndpointN.stop()
- </pre>
-
- @author Jitendra Kotamraju
- @since JAX-WS 2.2
- */
-package javax.xml.ws.spi.http;
diff --git a/src/share/jaxws_classes/javax/xml/ws/spi/package.html b/src/share/jaxws_classes/javax/xml/ws/spi/package.html
deleted file mode 100644
index d6128aa9..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/spi/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-<body>
-This package defines SPIs for JAX-WS.
-</body>
-</html>
diff --git a/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java b/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java
deleted file mode 100644
index a1bc3e2b..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReference.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.wsaddressing;
-
-
-import org.w3c.dom.Element;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceException;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * This class represents a W3C Addressing EndpointReferece which is
- * a remote reference to a web service endpoint that supports the
- * W3C WS-Addressing 1.0 - Core Recommendation.
- * <p>
- * Developers should use this class in their SEIs if they want to
- * pass/return endpoint references that represent the W3C WS-Addressing
- * recommendation.
- * <p>
- * JAXB will use the JAXB annotations and bind this class to XML infoset
- * that is consistent with that defined by WS-Addressing. See
- * <a href="http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/">
- * WS-Addressing</a>
- * for more information on WS-Addressing EndpointReferences.
- *
- * @since JAX-WS 2.1
- */
-
-// XmlRootElement allows this class to be marshalled on its own
-@XmlRootElement(name="EndpointReference",namespace=W3CEndpointReference.NS)
-@XmlType(name="EndpointReferenceType",namespace=W3CEndpointReference.NS)
-public final class W3CEndpointReference extends EndpointReference {
-
- private final JAXBContext w3cjc = getW3CJaxbContext();
-
- // should be changed to package private, keeping original modifier to keep backwards compatibility
- protected static final String NS = "http://www.w3.org/2005/08/addressing";
-
- // default constructor forbidden ...
- // should be private, keeping original modifier to keep backwards compatibility
- protected W3CEndpointReference() {
- }
-
- /**
- * Creates an EPR from infoset representation
- *
- * @param source A source object containing valid XmlInfoset
- * instance consistent with the W3C WS-Addressing Core
- * recommendation.
- *
- * @throws WebServiceException
- * If the source does NOT contain a valid W3C WS-Addressing
- * EndpointReference.
- * @throws NullPointerException
- * If the <code>null</code> <code>source</code> value is given
- */
- public W3CEndpointReference(Source source) {
- try {
- W3CEndpointReference epr = w3cjc.createUnmarshaller().unmarshal(source,W3CEndpointReference.class).getValue();
- this.address = epr.address;
- this.metadata = epr.metadata;
- this.referenceParameters = epr.referenceParameters;
- this.elements = epr.elements;
- this.attributes = epr.attributes;
- } catch (JAXBException e) {
- throw new WebServiceException("Error unmarshalling W3CEndpointReference " ,e);
- } catch (ClassCastException e) {
- throw new WebServiceException("Source did not contain W3CEndpointReference", e);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void writeTo(Result result){
- try {
- Marshaller marshaller = w3cjc.createMarshaller();
- marshaller.marshal(this, result);
- } catch (JAXBException e) {
- throw new WebServiceException("Error marshalling W3CEndpointReference. ", e);
- }
- }
-
- private static JAXBContext getW3CJaxbContext() {
- try {
- return JAXBContext.newInstance(W3CEndpointReference.class);
- } catch (JAXBException e) {
- throw new WebServiceException("Error creating JAXBContext for W3CEndpointReference. ", e);
- }
- }
-
- // private but necessary properties for databinding
- @XmlElement(name="Address",namespace=NS)
- private Address address;
- @XmlElement(name="ReferenceParameters",namespace=NS)
- private Elements referenceParameters;
- @XmlElement(name="Metadata",namespace=NS)
- private Elements metadata;
- // attributes and elements are not private for performance reasons
- // (JAXB can bypass reflection)
- @XmlAnyAttribute
- Map<QName,String> attributes;
- @XmlAnyElement
- List<Element> elements;
-
-
- @XmlType(name="address", namespace=W3CEndpointReference.NS)
- private static class Address {
- protected Address() {}
- @XmlValue
- String uri;
- @XmlAnyAttribute
- Map<QName,String> attributes;
- }
-
-
- @XmlType(name="elements", namespace=W3CEndpointReference.NS)
- private static class Elements {
- protected Elements() {}
- @XmlAnyElement
- List<Element> elements;
- @XmlAnyAttribute
- Map<QName,String> attributes;
- }
-
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java b/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java
deleted file mode 100644
index d04d792a..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.ws.wsaddressing;
-
-
-import org.w3c.dom.Element;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.spi.Provider;
-
-
-/**
- * This class is used to build <code>W3CEndpointReference</code>
- * instances. The intended use of this clsss is for
- * an application component, for example a factory component,
- * to create an <code>W3CEndpointReference</code> for a
- * web service endpoint published by the same
- * Java EE application. It can also be used to create
- * <code>W3CEndpointReferences</code> for an Java SE based
- * endpoint by providing the <code>address</code> property.
- * <p>
- * When creating a <code>W3CEndpointReference</code> for an
- * endpoint that is not published by the same Java EE application,
- * the <code>address</code> property MUST be specified.
- * <p>
- * When creating a <code>W3CEndpointReference</code> for an endpoint
- * published by the same Java EE application, the <code>address</code>
- * property MAY be <code>null</code> but then the <code>serviceName</code>
- * and <code>endpointName</code> MUST specify an endpoint published by
- * the same Java EE application.
- * <p>
- * When the <code>wsdlDocumentLocation</code> is specified it MUST refer
- * to a valid WSDL document and the <code>serviceName</code> and
- * <code>endpointName</code> (if specified) MUST match a service and port
- * in the WSDL document.
- *
- * @since JAX-WS 2.1
- */
-public final class W3CEndpointReferenceBuilder {
- /**
- * Creates a new <code>W3CEndpointReferenceBuilder</code> instance.
- */
- public W3CEndpointReferenceBuilder() {
- referenceParameters = new ArrayList<Element>();
- metadata = new ArrayList<Element>();
- attributes = new HashMap<QName, String>();
- elements = new ArrayList<Element>();
- }
-
- /**
- * Sets the <code>address</code> to the
- * <code>W3CEndpointReference</code> instance's
- * <code>wsa:Address</code>.
- * <p>
- * The <code>address</code> MUST be set to a non-<code>null</code>
- * value when building a <code>W3CEndpointReference</code> for a
- * web service endpoint that is not published by the same
- * Java EE application or when running on Java SE.
- *
- * @param address The address of the endpoint to be targeted
- * by the returned <code>W3CEndpointReference</code>.
- *
- * @return A <code>W3CEndpointReferenceBuilder</code> instance with
- * the <code>address</code> set to the <code>wsa:Address</code>.
- */
- public W3CEndpointReferenceBuilder address(String address) {
- this.address = address;
- return this;
- }
-
- /**
- * Sets the <code>interfaceName</code> as the
- * <code>wsam:InterfaceName</code> element in the
- * <code>wsa:Metadata</code> element.
- *
- * See <a href="http://www.w3.org/TR/2007/REC-ws-addr-metadata-20070904/#refmetadatfromepr">
- * 2.1 Referencing WSDL Metadata from an EPR</a> for more details.
- *
- * @param interfaceName The port type name of the endpoint to be targeted
- * by the returned <code>W3CEndpointReference</code>.
- *
- * @return A <code>W3CEndpointReferenceBuilder</code> instance with
- * the <code>interfaceName</code> as <code>wsam:InterfaceName</code>
- * element added to the <code>wsa:Metadata</code> element
- */
- public W3CEndpointReferenceBuilder interfaceName(QName interfaceName) {
- this.interfaceName = interfaceName;
- return this;
- }
-
- /**
- * Sets the <code>serviceName</code> as the
- * <code>wsam:ServiceName</code> element in the
- * <code>wsa:Metadata</code> element.
- *
- * See <a href="http://www.w3.org/TR/2007/REC-ws-addr-metadata-20070904/#refmetadatfromepr">
- * 2.1 Referencing WSDL Metadata from an EPR</a> for more details.
- *
- * @param serviceName The service name of the endpoint to be targeted
- * by the returned <code>W3CEndpointReference</code>. This property
- * may also be used with the <code>endpointName</code> (portName)
- * property to lookup the <code>address</code> of a web service
- * endpoint that is published by the same Java EE application.
- *
- * @return A <code>W3CEndpointReferenceBuilder</code> instance with
- * the <code>serviceName</code> as <code>wsam:ServiceName</code>
- * element added to the <code>wsa:Metadata</code> element
- *
- */
- public W3CEndpointReferenceBuilder serviceName(QName serviceName) {
- this.serviceName = serviceName;
- return this;
- }
-
- /**
- * Sets the <code>endpointName</code> as
- * <code>wsam:ServiceName/@EndpointName</code> in the
- * <code>wsa:Metadata</code> element. This method can only be called
- * after the {@link #serviceName} method has been called.
- * <p>
- * See <a href="http://www.w3.org/TR/2007/REC-ws-addr-metadata-20070904/#refmetadatfromepr">
- * 2.1 Referencing WSDL Metadata from an EPR</a> for more details.
- *
- * @param endpointName The name of the endpoint to be targeted
- * by the returned <code>W3CEndpointReference</code>. The
- * <code>endpointName</code> (portName) property may also be
- * used with the <code>serviceName</code> property to lookup
- * the <code>address</code> of a web service
- * endpoint published by the same Java EE application.
- *
- * @return A <code>W3CEndpointReferenceBuilder</code> instance with
- * the <code>endpointName</code> as
- * <code>wsam:ServiceName/@EndpointName</code> in the
- * <code>wsa:Metadata</code> element.
- *
- * @throws IllegalStateException, if the <code>serviceName</code>
- * has not been set.
- * @throws IllegalArgumentException, if the <code>endpointName</code>'s
- * Namespace URI doesn't match <code>serviceName</code>'s Namespace URI
- *
- */
- public W3CEndpointReferenceBuilder endpointName(QName endpointName) {
- if (serviceName == null) {
- throw new IllegalStateException("The W3CEndpointReferenceBuilder's serviceName must be set before setting the endpointName: "+endpointName);
- }
-
- this.endpointName = endpointName;
- return this;
- }
-
- /**
- * Sets the <code>wsdlDocumentLocation</code> that will be referenced
- * as <code>wsa:Metadata/@wsdli:wsdlLocation</code>. The namespace name
- * for the wsdli:wsdlLocation's value can be taken from the WSDL itself.
- *
- * <p>
- * See <a href="http://www.w3.org/TR/2007/REC-ws-addr-metadata-20070904/#refmetadatfromepr">
- * 2.1 Referencing WSDL Metadata from an EPR</a> for more details.
- *
- * @param wsdlDocumentLocation The location of the WSDL document to
- * be referenced in the <code>wsa:Metadata</code> of the
- * <code>W3CEndpointReference</code>.
- * @return A <code>W3CEndpointReferenceBuilder</code> instance with
- * the <code>wsdlDocumentLocation</code> that is to be referenced.
- */
- public W3CEndpointReferenceBuilder wsdlDocumentLocation(String wsdlDocumentLocation) {
- this.wsdlDocumentLocation = wsdlDocumentLocation;
- return this;
- }
-
- /**
- * Adds the <code>referenceParameter</code> to the
- * <code>W3CEndpointReference</code> instance
- * <code>wsa:ReferenceParameters</code> element.
- *
- * @param referenceParameter The element to be added to the
- * <code>wsa:ReferenceParameters</code> element.
- *
- * @return A <code>W3CEndpointReferenceBuilder</code> instance with
- * the <code>referenceParameter</code> added to the
- * <code>wsa:ReferenceParameters</code> element.
- *
- * @throws java.lang.IllegalArgumentException if <code>referenceParameter</code>
- * is <code>null</code>.
- */
- public W3CEndpointReferenceBuilder referenceParameter(Element referenceParameter) {
- if (referenceParameter == null)
- throw new java.lang.IllegalArgumentException("The referenceParameter cannot be null.");
- referenceParameters.add(referenceParameter);
- return this;
- }
-
- /**
- * Adds the <code>metadataElement</code> to the
- * <code>W3CEndpointReference</code> instance's
- * <code>wsa:Metadata</code> element.
- *
- * @param metadataElement The element to be added to the
- * <code>wsa:Metadata</code> element.
- *
- * @return A <code>W3CEndpointReferenceBuilder</code> instance with
- * the <code>metadataElement</code> added to the
- * <code>wsa:Metadata</code> element.
- *
- * @throws java.lang.IllegalArgumentException if <code>metadataElement</code>
- * is <code>null</code>.
- */
- public W3CEndpointReferenceBuilder metadata(Element metadataElement) {
- if (metadataElement == null)
- throw new java.lang.IllegalArgumentException("The metadataElement cannot be null.");
- metadata.add(metadataElement);
- return this;
- }
-
- /**
- * Adds an extension element to the
- * <code>W3CEndpointReference</code> instance's
- * <code>wsa:EndpointReference</code> element.
- *
- * @param element The extension element to be added to the
- * <code>W3CEndpointReference</code>
- * @return A <code>W3CEndpointReferenceBuilder</code> instance with
- * the extension <code>element</code> added to the
- * <code>W3CEndpointReference</code> instance.
- * @throws java.lang.IllegalArgumentException if <code>element</code>
- * is <code>null</code>.
- *
- * @since JAX-WS 2.2
- */
- public W3CEndpointReferenceBuilder element(Element element) {
- if (element == null) {
- throw new IllegalArgumentException("The extension element cannot be null.");
- }
- elements.add(element);
- return this;
- }
-
- /**
- * Adds an extension attribute to the
- * <code>W3CEndpointReference</code> instance's
- * <code>wsa:EndpointReference</code> element.
- *
- * @param name The name of the extension attribute to be added to the
- * <code>W3CEndpointReference</code>
- * @param value extension attribute value
- * @return A <code>W3CEndpointReferenceBuilder</code> instance with
- * the extension attribute added to the <code>W3CEndpointReference</code>
- * instance.
- * @throws java.lang.IllegalArgumentException if <code>name</code>
- * or <code>value</code> is <code>null</code>.
- *
- * @since JAX-WS 2.2
- */
- public W3CEndpointReferenceBuilder attribute(QName name, String value) {
- if (name == null || value == null) {
- throw new IllegalArgumentException("The extension attribute name or value cannot be null.");
- }
- attributes.put(name, value);
- return this;
- }
-
- /**
- * Builds a <code>W3CEndpointReference</code> from the accumulated
- * properties set on this <code>W3CEndpointReferenceBuilder</code>
- * instance.
- * <p>
- * This method can be used to create a <code>W3CEndpointReference</code>
- * for any endpoint by specifying the <code>address</code> property along
- * with any other desired properties. This method
- * can also be used to create a <code>W3CEndpointReference</code> for
- * an endpoint that is published by the same Java EE application.
- * This method can automatically determine the <code>address</code> of
- * an endpoint published by the same Java EE application that is identified by the
- * <code>serviceName</code> and
- * <code>endpointName</code> properties. If the <code>address</code> is
- * <code>null</code> and the <code>serviceName</code> and
- * <code>endpointName</code>
- * do not identify an endpoint published by the same Java EE application, a
- * <code>java.lang.IllegalStateException</code> MUST be thrown.
- *
- *
- * @return <code>W3CEndpointReference</code> from the accumulated
- * properties set on this <code>W3CEndpointReferenceBuilder</code>
- * instance. This method never returns <code>null</code>.
- *
- * @throws IllegalStateException
- * <ul>
- * <li>If the <code>address</code>, <code>serviceName</code> and
- * <code>endpointName</code> are all <code>null</code>.
- * <li>If the <code>serviceName</code> service is <code>null</code> and the
- * <code>endpointName</code> is NOT <code>null</code>.
- * <li>If the <code>address</code> property is <code>null</code> and
- * the <code>serviceName</code> and <code>endpointName</code> do not
- * specify a valid endpoint published by the same Java EE
- * application.
- * <li>If the <code>serviceName</code> is NOT <code>null</code>
- * and is not present in the specified WSDL.
- * <li>If the <code>endpointName</code> port is not <code>null</code> and it
- * is not present in <code>serviceName</code> service in the WSDL.
- * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code>
- * and does not represent a valid WSDL.
- * </ul>
- * @throws WebServiceException If an error occurs while creating the
- * <code>W3CEndpointReference</code>.
- *
- */
- public W3CEndpointReference build() {
- if (elements.isEmpty() && attributes.isEmpty() && interfaceName == null) {
- // 2.1 API
- return Provider.provider().createW3CEndpointReference(address,
- serviceName, endpointName, metadata, wsdlDocumentLocation,
- referenceParameters);
- }
- return Provider.provider().createW3CEndpointReference(address,
- interfaceName, serviceName, endpointName, metadata, wsdlDocumentLocation,
- referenceParameters, elements, attributes);
- }
-
- private String address;
- private List<Element> referenceParameters;
- private List<Element> metadata;
- private QName interfaceName;
- private QName serviceName;
- private QName endpointName;
- private String wsdlDocumentLocation;
- private Map<QName,String> attributes;
- private List<Element> elements;
-}
diff --git a/src/share/jaxws_classes/javax/xml/ws/wsaddressing/package-info.java b/src/share/jaxws_classes/javax/xml/ws/wsaddressing/package-info.java
deleted file mode 100644
index 86c4d98f..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/wsaddressing/package-info.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-@javax.xml.bind.annotation.XmlSchema(namespace=W3CEndpointReference.NS,
- location="http://www.w3.org/2006/03/addressing/ws-addr.xsd")
-package javax.xml.ws.wsaddressing;
diff --git a/src/share/jaxws_classes/javax/xml/ws/wsaddressing/package.html b/src/share/jaxws_classes/javax/xml/ws/wsaddressing/package.html
deleted file mode 100644
index 05178ccb..00000000
--- a/src/share/jaxws_classes/javax/xml/ws/wsaddressing/package.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<html>
-<body>
-This package defines APIs related to WS-Addressing.
-</body>
-</html>
diff --git a/src/share/jaxws_classes/org/relaxng/datatype/Datatype.java b/src/share/jaxws_classes/org/relaxng/datatype/Datatype.java
deleted file mode 100644
index 519cd63b..00000000
--- a/src/share/jaxws_classes/org/relaxng/datatype/Datatype.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Datatype object.
- *
- * This object has the following functionality:
- *
- * <ol>
- * <li> functionality to identify a class of character sequences. This is
- * done through the isValid method.
- *
- * <li> functionality to produce a "value object" from a character sequence and
- * context information.
- *
- * <li> functionality to test the equality of two value objects.
- * </ol>
- *
- * This interface also defines the createStreamingValidator method,
- * which is intended to efficiently support the validation of
- * large character sequences.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface Datatype {
-
- /**
- * Checks if the specified 'literal' matches this Datatype
- * with respect to the current context.
- *
- * @param literal
- * the lexical representation to be checked.
- * @param context
- * If this datatype is context-dependent
- * (i.e. the {@link #isContextDependent} method returns true),
- * then the caller must provide a non-null valid context object.
- * Otherwise, the caller can pass null.
- *
- * @return
- * true if the 'literal' is a member of this Datatype;
- * false if it's not a member of this Datatype.
- */
- boolean isValid( String literal, ValidationContext context );
-
- /**
- * Similar to the isValid method but throws an exception with diagnosis
- * in case of errors.
- *
- * <p>
- * If the specified 'literal' is a valid lexical representation for this
- * datatype, then this method must return without throwing any exception.
- * If not, the callee must throw an exception (with diagnosis message,
- * if possible.)
- *
- * <p>
- * The application can use this method to provide detailed error message
- * to users. This method is kept separate from the isValid method to
- * achieve higher performance during normal validation.
- *
- * @exception DatatypeException
- * If the given literal is invalid, then this exception is thrown.
- * If the callee supports error diagnosis, then the exception should
- * contain a diagnosis message.
- */
- void checkValid( String literal, ValidationContext context )
- throws DatatypeException;
-
- /**
- * Creates an instance of a streaming validator for this type.
- *
- * <p>
- * By using streaming validators instead of the isValid method,
- * the caller can avoid keeping the entire string, which is
- * sometimes quite big, in memory.
- *
- * @param context
- * If this datatype is context-dependent
- * (i.e. the {@link #isContextDependent} method returns true),
- * then the caller must provide a non-null valid context object.
- * Otherwise, the caller can pass null.
- * The callee may keep a reference to this context object
- * only while the returned streaming validator is being used.
- */
- DatatypeStreamingValidator createStreamingValidator( ValidationContext context );
-
- /**
- * Converts lexcial value and the current context to the corresponding
- * value object.
- *
- * <p>
- * The caller cannot generally assume that the value object is
- * a meaningful Java object. For example, the caller cannot expect
- * this method to return <code>java.lang.Number</code> type for
- * the "integer" type of XML Schema Part 2.
- *
- * <p>
- * Also, the caller cannot assume that the equals method and
- * the hashCode method of the value object are consistent with
- * the semantics of the datatype. For that purpose, the sameValue
- * method and the valueHashCode method have to be used. Note that
- * this means you cannot use classes like
- * <code>java.util.Hashtable</code> to store the value objects.
- *
- * <p>
- * The returned value object should be used solely for the sameValue
- * and valueHashCode methods.
- *
- * @param context
- * If this datatype is context-dependent
- * (when the {@link #isContextDependent} method returns true),
- * then the caller must provide a non-null valid context object.
- * Otherwise, the caller can pass null.
- *
- * @return null
- * when the given lexical value is not a valid lexical
- * value for this type.
- */
- Object createValue( String literal, ValidationContext context );
-
- /**
- * Tests the equality of two value objects which were originally
- * created by the createValue method of this object.
- *
- * The behavior is undefined if objects not created by this type
- * are passed. It is the caller's responsibility to ensure that
- * value objects belong to this type.
- *
- * @return
- * true if two value objects are considered equal according to
- * the definition of this datatype; false if otherwise.
- */
- boolean sameValue( Object value1, Object value2 );
-
-
- /**
- * Computes the hash code for a value object,
- * which is consistent with the sameValue method.
- *
- * @return
- * hash code for the specified value object.
- */
- int valueHashCode( Object value );
-
-
-
-
- /**
- * Indicates that the datatype doesn't have ID/IDREF semantics.
- *
- * This value is one of the possible return values of the
- * {@link #getIdType} method.
- */
- public static final int ID_TYPE_NULL = 0;
-
- /**
- * Indicates that RELAX NG compatibility processors should
- * treat this datatype as having ID semantics.
- *
- * This value is one of the possible return values of the
- * {@link #getIdType} method.
- */
- public static final int ID_TYPE_ID = 1;
-
- /**
- * Indicates that RELAX NG compatibility processors should
- * treat this datatype as having IDREF semantics.
- *
- * This value is one of the possible return values of the
- * {@link #getIdType} method.
- */
- public static final int ID_TYPE_IDREF = 2;
-
- /**
- * Indicates that RELAX NG compatibility processors should
- * treat this datatype as having IDREFS semantics.
- *
- * This value is one of the possible return values of the
- * {@link #getIdType} method.
- */
- public static final int ID_TYPE_IDREFS = 3;
-
- /**
- * Checks if the ID/IDREF semantics is associated with this
- * datatype.
- *
- * <p>
- * This method is introduced to support the RELAX NG DTD
- * compatibility spec. (Of course it's always free to use
- * this method for other purposes.)
- *
- * <p>
- * If you are implementing a datatype library and have no idea about
- * the "RELAX NG DTD compatibility" thing, just return
- * <code>ID_TYPE_NULL</code> is fine.
- *
- * @return
- * If this datatype doesn't have any ID/IDREF semantics,
- * it returns {@link #ID_TYPE_NULL}. If it has such a semantics
- * (for example, XSD:ID, XSD:IDREF and comp:ID type), then
- * it returns {@link #ID_TYPE_ID}, {@link #ID_TYPE_IDREF} or
- * {@link #ID_TYPE_IDREFS}.
- */
- public int getIdType();
-
-
- /**
- * Checks if this datatype may need a context object for
- * the validation.
- *
- * <p>
- * The callee must return true even when the context
- * is not always necessary. (For example, the "QName" type
- * doesn't need a context object when validating unprefixed
- * string. But nonetheless QName must return true.)
- *
- * <p>
- * XSD's <code>string</code> and <code>short</code> types
- * are examples of context-independent datatypes.
- * Its <code>QName</code> and <code>ENTITY</code> types
- * are examples of context-dependent datatypes.
- *
- * <p>
- * When a datatype is context-independent, then
- * the {@link #isValid} method, the {@link #checkValid} method,
- * the {@link #createStreamingValidator} method and
- * the {@link #createValue} method can be called without
- * providing a context object.
- *
- * @return
- * <b>true</b> if this datatype is context-dependent
- * (it needs a context object sometimes);
- *
- * <b>false</b> if this datatype is context-<b>in</b>dependent
- * (it never needs a context object).
- */
- public boolean isContextDependent();
-}
diff --git a/src/share/jaxws_classes/org/relaxng/datatype/DatatypeBuilder.java b/src/share/jaxws_classes/org/relaxng/datatype/DatatypeBuilder.java
deleted file mode 100644
index de465ad0..00000000
--- a/src/share/jaxws_classes/org/relaxng/datatype/DatatypeBuilder.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Creates a user-defined type by adding parameters to
- * the pre-defined type.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeBuilder {
-
- /**
- * Adds a new parameter.
- *
- * @param name
- * The name of the parameter to be added.
- * @param strValue
- * The raw value of the parameter. Caller may not normalize
- * this value because any white space is potentially significant.
- * @param context
- * The context information which can be used by the callee to
- * acquire additional information. This context object is
- * valid only during this method call. The callee may not
- * keep a reference to this object.
- * @exception DatatypeException
- * When the given parameter is inappropriate for some reason.
- * The callee is responsible to recover from this error.
- * That is, the object should behave as if no such error
- * was occured.
- */
- void addParameter( String name, String strValue, ValidationContext context )
- throws DatatypeException;
-
- /**
- * Derives a new Datatype from a Datatype by parameters that
- * were already set through the addParameter method.
- *
- * @exception DatatypeException
- * DatatypeException must be thrown if the derivation is
- * somehow invalid. For example, a required parameter is missing,
- * etc. The exception should contain a diagnosis message
- * if possible.
- */
- Datatype createDatatype() throws DatatypeException;
-}
diff --git a/src/share/jaxws_classes/org/relaxng/datatype/DatatypeException.java b/src/share/jaxws_classes/org/relaxng/datatype/DatatypeException.java
deleted file mode 100644
index 96982bd2..00000000
--- a/src/share/jaxws_classes/org/relaxng/datatype/DatatypeException.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Signals Datatype related exceptions.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public class DatatypeException extends Exception {
-
- public DatatypeException( int index, String msg ) {
- super(msg);
- this.index = index;
- }
- public DatatypeException( String msg ) {
- this(UNKNOWN,msg);
- }
- /**
- * A constructor for those datatype libraries which don't support any
- * diagnostic information at all.
- */
- public DatatypeException() {
- this(UNKNOWN,null);
- }
-
-
- private final int index;
-
- public static final int UNKNOWN = -1;
-
- /**
- * Gets the index of the content where the error occured.
- * UNKNOWN can be returned to indicate that no index information
- * is available.
- */
- public int getIndex() {
- return index;
- }
-}
diff --git a/src/share/jaxws_classes/org/relaxng/datatype/DatatypeLibrary.java b/src/share/jaxws_classes/org/relaxng/datatype/DatatypeLibrary.java
deleted file mode 100644
index 345c2f4c..00000000
--- a/src/share/jaxws_classes/org/relaxng/datatype/DatatypeLibrary.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * A Datatype library
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeLibrary {
-
- /**
- * Creates a new instance of DatatypeBuilder.
- *
- * The callee should throw a DatatypeException in case of an error.
- *
- * @param baseTypeLocalName
- * The local name of the base type.
- *
- * @return
- * A non-null valid datatype object.
- */
- DatatypeBuilder createDatatypeBuilder( String baseTypeLocalName )
- throws DatatypeException;
-
- /**
- * Gets or creates a pre-defined type.
- *
- * This is just a short-cut of
- * <code>createDatatypeBuilder(typeLocalName).createDatatype();</code>
- *
- * The callee should throw a DatatypeException in case of an error.
- *
- * @return
- * A non-null valid datatype object.
- */
- Datatype createDatatype( String typeLocalName ) throws DatatypeException;
-}
diff --git a/src/share/jaxws_classes/org/relaxng/datatype/DatatypeLibraryFactory.java b/src/share/jaxws_classes/org/relaxng/datatype/DatatypeLibraryFactory.java
deleted file mode 100644
index 495c2fd5..00000000
--- a/src/share/jaxws_classes/org/relaxng/datatype/DatatypeLibraryFactory.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Factory class for the DatatypeLibrary class.
- *
- * <p>
- * The datatype library should provide the implementation of
- * this interface if it wants to be found by the schema processors.
- * The implementor also have to place a file in your jar file.
- * See the reference datatype library implementation for detail.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeLibraryFactory
-{
- /**
- * Creates a new instance of a DatatypeLibrary that supports
- * the specified namespace URI.
- *
- * @return
- * <code>null</code> if the specified namespace URI is not
- * supported.
- */
- DatatypeLibrary createDatatypeLibrary( String namespaceURI );
-}
diff --git a/src/share/jaxws_classes/org/relaxng/datatype/DatatypeStreamingValidator.java b/src/share/jaxws_classes/org/relaxng/datatype/DatatypeStreamingValidator.java
deleted file mode 100644
index 0e143043..00000000
--- a/src/share/jaxws_classes/org/relaxng/datatype/DatatypeStreamingValidator.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * Datatype streaming validator.
- *
- * <p>
- * The streaming validator is an optional feature that is useful for
- * certain Datatypes. It allows the caller to incrementally provide
- * the literal.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface DatatypeStreamingValidator {
-
- /**
- * Passes an additional fragment of the literal.
- *
- * <p>
- * The application can call this method several times, then call
- * the isValid method (or the checkValid method) to check the validity
- * of the accumulated characters.
- */
- void addCharacters( char[] buf, int start, int len );
-
- /**
- * Tells if the accumulated literal is valid with respect to
- * the underlying Datatype.
- *
- * @return
- * True if it is valid. False if otherwise.
- */
- boolean isValid();
-
- /**
- * Similar to the isValid method, but this method throws
- * Exception (with possibly diagnostic information), instead of
- * returning false.
- *
- * @exception DatatypeException
- * If the callee supports the diagnosis and the accumulated
- * literal is invalid, then this exception that possibly
- * contains diagnosis information is thrown.
- */
- void checkValid() throws DatatypeException;
-}
diff --git a/src/share/jaxws_classes/org/relaxng/datatype/ValidationContext.java b/src/share/jaxws_classes/org/relaxng/datatype/ValidationContext.java
deleted file mode 100644
index 13384472..00000000
--- a/src/share/jaxws_classes/org/relaxng/datatype/ValidationContext.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype;
-
-/**
- * An interface that must be implemented by caller to
- * provide context information that is necessary to
- * perform validation of some Datatypes.
- *
- * @author <a href="mailto:jjc@jclark.com">James Clark</a>
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public interface ValidationContext {
-
- /**
- * Resolves a namespace prefix to the corresponding namespace URI.
- *
- * This method is used for validating the QName type, for example.
- *
- * <p>
- * If the prefix is "" (empty string), it indicates
- * an unprefixed value. The callee
- * should resolve it as for an unprefixed
- * element, rather than for an unprefixed attribute.
- *
- * <p>
- * If the prefix is "xml", then the callee must resolve
- * this prefix into "http://www.w3.org/XML/1998/namespace",
- * as defined in the XML Namespaces Recommendation.
- *
- * @return
- * namespace URI of this prefix.
- * If the specified prefix is not declared,
- * the implementation must return null.
- */
- String resolveNamespacePrefix( String prefix );
-
- /**
- * Returns the base URI of the context. The null string may be returned
- * if no base URI is known.
- */
- String getBaseUri();
-
- /**
- * Checks if an unparsed entity is declared with the
- * specified name.
- *
- * @return
- * true
- * if the DTD has an unparsed entity declaration for
- * the specified name.
- * false
- * otherwise.
- */
- boolean isUnparsedEntity( String entityName );
-
- /**
- * Checks if a notation is declared with the
- * specified name.
- *
- * @return
- * true
- * if the DTD has a notation declaration for the specified name.
- * false
- * otherwise.
- */
- boolean isNotation( String notationName );
-}
diff --git a/src/share/jaxws_classes/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java b/src/share/jaxws_classes/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java
deleted file mode 100644
index 3aa7c048..00000000
--- a/src/share/jaxws_classes/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype.helpers;
-
-import org.relaxng.datatype.DatatypeLibraryFactory;
-import org.relaxng.datatype.DatatypeLibrary;
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-import java.util.Vector;
-import java.io.Reader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URL;
-
-/**
- * Discovers the datatype library implementation from the classpath.
- *
- * <p>
- * The call of the createDatatypeLibrary method finds an implementation
- * from a given datatype library URI at run-time.
- */
-public class DatatypeLibraryLoader implements DatatypeLibraryFactory {
- private final Service service = new Service(DatatypeLibraryFactory.class);
-
- public DatatypeLibrary createDatatypeLibrary(String uri) {
- for (Enumeration e = service.getProviders();
- e.hasMoreElements();) {
- DatatypeLibraryFactory factory
- = (DatatypeLibraryFactory)e.nextElement();
- DatatypeLibrary library = factory.createDatatypeLibrary(uri);
- if (library != null)
- return library;
- }
- return null;
- }
-
- private static class Service {
- private final Class serviceClass;
- private final Enumeration configFiles;
- private Enumeration classNames = null;
- private final Vector providers = new Vector();
- private Loader loader;
-
- private class ProviderEnumeration implements Enumeration {
- private int nextIndex = 0;
-
- public boolean hasMoreElements() {
- return nextIndex < providers.size() || moreProviders();
- }
-
- public Object nextElement() {
- try {
- return providers.elementAt(nextIndex++);
- }
- catch (ArrayIndexOutOfBoundsException e) {
- throw new NoSuchElementException();
- }
- }
- }
-
- private static class Singleton implements Enumeration {
- private Object obj;
- private Singleton(Object obj) {
- this.obj = obj;
- }
-
- public boolean hasMoreElements() {
- return obj != null;
- }
-
- public Object nextElement() {
- if (obj == null)
- throw new NoSuchElementException();
- Object tem = obj;
- obj = null;
- return tem;
- }
- }
-
- // JDK 1.1
- private static class Loader {
- Enumeration getResources(String resName) {
- ClassLoader cl = Loader.class.getClassLoader();
- URL url;
- if (cl == null)
- url = ClassLoader.getSystemResource(resName);
- else
- url = cl.getResource(resName);
- return new Singleton(url);
- }
-
- Class loadClass(String name) throws ClassNotFoundException {
- return Class.forName(name);
- }
- }
-
- // JDK 1.2+
- private static class Loader2 extends Loader {
- private ClassLoader cl;
-
- Loader2() {
- cl = Loader2.class.getClassLoader();
- // If the thread context class loader has the class loader
- // of this class as an ancestor, use the thread context class
- // loader. Otherwise, the thread context class loader
- // probably hasn't been set up properly, so don't use it.
- ClassLoader clt = Thread.currentThread().getContextClassLoader();
- for (ClassLoader tem = clt; tem != null; tem = tem.getParent())
- if (tem == cl) {
- cl = clt;
- break;
- }
- }
-
- Enumeration getResources(String resName) {
- try {
- return cl.getResources(resName);
- }
- catch (IOException e) {
- return new Singleton(null);
- }
- }
-
- Class loadClass(String name) throws ClassNotFoundException {
- return Class.forName(name, true, cl);
- }
- }
-
- public Service(Class cls) {
- try {
- loader = new Loader2();
- }
- catch (NoSuchMethodError e) {
- loader = new Loader();
- }
- serviceClass = cls;
- String resName = "META-INF/services/" + serviceClass.getName();
- configFiles = loader.getResources(resName);
- }
-
- public Enumeration getProviders() {
- return new ProviderEnumeration();
- }
-
- synchronized private boolean moreProviders() {
- for (;;) {
- while (classNames == null) {
- if (!configFiles.hasMoreElements())
- return false;
- classNames = parseConfigFile((URL)configFiles.nextElement());
- }
- while (classNames.hasMoreElements()) {
- String className = (String)classNames.nextElement();
- try {
- Class cls = loader.loadClass(className);
- Object obj = cls.newInstance();
- if (serviceClass.isInstance(obj)) {
- providers.addElement(obj);
- return true;
- }
- }
- catch (ClassNotFoundException e) { }
- catch (InstantiationException e) { }
- catch (IllegalAccessException e) { }
- catch (LinkageError e) { }
- }
- classNames = null;
- }
- }
-
- private static final int START = 0;
- private static final int IN_NAME = 1;
- private static final int IN_COMMENT = 2;
-
- private static Enumeration parseConfigFile(URL url) {
- try {
- InputStream in = url.openStream();
- Reader r;
- try {
- r = new InputStreamReader(in, "UTF-8");
- }
- catch (UnsupportedEncodingException e) {
- r = new InputStreamReader(in, "UTF8");
- }
- r = new BufferedReader(r);
- Vector tokens = new Vector();
- StringBuffer tokenBuf = new StringBuffer();
- int state = START;
- for (;;) {
- int n = r.read();
- if (n < 0)
- break;
- char c = (char)n;
- switch (c) {
- case '\r':
- case '\n':
- state = START;
- break;
- case ' ':
- case '\t':
- break;
- case '#':
- state = IN_COMMENT;
- break;
- default:
- if (state != IN_COMMENT) {
- state = IN_NAME;
- tokenBuf.append(c);
- }
- break;
- }
- if (tokenBuf.length() != 0 && state != IN_NAME) {
- tokens.addElement(tokenBuf.toString());
- tokenBuf.setLength(0);
- }
- }
- if (tokenBuf.length() != 0)
- tokens.addElement(tokenBuf.toString());
- return tokens.elements();
- }
- catch (IOException e) {
- return null;
- }
- }
- }
-
-}
diff --git a/src/share/jaxws_classes/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java b/src/share/jaxws_classes/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java
deleted file mode 100644
index c160692f..00000000
--- a/src/share/jaxws_classes/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype.helpers;
-
-import org.relaxng.datatype.*;
-
-/**
- * Dummy implementation of {@link DatatypeBuilder}.
- *
- * This implementation can be used for Datatypes which have no parameters.
- * Any attempt to add parameters will be rejected.
- *
- * <p>
- * Typical usage would be:
- * <PRE><XMP>
- * class MyDatatypeLibrary implements DatatypeLibrary {
- * ....
- * DatatypeBuilder createDatatypeBuilder( String typeName ) {
- * return new ParameterleessDatatypeBuilder(createDatatype(typeName));
- * }
- * ....
- * }
- * </XMP></PRE>
- *
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public final class ParameterlessDatatypeBuilder implements DatatypeBuilder {
-
- /** This type object is returned for the derive method. */
- private final Datatype baseType;
-
- public ParameterlessDatatypeBuilder( Datatype baseType ) {
- this.baseType = baseType;
- }
-
- public void addParameter( String name, String strValue, ValidationContext context )
- throws DatatypeException {
- throw new DatatypeException();
- }
-
- public Datatype createDatatype() throws DatatypeException {
- return baseType;
- }
-}
diff --git a/src/share/jaxws_classes/org/relaxng/datatype/helpers/StreamingValidatorImpl.java b/src/share/jaxws_classes/org/relaxng/datatype/helpers/StreamingValidatorImpl.java
deleted file mode 100644
index 51628baf..00000000
--- a/src/share/jaxws_classes/org/relaxng/datatype/helpers/StreamingValidatorImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * Copyright (c) 2001, Thai Open Source Software Center Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Thai Open Source Software Center Ltd nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.relaxng.datatype.helpers;
-
-import org.relaxng.datatype.*;
-
-/**
- * Dummy implementation of {@link DatatypeStreamingValidator}.
- *
- * <p>
- * This implementation can be used as a quick hack when the performance
- * of streaming validation is not important. And this implementation
- * also shows you how to implement the DatatypeStreamingValidator interface.
- *
- * <p>
- * Typical usage would be:
- * <PRE><XMP>
- * class MyDatatype implements Datatype {
- * ....
- * public DatatypeStreamingValidator createStreamingValidator( ValidationContext context ) {
- * return new StreamingValidatorImpl(this,context);
- * }
- * ....
- * }
- * </XMP></PRE>
- *
- * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
- */
-public final class StreamingValidatorImpl implements DatatypeStreamingValidator {
-
- /** This buffer accumulates characters. */
- private final StringBuffer buffer = new StringBuffer();
-
- /** Datatype obejct that creates this streaming validator. */
- private final Datatype baseType;
-
- /** The current context. */
- private final ValidationContext context;
-
- public void addCharacters( char[] buf, int start, int len ) {
- // append characters to the current buffer.
- buffer.append(buf,start,len);
- }
-
- public boolean isValid() {
- return baseType.isValid(buffer.toString(),context);
- }
-
- public void checkValid() throws DatatypeException {
- baseType.checkValid(buffer.toString(),context);
- }
-
- public StreamingValidatorImpl( Datatype baseType, ValidationContext context ) {
- this.baseType = baseType;
- this.context = context;
- }
-}